summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--KDE2PORTING.html74
-rw-r--r--KDE3PORTING.html126
-rw-r--r--arts/kde/kartsdispatcher.cc4
-rw-r--r--arts/kde/kartsdispatcher.h4
-rw-r--r--arts/kde/kartsfloatwatch.cpp2
-rw-r--r--arts/kde/kartsfloatwatch.h8
-rw-r--r--arts/kde/kartsserver.cpp18
-rw-r--r--arts/kde/kartsserver.h4
-rw-r--r--arts/kde/kaudioconverter.cc18
-rw-r--r--arts/kde/kaudioconverter.h6
-rw-r--r--arts/kde/kaudiomanagerplay.cpp14
-rw-r--r--arts/kde/kaudiomanagerplay.h12
-rw-r--r--arts/kde/kaudioplaystream.cpp18
-rw-r--r--arts/kde/kaudioplaystream.h12
-rw-r--r--arts/kde/kaudioplaystream_p.h6
-rw-r--r--arts/kde/kaudiorecordstream.cpp24
-rw-r--r--arts/kde/kaudiorecordstream.h8
-rw-r--r--arts/kde/kaudiorecordstream_p.h4
-rw-r--r--arts/kde/kconverttest.cc14
-rw-r--r--arts/kde/kconverttest.h2
-rw-r--r--arts/kde/kdatarequest_impl.h4
-rw-r--r--arts/kde/kioinputstream_impl.cpp44
-rw-r--r--arts/kde/kioinputstream_impl.h14
-rw-r--r--arts/kde/kplayobject.cc32
-rw-r--r--arts/kde/kplayobject.h14
-rw-r--r--arts/kde/kplayobjectcreator.cc18
-rw-r--r--arts/kde/kplayobjectcreator.h6
-rw-r--r--arts/kde/kplayobjectfactory.cc22
-rw-r--r--arts/kde/kplayobjectfactory.h8
-rw-r--r--arts/kde/kplayobjectfactory_p.h2
-rw-r--r--arts/kde/kvideowidget.cpp66
-rw-r--r--arts/kde/kvideowidget.h32
-rw-r--r--arts/kde/mcop-dcop/kmcop.cpp36
-rw-r--r--arts/kde/mcop-dcop/kmcop.h6
-rw-r--r--arts/kde/mcop-dcop/mcopdcopobject.cpp30
-rw-r--r--arts/kde/mcop-dcop/mcopdcopobject.h28
-rw-r--r--arts/kde/mcop-dcop/mcopdcoptools.h8
-rw-r--r--arts/knotify/knotify.cpp150
-rw-r--r--arts/knotify/knotify.h40
-rw-r--r--arts/message/artsmessage.cc10
-rw-r--r--common_texts.cpp120
-rw-r--r--dcop/client/dcop.cpp136
-rw-r--r--dcop/client/dcopfind.cpp62
-rw-r--r--dcop/client/dcopstart.cpp30
-rw-r--r--dcop/client/marshall.cpp148
-rw-r--r--dcop/dcop_deadlock_test.cpp30
-rw-r--r--dcop/dcop_deadlock_test.h16
-rw-r--r--dcop/dcopc.c8
-rw-r--r--dcop/dcopclient.cpp622
-rw-r--r--dcop/dcopclient.h172
-rw-r--r--dcop/dcopidl/dcopidl_test.h18
-rw-r--r--dcop/dcopidl/main.cpp10
-rw-r--r--dcop/dcopidl/scanner.cc20
-rw-r--r--dcop/dcopidl/yacc.cc126
-rw-r--r--dcop/dcopidl/yacc.cc.h2
-rw-r--r--dcop/dcopidl2cpp/dcopidl_test.h60
-rw-r--r--dcop/dcopidl2cpp/main.cpp22
-rw-r--r--dcop/dcopidl2cpp/main.h10
-rw-r--r--dcop/dcopidl2cpp/skel.cpp120
-rw-r--r--dcop/dcopidl2cpp/stub.cpp48
-rw-r--r--dcop/dcopidl2cpp/stubimpl.cpp70
-rw-r--r--dcop/dcopidl2cpp/type.h8
-rw-r--r--dcop/dcopobject.cpp76
-rw-r--r--dcop/dcopobject.h74
-rw-r--r--dcop/dcopref.cpp36
-rw-r--r--dcop/dcopref.h352
-rw-r--r--dcop/dcopserver.cpp298
-rw-r--r--dcop/dcopserver.h76
-rw-r--r--dcop/dcopserver_shutdown.c4
-rw-r--r--dcop/dcopserver_shutdown_win.cpp20
-rw-r--r--dcop/dcopserver_win.cpp4
-rw-r--r--dcop/dcopsignals.cpp30
-rw-r--r--dcop/dcopsignals.h42
-rw-r--r--dcop/dcopstub.cpp8
-rw-r--r--dcop/dcopstub.h14
-rw-r--r--dcop/dcoptypes.h54
-rw-r--r--dcop/kdatastream.h14
-rw-r--r--dcop/testdcop.cpp112
-rw-r--r--dcop/testdcop.h26
-rw-r--r--dcop/tests/driver.cpp10
-rw-r--r--dcop/tests/driver.h4
-rw-r--r--dcop/tests/test.cpp2
-rw-r--r--dnssd/domainbrowser.cpp38
-rw-r--r--dnssd/domainbrowser.h18
-rw-r--r--dnssd/publicservice.cpp40
-rw-r--r--dnssd/publicservice.h26
-rw-r--r--dnssd/query.cpp36
-rw-r--r--dnssd/query.h8
-rw-r--r--dnssd/remoteservice.cpp28
-rw-r--r--dnssd/remoteservice.h14
-rw-r--r--dnssd/responder.cpp14
-rw-r--r--dnssd/responder.h12
-rw-r--r--dnssd/sdevent.h30
-rw-r--r--dnssd/servicebase.cpp36
-rw-r--r--dnssd/servicebase.h34
-rw-r--r--dnssd/servicebrowser.cpp76
-rw-r--r--dnssd/servicebrowser.h28
-rw-r--r--interfaces/khexedit/byteseditinterface.h16
-rw-r--r--interfaces/khexedit/charcolumninterface.h6
-rw-r--r--interfaces/khexedit/clipboardinterface.h6
-rw-r--r--interfaces/kimproxy/interface/kimiface.h66
-rw-r--r--interfaces/kimproxy/library/kimproxy.cpp144
-rw-r--r--interfaces/kimproxy/library/kimproxy.h94
-rw-r--r--interfaces/kimproxy/library/kimproxyiface.h2
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp44
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h8
-rw-r--r--interfaces/kmediaplayer/player.cpp4
-rw-r--r--interfaces/kmediaplayer/player.h4
-rw-r--r--interfaces/kmediaplayer/view.cpp10
-rw-r--r--interfaces/kmediaplayer/view.h12
-rw-r--r--interfaces/kregexpeditor/kregexpeditorinterface.h22
-rw-r--r--interfaces/kscript/sample/shellscript.cpp16
-rw-r--r--interfaces/kscript/sample/shellscript.h16
-rw-r--r--interfaces/kscript/scriptclientinterface.h24
-rw-r--r--interfaces/kscript/scriptinterface.h14
-rw-r--r--interfaces/kscript/scriptloader.cpp18
-rw-r--r--interfaces/kscript/scriptloader.h8
-rw-r--r--interfaces/kscript/scriptmanager.cpp34
-rw-r--r--interfaces/kscript/scriptmanager.h44
-rw-r--r--interfaces/kspeech/kspeech.h102
-rw-r--r--interfaces/kspeech/kspeechsink.h22
-rw-r--r--interfaces/ktexteditor/blockselectiondcopinterface.h4
-rw-r--r--interfaces/ktexteditor/blockselectioninterface.cpp4
-rw-r--r--interfaces/ktexteditor/blockselectioninterface.h2
-rw-r--r--interfaces/ktexteditor/clipboarddcopinterface.h4
-rw-r--r--interfaces/ktexteditor/clipboardinterface.cpp4
-rw-r--r--interfaces/ktexteditor/clipboardinterface.h2
-rw-r--r--interfaces/ktexteditor/codecompletioninterface.cpp2
-rw-r--r--interfaces/ktexteditor/codecompletioninterface.h24
-rw-r--r--interfaces/ktexteditor/configinterface.cpp2
-rw-r--r--interfaces/ktexteditor/configinterface.h2
-rw-r--r--interfaces/ktexteditor/configinterfaceextension.cpp4
-rw-r--r--interfaces/ktexteditor/configinterfaceextension.h16
-rw-r--r--interfaces/ktexteditor/cursorinterface.cpp2
-rw-r--r--interfaces/ktexteditor/cursorinterface.h12
-rw-r--r--interfaces/ktexteditor/document.h10
-rw-r--r--interfaces/ktexteditor/documentdcopinfo.cpp4
-rw-r--r--interfaces/ktexteditor/documentdcopinfo.h8
-rw-r--r--interfaces/ktexteditor/documentinfo.cpp4
-rw-r--r--interfaces/ktexteditor/documentinfo.h6
-rw-r--r--interfaces/ktexteditor/dynwordwrapinterface.cpp2
-rw-r--r--interfaces/ktexteditor/dynwordwrapinterface.h2
-rw-r--r--interfaces/ktexteditor/editdcopinterface.cpp10
-rw-r--r--interfaces/ktexteditor/editdcopinterface.h14
-rw-r--r--interfaces/ktexteditor/editinterface.cpp4
-rw-r--r--interfaces/ktexteditor/editinterface.h18
-rw-r--r--interfaces/ktexteditor/editinterfaceext.h2
-rw-r--r--interfaces/ktexteditor/editor.h4
-rw-r--r--interfaces/ktexteditor/editorchooser.cpp46
-rw-r--r--interfaces/ktexteditor/editorchooser.h24
-rw-r--r--interfaces/ktexteditor/encodingdcopinterface.cpp4
-rw-r--r--interfaces/ktexteditor/encodingdcopinterface.h8
-rw-r--r--interfaces/ktexteditor/encodinginterface.cpp4
-rw-r--r--interfaces/ktexteditor/encodinginterface.h6
-rw-r--r--interfaces/ktexteditor/highlightinginterface.cpp2
-rw-r--r--interfaces/ktexteditor/highlightinginterface.h6
-rw-r--r--interfaces/ktexteditor/ktexteditor.cpp20
-rw-r--r--interfaces/ktexteditor/markinterface.cpp2
-rw-r--r--interfaces/ktexteditor/markinterface.h6
-rw-r--r--interfaces/ktexteditor/markinterfaceextension.cpp2
-rw-r--r--interfaces/ktexteditor/markinterfaceextension.h12
-rw-r--r--interfaces/ktexteditor/plugin.h2
-rw-r--r--interfaces/ktexteditor/popupmenuinterface.cpp2
-rw-r--r--interfaces/ktexteditor/popupmenuinterface.h4
-rw-r--r--interfaces/ktexteditor/printdcopinterface.h4
-rw-r--r--interfaces/ktexteditor/printinterface.cpp4
-rw-r--r--interfaces/ktexteditor/printinterface.h2
-rw-r--r--interfaces/ktexteditor/searchdcopinterface.cpp32
-rw-r--r--interfaces/ktexteditor/searchdcopinterface.h24
-rw-r--r--interfaces/ktexteditor/searchinterface.cpp4
-rw-r--r--interfaces/ktexteditor/searchinterface.h6
-rw-r--r--interfaces/ktexteditor/selectiondcopinterface.cpp4
-rw-r--r--interfaces/ktexteditor/selectiondcopinterface.h8
-rw-r--r--interfaces/ktexteditor/selectionextdcopinterface.h2
-rw-r--r--interfaces/ktexteditor/selectioninterface.cpp4
-rw-r--r--interfaces/ktexteditor/selectioninterface.h8
-rw-r--r--interfaces/ktexteditor/selectioninterfaceext.cpp4
-rw-r--r--interfaces/ktexteditor/selectioninterfaceext.h2
-rw-r--r--interfaces/ktexteditor/sessionconfiginterface.cpp2
-rw-r--r--interfaces/ktexteditor/sessionconfiginterface.h2
-rw-r--r--interfaces/ktexteditor/templateinterface.cpp34
-rw-r--r--interfaces/ktexteditor/templateinterface.h14
-rw-r--r--interfaces/ktexteditor/texthintinterface.h6
-rw-r--r--interfaces/ktexteditor/undodcopinterface.h4
-rw-r--r--interfaces/ktexteditor/undointerface.cpp4
-rw-r--r--interfaces/ktexteditor/undointerface.h2
-rw-r--r--interfaces/ktexteditor/variableinterface.h4
-rw-r--r--interfaces/ktexteditor/view.h8
-rw-r--r--interfaces/ktexteditor/viewcursordcopinterface.cpp4
-rw-r--r--interfaces/ktexteditor/viewcursordcopinterface.h6
-rw-r--r--interfaces/ktexteditor/viewcursorinterface.cpp4
-rw-r--r--interfaces/ktexteditor/viewcursorinterface.h4
-rw-r--r--interfaces/ktexteditor/viewstatusmsgdcopinterface.cpp4
-rw-r--r--interfaces/ktexteditor/viewstatusmsgdcopinterface.h6
-rw-r--r--interfaces/ktexteditor/viewstatusmsginterface.cpp6
-rw-r--r--interfaces/ktexteditor/viewstatusmsginterface.h4
-rw-r--r--interfaces/ktexteditor/wordwrapinterface.cpp2
-rw-r--r--interfaces/ktexteditor/wordwrapinterface.h2
-rw-r--r--interfaces/terminal/kde_terminal_interface.h34
-rw-r--r--interfaces/terminal/test/main.cc24
-rw-r--r--kab/addressbook.cc170
-rw-r--r--kab/addressbook.h134
-rw-r--r--kab/kabapi.cc18
-rw-r--r--kab/kabapi.h14
-rw-r--r--kab/qconfigDB.cc344
-rw-r--r--kab/qconfigDB.h172
-rw-r--r--kabc/address.cpp142
-rw-r--r--kabc/address.h148
-rw-r--r--kabc/addressbook.cpp92
-rw-r--r--kabc/addressbook.h40
-rw-r--r--kabc/addresseedialog.cpp90
-rw-r--r--kabc/addresseedialog.h26
-rw-r--r--kabc/addresseehelper.cpp16
-rw-r--r--kabc/addresseehelper.h22
-rw-r--r--kabc/addresseelist.cpp38
-rw-r--r--kabc/addresseelist.h14
-rw-r--r--kabc/addresslineedit.cpp136
-rw-r--r--kabc/addresslineedit.h38
-rw-r--r--kabc/agent.cpp12
-rw-r--r--kabc/agent.h20
-rw-r--r--kabc/distributionlist.cpp58
-rw-r--r--kabc/distributionlist.h28
-rw-r--r--kabc/distributionlistdialog.cpp128
-rw-r--r--kabc/distributionlistdialog.h30
-rw-r--r--kabc/distributionlisteditor.cpp94
-rw-r--r--kabc/distributionlisteditor.h26
-rw-r--r--kabc/errorhandler.cpp10
-rw-r--r--kabc/errorhandler.h14
-rw-r--r--kabc/field.h30
-rw-r--r--kabc/format.h6
-rw-r--r--kabc/formatfactory.cpp26
-rw-r--r--kabc/formatfactory.h24
-rw-r--r--kabc/formatplugin.h12
-rw-r--r--kabc/formats/binaryformat.cpp46
-rw-r--r--kabc/formats/binaryformat.h18
-rw-r--r--kabc/geo.cpp10
-rw-r--r--kabc/geo.h12
-rw-r--r--kabc/kab2kabc.cpp58
-rw-r--r--kabc/key.cpp24
-rw-r--r--kabc/key.h42
-rw-r--r--kabc/ldapclient.cpp128
-rw-r--r--kabc/ldapclient.h104
-rw-r--r--kabc/ldapconfigwidget.cpp198
-rw-r--r--kabc/ldapconfigwidget.h80
-rw-r--r--kabc/ldapurl.cpp44
-rw-r--r--kabc/ldapurl.h40
-rw-r--r--kabc/ldif.cpp62
-rw-r--r--kabc/ldif.h48
-rw-r--r--kabc/ldifconverter.cpp182
-rw-r--r--kabc/ldifconverter.h18
-rw-r--r--kabc/lock.cpp48
-rw-r--r--kabc/lock.h22
-rw-r--r--kabc/locknull.cpp4
-rw-r--r--kabc/locknull.h4
-rw-r--r--kabc/phonenumber.cpp26
-rw-r--r--kabc/phonenumber.h40
-rw-r--r--kabc/picture.cpp22
-rw-r--r--kabc/picture.h34
-rw-r--r--kabc/plugin.cpp12
-rw-r--r--kabc/plugin.h20
-rw-r--r--kabc/plugins/dir/resourcedir.cpp42
-rw-r--r--kabc/plugins/dir/resourcedir.h16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.h4
-rw-r--r--kabc/plugins/evolution/dbwrapper.cpp44
-rw-r--r--kabc/plugins/evolution/dbwrapper.h22
-rw-r--r--kabc/plugins/evolution/resourceevo.cpp12
-rw-r--r--kabc/plugins/file/resourcefile.cpp78
-rw-r--r--kabc/plugins/file/resourcefile.h20
-rw-r--r--kabc/plugins/file/resourcefileconfig.cpp26
-rw-r--r--kabc/plugins/file/resourcefileconfig.h6
-rw-r--r--kabc/plugins/ldapkio/resourceldapkio.cpp218
-rw-r--r--kabc/plugins/ldapkio/resourceldapkio.h66
-rw-r--r--kabc/plugins/ldapkio/resourceldapkioconfig.cpp140
-rw-r--r--kabc/plugins/ldapkio/resourceldapkioconfig.h40
-rw-r--r--kabc/plugins/net/resourcenet.cpp36
-rw-r--r--kabc/plugins/net/resourcenet.h14
-rw-r--r--kabc/plugins/net/resourcenetconfig.cpp16
-rw-r--r--kabc/plugins/net/resourcenetconfig.h4
-rw-r--r--kabc/plugins/sql/resourcesql.cpp74
-rw-r--r--kabc/plugins/sql/resourcesql.h20
-rw-r--r--kabc/plugins/sql/resourcesqlconfig.cpp30
-rw-r--r--kabc/plugins/sql/resourcesqlconfig.h4
-rw-r--r--kabc/resource.cpp14
-rw-r--r--kabc/resource.h14
-rw-r--r--kabc/resourceselectdialog.cpp20
-rw-r--r--kabc/resourceselectdialog.h8
-rw-r--r--kabc/scripts/addressee.src.cpp192
-rw-r--r--kabc/scripts/addressee.src.h90
-rw-r--r--kabc/scripts/field.src.cpp70
-rw-r--r--kabc/secrecy.cpp8
-rw-r--r--kabc/secrecy.h16
-rw-r--r--kabc/sortmode.cpp8
-rw-r--r--kabc/sound.cpp20
-rw-r--r--kabc/sound.h32
-rw-r--r--kabc/stdaddressbook.cpp24
-rw-r--r--kabc/stdaddressbook.h4
-rw-r--r--kabc/tests/bigwrite.cpp4
-rw-r--r--kabc/tests/kabcargl.cpp22
-rw-r--r--kabc/tests/testaddresslineedit.cpp2
-rw-r--r--kabc/tests/testdistlist.cpp6
-rw-r--r--kabc/tests/testkabc.cpp10
-rw-r--r--kabc/tests/testkabcdlg.cpp2
-rw-r--r--kabc/tests/testldapclient.cpp50
-rw-r--r--kabc/tests/testldapclient.h6
-rw-r--r--kabc/tests/testlock.cpp64
-rw-r--r--kabc/tests/testlock.h8
-rw-r--r--kabc/timezone.cpp10
-rw-r--r--kabc/timezone.h12
-rw-r--r--kabc/vcard/AdrParam.cpp8
-rw-r--r--kabc/vcard/AdrValue.cpp6
-rw-r--r--kabc/vcard/AgentParam.cpp4
-rw-r--r--kabc/vcard/AgentValue.cpp4
-rw-r--r--kabc/vcard/ClassValue.cpp4
-rw-r--r--kabc/vcard/ContentLine.cpp36
-rw-r--r--kabc/vcard/DateParam.cpp4
-rw-r--r--kabc/vcard/DateValue.cpp40
-rw-r--r--kabc/vcard/EmailParam.cpp4
-rw-r--r--kabc/vcard/Entity.cpp8
-rw-r--r--kabc/vcard/Enum.cpp4
-rw-r--r--kabc/vcard/FloatValue.cpp6
-rw-r--r--kabc/vcard/GeoValue.cpp4
-rw-r--r--kabc/vcard/ImageParam.cpp4
-rw-r--r--kabc/vcard/ImageValue.cpp4
-rw-r--r--kabc/vcard/ImgValue.cpp4
-rw-r--r--kabc/vcard/LangValue.cpp14
-rw-r--r--kabc/vcard/NValue.cpp8
-rw-r--r--kabc/vcard/OrgValue.cpp6
-rw-r--r--kabc/vcard/Param.cpp10
-rw-r--r--kabc/vcard/PhoneNumberValue.cpp4
-rw-r--r--kabc/vcard/RToken.cpp6
-rw-r--r--kabc/vcard/SoundValue.cpp4
-rw-r--r--kabc/vcard/SourceParam.cpp4
-rw-r--r--kabc/vcard/TelParam.cpp4
-rw-r--r--kabc/vcard/TelValue.cpp4
-rw-r--r--kabc/vcard/TextBinParam.cpp4
-rw-r--r--kabc/vcard/TextBinValue.cpp4
-rw-r--r--kabc/vcard/TextListValue.cpp6
-rw-r--r--kabc/vcard/TextParam.cpp4
-rw-r--r--kabc/vcard/TextValue.cpp4
-rw-r--r--kabc/vcard/URIValue.cpp10
-rw-r--r--kabc/vcard/UTCValue.cpp4
-rw-r--r--kabc/vcard/VCard.cpp42
-rw-r--r--kabc/vcard/VCardEntity.cpp14
-rw-r--r--kabc/vcard/Value.cpp4
-rw-r--r--kabc/vcard/include/VCardAdrParam.h12
-rw-r--r--kabc/vcard/include/VCardAdrValue.h44
-rw-r--r--kabc/vcard/include/VCardAgentParam.h4
-rw-r--r--kabc/vcard/include/VCardAgentValue.h2
-rw-r--r--kabc/vcard/include/VCardClassValue.h2
-rw-r--r--kabc/vcard/include/VCardContentLine.h8
-rw-r--r--kabc/vcard/include/VCardDateParam.h2
-rw-r--r--kabc/vcard/include/VCardDateValue.h14
-rw-r--r--kabc/vcard/include/VCardDefines.h6
-rw-r--r--kabc/vcard/include/VCardEmailParam.h4
-rw-r--r--kabc/vcard/include/VCardEntity.h14
-rw-r--r--kabc/vcard/include/VCardEnum.h8
-rw-r--r--kabc/vcard/include/VCardFloatValue.h2
-rw-r--r--kabc/vcard/include/VCardImageParam.h2
-rw-r--r--kabc/vcard/include/VCardImageValue.h2
-rw-r--r--kabc/vcard/include/VCardLangValue.h16
-rw-r--r--kabc/vcard/include/VCardNValue.h24
-rw-r--r--kabc/vcard/include/VCardOrgValue.h8
-rw-r--r--kabc/vcard/include/VCardParam.h22
-rw-r--r--kabc/vcard/include/VCardRToken.h4
-rw-r--r--kabc/vcard/include/VCardSoundValue.h2
-rw-r--r--kabc/vcard/include/VCardSourceParam.h12
-rw-r--r--kabc/vcard/include/VCardTelParam.h4
-rw-r--r--kabc/vcard/include/VCardTelValue.h2
-rw-r--r--kabc/vcard/include/VCardTextBinParam.h2
-rw-r--r--kabc/vcard/include/VCardTextBinValue.h14
-rw-r--r--kabc/vcard/include/VCardTextListValue.h8
-rw-r--r--kabc/vcard/include/VCardTextParam.h2
-rw-r--r--kabc/vcard/include/VCardURIValue.h14
-rw-r--r--kabc/vcard/include/VCardUTCValue.h2
-rw-r--r--kabc/vcard/include/VCardVCard.h16
-rw-r--r--kabc/vcard/include/VCardVCardEntity.h8
-rw-r--r--kabc/vcard/include/VCardValue.h6
-rw-r--r--kabc/vcard/include/generated/AdrParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/AdrValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/AgentParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/AgentValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/ClassValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/ContentLine-generated.h8
-rw-r--r--kabc/vcard/include/generated/DateParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/DateValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/EmailParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/FloatValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/GeoValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/Group-generated.h8
-rw-r--r--kabc/vcard/include/generated/ImageParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/ImageValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/ImgParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/ImgValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/LangValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/NValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/Name-generated.h8
-rw-r--r--kabc/vcard/include/generated/OrgValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/Param-generated.h8
-rw-r--r--kabc/vcard/include/generated/ParamName-generated.h8
-rw-r--r--kabc/vcard/include/generated/ParamValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/PhoneNumberValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/SoundValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/SourceParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/TelParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/TelValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextBinParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextBinValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextListValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextNSParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextParam-generated.h8
-rw-r--r--kabc/vcard/include/generated/TextValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/URIValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/UTCValue-generated.h8
-rw-r--r--kabc/vcard/include/generated/VCard-generated.h8
-rw-r--r--kabc/vcard/include/generated/VCardEntity-generated.h8
-rw-r--r--kabc/vcard/include/generated/Value-generated.h8
-rw-r--r--kabc/vcard/testread.cpp12
-rw-r--r--kabc/vcard/testwrite.cpp2
-rw-r--r--kabc/vcard21parser.cpp84
-rw-r--r--kabc/vcard21parser.h36
-rw-r--r--kabc/vcardconverter.cpp30
-rw-r--r--kabc/vcardconverter.h36
-rw-r--r--kabc/vcardformat.cpp8
-rw-r--r--kabc/vcardformat.h6
-rw-r--r--kabc/vcardformatimpl.cpp146
-rw-r--r--kabc/vcardformatimpl.h30
-rw-r--r--kabc/vcardformatplugin.cpp34
-rw-r--r--kabc/vcardformatplugin.h10
-rw-r--r--kabc/vcardparser/testread.cpp14
-rw-r--r--kabc/vcardparser/testread2.cpp2
-rw-r--r--kabc/vcardparser/testutils.cpp12
-rw-r--r--kabc/vcardparser/testutils.h6
-rw-r--r--kabc/vcardparser/testwrite.cpp28
-rw-r--r--kabc/vcardparser/vcard.cpp6
-rw-r--r--kabc/vcardparser/vcard.h16
-rw-r--r--kabc/vcardparser/vcardline.cpp36
-rw-r--r--kabc/vcardparser/vcardline.h42
-rw-r--r--kabc/vcardparser/vcardparser.cpp94
-rw-r--r--kabc/vcardparser/vcardparser.h4
-rw-r--r--kabc/vcardtool.cpp130
-rw-r--r--kabc/vcardtool.h16
-rw-r--r--kate/interfaces/document.h58
-rw-r--r--kate/interfaces/interfaces.cpp12
-rw-r--r--kate/interfaces/katecmd.cpp32
-rw-r--r--kate/interfaces/katecmd.h40
-rw-r--r--kate/interfaces/view.h14
-rw-r--r--kate/part/katearbitraryhighlight.cpp34
-rw-r--r--kate/part/katearbitraryhighlight.h20
-rw-r--r--kate/part/kateattribute.cpp18
-rw-r--r--kate/part/kateattribute.h32
-rw-r--r--kate/part/kateautoindent.cpp250
-rw-r--r--kate/part/kateautoindent.h68
-rw-r--r--kate/part/katebookmarks.cpp54
-rw-r--r--kate/part/katebookmarks.h8
-rw-r--r--kate/part/katebuffer.cpp102
-rw-r--r--kate/part/katebuffer.h18
-rw-r--r--kate/part/katecmds.cpp80
-rw-r--r--kate/part/katecmds.h28
-rw-r--r--kate/part/katecodecompletion.cpp158
-rw-r--r--kate/part/katecodecompletion.h48
-rw-r--r--kate/part/katecodefoldinghelpers.cpp48
-rw-r--r--kate/part/katecodefoldinghelpers.h30
-rw-r--r--kate/part/kateconfig.cpp102
-rw-r--r--kate/part/kateconfig.h94
-rw-r--r--kate/part/katecursor.cpp4
-rw-r--r--kate/part/katecursor.h4
-rw-r--r--kate/part/katedialogs.cpp692
-rw-r--r--kate/part/katedialogs.h108
-rw-r--r--kate/part/katedocument.cpp464
-rw-r--r--kate/part/katedocument.h186
-rw-r--r--kate/part/katedocumenthelpers.cpp4
-rw-r--r--kate/part/katedocumenthelpers.h4
-rw-r--r--kate/part/katefactory.cpp16
-rw-r--r--kate/part/katefactory.h26
-rw-r--r--kate/part/katefiletype.cpp172
-rw-r--r--kate/part/katefiletype.h56
-rw-r--r--kate/part/katefont.cpp20
-rw-r--r--kate/part/katefont.h24
-rw-r--r--kate/part/katehighlight.cpp562
-rw-r--r--kate/part/katehighlight.h198
-rw-r--r--kate/part/kateindentscriptabstracts.cpp8
-rw-r--r--kate/part/kateindentscriptabstracts.h32
-rw-r--r--kate/part/katejscript.cpp146
-rw-r--r--kate/part/katejscript.h40
-rw-r--r--kate/part/kateluaindentscript.cpp82
-rw-r--r--kate/part/kateluaindentscript.h24
-rw-r--r--kate/part/kateprinter.cpp292
-rw-r--r--kate/part/kateprinter.h44
-rw-r--r--kate/part/katerenderer.cpp96
-rw-r--r--kate/part/katerenderer.h18
-rw-r--r--kate/part/kateschema.cpp480
-rw-r--r--kate/part/kateschema.h92
-rw-r--r--kate/part/katesearch.cpp116
-rw-r--r--kate/part/katesearch.h50
-rw-r--r--kate/part/katespell.cpp36
-rw-r--r--kate/part/katespell.h6
-rw-r--r--kate/part/katesupercursor.cpp98
-rw-r--r--kate/part/katesupercursor.h42
-rw-r--r--kate/part/katesyntaxdocument.cpp86
-rw-r--r--kate/part/katesyntaxdocument.h54
-rw-r--r--kate/part/katetemplatehandler.cpp48
-rw-r--r--kate/part/katetemplatehandler.h24
-rw-r--r--kate/part/katetextline.cpp54
-rw-r--r--kate/part/katetextline.h56
-rw-r--r--kate/part/kateundo.cpp10
-rw-r--r--kate/part/kateundo.h8
-rw-r--r--kate/part/kateview.cpp346
-rw-r--r--kate/part/kateview.h56
-rw-r--r--kate/part/kateviewhelpers.cpp204
-rw-r--r--kate/part/kateviewhelpers.h56
-rw-r--r--kate/part/kateviewinternal.cpp242
-rw-r--r--kate/part/kateviewinternal.h78
-rw-r--r--kate/part/test_regression.cpp324
-rw-r--r--kate/part/test_regression.h52
-rw-r--r--kate/plugins/autobookmarker/autobookmarker.cpp144
-rw-r--r--kate/plugins/autobookmarker/autobookmarker.h44
-rw-r--r--kate/plugins/insertfile/insertfileplugin.cpp32
-rw-r--r--kate/plugins/insertfile/insertfileplugin.h12
-rw-r--r--kate/plugins/isearch/ISearchPlugin.cpp96
-rw-r--r--kate/plugins/isearch/ISearchPlugin.h28
-rw-r--r--kate/plugins/kdatatool/kate_kdatatool.cpp40
-rw-r--r--kate/plugins/kdatatool/kate_kdatatool.h18
-rw-r--r--kate/plugins/wordcompletion/docwordcompletion.cpp124
-rw-r--r--kate/plugins/wordcompletion/docwordcompletion.h40
-rw-r--r--kcert/kcertpart.cc278
-rw-r--r--kcert/kcertpart.h38
-rw-r--r--kcmshell/main.cpp46
-rw-r--r--kcmshell/main.h12
-rw-r--r--kconf_update/kconf_update.cpp256
-rw-r--r--kdecore/DESIGN.COLOR32
-rw-r--r--kdecore/kaboutdata.cpp98
-rw-r--r--kdecore/kaboutdata.h92
-rw-r--r--kdecore/kaccel.cpp184
-rw-r--r--kdecore/kaccel.h74
-rw-r--r--kdecore/kaccelaction.cpp52
-rw-r--r--kdecore/kaccelaction.h60
-rw-r--r--kdecore/kaccelbase.cpp38
-rw-r--r--kdecore/kaccelbase.h52
-rw-r--r--kdecore/kaccelmanager.cpp242
-rw-r--r--kdecore/kaccelmanager.h8
-rw-r--r--kdecore/kaccelmanager_private.h46
-rw-r--r--kdecore/kaccelprivate.h20
-rw-r--r--kdecore/kallocator.cpp18
-rw-r--r--kdecore/kallocator.h4
-rw-r--r--kdecore/kappdcopiface.cpp4
-rw-r--r--kdecore/kappdcopiface.h8
-rw-r--r--kdecore/kapplication.cpp832
-rw-r--r--kdecore/kapplication.h206
-rw-r--r--kdecore/kapplication_win.cpp38
-rw-r--r--kdecore/kasyncio.h8
-rw-r--r--kdecore/kaudioplayer.cpp10
-rw-r--r--kdecore/kaudioplayer.h14
-rw-r--r--kdecore/kbufferedio.cpp34
-rw-r--r--kdecore/kbufferedio.h16
-rw-r--r--kdecore/kcalendarsystem.cpp24
-rw-r--r--kdecore/kcalendarsystem.h70
-rw-r--r--kdecore/kcalendarsystemfactory.cpp6
-rw-r--r--kdecore/kcalendarsystemfactory.h10
-rw-r--r--kdecore/kcalendarsystemgregorian.cpp60
-rw-r--r--kdecore/kcalendarsystemgregorian.h46
-rw-r--r--kdecore/kcalendarsystemhebrew.cpp138
-rw-r--r--kdecore/kcalendarsystemhebrew.h52
-rw-r--r--kdecore/kcalendarsystemhijri.cpp70
-rw-r--r--kdecore/kcalendarsystemhijri.h44
-rw-r--r--kdecore/kcalendarsystemjalali.cpp68
-rw-r--r--kdecore/kcalendarsystemjalali.h44
-rw-r--r--kdecore/kcatalogue.cpp22
-rw-r--r--kdecore/kcatalogue.h12
-rw-r--r--kdecore/kcharsets.cpp124
-rw-r--r--kdecore/kcharsets.h42
-rw-r--r--kdecore/kcheckaccelerators.cpp82
-rw-r--r--kdecore/kcheckaccelerators.h24
-rw-r--r--kdecore/kckey.cpp2
-rw-r--r--kdecore/kclipboard.cpp38
-rw-r--r--kdecore/kclipboard.h12
-rw-r--r--kdecore/kcmdlineargs.cpp174
-rw-r--r--kdecore/kcmdlineargs.h40
-rw-r--r--kdecore/kcompletion.cpp138
-rw-r--r--kdecore/kcompletion.h104
-rw-r--r--kdecore/kcompletion_private.h32
-rw-r--r--kdecore/kcompletionbase.cpp2
-rw-r--r--kdecore/kconfig.cpp62
-rw-r--r--kdecore/kconfig.h26
-rw-r--r--kdecore/kconfig_compiler/example/autoexample.cpp2
-rw-r--r--kdecore/kconfig_compiler/kconfig_compiler.cpp582
-rw-r--r--kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp20
-rw-r--r--kdecore/kconfig_compiler/tests/kconfigcompiler_test.h2
-rw-r--r--kdecore/kconfig_compiler/tests/myprefs.h2
-rw-r--r--kdecore/kconfig_compiler/tests/test1.cpp.ref64
-rw-r--r--kdecore/kconfig_compiler/tests/test1.h.ref50
-rw-r--r--kdecore/kconfig_compiler/tests/test1main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test2.cpp.ref74
-rw-r--r--kdecore/kconfig_compiler/tests/test2.h.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test3.cpp.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test3.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test4.cpp.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test4.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test5.cpp.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test5.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test6.cpp.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test6.h.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test6main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test7.cpp.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test7.h.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.cpp.ref10
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.h.ref16
-rw-r--r--kdecore/kconfig_compiler/tests/test8b.cpp.ref16
-rw-r--r--kdecore/kconfig_compiler/tests/test8b.h.ref6
-rw-r--r--kdecore/kconfig_compiler/tests/test8main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test9.cpp.ref30
-rw-r--r--kdecore/kconfig_compiler/tests/test9.h.ref32
-rw-r--r--kdecore/kconfig_compiler/tests/test9main.cpp8
-rw-r--r--kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref126
-rw-r--r--kdecore/kconfig_compiler/tests/test_dpointer.h.ref20
-rw-r--r--kdecore/kconfigbackend.cpp164
-rw-r--r--kdecore/kconfigbackend.h30
-rw-r--r--kdecore/kconfigbase.cpp646
-rw-r--r--kdecore/kconfigbase.h340
-rw-r--r--kdecore/kconfigdata.h20
-rw-r--r--kdecore/kconfigdialogmanager.cpp198
-rw-r--r--kdecore/kconfigdialogmanager.h38
-rw-r--r--kdecore/kconfigskeleton.cpp418
-rw-r--r--kdecore/kconfigskeleton.h450
-rw-r--r--kdecore/kcrash.cpp6
-rw-r--r--kdecore/kcrash.h10
-rw-r--r--kdecore/kdcoppropertyproxy.cpp184
-rw-r--r--kdecore/kdcoppropertyproxy.h44
-rw-r--r--kdecore/kde-config.cpp.in14
-rw-r--r--kdecore/kdebug.cpp146
-rw-r--r--kdecore/kdebug.h126
-rw-r--r--kdecore/kdelibs_export.h2
-rw-r--r--kdecore/kdesktopfile.cpp110
-rw-r--r--kdecore/kdesktopfile.h58
-rw-r--r--kdecore/kextsock.cpp116
-rw-r--r--kdecore/kextsock.h70
-rw-r--r--kdecore/kgenericfactory.h102
-rw-r--r--kdecore/kglobal.cpp32
-rw-r--r--kdecore/kglobal.h18
-rw-r--r--kdecore/kglobalaccel.cpp30
-rw-r--r--kdecore/kglobalaccel.h28
-rw-r--r--kdecore/kglobalaccel_mac.h2
-rw-r--r--kdecore/kglobalaccel_win.cpp52
-rw-r--r--kdecore/kglobalaccel_win.h6
-rw-r--r--kdecore/kglobalaccel_x11.cpp68
-rw-r--r--kdecore/kglobalaccel_x11.h8
-rw-r--r--kdecore/kglobalsettings.cpp216
-rw-r--r--kdecore/kglobalsettings.h128
-rw-r--r--kdecore/kiconeffect.cpp158
-rw-r--r--kdecore/kiconeffect.h48
-rw-r--r--kdecore/kiconloader.cpp384
-rw-r--r--kdecore/kiconloader.h108
-rw-r--r--kdecore/kiconloader_p.h26
-rw-r--r--kdecore/kicontheme.cpp162
-rw-r--r--kdecore/kicontheme.h62
-rw-r--r--kdecore/kidna.cpp16
-rw-r--r--kdecore/kidna.h8
-rw-r--r--kdecore/kinstance.cpp28
-rw-r--r--kdecore/kinstance.h10
-rw-r--r--kdecore/kipc.cpp2
-rw-r--r--kdecore/kipc.h2
-rw-r--r--kdecore/kkeynative_x11.cpp8
-rw-r--r--kdecore/kkeyserver_x11.cpp70
-rw-r--r--kdecore/kkeyserver_x11.h20
-rw-r--r--kdecore/klibloader.cpp118
-rw-r--r--kdecore/klibloader.h70
-rw-r--r--kdecore/klocale.cpp520
-rw-r--r--kdecore/klocale.h238
-rw-r--r--kdecore/klockfile.cpp56
-rw-r--r--kdecore/klockfile.h8
-rw-r--r--kdecore/kmacroexpander.cpp144
-rw-r--r--kdecore/kmacroexpander.h106
-rw-r--r--kdecore/kmanagerselection.cpp20
-rw-r--r--kdecore/kmanagerselection.h10
-rw-r--r--kdecore/kmdcodec.cpp116
-rw-r--r--kdecore/kmdcodec.h104
-rw-r--r--kdecore/kmimesourcefactory.cpp12
-rw-r--r--kdecore/kmimesourcefactory.h8
-rw-r--r--kdecore/kmountpoint.cpp60
-rw-r--r--kdecore/kmountpoint.h28
-rw-r--r--kdecore/kmultipledrag.cpp18
-rw-r--r--kdecore/kmultipledrag.h18
-rw-r--r--kdecore/knotifyclient.cpp84
-rw-r--r--kdecore/knotifyclient.h46
-rw-r--r--kdecore/kpalette.cpp50
-rw-r--r--kdecore/kpalette.h52
-rw-r--r--kdecore/kpixmapprovider.h4
-rw-r--r--kdecore/kprocctrl.cpp16
-rw-r--r--kdecore/kprocctrl.h8
-rw-r--r--kdecore/kprocess.cpp76
-rw-r--r--kdecore/kprocess.h46
-rw-r--r--kdecore/kprocio.cpp48
-rw-r--r--kdecore/kprocio.h24
-rw-r--r--kdecore/kprotocolinfo_kdecore.cpp112
-rw-r--r--kdecore/kprotocolinfofactory.cpp10
-rw-r--r--kdecore/kprotocolinfofactory.h14
-rw-r--r--kdecore/kpty.cpp8
-rw-r--r--kdecore/kpty.h2
-rw-r--r--kdecore/kqiodevicegzip_p.cpp14
-rw-r--r--kdecore/kqiodevicegzip_p.h12
-rw-r--r--kdecore/krandomsequence.cpp8
-rw-r--r--kdecore/krandomsequence.h2
-rw-r--r--kdecore/kregexp.h4
-rw-r--r--kdecore/krfcdate.cpp26
-rw-r--r--kdecore/krfcdate.h10
-rw-r--r--kdecore/krootprop.cpp84
-rw-r--r--kdecore/krootprop.h50
-rw-r--r--kdecore/ksavefile.cpp28
-rw-r--r--kdecore/ksavefile.h34
-rw-r--r--kdecore/kshell.cpp72
-rw-r--r--kdecore/kshell.h16
-rw-r--r--kdecore/kshortcut.cpp102
-rw-r--r--kdecore/kshortcut.h78
-rw-r--r--kdecore/kshortcutlist.cpp40
-rw-r--r--kdecore/kshortcutlist.h42
-rw-r--r--kdecore/kshortcutmenu.cpp24
-rw-r--r--kdecore/kshortcutmenu.h12
-rw-r--r--kdecore/ksimpleconfig.cpp12
-rw-r--r--kdecore/ksimpleconfig.h2
-rw-r--r--kdecore/ksock.cpp34
-rw-r--r--kdecore/ksock.h4
-rw-r--r--kdecore/ksockaddr.cpp54
-rw-r--r--kdecore/ksockaddr.h58
-rw-r--r--kdecore/ksocks.cpp22
-rw-r--r--kdecore/ksocks.h6
-rw-r--r--kdecore/ksortablevaluelist.h16
-rw-r--r--kdecore/kstandarddirs.cpp558
-rw-r--r--kdecore/kstandarddirs.h134
-rw-r--r--kdecore/kstartupinfo.cpp304
-rw-r--r--kdecore/kstartupinfo.h94
-rw-r--r--kdecore/kstdaccel.cpp44
-rw-r--r--kdecore/kstdaccel.h18
-rw-r--r--kdecore/kstringhandler.cpp164
-rw-r--r--kdecore/kstringhandler.h130
-rw-r--r--kdecore/ksycoca.cpp84
-rw-r--r--kdecore/ksycoca.h22
-rw-r--r--kdecore/ksycocadict.cpp66
-rw-r--r--kdecore/ksycocadict.h22
-rw-r--r--kdecore/ksycocaentry.h22
-rw-r--r--kdecore/ksycocafactory.cpp20
-rw-r--r--kdecore/ksycocafactory.h16
-rw-r--r--kdecore/ktempdir.cpp32
-rw-r--r--kdecore/ktempdir.h22
-rw-r--r--kdecore/ktempfile.cpp40
-rw-r--r--kdecore/ktempfile.h44
-rw-r--r--kdecore/ktimezones.cpp102
-rw-r--r--kdecore/ktimezones.h48
-rw-r--r--kdecore/kuniqueapplication.cpp62
-rw-r--r--kdecore/kuniqueapplication.h6
-rw-r--r--kdecore/kurl.cpp506
-rw-r--r--kdecore/kurl.h316
-rw-r--r--kdecore/kurldrag.cpp100
-rw-r--r--kdecore/kurldrag.h52
-rw-r--r--kdecore/kuser.cpp142
-rw-r--r--kdecore/kuser.h50
-rw-r--r--kdecore/kvmallocator.cpp18
-rw-r--r--kdecore/kwin.cpp130
-rw-r--r--kdecore/kwin.h64
-rw-r--r--kdecore/kwinmodule.cpp134
-rw-r--r--kdecore/kwinmodule.h34
-rw-r--r--kdecore/kxerrorhandler.cpp2
-rw-r--r--kdecore/kxerrorhandler.h4
-rw-r--r--kdecore/kxmessages.cpp50
-rw-r--r--kdecore/kxmessages.h36
-rw-r--r--kdecore/libintl.cpp2
-rw-r--r--kdecore/netsupp.cpp2
-rw-r--r--kdecore/netsupp.h2
-rw-r--r--kdecore/netwm.cpp6
-rw-r--r--kdecore/netwm.h4
-rw-r--r--kdecore/netwm_def.h6
-rw-r--r--kdecore/network/kbufferedsocket.cpp26
-rw-r--r--kdecore/network/kbufferedsocket.h14
-rw-r--r--kdecore/network/kclientsocketbase.cpp42
-rw-r--r--kdecore/network/kclientsocketbase.h32
-rw-r--r--kdecore/network/kdatagramsocket.cpp24
-rw-r--r--kdecore/network/kdatagramsocket.h26
-rw-r--r--kdecore/network/khttpproxysocketdevice.cpp20
-rw-r--r--kdecore/network/khttpproxysocketdevice.h2
-rw-r--r--kdecore/network/kiobuffer.h4
-rw-r--r--kdecore/network/kmulticastsocket.h2
-rw-r--r--kdecore/network/kresolver.cpp196
-rw-r--r--kdecore/network/kresolver.h108
-rw-r--r--kdecore/network/kresolver_p.h46
-rw-r--r--kdecore/network/kresolvermanager.cpp44
-rw-r--r--kdecore/network/kresolverstandardworkers.cpp66
-rw-r--r--kdecore/network/kresolverstandardworkers_p.h14
-rw-r--r--kdecore/network/kresolverworkerbase.cpp16
-rw-r--r--kdecore/network/kresolverworkerbase.h8
-rw-r--r--kdecore/network/kreverseresolver.cpp52
-rw-r--r--kdecore/network/kreverseresolver.h30
-rw-r--r--kdecore/network/kserversocket.cpp48
-rw-r--r--kdecore/network/kserversocket.h40
-rw-r--r--kdecore/network/ksocketaddress.cpp54
-rw-r--r--kdecore/network/ksocketaddress.h32
-rw-r--r--kdecore/network/ksocketbase.cpp16
-rw-r--r--kdecore/network/ksocketbase.h32
-rw-r--r--kdecore/network/ksocketbuffer.cpp48
-rw-r--r--kdecore/network/ksocketbuffer_p.h14
-rw-r--r--kdecore/network/ksocketdevice.cpp42
-rw-r--r--kdecore/network/ksocketdevice.h18
-rw-r--r--kdecore/network/ksrvresolverworker.cpp38
-rw-r--r--kdecore/network/ksrvresolverworker_p.h28
-rw-r--r--kdecore/network/kstreamsocket.cpp44
-rw-r--r--kdecore/network/kstreamsocket.h44
-rw-r--r--kdecore/svgicons/ksvgiconengine.cpp154
-rw-r--r--kdecore/svgicons/ksvgiconengine.h4
-rw-r--r--kdecore/svgicons/ksvgiconpainter.cpp530
-rw-r--r--kdecore/svgicons/ksvgiconpainter.h64
-rw-r--r--kdecore/tests/KIDLTest.cpp6
-rw-r--r--kdecore/tests/KIDLTest.h4
-rw-r--r--kdecore/tests/KIDLTestClient.cpp2
-rw-r--r--kdecore/tests/cplusplustest.cpp8
-rw-r--r--kdecore/tests/dcopkonqtest.cpp8
-rw-r--r--kdecore/tests/kcalendartest.cpp16
-rw-r--r--kdecore/tests/kcharsetstest.cpp4
-rw-r--r--kdecore/tests/kcmdlineargstest.cpp2
-rw-r--r--kdecore/tests/kconfigtest.cpp32
-rw-r--r--kdecore/tests/kconfigtestgui.cpp70
-rw-r--r--kdecore/tests/kconfigtestgui.h40
-rw-r--r--kdecore/tests/kdebugtest.cpp52
-rw-r--r--kdecore/tests/kglobaltest.cpp6
-rw-r--r--kdecore/tests/kiconloadertest.cpp8
-rw-r--r--kdecore/tests/kipctest.cpp16
-rw-r--r--kdecore/tests/kipctest.h2
-rw-r--r--kdecore/tests/klocaletest.cpp70
-rw-r--r--kdecore/tests/klocaletest.h8
-rw-r--r--kdecore/tests/kmacroexpandertest.cpp24
-rw-r--r--kdecore/tests/kmdcodectest.cpp26
-rw-r--r--kdecore/tests/kprocesstest.cpp32
-rw-r--r--kdecore/tests/kprocesstest.h2
-rw-r--r--kdecore/tests/kprociotest.cpp4
-rw-r--r--kdecore/tests/kprociotest.h4
-rw-r--r--kdecore/tests/krandomsequencetest.cpp26
-rw-r--r--kdecore/tests/kresolvertest.cpp20
-rw-r--r--kdecore/tests/krfcdatetest.cpp8
-rw-r--r--kdecore/tests/kshelltest.cpp4
-rw-r--r--kdecore/tests/ksocktest.cpp14
-rw-r--r--kdecore/tests/ksortablevaluelisttest.cpp6
-rw-r--r--kdecore/tests/kstdacceltest.cpp6
-rw-r--r--kdecore/tests/kstddirstest.cpp16
-rw-r--r--kdecore/tests/kstringhandlertest.cpp6
-rw-r--r--kdecore/tests/ktempfiletest.cpp8
-rw-r--r--kdecore/tests/ktimezonestest.cpp16
-rw-r--r--kdecore/tests/kurltest.cpp128
-rw-r--r--kdecore/tests/kxerrorhandlertest.cpp2
-rw-r--r--kdecore/tests/startserviceby.cpp6
-rw-r--r--kdecore/tests/testqtargs.cpp2
-rw-r--r--kded/kbuildimageiofactory.cpp18
-rw-r--r--kded/kbuildimageiofactory.h10
-rw-r--r--kded/kbuildprotocolinfofactory.cpp6
-rw-r--r--kded/kbuildprotocolinfofactory.h6
-rw-r--r--kded/kbuildservicefactory.cpp36
-rw-r--r--kded/kbuildservicefactory.h22
-rw-r--r--kded/kbuildservicegroupfactory.cpp20
-rw-r--r--kded/kbuildservicegroupfactory.h18
-rw-r--r--kded/kbuildservicetypefactory.cpp54
-rw-r--r--kded/kbuildservicetypefactory.h14
-rw-r--r--kded/kbuildsycoca.cpp182
-rw-r--r--kded/kbuildsycoca.h24
-rw-r--r--kded/kctimefactory.cpp16
-rw-r--r--kded/kctimefactory.h16
-rw-r--r--kded/kde-menu.cpp16
-rw-r--r--kded/kded.cpp238
-rw-r--r--kded/kded.h58
-rw-r--r--kded/kdedmodule.cpp18
-rw-r--r--kded/kdedmodule.h16
-rw-r--r--kded/khostname.cpp98
-rw-r--r--kded/kresourcelist.h14
-rw-r--r--kded/test/test.cpp12
-rw-r--r--kded/test/test.h6
-rw-r--r--kded/vfolder_menu.cpp458
-rw-r--r--kded/vfolder_menu.h128
-rw-r--r--kdefx/kdrawutil.cpp96
-rw-r--r--kdefx/kdrawutil.h52
-rw-r--r--kdefx/kimageeffect.cpp222
-rw-r--r--kdefx/kimageeffect.h196
-rw-r--r--kdefx/kpixmap.cpp98
-rw-r--r--kdefx/kpixmap.h20
-rw-r--r--kdefx/kpixmapeffect.cpp70
-rw-r--r--kdefx/kpixmapeffect.h24
-rw-r--r--kdefx/kpixmapsplitter.cpp14
-rw-r--r--kdefx/kpixmapsplitter.h34
-rw-r--r--kdefx/kstyle.cpp516
-rw-r--r--kdefx/kstyle.h112
-rw-r--r--kdeprint/cups/cupsaddsmb2.cpp90
-rw-r--r--kdeprint/cups/cupsaddsmb2.h14
-rw-r--r--kdeprint/cups/cupsdconf2/addressdialog.cpp34
-rw-r--r--kdeprint/cups/cupsdconf2/addressdialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/browsedialog.cpp52
-rw-r--r--kdeprint/cups/cupsdconf2/browsedialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp124
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdcomment.cpp32
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdcomment.h26
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.cpp104
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.h94
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.cpp46
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.h12
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddirpage.cpp42
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddirpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdfilterpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdjobspage.cpp42
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdjobspage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdlogpage.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdlogpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp58
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdnetworkpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdpage.cpp4
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdpage.h20
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp54
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsecuritypage.h10
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdserverpage.cpp78
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdserverpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsplash.cpp30
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsplash.h6
-rw-r--r--kdeprint/cups/cupsdconf2/editlist.cpp34
-rw-r--r--kdeprint/cups/cupsdconf2/editlist.h20
-rw-r--r--kdeprint/cups/cupsdconf2/locationdialog.cpp86
-rw-r--r--kdeprint/cups/cupsdconf2/locationdialog.h6
-rw-r--r--kdeprint/cups/cupsdconf2/main.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/portdialog.cpp52
-rw-r--r--kdeprint/cups/cupsdconf2/portdialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/qdirlineedit.cpp20
-rw-r--r--kdeprint/cups/cupsdconf2/qdirlineedit.h10
-rw-r--r--kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/qdirmultilineedit.h12
-rw-r--r--kdeprint/cups/cupsdconf2/sizewidget.cpp26
-rw-r--r--kdeprint/cups/cupsdconf2/sizewidget.h12
-rw-r--r--kdeprint/cups/cupsinfos.cpp24
-rw-r--r--kdeprint/cups/cupsinfos.h26
-rw-r--r--kdeprint/cups/image.cpp4
-rw-r--r--kdeprint/cups/imageposition.cpp20
-rw-r--r--kdeprint/cups/imageposition.h14
-rw-r--r--kdeprint/cups/imagepreview.cpp18
-rw-r--r--kdeprint/cups/imagepreview.h14
-rw-r--r--kdeprint/cups/ippreportdlg.cpp12
-rw-r--r--kdeprint/cups/ippreportdlg.h4
-rw-r--r--kdeprint/cups/ipprequest.cpp86
-rw-r--r--kdeprint/cups/ipprequest.h142
-rw-r--r--kdeprint/cups/kcupsprinterimpl.cpp32
-rw-r--r--kdeprint/cups/kcupsprinterimpl.h6
-rw-r--r--kdeprint/cups/kmconfigcups.cpp6
-rw-r--r--kdeprint/cups/kmconfigcups.h2
-rw-r--r--kdeprint/cups/kmconfigcupsdir.cpp20
-rw-r--r--kdeprint/cups/kmconfigcupsdir.h2
-rw-r--r--kdeprint/cups/kmcupsconfigwidget.cpp82
-rw-r--r--kdeprint/cups/kmcupsconfigwidget.h4
-rw-r--r--kdeprint/cups/kmcupsjobmanager.cpp46
-rw-r--r--kdeprint/cups/kmcupsjobmanager.h16
-rw-r--r--kdeprint/cups/kmcupsmanager.cpp166
-rw-r--r--kdeprint/cups/kmcupsmanager.h24
-rw-r--r--kdeprint/cups/kmcupsuimanager.cpp22
-rw-r--r--kdeprint/cups/kmcupsuimanager.h6
-rw-r--r--kdeprint/cups/kmpropbanners.cpp18
-rw-r--r--kdeprint/cups/kmpropbanners.h2
-rw-r--r--kdeprint/cups/kmpropquota.cpp26
-rw-r--r--kdeprint/cups/kmpropquota.h2
-rw-r--r--kdeprint/cups/kmpropusers.cpp18
-rw-r--r--kdeprint/cups/kmpropusers.h2
-rw-r--r--kdeprint/cups/kmwbanners.cpp42
-rw-r--r--kdeprint/cups/kmwbanners.h6
-rw-r--r--kdeprint/cups/kmwfax.cpp16
-rw-r--r--kdeprint/cups/kmwfax.h4
-rw-r--r--kdeprint/cups/kmwipp.cpp14
-rw-r--r--kdeprint/cups/kmwipp.h4
-rw-r--r--kdeprint/cups/kmwippprinter.cpp56
-rw-r--r--kdeprint/cups/kmwippprinter.h6
-rw-r--r--kdeprint/cups/kmwippselect.cpp14
-rw-r--r--kdeprint/cups/kmwippselect.h4
-rw-r--r--kdeprint/cups/kmwother.cpp50
-rw-r--r--kdeprint/cups/kmwother.h4
-rw-r--r--kdeprint/cups/kmwquota.cpp36
-rw-r--r--kdeprint/cups/kmwquota.h4
-rw-r--r--kdeprint/cups/kmwusers.cpp22
-rw-r--r--kdeprint/cups/kmwusers.h2
-rw-r--r--kdeprint/cups/kphpgl2page.cpp42
-rw-r--r--kdeprint/cups/kphpgl2page.h6
-rw-r--r--kdeprint/cups/kpimagepage.cpp136
-rw-r--r--kdeprint/cups/kpimagepage.h6
-rw-r--r--kdeprint/cups/kpschedulepage.cpp74
-rw-r--r--kdeprint/cups/kpschedulepage.h8
-rw-r--r--kdeprint/cups/kptagspage.cpp44
-rw-r--r--kdeprint/cups/kptagspage.h12
-rw-r--r--kdeprint/cups/kptextpage.cpp96
-rw-r--r--kdeprint/cups/kptextpage.h6
-rw-r--r--kdeprint/driver.cpp140
-rw-r--r--kdeprint/driver.h112
-rw-r--r--kdeprint/driveritem.cpp16
-rw-r--r--kdeprint/driveritem.h8
-rw-r--r--kdeprint/driverview.cpp40
-rw-r--r--kdeprint/driverview.h12
-rw-r--r--kdeprint/droptionview.cpp122
-rw-r--r--kdeprint/droptionview.h36
-rw-r--r--kdeprint/ext/kextprinterimpl.cpp8
-rw-r--r--kdeprint/ext/kextprinterimpl.h4
-rw-r--r--kdeprint/ext/kmextmanager.cpp2
-rw-r--r--kdeprint/ext/kmextmanager.h6
-rw-r--r--kdeprint/ext/kmextuimanager.cpp2
-rw-r--r--kdeprint/ext/kmextuimanager.h2
-rw-r--r--kdeprint/foomatic/kfoomaticprinterimpl.cpp8
-rw-r--r--kdeprint/foomatic/kfoomaticprinterimpl.h6
-rw-r--r--kdeprint/foomatic/kmfoomaticmanager.cpp10
-rw-r--r--kdeprint/foomatic/kmfoomaticmanager.h6
-rw-r--r--kdeprint/foomatic2loader.cpp88
-rw-r--r--kdeprint/foomatic2loader.h20
-rw-r--r--kdeprint/fooparser.cpp10
-rw-r--r--kdeprint/fooscanner.cpp12
-rw-r--r--kdeprint/kdeprintcheck.cpp12
-rw-r--r--kdeprint/kdeprintcheck.h8
-rw-r--r--kdeprint/kdeprintd.cpp100
-rw-r--r--kdeprint/kdeprintd.h32
-rw-r--r--kdeprint/kfilelist.cpp116
-rw-r--r--kdeprint/kfilelist.h18
-rw-r--r--kdeprint/kmdbentry.h8
-rw-r--r--kdeprint/kmfactory.cpp54
-rw-r--r--kdeprint/kmfactory.h34
-rw-r--r--kdeprint/kmjob.cpp6
-rw-r--r--kdeprint/kmjob.h30
-rw-r--r--kdeprint/kmjobmanager.cpp50
-rw-r--r--kdeprint/kmjobmanager.h44
-rw-r--r--kdeprint/kmmanager.cpp70
-rw-r--r--kdeprint/kmmanager.h48
-rw-r--r--kdeprint/kmprinter.cpp20
-rw-r--r--kdeprint/kmprinter.h100
-rw-r--r--kdeprint/kmspecialmanager.cpp28
-rw-r--r--kdeprint/kmspecialmanager.h10
-rw-r--r--kdeprint/kmthreadjob.cpp22
-rw-r--r--kdeprint/kmthreadjob.h14
-rw-r--r--kdeprint/kmuimanager.cpp8
-rw-r--r--kdeprint/kmuimanager.h12
-rw-r--r--kdeprint/kmvirtualmanager.cpp74
-rw-r--r--kdeprint/kmvirtualmanager.h34
-rw-r--r--kdeprint/kpcopiespage.cpp136
-rw-r--r--kdeprint/kpcopiespage.h6
-rw-r--r--kdeprint/kpdriverpage.cpp12
-rw-r--r--kdeprint/kpdriverpage.h8
-rw-r--r--kdeprint/kpfileselectpage.cpp18
-rw-r--r--kdeprint/kpfileselectpage.h6
-rw-r--r--kdeprint/kpfilterpage.cpp116
-rw-r--r--kdeprint/kpfilterpage.h18
-rw-r--r--kdeprint/kpgeneralpage.cpp164
-rw-r--r--kdeprint/kpgeneralpage.h6
-rw-r--r--kdeprint/kpipeprocess.cpp10
-rw-r--r--kdeprint/kpipeprocess.h6
-rw-r--r--kdeprint/kpmarginpage.cpp34
-rw-r--r--kdeprint/kpmarginpage.h8
-rw-r--r--kdeprint/kpposterpage.cpp112
-rw-r--r--kdeprint/kpposterpage.h18
-rw-r--r--kdeprint/kpqtpage.cpp110
-rw-r--r--kdeprint/kpqtpage.h8
-rw-r--r--kdeprint/kprintaction.cpp24
-rw-r--r--kdeprint/kprintaction.h14
-rw-r--r--kdeprint/kprintdialog.cpp292
-rw-r--r--kdeprint/kprintdialog.h12
-rw-r--r--kdeprint/kprintdialogpage.cpp14
-rw-r--r--kdeprint/kprintdialogpage.h36
-rw-r--r--kdeprint/kprinter.cpp222
-rw-r--r--kdeprint/kprinter.h286
-rw-r--r--kdeprint/kprinterimpl.cpp104
-rw-r--r--kdeprint/kprinterimpl.h40
-rw-r--r--kdeprint/kprinterpropertydialog.cpp34
-rw-r--r--kdeprint/kprinterpropertydialog.h20
-rw-r--r--kdeprint/kprintpreview.cpp48
-rw-r--r--kdeprint/kprintpreview.h8
-rw-r--r--kdeprint/kprintprocess.cpp20
-rw-r--r--kdeprint/kprintprocess.h42
-rw-r--r--kdeprint/kxmlcommand.cpp138
-rw-r--r--kdeprint/kxmlcommand.h80
-rw-r--r--kdeprint/lpd/gschecker.cpp14
-rw-r--r--kdeprint/lpd/gschecker.h10
-rw-r--r--kdeprint/lpd/klpdprinterimpl.cpp10
-rw-r--r--kdeprint/lpd/klpdprinterimpl.h6
-rw-r--r--kdeprint/lpd/kmlpdfactory.cpp4
-rw-r--r--kdeprint/lpd/kmlpdfactory.h4
-rw-r--r--kdeprint/lpd/kmlpdmanager.cpp134
-rw-r--r--kdeprint/lpd/kmlpdmanager.h30
-rw-r--r--kdeprint/lpd/kmlpduimanager.cpp10
-rw-r--r--kdeprint/lpd/kmlpduimanager.h2
-rw-r--r--kdeprint/lpd/lpdtools.cpp38
-rw-r--r--kdeprint/lpd/lpdtools.h26
-rw-r--r--kdeprint/lpdunix/klpdunixprinterimpl.cpp22
-rw-r--r--kdeprint/lpdunix/klpdunixprinterimpl.h10
-rw-r--r--kdeprint/lpdunix/kmlpdunixmanager.cpp72
-rw-r--r--kdeprint/lpdunix/kmlpdunixmanager.h2
-rw-r--r--kdeprint/lpdunix/kmlpdunixuimanager.cpp2
-rw-r--r--kdeprint/lpdunix/kmlpdunixuimanager.h2
-rw-r--r--kdeprint/lpr/apshandler.cpp84
-rw-r--r--kdeprint/lpr/apshandler.h16
-rw-r--r--kdeprint/lpr/editentrydialog.cpp66
-rw-r--r--kdeprint/lpr/editentrydialog.h6
-rw-r--r--kdeprint/lpr/klprprinterimpl.cpp12
-rw-r--r--kdeprint/lpr/klprprinterimpl.h6
-rw-r--r--kdeprint/lpr/kmconfiglpr.cpp16
-rw-r--r--kdeprint/lpr/kmconfiglpr.h2
-rw-r--r--kdeprint/lpr/kmlprjobmanager.cpp14
-rw-r--r--kdeprint/lpr/kmlprjobmanager.h6
-rw-r--r--kdeprint/lpr/kmlprmanager.cpp44
-rw-r--r--kdeprint/lpr/kmlprmanager.h24
-rw-r--r--kdeprint/lpr/kmlpruimanager.cpp2
-rw-r--r--kdeprint/lpr/kmlpruimanager.h2
-rw-r--r--kdeprint/lpr/lpchelper.cpp48
-rw-r--r--kdeprint/lpr/lpchelper.h32
-rw-r--r--kdeprint/lpr/lpqhelper.cpp12
-rw-r--r--kdeprint/lpr/lpqhelper.h12
-rw-r--r--kdeprint/lpr/lprhandler.cpp46
-rw-r--r--kdeprint/lpr/lprhandler.h28
-rw-r--r--kdeprint/lpr/lprngtoolhandler.cpp66
-rw-r--r--kdeprint/lpr/lprngtoolhandler.h24
-rw-r--r--kdeprint/lpr/lprsettings.cpp20
-rw-r--r--kdeprint/lpr/lprsettings.h14
-rw-r--r--kdeprint/lpr/matichandler.cpp54
-rw-r--r--kdeprint/lpr/matichandler.h12
-rw-r--r--kdeprint/lpr/matichelper.cpp2
-rw-r--r--kdeprint/lpr/matichelper.h4
-rw-r--r--kdeprint/lpr/printcapentry.cpp8
-rw-r--r--kdeprint/lpr/printcapentry.h20
-rw-r--r--kdeprint/lpr/printcapreader.cpp20
-rw-r--r--kdeprint/lpr/printcapreader.h14
-rw-r--r--kdeprint/management/cjanuswidget.cpp72
-rw-r--r--kdeprint/management/cjanuswidget.h24
-rw-r--r--kdeprint/management/jobitem.cpp14
-rw-r--r--kdeprint/management/jobitem.h12
-rw-r--r--kdeprint/management/kdeprint_management_module.cpp8
-rw-r--r--kdeprint/management/kiconselectaction.cpp16
-rw-r--r--kdeprint/management/kiconselectaction.h6
-rw-r--r--kdeprint/management/kmconfigcommand.cpp16
-rw-r--r--kdeprint/management/kmconfigcommand.h2
-rw-r--r--kdeprint/management/kmconfigdialog.cpp14
-rw-r--r--kdeprint/management/kmconfigdialog.h6
-rw-r--r--kdeprint/management/kmconfigfilter.cpp48
-rw-r--r--kdeprint/management/kmconfigfilter.h2
-rw-r--r--kdeprint/management/kmconfigfonts.cpp62
-rw-r--r--kdeprint/management/kmconfigfonts.h4
-rw-r--r--kdeprint/management/kmconfiggeneral.cpp48
-rw-r--r--kdeprint/management/kmconfiggeneral.h4
-rw-r--r--kdeprint/management/kmconfigjobs.cpp12
-rw-r--r--kdeprint/management/kmconfigjobs.h2
-rw-r--r--kdeprint/management/kmconfigpage.cpp4
-rw-r--r--kdeprint/management/kmconfigpage.h16
-rw-r--r--kdeprint/management/kmconfigpreview.cpp22
-rw-r--r--kdeprint/management/kmconfigpreview.h2
-rw-r--r--kdeprint/management/kmdbcreator.cpp34
-rw-r--r--kdeprint/management/kmdbcreator.h12
-rw-r--r--kdeprint/management/kmdriverdb.cpp38
-rw-r--r--kdeprint/management/kmdriverdb.h28
-rw-r--r--kdeprint/management/kmdriverdbwidget.cpp92
-rw-r--r--kdeprint/management/kmdriverdbwidget.h20
-rw-r--r--kdeprint/management/kmdriverdialog.cpp2
-rw-r--r--kdeprint/management/kmdriverdialog.h2
-rw-r--r--kdeprint/management/kmiconview.cpp70
-rw-r--r--kdeprint/management/kmiconview.h26
-rw-r--r--kdeprint/management/kminfopage.cpp68
-rw-r--r--kdeprint/management/kminfopage.h6
-rw-r--r--kdeprint/management/kminstancepage.cpp72
-rw-r--r--kdeprint/management/kminstancepage.h12
-rw-r--r--kdeprint/management/kmjobviewer.cpp148
-rw-r--r--kdeprint/management/kmjobviewer.h30
-rw-r--r--kdeprint/management/kmlistview.cpp72
-rw-r--r--kdeprint/management/kmlistview.h22
-rw-r--r--kdeprint/management/kmmainview.cpp156
-rw-r--r--kdeprint/management/kmmainview.h18
-rw-r--r--kdeprint/management/kmpages.cpp6
-rw-r--r--kdeprint/management/kmpages.h8
-rw-r--r--kdeprint/management/kmprinterview.cpp32
-rw-r--r--kdeprint/management/kmprinterview.h16
-rw-r--r--kdeprint/management/kmpropbackend.cpp16
-rw-r--r--kdeprint/management/kmpropbackend.h2
-rw-r--r--kdeprint/management/kmpropcontainer.cpp20
-rw-r--r--kdeprint/management/kmpropcontainer.h4
-rw-r--r--kdeprint/management/kmpropdriver.cpp20
-rw-r--r--kdeprint/management/kmpropdriver.h2
-rw-r--r--kdeprint/management/kmpropertypage.cpp12
-rw-r--r--kdeprint/management/kmpropertypage.h6
-rw-r--r--kdeprint/management/kmpropgeneral.cpp20
-rw-r--r--kdeprint/management/kmpropgeneral.h2
-rw-r--r--kdeprint/management/kmpropmembers.cpp14
-rw-r--r--kdeprint/management/kmpropmembers.h2
-rw-r--r--kdeprint/management/kmpropwidget.cpp8
-rw-r--r--kdeprint/management/kmpropwidget.h10
-rw-r--r--kdeprint/management/kmspecialprinterdlg.cpp86
-rw-r--r--kdeprint/management/kmspecialprinterdlg.h4
-rw-r--r--kdeprint/management/kmtimer.cpp6
-rw-r--r--kdeprint/management/kmtimer.h4
-rw-r--r--kdeprint/management/kmwbackend.cpp34
-rw-r--r--kdeprint/management/kmwbackend.h10
-rw-r--r--kdeprint/management/kmwclass.cpp38
-rw-r--r--kdeprint/management/kmwclass.h4
-rw-r--r--kdeprint/management/kmwdriver.cpp20
-rw-r--r--kdeprint/management/kmwdriver.h4
-rw-r--r--kdeprint/management/kmwdriverselect.cpp20
-rw-r--r--kdeprint/management/kmwdriverselect.h4
-rw-r--r--kdeprint/management/kmwdrivertest.cpp32
-rw-r--r--kdeprint/management/kmwdrivertest.h2
-rw-r--r--kdeprint/management/kmwend.cpp24
-rw-r--r--kdeprint/management/kmwend.h2
-rw-r--r--kdeprint/management/kmwfile.cpp18
-rw-r--r--kdeprint/management/kmwfile.h4
-rw-r--r--kdeprint/management/kmwinfobase.cpp28
-rw-r--r--kdeprint/management/kmwinfobase.h18
-rw-r--r--kdeprint/management/kmwinfopage.cpp10
-rw-r--r--kdeprint/management/kmwinfopage.h2
-rw-r--r--kdeprint/management/kmwizard.cpp32
-rw-r--r--kdeprint/management/kmwizard.h12
-rw-r--r--kdeprint/management/kmwizardpage.cpp6
-rw-r--r--kdeprint/management/kmwizardpage.h8
-rw-r--r--kdeprint/management/kmwlocal.cpp64
-rw-r--r--kdeprint/management/kmwlocal.h12
-rw-r--r--kdeprint/management/kmwlpd.cpp10
-rw-r--r--kdeprint/management/kmwlpd.h4
-rw-r--r--kdeprint/management/kmwname.cpp16
-rw-r--r--kdeprint/management/kmwname.h4
-rw-r--r--kdeprint/management/kmwpassword.cpp54
-rw-r--r--kdeprint/management/kmwpassword.h10
-rw-r--r--kdeprint/management/kmwsmb.cpp44
-rw-r--r--kdeprint/management/kmwsmb.h8
-rw-r--r--kdeprint/management/kmwsocket.cpp48
-rw-r--r--kdeprint/management/kmwsocket.h6
-rw-r--r--kdeprint/management/kmwsocketutil.cpp60
-rw-r--r--kdeprint/management/kmwsocketutil.h16
-rw-r--r--kdeprint/management/kxmlcommanddlg.cpp388
-rw-r--r--kdeprint/management/kxmlcommanddlg.h42
-rw-r--r--kdeprint/management/kxmlcommandselector.cpp90
-rw-r--r--kdeprint/management/kxmlcommandselector.h14
-rw-r--r--kdeprint/management/networkscanner.cpp124
-rw-r--r--kdeprint/management/networkscanner.h18
-rw-r--r--kdeprint/management/pluginaction.cpp4
-rw-r--r--kdeprint/management/pluginaction.h2
-rw-r--r--kdeprint/management/sidepixmap.cpp16
-rw-r--r--kdeprint/management/sidepixmap.h10
-rw-r--r--kdeprint/management/smbview.cpp72
-rw-r--r--kdeprint/management/smbview.h10
-rw-r--r--kdeprint/marginpreview.cpp26
-rw-r--r--kdeprint/marginpreview.h18
-rw-r--r--kdeprint/marginvaluewidget.cpp4
-rw-r--r--kdeprint/marginvaluewidget.h2
-rw-r--r--kdeprint/marginwidget.cpp80
-rw-r--r--kdeprint/marginwidget.h10
-rw-r--r--kdeprint/messagewindow.cpp44
-rw-r--r--kdeprint/messagewindow.h20
-rw-r--r--kdeprint/plugincombobox.cpp36
-rw-r--r--kdeprint/plugincombobox.h8
-rw-r--r--kdeprint/posterpreview.cpp62
-rw-r--r--kdeprint/posterpreview.h32
-rw-r--r--kdeprint/ppdloader.cpp90
-rw-r--r--kdeprint/ppdloader.h52
-rw-r--r--kdeprint/ppdparser.cpp16
-rw-r--r--kdeprint/ppdscanner.cpp8
-rw-r--r--kdeprint/printerfilter.cpp4
-rw-r--r--kdeprint/printerfilter.h8
-rw-r--r--kdeprint/rlpr/kmconfigproxy.cpp6
-rw-r--r--kdeprint/rlpr/kmconfigproxy.h2
-rw-r--r--kdeprint/rlpr/kmproprlpr.cpp16
-rw-r--r--kdeprint/rlpr/kmproprlpr.h2
-rw-r--r--kdeprint/rlpr/kmproxywidget.cpp40
-rw-r--r--kdeprint/rlpr/kmproxywidget.h4
-rw-r--r--kdeprint/rlpr/kmrlprmanager.cpp22
-rw-r--r--kdeprint/rlpr/kmrlprmanager.h12
-rw-r--r--kdeprint/rlpr/kmrlpruimanager.cpp2
-rw-r--r--kdeprint/rlpr/kmrlpruimanager.h2
-rw-r--r--kdeprint/rlpr/kmwrlpr.cpp60
-rw-r--r--kdeprint/rlpr/kmwrlpr.h6
-rw-r--r--kdeprint/rlpr/krlprprinterimpl.cpp10
-rw-r--r--kdeprint/rlpr/krlprprinterimpl.h4
-rw-r--r--kdeprint/tests/drawdemo.cpp62
-rw-r--r--kdeprint/tests/drawdemo.h8
-rw-r--r--kdeprint/tests/helpwindow.cpp190
-rw-r--r--kdeprint/tests/helpwindow.h24
-rw-r--r--kdeprint/tests/main.cpp16
-rw-r--r--kdeprint/tests/richpage.cpp36
-rw-r--r--kdeprint/tests/richpage.h6
-rw-r--r--kdeprint/tools/escputil/escpwidget.cpp94
-rw-r--r--kdeprint/tools/escputil/escpwidget.h10
-rw-r--r--kdeprint/treecombobox.cpp34
-rw-r--r--kdeprint/treecombobox.h20
-rw-r--r--kdeprint/util.cpp18
-rw-r--r--kdeprint/util.h10
-rw-r--r--kdesu/client.cpp92
-rw-r--r--kdesu/client.h36
-rw-r--r--kdesu/kcookie.cpp32
-rw-r--r--kdesu/kcookie.h32
-rw-r--r--kdesu/kdesu_pty.cpp6
-rw-r--r--kdesu/kdesu_pty.h6
-rw-r--r--kdesu/process.cpp32
-rw-r--r--kdesu/process.h26
-rw-r--r--kdesu/ssh.cpp26
-rw-r--r--kdesu/ssh.h28
-rw-r--r--kdesu/stub.cpp18
-rw-r--r--kdesu/stub.h32
-rw-r--r--kdesu/su.cpp24
-rw-r--r--kdesu/su.h6
-rw-r--r--kdeui/kaboutapplication.cpp42
-rw-r--r--kdeui/kaboutapplication.h14
-rw-r--r--kdeui/kaboutdialog.cpp618
-rw-r--r--kdeui/kaboutdialog.h184
-rw-r--r--kdeui/kaboutdialog_private.h72
-rw-r--r--kdeui/kaboutkde.cpp18
-rw-r--r--kdeui/kaboutkde.h6
-rw-r--r--kdeui/kaccelgen.h50
-rw-r--r--kdeui/kaction.cpp362
-rw-r--r--kdeui/kaction.h160
-rw-r--r--kdeui/kactionclasses.cpp756
-rw-r--r--kdeui/kactionclasses.h380
-rw-r--r--kdeui/kactioncollection.cpp168
-rw-r--r--kdeui/kactioncollection.h52
-rw-r--r--kdeui/kactionselector.cpp146
-rw-r--r--kdeui/kactionselector.h64
-rw-r--r--kdeui/kactionshortcutlist.h20
-rw-r--r--kdeui/kactivelabel.cpp74
-rw-r--r--kdeui/kactivelabel.h28
-rw-r--r--kdeui/kanimwidget.cpp58
-rw-r--r--kdeui/kanimwidget.h26
-rw-r--r--kdeui/karrowbutton.cpp38
-rw-r--r--kdeui/karrowbutton.h12
-rw-r--r--kdeui/kauthicon.cpp28
-rw-r--r--kdeui/kauthicon.h38
-rw-r--r--kdeui/kbugreport.cpp226
-rw-r--r--kdeui/kbugreport.h22
-rw-r--r--kdeui/kbuttonbox.cpp94
-rw-r--r--kdeui/kbuttonbox.h30
-rw-r--r--kdeui/kcharselect.cpp198
-rw-r--r--kdeui/kcharselect.h102
-rw-r--r--kdeui/kcmenumngr.cpp50
-rw-r--r--kdeui/kcmenumngr.h22
-rw-r--r--kdeui/kcmodule.cpp30
-rw-r--r--kdeui/kcmodule.h22
-rw-r--r--kdeui/kcolorbutton.cpp92
-rw-r--r--kdeui/kcolorbutton.h40
-rw-r--r--kdeui/kcolorcombo.cpp70
-rw-r--r--kdeui/kcolorcombo.h20
-rw-r--r--kdeui/kcolordialog.cpp424
-rw-r--r--kdeui/kcolordialog.h158
-rw-r--r--kdeui/kcolordrag.cpp48
-rw-r--r--kdeui/kcolordrag.h22
-rw-r--r--kdeui/kcombobox.cpp156
-rw-r--r--kdeui/kcombobox.h102
-rw-r--r--kdeui/kcommand.cpp22
-rw-r--r--kdeui/kcommand.h26
-rw-r--r--kdeui/kcompletionbox.cpp122
-rw-r--r--kdeui/kcompletionbox.h38
-rw-r--r--kdeui/kconfigdialog.cpp74
-rw-r--r--kdeui/kconfigdialog.h28
-rw-r--r--kdeui/kcursor.cpp132
-rw-r--r--kdeui/kcursor.h46
-rw-r--r--kdeui/kcursor_private.h26
-rw-r--r--kdeui/kdatepicker.cpp218
-rw-r--r--kdeui/kdatepicker.h62
-rw-r--r--kdeui/kdatetbl.cpp244
-rw-r--r--kdeui/kdatetbl.h108
-rw-r--r--kdeui/kdatetimewidget.cpp30
-rw-r--r--kdeui/kdatetimewidget.h18
-rw-r--r--kdeui/kdatewidget.cpp68
-rw-r--r--kdeui/kdatewidget.h18
-rw-r--r--kdeui/kdcopactionproxy.cpp34
-rw-r--r--kdeui/kdcopactionproxy.h14
-rw-r--r--kdeui/kdetrayproxy/kdetrayproxy.cpp10
-rw-r--r--kdeui/kdetrayproxy/kdetrayproxy.h10
-rw-r--r--kdeui/kdetrayproxy/module.cpp4
-rw-r--r--kdeui/kdetrayproxy/module.h2
-rw-r--r--kdeui/kdialog.cpp78
-rw-r--r--kdeui/kdialog.h24
-rw-r--r--kdeui/kdialogbase.cpp398
-rw-r--r--kdeui/kdialogbase.h250
-rw-r--r--kdeui/kdialogbase_priv.h10
-rw-r--r--kdeui/kdockwidget.cpp784
-rw-r--r--kdeui/kdockwidget.h194
-rw-r--r--kdeui/kdockwidget_p.h26
-rw-r--r--kdeui/kdockwidget_private.cpp74
-rw-r--r--kdeui/kdockwidget_private.h52
-rw-r--r--kdeui/kdockwindow.h4
-rw-r--r--kdeui/kdualcolorbutton.cpp98
-rw-r--r--kdeui/kdualcolorbutton.h56
-rw-r--r--kdeui/keditcl.h90
-rw-r--r--kdeui/keditcl1.cpp126
-rw-r--r--kdeui/keditcl2.cpp158
-rw-r--r--kdeui/keditlistbox.cpp90
-rw-r--r--kdeui/keditlistbox.h84
-rw-r--r--kdeui/kedittoolbar.cpp450
-rw-r--r--kdeui/kedittoolbar.h70
-rw-r--r--kdeui/kfontcombo.cpp70
-rw-r--r--kdeui/kfontcombo.h12
-rw-r--r--kdeui/kfontdialog.cpp326
-rw-r--r--kdeui/kfontdialog.h126
-rw-r--r--kdeui/kfontrequester.cpp48
-rw-r--r--kdeui/kfontrequester.h42
-rw-r--r--kdeui/kguiitem.cpp60
-rw-r--r--kdeui/kguiitem.h48
-rw-r--r--kdeui/khelpmenu.cpp76
-rw-r--r--kdeui/khelpmenu.h20
-rw-r--r--kdeui/kiconview.cpp248
-rw-r--r--kdeui/kiconview.h126
-rw-r--r--kdeui/kiconviewsearchline.cpp74
-rw-r--r--kdeui/kiconviewsearchline.h38
-rw-r--r--kdeui/kinputdialog.cpp186
-rw-r--r--kdeui/kinputdialog.h96
-rw-r--r--kdeui/kjanuswidget.cpp396
-rw-r--r--kdeui/kjanuswidget.h156
-rw-r--r--kdeui/kkeybutton.cpp30
-rw-r--r--kdeui/kkeybutton.h8
-rw-r--r--kdeui/kkeydialog.cpp326
-rw-r--r--kdeui/kkeydialog.h82
-rw-r--r--kdeui/klanguagebutton.cpp120
-rw-r--r--kdeui/klanguagebutton.h48
-rw-r--r--kdeui/kled.cpp126
-rw-r--r--kdeui/kled.h40
-rw-r--r--kdeui/klineedit.cpp262
-rw-r--r--kdeui/klineedit.h126
-rw-r--r--kdeui/klineeditdlg.cpp94
-rw-r--r--kdeui/klineeditdlg.h26
-rw-r--r--kdeui/klistbox.cpp90
-rw-r--r--kdeui/klistbox.h44
-rw-r--r--kdeui/klistview.cpp582
-rw-r--r--kdeui/klistview.h248
-rw-r--r--kdeui/klistviewlineedit.h20
-rw-r--r--kdeui/klistviewsearchline.cpp116
-rw-r--r--kdeui/klistviewsearchline.h28
-rw-r--r--kdeui/kmainwindow.cpp312
-rw-r--r--kdeui/kmainwindow.h114
-rw-r--r--kdeui/kmainwindowiface.cpp30
-rw-r--r--kdeui/kmainwindowiface.h22
-rw-r--r--kdeui/kmenubar.cpp150
-rw-r--r--kdeui/kmenubar.h24
-rw-r--r--kdeui/kmessagebox.cpp474
-rw-r--r--kdeui/kmessagebox.h366
-rw-r--r--kdeui/knuminput.cpp192
-rw-r--r--kdeui/knuminput.h148
-rw-r--r--kdeui/knumvalidator.cpp88
-rw-r--r--kdeui/knumvalidator.h48
-rw-r--r--kdeui/kpanelapplet.cpp32
-rw-r--r--kdeui/kpanelapplet.h18
-rw-r--r--kdeui/kpanelappmenu.cpp90
-rw-r--r--kdeui/kpanelappmenu.h22
-rw-r--r--kdeui/kpanelextension.cpp14
-rw-r--r--kdeui/kpanelextension.h16
-rw-r--r--kdeui/kpanelmenu.cpp28
-rw-r--r--kdeui/kpanelmenu.h16
-rw-r--r--kdeui/kpassdlg.cpp174
-rw-r--r--kdeui/kpassdlg.h52
-rw-r--r--kdeui/kpassivepopup.cpp202
-rw-r--r--kdeui/kpassivepopup.h118
-rw-r--r--kdeui/kpixmapio.cpp54
-rw-r--r--kdeui/kpixmapio.h20
-rw-r--r--kdeui/kpixmapregionselectordialog.cpp50
-rw-r--r--kdeui/kpixmapregionselectordialog.h12
-rw-r--r--kdeui/kpixmapregionselectorwidget.cpp104
-rw-r--r--kdeui/kpixmapregionselectorwidget.h40
-rw-r--r--kdeui/kpopupmenu.cpp182
-rw-r--r--kdeui/kpopupmenu.h76
-rw-r--r--kdeui/kprogress.cpp80
-rw-r--r--kdeui/kprogress.h42
-rw-r--r--kdeui/kprogressbox.cpp48
-rw-r--r--kdeui/kprogressbox.h28
-rw-r--r--kdeui/kpushbutton.cpp66
-rw-r--r--kdeui/kpushbutton.h34
-rw-r--r--kdeui/krestrictedline.cpp20
-rw-r--r--kdeui/krestrictedline.h22
-rw-r--r--kdeui/krootpixmap.cpp74
-rw-r--r--kdeui/krootpixmap.h32
-rw-r--r--kdeui/kruler.cpp54
-rw-r--r--kdeui/kruler.h46
-rw-r--r--kdeui/ksconfig.cpp144
-rw-r--r--kdeui/ksconfig.h46
-rw-r--r--kdeui/kscrollview.cpp28
-rw-r--r--kdeui/kscrollview.h8
-rw-r--r--kdeui/kselect.cpp138
-rw-r--r--kdeui/kselect.h104
-rw-r--r--kdeui/kseparator.cpp40
-rw-r--r--kdeui/kseparator.h14
-rw-r--r--kdeui/ksharedpixmap.cpp40
-rw-r--r--kdeui/ksharedpixmap.h16
-rw-r--r--kdeui/kshortcutdialog.cpp76
-rw-r--r--kdeui/kshortcutdialog.h8
-rw-r--r--kdeui/kspell.cpp270
-rw-r--r--kdeui/kspell.h104
-rw-r--r--kdeui/kspelldlg.cpp82
-rw-r--r--kdeui/kspelldlg.h24
-rw-r--r--kdeui/ksplashscreen.cpp6
-rw-r--r--kdeui/ksplashscreen.h8
-rw-r--r--kdeui/ksqueezedtextlabel.cpp46
-rw-r--r--kdeui/ksqueezedtextlabel.h20
-rw-r--r--kdeui/kstatusbar.cpp32
-rw-r--r--kdeui/kstatusbar.h42
-rw-r--r--kdeui/kstdaction.cpp150
-rw-r--r--kdeui/kstdaction.h154
-rw-r--r--kdeui/kstdaction_p.h4
-rw-r--r--kdeui/kstdguiitem.cpp66
-rw-r--r--kdeui/kstdguiitem.h6
-rw-r--r--kdeui/kstringvalidator.cpp18
-rw-r--r--kdeui/kstringvalidator.h36
-rw-r--r--kdeui/kswitchlanguagedialog.cpp92
-rw-r--r--kdeui/kswitchlanguagedialog.h8
-rw-r--r--kdeui/ksyntaxhighlighter.cpp180
-rw-r--r--kdeui/ksyntaxhighlighter.h66
-rw-r--r--kdeui/ksystemtray.cpp44
-rw-r--r--kdeui/ksystemtray.h20
-rw-r--r--kdeui/ktabbar.cpp154
-rw-r--r--kdeui/ktabbar.h44
-rw-r--r--kdeui/ktabctl.cpp90
-rw-r--r--kdeui/ktabctl.h36
-rw-r--r--kdeui/ktabwidget.cpp166
-rw-r--r--kdeui/ktabwidget.h72
-rw-r--r--kdeui/ktextbrowser.cpp32
-rw-r--r--kdeui/ktextbrowser.h26
-rw-r--r--kdeui/ktextedit.cpp90
-rw-r--r--kdeui/ktextedit.h40
-rw-r--r--kdeui/ktimewidget.cpp24
-rw-r--r--kdeui/ktimewidget.h18
-rw-r--r--kdeui/ktimezonewidget.cpp30
-rw-r--r--kdeui/ktimezonewidget.h12
-rw-r--r--kdeui/ktip.cpp146
-rw-r--r--kdeui/ktip.h28
-rw-r--r--kdeui/ktoolbar.cpp556
-rw-r--r--kdeui/ktoolbar.h204
-rw-r--r--kdeui/ktoolbarbutton.cpp342
-rw-r--r--kdeui/ktoolbarbutton.h76
-rw-r--r--kdeui/ktoolbarhandler.cpp54
-rw-r--r--kdeui/ktoolbarhandler.h16
-rw-r--r--kdeui/ktoolbarlabelaction.cpp38
-rw-r--r--kdeui/ktoolbarlabelaction.h34
-rw-r--r--kdeui/ktoolbarradiogroup.cpp6
-rw-r--r--kdeui/ktoolbarradiogroup.h2
-rw-r--r--kdeui/kurllabel.cpp188
-rw-r--r--kdeui/kurllabel.h78
-rw-r--r--kdeui/kwhatsthismanager.cpp52
-rw-r--r--kdeui/kwhatsthismanager_p.h6
-rw-r--r--kdeui/kwindowinfo.cpp58
-rw-r--r--kdeui/kwindowinfo.h38
-rw-r--r--kdeui/kwindowlistmenu.cpp44
-rw-r--r--kdeui/kwindowlistmenu.h6
-rw-r--r--kdeui/kwizard.cpp12
-rw-r--r--kdeui/kwizard.h8
-rw-r--r--kdeui/kwordwrap.cpp54
-rw-r--r--kdeui/kwordwrap.h40
-rw-r--r--kdeui/kxmlguibuilder.cpp146
-rw-r--r--kdeui/kxmlguibuilder.h24
-rw-r--r--kdeui/kxmlguiclient.cpp270
-rw-r--r--kdeui/kxmlguiclient.h86
-rw-r--r--kdeui/kxmlguifactory.cpp222
-rw-r--r--kdeui/kxmlguifactory.h58
-rw-r--r--kdeui/kxmlguifactory_p.cpp176
-rw-r--r--kdeui/kxmlguifactory_p.h134
-rw-r--r--kdeui/qxembed.cpp206
-rw-r--r--kdeui/qxembed.h32
-rw-r--r--kdeui/tests/itemcontainertest.cpp106
-rw-r--r--kdeui/tests/itemcontainertest.h24
-rw-r--r--kdeui/tests/kaboutdialogtest.cpp8
-rw-r--r--kdeui/tests/kaccelgentest.cpp16
-rw-r--r--kdeui/tests/kactiontest.cpp18
-rw-r--r--kdeui/tests/kalphaicontest.h14
-rw-r--r--kdeui/tests/kblendtest.cpp32
-rw-r--r--kdeui/tests/kblendtest.h12
-rw-r--r--kdeui/tests/kbuttonboxtest.cpp104
-rw-r--r--kdeui/tests/kcolordlgtest.cpp4
-rw-r--r--kdeui/tests/kcolortest.cpp14
-rw-r--r--kdeui/tests/kcolortest.h10
-rw-r--r--kdeui/tests/kcomboboxtest.cpp104
-rw-r--r--kdeui/tests/kcomboboxtest.h16
-rw-r--r--kdeui/tests/kcompletiontest.cpp76
-rw-r--r--kdeui/tests/kcompletiontest.h42
-rw-r--r--kdeui/tests/kdatepicktest.cpp2
-rw-r--r--kdeui/tests/kdatewidgettest.cpp2
-rw-r--r--kdeui/tests/kdesattest.cpp24
-rw-r--r--kdeui/tests/kdesattest.h10
-rw-r--r--kdeui/tests/kdialogbasetest.cpp14
-rw-r--r--kdeui/tests/kdocktest.cpp12
-rw-r--r--kdeui/tests/kdocktest.h2
-rw-r--r--kdeui/tests/kdockwidgetdemo.cpp268
-rw-r--r--kdeui/tests/kdockwidgetdemo.h102
-rw-r--r--kdeui/tests/kdockwidgettest.cpp46
-rw-r--r--kdeui/tests/kdockwidgettest.h18
-rw-r--r--kdeui/tests/kdualcolortest.cpp38
-rw-r--r--kdeui/tests/kdualcolortest.h10
-rw-r--r--kdeui/tests/keditlistboxtest.cpp12
-rw-r--r--kdeui/tests/kedittest.cpp4
-rw-r--r--kdeui/tests/kfontdialogtest.cpp6
-rw-r--r--kdeui/tests/kgradienttest.cpp16
-rw-r--r--kdeui/tests/kgradienttest.h8
-rw-r--r--kdeui/tests/khashtest.cpp20
-rw-r--r--kdeui/tests/khashtest.h8
-rw-r--r--kdeui/tests/kinputdialogtest.cpp12
-rw-r--r--kdeui/tests/kjanuswidgettest.cpp16
-rw-r--r--kdeui/tests/kledtest.cpp24
-rw-r--r--kdeui/tests/kledtest.h18
-rw-r--r--kdeui/tests/klineeditdlgtest.cpp4
-rw-r--r--kdeui/tests/klineedittest.cpp54
-rw-r--r--kdeui/tests/klineedittest.h20
-rw-r--r--kdeui/tests/klistviewtest.cpp2
-rw-r--r--kdeui/tests/kmainwindowrestoretest.cpp4
-rw-r--r--kdeui/tests/kmainwindowtest.cpp8
-rw-r--r--kdeui/tests/kmessageboxtest.cpp46
-rw-r--r--kdeui/tests/knuminputtest.cpp32
-rw-r--r--kdeui/tests/knuminputtest.h4
-rw-r--r--kdeui/tests/kpalettetest.cpp10
-rw-r--r--kdeui/tests/kpanelmenutest.cpp10
-rw-r--r--kdeui/tests/kpanelmenutest.h4
-rw-r--r--kdeui/tests/kpixmapregionselectordialogtest.cpp8
-rw-r--r--kdeui/tests/kpopuptest.cpp18
-rw-r--r--kdeui/tests/kprogresstest.cpp10
-rw-r--r--kdeui/tests/krulertest.cpp140
-rw-r--r--kdeui/tests/krulertest.h34
-rw-r--r--kdeui/tests/kseparatortest.cpp10
-rw-r--r--kdeui/tests/kspelltest.cpp18
-rw-r--r--kdeui/tests/kstatusbartest.cpp34
-rw-r--r--kdeui/tests/kstatusbartest.h10
-rw-r--r--kdeui/tests/ksystemtraytest.cpp2
-rw-r--r--kdeui/tests/ktabctltest.cpp56
-rw-r--r--kdeui/tests/ktabctltest.h12
-rw-r--r--kdeui/tests/ktabwidgettest.cpp164
-rw-r--r--kdeui/tests/ktabwidgettest.h54
-rw-r--r--kdeui/tests/ktextedittest.cpp4
-rw-r--r--kdeui/tests/ktoolbarlabelactiontest.cpp8
-rw-r--r--kdeui/tests/kunbalancedgrdtest.cpp36
-rw-r--r--kdeui/tests/kunbalancedgrdtest.h22
-rw-r--r--kdeui/tests/kwindowtest.cpp122
-rw-r--r--kdeui/tests/kwindowtest.h24
-rw-r--r--kdeui/tests/kwizardtest.cpp22
-rw-r--r--kdeui/tests/kwordwraptest.cpp10
-rw-r--r--kdeui/tests/kxmlguitest.cpp12
-rw-r--r--kdeui/tests/kxmlguitest.h6
-rw-r--r--kdeui/tests/qxembedtest.cpp24
-rw-r--r--kdewidgets/classpreviews.cpp4
-rw-r--r--kdewidgets/classpreviews.h2
-rw-r--r--kdewidgets/makekdewidgets.cpp132
-rw-r--r--kdoctools/kio_help.cpp88
-rw-r--r--kdoctools/kio_help.h16
-rw-r--r--kdoctools/main.cpp2
-rw-r--r--kdoctools/main_ghelp.cpp2
-rw-r--r--kdoctools/meinproc.cpp76
-rw-r--r--kdoctools/xslt.cpp98
-rw-r--r--kdoctools/xslt.h22
-rw-r--r--khtml/DESIGN.html2
-rw-r--r--khtml/css/css_base.cpp6
-rw-r--r--khtml/css/css_base.h8
-rw-r--r--khtml/css/css_renderstyledeclarationimpl.cpp18
-rw-r--r--khtml/css/css_ruleimpl.cpp2
-rw-r--r--khtml/css/css_ruleimpl.h10
-rw-r--r--khtml/css/css_stylesheetimpl.cpp32
-rw-r--r--khtml/css/css_stylesheetimpl.h8
-rw-r--r--khtml/css/css_valueimpl.cpp106
-rw-r--r--khtml/css/css_valueimpl.h28
-rw-r--r--khtml/css/csshelper.cpp10
-rw-r--r--khtml/css/csshelper.h4
-rw-r--r--khtml/css/cssparser.cpp44
-rw-r--r--khtml/css/cssparser.h16
-rw-r--r--khtml/css/cssstyleselector.cpp238
-rw-r--r--khtml/css/cssstyleselector.h38
-rw-r--r--khtml/css/parser.cpp14
-rw-r--r--khtml/css/parser.h2
-rw-r--r--khtml/dom/css_value.cpp2
-rw-r--r--khtml/dom/css_value.h4
-rw-r--r--khtml/dom/dom2_events.cpp6
-rw-r--r--khtml/dom/dom_doc.cpp4
-rw-r--r--khtml/dom/dom_element.cpp4
-rw-r--r--khtml/dom/dom_node.cpp8
-rw-r--r--khtml/dom/dom_node.h6
-rw-r--r--khtml/dom/dom_string.cpp34
-rw-r--r--khtml/dom/dom_string.h20
-rw-r--r--khtml/dom/html_block.cpp6
-rw-r--r--khtml/dom/html_form.cpp10
-rw-r--r--khtml/dom/html_image.cpp12
-rw-r--r--khtml/dom/html_inline.cpp2
-rw-r--r--khtml/dom/html_list.cpp4
-rw-r--r--khtml/dom/html_misc.cpp2
-rw-r--r--khtml/dom/html_object.cpp10
-rw-r--r--khtml/dom/html_table.cpp6
-rw-r--r--khtml/domtreeview.cpp18
-rw-r--r--khtml/domtreeview.h12
-rw-r--r--khtml/ecma/domparser.cpp4
-rw-r--r--khtml/ecma/domparser.h4
-rw-r--r--khtml/ecma/kjs_binding.cpp62
-rw-r--r--khtml/ecma/kjs_binding.h12
-rw-r--r--khtml/ecma/kjs_css.cpp14
-rw-r--r--khtml/ecma/kjs_debugwin.cpp268
-rw-r--r--khtml/ecma/kjs_debugwin.h92
-rw-r--r--khtml/ecma/kjs_dom.cpp8
-rw-r--r--khtml/ecma/kjs_dom.h6
-rw-r--r--khtml/ecma/kjs_events.cpp8
-rw-r--r--khtml/ecma/kjs_events.h6
-rw-r--r--khtml/ecma/kjs_html.cpp36
-rw-r--r--khtml/ecma/kjs_mozilla.cpp4
-rw-r--r--khtml/ecma/kjs_navigator.cpp90
-rw-r--r--khtml/ecma/kjs_proxy.cpp28
-rw-r--r--khtml/ecma/kjs_proxy.h8
-rw-r--r--khtml/ecma/kjs_window.cpp208
-rw-r--r--khtml/ecma/kjs_window.h56
-rw-r--r--khtml/ecma/xmlhttprequest.cpp98
-rw-r--r--khtml/ecma/xmlhttprequest.h34
-rw-r--r--khtml/ecma/xmlserializer.cpp2
-rw-r--r--khtml/html/html_baseimpl.cpp16
-rw-r--r--khtml/html/html_baseimpl.h4
-rw-r--r--khtml/html/html_blockimpl.cpp8
-rw-r--r--khtml/html/html_blockimpl.h4
-rw-r--r--khtml/html/html_documentimpl.cpp84
-rw-r--r--khtml/html/html_documentimpl.h6
-rw-r--r--khtml/html/html_elementimpl.cpp22
-rw-r--r--khtml/html/html_formimpl.cpp262
-rw-r--r--khtml/html/html_formimpl.h58
-rw-r--r--khtml/html/html_headimpl.cpp22
-rw-r--r--khtml/html/html_headimpl.h8
-rw-r--r--khtml/html/html_imageimpl.cpp60
-rw-r--r--khtml/html/html_imageimpl.h20
-rw-r--r--khtml/html/html_inlineimpl.cpp10
-rw-r--r--khtml/html/html_miscimpl.cpp18
-rw-r--r--khtml/html/html_miscimpl.h4
-rw-r--r--khtml/html/html_objectimpl.cpp20
-rw-r--r--khtml/html/html_objectimpl.h28
-rw-r--r--khtml/html/html_tableimpl.cpp6
-rw-r--r--khtml/html/htmlparser.cpp8
-rw-r--r--khtml/html/htmlparser.h4
-rw-r--r--khtml/html/htmltokenizer.cpp84
-rw-r--r--khtml/html/htmltokenizer.h34
-rw-r--r--khtml/java/kjavaapplet.cpp62
-rw-r--r--khtml/java/kjavaapplet.h68
-rw-r--r--khtml/java/kjavaappletcontext.cpp60
-rw-r--r--khtml/java/kjavaappletcontext.h18
-rw-r--r--khtml/java/kjavaappletserver.cpp268
-rw-r--r--khtml/java/kjavaappletserver.h40
-rw-r--r--khtml/java/kjavaappletviewer.cpp220
-rw-r--r--khtml/java/kjavaappletviewer.h46
-rw-r--r--khtml/java/kjavaappletwidget.cpp28
-rw-r--r--khtml/java/kjavaappletwidget.h12
-rw-r--r--khtml/java/kjavadownloader.cpp50
-rw-r--r--khtml/java/kjavadownloader.h16
-rw-r--r--khtml/java/kjavaprocess.cpp104
-rw-r--r--khtml/java/kjavaprocess.h28
-rw-r--r--khtml/java/kqeventutil.cpp116
-rw-r--r--khtml/java/kqeventutil.h4
-rw-r--r--khtml/java/kxeventutil.cpp96
-rw-r--r--khtml/java/kxeventutil.h40
-rw-r--r--khtml/java/tests/testkjavaappletserver.cpp4
-rw-r--r--khtml/khtml_caret.cpp64
-rw-r--r--khtml/khtml_caret_p.h28
-rw-r--r--khtml/khtml_events.cpp4
-rw-r--r--khtml/khtml_events.h30
-rw-r--r--khtml/khtml_ext.cpp310
-rw-r--r--khtml/khtml_ext.h44
-rw-r--r--khtml/khtml_factory.cpp12
-rw-r--r--khtml/khtml_factory.h8
-rw-r--r--khtml/khtml_iface.cc28
-rw-r--r--khtml/khtml_iface.h20
-rw-r--r--khtml/khtml_pagecache.cpp40
-rw-r--r--khtml/khtml_pagecache.h20
-rw-r--r--khtml/khtml_part.cpp1140
-rw-r--r--khtml/khtml_part.h218
-rw-r--r--khtml/khtml_printsettings.cpp32
-rw-r--r--khtml/khtml_printsettings.h6
-rw-r--r--khtml/khtml_run.cpp10
-rw-r--r--khtml/khtml_run.h6
-rw-r--r--khtml/khtml_settings.cc260
-rw-r--r--khtml/khtml_settings.h76
-rw-r--r--khtml/khtmlimage.cpp60
-rw-r--r--khtml/khtmlimage.h16
-rw-r--r--khtml/khtmlpart_p.h120
-rw-r--r--khtml/khtmlview.cpp660
-rw-r--r--khtml/khtmlview.h92
-rw-r--r--khtml/kjserrordlg.ui.h6
-rw-r--r--khtml/kmultipart/kmultipart.cpp158
-rw-r--r--khtml/kmultipart/kmultipart.h28
-rw-r--r--khtml/misc/decoder.cpp66
-rw-r--r--khtml/misc/decoder.h34
-rw-r--r--khtml/misc/guess_ja.cpp2
-rw-r--r--khtml/misc/helper.cpp18
-rw-r--r--khtml/misc/helper.h14
-rw-r--r--khtml/misc/knsplugininstaller.cpp158
-rw-r--r--khtml/misc/knsplugininstaller.h68
-rw-r--r--khtml/misc/loader.cpp276
-rw-r--r--khtml/misc/loader.h138
-rw-r--r--khtml/misc/loader_client.h6
-rw-r--r--khtml/misc/loader_jpeg.cpp22
-rw-r--r--khtml/misc/loader_jpeg.h4
-rw-r--r--khtml/misc/multimap.h10
-rw-r--r--khtml/misc/stringit.cpp20
-rw-r--r--khtml/misc/stringit.h54
-rw-r--r--khtml/rendering/bidi.cpp408
-rw-r--r--khtml/rendering/bidi.h18
-rw-r--r--khtml/rendering/break_lines.cpp14
-rw-r--r--khtml/rendering/break_lines.h22
-rw-r--r--khtml/rendering/enumerate.cpp186
-rw-r--r--khtml/rendering/enumerate.h46
-rw-r--r--khtml/rendering/font.cpp134
-rw-r--r--khtml/rendering/font.h36
-rw-r--r--khtml/rendering/render_applet.cpp22
-rw-r--r--khtml/rendering/render_applet.h8
-rw-r--r--khtml/rendering/render_block.cpp74
-rw-r--r--khtml/rendering/render_block.h8
-rw-r--r--khtml/rendering/render_body.cpp2
-rw-r--r--khtml/rendering/render_box.cpp40
-rw-r--r--khtml/rendering/render_box.h12
-rw-r--r--khtml/rendering/render_br.cpp2
-rw-r--r--khtml/rendering/render_canvas.cpp46
-rw-r--r--khtml/rendering/render_canvas.h6
-rw-r--r--khtml/rendering/render_flow.cpp4
-rw-r--r--khtml/rendering/render_form.cpp280
-rw-r--r--khtml/rendering/render_form.h58
-rw-r--r--khtml/rendering/render_frames.cpp106
-rw-r--r--khtml/rendering/render_frames.h8
-rw-r--r--khtml/rendering/render_generated.cpp38
-rw-r--r--khtml/rendering/render_generated.h4
-rw-r--r--khtml/rendering/render_image.cpp68
-rw-r--r--khtml/rendering/render_image.h10
-rw-r--r--khtml/rendering/render_inline.cpp88
-rw-r--r--khtml/rendering/render_inline.h4
-rw-r--r--khtml/rendering/render_layer.cpp158
-rw-r--r--khtml/rendering/render_layer.h60
-rw-r--r--khtml/rendering/render_line.cpp36
-rw-r--r--khtml/rendering/render_line.h4
-rw-r--r--khtml/rendering/render_list.cpp36
-rw-r--r--khtml/rendering/render_list.h4
-rw-r--r--khtml/rendering/render_object.cpp138
-rw-r--r--khtml/rendering/render_object.h58
-rw-r--r--khtml/rendering/render_replaced.cpp266
-rw-r--r--khtml/rendering/render_replaced.h28
-rw-r--r--khtml/rendering/render_style.cpp20
-rw-r--r--khtml/rendering/render_style.h72
-rw-r--r--khtml/rendering/render_table.cpp54
-rw-r--r--khtml/rendering/render_table.h28
-rw-r--r--khtml/rendering/render_text.cpp108
-rw-r--r--khtml/rendering/render_text.h18
-rw-r--r--khtml/rendering/table_layout.cpp2
-rw-r--r--khtml/rendering/table_layout.h8
-rw-r--r--khtml/test_regression.cpp436
-rw-r--r--khtml/test_regression.h58
-rw-r--r--khtml/test_regression_fontoverload.cpp90
-rw-r--r--khtml/testkhtml.cpp50
-rw-r--r--khtml/testkhtml.h12
-rw-r--r--khtml/xml/dom2_eventsimpl.cpp52
-rw-r--r--khtml/xml/dom2_eventsimpl.h18
-rw-r--r--khtml/xml/dom_docimpl.cpp132
-rw-r--r--khtml/xml/dom_docimpl.h138
-rw-r--r--khtml/xml/dom_elementimpl.cpp12
-rw-r--r--khtml/xml/dom_elementimpl.h6
-rw-r--r--khtml/xml/dom_nodeimpl.cpp56
-rw-r--r--khtml/xml/dom_nodeimpl.h16
-rw-r--r--khtml/xml/dom_stringimpl.cpp66
-rw-r--r--khtml/xml/dom_stringimpl.h18
-rw-r--r--khtml/xml/dom_xmlimpl.cpp16
-rw-r--r--khtml/xml/dom_xmlimpl.h12
-rw-r--r--khtml/xml/xml_tokenizer.cpp80
-rw-r--r--khtml/xml/xml_tokenizer.h68
-rw-r--r--kimgio/dds.cpp60
-rw-r--r--kimgio/dds.h4
-rw-r--r--kimgio/eps.cpp54
-rw-r--r--kimgio/eps.h4
-rw-r--r--kimgio/exr.cpp24
-rw-r--r--kimgio/exr.h6
-rw-r--r--kimgio/g3r.cpp14
-rw-r--r--kimgio/g3r.h6
-rw-r--r--kimgio/gimp.h2
-rw-r--r--kimgio/hdr.cpp18
-rw-r--r--kimgio/hdr.h4
-rw-r--r--kimgio/ico.cpp64
-rw-r--r--kimgio/ico.h6
-rw-r--r--kimgio/jp2.cpp52
-rw-r--r--kimgio/jp2.h4
-rw-r--r--kimgio/pcx.cpp86
-rw-r--r--kimgio/pcx.h10
-rw-r--r--kimgio/psd.cpp20
-rw-r--r--kimgio/psd.h4
-rw-r--r--kimgio/rgb.cpp44
-rw-r--r--kimgio/rgb.h34
-rw-r--r--kimgio/tga.cpp24
-rw-r--r--kimgio/tga.h4
-rw-r--r--kimgio/tiffr.cpp18
-rw-r--r--kimgio/tiffr.h6
-rw-r--r--kimgio/xcf.cpp146
-rw-r--r--kimgio/xcf.h88
-rw-r--r--kimgio/xview.cpp14
-rw-r--r--kimgio/xview.h4
-rw-r--r--kinit/autostart.cpp32
-rw-r--r--kinit/autostart.h6
-rw-r--r--kinit/kdostartupconfig.cpp50
-rw-r--r--kinit/kinit.cpp116
-rw-r--r--kinit/kioslave.cpp4
-rw-r--r--kinit/klauncher.cpp366
-rw-r--r--kinit/klauncher.h110
-rw-r--r--kinit/klauncher_main.cpp6
-rw-r--r--kinit/tests/klaunchertest.cpp12
-rw-r--r--kinit/wrapper.c4
-rw-r--r--kio/bookmarks/dptrtemplate.h6
-rw-r--r--kio/bookmarks/kbookmark.cc166
-rw-r--r--kio/bookmarks/kbookmark.h70
-rw-r--r--kio/bookmarks/kbookmarkbar.cc104
-rw-r--r--kio/bookmarks/kbookmarkbar.h22
-rw-r--r--kio/bookmarks/kbookmarkdombuilder.cc28
-rw-r--r--kio/bookmarks/kbookmarkdombuilder.h16
-rw-r--r--kio/bookmarks/kbookmarkdrag.cc58
-rw-r--r--kio/bookmarks/kbookmarkdrag.h24
-rw-r--r--kio/bookmarks/kbookmarkexporter.cc6
-rw-r--r--kio/bookmarks/kbookmarkexporter.h6
-rw-r--r--kio/bookmarks/kbookmarkimporter.cc22
-rw-r--r--kio/bookmarks/kbookmarkimporter.h22
-rw-r--r--kio/bookmarks/kbookmarkimporter_crash.cc74
-rw-r--r--kio/bookmarks/kbookmarkimporter_crash.h28
-rw-r--r--kio/bookmarks/kbookmarkimporter_ie.cc54
-rw-r--r--kio/bookmarks/kbookmarkimporter_ie.h24
-rw-r--r--kio/bookmarks/kbookmarkimporter_kde1.cc40
-rw-r--r--kio/bookmarks/kbookmarkimporter_kde1.h20
-rw-r--r--kio/bookmarks/kbookmarkimporter_ns.cc64
-rw-r--r--kio/bookmarks/kbookmarkimporter_ns.h30
-rw-r--r--kio/bookmarks/kbookmarkimporter_opera.cc42
-rw-r--r--kio/bookmarks/kbookmarkimporter_opera.h20
-rw-r--r--kio/bookmarks/kbookmarkmanager.cc194
-rw-r--r--kio/bookmarks/kbookmarkmanager.h64
-rw-r--r--kio/bookmarks/kbookmarkmenu.cc264
-rw-r--r--kio/bookmarks/kbookmarkmenu.h54
-rw-r--r--kio/bookmarks/kbookmarkmenu_p.h118
-rw-r--r--kio/bookmarks/kbookmarknotifier.h8
-rw-r--r--kio/httpfilter/httpfilter.cc34
-rw-r--r--kio/httpfilter/httpfilter.h18
-rw-r--r--kio/kfile/config-kfile.h30
-rw-r--r--kio/kfile/images.h16
-rw-r--r--kio/kfile/kacleditwidget.cpp202
-rw-r--r--kio/kfile/kacleditwidget.h8
-rw-r--r--kio/kfile/kacleditwidget_p.h62
-rw-r--r--kio/kfile/kcombiview.cpp38
-rw-r--r--kio/kfile/kcombiview.h18
-rw-r--r--kio/kfile/kcustommenueditor.cpp80
-rw-r--r--kio/kfile/kcustommenueditor.h2
-rw-r--r--kio/kfile/kdiroperator.cpp414
-rw-r--r--kio/kfile/kdiroperator.h92
-rw-r--r--kio/kfile/kdirselectdialog.cpp122
-rw-r--r--kio/kfile/kdirselectdialog.h32
-rw-r--r--kio/kfile/kdirsize.cpp16
-rw-r--r--kio/kfile/kdiskfreesp.cpp38
-rw-r--r--kio/kfile/kdiskfreesp.h18
-rw-r--r--kio/kfile/kencodingfiledialog.cpp72
-rw-r--r--kio/kfile/kencodingfiledialog.h94
-rw-r--r--kio/kfile/kfile.h26
-rw-r--r--kio/kfile/kfilebookmarkhandler.cpp10
-rw-r--r--kio/kfile/kfilebookmarkhandler.h12
-rw-r--r--kio/kfile/kfiledetailview.cpp176
-rw-r--r--kio/kfile/kfiledetailview.h68
-rw-r--r--kio/kfile/kfiledialog.cpp508
-rw-r--r--kio/kfile/kfiledialog.h184
-rw-r--r--kio/kfile/kfilefiltercombo.cpp46
-rw-r--r--kio/kfile/kfilefiltercombo.h22
-rw-r--r--kio/kfile/kfileiconview.cpp238
-rw-r--r--kio/kfile/kfileiconview.h64
-rw-r--r--kio/kfile/kfilemetainfowidget.cpp214
-rw-r--r--kio/kfile/kfilemetainfowidget.h54
-rw-r--r--kio/kfile/kfilemetapreview.cpp30
-rw-r--r--kio/kfile/kfilemetapreview.h16
-rw-r--r--kio/kfile/kfilepreview.cpp50
-rw-r--r--kio/kfile/kfilepreview.h26
-rw-r--r--kio/kfile/kfilesharedlg.cpp66
-rw-r--r--kio/kfile/kfilesharedlg.h12
-rw-r--r--kio/kfile/kfilespeedbar.cpp44
-rw-r--r--kio/kfile/kfilespeedbar.h4
-rw-r--r--kio/kfile/kfiletreebranch.cpp58
-rw-r--r--kio/kfile/kfiletreebranch.h30
-rw-r--r--kio/kfile/kfiletreeview.cpp150
-rw-r--r--kio/kfile/kfiletreeview.h94
-rw-r--r--kio/kfile/kfiletreeviewitem.cpp6
-rw-r--r--kio/kfile/kfiletreeviewitem.h8
-rw-r--r--kio/kfile/kfileview.cpp76
-rw-r--r--kio/kfile/kfileview.h68
-rw-r--r--kio/kfile/kicondialog.cpp198
-rw-r--r--kio/kfile/kicondialog.h72
-rw-r--r--kio/kfile/kimagefilepreview.cpp58
-rw-r--r--kio/kfile/kimagefilepreview.h20
-rw-r--r--kio/kfile/kmetaprops.cpp92
-rw-r--r--kio/kfile/kmetaprops.h14
-rw-r--r--kio/kfile/knotifydialog.cpp326
-rw-r--r--kio/kfile/knotifydialog.h76
-rw-r--r--kio/kfile/kopenwith.cpp254
-rw-r--r--kio/kfile/kopenwith.h38
-rw-r--r--kio/kfile/kopenwith_p.h32
-rw-r--r--kio/kfile/kpreviewprops.cpp14
-rw-r--r--kio/kfile/kpreviewprops.h2
-rw-r--r--kio/kfile/kpreviewwidgetbase.cpp16
-rw-r--r--kio/kfile/kpreviewwidgetbase.h12
-rw-r--r--kio/kfile/kpropertiesdialog.cpp1132
-rw-r--r--kio/kfile/kpropertiesdialog.h154
-rw-r--r--kio/kfile/krecentdirs.cpp22
-rw-r--r--kio/kfile/krecentdirs.h8
-rw-r--r--kio/kfile/krecentdocument.cpp90
-rw-r--r--kio/kfile/krecentdocument.h10
-rw-r--r--kio/kfile/kurlbar.cpp316
-rw-r--r--kio/kfile/kurlbar.h112
-rw-r--r--kio/kfile/kurlcombobox.cpp62
-rw-r--r--kio/kfile/kurlcombobox.h44
-rw-r--r--kio/kfile/kurlrequester.cpp100
-rw-r--r--kio/kfile/kurlrequester.h32
-rw-r--r--kio/kfile/kurlrequesterdlg.cpp36
-rw-r--r--kio/kfile/kurlrequesterdlg.h18
-rw-r--r--kio/kfile/tests/kdirselectdialogtest.cpp4
-rw-r--r--kio/kfile/tests/kfdtest.cpp16
-rw-r--r--kio/kfile/tests/kfdtest.h6
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.cpp44
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.h2
-rw-r--r--kio/kfile/tests/kfstest.cpp74
-rw-r--r--kio/kfile/tests/kopenwithtest.cpp8
-rw-r--r--kio/kfile/tests/kurlrequestertest.cpp2
-rw-r--r--kio/kio/authinfo.cpp40
-rw-r--r--kio/kio/authinfo.h48
-rw-r--r--kio/kio/chmodjob.cpp58
-rw-r--r--kio/kio/chmodjob.h6
-rw-r--r--kio/kio/connection.cpp24
-rw-r--r--kio/kio/connection.h20
-rw-r--r--kio/kio/dataprotocol.cpp70
-rw-r--r--kio/kio/dataprotocol.h2
-rw-r--r--kio/kio/dataslave.cpp26
-rw-r--r--kio/kio/dataslave.h18
-rw-r--r--kio/kio/davjob.cpp52
-rw-r--r--kio/kio/davjob.h30
-rw-r--r--kio/kio/defaultprogress.cpp92
-rw-r--r--kio/kio/defaultprogress.h22
-rw-r--r--kio/kio/forwardingslavebase.cpp74
-rw-r--r--kio/kio/forwardingslavebase.h22
-rw-r--r--kio/kio/global.cpp240
-rw-r--r--kio/kio/global.h88
-rw-r--r--kio/kio/job.cpp628
-rw-r--r--kio/kio/job.h16
-rw-r--r--kio/kio/jobclasses.h176
-rw-r--r--kio/kio/kacl.cpp82
-rw-r--r--kio/kio/kacl.h38
-rw-r--r--kio/kio/kar.cpp22
-rw-r--r--kio/kio/kar.h24
-rw-r--r--kio/kio/karchive.cpp170
-rw-r--r--kio/kio/karchive.h146
-rw-r--r--kio/kio/kautomount.cpp10
-rw-r--r--kio/kio/kautomount.h18
-rw-r--r--kio/kio/kdatatool.cpp84
-rw-r--r--kio/kio/kdatatool.h54
-rw-r--r--kio/kio/kdcopservicestarter.cpp24
-rw-r--r--kio/kio/kdcopservicestarter.h18
-rw-r--r--kio/kio/kdirlister.cpp300
-rw-r--r--kio/kio/kdirlister.h44
-rw-r--r--kio/kio/kdirlister_p.h54
-rw-r--r--kio/kio/kdirnotify.cpp2
-rw-r--r--kio/kio/kdirnotify_stub.cpp20
-rw-r--r--kio/kio/kdirnotify_stub.h4
-rw-r--r--kio/kio/kdirwatch.cpp180
-rw-r--r--kio/kio/kdirwatch.h40
-rw-r--r--kio/kio/kdirwatch_p.h28
-rw-r--r--kio/kio/kemailsettings.cpp42
-rw-r--r--kio/kio/kemailsettings.h24
-rw-r--r--kio/kio/kfilefilter.cpp26
-rw-r--r--kio/kio/kfilefilter.h18
-rw-r--r--kio/kio/kfileitem.cpp186
-rw-r--r--kio/kio/kfileitem.h76
-rw-r--r--kio/kio/kfilemetainfo.cpp406
-rw-r--r--kio/kio/kfilemetainfo.h338
-rw-r--r--kio/kio/kfileshare.cpp48
-rw-r--r--kio/kio/kfileshare.h16
-rw-r--r--kio/kio/kfilterbase.cpp8
-rw-r--r--kio/kio/kfilterbase.h18
-rw-r--r--kio/kio/kfilterdev.cpp38
-rw-r--r--kio/kio/kfilterdev.h48
-rw-r--r--kio/kio/kimageio.cpp96
-rw-r--r--kio/kio/kimageio.h38
-rw-r--r--kio/kio/kimageiofactory.h48
-rw-r--r--kio/kio/klimitediodevice.h6
-rw-r--r--kio/kio/kmessageboxwrapper.h12
-rw-r--r--kio/kio/kmimemagic.cpp88
-rw-r--r--kio/kio/kmimemagic.h26
-rw-r--r--kio/kio/kmimetype.cpp292
-rw-r--r--kio/kio/kmimetype.h148
-rw-r--r--kio/kio/kmimetypechooser.cpp140
-rw-r--r--kio/kio/kmimetypechooser.h46
-rw-r--r--kio/kio/kmimetyperesolver.h46
-rw-r--r--kio/kio/knfsshare.cpp46
-rw-r--r--kio/kio/knfsshare.h12
-rw-r--r--kio/kio/kprotocolinfo.cpp24
-rw-r--r--kio/kio/kprotocolinfo.h108
-rw-r--r--kio/kio/kprotocolmanager.cpp108
-rw-r--r--kio/kio/kprotocolmanager.h28
-rw-r--r--kio/kio/kremoteencoding.cpp24
-rw-r--r--kio/kio/kremoteencoding.h18
-rw-r--r--kio/kio/krun.cpp252
-rw-r--r--kio/kio/krun.h90
-rw-r--r--kio/kio/ksambashare.cpp60
-rw-r--r--kio/kio/ksambashare.h12
-rw-r--r--kio/kio/kscan.cpp42
-rw-r--r--kio/kio/kscan.h64
-rw-r--r--kio/kio/kservice.cpp236
-rw-r--r--kio/kio/kservice.h156
-rw-r--r--kio/kio/kservice_p.h8
-rw-r--r--kio/kio/kservicefactory.cpp16
-rw-r--r--kio/kio/kservicefactory.h12
-rw-r--r--kio/kio/kservicegroup.cpp98
-rw-r--r--kio/kio/kservicegroup.h68
-rw-r--r--kio/kio/kservicegroupfactory.cpp10
-rw-r--r--kio/kio/kservicegroupfactory.h8
-rw-r--r--kio/kio/kservicetype.cpp80
-rw-r--r--kio/kio/kservicetype.h74
-rw-r--r--kio/kio/kservicetypefactory.cpp38
-rw-r--r--kio/kio/kservicetypefactory.h18
-rw-r--r--kio/kio/kshellcompletion.cpp40
-rw-r--r--kio/kio/kshellcompletion.h30
-rw-r--r--kio/kio/kshred.cpp12
-rw-r--r--kio/kio/kshred.h16
-rw-r--r--kio/kio/ktar.cpp160
-rw-r--r--kio/kio/ktar.h62
-rw-r--r--kio/kio/ktrader.cpp22
-rw-r--r--kio/kio/ktrader.h28
-rw-r--r--kio/kio/ktraderparse.cpp8
-rw-r--r--kio/kio/ktraderparsetree.cpp64
-rw-r--r--kio/kio/ktraderparsetree.h36
-rw-r--r--kio/kio/kurifilter.cpp78
-rw-r--r--kio/kio/kurifilter.h84
-rw-r--r--kio/kio/kurlcompletion.cpp282
-rw-r--r--kio/kio/kurlcompletion.h62
-rw-r--r--kio/kio/kurlpixmapprovider.cpp2
-rw-r--r--kio/kio/kurlpixmapprovider.h2
-rw-r--r--kio/kio/kuserprofile.cpp54
-rw-r--r--kio/kio/kuserprofile.h42
-rw-r--r--kio/kio/kzip.cpp110
-rw-r--r--kio/kio/kzip.h68
-rw-r--r--kio/kio/metainfojob.cpp20
-rw-r--r--kio/kio/metainfojob.h8
-rw-r--r--kio/kio/netaccess.cpp158
-rw-r--r--kio/kio/netaccess.h96
-rw-r--r--kio/kio/observer.cpp60
-rw-r--r--kio/kio/observer.h32
-rw-r--r--kio/kio/passdlg.cpp132
-rw-r--r--kio/kio/passdlg.h30
-rw-r--r--kio/kio/paste.cpp98
-rw-r--r--kio/kio/paste.h20
-rw-r--r--kio/kio/pastedialog.cpp40
-rw-r--r--kio/kio/pastedialog.h12
-rw-r--r--kio/kio/posixacladdons.cpp8
-rw-r--r--kio/kio/posixacladdons.h2
-rw-r--r--kio/kio/previewjob.cpp110
-rw-r--r--kio/kio/previewjob.h18
-rw-r--r--kio/kio/progressbase.cpp134
-rw-r--r--kio/kio/progressbase.h8
-rw-r--r--kio/kio/renamedlg.cpp154
-rw-r--r--kio/kio/renamedlg.h18
-rw-r--r--kio/kio/renamedlgplugin.h14
-rw-r--r--kio/kio/scheduler.cpp156
-rw-r--r--kio/kio/scheduler.h64
-rw-r--r--kio/kio/sessiondata.cpp54
-rw-r--r--kio/kio/sessiondata.h10
-rw-r--r--kio/kio/skipdlg.cpp28
-rw-r--r--kio/kio/skipdlg.h10
-rw-r--r--kio/kio/slave.cpp114
-rw-r--r--kio/kio/slave.h50
-rw-r--r--kio/kio/slavebase.cpp178
-rw-r--r--kio/kio/slavebase.h94
-rw-r--r--kio/kio/slaveconfig.cpp38
-rw-r--r--kio/kio/slaveconfig.h12
-rw-r--r--kio/kio/slaveinterface.cpp84
-rw-r--r--kio/kio/slaveinterface.h50
-rw-r--r--kio/kio/statusbarprogress.cpp32
-rw-r--r--kio/kio/statusbarprogress.h12
-rw-r--r--kio/kio/tcpslavebase.cpp114
-rw-r--r--kio/kio/tcpslavebase.h16
-rw-r--r--kio/kio/thumbcreator.h4
-rw-r--r--kio/kioexec/main.cpp40
-rw-r--r--kio/kioexec/main.h16
-rw-r--r--kio/kpasswdserver/kpasswdserver.cpp122
-rw-r--r--kio/kpasswdserver/kpasswdserver.h50
-rw-r--r--kio/kssl/kopenssl.cc50
-rw-r--r--kio/kssl/ksmimecrypto.cc58
-rw-r--r--kio/kssl/ksmimecrypto.h32
-rw-r--r--kio/kssl/kssl.cc12
-rw-r--r--kio/kssl/kssl.h4
-rw-r--r--kio/kssl/kssl/caroot/ca-bundle.crt42
-rw-r--r--kio/kssl/ksslcertchain.cc18
-rw-r--r--kio/kssl/ksslcertchain.h12
-rw-r--r--kio/kssl/ksslcertdlg.cc56
-rw-r--r--kio/kssl/ksslcertdlg.h28
-rw-r--r--kio/kssl/ksslcertificate.cc138
-rw-r--r--kio/kssl/ksslcertificate.h58
-rw-r--r--kio/kssl/ksslcertificatecache.cc192
-rw-r--r--kio/kssl/ksslcertificatecache.h32
-rw-r--r--kio/kssl/ksslcertificatehome.cc68
-rw-r--r--kio/kssl/ksslcertificatehome.h34
-rw-r--r--kio/kssl/ksslconnectioninfo.cc6
-rw-r--r--kio/kssl/ksslconnectioninfo.h14
-rw-r--r--kio/kssl/ksslcsessioncache.cc28
-rw-r--r--kio/kssl/ksslcsessioncache.h8
-rw-r--r--kio/kssl/ksslinfodlg.cc208
-rw-r--r--kio/kssl/ksslinfodlg.h30
-rw-r--r--kio/kssl/ksslkeygen.cc22
-rw-r--r--kio/kssl/ksslkeygen.h10
-rw-r--r--kio/kssl/ksslpeerinfo.cc32
-rw-r--r--kio/kssl/ksslpeerinfo.h10
-rw-r--r--kio/kssl/ksslpemcallback.cc2
-rw-r--r--kio/kssl/ksslpkcs12.cc28
-rw-r--r--kio/kssl/ksslpkcs12.h16
-rw-r--r--kio/kssl/ksslpkcs7.cc26
-rw-r--r--kio/kssl/ksslpkcs7.h12
-rw-r--r--kio/kssl/ksslsession.cc12
-rw-r--r--kio/kssl/ksslsession.h6
-rw-r--r--kio/kssl/ksslsettings.cc26
-rw-r--r--kio/kssl/ksslsettings.h12
-rw-r--r--kio/kssl/ksslsigners.cc114
-rw-r--r--kio/kssl/ksslsigners.h18
-rw-r--r--kio/kssl/ksslutils.cc22
-rw-r--r--kio/kssl/ksslutils.h8
-rw-r--r--kio/kssl/ksslx509map.cc30
-rw-r--r--kio/kssl/ksslx509map.h16
-rw-r--r--kio/kssl/ksslx509v3.h2
-rw-r--r--kio/misc/kdesasl/kdesasl.cpp80
-rw-r--r--kio/misc/kdesasl/kdesasl.h28
-rw-r--r--kio/misc/kfile/fileprops.cpp112
-rw-r--r--kio/misc/kfile/fileprops.h46
-rw-r--r--kio/misc/kntlm/des.h2
-rw-r--r--kio/misc/kntlm/kntlm.cpp112
-rw-r--r--kio/misc/kntlm/kntlm.h56
-rw-r--r--kio/misc/kntlm/kswap.h2
-rw-r--r--kio/misc/kpac/discovery.cpp16
-rw-r--r--kio/misc/kpac/discovery.h6
-rw-r--r--kio/misc/kpac/downloader.cpp18
-rw-r--r--kio/misc/kpac/downloader.h18
-rw-r--r--kio/misc/kpac/proxyscout.cpp32
-rw-r--r--kio/misc/kpac/proxyscout.h14
-rw-r--r--kio/misc/kpac/script.cpp24
-rw-r--r--kio/misc/kpac/script.h12
-rw-r--r--kio/misc/ksendbugmail/main.cpp30
-rw-r--r--kio/misc/ksendbugmail/main.h6
-rw-r--r--kio/misc/ksendbugmail/smtp.cpp46
-rw-r--r--kio/misc/ksendbugmail/smtp.h44
-rw-r--r--kio/misc/kssld/kssld.cpp206
-rw-r--r--kio/misc/kssld/kssld.h74
-rw-r--r--kio/misc/ktelnetservice.cpp10
-rw-r--r--kio/misc/kwalletd/kbetterthankdialogbase.ui.h4
-rw-r--r--kio/misc/kwalletd/ktimeout.cpp14
-rw-r--r--kio/misc/kwalletd/ktimeout.h10
-rw-r--r--kio/misc/kwalletd/kwalletd.cpp392
-rw-r--r--kio/misc/kwalletd/kwalletd.h114
-rw-r--r--kio/misc/kwalletd/kwalletwizard.ui.h2
-rw-r--r--kio/misc/uiserver.cpp248
-rw-r--r--kio/misc/uiserver.h82
-rw-r--r--kio/tests/dataprotocoltest.cpp32
-rw-r--r--kio/tests/dummymeta.cpp4
-rw-r--r--kio/tests/dummymeta.h2
-rw-r--r--kio/tests/getalltest.cpp6
-rw-r--r--kio/tests/jobtest.cpp248
-rw-r--r--kio/tests/jobtest.h26
-rw-r--r--kio/tests/kacltest.cpp86
-rw-r--r--kio/tests/kacltest.h2
-rw-r--r--kio/tests/kdcopcheck.cpp28
-rw-r--r--kio/tests/kdcopcheck.h12
-rw-r--r--kio/tests/kdefaultprogresstest.cpp4
-rw-r--r--kio/tests/kdirlistertest.cpp102
-rw-r--r--kio/tests/kdirlistertest.h10
-rw-r--r--kio/tests/kdirwatchtest.cpp16
-rw-r--r--kio/tests/kdirwatchtest.h10
-rw-r--r--kio/tests/kdirwatchunittest.cpp32
-rw-r--r--kio/tests/kdirwatchunittest.h24
-rw-r--r--kio/tests/kfiltertest.cpp34
-rw-r--r--kio/tests/kionetrctest.cpp2
-rw-r--r--kio/tests/kiopassdlgtest.cpp10
-rw-r--r--kio/tests/kioslavetest.cpp138
-rw-r--r--kio/tests/kioslavetest.h70
-rw-r--r--kio/tests/kmfitest.cpp8
-rw-r--r--kio/tests/kmimefromext.cpp2
-rw-r--r--kio/tests/kmimemagictest.cpp2
-rw-r--r--kio/tests/kmimetypetest.cpp22
-rw-r--r--kio/tests/kprotocolinfotest.cpp6
-rw-r--r--kio/tests/kruntest.cpp38
-rw-r--r--kio/tests/kruntest.h8
-rw-r--r--kio/tests/kshredtest.cpp2
-rw-r--r--kio/tests/ksycocatest.cpp82
-rw-r--r--kio/tests/ktartest.cpp22
-rw-r--r--kio/tests/ktradertest.cpp24
-rw-r--r--kio/tests/kurifiltertest.cpp42
-rw-r--r--kio/tests/kurlcompletiontest.cpp30
-rw-r--r--kio/tests/kziptest.cpp60
-rw-r--r--kio/tests/metatest.cpp78
-rw-r--r--kio/tests/netaccesstest.cpp4
-rw-r--r--kio/tests/previewtest.cpp24
-rw-r--r--kio/tests/previewtest.h6
-rw-r--r--kio/tests/speed.cpp22
-rw-r--r--kio/tests/speed.h2
-rw-r--r--kioslave/bzip2/kbzip2filter.cpp2
-rw-r--r--kioslave/bzip2/kbzip2filter.h2
-rw-r--r--kioslave/file/file.cc254
-rw-r--r--kioslave/file/file.h36
-rw-r--r--kioslave/ftp/ftp.cc176
-rw-r--r--kioslave/ftp/ftp.h52
-rw-r--r--kioslave/gzip/kgzipfilter.cpp10
-rw-r--r--kioslave/gzip/kgzipfilter.h2
-rw-r--r--kioslave/http/http.cc744
-rw-r--r--kioslave/http/http.h162
-rw-r--r--kioslave/http/http_cache_cleaner.cpp40
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.cpp254
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.h100
-rw-r--r--kioslave/http/kcookiejar/kcookieserver.cpp138
-rw-r--r--kioslave/http/kcookiejar/kcookieserver.h42
-rw-r--r--kioslave/http/kcookiejar/kcookiewin.cpp124
-rw-r--r--kioslave/http/kcookiejar/kcookiewin.h10
-rw-r--r--kioslave/http/kcookiejar/main.cpp32
-rw-r--r--kioslave/http/kcookiejar/tests/kcookiejartest.cpp88
-rw-r--r--kioslave/iso/iso.cpp44
-rw-r--r--kioslave/iso/iso.h6
-rw-r--r--kioslave/iso/kiso.cpp60
-rw-r--r--kioslave/iso/kiso.h28
-rw-r--r--kioslave/iso/kisodirectory.cpp6
-rw-r--r--kioslave/iso/kisodirectory.h8
-rw-r--r--kioslave/iso/kisofile.cpp10
-rw-r--r--kioslave/iso/kisofile.h10
-rw-r--r--kioslave/iso/qfilehack.cpp4
-rw-r--r--kioslave/iso/qfilehack.h8
-rw-r--r--kioslave/metainfo/metainfo.cpp14
-rw-r--r--kioslave/metainfo/metainfo.h2
-rw-r--r--kjs/identifier.h4
-rw-r--r--kjs/ustring.h20
-rw-r--r--kmdi/kmdi/dockcontainer.cpp114
-rw-r--r--kmdi/kmdi/dockcontainer.h44
-rw-r--r--kmdi/kmdi/guiclient.cpp50
-rw-r--r--kmdi/kmdi/guiclient.h18
-rw-r--r--kmdi/kmdi/mainwindow.cpp94
-rw-r--r--kmdi/kmdi/mainwindow.h20
-rw-r--r--kmdi/kmdi/tabwidget.cpp68
-rw-r--r--kmdi/kmdi/tabwidget.h24
-rw-r--r--kmdi/kmdi/toolviewaccessor.cpp42
-rw-r--r--kmdi/kmdi/toolviewaccessor.h24
-rw-r--r--kmdi/kmdi/toolviewaccessor_p.h8
-rw-r--r--kmdi/kmdichildarea.cpp84
-rw-r--r--kmdi/kmdichildarea.h42
-rw-r--r--kmdi/kmdichildfrm.cpp384
-rw-r--r--kmdi/kmdichildfrm.h108
-rw-r--r--kmdi/kmdichildfrmcaption.cpp54
-rw-r--r--kmdi/kmdichildfrmcaption.h20
-rw-r--r--kmdi/kmdichildview.cpp196
-rw-r--r--kmdi/kmdichildview.h114
-rw-r--r--kmdi/kmdidefines.h6
-rw-r--r--kmdi/kmdidockcontainer.cpp154
-rw-r--r--kmdi/kmdidockcontainer.h50
-rw-r--r--kmdi/kmdidocumentviewtabwidget.cpp40
-rw-r--r--kmdi/kmdidocumentviewtabwidget.h22
-rw-r--r--kmdi/kmdifocuslist.cpp28
-rw-r--r--kmdi/kmdifocuslist.h14
-rw-r--r--kmdi/kmdiguiclient.cpp62
-rw-r--r--kmdi/kmdiguiclient.h18
-rw-r--r--kmdi/kmdilistiterator.h6
-rw-r--r--kmdi/kmdimainfrm.cpp594
-rw-r--r--kmdi/kmdimainfrm.h114
-rw-r--r--kmdi/kmditaskbar.cpp68
-rw-r--r--kmdi/kmditaskbar.h34
-rw-r--r--kmdi/kmditoolviewaccessor.cpp40
-rw-r--r--kmdi/kmditoolviewaccessor.h24
-rw-r--r--kmdi/kmditoolviewaccessor_p.h10
-rw-r--r--kmdi/test/hello.cpp26
-rw-r--r--kmdi/test/hello.h10
-rw-r--r--kmdi/test/main.cpp14
-rw-r--r--kmdi/test/mainwidget.cpp54
-rw-r--r--kmdi/test/mainwidget.h18
-rw-r--r--knewstuff/downloaddialog.cpp264
-rw-r--r--knewstuff/downloaddialog.h58
-rw-r--r--knewstuff/engine.cpp94
-rw-r--r--knewstuff/engine.h38
-rw-r--r--knewstuff/entry.cpp136
-rw-r--r--knewstuff/entry.h94
-rw-r--r--knewstuff/ghns.cpp22
-rw-r--r--knewstuff/ghns.h2
-rw-r--r--knewstuff/knewstuff.cpp16
-rw-r--r--knewstuff/knewstuff.h22
-rw-r--r--knewstuff/knewstuffbutton.cpp18
-rw-r--r--knewstuff/knewstuffbutton.h20
-rw-r--r--knewstuff/knewstuffgeneric.cpp42
-rw-r--r--knewstuff/knewstuffgeneric.h12
-rw-r--r--knewstuff/knewstuffsecure.cpp46
-rw-r--r--knewstuff/knewstuffsecure.h18
-rw-r--r--knewstuff/provider.cpp64
-rw-r--r--knewstuff/provider.h36
-rw-r--r--knewstuff/providerdialog.cpp14
-rw-r--r--knewstuff/providerdialog.h2
-rw-r--r--knewstuff/security.cpp70
-rw-r--r--knewstuff/security.h20
-rw-r--r--knewstuff/testnewstuff.cpp28
-rw-r--r--knewstuff/testnewstuff.h6
-rw-r--r--knewstuff/uploaddialog.cpp78
-rw-r--r--knewstuff/uploaddialog.h24
-rw-r--r--kparts/browserextension.cpp140
-rw-r--r--kparts/browserextension.h100
-rw-r--r--kparts/browserinterface.cpp22
-rw-r--r--kparts/browserinterface.h8
-rw-r--r--kparts/browserrun.cpp94
-rw-r--r--kparts/browserrun.h42
-rw-r--r--kparts/componentfactory.h90
-rw-r--r--kparts/dockmainwindow.cpp42
-rw-r--r--kparts/dockmainwindow.h6
-rw-r--r--kparts/event.cpp10
-rw-r--r--kparts/event.h24
-rw-r--r--kparts/factory.cpp14
-rw-r--r--kparts/factory.h18
-rw-r--r--kparts/genericfactory.h16
-rw-r--r--kparts/historyprovider.cpp16
-rw-r--r--kparts/historyprovider.h16
-rw-r--r--kparts/mainwindow.cpp40
-rw-r--r--kparts/mainwindow.h8
-rw-r--r--kparts/part.cpp112
-rw-r--r--kparts/part.h64
-rw-r--r--kparts/partmanager.cpp144
-rw-r--r--kparts/partmanager.h34
-rw-r--r--kparts/plugin.cpp104
-rw-r--r--kparts/plugin.h40
-rw-r--r--kparts/statusbarextension.cpp38
-rw-r--r--kparts/statusbarextension.h18
-rw-r--r--kparts/tests/example.cpp26
-rw-r--r--kparts/tests/example.h2
-rw-r--r--kparts/tests/ghostview.cpp16
-rw-r--r--kparts/tests/normalktm.cpp26
-rw-r--r--kparts/tests/normalktm.h2
-rw-r--r--kparts/tests/notepad.cpp40
-rw-r--r--kparts/tests/notepad.h8
-rw-r--r--kparts/tests/parts.cpp36
-rw-r--r--kparts/tests/parts.h6
-rw-r--r--kparts/tests/plugin_spellcheck.cpp10
-rw-r--r--kparts/tests/plugin_spellcheck.h4
-rw-r--r--krandr/ktimerdialog.cpp40
-rw-r--r--krandr/ktimerdialog.h22
-rw-r--r--krandr/libkrandr.cc44
-rw-r--r--krandr/libkrandr.h12
-rw-r--r--krandr/randr.cpp68
-rw-r--r--krandr/randr.h26
-rw-r--r--kresources/configdialog.cpp34
-rw-r--r--kresources/configdialog.h6
-rw-r--r--kresources/configpage.cpp86
-rw-r--r--kresources/configpage.h28
-rw-r--r--kresources/configwidget.cpp4
-rw-r--r--kresources/configwidget.h4
-rw-r--r--kresources/factory.cpp30
-rw-r--r--kresources/factory.h24
-rw-r--r--kresources/kcmkresources.cpp10
-rw-r--r--kresources/kcmkresources.h2
-rw-r--r--kresources/manager.h26
-rw-r--r--kresources/manageriface.h12
-rw-r--r--kresources/managerimpl.cpp78
-rw-r--r--kresources/managerimpl.h30
-rw-r--r--kresources/resource.cpp26
-rw-r--r--kresources/resource.h50
-rw-r--r--kresources/selectdialog.cpp24
-rw-r--r--kresources/selectdialog.h14
-rw-r--r--kspell2/backgroundchecker.cpp34
-rw-r--r--kspell2/backgroundchecker.h20
-rw-r--r--kspell2/backgroundengine.cpp26
-rw-r--r--kspell2/backgroundengine.h22
-rw-r--r--kspell2/backgroundthread.cpp18
-rw-r--r--kspell2/backgroundthread.h22
-rw-r--r--kspell2/broker.cpp38
-rw-r--r--kspell2/broker.h20
-rw-r--r--kspell2/client.cpp4
-rw-r--r--kspell2/client.h18
-rw-r--r--kspell2/defaultdictionary.cpp28
-rw-r--r--kspell2/defaultdictionary.h24
-rw-r--r--kspell2/dictionary.h26
-rw-r--r--kspell2/filter.cpp44
-rw-r--r--kspell2/filter.h22
-rw-r--r--kspell2/plugins/aspell/kspell_aspellclient.cpp8
-rw-r--r--kspell2/plugins/aspell/kspell_aspellclient.h10
-rw-r--r--kspell2/plugins/aspell/kspell_aspelldict.cpp24
-rw-r--r--kspell2/plugins/aspell/kspell_aspelldict.h18
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.cpp8
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.h10
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.cpp26
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.h20
-rw-r--r--kspell2/plugins/ispell/ispell_checker.cpp58
-rw-r--r--kspell2/plugins/ispell/ispell_checker.h20
-rw-r--r--kspell2/plugins/ispell/kspell_ispellclient.cpp6
-rw-r--r--kspell2/plugins/ispell/kspell_ispellclient.h10
-rw-r--r--kspell2/plugins/ispell/kspell_ispelldict.cpp18
-rw-r--r--kspell2/plugins/ispell/kspell_ispelldict.h18
-rw-r--r--kspell2/settings.cpp42
-rw-r--r--kspell2/settings.h22
-rw-r--r--kspell2/tests/backgroundtest.cpp14
-rw-r--r--kspell2/tests/backgroundtest.h8
-rw-r--r--kspell2/tests/test.cpp10
-rw-r--r--kspell2/tests/test_dialog.cpp10
-rw-r--r--kspell2/tests/test_dialog.h6
-rw-r--r--kspell2/tests/test_filter.cpp2
-rw-r--r--kspell2/tests/test_highlighter.cpp4
-rw-r--r--kspell2/threadevents.h14
-rw-r--r--kspell2/ui/configdialog.cpp6
-rw-r--r--kspell2/ui/configdialog.h2
-rw-r--r--kspell2/ui/configwidget.cpp22
-rw-r--r--kspell2/ui/configwidget.h6
-rw-r--r--kspell2/ui/dialog.cpp104
-rw-r--r--kspell2/ui/dialog.h28
-rw-r--r--kspell2/ui/highlighter.cpp24
-rw-r--r--kspell2/ui/highlighter.h12
-rw-r--r--kstyles/highcolor/highcolor.cpp422
-rw-r--r--kstyles/highcolor/highcolor.h114
-rw-r--r--kstyles/highcontrast/config/highcontrastconfig.cpp22
-rw-r--r--kstyles/highcontrast/config/highcontrastconfig.h4
-rw-r--r--kstyles/highcontrast/highcontrast.cpp474
-rw-r--r--kstyles/highcontrast/highcontrast.h120
-rw-r--r--kstyles/keramik/colorutil.cpp8
-rw-r--r--kstyles/keramik/colorutil.h2
-rw-r--r--kstyles/keramik/genembed.cpp38
-rw-r--r--kstyles/keramik/gradients.cpp52
-rw-r--r--kstyles/keramik/gradients.h2
-rw-r--r--kstyles/keramik/keramik.cpp742
-rw-r--r--kstyles/keramik/keramik.h108
-rw-r--r--kstyles/keramik/pixmaploader.cpp56
-rw-r--r--kstyles/keramik/pixmaploader.h32
-rw-r--r--kstyles/klegacy/klegacystyle.cpp1218
-rw-r--r--kstyles/klegacy/klegacystyle.h118
-rw-r--r--kstyles/kthemestyle/kstyledirs.cpp10
-rw-r--r--kstyles/kthemestyle/kstyledirs.h10
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp312
-rw-r--r--kstyles/kthemestyle/kthemebase.h166
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp496
-rw-r--r--kstyles/kthemestyle/kthemestyle.h120
-rw-r--r--kstyles/light/light.cpp14
-rw-r--r--kstyles/light/lightstyle-v2.cpp394
-rw-r--r--kstyles/light/lightstyle-v2.h48
-rw-r--r--kstyles/light/lightstyle-v3.cpp462
-rw-r--r--kstyles/light/lightstyle-v3.h52
-rw-r--r--kstyles/plastik/config/plastikconf.cpp88
-rw-r--r--kstyles/plastik/config/plastikconf.h28
-rw-r--r--kstyles/plastik/misc.cpp6
-rw-r--r--kstyles/plastik/misc.h2
-rw-r--r--kstyles/plastik/plastik.cpp890
-rw-r--r--kstyles/plastik/plastik.h190
-rw-r--r--kstyles/utils/installtheme/main.cpp30
-rw-r--r--kstyles/web/webstyle.cpp342
-rw-r--r--kstyles/web/webstyle.h194
-rw-r--r--kunittest/module.h12
-rw-r--r--kunittest/runner.cpp56
-rw-r--r--kunittest/runner.h20
-rw-r--r--kunittest/tester.cpp20
-rw-r--r--kunittest/tester.h92
-rw-r--r--kutils/kcmodulecontainer.cpp60
-rw-r--r--kutils/kcmodulecontainer.h32
-rw-r--r--kutils/kcmoduleinfo.cpp24
-rw-r--r--kutils/kcmoduleinfo.h40
-rw-r--r--kutils/kcmoduleloader.cpp78
-rw-r--r--kutils/kcmoduleloader.h32
-rw-r--r--kutils/kcmoduleproxy.cpp152
-rw-r--r--kutils/kcmoduleproxy.h38
-rw-r--r--kutils/kcmoduleproxyIface.h4
-rw-r--r--kutils/kcmoduleproxyIfaceImpl.cpp32
-rw-r--r--kutils/kcmoduleproxyIfaceImpl.h12
-rw-r--r--kutils/kcmultidialog.cpp78
-rw-r--r--kutils/kcmultidialog.h24
-rw-r--r--kutils/kfind.cpp88
-rw-r--r--kutils/kfind.h46
-rw-r--r--kutils/kfinddialog.cpp154
-rw-r--r--kutils/kfinddialog.h74
-rw-r--r--kutils/kmultitabbar.cpp244
-rw-r--r--kutils/kmultitabbar.h64
-rw-r--r--kutils/kmultitabbar_p.h24
-rw-r--r--kutils/kplugininfo.cpp86
-rw-r--r--kutils/kplugininfo.h52
-rw-r--r--kutils/kpluginselector.cpp242
-rw-r--r--kutils/kpluginselector.h30
-rw-r--r--kutils/kpluginselector_p.h28
-rw-r--r--kutils/kreplace.cpp44
-rw-r--r--kutils/kreplace.h26
-rw-r--r--kutils/kreplacedialog.cpp38
-rw-r--r--kutils/kreplacedialog.h22
-rw-r--r--kutils/ksettings/componentsdialog.cpp72
-rw-r--r--kutils/ksettings/componentsdialog.h8
-rw-r--r--kutils/ksettings/dialog.cpp134
-rw-r--r--kutils/ksettings/dialog.h32
-rw-r--r--kutils/ksettings/dispatcher.cpp36
-rw-r--r--kutils/ksettings/dispatcher.h28
-rw-r--r--kutils/ksettings/pluginpage.cpp18
-rw-r--r--kutils/ksettings/pluginpage.h8
-rw-r--r--kutils/tests/kfindtest.cpp40
-rw-r--r--kutils/tests/kfindtest.h22
-rw-r--r--kutils/tests/kreplacetest.cpp64
-rw-r--r--kutils/tests/kreplacetest.h20
-rw-r--r--kwallet/backend/kwalletbackend.cc124
-rw-r--r--kwallet/backend/kwalletbackend.h66
-rw-r--r--kwallet/backend/kwalletentry.cc18
-rw-r--r--kwallet/backend/kwalletentry.h22
-rw-r--r--kwallet/backend/tests/backendtest.cpp4
-rw-r--r--kwallet/client/kwallet.cc146
-rw-r--r--kwallet/client/kwallet.h106
-rw-r--r--kwallet/client/kwallettypes.h8
-rw-r--r--kwallet/tests/kwalletasync.cpp10
-rw-r--r--kwallet/tests/kwalletboth.cpp16
-rw-r--r--kwallet/tests/kwalletsync.cpp6
-rw-r--r--kwallet/tests/kwallettest.h2
-rw-r--r--libkmid/deviceman.cc2
-rw-r--r--libkmid/midfile.cc8
-rw-r--r--libkscreensaver/kscreensaver.cpp36
-rw-r--r--libkscreensaver/kscreensaver.h16
-rw-r--r--libkscreensaver/kscreensaver_vroot.h2
-rw-r--r--libkscreensaver/main.cpp14
-rw-r--r--pics/ksvgtopng.cpp8
-rw-r--r--win/dummy.cpp6
-rw-r--r--win/kdelibs_global_win.h8
-rw-r--r--win/qeventloopex.cpp76
-rw-r--r--win/qeventloopex.h14
-rw-r--r--win/win32_utils.h16
-rw-r--r--win/win32_utils2.cpp56
2584 files changed, 71576 insertions, 71576 deletions
diff --git a/KDE2PORTING.html b/KDE2PORTING.html
index be2ec2d95..1154682c8 100644
--- a/KDE2PORTING.html
+++ b/KDE2PORTING.html
@@ -136,7 +136,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
generalFont() and fixedFont() are deprecated and will be removed soon.
Please use KGlobalSettings::generalFont() and KGlobalSettings::fixedFont() instead.<P>
- appName() is deprecated. Please use QApplication::name() or instanceName
+ appName() is deprecated. Please use TQApplication::name() or instanceName
instead.<P>
The methods tempSaveName() and checkRecoverFile() return QString
@@ -189,7 +189,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
to klocale-&gt;translate with i18n.<P>
The return value of i18n is also no longer a const char*,
- but a unicode QString.<P>
+ but a unicode TQString.<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@@ -216,7 +216,7 @@ must have created a KApplication object before the methods can be used.<P>
<PRE>
...
KConfig *appcfg = KGlobal::config();
- QString mystr = i18n( "This is a string" );
+ TQString mystr = i18n( "This is a string" );
KIconLoader *loader = KGlobal::iconLoader();
@@ -277,9 +277,9 @@ Both the "About KDE" and the "About &lt;Application&gt;" dialog boxes
are now modeless. "About KDE" is a completely new widget.<P>
If you used in the toplevel window (that is derived from KMainWindow)
-"kapp-&gt;helpMenu( bool, QString )" to get the help menu
-you must now change this to "helpMenu( QString )". The QString defaults
-to QString::null so it is sufficient to write helpMenu().<P>
+"kapp-&gt;helpMenu( bool, TQString )" to get the help menu
+you must now change this to "helpMenu( TQString )". The TQString defaults
+to TQString::null so it is sufficient to write helpMenu().<P>
The old aboutKDE(), aboutApp() and appHelpActivated() of KApplication
have all been removed. If you need direct access to these or need
@@ -365,7 +365,7 @@ khtmlw has been replaced with khtml.<BR>
of the api has changed. In all functions:<P>
<PRE>
const char * -&gt; QString
- QStrList -&gt; QStringList
+ TQStrList -&gt; QStringList
</PRE>
The only exception for the moment is KHTMLWidget::write(), which does
also exist in a const char * version.<P>
@@ -373,7 +373,7 @@ khtmlw has been replaced with khtml.<BR>
<LI>you won't need the getKHTMLWiget function anymore. Just replace
getKHTMLWidget-&gt;xxx() with xxx()<P>
-<LI>xxx(QString) -&gt; xxx(const QString &amp;)<P>
+<LI>xxx(TQString) -&gt; xxx(const TQString &amp;)<P>
<LI>consistent naming. All getXyz() functions are renamed to xyz()<P>
<LI>replaced/changed functions:<P>
<TABLE BORDER="1">
@@ -386,8 +386,8 @@ khtmlw has been replaced with khtml.<BR>
<TD>-&gt; contentsX/Y()</TD>
</TR>
<TR>
-<TD>getSelectedText(QString &amp;)</TD>
-<TD>-&gt; QString selectedText()</TD>
+<TD>getSelectedText(TQString &amp;)</TD>
+<TD>-&gt; TQString selectedText()</TD>
</TR>
<TR>
<TD COLSPAN="2" ROWSPAN="0">findTextEnd() has vanished. just remove the call from your code</TD>
@@ -448,7 +448,7 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
<LI>You should be aware that to handle drops, you will either have to
inherit a widget and then override the methods mentioned above,
or install an event handler for the widget in that widget's parent,
- and then handle QEvent::DragMove or QEvent::Drop inside there (if
+ and then handle TQEvent::DragMove or TQEvent::Drop inside there (if
you want to avoid inheritance).<P>
<LI>You can emulate the old DndURL drop-type behavior with the Qt
Drag Object type QUriList.<P>
@@ -456,12 +456,12 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
method if you wish.<P>
<LI>Qt includes a Drag and Drop tutorial. We suggest you read that
now if you are confused.<P>
-<LI>QMultiLineEdit has already a DnD interface that accepts text/*
+<LI>TQMultiLineEdit has already a DnD interface that accepts text/*
If you want to add support for other mimetypes, you need to
re-implement all DnD-methods (also dragMoveEvent()) and pass
QTextDrag's to the parent methods.<P>
-<LI>QTextDrag also accepts text/uri-list, which means that you
- always need to check for QUriDrag first if you want to get
+<LI>TQTextDrag also accepts text/uri-list, which means that you
+ always need to check for TQUriDrag first if you want to get
both working.<P>
<LI>The mimetype for Uri's is now text/uri-list. If you've used
the proprietary Qt 1.x url/url, you need to adjust that.
@@ -474,8 +474,8 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
These classes have been largely re-implemented. The external API
remains mostly the same, with the single notable change that
the groupIterator and entryIterator methods have been removed and
- instead replaced by groupList (which returns a QStringList of groups)
- and entryMap(const QString &amp;group) (which returns a QMap of entries
+ instead replaced by groupList (which returns a TQStringList of groups)
+ and entryMap(const TQString &amp;group) (which returns a TQMap of entries
in the specified group). This is due to internal changes in KConfig
which would make providing iterators possibly rather difficult.<P>
@@ -487,8 +487,8 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
this:<P>
<PRE>
- QMap&lt;QString, QString&gt; tmpMap = config-&lt;entryMap(myGroup);
- QMap&lt;QString, QString&gt;::Iterator aIt(tmpMap.begin());
+ TQMap&lt;TQString, TQString&gt; tmpMap = config-&lt;entryMap(myGroup);
+ TQMap&lt;TQString, TQString&gt;::Iterator aIt(tmpMap.begin());
for (; aIt != tmpMap.end(); ++aIt) {
// body here. Access iterator key as aIt.key(),
@@ -537,7 +537,7 @@ Most applications will only need to replace kapp-&gt;getKCharsets() with
KGlobal::charsets().<P>
For conversion of various input formats to QStrings, please have a
-look at QTextCodec and classes derived from it.<P>
+look at TQTextCodec and classes derived from it.<P>
Character entities are now converted from and to QChars. The name has
changed from convertTag to fromEntity and toEntity.<P>
@@ -551,7 +551,7 @@ input font most closely, but can display the given charset.<P>
<H3><A NAME="KWizard">KWizard, KNoteBook</A></H3>
-KWizard is based on QWizard now. The API has changed. Consult Qt's
+KWizard is based on TQWizard now. The API has changed. Consult Qt's
documentation and kdelibs/kdetest/kwizardtest.cpp for an example use.<P>
KNoteBook (deeply entwined with the former KWizard) has been removed until
someone is willing to port it to work with the new wizard. If you want to
@@ -561,7 +561,7 @@ use it you'll find the necessary files in kdegraphics/kiconedit.<P>
<H3><A NAME="KSpinBox">KSpinBox, KNumericSpinBox</A></H3>
-These classes have been replaced by QSpinBox. API is almost the same
+These classes have been replaced by TQSpinBox. API is almost the same
HINTS:<P>
<UL>
<LI>valueincreased()/valuedecreased -&gt; valueChanged()
@@ -580,16 +580,16 @@ version had, and more.<P>
<H3><A NAME="KPanner">KPanner, KNewPanner</A></H3>
-KPanner and KNewPanner have been removed. QSplitter does everything
+KPanner and KNewPanner have been removed. TQSplitter does everything
KPanner did and more. The api is similar, but not compatible.
Basically to set it up so that you have a vertical splitter between a
listbox, a listview and multi line editor, you would do something like
this:<P>
<TABLE><TR><TD>
- QSplitter *split = new QSplitter( parent );<BR>
- QListBox *lb = new QListBox( split );<BR>
+ TQSplitter *split = new TQSplitter( parent );<BR>
+ TQListBox *lb = new TQListBox( split );<BR>
KListView *lv = new KListView( split );<BR>
- QMultiLineEdit *ed = new QMultiLineEdit( split );
+ TQMultiLineEdit *ed = new TQMultiLineEdit( split );
</TD></TR></TABLE>
As you can see you are not limited to two children. Additionally, you
@@ -600,26 +600,26 @@ possible if you call setOpaqueResize(true).<P>
<H3><A NAME="KTreeList">KTreeList, KTreeListItem</A></H3>
-Use KListView, QListViewItem instead. API is almost the same, you only
+Use KListView, TQListViewItem instead. API is almost the same, you only
need to add a Column (KListView::addColum) before KListView is useable.<P>
KListView has no addChild(), insertItem() and removeItem() calls. Inserting
-a root item is done by constructing a QListViewItem with the KListView
+a root item is done by constructing a TQListViewItem with the KListView
passed as the parent widget. adding a child item is done by constructing
-a QListViewItem with the parent item as parameter. removeItem() should
+a TQListViewItem with the parent item as parameter. removeItem() should
be replaced by delete &lt;pointer to item&gt;.<P>
The root items are not shown in a tree fashion by default. to get this,
use KListView::setDecorativeRoot(true).<P>
-Expanding and collapsing can by done by using QListViewItem::setOpen(bool).<P>
+Expanding and collapsing can by done by using TQListViewItem::setOpen(bool).<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<H3><A NAME="KMsgBox">KMsgBox</A></H3>
-KMsgBox has been superseded by QMessageBox. Which has been superseded
+KMsgBox has been superseded by TQMessageBox. Which has been superseded
by KMessageBox.<P>
<UL>
<LI>KMsgBox had return codes starting with 1 for the first button, 2 for
@@ -642,7 +642,7 @@ KComboBox::setEditText.<P>
<H3><A NAME="KQuickHelp">KQuickHelp</A></H3>
-KQuickHelp, the "super-tooltip" widget, has been replaced by QWhatsThis.
+KQuickHelp, the "super-tooltip" widget, has been replaced by TQWhatsThis.
It provides a compatible API and almost the same look and feel, in addition
to some new functionality.<P>
@@ -652,7 +652,7 @@ to some new functionality.<P>
Instead of old KPixmap::gradientFill, use:<P>
-KPixmapEffect::gradient(KPixmap&amp;, QColor, QColor, enum KPixmapEffect::GradientType, int)<P>
+KPixmapEffect::gradient(KPixmap&amp;, TQColor, TQColor, enum KPixmapEffect::GradientType, int)<P>
Hence:<P>
@@ -710,7 +710,7 @@ declared globally in kaccel.h are now static methods in KAccel.<P>
The KString class is obsolete and is not defined in
kstring.h anymore. The header file only existed for compatibility reasons.
-The file has been removed completely, use QString instead. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>
+The file has been removed completely, use TQString instead. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@@ -723,7 +723,7 @@ exist in KDE 2. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P>
<H3><A NAME="kbutton">kbutton.h / KButton</A></H3>
-Since Qt 2.0, the class QToolButton provides the functionality of
+Since Qt 2.0, the class TQToolButton provides the functionality of
buttons that raise when the mouse is moved over them, so there is no
reason to have a class providing the same feature in KDE libs. All
occurrences of KButton in the KDE CVS have been replaced by QToolButtons,
@@ -831,11 +831,11 @@ Werner Trobin &lt;<A HREF="mailto:wtrobin@carinthia.com">wtrobin@carinthia.com</
There is also a new preview mode which is quite different to the one we had in
the KDE 1.x KFD. There are no preview modules you have to register but there
is a single method you can use to set a preview widget. This widget has to
-inherit QWidget and you have to implement a slot (showPreview(const KURL &amp;))
+inherit TQWidget and you have to implement a slot (showPreview(const KURL &amp;))
in this class. This slot is called each time the selected file/dir changes.
In this slot you have to react appropriate (i.e. show the preview :). The
-easiest way this can be done is to derive your class from QWidgetStack and
-add a Object (derived from QWidget) for each file type. In the showPreview
+easiest way this can be done is to derive your class from TQWidgetStack and
+add a Object (derived from TQWidget) for each file type. In the showPreview
method you just raise the matching widget. If you can't find an appropriate
widget just hide() the widget stack.<P>
If you need some "inspiration" on how that could be done, please have a look
diff --git a/KDE3PORTING.html b/KDE3PORTING.html
index 416b6024b..e249020f6 100644
--- a/KDE3PORTING.html
+++ b/KDE3PORTING.html
@@ -68,7 +68,7 @@ The old name will still work unless KDE_NO_COMPAT is defined.
<H3><A NAME="kdecore">Changes in kdecore</A></H3>
<H4>KDesktopWidget</H4>
-KDesktopWidget is obsolete. Include &lt;qdesktopwidget.h&gt; and use QDesktopWidget
+KDesktopWidget is obsolete. Include &lt;tqdesktopwidget.h&gt; and use QDesktopWidget
instead, everything else is source compatible.
<H4>Header file names</H4>
@@ -112,13 +112,13 @@ The old name will still work unless KDE_NO_COMPAT is defined.
KPixmapSplitter has now been moved to the new kdefx library.
<H4>KStringHandler</H4>
-The <i>matchFilename( const QString& filename, const QString& pattern )</i> method has been
-renamed to <br><i>matchFileName( const QString& filename, const QString& pattern )</i>.
+The <i>matchFilename( const TQString& filename, const TQString& pattern )</i> method has been
+renamed to <br><i>matchFileName( const TQString& filename, const TQString& pattern )</i>.
The old name will still work unless KDE_NO_COMPAT is defined.
<H4>KStyle</H4>
-Due to the major changes in the QStyle API in Qt3, KStyle has been completely
-re-written. KStyle is now a thin wrapper around QCommonStyle with a few extra
+Due to the major changes in the TQStyle API in Qt3, KStyle has been completely
+re-written. KStyle is now a thin wrapper around TQCommonStyle with a few extra
primitive elements and a simple popupMenu transparency engine. All KStyles can
now style Qt apps like designer and assistant automatically. KStyle is no longer
present in kdecore. It is now in a new library called kdefx to allow Qt apps to
@@ -131,20 +131,20 @@ The old name will still work unless KDE_NO_COMPAT is defined.
<H4>KMD5</H4>
HASHHEX and HASH has been removed to make this class namespace clean.
-They have been replaced by QCString and KMD5::Digest. <br>
+They have been replaced by TQCString and KMD5::Digest. <br>
The API has been cleaned up, it is no longer necessary to call finalize().
Simply remove any calls to it.
<H4>KLocale</H4>
<li>charset() has been removed. You might want to use encoding() instead.
-<li>setCharset(const QString &amp;) has been removed. You might want to use
+<li>setCharset(const TQString &amp;) has been removed. You might want to use
setEncoding(int) instead.
-<li>formatMoney(const QString &amp;) has been removed.
-<li>formatNumber(const QString &amp;) has been removed.
+<li>formatMoney(const TQString &amp;) has been removed.
+<li>formatNumber(const TQString &amp;) has been removed.
<li>languages() has been removed. Use languageList() instead.
<li>All references to monthName(), monthNamePossessive(), and weekDayName()
should be replaced with methods from KLocale::calendar().
-<li>Hard coded date handling or date handling with QDate should in most
+<li>Hard coded date handling or date handling with TQDate should in most
cases be replaced by methods in KLocale::calendar().
<H4>Accelerators Keys</H4>
@@ -155,12 +155,12 @@ not be available.
<li> KAccel::insertItem() and KAccel::connectItem().
<pre>
- kaccel-&gt;insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- - kaccel-&gt;connectItem( "Scroll Up", this, SLOT(scrollUp()) );
- + kaccel-&gt;insert( "Scroll Up", i18n("Scroll Up"), QString::null,
- Key_Up, this, SLOT(scrollUp()) );
+ - kaccel-&gt;connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) );
+ + kaccel-&gt;insert( "Scroll Up", i18n("Scroll Up"), TQString::null,
+ Key_Up, this, TQT_SLOT(scrollUp()) );
</pre>
Note that a What's This parameter is now a part of the insert function.
- You might replace the QString::null parameter with
+ You might replace the TQString::null parameter with
<pre> i18n("Scroll the current document's contents up by one line.") </pre>
for example.</li>
<li> KAccel::changeMenuAccel() has been deprecated because it was
@@ -176,7 +176,7 @@ not be available.
The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
<pre>
new KAction( i18n("Scroll Up"), Key_Up,
- this, SLOT(scrollUp()), actionCollection(), "Scroll Up" );
+ this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" );
</pre>
<h5>KGlobalAccel</h5>
@@ -200,12 +200,12 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
<li>The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined:
<table border=1>
<tr><th>Old</th><th>New</th></tr>
- <tr><td>QString action(StdAccel id)</td><td>QString name(StdAccel id)</td></tr>
+ <tr><td>TQString action(StdAccel id)</td><td>TQString name(StdAccel id)</td></tr>
<tr><td>int defaultKey(StdAccel accel)</td><td>KShortcut shortcutDefault(StdAccel id)</td></tr>
- <tr><td>QString description(StdAccel id)</td><td>QString label(StdAccel id)</td></tr>
- <tr><td>bool isEqual(const QKeyEvent* pEvent, int keyQt)</td>
+ <tr><td>TQString description(StdAccel id)</td><td>TQString label(StdAccel id)</td></tr>
+ <tr><td>bool isEqual(const TQKeyEvent* pEvent, int keyQt)</td>
<td>The best method for replacing this varies. One possibility is to use
- <i>KKey(const QKeyEvent*) == KKey(int)</i>. Another is to use
+ <i>KKey(const TQKeyEvent*) == KKey(int)</i>. Another is to use
<i>KShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr>
<tr><td>int key(StdAccel)</td><td>const KShortcut& shortcut(StdAccel)</td></tr>
</table></li-->
@@ -261,7 +261,7 @@ This class has been removed, use Qt layouts instead.
<H4>KCommand</H4>
This class has been made lighter: the name isn't stored into the command anymore,
but must be provided by the inherited class, as the result of the virtual name() function.
-This saves storing a QString into each command in memory.
+This saves storing a TQString into each command in memory.
The former behavior is available in the class KNamedCommand, so for a quick port
simply replace KCommand with KNamedCommand.
@@ -273,7 +273,7 @@ The deprecated getMainWidget() method has been removed. Use mainWidget() instead
functionality.
<H4>KDockWidget</H4>
-The WidgetList parameter has been renamed to QWidgetList. Behaviour
+The WidgetList parameter has been renamed to TQWidgetList. Behaviour
is identical.
<H4>KEdit</H4>
@@ -306,11 +306,11 @@ for more informations on this new extension.
PixmapEffect has now been moved to the new kdefx library.
<H4>KProgress</H4>
-KProgress is now based on QProgressBar.
+KProgress is now based on TQProgressBar.
This has led to a few API changes. In particular the constructors have been
simplified, you simply need to pass the total number of steps instead of
min / max / initialvalue / orientation. See documentation of both KProgress
-and QProgressBar.
+and TQProgressBar.
<H4>KRootPixmap</H4>
The KRootPixmap class has been extended to make it more flexible, and the
@@ -324,7 +324,7 @@ as its use is basically limited to KThemeStyle.
<H4>KAction, KToolBar, KToolBarButton and icons</H4>
The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader),
-instead of using QIconSet or QPixmap. This results in always using the correct icon size and allows delayed
+instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed
on-demand icon loading.
<p>
Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined.
@@ -335,13 +335,13 @@ KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), set
Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead.
<H4>KAction and derived classes</H4>
-The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const QString&)
+The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const TQString&)
is now updateText(int) ). Because the former second argument was always the value of the a corresponding data member, you
can simply call the accessor method (i.e. in updateText() call text() to get the text).
<H4>KToggleAction</H4>
exclusiveGroup() is no more virtual. setExclusiveGroup(const
-QString&) is not a slot anymore.
+TQString&) is not a slot anymore.
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@@ -350,7 +350,7 @@ QString&) is not a slot anymore.
<H4>KPropertiesDialog</H4>
<ul>
<li>The header file has been renamed from kpropsdlg.h to kpropertiesdialog.h.</li>
- <li>KPropertiesDialog::KPropertiesDialog(const KURL&, mode_t, QWidget*,
+ <li>KPropertiesDialog::KPropertiesDialog(const KURL&, mode_t, TQWidget*,
const char*, bool, bool ) has been removed since mode_t was no longer
used. Simply omit the mode_t parameter.</li>
</ul>
@@ -362,15 +362,15 @@ QString&) is not a slot anymore.
<li>A base class KArchive has been written, to support other archive formats in the future</li>
<li>KTarEntry is now KArchiveEntry, KTarDirectory is now KArchiveDirectory, and KTarFile is now KArchiveFile.</li>
<li>The classes ProgressBase, StatusbarProgress and DefaultProgress have been moved to the KIO namespace.</li>
- <li>The signal KDirLister::started(const QString &amp;url) has changed to KDirLister::started(const KURL &amp;url).<li>
- <li>KServiceTypeProfile::preferredService( const QString &amp; serviceType, bool needApp ) has been removed, use
+ <li>The signal KDirLister::started(const TQString &amp;url) has changed to KDirLister::started(const KURL &amp;url).<li>
+ <li>KServiceTypeProfile::preferredService( const TQString &amp; serviceType, bool needApp ) has been removed, use
KServiceTypeProfile::preferredService( ..., "Application") if needApp was true, or
- KServiceTypeProfile::preferredService( ..., QString::null) if needApp was false.
+ KServiceTypeProfile::preferredService( ..., TQString::null) if needApp was false.
<li>The following functions in KProtocolManager have been replaced:
<ul>
<li>ftpProxy(), use proxyFor("ftp") instead.
<li>httpProxy(), use proxyFor("http") instead.
-<li>slaveProtocol(const QString&amp;), use slaveProtocol(const KURL &amp;url, QString &amp;proxy) instead.
+<li>slaveProtocol(const TQString&amp;), use slaveProtocol(const KURL &amp;url, TQString &amp;proxy) instead.
<li>defaultReadTimeout(), use DEFAULT_READ_TIMEOUT instead. (See ioslave_defaults.h)
<li>defaultProxyConnectTimeout(), use DEFAULT_PROXY_CONNECT_TIMEOUT instead. (See ioslave_defaults.h)
<li>defaultResponseTimeout(), use DEFAULT_RESPONSE_TIMEOUT instead. (See ioslave_defaults.h)
@@ -378,7 +378,7 @@ QString&) is not a slot anymore.
</ul>
<li>The following functions in KProtocolManager have been removed:
<ul>
-<li>setUserAgentList( const QStringList&amp; )
+<li>setUserAgentList( const TQStringList&amp; )
<li>userAgentList();
<li>setReadTimeout()
<li>setConnectTimeout( int )
@@ -396,11 +396,11 @@ QString&) is not a slot anymore.
<li>setUseReverseProxy( bool )
<li>setProxyType( ProxyType )
<li>setProxyAuthMode( ProxyAuthMode )
-<li>setFtpProxy( const QString&amp; )
-<li>setHttpProxy( const QString&amp; )
-<li>setProxyFor( const QString&amp;, const QString&amp; )
-<li>setNoProxyFor( const QString&amp; )
-<li>setProxyConfigScript( const QString&amp; )
+<li>setFtpProxy( const TQString&amp; )
+<li>setHttpProxy( const TQString&amp; )
+<li>setProxyFor( const TQString&amp;, const TQString&amp; )
+<li>setNoProxyFor( const TQString&amp; )
+<li>setProxyConfigScript( const TQString&amp; )
</ul>
</li>
<li>In order to support files &gt; 4Gb, the file size / file-offset argument
@@ -428,10 +428,10 @@ The createFilterDevice method is deprecated. Use deviceForFile instead.
<H4>KDirWatch</H4>
<ul>
- <li>The signal fileDirty( const QString&amp; ) has been removed</li>
- <li>The signal created( const QString&amp; ) has been added</li>
- <li>The signal deleted( const QString&amp; ) has been added</li>
- <li>The signal dirty( const QString&amp; ) may be emitted with a file name, not only
+ <li>The signal fileDirty( const TQString&amp; ) has been removed</li>
+ <li>The signal created( const TQString&amp; ) has been added</li>
+ <li>The signal deleted( const TQString&amp; ) has been added</li>
+ <li>The signal dirty( const TQString&amp; ) may be emitted with a file name, not only
a directory name. This depends on which backend is used but will probably always be
the case in KDE 3.1. You should prepare to receive dirty( dirname ) or dirty( filename )
when a file has changed.
@@ -473,18 +473,18 @@ setURLArgs does the job.
<H4>KSpell</H4>
The API has been cleaned up to be in line with the rest of kdelibs, in particular:
<ul>
-<li>suggestions() now returns a QStringList instead of a pointer to a QStringList
-<li>intermediateBuffer() now returns a QString instead of a pointer to a QString
-<li>The signal <b>misspelling(QString, QStringList *, unsigned)</b> has changed to
- misspelling(const QString &amp;, const QStringList &amp;, unsigned int)
-<li>The signal <b>corrected(QString, QString, unsigned)</b> has changed to
- corrected(const QString &amp;, const QString &amp;, unsigned int)
-<li>The signal <b>ignoreall(QString)</b> has changed to
- ignoreall(const QString &amp;)
-<li>The signal <b>ignoreword(QString)</b> has changed to
- ignoreword(const QString &amp;)
-<li>The signal <b>addword(QString)</b> has changed to
- addword(const QString &amp;)
+<li>suggestions() now returns a TQStringList instead of a pointer to a QStringList
+<li>intermediateBuffer() now returns a TQString instead of a pointer to a QString
+<li>The signal <b>misspelling(TQString, TQStringList *, unsigned)</b> has changed to
+ misspelling(const TQString &amp;, const TQStringList &amp;, unsigned int)
+<li>The signal <b>corrected(TQString, TQString, unsigned)</b> has changed to
+ corrected(const TQString &amp;, const TQString &amp;, unsigned int)
+<li>The signal <b>ignoreall(TQString)</b> has changed to
+ ignoreall(const TQString &amp;)
+<li>The signal <b>ignoreword(TQString)</b> has changed to
+ ignoreword(const TQString &amp;)
+<li>The signal <b>addword(TQString)</b> has changed to
+ addword(const TQString &amp;)
</ul>
Make sure to check if you use the above signals since your compiler
@@ -551,7 +551,7 @@ This class has been merged with KDirLister from kio.
<tr><td>saveConfig()</td><td>writeConfig()</td></tr>
<tr><td>setFileReader()</td><td>setDirLister()</td></tr>
<tr><td>fileReader()</td><td>dirLister()</td></tr>
-<tr><td>activatedMenu( const KFileViewItem * )</td><td>activatedMenu( const KFileItem *, const QPoint& pos )</td></tr>
+<tr><td>activatedMenu( const KFileViewItem * )</td><td>activatedMenu( const KFileItem *, const TQPoint& pos )</td></tr>
</table>
<H4>KFileDetailView</H4>
@@ -564,25 +564,25 @@ flexibility and efficiency.
Sorting has changed radically. Previously, KFileView had protected methods QuickSort,
compareItems() and mergeLists() to sort directory entries for displaying in the views. Now,
KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, KListView)
-sorting is utilized by letting its view-items provide a QString key() method. Therefore,
+sorting is utilized by letting its view-items provide a TQString key() method. Therefore,
KFileView offers the two methods
<ul>
-<li>QString sortingKey( const QString&amp; value, bool isDir, int sortSpec )</li>
-<li>QString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li>
+<li>TQString sortingKey( const TQString&amp; value, bool isDir, int sortSpec )</li>
+<li>TQString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li>
</ul>
which the view-classes can use to generate the string for the key() method. The KFile::SortMode
-enum has been removed, as QDir::SortSpec is used entirely.
+enum has been removed, as TQDir::SortSpec is used entirely.
<br><br>
Further changes:
<table>
<tr><th>Old:</th><th>New:</th></tr>
-<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const QString&amp; group = QString::null )</td></tr>
-<tr><td>not existant</td><td>void writeConfig( KConfig *, const QString&amp; group = QString::null)</td></tr>
-<tr><td>virtual void setCurrentItem( const QString&amp; filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr>
-<tr><td>&nbsp;</td><td>void setCurrentItem( const QString&amp; filename );</td></tr>
+<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const TQString&amp; group = TQString::null )</td></tr>
+<tr><td>not existant</td><td>void writeConfig( KConfig *, const TQString&amp; group = TQString::null)</td></tr>
+<tr><td>virtual void setCurrentItem( const TQString&amp; filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr>
+<tr><td>&nbsp;</td><td>void setCurrentItem( const TQString&amp; filename );</td></tr>
<tr><td>&nbsp;</td><td>virtual void setCurrentItem( const KFileViewItem * ) = 0;</td></tr>
-<tr><td>setOperator( QObject * )</td><td>setParentView( KFileView * )</td></tr>
+<tr><td>setOperator( TQObject * )</td><td>setParentView( KFileView * )</td></tr>
<tr><td>virtual void insertSorted( KFileViewItem *, uint count )</td><td>virtual void insertItem( KFileItem * )</td></tr>
<tr><td>virtual void addItemList( const KFileViewItemList &amp;list )</td><td>not virtual anymore. Sufficient to reimplement insertItem()</td></tr>
</table>
diff --git a/arts/kde/kartsdispatcher.cc b/arts/kde/kartsdispatcher.cc
index e6136ce12..fa41502f8 100644
--- a/arts/kde/kartsdispatcher.cc
+++ b/arts/kde/kartsdispatcher.cc
@@ -30,8 +30,8 @@ int KArtsDispatcher::m_refCount = 0;
Arts::Dispatcher *KArtsDispatcher::artsDispatcher = 0;
Arts::QIOManager *KArtsDispatcher::artsQIOManager = 0;
-KArtsDispatcher::KArtsDispatcher(QObject *parent, const char *name)
- : QObject(parent, name)
+KArtsDispatcher::KArtsDispatcher(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
m_refCount++;
if(artsDispatcher == 0)
diff --git a/arts/kde/kartsdispatcher.h b/arts/kde/kartsdispatcher.h
index db2792a97..dcd094844 100644
--- a/arts/kde/kartsdispatcher.h
+++ b/arts/kde/kartsdispatcher.h
@@ -22,7 +22,7 @@
#ifndef KARTSDISPATCHER_H
#define KARTSDISPATCHER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -71,7 +71,7 @@ public:
* @param parent the parent Qt object
* @param name the Qt object name of this object
*/
- KArtsDispatcher(QObject *parent = 0, const char *name = 0);
+ KArtsDispatcher(TQObject *parent = 0, const char *name = 0);
/**
* Destructor
diff --git a/arts/kde/kartsfloatwatch.cpp b/arts/kde/kartsfloatwatch.cpp
index d26d76718..5421f9ecf 100644
--- a/arts/kde/kartsfloatwatch.cpp
+++ b/arts/kde/kartsfloatwatch.cpp
@@ -46,7 +46,7 @@ public:
}
KArtsFloatWatch::KArtsFloatWatch(Arts::Object object, const char *stream,
- QObject *parent, const char *name) : QObject(parent, name)
+ TQObject *parent, const char *name) : TQObject(parent, name)
{
d = new KArtsFloatWatchPrivate();
d->proxy = KFloatWatchProxy::_from_base(new KFloatWatchProxy_impl(this));
diff --git a/arts/kde/kartsfloatwatch.h b/arts/kde/kartsfloatwatch.h
index 6c23327ea..cc6671556 100644
--- a/arts/kde/kartsfloatwatch.h
+++ b/arts/kde/kartsfloatwatch.h
@@ -21,7 +21,7 @@
*/
#include "common.h"
-#include <qobject.h>
+#include <tqobject.h>
class KArtsFloatWatchPrivate;
namespace Arts { class KFloatWatchProxy_impl; }
@@ -44,10 +44,10 @@ namespace Arts { class KFloatWatchProxy_impl; }
* \code
* StereoVolumeControl stereoVolumeControl = ...;
* KArtsFloatWatch *w = new KArtsFloatWatch(stereoVolumeControl, "scaleFactor_changed", this);
- * connect(w, SIGNAL(valueChanged(float)), this, SLOT(setValue(float)));
+ * connect(w, TQT_SIGNAL(valueChanged(float)), this, TQT_SLOT(setValue(float)));
* \endcode
*/
-class KArtsFloatWatch : public QObject {
+class KArtsFloatWatch : public TQObject {
Q_OBJECT
private:
KArtsFloatWatchPrivate *d;
@@ -67,7 +67,7 @@ public:
* @param parent the parent Qt object
* @param name the Qt object name of this object
*/
- KArtsFloatWatch(Arts::Object object, const char *stream, QObject *parent = 0, const char *name = 0);
+ KArtsFloatWatch(Arts::Object object, const char *stream, TQObject *parent = 0, const char *name = 0);
/**
* Destructor
diff --git a/arts/kde/kartsserver.cpp b/arts/kde/kartsserver.cpp
index 9b4739928..ee220be17 100644
--- a/arts/kde/kartsserver.cpp
+++ b/arts/kde/kartsserver.cpp
@@ -22,8 +22,8 @@
#include <ksimpleconfig.h>
#include <kprocess.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "kartsserver.h"
struct KArtsServer::Data
@@ -31,8 +31,8 @@ struct KArtsServer::Data
Arts::SoundServerV2 server;
};
-KArtsServer::KArtsServer(QObject *parent, const char *name)
- : QObject(parent, name)
+KArtsServer::KArtsServer(TQObject *parent, const char *name)
+ : TQObject(parent, name)
, d(new Data)
{
d->server = Arts::SoundServerV2::null();
@@ -68,7 +68,7 @@ Arts::SoundServerV2 KArtsServer::server(void)
bool x11Comm = config.readBoolEntry("X11GlobalComm", false);
// put the value of x11Comm into .mcoprc
- KSimpleConfig X11CommConfig(QDir::homeDirPath()+"/.mcoprc");
+ KSimpleConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc");
if(x11Comm)
X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm");
@@ -77,14 +77,14 @@ Arts::SoundServerV2 KArtsServer::server(void)
X11CommConfig.sync();
- proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("kdeinit_wrapper")));
+ proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper")));
if(rt)
- proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artswrapper")));
+ proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper")));
else
- proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artsd")));
+ proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd")));
- proc << QStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );
+ proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );
if(proc.start(KProcess::Block) && proc.normalExit())
{
diff --git a/arts/kde/kartsserver.h b/arts/kde/kartsserver.h
index 8456e25ea..c01829cf1 100644
--- a/arts/kde/kartsserver.h
+++ b/arts/kde/kartsserver.h
@@ -22,7 +22,7 @@
#define KARTSSERVER_H
#include "kmedia2.h"
-#include <qobject.h>
+#include <tqobject.h>
#include "soundserver.h"
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ public:
* Create a new KArtsServer. Don't forget to create a KArtsDispatcher
* before using KArtsServer.
*/
- KArtsServer(QObject *parent = 0, const char *name = 0);
+ KArtsServer(TQObject *parent = 0, const char *name = 0);
virtual ~KArtsServer(void);
/**
diff --git a/arts/kde/kaudioconverter.cc b/arts/kde/kaudioconverter.cc
index a5f1e8e43..adda3033a 100644
--- a/arts/kde/kaudioconverter.cc
+++ b/arts/kde/kaudioconverter.cc
@@ -31,8 +31,8 @@
#include <iostream>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <kurl.h>
#include <kdebug.h>
@@ -71,7 +71,7 @@ bool KAudioConverter::setup(int samplingRate)
return true;
}
-void KAudioConverter::slotMimeType(const QString &mimeType)
+void KAudioConverter::slotMimeType(const TQString &mimeType)
{
m_mimeType = mimeType;
kapp->exit_loop();
@@ -88,7 +88,7 @@ void KAudioConverter::requestPlayObject(const KURL &url)
Arts::KIOInputStream_impl *inputStreamImpl = new Arts::KIOInputStream_impl();
inputStream = Arts::KIOInputStream::_from_base(inputStreamImpl);
- QObject::connect(inputStreamImpl, SIGNAL(mimeTypeFound(const QString &)), SLOT(slotMimeType(const QString &)));
+ TQObject::connect(inputStreamImpl, TQT_SIGNAL(mimeTypeFound(const TQString &)), TQT_SLOT(slotMimeType(const TQString &)));
inputStream.openURL(url.url().latin1());
inputStream.streamStart();
@@ -134,7 +134,7 @@ void KAudioConverter::requestPlayObject(const KURL &url)
{
Arts::PlayObject result = Arts::SubClass(objectType);
- if(result.loadMedia(string(QFile::encodeName(url.path()))))
+ if(result.loadMedia(string(TQFile::encodeName(url.path()))))
{
result._node()->start();
m_incoming = new KPlayObject(result, false);
@@ -161,9 +161,9 @@ void KAudioConverter::start()
Arts::connect(m_incoming->object(), "left", m_request, "left");
Arts::connect(m_incoming->object(), "right", m_request, "right");
- QObject::connect(requestImpl, SIGNAL(newBlockSize(long)), SIGNAL(newBlockSize(long)));
- QObject::connect(requestImpl, SIGNAL(newBlockPointer(long)), SIGNAL(newBlockPointer(long)));
- QObject::connect(requestImpl, SIGNAL(newData()), SIGNAL(newData()));
+ TQObject::connect(requestImpl, TQT_SIGNAL(newBlockSize(long)), TQT_SIGNAL(newBlockSize(long)));
+ TQObject::connect(requestImpl, TQT_SIGNAL(newBlockPointer(long)), TQT_SIGNAL(newBlockPointer(long)));
+ TQObject::connect(requestImpl, TQT_SIGNAL(newData()), TQT_SIGNAL(newData()));
// Special mpeglib case
// TODO: needed at all??
@@ -174,7 +174,7 @@ void KAudioConverter::start()
m_request.start();
- // TODO: Maybe do this async, using QTimer::singleShot
+ // TODO: Maybe do this async, using TQTimer::singleShot
// But jowenn i think jowenn is right -> this would
// lead to problems in slotNewData() when accessing the data
// (could already be overwritten...)
diff --git a/arts/kde/kaudioconverter.h b/arts/kde/kaudioconverter.h
index 6235739d8..72f56a0f7 100644
--- a/arts/kde/kaudioconverter.h
+++ b/arts/kde/kaudioconverter.h
@@ -22,7 +22,7 @@
#ifndef KAUDIOCONVERTER_H
#define KAUDIOCONVERTER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "artskde.h"
#include "kplayobject.h"
@@ -52,12 +52,12 @@ signals:
void rawStreamFinished();
private slots:
- void slotMimeType(const QString &mimeType);
+ void slotMimeType(const TQString &mimeType);
private:
Arts::KDataRequest m_request;
KPlayObject *m_incoming;
- QString m_mimeType;
+ TQString m_mimeType;
bool m_started;
};
diff --git a/arts/kde/kaudiomanagerplay.cpp b/arts/kde/kaudiomanagerplay.cpp
index 12b817a87..0496536d2 100644
--- a/arts/kde/kaudiomanagerplay.cpp
+++ b/arts/kde/kaudiomanagerplay.cpp
@@ -23,7 +23,7 @@
#include <soundserver.h>
#include <string>
-KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const QString & title )
+KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const TQString & title )
{
d = new PrivateData;
d->amanPlay = Arts::DynamicCast( server->server().createObject( "Arts::Synth_AMAN_PLAY" ) );
@@ -49,24 +49,24 @@ bool KAudioManagerPlay::isNull() const
return d->amanPlay.isNull();
}
-void KAudioManagerPlay::setTitle( const QString & title )
+void KAudioManagerPlay::setTitle( const TQString & title )
{
d->amanPlay.title( std::string( title.local8Bit() ) );
}
-QString KAudioManagerPlay::title()
+TQString KAudioManagerPlay::title()
{
- return QString::fromLocal8Bit( d->amanPlay.title().c_str() );
+ return TQString::fromLocal8Bit( d->amanPlay.title().c_str() );
}
-void KAudioManagerPlay::setAutoRestoreID( const QString & autoRestoreID )
+void KAudioManagerPlay::setAutoRestoreID( const TQString & autoRestoreID )
{
d->amanPlay.autoRestoreID( std::string( autoRestoreID.local8Bit() ) );
}
-QString KAudioManagerPlay::autoRestoreID()
+TQString KAudioManagerPlay::autoRestoreID()
{
- return QString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() );
+ return TQString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() );
}
void KAudioManagerPlay::start()
diff --git a/arts/kde/kaudiomanagerplay.h b/arts/kde/kaudiomanagerplay.h
index 6bf332130..f9022b936 100644
--- a/arts/kde/kaudiomanagerplay.h
+++ b/arts/kde/kaudiomanagerplay.h
@@ -21,7 +21,7 @@
#define KAUDIOMANAGERPLAY_H
#include <artsflow.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class KArtsServer;
@@ -38,7 +38,7 @@ class QString;
class KDE_ARTS_EXPORT KAudioManagerPlay
{
public:
- KAudioManagerPlay( KArtsServer * server, const QString & title = QString::null );
+ KAudioManagerPlay( KArtsServer * server, const TQString & title = TQString::null );
~KAudioManagerPlay();
/**
@@ -57,15 +57,15 @@ class KDE_ARTS_EXPORT KAudioManagerPlay
/**
* Set the name of the output in the AudioManager
*/
- void setTitle( const QString & title );
+ void setTitle( const TQString & title );
/**
* returns the name of the output as it appears in the AudioManager
*/
- QString title();
+ TQString title();
- void setAutoRestoreID( const QString & autoRestoreID );
- QString autoRestoreID();
+ void setAutoRestoreID( const TQString & autoRestoreID );
+ TQString autoRestoreID();
void start();
void stop();
diff --git a/arts/kde/kaudioplaystream.cpp b/arts/kde/kaudioplaystream.cpp
index 200128ffc..52743a67e 100644
--- a/arts/kde/kaudioplaystream.cpp
+++ b/arts/kde/kaudioplaystream.cpp
@@ -29,16 +29,16 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qstring.h>
-//#include <qptrqueue.h>
-//#include <qcstring.h> //QByteArray
+#include <tqstring.h>
+//#include <tqptrqueue.h>
+//#include <tqcstring.h> //QByteArray
#include <string.h> // for strncpy
//#include <assert.h>
-KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const QString title, QObject* p, const char* n )
- : QObject( p,n )
+KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const TQString title, TQObject* p, const char* n )
+ : TQObject( p,n )
, _server( server )
, _play( new KAudioManagerPlay( _server, title ) )
, _effectrack( Arts::StereoEffectStack::null() )
@@ -82,8 +82,8 @@ void KAudioPlayStreamPrivate::initaRts() {
if ( _effects ) _effectrack.start();
}
-KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const QString title, QObject* p, const char* n )
- : QObject( p,n )
+KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* p, const char* n )
+ : TQObject( p,n )
, d( new KAudioPlayStreamPrivate( server, title, this ) )
{
kdDebug( 400 ) << k_funcinfo << endl;
@@ -147,7 +147,7 @@ void KAudioPlayStream::stop()
}
}
-void KAudioPlayStream::write( QByteArray& )
+void KAudioPlayStream::write( TQByteArray& )
{
}
@@ -156,7 +156,7 @@ void KAudioPlayStream::fillData( Arts::DataPacket<Arts::mcopbyte> *packet )
//kdDebug( 400 ) << k_funcinfo << "packet->size=" << packet->size << endl;
if ( d->_polling )
{
- QByteArray bytearray( packet->size );
+ TQByteArray bytearray( packet->size );
bytearray.setRawData( ( char* )packet->contents, packet->size );
bytearray.fill( 0 );
emit requestData( bytearray );
diff --git a/arts/kde/kaudioplaystream.h b/arts/kde/kaudioplaystream.h
index 8f34cc8c9..0d8e6b41c 100644
--- a/arts/kde/kaudioplaystream.h
+++ b/arts/kde/kaudioplaystream.h
@@ -20,9 +20,9 @@
#ifndef KAUDIOPLAYSTREAM_H
#define KAUDIOPLAYSTREAM_H
-#include <qobject.h>
+#include <tqobject.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <stdsynthmodule.h>
#include <kdelibs_export.h>
@@ -39,7 +39,7 @@ class KAudioPlayStreamPrivate;
* @since 3.2
*/
-class KDE_ARTS_EXPORT KAudioPlayStream : public QObject {
+class KDE_ARTS_EXPORT KAudioPlayStream : public TQObject {
Q_OBJECT
public:
/**
@@ -51,7 +51,7 @@ public:
* @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
* @param name The name of the stream.
*/
- KAudioPlayStream( KArtsServer* server, const QString title, QObject* parent=0, const char* name=0 );
+ KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* parent=0, const char* name=0 );
/**
* Destructs the KAudioPlayStream.
*/
@@ -96,13 +96,13 @@ public slots:
* Write data into the inputbuffer.
* If you ignore the signal noData() it will play 0 ( silence ).
*/
- void write( QByteArray& data );
+ void write( TQByteArray& data );
signals:
/**
* This signal is emitted when audio should be played.
* You have to fill the array with data.
*/
- void requestData( QByteArray& );
+ void requestData( TQByteArray& );
/**
* Is emitted when the state changes.
diff --git a/arts/kde/kaudioplaystream_p.h b/arts/kde/kaudioplaystream_p.h
index a7e5cc4e7..4e4f25ed1 100644
--- a/arts/kde/kaudioplaystream_p.h
+++ b/arts/kde/kaudioplaystream_p.h
@@ -23,7 +23,7 @@
#include <soundserver.h>
#include <stdsynthmodule.h>
-#include <qobject.h>
+#include <tqobject.h>
class KArtsServer;
class KAudioManagerPlay;
@@ -36,10 +36,10 @@ namespace Arts {
class KAudioPlayStream;
class KByteSoundProducer;
-class KAudioPlayStreamPrivate : public QObject {
+class KAudioPlayStreamPrivate : public TQObject {
Q_OBJECT
public:
- KAudioPlayStreamPrivate( KArtsServer*, const QString title, QObject*, const char* =0 );
+ KAudioPlayStreamPrivate( KArtsServer*, const TQString title, TQObject*, const char* =0 );
~KAudioPlayStreamPrivate();
KArtsServer* _server;
diff --git a/arts/kde/kaudiorecordstream.cpp b/arts/kde/kaudiorecordstream.cpp
index 53788e296..0d180d1f1 100644
--- a/arts/kde/kaudiorecordstream.cpp
+++ b/arts/kde/kaudiorecordstream.cpp
@@ -32,9 +32,9 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qptrqueue.h>
-#include <qcstring.h> //QByteArray
+#include <tqstring.h>
+#include <tqptrqueue.h>
+#include <tqcstring.h> //QByteArray
#include <assert.h>
@@ -50,12 +50,12 @@ struct KAudioRecordStream::Data
bool blocking;
bool polling;
unsigned int pos;
- QPtrQueue<QByteArray> inqueue;
- QString title;
+ TQPtrQueue<TQByteArray> inqueue;
+ TQString title;
};
-KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & title, QObject * parent, const char * name )
- : QObject( parent, name )
+KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const TQString & title, TQObject * parent, const char * name )
+ : TQObject( parent, name )
, d( new Data )
{
d->kserver = kserver;
@@ -66,7 +66,7 @@ KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & t
d->inqueue.setAutoDelete( true );
d->title = title;
- connect( d->kserver, SIGNAL( restartedServer() ), SLOT( slotRestartedServer() ) );
+ connect( d->kserver, TQT_SIGNAL( restartedServer() ), TQT_SLOT( slotRestartedServer() ) );
d->in = Arts::DynamicCast( d->kserver->server().createObject( "Arts::Synth_AMAN_RECORD" ) );
d->effectStack = Arts::DynamicCast( d->kserver->server().createObject( "Arts::StereoEffectStack" ) );
@@ -109,7 +109,7 @@ int KAudioRecordStream::read( char * buffer, int size )
if( d->inqueue.isEmpty() )
return size - remaining;
}
- QByteArray * data = d->inqueue.head();
+ TQByteArray * data = d->inqueue.head();
unsigned int tocopy = kMin( remaining, data->size() - d->pos );
memcpy( buffer, data->data() + d->pos, tocopy );
d->pos += tocopy;
@@ -196,8 +196,8 @@ void KAudioRecordStream::start( int samplingRate, int bits, int channels )
d->receiver_base = new KByteSoundReceiver( samplingRate, bits, channels, d->title.local8Bit() );
d->receiver = Arts::ByteSoundReceiver::_from_base( d->receiver_base );
- connect( d->receiver_base, SIGNAL( data( const char *, unsigned int ) ),
- SLOT( slotData( const char *, unsigned int ) ) );
+ connect( d->receiver_base, TQT_SIGNAL( data( const char *, unsigned int ) ),
+ TQT_SLOT( slotData( const char *, unsigned int ) ) );
Arts::connect( d->convert, "outdata", d->receiver, "indata" );
d->convert.start();
@@ -222,7 +222,7 @@ void KAudioRecordStream::slotRestartedServer() { }
void KAudioRecordStream::slotData( const char * contents, unsigned int size )
{
//kdDebug( 400 ) << k_funcinfo << endl;
- QByteArray * bytearray = new QByteArray( size );
+ TQByteArray * bytearray = new TQByteArray( size );
// copy the contents to the bytearray
// this has to be deleted later
bytearray->duplicate( contents, size );
diff --git a/arts/kde/kaudiorecordstream.h b/arts/kde/kaudiorecordstream.h
index 9f8097676..fdd4353fe 100644
--- a/arts/kde/kaudiorecordstream.h
+++ b/arts/kde/kaudiorecordstream.h
@@ -25,7 +25,7 @@
#ifndef _KAUDIORECORDSTREAM__H
#define _KAUDIORECORDSTREAM__H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -51,7 +51,7 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject
* @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears.
* @param name The name of the stream.
*/
- KAudioRecordStream( KArtsServer * server, const QString & title, QObject * parent = 0, const char * name = 0 );
+ KAudioRecordStream( KArtsServer * server, const TQString & title, TQObject * parent = 0, const char * name = 0 );
~KAudioRecordStream();
@@ -137,12 +137,12 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject
signals:
/**
* Data from the aRts server has arrived. You should copy the data
- * because the passed QByteArray will be deleted right after
+ * because the passed TQByteArray will be deleted right after
* returning from your slot(s).
*
* @param data the data from the server
*/
- void data( QByteArray & data );
+ void data( TQByteArray & data );
/**
* Wether this RecordStream is recording or not.
diff --git a/arts/kde/kaudiorecordstream_p.h b/arts/kde/kaudiorecordstream_p.h
index f2899519a..1d38b2278 100644
--- a/arts/kde/kaudiorecordstream_p.h
+++ b/arts/kde/kaudiorecordstream_p.h
@@ -26,9 +26,9 @@
#include <soundserver.h>
#include <stdsynthmodule.h>
-#include <qobject.h>
+#include <tqobject.h>
-class KByteSoundReceiver : public QObject,
+class KByteSoundReceiver : public TQObject,
public Arts::ByteSoundReceiver_skel,
public Arts::StdSynthModule
{
diff --git a/arts/kde/kconverttest.cc b/arts/kde/kconverttest.cc
index 25cb02e4c..5382e2095 100644
--- a/arts/kde/kconverttest.cc
+++ b/arts/kde/kconverttest.cc
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include <klocale.h>
#include <kaboutdata.h>
@@ -81,13 +81,13 @@ int main(int argc, char **argv)
// converter.setup(44100);
converter.requestPlayObject(url);
- QObject::connect(&converter, SIGNAL(rawStreamStart()), get, SLOT(slotRawStreamStart()));
+ TQObject::connect(&converter, TQT_SIGNAL(rawStreamStart()), get, TQT_SLOT(slotRawStreamStart()));
- QObject::connect(&converter, SIGNAL(newBlockSize(long)), get, SLOT(slotNewBlockSize(long)));
- QObject::connect(&converter, SIGNAL(newBlockPointer(long)), get, SLOT(slotNewBlockPointer(long)));
- QObject::connect(&converter, SIGNAL(newData()), get, SLOT(slotNewData()));
+ TQObject::connect(&converter, TQT_SIGNAL(newBlockSize(long)), get, TQT_SLOT(slotNewBlockSize(long)));
+ TQObject::connect(&converter, TQT_SIGNAL(newBlockPointer(long)), get, TQT_SLOT(slotNewBlockPointer(long)));
+ TQObject::connect(&converter, TQT_SIGNAL(newData()), get, TQT_SLOT(slotNewData()));
- QObject::connect(&converter, SIGNAL(rawStreamFinished()), get, SLOT(slotRawStreamFinished()));
+ TQObject::connect(&converter, TQT_SIGNAL(rawStreamFinished()), get, TQT_SLOT(slotRawStreamFinished()));
converter.start();
diff --git a/arts/kde/kconverttest.h b/arts/kde/kconverttest.h
index 60847b0aa..1d0b10f87 100644
--- a/arts/kde/kconverttest.h
+++ b/arts/kde/kconverttest.h
@@ -22,7 +22,7 @@
#ifndef KCONVERTTEST_H
#define KCONVERTTEST_H
-#include <qobject.h>
+#include <tqobject.h>
class KConvertTest : public QObject
{
diff --git a/arts/kde/kdatarequest_impl.h b/arts/kde/kdatarequest_impl.h
index 07522f0f1..7d90c8b73 100644
--- a/arts/kde/kdatarequest_impl.h
+++ b/arts/kde/kdatarequest_impl.h
@@ -22,14 +22,14 @@
#ifndef KDATAREQUEST_IMPL
#define KDATAREQUEST_IMPL
-#include <qobject.h>
+#include <tqobject.h>
#include "artskde.h"
#include "stdsynthmodule.h"
namespace Arts
{
-class KDataRequest_impl : public QObject, virtual public KDataRequest_skel,
+class KDataRequest_impl : public TQObject, virtual public KDataRequest_skel,
virtual public StdSynthModule
{
Q_OBJECT
diff --git a/arts/kde/kioinputstream_impl.cpp b/arts/kde/kioinputstream_impl.cpp
index b82764931..f7df6347c 100644
--- a/arts/kde/kioinputstream_impl.cpp
+++ b/arts/kde/kioinputstream_impl.cpp
@@ -34,8 +34,8 @@
#include <kio/job.h>
#include <kio/kmimetype.h>
#include <kio/jobclasses.h>
-#include <qtimer.h>
-#include <qdatastream.h>
+#include <tqtimer.h>
+#include <tqdatastream.h>
#include "artsversion.h"
#include "kioinputstream_impl.moc"
@@ -78,16 +78,16 @@ void KIOInputStream_impl::streamStart()
m_job = KIO::get(m_url, false, false);
m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg");
- m_job->addMetaData("UserAgent", QString::fromLatin1("aRts/") + QString::fromLatin1(ARTS_VERSION));
+ m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION));
- QObject::connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- QObject::connect(m_job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotResult(KIO::Job *)));
- QObject::connect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
- this, SLOT(slotScanMimeType(KIO::Job *, const QString &)));
- QObject::connect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
- this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
+ TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ TQObject::connect(m_job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotResult(KIO::Job *)));
+ TQObject::connect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &)));
+ TQObject::connect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
+ this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
m_streamStarted = true;
}
@@ -98,14 +98,14 @@ void KIOInputStream_impl::streamEnd()
if(m_job != 0)
{
- QObject::disconnect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- QObject::disconnect(m_job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotResult(KIO::Job *)));
- QObject::disconnect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
- this, SLOT(slotScanMimeType(KIO::Job *, const QString &)));
- QObject::disconnect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
- this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
+ TQObject::disconnect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ TQObject::disconnect(m_job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotResult(KIO::Job *)));
+ TQObject::disconnect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &)));
+ TQObject::disconnect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)),
+ this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t)));
if ( m_streamPulled )
outdata.endPull();
@@ -124,12 +124,12 @@ bool KIOInputStream_impl::openURL(const std::string& url)
return true;
}
-void KIOInputStream_impl::slotData(KIO::Job *, const QByteArray &data)
+void KIOInputStream_impl::slotData(KIO::Job *, const TQByteArray &data)
{
if(m_finished)
m_finished = false;
- QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
+ TQDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
dataStream.writeRawBytes(data.data(), data.size());
//kdDebug( 400 ) << "STREAMING: buffersize = " << m_data.size() << " bytes" << endl;
@@ -151,7 +151,7 @@ void KIOInputStream_impl::slotResult(KIO::Job *job)
}
}
-void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const QString &mimetype)
+void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const TQString &mimetype)
{
kdDebug( 400 ) << "got mimetype: " << mimetype << endl;
emit mimeTypeFound(mimetype);
diff --git a/arts/kde/kioinputstream_impl.h b/arts/kde/kioinputstream_impl.h
index 95daac169..5377fc808 100644
--- a/arts/kde/kioinputstream_impl.h
+++ b/arts/kde/kioinputstream_impl.h
@@ -22,8 +22,8 @@
#ifndef KIOINPUTSTREAM_IMPL
#define KIOINPUTSTREAM_IMPL
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <kio/jobclasses.h>
#include <kurl.h>
#include "artskde.h"
@@ -31,7 +31,7 @@
namespace Arts {
-class KIOInputStream_impl : public QObject, virtual public KIOInputStream_skel,
+class KIOInputStream_impl : public TQObject, virtual public KIOInputStream_skel,
virtual public InputStream_skel,
virtual public StdSynthModule
{
@@ -59,18 +59,18 @@ public:
long packetSize() { return m_packetSize; }
signals:
- void mimeTypeFound(const QString & mimetype);
+ void mimeTypeFound(const TQString & mimetype);
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
- void slotScanMimeType(KIO::Job *, const QString &mimetype);
+ void slotScanMimeType(KIO::Job *, const TQString &mimetype);
void slotTotalSize(KIO::Job *, KIO::filesize_t size);
private:
KURL m_url;
KIO::TransferJob *m_job;
- QByteArray m_data;
+ TQByteArray m_data;
bool m_finished;
bool m_firstBuffer;
bool m_streamStarted;
diff --git a/arts/kde/kplayobject.cc b/arts/kde/kplayobject.cc
index af37735cb..becb20a58 100644
--- a/arts/kde/kplayobject.cc
+++ b/arts/kde/kplayobject.cc
@@ -24,13 +24,13 @@
#include "kplayobjectcreator.h"
#include <kdebug.h>
-KPlayObject::KPlayObject() : QObject()
+KPlayObject::KPlayObject() : TQObject()
{
m_playObject = Arts::PlayObject::null();
m_isStream = false;
}
-KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : QObject()
+KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : TQObject()
{
m_playObject = playobject;
m_isStream = isStream;
@@ -63,9 +63,9 @@ void KPlayObject::halt()
object().halt();
}
-QString KPlayObject::description()
+TQString KPlayObject::description()
{
- return QString::fromLatin1(object().description().c_str());
+ return TQString::fromLatin1(object().description().c_str());
}
Arts::poTime KPlayObject::currentTime()
@@ -83,9 +83,9 @@ Arts::poCapabilities KPlayObject::capabilities()
return object().capabilities();
}
-QString KPlayObject::mediaName()
+TQString KPlayObject::mediaName()
{
- return QString::fromLatin1(object().mediaName().c_str());
+ return TQString::fromLatin1(object().mediaName().c_str());
}
Arts::poState KPlayObject::state()
@@ -131,14 +131,14 @@ struct KDE::PlayObject::PrivateData
KURL url;
};
-KDE::PlayObject::PlayObject() : QObject()
+KDE::PlayObject::PlayObject() : TQObject()
{
m_playObject = Arts::PlayObject::null();
m_isStream = false;
d = new PrivateData;
}
-KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObject()
+KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : TQObject()
{
m_playObject = playobject;
m_isStream = isStream;
@@ -150,7 +150,7 @@ KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObjec
//emit playObjectCreated();
}
-KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : QObject()
+KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : TQObject()
{
kdDebug( 400 ) << "KDE::PlayObject: created as proxy for URL " << url.url()<< endl;
@@ -179,7 +179,7 @@ void KDE::PlayObject::play()
if ( d->creator )
delete d->creator;
d->creator = new KDE::PlayObjectCreator( d->server );
- d->creator->create( d->url, d->createBUS, this, SLOT( attachPlayObject( Arts::PlayObject ) ) );
+ d->creator->create( d->url, d->createBUS, this, TQT_SLOT( attachPlayObject( Arts::PlayObject ) ) );
kdDebug( 400 ) << "KDE::PlayObject::play(): creator called" << endl;
d->internalState = Arts::posPlaying;
}
@@ -239,11 +239,11 @@ void KDE::PlayObject::halt()
d->internalState = Arts::posIdle;
}
-QString KDE::PlayObject::description()
+TQString KDE::PlayObject::description()
{
if ( object().isNull() )
- return QString();
- return QString::fromLatin1(object().description().c_str());
+ return TQString();
+ return TQString::fromLatin1(object().description().c_str());
}
Arts::poTime KDE::PlayObject::currentTime()
@@ -267,11 +267,11 @@ Arts::poCapabilities KDE::PlayObject::capabilities()
return object().capabilities();
}
-QString KDE::PlayObject::mediaName()
+TQString KDE::PlayObject::mediaName()
{
if ( object().isNull() )
- return QString();
- return QString::fromLatin1(object().mediaName().c_str());
+ return TQString();
+ return TQString::fromLatin1(object().mediaName().c_str());
}
Arts::poState KDE::PlayObject::state()
diff --git a/arts/kde/kplayobject.h b/arts/kde/kplayobject.h
index 959e46810..907723cf3 100644
--- a/arts/kde/kplayobject.h
+++ b/arts/kde/kplayobject.h
@@ -25,7 +25,7 @@
#include "kmedia2.h"
#include "soundserver.h"
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
class KDE_EXPORT KPlayObject : public QObject
{
@@ -84,7 +84,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
- QString description();
+ TQString description();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -104,7 +104,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
- QString mediaName();
+ TQString mediaName();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -163,7 +163,7 @@ class PlayObjectFactory;
* This has some side effects that developers need to be aware of:
* Until the real Arts::PlayObject got created,
* - the capabilities() method returns "zero" capabilities,
- * - description() and mediaName() will return a null QString,
+ * - description() and mediaName() will return a null TQString,
* - currentTime() and overallTime() will return "zero",
* - despite the fact that isNull() returns "false", object().isNull()
* will return "true". If you need to directly access methods of the
@@ -239,7 +239,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
- QString description();
+ TQString description();
/**
* Reimplemented (Arts::PlayObject Wrapper)
@@ -260,7 +260,7 @@ public:
/**
* Reimplemented (Arts::PlayObject Wrapper)
*/
- QString mediaName();
+ TQString mediaName();
/**
* returns the internal state of the PlayObject. The state can be
@@ -293,7 +293,7 @@ private:
/* private constructors, to prevent instantiation and copying */
PlayObject();
- PlayObject( const PlayObject& ) : QObject() {};
+ PlayObject( const PlayObject& ) : TQObject() {};
PlayObject(Arts::PlayObject playobject, bool isStream);
PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS );
diff --git a/arts/kde/kplayobjectcreator.cc b/arts/kde/kplayobjectcreator.cc
index 26b4308ab..b1969718e 100644
--- a/arts/kde/kplayobjectcreator.cc
+++ b/arts/kde/kplayobjectcreator.cc
@@ -25,7 +25,7 @@
#include "kplayobjectcreator.moc"
#include "kioinputstream_impl.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -38,13 +38,13 @@ KDE::PlayObjectCreator::~PlayObjectCreator()
{
}
-bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot)
+bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot)
{
// no need to go any further, and I hate deep indentation
if (m_server.isNull() || url.isEmpty() )
return false;
- connect( this, SIGNAL( playObjectCreated( Arts::PlayObject ) ),
+ connect( this, TQT_SIGNAL( playObjectCreated( Arts::PlayObject ) ),
receiver, slot );
// check if the URL is a local file
@@ -57,8 +57,8 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje
m_instream = Arts::KIOInputStream::_from_base(instream_impl);
// signal will be called once the ioslave knows the mime-type of the stream
- connect(instream_impl, SIGNAL(mimeTypeFound(const QString &)),
- this, SLOT(slotMimeType(const QString &)));
+ connect(instream_impl, TQT_SIGNAL(mimeTypeFound(const TQString &)),
+ this, TQT_SLOT(slotMimeType(const TQString &)));
// GO!
m_instream.openURL(url.url().latin1());
@@ -71,22 +71,22 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje
// usual stuff if we have a local file
KMimeType::Ptr mimetype = KMimeType::findByURL(url);
emit playObjectCreated (
- m_server.createPlayObjectForURL(std::string(QFile::encodeName(url.path())),
+ m_server.createPlayObjectForURL(std::string(TQFile::encodeName(url.path())),
std::string(mimetype->name().latin1()),
createBUS)
);
return true;
}
-void KDE::PlayObjectCreator::slotMimeType(const QString& mimetype)
+void KDE::PlayObjectCreator::slotMimeType(const TQString& mimetype)
{
kdDebug( 400 ) << "slotMimeType called: " << mimetype << endl;
- QString mimetype_copy = mimetype;
+ TQString mimetype_copy = mimetype;
if ( mimetype_copy == "application/octet-stream" )
- mimetype_copy = QString("audio/x-mp3");
+ mimetype_copy = TQString("audio/x-mp3");
if (mimetype_copy == "application/x-zerosize")
emit playObjectCreated(Arts::PlayObject::null());
diff --git a/arts/kde/kplayobjectcreator.h b/arts/kde/kplayobjectcreator.h
index 31b0a0b48..f012de2cd 100644
--- a/arts/kde/kplayobjectcreator.h
+++ b/arts/kde/kplayobjectcreator.h
@@ -23,7 +23,7 @@
#define KPLAYOBJECTCREATOR_H
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "soundserver.h"
#include "kioinputstream_impl.h"
@@ -36,13 +36,13 @@ public:
PlayObjectCreator(Arts::SoundServerV2 server);
~PlayObjectCreator();
- bool create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot);
+ bool create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot);
signals:
void playObjectCreated(Arts::PlayObject playObject);
private slots:
- void slotMimeType(const QString &mimetype);
+ void slotMimeType(const TQString &mimetype);
private:
Arts::SoundServerV2 m_server;
diff --git a/arts/kde/kplayobjectfactory.cc b/arts/kde/kplayobjectfactory.cc
index ea0218746..99a2e2edb 100644
--- a/arts/kde/kplayobjectfactory.cc
+++ b/arts/kde/kplayobjectfactory.cc
@@ -29,7 +29,7 @@
#include "kartsdispatcher.h"
#include "kartsserver.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include "kaudiomanagerplay.h"
#include <flowsystem.h>
@@ -62,7 +62,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& url, bool createBU
}
-KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS)
+KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
{
// WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS?
// I hate it
@@ -84,7 +84,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QStrin
return new KPlayObject(m_server.createPlayObjectForStream(instream, string("audio/x-mp3"), createBUS), true);
}
else
- return new KPlayObject(m_server.createPlayObjectForURL(string(QFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false);
+ return new KPlayObject(m_server.createPlayObjectForURL(string(TQFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false);
}
else
return new KPlayObject();
@@ -133,7 +133,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& url, bool
return createPlayObject(url, mimetype->name(), createBUS);
}
-KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS)
+KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS)
{
// WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS?
// I hate it
@@ -158,7 +158,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) )
{
// we rely on the delivered mimetype if it's a local file
- d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( QFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
+ d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
}
else
{
@@ -179,7 +179,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
d->helper->po = d->playObj;
d->helper->ap = d->amanPlay;
if( d->playObj->object().isNull() && d->amanPlay )
- QObject::connect( d->playObj, SIGNAL( playObjectCreated() ), d->helper, SLOT( connectAmanPlay() ) );
+ TQObject::connect( d->playObj, TQT_SIGNAL( playObjectCreated() ), d->helper, TQT_SLOT( connectAmanPlay() ) );
else
d->helper->connectAmanPlay();
}
@@ -187,13 +187,13 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
return d->playObj;
}
-QStringList KDE::PlayObjectFactory::mimeTypes(void)
+TQStringList KDE::PlayObjectFactory::mimeTypes(void)
{
KArtsDispatcher dispatcher; // we need such a thing, otherwise we crash
Arts::TraderQuery query;
vector<Arts::TraderOffer> *offers = query.query();
- QStringList results;
+ TQStringList results;
for(vector<Arts::TraderOffer>::iterator offer = offers->begin();
offer != offers->end(); ++offer)
{
@@ -202,7 +202,7 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void)
for(vector<string>::iterator mimetype = mimetypes->begin();
mimetype != mimetypes->end(); ++mimetype)
{
- QString name = QString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace();
+ TQString name = TQString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace();
if(KMimeType::mimeType(name))
results.append(name);
}
@@ -213,9 +213,9 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void)
// clean out duplicates
results.sort();
- for(QStringList::iterator result = results.begin(); result != results.end(); )
+ for(TQStringList::iterator result = results.begin(); result != results.end(); )
{
- QStringList::iterator previous = result;
+ TQStringList::iterator previous = result;
++result;
if(result != results.end() && *result == *previous)
{
diff --git a/arts/kde/kplayobjectfactory.h b/arts/kde/kplayobjectfactory.h
index 2f9c096fc..690a9e1b8 100644
--- a/arts/kde/kplayobjectfactory.h
+++ b/arts/kde/kplayobjectfactory.h
@@ -51,7 +51,7 @@ public:
~KPlayObjectFactory();
KPlayObject *createPlayObject(const KURL& url, bool createBUS);
- KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
+ KPlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS);
void setAllowStreaming(bool s) { m_allowStreaming = s; }
bool allowStreaming() { return m_allowStreaming; }
@@ -76,7 +76,7 @@ class POFHelper;
* use the KDE multimedia framework can be found in the documentation
* for KDE::PlayObject.
*/
-class KDE_EXPORT PlayObjectFactory// : public QObject ### for KDE4 make it a QObject to be able to receive signals
+class KDE_EXPORT PlayObjectFactory// : public TQObject ### for KDE4 make it a TQObject to be able to receive signals
{
public:
/**
@@ -116,7 +116,7 @@ public:
* This method also creates a KDE::PlayObject, but does no automatic
* mimetype detection. Use this method with care.
*/
- KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
+ KDE::PlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS);
/**
* setAllowStreaming( true ) allows the factory to create a
@@ -134,7 +134,7 @@ public:
/**
* Return the mimetypes that are playable
*/
- static QStringList mimeTypes(void);
+ static TQStringList mimeTypes(void);
/*private slots: ### KDE4 and remove Helper class
void connectAmanPlay();*/
diff --git a/arts/kde/kplayobjectfactory_p.h b/arts/kde/kplayobjectfactory_p.h
index 21ea4c4e9..f81349251 100644
--- a/arts/kde/kplayobjectfactory_p.h
+++ b/arts/kde/kplayobjectfactory_p.h
@@ -20,7 +20,7 @@
#ifndef KPLAYOBJECTFACTORY_P_H
#define KPLAYOBJECTFACTORY_P_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kplayobjectfactory.h"
namespace KDE
diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp
index 2b0fbd66b..6aeeb8e8f 100644
--- a/arts/kde/kvideowidget.cpp
+++ b/arts/kde/kvideowidget.cpp
@@ -16,8 +16,8 @@
#ifdef HAVE_USLEEP
#include <unistd.h>
#endif
-#include <qaccel.h>
-#include <qcursor.h>
+#include <tqaccel.h>
+#include <tqcursor.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
@@ -49,7 +49,7 @@ KFullscreenVideoWidget::KFullscreenVideoWidget( KVideoWidget *parent, const char
{
this->videoWidget = parent;
setEraseColor( black );
- setCursor(QCursor(Qt::BlankCursor));
+ setCursor(TQCursor(Qt::BlankCursor));
}
void KFullscreenVideoWidget::windowActivationChange( bool )
@@ -73,18 +73,18 @@ bool KFullscreenVideoWidget::x11Event( XEvent *event )
return false;
}
-KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent, const char *name, WFlags f )
+KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent, const char *name, WFlags f )
: KXMLGUIClient( clientParent ),
- QWidget( parent, name, f )
+ TQWidget( parent, name, f )
{
init();
// ???
- QString toolbarName = i18n("Video Toolbar");
- setXML(QString("<!DOCTYPE kpartgui>\n<kpartgui name=\"kvideowidget\" version=\"1\"><MenuBar><Menu name=\"edit\"><Separator/><Action name=\"double_size\"/><Action name=\"normal_size\"/><Action name=\"half_size\"/><Separator/><Action name=\"fullscreen_mode\"/></Menu></MenuBar><Toolbar name=\"VideoToolbar\"><text>Video Toolbar</text><Action name=\"fullscreen_mode\"/></Toolbar></kpartgui>"), true);
+ TQString toolbarName = i18n("Video Toolbar");
+ setXML(TQString("<!DOCTYPE kpartgui>\n<kpartgui name=\"kvideowidget\" version=\"1\"><MenuBar><Menu name=\"edit\"><Separator/><Action name=\"double_size\"/><Action name=\"normal_size\"/><Action name=\"half_size\"/><Separator/><Action name=\"fullscreen_mode\"/></Menu></MenuBar><Toolbar name=\"VideoToolbar\"><text>Video Toolbar</text><Action name=\"fullscreen_mode\"/></Toolbar></kpartgui>"), true);
}
-KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f )
- : QWidget( parent, name, f )
+KVideoWidget::KVideoWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQWidget( parent, name, f )
{
init();
}
@@ -92,7 +92,7 @@ KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f )
void KVideoWidget::init(void)
{
setMinimumSize(0, 0);
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
setFocusPolicy( ClickFocus );
fullscreenWidget = 0;
@@ -102,16 +102,16 @@ void KVideoWidget::init(void)
// Setup actions
new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen",
- CTRL+SHIFT+Key_F, this, SLOT(fullscreenActivated()),
+ CTRL+SHIFT+Key_F, this, TQT_SLOT(fullscreenActivated()),
actionCollection(), "fullscreen_mode" );
new KRadioAction( i18n("&Half Size"), ALT+Key_0,
- this, SLOT(halfSizeActivated()),
+ this, TQT_SLOT(halfSizeActivated()),
actionCollection(), "half_size" );
new KRadioAction( i18n("&Normal Size"), ALT+Key_1,
- this, SLOT(normalSizeActivated()),
+ this, TQT_SLOT(normalSizeActivated()),
actionCollection(), "normal_size" );
new KRadioAction( i18n("&Double Size"), ALT+Key_2,
- this, SLOT(doubleSizeActivated()),
+ this, TQT_SLOT(doubleSizeActivated()),
actionCollection(), "double_size" );
((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
@@ -189,7 +189,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo )
action("fullscreen_mode")->setEnabled(enable);
}
-QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
+TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
Window root;
@@ -199,7 +199,7 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
int x, y;
if (vpo.isNull() || (long)(pixmap = vpo.x11Snapshot()) == -1)
- return QImage();
+ return TQImage();
// Get 32bit RGBA image data (stored in 1bpp pixmap)
XGetGeometry( qt_xdisplay(), pixmap, &root, &x, &y, &width, &height, &border, &depth );
@@ -209,11 +209,11 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
if (xImage == 0)
{
XFreePixmap( qt_xdisplay(), pixmap );
- return QImage();
+ return TQImage();
}
// Convert 32bit RGBA image data into Qt image
- QImage qImage = QImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, QImage::IgnoreEndian ).copy();
+ TQImage qImage = TQImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, TQImage::IgnoreEndian ).copy();
// Free X11 resources and return Qt image
XDestroyImage( xImage );
@@ -286,9 +286,9 @@ void KVideoWidget::setDoubleSize()
doubleSizeActivated();
}
-QSize KVideoWidget::sizeHint() const
+TQSize KVideoWidget::sizeHint() const
{
- return QSize( videoWidth, videoHeight );
+ return TQSize( videoWidth, videoHeight );
}
int KVideoWidget::heightForWidth( int w ) const
@@ -299,9 +299,9 @@ int KVideoWidget::heightForWidth( int w ) const
return int( double(w)*double(videoHeight)/double(videoWidth) );
}
-void KVideoWidget::mousePressEvent( QMouseEvent *event )
+void KVideoWidget::mousePressEvent( TQMouseEvent *event )
{
- QPoint pos = mapToGlobal( event->pos() );
+ TQPoint pos = mapToGlobal( event->pos() );
emit mouseButtonPressed( event->button(), pos, event->state() );
@@ -310,14 +310,14 @@ void KVideoWidget::mousePressEvent( QMouseEvent *event )
emit rightButtonPressed( pos );
}
-void KVideoWidget::mouseDoubleClickEvent( QMouseEvent *event )
+void KVideoWidget::mouseDoubleClickEvent( TQMouseEvent *event )
{
emit mouseButtonDoubleClick( mapToGlobal( event->pos() ), event->state() );
}
-void KVideoWidget::resizeEvent( QResizeEvent *event )
+void KVideoWidget::resizeEvent( TQResizeEvent *event )
{
- QWidget::resizeEvent( event );
+ TQWidget::resizeEvent( event );
if (width() > minimumWidth() || height() > minimumHeight())
{
@@ -379,20 +379,20 @@ void KVideoWidget::fullscreenActivated()
fullscreenWidget = new KFullscreenVideoWidget( this );
// Interconnect mouse button signals
- connect( fullscreenWidget, SIGNAL(mouseButtonPressed( int, const QPoint &, int )),
- this, SIGNAL(mouseButtonPressed( int, const QPoint &, int)) );
+ connect( fullscreenWidget, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int )),
+ this, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int)) );
- connect( fullscreenWidget, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )),
- this, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )) );
+ connect( fullscreenWidget, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )),
+ this, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )) );
// ### Remove in KDE4
- connect( fullscreenWidget, SIGNAL(rightButtonPressed(const QPoint &)),
- this, SIGNAL(rightButtonPressed(const QPoint &)) );
+ connect( fullscreenWidget, TQT_SIGNAL(rightButtonPressed(const TQPoint &)),
+ this, TQT_SIGNAL(rightButtonPressed(const TQPoint &)) );
// Leave fullscreen mode with <Escape> key
- QAccel *a = new QAccel( fullscreenWidget );
+ TQAccel *a = new TQAccel( fullscreenWidget );
a->connectItem( a->insertItem( Key_Escape ),
- this, SLOT(setWindowed()) );
+ this, TQT_SLOT(setWindowed()) );
fullscreenWidget->setFocus();
fullscreenWidget->showFullScreen();
diff --git a/arts/kde/kvideowidget.h b/arts/kde/kvideowidget.h
index f314267ca..0e3881a93 100644
--- a/arts/kde/kvideowidget.h
+++ b/arts/kde/kvideowidget.h
@@ -11,24 +11,24 @@
#ifndef ARTSKDE_KVIDEOWIDGET_H
#define ARTSKDE_KVIDEOWIDGET_H
-#include <qevent.h>
-#include <qimage.h>
-#include <qwidget.h>
+#include <tqevent.h>
+#include <tqimage.h>
+#include <tqwidget.h>
#include <kmedia2.h>
#include <kxmlguiclient.h>
-class KDE_ARTS_EXPORT KVideoWidget : public QWidget, virtual public KXMLGUIClient
+class KDE_ARTS_EXPORT KVideoWidget : public TQWidget, virtual public KXMLGUIClient
{
Q_OBJECT
public:
- KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
- KVideoWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KVideoWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
virtual ~KVideoWidget();
void embed( Arts::VideoPlayObject vpo );
- static QImage snapshot( Arts::VideoPlayObject vpo );
+ static TQImage snapshot( Arts::VideoPlayObject vpo );
bool isEmbedded();
bool isFullscreen();
@@ -36,14 +36,14 @@ public:
bool isNormalSize();
bool isDoubleSize();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
virtual int heightForWidth ( int w ) const;
protected:
- virtual void mousePressEvent( QMouseEvent *event );
- virtual void mouseDoubleClickEvent( QMouseEvent *event);
- virtual void resizeEvent( QResizeEvent *event );
+ virtual void mousePressEvent( TQMouseEvent *event );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *event);
+ virtual void resizeEvent( TQResizeEvent *event );
virtual bool x11Event( XEvent *event );
public slots:
@@ -63,17 +63,17 @@ protected slots:
signals:
void adaptSize( int width, int height );
- void mouseButtonPressed( int type, const QPoint &, int state );
- void mouseButtonDoubleClick( const QPoint &, int state );
+ void mouseButtonPressed( int type, const TQPoint &, int state );
+ void mouseButtonDoubleClick( const TQPoint &, int state );
/**
* @deprecated
- * use mouseButtonPressed( int type, const QPoint & ) instead.
+ * use mouseButtonPressed( int type, const TQPoint & ) instead.
*/
- void rightButtonPressed( const QPoint & );
+ void rightButtonPressed( const TQPoint & );
private:
void init(void);
- QWidget *fullscreenWidget;
+ TQWidget *fullscreenWidget;
int videoWidth;
int videoHeight;
Arts::VideoPlayObject poVideo;
diff --git a/arts/kde/mcop-dcop/kmcop.cpp b/arts/kde/mcop-dcop/kmcop.cpp
index 22e19dc9d..1eb14f0f3 100644
--- a/arts/kde/mcop-dcop/kmcop.cpp
+++ b/arts/kde/mcop-dcop/kmcop.cpp
@@ -23,8 +23,8 @@
#include <klocale.h>
#include <dcopclient.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
#include <kartsdispatcher.h>
#include <soundserver.h>
@@ -43,7 +43,7 @@ class KMCOPPrivate
{
public:
MCOPInfo mcopInfo;
- QPtrList<MCOPDCOPObject> list;
+ TQPtrList<MCOPDCOPObject> list;
};
int main(int argc, char **argv)
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
return app.exec();
}
-KMCOP::KMCOP() : QObject(), DCOPObject("arts")
+KMCOP::KMCOP() : TQObject(), DCOPObject("arts")
{
d = new KMCOPPrivate();
d->mcopInfo = Reference("global:Arts_MCOPInfo");
@@ -91,10 +91,10 @@ int KMCOP::objectCount()
return d->mcopInfo.objectCount();
}
-QCString KMCOP::correctType(const QCString &str)
+TQCString KMCOP::correctType(const TQCString &str)
{
if(str == "string")
- return "QCString";
+ return "TQCString";
return str;
}
@@ -106,7 +106,7 @@ void KMCOP::addInterfacesHackHackHack()
if(!obj.isNull())
{
- QCString interfaceName = obj._interfaceName().c_str();
+ TQCString interfaceName = obj._interfaceName().c_str();
if(interfaceName != "Arts::TraderOffer")
{
@@ -121,21 +121,21 @@ void KMCOP::addInterfacesHackHackHack()
vector<MethodDef>::iterator ifaceMethodsIterator;
for(ifaceMethodsIterator = ifaceMethods.begin(); ifaceMethodsIterator != ifaceMethods.end(); ifaceMethodsIterator++)
{
- QCString function, signature;
+ TQCString function, signature;
MCOPEntryInfo *entry = new MCOPEntryInfo();
MethodDef currentMethod = *ifaceMethodsIterator;
vector<ParamDef> currentParameters = currentMethod.signature;
- QCString newType = correctType(QCString(currentMethod.type.c_str()));
+ TQCString newType = correctType(TQCString(currentMethod.type.c_str()));
entry->setFunctionType(newType);
- entry->setFunctionName(QCString(currentMethod.name.c_str()));
+ entry->setFunctionName(TQCString(currentMethod.name.c_str()));
- function = entry->functionType() + QCString(" ") + entry->functionName() + QCString("(");
+ function = entry->functionType() + TQCString(" ") + entry->functionName() + TQCString("(");
- signature = QCString("(");
+ signature = TQCString("(");
QCStringList signatureList;
@@ -145,20 +145,20 @@ void KMCOP::addInterfacesHackHackHack()
ParamDef parameter = *methodParametersIterator;
if(methodParametersIterator != currentParameters.begin())
{
- function += QCString(", ");
- signature += QCString(",");
+ function += TQCString(", ");
+ signature += TQCString(",");
}
- QCString correctParameter = correctType(QCString(parameter.type.c_str()));
+ TQCString correctParameter = correctType(TQCString(parameter.type.c_str()));
function += correctParameter;
signature += correctParameter;
- signatureList.append(QCString(parameter.type.c_str()));
+ signatureList.append(TQCString(parameter.type.c_str()));
}
- function += QCString(")");
- signature += QCString(")");
+ function += TQCString(")");
+ signature += TQCString(")");
entry->setSignature(signature);
entry->setSignatureList(signatureList);
diff --git a/arts/kde/mcop-dcop/kmcop.h b/arts/kde/mcop-dcop/kmcop.h
index c81e385ff..5ffa57bcd 100644
--- a/arts/kde/mcop-dcop/kmcop.h
+++ b/arts/kde/mcop-dcop/kmcop.h
@@ -20,13 +20,13 @@
#ifndef KMCOP_H
#define KMCOP_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
class KMCOPPrivate;
-class KMCOP : public QObject,
+class KMCOP : public TQObject,
public DCOPObject
{
Q_OBJECT
@@ -41,7 +41,7 @@ k_dcop:
void addInterfacesHackHackHack();
private:
- QCString correctType(const QCString &str);
+ TQCString correctType(const TQCString &str);
KMCOPPrivate *d;
};
diff --git a/arts/kde/mcop-dcop/mcopdcopobject.cpp b/arts/kde/mcop-dcop/mcopdcopobject.cpp
index f1d1acad5..fcd5be95f 100644
--- a/arts/kde/mcop-dcop/mcopdcopobject.cpp
+++ b/arts/kde/mcop-dcop/mcopdcopobject.cpp
@@ -23,8 +23,8 @@
//#include <reference.h>
#include <dynamicrequest.h>
-#include <qmap.h>
-#include <qdatastream.h>
+#include <tqmap.h>
+#include <tqdatastream.h>
using namespace std;
@@ -34,10 +34,10 @@ using namespace std;
class MCOPDCOPObjectPrivate
{
public:
- QMap<QCString, MCOPEntryInfo *> dynamicFunctions;
+ TQMap<TQCString, MCOPEntryInfo *> dynamicFunctions;
};
-MCOPDCOPObject::MCOPDCOPObject(QCString name) : DCOPObject(name)
+MCOPDCOPObject::MCOPDCOPObject(TQCString name) : DCOPObject(name)
{
d = new MCOPDCOPObjectPrivate();
}
@@ -51,14 +51,14 @@ QCStringList MCOPDCOPObject::functionsDynamic()
{
QCStringList returnList;
- QMap<QCString, MCOPEntryInfo *>::iterator it;
+ TQMap<TQCString, MCOPEntryInfo *>::iterator it;
for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it)
returnList.append(it.key());
return returnList;
}
-Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data)
+Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data)
{
Arts::Object workingObject = Arts::SubClass(string(ifaceName));
Arts::DynamicRequest request(workingObject);
@@ -71,11 +71,11 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN
QCStringList::iterator it;
for(it = list.begin(); it != list.end(); ++it)
{
- QCString param = *it;
+ TQCString param = *it;
kdDebug() << "PARAM: " << param << endl;
- QDataStream argStream(data, IO_ReadOnly);
+ TQDataStream argStream(data, IO_ReadOnly);
if(param == "long")
request.param(MCOPDCOPTools::getLong(argStream));
@@ -94,16 +94,16 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN
return newBuffer;
}
-bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)
+bool MCOPDCOPObject::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
{
- QMap<QCString, MCOPEntryInfo *>::iterator it;
+ TQMap<TQCString, MCOPEntryInfo *>::iterator it;
for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it)
{
MCOPEntryInfo *entry = it.data();
if((entry->functionName() + entry->signature()) == fun)
{
- QCString type = entry->functionType();
+ TQCString type = entry->functionType();
if(type == "void")
{
@@ -116,9 +116,9 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
}
else if(type == "string")
{
- replyType = "QCString";
+ replyType = "TQCString";
- QDataStream reply(replyData, IO_WriteOnly);
+ TQDataStream reply(replyData, IO_WriteOnly);
reply << "fooo!";
}
else if(type == "long")
@@ -135,7 +135,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
delete result;
}
- QDataStream reply(replyData, IO_WriteOnly);
+ TQDataStream reply(replyData, IO_WriteOnly);
reply << returnCode;
}
@@ -146,7 +146,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
return false;
}
-void MCOPDCOPObject::addDynamicFunction(QCString value, MCOPEntryInfo *entry)
+void MCOPDCOPObject::addDynamicFunction(TQCString value, MCOPEntryInfo *entry)
{
d->dynamicFunctions.insert(value, entry);
}
diff --git a/arts/kde/mcop-dcop/mcopdcopobject.h b/arts/kde/mcop-dcop/mcopdcopobject.h
index 4c7e70cf5..0b73451e1 100644
--- a/arts/kde/mcop-dcop/mcopdcopobject.h
+++ b/arts/kde/mcop-dcop/mcopdcopobject.h
@@ -22,10 +22,10 @@
#include <dcopobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
class MCOPDCOPObjectPrivate;
@@ -38,47 +38,47 @@ public:
~MCOPEntryInfo()
{ }
- QCString functionType()
+ TQCString functionType()
{ return m_functionType; }
- QCString functionName()
+ TQCString functionName()
{ return m_functionName; }
- QCString signature()
+ TQCString signature()
{ return m_signature; }
QCStringList signatureList()
{ return m_signatureList; }
- void setFunctionType(QCString s)
+ void setFunctionType(TQCString s)
{ m_functionType = s; }
- void setFunctionName(QCString s)
+ void setFunctionName(TQCString s)
{ m_functionName = s; }
- void setSignature(QCString s)
+ void setSignature(TQCString s)
{ m_signature = s; }
void setSignatureList(QCStringList s)
{ m_signatureList = s; }
private:
- QCString m_functionType, m_functionName, m_signature;
+ TQCString m_functionType, m_functionName, m_signature;
QCStringList m_signatureList;
};
class MCOPDCOPObject : public DCOPObject
{
public:
- MCOPDCOPObject(QCString name);
+ MCOPDCOPObject(TQCString name);
~MCOPDCOPObject();
- virtual bool processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData);
+ virtual bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData);
virtual QCStringList functionsDynamic();
- void addDynamicFunction(QCString value, MCOPEntryInfo *entry);
+ void addDynamicFunction(TQCString value, MCOPEntryInfo *entry);
- Arts::Buffer *callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data);
+ Arts::Buffer *callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data);
private:
MCOPDCOPObjectPrivate *d;
diff --git a/arts/kde/mcop-dcop/mcopdcoptools.h b/arts/kde/mcop-dcop/mcopdcoptools.h
index f1279111c..287a89456 100644
--- a/arts/kde/mcop-dcop/mcopdcoptools.h
+++ b/arts/kde/mcop-dcop/mcopdcoptools.h
@@ -22,12 +22,12 @@
#include <string>
-#include <qdatastream.h>
+#include <tqdatastream.h>
class MCOPDCOPTools
{
public:
- static long getLong(QDataStream &stream)
+ static long getLong(TQDataStream &stream)
{
long l;
stream << l;
@@ -35,9 +35,9 @@ public:
return l;
}
- static std::string getString(QDataStream &stream)
+ static std::string getString(TQDataStream &stream)
{
- QCString s;
+ TQCString s;
stream << s;
return std::string(s);
diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp
index 794ef3dcd..ea20608ba 100644
--- a/arts/knotify/knotify.cpp
+++ b/arts/knotify/knotify.cpp
@@ -37,10 +37,10 @@
#endif
// QT headers
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
// KDE headers
#include <dcopclient.h>
@@ -75,14 +75,14 @@ class KNotifyPrivate
public:
KConfig* globalEvents;
KConfig* globalConfig;
- QMap<QString, KConfig*> events;
- QMap<QString, KConfig*> configs;
- QString externalPlayer;
+ TQMap<TQString, KConfig*> events;
+ TQMap<TQString, KConfig*> configs;
+ TQString externalPlayer;
KProcess *externalPlayerProc;
#ifndef WITHOUT_ARTS
- QPtrList<KDE::PlayObject> playObjects;
- QMap<KDE::PlayObject*,int> playObjectEventMap;
+ TQPtrList<KDE::PlayObject> playObjects;
+ TQMap<KDE::PlayObject*,int> playObjectEventMap;
KAudioManagerPlay *audioManager;
#endif
int externalPlayerEventId;
@@ -90,9 +90,9 @@ public:
bool useExternal;
bool useArts;
int volume;
- QTimer *playTimer;
+ TQTimer *playTimer;
bool inStartup;
- QString startupEvents;
+ TQString startupEvents;
};
// Yes, it's ugly to put this here, but this facilitates the cautious startup
@@ -242,7 +242,7 @@ KDE_EXPORT int kdemain(int argc, char **argv)
}// end extern "C"
KNotify::KNotify( bool useArts )
- : QObject(), DCOPObject("Notify")
+ : TQObject(), DCOPObject("Notify")
{
d = new KNotifyPrivate;
d->globalEvents = new KConfig("knotify/eventsrc", true, false, "data");
@@ -255,7 +255,7 @@ KNotify::KNotify( bool useArts )
d->audioManager = 0;
if( useArts )
{
- connect( soundServer, SIGNAL( restartedServer() ), this, SLOT( restartedArtsd() ) );
+ connect( soundServer, TQT_SIGNAL( restartedServer() ), this, TQT_SLOT( restartedArtsd() ) );
restartedArtsd(); //started allready need to initialize d->audioManager
}
#endif
@@ -292,9 +292,9 @@ void KNotify::loadConfig() {
// try to locate a suitable player if none is configured
if ( d->externalPlayer.isEmpty() ) {
- QStringList players;
+ TQStringList players;
players << "wavplay" << "aplay" << "auplay";
- QStringList::Iterator it = players.begin();
+ TQStringList::Iterator it = players.begin();
while ( d->externalPlayer.isEmpty() && it != players.end() ) {
d->externalPlayer = KStandardDirs::findExe( *it );
++it;
@@ -313,28 +313,28 @@ void KNotify::reconfigure()
// clear loaded config files
d->globalConfig->reparseConfiguration();
- for ( QMapIterator<QString,KConfig*> it = d->configs.begin(); it != d->configs.end(); ++it )
+ for ( TQMapIterator<TQString,KConfig*> it = d->configs.begin(); it != d->configs.end(); ++it )
delete it.data();
d->configs.clear();
}
-void KNotify::notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+void KNotify::notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level)
{
notify( event, fromApp, text, sound, file, present, level, 0, 1 );
}
-void KNotify::notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+void KNotify::notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level, int winId)
{
notify( event, fromApp, text, sound, file, present, level, winId, 1 );
}
-void KNotify::notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+void KNotify::notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level, int winId, int eventId )
{
// kdDebug() << "event=" << event << " fromApp=" << fromApp << " text=" << text << " sound=" << sound <<
@@ -343,7 +343,7 @@ void KNotify::notify(const QString &event, const QString &fromApp,
d->startupEvents += "(" + event + ":" + fromApp + ")";
}
- QString commandline;
+ TQString commandline;
KConfig *eventsFile = NULL;
KConfig *configFile = NULL;
@@ -381,7 +381,7 @@ void KNotify::notify(const QString &event, const QString &fromApp,
// get sound file name
if( present & KNotifyClient::Sound ) {
- QString theSound = configFile->readPathEntry( "soundfile" );
+ TQString theSound = configFile->readPathEntry( "soundfile" );
if ( theSound.isEmpty() )
theSound = eventsFile->readPathEntry( "default_sound" );
if ( !theSound.isEmpty() )
@@ -390,7 +390,7 @@ void KNotify::notify(const QString &event, const QString &fromApp,
// get log file name
if( present & KNotifyClient::Logfile ) {
- QString theFile = configFile->readPathEntry( "logfile" );
+ TQString theFile = configFile->readPathEntry( "logfile" );
if ( theFile.isEmpty() )
theFile = eventsFile->readPathEntry( "default_logfile" );
if ( !theFile.isEmpty() )
@@ -410,13 +410,13 @@ void KNotify::notify(const QString &event, const QString &fromApp,
}
// emit event
- if ( present & KNotifyClient::Sound ) // && QFile(sound).isReadable()
+ if ( present & KNotifyClient::Sound ) // && TQFile(sound).isReadable()
notifyBySound( sound, fromApp, eventId );
if ( present & KNotifyClient::Execute )
notifyByExecute( commandline, event, fromApp, text, winId, eventId );
- if ( present & KNotifyClient::Logfile ) // && QFile(file).isWritable()
+ if ( present & KNotifyClient::Logfile ) // && TQFile(file).isWritable()
notifyByLogfile( text, file );
if ( present & KNotifyClient::Stderr )
@@ -430,16 +430,16 @@ void KNotify::notify(const QString &event, const QString &fromApp,
else if ( present & KNotifyClient::Messagebox )
notifyByMessagebox( text, level, checkWinId( fromApp, winId ));
- QByteArray qbd;
- QDataStream ds(qbd, IO_WriteOnly);
+ TQByteArray qbd;
+ TQDataStream ds(qbd, IO_WriteOnly);
ds << event << fromApp << text << sound << file << present << level
<< winId << eventId;
- emitDCOPSignal("notifySignal(QString,QString,QString,QString,QString,int,int,int,int)", qbd);
+ emitDCOPSignal("notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", qbd);
}
-bool KNotify::notifyBySound( const QString &sound, const QString &appname, int eventId )
+bool KNotify::notifyBySound( const TQString &sound, const TQString &appname, int eventId )
{
if (sound.isEmpty()) {
soundFinished( eventId, NoSoundFile );
@@ -448,10 +448,10 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e
bool external = d->useExternal && !d->externalPlayer.isEmpty();
// get file name
- QString soundFile(sound);
- if ( QFileInfo(sound).isRelative() )
+ TQString soundFile(sound);
+ if ( TQFileInfo(sound).isRelative() )
{
- QString search = QString("%1/sounds/%2").arg(appname).arg(sound);
+ TQString search = TQString("%1/sounds/%2").arg(appname).arg(sound);
soundFile = KGlobal::instance()->dirs()->findResource("data", search);
if ( soundFile.isEmpty() )
soundFile = locate( "sound", sound );
@@ -527,8 +527,8 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e
if ( !d->playTimer )
{
- d->playTimer = new QTimer( this );
- connect( d->playTimer, SIGNAL( timeout() ), SLOT( playTimeout() ) );
+ d->playTimer = new TQTimer( this );
+ connect( d->playTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( playTimeout() ) );
}
if ( !d->playTimer->isActive() )
d->playTimer->start( 1000 );
@@ -541,8 +541,8 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e
if (!proc)
{
proc = d->externalPlayerProc = new KProcess;
- connect( proc, SIGNAL( processExited( KProcess * )),
- SLOT( slotPlayerProcessExited( KProcess * )));
+ connect( proc, TQT_SIGNAL( processExited( KProcess * )),
+ TQT_SLOT( slotPlayerProcessExited( KProcess * )));
}
if (proc->isRunning())
{
@@ -550,7 +550,7 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e
return false; // Skip
}
proc->clearArguments();
- (*proc) << d->externalPlayer << QFile::encodeName( soundFile );
+ (*proc) << d->externalPlayer << TQFile::encodeName( soundFile );
d->externalPlayerEventId = eventId;
proc->start(KProcess::NotifyOnExit);
return true;
@@ -560,7 +560,7 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e
return false;
}
-bool KNotify::notifyByMessagebox(const QString &text, int level, WId winId)
+bool KNotify::notifyByMessagebox(const TQString &text, int level, WId winId)
{
// ignore empty messages
if ( text.isEmpty() )
@@ -586,17 +586,17 @@ bool KNotify::notifyByMessagebox(const QString &text, int level, WId winId)
return true;
}
-bool KNotify::notifyByPassivePopup( const QString &text,
- const QString &appName,
+bool KNotify::notifyByPassivePopup( const TQString &text,
+ const TQString &appName,
KConfig* eventsFile,
WId senderWinId )
{
KIconLoader iconLoader( appName );
if ( eventsFile != NULL ) {
KConfigGroup config( eventsFile, "!Global!" );
- QString iconName = config.readEntry( "IconName", appName );
- QPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small );
- QString title = config.readEntry( "Comment", appName );
+ TQString iconName = config.readEntry( "IconName", appName );
+ TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small );
+ TQString title = config.readEntry( "Comment", appName );
KPassivePopup::message(title, text, icon, senderWinId);
} else
kdError() << "No events for app " << appName << "defined!" <<endl;
@@ -604,18 +604,18 @@ bool KNotify::notifyByPassivePopup( const QString &text,
return true;
}
-bool KNotify::notifyByExecute(const QString &command, const QString& event,
- const QString& fromApp, const QString& text,
+bool KNotify::notifyByExecute(const TQString &command, const TQString& event,
+ const TQString& fromApp, const TQString& text,
int winId, int eventId) {
if (!command.isEmpty()) {
// kdDebug() << "executing command '" << command << "'" << endl;
- QMap<QChar,QString> subst;
+ TQMap<TQChar,TQString> subst;
subst.insert( 'e', event );
subst.insert( 'a', fromApp );
subst.insert( 's', text );
- subst.insert( 'w', QString::number( winId ));
- subst.insert( 'i', QString::number( eventId ));
- QString execLine = KMacroExpander::expandMacrosShellQuote( command, subst );
+ subst.insert( 'w', TQString::number( winId ));
+ subst.insert( 'i', TQString::number( eventId ));
+ TQString execLine = KMacroExpander::expandMacrosShellQuote( command, subst );
if ( execLine.isEmpty() )
execLine = command; // fallback
@@ -629,20 +629,20 @@ bool KNotify::notifyByExecute(const QString &command, const QString& event,
}
-bool KNotify::notifyByLogfile(const QString &text, const QString &file)
+bool KNotify::notifyByLogfile(const TQString &text, const TQString &file)
{
// ignore empty messages
if ( text.isEmpty() )
return true;
// open file in append mode
- QFile logFile(file);
+ TQFile logFile(file);
if ( !logFile.open(IO_WriteOnly | IO_Append) )
return false;
// append msg
- QTextStream strm( &logFile );
- strm << "- KNotify " << QDateTime::currentDateTime().toString() << ": ";
+ TQTextStream strm( &logFile );
+ strm << "- KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << text << endl;
// close file
@@ -650,17 +650,17 @@ bool KNotify::notifyByLogfile(const QString &text, const QString &file)
return true;
}
-bool KNotify::notifyByStderr(const QString &text)
+bool KNotify::notifyByStderr(const TQString &text)
{
// ignore empty messages
if ( text.isEmpty() )
return true;
// open stderr for output
- QTextStream strm( stderr, IO_WriteOnly );
+ TQTextStream strm( stderr, IO_WriteOnly );
// output msg
- strm << "KNotify " << QDateTime::currentDateTime().toString() << ": ";
+ strm << "KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << text << endl;
return true;
@@ -674,7 +674,7 @@ bool KNotify::notifyByTaskbar( WId win )
return true;
}
-bool KNotify::isGlobal(const QString &eventname)
+bool KNotify::isGlobal(const TQString &eventname)
{
return d->globalEvents->hasGroup( eventname );
}
@@ -689,13 +689,13 @@ void KNotify::setVolume( int volume )
void KNotify::playTimeout()
{
#ifndef WITHOUT_ARTS
- for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;)
+ for ( TQPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;)
{
- QPtrListIterator< KDE::PlayObject > current = it;
+ TQPtrListIterator< KDE::PlayObject > current = it;
++it;
if ( (*current)->state() != Arts::posPlaying )
{
- QMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.find( *current );
+ TQMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.find( *current );
if ( eit != d->playObjectEventMap.end() )
{
soundFinished( *eit, PlayedOK );
@@ -709,10 +709,10 @@ void KNotify::playTimeout()
#endif
}
-bool KNotify::isPlaying( const QString& soundFile ) const
+bool KNotify::isPlaying( const TQString& soundFile ) const
{
#ifndef WITHOUT_ARTS
- for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it)
+ for ( TQPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it)
{
if ( (*it)->mediaName() == soundFile )
return true;
@@ -730,7 +730,7 @@ void KNotify::slotPlayerProcessExited( KProcess *proc )
void KNotify::abortFirstPlayObject()
{
#ifndef WITHOUT_ARTS
- QMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() );
+ TQMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() );
if ( it != d->playObjectEventMap.end() )
{
soundFinished( it.data(), Aborted );
@@ -742,35 +742,35 @@ void KNotify::abortFirstPlayObject()
void KNotify::soundFinished( int eventId, PlayingFinishedStatus reason )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << eventId << (int) reason;
DCOPClient::mainClient()->emitDCOPSignal( "KNotify", "playingFinished(int,int)", data );
}
-WId KNotify::checkWinId( const QString &appName, WId senderWinId )
+WId KNotify::checkWinId( const TQString &appName, WId senderWinId )
{
if ( senderWinId == 0 )
{
- QCString senderId = kapp->dcopClient()->senderId();
- QCString compare = (appName + "-mainwindow").latin1();
+ TQCString senderId = kapp->dcopClient()->senderId();
+ TQCString compare = (appName + "-mainwindow").latin1();
int len = compare.length();
// kdDebug() << "notifyByPassivePopup: appName=" << appName << " sender=" << senderId << endl;
QCStringList objs = kapp->dcopClient()->remoteObjects( senderId );
for (QCStringList::ConstIterator it = objs.begin(); it != objs.end(); ++it ) {
- QCString obj( *it );
+ TQCString obj( *it );
if ( obj.left(len) == compare) {
// kdDebug( ) << "found " << obj << endl;
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
if ( kapp->dcopClient()->call(senderId, obj, "getWinID()", data, replyType, replyData) ) {
- QDataStream answer(replyData, IO_ReadOnly);
+ TQDataStream answer(replyData, IO_ReadOnly);
if (replyType == "int") {
answer >> senderWinId;
- // kdDebug() << "SUCCESS, found getWinID(): type='" << QString(replyType)
+ // kdDebug() << "SUCCESS, found getWinID(): type='" << TQString(replyType)
// << "' senderWinId=" << senderWinId << endl;
}
}
diff --git a/arts/knotify/knotify.h b/arts/knotify/knotify.h
index c98be2e97..12e699299 100644
--- a/arts/knotify/knotify.h
+++ b/arts/knotify/knotify.h
@@ -20,7 +20,7 @@
#ifndef KNOTIFY_H
#define KNOTIFY_H
-#include <qobject.h>
+#include <tqobject.h>
#include <knotifyclient.h>
#include <dcopobject.h>
@@ -28,7 +28,7 @@ class KNotifyPrivate;
class KProcess;
class KConfig;
-class KNotify : public QObject, public DCOPObject
+class KNotify : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -51,17 +51,17 @@ public:
protected:
k_dcop:
// deprecated
- void notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+ void notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level);
// deprecated
- void notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+ void notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level, int winId);
- void notify(const QString &event, const QString &fromApp,
- const QString &text, QString sound, QString file,
+ void notify(const TQString &event, const TQString &fromApp,
+ const TQString &text, TQString sound, TQString file,
int present, int level, int winId, int eventId);
@@ -70,31 +70,31 @@ k_dcop:
void sessionReady(); // from ksmserver
private:
- bool notifyBySound(const QString &sound, const QString &appname, int eventId);
- bool notifyByMessagebox(const QString &text, int level, WId winId);
- bool notifyByLogfile(const QString &text, const QString &file);
- bool notifyByStderr(const QString &text);
- bool notifyByPassivePopup(const QString &text, const QString &appName,
+ bool notifyBySound(const TQString &sound, const TQString &appname, int eventId);
+ bool notifyByMessagebox(const TQString &text, int level, WId winId);
+ bool notifyByLogfile(const TQString &text, const TQString &file);
+ bool notifyByStderr(const TQString &text);
+ bool notifyByPassivePopup(const TQString &text, const TQString &appName,
KConfig* eventsFile, WId winId );
- bool notifyByExecute(const QString &command,
- const QString& event,
- const QString& fromApp,
- const QString& text,
+ bool notifyByExecute(const TQString &command,
+ const TQString& event,
+ const TQString& fromApp,
+ const TQString& text,
int winId,
int eventId );
bool notifyByTaskbar( WId winId );
- bool isPlaying( const QString& soundFile ) const;
+ bool isPlaying( const TQString& soundFile ) const;
void soundFinished( int eventId, PlayingFinishedStatus reason );
void abortFirstPlayObject();
- WId checkWinId( const QString& appName, WId senderWinId );
+ WId checkWinId( const TQString& appName, WId senderWinId );
/**
* checks if eventname is a global event (exists in config/eventsrc)
**/
- bool isGlobal(const QString &eventname);
+ bool isGlobal(const TQString &eventname);
private slots:
void playTimeout();
diff --git a/arts/message/artsmessage.cc b/arts/message/artsmessage.cc
index 7a127d4a4..f77ecd581 100644
--- a/arts/message/artsmessage.cc
+++ b/arts/message/artsmessage.cc
@@ -29,7 +29,7 @@ Gnome, etc. and used instead.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kglobal.h>
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString msg;
+ TQString msg;
// must be at least one argument
if (args->count() == 0) {
@@ -75,15 +75,15 @@ int main(int argc, char **argv) {
if (i == 0)
msg = args->arg(i);
else
- msg += QString(" ") + args->arg(i);
+ msg += TQString(" ") + args->arg(i);
}
const int notifyOptions = 0; // never activate KNotify
if (args->isSet("w")) {
KMessageBox::sorry(0, msg, i18n("Warning"), notifyOptions);
} else if (args->isSet("i")) {
- QString id = msg;
- id.replace(QRegExp("[\\[\\]\\s=]"), "_");
+ TQString id = msg;
+ id.replace(TQRegExp("[\\[\\]\\s=]"), "_");
KMessageBox::information(0, msg, i18n("Informational"), id, notifyOptions);
} else {
KMessageBox::error(0, msg, i18n("Error"), notifyOptions);
diff --git a/common_texts.cpp b/common_texts.cpp
index ab5182cd4..d23fc3a07 100644
--- a/common_texts.cpp
+++ b/common_texts.cpp
@@ -191,66 +191,66 @@ i18n( "Configure &Key Bindings...");
i18n( "&Preferences...");
i18n( "&Settings");
i18n( "Do not show this message again");
-i18n("QAccel", "Escape");
-i18n("QAccel", "Tab");
-i18n("QAccel", "Backtab");
-i18n("QAccel", "Backspace");
-i18n("QAccel", "Return");
-i18n("QAccel", "Enter");
-i18n("QAccel", "Insert");
-i18n("QAccel", "Delete");
-i18n("QAccel", "Pause");
-i18n("QAccel", "Print");
-i18n("QAccel", "SysReq");
-i18n("QAccel", "Home");
-i18n("QAccel", "End");
-i18n("QAccel", "Left");
-i18n("QAccel", "Up");
-i18n("QAccel", "Right");
-i18n("QAccel", "Down");
-i18n("QAccel", "Prior");
-i18n("QAccel", "Next");
-i18n("QAccel", "Shift");
-i18n("QAccel", "Control");
-i18n("QAccel", "Meta");
-i18n("QAccel", "Alt");
-i18n("QAccel", "CapsLock");
-i18n("QAccel", "NumLock");
-i18n("QAccel", "ScrollLock");
-i18n("QAccel", "Space");
-i18n("QAccel", "ParenLeft");
-i18n("QAccel", "ParenRight");
-i18n("QAccel", "Asterisk");
-i18n("QAccel", "Plus");
-i18n("QAccel", "Comma");
-i18n("QAccel", "Minus");
-i18n("QAccel", "Period");
-i18n("QAccel", "Slash");
-i18n("QAccel", "Colon");
-i18n("QAccel", "Semicolon");
-i18n("QAccel", "Less");
-i18n("QAccel", "Equal");
-i18n("QAccel", "Greater");
-i18n("QAccel", "Question");
-i18n("QAccel", "BracketLeft");
-i18n("QAccel", "Backslash");
-i18n("QAccel", "BracketRight");
-i18n("QAccel", "AsciiCircum");
-i18n("QAccel", "Underscore");
-i18n("QAccel", "QuoteLeft");
-i18n("QAccel", "BraceLeft");
-i18n("QAccel", "BraceRight");
-i18n("QAccel", "AsciiTilde");
-i18n("QAccel", "PgUp");
-i18n("QAccel", "PgDown");
-i18n("QAccel", "Apostrophe");
-i18n("QAccel", "Ampersand");
-i18n("QAccel", "Exclam");
-i18n("QAccel", "Dollar");
-i18n("QAccel", "Percent");
-i18n("QAccel", "Menu");
-i18n("QAccel", "Help");
-i18n("QAccel", "NumberSign");
+i18n("TQAccel", "Escape");
+i18n("TQAccel", "Tab");
+i18n("TQAccel", "Backtab");
+i18n("TQAccel", "Backspace");
+i18n("TQAccel", "Return");
+i18n("TQAccel", "Enter");
+i18n("TQAccel", "Insert");
+i18n("TQAccel", "Delete");
+i18n("TQAccel", "Pause");
+i18n("TQAccel", "Print");
+i18n("TQAccel", "SysReq");
+i18n("TQAccel", "Home");
+i18n("TQAccel", "End");
+i18n("TQAccel", "Left");
+i18n("TQAccel", "Up");
+i18n("TQAccel", "Right");
+i18n("TQAccel", "Down");
+i18n("TQAccel", "Prior");
+i18n("TQAccel", "Next");
+i18n("TQAccel", "Shift");
+i18n("TQAccel", "Control");
+i18n("TQAccel", "Meta");
+i18n("TQAccel", "Alt");
+i18n("TQAccel", "CapsLock");
+i18n("TQAccel", "NumLock");
+i18n("TQAccel", "ScrollLock");
+i18n("TQAccel", "Space");
+i18n("TQAccel", "ParenLeft");
+i18n("TQAccel", "ParenRight");
+i18n("TQAccel", "Asterisk");
+i18n("TQAccel", "Plus");
+i18n("TQAccel", "Comma");
+i18n("TQAccel", "Minus");
+i18n("TQAccel", "Period");
+i18n("TQAccel", "Slash");
+i18n("TQAccel", "Colon");
+i18n("TQAccel", "Semicolon");
+i18n("TQAccel", "Less");
+i18n("TQAccel", "Equal");
+i18n("TQAccel", "Greater");
+i18n("TQAccel", "Question");
+i18n("TQAccel", "BracketLeft");
+i18n("TQAccel", "Backslash");
+i18n("TQAccel", "BracketRight");
+i18n("TQAccel", "AsciiCircum");
+i18n("TQAccel", "Underscore");
+i18n("TQAccel", "QuoteLeft");
+i18n("TQAccel", "BraceLeft");
+i18n("TQAccel", "BraceRight");
+i18n("TQAccel", "AsciiTilde");
+i18n("TQAccel", "PgUp");
+i18n("TQAccel", "PgDown");
+i18n("TQAccel", "Apostrophe");
+i18n("TQAccel", "Ampersand");
+i18n("TQAccel", "Exclam");
+i18n("TQAccel", "Dollar");
+i18n("TQAccel", "Percent");
+i18n("TQAccel", "Menu");
+i18n("TQAccel", "Help");
+i18n("TQAccel", "NumberSign");
i18n("Main Toolbar");
//some font styles
diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp
index e8fd7683a..a78c8e016 100644
--- a/dcop/client/dcop.cpp
+++ b/dcop/client/dcop.cpp
@@ -30,16 +30,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
-#include <qbuffer.h>
-#include <qcolor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qvariant.h>
+#include <tqbuffer.h>
+#include <tqcolor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqvariant.h>
#include "../dcopclient.h"
#include "../dcopref.h"
@@ -52,13 +52,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/Xatom.h>
#endif
-typedef QMap<QString, QString> UserList;
+typedef TQMap<TQString, TQString> UserList;
static DCOPClient* dcop = 0;
-static QTextStream cin_ ( stdin, IO_ReadOnly );
-static QTextStream cout_( stdout, IO_WriteOnly );
-static QTextStream cerr_( stderr, IO_WriteOnly );
+static TQTextStream cin_ ( stdin, IO_ReadOnly );
+static TQTextStream cout_( stdout, IO_WriteOnly );
+static TQTextStream cerr_( stderr, IO_WriteOnly );
/**
* Session to send call to
@@ -71,12 +71,12 @@ static QTextStream cerr_( stderr, IO_WriteOnly );
*/
enum Session { DefaultSession = 0, AllSessions, QuerySessions, CustomSession };
-bool startsWith(const QCString &id, const char *str, int n)
+bool startsWith(const TQCString &id, const char *str, int n)
{
return !n || (strncmp(id.data(), str, n) == 0);
}
-bool endsWith(QCString &id, char c)
+bool endsWith(TQCString &id, char c)
{
if (id.length() && (id[id.length()-1] == c))
{
@@ -86,13 +86,13 @@ bool endsWith(QCString &id, char c)
return false;
}
-void queryApplications(const QCString &filter)
+void queryApplications(const TQCString &filter)
{
int filterLen = filter.length();
QCStringList apps = dcop->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- QCString &clientId = *it;
+ TQCString &clientId = *it;
if ( (clientId != dcop->appId()) &&
!startsWith(clientId, "anonymous",9) &&
startsWith(clientId, filter, filterLen)
@@ -107,7 +107,7 @@ void queryApplications(const QCString &filter)
}
}
-void queryObjects( const QCString &app, const QCString &filter )
+void queryObjects( const TQCString &app, const TQCString &filter )
{
int filterLen = filter.length();
bool ok = false;
@@ -115,7 +115,7 @@ void queryObjects( const QCString &app, const QCString &filter )
QCStringList objs = dcop->remoteObjects( app, &ok );
for ( QCStringList::Iterator it = objs.begin(); it != objs.end(); ++it )
{
- QCString &objId = *it;
+ TQCString &objId = *it;
if (objId == "default")
{
@@ -158,7 +158,7 @@ void queryFunctions( const char* app, const char* obj )
int callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
- QString f = func; // Qt is better with unicode strings, so use one.
+ TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
@@ -172,7 +172,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
// try to get the interface from the server
bool ok = false;
QCStringList funcs = dcop->remoteFunctions( app, obj, &ok );
- QCString realfunc;
+ TQCString realfunc;
if ( !ok && args.isEmpty() )
goto doit;
if ( !ok )
@@ -195,7 +195,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
- const QString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
+ const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
uint a = arguments.contains(',');
if ( (a==0 && !arguments.isEmpty()) || a>0)
a++;
@@ -221,26 +221,26 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
// of dcop, so it should be OK.
//
//
- QStringList intTypes;
+ TQStringList intTypes;
intTypes << "int" << "unsigned" << "long" << "bool" ;
- QStringList types;
+ TQStringList types;
if ( left >0 && left + 1 < right - 1) {
- types = QStringList::split( ',', f.mid( left + 1, right - left - 1) );
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
- QString lt = (*it).simplifyWhiteSpace();
+ types = TQStringList::split( ',', f.mid( left + 1, right - left - 1) );
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ TQString lt = (*it).simplifyWhiteSpace();
int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
- // "QString URL" or it's a complicated int type, ie.
+ // "TQString URL" or it's a complicated int type, ie.
// "unsigned long long int bool".
//
//
if ( s > 0 )
{
- QStringList partl = QStringList::split(' ' , lt);
+ TQStringList partl = TQStringList::split(' ' , lt);
// The zero'th part is -- at the very least -- a
// type part. Any trailing parts *might* be extra
@@ -271,10 +271,10 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
(*it) = lt;
}
- QString fc = f.left( left );
+ TQString fc = f.left( left );
fc += '(';
bool first = true;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
if ( !first )
fc +=",";
first = false;
@@ -284,12 +284,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
f = fc;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
uint i = 0;
- for( QStringList::Iterator it = types.begin(); it != types.end(); ++it )
+ for( TQStringList::Iterator it = types.begin(); it != types.end(); ++it )
marshall( arg, args, i, *it );
if ( i != args.count() )
@@ -302,11 +302,11 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
qWarning( "call failed");
return( 1 );
} else {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "void" && replyType != "ASYNC" )
{
- QCString replyString = demarshal( reply, replyType );
+ TQCString replyString = demarshal( reply, replyType );
if ( !replyString.isEmpty() )
printf( "%s\n", replyString.data() );
else
@@ -380,7 +380,7 @@ static UserList userList()
while( passwd* pstruct = getpwent() )
{
- result[ QString::fromLocal8Bit(pstruct->pw_name) ] = QFile::decodeName(pstruct->pw_dir);
+ result[ TQString::fromLocal8Bit(pstruct->pw_name) ] = TQFile::decodeName(pstruct->pw_dir);
}
return result;
@@ -390,7 +390,7 @@ static UserList userList()
* Return a list of available DCOP sessions for the specified user
* An empty list means no sessions are available, or an error occurred.
*/
-QStringList dcopSessionList( const QString &user, const QString &home )
+TQStringList dcopSessionList( const TQString &user, const TQString &home )
{
if( home.isEmpty() )
{
@@ -398,16 +398,16 @@ QStringList dcopSessionList( const QString &user, const QString &home )
<< user << "!" << endl
<< "Please check permissions or set the $DCOPSERVER variable manually before" << endl
<< "calling dcop." << endl;
- return QStringList();
+ return TQStringList();
}
- QStringList result;
- QFileInfo dirInfo( home );
+ TQStringList result;
+ TQFileInfo dirInfo( home );
if( !dirInfo.exists() || !dirInfo.isReadable() )
return result;
- QDir d( home );
- d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
+ TQDir d( home );
+ d.setFilter( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks );
d.setNameFilter( ".DCOPserver*" );
const QFileInfoList *list = d.entryInfoList();
@@ -415,7 +415,7 @@ QStringList dcopSessionList( const QString &user, const QString &home )
return result;
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( ( fi = it.current() ) != 0 )
{
@@ -455,12 +455,12 @@ void sendUserTime( const char* app )
* Do the actual DCOP call
*/
int runDCOP( QCStringList args, UserList users, Session session,
- const QString sessionName, bool readStdin, bool updateUserTime )
+ const TQString sessionName, bool readStdin, bool updateUserTime )
{
bool DCOPrefmode=false;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
QCStringList params;
DCOPClient *client = 0L;
int retval = 0;
@@ -505,10 +505,10 @@ int runDCOP( QCStringList args, UserList users, Session session,
bool firstRun = true;
UserList::Iterator it;
- QStringList sessions;
+ TQStringList sessions;
bool presetDCOPServer = false;
// char *dcopStr = 0L;
- QString dcopServer;
+ TQString dcopServer;
for( it = users.begin(); it != users.end() || firstRun; ++it )
{
@@ -518,7 +518,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
if( session == QuerySessions )
{
- QStringList sessions = dcopSessionList( it.key(), it.data() );
+ TQStringList sessions = dcopSessionList( it.key(), it.data() );
if( sessions.isEmpty() )
{
if( users.count() <= 1 )
@@ -536,7 +536,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
cout_ << "for user " << *it << " ";
cout_ << ":" << endl;
- QStringList::Iterator sIt = sessions.begin();
+ TQStringList::Iterator sIt = sessions.begin();
for( ; sIt != sessions.end(); ++sIt )
cout_ << " " << *sIt << endl;
@@ -593,9 +593,9 @@ int runDCOP( QCStringList args, UserList users, Session session,
( getenv( "ICEAUTHORITY" ) == 0 || getenv( "DISPLAY" ) == 0 ) ) )
{
// Check for ICE authority file and if the file can be read by us
- QString home = it.data();
- QString iceFile = it.data() + "/.ICEauthority";
- QFileInfo fi( iceFile );
+ TQString home = it.data();
+ TQString iceFile = it.data() + "/.ICEauthority";
+ TQFileInfo fi( iceFile );
if( iceFile.isEmpty() )
{
cerr_ << "WARNING: Cannot determine home directory for user "
@@ -638,20 +638,20 @@ int runDCOP( QCStringList args, UserList users, Session session,
// If users is an empty list we're calling for the currently logged
// in user. In this case we don't have a session, but still want
// to iterate the loop once.
- QStringList::Iterator sIt = sessions.begin();
+ TQStringList::Iterator sIt = sessions.begin();
for( ; sIt != sessions.end() || users.isEmpty(); ++sIt )
{
if( !presetDCOPServer && !users.isEmpty() )
{
- QString dcopFile = it.data() + "/" + *sIt;
- QFile f( dcopFile );
+ TQString dcopFile = it.data() + "/" + *sIt;
+ TQFile f( dcopFile );
if( !f.open( IO_ReadOnly ) )
{
cerr_ << "Can't open " << dcopFile << " for reading!" << endl;
exit( -1 );
}
- QStringList l( QStringList::split( '\n', f.readAll() ) );
+ TQStringList l( TQStringList::split( '\n', f.readAll() ) );
dcopServer = l.first();
if( dcopServer.isEmpty() )
@@ -717,7 +717,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
// read line
while ( !cin_.atEnd() )
{
- QString buf = cin_.readLine();
+ TQString buf = cin_.readLine();
if( replaceArg != params.end() )
*replaceArg = buf.local8Bit();
@@ -759,12 +759,12 @@ int main( int argc, char** argv )
{
bool readStdin = false;
int numOptions = 0;
- QString user;
+ TQString user;
Session session = DefaultSession;
- QString sessionName;
+ TQString sessionName;
bool updateUserTime = true;
- cin_.setEncoding( QTextStream::Locale );
+ cin_.setEncoding( TQTextStream::Locale );
// Scan for command-line options first
for( int pos = 1 ; pos <= argc - 1 ; pos++ )
@@ -780,7 +780,7 @@ int main( int argc, char** argv )
{
if( pos <= argc - 2 )
{
- user = QString::fromLocal8Bit( argv[ pos + 1] );
+ user = TQString::fromLocal8Bit( argv[ pos + 1] );
numOptions +=2;
pos++;
}
@@ -799,7 +799,7 @@ int main( int argc, char** argv )
}
else if( pos <= argc - 2 )
{
- sessionName = QString::fromLocal8Bit( argv[ pos + 1] );
+ sessionName = TQString::fromLocal8Bit( argv[ pos + 1] );
numOptions +=2;
pos++;
}
@@ -851,7 +851,7 @@ int main( int argc, char** argv )
#ifdef DCOPQUIT
if (argc > 1)
{
- QCString prog = argv[ numOptions + 1 ];
+ TQCString prog = argv[ numOptions + 1 ];
if (!prog.isEmpty())
{
diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp
index 4f69f848f..cd3e4d517 100644
--- a/dcop/client/dcopfind.cpp
+++ b/dcop/client/dcopfind.cpp
@@ -21,10 +21,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qbuffer.h>
-#include <qvariant.h>
-#include <qcolor.h>
-#include <qimage.h>
+#include <tqbuffer.h>
+#include <tqvariant.h>
+#include <tqcolor.h>
+#include <tqimage.h>
#include "../kdatastream.h"
#include "../dcopclient.h"
#include "../dcopref.h"
@@ -40,7 +40,7 @@ static bool bLaunchApp = 0;
bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
- QString f = func; // Qt is better with unicode strings, so use one.
+ TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
@@ -57,26 +57,26 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
// of dcop, so it should be OK.
//
//
- QStringList intTypes;
+ TQStringList intTypes;
intTypes << "int" << "unsigned" << "long" << "bool" ;
- QStringList types;
+ TQStringList types;
if ( left >0 && left + 1 < right - 1) {
- types = QStringList::split( ',', f.mid( left + 1, right - left - 1) );
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
- QString lt = (*it).simplifyWhiteSpace();
+ types = TQStringList::split( ',', f.mid( left + 1, right - left - 1) );
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ TQString lt = (*it).simplifyWhiteSpace();
int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
- // "QString URL" or it's a complicated int type, ie.
+ // "TQString URL" or it's a complicated int type, ie.
// "unsigned long long int bool".
//
//
if ( s > 0 )
{
- QStringList partl = QStringList::split(' ' , lt);
+ TQStringList partl = TQStringList::split(' ' , lt);
// The zero'th part is -- at the very least -- a
// type part. Any trailing parts *might* be extra
@@ -107,10 +107,10 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
(*it) = lt;
}
- QString fc = f.left( left );
+ TQString fc = f.left( left );
fc += '(';
bool first = true;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
if ( !first )
fc +=",";
first = false;
@@ -125,11 +125,11 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
exit(1);
}
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
uint i = 0;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
marshall(arg, args, i, *it);
}
if ( (uint) i != args.count() ) {
@@ -137,8 +137,8 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
exit(1);
}
- QCString foundApp;
- QCString foundObj;
+ TQCString foundApp;
+ TQCString foundObj;
if ( dcop->findObject( app, obj, f.latin1(), data, foundApp, foundObj) )
{
if (bAppIdOnly)
@@ -150,7 +150,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
return false;
}
-bool launchApp(QString app)
+bool launchApp(TQString app)
{
int l = app.length();
if (l && (app[l-1] == '*'))
@@ -160,18 +160,18 @@ bool launchApp(QString app)
if (!l) return false;
app.truncate(l);
- QStringList URLs;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQStringList URLs;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;
- if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(QString,QStringList)",
+ if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)",
data, replyType, replyData) ) {
qWarning( "call to klauncher failed.");
return false;
}
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" )
{
@@ -179,8 +179,8 @@ bool launchApp(QString app)
return false;
}
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
@@ -226,9 +226,9 @@ int main( int argc, char** argv )
client.attach();
dcop = &client;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
char **args = 0;
if ((argc > argi) && (strncmp(argv[argi], "DCOPRef(", 8)) == 0)
{
diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp
index 2b870964f..5741ef775 100644
--- a/dcop/client/dcopstart.cpp
+++ b/dcop/client/dcopstart.cpp
@@ -26,34 +26,34 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <ctype.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
static DCOPClient* dcop = 0;
void startApp(const char *_app, int argc, const char **args)
{
const char *function = 0;
- QString app = QString::fromLatin1(_app);
+ TQString app = TQString::fromLatin1(_app);
if (app.endsWith(".desktop"))
- function = "start_service_by_desktop_path(QString,QStringList)";
+ function = "start_service_by_desktop_path(TQString,TQStringList)";
else
- function = "start_service_by_desktop_name(QString,QStringList)";
- QStringList URLs;
+ function = "start_service_by_desktop_name(TQString,TQStringList)";
+ TQStringList URLs;
for(int i = 0; i < argc; i++)
{
- URLs.append(QString::fromLocal8Bit(args[i]));
+ URLs.append(TQString::fromLocal8Bit(args[i]));
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;
if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) {
qWarning( "call failed");
exit(1);
} else {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" )
{
@@ -61,8 +61,8 @@ void startApp(const char *_app, int argc, const char **args)
exit(1);
}
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
@@ -89,9 +89,9 @@ int main( int argc, char** argv )
client.attach();
dcop = &client;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
/*char **args = 0;*/
startApp( argv[1], argc - 2, (const char**)&argv[2] );
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp
index d7d5c260a..f9b7955f2 100644
--- a/dcop/client/marshall.cpp
+++ b/dcop/client/marshall.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define KDE_QT_ONLY
#include "../../kdecore/kurl.cpp"
-bool mkBool( const QString& s )
+bool mkBool( const TQString& s )
{
if ( s.lower() == "true" )
return true;
@@ -37,7 +37,7 @@ bool mkBool( const QString& s )
return false;
}
-QPoint mkPoint( const QString &str )
+TQPoint mkPoint( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -46,10 +46,10 @@ QPoint mkPoint( const QString &str )
s = (const char *)end;
while(*s && !isdigit(*s) && *s != '-') s++;
int y = strtol(s, &end, 10);
- return QPoint( x, y );
+ return TQPoint( x, y );
}
-QSize mkSize( const QString &str )
+TQSize mkSize( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -58,10 +58,10 @@ QSize mkSize( const QString &str )
s = (const char *)end;
while(*s && !isdigit(*s) && *s != '-') s++;
int h = strtol(s, &end, 10);
- return QSize( w, h );
+ return TQSize( w, h );
}
-QRect mkRect( const QString &str )
+TQRect mkRect( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -79,28 +79,28 @@ QRect mkRect( const QString &str )
int p4 = strtol(s, &end, 10);
if (legacy)
{
- return QRect( p3, p4, p1, p2 );
+ return TQRect( p3, p4, p1, p2 );
}
- return QRect( p1, p2, p3, p4 );
+ return TQRect( p1, p2, p3, p4 );
}
-QColor mkColor( const QString& s )
+TQColor mkColor( const TQString& s )
{
- QColor c;
+ TQColor c;
c.setNamedColor(s);
return c;
}
-const char *qStringToC(const QCString &s)
+const char *qStringToC(const TQCString &s)
{
if (s.isEmpty())
return "";
return s.data();
}
-QCString demarshal( QDataStream &stream, const QString &type )
+TQCString demarshal( TQDataStream &stream, const TQString &type )
{
- QCString result;
+ TQCString result;
if ( type == "int" || type == "Q_INT32" )
{
@@ -145,54 +145,54 @@ QCString demarshal( QDataStream &stream, const QString &type )
bool b;
stream >> b;
result = b ? "true" : "false";
- } else if ( type == "QString" )
+ } else if ( type == "TQString" )
{
- QString s;
+ TQString s;
stream >> s;
result = s.local8Bit();
- } else if ( type == "QCString" )
+ } else if ( type == "TQCString" )
{
stream >> result;
} else if ( type == "QCStringList" )
{
- return demarshal( stream, "QValueList<QCString>" );
- } else if ( type == "QStringList" )
+ return demarshal( stream, "TQValueList<TQCString>" );
+ } else if ( type == "TQStringList" )
{
- return demarshal( stream, "QValueList<QString>" );
- } else if ( type == "QColor" )
+ return demarshal( stream, "TQValueList<TQString>" );
+ } else if ( type == "TQColor" )
{
- QColor c;
+ TQColor c;
stream >> c;
result = c.name().local8Bit();
- } else if ( type == "QSize" )
+ } else if ( type == "TQSize" )
{
- QSize s;
+ TQSize s;
stream >> s;
result.sprintf( "%dx%d", s.width(), s.height() );
- } else if ( type == "QPixmap" || type == "QImage" )
+ } else if ( type == "TQPixmap" || type == "TQImage" )
{
- QImage i;
+ TQImage i;
stream >> i;
- QByteArray ba;
- QBuffer buf( ba );
+ TQByteArray ba;
+ TQBuffer buf( ba );
buf.open( IO_WriteOnly );
i.save( &buf, "XPM" );
result = ba;
- } else if ( type == "QPoint" )
+ } else if ( type == "TQPoint" )
{
- QPoint p;
+ TQPoint p;
stream >> p;
result.sprintf( "+%d+%d", p.x(), p.y() );
- } else if ( type == "QRect" )
+ } else if ( type == "TQRect" )
{
- QRect r;
+ TQRect r;
stream >> r;
result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() );
- } else if ( type == "QVariant" )
+ } else if ( type == "TQVariant" )
{
Q_INT32 type;
stream >> type;
- return demarshal( stream, QVariant::typeToName( (QVariant::Type)type ) );
+ return demarshal( stream, TQVariant::typeToName( (TQVariant::Type)type ) );
} else if ( type == "DCOPRef" )
{
DCOPRef r;
@@ -203,12 +203,12 @@ QCString demarshal( QDataStream &stream, const QString &type )
KURL r;
stream >> r;
result = r.url().local8Bit();
- } else if ( type.left( 11 ) == "QValueList<" )
+ } else if ( type.left( 11 ) == "TQValueList<" )
{
if ( (uint)type.find( '>', 11 ) != type.length() - 1 )
return result;
- QString nestedType = type.mid( 11, type.length() - 12 );
+ TQString nestedType = type.mid( 11, type.length() - 12 );
if ( nestedType.isEmpty() )
return result;
@@ -219,13 +219,13 @@ QCString demarshal( QDataStream &stream, const QString &type )
Q_UINT32 i = 0;
for (; i < count; ++i )
{
- QCString arg = demarshal( stream, nestedType );
+ TQCString arg = demarshal( stream, nestedType );
result += arg;
if ( i < count - 1 )
result += '\n';
}
- } else if ( type.left( 5 ) == "QMap<" )
+ } else if ( type.left( 5 ) == "TQMap<" )
{
int commaPos = type.find( ',', 5 );
@@ -235,8 +235,8 @@ QCString demarshal( QDataStream &stream, const QString &type )
if ( (uint)type.find( '>', commaPos ) != type.length() - 1 )
return result;
- QString keyType = type.mid( 5, commaPos - 5 );
- QString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
+ TQString keyType = type.mid( 5, commaPos - 5 );
+ TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
Q_UINT32 count;
stream >> count;
@@ -244,12 +244,12 @@ QCString demarshal( QDataStream &stream, const QString &type )
Q_UINT32 i = 0;
for (; i < count; ++i )
{
- QCString key = demarshal( stream, keyType );
+ TQCString key = demarshal( stream, keyType );
if ( key.isEmpty() )
continue;
- QCString value = demarshal( stream, valueType );
+ TQCString value = demarshal( stream, valueType );
if ( value.isEmpty() )
continue;
@@ -269,19 +269,19 @@ QCString demarshal( QDataStream &stream, const QString &type )
}
-void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
+void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
{
if( i >= args.count() )
{
qWarning("Not enough arguments (expected %d, got %d).", i, args.count());
exit(1);
}
- QString s = QString::fromLocal8Bit( args[ i ] );
+ TQString s = TQString::fromLocal8Bit( args[ i ] );
- if (type == "QStringList")
- type = "QValueList<QString>";
+ if (type == "TQStringList")
+ type = "TQValueList<TQString>";
if (type == "QCStringList")
- type = "QValueList<QCString>";
+ type = "TQValueList<TQCString>";
if ( type == "int" )
arg << s.toInt();
@@ -294,13 +294,13 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
else if ( type == "Q_INT32" )
arg << s.toInt();
else if ( type == "Q_INT64" ) {
- QVariant qv = QVariant( s );
+ TQVariant qv = TQVariant( s );
arg << qv.toLongLong();
}
else if ( type == "Q_UINT32" )
arg << s.toUInt();
else if ( type == "Q_UINT64" ) {
- QVariant qv = QVariant( s );
+ TQVariant qv = TQVariant( s );
arg << qv.toULongLong();
}
else if ( type == "long" )
@@ -317,50 +317,50 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
arg << s.toDouble();
else if ( type == "bool" )
arg << mkBool( s );
- else if ( type == "QString" )
+ else if ( type == "TQString" )
arg << s;
- else if ( type == "QCString" )
- arg << QCString( args[ i ] );
- else if ( type == "QColor" )
+ else if ( type == "TQCString" )
+ arg << TQCString( args[ i ] );
+ else if ( type == "TQColor" )
arg << mkColor( s );
- else if ( type == "QPoint" )
+ else if ( type == "TQPoint" )
arg << mkPoint( s );
- else if ( type == "QSize" )
+ else if ( type == "TQSize" )
arg << mkSize( s );
- else if ( type == "QRect" )
+ else if ( type == "TQRect" )
arg << mkRect( s );
else if ( type == "KURL" )
arg << KURL( s );
- else if ( type == "QVariant" ) {
+ else if ( type == "TQVariant" ) {
if ( s == "true" || s == "false" )
- arg << QVariant( mkBool( s ), 42 );
+ arg << TQVariant( mkBool( s ), 42 );
else if ( s.left( 4 ) == "int(" )
- arg << QVariant( s.mid(4, s.length()-5).toInt() );
- else if ( s.left( 7 ) == "QPoint(" )
- arg << QVariant( mkPoint( s.mid(7, s.length()-8) ) );
- else if ( s.left( 6 ) == "QSize(" )
- arg << QVariant( mkSize( s.mid(6, s.length()-7) ) );
- else if ( s.left( 6 ) == "QRect(" )
- arg << QVariant( mkRect( s.mid(6, s.length()-7) ) );
- else if ( s.left( 7 ) == "QColor(" )
- arg << QVariant( mkColor( s.mid(7, s.length()-8) ) );
+ arg << TQVariant( s.mid(4, s.length()-5).toInt() );
+ else if ( s.left( 7 ) == "TQPoint(" )
+ arg << TQVariant( mkPoint( s.mid(7, s.length()-8) ) );
+ else if ( s.left( 6 ) == "TQSize(" )
+ arg << TQVariant( mkSize( s.mid(6, s.length()-7) ) );
+ else if ( s.left( 6 ) == "TQRect(" )
+ arg << TQVariant( mkRect( s.mid(6, s.length()-7) ) );
+ else if ( s.left( 7 ) == "TQColor(" )
+ arg << TQVariant( mkColor( s.mid(7, s.length()-8) ) );
else
- arg << QVariant( s );
- } else if ( type.startsWith("QValueList<") ||
+ arg << TQVariant( s );
+ } else if ( type.startsWith("TQValueList<") ||
type == "KURL::List" ) {
if ( type == "KURL::List" )
type = "KURL";
else
type = type.mid(11, type.length() - 12);
- QStringList list;
- QString delim = s;
+ TQStringList list;
+ TQString delim = s;
if (delim == "[")
delim = "]";
if (delim == "(")
delim = ")";
i++;
- QByteArray dummy_data;
- QDataStream dummy_arg(dummy_data, IO_WriteOnly);
+ TQByteArray dummy_data;
+ TQDataStream dummy_arg(dummy_data, IO_WriteOnly);
uint j = i;
uint count = 0;
@@ -371,7 +371,7 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
qWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1);
}
- if( QString::fromLocal8Bit( args[ j ] ) == delim )
+ if( TQString::fromLocal8Bit( args[ j ] ) == delim )
break;
marshall( dummy_arg, args, j, type );
count++;
@@ -384,7 +384,7 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
qWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1);
}
- if( QString::fromLocal8Bit( args[ i ] ) == delim )
+ if( TQString::fromLocal8Bit( args[ i ] ) == delim )
break;
marshall( arg, args, i, type );
}
diff --git a/dcop/dcop_deadlock_test.cpp b/dcop/dcop_deadlock_test.cpp
index d26bc25fb..71e8ba66c 100644
--- a/dcop/dcop_deadlock_test.cpp
+++ b/dcop/dcop_deadlock_test.cpp
@@ -24,32 +24,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcop_deadlock_test.h>
#include <dcopref.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
-MyDCOPObject::MyDCOPObject(const QCString &name, const QCString &remoteName)
-: QObject(0, name), DCOPObject(name), m_remoteName(remoteName)
+MyDCOPObject::MyDCOPObject(const TQCString &name, const TQCString &remoteName)
+: TQObject(0, name), DCOPObject(name), m_remoteName(remoteName)
{
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
}
-bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
-QCString& replyType, QByteArray &replyData)
+bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
+TQCString& replyType, TQByteArray &replyData)
{
- if (fun == "function(QCString)") {
- QDataStream args( data, IO_ReadOnly );
+ if (fun == "function(TQCString)") {
+ TQDataStream args( data, IO_ReadOnly );
args >> m_remoteName;
struct timeval tv;
gettimeofday(&tv, 0);
qWarning("%s: function('%s') %d:%06d", name(), m_remoteName.data(), tv.tv_sec % 100, tv.tv_usec);
- replyType = "QString";
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hey");
+ replyType = "TQString";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hey");
m_timer.start(1000, true);
return true;
}
@@ -63,15 +63,15 @@ void MyDCOPObject::slotTimeout()
qWarning("%s: slotTimeout() %d:%06d", name(), tv.tv_sec % 100, tv.tv_usec);
m_timer.start(1000, true);
- QString result;
- DCOPRef(m_remoteName, m_remoteName).call("function", QCString(name())).get(result);
+ TQString result;
+ DCOPRef(m_remoteName, m_remoteName).call("function", TQCString(name())).get(result);
gettimeofday(&tv, 0);
qWarning("%s: Got result '%s' %d:%06d", name(), result.latin1(), tv.tv_sec % 100, tv.tv_usec);
}
int main(int argc, char **argv)
{
- QCString myName = KApplication::dcopClient()->registerAs("testdcop", false);
+ TQCString myName = KApplication::dcopClient()->registerAs("testdcop", false);
KApplication app(argc, argv, "testdcop");
qWarning("%d:I am '%s'", getpid(), app.dcopClient()->appId().data());
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
system("./dcop_deadlock_test testdcop&");
}
- QCString remoteApp;
+ TQCString remoteApp;
if (argc == 2)
{
remoteApp = argv[1];
diff --git a/dcop/dcop_deadlock_test.h b/dcop/dcop_deadlock_test.h
index f4f437fb2..0557e7062 100644
--- a/dcop/dcop_deadlock_test.h
+++ b/dcop/dcop_deadlock_test.h
@@ -29,23 +29,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopclient.h>
#include <dcopobject.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <stdio.h>
-class MyDCOPObject : public QObject, public DCOPObject
+class MyDCOPObject : public TQObject, public DCOPObject
{
Q_OBJECT
public:
- MyDCOPObject(const QCString &name, const QCString &remoteName);
- bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ MyDCOPObject(const TQCString &name, const TQCString &remoteName);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
public slots:
void slotTimeout();
private:
- QCString m_remoteName;
- QTimer m_timer;
+ TQCString m_remoteName;
+ TQTimer m_timer;
};
#endif
diff --git a/dcop/dcopc.c b/dcop/dcopc.c
index c62caf2ba..39083d4f5 100644
--- a/dcop/dcopc.c
+++ b/dcop/dcopc.c
@@ -23,7 +23,7 @@
/* We really don't want to require X11 headers... */
#include "config.h"
-#include <qglobal.h>
+#include <tqglobal.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
#include <X11/X.h>
@@ -340,10 +340,10 @@ dcop_send_signal(
* Marshall the arguments for the DCOP message header (callerApp, destApp,
* destObj, destFunc. The last argument is actually part of the data part of
* the call, but we add it to the header. It's the size of the marshalled
- * argument data. In Qt it would look like QDataStream str( ... ) str <<
+ * argument data. In Qt it would look like TQDataStream str( ... ) str <<
* callerApp << destApp << destObj << destFun <<
* argumentQByteArrayDataStuff; (where as str is the complete data stream
- * sent do the dcopserver, excluding the ICE header) As the QByteArray is
+ * sent do the dcopserver, excluding the ICE header) As the TQByteArray is
* marshalled as [size][data] and as we (below) send the data in two chunks,
* first the dcop msg header and the the data, we just put the [size] field
* as last field into the dcop msg header ;-)
@@ -589,7 +589,7 @@ dcop_register(const char * app_name, Bool add_pid)
dcop_requested_name,
"DCOPServer",
"", /* Object irrelevant */
- "registerAs(QCString)",
+ "registerAs(TQCString)",
data,
dataLength,
&replyType,
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 2b39ecb55..176dbf8e9 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -23,12 +23,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
// qt <-> dcop integration
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
-#include <qtimer.h>
-#include <qintdict.h>
-#include <qeventloop.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
+#include <tqtimer.h>
+#include <tqintdict.h>
+#include <tqeventloop.h>
// end of qt <-> dcop integration
#include "config.h"
@@ -53,13 +53,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
-#include <qguardedptr.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qsocketnotifier.h>
-#include <qregexp.h>
+#include <tqguardedptr.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqsocketnotifier.h>
+#include <tqregexp.h>
#include <private/qucomextra_p.h>
@@ -79,12 +79,12 @@ extern "C" {
// #define DCOPCLIENT_DEBUG 1
-extern QMap<QCString, DCOPObject *> * kde_dcopObjMap; // defined in dcopobject.cpp
+extern TQMap<TQCString, DCOPObject *> * kde_dcopObjMap; // defined in dcopobject.cpp
/*********************************************
* Keep track of local clients
*********************************************/
-typedef QAsciiDict<DCOPClient> client_map_t;
+typedef TQAsciiDict<DCOPClient> client_map_t;
static client_map_t *DCOPClient_CliMap = 0;
static
@@ -95,34 +95,34 @@ client_map_t *cliMap()
return DCOPClient_CliMap;
}
-DCOPClient *DCOPClient::findLocalClient( const QCString &_appId )
+DCOPClient *DCOPClient::findLocalClient( const TQCString &_appId )
{
return cliMap()->find(_appId.data());
}
static
-void registerLocalClient( const QCString &_appId, DCOPClient *client )
+void registerLocalClient( const TQCString &_appId, DCOPClient *client )
{
cliMap()->replace(_appId.data(), client);
}
static
-void unregisterLocalClient( const QCString &_appId )
+void unregisterLocalClient( const TQCString &_appId )
{
client_map_t *map = cliMap();
map->remove(_appId.data());
}
/////////////////////////////////////////////////////////
-template class QPtrList<DCOPObjectProxy>;
-template class QPtrList<DCOPClientTransaction>;
-template class QPtrList<_IceConn>;
+template class TQPtrList<DCOPObjectProxy>;
+template class TQPtrList<DCOPClientTransaction>;
+template class TQPtrList<_IceConn>;
struct DCOPClientMessage
{
int opcode;
CARD32 key;
- QByteArray data;
+ TQByteArray data;
};
class DCOPClient::ReplyStruct
@@ -138,27 +138,27 @@ public:
replyObject = 0;
}
ReplyStatus status;
- QCString* replyType;
- QByteArray* replyData;
+ TQCString* replyType;
+ TQByteArray* replyData;
int replyId;
Q_INT32 transactionId;
- QCString calledApp;
- QGuardedPtr<QObject> replyObject;
- QCString replySlot;
+ TQCString calledApp;
+ TQGuardedPtr<TQObject> replyObject;
+ TQCString replySlot;
};
class DCOPClientPrivate
{
public:
DCOPClient *parent;
- QCString appId;
+ TQCString appId;
IceConn iceConn;
int majorOpcode; // major opcode negotiated w/server and used to tag all comms.
int majorVersion, minorVersion; // protocol versions negotiated w/server
static const char* serverAddr; // location of server in ICE-friendly format.
- QSocketNotifier *notifier;
+ TQSocketNotifier *notifier;
bool non_blocking_call_lock;
bool registered;
bool foreign_server;
@@ -166,12 +166,12 @@ public:
bool accept_calls_override; // If true, user has specified policy.
bool qt_bridge_enabled;
- QCString senderId;
- QCString objId;
- QCString function;
+ TQCString senderId;
+ TQCString objId;
+ TQCString function;
- QCString defaultObject;
- QPtrList<DCOPClientTransaction> *transactionList;
+ TQCString defaultObject;
+ TQPtrList<DCOPClientTransaction> *transactionList;
bool transaction;
Q_INT32 transactionId;
int opcode;
@@ -185,21 +185,21 @@ public:
CARD32 currentKey;
CARD32 currentKeySaved;
- QTimer postMessageTimer;
- QPtrList<DCOPClientMessage> messages;
+ TQTimer postMessageTimer;
+ TQPtrList<DCOPClientMessage> messages;
- QPtrList<DCOPClient::ReplyStruct> pendingReplies;
- QPtrList<DCOPClient::ReplyStruct> asyncReplyQueue;
+ TQPtrList<DCOPClient::ReplyStruct> pendingReplies;
+ TQPtrList<DCOPClient::ReplyStruct> asyncReplyQueue;
struct LocalTransactionResult
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
};
- QIntDict<LocalTransactionResult> localTransActionList;
+ TQIntDict<LocalTransactionResult> localTransActionList;
- QTimer eventLoopTimer;
+ TQTimer eventLoopTimer;
};
class DCOPClientTransaction
@@ -207,10 +207,10 @@ class DCOPClientTransaction
public:
Q_INT32 id;
CARD32 key;
- QCString senderId;
+ TQCString senderId;
};
-QCString DCOPClient::iceauthPath()
+TQCString DCOPClient::iceauthPath()
{
#ifdef Q_OS_WIN32
char szPath[512];
@@ -218,13 +218,13 @@ QCString DCOPClient::iceauthPath()
int ret;
ret = SearchPathA(NULL,"iceauth.exe",NULL,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
if(ret != 0)
- return QCString(szPath);
+ return TQCString(szPath);
#else
- QCString path = ::getenv("PATH");
+ TQCString path = ::getenv("PATH");
if (path.isEmpty())
path = "/bin:/usr/bin";
path += ":/usr/bin/X11:/usr/X11/bin:/usr/X11R6/bin";
- QCString fPath = strtok(path.data(), ":\b");
+ TQCString fPath = strtok(path.data(), ":\b");
while (!fPath.isNull())
{
fPath += "/iceauth";
@@ -239,13 +239,13 @@ QCString DCOPClient::iceauthPath()
return 0;
}
-static QCString dcopServerFile(const QCString &hostname, bool old)
+static TQCString dcopServerFile(const TQCString &hostname, bool old)
{
- QCString fName = ::getenv("DCOPAUTHORITY");
+ TQCString fName = ::getenv("DCOPAUTHORITY");
if (!old && !fName.isEmpty())
return fName;
- fName = QFile::encodeName( QDir::homeDirPath() );
+ fName = TQFile::encodeName( TQDir::homeDirPath() );
// fName = ::getenv("HOME");
if (fName.isEmpty())
{
@@ -253,11 +253,11 @@ static QCString dcopServerFile(const QCString &hostname, bool old)
exit(1);
}
#ifdef Q_WS_X11
- QCString disp = getenv("DISPLAY");
+ TQCString disp = getenv("DISPLAY");
#elif defined(Q_WS_QWS)
- QCString disp = getenv("QWS_DISPLAY");
+ TQCString disp = getenv("QWS_DISPLAY");
#else
- QCString disp;
+ TQCString disp;
#endif
if (disp.isEmpty())
disp = "NODISPLAY";
@@ -297,14 +297,14 @@ static QCString dcopServerFile(const QCString &hostname, bool old)
// static
-QCString DCOPClient::dcopServerFile(const QCString &hostname)
+TQCString DCOPClient::dcopServerFile(const TQCString &hostname)
{
return ::dcopServerFile(hostname, false);
}
// static
-QCString DCOPClient::dcopServerFileOld(const QCString &hostname)
+TQCString DCOPClient::dcopServerFileOld(const TQCString &hostname)
{
return ::dcopServerFile(hostname, true);
}
@@ -312,16 +312,16 @@ QCString DCOPClient::dcopServerFileOld(const QCString &hostname)
const char* DCOPClientPrivate::serverAddr = 0;
-static void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QByteArray& dataReceived, bool canPost );
+static void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQByteArray& dataReceived, bool canPost );
void DCOPClient::handleAsyncReply(ReplyStruct *replyStruct)
{
if (replyStruct->replyObject)
{
- QObject::connect(this, SIGNAL(callBack(int, const QCString&, const QByteArray &)),
+ TQObject::connect(this, TQT_SIGNAL(callBack(int, const TQCString&, const TQByteArray &)),
replyStruct->replyObject, replyStruct->replySlot);
emit callBack(replyStruct->replyId, *(replyStruct->replyType), *(replyStruct->replyData));
- QObject::disconnect(this, SIGNAL(callBack(int, const QCString&, const QByteArray &)),
+ TQObject::disconnect(this, TQT_SIGNAL(callBack(int, const TQCString&, const TQByteArray &)),
replyStruct->replyObject, replyStruct->replySlot);
}
delete replyStruct;
@@ -344,7 +344,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
if ( d->key == 0 )
d->key = key; // received a key from the server
- QByteArray dataReceived( length );
+ TQByteArray dataReceived( length );
IceReadData(iceConn, length, dataReceived.data() );
d->opcode = opcode;
@@ -362,13 +362,13 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReply:
if ( replyStruct ) {
- QByteArray* b = replyStruct->replyData;
- QCString* t = replyStruct->replyType;
+ TQByteArray* b = replyStruct->replyData;
+ TQCString* t = replyStruct->replyType;
replyStruct->status = DCOPClient::ReplyStruct::Ok;
replyStruct->transactionId = 0;
- QCString calledApp, app;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQCString calledApp, app;
+ TQDataStream ds( dataReceived, IO_ReadOnly );
ds >> calledApp >> app >> *t >> *b;
*replyWaitRet = True;
@@ -379,9 +379,9 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReplyWait:
if ( replyStruct ) {
- QCString calledApp, app;
+ TQCString calledApp, app;
Q_INT32 id;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQDataStream ds( dataReceived, IO_ReadOnly );
ds >> calledApp >> app >> id;
replyStruct->transactionId = id;
replyStruct->calledApp = calledApp;
@@ -394,8 +394,8 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReplyDelayed:
{
- QDataStream ds( dataReceived, IO_ReadOnly );
- QCString calledApp, app;
+ TQDataStream ds( dataReceived, IO_ReadOnly );
+ TQCString calledApp, app;
Q_INT32 id;
ds >> calledApp >> app >> id;
@@ -410,8 +410,8 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
if ((rs->transactionId == id) && (rs->calledApp == calledApp))
{
d->pendingReplies.remove();
- QByteArray* b = rs->replyData;
- QCString* t = rs->replyType;
+ TQByteArray* b = rs->replyData;
+ TQCString* t = rs->replyType;
ds >> *t >> *b;
rs->status = DCOPClient::ReplyStruct::Ok;
@@ -437,7 +437,7 @@ void DCOPClient::processPostedMessagesInternal()
{
if ( d->messages.isEmpty() )
return;
- QPtrListIterator<DCOPClientMessage> it (d->messages );
+ TQPtrListIterator<DCOPClientMessage> it (d->messages );
DCOPClientMessage* msg ;
while ( ( msg = it.current() ) ) {
++it;
@@ -455,7 +455,7 @@ void DCOPClient::processPostedMessagesInternal()
/**
Processes DCOPCall, DCOPFind and DCOPSend
*/
-void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QByteArray& dataReceived, bool canPost )
+void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQByteArray& dataReceived, bool canPost )
{
if (!d->accept_calls && (opcode == DCOPSend))
return;
@@ -463,17 +463,17 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
IceConn iceConn = d->iceConn;
DCOPMsg *pMsg = 0;
DCOPClient *c = d->parent;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQDataStream ds( dataReceived, IO_ReadOnly );
- QCString fromApp;
+ TQCString fromApp;
ds >> fromApp;
if (fromApp.isEmpty())
return; // Reserved for local calls
if (!d->accept_calls)
{
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
// Call rejected.
replyStream << d->appId << fromApp;
IceGetHeader( iceConn, d->majorOpcode, DCOPReplyFailed,
@@ -485,8 +485,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
return;
}
- QCString app, objId, fun;
- QByteArray data;
+ TQCString app, objId, fun;
+ TQByteArray data;
ds >> app >> objId >> fun >> data;
d->senderId = fromApp;
d->objId = objId;
@@ -507,8 +507,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
d->objId = objId;
d->function = fun;
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
bool b;
CARD32 oldCurrentKey = d->currentKey;
if ( opcode != DCOPSend ) // DCOPSend doesn't change the current key
@@ -526,8 +526,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
if ((d->currentKey == key) || (oldCurrentKey != 2))
d->currentKey = oldCurrentKey;
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
Q_INT32 id = c->transactionId();
if (id) {
@@ -609,8 +609,8 @@ DCOPClient::DCOPClient()
d->qt_bridge_enabled = true;
d->transactionList = 0L;
d->transactionId = 0;
- QObject::connect( &d->postMessageTimer, SIGNAL( timeout() ), this, SLOT( processPostedMessagesInternal() ) );
- QObject::connect( &d->eventLoopTimer, SIGNAL( timeout() ), this, SLOT( eventLoopTimeout() ) );
+ TQObject::connect( &d->postMessageTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( processPostedMessagesInternal() ) );
+ TQObject::connect( &d->eventLoopTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( eventLoopTimeout() ) );
if ( !mainClient() )
setMainClient( this );
@@ -620,16 +620,16 @@ DCOPClient::~DCOPClient()
{
#ifdef DCOPCLIENT_DEBUG
qWarning("d->messages.count() = %d", d->messages.count());
- QPtrListIterator<DCOPClientMessage> it (d->messages );
+ TQPtrListIterator<DCOPClientMessage> it (d->messages );
DCOPClientMessage* msg ;
while ( ( msg = it.current() ) ) {
++it;
d->messages.removeRef( msg );
qWarning("DROPPING UNHANDLED DCOP MESSAGE:");
qWarning(" opcode = %d key = %d", msg->opcode, msg->key);
- QDataStream ds( msg->data, IO_ReadOnly );
+ TQDataStream ds( msg->data, IO_ReadOnly );
- QCString fromApp, app, objId, fun;
+ TQCString fromApp, app, objId, fun;
ds >> fromApp >> app >> objId >> fun;
qWarning(" from = %s", fromApp.data());
qWarning(" to = %s / %s / %s", app.data(), objId.data(), fun.data());
@@ -652,9 +652,9 @@ DCOPClient::~DCOPClient()
setMainClient( 0 );
}
-void DCOPClient::setServerAddress(const QCString &addr)
+void DCOPClient::setServerAddress(const TQCString &addr)
{
- QCString env = "DCOPSERVER=" + addr;
+ TQCString env = "DCOPSERVER=" + addr;
putenv(strdup(env.data()));
delete [] DCOPClientPrivate::serverAddr;
DCOPClientPrivate::serverAddr = qstrdup( addr.data() );
@@ -671,14 +671,14 @@ bool DCOPClient::attach()
void DCOPClient::bindToApp()
{
// check if we have a qApp instantiated. If we do,
- // we can create a QSocketNotifier and use it for receiving data.
+ // we can create a TQSocketNotifier and use it for receiving data.
if (qApp) {
if ( d->notifier )
delete d->notifier;
- d->notifier = new QSocketNotifier(socket(),
- QSocketNotifier::Read, 0, 0);
- QObject::connect(d->notifier, SIGNAL(activated(int)),
- SLOT(processSocketData(int)));
+ d->notifier = new TQSocketNotifier(socket(),
+ TQSocketNotifier::Read, 0, 0);
+ TQObject::connect(d->notifier, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(processSocketData(int)));
}
}
@@ -762,7 +762,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
DCOPAuthCount,
const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0L)) < 0) {
- emit attachFailed(QString::fromLatin1( "Communications could not be established." ));
+ emit attachFailed(TQString::fromLatin1( "Communications could not be established." ));
return false;
}
@@ -771,17 +771,17 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
if (!d->serverAddr) {
// here, we obtain the list of possible DCOP connections,
// and attach to them.
- QCString dcopSrv;
+ TQCString dcopSrv;
dcopSrv = ::getenv("DCOPSERVER");
if (dcopSrv.isEmpty()) {
- QCString fName = dcopServerFile();
- QFile f(QFile::decodeName(fName));
+ TQCString fName = dcopServerFile();
+ TQFile f(TQFile::decodeName(fName));
if (!f.open(IO_ReadOnly)) {
- emit attachFailed(QString::fromLatin1( "Could not read network connection list.\n" )+QFile::decodeName(fName));
+ emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
return false;
}
int size = QMIN( 1024, f.size() ); // protection against a huge file
- QCString contents( size+1 );
+ TQCString contents( size+1 );
if ( f.readBlock( contents.data(), size ) != size )
{
qDebug("Error reading from %s, didn't read the expected %d bytes", fName.data(), size);
@@ -817,7 +817,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( errBuf ));
+ emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
}
fcntl(socket(), F_SETFL, FD_CLOEXEC);
@@ -843,7 +843,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( errBuf ));
+ emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
} else if (setupstat == IceProtocolAlreadyActive) {
if (bClearServerAddr) {
@@ -851,7 +851,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
d->serverAddr = 0;
}
/* should not happen because 3rd arg to IceOpenConnection was 0. */
- emit attachFailed(QString::fromLatin1( "internal error in IceOpenConnection" ));
+ emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" ));
return false;
}
@@ -861,7 +861,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( "DCOP server did not accept the connection." ));
+ emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." ));
return false;
}
@@ -939,14 +939,14 @@ void DCOPClient::setQtBridgeEnabled(bool b)
d->qt_bridge_enabled = b;
}
-QCString DCOPClient::registerAs( const QCString &appId, bool addPID )
+TQCString DCOPClient::registerAs( const TQCString &appId, bool addPID )
{
- QCString result;
+ TQCString result;
- QCString _appId = appId;
+ TQCString _appId = appId;
if (addPID) {
- QCString pid;
+ TQCString pid;
pid.sprintf("-%d", getpid());
_appId = _appId + pid;
}
@@ -968,12 +968,12 @@ QCString DCOPClient::registerAs( const QCString &appId, bool addPID )
}
// register the application identifier with the server
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg( data, IO_WriteOnly );
+ TQCString replyType;
+ TQByteArray data, replyData;
+ TQDataStream arg( data, IO_WriteOnly );
arg << _appId;
- if ( call( "DCOPServer", "", "registerAs(QCString)", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ if ( call( "DCOPServer", "", "registerAs(TQCString)", data, replyType, replyData ) ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
@@ -992,7 +992,7 @@ bool DCOPClient::isRegistered() const
}
-QCString DCOPClient::appId() const
+TQCString DCOPClient::appId() const
{
return d->appId;
}
@@ -1011,10 +1011,10 @@ static inline bool isIdentChar( char x )
(x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z');
}
-QCString DCOPClient::normalizeFunctionSignature( const QCString& fun ) {
+TQCString DCOPClient::normalizeFunctionSignature( const TQCString& fun ) {
if ( fun.isEmpty() ) // nothing to do
return fun.copy();
- QCString result( fun.size() );
+ TQCString result( fun.size() );
char *from = fun.data();
char *to = result.data();
char *first = to;
@@ -1039,14 +1039,14 @@ QCString DCOPClient::normalizeFunctionSignature( const QCString& fun ) {
}
-QCString DCOPClient::senderId() const
+TQCString DCOPClient::senderId() const
{
return d->senderId;
}
-bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data)
+bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data)
{
if (remApp.isEmpty())
return false;
@@ -1055,11 +1055,11 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
(void) localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
d->transaction = saveTransaction;
@@ -1078,8 +1078,8 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
DCOPMsg *pMsg;
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << remApp << remObjId << normalizeFunctionSignature(remFun) << data.size();
IceGetHeader(d->iceConn, d->majorOpcode, DCOPSend,
@@ -1099,30 +1099,30 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
return false;
}
-bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QString &data)
+bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQString &data)
{
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << data;
return send(remApp, remObjId, remFun, ba);
}
-bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop)
{
return findObject( remApp, remObj, remFun, data, foundApp, foundObj, useEventLoop, -1 );
}
-bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop, int timeout)
{
QCStringList appList;
- QCString app = remApp;
+ TQCString app = remApp;
if (app.isEmpty())
app = "*";
@@ -1156,9 +1156,9 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
it != appList.end();
++it)
{
- QCString remApp = *it;
- QCString replyType;
- QByteArray replyData;
+ TQCString remApp = *it;
+ TQCString replyType;
+ TQByteArray replyData;
bool result = false;
DCOPClient *localClient = findLocalClient( remApp );
@@ -1166,7 +1166,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
// In phase 1 we do all local clients
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
result = localClient->find( remApp, remObj, remFun, data, replyType, replyData );
@@ -1175,7 +1175,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
- QApplication::eventLoop()->processEvents( QEventLoop::WaitForMore);
+ TQApplication::eventLoop()->processEvents( TQEventLoop::WaitForMore);
} while( !localClient->isLocalTransactionFinished(id, replyType, replyData));
result = true;
}
@@ -1195,7 +1195,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
if (replyType == "DCOPRef")
{
DCOPRef ref;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> ref;
if (ref.app() == remApp) // Consistency check
@@ -1212,21 +1212,21 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
return false;
}
-bool DCOPClient::process(const QCString &, const QByteArray &,
- QCString&, QByteArray &)
+bool DCOPClient::process(const TQCString &, const TQByteArray &,
+ TQCString&, TQByteArray &)
{
return false;
}
-bool DCOPClient::isApplicationRegistered( const QCString& remApp)
+bool DCOPClient::isApplicationRegistered( const TQCString& remApp)
{
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg( data, IO_WriteOnly );
+ TQCString replyType;
+ TQByteArray data, replyData;
+ TQDataStream arg( data, IO_WriteOnly );
arg << remApp;
int result = false;
- if ( call( "DCOPServer", "", "isApplicationRegistered(QCString)", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ if ( call( "DCOPServer", "", "isApplicationRegistered(TQCString)", data, replyType, replyData ) ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
return result;
@@ -1234,25 +1234,25 @@ bool DCOPClient::isApplicationRegistered( const QCString& remApp)
QCStringList DCOPClient::registeredApplications()
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( call( "DCOPServer", "", "registeredApplications()", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
return result;
}
-QCStringList DCOPClient::remoteObjects( const QCString& remApp, bool *ok )
+QCStringList DCOPClient::remoteObjects( const TQCString& remApp, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, "DCOPClient", "objects()", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1260,15 +1260,15 @@ QCStringList DCOPClient::remoteObjects( const QCString& remApp, bool *ok )
return result;
}
-QCStringList DCOPClient::remoteInterfaces( const QCString& remApp, const QCString& remObj, bool *ok )
+QCStringList DCOPClient::remoteInterfaces( const TQCString& remApp, const TQCString& remObj, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, remObj, "interfaces()", data, replyType, replyData ) && replyType == "QCStringList") {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1276,15 +1276,15 @@ QCStringList DCOPClient::remoteInterfaces( const QCString& remApp, const QCStrin
return result;
}
-QCStringList DCOPClient::remoteFunctions( const QCString& remApp, const QCString& remObj, bool *ok )
+QCStringList DCOPClient::remoteFunctions( const TQCString& remApp, const TQCString& remObj, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, remObj, "functions()", data, replyType, replyData ) && replyType == "QCStringList") {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1294,24 +1294,24 @@ QCStringList DCOPClient::remoteFunctions( const QCString& remApp, const QCString
void DCOPClient::setNotifications(bool enabled)
{
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>(enabled);
- QCString replyType;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray reply;
if (!call("DCOPServer", "", "setNotifications( bool )", data, replyType, reply))
qWarning("I couldn't enable notifications at the dcopserver!");
}
void DCOPClient::setDaemonMode( bool daemonMode )
{
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>( daemonMode );
- QCString replyType;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray reply;
if (!call("DCOPServer", "", "setDaemonMode(bool)", data, replyType, reply))
qWarning("I couldn't enable daemon mode at the dcopserver!");
}
@@ -1323,25 +1323,25 @@ void DCOPClient::setDaemonMode( bool daemonMode )
********************************************************************************
*/
-static void fillQtObjects( QCStringList& l, QObject* o, QCString path )
+static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
{
if ( !path.isEmpty() )
path += '/';
int unnamed = 0;
- const QObjectList *list = o ? o->children() : QObject::objectTrees();
+ const TQObjectList *list = o ? o->children() : TQObject::objectTrees();
if ( list ) {
- QObjectListIt it( *list );
- QObject *obj;
+ TQObjectListIt it( *list );
+ TQObject *obj;
while ( (obj=it.current()) ) {
++it;
- QCString n = obj->name();
+ TQCString n = obj->name();
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
- n = QString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
+ n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
}
- QCString fn = path + n;
+ TQCString fn = path + n;
l.append( fn );
if ( obj->children() )
fillQtObjects( l, obj, fn );
@@ -1354,31 +1354,31 @@ namespace
struct O
{
O(): o(0) {}
- O ( const QCString& str, QObject* obj ):s(str), o(obj){}
- QCString s;
- QObject* o;
+ O ( const TQCString& str, TQObject* obj ):s(str), o(obj){}
+ TQCString s;
+ TQObject* o;
};
} // namespace
-static void fillQtObjectsEx( QValueList<O>& l, QObject* o, QCString path )
+static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
{
if ( !path.isEmpty() )
path += '/';
int unnamed = 0;
- const QObjectList *list = o ? o->children() : QObject::objectTrees();
+ const TQObjectList *list = o ? o->children() : TQObject::objectTrees();
if ( list ) {
- QObjectListIt it( *list );
- QObject *obj;
+ TQObjectListIt it( *list );
+ TQObject *obj;
while ( (obj=it.current()) ) {
++it;
- QCString n = obj->name();
+ TQCString n = obj->name();
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
- n = QString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
+ n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
}
- QCString fn = path + n;
+ TQCString fn = path + n;
l.append( O( fn, obj ) );
if ( obj->children() )
fillQtObjectsEx( l, obj, fn );
@@ -1387,14 +1387,14 @@ static void fillQtObjectsEx( QValueList<O>& l, QObject* o, QCString path )
}
-static QObject* findQtObject( QCString id )
+static TQObject* findQtObject( TQCString id )
{
- QRegExp expr( id );
- QValueList<O> l;
+ TQRegExp expr( id );
+ TQValueList<O> l;
fillQtObjectsEx( l, 0, "qt" );
// Prefer an exact match, but fall-back on the first that contains the substring
- QObject* firstContains = 0L;
- for ( QValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQObject* firstContains = 0L;
+ for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it).s == id ) // exact match
return (*it).o;
if ( !firstContains && (*it).s.contains( expr ) ) {
@@ -1404,26 +1404,26 @@ static QObject* findQtObject( QCString id )
return firstContains;
}
-static QCStringList findQtObjects( QCString id )
+static QCStringList findQtObjects( TQCString id )
{
- QRegExp expr( id );
- QValueList<O> l;
+ TQRegExp expr( id );
+ TQValueList<O> l;
fillQtObjectsEx( l, 0, "qt" );
QCStringList result;
- for ( QValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it).s.contains( expr ) )
result << (*it).s;
}
return result;
}
-static bool receiveQtObject( const QCString &objId, const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
if ( objId == "qt" ) {
if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "DCOPObject";
l << "Qt";
@@ -1431,49 +1431,49 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "QCStringList functions()";
l << "QCStringList interfaces()";
l << "QCStringList objects()";
- l << "QCStringList find(QCString)";
+ l << "QCStringList find(TQCString)";
reply << l;
return true;
} else if ( fun == "objects()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
fillQtObjects( l, 0, "qt" );
reply << l;
return true;
- } else if ( fun == "find(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString id;
+ } else if ( fun == "find(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString id;
ds >> id ;
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << findQtObjects( id ) ;
return true;
}
} else if ( objId.left(3) == "qt/" ) {
- QObject* o = findQtObject( objId );
+ TQObject* o = findQtObject( objId );
if ( !o )
return false;
if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "QCStringList functions()";
l << "QCStringList interfaces()";
l << "QCStringList properties()";
- l << "bool setProperty(QCString,QVariant)";
- l << "QVariant property(QCString)";
- QStrList lst = o->metaObject()->slotNames( true );
+ l << "bool setProperty(TQCString,TQVariant)";
+ l << "TQVariant property(TQCString)";
+ TQStrList lst = o->metaObject()->slotNames( true );
int i = 0;
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( o->metaObject()->slot( i++, true )->access != QMetaData::Public )
continue;
- QCString slot = it.current();
+ TQCString slot = it.current();
if ( slot.contains( "()" ) ) {
slot.prepend("void ");
l << slot;
@@ -1483,9 +1483,9 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
- QMetaObject *meta = o->metaObject();
+ TQMetaObject *meta = o->metaObject();
while ( meta ) {
l.prepend( meta->className() );
meta = meta->superClass();
@@ -1494,15 +1494,15 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "properties()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
- QStrList lst = o->metaObject()->propertyNames( true );
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- QMetaObject *mo = o->metaObject();
- const QMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true );
+ TQStrList lst = o->metaObject()->propertyNames( true );
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ TQMetaObject *mo = o->metaObject();
+ const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true );
if ( !p )
continue;
- QCString prop = p->type();
+ TQCString prop = p->type();
prop += ' ';
prop += p->name();
if ( !p->writable() )
@@ -1511,22 +1511,22 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
}
reply << l;
return true;
- } else if ( fun == "property(QCString)" ) {
- replyType = "QVariant";
- QDataStream ds( data, IO_ReadOnly );
- QCString name;
+ } else if ( fun == "property(TQCString)" ) {
+ replyType = "TQVariant";
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString name;
ds >> name ;
- QVariant result = o->property( name );
- QDataStream reply( replyData, IO_WriteOnly );
+ TQVariant result = o->property( name );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << result;
return true;
- } else if ( fun == "setProperty(QCString,QVariant)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString name;
- QVariant value;
+ } else if ( fun == "setProperty(TQCString,TQVariant)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString name;
+ TQVariant value;
ds >> name >> value;
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) o->setProperty( name, value );
return true;
} else {
@@ -1551,22 +1551,22 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
*/
-bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
- const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId,
+ const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
d->transaction = false; // Assume no transaction.
if ( objId == "DCOPClient" ) {
if ( fun == "objects()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
if (d->qt_bridge_enabled)
{
l << "qt"; // the Qt bridge object
}
if ( kde_dcopObjMap ) {
- QMap<QCString, DCOPObject *>::ConstIterator it( kde_dcopObjMap->begin());
+ TQMap<TQCString, DCOPObject *>::ConstIterator it( kde_dcopObjMap->begin());
for (; it != kde_dcopObjMap->end(); ++it) {
if ( !it.key().isEmpty() ) {
if ( it.key() == d->defaultObject )
@@ -1581,15 +1581,15 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
}
if ( objId.isEmpty() || objId == "DCOPClient" ) {
- if ( fun == "applicationRegistered(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString r;
+ if ( fun == "applicationRegistered(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString r;
ds >> r;
emit applicationRegistered( r );
return true;
- } else if ( fun == "applicationRemoved(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString r;
+ } else if ( fun == "applicationRemoved(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString r;
ds >> r;
emit applicationRemoved( r );
return true;
@@ -1618,7 +1618,7 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
if (!objId.isEmpty() && objId[objId.length()-1] == '*') {
// handle a multicast to several objects.
// doesn't handle proxies currently. should it?
- QPtrList<DCOPObject> matchList =
+ TQPtrList<DCOPObject> matchList =
DCOPObject::match(objId.left(objId.length()-1));
for (DCOPObject *objPtr = matchList.first();
objPtr != 0L; objPtr = matchList.next()) {
@@ -1629,7 +1629,7 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
return true;
} else if (!DCOPObject::hasObject(objId)) {
if ( DCOPObjectProxy::proxies ) {
- for ( QPtrListIterator<DCOPObjectProxy> it( *DCOPObjectProxy::proxies ); it.current(); ++it ) {
+ for ( TQPtrListIterator<DCOPObjectProxy> it( *DCOPObjectProxy::proxies ); it.current(); ++it ) {
// TODO: it.current()->setCallingDcopClient(this);
if ( it.current()->process( objId, fun, data, replyType, replyData ) )
return true;
@@ -1652,12 +1652,12 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
// Check if the function result is a bool with the value "true"
// If so set the function result to DCOPRef pointing to (app,objId) and
// return true. Return false otherwise.
-static bool findResultOk(QCString &replyType, QByteArray &replyData)
+static bool findResultOk(TQCString &replyType, TQByteArray &replyData)
{
Q_INT8 success; // Tsk.. why is there no operator>>(bool)?
if (replyType != "bool") return false;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> success;
if (!success) return false;
@@ -1666,21 +1666,21 @@ static bool findResultOk(QCString &replyType, QByteArray &replyData)
// set the function result to DCOPRef pointing to (app,objId) and
// return true.
-static bool findSuccess(const QCString &app, const QCString objId, QCString &replyType, QByteArray &replyData)
+static bool findSuccess(const TQCString &app, const TQCString objId, TQCString &replyType, TQByteArray &replyData)
{
DCOPRef ref(app, objId);
replyType = "DCOPRef";
- replyData = QByteArray();
- QDataStream final_reply( replyData, IO_WriteOnly );
+ replyData = TQByteArray();
+ TQDataStream final_reply( replyData, IO_WriteOnly );
final_reply << ref;
return true;
}
-bool DCOPClient::find(const QCString &app, const QCString &objId,
- const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPClient::find(const TQCString &app, const TQCString &objId,
+ const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
d->transaction = false; // Transactions are not allowed.
if ( !app.isEmpty() && app != d->appId && app[app.length()-1] != '*') {
@@ -1706,13 +1706,13 @@ bool DCOPClient::find(const QCString &app, const QCString &objId,
else {
// handle a multicast to several objects.
// doesn't handle proxies currently. should it?
- QPtrList<DCOPObject> matchList =
+ TQPtrList<DCOPObject> matchList =
DCOPObject::match(objId.left(objId.length()-1));
for (DCOPObject *objPtr = matchList.first();
objPtr != 0L; objPtr = matchList.next())
{
replyType = 0;
- replyData = QByteArray();
+ replyData = TQByteArray();
if (fun.isEmpty())
return findSuccess(app, objPtr->objId(), replyType, replyData);
objPtr->setCallingDcopClient(this);
@@ -1725,17 +1725,17 @@ bool DCOPClient::find(const QCString &app, const QCString &objId,
}
-bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop)
{
return call( remApp, remObjId, remFun, data, replyType, replyData, useEventLoop, -1 );
}
-bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout)
{
if (remApp.isEmpty())
@@ -1745,7 +1745,7 @@ bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
bool b = localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
@@ -1754,7 +1754,7 @@ bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
- QApplication::eventLoop()->processEvents( QEventLoop::WaitForMore);
+ TQApplication::eventLoop()->processEvents( TQEventLoop::WaitForMore);
} while( !localClient->isLocalTransactionFinished(id, replyType, replyData));
b = true;
}
@@ -1777,12 +1777,12 @@ void DCOPClient::asyncReplyReady()
}
}
-int DCOPClient::callAsync(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QObject *callBackObj, const char *callBackSlot)
+int DCOPClient::callAsync(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQObject *callBackObj, const char *callBackSlot)
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
ReplyStruct *replyStruct = new ReplyStruct;
replyStruct->replyType = new QCString;
@@ -1806,16 +1806,16 @@ int DCOPClient::callAsync(const QCString &remApp, const QCString &remObjId,
if (replyStruct->transactionId == 0)
{
// Call is finished already
- QTimer::singleShot(0, this, SLOT(asyncReplyReady()));
+ TQTimer::singleShot(0, this, TQT_SLOT(asyncReplyReady()));
d->asyncReplyQueue.append(replyStruct);
}
return replyStruct->replyId;
}
-bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout, int minor_opcode)
{
ReplyStruct replyStruct;
@@ -1824,8 +1824,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
return callInternal(remApp, remObjId, remFun, data, &replyStruct, useEventLoop, timeout, minor_opcode);
}
-bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
+bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
ReplyStruct *replyStruct,
bool useEventLoop, int timeout, int minor_opcode)
{
@@ -1838,8 +1838,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
if ( !d->currentKey )
d->currentKey = d->key; // no key yet, initiate new call
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << remApp << remObjId << normalizeFunctionSignature(remFun) << data.size();
IceGetHeader(d->iceConn, d->majorOpcode, minor_opcode,
@@ -1963,8 +1963,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
useEventLoop = false;
continue;
}
- *(replyStruct->replyType) = QCString();
- *(replyStruct->replyData) = QByteArray();
+ *(replyStruct->replyType) = TQCString();
+ *(replyStruct->replyData) = TQByteArray();
replyStruct->status = ReplyStruct::Failed;
break;
}
@@ -2020,19 +2020,19 @@ void DCOPClient::processSocketData(int fd)
}
}
-void DCOPClient::setDefaultObject( const QCString& objId )
+void DCOPClient::setDefaultObject( const TQCString& objId )
{
d->defaultObject = objId;
}
-QCString DCOPClient::defaultObject() const
+TQCString DCOPClient::defaultObject() const
{
return d->defaultObject;
}
bool
-DCOPClient::isLocalTransactionFinished(Q_INT32 id, QCString &replyType, QByteArray &replyData)
+DCOPClient::isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData)
{
DCOPClientPrivate::LocalTransactionResult *result = d->localTransActionList.take(id);
if (!result)
@@ -2051,7 +2051,7 @@ DCOPClient::beginTransaction()
if (d->opcode == DCOPSend)
return 0;
if (!d->transactionList)
- d->transactionList = new QPtrList<DCOPClientTransaction>;
+ d->transactionList = new TQPtrList<DCOPClientTransaction>;
d->transaction = true;
DCOPClientTransaction *trans = new DCOPClientTransaction();
@@ -2076,8 +2076,8 @@ DCOPClient::transactionId() const
}
void
-DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
- QByteArray &replyData)
+DCOPClient::endTransaction( DCOPClientTransaction *trans, TQCString& replyType,
+ TQByteArray &replyData)
{
if ( !trans )
return;
@@ -2111,8 +2111,8 @@ DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
DCOPMsg *pMsg;
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << trans->senderId << trans->id << replyType << replyData;
IceGetHeader(d->iceConn, d->majorOpcode, DCOPReplyDelayed,
@@ -2126,32 +2126,32 @@ DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
}
void
-DCOPClient::emitDCOPSignal( const QCString &object, const QCString &signal, const QByteArray &data)
+DCOPClient::emitDCOPSignal( const TQCString &object, const TQCString &signal, const TQByteArray &data)
{
// We hack the sending object name into the signal name
send("DCOPServer", "emit", object+"#"+normalizeFunctionSignature(signal), data);
}
void
-DCOPClient::emitDCOPSignal( const QCString &signal, const QByteArray &data)
+DCOPClient::emitDCOPSignal( const TQCString &signal, const TQByteArray &data)
{
emitDCOPSignal(0, signal, data);
}
bool
-DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot, bool Volatile)
+DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot, bool Volatile)
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
Q_INT8 iVolatile = Volatile ? 1 : 0;
- QDataStream args(data, IO_WriteOnly );
+ TQDataStream args(data, IO_WriteOnly );
args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot) << iVolatile;
if (!call("DCOPServer", 0,
- "connectSignal(QCString,QCString,QCString,QCString,QCString,bool)",
+ "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)",
data, replyType, replyData))
{
return false;
@@ -2160,32 +2160,32 @@ DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &senderObj
if (replyType != "bool")
return false;
- QDataStream reply(replyData, IO_ReadOnly );
+ TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
reply >> result;
return (result != 0);
}
bool
-DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot, bool Volatile)
+DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot, bool Volatile)
{
return connectDCOPSignal( sender, 0, signal, receiverObj, slot, Volatile);
}
bool
-DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot)
+DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot)
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
- QDataStream args(data, IO_WriteOnly );
+ TQDataStream args(data, IO_WriteOnly );
args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot);
if (!call("DCOPServer", 0,
- "disconnectSignal(QCString,QCString,QCString,QCString,QCString)",
+ "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)",
data, replyType, replyData))
{
return false;
@@ -2194,15 +2194,15 @@ DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &sender
if (replyType != "bool")
return false;
- QDataStream reply(replyData, IO_ReadOnly );
+ TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
reply >> result;
return (result != 0);
}
bool
-DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot)
+DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot)
{
return disconnectDCOPSignal( sender, 0, signal, receiverObj, slot);
}
@@ -2232,10 +2232,10 @@ DCOPClient::setPriorityCall(bool b)
void
DCOPClient::emergencyClose()
{
- QPtrList<DCOPClient> list;
+ TQPtrList<DCOPClient> list;
client_map_t *map = DCOPClient_CliMap;
if (!map) return;
- QAsciiDictIterator<DCOPClient> it(*map);
+ TQAsciiDictIterator<DCOPClient> it(*map);
while(it.current()) {
list.removeRef(it.current());
list.append(it.current());
diff --git a/dcop/dcopclient.h b/dcop/dcopclient.h
index 2024aeaeb..41266c187 100644
--- a/dcop/dcopclient.h
+++ b/dcop/dcopclient.h
@@ -23,10 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPCLIENT_H
#define _DCOPCLIENT_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include <kdelibs_export.h>
@@ -34,7 +34,7 @@ class DCOPObjectProxy;
class DCOPClientPrivate;
class DCOPClientTransaction;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* Inter-process communication and remote procedure calls
@@ -51,15 +51,15 @@ typedef QValueList<QCString> QCStringList;
* and registerAs() for
* more information.
*
- * Data to be sent should be serialized into a QDataStream which was
- * initialized with the QByteArray that you actually intend to send
+ * Data to be sent should be serialized into a TQDataStream which was
+ * initialized with the TQByteArray that you actually intend to send
* the data in. An example of how you might do this:
*
* \code
- * QByteArray data;
- * QDataStream arg(data, IO_WriteOnly);
- * arg << QString("This is text I am serializing");
- * client->send("someApp", "someObject", "someFunction(QString)", data);
+ * TQByteArray data;
+ * TQDataStream arg(data, IO_WriteOnly);
+ * arg << TQString("This is text I am serializing");
+ * client->send("someApp", "someObject", "someFunction(TQString)", data);
* \endcode
*
* @see KApplication::dcopClient()
@@ -86,7 +86,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* find the server anyway.
* @param addr the new address of the server
*/
- static void setServerAddress(const QCString &addr);
+ static void setServerAddress(const TQCString &addr);
/**
* Attaches to the DCOP server.
@@ -96,9 +96,9 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* Naturally, only attached application can use DCOP services.
*
- * If a QApplication object exists then client registers itself as
- * QApplication::name() + "-" + \<pid\>.
- * If no QApplication object exists the client registers itself as
+ * If a TQApplication object exists then client registers itself as
+ * TQApplication::name() + "-" + \<pid\>.
+ * If no TQApplication object exists the client registers itself as
* "anonymous".
*
* If you want to register differently, you should use registerAs()
@@ -191,7 +191,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return The actual @p appId used for the registration or a null string
* if the registration wasn't successful.
*/
- QCString registerAs( const QCString &appId, bool addPID = true );
+ TQCString registerAs( const TQCString &appId, bool addPID = true );
/**
* Returns whether or not the client is registered at the server.
@@ -202,9 +202,9 @@ class DCOP_EXPORT DCOPClient : public QObject
/**
* Returns the current app id or a null string if the application
* hasn't yet been registered.
- * @return the application id, or QString::null if not registered
+ * @return the application id, or TQString::null if not registered
*/
- QCString appId() const;
+ TQCString appId() const;
/**
* Returns the socket fd that is used for communication with the server.
@@ -251,12 +251,12 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @return Whether or not the server was able to accept the send.
*/
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data);
+ bool send(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data);
/**
* This function acts exactly the same as the above, but the data
- * parameter can be specified as a QString for convenience.
+ * parameter can be specified as a TQString for convenience.
*
* @param remApp The remote application id.
* @param remObj The name of the remote object.
@@ -265,14 +265,14 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @return Whether or not the server was able to accept the send.
*/
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QString &data);
+ bool send(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQString &data);
/**
* Performs a synchronous send and receive.
*
* The parameters are the same as for send, with the exception of
- * another QByteArray being provided for results to be
+ * another TQByteArray being provided for results to be
* (optionally) returned in.
*
* A call blocks the application until the process receives the
@@ -297,17 +297,17 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @see send()
*/
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool call(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop/*=false*/, int timeout/*=-1*/);
/**
* @deprecated
*/
// KDE4 merge with above
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool call(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop=false);
/**
@@ -319,8 +319,8 @@ class DCOP_EXPORT DCOPClient : public QObject
* slot that is called when an answer is received.
*
* The slot should have the following signature:
- * callBackSlot(int callId, const QCString& replyType,
- * const QByteArray &replyData);
+ * callBackSlot(int callId, const TQCString& replyType,
+ * const TQByteArray &replyData);
*
*
* @param remApp the remote application's id
@@ -338,9 +338,9 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @since 3.2
*/
- int callAsync(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QObject *callBackObj, const char *callBackSlot);
+ int callAsync(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQObject *callBackObj, const char *callBackSlot);
/**
* Searches for an object which matches a criteria.
@@ -378,18 +378,18 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @see send()
*/
- bool findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+ bool findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop/*=false*/, int timeout/*=-1*/);
/**
* @deprecated
*/
// KDE4 merge with above
- bool findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+ bool findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop=false);
@@ -397,11 +397,11 @@ class DCOP_EXPORT DCOPClient : public QObject
* Emits @p signal as DCOP signal from object @p object with @p data as
* arguments.
*/
- void emitDCOPSignal( const QCString &object, const QCString &signal,
- const QByteArray &data);
+ void emitDCOPSignal( const TQCString &object, const TQCString &signal,
+ const TQByteArray &data);
/* For backwards compatibility */
- void emitDCOPSignal( const QCString &signal, const QByteArray &data);
+ void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
/**
* Connects to a DCOP signal.
@@ -423,17 +423,17 @@ class DCOP_EXPORT DCOPClient : public QObject
* @li @p Volatile is true and @p sender does not exist.
* @li @p signal and @p slot do not have matching arguments.
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot,
bool Volatile);
/**
* @deprecated
* For backwards compatibility
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot,
bool Volatile) KDE_DEPRECATED;
/**
@@ -453,16 +453,16 @@ class DCOP_EXPORT DCOPClient : public QObject
* If empty all slots will be disconnected.
* @return false if no connection(s) where removed.
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot);
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot);
/**
* @deprecated
* For backwards compatibility
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot) KDE_DEPRECATED;
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot) KDE_DEPRECATED;
/**
* Reimplement this function to handle app-wide function calls unassociated w/an object.
@@ -479,8 +479,8 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return true if successful, false otherwise
* @see setDefaultObject()
*/
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* Delays the reply of the current function call
@@ -500,7 +500,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param replyData write the reply data in this array
* @see beginTransaction()
*/
- void endTransaction( DCOPClientTransaction *t, QCString& replyType, QByteArray &replyData);
+ void endTransaction( DCOPClientTransaction *t, TQCString& replyType, TQByteArray &replyData);
/**
* Test whether the current function call is delayed.
@@ -518,7 +518,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param remApp the id of the remote application
* @return true if the remote application is registered, otherwise @p false.
*/
- bool isApplicationRegistered( const QCString& remApp);
+ bool isApplicationRegistered( const TQCString& remApp);
/**
* Retrieves the list of all currently registered applications
@@ -534,7 +534,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of object ids
*/
- QCStringList remoteObjects( const QCString& remApp, bool *ok = 0 );
+ QCStringList remoteObjects( const TQCString& remApp, bool *ok = 0 );
/**
* Retrieves the list of interfaces of the remote object @p remObj
@@ -545,7 +545,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of interfaces
*/
- QCStringList remoteInterfaces( const QCString& remApp, const QCString& remObj , bool *ok = 0 );
+ QCStringList remoteInterfaces( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
/**
* Retrieves the list of functions of the remote object @p remObj
@@ -556,7 +556,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of function ids
*/
- QCStringList remoteFunctions( const QCString& remApp, const QCString& remObj , bool *ok = 0 );
+ QCStringList remoteFunctions( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
/**
* @internal
@@ -572,9 +572,9 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param replyData write the reply data in this array
* @return true if successful, false otherwise
*/
- bool receive(const QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData);
+ bool receive(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* @internal
@@ -589,9 +589,9 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param replyType write the reply type in this string
* @param replyData write the reply data in this array
*/
- bool find(const QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData);
+ bool find(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* Normalizes the function signature @p fun.
@@ -601,7 +601,7 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* Example for a normalized signature:
* \code
- * "someFunction(QString,int)"
+ * "someFunction(TQString,int)"
* \endcode
*
* When using send() or call(), normalization is done
@@ -610,7 +610,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param fun the function signature to normalize
* @return the normalized function
*/
- static QCString normalizeFunctionSignature( const QCString& fun );
+ static TQCString normalizeFunctionSignature( const TQCString& fun );
/**
@@ -618,7 +618,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return the application id of the last application that send a message
* to this client
*/
- QCString senderId() const;
+ TQCString senderId() const;
/**
@@ -628,7 +628,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* will be send further to @p objId.
* @param objId the id of the new default object
*/
- void setDefaultObject( const QCString& objId );
+ void setDefaultObject( const TQCString& objId );
/**
* Returns the current default object or an empty string if no object is
@@ -638,7 +638,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* been processed by the DCOPClient itself.
* @return the id of the new default object
*/
- QCString defaultObject() const;
+ TQCString defaultObject() const;
/**
* Enables / disables the applicationRegistered() /
@@ -693,7 +693,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* to check whether a given client (by name) is running in the same
* process or in another one.
*/
- static DCOPClient* findLocalClient( const QCString &_appId );
+ static DCOPClient* findLocalClient( const TQCString &_appId );
/**
* @internal Do not use.
@@ -718,19 +718,19 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return Filename that contains information how to contact the
* DCOPserver.
*/
- static QCString dcopServerFile(const QCString &hostname=0);
+ static TQCString dcopServerFile(const TQCString &hostname=0);
/**
* @deprecated
* For backwards compatibility with KDE 2.x
* // KDE4 remove
*/
- static QCString dcopServerFileOld(const QCString &hostname=0) KDE_DEPRECATED;
+ static TQCString dcopServerFileOld(const TQCString &hostname=0) KDE_DEPRECATED;
/**
* Return the path of iceauth or an empty string if not found.
*/
- static QCString iceauthPath();
+ static TQCString iceauthPath();
signals:
/**
@@ -741,7 +741,7 @@ signals:
* that you want to get these events.
* @param appId the id of the new application
*/
- void applicationRegistered( const QCString& appId );
+ void applicationRegistered( const TQCString& appId );
/**
* Indicates that the formerly registered application @p appId has
* been removed.
@@ -750,7 +750,7 @@ signals:
* DCOP server that you want to get these events.
* @param appId the id of the removed application
*/
- void applicationRemoved( const QCString& appId );
+ void applicationRemoved( const TQCString& appId );
/**
* Indicates that the process of establishing DCOP communications failed
@@ -760,7 +760,7 @@ signals:
* aid.
* @param msg the message tha contains further information
*/
- void attachFailed(const QString &msg);
+ void attachFailed(const TQString &msg);
/**
* Indicates that user input shall be blocked or released,
@@ -790,7 +790,7 @@ signals:
* @see callAsync()
* @since 3.2
*/
- void callBack(int, const QCString&, const QByteArray &);
+ void callBack(int, const TQCString&, const TQByteArray &);
public slots:
/**
@@ -816,18 +816,18 @@ public:
private:
- bool isLocalTransactionFinished(Q_INT32 id, QCString &replyType, QByteArray &replyData);
+ bool isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData);
bool attachInternal( bool registerAsAnonymous = true );
- bool callInternal(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool callInternal(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout, int minor_opcode);
- bool callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
+ bool callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
ReplyStruct *replyStruct,
bool useEventLoop, int timeout, int minor_opcode);
diff --git a/dcop/dcopidl/dcopidl_test.h b/dcop/dcopidl/dcopidl_test.h
index a902be4fd..6d57167e2 100644
--- a/dcop/dcopidl/dcopidl_test.h
+++ b/dcop/dcopidl/dcopidl_test.h
@@ -12,9 +12,9 @@
class Test2;
// this has to work too
-#include <qstring.h>
+#include <tqstring.h>
-typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
class Test3;
// Those namespaces are opened and closed, so they should be just ignored
@@ -31,7 +31,7 @@ namespace KMail {
* blah di blah
**/
class KDEUI_EXPORT Test : public MyNamespace::MyParentClass, virtual public DCOPObject,
- public QValueList<QString>
+ public TQValueList<TQString>
{
K_DCOP
@@ -45,7 +45,7 @@ public:
~Test();
int getPageOfObj( int obj );
void setCell( KSpreadTable *table,
- const QPoint& point );
+ const TQPoint& point );
SomeForwardFooPrivate *d;
static const int AUDIO_CD = 1;
@@ -54,8 +54,8 @@ public:
enum { Enum1, Enum2 };
enum NamedEnum { Enum3, Enum4 };
k_dcop:
- virtual QString url();
- virtual QString constTest() const;
+ virtual TQString url();
+ virtual TQString constTest() const;
virtual DCOPRef firstView();
virtual DCOPRef nextView();
virtual int getNumObjects();
@@ -68,8 +68,8 @@ k_dcop:
**/
int getPageOfObj( int obj );
void setCell( const int& point = 3 );
- QValueList<DCOPRef> getWindows();
- const QStringList remotes(); // returns const type, but shouldn't use const var for it in stub
+ TQValueList<DCOPRef> getWindows();
+ const TQStringList remotes(); // returns const type, but shouldn't use const var for it in stub
k_dcop_signals:
void blah_signal();
@@ -78,7 +78,7 @@ private:
Test3 *doc();
struct KIODownload;
- typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+ typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
};
class Test2 : public DCOPObject
diff --git a/dcop/dcopidl/main.cpp b/dcop/dcopidl/main.cpp
index 03e0a6465..aa60e2c41 100644
--- a/dcop/dcopidl/main.cpp
+++ b/dcop/dcopidl/main.cpp
@@ -20,9 +20,9 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qstring.h>
-#include <qfile.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
#include <stdlib.h>
void dcopidlParse( const char *_code );
@@ -40,14 +40,14 @@ int main( int argc, char** argv )
fprintf(stderr, "Usage : dcopidl input_file\n");
return -1;
}
- QFile file( argv[1] );
+ TQFile file( argv[1] );
if ( !file.open( IO_ReadOnly ) )
{
fprintf(stderr, "Can't open input file\n");
return -1;
}
- QByteArray arr = file.readAll();
+ TQByteArray arr = file.readAll();
uint len = arr.size();
uint j = 1;
for (uint i = 1; i<len; i++, j++) {
diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc
index 4926e0421..92c08583f 100644
--- a/dcop/dcopidl/scanner.cc
+++ b/dcop/dcopidl/scanner.cc
@@ -849,8 +849,8 @@ extern int idl_line_no;
int comment_mode;
int function_mode = 0;
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
static long ascii_to_longlong( long base, const char *s )
{
@@ -1225,10 +1225,10 @@ case 10:
YY_RULE_SETUP
#line 170 "scanner.ll"
{
- QString s( yytext );
- int i = s.find(QRegExp("[\"<]"))+1;
- int j = s.find(QRegExp("[\">]"), i);
- yylval._str = new QString( s.mid( i, j - i ) );
+ TQString s( yytext );
+ int i = s.find(TQRegExp("[\"<]"))+1;
+ int j = s.find(TQRegExp("[\">]"), i);
+ yylval._str = new TQString( s.mid( i, j - i ) );
idl_line_no++;
return T_INCLUDE;
}
@@ -1539,7 +1539,7 @@ case 71:
YY_RULE_SETUP
#line 243 "scanner.ll"
{
- yylval._str = new QString( yytext );
+ yylval._str = new TQString( yytext );
return T_IDENTIFIER;
}
YY_BREAK
@@ -1587,7 +1587,7 @@ case 80:
YY_RULE_SETUP
#line 268 "scanner.ll"
{
- QCString s( yytext );
+ TQCString s( yytext );
s = s.mid( 1, s.length() - 2 );
yylval._char = translate_char( s );
return T_CHARACTER_LITERAL;
@@ -1597,8 +1597,8 @@ case 81:
YY_RULE_SETUP
#line 274 "scanner.ll"
{
- QString s( yytext );
- yylval._str = new QString( s.mid( 1, s.length() - 2 ) );
+ TQString s( yytext );
+ yylval._str = new TQString( s.mid( 1, s.length() - 2 ) );
return T_STRING_LITERAL;
}
YY_BREAK
diff --git a/dcop/dcopidl/yacc.cc b/dcop/dcopidl/yacc.cc
index 4147a3472..d41fa6dbd 100644
--- a/dcop/dcopidl/yacc.cc
+++ b/dcop/dcopidl/yacc.cc
@@ -226,21 +226,21 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <assert.h>
-#include <qstring.h>
+#include <tqstring.h>
#define AMP_ENTITY "&amp;"
#define YYERROR_VERBOSE
extern int yylex();
-// extern QString idl_lexFile;
+// extern TQString idl_lexFile;
extern int idl_line_no;
extern int function_mode;
static int dcop_area = 0;
static int dcop_signal_area = 0;
-static QString in_namespace( "" );
+static TQString in_namespace( "" );
void dcopidlInitFlex( const char *_code );
@@ -270,7 +270,7 @@ void yyerror( const char *s )
#line 67 "yacc.yy"
typedef union YYSTYPE {
long _int;
- QString *_str;
+ TQString *_str;
unsigned short _char;
double _float;
} YYSTYPE;
@@ -1757,7 +1757,7 @@ yyreduce:
case 41:
#line 308 "yacc.yy"
{
- QString* tmp = new QString( "%1::%2" );
+ TQString* tmp = new TQString( "%1::%2" );
*tmp = tmp->arg(*(yyvsp[-2]._str)).arg(*(yyvsp[0]._str));
yyval._str = tmp;
;}
@@ -1766,7 +1766,7 @@ yyreduce:
case 42:
#line 317 "yacc.yy"
{
- QString* tmp = new QString( " <SUPER>%1</SUPER>\n" );
+ TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" );
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -1775,7 +1775,7 @@ yyreduce:
case 43:
#line 323 "yacc.yy"
{
- QString* tmp = new QString( " <SUPER>%1</SUPER>\n" );
+ TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" );
*tmp = tmp->arg( *(yyvsp[-3]._str) + "&lt;" + *(yyvsp[-1]._str) + "&gt;" );
yyval._str = tmp;
;}
@@ -1806,7 +1806,7 @@ yyreduce:
#line 347 "yacc.yy"
{
/* $$ = $1; */
- yyval._str = new QString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -1820,7 +1820,7 @@ yyreduce:
case 49:
#line 359 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
@@ -1833,28 +1833,28 @@ yyreduce:
case 52:
#line 373 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
case 53:
#line 377 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
case 54:
#line 381 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
case 55:
#line 385 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -2003,11 +2003,11 @@ yyreduce:
#line 475 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n");
+ TQString* tmp = new TQString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n");
*tmp = tmp->arg( *(yyvsp[-1]._str) ).arg( *(yyvsp[-5]._str) ).arg( *(yyvsp[-3]._str) );
yyval._str = tmp;
} else {
- yyval._str = new QString("");
+ yyval._str = new TQString("");
}
;}
break;
@@ -2036,115 +2036,115 @@ yyreduce:
case 89:
#line 503 "yacc.yy"
- { yyval._str = new QString("signed int"); ;}
+ { yyval._str = new TQString("signed int"); ;}
break;
case 90:
#line 504 "yacc.yy"
- { yyval._str = new QString("signed int"); ;}
+ { yyval._str = new TQString("signed int"); ;}
break;
case 91:
#line 505 "yacc.yy"
- { yyval._str = new QString("unsigned int"); ;}
+ { yyval._str = new TQString("unsigned int"); ;}
break;
case 92:
#line 506 "yacc.yy"
- { yyval._str = new QString("unsigned int"); ;}
+ { yyval._str = new TQString("unsigned int"); ;}
break;
case 93:
#line 507 "yacc.yy"
- { yyval._str = new QString("signed short int"); ;}
+ { yyval._str = new TQString("signed short int"); ;}
break;
case 94:
#line 508 "yacc.yy"
- { yyval._str = new QString("signed short int"); ;}
+ { yyval._str = new TQString("signed short int"); ;}
break;
case 95:
#line 509 "yacc.yy"
- { yyval._str = new QString("signed long int"); ;}
+ { yyval._str = new TQString("signed long int"); ;}
break;
case 96:
#line 510 "yacc.yy"
- { yyval._str = new QString("signed long int"); ;}
+ { yyval._str = new TQString("signed long int"); ;}
break;
case 97:
#line 511 "yacc.yy"
- { yyval._str = new QString("unsigned short int"); ;}
+ { yyval._str = new TQString("unsigned short int"); ;}
break;
case 98:
#line 512 "yacc.yy"
- { yyval._str = new QString("unsigned short int"); ;}
+ { yyval._str = new TQString("unsigned short int"); ;}
break;
case 99:
#line 513 "yacc.yy"
- { yyval._str = new QString("unsigned long int"); ;}
+ { yyval._str = new TQString("unsigned long int"); ;}
break;
case 100:
#line 514 "yacc.yy"
- { yyval._str = new QString("unsigned long int"); ;}
+ { yyval._str = new TQString("unsigned long int"); ;}
break;
case 101:
#line 515 "yacc.yy"
- { yyval._str = new QString("int"); ;}
+ { yyval._str = new TQString("int"); ;}
break;
case 102:
#line 516 "yacc.yy"
- { yyval._str = new QString("long int"); ;}
+ { yyval._str = new TQString("long int"); ;}
break;
case 103:
#line 517 "yacc.yy"
- { yyval._str = new QString("long int"); ;}
+ { yyval._str = new TQString("long int"); ;}
break;
case 104:
#line 518 "yacc.yy"
- { yyval._str = new QString("short int"); ;}
+ { yyval._str = new TQString("short int"); ;}
break;
case 105:
#line 519 "yacc.yy"
- { yyval._str = new QString("short int"); ;}
+ { yyval._str = new TQString("short int"); ;}
break;
case 106:
#line 520 "yacc.yy"
- { yyval._str = new QString("char"); ;}
+ { yyval._str = new TQString("char"); ;}
break;
case 107:
#line 521 "yacc.yy"
- { yyval._str = new QString("signed char"); ;}
+ { yyval._str = new TQString("signed char"); ;}
break;
case 108:
#line 522 "yacc.yy"
- { yyval._str = new QString("unsigned char"); ;}
+ { yyval._str = new TQString("unsigned char"); ;}
break;
case 111:
#line 532 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
case 113:
#line 537 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -2166,7 +2166,7 @@ yyreduce:
case 118:
#line 548 "yacc.yy"
{
- QString *tmp = new QString("%1&lt;%2&gt;");
+ TQString *tmp = new TQString("%1&lt;%2&gt;");
*tmp = tmp->arg(*(yyvsp[-3]._str));
*tmp = tmp->arg(*(yyvsp[-1]._str));
yyval._str = tmp;
@@ -2176,7 +2176,7 @@ yyreduce:
case 119:
#line 554 "yacc.yy"
{
- QString *tmp = new QString("%1&lt;%2&gt;::%3");
+ TQString *tmp = new TQString("%1&lt;%2&gt;::%3");
*tmp = tmp->arg(*(yyvsp[-5]._str));
*tmp = tmp->arg(*(yyvsp[-3]._str));
*tmp = tmp->arg(*(yyvsp[0]._str));
@@ -2187,7 +2187,7 @@ yyreduce:
case 120:
#line 566 "yacc.yy"
{
- yyval._str = new QString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
+ yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
;}
break;
@@ -2225,7 +2225,7 @@ yyreduce:
#line 596 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
}
@@ -2235,7 +2235,7 @@ yyreduce:
case 126:
#line 603 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -2244,7 +2244,7 @@ yyreduce:
case 127:
#line 608 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
;}
@@ -2254,7 +2254,7 @@ yyreduce:
#line 613 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-2]._str) );
yyval._str = tmp;
}
@@ -2272,7 +2272,7 @@ yyreduce:
case 130:
#line 625 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -2289,7 +2289,7 @@ yyreduce:
case 132:
#line 639 "yacc.yy"
{
- yyval._str = new QString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
+ yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
;}
break;
@@ -2304,11 +2304,11 @@ yyreduce:
#line 650 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("\n <ARG>%1<NAME>%2</NAME></ARG>");
+ TQString* tmp = new TQString("\n <ARG>%1<NAME>%2</NAME></ARG>");
*tmp = tmp->arg( *(yyvsp[-2]._str) );
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
- } else yyval._str = new QString();
+ } else yyval._str = new TQString();
;}
break;
@@ -2316,10 +2316,10 @@ yyreduce:
#line 659 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("\n <ARG>%1</ARG>");
+ TQString* tmp = new TQString("\n <ARG>%1</ARG>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
- } else yyval._str = new QString();
+ } else yyval._str = new TQString();
;}
break;
@@ -2328,7 +2328,7 @@ yyreduce:
{
if (dcop_area)
yyerror("variable arguments not supported in dcop area.");
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2394,8 +2394,8 @@ yyreduce:
#line 716 "yacc.yy"
{
if (dcop_area || dcop_signal_area) {
- QString* tmp = 0;
- tmp = new QString(
+ TQString* tmp = 0;
+ tmp = new TQString(
" <%4>\n"
" %2\n"
" <NAME>%1</NAME>"
@@ -2405,13 +2405,13 @@ yyreduce:
*tmp = tmp->arg( *(yyvsp[-5]._str) );
*tmp = tmp->arg( *(yyvsp[-2]._str) );
- QString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC";
- QString attr = (yyvsp[0]._int) ? " qual=\"const\"" : "";
- *tmp = tmp->arg( QString("%1%2").arg(tagname).arg(attr) );
- *tmp = tmp->arg( QString("%1").arg(tagname) );
+ TQString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC";
+ TQString attr = (yyvsp[0]._int) ? " qual=\"const\"" : "";
+ *tmp = tmp->arg( TQString("%1%2").arg(tagname).arg(attr) );
+ *tmp = tmp->arg( TQString("%1").arg(tagname) );
yyval._str = tmp;
} else
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2420,7 +2420,7 @@ yyreduce:
{
if (dcop_area)
yyerror("operators aren't allowed in dcop areas!");
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2480,7 +2480,7 @@ yyreduce:
{
/* The constructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2489,7 +2489,7 @@ yyreduce:
{
/* The constructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2498,7 +2498,7 @@ yyreduce:
{
/* The destructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2511,7 +2511,7 @@ yyreduce:
else
yyerror("DCOP functions cannot be static");
} else {
- yyval._str = new QString();
+ yyval._str = new TQString();
}
;}
break;
diff --git a/dcop/dcopidl/yacc.cc.h b/dcop/dcopidl/yacc.cc.h
index b056f2922..af3f8d088 100644
--- a/dcop/dcopidl/yacc.cc.h
+++ b/dcop/dcopidl/yacc.cc.h
@@ -167,7 +167,7 @@
#line 67 "yacc.yy"
typedef union YYSTYPE {
long _int;
- QString *_str;
+ TQString *_str;
unsigned short _char;
double _float;
} YYSTYPE;
diff --git a/dcop/dcopidl2cpp/dcopidl_test.h b/dcop/dcopidl2cpp/dcopidl_test.h
index a6c625abe..8a2436c6c 100644
--- a/dcop/dcopidl2cpp/dcopidl_test.h
+++ b/dcop/dcopidl2cpp/dcopidl_test.h
@@ -8,27 +8,27 @@
// stub:
// - includes to super relationship, a bit much to test, needs multiple files?
-class KDEUI_EXPORT DefaultTest : public QObject, virtual public DCOPObject
+class KDEUI_EXPORT DefaultTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
DefaultTest();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
k_dcop:
void noArgsTest();
- void argsTest( QString filename, QString url );
- void unNamedArgsTest( QString, QString );
+ void argsTest( TQString filename, TQString url );
+ void unNamedArgsTest( TQString, TQString );
- void constTest( QString, QString ) const;
- QStringList writeTypeTest( const QString &, QPtrList<int> );
+ void constTest( TQString, TQString ) const;
+ TQStringList writeTypeTest( const TQString &, TQPtrList<int> );
- void voidReturnType( QString filename, QString url, QString text, QString address, QString icon );
- QString nonVoidReturnType( QString filename, QString text, QString address );
- int intReturnType( QString filename, QString text, QString address );
- bool boolReturnType( QString filename, QString text, QString address );
+ void voidReturnType( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ TQString nonVoidReturnType( TQString filename, TQString text, TQString address );
+ int intReturnType( TQString filename, TQString text, TQString address );
+ bool boolReturnType( TQString filename, TQString text, TQString address );
- ASYNC asyncTest( QString filename, QString text, QString address );
+ ASYNC asyncTest( TQString filename, TQString text, TQString address );
};
namespace TestNamespace {
@@ -38,7 +38,7 @@ namespace TestNamespace {
public:
NamespaceTest();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
}
@@ -48,7 +48,7 @@ class NoSuper
public:
NoSuper();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NonDCOPObject : public MyDCOPObjectBase
@@ -57,7 +57,7 @@ class NonDCOPObject : public MyDCOPObjectBase
public:
NonDCOPObject();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NoFunctions : public DCOPObject
@@ -65,45 +65,45 @@ class NoFunctions : public DCOPObject
K_DCOP
public:
NonDCOPObject();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
-class NonHashingTest : public QObject, virtual public DCOPObject
+class NonHashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
NonHashingTest();
k_dcop:
- void function1( QString );
+ void function1( TQString );
};
-class HashingTest : public QObject, virtual public DCOPObject
+class HashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
HashingTest();
k_dcop:
- void function1( QString );
- void function2( QString, QString );
- void function3( QString, QString, QString );
- void function4( QString, QString, QString, QString );
- void function5( QString, QString, QString, QString, QString );
- void function6( QString, QString, QString, QString, QString, QString );
- void function7( QString, QString, QString, QString, QString, QString, QString );
- void function8( QString, QString, QString, QString, QString, QString, QString, QString );
+ void function1( TQString );
+ void function2( TQString, TQString );
+ void function3( TQString, TQString, TQString );
+ void function4( TQString, TQString, TQString, TQString );
+ void function5( TQString, TQString, TQString, TQString, TQString );
+ void function6( TQString, TQString, TQString, TQString, TQString, TQString );
+ void function7( TQString, TQString, TQString, TQString, TQString, TQString, TQString );
+ void function8( TQString, TQString, TQString, TQString, TQString, TQString, TQString, TQString );
};
class SignalTest : virtual public DCOPObject
{
K_DCOP
public:
- SignalTest(QCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
+ SignalTest(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
k_dcop_signals:
- void signal1( QString filename, QString url, QString text, QString address, QString icon );
- void signal2( QString filename, QString text, QString address );
- void signal3( QString filename, QString url );
+ void signal1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ void signal2( TQString filename, TQString text, TQString address );
+ void signal3( TQString filename, TQString url );
};
#endif // end
diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp
index 32d128c30..5e0f27525 100644
--- a/dcop/dcopidl2cpp/main.cpp
+++ b/dcop/dcopidl2cpp/main.cpp
@@ -20,10 +20,10 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <string.h>
#include <stdlib.h>
@@ -53,7 +53,7 @@ int main( int argc, char** argv )
bool generate_skel = true;
bool generate_stub = true;
- QString suffix = "cpp";
+ TQString suffix = "cpp";
while (argc > 2) {
@@ -91,18 +91,18 @@ int main( int argc, char** argv )
}
}
- QFile in( QFile::decodeName(argv[argpos]) );
+ TQFile in( TQFile::decodeName(argv[argpos]) );
if ( !in.open( IO_ReadOnly ) )
qFatal("Could not read %s", argv[argpos] );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &in );
- QDomElement de = doc.documentElement();
+ TQDomElement de = doc.documentElement();
Q_ASSERT( de.tagName() == "DCOP-IDL" );
- QString base( argv[argpos] );
- QString idl = base;
+ TQString base( argv[argpos] );
+ TQString idl = base;
int pos = base.findRev( '.' );
if ( pos != -1 )
@@ -116,7 +116,7 @@ int main( int argc, char** argv )
generateSkel( idl, base + "_skel." + suffix, de );
if ( generate_stub ) {
- QString header = base;
+ TQString header = base;
generateStub( idl, header + "_stub.h", de );
pos = header.findRev('/');
if ( pos != -1 )
diff --git a/dcop/dcopidl2cpp/main.h b/dcop/dcopidl2cpp/main.h
index a0ecdb250..dd3c4d115 100644
--- a/dcop/dcopidl2cpp/main.h
+++ b/dcop/dcopidl2cpp/main.h
@@ -20,21 +20,21 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
/**
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de );
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de );
/**
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de);
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de);
/**
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& headerBase, const QString& filename, QDomElement de);
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& headerBase, const TQString& filename, TQDomElement de);
diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp
index fe79aec92..9ab0c763d 100644
--- a/dcop/dcopidl2cpp/skel.cpp
+++ b/dcop/dcopidl2cpp/skel.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -52,11 +52,11 @@ static int const primes[] =
struct Function
{
Function(){}
- Function( const QString& t, const QString& n, const QString&fn, bool h )
+ Function( const TQString& t, const TQString& n, const TQString&fn, bool h )
: type( t ), name( n ), fullName( fn ), hidden( h ) {}
- QString type;
- QString name;
- QString fullName;
+ TQString type;
+ TQString name;
+ TQString fullName;
bool hidden;
};
@@ -64,13 +64,13 @@ struct Function
/*
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de )
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de )
{
- QFile skel( filename );
+ TQFile skel( filename );
if ( !skel.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &skel );
+ TQTextStream str( &skel );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -81,7 +81,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "*****************************************************************************/" << endl;
str << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
if ( e.tagName() == "SOURCE" ) {
str << "#include \"" << e.firstChild().toText().data() << "\"" << endl << endl;
}
@@ -89,35 +89,35 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data();
+ TQString className = n.firstChild().toText().data();
// find dcop parent ( rightmost super class )
- QString DCOPParent;
- QDomElement s = n.nextSibling().toElement();
+ TQString DCOPParent;
+ TQDomElement s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "SUPER" )
DCOPParent = s.firstChild().toText().data();
}
// get function table
- QValueList<Function> functions;
+ TQValueList<Function> functions;
s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList argtypes;
- QStringList argnames;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList argtypes;
+ TQStringList argnames;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
a = a.nextSibling().toElement();
@@ -125,14 +125,14 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
Q_ASSERT( a.tagName() == "NAME" );
argnames.append( a.firstChild().toText().data() );
} else {
- argnames.append( QString::null );
+ argnames.append( TQString::null );
}
}
funcName += '(';
- QString fullFuncName = funcName;
+ TQString fullFuncName = funcName;
bool first = true;
- QStringList::Iterator ittype = argtypes.begin();
- QStringList::Iterator itname = argnames.begin();
+ TQStringList::Iterator ittype = argtypes.begin();
+ TQStringList::Iterator itname = argnames.begin();
while ( ittype != argtypes.end() && itname != argnames.end() ) {
if ( !first ) {
funcName += ',';
@@ -168,13 +168,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
bool useHashing = functions.count() > 7;
if ( useHashing ) {
- str << "#include <qasciidict.h>" << endl;
+ str << "#include <tqasciidict.h>" << endl;
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -193,7 +193,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "static const int " << className << "_fhash = " << fhash << ";" << endl;
}
str << "static const char* const " << className << "_ftable[" << functions.count() + 1 << "][3] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " { \"" << (*it).type << "\", \"" << (*it).name << "\", \"" << (*it).fullName << "\" }," << endl;
}
str << " { 0, 0, 0 }" << endl;
@@ -201,7 +201,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if (functions.count() > 0) {
str << "static const int " << className << "_ftable_hiddens[" << functions.count() << "] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " " << !!(*it).hidden << "," << endl;
}
str << "};" << endl;
@@ -212,13 +212,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
// Write dispatcher
str << "bool " << className;
- str << "::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)" << endl;
+ str << "::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)" << endl;
str << "{" << endl;
if ( useHashing ) {
- str << " static QAsciiDict<int>* fdict = 0;" << endl;
+ str << " static TQAsciiDict<int>* fdict = 0;" << endl;
str << " if ( !fdict ) {" << endl;
- str << "\tfdict = new QAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
+ str << "\tfdict = new TQAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
str << "\tfor ( int i = 0; " << className << "_ftable[i][1]; i++ )" << endl;
str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl;
str << " }" << endl;
@@ -232,28 +232,28 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
if ( funcType == "ASYNC" )
funcType = "void";
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList args;
- QStringList argtypes;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList args;
+ TQStringList argtypes;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
- args.append( QString("arg" ) + QString::number( args.count() ) );
+ args.append( TQString("arg" ) + TQString::number( args.count() ) );
}
- QString plainFuncName = funcName;
+ TQString plainFuncName = funcName;
funcName += '(';
bool first = true;
- for( QStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
+ for( TQStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
if ( !first )
funcName += ',';
first = false;
@@ -271,8 +271,8 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
firstFunc = false;
}
if ( !args.isEmpty() ) {
- QStringList::Iterator ittypes = argtypes.begin();
- QStringList::Iterator args_count;
+ TQStringList::Iterator ittypes = argtypes.begin();
+ TQStringList::Iterator args_count;
for( args_count = args.begin(); args_count != args.end(); ++args_count ){
str << '\t'<< *ittypes << " " << *args_count << ";" << endl;
++ittypes;
@@ -293,7 +293,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
}
first = true;
- for ( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ for ( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
if ( !first )
str << ", ";
first = false;
@@ -372,16 +372,16 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for(s = e.firstChild().toElement(); !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "SIGNAL")
continue;
- QDomElement r = s.firstChild().toElement();
- QString result = writeType( str, r );
+ TQDomElement r = s.firstChild().toElement();
+ TQString result = writeType( str, r );
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -391,10 +391,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -409,7 +409,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -420,10 +420,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if ( result != "void" )
qFatal("Error in DCOP signal %s::%s: DCOP signals can not return values.", className.latin1(), funcName.latin1());
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp
index 4060ae88f..887945262 100644
--- a/dcop/dcopidl2cpp/stub.cpp
+++ b/dcop/dcopidl2cpp/stub.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -36,13 +36,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de)
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de)
{
- QFile stub( filename );
+ TQFile stub( filename );
if ( !stub.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &stub );
+ TQTextStream str( &stub );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -53,19 +53,19 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "*****************************************************************************/" << endl;
str << endl;
- QString ifdefstring = idl.upper();
+ TQString ifdefstring = idl.upper();
int pos = idl.findRev( '.' );
if ( pos != -1 )
ifdefstring = ifdefstring.left( pos );
- QString ifdefsuffix = "_STUB__";
+ TQString ifdefsuffix = "_STUB__";
str << "#ifndef __" << ifdefstring << ifdefsuffix << endl;
str << "#define __" << ifdefstring << ifdefsuffix << endl << endl;
str << "#include <dcopstub.h>" << endl;
- QStringList includeslist, all_includes;
- QDomElement e = de.firstChild().toElement();
+ TQStringList includeslist, all_includes;
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() == "INCLUDE" ) {
// dcopidl lists the includes in reversed order because of the used yacc/bison gramatic
@@ -74,7 +74,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
continue;
}
if( !includeslist.empty()) {
- for( QStringList::ConstIterator it = includeslist.begin();
+ for( TQStringList::ConstIterator it = includeslist.begin();
it != includeslist.end();
++it ) {
str << "#include <" << ( *it ) << ">" << endl;
@@ -87,20 +87,20 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << endl;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data() + ( "_stub" );
+ TQString className = n.firstChild().toText().data() + ( "_stub" );
//add link scope, if available
n = n.nextSibling().toElement();
- QString linkScope;
+ TQString linkScope;
if (n.tagName()=="LINK_SCOPE") {
linkScope = n.firstChild().toText().data() + " ";
n = n.nextSibling().toElement();
}
// find dcop parent ( rightmost super class )
- QString DCOPParent;
+ TQString DCOPParent;
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "SUPER" )
DCOPParent = n.firstChild().toText().data();
@@ -112,7 +112,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
else if( all_includes.contains( DCOPParent.lower() + ".h" ))
str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl;
else {// damn ... let's assume it's the last include
- QString stub_h = all_includes.last();
+ TQString stub_h = all_includes.last();
unsigned int pos = stub_h.find( ".h" );
if( pos > 0 ) {
stub_h = stub_h.remove( pos, 100000 );
@@ -123,10 +123,10 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
}
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
for(;;) {
int pos = namespace_tmp.find( "::" );
if( pos < 0 ) {
@@ -156,15 +156,15 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "public:" << endl;
// Constructors
- str << " " << className << "( const QCString& app, const QCString& id );" << endl;
- str << " " << className << "( DCOPClient* client, const QCString& app, const QCString& id );" << endl;
+ str << " " << className << "( const TQCString& app, const TQCString& id );" << endl;
+ str << " " << className << "( DCOPClient* client, const TQCString& app, const TQCString& id );" << endl;
str << " explicit " << className << "( const DCOPRef& ref );" << endl;
n = e.firstChild().toElement();
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if (n.tagName() != "FUNC")
continue;
- QDomElement r = n.firstChild().toElement();
+ TQDomElement r = n.firstChild().toElement();
str << " virtual "; // KDE4 - I really don't think these need to be virtual
writeType( str, r );
@@ -181,7 +181,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
writeType( str, a );
a = a.nextSibling().toElement();
if ( a.tagName() == "NAME" )
diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp
index 22c11527b..5cdd2a00d 100644
--- a/dcop/dcopidl2cpp/stubimpl.cpp
+++ b/dcop/dcopidl2cpp/stubimpl.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main.h"
#include "type.h"
-static bool isIntType( const QString& t )
+static bool isIntType( const TQString& t )
{
return ((t == "int")
|| (t == "signed int")
@@ -62,13 +62,13 @@ static bool isIntType( const QString& t )
/*
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& /*headerBase*/, const QString& filename, QDomElement de )
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& /*headerBase*/, const TQString& filename, TQDomElement de )
{
- QFile impl( filename );
+ TQFile impl( filename );
if ( !impl.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.latin1() );
- QTextStream str( &impl );
+ TQTextStream str( &impl );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -83,19 +83,19 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "#include <dcopclient.h>" << endl << endl;
str << "#include <kdatastream.h>" << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString classNameBase = n.firstChild().toText().data();
- QString className_stub = classNameBase + "_stub";
+ TQString classNameBase = n.firstChild().toText().data();
+ TQString className_stub = classNameBase + "_stub";
- QString classNameFull = className_stub; // class name with possible namespaces prepended
+ TQString classNameFull = className_stub; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className_stub;
+ TQString namespace_tmp = className_stub;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -111,7 +111,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << endl;
// Write constructors
- str << className_stub << "::" << className_stub << "( const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
// Always explicitly call DCOPStub constructor, because it's virtual base class.
@@ -121,7 +121,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "{" << endl;
str << "}" << endl << endl;
- str << className_stub << "::" << className_stub << "( DCOPClient* client, const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( DCOPClient* client, const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
str << "DCOPStub( client, app, obj )" << endl;
@@ -138,13 +138,13 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "}" << endl << endl;
// Write marshalling code
- QDomElement s = e.firstChild().toElement();
+ TQDomElement s = e.firstChild().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "FUNC")
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString result = r.firstChild().toText().data();
+ TQString result = r.firstChild().toText().data();
bool async = result == "ASYNC";
if ( async) {
result = "void";
@@ -154,11 +154,11 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className_stub << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -168,10 +168,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -188,7 +188,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -203,10 +203,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -236,12 +236,12 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data, replyData;" << endl;
- str << " QCString replyType;" << endl;
+ str << " TQByteArray data, replyData;" << endl;
+ str << " TQCString replyType;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -249,7 +249,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " data, replyType, replyData ) ) {" << endl;
if ( result != "void" ) {
str << "\tif ( replyType == \"" << result << "\" ) {" << endl;
- str << "\t QDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
+ str << "\t TQDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
str << "\t _reply_stream >> result;" << endl;
str << "\t setStatus( CallSucceeded );" << endl;
str << "\t} else {" << endl;
diff --git a/dcop/dcopidl2cpp/type.h b/dcop/dcopidl2cpp/type.h
index baaacacfb..2a99c83a9 100644
--- a/dcop/dcopidl2cpp/type.h
+++ b/dcop/dcopidl2cpp/type.h
@@ -1,15 +1,15 @@
#ifndef TYPE_H
#define TYPE_H
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
-static QString writeType( QTextStream& str, const QDomElement& r )
+static TQString writeType( TQTextStream& str, const TQDomElement& r )
{
Q_ASSERT( r.tagName() == "TYPE" );
if ( r.hasAttribute( "qleft" ) )
str << r.attribute("qleft") << " ";
- QString t = r.firstChild().toText().data();
+ TQString t = r.firstChild().toText().data();
t = t.replace( ">>", "> >" );
str << t;
if ( r.hasAttribute( "qright" ) )
diff --git a/dcop/dcopobject.cpp b/dcop/dcopobject.cpp
index 98a147e9f..fd39fb347 100644
--- a/dcop/dcopobject.cpp
+++ b/dcop/dcopobject.cpp
@@ -25,12 +25,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopobject.h>
#include <dcopclient.h>
-QMap<QCString, DCOPObject *> *kde_dcopObjMap = 0;
+TQMap<TQCString, DCOPObject *> *kde_dcopObjMap = 0;
-static inline QMap<QCString, DCOPObject *> *objMap()
+static inline TQMap<TQCString, DCOPObject *> *objMap()
{
if (!kde_dcopObjMap)
- kde_dcopObjMap = new QMap<QCString, DCOPObject *>;
+ kde_dcopObjMap = new TQMap<TQCString, DCOPObject *>;
return kde_dcopObjMap;
}
@@ -51,10 +51,10 @@ DCOPObject::DCOPObject()
objMap()->insert(ident, this );
}
-DCOPObject::DCOPObject(QObject *obj)
+DCOPObject::DCOPObject(TQObject *obj)
{
d = new DCOPObjectPrivate;
- QObject *currentObj = obj;
+ TQObject *currentObj = obj;
while (currentObj != 0L) {
ident.prepend( currentObj->name() );
ident.prepend("/");
@@ -66,7 +66,7 @@ DCOPObject::DCOPObject(QObject *obj)
objMap()->insert(ident, this);
}
-DCOPObject::DCOPObject(const QCString &_objId)
+DCOPObject::DCOPObject(const TQCString &_objId)
: ident(_objId)
{
d = new DCOPObjectPrivate;
@@ -95,7 +95,7 @@ void DCOPObject::setCallingDcopClient(DCOPClient *client)
d->m_dcopClient = client;
}
-bool DCOPObject::setObjId(const QCString &objId)
+bool DCOPObject::setObjId(const TQCString &objId)
{
if (objMap()->find(objId)!=objMap()->end()) return false;
@@ -109,12 +109,12 @@ bool DCOPObject::setObjId(const QCString &objId)
return true;
}
-QCString DCOPObject::objId() const
+TQCString DCOPObject::objId() const
{
return ident;
}
-bool DCOPObject::hasObject(const QCString &_objId)
+bool DCOPObject::hasObject(const TQCString &_objId)
{
if (objMap()->contains(_objId))
return true;
@@ -122,9 +122,9 @@ bool DCOPObject::hasObject(const QCString &_objId)
return false;
}
-DCOPObject *DCOPObject::find(const QCString &_objId)
+DCOPObject *DCOPObject::find(const TQCString &_objId)
{
- QMap<QCString, DCOPObject *>::ConstIterator it;
+ TQMap<TQCString, DCOPObject *>::ConstIterator it;
it = objMap()->find(_objId);
if (it != objMap()->end())
return *it;
@@ -132,10 +132,10 @@ DCOPObject *DCOPObject::find(const QCString &_objId)
return 0L;
}
-QPtrList<DCOPObject> DCOPObject::match(const QCString &partialId)
+TQPtrList<DCOPObject> DCOPObject::match(const TQCString &partialId)
{
- QPtrList<DCOPObject> mlist;
- QMap<QCString, DCOPObject *>::ConstIterator it(objMap()->begin());
+ TQPtrList<DCOPObject> mlist;
+ TQMap<TQCString, DCOPObject *>::ConstIterator it(objMap()->begin());
for (; it != objMap()->end(); ++it)
if (it.key().left(partialId.length()) == partialId) // found it?
mlist.append(it.data());
@@ -143,14 +143,14 @@ QPtrList<DCOPObject> DCOPObject::match(const QCString &partialId)
}
-QCString DCOPObject::objectName( QObject* obj )
+TQCString DCOPObject::objectName( TQObject* obj )
{
if ( obj == 0 )
- return QCString();
+ return TQCString();
- QCString identity;
+ TQCString identity;
- QObject *currentObj = obj;
+ TQObject *currentObj = obj;
while (currentObj != 0 )
{
identity.prepend( currentObj->name() );
@@ -163,24 +163,24 @@ QCString DCOPObject::objectName( QObject* obj )
return identity;
}
-bool DCOPObject::process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << interfaces();
return true;
} else if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << functions();
return true;
}
return processDynamic( fun, data, replyType, replyData );
}
-bool DCOPObject::processDynamic( const QCString&, const QByteArray&, QCString&, QByteArray& )
+bool DCOPObject::processDynamic( const TQCString&, const TQByteArray&, TQCString&, TQByteArray& )
{
return false;
}
@@ -210,16 +210,16 @@ QCStringList DCOPObject::functions()
return result;
}
-void DCOPObject::emitDCOPSignal( const QCString &signal, const QByteArray &data)
+void DCOPObject::emitDCOPSignal( const TQCString &signal, const TQByteArray &data)
{
DCOPClient *client = DCOPClient::mainClient();
if ( client )
client->emitDCOPSignal( objId(), signal, data );
}
-bool DCOPObject::connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot,
+bool DCOPObject::connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot,
bool Volatile)
{
DCOPClient *client = DCOPClient::mainClient();
@@ -231,9 +231,9 @@ bool DCOPObject::connectDCOPSignal( const QCString &sender, const QCString &send
return client->connectDCOPSignal( sender, senderObj, signal, objId(), slot, Volatile );
}
-bool DCOPObject::disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot)
+bool DCOPObject::disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot)
{
DCOPClient *client = DCOPClient::mainClient();
@@ -245,19 +245,19 @@ bool DCOPObject::disconnectDCOPSignal( const QCString &sender, const QCString &s
}
-QPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = 0;
+TQPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = 0;
DCOPObjectProxy::DCOPObjectProxy()
{
if ( !proxies )
- proxies = new QPtrList<DCOPObjectProxy>;
+ proxies = new TQPtrList<DCOPObjectProxy>;
proxies->append( this );
}
DCOPObjectProxy::DCOPObjectProxy( DCOPClient*)
{
if ( !proxies )
- proxies = new QPtrList<DCOPObjectProxy>;
+ proxies = new TQPtrList<DCOPObjectProxy>;
proxies->append( this );
}
@@ -267,11 +267,11 @@ DCOPObjectProxy:: ~DCOPObjectProxy()
proxies->removeRef( this );
}
-bool DCOPObjectProxy::process( const QCString& /*obj*/,
- const QCString& /*fun*/,
- const QByteArray& /*data*/,
- QCString& /*replyType*/,
- QByteArray &/*replyData*/ )
+bool DCOPObjectProxy::process( const TQCString& /*obj*/,
+ const TQCString& /*fun*/,
+ const TQByteArray& /*data*/,
+ TQCString& /*replyType*/,
+ TQByteArray &/*replyData*/ )
{
return false;
}
diff --git a/dcop/dcopobject.h b/dcop/dcopobject.h
index 691ad4e67..2040379b2 100644
--- a/dcop/dcopobject.h
+++ b/dcop/dcopobject.h
@@ -23,22 +23,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPOBJECT_H
#define _DCOPOBJECT_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include "kdelibs_export.h"
class DCOPClient;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
// Makros for DCOP interfaces
#define K_DCOP \
public: \
- virtual bool process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData); \
+ virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); \
QCStringList functions(); \
QCStringList interfaces(); \
private:
@@ -74,15 +74,15 @@ public:
DCOPObject();
/**
* Creates a DCOPObject and calculates the object id
- * using QObject::name().
+ * using TQObject::name().
* @param obj the object to extract the name from
*/
- DCOPObject(QObject *obj);
+ DCOPObject(TQObject *obj);
/**
* Creates a DCOPObject with object Id @p objId.
* @param objId the object id of the DCOP object
*/
- DCOPObject(const QCString &objId);
+ DCOPObject(const TQCString &objId);
/**
* Destroys the DCOPObject and removes it from the map
* of known objects.
@@ -93,7 +93,7 @@ public:
* Returns the object id of the DCOPObject.
* @return the object's id
*/
- QCString objId() const;
+ TQCString objId() const;
/**
* Renames a dcop object, if no other with the same name exists
@@ -101,7 +101,7 @@ public:
*
* @param objId the new object id
**/
- bool setObjId(const QCString &objId);
+ bool setObjId(const TQCString &objId);
/**
* Dispatches a message.
@@ -120,7 +120,7 @@ public:
*
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -134,8 +134,8 @@ public:
* @see functions()
* @see DCOPClient::process()
*/
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
@@ -147,7 +147,7 @@ public:
*
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -160,8 +160,8 @@ public:
* @see functions(),
* @see DCOPClient::process()
*/
- virtual bool processDynamic(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool processDynamic(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* This function is of interest when you used an IDL compiler
@@ -226,7 +226,7 @@ public:
* @param signal the signal to emit
* @param data the data to send
*/
- void emitDCOPSignal( const QCString &signal, const QByteArray &data);
+ void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
/**
* Connects to a DCOP signal.
@@ -247,9 +247,9 @@ public:
* @li @p Volatile is true and @p sender does not exist.
* @li @p signal and @p slot do not have matching arguments.
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot,
bool Volatile);
/**
@@ -269,9 +269,9 @@ public:
*
* @return false if no connection(s) where removed.
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot);
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot);
/**
* Returns the DCOPClient responsible for making the call.
@@ -296,7 +296,7 @@ public:
*
* DCOPObjectProxy
*/
- static bool hasObject(const QCString &objId);
+ static bool hasObject(const TQCString &objId);
/**
* Try to find a dcop object with the given id.
@@ -304,7 +304,7 @@ public:
* @param objId the object id to search
* @return the DCOPObject for the id @p objId.
*/
- static DCOPObject *find(const QCString &objId);
+ static DCOPObject *find(const TQCString &objId);
/**
@@ -316,21 +316,21 @@ public:
* @return a list of DCOPObjects beginning with the string
* contained in @p partialId.
*/
- static QPtrList<DCOPObject> match(const QCString &partialId);
+ static TQPtrList<DCOPObject> match(const TQCString &partialId);
/**
- * Creates an object id for the QObject @p obj. This is done
- * using the QObject::name() function.
+ * Creates an object id for the TQObject @p obj. This is done
+ * using the TQObject::name() function.
* @param obj the object whose name will be used
* @return the created object id
*/
- static QCString objectName( QObject* obj );
+ static TQCString objectName( TQObject* obj );
private:
/**
* The object id of this DCOPObject.
*/
- QCString ident;
+ TQCString ident;
protected:
virtual void virtual_hook( int id, void* data );
@@ -382,7 +382,7 @@ public:
* @param obj the id of the object
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -391,14 +391,14 @@ public:
* @return true if successful, false otherwise. The default implementation
* returns always false.
*/
- virtual bool process( const QCString& obj, const QCString& fun,
- const QByteArray& data,
- QCString& replyType, QByteArray &replyData );
+ virtual bool process( const TQCString& obj, const TQCString& fun,
+ const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData );
private:
void* unused;
void* unused_too;
friend class DCOPClient;
- static QPtrList<DCOPObjectProxy>* proxies;
+ static TQPtrList<DCOPObjectProxy>* proxies;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/dcop/dcopref.cpp b/dcop/dcopref.cpp
index 9e94821fc..bb39c109b 100644
--- a/dcop/dcopref.cpp
+++ b/dcop/dcopref.cpp
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "dcopclient.h"
#include "dcopobject.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
#define STR( s ) ( s.data() ? s.data() : "" )
@@ -47,12 +47,12 @@ bool DCOPReply::typeCheck( const char* t, bool warn )
}
// this has to stay BC too even if private, because it's called from inlines
-DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, const QByteArray& data )
+DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data )
{
return callInternal( fun, args, data, NoEventLoop, -1 );
}
-DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, const QByteArray& data,
+DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data,
EventLoopFlag useEventLoop, int timeout )
{
DCOPReply reply;
@@ -61,7 +61,7 @@ DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, cons
STR( fun ) );
return reply;
}
- QCString sig = fun;
+ TQCString sig = fun;
if ( fun.find('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
@@ -78,7 +78,7 @@ DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, cons
return reply;
}
-bool DCOPRef::sendInternal( const QCString& fun, const QCString& args, const QByteArray& data )
+bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data )
{
if ( isNull() ) {
qWarning( "DCOPRef: send '%s' on null reference error",
@@ -86,7 +86,7 @@ bool DCOPRef::sendInternal( const QCString& fun, const QCString& args, const QBy
return false;
}
Q_UNUSED( data );
- QCString sig = fun;
+ TQCString sig = fun;
if ( fun.find('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
@@ -116,18 +116,18 @@ DCOPRef::DCOPRef( const DCOPRef& ref )
}
DCOPRef::DCOPRef( DCOPObject *o )
- : m_app( DCOPClient::mainClient() ? DCOPClient::mainClient()->appId() : QCString() ),
+ : m_app( DCOPClient::mainClient() ? DCOPClient::mainClient()->appId() : TQCString() ),
m_obj( o->objId() ), m_type( o->interfaces().last() ), d(0)
{
}
-DCOPRef::DCOPRef( const QCString& _app, const QCString& obj )
+DCOPRef::DCOPRef( const TQCString& _app, const TQCString& obj )
: m_app( _app ), m_obj( obj ), d(0)
{
}
-DCOPRef::DCOPRef( const QCString& _app, const QCString& _obj, const QCString& _type )
+DCOPRef::DCOPRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
: m_app( _app ), m_obj( _obj ), m_type( _type ), d(0)
{
}
@@ -137,23 +137,23 @@ bool DCOPRef::isNull() const
return ( m_app.isNull() || m_obj.isNull() );
}
-QCString DCOPRef::app() const
+TQCString DCOPRef::app() const
{
return m_app;
}
-QCString DCOPRef::obj() const
+TQCString DCOPRef::obj() const
{
return m_obj;
}
-QCString DCOPRef::object() const
+TQCString DCOPRef::object() const
{
return m_obj;
}
-QCString DCOPRef::type() const
+TQCString DCOPRef::type() const
{
return m_type;
}
@@ -177,14 +177,14 @@ DCOPRef& DCOPRef::operator=( const DCOPRef& ref )
return *this;
}
-void DCOPRef::setRef( const QCString& _app, const QCString& _obj )
+void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj )
{
m_app = _app;
m_obj = _obj;
m_type = 0;
}
-void DCOPRef::setRef( const QCString& _app, const QCString& _obj, const QCString& _type )
+void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
{
m_app = _app;
m_obj = _obj;
@@ -198,7 +198,7 @@ void DCOPRef::clear()
m_type = 0;
}
-QDataStream& operator<<( QDataStream& str, const DCOPRef& ref )
+TQDataStream& operator<<( TQDataStream& str, const DCOPRef& ref )
{
str << ref.app();
str << ref.obj();
@@ -207,9 +207,9 @@ QDataStream& operator<<( QDataStream& str, const DCOPRef& ref )
return str;
}
-QDataStream& operator>>( QDataStream& str, DCOPRef& ref )
+TQDataStream& operator>>( TQDataStream& str, DCOPRef& ref )
{
- QCString a, o, t;
+ TQCString a, o, t;
str >> a >> o >> t;
ref.setRef( a, o, t );
diff --git a/dcop/dcopref.h b/dcop/dcopref.h
index 3b65fb9dc..380bebf5a 100644
--- a/dcop/dcopref.h
+++ b/dcop/dcopref.h
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPREF_H
#define _DCOPREF_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <dcoptypes.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include "kdelibs_export.h"
@@ -46,7 +46,7 @@ class DCOP_EXPORT DCOPReply
public:
/**
* Casts the value to the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation
+ * type @p T suppports TQDataStream deserialisation
* and has a function dcopTypeName(T). This is true for most
* basic types.
*/
@@ -55,21 +55,21 @@ public:
T t;
dcopTypeInit(t);
if ( typeCheck( dcopTypeName(t), true ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
}
return t;
}
/**
* Retrieves the value from the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation.
+ * type @p T suppports TQDataStream deserialisation.
* @param t the type will be written here, if successful
* @param tname the signature type name
* @return true if successful, false otherwise
*/
template <class T> bool get( T& t, const char* tname ) {
if ( typeCheck( tname, false ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
return true;
}
@@ -77,7 +77,7 @@ public:
}
/**
* Retrieves the value from the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation
+ * type @p T suppports TQDataStream deserialisation
* and has a function dcopTypeName(T). This is true for most
* basic types.
* @param t the type will be written here, if successful
@@ -85,7 +85,7 @@ public:
*/
template <class T> bool get( T& t ) {
if ( typeCheck( dcopTypeName(t), false ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
return true;
}
@@ -99,9 +99,9 @@ public:
inline bool isValid() const { return !type.isNull(); }
/// The serialized data.
- QByteArray data;
+ TQByteArray data;
/// The name of the type, or 0 if unknown.
- QCString type;
+ TQCString type;
private:
bool typeCheck( const char* t );
bool typeCheck( const char* t, bool warn );
@@ -121,8 +121,8 @@ class DCOP_EXPORT DCOPArg {
public:
/**
* Creates a DCOPArg for DCOPRef::call().
- * @param t the data that will be written to a QDataStream. It must
- * overload writing to a QDataStream using the "<<"
+ * @param t the data that will be written to a TQDataStream. It must
+ * overload writing to a TQDataStream using the "<<"
* operator
* @param tname_arg the name of the data that will appear in the
* function's signature
@@ -130,13 +130,13 @@ public:
template <class T> DCOPArg( const T& t, const char* tname_arg )
: tname(tname_arg)
{
- QDataStream ds( data, IO_WriteOnly );
+ TQDataStream ds( data, IO_WriteOnly );
ds << t;
}
/**
* Creates a DCOPArg for DCOPRef::call().
- * @param t the data that will be written to a QDataStream. It must
- * overload writing to a QDataStream using the "<<"
+ * @param t the data that will be written to a TQDataStream. It must
+ * overload writing to a TQDataStream using the "<<"
* operator. The name of the type will be determined by
* calling the function dcopTypeName(T) that must be provided
* by you.
@@ -144,18 +144,18 @@ public:
template <class T> DCOPArg( const T& t )
: tname( dcopTypeName(t) )
{
- QDataStream ds( data, IO_WriteOnly );
+ TQDataStream ds( data, IO_WriteOnly );
ds << t;
}
/// The serialized data.
- QByteArray data;
+ TQByteArray data;
/// The signature type name of the data.
const char* tname;
};
inline const char* dcopTypeName( const DCOPArg &arg ) { return arg.tname; }
-inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
+inline TQDataStream & operator << (TQDataStream & str, const DCOPArg& arg )
{ str.writeRawBytes( arg.data.data(), arg.data.size() ); return str; }
@@ -176,8 +176,8 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
* ...
* k_dcop:
* DCOPRef giveMeAnotherObject();
- * int doSomething( QString, float, bool );
- * ASYNC pingMe( QCString message );
+ * int doSomething( TQString, float, bool );
+ * ASYNC pingMe( TQCString message );
* UserType userFunction( UserType );
* };
* \endcode
@@ -194,7 +194,7 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
*
* \code
* DCOPRef example( "foo", "example" );
- * int result = example.call( "doSomething", QString("Hello World"), (float)2.5, true );
+ * int result = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );
* \endcode
*
* If it is important for you to know whether the call succeeded or
@@ -202,30 +202,30 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
*
* \code
* DCOPRef example( "foo", "example" );
- * DCOPReply reply = example.call( "doSomething", QString("Hello World"), (float)2.5, true );
+ * DCOPReply reply = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );
* if ( reply.isValid() ) {
* int result = reply;
* // ...
* }
* \endcode
*
- * Note that you must pass a QString for the first argument. If you use a
- * regular char pointer, it will be converted to a QCString.
+ * Note that you must pass a TQString for the first argument. If you use a
+ * regular char pointer, it will be converted to a TQCString.
*
* For curiosity, here is how you would achieve the exactly same
* functionality by using DCOPClient::call() directly:
*
* \code
- * QByteArray data, replyData;
- * QCString replyType;
- * QDataStream arg( data, IO_WriteOnly );
- * arg << QString("hello world" ), (float) 2.5 << true;
+ * TQByteArray data, replyData;
+ * TQCString replyType;
+ * TQDataStream arg( data, IO_WriteOnly );
+ * arg << TQString("hello world" ), (float) 2.5 << true;
* if ( DCOPClient::mainClient()->call( app, obj,
- * "doSomething(QString,float,bool)",
+ * "doSomething(TQString,float,bool)",
* data, replyType, replyData ) ) {
* if ( replyType == "int" ) {
* int result;
- * QDataStream reply( replyData, IO_ReadOnly );
+ * TQDataStream reply( replyData, IO_ReadOnly );
* reply >> result;
* // ...
* }
@@ -238,10 +238,10 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
* dcopTypeName function, for example
*
* \code
- * inline const char* dcopTypeName( const QString& ) { return "QString"; }
+ * inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
* \endcode
*
- * If you use custom data types that do support QDataStream but have
+ * If you use custom data types that do support TQDataStream but have
* no corresponding dcopTypeName overload, you can either provide such
* an overload or use a DCOPArg wrapper that allows you to specify the type.
*
@@ -295,7 +295,7 @@ public:
* by the dcopserver.
* @param obj The name of the dcop object.
*/
- DCOPRef( const QCString& app, const QCString& obj = "" );
+ DCOPRef( const TQCString& app, const TQCString& obj = "" );
/**
* Creates a reference to an existing dcop object
@@ -313,7 +313,7 @@ public:
* @param obj The name of the dcop object
* @param type The object's type
*/
- DCOPRef( const QCString& app, const QCString& obj, const QCString& type );
+ DCOPRef( const TQCString& app, const TQCString& obj, const TQCString& type );
/**
* Tests whether this is a null reference.
@@ -326,25 +326,25 @@ public:
* Name of the application in which the object resides.
* @return the application's id. Can be null or empty if not set.
*/
- QCString app() const;
+ TQCString app() const;
/**
* Object ID of the referenced object.
* @return the id of the referenced object. Can be null or empty if not set.
* @since 3.1
*/
- QCString obj() const;
+ TQCString obj() const;
/**
* @obsolete
*/
- QCString object() const;
+ TQCString object() const;
/**
* Type of the referenced object. May be null (i.e. unknown).
* @return the type of the referenced object, or null if unknown
*/
- QCString type() const;
+ TQCString type() const;
/**
@@ -358,7 +358,7 @@ public:
* @param app the application id.
* @param obj the object id
*/
- void setRef( const QCString& app, const QCString& obj = "" );
+ void setRef( const TQCString& app, const TQCString& obj = "" );
/**
* Changes the referenced object.
@@ -366,7 +366,7 @@ public:
* @param obj the object id
* @param type the object's type
*/
- void setRef( const QCString& app, const QCString& obj, const QCString& type );
+ void setRef( const TQCString& app, const TQCString& obj, const TQCString& type );
/**
@@ -404,7 +404,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -414,8 +414,8 @@ public:
* @see DCOPArg
* @since 3.1
*/
- DCOPReply call( const QCString& fun ) {
- QByteArray data;
+ DCOPReply call( const TQCString& fun ) {
+ TQByteArray data;
return callInternal( fun, "()", data );
}
@@ -426,22 +426,22 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
* @since 3.2
*/
- DCOPReply callExt( const QCString& fun, EventLoopFlag useEventLoop=NoEventLoop,
+ DCOPReply callExt( const TQCString& fun, EventLoopFlag useEventLoop=NoEventLoop,
int timeout=-1 ) {
- QByteArray data;
+ TQByteArray data;
return callInternal( fun, "()", data, useEventLoop, timeout );
}
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -454,12 +454,12 @@ public:
* @since 3.1
*/
template <class T1>
- DCOPReply call( const QCString& fun, const T1& t1 ) {
- QCString args;
+ DCOPReply call( const TQCString& fun, const T1& t1 ) {
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return callInternal( fun, args, data );
}
@@ -471,7 +471,7 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -480,14 +480,14 @@ public:
* @since 3.2
*/
template <class T1>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -495,7 +495,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -510,15 +510,15 @@ public:
* @since 3.1
*/
template <class T1, class T2>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return callInternal( fun, args, data );
}
@@ -530,7 +530,7 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -541,16 +541,16 @@ public:
* @since 3.2
*/
template <class T1, class T2>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -558,7 +558,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -575,17 +575,17 @@ public:
* @since 3.1
*/
template <class T1, class T2, class T3>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return callInternal( fun, args, data );
}
@@ -596,7 +596,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -610,18 +610,18 @@ public:
* @since 3.2
*/
template <class T1, class T2, class T3>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -629,7 +629,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -648,19 +648,19 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return callInternal( fun, args, data );
}
@@ -671,7 +671,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -687,20 +687,20 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -708,7 +708,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -729,21 +729,21 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return callInternal( fun, args, data );
}
@@ -754,7 +754,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -772,22 +772,22 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -795,7 +795,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -818,14 +818,14 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -833,8 +833,8 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return callInternal( fun, args, data );
}
@@ -845,7 +845,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -865,7 +865,7 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -873,7 +873,7 @@ public:
const T4& t4,
const T5& t5,
const T6& t6) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -881,15 +881,15 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return callInternal( fun, args, data, useEventLoop, timeout );
}
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -914,7 +914,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -922,7 +922,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -931,8 +931,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return callInternal( fun, args, data );
}
@@ -941,7 +941,7 @@ public:
* Like call(), with additional arguments allowing entering the event loop
* and specifying timeout.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -965,7 +965,7 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -974,7 +974,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -983,8 +983,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -992,7 +992,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1019,7 +1019,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1028,7 +1028,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1038,8 +1038,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return callInternal( fun, args, data );
}
@@ -1067,14 +1067,14 @@ public:
* @param t8 the eigth argument of the function. This can be a
* supported base type or a DCOPArg object.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -1084,7 +1084,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1094,8 +1094,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -1104,7 +1104,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1113,8 +1113,8 @@ public:
* @see call()
* @since 3.1
*/
- bool send( const QCString& fun ) {
- QByteArray data;
+ bool send( const TQCString& fun ) {
+ TQByteArray data;
return sendInternal( fun, "()", data );
}
@@ -1122,7 +1122,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1135,12 +1135,12 @@ public:
* @since 3.1
*/
template <class T1>
- bool send( const QCString& fun, const T1& t1 ) {
- QCString args;
+ bool send( const TQCString& fun, const T1& t1 ) {
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return sendInternal( fun, args, data );
}
@@ -1148,7 +1148,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1163,15 +1163,15 @@ public:
* @since 3.1
*/
template <class T1, class T2>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return sendInternal( fun, args, data );
}
@@ -1179,7 +1179,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1196,17 +1196,17 @@ public:
* @since 3.1
*/
template <class T1, class T2, class T3>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return sendInternal( fun, args, data );
}
@@ -1214,7 +1214,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1233,19 +1233,19 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return sendInternal( fun, args, data );
}
@@ -1253,7 +1253,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1274,21 +1274,21 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return sendInternal( fun, args, data );
}
@@ -1296,7 +1296,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1319,14 +1319,14 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1334,8 +1334,8 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return sendInternal( fun, args, data );
}
@@ -1343,7 +1343,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1368,7 +1368,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1376,7 +1376,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1385,8 +1385,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return sendInternal( fun, args, data );
}
@@ -1394,7 +1394,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1421,7 +1421,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1430,7 +1430,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1440,8 +1440,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return sendInternal( fun, args, data );
}
@@ -1449,14 +1449,14 @@ public:
private:
- DCOPReply callInternal( const QCString& fun, const QCString& args, const QByteArray& data,
+ DCOPReply callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data,
EventLoopFlag useEventLoop, int timeout );
- DCOPReply callInternal( const QCString& fun, const QCString& args, const QByteArray& data );
- bool sendInternal( const QCString& fun, const QCString& args, const QByteArray& data );
+ DCOPReply callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data );
+ bool sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data );
- QCString m_app;
- QCString m_obj;
- QCString m_type;
+ TQCString m_app;
+ TQCString m_obj;
+ TQCString m_type;
class DCOPRefPrivate;
DCOPRefPrivate *d;
@@ -1465,10 +1465,10 @@ private:
/**
* Writes the reference (NOT the object itself) to the stream.
*/
-DCOP_EXPORT QDataStream& operator<<( QDataStream&, const DCOPRef& ref );
+DCOP_EXPORT TQDataStream& operator<<( TQDataStream&, const DCOPRef& ref );
/**
* Reads a reference from the stream.
*/
-DCOP_EXPORT QDataStream& operator>>( QDataStream&, DCOPRef& ref );
+DCOP_EXPORT TQDataStream& operator>>( TQDataStream&, DCOPRef& ref );
#endif
diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp
index f64e13303..e6c60c74f 100644
--- a/dcop/dcopserver.cpp
+++ b/dcop/dcopserver.cpp
@@ -48,11 +48,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
#define QT_CLEAN_NAMESPACE 1
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qptrstack.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
+#include <tqtimer.h>
#include "dcopserver.h"
@@ -63,7 +63,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef DCOP_LOG
#undef Unsorted
-#include <qdir.h>
+#include <tqdir.h>
#include <string.h>
#endif
@@ -71,9 +71,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DCOPServer* the_server;
-template class QDict<DCOPConnection>;
-template class QPtrDict<DCOPConnection>;
-template class QPtrList<DCOPListener>;
+template class TQDict<DCOPConnection>;
+template class TQPtrDict<DCOPConnection>;
+template class TQPtrList<DCOPListener>;
#define _DCOPIceSendBegin(x) \
int fd = IceConnectionNumber( x ); \
@@ -82,7 +82,7 @@ template class QPtrList<DCOPListener>;
#define _DCOPIceSendEnd() \
fcntl(fd, F_SETFL, fd_fl);
-static QCString findDcopserverShutdown()
+static TQCString findDcopserverShutdown()
{
#ifdef Q_OS_WIN32
char szPath[512];
@@ -90,24 +90,24 @@ static QCString findDcopserverShutdown()
int ret;
ret = SearchPathA(NULL,"dcopserver_shutdown","exe",sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
if(ret != 0)
- return QCString(szPath);
+ return TQCString(szPath);
#else
- QCString path = getenv("PATH");
+ TQCString path = getenv("PATH");
char *dir = strtok(path.data(), ":");
while (dir)
{
- QCString file = dir;
+ TQCString file = dir;
file += "/dcopserver_shutdown";
if (access(file.data(), X_OK) == 0)
return file;
dir = strtok(NULL, ":");
}
- QCString file = DCOP_PATH;
+ TQCString file = DCOP_PATH;
file += "/dcopserver_shutdown";
if (access(file.data(), X_OK) == 0)
return file;
#endif
- return QCString("dcopserver_shutdown");
+ return TQCString("dcopserver_shutdown");
}
static Bool HostBasedAuthProc ( char* /*hostname*/)
@@ -121,30 +121,30 @@ extern IceIOErrorHandler _kde_IceIOErrorHandler;
void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr);
}
-static QCString readQCString(QDataStream &ds)
+static TQCString readQCString(TQDataStream &ds)
{
- QCString result;
+ TQCString result;
Q_UINT32 len;
ds >> len;
- QIODevice *device = ds.device();
+ TQIODevice *device = ds.device();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
qWarning("Corrupt data!\n");
return result;
}
- result.QByteArray::resize( (uint)len );
+ result.TQByteArray::resize( (uint)len );
if (len > 0)
ds.readRawBytes( result.data(), (uint)len);
return result;
}
-static QByteArray readQByteArray(QDataStream &ds)
+static TQByteArray readQByteArray(TQDataStream &ds)
{
- QByteArray result;
+ TQByteArray result;
Q_UINT32 len;
ds >> len;
- QIODevice *device = ds.device();
+ TQIODevice *device = ds.device();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
@@ -247,7 +247,7 @@ qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes to %d [%s]", nbytes, f
{
if (conn->outputBlocked)
{
- QByteArray _data(nbytes);
+ TQByteArray _data(nbytes);
memcpy(_data.data(), ptr, nbytes);
#ifdef DCOP_DEBUG
qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
@@ -261,14 +261,14 @@ qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size(
unsigned long nleft = writeIceData(iceConn, nbytes, ptr);
if ((nleft > 0) && conn)
{
- QByteArray _data(nleft);
+ TQByteArray _data(nleft);
memcpy(_data.data(), ptr, nleft);
conn->waitForOutputReady(_data, 0);
return;
}
}
-static void DCOPIceWrite(IceConn iceConn, const QByteArray &_data)
+static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{
DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG
@@ -295,7 +295,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si
}
}
-void DCOPConnection::waitForOutputReady(const QByteArray &_data, int start)
+void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start)
{
#ifdef DCOP_DEBUG
qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start);
@@ -305,9 +305,9 @@ qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", sock
outputBufferStart = start;
if (!outputBufferNotifier)
{
- outputBufferNotifier = new QSocketNotifier(socket(), Write);
- connect(outputBufferNotifier, SIGNAL(activated(int)),
- the_server, SLOT(slotOutputReady(int)));
+ outputBufferNotifier = new TQSocketNotifier(socket(), Write);
+ connect(outputBufferNotifier, TQT_SIGNAL(activated(int)),
+ the_server, TQT_SLOT(slotOutputReady(int)));
}
outputBufferNotifier->setEnabled(true);
return;
@@ -333,7 +333,7 @@ void DCOPConnection::slotOutputReady()
//assert(outputBlocked);
//assert(!outputBuffer.isEmpty());
- QByteArray data = outputBuffer.first();
+ TQByteArray data = outputBuffer.first();
int fd = socket();
@@ -384,7 +384,7 @@ qWarning("DCOPServer: slotOutputRead() more data to send.");
}
static void DCOPIceSendData(register IceConn _iceConn,
- const QByteArray &_data)
+ const TQByteArray &_data)
{
if (_iceConn->outbufptr > _iceConn->outbuf)
{
@@ -400,8 +400,8 @@ class DCOPListener : public QSocketNotifier
{
public:
DCOPListener( IceListenObj obj )
- : QSocketNotifier( IceGetListenConnectionNumber( obj ),
- QSocketNotifier::Read, 0, 0)
+ : TQSocketNotifier( IceGetListenConnectionNumber( obj ),
+ TQSocketNotifier::Read, 0, 0)
{
listenObj = obj;
}
@@ -410,8 +410,8 @@ public:
};
DCOPConnection::DCOPConnection( IceConn conn )
- : QSocketNotifier( IceConnectionNumber( conn ),
- QSocketNotifier::Read, 0, 0 )
+ : TQSocketNotifier( IceConnectionNumber( conn ),
+ TQSocketNotifier::Read, 0, 0 )
{
iceConn = conn;
notifyRegister = 0;
@@ -580,7 +580,7 @@ SetAuthentication (int count, IceListenObj *_listenObjs,
const char *path;
int original_umask;
int i;
- QCString command;
+ TQCString command;
int fd;
original_umask = umask (0077); /* disallow non-owner access */
@@ -722,11 +722,11 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* target = findApp( toApp );
int datalen = ba.size();
@@ -744,8 +744,8 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
#ifdef DCOP_DEBUG
if (opcode == DCOPSend)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
@@ -757,12 +757,12 @@ if (opcode == DCOPSend)
DCOPIceSendData(target->iceConn, ba);
_DCOPIceSendEnd();
} else if ( toApp == "DCOPServer" ) {
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
- QByteArray data = readQByteArray(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
+ TQByteArray data = readQByteArray(ds);
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) {
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
}
@@ -770,13 +770,13 @@ if (opcode == DCOPSend)
#ifdef DCOP_DEBUG
if (opcode == DCOPSend)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
// handle a multicast.
- QAsciiDictIterator<DCOPConnection> aIt(appIds);
+ TQAsciiDictIterator<DCOPConnection> aIt(appIds);
int l = toApp.length()-1;
for ( ; aIt.current(); ++aIt) {
DCOPConnection *client = aIt.current();
@@ -800,11 +800,11 @@ if (opcode == DCOPSend)
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* target = findApp( toApp );
int datalen = ba.size();
@@ -812,8 +812,8 @@ if (opcode == DCOPSend)
#ifdef DCOP_DEBUG
if (opcode == DCOPCall)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
@@ -828,22 +828,22 @@ if (opcode == DCOPCall)
DCOPIceSendData(target->iceConn, ba);
_DCOPIceSendEnd();
} else {
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
bool b = false;
// DCOPServer itself does not do DCOPFind.
if ( (opcode == DCOPCall) && (toApp == "DCOPServer") ) {
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
- QByteArray data = readQByteArray(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
+ TQByteArray data = readQByteArray(ds);
b = receive( toApp, obj, fun, data, replyType, replyData, iceConn );
if ( !b )
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
}
if (b) {
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
replyStream << toApp << fromApp << replyType << replyData.size();
int replylen = reply.size() + replyData.size();
IceGetHeader( iceConn, majorOpcode, DCOPReply,
@@ -858,8 +858,8 @@ if (opcode == DCOPCall)
DCOPIceSendData( iceConn, replyData);
_DCOPIceSendEnd();
} else {
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
replyStream << toApp << fromApp;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -882,11 +882,11 @@ if (opcode == DCOPCall)
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* connreply = findApp( toApp );
int datalen = ba.size();
@@ -968,7 +968,7 @@ extern "C"
}
DCOPServer::DCOPServer(bool _suicide)
- : QObject(0,0), currentClientNumber(0), appIds(263), clients(263)
+ : TQObject(0,0), currentClientNumber(0), appIds(263), clients(263)
{
serverKey = 42;
@@ -1016,7 +1016,7 @@ DCOPServer::DCOPServer(bool _suicide)
} else {
(void) umask(orig_umask);
// publish available transports.
- QCString fName = DCOPClient::dcopServerFile();
+ TQCString fName = DCOPClient::dcopServerFile();
FILE *f;
if(!(f = ::fopen(fName.data(), "w+"))) {
fprintf (stderr, "Can not create file %s: %s\n",
@@ -1031,10 +1031,10 @@ DCOPServer::DCOPServer(bool _suicide)
fprintf(f, "\n%i\n", getpid());
fclose(f);
#ifndef Q_OS_WIN32
- if (QCString(getenv("DCOPAUTHORITY")).isEmpty())
+ if (TQCString(getenv("DCOPAUTHORITY")).isEmpty())
{
// Create a link named like the old-style (KDE 2.x) naming
- QCString compatName = DCOPClient::dcopServerFileOld();
+ TQCString compatName = DCOPClient::dcopServerFileOld();
::symlink(fName,compatName);
}
#endif // Q_OS_WIN32
@@ -1055,16 +1055,16 @@ DCOPServer::DCOPServer(bool _suicide)
for ( int i = 0; i < numTransports; i++) {
con = new DCOPListener( listenObjs[i] );
listener.append( con );
- connect( con, SIGNAL( activated(int) ), this, SLOT( newClient(int) ) );
+ connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( newClient(int) ) );
}
char c = 0;
write(ready[1], &c, 1); // dcopserver is started
close(ready[1]);
- m_timer = new QTimer(this);
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- m_deadConnectionTimer = new QTimer(this);
- connect( m_deadConnectionTimer, SIGNAL(timeout()), this, SLOT(slotCleanDeadConnections()) );
+ m_timer = new TQTimer(this);
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ m_deadConnectionTimer = new TQTimer(this);
+ connect( m_deadConnectionTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCleanDeadConnections()) );
#ifdef Q_OS_WIN
char szEventName[256];
@@ -1081,9 +1081,9 @@ DCOPServer::DCOPServer(bool _suicide)
memset( hostname_buffer, 0, sizeof( hostname_buffer ) );
if ( gethostname( hostname_buffer, 255 ) < 0 )
hostname_buffer[0] = '\0';
- m_logger = new QFile( QString( "%1/.dcop-%2.log" ).arg( QDir::homeDirPath() ).arg( hostname_buffer ) );
+ m_logger = new TQFile( TQString( "%1/.dcop-%2.log" ).arg( TQDir::homeDirPath() ).arg( hostname_buffer ) );
if ( m_logger->open( IO_WriteOnly ) ) {
- m_stream = new QTextStream( m_logger );
+ m_stream = new TQTextStream( m_logger );
}
#endif
}
@@ -1105,7 +1105,7 @@ DCOPServer::~DCOPServer()
#endif
}
-DCOPConnection* DCOPServer::findApp( const QCString& appId )
+DCOPConnection* DCOPServer::findApp( const TQCString& appId )
{
if ( appId.isNull() )
return 0;
@@ -1183,7 +1183,7 @@ void DCOPServer::newClient( int /*socket*/ )
void* DCOPServer::watchConnection( IceConn iceConn )
{
DCOPConnection* con = new DCOPConnection( iceConn );
- connect( con, SIGNAL( activated(int) ), this, SLOT( processData(int) ) );
+ connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( processData(int) ) );
clients.insert(iceConn, con );
fd_clients.insert( IceConnectionNumber(iceConn), con);
@@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() );
- QByteArray reply;
+ TQByteArray reply;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -1228,7 +1228,7 @@ void DCOPServer::removeConnection( void* data )
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() );
- QByteArray reply;
+ TQByteArray reply;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -1271,7 +1271,7 @@ void DCOPServer::removeConnection( void* data )
appIds.remove( conn->appId );
- broadcastApplicationRegistration( conn, "applicationRemoved(QCString)", conn->appId );
+ broadcastApplicationRegistration( conn, "applicationRemoved(TQCString)", conn->appId );
}
delete conn;
@@ -1291,10 +1291,10 @@ void DCOPServer::slotTerminate()
#ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotTerminate() -> sending terminateKDE signal.\n" );
#endif
- QByteArray data;
+ TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
- disconnect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotSuicide()) );
+ disconnect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSuicide()) );
system(findDcopserverShutdown()+" --nokill");
}
@@ -1318,11 +1318,11 @@ void DCOPServer::slotShutdown()
if (!shutdown)
{
shutdown = true;
- QByteArray data;
+ TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
m_timer->start( 10000 ); // if within 10 seconds nothing happens, we'll terminate
- disconnect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotExit()) );
+ disconnect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotExit()) );
if (appIds.isEmpty())
slotExit(); // Exit now
}
@@ -1342,9 +1342,9 @@ void DCOPServer::slotExit()
exit(0);
}
-bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData,
IceConn iceConn)
{
#ifdef DCOP_LOG
@@ -1368,7 +1368,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return true;
}
if ( fun == "setDaemonMode(bool)" ) {
- QDataStream args( data, IO_ReadOnly );
+ TQDataStream args( data, IO_ReadOnly );
if ( !args.atEnd() ) {
Q_INT8 iDaemon;
bool daemon;
@@ -1409,11 +1409,11 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return true;
}
}
- if ( fun == "registerAs(QCString)" ) {
- QDataStream args( data, IO_ReadOnly );
+ if ( fun == "registerAs(TQCString)" ) {
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
- QCString app2 = readQCString(args);
- QDataStream reply( replyData, IO_WriteOnly );
+ TQCString app2 = readQCString(args);
+ TQDataStream reply( replyData, IO_WriteOnly );
DCOPConnection* conn = clients.find( iceConn );
if ( conn && !app2.isEmpty() ) {
if ( !conn->appId.isNull() &&
@@ -1422,7 +1422,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
}
- QCString oldAppId;
+ TQCString oldAppId;
if ( conn->appId.isNull() )
{
currentClientNumber++;
@@ -1443,7 +1443,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
if ( appIds.find( app2 ) != 0 ) {
// we already have this application, unify
int n = 1;
- QCString tmp;
+ TQCString tmp;
do {
n++;
tmp.setNum( n );
@@ -1462,18 +1462,18 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
if( !oldAppId.isEmpty())
broadcastApplicationRegistration( conn,
- "applicationRemoved(QCString)", oldAppId );
- broadcastApplicationRegistration( conn, "applicationRegistered(QCString)", conn->appId );
+ "applicationRemoved(TQCString)", oldAppId );
+ broadcastApplicationRegistration( conn, "applicationRegistered(TQCString)", conn->appId );
}
- replyType = "QCString";
+ replyType = "TQCString";
reply << conn->appId;
return true;
}
}
else if ( fun == "registeredApplications()" ) {
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList applications;
- QAsciiDictIterator<DCOPConnection> it( appIds );
+ TQAsciiDictIterator<DCOPConnection> it( appIds );
while ( it.current() ) {
applications << it.currentKey();
++it;
@@ -1481,18 +1481,18 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
replyType = "QCStringList";
reply << applications;
return true;
- } else if ( fun == "isApplicationRegistered(QCString)" ) {
- QDataStream args( data, IO_ReadOnly );
+ } else if ( fun == "isApplicationRegistered(TQCString)" ) {
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
- QCString s = readQCString(args);
- QDataStream reply( replyData, IO_WriteOnly );
+ TQCString s = readQCString(args);
+ TQDataStream reply( replyData, IO_WriteOnly );
int b = ( findApp( s ) != 0 );
replyType = "bool";
reply << b;
return true;
}
} else if ( fun == "setNotifications(bool)" ) {
- QDataStream args( data, IO_ReadOnly );
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
Q_INT8 notifyActive;
args >> notifyActive;
@@ -1506,38 +1506,38 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
replyType = "void";
return true;
}
- } else if ( fun == "connectSignal(QCString,QCString,QCString,QCString,QCString,bool)") {
+ } else if ( fun == "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)") {
DCOPConnection* conn = clients.find( iceConn );
if (!conn) return false;
- QDataStream args(data, IO_ReadOnly );
+ TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
- QCString sender = readQCString(args);
- QCString senderObj = readQCString(args);
- QCString signal = readQCString(args);
- QCString receiverObj = readQCString(args);
- QCString slot = readQCString(args);
+ TQCString sender = readQCString(args);
+ TQCString senderObj = readQCString(args);
+ TQCString signal = readQCString(args);
+ TQCString receiverObj = readQCString(args);
+ TQCString slot = readQCString(args);
Q_INT8 Volatile;
args >> Volatile;
//qDebug("DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
bool b = dcopSignals->connectSignal(sender, senderObj, signal, conn, receiverObj, slot, (Volatile != 0));
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
return true;
- } else if ( fun == "disconnectSignal(QCString,QCString,QCString,QCString,QCString)") {
+ } else if ( fun == "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)") {
DCOPConnection* conn = clients.find( iceConn );
if (!conn) return false;
- QDataStream args(data, IO_ReadOnly );
+ TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
- QCString sender = readQCString(args);
- QCString senderObj = readQCString(args);
- QCString signal = readQCString(args);
- QCString receiverObj = readQCString(args);
- QCString slot = readQCString(args);
+ TQCString sender = readQCString(args);
+ TQCString senderObj = readQCString(args);
+ TQCString signal = readQCString(args);
+ TQCString receiverObj = readQCString(args);
+ TQCString slot = readQCString(args);
//qDebug("DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot);
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
return true;
}
@@ -1545,16 +1545,16 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return false;
}
-void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const QCString type,
- const QCString& appId )
+void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const TQCString type,
+ const TQCString& appId )
{
- QByteArray data;
- QDataStream datas( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream datas( data, IO_WriteOnly );
datas << appId;
- QPtrDictIterator<DCOPConnection> it( clients );
- QByteArray ba;
- QDataStream ds( ba, IO_WriteOnly );
- ds <<QCString("DCOPServer") << QCString("") << QCString("")
+ TQPtrDictIterator<DCOPConnection> it( clients );
+ TQByteArray ba;
+ TQDataStream ds( ba, IO_WriteOnly );
+ ds <<TQCString("DCOPServer") << TQCString("") << TQCString("")
<< type << data;
int datalen = ba.size();
DCOPMsg *pMsg = 0;
@@ -1574,12 +1574,12 @@ void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const Q
}
void
-DCOPServer::sendMessage(DCOPConnection *conn, const QCString &sApp,
- const QCString &rApp, const QCString &rObj,
- const QCString &rFun, const QByteArray &data)
+DCOPServer::sendMessage(DCOPConnection *conn, const TQCString &sApp,
+ const TQCString &rApp, const TQCString &rObj,
+ const TQCString &rFun, const TQByteArray &data)
{
- QByteArray ba;
- QDataStream ds( ba, IO_WriteOnly );
+ TQByteArray ba;
+ TQDataStream ds( ba, IO_WriteOnly );
ds << sApp << rApp << rObj << rFun << data;
int datalen = ba.size();
DCOPMsg *pMsg = 0;
@@ -1609,13 +1609,13 @@ void IoErrorHandler ( IceConn iceConn)
the_server->ioError( iceConn );
}
-static bool isRunning(const QCString &fName, bool printNetworkId = false)
+static bool isRunning(const TQCString &fName, bool printNetworkId = false)
{
if (::access(fName.data(), R_OK) == 0) {
- QFile f(fName);
+ TQFile f(fName);
f.open(IO_ReadOnly);
int size = QMIN( 1024, f.size() ); // protection against a huge file
- QCString contents( size+1 );
+ TQCString contents( size+1 );
bool ok = f.readBlock( contents.data(), size ) == size;
contents[size] = '\0';
int pos = contents.find('\n');
@@ -1692,12 +1692,12 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (isRunning(DCOPClient::dcopServerFile()))
return 0;
#ifndef Q_OS_WIN32
- if (QCString(getenv("DCOPAUTHORITY")).isEmpty() &&
+ if (TQCString(getenv("DCOPAUTHORITY")).isEmpty() &&
isRunning(DCOPClient::dcopServerFileOld()))
{
// Make symlink for compatibility
- QCString oldFile = DCOPClient::dcopServerFileOld();
- QCString newFile = DCOPClient::dcopServerFile();
+ TQCString oldFile = DCOPClient::dcopServerFileOld();
+ TQCString newFile = DCOPClient::dcopServerFile();
symlink(oldFile.data(), newFile.data());
return 0;
}
@@ -1766,7 +1766,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
#endif
putenv(strdup("SESSION_MANAGER="));
- QApplication a( argc, argv, false );
+ TQApplication a( argc, argv, false );
IceSetIOErrorHandler (IoErrorHandler );
DCOPServer *server = new DCOPServer(suicide); // this sets the_server
@@ -1774,8 +1774,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
#ifdef Q_OS_WIN
SetConsoleCtrlHandler(DCOPServer::dcopServerConsoleProc,TRUE);
#else
- QSocketNotifier DEATH(pipeOfDeath[0], QSocketNotifier::Read, 0, 0);
- server->connect(&DEATH, SIGNAL(activated(int)), SLOT(slotShutdown()));
+ TQSocketNotifier DEATH(pipeOfDeath[0], TQSocketNotifier::Read, 0, 0);
+ server->connect(&DEATH, TQT_SIGNAL(activated(int)), TQT_SLOT(slotShutdown()));
#endif
int ret = a.exec();
diff --git a/dcop/dcopserver.h b/dcop/dcopserver.h
index 5b7f995b6..343a2bc34 100644
--- a/dcop/dcopserver.h
+++ b/dcop/dcopserver.h
@@ -22,17 +22,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DCOPSERVER_H
#define DCOPSERVER_H "$Id$"
-#include <qobject.h>
-
-#include <qstring.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdict.h>
-#include <qptrdict.h>
-#include <qintdict.h>
-#include <qapplication.h>
+#include <tqobject.h>
+
+#include <tqstring.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdict.h>
+#include <tqptrdict.h>
+#include <tqintdict.h>
+#include <tqapplication.h>
#define INT32 QINT32
#ifdef Q_WS_X11
@@ -61,7 +61,7 @@ class QTextStream;
class QFile;
#endif
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* @internal
@@ -76,14 +76,14 @@ public:
// Add the data from offset @p start in @p _data to the output
// buffer and schedule it for later transmission.
- void waitForOutputReady(const QByteArray &_data, int start);
+ void waitForOutputReady(const TQByteArray &_data, int start);
// Called from DCOPServer::slotOutputReady()
// Flush the output buffer.
void slotOutputReady();
- QCString appId;
- QCString plainAppId;
+ TQCString appId;
+ TQCString plainAppId;
IceConn iceConn;
int notifyRegister;
/**
@@ -97,15 +97,15 @@ public:
* This allows us to do proper bookkeeping in case client A, client B
* or both unregister during the call.
*/
- QPtrList <_IceConn> waitingOnReply;
- QPtrList <_IceConn> waitingForReply;
- QPtrList <_IceConn> waitingForDelayedReply;
+ TQPtrList <_IceConn> waitingOnReply;
+ TQPtrList <_IceConn> waitingForReply;
+ TQPtrList <_IceConn> waitingForDelayedReply;
DCOPSignalConnectionList *_signalConnectionList;
bool daemon;
bool outputBlocked;
- QValueList <QByteArray> outputBuffer;
+ TQValueList <TQByteArray> outputBuffer;
unsigned long outputBufferStart;
- QSocketNotifier *outputBufferNotifier;
+ TQSocketNotifier *outputBufferNotifier;
};
@@ -124,17 +124,17 @@ public:
void processMessage( IceConn iceConn, int opcode, unsigned long length, Bool swap);
void ioError( IceConn iceConn );
- bool receive(const QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData, IceConn iceConn);
+ bool receive(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData, IceConn iceConn);
- DCOPConnection *findApp(const QCString &appId);
+ DCOPConnection *findApp(const TQCString &appId);
DCOPConnection *findConn(IceConn iceConn)
{ return clients.find(iceConn); }
- void sendMessage(DCOPConnection *conn, const QCString &sApp,
- const QCString &rApp, const QCString &rObj,
- const QCString &rFun, const QByteArray &data);
+ void sendMessage(DCOPConnection *conn, const TQCString &sApp,
+ const TQCString &rApp, const TQCString &rObj,
+ const TQCString &rFun, const TQByteArray &data);
private slots:
void newClient( int socket );
@@ -153,21 +153,21 @@ private:
static DWORD WINAPI TerminatorThread(void * pParam);
#endif
private:
- void broadcastApplicationRegistration( DCOPConnection* conn, const QCString type,
- const QCString& data );
+ void broadcastApplicationRegistration( DCOPConnection* conn, const TQCString type,
+ const TQCString& data );
bool suicide;
bool shutdown;
int majorOpcode;
int currentClientNumber;
CARD32 serverKey;
DCOPSignals *dcopSignals;
- QTimer *m_timer;
- QTimer *m_deadConnectionTimer;
- QPtrList<DCOPListener> listener;
- QAsciiDict<DCOPConnection> appIds; // index on app id
- QPtrDict<DCOPConnection> clients; // index on iceConn
- QIntDict<DCOPConnection> fd_clients; // index on fd
- QPtrList<_IceConn> deadConnections;
+ TQTimer *m_timer;
+ TQTimer *m_deadConnectionTimer;
+ TQPtrList<DCOPListener> listener;
+ TQAsciiDict<DCOPConnection> appIds; // index on app id
+ TQPtrDict<DCOPConnection> clients; // index on iceConn
+ TQIntDict<DCOPConnection> fd_clients; // index on fd
+ TQPtrList<_IceConn> deadConnections;
#ifdef Q_OS_WIN
HANDLE m_evTerminate;
@@ -176,8 +176,8 @@ private:
#endif
#ifdef DCOP_LOG
- QTextStream *m_stream;
- QFile *m_logger;
+ TQTextStream *m_stream;
+ TQFile *m_logger;
#endif
};
diff --git a/dcop/dcopserver_shutdown.c b/dcop/dcopserver_shutdown.c
index a9d7057ad..46a847660 100644
--- a/dcop/dcopserver_shutdown.c
+++ b/dcop/dcopserver_shutdown.c
@@ -52,9 +52,9 @@ static char *getDisplay()
char *screen;
char *colon;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
diff --git a/dcop/dcopserver_shutdown_win.cpp b/dcop/dcopserver_shutdown_win.cpp
index 5e9c6b9ca..ebc7897da 100644
--- a/dcop/dcopserver_shutdown_win.cpp
+++ b/dcop/dcopserver_shutdown_win.cpp
@@ -48,13 +48,13 @@
#endif
#define QT_CLEAN_NAMESPACE 1
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#define BUFFER_SIZE 4096
-extern QCString dcopServerFile(const QCString &hostname, bool old);
+extern TQCString dcopServerFile(const TQCString &hostname, bool old);
static char *getDisplay()
{
@@ -63,9 +63,9 @@ static char *getDisplay()
char *screen;
char *colon;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
@@ -131,8 +131,8 @@ static void killDCOPWin(pid_t pid)
static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
{
- QCString host;
- QCString strDCOPServer = DCOPClient::dcopServerFile(host);
+ TQCString host;
+ TQCString strDCOPServer = DCOPClient::dcopServerFile(host);
if(strDCOPServer.isEmpty())
{
@@ -142,10 +142,10 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
printf("server file %s\n",(const char *)strDCOPServer);
pid_t pid = 0;
- QFile f(strDCOPServer);
+ TQFile f(strDCOPServer);
if(f.open(IO_ReadOnly))
{
- QString str;
+ TQString str;
while(f.readLine(str,2048))
{
pid = str.toULong();
@@ -156,7 +156,7 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
}
f.close();
/* Clean up .DCOPserver file */
- QFile::remove(strDCOPServer);
+ TQFile::remove(strDCOPServer);
printf("remove server file %s\n",(const char *)strDCOPServer);
if(pid)
@@ -200,7 +200,7 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
int main(int argc, char **argv)
{
- QCString host;
+ TQCString host;
int dont_kill_dcop = (argc == 2) && (strcmp(argv[1], "--nokill") == 0);
int wait_for_exit = (argc == 2) && (strcmp(argv[1], "--wait") == 0);
diff --git a/dcop/dcopserver_win.cpp b/dcop/dcopserver_win.cpp
index 6d6c37859..4e6bc5e9f 100644
--- a/dcop/dcopserver_win.cpp
+++ b/dcop/dcopserver_win.cpp
@@ -19,7 +19,7 @@
//this file is included by dcopserver.cpp
-#include <qeventloop.h>
+#include <tqeventloop.h>
DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
{
@@ -35,7 +35,7 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
// Wait for main thread to tell us to realy terminate now
// Need some further event processing to get the timer signals
while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput|QEventLoop::ExcludeSocketNotifiers);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers);
fprintf( stderr, "DCOPServer : terminated event signaled the last time\n" );
}
fprintf( stderr, "DCOPServer : terminate thread teminated\n" );
diff --git a/dcop/dcopsignals.cpp b/dcop/dcopsignals.cpp
index 05d674107..437051a55 100644
--- a/dcop/dcopsignals.cpp
+++ b/dcop/dcopsignals.cpp
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopserver.h>
#include <dcopsignals.h>
-template class QPtrList<DCOPSignalConnection>;
+template class TQPtrList<DCOPSignalConnection>;
DCOPSignals::DCOPSignals()
{
@@ -35,10 +35,10 @@ DCOPSignals::DCOPSignals()
* If "excludeSelf" is true, signal is never sent to "conn" itself.
*/
void
-DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByteArray &data, bool excludeSelf)
+DCOPSignals::emitSignal( DCOPConnection *conn, const TQCString &_fun, const TQByteArray &data, bool excludeSelf)
{
- QCString senderObj;
- QCString fun = _fun;
+ TQCString senderObj;
+ TQCString fun = _fun;
int i = fun.find('#');
if (i > -1)
{
@@ -76,7 +76,7 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByte
doSend = false;
if (doSend)
{
- the_server->sendMessage(current->recvConn, conn ? conn->appId : QCString("DCOPServer"),
+ the_server->sendMessage(current->recvConn, conn ? conn->appId : TQCString("DCOPServer"),
current->recvConn->appId, current->recvObj,
current->slot, data);
}
@@ -94,13 +94,13 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByte
* "conn" unregisters.
*/
bool
-DCOPSignals::connectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot, bool Volatile)
+DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot, bool Volatile)
{
// TODO: Check if signal and slot match
- QCString signalArgs, slotArgs;
+ TQCString signalArgs, slotArgs;
int i,j;
i = signal.find('(');
if (i < 0) return false;
@@ -166,10 +166,10 @@ DCOPSignals::connectSignal( const QCString &sender, const QCString &senderObj,
* are disconnected.
*/
bool
-DCOPSignals::disconnectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot)
+DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot)
{
if (sender.isEmpty() && signal.isEmpty())
{
@@ -228,7 +228,7 @@ DCOPSignals::disconnectSignal( const QCString &sender, const QCString &senderObj
* All volatile connections for which "conn"/"obj" is the sender.
*/
void
-DCOPSignals::removeConnections(DCOPConnection *conn, const QCString &obj)
+DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj)
{
DCOPSignalConnectionList *list = conn->_signalConnectionList;
if (!list)
diff --git a/dcop/dcopsignals.h b/dcop/dcopsignals.h
index 142d713cb..f3aae683e 100644
--- a/dcop/dcopsignals.h
+++ b/dcop/dcopsignals.h
@@ -22,10 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DCOPSIGNALS_H
#define DCOPSIGNALS_H "$Id$"
-#include <qdict.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqasciidict.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class DCOPConnection;
@@ -37,18 +37,18 @@ class DCOPConnection;
class DCOP_EXPORT DCOPSignalConnection
{
public:
- QCString sender; // Sender client, empty means any client
+ TQCString sender; // Sender client, empty means any client
DCOPConnection *senderConn; //Sender client.
- QCString senderObj; // Object that sends the signal.
- QCString signal; // Signal name. Connections are sorted on signal name.
+ TQCString senderObj; // Object that sends the signal.
+ TQCString signal; // Signal name. Connections are sorted on signal name.
DCOPConnection *recvConn; // Client that wants to receive the signal
- QCString recvObj; // Object that wants to receive the signal
- QCString slot; // Function to send to in the object.
+ TQCString recvObj; // Object that wants to receive the signal
+ TQCString slot; // Function to send to in the object.
};
/** \internal */
-class DCOP_EXPORT DCOPSignalConnectionList : public QPtrList<DCOPSignalConnection>
+class DCOP_EXPORT DCOPSignalConnectionList : public TQPtrList<DCOPSignalConnection>
{
public:
DCOPSignalConnectionList() { };
@@ -70,7 +70,7 @@ public:
*
* If "excludeSelf" is true, signal is never send to "conn" itself.
*/
- void emitSignal( DCOPConnection *conn, const QCString &fun, const QByteArray &data, bool excludeSelf);
+ void emitSignal( DCOPConnection *conn, const TQCString &fun, const TQByteArray &data, bool excludeSelf);
/**
* Connects "signal" of the client named "sender" with the "slot" of
@@ -86,10 +86,10 @@ public:
* An attempt to create a Volatile connection to a non-existing client
* results in a failure.
*/
- bool connectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot, bool Volatile);
+ bool connectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot, bool Volatile);
/**
* Disconnects "signal" of the client named "sender" from the "slot" of
@@ -100,10 +100,10 @@ public:
*
* Returns true if successful, false if no connection was found.
*/
- bool disconnectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot);
+ bool disconnectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot);
/**
* Removes all connections related to the "conn" client.
@@ -111,7 +111,7 @@ public:
* All connections for which "conn" is the receiver.
* All volatile connections for which "conn" is the sender.
*/
- void removeConnections(DCOPConnection *conn, const QCString &obj=0);
+ void removeConnections(DCOPConnection *conn, const TQCString &obj=0);
/*
@@ -124,7 +124,7 @@ public:
* a given signal. The connections in this list may specify different
* senders and receiving clients/objects.
*/
- QAsciiDict<DCOPSignalConnectionList> connections;
+ TQAsciiDict<DCOPSignalConnectionList> connections;
};
//
diff --git a/dcop/dcopstub.cpp b/dcop/dcopstub.cpp
index 8f69b1abe..903ed0bc5 100644
--- a/dcop/dcopstub.cpp
+++ b/dcop/dcopstub.cpp
@@ -33,12 +33,12 @@ public:
DCOPClient* dcopClient;
};
-DCOPStub::DCOPStub( const QCString& app, const QCString& obj )
+DCOPStub::DCOPStub( const TQCString& app, const TQCString& obj )
: m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
{
}
-DCOPStub::DCOPStub( DCOPClient* client, const QCString& app, const QCString& obj )
+DCOPStub::DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
{
if ( client ) {
@@ -84,12 +84,12 @@ void DCOPStub::callFailed()
setStatus( CallFailed );
}
-QCString DCOPStub::app() const
+TQCString DCOPStub::app() const
{
return m_app;
}
-QCString DCOPStub::obj() const
+TQCString DCOPStub::obj() const
{
return m_obj;
}
diff --git a/dcop/dcopstub.h b/dcop/dcopstub.h
index 1ab46af24..df55e0f72 100644
--- a/dcop/dcopstub.h
+++ b/dcop/dcopstub.h
@@ -29,7 +29,7 @@ class DCOPStubPrivate;
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/**
@@ -46,7 +46,7 @@ public:
@param app the application id
@param obj the object id
*/
- DCOPStub( const QCString& app, const QCString& obj );
+ DCOPStub( const TQCString& app, const TQCString& obj );
/**
Creates a DCOPStub for application @p app and object @p obj
@@ -55,7 +55,7 @@ public:
@param app the application id
@param obj the object id
*/
- DCOPStub( DCOPClient* client, const QCString& app, const QCString& obj );
+ DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj );
/**
Creates a DCOPStub for application ref.app() and object ref.obj()
@@ -68,12 +68,12 @@ public:
Return the application id.
@return the application id
*/
- QCString app() const;
+ TQCString app() const;
/**
Return the object id.
@return the object id
*/
- QCString obj() const;
+ TQCString obj() const;
enum Status{ CallSucceeded, CallFailed };
/**
@@ -132,8 +132,8 @@ protected:
DCOPStub( never_use_t ) { abort(); }
private:
- QCString m_app;
- QCString m_obj;
+ TQCString m_app;
+ TQCString m_obj;
Status m_status;
protected:
diff --git a/dcop/dcoptypes.h b/dcop/dcoptypes.h
index 60a121926..62e3a4e0f 100644
--- a/dcop/dcoptypes.h
+++ b/dcop/dcoptypes.h
@@ -34,38 +34,38 @@ inline const char* dcopTypeName( long ) { return "long int"; }
inline const char* dcopTypeName( ulong ) { return "ulong"; }
inline const char* dcopTypeName( double ) { return "double"; }
inline const char* dcopTypeName( float ) { return "float"; }
-inline const char* dcopTypeName( const char* ) { return "QCString"; }
+inline const char* dcopTypeName( const char* ) { return "TQCString"; }
// dcop specialities
class DCOPRef; inline const char* dcopTypeName( const DCOPRef& ) { return "DCOPRef"; }
// Qt variant types
-class QString; inline const char* dcopTypeName( const QString& ) { return "QString"; }
-class QCString; inline const char* dcopTypeName( const QCString& ) { return "QCString"; }
-class QFont; inline const char* dcopTypeName( const QFont& ) { return "QFont"; }
-class QPixmap; inline const char* dcopTypeName( const QPixmap& ) { return "QPixmap"; }
-class QBrush; inline const char* dcopTypeName( const QBrush& ) { return "QBrush"; }
-class QRect; inline const char* dcopTypeName( const QRect& ) { return "QRect"; }
-class QPoint; inline const char* dcopTypeName( const QPoint& ) { return "QPoint"; }
-class QImage; inline const char* dcopTypeName( const QImage& ) { return "QImage"; }
-class QSize; inline const char* dcopTypeName( const QSize& ) { return "QSize"; }
-class QColor; inline const char* dcopTypeName( const QColor& ) { return "QColor"; }
-class QPalette; inline const char* dcopTypeName( const QPalette& ) { return "QPalette"; }
-class QColorGroup; inline const char* dcopTypeName( const QColorGroup& ) { return "QColorGroup"; }
-class QIconSet; inline const char* dcopTypeName( const QIconSet& ) { return "QIconSet"; }
-class QDataStream; inline const char* dcopTypeName( const QDataStream& ) { return "QDataStream"; }
-class QPointArray; inline const char* dcopTypeName( const QPointArray& ) { return "QPointArray"; }
-class QRegion; inline const char* dcopTypeName( const QRegion& ) { return "QRegion"; }
-class QBitmap; inline const char* dcopTypeName( const QBitmap& ) { return "QBitmap"; }
-class QCursor; inline const char* dcopTypeName( const QCursor& ) { return "QCursor"; }
-class QStringList; inline const char* dcopTypeName( const QStringList& ) { return "QStringList"; }
-class QSizePolicy; inline const char* dcopTypeName( const QSizePolicy& ) { return "QSizePolicy"; }
-class QDate; inline const char* dcopTypeName( const QDate& ) { return "QDate"; }
-class QTime; inline const char* dcopTypeName( const QTime& ) { return "QTime"; }
-class QDateTime; inline const char* dcopTypeName( const QDateTime& ) { return "QDateTime"; }
-class QBitArray; inline const char* dcopTypeName( const QBitArray& ) { return "QBitArray"; }
-class QKeySequence; inline const char* dcopTypeName( const QKeySequence& ) { return "QKeySequence"; }
-class QVariant; inline const char* dcopTypeName( const QVariant& ) { return "QVariant"; }
+class QString; inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
+class QCString; inline const char* dcopTypeName( const TQCString& ) { return "TQCString"; }
+class QFont; inline const char* dcopTypeName( const TQFont& ) { return "TQFont"; }
+class QPixmap; inline const char* dcopTypeName( const TQPixmap& ) { return "TQPixmap"; }
+class QBrush; inline const char* dcopTypeName( const TQBrush& ) { return "TQBrush"; }
+class QRect; inline const char* dcopTypeName( const TQRect& ) { return "TQRect"; }
+class QPoint; inline const char* dcopTypeName( const TQPoint& ) { return "TQPoint"; }
+class QImage; inline const char* dcopTypeName( const TQImage& ) { return "TQImage"; }
+class QSize; inline const char* dcopTypeName( const TQSize& ) { return "TQSize"; }
+class QColor; inline const char* dcopTypeName( const TQColor& ) { return "TQColor"; }
+class QPalette; inline const char* dcopTypeName( const TQPalette& ) { return "TQPalette"; }
+class QColorGroup; inline const char* dcopTypeName( const TQColorGroup& ) { return "TQColorGroup"; }
+class QIconSet; inline const char* dcopTypeName( const TQIconSet& ) { return "TQIconSet"; }
+class QDataStream; inline const char* dcopTypeName( const TQDataStream& ) { return "TQDataStream"; }
+class QPointArray; inline const char* dcopTypeName( const TQPointArray& ) { return "TQPointArray"; }
+class QRegion; inline const char* dcopTypeName( const TQRegion& ) { return "TQRegion"; }
+class QBitmap; inline const char* dcopTypeName( const TQBitmap& ) { return "TQBitmap"; }
+class QCursor; inline const char* dcopTypeName( const TQCursor& ) { return "TQCursor"; }
+class QStringList; inline const char* dcopTypeName( const TQStringList& ) { return "TQStringList"; }
+class QSizePolicy; inline const char* dcopTypeName( const TQSizePolicy& ) { return "TQSizePolicy"; }
+class QDate; inline const char* dcopTypeName( const TQDate& ) { return "TQDate"; }
+class QTime; inline const char* dcopTypeName( const TQTime& ) { return "TQTime"; }
+class QDateTime; inline const char* dcopTypeName( const TQDateTime& ) { return "TQDateTime"; }
+class QBitArray; inline const char* dcopTypeName( const TQBitArray& ) { return "TQBitArray"; }
+class QKeySequence; inline const char* dcopTypeName( const TQKeySequence& ) { return "TQKeySequence"; }
+class QVariant; inline const char* dcopTypeName( const TQVariant& ) { return "TQVariant"; }
// And some KDE types
class KURL; inline const char* dcopTypeName( const KURL& ) { return "KURL"; }
diff --git a/dcop/kdatastream.h b/dcop/kdatastream.h
index 2d9b65210..f8502aaab 100644
--- a/dcop/kdatastream.h
+++ b/dcop/kdatastream.h
@@ -1,15 +1,15 @@
#ifndef __kdatastream__h
#define __kdatastream__h
-#include <qdatastream.h>
+#include <tqdatastream.h>
-inline QDataStream & operator << (QDataStream & str, bool b)
+inline TQDataStream & operator << (TQDataStream & str, bool b)
{
str << Q_INT8(b);
return str;
}
-inline QDataStream & operator >> (QDataStream & str, bool & b)
+inline TQDataStream & operator >> (TQDataStream & str, bool & b)
{
Q_INT8 l;
str >> l;
@@ -18,7 +18,7 @@ inline QDataStream & operator >> (QDataStream & str, bool & b)
}
#if QT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
-inline QDataStream & operator << (QDataStream & str, long long int ll)
+inline TQDataStream & operator << (TQDataStream & str, long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
@@ -27,7 +27,7 @@ inline QDataStream & operator << (QDataStream & str, long long int ll)
return str;
}
-inline QDataStream & operator >> (QDataStream & str, long long int&ll)
+inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
@@ -35,7 +35,7 @@ inline QDataStream & operator >> (QDataStream & str, long long int&ll)
return str;
}
-inline QDataStream & operator << (QDataStream & str, unsigned long long int ll)
+inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
@@ -44,7 +44,7 @@ inline QDataStream & operator << (QDataStream & str, unsigned long long int ll)
return str;
}
-inline QDataStream & operator >> (QDataStream & str, unsigned long long int &ll)
+inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp
index a718442fc..e43b41c31 100644
--- a/dcop/testdcop.cpp
+++ b/dcop/testdcop.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <testdcop.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -35,31 +35,31 @@ DCOPClientTransaction *countDownAction2 = 0;
int countDownCount2 = 0;
DCOPClient *client = 0;
-bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
qDebug("in MyDCOPObject::process, fun = %s", fun.data());
// note "fun" is normlized here (i.e. whitespace clean)
- if (fun == "aFunction(QString,int)") {
- QDataStream args(data, IO_ReadOnly);
- QString arg1;
+ if (fun == "aFunction(TQString,int)") {
+ TQDataStream args(data, IO_ReadOnly);
+ TQString arg1;
int arg2;
args >> arg1 >> arg2;
function(arg1, arg2);
replyType = "void";
return true;
}
- if (fun == "canLaunchRockets(QRect)") {
- QDataStream args(data, IO_ReadOnly);
- QRect arg1;
+ if (fun == "canLaunchRockets(TQRect)") {
+ TQDataStream args(data, IO_ReadOnly);
+ TQRect arg1;
args >> arg1;
printf("Rect x = %d, y = %d, w = %d, h = %d\n", arg1.x(), arg1.y(), arg1.width(), arg1.height());
- replyType = "QRect";
- QDataStream reply( replyData, IO_WriteOnly );
- QRect r(10,20,100,200);
+ replyType = "TQRect";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ TQRect r(10,20,100,200);
reply << r;
return true;
}
@@ -74,9 +74,9 @@ bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
qDebug("countDown() countDownAction = %p", countDownAction);
if (countDownAction2)
{
- replyType = "QString";
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hey");
+ replyType = "TQString";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hey");
return true;
}
@@ -84,13 +84,13 @@ qDebug("countDown() countDownAction = %p", countDownAction);
{
countDownCount = 10;
countDownAction = client->beginTransaction();
- QTimer::singleShot(1000, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout()));
}
else
{
countDownCount2 = 10;
countDownAction2 = client->beginTransaction();
- QTimer::singleShot(1000, this, SLOT(slotTimeout2()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout2()));
}
return true;
}
@@ -104,16 +104,16 @@ void MyDCOPObject::slotTimeout()
countDownCount--;
if (countDownCount == 0)
{
- QCString replyType = "QString";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hello World");
+ TQCString replyType = "TQString";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hello World");
client->endTransaction(countDownAction, replyType, replyData);
countDownAction = 0;
}
else
{
- QTimer::singleShot(1000, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout()));
}
}
@@ -123,36 +123,36 @@ void MyDCOPObject::slotTimeout2()
countDownCount2--;
if (countDownCount2 == 0)
{
- QCString replyType = "QString";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hello World");
+ TQCString replyType = "TQString";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hello World");
client->endTransaction(countDownAction2, replyType, replyData);
countDownAction2 = 0;
}
else
{
- QTimer::singleShot(1000, this, SLOT(slotTimeout2()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout2()));
}
}
QCStringList MyDCOPObject::functions()
{
QCStringList result = DCOPObject::functions();
- result << "QRect canLaunchRockets(QRect)";
+ result << "TQRect canLaunchRockets(TQRect)";
return result;
}
-TestObject::TestObject(const QCString& app)
+TestObject::TestObject(const TQCString& app)
: m_app(app)
{
- QTimer::singleShot(2500, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(2500, this, TQT_SLOT(slotTimeout()));
}
void TestObject::slotTimeout()
{
- QCString replyType;
- QByteArray data, reply;
+ TQCString replyType;
+ TQByteArray data, reply;
qWarning("#3 Calling countDown");
if (!client->call(m_app, "object1", "countDown()", data, replyType, reply))
@@ -162,13 +162,13 @@ void TestObject::slotTimeout()
}
-void TestObject::slotCallBack(int callId, const QCString &replyType, const QByteArray &replyData)
+void TestObject::slotCallBack(int callId, const TQCString &replyType, const TQByteArray &replyData)
{
qWarning("Call Back! callId = %d", callId);
qWarning("Type = %s", replyType.data());
- QDataStream args(replyData, IO_ReadOnly);
- QString arg1;
+ TQDataStream args(replyData, IO_ReadOnly);
+ TQString arg1;
args >> arg1;
qWarning("Value = %s", arg1.latin1());
@@ -180,21 +180,21 @@ void TestObject::slotCallBack(int callId, const QCString &replyType, const QByte
int main(int argc, char **argv)
{
- QApplication app(argc, argv, "testdcop");
+ TQApplication app(argc, argv, "testdcop");
- QCString replyType;
- QByteArray data, reply;
+ TQCString replyType;
+ TQByteArray data, reply;
client = new DCOPClient();
if (argc == 2)
{
- QCString appId = argv[1];
+ TQCString appId = argv[1];
TestObject obj(appId);
qWarning("#1 Calling countDown");
- int result = client->callAsync(appId, "object1", "countDown()", data, &obj, SLOT(slotCallBack(int, const QCString&, const QByteArray&)));
+ int result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#1 countDown() call id = %d", result);
qWarning("#2 Calling countDown");
- result = client->callAsync(appId, "object1", "countDown()", data, &obj, SLOT(slotCallBack(int, const QCString&, const QByteArray&)));
+ result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#2 countDown() call id = %d", result);
app.exec();
@@ -209,18 +209,18 @@ int main(int argc, char **argv)
if ( client->isApplicationRegistered( app.name() ) )
qDebug("indeed, we are registered!");
- QDataStream dataStream( data, IO_WriteOnly );
+ TQDataStream dataStream( data, IO_WriteOnly );
dataStream << (int) 43;
- client->emitDCOPSignal("alive(int,QCString)", data);
+ client->emitDCOPSignal("alive(int,TQCString)", data);
MyDCOPObject *obj1 = new MyDCOPObject("object1");
- bool connectResult = client->connectDCOPSignal("", "alive(int , QCString)", "object1", "isAliveSlot(int)", false);
+ bool connectResult = client->connectDCOPSignal("", "alive(int , TQCString)", "object1", "isAliveSlot(int)", false);
qDebug("connectDCOPSignal returns %s", connectResult ? "true" : "false");
- QDataStream ds(data, IO_WriteOnly);
- ds << QString("fourty-two") << 42;
- if (!client->call(app.name(), "object1", "aFunction(QString,int)", data, replyType, reply)) {
+ TQDataStream ds(data, IO_WriteOnly);
+ ds << TQString("fourty-two") << 42;
+ if (!client->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply)) {
qDebug("I couldn't call myself");
assert( 0 );
}
@@ -229,22 +229,22 @@ int main(int argc, char **argv)
assert( replyType == "void" );
}
- client->send(app.name(), "object1", "aFunction(QString,int)", data );
+ client->send(app.name(), "object1", "aFunction(TQString,int)", data );
int n = client->registeredApplications().count();
qDebug("number of attached applications = %d", n );
- QObject::connect( client, SIGNAL( applicationRegistered( const QCString&)),
- obj1, SLOT( registered( const QCString& )));
+ TQObject::connect( client, TQT_SIGNAL( applicationRegistered( const TQCString&)),
+ obj1, TQT_SLOT( registered( const TQCString& )));
- QObject::connect( client, SIGNAL( applicationRemoved( const QCString&)),
- obj1, SLOT( unregistered( const QCString& )));
+ TQObject::connect( client, TQT_SIGNAL( applicationRemoved( const TQCString&)),
+ obj1, TQT_SLOT( unregistered( const TQCString& )));
// Enable the above signals
client->setNotifications( true );
- QCString foundApp;
- QCString foundObj;
+ TQCString foundApp;
+ TQCString foundObj;
// Find a object called "object1" in any application that
// meets the criteria "canLaunchRockets()"
@@ -272,10 +272,10 @@ int main(int argc, char **argv)
qDebug("I2 registered as '%s'", client2->appId().data() );
qDebug("Sending to object1");
- client2->send(app.name(), "object1", "aFunction(QString,int)", data );
+ client2->send(app.name(), "object1", "aFunction(TQString,int)", data );
qDebug("Calling object1");
- if (!client2->call(app.name(), "object1", "aFunction(QString,int)", data, replyType, reply))
+ if (!client2->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply))
qDebug("I couldn't call myself");
else
qDebug("return type was '%s'", replyType.data() );
diff --git a/dcop/testdcop.h b/dcop/testdcop.h
index 935924d79..135812e39 100644
--- a/dcop/testdcop.h
+++ b/dcop/testdcop.h
@@ -26,12 +26,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _TESTDCOP_H_
#define _TESTDCOP_H_
-#include <qapplication.h>
-#include <qbitarray.h>
+#include <tqapplication.h>
+#include <tqbitarray.h>
#include <dcopclient.h>
#include <dcopobject.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <stdio.h>
/**
@@ -45,32 +45,32 @@ class TestObject : public QObject
{
Q_OBJECT
public:
- TestObject(const QCString &app);
+ TestObject(const TQCString &app);
public slots:
void slotTimeout();
- void slotCallBack(int, const QCString&, const QByteArray&);
+ void slotCallBack(int, const TQCString&, const TQByteArray&);
private:
- QCString m_app;
+ TQCString m_app;
};
-class MyDCOPObject : public QObject, public DCOPObject
+class MyDCOPObject : public TQObject, public DCOPObject
{
Q_OBJECT
public:
- MyDCOPObject(const QCString &name) : DCOPObject(name) {}
- bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
- void function(const QString &arg1, int arg2) { qDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); }
+ MyDCOPObject(const TQCString &name) : DCOPObject(name) {}
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
+ void function(const TQString &arg1, int arg2) { qDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); }
public slots:
void slotTimeout();
void slotTimeout2();
- void registered(const QCString &appName)
+ void registered(const TQCString &appName)
{ printf("REGISTER: %s\n", appName.data()); }
- void unregistered(const QCString &appName)
+ void unregistered(const TQCString &appName)
{ printf("UNREGISTER: %s\n", appName.data()); }
QCStringList functions();
};
diff --git a/dcop/tests/driver.cpp b/dcop/tests/driver.cpp
index ac06d2873..147d2a748 100644
--- a/dcop/tests/driver.cpp
+++ b/dcop/tests/driver.cpp
@@ -3,8 +3,8 @@
#include <iostream>
#include <dcopclient.h>
#include <kcmdlineargs.h>
-#include <qtimer.h>
-#include <qtimer.h>
+#include <tqtimer.h>
+#include <tqtimer.h>
using namespace std;
@@ -20,7 +20,7 @@ Driver::Driver(const char* app)
}
-QTextStream output( fopen( "driver.returns", "w" ) , IO_WriteOnly );
+TQTextStream output( fopen( "driver.returns", "w" ) , IO_WriteOnly );
#include <iostream>
void Driver::test()
{
@@ -39,7 +39,7 @@ void Driver::test()
}
++count;
- QTimer::singleShot( 100, this, SLOT( test() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( test() ) );
}
#include "driver.moc"
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
app.dcopClient()->attach( );
app.dcopClient()->registerAs( "TestAppDriver" );
Driver * object = new Driver( appname );
- QTimer::singleShot( 10, object, SLOT( test() ) );
+ TQTimer::singleShot( 10, object, TQT_SLOT( test() ) );
return app.exec();
}
diff --git a/dcop/tests/driver.h b/dcop/tests/driver.h
index ee4d5df57..3565d88ab 100644
--- a/dcop/tests/driver.h
+++ b/dcop/tests/driver.h
@@ -1,11 +1,11 @@
#ifndef _OPT_KDECVS_SRC_KDELIBS_DCOP_TEST_TESTER_H
#define _OPT_KDECVS_SRC_KDELIBS_DCOP_TEST_TESTER_H
#include "test_stub.h"
-#include <qobject.h>
+#include <tqobject.h>
-class Driver : public QObject, public Test_stub
+class Driver : public TQObject, public Test_stub
{
Q_OBJECT
diff --git a/dcop/tests/test.cpp b/dcop/tests/test.cpp
index 025230547..7f5114071 100644
--- a/dcop/tests/test.cpp
+++ b/dcop/tests/test.cpp
@@ -16,7 +16,7 @@ using namespace std;
void batch()
{
- QTextStream output( fopen( "batch.returns", "w" ) , IO_WriteOnly );
+ TQTextStream output( fopen( "batch.returns", "w" ) , IO_WriteOnly );
Test* object = new Test;
#include "batch.generated"
}
diff --git a/dnssd/domainbrowser.cpp b/dnssd/domainbrowser.cpp
index f1c570e6a..8a24f11b6 100644
--- a/dnssd/domainbrowser.cpp
+++ b/dnssd/domainbrowser.cpp
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "domainbrowser.h"
#include "settings.h"
#include "sdevent.h"
@@ -58,8 +58,8 @@ public:
#ifdef HAVE_DNSSD
~DomainBrowserPrivate() { if (m_browser) avahi_domain_browser_free(m_browser); }
#endif
- QStringList m_domains;
- virtual void customEvent(QCustomEvent* event);
+ TQStringList m_domains;
+ virtual void customEvent(TQCustomEvent* event);
bool m_browseLAN;
bool m_started;
#ifdef HAVE_DNSSD
@@ -68,9 +68,9 @@ public:
DomainBrowser* m_owner;
};
-void DomainBrowserPrivate::customEvent(QCustomEvent* event)
+void DomainBrowserPrivate::customEvent(TQCustomEvent* event)
{
- if (event->type()==QEvent::User+SD_ADDREMOVE) {
+ if (event->type()==TQEvent::User+SD_ADDREMOVE) {
AddRemoveEvent *aev = static_cast<AddRemoveEvent*>(event);
if (aev->m_op==AddRemoveEvent::Add) m_owner->gotNewDomain(aev->m_domain);
else m_owner->gotRemoveDomain(aev->m_domain);
@@ -78,7 +78,7 @@ void DomainBrowserPrivate::customEvent(QCustomEvent* event)
}
-DomainBrowser::DomainBrowser(QObject *parent) : QObject(parent)
+DomainBrowser::DomainBrowser(TQObject *parent) : TQObject(parent)
{
d = new DomainBrowserPrivate(this);
d->m_domains = Configuration::domainList();
@@ -86,11 +86,11 @@ DomainBrowser::DomainBrowser(QObject *parent) : QObject(parent)
d->m_domains+="local.";
d->m_browseLAN=true;
}
- connect(KApplication::kApplication(),SIGNAL(kipcMessage(int,int)),this,
- SLOT(domainListChanged(int,int)));
+ connect(KApplication::kApplication(),TQT_SIGNAL(kipcMessage(int,int)),this,
+ TQT_SLOT(domainListChanged(int,int)));
}
-DomainBrowser::DomainBrowser(const QStringList& domains, bool recursive, QObject *parent) : QObject(parent)
+DomainBrowser::DomainBrowser(const TQStringList& domains, bool recursive, TQObject *parent) : TQObject(parent)
{
d = new DomainBrowserPrivate(this);
d->m_browseLAN = recursive;
@@ -109,8 +109,8 @@ void DomainBrowser::startBrowse()
if (d->m_started) return;
d->m_started=true;
if (ServiceBrowser::isAvailable()!=ServiceBrowser::Working) return;
- QStringList::const_iterator itEnd = d->m_domains.end();
- for (QStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it ) emit domainAdded(*it);
+ TQStringList::const_iterator itEnd = d->m_domains.end();
+ for (TQStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it ) emit domainAdded(*it);
#ifdef HAVE_DNSSD
if (d->m_browseLAN)
#ifdef AVAHI_API_0_6
@@ -123,14 +123,14 @@ void DomainBrowser::startBrowse()
#endif
}
-void DomainBrowser::gotNewDomain(const QString& domain)
+void DomainBrowser::gotNewDomain(const TQString& domain)
{
if (d->m_domains.contains(domain)) return;
d->m_domains.append(domain);
emit domainAdded(domain);
}
-void DomainBrowser::gotRemoveDomain(const QString& domain)
+void DomainBrowser::gotRemoveDomain(const TQString& domain)
{
d->m_domains.remove(domain);
emit domainRemoved(domain);
@@ -151,8 +151,8 @@ void DomainBrowser::domainListChanged(int message,int)
// remove all domains and resolvers
if (was_started) {
- QStringList::const_iterator itEnd = d->m_domains.end();
- for (QStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it )
+ TQStringList::const_iterator itEnd = d->m_domains.end();
+ for (TQStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it )
emit domainRemoved(*it);
}
d->m_domains.clear();
@@ -165,7 +165,7 @@ void DomainBrowser::domainListChanged(int message,int)
if (was_started) startBrowse();
}
-const QStringList& DomainBrowser::domains() const
+const TQStringList& DomainBrowser::domains() const
{
return d->m_domains;
}
@@ -187,11 +187,11 @@ void domains_callback(AvahiDomainBrowser*, AvahiIfIndex, AvahiProtocol, AvahiBr
void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev=new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::null, QString::null,
+ AddRemoveEvent::Remove, TQString::null, TQString::null,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#endif
diff --git a/dnssd/domainbrowser.h b/dnssd/domainbrowser.h
index 825422d8e..217a25617 100644
--- a/dnssd/domainbrowser.h
+++ b/dnssd/domainbrowser.h
@@ -21,8 +21,8 @@
#ifndef DNSSDDOMAINBROWSER_H
#define DNSSDDOMAINBROWSER_H
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include <dnssd/remoteservice.h>
// KIPC message ID used by kcm module to signal change in browsing domains list
@@ -47,7 +47,7 @@ public:
All changes in configuration are applied immediately.
@param parent Parent object.
*/
- DomainBrowser(QObject *parent=0);
+ DomainBrowser(TQObject *parent=0);
/**
Constructor that creates browser for domain list. This does not use global
@@ -57,14 +57,14 @@ public:
@param parent Parent object.
This process is recursive.
*/
- DomainBrowser(const QStringList& domains, bool recursive=false, QObject *parent=0);
+ DomainBrowser(const TQStringList& domains, bool recursive=false, TQObject *parent=0);
~DomainBrowser();
/**
Current list of domains to browse.
*/
- const QStringList& domains() const;
+ const TQStringList& domains() const;
/**
Starts browsing. To stop destroy this object.
@@ -80,12 +80,12 @@ signals:
/**
Emitted when domain has been removed from browsing list
*/
- void domainRemoved(const QString&);
+ void domainRemoved(const TQString&);
/**
New domain has been discovered. Also emitted for domain specified in constructor
and in global configuration
*/
- void domainAdded(const QString&);
+ void domainAdded(const TQString&);
protected:
virtual void virtual_hook(int,void*);
@@ -93,8 +93,8 @@ private:
friend class DomainBrowserPrivate;
DomainBrowserPrivate *d;
- void gotNewDomain(const QString&);
- void gotRemoveDomain(const QString&);
+ void gotNewDomain(const TQString&);
+ void gotRemoveDomain(const TQString&);
private slots:
void domainListChanged(int,int);
diff --git a/dnssd/publicservice.cpp b/dnssd/publicservice.cpp
index 63ab6750b..326dabeb7 100644
--- a/dnssd/publicservice.cpp
+++ b/dnssd/publicservice.cpp
@@ -26,7 +26,7 @@
#endif
#include <netinet/in.h>
#include <sys/socket.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <network/ksocketaddress.h>
#include <kurl.h>
#include <unistd.h>
@@ -74,15 +74,15 @@ public:
};
-PublicService::PublicService(const QString& name, const QString& type, unsigned int port,
- const QString& domain)
- : QObject(), ServiceBase(name, type, QString::null, domain, port)
+PublicService::PublicService(const TQString& name, const TQString& type, unsigned int port,
+ const TQString& domain)
+ : TQObject(), ServiceBase(name, type, TQString::null, domain, port)
{
d = new PublicServicePrivate;
#ifdef HAVE_DNSSD
if (Responder::self().client()) {
d->m_group = avahi_entry_group_new(Responder::self().client(), publish_callback,this);
- connect(&Responder::self(),SIGNAL(stateChanged(AvahiClientState)),this,SLOT(clientState(AvahiClientState)));
+ connect(&Responder::self(),TQT_SIGNAL(stateChanged(AvahiClientState)),this,TQT_SLOT(clientState(AvahiClientState)));
}
#endif
if (domain.isNull())
@@ -108,7 +108,7 @@ void PublicService::tryApply()
}
}
-void PublicService::setServiceName(const QString& serviceName)
+void PublicService::setServiceName(const TQString& serviceName)
{
m_serviceName = serviceName;
#ifdef HAVE_DNSSD
@@ -119,7 +119,7 @@ void PublicService::setServiceName(const QString& serviceName)
#endif
}
-void PublicService::setDomain(const QString& domain)
+void PublicService::setDomain(const TQString& domain)
{
m_domain = domain;
#ifdef HAVE_DNSSD
@@ -131,7 +131,7 @@ void PublicService::setDomain(const QString& domain)
}
-void PublicService::setType(const QString& type)
+void PublicService::setType(const TQString& type)
{
m_type = type;
#ifdef HAVE_DNSSD
@@ -153,7 +153,7 @@ void PublicService::setPort(unsigned short port)
#endif
}
-void PublicService::setTextData(const QMap<QString,QString>& textData)
+void PublicService::setTextData(const TQMap<TQString,TQString>& textData)
{
m_textData = textData;
#ifdef HAVE_DNSSD
@@ -187,8 +187,8 @@ bool PublicService::fillEntryGroup()
{
#ifdef HAVE_DNSSD
AvahiStringList *s=0;
- QMap<QString,QString>::ConstIterator itEnd = m_textData.end();
- for (QMap<QString,QString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
+ TQMap<TQString,TQString>::ConstIterator itEnd = m_textData.end();
+ for (TQMap<TQString,TQString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
s = avahi_string_list_add_pair(s, it.key().utf8(),it.data().utf8());
#ifdef AVAHI_API_0_6
bool res = (!avahi_entry_group_add_service_strlst(d->m_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, (AvahiPublishFlags)0,
@@ -255,14 +255,14 @@ void PublicService::publishAsync()
#ifdef HAVE_DNSSD
void publish_callback (AvahiEntryGroup*, AvahiEntryGroupState s, void *context)
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
if (s!=AVAHI_ENTRY_GROUP_ESTABLISHED && s!=AVAHI_ENTRY_GROUP_COLLISION) return;
PublishEvent* pev=new PublishEvent(s==AVAHI_ENTRY_GROUP_ESTABLISHED);
- QApplication::postEvent(obj, pev);
+ TQApplication::postEvent(obj, pev);
}
#endif
-const KURL PublicService::toInvitation(const QString& host)
+const KURL PublicService::toInvitation(const TQString& host)
{
KURL url;
url.setProtocol("invitation");
@@ -275,19 +275,19 @@ const KURL PublicService::toInvitation(const QString& host)
//FIXME: if there is no public interface, select any non-loopback
url.setPort(m_port);
url.setPath("/"+m_type+"/"+KURL::encode_string(m_serviceName));
- QString query;
- QMap<QString,QString>::ConstIterator itEnd = m_textData.end();
- for (QMap<QString,QString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
+ TQString query;
+ TQMap<TQString,TQString>::ConstIterator itEnd = m_textData.end();
+ for (TQMap<TQString,TQString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
url.addQueryItem(it.key(),it.data());;
return url;
}
-void PublicService::customEvent(QCustomEvent* event)
+void PublicService::customEvent(TQCustomEvent* event)
{
#ifdef HAVE_DNSSD
- if (event->type()==QEvent::User+SD_PUBLISH) {
+ if (event->type()==TQEvent::User+SD_PUBLISH) {
if (!static_cast<PublishEvent*>(event)->m_ok) {
- setServiceName(QString::fromUtf8(avahi_alternative_service_name(m_serviceName.utf8())));
+ setServiceName(TQString::fromUtf8(avahi_alternative_service_name(m_serviceName.utf8())));
return;
}
d->m_published=true;
diff --git a/dnssd/publicservice.h b/dnssd/publicservice.h
index 31897a03e..946225778 100644
--- a/dnssd/publicservice.h
+++ b/dnssd/publicservice.h
@@ -21,7 +21,7 @@
#ifndef DNSSDPUBLICSERVICE_H
#define DNSSDPUBLICSERVICE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/servicebase.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -49,7 +49,7 @@ Asynchronous publishing is better for responsiveness. Example:
\code
DNSSD::PublicService *service = new DNSSD::PublicService("My files","_http._tcp",80);
-connect(service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool)));
+connect(service,TQT_SIGNAL(published(bool)),this,TQT_SLOT(wasPublished(bool)));
service->publishAsync();
\endcode
@@ -58,20 +58,20 @@ service->publishAsync();
@author Jakub Stachowski
*/
-class KDNSSD_EXPORT PublicService : public QObject, public ServiceBase
+class KDNSSD_EXPORT PublicService : public TQObject, public ServiceBase
{
Q_OBJECT
public:
/**
- @param name Service name. If set to QString::null, computer name will be used and will be
+ @param name Service name. If set to TQString::null, computer name will be used and will be
available via serviceName() after successful registration
@param type Service type. Has to be in form _sometype._udp or _sometype._tcp
@param port Port number. Set to 0 to "reserve" service name.
- @param domain Domain name. If left as QString:null, user configuration will be used. "local."
+ @param domain Domain name. If left as TQString:null, user configuration will be used. "local."
means local LAN
*/
- PublicService(const QString& name=QString::null,const QString& type=QString::null,
- unsigned int port=0,const QString& domain=QString::null);
+ PublicService(const TQString& name=TQString::null,const TQString& type=TQString::null,
+ unsigned int port=0,const TQString& domain=TQString::null);
~PublicService();
@@ -102,18 +102,18 @@ public:
/**
Sets new text properties. If services is already published, it will be re-announced with new data.
*/
- void setTextData(const QMap<QString,QString>& textData);
+ void setTextData(const TQMap<TQString,TQString>& textData);
/**
Sets name of the service. If service is currently published, it will be re-announced with new data.
*/
- void setServiceName(const QString& serviceName);
+ void setServiceName(const TQString& serviceName);
/**
Sets type of service. It has to in form of _type._udp or _type._tcp. If service is
currently published, it will be re-announced with new data.
*/
- void setType(const QString& type);
+ void setType(const TQString& type);
/**
Sets port. If service is currently published, it will be re-announced with new data.
@@ -124,7 +124,7 @@ public:
Sets domain where service is published. "local." means local LAN. If service is currently
published, it will be re-announced with new data.
*/
- void setDomain(const QString& domain);
+ void setDomain(const TQString& domain);
/**
Translates service into URL that can be sent to another user.
@@ -132,7 +132,7 @@ public:
default route) will be used.
@since 3.5
*/
- const KURL toInvitation(const QString& host=QString::null);
+ const KURL toInvitation(const TQString& host=TQString::null);
signals:
/**
@@ -148,7 +148,7 @@ private slots:
void clientState(AvahiClientState);
protected:
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
virtual void virtual_hook(int, void*);
};
diff --git a/dnssd/query.cpp b/dnssd/query.cpp
index 163891c71..3306dc256 100644
--- a/dnssd/query.cpp
+++ b/dnssd/query.cpp
@@ -22,9 +22,9 @@
#include "responder.h"
#include "remoteservice.h"
#include "sdevent.h"
-#include <qdatetime.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -59,22 +59,22 @@ enum BrowserType { Types, Services };
class QueryPrivate
{
public:
- QueryPrivate(const QString& type, const QString& domain) : m_finished(false), m_browser(0),
+ QueryPrivate(const TQString& type, const TQString& domain) : m_finished(false), m_browser(0),
m_running(false), m_domain(domain), m_type(type) {}
bool m_finished;
BrowserType m_browserType;
void* m_browser;
bool m_running;
- QString m_domain;
- QTimer timeout;
- QString m_type;
+ TQString m_domain;
+ TQTimer timeout;
+ TQString m_type;
};
-Query::Query(const QString& type, const QString& domain)
+Query::Query(const TQString& type, const TQString& domain)
{
d = new QueryPrivate(type,domain);
- connect(&d->timeout,SIGNAL(timeout()),this,SLOT(timeout()));
+ connect(&d->timeout,TQT_SIGNAL(timeout()),this,TQT_SLOT(timeout()));
}
@@ -101,7 +101,7 @@ bool Query::isFinished() const
return d->m_finished;
}
-const QString& Query::domain() const
+const TQString& Query::domain() const
{
return d->m_domain;
}
@@ -142,9 +142,9 @@ void Query::virtual_hook(int, void*)
{
}
-void Query::customEvent(QCustomEvent* event)
+void Query::customEvent(TQCustomEvent* event)
{
- if (event->type()==QEvent::User+SD_ADDREMOVE) {
+ if (event->type()==TQEvent::User+SD_ADDREMOVE) {
d->timeout.start(TIMEOUT_LAN,true);
d->m_finished=false;
AddRemoveEvent *aev = static_cast<AddRemoveEvent*>(event);
@@ -171,11 +171,11 @@ void services_callback (AvahiServiceBrowser*, AvahiIfIndex, AvahiProtocol, Avahi
const char* serviceName, const char* regtype, const char* replyDomain, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev = new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::fromUtf8(serviceName), regtype,
+ AddRemoveEvent::Remove, TQString::fromUtf8(serviceName), regtype,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#ifdef AVAHI_API_0_6
@@ -186,11 +186,11 @@ void types_callback(AvahiServiceTypeBrowser*, AvahiIfIndex, AvahiProtocol, Avahi
const char* replyDomain, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev = new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::null, regtype,
+ AddRemoveEvent::Remove, TQString::null, regtype,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#endif
diff --git a/dnssd/query.h b/dnssd/query.h
index 793b18731..90e9fe19d 100644
--- a/dnssd/query.h
+++ b/dnssd/query.h
@@ -21,7 +21,7 @@
#ifndef DNSSDQUERY_H
#define DNSSDQUERY_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/remoteservice.h>
@@ -47,7 +47,7 @@ public:
@param domain Domain name - if set to "local." multicast query will be performed,
otherwise unicast
*/
- Query(const QString& type, const QString& domain);
+ Query(const TQString& type, const TQString& domain);
virtual ~Query();
@@ -71,7 +71,7 @@ public:
/**
Returns queried domain
*/
- const QString& domain() const;
+ const TQString& domain() const;
signals:
/**
@@ -91,7 +91,7 @@ signals:
protected:
virtual void virtual_hook(int, void*);
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
private:
QueryPrivate *d;
private slots:
diff --git a/dnssd/remoteservice.cpp b/dnssd/remoteservice.cpp
index 865c3be7f..62ec01eb0 100644
--- a/dnssd/remoteservice.cpp
+++ b/dnssd/remoteservice.cpp
@@ -20,8 +20,8 @@
#include <config.h>
-#include <qeventloop.h>
-#include <qapplication.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
#include <kurl.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -72,12 +72,12 @@ public:
#endif
};
-RemoteService::RemoteService(const QString& label)
+RemoteService::RemoteService(const TQString& label)
{
decode(label);
d = new RemoteServicePrivate();
}
-RemoteService::RemoteService(const QString& name,const QString& type,const QString& domain)
+RemoteService::RemoteService(const TQString& name,const TQString& type,const TQString& domain)
: ServiceBase(name, type, domain)
{
d = new RemoteServicePrivate();
@@ -139,16 +139,16 @@ bool RemoteService::isResolved() const
return d->m_resolved;
}
-void RemoteService::customEvent(QCustomEvent* event)
+void RemoteService::customEvent(TQCustomEvent* event)
{
- if (event->type() == QEvent::User+SD_ERROR) {
+ if (event->type() == TQEvent::User+SD_ERROR) {
#ifdef HAVE_DNSSD
d->stop();
#endif
d->m_resolved=false;
emit resolved(false);
}
- if (event->type() == QEvent::User+SD_RESOLVE) {
+ if (event->type() == TQEvent::User+SD_RESOLVE) {
ResolveEvent* rev = static_cast<ResolveEvent*>(event);
m_hostName = rev->m_hostname;
m_port = rev->m_port;
@@ -163,7 +163,7 @@ void RemoteService::virtual_hook(int, void*)
// BASE::virtual_hook(int, void*);
}
-QDataStream & operator<< (QDataStream & s, const RemoteService & a)
+TQDataStream & operator<< (TQDataStream & s, const RemoteService & a)
{
s << (static_cast<ServiceBase>(a));
Q_INT8 resolved = a.d->m_resolved ? 1:0;
@@ -171,7 +171,7 @@ QDataStream & operator<< (QDataStream & s, const RemoteService & a)
return s;
}
-QDataStream & operator>> (QDataStream & s, RemoteService & a)
+TQDataStream & operator>> (TQDataStream & s, RemoteService & a)
{
// stop any possible resolve going on
#ifdef HAVE_DNSSD
@@ -195,22 +195,22 @@ void resolve_callback(AvahiServiceResolver*, AvahiIfIndex, AvahiProtocol, AvahiR
uint16_t port, AvahiStringList* txt, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
if (e != AVAHI_RESOLVER_FOUND) {
ErrorEvent err;
- QApplication::sendEvent(obj, &err);
+ TQApplication::sendEvent(obj, &err);
return;
}
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
while (txt) {
char *key, *value;
size_t size;
if (avahi_string_list_get_pair(txt,&key,&value,&size)) break;
- map[QString::fromUtf8(key)]=(value) ? QString::fromUtf8(value) : QString::null;
+ map[TQString::fromUtf8(key)]=(value) ? TQString::fromUtf8(value) : TQString::null;
txt = txt->next;
}
ResolveEvent rev(DNSToDomain(hostname),port,map);
- QApplication::sendEvent(obj, &rev);
+ TQApplication::sendEvent(obj, &rev);
}
#endif
diff --git a/dnssd/remoteservice.h b/dnssd/remoteservice.h
index 220331b5f..b7c9f05ef 100644
--- a/dnssd/remoteservice.h
+++ b/dnssd/remoteservice.h
@@ -21,7 +21,7 @@
#ifndef DNSSDREMOTESERVICE_H
#define DNSSDREMOTESERVICE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/servicebase.h>
class QDataStream;
@@ -39,7 +39,7 @@ service is resolved are name, type.and domain.
@short class representing service announced on remote machine.
@author Jakub Stachowski
*/
-class KDNSSD_EXPORT RemoteService : public QObject, public ServiceBase
+class KDNSSD_EXPORT RemoteService : public TQObject, public ServiceBase
{
Q_OBJECT
public:
@@ -50,12 +50,12 @@ public:
@param label Data returned by PTR query - it is decoded into name, type and
domain
*/
- RemoteService(const QString& label);
+ RemoteService(const TQString& label);
/**
Creates unresolved remote service with given name, type and domain.
*/
- RemoteService(const QString& name,const QString& type,const QString& domain);
+ RemoteService(const TQString& name,const TQString& type,const TQString& domain);
/**
Creates resolved remote service from invitation URL constructed by PublicService::toInvitation.
@@ -94,15 +94,15 @@ signals:
protected:
virtual void virtual_hook(int id, void *data);
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
private:
void resolveError();
void resolved(const char *host, unsigned short port, unsigned short txtlen,
const char* txtRecord);
RemoteServicePrivate *d;
- friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const RemoteService & a);
- friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, RemoteService & a);
+ friend KDNSSD_EXPORT TQDataStream & operator<< (TQDataStream & s, const RemoteService & a);
+ friend KDNSSD_EXPORT TQDataStream & operator>> (TQDataStream & s, RemoteService & a);
};
diff --git a/dnssd/responder.cpp b/dnssd/responder.cpp
index d92d30261..d85358429 100644
--- a/dnssd/responder.cpp
+++ b/dnssd/responder.cpp
@@ -19,8 +19,8 @@
*/
#include "responder.h"
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kstaticdeleter.h>
#include <kidna.h>
#include <kdebug.h>
@@ -72,7 +72,7 @@ Responder& Responder::self()
void Responder::process()
{
- qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ qApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}
#ifdef HAVE_DNSSD
@@ -86,20 +86,20 @@ AvahiClientState Responder::state() const
}
#endif
-bool domainIsLocal(const QString& domain)
+bool domainIsLocal(const TQString& domain)
{
return domain.section('.',-1,-1).lower()=="local";
}
-QCString domainToDNS(const QString &domain)
+TQCString domainToDNS(const TQString &domain)
{
if (domainIsLocal(domain)) return domain.utf8();
else return KIDNA::toAsciiCString(domain);
}
-QString DNSToDomain(const char* domain)
+TQString DNSToDomain(const char* domain)
{
- if (domainIsLocal(domain)) return QString::fromUtf8(domain);
+ if (domainIsLocal(domain)) return TQString::fromUtf8(domain);
else return KIDNA::toUnicode(domain);
}
diff --git a/dnssd/responder.h b/dnssd/responder.h
index 50c870aae..ae909b59b 100644
--- a/dnssd/responder.h
+++ b/dnssd/responder.h
@@ -21,9 +21,9 @@
#ifndef DNSSDRESPONDER_H
#define DNSSDRESPONDER_H
-#include <qobject.h>
-#include <qsocketnotifier.h>
-#include <qsignal.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
+#include <tqsignal.h>
#include <config.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -71,10 +71,10 @@ private:
/* Utils functions */
-bool domainIsLocal(const QString& domain);
+bool domainIsLocal(const TQString& domain);
// Encodes domain name using utf8() or IDN
-QCString domainToDNS(const QString &domain);
-QString DNSToDomain(const char* domain);
+TQCString domainToDNS(const TQString &domain);
+TQString DNSToDomain(const char* domain);
}
diff --git a/dnssd/sdevent.h b/dnssd/sdevent.h
index 8530e730f..90f4a64d5 100644
--- a/dnssd/sdevent.h
+++ b/dnssd/sdevent.h
@@ -21,9 +21,9 @@
#ifndef DNSSDSDEVENT_H
#define DNSSDSDEVENT_H
-#include <qevent.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace DNSSD
{
@@ -33,28 +33,28 @@ enum Operation { SD_ERROR = 101,SD_ADDREMOVE, SD_PUBLISH, SD_RESOLVE};
class ErrorEvent : public QCustomEvent
{
public:
- ErrorEvent() : QCustomEvent(QEvent::User+SD_ERROR)
+ ErrorEvent() : TQCustomEvent(TQEvent::User+SD_ERROR)
{}
};
class AddRemoveEvent : public QCustomEvent
{
public:
enum Operation { Add, Remove };
- AddRemoveEvent(Operation op,const QString& name,const QString& type,
- const QString& domain) : QCustomEvent(QEvent::User+SD_ADDREMOVE),
+ AddRemoveEvent(Operation op,const TQString& name,const TQString& type,
+ const TQString& domain) : TQCustomEvent(TQEvent::User+SD_ADDREMOVE),
m_op(op), m_name(name), m_type(type), m_domain(domain)
{}
const Operation m_op;
- const QString m_name;
- const QString m_type;
- const QString m_domain;
+ const TQString m_name;
+ const TQString m_type;
+ const TQString m_domain;
};
class PublishEvent : public QCustomEvent
{
public:
- PublishEvent(bool ok) : QCustomEvent(QEvent::User+SD_PUBLISH), m_ok(ok)
+ PublishEvent(bool ok) : TQCustomEvent(TQEvent::User+SD_PUBLISH), m_ok(ok)
{}
bool m_ok;
@@ -63,15 +63,15 @@ public:
class ResolveEvent : public QCustomEvent
{
public:
- ResolveEvent(const QString& hostname, unsigned short port,
- const QMap<QString,QString>& txtdata)
- : QCustomEvent(QEvent::User+SD_RESOLVE), m_hostname(hostname),
+ ResolveEvent(const TQString& hostname, unsigned short port,
+ const TQMap<TQString,TQString>& txtdata)
+ : TQCustomEvent(TQEvent::User+SD_RESOLVE), m_hostname(hostname),
m_port(port), m_txtdata(txtdata)
{}
- const QString m_hostname;
+ const TQString m_hostname;
const unsigned short m_port;
- const QMap<QString,QString> m_txtdata;
+ const TQMap<TQString,TQString> m_txtdata;
};
diff --git a/dnssd/servicebase.cpp b/dnssd/servicebase.cpp
index 7fd1ef802..52d18cca3 100644
--- a/dnssd/servicebase.cpp
+++ b/dnssd/servicebase.cpp
@@ -19,39 +19,39 @@
*/
#include "servicebase.h"
-#include <qregexp.h>
+#include <tqregexp.h>
namespace DNSSD
{
-ServiceBase::ServiceBase(const QString& name, const QString& type, const QString& domain,
- const QString& host, unsigned short port) :
+ServiceBase::ServiceBase(const TQString& name, const TQString& type, const TQString& domain,
+ const TQString& host, unsigned short port) :
m_serviceName(name), m_type(type), m_domain(domain), m_hostName(host), m_port(port)
{}
ServiceBase::~ServiceBase()
{}
-QString ServiceBase::encode()
+TQString ServiceBase::encode()
{
- return m_serviceName.replace(".","\\.").replace("\\","\\\\") + QString(".") + m_type +
- QString(".") + m_domain;
+ return m_serviceName.replace(".","\\.").replace("\\","\\\\") + TQString(".") + m_type +
+ TQString(".") + m_domain;
}
// example: 3rd\.\032Floor\032Copy\032Room._ipp._tcp.dns-sd.org. - normal service
// 3rd\.\032Floor\032Copy\032Room.dns-sd.org - domain
// _ipp._tcp.dns-sd.org - metaquery
-void ServiceBase::decode(const QString& name)
+void ServiceBase::decode(const TQString& name)
{
- QString rest;
+ TQString rest;
if (name[0]=='_') { // metaquery
m_serviceName="";
rest=name;
} else { // normal service or domain
- QString decoded_name=name;
+ TQString decoded_name=name;
decoded_name=decoded_name.replace("\\\\","\\");
- int i = decoded_name.find(QRegExp("[^\\\\]\\."));
+ int i = decoded_name.find(TQRegExp("[^\\\\]\\."));
if (i==-1) return; // first find service name
rest = decoded_name.mid(i+2);
m_serviceName=decoded_name.left(i+1).replace("\\.",".");
@@ -59,29 +59,29 @@ void ServiceBase::decode(const QString& name)
m_type = rest.section('.',0,1);
// does it really have a type?
if (m_type[0]=='_' && m_type[m_type.find('.')+1]=='_')
- m_domain = rest.section('.',2,-1,QString::SectionIncludeTrailingSep);
+ m_domain = rest.section('.',2,-1,TQString::SectionIncludeTrailingSep);
else {
m_type="";
m_domain=rest;
}
}
-const QString& ServiceBase::serviceName() const
+const TQString& ServiceBase::serviceName() const
{
return m_serviceName;
}
-const QString& ServiceBase::type() const
+const TQString& ServiceBase::type() const
{
return m_type;
}
-const QString& ServiceBase::domain() const
+const TQString& ServiceBase::domain() const
{
return m_domain;
}
-const QString& ServiceBase::hostName() const
+const TQString& ServiceBase::hostName() const
{
return m_hostName;
}
@@ -90,7 +90,7 @@ unsigned short ServiceBase::port() const
{
return m_port;
}
-const QMap<QString,QString>& ServiceBase::textData() const
+const TQMap<TQString,TQString>& ServiceBase::textData() const
{
return m_textData;
}
@@ -98,13 +98,13 @@ const QMap<QString,QString>& ServiceBase::textData() const
void ServiceBase::virtual_hook(int, void*)
{}
-QDataStream & operator<< (QDataStream & s, const ServiceBase & a)
+TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a)
{
s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << Q_INT16(a.m_port) << a.m_textData;
return s;
}
-QDataStream & operator>> (QDataStream & s, ServiceBase & a)
+TQDataStream & operator>> (TQDataStream & s, ServiceBase & a)
{
Q_INT16 port;
s >> a.m_serviceName >> a.m_type >> a.m_domain >> a.m_hostName >> port >> a.m_textData;
diff --git a/dnssd/servicebase.h b/dnssd/servicebase.h
index 28ec7f565..793532371 100644
--- a/dnssd/servicebase.h
+++ b/dnssd/servicebase.h
@@ -21,7 +21,7 @@
#ifndef DNSSDSERVICEBASE_H
#define DNSSDSERVICEBASE_H
-#include <qmap.h>
+#include <tqmap.h>
#include <ksharedptr.h>
class QString;
@@ -49,8 +49,8 @@ public:
@param host Host name
@param port Port number
*/
- ServiceBase(const QString& name=QString::null,const QString& type=QString::null,
- const QString& domain=QString::null, const QString& host=QString::null,
+ ServiceBase(const TQString& name=TQString::null,const TQString& type=TQString::null,
+ const TQString& domain=TQString::null, const TQString& host=TQString::null,
unsigned short port=0);
virtual ~ServiceBase();
@@ -58,23 +58,23 @@ public:
/**
Returns name of service. This is empty for metaservices
*/
- const QString& serviceName() const;
+ const TQString& serviceName() const;
/**
Returns type of service. It always in format _sometype._udp or _sometype._tcp and
it is empty for domains.
*/
- const QString& type() const;
+ const TQString& type() const;
/**
Returns domain that given service belongs to. It is "local." for link-local services.
*/
- const QString& domain() const;
+ const TQString& domain() const;
/**
Returns hostname. It is only valid for local and resolved remote services.
*/
- const QString& hostName() const;
+ const TQString& hostName() const;
/**
Returns port number. It is only valid for local and resolved remote services.
@@ -84,31 +84,31 @@ public:
/**
Returns read only map of text properties. It is only valid for local and resolved remote services.
*/
- const QMap<QString,QString>& textData() const;
+ const TQMap<TQString,TQString>& textData() const;
protected:
- QString m_serviceName;
- QString m_type;
- QString m_domain;
- QString m_hostName;
+ TQString m_serviceName;
+ TQString m_type;
+ TQString m_domain;
+ TQString m_hostName;
unsigned short m_port;
/**
Map of TXT properties
*/
- QMap<QString,QString> m_textData;
+ TQMap<TQString,TQString> m_textData;
/**
Encode service name, type and domain into string that can be used as DNS-SD PTR label
*/
- QString encode();
+ TQString encode();
/**
Decode PTR label returned by DNS resolver into service name, type and domain. It also
handles special cases - metaservices and domains.
*/
- void decode(const QString& name);
+ void decode(const TQString& name);
- friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const ServiceBase & a);
- friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, ServiceBase & a);
+ friend KDNSSD_EXPORT TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a);
+ friend KDNSSD_EXPORT TQDataStream & operator>> (TQDataStream & s, ServiceBase & a);
virtual void virtual_hook(int, void*);
private:
diff --git a/dnssd/servicebrowser.cpp b/dnssd/servicebrowser.cpp
index 20e1b11e0..3c64ffe66 100644
--- a/dnssd/servicebrowser.cpp
+++ b/dnssd/servicebrowser.cpp
@@ -20,8 +20,8 @@
#include <signal.h>
#include <errno.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include "domainbrowser.h"
#include "responder.h"
#include "query.h"
@@ -34,50 +34,50 @@
namespace DNSSD
{
-const QString ServiceBrowser::AllServices = "_services._dns-sd._udp";
+const TQString ServiceBrowser::AllServices = "_services._dns-sd._udp";
class ServiceBrowserPrivate
{
public:
ServiceBrowserPrivate() : m_running(false)
{}
- QValueList<RemoteService::Ptr> m_services;
- QValueList<RemoteService::Ptr> m_duringResolve;
- QStringList m_types;
+ TQValueList<RemoteService::Ptr> m_services;
+ TQValueList<RemoteService::Ptr> m_duringResolve;
+ TQStringList m_types;
DomainBrowser* m_domains;
int m_flags;
bool m_running;
bool m_finished;
- QDict<Query> resolvers;
+ TQDict<Query> resolvers;
};
-ServiceBrowser::ServiceBrowser(const QString& type,DomainBrowser* domains,bool autoResolve)
+ServiceBrowser::ServiceBrowser(const TQString& type,DomainBrowser* domains,bool autoResolve)
{
if (domains) init(type,domains,autoResolve ? AutoResolve : 0);
else init(type,new DomainBrowser(this),autoResolve ? AutoResolve|AutoDelete : AutoDelete);
}
-ServiceBrowser::ServiceBrowser(const QStringList& types,DomainBrowser* domains,int flags)
+ServiceBrowser::ServiceBrowser(const TQStringList& types,DomainBrowser* domains,int flags)
{
if (domains) init(types,domains,flags);
else init(types,new DomainBrowser(this),flags|AutoDelete);
}
-void ServiceBrowser::init(const QStringList& type,DomainBrowser* domains,int flags)
+void ServiceBrowser::init(const TQStringList& type,DomainBrowser* domains,int flags)
{
d = new ServiceBrowserPrivate();
d->resolvers.setAutoDelete(true);
d->m_types=type;
d->m_flags=flags;
d->m_domains = domains;
- connect(d->m_domains,SIGNAL(domainAdded(const QString& )),this,SLOT(addDomain(const QString& )));
- connect(d->m_domains,SIGNAL(domainRemoved(const QString& )),this,
- SLOT(removeDomain(const QString& )));
+ connect(d->m_domains,TQT_SIGNAL(domainAdded(const TQString& )),this,TQT_SLOT(addDomain(const TQString& )));
+ connect(d->m_domains,TQT_SIGNAL(domainRemoved(const TQString& )),this,
+ TQT_SLOT(removeDomain(const TQString& )));
}
-ServiceBrowser::ServiceBrowser(const QString& type,const QString& domain,bool autoResolve)
+ServiceBrowser::ServiceBrowser(const TQString& type,const TQString& domain,bool autoResolve)
{
init(type,new DomainBrowser(domain,false,this),autoResolve ? AutoResolve|AutoDelete : AutoDelete);
}
-ServiceBrowser::ServiceBrowser(const QString& type,const QString& domain,int flags)
+ServiceBrowser::ServiceBrowser(const TQString& type,const TQString& domain,int flags)
{
init(type,new DomainBrowser(domain,false,this),flags | AutoDelete);
}
@@ -108,11 +108,11 @@ const DomainBrowser* ServiceBrowser::browsedDomains() const
void ServiceBrowser::serviceResolved(bool success)
{
- QObject* sender_obj = const_cast<QObject*>(sender());
+ TQObject* sender_obj = const_cast<TQObject*>(sender());
RemoteService* svr = static_cast<RemoteService*>(sender_obj);
- disconnect(svr,SIGNAL(resolved(bool)),this,SLOT(serviceResolved(bool)));
- QValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin();
- QValueList<RemoteService::Ptr>::Iterator itEnd = d->m_duringResolve.end();
+ disconnect(svr,TQT_SIGNAL(resolved(bool)),this,TQT_SLOT(serviceResolved(bool)));
+ TQValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin();
+ TQValueList<RemoteService::Ptr>::Iterator itEnd = d->m_duringResolve.end();
while ( it!= itEnd && svr!= (*it)) ++it;
if (it != itEnd) {
if (success) {
@@ -130,8 +130,8 @@ void ServiceBrowser::startBrowse()
d->m_running=true;
if (isAvailable()!=Working) return;
if (d->m_domains->isRunning()) {
- QStringList::const_iterator itEnd = d->m_domains->domains().end();
- for ( QStringList::const_iterator it = d->m_domains->domains().begin(); it != itEnd; ++it )
+ TQStringList::const_iterator itEnd = d->m_domains->domains().end();
+ for ( TQStringList::const_iterator it = d->m_domains->domains().begin(); it != itEnd; ++it )
addDomain(*it);
} else d->m_domains->startBrowse();
}
@@ -140,7 +140,7 @@ void ServiceBrowser::gotNewService(RemoteService::Ptr svr)
{
if (findDuplicate(svr)==(d->m_services.end())) {
if (d->m_flags & AutoResolve) {
- connect(svr,SIGNAL(resolved(bool )),this,SLOT(serviceResolved(bool )));
+ connect(svr,TQT_SIGNAL(resolved(bool )),this,TQT_SLOT(serviceResolved(bool )));
d->m_duringResolve+=svr;
svr->resolveAsync();
} else {
@@ -152,7 +152,7 @@ void ServiceBrowser::gotNewService(RemoteService::Ptr svr)
void ServiceBrowser::gotRemoveService(RemoteService::Ptr svr)
{
- QValueList<RemoteService::Ptr>::Iterator it = findDuplicate(svr);
+ TQValueList<RemoteService::Ptr>::Iterator it = findDuplicate(svr);
if (it!=(d->m_services.end())) {
emit serviceRemoved(*it);
d->m_services.remove(it);
@@ -160,10 +160,10 @@ void ServiceBrowser::gotRemoveService(RemoteService::Ptr svr)
}
-void ServiceBrowser::removeDomain(const QString& domain)
+void ServiceBrowser::removeDomain(const TQString& domain)
{
while (d->resolvers[domain]) d->resolvers.remove(domain);
- QValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin();
+ TQValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin();
while (it!=d->m_services.end())
// use section to skip possible trailing dot
if ((*it)->domain().section('.',0) == domain.section('.',0)) {
@@ -172,18 +172,18 @@ void ServiceBrowser::removeDomain(const QString& domain)
} else ++it;
}
-void ServiceBrowser::addDomain(const QString& domain)
+void ServiceBrowser::addDomain(const TQString& domain)
{
if (!d->m_running) return;
if (!(d->resolvers[domain])) {
- QStringList::ConstIterator itEnd = d->m_types.end();
- for (QStringList::ConstIterator it=d->m_types.begin(); it!=itEnd; ++it) {
+ TQStringList::ConstIterator itEnd = d->m_types.end();
+ for (TQStringList::ConstIterator it=d->m_types.begin(); it!=itEnd; ++it) {
Query* b = new Query((*it),domain);
- connect(b,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
- SLOT(gotNewService(DNSSD::RemoteService::Ptr)));
- connect(b,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr )),this,
- SLOT(gotRemoveService(DNSSD::RemoteService::Ptr)));
- connect(b,SIGNAL(finished()),this,SLOT(queryFinished()));
+ connect(b,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
+ TQT_SLOT(gotNewService(DNSSD::RemoteService::Ptr)));
+ connect(b,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr )),this,
+ TQT_SLOT(gotRemoveService(DNSSD::RemoteService::Ptr)));
+ connect(b,TQT_SIGNAL(finished()),this,TQT_SLOT(queryFinished()));
b->startQuery();
d->resolvers.insert(domain,b);
}
@@ -199,12 +199,12 @@ bool ServiceBrowser::allFinished()
{
if (d->m_duringResolve.count()) return false;
bool all = true;
- QDictIterator<Query> it(d->resolvers);
+ TQDictIterator<Query> it(d->resolvers);
for ( ; it.current(); ++it) all&=(*it)->isFinished();
return all;
}
-const QValueList<RemoteService::Ptr>& ServiceBrowser::services() const
+const TQValueList<RemoteService::Ptr>& ServiceBrowser::services() const
{
return d->m_services;
}
@@ -212,10 +212,10 @@ const QValueList<RemoteService::Ptr>& ServiceBrowser::services() const
void ServiceBrowser::virtual_hook(int, void*)
{}
-QValueList<RemoteService::Ptr>::Iterator ServiceBrowser::findDuplicate(RemoteService::Ptr src)
+TQValueList<RemoteService::Ptr>::Iterator ServiceBrowser::findDuplicate(RemoteService::Ptr src)
{
- QValueList<RemoteService::Ptr>::Iterator itEnd = d->m_services.end();
- for (QValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin(); it!=itEnd; ++it)
+ TQValueList<RemoteService::Ptr>::Iterator itEnd = d->m_services.end();
+ for (TQValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin(); it!=itEnd; ++it)
if ((src->type()==(*it)->type()) && (src->serviceName()==(*it)->serviceName()) &&
(src->domain() == (*it)->domain())) return it;
return itEnd;
diff --git a/dnssd/servicebrowser.h b/dnssd/servicebrowser.h
index 5a12f4e6b..808127d0b 100644
--- a/dnssd/servicebrowser.h
+++ b/dnssd/servicebrowser.h
@@ -21,8 +21,8 @@
#ifndef DNSSDSERVICEBROWSER_H
#define DNSSDSERVICEBROWSER_H
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include <dnssd/remoteservice.h>
@@ -38,8 +38,8 @@ Suppose that you need list of web servers running. Example:
\code
DNSSD::ServiceBrowser* browser = new DNSSD::ServiceBrowser("_http._tcp");
-connect(browser,SIGNAL(serviceAdded(RemoteService::Ptr)),this,SLOT(addService(RemoteService::Ptr)));
-connect(browser,SIGNAL(serviceRemoved(RemoteService::Ptr)),this,SLOT(delService(RemoteService::Ptr)));
+connect(browser,TQT_SIGNAL(serviceAdded(RemoteService::Ptr)),this,TQT_SLOT(addService(RemoteService::Ptr)));
+connect(browser,TQT_SIGNAL(serviceRemoved(RemoteService::Ptr)),this,TQT_SLOT(delService(RemoteService::Ptr)));
browser->startBrowse();
\endcode
@@ -88,7 +88,7 @@ public:
@since 3.5
@todo KDE4: set default values for domains and flags
*/
- ServiceBrowser(const QStringList& types,DomainBrowser* domains,int flags);
+ ServiceBrowser(const TQStringList& types,DomainBrowser* domains,int flags);
/**
The same as above, but allows only one service type
@@ -97,7 +97,7 @@ public:
@param autoResolve auto resolve, if set
@deprecated use previous constructor instead
*/
- ServiceBrowser(const QString& type,DomainBrowser* domains=0,bool autoResolve=false);
+ ServiceBrowser(const TQString& type,DomainBrowser* domains=0,bool autoResolve=false);
/**
Overloaded constructor used to create browser for one domain
@@ -108,19 +108,19 @@ public:
@param flags One or more values from #Flags. AutoDelete flag has no effect
@since 3.5
*/
- ServiceBrowser(const QString& type,const QString& domain, int flags);
+ ServiceBrowser(const TQString& type,const TQString& domain, int flags);
/**
@deprecated user previous constructor instead
*/
- ServiceBrowser(const QString& type,const QString& domain, bool autoResolve=false);
+ ServiceBrowser(const TQString& type,const TQString& domain, bool autoResolve=false);
~ServiceBrowser();
/**
Returns list of services
*/
- const QValueList<RemoteService::Ptr>& services() const;
+ const TQValueList<RemoteService::Ptr>& services() const;
/**
Starts browsing for services.
@@ -139,7 +139,7 @@ public:
Special service type to search for all available service types. Pass it as "type"
parameter to ServiceBrowser constructor.
*/
- static const QString AllServices;
+ static const TQString AllServices;
/**
Checks availability of DNS-SD services (this also covers publishing).
@@ -199,12 +199,12 @@ public slots:
/**
Remove one domain from list of domains to browse
*/
- void removeDomain(const QString& domain);
+ void removeDomain(const TQString& domain);
/**
Add new domain to browse
*/
- void addDomain(const QString& domain);
+ void addDomain(const TQString& domain);
protected:
virtual void virtual_hook(int, void*);
@@ -212,8 +212,8 @@ private:
ServiceBrowserPrivate *d;
bool allFinished();
- void init(const QStringList&, DomainBrowser*, int);
- QValueList<RemoteService::Ptr>::Iterator findDuplicate(RemoteService::Ptr src);
+ void init(const TQStringList&, DomainBrowser*, int);
+ TQValueList<RemoteService::Ptr>::Iterator findDuplicate(RemoteService::Ptr src);
private slots:
void serviceResolved(bool success);
void gotNewService(DNSSD::RemoteService::Ptr);
diff --git a/interfaces/khexedit/byteseditinterface.h b/interfaces/khexedit/byteseditinterface.h
index dbc4c96bd..dc0a9dca5 100644
--- a/interfaces/khexedit/byteseditinterface.h
+++ b/interfaces/khexedit/byteseditinterface.h
@@ -21,7 +21,7 @@
// kde specific
#include <kparts/componentfactory.h>
-#include <qwidget.h>
+#include <tqwidget.h>
/**
* @short KHE (short for KHexEdit) is KDE's namespace for all things related
@@ -64,7 +64,7 @@ namespace KHE
* \code
* BytesEdit->setMaxDataSize( MaxDataSize );
* ...
- * QByteArray BA;
+ * TQByteArray BA;
* BA.setRawData( BytesEdit->data(), BytesEdit->dataSize() );
* \endcode
* </ul>
@@ -173,7 +173,7 @@ inline BytesEditInterface *bytesEditInterface( T *t )
* #include <khexedit/clipboardinterface.h>
* ...
*
- * QWidget *BytesEditWidget = KHE::createBytesEditWidget( this, "BytesEditWidget" );
+ * TQWidget *BytesEditWidget = KHE::createBytesEditWidget( this, "BytesEditWidget" );
* // is e.g. kdeutils (incl. khexedit2) installed, so a widget could be found and created?
* if( BytesEditWidget )
* {
@@ -205,8 +205,8 @@ inline BytesEditInterface *bytesEditInterface( T *t )
*   KHE::ClipboardInterface *Clipboard = KHE::clipboardInterface( BytesEditWidget );
*   if( Clipboard )
*   {
- *     // Yes, use BytesEditWidget, not Clipboard, because that's the QObject, indeed hacky...
- *     connect( BytesEditWidget, SIGNAL(copyAvailable(bool)), this, SLOT(offerCopy(bool)) );
+ *     // Yes, use BytesEditWidget, not Clipboard, because that's the TQObject, indeed hacky...
+ *     connect( BytesEditWidget, TQT_SIGNAL(copyAvailable(bool)), this, TQT_SLOT(offerCopy(bool)) );
*   }
* }
* \endcode
@@ -218,10 +218,10 @@ inline BytesEditInterface *bytesEditInterface( T *t )
* @see BytesEditInterface, ValueColumnInterface, CharColumnInterface, ZoomInterface, ClipboardInterface
* @since 3.2
*/
-inline QWidget *createBytesEditWidget( QWidget *Parent = 0, const char *Name = 0 )
+inline TQWidget *createBytesEditWidget( TQWidget *Parent = 0, const char *Name = 0 )
{
- return KParts::ComponentFactory::createInstanceFromQuery<QWidget>
- ( QString::fromLatin1("KHexEdit/KBytesEdit"), QString::null, Parent, Name );
+ return KParts::ComponentFactory::createInstanceFromQuery<TQWidget>
+ ( TQString::fromLatin1("KHexEdit/KBytesEdit"), TQString::null, Parent, Name );
}
}
diff --git a/interfaces/khexedit/charcolumninterface.h b/interfaces/khexedit/charcolumninterface.h
index aef282fdc..4221de0c4 100644
--- a/interfaces/khexedit/charcolumninterface.h
+++ b/interfaces/khexedit/charcolumninterface.h
@@ -18,7 +18,7 @@
#ifndef CHARCOLUMNINTERFACE_H
#define CHARCOLUMNINTERFACE_H
-#include <qstring.h>
+#include <tqstring.h>
namespace KHE
{
@@ -59,7 +59,7 @@ class CharColumnInterface
* @param SC new character
* @see substituteChar()
*/
- virtual void setSubstituteChar( QChar SC ) = 0;
+ virtual void setSubstituteChar( TQChar SC ) = 0;
/** sets the encoding of the text column.
* If the encoding is not available the format will not be changed.
* Default is @c LocalEncoding.
@@ -78,7 +78,7 @@ class CharColumnInterface
/** @return the currently used substitute character for "unprintable" chars.
* @see setSubstituteChar()
*/
- virtual QChar substituteChar() const = 0;
+ virtual TQChar substituteChar() const = 0;
/** @return the currently used encoding
* @see setEncoding()
*/
diff --git a/interfaces/khexedit/clipboardinterface.h b/interfaces/khexedit/clipboardinterface.h
index 9edab8521..eeaf9d391 100644
--- a/interfaces/khexedit/clipboardinterface.h
+++ b/interfaces/khexedit/clipboardinterface.h
@@ -26,7 +26,7 @@ namespace KHE
*
* This interface enables the interaction with the clipboard. It relies on the
* possibilities of signal/slot so a class B that implements this interface
- * should be derived from QObject. When connecting to a signal or a slot
+ * should be derived from TQObject. When connecting to a signal or a slot
* the class B has to be used, not the interface.
* <p>
* Example:
@@ -34,8 +34,8 @@ namespace KHE
* KHE::ClipboardInterface *Clipboard = KHE::clipboardInterface( BytesEditWidget );
* if( Clipboard )
* {
- *   // Yes, use BytesEditWidget, not Clipboard, because that's the QObject, indeed hacky...
- *   connect( BytesEditWidget, SIGNAL(copyAvailable(bool)), this, SLOT(offerCopy(bool)) );
+ *   // Yes, use BytesEditWidget, not Clipboard, because that's the TQObject, indeed hacky...
+ *   connect( BytesEditWidget, TQT_SIGNAL(copyAvailable(bool)), this, TQT_SLOT(offerCopy(bool)) );
* }
* \endcode
*
diff --git a/interfaces/kimproxy/interface/kimiface.h b/interfaces/kimproxy/interface/kimiface.h
index 4cc1d88b5..f3212df6d 100644
--- a/interfaces/kimproxy/interface/kimiface.h
+++ b/interfaces/kimproxy/interface/kimiface.h
@@ -22,9 +22,9 @@
#ifndef KIMIFACE_H
#define KIMIFACE_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
/**
@@ -57,16 +57,16 @@
* @endcode
* and the class implementing KIMIface must pass "KIMIface" to the DCOPObject constructor:
* @code
- * // just need QObject inheritance and Q_OBJECT if you want signals and slots
+ * // just need TQObject inheritance and Q_OBJECT if you want signals and slots
* // no need to use K_DCOP macro again
*
- * class MyIMIface : public QObject, public KIMIface
+ * class MyIMIface : public TQObject, public KIMIface
* {
* Q_OBJECT
* public:
- * MyIMIface(QObject* parent = 0, const char* name) :
+ * MyIMIface(TQObject* parent = 0, const char* name) :
* DCOPObject("KIMIface"), // <-- passing the interface name as required
- * QObject(parent, name) {}
+ * TQObject(parent, name) {}
* };
* @endcode
*
@@ -102,7 +102,7 @@ k_dcop:
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- virtual QStringList allContacts() = 0;
+ virtual TQStringList allContacts() = 0;
/**
* @brief Obtain a list of IM-contacts that are currently reachable
@@ -122,7 +122,7 @@ k_dcop:
* @see messageContact()
* @see KABC::Addressee::uid()
*/
- virtual QStringList reachableContacts() = 0;
+ virtual TQStringList reachableContacts() = 0;
/**
* @brief Obtain a list of IM-contacts that are currently online
@@ -140,7 +140,7 @@ k_dcop:
* @see chatWithContact()
* @see KABC::Addressee::uid()
*/
- virtual QStringList onlineContacts() = 0;
+ virtual TQStringList onlineContacts() = 0;
/**
* @brief Obtain a list of IM-contacts who may receive file transfers
@@ -165,7 +165,7 @@ k_dcop:
* @see sendFile()
* @see KABC::Addressee::uid()
*/
- virtual QStringList fileTransferContacts() = 0;
+ virtual TQStringList fileTransferContacts() = 0;
// individual
/**
@@ -182,7 +182,7 @@ k_dcop:
* @see presenceStatus()
* @see KABC::Addressee::uid()
*/
- virtual bool isPresent( const QString & uid ) = 0;
+ virtual bool isPresent( const TQString & uid ) = 0;
/**
* @brief Obtain the IM app's idea of the contact's display name
@@ -192,7 +192,7 @@ k_dcop:
* a nick name, a user configured name string, etc.
*
* @param uid the KABC UID you are interested in
- * @return the corresponding display name or QString:null if the
+ * @return the corresponding display name or TQString:null if the
* UID is unknown
*
* @see isPresent()
@@ -200,7 +200,7 @@ k_dcop:
* @see presenceStatus()
* @see KABC::Addressee::uid()
*/
- virtual QString displayName( const QString & uid ) = 0;
+ virtual TQString displayName( const TQString & uid ) = 0;
/**
* @brief Obtain the IM presence as a i18ned string for the specified
@@ -211,13 +211,13 @@ k_dcop:
*
* @param uid the KABC UID you want the presence for
* @return the i18ned string describing the contact's presence or
- * QString::null if the UID is unknown
+ * TQString::null if the UID is unknown
*
* @see isPresent()
* @see presenceStatus()
* @see KABC::Addressee::uid()
*/
- virtual QString presenceString( const QString & uid ) = 0;
+ virtual TQString presenceString( const TQString & uid ) = 0;
/**
* @brief Obtain the IM presence as a number for the specified contact
@@ -247,7 +247,7 @@ k_dcop:
* @see presenceString()
* @see KABC::Addressee::uid()
*/
- virtual int presenceStatus( const QString & uid ) = 0;
+ virtual int presenceStatus( const TQString & uid ) = 0;
/**
* @brief Indicate if a given contact can receive files
@@ -258,7 +258,7 @@ k_dcop:
* @see fileTransferContacts()
* @see KABC::Addressee::uid()
*/
- virtual bool canReceiveFiles( const QString & uid ) = 0;
+ virtual bool canReceiveFiles( const TQString & uid ) = 0;
/**
* @brief Indicate if a given contact will be able to respond
@@ -276,7 +276,7 @@ k_dcop:
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- virtual bool canRespond( const QString & uid ) = 0;
+ virtual bool canRespond( const TQString & uid ) = 0;
/**
* @brief Obtain the KABC UID corresponding to the given IM address
@@ -284,7 +284,7 @@ k_dcop:
* @param contactId the protocol specific identifier for the contact,
* e.g. UIN for ICQ, screenname for AIM, nick for IRC
* @param protocol the IM protocol/service to check. See protocols()
- * @return the KABC UID for the given contact or @c QString::null if not
+ * @return the KABC UID for the given contact or @c TQString::null if not
* found or either input stream was empty or the protocol is not
* supported
*
@@ -293,7 +293,7 @@ k_dcop:
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- virtual QString locate( const QString & contactId, const QString & protocol ) = 0;
+ virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0;
// metadata
/**
@@ -305,29 +305,29 @@ k_dcop:
*
* @param uid the KABC UID you want the presence icon for
* @return a pixmap representing the contact's presence or a null pixmap
- * if the contact is unknown. See QPixmap::isNull()
+ * if the contact is unknown. See TQPixmap::isNull()
*
* @see isPresent()
* @see presenceString()
* @see presenceStatus()
* @see KABC::Addressee::uid()
*/
- virtual QPixmap icon( const QString & uid ) = 0;
+ virtual TQPixmap icon( const TQString & uid ) = 0;
/**
* @brief Obtain the given contact's current context (home, work, or any)
*
* Not all IM services/protocols support the concept of contexts. If the
- * given UID maps to such a service, just return @c QString::null
+ * given UID maps to such a service, just return @c TQString::null
*
* @param uid the KABC UID you want the context for
- * @return a string describing the context, or @c QString::null if not
+ * @return a string describing the context, or @c TQString::null if not
* supported or if the contact is unknown
*
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- virtual QString context( const QString & uid ) = 0;
+ virtual TQString context( const TQString & uid ) = 0;
// App capabilities
/**
@@ -349,7 +349,7 @@ k_dcop:
* @see addContact()
* @see messageNewContact
*/
- virtual QStringList protocols() = 0;
+ virtual TQStringList protocols() = 0;
// ACTORS
/**
@@ -374,7 +374,7 @@ k_dcop:
* @see reachableContacts()
* @see KABC::Addressee::uid()
*/
- virtual void messageContact( const QString &uid, const QString& message ) = 0;
+ virtual void messageContact( const TQString &uid, const TQString& message ) = 0;
/**
* @brief Send a single message to a contact given only its protocol
@@ -394,7 +394,7 @@ k_dcop:
* @see protocols()
* @see addContact()
*/
- virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0;
/**
* @brief Start a chat session with the specified contact
@@ -412,7 +412,7 @@ k_dcop:
* @see reachableContacts()
* @see KABC::Addressee::uid()
*/
- virtual void chatWithContact( const QString &uid ) = 0;
+ virtual void chatWithContact( const TQString &uid ) = 0;
/**
* @brief Send a file to the contact
@@ -438,8 +438,8 @@ k_dcop:
* @see fileTransferContacts()
* @see KABC::Addressee::uid()
*/
- virtual void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString::null, uint fileSize = 0) = 0;
+ virtual void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString::null, uint fileSize = 0) = 0;
// MUTATORS
// Contact list
@@ -460,7 +460,7 @@ k_dcop:
* @see protocols()
* @see messageNewContact()
*/
- virtual bool addContact( const QString &contactId, const QString &protocol ) = 0;
+ virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0;
// SIGNALS
k_dcop_signals:
@@ -482,7 +482,7 @@ k_dcop_signals:
* @see KABC::Addressee::uid()
* @see DCOPClient::appId()
*/
- void contactPresenceChanged( QString uid, QCString appId, int presence );
+ void contactPresenceChanged( TQString uid, TQCString appId, int presence );
};
#endif
diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp
index 746c6da90..d3cf1ef24 100644
--- a/interfaces/kimproxy/library/kimproxy.cpp
+++ b/interfaces/kimproxy/library/kimproxy.cpp
@@ -21,8 +21,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qglobal.h>
-#include <qpixmapcache.h>
+#include <tqglobal.h>
+#include <tqpixmapcache.h>
#include <dcopclient.h>
#include <kapplication.h>
#include <kdcopservicestarter.h>
@@ -43,11 +43,11 @@ KIMProxy * KIMProxy::s_instance = 0L;
struct AppPresenceCurrent
{
- QCString appId;
+ TQCString appId;
int presence;
};
-class ContactPresenceListCurrent : public QValueList<AppPresenceCurrent>
+class ContactPresenceListCurrent : public TQValueList<AppPresenceCurrent>
{
public:
// return value indicates if the supplied parameter was better than any existing presence
@@ -60,9 +60,9 @@ struct KIMProxy::Private
{
DCOPClient * dc;
// list of the strings in use by KIMIface
- QStringList presence_strings;
+ TQStringList presence_strings;
// list of the icon names in use by KIMIface
- QStringList presence_icons;
+ TQStringList presence_icons;
// map of presences
PresenceStringMap presence_map;
};
@@ -140,11 +140,11 @@ AppPresenceCurrent ContactPresenceListCurrent::best()
// return best;
// }
//
-// QCString bestAppId( AppPresence* ap )
+// TQCString bestAppId( AppPresence* ap )
// {
// Q_ASSERT( ap );
// AppPresence::const_iterator it;
-// QCString bestAppId;
+// TQCString bestAppId;
// it = ap->begin();
// if ( it != ap->end() )
// {
@@ -175,14 +175,14 @@ KIMProxy * KIMProxy::instance( DCOPClient * client )
return 0L;
}
-KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), QObject(), d( new Private )
+KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject(), d( new Private )
{
m_im_client_stubs.setAutoDelete( true );
d->dc = dc;
m_initialized = false;
- connect( d->dc, SIGNAL( applicationRemoved( const QCString& ) ) , this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
- connect( d->dc, SIGNAL( applicationRegistered( const QCString& ) ) , this, SLOT( registeredToDCOP( const QCString& ) ) );
+ connect( d->dc, TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
+ connect( d->dc, TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) );
d->dc->setNotifications( true );
d->presence_strings.append( "Unknown" );
@@ -197,14 +197,14 @@ KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), QObject(),
d->presence_icons.append( "presence_away" );
d->presence_icons.append( "presence_online" );
- //QCString senderApp = "Kopete";
- //QCString senderObjectId = "KIMIface";
- QCString method = "contactPresenceChanged( QString, QCString, int )";
- //QCString receiverObjectId = "KIMProxyIface";
+ //TQCString senderApp = "Kopete";
+ //TQCString senderObjectId = "KIMIface";
+ TQCString method = "contactPresenceChanged( TQString, TQCString, int )";
+ //TQCString receiverObjectId = "KIMProxyIface";
// FIXME: make this work when the sender object id is set to KIMIFace
if ( !connectDCOPSignal( 0, 0, method, method, false ) )
- KMessageBox::information( 0, QString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) );
+ KMessageBox::information( 0, TQString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) );
}
KIMProxy::~KIMProxy( )
@@ -221,12 +221,12 @@ bool KIMProxy::initialize()
if ( KServiceType::serviceType( IM_SERVICE_TYPE ) )
{
//kdDebug( 790 ) << k_funcinfo << endl;
- QCString dcopObjectId = "KIMIface";
+ TQCString dcopObjectId = "KIMIface";
// see what apps implementing our service type are out there
KService::List offers = KServiceType::offers( IM_SERVICE_TYPE );
KService::List::iterator offer;
- typedef QValueList<QCString> QCStringList;
+ typedef TQValueList<TQCString> QCStringList;
QCStringList registeredApps = d->dc->registeredApplications();
QCStringList::iterator app;
const QCStringList::iterator end = registeredApps.end();
@@ -237,12 +237,12 @@ bool KIMProxy::initialize()
//for each offer
for ( offer = offers.begin(); offer != offers.end(); ++offer )
{
- QCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1();
+ TQCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1();
if ( !dcopService.isEmpty() )
{
//kdDebug( 790 ) << " is it: " << dcopService << "?" << endl;
// get the application name ( minus any process ID )
- QCString instanceName = (*app).left( dcopService.length() );
+ TQCString instanceName = (*app).left( dcopService.length() );
// if the application implements the dcop service, add it
if ( instanceName == dcopService )
{
@@ -263,7 +263,7 @@ bool KIMProxy::initialize()
return !m_im_client_stubs.isEmpty();
}
-void KIMProxy::registeredToDCOP( const QCString& appId )
+void KIMProxy::registeredToDCOP( const TQCString& appId )
{
//kdDebug( 790 ) << k_funcinfo << " appId '" << appId << "'" << endl;
// check that appId implements our service
@@ -279,8 +279,8 @@ void KIMProxy::registeredToDCOP( const QCString& appId )
KService::List::const_iterator it;
for ( it = offers.begin(); it != offers.end(); ++it )
{
- QCString dcopObjectId = "KIMIface";
- QCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1();
+ TQCString dcopObjectId = "KIMIface";
+ TQCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1();
if ( appId.left( dcopService.length() ) == dcopService )
{
// if it's not already known, insert it
@@ -298,7 +298,7 @@ void KIMProxy::registeredToDCOP( const QCString& appId )
// emit sigPresenceInfoExpired();
}
-void KIMProxy::unregisteredFromDCOP( const QCString& appId )
+void KIMProxy::unregisteredFromDCOP( const TQCString& appId )
{
//kdDebug( 790 ) << k_funcinfo << appId << endl;
if ( m_im_client_stubs.find( appId ) )
@@ -325,7 +325,7 @@ void KIMProxy::unregisteredFromDCOP( const QCString& appId )
}
}
-void KIMProxy::contactPresenceChanged( QString uid, QCString appId, int presence )
+void KIMProxy::contactPresenceChanged( TQString uid, TQCString appId, int presence )
{
// update the presence map
//kdDebug( 790 ) << k_funcinfo << "uid: " << uid << " appId: " << appId << " presence " << presence << endl;
@@ -343,7 +343,7 @@ void KIMProxy::contactPresenceChanged( QString uid, QCString appId, int presence
}
}
-int KIMProxy::presenceNumeric( const QString& uid )
+int KIMProxy::presenceNumeric( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
@@ -355,7 +355,7 @@ int KIMProxy::presenceNumeric( const QString& uid )
return ap.presence;
}
-QString KIMProxy::presenceString( const QString& uid )
+TQString KIMProxy::presenceString( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
@@ -365,12 +365,12 @@ QString KIMProxy::presenceString( const QString& uid )
ap = presence.best();
}
if ( ap.appId.isEmpty() )
- return QString::null;
+ return TQString::null;
else
return d->presence_strings[ ap.presence ];
}
-QPixmap KIMProxy::presenceIcon( const QString& uid )
+TQPixmap KIMProxy::presenceIcon( const TQString& uid )
{
AppPresenceCurrent ap;
ap.presence = 0;
@@ -381,8 +381,8 @@ QPixmap KIMProxy::presenceIcon( const QString& uid )
}
if ( ap.appId.isEmpty() )
{
- //kdDebug( 790 ) << k_funcinfo << "returning a null QPixmap because we were asked for an icon for a uid we know nothing about" << endl;
- return QPixmap();
+ //kdDebug( 790 ) << k_funcinfo << "returning a null TQPixmap because we were asked for an icon for a uid we know nothing about" << endl;
+ return TQPixmap();
}
else
{
@@ -391,19 +391,19 @@ QPixmap KIMProxy::presenceIcon( const QString& uid )
}
}
-QStringList KIMProxy::allContacts()
+TQStringList KIMProxy::allContacts()
{
- QStringList value = d->presence_map.keys();
+ TQStringList value = d->presence_map.keys();
return value;
}
-QStringList KIMProxy::reachableContacts()
+TQStringList KIMProxy::reachableContacts()
{
- QStringList value;
+ TQStringList value;
if ( initialize() )
{
- QDictIterator<KIMIface_stub> it( m_im_client_stubs );
+ TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
value += it.current()->reachableContacts( );
@@ -412,9 +412,9 @@ QStringList KIMProxy::reachableContacts()
return value;
}
-QStringList KIMProxy::onlineContacts()
+TQStringList KIMProxy::onlineContacts()
{
- QStringList value;
+ TQStringList value;
PresenceStringMap::iterator it = d->presence_map.begin();
const PresenceStringMap::iterator end= d->presence_map.end();
for ( ; it != end; ++it )
@@ -424,13 +424,13 @@ QStringList KIMProxy::onlineContacts()
return value;
}
-QStringList KIMProxy::fileTransferContacts()
+TQStringList KIMProxy::fileTransferContacts()
{
- QStringList value;
+ TQStringList value;
if ( initialize() )
{
- QDictIterator<KIMIface_stub> it( m_im_client_stubs );
+ TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
value += it.current()->fileTransferContacts( );
@@ -439,14 +439,14 @@ QStringList KIMProxy::fileTransferContacts()
return value;
}
-bool KIMProxy::isPresent( const QString& uid )
+bool KIMProxy::isPresent( const TQString& uid )
{
return ( !d->presence_map[ uid ].isEmpty() );
}
-QString KIMProxy::displayName( const QString& uid )
+TQString KIMProxy::displayName( const TQString& uid )
{
- QString name;
+ TQString name;
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
@@ -456,7 +456,7 @@ QString KIMProxy::displayName( const QString& uid )
return name;
}
-bool KIMProxy::canReceiveFiles( const QString & uid )
+bool KIMProxy::canReceiveFiles( const TQString & uid )
{
if ( initialize() )
{
@@ -466,7 +466,7 @@ bool KIMProxy::canReceiveFiles( const QString & uid )
return false;
}
-bool KIMProxy::canRespond( const QString & uid )
+bool KIMProxy::canRespond( const TQString & uid )
{
if ( initialize() )
{
@@ -476,17 +476,17 @@ bool KIMProxy::canRespond( const QString & uid )
return false;
}
-QString KIMProxy::context( const QString & uid )
+TQString KIMProxy::context( const TQString & uid )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForUid( uid ) )
return s->context( uid );
}
- return QString::null;
+ return TQString::null;
}
-void KIMProxy::chatWithContact( const QString& uid )
+void KIMProxy::chatWithContact( const TQString& uid )
{
if ( initialize() )
{
@@ -499,7 +499,7 @@ void KIMProxy::chatWithContact( const QString& uid )
return;
}
-void KIMProxy::messageContact( const QString& uid, const QString& message )
+void KIMProxy::messageContact( const TQString& uid, const TQString& message )
{
if ( initialize() )
{
@@ -512,11 +512,11 @@ void KIMProxy::messageContact( const QString& uid, const QString& message )
return;
}
-void KIMProxy::sendFile(const QString &uid, const KURL &sourceURL, const QString &altFileName, uint fileSize )
+void KIMProxy::sendFile(const TQString &uid, const KURL &sourceURL, const TQString &altFileName, uint fileSize )
{
if ( initialize() )
{
- QDictIterator<KIMIface_stub> it( m_im_client_stubs );
+ TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
if ( it.current()->canReceiveFiles( uid ) )
@@ -530,7 +530,7 @@ void KIMProxy::sendFile(const QString &uid, const KURL &sourceURL, const QString
return;
}
-bool KIMProxy::addContact( const QString &contactId, const QString &protocol )
+bool KIMProxy::addContact( const TQString &contactId, const TQString &protocol )
{
if ( initialize() )
{
@@ -540,14 +540,14 @@ bool KIMProxy::addContact( const QString &contactId, const QString &protocol )
return false;
}
-QString KIMProxy::locate( const QString & contactId, const QString & protocol )
+TQString KIMProxy::locate( const TQString & contactId, const TQString & protocol )
{
if ( initialize() )
{
if ( KIMIface_stub* s = stubForProtocol( protocol ) )
return s->locate( contactId, protocol );
}
- return QString::null;
+ return TQString::null;
}
bool KIMProxy::imAppsAvailable()
@@ -557,15 +557,15 @@ bool KIMProxy::imAppsAvailable()
bool KIMProxy::startPreferredApp()
{
- QString preferences = QString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() );
+ TQString preferences = TQString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() );
// start/find an instance of DCOP/InstantMessenger
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
// Get a preferred IM client.
// The app will notify itself to us using registeredToDCOP, so we don't need to record a stub for it here
// FIXME: error in preferences, see debug output
- preferences = QString::null;
- int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, QString::null, preferences, &error, &dcopService );
+ preferences = TQString::null;
+ int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, TQString::null, preferences, &error, &dcopService );
kdDebug( 790 ) << k_funcinfo << "error was: " << error << ", dcopService: " << dcopService << endl;
@@ -573,7 +573,7 @@ bool KIMProxy::startPreferredApp()
}
-void KIMProxy::pollAll( const QString &uid )
+void KIMProxy::pollAll( const TQString &uid )
{
/* // We only need to call this function if we don't have any data at all
// otherwise, the data will be kept fresh by received presence change
@@ -582,7 +582,7 @@ void KIMProxy::pollAll( const QString &uid )
{
AppPresence *presence = new AppPresence();
// record current presence from known clients
- QDictIterator<KIMIface_stub> it( m_im_client_stubs );
+ TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
presence->insert( it.currentKey().ascii(), it.current()->presenceStatus( uid ) ); // m_im_client_stubs has qstring keys...
@@ -591,13 +591,13 @@ void KIMProxy::pollAll( const QString &uid )
}*/
}
-void KIMProxy::pollApp( const QCString & appId )
+void KIMProxy::pollApp( const TQCString & appId )
{
//kdDebug( 790 ) << k_funcinfo << endl;
KIMIface_stub * appStub = m_im_client_stubs[ appId ];
- QStringList contacts = m_im_client_stubs[ appId ]->allContacts();
- QStringList::iterator it = contacts.begin();
- QStringList::iterator end = contacts.end();
+ TQStringList contacts = m_im_client_stubs[ appId ]->allContacts();
+ TQStringList::iterator it = contacts.begin();
+ TQStringList::iterator end = contacts.end();
for ( ; it != end; ++it )
{
ContactPresenceListCurrent current = d->presence_map[ *it ];
@@ -613,7 +613,7 @@ void KIMProxy::pollApp( const QCString & appId )
}
}
-KIMIface_stub * KIMProxy::stubForUid( const QString &uid )
+KIMIface_stub * KIMProxy::stubForUid( const TQString &uid )
{
// get best appPresence
AppPresenceCurrent ap = d->presence_map[ uid ].best();
@@ -621,18 +621,18 @@ KIMIface_stub * KIMProxy::stubForUid( const QString &uid )
return m_im_client_stubs.find( ap.appId );
}
-KIMIface_stub * KIMProxy::stubForProtocol( const QString &protocol)
+KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol)
{
KIMIface_stub * app;
// see if the preferred client supports this protocol
- QString preferred = preferredApp();
+ TQString preferred = preferredApp();
if ( ( app = m_im_client_stubs.find( preferred ) ) )
{
if ( app->protocols().grep( protocol ).count() > 0 )
return app;
}
// preferred doesn't do this protocol, try the first of the others that says it does
- QDictIterator<KIMIface_stub> it( m_im_client_stubs );
+ TQDictIterator<KIMIface_stub> it( m_im_client_stubs );
for ( ; it.current(); ++it )
{
if ( it.current()->protocols().grep( protocol ).count() > 0 )
@@ -641,11 +641,11 @@ KIMIface_stub * KIMProxy::stubForProtocol( const QString &protocol)
return 0L;
}
-QString KIMProxy::preferredApp()
+TQString KIMProxy::preferredApp()
{
KConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE );
store->setGroup( IM_CLIENT_PREFERENCES_SECTION );
- QString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY );
+ TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY );
//kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl;
return preferredApp;
}
diff --git a/interfaces/kimproxy/library/kimproxy.h b/interfaces/kimproxy/library/kimproxy.h
index 6f56a0f13..d4312b341 100644
--- a/interfaces/kimproxy/library/kimproxy.h
+++ b/interfaces/kimproxy/library/kimproxy.h
@@ -24,10 +24,10 @@
#ifndef KIMPROXY_H
#define KIMPROXY_H
-#include <qdict.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqptrdict.h>
+#include <tqstringlist.h>
#define IM_SERVICE_TYPE "DCOP/InstantMessenger"
@@ -43,10 +43,10 @@ class KURL;
class ContactPresenceListCurrent;
/** FIXME: remove for KDE4, binary compability again. */
-typedef QMap<QCString, int> AppPresence; // appId->presence; contains all applications' ideas of a user's presence
-typedef QDict<AppPresence> PresenceMap; // uid->AppPresence; contains a AppPresences for all users
+typedef TQMap<TQCString, int> AppPresence; // appId->presence; contains all applications' ideas of a user's presence
+typedef TQDict<AppPresence> PresenceMap; // uid->AppPresence; contains a AppPresences for all users
/** FIXME: remove presenceMap and call this presenceMap in KDE4. This hack is for binary compatibility */
-typedef QMap<QString, ContactPresenceListCurrent> PresenceStringMap;
+typedef TQMap<TQString, ContactPresenceListCurrent> PresenceStringMap;
/**
* @brief Provides access to instant messenger programs which implement KDE's
@@ -81,11 +81,11 @@ typedef QMap<QString, ContactPresenceListCurrent> PresenceStringMap;
* // check if there are suitable applications reachable
* if (!proxy->initialize()) return;
*
- * QString message = "Hi!\nHow are you on this wonderful day?";
+ * TQString message = "Hi!\nHow are you on this wonderful day?";
*
* // iterate over the list of reachable contacts
- * QStringList reachableContacts = proxy->reachableContacts();
- * for (QStringList::const_iterator it = reachableContacts.begin();
+ * TQStringList reachableContacts = proxy->reachableContacts();
+ * for (TQStringList::const_iterator it = reachableContacts.begin();
* it != reachableContacts.end(); ++it)
* {
proxy->messageContact(*it, message);
@@ -104,7 +104,7 @@ typedef QMap<QString, ContactPresenceListCurrent> PresenceStringMap;
* @since 3.3
* @author Will Stephenson <lists@stevello.free-online.co.uk>
*/
-class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
+class KIMPROXY_EXPORT KIMProxy : public TQObject, virtual public KIMProxyIface
{
Q_OBJECT
struct Private;
@@ -163,7 +163,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- QStringList allContacts();
+ TQStringList allContacts();
/**
* @brief Obtain a list of IM-contacts that are currently reachable
@@ -179,7 +179,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see messageContact()
* @see KABC::Addressee::uid()
*/
- QStringList reachableContacts();
+ TQStringList reachableContacts();
/**
* @brief Obtain a list of IM-contacts that are currently online
@@ -199,7 +199,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see chatWithContact()
* @see KABC::Addressee::uid()
*/
- QStringList onlineContacts();
+ TQStringList onlineContacts();
/**
* @brief Obtain a list of IM-contacts who may receive file transfers
@@ -221,7 +221,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see canReceiveFiles()
* @see KABC::Addressee::uid()
*/
- QStringList fileTransferContacts();
+ TQStringList fileTransferContacts();
/**
* @brief Confirm if a given contact is known to the proxy
@@ -241,7 +241,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see presenceNumeric()
* @see KABC::Addressee::uid()
*/
- bool isPresent( const QString& uid );
+ bool isPresent( const TQString& uid );
/**
* @brief Obtain the proxy's idea of the contact's display name
@@ -255,7 +255,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* Useful if KABC lookups may be too slow.
*
* @param uid the KABC UID you are interested in
- * @return the corresponding display name or QString:null if the
+ * @return the corresponding display name or TQString:null if the
* UID is unknown
*
* @see isPresent()
@@ -263,7 +263,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see presenceNumeric()
* @see KABC::Addressee::uid()
*/
- QString displayName( const QString& uid );
+ TQString displayName( const TQString& uid );
/**
* @brief Obtain the IM presence as a number for the specified contact
@@ -304,7 +304,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see KIMIface::presenceStatus()
* @see KABC::Addressee::uid()
*/
- int presenceNumeric( const QString& uid );
+ int presenceNumeric( const TQString& uid );
/**
* @brief Obtain the IM presence as a i18ned string for the specified
@@ -333,14 +333,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
*
* @param uid the KABC UID you want the presence for
* @return the i18ned string describing the contact's presence or
- * QString::null if the UID is unknown
+ * TQString::null if the UID is unknown
*
* @see isPresent()
* @see presenceNumeric()
* @see presenceIcon()
* @see KABC::Addressee::uid()
*/
- QString presenceString( const QString& uid );
+ TQString presenceString( const TQString& uid );
/**
* @brief Obtain the icon representing the IM presence for the
@@ -362,14 +362,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
*
* @param uid the KABC UID you want the presence icon for
* @return a pixmap representing the contact's presence or a null
- * pixmap if the contact is unknown. See QPixmap::isNull()
+ * pixmap if the contact is unknown. See TQPixmap::isNull()
*
* @see isPresent()
* @see presenceString()
* @see presenceNumeric()
* @see KABC::Addressee::uid()
*/
- QPixmap presenceIcon( const QString& uid );
+ TQPixmap presenceIcon( const TQString& uid );
/**
* @brief Indicate if a given contact can receive files
@@ -386,7 +386,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see fileTransferContacts()
* @see KABC::Addressee::uid()
*/
- bool canReceiveFiles( const QString & uid );
+ bool canReceiveFiles( const TQString & uid );
/**
* @brief Indicate if a given contact will be able to respond
@@ -411,7 +411,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- bool canRespond( const QString & uid );
+ bool canRespond( const TQString & uid );
/**
* @brief Obtain the KABC UID corresponding to the given IM address
@@ -420,7 +420,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* e.g. UIN for ICQ, screenname for AIM, nick for IRC
* @param protocol the IM protocol/service to check.
* See KIMIface::protocols()
- * @return the KABC UID for the given contact or @c QString::null if
+ * @return the KABC UID for the given contact or @c TQString::null if
* not found or either input stream was empty or the protocol
* is not supported
*
@@ -429,14 +429,14 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- QString locate( const QString & contactId, const QString & protocol );
+ TQString locate( const TQString & contactId, const TQString & protocol );
/**
* @brief Obtain the given contact's current context (home, work, or
* any)
*
* Not all IM services/protocols support the concept of contexts. If the
- * given UID maps to such a service, @c QString::null will be returned
+ * given UID maps to such a service, @c TQString::null will be returned
*
* If the given KABC UID is known to more than one IM-application
* the result of the application which has the best presence for the
@@ -445,13 +445,13 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* value returned by the application providing ICQ is taken.
*
* @param uid the KABC UID you want the context for
- * @return a string describing the context, or @c QString::null if not
+ * @return a string describing the context, or @c TQString::null if not
* supported or if the contact is unknown
*
* @see isPresent()
* @see KABC::Addressee::uid()
*/
- QString context( const QString & uid );
+ TQString context( const TQString & uid );
/**
* @brief Start a chat session with the specified contact
@@ -464,7 +464,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see reachableContacts()
* @see KABC::Addressee::uid()
*/
- void chatWithContact( const QString& uid );
+ void chatWithContact( const TQString& uid );
/**
* @brief Send a single message to the specified contact
@@ -481,7 +481,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see reachableContacts()
* @see KABC::Addressee::uid()
*/
- void messageContact( const QString& uid, const QString& message );
+ void messageContact( const TQString& uid, const TQString& message );
/**
* @brief Send a file to the contact
@@ -500,8 +500,8 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see fileTransferContacts()
* @see KABC::Addressee::uid()
*/
- void sendFile(const QString &uid, const KURL &sourceURL,
- const QString &altFileName = QString::null, uint fileSize = 0);
+ void sendFile(const TQString &uid, const KURL &sourceURL,
+ const TQString &altFileName = TQString::null, uint fileSize = 0);
/**
* @brief Add a new contact given its protocol specific identifier
@@ -516,7 +516,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see locate()
* @see KIMIface::protocols()
*/
- bool addContact( const QString &contactId, const QString &protocol );
+ bool addContact( const TQString &contactId, const TQString &protocol );
/**
* @brief Checks if there are any compatible instant messaging
@@ -542,7 +542,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
/**
* Just exists to let the IDL compiler make the DCOP signal for this
*/
- void contactPresenceChanged( QString uid, QCString appId, int presence );
+ void contactPresenceChanged( TQString uid, TQCString appId, int presence );
public slots:
/**
@@ -557,7 +557,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
*
* @see DCOPClient::applicationRegistered()
*/
- void registeredToDCOP( const QCString& appId );
+ void registeredToDCOP( const TQCString& appId );
/**
* @brief Updates the proxy's data after an application unregistered
@@ -576,7 +576,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
*
* @see DCOPClient::applicationRemoved()
*/
- void unregisteredFromDCOP( const QCString& appId );
+ void unregisteredFromDCOP( const TQCString& appId );
signals:
/**
* @brief Indicates that the specified IM-contact's presence changed
@@ -588,7 +588,7 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
* @see presenceIcon()
* @see KABC::Addressee::uid()
*/
- void sigContactPresenceChanged( const QString &uid );
+ void sigContactPresenceChanged( const TQString &uid );
/**
* @brief Indicates that presence information obtained earlier on might
@@ -602,44 +602,44 @@ class KIMPROXY_EXPORT KIMProxy : public QObject, virtual public KIMProxyIface
/**
* Bootstrap our presence data for a newly registered app
*/
- void pollApp( const QCString & appId );
+ void pollApp( const TQCString & appId );
/**
* Bootstrap our presence data by polling all known apps
*/
- void pollAll( const QString &uid );
+ void pollAll( const TQString &uid );
/**
* Update our records with the given data
*/
- bool updatePresence( const QString &uid, const QCString &appId, int presence );
+ bool updatePresence( const TQString &uid, const TQCString &appId, int presence );
/**
* Get the name of the user's IM application of choice
*/
- QString preferredApp();
+ TQString preferredApp();
/**
* Get the app stub best able to reach this uid
*/
- KIMIface_stub * stubForUid( const QString &uid );
+ KIMIface_stub * stubForUid( const TQString &uid );
/**
* Get the app stub for this protocol.
* Take the preferred app first, then any other.
*/
- KIMIface_stub * stubForProtocol( const QString &protocol );
+ KIMIface_stub * stubForProtocol( const TQString &protocol );
private:
// client stubs used to get presence
// appId (from DCOP) -> KIMIface_stub
- QDict<KIMIface_stub> m_im_client_stubs;
+ TQDict<KIMIface_stub> m_im_client_stubs;
// map containing numeric presence and the originating application ID for each KABC uid we know of
// KABC Uid -> (appId, numeric presence )(AppPresence)
PresenceMap m_presence_map;
// cache of the client strings in use by each application
// dictionary of KIMIface_stub -> map of numeric presence -> string presence
// FIXME: remove for KDE4 - UNUSED but maintained for binary compatibility in KDE 3.4
- QPtrDict<int> m_client_presence_strings;
+ TQPtrDict<int> m_client_presence_strings;
Private * d;
bool m_apps_available;
bool m_initialized;
diff --git a/interfaces/kimproxy/library/kimproxyiface.h b/interfaces/kimproxy/library/kimproxyiface.h
index 7c99bce4e..fa11183c9 100644
--- a/interfaces/kimproxy/library/kimproxyiface.h
+++ b/interfaces/kimproxy/library/kimproxyiface.h
@@ -32,7 +32,7 @@ class KIMProxyIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual void contactPresenceChanged( QString uid, QCString appId, int presence ) = 0;
+ virtual void contactPresenceChanged( TQString uid, TQCString appId, int presence ) = 0;
};
#endif
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
index 5db8f65d0..11fa58f27 100644
--- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
+++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
@@ -1,9 +1,9 @@
#include "kfileaudiopreview.h"
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -20,12 +20,12 @@
class KFileAudioPreviewFactory : public KLibFactory
{
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList & args)
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList & args)
{
Q_UNUSED(className);
Q_UNUSED(args);
- return new KFileAudioPreview( dynamic_cast<QWidget*>( parent ), name );
+ return new KFileAudioPreview( dynamic_cast<TQWidget*>( parent ), name );
}
};
@@ -39,9 +39,9 @@ K_EXPORT_COMPONENT_FACTORY( kfileaudiopreview, KFileAudioPreviewFactory )
class KFileAudioPreview::KFileAudioPreviewPrivate
{
public:
- KFileAudioPreviewPrivate( QWidget *parent )
+ KFileAudioPreviewPrivate( TQWidget *parent )
{
- player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", QString::null, parent );
+ player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString::null, parent );
}
~KFileAudioPreviewPrivate()
@@ -53,22 +53,22 @@ public:
};
-KFileAudioPreview::KFileAudioPreview( QWidget *parent, const char *name )
+KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name )
{
KGlobal::locale()->insertCatalogue("kfileaudiopreview");
- QStringList formats = KDE::PlayObjectFactory::mimeTypes();
+ TQStringList formats = KDE::PlayObjectFactory::mimeTypes();
// ###
- QStringList::ConstIterator it = formats.begin();
+ TQStringList::ConstIterator it = formats.begin();
for ( ; it != formats.end(); ++it )
m_supportedFormats.insert( *it, (void*) 1 );
- QVGroupBox *box = new QVGroupBox( i18n("Media Player"), this );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( box );
- (void) new QWidget( box ); // spacer
+ (void) new TQWidget( box ); // spacer
d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway
if ( d->player ) // only if there actually is a component...
@@ -81,19 +81,19 @@ KFileAudioPreview::KFileAudioPreview( QWidget *parent, const char *name )
// So, reparent first the video widget, then the view.
if ( view->videoWidget() )
{
- QHBox *frame = new QHBox( box );
- frame->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- frame->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- view->videoWidget()->reparent( frame, QPoint(0,0) );
+ TQHBox *frame = new TQHBox( box );
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
+ view->videoWidget()->reparent( frame, TQPoint(0,0) );
}
- view->reparent( box, QPoint(0,0) );
+ view->reparent( box, TQPoint(0,0) );
}
- m_autoPlay = new QCheckBox( i18n("Play &automatically"), box );
+ m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box );
KConfigGroup config( KGlobal::config(), ConfigGroup );
m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) );
- connect( m_autoPlay, SIGNAL(toggled(bool)), SLOT(toggleAuto(bool)) );
+ connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
}
KFileAudioPreview::~KFileAudioPreview()
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h
index df1d19e5b..db921c7e1 100644
--- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h
+++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h
@@ -19,7 +19,7 @@
#ifndef KFILEAUDIOPREVIEW_H
#define KFILEAUDIOPREVIEW_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kurl.h>
#include <kpreviewwidgetbase.h>
@@ -39,7 +39,7 @@ class KFileAudioPreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KFileAudioPreview(QWidget *parent = 0, const char *name = 0 );
+ KFileAudioPreview(TQWidget *parent = 0, const char *name = 0 );
~KFileAudioPreview();
public slots:
@@ -50,9 +50,9 @@ private slots:
void toggleAuto(bool);
private:
- QDict<void> m_supportedFormats;
+ TQDict<void> m_supportedFormats;
KURL m_currentURL;
- QCheckBox *m_autoPlay;
+ TQCheckBox *m_autoPlay;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/interfaces/kmediaplayer/player.cpp b/interfaces/kmediaplayer/player.cpp
index cbfba1368..681459731 100644
--- a/interfaces/kmediaplayer/player.cpp
+++ b/interfaces/kmediaplayer/player.cpp
@@ -28,7 +28,7 @@ KMediaPlayer::PlayerDCOPObject::PlayerDCOPObject(void)
{
}
-KMediaPlayer::Player::Player(QWidget *, const char *, QObject *parent, const char *name)
+KMediaPlayer::Player::Player(TQWidget *, const char *, TQObject *parent, const char *name)
: KParts::ReadOnlyPart(parent, name)
, currentLooping(false)
, currentState(Empty)
@@ -36,7 +36,7 @@ KMediaPlayer::Player::Player(QWidget *, const char *, QObject *parent, const cha
{
}
-KMediaPlayer::Player::Player(QObject *parent, const char *name)
+KMediaPlayer::Player::Player(TQObject *parent, const char *name)
: KParts::ReadOnlyPart(parent, name)
, currentLooping(false)
, currentState(Empty)
diff --git a/interfaces/kmediaplayer/player.h b/interfaces/kmediaplayer/player.h
index 89a4a0b23..10e9f4a74 100644
--- a/interfaces/kmediaplayer/player.h
+++ b/interfaces/kmediaplayer/player.h
@@ -51,12 +51,12 @@ public:
/** This constructor is what to use when no GUI is required, as in the
* case of a KMediaPlayer/Engine.
*/
- Player(QObject *parent, const char *name);
+ Player(TQObject *parent, const char *name);
/** This constructor is what to use when a GUI is required, as in the
* case of a KMediaPlayer/Player.
*/
- Player(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name);
+ Player(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name);
virtual ~Player(void);
diff --git a/interfaces/kmediaplayer/view.cpp b/interfaces/kmediaplayer/view.cpp
index c231d8aaf..64e3bf484 100644
--- a/interfaces/kmediaplayer/view.cpp
+++ b/interfaces/kmediaplayer/view.cpp
@@ -27,11 +27,11 @@ struct KMediaPlayer::View::Data
{
Data() : videoWidget(0L) {}
- QWidget *videoWidget;
+ TQWidget *videoWidget;
};
-KMediaPlayer::View::View(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KMediaPlayer::View::View(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
, currentButtons((int)All)
, d(new Data())
{
@@ -76,12 +76,12 @@ void KMediaPlayer::View::toggleButton(int b)
setButtons(currentButtons ^ b);
}
-void KMediaPlayer::View::setVideoWidget(QWidget *videoWidget)
+void KMediaPlayer::View::setVideoWidget(TQWidget *videoWidget)
{
d->videoWidget = videoWidget;
}
-QWidget* KMediaPlayer::View::videoWidget()
+TQWidget* KMediaPlayer::View::videoWidget()
{
return d->videoWidget;
}
diff --git a/interfaces/kmediaplayer/view.h b/interfaces/kmediaplayer/view.h
index be60f9e75..54f46a8ca 100644
--- a/interfaces/kmediaplayer/view.h
+++ b/interfaces/kmediaplayer/view.h
@@ -24,7 +24,7 @@
#ifndef KMEDIAPLAYERVIEW_H
#define KMEDIAPLAYERVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
namespace KMediaPlayer
@@ -36,8 +36,8 @@ class KDE_EXPORT View : public QWidget
Q_OBJECT
public:
- /** Your typical QWidget constructor. */
- View(QWidget *parent, const char *name);
+ /** Your typical TQWidget constructor. */
+ View(TQWidget *parent, const char *name);
virtual ~View(void);
/** The Possible buttons that can appear in the UI. */
@@ -58,9 +58,9 @@ public:
/** Return which buttons are being displayed. */
int buttons(void);
- /** Return the QWidget in which video is displayed.
+ /** Return the TQWidget in which video is displayed.
May Return 0L if there is none. */
- QWidget *videoWidget();
+ TQWidget *videoWidget();
public slots:
/** Set which buttons to display. See Button. */
@@ -84,7 +84,7 @@ protected:
the video will be displayed. KMediaPlayer users may
reparent() it to somewhere else, for example.
*/
- void setVideoWidget(QWidget *videoWidget);
+ void setVideoWidget(TQWidget *videoWidget);
private:
int currentButtons;
diff --git a/interfaces/kregexpeditor/kregexpeditorinterface.h b/interfaces/kregexpeditor/kregexpeditorinterface.h
index f1267d711..01fab0fdf 100644
--- a/interfaces/kregexpeditor/kregexpeditorinterface.h
+++ b/interfaces/kregexpeditor/kregexpeditorinterface.h
@@ -1,7 +1,7 @@
#ifndef __kregexpeditorinterface_h__
#define __kregexpeditorinterface_h__
-#include <qstring.h>
+#include <tqstring.h>
/**
* A graphical editor for regular expressions.
@@ -22,7 +22,7 @@
* regular expression dialog:
*
* \code
- * QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ * TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
* if ( editorDialog ) {
* // kdeutils was installed, so the dialog was found fetch the editor interface
* KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorDialog->qt_cast( "KRegExpEditorInterface" ) );
@@ -41,16 +41,16 @@
*
* Note: signals and slots must be connected to the editorDialog object, not to the editor object:
* \code
- * connect( editorDialog, SIGNAL( canUndo( bool ) ), undoBut, SLOT( setEnabled( bool ) ) );
+ * connect( editorDialog, TQT_SIGNAL( canUndo( bool ) ), undoBut, TQT_SLOT( setEnabled( bool ) ) );
* \endcode
*
* If you want to create an instance of the editor widget, i.e. not the
* dialog, then you must do it in the following way:
*
* \code
- * QWidget *editorWidget =
- * KParts::ComponentFactory::createInstanceFromQuery<QWidget>(
- * "KRegExpEditor/KRegExpEditor", QString::null, parent );
+ * TQWidget *editorWidget =
+ * KParts::ComponentFactory::createInstanceFromQuery<TQWidget>(
+ * "KRegExpEditor/KRegExpEditor", TQString::null, parent );
* if ( editorWidget ) {
* // kdeutils was installed, so the widget was found fetch the editor interface
* KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorWidget->qt_cast( "KRegExpEditorInterface" ) );
@@ -75,7 +75,7 @@ public:
* returns the regular expression of the editor in Qt3 QRegExp
* syntax. Note, there is also a 'regexp' Qt property available.
*/
- virtual QString regExp() const = 0;
+ virtual TQString regExp() const = 0;
protected:
// These are signals: in classes that actually implement the interface.
@@ -103,9 +103,9 @@ public:
/**
* Set the regular expression for the editor. The syntax must be Qt3
- * QRegExp syntax.
+ * TQRegExp syntax.
*/
- virtual void setRegExp( const QString &regexp ) = 0;
+ virtual void setRegExp( const TQString &regexp ) = 0;
virtual void redo() = 0;
virtual void undo() = 0;
@@ -116,7 +116,7 @@ public:
* this method will be used to give the widget a text to show matches of
* the regular expression on.
*/
- virtual void setMatchText( const QString& ) = 0;
+ virtual void setMatchText( const TQString& ) = 0;
/**
* This method allows for future changes that will not break binary
@@ -130,7 +130,7 @@ public:
*
* Conclusion: You should not use this method in this version of KDE!
*/
- virtual void doSomething( QString method, void* arguments ) = 0;
+ virtual void doSomething( TQString method, void* arguments ) = 0;
};
#endif
diff --git a/interfaces/kscript/sample/shellscript.cpp b/interfaces/kscript/sample/shellscript.cpp
index 4e3062eb2..49aee0727 100644
--- a/interfaces/kscript/sample/shellscript.cpp
+++ b/interfaces/kscript/sample/shellscript.cpp
@@ -28,12 +28,12 @@
typedef KGenericFactory<ShellScript, KScriptClientInterface> ShellScriptFactory;
K_EXPORT_COMPONENT_FACTORY( libshellscript, ShellScriptFactory( "ShellScript" ) )
-ShellScript::ShellScript(KScriptClientInterface *parent, const char *, const QStringList & ) : ScriptClientInterface(parent)
+ShellScript::ShellScript(KScriptClientInterface *parent, const char *, const TQStringList & ) : ScriptClientInterface(parent)
{
m_script = new KProcess();
- connect ( m_script, SIGNAL(processExited(KProcess *)), SLOT(Exit(KProcess *)));
- connect ( m_script, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(stdOut(KProcess *, char *, int )));
- connect ( m_script, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(stdErr(KProcess *, char *, int )));
+ connect ( m_script, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(Exit(KProcess *)));
+ connect ( m_script, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(stdOut(KProcess *, char *, int )));
+ connect ( m_script, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(stdErr(KProcess *, char *, int )));
// Connect feedback signals and slots
//kdDebug() << "Building new script engine" << endl;
}
@@ -42,23 +42,23 @@ ShellScript::~ShellScript()
{
}
-QString ShellScript::script() const
+TQString ShellScript::script() const
{
return m_scriptName;
}
-void ShellScript::setScript( const QString &scriptFile )
+void ShellScript::setScript( const TQString &scriptFile )
{
m_scriptName = scriptFile;
*m_script << "sh" << m_scriptName << kapp->dcopClient()->appId();
}
-void ShellScript::setScript( const QString &, const QString & )
+void ShellScript::setScript( const TQString &, const TQString & )
{
// ### what is this?
}
-void ShellScript::run(QObject *, const QVariant &)
+void ShellScript::run(TQObject *, const TQVariant &)
{
m_script->start(KProcess::NotifyOnExit,KProcess::All);
}
diff --git a/interfaces/kscript/sample/shellscript.h b/interfaces/kscript/sample/shellscript.h
index c6bdc3c38..853a7bd12 100644
--- a/interfaces/kscript/sample/shellscript.h
+++ b/interfaces/kscript/sample/shellscript.h
@@ -20,20 +20,20 @@
#define __shellscript_h__
#include <scriptinterface.h>
-#include <qvariant.h>
-#include <qobject.h>
+#include <tqvariant.h>
+#include <tqobject.h>
#include <kprocess.h>
//using namespace KScriptInterface;
class ShellScript : public KScriptInterface
{
Q_OBJECT
public:
- ShellScript(KScriptClientInterface *parent, const char *name, const QStringList &args);
+ ShellScript(KScriptClientInterface *parent, const char *name, const TQStringList &args);
virtual ~ShellScript();
- QString script() const;
- void setScript( const QString &scriptFile );
- void setScript( const QString &scriptLibFile, const QString &method );
- void run(QObject *context = 0, const QVariant &arg = 0);
+ TQString script() const;
+ void setScript( const TQString &scriptFile );
+ void setScript( const TQString &scriptLibFile, const TQString &method );
+ void run(TQObject *context = 0, const TQVariant &arg = 0);
void kill();
private slots:
void Exit(KProcess *proc);
@@ -42,7 +42,7 @@ private slots:
private:
KProcess *m_script;
KScriptClientInterface *ScriptClientInterface;
- QString m_scriptName;
+ TQString m_scriptName;
};
#endif
diff --git a/interfaces/kscript/scriptclientinterface.h b/interfaces/kscript/scriptclientinterface.h
index adeaa6424..ae5672a35 100644
--- a/interfaces/kscript/scriptclientinterface.h
+++ b/interfaces/kscript/scriptclientinterface.h
@@ -18,7 +18,7 @@
*/
#ifndef __scriptclientinterface_h__
#define __scriptclientinterface_h__
-#include <qvariant.h>
+#include <tqvariant.h>
class QString;
@@ -32,11 +32,11 @@ class QString;
* There are currently a few implementations of script managers around but developers can implement their own custom
* interfaces with this class.
* @code
- * class MyScript : public QObject, public KScriptClientInterface {
+ * class MyScript : public TQObject, public KScriptClientInterface {
* Q_OBJECT
* public:
*
- * MyScript(QObject *parent)
+ * MyScript(TQObject *parent)
* {
* // Create your @ref KScriptInterface here.
* m_interface = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>(
@@ -49,14 +49,14 @@ class QString;
* }
*
* signals:
- * void error ( const QString &msg );
- * void warning ( const QString &msg );
- * void output ( const QString &msg );
+ * void error ( const TQString &msg );
+ * void warning ( const TQString &msg );
+ * void output ( const TQString &msg );
* void progress ( int percent );
- * void done ( KScriptClientInterface::Result result, const QVariant &returned );
+ * void done ( KScriptClientInterface::Result result, const TQVariant &returned );
*
* public slots:
- * void activate(const QVariant &args)
+ * void activate(const TQVariant &args)
* {
* m_interface->run(parent(), args);
* }
@@ -80,21 +80,21 @@ class QString;
* For script clients its best to implement this as a signal so feedback
* can be sent to the main application.
*/
- virtual void error( const QString &msg ) =0;
+ virtual void error( const TQString &msg ) =0;
/**
* This function will allow the main application of any warnings
* that have occurred during the processing of the script.
* For script clients its best to implement this as a signal so feedback
* can be sent to the main application.
*/
- virtual void warning( const QString &msg ) =0;
+ virtual void warning( const TQString &msg ) =0;
/**
* This function will allow the main application of any normal
* output that has occurred during the processing of the script.
* For script clients its best to implement this as a signal so feedback
* can be sent to the main application.
*/
- virtual void output( const QString &msg ) =0;
+ virtual void output( const TQString &msg ) =0;
/**
* This function will allow feedback to any progress bars in the main
* application as to how far along the script is. This is very useful when
@@ -111,7 +111,7 @@ class QString;
* For script clients its best to implement this as a signal so feedback
* can be sent to the main application.
*/
- virtual void done( KScriptClientInterface::Result result, const QVariant &returned ) =0;
+ virtual void done( KScriptClientInterface::Result result, const TQVariant &returned ) =0;
/**
* Returned when the script has finished running.
* For script clients its best to implement this as a signal so feedback
diff --git a/interfaces/kscript/scriptinterface.h b/interfaces/kscript/scriptinterface.h
index de387ecc6..9ca3a45bd 100644
--- a/interfaces/kscript/scriptinterface.h
+++ b/interfaces/kscript/scriptinterface.h
@@ -27,8 +27,8 @@
**/
#ifndef __scriptinterface_h__
#define __scriptinterface_h__
-#include <qvariant.h>
-#include <qobject.h>
+#include <tqvariant.h>
+#include <tqobject.h>
#include <kdemacros.h>
//#include <scripclientinterface.h>
@@ -50,25 +50,25 @@ class KScriptClientInterface;
public:
/**
* Return the current script code data
- * @returns QString containing the currenly runable code
+ * @returns TQString containing the currenly runable code
**/
- virtual QString script() const = 0;
+ virtual TQString script() const = 0;
/**
* Sets the path to the script library that we are going to embed.
**/
- virtual void setScript( const QString &scriptFile ) = 0;
+ virtual void setScript( const TQString &scriptFile ) = 0;
/**
* Sets the path to the script library that we are going to embed.
* The second argument is the function from the script library that
* we wish to call.
**/
- virtual void setScript( const QString &scriptLibFile, const QString &method ) = 0;
+ virtual void setScript( const TQString &scriptLibFile, const TQString &method ) = 0;
/**
* Run the actual script code
* This can both take a context object that will be shared between the
* main application and a variant that will contain the arguments.
**/
- virtual void run(QObject *context = 0, const QVariant &arg = 0) = 0;
+ virtual void run(TQObject *context = 0, const TQVariant &arg = 0) = 0;
/**
* Abort the scripts run
**/
diff --git a/interfaces/kscript/scriptloader.cpp b/interfaces/kscript/scriptloader.cpp
index 6ab7e091c..621ceb5d1 100644
--- a/interfaces/kscript/scriptloader.cpp
+++ b/interfaces/kscript/scriptloader.cpp
@@ -29,18 +29,18 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
-ScriptLoader::ScriptLoader(KMainWindow *parent) : QObject (parent)
+ScriptLoader::ScriptLoader(KMainWindow *parent) : TQObject (parent)
{
m_parent = parent;
m_scripts.clear();
m_theAction = new KSelectAction ( i18n("KDE Scripts"),
0,
this,
- SLOT(runAction()),
+ TQT_SLOT(runAction()),
m_parent->actionCollection(),
"scripts");
}
@@ -54,15 +54,15 @@ ScriptLoader::~ScriptLoader()
KSelectAction * ScriptLoader::getScripts()
{
// Get the available scripts for this application.
- QStringList pluginList = "";
+ TQStringList pluginList = "";
// Find plugins
- QString searchPath = kapp->name();
+ TQString searchPath = kapp->name();
searchPath += "/scripts/";
- QDir d(locate( "data", searchPath));
+ TQDir d(locate( "data", searchPath));
kdDebug() << "loading plugin from " << locate( "data", searchPath) << endl;
const QFileInfoList *fileList = d.entryInfoList("*.desktop");
QFileInfoListIterator it ( *fileList );
- QFileInfo *fi;
+ TQFileInfo *fi;
// Find all available script desktop files
while( (fi=it.current()))
{
@@ -92,7 +92,7 @@ KSelectAction * ScriptLoader::getScripts()
void ScriptLoader::runAction()
{
- QString scriptName = m_theAction->currentText();
+ TQString scriptName = m_theAction->currentText();
}
diff --git a/interfaces/kscript/scriptloader.h b/interfaces/kscript/scriptloader.h
index c6b2848de..20b135231 100644
--- a/interfaces/kscript/scriptloader.h
+++ b/interfaces/kscript/scriptloader.h
@@ -18,7 +18,7 @@
*/
#ifndef _script_loader_h
#define _script_loader_h
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kmainwindow.h>
#include <kaction.h>
#include <kscript/scriptinterface.h>
@@ -47,11 +47,11 @@ class ScriptLoader : virtual public QObject
*/
void stopAction();
signals:
- virtual void errors(QString messages);
- virtual void output(QString messages);
+ virtual void errors(TQString messages);
+ virtual void output(TQString messages);
virtual void done(int errorCode);
private:
- QPtrList<KScriptInterface> m_scripts;
+ TQPtrList<KScriptInterface> m_scripts;
KSelectAction *m_theAction;
int m_currentSelection;
KMainWindow *m_parent;
diff --git a/interfaces/kscript/scriptmanager.cpp b/interfaces/kscript/scriptmanager.cpp
index 48592e2cf..5cdbd7459 100644
--- a/interfaces/kscript/scriptmanager.cpp
+++ b/interfaces/kscript/scriptmanager.cpp
@@ -13,9 +13,9 @@
class ScriptInfo
{
public:
- QString scriptType;
- QString scriptFile;
- QString scriptMethod;
+ TQString scriptType;
+ TQString scriptFile;
+ TQString scriptMethod;
ScriptInfo();
~ScriptInfo(){}
};
@@ -25,8 +25,8 @@ ScriptInfo::ScriptInfo()
scriptFile = "";
scriptMethod = "";
}
-KScriptManager::KScriptManager(QObject *parent, const char *name) :
- QObject(parent,name), KScriptClientInterface()
+KScriptManager::KScriptManager(TQObject *parent, const char *name) :
+ TQObject(parent,name), KScriptClientInterface()
{
}
@@ -36,14 +36,14 @@ KScriptManager::~KScriptManager()
m_scriptCache.setAutoDelete(true);
}
-bool KScriptManager::addScript( const QString &scriptDesktopFile)
+bool KScriptManager::addScript( const TQString &scriptDesktopFile)
{
//m_scriptNames.append(scriptName);
// lets get some information about the script we are going to run...
bool success = false;
- QString tmpScriptType = "";
- QString tmpScriptFile = "";
- QString tmpScriptMethod = "";
+ TQString tmpScriptType = "";
+ TQString tmpScriptFile = "";
+ TQString tmpScriptMethod = "";
// Read the desktop file
if(KDesktopFile::isDesktopFile(scriptDesktopFile))
@@ -51,24 +51,24 @@ bool KScriptManager::addScript( const QString &scriptDesktopFile)
KDesktopFile desktop(scriptDesktopFile, true);
m_scripts.insert(desktop.readName(), new ScriptInfo());
m_scripts[desktop.readName()]->scriptType = desktop.readType();
- QString localpath = QString(kapp->name()) + "/scripts/" + desktop.readEntry("X-KDE-ScriptName", "");
+ TQString localpath = TQString(kapp->name()) + "/scripts/" + desktop.readEntry("X-KDE-ScriptName", "");
m_scripts[desktop.readName()]->scriptFile = locate("data", localpath);
// m_scripts[desktop.readName()]->scriptMethod = tmpScriptMethod;
success = true;
}
return success;
}
-bool KScriptManager::removeScript( const QString &scriptName )
+bool KScriptManager::removeScript( const TQString &scriptName )
{
bool result = m_scriptCache.remove(scriptName);
result = m_scripts.remove(scriptName);
return result;
}
-QStringList KScriptManager::scripts()
+TQStringList KScriptManager::scripts()
{
- QDictIterator<ScriptInfo> it( m_scripts );
+ TQDictIterator<ScriptInfo> it( m_scripts );
// return m_scriptNames;
- QStringList scriptList;
+ TQStringList scriptList;
while ( it.current() )
{
scriptList.append(it.currentKey());
@@ -81,19 +81,19 @@ void KScriptManager::clear()
m_scriptCache.clear();
m_scripts.clear();
}
-void KScriptManager::runScript( const QString &scriptName, QObject *context, const QVariant &arg)
+void KScriptManager::runScript( const TQString &scriptName, TQObject *context, const TQVariant &arg)
{
ScriptInfo *newScript = m_scripts[scriptName];
if (newScript)
{
- QString scriptType = "([X-KDE-Script-Runner] == '" + newScript->scriptType + "')";
+ TQString scriptType = "([X-KDE-Script-Runner] == '" + newScript->scriptType + "')";
kdDebug()<<"running script, type = '"<<scriptType<<"'"<<endl;
// See if the script is already cached...
if ( !m_scriptCache[scriptName] )
{
// via some magic we will let the old script engine go away after
// some minutes...
- // currently i am thinking a QTimer that will throw a signal in 10 minutes
+ // currently i am thinking a TQTimer that will throw a signal in 10 minutes
// to remove m_scriptCache[m_currentScript]
KScriptInterface *ksif = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>( "KScriptRunner/KScriptRunner", scriptType, this );
if ( ksif )
diff --git a/interfaces/kscript/scriptmanager.h b/interfaces/kscript/scriptmanager.h
index 8ace6dcff..77a447c44 100644
--- a/interfaces/kscript/scriptmanager.h
+++ b/interfaces/kscript/scriptmanager.h
@@ -19,11 +19,11 @@
#ifndef __scriptmanager_h__
#define __scriptmanager_h__
-#include <qvariant.h>
+#include <tqvariant.h>
#include <scriptclientinterface.h>
#include <scriptinterface.h>
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -36,7 +36,7 @@ class ScriptInfo;
* @author Ian Reinhart Geiser <geiseri@kde.org>
*
**/
- class KDE_EXPORT KScriptManager : public QObject, public KScriptClientInterface
+ class KDE_EXPORT KScriptManager : public TQObject, public KScriptClientInterface
{
Q_OBJECT
friend class KScriptInterface;
@@ -44,7 +44,7 @@ class ScriptInfo;
/**
* Create a new instance of the script engine.
*/
- KScriptManager(QObject *parent, const char *name);
+ KScriptManager(TQObject *parent, const char *name);
/**
* Destroy the current script engine.
*/
@@ -54,17 +54,17 @@ class ScriptInfo;
* This should be the full name and path to the desktop
* file.
*/
- bool addScript( const QString &scriptDesktopFile);
+ bool addScript( const TQString &scriptDesktopFile);
/**
* Remove a script instance from the script engine.
* @returns the success of the operation.
*/
- bool removeScript( const QString &scriptName );
+ bool removeScript( const TQString &scriptName );
/**
* Access the names of script instances from the script engine.
- * @returns a QStringList of the current scripts.
+ * @returns a TQStringList of the current scripts.
*/
- QStringList scripts();
+ TQStringList scripts();
/**
* Clear all script intstances in memory
*/
@@ -73,17 +73,17 @@ class ScriptInfo;
* This function will allow the main application of any errors
* that have occurred during processing of the script.
*/
- void error( const QString &msg ) {emit scriptError(msg);}
+ void error( const TQString &msg ) {emit scriptError(msg);}
/**
* This function will allow the main application of any warnings
* that have occurred during the processing of the script.
*/
- void warning( const QString &msg ) {emit scriptWarning(msg);}
+ void warning( const TQString &msg ) {emit scriptWarning(msg);}
/**
* This function will allow the main application of any normal
* output that has occurred during the processing of the script.
*/
- void output( const QString &msg ) {emit scriptOutput(msg);}
+ void output( const TQString &msg ) {emit scriptOutput(msg);}
/**
* This function will allow feedback to any progress bars in the main
* application as to how far along the script is. This is very useful when
@@ -96,29 +96,29 @@ class ScriptInfo;
* It turns the result as a KScriptInteface::Result, and a return
* value as a QVariant
*/
- void done( KScriptClientInterface::Result result, const QVariant &returned ) {emit scriptDone(result, returned);}
+ void done( KScriptClientInterface::Result result, const TQVariant &returned ) {emit scriptDone(result, returned);}
public slots:
/**
* Run the selected script
*/
- void runScript( const QString &scriptName, QObject *context = 0, const QVariant &arg = 0 );
+ void runScript( const TQString &scriptName, TQObject *context = 0, const TQVariant &arg = 0 );
signals:
/**
* Send out a signal of the error message from the current running
* script.
*/
- void scriptError( const QString &msg );
+ void scriptError( const TQString &msg );
/**
* Send out a signal of the warning message from the current running
* script.
*/
- void scriptWarning( const QString &msg );
+ void scriptWarning( const TQString &msg );
/**
* Send out a signal of the output message from the current running
* script.
*/
- void scriptOutput( const QString &msg );
+ void scriptOutput( const TQString &msg );
/**
* Send out a signal of the progress of the current running
* script.
@@ -128,12 +128,12 @@ class ScriptInfo;
* Send out a signal of the exit status of the script
*
*/
- void scriptDone( KScriptClientInterface::Result result, const QVariant &returned);
+ void scriptDone( KScriptClientInterface::Result result, const TQVariant &returned);
protected:
- QDict<ScriptInfo> m_scripts;
- QDict<KScriptInterface> m_scriptCache;
- //QStringList m_scriptNames;
- QString m_currentScript;
+ TQDict<ScriptInfo> m_scripts;
+ TQDict<KScriptInterface> m_scriptCache;
+ //TQStringList m_scriptNames;
+ TQString m_currentScript;
};
//};
#endif
diff --git a/interfaces/kspeech/kspeech.h b/interfaces/kspeech/kspeech.h
index b97314760..049afbfa2 100644
--- a/interfaces/kspeech/kspeech.h
+++ b/interfaces/kspeech/kspeech.h
@@ -22,7 +22,7 @@
#define _KSPEECH_H_
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* @interface KSpeech
@@ -207,7 +207,7 @@
* "kttsd", object "KSpeech".
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPStub("kttsd", "KSpeech") {
@endverbatim
@@ -218,8 +218,8 @@
DCOPClient *client = dcopClient();
client->attach();
if (!client->isApplicationRegistered("kttsd")) {
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
cout << "Starting KTTSD failed with message " << error << endl;
}
@endverbatim
@@ -271,7 +271,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* You can combine sending and receiving in one object.
@@ -284,7 +284,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* See below for the signals you can declare.
@@ -293,7 +293,7 @@
* receiving object.
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPObject("mypart_kspeechsink") {
@endverbatim
@@ -314,8 +314,8 @@
}
// Connect KTTSD DCOP signals to our slots.
connectDCOPSignal("kttsd", "KSpeech",
- "sentenceStarted(QCString,uint,uint)",
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
false);
@endverbatim
*
@@ -323,13 +323,13 @@
* example
*
@verbatim
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* becomes
*
@verbatim
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
@endverbatim
*
* in the connectDCOPSignal call.
@@ -338,7 +338,7 @@
* is intended for your application.
*
@verbatim
- ASYNC MyPart::sentenceStarted(const QCString& appId, const uint jobNum, const uint seq)
+ ASYNC MyPart::sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq)
{
// Check appId to determine if this is our signal.
if (appId != dcopClient()->appId()) return;
@@ -686,7 +686,7 @@ class KSpeech : virtual public DCOPObject {
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const = 0;
+ virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const = 0;
/**
* Determine whether the currently-configured speech plugin supports markers in speech markup.
@@ -695,7 +695,7 @@ class KSpeech : virtual public DCOPObject {
* @return True if the plugin currently configured for the indicated
* talker supports markers.
*/
- virtual bool supportsMarkers(const QString &talker) const = 0;
+ virtual bool supportsMarkers(const TQString &talker) const = 0;
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -710,7 +710,7 @@ class KSpeech : virtual public DCOPObject {
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker) = 0;
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker) = 0;
/**
* Say a warning. The warning will be spoken when the current sentence
@@ -723,7 +723,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayWarning(const QString &warning, const QString &talker) = 0;
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker) = 0;
/**
* Say a message. The message will be spoken when the current sentence stops speaking
@@ -736,7 +736,7 @@ class KSpeech : virtual public DCOPObject {
* If no talker has been configured for the specified talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayMessage(const QString &message, const QString &talker) = 0;
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker) = 0;
/**
* Sets the GREP pattern that will be used as the sentence delimiter.
@@ -752,7 +752,7 @@ class KSpeech : virtual public DCOPObject {
* with a single space, and then replaces the sentence delimiters using
* the following statement:
@verbatim
- QString::replace(sentenceDelimiter, "\\1\t");
+ TQString::replace(sentenceDelimiter, "\\1\t");
@endverbatim
*
* which replaces all sentence delimiters with a tab, but
@@ -764,7 +764,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see sentenceparsing
*/
- virtual ASYNC setSentenceDelimiter(const QString &delimiter) = 0;
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter) = 0;
/**
* Queue a text job. Does not start speaking the text.
@@ -790,7 +790,7 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setText(const QString &text, const QString &talker) = 0;
+ virtual uint setText(const TQString &text, const TQString &talker) = 0;
/**
* Say a plain text job. This is a convenience method that
@@ -820,7 +820,7 @@ class KSpeech : virtual public DCOPObject {
*
* @since KDE 3.5
*/
- virtual uint sayText(const QString &text, const QString &talker) = 0;
+ virtual uint sayText(const TQString &text, const TQString &talker) = 0;
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -837,7 +837,7 @@ class KSpeech : virtual public DCOPObject {
* @see setText.
* @see startText.
*/
- virtual int appendText(const QString &text, uint jobNum=0) = 0;
+ virtual int appendText(const TQString &text, uint jobNum=0) = 0;
/**
* Queue a text job from the contents of a file. Does not start speaking the text.
@@ -864,8 +864,8 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setFile(const QString &filename, const QString &talker,
- const QString& encoding) = 0;
+ virtual uint setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding) = 0;
/**
* Get the number of sentences in a text job.
@@ -901,7 +901,7 @@ class KSpeech : virtual public DCOPObject {
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- virtual QString getTextJobNumbers() = 0;
+ virtual TQString getTextJobNumbers() = 0;
/**
* Get the state of a text job.
@@ -919,13 +919,13 @@ class KSpeech : virtual public DCOPObject {
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application,
* but if no such job, applies to the current job (if any).
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state - Job state.
- * - QCString appId - DCOP senderId of the application that requested the speech job.
- * - QString talker - Talker Code requested by application.
+ * - TQCString appId - DCOP senderId of the application that requested the speech job.
+ * - TQString talker - Talker Code requested by application.
* - int seq - Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount - Total number of sentences in the job.
* - int partNum - Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -936,11 +936,11 @@ class KSpeech : virtual public DCOPObject {
*
* The following sample code will decode the stream:
@code
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -954,7 +954,7 @@ class KSpeech : virtual public DCOPObject {
stream >> partCount;
@endcode
*/
- virtual QByteArray getTextJobInfo(uint jobNum=0) = 0;
+ virtual TQByteArray getTextJobInfo(uint jobNum=0) = 0;
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -962,7 +962,7 @@ class KSpeech : virtual public DCOPObject {
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- virtual QString talkerCodeToTalkerId(const QString& talkerCode) = 0;
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode) = 0;
/**
* Return a sentence of a job.
@@ -973,7 +973,7 @@ class KSpeech : virtual public DCOPObject {
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
- virtual QString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
+ virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
/**
* Determine if kttsd is currently speaking any text jobs.
@@ -1081,12 +1081,12 @@ class KSpeech : virtual public DCOPObject {
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
- virtual QStringList getTalkers() = 0;
+ virtual TQStringList getTalkers() = 0;
/**
* Change the talker for a text job.
@@ -1098,7 +1098,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 ) = 0;
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 ) = 0;
/**
* Get the user's default talker.
@@ -1107,7 +1107,7 @@ class KSpeech : virtual public DCOPObject {
* @see talkers
* @see getTalkers
*/
- virtual QString userDefaultTalker() = 0;
+ virtual TQString userDefaultTalker() = 0;
/**
* Move a text job down in the queue so that it is spoken later.
@@ -1176,7 +1176,7 @@ class KSpeech : virtual public DCOPObject {
* Return the KTTSD deamon version number.
* @since KDE 3.5
*/
- virtual QString version() = 0;
+ virtual TQString version() = 0;
//@}
k_dcop_signals:
@@ -1200,7 +1200,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see markers
*/
- void markerSeen(const QCString& appId, const QString& markerName);
+ void markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1209,7 +1209,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceStarted(const QCString& appId, uint jobNum, uint seq);
+ void sentenceStarted(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1218,14 +1218,14 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceFinished(const QCString& appId, uint jobNum, uint seq);
+ void sentenceFinished(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textSet(const QCString& appId, uint jobNum);
+ void textSet(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -1234,14 +1234,14 @@ class KSpeech : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- void textAppended(const QCString& appId, uint jobNum, int partNum);
+ void textAppended(const TQCString& appId, uint jobNum, int partNum);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textStarted(const QCString& appId, uint jobNum);
+ void textStarted(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -1251,7 +1251,7 @@ class KSpeech : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textFinished(const QCString& appId, uint jobNum);
+ void textFinished(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job.
@@ -1260,26 +1260,26 @@ class KSpeech : virtual public DCOPObject {
* The signal is only emitted if stopText() is called and the job is currently
* speaking.
*/
- void textStopped(const QCString& appId, uint jobNum);
+ void textStopped(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textPaused(const QCString& appId, uint jobNum);
+ void textPaused(const TQCString& appId, uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textResumed(const QCString& appId, uint jobNum);
+ void textResumed(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textRemoved(const QCString& appId, uint jobNum);
+ void textRemoved(const TQCString& appId, uint jobNum);
//@}
};
diff --git a/interfaces/kspeech/kspeechsink.h b/interfaces/kspeech/kspeechsink.h
index e90a005f1..51715b9a1 100644
--- a/interfaces/kspeech/kspeechsink.h
+++ b/interfaces/kspeech/kspeechsink.h
@@ -84,7 +84,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param markerName The name of the marker seen.
* @see markers
*/
- virtual ASYNC markerSeen(const QCString& appId, const QString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
+ virtual ASYNC markerSeen(const TQCString& appId, const TQString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -92,7 +92,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceStarted(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceStarted(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -100,14 +100,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceFinished(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceFinished(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textSet(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textSet(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -116,14 +116,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- virtual ASYNC textAppended(const QCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
+ virtual ASYNC textAppended(const TQCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStarted(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStarted(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -133,32 +133,32 @@ class KSpeechSink : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textFinished(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textFinished(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStopped(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStopped(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textPaused(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textPaused(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textResumed(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textResumed(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textRemoved(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textRemoved(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
};
#endif // _KSPEECHSINK_H_
diff --git a/interfaces/ktexteditor/blockselectiondcopinterface.h b/interfaces/ktexteditor/blockselectiondcopinterface.h
index 19fc950cb..4b74fd2a0 100644
--- a/interfaces/ktexteditor/blockselectiondcopinterface.h
+++ b/interfaces/ktexteditor/blockselectiondcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
namespace KTextEditor
{
diff --git a/interfaces/ktexteditor/blockselectioninterface.cpp b/interfaces/ktexteditor/blockselectioninterface.cpp
index 80e0c8570..c1af4a6ed 100644
--- a/interfaces/ktexteditor/blockselectioninterface.cpp
+++ b/interfaces/ktexteditor/blockselectioninterface.cpp
@@ -43,7 +43,7 @@ BlockSelectionInterface::BlockSelectionInterface()
{
globalBlockSelectionInterfaceNumber++;
myBlockSelectionInterfaceNumber = globalBlockSelectionInterfaceNumber++;
- QString name = "BlockSelectionInterface#" + QString::number(myBlockSelectionInterfaceNumber);
+ TQString name = "BlockSelectionInterface#" + TQString::number(myBlockSelectionInterfaceNumber);
d = new PrivateBlockSelectionInterface();
d->interface = new BlockSelectionDCOPInterface(this, name.latin1());
@@ -60,7 +60,7 @@ unsigned int BlockSelectionInterface::blockSelectionInterfaceNumber () const
return myBlockSelectionInterfaceNumber;
}
-void BlockSelectionInterface::setBlockSelectionInterfaceDCOPSuffix (const QCString &suffix)
+void BlockSelectionInterface::setBlockSelectionInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("BlockSelectionInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/blockselectioninterface.h b/interfaces/ktexteditor/blockselectioninterface.h
index d5104208c..9940f0da4 100644
--- a/interfaces/ktexteditor/blockselectioninterface.h
+++ b/interfaces/ktexteditor/blockselectioninterface.h
@@ -42,7 +42,7 @@ class KTEXTEDITOR_EXPORT BlockSelectionInterface
unsigned int blockSelectionInterfaceNumber () const;
protected:
- void setBlockSelectionInterfaceDCOPSuffix (const QCString &suffix);
+ void setBlockSelectionInterfaceDCOPSuffix (const TQCString &suffix);
/**
* slots !!!
diff --git a/interfaces/ktexteditor/clipboarddcopinterface.h b/interfaces/ktexteditor/clipboarddcopinterface.h
index fe4c3d3c7..8104e9d4d 100644
--- a/interfaces/ktexteditor/clipboarddcopinterface.h
+++ b/interfaces/ktexteditor/clipboarddcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
namespace KTextEditor
{
diff --git a/interfaces/ktexteditor/clipboardinterface.cpp b/interfaces/ktexteditor/clipboardinterface.cpp
index 5d267841a..4401b29de 100644
--- a/interfaces/ktexteditor/clipboardinterface.cpp
+++ b/interfaces/ktexteditor/clipboardinterface.cpp
@@ -28,7 +28,7 @@ ClipboardInterface::ClipboardInterface()
d = new PrivateClipboardInterface();
globalClipboardInterfaceNumber++;
myClipboardInterfaceNumber = globalClipboardInterfaceNumber++;
- QString name = "ClipboardInterface#" + QString::number(myClipboardInterfaceNumber);
+ TQString name = "ClipboardInterface#" + TQString::number(myClipboardInterfaceNumber);
d->interface = new ClipboardDCOPInterface(this, name.latin1());
}
ClipboardInterface::~ClipboardInterface()
@@ -42,7 +42,7 @@ unsigned int ClipboardInterface::clipboardInterfaceNumber () const
return myClipboardInterfaceNumber;
}
-void ClipboardInterface::setClipboardInterfaceDCOPSuffix (const QCString &suffix)
+void ClipboardInterface::setClipboardInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("ClipboardInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/clipboardinterface.h b/interfaces/ktexteditor/clipboardinterface.h
index c55df503e..3e1143240 100644
--- a/interfaces/ktexteditor/clipboardinterface.h
+++ b/interfaces/ktexteditor/clipboardinterface.h
@@ -40,7 +40,7 @@ class KTEXTEDITOR_EXPORT ClipboardInterface
unsigned int clipboardInterfaceNumber () const;
protected:
- void setClipboardInterfaceDCOPSuffix (const QCString &suffix);
+ void setClipboardInterfaceDCOPSuffix (const TQCString &suffix);
/**
* slots !!!
diff --git a/interfaces/ktexteditor/codecompletioninterface.cpp b/interfaces/ktexteditor/codecompletioninterface.cpp
index 51250d2d6..ae60b2162 100644
--- a/interfaces/ktexteditor/codecompletioninterface.cpp
+++ b/interfaces/ktexteditor/codecompletioninterface.cpp
@@ -35,7 +35,7 @@ unsigned int CodeCompletionInterface::codeCompletionInterfaceNumber () const
return myCodeCompletionInterfaceNumber;
}
-void CodeCompletionInterface::setCodeCompletionInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void CodeCompletionInterface::setCodeCompletionInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("CodeCompletionInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/codecompletioninterface.h b/interfaces/ktexteditor/codecompletioninterface.h
index d1174d32a..780c02bbe 100644
--- a/interfaces/ktexteditor/codecompletioninterface.h
+++ b/interfaces/ktexteditor/codecompletioninterface.h
@@ -19,8 +19,8 @@
#ifndef __ktexteditor_codecompletioninterface_h__
#define __ktexteditor_codecompletioninterface_h__
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -42,13 +42,13 @@ namespace KTextEditor
class KTEXTEDITOR_EXPORT CompletionEntry
{
public:
- QString type;
- QString text;
- QString prefix;
- QString postfix;
- QString comment;
+ TQString type;
+ TQString text;
+ TQString prefix;
+ TQString postfix;
+ TQString comment;
- QString userdata;
+ TQString userdata;
bool operator==( const CompletionEntry &c ) const {
return ( c.type == type &&
@@ -94,7 +94,7 @@ class KTEXTEDITOR_EXPORT CodeCompletionInterface
unsigned int codeCompletionInterfaceNumber () const;
protected:
- void setCodeCompletionInterfaceDCOPSuffix (const QCString &suffix);
+ void setCodeCompletionInterfaceDCOPSuffix (const TQCString &suffix);
public:
@@ -104,7 +104,7 @@ class KTEXTEDITOR_EXPORT CodeCompletionInterface
/**
* This shows an argument hint.
*/
- virtual void showArgHint (QStringList functionList, const QString& strWrapping, const QString& strDelimiter) = 0;
+ virtual void showArgHint (TQStringList functionList, const TQString& strWrapping, const TQString& strDelimiter) = 0;
/**
* This shows a completion list. @p offset is the real start of the text that
@@ -112,7 +112,7 @@ class KTEXTEDITOR_EXPORT CodeCompletionInterface
* position. if @p casesensitive is @p true, the popup will only contain completions
* that match the input text regarding case.
*/
- virtual void showCompletionBox (QValueList<CompletionEntry> complList,int offset=0, bool casesensitive=true)=0;
+ virtual void showCompletionBox (TQValueList<CompletionEntry> complList,int offset=0, bool casesensitive=true)=0;
//
// signals !!!
@@ -186,7 +186,7 @@ class KTEXTEDITOR_EXPORT CodeCompletionInterface
* IMPORTANT FOR IMPLEMENTERS: When you don't support this signal, please just override the inherited
* function, if you support it, declare it as a signal
*/
- virtual void filterInsertString(CompletionEntry*,QString*)=0;
+ virtual void filterInsertString(CompletionEntry*,TQString*)=0;
private:
diff --git a/interfaces/ktexteditor/configinterface.cpp b/interfaces/ktexteditor/configinterface.cpp
index 39d2454ba..2ca2e4b12 100644
--- a/interfaces/ktexteditor/configinterface.cpp
+++ b/interfaces/ktexteditor/configinterface.cpp
@@ -57,7 +57,7 @@ unsigned int ConfigInterface::configInterfaceNumber () const
return myConfigInterfaceNumber;
}
-void ConfigInterface::setConfigInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void ConfigInterface::setConfigInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("ConfigInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/configinterface.h b/interfaces/ktexteditor/configinterface.h
index f80603d01..5b89ff413 100644
--- a/interfaces/ktexteditor/configinterface.h
+++ b/interfaces/ktexteditor/configinterface.h
@@ -42,7 +42,7 @@ class KTEXTEDITOR_EXPORT ConfigInterface
unsigned int configInterfaceNumber () const;
protected:
- void setConfigInterfaceDCOPSuffix (const QCString &suffix);
+ void setConfigInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/ktexteditor/configinterfaceextension.cpp b/interfaces/ktexteditor/configinterfaceextension.cpp
index 9f7456cbe..8557c422f 100644
--- a/interfaces/ktexteditor/configinterfaceextension.cpp
+++ b/interfaces/ktexteditor/configinterfaceextension.cpp
@@ -38,7 +38,7 @@ class PrivateConfigInterfaceExtension
using namespace KTextEditor;
-ConfigPage::ConfigPage ( QWidget *parent, const char *name ) : QWidget (parent, name) { ; }
+ConfigPage::ConfigPage ( TQWidget *parent, const char *name ) : TQWidget (parent, name) { ; }
ConfigPage::~ConfigPage () { ; }
@@ -62,7 +62,7 @@ unsigned int ConfigInterfaceExtension::configInterfaceExtensionNumber () const
return myConfigInterfaceExtensionNumber;
}
-void ConfigInterfaceExtension::setConfigInterfaceExtensionDCOPSuffix (const QCString &/*suffix*/)
+void ConfigInterfaceExtension::setConfigInterfaceExtensionDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("ConfigInterfaceExtension#"+suffix);
}
diff --git a/interfaces/ktexteditor/configinterfaceextension.h b/interfaces/ktexteditor/configinterfaceextension.h
index abec0f0fe..6ebfd8895 100644
--- a/interfaces/ktexteditor/configinterfaceextension.h
+++ b/interfaces/ktexteditor/configinterfaceextension.h
@@ -19,8 +19,8 @@
#ifndef __ktexteditor_configinterfaceextension_h__
#define __ktexteditor_configinterfaceextension_h__
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <kicontheme.h>
namespace KTextEditor
@@ -31,7 +31,7 @@ class KTEXTEDITOR_EXPORT ConfigPage : public QWidget
Q_OBJECT
public:
- ConfigPage ( QWidget *parent=0, const char *name=0 );
+ ConfigPage ( TQWidget *parent=0, const char *name=0 );
virtual ~ConfigPage ();
//
@@ -75,7 +75,7 @@ class KTEXTEDITOR_EXPORT ConfigInterfaceExtension
unsigned int configInterfaceExtensionNumber () const;
protected:
- void setConfigInterfaceExtensionDCOPSuffix (const QCString &suffix);
+ void setConfigInterfaceExtensionDCOPSuffix (const TQCString &suffix);
//
// slots !!!
@@ -91,11 +91,11 @@ class KTEXTEDITOR_EXPORT ConfigInterfaceExtension
config pages from 0 to configPages()-1 are available
if configPages() > 0
*/
- virtual ConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name=0 ) = 0;
+ virtual ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 ) = 0;
- virtual QString configPageName (uint number = 0) const = 0;
- virtual QString configPageFullName (uint number = 0) const = 0;
- virtual QPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const = 0;
+ virtual TQString configPageName (uint number = 0) const = 0;
+ virtual TQString configPageFullName (uint number = 0) const = 0;
+ virtual TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const = 0;
private:
diff --git a/interfaces/ktexteditor/cursorinterface.cpp b/interfaces/ktexteditor/cursorinterface.cpp
index 9dec0de30..91a14b06a 100644
--- a/interfaces/ktexteditor/cursorinterface.cpp
+++ b/interfaces/ktexteditor/cursorinterface.cpp
@@ -55,7 +55,7 @@ unsigned int CursorInterface::cursorInterfaceNumber () const
return myCursorInterfaceNumber;
}
-void CursorInterface::setCursorInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void CursorInterface::setCursorInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("CursorInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/cursorinterface.h b/interfaces/ktexteditor/cursorinterface.h
index b243d3c4c..ad3e0134b 100644
--- a/interfaces/ktexteditor/cursorinterface.h
+++ b/interfaces/ktexteditor/cursorinterface.h
@@ -19,8 +19,8 @@
#ifndef __ktexteditor_cursorinterface_h__
#define __ktexteditor_cursorinterface_h__
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -37,11 +37,11 @@ class KTEXTEDITOR_EXPORT Cursor
virtual bool setPosition ( unsigned int line, unsigned int col ) = 0;
- virtual bool insertText ( const QString& text ) = 0;
+ virtual bool insertText ( const TQString& text ) = 0;
virtual bool removeText ( unsigned int numberOfCharacters ) = 0;
- virtual QChar currentChar () const = 0;
+ virtual TQChar currentChar () const = 0;
};
/**
@@ -58,7 +58,7 @@ class KTEXTEDITOR_EXPORT CursorInterface
unsigned int cursorInterfaceNumber () const;
protected:
- void setCursorInterfaceDCOPSuffix (const QCString &suffix);
+ void setCursorInterfaceDCOPSuffix (const TQCString &suffix);
public:
/**
@@ -69,7 +69,7 @@ class KTEXTEDITOR_EXPORT CursorInterface
/*
* Accessor to the list of cursors.
*/
- virtual QPtrList<Cursor> cursors () const = 0;
+ virtual TQPtrList<Cursor> cursors () const = 0;
private:
class PrivateCursorInterface *d;
diff --git a/interfaces/ktexteditor/document.h b/interfaces/ktexteditor/document.h
index 9260d596c..624c344b9 100644
--- a/interfaces/ktexteditor/document.h
+++ b/interfaces/ktexteditor/document.h
@@ -35,7 +35,7 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
Q_OBJECT
public:
- Document ( QObject *parent = 0, const char *name = 0 );
+ Document ( TQObject *parent = 0, const char *name = 0 );
virtual ~Document ();
/**
@@ -46,19 +46,19 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
/**
* Returns this document's DCOP suffix for identifiying its DCOP interface.
*/
- QCString documentDCOPSuffix () const;
+ TQCString documentDCOPSuffix () const;
/**
* Create a view that will display the document data. You can create as many
* views as you like. When the user modifies data in one view then all other
* views will be updated as well.
*/
- virtual class View *createView ( QWidget *parent, const char *name = 0 ) = 0;
+ virtual class View *createView ( TQWidget *parent, const char *name = 0 ) = 0;
/*
* Returns a list of all views of this document.
*/
- virtual QPtrList<class View> views () const = 0;
+ virtual TQPtrList<class View> views () const = 0;
private:
class PrivateDocument *d;
@@ -66,7 +66,7 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
unsigned int myDocumentNumber;
};
-KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, QObject *parent = 0, const char *name = 0 );
+KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, TQObject *parent = 0, const char *name = 0 );
}
diff --git a/interfaces/ktexteditor/documentdcopinfo.cpp b/interfaces/ktexteditor/documentdcopinfo.cpp
index 7377fcf79..b339d01cd 100644
--- a/interfaces/ktexteditor/documentdcopinfo.cpp
+++ b/interfaces/ktexteditor/documentdcopinfo.cpp
@@ -15,7 +15,7 @@ DocumentInfoDCOPInterface::~DocumentInfoDCOPInterface()
}
-QString DocumentInfoDCOPInterface::mimeType()
+TQString DocumentInfoDCOPInterface::mimeType()
{
return m_parent->mimeType();
}
@@ -23,7 +23,7 @@ long DocumentInfoDCOPInterface::fileSize()
{
return m_parent->fileSize();
}
-QString DocumentInfoDCOPInterface::niceFileSize()
+TQString DocumentInfoDCOPInterface::niceFileSize()
{
return m_parent->niceFileSize();
}
diff --git a/interfaces/ktexteditor/documentdcopinfo.h b/interfaces/ktexteditor/documentdcopinfo.h
index 2293ff119..ea25284fe 100644
--- a/interfaces/ktexteditor/documentdcopinfo.h
+++ b/interfaces/ktexteditor/documentdcopinfo.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
namespace KTextEditor
{
@@ -34,9 +34,9 @@ namespace KTextEditor
*/
virtual ~DocumentInfoDCOPInterface();
k_dcop:
- QString mimeType();
+ TQString mimeType();
long fileSize();
- QString niceFileSize();
+ TQString niceFileSize();
uint documentInfoInterfaceNumber ();
private:
DocumentInfoInterface *m_parent;
diff --git a/interfaces/ktexteditor/documentinfo.cpp b/interfaces/ktexteditor/documentinfo.cpp
index 0047b5454..c675bfb5f 100644
--- a/interfaces/ktexteditor/documentinfo.cpp
+++ b/interfaces/ktexteditor/documentinfo.cpp
@@ -44,7 +44,7 @@ DocumentInfoInterface::DocumentInfoInterface()
myDocumentInfoInterfaceNumber = globalDocumentInfoInterfaceNumber++;
d = new PrivateDocumentInfoInterface();
- QString name = "DocumentInterface#" + QString::number(myDocumentInfoInterfaceNumber);
+ TQString name = "DocumentInterface#" + TQString::number(myDocumentInfoInterfaceNumber);
d->interface = new DocumentInfoDCOPInterface(this, name.latin1());
}
@@ -59,7 +59,7 @@ unsigned int DocumentInfoInterface::documentInfoInterfaceNumber () const
return myDocumentInfoInterfaceNumber;
}
-void DocumentInfoInterface::setDocumentInfoInterfaceDCOPSuffix (const QCString &suffix)
+void DocumentInfoInterface::setDocumentInfoInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("DocumentInfoInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/documentinfo.h b/interfaces/ktexteditor/documentinfo.h
index 9e6eb06e5..0832288de 100644
--- a/interfaces/ktexteditor/documentinfo.h
+++ b/interfaces/ktexteditor/documentinfo.h
@@ -39,14 +39,14 @@ class KTEXTEDITOR_EXPORT DocumentInfoInterface
DocumentInfoInterface();
virtual ~DocumentInfoInterface();
- virtual QString mimeType()=0;
+ virtual TQString mimeType()=0;
virtual long fileSize()=0;
- virtual QString niceFileSize()=0;
+ virtual TQString niceFileSize()=0;
unsigned int documentInfoInterfaceNumber () const;
protected:
- void setDocumentInfoInterfaceDCOPSuffix (const QCString &suffix);
+ void setDocumentInfoInterfaceDCOPSuffix (const TQCString &suffix);
private:
class PrivateDocumentInfoInterface *d;
diff --git a/interfaces/ktexteditor/dynwordwrapinterface.cpp b/interfaces/ktexteditor/dynwordwrapinterface.cpp
index e8448ed9c..49d4060c0 100644
--- a/interfaces/ktexteditor/dynwordwrapinterface.cpp
+++ b/interfaces/ktexteditor/dynwordwrapinterface.cpp
@@ -55,7 +55,7 @@ unsigned int DynWordWrapInterface::dynWordWrapInterfaceNumber () const
return myDynWordWrapInterfaceNumber;
}
-void DynWordWrapInterface::setDynWordWrapInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void DynWordWrapInterface::setDynWordWrapInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("DynWordWrapInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/dynwordwrapinterface.h b/interfaces/ktexteditor/dynwordwrapinterface.h
index 165b4191d..2576ae6f0 100644
--- a/interfaces/ktexteditor/dynwordwrapinterface.h
+++ b/interfaces/ktexteditor/dynwordwrapinterface.h
@@ -42,7 +42,7 @@ class KTEXTEDITOR_EXPORT DynWordWrapInterface
unsigned int dynWordWrapInterfaceNumber () const;
protected:
- void setDynWordWrapInterfaceDCOPSuffix (const QCString &suffix);
+ void setDynWordWrapInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/ktexteditor/editdcopinterface.cpp b/interfaces/ktexteditor/editdcopinterface.cpp
index 1a002d775..6130ccd14 100644
--- a/interfaces/ktexteditor/editdcopinterface.cpp
+++ b/interfaces/ktexteditor/editdcopinterface.cpp
@@ -15,12 +15,12 @@ EditDCOPInterface::~EditDCOPInterface()
}
-QString EditDCOPInterface::text ()
+TQString EditDCOPInterface::text ()
{
return m_parent->text();
}
-QString EditDCOPInterface::textLine ( uint line )
+TQString EditDCOPInterface::textLine ( uint line )
{
return m_parent->textLine(line);
}
@@ -35,12 +35,12 @@ int EditDCOPInterface::length ()
return m_parent->length();
}
-void EditDCOPInterface::setText ( const QString &text )
+void EditDCOPInterface::setText ( const TQString &text )
{
m_parent->setText(text);
}
-bool EditDCOPInterface::insertText ( uint line, uint col, const QString &text )
+bool EditDCOPInterface::insertText ( uint line, uint col, const TQString &text )
{
return m_parent->insertText( line, col, text);
}
@@ -50,7 +50,7 @@ bool EditDCOPInterface::removeText ( uint startLine, uint startCol, uint endLine
return m_parent->removeText( startLine, startCol, endLine, endCol);
}
-bool EditDCOPInterface::insertLine ( uint line, const QString &text )
+bool EditDCOPInterface::insertLine ( uint line, const TQString &text )
{
return m_parent->insertLine( line, text);
}
diff --git a/interfaces/ktexteditor/editdcopinterface.h b/interfaces/ktexteditor/editdcopinterface.h
index b6956d5fa..f169fb15b 100644
--- a/interfaces/ktexteditor/editdcopinterface.h
+++ b/interfaces/ktexteditor/editdcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
@@ -36,12 +36,12 @@ namespace KTextEditor
/**
* @return the complete document as a single QString
*/
- virtual QString text ();
+ virtual TQString text ();
/**
* @return All the text from the requested line.
*/
- virtual QString textLine ( uint line );
+ virtual TQString textLine ( uint line );
/**
* @return The current number of lines in the document
@@ -57,13 +57,13 @@ namespace KTextEditor
* Set the given text into the view.
* Warning: This will overwrite any data currently held in this view.
*/
- virtual void setText (const QString &text );
+ virtual void setText (const TQString &text );
/**
* Inserts text at line "line", column "col"
* returns true if success
*/
- virtual bool insertText ( uint line, uint col, const QString &text );
+ virtual bool insertText ( uint line, uint col, const TQString &text );
/**
* remove text at line "line", column "col"
@@ -74,7 +74,7 @@ namespace KTextEditor
/**
* Insert line(s) at the given line number.
*/
- virtual bool insertLine ( uint line, const QString &text );
+ virtual bool insertLine ( uint line, const TQString &text );
/**
* Insert line(s) at the given line number.
diff --git a/interfaces/ktexteditor/editinterface.cpp b/interfaces/ktexteditor/editinterface.cpp
index 095c44ba9..6722fc555 100644
--- a/interfaces/ktexteditor/editinterface.cpp
+++ b/interfaces/ktexteditor/editinterface.cpp
@@ -27,7 +27,7 @@ EditInterface::EditInterface()
d = new PrivateEditInterface();
globalEditInterfaceNumber++;
myEditInterfaceNumber = globalEditInterfaceNumber;
- QString name = "EditInterface#" + QString::number(myEditInterfaceNumber);
+ TQString name = "EditInterface#" + TQString::number(myEditInterfaceNumber);
d->interface = new EditDCOPInterface(this, name.latin1());
}
@@ -42,7 +42,7 @@ uint EditInterface::editInterfaceNumber () const
return myEditInterfaceNumber;
}
-void EditInterface::setEditInterfaceDCOPSuffix (const QCString &suffix)
+void EditInterface::setEditInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("EditInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/editinterface.h b/interfaces/ktexteditor/editinterface.h
index baea99803..a2f8f5fe6 100644
--- a/interfaces/ktexteditor/editinterface.h
+++ b/interfaces/ktexteditor/editinterface.h
@@ -19,7 +19,7 @@
#ifndef __ktexteditor_editinterface_h__
#define __ktexteditor_editinterface_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT EditInterface
uint editInterfaceNumber () const;
protected:
- void setEditInterfaceDCOPSuffix (const QCString &suffix);
+ void setEditInterfaceDCOPSuffix (const TQCString &suffix);
public:
/**
@@ -50,17 +50,17 @@ class KTEXTEDITOR_EXPORT EditInterface
/**
* @return the complete document as a single QString
*/
- virtual QString text () const = 0;
+ virtual TQString text () const = 0;
/**
* @return a QString
*/
- virtual QString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const = 0;
+ virtual TQString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const = 0;
/**
* @return All the text from the requested line.
*/
- virtual QString textLine ( uint line ) const = 0;
+ virtual TQString textLine ( uint line ) const = 0;
/**
* @return The current number of lines in the document
@@ -81,7 +81,7 @@ class KTEXTEDITOR_EXPORT EditInterface
* Set the given text into the view.
* Warning: This will overwrite any data currently held in this view.
*/
- virtual bool setText ( const QString &text ) = 0;
+ virtual bool setText ( const TQString &text ) = 0;
/**
* clears the document
@@ -94,7 +94,7 @@ class KTEXTEDITOR_EXPORT EditInterface
* returns true if success
* Use insertText(numLines(), ...) to append text at end of document
*/
- virtual bool insertText ( uint line, uint col, const QString &text ) = 0;
+ virtual bool insertText ( uint line, uint col, const TQString &text ) = 0;
/**
* remove text at line "line", column "col"
@@ -106,7 +106,7 @@ class KTEXTEDITOR_EXPORT EditInterface
* Insert line(s) at the given line number.
* Use insertLine(numLines(), text) to append line at end of document
*/
- virtual bool insertLine ( uint line, const QString &text ) = 0;
+ virtual bool insertLine ( uint line, const TQString &text ) = 0;
/**
* Remove line(s) at the given line number.
@@ -119,7 +119,7 @@ class KTEXTEDITOR_EXPORT EditInterface
public:
virtual void textChanged () = 0;
- virtual void charactersInteractivelyInserted(int ,int ,const QString&)=0; //line, col, characters if you don't support this, don't create a signal, just overload it.
+ virtual void charactersInteractivelyInserted(int ,int ,const TQString&)=0; //line, col, characters if you don't support this, don't create a signal, just overload it.
/**
* only for the interface itself - REAL PRIVATE
diff --git a/interfaces/ktexteditor/editinterfaceext.h b/interfaces/ktexteditor/editinterfaceext.h
index f34ce80b9..650bb9ec2 100644
--- a/interfaces/ktexteditor/editinterfaceext.h
+++ b/interfaces/ktexteditor/editinterfaceext.h
@@ -20,7 +20,7 @@
#ifndef __ktexteditor_editinterfaceext_h__
#define __ktexteditor_editinterfaceext_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
diff --git a/interfaces/ktexteditor/editor.h b/interfaces/ktexteditor/editor.h
index 6f196d34e..11f9a8c15 100644
--- a/interfaces/ktexteditor/editor.h
+++ b/interfaces/ktexteditor/editor.h
@@ -46,7 +46,7 @@ class KTEXTEDITOR_EXPORT Editor : public KParts::ReadWritePart
/**
* Create a new editor widget.
*/
- Editor ( QObject *parent = 0, const char *name = 0 );
+ Editor ( TQObject *parent = 0, const char *name = 0 );
virtual ~Editor ();
unsigned int editorNumber () const;
@@ -57,7 +57,7 @@ class KTEXTEDITOR_EXPORT Editor : public KParts::ReadWritePart
unsigned int myEditorNumber;
};
-KTEXTEDITOR_EXPORT Editor *createEditor ( const char* libname, QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0 );
+KTEXTEDITOR_EXPORT Editor *createEditor ( const char* libname, TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0 );
}
diff --git a/interfaces/ktexteditor/editorchooser.cpp b/interfaces/ktexteditor/editorchooser.cpp
index a7211ab49..96cf3649e 100644
--- a/interfaces/ktexteditor/editorchooser.cpp
+++ b/interfaces/ktexteditor/editorchooser.cpp
@@ -1,15 +1,15 @@
#include <editorchooser.h>
#include <editorchooser.moc>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <ktrader.h>
#include <kconfig.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kservice.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kapplication.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include "editorchooser_ui.h"
@@ -26,19 +26,19 @@ namespace KTextEditor
~PrivateEditorChooser(){}
// Data Members
EditorChooser_UI *chooser;
- QStringList ElementNames;
- QStringList elements;
+ TQStringList ElementNames;
+ TQStringList elements;
};
}
-EditorChooser::EditorChooser(QWidget *parent,const char *name) :
- QWidget (parent,name)
+EditorChooser::EditorChooser(TQWidget *parent,const char *name) :
+ TQWidget (parent,name)
{
d = new PrivateEditorChooser ();
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
d->chooser = new EditorChooser_UI (this, name);
@@ -49,7 +49,7 @@ EditorChooser::EditorChooser(QWidget *parent,const char *name) :
KTrader::OfferList offers = KTrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes");
KConfig *config=new KConfig("default_components");
config->setGroup("KTextEditor");
- QString editor = config->readPathEntry("embeddedEditor");
+ TQString editor = config->readPathEntry("embeddedEditor");
if (editor.isEmpty()) editor="katepart";
@@ -74,11 +74,11 @@ EditorChooser:: ~EditorChooser(){
delete d;
}
-void EditorChooser::readAppSetting(const QString& postfix){
+void EditorChooser::readAppSetting(const TQString& postfix){
KConfig *cfg=kapp->config();
- QString previousGroup=cfg->group();
+ TQString previousGroup=cfg->group();
cfg->setGroup("KTEXTEDITOR:"+postfix);
- QString editor=cfg->readPathEntry("editor");
+ TQString editor=cfg->readPathEntry("editor");
if (editor.isEmpty()) d->chooser->editorCombo->setCurrentItem(0);
else
{
@@ -89,26 +89,26 @@ void EditorChooser::readAppSetting(const QString& postfix){
cfg->setGroup(previousGroup);
}
-void EditorChooser::writeAppSetting(const QString& postfix){
+void EditorChooser::writeAppSetting(const TQString& postfix){
KConfig *cfg=kapp->config();
- QString previousGroup=cfg->group();
+ TQString previousGroup=cfg->group();
cfg->setGroup("KTEXTEDITOR:"+postfix);
cfg->writeEntry("DEVELOPER_INFO","NEVER TRY TO USE VALUES FROM THAT GROUP, THEY ARE SUBJECT TO CHANGES");
cfg->writePathEntry("editor", (d->chooser->editorCombo->currentItem()==0) ?
- QString::null : (*d->elements.at(d->chooser->editorCombo->currentItem()-1)));
+ TQString::null : (*d->elements.at(d->chooser->editorCombo->currentItem()-1)));
cfg->sync();
cfg->setGroup(previousGroup);
}
-KTextEditor::Document *EditorChooser::createDocument(QObject *parent,const char* name, const QString& postfix,bool fallBackToKatePart){
+KTextEditor::Document *EditorChooser::createDocument(TQObject *parent,const char* name, const TQString& postfix,bool fallBackToKatePart){
KTextEditor::Document *tmpDoc=0;
KConfig *cfg=kapp->config();
- QString previousGroup=cfg->group();
+ TQString previousGroup=cfg->group();
cfg->setGroup("KTEXTEDITOR:"+postfix);
- QString editor=cfg->readPathEntry("editor");
+ TQString editor=cfg->readPathEntry("editor");
cfg->setGroup(previousGroup);
if (editor.isEmpty())
{
@@ -130,15 +130,15 @@ KTextEditor::Document *EditorChooser::createDocument(QObject *parent,const char*
return 0;
}
-KTextEditor::Editor *EditorChooser::createEditor(QWidget *parentWidget,QObject *parent,const char* widgetName,
- const char* name,const QString& postfix,bool fallBackToKatePart){
+KTextEditor::Editor *EditorChooser::createEditor(TQWidget *parentWidget,TQObject *parent,const char* widgetName,
+ const char* name,const TQString& postfix,bool fallBackToKatePart){
KTextEditor::Editor *tmpEd=0;
KConfig *cfg=kapp->config();
- QString previousGroup=cfg->group();
+ TQString previousGroup=cfg->group();
cfg->setGroup("KTEXTEDITOR:"+postfix);
- QString editor=cfg->readPathEntry("editor");
+ TQString editor=cfg->readPathEntry("editor");
cfg->setGroup(previousGroup);
if (editor.isEmpty())
{
diff --git a/interfaces/ktexteditor/editorchooser.h b/interfaces/ktexteditor/editorchooser.h
index 3feb73b62..156c49473 100644
--- a/interfaces/ktexteditor/editorchooser.h
+++ b/interfaces/ktexteditor/editorchooser.h
@@ -4,7 +4,7 @@
#include <ktexteditor/editor.h>
#include <ktexteditor/document.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KConfig;
class QString;
@@ -19,16 +19,16 @@ class KTEXTEDITOR_EXPORT EditorChooser: public QWidget
Q_OBJECT
public:
- EditorChooser(QWidget *parent=0,const char *name=0);
+ EditorChooser(TQWidget *parent=0,const char *name=0);
virtual ~EditorChooser();
/* void writeSysDefault();*/
- void readAppSetting(const QString& postfix=QString::null);
- void writeAppSetting(const QString& postfix=QString::null);
+ void readAppSetting(const TQString& postfix=TQString::null);
+ void writeAppSetting(const TQString& postfix=TQString::null);
- static KTextEditor::Document *createDocument(QObject* parent=0,const char *name=0,const QString& postfix=QString::null, bool fallBackToKatePart=true);
- static KTextEditor::Editor *createEditor(QWidget *parentWidget,QObject *parent,const char* widgetName=0,const char* name=0,const QString& postfix=QString::null,bool fallBackToKatePart=true);
+ static KTextEditor::Document *createDocument(TQObject* parent=0,const char *name=0,const TQString& postfix=TQString::null, bool fallBackToKatePart=true);
+ static KTextEditor::Editor *createEditor(TQWidget *parentWidget,TQObject *parent,const char* widgetName=0,const char* name=0,const TQString& postfix=TQString::null,bool fallBackToKatePart=true);
private:
class PrivateEditorChooser *d;
};
@@ -38,18 +38,18 @@ class EditorChooserBackEnd: public ComponentChooserPlugin {
Q_OBJECT
public:
- EditorChooserBackEnd(QObject *parent=0, const char *name=0);
+ EditorChooserBackEnd(TQObject *parent=0, const char *name=0);
virtual ~EditorChooserBackEnd();
- virtual QWidget *widget(QWidget *);
- virtual const QStringList &choices();
+ virtual TQWidget *widget(TQWidget *);
+ virtual const TQStringList &choices();
virtual void saveSettings();
- void readAppSetting(KConfig *cfg,const QString& postfix);
- void writeAppSetting(KConfig *cfg,const QString& postfix);
+ void readAppSetting(KConfig *cfg,const TQString& postfix);
+ void writeAppSetting(KConfig *cfg,const TQString& postfix);
public slots:
- virtual void madeChoice(int pos,const QString &choice);
+ virtual void madeChoice(int pos,const TQString &choice);
};
*/
diff --git a/interfaces/ktexteditor/encodingdcopinterface.cpp b/interfaces/ktexteditor/encodingdcopinterface.cpp
index adf369c6d..eb408c16e 100644
--- a/interfaces/ktexteditor/encodingdcopinterface.cpp
+++ b/interfaces/ktexteditor/encodingdcopinterface.cpp
@@ -18,11 +18,11 @@ uint EncodingDCOPInterface::encodingInterfaceNumber ()
{
return m_parent->encodingInterfaceNumber ();
}
-void EncodingDCOPInterface::setEncoding (QString e)
+void EncodingDCOPInterface::setEncoding (TQString e)
{
m_parent->setEncoding (e);
}
-QString EncodingDCOPInterface::encoding()
+TQString EncodingDCOPInterface::encoding()
{
return m_parent->encoding();
}
diff --git a/interfaces/ktexteditor/encodingdcopinterface.h b/interfaces/ktexteditor/encodingdcopinterface.h
index b5996deee..38de4e0aa 100644
--- a/interfaces/ktexteditor/encodingdcopinterface.h
+++ b/interfaces/ktexteditor/encodingdcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
@@ -34,8 +34,8 @@ namespace KTextEditor
virtual ~EncodingDCOPInterface();
k_dcop:
uint encodingInterfaceNumber ();
- void setEncoding (QString e) ;
- QString encoding();
+ void setEncoding (TQString e) ;
+ TQString encoding();
private:
EncodingInterface *m_parent;
diff --git a/interfaces/ktexteditor/encodinginterface.cpp b/interfaces/ktexteditor/encodinginterface.cpp
index b27204862..341847fb7 100644
--- a/interfaces/ktexteditor/encodinginterface.cpp
+++ b/interfaces/ktexteditor/encodinginterface.cpp
@@ -47,7 +47,7 @@ EncodingInterface::EncodingInterface()
myEncodingInterfaceNumber = globalEncodingInterfaceNumber++;
d = new PrivateEncodingInterface();
- ::QString name = "EncodingInterface#" + ::QString::number(myEncodingInterfaceNumber);
+ ::TQString name = "EncodingInterface#" + ::TQString::number(myEncodingInterfaceNumber);
d->interface = new EncodingDCOPInterface(this, name.latin1());
}
@@ -62,7 +62,7 @@ unsigned int EncodingInterface::encodingInterfaceNumber () const
return myEncodingInterfaceNumber;
}
-void EncodingInterface::setEncodingInterfaceDCOPSuffix (const QCString &suffix)
+void EncodingInterface::setEncodingInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("EncodingInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/encodinginterface.h b/interfaces/ktexteditor/encodinginterface.h
index 245090e2e..6bd01be38 100644
--- a/interfaces/ktexteditor/encodinginterface.h
+++ b/interfaces/ktexteditor/encodinginterface.h
@@ -41,14 +41,14 @@ class KTEXTEDITOR_EXPORT EncodingInterface
unsigned int encodingInterfaceNumber () const;
protected:
- void setEncodingInterfaceDCOPSuffix (const QCString &suffix);
+ void setEncodingInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
//
public:
- virtual void setEncoding (const class QString &e) = 0;
- virtual class QString encoding() const = 0;
+ virtual void setEncoding (const class TQString &e) = 0;
+ virtual class TQString encoding() const = 0;
private:
class PrivateEncodingInterface *d;
diff --git a/interfaces/ktexteditor/highlightinginterface.cpp b/interfaces/ktexteditor/highlightinginterface.cpp
index 8f0db5204..f606ab5c0 100644
--- a/interfaces/ktexteditor/highlightinginterface.cpp
+++ b/interfaces/ktexteditor/highlightinginterface.cpp
@@ -55,7 +55,7 @@ unsigned int HighlightingInterface::highlightingInterfaceNumber () const
return myHighlightingInterfaceNumber;
}
-void HighlightingInterface::setHighlightingInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void HighlightingInterface::setHighlightingInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("HighlightingInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/highlightinginterface.h b/interfaces/ktexteditor/highlightinginterface.h
index 08784085c..707665b5e 100644
--- a/interfaces/ktexteditor/highlightinginterface.h
+++ b/interfaces/ktexteditor/highlightinginterface.h
@@ -42,7 +42,7 @@ class KTEXTEDITOR_EXPORT HighlightingInterface
unsigned int highlightingInterfaceNumber () const;
protected:
- void setHighlightingInterfaceDCOPSuffix (const QCString &suffix);
+ void setHighlightingInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
@@ -66,12 +66,12 @@ class KTEXTEDITOR_EXPORT HighlightingInterface
/**
* returns the name of the highlighting with number "mode"
*/
- virtual QString hlModeName (unsigned int mode) = 0;
+ virtual TQString hlModeName (unsigned int mode) = 0;
/**
* returns the sectionname of the highlighting with number "mode"
*/
- virtual QString hlModeSectionName (unsigned int mode) = 0;
+ virtual TQString hlModeSectionName (unsigned int mode) = 0;
//
// signals !!!
diff --git a/interfaces/ktexteditor/ktexteditor.cpp b/interfaces/ktexteditor/ktexteditor.cpp
index be92cdedb..0b50fdaeb 100644
--- a/interfaces/ktexteditor/ktexteditor.cpp
+++ b/interfaces/ktexteditor/ktexteditor.cpp
@@ -106,7 +106,7 @@ unsigned int Plugin::globalPluginNumber = 0;
unsigned int PluginViewInterface::globalPluginViewInterfaceNumber = 0;
unsigned int Editor::globalEditorNumber = 0;
-Document::Document( QObject *parent, const char *name ) : KTextEditor::Editor (parent, name )
+Document::Document( TQObject *parent, const char *name ) : KTextEditor::Editor (parent, name )
{
globalDocumentNumber++;
myDocumentNumber = globalDocumentNumber;
@@ -121,15 +121,15 @@ unsigned int Document::documentNumber () const
return myDocumentNumber;
}
-QCString Document::documentDCOPSuffix () const
+TQCString Document::documentDCOPSuffix () const
{
- QCString num;
+ TQCString num;
num.setNum (documentNumber());
return num;
}
-View::View( Document *, QWidget *parent, const char *name ) : QWidget( parent, name )
+View::View( Document *, TQWidget *parent, const char *name ) : TQWidget( parent, name )
{
globalViewNumber++;
myViewNumber = globalViewNumber;
@@ -144,16 +144,16 @@ unsigned int View::viewNumber () const
return myViewNumber;
}
-QCString View::viewDCOPSuffix () const
+TQCString View::viewDCOPSuffix () const
{
- QCString num1, num2;
+ TQCString num1, num2;
num1.setNum (viewNumber());
num2.setNum (document()->documentNumber());
return num2 + "-" + num1;
}
-Plugin::Plugin( Document *document, const char *name ) : QObject (document, name )
+Plugin::Plugin( Document *document, const char *name ) : TQObject (document, name )
{
globalPluginNumber++;
myPluginNumber = globalPluginNumber;
@@ -191,7 +191,7 @@ unsigned int PluginViewInterface::pluginViewInterfaceNumber () const
return myPluginViewInterfaceNumber;
}
-Editor::Editor( QObject *parent, const char *name ) : KParts::ReadWritePart( parent, name )
+Editor::Editor( TQObject *parent, const char *name ) : KParts::ReadWritePart( parent, name )
{
globalEditorNumber++;
myEditorNumber = globalEditorNumber;
@@ -206,12 +206,12 @@ unsigned int Editor::editorNumber () const
return myEditorNumber;
}
-Editor *KTextEditor::createEditor ( const char* libname, QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name )
+Editor *KTextEditor::createEditor ( const char* libname, TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name )
{
return KParts::ComponentFactory::createPartInstanceFromLibrary<Editor>( libname, parentWidget, widgetName, parent, name );
}
-Document *KTextEditor::createDocument ( const char* libname, QObject *parent, const char *name )
+Document *KTextEditor::createDocument ( const char* libname, TQObject *parent, const char *name )
{
return KParts::ComponentFactory::createPartInstanceFromLibrary<Document>( libname, 0, 0, parent, name );
}
diff --git a/interfaces/ktexteditor/markinterface.cpp b/interfaces/ktexteditor/markinterface.cpp
index 4b1127d9e..d711b5245 100644
--- a/interfaces/ktexteditor/markinterface.cpp
+++ b/interfaces/ktexteditor/markinterface.cpp
@@ -55,7 +55,7 @@ unsigned int MarkInterface::markInterfaceNumber () const
return myMarkInterfaceNumber;
}
-void MarkInterface::setMarkInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void MarkInterface::setMarkInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("MarkInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/markinterface.h b/interfaces/ktexteditor/markinterface.h
index 84e1a6758..7fbb03e00 100644
--- a/interfaces/ktexteditor/markinterface.h
+++ b/interfaces/ktexteditor/markinterface.h
@@ -20,7 +20,7 @@
#ifndef __ktexteditor_markinterface_h__
#define __ktexteditor_markinterface_h__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -50,7 +50,7 @@ class KTEXTEDITOR_EXPORT MarkInterface
unsigned int markInterfaceNumber () const;
protected:
- void setMarkInterfaceDCOPSuffix (const QCString &suffix);
+ void setMarkInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
@@ -80,7 +80,7 @@ class KTEXTEDITOR_EXPORT MarkInterface
/**
* @return a list of all marks in the document
*/
- virtual QPtrList<KTextEditor::Mark> marks () = 0;
+ virtual TQPtrList<KTextEditor::Mark> marks () = 0;
/**
* Clears all marks in the document.
*/
diff --git a/interfaces/ktexteditor/markinterfaceextension.cpp b/interfaces/ktexteditor/markinterfaceextension.cpp
index 73f429fe8..57c981421 100644
--- a/interfaces/ktexteditor/markinterfaceextension.cpp
+++ b/interfaces/ktexteditor/markinterfaceextension.cpp
@@ -55,7 +55,7 @@ unsigned int MarkInterfaceExtension::markInterfaceExtensionNumber () const
return myMarkInterfaceExtensionNumber;
}
-void MarkInterfaceExtension::setMarkInterfaceExtensionDCOPSuffix (const QCString &/*suffix*/)
+void MarkInterfaceExtension::setMarkInterfaceExtensionDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("MarkInterfaceExtension#"+suffix);
}
diff --git a/interfaces/ktexteditor/markinterfaceextension.h b/interfaces/ktexteditor/markinterfaceextension.h
index cebe150f3..984664315 100644
--- a/interfaces/ktexteditor/markinterfaceextension.h
+++ b/interfaces/ktexteditor/markinterfaceextension.h
@@ -20,9 +20,9 @@
#ifndef __ktexteditor_markinterface_extension_h__
#define __ktexteditor_markinterface_extension_h__
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
#include "markinterface.h"
class QCString;
@@ -47,11 +47,11 @@ class KTEXTEDITOR_EXPORT MarkInterfaceExtension
unsigned int markInterfaceExtensionNumber () const;
protected:
- void setMarkInterfaceExtensionDCOPSuffix (const QCString &suffix);
+ void setMarkInterfaceExtensionDCOPSuffix (const TQCString &suffix);
public:
- virtual void setPixmap(MarkInterface::MarkTypes, const QPixmap &)=0;
- virtual void setDescription(MarkInterface::MarkTypes, const QString &)=0;
+ virtual void setPixmap(MarkInterface::MarkTypes, const TQPixmap &)=0;
+ virtual void setDescription(MarkInterface::MarkTypes, const TQString &)=0;
virtual void setMarksUserChangable(uint markMask)=0;
enum MarkChangeAction {
diff --git a/interfaces/ktexteditor/plugin.h b/interfaces/ktexteditor/plugin.h
index f96e50ddd..dc7978f92 100644
--- a/interfaces/ktexteditor/plugin.h
+++ b/interfaces/ktexteditor/plugin.h
@@ -19,7 +19,7 @@
#ifndef __ktexteditor_plugin_h__
#define __ktexteditor_plugin_h__
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
diff --git a/interfaces/ktexteditor/popupmenuinterface.cpp b/interfaces/ktexteditor/popupmenuinterface.cpp
index 30fe4303f..d2d51e4af 100644
--- a/interfaces/ktexteditor/popupmenuinterface.cpp
+++ b/interfaces/ktexteditor/popupmenuinterface.cpp
@@ -55,7 +55,7 @@ unsigned int PopupMenuInterface::popupMenuInterfaceNumber () const
return myPopupMenuInterfaceNumber;
}
-void PopupMenuInterface::setPopupMenuInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void PopupMenuInterface::setPopupMenuInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("PopupMenuInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/popupmenuinterface.h b/interfaces/ktexteditor/popupmenuinterface.h
index f1d07b806..4288cd605 100644
--- a/interfaces/ktexteditor/popupmenuinterface.h
+++ b/interfaces/ktexteditor/popupmenuinterface.h
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT PopupMenuInterface
unsigned int popupMenuInterfaceNumber () const;
protected:
- void setPopupMenuInterfaceDCOPSuffix (const QCString &suffix);
+ void setPopupMenuInterfaceDCOPSuffix (const TQCString &suffix);
//
// normal methodes
@@ -51,7 +51,7 @@ class KTEXTEDITOR_EXPORT PopupMenuInterface
Install a Popup Menu. The Popup Menu will be activated on
a right mouse button press event.
*/
- virtual void installPopup (QPopupMenu *rmb_Menu) = 0;
+ virtual void installPopup (TQPopupMenu *rmb_Menu) = 0;
private:
class PrivatePopupMenuInterface *d;
diff --git a/interfaces/ktexteditor/printdcopinterface.h b/interfaces/ktexteditor/printdcopinterface.h
index 420def4cc..e41e6da5d 100644
--- a/interfaces/ktexteditor/printdcopinterface.h
+++ b/interfaces/ktexteditor/printdcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
diff --git a/interfaces/ktexteditor/printinterface.cpp b/interfaces/ktexteditor/printinterface.cpp
index 655e610bb..936e803ea 100644
--- a/interfaces/ktexteditor/printinterface.cpp
+++ b/interfaces/ktexteditor/printinterface.cpp
@@ -45,7 +45,7 @@ PrintInterface::PrintInterface()
myPrintInterfaceNumber = globalPrintInterfaceNumber++;
d = new PrivatePrintInterface();
- QString name = "PrintInterface#" + QString::number(myPrintInterfaceNumber);
+ TQString name = "PrintInterface#" + TQString::number(myPrintInterfaceNumber);
d->interface = new PrintDCOPInterface(this, name.latin1());
}
@@ -60,7 +60,7 @@ unsigned int PrintInterface::printInterfaceNumber () const
return myPrintInterfaceNumber;
}
-void PrintInterface::setPrintInterfaceDCOPSuffix (const QCString &suffix)
+void PrintInterface::setPrintInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("PrintInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/printinterface.h b/interfaces/ktexteditor/printinterface.h
index a2af1d0c4..758a64f7a 100644
--- a/interfaces/ktexteditor/printinterface.h
+++ b/interfaces/ktexteditor/printinterface.h
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT PrintInterface
unsigned int printInterfaceNumber () const;
protected:
- void setPrintInterfaceDCOPSuffix (const QCString &suffix);
+ void setPrintInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/ktexteditor/searchdcopinterface.cpp b/interfaces/ktexteditor/searchdcopinterface.cpp
index ce4fe516d..ce29e4927 100644
--- a/interfaces/ktexteditor/searchdcopinterface.cpp
+++ b/interfaces/ktexteditor/searchdcopinterface.cpp
@@ -2,7 +2,7 @@
#include "searchinterface.h"
#include <dcopclient.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KTextEditor;
@@ -20,16 +20,16 @@ SearchDCOPInterface::~SearchDCOPInterface()
}
-bool SearchDCOPInterface::findFirstString( QString text, bool caseSensitive)
+bool SearchDCOPInterface::findFirstString( TQString text, bool caseSensitive)
{
return m_parent->searchText(0, 0, text, &m_currentrow, &m_currentcol, &m_currentmatchlen, caseSensitive);
}
-bool SearchDCOPInterface::findNextString( QString text, bool caseSensitive)
+bool SearchDCOPInterface::findNextString( TQString text, bool caseSensitive)
{
return m_parent->searchText(m_currentrow, m_currentcol+1, text, &m_currentrow, &m_currentcol, &m_currentmatchlen, caseSensitive);
}
-bool SearchDCOPInterface::findPreviousString( QString text, bool caseSensitive)
+bool SearchDCOPInterface::findPreviousString( TQString text, bool caseSensitive)
{
if( m_currentcol == 0)
m_currentrow--;
@@ -38,45 +38,45 @@ bool SearchDCOPInterface::findPreviousString( QString text, bool caseSensitive)
return m_parent->searchText(m_currentrow, m_currentcol, text, &m_currentrow, &m_currentcol, &m_currentmatchlen, caseSensitive, true);
}
-bool SearchDCOPInterface::findLastString( QString text, bool caseSensitive)
+bool SearchDCOPInterface::findLastString( TQString text, bool caseSensitive)
{
return m_parent->searchText(0,0, text, &m_currentrow, &m_currentcol, &m_currentmatchlen, caseSensitive, true);
}
-bool SearchDCOPInterface::findStringAt( uint row, uint col, QString text, bool caseSensitive)
+bool SearchDCOPInterface::findStringAt( uint row, uint col, TQString text, bool caseSensitive)
{
return m_parent->searchText(row,col, text, &m_currentrow, &m_currentcol, &m_currentmatchlen, caseSensitive);
}
-bool SearchDCOPInterface::findFirstRegExp( QString regexp)
+bool SearchDCOPInterface::findFirstRegExp( TQString regexp)
{
- return m_parent->searchText( 0,0, QRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen);
+ return m_parent->searchText( 0,0, TQRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen);
}
-bool SearchDCOPInterface::findNextRegExp( QString regexp)
+bool SearchDCOPInterface::findNextRegExp( TQString regexp)
{
- return m_parent->searchText( m_currentrow, m_currentcol+1, QRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen);
+ return m_parent->searchText( m_currentrow, m_currentcol+1, TQRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen);
}
-bool SearchDCOPInterface::findPreviousRegExp( QString regexp)
+bool SearchDCOPInterface::findPreviousRegExp( TQString regexp)
{
if( m_currentcol == 0)
m_currentrow--;
else
m_currentcol--;
- return m_parent->searchText( m_currentrow, m_currentcol, QRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, true);
+ return m_parent->searchText( m_currentrow, m_currentcol, TQRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, true);
}
-bool SearchDCOPInterface::findLastRegExp(QString regexp)
+bool SearchDCOPInterface::findLastRegExp(TQString regexp)
{
- return m_parent->searchText( 0,0, QRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, true);
+ return m_parent->searchText( 0,0, TQRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, true);
}
-bool SearchDCOPInterface::findRegExpAt( uint row, uint col, QString regexp)
+bool SearchDCOPInterface::findRegExpAt( uint row, uint col, TQString regexp)
{
- return m_parent->searchText( row, col, QRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, false);
+ return m_parent->searchText( row, col, TQRegExp(regexp), &m_currentrow, &m_currentcol, &m_currentmatchlen, false);
}
uint SearchDCOPInterface::currentMatchLine()
diff --git a/interfaces/ktexteditor/searchdcopinterface.h b/interfaces/ktexteditor/searchdcopinterface.h
index a16af1bd6..d4f558a26 100644
--- a/interfaces/ktexteditor/searchdcopinterface.h
+++ b/interfaces/ktexteditor/searchdcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
namespace KTextEditor
{
@@ -33,17 +33,17 @@ namespace KTextEditor
**/
virtual ~SearchDCOPInterface();
k_dcop:
- bool findFirstString(QString text, bool caseSensitive);
- bool findNextString(QString text, bool caseSensitive);
- bool findPreviousString( QString text, bool caseSensitive);
- bool findLastString(QString text, bool caseSensitive);
- bool findStringAt( uint row, uint col, QString text, bool caseSensitive);
+ bool findFirstString(TQString text, bool caseSensitive);
+ bool findNextString(TQString text, bool caseSensitive);
+ bool findPreviousString( TQString text, bool caseSensitive);
+ bool findLastString(TQString text, bool caseSensitive);
+ bool findStringAt( uint row, uint col, TQString text, bool caseSensitive);
- bool findFirstRegExp( QString regexp);
- bool findNextRegExp( QString regexp);
- bool findPreviousRegExp( QString regexp);
- bool findLastRegExp( QString regexp);
- bool findRegExpAt( uint row, uint col, QString regexp);
+ bool findFirstRegExp( TQString regexp);
+ bool findNextRegExp( TQString regexp);
+ bool findPreviousRegExp( TQString regexp);
+ bool findLastRegExp( TQString regexp);
+ bool findRegExpAt( uint row, uint col, TQString regexp);
uint currentMatchLine();
uint currentMatchCol();
diff --git a/interfaces/ktexteditor/searchinterface.cpp b/interfaces/ktexteditor/searchinterface.cpp
index 738567e87..d23a25e31 100644
--- a/interfaces/ktexteditor/searchinterface.cpp
+++ b/interfaces/ktexteditor/searchinterface.cpp
@@ -27,7 +27,7 @@ SearchInterface::SearchInterface()
d = new PrivateSearchInterface();
globalSearchInterfaceNumber++;
mySearchInterfaceNumber=globalSearchInterfaceNumber;
- QString name = "SearchInterface#" + QString::number(mySearchInterfaceNumber);
+ TQString name = "SearchInterface#" + TQString::number(mySearchInterfaceNumber);
d->interface = new SearchDCOPInterface(this, name.latin1());
}
SearchInterface::~SearchInterface()
@@ -41,7 +41,7 @@ unsigned int SearchInterface::searchInterfaceNumber () const
return mySearchInterfaceNumber;
}
-void SearchInterface::setSearchInterfaceDCOPSuffix (const QCString &suffix)
+void SearchInterface::setSearchInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("SearchInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/searchinterface.h b/interfaces/ktexteditor/searchinterface.h
index 1fd6823d3..b1c5f5f9f 100644
--- a/interfaces/ktexteditor/searchinterface.h
+++ b/interfaces/ktexteditor/searchinterface.h
@@ -43,14 +43,14 @@ class KTEXTEDITOR_EXPORT SearchInterface
unsigned int searchInterfaceNumber () const;
protected:
- void setSearchInterfaceDCOPSuffix (const QCString &suffix);
+ void setSearchInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
//
public:
- virtual bool searchText (unsigned int startLine, unsigned int startCol, const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive = true, bool backwards = false) = 0;
- virtual bool searchText (unsigned int startLine, unsigned int startCol, const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards = false) = 0;
+ virtual bool searchText (unsigned int startLine, unsigned int startCol, const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive = true, bool backwards = false) = 0;
+ virtual bool searchText (unsigned int startLine, unsigned int startCol, const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards = false) = 0;
private:
class PrivateSearchInterface *d;
diff --git a/interfaces/ktexteditor/selectiondcopinterface.cpp b/interfaces/ktexteditor/selectiondcopinterface.cpp
index c1405ae16..f341297e0 100644
--- a/interfaces/ktexteditor/selectiondcopinterface.cpp
+++ b/interfaces/ktexteditor/selectiondcopinterface.cpp
@@ -40,9 +40,9 @@ SelectionDCOPInterface::~SelectionDCOPInterface()
}
/**
- * @return a QString for the selected text
+ * @return a TQString for the selected text
*/
- QString SelectionDCOPInterface::selection ()
+ TQString SelectionDCOPInterface::selection ()
{
return m_parent->selection();
}
diff --git a/interfaces/ktexteditor/selectiondcopinterface.h b/interfaces/ktexteditor/selectiondcopinterface.h
index 87efc1918..aa2973540 100644
--- a/interfaces/ktexteditor/selectiondcopinterface.h
+++ b/interfaces/ktexteditor/selectiondcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
namespace KTextEditor
{
@@ -49,9 +49,9 @@ namespace KTextEditor
bool hasSelection ();
/**
- * @return a QString for the selected text
+ * @return a TQString for the selected text
*/
- QString selection ();
+ TQString selection ();
/**
* removes the selected Text
diff --git a/interfaces/ktexteditor/selectionextdcopinterface.h b/interfaces/ktexteditor/selectionextdcopinterface.h
index 65e7529ab..5c3e32baf 100644
--- a/interfaces/ktexteditor/selectionextdcopinterface.h
+++ b/interfaces/ktexteditor/selectionextdcopinterface.h
@@ -24,7 +24,7 @@
#include "selectioninterfaceext.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <dcopobject.h>
#include <dcopref.h>
diff --git a/interfaces/ktexteditor/selectioninterface.cpp b/interfaces/ktexteditor/selectioninterface.cpp
index d568881d4..2e9ae5204 100644
--- a/interfaces/ktexteditor/selectioninterface.cpp
+++ b/interfaces/ktexteditor/selectioninterface.cpp
@@ -28,7 +28,7 @@ SelectionInterface::SelectionInterface()
d = new PrivateSelectionInterface();
globalSelectionInterfaceNumber++;
mySelectionInterfaceNumber = globalSelectionInterfaceNumber;
- QString name = "SelectionInterface#" + QString::number(mySelectionInterfaceNumber);
+ TQString name = "SelectionInterface#" + TQString::number(mySelectionInterfaceNumber);
d->interface = new SelectionDCOPInterface(this, name.latin1());
}
SelectionInterface::~SelectionInterface()
@@ -42,7 +42,7 @@ unsigned int SelectionInterface::selectionInterfaceNumber () const
return mySelectionInterfaceNumber;
}
-void SelectionInterface::setSelectionInterfaceDCOPSuffix (const QCString &suffix)
+void SelectionInterface::setSelectionInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("SelectionInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/selectioninterface.h b/interfaces/ktexteditor/selectioninterface.h
index 48931a02b..adcf7d5e2 100644
--- a/interfaces/ktexteditor/selectioninterface.h
+++ b/interfaces/ktexteditor/selectioninterface.h
@@ -20,7 +20,7 @@
#ifndef __ktexteditor_selectioninterface_h__
#define __ktexteditor_selectioninterface_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT SelectionInterface
unsigned int selectionInterfaceNumber () const;
protected:
- void setSelectionInterfaceDCOPSuffix (const QCString &suffix);
+ void setSelectionInterfaceDCOPSuffix (const TQCString &suffix);
/*
* slots !!!
@@ -63,9 +63,9 @@ class KTEXTEDITOR_EXPORT SelectionInterface
virtual bool hasSelection () const = 0;
/**
- * @return a QString for the selected text
+ * @return a TQString for the selected text
*/
- virtual QString selection () const = 0;
+ virtual TQString selection () const = 0;
/**
* removes the selected Text
diff --git a/interfaces/ktexteditor/selectioninterfaceext.cpp b/interfaces/ktexteditor/selectioninterfaceext.cpp
index 471cfad65..f59468c17 100644
--- a/interfaces/ktexteditor/selectioninterfaceext.cpp
+++ b/interfaces/ktexteditor/selectioninterfaceext.cpp
@@ -43,7 +43,7 @@ SelectionInterfaceExt::SelectionInterfaceExt()
{
globalSelectionInterfaceExtNumber++;
mySelectionInterfaceExtNumber = globalSelectionInterfaceExtNumber;
- QString name = "SelectionInterfaceExt#" + QString::number(mySelectionInterfaceExtNumber);
+ TQString name = "SelectionInterfaceExt#" + TQString::number(mySelectionInterfaceExtNumber);
d->interface = new SelectionExtDCOPInterface(this, name.latin1());
}
@@ -58,7 +58,7 @@ unsigned int SelectionInterfaceExt::selectionInterfaceExtNumber () const
return mySelectionInterfaceExtNumber;
}
-void SelectionInterfaceExt::setSelectionInterfaceExtDCOPSuffix (const QCString &suffix)
+void SelectionInterfaceExt::setSelectionInterfaceExtDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("SelectionInterfaceExt#"+suffix);
}
diff --git a/interfaces/ktexteditor/selectioninterfaceext.h b/interfaces/ktexteditor/selectioninterfaceext.h
index 6b033ff34..407717ffd 100644
--- a/interfaces/ktexteditor/selectioninterfaceext.h
+++ b/interfaces/ktexteditor/selectioninterfaceext.h
@@ -46,7 +46,7 @@ class KTEXTEDITOR_EXPORT SelectionInterfaceExt
unsigned int selectionInterfaceExtNumber () const;
protected:
- void setSelectionInterfaceExtDCOPSuffix (const QCString &suffix);
+ void setSelectionInterfaceExtDCOPSuffix (const TQCString &suffix);
public:
/** The selection start line number */
diff --git a/interfaces/ktexteditor/sessionconfiginterface.cpp b/interfaces/ktexteditor/sessionconfiginterface.cpp
index be159bb4d..7180aae38 100644
--- a/interfaces/ktexteditor/sessionconfiginterface.cpp
+++ b/interfaces/ktexteditor/sessionconfiginterface.cpp
@@ -58,7 +58,7 @@ unsigned int SessionConfigInterface::configInterfaceNumber () const
return mySessionConfigInterfaceNumber;
}
-void SessionConfigInterface::setSessionConfigInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void SessionConfigInterface::setSessionConfigInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("SessionConfigInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/sessionconfiginterface.h b/interfaces/ktexteditor/sessionconfiginterface.h
index fe392559b..5322d9f93 100644
--- a/interfaces/ktexteditor/sessionconfiginterface.h
+++ b/interfaces/ktexteditor/sessionconfiginterface.h
@@ -42,7 +42,7 @@ class KTEXTEDITOR_EXPORT SessionConfigInterface
unsigned int configInterfaceNumber () const;
protected:
- void setSessionConfigInterfaceDCOPSuffix (const QCString &suffix);
+ void setSessionConfigInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/ktexteditor/templateinterface.cpp b/interfaces/ktexteditor/templateinterface.cpp
index 3a96a8d5a..4f9f83706 100644
--- a/interfaces/ktexteditor/templateinterface.cpp
+++ b/interfaces/ktexteditor/templateinterface.cpp
@@ -21,11 +21,11 @@
#include <stdaddressbook.h>
#include <addressee.h>
#include <addresseedialog.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kcalendarsystem.h>
#include <unistd.h>
@@ -49,7 +49,7 @@ uint TemplateInterface::templateInterfaceNumber () const
return myTemplateInterfaceNumber;
}
-void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const QCString &suffix )
+void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const TQCString &suffix )
{}
#define INITKABC do { \
@@ -70,18 +70,18 @@ void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const QCString &suffix
} \
} while(false)
-bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *parentWindow )
+bool TemplateInterface::expandMacros( TQMap<TQString, TQString> &map, TQWidget *parentWindow )
{
KABC::StdAddressBook *addrBook = 0;
KABC::Addressee userAddress;
- QDateTime datetime = QDateTime::currentDateTime();
- QDate date = datetime.date();
- QTime time = datetime.time();
+ TQDateTime datetime = TQDateTime::currentDateTime();
+ TQDate date = datetime.date();
+ TQTime time = datetime.time();
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = map.begin(); it != map.end(); ++it )
{
- QString placeholder = it.key();
+ TQString placeholder = it.key();
if ( map[ placeholder ].isEmpty() )
{
if ( placeholder == "index" ) map[ placeholder ] = "i";
@@ -125,11 +125,11 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare
}
else if ( placeholder == "month" )
{
- map[ placeholder ] = QString::number( KGlobal::locale() ->calendar() ->month( date ) );
+ map[ placeholder ] = TQString::number( KGlobal::locale() ->calendar() ->month( date ) );
}
else if ( placeholder == "day" )
{
- map[ placeholder ] = QString::number( KGlobal::locale() ->calendar() ->day( date ) );
+ map[ placeholder ] = TQString::number( KGlobal::locale() ->calendar() ->day( date ) );
}
else if ( placeholder == "hostname" )
{
@@ -137,7 +137,7 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare
hostname[ 0 ] = 0;
gethostname( hostname, 255 );
hostname[ 255 ] = 0;
- map[ placeholder ] = QString::fromLocal8Bit( hostname );
+ map[ placeholder ] = TQString::fromLocal8Bit( hostname );
}
else if ( placeholder == "cursor" )
{
@@ -149,11 +149,11 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare
return true;
}
-bool TemplateInterface::insertTemplateText ( uint line, uint column, const QString &templateString, const QMap<QString, QString> &initialValues, QWidget *parentWindow )
+bool TemplateInterface::insertTemplateText ( uint line, uint column, const TQString &templateString, const TQMap<TQString, TQString> &initialValues, TQWidget *parentWindow )
{
- QMap<QString, QString> enhancedInitValues( initialValues );
+ TQMap<TQString, TQString> enhancedInitValues( initialValues );
- QRegExp rx( "[$%]\\{([^}\\s]+)\\}" );
+ TQRegExp rx( "[$%]\\{([^}\\s]+)\\}" );
rx.setMinimal( true );
int pos = 0;
int opos = 0;
@@ -172,7 +172,7 @@ bool TemplateInterface::insertTemplateText ( uint line, uint column, const QStri
continue;
}
}
- QString placeholder = rx.cap( 1 );
+ TQString placeholder = rx.cap( 1 );
if ( ! enhancedInitValues.contains( placeholder ) )
enhancedInitValues[ placeholder ] = "";
diff --git a/interfaces/ktexteditor/templateinterface.h b/interfaces/ktexteditor/templateinterface.h
index c4cbca6b7..ec864a5e4 100644
--- a/interfaces/ktexteditor/templateinterface.h
+++ b/interfaces/ktexteditor/templateinterface.h
@@ -19,9 +19,9 @@
#ifndef __ktexteditor_templateinterface_h__
#define __ktexteditor_templateinterface_h__
-#include <qstring.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -52,12 +52,12 @@ class KTEXTEDITOR_EXPORT TemplateInterface //should be named AbstractTemplateInt
* @return true if all macros was sucessfully expanded
* @see insertTemplateText for a list of supported macros
*/
- static bool expandMacros( QMap<QString, QString> &initialValues, QWidget *parentWindow );
+ static bool expandMacros( TQMap<TQString, TQString> &initialValues, TQWidget *parentWindow );
uint templateInterfaceNumber () const;
protected:
- void setTemplateInterfaceDCOPSuffix (const QCString &suffix);
+ void setTemplateInterfaceDCOPSuffix (const TQCString &suffix);
public:
@@ -103,7 +103,7 @@ class KTEXTEDITOR_EXPORT TemplateInterface //should be named AbstractTemplateInt
* If the editor supports some kind of smart indentation, the inserted code
* should be layouted by the indenter.
*/
- bool insertTemplateText ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0);
+ bool insertTemplateText ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0);
protected:
/**
@@ -113,7 +113,7 @@ protected:
* insertTemplateText above.
* @return true if any text was inserted.
*/
- virtual bool insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0 )=0;
+ virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 )=0;
/**
* only for the interface itself - REAL PRIVATE
diff --git a/interfaces/ktexteditor/texthintinterface.h b/interfaces/ktexteditor/texthintinterface.h
index 3b5f0476d..aba23e944 100644
--- a/interfaces/ktexteditor/texthintinterface.h
+++ b/interfaces/ktexteditor/texthintinterface.h
@@ -19,8 +19,8 @@
#ifndef __ktexteditor_texthintinterface_h__
#define __ktexteditor_texthintinterface_h__
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -64,7 +64,7 @@ public:
* I you don't want a tooltip to be displayd set text to an emtpy string in a connected slot,
* otherwise set text to the string you want the editor to display
*/
- virtual void needTextHint(int line, int col, QString &text)=0;
+ virtual void needTextHint(int line, int col, TQString &text)=0;
private:
class PrivateTextHintInterface *d;
diff --git a/interfaces/ktexteditor/undodcopinterface.h b/interfaces/ktexteditor/undodcopinterface.h
index ff184fea4..b1a217036 100644
--- a/interfaces/ktexteditor/undodcopinterface.h
+++ b/interfaces/ktexteditor/undodcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
diff --git a/interfaces/ktexteditor/undointerface.cpp b/interfaces/ktexteditor/undointerface.cpp
index b0319f9c2..d19a56deb 100644
--- a/interfaces/ktexteditor/undointerface.cpp
+++ b/interfaces/ktexteditor/undointerface.cpp
@@ -45,7 +45,7 @@ UndoInterface::UndoInterface()
myUndoInterfaceNumber = globalUndoInterfaceNumber++;
d = new PrivateUndoInterface();
- QString name = "UndoInterface#" + QString::number(myUndoInterfaceNumber);
+ TQString name = "UndoInterface#" + TQString::number(myUndoInterfaceNumber);
d->interface = new UndoDCOPInterface(this, name.latin1());
}
@@ -60,7 +60,7 @@ unsigned int UndoInterface::undoInterfaceNumber () const
return myUndoInterfaceNumber;
}
-void UndoInterface::setUndoInterfaceDCOPSuffix (const QCString &suffix)
+void UndoInterface::setUndoInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("UndoInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/undointerface.h b/interfaces/ktexteditor/undointerface.h
index 73146107e..e0fc77107 100644
--- a/interfaces/ktexteditor/undointerface.h
+++ b/interfaces/ktexteditor/undointerface.h
@@ -40,7 +40,7 @@ class KTEXTEDITOR_EXPORT UndoInterface
unsigned int undoInterfaceNumber () const;
protected:
- void setUndoInterfaceDCOPSuffix (const QCString &suffix);
+ void setUndoInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/ktexteditor/variableinterface.h b/interfaces/ktexteditor/variableinterface.h
index 84ed6013e..3df389b09 100644
--- a/interfaces/ktexteditor/variableinterface.h
+++ b/interfaces/ktexteditor/variableinterface.h
@@ -50,7 +50,7 @@ class KTEXTEDITOR_EXPORT VariableInterface
* @return the value of the variable @p name, or an empty string if the
* variable is not set or has no value.
*/
- virtual QString variable( const QString &name ) const = 0;
+ virtual TQString variable( const TQString &name ) const = 0;
//
// signals!!
@@ -59,7 +59,7 @@ class KTEXTEDITOR_EXPORT VariableInterface
/**
* Signal: emitted when a variable is set
*/
- virtual void variableChanged( const QString &variable, const QString &value ) = 0;
+ virtual void variableChanged( const TQString &variable, const TQString &value ) = 0;
private:
static unsigned int globalVariableInterfaceNumber;
diff --git a/interfaces/ktexteditor/view.h b/interfaces/ktexteditor/view.h
index e05dac5c7..caa14d021 100644
--- a/interfaces/ktexteditor/view.h
+++ b/interfaces/ktexteditor/view.h
@@ -19,7 +19,7 @@
#ifndef __ktexteditor_view_h__
#define __ktexteditor_view_h__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kxmlguiclient.h>
namespace KTextEditor
@@ -29,7 +29,7 @@ namespace KTextEditor
* The View class represents a single view of a Document .
*/
-class KTEXTEDITOR_EXPORT View : public QWidget, public KXMLGUIClient
+class KTEXTEDITOR_EXPORT View : public TQWidget, public KXMLGUIClient
{
friend class PrivateView;
@@ -39,7 +39,7 @@ class KTEXTEDITOR_EXPORT View : public QWidget, public KXMLGUIClient
/**
* Create a new view to the given document. The document must be non-null.
*/
- View ( class Document *, QWidget *parent, const char *name = 0 );
+ View ( class Document *, TQWidget *parent, const char *name = 0 );
virtual ~View ();
/**
@@ -50,7 +50,7 @@ class KTEXTEDITOR_EXPORT View : public QWidget, public KXMLGUIClient
/**
* Returns the DCOP suffix to allow identification of this view's DCOP interface.
*/
- QCString viewDCOPSuffix () const;
+ TQCString viewDCOPSuffix () const;
/**
* Acess the parent Document.
diff --git a/interfaces/ktexteditor/viewcursordcopinterface.cpp b/interfaces/ktexteditor/viewcursordcopinterface.cpp
index e6235ac9a..f26385414 100644
--- a/interfaces/ktexteditor/viewcursordcopinterface.cpp
+++ b/interfaces/ktexteditor/viewcursordcopinterface.cpp
@@ -1,7 +1,7 @@
#include "viewcursordcopinterface.h"
#include "viewcursorinterface.h"
-#include <qpoint.h>
+#include <tqpoint.h>
#include <dcopclient.h>
using namespace KTextEditor;
@@ -22,7 +22,7 @@ uint ViewCursorDCOPInterface::viewCursorInterfaceNumber ()
return m_parent->viewCursorInterfaceNumber ();
}
-::QPoint ViewCursorDCOPInterface::cursorCoordinates ()
+::TQPoint ViewCursorDCOPInterface::cursorCoordinates ()
{
return m_parent->cursorCoordinates ();
}
diff --git a/interfaces/ktexteditor/viewcursordcopinterface.h b/interfaces/ktexteditor/viewcursordcopinterface.h
index 9dd974a7d..4bae0b520 100644
--- a/interfaces/ktexteditor/viewcursordcopinterface.h
+++ b/interfaces/ktexteditor/viewcursordcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
@@ -38,7 +38,7 @@ namespace KTextEditor
/**
* Get the current cursor coordinates in pixels.
*/
- class QPoint cursorCoordinates ();
+ class TQPoint cursorCoordinates ();
/**
* Get the cursor position
diff --git a/interfaces/ktexteditor/viewcursorinterface.cpp b/interfaces/ktexteditor/viewcursorinterface.cpp
index 5e9503984..0c834be42 100644
--- a/interfaces/ktexteditor/viewcursorinterface.cpp
+++ b/interfaces/ktexteditor/viewcursorinterface.cpp
@@ -45,7 +45,7 @@ ViewCursorInterface::ViewCursorInterface()
myViewCursorInterfaceNumber = globalViewCursorInterfaceNumber++;
d = new PrivateViewCursorInterface();
- QString name = "ViewCursorInterface#" + QString::number(myViewCursorInterfaceNumber);
+ TQString name = "ViewCursorInterface#" + TQString::number(myViewCursorInterfaceNumber);
d->interface = new ViewCursorDCOPInterface(this, name.latin1());
}
@@ -60,7 +60,7 @@ unsigned int ViewCursorInterface::viewCursorInterfaceNumber () const
return myViewCursorInterfaceNumber;
}
-void ViewCursorInterface::setViewCursorInterfaceDCOPSuffix (const QCString &suffix)
+void ViewCursorInterface::setViewCursorInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("ViewCursorInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/viewcursorinterface.h b/interfaces/ktexteditor/viewcursorinterface.h
index 05a427bae..0264f5177 100644
--- a/interfaces/ktexteditor/viewcursorinterface.h
+++ b/interfaces/ktexteditor/viewcursorinterface.h
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT ViewCursorInterface
unsigned int viewCursorInterfaceNumber () const;
protected:
- void setViewCursorInterfaceDCOPSuffix (const QCString &suffix);
+ void setViewCursorInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
@@ -50,7 +50,7 @@ class KTEXTEDITOR_EXPORT ViewCursorInterface
/**
* Get the current cursor coordinates in pixels.
*/
- virtual class QPoint cursorCoordinates () = 0;
+ virtual class TQPoint cursorCoordinates () = 0;
/**
* Get the cursor position
diff --git a/interfaces/ktexteditor/viewstatusmsgdcopinterface.cpp b/interfaces/ktexteditor/viewstatusmsgdcopinterface.cpp
index 4cd2c6c2d..d38b9b938 100644
--- a/interfaces/ktexteditor/viewstatusmsgdcopinterface.cpp
+++ b/interfaces/ktexteditor/viewstatusmsgdcopinterface.cpp
@@ -1,7 +1,7 @@
#include "viewstatusmsgdcopinterface.h"
#include "viewstatusmsginterface.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <dcopclient.h>
using namespace KTextEditor;
@@ -22,7 +22,7 @@ uint ViewStatusMsgDCOPInterface::viewStatusMsgInterfaceNumber ()
return m_parent->viewStatusMsgInterfaceNumber ();
}
-void ViewStatusMsgDCOPInterface::viewStatusMsg (QString msg)
+void ViewStatusMsgDCOPInterface::viewStatusMsg (TQString msg)
{
m_parent->viewStatusMsg(msg);
}
diff --git a/interfaces/ktexteditor/viewstatusmsgdcopinterface.h b/interfaces/ktexteditor/viewstatusmsgdcopinterface.h
index 45d5507d3..b4c5cf72e 100644
--- a/interfaces/ktexteditor/viewstatusmsgdcopinterface.h
+++ b/interfaces/ktexteditor/viewstatusmsgdcopinterface.h
@@ -3,8 +3,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
//#include "editdcopinterface.moc"
namespace KTextEditor
{
@@ -34,7 +34,7 @@ namespace KTextEditor
virtual ~ViewStatusMsgDCOPInterface();
k_dcop:
uint viewStatusMsgInterfaceNumber ();
- void viewStatusMsg (class QString msg) ;
+ void viewStatusMsg (class TQString msg) ;
private:
ViewStatusMsgInterface *m_parent;
diff --git a/interfaces/ktexteditor/viewstatusmsginterface.cpp b/interfaces/ktexteditor/viewstatusmsginterface.cpp
index d519678eb..ff0815c89 100644
--- a/interfaces/ktexteditor/viewstatusmsginterface.cpp
+++ b/interfaces/ktexteditor/viewstatusmsginterface.cpp
@@ -22,7 +22,7 @@
#include "viewstatusmsgdcopinterface.h"
#include "view.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace KTextEditor
{
@@ -47,7 +47,7 @@ ViewStatusMsgInterface::ViewStatusMsgInterface()
myViewStatusMsgInterfaceNumber = globalViewStatusMsgInterfaceNumber++;
d = new PrivateViewStatusMsgInterface();
- ::QString name = "ViewStatusMsgInterface#" + ::QString::number(myViewStatusMsgInterfaceNumber);
+ ::TQString name = "ViewStatusMsgInterface#" + ::TQString::number(myViewStatusMsgInterfaceNumber);
d->interface = new ViewStatusMsgDCOPInterface(this, name.latin1());
}
@@ -62,7 +62,7 @@ unsigned int ViewStatusMsgInterface::viewStatusMsgInterfaceNumber () const
return myViewStatusMsgInterfaceNumber;
}
-void ViewStatusMsgInterface::setViewStatusMsgInterfaceDCOPSuffix (const QCString &suffix)
+void ViewStatusMsgInterface::setViewStatusMsgInterfaceDCOPSuffix (const TQCString &suffix)
{
d->interface->setObjId ("ViewStatusMsgInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/viewstatusmsginterface.h b/interfaces/ktexteditor/viewstatusmsginterface.h
index 9c49cab1c..667494277 100644
--- a/interfaces/ktexteditor/viewstatusmsginterface.h
+++ b/interfaces/ktexteditor/viewstatusmsginterface.h
@@ -41,13 +41,13 @@ class KTEXTEDITOR_EXPORT ViewStatusMsgInterface
unsigned int viewStatusMsgInterfaceNumber () const;
protected:
- void setViewStatusMsgInterfaceDCOPSuffix (const QCString &suffix);
+ void setViewStatusMsgInterfaceDCOPSuffix (const TQCString &suffix);
//
// signals !!!
//
public:
- virtual void viewStatusMsg (const class QString &msg) = 0;
+ virtual void viewStatusMsg (const class TQString &msg) = 0;
private:
diff --git a/interfaces/ktexteditor/wordwrapinterface.cpp b/interfaces/ktexteditor/wordwrapinterface.cpp
index 9bf01ecff..3afe5c230 100644
--- a/interfaces/ktexteditor/wordwrapinterface.cpp
+++ b/interfaces/ktexteditor/wordwrapinterface.cpp
@@ -56,7 +56,7 @@ unsigned int WordWrapInterface::wordWrapInterfaceNumber () const
return myWordWrapInterfaceNumber;
}
-void WordWrapInterface::setWordWrapInterfaceDCOPSuffix (const QCString &/*suffix*/)
+void WordWrapInterface::setWordWrapInterfaceDCOPSuffix (const TQCString &/*suffix*/)
{
//d->interface->setObjId ("WordWrapInterface#"+suffix);
}
diff --git a/interfaces/ktexteditor/wordwrapinterface.h b/interfaces/ktexteditor/wordwrapinterface.h
index 81fbb2efa..0ececa7f5 100644
--- a/interfaces/ktexteditor/wordwrapinterface.h
+++ b/interfaces/ktexteditor/wordwrapinterface.h
@@ -41,7 +41,7 @@ class KTEXTEDITOR_EXPORT WordWrapInterface
unsigned int wordWrapInterfaceNumber () const;
protected:
- void setWordWrapInterfaceDCOPSuffix (const QCString &suffix);
+ void setWordWrapInterfaceDCOPSuffix (const TQCString &suffix);
//
// slots !!!
diff --git a/interfaces/terminal/kde_terminal_interface.h b/interfaces/terminal/kde_terminal_interface.h
index a60c2d70c..c8d383205 100644
--- a/interfaces/terminal/kde_terminal_interface.h
+++ b/interfaces/terminal/kde_terminal_interface.h
@@ -32,11 +32,11 @@ class QStrList;
*
* Note that besides the functions below here, KonsolePart also has
* some signals you can connect to. They aren't in this class cause
- * we can't have signals without having a QObject, which
+ * we can't have signals without having a TQObject, which
* TerminalInterface is not.
* These are the signals you can connect to:
* void processExited( KProcess *process );
- * void receivedData( const QString& s );
+ * void receivedData( const TQString& s );
* See the example code below for how to connect to these..
*
* The process provided by processExited() is obviously exited,
@@ -54,7 +54,7 @@ class QStrList;
* };
* // fetch the part..
* KParts::Part* p = static_cast<KParts::Part*>(
- * factory->create( this, "tralala", "QObject",
+ * factory->create( this, "tralala", "TQObject",
* "KParts::ReadOnlyPart" ) );
* assert( p );
* setCentralWidget( p->widget() );
@@ -71,16 +71,16 @@ class QStrList;
* return;
* };
* // now use the interface in all sorts of ways, e.g.
- * // t->showShellInDir( QDir::home().path() );
+ * // t->showShellInDir( TQDir::home().path() );
* // or:
- * // QStrList l;
+ * // TQStrList l;
* // l.append( "python" );
- * // t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l);
+ * // t->startProgram( TQString::fromUtf8( "/usr/bin/python" ), l);
* // or connect to one of the signals. Connect to the Part object,
- * // not to the TerminalInterface, since the latter is no QObject,
+ * // not to the TerminalInterface, since the latter is no TQObject,
* // and as such cannot have signals..:
- * // connect( p, SIGNAL( processExited( int ) ),
- * // this, SLOT( shellExited( int ) ) );
+ * // connect( p, TQT_SIGNAL( processExited( int ) ),
+ * // this, TQT_SLOT( shellExited( int ) ) );
* // etc.
*
* \endcode
@@ -95,20 +95,20 @@ public:
/**
* This starts @p program, with arguments @p args
*/
- virtual void startProgram( const QString& program,
- const QStrList& args ) = 0;
+ virtual void startProgram( const TQString& program,
+ const TQStrList& args ) = 0;
/**
* If a shell is currently shown, this sends it a cd
* command. Otherwise, this starts a shell, and sends it a cd
* command too...
*/
- virtual void showShellInDir( const QString& dir ) = 0;
+ virtual void showShellInDir( const TQString& dir ) = 0;
/**
* This sends @param text as input to the currently running
* program..
*/
- virtual void sendInput( const QString& text ) = 0;
+ virtual void sendInput( const TQString& text ) = 0;
};
@@ -132,20 +132,20 @@ public:
/**
* This starts @p program, with arguments @p args
*/
- virtual void startProgram( const QString& program,
- const QStrList& args ) = 0;
+ virtual void startProgram( const TQString& program,
+ const TQStrList& args ) = 0;
/**
* If a shell is currently shown, this sends it a cd
* command. Otherwise, this starts a shell, and sends it a cd
* command too...
*/
- virtual void showShellInDir( const QString& dir ) = 0;
+ virtual void showShellInDir( const TQString& dir ) = 0;
/**
* This sends @param text as input to the currently running
* program..
*/
- virtual void sendInput( const QString& text ) = 0;
+ virtual void sendInput( const TQString& text ) = 0;
/**
Call this to disable the automatic shell that
diff --git a/interfaces/terminal/test/main.cc b/interfaces/terminal/test/main.cc
index 7d5859e57..be3f4165e 100644
--- a/interfaces/terminal/test/main.cc
+++ b/interfaces/terminal/test/main.cc
@@ -6,7 +6,7 @@
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
#include <kmessagebox.h>
#include <cassert>
@@ -17,17 +17,17 @@ Win::Win()
{
KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
assert( factory );
- KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "QObject", "KParts::ReadOnlyPart" ) );
+ KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) );
setCentralWidget( p->widget() );
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
- t->showShellInDir( QDir::home().path() );
-// QStrList l;
+ t->showShellInDir( TQDir::home().path() );
+// TQStrList l;
// l.append( "python" );
-// t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l );
+// t->startProgram( TQString::fromUtf8( "/usr/bin/python" ), l );
- connect( p, SIGNAL( processExited( int ) ),
- this, SLOT( pythonExited( int ) ) );
+ connect( p, TQT_SIGNAL( processExited( int ) ),
+ this, TQT_SLOT( pythonExited( int ) ) );
}
@@ -47,14 +47,14 @@ void Win::pythonExited()
{
std::cerr << "hee, " << p << std::endl;
std::cerr << ( p->qt_cast( "TerminalInterface" ) ) << std::endl;
- // KMessageBox::sorry( this, QString::fromUtf8( "Exited, status was %1" ).arg( status ) );
- disconnect(p, SIGNAL( processExited() ),
- this, SLOT( pythonExited() ));
+ // KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) );
+ disconnect(p, TQT_SIGNAL( processExited() ),
+ this, TQT_SLOT( pythonExited() ));
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
- QStrList l;
+ TQStrList l;
l.append( "echo" );
l.append( "hello world" );
- t->startProgram( QString::fromUtf8( "/bin/echo" ), l );
+ t->startProgram( TQString::fromUtf8( "/bin/echo" ), l );
}
void Win::forked()
diff --git a/kab/addressbook.cc b/kab/addressbook.cc
index 8db8fdb26..d5813237c 100644
--- a/kab/addressbook.cc
+++ b/kab/addressbook.cc
@@ -18,8 +18,8 @@
#include "addressbook.h"
#include "qconfigDB.h"
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -100,23 +100,23 @@ const int AddressBook::Entry::NoOfFields
=sizeof(AddressBook::Entry::Fields)/sizeof(AddressBook::Entry::Fields[0]);
struct QStringLess
- : public binary_function<const QString&, const QString&, bool>
+ : public binary_function<const TQString&, const TQString&, bool>
{
/** The function operator, inline. */
- bool operator()(const QString& x, const QString& y) const
+ bool operator()(const TQString& x, const TQString& y) const
{
return x < y; // make one Qt operator fit exactly
}
};
// ----- the derived map class:
-class StringKabKeyMap : public map<QString, KabKey, QStringLess>
+class StringKabKeyMap : public map<TQString, KabKey, QStringLess>
{ /* Same as map, but a class for compilation reasons. This way we do not need
* to include the QStringLess class into the addressbook header file. */
};
// ----- another derived map class:
-class KeyNameMap : public map<const char*, QString, less<const char*> >
+class KeyNameMap : public map<const char*, TQString, less<const char*> >
{ // same thing
};
@@ -132,7 +132,7 @@ KabKey::operator == (const KabKey& key) const
}
void
-KabKey::setKey(const QCString& text)
+KabKey::setKey(const TQCString& text)
{
// ###########################################################################
key=text;
@@ -153,7 +153,7 @@ AddressBook::Entry::Address::Address()
{
}
-bool AddressBook::Entry::Address::nameOfField(const char* key, QString& value)
+bool AddressBook::Entry::Address::nameOfField(const char* key, TQString& value)
{
KeyNameMap::iterator pos;
// -----
@@ -164,47 +164,47 @@ bool AddressBook::Entry::Address::nameOfField(const char* key, QString& value)
fields=new KeyNameMap;
Q_CHECK_PTR(fields);
if(!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Headline"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Position"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Organization"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Department"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Sub-Department"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Delivery Label"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("street/postal","Address"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Zipcode"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("City"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Country"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("As in addresses", "State"))).second)
{
kdDebug(KAB_KDEBUG_AREA)
@@ -217,7 +217,7 @@ bool AddressBook::Entry::Address::nameOfField(const char* key, QString& value)
<< "inserted field names." << endl;
}
#if ! defined NDEBUG
- QString name;
+ TQString name;
kdDebug(KAB_KDEBUG_AREA)
<< "AddressBook::Entry::Address::nameOfField:" << endl
<< "Created key-fieldname-map. Defined fields are:"
@@ -248,7 +248,7 @@ bool AddressBook::Entry::Address::nameOfField(const char* key, QString& value)
}
}
-bool AddressBook::Entry::nameOfField(const char* key, QString& value)
+bool AddressBook::Entry::nameOfField(const char* key, TQString& value)
{
KeyNameMap::iterator pos;
// -----
@@ -259,83 +259,83 @@ bool AddressBook::Entry::nameOfField(const char* key, QString& value)
fields=new KeyNameMap;
Q_CHECK_PTR(fields);
if(!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("person","Title"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Rank"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Formatted Name"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Name Prefix"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("First Name"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Middle Name"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Last Name"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Birthday"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Comment"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Talk Addresses"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Email Addresses"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Keywords"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Telephone Number"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("URLs"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("User Field 1"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("User Field 2"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("User Field 3"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("User Field 4"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Custom"))).second
||
!fields->insert
- (map<const char*, QString, less<const char*> >::value_type
+ (map<const char*, TQString, less<const char*> >::value_type
(Fields[counter++], i18n("Categories"))).second)
{
kdDebug(KAB_KDEBUG_AREA)
@@ -347,7 +347,7 @@ bool AddressBook::Entry::nameOfField(const char* key, QString& value)
<< "inserted field names." << endl;
}
#if ! defined NDEBUG
- QString name;
+ TQString name;
kdDebug(KAB_KDEBUG_AREA)
<< "AddressBook::Entry::nameOfField:" << endl
<< "Created key-fieldname-map. Defined fields are:" << endl;
@@ -400,8 +400,8 @@ int AddressBook::Entry::noOfAddresses() const
return addresses.size();
}
-AddressBook::AddressBook(QWidget* parent, const char* name, bool loadit)
- : QFrame(parent, name),
+AddressBook::AddressBook(TQWidget* parent, const char* name, bool loadit)
+ : TQFrame(parent, name),
config(new QConfigDB(this)),
data(new QConfigDB(this)),
entries(new StringKabKeyMap),
@@ -409,7 +409,7 @@ AddressBook::AddressBook(QWidget* parent, const char* name, bool loadit)
{
register bool GUARD; GUARD=true;
// ###########################################################################
- QString dir, filename;
+ TQString dir, filename;
bool createBackup=true;
KeyValueMap *keys;
// ----- do memory checks (do not rely on exception handling):
@@ -420,10 +420,10 @@ AddressBook::AddressBook(QWidget* parent, const char* name, bool loadit)
i18n("Out of Memory"));
kapp->quit(); // It is critical, but will possibly never happen.
}
- connect(data, SIGNAL(fileChanged()), SLOT(dataFileChanged()));
- connect(data, SIGNAL(changed(QConfigDB*)),
- SLOT(reloaded(QConfigDB*)));
- connect(config, SIGNAL(fileChanged()), SLOT(configFileChanged()));
+ connect(data, TQT_SIGNAL(fileChanged()), TQT_SLOT(dataFileChanged()));
+ connect(data, TQT_SIGNAL(changed(QConfigDB*)),
+ TQT_SLOT(reloaded(QConfigDB*)));
+ connect(config, TQT_SIGNAL(fileChanged()), TQT_SLOT(configFileChanged()));
// ----- set style:
filename = locate( "data", STD_CONFIGFILENAME);
@@ -482,7 +482,7 @@ AddressBook::AddressBook(QWidget* parent, const char* name, bool loadit)
if(createBackup)
{
// ----- create the backup file:
- QString temp=data->fileName();
+ TQString temp=data->fileName();
if(data->setFileName(temp+".backup", false, false))
{
if(!data->save())
@@ -543,14 +543,14 @@ AddressBook::ErrorCode AddressBook::getState()
// ###########################################################################
}
-AddressBook::ErrorCode AddressBook::load(const QString& filename)
+AddressBook::ErrorCode AddressBook::load(const TQString& filename)
{
// ----- Remark: Close the file if it could not be loaded!
// ###########################################################################
ErrorCode rc=NoError;
- QFileInfo newfile, oldfile;
+ TQFileInfo newfile, oldfile;
// -----
- QString fname = (filename.isEmpty()) ? data->fileName() : filename ;
+ TQString fname = (filename.isEmpty()) ? data->fileName() : filename ;
if(fname.isEmpty()) // there was never a filename set:
{
state=NoFile;
@@ -645,13 +645,13 @@ AddressBook::ErrorCode AddressBook::load(const QString& filename)
}
AddressBook::ErrorCode
-AddressBook::getListOfNames(QStringList* strings, bool reverse, bool initials)
+AddressBook::getListOfNames(TQStringList* strings, bool reverse, bool initials)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "AddressBook::getListOfNames: called.\n";
StringKabKeyMap::iterator pos;
- QString desc;
+ TQString desc;
ErrorCode rc=NoError;
ErrorCode temp;
// ----- erase the list contents:
@@ -683,7 +683,7 @@ AddressBook::getListOfNames(QStringList* strings, bool reverse, bool initials)
}
AddressBook::ErrorCode
-AddressBook::literalName(const KabKey& key, QString& text, bool rev, bool init)
+AddressBook::literalName(const KabKey& key, TQString& text, bool rev, bool init)
{
// ###########################################################################
Entry entry;
@@ -700,12 +700,12 @@ AddressBook::literalName(const KabKey& key, QString& text, bool rev, bool init)
}
AddressBook::ErrorCode
-AddressBook::literalName(const Entry& entry, QString& text, bool rev, bool init)
+AddressBook::literalName(const Entry& entry, TQString& text, bool rev, bool init)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "AddressBook::literalName: called.\n";
- QString firstname, middlename, lastname, nameprefix;
+ TQString firstname, middlename, lastname, nameprefix;
// ----- is the formatted name set?
if(!entry.fn.isEmpty())
{
@@ -848,7 +848,7 @@ AddressBook::reloaded(QConfigDB* db)
}
AddressBook::ErrorCode
-AddressBook::save(const QString& filename, bool force)
+AddressBook::save(const TQString& filename, bool force)
{
// ###########################################################################
if(filename.isEmpty())
@@ -878,10 +878,10 @@ AddressBook::save(const QString& filename, bool force)
}
bool
-AddressBook::isSameFile(const QString& a, const QString& b)
+AddressBook::isSameFile(const TQString& a, const TQString& b)
{
// ###########################################################################
- QFileInfo filea(a), fileb(b);
+ TQFileInfo filea(a), fileb(b);
// -----
return filea.absFilePath()==fileb.absFilePath();
// ###########################################################################
@@ -945,7 +945,7 @@ AddressBook::getEntry(const KabKey& key, Section*& section)
"AddressBook::getEntry: no such entry.\n";
return NoSuchEntry;
} else {
- if(data->get((QCString)ENTRY_SECTION+'/'+key.getKey(), section))
+ if(data->get((TQCString)ENTRY_SECTION+'/'+key.getKey(), section))
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"AddressBook::getEntry: done." << endl;
@@ -1251,7 +1251,7 @@ AddressBook::nextAvailEntryKey()
Section::StringSectionMap::iterator pos;
Section *section=entrySection();
KabKey key;
- QCString dummy;
+ TQCString dummy;
bool good=true;
// -----
if(section!=0)
@@ -1287,7 +1287,7 @@ AddressBook::updateMirrorMap()
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA)
<< "AddressBook::updateMirrorMap: updating mirror map.\n";
- QString key;
+ TQString key;
Entry entry;
ErrorCode ec;
KabKey kk;
@@ -1337,7 +1337,7 @@ AddressBook::makeEntryFromSection(Section* section, Entry& entry)
Entry::Address addressDummy;
int count;
// ----- create the aggregats:
- const QCString StringKeys[]= {
+ const TQCString StringKeys[]= {
"title",
"rank",
"fn",
@@ -1351,7 +1351,7 @@ AddressBook::makeEntryFromSection(Section* section, Entry& entry)
"user3",
"user4"
};
- QString* StringValues[]= {
+ TQString* StringValues[]= {
&temp.title,
&temp.rank,
&temp.fn,
@@ -1366,7 +1366,7 @@ AddressBook::makeEntryFromSection(Section* section, Entry& entry)
&temp.user4
};
const int StringKeySize=sizeof(StringKeys)/sizeof(StringKeys[0]);
- const QCString StringListKeys[]= {
+ const TQCString StringListKeys[]= {
"talk",
"emails",
"keywords",
@@ -1375,7 +1375,7 @@ AddressBook::makeEntryFromSection(Section* section, Entry& entry)
"custom",
"categories"
};
- QStringList* StringListValues[]= {
+ TQStringList* StringListValues[]= {
&temp.talk,
&temp.emails,
&temp.keywords,
@@ -1446,7 +1446,7 @@ AddressBook::ErrorCode
AddressBook::makeAddressFromMap(KeyValueMap* keys, Entry::Address& address)
{
// ###########################################################################
- const QCString Keys[]= {
+ const TQCString Keys[]= {
"headline",
"position",
"org",
@@ -1460,7 +1460,7 @@ AddressBook::makeAddressFromMap(KeyValueMap* keys, Entry::Address& address)
"country",
"state"
};
- QString* strings[]= {
+ TQString* strings[]= {
&address.headline,
&address.position,
&address.org,
@@ -1492,7 +1492,7 @@ AddressBook::makeSectionFromEntry(const Entry& entry, Section& section)
list<Entry::Address>::const_iterator addPos;
Section *addresses=0;
Section *address=0;
- QCString key; // used for creating address subsection keys
+ TQCString key; // used for creating address subsection keys
int count=0; // counts the addresses
KeyValueMap *keys;
// ----- prepare the section object:
@@ -1583,10 +1583,10 @@ AddressBook::makeSectionFromEntry(const Entry& entry, Section& section)
}
AddressBook::ErrorCode
-AddressBook::createNew(const QString& filename)
+AddressBook::createNew(const TQString& filename)
{
// ###########################################################################
- const QString KabTemplateFile=locate("data", "kab/template.kab");
+ const TQString KabTemplateFile=locate("data", "kab/template.kab");
kdDebug(KAB_KDEBUG_AREA)
<< "AddressBook::createNew: template file is \""
<< (const char*)KabTemplateFile.utf8() << "\"." << endl;
@@ -1637,11 +1637,11 @@ AddressBook::ErrorCode
AddressBook::createConfigFile()
{
// ###########################################################################
- const QString ConfigTemplateFile=locate("data", "kab/template.config");
+ const TQString ConfigTemplateFile=locate("data", "kab/template.config");
kdDebug(KAB_KDEBUG_AREA)
<< "AddressBook::createConfigFile: config template file is \""
<< (const char*)ConfigTemplateFile.utf8() << "\"." << endl;
- const QString filename= locateLocal( "data", STD_CONFIGFILENAME);
+ const TQString filename= locateLocal( "data", STD_CONFIGFILENAME);
QConfigDB db;
// -----
if(ConfigTemplateFile.isEmpty()
@@ -1689,7 +1689,7 @@ AddressBook::ErrorCode
AddressBook::loadConfigFile()
{
// ###########################################################################
- QString file = locateLocal( "data", STD_CONFIGFILENAME);
+ TQString file = locateLocal( "data", STD_CONFIGFILENAME);
if(config->setFileName(file, true, true))
{
if(config->load())
@@ -1714,7 +1714,7 @@ AddressBook::loadConfigFile()
}
AddressBook::ErrorCode
-AddressBook::makeVCardFromEntry(const Entry&, const QString&)
+AddressBook::makeVCardFromEntry(const Entry&, const TQString&)
{
// ###########################################################################
return NotImplemented;
@@ -1722,7 +1722,7 @@ AddressBook::makeVCardFromEntry(const Entry&, const QString&)
}
AddressBook::ErrorCode
-AddressBook::makeEntryFromVCard(const QString&, Entry&)
+AddressBook::makeEntryFromVCard(const TQString&, Entry&)
{
// ###########################################################################
return NotImplemented;
@@ -1737,7 +1737,7 @@ AddressBook::getStandardFileName()
// ###########################################################################
}
-QString AddressBook::phoneType(AddressBook::Telephone phone)
+TQString AddressBook::phoneType(AddressBook::Telephone phone)
{
switch(phone)
{
@@ -1770,7 +1770,7 @@ Section* AddressBook::configurationSection()
}
}
-AddressBook::ErrorCode AddressBook::Entry::get(const char* fieldname, QVariant& field)
+AddressBook::ErrorCode AddressBook::Entry::get(const char* fieldname, TQVariant& field)
{
// "title", "rank", "fn", "nameprefix", "firstname", "middlename", "lastname",
// "birthday", "comment", "talk", "emails", "keywords", "telephone",
@@ -1877,7 +1877,7 @@ AddressBook::ErrorCode AddressBook::Entry::get(const char* fieldname, QVariant&
}
AddressBook::ErrorCode AddressBook::Entry::Address::get(const char* fieldname,
- QVariant& field)
+ TQVariant& field)
{
// "headline", "position",
// "org", "orgunit", "orgsubunit",
@@ -1945,7 +1945,7 @@ AddressBook::ErrorCode AddressBook::Entry::Address::get(const char* fieldname,
Section* AddressBook::categoriesSection()
{
- const QString Predefines[]= {
+ const TQString Predefines[]= {
i18n("Business"),
i18n("Private"),
i18n("Dates") };
@@ -1975,9 +1975,9 @@ Section* AddressBook::categoriesSection()
keys=categories->getKeys();
for(size_t count=0; count<Size; ++count)
{
- QStringList values;
+ TQStringList values;
values.append(Predefines[count]);
- keys->insert(QCString().setNum(count), values);
+ keys->insert(TQCString().setNum(count), values);
}
section->add(KAB_CATEGORY_KEY, categories);
keys=section->getKeys();
@@ -1999,7 +1999,7 @@ AddressBook::ErrorCode AddressBook::categories(CategoriesMap& cat)
KeyValueMap* keys;
int key;
bool rc;
- QStringList values;
+ TQStringList values;
StringStringMap::iterator pos;
// ----- query categories section:
section=categoriesSection();
diff --git a/kab/addressbook.h b/kab/addressbook.h
index ccd2d1bc4..21766a95a 100644
--- a/kab/addressbook.h
+++ b/kab/addressbook.h
@@ -28,12 +28,12 @@ class QStringList;
class KeyNameMap;
#include <list>
-#include <qframe.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qsize.h>
-#include <qvariant.h>
-#include <qmap.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqsize.h>
+#include <tqvariant.h>
+#include <tqmap.h>
/**
* The class KabKey is used to select entries out of the database file.
@@ -49,22 +49,22 @@ public:
/**
* Get the key as a QCString
*/
- QCString getKey() const;
+ TQCString getKey() const;
/**
* Set this key
*/
- void setKey(const QCString&);
+ void setKey(const TQCString&);
protected:
/**
* The key of the in this database
*/
- QCString key;
+ TQCString key;
class KabKeyPrivate;
KabKeyPrivate *d;
};
-class CategoriesMap : public QMap<int, QString>
+class CategoriesMap : public TQMap<int, TQString>
{
};
@@ -167,7 +167,7 @@ class CategoriesMap : public QMap<int, QString>
* mirror map nedds to be changed.
*
* \par The view
- * If you display an AddressBook object (that is a derived QFrame),
+ * If you display an AddressBook object (that is a derived TQFrame),
* it may show an entry
* of the database that you might select. The entry you hand over to the method
* ::displayEntry does not need to be contained in the currently loaded file.
@@ -275,7 +275,7 @@ public:
* <DT>firstname<DT><DD>The first name. </DD>
* <DT>middlename<DT><DD>The middle name. </DD>
* <DT>lastname<DT><DD>The last name. </DD>
- * <DT>birthday<DT><DD>The birthday (a QDate). </DD>
+ * <DT>birthday<DT><DD>The birthday (a TQDate). </DD>
* <DT>comment<DT><DD>A free form comment. </DD>
* <DT>talk<DT><DD>The talk addresses (a string list). </DD>
* <DT>emails<DT><DD>The email addresses (a string list). </DD>
@@ -344,34 +344,34 @@ public:
/** Query the literal, translated name of the field given by its
key.
@return false if key is not defined */
- static bool nameOfField(const char* key, QString& value);
+ static bool nameOfField(const char* key, TQString& value);
/** Get a field by its field name. Field names are defined in
@see Fields. Since there are different file types a field
- may be represented with, a QVariant is returned. */
- ErrorCode get(const char* key, QVariant&);
+ may be represented with, a TQVariant is returned. */
+ ErrorCode get(const char* key, TQVariant&);
// ----- the following members represent the fields:
/** The headline for this address. */
- QString headline;
+ TQString headline;
/** The position of the person at this address. */
- QString position;
+ TQString position;
/** The organization of the person at this address. */
- QString org;
+ TQString org;
/** The org unit of the person at this address. */
- QString orgUnit;
+ TQString orgUnit;
/** The org subunit of the person at this address. */
- QString orgSubUnit;
+ TQString orgSubUnit;
/** The description for delivering. */
- QString deliveryLabel;
+ TQString deliveryLabel;
/** Street, with house number. */
- QString address;
+ TQString address;
/** Zip or postal code. */
- QString zip;
+ TQString zip;
/** The town. */
- QString town;
+ TQString town;
/** The country for federal states. */
- QString country;
+ TQString country;
/** The state for federal states. */
- QString state;
+ TQString state;
protected:
static KeyNameMap *fields;
};
@@ -396,38 +396,38 @@ public:
/** Query the literal, translated name of the field given by its
key.
@return false if key is not defined */
- static bool nameOfField(const char* key, QString& value);
+ static bool nameOfField(const char* key, TQString& value);
/** Get a field by its field name. Field names are defined in
@see Fields. Since there are different file types a field
- may be represented with, a QVariant is returned. */
- ErrorCode get(const char* key, QVariant&);
+ may be represented with, a TQVariant is returned. */
+ ErrorCode get(const char* key, TQVariant&);
// members:
// this parts are assumed to be unique for every entry:
- QString title; /**< The title of the person. */
- QString rank; /**< The rank of the person. */
- QString fn; /**< The formatted name of the person. */
- QString nameprefix; /**< A possibly name prefix for that person. */
- QString firstname; /**< The first name of the person. */
- QString middlename; /**< The middle name of the person. */
- QString lastname; /**< The last name of the person. */
- QDate birthday; /**< The birthday of this person. */
- QString comment; /**< The comment. */
- QStringList talk; /**< The talk addresses. */
- QStringList emails; /**< The email addresses. */
- QStringList keywords; /**< The user defined keywords for searching. */
+ TQString title; /**< The title of the person. */
+ TQString rank; /**< The rank of the person. */
+ TQString fn; /**< The formatted name of the person. */
+ TQString nameprefix; /**< A possibly name prefix for that person. */
+ TQString firstname; /**< The first name of the person. */
+ TQString middlename; /**< The middle name of the person. */
+ TQString lastname; /**< The last name of the person. */
+ TQDate birthday; /**< The birthday of this person. */
+ TQString comment; /**< The comment. */
+ TQStringList talk; /**< The talk addresses. */
+ TQStringList emails; /**< The email addresses. */
+ TQStringList keywords; /**< The user defined keywords for searching. */
/**
* Telephon numbers and types. This list contains combinations of telephone
* numbers and the types of the phones, in this order. See enum
* Telephone above.
*/
- QStringList telephone;
- QStringList URLs; /**< The home or related web pages of this person. */
- QString user1; /**< The first user-declared field. */
- QString user2; /**< The second user-declared field. */
- QString user3; /**< The third user-declared field. */
- QString user4; /**< The fourth user-declared field. */
- QStringList custom;
- QStringList categories; /**< The categories this entry is assigned to. */
+ TQStringList telephone;
+ TQStringList URLs; /**< The home or related web pages of this person. */
+ TQString user1; /**< The first user-declared field. */
+ TQString user2; /**< The second user-declared field. */
+ TQString user3; /**< The third user-declared field. */
+ TQString user4; /**< The fourth user-declared field. */
+ TQStringList custom;
+ TQStringList categories; /**< The categories this entry is assigned to. */
protected:
static KeyNameMap *fields;
};
@@ -435,7 +435,7 @@ public:
* The constructor. If \e load is true, the user standard file will
* automatically be loaded into the object.
*/
- AddressBook(QWidget* parent=0, const char* name=0, bool load=true);
+ AddressBook(TQWidget* parent=0, const char* name=0, bool load=true);
~AddressBook(); /**< The destructor. */
/**
* Get the internal state of the object.
@@ -448,14 +448,14 @@ public:
* Load the file with the given path. An empty file name reloads the
* currently opened file.
*/
- ErrorCode load(const QString& filename=QString::null);
+ ErrorCode load(const TQString& filename=TQString::null);
/**
* Save the file to the given path and file name. An empty file name saves
* to the file where the database has been read from.
* If force is true, the method will switch to r/w mode for saving and
* back.
*/
- ErrorCode save(const QString& filename=QString::null, bool force=false);
+ ErrorCode save(const TQString& filename=TQString::null, bool force=false);
/**
* Close this file.
* ::closeFile assures sure that the ::data object is reset no matter of the
@@ -511,12 +511,12 @@ public:
* name, f. a. [with reverse==true].
* If there is no entry with this key, the method returns ::NoSuchEntry.
*/
- ErrorCode literalName(const KabKey& key, QString& text,
+ ErrorCode literalName(const KabKey& key, TQString& text,
bool reverse=false, bool initials=false);
/**
* This is an overloaded method that differs only in the arguments it takes.
*/
- ErrorCode literalName(const Entry& entry, QString& text,
+ ErrorCode literalName(const Entry& entry, TQString& text,
bool reverse=false, bool initials=false);
/**
* Get the key of the item in the selector with the given index.
@@ -533,7 +533,7 @@ public:
* call this method when receiving the signal ::changed and display the list
* in the combo.
*/
- ErrorCode getListOfNames(QStringList*, bool reverse=true, bool initials=true);
+ ErrorCode getListOfNames(TQStringList*, bool reverse=true, bool initials=true);
/**
* Hand over the configuration database. Careful!
*/
@@ -560,7 +560,7 @@ public:
* empty, it creates the users standard data file. The method does not load
* the new database.
*/
- ErrorCode createNew(const QString& filename=QString::null);
+ ErrorCode createNew(const TQString& filename=TQString::null);
/**
* Creates the local configuration file. The filename is fixed to
* \c kab.config, it will be created in the local kab directory
@@ -572,25 +572,25 @@ public:
ErrorCode createConfigFile();
ErrorCode loadConfigFile(); /**< Load the local configuration file. */
// ErrorCode configureKab(); /**< Open the configuration dialog for the KabAPI. */
- // QSize sizeHint(); /**< The preferred (minimal) size of the view. */ // ni
+ // TQSize sizeHint(); /**< The preferred (minimal) size of the view. */ // ni
/**
* This method parses a vCard and creates an Entry object from it.
*/
- ErrorCode makeEntryFromVCard(const QString& card, Entry&);
+ ErrorCode makeEntryFromVCard(const TQString& card, Entry&);
/**
* This method creates a vCard string from an entry.
*/
- ErrorCode makeVCardFromEntry(const Entry& entry, const QString& card);
+ ErrorCode makeVCardFromEntry(const Entry& entry, const TQString& card);
/**
* Returns the complete path to the user standard file. An empty path
* indicates an error, but this should not happen. It is NOT ensured
* that the file exists.
*/
- QString getStandardFileName();
+ TQString getStandardFileName();
/**
* Call this to get a telephone type translated to the locale.
*/
- static QString phoneType(AddressBook::Telephone);
+ static TQString phoneType(AddressBook::Telephone);
/**
* Query the entry categories defined for this address
* book. Categories may differ between addressbooks.
@@ -604,7 +604,7 @@ public:
/**
* Query the real name of a category by its index.
*/
- ErrorCode category(int index, QString&);
+ ErrorCode category(int index, TQString&);
/**
* Query the category section. This is the "raw" storage of the defined
* categories. It is always defined (or will be created if you have an old
@@ -617,7 +617,7 @@ public:
#ifdef KDE_NO_COMPAT
private:
#endif
- QString getStandardFilename() { return getStandardFileName(); };
+ TQString getStandardFilename() { return getStandardFileName(); };
protected:
QConfigDB *config; /**< The configuration database. */
@@ -632,7 +632,7 @@ protected:
* Returns true if both pathes point to the same file.
* The method resolves relative file names to find this out.
*/
- bool isSameFile(const QString& a, const QString& b);
+ bool isSameFile(const TQString& a, const TQString& b);
/**
* Parse the section and copy its contents into \a entry.
* The method expects a subsection called \e addresses that contains a
@@ -681,7 +681,7 @@ protected:
* Set the background image. Kab will store a deep copy of the image.
* If the image is a null image nothing will be displayed.
*/
- // void setBackground(const QImage&);
+ // void setBackground(const TQImage&);
/**
* Enable or disable the background image.
*/
@@ -721,8 +721,8 @@ public slots:
// ----------------------------------------------------------------------------
signals:
void changed(); /**< The entries have changed, update the selector. */
- void setStatus(const QString&); /**< This is kab radio with the news... */
- void newFile(const QString&); /**< Notifies changes of the file name. */
+ void setStatus(const TQString&); /**< This is kab radio with the news... */
+ void newFile(const TQString&); /**< Notifies changes of the file name. */
// ############################################################################
private:
diff --git a/kab/kabapi.cc b/kab/kabapi.cc
index 0f5d76222..0cf97905c 100644
--- a/kab/kabapi.cc
+++ b/kab/kabapi.cc
@@ -33,7 +33,7 @@
using namespace std;
-KabAPI::KabAPI(QWidget* parent, const char* name)
+KabAPI::KabAPI(TQWidget* parent, const char* name)
: KDialogBase(parent, name),
book(0),
listbox(new KListBox(this)),
@@ -43,19 +43,19 @@ KabAPI::KabAPI(QWidget* parent, const char* name)
setMainWidget(listbox);
showButtonApply(false);
enableButtonSeparator(true);
- connect(listbox, SIGNAL(highlighted(int)), SLOT(entrySelected(int)));
- connect(listbox, SIGNAL(doubleClicked ( QListBoxItem * )),SLOT(slotDoubleClicked ( QListBoxItem * )));
+ connect(listbox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(entrySelected(int)));
+ connect(listbox, TQT_SIGNAL(doubleClicked ( TQListBoxItem * )),TQT_SLOT(slotDoubleClicked ( TQListBoxItem * )));
}
-void KabAPI::slotDoubleClicked ( QListBoxItem * )
+void KabAPI::slotDoubleClicked ( TQListBoxItem * )
{
accept();
}
int KabAPI::exec()
{
- QStringList names;
+ TQStringList names;
// -----
if(book==0)
{
@@ -90,8 +90,8 @@ AddressBook::ErrorCode KabAPI::init()
book=new AddressBook(0, "KABAPI::book", true); //change parent from "this" to "0" //dsweet
if(book->getState()==AddressBook::NoError)
{
- connect(book, SIGNAL(setStatus(const QString&)),
- SLOT(setStatusSlot(const QString&)));
+ connect(book, TQT_SIGNAL(setStatus(const TQString&)),
+ TQT_SLOT(setStatusSlot(const TQString&)));
return AddressBook::NoError;
} else {
return AddressBook::InternError;
@@ -152,7 +152,7 @@ AddressBook::ErrorCode KabAPI::remove(const KabKey& key)
// ############################################################################
}
-AddressBook::ErrorCode KabAPI::getEntryByName(const QString&,
+AddressBook::ErrorCode KabAPI::getEntryByName(const TQString&,
list<AddressBook::Entry>&, const int)
{
// ############################################################################
@@ -214,7 +214,7 @@ void KabAPI::entrySelected(int index)
selection=index;
}
-void KabAPI::setStatusSlot(const QString& text)
+void KabAPI::setStatusSlot(const TQString& text)
{
emit(setStatus(text));
}
diff --git a/kab/kabapi.h b/kab/kabapi.h
index 2c790ab1a..08971be77 100644
--- a/kab/kabapi.h
+++ b/kab/kabapi.h
@@ -76,10 +76,10 @@ public:
* database itselfes, as you could not query if this could be done
* without failures. Thus you have to call init before you can
* use the database.
- * @param parent The QWidget pointer to the parent widget.
+ * @param parent The TQWidget pointer to the parent widget.
* @param name The widgets name (used for debugging)
*/
- KabAPI(QWidget* parent=0, const char* name=0);
+ KabAPI(TQWidget* parent=0, const char* name=0);
/**
* You must call init before accessing the database. init opens the
* database file (usually $HOME/.kde/share/apps/kab/addressbook.database)
@@ -158,7 +158,7 @@ public:
* @param max Maximum number of returned entries.
* @return NoError if an entry is found or NoEntry.
*/
- AddressBook::ErrorCode getEntryByName(const QString& name,
+ AddressBook::ErrorCode getEntryByName(const TQString& name,
std::list<AddressBook::Entry>& entries,
const int max=5);
/**
@@ -176,7 +176,7 @@ public:
std::list<AddressBook::Entry>& entries,
const int max=5);
/**
- * Execute this dialog. This overloads QDialog::exec to fill the list box
+ * Execute this dialog. This overloads TQDialog::exec to fill the list box
* before showing.
*/
int exec();
@@ -203,13 +203,13 @@ protected slots:
/**
* Capture status messages from book.
*/
- void setStatusSlot(const QString&);
- void slotDoubleClicked ( QListBoxItem * );
+ void setStatusSlot(const TQString&);
+ void slotDoubleClicked ( TQListBoxItem * );
signals:
/**
* Send status messages.
*/
- void setStatus(const QString&);
+ void setStatus(const TQString&);
// ############################################################################
private:
class KAbAPIPrivate;
diff --git a/kab/qconfigDB.cc b/kab/qconfigDB.cc
index d6a92261f..a49388ff9 100644
--- a/kab/qconfigDB.cc
+++ b/kab/qconfigDB.cc
@@ -24,12 +24,12 @@ extern "C" {
#include <ctype.h>
}
-// #include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+// #include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
#include "qconfigDB.moc"
#include <kdebug.h>
@@ -40,7 +40,7 @@ extern "C" {
#define KAB_KDEBUG_AREA 800
-static bool isComment(QCString line)
+static bool isComment(TQCString line)
{
// ############################################################################
line=line.stripWhiteSpace();
@@ -53,13 +53,13 @@ static bool isComment(QCString line)
// ############################################################################
}
-static void tokenize(list<QCString>& res, const QCString& text, char tr, bool strict=false)
+static void tokenize(list<TQCString>& res, const TQCString& text, char tr, bool strict=false)
{
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "tokenize: called." << endl;
int eins=0, zwei=0;
- QCString teil;
+ TQCString teil;
// -----
kdDebug(GUARD, KAB_KDEBUG_AREA) << "tokenize: partening -->%" << text.data() << "<--." << endl;
res.erase(res.begin(), res.end());
@@ -95,14 +95,14 @@ static void tokenize(list<QCString>& res, const QCString& text, char tr, bool st
// ############################################################################
}
-// QCString AuthorEmailAddress; // assign your email address to this string
+// TQCString AuthorEmailAddress; // assign your email address to this string
-static QCString ReadLineFromStream(QTextStream& stream)
+static TQCString ReadLineFromStream(TQTextStream& stream)
{
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "ReadLineFromStream:: reading line." << endl;
- QCString line;
+ TQCString line;
// -----
while(!stream.eof())
{
@@ -125,7 +125,7 @@ static QCString ReadLineFromStream(QTextStream& stream)
// class implementations:
-list<QString> QConfigDB::LockFiles; // the lockfiles created by this session
+list<TQString> QConfigDB::LockFiles; // the lockfiles created by this session
KeyValueMap::KeyValueMap()
: data(new StringStringMap)
@@ -189,19 +189,19 @@ KeyValueMap::clear()
}
bool
-KeyValueMap::fill(const QString& filename, bool force, bool relax)
+KeyValueMap::fill(const TQString& filename, bool force, bool relax)
{
register bool GUARD; GUARD=false;
// ###########################################################################
- QFile file(filename);
- QCString line;
+ TQFile file(filename);
+ TQCString line;
// -----
if(file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- // We read/write utf8 strings, so we don't want that QTextStream uses local8bit
- // Latin1 means : no conversion, when giving char*s to a QTextStream. (DF)
- stream.setEncoding(QTextStream::Latin1);
+ TQTextStream stream(&file);
+ // We read/write utf8 strings, so we don't want that TQTextStream uses local8bit
+ // Latin1 means : no conversion, when giving char*s to a TQTextStream. (DF)
+ stream.setEncoding(TQTextStream::Latin1);
// -----
while(!stream.eof())
{
@@ -229,7 +229,7 @@ KeyValueMap::fill(const QString& filename, bool force, bool relax)
}
bool
-KeyValueMap::save(const QString& filename, bool force)
+KeyValueMap::save(const TQString& filename, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -237,7 +237,7 @@ KeyValueMap::save(const QString& filename, bool force)
"KeyValueMap::save: saving data to -->" <<
filename << "<--.\n";
StringStringMap::iterator pos;
- QFile file(filename);
+ TQFile file(filename);
// ----- open file, regarding existence:
if(!force)
{
@@ -250,8 +250,8 @@ KeyValueMap::save(const QString& filename, bool force)
}
if(file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::Latin1); // no conversion
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::Latin1); // no conversion
stream << "# saved by KeyValueMap object ($Revision$)" << endl;
for(pos=data->begin(); pos!=data->end(); ++pos)
{ // values do not get coded here
@@ -269,7 +269,7 @@ KeyValueMap::save(const QString& filename, bool force)
}
bool
-KeyValueMap::save(QTextStream& file, int count)
+KeyValueMap::save(TQTextStream& file, int count)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -293,7 +293,7 @@ KeyValueMap::save(QTextStream& file, int count)
bool
-KeyValueMap::erase(const QCString& key)
+KeyValueMap::erase(const TQCString& key)
{
// ###########################################################################
bool rc=(data->erase(key)>0);
@@ -312,17 +312,17 @@ KeyValueMap::empty()
bool
KeyValueMap::parseComplexString
-(const QCString& orig,
+(const TQCString& orig,
int index, // first char to parse
- QCString& result, // string without leading and trailing ".."
+ TQCString& result, // string without leading and trailing ".."
int& noOfChars) // no of chars that represented the
const // complex string in the original
{
register bool GUARD; GUARD=false;
// ###########################################################################
int first;
- QCString temp(2*orig.length());
- QCString mod;
+ TQCString temp(2*orig.length());
+ TQCString mod;
int count=1;
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"KeyValueMap::parseComplexString: parsing the string -->"
@@ -413,7 +413,7 @@ KeyValueMap::parseComplexString
}
QCString
-KeyValueMap::makeComplexString(const QCString& orig)
+KeyValueMap::makeComplexString(const TQCString& orig)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -421,7 +421,7 @@ KeyValueMap::makeComplexString(const QCString& orig)
"KeyValueMap::makeComplexString: coding the string\n -->"
<< orig <<
"<--\n into a complex string.\n";
- QCString temp(2*orig.length());
+ TQCString temp(2*orig.length());
unsigned int count;
// -----
temp+='"'; // opening bracket
@@ -466,7 +466,7 @@ KeyValueMap::makeComplexString(const QCString& orig)
}
bool
-KeyValueMap::getRaw(const QCString& key, QCString& value) const
+KeyValueMap::getRaw(const TQCString& key, TQCString& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -488,7 +488,7 @@ KeyValueMap::getRaw(const QCString& key, QCString& value) const
}
bool
-KeyValueMap::insertRaw(const QCString& key, const QCString& value, bool force)
+KeyValueMap::insertRaw(const TQCString& key, const TQCString& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -533,7 +533,7 @@ KeyValueMap::insertRaw(const QCString& key, const QCString& value, bool force)
// ascii strings:
bool
-KeyValueMap::insert(const QCString& key, const QCString& value, bool force)
+KeyValueMap::insert(const TQCString& key, const TQCString& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -554,15 +554,15 @@ KeyValueMap::insert(const QCString& key, const QCString& value, bool force)
*/
bool
-KeyValueMap::insertLine(QCString line, bool force, bool relax, bool encode)
+KeyValueMap::insertLine(TQCString line, bool force, bool relax, bool encode)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"KeyValueMap::insertLine: inserting line -->"<<line<<"<--.\n";
int index;
- QCString key;
- QCString value;
+ TQCString key;
+ TQCString value;
// ----- is the line empty or does it contain only whitespaces?
uint len = line.length();
for(index=0; isspace(line[index]) && (unsigned)index<len; ++index);
@@ -609,14 +609,14 @@ KeyValueMap::insertLine(QCString line, bool force, bool relax, bool encode)
}
bool
-KeyValueMap::get(const QCString& key, QCString& value) const
+KeyValueMap::get(const TQCString& key, TQCString& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[string]: "
"trying to get value for key \"" << key << "\" ... " << endl;
- QCString raw;
- QCString temp;
+ TQCString raw;
+ TQCString temp;
// -----
if(!getRaw(key, raw))
{
@@ -649,11 +649,11 @@ KeyValueMap::get(const QCString& key, QCString& value) const
// UNICODE strings:
bool
-KeyValueMap::insert(const QCString& key, const QString& value, bool force)
+KeyValueMap::insert(const TQCString& key, const TQString& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
- QCString v;
+ TQCString v;
// -----
v=value.utf8();
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[QString]: trying to "
@@ -666,13 +666,13 @@ KeyValueMap::insert(const QCString& key, const QString& value, bool force)
}
bool
-KeyValueMap::get(const QCString& key, QString& value) const
+KeyValueMap::get(const TQCString& key, TQString& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QString]: trying to get "
- "a QString value for key " << key << endl;
- QCString v;
+ "a TQString value for key " << key << endl;
+ TQCString v;
// ----- get string representation:
if(!get(key, v))
{
@@ -681,7 +681,7 @@ KeyValueMap::get(const QCString& key, QString& value) const
return false;
}
// ----- find its state:
- value=QString::fromUtf8(v); // is there a better way?
+ value=TQString::fromUtf8(v); // is there a better way?
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QString]: success, value"
" (in UTF8) is " << v << endl;
return true;
@@ -692,7 +692,7 @@ KeyValueMap::get(const QCString& key, QString& value) const
// bool:
bool
-KeyValueMap::insert(const QCString& key, const bool& value, bool force)
+KeyValueMap::insert(const TQCString& key, const bool& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -707,13 +707,13 @@ KeyValueMap::insert(const QCString& key, const bool& value, bool force)
bool
-KeyValueMap::get(const QCString& key, bool& value) const
+KeyValueMap::get(const TQCString& key, bool& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[bool]: trying to get "
"BOOL value for key " << key << endl;
- QCString v;
+ TQCString v;
// ----- get string representation:
if(!get(key, v))
{
@@ -748,13 +748,13 @@ KeyValueMap::get(const QCString& key, bool& value) const
// long:
bool
-KeyValueMap::insert(const QCString& key, const long& value, bool force)
+KeyValueMap::insert(const TQCString& key, const long& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[int]: trying to "
"insert value \""<<value << "\" for key\n -->"<<key<<"<--.\n";
- QCString temp;
+ TQCString temp;
// -----
temp.setNum(value);
return insert(key, temp, force);
@@ -762,13 +762,13 @@ KeyValueMap::insert(const QCString& key, const long& value, bool force)
}
bool
-KeyValueMap::get(const QCString& key, long& value) const
+KeyValueMap::get(const TQCString& key, long& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[int]: trying to get "
"INTEGER value for key " << key << endl;
- QCString v;
+ TQCString v;
bool ok;
long temp;
// -----
@@ -794,14 +794,14 @@ KeyValueMap::get(const QCString& key, long& value) const
// long int lists:
bool
-KeyValueMap::insert(const QCString& key, const list<long>& values, bool force)
+KeyValueMap::insert(const TQCString& key, const list<long>& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[long int list]: "
"trying to insert long int list into map." << endl;
- QCString temp;
- QCString value;
+ TQCString temp;
+ TQCString value;
list<long>::const_iterator pos;
// -----
for(pos=values.begin(); pos!=values.end(); ++pos)
@@ -821,7 +821,7 @@ KeyValueMap::insert(const QCString& key, const list<long>& values, bool force)
}
bool
-KeyValueMap::get(const QCString& key, list<long>& values) const
+KeyValueMap::get(const TQCString& key, list<long>& values) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -829,9 +829,9 @@ KeyValueMap::get(const QCString& key, list<long>& values) const
"to decode int list for key " << key << endl;
kdDebug(!values.empty(), KAB_KDEBUG_AREA) << "KeyValueMap::get[long int list]"
": attention - list should be empty but is not.\n";
- QCString value;
- list<QCString> tokens;
- list<QCString>::iterator pos;
+ TQCString value;
+ list<TQCString> tokens;
+ list<TQCString>::iterator pos;
long temp;
bool ok;
// -----
@@ -869,14 +869,14 @@ KeyValueMap::get(const QCString& key, list<long>& values) const
// int lists:
bool
-KeyValueMap::insert(const QCString& key, const list<int>& values, bool force)
+KeyValueMap::insert(const TQCString& key, const list<int>& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[int list]: trying to "
"insert int list into map." << endl;
- QCString temp;
- QCString value;
+ TQCString temp;
+ TQCString value;
list<int>::const_iterator pos;
// -----
for(pos=values.begin(); pos!=values.end(); ++pos)
@@ -896,7 +896,7 @@ KeyValueMap::insert(const QCString& key, const list<int>& values, bool force)
}
bool
-KeyValueMap::get(const QCString& key, list<int>& values) const
+KeyValueMap::get(const TQCString& key, list<int>& values) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -904,9 +904,9 @@ KeyValueMap::get(const QCString& key, list<int>& values) const
"decode int list for key " << key << endl;
kdDebug(!values.empty(), KAB_KDEBUG_AREA) << "KeyValueMap::get[int list]: "
"attention - list should be empty but is not.\n";
- QCString value;
- list<QCString> tokens;
- list<QCString>::iterator pos;
+ TQCString value;
+ list<TQCString> tokens;
+ list<TQCString>::iterator pos;
int temp;
bool ok;
// -----
@@ -944,13 +944,13 @@ KeyValueMap::get(const QCString& key, list<int>& values) const
// doubles:
bool
-KeyValueMap::insert(const QCString& key, const double& value, bool force)
+KeyValueMap::insert(const TQCString& key, const double& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA).form("KeyValueMap::insert[double]: trying to "
"insert value \"%f\" for key\n -->", value) << key << "<--.\n";
- QCString temp;
+ TQCString temp;
// -----
temp.setNum(value);
return insert(key, temp, force);
@@ -958,13 +958,13 @@ KeyValueMap::insert(const QCString& key, const double& value, bool force)
}
bool
-KeyValueMap::get(const QCString& key, double& value) const
+KeyValueMap::get(const TQCString& key, double& value) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[double]: trying to get "
"FLOAT value for key " << key << endl;
- QCString v;
+ TQCString v;
bool ok;
double temp;
// -----
@@ -991,7 +991,7 @@ KeyValueMap::get(const QCString& key, double& value) const
// lists of strings:
bool
-KeyValueMap::get(const QCString& key, list<QCString>& values) const
+KeyValueMap::get(const TQCString& key, list<TQCString>& values) const
{
register bool GUARD; GUARD=false;
kdDebug(!values.empty(), KAB_KDEBUG_AREA) << "KeyValueMap::get[string list]: "
@@ -1000,7 +1000,7 @@ KeyValueMap::get(const QCString& key, list<QCString>& values) const
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[string list]: trying to "
"decode string list for key " << key << endl;
- QCString raw, part, value;
+ TQCString raw, part, value;
int first=1, second=1, i;
// ----- get the string value as a whole:
if(!getRaw(key, raw))
@@ -1068,15 +1068,15 @@ KeyValueMap::get(const QCString& key, list<QCString>& values) const
}
bool
-KeyValueMap::insert(const QCString& key, const list<QCString>& values, bool force)
+KeyValueMap::insert(const TQCString& key, const list<TQCString>& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[string list]: "
"coding string list." << endl;
- QCString value="\"";
- QCString temp;
- list<QCString>::const_iterator pos;
+ TQCString value="\"";
+ TQCString temp;
+ list<TQCString>::const_iterator pos;
// ----- create coded string list:
for(pos=values.begin();
pos!=values.end();
@@ -1100,7 +1100,7 @@ KeyValueMap::insert(const QCString& key, const list<QCString>& values, bool forc
// QStrList-s:
bool
-KeyValueMap::get(const QCString& key, QStrList& values) const
+KeyValueMap::get(const TQCString& key, TQStrList& values) const
{
register bool GUARD; GUARD=false;
kdDebug(!values.isEmpty(), KAB_KDEBUG_AREA) << "KeyValueMap::get[QStrList]: "
@@ -1109,7 +1109,7 @@ KeyValueMap::get(const QCString& key, QStrList& values) const
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QStrList]: trying to "
"decode string list for key " << key << endl;
- QCString raw, part, value;
+ TQCString raw, part, value;
int first=1, second=1, i;
// ----- get the string value as a whole:
if(!getRaw(key, raw))
@@ -1176,19 +1176,19 @@ KeyValueMap::get(const QCString& key, QStrList& values) const
}
bool
-KeyValueMap::insert(const QCString& key, const QStrList& values, bool force)
+KeyValueMap::insert(const TQCString& key, const TQStrList& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"KeyValueMap::insert[QStrList]: coding string list." << endl;
- QCString value="\"";
- QCString temp;
+ TQCString value="\"";
+ TQCString temp;
unsigned int count;
// ----- create coded string list:
for(count=0; count<values.count(); ++count)
{ // create strings like "abc\efgh\eijk":
- temp=makeComplexString(((QStrList)values).at(count));
+ temp=makeComplexString(((TQStrList)values).at(count));
temp.remove(0, 1); // remove the leading "\""
temp.remove(temp.length()-1, 1); // the trailing "\""
value+=temp;
@@ -1207,7 +1207,7 @@ KeyValueMap::insert(const QCString& key, const QStrList& values, bool force)
// QStringList-s:
bool
-KeyValueMap::get(const QCString& key, QStringList& values) const
+KeyValueMap::get(const TQCString& key, TQStringList& values) const
{
register bool GUARD; GUARD=false;
kdDebug(!values.isEmpty(), KAB_KDEBUG_AREA) << "KeyValueMap::get"
@@ -1217,8 +1217,8 @@ KeyValueMap::get(const QCString& key, QStringList& values) const
/* The values are stored in a utf8-coded set of QCStrings.
This list is retrieved and converted back to Unicode strings. */
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QStringList]: trying to "
- "decode QStringList for key " << key << endl;
- QStrList temp;
+ "decode TQStringList for key " << key << endl;
+ TQStrList temp;
unsigned int count;
// ----- get the plain C strings:
if(!get(key, temp))
@@ -1231,7 +1231,7 @@ KeyValueMap::get(const QCString& key, QStringList& values) const
// ----- do the conversion:
for(count=0; count<temp.count(); ++count)
{
- values.append(QString::fromUtf8(temp.at(count)));
+ values.append(TQString::fromUtf8(temp.at(count)));
}
// -----
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QStringList]: done." << endl;
@@ -1240,16 +1240,16 @@ KeyValueMap::get(const QCString& key, QStringList& values) const
}
bool
-KeyValueMap::insert(const QCString& key, const QStringList& values, bool force)
+KeyValueMap::insert(const TQCString& key, const TQStringList& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
- "KeyValueMap::insert[QStringList]: coding QStringList." << endl;
+ "KeyValueMap::insert[QStringList]: coding TQStringList." << endl;
// The method simply creates a list of utf8-coded strings and inserts it.
- QStrList utf8strings;
+ TQStrList utf8strings;
unsigned int count;
- // ----- create QCString list:
+ // ----- create TQCString list:
for(count=0; count<values.count(); ++count)
{
utf8strings.append((*values.at(count)).utf8());
@@ -1263,15 +1263,15 @@ KeyValueMap::insert(const QCString& key, const QStringList& values, bool force)
// lists of doubles:
bool
-KeyValueMap::insert(const QCString& key, const list<double>& values, bool force)
+KeyValueMap::insert(const TQCString& key, const list<double>& values, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[double list]: trying "
"to insert double list into map." << endl;
- QCString buffer;
- // QCString value(30*values.size()); // not usable with Qt 2
- QCString value; // WORK_TO_DO: how to reserve enough space to avoid growing?
+ TQCString buffer;
+ // TQCString value(30*values.size()); // not usable with Qt 2
+ TQCString value; // WORK_TO_DO: how to reserve enough space to avoid growing?
list<double>::const_iterator pos;
// -----
for(pos=values.begin(); pos!=values.end(); ++pos)
@@ -1291,7 +1291,7 @@ KeyValueMap::insert(const QCString& key, const list<double>& values, bool force)
}
bool
-KeyValueMap::get(const QCString& key, list<double>& values) const
+KeyValueMap::get(const TQCString& key, list<double>& values) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1299,9 +1299,9 @@ KeyValueMap::get(const QCString& key, list<double>& values) const
"decode double list for key " << key << endl;
kdDebug(!values.empty(), KAB_KDEBUG_AREA) << "KeyValueMap::get[double list]: "
"attention - list should be empty but is not." << endl;
- QCString value;
- list<QCString> tokens;
- list<QCString>::iterator pos;
+ TQCString value;
+ list<TQCString> tokens;
+ list<TQCString>::iterator pos;
double temp;
bool ok;
// -----
@@ -1334,12 +1334,12 @@ KeyValueMap::get(const QCString& key, list<double>& values) const
// QDates:
bool
-KeyValueMap::insert(const QCString& key, const QDate& value, bool force)
+KeyValueMap::insert(const TQCString& key, const TQDate& value, bool force)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[QDate]: trying to "
- "insert QDate into map." << endl;
+ "insert TQDate into map." << endl;
list<long> values;
// -----
if(!value.isValid())
@@ -1358,15 +1358,15 @@ KeyValueMap::insert(const QCString& key, const QDate& value, bool force)
}
bool
-KeyValueMap::get(const QCString& key, QDate& date) const
+KeyValueMap::get(const TQCString& key, TQDate& date) const
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QDate]: trying to decode"
- " QDate for key " << key << endl;
+ " TQDate for key " << key << endl;
list<long> values;
long y, m, d;
- QDate temp;
+ TQDate temp;
// -----
if(!get(key, values))
{
@@ -1384,7 +1384,7 @@ KeyValueMap::get(const QCString& key, QDate& date) const
m=values.front(); values.pop_front();
d=values.front();
// -----
- if(y!=0 || m!=0 || d!=0) temp.setYMD(y, m, d); // avoid QDate messages
+ if(y!=0 || m!=0 || d!=0) temp.setYMD(y, m, d); // avoid TQDate messages
if(!temp.isValid() && !temp.isNull())
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
@@ -1418,7 +1418,7 @@ Section::Section(const KeyValueMap& contents)
}
bool
-Section::add(const QCString& name)
+Section::add(const TQCString& name)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1453,7 +1453,7 @@ Section::add(const QCString& name)
}
bool
-Section::add(const QCString& name, Section* section)
+Section::add(const TQCString& name, Section* section)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1471,7 +1471,7 @@ Section::add(const QCString& name, Section* section)
}
bool
-Section::find(const QCString& name, StringSectionMap::iterator& result)
+Section::find(const TQCString& name, StringSectionMap::iterator& result)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1493,7 +1493,7 @@ Section::find(const QCString& name, StringSectionMap::iterator& result)
}
bool
-Section::remove(const QCString& name)
+Section::remove(const TQCString& name)
{
// ###########################################################################
StringSectionMap::iterator pos;
@@ -1509,7 +1509,7 @@ Section::remove(const QCString& name)
}
bool
-Section::find(const QCString& name, Section*& section)
+Section::find(const TQCString& name, Section*& section)
{
// ###########################################################################
StringSectionMap::iterator pos;
@@ -1533,7 +1533,7 @@ Section::getKeys()
}
void
-Section::insertIndentSpace(QTextStream& file, int level)
+Section::insertIndentSpace(TQTextStream& file, int level)
{
// ###########################################################################
int i, j;
@@ -1547,7 +1547,7 @@ Section::insertIndentSpace(QTextStream& file, int level)
}
bool
-Section::save(QTextStream& stream, int level)
+Section::save(TQTextStream& stream, int level)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1590,13 +1590,13 @@ Section::save(QTextStream& stream, int level)
}
bool
-Section::readSection(QTextStream& file, bool finish)
+Section::readSection(TQTextStream& file, bool finish)
{
register bool GUARD; GUARD=false;
// ###########################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "Section::readSection: reading section." << endl;
- QCString line;
- QCString name;
+ TQCString line;
+ TQCString name;
Section* temp;
// -----
for(;;)
@@ -1659,7 +1659,7 @@ Section::readSection(QTextStream& file, bool finish)
}
bool
-Section::isBeginOfSection(QCString line)
+Section::isBeginOfSection(TQCString line)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1685,7 +1685,7 @@ Section::isBeginOfSection(QCString line)
}
bool
-Section::isEndOfSection(QCString line)
+Section::isEndOfSection(TQCString line)
{
register bool GUARD; GUARD=false;
// ###########################################################################
@@ -1693,7 +1693,7 @@ Section::isEndOfSection(QCString line)
<< line <<" the end of"
" a section?" << endl;
int first=1, second;
- QCString temp;
+ TQCString temp;
// -----
line=line.simplifyWhiteSpace();
if(line.isEmpty() || line.length()<2)
@@ -1726,12 +1726,12 @@ Section::isEndOfSection(QCString line)
}
QCString
-Section::nameOfSection(const QCString& line)
+Section::nameOfSection(const TQCString& line)
{
register bool GUARD; GUARD=false;
// ###########################################################################
int first=1, second;
- QCString temp;
+ TQCString temp;
// -----
temp=line.simplifyWhiteSpace();
if(temp.isEmpty() || temp.length()<=2)
@@ -1808,12 +1808,12 @@ Section::noOfSections()
// ###########################################################################
}
-QConfigDB::QConfigDB(QWidget* parent, const char* name)
- : QWidget(parent, name),
+QConfigDB::QConfigDB(TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
timer(0),
readonly(true),
locked(false),
- mtime(new QDateTime)
+ mtime(new TQDateTime)
{
// ###########################################################################
hide();
@@ -1847,13 +1847,13 @@ bool QConfigDB::invariant()
}
bool
-QConfigDB::get(const list<QCString>& key, KeyValueMap*& map)
+QConfigDB::get(const list<TQCString>& key, KeyValueMap*& map)
{
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::get: trying to get keys ... " << endl;
Section* section=&top;
- list<QCString>::const_iterator pos;
+ list<TQCString>::const_iterator pos;
// -----
if(key.empty())
{
@@ -1890,12 +1890,12 @@ QConfigDB::get()
}
bool
-QConfigDB::createSection(const list<QCString>& key)
+QConfigDB::createSection(const list<TQCString>& key)
{
// ############################################################################
Section* section=&top;
unsigned int index;
- list<QCString>::const_iterator pos;
+ list<TQCString>::const_iterator pos;
Section* thenewone;
bool rc;
// -----
@@ -1942,7 +1942,7 @@ QConfigDB::empty()
}
bool
-QConfigDB::createSection(const QCString& desc)
+QConfigDB::createSection(const TQCString& desc)
{
// ############################################################################
return createSection(stringToKeylist(desc));
@@ -1950,22 +1950,22 @@ QConfigDB::createSection(const QCString& desc)
}
bool
-QConfigDB::get(const QCString& key, KeyValueMap*& map)
+QConfigDB::get(const TQCString& key, KeyValueMap*& map)
{
// ############################################################################
return get(stringToKeylist(key), map);
// ############################################################################
}
-list<QCString>
-QConfigDB::stringToKeylist(const QCString& desc)
+list<TQCString>
+QConfigDB::stringToKeylist(const TQCString& desc)
{
register bool GUARD; GUARD=false;
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::stringToKeylist: parsing path " << desc << endl;
// ############################################################################
- list<QCString> key;
+ list<TQCString> key;
int first=0, second;
- QCString temp;
+ TQCString temp;
// -----
if(desc.isEmpty())
{
@@ -2002,7 +2002,7 @@ QConfigDB::stringToKeylist(const QCString& desc)
bool
-QConfigDB::get(const QCString& key, Section*& section)
+QConfigDB::get(const TQCString& key, Section*& section)
{
// ############################################################################
return get(stringToKeylist(key), section);
@@ -2010,13 +2010,13 @@ QConfigDB::get(const QCString& key, Section*& section)
}
bool
-QConfigDB::get(const list<QCString>& key, Section*& section)
+QConfigDB::get(const list<TQCString>& key, Section*& section)
{
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::get: searching section ... " << endl;
Section* temp=&top;
- list<QCString>::const_iterator pos;
+ list<TQCString>::const_iterator pos;
// -----
for(pos=key.begin(); pos!=key.end(); ++pos)
{
@@ -2042,24 +2042,24 @@ QConfigDB::isRO()
}
int
-QConfigDB::IsLocked(const QString& file)
+QConfigDB::IsLocked(const TQString& file)
{
register bool GUARD; GUARD=false;
// ############################################################################
- QString lockfile=file+".lock";
+ TQString lockfile=file+".lock";
int pid=-1;
// -----
- if(access(QFile::encodeName(lockfile), F_OK)==0)
+ if(access(TQFile::encodeName(lockfile), F_OK)==0)
{
- QFile f(lockfile);
+ TQFile f(lockfile);
// -----
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::IsLocked: the file\n"
<< file <<
"\nhas a lockfile.\n";
if(f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Latin1); // no conversion
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Latin1); // no conversion
// -----
stream >> pid;
if(pid==-1)
@@ -2106,16 +2106,16 @@ QConfigDB::lock()
}
bool
-QConfigDB::lock(const QString& file)
+QConfigDB::lock(const TQString& file)
{
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::lock: locking the file "
<< file << endl;
- QString lockfile=file+".lock";
- QFile f(lockfile);
+ TQString lockfile=file+".lock";
+ TQFile f(lockfile);
// -----
- if(access(QFile::encodeName(lockfile), F_OK)==0)
+ if(access(TQFile::encodeName(lockfile), F_OK)==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::lock: the file is locked by"
" another process." << endl;
@@ -2123,8 +2123,8 @@ QConfigDB::lock(const QString& file)
} else {
if(f.open(IO_WriteOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Latin1); // no conversion
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Latin1); // no conversion
// -----
stream << getpid() << endl;
f.close();
@@ -2147,8 +2147,8 @@ QConfigDB::unlock()
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::unlock: unlocking the file "
<< filename << endl;
- QString lockfile=filename+".lock";
- list<QString>::iterator pos;
+ TQString lockfile=filename+".lock";
+ list<TQString>::iterator pos;
// -----
if(!locked)
{
@@ -2156,9 +2156,9 @@ QConfigDB::unlock()
"lock the file!" << endl;
return false;
}
- if(access(QFile::encodeName(lockfile), F_OK | W_OK)==0)
+ if(access(TQFile::encodeName(lockfile), F_OK | W_OK)==0)
{
- if(::remove(QFile::encodeName(lockfile))==0)
+ if(::remove(TQFile::encodeName(lockfile))==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"QConfigDB::unlock: lockfile deleted." << endl;
@@ -2192,13 +2192,13 @@ QConfigDB::CleanLockFiles(int)
{
register bool GUARD; GUARD=false;
// ############################################################################
- list<QString>::iterator pos;
+ list<TQString>::iterator pos;
// -----
kdDebug(GUARD, KAB_KDEBUG_AREA).form("QConfigDB::CleanLockFiles: removing %i "
"remaining lockfiles.", LockFiles.size()) << endl;
for(pos=LockFiles.begin(); pos!=LockFiles.end(); ++pos)
{
- if(::remove(QFile::encodeName(*pos))==0)
+ if(::remove(TQFile::encodeName(*pos))==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
" " << *pos << " removed.\n";
@@ -2220,8 +2220,8 @@ QConfigDB::watch(bool state)
{ // start timer
if(timer==0)
{
- timer=new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(checkFileChanged()));
+ timer=new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(checkFileChanged()));
}
timer->start(1000);
} else { // stop timer
@@ -2234,7 +2234,7 @@ QConfigDB::watch(bool state)
}
bool
-QConfigDB::CheckLockFile(const QString& file)
+QConfigDB::CheckLockFile(const TQString& file)
{
register bool GUARD; GUARD=false;
// ############################################################################
@@ -2278,7 +2278,7 @@ QConfigDB::checkFileChanged()
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::checkFileChanged: no filename." << endl;
return false;
}
- QFileInfo file(filename);
+ TQFileInfo file(filename);
// -----
if(file.exists())
{
@@ -2311,7 +2311,7 @@ QConfigDB::storeFileAge()
register bool GUARD; GUARD=false;
// ############################################################################
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::storeFileAge: called." << endl;
- QFileInfo file(filename);
+ TQFileInfo file(filename);
// -----
if(file.exists())
{
@@ -2319,7 +2319,7 @@ QConfigDB::storeFileAge()
return true;
} else {
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::save: could not stat file." << endl;
- *mtime=QDateTime(); // a null date
+ *mtime=TQDateTime(); // a null date
return false;
}
// ############################################################################
@@ -2327,7 +2327,7 @@ QConfigDB::storeFileAge()
bool
-QConfigDB::setFileName(const QString& filename_, bool mustexist, bool readonly_)
+QConfigDB::setFileName(const TQString& filename_, bool mustexist, bool readonly_)
{
register bool GUARD; GUARD=false;
// ############################################################################
@@ -2347,7 +2347,7 @@ QConfigDB::setFileName(const QString& filename_, bool mustexist, bool readonly_)
// ----- remove possible stale lockfile:
if(IsLocked(filename_)!=0 && !CheckLockFile(filename_))
{ // ----- it is stale:
- if(::remove(QFile::encodeName(filename_+".lock"))==0)
+ if(::remove(TQFile::encodeName(filename_+".lock"))==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"QConfigDB::setFileName: removed stale lockfile." << endl;
@@ -2360,7 +2360,7 @@ QConfigDB::setFileName(const QString& filename_, bool mustexist, bool readonly_)
// -----
if(mustexist)
{
- if(access(QFile::encodeName(filename_), readonly_==true ? R_OK : W_OK | R_OK)==0)
+ if(access(TQFile::encodeName(filename_), readonly_==true ? R_OK : W_OK | R_OK)==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"QConfigDB::setFileName: permission granted." << endl;
@@ -2384,10 +2384,10 @@ QConfigDB::setFileName(const QString& filename_, bool mustexist, bool readonly_)
return false;
}
} else {
- if(access(QFile::encodeName(filename_), F_OK)==0)
+ if(access(TQFile::encodeName(filename_), F_OK)==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::setFileName: file exists." << endl;
- if(access(QFile::encodeName(filename_), W_OK | R_OK)==0)
+ if(access(TQFile::encodeName(filename_), W_OK | R_OK)==0)
{
kdDebug(GUARD, KAB_KDEBUG_AREA) <<
"QConfigDB::setFileName: permission granted." << endl;
@@ -2472,11 +2472,11 @@ QConfigDB::save(const char* header, bool force)
// ----- now save it:
if(!isRO())
{
- QFile file(filename);
+ TQFile file(filename);
if(file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::Latin1); // no conversion
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::Latin1); // no conversion
// -----
if(header!=0)
{
@@ -2524,13 +2524,13 @@ QConfigDB::load()
{
register bool GUARD; GUARD=false ;
// ############################################################################
- QFile file(filename);
+ TQFile file(filename);
// -----
if(file.open(IO_ReadOnly))
{
kdDebug(GUARD, KAB_KDEBUG_AREA) << "QConfigDB::load: file access OK." << endl;
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::Latin1); // no conversion
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::Latin1); // no conversion
// -----
clear();
bool rc=top.readSection(stream, false);
diff --git a/kab/qconfigDB.h b/kab/qconfigDB.h
index 7a71d901e..20698ce36 100644
--- a/kab/qconfigDB.h
+++ b/kab/qconfigDB.h
@@ -22,9 +22,9 @@ using namespace std;
#include <list>
#include <map>
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
class QTimer;
class QDate;
@@ -44,18 +44,18 @@ class QTextStream;
* it is called with.
*/
struct QCStringLess
- : public binary_function<const QCString&, const QCString&, bool>
+ : public binary_function<const TQCString&, const TQCString&, bool>
{
/**
* The function operator, inline.
*/
- bool operator()(const QCString& x, const QCString& y) const
+ bool operator()(const TQCString& x, const TQCString& y) const
{
return x < (const char*)y; // make one Qt operator fit exactly
}
};
-typedef map<QCString, QCString, QCStringLess> StringStringMap;
+typedef map<TQCString, TQCString, QCStringLess> StringStringMap;
/**
* The class KeyValueMap is used for managing key-value-pairs
@@ -63,7 +63,7 @@ typedef map<QCString, QCString, QCStringLess> StringStringMap;
* used as they are or in conjunction with the configuration
* database class.
* While the first version used the string class, this second
- * uses the QCString class.
+ * uses the TQCString class.
* The class uses pairs of methods for each datatype, they are
* called ::get and ::insert. Every overloaded version of this
* methods get the key of the settings and a reference to the
@@ -98,9 +98,9 @@ typedef map<QCString, QCString, QCStringLess> StringStringMap;
* guarantees anything, don't you?) that every value that
* has been stored by one of the member functions of the
* class like <BR>
- * <TT> insert(const QCString& key, [value&]); </TT> <BR>
+ * <TT> insert(const TQCString& key, [value&]); </TT> <BR>
* can also be retrieved using <BR>
- * <TT> get(const QCString& key, [value&]);</TT> <BR>
+ * <TT> get(const TQCString& key, [value&]);</TT> <BR>
* without being modified. <BR>
* (Please report anything that does not do so!) </LI> </OL>
* The class is used to implement the #QConfigDB class.
@@ -127,23 +127,23 @@ protected:
* Returns true if there where no errors while parsing.
* @see makeComplexString
*/
- bool parseComplexString(const QCString& orig, int index,
- QCString& result, int& noOfChars) const;
+ bool parseComplexString(const TQCString& orig, int index,
+ TQCString& result, int& noOfChars) const;
/**
* Codes a normal string into a complex string.
* @see parseComplexString
*/
- QCString makeComplexString(const QCString& orig);
+ TQCString makeComplexString(const TQCString& orig);
/**
* Inserts a complex string into the map.
* The string must be coded already, no tests are performed.
* \a if force is false, an existing value will not be overridden.
*/
- bool insertRaw(const QCString& key, const QCString& value, bool force=false);
+ bool insertRaw(const TQCString& key, const TQCString& value, bool force=false);
/**
* Retrieves the undecoded value (a complex string) of the given key.
*/
- bool getRaw(const QCString& key, QCString& value) const;
+ bool getRaw(const TQCString& key, TQCString& value) const;
// ----------------------------------------------------------------------------
public:
/**
@@ -184,181 +184,181 @@ public:
* already declared in the database and are declared again in the file.
* If \a relax is true, the value of a string may be empty.
*/
- bool fill(const QString&, bool force=false, bool relax=false);
+ bool fill(const TQString&, bool force=false, bool relax=false);
/**
* Saves the database to a file.
* Only overrides existing files if force is true.
*/
- bool save(const QString&, bool force=false);
+ bool save(const TQString&, bool force=false);
/**
* Saves contents to an already open text stream.
* \a count spaces are inserted before each line. This method is
* called when save hierarchical databases.
* @see ::QConfigDB
*/
- bool save(QTextStream& file, int count);
+ bool save(TQTextStream& file, int count);
/**
* Get the value for the key as a string.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString& key, QCString& value) const;
+ bool get(const TQCString& key, TQCString& value) const;
/**
* Insert a string value for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString& key, const QCString& value, bool force=false);
+ bool insert(const TQCString& key, const TQCString& value, bool force=false);
/**
* Insert a character pointer for the given key.
* pgcc treats character pointers as boolean objects, not as strings.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- inline bool insert(const QCString& key, const char* value, bool force=false);
+ inline bool insert(const TQCString& key, const char* value, bool force=false);
/**
* Insert a line like "key_a="Hallo!" into the map as a key-value-pair.
* If force is true existing keys will be overridden.
* If relax is true the value may be empty an empty string.
* If encode is false, the string will not be coded (do not use!).
*/
- bool insertLine(QCString, bool force=false, bool relax=false, bool encode=true);
+ bool insertLine(TQCString, bool force=false, bool relax=false, bool encode=true);
// ---------------
/**
* Get the value for the key as a long integer.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, long&) const;
+ bool get(const TQCString&, long&) const;
/**
* Insert a long integer value for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const long&, bool force=false);
+ bool insert(const TQCString&, const long&, bool force=false);
// ---------------
/**
* For insertion of UNICODE strings, a special method pair is created. The
- * data will be translated to utf8 and inserted in the map as a QCString.
+ * data will be translated to utf8 and inserted in the map as a TQCString.
* This will probably be not fast, but this methods are not suited to save
* large amounts of data. For saving anything else than UNICODE strings,
* no such conversion is needed.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, QString&) const;
+ bool get(const TQCString&, TQString&) const;
/**
* Insert a UNICODE string value for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const QString&, bool force=false);
+ bool insert(const TQCString&, const TQString&, bool force=false);
// ---------------
/**
* Get the value for the key as a double.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, double&) const;
+ bool get(const TQCString&, double&) const;
/**
* Insert a double value for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const double&, bool force=false);
+ bool insert(const TQCString&, const double&, bool force=false);
// ---------------
/**
* Get the value for the key as a boolean value.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, bool&) const;
+ bool get(const TQCString&, bool&) const;
/**
* Insert a boolean value for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const bool&, bool force=false);
+ bool insert(const TQCString&, const bool&, bool force=false);
// ---------------
/**
* Get the value for the key as a list of strings.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, list<QCString>&) const;
+ bool get(const TQCString&, list<TQCString>&) const;
/**
* Insert a list of strings for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const list<QCString>&, bool force=false);
+ bool insert(const TQCString&, const list<TQCString>&, bool force=false);
// --------------
/**
- * Get the value for the key as a QStrList.
+ * Get the value for the key as a TQStrList.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, QStrList&) const;
+ bool get(const TQCString&, TQStrList&) const;
/**
- * Insert a QStrList for the given key.
+ * Insert a TQStrList for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const QStrList&, bool force=false);
+ bool insert(const TQCString&, const TQStrList&, bool force=false);
// --------------
/**
- * Get the value for the key as a QStringList. Beware of the difference -
- * a QStringList is a list of QString objects, while QStrList handles
+ * Get the value for the key as a TQStringList. Beware of the difference -
+ * a TQStringList is a list of TQString objects, while TQStrList handles
* char* like objects.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, QStringList&) const;
+ bool get(const TQCString&, TQStringList&) const;
/**
- * Insert a QStringList for the given key.
+ * Insert a TQStringList for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const QStringList&, bool force=false);
+ bool insert(const TQCString&, const TQStringList&, bool force=false);
// --------------
/**
* Get the value for the key as a list of long integers.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, list<long>&) const;
+ bool get(const TQCString&, list<long>&) const;
/**
* Insert a list of long integers for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const list<long>&, bool force=false);
+ bool insert(const TQCString&, const list<long>&, bool force=false);
// --------------
/**
* Get the value for the key as a list of integers.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, list<int>&) const;
+ bool get(const TQCString&, list<int>&) const;
/**
* Insert a list of integers for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const list<int>&, bool force=false);
+ bool insert(const TQCString&, const list<int>&, bool force=false);
// -------------- some Qt high-level data types:
/**
- * Get the value for the key as a QDate.
+ * Get the value for the key as a TQDate.
* The value will be parsed to a integer list that must be a \e valid
- * date (see QDate documentation). \c false will be returned if the value
+ * date (see TQDate documentation). \c false will be returned if the value
* is not valid or a null date. This situation might only happen in
* manually created files, since the insert-method for QDates rejects to
* insert inalid dates, it inserts null dates instead.
- * @see get(const QCString&, QDate &)
+ * @see get(const TQCString&, TQDate &)
*/
- bool get(const QCString&, QDate &) const;
+ bool get(const TQCString&, TQDate &) const;
/**
- * Insert a QDate for the given key.
+ * Insert a TQDate for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
* \e Attention: If you insert an invalid date a null date will be used.
@@ -366,20 +366,20 @@ public:
* You will not be able to store an invalid date and retrieve it using
* ::get!
*/
- bool insert(const QCString&, const QDate&, bool force=false);
+ bool insert(const TQCString&, const TQDate&, bool force=false);
// --------------
/**
* Get the value for the key as a list of doubles.
* \a key is the key to search for, \a value is a reference to the object
* the value for the key is assigned to.
*/
- bool get(const QCString&, list<double>&) const;
+ bool get(const TQCString&, list<double>&) const;
/**
* Insert a list of doubles for the given key.
* If force is true, an existing value for this key will be overridden.
* The method returns false if the key exists and \a force is false.
*/
- bool insert(const QCString&, const list<double>&, bool force=false);
+ bool insert(const TQCString&, const list<double>&, bool force=false);
// --------------
// end of corresponding get-insert-pairs
/**
@@ -389,7 +389,7 @@ public:
/**
* Erases all key-value-pairs in the map.
*/
- bool erase(const QCString& key);
+ bool erase(const TQCString& key);
// ############################################################################
};
@@ -409,7 +409,7 @@ public:
/**
* The StringSectionMap type is defined to make the code more readable.
*/
- typedef map<QCString, Section*, QCStringLess> StringSectionMap;
+ typedef map<TQCString, Section*, QCStringLess> StringSectionMap;
// ----------------------------------------------------------------------------
protected:
/**
@@ -427,23 +427,23 @@ protected:
/**
* Insert the spaces for indention the lines of this section when saving.
*/
- void insertIndentSpace(QTextStream& file, int level);
+ void insertIndentSpace(TQTextStream& file, int level);
/**
* Check whether the string (one line of the file currently read) marks the
* beginning of a new subsection (usually [sectionname]).
*/
- bool isBeginOfSection(QCString);
+ bool isBeginOfSection(TQCString);
/**
* Check whether the string (one line of the file currently read) marks the
* end of a new subsection (usually [END]).
*/
- bool isEndOfSection(QCString);
+ bool isEndOfSection(TQCString);
/**
* Extract the name of the section from the string.
* The string must contain the line that starts the section.
* @see ::isBeginOfSection
*/
- QCString nameOfSection(const QCString&);
+ TQCString nameOfSection(const TQCString&);
// ----------------------------------------------------------------------------
public:
/**
@@ -458,23 +458,23 @@ public:
/**
* Add an empty new section.
*/
- bool add(const QCString&);
+ bool add(const TQCString&);
/**
* Add the section.
*/
- bool add(const QCString&, Section*);
+ bool add(const TQCString&, Section*);
/**
* Search for the section, returning an iterator to it.
*/
- bool find(const QCString&, StringSectionMap::iterator&);
+ bool find(const TQCString&, StringSectionMap::iterator&);
/**
* Search for the section, returning a pointer to the section object.
*/
- bool find(const QCString&, Section*&);
+ bool find(const TQCString&, Section*&);
/**
* Remove this subsection.
*/
- bool remove(const QCString&);
+ bool remove(const TQCString&);
/**
* Return the key-value-pairs of this (!) section.
*/
@@ -484,14 +484,14 @@ public:
* Level is the position in section tree depth (the hierarchy level).
* It is used for indenting.
*/
- bool save(QTextStream& stream, int level=0);
+ bool save(TQTextStream& stream, int level=0);
/**
* Read one section from the given input stream.
* The method does not expect the line that marks the begin of the
* section. If finish is false, the code does also not except the
* section to be ended with a line like [END].
*/
- bool readSection(QTextStream& file, bool finish=true);
+ bool readSection(TQTextStream& file, bool finish=true);
/**
* Clears both subsections and keys.
*/
@@ -520,7 +520,7 @@ public:
/**
* The class QConfigDB is used to manage text-based data files
* with hierarchical structure. <BR>
- * It is derived from ::QWidget, so it may be derived to display
+ * It is derived from ::TQWidget, so it may be derived to display
* its contents. The basic implementation here does not display
* anything to make it a lean class. <BR>
* Some notes about the philosophy of the configuration
@@ -561,13 +561,13 @@ protected:
/**
* A timer pointer for watching the file.
*/
- QTimer *timer;
+ TQTimer *timer;
// ----------------------------------------------------------------------------
public:
/**
* The Qt standard constructor.
*/
- QConfigDB(QWidget* parent=0, const char* name=0);
+ QConfigDB(TQWidget* parent=0, const char* name=0);
/**
* The virtual destructor.
*/
@@ -575,21 +575,21 @@ public:
/**
* Get the key-value-map for the section referenced by \a key.
*/
- bool get(const QCString& key, KeyValueMap*& map);
+ bool get(const TQCString& key, KeyValueMap*& map);
/**
* Get the key-value-map for the section referenced by \a key as key list.
*/
- bool get(const list<QCString>& key, KeyValueMap*& map);
+ bool get(const list<TQCString>& key, KeyValueMap*& map);
/**
* Get the address of the specified Section object by its path.
* Never delete the section returned to you.
*/
- bool get(const QCString& key, Section*&);
+ bool get(const TQCString& key, Section*&);
/**
* Get the address of the specified Section object by a path list.
* Never delete the section returned to you.
*/
- bool get(const list<QCString>& key, Section*&);
+ bool get(const list<TQCString>& key, Section*&);
/**
* Get the keys of the toplevel section.
*/
@@ -598,12 +598,12 @@ public:
* Create the section with this path.
* All elements of the path that do not exist are created.
*/
- bool createSection(const QCString& key);
+ bool createSection(const TQCString& key);
/**
* Create the section with a path like the path list.
* All elements of the path that do not exist are created.
*/
- bool createSection(const list<QCString>& key);
+ bool createSection(const list<TQCString>& key);
/**
* Load the file.
* @see ::setFileName
@@ -630,7 +630,7 @@ public:
* altered. Subsequent calls may be used to check if a file already
* exists.
*/
- bool setFileName(const QString& name, bool mustexist=true, bool ro=false);
+ bool setFileName(const TQString& name, bool mustexist=true, bool ro=false);
/**
* Store the modification time of the file for later check of changes.
*/
@@ -638,7 +638,7 @@ public:
/**
* Give the current filename.
*/
- QString fileName();
+ TQString fileName();
/**
* Returns if the current file name is set for read only access.
*/
@@ -661,7 +661,7 @@ public:
* locking the file, a number < zero reports an error and indicates
* that the file is locked.
*/
- static int IsLocked(const QString& fn);
+ static int IsLocked(const TQString& fn);
/**
* Check an existing lock file for its validity.
* \a fn is the name of the DATA file that is locked.
@@ -677,7 +677,7 @@ public:
* Returns false if the lockfile exists and is definitely stale or there
* is none, returns true if the lockfile seems to be really valid.
*/
- static bool CheckLockFile(const QString& filename);
+ static bool CheckLockFile(const TQString& filename);
/**
* The static method CleanLockFiles removes all files in the list
* ::LockFiles when called.
@@ -709,11 +709,11 @@ protected:
* Transform a given path into a list of strings.
* All internal path handling is done with lists.
*/
- list<QCString> stringToKeylist(const QCString&);
+ list<TQCString> stringToKeylist(const TQCString&);
/**
* The current filename.
*/
- QString filename;
+ TQString filename;
/**
* The current file opening mode.
*/
@@ -729,11 +729,11 @@ protected:
* does not exist by now.
* @see ::storeFileAge
*/
- QDateTime *mtime;
+ TQDateTime *mtime;
/**
* Lock the file.
*/
- bool lock(const QString& file);
+ bool lock(const TQString& file);
/**
* Debugging aid, called from REQUIRE and ENSURE macros when the Nana library
* is used.
@@ -743,7 +743,7 @@ protected:
* All created lockfiles are notified in this list.
* The list contains the names of the lockfiles, not of the files itselfes.
*/
- static list<QString> LockFiles;
+ static list<TQString> LockFiles;
// ----------------------------------------------------------------------------
public slots:
/**
@@ -770,9 +770,9 @@ signals:
};
// ----- inline functions:
-bool KeyValueMap::insert(const QCString& key, const char* value, bool force)
+bool KeyValueMap::insert(const TQCString& key, const char* value, bool force)
{
- return insert(key, (QCString)value, force);
+ return insert(key, (TQCString)value, force);
}
// -----
diff --git a/kabc/address.cpp b/kabc/address.cpp
index 0db0f8236..0787bcc4e 100644
--- a/kabc/address.cpp
+++ b/kabc/address.cpp
@@ -27,12 +27,12 @@
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace KABC;
-QMap<QString, QString> *Address::mISOMap = 0;
-static KStaticDeleter< QMap<QString, QString> > isoMapDeleter;
+TQMap<TQString, TQString> *Address::mISOMap = 0;
+static KStaticDeleter< TQMap<TQString, TQString> > isoMapDeleter;
Address::Address() :
mEmpty( true ), mType( 0 )
@@ -85,14 +85,14 @@ void Address::clear()
*this = Address();
}
-void Address::setId( const QString &id )
+void Address::setId( const TQString &id )
{
mEmpty = false;
mId = id;
}
-QString Address::id() const
+TQString Address::id() const
{
return mId;
}
@@ -109,9 +109,9 @@ int Address::type() const
return mType;
}
-QString Address::typeLabel() const
+TQString Address::typeLabel() const
{
- QString label;
+ TQString label;
bool first = true;
const TypeList list = typeList();
@@ -128,145 +128,145 @@ QString Address::typeLabel() const
return label;
}
-void Address::setPostOfficeBox( const QString &s )
+void Address::setPostOfficeBox( const TQString &s )
{
mEmpty = false;
mPostOfficeBox = s;
}
-QString Address::postOfficeBox() const
+TQString Address::postOfficeBox() const
{
return mPostOfficeBox;
}
-QString Address::postOfficeBoxLabel()
+TQString Address::postOfficeBoxLabel()
{
return i18n("Post Office Box");
}
-void Address::setExtended( const QString &s )
+void Address::setExtended( const TQString &s )
{
mEmpty = false;
mExtended = s;
}
-QString Address::extended() const
+TQString Address::extended() const
{
return mExtended;
}
-QString Address::extendedLabel()
+TQString Address::extendedLabel()
{
return i18n("Extended Address Information");
}
-void Address::setStreet( const QString &s )
+void Address::setStreet( const TQString &s )
{
mEmpty = false;
mStreet = s;
}
-QString Address::street() const
+TQString Address::street() const
{
return mStreet;
}
-QString Address::streetLabel()
+TQString Address::streetLabel()
{
return i18n("Street");
}
-void Address::setLocality( const QString &s )
+void Address::setLocality( const TQString &s )
{
mEmpty = false;
mLocality = s;
}
-QString Address::locality() const
+TQString Address::locality() const
{
return mLocality;
}
-QString Address::localityLabel()
+TQString Address::localityLabel()
{
return i18n("Locality");
}
-void Address::setRegion( const QString &s )
+void Address::setRegion( const TQString &s )
{
mEmpty = false;
mRegion = s;
}
-QString Address::region() const
+TQString Address::region() const
{
return mRegion;
}
-QString Address::regionLabel()
+TQString Address::regionLabel()
{
return i18n("Region");
}
-void Address::setPostalCode( const QString &s )
+void Address::setPostalCode( const TQString &s )
{
mEmpty = false;
mPostalCode = s;
}
-QString Address::postalCode() const
+TQString Address::postalCode() const
{
return mPostalCode;
}
-QString Address::postalCodeLabel()
+TQString Address::postalCodeLabel()
{
return i18n("Postal Code");
}
-void Address::setCountry( const QString &s )
+void Address::setCountry( const TQString &s )
{
mEmpty = false;
mCountry = s;
}
-QString Address::country() const
+TQString Address::country() const
{
return mCountry;
}
-QString Address::countryLabel()
+TQString Address::countryLabel()
{
return i18n("Country");
}
-void Address::setLabel( const QString &s )
+void Address::setLabel( const TQString &s )
{
mEmpty = false;
mLabel = s;
}
-QString Address::label() const
+TQString Address::label() const
{
return mLabel;
}
-QString Address::labelLabel()
+TQString Address::labelLabel()
{
return i18n("Delivery Label");
}
@@ -281,7 +281,7 @@ Address::TypeList Address::typeList()
return list;
}
-QString Address::typeLabel( int type )
+TQString Address::typeLabel( int type )
{
if ( type & Pref )
return i18n( "Preferred address", "Preferred" );
@@ -326,12 +326,12 @@ void Address::dump() const
}
-QString Address::formattedAddress( const QString &realName,
- const QString &orgaName ) const
+TQString Address::formattedAddress( const TQString &realName,
+ const TQString &orgaName ) const
{
- QString ciso;
- QString addrTemplate;
- QString ret;
+ TQString ciso;
+ TQString addrTemplate;
+ TQString ret;
// FIXME: first check for iso-country-field and prefer that one
if ( !country().isEmpty() ) {
@@ -341,7 +341,7 @@ QString Address::formattedAddress( const QString &realName,
ciso = KGlobal::locale()->country();
}
KSimpleConfig entry( locate( "locale",
- QString( "l10n/" ) + ciso + QString( "/entry.desktop" ) ) );
+ TQString( "l10n/" ) + ciso + TQString( "/entry.desktop" ) ) );
entry.setGroup( "KCM Locale" );
// decide whether this needs special business address formatting
@@ -368,10 +368,10 @@ QString Address::formattedAddress( const QString &realName,
// now add the country line if needed (formatting this time according to
// the rules of our own system country )
if ( !country().isEmpty() ) {
- KSimpleConfig entry( locate( "locale", QString( "l10n/" )
- + KGlobal::locale()->country() + QString( "/entry.desktop" ) ) );
+ KSimpleConfig entry( locate( "locale", TQString( "l10n/" )
+ + KGlobal::locale()->country() + TQString( "/entry.desktop" ) ) );
entry.setGroup( "KCM Locale" );
- QString cpos = entry.readEntry( "AddressCountryPosition" );
+ TQString cpos = entry.readEntry( "AddressCountryPosition" );
if ( "BELOW" == cpos || cpos.isEmpty() ) {
ret = ret + "\n\n" + country().upper();
} else if ( "below" == cpos ) {
@@ -386,8 +386,8 @@ QString Address::formattedAddress( const QString &realName,
return ret;
}
-bool Address::parseAddressTemplateSection( const QString &tsection,
- QString &result, const QString &realName, const QString &orgaName ) const
+bool Address::parseAddressTemplateSection( const TQString &tsection,
+ TQString &result, const TQString &realName, const TQString &orgaName ) const
{
// This method first parses and substitutes any bracketed sections and
// after that replaces any tags with their values. If a bracketed section
@@ -409,7 +409,7 @@ bool Address::parseAddressTemplateSection( const QString &tsection,
bpos2 = findBalancedBracket( result, bpos1 );
if ( -1 != bpos2 ) {
// we have balanced brackets, recursively parse:
- QString rplstr;
+ TQString rplstr;
bool purge = !parseAddressTemplateSection( result.mid( bpos1+1,
bpos2-bpos1-1 ), rplstr,
realName, orgaName );
@@ -435,11 +435,11 @@ bool Address::parseAddressTemplateSection( const QString &tsection,
// after sorting out all purge tags, we just search'n'replace the rest,
// keeping track of whether at least one tag evaluates to something.
- // The following macro needs QString for R_FIELD
+ // The following macro needs TQString for R_FIELD
// It substitutes !_P_! for empty fields so conditional tags work later
#define REPLTAG(R_TAG,R_FIELD) \
if ( result.find(R_TAG, false) != -1 ) { \
- QString rpl = R_FIELD.isEmpty() ? QString("!_P_!") : R_FIELD; \
+ TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \
result.replace( R_TAG, rpl ); \
if ( !R_FIELD.isEmpty() ) { \
ret = true; \
@@ -463,8 +463,8 @@ bool Address::parseAddressTemplateSection( const QString &tsection,
// conditional comma
fpos = result.find( KABC_FMTTAG_condcomma, 0 );
while ( -1 != fpos ) {
- QString str1 = result.mid( fpos - 5, 5 );
- QString str2 = result.mid( fpos + 2, 5 );
+ TQString str1 = result.mid( fpos - 5, 5 );
+ TQString str2 = result.mid( fpos + 2, 5 );
if ( str1 != "!_P_!" && str2 != "!_P_!" ) {
result.replace( fpos, 2, ", " );
} else {
@@ -475,8 +475,8 @@ bool Address::parseAddressTemplateSection( const QString &tsection,
// conditional whitespace
fpos = result.find( KABC_FMTTAG_condwhite, 0 );
while ( -1 != fpos ) {
- QString str1 = result.mid( fpos - 5, 5 );
- QString str2 = result.mid( fpos + 2, 5 );
+ TQString str1 = result.mid( fpos - 5, 5 );
+ TQString str2 = result.mid( fpos + 2, 5 );
if ( str1 != "!_P_!" && str2 != "!_P_!" ) {
result.replace( fpos, 2, " " );
} else {
@@ -491,7 +491,7 @@ bool Address::parseAddressTemplateSection( const QString &tsection,
return ret;
}
-int Address::findBalancedBracket( const QString &tsection, int pos ) const
+int Address::findBalancedBracket( const TQString &tsection, int pos ) const
{
int balancecounter = 0;
for( unsigned int i = pos + 1; i < tsection.length(); i++ ) {
@@ -507,28 +507,28 @@ int Address::findBalancedBracket( const QString &tsection, int pos ) const
return -1;
}
-QString Address::countryToISO( const QString &cname )
+TQString Address::countryToISO( const TQString &cname )
{
// we search a map file for translations from country names to
- // iso codes, storing caching things in a QMap for faster future
+ // iso codes, storing caching things in a TQMap for faster future
// access.
if ( !mISOMap )
- isoMapDeleter.setObject( mISOMap, new QMap<QString, QString>() );
+ isoMapDeleter.setObject( mISOMap, new TQMap<TQString, TQString>() );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
it = mISOMap->find( cname );
if ( it != mISOMap->end() )
return it.data();
- QString mapfile = KGlobal::dirs()->findResource( "data",
- QString::fromLatin1( "kabc/countrytransl.map" ) );
+ TQString mapfile = KGlobal::dirs()->findResource( "data",
+ TQString::fromLatin1( "kabc/countrytransl.map" ) );
- QFile file( mapfile );
+ TQFile file( mapfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream s( &file );
- QString strbuf = s.readLine();
+ TQTextStream s( &file );
+ TQString strbuf = s.readLine();
while( !strbuf.isEmpty() ) {
- QStringList countryInfo = QStringList::split( '\t', strbuf, true );
+ TQStringList countryInfo = TQStringList::split( '\t', strbuf, true );
if ( countryInfo[ 0 ] == cname ) {
file.close();
mISOMap->insert( cname, countryInfo[ 1 ] );
@@ -544,20 +544,20 @@ QString Address::countryToISO( const QString &cname )
return KGlobal::locale()->country();
}
-QString Address::ISOtoCountry( const QString &ISOname )
+TQString Address::ISOtoCountry( const TQString &ISOname )
{
// get country name from ISO country code (e.g. "no" -> i18n("Norway"))
if ( ISOname.simplifyWhiteSpace().isEmpty() )
- return QString::null;
+ return TQString::null;
- QString mapfile = KGlobal::dirs()->findResource( "data",
- QString::fromLatin1( "kabc/countrytransl.map" ) );
+ TQString mapfile = KGlobal::dirs()->findResource( "data",
+ TQString::fromLatin1( "kabc/countrytransl.map" ) );
- QFile file( mapfile );
+ TQFile file( mapfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream s( &file );
- QString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower();
- QString strbuf = s.readLine();
+ TQTextStream s( &file );
+ TQString searchStr = "\t" + ISOname.simplifyWhiteSpace().lower();
+ TQString strbuf = s.readLine();
int pos;
while ( !strbuf.isEmpty() ) {
if ( (pos = strbuf.find( searchStr )) != -1 ) {
@@ -572,7 +572,7 @@ QString Address::ISOtoCountry( const QString &ISOname )
return ISOname;
}
-QDataStream &KABC::operator<<( QDataStream &s, const Address &addr )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Address &addr )
{
return s << addr.mId << addr.mType << addr.mPostOfficeBox <<
addr.mExtended << addr.mStreet << addr.mLocality <<
@@ -580,7 +580,7 @@ QDataStream &KABC::operator<<( QDataStream &s, const Address &addr )
addr.mLabel;
}
-QDataStream &KABC::operator>>( QDataStream &s, Address &addr )
+TQDataStream &KABC::operator>>( TQDataStream &s, Address &addr )
{
s >> addr.mId >> addr.mType >> addr.mPostOfficeBox >> addr.mExtended >>
addr.mStreet >> addr.mLocality >> addr.mRegion >>
diff --git a/kabc/address.h b/kabc/address.h
index 9125c71be..a7c597a40 100644
--- a/kabc/address.h
+++ b/kabc/address.h
@@ -21,29 +21,29 @@
#ifndef KABC_ADDRESS_H
#define KABC_ADDRESS_H
-#include <qmap.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
// template tags for address formatting localization
-#define KABC_FMTTAG_realname QString("%n")
-#define KABC_FMTTAG_REALNAME QString("%N")
-#define KABC_FMTTAG_company QString("%cm")
-#define KABC_FMTTAG_COMPANY QString("%CM")
-#define KABC_FMTTAG_pobox QString("%p")
-#define KABC_FMTTAG_street QString("%s")
-#define KABC_FMTTAG_STREET QString("%S")
-#define KABC_FMTTAG_zipcode QString("%z")
-#define KABC_FMTTAG_location QString("%l")
-#define KABC_FMTTAG_LOCATION QString("%L")
-#define KABC_FMTTAG_region QString("%r")
-#define KABC_FMTTAG_REGION QString("%R")
-#define KABC_FMTTAG_newline QString("\\n")
-#define KABC_FMTTAG_condcomma QString("%,")
-#define KABC_FMTTAG_condwhite QString("%w")
-#define KABC_FMTTAG_purgeempty QString("%0")
+#define KABC_FMTTAG_realname TQString("%n")
+#define KABC_FMTTAG_REALNAME TQString("%N")
+#define KABC_FMTTAG_company TQString("%cm")
+#define KABC_FMTTAG_COMPANY TQString("%CM")
+#define KABC_FMTTAG_pobox TQString("%p")
+#define KABC_FMTTAG_street TQString("%s")
+#define KABC_FMTTAG_STREET TQString("%S")
+#define KABC_FMTTAG_zipcode TQString("%z")
+#define KABC_FMTTAG_location TQString("%l")
+#define KABC_FMTTAG_LOCATION TQString("%L")
+#define KABC_FMTTAG_region TQString("%r")
+#define KABC_FMTTAG_REGION TQString("%R")
+#define KABC_FMTTAG_newline TQString("\\n")
+#define KABC_FMTTAG_condcomma TQString("%,")
+#define KABC_FMTTAG_condwhite TQString("%w")
+#define KABC_FMTTAG_purgeempty TQString("%0")
namespace KABC {
@@ -54,15 +54,15 @@ namespace KABC {
*/
class KABC_EXPORT Address
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Address & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Address & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & );
public:
/**
List of addresses.
*/
- typedef QValueList<Address> List;
- typedef QValueList<int> TypeList;
+ typedef TQValueList<Address> List;
+ typedef TQValueList<int> TypeList;
/**
Address types:
@@ -106,12 +106,12 @@ class KABC_EXPORT Address
/**
Sets the unique id.
*/
- void setId( const QString & );
+ void setId( const TQString & );
/*
Returns the unique id.
*/
- QString id() const;
+ TQString id() const;
/**
Sets the type of address. See enum for definiton of types.
@@ -128,127 +128,127 @@ class KABC_EXPORT Address
/**
Returns a translated string of all types the address has.
*/
- QString typeLabel() const;
+ TQString typeLabel() const;
/**
Sets the post office box.
*/
- void setPostOfficeBox( const QString & );
+ void setPostOfficeBox( const TQString & );
/**
Returns the post office box.
*/
- QString postOfficeBox() const;
+ TQString postOfficeBox() const;
/**
Returns the translated label for post office box field.
*/
- static QString postOfficeBoxLabel();
+ static TQString postOfficeBoxLabel();
/**
Sets the extended address information.
*/
- void setExtended( const QString & );
+ void setExtended( const TQString & );
/**
Returns the extended address information.
*/
- QString extended() const;
+ TQString extended() const;
/**
Returns the translated label for extended field.
*/
- static QString extendedLabel();
+ static TQString extendedLabel();
/**
Sets the street (including number).
*/
- void setStreet( const QString & );
+ void setStreet( const TQString & );
/**
Returns the street.
*/
- QString street() const;
+ TQString street() const;
/**
Returns the translated label for street field.
*/
- static QString streetLabel();
+ static TQString streetLabel();
/**
Sets the locality, e.g. city.
*/
- void setLocality( const QString & );
+ void setLocality( const TQString & );
/**
Returns the locality.
*/
- QString locality() const;
+ TQString locality() const;
/**
Returns the translated label for locality field.
*/
- static QString localityLabel();
+ static TQString localityLabel();
/**
Sets the region, e.g. state.
*/
- void setRegion( const QString & );
+ void setRegion( const TQString & );
/**
Returns the region.
*/
- QString region() const;
+ TQString region() const;
/**
Returns the translated label for region field.
*/
- static QString regionLabel();
+ static TQString regionLabel();
/**
Sets the postal code.
*/
- void setPostalCode( const QString & );
+ void setPostalCode( const TQString & );
/**
Returns the postal code.
*/
- QString postalCode() const;
+ TQString postalCode() const;
/**
Returns the translated label for postal code field.
*/
- static QString postalCodeLabel();
+ static TQString postalCodeLabel();
/**
Sets the country.
*/
- void setCountry( const QString & );
+ void setCountry( const TQString & );
/**
Returns the country.
*/
- QString country() const;
+ TQString country() const;
/**
Returns the translated label for country field.
*/
- static QString countryLabel();
+ static TQString countryLabel();
/**
Sets the delivery label. This is the literal text to be used as label.
*/
- void setLabel( const QString & );
+ void setLabel( const TQString & );
/**
Returns the delivery label.
*/
- QString label() const;
+ TQString label() const;
/**
Returns the translated label for delivery label field.
*/
- static QString labelLabel();
+ static TQString labelLabel();
/**
Returns the list of available types.
@@ -258,7 +258,7 @@ class KABC_EXPORT Address
/**
Returns the translated label for a special type.
*/
- static QString typeLabel( int type );
+ static TQString typeLabel( int type );
/**
Used for debug output.
@@ -276,8 +276,8 @@ class KABC_EXPORT Address
@param orgaName the name of the organization or company
@return the formatted address (containing newline characters)
*/
- QString formattedAddress( const QString &realName=QString::null
- , const QString &orgaName=QString::null ) const;
+ TQString formattedAddress( const TQString &realName=TQString::null
+ , const TQString &orgaName=TQString::null ) const;
/**
Returns ISO code for a localized country name. Only localized country
@@ -286,7 +286,7 @@ class KABC_EXPORT Address
@param cname name of the country
@return two digit ISO code
*/
- static QString countryToISO( const QString &cname );
+ static TQString countryToISO( const TQString &cname );
/**
Returns a localized country name for a ISO code.
@@ -295,46 +295,46 @@ class KABC_EXPORT Address
@return localized name of the country
@since 3.2
*/
- static QString ISOtoCountry( const QString &ISOname );
+ static TQString ISOtoCountry( const TQString &ISOname );
private:
/**
Parses a snippet of an address template
@param tsection the template string to be parsed
- @param result QString reference in which the result will be stored
+ @param result TQString reference in which the result will be stored
@return true if at least one tag evaluated positively, else false
*/
- bool parseAddressTemplateSection( const QString &tsection
- , QString &result
- , const QString &realName
- , const QString &orgaName ) const;
+ bool parseAddressTemplateSection( const TQString &tsection
+ , TQString &result
+ , const TQString &realName
+ , const TQString &orgaName ) const;
/**
Finds the balanced closing bracket starting from the opening bracket at
pos in tsection.
@return position of closing bracket, -1 for unbalanced brackets
*/
- int findBalancedBracket( const QString &tsection, int pos ) const;
+ int findBalancedBracket( const TQString &tsection, int pos ) const;
bool mEmpty;
- QString mId;
+ TQString mId;
int mType;
- QString mPostOfficeBox;
- QString mExtended;
- QString mStreet;
- QString mLocality;
- QString mRegion;
- QString mPostalCode;
- QString mCountry;
- QString mLabel;
-
- static QMap<QString, QString> *mISOMap;
+ TQString mPostOfficeBox;
+ TQString mExtended;
+ TQString mStreet;
+ TQString mLocality;
+ TQString mRegion;
+ TQString mPostalCode;
+ TQString mCountry;
+ TQString mLabel;
+
+ static TQMap<TQString, TQString> *mISOMap;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Address & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Address & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Address & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Address & );
}
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 474975344..bf6d0d17a 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -43,22 +43,22 @@ struct AddressBook::AddressBookData
ErrorHandler *mErrorHandler;
KConfig *mConfig;
KRES::Manager<Resource> *mManager;
- QPtrList<Resource> mPendingLoadResources;
- QPtrList<Resource> mPendingSaveResources;
+ TQPtrList<Resource> mPendingLoadResources;
+ TQPtrList<Resource> mPendingSaveResources;
Iterator end;
};
struct AddressBook::Iterator::IteratorData
{
Resource::Iterator mIt;
- QValueList<Resource*> mResources;
+ TQValueList<Resource*> mResources;
int mCurrRes;
};
struct AddressBook::ConstIterator::ConstIteratorData
{
Resource::ConstIterator mIt;
- QValueList<Resource*> mResources;
+ TQValueList<Resource*> mResources;
int mCurrRes;
};
@@ -307,11 +307,11 @@ AddressBook::AddressBook()
d->mErrorHandler = 0;
d->mConfig = 0;
d->mManager = new KRES::Manager<Resource>( "contact" );
- d->end.d->mResources = QValueList<Resource*>();
+ d->end.d->mResources = TQValueList<Resource*>();
d->end.d->mCurrRes = -1;
}
-AddressBook::AddressBook( const QString &config )
+AddressBook::AddressBook( const TQString &config )
: d( new AddressBookData )
{
d->mErrorHandler = 0;
@@ -321,7 +321,7 @@ AddressBook::AddressBook( const QString &config )
d->mConfig = new KConfig( config );
d->mManager = new KRES::Manager<Resource>( "contact" );
d->mManager->readConfig( d->mConfig );
- d->end.d->mResources = QValueList<Resource*>();
+ d->end.d->mResources = TQValueList<Resource*>();
d->end.d->mCurrRes = -1;
}
@@ -400,7 +400,7 @@ bool AddressBook::asyncSave( Ticket *ticket )
AddressBook::Iterator AddressBook::begin()
{
- QValueList<Resource*> list;
+ TQValueList<Resource*> list;
KRES::Manager<Resource>::ActiveIterator resIt;
for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt )
list.append( *resIt );
@@ -427,7 +427,7 @@ AddressBook::Iterator AddressBook::begin()
AddressBook::ConstIterator AddressBook::begin() const
{
- QValueList<Resource*> list;
+ TQValueList<Resource*> list;
KRES::Manager<Resource>::ActiveIterator resIt;
for ( resIt = d->mManager->activeBegin(); resIt != d->mManager->activeEnd(); ++resIt )
list.append( *resIt );
@@ -527,7 +527,7 @@ void AddressBook::insertAddressee( const Addressee &a )
Addressee addr( a );
if ( !fAddr.isEmpty() ) {
if ( fAddr != a )
- addr.setRevision( QDateTime::currentDateTime() );
+ addr.setRevision( TQDateTime::currentDateTime() );
else {
if ( fAddr.resource() == 0 ) {
fAddr.setResource( resource );
@@ -566,7 +566,7 @@ AddressBook::Iterator AddressBook::find( const Addressee &a )
return end();
}
-Addressee AddressBook::findByUid( const QString &uid )
+Addressee AddressBook::findByUid( const TQString &uid )
{
KRES::Manager<Resource>::ActiveIterator it;
for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) {
@@ -589,7 +589,7 @@ Addressee::List AddressBook::allAddressees()
return list;
}
-Addressee::List AddressBook::findByName( const QString &name )
+Addressee::List AddressBook::findByName( const TQString &name )
{
Addressee::List results;
@@ -600,7 +600,7 @@ Addressee::List AddressBook::findByName( const QString &name )
return results;
}
-Addressee::List AddressBook::findByEmail( const QString &email )
+Addressee::List AddressBook::findByEmail( const TQString &email )
{
Addressee::List results;
@@ -611,7 +611,7 @@ Addressee::List AddressBook::findByEmail( const QString &email )
return results;
}
-Addressee::List AddressBook::findByCategory( const QString &category )
+Addressee::List AddressBook::findByCategory( const TQString &category )
{
Addressee::List results;
@@ -634,9 +634,9 @@ void AddressBook::dump() const
kdDebug(5700) << "AddressBook::dump() --- end ---" << endl;
}
-QString AddressBook::identifier()
+TQString AddressBook::identifier()
{
- QStringList identifier;
+ TQStringList identifier;
KRES::Manager<Resource>::ActiveIterator it;
@@ -666,15 +666,15 @@ Field::List AddressBook::fields( int category )
return result;
}
-bool AddressBook::addCustomField( const QString &label, int category,
- const QString &key, const QString &app )
+bool AddressBook::addCustomField( const TQString &label, int category,
+ const TQString &key, const TQString &app )
{
if ( d->mAllFields.isEmpty() ) {
d->mAllFields = Field::allFields();
}
- QString a = app.isNull() ? KGlobal::instance()->instanceName() : app;
- QString k = key.isNull() ? label : key;
+ TQString a = app.isNull() ? KGlobal::instance()->instanceName() : app;
+ TQString k = key.isNull() ? label : key;
Field *field = Field::createCustomField( label, category, k, a );
@@ -685,14 +685,14 @@ bool AddressBook::addCustomField( const QString &label, int category,
return true;
}
-QDataStream &KABC::operator<<( QDataStream &s, const AddressBook &ab )
+TQDataStream &KABC::operator<<( TQDataStream &s, const AddressBook &ab )
{
if (!ab.d) return s;
return s;// << ab.d->mAddressees;
}
-QDataStream &KABC::operator>>( QDataStream &s, AddressBook &ab )
+TQDataStream &KABC::operator>>( TQDataStream &s, AddressBook &ab )
{
if (!ab.d) return s;
@@ -711,15 +711,15 @@ bool AddressBook::addResource( Resource *resource )
d->mManager->add( resource );
resource->setAddressBook( this );
- connect( resource, SIGNAL( loadingFinished( Resource* ) ),
- this, SLOT( resourceLoadingFinished( Resource* ) ) );
- connect( resource, SIGNAL( savingFinished( Resource* ) ),
- this, SLOT( resourceSavingFinished( Resource* ) ) );
+ connect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) );
+ connect( resource, TQT_SIGNAL( savingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceSavingFinished( Resource* ) ) );
- connect( resource, SIGNAL( loadingError( Resource*, const QString& ) ),
- this, SLOT( resourceLoadingError( Resource*, const QString& ) ) );
- connect( resource, SIGNAL( savingError( Resource*, const QString& ) ),
- this, SLOT( resourceSavingError( Resource*, const QString& ) ) );
+ connect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) );
+ connect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) );
return true;
}
@@ -733,24 +733,24 @@ bool AddressBook::removeResource( Resource *resource )
resource->setAddressBook( 0 );
- disconnect( resource, SIGNAL( loadingFinished( Resource* ) ),
- this, SLOT( resourceLoadingFinished( Resource* ) ) );
- disconnect( resource, SIGNAL( savingFinished( Resource* ) ),
- this, SLOT( resourceSavingFinished( Resource* ) ) );
+ disconnect( resource, TQT_SIGNAL( loadingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) );
+ disconnect( resource, TQT_SIGNAL( savingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceSavingFinished( Resource* ) ) );
- disconnect( resource, SIGNAL( loadingError( Resource*, const QString& ) ),
- this, SLOT( resourceLoadingError( Resource*, const QString& ) ) );
- disconnect( resource, SIGNAL( savingError( Resource*, const QString& ) ),
- this, SLOT( resourceLoadingError( Resource*, const QString& ) ) );
+ disconnect( resource, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) );
+ disconnect( resource, TQT_SIGNAL( savingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) );
d->mManager->remove( resource );
return true;
}
-QPtrList<Resource> AddressBook::resources()
+TQPtrList<Resource> AddressBook::resources()
{
- QPtrList<Resource> list;
+ TQPtrList<Resource> list;
KRES::Manager<Resource>::ActiveIterator it;
for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) {
@@ -769,7 +769,7 @@ void AddressBook::setErrorHandler( ErrorHandler *handler )
d->mErrorHandler = handler;
}
-void AddressBook::error( const QString& msg )
+void AddressBook::error( const TQString& msg )
{
if ( !d->mErrorHandler ) // create default error handler
d->mErrorHandler = new ConsoleErrorHandler;
@@ -825,7 +825,7 @@ void AddressBook::resourceSavingFinished( Resource *res )
emit savingFinished( res );
}
-void AddressBook::resourceLoadingError( Resource *res, const QString &errMsg )
+void AddressBook::resourceLoadingError( Resource *res, const TQString &errMsg )
{
error( errMsg );
@@ -834,7 +834,7 @@ void AddressBook::resourceLoadingError( Resource *res, const QString &errMsg )
emit addressBookChanged( this );
}
-void AddressBook::resourceSavingError( Resource *res, const QString &errMsg )
+void AddressBook::resourceSavingError( Resource *res, const TQString &errMsg )
{
error( errMsg );
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index d12130201..0da25b30e 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -21,8 +21,8 @@
#ifndef KABC_ADDRESSBOOK_H
#define KABC_ADDRESSBOOK_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kresources/manager.h>
@@ -44,8 +44,8 @@ class KABC_EXPORT AddressBook : public QObject
{
Q_OBJECT
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const AddressBook & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, AddressBook & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & );
friend class StdAddressBook;
public:
@@ -115,7 +115,7 @@ class KABC_EXPORT AddressBook : public QObject
@param config The config file which contains the resource settings.
*/
- AddressBook( const QString &config );
+ AddressBook( const TQString &config );
/**
Destructor.
@@ -244,7 +244,7 @@ class KABC_EXPORT AddressBook : public QObject
@return The addressee with the specified unique identifier or an
empty addressee.
*/
- Addressee findByUid( const QString &uid ); // KDE4: const
+ Addressee findByUid( const TQString &uid ); // KDE4: const
/**
Returns a list of all addressees in the address book.
@@ -257,7 +257,7 @@ class KABC_EXPORT AddressBook : public QObject
@param name The name you are looking for.
@return A list of all matching addressees.
*/
- Addressee::List findByName( const QString &name ); // KDE4: const
+ Addressee::List findByName( const TQString &name ); // KDE4: const
/**
Searches all addressees which match the specified email address.
@@ -265,7 +265,7 @@ class KABC_EXPORT AddressBook : public QObject
@param email The email address you are looking for.
@return A list of all matching addressees.
*/
- Addressee::List findByEmail( const QString &email ); // KDE4: const
+ Addressee::List findByEmail( const TQString &email ); // KDE4: const
/**
Searches all addressees which belongs to the specified category.
@@ -273,13 +273,13 @@ class KABC_EXPORT AddressBook : public QObject
@param category The category you are looking for.
@return A list of all matching addressees.
*/
- Addressee::List findByCategory( const QString &category ); // KDE4: const
+ Addressee::List findByCategory( const TQString &category ); // KDE4: const
/**
Returns a string identifying this addressbook. The identifier is
created by concatenation of the resource identifiers.
*/
- virtual QString identifier(); // KDE4: const
+ virtual TQString identifier(); // KDE4: const
/**
Returns a list of all Fields known to the address book which are associated
@@ -296,9 +296,9 @@ class KABC_EXPORT AddressBook : public QObject
@param app String used as application key for reading and writing
the field.
*/
- bool addCustomField( const QString &label, int category = Field::All,
- const QString &key = QString::null,
- const QString &app = QString::null );
+ bool addCustomField( const TQString &label, int category = Field::All,
+ const TQString &key = TQString::null,
+ const TQString &app = TQString::null );
/**
Adds a resource to the address book.
@@ -319,7 +319,7 @@ class KABC_EXPORT AddressBook : public QObject
/**
Returns a list of all resources.
*/
- QPtrList<Resource> resources(); // KDE4: const
+ TQPtrList<Resource> resources(); // KDE4: const
/**
Sets the @p ErrorHandler, that is used by error() to
@@ -334,7 +334,7 @@ class KABC_EXPORT AddressBook : public QObject
@param msg The error message that shall be displayed.
*/
- void error( const QString &msg );
+ void error( const TQString &msg );
/**
@deprecated There is no need to call this function anymore.
@@ -408,8 +408,8 @@ class KABC_EXPORT AddressBook : public QObject
protected slots:
void resourceLoadingFinished( Resource* );
void resourceSavingFinished( Resource* );
- void resourceLoadingError( Resource*, const QString& );
- void resourceSavingError( Resource*, const QString& );
+ void resourceLoadingError( Resource*, const TQString& );
+ void resourceSavingError( Resource*, const TQString& );
protected:
void deleteRemovedAddressees();
@@ -418,13 +418,13 @@ class KABC_EXPORT AddressBook : public QObject
KRES::Manager<Resource> *resourceManager();
private:
- QPtrList<Resource> mDummy; // Remove in KDE 4
+ TQPtrList<Resource> mDummy; // Remove in KDE 4
struct AddressBookData;
AddressBookData *d;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const AddressBook & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, AddressBook & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const AddressBook & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, AddressBook & );
}
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index c7d353d3a..160df026b 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -33,19 +33,19 @@
using namespace KABC;
-AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
- QListViewItem( parent ),
+AddresseeItem::AddresseeItem( TQListView *parent, const Addressee &addressee ) :
+ TQListViewItem( parent ),
mAddressee( addressee )
{
setText( Name, addressee.realName() );
setText( Email, addressee.preferredEmail() );
}
-QString AddresseeItem::key( int column, bool ) const
+TQString AddresseeItem::key( int column, bool ) const
{
if (column == Email) {
- QString value = text(Email);
- QRegExp emailRe("<\\S*>");
+ TQString value = text(Email);
+ TQRegExp emailRe("<\\S*>");
int match = emailRe.search(value);
if (match > -1)
value = value.mid(match + 1, emailRe.matchedLength() - 2);
@@ -56,14 +56,14 @@ QString AddresseeItem::key( int column, bool ) const
return text(column).lower();
}
-AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
+AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) :
KDialogBase( KDialogBase::Plain, i18n("Select Addressee"),
Ok|Cancel, Ok, parent ), mMultiple( multiple )
{
- QWidget *topWidget = plainPage();
+ TQWidget *topWidget = plainPage();
- QBoxLayout *topLayout = new QHBoxLayout( topWidget );
- QBoxLayout *listLayout = new QVBoxLayout;
+ TQBoxLayout *topLayout = new TQHBoxLayout( topWidget );
+ TQBoxLayout *listLayout = new QVBoxLayout;
topLayout->addLayout( listLayout );
mAddresseeList = new KListView( topWidget );
@@ -72,27 +72,27 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mAddresseeList->setAllColumnsShowFocus( true );
mAddresseeList->setFullWidth( true );
listLayout->addWidget( mAddresseeList );
- connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotOk() ) );
- connect( mAddresseeList, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( updateEdit( QListViewItem * ) ) );
+ connect( mAddresseeList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( mAddresseeList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( updateEdit( TQListViewItem * ) ) );
mAddresseeEdit = new KLineEdit( topWidget );
mAddresseeEdit->setCompletionMode( KGlobalSettings::CompletionAuto );
- connect( mAddresseeEdit->completionObject(), SIGNAL( match( const QString & ) ),
- SLOT( selectItem( const QString & ) ) );
+ connect( mAddresseeEdit->completionObject(), TQT_SIGNAL( match( const TQString & ) ),
+ TQT_SLOT( selectItem( const TQString & ) ) );
mAddresseeEdit->setFocus();
mAddresseeEdit->completionObject()->setIgnoreCase( true );
listLayout->addWidget( mAddresseeEdit );
- setInitialSize( QSize( 450, 300 ) );
+ setInitialSize( TQSize( 450, 300 ) );
if ( mMultiple ) {
- QBoxLayout *selectedLayout = new QVBoxLayout;
+ TQBoxLayout *selectedLayout = new QVBoxLayout;
topLayout->addLayout( selectedLayout );
topLayout->setSpacing( spacingHint() );
- QGroupBox *selectedGroup = new QGroupBox( 1, Horizontal, i18n("Selected"),
+ TQGroupBox *selectedGroup = new TQGroupBox( 1, Horizontal, i18n("Selected"),
topWidget );
selectedLayout->addWidget( selectedGroup );
@@ -101,23 +101,23 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mSelectedList->addColumn( i18n("Email") );
mSelectedList->setAllColumnsShowFocus( true );
mSelectedList->setFullWidth( true );
- connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( removeSelected() ) );
+ connect( mSelectedList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( removeSelected() ) );
- QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup );
- connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) );
+ TQPushButton *unselectButton = new TQPushButton( i18n("Unselect"), selectedGroup );
+ connect ( unselectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelected() ) );
- connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( addSelected( QListViewItem * ) ) );
+ connect( mAddresseeList, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( addSelected( TQListViewItem * ) ) );
- setInitialSize( QSize( 650, 350 ) );
+ setInitialSize( TQSize( 650, 350 ) );
}
mAddressBook = StdAddressBook::self( true );
- connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ),
- SLOT( addressBookChanged() ) );
- connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ),
- SLOT( addressBookChanged() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ TQT_SLOT( addressBookChanged() ) );
+ connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ),
+ TQT_SLOT( addressBookChanged() ) );
loadAddressBook();
}
@@ -140,7 +140,7 @@ void AddresseeDialog::loadAddressBook()
}
}
-void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item )
+void AddresseeDialog::addCompletionItem( const TQString &str, TQListViewItem *item )
{
if ( str.isEmpty() ) return;
@@ -148,11 +148,11 @@ void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item
mAddresseeEdit->completionObject()->addItem( str );
}
-void AddresseeDialog::selectItem( const QString &str )
+void AddresseeDialog::selectItem( const TQString &str )
{
if ( str.isEmpty() ) return;
- QListViewItem *item = mItemDict.find( str );
+ TQListViewItem *item = mItemDict.find( str );
if ( item ) {
mAddresseeList->blockSignals( true );
mAddresseeList->setSelected( item, true );
@@ -161,20 +161,20 @@ void AddresseeDialog::selectItem( const QString &str )
}
}
-void AddresseeDialog::updateEdit( QListViewItem *item )
+void AddresseeDialog::updateEdit( TQListViewItem *item )
{
mAddresseeEdit->setText( item->text( 0 ) );
mAddresseeEdit->setSelection( 0, item->text( 0 ).length() );
}
-void AddresseeDialog::addSelected( QListViewItem *item )
+void AddresseeDialog::addSelected( TQListViewItem *item )
{
AddresseeItem *addrItem = dynamic_cast<AddresseeItem *>( item );
if ( !addrItem ) return;
Addressee a = addrItem->addressee();
- QListViewItem *selectedItem = mSelectedDict.find( a.uid() );
+ TQListViewItem *selectedItem = mSelectedDict.find( a.uid() );
if ( !selectedItem ) {
selectedItem = new AddresseeItem( mSelectedList, a );
mSelectedDict.insert( a.uid(), selectedItem );
@@ -183,7 +183,7 @@ void AddresseeDialog::addSelected( QListViewItem *item )
void AddresseeDialog::removeSelected()
{
- QListViewItem *item = mSelectedList->selectedItem();
+ TQListViewItem *item = mSelectedList->selectedItem();
AddresseeItem *addrItem = dynamic_cast<AddresseeItem *>( item );
if ( !addrItem ) return;
@@ -210,7 +210,7 @@ Addressee::List AddresseeDialog::addressees()
AddresseeItem *aItem = 0;
if ( mMultiple ) {
- QListViewItem *item = mSelectedList->firstChild();
+ TQListViewItem *item = mSelectedList->firstChild();
while( item ) {
aItem = dynamic_cast<AddresseeItem *>( item );
if ( aItem ) al.append( aItem->addressee() );
@@ -226,13 +226,13 @@ Addressee::List AddresseeDialog::addressees()
return al;
}
-Addressee AddresseeDialog::getAddressee( QWidget *parent )
+Addressee AddresseeDialog::getAddressee( TQWidget *parent )
{
AddresseeDialog *dlg = new AddresseeDialog( parent );
Addressee addressee;
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
addressee = dlg->addressee();
}
@@ -240,12 +240,12 @@ Addressee AddresseeDialog::getAddressee( QWidget *parent )
return addressee;
}
-Addressee::List AddresseeDialog::getAddressees( QWidget *parent )
+Addressee::List AddresseeDialog::getAddressees( TQWidget *parent )
{
AddresseeDialog *dlg = new AddresseeDialog( parent, true );
Addressee::List addressees;
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
addressees = dlg->addressees();
}
diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h
index 2d15804b1..51dbc98b6 100644
--- a/kabc/addresseedialog.h
+++ b/kabc/addresseedialog.h
@@ -21,7 +21,7 @@
#ifndef KABC_ADDRESSEEDIALOG_H
#define KABC_ADDRESSEEDIALOG_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -51,7 +51,7 @@ class KABC_EXPORT AddresseeItem : public QListViewItem
@param parent The parent listview.
@param addressee The associated addressee.
*/
- AddresseeItem( QListView *parent, const Addressee &addressee );
+ AddresseeItem( TQListView *parent, const Addressee &addressee );
/**
Returns the addressee.
@@ -59,9 +59,9 @@ class KABC_EXPORT AddresseeItem : public QListViewItem
Addressee addressee() const { return mAddressee; }
/**
- Method used by QListView to sort the items.
+ Method used by TQListView to sort the items.
*/
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
private:
Addressee mAddressee;
@@ -91,7 +91,7 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
@param parent parent widget
@param multiple if true, indicates a multiple selection.
*/
- AddresseeDialog( QWidget *parent=0, bool multiple=false );
+ AddresseeDialog( TQWidget *parent=0, bool multiple=false );
/**
Destructor.
@@ -117,7 +117,7 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
If the user doesn't select an entry or presses cancel, the returned
addressee is empty.
*/
- static Addressee getAddressee( QWidget *parent );
+ static Addressee getAddressee( TQWidget *parent );
/**
Select multiple address book entries.
@@ -126,12 +126,12 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
If the user doesn't select an entry or presses cancel, the returned
addressee list is empty.
*/
- static Addressee::List getAddressees( QWidget *parent );
+ static Addressee::List getAddressees( TQWidget *parent );
private slots:
- void selectItem( const QString & );
- void updateEdit( QListViewItem *item );
- void addSelected( QListViewItem *item );
+ void selectItem( const TQString & );
+ void updateEdit( TQListViewItem *item );
+ void addSelected( TQListViewItem *item );
void removeSelected();
protected slots:
@@ -139,7 +139,7 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
private:
void loadAddressBook();
- void addCompletionItem( const QString &str, QListViewItem *item );
+ void addCompletionItem( const TQString &str, TQListViewItem *item );
bool mMultiple;
@@ -150,8 +150,8 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
AddressBook *mAddressBook;
- QDict<QListViewItem> mItemDict;
- QDict<QListViewItem> mSelectedDict;
+ TQDict<TQListViewItem> mItemDict;
+ TQDict<TQListViewItem> mSelectedDict;
class AddresseeDialogPrivate;
AddresseeDialogPrivate *d;
diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp
index 96ab62578..df4085a02 100644
--- a/kabc/addresseehelper.cpp
+++ b/kabc/addresseehelper.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kconfig.h>
#include <klocale.h>
@@ -38,7 +38,7 @@ AddresseeHelper *AddresseeHelper::self()
}
AddresseeHelper::AddresseeHelper()
- : QObject( qApp ),
+ : TQObject( qApp ),
DCOPObject( "KABC::AddresseeHelper" )
{
initSettings();
@@ -48,10 +48,10 @@ AddresseeHelper::AddresseeHelper()
}
// static
-void AddresseeHelper::addToSet( const QStringList& list,
- std::set<QString>& container )
+void AddresseeHelper::addToSet( const TQStringList& list,
+ std::set<TQString>& container )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
if ( !(*it).isEmpty() )
container.insert( *it );
@@ -90,17 +90,17 @@ void AddresseeHelper::initSettings()
mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true );
}
-bool AddresseeHelper::containsTitle( const QString& title ) const
+bool AddresseeHelper::containsTitle( const TQString& title ) const
{
return mTitles.find( title ) != mTitles.end();
}
-bool AddresseeHelper::containsPrefix( const QString& prefix ) const
+bool AddresseeHelper::containsPrefix( const TQString& prefix ) const
{
return mPrefixes.find( prefix ) != mPrefixes.end();
}
-bool AddresseeHelper::containsSuffix( const QString& suffix ) const
+bool AddresseeHelper::containsSuffix( const TQString& suffix ) const
{
return mSuffixes.find( suffix ) != mSuffixes.end();
}
diff --git a/kabc/addresseehelper.h b/kabc/addresseehelper.h
index 8e58f5988..5280e6b2d 100644
--- a/kabc/addresseehelper.h
+++ b/kabc/addresseehelper.h
@@ -20,8 +20,8 @@
#ifndef KABC_ADDRESSEEHELPER_H
#define KABC_ADDRESSEEHELPER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
@@ -33,16 +33,16 @@
namespace KABC {
-class KABC_EXPORT AddresseeHelper : public QObject, public DCOPObject
+class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject
{
K_DCOP
public:
static AddresseeHelper *self();
- bool containsTitle( const QString& title ) const;
- bool containsPrefix( const QString& prefix ) const;
- bool containsSuffix( const QString& suffix ) const;
+ bool containsTitle( const TQString& title ) const;
+ bool containsPrefix( const TQString& prefix ) const;
+ bool containsSuffix( const TQString& suffix ) const;
bool tradeAsFamilyName() const;
k_dcop:
@@ -51,11 +51,11 @@ class KABC_EXPORT AddresseeHelper : public QObject, public DCOPObject
private:
AddresseeHelper();
- static void addToSet( const QStringList& list,
- std::set<QString>& container );
- std::set<QString> mTitles;
- std::set<QString> mPrefixes;
- std::set<QString> mSuffixes;
+ static void addToSet( const TQStringList& list,
+ std::set<TQString>& container );
+ std::set<TQString> mTitles;
+ std::set<TQString> mPrefixes;
+ std::set<TQString> mSuffixes;
bool mTradeAsFamilyName;
static AddresseeHelper *s_self;
diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp
index 361364881..cb9446927 100644
--- a/kabc/addresseelist.cpp
+++ b/kabc/addresseelist.cpp
@@ -37,46 +37,46 @@ using namespace KABC;
bool SortingTraits::Uid::eq( const Addressee &a1, const Addressee &a2 )
{
// locale awareness doesn't make sense sorting ids
- return ( QString::compare( a1.uid(), a2.uid() ) == 0 );
+ return ( TQString::compare( a1.uid(), a2.uid() ) == 0 );
}
bool SortingTraits::Uid::lt( const Addressee &a1, const Addressee &a2 )
{
// locale awareness doesn't make sense sorting ids
- return ( QString::compare( a1.uid(), a2.uid() ) < 0 );
+ return ( TQString::compare( a1.uid(), a2.uid() ) < 0 );
}
bool SortingTraits::Name::eq( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.name(), a2.name() ) == 0 );
+ return ( TQString::localeAwareCompare( a1.name(), a2.name() ) == 0 );
}
bool SortingTraits::Name::lt( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.name(), a2.name() ) < 0 );
+ return ( TQString::localeAwareCompare( a1.name(), a2.name() ) < 0 );
}
bool SortingTraits::FormattedName::eq( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 );
+ return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) == 0 );
}
bool SortingTraits::FormattedName::lt( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 );
+ return ( TQString::localeAwareCompare( a1.formattedName(), a2.formattedName() ) < 0 );
}
bool SortingTraits::FamilyName::eq( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0
- && QString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 );
+ return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0
+ && TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0 );
}
bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 )
{
- int family = QString::localeAwareCompare( a1.familyName(), a2.familyName() );
+ int family = TQString::localeAwareCompare( a1.familyName(), a2.familyName() );
if ( 0 == family ) {
- return ( QString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 );
+ return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) < 0 );
} else {
return family < 0;
}
@@ -84,15 +84,15 @@ bool SortingTraits::FamilyName::lt( const Addressee &a1, const Addressee &a2 )
bool SortingTraits::GivenName::eq( const Addressee &a1, const Addressee &a2 )
{
- return ( QString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0
- && QString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 );
+ return ( TQString::localeAwareCompare( a1.givenName(), a2.givenName() ) == 0
+ && TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) == 0 );
}
bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 )
{
- int given = QString::localeAwareCompare( a1.givenName(), a2.givenName() );
+ int given = TQString::localeAwareCompare( a1.givenName(), a2.givenName() );
if ( 0 == given ) {
- return ( QString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 );
+ return ( TQString::localeAwareCompare( a1.familyName(), a2.familyName() ) < 0 );
} else {
return given < 0;
}
@@ -107,7 +107,7 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 )
static Field *sActiveField=0;
AddresseeList::AddresseeList()
- : QValueList<Addressee>()
+ : TQValueList<Addressee>()
{
mReverseSorting = false;
mActiveSortingCriterion = FormattedName;
@@ -118,14 +118,14 @@ AddresseeList::~AddresseeList()
}
AddresseeList::AddresseeList( const AddresseeList &l )
- : QValueList<Addressee>( l )
+ : TQValueList<Addressee>( l )
{
mReverseSorting = l.reverseSorting();
mActiveSortingCriterion = l.sortingCriterion();
}
-AddresseeList::AddresseeList( const QValueList<Addressee> &l )
- : QValueList<Addressee>( l )
+AddresseeList::AddresseeList( const TQValueList<Addressee> &l )
+ : TQValueList<Addressee>( l )
{
mReverseSorting = false;
}
@@ -135,7 +135,7 @@ void AddresseeList::dump() const
kdDebug(5700) << "AddresseeList {" << endl;
kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl;
- QString crit;
+ TQString crit;
if ( Uid == mActiveSortingCriterion ) {
crit = "Uid";
} else if ( Name == mActiveSortingCriterion ) {
diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h
index 2e6df06e4..7c9df0275 100644
--- a/kabc/addresseelist.h
+++ b/kabc/addresseelist.h
@@ -22,7 +22,7 @@
#ifndef KABC_ADDRESSEELIST_H
#define KABC_ADDRESSEELIST_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "addressee.h"
@@ -87,11 +87,11 @@ class KABC_EXPORT GivenName // fallback to family name
typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterion;
/**
- * @short a QValueList of Addressee, with sorting functionality
+ * @short a TQValueList of Addressee, with sorting functionality
*
- * This class extends the functionality of QValueList with
+ * This class extends the functionality of TQValueList with
* sorting methods specific to the Addressee class. It can be used
- * just like any other QValueList but is no template class.
+ * just like any other TQValueList but is no template class.
*
* An AddresseeList does not automatically keep sorted when addressees
* are added or removed or the sorting order is changed, as this would
@@ -99,7 +99,7 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio
* such operations you have to call {@link #sort} or {@link #sortBy} to
* create a defined order again.
*
- * Iterator usage is inherited by QValueList and extensively documented
+ * Iterator usage is inherited by TQValueList and extensively documented
* there. Please remember that the state of an iterator is undefined
* after any sorting operation.
*
@@ -109,13 +109,13 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio
*
* @author Jost Schenck jost@schenck.de
*/
-class KABC_EXPORT AddresseeList : public QValueList<Addressee>
+class KABC_EXPORT AddresseeList : public TQValueList<Addressee>
{
public:
AddresseeList();
~AddresseeList();
AddresseeList( const AddresseeList & );
- AddresseeList( const QValueList<Addressee> & );
+ AddresseeList( const TQValueList<Addressee> & );
/**
* Debug output.
diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp
index 8e20c7975..b048d9f96 100644
--- a/kabc/addresslineedit.cpp
+++ b/kabc/addresslineedit.cpp
@@ -25,12 +25,12 @@
#include "addresslineedit.h"
-#include <qapplication.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qevent.h>
-#include <qdragobject.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
#include <kcompletionbox.h>
#include <kconfig.h>
@@ -57,19 +57,19 @@ using namespace KABC;
KCompletion * AddressLineEdit::s_completion = 0L;
bool AddressLineEdit::s_addressesDirty = false;
-QTimer* AddressLineEdit::s_LDAPTimer = 0L;
+TQTimer* AddressLineEdit::s_LDAPTimer = 0L;
LdapSearch* AddressLineEdit::s_LDAPSearch = 0L;
-QString* AddressLineEdit::s_LDAPText = 0L;
+TQString* AddressLineEdit::s_LDAPText = 0L;
AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L;
KConfig *AddressLineEdit::s_config = 0L;
static KStaticDeleter<KCompletion> completionDeleter;
-static KStaticDeleter<QTimer> ldapTimerDeleter;
+static KStaticDeleter<TQTimer> ldapTimerDeleter;
static KStaticDeleter<LdapSearch> ldapSearchDeleter;
-static KStaticDeleter<QString> ldapTextDeleter;
+static KStaticDeleter<TQString> ldapTextDeleter;
static KStaticDeleter<KConfig> configDeleter;
-AddressLineEdit::AddressLineEdit(QWidget* parent,
+AddressLineEdit::AddressLineEdit(TQWidget* parent,
bool useCompletion,
const char *name)
: KLineEdit(parent,name)
@@ -100,26 +100,26 @@ void AddressLineEdit::init()
if( m_useCompletion ) {
if( !s_LDAPTimer ) {
- ldapTimerDeleter.setObject( s_LDAPTimer, new QTimer );
+ ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer );
ldapSearchDeleter.setObject( s_LDAPSearch, new LdapSearch );
- ldapTextDeleter.setObject( s_LDAPText, new QString );
+ ldapTextDeleter.setObject( s_LDAPText, new TQString );
}
- connect( s_LDAPTimer, SIGNAL( timeout()), SLOT( slotStartLDAPLookup()));
- connect( s_LDAPSearch, SIGNAL( searchData( const QStringList& )),
- SLOT( slotLDAPSearchData( const QStringList& )));
+ connect( s_LDAPTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotStartLDAPLookup()));
+ connect( s_LDAPSearch, TQT_SIGNAL( searchData( const TQStringList& )),
+ TQT_SLOT( slotLDAPSearchData( const TQStringList& )));
}
if ( m_useCompletion && !m_completionInitialized )
{
setCompletionObject( s_completion, false ); // we handle it ourself
- connect( this, SIGNAL( completion(const QString&)),
- this, SLOT(slotCompletion() ));
+ connect( this, TQT_SIGNAL( completion(const TQString&)),
+ this, TQT_SLOT(slotCompletion() ));
KCompletionBox *box = completionBox();
- connect( box, SIGNAL( highlighted( const QString& )),
- this, SLOT( slotPopupCompletion( const QString& ) ));
- connect( box, SIGNAL( userCancelled( const QString& )),
- SLOT( userCancelled( const QString& )));
+ connect( box, TQT_SIGNAL( highlighted( const TQString& )),
+ this, TQT_SLOT( slotPopupCompletion( const TQString& ) ));
+ connect( box, TQT_SIGNAL( userCancelled( const TQString& )),
+ TQT_SLOT( userCancelled( const TQString& )));
m_completionInitialized = true; // don't connect muliple times. That's
// ugly, tho, better have completionBox()
@@ -144,7 +144,7 @@ KConfig* AddressLineEdit::config()
return s_config;
}
-void AddressLineEdit::setFont( const QFont& font )
+void AddressLineEdit::setFont( const TQFont& font )
{
KLineEdit::setFont( font );
if ( m_useCompletion )
@@ -152,7 +152,7 @@ void AddressLineEdit::setFont( const QFont& font )
}
//-----------------------------------------------------------------------------
-void AddressLineEdit::keyPressEvent(QKeyEvent *e)
+void AddressLineEdit::keyPressEvent(TQKeyEvent *e)
{
bool accept = false;
@@ -188,7 +188,7 @@ void AddressLineEdit::keyPressEvent(QKeyEvent *e)
}
}
-void AddressLineEdit::mouseReleaseEvent( QMouseEvent * e )
+void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e )
{
if (m_useCompletion && (e->button() == MidButton))
{
@@ -200,20 +200,20 @@ void AddressLineEdit::mouseReleaseEvent( QMouseEvent * e )
KLineEdit::mouseReleaseEvent(e);
}
-void AddressLineEdit::insert(const QString &t)
+void AddressLineEdit::insert(const TQString &t)
{
if (!m_smartPaste)
{
KLineEdit::insert(t);
return;
}
- QString newText = t.stripWhiteSpace();
+ TQString newText = t.stripWhiteSpace();
if (newText.isEmpty())
return;
// remove newlines in the to-be-pasted string as well as an eventual
// mailto: protocol
- newText.replace( QRegExp("\r?\n"), ", " );
+ newText.replace( TQRegExp("\r?\n"), ", " );
if ( newText.startsWith( "mailto:" ) )
{
KURL u(newText);
@@ -227,10 +227,10 @@ void AddressLineEdit::insert(const QString &t)
}
else if (newText.find("(at)") != -1)
{
- newText.replace( QRegExp("\\s*\\(at\\)\\s*"), "@" );
+ newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" );
}
- QString contents = text();
+ TQString contents = text();
int start_sel = 0;
int end_sel = 0;
int pos = cursorPosition();
@@ -248,7 +248,7 @@ void AddressLineEdit::insert(const QString &t)
while ((eot > 0) && contents[eot-1].isSpace()) eot--;
if (eot == 0)
{
- contents = QString::null;
+ contents = TQString::null;
}
else if (pos >= eot)
{
@@ -290,9 +290,9 @@ void AddressLineEdit::doCompletion(bool ctrlT)
if ( !m_useCompletion )
return;
- QString prevAddr;
+ TQString prevAddr;
- QString s(text());
+ TQString s(text());
int n = s.findRev(',');
if (n >= 0)
@@ -314,7 +314,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
if ( ctrlT )
{
- QStringList completions = s_completion->substringCompletion( s );
+ TQStringList completions = s_completion->substringCompletion( s );
if (completions.count() > 1) {
m_previousAddresses = prevAddr;
setCompletedItems( completions );
@@ -338,7 +338,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
case KGlobalSettings::CompletionPopup:
{
m_previousAddresses = prevAddr;
- QStringList items = s_completion->allMatches( s );
+ TQStringList items = s_completion->allMatches( s );
items += s_completion->allMatches( "\"" + s );
items += s_completion->substringCompletion( '<' + s );
uint beforeDollarCompletionCount = items.count();
@@ -351,7 +351,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
if ( items.count() > beforeDollarCompletionCount )
{
// remove the '$$whatever$' part
- for( QStringList::Iterator it = items.begin();
+ for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
{
@@ -374,7 +374,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
if (!autoSuggest)
{
int index = items.first().find( s );
- QString newText = prevAddr + items.first().mid( index );
+ TQString newText = prevAddr + items.first().mid( index );
//kdDebug() << "OLD TEXT: " << text() << endl;
//kdDebug() << "NEW TEXT: " << newText << endl;
setUserSelection(false);
@@ -387,7 +387,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
case KGlobalSettings::CompletionShell:
{
- QString match = s_completion->makeCompletion( s );
+ TQString match = s_completion->makeCompletion( s );
if ( !match.isNull() && match != s )
{
setText( prevAddr + match );
@@ -401,10 +401,10 @@ void AddressLineEdit::doCompletion(bool ctrlT)
{
if (!s.isEmpty())
{
- QString match = s_completion->makeCompletion( s );
+ TQString match = s_completion->makeCompletion( s );
if ( !match.isNull() && match != s )
{
- QString adds = prevAddr + match;
+ TQString adds = prevAddr + match;
setCompletedText( adds );
}
break;
@@ -417,7 +417,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
}
//-----------------------------------------------------------------------------
-void AddressLineEdit::slotPopupCompletion( const QString& completion )
+void AddressLineEdit::slotPopupCompletion( const TQString& completion )
{
setText( m_previousAddresses + completion );
cursorAtEnd();
@@ -429,12 +429,12 @@ void AddressLineEdit::loadAddresses()
s_completion->clear();
s_addressesDirty = false;
- QStringList adrs = addresses();
- for( QStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it)
+ TQStringList adrs = addresses();
+ for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it)
addAddress( *it );
}
-void AddressLineEdit::addAddress( const QString& adr )
+void AddressLineEdit::addAddress( const TQString& adr )
{
s_completion->addItem( adr );
int pos = adr.find( '<' );
@@ -462,9 +462,9 @@ void AddressLineEdit::stopLDAPLookup()
void AddressLineEdit::startLoadingLDAPEntries()
{
- QString s( *s_LDAPText );
+ TQString s( *s_LDAPText );
// TODO cache last?
- QString prevAddr;
+ TQString prevAddr;
int n = s.findRev(',');
if (n>= 0)
{
@@ -478,12 +478,12 @@ void AddressLineEdit::startLoadingLDAPEntries()
s_LDAPSearch->startSearch( s );
}
-void AddressLineEdit::slotLDAPSearchData( const QStringList& adrs )
+void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs )
{
if( s_LDAPLineEdit != this )
return;
- for( QStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) {
- QString name(*it);
+ for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) {
+ TQString name(*it);
int pos = name.find( " <" );
int pos_comma = name.find( ',' );
// put name in quotes, if we have a comma in the name
@@ -503,12 +503,12 @@ void AddressLineEdit::slotLDAPSearchData( const QStringList& adrs )
}
}
-QStringList AddressLineEdit::removeMailDupes( const QStringList& adrs )
+TQStringList AddressLineEdit::removeMailDupes( const TQStringList& adrs )
{
- QStringList src = adrs;
+ TQStringList src = adrs;
qHeapSort( src );
- QString last;
- for( QStringList::Iterator it = src.begin(); it != src.end(); ) {
+ TQString last;
+ for( TQStringList::Iterator it = src.begin(); it != src.end(); ) {
if( *it == last )
{
it = src.remove( it );
@@ -521,12 +521,12 @@ QStringList AddressLineEdit::removeMailDupes( const QStringList& adrs )
}
//-----------------------------------------------------------------------------
-void AddressLineEdit::dropEvent(QDropEvent *e)
+void AddressLineEdit::dropEvent(TQDropEvent *e)
{
KURL::List uriList;
if(KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList ))
{
- QString ct = text();
+ TQString ct = text();
KURL::List::Iterator it = uriList.begin();
for (; it != uriList.end(); ++it)
{
@@ -543,28 +543,28 @@ void AddressLineEdit::dropEvent(QDropEvent *e)
else {
if (m_useCompletion)
m_smartPaste = true;
- QLineEdit::dropEvent(e);
+ TQLineEdit::dropEvent(e);
m_smartPaste = false;
}
}
-QStringList AddressLineEdit::addresses()
+TQStringList AddressLineEdit::addresses()
{
- QApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
+ TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
- QStringList result;
- QString space(" ");
- QRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]");
- QString endQuote("\" ");
- QString addr, email;
+ TQStringList result;
+ TQString space(" ");
+ TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]");
+ TQString endQuote("\" ");
+ TQString addr, email;
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
KABC::AddressBook::Iterator it;
for( it = addressBook->begin(); it != addressBook->end(); ++it ) {
- QStringList emails = (*it).emails();
+ TQStringList emails = (*it).emails();
- QString n = (*it).prefix() + space +
+ TQString n = (*it).prefix() + space +
(*it).givenName() + space +
(*it).additionalName() + space +
(*it).familyName() + space +
@@ -572,13 +572,13 @@ QStringList AddressLineEdit::addresses()
n = n.simplifyWhiteSpace();
- QStringList::ConstIterator mit;
+ TQStringList::ConstIterator mit;
for ( mit = emails.begin(); mit != emails.end(); ++mit ) {
email = *mit;
if (!email.isEmpty()) {
if (n.isEmpty() || (email.find( '<' ) != -1))
- addr = QString::null;
+ addr = TQString::null;
else { /* do we really need quotes around this name ? */
if (n.find(needQuotes) != -1)
addr = '"' + n + endQuote;
@@ -602,7 +602,7 @@ QStringList AddressLineEdit::addresses()
manager.load();
result += manager.listNames();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return result;
}
diff --git a/kabc/addresslineedit.h b/kabc/addresslineedit.h
index 05a0a7c58..093acf97b 100644
--- a/kabc/addresslineedit.h
+++ b/kabc/addresslineedit.h
@@ -23,9 +23,9 @@
#define KABC_ADDRESSLINEEDIT_H
// $Id$
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include "klineedit.h"
#include "kcompletion.h"
@@ -41,7 +41,7 @@ class LdapSearch;
*
* This lineedit is supposed to be used wherever the user types email addresses
* and might want a completion. You can simply use it as a replacement for
- * KLineEdit or QLineEdit.
+ * KLineEdit or TQLineEdit.
*
* You can enable or disable the lineedit at any time.
*
@@ -51,7 +51,7 @@ class KABC_EXPORT AddressLineEdit : public KLineEdit
{
Q_OBJECT
public:
- AddressLineEdit(QWidget* parent, bool useCompletion = true,
+ AddressLineEdit(TQWidget* parent, bool useCompletion = true,
const char *name = 0L);
virtual ~AddressLineEdit();
@@ -59,7 +59,7 @@ public:
* Reimplented for internal reasons.
* @ see KLineEdit::setFont()
*/
- virtual void setFont( const QFont& );
+ virtual void setFont( const TQFont& );
static KConfig *config();
@@ -79,38 +79,38 @@ protected:
* Use addAddress() to add addresses.
*/
virtual void loadAddresses();
- void addAddress( const QString& );
- virtual void keyPressEvent(QKeyEvent*);
- virtual void dropEvent(QDropEvent *e);
+ void addAddress( const TQString& );
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void dropEvent(TQDropEvent *e);
virtual void paste();
- virtual void insert(const QString &t);
- virtual void mouseReleaseEvent( QMouseEvent * e );
+ virtual void insert(const TQString &t);
+ virtual void mouseReleaseEvent( TQMouseEvent * e );
void doCompletion(bool ctrlT);
private slots:
void slotCompletion() { doCompletion(false); }
- void slotPopupCompletion( const QString& );
+ void slotPopupCompletion( const TQString& );
void slotStartLDAPLookup();
- void slotLDAPSearchData( const QStringList& );
+ void slotLDAPSearchData( const TQStringList& );
private:
void init();
void startLoadingLDAPEntries();
void stopLDAPLookup();
- QStringList addresses();
- QStringList removeMailDupes( const QStringList& adrs );
+ TQStringList addresses();
+ TQStringList removeMailDupes( const TQStringList& adrs );
- QString m_previousAddresses;
+ TQString m_previousAddresses;
bool m_useCompletion;
bool m_completionInitialized;
bool m_smartPaste;
- QString m_typedText; // unused
+ TQString m_typedText; // unused
static bool s_addressesDirty;
static KCompletion *s_completion;
- static QTimer *s_LDAPTimer;
+ static TQTimer *s_LDAPTimer;
static LdapSearch *s_LDAPSearch;
- static QString *s_LDAPText;
+ static TQString *s_LDAPText;
static AddressLineEdit *s_LDAPLineEdit;
static KConfig *s_config;
diff --git a/kabc/agent.cpp b/kabc/agent.cpp
index 780beb4ae..d21fa2998 100644
--- a/kabc/agent.cpp
+++ b/kabc/agent.cpp
@@ -29,7 +29,7 @@ Agent::Agent()
{
}
-Agent::Agent( const QString &url )
+Agent::Agent( const TQString &url )
: mAddressee( 0 ),mUrl( url ), mIntern( false )
{
}
@@ -87,7 +87,7 @@ Agent &Agent::operator=( const Agent &addr )
return *this;
}
-void Agent::setUrl( const QString &url )
+void Agent::setUrl( const TQString &url )
{
mUrl = url;
mIntern = false;
@@ -104,7 +104,7 @@ bool Agent::isIntern() const
return mIntern;
}
-QString Agent::url() const
+TQString Agent::url() const
{
return mUrl;
}
@@ -114,7 +114,7 @@ Addressee *Agent::addressee() const
return mAddressee;
}
-QString Agent::asString() const
+TQString Agent::asString() const
{
if ( mIntern )
return "intern agent";
@@ -122,7 +122,7 @@ QString Agent::asString() const
return mUrl;
}
-QDataStream &KABC::operator<<( QDataStream &s, const Agent &agent )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent )
{
Q_UINT32 hasAddressee = ( agent.mAddressee != 0 );
@@ -133,7 +133,7 @@ QDataStream &KABC::operator<<( QDataStream &s, const Agent &agent )
return s;
}
-QDataStream &KABC::operator>>( QDataStream &s, Agent &agent )
+TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent )
{
Q_UINT32 hasAddressee;
diff --git a/kabc/agent.h b/kabc/agent.h
index a235e0247..467ee6603 100644
--- a/kabc/agent.h
+++ b/kabc/agent.h
@@ -23,7 +23,7 @@
class QDataStream;
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -39,8 +39,8 @@ class Addressee;
*/
class KABC_EXPORT Agent
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Agent & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Agent & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & );
public:
@@ -54,7 +54,7 @@ public:
*
* @param url A URL that describes the position of the agent file.
*/
- Agent( const QString &url );
+ Agent( const TQString &url );
/**
* Consturctor.
@@ -80,7 +80,7 @@ public:
*
* @param url The location URL of the agent file.
*/
- void setUrl( const QString &url );
+ void setUrl( const TQString &url );
/**
* Sets the addressee of the agent. When using this function,
@@ -102,7 +102,7 @@ public:
/**
* Returns the location URL of this agent.
*/
- QString url() const;
+ TQString url() const;
/**
* Returns the addressee object of this agent.
@@ -112,17 +112,17 @@ public:
/**
* Returns string representation of the agent.
*/
- QString asString() const;
+ TQString asString() const;
private:
Addressee *mAddressee;
- QString mUrl;
+ TQString mUrl;
int mIntern;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Agent & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Agent & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Agent & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Agent & );
}
#endif
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index ec363e414..ee2f2e30a 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqapplication.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
@@ -31,7 +31,7 @@
using namespace KABC;
DistributionList::DistributionList( DistributionListManager *manager,
- const QString &name ) :
+ const TQString &name ) :
mManager( manager ), mName( name )
{
mManager->insert( this );
@@ -42,21 +42,21 @@ DistributionList::~DistributionList()
mManager->remove( this );
}
-void DistributionList::setName( const QString &name )
+void DistributionList::setName( const TQString &name )
{
mName = name;
}
-QString DistributionList::name() const
+TQString DistributionList::name() const
{
return mName;
}
-void DistributionList::insertEntry( const Addressee &a, const QString &email )
+void DistributionList::insertEntry( const Addressee &a, const TQString &email )
{
Entry e( a, email );
- QValueList<Entry>::Iterator it;
+ TQValueList<Entry>::Iterator it;
for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
if ( (*it).addressee.uid() == a.uid() ) {
/**
@@ -74,9 +74,9 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
mEntries.append( e );
}
-void DistributionList::removeEntry( const Addressee &a, const QString &email )
+void DistributionList::removeEntry( const Addressee &a, const TQString &email )
{
- QValueList<Entry>::Iterator it;
+ TQValueList<Entry>::Iterator it;
for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) {
mEntries.remove( it );
@@ -85,14 +85,14 @@ void DistributionList::removeEntry( const Addressee &a, const QString &email )
}
}
-QStringList DistributionList::emails() const
+TQStringList DistributionList::emails() const
{
- QStringList emails;
+ TQStringList emails;
Entry::List::ConstIterator it;
for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
Addressee a = (*it).addressee;
- QString email = (*it).email.isEmpty() ? a.fullEmail() :
+ TQString email = (*it).email.isEmpty() ? a.fullEmail() :
a.fullEmail( (*it).email );
if ( !email.isEmpty() ) {
@@ -108,13 +108,13 @@ DistributionList::Entry::List DistributionList::entries() const
return mEntries;
}
-typedef QValueList< QPair<QString, QString> > MissingEntryList;
+typedef TQValueList< QPair<TQString, TQString> > MissingEntryList;
class DistributionListManager::DistributionListManagerPrivate
{
public:
AddressBook *mAddressBook;
- QMap< QString, MissingEntryList > mMissingEntries;
+ TQMap< TQString, MissingEntryList > mMissingEntries;
};
DistributionListManager::DistributionListManager( AddressBook *ab )
@@ -132,7 +132,7 @@ DistributionListManager::~DistributionListManager()
d = 0;
}
-DistributionList *DistributionListManager::list( const QString &name )
+DistributionList *DistributionListManager::list( const TQString &name )
{
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
@@ -171,9 +171,9 @@ void DistributionListManager::remove( DistributionList *l )
}
}
-QStringList DistributionListManager::listNames()
+TQStringList DistributionListManager::listNames()
{
- QStringList names;
+ TQStringList names;
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
@@ -187,27 +187,27 @@ bool DistributionListManager::load()
{
KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) );
- QMap<QString,QString> entryMap = cfg.entryMap( "DistributionLists" );
+ TQMap<TQString,TQString> entryMap = cfg.entryMap( "DistributionLists" );
cfg.setGroup( "DistributionLists" );
// clear old lists
mLists.clear();
d->mMissingEntries.clear();
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it ) {
- QString name = it.key();
- QStringList value = cfg.readListEntry( name );
+ TQString name = it.key();
+ TQStringList value = cfg.readListEntry( name );
kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl;
DistributionList *list = new DistributionList( this, name );
MissingEntryList missingEntries;
- QStringList::ConstIterator entryIt = value.constBegin();
+ TQStringList::ConstIterator entryIt = value.constBegin();
while( entryIt != value.constEnd() ) {
- QString id = *entryIt++;
- QString email = *entryIt;
+ TQString id = *entryIt++;
+ TQString email = *entryIt;
kdDebug(5700) << "----- Entry " << id << endl;
@@ -242,7 +242,7 @@ bool DistributionListManager::save()
for( list = mLists.first(); list; list = mLists.next() ) {
kdDebug(5700) << " Saving '" << list->name() << "'" << endl;
- QStringList value;
+ TQStringList value;
const DistributionList::Entry::List entries = list->entries();
DistributionList::Entry::List::ConstIterator it;
for( it = entries.begin(); it != entries.end(); ++it ) {
@@ -270,12 +270,12 @@ bool DistributionListManager::save()
DistributionListWatcher* DistributionListWatcher::mSelf = 0;
DistributionListWatcher::DistributionListWatcher()
- : QObject( qApp, "DistributionListWatcher" )
+ : TQObject( qApp, "DistributionListWatcher" )
{
mDirWatch = new KDirWatch;
mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) );
- connect( mDirWatch, SIGNAL( dirty( const QString& ) ), SIGNAL( changed() ) );
+ connect( mDirWatch, TQT_SIGNAL( dirty( const TQString& ) ), TQT_SIGNAL( changed() ) );
mDirWatch->startScan();
}
@@ -287,7 +287,7 @@ DistributionListWatcher::~DistributionListWatcher()
DistributionListWatcher *DistributionListWatcher::self()
{
- kdWarning( !qApp ) << "No QApplication object available, you'll get a memleak!" << endl;
+ kdWarning( !qApp ) << "No TQApplication object available, you'll get a memleak!" << endl;
if ( !mSelf )
mSelf = new DistributionListWatcher();
diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h
index 2aab60094..7ad8dff81 100644
--- a/kabc/distributionlist.h
+++ b/kabc/distributionlist.h
@@ -48,14 +48,14 @@ class KABC_EXPORT DistributionList
*/
struct Entry
{
- typedef QValueList<Entry> List;
+ typedef TQValueList<Entry> List;
Entry() {}
- Entry( const Addressee &_addressee, const QString &_email ) :
+ Entry( const Addressee &_addressee, const TQString &_email ) :
addressee( _addressee ), email( _email ) {}
Addressee addressee;
- QString email;
+ TQString email;
};
/**
@@ -64,7 +64,7 @@ class KABC_EXPORT DistributionList
@param manager Managing object of this list.
@param name Name of this list.
*/
- DistributionList( DistributionListManager *manager, const QString &name );
+ DistributionList( DistributionListManager *manager, const TQString &name );
/**
Destructor.
@@ -75,30 +75,30 @@ class KABC_EXPORT DistributionList
Set name of this list. The name is used as key by the
DistributinListManager.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
Get name of this list.
*/
- QString name() const;
+ TQString name() const;
/**
Insert an entry into this distribution list. If the entry already exists
nothing happens.
*/
- void insertEntry( const Addressee &, const QString &email=QString::null );
+ void insertEntry( const Addressee &, const TQString &email=TQString::null );
/**
Remove an entry from this distribution list. If the entry doesn't exist
nothing happens.
*/
- void removeEntry( const Addressee &, const QString &email=QString::null );
+ void removeEntry( const Addressee &, const TQString &email=TQString::null );
/**
Return list of email addresses, which belong to this distributon list.
These addresses can be directly used by e.g. a mail client.
*/
- QStringList emails() const;
+ TQStringList emails() const;
/**
Return list of entries belonging to this distribution list. This function
@@ -108,7 +108,7 @@ class KABC_EXPORT DistributionList
private:
DistributionListManager *mManager;
- QString mName;
+ TQString mName;
Entry::List mEntries;
};
@@ -135,7 +135,7 @@ class KABC_EXPORT DistributionListManager
/**
Return distribution list with given name.
*/
- DistributionList *list( const QString &name ); // KDE4: add bool caseSensitive = true
+ DistributionList *list( const TQString &name ); // KDE4: add bool caseSensitive = true
/**
Insert distribution list. If a list with this name already exists, nothing
@@ -152,7 +152,7 @@ class KABC_EXPORT DistributionListManager
/**
Return names of all distribution lists managed by this manager.
*/
- QStringList listNames();
+ TQStringList listNames();
/**
Load distribution lists form disk.
@@ -168,7 +168,7 @@ class KABC_EXPORT DistributionListManager
class DistributionListManagerPrivate;
DistributionListManagerPrivate *d;
- QPtrList<DistributionList> mLists;
+ TQPtrList<DistributionList> mLists;
};
/**
@@ -182,7 +182,7 @@ class KABC_EXPORT DistributionListManager
\code
KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self()
- connect( watchdog, SIGNAL( changed() ), SLOT( doSomething() ) );
+ connect( watchdog, TQT_SIGNAL( changed() ), TQT_SLOT( doSomething() ) );
\endcode
*/
diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp
index 4533734da..737984077 100644
--- a/kabc/distributionlistdialog.cpp
+++ b/kabc/distributionlistdialog.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
#include <kinputdialog.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <klocale.h>
#include <kdebug.h>
@@ -40,13 +40,13 @@
using namespace KABC;
-DistributionListDialog::DistributionListDialog( AddressBook *addressBook, QWidget *parent)
+DistributionListDialog::DistributionListDialog( AddressBook *addressBook, TQWidget *parent)
: KDialogBase( parent, "", true, i18n("Configure Distribution Lists"), Ok, Ok, true)
{
mEditor = new DistributionListEditorWidget( addressBook, this );
setMainWidget( mEditor );
- connect( this, SIGNAL( okClicked() ), mEditor, SLOT( save() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), mEditor, TQT_SLOT( save() ) );
}
DistributionListDialog::~DistributionListDialog()
@@ -54,25 +54,25 @@ DistributionListDialog::~DistributionListDialog()
}
// TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable
-static QMap<QWidget*,QString> *sEmailMap = 0;
+static TQMap<TQWidget*,TQString> *sEmailMap = 0;
-EmailSelector::EmailSelector( const QStringList &emails, const QString &current,
- QWidget *parent ) :
+EmailSelector::EmailSelector( const TQStringList &emails, const TQString &current,
+ TQWidget *parent ) :
KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
parent )
{
if (!sEmailMap)
- sEmailMap = new QMap<QWidget*,QString>();
- QFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ sEmailMap = new TQMap<TQWidget*,TQString>();
+ TQFrame *topFrame = plainPage();
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"),
+ mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Email Addresses"),
topFrame );
topLayout->addWidget( mButtonGroup );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = emails.begin(); it != emails.end(); ++it ) {
- QRadioButton *button = new QRadioButton( *it, mButtonGroup );
+ TQRadioButton *button = new TQRadioButton( *it, mButtonGroup );
sEmailMap->insert( button, *it );
if ( (*it) == current ) {
mButtonGroup->setButton(mButtonGroup->id(button));
@@ -80,20 +80,20 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString &current,
}
}
-QString EmailSelector::selected()
+TQString EmailSelector::selected()
{
- QButton *button = mButtonGroup->selected();
+ TQButton *button = mButtonGroup->selected();
if ( button ) return (*sEmailMap)[button];
- return QString::null;
+ return TQString::null;
}
-QString EmailSelector::getEmail( const QStringList &emails, const QString &current,
- QWidget *parent )
+TQString EmailSelector::getEmail( const TQStringList &emails, const TQString &current,
+ TQWidget *parent )
{
EmailSelector *dlg = new EmailSelector( emails, current, parent );
dlg->exec();
- QString result = dlg->selected();
+ TQString result = dlg->selected();
delete dlg;
@@ -103,9 +103,9 @@ QString EmailSelector::getEmail( const QStringList &emails, const QString &curre
class EntryItem : public QListViewItem
{
public:
- EntryItem( QListView *parent, const Addressee &addressee,
- const QString &email=QString::null ) :
- QListViewItem( parent ),
+ EntryItem( TQListView *parent, const Addressee &addressee,
+ const TQString &email=TQString::null ) :
+ TQListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
{
@@ -124,84 +124,84 @@ class EntryItem : public QListViewItem
return mAddressee;
}
- QString email() const
+ TQString email() const
{
return mEmail;
}
private:
Addressee mAddressee;
- QString mEmail;
+ TQString mEmail;
};
-DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, QWidget *parent) :
- QWidget( parent ),
+DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, TQWidget *parent) :
+ TQWidget( parent ),
mAddressBook( addressBook )
{
kdDebug(5700) << "DistributionListEditor()" << endl;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ;
+ TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ;
- mNameCombo = new QComboBox( this );
+ mNameCombo = new TQComboBox( this );
nameLayout->addWidget( mNameCombo );
- connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
+ connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) );
- mNewButton = new QPushButton( i18n("New List..."), this );
+ mNewButton = new TQPushButton( i18n("New List..."), this );
nameLayout->addWidget( mNewButton );
- connect( mNewButton, SIGNAL( clicked() ), SLOT( newList() ) );
+ connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) );
- mEditButton = new QPushButton( i18n("Rename List..."), this );
+ mEditButton = new TQPushButton( i18n("Rename List..."), this );
nameLayout->addWidget( mEditButton );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editList() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) );
- mRemoveButton = new QPushButton( i18n("Remove List"), this );
+ mRemoveButton = new TQPushButton( i18n("Remove List"), this );
nameLayout->addWidget( mRemoveButton );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) );
- QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 );
+ TQGridLayout *gridLayout = new TQGridLayout( topLayout, 3, 3 );
gridLayout->setColStretch(1, 1);
- QLabel *listLabel = new QLabel( i18n("Available addresses:"), this );
+ TQLabel *listLabel = new TQLabel( i18n("Available addresses:"), this );
gridLayout->addWidget( listLabel, 0, 0 );
- mListLabel = new QLabel( this );
+ mListLabel = new TQLabel( this );
gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 );
- mAddresseeView = new QListView( this );
+ mAddresseeView = new TQListView( this );
mAddresseeView->addColumn( i18n("Name") );
mAddresseeView->addColumn( i18n("Preferred Email") );
mAddresseeView->setAllColumnsShowFocus( true );
gridLayout->addWidget( mAddresseeView, 1, 0 );
- connect( mAddresseeView, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionAddresseeViewChanged() ) );
- connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( addEntry() ) );
+ connect( mAddresseeView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionAddresseeViewChanged() ) );
+ connect( mAddresseeView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( addEntry() ) );
- mAddEntryButton = new QPushButton( i18n("Add Entry"), this );
+ mAddEntryButton = new TQPushButton( i18n("Add Entry"), this );
mAddEntryButton->setEnabled(false);
gridLayout->addWidget( mAddEntryButton, 2, 0 );
- connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
+ connect( mAddEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) );
- mEntryView = new QListView( this );
+ mEntryView = new TQListView( this );
mEntryView->addColumn( i18n("Name") );
mEntryView->addColumn( i18n("Email") );
mEntryView->addColumn( i18n("Use Preferred") );
mEntryView->setEnabled(false);
mEntryView->setAllColumnsShowFocus( true );
gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 );
- connect( mEntryView, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionEntryViewChanged() ) );
+ connect( mEntryView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionEntryViewChanged() ) );
- mChangeEmailButton = new QPushButton( i18n("Change Email..."), this );
+ mChangeEmailButton = new TQPushButton( i18n("Change Email..."), this );
gridLayout->addWidget( mChangeEmailButton, 2, 1 );
- connect( mChangeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) );
+ connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) );
- mRemoveEntryButton = new QPushButton( i18n("Remove Entry"), this );
+ mRemoveEntryButton = new TQPushButton( i18n("Remove Entry"), this );
gridLayout->addWidget( mRemoveEntryButton, 2, 2 );
- connect( mRemoveEntryButton, SIGNAL( clicked() ), SLOT( removeEntry() ) );
+ connect( mRemoveEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) );
mManager = new DistributionListManager( mAddressBook );
mManager->load();
@@ -234,8 +234,8 @@ void DistributionListEditorWidget::slotSelectionEntryViewChanged()
void DistributionListEditorWidget::newList()
{
bool ok;
- QString name = KInputDialog::getText( i18n( "New Distribution List" ),
- i18n( "Please enter &name:" ), QString::null, &ok );
+ TQString name = KInputDialog::getText( i18n( "New Distribution List" ),
+ i18n( "Please enter &name:" ), TQString::null, &ok );
if (!ok) return;
new DistributionList( mManager, name );
@@ -250,9 +250,9 @@ void DistributionListEditorWidget::newList()
void DistributionListEditorWidget::editList()
{
- QString oldName = mNameCombo->currentText();
+ TQString oldName = mNameCombo->currentText();
bool ok;
- QString name = KInputDialog::getText( i18n( "Distribution List" ),
+ TQString name = KInputDialog::getText( i18n( "Distribution List" ),
i18n( "Please change &name:" ), oldName, &ok );
if (!ok) return;
@@ -271,7 +271,7 @@ void DistributionListEditorWidget::removeList()
{
int result = KMessageBox::warningContinueCancel( this,
i18n("Delete distribution list '%1'?") .arg( mNameCombo->currentText() ),
- QString::null, KStdGuiItem::del() );
+ TQString::null, KStdGuiItem::del() );
if ( result != KMessageBox::Continue ) return;
@@ -325,7 +325,7 @@ void DistributionListEditorWidget::changeEmail()
static_cast<EntryItem *>( mEntryView->selectedItem() );
if ( !entryItem ) return;
- QString email = EmailSelector::getEmail( entryItem->addressee().emails(),
+ TQString email = EmailSelector::getEmail( entryItem->addressee().emails(),
entryItem->email(), this );
list->removeEntry( entryItem->addressee(), entryItem->email() );
list->insertEntry( entryItem->addressee(), email );
diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h
index 9a163ef7d..eb2e68e55 100644
--- a/kabc/distributionlistdialog.h
+++ b/kabc/distributionlistdialog.h
@@ -21,7 +21,7 @@
#ifndef KABC_DISTRIBUTIONLISTDIALOG_H
#define KABC_DISTRIBUTIONLISTDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
@@ -63,7 +63,7 @@ class KABC_EXPORT DistributionListDialog : public KDialogBase
@param ab The addressbook, the addressees should be used from
@param parent The parent widget
*/
- DistributionListDialog( AddressBook *ab, QWidget *parent );
+ DistributionListDialog( AddressBook *ab, TQWidget *parent );
/**
Destructor.
@@ -83,16 +83,16 @@ class KABC_EXPORT DistributionListDialog : public KDialogBase
class KABC_EXPORT EmailSelector : public KDialogBase
{
public:
- EmailSelector( const QStringList &emails, const QString &current,
- QWidget *parent );
+ EmailSelector( const TQStringList &emails, const TQString &current,
+ TQWidget *parent );
- QString selected();
+ TQString selected();
- static QString getEmail( const QStringList &emails, const QString &current,
- QWidget *parent );
+ static TQString getEmail( const TQStringList &emails, const TQString &current,
+ TQWidget *parent );
private:
- QButtonGroup *mButtonGroup;
+ TQButtonGroup *mButtonGroup;
};
/**
@@ -103,7 +103,7 @@ class KABC_EXPORT DistributionListEditorWidget : public QWidget
Q_OBJECT
public:
- DistributionListEditorWidget( AddressBook *, QWidget *parent );
+ DistributionListEditorWidget( AddressBook *, TQWidget *parent );
virtual ~DistributionListEditorWidget();
private slots:
@@ -121,15 +121,15 @@ class KABC_EXPORT DistributionListEditorWidget : public QWidget
void save();
private:
- QComboBox *mNameCombo;
- QLabel *mListLabel;
- QListView *mEntryView;
- QListView *mAddresseeView;
+ TQComboBox *mNameCombo;
+ TQLabel *mListLabel;
+ TQListView *mEntryView;
+ TQListView *mAddresseeView;
AddressBook *mAddressBook;
DistributionListManager *mManager;
- QPushButton *mNewButton, *mEditButton, *mRemoveButton;
- QPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton;
+ TQPushButton *mNewButton, *mEditButton, *mRemoveButton;
+ TQPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton;
struct Data;
Data *d;
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index c0de3f137..ba4280515 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kinputdialog.h>
#include <klocale.h>
@@ -38,42 +38,42 @@
using namespace KABC;
-EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &current,
- QWidget *parent ) :
+EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString &current,
+ TQWidget *parent ) :
KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
parent )
{
- QFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = plainPage();
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"),
+ mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Email Addresses"),
topFrame );
mButtonGroup->setRadioButtonExclusive( true );
topLayout->addWidget( mButtonGroup );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = emails.begin(); it != emails.end(); ++it ) {
- QRadioButton *button = new QRadioButton( *it, mButtonGroup );
+ TQRadioButton *button = new TQRadioButton( *it, mButtonGroup );
if ( (*it) == current ) {
button->setDown( true );
}
}
}
-QString EmailSelectDialog::selected()
+TQString EmailSelectDialog::selected()
{
- QButton *button = mButtonGroup->selected();
+ TQButton *button = mButtonGroup->selected();
if ( button ) return button->text();
- return QString::null;
+ return TQString::null;
}
-QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &current,
- QWidget *parent )
+TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString &current,
+ TQWidget *parent )
{
EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent );
dlg->exec();
- QString result = dlg->selected();
+ TQString result = dlg->selected();
delete dlg;
@@ -83,9 +83,9 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
class EditEntryItem : public QListViewItem
{
public:
- EditEntryItem( QListView *parent, const Addressee &addressee,
- const QString &email=QString::null ) :
- QListViewItem( parent ),
+ EditEntryItem( TQListView *parent, const Addressee &addressee,
+ const TQString &email=TQString::null ) :
+ TQListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
{
@@ -104,66 +104,66 @@ class EditEntryItem : public QListViewItem
return mAddressee;
}
- QString email() const
+ TQString email() const
{
return mEmail;
}
private:
Addressee mAddressee;
- QString mEmail;
+ TQString mEmail;
};
-DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidget *parent) :
- QWidget( parent ),
+DistributionListEditor::DistributionListEditor( AddressBook *addressBook, TQWidget *parent) :
+ TQWidget( parent ),
mAddressBook( addressBook )
{
kdDebug(5700) << "DistributionListEditor()" << endl;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ;
+ TQBoxLayout *nameLayout = new TQHBoxLayout( topLayout) ;
- mNameCombo = new QComboBox( this );
+ mNameCombo = new TQComboBox( this );
nameLayout->addWidget( mNameCombo );
- connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
+ connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateEntryView() ) );
- newButton = new QPushButton( i18n("New List"), this );
+ newButton = new TQPushButton( i18n("New List"), this );
nameLayout->addWidget( newButton );
- connect( newButton, SIGNAL( clicked() ), SLOT( newList() ) );
+ connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( newList() ) );
- removeButton = new QPushButton( i18n("Remove List"), this );
+ removeButton = new TQPushButton( i18n("Remove List"), this );
nameLayout->addWidget( removeButton );
- connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) );
- mEntryView = new QListView( this );
+ mEntryView = new TQListView( this );
mEntryView->addColumn( i18n("Name") );
mEntryView->addColumn( i18n("Email") );
mEntryView->addColumn( i18n("Use Preferred") );
topLayout->addWidget( mEntryView );
- connect(mEntryView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionEntryViewChanged()));
+ connect(mEntryView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionEntryViewChanged()));
- changeEmailButton = new QPushButton( i18n("Change Email"), this );
+ changeEmailButton = new TQPushButton( i18n("Change Email"), this );
topLayout->addWidget( changeEmailButton );
- connect( changeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) );
+ connect( changeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) );
- removeEntryButton = new QPushButton( i18n("Remove Entry"), this );
+ removeEntryButton = new TQPushButton( i18n("Remove Entry"), this );
topLayout->addWidget( removeEntryButton );
- connect( removeEntryButton, SIGNAL( clicked() ), SLOT( removeEntry() ) );
+ connect( removeEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeEntry() ) );
- addEntryButton = new QPushButton( i18n("Add Entry"), this );
+ addEntryButton = new TQPushButton( i18n("Add Entry"), this );
topLayout->addWidget( addEntryButton );
- connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
+ connect( addEntryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addEntry() ) );
- mAddresseeView = new QListView( this );
+ mAddresseeView = new TQListView( this );
mAddresseeView->addColumn( i18n("Name") );
mAddresseeView->addColumn( i18n("Preferred Email") );
topLayout->addWidget( mAddresseeView );
- connect(mAddresseeView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionAddresseeViewChanged()));
+ connect(mAddresseeView,TQT_SIGNAL(selectionChanged ()),this, TQT_SLOT(slotSelectionAddresseeViewChanged()));
mManager = new DistributionListManager( mAddressBook );
mManager->load();
@@ -193,9 +193,9 @@ void DistributionListEditor::slotSelectionEntryViewChanged()
void DistributionListEditor::newList()
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Distribution List"),
+ TQString name = KInputDialog::getText( i18n("New Distribution List"),
i18n("Please enter name:"),
- QString::null, &ok, this );
+ TQString::null, &ok, this );
if ( !ok )
return;
@@ -258,7 +258,7 @@ void DistributionListEditor::changeEmail()
dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
if ( !entryItem ) return;
- QString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(),
+ TQString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(),
entryItem->email(), this );
list->removeEntry( entryItem->addressee(), entryItem->email() );
list->insertEntry( entryItem->addressee(), email );
diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h
index 68bd917de..d0d8f752a 100644
--- a/kabc/distributionlisteditor.h
+++ b/kabc/distributionlisteditor.h
@@ -20,7 +20,7 @@
#ifndef KABC_DISTRIBUTIONLISTEDITOR_H
#define KABC_DISTRIBUTIONLISTEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
@@ -36,16 +36,16 @@ class DistributionListManager;
class KABC_EXPORT EmailSelectDialog : public KDialogBase
{
public:
- EmailSelectDialog( const QStringList &emails, const QString &current,
- QWidget *parent );
+ EmailSelectDialog( const TQStringList &emails, const TQString &current,
+ TQWidget *parent );
- QString selected();
+ TQString selected();
- static QString getEmail( const QStringList &emails, const QString &current,
- QWidget *parent );
+ static TQString getEmail( const TQStringList &emails, const TQString &current,
+ TQWidget *parent );
private:
- QButtonGroup *mButtonGroup;
+ TQButtonGroup *mButtonGroup;
};
/**
@@ -55,7 +55,7 @@ class DistributionListEditor : public QWidget
{
Q_OBJECT
public:
- DistributionListEditor( AddressBook *, QWidget *parent );
+ DistributionListEditor( AddressBook *, TQWidget *parent );
virtual ~DistributionListEditor();
private slots:
@@ -71,14 +71,14 @@ class DistributionListEditor : public QWidget
void slotSelectionAddresseeViewChanged();
private:
- QComboBox *mNameCombo;
- QListView *mEntryView;
- QListView *mAddresseeView;
+ TQComboBox *mNameCombo;
+ TQListView *mEntryView;
+ TQListView *mAddresseeView;
AddressBook *mAddressBook;
DistributionListManager *mManager;
- QPushButton *newButton, *removeButton;
- QPushButton *changeEmailButton,*removeEntryButton,*addEntryButton;
+ TQPushButton *newButton, *removeButton;
+ TQPushButton *changeEmailButton,*removeEntryButton,*addEntryButton;
};
}
diff --git a/kabc/errorhandler.cpp b/kabc/errorhandler.cpp
index 1e3966ac8..55b0f459d 100644
--- a/kabc/errorhandler.cpp
+++ b/kabc/errorhandler.cpp
@@ -24,31 +24,31 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "errorhandler.h"
using namespace KABC;
-void ConsoleErrorHandler::error( const QString &msg )
+void ConsoleErrorHandler::error( const TQString &msg )
{
// no debug area is ok here
kdError() << msg << endl;
}
-void GUIErrorHandler::error( const QString &msg )
+void GUIErrorHandler::error( const TQString &msg )
{
KMessageBox::error( 0, msg, i18n( "Error in libkabc" ) );
}
-GuiErrorHandler::GuiErrorHandler( QWidget *parent )
+GuiErrorHandler::GuiErrorHandler( TQWidget *parent )
: mParent( parent )
{
}
-void GuiErrorHandler::error( const QString &msg )
+void GuiErrorHandler::error( const TQString &msg )
{
if (qApp)
KMessageBox::error( mParent, msg );
diff --git a/kabc/errorhandler.h b/kabc/errorhandler.h
index e112ed605..8f8246fc7 100644
--- a/kabc/errorhandler.h
+++ b/kabc/errorhandler.h
@@ -22,7 +22,7 @@
#ifndef KABC_ERRORHANDLER_H
#define KABC_ERRORHANDLER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ class KABC_EXPORT ErrorHandler
/**
Show error message.
*/
- virtual void error( const QString &msg ) = 0;
+ virtual void error( const TQString &msg ) = 0;
};
/**
@@ -52,7 +52,7 @@ class KABC_EXPORT ErrorHandler
class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler
{
public:
- virtual void error( const QString &msg );
+ virtual void error( const TQString &msg );
};
/**
@@ -64,7 +64,7 @@ class KABC_EXPORT ConsoleErrorHandler : public ErrorHandler
class KABC_EXPORT GUIErrorHandler : public ErrorHandler
{
public:
- virtual void error( const QString &msg );
+ virtual void error( const TQString &msg );
};
/**
@@ -79,12 +79,12 @@ class KABC_EXPORT GuiErrorHandler : public ErrorHandler
\param parent Widget which is used as parent for the error dialogs.
*/
- GuiErrorHandler( QWidget *parent );
+ GuiErrorHandler( TQWidget *parent );
- virtual void error( const QString &msg );
+ virtual void error( const TQString &msg );
private:
- QWidget *mParent;
+ TQWidget *mParent;
class Private;
Private *d;
diff --git a/kabc/field.h b/kabc/field.h
index 6bc246a26..f1de43717 100644
--- a/kabc/field.h
+++ b/kabc/field.h
@@ -21,8 +21,8 @@
#ifndef KABC_FIELD_H
#define KABC_FIELD_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "addressee.h"
@@ -36,7 +36,7 @@ class KABC_EXPORT Field
friend class FieldImpl;
public:
- typedef QValueList<Field *> List;
+ typedef TQValueList<Field *> List;
/**
* @li @p All -
@@ -61,7 +61,7 @@ public:
/**
* Returns the translated label for this field.
*/
- virtual QString label();
+ virtual TQString label();
/**
* Returns the ored categories the field belongs to.
@@ -71,25 +71,25 @@ public:
/**
* Returns the translated label for field category.
*/
- static QString categoryLabel( int category );
+ static TQString categoryLabel( int category );
/**
* Returns a string representation of the value the field has in the given
- * Addressee. Returns QString::null, if it is not possible to convert the
+ * Addressee. Returns TQString::null, if it is not possible to convert the
* value to a string.
*/
- virtual QString value( const KABC::Addressee & );
+ virtual TQString value( const KABC::Addressee & );
/**
* Sets the value of the field in the given Addressee. Returns true on success
* or false, if the given string couldn't be converted to a valid value.
*/
- virtual bool setValue( KABC::Addressee &, const QString & );
+ virtual bool setValue( KABC::Addressee &, const TQString & );
/**
* Returns a string, that can be used for sorting.
*/
- QString sortKey( const KABC::Addressee & );
+ TQString sortKey( const KABC::Addressee & );
/**
* Returns, if the field is a user-defined field.
@@ -119,8 +119,8 @@ public:
* @param key Unique key for this field
* @param app Unique app name for this field
*/
- static Field *createCustomField( const QString &label, int category,
- const QString &key, const QString &app );
+ static Field *createCustomField( const TQString &label, int category,
+ const TQString &key, const TQString &app );
/**
* Delete all fields from list.
@@ -134,13 +134,13 @@ public:
* @param identifier The unique identifier
* @param fields The list of the fields
*/
- static void saveFields( KConfig *cfg, const QString &identifier,
+ static void saveFields( KConfig *cfg, const TQString &identifier,
const Field::List &fields );
/**
* This is the same as above, with the difference, that
* the list is stored in KGlobal::config() in group "KABCFields".
*/
- static void saveFields( const QString &identifier,
+ static void saveFields( const TQString &identifier,
const Field::List &fields );
/**
@@ -149,13 +149,13 @@ public:
* @param cfg The config file object
* @param identifier The unique identifier
*/
- static Field::List restoreFields( KConfig *cfg, const QString &identifier );
+ static Field::List restoreFields( KConfig *cfg, const TQString &identifier );
/**
* This is the same as above, with the difference, that
* the list is loaded from KGlobal::config() from group "KABCFields".
*/
- static Field::List restoreFields( const QString &identifier );
+ static Field::List restoreFields( const TQString &identifier );
protected:
static void createField( int id, int category = 0 );
diff --git a/kabc/format.h b/kabc/format.h
index 7c6abfb6c..b7df6c539 100644
--- a/kabc/format.h
+++ b/kabc/format.h
@@ -20,7 +20,7 @@
#ifndef KABC_FORMAT_H
#define KABC_FORMAT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -37,11 +37,11 @@ class KABC_EXPORT_DEPRECATED Format
/**
Load addressbook from file.
*/
- virtual bool load( AddressBook *, const QString &fileName ) = 0;
+ virtual bool load( AddressBook *, const TQString &fileName ) = 0;
/**
Save addressbook to file.
*/
- virtual bool save( AddressBook *, const QString &fileName ) = 0;
+ virtual bool save( AddressBook *, const TQString &fileName ) = 0;
};
}
diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp
index 13524e21d..fe599b901 100644
--- a/kabc/formatfactory.cpp
+++ b/kabc/formatfactory.cpp
@@ -24,7 +24,7 @@
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "vcardformatplugin.h"
@@ -56,8 +56,8 @@ FormatFactory::FormatFactory()
info->descriptionLabel = i18n( "vCard Format" );
mFormatList.insert( "vcard", info );
- const QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true );
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ const TQStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true );
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
KSimpleConfig config( *it, true );
@@ -67,7 +67,7 @@ FormatFactory::FormatFactory()
info = new FormatInfo;
config.setGroup( "Plugin" );
- QString type = config.readEntry( "Type" );
+ TQString type = config.readEntry( "Type" );
info->library = config.readEntry( "X-KDE-Library" );
config.setGroup( "Misc" );
@@ -83,14 +83,14 @@ FormatFactory::~FormatFactory()
mFormatList.clear();
}
-QStringList FormatFactory::formats()
+TQStringList FormatFactory::formats()
{
- QStringList retval;
+ TQStringList retval;
// make sure 'vcard' is the first entry
retval << "vcard";
- QDictIterator<FormatInfo> it( mFormatList );
+ TQDictIterator<FormatInfo> it( mFormatList );
for ( ; it.current(); ++it )
if ( it.currentKey() != "vcard" )
retval << it.currentKey();
@@ -98,7 +98,7 @@ QStringList FormatFactory::formats()
return retval;
}
-FormatInfo *FormatFactory::info( const QString &type )
+FormatInfo *FormatFactory::info( const TQString &type )
{
if ( type.isEmpty() )
return 0;
@@ -106,7 +106,7 @@ FormatInfo *FormatFactory::info( const QString &type )
return mFormatList[ type ];
}
-FormatPlugin *FormatFactory::format( const QString& type )
+FormatPlugin *FormatFactory::format( const TQString& type )
{
FormatPlugin *format = 0;
@@ -124,7 +124,7 @@ FormatPlugin *FormatFactory::format( const QString& type )
FormatInfo *fi = mFormatList[ type ];
if (!fi)
return 0;
- QString libName = fi->library;
+ TQString libName = fi->library;
KLibrary *library = openLibrary( libName );
if ( !library )
@@ -146,18 +146,18 @@ FormatPlugin *FormatFactory::format( const QString& type )
}
-KLibrary *FormatFactory::openLibrary( const QString& libName )
+KLibrary *FormatFactory::openLibrary( const TQString& libName )
{
KLibrary *library = 0;
- QString path = KLibLoader::findLibrary( QFile::encodeName( libName ) );
+ TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) );
if ( path.isEmpty() ) {
kdDebug( 5700 ) << "No format plugin library was found!" << endl;
return 0;
}
- library = KLibLoader::self()->library( QFile::encodeName( path ) );
+ library = KLibLoader::self()->library( TQFile::encodeName( path ) );
if ( !library ) {
kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl;
diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h
index f3e270a4b..76a3704d5 100644
--- a/kabc/formatfactory.h
+++ b/kabc/formatfactory.h
@@ -21,8 +21,8 @@
#ifndef KABC_FORMATFACTORY_H
#define KABC_FORMATFACTORY_H
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <klibloader.h>
@@ -33,9 +33,9 @@ namespace KABC {
struct FormatInfo
{
- QString library;
- QString nameLabel;
- QString descriptionLabel;
+ TQString library;
+ TQString nameLabel;
+ TQString descriptionLabel;
};
/**
@@ -46,8 +46,8 @@ struct FormatInfo
* \code
* KABC::FormatFactory *factory = KABC::FormatFactory::self();
*
- * QStringList list = factory->formats();
- * QStringList::Iterator it;
+ * TQStringList list = factory->formats();
+ * TQStringList::Iterator it;
* for ( it = list.begin(); it != list.end(); ++it ) {
* KABC::FormatPlugin *format = factory->format( (*it) );
* // do something with format
@@ -74,27 +74,27 @@ class KABC_EXPORT FormatFactory
*
* @param type The type of the format, returned by formats()
*/
- FormatPlugin *format( const QString &type );
+ FormatPlugin *format( const TQString &type );
/**
* Returns a list of all available format types.
*/
- QStringList formats();
+ TQStringList formats();
/**
* Returns the info structure for a special type.
*/
- FormatInfo *info( const QString &type );
+ FormatInfo *info( const TQString &type );
protected:
FormatFactory();
private:
- KLibrary *openLibrary( const QString& libName );
+ KLibrary *openLibrary( const TQString& libName );
static FormatFactory *mSelf;
- QDict<FormatInfo> mFormatList;
+ TQDict<FormatInfo> mFormatList;
};
}
diff --git a/kabc/formatplugin.h b/kabc/formatplugin.h
index 4a2e980d8..33f4beea0 100644
--- a/kabc/formatplugin.h
+++ b/kabc/formatplugin.h
@@ -21,7 +21,7 @@
#ifndef KABC_FORMATPLUGIN_H
#define KABC_FORMATPLUGIN_H
-#include <qfile.h>
+#include <tqfile.h>
#include "plugin.h"
#include "resource.h"
@@ -46,27 +46,27 @@ public:
/**
* Load single addressee from file.
*/
- virtual bool load( Addressee &, QFile *file ) = 0;
+ virtual bool load( Addressee &, TQFile *file ) = 0;
/**
* Load whole addressbook from file.
*/
- virtual bool loadAll( AddressBook *, Resource *, QFile *file ) = 0;
+ virtual bool loadAll( AddressBook *, Resource *, TQFile *file ) = 0;
/**
* Save a single Addressee to file.
*/
- virtual void save( const Addressee &, QFile *file ) = 0;
+ virtual void save( const Addressee &, TQFile *file ) = 0;
/**
* Save whole addressbook to file.
*/
- virtual void saveAll( AddressBook *, Resource *, QFile *file ) = 0;
+ virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0;
/**
* Checks if given file contains the right format
*/
- virtual bool checkFormat( QFile *file ) const = 0;
+ virtual bool checkFormat( TQFile *file ) const = 0;
};
}
diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp
index 82cfc0a2f..d5e3cf499 100644
--- a/kabc/formats/binaryformat.cpp
+++ b/kabc/formats/binaryformat.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
-#include <qimage.h>
+#include <tqdatastream.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,10 +44,10 @@ extern "C"
}
}
-bool BinaryFormat::load( Addressee &addressee, QFile *file )
+bool BinaryFormat::load( Addressee &addressee, TQFile *file )
{
kdDebug(5700) << "BinaryFormat::load()" << endl;
- QDataStream stream( file );
+ TQDataStream stream( file );
if ( !checkHeader( stream ) )
return false;
@@ -57,11 +57,11 @@ bool BinaryFormat::load( Addressee &addressee, QFile *file )
return true;
}
-bool BinaryFormat::loadAll( AddressBook*, Resource *resource, QFile *file )
+bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file )
{
kdDebug(5700) << "BinaryFormat::loadAll()" << endl;
- QDataStream stream( file );
+ TQDataStream stream( file );
if ( !checkHeader( stream ) )
return false;
@@ -81,11 +81,11 @@ bool BinaryFormat::loadAll( AddressBook*, Resource *resource, QFile *file )
return true;
}
-void BinaryFormat::save( const Addressee &addressee, QFile *file )
+void BinaryFormat::save( const Addressee &addressee, TQFile *file )
{
kdDebug(5700) << "BinaryFormat::save()" << endl;
- QDataStream stream( file );
+ TQDataStream stream( file );
writeHeader( stream );
@@ -94,12 +94,12 @@ void BinaryFormat::save( const Addressee &addressee, QFile *file )
saveAddressee( addressee, stream );
}
-void BinaryFormat::saveAll( AddressBook*, Resource *resource, QFile *file )
+void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file )
{
kdDebug(5700) << "BinaryFormat::saveAll()" << endl;
Q_UINT32 counter = 0;
- QDataStream stream( file );
+ TQDataStream stream( file );
writeHeader( stream );
// set dummy number of entries
@@ -117,22 +117,22 @@ void BinaryFormat::saveAll( AddressBook*, Resource *resource, QFile *file )
stream << counter;
}
-bool BinaryFormat::checkFormat( QFile *file ) const
+bool BinaryFormat::checkFormat( TQFile *file ) const
{
kdDebug(5700) << "BinaryFormat::checkFormat()" << endl;
- QDataStream stream( file );
+ TQDataStream stream( file );
return checkHeader( stream );
}
-bool BinaryFormat::checkHeader( QDataStream &stream ) const
+bool BinaryFormat::checkHeader( TQDataStream &stream ) const
{
Q_UINT32 magic, version;
stream >> magic >> version;
- QFile *file = dynamic_cast<QFile*>( stream.device() );
+ TQFile *file = dynamic_cast<TQFile*>( stream.device() );
if ( !file ) {
kdError() << i18n("Not a file?") << endl;
@@ -152,7 +152,7 @@ bool BinaryFormat::checkHeader( QDataStream &stream ) const
return true;
}
-void BinaryFormat::writeHeader( QDataStream &stream )
+void BinaryFormat::writeHeader( TQDataStream &stream )
{
Q_UINT32 magic, version;
@@ -162,7 +162,7 @@ void BinaryFormat::writeHeader( QDataStream &stream )
stream << magic << version;
}
-void BinaryFormat::loadAddressee( Addressee &addressee, QDataStream &stream )
+void BinaryFormat::loadAddressee( Addressee &addressee, TQDataStream &stream )
{
stream >> addressee;
/*
@@ -171,7 +171,7 @@ void BinaryFormat::loadAddressee( Addressee &addressee, QDataStream &stream )
Picture logo = addressee.logo();
if ( photo.isIntern() ) {
- QImage img;
+ TQImage img;
if ( !img.load( locateLocal( "data", "kabc/photos/" ) + addressee.uid() ) )
kdDebug(5700) << "No photo available for '" << addressee.uid() << "'." << endl;
@@ -179,7 +179,7 @@ void BinaryFormat::loadAddressee( Addressee &addressee, QDataStream &stream )
}
if ( logo.isIntern() ) {
- QImage img;
+ TQImage img;
if ( !img.load( locateLocal( "data", "kabc/logos/" ) + addressee.uid() ) )
kdDebug(5700) << "No logo available for '" << addressee.uid() << "'." << endl;
@@ -191,7 +191,7 @@ void BinaryFormat::loadAddressee( Addressee &addressee, QDataStream &stream )
*/
}
-void BinaryFormat::saveAddressee( const Addressee &addressee, QDataStream &stream )
+void BinaryFormat::saveAddressee( const Addressee &addressee, TQDataStream &stream )
{
stream << addressee;
/*
@@ -200,16 +200,16 @@ void BinaryFormat::saveAddressee( const Addressee &addressee, QDataStream &strea
Picture logo = addressee.logo();
if ( photo.isIntern() ) {
- QImage img = photo.data();
- QString fileName = locateLocal( "data", "kabc/photos/" ) + addressee.uid();
+ TQImage img = photo.data();
+ TQString fileName = locateLocal( "data", "kabc/photos/" ) + addressee.uid();
if ( !img.save( fileName, "PNG" ) )
kdDebug(5700) << "Unable to save photo for '" << addressee.uid() << "'." << endl;
}
if ( logo.isIntern() ) {
- QImage img = logo.data();
- QString fileName = locateLocal( "data", "kabc/logos/" ) + addressee.uid();
+ TQImage img = logo.data();
+ TQString fileName = locateLocal( "data", "kabc/logos/" ) + addressee.uid();
if ( !img.save( fileName, "PNG" ) )
kdDebug(5700) << "Unable to save logo for '" << addressee.uid() << "'." << endl;
diff --git a/kabc/formats/binaryformat.h b/kabc/formats/binaryformat.h
index af4df48bd..09efde41a 100644
--- a/kabc/formats/binaryformat.h
+++ b/kabc/formats/binaryformat.h
@@ -36,33 +36,33 @@ public:
/**
* Load single addressee from file.
*/
- bool load( Addressee &, QFile *file );
+ bool load( Addressee &, TQFile *file );
/**
* Load whole addressee from file.
*/
- bool loadAll( AddressBook *, Resource *, QFile *file );
+ bool loadAll( AddressBook *, Resource *, TQFile *file );
/**
* Save single addressee to file.
*/
- void save( const Addressee &, QFile *file );
+ void save( const Addressee &, TQFile *file );
/**
* Save all addressees to file.
*/
- void saveAll( AddressBook *, Resource *, QFile *file );
+ void saveAll( AddressBook *, Resource *, TQFile *file );
/**
* Check for valid format of a file.
*/
- bool checkFormat( QFile *file ) const;
+ bool checkFormat( TQFile *file ) const;
private:
- void loadAddressee( Addressee &, QDataStream & );
- void saveAddressee( const Addressee &, QDataStream & );
- bool checkHeader( QDataStream & ) const;
- void writeHeader( QDataStream & );
+ void loadAddressee( Addressee &, TQDataStream & );
+ void saveAddressee( const Addressee &, TQDataStream & );
+ bool checkHeader( TQDataStream & ) const;
+ void writeHeader( TQDataStream & );
};
}
diff --git a/kabc/geo.cpp b/kabc/geo.cpp
index 2380f2061..44f9851e4 100644
--- a/kabc/geo.cpp
+++ b/kabc/geo.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include "geo.h"
@@ -88,17 +88,17 @@ bool Geo::operator!=( const Geo &g ) const
return true;
}
-QString Geo::asString() const
+TQString Geo::asString() const
{
- return "(" + QString::number(mLatitude) + "," + QString::number(mLongitude) + ")";
+ return "(" + TQString::number(mLatitude) + "," + TQString::number(mLongitude) + ")";
}
-QDataStream &KABC::operator<<( QDataStream &s, const Geo &geo )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Geo &geo )
{
return s << (float)geo.mLatitude << (float)geo.mLongitude;
}
-QDataStream &KABC::operator>>( QDataStream &s, Geo &geo )
+TQDataStream &KABC::operator>>( TQDataStream &s, Geo &geo )
{
s >> geo.mLatitude >> geo.mLongitude;
diff --git a/kabc/geo.h b/kabc/geo.h
index 318f348d0..019e18199 100644
--- a/kabc/geo.h
+++ b/kabc/geo.h
@@ -21,7 +21,7 @@
#ifndef KABC_GEO_H
#define KABC_GEO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -34,8 +34,8 @@ namespace KABC {
*/
class KABC_EXPORT Geo
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Geo & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Geo & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & );
public:
/**
@@ -82,7 +82,7 @@ class KABC_EXPORT Geo
/**
Returns string representation of geographical position.
*/
- QString asString() const;
+ TQString asString() const;
private:
float mLatitude;
@@ -93,8 +93,8 @@ class KABC_EXPORT Geo
bool mValidLong;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Geo & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Geo & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Geo & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Geo & );
}
diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp
index 2f88218ad..9d8ea75ee 100644
--- a/kabc/kab2kabc.cpp
+++ b/kabc/kab2kabc.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kabapi.h>
#include <kaboutdata.h>
@@ -46,16 +46,16 @@ static const KCmdLineOptions options[] =
KCmdLineLastOption
};
-void readKMailEntry( const QString &kmailEntry, KABC::AddressBook *ab )
+void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )
{
kdDebug() << "KMAILENTRY: " << kmailEntry << endl;
- QString entry = kmailEntry.simplifyWhiteSpace();
+ TQString entry = kmailEntry.simplifyWhiteSpace();
if ( entry.isEmpty() ) return;
- QString email;
- QString name;
- QString comment;
+ TQString email;
+ TQString name;
+ TQString comment;
if ( entry.at( entry.length() -1 ) == ')' ) {
int br = entry.findRev( '(' );
@@ -120,8 +120,8 @@ void readKMailEntry( const QString &kmailEntry, KABC::AddressBook *ab )
void importKMailAddressBook( KABC::AddressBook *ab )
{
- QString fileName = locateLocal( "data", "kmail/addressbook" );
- QString kmailConfigName = locate( "config", "kmailrc" );
+ TQString fileName = locateLocal( "data", "kmail/addressbook" );
+ TQString kmailConfigName = locate( "config", "kmailrc" );
if ( !kmailConfigName.isEmpty() ) {
KConfig cfg( kmailConfigName );
cfg.setGroup( "Addressbook" );
@@ -132,21 +132,21 @@ void importKMailAddressBook( KABC::AddressBook *ab )
return;
}
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open(IO_ReadOnly) ) {
kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl;
return;
}
- QStringList kmailEntries;
+ TQStringList kmailEntries;
- QTextStream t( &f );
+ TQTextStream t( &f );
while ( !t.eof() ) {
kmailEntries.append( t.readLine() );
}
f.close();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) {
if ( (*it).at( 0 ) == '#' ) continue;
bool insideQuote = false;
@@ -167,22 +167,22 @@ void importKMailAddressBook( KABC::AddressBook *ab )
}
}
-void readKAddressBookEntries( const QString &dataString, Addressee &a )
+void readKAddressBookEntries( const TQString &dataString, Addressee &a )
{
// Strip "KMail:1.0" prefix and "[EOS]" suffix.
- QString str = dataString.mid( 11, dataString.length() - 24 );
+ TQString str = dataString.mid( 11, dataString.length() - 24 );
- QStringList entries = QStringList::split( "\n[EOR]\n ", str );
+ TQStringList entries = TQStringList::split( "\n[EOR]\n ", str );
Address homeAddress( Address::Home );
Address businessAddress( Address::Work );
Address otherAddress;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = entries.begin(); it != entries.end(); ++it ) {
int pos = (*it).find( "\n" );
- QString fieldName = (*it).left( pos );
- QString fieldValue = (*it).mid( pos + 2 );
+ TQString fieldName = (*it).left( pos );
+ TQString fieldValue = (*it).mid( pos + 2 );
if ( fieldName == "X-HomeFax" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home |
@@ -280,9 +280,9 @@ void readKAddressBookEntries( const QString &dataString, Addressee &a )
void importKab( KABC::AddressBook *ab, bool override, bool quiet )
{
- QString fileName = KGlobal::dirs()->saveLocation( "data", "kab/" );
+ TQString fileName = KGlobal::dirs()->saveLocation( "data", "kab/" );
fileName += "addressbook.kab";
- if ( !QFile::exists( fileName ) ) {
+ if ( !TQFile::exists( fileName ) ) {
if ( !quiet ) {
KMessageBox::error( 0, "<qt>" + i18n( "Address book file <b>%1</b> not found! Make sure the old address book is located there and you have read permission for this file." )
.arg( fileName ) + "</qt>" );
@@ -322,7 +322,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
// Convert custom entries
int count = 0;
bool idFound = false;
- QStringList::ConstIterator customIt;
+ TQStringList::ConstIterator customIt;
for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) {
if ( (*customIt).startsWith( "X-KABC-UID:" ) ) {
a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) );
@@ -330,7 +330,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
} else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) {
readKAddressBookEntries( *customIt, a );
} else {
- a.insertCustom( "kab2kabc", QString::number( count++ ), *customIt );
+ a.insertCustom( "kab2kabc", TQString::number( count++ ), *customIt );
}
}
if ( idFound ) {
@@ -353,15 +353,15 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
a.setFamilyName( entry.lastname );
a.setBirthday( entry.birthday );
- QStringList::ConstIterator emailIt;
+ TQStringList::ConstIterator emailIt;
for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt )
a.insertEmail( *emailIt );
- QStringList::ConstIterator phoneIt;
+ TQStringList::ConstIterator phoneIt;
for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) {
int kabType = (*phoneIt++).toInt();
if ( phoneIt == entry.telephone.end() ) break;
- QString number = *phoneIt;
+ TQString number = *phoneIt;
int type = 0;
if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice;
else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice;
@@ -390,7 +390,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
adr.setCountry( kabAddress.country );
adr.setRegion( kabAddress.state );
- QString label;
+ TQString label;
if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n";
if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n";
if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n";
@@ -402,7 +402,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
a.insertAddress( adr );
}
- QString note = entry.comment;
+ TQString note = entry.comment;
if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1;
if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2;
@@ -411,7 +411,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " );
- QStringList::ConstIterator talkIt;
+ TQStringList::ConstIterator talkIt;
for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) {
note += "\nTalk: " + (*talkIt);
}
diff --git a/kabc/key.cpp b/kabc/key.cpp
index e4fe50f2e..0d917595d 100644
--- a/kabc/key.cpp
+++ b/kabc/key.cpp
@@ -25,7 +25,7 @@
using namespace KABC;
-Key::Key( const QString &text, int type )
+Key::Key( const TQString &text, int type )
: mTextData( text ), mIsBinary( false ), mType( type )
{
mId = KApplication::randomString(8);
@@ -53,34 +53,34 @@ bool Key::operator!=( const Key &k ) const
return !( k == *this );
}
-void Key::setId( const QString &id )
+void Key::setId( const TQString &id )
{
mId = id;
}
-QString Key::id() const
+TQString Key::id() const
{
return mId;
}
-void Key::setBinaryData( const QByteArray &binary )
+void Key::setBinaryData( const TQByteArray &binary )
{
mBinaryData = binary;
mIsBinary = true;
}
-QByteArray Key::binaryData() const
+TQByteArray Key::binaryData() const
{
return mBinaryData;
}
-void Key::setTextData( const QString &text )
+void Key::setTextData( const TQString &text )
{
mTextData = text;
mIsBinary = false;
}
-QString Key::textData() const
+TQString Key::textData() const
{
return mTextData;
}
@@ -95,7 +95,7 @@ void Key::setType( int type )
mType = type;
}
-void Key::setCustomTypeString( const QString &custom )
+void Key::setCustomTypeString( const TQString &custom )
{
mCustomTypeString = custom;
}
@@ -105,7 +105,7 @@ int Key::type() const
return mType;
}
-QString Key::customTypeString() const
+TQString Key::customTypeString() const
{
return mCustomTypeString;
}
@@ -120,7 +120,7 @@ Key::TypeList Key::typeList()
return list;
}
-QString Key::typeLabel( int type )
+TQString Key::typeLabel( int type )
{
switch ( type ) {
case X509:
@@ -138,13 +138,13 @@ QString Key::typeLabel( int type )
}
}
-QDataStream &KABC::operator<<( QDataStream &s, const Key &key )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Key &key )
{
return s << key.mId << key.mIsBinary << key.mTextData << key.mBinaryData <<
key.mCustomTypeString << key.mType;
}
-QDataStream &KABC::operator>>( QDataStream &s, Key &key )
+TQDataStream &KABC::operator>>( TQDataStream &s, Key &key )
{
s >> key.mId >> key.mIsBinary >> key.mTextData >> key.mBinaryData >>
key.mCustomTypeString >> key.mType;
diff --git a/kabc/key.h b/kabc/key.h
index 8c91fd6cf..ecc4492d8 100644
--- a/kabc/key.h
+++ b/kabc/key.h
@@ -21,7 +21,7 @@
#ifndef KABC_KEY_H
#define KABC_KEY_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -32,12 +32,12 @@ namespace KABC {
*/
class KABC_EXPORT Key
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Key & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Key & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & );
public:
- typedef QValueList<Key> List;
- typedef QValueList<int> TypeList;
+ typedef TQValueList<Key> List;
+ typedef TQValueList<int> TypeList;
/**
* Key types
@@ -58,7 +58,7 @@ public:
* @param text The text data.
* @param type The key type, see Types.
*/
- Key( const QString &text = QString::null, int type = PGP );
+ Key( const TQString &text = TQString::null, int type = PGP );
/**
* Destructor.
@@ -71,32 +71,32 @@ public:
/**
* Sets the unique identifier.
*/
- void setId( const QString &id );
+ void setId( const TQString &id );
/**
* Returns the unique identifier.
*/
- QString id() const;
+ TQString id() const;
/**
* Sets binary data.
*/
- void setBinaryData( const QByteArray &binary );
+ void setBinaryData( const TQByteArray &binary );
/**
* Returns the binary data.
*/
- QByteArray binaryData() const;
+ TQByteArray binaryData() const;
/**
* Sets text data.
*/
- void setTextData( const QString &text );
+ void setTextData( const TQString &text );
/**
* Returns the text data.
*/
- QString textData() const;
+ TQString textData() const;
/**
* Returns whether the key contains binary or text data.
@@ -111,7 +111,7 @@ public:
/**
* Sets custom type string.
*/
- void setCustomTypeString( const QString &custom );
+ void setCustomTypeString( const TQString &custom );
/**
* Returns the type, see Type.
@@ -121,7 +121,7 @@ public:
/**
* Returns the custom type string.
*/
- QString customTypeString() const;
+ TQString customTypeString() const;
/**
* Returns a list of all available key types.
@@ -131,20 +131,20 @@ public:
/**
* Returns a translated label for a given key type.
*/
- static QString typeLabel( int type );
+ static TQString typeLabel( int type );
private:
- QByteArray mBinaryData;
- QString mId;
- QString mTextData;
- QString mCustomTypeString;
+ TQByteArray mBinaryData;
+ TQString mId;
+ TQString mTextData;
+ TQString mCustomTypeString;
int mIsBinary;
int mType;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Key & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Key & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Key & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Key & );
}
#endif
diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp
index 3e73b1c59..724f039ec 100644
--- a/kabc/ldapclient.cpp
+++ b/kabc/ldapclient.cpp
@@ -22,12 +22,12 @@
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qtextstream.h>
-#include <qurl.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqtextstream.h>
+#include <tqurl.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -43,18 +43,18 @@ using namespace KABC;
class LdapClient::LdapClientPrivate{
public:
- QString bindDN;
- QString pwdBindDN;
+ TQString bindDN;
+ TQString pwdBindDN;
LDIF ldif;
};
-QString LdapObject::toString() const
+TQString LdapObject::toString() const
{
- QString result = QString::fromLatin1( "\ndn: %1\n" ).arg( dn );
+ TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn );
for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) {
- QString attr = it.key();
+ TQString attr = it.key();
for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) {
- result += QString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
+ result += TQString::fromUtf8( LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
}
}
@@ -63,7 +63,7 @@ QString LdapObject::toString() const
void LdapObject::clear()
{
- dn = QString::null;
+ dn = TQString::null;
attrs.clear();
}
@@ -76,8 +76,8 @@ void LdapObject::assign( const LdapObject& that )
}
}
-LdapClient::LdapClient( QObject* parent, const char* name )
- : QObject( parent, name ), mJob( 0 ), mActive( false )
+LdapClient::LdapClient( TQObject* parent, const char* name )
+ : TQObject( parent, name ), mJob( 0 ), mActive( false )
{
d = new LdapClientPrivate;
}
@@ -88,37 +88,37 @@ LdapClient::~LdapClient()
delete d; d = 0;
}
-void LdapClient::setHost( const QString& host )
+void LdapClient::setHost( const TQString& host )
{
mHost = host;
}
-void LdapClient::setPort( const QString& port )
+void LdapClient::setPort( const TQString& port )
{
mPort = port;
}
-void LdapClient::setBase( const QString& base )
+void LdapClient::setBase( const TQString& base )
{
mBase = base;
}
-void LdapClient::setBindDN( const QString& bindDN )
+void LdapClient::setBindDN( const TQString& bindDN )
{
d->bindDN = bindDN;
}
-void LdapClient::setPwdBindDN( const QString& pwdBindDN )
+void LdapClient::setPwdBindDN( const TQString& pwdBindDN )
{
d->pwdBindDN = pwdBindDN;
}
-void LdapClient::setAttrs( const QStringList& attrs )
+void LdapClient::setAttrs( const TQStringList& attrs )
{
mAttrs = attrs;
}
-void LdapClient::startQuery( const QString& filter )
+void LdapClient::startQuery( const TQString& filter )
{
cancelQuery();
LDAPUrl url;
@@ -138,12 +138,12 @@ void LdapClient::startQuery( const QString& filter )
startParseLDIF();
mActive = true;
mJob = KIO::get( url, false, false );
- connect( mJob, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( mJob, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
- connect( mJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotDone() ) );
+ connect( mJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( mJob, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotDone() ) );
}
void LdapClient::cancelQuery()
@@ -156,16 +156,16 @@ void LdapClient::cancelQuery()
mActive = false;
}
-void LdapClient::slotData( KIO::Job*, const QByteArray& data )
+void LdapClient::slotData( KIO::Job*, const TQByteArray& data )
{
#ifndef NDEBUG // don't create the QString
-// QString str( data );
+// TQString str( data );
// kdDebug(5700) << "LdapClient: Got \"" << str << "\"\n";
#endif
parseLDIF( data );
}
-void LdapClient::slotInfoMessage( KIO::Job*, const QString & )
+void LdapClient::slotInfoMessage( KIO::Job*, const TQString & )
{
//qDebug("Job said \"%s\"", info.latin1());
}
@@ -175,13 +175,13 @@ void LdapClient::slotDone()
endParseLDIF();
mActive = false;
#if 0
- for ( QValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) {
+ for ( TQValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) {
qDebug( (*it).toString().latin1() );
}
#endif
int err = mJob->error();
if ( err && err != KIO::ERR_USER_CANCELED ) {
- emit error( KIO::buildErrorString( err, QString("%1:%2").arg( mHost ).arg( mPort ) ) );
+ emit error( KIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) );
}
emit done();
}
@@ -199,7 +199,7 @@ void LdapClient::endParseLDIF()
{
}
-void LdapClient::parseLDIF( const QByteArray& data )
+void LdapClient::parseLDIF( const TQByteArray& data )
{
if ( data.size() ) {
d->ldif.setLDIF( data );
@@ -208,15 +208,15 @@ void LdapClient::parseLDIF( const QByteArray& data )
}
LDIF::ParseVal ret;
- QString name;
+ TQString name;
do {
ret = d->ldif.nextItem();
switch ( ret ) {
case LDIF::Item:
{
name = d->ldif.attr();
- // Must make a copy! QByteArray is explicitely shared
- QByteArray value = d->ldif.val().copy();
+ // Must make a copy! TQByteArray is explicitely shared
+ TQByteArray value = d->ldif.val().copy();
mCurrentObject.attrs[ name ].append( value );
break;
}
@@ -232,12 +232,12 @@ void LdapClient::parseLDIF( const QByteArray& data )
} while ( ret != LDIF::MoreData );
}
-QString LdapClient::bindDN() const
+TQString LdapClient::bindDN() const
{
return d->bindDN;
}
-QString LdapClient::pwdBindDN() const
+TQString LdapClient::pwdBindDN() const
{
return d->pwdBindDN;
}
@@ -261,45 +261,45 @@ LdapSearch::LdapSearch()
for ( int j = 0; j < numHosts; j++ ) {
LdapClient* ldapClient = new LdapClient( this );
- QString host = config.readEntry( QString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString host = config.readEntry( TQString( "SelectedHost%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !host.isEmpty() )
ldapClient->setHost( host );
- QString port = QString::number( config.readUnsignedNumEntry( QString( "SelectedPort%1" ).arg( j ) ) );
+ TQString port = TQString::number( config.readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) ) );
if ( !port.isEmpty() )
ldapClient->setPort( port );
- QString base = config.readEntry( QString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString base = config.readEntry( TQString( "SelectedBase%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !base.isEmpty() )
ldapClient->setBase( base );
- QString bindDN = config.readEntry( QString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace();
+ TQString bindDN = config.readEntry( TQString( "SelectedBind%1" ).arg( j ) ).stripWhiteSpace();
if ( !bindDN.isEmpty() )
ldapClient->setBindDN( bindDN );
- QString pwdBindDN = config.readEntry( QString( "SelectedPwdBind%1" ).arg( j ) );
+ TQString pwdBindDN = config.readEntry( TQString( "SelectedPwdBind%1" ).arg( j ) );
if ( !pwdBindDN.isEmpty() )
ldapClient->setPwdBindDN( pwdBindDN );
- QStringList attrs;
+ TQStringList attrs;
attrs << "cn" << "mail" << "givenname" << "sn";
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KABC::LdapObject& ) ),
- this, SLOT( slotLDAPResult( const KABC::LdapObject& ) ) );
- connect( ldapClient, SIGNAL( done() ),
- this, SLOT( slotLDAPDone() ) );
- connect( ldapClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotLDAPError( const QString& ) ) );
+ connect( ldapClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ),
+ this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) );
+ connect( ldapClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotLDAPDone() ) );
+ connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotLDAPError( const TQString& ) ) );
mClients.append( ldapClient );
}
}
- connect( &mDataTimer, SIGNAL( timeout() ), SLOT( slotDataTimer() ) );
+ connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) );
}
-void LdapSearch::startSearch( const QString& txt )
+void LdapSearch::startSearch( const TQString& txt )
{
if ( mNoLDAPLookup )
return;
@@ -318,10 +318,10 @@ void LdapSearch::startSearch( const QString& txt )
} else
mSearchText = txt;
- QString filter = QString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" )
+ TQString filter = TQString( "|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*)" )
.arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText );
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it ) {
(*it)->startQuery( filter );
++mActiveClients;
@@ -330,7 +330,7 @@ void LdapSearch::startSearch( const QString& txt )
void LdapSearch::cancelSearch()
{
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it )
(*it)->cancelQuery();
@@ -345,7 +345,7 @@ void LdapSearch::slotLDAPResult( const KABC::LdapObject& obj )
mDataTimer.start( 500, true );
}
-void LdapSearch::slotLDAPError( const QString& )
+void LdapSearch::slotLDAPError( const TQString& )
{
slotLDAPDone();
}
@@ -360,7 +360,7 @@ void LdapSearch::slotLDAPDone()
void LdapSearch::slotDataTimer()
{
- QStringList lst;
+ TQStringList lst;
LdapResultList reslist;
makeSearchData( lst, reslist );
if ( !lst.isEmpty() )
@@ -377,17 +377,17 @@ void LdapSearch::finish()
emit searchDone();
}
-void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
+void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList )
{
- QString search_text_upper = mSearchText.upper();
+ TQString search_text_upper = mSearchText.upper();
- QValueList< KABC::LdapObject >::ConstIterator it1;
+ TQValueList< KABC::LdapObject >::ConstIterator it1;
for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) {
- QString name, mail, givenname, sn;
+ TQString name, mail, givenname, sn;
LdapAttrMap::ConstIterator it2;
for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) {
- QString tmp = QString::fromUtf8( (*it2).first(), (*it2).first().size() );
+ TQString tmp = TQString::fromUtf8( (*it2).first(), (*it2).first().size() );
if ( it2.key() == "cn" )
name = tmp; // TODO loop?
else if( it2.key() == "mail" )
@@ -404,7 +404,7 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
ret.append( mail );
else {
kdDebug(5700) << "<" << name << "><" << mail << ">" << endl;
- ret.append( QString( "%1 <%2>" ).arg( name ).arg( mail ) );
+ ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) );
}
LdapResult sr;
diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h
index a7bb89ddd..b4ee9d749 100644
--- a/kabc/ldapclient.h
+++ b/kabc/ldapclient.h
@@ -23,21 +23,21 @@
#define KABC_LDAPCLIENT_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qmemarray.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqmemarray.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
#include <kio/job.h>
namespace KABC {
class LdapClient;
-typedef QValueList<QByteArray> LdapAttrValue;
-typedef QMap<QString,LdapAttrValue > LdapAttrMap;
+typedef TQValueList<TQByteArray> LdapAttrValue;
+typedef TQMap<TQString,LdapAttrValue > LdapAttrMap;
/**
* This class is internal. Binary compatibiliy might be broken any time
@@ -50,8 +50,8 @@ class KABC_EXPORT LdapObject
{
public:
LdapObject()
- : dn( QString::null ), client( 0 ) {}
- explicit LdapObject( const QString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
+ : dn( TQString::null ), client( 0 ) {}
+ explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
LdapObject( const LdapObject& that ) { assign( that ); }
LdapObject& operator=( const LdapObject& that )
@@ -60,11 +60,11 @@ class KABC_EXPORT LdapObject
return *this;
}
- QString toString() const;
+ TQString toString() const;
void clear();
- QString dn;
+ TQString dn;
LdapAttrMap attrs;
LdapClient* client;
@@ -87,7 +87,7 @@ class KABC_EXPORT LdapClient : public QObject
Q_OBJECT
public:
- LdapClient( QObject* parent = 0, const char* name = 0 );
+ LdapClient( TQObject* parent = 0, const char* name = 0 );
virtual ~LdapClient();
/*! returns true if there is a query running */
@@ -98,7 +98,7 @@ class KABC_EXPORT LdapClient : public QObject
void done();
/*! Emitted in case of error */
- void error( const QString& );
+ void error( const TQString& );
/*! Emitted once for each object returned
* from the query
@@ -109,47 +109,47 @@ class KABC_EXPORT LdapClient : public QObject
/*!
* Set the name or IP of the LDAP server
*/
- void setHost( const QString& host );
- QString host() const { return mHost; }
+ void setHost( const TQString& host );
+ TQString host() const { return mHost; }
/*!
* Set the port of the LDAP server
* if using a nonstandard port
*/
- void setPort( const QString& port );
- QString port() const { return mPort; }
+ void setPort( const TQString& port );
+ TQString port() const { return mPort; }
/*!
* Set the base DN
*/
- void setBase( const QString& base );
- QString base() const { return mBase; }
+ void setBase( const TQString& base );
+ TQString base() const { return mBase; }
/*!
* Set the bind DN
*/
- void setBindDN( const QString& bindDN );
- QString bindDN() const;
+ void setBindDN( const TQString& bindDN );
+ TQString bindDN() const;
/*!
* Set the bind password DN
*/
- void setPwdBindDN( const QString& pwdBindDN );
- QString pwdBindDN() const;
+ void setPwdBindDN( const TQString& pwdBindDN );
+ TQString pwdBindDN() const;
/*! Set the attributes that should be
* returned, or an empty list if
* all attributes are wanted
*/
- void setAttrs( const QStringList& attrs );
- QStringList attrs() const { return mAttrs; }
+ void setAttrs( const TQStringList& attrs );
+ TQStringList attrs() const { return mAttrs; }
- void setScope( const QString scope ) { mScope = scope; }
+ void setScope( const TQString scope ) { mScope = scope; }
/*!
* Start the query with filter filter
*/
- void startQuery( const QString& filter );
+ void startQuery( const TQString& filter );
/*!
* Abort a running query
@@ -157,28 +157,28 @@ class KABC_EXPORT LdapClient : public QObject
void cancelQuery();
protected slots:
- void slotData( KIO::Job*, const QByteArray &data );
- void slotInfoMessage( KIO::Job*, const QString &info );
+ void slotData( KIO::Job*, const TQByteArray &data );
+ void slotInfoMessage( KIO::Job*, const TQString &info );
void slotDone();
protected:
void startParseLDIF();
- void parseLDIF( const QByteArray& data );
+ void parseLDIF( const TQByteArray& data );
void endParseLDIF();
- QString mHost;
- QString mPort;
- QString mBase;
- QString mScope;
- QStringList mAttrs;
+ TQString mHost;
+ TQString mPort;
+ TQString mBase;
+ TQString mScope;
+ TQStringList mAttrs;
- QGuardedPtr<KIO::SimpleJob> mJob;
+ TQGuardedPtr<KIO::SimpleJob> mJob;
bool mActive;
LdapObject mCurrentObject;
- QCString mBuf;
- QCString mLastAttrName;
- QCString mLastAttrValue;
+ TQCString mBuf;
+ TQCString mLastAttrName;
+ TQCString mLastAttrValue;
bool mIsBase64;
private:
@@ -190,11 +190,11 @@ class KABC_EXPORT LdapClient : public QObject
* Structure describing one result returned by a LDAP query
*/
struct LdapResult {
- QString name; ///< full name
- QString email; ///< email
+ TQString name; ///< full name
+ TQString email; ///< email
int clientNumber; ///< for sorting
};
-typedef QValueList<LdapResult> LdapResultList;
+typedef TQValueList<LdapResult> LdapResultList;
/**
@@ -211,14 +211,14 @@ class KABC_EXPORT LdapSearch : public QObject
public:
LdapSearch();
- void startSearch( const QString& txt );
+ void startSearch( const TQString& txt );
void cancelSearch();
bool isAvailable() const;
signals:
/// Results, assembled as "Full Name <email>"
/// (This signal can be emitted many times)
- void searchData( const QStringList& );
+ void searchData( const TQStringList& );
/// Another form for the results, with separate fields
/// (This signal can be emitted many times)
void searchData( const KABC::LdapResultList& );
@@ -226,19 +226,19 @@ class KABC_EXPORT LdapSearch : public QObject
private slots:
void slotLDAPResult( const KABC::LdapObject& );
- void slotLDAPError( const QString& );
+ void slotLDAPError( const TQString& );
void slotLDAPDone();
void slotDataTimer();
private:
void finish();
- void makeSearchData( QStringList& ret, LdapResultList& resList );
- QValueList< LdapClient* > mClients;
- QString mSearchText;
- QTimer mDataTimer;
+ void makeSearchData( TQStringList& ret, LdapResultList& resList );
+ TQValueList< LdapClient* > mClients;
+ TQString mSearchText;
+ TQTimer mDataTimer;
int mActiveClients;
bool mNoLDAPLookup;
- QValueList< LdapObject > mResults;
+ TQValueList< LdapObject > mResults;
private:
class LdapSearchPrivate* d;
diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp
index b144b2db5..a4b7fc571 100644
--- a/kabc/ldapconfigwidget.cpp
+++ b/kabc/ldapconfigwidget.cpp
@@ -17,17 +17,17 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-
-#include <qobjectlist.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqapplication.h>
+
+#include <tqobjectlist.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
#include <kmessagebox.h>
#include <kaccelmanager.h>
@@ -44,21 +44,21 @@
using namespace KABC;
-LdapConfigWidget::LdapConfigWidget( QWidget* parent,
- const char* name, WFlags fl ) : QWidget( parent, name, fl )
+LdapConfigWidget::LdapConfigWidget( TQWidget* parent,
+ const char* name, WFlags fl ) : TQWidget( parent, name, fl )
{
mProg = 0;
mFlags = 0;
- mainLayout = new QGridLayout( this, 12, 4, 0,
+ mainLayout = new TQGridLayout( this, 12, 4, 0,
KDialog::spacingHint() );
}
-LdapConfigWidget::LdapConfigWidget( int flags, QWidget* parent,
- const char* name, WFlags fl ) : QWidget( parent, name, fl )
+LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent,
+ const char* name, WFlags fl ) : TQWidget( parent, name, fl )
{
mFlags = flags;
mProg = 0;
- mainLayout = new QGridLayout( this, 12, 4, 0,
+ mainLayout = new TQGridLayout( this, 12, 4, 0,
KDialog::spacingHint() );
initWidget();
}
@@ -69,7 +69,7 @@ LdapConfigWidget::~LdapConfigWidget()
void LdapConfigWidget::initWidget()
{
- QLabel *label;
+ TQLabel *label;
mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0;
mPort = mVer = mTimeLimit = mSizeLimit = 0;
@@ -80,7 +80,7 @@ void LdapConfigWidget::initWidget()
int col;
if ( mFlags & W_USER ) {
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this, "kcfg_ldapuser" );
mainLayout->addWidget( label, row, 0 );
@@ -89,7 +89,7 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_BINDDN ) {
- label = new QLabel( i18n( "Bind DN:" ), this );
+ label = new TQLabel( i18n( "Bind DN:" ), this );
mBindDN = new KLineEdit( this, "kcfg_ldapbinddn" );
mainLayout->addWidget( label, row, 0 );
@@ -98,7 +98,7 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_REALM ) {
- label = new QLabel( i18n( "Realm:" ), this );
+ label = new TQLabel( i18n( "Realm:" ), this );
mRealm = new KLineEdit( this, "kcfg_ldaprealm" );
mainLayout->addWidget( label, row, 0 );
@@ -107,7 +107,7 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_PASS ) {
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this, "kcfg_ldappassword" );
mPassword->setEchoMode( KLineEdit::Password );
@@ -117,7 +117,7 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_HOST ) {
- label = new QLabel( i18n( "Host:" ), this );
+ label = new TQLabel( i18n( "Host:" ), this );
mHost = new KLineEdit( this, "kcfg_ldaphost" );
mainLayout->addWidget( label, row, 0 );
@@ -127,9 +127,9 @@ void LdapConfigWidget::initWidget()
col = 0;
if ( mFlags & W_PORT ) {
- label = new QLabel( i18n( "Port:" ), this );
- mPort = new QSpinBox( 0, 65535, 1, this, "kcfg_ldapport" );
- mPort->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
+ label = new TQLabel( i18n( "Port:" ), this );
+ mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" );
+ mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
mPort->setValue( 389 );
mainLayout->addWidget( label, row, col );
@@ -138,9 +138,9 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_VER ) {
- label = new QLabel( i18n( "LDAP version:" ), this );
- mVer = new QSpinBox( 2, 3, 1, this, "kcfg_ldapver" );
- mVer->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
+ label = new TQLabel( i18n( "LDAP version:" ), this );
+ mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" );
+ mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
mVer->setValue( 3 );
mainLayout->addWidget( label, row, col );
mainLayout->addWidget( mVer, row, col+1 );
@@ -149,9 +149,9 @@ void LdapConfigWidget::initWidget()
col = 0;
if ( mFlags & W_SIZELIMIT ) {
- label = new QLabel( i18n( "Size limit:" ), this );
- mSizeLimit = new QSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" );
- mSizeLimit->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
+ label = new TQLabel( i18n( "Size limit:" ), this );
+ mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" );
+ mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
mSizeLimit->setValue( 0 );
mSizeLimit->setSpecialValueText( i18n("Default") );
mainLayout->addWidget( label, row, col );
@@ -160,9 +160,9 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_TIMELIMIT ) {
- label = new QLabel( i18n( "Time limit:" ), this );
- mTimeLimit = new QSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" );
- mTimeLimit->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
+ label = new TQLabel( i18n( "Time limit:" ), this );
+ mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" );
+ mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) );
mTimeLimit->setValue( 0 );
mTimeLimit->setSuffix( i18n(" sec") );
mTimeLimit->setSpecialValueText( i18n("Default") );
@@ -172,22 +172,22 @@ void LdapConfigWidget::initWidget()
if ( mFlags & ( W_SIZELIMIT | W_TIMELIMIT ) ) row++;
if ( mFlags & W_DN ) {
- label = new QLabel( i18n( "Distinguished Name", "DN:" ), this );
+ label = new TQLabel( i18n( "Distinguished Name", "DN:" ), this );
mDn = new KLineEdit( this, "kcfg_ldapdn" );
mainLayout->addWidget( label, row, 0 );
mainLayout->addMultiCellWidget( mDn, row, row, 1, 1 );
//without host query doesn't make sense
if ( mHost ) {
- QPushButton *dnquery = new QPushButton( i18n( "Query Server" ), this );
- connect( dnquery, SIGNAL( clicked() ), SLOT( mQueryDNClicked() ) );
+ TQPushButton *dnquery = new TQPushButton( i18n( "Query Server" ), this );
+ connect( dnquery, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryDNClicked() ) );
mainLayout->addMultiCellWidget( dnquery, row, row, 2, 3 );
}
row++;
}
if ( mFlags & W_FILTER ) {
- label = new QLabel( i18n( "Filter:" ), this );
+ label = new TQLabel( i18n( "Filter:" ), this );
mFilter = new KLineEdit( this, "kcfg_ldapfilter" );
mainLayout->addWidget( label, row, 0 );
@@ -196,15 +196,15 @@ void LdapConfigWidget::initWidget()
}
if ( mFlags & W_SECBOX ) {
- QHButtonGroup *btgroup = new QHButtonGroup( i18n( "Security" ), this );
- mSecNO = new QRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" );
- mSecTLS = new QRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" );
- mSecSSL = new QRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" );
+ TQHButtonGroup *btgroup = new TQHButtonGroup( i18n( "Security" ), this );
+ mSecNO = new TQRadioButton( i18n( "No" ), btgroup, "kcfg_ldapnosec" );
+ mSecTLS = new TQRadioButton( i18n( "TLS" ), btgroup, "kcfg_ldaptls" );
+ mSecSSL = new TQRadioButton( i18n( "SSL" ), btgroup, "kcfg_ldapssl" );
mainLayout->addMultiCellWidget( btgroup, row, row, 0, 3 );
- connect( mSecNO, SIGNAL( clicked() ), SLOT( setLDAPPort() ) );
- connect( mSecTLS, SIGNAL( clicked() ), SLOT( setLDAPPort() ) );
- connect( mSecSSL, SIGNAL( clicked() ), SLOT( setLDAPSPort( ) ) );
+ connect( mSecNO, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) );
+ connect( mSecTLS, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPPort() ) );
+ connect( mSecSSL, TQT_SIGNAL( clicked() ), TQT_SLOT( setLDAPSPort( ) ) );
mSecNO->setChecked( true );
row++;
@@ -212,14 +212,14 @@ void LdapConfigWidget::initWidget()
if ( mFlags & W_AUTHBOX ) {
- QButtonGroup *authbox =
- new QButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this );
+ TQButtonGroup *authbox =
+ new TQButtonGroup( 3, Qt::Horizontal, i18n( "Authentication" ), this );
- mAnonymous = new QRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" );
- mSimple = new QRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" );
- mSASL = new QRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" );
+ mAnonymous = new TQRadioButton( i18n( "Anonymous" ), authbox, "kcfg_ldapanon" );
+ mSimple = new TQRadioButton( i18n( "Simple" ), authbox, "kcfg_ldapsimple" );
+ mSASL = new TQRadioButton( i18n( "SASL" ), authbox, "kcfg_ldapsasl" );
- label = new QLabel( i18n( "SASL mechanism:" ), authbox );
+ label = new TQLabel( i18n( "SASL mechanism:" ), authbox );
mMech = new KComboBox( false, authbox, "kcfg_ldapsaslmech" );
mMech->setEditable( true );
mMech->insertItem( "DIGEST-MD5" );
@@ -228,22 +228,22 @@ void LdapConfigWidget::initWidget()
//without host query doesn't make sense
if ( mHost ) {
- mQueryMech = new QPushButton( i18n( "Query Server" ), authbox );
- connect( mQueryMech, SIGNAL( clicked() ), SLOT( mQueryMechClicked() ) );
+ mQueryMech = new TQPushButton( i18n( "Query Server" ), authbox );
+ connect( mQueryMech, TQT_SIGNAL( clicked() ), TQT_SLOT( mQueryMechClicked() ) );
}
mainLayout->addMultiCellWidget( authbox, row, row+1, 0, 3 );
- connect( mAnonymous, SIGNAL( stateChanged(int) ), SLOT( setAnonymous(int) ) );
- connect( mSimple, SIGNAL( stateChanged(int) ), SLOT( setSimple(int) ) );
- connect( mSASL, SIGNAL( stateChanged(int) ), SLOT( setSASL(int) ) );
+ connect( mAnonymous, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setAnonymous(int) ) );
+ connect( mSimple, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSimple(int) ) );
+ connect( mSASL, TQT_SIGNAL( stateChanged(int) ), TQT_SLOT( setSASL(int) ) );
mAnonymous->setChecked( true );
}
}
-void LdapConfigWidget::loadData( KIO::Job*, const QByteArray& d )
+void LdapConfigWidget::loadData( KIO::Job*, const TQByteArray& d )
{
LDIF::ParseVal ret;
@@ -256,7 +256,7 @@ void LdapConfigWidget::loadData( KIO::Job*, const QByteArray& d )
ret = mLdif.nextItem();
if ( ret == LDIF::Item && mLdif.attr().lower() == mAttr ) {
mProg->progressBar()->advance( 1 );
- mQResult.push_back( QString::fromUtf8( mLdif.val(), mLdif.val().size() ) );
+ mQResult.push_back( TQString::fromUtf8( mLdif.val(), mLdif.val().size() ) );
}
} while ( ret != LDIF::MoreData );
}
@@ -286,17 +286,17 @@ void LdapConfigWidget::sendQuery()
_url.setDn( "" );
_url.setAttributes( mAttr );
_url.setScope( LDAPUrl::Base );
- if ( mVer ) _url.setExtension( "x-ver", QString::number( mVer->value() ) );
+ if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) );
if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls", "" );
kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl;
mLdif.startParsing();
KIO::Job *job = KIO::get( _url, true, false );
job->addMetaData("no-auth-prompt","true");
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( loadData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( loadResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( loadData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( loadResult( KIO::Job* ) ) );
if ( mProg == NULL )
mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true );
@@ -333,7 +333,7 @@ void LdapConfigWidget::mQueryDNClicked()
void LdapConfigWidget::setAnonymous( int state )
{
- if ( state == QButton::Off ) return;
+ if ( state == TQButton::Off ) return;
if ( mUser ) mUser->setEnabled(false);
if ( mPassword ) mPassword->setEnabled(false);
if ( mBindDN ) mBindDN->setEnabled(false);
@@ -344,7 +344,7 @@ void LdapConfigWidget::setAnonymous( int state )
void LdapConfigWidget::setSimple( int state )
{
- if ( state == QButton::Off ) return;
+ if ( state == TQButton::Off ) return;
if ( mUser ) mUser->setEnabled(true);
if ( mPassword ) mPassword->setEnabled(true);
if ( mBindDN ) mBindDN->setEnabled(false);
@@ -355,7 +355,7 @@ void LdapConfigWidget::setSimple( int state )
void LdapConfigWidget::setSASL( int state )
{
- if ( state == QButton::Off ) return;
+ if ( state == TQButton::Off ) return;
if ( mUser ) mUser->setEnabled(true);
if ( mPassword ) mPassword->setEnabled(true);
if ( mBindDN ) mBindDN->setEnabled(true);
@@ -388,11 +388,11 @@ LDAPUrl LdapConfigWidget::url() const
if ( mHost ) _url.setHost( mHost->text() );
if ( mPort ) _url.setPort( mPort->value() );
if ( mDn ) _url.setDn( mDn->text() );
- if ( mVer ) _url.setExtension( "x-ver", QString::number( mVer->value() ) );
+ if ( mVer ) _url.setExtension( "x-ver", TQString::number( mVer->value() ) );
if ( mSizeLimit && mSizeLimit->value() != 0 )
- _url.setExtension( "x-sizelimit", QString::number( mSizeLimit->value() ) );
+ _url.setExtension( "x-sizelimit", TQString::number( mSizeLimit->value() ) );
if ( mTimeLimit && mTimeLimit->value() != 0 )
- _url.setExtension( "x-timelimit", QString::number( mTimeLimit->value() ) );
+ _url.setExtension( "x-timelimit", TQString::number( mTimeLimit->value() ) );
if ( mSecTLS && mSecTLS->isChecked() ) _url.setExtension( "x-tls","" );
if ( mFilter && !mFilter->text().isEmpty() )
_url.setFilter( mFilter->text() );
@@ -407,54 +407,54 @@ LDAPUrl LdapConfigWidget::url() const
return ( _url );
}
-void LdapConfigWidget::setUser( const QString &user )
+void LdapConfigWidget::setUser( const TQString &user )
{
if ( mUser ) mUser->setText( user );
}
-QString LdapConfigWidget::user() const
+TQString LdapConfigWidget::user() const
{
- return ( mUser ? mUser->text() : QString::null );
+ return ( mUser ? mUser->text() : TQString::null );
}
-void LdapConfigWidget::setPassword( const QString &password )
+void LdapConfigWidget::setPassword( const TQString &password )
{
if ( mPassword ) mPassword->setText( password );
}
-QString LdapConfigWidget::password() const
+TQString LdapConfigWidget::password() const
{
- return ( mPassword ? mPassword->text() : QString::null );
+ return ( mPassword ? mPassword->text() : TQString::null );
}
-void LdapConfigWidget::setBindDN( const QString &binddn )
+void LdapConfigWidget::setBindDN( const TQString &binddn )
{
if ( mBindDN ) mBindDN->setText( binddn );
}
-QString LdapConfigWidget::bindDN() const
+TQString LdapConfigWidget::bindDN() const
{
- return ( mBindDN ? mBindDN->text() : QString::null );
+ return ( mBindDN ? mBindDN->text() : TQString::null );
}
-void LdapConfigWidget::setRealm( const QString &realm )
+void LdapConfigWidget::setRealm( const TQString &realm )
{
if ( mRealm ) mRealm->setText( realm );
}
-QString LdapConfigWidget::realm() const
+TQString LdapConfigWidget::realm() const
{
- return ( mRealm ? mRealm->text() : QString::null );
+ return ( mRealm ? mRealm->text() : TQString::null );
}
-void LdapConfigWidget::setHost( const QString &host )
+void LdapConfigWidget::setHost( const TQString &host )
{
if ( mHost ) mHost->setText( host );
}
-QString LdapConfigWidget::host() const
+TQString LdapConfigWidget::host() const
{
- return ( mHost ? mHost->text() : QString::null );
+ return ( mHost ? mHost->text() : TQString::null );
}
void LdapConfigWidget::setPort( int port )
@@ -477,27 +477,27 @@ int LdapConfigWidget::ver() const
return ( mVer ? mVer->value() : 3 );
}
-void LdapConfigWidget::setDn( const QString &dn )
+void LdapConfigWidget::setDn( const TQString &dn )
{
if ( mDn ) mDn->setText( dn );
}
-QString LdapConfigWidget::dn() const
+TQString LdapConfigWidget::dn() const
{
- return ( mDn ? mDn->text() : QString::null );
+ return ( mDn ? mDn->text() : TQString::null );
}
-void LdapConfigWidget::setFilter( const QString &filter )
+void LdapConfigWidget::setFilter( const TQString &filter )
{
if ( mFilter ) mFilter->setText( filter );
}
-QString LdapConfigWidget::filter() const
+TQString LdapConfigWidget::filter() const
{
- return ( mFilter ? mFilter->text() : QString::null );
+ return ( mFilter ? mFilter->text() : TQString::null );
}
-void LdapConfigWidget::setMech( const QString &mech )
+void LdapConfigWidget::setMech( const TQString &mech )
{
if ( mMech == 0 ) return;
if ( !mech.isEmpty() ) {
@@ -511,9 +511,9 @@ void LdapConfigWidget::setMech( const QString &mech )
}
}
-QString LdapConfigWidget::mech() const
+TQString LdapConfigWidget::mech() const
{
- return ( mMech ? mMech->currentText() : QString::null );
+ return ( mMech ? mMech->currentText() : TQString::null );
}
void LdapConfigWidget::setSecNO( bool b )
@@ -607,14 +607,14 @@ void LdapConfigWidget::setFlags( int flags )
// First delete all the child widgets.
// FIXME: I hope it's correct
- const QObjectList *ch = children();
- QObjectList ch2 = *ch;
- QObject *obj;
- QWidget *widget;
+ const TQObjectList *ch = children();
+ TQObjectList ch2 = *ch;
+ TQObject *obj;
+ TQWidget *widget;
obj = ch2.first();
while ( obj != 0 ) {
- widget = dynamic_cast<QWidget*> (obj);
+ widget = dynamic_cast<TQWidget*> (obj);
if ( widget && widget->parent() == this ) {
mainLayout->remove( widget );
delete ( widget );
diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h
index e48b10e53..ce41f0151 100644
--- a/kabc/ldapconfigwidget.h
+++ b/kabc/ldapconfigwidget.h
@@ -21,9 +21,9 @@
#ifndef LDAPCONFIGWIDGET_H
#define LDAPCONFIGWIDGET_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <kabc/ldapurl.h>
#include <kabc/ldif.h>
@@ -51,16 +51,16 @@ namespace KABC {
{
Q_OBJECT
Q_PROPERTY( LCW_Flags flags READ flags WRITE setFlags )
- Q_PROPERTY( QString user READ user WRITE setUser )
- Q_PROPERTY( QString password READ password WRITE setPassword )
- Q_PROPERTY( QString bindDN READ bindDN WRITE setBindDN )
- Q_PROPERTY( QString realm READ realm WRITE setRealm )
- Q_PROPERTY( QString host READ host WRITE setHost )
+ Q_PROPERTY( TQString user READ user WRITE setUser )
+ Q_PROPERTY( TQString password READ password WRITE setPassword )
+ Q_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN )
+ Q_PROPERTY( TQString realm READ realm WRITE setRealm )
+ Q_PROPERTY( TQString host READ host WRITE setHost )
Q_PROPERTY( int port READ port WRITE setPort )
Q_PROPERTY( int ver READ ver WRITE setVer )
- Q_PROPERTY( QString dn READ dn WRITE setDn )
- Q_PROPERTY( QString filter READ filter WRITE setFilter )
- Q_PROPERTY( QString mech READ mech WRITE setMech )
+ Q_PROPERTY( TQString dn READ dn WRITE setDn )
+ Q_PROPERTY( TQString filter READ filter WRITE setFilter )
+ Q_PROPERTY( TQString mech READ mech WRITE setMech )
Q_PROPERTY( bool secNO READ isSecNO WRITE setSecNO )
Q_PROPERTY( bool secSSL READ isSecSSL WRITE setSecSSL )
Q_PROPERTY( bool secTLS READ isSecSSL WRITE setSecTLS )
@@ -93,41 +93,41 @@ namespace KABC {
/** Constructs an empty configuration widget.
* You need to call setFlags() after this.
*/
- LdapConfigWidget( QWidget* parent = 0,
+ LdapConfigWidget( TQWidget* parent = 0,
const char* name = 0, WFlags fl = 0 );
/** Constructs a configuration widget */
- LdapConfigWidget( int flags, QWidget* parent = 0,
+ LdapConfigWidget( int flags, TQWidget* parent = 0,
const char* name = 0, WFlags fl = 0 );
/** Destructs a configuration widget */
virtual ~LdapConfigWidget();
/** Sets the user name. Kconfig widget name: kcfg_ldapuser */
- void setUser( const QString &user );
+ void setUser( const TQString &user );
/** Gets the user name. Kconfig widget name: kcfg_ldapuser */
- QString user() const;
+ TQString user() const;
/** Sets the password. Kconfig widget name: kcfg_ldappassword */
- void setPassword( const QString &password );
+ void setPassword( const TQString &password );
/** Gets the password. Kconfig widget name: kcfg_ldappassword */
- QString password() const;
+ TQString password() const;
/**
* Sets the bind dn. Useful for SASL proxy auth.
* Kconfig widget name: kcfg_ldapbinddn
*/
- void setBindDN( const QString &binddn );
+ void setBindDN( const TQString &binddn );
/** Gets the bind dn. Kconfig widget name: kcfg_ldapbinddn*/
- QString bindDN() const;
+ TQString bindDN() const;
/** Sets the SASL realm. Kconfig widget name: kcfg_ldaprealm */
- void setRealm( const QString &realm );
+ void setRealm( const TQString &realm );
/** Gets the SASL realm. Kconfig widget name: kcfg_ldaprealm */
- QString realm() const;
+ TQString realm() const;
/** Sets the host name. Kconfig widget name: kcfg_ldaphost */
- void setHost( const QString &host );
+ void setHost( const TQString &host );
/** Gets the host name. Kconfig widget name: kcfg_ldaphost */
- QString host() const;
+ TQString host() const;
/** Sets the LDAP port. Kconfig widget name: kcfg_ldapport */
void setPort( int port );
@@ -140,19 +140,19 @@ namespace KABC {
int ver() const;
/** Sets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */
- void setDn( const QString &dn );
+ void setDn( const TQString &dn );
/** Gets the LDAP Base DN. Kconfig widget name: kcfg_ldapdn */
- QString dn() const;
+ TQString dn() const;
/** Sets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */
- void setFilter( const QString &filter );
+ void setFilter( const TQString &filter );
/** Gets the LDAP Filter. Kconfig widget name: kcfg_ldapfilter */
- QString filter() const;
+ TQString filter() const;
/** Sets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */
- void setMech( const QString &mech );
+ void setMech( const TQString &mech );
/** Gets the SASL Mechanism. Kconfig widget name: kcfg_ldapsaslmech */
- QString mech() const;
+ TQString mech() const;
/**
* Sets the configuration to no transport security.
@@ -259,33 +259,33 @@ namespace KABC {
void setSASL( int state );
void mQueryDNClicked();
void mQueryMechClicked();
- void loadData( KIO::Job*, const QByteArray& );
+ void loadData( KIO::Job*, const TQByteArray& );
void loadResult( KIO::Job* );
private:
int mFlags;
LDIF mLdif;
- QStringList mQResult;
- QString mAttr;
+ TQStringList mQResult;
+ TQString mAttr;
KLineEdit *mUser;
KLineEdit *mPassword;
KLineEdit *mHost;
- QSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit;
+ TQSpinBox *mPort, *mVer, *mSizeLimit, *mTimeLimit;
KLineEdit *mDn, *mBindDN, *mRealm;
KLineEdit *mFilter;
- QRadioButton *mAnonymous,*mSimple,*mSASL;
- QCheckBox *mSubTree;
- QPushButton *mEditButton;
- QPushButton *mQueryMech;
- QRadioButton *mSecNO,*mSecTLS,*mSecSSL;
+ TQRadioButton *mAnonymous,*mSimple,*mSASL;
+ TQCheckBox *mSubTree;
+ TQPushButton *mEditButton;
+ TQPushButton *mQueryMech;
+ TQRadioButton *mSecNO,*mSecTLS,*mSecSSL;
KComboBox *mMech;
- QString mErrorMsg;
+ TQString mErrorMsg;
bool mCancelled;
KProgressDialog *mProg;
- QGridLayout *mainLayout;
+ TQGridLayout *mainLayout;
class LDAPConfigWidgetPrivate;
LDAPConfigWidgetPrivate *d;
diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp
index b7ee2a16f..9032c16d3 100644
--- a/kabc/ldapurl.cpp
+++ b/kabc/ldapurl.cpp
@@ -19,8 +19,8 @@
*/
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include "ldapurl.h"
@@ -35,7 +35,7 @@ LDAPUrl::LDAPUrl(const KURL &_url)
: KURL(_url), m_extensions()
{
m_dn = path();
- if ( !QDir::isRelativePath(m_dn) )
+ if ( !TQDir::isRelativePath(m_dn) )
#ifdef Q_WS_WIN
m_dn.remove(0,3); // e.g. "c:/"
#else
@@ -44,10 +44,10 @@ LDAPUrl::LDAPUrl(const KURL &_url)
parseQuery();
}
-void LDAPUrl::setDn( const QString &dn)
+void LDAPUrl::setDn( const TQString &dn)
{
m_dn = dn;
- if ( !QDir::isRelativePath(m_dn) )
+ if ( !TQDir::isRelativePath(m_dn) )
#ifdef Q_WS_WIN
m_dn.remove(0,3); // e.g. "c:/"
#else
@@ -56,14 +56,14 @@ void LDAPUrl::setDn( const QString &dn)
setPath(m_dn);
}
-bool LDAPUrl::hasExtension( const QString &key ) const
+bool LDAPUrl::hasExtension( const TQString &key ) const
{
return m_extensions.contains( key );
}
-LDAPUrl::Extension LDAPUrl::extension( const QString &key ) const
+LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const
{
- QMap<QString, Extension>::const_iterator it;
+ TQMap<TQString, Extension>::const_iterator it;
it = m_extensions.find( key );
if ( it != m_extensions.constEnd() )
@@ -76,7 +76,7 @@ LDAPUrl::Extension LDAPUrl::extension( const QString &key ) const
}
}
-QString LDAPUrl::extension( const QString &key, bool &critical ) const
+TQString LDAPUrl::extension( const TQString &key, bool &critical ) const
{
Extension ext;
@@ -85,13 +85,13 @@ QString LDAPUrl::extension( const QString &key, bool &critical ) const
return ext.value;
}
-void LDAPUrl::setExtension( const QString &key, const LDAPUrl::Extension &ext )
+void LDAPUrl::setExtension( const TQString &key, const LDAPUrl::Extension &ext )
{
m_extensions[ key ] = ext;
updateQuery();
}
-void LDAPUrl::setExtension( const QString &key, const QString &value, bool critical )
+void LDAPUrl::setExtension( const TQString &key, const TQString &value, bool critical )
{
Extension ext;
ext.value = value;
@@ -99,7 +99,7 @@ void LDAPUrl::setExtension( const QString &key, const QString &value, bool criti
setExtension( key, ext );
}
-void LDAPUrl::removeExtension( const QString &key )
+void LDAPUrl::removeExtension( const TQString &key )
{
m_extensions.remove( key );
updateQuery();
@@ -108,8 +108,8 @@ void LDAPUrl::removeExtension( const QString &key )
void LDAPUrl::updateQuery()
{
Extension ext;
- QMap<QString, Extension>::iterator it;
- QString q = "?";
+ TQMap<TQString, Extension>::iterator it;
+ TQString q = "?";
// set the attributes to query
if ( m_attributes.count() > 0 ) q += m_attributes.join(",");
@@ -152,14 +152,14 @@ void LDAPUrl::updateQuery()
void LDAPUrl::parseQuery()
{
Extension ext;
- QStringList extensions;
- QString q = query();
+ TQStringList extensions;
+ TQString q = query();
// remove first ?
if (q.startsWith("?"))
q.remove(0,1);
// split into a list
- QStringList url_items = QStringList::split("?", q, true);
+ TQStringList url_items = TQStringList::split("?", q, true);
m_attributes.clear();
m_scope = Base;
@@ -167,10 +167,10 @@ void LDAPUrl::parseQuery()
m_extensions.clear();
int i = 0;
- for ( QStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) {
+ for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) {
switch (i) {
case 0:
- m_attributes = QStringList::split(",", (*it), false);
+ m_attributes = TQStringList::split(",", (*it), false);
break;
case 1:
if ( (*it) == "sub" ) m_scope = Sub; else
@@ -180,13 +180,13 @@ void LDAPUrl::parseQuery()
m_filter = decode_string( *it );
break;
case 3:
- extensions = QStringList::split(",", (*it), false);
+ extensions = TQStringList::split(",", (*it), false);
break;
}
}
- QString name,value;
- for ( QStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) {
+ TQString name,value;
+ for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) {
ext.critical = false;
name = decode_string( (*it).section('=',0,0) ).lower();
value = decode_string( (*it).section('=',1) );
diff --git a/kabc/ldapurl.h b/kabc/ldapurl.h
index 6cfc9edbc..0c2693758 100644
--- a/kabc/ldapurl.h
+++ b/kabc/ldapurl.h
@@ -21,9 +21,9 @@
#ifndef _K_LDAPURL_H_
#define _K_LDAPURL_H_
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include <kurl.h>
@@ -44,7 +44,7 @@ namespace KABC {
public:
struct Extension {
- QString value;
+ TQString value;
bool critical;
};
@@ -59,14 +59,14 @@ namespace KABC {
* Returns the dn part of the LDAP Url (same as path(), but slash removed
* from the beginning).
*/
- const QString& dn() const { return m_dn; }
+ const TQString& dn() const { return m_dn; }
/** Sets the the dn part of the LDAP Url. */
- void setDn( const QString &dn );
+ void setDn( const TQString &dn );
/** Returns the attributes part of the LDAP Url */
- const QStringList &attributes() { return m_attributes; }
+ const TQStringList &attributes() { return m_attributes; }
/** Sets the attributes part of the LDAP Url */
- void setAttributes( const QStringList &attributes )
+ void setAttributes( const TQStringList &attributes )
{ m_attributes=attributes; updateQuery(); }
/** Returns the scope part of the LDAP Url */
@@ -75,22 +75,22 @@ namespace KABC {
void setScope(Scope scope) { m_scope = scope; updateQuery(); }
/** Returns the filter part of the LDAP Url */
- const QString &filter() const { return m_filter; }
+ const TQString &filter() const { return m_filter; }
/** Sets the filter part of the LDAP Url */
- void setFilter( QString filter ) { m_filter = filter; updateQuery(); }
+ void setFilter( TQString filter ) { m_filter = filter; updateQuery(); }
/** Returns if the specified extension exists in the LDAP Url */
- bool hasExtension( const QString &key ) const;
+ bool hasExtension( const TQString &key ) const;
/** Returns the specified extension */
- Extension extension( const QString &key ) const;
+ Extension extension( const TQString &key ) const;
/** Returns the specified extension */
- QString extension( const QString &key, bool &critical ) const;
+ TQString extension( const TQString &key, bool &critical ) const;
/** Sets the specified extension key with the value and criticality in ext */
- void setExtension( const QString &key, const Extension &ext );
+ void setExtension( const TQString &key, const Extension &ext );
/** Sets the specified extension key with the value and criticality specified */
- void setExtension( const QString &key, const QString &value, bool critical = false );
+ void setExtension( const TQString &key, const TQString &value, bool critical = false );
/** Removes the specified extension */
- void removeExtension( const QString &key );
+ void removeExtension( const TQString &key );
/** Updates the query component from the attributes, scope, filter and extensions */
void updateQuery();
@@ -99,11 +99,11 @@ namespace KABC {
private:
- QMap<QString, Extension> m_extensions;
- QString m_dn;
- QStringList m_attributes;
+ TQMap<TQString, Extension> m_extensions;
+ TQString m_dn;
+ TQStringList m_attributes;
Scope m_scope;
- QString m_filter;
+ TQString m_filter;
};
}
diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp
index 6d4e033e2..19895fce5 100644
--- a/kabc/ldif.cpp
+++ b/kabc/ldif.cpp
@@ -34,16 +34,16 @@ LDIF::~LDIF()
{
}
-QCString LDIF::assembleLine( const QString &fieldname, const QByteArray &value,
+TQCString LDIF::assembleLine( const TQString &fieldname, const TQByteArray &value,
uint linelen, bool url )
{
bool safe = false;
bool isDn;
- QCString result;
+ TQCString result;
uint i;
if ( url ) {
- result = fieldname.utf8() + ":< " + QCString( value.data(), value.size()+1 );
+ result = fieldname.utf8() + ":< " + TQCString( value.data(), value.size()+1 );
} else {
isDn = fieldname.lower() == "dn";
//SAFE-INIT-CHAR
@@ -66,7 +66,7 @@ QCString LDIF::assembleLine( const QString &fieldname, const QByteArray &value,
if ( value.size() == 0 ) safe = true;
if( safe ) {
- result = fieldname.utf8() + ": " + QCString( value.data(), value.size()+1 );
+ result = fieldname.utf8() + ": " + TQCString( value.data(), value.size()+1 );
} else {
result = fieldname.utf8() + ":: " + KCodecs::base64Encode( value, false );
}
@@ -82,11 +82,11 @@ QCString LDIF::assembleLine( const QString &fieldname, const QByteArray &value,
return result;
}
-QCString LDIF::assembleLine( const QString &fieldname, const QCString &value,
+TQCString LDIF::assembleLine( const TQString &fieldname, const TQCString &value,
uint linelen, bool url )
{
- QCString ret;
- QByteArray tmp;
+ TQCString ret;
+ TQByteArray tmp;
uint valuelen = value.length();
const char *data = value.data();
@@ -97,26 +97,26 @@ QCString LDIF::assembleLine( const QString &fieldname, const QCString &value,
}
-QCString LDIF::assembleLine( const QString &fieldname, const QString &value,
+TQCString LDIF::assembleLine( const TQString &fieldname, const TQString &value,
uint linelen, bool url )
{
return assembleLine( fieldname, value.utf8(), linelen, url );
}
-bool LDIF::splitLine( const QCString &line, QString &fieldname, QByteArray &value )
+bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value )
{
int position;
- QByteArray tmp;
+ TQByteArray tmp;
int linelen;
const char *data;
-// kdDebug(5700) << "splitLine line: " << QString::fromUtf8(line) << endl;
+// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl;
position = line.find( ":" );
if ( position == -1 ) {
// strange: we did not find a fieldname
fieldname = "";
- QCString str;
+ TQCString str;
str = line.stripWhiteSpace();
linelen = str.length();
data = str.data();
@@ -131,7 +131,7 @@ bool LDIF::splitLine( const QCString &line, QString &fieldname, QByteArray &valu
if ( linelen > ( position + 1 ) && line[ position + 1 ] == ':' ) {
// String is BASE64 encoded -> decode it now.
- fieldname = QString::fromUtf8(
+ fieldname = TQString::fromUtf8(
line.left( position ).stripWhiteSpace() );
if ( linelen <= ( position + 3 ) ) {
value.resize( 0 );
@@ -146,7 +146,7 @@ bool LDIF::splitLine( const QCString &line, QString &fieldname, QByteArray &valu
if ( linelen > ( position + 1 ) && line[ position + 1 ] == '<' ) {
// String is an URL.
- fieldname = QString::fromUtf8(
+ fieldname = TQString::fromUtf8(
line.left( position ).stripWhiteSpace() );
if ( linelen <= ( position + 3 ) ) {
value.resize( 0 );
@@ -159,7 +159,7 @@ bool LDIF::splitLine( const QCString &line, QString &fieldname, QByteArray &valu
return true;
}
- fieldname = QString::fromUtf8(line.left( position ).stripWhiteSpace());
+ fieldname = TQString::fromUtf8(line.left( position ).stripWhiteSpace());
if ( linelen <= ( position + 2 ) ) {
value.resize( 0 );
return false;
@@ -171,16 +171,16 @@ bool LDIF::splitLine( const QCString &line, QString &fieldname, QByteArray &valu
return false;
}
-bool LDIF::splitControl( const QCString &line, QString &oid, bool &critical,
- QByteArray &value )
+bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical,
+ TQByteArray &value )
{
- QString tmp;
+ TQString tmp;
critical = false;
bool url = splitLine( line, tmp, value );
- kdDebug(5700) << "splitControl: value: " << QString::fromUtf8(value, value.size()) << endl;
+ kdDebug(5700) << "splitControl: value: " << TQString::fromUtf8(value, value.size()) << endl;
if ( tmp.isEmpty() ) {
- tmp = QString::fromUtf8( value, value.size() );
+ tmp = TQString::fromUtf8( value, value.size() );
value.resize( 0 );
}
if ( tmp.right( 4 ) == "true" ) {
@@ -204,22 +204,22 @@ LDIF::ParseVal LDIF::processLine()
mUrl = splitLine( line, mAttr, mVal );
- QString attrLower = mAttr.lower();
+ TQString attrLower = mAttr.lower();
switch ( mEntryType ) {
case Entry_None:
if ( attrLower == "version" ) {
if ( !mDn.isEmpty() ) retval = Err;
} else if ( attrLower == "dn" ) {
- kdDebug(5700) << "ldapentry dn: " << QString::fromUtf8( mVal, mVal.size() ) << endl;
- mDn = QString::fromUtf8( mVal, mVal.size() );
+ kdDebug(5700) << "ldapentry dn: " << TQString::fromUtf8( mVal, mVal.size() ) << endl;
+ mDn = TQString::fromUtf8( mVal, mVal.size() );
mModType = Mod_None;
retval = NewEntry;
} else if ( attrLower == "changetype" ) {
if ( mDn.isEmpty() )
retval = Err;
else {
- QString tmpval = QString::fromUtf8( mVal, mVal.size() );
+ TQString tmpval = TQString::fromUtf8( mVal, mVal.size() );
kdDebug(5700) << "changetype: " << tmpval << endl;
if ( tmpval == "add" ) mEntryType = Entry_Add;
else if ( tmpval == "delete" ) mEntryType = Entry_Del;
@@ -233,7 +233,7 @@ LDIF::ParseVal LDIF::processLine()
else retval = Err;
}
} else if ( attrLower == "control" ) {
- mUrl = splitControl( QCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal );
+ mUrl = splitControl( TQCString( mVal, mVal.size() + 1 ), mOid, mCritical, mVal );
retval = Control;
} else if ( !mAttr.isEmpty() && mVal.size() > 0 ) {
mEntryType = Entry_Add;
@@ -261,12 +261,12 @@ LDIF::ParseVal LDIF::processLine()
mModType = Mod_Add;
} else if ( attrLower == "replace" ) {
mModType = Mod_Replace;
- mAttr = QString::fromUtf8( mVal, mVal.size() );
+ mAttr = TQString::fromUtf8( mVal, mVal.size() );
mVal.resize( 0 );
retval = Item;
} else if ( attrLower == "delete" ) {
mModType = Mod_Del;
- mAttr = QString::fromUtf8( mVal, mVal.size() );
+ mAttr = TQString::fromUtf8( mVal, mVal.size() );
mVal.resize( 0 );
retval = Item;
} else {
@@ -274,7 +274,7 @@ LDIF::ParseVal LDIF::processLine()
}
} else {
if ( mAttr.isEmpty() ) {
- if ( QString::fromUtf8( mVal, mVal.size() ) == "-" ) {
+ if ( TQString::fromUtf8( mVal, mVal.size() ) == "-" ) {
mModType = Mod_None;
} else if ( mVal.size() == 0 ) {
retval = EndEntry;
@@ -288,9 +288,9 @@ LDIF::ParseVal LDIF::processLine()
if ( mAttr.isEmpty() && mVal.size() == 0 )
retval = EndEntry;
else if ( attrLower == "newrdn" )
- mNewRdn = QString::fromUtf8( mVal, mVal.size() );
+ mNewRdn = TQString::fromUtf8( mVal, mVal.size() );
else if ( attrLower == "newsuperior" )
- mNewSuperior = QString::fromUtf8( mVal, mVal.size() );
+ mNewSuperior = TQString::fromUtf8( mVal, mVal.size() );
else if ( attrLower == "deleteoldrdn" ) {
if ( mVal.size() > 0 && mVal[0] == '0' )
mDelOldRdn = false;
@@ -343,7 +343,7 @@ LDIF::ParseVal LDIF::nextItem()
void LDIF::endLDIF()
{
- QByteArray tmp( 3 );
+ TQByteArray tmp( 3 );
tmp[ 0 ] = '\n';
tmp[ 1 ] = '\n';
tmp[ 2 ] = '\n';
diff --git a/kabc/ldif.h b/kabc/ldif.h
index cad227774..10cd15e18 100644
--- a/kabc/ldif.h
+++ b/kabc/ldif.h
@@ -21,9 +21,9 @@
#ifndef _K_LDIF_H_
#define _K_LDIF_H_
-#include <qstring.h>
-#include <qcstring.h>
-#include <qmemarray.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqmemarray.h>
#include <kdelibs_export.h>
@@ -55,26 +55,26 @@ namespace KABC {
* @param linelen Maximum length of the lines in the result.
* @param url If true, encode value as url ( use :< ).
*/
- static QCString assembleLine( const QString &fieldname,
- const QByteArray &value, uint linelen=0, bool url=false );
+ static TQCString assembleLine( const TQString &fieldname,
+ const TQByteArray &value, uint linelen=0, bool url=false );
/**
* This is the same as the above function, the only difference that
- * this accepts QCString as the value.
+ * this accepts TQCString as the value.
*/
- static QCString assembleLine( const QString &fieldname,
- const QCString &value, uint linelen=0, bool url=false );
+ static TQCString assembleLine( const TQString &fieldname,
+ const TQCString &value, uint linelen=0, bool url=false );
/**
* This is the same as the above function, the only difference that
- * this accepts QString as the value.
+ * this accepts TQString as the value.
*/
- static QCString assembleLine( const QString &fieldname,
- const QString &value, uint linelen=0, bool url=false );
+ static TQCString assembleLine( const TQString &fieldname,
+ const TQString &value, uint linelen=0, bool url=false );
/**
* Splits one line from an LDIF file to attribute and value components.
* @returns true if value is an URL, false otherwise
*/
- static bool splitLine( const QCString &line, QString &fieldname, QByteArray &value );
+ static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value );
/**
* Splits a control specification (without the "control:" directive)
* @param line is the control directive
@@ -82,8 +82,8 @@ namespace KABC {
* @param critical will contain the criticality of control
* @param value is the control value
*/
- static bool splitControl( const QCString &line, QString &oid, bool &critical,
- QByteArray &value );
+ static bool splitControl( const TQCString &line, TQString &oid, bool &critical,
+ TQByteArray &value );
/**
* Starts the parsing of a new LDIF
*/
@@ -108,7 +108,7 @@ namespace KABC {
* Sets a chunk of LDIF. Call before startParsing(), or if nextItem() returned
* MoreData.
*/
- void setLDIF( const QByteArray &ldif ) { mLdif = ldif; mPos = 0; }
+ void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; }
/**
* Indicates the end of the LDIF file/stream. Call if nextItem() returned
* MoreData, but actually you don't have more data.
@@ -125,15 +125,15 @@ namespace KABC {
/**
* Returns the Distinguished Name of the current entry.
*/
- const QString& dn() const { return mDn; }
+ const TQString& dn() const { return mDn; }
/**
* Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn.
*/
- const QString& newRdn() const { return mNewRdn; }
+ const TQString& newRdn() const { return mNewRdn; }
/**
* Returns the new parent of the entry if modType() returned Entry_Modrdn.
*/
- const QString& newSuperior() const { return mNewSuperior; }
+ const TQString& newSuperior() const { return mNewSuperior; }
/**
* Returns if the delete of the old RDN is required.
*/
@@ -141,11 +141,11 @@ namespace KABC {
/**
* Returns the attribute name.
*/
- const QString& attr() const { return mAttr; }
+ const TQString& attr() const { return mAttr; }
/**
* Returns the attribute value.
*/
- const QByteArray& val() const { return mVal; }
+ const TQByteArray& val() const { return mVal; }
/**
* Returns if val() is an url
*/
@@ -157,7 +157,7 @@ namespace KABC {
/**
* Returns the OID when modType() returned Control.
*/
- const QString& oid() const { return mOid; }
+ const TQString& oid() const { return mOid; }
/**
* Returns the line number which the parser processes.
*/
@@ -165,14 +165,14 @@ namespace KABC {
private:
int mModType;
bool mDelOldRdn, mUrl;
- QString mDn,mAttr,mNewRdn,mNewSuperior, mOid;
- QByteArray mLdif, mVal;
+ TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid;
+ TQByteArray mLdif, mVal;
EntryType mEntryType;
bool mIsNewLine, mIsComment,mCritical;
ParseVal mLastParseVal;
uint mPos,mLineNo;
- QCString line;
+ TQCString line;
class LDIFPrivate;
LDIFPrivate *d;
diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp
index 684f07bbd..6f875cffb 100644
--- a/kabc/ldifconverter.cpp
+++ b/kabc/ldifconverter.cpp
@@ -33,10 +33,10 @@
- physicaldeliveryofficename,
*/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include <klocale.h>
#include <kdebug.h>
@@ -53,7 +53,7 @@ using namespace KABC;
/* generate LDIF stream */
-bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, QString &str )
+bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, TQString &str )
{
AddresseeList::ConstIterator it;
for ( it = addrList.begin(); it != addrList.end(); ++it ) {
@@ -64,29 +64,29 @@ bool LDIFConverter::addresseeToLDIF( const AddresseeList &addrList, QString &str
-static void ldif_out( QTextStream &t, QString formatStr, QString value )
+static void ldif_out( TQTextStream &t, TQString formatStr, TQString value )
{
if ( value.isEmpty() )
return;
- QCString txt = LDIF::assembleLine( formatStr, value, 72 );
+ TQCString txt = LDIF::assembleLine( formatStr, value, 72 );
// write the string
- t << QString::fromUtf8(txt) << "\n";
+ t << TQString::fromUtf8(txt) << "\n";
}
-bool LDIFConverter::addresseeToLDIF( const Addressee &addr, QString &str )
+bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str )
{
if ( addr.isEmpty() )
return false;
- QTextStream t( str, IO_WriteOnly|IO_Append );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t( str, IO_WriteOnly|IO_Append );
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
const Address homeAddr = addr.address( Address::Home );
const Address workAddr = addr.address( Address::Work );
- ldif_out( t, "dn", QString( "cn=%1,mail=%2" )
+ ldif_out( t, "dn", TQString( "cn=%1,mail=%2" )
.arg( addr.formattedName().simplifyWhiteSpace() )
.arg( addr.preferredEmail() ) );
ldif_out( t, "givenname", addr.givenName() );
@@ -113,7 +113,7 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, QString &str )
ldif_out( t, "postalcode", workAddr.postalCode() );
ldif_out( t, "postofficebox", workAddr.postOfficeBox() );
- QStringList streets = QStringList::split( '\n', homeAddr.street() );
+ TQStringList streets = TQStringList::split( '\n', homeAddr.street() );
if ( streets.count() > 0 )
ldif_out( t, "homepostaladdress", streets[ 0 ] ); // Netscape 7
if ( streets.count() > 1 )
@@ -125,7 +125,7 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, QString &str )
ldif_out( t, "locality", workAddr.locality() );
ldif_out( t, "streetaddress", workAddr.street() ); // Netscape 4.x
- streets = QStringList::split( '\n', workAddr.street() );
+ streets = TQStringList::split( '\n', workAddr.street() );
if ( streets.count() > 0 )
ldif_out( t, "postaladdress", streets[ 0 ] );
if ( streets.count() > 1 )
@@ -166,7 +166,7 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, QString &str )
/* convert from LDIF stream */
-bool LDIFConverter::LDIFToAddressee( const QString &str, AddresseeList &addrList, QDateTime dt )
+bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt )
{
if (str.isEmpty())
return true;
@@ -176,14 +176,14 @@ bool LDIFConverter::LDIFToAddressee( const QString &str, AddresseeList &addrList
LDIF::ParseVal ret;
const char *latinstr = str.latin1();
int latinstrlen = qstrlen( latinstr );
- QByteArray data;
+ TQByteArray data;
Addressee a;
Address homeAddr, workAddr;
data.setRawData( latinstr, latinstrlen );
ldif.setLDIF( data );
if (!dt.isValid())
- dt = QDateTime::currentDateTime();
+ dt = TQDateTime::currentDateTime();
a.setRevision(dt);
homeAddr = Address( Address::Home );
workAddr = Address( Address::Work );
@@ -192,8 +192,8 @@ bool LDIFConverter::LDIFToAddressee( const QString &str, AddresseeList &addrList
ret = ldif.nextItem();
switch ( ret ) {
case LDIF::Item: {
- QString fieldname = ldif.attr().lower();
- QString value = QString::fromUtf8( ldif.val(), ldif.val().size() );
+ TQString fieldname = ldif.attr().lower();
+ TQString value = TQString::fromUtf8( ldif.val(), ldif.val().size() );
evaluatePair( a, homeAddr, workAddr, fieldname, value );
break;
}
@@ -233,9 +233,9 @@ bool LDIFConverter::LDIFToAddressee( const QString &str, AddresseeList &addrList
bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr,
Address &workAddr,
- QString &fieldname, QString &value )
+ TQString &fieldname, TQString &value )
{
- if ( fieldname == QString::fromLatin1( "dn" ) ) // ignore & return false!
+ if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false!
return false;
if ( fieldname.startsWith("#") ) {
@@ -249,56 +249,56 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr,
return true;
}
- if ( fieldname == QString::fromLatin1( "givenname" ) ) {
+ if ( fieldname == TQString::fromLatin1( "givenname" ) ) {
a.setGivenName( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "xmozillanickname") ||
- fieldname == QString::fromLatin1( "nickname") ) {
+ if ( fieldname == TQString::fromLatin1( "xmozillanickname") ||
+ fieldname == TQString::fromLatin1( "nickname") ) {
a.setNickName( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "sn" ) ) {
+ if ( fieldname == TQString::fromLatin1( "sn" ) ) {
a.setFamilyName( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "uid" ) ) {
+ if ( fieldname == TQString::fromLatin1( "uid" ) ) {
a.setUid( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mail" ) ||
- fieldname == QString::fromLatin1( "mozillasecondemail" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "mail" ) ||
+ fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla
if ( a.emails().findIndex( value ) == -1 )
a.insertEmail( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "title" ) ) {
+ if ( fieldname == TQString::fromLatin1( "title" ) ) {
a.setTitle( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "vocation" ) ) {
+ if ( fieldname == TQString::fromLatin1( "vocation" ) ) {
a.setPrefix( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "cn" ) ) {
+ if ( fieldname == TQString::fromLatin1( "cn" ) ) {
a.setFormattedName( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "o" ) ||
- fieldname == QString::fromLatin1( "organization" ) || // Exchange
- fieldname == QString::fromLatin1( "organizationname" ) ) { // Exchange
+ if ( fieldname == TQString::fromLatin1( "o" ) ||
+ fieldname == TQString::fromLatin1( "organization" ) || // Exchange
+ fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange
a.setOrganization( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "description" ) ) {
+ if ( fieldname == TQString::fromLatin1( "description" ) ) {
addComment:
if ( !a.note().isEmpty() )
a.setNote( a.note() + "\n" );
@@ -306,15 +306,15 @@ addComment:
return true;
}
- if ( fieldname == QString::fromLatin1( "custom1" ) ||
- fieldname == QString::fromLatin1( "custom2" ) ||
- fieldname == QString::fromLatin1( "custom3" ) ||
- fieldname == QString::fromLatin1( "custom4" ) ) {
+ if ( fieldname == TQString::fromLatin1( "custom1" ) ||
+ fieldname == TQString::fromLatin1( "custom2" ) ||
+ fieldname == TQString::fromLatin1( "custom3" ) ||
+ fieldname == TQString::fromLatin1( "custom4" ) ) {
goto addComment;
}
- if ( fieldname == QString::fromLatin1( "homeurl" ) ||
- fieldname == QString::fromLatin1( "workurl" ) ) {
+ if ( fieldname == TQString::fromLatin1( "homeurl" ) ||
+ fieldname == TQString::fromLatin1( "workurl" ) ) {
if (a.url().isEmpty()) {
a.setUrl( KURL( value ) );
return true;
@@ -325,144 +325,144 @@ addComment:
// TODO: change this with KDE 4
}
- if ( fieldname == QString::fromLatin1( "homephone" ) ) {
+ if ( fieldname == TQString::fromLatin1( "homephone" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "telephonenumber" ) ) {
+ if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7
+ if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "cellphone" ) ) {
+ if ( fieldname == TQString::fromLatin1( "cellphone" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "pager" ) || // mozilla
- fieldname == QString::fromLatin1( "pagerphone" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla
+ fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "facsimiletelephonenumber" ) ) {
+ if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) );
return true;
}
- if ( fieldname == QString::fromLatin1( "street" ) ||
- fieldname == QString::fromLatin1( "streethomeaddress" ) ) {
+ if ( fieldname == TQString::fromLatin1( "street" ) ||
+ fieldname == TQString::fromLatin1( "streethomeaddress" ) ) {
homeAddr.setStreet( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "postaladdress" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla
workAddr.setStreet( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla
- workAddr.setStreet( workAddr.street() + QString::fromLatin1( "\n" ) + value );
+ if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla
+ workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value );
return true;
}
- if ( fieldname == QString::fromLatin1( "postalcode" ) ) {
+ if ( fieldname == TQString::fromLatin1( "postalcode" ) ) {
workAddr.setPostalCode( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "postofficebox" ) ) {
+ if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) {
workAddr.setPostOfficeBox( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7
+ if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7
homeAddr.setStreet( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla
- homeAddr.setStreet( homeAddr.street() + QString::fromLatin1( "\n" ) + value );
+ if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla
+ homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla
homeAddr.setLocality( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillahomestate" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla
homeAddr.setRegion( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla
homeAddr.setPostalCode( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla
if ( value.length() <= 2 )
value = Address::ISOtoCountry(value);
homeAddr.setCountry( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "locality" ) ) {
+ if ( fieldname == TQString::fromLatin1( "locality" ) ) {
workAddr.setLocality( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x
+ if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x
workAddr.setStreet( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "countryname" ) ||
- fieldname == QString::fromLatin1( "c" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "countryname" ) ||
+ fieldname == TQString::fromLatin1( "c" ) ) { // mozilla
if ( value.length() <= 2 )
value = Address::ISOtoCountry(value);
workAddr.setCountry( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "l" ) ) { // mozilla
+ if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla
workAddr.setLocality( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "st" ) ) {
+ if ( fieldname == TQString::fromLatin1( "st" ) ) {
workAddr.setRegion( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "ou" ) ) {
+ if ( fieldname == TQString::fromLatin1( "ou" ) ) {
a.setRole( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "department" ) ) {
+ if ( fieldname == TQString::fromLatin1( "department" ) ) {
a.setDepartment( value );
return true;
}
- if ( fieldname == QString::fromLatin1( "member" ) ) {
+ if ( fieldname == TQString::fromLatin1( "member" ) ) {
// this is a mozilla list member (cn=xxx, mail=yyy)
- QStringList list( QStringList::split( ',', value ) );
- QString name, email;
+ TQStringList list( TQStringList::split( ',', value ) );
+ TQString name, email;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
if ( (*it).startsWith( "cn=" ) )
name = (*it).mid( 3 ).stripWhiteSpace();
@@ -476,20 +476,20 @@ addComment:
return true;
}
- if ( fieldname == QString::fromLatin1( "modifytimestamp" ) ) {
- if (value == QString::fromLatin1("0Z")) // ignore
+ if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) {
+ if (value == TQString::fromLatin1("0Z")) // ignore
return true;
- QDateTime dt = VCardStringToDate( value );
+ TQDateTime dt = VCardStringToDate( value );
if ( dt.isValid() ) {
a.setRevision(dt);
return true;
}
}
- if ( fieldname == QString::fromLatin1( "objectclass" ) ) // ignore
+ if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore
return true;
- kdWarning() << QString("LDIFConverter: Unknown field for '%1': '%2=%3'\n")
+ kdWarning() << TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n")
.arg(a.formattedName()).arg(fieldname).arg(value);
return true;
@@ -499,33 +499,33 @@ addComment:
* in the LDIF class */
bool LDIFConverter::parseSingleLine( Addressee &a, Address &homeAddr,
- Address &workAddr, QString &line )
+ Address &workAddr, TQString &line )
{
if ( line.isEmpty() )
return true;
- QString fieldname, value;
- QByteArray val;
+ TQString fieldname, value;
+ TQByteArray val;
LDIF::splitLine( line.latin1(), fieldname, val );
- value = QString::fromUtf8( val.data(), val.size() );
+ value = TQString::fromUtf8( val.data(), val.size() );
return evaluatePair( a, homeAddr, workAddr, fieldname, value);
}
-bool LDIFConverter::splitLine( QString &line, QString &fieldname, QString &value)
+bool LDIFConverter::splitLine( TQString &line, TQString &fieldname, TQString &value)
{
- QByteArray val;
+ TQByteArray val;
bool ret = LDIF::splitLine( line.latin1(), fieldname, val );
- value = QString::fromUtf8( val.data(), val.size() );
+ value = TQString::fromUtf8( val.data(), val.size() );
return ret;
}
-QString LDIFConverter::makeLDIFfieldString( QString formatStr, QString value, bool allowEncode )
+TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, bool allowEncode )
{
if ( value.isEmpty() )
- return QString();
+ return TQString();
// append format if not given
if (formatStr.find(':') == -1)
@@ -554,7 +554,7 @@ QString LDIFConverter::makeLDIFfieldString( QString formatStr, QString value, bo
}
// generate the new string and split it to 72 chars/line
- QCString txt = (formatStr.arg(value)).utf8();
+ TQCString txt = (formatStr.arg(value)).utf8();
if (allowEncode) {
len = txt.length();
@@ -568,6 +568,6 @@ QString LDIFConverter::makeLDIFfieldString( QString formatStr, QString value, bo
}
}
- return QString::fromUtf8(txt);
+ return TQString::fromUtf8(txt);
}
diff --git a/kabc/ldifconverter.h b/kabc/ldifconverter.h
index 299a42e11..a8052a65f 100644
--- a/kabc/ldifconverter.h
+++ b/kabc/ldifconverter.h
@@ -20,8 +20,8 @@
#ifndef KABC_LDIFCONVERTER_H
#define KABC_LDIFCONVERTER_H
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include "addressee.h"
#include "addresseelist.h"
@@ -44,7 +44,7 @@ namespace KABC {
* @param dt The date & time value of the last modification (e.g. file modification time).
* @since 3.2
*/
- KABC_EXPORT bool LDIFToAddressee( const QString &str, AddresseeList &addrList, QDateTime dt = QDateTime::currentDateTime() );
+ KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() );
/**
* Converts a list of addressees to a LDIF string.
@@ -53,7 +53,7 @@ namespace KABC {
* @param str The LDIF string.
* @since 3.2
*/
- KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, QString &str );
+ KABC_EXPORT bool addresseeToLDIF( const AddresseeList &addrList, TQString &str );
/**
* Converts an addressee to a LDIF string.
@@ -62,7 +62,7 @@ namespace KABC {
* @param str The LDIF string.
* @since 3.2
*/
- KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, QString &str );
+ KABC_EXPORT bool addresseeToLDIF( const Addressee &addr, TQString &str );
/**
* @deprecated
@@ -76,7 +76,7 @@ namespace KABC {
* @param allowEncode Set to false if you wish no encoding of the value.
* @since 3.2
*/
- KABC_EXPORT QString makeLDIFfieldString( QString field, QString value, bool allowEncode = true ) KDE_DEPRECATED;
+ KABC_EXPORT TQString makeLDIFfieldString( TQString field, TQString value, bool allowEncode = true ) KDE_DEPRECATED;
@@ -84,14 +84,14 @@ namespace KABC {
/** No need for this function anymore - use LDIF::splitLine() + evaluatePair() */
KABC_EXPORT bool parseSingleLine( Addressee &a,
- Address &homeAddr, Address &workAddr, QString &line );
+ Address &homeAddr, Address &workAddr, TQString &line );
/** No need for this function anymore - use LDIF::splitLine() */
- KABC_EXPORT bool splitLine( QString &line, QString &fieldname, QString &value);
+ KABC_EXPORT bool splitLine( TQString &line, TQString &fieldname, TQString &value);
KABC_EXPORT bool evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr,
- QString &fieldname, QString &value );
+ TQString &fieldname, TQString &value );
}
diff --git a/kabc/lock.cpp b/kabc/lock.cpp
index a3270459d..b5e0ea5a6 100644
--- a/kabc/lock.cpp
+++ b/kabc/lock.cpp
@@ -26,7 +26,7 @@
#include <kstandarddirs.h>
#include <ktempfile.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <signal.h>
#include <sys/types.h>
@@ -35,7 +35,7 @@
using namespace KABC;
-Lock::Lock( const QString &identifier )
+Lock::Lock( const TQString &identifier )
: mIdentifier( identifier )
{
mIdentifier.replace( "/", "_" );
@@ -46,34 +46,34 @@ Lock::~Lock()
unlock();
}
-QString Lock::locksDir()
+TQString Lock::locksDir()
{
return locateLocal( "data", "kabc/lock/" );
}
-bool Lock::readLockFile( const QString &filename, int &pid, QString &app )
+bool Lock::readLockFile( const TQString &filename, int &pid, TQString &app )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) ) return false;
- QTextStream t( &file );
+ TQTextStream t( &file );
pid = t.readLine().toInt();
app = t.readLine();
return true;
}
-bool Lock::writeLockFile( const QString &filename )
+bool Lock::writeLockFile( const TQString &filename )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) return false;
- QTextStream t( &file );
- t << ::getpid() << endl << QString( KGlobal::instance()->instanceName() );
+ TQTextStream t( &file );
+ t << ::getpid() << endl << TQString( KGlobal::instance()->instanceName() );
return true;
}
-QString Lock::lockFileName() const
+TQString Lock::lockFileName() const
{
return locksDir() + mIdentifier + ".lock";
}
@@ -82,12 +82,12 @@ bool Lock::lock()
{
kdDebug(5700) << "Lock::lock()" << endl;
- QString lockName = lockFileName();
+ TQString lockName = lockFileName();
kdDebug(5700) << "-- lock name: " << lockName << endl;
- if ( QFile::exists( lockName ) ) { // check if it is a stale lock file
+ if ( TQFile::exists( lockName ) ) { // check if it is a stale lock file
int pid;
- QString app;
+ TQString app;
if ( !readLockFile( lockFileName(), pid, app ) ) {
mError = i18n("Unable to open lock file.");
@@ -96,11 +96,11 @@ bool Lock::lock()
int retval = ::kill( pid, 0 );
if ( retval == -1 && errno == ESRCH ) { // process doesn't exists anymore
- QFile::remove( lockName );
+ TQFile::remove( lockName );
kdWarning(5700) << "Removed stale lock file from process '" << app << "'"
<< endl;
} else {
- QString identifier( mIdentifier );
+ TQString identifier( mIdentifier );
identifier.replace( '_', '/' );
mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'")
@@ -109,7 +109,7 @@ bool Lock::lock()
}
}
- QString lockUniqueName;
+ TQString lockUniqueName;
lockUniqueName = mIdentifier + kapp->randomString( 8 );
mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl;
@@ -118,8 +118,8 @@ bool Lock::lock()
writeLockFile( mLockUniqueName );
// Create lock file
- int result = ::link( QFile::encodeName( mLockUniqueName ),
- QFile::encodeName( lockName ) );
+ int result = ::link( TQFile::encodeName( mLockUniqueName ),
+ TQFile::encodeName( lockName ) );
if ( result == 0 ) {
mError = "";
@@ -136,15 +136,15 @@ bool Lock::lock()
bool Lock::unlock()
{
int pid;
- QString app;
+ TQString app;
if ( readLockFile( lockFileName(), pid, app ) ) {
if ( pid == getpid() ) {
- QFile::remove( lockFileName() );
- QFile::remove( mLockUniqueName );
+ TQFile::remove( lockFileName() );
+ TQFile::remove( mLockUniqueName );
emit unlocked();
} else {
mError = i18n("Unlock failed. Lock file is owned by other process: %1 (%2)")
- .arg( app ).arg( QString::number( pid ) );
+ .arg( app ).arg( TQString::number( pid ) );
kdDebug() << "Lock::unlock(): " << mError << endl;
return false;
}
@@ -154,7 +154,7 @@ bool Lock::unlock()
return true;
}
-QString Lock::error() const
+TQString Lock::error() const
{
return mError;
}
diff --git a/kabc/lock.h b/kabc/lock.h
index 1707d0f13..95f5c87a3 100644
--- a/kabc/lock.h
+++ b/kabc/lock.h
@@ -21,8 +21,8 @@
#ifndef KABC_LOCK_H
#define KABC_LOCK_H
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -42,7 +42,7 @@ class KABC_EXPORT Lock : public QObject
@param identifier An identifier for the resource to be locked, e.g. a file
name.
*/
- Lock( const QString &identifier );
+ Lock( const TQString &identifier );
/**
Destruct lock object. This also removes the lock on the resource.
@@ -59,25 +59,25 @@ class KABC_EXPORT Lock : public QObject
*/
virtual bool unlock();
- virtual QString error() const;
+ virtual TQString error() const;
- QString lockFileName() const;
+ TQString lockFileName() const;
- static bool readLockFile( const QString &filename, int &pid, QString &app );
- static bool writeLockFile( const QString &filename );
+ static bool readLockFile( const TQString &filename, int &pid, TQString &app );
+ static bool writeLockFile( const TQString &filename );
- static QString locksDir();
+ static TQString locksDir();
signals:
void locked();
void unlocked();
private:
- QString mIdentifier;
+ TQString mIdentifier;
- QString mLockUniqueName;
+ TQString mLockUniqueName;
- QString mError;
+ TQString mError;
class Private;
Private *d;
diff --git a/kabc/locknull.cpp b/kabc/locknull.cpp
index 1df269a24..234c2c214 100644
--- a/kabc/locknull.cpp
+++ b/kabc/locknull.cpp
@@ -27,7 +27,7 @@
using namespace KABC;
LockNull::LockNull( bool allowAccess )
- : Lock( QString::null ), mAllowAccess( allowAccess )
+ : Lock( TQString::null ), mAllowAccess( allowAccess )
{
}
@@ -54,7 +54,7 @@ bool LockNull::unlock()
return true;
}
-QString LockNull::error() const
+TQString LockNull::error() const
{
if ( mAllowAccess )
return i18n("LockNull: All locks succeed but no actual locking is done.");
diff --git a/kabc/locknull.h b/kabc/locknull.h
index 11b8c4fd5..dfefe122a 100644
--- a/kabc/locknull.h
+++ b/kabc/locknull.h
@@ -21,7 +21,7 @@
#ifndef KABC_LOCKNULL_H
#define KABC_LOCKNULL_H
-#include <qstring.h>
+#include <tqstring.h>
#include "lock.h"
@@ -40,7 +40,7 @@ class KABC_EXPORT LockNull : public Lock
bool lock();
bool unlock();
- QString error() const;
+ TQString error() const;
private:
bool mAllowAccess;
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 31fba4a9e..31a99f9ea 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -31,7 +31,7 @@ PhoneNumber::PhoneNumber() :
init();
}
-PhoneNumber::PhoneNumber( const QString &number, int type ) :
+PhoneNumber::PhoneNumber( const TQString &number, int type ) :
mType( type )
{
init();
@@ -48,7 +48,7 @@ void PhoneNumber::init()
mId = KApplication::randomString( 8 );
}
-void PhoneNumber::validateNumber( const QString &number )
+void PhoneNumber::validateNumber( const TQString &number )
{
mNumber = number;
@@ -70,22 +70,22 @@ bool PhoneNumber::operator!=( const PhoneNumber &p ) const
return !( p == *this );
}
-void PhoneNumber::setId( const QString &id )
+void PhoneNumber::setId( const TQString &id )
{
mId = id;
}
-QString PhoneNumber::id() const
+TQString PhoneNumber::id() const
{
return mId;
}
-void PhoneNumber::setNumber( const QString &number )
+void PhoneNumber::setNumber( const TQString &number )
{
validateNumber( number );
}
-QString PhoneNumber::number() const
+TQString PhoneNumber::number() const
{
return mNumber;
}
@@ -100,9 +100,9 @@ int PhoneNumber::type() const
return mType;
}
-QString PhoneNumber::typeLabel() const
+TQString PhoneNumber::typeLabel() const
{
- QString label;
+ TQString label;
bool first = true;
const TypeList list = typeList();
@@ -119,7 +119,7 @@ QString PhoneNumber::typeLabel() const
return label;
}
-QString PhoneNumber::label() const
+TQString PhoneNumber::label() const
{
return typeLabel( type() );
}
@@ -136,12 +136,12 @@ PhoneNumber::TypeList PhoneNumber::typeList()
return list;
}
-QString PhoneNumber::label( int type )
+TQString PhoneNumber::label( int type )
{
return typeLabel( type );
}
-QString PhoneNumber::typeLabel( int type )
+TQString PhoneNumber::typeLabel( int type )
{
if ( type & Pref )
return i18n( "Preferred phone", "Preferred" );
@@ -200,12 +200,12 @@ QString PhoneNumber::typeLabel( int type )
}
}
-QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone )
+TQDataStream &KABC::operator<<( TQDataStream &s, const PhoneNumber &phone )
{
return s << phone.mId << phone.mType << phone.mNumber;
}
-QDataStream &KABC::operator>>( QDataStream &s, PhoneNumber &phone )
+TQDataStream &KABC::operator>>( TQDataStream &s, PhoneNumber &phone )
{
s >> phone.mId >> phone.mType >> phone.mNumber;
diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h
index 099cd2261..71c9a692d 100644
--- a/kabc/phonenumber.h
+++ b/kabc/phonenumber.h
@@ -21,8 +21,8 @@
#ifndef KABC_PHONENUMBER_H
#define KABC_PHONENUMBER_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -37,12 +37,12 @@ namespace KABC {
*/
class KABC_EXPORT PhoneNumber
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const PhoneNumber & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, PhoneNumber & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & );
public:
- typedef QValueList<PhoneNumber> List;
- typedef QValueList<int> TypeList;
+ typedef TQValueList<PhoneNumber> List;
+ typedef TQValueList<int> TypeList;
/**
@li @p Home - Home number
@@ -76,7 +76,7 @@ class KABC_EXPORT PhoneNumber
@param type Type as defined in enum. Multiple types can be
specified by combining them by a logical or.
*/
- PhoneNumber( const QString &number, int type = Home );
+ PhoneNumber( const TQString &number, int type = Home );
/**
Destructor.
@@ -89,22 +89,22 @@ class KABC_EXPORT PhoneNumber
/**
Sets the unique identifier.
*/
- void setId( const QString &id );
+ void setId( const TQString &id );
/**
Returns the unique identifier.
*/
- QString id() const;
+ TQString id() const;
/**
Sets the number.
*/
- void setNumber( const QString & );
+ void setNumber( const TQString & );
/**
Returns the number.
*/
- QString number() const;
+ TQString number() const;
/**
Sets the type. Multiple types can be specified by combining them by
@@ -120,12 +120,12 @@ class KABC_EXPORT PhoneNumber
/**
Returns a translated string of all types the address has.
*/
- QString typeLabel() const;
+ TQString typeLabel() const;
/**
Returns the translated label for phone number depending on its type.
*/
- QString label() const;
+ TQString label() const;
/**
Returns a list of all available types
@@ -135,26 +135,26 @@ class KABC_EXPORT PhoneNumber
/**
Returns the translated label for phone number type.
*/
- static QString typeLabel( int type );
+ static TQString typeLabel( int type );
/**
Returns the translated label for phone number type.
@obsolete
*/
- static QString label( int type );
+ static TQString label( int type );
private:
void init();
- void validateNumber( const QString& );
+ void validateNumber( const TQString& );
- QString mId;
+ TQString mId;
int mType;
- QString mNumber;
+ TQString mNumber;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const PhoneNumber & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, PhoneNumber & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const PhoneNumber & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, PhoneNumber & );
}
diff --git a/kabc/picture.cpp b/kabc/picture.cpp
index d0b79c89a..4ddd3f537 100644
--- a/kabc/picture.cpp
+++ b/kabc/picture.cpp
@@ -27,12 +27,12 @@ Picture::Picture()
{
}
-Picture::Picture( const QString &url )
+Picture::Picture( const TQString &url )
: mUrl( url ), mIntern( false )
{
}
-Picture::Picture( const QImage &data )
+Picture::Picture( const TQImage &data )
: mData( data ), mIntern( true )
{
}
@@ -61,19 +61,19 @@ bool Picture::operator!=( const Picture &p ) const
return !( p == *this );
}
-void Picture::setUrl( const QString &url )
+void Picture::setUrl( const TQString &url )
{
mUrl = url;
mIntern = false;
}
-void Picture::setData( const QImage &data )
+void Picture::setData( const TQImage &data )
{
mData = data;
mIntern = true;
}
-void Picture::setType( const QString &type )
+void Picture::setType( const TQString &type )
{
mType = type;
}
@@ -83,22 +83,22 @@ bool Picture::isIntern() const
return mIntern;
}
-QString Picture::url() const
+TQString Picture::url() const
{
return mUrl;
}
-QImage Picture::data() const
+TQImage Picture::data() const
{
return mData;
}
-QString Picture::type() const
+TQString Picture::type() const
{
return mType;
}
-QString Picture::asString() const
+TQString Picture::asString() const
{
if ( mIntern )
return "intern picture";
@@ -106,13 +106,13 @@ QString Picture::asString() const
return mUrl;
}
-QDataStream &KABC::operator<<( QDataStream &s, const Picture &picture )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Picture &picture )
{
return s << picture.mIntern << picture.mUrl << picture.mType;
// return s << picture.mIntern << picture.mUrl << picture.mType << picture.mData;
}
-QDataStream &KABC::operator>>( QDataStream &s, Picture &picture )
+TQDataStream &KABC::operator>>( TQDataStream &s, Picture &picture )
{
s >> picture.mIntern >> picture.mUrl >> picture.mType;
// s >> picture.mIntern >> picture.mUrl >> picture.mType >> picture.mData;
diff --git a/kabc/picture.h b/kabc/picture.h
index a28f3ae14..ce619d912 100644
--- a/kabc/picture.h
+++ b/kabc/picture.h
@@ -21,7 +21,7 @@
#ifndef KABC_PICTURE_H
#define KABC_PICTURE_H
-#include <qimage.h>
+#include <tqimage.h>
#include <kdelibs_export.h>
@@ -29,8 +29,8 @@ namespace KABC {
class KABC_EXPORT Picture
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Picture & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Picture & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & );
public:
@@ -44,14 +44,14 @@ public:
*
* @param url A URL that describes the position of the picture file.
*/
- Picture( const QString &url );
+ Picture( const TQString &url );
/**
* Consturctor.
*
* @param data The raw data of the picture.
*/
- Picture( const QImage &data );
+ Picture( const TQImage &data );
/**
* Destructor.
@@ -69,7 +69,7 @@ public:
*
* @param url The location URL of the picture file.
*/
- void setUrl( const QString &url );
+ void setUrl( const TQString &url );
/**
* Sets the raw data of the picture. When using this function,
@@ -77,12 +77,12 @@ public:
*
* @param data The raw data of the picture.
*/
- void setData( const QImage &data );
+ void setData( const TQImage &data );
/**
* Sets the type of the picture.
*/
- void setType( const QString &type );
+ void setType( const TQString &type );
/**
* Returns whether the picture is described by a URL (extern) or
@@ -96,33 +96,33 @@ public:
/**
* Returns the location URL of this picture.
*/
- QString url() const;
+ TQString url() const;
/**
* Returns the raw data of this picture.
*/
- QImage data() const;
+ TQImage data() const;
/**
* Returns the type of this picture.
*/
- QString type() const;
+ TQString type() const;
/**
* Returns string representation of the picture.
*/
- QString asString() const;
+ TQString asString() const;
private:
- QString mUrl;
- QString mType;
- QImage mData;
+ TQString mUrl;
+ TQString mType;
+ TQImage mData;
int mIntern;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Picture & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Picture & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Picture & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Picture & );
}
#endif
diff --git a/kabc/plugin.cpp b/kabc/plugin.cpp
index a00e0187f..a53192559 100644
--- a/kabc/plugin.cpp
+++ b/kabc/plugin.cpp
@@ -30,32 +30,32 @@ Plugin::~Plugin()
{
}
-void Plugin::setType( const QString& type )
+void Plugin::setType( const TQString& type )
{
mType = type;
}
-QString Plugin::type() const
+TQString Plugin::type() const
{
return mType;
}
-void Plugin::setNameLabel( const QString& label )
+void Plugin::setNameLabel( const TQString& label )
{
mNameLabel = label;
}
-QString Plugin::nameLabel() const
+TQString Plugin::nameLabel() const
{
return mNameLabel;
}
-void Plugin::setDescriptionLabel( const QString& label )
+void Plugin::setDescriptionLabel( const TQString& label )
{
mDescriptionLabel = label;
}
-QString Plugin::descriptionLabel() const
+TQString Plugin::descriptionLabel() const
{
return mDescriptionLabel;
}
diff --git a/kabc/plugin.h b/kabc/plugin.h
index a25b647de..17fbdd13f 100644
--- a/kabc/plugin.h
+++ b/kabc/plugin.h
@@ -21,7 +21,7 @@
#ifndef KABC_PLUGIN_H
#define KABC_PLUGIN_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -33,19 +33,19 @@ public:
Plugin();
virtual ~Plugin();
- virtual void setType( const QString& type );
- virtual QString type() const;
+ virtual void setType( const TQString& type );
+ virtual TQString type() const;
- virtual void setNameLabel( const QString& label );
- virtual QString nameLabel() const;
+ virtual void setNameLabel( const TQString& label );
+ virtual TQString nameLabel() const;
- virtual void setDescriptionLabel( const QString& label );
- virtual QString descriptionLabel() const;
+ virtual void setDescriptionLabel( const TQString& label );
+ virtual TQString descriptionLabel() const;
private:
- QString mType;
- QString mNameLabel;
- QString mDescriptionLabel;
+ TQString mType;
+ TQString mNameLabel;
+ TQString mDescriptionLabel;
};
}
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index 1947e98f3..0897c9cee 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -24,9 +24,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -67,13 +67,13 @@ ResourceDir::ResourceDir( const KConfig *config )
}
}
-ResourceDir::ResourceDir( const QString &path, const QString &format )
+ResourceDir::ResourceDir( const TQString &path, const TQString &format )
: Resource( 0 ), mAsynchronous( false )
{
init( path, format );
}
-void ResourceDir::init( const QString &path, const QString &format )
+void ResourceDir::init( const TQString &path, const TQString &format )
{
mFormatName = format;
@@ -87,9 +87,9 @@ void ResourceDir::init( const QString &path, const QString &format )
mLock = 0;
- connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) );
setPath( path );
}
@@ -143,15 +143,15 @@ void ResourceDir::releaseSaveTicket( Ticket *ticket )
bool ResourceDir::doOpen()
{
- QDir dir( mPath );
+ TQDir dir( mPath );
if ( !dir.exists() ) { // no directory available
return dir.mkdir( dir.path() );
} else {
- QString testName = dir.entryList( QDir::Files )[0];
+ TQString testName = dir.entryList( TQDir::Files )[0];
if ( testName.isNull() || testName.isEmpty() ) // no file in directory
return true;
- QFile file( mPath + "/" + testName );
+ TQFile file( mPath + "/" + testName );
if ( file.open( IO_ReadOnly ) )
return true;
@@ -174,13 +174,13 @@ bool ResourceDir::load()
mAsynchronous = false;
- QDir dir( mPath );
- QStringList files = dir.entryList( QDir::Files );
+ TQDir dir( mPath );
+ TQStringList files = dir.entryList( TQDir::Files );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
bool ok = true;
for ( it = files.begin(); it != files.end(); ++it ) {
- QFile file( mPath + "/" + (*it) );
+ TQFile file( mPath + "/" + (*it) );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) );
@@ -224,7 +224,7 @@ bool ResourceDir::save( Ticket * )
if ( !it.data().changed() )
continue;
- QFile file( mPath + "/" + (*it).uid() );
+ TQFile file( mPath + "/" + (*it).uid() );
if ( !file.open( IO_WriteOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) );
continue;
@@ -255,7 +255,7 @@ bool ResourceDir::asyncSave( Ticket *ticket )
return ok;
}
-void ResourceDir::setPath( const QString &path )
+void ResourceDir::setPath( const TQString &path )
{
mDirWatch.stopScan();
if ( mDirWatch.contains( mPath ) )
@@ -266,12 +266,12 @@ void ResourceDir::setPath( const QString &path )
mDirWatch.startScan();
}
-QString ResourceDir::path() const
+TQString ResourceDir::path() const
{
return mPath;
}
-void ResourceDir::setFormat( const QString &format )
+void ResourceDir::setFormat( const TQString &format )
{
mFormatName = format;
@@ -282,7 +282,7 @@ void ResourceDir::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
}
-QString ResourceDir::format() const
+TQString ResourceDir::format() const
{
return mFormatName;
}
@@ -303,7 +303,7 @@ void ResourceDir::pathChanged()
void ResourceDir::removeAddressee( const Addressee& addr )
{
- QFile::remove( mPath + "/" + addr.uid() );
+ TQFile::remove( mPath + "/" + addr.uid() );
mAddrMap.erase( addr.uid() );
}
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h
index b54f0ddda..125882a84 100644
--- a/kabc/plugins/dir/resourcedir.h
+++ b/kabc/plugins/dir/resourcedir.h
@@ -44,7 +44,7 @@ class KABC_EXPORT ResourceDir : public Resource
public:
ResourceDir( const KConfig* );
- ResourceDir( const QString &path, const QString &type = "vcard" );
+ ResourceDir( const TQString &path, const TQString &type = "vcard" );
~ResourceDir();
virtual void writeConfig( KConfig* );
@@ -63,22 +63,22 @@ class KABC_EXPORT ResourceDir : public Resource
/**
Set path to be used for saving.
*/
- void setPath( const QString & );
+ void setPath( const TQString & );
/**
Return path used for loading and saving the address book.
*/
- QString path() const;
+ TQString path() const;
/**
Set the format by name.
*/
- void setFormat( const QString &format );
+ void setFormat( const TQString &format );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
/**
Remove a addressee from its source.
@@ -90,15 +90,15 @@ class KABC_EXPORT ResourceDir : public Resource
void pathChanged();
protected:
- void init( const QString &path, const QString &format );
+ void init( const TQString &path, const TQString &format );
private:
FormatPlugin *mFormat;
KDirWatch mDirWatch;
- QString mPath;
- QString mFormatName;
+ TQString mPath;
+ TQString mFormatName;
Lock *mLock;
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index ada7c1f9d..819d75d96 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,19 +34,19 @@
using namespace KABC;
-ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
+ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mFileNameEdit = new KURLRequester( this );
mFileNameEdit->setMode( KFile::Directory );
@@ -54,8 +54,8 @@ ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mFileNameEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
diff --git a/kabc/plugins/dir/resourcedirconfig.h b/kabc/plugins/dir/resourcedirconfig.h
index 46d446b36..4333fdae1 100644
--- a/kabc/plugins/dir/resourcedirconfig.h
+++ b/kabc/plugins/dir/resourcedirconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceDirConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -45,7 +45,7 @@ private:
KComboBox* mFormatBox;
KURLRequester* mFileNameEdit;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
bool mInEditMode;
};
diff --git a/kabc/plugins/evolution/dbwrapper.cpp b/kabc/plugins/evolution/dbwrapper.cpp
index cc566344c..bcc641191 100644
--- a/kabc/plugins/evolution/dbwrapper.cpp
+++ b/kabc/plugins/evolution/dbwrapper.cpp
@@ -1,6 +1,6 @@
#include <db.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "dbwrapper.h"
@@ -9,8 +9,8 @@ using namespace Evolution;
struct DBIterator::Data {
DBWrapper *wrapper;
- QString key;
- QString data;
+ TQString key;
+ TQString data;
DBC* cursor;
bool atEnd;
};
@@ -55,13 +55,13 @@ DBIterator& DBIterator::operator=( const DBIterator& rhs ) {
return *this;
}
-QString DBIterator::key()const{
+TQString DBIterator::key()const{
return data->key;
}
-QString DBIterator::value()const {
+TQString DBIterator::value()const {
return data->data;
}
-QString DBIterator::operator*() {
+TQString DBIterator::operator*() {
return data->data;
}
DBIterator& DBIterator::operator++() {
@@ -71,8 +71,8 @@ DBIterator& DBIterator::operator++() {
if ( data->cursor )
if ( data->cursor->c_get(data->cursor, &key, &val,DB_NEXT ) != 0 )
data->atEnd = true;
- data->key = QString::fromUtf8( (char*)key.data, key.size );
- data->data = QString::fromUtf8( (char*)val.data, val.size );
+ data->key = TQString::fromUtf8( (char*)key.data, key.size );
+ data->data = TQString::fromUtf8( (char*)val.data, val.size );
return *this;
}
DBIterator& DBIterator::operator--() {
@@ -82,8 +82,8 @@ DBIterator& DBIterator::operator--() {
if ( data->cursor )
if ( data->cursor->c_get(data->cursor, &key, &val,DB_PREV ) != 0 )
data->atEnd = true;
- data->key = QString::fromUtf8( (char*)key.data, key.size );
- data->data = QString::fromUtf8( (char*)val.data, val.size );
+ data->key = TQString::fromUtf8( (char*)key.data, key.size );
+ data->data = TQString::fromUtf8( (char*)val.data, val.size );
return *this;
}
bool DBIterator::operator==( const DBIterator& rhs ) {
@@ -107,9 +107,9 @@ DBWrapper::~DBWrapper() {
data->db->close(data->db, 0 );
delete data;
}
-bool DBWrapper::open( const QString& file, bool on) {
+bool DBWrapper::open( const TQString& file, bool on) {
data->only = on;
- return !data->db->open(data->db, QFile::encodeName( file ), NULL, DB_HASH, 0, 0666 );
+ return !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 );
}
bool DBWrapper::save() {
return true;
@@ -134,8 +134,8 @@ DBIterator DBWrapper::begin() {
}
it.data->cursor = cursor;
- it.data->key = QString::fromUtf8((char*)key.data, key.size );
- it.data->data = QString::fromUtf8((char*)val.data, val.size );
+ it.data->key = TQString::fromUtf8((char*)key.data, key.size );
+ it.data->data = TQString::fromUtf8((char*)val.data, val.size );
return it;
}
@@ -145,26 +145,26 @@ DBIterator DBWrapper::end() {
return it;
}
-bool DBWrapper::find( const QString& _key, QString& _val ) {
+bool DBWrapper::find( const TQString& _key, TQString& _val ) {
DBT key, val;
::memset(&key, 0, sizeof(key) );
::memset(&val, 0, sizeof(val) );
- QCString db_key = _key.local8Bit();
+ TQCString db_key = _key.local8Bit();
key.data = db_key.data();
key.size = db_key.size();
int ret = data->db->get(data->db, NULL, &key, &val, 0 );
if (!ret) {
- _val = QString::fromUtf8( (char*)val.data, val.size );
+ _val = TQString::fromUtf8( (char*)val.data, val.size );
qWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data );
return true;
}
return false;
}
-bool DBWrapper::add( const QString& _key, const QString& _val ) {
- QCString db_key = _key.local8Bit();
- QCString db_val = _val.local8Bit();
+bool DBWrapper::add( const TQString& _key, const TQString& _val ) {
+ TQCString db_key = _key.local8Bit();
+ TQCString db_val = _val.local8Bit();
DBT key, val;
::memset(&key, 0, sizeof(key) );
::memset(&val, 0, sizeof(val) );
@@ -176,8 +176,8 @@ bool DBWrapper::add( const QString& _key, const QString& _val ) {
return !data->db->put(data->db, NULL, &key, &val, 0 );
}
-bool DBWrapper::remove( const QString& _key ) {
- QCString db_key = _key.local8Bit();
+bool DBWrapper::remove( const TQString& _key ) {
+ TQCString db_key = _key.local8Bit();
DBT key;
memset(&key, 0, sizeof(key) );
key.data = db_key.data();
diff --git a/kabc/plugins/evolution/dbwrapper.h b/kabc/plugins/evolution/dbwrapper.h
index 484605acf..e5e0a2c33 100644
--- a/kabc/plugins/evolution/dbwrapper.h
+++ b/kabc/plugins/evolution/dbwrapper.h
@@ -3,8 +3,8 @@
#include <db.h>
-#include <qstring.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqpair.h>
namespace Evolution {
@@ -18,10 +18,10 @@ namespace Evolution {
DBIterator( const DBIterator& );
DBIterator &operator=( const DBIterator& );
- QString key()const;
- QString value()const;
+ TQString key()const;
+ TQString value()const;
- QString operator*();
+ TQString operator*();
DBIterator &operator++();
DBIterator &operator--();
@@ -37,18 +37,18 @@ namespace Evolution {
DBWrapper();
~DBWrapper();
- QString lastError()const;
+ TQString lastError()const;
- bool open( const QString& file, bool readOnly = false);
+ bool open( const TQString& file, bool readOnly = false);
bool save();
DBIterator begin();
DBIterator end();
- bool find( const QString& key, QString& value );
- bool add( const QString& key, const QString& val );
- bool remove( const QString& key );
+ bool find( const TQString& key, TQString& value );
+ bool add( const TQString& key, const TQString& val );
+ bool remove( const TQString& key );
private:
- // DBT element( const QString& );
+ // DBT element( const TQString& );
struct Data;
Data* data;
diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp
index a1858bf83..a93d7d2a1 100644
--- a/kabc/plugins/evolution/resourceevo.cpp
+++ b/kabc/plugins/evolution/resourceevo.cpp
@@ -1,4 +1,4 @@
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <klocale.h>
@@ -22,7 +22,7 @@ class EvolutionFactory : public KRES::PluginFactoryBase
return new ResourceEvolution( config );
}
- KRES::ConfigWidget *configWidget( QWidget * )
+ KRES::ConfigWidget *configWidget( TQWidget * )
{
return 0;
}
@@ -46,11 +46,11 @@ ResourceEvolution::~ResourceEvolution() {
}
bool ResourceEvolution::doOpen() {
mWrap = new DBWrapper;
- if (!mWrap->open( QDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) {
+ if (!mWrap->open( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db" ) ) {
return false;
}
- QString val;
+ TQString val;
if (!mWrap->find( "PAS-DB-VERSION", val ) )
return false;
@@ -88,7 +88,7 @@ bool ResourceEvolution::load() {
qWarning( "val:%s", it.value().latin1() );
VCardTool tool;
- QString str = it.value().stripWhiteSpace();
+ TQString str = it.value().stripWhiteSpace();
Addressee::List list = tool.parseVCards( str );
if (!list.first().isEmpty() ) {
Addressee adr = list.first();
@@ -104,7 +104,7 @@ bool ResourceEvolution::save( Ticket* ticket ) {
// just delete the summary so evolution will regenerate it
// on next start up
- (void)QFile::remove( QDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" );
+ (void)TQFile::remove( TQDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary" );
AddressBook::Iterator it;
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 9c0f85fb8..b391dffa5 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -25,9 +25,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -50,7 +50,7 @@ ResourceFile::ResourceFile( const KConfig *config )
: Resource( config ), mFormat( 0 ),
mAsynchronous( false )
{
- QString fileName, formatName;
+ TQString fileName, formatName;
if ( config ) {
fileName = config->readPathEntry( "FileName", StdAddressBook::fileName() );
@@ -63,15 +63,15 @@ ResourceFile::ResourceFile( const KConfig *config )
init( fileName, formatName );
}
-ResourceFile::ResourceFile( const QString &fileName,
- const QString &formatName )
+ResourceFile::ResourceFile( const TQString &fileName,
+ const TQString &formatName )
: Resource( 0 ), mFormat( 0 ),
mAsynchronous( false )
{
init( fileName, formatName );
}
-void ResourceFile::init( const QString &fileName, const QString &formatName )
+void ResourceFile::init( const TQString &fileName, const TQString &formatName )
{
mFormatName = formatName;
@@ -83,9 +83,9 @@ void ResourceFile::init( const QString &fileName, const QString &formatName )
mFormat = factory->format( mFormatName );
}
- connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
- connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
- connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( fileChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( fileChanged() ) );
setFileName( fileName );
@@ -143,7 +143,7 @@ void ResourceFile::releaseSaveTicket( Ticket *ticket )
bool ResourceFile::doOpen()
{
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.exists() ) {
// try to create the file
@@ -153,7 +153,7 @@ bool ResourceFile::doOpen()
return ok;
} else {
- QFileInfo fileInfo( mFileName );
+ TQFileInfo fileInfo( mFileName );
if ( readOnly() || !fileInfo.isWritable() ) {
if ( !file.open( IO_ReadOnly ) )
return false;
@@ -167,22 +167,22 @@ bool ResourceFile::doOpen()
kdDebug() << "File size is zero. Evaluating backups" << endl;
for (int i=0; i!=20; i++)
{
- QFile backup( mFileName + "__" + QString::number(i) );
+ TQFile backup( mFileName + "__" + TQString::number(i) );
kdDebug() << "Evaluating" << backup.name() << " size: " << backup.size() << endl;
if ( backup.size() != 0 )
{
kdDebug() << "Restoring backup " << i << endl;
- const QString src = mFileName + "__" + QString::number(i);
- const QString dest = mFileName;
+ const TQString src = mFileName + "__" + TQString::number(i);
+ const TQString dest = mFileName;
// remove dest
- QFile::remove( dest );
+ TQFile::remove( dest );
// copy src to dest
if ( backup.open( IO_ReadOnly ) ) {
- const QByteArray data = backup.readAll();
+ const TQByteArray data = backup.readAll();
- QFile out( dest );
+ TQFile out( dest );
if ( out.open( IO_WriteOnly ) ) {
out.writeBlock( data );
out.close();
@@ -213,7 +213,7 @@ bool ResourceFile::load()
mAsynchronous = false;
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) );
return false;
@@ -245,25 +245,25 @@ bool ResourceFile::save( Ticket * )
kdDebug(5700) << "ResourceFile::save()" << endl;
// Only do the logrotate dance when the __0 file is not 0 bytes.
- QFile file( mFileName + "__0" );
+ TQFile file( mFileName + "__0" );
if ( file.size() != 0 ) {
- const QString last = mFileName + "__20";
+ const TQString last = mFileName + "__20";
kdDebug() << "deleting " << last << endl;
- QFile::remove( last );
+ TQFile::remove( last );
for (int i=19; i>=0; i--)
{
- const QString src = mFileName + "__" + QString::number(i);
- const QString dest = mFileName + "__" + QString::number(i+1);
+ const TQString src = mFileName + "__" + TQString::number(i);
+ const TQString dest = mFileName + "__" + TQString::number(i+1);
kdDebug() << "moving " << src << " -> " << dest << endl;
// copy src to dest
- QFile in( src );
+ TQFile in( src );
if ( in.open( IO_ReadOnly ) ) {
- const QByteArray data = in.readAll();
+ const TQByteArray data = in.readAll();
- QFile out( dest );
+ TQFile out( dest );
if ( out.open( IO_WriteOnly ) ) {
out.writeBlock( data );
out.close();
@@ -273,13 +273,13 @@ bool ResourceFile::save( Ticket * )
}
// remove src
- QFile::remove( src );
+ TQFile::remove( src );
}
} else
kdDebug() << "Not starting logrotate __0 is 0 bytes." << endl;
- QString extension = "__0";
- (void) KSaveFile::backupFile( mFileName, QString::null /*directory*/,
+ TQString extension = "__0";
+ (void) KSaveFile::backupFile( mFileName, TQString::null /*directory*/,
extension );
mDirWatch.stopScan();
@@ -309,14 +309,14 @@ bool ResourceFile::asyncSave( Ticket *ticket )
bool ok = save( ticket );
if ( !ok )
- QTimer::singleShot( 0, this, SLOT( emitSavingError() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingError() ) );
else
- QTimer::singleShot( 0, this, SLOT( emitSavingFinished() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( emitSavingFinished() ) );
return ok;
}
-void ResourceFile::setFileName( const QString &fileName )
+void ResourceFile::setFileName( const TQString &fileName )
{
mDirWatch.stopScan();
if ( mDirWatch.contains( mFileName ) )
@@ -328,12 +328,12 @@ void ResourceFile::setFileName( const QString &fileName )
mDirWatch.startScan();
}
-QString ResourceFile::fileName() const
+TQString ResourceFile::fileName() const
{
return mFileName;
}
-void ResourceFile::setFormat( const QString &format )
+void ResourceFile::setFormat( const TQString &format )
{
mFormatName = format;
delete mFormat;
@@ -342,7 +342,7 @@ void ResourceFile::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
}
-QString ResourceFile::format() const
+TQString ResourceFile::format() const
{
return mFormatName;
}
@@ -365,9 +365,9 @@ void ResourceFile::fileChanged()
void ResourceFile::removeAddressee( const Addressee &addr )
{
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) );
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) );
- QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) );
+ TQFile::remove( TQFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) );
mAddrMap.erase( addr.uid() );
}
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h
index 84dfc7cda..b44c22ec1 100644
--- a/kabc/plugins/file/resourcefile.h
+++ b/kabc/plugins/file/resourcefile.h
@@ -52,7 +52,7 @@ class KABC_EXPORT ResourceFile : public Resource
/**
Construct file resource on file @arg fileName using format @arg formatName.
*/
- ResourceFile( const QString &fileName, const QString &formatName = "vcard" );
+ ResourceFile( const TQString &fileName, const TQString &formatName = "vcard" );
/**
Destructor.
@@ -103,22 +103,22 @@ class KABC_EXPORT ResourceFile : public Resource
/**
Set name of file to be used for saving.
*/
- void setFileName( const QString & );
+ void setFileName( const TQString & );
/**
Return name of file used for loading and saving the address book.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
Sets a new format by name.
*/
- void setFormat( const QString &name );
+ void setFormat( const TQString &name );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
/**
Remove a addressee from its source.
@@ -136,14 +136,14 @@ class KABC_EXPORT ResourceFile : public Resource
void fileChanged();
protected:
- void init( const QString &fileName, const QString &format );
+ void init( const TQString &fileName, const TQString &format );
- bool lock( const QString &fileName );
- void unlock( const QString &fileName );
+ bool lock( const TQString &fileName );
+ void unlock( const TQString &fileName );
private:
- QString mFileName;
- QString mFormatName;
+ TQString mFileName;
+ TQString mFormatName;
FormatPlugin *mFormat;
diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp
index a6d8ab4f9..92b07594f 100644
--- a/kabc/plugins/file/resourcefileconfig.cpp
+++ b/kabc/plugins/file/resourcefileconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,30 +36,30 @@
using namespace KABC;
-ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name )
+ResourceFileConfig::ResourceFileConfig( TQWidget* parent, const char* name )
: ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mFileNameEdit = new KURLRequester( this );
- connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( checkFilePermissions( const QString & ) ) );
+ connect( mFileNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( checkFilePermissions( const TQString & ) ) );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mFileNameEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
@@ -108,11 +108,11 @@ void ResourceFileConfig::saveSettings( KRES::Resource *res )
resource->setFileName( mFileNameEdit->url() );
}
-void ResourceFileConfig::checkFilePermissions( const QString& fileName )
+void ResourceFileConfig::checkFilePermissions( const TQString& fileName )
{
// If file exist but is not writeable...
- if ( access( QFile::encodeName( fileName ), F_OK ) == 0 )
- emit setReadOnly( access( QFile::encodeName( fileName ), W_OK ) < 0 );
+ if ( access( TQFile::encodeName( fileName ), F_OK ) == 0 )
+ emit setReadOnly( access( TQFile::encodeName( fileName ), W_OK ) < 0 );
}
#include "resourcefileconfig.moc"
diff --git a/kabc/plugins/file/resourcefileconfig.h b/kabc/plugins/file/resourcefileconfig.h
index 3e92f0728..343a5623d 100644
--- a/kabc/plugins/file/resourcefileconfig.h
+++ b/kabc/plugins/file/resourcefileconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceFileConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -42,14 +42,14 @@ public slots:
void saveSettings( KRES::Resource *resource );
protected slots:
- void checkFilePermissions( const QString& fileName );
+ void checkFilePermissions( const TQString& fileName );
private:
KComboBox* mFormatBox;
KURLRequester* mFileNameEdit;
bool mInEditMode;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
};
}
diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp
index 30b8ba7e0..df0baf455 100644
--- a/kabc/plugins/ldapkio/resourceldapkio.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkio.cpp
@@ -20,9 +20,9 @@
*/
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -44,28 +44,28 @@
using namespace KABC;
// Hack from Netaccess
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
class ResourceLDAPKIO::ResourceLDAPKIOPrivate
{
public:
LDIF mLdif;
bool mTLS,mSSL,mSubTree;
- QString mResultDn;
+ TQString mResultDn;
Addressee mAddr;
Address mAd;
Resource::Iterator mSaveIt;
bool mSASL;
- QString mMech;
- QString mRealm, mBindDN;
+ TQString mMech;
+ TQString mRealm, mBindDN;
LDAPUrl mLDAPUrl;
int mVer, mSizeLimit, mTimeLimit, mRDNPrefix;
int mError;
int mCachePolicy;
bool mReadOnly;
bool mAutoCache;
- QString mCacheDst;
+ TQString mCacheDst;
KTempFile *mTmp;
};
@@ -74,8 +74,8 @@ ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config )
{
d = new ResourceLDAPKIOPrivate;
if ( config ) {
- QMap<QString, QString> attrList;
- QStringList attributes = config->readListEntry( "LdapAttributes" );
+ TQMap<TQString, TQString> attrList;
+ TQStringList attributes = config->readListEntry( "LdapAttributes" );
for ( uint pos = 0; pos < attributes.count(); pos += 2 )
mAttributes.insert( attributes[ pos ], attributes[ pos + 1 ] );
@@ -122,8 +122,8 @@ ResourceLDAPKIO::~ResourceLDAPKIO()
void ResourceLDAPKIO::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);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -157,7 +157,7 @@ void ResourceLDAPKIO::listResult( KIO::Job *job)
qApp->exit_loop();
}
-QString ResourceLDAPKIO::findUid( const QString &uid )
+TQString ResourceLDAPKIO::findUid( const TQString &uid )
{
LDAPUrl url( d->mLDAPUrl );
KIO::UDSEntry entry;
@@ -173,18 +173,18 @@ QString ResourceLDAPKIO::findUid( const QString &uid )
KIO::ListJob * listJob = KIO::listDir( url, false /* no GUI */ );
connect( listJob,
- SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
- SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- connect( listJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( listResult( KIO::Job* ) ) );
+ TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( listJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( listResult( KIO::Job* ) ) );
enter_loop();
return d->mResultDn;
}
-QCString ResourceLDAPKIO::addEntry( const QString &attr, const QString &value, bool mod )
+TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value, bool mod )
{
- QCString tmp;
+ TQCString tmp;
if ( !attr.isEmpty() ) {
if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n";
tmp += LDIF::assembleLine( attr, value ) + "\n";
@@ -193,12 +193,12 @@ QCString ResourceLDAPKIO::addEntry( const QString &attr, const QString &value, b
return ( tmp );
}
-bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
- const QString &olddn )
+bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr,
+ const TQString &olddn )
{
- QCString tmp;
- QString dn;
- QByteArray data;
+ TQCString tmp;
+ TQString dn;
+ TQByteArray data;
bool mod = false;
if ( olddn.isEmpty() ) {
@@ -237,8 +237,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
if ( mod ) tmp += "changetype: modify\n";
if ( !mod ) {
tmp += "objectClass: top\n";
- QStringList obclass = QStringList::split( ',', mAttributes[ "objectClass" ] );
- for ( QStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) {
+ TQStringList obclass = TQStringList::split( ',', mAttributes[ "objectClass" ] );
+ for ( TQStringList::iterator it = obclass.begin(); it != obclass.end(); it++ ) {
tmp += LDIF::assembleLine( "objectClass", *it ) + "\n";
}
}
@@ -273,8 +273,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
tmp += addEntry( mAttributes[ "postalcode" ], ad.postalCode(), mod );
}
- QStringList emails = addr.emails();
- QStringList::ConstIterator mailIt = emails.begin();
+ TQStringList emails = addr.emails();
+ TQStringList::ConstIterator mailIt = emails.begin();
if ( !mAttributes[ "mail" ].isEmpty() ) {
if ( mod ) tmp +=
@@ -296,8 +296,8 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
}
if ( !mAttributes[ "jpegPhoto" ].isEmpty() ) {
- QByteArray pic;
- QBuffer buffer( pic );
+ TQByteArray pic;
+ TQBuffer buffer( pic );
buffer.open( IO_WriteOnly );
addr.photo().data().save( &buffer, "JPEG" );
@@ -308,7 +308,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
}
tmp += "\n";
- kdDebug(7125) << "ldif: " << QString::fromUtf8(tmp) << endl;
+ kdDebug(7125) << "ldif: " << TQString::fromUtf8(tmp) << endl;
ldif = tmp;
return true;
}
@@ -386,8 +386,8 @@ void ResourceLDAPKIO::init()
d->mLDAPUrl.setDn( mDn );
if (!mAttributes.empty()) {
- QMap<QString,QString>::Iterator it;
- QStringList attr;
+ TQMap<TQString,TQString>::Iterator it;
+ TQStringList attr;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
if ( !it.data().isEmpty() && it.key() != "objectClass" )
attr.append( it.data() );
@@ -400,11 +400,11 @@ void ResourceLDAPKIO::init()
d->mLDAPUrl.setFilter( mFilter );
d->mLDAPUrl.setExtension( "x-dir", "base" );
if ( d->mTLS ) d->mLDAPUrl.setExtension( "x-tls", "" );
- d->mLDAPUrl.setExtension( "x-ver", QString::number( d->mVer ) );
+ d->mLDAPUrl.setExtension( "x-ver", TQString::number( d->mVer ) );
if ( d->mSizeLimit )
- d->mLDAPUrl.setExtension( "x-sizelimit", QString::number( d->mSizeLimit ) );
+ d->mLDAPUrl.setExtension( "x-sizelimit", TQString::number( d->mSizeLimit ) );
if ( d->mTimeLimit )
- d->mLDAPUrl.setExtension( "x-timelimit", QString::number( d->mTimeLimit ) );
+ d->mLDAPUrl.setExtension( "x-timelimit", TQString::number( d->mTimeLimit ) );
if ( d->mSASL ) {
d->mLDAPUrl.setExtension( "x-sasl", "" );
if ( !d->mBindDN.isEmpty() ) d->mLDAPUrl.setExtension( "bindname", d->mBindDN );
@@ -442,8 +442,8 @@ void ResourceLDAPKIO::writeConfig( KConfig *config )
config->writeEntry( "LdapCachePolicy", d->mCachePolicy );
config->writeEntry( "LdapAutoCache", d->mAutoCache );
- QStringList attributes;
- QMap<QString, QString>::Iterator it;
+ TQStringList attributes;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it )
attributes << it.key() << it.data();
@@ -487,7 +487,7 @@ void ResourceLDAPKIO::activateCache()
{
if ( d->mTmp && d->mError == 0 ) {
d->mTmp->close();
- rename( QFile::encodeName( d->mTmp->name() ), QFile::encodeName( d->mCacheDst ) );
+ rename( TQFile::encodeName( d->mTmp->name() ), TQFile::encodeName( d->mCacheDst ) );
}
if ( d->mTmp ) {
delete d->mTmp;
@@ -511,8 +511,8 @@ KIO::Job *ResourceLDAPKIO::loadFromCache()
KURL url( d->mCacheDst );
job = KIO::get( url, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
}
return job;
}
@@ -535,17 +535,17 @@ bool ResourceLDAPKIO::load()
createCache();
if ( d->mCachePolicy != Cache_Always ) {
job = KIO::get( d->mLDAPUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
}
job = loadFromCache();
if ( job ) {
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
}
if ( mErrorMsg.isEmpty() ) {
@@ -572,17 +572,17 @@ bool ResourceLDAPKIO::asyncLoad()
createCache();
if ( d->mCachePolicy != Cache_Always ) {
KIO::Job *job = KIO::get( d->mLDAPUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
} else {
result( NULL );
}
return true;
}
-void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
+void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data )
{
if ( data.size() ) {
d->mLdif.setLDIF( data );
@@ -594,8 +594,8 @@ void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
}
LDIF::ParseVal ret;
- QString name;
- QByteArray value;
+ TQString name;
+ TQByteArray value;
do {
ret = d->mLdif.nextItem();
switch ( ret ) {
@@ -607,60 +607,60 @@ void ResourceLDAPKIO::data( KIO::Job *, const QByteArray &data )
value = d->mLdif.val();
if ( name == mAttributes[ "commonName" ].lower() ) {
if ( !d->mAddr.formattedName().isEmpty() ) {
- QString fn = d->mAddr.formattedName();
- d->mAddr.setNameFromString( QString::fromUtf8( value, value.size() ) );
+ TQString fn = d->mAddr.formattedName();
+ d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) );
d->mAddr.setFormattedName( fn );
} else
- d->mAddr.setNameFromString( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setNameFromString( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "formattedName" ].lower() ) {
- d->mAddr.setFormattedName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setFormattedName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "givenName" ].lower() ) {
- d->mAddr.setGivenName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setGivenName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "mail" ].lower() ) {
- d->mAddr.insertEmail( QString::fromUtf8( value, value.size() ), true );
+ d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), true );
} else if ( name == mAttributes[ "mailAlias" ].lower() ) {
- d->mAddr.insertEmail( QString::fromUtf8( value, value.size() ), false );
+ d->mAddr.insertEmail( TQString::fromUtf8( value, value.size() ), false );
} else if ( name == mAttributes[ "phoneNumber" ].lower() ) {
PhoneNumber phone;
- phone.setNumber( QString::fromUtf8( value, value.size() ) );
+ phone.setNumber( TQString::fromUtf8( value, value.size() ) );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "telephoneNumber" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Work );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "facsimileTelephoneNumber" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Fax );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "mobile" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Cell );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "pager" ].lower() ) {
- PhoneNumber phone( QString::fromUtf8( value, value.size() ),
+ PhoneNumber phone( TQString::fromUtf8( value, value.size() ),
PhoneNumber::Pager );
d->mAddr.insertPhoneNumber( phone );
} else if ( name == mAttributes[ "description" ].lower() ) {
- d->mAddr.setNote( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setNote( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "title" ].lower() ) {
- d->mAddr.setTitle( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setTitle( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "street" ].lower() ) {
- d->mAd.setStreet( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setStreet( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "state" ].lower() ) {
- d->mAd.setRegion( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setRegion( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "city" ].lower() ) {
- d->mAd.setLocality( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setLocality( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "postalcode" ].lower() ) {
- d->mAd.setPostalCode( QString::fromUtf8( value, value.size() ) );
+ d->mAd.setPostalCode( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "organization" ].lower() ) {
- d->mAddr.setOrganization( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setOrganization( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "familyName" ].lower() ) {
- d->mAddr.setFamilyName( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setFamilyName( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "uid" ].lower() ) {
- d->mAddr.setUid( QString::fromUtf8( value, value.size() ) );
+ d->mAddr.setUid( TQString::fromUtf8( value, value.size() ) );
} else if ( name == mAttributes[ "jpegPhoto" ].lower() ) {
KABC::Picture photo;
- QImage img( value );
+ TQImage img( value );
if ( !img.isNull() ) {
photo.setData( img );
photo.setType( "image/jpeg" );
@@ -714,8 +714,8 @@ void ResourceLDAPKIO::result( KIO::Job *job )
KIO::Job *cjob;
cjob = loadFromCache();
if ( cjob ) {
- connect( cjob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( loadCacheResult( KIO::Job* ) ) );
+ connect( cjob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( loadCacheResult( KIO::Job* ) ) );
} else {
if ( !mErrorMsg.isEmpty() )
emit loadingError( this, mErrorMsg );
@@ -730,10 +730,10 @@ bool ResourceLDAPKIO::save( Ticket* )
d->mSaveIt = begin();
KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( saveData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( syncLoadSaveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) );
enter_loop();
if ( mErrorMsg.isEmpty() ) {
kdDebug(7125) << "ResourceLDAPKIO save ok!" << endl;
@@ -750,10 +750,10 @@ bool ResourceLDAPKIO::asyncSave( Ticket* )
kdDebug(7125) << "ResourceLDAPKIO asyncSave" << endl;
d->mSaveIt = begin();
KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( saveData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( saveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( saveResult( KIO::Job* ) ) );
return true;
}
@@ -778,7 +778,7 @@ void ResourceLDAPKIO::saveResult( KIO::Job *job )
emit savingFinished( this );
}
-void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
+void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data )
{
while ( d->mSaveIt != end() &&
!(*d->mSaveIt).changed() ) d->mSaveIt++;
@@ -792,7 +792,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
kdDebug(7125) << "ResourceLDAPKIO saveData: " << (*d->mSaveIt).assembledName() << endl;
AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) );
-// kdDebug(7125) << "ResourceLDAPKIO save LDIF: " << QString::fromUtf8(data) << endl;
+// kdDebug(7125) << "ResourceLDAPKIO save LDIF: " << TQString::fromUtf8(data) << endl;
// mark as unchanged
(*d->mSaveIt).setChanged( false );
@@ -801,7 +801,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, QByteArray& data )
void ResourceLDAPKIO::removeAddressee( const Addressee& addr )
{
- QString dn = findUid( addr.uid() );
+ TQString dn = findUid( addr.uid() );
kdDebug(7125) << "ResourceLDAPKIO: removeAddressee: " << dn << endl;
@@ -823,42 +823,42 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr )
}
-void ResourceLDAPKIO::setUser( const QString &user )
+void ResourceLDAPKIO::setUser( const TQString &user )
{
mUser = user;
}
-QString ResourceLDAPKIO::user() const
+TQString ResourceLDAPKIO::user() const
{
return mUser;
}
-void ResourceLDAPKIO::setPassword( const QString &password )
+void ResourceLDAPKIO::setPassword( const TQString &password )
{
mPassword = password;
}
-QString ResourceLDAPKIO::password() const
+TQString ResourceLDAPKIO::password() const
{
return mPassword;
}
-void ResourceLDAPKIO::setDn( const QString &dn )
+void ResourceLDAPKIO::setDn( const TQString &dn )
{
mDn = dn;
}
-QString ResourceLDAPKIO::dn() const
+TQString ResourceLDAPKIO::dn() const
{
return mDn;
}
-void ResourceLDAPKIO::setHost( const QString &host )
+void ResourceLDAPKIO::setHost( const TQString &host )
{
mHost = host;
}
-QString ResourceLDAPKIO::host() const
+TQString ResourceLDAPKIO::host() const
{
return mHost;
}
@@ -903,12 +903,12 @@ int ResourceLDAPKIO::timeLimit()
return d->mTimeLimit;
}
-void ResourceLDAPKIO::setFilter( const QString &filter )
+void ResourceLDAPKIO::setFilter( const TQString &filter )
{
mFilter = filter;
}
-QString ResourceLDAPKIO::filter() const
+TQString ResourceLDAPKIO::filter() const
{
return mFilter;
}
@@ -952,12 +952,12 @@ bool ResourceLDAPKIO::isSubTree() const
return d->mSubTree;
}
-void ResourceLDAPKIO::setAttributes( const QMap<QString, QString> &attributes )
+void ResourceLDAPKIO::setAttributes( const TQMap<TQString, TQString> &attributes )
{
mAttributes = attributes;
}
-QMap<QString, QString> ResourceLDAPKIO::attributes() const
+TQMap<TQString, TQString> ResourceLDAPKIO::attributes() const
{
return mAttributes;
}
@@ -982,32 +982,32 @@ bool ResourceLDAPKIO::isSASL() const
return d->mSASL;
}
-void ResourceLDAPKIO::setMech( const QString &mech )
+void ResourceLDAPKIO::setMech( const TQString &mech )
{
d->mMech = mech;
}
-QString ResourceLDAPKIO::mech() const
+TQString ResourceLDAPKIO::mech() const
{
return d->mMech;
}
-void ResourceLDAPKIO::setRealm( const QString &realm )
+void ResourceLDAPKIO::setRealm( const TQString &realm )
{
d->mRealm = realm;
}
-QString ResourceLDAPKIO::realm() const
+TQString ResourceLDAPKIO::realm() const
{
return d->mRealm;
}
-void ResourceLDAPKIO::setBindDN( const QString &binddn )
+void ResourceLDAPKIO::setBindDN( const TQString &binddn )
{
d->mBindDN = binddn;
}
-QString ResourceLDAPKIO::bindDN() const
+TQString ResourceLDAPKIO::bindDN() const
{
return d->mBindDN;
}
@@ -1032,7 +1032,7 @@ bool ResourceLDAPKIO::autoCache()
return d->mAutoCache;
}
-QString ResourceLDAPKIO::cacheDst() const
+TQString ResourceLDAPKIO::cacheDst() const
{
return d->mCacheDst;
}
diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h
index bd72a9b11..2b5685fdc 100644
--- a/kabc/plugins/ldapkio/resourceldapkio.h
+++ b/kabc/plugins/ldapkio/resourceldapkio.h
@@ -62,23 +62,23 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
virtual void removeAddressee( const Addressee& addr );
- void setUser( const QString &user );
- QString user() const;
+ void setUser( const TQString &user );
+ TQString user() const;
- void setPassword( const QString &password );
- QString password() const;
+ void setPassword( const TQString &password );
+ TQString password() const;
- void setRealm( const QString &realm );
- QString realm() const;
+ void setRealm( const TQString &realm );
+ TQString realm() const;
- void setBindDN( const QString &binddn );
- QString bindDN() const;
+ void setBindDN( const TQString &binddn );
+ TQString bindDN() const;
- void setDn( const QString &dn );
- QString dn() const;
+ void setDn( const TQString &dn );
+ TQString dn() const;
- void setHost( const QString &host );
- QString host() const;
+ void setHost( const TQString &host );
+ TQString host() const;
void setPort( int port );
int port() const;
@@ -92,14 +92,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setTimeLimit( int timelimit );
int timeLimit();
- void setFilter( const QString &filter );
- QString filter() const;
+ void setFilter( const TQString &filter );
+ TQString filter() const;
void setIsAnonymous( bool value );
bool isAnonymous() const;
- void setAttributes( const QMap<QString, QString> &attributes );
- QMap<QString, QString> attributes() const;
+ void setAttributes( const TQMap<TQString, TQString> &attributes );
+ TQMap<TQString, TQString> attributes() const;
void setRDNPrefix( int value );
int RDNPrefix() const;
@@ -116,8 +116,8 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setIsSASL( bool value );
bool isSASL() const ;
- void setMech( const QString &mech );
- QString mech() const;
+ void setMech( const TQString &mech );
+ TQString mech() const;
void setCachePolicy( int pol );
int cachePolicy() const;
@@ -125,42 +125,42 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource
void setAutoCache( bool value );
bool autoCache();
- QString cacheDst() const;
+ TQString cacheDst() const;
protected slots:
void entries( KIO::Job*, const KIO::UDSEntryList& );
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
void listResult( KIO::Job* );
void syncLoadSaveResult( KIO::Job* );
void saveResult( KIO::Job* );
- void saveData( KIO::Job*, QByteArray& );
+ void saveData( KIO::Job*, TQByteArray& );
void loadCacheResult( KIO::Job* );
private:
- QString mUser;
- QString mPassword;
- QString mDn;
- QString mHost;
- QString mFilter;
+ TQString mUser;
+ TQString mPassword;
+ TQString mDn;
+ TQString mHost;
+ TQString mFilter;
int mPort;
bool mAnonymous;
- QMap<QString, QString> mAttributes;
+ TQMap<TQString, TQString> mAttributes;
KURL mLDAPUrl;
int mGetCounter; //KDE 4: remove
bool mErrorOccured; //KDE 4: remove
- QString mErrorMsg;
- QMap<KIO::Job*, QByteArray> mJobMap; //KDE 4: remove
+ TQString mErrorMsg;
+ TQMap<KIO::Job*, TQByteArray> mJobMap; //KDE 4: remove
KIO::Job *loadFromCache();
void createCache();
void activateCache();
void enter_loop();
- QCString addEntry( const QString &attr, const QString &value, bool mod );
- QString findUid( const QString &uid );
- bool AddresseeToLDIF( QByteArray &ldif, const Addressee &addr,
- const QString &olddn );
+ TQCString addEntry( const TQString &attr, const TQString &value, bool mod );
+ TQString findUid( const TQString &uid );
+ bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr,
+ const TQString &olddn );
class ResourceLDAPKIOPrivate;
ResourceLDAPKIOPrivate *d;
diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
index ae54ab8c3..271328525 100644
--- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
@@ -17,17 +17,17 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqapplication.h>
+
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
#include <kaccelmanager.h>
#include <kcombobox.h>
@@ -45,21 +45,21 @@
using namespace KABC;
-ResourceLDAPKIOConfig::ResourceLDAPKIOConfig( QWidget* parent, const char* name )
+ResourceLDAPKIOConfig::ResourceLDAPKIOConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQBoxLayout *mainLayout = new TQVBoxLayout( this );
mainLayout->setAutoAdd( true );
cfg = new LdapConfigWidget( LdapConfigWidget::W_ALL, this );
- mSubTree = new QCheckBox( i18n( "Sub-tree query" ), this );
- QHBox *box = new QHBox( this );
+ mSubTree = new TQCheckBox( i18n( "Sub-tree query" ), this );
+ TQHBox *box = new TQHBox( this );
box->setSpacing( KDialog::spacingHint() );
- mEditButton = new QPushButton( i18n( "Edit Attributes..." ), box );
- mCacheButton = new QPushButton( i18n( "Offline Use..." ), box );
+ mEditButton = new TQPushButton( i18n( "Edit Attributes..." ), box );
+ mCacheButton = new TQPushButton( i18n( "Offline Use..." ), box );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editAttributes() ) );
- connect( mCacheButton, SIGNAL( clicked() ), SLOT( editCache() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editAttributes() ) );
+ connect( mCacheButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCache() ) );
}
void ResourceLDAPKIOConfig::loadSettings( KRES::Resource *res )
@@ -143,13 +143,13 @@ void ResourceLDAPKIOConfig::editAttributes()
void ResourceLDAPKIOConfig::editCache()
{
LDAPUrl src;
- QStringList attr;
+ TQStringList attr;
src = cfg->url();
src.setScope( mSubTree->isChecked() ? LDAPUrl::Sub : LDAPUrl::One );
if (!mAttributes.empty()) {
- QMap<QString,QString>::Iterator it;
- QStringList attr;
+ TQMap<TQString,TQString>::Iterator it;
+ TQStringList attr;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
if ( !it.data().isEmpty() && it.key() != "objectClass" )
attr.append( it.data() );
@@ -165,34 +165,34 @@ void ResourceLDAPKIOConfig::editCache()
}
-AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
+AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes,
int rdnprefix,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Attributes Configuration" ), Ok | Cancel,
Ok, parent, name, true, true )
{
mNameDict.setAutoDelete( true );
- mNameDict.insert( "objectClass", new QString( i18n( "Object classes" ) ) );
- mNameDict.insert( "commonName", new QString( i18n( "Common name" ) ) );
- mNameDict.insert( "formattedName", new QString( i18n( "Formatted name" ) ) );
- mNameDict.insert( "familyName", new QString( i18n( "Family name" ) ) );
- mNameDict.insert( "givenName", new QString( i18n( "Given name" ) ) );
- mNameDict.insert( "organization", new QString( i18n( "Organization" ) ) );
- mNameDict.insert( "title", new QString( i18n( "Title" ) ) );
- mNameDict.insert( "street", new QString( i18n( "Street" ) ) );
- mNameDict.insert( "state", new QString( i18n( "State" ) ) );
- mNameDict.insert( "city", new QString( i18n( "City" ) ) );
- mNameDict.insert( "postalcode", new QString( i18n( "Postal code" ) ) );
- mNameDict.insert( "mail", new QString( i18n( "Email" ) ) );
- mNameDict.insert( "mailAlias", new QString( i18n( "Email alias" ) ) );
- mNameDict.insert( "phoneNumber", new QString( i18n( "Telephone number" ) ) );
- mNameDict.insert( "telephoneNumber", new QString( i18n( "Work telephone number" ) ) );
- mNameDict.insert( "facsimileTelephoneNumber", new QString( i18n( "Fax number" ) ) );
- mNameDict.insert( "mobile", new QString( i18n( "Cell phone number" ) ) );
- mNameDict.insert( "pager", new QString( i18n( "Pager" ) ) );
- mNameDict.insert( "description", new QString( i18n( "Note" ) ) );
- mNameDict.insert( "uid", new QString( i18n( "UID" ) ) );
- mNameDict.insert( "jpegPhoto", new QString( i18n( "Photo" ) ) );
+ mNameDict.insert( "objectClass", new TQString( i18n( "Object classes" ) ) );
+ mNameDict.insert( "commonName", new TQString( i18n( "Common name" ) ) );
+ mNameDict.insert( "formattedName", new TQString( i18n( "Formatted name" ) ) );
+ mNameDict.insert( "familyName", new TQString( i18n( "Family name" ) ) );
+ mNameDict.insert( "givenName", new TQString( i18n( "Given name" ) ) );
+ mNameDict.insert( "organization", new TQString( i18n( "Organization" ) ) );
+ mNameDict.insert( "title", new TQString( i18n( "Title" ) ) );
+ mNameDict.insert( "street", new TQString( i18n( "Street" ) ) );
+ mNameDict.insert( "state", new TQString( i18n( "State" ) ) );
+ mNameDict.insert( "city", new TQString( i18n( "City" ) ) );
+ mNameDict.insert( "postalcode", new TQString( i18n( "Postal code" ) ) );
+ mNameDict.insert( "mail", new TQString( i18n( "Email" ) ) );
+ mNameDict.insert( "mailAlias", new TQString( i18n( "Email alias" ) ) );
+ mNameDict.insert( "phoneNumber", new TQString( i18n( "Telephone number" ) ) );
+ mNameDict.insert( "telephoneNumber", new TQString( i18n( "Work telephone number" ) ) );
+ mNameDict.insert( "facsimileTelephoneNumber", new TQString( i18n( "Fax number" ) ) );
+ mNameDict.insert( "mobile", new TQString( i18n( "Cell phone number" ) ) );
+ mNameDict.insert( "pager", new TQString( i18n( "Pager" ) ) );
+ mNameDict.insert( "description", new TQString( i18n( "Note" ) ) );
+ mNameDict.insert( "uid", new TQString( i18n( "UID" ) ) );
+ mNameDict.insert( "jpegPhoto", new TQString( i18n( "Photo" ) ) );
// default map
mDefaultMap.insert( "objectClass", "inetOrgPerson" );
@@ -218,7 +218,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mDefaultMap.insert( "jpegPhoto", "jpegPhoto" );
// overwrite the default values here
- QMap<QString, QString> kolabMap, netscapeMap, evolutionMap, outlookMap;
+ TQMap<TQString, TQString> kolabMap, netscapeMap, evolutionMap, outlookMap;
// kolab
kolabMap.insert( "formattedName", "display-name" );
@@ -233,11 +233,11 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mMapList.append( evolutionMap );
mMapList.append( outlookMap );
- QFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 4, ( attributes.count() + 4 ) >> 1,
+ TQFrame *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1,
0, spacingHint() );
- QLabel *label = new QLabel( i18n( "Template:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Template:" ), page );
layout->addWidget( label, 0, 0 );
mMapCombo = new KComboBox( page );
layout->addWidget( mMapCombo, 0, 1 );
@@ -247,9 +247,9 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mMapCombo->insertItem( i18n( "Netscape" ) );
mMapCombo->insertItem( i18n( "Evolution" ) );
mMapCombo->insertItem( i18n( "Outlook" ) );
- connect( mMapCombo, SIGNAL( activated( int ) ), SLOT( mapChanged( int ) ) );
+ connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) );
- label = new QLabel( i18n( "RDN prefix attribute:" ), page );
+ label = new TQLabel( i18n( "RDN prefix attribute:" ), page );
layout->addWidget( label, 1, 0 );
mRDNCombo = new KComboBox( page );
layout->addWidget( mRDNCombo, 1, 1 );
@@ -257,7 +257,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
mRDNCombo->insertItem( i18n( "UID" ) );
mRDNCombo->setCurrentItem( rdnprefix );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
int i, j = 0;
for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) {
if ( mNameDict[ it.key() ] == 0 ) {
@@ -269,7 +269,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
j = 2;
}
kdDebug(7125) << "itkey: " << it.key() << " i: " << i << endl;
- label = new QLabel( *mNameDict[ it.key() ] + ":", page );
+ label = new TQLabel( *mNameDict[ it.key() ] + ":", page );
KLineEdit *lineedit = new KLineEdit( page );
mLineEditDict.insert( it.key(), lineedit );
lineedit->setText( it.data() );
@@ -279,7 +279,7 @@ AttributesDialog::AttributesDialog( const QMap<QString, QString> &attributes,
}
for ( i = 1; i < mMapCombo->count(); i++ ) {
- QDictIterator<KLineEdit> it2( mLineEditDict );
+ TQDictIterator<KLineEdit> it2( mLineEditDict );
for ( ; it2.current(); ++it2 ) {
if ( mMapList[ i ].contains( it2.currentKey() ) ) {
if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break;
@@ -300,11 +300,11 @@ AttributesDialog::~AttributesDialog()
{
}
-QMap<QString, QString> AttributesDialog::attributes() const
+TQMap<TQString, TQString> AttributesDialog::attributes() const
{
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
- QDictIterator<KLineEdit> it( mLineEditDict );
+ TQDictIterator<KLineEdit> it( mLineEditDict );
for ( ; it.current(); ++it )
map.insert( it.currentKey(), it.current()->text() );
@@ -320,7 +320,7 @@ void AttributesDialog::mapChanged( int pos )
{
// apply first the default and than the spezific changes
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = mDefaultMap.begin(); it != mDefaultMap.end(); ++it )
mLineEditDict[ it.key() ]->setText( it.data() );
@@ -333,33 +333,33 @@ void AttributesDialog::mapChanged( int pos )
}
OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src,
- const QString &dst, QWidget *parent, const char *name )
+ const TQString &dst, TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Offline Configuration" ), Ok | Cancel,
Ok, parent, name, true, true )
{
- QFrame *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
layout->setAutoAdd( true );
mSrc = src; mDst = dst;
- mCacheGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Offline Cache Policy"), page );
- QRadioButton *bt;
- new QRadioButton( i18n("Do not use offline cache"), mCacheGroup );
- bt = new QRadioButton( i18n("Use local copy if no connection"), mCacheGroup );
- new QRadioButton( i18n("Always use local copy"), mCacheGroup );
+ TQRadioButton *bt;
+ new TQRadioButton( i18n("Do not use offline cache"), mCacheGroup );
+ bt = new TQRadioButton( i18n("Use local copy if no connection"), mCacheGroup );
+ new TQRadioButton( i18n("Always use local copy"), mCacheGroup );
mCacheGroup->setButton( cachePolicy );
- mAutoCache = new QCheckBox( i18n("Refresh offline cache automatically"),
+ mAutoCache = new TQCheckBox( i18n("Refresh offline cache automatically"),
page );
mAutoCache->setChecked( autoCache );
mAutoCache->setEnabled( bt->isChecked() );
- connect( bt, SIGNAL(toggled(bool)), mAutoCache, SLOT(setEnabled(bool)) );
+ connect( bt, TQT_SIGNAL(toggled(bool)), mAutoCache, TQT_SLOT(setEnabled(bool)) );
- QPushButton *lcache = new QPushButton( i18n("Load into Cache"), page );
- connect( lcache, SIGNAL( clicked() ), SLOT( loadCache() ) );
+ TQPushButton *lcache = new TQPushButton( i18n("Load into Cache"), page );
+ connect( lcache, TQT_SIGNAL( clicked() ), TQT_SLOT( loadCache() ) );
}
OfflineDialog::~OfflineDialog()
diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.h b/kabc/plugins/ldapkio/resourceldapkioconfig.h
index c261cbd06..8bc6d081a 100644
--- a/kabc/plugins/ldapkio/resourceldapkioconfig.h
+++ b/kabc/plugins/ldapkio/resourceldapkioconfig.h
@@ -21,10 +21,10 @@
#ifndef RESOURCELDAPCONFIG_H
#define RESOURCELDAPCONFIG_H
-#include <qmap.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <kresources/configwidget.h>
@@ -47,7 +47,7 @@ class KABC_EXPORT ResourceLDAPKIOConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceLDAPKIOConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceLDAPKIOConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -57,13 +57,13 @@ class KABC_EXPORT ResourceLDAPKIOConfig : public KRES::ConfigWidget
void editAttributes();
void editCache();
private:
- QPushButton *mEditButton, *mCacheButton;
+ TQPushButton *mEditButton, *mCacheButton;
LdapConfigWidget *cfg;
- QCheckBox *mSubTree;
- QMap<QString, QString> mAttributes;
+ TQCheckBox *mSubTree;
+ TQMap<TQString, TQString> mAttributes;
int mRDNPrefix, mCachePolicy;
bool mAutoCache;
- QString mCacheDst;
+ TQString mCacheDst;
};
class AttributesDialog : public KDialogBase
@@ -71,11 +71,11 @@ class AttributesDialog : public KDialogBase
Q_OBJECT
public:
- AttributesDialog( const QMap<QString, QString> &attributes, int rdnprefix,
- QWidget *parent, const char *name = 0 );
+ AttributesDialog( const TQMap<TQString, TQString> &attributes, int rdnprefix,
+ TQWidget *parent, const char *name = 0 );
~AttributesDialog();
- QMap<QString, QString> attributes() const;
+ TQMap<TQString, TQString> attributes() const;
int rdnprefix() const;
private slots:
@@ -85,10 +85,10 @@ class AttributesDialog : public KDialogBase
enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap };
KComboBox *mMapCombo, *mRDNCombo;
- QValueList< QMap<QString, QString> > mMapList;
- QMap<QString, QString> mDefaultMap;
- QDict<KLineEdit> mLineEditDict;
- QDict<QString> mNameDict;
+ TQValueList< TQMap<TQString, TQString> > mMapList;
+ TQMap<TQString, TQString> mDefaultMap;
+ TQDict<KLineEdit> mLineEditDict;
+ TQDict<TQString> mNameDict;
};
class OfflineDialog : public KDialogBase
@@ -97,7 +97,7 @@ class OfflineDialog : public KDialogBase
public:
OfflineDialog( bool autoCache, int cachePolicy, const KURL &src,
- const QString &dst, QWidget *parent, const char *name = 0 );
+ const TQString &dst, TQWidget *parent, const char *name = 0 );
~OfflineDialog();
int cachePolicy() const;
@@ -108,9 +108,9 @@ class OfflineDialog : public KDialogBase
private:
KURL mSrc;
- QString mDst;
- QButtonGroup *mCacheGroup;
- QCheckBox *mAutoCache;
+ TQString mDst;
+ TQButtonGroup *mCacheGroup;
+ TQCheckBox *mAutoCache;
};
}
diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp
index 49d66d9e0..914885877 100644
--- a/kabc/plugins/net/resourcenet.cpp
+++ b/kabc/plugins/net/resourcenet.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kio/netaccess.h>
@@ -46,7 +46,7 @@ class ResourceNet::ResourceNetPrivate
KIO::Job *mSaveJob;
bool mIsSaving;
- QString mLastErrorString;
+ TQString mLastErrorString;
};
ResourceNet::ResourceNet( const KConfig *config )
@@ -57,11 +57,11 @@ ResourceNet::ResourceNet( const KConfig *config )
if ( config ) {
init( KURL( config->readPathEntry( "NetUrl" ) ), config->readEntry( "NetFormat" ) );
} else {
- init( KURL(), QString("vcard").latin1() );
+ init( KURL(), TQString("vcard").latin1() );
}
}
-ResourceNet::ResourceNet( const KURL &url, const QString &format )
+ResourceNet::ResourceNet( const KURL &url, const TQString &format )
: Resource( 0 ), mFormat( 0 ),
mTempFile( 0 ),
d( new ResourceNetPrivate )
@@ -69,7 +69,7 @@ ResourceNet::ResourceNet( const KURL &url, const QString &format )
init( url, format );
}
-void ResourceNet::init( const KURL &url, const QString &format )
+void ResourceNet::init( const KURL &url, const TQString &format )
{
d->mLoadJob = 0;
d->mIsLoading = false;
@@ -81,7 +81,7 @@ void ResourceNet::init( const KURL &url, const QString &format )
FormatFactory *factory = FormatFactory::self();
mFormat = factory->format( mFormatName );
if ( !mFormat ) {
- mFormatName = QString("vcard").latin1();
+ mFormatName = TQString("vcard").latin1();
mFormat = factory->format( mFormatName );
}
@@ -135,14 +135,14 @@ void ResourceNet::doClose()
bool ResourceNet::load()
{
- QString tempFile;
+ TQString tempFile;
if ( !KIO::NetAccess::download( mUrl, tempFile, 0 ) ) {
addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) );
return false;
}
- QFile file( tempFile );
+ TQFile file( tempFile );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) );
KIO::NetAccess::removeTempFile( tempFile );
@@ -158,7 +158,7 @@ bool ResourceNet::load()
return result;
}
-bool ResourceNet::clearAndLoad( QFile *file )
+bool ResourceNet::clearAndLoad( TQFile *file )
{
clear();
return mFormat->loadAll( addressBook(), this, file );
@@ -192,8 +192,8 @@ bool ResourceNet::asyncLoad()
KIO::Scheduler::checkSlaveOnHold( true );
d->mLoadJob = KIO::file_copy( mUrl, dest, -1, true, false, false );
d->mIsLoading = true;
- connect( d->mLoadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( downloadFinished( KIO::Job* ) ) );
+ connect( d->mLoadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( downloadFinished( KIO::Job* ) ) );
return true;
}
@@ -286,8 +286,8 @@ bool ResourceNet::asyncSave( Ticket* )
KIO::Scheduler::checkSlaveOnHold( true );
d->mIsSaving = true;
d->mSaveJob = KIO::file_copy( src, mUrl, -1, true, false, false );
- connect( d->mSaveJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( uploadFinished( KIO::Job* ) ) );
+ connect( d->mSaveJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( uploadFinished( KIO::Job* ) ) );
return true;
}
@@ -314,7 +314,7 @@ void ResourceNet::deleteLocalTempFile()
mTempFile = 0;
}
-void ResourceNet::saveToFile( QFile *file )
+void ResourceNet::saveToFile( TQFile *file )
{
mFormat->saveAll( addressBook(), this, file );
}
@@ -329,7 +329,7 @@ KURL ResourceNet::url() const
return mUrl;
}
-void ResourceNet::setFormat( const QString &name )
+void ResourceNet::setFormat( const TQString &name )
{
mFormatName = name;
if ( mFormat )
@@ -339,7 +339,7 @@ void ResourceNet::setFormat( const QString &name )
mFormat = factory->format( mFormatName );
}
-QString ResourceNet::format() const
+TQString ResourceNet::format() const
{
return mFormatName;
}
@@ -352,11 +352,11 @@ void ResourceNet::downloadFinished( KIO::Job* )
if ( !hasTempFile() || mTempFile->status() != 0 ) {
d->mLastErrorString = i18n( "Download failed: Unable to create temporary file" );
- QTimer::singleShot( 0, this, SLOT( signalError() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( signalError() ) );
return;
}
- QFile file( mTempFile->name() );
+ TQFile file( mTempFile->name() );
if ( file.open( IO_ReadOnly ) ) {
if ( clearAndLoad( &file ) )
emit loadingFinished( this );
diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h
index b315be6df..ccb59694d 100644
--- a/kabc/plugins/net/resourcenet.h
+++ b/kabc/plugins/net/resourcenet.h
@@ -48,7 +48,7 @@ class KABC_EXPORT ResourceNet : public Resource
public:
ResourceNet( const KConfig* );
- ResourceNet( const KURL &url, const QString &format );
+ ResourceNet( const KURL &url, const TQString &format );
~ResourceNet();
virtual void writeConfig( KConfig* );
@@ -77,15 +77,15 @@ class KABC_EXPORT ResourceNet : public Resource
/**
Sets a new format by name.
*/
- void setFormat( const QString &name );
+ void setFormat( const TQString &name );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
protected:
- void init( const KURL &url, const QString &format );
+ void init( const KURL &url, const TQString &format );
private slots:
void downloadFinished( KIO::Job* );
@@ -93,8 +93,8 @@ class KABC_EXPORT ResourceNet : public Resource
void signalError();
private:
- bool clearAndLoad( QFile *file );
- void saveToFile( QFile *file );
+ bool clearAndLoad( TQFile *file );
+ void saveToFile( TQFile *file );
bool hasTempFile() const { return mTempFile != 0; }
void abortAsyncLoading();
void abortAsyncSaving();
@@ -103,7 +103,7 @@ class KABC_EXPORT ResourceNet : public Resource
void deleteStaleTempFile();
FormatPlugin *mFormat;
- QString mFormatName;
+ TQString mFormatName;
KURL mUrl;
KTempFile *mTempFile;
diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp
index ef5bfdcb9..b441fbd98 100644
--- a/kabc/plugins/net/resourcenetconfig.cpp
+++ b/kabc/plugins/net/resourcenetconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -33,19 +33,19 @@
using namespace KABC;
-ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name )
+ResourceNetConfig::ResourceNetConfig( TQWidget* parent, const char* name )
: ConfigWidget( parent, name ), mInEditMode( false )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mUrlEdit = new KURLRequester( this );
mUrlEdit->setMode( KFile::File );
@@ -53,8 +53,8 @@ ResourceNetConfig::ResourceNetConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mUrlEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
diff --git a/kabc/plugins/net/resourcenetconfig.h b/kabc/plugins/net/resourcenetconfig.h
index e35c46c01..e07937739 100644
--- a/kabc/plugins/net/resourcenetconfig.h
+++ b/kabc/plugins/net/resourcenetconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceNetConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -45,7 +45,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget
KComboBox* mFormatBox;
KURLRequester* mUrlEdit;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
bool mInEditMode;
};
diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp
index 2e6eb6902..55f02bae7 100644
--- a/kabc/plugins/sql/resourcesql.cpp
+++ b/kabc/plugins/sql/resourcesql.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qsqldatabase.h>
-#include <qsqlcursor.h>
+#include <tqsqldatabase.h>
+#include <tqsqlcursor.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -42,7 +42,7 @@ extern "C"
ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config )
: Resource( ab ), mDb( 0 )
{
- QString user, password, db, host;
+ TQString user, password, db, host;
user = config->readEntry( "SqlUser" );
password = cryptStr( config->readEntry( "SqlPassword " ) );
@@ -52,15 +52,15 @@ ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config )
init( user, password, db, host );
}
-ResourceSql::ResourceSql( AddressBook *ab, const QString &user,
- const QString &password, const QString &db, const QString &host )
+ResourceSql::ResourceSql( AddressBook *ab, const TQString &user,
+ const TQString &password, const TQString &db, const TQString &host )
: Resource( ab ), mDb( 0 )
{
init( user, password, db, host );
}
-void ResourceSql::init( const QString &user, const QString &password,
- const QString &db, const QString &host )
+void ResourceSql::init( const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host )
{
mUser = user;
mPassword = password;
@@ -80,12 +80,12 @@ Ticket *ResourceSql::requestSaveTicket()
bool ResourceSql::open()
{
- QStringList drivers = QSqlDatabase::drivers();
- for ( QStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) {
+ TQStringList drivers = TQSqlDatabase::drivers();
+ for ( TQStringList::Iterator it = drivers.begin(); it != drivers.end(); ++it ) {
kdDebug(5700) << "Driver: " << (*it) << endl;
}
- mDb = QSqlDatabase::addDatabase( "QMYSQL3" );
+ mDb = TQSqlDatabase::addDatabase( "QMYSQL3" );
if ( !mDb ) {
kdDebug(5700) << "Error. Unable to connect to database." << endl;
@@ -112,14 +112,14 @@ void ResourceSql::close()
bool ResourceSql::load()
{
- QSqlQuery query( "select addressId, name, familyName, givenName, "
+ TQSqlQuery query( "select addressId, name, familyName, givenName, "
"additionalName, prefix, suffix, nickname, birthday, "
"mailer, timezone, geo_latitude, geo_longitude, title, "
"role, organization, note, productId, revision, "
"sortString, url from kaddressbook_main_" + mUser );
while ( query.next() ) {
- QString addrId = query.value(0).toString();
+ TQString addrId = query.value(0).toString();
Addressee addr;
addr.setResource( this );
@@ -146,7 +146,7 @@ bool ResourceSql::load()
// emails
{
- QSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails "
+ TQSqlQuery emailsQuery( "select email, preferred from kaddressbook_emails "
"where addressId = '" + addrId + "'" );
while ( emailsQuery.next() )
addr.insertEmail( emailsQuery.value( 0 ).toString(),
@@ -155,7 +155,7 @@ bool ResourceSql::load()
// phones
{
- QSqlQuery phonesQuery( "select number, type from kaddressbook_phones "
+ TQSqlQuery phonesQuery( "select number, type from kaddressbook_phones "
"where addressId = '" + addrId + "'" );
while ( phonesQuery.next() )
addr.insertPhoneNumber( PhoneNumber( phonesQuery.value( 0 ).toString(),
@@ -164,7 +164,7 @@ bool ResourceSql::load()
// addresses
{
- QSqlQuery addressesQuery( "select postOfficeBox, extended, street, "
+ TQSqlQuery addressesQuery( "select postOfficeBox, extended, street, "
"locality, region, postalCode, country, label, type "
"from kaddressbook_addresses where addressId = '" + addrId + "'" );
while ( addressesQuery.next() ) {
@@ -185,7 +185,7 @@ bool ResourceSql::load()
// categories
{
- QSqlQuery categoriesQuery( "select category from kaddressbook_categories "
+ TQSqlQuery categoriesQuery( "select category from kaddressbook_categories "
"where addressId = '" + addrId + "'" );
while ( categoriesQuery.next() )
addr.insertCategory( categoriesQuery.value( 0 ).toString() );
@@ -193,7 +193,7 @@ bool ResourceSql::load()
// customs
{
- QSqlQuery customsQuery( "select app, name, value from kaddressbook_customs "
+ TQSqlQuery customsQuery( "select app, name, value from kaddressbook_customs "
"where addressId = '" + addrId + "'" );
while ( customsQuery.next() )
addr.insertCustom( customsQuery.value( 0 ).toString(),
@@ -210,11 +210,11 @@ bool ResourceSql::load()
bool ResourceSql::save( Ticket * )
{
// we have to delete all entries for this user and reinsert them
- QSqlQuery query( "select addressId from kaddressbook_main_" + mUser );
+ TQSqlQuery query( "select addressId from kaddressbook_main_" + mUser );
while ( query.next() ) {
- QString addrId = query.value( 0 ).toString();
- QSqlQuery q;
+ TQString addrId = query.value( 0 ).toString();
+ TQSqlQuery q;
q.exec( "DELETE FROM kaddressbook_emails WHERE addressId = '" + addrId + "'" );
q.exec( "DELETE FROM kaddressbook_phones WHERE addressId = '" + addrId + "'" );
@@ -231,7 +231,7 @@ bool ResourceSql::save( Ticket * )
if ( (*it).resource() != this && (*it).resource() != 0 ) // save only my and new entries
continue;
- QString uid = (*it).uid();
+ TQString uid = (*it).uid();
query.exec( "INSERT INTO kaddressbook_main_" + mUser + " VALUES ('" +
(*it).uid() + "','" +
@@ -244,9 +244,9 @@ bool ResourceSql::save( Ticket * )
(*it).nickName() + "','" +
(*it).birthday().toString( Qt::ISODate ) + "','" +
(*it).mailer() + "','" +
- QString::number( (*it).timeZone().offset() ) + "','" +
- QString::number( (*it).geo().latitude() ) + "','" +
- QString::number( (*it).geo().longitude() ) + "','" +
+ TQString::number( (*it).timeZone().offset() ) + "','" +
+ TQString::number( (*it).geo().latitude() ) + "','" +
+ TQString::number( (*it).geo().longitude() ) + "','" +
(*it).title() + "','" +
(*it).role() + "','" +
(*it).organization() + "','" +
@@ -259,14 +259,14 @@ bool ResourceSql::save( Ticket * )
// emails
{
- QStringList emails = (*it).emails();
- QStringList::ConstIterator it;
+ TQStringList emails = (*it).emails();
+ TQStringList::ConstIterator it;
bool preferred = true;
for( it = emails.begin(); it != emails.end(); ++it ) {
query.exec("INSERT INTO kaddressbook_emails VALUES ('" +
uid + "','" +
(*it) + "','" +
- QString::number(preferred) + "')");
+ TQString::number(preferred) + "')");
preferred = false;
}
}
@@ -279,7 +279,7 @@ bool ResourceSql::save( Ticket * )
query.exec("INSERT INTO kaddressbook_phones VALUES ('" +
uid + "','" +
(*it).number() + "','" +
- QString::number( (*it).type() ) + "')");
+ TQString::number( (*it).type() ) + "')");
}
}
@@ -298,14 +298,14 @@ bool ResourceSql::save( Ticket * )
(*it).postalCode() + "','" +
(*it).country() + "','" +
(*it).label() + "','" +
- QString::number( (*it).type() ) + "')");
+ TQString::number( (*it).type() ) + "')");
}
}
// categories
{
- QStringList categories = (*it).categories();
- QStringList::ConstIterator it;
+ TQStringList categories = (*it).categories();
+ TQStringList::ConstIterator it;
for( it = categories.begin(); it != categories.end(); ++it )
query.exec("INSERT INTO kaddressbook_categories VALUES ('" +
uid + "','" +
@@ -314,14 +314,14 @@ bool ResourceSql::save( Ticket * )
// customs
{
- QStringList list = (*it).customs();
- QStringList::ConstIterator it;
+ TQStringList list = (*it).customs();
+ TQStringList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
int dashPos = (*it).find( '-' );
int colonPos = (*it).find( ':' );
- QString app = (*it).left( dashPos );
- QString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 );
- QString value = (*it).right( (*it).length() - colonPos - 1 );
+ TQString app = (*it).left( dashPos );
+ TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 );
+ TQString value = (*it).right( (*it).length() - colonPos - 1 );
query.exec("INSERT INTO kaddressbook_categories VALUES ('" +
uid + "','" + app + "','" + name + "','" + value + "')");
@@ -332,7 +332,7 @@ bool ResourceSql::save( Ticket * )
return true;
}
-QString ResourceSql::identifier() const
+TQString ResourceSql::identifier() const
{
return mHost + "_" + mDbName;
}
diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h
index c0b61b69b..a5fc60b55 100644
--- a/kabc/plugins/sql/resourcesql.h
+++ b/kabc/plugins/sql/resourcesql.h
@@ -33,8 +33,8 @@ namespace KABC {
class ResourceSql : public Resource
{
public:
- ResourceSql( AddressBook *ab, const QString &user, const QString &password,
- const QString &db, const QString &host );
+ ResourceSql( AddressBook *ab, const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host );
ResourceSql( AddressBook *ab, const KConfig * );
bool open();
@@ -45,18 +45,18 @@ public:
bool load();
bool save( Ticket * ticket );
- QString identifier() const;
+ TQString identifier() const;
private:
- void init(const QString &user, const QString &password,
- const QString &db, const QString &host );
+ void init(const TQString &user, const TQString &password,
+ const TQString &db, const TQString &host );
- QString mUser;
- QString mPassword;
- QString mDbName;
- QString mHost;
+ TQString mUser;
+ TQString mPassword;
+ TQString mDbName;
+ TQString mHost;
- QSqlDatabase *mDb;
+ TQSqlDatabase *mDb;
};
}
diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp
index d9abffa30..ef1651cde 100644
--- a/kabc/plugins/sql/resourcesqlconfig.cpp
+++ b/kabc/plugins/sql/resourcesqlconfig.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqvbox.h>
#include <klineedit.h>
#include <klocale.h>
@@ -31,43 +31,43 @@
using namespace KABC;
-ResourceSqlConfig::ResourceSqlConfig( QWidget* parent, const char* name )
+ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name )
: ResourceConfigWidget( parent, name )
{
resize( 290, 170 );
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 );
- QLabel *label = new QLabel( i18n( "Username:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Username:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mUser, 0, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
mPassword->setEchoMode( KLineEdit::Password );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mPassword, 1, 1 );
- label = new QLabel( i18n( "Host:" ), this );
+ label = new TQLabel( i18n( "Host:" ), this );
mHost = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mHost, 2, 1 );
- label = new QLabel( i18n( "Port:" ), this );
- QVBox *box = new QVBox(this);
- mPort = new QSpinBox(0, 65535, 1, box );
- mPort->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred));
+ label = new TQLabel( i18n( "Port:" ), this );
+ TQVBox *box = new TQVBox(this);
+ mPort = new TQSpinBox(0, 65535, 1, box );
+ mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred));
mPort->setValue(389);
- new QWidget(box, "dummy");
+ new TQWidget(box, "dummy");
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( box, 3, 1 );
- label = new QLabel( i18n( "Database:" ), this );
+ label = new TQLabel( i18n( "Database:" ), this );
mDbName = new KLineEdit( this );
mainLayout->addWidget( label, 4, 0 );
diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h
index d7230870e..cb96563b7 100644
--- a/kabc/plugins/sql/resourcesqlconfig.h
+++ b/kabc/plugins/sql/resourcesqlconfig.h
@@ -33,7 +33,7 @@ class ResourceSqlConfig : public ResourceConfigWidget
Q_OBJECT
public:
- ResourceSqlConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KConfig *config );
@@ -44,7 +44,7 @@ private:
KLineEdit* mPassword;
KLineEdit* mDbName;
KLineEdit* mHost;
- QSpinBox* mPort;
+ TQSpinBox* mPort;
};
}
diff --git a/kabc/resource.cpp b/kabc/resource.cpp
index fb677d9d3..d43c68320 100644
--- a/kabc/resource.cpp
+++ b/kabc/resource.cpp
@@ -266,7 +266,7 @@ void Resource::removeAddressee( const Addressee &addr )
mAddrMap.erase( addr.uid() );
}
-Addressee Resource::findByUid( const QString &uid )
+Addressee Resource::findByUid( const TQString &uid )
{
Addressee::Map::ConstIterator it = mAddrMap.find( uid );
@@ -276,7 +276,7 @@ Addressee Resource::findByUid( const QString &uid )
return Addressee();
}
-Addressee::List Resource::findByName( const QString &name )
+Addressee::List Resource::findByName( const TQString &name )
{
Addressee::List results;
@@ -289,15 +289,15 @@ Addressee::List Resource::findByName( const QString &name )
return results;
}
-Addressee::List Resource::findByEmail( const QString &email )
+Addressee::List Resource::findByEmail( const TQString &email )
{
Addressee::List results;
- const QString lowerEmail = email.lower();
+ const TQString lowerEmail = email.lower();
ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
- const QStringList mailList = (*it).emails();
- for ( QStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) {
+ const TQStringList mailList = (*it).emails();
+ for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) {
if ( lowerEmail == (*ite).lower() )
results.append( *it );
}
@@ -306,7 +306,7 @@ Addressee::List Resource::findByEmail( const QString &email )
return results;
}
-Addressee::List Resource::findByCategory( const QString &category )
+Addressee::List Resource::findByCategory( const TQString &category )
{
Addressee::List results;
diff --git a/kabc/resource.h b/kabc/resource.h
index 556c3beae..0412a22b1 100644
--- a/kabc/resource.h
+++ b/kabc/resource.h
@@ -62,7 +62,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@short Resource Iterator
This class provides an iterator for resource entries.
- By default it points to a QValueList<Addressee>::Iterator,
+ By default it points to a TQValueList<Addressee>::Iterator,
but you can reimplement this class to fit your own needs.
*/
class KABC_EXPORT Iterator
@@ -230,7 +230,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@return The addressee with the specified unique identifier or an
empty addressee.
*/
- virtual Addressee findByUid( const QString &uid );
+ virtual Addressee findByUid( const TQString &uid );
/**
Searches all addressees which match the specified name.
@@ -238,7 +238,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@param name The name you are looking for.
@return A list of all matching addressees.
*/
- virtual Addressee::List findByName( const QString &name );
+ virtual Addressee::List findByName( const TQString &name );
/**
Searches all addressees which match the specified email address.
@@ -246,7 +246,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@param email The email address you are looking for.
@return A list of all matching addressees.
*/
- virtual Addressee::List findByEmail( const QString &email );
+ virtual Addressee::List findByEmail( const TQString &email );
/**
Searches all addressees which belongs to the specified category.
@@ -254,7 +254,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@param category The category you are looking for.
@return A list of all matching addressees.
*/
- virtual Addressee::List findByCategory( const QString &category );
+ virtual Addressee::List findByCategory( const TQString &category );
/**
Removes all addressees from the resource.
@@ -284,7 +284,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@param resource The pointer to the resource which emitted this signal.
@param msg A translated error message.
*/
- void loadingError( Resource *resource, const QString &msg );
+ void loadingError( Resource *resource, const TQString &msg );
/**
This signal is emitted when the resource has finished the saving of all
@@ -301,7 +301,7 @@ class KABC_EXPORT Resource : public KRES::Resource
@param resource The pointer to the resource which emitted this signal.
@param msg A translated error message.
*/
- void savingError( Resource *resource, const QString &msg );
+ void savingError( Resource *resource, const TQString &msg );
protected:
Ticket *createTicket( Resource * );
diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp
index f34dcaa63..a52754be3 100644
--- a/kabc/resourceselectdialog.cpp
+++ b/kabc/resourceselectdialog.cpp
@@ -23,8 +23,8 @@
#include <klistbox.h>
#include <kstdguiitem.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include "resource.h"
#include "addressbook.h"
@@ -33,16 +33,16 @@
using namespace KABC;
-ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, QWidget *parent, const char *name )
+ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, const char *name )
: KDialog( parent, name, true )
{
setCaption( i18n( "Resource Selection" ) );
resize( 300, 200 );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
mainLayout->setMargin( marginHint() );
- QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this );
+ TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this );
groupBox->setTitle( i18n( "Resources" ) );
mResourceId = new KListBox( groupBox );
@@ -54,15 +54,15 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, QWidget *parent, co
KButtonBox *buttonBox = new KButtonBox( this );
buttonBox->addStretch();
- buttonBox->addButton( KStdGuiItem::ok(), this, SLOT( accept() ) );
- buttonBox->addButton( KStdGuiItem::cancel(), this, SLOT( reject() ) );
+ buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) );
+ buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) );
buttonBox->layout();
mainLayout->addWidget( buttonBox );
// setup listbox
uint counter = 0;
- QPtrList<Resource> list = ab->resources();
+ TQPtrList<Resource> list = ab->resources();
for ( uint i = 0; i < list.count(); ++i ) {
Resource *resource = list.at( i );
if ( resource && !resource->readOnly() ) {
@@ -83,9 +83,9 @@ Resource *ResourceSelectDialog::resource()
return 0;
}
-Resource *ResourceSelectDialog::getResource( AddressBook *ab, QWidget *parent )
+Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent )
{
- QPtrList<Resource> resources = ab->resources();
+ TQPtrList<Resource> resources = ab->resources();
if ( resources.count() == 1 ) return resources.first();
Resource *found = 0;
diff --git a/kabc/resourceselectdialog.h b/kabc/resourceselectdialog.h
index df7e4a4bc..6441dc247 100644
--- a/kabc/resourceselectdialog.h
+++ b/kabc/resourceselectdialog.h
@@ -21,7 +21,7 @@
#ifndef KABC_RESOURCESELECTDIALOG_H
#define KABC_RESOURCESELECTDIALOG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialog.h>
#include <kdemacros.h>
@@ -41,15 +41,15 @@ class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog
Q_OBJECT
public:
- ResourceSelectDialog( AddressBook *ab, QWidget *parent = 0,
+ ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0,
const char *name = 0);
Resource *resource();
- static Resource *getResource( AddressBook *ab, QWidget *parent = 0 );
+ static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 );
private:
KListBox *mResourceId;
- QMap<int, Resource*> mResourceMap;
+ TQMap<int, Resource*> mResourceMap;
};
}
diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp
index 1735da995..36c449f19 100644
--- a/kabc/scripts/addressee.src.cpp
+++ b/kabc/scripts/addressee.src.cpp
@@ -20,7 +20,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <ksharedptr.h>
#include <kdebug.h>
@@ -39,23 +39,23 @@ using namespace KABC;
static bool matchBinaryPattern( int value, int pattern );
template <class L>
-static bool listEquals( const QValueList<L>&, const QValueList<L>& );
-static bool emailsEquals( const QStringList&, const QStringList& );
+static bool listEquals( const TQValueList<L>&, const TQValueList<L>& );
+static bool emailsEquals( const TQStringList&, const TQStringList& );
KABC::SortMode *Addressee::mSortMode = 0;
struct Addressee::AddresseeData : public KShared
{
- QString uid;
- QString uri;
+ TQString uid;
+ TQString uri;
--VARIABLES--
PhoneNumber::List phoneNumbers;
Address::List addresses;
Key::List keys;
- QStringList emails;
- QStringList categories;
- QStringList custom;
+ TQStringList emails;
+ TQStringList categories;
+ TQStringList custom;
Resource *resource;
@@ -163,7 +163,7 @@ bool Addressee::isEmpty() const
return mData->empty;
}
-void Addressee::setUid( const QString &id )
+void Addressee::setUid( const TQString &id )
{
if ( id == mData->uid ) return;
detach();
@@ -171,17 +171,17 @@ void Addressee::setUid( const QString &id )
mData->uid = id;
}
-QString Addressee::uid() const
+TQString Addressee::uid() const
{
return mData->uid;
}
-QString Addressee::uidLabel()
+TQString Addressee::uidLabel()
{
return i18n("Unique Identifier");
}
-void Addressee::setUri( const QString &id )
+void Addressee::setUri( const TQString &id )
{
if ( id == mData->uri ) return;
detach();
@@ -189,21 +189,21 @@ void Addressee::setUri( const QString &id )
mData->uri = id;
}
-QString Addressee::uri() const
+TQString Addressee::uri() const
{
return mData->uri;
}
-QString Addressee::uriLabel()
+TQString Addressee::uriLabel()
{
return i18n("Unique Resource Identifier");
}
--DEFINITIONS--
-void Addressee::setNameFromString( const QString &s )
+void Addressee::setNameFromString( const TQString &s )
{
- QString str = s;
+ TQString str = s;
//remove enclosing quotes from string
if ( str.length() > 1 && s[ 0 ] == '"' && s[ s.length() - 1 ] == '"' )
str = s.mid( 1, s.length() - 2 );
@@ -212,26 +212,26 @@ void Addressee::setNameFromString( const QString &s )
setName( str );
// clear all name parts
- setPrefix( QString::null );
- setGivenName( QString::null );
- setAdditionalName( QString::null );
- setFamilyName( QString::null );
- setSuffix( QString::null );
+ setPrefix( TQString::null );
+ setGivenName( TQString::null );
+ setAdditionalName( TQString::null );
+ setFamilyName( TQString::null );
+ setSuffix( TQString::null );
if ( str.isEmpty() )
return;
- QString spaceStr = " ";
- QString emptyStr = "";
+ TQString spaceStr = " ";
+ TQString emptyStr = "";
AddresseeHelper *helper = AddresseeHelper::self();
int i = str.find( ',' );
if( i < 0 ) {
- QStringList parts = QStringList::split( spaceStr, str );
+ TQStringList parts = TQStringList::split( spaceStr, str );
int leftOffset = 0;
int rightOffset = parts.count() - 1;
- QString suffix;
+ TQString suffix;
while ( rightOffset >= 0 ) {
if ( helper->containsSuffix( parts[ rightOffset ] ) ) {
suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr));
@@ -244,7 +244,7 @@ void Addressee::setNameFromString( const QString &s )
if ( rightOffset < 0 )
return;
- QStringList inclusionList;
+ TQStringList inclusionList;
for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) {
if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) {
inclusionList.prepend( parts[ rightOffset - n ] );
@@ -262,7 +262,7 @@ void Addressee::setNameFromString( const QString &s )
setGivenName( parts[ rightOffset ] );
}
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -277,23 +277,23 @@ void Addressee::setNameFromString( const QString &s )
leftOffset++;
}
- QString additionalName;
+ TQString additionalName;
while ( leftOffset < rightOffset ) {
additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
leftOffset++;
}
setAdditionalName( additionalName );
} else {
- QString part1 = str.left( i );
- QString part2 = str.mid( i + 1 );
+ TQString part1 = str.left( i );
+ TQString part2 = str.mid( i + 1 );
- QStringList parts = QStringList::split( spaceStr, part1 );
+ TQStringList parts = TQStringList::split( spaceStr, part1 );
int leftOffset = 0;
int rightOffset = parts.count() - 1;
if ( parts.count() > 0 ) {
- QString suffix;
+ TQString suffix;
while ( rightOffset >= 0 ) {
if ( helper->containsSuffix( parts[ rightOffset ] ) ) {
suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr));
@@ -309,7 +309,7 @@ void Addressee::setNameFromString( const QString &s )
} else
setFamilyName( parts[ rightOffset ] );
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -323,14 +323,14 @@ void Addressee::setNameFromString( const QString &s )
setSuffix( "" );
}
- parts = QStringList::split( spaceStr, part2 );
+ parts = TQStringList::split( spaceStr, part2 );
leftOffset = 0;
rightOffset = parts.count();
if ( parts.count() > 0 ) {
- QString prefix;
+ TQString prefix;
while ( leftOffset < rightOffset ) {
if ( helper->containsTitle( parts[ leftOffset ] ) ) {
prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
@@ -345,7 +345,7 @@ void Addressee::setNameFromString( const QString &s )
leftOffset++;
}
- QString additionalName;
+ TQString additionalName;
while ( leftOffset < rightOffset ) {
additionalName.append( ( additionalName.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] );
leftOffset++;
@@ -358,9 +358,9 @@ void Addressee::setNameFromString( const QString &s )
}
}
-QString Addressee::realName() const
+TQString Addressee::realName() const
{
- QString n( formattedName() );
+ TQString n( formattedName() );
if ( !n.isEmpty() )
return n;
@@ -375,31 +375,31 @@ QString Addressee::realName() const
return organization();
}
-QString Addressee::assembledName() const
+TQString Addressee::assembledName() const
{
- QString name = prefix() + " " + givenName() + " " + additionalName() + " " +
+ TQString name = prefix() + " " + givenName() + " " + additionalName() + " " +
familyName() + " " + suffix();
return name.simplifyWhiteSpace();
}
-QString Addressee::fullEmail( const QString &email ) const
+TQString Addressee::fullEmail( const TQString &email ) const
{
- QString e;
+ TQString e;
if ( email.isNull() ) {
e = preferredEmail();
} else {
e = email;
}
- if ( e.isEmpty() ) return QString::null;
+ if ( e.isEmpty() ) return TQString::null;
- QString text;
+ TQString text;
if ( realName().isEmpty() )
text = e;
else {
- QRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
+ TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
if ( realName().find( needQuotes ) != -1 ) {
- QString name = realName();
+ TQString name = realName();
name.replace( "\"", "\\\"" );
text = "\"" + name + "\" <" + e + ">";
} else
@@ -409,7 +409,7 @@ QString Addressee::fullEmail( const QString &email ) const
return text;
}
-void Addressee::insertEmail( const QString &email, bool preferred )
+void Addressee::insertEmail( const TQString &email, bool preferred )
{
if ( email.simplifyWhiteSpace().isEmpty() )
return;
@@ -417,7 +417,7 @@ void Addressee::insertEmail( const QString &email, bool preferred )
detach();
mData->empty = false;
- QStringList::Iterator it = mData->emails.find( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it != mData->emails.end() ) {
if ( !preferred || it == mData->emails.begin() ) return;
@@ -432,27 +432,27 @@ void Addressee::insertEmail( const QString &email, bool preferred )
}
}
-void Addressee::removeEmail( const QString &email )
+void Addressee::removeEmail( const TQString &email )
{
detach();
- QStringList::Iterator it = mData->emails.find( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it == mData->emails.end() ) return;
mData->emails.remove( it );
}
-QString Addressee::preferredEmail() const
+TQString Addressee::preferredEmail() const
{
- if ( mData->emails.count() == 0 ) return QString::null;
+ if ( mData->emails.count() == 0 ) return TQString::null;
else return mData->emails.first();
}
-QStringList Addressee::emails() const
+TQStringList Addressee::emails() const
{
return mData->emails;
}
-void Addressee::setEmails( const QStringList& emails ) {
+void Addressee::setEmails( const TQStringList& emails ) {
detach();
mData->emails = emails;
@@ -520,7 +520,7 @@ PhoneNumber::List Addressee::phoneNumbers( int type ) const
return list;
}
-PhoneNumber Addressee::findPhoneNumber( const QString &id ) const
+PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const
{
PhoneNumber::List::ConstIterator it;
for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) {
@@ -559,7 +559,7 @@ void Addressee::removeKey( const Key &key )
}
}
-Key Addressee::key( int type, QString customTypeString ) const
+Key Addressee::key( int type, TQString customTypeString ) const
{
Key::List::ConstIterator it;
for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) {
@@ -576,7 +576,7 @@ Key Addressee::key( int type, QString customTypeString ) const
}
}
}
- return Key( QString(), type );
+ return Key( TQString(), type );
}
void Addressee::setKeys( const Key::List& list )
@@ -590,7 +590,7 @@ Key::List Addressee::keys() const
return mData->keys;
}
-Key::List Addressee::keys( int type, QString customTypeString ) const
+Key::List Addressee::keys( int type, TQString customTypeString ) const
{
Key::List list;
@@ -612,7 +612,7 @@ Key::List Addressee::keys( int type, QString customTypeString ) const
return list;
}
-Key Addressee::findKey( const QString &id ) const
+Key Addressee::findKey( const TQString &id ) const
{
Key::List::ConstIterator it;
for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) {
@@ -623,7 +623,7 @@ Key Addressee::findKey( const QString &id ) const
return Key();
}
-QString Addressee::asString() const
+TQString Addressee::asString() const
{
return "Smith, agent Smith...";
}
@@ -637,8 +637,8 @@ void Addressee::dump() const
--DEBUG--
kdDebug(5700) << " Emails {" << endl;
- const QStringList e = emails();
- QStringList::ConstIterator it;
+ const TQStringList e = emails();
+ TQStringList::ConstIterator it;
for( it = e.begin(); it != e.end(); ++it ) {
kdDebug(5700) << " " << (*it) << endl;
}
@@ -739,7 +739,7 @@ Address::List Addressee::addresses( int type ) const
return list;
}
-Address Addressee::findAddress( const QString &id ) const
+Address Addressee::findAddress( const TQString &id ) const
{
Address::List::ConstIterator it;
for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++it ) {
@@ -750,7 +750,7 @@ Address Addressee::findAddress( const QString &id ) const
return Address();
}
-void Addressee::insertCategory( const QString &c )
+void Addressee::insertCategory( const TQString &c )
{
detach();
mData->empty = false;
@@ -760,22 +760,22 @@ void Addressee::insertCategory( const QString &c )
mData->categories.append( c );
}
-void Addressee::removeCategory( const QString &c )
+void Addressee::removeCategory( const TQString &c )
{
detach();
- QStringList::Iterator it = mData->categories.find( c );
+ TQStringList::Iterator it = mData->categories.find( c );
if ( it == mData->categories.end() ) return;
mData->categories.remove( it );
}
-bool Addressee::hasCategory( const QString &c ) const
+bool Addressee::hasCategory( const TQString &c ) const
{
return ( mData->categories.findIndex( c ) != -1 );
}
-void Addressee::setCategories( const QStringList &c )
+void Addressee::setCategories( const TQStringList &c )
{
detach();
mData->empty = false;
@@ -783,22 +783,22 @@ void Addressee::setCategories( const QStringList &c )
mData->categories = c;
}
-QStringList Addressee::categories() const
+TQStringList Addressee::categories() const
{
return mData->categories;
}
-void Addressee::insertCustom( const QString &app, const QString &name,
- const QString &value )
+void Addressee::insertCustom( const TQString &app, const TQString &name,
+ const TQString &value )
{
if ( value.isEmpty() || name.isEmpty() || app.isEmpty() ) return;
detach();
mData->empty = false;
- QString qualifiedName = app + "-" + name + ":";
+ TQString qualifiedName = app + "-" + name + ":";
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
(*it) = qualifiedName + value;
@@ -809,13 +809,13 @@ void Addressee::insertCustom( const QString &app, const QString &name,
mData->custom.append( qualifiedName + value );
}
-void Addressee::removeCustom( const QString &app, const QString &name)
+void Addressee::removeCustom( const TQString &app, const TQString &name)
{
detach();
- QString qualifiedName = app + "-" + name + ":";
+ TQString qualifiedName = app + "-" + name + ":";
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = mData->custom.begin(); it != mData->custom.end(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
mData->custom.remove( it );
@@ -824,12 +824,12 @@ void Addressee::removeCustom( const QString &app, const QString &name)
}
}
-QString Addressee::custom( const QString &app, const QString &name ) const
+TQString Addressee::custom( const TQString &app, const TQString &name ) const
{
- QString qualifiedName = app + "-" + name + ":";
- QString value;
+ TQString qualifiedName = app + "-" + name + ":";
+ TQString value;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
value = (*it).mid( (*it).find( ":" ) + 1 );
@@ -840,7 +840,7 @@ QString Addressee::custom( const QString &app, const QString &name ) const
return value;
}
-void Addressee::setCustoms( const QStringList &l )
+void Addressee::setCustoms( const TQStringList &l )
{
detach();
mData->empty = false;
@@ -848,13 +848,13 @@ void Addressee::setCustoms( const QStringList &l )
mData->custom = l;
}
-QStringList Addressee::customs() const
+TQStringList Addressee::customs() const
{
return mData->custom;
}
-void Addressee::parseEmailAddress( const QString &rawEmail, QString &fullName,
- QString &email)
+void Addressee::parseEmailAddress( const TQString &rawEmail, TQString &fullName,
+ TQString &email)
{
// This is a simplified version of KPIM::splitAddress().
@@ -864,11 +864,11 @@ void Addressee::parseEmailAddress( const QString &rawEmail, QString &fullName,
return; // KPIM::AddressEmpty;
// The code works on 8-bit strings, so convert the input to UTF-8.
- QCString address = rawEmail.utf8();
+ TQCString address = rawEmail.utf8();
- QCString displayName;
- QCString addrSpec;
- QCString comment;
+ TQCString displayName;
+ TQCString addrSpec;
+ TQCString comment;
// The following is a primitive parser for a mailbox-list (cf. RFC 2822).
// The purpose is to extract a displayable string from the mailboxes.
@@ -980,8 +980,8 @@ ABORT_PARSING:
comment = comment.stripWhiteSpace();
addrSpec = addrSpec.stripWhiteSpace();
- fullName = QString::fromUtf8( displayName );
- email = QString::fromUtf8( addrSpec );
+ fullName = TQString::fromUtf8( displayName );
+ email = TQString::fromUtf8( addrSpec );
// check for errors
if ( inQuotedString )
@@ -999,7 +999,7 @@ ABORT_PARSING:
//displayName.truncate( 0 );
// Address of the form "foo@bar" or "foo@bar (Name)".
email = fullName;
- fullName = QString::fromUtf8( comment );
+ fullName = TQString::fromUtf8( comment );
}
}
@@ -1045,7 +1045,7 @@ bool Addressee::operator< ( const Addressee &addr )
return mSortMode->lesser( *this, addr );
}
-QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Addressee &a )
{
if (!a.mData) return s;
@@ -1061,7 +1061,7 @@ QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a )
return s;
}
-QDataStream &KABC::operator>>( QDataStream &s, Addressee &a )
+TQDataStream &KABC::operator>>( TQDataStream &s, Addressee &a )
{
if (!a.mData)
return s;
@@ -1098,7 +1098,7 @@ bool matchBinaryPattern( int value, int pattern )
}
template <class L>
-bool listEquals( const QValueList<L> &list, const QValueList<L> &pattern )
+bool listEquals( const TQValueList<L> &list, const TQValueList<L> &pattern )
{
if ( list.count() != pattern.count() )
return false;
@@ -1110,7 +1110,7 @@ bool listEquals( const QValueList<L> &list, const QValueList<L> &pattern )
return true;
}
-bool emailsEquals( const QStringList &list, const QStringList &pattern )
+bool emailsEquals( const TQStringList &list, const TQStringList &pattern )
{
if ( list.count() != pattern.count() )
return false;
@@ -1118,7 +1118,7 @@ bool emailsEquals( const QStringList &list, const QStringList &pattern )
if ( list.first() != pattern.first() )
return false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
if ( pattern.find( *it ) == pattern.end() )
return false;
diff --git a/kabc/scripts/addressee.src.h b/kabc/scripts/addressee.src.h
index edb63ae60..f87edc5ec 100644
--- a/kabc/scripts/addressee.src.h
+++ b/kabc/scripts/addressee.src.h
@@ -21,10 +21,10 @@
#ifndef KABC_ADDRESSEE_H
#define KABC_ADDRESSEE_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
#include <kurl.h>
@@ -73,12 +73,12 @@ class SortMode;
*/
class KABC_EXPORT Addressee
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
public:
- typedef QValueList<Addressee> List;
- typedef QMap<QString, Addressee> Map;
+ typedef TQValueList<Addressee> List;
+ typedef TQMap<TQString, Addressee> Map;
/**
Construct an empty address book entry.
@@ -100,28 +100,28 @@ class KABC_EXPORT Addressee
/**
Set unique identifier.
*/
- void setUid( const QString &uid );
+ void setUid( const TQString &uid );
/**
Return unique identifier.
*/
- QString uid() const;
+ TQString uid() const;
/**
Return translated label for uid field.
*/
- static QString uidLabel();
+ static TQString uidLabel();
/**
Set unique resource identifier.
*/
- void setUri( const QString &uid );
+ void setUri( const TQString &uid );
/**
Return unique resource identifier.
*/
- QString uri() const;
+ TQString uri() const;
/**
Return translated label for uri field.
*/
- static QString uriLabel();
+ static TQString uriLabel();
--DECLARATIONS--
/**
@@ -129,26 +129,26 @@ class KABC_EXPORT Addressee
parts of the string with according fields. This function should probably
be a bit more clever.
*/
- void setNameFromString( const QString & );
+ void setNameFromString( const TQString & );
/**
Return the name of the addressee. This is calculated from all the name
fields.
*/
- QString realName() const;
+ TQString realName() const;
/**
Return the name that consists of all name parts.
*/
- QString assembledName() const;
+ TQString assembledName() const;
/**
Return email address including real name.
@param email Email address to be used to construct the full email string.
- If this is QString::null the preferred email address is used.
+ If this is TQString::null the preferred email address is used.
*/
- QString fullEmail( const QString &email=QString::null ) const;
+ TQString fullEmail( const TQString &email=TQString::null ) const;
/**
Insert an email address. If the email address already exists in this
@@ -158,30 +158,30 @@ class KABC_EXPORT Addressee
@param preferred Set to true, if this is the preferred email address of
the addressee.
*/
- void insertEmail( const QString &email, bool preferred=false );
+ void insertEmail( const TQString &email, bool preferred=false );
/**
Remove email address. If the email address doesn't exist, nothing happens.
*/
- void removeEmail( const QString &email );
+ void removeEmail( const TQString &email );
/**
Return preferred email address. This is the first email address or the
last one added with insertEmail() with a set preferred parameter.
*/
- QString preferredEmail() const;
+ TQString preferredEmail() const;
/**
Return list of all email addresses.
*/
- QStringList emails() const;
+ TQStringList emails() const;
/**
Set the emails to @p list.
The first email address gets the preferred one!
@param list The list of email addresses.
*/
- void setEmails( const QStringList& list);
+ void setEmails( const TQStringList& list);
/**
Insert a phone number. If a phone number with the same id already exists
@@ -213,7 +213,7 @@ class KABC_EXPORT Addressee
/**
Return phone number with the given id.
*/
- PhoneNumber findPhoneNumber( const QString &id ) const;
+ PhoneNumber findPhoneNumber( const TQString &id ) const;
/**
Insert a key. If a key with the same id already exists
@@ -233,7 +233,7 @@ class KABC_EXPORT Addressee
that should match. If you leave the string empty, the first
key with a custom value is returned.
*/
- Key key( int type, QString customTypeString = QString::null ) const;
+ Key key( int type, TQString customTypeString = TQString::null ) const;
/**
Return list of all keys.
@@ -252,12 +252,12 @@ class KABC_EXPORT Addressee
that should match. If you leave the string empty, all custom
keys will be returned.
*/
- Key::List keys( int type, QString customTypeString = QString::null ) const;
+ Key::List keys( int type, TQString customTypeString = TQString::null ) const;
/**
Return key with the given id.
*/
- Key findKey( const QString &id ) const;
+ Key findKey( const TQString &id ) const;
/**
Insert an address. If an address with the same id already exists
@@ -289,32 +289,32 @@ class KABC_EXPORT Addressee
/**
Return address with the given id.
*/
- Address findAddress( const QString &id ) const;
+ Address findAddress( const TQString &id ) const;
/**
Insert category. If the category already exists it is not duplicated.
*/
- void insertCategory( const QString & );
+ void insertCategory( const TQString & );
/**
Remove category.
*/
- void removeCategory( const QString & );
+ void removeCategory( const TQString & );
/**
Return, if addressee has the given category.
*/
- bool hasCategory( const QString & ) const;
+ bool hasCategory( const TQString & ) const;
/**
Set categories to given value.
*/
- void setCategories( const QStringList & );
+ void setCategories( const TQStringList & );
/**
Return list of all set categories.
*/
- QStringList categories() const;
+ TQStringList categories() const;
/**
Insert custom entry. The entry is identified by the name of the inserting
@@ -324,34 +324,34 @@ class KABC_EXPORT Addressee
An empty value isn't allowed (nothing happens if this is called with
any of the three arguments being empty)
*/
- void insertCustom( const QString &app, const QString &name,
- const QString &value );
+ void insertCustom( const TQString &app, const TQString &name,
+ const TQString &value );
/**
Remove custom entry.
*/
- void removeCustom( const QString &app, const QString &name );
+ void removeCustom( const TQString &app, const TQString &name );
/**
Return value of custom entry, identified by app and entry name.
*/
- QString custom( const QString &app, const QString &name ) const;
+ TQString custom( const TQString &app, const TQString &name ) const;
/**
Set all custom entries.
*/
- void setCustoms( const QStringList & );
+ void setCustoms( const TQStringList & );
/**
Return list of all custom entries.
*/
- QStringList customs() const;
+ TQStringList customs() const;
/**
Parse full email address. The result is given back in fullName and email.
*/
- static void parseEmailAddress( const QString &rawEmail, QString &fullName,
- QString &email );
+ static void parseEmailAddress( const TQString &rawEmail, TQString &fullName,
+ TQString &email );
/**
Debug output.
@@ -361,7 +361,7 @@ class KABC_EXPORT Addressee
/**
Returns string representation of the addressee.
*/
- QString asString() const;
+ TQString asString() const;
/**
Set resource where the addressee is from.
@@ -399,8 +399,8 @@ class KABC_EXPORT Addressee
static KABC::SortMode *mSortMode;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Addressee & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Addressee & );
}
diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp
index 205ddaa06..91a27779d 100644
--- a/kabc/scripts/field.src.cpp
+++ b/kabc/scripts/field.src.cpp
@@ -31,9 +31,9 @@ class Field::FieldImpl
{
public:
FieldImpl( int fieldId, int category = 0,
- const QString &label = QString::null,
- const QString &key = QString::null,
- const QString &app = QString::null )
+ const TQString &label = TQString::null,
+ const TQString &key = TQString::null,
+ const TQString &app = TQString::null )
: mFieldId( fieldId ), mCategory( category ), mLabel( label ),
mKey( key ), mApp( app ) {}
@@ -46,17 +46,17 @@ class Field::FieldImpl
int fieldId() { return mFieldId; }
int category() { return mCategory; }
- QString label() { return mLabel; }
- QString key() { return mKey; }
- QString app() { return mApp; }
+ TQString label() { return mLabel; }
+ TQString key() { return mKey; }
+ TQString app() { return mApp; }
private:
int mFieldId;
int mCategory;
- QString mLabel;
- QString mKey;
- QString mApp;
+ TQString mLabel;
+ TQString mKey;
+ TQString mApp;
};
@@ -75,7 +75,7 @@ Field::~Field()
delete mImpl;
}
-QString Field::label()
+TQString Field::label()
{
switch ( mImpl->fieldId() ) {
--CASELABEL--
@@ -91,7 +91,7 @@ int Field::category()
return mImpl->category();
}
-QString Field::categoryLabel( int category )
+TQString Field::categoryLabel( int category )
{
switch ( category ) {
case All:
@@ -113,7 +113,7 @@ QString Field::categoryLabel( int category )
}
}
-QString Field::value( const KABC::Addressee &a )
+TQString Field::value( const KABC::Addressee &a )
{
switch ( mImpl->fieldId() ) {
--CASEVALUE--
@@ -123,7 +123,7 @@ QString Field::value( const KABC::Addressee &a )
if ( a.birthday().isValid() )
return a.birthday().date().toString( Qt::ISODate );
else
- return QString::null;
+ return TQString::null;
case FieldImpl::Url:
return a.url().prettyURL();
case FieldImpl::HomePhone:
@@ -146,7 +146,7 @@ QString Field::value( const KABC::Addressee &a )
return (*it).number();
}
- return QString::null;
+ return TQString::null;
}
case FieldImpl::BusinessPhone:
{
@@ -168,7 +168,7 @@ QString Field::value( const KABC::Addressee &a )
return (*it).number();
}
- return QString::null;
+ return TQString::null;
}
case FieldImpl::MobilePhone:
return a.phoneNumber( PhoneNumber::Cell ).number();
@@ -213,11 +213,11 @@ QString Field::value( const KABC::Addressee &a )
case FieldImpl::CustomField:
return a.custom( mImpl->app(), mImpl->key() );
default:
- return QString::null;
+ return TQString::null;
}
}
-bool Field::setValue( KABC::Addressee &a, const QString &value )
+bool Field::setValue( KABC::Addressee &a, const TQString &value )
{
switch ( mImpl->fieldId() ) {
--CASESETVALUE--
@@ -362,7 +362,7 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
return true;
}
case FieldImpl::Birthday:
- a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
+ a.setBirthday( TQDate::fromString( value, Qt::ISODate ) );
return true;
case FieldImpl::CustomField:
a.insertCustom( mImpl->app(), mImpl->key(), value );
@@ -372,18 +372,18 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
}
}
-QString Field::sortKey( const KABC::Addressee &a )
+TQString Field::sortKey( const KABC::Addressee &a )
{
switch ( mImpl->fieldId() ) {
--CASEVALUE--
case FieldImpl::Birthday:
if ( a.birthday().isValid() ) {
- QDate date = a.birthday().date();
- QString key;
+ TQDate date = a.birthday().date();
+ TQString key;
key.sprintf( "%02d-%02d", date.month(), date.day() );
return key;
} else
- return QString( "00-00" );
+ return TQString( "00-00" );
default:
return value( a ).lower();
}
@@ -443,7 +443,7 @@ void Field::deleteFields()
mCustomFields.clear();
}
-void Field::saveFields( const QString &identifier,
+void Field::saveFields( const TQString &identifier,
const Field::List &fields )
{
KConfig *cfg = KGlobal::config();
@@ -452,29 +452,29 @@ void Field::saveFields( const QString &identifier,
saveFields( cfg, identifier, fields );
}
-void Field::saveFields( KConfig *cfg, const QString &identifier,
+void Field::saveFields( KConfig *cfg, const TQString &identifier,
const Field::List &fields )
{
- QValueList<int> fieldIds;
+ TQValueList<int> fieldIds;
int custom = 0;
Field::List::ConstIterator it;
for( it = fields.begin(); it != fields.end(); ++it ) {
fieldIds.append( (*it)->mImpl->fieldId() );
if( (*it)->isCustom() ) {
- QStringList customEntry;
+ TQStringList customEntry;
customEntry << (*it)->mImpl->label();
customEntry << (*it)->mImpl->key();
customEntry << (*it)->mImpl->app();
cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" +
- QString::number( custom++ ), customEntry );
+ TQString::number( custom++ ), customEntry );
}
}
cfg->writeEntry( identifier, fieldIds );
}
-Field::List Field::restoreFields( const QString &identifier )
+Field::List Field::restoreFields( const TQString &identifier )
{
KConfig *cfg = KGlobal::config();
KConfigGroupSaver( cfg, "KABCFields" );
@@ -482,20 +482,20 @@ Field::List Field::restoreFields( const QString &identifier )
return restoreFields( cfg, identifier );
}
-Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
+Field::List Field::restoreFields( KConfig *cfg, const TQString &identifier )
{
- const QValueList<int> fieldIds = cfg->readIntListEntry( identifier );
+ const TQValueList<int> fieldIds = cfg->readIntListEntry( identifier );
Field::List fields;
int custom = 0;
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
FieldImpl *f = 0;
if ( (*it) == FieldImpl::CustomField ) {
- QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
+ TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
identifier + "_" +
- QString::number( custom++ ) );
+ TQString::number( custom++ ) );
f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ],
customEntry[ 1 ], customEntry[ 2 ] );
} else {
@@ -518,8 +518,8 @@ bool Field::equals( Field *field )
return mImpl->key() == field->mImpl->key();
}
-Field *Field::createCustomField( const QString &label, int category,
- const QString &key, const QString &app )
+Field *Field::createCustomField( const TQString &label, int category,
+ const TQString &key, const TQString &app )
{
Field *field = new Field( new FieldImpl( FieldImpl::CustomField,
category | CustomCategory,
diff --git a/kabc/secrecy.cpp b/kabc/secrecy.cpp
index 1e90d9c81..7ec439b0c 100644
--- a/kabc/secrecy.cpp
+++ b/kabc/secrecy.cpp
@@ -64,7 +64,7 @@ Secrecy::TypeList Secrecy::typeList()
return list;
}
-QString Secrecy::typeLabel( int type )
+TQString Secrecy::typeLabel( int type )
{
switch ( type ) {
case Public:
@@ -82,17 +82,17 @@ QString Secrecy::typeLabel( int type )
}
}
-QString Secrecy::asString() const
+TQString Secrecy::asString() const
{
return typeLabel( mType );
}
-QDataStream &KABC::operator<<( QDataStream &s, const Secrecy &secrecy )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Secrecy &secrecy )
{
return s << secrecy.mType;
}
-QDataStream &KABC::operator>>( QDataStream &s, Secrecy &secrecy )
+TQDataStream &KABC::operator>>( TQDataStream &s, Secrecy &secrecy )
{
s >> secrecy.mType;
diff --git a/kabc/secrecy.h b/kabc/secrecy.h
index e76592fa5..4f9ef6564 100644
--- a/kabc/secrecy.h
+++ b/kabc/secrecy.h
@@ -21,7 +21,7 @@
#ifndef KABC_SECRECY_H
#define KABC_SECRECY_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -29,11 +29,11 @@ namespace KABC {
class KABC_EXPORT Secrecy
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Secrecy & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Secrecy & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Secrecy & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Secrecy & );
public:
- typedef QValueList<int> TypeList;
+ typedef TQValueList<int> TypeList;
/**
* Secrecy types
@@ -82,19 +82,19 @@ public:
/**
* Returns a translated label for a given secrecy type.
*/
- static QString typeLabel( int type );
+ static TQString typeLabel( int type );
/**
* For debug.
*/
- QString asString() const;
+ TQString asString() const;
private:
int mType;
};
-KABC_EXPORT QDataStream& operator<<( QDataStream &s, const Secrecy &secrecy );
-KABC_EXPORT QDataStream& operator>>( QDataStream &s, Secrecy &secrecy );
+KABC_EXPORT TQDataStream& operator<<( TQDataStream &s, const Secrecy &secrecy );
+KABC_EXPORT TQDataStream& operator>>( TQDataStream &s, Secrecy &secrecy );
}
#endif
diff --git a/kabc/sortmode.cpp b/kabc/sortmode.cpp
index c21a871cb..ee9a6f82d 100644
--- a/kabc/sortmode.cpp
+++ b/kabc/sortmode.cpp
@@ -41,13 +41,13 @@ bool NameSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee &
switch ( mNameType ) {
case FormattedName:
- lesser = QString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0;
+ lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0;
break;
case FamilyName:
- lesser = QString::localeAwareCompare( first.familyName(), second.familyName() ) < 0;
+ lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0;
break;
case GivenName:
- lesser = QString::localeAwareCompare( first.givenName(), second.givenName() ) < 0;
+ lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0;
break;
default:
lesser = false;
@@ -70,7 +70,7 @@ bool FieldSortMode::lesser( const KABC::Addressee &first, const KABC::Addressee
if ( !mField )
return false;
else {
- bool lesser = QString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0;
+ bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0;
if ( !mAscendingOrder )
lesser = !lesser;
diff --git a/kabc/sound.cpp b/kabc/sound.cpp
index 48f12e4f1..cf645be83 100644
--- a/kabc/sound.cpp
+++ b/kabc/sound.cpp
@@ -20,7 +20,7 @@
#include "sound.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
using namespace KABC;
@@ -29,12 +29,12 @@ Sound::Sound()
{
}
-Sound::Sound( const QString &url )
+Sound::Sound( const TQString &url )
: mUrl( url ), mIntern( false )
{
}
-Sound::Sound( const QByteArray &data )
+Sound::Sound( const TQByteArray &data )
: mData( data ), mIntern( true )
{
}
@@ -63,13 +63,13 @@ bool Sound::operator!=( const Sound &s ) const
return !( s == *this );
}
-void Sound::setUrl( const QString &url )
+void Sound::setUrl( const TQString &url )
{
mUrl = url;
mIntern = false;
}
-void Sound::setData( const QByteArray &data )
+void Sound::setData( const TQByteArray &data )
{
mData = data;
mIntern = true;
@@ -86,17 +86,17 @@ bool Sound::isEmpty() const
}
-QString Sound::url() const
+TQString Sound::url() const
{
return mUrl;
}
-QByteArray Sound::data() const
+TQByteArray Sound::data() const
{
return mData;
}
-QString Sound::asString() const
+TQString Sound::asString() const
{
if ( mIntern )
return "intern sound";
@@ -104,13 +104,13 @@ QString Sound::asString() const
return mUrl;
}
-QDataStream &KABC::operator<<( QDataStream &s, const Sound &sound )
+TQDataStream &KABC::operator<<( TQDataStream &s, const Sound &sound )
{
return s << sound.mIntern << sound.mUrl;
// return s << sound.mIntern << sound.mUrl << sound.mData;
}
-QDataStream &KABC::operator>>( QDataStream &s, Sound &sound )
+TQDataStream &KABC::operator>>( TQDataStream &s, Sound &sound )
{
s >> sound.mIntern >> sound.mUrl;
// s >> sound.mIntern >> sound.mUrl >> sound.mData;
diff --git a/kabc/sound.h b/kabc/sound.h
index db488530e..350042cc5 100644
--- a/kabc/sound.h
+++ b/kabc/sound.h
@@ -21,8 +21,8 @@
#ifndef KABC_SOUND_H
#define KABC_SOUND_H
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -39,7 +39,7 @@ namespace KABC {
* tmp.close();
* KAudioPlayer::play( tmp.name() );
* } else if(!sound.url().isEmpty()) {
- * QString tmpFile;
+ * TQString tmpFile;
* if(!KIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL))
* {
* KMessageBox::error(0L,
@@ -58,8 +58,8 @@ namespace KABC {
*/
class KABC_EXPORT Sound
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Sound & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Sound & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & );
public:
@@ -73,14 +73,14 @@ public:
*
* @param url A URL that describes the position of the sound file.
*/
- Sound( const QString &url );
+ Sound( const TQString &url );
/**
* Consturctor.
*
* @param data The raw data of the sound.
*/
- Sound( const QByteArray &data );
+ Sound( const TQByteArray &data );
/**
* Destructor.
@@ -98,7 +98,7 @@ public:
*
* @param url The location URL of the sound file.
*/
- void setUrl( const QString &url );
+ void setUrl( const TQString &url );
/**
* Test if this sound file has been set.
@@ -113,7 +113,7 @@ public:
*
* @param data The raw data of the sound.
*/
- void setData( const QByteArray &data );
+ void setData( const TQByteArray &data );
/**
* Returns whether the sound is described by a URL (extern) or
@@ -127,27 +127,27 @@ public:
/**
* Returns the location URL of this sound.
*/
- QString url() const;
+ TQString url() const;
/**
* Returns the raw data of this sound.
*/
- QByteArray data() const;
+ TQByteArray data() const;
/**
* Returns string representation of the sound.
*/
- QString asString() const;
+ TQString asString() const;
private:
- QString mUrl;
- QByteArray mData;
+ TQString mUrl;
+ TQByteArray mData;
int mIntern;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const Sound & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, Sound & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const Sound & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, Sound & );
}
#endif
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index 95c222bf3..6b574d86f 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -40,12 +40,12 @@ bool StdAddressBook::mAutomaticSave = true;
static KStaticDeleter<StdAddressBook> addressBookDeleter;
-QString StdAddressBook::fileName()
+TQString StdAddressBook::fileName()
{
return locateLocal( "data", "kabc/std.vcf" );
}
-QString StdAddressBook::directoryName()
+TQString StdAddressBook::directoryName()
{
return locateLocal( "data", "kabc/stdvcf" );
}
@@ -100,18 +100,18 @@ void StdAddressBook::init( bool asynchronous )
for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
(*it)->setAddressBook( this );
if ( !(*it)->open() ) {
- error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) );
+ error( TQString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) );
continue;
}
- connect( *it, SIGNAL( loadingFinished( Resource* ) ),
- this, SLOT( resourceLoadingFinished( Resource* ) ) );
- connect( *it, SIGNAL( savingFinished( Resource* ) ),
- this, SLOT( resourceSavingFinished( Resource* ) ) );
-
- connect( *it, SIGNAL( loadingError( Resource*, const QString& ) ),
- this, SLOT( resourceLoadingError( Resource*, const QString& ) ) );
- connect( *it, SIGNAL( savingError( Resource*, const QString& ) ),
- this, SLOT( resourceSavingError( Resource*, const QString& ) ) );
+ connect( *it, TQT_SIGNAL( loadingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceLoadingFinished( Resource* ) ) );
+ connect( *it, TQT_SIGNAL( savingFinished( Resource* ) ),
+ this, TQT_SLOT( resourceSavingFinished( Resource* ) ) );
+
+ connect( *it, TQT_SIGNAL( loadingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceLoadingError( Resource*, const TQString& ) ) );
+ connect( *it, TQT_SIGNAL( savingError( Resource*, const TQString& ) ),
+ this, TQT_SLOT( resourceSavingError( Resource*, const TQString& ) ) );
}
Resource *res = standardResource();
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h
index fb4afa28b..935b2bad1 100644
--- a/kabc/stdaddressbook.h
+++ b/kabc/stdaddressbook.h
@@ -93,12 +93,12 @@ class KABC_EXPORT StdAddressBook : public AddressBook
/**
Returns the default file name for vcard-based addressbook
*/
- static QString fileName();
+ static TQString fileName();
/**
Returns the default directory name for vcard-based addressbook
*/
- static QString directoryName();
+ static TQString directoryName();
/**
Sets the automatic save property of the address book.
diff --git a/kabc/tests/bigwrite.cpp b/kabc/tests/bigwrite.cpp
index 90013a157..0dd6a7a05 100644
--- a/kabc/tests/bigwrite.cpp
+++ b/kabc/tests/bigwrite.cpp
@@ -25,9 +25,9 @@ int main(int argc,char **argv)
for( int i = 0; i < 5000; ++i ) {
Addressee a;
- a.setGivenName( "number" + QString::number( i ) );
+ a.setGivenName( "number" + TQString::number( i ) );
a.setFamilyName( "Name" );
- a.insertEmail( QString::number( i ) + "@domain" );
+ a.insertEmail( TQString::number( i ) + "@domain" );
ab.insertAddressee( a );
}
diff --git a/kabc/tests/kabcargl.cpp b/kabc/tests/kabcargl.cpp
index 32251303b..b57724c15 100644
--- a/kabc/tests/kabcargl.cpp
+++ b/kabc/tests/kabcargl.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -42,20 +42,20 @@ int main(int argc,char **argv)
KApplication app;
- QString filename = StdAddressBook::fileName();
+ TQString filename = StdAddressBook::fileName();
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Error opening file '" << filename << "' for reading." << endl;
return 1;
}
- QTextStream t( &f );
- t.setEncoding(QTextStream::UnicodeUTF8);
- QString text = t.read();
+ TQTextStream t( &f );
+ t.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString text = t.read();
f.close();
- text = QString::fromUtf8( text.local8Bit() );
+ text = TQString::fromUtf8( text.local8Bit() );
text.replace( "\n", "\r\n" );
if ( !f.open( IO_WriteOnly ) ) {
@@ -63,8 +63,8 @@ int main(int argc,char **argv)
return 1;
}
- QTextStream t2( &f );
- t2.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream t2( &f );
+ t2.setEncoding(TQTextStream::UnicodeUTF8);
t2 << text;
f.close();
}
diff --git a/kabc/tests/testaddresslineedit.cpp b/kabc/tests/testaddresslineedit.cpp
index 70c07b446..0dea6f742 100644
--- a/kabc/tests/testaddresslineedit.cpp
+++ b/kabc/tests/testaddresslineedit.cpp
@@ -21,7 +21,7 @@ int main( int argc,char **argv )
lineEdit->show();
app.setMainWidget( lineEdit );
- QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
app.exec();
diff --git a/kabc/tests/testdistlist.cpp b/kabc/tests/testdistlist.cpp
index a81f8c0dc..abf551ace 100644
--- a/kabc/tests/testdistlist.cpp
+++ b/kabc/tests/testdistlist.cpp
@@ -1,4 +1,4 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -30,7 +30,7 @@ int main(int argc,char **argv)
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->isSet("list")) {
- QString name = args->getOption("list");
+ TQString name = args->getOption("list");
DistributionListManager *manager =
new DistributionListManager( StdAddressBook::self() );
@@ -51,7 +51,7 @@ int main(int argc,char **argv)
editor->show();
app.setMainWidget(editor);
- QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
app.exec();
diff --git a/kabc/tests/testkabc.cpp b/kabc/tests/testkabc.cpp
index 15fa11c44..c5d2d12e4 100644
--- a/kabc/tests/testkabc.cpp
+++ b/kabc/tests/testkabc.cpp
@@ -5,8 +5,8 @@
#include <kcmdlineargs.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqimage.h>
#include "geo.h"
#include "secrecy.h"
@@ -31,7 +31,7 @@ int main(int argc,char **argv)
#ifdef READ
AddressBook::Iterator it;
for ( it = ab->begin(); it != ab->end(); ++it ) {
- QString vcard;
+ TQString vcard;
VCardConverter converter;
converter.addresseeToVCard( *it, vcard );
kdDebug() << "card=" << vcard << endl;
@@ -44,11 +44,11 @@ int main(int argc,char **argv)
Picture pic;
- QImage img;
+ TQImage img;
img.load("/home/tobias/test.png");
/*
pic.setData(img);
- pic.setType(QImage::imageFormat("/home/tobias/test.png"));
+ pic.setType(TQImage::imageFormat("/home/tobias/test.png"));
*/
pic.setUrl("http://www.mypict.de");
addr.setLogo( pic );
diff --git a/kabc/tests/testkabcdlg.cpp b/kabc/tests/testkabcdlg.cpp
index c497a9ead..3c9a23792 100644
--- a/kabc/tests/testkabcdlg.cpp
+++ b/kabc/tests/testkabcdlg.cpp
@@ -1,4 +1,4 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kapplication.h>
diff --git a/kabc/tests/testldapclient.cpp b/kabc/tests/testldapclient.cpp
index f4616d16c..2fa6a1c72 100644
--- a/kabc/tests/testldapclient.cpp
+++ b/kabc/tests/testldapclient.cpp
@@ -22,7 +22,7 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <assert.h>
#include <stdlib.h>
@@ -50,12 +50,12 @@ void TestLDAPClient::runAll()
testIntevation();
}
-bool TestLDAPClient::check(const QString& txt, QString a, QString b)
+bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -82,50 +82,50 @@ void TestLDAPClient::testIntevation()
mClient->setBase( "o=Intevation GmbH,c=de" );
// Same list as in kaddressbook's ldapsearchdialog
- QStringList attrs;
+ TQStringList attrs;
attrs << "l" << "Company" << "co" << "department" << "description" << "mail" << "facsimileTelephoneNumber" << "cn" << "homePhone" << "mobile" << "o" << "pager" << "postalAddress" << "st" << "street" << "title" << "uid" << "telephoneNumber" << "postalCode" << "objectClass";
// the list from ldapclient.cpp
//attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass";
mClient->setAttrs( attrs );
// Taken from LdapSearch
- //QString mSearchText = QString::fromUtf8( "Till" );
- //QString filter = QString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" )
+ //TQString mSearchText = TQString::fromUtf8( "Till" );
+ //TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" )
// .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText );
// For some reason a fromUtf8 broke the search for me (no results).
// But this certainly looks fishy, it might break on non-utf8 systems.
- QString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))";
-
- connect( mClient, SIGNAL( result( const KABC::LdapObject& ) ),
- this, SLOT( slotLDAPResult( const KABC::LdapObject& ) ) );
- connect( mClient, SIGNAL( done() ),
- this, SLOT( slotLDAPDone() ) );
- connect( mClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotLDAPError( const QString& ) ) );
+ TQString filter = "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(|(cn=*Ägypten MDK*)(sn=*Ägypten MDK*))";
+
+ connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ),
+ this, TQT_SLOT( slotLDAPResult( const KABC::LdapObject& ) ) );
+ connect( mClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotLDAPDone() ) );
+ connect( mClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotLDAPError( const TQString& ) ) );
mClient->startQuery( filter );
kapp->eventLoop()->enterLoop();
delete mClient; mClient = 0;
}
// from kaddressbook... ugly though...
-static QString asUtf8( const QByteArray &val )
+static TQString asUtf8( const TQByteArray &val )
{
if ( val.isEmpty() )
- return QString::null;
+ return TQString::null;
const char *data = val.data();
- //QString::fromUtf8() bug workaround
+ //TQString::fromUtf8() bug workaround
if ( data[ val.size() - 1 ] == '\0' )
- return QString::fromUtf8( data, val.size() - 1 );
+ return TQString::fromUtf8( data, val.size() - 1 );
else
- return QString::fromUtf8( data, val.size() );
+ return TQString::fromUtf8( data, val.size() );
}
-static QString join( const KABC::LdapAttrValue& lst, const QString& sep )
+static TQString join( const KABC::LdapAttrValue& lst, const TQString& sep )
{
- QString res;
+ TQString res;
bool already = false;
for ( KABC::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( already )
@@ -138,15 +138,15 @@ static QString join( const KABC::LdapAttrValue& lst, const QString& sep )
void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj )
{
- QString cn = join( obj.attrs[ "cn" ], ", " );
+ TQString cn = join( obj.attrs[ "cn" ], ", " );
kdDebug() << " cn:" << cn << endl;
assert( !obj.attrs[ "mail" ].isEmpty() );
- QString mail = join( obj.attrs[ "mail" ], ", " );
+ TQString mail = join( obj.attrs[ "mail" ], ", " );
kdDebug() << " mail:" << mail << endl;
assert( mail.contains( '@' ) );
}
-void TestLDAPClient::slotLDAPError( const QString& err )
+void TestLDAPClient::slotLDAPError( const TQString& err )
{
kdDebug() << k_funcinfo << err << endl;
::exit( 1 );
diff --git a/kabc/tests/testldapclient.h b/kabc/tests/testldapclient.h
index 583ead073..ea1293b51 100644
--- a/kabc/tests/testldapclient.h
+++ b/kabc/tests/testldapclient.h
@@ -19,7 +19,7 @@
#ifndef TESTLDAPCLIENT_H
#define TESTLDAPCLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "../ldapclient.h"
typedef KABC::LdapClient LdapClient;
@@ -39,11 +39,11 @@ public:
private slots:
void slotLDAPResult( const KABC::LdapObject& );
- void slotLDAPError( const QString& );
+ void slotLDAPError( const TQString& );
void slotLDAPDone();
private:
- bool check(const QString& txt, QString a, QString b);
+ bool check(const TQString& txt, TQString a, TQString b);
LdapClient* mClient;
};
diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp
index c922c7a7e..4674606e0 100644
--- a/kabc/tests/testlock.cpp
+++ b/kabc/tests/testlock.cpp
@@ -33,12 +33,12 @@
#include <kmessagebox.h>
#include <kdialog.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlistview.h>
+#include <tqdir.h>
#include <iostream>
@@ -47,9 +47,9 @@
using namespace KABC;
-LockWidget::LockWidget( const QString &identifier )
+LockWidget::LockWidget( const TQString &identifier )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
@@ -60,31 +60,31 @@ LockWidget::LockWidget( const QString &identifier )
int pid = getpid();
- QLabel *pidLabel = new QLabel( "Process ID: " + QString::number( pid ),
+ TQLabel *pidLabel = new TQLabel( "Process ID: " + TQString::number( pid ),
this );
topLayout->addWidget( pidLabel );
- QHBoxLayout *identifierLayout = new QHBoxLayout( topLayout );
+ TQHBoxLayout *identifierLayout = new TQHBoxLayout( topLayout );
- QLabel *resourceLabel = new QLabel( "Identifier:", this );
+ TQLabel *resourceLabel = new TQLabel( "Identifier:", this );
identifierLayout->addWidget( resourceLabel );
- QLabel *resourceIdentifier = new QLabel( identifier, this );
+ TQLabel *resourceIdentifier = new TQLabel( identifier, this );
identifierLayout->addWidget( resourceIdentifier );
- mStatus = new QLabel( "Status: Unlocked", this );
+ mStatus = new TQLabel( "Status: Unlocked", this );
topLayout->addWidget( mStatus );
- QPushButton *button = new QPushButton( "Lock", this );
+ TQPushButton *button = new TQPushButton( "Lock", this );
topLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( lock() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() ) );
- button = new QPushButton( "Unlock", this );
+ button = new TQPushButton( "Unlock", this );
topLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( unlock() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( unlock() ) );
}
- mLockView = new QListView( this );
+ mLockView = new TQListView( this );
topLayout->addWidget( mLockView );
mLockView->addColumn( "Lock File" );
mLockView->addColumn( "PID" );
@@ -92,17 +92,17 @@ LockWidget::LockWidget( const QString &identifier )
updateLockView();
- QPushButton *quitButton = new QPushButton( "Quit", this );
+ TQPushButton *quitButton = new TQPushButton( "Quit", this );
topLayout->addWidget( quitButton );
- connect( quitButton, SIGNAL( clicked() ), SLOT( close() ) );
+ connect( quitButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) );
KDirWatch *watch = KDirWatch::self();
- connect( watch, SIGNAL( dirty( const QString & ) ),
- SLOT( updateLockView() ) );
- connect( watch, SIGNAL( created( const QString & ) ),
- SLOT( updateLockView() ) );
- connect( watch, SIGNAL( deleted( const QString & ) ),
- SLOT( updateLockView() ) );
+ connect( watch, TQT_SIGNAL( dirty( const TQString & ) ),
+ TQT_SLOT( updateLockView() ) );
+ connect( watch, TQT_SIGNAL( created( const TQString & ) ),
+ TQT_SLOT( updateLockView() ) );
+ connect( watch, TQT_SIGNAL( deleted( const TQString & ) ),
+ TQT_SLOT( updateLockView() ) );
watch->addDir( Lock::locksDir() );
watch->startScan();
}
@@ -116,20 +116,20 @@ void LockWidget::updateLockView()
{
mLockView->clear();
- QDir dir( Lock::locksDir() );
+ TQDir dir( Lock::locksDir() );
- QStringList files = dir.entryList( "*.lock" );
+ TQStringList files = dir.entryList( "*.lock" );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = files.begin(); it != files.end(); ++it ) {
if ( *it == "." || *it == ".." ) continue;
- QString app;
+ TQString app;
int pid;
if ( !Lock::readLockFile( dir.filePath( *it ), pid, app ) ) {
kdWarning() << "Unable to open lock file '" << *it << "'" << endl;
} else {
- new QListViewItem( mLockView, *it, QString::number( pid ), app );
+ new TQListViewItem( mLockView, *it, TQString::number( pid ), app );
}
}
}
@@ -171,7 +171,7 @@ int main(int argc,char **argv)
KApplication app;
- QString identifier;
+ TQString identifier;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if ( args->count() == 1 ) {
diff --git a/kabc/tests/testlock.h b/kabc/tests/testlock.h
index 16c128bf1..bd59d2f5e 100644
--- a/kabc/tests/testlock.h
+++ b/kabc/tests/testlock.h
@@ -23,7 +23,7 @@
#include "lock.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
class QListView;
@@ -32,7 +32,7 @@ class KABC_EXPORT LockWidget : public QWidget
{
Q_OBJECT
public:
- LockWidget( const QString &identifier );
+ LockWidget( const TQString &identifier );
~LockWidget();
protected slots:
@@ -44,8 +44,8 @@ class KABC_EXPORT LockWidget : public QWidget
private:
KABC::Lock *mLock;
- QLabel *mStatus;
- QListView *mLockView;
+ TQLabel *mStatus;
+ TQListView *mLockView;
};
#endif
diff --git a/kabc/timezone.cpp b/kabc/timezone.cpp
index ddb28e526..59a184c6d 100644
--- a/kabc/timezone.cpp
+++ b/kabc/timezone.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include "timezone.h"
@@ -66,17 +66,17 @@ bool TimeZone::operator!=( const TimeZone &t ) const
return false;
}
-QString TimeZone::asString() const
+TQString TimeZone::asString() const
{
- return QString::number( mOffset );
+ return TQString::number( mOffset );
}
-QDataStream &KABC::operator<<( QDataStream &s, const TimeZone &zone )
+TQDataStream &KABC::operator<<( TQDataStream &s, const TimeZone &zone )
{
return s << zone.mOffset;
}
-QDataStream &KABC::operator>>( QDataStream &s, TimeZone &zone )
+TQDataStream &KABC::operator>>( TQDataStream &s, TimeZone &zone )
{
s >> zone.mOffset;
zone.mValid = true;
diff --git a/kabc/timezone.h b/kabc/timezone.h
index d3cc00d8e..aa0dac676 100644
--- a/kabc/timezone.h
+++ b/kabc/timezone.h
@@ -21,7 +21,7 @@
#ifndef KABC_TIMEZONE_H
#define KABC_TIMEZONE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -34,8 +34,8 @@ namespace KABC {
*/
class KABC_EXPORT TimeZone
{
- friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const TimeZone & );
- friend KABC_EXPORT QDataStream &operator>>( QDataStream &, TimeZone & );
+ friend KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & );
+ friend KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & );
public:
@@ -74,7 +74,7 @@ public:
/**
* Return string representation of time zone offset.
*/
- QString asString() const;
+ TQString asString() const;
private:
int mOffset; // Offset in minutes
@@ -82,8 +82,8 @@ private:
bool mValid;
};
-KABC_EXPORT QDataStream &operator<<( QDataStream &, const TimeZone & );
-KABC_EXPORT QDataStream &operator>>( QDataStream &, TimeZone & );
+KABC_EXPORT TQDataStream &operator<<( TQDataStream &, const TimeZone & );
+KABC_EXPORT TQDataStream &operator>>( TQDataStream &, TimeZone & );
}
#endif
diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp
index fa46499c3..5ad56f4fb 100644
--- a/kabc/vcard/AdrParam.cpp
+++ b/kabc/vcard/AdrParam.cpp
@@ -38,7 +38,7 @@ AdrParam::AdrParam(const AdrParam & x)
{
}
-AdrParam::AdrParam(const QCString & s)
+AdrParam::AdrParam(const TQCString & s)
: Param(s)
{
}
@@ -56,7 +56,7 @@ AdrParam::operator = (AdrParam & x)
}
AdrParam &
-AdrParam::operator = (const QCString & s)
+AdrParam::operator = (const TQCString & s)
{
Param::operator = (s);
@@ -77,7 +77,7 @@ AdrParam::operator == (AdrParam & x)
if (x.adrTypeList().count() != adrTypeList_.count())
return false;
- QStrListIterator it(x.adrTypeList_);
+ TQStrListIterator it(x.adrTypeList_);
for (; it.current(); ++it)
if (!adrTypeList_.find(it.current()))
@@ -114,7 +114,7 @@ AdrParam::_assemble()
return;
}
- QStrListIterator it(adrTypeList_);
+ TQStrListIterator it(adrTypeList_);
for (; it.current(); ++it) {
diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp
index 7ecef332a..535ba6980 100644
--- a/kabc/vcard/AdrValue.cpp
+++ b/kabc/vcard/AdrValue.cpp
@@ -45,7 +45,7 @@ AdrValue::AdrValue(const AdrValue & x)
{
}
-AdrValue::AdrValue(const QCString & s)
+AdrValue::AdrValue(const TQCString & s)
: Value(s)
{
}
@@ -68,7 +68,7 @@ AdrValue::operator = (AdrValue & x)
}
AdrValue &
-AdrValue::operator = (const QCString & s)
+AdrValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -105,7 +105,7 @@ AdrValue::_parse()
{
vDebug("AdrValue::_parse()");
- QStrList l;
+ TQStrList l;
RTokenise(strRep_, ";", l);
for (unsigned int i = 0; i < l.count(); i++) {
diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp
index 5625e0071..9e4531b02 100644
--- a/kabc/vcard/AgentParam.cpp
+++ b/kabc/vcard/AgentParam.cpp
@@ -39,7 +39,7 @@ AgentParam::AgentParam(const AgentParam & x)
{
}
-AgentParam::AgentParam(const QCString & s)
+AgentParam::AgentParam(const TQCString & s)
: Param(s)
{
}
@@ -57,7 +57,7 @@ AgentParam::operator = (AgentParam & x)
}
AgentParam &
-AgentParam::operator = (const QCString & s)
+AgentParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/AgentValue.cpp b/kabc/vcard/AgentValue.cpp
index bccde80cf..7d356f8d7 100644
--- a/kabc/vcard/AgentValue.cpp
+++ b/kabc/vcard/AgentValue.cpp
@@ -37,7 +37,7 @@ AgentValue::AgentValue(const AgentValue & x)
{
}
-AgentValue::AgentValue(const QCString & s)
+AgentValue::AgentValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ AgentValue::operator = (AgentValue & x)
}
AgentValue &
-AgentValue::operator = (const QCString & s)
+AgentValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/ClassValue.cpp b/kabc/vcard/ClassValue.cpp
index f01e5a65b..3dd65aecd 100644
--- a/kabc/vcard/ClassValue.cpp
+++ b/kabc/vcard/ClassValue.cpp
@@ -40,7 +40,7 @@ ClassValue::ClassValue(const ClassValue & x)
{
}
-ClassValue::ClassValue(const QCString & s)
+ClassValue::ClassValue(const TQCString & s)
: Value(s)
{
}
@@ -58,7 +58,7 @@ ClassValue::operator = (ClassValue & x)
}
ClassValue &
-ClassValue::operator = (const QCString & s)
+ClassValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 566eb6a79..52bcdf4f5 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -21,9 +21,9 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qcstring.h>
-#include <qstrlist.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -85,7 +85,7 @@ ContentLine::ContentLine(const ContentLine & x)
{
}
-ContentLine::ContentLine(const QCString & s)
+ContentLine::ContentLine(const TQCString & s)
: Entity(s),
value_(0),
paramType_( ParamUnknown ),
@@ -107,7 +107,7 @@ ContentLine::operator = (ContentLine & x)
}
ContentLine &
-ContentLine::operator = (const QCString & s)
+ContentLine::operator = (const TQCString & s)
{
Entity::operator = (s);
delete value_;
@@ -120,7 +120,7 @@ ContentLine::operator == (ContentLine & x)
{
x.parse();
- QPtrListIterator<Param> it(x.paramList());
+ TQPtrListIterator<Param> it(x.paramList());
if (!paramList_.find(it.current()))
return false;
@@ -140,7 +140,7 @@ ContentLine::_parse()
vDebug("parse");
// Unqote newlines
- strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" );
+ strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" );
int split = strRep_.find(':');
@@ -149,8 +149,8 @@ ContentLine::_parse()
return;
}
- QCString firstPart(strRep_.left(split));
- QCString valuePart(strRep_.mid(split + 1));
+ TQCString firstPart(strRep_.left(split));
+ TQCString valuePart(strRep_.mid(split + 1));
split = firstPart.find('.');
@@ -165,7 +165,7 @@ ContentLine::_parse()
// Now we have the group, the name and param list together and the value.
- QStrList l;
+ TQStrList l;
RTokenise(firstPart, ";", l);
@@ -187,11 +187,11 @@ ContentLine::_parse()
// For each parameter, create a new parameter of the correct type.
- QStrListIterator it(l);
+ TQStrListIterator it(l);
for (; it.current(); ++it, i++) {
- QCString str = *it;
+ TQCString str = *it;
split = str.find("=");
if (split < 0 ) {
@@ -199,13 +199,13 @@ ContentLine::_parse()
continue;
}
- QCString paraName = str.left(split);
- QCString paraValue = str.mid(split + 1);
+ TQCString paraName = str.left(split);
+ TQCString paraValue = str.mid(split + 1);
- QStrList paraValues;
+ TQStrList paraValues;
RTokenise(paraValue, ",", paraValues);
- QStrListIterator it2( paraValues );
+ TQStrListIterator it2( paraValues );
for(; it2.current(); ++it2) {
@@ -254,7 +254,7 @@ ContentLine::_assemble()
vDebug("Assemble (argl) - my name is \"" + name_ + "\"");
strRep_.truncate(0);
- QCString line;
+ TQCString line;
if (!group_.isEmpty())
line += group_ + '.';
@@ -275,7 +275,7 @@ ContentLine::_assemble()
}
// Quote newlines
- line = line.replace( QRegExp( "\n" ), "\\n" );
+ line = line.replace( TQRegExp( "\n" ), "\\n" );
// Fold lines longer than 72 chars
const int maxLen = 72;
diff --git a/kabc/vcard/DateParam.cpp b/kabc/vcard/DateParam.cpp
index 52af08997..ffaf4b3f6 100644
--- a/kabc/vcard/DateParam.cpp
+++ b/kabc/vcard/DateParam.cpp
@@ -37,7 +37,7 @@ DateParam::DateParam(const DateParam & x)
{
}
-DateParam::DateParam(const QCString & s)
+DateParam::DateParam(const TQCString & s)
: Param(s)
{
}
@@ -52,7 +52,7 @@ DateParam::operator = (DateParam & x)
}
DateParam &
-DateParam::operator = (const QCString & s)
+DateParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp
index c5c5c8554..aedfe5eba 100644
--- a/kabc/vcard/DateValue.cpp
+++ b/kabc/vcard/DateValue.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -65,7 +65,7 @@ DateValue::DateValue(
assembled_ = false;
}
-DateValue::DateValue(const QDate & d)
+DateValue::DateValue(const TQDate & d)
: Value (),
year_ (d.year()),
month_ (d.month()),
@@ -76,7 +76,7 @@ DateValue::DateValue(const QDate & d)
assembled_ = false;
}
-DateValue::DateValue(const QDateTime & d)
+DateValue::DateValue(const TQDateTime & d)
: Value (),
year_ (d.date().year()),
month_ (d.date().month()),
@@ -105,7 +105,7 @@ DateValue::DateValue(const DateValue & x)
hasTime_ = x.hasTime_;
}
-DateValue::DateValue(const QCString & s)
+DateValue::DateValue(const TQCString & s)
: Value(s)
{
}
@@ -120,7 +120,7 @@ DateValue::operator = (DateValue & x)
}
DateValue &
-DateValue::operator = (const QCString & s)
+DateValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -154,8 +154,8 @@ DateValue::_parse()
int timeSep = strRep_.find('T');
- QCString dateStr;
- QCString timeStr;
+ TQCString dateStr;
+ TQCString timeStr;
if (timeSep == -1) {
@@ -173,7 +173,7 @@ DateValue::_parse()
/////////////////////////////////////////////////////////////// DATE
- dateStr.replace(QRegExp("-"), "");
+ dateStr.replace(TQRegExp("-"), "");
kdDebug(5710) << "dateStr: " << dateStr << endl;
@@ -196,7 +196,7 @@ DateValue::_parse()
if (zoneSep != -1 && timeStr.length() - zoneSep > 3) {
- QCString zoneStr(timeStr.mid(zoneSep + 1));
+ TQCString zoneStr(timeStr.mid(zoneSep + 1));
vDebug("zoneStr == " + zoneStr);
zonePositive_ = (zoneStr[0] == '+');
@@ -211,13 +211,13 @@ DateValue::_parse()
int secFracSep = timeStr.findRev(',');
if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors.
- QCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep);
+ TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep);
secFrac_ = quirkafleeg.toDouble();
}
/////////////////////////////////////////////////////////////// HMS
- timeStr.replace(QRegExp(":"), "");
+ timeStr.replace(TQRegExp(":"), "");
hour_ = timeStr.left(2).toInt();
minute_ = timeStr.mid(2, 2).toInt();
@@ -229,9 +229,9 @@ DateValue::_assemble()
{
vDebug("DateValue::_assemble");
- QCString year;
- QCString month;
- QCString day;
+ TQCString year;
+ TQCString month;
+ TQCString day;
year.setNum( year_ );
month.setNum( month_ );
@@ -243,9 +243,9 @@ DateValue::_assemble()
strRep_ = year + '-' + month + '-' + day;
if ( hasTime_ ) {
- QCString hour;
- QCString minute;
- QCString second;
+ TQCString hour;
+ TQCString minute;
+ TQCString second;
hour.setNum( hour_ );
minute.setNum( minute_ );
@@ -402,7 +402,7 @@ DateValue::setZoneMinute(unsigned int i)
DateValue::qdate()
{
parse();
- QDate d(year_, month_, day_);
+ TQDate d(year_, month_, day_);
return d;
}
@@ -410,7 +410,7 @@ DateValue::qdate()
DateValue::qtime()
{
parse();
- QTime t(hour_, minute_, second_);
+ TQTime t(hour_, minute_, second_);
// t.setMs(1 / secFrac_);
return t;
}
@@ -419,7 +419,7 @@ DateValue::qtime()
DateValue::qdt()
{
parse();
- QDateTime dt;
+ TQDateTime dt;
dt.setDate(qdate());
dt.setTime(qtime());
return dt;
diff --git a/kabc/vcard/EmailParam.cpp b/kabc/vcard/EmailParam.cpp
index 8c87477bc..9027494ad 100644
--- a/kabc/vcard/EmailParam.cpp
+++ b/kabc/vcard/EmailParam.cpp
@@ -40,7 +40,7 @@ EmailParam::EmailParam(const EmailParam & x)
{
}
-EmailParam::EmailParam(const QCString & s)
+EmailParam::EmailParam(const TQCString & s)
: Param(s)
{
}
@@ -58,7 +58,7 @@ EmailParam::operator = (EmailParam & x)
}
EmailParam &
-EmailParam::operator = (const QCString & s)
+EmailParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp
index b7d09e08e..83ee8d40d 100644
--- a/kabc/vcard/Entity.cpp
+++ b/kabc/vcard/Entity.cpp
@@ -40,7 +40,7 @@ Entity::Entity(const Entity & e)
// empty
}
-Entity::Entity(const QCString & s)
+Entity::Entity(const TQCString & s)
: strRep_ (s),
parsed_ (false),
assembled_ (true)
@@ -61,7 +61,7 @@ Entity::operator = (const Entity & e)
}
Entity &
-Entity::operator = (const QCString & s)
+Entity::operator = (const TQCString & s)
{
strRep_ = s;
parsed_ = false;
@@ -83,13 +83,13 @@ Entity::operator != (Entity & e)
}
bool
-Entity::operator == (const QCString & s)
+Entity::operator == (const TQCString & s)
{
return asString() == s;
}
bool
-Entity::operator != (const QCString & s)
+Entity::operator != (const TQCString & s)
{
return !(*this == s);
}
diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp
index 3ed4a67c5..4d8d167a0 100644
--- a/kabc/vcard/Enum.cpp
+++ b/kabc/vcard/Enum.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qcstring.h>
+#include <tqcstring.h>
#include <ctype.h>
#include <VCardEnum.h>
@@ -236,7 +236,7 @@ VCARD::EntityTypeToParamName(EntityType e)
}
EntityType
-VCARD::EntityNameToEntityType(const QCString & s)
+VCARD::EntityNameToEntityType(const TQCString & s)
{
if (s.isEmpty()) return EntityUnknown;
diff --git a/kabc/vcard/FloatValue.cpp b/kabc/vcard/FloatValue.cpp
index 15bb664b0..ac1f2c6b5 100644
--- a/kabc/vcard/FloatValue.cpp
+++ b/kabc/vcard/FloatValue.cpp
@@ -45,7 +45,7 @@ FloatValue::FloatValue(const FloatValue & x)
value_ = x.value_;
}
-FloatValue::FloatValue(const QCString & s)
+FloatValue::FloatValue(const TQCString & s)
: Value(s)
{
}
@@ -63,7 +63,7 @@ FloatValue::operator = (FloatValue & x)
}
FloatValue &
-FloatValue::operator = (const QCString & s)
+FloatValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -101,7 +101,7 @@ FloatValue::_parse()
void
FloatValue::_assemble()
{
- strRep_ = QCString().setNum(value_);
+ strRep_ = TQCString().setNum(value_);
}
float
diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp
index 848890a2c..2bac28c1e 100644
--- a/kabc/vcard/GeoValue.cpp
+++ b/kabc/vcard/GeoValue.cpp
@@ -36,7 +36,7 @@ GeoValue::GeoValue(const GeoValue & x)
{
}
-GeoValue::GeoValue(const QCString & s)
+GeoValue::GeoValue(const TQCString & s)
: Value(s)
{
}
@@ -54,7 +54,7 @@ GeoValue::operator = (GeoValue & x)
}
GeoValue &
-GeoValue::operator = (const QCString & s)
+GeoValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/ImageParam.cpp b/kabc/vcard/ImageParam.cpp
index c9cf6fdc7..69611eeab 100644
--- a/kabc/vcard/ImageParam.cpp
+++ b/kabc/vcard/ImageParam.cpp
@@ -37,7 +37,7 @@ ImageParam::ImageParam(const ImageParam & x)
{
}
-ImageParam::ImageParam(const QCString & s)
+ImageParam::ImageParam(const TQCString & s)
: Param(s)
{
}
@@ -52,7 +52,7 @@ ImageParam::operator = (ImageParam & x)
}
ImageParam &
-ImageParam::operator = (const QCString & s)
+ImageParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/ImageValue.cpp b/kabc/vcard/ImageValue.cpp
index 4630fac85..5d8d29bb7 100644
--- a/kabc/vcard/ImageValue.cpp
+++ b/kabc/vcard/ImageValue.cpp
@@ -37,7 +37,7 @@ ImageValue::ImageValue(const ImageValue & x)
{
}
-ImageValue::ImageValue(const QCString & s)
+ImageValue::ImageValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ ImageValue::operator = (ImageValue & x)
}
ImageValue &
-ImageValue::operator = (const QCString & s)
+ImageValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/ImgValue.cpp b/kabc/vcard/ImgValue.cpp
index 7b961f82e..42889acd8 100644
--- a/kabc/vcard/ImgValue.cpp
+++ b/kabc/vcard/ImgValue.cpp
@@ -37,7 +37,7 @@ ImgValue::ImgValue(const ImgValue & x)
{
}
-ImgValue::ImgValue(const QCString & s)
+ImgValue::ImgValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ ImgValue::operator = (ImgValue & x)
}
ImgValue &
-ImgValue::operator = (const QCString & s)
+ImgValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp
index edf180460..6ef46c98f 100644
--- a/kabc/vcard/LangValue.cpp
+++ b/kabc/vcard/LangValue.cpp
@@ -39,7 +39,7 @@ LangValue::LangValue(const LangValue & x)
{
}
-LangValue::LangValue(const QCString & s)
+LangValue::LangValue(const TQCString & s)
: Value(s)
{
}
@@ -54,7 +54,7 @@ LangValue::operator = (LangValue & x)
}
LangValue &
-LangValue::operator = (const QCString & s)
+LangValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -74,7 +74,7 @@ LangValue::~LangValue()
void
LangValue::_parse()
{
- QStrList l;
+ TQStrList l;
RTokenise(strRep_, "-", l);
if (l.count() == 0) return;
@@ -91,10 +91,10 @@ LangValue::_assemble()
{
strRep_ = primary_;
- QStrListIterator it(subtags_);
+ TQStrListIterator it(subtags_);
for (; it.current(); ++it)
- strRep_ += QCString('-') + it.current();
+ strRep_ += TQCString('-') + it.current();
}
QCString
@@ -112,14 +112,14 @@ LangValue::subtags()
}
void
-LangValue::setPrimary(const QCString & s)
+LangValue::setPrimary(const TQCString & s)
{
parse();
primary_ = s;
}
void
-LangValue::setSubTags(const QStrList & l)
+LangValue::setSubTags(const TQStrList & l)
{
parse();
subtags_ = l;
diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp
index cdec621c3..e63268134 100644
--- a/kabc/vcard/NValue.cpp
+++ b/kabc/vcard/NValue.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <VCardRToken.h>
#include <VCardNValue.h>
@@ -46,7 +46,7 @@ NValue::NValue(const NValue & x)
{
}
-NValue::NValue(const QCString & s)
+NValue::NValue(const TQCString & s)
: Value(s)
{
vDebug("ctor");
@@ -68,7 +68,7 @@ NValue::operator = (NValue & x)
}
NValue &
-NValue::operator = (const QCString & s)
+NValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -100,7 +100,7 @@ NValue::clone()
void
NValue::_parse()
{
- QStrList l;
+ TQStrList l;
RTokenise(strRep_, ";", l);
for (unsigned int i = 0; i < l.count(); i++) {
diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp
index c3134c835..cfd9c6f73 100644
--- a/kabc/vcard/OrgValue.cpp
+++ b/kabc/vcard/OrgValue.cpp
@@ -39,7 +39,7 @@ OrgValue::OrgValue(const OrgValue & x)
{
}
-OrgValue::OrgValue(const QCString & s)
+OrgValue::OrgValue(const TQCString & s)
: Value(s)
{
}
@@ -54,7 +54,7 @@ OrgValue::operator = (OrgValue & x)
}
OrgValue &
-OrgValue::operator = (const QCString & s)
+OrgValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -82,7 +82,7 @@ OrgValue::_assemble()
{
bool first(true);
- QStrListIterator it(valueList_);
+ TQStrListIterator it(valueList_);
for (; it.current(); ++it) {
if (!first) strRep_ += ';';
diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp
index c51361328..d631f2319 100644
--- a/kabc/vcard/Param.cpp
+++ b/kabc/vcard/Param.cpp
@@ -43,7 +43,7 @@ Param::Param(const Param & x)
{
}
-Param::Param(const QCString & s)
+Param::Param(const TQCString & s)
: Entity(s),
name_(""),
value_("")
@@ -63,7 +63,7 @@ Param::operator = (Param & x)
}
Param &
-Param::operator = (const QCString & s)
+Param::operator = (const TQCString & s)
{
Entity::operator = (s);
return *this;
@@ -91,7 +91,7 @@ Param::_assemble()
strRep_ = name_ + "=" + value_;
}
-Param::Param(const QCString &name, const QCString &value)
+Param::Param(const TQCString &name, const TQCString &value)
: Entity(),
name_(name),
value_(value)
@@ -101,7 +101,7 @@ Param::Param(const QCString &name, const QCString &value)
}
void
-Param::setName(const QCString & name)
+Param::setName(const TQCString & name)
{
name_ = name;
@@ -109,7 +109,7 @@ Param::setName(const QCString & name)
}
void
-Param::setValue(const QCString & value)
+Param::setValue(const TQCString & value)
{
value_ = value;
diff --git a/kabc/vcard/PhoneNumberValue.cpp b/kabc/vcard/PhoneNumberValue.cpp
index 17b1400d3..02a1266fe 100644
--- a/kabc/vcard/PhoneNumberValue.cpp
+++ b/kabc/vcard/PhoneNumberValue.cpp
@@ -37,7 +37,7 @@ PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x)
{
}
-PhoneNumberValue::PhoneNumberValue(const QCString & s)
+PhoneNumberValue::PhoneNumberValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ PhoneNumberValue::operator = (PhoneNumberValue & x)
}
PhoneNumberValue &
-PhoneNumberValue::operator = (const QCString & s)
+PhoneNumberValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/RToken.cpp b/kabc/vcard/RToken.cpp
index 2a85820bd..b0e251a87 100644
--- a/kabc/vcard/RToken.cpp
+++ b/kabc/vcard/RToken.cpp
@@ -24,14 +24,14 @@
#include <string.h>
#include <stddef.h>
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
namespace VCARD
{
Q_UINT32
-RTokenise(const char * str, const char * delim, QStrList & l)
+RTokenise(const char * str, const char * delim, TQStrList & l)
{
// FIXME no stderr !
l.clear();
diff --git a/kabc/vcard/SoundValue.cpp b/kabc/vcard/SoundValue.cpp
index 81040d118..5be75d358 100644
--- a/kabc/vcard/SoundValue.cpp
+++ b/kabc/vcard/SoundValue.cpp
@@ -37,7 +37,7 @@ SoundValue::SoundValue(const SoundValue & x)
{
}
-SoundValue::SoundValue(const QCString & s)
+SoundValue::SoundValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ SoundValue::operator = (SoundValue & x)
}
SoundValue &
-SoundValue::operator = (const QCString & s)
+SoundValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp
index cd51cbdaa..d66d87498 100644
--- a/kabc/vcard/SourceParam.cpp
+++ b/kabc/vcard/SourceParam.cpp
@@ -41,7 +41,7 @@ SourceParam::SourceParam(const SourceParam & x)
{
}
-SourceParam::SourceParam(const QCString & s)
+SourceParam::SourceParam(const TQCString & s)
: Param(s),
type_(SourceParam::TypeUnknown)
{
@@ -60,7 +60,7 @@ SourceParam::operator = (SourceParam & x)
}
SourceParam &
-SourceParam::operator = (const QCString & s)
+SourceParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/TelParam.cpp b/kabc/vcard/TelParam.cpp
index 9d9fe4d7f..072b1dc81 100644
--- a/kabc/vcard/TelParam.cpp
+++ b/kabc/vcard/TelParam.cpp
@@ -37,7 +37,7 @@ TelParam::TelParam(const TelParam & x)
{
}
-TelParam::TelParam(const QCString & s)
+TelParam::TelParam(const TQCString & s)
: Param(s)
{
}
@@ -52,7 +52,7 @@ TelParam::operator = (TelParam & x)
}
TelParam &
-TelParam::operator = (const QCString & s)
+TelParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/TelValue.cpp b/kabc/vcard/TelValue.cpp
index 349f99af9..c9c1b85aa 100644
--- a/kabc/vcard/TelValue.cpp
+++ b/kabc/vcard/TelValue.cpp
@@ -37,7 +37,7 @@ TelValue::TelValue(const TelValue & x)
{
}
-TelValue::TelValue(const QCString & s)
+TelValue::TelValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ TelValue::operator = (TelValue & x)
}
TelValue &
-TelValue::operator = (const QCString & s)
+TelValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/TextBinParam.cpp b/kabc/vcard/TextBinParam.cpp
index 66f29467d..4e0ebadff 100644
--- a/kabc/vcard/TextBinParam.cpp
+++ b/kabc/vcard/TextBinParam.cpp
@@ -37,7 +37,7 @@ TextBinParam::TextBinParam(const TextBinParam & x)
{
}
-TextBinParam::TextBinParam(const QCString & s)
+TextBinParam::TextBinParam(const TQCString & s)
: Param(s)
{
}
@@ -52,7 +52,7 @@ TextBinParam::operator = (TextBinParam & x)
}
TextBinParam &
-TextBinParam::operator = (const QCString & s)
+TextBinParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/TextBinValue.cpp b/kabc/vcard/TextBinValue.cpp
index c58400967..e7da0b7c6 100644
--- a/kabc/vcard/TextBinValue.cpp
+++ b/kabc/vcard/TextBinValue.cpp
@@ -41,7 +41,7 @@ TextBinValue::TextBinValue(const TextBinValue & x)
mUrl_ = x.mUrl_;
}
-TextBinValue::TextBinValue(const QCString & s)
+TextBinValue::TextBinValue(const TQCString & s)
: Value(s)
{
}
@@ -60,7 +60,7 @@ TextBinValue::operator = (TextBinValue & x)
}
TextBinValue &
-TextBinValue::operator = (const QCString & s)
+TextBinValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp
index c4ac1e38b..e29a8dcc2 100644
--- a/kabc/vcard/TextListValue.cpp
+++ b/kabc/vcard/TextListValue.cpp
@@ -39,7 +39,7 @@ TextListValue::TextListValue(const TextListValue & x)
{
}
-TextListValue::TextListValue(const QCString & s)
+TextListValue::TextListValue(const TQCString & s)
: Value(s)
{
}
@@ -54,7 +54,7 @@ TextListValue::operator = (TextListValue & x)
}
TextListValue &
-TextListValue::operator = (const QCString & s)
+TextListValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -82,7 +82,7 @@ TextListValue::_assemble()
{
bool first(true);
- QStrListIterator it(valueList_);
+ TQStrListIterator it(valueList_);
for (; it.current(); ++it) {
if (!first) strRep_ += ';';
diff --git a/kabc/vcard/TextParam.cpp b/kabc/vcard/TextParam.cpp
index 7c6870093..b353483ec 100644
--- a/kabc/vcard/TextParam.cpp
+++ b/kabc/vcard/TextParam.cpp
@@ -37,7 +37,7 @@ TextParam::TextParam(const TextParam & x)
{
}
-TextParam::TextParam(const QCString & s)
+TextParam::TextParam(const TQCString & s)
: Param(s)
{
}
@@ -52,7 +52,7 @@ TextParam::operator = (TextParam & x)
}
TextParam &
-TextParam::operator = (const QCString & s)
+TextParam::operator = (const TQCString & s)
{
Param::operator = (s);
return *this;
diff --git a/kabc/vcard/TextValue.cpp b/kabc/vcard/TextValue.cpp
index 9708398ad..cf8e0673f 100644
--- a/kabc/vcard/TextValue.cpp
+++ b/kabc/vcard/TextValue.cpp
@@ -37,7 +37,7 @@ TextValue::TextValue(const TextValue & x)
{
}
-TextValue::TextValue(const QCString & s)
+TextValue::TextValue(const TQCString & s)
: Value(s)
{
}
@@ -52,7 +52,7 @@ TextValue::operator = (TextValue & x)
}
TextValue &
-TextValue::operator = (const QCString & s)
+TextValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp
index c1d1022e8..98f75cb8e 100644
--- a/kabc/vcard/URIValue.cpp
+++ b/kabc/vcard/URIValue.cpp
@@ -32,7 +32,7 @@ URIValue::URIValue()
{
}
-URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart)
+URIValue::URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart)
: Value(),
scheme_ (scheme),
schemeSpecificPart_ (schemeSpecificPart)
@@ -47,7 +47,7 @@ URIValue::URIValue(const URIValue & x)
{
}
-URIValue::URIValue(const QCString & s)
+URIValue::URIValue(const TQCString & s)
: Value(s)
{
}
@@ -65,7 +65,7 @@ URIValue::operator = (URIValue & x)
}
URIValue &
-URIValue::operator = (const QCString & s)
+URIValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
@@ -118,14 +118,14 @@ URIValue::schemeSpecificPart()
}
void
-URIValue::setScheme(const QCString & s)
+URIValue::setScheme(const TQCString & s)
{
parse();
scheme_ = s;
}
void
-URIValue::setSchemeSpecificPart(const QCString & s)
+URIValue::setSchemeSpecificPart(const TQCString & s)
{
parse();
schemeSpecificPart_ = s;
diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp
index 374306c5f..30473661f 100644
--- a/kabc/vcard/UTCValue.cpp
+++ b/kabc/vcard/UTCValue.cpp
@@ -38,7 +38,7 @@ UTCValue::UTCValue(const UTCValue & x)
{
}
-UTCValue::UTCValue(const QCString & s)
+UTCValue::UTCValue(const TQCString & s)
: Value(s)
{
}
@@ -57,7 +57,7 @@ UTCValue::operator = (UTCValue & x)
}
UTCValue &
-UTCValue::operator = (const QCString & s)
+UTCValue::operator = (const TQCString & s)
{
Value::operator = (s);
return *this;
diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp
index 8a65ecfd4..50c25da59 100644
--- a/kabc/vcard/VCard.cpp
+++ b/kabc/vcard/VCard.cpp
@@ -21,8 +21,8 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
#include <VCardEntity.h>
#include <VCardVCard.h>
@@ -46,7 +46,7 @@ VCard::VCard(const VCard & x)
{
}
-VCard::VCard(const QCString & s)
+VCard::VCard(const TQCString & s)
: Entity(s)
{
}
@@ -64,7 +64,7 @@ VCard::operator = (VCard & x)
}
VCard &
-VCard::operator = (const QCString & s)
+VCard::operator = (const TQCString & s)
{
Entity::operator = (s);
return *this;
@@ -85,7 +85,7 @@ VCard::~VCard()
VCard::_parse()
{
vDebug("parse() called");
- QStrList l;
+ TQStrList l;
RTokenise(strRep_, "\r\n", l);
@@ -95,16 +95,16 @@ VCard::_parse()
}
// Get the first line
- QCString beginLine = QCString(l.at(0)).stripWhiteSpace();
+ TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace();
vDebug("Begin line == \"" + beginLine + "\"");
// Remove extra blank lines
- while (QCString(l.last()).isEmpty())
+ while (TQCString(l.last()).isEmpty())
l.remove(l.last());
// Now we know this is the last line
- QCString endLine = l.last();
+ TQCString endLine = l.last();
// Trash the first and last lines as we have seen them.
l.remove(0u);
@@ -120,8 +120,8 @@ VCard::_parse()
return;
}
- QCString firstPart(beginLine.left(split));
- QCString valuePart(beginLine.mid(split + 1));
+ TQCString firstPart(beginLine.left(split));
+ TQCString valuePart(beginLine.mid(split + 1));
split = firstPart.find('.');
@@ -147,11 +147,11 @@ VCard::_parse()
// Handle folded lines.
- QStrList refolded;
+ TQStrList refolded;
- QStrListIterator it(l);
+ TQStrListIterator it(l);
- QCString cur;
+ TQCString cur;
for (; it.current(); ++it) {
@@ -173,11 +173,11 @@ VCard::_parse()
refolded.append(cur);
}
- QStrListIterator it2(refolded);
+ TQStrListIterator it2(refolded);
for (; it2.current(); ++it2) {
- vDebug("New contentline using \"" + QCString(it2.current()) + "\"");
+ vDebug("New contentline using \"" + TQCString(it2.current()) + "\"");
ContentLine * cl = new ContentLine(it2.current());
cl->parse();
@@ -217,7 +217,7 @@ VCard::_assemble()
strRep_ = "BEGIN:VCARD\r\n";
strRep_ += "VERSION:3.0\r\n";
- QPtrListIterator<ContentLine> it(contentLineList_);
+ TQPtrListIterator<ContentLine> it(contentLineList_);
for (; it.current(); ++it)
strRep_ += it.current()->asString() + "\r\n";
@@ -233,7 +233,7 @@ VCard::has(EntityType t)
}
bool
-VCard::has(const QCString & s)
+VCard::has(const TQCString & s)
{
parse();
return contentLine(s) == 0 ? false : true;
@@ -248,7 +248,7 @@ VCard::add(const ContentLine & cl)
}
void
-VCard::add(const QCString & s)
+VCard::add(const TQCString & s)
{
parse();
ContentLine * c = new ContentLine(s);
@@ -259,7 +259,7 @@ VCard::add(const QCString & s)
VCard::contentLine(EntityType t)
{
parse();
- QPtrListIterator<ContentLine> it(contentLineList_);
+ TQPtrListIterator<ContentLine> it(contentLineList_);
for (; it.current(); ++it)
if (it.current()->entityType() == t)
@@ -269,10 +269,10 @@ VCard::contentLine(EntityType t)
}
ContentLine *
-VCard::contentLine(const QCString & s)
+VCard::contentLine(const TQCString & s)
{
parse();
- QPtrListIterator<ContentLine> it(contentLineList_);
+ TQPtrListIterator<ContentLine> it(contentLineList_);
for (; it.current(); ++it)
if (it.current()->entityType() == EntityNameToEntityType(s))
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp
index 0c21e2f70..1f8cea5b1 100644
--- a/kabc/vcard/VCardEntity.cpp
+++ b/kabc/vcard/VCardEntity.cpp
@@ -21,7 +21,7 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <VCardDefines.h>
#include <VCardVCardEntity.h>
@@ -38,7 +38,7 @@ VCardEntity::VCardEntity(const VCardEntity & x)
{
}
-VCardEntity::VCardEntity(const QCString & s)
+VCardEntity::VCardEntity(const TQCString & s)
: Entity(s)
{
}
@@ -53,7 +53,7 @@ VCardEntity::operator = (VCardEntity & x)
}
VCardEntity &
-VCardEntity::operator = (const QCString & s)
+VCardEntity::operator = (const TQCString & s)
{
Entity::operator = (s);
return *this;
@@ -74,15 +74,15 @@ VCardEntity::~VCardEntity()
VCardEntity::_parse()
{
vDebug("parse");
- QCString s(strRep_);
+ TQCString s(strRep_);
- int i = s.find(QRegExp("BEGIN:VCARD", false));
+ int i = s.find(TQRegExp("BEGIN:VCARD", false));
while (i != -1) {
- i = s.find(QRegExp("BEGIN:VCARD", false), 11);
+ i = s.find(TQRegExp("BEGIN:VCARD", false), 11);
- QCString cardStr(s.left(i));
+ TQCString cardStr(s.left(i));
VCard * v = new VCard(cardStr);
diff --git a/kabc/vcard/Value.cpp b/kabc/vcard/Value.cpp
index 33b7a509e..c95c0712b 100644
--- a/kabc/vcard/Value.cpp
+++ b/kabc/vcard/Value.cpp
@@ -36,7 +36,7 @@ Value::Value(const Value & x)
{
}
-Value::Value(const QCString & s)
+Value::Value(const TQCString & s)
: Entity(s)
{
}
@@ -51,7 +51,7 @@ Value::operator = (Value & x)
}
Value &
-Value::operator = (const QCString & s)
+Value::operator = (const TQCString & s)
{
Entity::operator = (s);
return *this;
diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h
index 783d79129..ed5497deb 100644
--- a/kabc/vcard/include/VCardAdrParam.h
+++ b/kabc/vcard/include/VCardAdrParam.h
@@ -24,8 +24,8 @@
#ifndef ADRPARAM_H
#define ADRPARAM_H
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
#include <VCardParam.h>
@@ -37,16 +37,16 @@ class KVCARD_EXPORT AdrParam : public Param
#include "AdrParam-generated.h"
- QStrList adrTypeList()
+ TQStrList adrTypeList()
{ parse(); return adrTypeList_; }
- QCString textParam()
+ TQCString textParam()
{ parse(); return textParam_; }
- void setAdrTypeList(const QStrList & l)
+ void setAdrTypeList(const TQStrList & l)
{ adrTypeList_ = l; assembled_ = false; }
- void setTextParam(const QCString & s)
+ void setTextParam(const TQCString & s)
{ textParam_ = s; assembled_ = false; }
enum AdrType {
diff --git a/kabc/vcard/include/VCardAdrValue.h b/kabc/vcard/include/VCardAdrValue.h
index e17ee347f..94ed93aee 100644
--- a/kabc/vcard/include/VCardAdrValue.h
+++ b/kabc/vcard/include/VCardAdrValue.h
@@ -24,7 +24,7 @@
#ifndef ADRVALUE_H
#define ADRVALUE_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <VCardValue.h>
namespace VCARD
@@ -37,44 +37,44 @@ class KVCARD_EXPORT AdrValue : public Value
AdrValue *clone();
- void setPOBox(const QCString & s)
+ void setPOBox(const TQCString & s)
{ poBox_ = s; assembled_ = false; }
- void setExtAddress(const QCString & s)
+ void setExtAddress(const TQCString & s)
{ extAddress_ = s; assembled_ = false; }
- void setStreet(const QCString & s)
+ void setStreet(const TQCString & s)
{ street_ = s; assembled_ = false; }
- void setLocality(const QCString & s)
+ void setLocality(const TQCString & s)
{ locality_ = s; assembled_ = false; }
- void setRegion(const QCString & s)
+ void setRegion(const TQCString & s)
{ region_ = s; assembled_ = false; }
- void setPostCode(const QCString & s)
+ void setPostCode(const TQCString & s)
{ postCode_ = s; assembled_ = false; }
- void setCountryName(const QCString & s)
+ void setCountryName(const TQCString & s)
{ countryName_ = s; assembled_ = false; }
- QCString poBox() { parse(); return poBox_; }
- QCString extAddress() { parse(); return extAddress_; }
- QCString street() { parse(); return street_; }
- QCString locality() { parse(); return locality_; }
- QCString region() { parse(); return region_; }
- QCString postCode() { parse(); return postCode_; }
- QCString countryName() { parse(); return countryName_; }
+ TQCString poBox() { parse(); return poBox_; }
+ TQCString extAddress() { parse(); return extAddress_; }
+ TQCString street() { parse(); return street_; }
+ TQCString locality() { parse(); return locality_; }
+ TQCString region() { parse(); return region_; }
+ TQCString postCode() { parse(); return postCode_; }
+ TQCString countryName() { parse(); return countryName_; }
private:
- QCString poBox_;
- QCString extAddress_;
- QCString street_;
- QCString locality_;
- QCString region_;
- QCString postCode_;
- QCString countryName_;
+ TQCString poBox_;
+ TQCString extAddress_;
+ TQCString street_;
+ TQCString locality_;
+ TQCString region_;
+ TQCString postCode_;
+ TQCString countryName_;
};
}
diff --git a/kabc/vcard/include/VCardAgentParam.h b/kabc/vcard/include/VCardAgentParam.h
index aed1ade19..90c3bd528 100644
--- a/kabc/vcard/include/VCardAgentParam.h
+++ b/kabc/vcard/include/VCardAgentParam.h
@@ -24,7 +24,7 @@
#ifndef AGENTPARAM_H
#define AGENTPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
#include <VCardURIValue.h>
@@ -46,7 +46,7 @@ class KVCARD_EXPORT AgentParam : public Param
void setRefer(bool b)
{ refer_ = b; assembled_ = false; }
- void setURI(const QCString & s)
+ void setURI(const TQCString & s)
{ uri_ = s; assembled_ = false; }
private:
diff --git a/kabc/vcard/include/VCardAgentValue.h b/kabc/vcard/include/VCardAgentValue.h
index 0d103be41..dd68145c9 100644
--- a/kabc/vcard/include/VCardAgentValue.h
+++ b/kabc/vcard/include/VCardAgentValue.h
@@ -24,7 +24,7 @@
#ifndef AGENTVALUE_H
#define AGENTVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardClassValue.h b/kabc/vcard/include/VCardClassValue.h
index 23e9b6d28..5de79167b 100644
--- a/kabc/vcard/include/VCardClassValue.h
+++ b/kabc/vcard/include/VCardClassValue.h
@@ -24,7 +24,7 @@
#ifndef CLASSVALUE_H
#define CLASSVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h
index 6cb26d7bd..20d5c5033 100644
--- a/kabc/vcard/include/VCardContentLine.h
+++ b/kabc/vcard/include/VCardContentLine.h
@@ -24,7 +24,7 @@
#ifndef CONTENTLINE_H
#define CONTENTLINE_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "VCardEnum.h"
#include "VCardEntity.h"
@@ -47,10 +47,10 @@ class KVCARD_EXPORT ContentLine : public Entity
ValueType valueType() { parse(); return valueType_; }
EntityType entityType() { parse(); return entityType_; }
- void setGroup (const QCString & s)
+ void setGroup (const TQCString & s)
{ group_ = s; assembled_ = false; }
- void setName (const QCString & s)
+ void setName (const TQCString & s)
{ name_ = s; assembled_ = false; }
void setValue (Value *s)
@@ -65,7 +65,7 @@ class KVCARD_EXPORT ContentLine : public Entity
QCString group_;
QCString name_;
- QPtrList<Param> paramList_;
+ TQPtrList<Param> paramList_;
Value * value_;
ParamType paramType_;
diff --git a/kabc/vcard/include/VCardDateParam.h b/kabc/vcard/include/VCardDateParam.h
index 32179be43..410eae6b7 100644
--- a/kabc/vcard/include/VCardDateParam.h
+++ b/kabc/vcard/include/VCardDateParam.h
@@ -24,7 +24,7 @@
#ifndef DATEPARAM_H
#define DATEPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
diff --git a/kabc/vcard/include/VCardDateValue.h b/kabc/vcard/include/VCardDateValue.h
index f97b21113..4f2e2fe7f 100644
--- a/kabc/vcard/include/VCardDateValue.h
+++ b/kabc/vcard/include/VCardDateValue.h
@@ -24,8 +24,8 @@
#ifndef DATEVALUE_H
#define DATEVALUE_H
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
#include <VCardValue.h>
@@ -48,8 +48,8 @@ class KVCARD_EXPORT DateValue : public Value
unsigned int zoneHour = 0,
unsigned int zoneMinute = 0);
- DateValue(const QDate &);
- DateValue(const QDateTime &);
+ DateValue(const TQDate &);
+ DateValue(const TQDateTime &);
DateValue *clone();
@@ -77,9 +77,9 @@ class KVCARD_EXPORT DateValue : public Value
void setZoneHour (unsigned int);
void setZoneMinute (unsigned int);
- QDate qdate();
- QTime qtime();
- QDateTime qdt();
+ TQDate qdate();
+ TQTime qtime();
+ TQDateTime qdt();
private:
diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h
index dd38ae28b..e778bc24f 100644
--- a/kabc/vcard/include/VCardDefines.h
+++ b/kabc/vcard/include/VCardDefines.h
@@ -34,14 +34,14 @@
#if 0
#ifndef NDEBUG
-# include <qcstring.h>
+# include <tqcstring.h>
# include <iostream>
# ifdef __GNUG__
# define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \
- << __LINE__ << "): " << QCString((a)).data() << endl;
+ << __LINE__ << "): " << TQCString((a)).data() << endl;
# else
# define vDebug(a) cerr << className() << ": " \
- << QCString((a)).data() << endl;
+ << TQCString((a)).data() << endl;
# endif
#else
# define vDebug(a)
diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h
index c879fac49..55086faec 100644
--- a/kabc/vcard/include/VCardEmailParam.h
+++ b/kabc/vcard/include/VCardEmailParam.h
@@ -24,7 +24,7 @@
#ifndef EMAILPARAM_H
#define EMAILPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
@@ -39,7 +39,7 @@ class KVCARD_EXPORT EmailParam : public Param
QCString emailType() { parse(); return emailType_; }
bool pref() { parse(); return pref_; }
- void setEmailType(const QCString & s)
+ void setEmailType(const TQCString & s)
{ emailType_ = s; assembled_ = false; }
void setPref(bool b)
diff --git a/kabc/vcard/include/VCardEntity.h b/kabc/vcard/include/VCardEntity.h
index ed503f896..ab17d6b8c 100644
--- a/kabc/vcard/include/VCardEntity.h
+++ b/kabc/vcard/include/VCardEntity.h
@@ -24,7 +24,7 @@
#ifndef ENTITY_H
#define ENTITY_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
namespace VCARD
@@ -36,19 +36,19 @@ class KVCARD_EXPORT Entity
Entity();
Entity(const Entity & e);
- Entity(const QCString & s);
+ Entity(const TQCString & s);
virtual Entity & operator = (const Entity & e);
- virtual Entity & operator = (const QCString & s);
+ virtual Entity & operator = (const TQCString & s);
virtual bool operator == (Entity & e);
virtual bool operator != (Entity & e);
- virtual bool operator == (const QCString & s);
- virtual bool operator != (const QCString & s);
+ virtual bool operator == (const TQCString & s);
+ virtual bool operator != (const TQCString & s);
virtual ~Entity();
- QCString asString();
+ TQCString asString();
virtual void parse();
virtual void assemble();
@@ -58,7 +58,7 @@ class KVCARD_EXPORT Entity
protected:
- QCString strRep_;
+ TQCString strRep_;
bool parsed_;
bool assembled_;
};
diff --git a/kabc/vcard/include/VCardEnum.h b/kabc/vcard/include/VCardEnum.h
index cd55632f6..5f7902bac 100644
--- a/kabc/vcard/include/VCardEnum.h
+++ b/kabc/vcard/include/VCardEnum.h
@@ -24,14 +24,14 @@
#ifndef ENUM_H
#define ENUM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
namespace VCARD
{
-extern const QCString paramNames [];
+extern const TQCString paramNames [];
enum EntityType {
EntityName,
@@ -111,8 +111,8 @@ extern const ParamType paramTypesTable[];
KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType);
KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType);
-KVCARD_EXPORT QCString EntityTypeToParamName(EntityType);
-KVCARD_EXPORT EntityType EntityNameToEntityType(const QCString &);
+KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType);
+KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &);
KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &);
KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &);
diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h
index 3e158774f..45a6823be 100644
--- a/kabc/vcard/include/VCardFloatValue.h
+++ b/kabc/vcard/include/VCardFloatValue.h
@@ -24,7 +24,7 @@
#ifndef FLOATVALUE_H
#define FLOATVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardImageParam.h b/kabc/vcard/include/VCardImageParam.h
index a78ebd4a6..10ab8a3f5 100644
--- a/kabc/vcard/include/VCardImageParam.h
+++ b/kabc/vcard/include/VCardImageParam.h
@@ -24,7 +24,7 @@
#ifndef IMGPARAM_H
#define IMGPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
diff --git a/kabc/vcard/include/VCardImageValue.h b/kabc/vcard/include/VCardImageValue.h
index 7a9b29c1e..45fbcad9c 100644
--- a/kabc/vcard/include/VCardImageValue.h
+++ b/kabc/vcard/include/VCardImageValue.h
@@ -24,7 +24,7 @@
#ifndef IMAGEVALUE_H
#define IMAGEVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardLangValue.h b/kabc/vcard/include/VCardLangValue.h
index 22c50a9d4..7767d52fa 100644
--- a/kabc/vcard/include/VCardLangValue.h
+++ b/kabc/vcard/include/VCardLangValue.h
@@ -24,8 +24,8 @@
#ifndef LANGVALUE_H
#define LANGVALUE_H
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
#include <VCardValue.h>
@@ -36,14 +36,14 @@ class KVCARD_EXPORT LangValue : public Value
{
#include "LangValue-generated.h"
- QCString primary();
- QStrList subtags();
+ TQCString primary();
+ TQStrList subtags();
- void setPrimary(const QCString &);
- void setSubTags(const QStrList &);
+ void setPrimary(const TQCString &);
+ void setSubTags(const TQStrList &);
- QCString primary_;
- QStrList subtags_;
+ TQCString primary_;
+ TQStrList subtags_;
};
}
diff --git a/kabc/vcard/include/VCardNValue.h b/kabc/vcard/include/VCardNValue.h
index 41a6e9b28..9db37fbbc 100644
--- a/kabc/vcard/include/VCardNValue.h
+++ b/kabc/vcard/include/VCardNValue.h
@@ -34,21 +34,21 @@ class KVCARD_EXPORT NValue : public Value
#include "NValue-generated.h"
NValue *clone();
- QCString family() { parse(); return family_; }
- QCString given() { parse(); return given_; }
- QCString middle() { parse(); return middle_; }
- QCString prefix() { parse(); return prefix_; }
- QCString suffix() { parse(); return suffix_; }
-
- void setFamily (const QCString & s) { family_ = s; assembled_ = false; }
- void setGiven (const QCString & s) { given_ = s; assembled_ = false; }
- void setMiddle (const QCString & s) { middle_ = s; assembled_ = false; }
- void setPrefix (const QCString & s) { prefix_ = s; assembled_ = false; }
- void setSuffix (const QCString & s) { suffix_ = s; assembled_ = false; }
+ TQCString family() { parse(); return family_; }
+ TQCString given() { parse(); return given_; }
+ TQCString middle() { parse(); return middle_; }
+ TQCString prefix() { parse(); return prefix_; }
+ TQCString suffix() { parse(); return suffix_; }
+
+ void setFamily (const TQCString & s) { family_ = s; assembled_ = false; }
+ void setGiven (const TQCString & s) { given_ = s; assembled_ = false; }
+ void setMiddle (const TQCString & s) { middle_ = s; assembled_ = false; }
+ void setPrefix (const TQCString & s) { prefix_ = s; assembled_ = false; }
+ void setSuffix (const TQCString & s) { suffix_ = s; assembled_ = false; }
private:
- QCString family_, given_, middle_, prefix_, suffix_;
+ TQCString family_, given_, middle_, prefix_, suffix_;
};
}
diff --git a/kabc/vcard/include/VCardOrgValue.h b/kabc/vcard/include/VCardOrgValue.h
index cc5633501..a2bd803e5 100644
--- a/kabc/vcard/include/VCardOrgValue.h
+++ b/kabc/vcard/include/VCardOrgValue.h
@@ -24,8 +24,8 @@
#ifndef ORGVALUE_H
#define ORGVALUE_H
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
#include <VCardValue.h>
@@ -38,11 +38,11 @@ class KVCARD_EXPORT OrgValue : public Value
#include "OrgValue-generated.h"
unsigned int numValues();
- QCString value(unsigned int);
+ TQCString value(unsigned int);
private:
- QStrList valueList_;
+ TQStrList valueList_;
};
}
diff --git a/kabc/vcard/include/VCardParam.h b/kabc/vcard/include/VCardParam.h
index f805634c0..93d70f06b 100644
--- a/kabc/vcard/include/VCardParam.h
+++ b/kabc/vcard/include/VCardParam.h
@@ -24,8 +24,8 @@
#ifndef PARAM_H
#define PARAM_H
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include <VCardEntity.h>
@@ -37,22 +37,22 @@ class KVCARD_EXPORT Param : public Entity
#include "Param-generated.h"
- Param(const QCString &name, const QCString &value);
+ Param(const TQCString &name, const TQCString &value);
- void setName(const QCString &);
- void setValue(const QCString &);
+ void setName(const TQCString &);
+ void setValue(const TQCString &);
- QCString name();
- QCString value();
+ TQCString name();
+ TQCString value();
private:
- QCString name_;
- QCString value_;
+ TQCString name_;
+ TQCString value_;
};
-typedef QPtrList<Param> ParamList;
-typedef QPtrListIterator<Param> ParamListIterator;
+typedef TQPtrList<Param> ParamList;
+typedef TQPtrListIterator<Param> ParamListIterator;
}
diff --git a/kabc/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h
index 06e644b20..0ea380267 100644
--- a/kabc/vcard/include/VCardRToken.h
+++ b/kabc/vcard/include/VCardRToken.h
@@ -25,14 +25,14 @@
#ifndef RTOKEN_H
#define RTOKEN_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kdelibs_export.h>
namespace VCARD
{
-KVCARD_EXPORT Q_UINT32 RTokenise(const char * str, const char * delim, QStrList & l);
+KVCARD_EXPORT Q_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l);
}
diff --git a/kabc/vcard/include/VCardSoundValue.h b/kabc/vcard/include/VCardSoundValue.h
index 0a7af1fbc..61858f058 100644
--- a/kabc/vcard/include/VCardSoundValue.h
+++ b/kabc/vcard/include/VCardSoundValue.h
@@ -24,7 +24,7 @@
#ifndef SOUNDVALUE_H
#define SOUNDVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardSourceParam.h b/kabc/vcard/include/VCardSourceParam.h
index bb28ffe62..1d9d03d47 100644
--- a/kabc/vcard/include/VCardSourceParam.h
+++ b/kabc/vcard/include/VCardSourceParam.h
@@ -24,7 +24,7 @@
#ifndef SOURCEPARAM_H
#define SOURCEPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
@@ -39,18 +39,18 @@ class KVCARD_EXPORT SourceParam : public Param
enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX };
SourceParamType type() { parse(); return type_;}
- QCString par() { parse(); return par_; }
- QCString val() { parse(); return val_; }
+ TQCString par() { parse(); return par_; }
+ TQCString val() { parse(); return val_; }
void setType(SourceParamType t) { type_ = t; assembled_ = false; }
- void setPar(const QCString & s) { par_ = s; assembled_ = false; }
- void setVal(const QCString & s) { val_ = s; assembled_ = false; }
+ void setPar(const TQCString & s) { par_ = s; assembled_ = false; }
+ void setVal(const TQCString & s) { val_ = s; assembled_ = false; }
private:
SourceParamType type_;
// May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR"
- QCString par_, val_; // Sub-parameter, value
+ TQCString par_, val_; // Sub-parameter, value
};
}
diff --git a/kabc/vcard/include/VCardTelParam.h b/kabc/vcard/include/VCardTelParam.h
index 0eff82390..9eea5da2f 100644
--- a/kabc/vcard/include/VCardTelParam.h
+++ b/kabc/vcard/include/VCardTelParam.h
@@ -24,7 +24,7 @@
#ifndef TELPARAM_H
#define TELPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
@@ -43,7 +43,7 @@ class KVCARD_EXPORT TelParam : public Param
private:
- QPtrList<TelType> types_;
+ TQPtrList<TelType> types_;
};
}
diff --git a/kabc/vcard/include/VCardTelValue.h b/kabc/vcard/include/VCardTelValue.h
index 1d3563192..043a45aa9 100644
--- a/kabc/vcard/include/VCardTelValue.h
+++ b/kabc/vcard/include/VCardTelValue.h
@@ -24,7 +24,7 @@
#ifndef TELVALUE_H
#define TELVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardTextBinParam.h b/kabc/vcard/include/VCardTextBinParam.h
index 5085d5d36..5a681ad48 100644
--- a/kabc/vcard/include/VCardTextBinParam.h
+++ b/kabc/vcard/include/VCardTextBinParam.h
@@ -24,7 +24,7 @@
#ifndef TEXTBINPARAM_H
#define TEXTBINPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
diff --git a/kabc/vcard/include/VCardTextBinValue.h b/kabc/vcard/include/VCardTextBinValue.h
index 9835acf9b..316fa7832 100644
--- a/kabc/vcard/include/VCardTextBinValue.h
+++ b/kabc/vcard/include/VCardTextBinValue.h
@@ -24,7 +24,7 @@
#ifndef TEXTBINVALUE_H
#define TEXTBINVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
@@ -39,17 +39,17 @@ class KVCARD_EXPORT TextBinValue : public Value
TextBinValue *clone();
bool isBinary() { parse(); return mIsBinary_; }
- QByteArray data() { parse(); return mData_; }
- QString url() { parse(); return mUrl_; }
+ TQByteArray data() { parse(); return mData_; }
+ TQString url() { parse(); return mUrl_; }
- void setData( const QByteArray &data )
+ void setData( const TQByteArray &data )
{
mData_ = data;
mIsBinary_ = true;
assembled_ = false;
}
- void setUrl( const QString &url )
+ void setUrl( const TQString &url )
{
mUrl_ = url;
mIsBinary_ = false;
@@ -58,8 +58,8 @@ class KVCARD_EXPORT TextBinValue : public Value
private:
int mIsBinary_;
- QByteArray mData_;
- QString mUrl_;
+ TQByteArray mData_;
+ TQString mUrl_;
};
}
diff --git a/kabc/vcard/include/VCardTextListValue.h b/kabc/vcard/include/VCardTextListValue.h
index 14242312a..53760c75a 100644
--- a/kabc/vcard/include/VCardTextListValue.h
+++ b/kabc/vcard/include/VCardTextListValue.h
@@ -24,9 +24,9 @@
#ifndef TEXTLISTVALUE_H
#define TEXTLISTVALUE_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
@@ -39,11 +39,11 @@ class KVCARD_EXPORT TextListValue : public Value
#include "TextListValue-generated.h"
unsigned int numValues();
- QCString value(unsigned int);
+ TQCString value(unsigned int);
private:
- QStrList valueList_;
+ TQStrList valueList_;
};
}
diff --git a/kabc/vcard/include/VCardTextParam.h b/kabc/vcard/include/VCardTextParam.h
index d241f42d0..d593c0578 100644
--- a/kabc/vcard/include/VCardTextParam.h
+++ b/kabc/vcard/include/VCardTextParam.h
@@ -24,7 +24,7 @@
#ifndef TEXTPARAM_H
#define TEXTPARAM_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardParam.h>
diff --git a/kabc/vcard/include/VCardURIValue.h b/kabc/vcard/include/VCardURIValue.h
index de56d49e6..696887774 100644
--- a/kabc/vcard/include/VCardURIValue.h
+++ b/kabc/vcard/include/VCardURIValue.h
@@ -33,18 +33,18 @@ class KVCARD_EXPORT URIValue : public Value
{
#include "URIValue-generated.h"
- URIValue(const QCString & scheme, const QCString & schemeSpecificPart);
+ URIValue(const TQCString & scheme, const TQCString & schemeSpecificPart);
- QCString scheme();
- QCString schemeSpecificPart();
+ TQCString scheme();
+ TQCString schemeSpecificPart();
- void setScheme (const QCString &);
- void setSchemeSpecificPart (const QCString &);
+ void setScheme (const TQCString &);
+ void setSchemeSpecificPart (const TQCString &);
private:
- QCString scheme_;
- QCString schemeSpecificPart_;
+ TQCString scheme_;
+ TQCString schemeSpecificPart_;
};
}
diff --git a/kabc/vcard/include/VCardUTCValue.h b/kabc/vcard/include/VCardUTCValue.h
index 6674ff7db..cb09ccf00 100644
--- a/kabc/vcard/include/VCardUTCValue.h
+++ b/kabc/vcard/include/VCardUTCValue.h
@@ -24,7 +24,7 @@
#ifndef UTCVALUE_H
#define UTCVALUE_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h
index 120682212..64ed5c787 100644
--- a/kabc/vcard/include/VCardVCard.h
+++ b/kabc/vcard/include/VCardVCard.h
@@ -24,8 +24,8 @@
#ifndef VCARD_VCARD_H
#define VCARD_VCARD_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <VCardEnum.h>
#include <VCardEntity.h>
@@ -40,22 +40,22 @@ class KVCARD_EXPORT VCard : public Entity
#include "VCard-generated.h"
bool has(EntityType);
- bool has(const QCString &);
+ bool has(const TQCString &);
void add(const ContentLine &);
- void add(const QCString &);
+ void add(const TQCString &);
ContentLine * contentLine(EntityType);
- ContentLine * contentLine(const QCString &);
+ ContentLine * contentLine(const TQCString &);
- QCString group() { parse(); return group_; }
+ TQCString group() { parse(); return group_; }
- QPtrList<ContentLine> contentLineList() { parse(); return contentLineList_; }
+ TQPtrList<ContentLine> contentLineList() { parse(); return contentLineList_; }
private:
QCString group_;
- QPtrList<ContentLine> contentLineList_;
+ TQPtrList<ContentLine> contentLineList_;
};
}
diff --git a/kabc/vcard/include/VCardVCardEntity.h b/kabc/vcard/include/VCardVCardEntity.h
index d45d43c26..422790c22 100644
--- a/kabc/vcard/include/VCardVCardEntity.h
+++ b/kabc/vcard/include/VCardVCardEntity.h
@@ -24,8 +24,8 @@
#ifndef VCARD_ENTITY_H
#define VCARD_ENTITY_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <VCardEnum.h>
#include <VCardVCard.h>
@@ -34,8 +34,8 @@
namespace VCARD
{
-typedef QPtrList<VCard> VCardList;
-typedef QPtrListIterator<VCard> VCardListIterator;
+typedef TQPtrList<VCard> VCardList;
+typedef TQPtrListIterator<VCard> VCardListIterator;
class KVCARD_EXPORT VCardEntity : public Entity
{
diff --git a/kabc/vcard/include/VCardValue.h b/kabc/vcard/include/VCardValue.h
index 9019f2b1a..3c167d70a 100644
--- a/kabc/vcard/include/VCardValue.h
+++ b/kabc/vcard/include/VCardValue.h
@@ -24,7 +24,7 @@
#ifndef VALUE_H
#define VALUE_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <VCardEntity.h>
@@ -38,8 +38,8 @@ class KVCARD_EXPORT Value : public Entity
virtual Value *clone() { return new Value( *this ); }
};
-typedef QPtrList<Value> ValueList;
-typedef QPtrListIterator<Value> ValueListIterator;
+typedef TQPtrList<Value> ValueList;
+typedef TQPtrListIterator<Value> ValueListIterator;
}
diff --git a/kabc/vcard/include/generated/AdrParam-generated.h b/kabc/vcard/include/generated/AdrParam-generated.h
index 3e265d8a7..1afdcd36a 100644
--- a/kabc/vcard/include/generated/AdrParam-generated.h
+++ b/kabc/vcard/include/generated/AdrParam-generated.h
@@ -3,13 +3,13 @@
public:
AdrParam();
AdrParam(const AdrParam&);
-AdrParam(const QCString&);
+AdrParam(const TQCString&);
AdrParam & operator = (AdrParam&);
-AdrParam & operator = (const QCString&);
+AdrParam & operator = (const TQCString&);
bool operator ==(AdrParam&);
bool operator !=(AdrParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {AdrParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {AdrParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~AdrParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AdrValue-generated.h b/kabc/vcard/include/generated/AdrValue-generated.h
index e1d93e425..9882d1186 100644
--- a/kabc/vcard/include/generated/AdrValue-generated.h
+++ b/kabc/vcard/include/generated/AdrValue-generated.h
@@ -3,13 +3,13 @@
public:
AdrValue();
AdrValue(const AdrValue&);
-AdrValue(const QCString&);
+AdrValue(const TQCString&);
AdrValue & operator = (AdrValue&);
-AdrValue & operator = (const QCString&);
+AdrValue & operator = (const TQCString&);
bool operator ==(AdrValue&);
bool operator !=(AdrValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {AdrValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {AdrValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~AdrValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AgentParam-generated.h b/kabc/vcard/include/generated/AgentParam-generated.h
index 6423867d9..07b87d106 100644
--- a/kabc/vcard/include/generated/AgentParam-generated.h
+++ b/kabc/vcard/include/generated/AgentParam-generated.h
@@ -3,13 +3,13 @@
public:
AgentParam();
AgentParam(const AgentParam&);
-AgentParam(const QCString&);
+AgentParam(const TQCString&);
AgentParam & operator = (AgentParam&);
-AgentParam & operator = (const QCString&);
+AgentParam & operator = (const TQCString&);
bool operator ==(AgentParam&);
bool operator !=(AgentParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {AgentParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {AgentParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~AgentParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AgentValue-generated.h b/kabc/vcard/include/generated/AgentValue-generated.h
index 76bb81c53..e2866bb8f 100644
--- a/kabc/vcard/include/generated/AgentValue-generated.h
+++ b/kabc/vcard/include/generated/AgentValue-generated.h
@@ -3,13 +3,13 @@
public:
AgentValue();
AgentValue(const AgentValue&);
-AgentValue(const QCString&);
+AgentValue(const TQCString&);
AgentValue & operator = (AgentValue&);
-AgentValue & operator = (const QCString&);
+AgentValue & operator = (const TQCString&);
bool operator ==(AgentValue&);
bool operator !=(AgentValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {AgentValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {AgentValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~AgentValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ClassValue-generated.h b/kabc/vcard/include/generated/ClassValue-generated.h
index df4ed5ff0..e10c65568 100644
--- a/kabc/vcard/include/generated/ClassValue-generated.h
+++ b/kabc/vcard/include/generated/ClassValue-generated.h
@@ -3,13 +3,13 @@
public:
ClassValue();
ClassValue(const ClassValue&);
-ClassValue(const QCString&);
+ClassValue(const TQCString&);
ClassValue & operator = (ClassValue&);
-ClassValue & operator = (const QCString&);
+ClassValue & operator = (const TQCString&);
bool operator ==(ClassValue&);
bool operator !=(ClassValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ClassValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ClassValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ClassValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ContentLine-generated.h b/kabc/vcard/include/generated/ContentLine-generated.h
index 9efe2731a..ad2ac7649 100644
--- a/kabc/vcard/include/generated/ContentLine-generated.h
+++ b/kabc/vcard/include/generated/ContentLine-generated.h
@@ -3,13 +3,13 @@
public:
ContentLine();
ContentLine(const ContentLine&);
-ContentLine(const QCString&);
+ContentLine(const TQCString&);
ContentLine & operator = (ContentLine&);
-ContentLine & operator = (const QCString&);
+ContentLine & operator = (const TQCString&);
bool operator ==(ContentLine&);
bool operator !=(ContentLine& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ContentLine a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ContentLine a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ContentLine();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/DateParam-generated.h b/kabc/vcard/include/generated/DateParam-generated.h
index ff1da58c9..75e7ad72d 100644
--- a/kabc/vcard/include/generated/DateParam-generated.h
+++ b/kabc/vcard/include/generated/DateParam-generated.h
@@ -3,13 +3,13 @@
public:
DateParam();
DateParam(const DateParam&);
-DateParam(const QCString&);
+DateParam(const TQCString&);
DateParam & operator = (DateParam&);
-DateParam & operator = (const QCString&);
+DateParam & operator = (const TQCString&);
bool operator ==(DateParam&);
bool operator !=(DateParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {DateParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {DateParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~DateParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/DateValue-generated.h b/kabc/vcard/include/generated/DateValue-generated.h
index a38282379..cf0eb40d8 100644
--- a/kabc/vcard/include/generated/DateValue-generated.h
+++ b/kabc/vcard/include/generated/DateValue-generated.h
@@ -3,13 +3,13 @@
public:
DateValue();
DateValue(const DateValue&);
-DateValue(const QCString&);
+DateValue(const TQCString&);
DateValue & operator = (DateValue&);
-DateValue & operator = (const QCString&);
+DateValue & operator = (const TQCString&);
bool operator ==(DateValue&);
bool operator !=(DateValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {DateValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {DateValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~DateValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/EmailParam-generated.h b/kabc/vcard/include/generated/EmailParam-generated.h
index 428a6fc20..46ae1f80f 100644
--- a/kabc/vcard/include/generated/EmailParam-generated.h
+++ b/kabc/vcard/include/generated/EmailParam-generated.h
@@ -3,13 +3,13 @@
public:
EmailParam();
EmailParam(const EmailParam&);
-EmailParam(const QCString&);
+EmailParam(const TQCString&);
EmailParam & operator = (EmailParam&);
-EmailParam & operator = (const QCString&);
+EmailParam & operator = (const TQCString&);
bool operator ==(EmailParam&);
bool operator !=(EmailParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {EmailParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {EmailParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~EmailParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/FloatValue-generated.h b/kabc/vcard/include/generated/FloatValue-generated.h
index cac55cfef..155f52ae1 100644
--- a/kabc/vcard/include/generated/FloatValue-generated.h
+++ b/kabc/vcard/include/generated/FloatValue-generated.h
@@ -3,13 +3,13 @@
public:
FloatValue();
FloatValue(const FloatValue&);
-FloatValue(const QCString&);
+FloatValue(const TQCString&);
FloatValue & operator = (FloatValue&);
-FloatValue & operator = (const QCString&);
+FloatValue & operator = (const TQCString&);
bool operator ==(FloatValue&);
bool operator !=(FloatValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {FloatValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {FloatValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~FloatValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/GeoValue-generated.h b/kabc/vcard/include/generated/GeoValue-generated.h
index 594f3ad67..b525e8c21 100644
--- a/kabc/vcard/include/generated/GeoValue-generated.h
+++ b/kabc/vcard/include/generated/GeoValue-generated.h
@@ -3,13 +3,13 @@
public:
GeoValue();
GeoValue(const GeoValue&);
-GeoValue(const QCString&);
+GeoValue(const TQCString&);
GeoValue & operator = (GeoValue&);
-GeoValue & operator = (const QCString&);
+GeoValue & operator = (const TQCString&);
bool operator ==(GeoValue&);
bool operator !=(GeoValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {GeoValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {GeoValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~GeoValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Group-generated.h b/kabc/vcard/include/generated/Group-generated.h
index f39302dd3..38e1c2a3a 100644
--- a/kabc/vcard/include/generated/Group-generated.h
+++ b/kabc/vcard/include/generated/Group-generated.h
@@ -3,13 +3,13 @@
public:
Group();
Group(const Group&);
-Group(const QCString&);
+Group(const TQCString&);
Group & operator = (Group&);
-Group & operator = (const QCString&);
+Group & operator = (const TQCString&);
bool operator ==(Group&);
bool operator !=(Group& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {Group a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {Group a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~Group();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImageParam-generated.h b/kabc/vcard/include/generated/ImageParam-generated.h
index 81edfd29a..78a5a97cf 100644
--- a/kabc/vcard/include/generated/ImageParam-generated.h
+++ b/kabc/vcard/include/generated/ImageParam-generated.h
@@ -3,13 +3,13 @@
public:
ImageParam();
ImageParam(const ImageParam&);
-ImageParam(const QCString&);
+ImageParam(const TQCString&);
ImageParam & operator = (ImageParam&);
-ImageParam & operator = (const QCString&);
+ImageParam & operator = (const TQCString&);
bool operator ==(ImageParam&);
bool operator !=(ImageParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ImageParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ImageParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ImageParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImageValue-generated.h b/kabc/vcard/include/generated/ImageValue-generated.h
index 5a2c493ee..882081fbc 100644
--- a/kabc/vcard/include/generated/ImageValue-generated.h
+++ b/kabc/vcard/include/generated/ImageValue-generated.h
@@ -3,13 +3,13 @@
public:
ImageValue();
ImageValue(const ImageValue&);
-ImageValue(const QCString&);
+ImageValue(const TQCString&);
ImageValue & operator = (ImageValue&);
-ImageValue & operator = (const QCString&);
+ImageValue & operator = (const TQCString&);
bool operator ==(ImageValue&);
bool operator !=(ImageValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ImageValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ImageValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ImageValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImgParam-generated.h b/kabc/vcard/include/generated/ImgParam-generated.h
index 46a6ca031..04132c857 100644
--- a/kabc/vcard/include/generated/ImgParam-generated.h
+++ b/kabc/vcard/include/generated/ImgParam-generated.h
@@ -3,13 +3,13 @@
public:
ImgParam();
ImgParam(const ImgParam&);
-ImgParam(const QCString&);
+ImgParam(const TQCString&);
ImgParam & operator = (ImgParam&);
-ImgParam & operator = (const QCString&);
+ImgParam & operator = (const TQCString&);
bool operator ==(ImgParam&);
bool operator !=(ImgParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ImgParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ImgParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ImgParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImgValue-generated.h b/kabc/vcard/include/generated/ImgValue-generated.h
index d75d54550..0774de9bf 100644
--- a/kabc/vcard/include/generated/ImgValue-generated.h
+++ b/kabc/vcard/include/generated/ImgValue-generated.h
@@ -3,13 +3,13 @@
public:
ImgValue();
ImgValue(const ImgValue&);
-ImgValue(const QCString&);
+ImgValue(const TQCString&);
ImgValue & operator = (ImgValue&);
-ImgValue & operator = (const QCString&);
+ImgValue & operator = (const TQCString&);
bool operator ==(ImgValue&);
bool operator !=(ImgValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {ImgValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {ImgValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~ImgValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/LangValue-generated.h b/kabc/vcard/include/generated/LangValue-generated.h
index 23e138b2f..c4930c59e 100644
--- a/kabc/vcard/include/generated/LangValue-generated.h
+++ b/kabc/vcard/include/generated/LangValue-generated.h
@@ -3,13 +3,13 @@
public:
LangValue();
LangValue(const LangValue&);
-LangValue(const QCString&);
+LangValue(const TQCString&);
LangValue & operator = (LangValue&);
-LangValue & operator = (const QCString&);
+LangValue & operator = (const TQCString&);
bool operator ==(LangValue&);
bool operator !=(LangValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {LangValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {LangValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~LangValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/NValue-generated.h b/kabc/vcard/include/generated/NValue-generated.h
index 082c2534d..d78715ec0 100644
--- a/kabc/vcard/include/generated/NValue-generated.h
+++ b/kabc/vcard/include/generated/NValue-generated.h
@@ -3,13 +3,13 @@
public:
NValue();
NValue(const NValue&);
-NValue(const QCString&);
+NValue(const TQCString&);
NValue & operator = (NValue&);
-NValue & operator = (const QCString&);
+NValue & operator = (const TQCString&);
bool operator ==(NValue&);
bool operator !=(NValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {NValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {NValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~NValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Name-generated.h b/kabc/vcard/include/generated/Name-generated.h
index 0e69abd1d..17d56e680 100644
--- a/kabc/vcard/include/generated/Name-generated.h
+++ b/kabc/vcard/include/generated/Name-generated.h
@@ -3,13 +3,13 @@
public:
V_Name();
V_Name(const V_Name&);
-V_Name(const QCString&);
+V_Name(const TQCString&);
V_Name & operator = (V_Name&);
-V_Name & operator = (const QCString&);
+V_Name & operator = (const TQCString&);
bool operator ==(V_Name&);
bool operator !=(V_Name& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {V_Name a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {V_Name a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~V_Name();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/OrgValue-generated.h b/kabc/vcard/include/generated/OrgValue-generated.h
index 51eb1b738..661ecf5a3 100644
--- a/kabc/vcard/include/generated/OrgValue-generated.h
+++ b/kabc/vcard/include/generated/OrgValue-generated.h
@@ -3,13 +3,13 @@
public:
OrgValue();
OrgValue(const OrgValue&);
-OrgValue(const QCString&);
+OrgValue(const TQCString&);
OrgValue & operator = (OrgValue&);
-OrgValue & operator = (const QCString&);
+OrgValue & operator = (const TQCString&);
bool operator ==(OrgValue&);
bool operator !=(OrgValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {OrgValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {OrgValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~OrgValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Param-generated.h b/kabc/vcard/include/generated/Param-generated.h
index cf4666a4b..bf63e7166 100644
--- a/kabc/vcard/include/generated/Param-generated.h
+++ b/kabc/vcard/include/generated/Param-generated.h
@@ -3,13 +3,13 @@
public:
Param();
Param(const Param&);
-Param(const QCString&);
+Param(const TQCString&);
Param & operator = (Param&);
-Param & operator = (const QCString&);
+Param & operator = (const TQCString&);
bool operator ==(Param&);
bool operator !=(Param& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {Param a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {Param a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~Param();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ParamName-generated.h b/kabc/vcard/include/generated/ParamName-generated.h
index ef673c392..60b1e12d5 100644
--- a/kabc/vcard/include/generated/ParamName-generated.h
+++ b/kabc/vcard/include/generated/ParamName-generated.h
@@ -3,13 +3,13 @@
public:
V_ParamName();
V_ParamName(const V_ParamName&);
-V_ParamName(const QCString&);
+V_ParamName(const TQCString&);
V_ParamName & operator = (V_ParamName&);
-V_ParamName & operator = (const QCString&);
+V_ParamName & operator = (const TQCString&);
bool operator ==(V_ParamName&);
bool operator !=(V_ParamName& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {V_ParamName a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {V_ParamName a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~V_ParamName();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ParamValue-generated.h b/kabc/vcard/include/generated/ParamValue-generated.h
index e73500f67..f31a166c6 100644
--- a/kabc/vcard/include/generated/ParamValue-generated.h
+++ b/kabc/vcard/include/generated/ParamValue-generated.h
@@ -3,13 +3,13 @@
public:
V_ParamValue();
V_ParamValue(const V_ParamValue&);
-V_ParamValue(const QCString&);
+V_ParamValue(const TQCString&);
V_ParamValue & operator = (V_ParamValue&);
-V_ParamValue & operator = (const QCString&);
+V_ParamValue & operator = (const TQCString&);
bool operator ==(V_ParamValue&);
bool operator !=(V_ParamValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {V_ParamValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {V_ParamValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~V_ParamValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/PhoneNumberValue-generated.h b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
index 1320f186c..f0eb6b4f4 100644
--- a/kabc/vcard/include/generated/PhoneNumberValue-generated.h
+++ b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
@@ -3,13 +3,13 @@
public:
PhoneNumberValue();
PhoneNumberValue(const PhoneNumberValue&);
-PhoneNumberValue(const QCString&);
+PhoneNumberValue(const TQCString&);
PhoneNumberValue & operator = (PhoneNumberValue&);
-PhoneNumberValue & operator = (const QCString&);
+PhoneNumberValue & operator = (const TQCString&);
bool operator ==(PhoneNumberValue&);
bool operator !=(PhoneNumberValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {PhoneNumberValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {PhoneNumberValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~PhoneNumberValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/SoundValue-generated.h b/kabc/vcard/include/generated/SoundValue-generated.h
index a9ab2e8c5..64081be0b 100644
--- a/kabc/vcard/include/generated/SoundValue-generated.h
+++ b/kabc/vcard/include/generated/SoundValue-generated.h
@@ -3,13 +3,13 @@
public:
SoundValue();
SoundValue(const SoundValue&);
-SoundValue(const QCString&);
+SoundValue(const TQCString&);
SoundValue & operator = (SoundValue&);
-SoundValue & operator = (const QCString&);
+SoundValue & operator = (const TQCString&);
bool operator ==(SoundValue&);
bool operator !=(SoundValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {SoundValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {SoundValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~SoundValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/SourceParam-generated.h b/kabc/vcard/include/generated/SourceParam-generated.h
index 75fefb862..e3b13bca1 100644
--- a/kabc/vcard/include/generated/SourceParam-generated.h
+++ b/kabc/vcard/include/generated/SourceParam-generated.h
@@ -3,13 +3,13 @@
public:
SourceParam();
SourceParam(const SourceParam&);
-SourceParam(const QCString&);
+SourceParam(const TQCString&);
SourceParam & operator = (SourceParam&);
-SourceParam & operator = (const QCString&);
+SourceParam & operator = (const TQCString&);
bool operator ==(SourceParam&);
bool operator !=(SourceParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {SourceParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {SourceParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~SourceParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TelParam-generated.h b/kabc/vcard/include/generated/TelParam-generated.h
index 3ee77cc3c..9f8f24270 100644
--- a/kabc/vcard/include/generated/TelParam-generated.h
+++ b/kabc/vcard/include/generated/TelParam-generated.h
@@ -3,13 +3,13 @@
public:
TelParam();
TelParam(const TelParam&);
-TelParam(const QCString&);
+TelParam(const TQCString&);
TelParam & operator = (TelParam&);
-TelParam & operator = (const QCString&);
+TelParam & operator = (const TQCString&);
bool operator ==(TelParam&);
bool operator !=(TelParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TelParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TelParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TelParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TelValue-generated.h b/kabc/vcard/include/generated/TelValue-generated.h
index 3213e1cd1..600da7727 100644
--- a/kabc/vcard/include/generated/TelValue-generated.h
+++ b/kabc/vcard/include/generated/TelValue-generated.h
@@ -3,13 +3,13 @@
public:
TelValue();
TelValue(const TelValue&);
-TelValue(const QCString&);
+TelValue(const TQCString&);
TelValue & operator = (TelValue&);
-TelValue & operator = (const QCString&);
+TelValue & operator = (const TQCString&);
bool operator ==(TelValue&);
bool operator !=(TelValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TelValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TelValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TelValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextBinParam-generated.h b/kabc/vcard/include/generated/TextBinParam-generated.h
index d075c102b..37dc56e55 100644
--- a/kabc/vcard/include/generated/TextBinParam-generated.h
+++ b/kabc/vcard/include/generated/TextBinParam-generated.h
@@ -3,13 +3,13 @@
public:
TextBinParam();
TextBinParam(const TextBinParam&);
-TextBinParam(const QCString&);
+TextBinParam(const TQCString&);
TextBinParam & operator = (TextBinParam&);
-TextBinParam & operator = (const QCString&);
+TextBinParam & operator = (const TQCString&);
bool operator ==(TextBinParam&);
bool operator !=(TextBinParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextBinParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextBinParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextBinParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextBinValue-generated.h b/kabc/vcard/include/generated/TextBinValue-generated.h
index e9553ac2c..4c9580421 100644
--- a/kabc/vcard/include/generated/TextBinValue-generated.h
+++ b/kabc/vcard/include/generated/TextBinValue-generated.h
@@ -3,13 +3,13 @@
public:
TextBinValue();
TextBinValue(const TextBinValue&);
-TextBinValue(const QCString&);
+TextBinValue(const TQCString&);
TextBinValue & operator = (TextBinValue&);
-TextBinValue & operator = (const QCString&);
+TextBinValue & operator = (const TQCString&);
bool operator ==(TextBinValue&);
bool operator !=(TextBinValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextBinValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextBinValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextBinValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextListValue-generated.h b/kabc/vcard/include/generated/TextListValue-generated.h
index 9f46124bf..8babb0d9f 100644
--- a/kabc/vcard/include/generated/TextListValue-generated.h
+++ b/kabc/vcard/include/generated/TextListValue-generated.h
@@ -3,13 +3,13 @@
public:
TextListValue();
TextListValue(const TextListValue&);
-TextListValue(const QCString&);
+TextListValue(const TQCString&);
TextListValue & operator = (TextListValue&);
-TextListValue & operator = (const QCString&);
+TextListValue & operator = (const TQCString&);
bool operator ==(TextListValue&);
bool operator !=(TextListValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextListValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextListValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextListValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextNSParam-generated.h b/kabc/vcard/include/generated/TextNSParam-generated.h
index d7f58caae..bd8e74b07 100644
--- a/kabc/vcard/include/generated/TextNSParam-generated.h
+++ b/kabc/vcard/include/generated/TextNSParam-generated.h
@@ -3,13 +3,13 @@
public:
TextNSParam();
TextNSParam(const TextNSParam&);
-TextNSParam(const QCString&);
+TextNSParam(const TQCString&);
TextNSParam & operator = (TextNSParam&);
-TextNSParam & operator = (const QCString&);
+TextNSParam & operator = (const TQCString&);
bool operator ==(TextNSParam&);
bool operator !=(TextNSParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextNSParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextNSParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextNSParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextParam-generated.h b/kabc/vcard/include/generated/TextParam-generated.h
index 154e1bf4c..54ae611a5 100644
--- a/kabc/vcard/include/generated/TextParam-generated.h
+++ b/kabc/vcard/include/generated/TextParam-generated.h
@@ -3,13 +3,13 @@
public:
TextParam();
TextParam(const TextParam&);
-TextParam(const QCString&);
+TextParam(const TQCString&);
TextParam & operator = (TextParam&);
-TextParam & operator = (const QCString&);
+TextParam & operator = (const TQCString&);
bool operator ==(TextParam&);
bool operator !=(TextParam& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextParam a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextParam a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextParam();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextValue-generated.h b/kabc/vcard/include/generated/TextValue-generated.h
index e1c4dcc09..5b56b54a7 100644
--- a/kabc/vcard/include/generated/TextValue-generated.h
+++ b/kabc/vcard/include/generated/TextValue-generated.h
@@ -3,13 +3,13 @@
public:
TextValue();
TextValue(const TextValue&);
-TextValue(const QCString&);
+TextValue(const TQCString&);
TextValue & operator = (TextValue&);
-TextValue & operator = (const QCString&);
+TextValue & operator = (const TQCString&);
bool operator ==(TextValue&);
bool operator !=(TextValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {TextValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {TextValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~TextValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/URIValue-generated.h b/kabc/vcard/include/generated/URIValue-generated.h
index dbcb5c1ed..5a691e6d6 100644
--- a/kabc/vcard/include/generated/URIValue-generated.h
+++ b/kabc/vcard/include/generated/URIValue-generated.h
@@ -3,13 +3,13 @@
public:
URIValue();
URIValue(const URIValue&);
-URIValue(const QCString&);
+URIValue(const TQCString&);
URIValue & operator = (URIValue&);
-URIValue & operator = (const QCString&);
+URIValue & operator = (const TQCString&);
bool operator ==(URIValue&);
bool operator !=(URIValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {URIValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {URIValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~URIValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/UTCValue-generated.h b/kabc/vcard/include/generated/UTCValue-generated.h
index 46e447b3b..0c6edfb46 100644
--- a/kabc/vcard/include/generated/UTCValue-generated.h
+++ b/kabc/vcard/include/generated/UTCValue-generated.h
@@ -3,13 +3,13 @@
public:
UTCValue();
UTCValue(const UTCValue&);
-UTCValue(const QCString&);
+UTCValue(const TQCString&);
UTCValue & operator = (UTCValue&);
-UTCValue & operator = (const QCString&);
+UTCValue & operator = (const TQCString&);
bool operator ==(UTCValue&);
bool operator !=(UTCValue& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {UTCValue a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {UTCValue a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~UTCValue();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/VCard-generated.h b/kabc/vcard/include/generated/VCard-generated.h
index 4d7d96d48..4f36d11da 100644
--- a/kabc/vcard/include/generated/VCard-generated.h
+++ b/kabc/vcard/include/generated/VCard-generated.h
@@ -3,13 +3,13 @@
public:
VCard();
VCard(const VCard&);
-VCard(const QCString&);
+VCard(const TQCString&);
VCard & operator = (VCard&);
-VCard & operator = (const QCString&);
+VCard & operator = (const TQCString&);
bool operator ==(VCard&);
bool operator !=(VCard& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {VCard a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {VCard a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~VCard();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/VCardEntity-generated.h b/kabc/vcard/include/generated/VCardEntity-generated.h
index 9f2dfbce8..4e973e62a 100644
--- a/kabc/vcard/include/generated/VCardEntity-generated.h
+++ b/kabc/vcard/include/generated/VCardEntity-generated.h
@@ -3,13 +3,13 @@
public:
VCardEntity();
VCardEntity(const VCardEntity&);
-VCardEntity(const QCString&);
+VCardEntity(const TQCString&);
VCardEntity & operator = (VCardEntity&);
-VCardEntity & operator = (const QCString&);
+VCardEntity & operator = (const TQCString&);
bool operator ==(VCardEntity&);
bool operator !=(VCardEntity& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {VCardEntity a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {VCardEntity a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~VCardEntity();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Value-generated.h b/kabc/vcard/include/generated/Value-generated.h
index 7afac34b6..935d137b6 100644
--- a/kabc/vcard/include/generated/Value-generated.h
+++ b/kabc/vcard/include/generated/Value-generated.h
@@ -3,13 +3,13 @@
public:
Value();
Value(const Value&);
-Value(const QCString&);
+Value(const TQCString&);
Value & operator = (Value&);
-Value & operator = (const QCString&);
+Value & operator = (const TQCString&);
bool operator ==(Value&);
bool operator !=(Value& x) {return !(*this==x);}
-bool operator ==(const QCString& s) {Value a(s);return(*this==a);}
-bool operator != (const QCString& s) {return !(*this == s);}
+bool operator ==(const TQCString& s) {Value a(s);return(*this==a);}
+bool operator != (const TQCString& s) {return !(*this == s);}
virtual ~Value();
void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp
index 919c6616d..3a33c7d54 100644
--- a/kabc/vcard/testread.cpp
+++ b/kabc/vcard/testread.cpp
@@ -2,8 +2,8 @@
#include <stdlib.h>
#include <assert.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <VCard.h>
@@ -16,16 +16,16 @@ int main(int argc, char * argv[])
exit(1);
}
- QFile f(argv[1]);
+ TQFile f(argv[1]);
- QCString str;
+ TQCString str;
if (!f.open(IO_ReadOnly)) {
cerr << "Couldn't open file \"" << argv[1] << endl;
exit(1);
}
- QTextStream t(&f);
+ TQTextStream t(&f);
while (!t.eof())
str += t.readLine().utf8() + '\n';
@@ -52,7 +52,7 @@ int main(int argc, char * argv[])
if (v.has(EntityEmail)) {
cerr << "Email parameter found" << endl;
- QCString s = v.contentLine(EntityEmail)->value()->asString();
+ TQCString s = v.contentLine(EntityEmail)->value()->asString();
cerr << "Email value == " << s << endl;
}
diff --git a/kabc/vcard/testwrite.cpp b/kabc/vcard/testwrite.cpp
index e4bbe7bc0..f9b8944d7 100644
--- a/kabc/vcard/testwrite.cpp
+++ b/kabc/vcard/testwrite.cpp
@@ -33,7 +33,7 @@ int main(int argc,char **argv)
cl2.setParamList( p );
v.add(cl2);
- QCString str = v.asString();
+ TQCString str = v.asString();
kdDebug() << "--- VCard begin ---" << endl
<< str
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp
index aebef680c..d7354539b 100644
--- a/kabc/vcard21parser.cpp
+++ b/kabc/vcard21parser.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kmdcodec.h>
#include "vcard21parser.h"
@@ -199,17 +199,17 @@ VCard21Parser::~VCard21Parser()
{
}
-void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const QString &data)
+void VCard21Parser::readFromString(KABC::AddressBook *addressbook, const TQString &data)
{
KABC::Addressee mAddressee = readFromString(data);
addressbook->insertAddressee(mAddressee);
}
-KABC::Addressee VCard21Parser::readFromString( const QString &data)
+KABC::Addressee VCard21Parser::readFromString( const TQString &data)
{
KABC::Addressee addressee;
VCard21ParserImpl *vCard = VCard21ParserImpl::parseVCard(data);
- QString tmpStr;
+ TQString tmpStr;
// Check if parsing failed
if (vCard == 0)
@@ -218,8 +218,8 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
return addressee;
}
//set the addressees name and formated name
- QStringList tmpList = vCard->getValues(VCARD_N);
- QString formattedName = "";
+ TQStringList tmpList = vCard->getValues(VCARD_N);
+ TQString formattedName = "";
if (tmpList.count() > 0)
addressee.setFamilyName(tmpList[0]);
if (tmpList.count() > 1)
@@ -262,7 +262,7 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
addressee.setBirthday(VCardStringToDate(tmpStr));
//set the addressee's phone numbers
- for ( QValueListIterator<VCardLineX> i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) {
+ for ( TQValueListIterator<VCardLineX> i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) {
if ( (*i).name == VCARD_TEL ) {
int type = 0;
if ( (*i).qualified ) {
@@ -300,7 +300,7 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
}
//set the addressee's addresses
- for ( QValueListIterator<VCardLineX> i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) {
+ for ( TQValueListIterator<VCardLineX> i = vCard->_vcdata->begin();i != vCard->_vcdata->end(); ++i ) {
if ( (*i).name == VCARD_ADR ) {
int type = 0;
if ( (*i).qualified ) {
@@ -369,7 +369,7 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
-KABC::Address VCard21Parser::readAddressFromQStringList ( const QStringList &data, const int type )
+KABC::Address VCard21Parser::readAddressFromQStringList ( const TQStringList &data, const int type )
{
KABC::Address mAddress;
mAddress.setType( type );
@@ -393,20 +393,20 @@ KABC::Address VCard21Parser::readAddressFromQStringList ( const QStringList &dat
}
-VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
+VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err )
{
int _err = 0;
int _state = VC_STATE_BEGIN;
- QValueList<VCardLineX> *vcdata;
- QValueList<QString> lines;
+ TQValueList<VCardLineX> *vcdata;
+ TQValueList<TQString> lines;
- vcdata = new QValueList<VCardLineX>;
+ vcdata = new TQValueList<VCardLineX>;
- lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc );
+ lines = TQStringList::split( TQRegExp( "[\x0d\x0a]" ), vc );
// for each line in the vCard
- for ( QStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) {
+ for ( TQStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) {
VCardLineX _vcl;
// take spaces off the end - ugly but necessary hack
@@ -436,12 +436,12 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
break;
}
- QString key = (*j).left( colon );
- QString value = (*j).mid( colon + 1 );
+ TQString key = (*j).left( colon );
+ TQString value = (*j).mid( colon + 1 );
// check for qualifiers and
// set name, qualified, qualifier(s)
- QStringList keyTokens = QStringList::split( ';', key );
+ TQStringList keyTokens = TQStringList::split( ';', key );
bool qp = false, first_pass = true;
bool b64 = false;
@@ -449,8 +449,8 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
_vcl.qualified = false;
_vcl.name = keyTokens[ 0 ].lower();
- for ( QStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) {
- QString zz = (*z).lower();
+ for ( TQStringList::Iterator z = keyTokens.begin(); z != keyTokens.end(); ++z ) {
+ TQString zz = (*z).lower();
if ( zz == VCARD_QUOTED_PRINTABLE || zz == VCARD_ENCODING_QUOTED_PRINTABLE ) {
qp = true;
} else if ( zz == VCARD_BASE64 ) {
@@ -489,9 +489,9 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
value.append(*( ++j ));
}
}
- _vcl.parameters = QStringList::split( ';', value, true );
+ _vcl.parameters = TQStringList::split( ';', value, true );
if ( qp ) { // decode the quoted printable
- for ( QStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z )
+ for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z )
*z = KCodecs::quotedPrintableDecode( (*z).latin1() );
}
}
@@ -538,7 +538,7 @@ VCard21ParserImpl::VCard21ParserImpl()
{
}
-VCard21ParserImpl::VCard21ParserImpl(QValueList<VCardLineX> *_vcd)
+VCard21ParserImpl::VCard21ParserImpl(TQValueList<VCardLineX> *_vcd)
: _vcdata(_vcd)
{
}
@@ -549,13 +549,13 @@ VCard21ParserImpl::~VCard21ParserImpl()
_vcdata = 0;
}
-QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifier)
+TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier)
{
- QString failed;
- const QString lowname = name.lower();
- const QString lowqualifier = qualifier.lower();
+ TQString failed;
+ const TQString lowname = name.lower();
+ const TQString lowqualifier = qualifier.lower();
- for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
+ for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) {
if ((*i).parameters.count() > 0)
return (*i).parameters[0];
@@ -566,12 +566,12 @@ QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifie
}
-QString VCard21ParserImpl::getValue(const QString& name)
+TQString VCard21ParserImpl::getValue(const TQString& name)
{
- QString failed;
- const QString lowname = name.lower();
+ TQString failed;
+ const TQString lowname = name.lower();
- for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
+ for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
if ((*i).name == lowname && !(*i).qualified) {
if ((*i).parameters.count() > 0)
return (*i).parameters[0];
@@ -582,27 +582,27 @@ QString VCard21ParserImpl::getValue(const QString& name)
}
-QStringList VCard21ParserImpl::getValues(const QString& name)
+TQStringList VCard21ParserImpl::getValues(const TQString& name)
{
- const QString lowname = name.lower();
- for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
+ const TQString lowname = name.lower();
+ for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
if ((*i).name == lowname && !(*i).qualified)
return (*i).parameters;
}
// failed.
- return QStringList();
+ return TQStringList();
}
-QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qualifier)
+TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& qualifier)
{
- const QString lowname = name.lower();
- const QString lowqualifier = qualifier.lower();
- for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
+ const TQString lowname = name.lower();
+ const TQString lowqualifier = qualifier.lower();
+ for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier))
return (*i).parameters;
}
// failed.
- return QStringList();
+ return TQStringList();
}
diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h
index 0c9e3db8a..0eb66fa93 100644
--- a/kabc/vcard21parser.h
+++ b/kabc/vcard21parser.h
@@ -22,12 +22,12 @@
#ifndef KABC_VCARD21FORMAT_H
#define KABC_VCARD21FORMAT_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "addressee.h"
#include "addressbook.h"
@@ -160,17 +160,17 @@ public:
* @param ab The address book.
* @param str The vcard string.
*/
- void readFromString( KABC::AddressBook *ab, const QString &str );
+ void readFromString( KABC::AddressBook *ab, const TQString &str );
/**
* FIXME: we need a writeToString method
- * QString writeToString (KABC::AddressBook *);
+ * TQString writeToString (KABC::AddressBook *);
*/
/**
* Parses a string in vcard2.1 format and returns the inherent addressee.
*/
- KABC::Addressee readFromString( const QString &data);
+ KABC::Addressee readFromString( const TQString &data);
/**
* Helper method to store a address.
@@ -178,7 +178,7 @@ public:
* @param data A string list, that is filled with 'street', 'house number' ...
* @param type The type of the returned address.
*/
- static KABC::Address readAddressFromQStringList (const QStringList &data, const int type);
+ static KABC::Address readAddressFromQStringList (const TQStringList &data, const int type);
};
}
@@ -189,10 +189,10 @@ public:
class KABC_EXPORT VCardLineX
{
public:
- QString name;
+ TQString name;
bool qualified;
- QValueList<QString> qualifiers;
- QValueList<QString> parameters;
+ TQValueList<TQString> qualifiers;
+ TQValueList<TQString> parameters;
bool isValid() const;
};
@@ -206,16 +206,16 @@ class KABC_EXPORT VCard21ParserImpl
public:
VCard21ParserImpl();
virtual ~VCard21ParserImpl();
- static VCard21ParserImpl *parseVCard(const QString& vc, int *err = NULL);
- QString getValue(const QString& name, const QString& qualifier);
- QString getValue(const QString& name);
- QStringList getValues(const QString& name, const QString& qualifier);
- QStringList getValues(const QString& name);
+ static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL);
+ TQString getValue(const TQString& name, const TQString& qualifier);
+ TQString getValue(const TQString& name);
+ TQStringList getValues(const TQString& name, const TQString& qualifier);
+ TQStringList getValues(const TQString& name);
- QValueList<VCardLineX> *_vcdata;
+ TQValueList<VCardLineX> *_vcdata;
private:
- VCard21ParserImpl (QValueList<VCardLineX> *_vcd);
+ VCard21ParserImpl (TQValueList<VCardLineX> *_vcd);
};
#endif
diff --git a/kabc/vcardconverter.cpp b/kabc/vcardconverter.cpp
index 42283488a..d575b019c 100644
--- a/kabc/vcardconverter.cpp
+++ b/kabc/vcardconverter.cpp
@@ -43,7 +43,7 @@ VCardConverter::~VCardConverter()
d = 0;
}
-QString VCardConverter::createVCard( const Addressee &addr, Version version )
+TQString VCardConverter::createVCard( const Addressee &addr, Version version )
{
Addressee::List list;
list.append( addr );
@@ -51,21 +51,21 @@ QString VCardConverter::createVCard( const Addressee &addr, Version version )
return createVCards( list, version );
}
-QString VCardConverter::createVCards( Addressee::List list, Version version )
+TQString VCardConverter::createVCards( Addressee::List list, Version version )
{
VCardTool tool;
return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) );
}
-Addressee VCardConverter::parseVCard( const QString& vcard )
+Addressee VCardConverter::parseVCard( const TQString& vcard )
{
Addressee::List list = parseVCards( vcard );
return list[ 0 ];
}
-Addressee::List VCardConverter::parseVCards( const QString& vcard )
+Addressee::List VCardConverter::parseVCards( const TQString& vcard )
{
VCardTool tool;
@@ -74,7 +74,7 @@ Addressee::List VCardConverter::parseVCards( const QString& vcard )
// ---------------------------- deprecated stuff ---------------------------- //
-bool VCardConverter::vCardToAddressee( const QString &str, Addressee &addr, Version version )
+bool VCardConverter::vCardToAddressee( const TQString &str, Addressee &addr, Version version )
{
if ( version == v2_1 ) {
addr = d->vcard21parser.readFromString( str );
@@ -87,7 +87,7 @@ bool VCardConverter::vCardToAddressee( const QString &str, Addressee &addr, Vers
return false;
}
-bool VCardConverter::addresseeToVCard( const Addressee &addr, QString &str, Version version )
+bool VCardConverter::addresseeToVCard( const Addressee &addr, TQString &str, Version version )
{
if ( version == v2_1 )
return false;
@@ -101,29 +101,29 @@ bool VCardConverter::addresseeToVCard( const Addressee &addr, QString &str, Vers
/* Helper functions */
-QString KABC::dateToVCardString( const QDateTime &dateTime )
+TQString KABC::dateToVCardString( const TQDateTime &dateTime )
{
return dateTime.toString("yyyyMMddThhmmssZ");
}
-QString KABC::dateToVCardString( const QDate &date )
+TQString KABC::dateToVCardString( const TQDate &date )
{
return date.toString("yyyyMMdd");
}
-QDateTime KABC::VCardStringToDate( const QString &dateString )
+TQDateTime KABC::VCardStringToDate( const TQString &dateString )
{
- QDate date;
- QTime time;
- QString d( dateString );
+ TQDate date;
+ TQTime time;
+ TQString d( dateString );
d = d.remove('-').remove(':');
if (d.length()>=8)
- date = QDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() );
+ date = TQDate( d.mid(0,4).toUInt(), d.mid(4,2).toUInt(), d.mid(6,2).toUInt() );
if (d.length()>9 && d[8].upper()=='T')
- time = QTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() );
+ time = TQTime( d.mid(9,2).toUInt(), d.mid(11,2).toUInt(), d.mid(13,2).toUInt() );
- return QDateTime( date, time );
+ return TQDateTime( date, time );
}
diff --git a/kabc/vcardconverter.h b/kabc/vcardconverter.h
index 6c427d0a9..dbc45f27a 100644
--- a/kabc/vcardconverter.h
+++ b/kabc/vcardconverter.h
@@ -21,7 +21,7 @@
#ifndef KABC_VCARDCONVERTER_H
#define KABC_VCARDCONVERTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include "addressee.h"
@@ -37,10 +37,10 @@ namespace KABC {
\code
- QFile file( "myfile.vcf" );
+ TQFile file( "myfile.vcf" );
file.open( IO_ReadOnly );
- QString data = file.readAll();
+ TQString data = file.readAll();
VCardConverter converter;
Addressee::List list = converter.parseVCards( data );
@@ -81,7 +81,7 @@ class KABC_EXPORT VCardConverter
@param addr The contact object
@param version The version of the generated vCard format
*/
- QString createVCard( const Addressee &addr, Version version = v3_0 );
+ TQString createVCard( const Addressee &addr, Version version = v3_0 );
/**
Creates a string in vCard format which contains the given
@@ -91,39 +91,39 @@ class KABC_EXPORT VCardConverter
@param version The version of the generated vCard format
*/
// FIXME: Add error handling
- QString createVCards( Addressee::List list, Version version = v3_0 );
+ TQString createVCards( Addressee::List list, Version version = v3_0 );
// FIXME: Add "createVCards( AddressBook * )"
/**
Parses a string in vCard format and returns the first contact.
*/
- Addressee parseVCard( const QString& vcard );
+ Addressee parseVCard( const TQString& vcard );
/**
Parses a string in vCard format and returns a list of contact objects.
*/
// FIXME: Add error handling
- Addressee::List parseVCards( const QString& vcard );
+ Addressee::List parseVCards( const TQString& vcard );
- // FIXME: Add "bool parseVCards( AddressBook *, const QString &vcard )"
+ // FIXME: Add "bool parseVCards( AddressBook *, const TQString &vcard )"
/**
@deprecated
*/
- bool vCardToAddressee( const QString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED;
+ bool vCardToAddressee( const TQString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED;
/**
@deprecated
*/
- bool addresseeToVCard( const Addressee&, QString&, Version version = v3_0 ) KDE_DEPRECATED;
+ bool addresseeToVCard( const Addressee&, TQString&, Version version = v3_0 ) KDE_DEPRECATED;
private:
/**
Split a string and replaces escaped separators on the fly with
unescaped ones.
*/
- QStringList splitString( const QChar &sep, const QString &value );
+ TQStringList splitString( const TQChar &sep, const TQString &value );
struct VCardConverterData;
VCardConverterData *d;
@@ -135,29 +135,29 @@ class KABC_EXPORT VCardConverter
*/
/**
- * Converts a QDateTime to a date string as it is used in VCard and LDIF files.
+ * Converts a TQDateTime to a date string as it is used in VCard and LDIF files.
* The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z")
* @param dateTime date and time to be converted
* @since 3.2
*/
-KABC_EXPORT QString dateToVCardString( const QDateTime &dateTime );
+KABC_EXPORT TQString dateToVCardString( const TQDateTime &dateTime );
/**
- * Converts a QDate to a short date string as it is used in VCard and LDIF files.
+ * Converts a TQDate to a short date string as it is used in VCard and LDIF files.
* The return value is in the form "yyyyMMdd" (e.g. "20031201")
* @param date date to be converted
* @since 3.2
*/
-KABC_EXPORT QString dateToVCardString( const QDate &date );
+KABC_EXPORT TQString dateToVCardString( const TQDate &date );
/**
- * Converts a date string as it is used in VCard and LDIF files to a QDateTime value.
+ * Converts a date string as it is used in VCard and LDIF files to a TQDateTime value.
* If the date string does not contain a time value, it will be returned as 00:00:00.
- * (e.g. "20031201T120000" will return a QDateTime for 2003-12-01 at 12:00)
+ * (e.g. "20031201T120000" will return a TQDateTime for 2003-12-01 at 12:00)
* @param dateString string representing the date and time.
* @since 3.2
*/
-KABC_EXPORT QDateTime VCardStringToDate( const QString &dateString );
+KABC_EXPORT TQDateTime VCardStringToDate( const TQString &dateString );
}
#endif
diff --git a/kabc/vcardformat.cpp b/kabc/vcardformat.cpp
index ec2d4806e..147aa4259 100644
--- a/kabc/vcardformat.cpp
+++ b/kabc/vcardformat.cpp
@@ -34,9 +34,9 @@ VCardFormat::~VCardFormat()
delete mImpl;
}
-bool VCardFormat::load( AddressBook *addressBook, const QString &fileName )
+bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName )
{
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open( IO_ReadOnly ) ) return false;
bool result = mImpl->loadAll( addressBook, 0, &f );
@@ -46,9 +46,9 @@ bool VCardFormat::load( AddressBook *addressBook, const QString &fileName )
return result;
}
-bool VCardFormat::save( AddressBook *addressBook, const QString &fileName )
+bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName )
{
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open( IO_WriteOnly ) ) return false;
mImpl->saveAll( addressBook, 0, &f );
diff --git a/kabc/vcardformat.h b/kabc/vcardformat.h
index 6d90c4836..8194056cb 100644
--- a/kabc/vcardformat.h
+++ b/kabc/vcardformat.h
@@ -20,7 +20,7 @@
#ifndef KABC_VCARDFORMAT_H
#define KABC_VCARDFORMAT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "format.h"
@@ -37,8 +37,8 @@ class KABC_EXPORT_DEPRECATED VCardFormat : public Format {
VCardFormat();
virtual ~VCardFormat();
- bool load( AddressBook *, const QString &fileName );
- bool save( AddressBook *, const QString &fileName );
+ bool load( AddressBook *, const TQString &fileName );
+ bool save( AddressBook *, const TQString &fileName );
private:
VCardFormatImpl *mImpl;
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index 51e6f2eb5..38d95294c 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -17,8 +17,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -33,12 +33,12 @@
using namespace KABC;
using namespace VCARD;
-bool VCardFormatImpl::load( Addressee &addressee, QFile *file )
+bool VCardFormatImpl::load( Addressee &addressee, TQFile *file )
{
kdDebug(5700) << "VCardFormat::load()" << endl;
- QByteArray fdata = file->readAll();
- QCString data(fdata.data(), fdata.size()+1);
+ TQByteArray fdata = file->readAll();
+ TQCString data(fdata.data(), fdata.size()+1);
VCardEntity e( data );
@@ -53,12 +53,12 @@ bool VCardFormatImpl::load( Addressee &addressee, QFile *file )
return false;
}
-bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
+bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, TQFile *file )
{
kdDebug(5700) << "VCardFormat::loadAll()" << endl;
- QByteArray fdata = file->readAll();
- QCString data(fdata.data(), fdata.size()+1);
+ TQByteArray fdata = file->readAll();
+ TQCString data(fdata.data(), fdata.size()+1);
VCardEntity e( data );
@@ -75,7 +75,7 @@ bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFi
return true;
}
-void VCardFormatImpl::save( const Addressee &addressee, QFile *file )
+void VCardFormatImpl::save( const Addressee &addressee, TQFile *file )
{
VCardEntity vcards;
VCardList vcardlist;
@@ -88,11 +88,11 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file )
vcardlist.append( v );
vcards.setCardList( vcardlist );
- QCString vcardData = vcards.asString();
+ TQCString vcardData = vcards.asString();
file->writeBlock( (const char*)vcardData, vcardData.length() );
}
-void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file )
+void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, TQFile *file )
{
VCardEntity vcards;
VCardList vcardlist;
@@ -110,23 +110,23 @@ void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file
vcards.setCardList( vcardlist );
- QCString vcardData = vcards.asString();
+ TQCString vcardData = vcards.asString();
file->writeBlock( (const char*)vcardData, vcardData.length() );
}
bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v )
{
- QPtrList<ContentLine> contentLines = v.contentLineList();
+ TQPtrList<ContentLine> contentLines = v.contentLineList();
ContentLine *cl;
for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
- QCString n = cl->name();
+ TQCString n = cl->name();
if ( n.left( 2 ) == "X-" ) {
n = n.mid( 2 );
int posDash = n.find( "-" );
- addressee.insertCustom( QString::fromUtf8( n.left( posDash ) ),
- QString::fromUtf8( n.mid( posDash + 1 ) ),
- QString::fromUtf8( cl->value()->asString() ) );
+ addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ),
+ TQString::fromUtf8( n.mid( posDash + 1 ) ),
+ TQString::fromUtf8( cl->value()->asString() ) );
continue;
}
@@ -206,7 +206,7 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v )
break;
case EntityCategories:
- addressee.setCategories( QStringList::split( ",", readTextValue( cl ) ) );
+ addressee.setCategories( TQStringList::split( ",", readTextValue( cl ) ) );
break;
case EntityBirthday:
@@ -267,7 +267,7 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v )
if ( address.isEmpty() )
address.setType( type );
- address.setLabel( QString::fromUtf8( cl->value()->asString() ) );
+ address.setLabel( TQString::fromUtf8( cl->value()->asString() ) );
addressee.insertAddress( address );
}
}
@@ -278,21 +278,21 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v )
void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v, bool intern )
{
ContentLine cl;
- QString value;
+ TQString value;
addTextValue( v, EntityName, addressee.name() );
addTextValue( v, EntityUID, addressee.uid() );
addTextValue( v, EntityURI, addressee.uri() );
addTextValue( v, EntityFullName, addressee.formattedName() );
- QStringList emails = addressee.emails();
- QStringList::ConstIterator it4;
+ TQStringList emails = addressee.emails();
+ TQStringList::ConstIterator it4;
for( it4 = emails.begin(); it4 != emails.end(); ++it4 ) {
addTextValue( v, EntityEmail, *it4 );
}
- QStringList customs = addressee.customs();
- QStringList::ConstIterator it5;
+ TQStringList customs = addressee.customs();
+ TQStringList::ConstIterator it5;
for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) {
addCustomValue( v, *it5 );
}
@@ -346,20 +346,20 @@ void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v
addSoundValue( v, addressee.sound(), addressee, intern );
}
-void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const QString &txt )
+void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt )
{
if ( txt.isEmpty() ) return;
ContentLine cl;
cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() );
- QString value = txt.mid( txt.find( ":" ) + 1 );
+ TQString value = txt.mid( txt.find( ":" ) + 1 );
if ( value.isEmpty() )
return;
cl.setValue( new TextValue( value.utf8() ) );
v->add(cl);
}
-void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const QString &txt )
+void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const TQString &txt )
{
if ( txt.isEmpty() ) return;
@@ -370,7 +370,7 @@ void VCardFormatImpl::addTextValue( VCARD::VCard *v, EntityType type, const QStr
}
void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type,
- const QDate &date )
+ const TQDate &date )
{
if ( !date.isValid() ) return;
@@ -383,7 +383,7 @@ void VCardFormatImpl::addDateValue( VCARD::VCard *vcard, EntityType type,
}
void VCardFormatImpl::addDateTimeValue( VCARD::VCard *vcard, EntityType type,
- const QDateTime &dateTime )
+ const TQDateTime &dateTime )
{
if ( !dateTime.isValid() ) return;
@@ -503,13 +503,13 @@ Address VCardFormatImpl::readAddressValue( ContentLine *cl )
{
Address a;
AdrValue *v = (AdrValue *)cl->value();
- a.setPostOfficeBox( QString::fromUtf8( v->poBox() ) );
- a.setExtended( QString::fromUtf8( v->extAddress() ) );
- a.setStreet( QString::fromUtf8( v->street() ) );
- a.setLocality( QString::fromUtf8( v->locality() ) );
- a.setRegion( QString::fromUtf8( v->region() ) );
- a.setPostalCode( QString::fromUtf8( v->postCode() ) );
- a.setCountry( QString::fromUtf8( v->countryName() ) );
+ a.setPostOfficeBox( TQString::fromUtf8( v->poBox() ) );
+ a.setExtended( TQString::fromUtf8( v->extAddress() ) );
+ a.setStreet( TQString::fromUtf8( v->street() ) );
+ a.setLocality( TQString::fromUtf8( v->locality() ) );
+ a.setRegion( TQString::fromUtf8( v->region() ) );
+ a.setPostalCode( TQString::fromUtf8( v->postCode() ) );
+ a.setCountry( TQString::fromUtf8( v->countryName() ) );
a.setType( readAddressParam( cl ) );
@@ -553,11 +553,11 @@ void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a )
void VCardFormatImpl::readNValue( ContentLine *cl, Addressee &a )
{
NValue *v = (NValue *)cl->value();
- a.setFamilyName( QString::fromUtf8( v->family() ) );
- a.setGivenName( QString::fromUtf8( v->given() ) );
- a.setAdditionalName( QString::fromUtf8( v->middle() ) );
- a.setPrefix( QString::fromUtf8( v->prefix() ) );
- a.setSuffix( QString::fromUtf8( v->suffix() ) );
+ a.setFamilyName( TQString::fromUtf8( v->family() ) );
+ a.setGivenName( TQString::fromUtf8( v->given() ) );
+ a.setAdditionalName( TQString::fromUtf8( v->middle() ) );
+ a.setPrefix( TQString::fromUtf8( v->prefix() ) );
+ a.setSuffix( TQString::fromUtf8( v->suffix() ) );
}
void VCardFormatImpl::addTelephoneValue( VCARD::VCard *v, const PhoneNumber &p )
@@ -593,7 +593,7 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
{
PhoneNumber p;
TelValue *value = (TelValue *)cl->value();
- p.setNumber( QString::fromUtf8( value->asString() ) );
+ p.setNumber( TQString::fromUtf8( value->asString() ) );
int type = 0;
ParamList params = cl->paramList();
@@ -621,33 +621,33 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
return p;
}
-QString VCardFormatImpl::readTextValue( ContentLine *cl )
+TQString VCardFormatImpl::readTextValue( ContentLine *cl )
{
VCARD::Value *value = cl->value();
if ( value ) {
- return QString::fromUtf8( value->asString() );
+ return TQString::fromUtf8( value->asString() );
} else {
kdDebug(5700) << "No value: " << cl->asString() << endl;
- return QString::null;
+ return TQString::null;
}
}
-QDate VCardFormatImpl::readDateValue( ContentLine *cl )
+TQDate VCardFormatImpl::readDateValue( ContentLine *cl )
{
DateValue *dateValue = (DateValue *)cl->value();
if ( dateValue )
return dateValue->qdate();
else
- return QDate();
+ return TQDate();
}
-QDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl )
+TQDateTime VCardFormatImpl::readDateTimeValue( ContentLine *cl )
{
DateValue *dateValue = (DateValue *)cl->value();
if ( dateValue )
return dateValue->qdt();
else
- return QDateTime();
+ return TQDateTime();
}
Geo VCardFormatImpl::readGeoValue( ContentLine *cl )
@@ -742,18 +742,18 @@ Key VCardFormatImpl::readKeyValue( VCARD::ContentLine *cl )
key.setType( Key::PGP );
else {
key.setType( Key::Custom );
- key.setCustomTypeString( QString::fromUtf8( (*it)->value() ) );
+ key.setCustomTypeString( TQString::fromUtf8( (*it)->value() ) );
}
}
}
if ( isBinary ) {
- QByteArray data;
+ TQByteArray data;
KCodecs::base64Decode( v->asString().stripWhiteSpace(), data );
key.setBinaryData( data );
} else {
- key.setTextData( QString::fromUtf8( v->asString() ) );
+ key.setTextData( TQString::fromUtf8( v->asString() ) );
}
return key;
@@ -773,7 +773,7 @@ void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent )
ParamList params;
if ( agent.isIntern() ) {
- QString vstr;
+ TQString vstr;
Addressee *addr = agent.addressee();
if ( addr ) {
writeToString( (*addr), vstr );
@@ -807,7 +807,7 @@ Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl )
}
if ( isIntern ) {
- QString vstr = QString::fromUtf8( v->asString() );
+ TQString vstr = TQString::fromUtf8( v->asString() );
vstr.replace( "\\n", "\r\n" );
vstr.replace( "\\:", ":" );
vstr.replace( "\\,", "," );
@@ -816,7 +816,7 @@ Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl )
readFromString( vstr, *addr );
agent.setAddressee( addr );
} else {
- agent.setUrl( QString::fromUtf8( v->asString() ) );
+ agent.setUrl( TQString::fromUtf8( v->asString() ) );
}
return agent;
@@ -835,15 +835,15 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
ParamList params;
if ( pic.isIntern() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( intern ) { // only for vCard export we really write the data inline
- QByteArray data;
- QDataStream s( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream s( data, IO_WriteOnly );
s.setVersion( 4 ); // to produce valid png files
s << img;
cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
} else { // save picture in cache
- QString dir;
+ TQString dir;
if ( type == EntityPhoto )
dir = "photos";
if ( type == EntityLogo )
@@ -868,7 +868,7 @@ Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::Entity
{
Picture pic;
bool isInline = false;
- QString picType;
+ TQString picType;
TextValue *v = (TextValue *)cl->value();
ParamList params = cl->paramList();
@@ -877,13 +877,13 @@ Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::Entity
if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" )
isInline = true;
if ( (*it)->name() == "TYPE" && !(*it)->value().isEmpty() )
- picType = QString::fromUtf8( (*it)->value() );
+ picType = TQString::fromUtf8( (*it)->value() );
}
if ( isInline ) {
- QImage img;
+ TQImage img;
if ( v->asString() == "<dummy>" ) { // no picture inline stored => picture is in cache
- QString dir;
+ TQString dir;
if ( type == EntityPhoto )
dir = "photos";
if ( type == EntityLogo )
@@ -891,14 +891,14 @@ Picture VCardFormatImpl::readPictureValue( VCARD::ContentLine *cl, VCARD::Entity
img.load( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ) );
} else {
- QByteArray data;
+ TQByteArray data;
KCodecs::base64Decode( v->asString(), data );
img.loadFromData( data );
}
pic.setData( img );
pic.setType( picType );
} else {
- pic.setUrl( QString::fromUtf8( v->asString() ) );
+ pic.setUrl( TQString::fromUtf8( v->asString() ) );
}
return pic;
@@ -917,11 +917,11 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co
ParamList params;
if ( sound.isIntern() ) {
- QByteArray data = sound.data();
+ TQByteArray data = sound.data();
if ( intern ) { // only for vCard export we really write the data inline
cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
} else { // save sound in cache
- QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
+ TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
if ( file.open( IO_WriteOnly ) ) {
file.writeBlock( data );
}
@@ -951,9 +951,9 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &
}
if ( isInline ) {
- QByteArray data;
+ TQByteArray data;
if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache
- QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
+ TQFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
if ( file.open( IO_ReadOnly ) ) {
data = file.readAll();
file.close();
@@ -963,13 +963,13 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &
}
sound.setData( data );
} else {
- sound.setUrl( QString::fromUtf8( v->asString() ) );
+ sound.setUrl( TQString::fromUtf8( v->asString() ) );
}
return sound;
}
-bool VCardFormatImpl::readFromString( const QString &vcard, Addressee &addressee )
+bool VCardFormatImpl::readFromString( const TQString &vcard, Addressee &addressee )
{
VCardEntity e( vcard.utf8() );
VCardListIterator it( e.cardList() );
@@ -983,7 +983,7 @@ bool VCardFormatImpl::readFromString( const QString &vcard, Addressee &addressee
return false;
}
-bool VCardFormatImpl::writeToString( const Addressee &addressee, QString &vcard )
+bool VCardFormatImpl::writeToString( const Addressee &addressee, TQString &vcard )
{
VCardEntity vcards;
VCardList vcardlist;
@@ -995,7 +995,7 @@ bool VCardFormatImpl::writeToString( const Addressee &addressee, QString &vcard
vcardlist.append( v );
vcards.setCardList( vcardlist );
- vcard = QString::fromUtf8( vcards.asString() );
+ vcard = TQString::fromUtf8( vcards.asString() );
return true;
}
diff --git a/kabc/vcardformatimpl.h b/kabc/vcardformatimpl.h
index 3a29e3a92..78c466a86 100644
--- a/kabc/vcardformatimpl.h
+++ b/kabc/vcardformatimpl.h
@@ -21,8 +21,8 @@
#ifndef KABC_VCARDFORMATIMPL_H
#define KABC_VCARDFORMATIMPL_H
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include "address.h"
#include "addressee.h"
@@ -43,26 +43,26 @@ class AddressBook;
class KABC_EXPORT_DEPRECATED VCardFormatImpl
{
public:
- bool load( Addressee &, QFile *file );
- bool loadAll( AddressBook *, Resource *, QFile *file );
- void save( const Addressee &, QFile *file );
- void saveAll( AddressBook *, Resource *, QFile *file );
+ bool load( Addressee &, TQFile *file );
+ bool loadAll( AddressBook *, Resource *, TQFile *file );
+ void save( const Addressee &, TQFile *file );
+ void saveAll( AddressBook *, Resource *, TQFile *file );
- bool readFromString( const QString &vcard, Addressee &addr );
- bool writeToString( const Addressee &addressee, QString &vcard );
+ bool readFromString( const TQString &vcard, Addressee &addr );
+ bool writeToString( const Addressee &addressee, TQString &vcard );
protected:
bool loadAddressee( Addressee &, VCARD::VCard & );
void saveAddressee( const Addressee &, VCARD::VCard *, bool intern );
- void addTextValue (VCARD::VCard *, VCARD::EntityType, const QString & );
- QString readTextValue( VCARD::ContentLine * );
+ void addTextValue (VCARD::VCard *, VCARD::EntityType, const TQString & );
+ TQString readTextValue( VCARD::ContentLine * );
- void addDateValue( VCARD::VCard *, VCARD::EntityType, const QDate & );
- QDate readDateValue( VCARD::ContentLine * );
+ void addDateValue( VCARD::VCard *, VCARD::EntityType, const TQDate & );
+ TQDate readDateValue( VCARD::ContentLine * );
- void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const QDateTime & );
- QDateTime readDateTimeValue( VCARD::ContentLine * );
+ void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const TQDateTime & );
+ TQDateTime readDateTimeValue( VCARD::ContentLine * );
void addAddressValue( VCARD::VCard *, const Address & );
Address readAddressValue( VCARD::ContentLine * );
@@ -75,7 +75,7 @@ class KABC_EXPORT_DEPRECATED VCardFormatImpl
void addNValue( VCARD::VCard *, const Addressee & );
void readNValue( VCARD::ContentLine *, Addressee & );
- void addCustomValue( VCARD::VCard *, const QString & );
+ void addCustomValue( VCARD::VCard *, const TQString & );
void addAddressParam( VCARD::ContentLine *, int );
int readAddressParam( VCARD::ContentLine * );
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp
index 6725e3b65..6194cd0fe 100644
--- a/kabc/vcardformatplugin.cpp
+++ b/kabc/vcardformatplugin.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include "address.h"
#include "addressee.h"
@@ -36,12 +36,12 @@ VCardFormatPlugin::~VCardFormatPlugin()
{
}
-bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
+bool VCardFormatPlugin::load( Addressee &addressee, TQFile *file )
{
- QString data;
+ TQString data;
- QTextStream t( file );
- t.setEncoding( QTextStream::Latin1 );
+ TQTextStream t( file );
+ t.setEncoding( TQTextStream::Latin1 );
data = t.read();
VCardConverter converter;
@@ -55,12 +55,12 @@ bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
return false;
}
-bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, QFile *file )
+bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, TQFile *file )
{
- QString data;
+ TQString data;
- QTextStream t( file );
- t.setEncoding( QTextStream::Latin1 );
+ TQTextStream t( file );
+ t.setEncoding( TQTextStream::Latin1 );
data = t.read();
VCardConverter converter;
@@ -78,7 +78,7 @@ bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, QFile *file )
return true;
}
-void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
+void VCardFormatPlugin::save( const Addressee &addressee, TQFile *file )
{
VCardConverter converter ;
Addressee::List vcardlist;
@@ -86,12 +86,12 @@ void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
vcardlist.append( addressee );
- QTextStream t( file );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t( file );
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
t << converter.createVCards( vcardlist );
}
-void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, QFile *file )
+void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, TQFile *file )
{
VCardConverter converter;
Addressee::List vcardlist;
@@ -102,14 +102,14 @@ void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, QFile *file )
vcardlist.append( *it );
}
- QTextStream t( file );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t( file );
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
t << converter.createVCards( vcardlist );
}
-bool VCardFormatPlugin::checkFormat( QFile *file ) const
+bool VCardFormatPlugin::checkFormat( TQFile *file ) const
{
- QString line;
+ TQString line;
file->readLine( line, 1024 );
line = line.stripWhiteSpace();
diff --git a/kabc/vcardformatplugin.h b/kabc/vcardformatplugin.h
index 7733438ba..5ac7e49c2 100644
--- a/kabc/vcardformatplugin.h
+++ b/kabc/vcardformatplugin.h
@@ -40,12 +40,12 @@ class KABC_EXPORT VCardFormatPlugin : public FormatPlugin
VCardFormatPlugin();
virtual ~VCardFormatPlugin();
- bool load( Addressee &, QFile *file );
- bool loadAll( AddressBook *, Resource *, QFile *file );
- void save( const Addressee &, QFile *file );
- void saveAll( AddressBook *, Resource *, QFile *file );
+ bool load( Addressee &, TQFile *file );
+ bool loadAll( AddressBook *, Resource *, TQFile *file );
+ void save( const Addressee &, TQFile *file );
+ void saveAll( AddressBook *, Resource *, TQFile *file );
- bool checkFormat( QFile *file ) const;
+ bool checkFormat( TQFile *file ) const;
private:
struct VCardFormatPrivate;
diff --git a/kabc/vcardparser/testread.cpp b/kabc/vcardparser/testread.cpp
index 52fe81a11..bad2ceb78 100644
--- a/kabc/vcardparser/testread.cpp
+++ b/kabc/vcardparser/testread.cpp
@@ -20,8 +20,8 @@
#include <iostream>
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kprocess.h>
#include <kdebug.h>
@@ -59,18 +59,18 @@ int main( int argc, char **argv )
return 1;
}
- QString inputFile( args->arg( 0 ) );
+ TQString inputFile( args->arg( 0 ) );
- QFile file( inputFile );
+ TQFile file( inputFile );
if ( !file.open( IO_ReadOnly ) ) {
qDebug( "Unable to open file '%s' for reading!", file.name().latin1() );
return 1;
}
- QString text;
+ TQString text;
- QTextStream s( &file );
- s.setEncoding( QTextStream::Latin1 );
+ TQTextStream s( &file );
+ s.setEncoding( TQTextStream::Latin1 );
text = s.read();
file.close();
diff --git a/kabc/vcardparser/testread2.cpp b/kabc/vcardparser/testread2.cpp
index 19a02e3c9..ba73081e7 100644
--- a/kabc/vcardparser/testread2.cpp
+++ b/kabc/vcardparser/testread2.cpp
@@ -9,7 +9,7 @@ int
main()
{
Addressee::List l = vCardsAsAddresseeList();
- QString vcards = vCardsAsText();
+ TQString vcards = vCardsAsText();
VCardConverter vct;
diff --git a/kabc/vcardparser/testutils.cpp b/kabc/vcardparser/testutils.cpp
index 086dd297e..df4b60c9c 100644
--- a/kabc/vcardparser/testutils.cpp
+++ b/kabc/vcardparser/testutils.cpp
@@ -1,6 +1,6 @@
#include <vcardparser.h>
#include <kabc/addressee.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace KABC;
@@ -62,12 +62,12 @@ vcard3()
QString
-vcardAsText( const QString& location )
+vcardAsText( const TQString& location )
{
- QString line;
- QFile file( location );
+ TQString line;
+ TQFile file( location );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
if ( !stream.eof() ) {
line = stream.read();
}
@@ -91,7 +91,7 @@ vCardsAsAddresseeList()
QString
vCardsAsText()
{
- QString vcards = vcardAsText( "tests/vcard1.vcf" );
+ TQString vcards = vcardAsText( "tests/vcard1.vcf" );
vcards += vcardAsText( "tests/vcard2.vcf" );
vcards += vcardAsText( "tests/vcard3.vcf" );
diff --git a/kabc/vcardparser/testutils.h b/kabc/vcardparser/testutils.h
index 369912ac0..4f2024177 100644
--- a/kabc/vcardparser/testutils.h
+++ b/kabc/vcardparser/testutils.h
@@ -2,13 +2,13 @@
#define TESTUTILS_H
#include <kabc/addressee.h>
-#include <qstring.h>
+#include <tqstring.h>
KABC::Addressee vcard1();
KABC::Addressee vcard2();
KABC::Addressee vcard3();
KABC::Addressee::List vCardsAsAddresseeList();
-QString vCardAsText( const QString& location );
-QString vCardsAsText();
+TQString vCardAsText( const TQString& location );
+TQString vCardsAsText();
#endif
diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp
index 7d2f77c83..f6e894f4b 100644
--- a/kabc/vcardparser/testwrite.cpp
+++ b/kabc/vcardparser/testwrite.cpp
@@ -28,8 +28,8 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "vcardconverter.h"
@@ -46,7 +46,7 @@ int main( int argc, char **argv )
addressee.setNameFromString( "Mr. Tobias Koenig Jr." );
addressee.setNickName( "tokoe" );
- addressee.setBirthday( QDate( 1982, 7, 19 ) );
+ addressee.setBirthday( TQDate( 1982, 7, 19 ) );
addressee.setMailer( "mutt1.2" );
addressee.setTimeZone( KABC::TimeZone( +2 ) );
@@ -60,26 +60,26 @@ int main( int argc, char **argv )
addressee.setOrganization( "KDE" );
addressee.setNote( "nerver\ntouch a running system" );
addressee.setProductId( "testId" );
- addressee.setRevision( QDateTime::currentDateTime() );
+ addressee.setRevision( TQDateTime::currentDateTime() );
addressee.setSortString( "koenig" );
addressee.setUrl( KURL( "http://wgess16.dyndns.org") );
addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) );
/*
- QImage img;
+ TQImage img;
img.load( "testimg.png", "PNG" );
KABC::Picture photo;
photo.setData( img );
addressee.setPhoto( photo );
- QImage img2;
+ TQImage img2;
img2.load( "testimg.png", "PNG" );
KABC::Picture logo;
logo.setData( img2 );
addressee.setLogo( logo );
- QFile soundFile( "testsound.wav" );
+ TQFile soundFile( "testsound.wav" );
soundFile.open( IO_ReadOnly );
- QByteArray data = soundFile.readAll();
+ TQByteArray data = soundFile.readAll();
soundFile.close();
KABC::Sound sound;
sound.setData( data );
@@ -96,7 +96,7 @@ int main( int argc, char **argv )
KABC::Key key( "secret key", KABC::Key::X509 );
addressee.insertKey( key );
- QStringList categories;
+ TQStringList categories;
categories << "Friends" << "School" << "KDE";
addressee.setCategories( categories );
@@ -115,18 +115,18 @@ int main( int argc, char **argv )
KABC::Addressee::List list;
for ( int i = 0; i < 1000; ++i ) {
KABC::Addressee addr = addressee;
- addr.setUid( QString::number( i ) );
+ addr.setUid( TQString::number( i ) );
list.append( addr );
}
KABC::VCardConverter converter;
- QString txt = converter.createVCards( list );
+ TQString txt = converter.createVCards( list );
- QFile file( "out.vcf" );
+ TQFile file( "out.vcf" );
file.open( IO_WriteOnly );
- QTextStream s( &file );
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream s( &file );
+ s.setEncoding( TQTextStream::UnicodeUTF8 );
s << txt;
file.close();
diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp
index 410a958d1..30a8e1c49 100644
--- a/kabc/vcardparser/vcard.cpp
+++ b/kabc/vcardparser/vcard.cpp
@@ -50,7 +50,7 @@ void VCard::clear()
mLineMap.clear();
}
-QStringList VCard::identifiers() const
+TQStringList VCard::identifiers() const
{
return mLineMap.keys();
}
@@ -60,7 +60,7 @@ void VCard::addLine( const VCardLine& line )
mLineMap[ line.identifier() ].append( line );
}
-VCardLine::List VCard::lines( const QString& identifier ) const
+VCardLine::List VCard::lines( const TQString& identifier ) const
{
LineMap::ConstIterator it = mLineMap.find( identifier );
if ( it == mLineMap.end() )
@@ -69,7 +69,7 @@ VCardLine::List VCard::lines( const QString& identifier ) const
return *it;
}
-VCardLine VCard::line( const QString& identifier ) const
+VCardLine VCard::line( const TQString& identifier ) const
{
LineMap::ConstIterator it = mLineMap.find( identifier );
if ( it == mLineMap.end() )
diff --git a/kabc/vcardparser/vcard.h b/kabc/vcardparser/vcard.h
index 73fcd1ea2..6afeeda26 100644
--- a/kabc/vcardparser/vcard.h
+++ b/kabc/vcardparser/vcard.h
@@ -22,17 +22,17 @@
#define VCARDPARSER_VCARD_H
#include "vcardline.h"
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
namespace KABC {
class VCard
{
public:
- typedef QValueList<VCard> List;
- typedef QMap< QString, VCardLine::List > LineMap;
+ typedef TQValueList<VCard> List;
+ typedef TQMap< TQString, VCardLine::List > LineMap;
enum Version { v2_1, v3_0 };
@@ -52,7 +52,7 @@ class VCard
* Returns a list of all identifiers that exists in the
* vCard.
*/
- QStringList identifiers() const;
+ TQStringList identifiers() const;
/**
* Adds a VCardLine to the VCard
@@ -62,12 +62,12 @@ class VCard
/**
* Returns all lines of the vcard with a special identifier.
*/
- VCardLine::List lines( const QString& identifier ) const;
+ VCardLine::List lines( const TQString& identifier ) const;
/**
* Returns only the first line of the vcard with a special identifier.
*/
- VCardLine line( const QString& identifier ) const;
+ VCardLine line( const TQString& identifier ) const;
/**
* Set the version of the vCard.
diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp
index 247604ebb..6680cf7d0 100644
--- a/kabc/vcardparser/vcardline.cpp
+++ b/kabc/vcardparser/vcardline.cpp
@@ -25,7 +25,7 @@ using namespace KABC;
class VCardLine::VCardLinePrivate
{
public:
- QString mGroup;
+ TQString mGroup;
};
VCardLine::VCardLine()
@@ -33,13 +33,13 @@ VCardLine::VCardLine()
{
}
-VCardLine::VCardLine( const QString &identifier )
+VCardLine::VCardLine( const TQString &identifier )
: d( 0 )
{
mIdentifier = identifier;
}
-VCardLine::VCardLine( const QString &identifier, const QVariant &value )
+VCardLine::VCardLine( const TQString &identifier, const TQVariant &value )
: d( 0 )
{
mIdentifier = identifier;
@@ -72,27 +72,27 @@ VCardLine& VCardLine::operator=( const VCardLine& line )
return *this;
}
-void VCardLine::setIdentifier( const QString& identifier )
+void VCardLine::setIdentifier( const TQString& identifier )
{
mIdentifier = identifier;
}
-QString VCardLine::identifier() const
+TQString VCardLine::identifier() const
{
return mIdentifier;
}
-void VCardLine::setValue( const QVariant& value )
+void VCardLine::setValue( const TQVariant& value )
{
mValue = value;
}
-QVariant VCardLine::value() const
+TQVariant VCardLine::value() const
{
return mValue;
}
-void VCardLine::setGroup( const QString& group )
+void VCardLine::setGroup( const TQString& group )
{
if ( !d )
d = new VCardLinePrivate();
@@ -100,12 +100,12 @@ void VCardLine::setGroup( const QString& group )
d->mGroup = group;
}
-QString VCardLine::group() const
+TQString VCardLine::group() const
{
if ( d )
return d->mGroup;
else
- return QString();
+ return TQString();
}
bool VCardLine::hasGroup() const
@@ -116,35 +116,35 @@ bool VCardLine::hasGroup() const
return d->mGroup.isEmpty();
}
-QStringList VCardLine::parameterList() const
+TQStringList VCardLine::parameterList() const
{
return mParamMap.keys();
}
-void VCardLine::addParameter( const QString& param, const QString& value )
+void VCardLine::addParameter( const TQString& param, const TQString& value )
{
- QStringList &list = mParamMap[ param ];
+ TQStringList &list = mParamMap[ param ];
if ( list.findIndex( value ) == -1 ) // not included yet
list.append( value );
}
-QStringList VCardLine::parameters( const QString& param ) const
+TQStringList VCardLine::parameters( const TQString& param ) const
{
ParamMap::ConstIterator it = mParamMap.find( param );
if ( it == mParamMap.end() )
- return QStringList();
+ return TQStringList();
else
return *it;
}
-QString VCardLine::parameter( const QString& param ) const
+TQString VCardLine::parameter( const TQString& param ) const
{
ParamMap::ConstIterator it = mParamMap.find( param );
if ( it == mParamMap.end() )
- return QString::null;
+ return TQString::null;
else {
if ( (*it).isEmpty() )
- return QString::null;
+ return TQString::null;
else
return (*it).first();
}
diff --git a/kabc/vcardparser/vcardline.h b/kabc/vcardparser/vcardline.h
index d6ad9dd77..92fe743f6 100644
--- a/kabc/vcardparser/vcardline.h
+++ b/kabc/vcardparser/vcardline.h
@@ -21,23 +21,23 @@
#ifndef VCARDLINE_H
#define VCARDLINE_H
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqmap.h>
+#include <tqstring.h>
namespace KABC {
class VCardLine
{
public:
- typedef QValueList<VCardLine> List;
- typedef QMap<QString, QStringList> ParamMap;
+ typedef TQValueList<VCardLine> List;
+ typedef TQMap<TQString, TQStringList> ParamMap;
VCardLine();
- VCardLine( const QString &identifier );
- VCardLine( const QString &identifier, const QVariant &value );
+ VCardLine( const TQString &identifier );
+ VCardLine( const TQString &identifier, const TQVariant &value );
VCardLine( const VCardLine& );
~VCardLine();
@@ -47,32 +47,32 @@ class VCardLine
/**
* Sets the identifier of this line e.g. UID, FN, CLASS
*/
- void setIdentifier( const QString& identifier );
+ void setIdentifier( const TQString& identifier );
/**
* Returns the identifier of this line.
*/
- QString identifier() const;
+ TQString identifier() const;
/**
* Sets the value of of this line.
*/
- void setValue( const QVariant& value );
+ void setValue( const TQVariant& value );
/**
* Returns the value of this line.
*/
- QVariant value() const;
+ TQVariant value() const;
/**
* Sets the group the line belongs to.
*/
- void setGroup( const QString& group );
+ void setGroup( const TQString& group );
/**
* Returns the group the line belongs to.
*/
- QString group() const;
+ TQString group() const;
/**
* Returns whether the line belongs to a group.
@@ -82,29 +82,29 @@ class VCardLine
/**
* Returns all parameters.
*/
- QStringList parameterList() const;
+ TQStringList parameterList() const;
/**
* Add a new parameter to the line.
*/
- void addParameter( const QString& param, const QString& value );
+ void addParameter( const TQString& param, const TQString& value );
/**
* Returns the values of a special parameter.
* You can get a list of all parameters with paramList().
*/
- QStringList parameters( const QString& param ) const;
+ TQStringList parameters( const TQString& param ) const;
/**
* Returns only the first value of a special parameter.
* You can get a list of all parameters with paramList().
*/
- QString parameter( const QString& param ) const;
+ TQString parameter( const TQString& param ) const;
private:
ParamMap mParamMap;
- QString mIdentifier;
- QVariant mValue;
+ TQString mIdentifier;
+ TQVariant mValue;
class VCardLinePrivate;
VCardLinePrivate *d;
diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp
index df622b22f..67b1bc306 100644
--- a/kabc/vcardparser/vcardparser.cpp
+++ b/kabc/vcardparser/vcardparser.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kmdcodec.h>
@@ -29,12 +29,12 @@
using namespace KABC;
-static QString backslash( "\\\\" );
-static QString comma( "\\," );
-static QString newline( "\\n" );
-static QString cr( "\\r" );
+static TQString backslash( "\\\\" );
+static TQString comma( "\\," );
+static TQString newline( "\\n" );
+static TQString cr( "\\r" );
-static void addEscapes( QString &str )
+static void addEscapes( TQString &str )
{
str.replace( '\\', backslash );
str.replace( ',', comma );
@@ -42,7 +42,7 @@ static void addEscapes( QString &str )
str.replace( '\n', newline );
}
-static void removeEscapes( QString &str )
+static void removeEscapes( TQString &str )
{
str.replace( cr, "\\r" );
str.replace( newline, "\n" );
@@ -58,26 +58,26 @@ VCardParser::~VCardParser()
{
}
-VCard::List VCardParser::parseVCards( const QString& text )
+VCard::List VCardParser::parseVCards( const TQString& text )
{
- static QRegExp sep( "[\x0d\x0a]" );
+ static TQRegExp sep( "[\x0d\x0a]" );
VCard currentVCard;
VCard::List vCardList;
- QString currentLine;
+ TQString currentLine;
- const QStringList lines = QStringList::split( sep, text );
- QStringList::ConstIterator it;
+ const TQStringList lines = TQStringList::split( sep, text );
+ TQStringList::ConstIterator it;
bool inVCard = false;
- QStringList::ConstIterator linesEnd( lines.end() );
+ TQStringList::ConstIterator linesEnd( lines.end() );
for ( it = lines.begin(); it != linesEnd; ++it ) {
if ( (*it).isEmpty() ) // empty line
continue;
if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous
- currentLine += QString( *it ).remove( 0, 1 );
+ currentLine += TQString( *it ).remove( 0, 1 );
continue;
} else {
if ( inVCard && !currentLine.isEmpty() ) { // now parse the line
@@ -88,23 +88,23 @@ VCard::List VCardParser::parseVCards( const QString& text )
}
VCardLine vCardLine;
- const QString key = currentLine.left( colon ).stripWhiteSpace();
- QString value = currentLine.mid( colon + 1 );
+ const TQString key = currentLine.left( colon ).stripWhiteSpace();
+ TQString value = currentLine.mid( colon + 1 );
- QStringList params = QStringList::split( ';', key );
+ TQStringList params = TQStringList::split( ';', key );
// check for group
if ( params[0].find( '.' ) != -1 ) {
- const QStringList groupList = QStringList::split( '.', params[0] );
+ const TQStringList groupList = TQStringList::split( '.', params[0] );
vCardLine.setGroup( groupList[0] );
vCardLine.setIdentifier( groupList[1] );
} else
vCardLine.setIdentifier( params[0] );
if ( params.count() > 1 ) { // find all parameters
- QStringList::ConstIterator paramIt = params.begin();
+ TQStringList::ConstIterator paramIt = params.begin();
for ( ++paramIt; paramIt != params.end(); ++paramIt ) {
- QStringList pair = QStringList::split( '=', *paramIt );
+ TQStringList pair = TQStringList::split( '=', *paramIt );
if ( pair.size() == 1 ) {
// correct the fucking 2.1 'standard'
if ( pair[0].lower() == "quoted-printable" ) {
@@ -119,8 +119,8 @@ VCard::List VCardParser::parseVCards( const QString& text )
}
// This is pretty much a faster pair[1].contains( ',' )...
if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format
- const QStringList args = QStringList::split( ',', pair[ 1 ] );
- QStringList::ConstIterator argIt;
+ const TQStringList args = TQStringList::split( ',', pair[ 1 ] );
+ TQStringList::ConstIterator argIt;
for ( argIt = args.begin(); argIt != args.end(); ++argIt )
vCardLine.addParameter( pair[0].lower(), *argIt );
} else
@@ -130,13 +130,13 @@ VCard::List VCardParser::parseVCards( const QString& text )
removeEscapes( value );
- QByteArray output;
+ TQByteArray output;
bool wasBase64Encoded = false;
params = vCardLine.parameterList();
if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data
- QByteArray input;
- input = QCString(value.latin1());
+ TQByteArray input;
+ input = TQCString(value.latin1());
if ( vCardLine.parameter( "encoding" ).lower() == "b" ||
vCardLine.parameter( "encoding" ).lower() == "base64" ) {
KCodecs::base64Decode( input, output );
@@ -148,25 +148,25 @@ VCard::List VCardParser::parseVCards( const QString& text )
value = value.remove( value.length() - 1, 1 ) + (*it);
++it;
}
- input = QCString(value.latin1());
+ input = TQCString(value.latin1());
KCodecs::quotedPrintableDecode( input, output );
}
} else {
- output = QCString(value.latin1());
+ output = TQCString(value.latin1());
}
if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data
- QTextCodec *codec =
- QTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() );
+ TQTextCodec *codec =
+ TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() );
if ( codec ) {
vCardLine.setValue( codec->toUnicode( output ) );
} else {
- vCardLine.setValue( QString::fromUtf8( output ) );
+ vCardLine.setValue( TQString::fromUtf8( output ) );
}
} else if ( wasBase64Encoded ) {
vCardLine.setValue( output );
} else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions)
- vCardLine.setValue( QString::fromUtf8( output ) );
+ vCardLine.setValue( TQString::fromUtf8( output ) );
}
currentVCard.addLine( vCardLine );
@@ -195,17 +195,17 @@ VCard::List VCardParser::parseVCards( const QString& text )
return vCardList;
}
-QString VCardParser::createVCards( const VCard::List& list )
+TQString VCardParser::createVCards( const VCard::List& list )
{
- QString text;
- QString textLine;
- QString encodingType;
- QStringList idents;
- QStringList params;
- QStringList values;
- QStringList::ConstIterator identIt;
- QStringList::Iterator paramIt;
- QStringList::ConstIterator valueIt;
+ TQString text;
+ TQString textLine;
+ TQString encodingType;
+ TQStringList idents;
+ TQStringList params;
+ TQStringList values;
+ TQStringList::ConstIterator identIt;
+ TQStringList::Iterator paramIt;
+ TQStringList::ConstIterator valueIt;
VCardLine::List lines;
VCardLine::List::ConstIterator lineIt;
@@ -227,7 +227,7 @@ QString VCardParser::createVCards( const VCard::List& list )
// iterate over the lines
for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) {
if ( !(*lineIt).value().asString().isEmpty() ) {
- if ((*lineIt).identifier() != QString("URI")) {
+ if ((*lineIt).identifier() != TQString("URI")) {
if ( (*lineIt).hasGroup() )
textLine = (*lineIt).group() + "." + (*lineIt).identifier();
else
@@ -252,7 +252,7 @@ QString VCardParser::createVCards( const VCard::List& list )
}
if ( hasEncoding ) { // have to encode the data
- QByteArray input, output;
+ TQByteArray input, output;
if ( encodingType == "b" ) {
input = (*lineIt).value().toByteArray();
KCodecs::base64Encode( input, output );
@@ -262,11 +262,11 @@ QString VCardParser::createVCards( const VCard::List& list )
KCodecs::quotedPrintableEncode( input, output, false );
}
- QString value( output );
+ TQString value( output );
addEscapes( value );
textLine.append( ":" + value );
} else {
- QString value( (*lineIt).value().asString() );
+ TQString value( (*lineIt).value().asString() );
addEscapes( value );
textLine.append( ":" + value );
}
@@ -280,7 +280,7 @@ QString VCardParser::createVCards( const VCard::List& list )
else {
// URIs can be full of weird symbols, etc. so bypass all checks
textLine = (*lineIt).identifier();
- QString value( (*lineIt).value().asString() );
+ TQString value( (*lineIt).value().asString() );
addEscapes( value );
textLine.append( ":" + value );
text.append( textLine + "\r\n" );
diff --git a/kabc/vcardparser/vcardparser.h b/kabc/vcardparser/vcardparser.h
index 31e13424c..da5fdd46e 100644
--- a/kabc/vcardparser/vcardparser.h
+++ b/kabc/vcardparser/vcardparser.h
@@ -31,8 +31,8 @@ class VCardParser
VCardParser();
~VCardParser();
- static VCard::List parseVCards( const QString& text );
- static QString createVCards( const VCard::List& list );
+ static VCard::List parseVCards( const TQString& text );
+ static TQString createVCards( const VCard::List& list );
private:
class VCardParserPrivate;
diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp
index 566b5968d..6e8dc9acc 100644
--- a/kabc/vcardtool.cpp
+++ b/kabc/vcardtool.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
#include "agent.h"
#include "key.h"
@@ -32,7 +32,7 @@
using namespace KABC;
-static bool needsEncoding( const QString &value )
+static bool needsEncoding( const TQString &value )
{
uint length = value.length();
for ( uint i = 0; i < length; ++i ) {
@@ -75,7 +75,7 @@ VCardTool::~VCardTool()
}
// TODO: make list a const&
-QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
+TQString VCardTool::createVCards( Addressee::List list, VCard::Version version )
{
VCard::List vCardList;
@@ -83,12 +83,12 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
Addressee::List::ConstIterator listEnd( list.constEnd() );
for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) {
VCard card;
- QStringList::ConstIterator strIt;
+ TQStringList::ConstIterator strIt;
// ADR + LABEL
const Address::List addresses = (*addrIt).addresses();
for ( Address::List::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) {
- QStringList address;
+ TQStringList address;
bool isEmpty = ( (*it).postOfficeBox().isEmpty() &&
(*it).extended().isEmpty() &&
@@ -119,7 +119,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
}
bool hasLabel = !(*it).label().isEmpty();
- QMap<QString, int>::ConstIterator typeIt;
+ TQMap<TQString, int>::ConstIterator typeIt;
for ( typeIt = mAddressTypeMap.constBegin(); typeIt != mAddressTypeMap.constEnd(); ++typeIt ) {
if ( typeIt.data() & (*it).type() ) {
adrLine.addParameter( "TYPE", typeIt.key() );
@@ -142,8 +142,8 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
// CATEGORIES
if ( version == VCard::v3_0 ) {
- QStringList categories = (*addrIt).categories();
- QStringList::Iterator catIt;
+ TQStringList categories = (*addrIt).categories();
+ TQStringList::Iterator catIt;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt )
(*catIt).replace( ',', "\\," );
@@ -162,7 +162,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
}
// EMAIL
- const QStringList emails = (*addrIt).emails();
+ const TQStringList emails = (*addrIt).emails();
bool pref = true;
for ( strIt = emails.begin(); strIt != emails.end(); ++strIt ) {
VCardLine line( "EMAIL", *strIt );
@@ -184,7 +184,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
// GEO
Geo geo = (*addrIt).geo();
if ( geo.isValid() ) {
- QString str;
+ TQString str;
str.sprintf( "%.6f;%.6f", geo.latitude(), geo.longitude() );
card.addLine( VCardLine( "GEO", str ) );
}
@@ -207,7 +207,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
card.addLine( mailerLine );
// N
- QStringList name;
+ TQStringList name;
name.append( (*addrIt).familyName().replace( ';', "\\;" ) );
name.append( (*addrIt).givenName().replace( ';', "\\;" ) );
name.append( (*addrIt).additionalName().replace( ';', "\\;" ) );
@@ -242,7 +242,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
card.addLine( noteLine );
// ORG
- QStringList organization;
+ TQStringList organization;
organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) );
if ( !( *addrIt ).department().isEmpty() )
organization.append( ( *addrIt ).department().replace( ';', "\\;" ) );
@@ -284,7 +284,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) {
VCardLine line( "TEL", (*phoneIt).number() );
- QMap<QString, int>::ConstIterator typeIt;
+ TQMap<TQString, int>::ConstIterator typeIt;
for ( typeIt = mPhoneTypeMap.constBegin(); typeIt != mPhoneTypeMap.constEnd(); ++typeIt ) {
if ( typeIt.data() & (*phoneIt).type() )
line.addParameter( "TYPE", typeIt.key() );
@@ -304,7 +304,7 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
// TZ
TimeZone timeZone = (*addrIt).timeZone();
if ( timeZone.isValid() ) {
- QString str;
+ TQString str;
int neg = 1;
if ( timeZone.offset() < 0 )
@@ -333,10 +333,10 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
card.addLine( VCardLine( "VERSION", "3.0" ) );
// X-
- const QStringList customs = (*addrIt).customs();
+ const TQStringList customs = (*addrIt).customs();
for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) {
- QString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) );
- QString value = (*strIt).mid( (*strIt).find( ":" ) + 1 );
+ TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) );
+ TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 );
if ( value.isEmpty() )
continue;
@@ -354,11 +354,11 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
return VCardParser::createVCards( vCardList );
}
-Addressee::List VCardTool::parseVCards( const QString& vcard )
+Addressee::List VCardTool::parseVCards( const TQString& vcard )
{
- static const QChar semicolonSep( ';' );
- static const QChar commaSep( ',' );
- QString identifier;
+ static const TQChar semicolonSep( ';' );
+ static const TQChar commaSep( ',' );
+ TQString identifier;
Addressee::List addrList;
const VCard::List vCardList = VCardParser::parseVCards( vcard );
@@ -368,9 +368,9 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
for ( cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt ) {
Addressee addr;
- const QStringList idents = (*cardIt).identifiers();
- QStringList::ConstIterator identIt;
- QStringList::ConstIterator identEnd( idents.end() );
+ const TQStringList idents = (*cardIt).identifiers();
+ TQStringList::ConstIterator identIt;
+ TQStringList::ConstIterator identEnd( idents.end() );
for ( identIt = idents.begin(); identIt != identEnd; ++identIt ) {
const VCardLine::List lines = (*cardIt).lines( (*identIt) );
VCardLine::List::ConstIterator lineIt;
@@ -381,7 +381,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// ADR
if ( identifier == "adr" ) {
Address address;
- const QStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() );
+ const TQStringList addrParts = splitString( semicolonSep, (*lineIt).value().asString() );
if ( addrParts.count() > 0 )
address.setPostOfficeBox( addrParts[ 0 ] );
if ( addrParts.count() > 1 )
@@ -399,8 +399,8 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
int type = 0;
- const QStringList types = (*lineIt).parameters( "type" );
- for ( QStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
+ const TQStringList types = (*lineIt).parameters( "type" );
+ for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
type += mAddressTypeMap[ (*it).lower() ];
address.setType( type );
@@ -417,7 +417,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// CATEGORIES
else if ( identifier == "categories" ) {
- const QStringList categories = splitString( commaSep, (*lineIt).value().asString() );
+ const TQStringList categories = splitString( commaSep, (*lineIt).value().asString() );
addr.setCategories( categories );
}
@@ -427,7 +427,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// EMAIL
else if ( identifier == "email" ) {
- const QStringList types = (*lineIt).parameters( "type" );
+ const TQStringList types = (*lineIt).parameters( "type" );
addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 );
}
@@ -439,7 +439,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
else if ( identifier == "geo" ) {
Geo geo;
- const QStringList geoParts = QStringList::split( ';', (*lineIt).value().asString(), true );
+ const TQStringList geoParts = TQStringList::split( ';', (*lineIt).value().asString(), true );
geo.setLatitude( geoParts[ 0 ].toFloat() );
geo.setLongitude( geoParts[ 1 ].toFloat() );
@@ -454,8 +454,8 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
else if ( identifier == "label" ) {
int type = 0;
- const QStringList types = (*lineIt).parameters( "type" );
- for ( QStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
+ const TQStringList types = (*lineIt).parameters( "type" );
+ for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
type += mAddressTypeMap[ (*it).lower() ];
bool available = false;
@@ -487,7 +487,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// N
else if ( identifier == "n" ) {
- const QStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() );
+ const TQStringList nameParts = splitString( semicolonSep, (*lineIt).value().asString() );
if ( nameParts.count() > 0 )
addr.setFamilyName( nameParts[ 0 ] );
if ( nameParts.count() > 1 )
@@ -514,7 +514,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// ORGANIZATION
else if ( identifier == "org" ) {
- const QStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() );
+ const TQStringList orgParts = splitString( semicolonSep, (*lineIt).value().asString() );
if ( orgParts.count() > 0 )
addr.setOrganization( orgParts[ 0 ] );
if ( orgParts.count() > 1 )
@@ -552,8 +552,8 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
int type = 0;
- const QStringList types = (*lineIt).parameters( "type" );
- for ( QStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
+ const TQStringList types = (*lineIt).parameters( "type" );
+ for ( TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it )
type += mPhoneTypeMap[(*it).upper()];
phone.setType( type );
@@ -568,7 +568,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// TZ
else if ( identifier == "tz" ) {
TimeZone tz;
- const QString date = (*lineIt).value().asString();
+ const TQString date = (*lineIt).value().asString();
int hours = date.mid( 1, 2).toInt();
int minutes = date.mid( 4, 2 ).toInt();
@@ -593,7 +593,7 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
// X-
else if ( identifier.startsWith( "x-" ) ) {
- const QString key = (*lineIt).identifier().mid( 2 );
+ const TQString key = (*lineIt).identifier().mid( 2 );
int dash = key.find( "-" );
addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() );
}
@@ -606,39 +606,39 @@ Addressee::List VCardTool::parseVCards( const QString& vcard )
return addrList;
}
-QDateTime VCardTool::parseDateTime( const QString &str )
+TQDateTime VCardTool::parseDateTime( const TQString &str )
{
- QDateTime dateTime;
+ TQDateTime dateTime;
if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd)
- dateTime.setDate( QDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(),
+ dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(),
str.mid( 6, 2 ).toInt() ) );
if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss
- dateTime.setTime( QTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
+ dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
str.mid( 17, 2 ).toInt() ) );
} else { // is extended format yyyy-mm-dd
- dateTime.setDate( QDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(),
+ dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(),
str.mid( 8, 2 ).toInt() ) );
if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss
- dateTime.setTime( QTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
+ dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
str.mid( 17, 2 ).toInt() ) );
}
return dateTime;
}
-QString VCardTool::createDateTime( const QDateTime &dateTime )
+TQString VCardTool::createDateTime( const TQDateTime &dateTime )
{
- QString str;
+ TQString str;
if ( dateTime.date().isValid() ) {
str.sprintf( "%4d-%02d-%02d", dateTime.date().year(), dateTime.date().month(),
dateTime.date().day() );
if ( dateTime.time().isValid() ) {
- QString tmp;
+ TQString tmp;
tmp.sprintf( "T%02d:%02d:%02dZ", dateTime.time().hour(), dateTime.time().minute(),
dateTime.time().second() );
str += tmp;
@@ -652,9 +652,9 @@ Picture VCardTool::parsePicture( const VCardLine &line )
{
Picture pic;
- const QStringList params = line.parameterList();
+ const TQStringList params = line.parameterList();
if ( params.findIndex( "encoding" ) != -1 ) {
- QImage img;
+ TQImage img;
img.loadFromData( line.value().asByteArray() );
pic.setData( img );
} else if ( params.findIndex( "value" ) != -1 ) {
@@ -668,17 +668,17 @@ Picture VCardTool::parsePicture( const VCardLine &line )
return pic;
}
-VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pic )
+VCardLine VCardTool::createPicture( const TQString &identifier, const Picture &pic )
{
VCardLine line( identifier );
if ( pic.isIntern() ) {
if ( !pic.data().isNull() ) {
- QByteArray input;
- QBuffer buffer( input );
+ TQByteArray input;
+ TQBuffer buffer( input );
buffer.open( IO_WriteOnly );
- QImageIO iio( &buffer, "JPEG" );
+ TQImageIO iio( &buffer, "JPEG" );
iio.setImage( pic.data() );
iio.setQuality( 100 );
iio.write();
@@ -699,7 +699,7 @@ Sound VCardTool::parseSound( const VCardLine &line )
{
Sound snd;
- const QStringList params = line.parameterList();
+ const TQStringList params = line.parameterList();
if ( params.findIndex( "encoding" ) != -1 )
snd.setData( line.value().asByteArray() );
else if ( params.findIndex( "value" ) != -1 ) {
@@ -737,7 +737,7 @@ Key VCardTool::parseKey( const VCardLine &line )
{
Key key;
- const QStringList params = line.parameterList();
+ const TQStringList params = line.parameterList();
if ( params.findIndex( "encoding" ) != -1 )
key.setBinaryData( line.value().asByteArray() );
else
@@ -813,12 +813,12 @@ Agent VCardTool::parseAgent( const VCardLine &line )
{
Agent agent;
- const QStringList params = line.parameterList();
+ const TQStringList params = line.parameterList();
if ( params.findIndex( "value" ) != -1 ) {
if ( line.parameter( "value" ).lower() == "uri" )
agent.setUrl( line.value().asString() );
} else {
- QString str = line.value().asString();
+ TQString str = line.value().asString();
str.replace( "\\n", "\r\n" );
str.replace( "\\N", "\r\n" );
str.replace( "\\;", ";" );
@@ -845,7 +845,7 @@ VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent )
Addressee::List list;
list.append( *agent.addressee() );
- QString str = createVCards( list, version );
+ TQString str = createVCards( list, version );
str.replace( "\r\n", "\\n" );
str.replace( ";", "\\;" );
str.replace( ":", "\\:" );
@@ -860,10 +860,10 @@ VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent )
return line;
}
-QStringList VCardTool::splitString( const QChar &sep, const QString &str )
+TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str )
{
- QStringList list;
- QString value( str );
+ TQStringList list;
+ TQString value( str );
int start = 0;
int pos = value.find( sep, start );
@@ -873,7 +873,7 @@ QStringList VCardTool::splitString( const QChar &sep, const QString &str )
if ( pos > start && pos <= (int)value.length() )
list << value.mid( start, pos - start );
else
- list << QString::null;
+ list << TQString::null;
start = pos + 1;
pos = value.find( sep, start );
@@ -890,7 +890,7 @@ QStringList VCardTool::splitString( const QChar &sep, const QString &str )
if ( value.mid( start, l - start + 1 ).length() > 0 )
list << value.mid( start, l - start + 1 );
else
- list << QString::null;
+ list << TQString::null;
return list;
}
diff --git a/kabc/vcardtool.h b/kabc/vcardtool.h
index 2c78e8442..d59006341 100644
--- a/kabc/vcardtool.h
+++ b/kabc/vcardtool.h
@@ -44,25 +44,25 @@ class KABC_EXPORT VCardTool
Creates a string that contains the addressees from the list in
the vCard format.
*/
- QString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 );
+ TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 );
/**
Parses the string and returns a list of addressee objects.
*/
- Addressee::List parseVCards( const QString& vcard );
+ Addressee::List parseVCards( const TQString& vcard );
private:
/**
Split a string and replaces escaped separators on the fly with
unescaped ones.
*/
- QStringList splitString( const QChar &sep, const QString &value );
+ TQStringList splitString( const TQChar &sep, const TQString &value );
- QDateTime parseDateTime( const QString &str );
- QString createDateTime( const QDateTime &dateTime );
+ TQDateTime parseDateTime( const TQString &str );
+ TQString createDateTime( const TQDateTime &dateTime );
Picture parsePicture( const VCardLine &line );
- VCardLine createPicture( const QString &identifier, const Picture &pic );
+ VCardLine createPicture( const TQString &identifier, const Picture &pic );
Sound parseSound( const VCardLine &line );
VCardLine createSound( const Sound &snd );
@@ -76,8 +76,8 @@ class KABC_EXPORT VCardTool
Agent parseAgent( const VCardLine &line );
VCardLine createAgent( VCard::Version version, const Agent &agent );
- QMap<QString, int> mAddressTypeMap;
- QMap<QString, int> mPhoneTypeMap;
+ TQMap<TQString, int> mAddressTypeMap;
+ TQMap<TQString, int> mPhoneTypeMap;
class VCardToolPrivate;
VCardToolPrivate *d;
diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h
index 6e7cb9a56..023840335 100644
--- a/kate/interfaces/document.h
+++ b/kate/interfaces/document.h
@@ -64,7 +64,7 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage
Q_OBJECT
public:
- ConfigPage ( QWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; };
+ ConfigPage ( TQWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; };
virtual ~ConfigPage () { ; };
public slots:
@@ -82,7 +82,7 @@ class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu
Q_OBJECT
public:
- ActionMenu ( const QString& text, QObject* parent = 0, const char* name = 0 )
+ ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 )
: KActionMenu(text, parent, name) { ; };
virtual ~ActionMenu () { ; };
@@ -104,19 +104,19 @@ class KATEPARTINTERFACES_EXPORT Command
* Pure text start part of the commands which can be handled by this object
* which means i.e. for s/sdl/sdf/g => s or for char:1212 => char
*/
- virtual QStringList cmds () = 0;
+ virtual TQStringList cmds () = 0;
/**
* Execute this command for the given view and cmd string, return a bool
* about success, msg for status
*/
- virtual bool exec (View *view, const QString &cmd, QString &msg) = 0;
+ virtual bool exec (View *view, const TQString &cmd, TQString &msg) = 0;
/**
* Shows help for the given view and cmd string, return a bool
* about success, msg for status
*/
- virtual bool help (View *view, const QString &cmd, QString &msg) = 0;
+ virtual bool help (View *view, const TQString &cmd, TQString &msg) = 0;
};
/**
@@ -143,7 +143,7 @@ class CommandExtension
* are displayed, existing flags are left out.
*
*/ //### this is yet to be tried
- virtual void flagCompletions( QStringList& /*list*/ ) {;}
+ virtual void flagCompletions( TQStringList& /*list*/ ) {;}
/**
* @return a KCompletion object that will substitute the command line default
@@ -154,7 +154,7 @@ class CommandExtension
*
* @param cmdname The command name associated with this request.
*/
- virtual KCompletion *completionObject( const QString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; }
+ virtual KCompletion *completionObject( const TQString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; }
/**
* @return whether this command wants to process text interactively given the @p cmdname.
@@ -166,7 +166,7 @@ class CommandExtension
*
* @param cmdname the command name associated with this query.
*/
- virtual bool wantsToProcessText( const QString &cmdname ) { Q_UNUSED(cmdname); return false; }
+ virtual bool wantsToProcessText( const TQString &cmdname ) { Q_UNUSED(cmdname); return false; }
/**
* This is called by the commandline each time the argument text for the
@@ -174,7 +174,7 @@ class CommandExtension
* @param view The current view
* @param text The current command text typed by the user.
*/ // ### yet to be tested. The obvious candidate is isearch.
- virtual void processText( Kate::View *view, const QString &text ) { Q_UNUSED(view); Q_UNUSED(text); }
+ virtual void processText( Kate::View *view, const TQString &text ) { Q_UNUSED(view); Q_UNUSED(text); }
};
/** This interface provides access to the Kate Document class.
@@ -192,7 +192,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
public:
Document ();
- Document ( QObject* parent, const char* name );
+ Document ( TQObject* parent, const char* name );
virtual ~Document ();
/**
@@ -201,7 +201,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
public:
static bool registerCommand (Command *cmd);
static bool unregisterCommand (Command *cmd);
- static Command *queryCommand (const QString &cmd);
+ static Command *queryCommand (const TQString &cmd);
public:
/**
@@ -214,7 +214,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
/**
* Returns the document name.
*/
- virtual QString docName () { return 0L; };
+ virtual TQString docName () { return 0L; };
/**
* Sets the document name.
@@ -222,10 +222,10 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
* but changes nothing beside triggers signal
* @deprecated
*/
- virtual void setDocName (QString ) { ; };
+ virtual void setDocName (TQString ) { ; };
- virtual ActionMenu *hlActionMenu (const QString& , QObject* =0, const char* = 0) = 0;
- virtual ActionMenu *exportActionMenu (const QString& , QObject* =0, const char* = 0) = 0;
+ virtual ActionMenu *hlActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
+ virtual ActionMenu *exportActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
public slots:
// clear buffer/filename - update the views
@@ -241,7 +241,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
*/
virtual void spellcheck() {};
- virtual void exportAs(const QString &) = 0;
+ virtual void exportAs(const TQString &) = 0;
virtual void applyWordWrap () = 0;
@@ -254,28 +254,28 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
virtual uint wordWrapAt () = 0;
- virtual void setEncoding (const QString &e) = 0;
- virtual QString encoding() const = 0;
+ virtual void setEncoding (const TQString &e) = 0;
+ virtual TQString encoding() const = 0;
/** @deprecated */
// FIXME: Remove when BIC allowed.
public:
/** @deprecated */
- virtual ConfigPage *colorConfigPage (QWidget *) = 0;
+ virtual ConfigPage *colorConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *fontConfigPage (QWidget *) = 0;
+ virtual ConfigPage *fontConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *indentConfigPage (QWidget *) = 0;
+ virtual ConfigPage *indentConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *selectConfigPage (QWidget *) = 0;
+ virtual ConfigPage *selectConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *editConfigPage (QWidget *) = 0;
+ virtual ConfigPage *editConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *keysConfigPage (QWidget *) = 0;
+ virtual ConfigPage *keysConfigPage (TQWidget *) = 0;
/** @deprecated */
- virtual ConfigPage *kSpellConfigPage (QWidget *) { return 0L; }
+ virtual ConfigPage *kSpellConfigPage (TQWidget *) { return 0L; }
/** @deprecated */
- virtual ConfigPage *hlConfigPage (QWidget *) = 0;
+ virtual ConfigPage *hlConfigPage (TQWidget *) = 0;
public:
virtual uint configFlags () = 0;
@@ -331,13 +331,13 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
// default false
static void setFileChangedDialogsActivated (bool on);
- static const QString &defaultEncoding ();
+ static const TQString &defaultEncoding ();
protected:
static bool s_openErrorDialogsActivated;
static bool s_fileChangedDialogsActivated;
- static QString s_defaultEncoding;
+ static TQString s_defaultEncoding;
};
/**
@@ -400,7 +400,7 @@ KATEPARTINTERFACES_EXPORT DocumentExt *documentExt (KTextEditor::Document *doc);
/**
* Creates a new Kate::Document object
*/
-KATEPARTINTERFACES_EXPORT Document *createDocument ( QObject *parent = 0, const char *name = 0 );
+KATEPARTINTERFACES_EXPORT Document *createDocument ( TQObject *parent = 0, const char *name = 0 );
}
diff --git a/kate/interfaces/interfaces.cpp b/kate/interfaces/interfaces.cpp
index 42bd35b7e..ad20959b6 100644
--- a/kate/interfaces/interfaces.cpp
+++ b/kate/interfaces/interfaces.cpp
@@ -29,9 +29,9 @@ namespace Kate
bool Document::s_openErrorDialogsActivated = true;
bool Document::s_fileChangedDialogsActivated = false;
-QString Document::s_defaultEncoding;
+TQString Document::s_defaultEncoding;
-Document::Document (QObject* parent, const char* name)
+Document::Document (TQObject* parent, const char* name)
: KTextEditor::Document (parent, name)
{
}
@@ -54,7 +54,7 @@ void Document::setFileChangedDialogsActivated (bool on)
s_fileChangedDialogsActivated = on;
}
-const QString &Document::defaultEncoding ()
+const TQString &Document::defaultEncoding ()
{
return s_defaultEncoding;
}
@@ -69,12 +69,12 @@ bool Document::unregisterCommand (Command *cmd)
return KateCmd::self()->unregisterCommand (cmd);
}
-Command *Document::queryCommand (const QString &cmd)
+Command *Document::queryCommand (const TQString &cmd)
{
return KateCmd::self()->queryCommand (cmd);
}
-View::View ( KTextEditor::Document *doc, QWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name)
+View::View ( KTextEditor::Document *doc, TQWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name)
{
}
@@ -111,7 +111,7 @@ DocumentExt *documentExt (KTextEditor::Document *doc)
return static_cast<DocumentExt*>(doc->qt_cast("Kate::DocumentExt"));
}
-Document *createDocument ( QObject *parent, const char *name )
+Document *createDocument ( TQObject *parent, const char *name )
{
return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name);
}
diff --git a/kate/interfaces/katecmd.cpp b/kate/interfaces/katecmd.cpp
index e6a981dd5..569110093 100644
--- a/kate/interfaces/katecmd.cpp
+++ b/kate/interfaces/katecmd.cpp
@@ -36,7 +36,7 @@ KateCmd::~KateCmd ()
bool KateCmd::registerCommand (Kate::Command *cmd)
{
- QStringList l = cmd->cmds ();
+ TQStringList l = cmd->cmds ();
for (uint z=0; z<l.count(); z++)
if (m_dict[l[z]])
@@ -54,18 +54,18 @@ bool KateCmd::registerCommand (Kate::Command *cmd)
bool KateCmd::unregisterCommand (Kate::Command *cmd)
{
- QStringList l;
- QDictIterator<Kate::Command> it(m_dict);
+ TQStringList l;
+ TQDictIterator<Kate::Command> it(m_dict);
for( ; it.current(); ++it )
if (it.current()==cmd) l<<it.currentKey();
- for ( QStringList::Iterator it1 = l.begin(); it1 != l.end(); ++it1 ) {
+ for ( TQStringList::Iterator it1 = l.begin(); it1 != l.end(); ++it1 ) {
m_dict.remove(*it1);
kdDebug()<<"Removed command:"<<*it1<<endl;
}
return true;
}
-Kate::Command *KateCmd::queryCommand (const QString &cmd)
+Kate::Command *KateCmd::queryCommand (const TQString &cmd)
{
// a command can be named ".*[\w\-]+" with the constrain that it must
// contain at least one letter.
@@ -81,7 +81,7 @@ Kate::Command *KateCmd::queryCommand (const QString &cmd)
return m_dict[cmd.left(f)];
}
-QStringList KateCmd::cmds ()
+TQStringList KateCmd::cmds ()
{
return m_cmds;
}
@@ -96,7 +96,7 @@ KateCmd *KateCmd::self ()
return s_self;
}
-void KateCmd::appendHistory( const QString &cmd )
+void KateCmd::appendHistory( const TQString &cmd )
{
if ( !m_history.isEmpty() && m_history.last() == cmd )
return;
@@ -107,10 +107,10 @@ void KateCmd::appendHistory( const QString &cmd )
m_history.append( cmd );
}
-const QString KateCmd::fromHistory( uint index ) const
+const TQString KateCmd::fromHistory( uint index ) const
{
if ( index > m_history.count() - 1 )
- return QString();
+ return TQString();
return m_history[ index ];
}
//END KateCmd
@@ -131,7 +131,7 @@ KateCmdShellCompletion::KateCmdShellCompletion()
m_escape_char = '\\';
}
-QString KateCmdShellCompletion::makeCompletion( const QString &text )
+TQString KateCmdShellCompletion::makeCompletion( const TQString &text )
{
// Split text at the last unquoted space
//
@@ -142,7 +142,7 @@ QString KateCmdShellCompletion::makeCompletion( const QString &text )
return KCompletion::makeCompletion( m_text_compl );
}
-void KateCmdShellCompletion::postProcessMatch( QString *match ) const
+void KateCmdShellCompletion::postProcessMatch( TQString *match ) const
{
if ( match->isNull() )
return;
@@ -150,9 +150,9 @@ void KateCmdShellCompletion::postProcessMatch( QString *match ) const
match->prepend( m_text_start );
}
-void KateCmdShellCompletion::postProcessMatches( QStringList *matches ) const
+void KateCmdShellCompletion::postProcessMatches( TQStringList *matches ) const
{
- for ( QStringList::Iterator it = matches->begin();
+ for ( TQStringList::Iterator it = matches->begin();
it != matches->end(); it++ )
if ( !(*it).isNull() )
(*it).prepend( m_text_start );
@@ -166,12 +166,12 @@ void KateCmdShellCompletion::postProcessMatches( KCompletionMatches *matches ) c
(*it).value().prepend( m_text_start );
}
-void KateCmdShellCompletion::splitText(const QString &text, QString &text_start,
- QString &text_compl) const
+void KateCmdShellCompletion::splitText(const TQString &text, TQString &text_start,
+ TQString &text_compl) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
+ TQChar p_last_quote_char;
int last_unquoted_space = -1;
int end_space_len = 0;
diff --git a/kate/interfaces/katecmd.h b/kate/interfaces/katecmd.h
index 8af9e1f6c..b01f6dafb 100644
--- a/kate/interfaces/katecmd.h
+++ b/kate/interfaces/katecmd.h
@@ -23,8 +23,8 @@
#include <kcompletion.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
class KATEPARTINTERFACES_EXPORT KateCmd
{
@@ -38,18 +38,18 @@ class KATEPARTINTERFACES_EXPORT KateCmd
bool registerCommand (Kate::Command *cmd);
bool unregisterCommand (Kate::Command *cmd);
- Kate::Command *queryCommand (const QString &cmd);
+ Kate::Command *queryCommand (const TQString &cmd);
- QStringList cmds ();
- void appendHistory( const QString &cmd );
- const QString fromHistory( uint i ) const;
+ TQStringList cmds ();
+ void appendHistory( const TQString &cmd );
+ const TQString fromHistory( uint i ) const;
uint historyLength() const { return m_history.count(); }
private:
static KateCmd *s_self;
- QDict<Kate::Command> m_dict;
- QStringList m_cmds;
- QStringList m_history;
+ TQDict<Kate::Command> m_dict;
+ TQStringList m_cmds;
+ TQStringList m_history;
};
/**
@@ -67,14 +67,14 @@ class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion : public KCompletion
* Finds completions to the given text.
* The first match is returned and emitted in the signal match().
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- QString makeCompletion(const QString &text);
+ TQString makeCompletion(const TQString &text);
protected:
// Called by KCompletion
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches *matches ) const;
private:
@@ -84,15 +84,15 @@ class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion : public KCompletion
* @param text_start will be set to the text at the left, including the space
* @param text_compl Will be set to the text at the right. This is the text to complete.
*/
- void splitText( const QString &text, QString &text_start, QString &text_compl ) const;
+ void splitText( const TQString &text, TQString &text_start, TQString &text_compl ) const;
- QChar m_word_break_char;
- QChar m_quote_char1;
- QChar m_quote_char2;
- QChar m_escape_char;
+ TQChar m_word_break_char;
+ TQChar m_quote_char1;
+ TQChar m_quote_char2;
+ TQChar m_escape_char;
- QString m_text_start;
- QString m_text_compl;
+ TQString m_text_start;
+ TQString m_text_compl;
};
diff --git a/kate/interfaces/view.h b/kate/interfaces/view.h
index 98290039e..90c61d5ac 100644
--- a/kate/interfaces/view.h
+++ b/kate/interfaces/view.h
@@ -53,7 +53,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
/**
Constructor (should much rather take a reference to the document).
*/
- View ( KTextEditor::Document *, QWidget *, const char *name = 0 );
+ View ( KTextEditor::Document *, TQWidget *, const char *name = 0 );
/**
Destructor, you need a destructor if Scott Meyers says so.
*/
@@ -69,21 +69,21 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
/**
Gets the text line where the cursor is on
*/
- virtual QString currentTextLine() { return 0L; }
+ virtual TQString currentTextLine() { return 0L; }
/**
Gets the word where the cursor is on
*/
- virtual QString currentWord() { return 0L; }
+ virtual TQString currentWord() { return 0L; }
/**
Gets the word at position x, y. Can be used to find
the word under the mouse cursor
*/
- virtual QString word(int , int ) { return 0L; }
+ virtual TQString word(int , int ) { return 0L; }
/**
Insert text at the current cursor position.
@param mark is unused.
*/
- virtual void insertText(const QString &mark ) { Q_UNUSED(mark); }
+ virtual void insertText(const TQString &mark ) { Q_UNUSED(mark); }
/**
Works exactly like closeURL() of KParts::ReadWritePart
*/
@@ -92,7 +92,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
public:
virtual int tabWidth() = 0;
virtual void setTabWidth(int) = 0;
- virtual void setEncoding (QString e) = 0;
+ virtual void setEncoding (TQString e) = 0;
/**
Returns true if this editor is the only owner of its document
@@ -211,7 +211,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
Set focus to the current window.
*/
// Should remove this, it's redundant.
- virtual void setFocus () { QWidget::setFocus(); }
+ virtual void setFocus () { TQWidget::setFocus(); }
/**
Searches for the last searched text forward from cursor position.
@param forward determines the search direction.
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp
index 2ecbececc..a9a4fe37c 100644
--- a/kate/part/katearbitraryhighlight.cpp
+++ b/kate/part/katearbitraryhighlight.cpp
@@ -24,19 +24,19 @@
#include <kdebug.h>
-#include <qfont.h>
+#include <tqfont.h>
KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateSuperCursor* start,
-KateSuperCursor* end, QObject* parent, const char* name) :
+KateSuperCursor* end, TQObject* parent, const char* name) :
KateSuperRange(start, end, parent, name) {
}
-KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent, const char* name)
+KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent, const char* name)
: KateSuperRange(doc, range, parent, name)
{
}
-KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent, const char* name)
+KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent, const char* name)
: KateSuperRange(doc, start, end, parent, name)
{
}
@@ -46,11 +46,11 @@ KateArbitraryHighlightRange::~KateArbitraryHighlightRange()
}
KateArbitraryHighlight::KateArbitraryHighlight(KateDocument* parent, const char* name)
- : QObject(parent, name)
+ : TQObject(parent, name)
{
}
-KateAttribute KateArbitraryHighlightRange::merge(QPtrList<KateSuperRange> ranges)
+KateAttribute KateArbitraryHighlightRange::merge(TQPtrList<KateSuperRange> ranges)
{
ranges.sort();
@@ -73,27 +73,27 @@ KateAttribute KateArbitraryHighlightRange::merge(QPtrList<KateSuperRange> ranges
void KateArbitraryHighlight::addHighlightToDocument(KateSuperRangeList* list)
{
m_docHLs.append(list);
- connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotRangeEliminated(KateSuperRange*)));
- connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*)));
+ connect(list, TQT_SIGNAL(rangeEliminated(KateSuperRange*)), TQT_SLOT(slotRangeEliminated(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(destroyed(TQObject*)),TQT_SLOT(slotRangeListDeleted(TQObject*)));
}
void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateView* view)
{
if (!m_viewHLs[view])
- m_viewHLs.insert(view, new QPtrList<KateSuperRangeList>());
+ m_viewHLs.insert(view, new TQPtrList<KateSuperRangeList>());
m_viewHLs[view]->append(list);
- connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*)));
- connect(list, SIGNAL(tagRange(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*)));
- connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*)));
+ connect(list, TQT_SIGNAL(rangeEliminated(KateSuperRange*)), TQT_SLOT(slotTagRange(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(tagRange(KateSuperRange*)), TQT_SLOT(slotTagRange(KateSuperRange*)));
+ connect(list, TQT_SIGNAL(destroyed(TQObject*)),TQT_SLOT(slotRangeListDeleted(TQObject*)));
}
-void KateArbitraryHighlight::slotRangeListDeleted(QObject* obj) {
+void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) {
int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj));
if (id>=0) m_docHLs.take(id);
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l==obj) {
l->take();
@@ -123,14 +123,14 @@ KateSuperRangeList& KateArbitraryHighlight::rangesIncluding(uint line, KateView*
//--- END Temporary optimisation ---
if (view) {
- QPtrList<KateSuperRangeList>* list = m_viewHLs[view];
+ TQPtrList<KateSuperRangeList>* list = m_viewHLs[view];
if (list)
for (KateSuperRangeList* l = list->first(); l; l = list->next())
if (l->count())
s_return.appendList(l->rangesIncluding(line));
} else {
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l->count())
s_return.appendList(l->rangesIncluding(line));
@@ -150,7 +150,7 @@ void KateArbitraryHighlight::slotTagRange(KateSuperRange* range)
KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range)
{
- for (QMap<KateView*, QPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
+ for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
if (l->contains(range))
return it.key();
diff --git a/kate/part/katearbitraryhighlight.h b/kate/part/katearbitraryhighlight.h
index 7955e7889..4dd5a362b 100644
--- a/kate/part/katearbitraryhighlight.h
+++ b/kate/part/katearbitraryhighlight.h
@@ -22,9 +22,9 @@
#include "kateattribute.h"
#include "katesupercursor.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class KateDocument;
class KateView;
@@ -34,15 +34,15 @@ class KateArbitraryHighlightRange : public KateSuperRange, public KateAttribute
Q_OBJECT
public:
- KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L);
- KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L);
- KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
+ KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateArbitraryHighlightRange();
virtual void changed() { slotTagRange(); };
- static KateAttribute merge(QPtrList<KateSuperRange> ranges);
+ static KateAttribute merge(TQPtrList<KateSuperRange> ranges);
};
/**
@@ -74,12 +74,12 @@ signals:
private slots:
void slotTagRange(KateSuperRange* range);
- void slotRangeListDeleted(QObject* obj);
+ void slotRangeListDeleted(TQObject* obj);
private:
KateView* viewForRange(KateSuperRange* range);
- QMap<KateView*, QPtrList<KateSuperRangeList>* > m_viewHLs;
- QPtrList<KateSuperRangeList> m_docHLs;
+ TQMap<KateView*, TQPtrList<KateSuperRangeList>* > m_viewHLs;
+ TQPtrList<KateSuperRangeList> m_docHLs;
};
#endif
diff --git a/kate/part/kateattribute.cpp b/kate/part/kateattribute.cpp
index 5de93a406..9ed6349f6 100644
--- a/kate/part/kateattribute.cpp
+++ b/kate/part/kateattribute.cpp
@@ -19,7 +19,7 @@
#include "kateattribute.h"
KateAttribute::KateAttribute()
- : m_weight(QFont::Normal)
+ : m_weight(TQFont::Normal)
, m_italic(false)
, m_underline(false)
, m_overline(false)
@@ -73,9 +73,9 @@ KateAttribute& KateAttribute::operator+=(const KateAttribute& a)
return *this;
}
-QFont KateAttribute::font(const QFont& ref)
+TQFont KateAttribute::font(const TQFont& ref)
{
- QFont ret = ref;
+ TQFont ret = ref;
if (itemSet(Weight))
ret.setWeight(weight());
@@ -105,7 +105,7 @@ void KateAttribute::setWeight(int weight)
void KateAttribute::setBold(bool enable)
{
- setWeight(enable ? QFont::Bold : QFont::Normal);
+ setWeight(enable ? TQFont::Bold : TQFont::Normal);
}
void KateAttribute::setItalic(bool enable)
@@ -156,7 +156,7 @@ void KateAttribute::setStrikeOut(bool enable)
}
}
-void KateAttribute::setOutline(const QColor& color)
+void KateAttribute::setOutline(const TQColor& color)
{
if (!(m_itemsSet & Outline) || m_outline != color)
{
@@ -168,7 +168,7 @@ void KateAttribute::setOutline(const QColor& color)
}
}
-void KateAttribute::setTextColor(const QColor& color)
+void KateAttribute::setTextColor(const TQColor& color)
{
if (!(m_itemsSet & TextColor) || m_textColor != color)
{
@@ -180,7 +180,7 @@ void KateAttribute::setTextColor(const QColor& color)
}
}
-void KateAttribute::setSelectedTextColor(const QColor& color)
+void KateAttribute::setSelectedTextColor(const TQColor& color)
{
if (!(m_itemsSet & SelectedTextColor) || m_selectedTextColor != color)
{
@@ -192,7 +192,7 @@ void KateAttribute::setSelectedTextColor(const QColor& color)
}
}
-void KateAttribute::setBGColor(const QColor& color)
+void KateAttribute::setBGColor(const TQColor& color)
{
if (!(m_itemsSet & BGColor) || m_bgColor != color)
{
@@ -204,7 +204,7 @@ void KateAttribute::setBGColor(const QColor& color)
}
}
-void KateAttribute::setSelectedBGColor(const QColor& color)
+void KateAttribute::setSelectedBGColor(const TQColor& color)
{
if (!(m_itemsSet & SelectedBGColor) || m_selectedBGColor != color)
{
diff --git a/kate/part/kateattribute.h b/kate/part/kateattribute.h
index c4933e690..a54279b24 100644
--- a/kate/part/kateattribute.h
+++ b/kate/part/kateattribute.h
@@ -21,7 +21,7 @@
#include "katefont.h"
-#include <qcolor.h>
+#include <tqcolor.h>
/**
* The Attribute class incorporates all text decorations supported by Kate.
@@ -49,13 +49,13 @@ public:
KateAttribute();
virtual ~KateAttribute();
- QFont font(const QFont& ref);
+ TQFont font(const TQFont& ref);
- inline int width(KateFontStruct& fs, const QString& text, int col, int tabWidth) const
+ inline int width(KateFontStruct& fs, const TQString& text, int col, int tabWidth) const
{ return fs.width(text, col, bold(), italic(), tabWidth); };
// Non-preferred function when you have a string and you want one char's width!!
- inline int width(KateFontStruct& fs, const QChar& c, int tabWidth) const
+ inline int width(KateFontStruct& fs, const TQChar& c, int tabWidth) const
{ return fs.width(c, bold(), italic(), tabWidth); };
inline bool itemSet(int item) const
@@ -76,7 +76,7 @@ public:
void setWeight(int weight);
inline bool bold() const
- { return weight() >= QFont::Bold; };
+ { return weight() >= TQFont::Bold; };
void setBold(bool enable = true);
@@ -100,30 +100,30 @@ public:
void setStrikeOut(bool enable = true);
- inline const QColor& outline() const
+ inline const TQColor& outline() const
{ return m_outline; };
- void setOutline(const QColor& color);
+ void setOutline(const TQColor& color);
- inline const QColor& textColor() const
+ inline const TQColor& textColor() const
{ return m_textColor; };
- void setTextColor(const QColor& color);
+ void setTextColor(const TQColor& color);
- inline const QColor& selectedTextColor() const
+ inline const TQColor& selectedTextColor() const
{ return m_selectedTextColor; };
- void setSelectedTextColor(const QColor& color);
+ void setSelectedTextColor(const TQColor& color);
- inline const QColor& bgColor() const
+ inline const TQColor& bgColor() const
{ return m_bgColor; };
- void setBGColor(const QColor& color);
+ void setBGColor(const TQColor& color);
- inline const QColor& selectedBGColor() const
+ inline const TQColor& selectedBGColor() const
{ return m_selectedBGColor; };
- void setSelectedBGColor(const QColor& color);
+ void setSelectedBGColor(const TQColor& color);
KateAttribute& operator+=(const KateAttribute& a);
@@ -138,7 +138,7 @@ public:
private:
int m_weight;
bool m_italic, m_underline, m_overline,m_strikeout, m_changed;
- QColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor;
+ TQColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor;
int m_itemsSet;
};
diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp
index 7c58b6051..ed9a6169b 100644
--- a/kate/part/kateautoindent.cpp
+++ b/kate/part/kateautoindent.cpp
@@ -55,9 +55,9 @@ KateAutoIndent *KateAutoIndent::createIndenter (KateDocument *doc, uint mode)
return new KateAutoIndent (doc);
}
-QStringList KateAutoIndent::listModes ()
+TQStringList KateAutoIndent::listModes ()
{
- QStringList l;
+ TQStringList l;
l << modeDescription(KateDocumentConfig::imNone);
l << modeDescription(KateDocumentConfig::imNormal);
@@ -71,27 +71,27 @@ QStringList KateAutoIndent::listModes ()
return l;
}
-QString KateAutoIndent::modeName (uint mode)
+TQString KateAutoIndent::modeName (uint mode)
{
if (mode == KateDocumentConfig::imNormal)
- return QString ("normal");
+ return TQString ("normal");
else if (mode == KateDocumentConfig::imCStyle)
- return QString ("cstyle");
+ return TQString ("cstyle");
else if (mode == KateDocumentConfig::imPythonStyle)
- return QString ("python");
+ return TQString ("python");
else if (mode == KateDocumentConfig::imXmlStyle)
- return QString ("xml");
+ return TQString ("xml");
else if (mode == KateDocumentConfig::imCSAndS)
- return QString ("csands");
+ return TQString ("csands");
else if ( mode == KateDocumentConfig::imVarIndent )
- return QString( "varindent" );
+ return TQString( "varindent" );
// else if ( mode == KateDocumentConfig::imScriptIndent )
-// return QString( "scriptindent" );
+// return TQString( "scriptindent" );
- return QString ("none");
+ return TQString ("none");
}
-QString KateAutoIndent::modeDescription (uint mode)
+TQString KateAutoIndent::modeDescription (uint mode)
{
if (mode == KateDocumentConfig::imNormal)
return i18n ("Normal");
@@ -111,7 +111,7 @@ QString KateAutoIndent::modeDescription (uint mode)
return i18n ("None");
}
-uint KateAutoIndent::modeNumber (const QString &name)
+uint KateAutoIndent::modeNumber (const TQString &name)
{
if (modeName(KateDocumentConfig::imNormal) == name)
return KateDocumentConfig::imNormal;
@@ -139,7 +139,7 @@ bool KateAutoIndent::hasConfigPage (uint mode)
return false;
}
-IndenterConfigPage* KateAutoIndent::configPage(QWidget *parent, uint mode)
+IndenterConfigPage* KateAutoIndent::configPage(TQWidget *parent, uint mode)
{
// if ( mode == KateDocumentConfig::imScriptIndent )
// return new ScriptIndentConfigPage(parent, "script_indent_config_page");
@@ -148,7 +148,7 @@ IndenterConfigPage* KateAutoIndent::configPage(QWidget *parent, uint mode)
}
KateAutoIndent::KateAutoIndent (KateDocument *_doc)
-: QObject(), doc(_doc)
+: TQObject(), doc(_doc)
{
}
KateAutoIndent::~KateAutoIndent ()
@@ -158,19 +158,19 @@ KateAutoIndent::~KateAutoIndent ()
//END KateAutoIndent
//BEGIN KateViewIndentAction
-KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent, const char* name)
+KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc)
{
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewIndentationAction::slotAboutToShow()
{
- QStringList modes = KateAutoIndent::listModes ();
+ TQStringList modes = KateAutoIndent::listModes ();
popupMenu()->clear ();
for (uint z=0; z<modes.size(); ++z)
- popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, SLOT(setMode(int)), 0, z);
+ popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, TQT_SLOT(setMode(int)), 0, z);
popupMenu()->setItemChecked (doc->config()->indentationMode(), true);
}
@@ -187,7 +187,7 @@ KateNormalIndent::KateNormalIndent (KateDocument *_doc)
: KateAutoIndent (_doc)
{
// if highlighting changes, update attributes
- connect(_doc, SIGNAL(hlChanged()), this, SLOT(updateConfig()));
+ connect(_doc, TQT_SIGNAL(hlChanged()), this, TQT_SLOT(updateConfig()));
}
KateNormalIndent::~KateNormalIndent ()
@@ -223,7 +223,7 @@ void KateNormalIndent::updateConfig ()
for (uint i=0; i<items.count(); i++)
{
- QString name = items.at(i)->name;
+ TQString name = items.at(i)->name;
if (name.find("Comment") != -1 && commentAttrib == 255)
{
commentAttrib = i;
@@ -279,7 +279,7 @@ void KateNormalIndent::updateConfig ()
}
}
-bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const
+bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &end, TQChar open, TQChar close, uint &pos) const
{
int parenOpen = 0;
bool atLeastOne = false;
@@ -291,7 +291,7 @@ bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &en
// Assume that open and close are 'Symbol' characters
while (begin < end)
{
- QChar c = begin.currentChar();
+ TQChar c = begin.currentChar();
if (begin.currentAttrib() == symbolAttrib)
{
if (c == open)
@@ -337,11 +337,11 @@ bool KateNormalIndent::skipBlanks (KateDocCursor &cur, KateDocCursor &max, bool
do
{
uchar attrib = cur.currentAttrib();
- const QString hlFile = doc->highlight()->hlKeyForAttrib( attrib );
+ const TQString hlFile = doc->highlight()->hlKeyForAttrib( attrib );
if (attrib != commentAttrib && attrib != regionAttrib && attrib != alertAttrib && attrib != preprocessorAttrib && !hlFile.endsWith("doxygen.xml"))
{
- QChar c = cur.currentChar();
+ TQChar c = cur.currentChar();
if (!c.isNull() && !c.isSpace())
break;
}
@@ -375,9 +375,9 @@ uint KateNormalIndent::measureIndent (KateDocCursor &cur) const
return doc->plainKateTextLine(cur.line())->cursorX(cur.col(), tabWidth);
}
-QString KateNormalIndent::tabString(uint pos) const
+TQString KateNormalIndent::tabString(uint pos) const
{
- QString s;
+ TQString s;
pos = kMin (pos, 80U); // sanity check for large values of pos
if (!useSpaces || mixedIndent)
@@ -406,7 +406,7 @@ void KateNormalIndent::processNewline (KateDocCursor &begin, bool /*needContinue
if (pos > 0)
{
- QString filler = doc->text(line, 0, line, pos);
+ TQString filler = doc->text(line, 0, line, pos);
doc->insertText(begin.line(), 0, filler);
begin.setCol(filler.length());
}
@@ -444,8 +444,8 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
uint indent = 0;
// TODO Here we do not check for beginning and ending comments ...
- QChar first = textLine->getChar(firstChar);
- QChar last = textLine->getChar(textLine->lastChar());
+ TQChar first = textLine->getChar(firstChar);
+ TQChar last = textLine->getChar(textLine->lastChar());
if (first == '}')
{
@@ -538,7 +538,7 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
if (indent != measureIndent(line) || first == '}' || first == '{' || first == '#')
{
doc->removeText(line.line(), 0, line.line(), firstChar);
- QString filler = tabString(indent);
+ TQString filler = tabString(indent);
if (indent > 0) doc->insertText(line.line(), 0, filler);
if (!processingBlock) line.setCol(filler.length());
}
@@ -548,7 +548,7 @@ void KateCSmartIndent::processSection (const KateDocCursor &begin, const KateDoc
{
kdDebug(13030)<<"PROCESS SECTION"<<endl;
KateDocCursor cur = begin;
- QTime t;
+ TQTime t;
t.start();
processingBlock = (end.line() - cur.line() > 0) ? true : false;
@@ -596,7 +596,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
int indent = findOpeningComment(begin);
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -619,7 +619,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
int indent = findOpeningComment(begin);
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->removeText (begin.line(), 0, begin.line(), first);
doc->insertText (begin.line(), 0, filler);
@@ -643,7 +643,7 @@ void KateCSmartIndent::processNewline (KateDocCursor &begin, bool needContinue)
if (indent > 0 || inMiddle)
{
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->insertText (begin.line(), 0, filler);
begin.setCol(filler.length());
@@ -675,7 +675,7 @@ void KateCSmartIndent::processNewline (KateDocCursor &begin, bool needContinue)
*/
static inline bool isColonImmune(const KateNormalIndent &indenter,
uchar attr1, uchar attr2,
- QChar prev1, QChar prev2)
+ TQChar prev1, TQChar prev2)
{
return attr1 == indenter.preprocessorAttrib
// FIXME: no way to discriminate against multiline comment and single
@@ -698,7 +698,7 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter,
int curCol
)
{
- const QString txt = line->string(0,curCol);
+ const TQString txt = line->string(0,curCol);
// do we have any significant preceding colon?
for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) {
if (line->attribute(pos) == indenter.symbolAttrib)
@@ -714,14 +714,14 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter,
txt[curCol - 1], txt[curCol - 2]);
}
-void KateCSmartIndent::processChar(QChar c)
+void KateCSmartIndent::processChar(TQChar c)
{
// You may be curious about 'n' among the triggers:
// It is used to discriminate C#'s #region/#endregion which are indented
// against normal preprocessing statements which aren't indented.
- static const QString triggers("}{)/:#n");
- static const QString firstTriggers("}{)/:#");
- static const QString lastTriggers(":n");
+ static const TQString triggers("}{)/:#n");
+ static const TQString firstTriggers("}{)/:#");
+ static const TQString lastTriggers(":n");
if (triggers.find(c) < 0)
return;
@@ -730,9 +730,9 @@ void KateCSmartIndent::processChar(QChar c)
KateDocCursor begin(view->cursorLine(), 0, doc);
KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line());
- const QChar curChar = textLine->getChar(curCol);
+ const TQChar curChar = textLine->getChar(curCol);
const int first = textLine->firstChar();
- const QChar firstChar = textLine->getChar(first);
+ const TQChar firstChar = textLine->getChar(first);
#if 0 // nice try
// Only indent on symbols or preprocessing directives -- never on
@@ -748,7 +748,7 @@ void KateCSmartIndent::processChar(QChar c)
if (c == 'n')
{
- if (firstChar != '#' || textLine->string(curCol-5, 5) != QString::fromLatin1("regio"))
+ if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::fromLatin1("regio"))
return;
}
@@ -773,7 +773,7 @@ void KateCSmartIndent::processChar(QChar c)
// I. e. take action on single braces on line or last colon, but inhibit
// any reindentation if any of those characters appear amidst some section
// of the line
- const QChar lastChar = textLine->getChar(textLine->lastChar());
+ const TQChar lastChar = textLine->getChar(textLine->lastChar());
int pos;
if (((c == firstChar && firstTriggers.find(firstChar) >= 0)
|| (c == lastChar && lastTriggers.find(lastChar) >= 0))
@@ -812,7 +812,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
{
if (textLine->attribute(pos) == symbolAttrib)
{
- QChar tc = textLine->getChar (pos);
+ TQChar tc = textLine->getChar (pos);
if ((tc == ';' || tc == ':' || tc == ',') && otherAnchor == -1 && parenCount <= 0) {
otherAnchor = pos, potentialAnchorSeen = true;
isArg = tc == ',';
@@ -834,7 +834,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
if (openCount != 0 || otherAnchor != -1)
{
found = true;
- QChar c;
+ TQChar c;
if (openCount > 0)
c = '{';
else if (openCount < 0)
@@ -845,7 +845,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
int specialIndent = 0;
if (c == ':' && needContinue)
{
- QChar ch;
+ TQChar ch;
specialIndent = textLine->firstChar();
if (textLine->stringAtPos(specialIndent, "case"))
ch = textLine->getChar(specialIndent + 4);
@@ -920,7 +920,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
// Move forward from anchor and determine last known reference character
// Braces take precedance over others ...
textLine = doc->plainKateTextLine(cur.line());
- QChar lastChar = textLine->getChar (anchorPos);
+ TQChar lastChar = textLine->getChar (anchorPos);
int lastLine = cur.line();
if (lastChar == '#' || lastChar == '[')
{
@@ -935,7 +935,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
if (!skipBlanks(cur, begin, true))
return isArg && !parenthesizedArg ? begin.col() : 0;
- QChar tc = cur.currentChar();
+ TQChar tc = cur.currentChar();
//kdDebug(13030) << " cur.line:" << cur.line() << " cur.col:" << cur.col() << " currentChar '" << tc << "' " << textLine->attribute(cur.col()) << endl;
if (cur == begin || tc.isNull())
break;
@@ -977,7 +977,7 @@ uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue)
KateDocCursor finish(lastLine, textLine->lastChar() + 1, doc);
uint pos = 0;
- if (isBalanced(start, finish, QChar('('), QChar(')'), pos) && false)
+ if (isBalanced(start, finish, TQChar('('), TQChar(')'), pos) && false)
indent = anchorIndent;
else
{
@@ -1069,7 +1069,7 @@ uint KateCSmartIndent::calcContinue(KateDocCursor &start, KateDocCursor &end)
}
uint openPos = 0;
- if (needsBalanced && !isBalanced (cur, end, QChar('('), QChar(')'), openPos))
+ if (needsBalanced && !isBalanced (cur, end, TQChar('('), TQChar(')'), openPos))
{
allowSemi = isFor;
if (openPos > 0)
@@ -1105,7 +1105,7 @@ uint KateCSmartIndent::findOpeningBrace(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '{')
count--;
else if (ch == '}')
@@ -1131,7 +1131,7 @@ bool KateCSmartIndent::firstOpeningBrace(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '{')
return false;
else if (ch == '}' && cur.col() == 0)
@@ -1153,7 +1153,7 @@ uint KateCSmartIndent::findOpeningParen(KateDocCursor &start)
{
if (cur.currentAttrib() == symbolAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == '(')
count--;
else if (ch == ')')
@@ -1192,9 +1192,9 @@ uint KateCSmartIndent::findOpeningComment(KateDocCursor &start)
//BEGIN KatePythonIndent
-QRegExp KatePythonIndent::endWithColon = QRegExp( "^[^#]*:\\s*(#.*)?$" );
-QRegExp KatePythonIndent::stopStmt = QRegExp( "^\\s*(break|continue|raise|return|pass)\\b.*" );
-QRegExp KatePythonIndent::blockBegin = QRegExp( "^\\s*(class|def|if|elif|else|for|while|try)\\b.*" );
+TQRegExp KatePythonIndent::endWithColon = TQRegExp( "^[^#]*:\\s*(#.*)?$" );
+TQRegExp KatePythonIndent::stopStmt = TQRegExp( "^\\s*(break|continue|raise|return|pass)\\b.*" );
+TQRegExp KatePythonIndent::blockBegin = TQRegExp( "^\\s*(class|def|if|elif|else|for|while|try)\\b.*" );
KatePythonIndent::KatePythonIndent (KateDocument *doc)
: KateNormalIndent (doc)
@@ -1232,7 +1232,7 @@ void KatePythonIndent::processNewline (KateDocCursor &begin, bool /*newline*/)
if (indent > 0)
{
- QString filler = tabString (indent);
+ TQString filler = tabString (indent);
doc->insertText (begin.line(), 0, filler);
begin.setCol(filler.length());
}
@@ -1266,7 +1266,7 @@ int KatePythonIndent::calcExtra (int &prevBlock, int &pos, KateDocCursor &end)
}
KateDocCursor cur (prevBlock, pos, doc);
- QChar c;
+ TQChar c;
int extraIndent = 0;
while (cur.line() < end.line())
{
@@ -1290,9 +1290,9 @@ int KatePythonIndent::calcExtra (int &prevBlock, int &pos, KateDocCursor &end)
return extraIndent;
}
-void KatePythonIndent::traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end )
+void KatePythonIndent::traverseString( const TQChar &stringChar, KateDocCursor &cur, KateDocCursor &end )
{
- QChar c;
+ TQChar c;
bool escape = false;
cur.moveForward(1);
@@ -1335,8 +1335,8 @@ tag.
*/
-const QRegExp KateXmlIndent::startsWithCloseTag("^[ \t]*</");
-const QRegExp KateXmlIndent::unclosedDoctype("<!DOCTYPE[^>]*$");
+const TQRegExp KateXmlIndent::startsWithCloseTag("^[ \t]*</");
+const TQRegExp KateXmlIndent::unclosedDoctype("<!DOCTYPE[^>]*$");
KateXmlIndent::KateXmlIndent (KateDocument *doc)
: KateNormalIndent (doc)
@@ -1352,13 +1352,13 @@ void KateXmlIndent::processNewline (KateDocCursor &begin, bool /*newline*/)
begin.setCol(processLine(begin.line()));
}
-void KateXmlIndent::processChar (QChar c)
+void KateXmlIndent::processChar (TQChar c)
{
if(c != '/') return;
// only alter lines that start with a close element
KateView *view = doc->activeView();
- QString text = doc->plainKateTextLine(view->cursorLine())->string();
+ TQString text = doc->plainKateTextLine(view->cursorLine())->string();
if(text.find(startsWithCloseTag) == -1) return;
// process it
@@ -1398,7 +1398,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
break;
}
prevIndent = prevLine->cursorX(prevLine->firstChar(), tabWidth);
- QString text = prevLine->string();
+ TQString text = prevLine->string();
// special case:
// <a>
@@ -1506,7 +1506,7 @@ uint KateXmlIndent::processLine (uint line)
// apply new indent
doc->removeText(line, 0, line, kateLine->firstChar());
- QString filler = tabString(indent);
+ TQString filler = tabString(indent);
doc->insertText(line, 0, filler);
return filler.length();
@@ -1543,7 +1543,7 @@ void KateCSAndSIndent::processLine (KateDocCursor &line)
updateIndentString();
const int oldCol = line.col();
- QString whitespace = calcIndent(line);
+ TQString whitespace = calcIndent(line);
// strip off existing whitespace
int oldIndent = textLine->firstChar();
if ( oldIndent < 0 )
@@ -1562,7 +1562,7 @@ void KateCSAndSIndent::processLine (KateDocCursor &line)
void KateCSAndSIndent::processSection (const KateDocCursor &begin, const KateDocCursor &end)
{
- QTime t; t.start();
+ TQTime t; t.start();
for( KateDocCursor cur = begin; cur.line() <= end.line(); )
{
processLine (cur);
@@ -1577,12 +1577,12 @@ void KateCSAndSIndent::processSection (const KateDocCursor &begin, const KateDoc
* If @p convert is set to false, characters at and after the first non-whitespace
* character are removed, not converted.
*/
-static QString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool convert = true)
+static TQString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool convert = true)
{
- QString text = line->string(0, chars);
+ TQString text = line->string(0, chars);
if( (int)text.length() < chars )
{
- QString filler; filler.fill(' ',chars - text.length());
+ TQString filler; filler.fill(' ',chars - text.length());
text += filler;
}
for( uint n = 0; n < text.length(); ++n )
@@ -1597,7 +1597,7 @@ static QString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool
return text;
}
-QString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start)
+TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start)
{
KateDocCursor cur = start;
@@ -1614,7 +1614,7 @@ QString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &sta
// should never happen.
kdWarning( 13030 ) << " in a comment, but can't find the start of it" << endl;
- return QString::null;
+ return TQString::null;
}
bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin)
@@ -1642,7 +1642,7 @@ bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin)
// our line is inside a doxygen comment. align the *'s and then maybe insert one too ...
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
- QString indent = findOpeningCommentIndentation(begin);
+ TQString indent = findOpeningCommentIndentation(begin);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -1703,12 +1703,12 @@ bool KateCSAndSIndent::startsWithLabel( int line )
return false;
// Get the line text.
- const QString lineContents = indentLine->string();
+ const TQString lineContents = indentLine->string();
const int indentLast = indentLine->lastChar();
bool whitespaceFound = false;
for ( int n = indentFirst; n <= indentLast; ++n )
{
- // Get the character as latin1. Can't use QChar::isLetterOrNumber()
+ // Get the character as latin1. Can't use TQChar::isLetterOrNumber()
// as that includes non 0-9 numbers.
char c = lineContents[n].latin1();
if ( c == ':' )
@@ -1756,7 +1756,7 @@ template<class T> T min(T a, T b) { return (a < b) ? a : b; }
int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line )
{
KateTextLine::Ptr textLine = doc->plainKateTextLine( line.line() );
- QString str = textLine->string();
+ TQString str = textLine->string();
// find a possible start-of-comment
int p = -2; // so the first find starts at position 0
@@ -1891,17 +1891,17 @@ bool KateCSAndSIndent::inStatement( const KateDocCursor &begin )
return false;
}
-QString KateCSAndSIndent::continuationIndent( const KateDocCursor &begin )
+TQString KateCSAndSIndent::continuationIndent( const KateDocCursor &begin )
{
if( !inStatement( begin ) )
- return QString::null;
+ return TQString::null;
return indentString;
}
/**
* Figure out how indented the line containing @p begin should be.
*/
-QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
+TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
KateTextLine::Ptr currLine = doc->plainKateTextLine(begin.line());
int currLineFirst = currLine->firstChar();
@@ -1917,9 +1917,9 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
// if the line starts with # (but isn't a c# region thingy), no indentation at all.
if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' )
{
- if( !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("region") ) &&
- !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("endregion") ) )
- return QString::null;
+ if( !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("region") ) &&
+ !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("endregion") ) )
+ return TQString::null;
}
/* Strategy:
@@ -1974,10 +1974,10 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
#define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) )
for( uint n = 0; n < ARRLEN(scopeKeywords); ++n )
- if( textLine->stringAtPos(pos, QString::fromLatin1(scopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(scopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, false );
for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n )
- if( textLine->stringAtPos(pos, QString::fromLatin1(blockScopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(blockScopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, true );
#undef ARRLEN
}
@@ -1985,10 +1985,10 @@ QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
}
// no active { in file.
- return QString::null;
+ return TQString::null;
}
-QString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos)
+TQString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos)
{
KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line());
KateTextLine::Ptr bracketLine = doc->plainKateTextLine(bracketCursor.line());
@@ -2030,12 +2030,12 @@ QString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor,
return initialWhitespace( bracketLine, indentTo );
}
-QString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword)
+TQString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword)
{
KateTextLine::Ptr keywordLine = doc->plainKateTextLine(keywordCursor.line());
KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line());
- QString whitespaceToKeyword = initialWhitespace( keywordLine, keywordPos, false );
+ TQString whitespaceToKeyword = initialWhitespace( keywordLine, keywordPos, false );
if( blockKeyword ) {
// FIXME: we could add the open brace and subsequent newline here since they're definitely needed.
}
@@ -2057,12 +2057,12 @@ QString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCurs
return indentString + whitespaceToKeyword;
}
-QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos)
+TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos)
{
KateTextLine::Ptr braceLine = doc->plainKateTextLine(braceCursor.line());
const int braceFirst = braceLine->firstChar();
- QString whitespaceToOpenBrace = initialWhitespace( braceLine, bracePos, false );
+ TQString whitespaceToOpenBrace = initialWhitespace( braceLine, bracePos, false );
// if the open brace is the start of a namespace, don't indent...
// FIXME: this is an extremely poor heuristic. it looks on the line with
@@ -2070,7 +2070,7 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
// beginning 'namespace'. that's 99% of usage, I'd guess.
{
if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib &&
- braceLine->stringAtPos( braceFirst, QString::fromLatin1( "namespace" ) ) )
+ braceLine->stringAtPos( braceFirst, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
if( braceCursor.line() > 0 )
@@ -2078,7 +2078,7 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1);
int firstPrev = prevLine->firstChar();
if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib &&
- prevLine->stringAtPos( firstPrev, QString::fromLatin1( "namespace" ) ) )
+ prevLine->stringAtPos( firstPrev, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
}
}
@@ -2104,14 +2104,14 @@ QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, c
return whitespaceToOpenBrace;
// the normal case: indent once for the brace, again if it's a continuation
- QString continuationIndent = continuation ? indentString : QString::null;
+ TQString continuationIndent = continuation ? indentString : TQString::null;
return indentString + continuationIndent + whitespaceToOpenBrace;
}
-void KateCSAndSIndent::processChar(QChar c)
+void KateCSAndSIndent::processChar(TQChar c)
{
// 'n' trigger is for c# regions.
- static const QString triggers("}{)]/:;#n");
+ static const TQString triggers("}{)]/:;#n");
if (triggers.find(c) == -1)
return;
@@ -2154,8 +2154,8 @@ void KateCSAndSIndent::processChar(QChar c)
//BEGIN KateVarIndent
class KateVarIndentPrivate {
public:
- QRegExp reIndentAfter, reIndent, reUnindent;
- QString triggers;
+ TQRegExp reIndentAfter, reIndent, reUnindent;
+ TQString triggers;
uint couples;
uchar coupleAttrib;
};
@@ -2164,9 +2164,9 @@ KateVarIndent::KateVarIndent( KateDocument *doc )
: KateNormalIndent( doc )
{
d = new KateVarIndentPrivate;
- d->reIndentAfter = QRegExp( doc->variable( "var-indent-indent-after" ) );
- d->reIndent = QRegExp( doc->variable( "var-indent-indent" ) );
- d->reUnindent = QRegExp( doc->variable( "var-indent-unindent" ) );
+ d->reIndentAfter = TQRegExp( doc->variable( "var-indent-indent-after" ) );
+ d->reIndent = TQRegExp( doc->variable( "var-indent-indent" ) );
+ d->reUnindent = TQRegExp( doc->variable( "var-indent-unindent" ) );
d->triggers = doc->variable( "var-indent-triggerchars" );
d->coupleAttrib = 0;
@@ -2174,8 +2174,8 @@ KateVarIndent::KateVarIndent( KateDocument *doc )
slotVariableChanged( "var-indent-handle-couples", doc->variable( "var-indent-handle-couples" ) );
// update if a setting is changed
- connect( doc, SIGNAL(variableChanged( const QString&, const QString&) ),
- this, SLOT(slotVariableChanged( const QString&, const QString& )) );
+ connect( doc, TQT_SIGNAL(variableChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT(slotVariableChanged( const TQString&, const TQString& )) );
}
KateVarIndent::~KateVarIndent()
@@ -2191,7 +2191,7 @@ void KateVarIndent::processNewline ( KateDocCursor &begin, bool /*needContinue*/
processLine( begin );
}
-void KateVarIndent::processChar ( QChar c )
+void KateVarIndent::processChar ( TQChar c )
{
// process line if the c is in our list, and we are not in comment text
if ( d->triggers.contains( c ) )
@@ -2209,7 +2209,7 @@ void KateVarIndent::processChar ( QChar c )
void KateVarIndent::processLine ( KateDocCursor &line )
{
- QString indent; // store the indent string here
+ TQString indent; // store the indent string here
// find the first line with content that is not starting with comment text,
// and take the position from that
@@ -2266,7 +2266,7 @@ void KateVarIndent::processLine ( KateDocCursor &line )
int i = tl->firstChar();
if ( i > -1 )
{
- QChar ch = tl->getChar( i );
+ TQChar ch = tl->getChar( i );
uchar at = tl->attribute( i );
kdDebug(13030)<<"attrib is "<<at<<endl;
if ( d->couples & Parens && ch == ')'
@@ -2355,7 +2355,7 @@ void KateVarIndent::processSection (const KateDocCursor &begin, const KateDocCur
}
}
-void KateVarIndent::slotVariableChanged( const QString &var, const QString &val )
+void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &val )
{
if ( ! var.startsWith("var-indent") )
return;
@@ -2371,7 +2371,7 @@ void KateVarIndent::slotVariableChanged( const QString &var, const QString &val
else if ( var == "var-indent-handle-couples" )
{
d->couples = 0;
- QStringList l = QStringList::split( " ", val );
+ TQStringList l = TQStringList::split( " ", val );
if ( l.contains("parens") ) d->couples |= Parens;
if ( l.contains("braces") ) d->couples |= Braces;
if ( l.contains("brackets") ) d->couples |= Brackets;
@@ -2393,7 +2393,7 @@ void KateVarIndent::slotVariableChanged( const QString &var, const QString &val
}
}
-int KateVarIndent::coupleBalance ( int line, const QChar &open, const QChar &close ) const
+int KateVarIndent::coupleBalance ( int line, const TQChar &open, const TQChar &close ) const
{
int r = 0;
@@ -2402,7 +2402,7 @@ int KateVarIndent::coupleBalance ( int line, const QChar &open, const QChar &clo
for ( uint z=0; z < ln->length(); z++ )
{
- QChar c = ln->getChar( z );
+ TQChar c = ln->getChar( z );
if ( ln->attribute(z) == d->coupleAttrib )
{
kdDebug(13030)<<z<<", "<<c<<endl;
@@ -2420,8 +2420,8 @@ bool KateVarIndent::hasRelevantOpening( const KateDocCursor &end ) const
KateDocCursor cur = end;
int count = 1;
- QChar close = cur.currentChar();
- QChar opener;
+ TQChar close = cur.currentChar();
+ TQChar opener;
if ( close == '}' ) opener = '{';
else if ( close = ')' ) opener = '(';
else if (close = ']' ) opener = '[';
@@ -2432,7 +2432,7 @@ bool KateVarIndent::hasRelevantOpening( const KateDocCursor &end ) const
{
if (cur.currentAttrib() == d->coupleAttrib)
{
- QChar ch = cur.currentChar();
+ TQChar ch = cur.currentChar();
if (ch == opener)
count--;
else if (ch == close)
@@ -2467,9 +2467,9 @@ void KateScriptIndent::processNewline( KateDocCursor &begin, bool needContinue )
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processChar"<<endl;
if( !m_script.processNewline( view, begin, needContinue , errorMsg ) )
@@ -2480,16 +2480,16 @@ void KateScriptIndent::processNewline( KateDocCursor &begin, bool needContinue )
}
}
-void KateScriptIndent::processChar( QChar c )
+void KateScriptIndent::processChar( TQChar c )
{
kdDebug(13030) << "processChar" << endl;
KateView *view = doc->activeView();
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processChar"<<endl;
if( !m_script.processChar( view, c , errorMsg ) )
@@ -2507,9 +2507,9 @@ void KateScriptIndent::processLine (KateDocCursor &line)
if (view)
{
- QString errorMsg;
+ TQString errorMsg;
- QTime t;
+ TQTime t;
t.start();
kdDebug(13030)<<"calling m_script.processLine"<<endl;
if( !m_script.processLine( view, line , errorMsg ) )
@@ -2522,11 +2522,11 @@ void KateScriptIndent::processLine (KateDocCursor &line)
//END KateScriptIndent
//BEGIN ScriptIndentConfigPage, THIS IS ONLY A TEST! :)
-#include <qlabel.h>
-ScriptIndentConfigPage::ScriptIndentConfigPage ( QWidget *parent, const char *name )
+#include <tqlabel.h>
+ScriptIndentConfigPage::ScriptIndentConfigPage ( TQWidget *parent, const char *name )
: IndenterConfigPage(parent, name)
{
- QLabel* hello = new QLabel("Hello world! Dummy for testing purpose.", this);
+ TQLabel* hello = new TQLabel("Hello world! Dummy for testing purpose.", this);
hello->show();
}
diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h
index 76ba14ee6..7ff1a93d2 100644
--- a/kate/part/kateautoindent.h
+++ b/kate/part/kateautoindent.h
@@ -21,7 +21,7 @@
#ifndef __KATE_AUTO_INDENT_H__
#define __KATE_AUTO_INDENT_H__
-#include <qobject.h>
+#include <tqobject.h>
#include "katecursor.h"
#include "kateconfig.h"
@@ -51,7 +51,7 @@ class IndenterConfigPage : public QWidget
* @param parent parent widget
* @param name name
*/
- IndenterConfigPage ( QWidget *parent=0, const char *name=0 ) : QWidget(parent, name) {}
+ IndenterConfigPage ( TQWidget *parent=0, const char *name=0 ) : TQWidget(parent, name) {}
virtual ~IndenterConfigPage () {}
public slots:
@@ -87,28 +87,28 @@ class KateAutoIndent : public QObject
* List all possible modes by name
* @return list of modes
*/
- static QStringList listModes ();
+ static TQStringList listModes ();
/**
* Return the mode name given the mode
* @param mode mode index
* @return name for this mode index
*/
- static QString modeName (uint mode);
+ static TQString modeName (uint mode);
/**
* Return the mode description
* @param mode mode index
* @return mode index
*/
- static QString modeDescription (uint mode);
+ static TQString modeDescription (uint mode);
/**
* Maps name -> index
* @param name mode name
* @return mode index
*/
- static uint modeNumber (const QString &name);
+ static uint modeNumber (const TQString &name);
/**
* Config page support
@@ -121,7 +121,7 @@ class KateAutoIndent : public QObject
* Support for a config page.
* @return config page or 0 if not available.
*/
- static IndenterConfigPage* configPage(QWidget *parent, uint mode);
+ static IndenterConfigPage* configPage(TQWidget *parent, uint mode);
public:
/**
@@ -160,7 +160,7 @@ class KateAutoIndent : public QObject
* Called every time a character is inserted into the document.
* @param c character inserted
*/
- virtual void processChar (QChar c) { Q_UNUSED(c); }
+ virtual void processChar (TQChar c) { Q_UNUSED(c); }
/**
* Aligns/indents the given line to the proper indent position.
@@ -197,7 +197,7 @@ class KateViewIndentationAction : public KActionMenu
Q_OBJECT
public:
- KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent = 0, const char* name = 0);
+ KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent = 0, const char* name = 0);
~KateViewIndentationAction(){;};
@@ -255,7 +255,7 @@ public:
* Called every time a character is inserted into the document.
* @param c character inserted
*/
- virtual void processChar (QChar c) { Q_UNUSED(c); }
+ virtual void processChar (TQChar c) { Q_UNUSED(c); }
/**
* Aligns/indents the given line to the proper indent position.
@@ -292,7 +292,7 @@ protected:
* @param pos Contains the position of the first @p open character in the line.
* @return True if @p open and @p close have an equal number of occurances between @p begin and @p end. False otherwise.
*/
- bool isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const;
+ bool isBalanced (KateDocCursor &begin, const KateDocCursor &end, TQChar open, TQChar close, uint &pos) const;
/**
* Skip all whitespace starting at @p cur and ending at @p max. Spans lines if @p newline is set.
@@ -316,9 +316,9 @@ protected:
* Produces a string with the proper indentation characters for its length.
*
* @param length The length of the indention in characters.
- * @return A QString representing @p length characters (factoring in tabs and spaces)
+ * @return A TQString representing @p length characters (factoring in tabs and spaces)
*/
- QString tabString(uint length) const;
+ TQString tabString(uint length) const;
uint tabWidth; //!< The number of characters simulated for a tab
uint indentWidth; //!< The number of characters used when tabs are replaced by spaces
@@ -354,7 +354,7 @@ class KateCSmartIndent : public KateNormalIndent
~KateCSmartIndent ();
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -390,11 +390,11 @@ class KatePythonIndent : public KateNormalIndent
private:
int calcExtra (int &prevBlock, int &pos, KateDocCursor &end);
- void traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end );
+ void traverseString( const TQChar &stringChar, KateDocCursor &cur, KateDocCursor &end );
- static QRegExp endWithColon;
- static QRegExp stopStmt;
- static QRegExp blockBegin;
+ static TQRegExp endWithColon;
+ static TQRegExp stopStmt;
+ static TQRegExp blockBegin;
};
class KateXmlIndent : public KateNormalIndent
@@ -407,7 +407,7 @@ class KateXmlIndent : public KateNormalIndent
virtual uint modeNumber () const { return KateDocumentConfig::imXmlStyle; }
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual bool canProcessLine() const { return true; }
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -422,8 +422,8 @@ class KateXmlIndent : public KateNormalIndent
uint &attrCol, bool &unclosedTag);
// useful regular expressions
- static const QRegExp startsWithCloseTag;
- static const QRegExp unclosedDoctype;
+ static const TQRegExp startsWithCloseTag;
+ static const TQRegExp unclosedDoctype;
};
class KateCSAndSIndent : public KateNormalIndent
@@ -435,7 +435,7 @@ class KateCSAndSIndent : public KateNormalIndent
~KateCSAndSIndent ();
virtual void processNewline (KateDocCursor &begin, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -451,17 +451,17 @@ class KateCSAndSIndent : public KateNormalIndent
int lastNonCommentChar( const KateDocCursor &line );
bool startsWithLabel( int line );
bool inStatement( const KateDocCursor &begin );
- QString continuationIndent( const KateDocCursor &begin );
+ TQString continuationIndent( const KateDocCursor &begin );
- QString calcIndent (const KateDocCursor &begin);
- QString calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword);
- QString calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos);
- QString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos);
+ TQString calcIndent (const KateDocCursor &begin);
+ TQString calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword);
+ TQString calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos);
+ TQString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos);
bool handleDoxygen (KateDocCursor &begin);
- QString findOpeningCommentIndentation (const KateDocCursor &start);
+ TQString findOpeningCommentIndentation (const KateDocCursor &start);
- QString indentString;
+ TQString indentString;
};
/**
@@ -508,7 +508,7 @@ class KateVarIndent : public KateNormalIndent
virtual ~KateVarIndent();
virtual void processNewline (KateDocCursor &cur, bool needContinue);
- virtual void processChar (QChar c);
+ virtual void processChar (TQChar c);
virtual void processLine (KateDocCursor &line);
virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -518,7 +518,7 @@ class KateVarIndent : public KateNormalIndent
virtual uint modeNumber () const { return KateDocumentConfig::imVarIndent; };
private slots:
- void slotVariableChanged(const QString&, const QString&);
+ void slotVariableChanged(const TQString&, const TQString&);
private:
/**
@@ -529,7 +529,7 @@ class KateVarIndent : public KateNormalIndent
* @param attrib the attribute the characters must have, defaults to
* KateAutoIndent::symbolAttrib
*/
- int coupleBalance( int line, const QChar &open, const QChar &close ) const;
+ int coupleBalance( int line, const TQChar &open, const TQChar &close ) const;
/**
* @return true if there is a matching opening with the correct attribute
@@ -549,7 +549,7 @@ class KateScriptIndent : public KateNormalIndent
~KateScriptIndent();
virtual void processNewline( KateDocCursor &cur, bool needContinue );
- virtual void processChar( QChar c );
+ virtual void processChar( TQChar c );
virtual void processLine (KateDocCursor &line);
// virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end);
@@ -566,7 +566,7 @@ class ScriptIndentConfigPage : public IndenterConfigPage
Q_OBJECT
public:
- ScriptIndentConfigPage ( QWidget *parent=0, const char *name=0 );
+ ScriptIndentConfigPage ( TQWidget *parent=0, const char *name=0 );
virtual ~ScriptIndentConfigPage ();
public slots:
diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp
index f92fb4282..ac1ee73d9 100644
--- a/kate/part/katebookmarks.cpp
+++ b/kate/part/katebookmarks.cpp
@@ -30,18 +30,18 @@
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -58,11 +58,11 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
KateBookmarks::KateBookmarks( KateView* view, Sorting sort )
- : QObject( view, "kate bookmarks" )
+ : TQObject( view, "kate bookmarks" )
, m_view( view )
, m_sorting( sort )
{
- connect (view->getDoc(), SIGNAL(marksChanged()), this, SLOT(marksChanged()));
+ connect (view->getDoc(), TQT_SIGNAL(marksChanged()), this, TQT_SLOT(marksChanged()));
_tries=0;
m_bookmarksMenu = 0L;
}
@@ -75,26 +75,26 @@ void KateBookmarks::createActions( KActionCollection* ac )
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
@@ -102,14 +102,14 @@ void KateBookmarks::createActions( KActionCollection* ac )
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
bookmarkMenuAboutToHide();
- connect( m_view, SIGNAL( gotFocus( Kate::View * ) ), this, SLOT( slotViewGotFocus( Kate::View * ) ) );
- connect( m_view, SIGNAL( lostFocus( Kate::View * ) ), this, SLOT( slotViewLostFocus( Kate::View * ) ) );
+ connect( m_view, TQT_SIGNAL( gotFocus( Kate::View * ) ), this, TQT_SLOT( slotViewGotFocus( Kate::View * ) ) );
+ connect( m_view, TQT_SIGNAL( lostFocus( Kate::View * ) ), this, TQT_SLOT( slotViewLostFocus( Kate::View * ) ) );
}
void KateBookmarks::toggleBookmark ()
@@ -126,7 +126,7 @@ void KateBookmarks::toggleBookmark ()
void KateBookmarks::clearBookmarks ()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
for (uint i=0; i < m.count(); i++)
m_view->getDoc()->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -146,18 +146,18 @@ void KateBookmarks::slotViewLostFocus( Kate::View *v )
m_bookmarksMenu->clear();
}
-void KateBookmarks::insertBookmarks( QPopupMenu& menu )
+void KateBookmarks::insertBookmarks( TQPopupMenu& menu )
{
uint line = m_view->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 )
menu.insertSeparator();
@@ -166,7 +166,7 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( m_view->getDoc()->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -180,8 +180,8 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
- m_view, SLOT(gotoLineNumber(int)), 0, (*it)->line, idx );
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ m_view, TQT_SLOT(gotoLineNumber(int)), 0, (*it)->line, idx );
if ( (*it)->line < line )
{
@@ -220,7 +220,7 @@ void KateBookmarks::insertBookmarks( QPopupMenu& menu )
void KateBookmarks::bookmarkMenuAboutToShow()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
m_bookmarksMenu->clear();
m_bookmarkToggle->setChecked( m_view->getDoc()->mark( m_view->cursorLine() )
@@ -247,7 +247,7 @@ void KateBookmarks::bookmarkMenuAboutToHide()
void KateBookmarks::goNext()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
if (m.isEmpty())
return;
@@ -264,7 +264,7 @@ void KateBookmarks::goNext()
void KateBookmarks::goPrevious()
{
- QPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
+ TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
if (m.isEmpty())
return;
diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h
index 0d72c0ccc..574bb44ad 100644
--- a/kate/part/katebookmarks.h
+++ b/kate/part/katebookmarks.h
@@ -20,8 +20,8 @@
#ifndef __KATE_BOOKMARKS_H__
#define __KATE_BOOKMARKS_H__
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KateView;
@@ -50,7 +50,7 @@ class KateBookmarks : public QObject
void setSorting( Sorting s ) { m_sorting = s; };
protected:
- void insertBookmarks( QPopupMenu& menu);
+ void insertBookmarks( TQPopupMenu& menu);
private slots:
void toggleBookmark();
@@ -75,7 +75,7 @@ class KateBookmarks : public QObject
KAction* m_goPrevious;
Sorting m_sorting;
- QPopupMenu* m_bookmarksMenu;
+ TQPopupMenu* m_bookmarksMenu;
uint _tries;
};
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp
index 06c919f96..74a9ba59e 100644
--- a/kate/part/katebuffer.cpp
+++ b/kate/part/katebuffer.cpp
@@ -34,13 +34,13 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qpopupmenu.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqpopupmenu.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
/**
* loader block size, load 256 kb at once per default
@@ -84,7 +84,7 @@ void KateBuffer::setMaxLoadedBlocks (uint count)
class KateFileLoader
{
public:
- KateFileLoader (const QString &filename, QTextCodec *codec, bool removeTrailingSpaces)
+ KateFileLoader (const TQString &filename, TQTextCodec *codec, bool removeTrailingSpaces)
: m_file (filename)
, m_buffer (kMin (m_file.size(), KATE_FILE_LOADER_BS))
, m_codec (codec)
@@ -95,7 +95,7 @@ class KateFileLoader
, lastWasEndOfLine (true) // at start of file, we had a virtual newline
, lastWasR (false) // we have not found a \r as last char
, m_eol (-1) // no eol type detected atm
- , m_twoByteEncoding (QString(codec->name()) == "ISO-10646-UCS-2")
+ , m_twoByteEncoding (TQString(codec->name()) == "ISO-10646-UCS-2")
, m_binary (false)
, m_removeTrailingSpaces (removeTrailingSpaces)
{
@@ -173,7 +173,7 @@ class KateFileLoader
inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; }
// internal unicode data array
- inline const QChar *unicode () const { return m_text.unicode(); }
+ inline const TQChar *unicode () const { return m_text.unicode(); }
// read a line, return length + offset in unicode data
void readLine (uint &offset, uint &length)
@@ -195,7 +195,7 @@ class KateFileLoader
{
processNull (c);
- QString str (m_decoder->toUnicode (m_buffer, c));
+ TQString str (m_decoder->toUnicode (m_buffer, c));
readString = str.length();
m_text = m_text.mid (m_lastLineStart, m_position-m_lastLineStart)
@@ -301,11 +301,11 @@ class KateFileLoader
}
private:
- QFile m_file;
- QByteArray m_buffer;
- QTextCodec *m_codec;
- QTextDecoder *m_decoder;
- QString m_text;
+ TQFile m_file;
+ TQByteArray m_buffer;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder;
+ TQString m_text;
uint m_position;
uint m_lastLineStart;
bool m_eof;
@@ -321,7 +321,7 @@ class KateFileLoader
* Create an empty buffer. (with one block with one empty line)
*/
KateBuffer::KateBuffer(KateDocument *doc)
- : QObject (doc),
+ : TQObject (doc),
editSessionNumber (0),
editIsRunning (false),
editTagLineStart (0xffffffff),
@@ -455,13 +455,13 @@ void KateBuffer::clear()
m_lineHighlighted = 0;
}
-bool KateBuffer::openFile (const QString &m_file)
+bool KateBuffer::openFile (const TQString &m_file)
{
KateFileLoader file (m_file, m_doc->config()->codec(), m_doc->configFlags() & KateDocument::cfRemoveSpaces);
bool ok = false;
struct stat sbuf;
- if (stat(QFile::encodeName(m_file), &sbuf) == 0)
+ if (stat(TQFile::encodeName(m_file), &sbuf) == 0)
{
if (S_ISREG(sbuf.st_mode) && file.open())
ok = true;
@@ -539,12 +539,12 @@ bool KateBuffer::openFile (const QString &m_file)
bool KateBuffer::canEncode ()
{
- QTextCodec *codec = m_doc->config()->codec();
+ TQTextCodec *codec = m_doc->config()->codec();
kdDebug(13020) << "ENC NAME: " << codec->name() << endl;
// hardcode some unicode encodings which can encode all chars
- if ((QString(codec->name()) == "UTF-8") || (QString(codec->name()) == "ISO-10646-UCS-2"))
+ if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2"))
return true;
for (uint i=0; i < m_lines; i++)
@@ -561,26 +561,26 @@ bool KateBuffer::canEncode ()
return true;
}
-bool KateBuffer::saveFile (const QString &m_file)
+bool KateBuffer::saveFile (const TQString &m_file)
{
- QFile file (m_file);
- QTextStream stream (&file);
+ TQFile file (m_file);
+ TQTextStream stream (&file);
if ( !file.open( IO_WriteOnly ) )
{
return false; // Error
}
- QTextCodec *codec = m_doc->config()->codec();
+ TQTextCodec *codec = m_doc->config()->codec();
// disable Unicode headers
- stream.setEncoding(QTextStream::RawUnicode);
+ stream.setEncoding(TQTextStream::RawUnicode);
// this line sets the mapper to the correct codec
stream.setCodec(codec);
// our loved eol string ;)
- QString eol = m_doc->config()->eolString ();
+ TQString eol = m_doc->config()->eolString ();
// should we strip spaces?
bool removeTrailingSpaces = m_doc->configFlags() & KateDocument::cfRemoveSpaces;
@@ -597,7 +597,7 @@ bool KateBuffer::saveFile (const QString &m_file)
if (lastChar > -1)
{
- stream << QConstString (textline->text(), lastChar+1).string();
+ stream << TQConstString (textline->text(), lastChar+1).string();
}
}
else // simple, dump the line
@@ -916,9 +916,9 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
textLine = blk->line(current_line);
} while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
- QMemArray<uint> foldingList=textLine->foldingListArray();
+ TQMemArray<uint> foldingList=textLine->foldingListArray();
while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) {
- foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim);
+ foldingList.resize(foldingList.size()-2,TQGArray::SpeedOptim);
}
addIndentBasedFoldingInformation(foldingList,addindent,deindent);
textLine->setFoldingList(foldingList);
@@ -927,19 +927,19 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
emit tagLines (blk->startLine()+current_line, blk->startLine()+current_line);
}
-void KateBuffer::addIndentBasedFoldingInformation(QMemArray<uint> &foldingList,bool addindent,uint deindent)
+void KateBuffer::addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList,bool addindent,uint deindent)
{
if (addindent) {
//kdDebug(13020)<<"adding indent for line :"<<current_line + buf->startLine()<<" textLine->noIndentBasedFoldingAtStart"<<textLine->noIndentBasedFoldingAtStart()<<endl;
kdDebug(13020)<<"adding ident"<<endl;
- foldingList.resize (foldingList.size() + 2, QGArray::SpeedOptim);
+ foldingList.resize (foldingList.size() + 2, TQGArray::SpeedOptim);
foldingList[foldingList.size()-2] = 1;
foldingList[foldingList.size()-1] = 0;
}
kdDebug(13020)<<"DEINDENT: "<<deindent<<endl;
if (deindent > 0)
{
- foldingList.resize (foldingList.size() + (deindent*2), QGArray::SpeedOptim);
+ foldingList.resize (foldingList.size() + (deindent*2), TQGArray::SpeedOptim);
for (uint z= foldingList.size()-(deindent*2); z < foldingList.size(); z=z+2)
{
@@ -965,7 +965,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (startLine >= (buf->startLine()+buf->lines()))
return false;
- //QTime t;
+ //TQTime t;
//t.start();
//kdDebug (13020) << "HIGHLIGHTED START --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine << endl;
//kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl;
@@ -1041,7 +1041,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
// current line
KateTextLine::Ptr textLine = buf->line(current_line);
- QMemArray<uint> foldingList;
+ TQMemArray<uint> foldingList;
bool ctxChanged = false;
m_highlight->doHighlight (prevLine, textLine, &foldingList, &ctxChanged);
@@ -1053,14 +1053,14 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (m_highlight->foldingIndentationSensitive())
{
// get the indentation array of the previous line to start with !
- QMemArray<unsigned short> indentDepth;
+ TQMemArray<unsigned short> indentDepth;
indentDepth.duplicate (prevLine->indentationDepthArray());
// current indentation of this line
uint iDepth = textLine->indentDepth(m_tabWidth);
if ((current_line+buf->startLine())==0)
{
- indentDepth.resize (1, QGArray::SpeedOptim);
+ indentDepth.resize (1, TQGArray::SpeedOptim);
indentDepth[0] = iDepth;
}
@@ -1121,18 +1121,18 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth)))
{
kdDebug(13020)<<"adding depth to \"stack\":"<<iDepth<<endl;
- indentDepth.resize (indentDepth.size()+1, QGArray::SpeedOptim);
+ indentDepth.resize (indentDepth.size()+1, TQGArray::SpeedOptim);
indentDepth[indentDepth.size()-1] = iDepth;
} else {
if (!indentDepth.isEmpty())
{
for (int z=indentDepth.size()-1; z > -1; z--)
if (indentDepth[z]>iDepth)
- indentDepth.resize(z, QGArray::SpeedOptim);
+ indentDepth.resize(z, TQGArray::SpeedOptim);
if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth)))
{
kdDebug(13020)<<"adding depth to \"stack\":"<<iDepth<<endl;
- indentDepth.resize (indentDepth.size()+1, QGArray::SpeedOptim);
+ indentDepth.resize (indentDepth.size()+1, TQGArray::SpeedOptim);
indentDepth[indentDepth.size()-1] = iDepth;
if (prevLine->firstChar()==-1) {
@@ -1196,8 +1196,8 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
if (foldingList.size()!=textLine->foldingListArray().size()) {
foldingChanged=true;
} else {
- QMemArray<uint>::ConstIterator it=foldingList.begin();
- QMemArray<uint>::ConstIterator it1=textLine->foldingListArray();
+ TQMemArray<uint>::ConstIterator it=foldingList.begin();
+ TQMemArray<uint>::ConstIterator it1=textLine->foldingListArray();
bool markerType=true;
for(;it!=foldingList.end();++it,++it1) {
if (markerType) {
@@ -1263,7 +1263,7 @@ void KateBuffer::codeFoldingColumnUpdate(unsigned int lineNr) {
if (line->foldingColumnsOutdated()) {
line->setFoldingColumnsOutdated(false);
bool tmp;
- QMemArray<uint> folding=line->foldingListArray();
+ TQMemArray<uint> folding=line->foldingListArray();
m_regionTree.updateLine(lineNr,&folding,&tmp,true,false);
}
}
@@ -1340,11 +1340,11 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
// is allready too much stuff around in mem ?
bool swap = m_parent->m_loadedBlocks.count() >= KateBuffer::maxLoadedBlocks();
- QByteArray rawData;
+ TQByteArray rawData;
// calcs the approx size for KATE_AVG_BLOCK_SIZE chars !
if (swap)
- rawData.resize ((KATE_AVG_BLOCK_SIZE * sizeof(QChar)) + ((KATE_AVG_BLOCK_SIZE/80) * 8));
+ rawData.resize ((KATE_AVG_BLOCK_SIZE * sizeof(TQChar)) + ((KATE_AVG_BLOCK_SIZE/80) * 8));
char *buf = rawData.data ();
uint size = 0;
@@ -1353,7 +1353,7 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
{
uint offset = 0, length = 0;
stream->readLine(offset, length);
- const QChar *unicodeData = stream->unicode () + offset;
+ const TQChar *unicodeData = stream->unicode () + offset;
// strip spaces at end of line
if ( stream->removeTrailingSpaces() )
@@ -1377,7 +1377,7 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
uint pos = size;
// calc new size
- size = size + 1 + sizeof(uint) + (sizeof(QChar)*length);
+ size = size + 1 + sizeof(uint) + (sizeof(TQChar)*length);
if (size > rawData.size ())
{
@@ -1391,8 +1391,8 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
memcpy(buf+pos, (char *) &length, sizeof(uint));
pos += sizeof(uint);
- memcpy(buf+pos, (char *) unicodeData, sizeof(QChar)*length);
- pos += sizeof(QChar)*length;
+ memcpy(buf+pos, (char *) unicodeData, sizeof(TQChar)*length);
+ pos += sizeof(TQChar)*length;
}
else
{
@@ -1501,7 +1501,7 @@ void KateBufBlock::swapIn ()
if (m_state != KateBufBlock::stateSwapped)
return;
- QByteArray rawData (m_vmblockSize);
+ TQByteArray rawData (m_vmblockSize);
// what to do if that fails ?
if (!KateFactory::self()->vm()->copyBlock(rawData.data(), m_vmblock, 0, rawData.size()))
@@ -1541,7 +1541,7 @@ void KateBufBlock::swapOut ()
for (uint i=0; i < m_lines; i++)
size += m_stringList[i]->dumpSize (haveHl);
- QByteArray rawData (size);
+ TQByteArray rawData (size);
char *buf = rawData.data();
// Dump textlines
diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h
index 6b2d48ead..6c4216810 100644
--- a/kate/part/katebuffer.h
+++ b/kate/part/katebuffer.h
@@ -25,10 +25,10 @@
#include <kvmallocator.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
class KateLineInfo;
class KateDocument;
@@ -202,7 +202,7 @@ class KateBufBlock
/**
* list of textlines
*/
- QValueVector<KateTextLine::Ptr> m_stringList;
+ TQValueVector<KateTextLine::Ptr> m_stringList;
/**
* parent buffer.
@@ -453,7 +453,7 @@ class KateBuffer : public QObject
* @param m_file filename to open
* @return success
*/
- bool openFile (const QString &m_file);
+ bool openFile (const TQString &m_file);
/**
* was the last loading broken because of not enough tmp disk space ?
@@ -479,7 +479,7 @@ class KateBuffer : public QObject
* @param m_file filename to save to
* @return success
*/
- bool saveFile (const QString &m_file);
+ bool saveFile (const TQString &m_file);
public:
/**
@@ -503,7 +503,7 @@ class KateBuffer : public QObject
*/
KateTextLine::Ptr line_internal (KateBufBlock *buf, uint i);
- inline void addIndentBasedFoldingInformation(QMemArray<uint> &foldingList,bool addindent,uint deindent);
+ inline void addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList,bool addindent,uint deindent);
inline void updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,bool addindent,uint deindent);
public:
/**
@@ -640,7 +640,7 @@ class KateBuffer : public QObject
* ALL blocks
* in order of linenumbers
*/
- QValueVector<KateBufBlock*> m_blocks;
+ TQValueVector<KateBufBlock*> m_blocks;
/**
* last block where the start/end line is in sync with real life
diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp
index 17846dd7d..b64b5414e 100644
--- a/kate/part/katecmds.cpp
+++ b/kate/part/katecmds.cpp
@@ -36,7 +36,7 @@
#include <kurl.h>
#include <kshellcompletion.h>
-#include <qregexp.h>
+#include <tqregexp.h>
//BEGIN CoreCommands
@@ -50,7 +50,7 @@ static void setDocFlag( KateDocumentConfig::ConfigFlags flag, bool enable,
// this returns wheather the string s could be converted to
// a bool value, one of on|off|1|0|true|false. the argument val is
// set to the extracted value in case of success
-static bool getBoolArg( QString s, bool *val )
+static bool getBoolArg( TQString s, bool *val )
{
bool res( false );
s = s.lower();
@@ -69,9 +69,9 @@ static bool getBoolArg( QString s, bool *val )
return false;
}
-QStringList KateCommands::CoreCommands::cmds()
+TQStringList KateCommands::CoreCommands::cmds()
{
- QStringList l;
+ TQStringList l;
l << "indent" << "unindent" << "cleanindent"
<< "comment" << "uncomment" << "goto" << "kill-line"
<< "set-tab-width" << "set-replace-tabs" << "set-show-tabs"
@@ -87,8 +87,8 @@ QStringList KateCommands::CoreCommands::cmds()
}
bool KateCommands::CoreCommands::exec(Kate::View *view,
- const QString &_cmd,
- QString &errorMsg)
+ const TQString &_cmd,
+ TQString &errorMsg)
{
#define KCC_ERR(s) { errorMsg=s; return false; }
// cast it hardcore, we know that it is really a kateview :)
@@ -98,8 +98,8 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
KCC_ERR( i18n("Could not access view") );
//create a list of args
- QStringList args( QStringList::split( QRegExp("\\s+"), _cmd ) );
- QString cmd ( args.first() );
+ TQStringList args( TQStringList::split( TQRegExp("\\s+"), _cmd ) );
+ TQString cmd ( args.first() );
args.remove( args.first() );
// ALL commands that takes no arguments.
@@ -157,7 +157,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
}
else if ( cmd == "set-highlight" )
{
- QString val = _cmd.section( ' ', 1 ).lower();
+ TQString val = _cmd.section( ' ', 1 ).lower();
for ( uint i=0; i < v->doc()->hlModeCount(); i++ )
{
if ( v->doc()->hlModeName( i ).lower() == val )
@@ -279,12 +279,12 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
KCC_ERR( i18n("Unknown command '%1'").arg(cmd) );
}
-KCompletion *KateCommands::CoreCommands::completionObject( const QString &cmd, Kate::View *view )
+KCompletion *KateCommands::CoreCommands::completionObject( const TQString &cmd, Kate::View *view )
{
if ( cmd == "set-highlight" )
{
KateView *v = (KateView*)view;
- QStringList l;
+ TQStringList l;
for ( uint i = 0; i < v->doc()->hlModeCount(); i++ )
l << v->doc()->hlModeName( i );
@@ -298,7 +298,7 @@ KCompletion *KateCommands::CoreCommands::completionObject( const QString &cmd, K
//END CoreCommands
//BEGIN SedReplace
-static void replace(QString &s, const QString &needle, const QString &with)
+static void replace(TQString &s, const TQString &needle, const TQString &with)
{
int pos=0;
while (1)
@@ -311,7 +311,7 @@ static void replace(QString &s, const QString &needle, const QString &with)
}
-static int backslashString(const QString &haystack, const QString &needle, int index)
+static int backslashString(const TQString &haystack, const TQString &needle, int index)
{
int len=haystack.length();
int searchlen=needle.length();
@@ -339,7 +339,7 @@ static int backslashString(const QString &haystack, const QString &needle, int i
}
// exchange "\t" for the actual tab character, for example
-static void exchangeAbbrevs(QString &str)
+static void exchangeAbbrevs(TQString &str)
{
// the format is (findreplace)*[nullzero]
const char *magic="a\x07t\tn\n";
@@ -348,9 +348,9 @@ static void exchangeAbbrevs(QString &str)
{
int index=0;
char replace=magic[1];
- while ((index=backslashString(str, QChar(*magic), index))!=-1)
+ while ((index=backslashString(str, TQChar(*magic), index))!=-1)
{
- str.replace(index, 2, QChar(replace));
+ str.replace(index, 2, TQChar(replace));
index++;
}
magic++;
@@ -359,7 +359,7 @@ static void exchangeAbbrevs(QString &str)
}
int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
- const QString &find, const QString &repOld, const QString &delim,
+ const TQString &find, const TQString &repOld, const TQString &delim,
bool noCase, bool repeat,
uint startcol, int endcol )
{
@@ -376,7 +376,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
// * handle capatures by putting them in one list.
// * the existing insertion is fine, including the line calculation.
- QStringList patterns = QStringList::split( QRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
+ TQStringList patterns = TQStringList::split( TQRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
if ( patterns.count() > 1 )
{
@@ -391,7 +391,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
}
}
- QRegExp matcher(patterns[0], noCase);
+ TQRegExp matcher(patterns[0], noCase);
uint len;
int matches = 0;
@@ -405,19 +405,19 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
matches++;
- QString rep=repOld;
+ TQString rep=repOld;
// now set the backreferences in the replacement
- QStringList backrefs=matcher.capturedTexts();
+ TQStringList backrefs=matcher.capturedTexts();
int refnum=1;
- QStringList::Iterator i = backrefs.begin();
+ TQStringList::Iterator i = backrefs.begin();
++i;
for (; i!=backrefs.end(); ++i)
{
// I need to match "\\" or "", but not "\"
- QString number=QString::number(refnum);
+ TQString number=TQString::number(refnum);
int index=0;
while (index!=-1)
@@ -468,11 +468,11 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
return matches;
}
-bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QString &msg)
+bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQString &msg)
{
kdDebug(13025)<<"SedReplace::execCmd( "<<cmd<<" )"<<endl;
- QRegExp delim("^[$%]?s\\s*([^\\w\\s])");
+ TQRegExp delim("^[$%]?s\\s*([^\\w\\s])");
if ( delim.search( cmd ) < 0 ) return false;
bool fullFile=cmd[0]=='%';
@@ -480,16 +480,16 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QStri
bool repeat=cmd[cmd.length()-1]=='g' || cmd[cmd.length()-2]=='g';
bool onlySelect=cmd[0]=='$';
- QString d = delim.cap(1);
+ TQString d = delim.cap(1);
kdDebug(13025)<<"SedReplace: delimiter is '"<<d<<"'"<<endl;
- QRegExp splitter( QString("^[$%]?s\\s*") + d + "((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d +"((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d + "[ig]{0,2}$" );
+ TQRegExp splitter( TQString("^[$%]?s\\s*") + d + "((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d +"((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d + "[ig]{0,2}$" );
if (splitter.search(cmd)<0) return false;
- QString find=splitter.cap(1);
+ TQString find=splitter.cap(1);
kdDebug(13025)<< "SedReplace: find=" << find.latin1() <<endl;
- QString replace=splitter.cap(2);
+ TQString replace=splitter.cap(2);
exchangeAbbrevs(replace);
kdDebug(13025)<< "SedReplace: replace=" << replace.latin1() <<endl;
@@ -546,12 +546,12 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QStri
//END SedReplace
//BEGIN Character
-bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QString &)
+bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQString &)
{
- QString cmd = _cmd;
+ TQString cmd = _cmd;
// hex, octal, base 9+1
- QRegExp num("^char *(0?x[0-9A-Fa-f]{1,4}|0[0-7]{1,6}|[0-9]{1,3})$");
+ TQRegExp num("^char *(0?x[0-9A-Fa-f]{1,4}|0[0-7]{1,6}|[0-9]{1,3})$");
if (num.search(cmd)==-1) return false;
cmd=num.cap(1);
@@ -562,7 +562,7 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
int base=10;
if (cmd[0]=='x' || cmd.left(2)=="0x")
{
- cmd.replace(QRegExp("^0?x"), "");
+ cmd.replace(TQRegExp("^0?x"), "");
base=16;
}
else if (cmd[0]=='0')
@@ -575,12 +575,12 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
char buf[2];
buf[0]=(char)number;
buf[1]=0;
- view->insertText(QString(buf));
+ view->insertText(TQString(buf));
}
else
{ // do the unicode thing
- QChar c(number);
- view->insertText(QString(&c, 1));
+ TQChar c(number);
+ view->insertText(TQString(&c, 1));
}
return true;
@@ -588,15 +588,15 @@ bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QStri
//END Character
//BEGIN Date
-bool KateCommands::Date::exec (Kate::View *view, const QString &cmd, QString &)
+bool KateCommands::Date::exec (Kate::View *view, const TQString &cmd, TQString &)
{
if (cmd.left(4) != "date")
return false;
- if (QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
- view->insertText(QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
+ if (TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
+ view->insertText(TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
else
- view->insertText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
+ view->insertText(TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
return true;
}
diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h
index 84f7919d8..55c8d807b 100644
--- a/kate/part/katecmds.h
+++ b/kate/part/katecmds.h
@@ -46,20 +46,20 @@ class CoreCommands : public Kate::Command, public Kate::CommandExtension
* @param errorMsg error to return if no success
* @return success
*/
- bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
+ bool exec( class Kate::View *view, const TQString &cmd, TQString &errorMsg );
- bool help( class Kate::View *, const QString &, QString & ) {return false;};
+ bool help( class Kate::View *, const TQString &, TQString & ) {return false;};
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds();
+ TQStringList cmds();
/**
* override completionObject from interfaces/document.h .
*/
- KCompletion *completionObject( const QString &cmd, Kate::View *view );
+ KCompletion *completionObject( const TQString &cmd, Kate::View *view );
};
/**
@@ -82,15 +82,15 @@ class SedReplace : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { QStringList l("s"); l << "%s" << "$s"; return l; };
+ TQStringList cmds () { TQStringList l("s"); l << "%s" << "$s"; return l; };
private:
/**
@@ -113,7 +113,7 @@ class SedReplace : public Kate::Command
* If it is -1, the whole line is used.
*/
static int sedMagic(KateDocument *doc, int &line,
- const QString &find, const QString &replace, const QString &delim,
+ const TQString &find, const TQString &replace, const TQString &delim,
bool noCase, bool repeat,
uint startcol=0, int endcol=-1);
};
@@ -136,15 +136,15 @@ class Character : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { return QStringList("char"); };
+ TQStringList cmds () { return TQStringList("char"); };
};
/**
@@ -160,15 +160,15 @@ class Date : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
+ bool exec (class Kate::View *view, const TQString &cmd, TQString &errorMsg);
- bool help (class Kate::View *, const QString &, QString &) { return false; };
+ bool help (class Kate::View *, const TQString &, TQString &) { return false; };
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds () { return QStringList("date"); };
+ TQStringList cmds () { return TQStringList("date"); };
};
diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp
index bbc34dfca..cee99f9d4 100644
--- a/kate/part/katecodecompletion.cpp
+++ b/kate/part/katecodecompletion.cpp
@@ -34,16 +34,16 @@
#include <kdebug.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
-#include <qlistbox.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qsizegrip.h>
-#include <qfontmetrics.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqsizegrip.h>
+#include <tqfontmetrics.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
/**
* This class is used as the codecompletion listbox. It can be resized according to its contents,
@@ -57,11 +57,11 @@ class KateCCListBox : public QListBox
/**
@short Create a new CCListBox
*/
- KateCCListBox (QWidget* parent = 0, const char* name = 0, WFlags f = 0):QListBox(parent, name, f)
+ KateCCListBox (TQWidget* parent = 0, const char* name = 0, WFlags f = 0):TQListBox(parent, name, f)
{
}
- QSize sizeHint() const
+ TQSize sizeHint() const
{
int count = this->count();
int height = 20;
@@ -80,12 +80,12 @@ class KateCCListBox : public QListBox
if ( (tmpcount = fontMetrics().width(text(i)) ) > maxcount)
maxcount = tmpcount;
- if (maxcount > QApplication::desktop()->width()){
- tmpwidth = QApplication::desktop()->width() - 5;
+ if (maxcount > TQApplication::desktop()->width()){
+ tmpwidth = TQApplication::desktop()->width() - 5;
height += horizontalScrollBar()->height();
} else
tmpwidth += maxcount;
- return QSize(tmpwidth,height);
+ return TQSize(tmpwidth,height);
}
};
@@ -93,8 +93,8 @@ class KateCCListBox : public QListBox
class KateCompletionItem : public QListBoxText
{
public:
- KateCompletionItem( QListBox* lb, KTextEditor::CompletionEntry entry )
- : QListBoxText( lb )
+ KateCompletionItem( TQListBox* lb, KTextEditor::CompletionEntry entry )
+ : TQListBoxText( lb )
, m_entry( entry )
{
if( entry.postfix == "()" ) { // should be configurable
@@ -109,31 +109,31 @@ class KateCompletionItem : public QListBoxText
KateCodeCompletion::KateCodeCompletion( KateView* view )
- : QObject( view, "Kate Code Completion" )
+ : TQObject( view, "Kate Code Completion" )
, m_view( view )
, m_commentLabel( 0 )
{
- m_completionPopup = new QVBox( 0, 0, WType_Popup );
- m_completionPopup->setFrameStyle( QFrame::Box | QFrame::Plain );
+ m_completionPopup = new TQVBox( 0, 0, WType_Popup );
+ m_completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
m_completionPopup->setLineWidth( 1 );
m_completionListBox = new KateCCListBox( m_completionPopup );
- m_completionListBox->setFrameStyle( QFrame::NoFrame );
- //m_completionListBox->setCornerWidget( new QSizeGrip( m_completionListBox) );
+ m_completionListBox->setFrameStyle( TQFrame::NoFrame );
+ //m_completionListBox->setCornerWidget( new TQSizeGrip( m_completionListBox) );
m_completionListBox->setFocusProxy( m_view->m_viewInternal );
m_completionListBox->installEventFilter( this );
- m_completionPopup->resize(m_completionListBox->sizeHint() + QSize(2,2));
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
m_completionPopup->installEventFilter( this );
m_completionPopup->setFocusProxy( m_view->m_viewInternal );
m_pArgHint = new KateArgHint( m_view );
- connect( m_pArgHint, SIGNAL(argHintHidden()),
- this, SIGNAL(argHintHidden()) );
+ connect( m_pArgHint, TQT_SIGNAL(argHintHidden()),
+ this, TQT_SIGNAL(argHintHidden()) );
- connect( m_view, SIGNAL(cursorPositionChanged()),
- this, SLOT(slotCursorPosChanged()) );
+ connect( m_view, TQT_SIGNAL(cursorPositionChanged()),
+ this, TQT_SLOT(slotCursorPosChanged()) );
}
KateCodeCompletion::~KateCodeCompletion()
@@ -146,7 +146,7 @@ bool KateCodeCompletion::codeCompletionVisible () {
}
void KateCodeCompletion::showCompletionBox(
- QValueList<KTextEditor::CompletionEntry> complList, int offset, bool casesensitive )
+ TQValueList<KTextEditor::CompletionEntry> complList, int offset, bool casesensitive )
{
kdDebug(13035) << "showCompletionBox " << endl;
@@ -161,14 +161,14 @@ void KateCodeCompletion::showCompletionBox(
updateBox( true );
}
-bool KateCodeCompletion::eventFilter( QObject *o, QEvent *e )
+bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e )
{
if ( o != m_completionPopup &&
o != m_completionListBox &&
o != m_completionListBox->viewport() )
return false;
- if( e->type() == QEvent::Hide )
+ if( e->type() == TQEvent::Hide )
{
//don't use abortCompletion() as aborting here again will send abort signal
//even on successfull completion we will emit completionAborted() twice...
@@ -179,20 +179,20 @@ bool KateCodeCompletion::eventFilter( QObject *o, QEvent *e )
}
- if ( e->type() == QEvent::MouseButtonDblClick ) {
+ if ( e->type() == TQEvent::MouseButtonDblClick ) {
doComplete();
return false;
}
- if ( e->type() == QEvent::MouseButtonPress ) {
- QTimer::singleShot(0, this, SLOT(showComment()));
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ TQTimer::singleShot(0, this, TQT_SLOT(showComment()));
return false;
}
return false;
}
-void KateCodeCompletion::handleKey (QKeyEvent *e)
+void KateCodeCompletion::handleKey (TQKeyEvent *e)
{
// close completion if you move out of range
if ((e->key() == Key_Up) && (m_completionListBox->currentItem() == 0))
@@ -207,8 +207,8 @@ void KateCodeCompletion::handleKey (QKeyEvent *e)
(e->key() == Key_Home ) || (e->key() == Key_End) ||
(e->key() == Key_Prior) || (e->key() == Key_Next ))
{
- QTimer::singleShot(0,this,SLOT(showComment()));
- QApplication::sendEvent( m_completionListBox, (QEvent*)e );
+ TQTimer::singleShot(0,this,TQT_SLOT(showComment()));
+ TQApplication::sendEvent( m_completionListBox, (TQEvent*)e );
return;
}
@@ -224,11 +224,11 @@ void KateCodeCompletion::doComplete()
if( item == 0 )
return;
- QString text = item->m_entry.text;
- QString currentLine = m_view->currentTextLine();
+ TQString text = item->m_entry.text;
+ TQString currentLine = m_view->currentTextLine();
int len = m_view->cursorColumnReal() - m_colCursor;
- QString currentComplText = currentLine.mid(m_colCursor,len);
- QString add = text.mid(currentComplText.length());
+ TQString currentComplText = currentLine.mid(m_colCursor,len);
+ TQString add = text.mid(currentComplText.length());
if( item->m_entry.postfix == "()" )
add += "(";
@@ -269,9 +269,9 @@ void KateCodeCompletion::updateBox( bool )
m_completionListBox->clear();
- QString currentLine = m_view->currentTextLine();
+ TQString currentLine = m_view->currentTextLine();
int len = m_view->cursorColumnReal() - m_colCursor;
- QString currentComplText = currentLine.mid(m_colCursor,len);
+ TQString currentComplText = currentLine.mid(m_colCursor,len);
/* No-one really badly wants those, or?
kdDebug(13035) << "Column: " << m_colCursor << endl;
kdDebug(13035) << "Line: " << currentLine << endl;
@@ -280,7 +280,7 @@ void KateCodeCompletion::updateBox( bool )
kdDebug(13035) << "Text: '" << currentComplText << "'" << endl;
kdDebug(13035) << "Count: " << m_complList.count() << endl;
*/
- QValueList<KTextEditor::CompletionEntry>::Iterator it;
+ TQValueList<KTextEditor::CompletionEntry>::Iterator it;
if( m_caseSensitive ) {
for( it = m_complList.begin(); it != m_complList.end(); ++it ) {
if( (*it).text.startsWith(currentComplText) ) {
@@ -305,29 +305,29 @@ void KateCodeCompletion::updateBox( bool )
}
kdDebug(13035)<<"KateCodeCompletion::updateBox: Resizing widget"<<endl;
- m_completionPopup->resize(m_completionListBox->sizeHint() + QSize(2,2));
- QPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() );
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
+ TQPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() );
int x = p.x();
int y = p.y() ;
- if ( y + m_completionPopup->height() + m_view->renderer()->config()->fontMetrics( )->height() > QApplication::desktop()->height() )
+ if ( y + m_completionPopup->height() + m_view->renderer()->config()->fontMetrics( )->height() > TQApplication::desktop()->height() )
y -= (m_completionPopup->height() );
else
y += m_view->renderer()->config()->fontMetrics( )->height();
- if (x + m_completionPopup->width() > QApplication::desktop()->width())
- x = QApplication::desktop()->width() - m_completionPopup->width();
+ if (x + m_completionPopup->width() > TQApplication::desktop()->width())
+ x = TQApplication::desktop()->width() - m_completionPopup->width();
- m_completionPopup->move( QPoint(x,y) );
+ m_completionPopup->move( TQPoint(x,y) );
m_completionListBox->setCurrentItem( 0 );
m_completionListBox->setSelected( 0, true );
m_completionListBox->setFocus();
m_completionPopup->show();
- QTimer::singleShot(0,this,SLOT(showComment()));
+ TQTimer::singleShot(0,this,TQT_SLOT(showComment()));
}
-void KateCodeCompletion::showArgHint ( QStringList functionList, const QString& strWrapping, const QString& strDelimiter )
+void KateCodeCompletion::showArgHint ( TQStringList functionList, const TQString& strWrapping, const TQString& strDelimiter )
{
unsigned int line, col;
m_view->cursorPositionReal( &line, &col );
@@ -335,8 +335,8 @@ void KateCodeCompletion::showArgHint ( QStringList functionList, const QString&
m_pArgHint->setArgMarkInfos( strWrapping, strDelimiter );
int nNum = 0;
- QStringList::Iterator end(functionList.end());
- for( QStringList::Iterator it = functionList.begin(); it != end; ++it )
+ TQStringList::Iterator end(functionList.end());
+ for( TQStringList::Iterator it = functionList.begin(); it != end; ++it )
{
kdDebug(13035) << "Insert function text: " << *it << endl;
@@ -345,7 +345,7 @@ void KateCodeCompletion::showArgHint ( QStringList functionList, const QString&
nNum++;
}
- m_pArgHint->move(m_view->mapToGlobal(m_view->cursorCoordinates() + QPoint(0,m_view->renderer()->config()->fontMetrics( )->height())) );
+ m_pArgHint->move(m_view->mapToGlobal(m_view->cursorCoordinates() + TQPoint(0,m_view->renderer()->config()->fontMetrics( )->height())) );
m_pArgHint->show();
}
@@ -369,13 +369,13 @@ void KateCodeCompletion::showComment()
delete m_commentLabel;
m_commentLabel = new KateCodeCompletionCommentLabel( 0, item->m_entry.comment );
- m_commentLabel->setFont(QToolTip::font());
- m_commentLabel->setPalette(QToolTip::palette());
+ m_commentLabel->setFont(TQToolTip::font());
+ m_commentLabel->setPalette(TQToolTip::palette());
- QPoint rightPoint = m_completionPopup->mapToGlobal(QPoint(m_completionPopup->width(),0));
- QPoint leftPoint = m_completionPopup->mapToGlobal(QPoint(0,0));
- QRect screen = QApplication::desktop()->screenGeometry ( m_commentLabel );
- QPoint finalPoint;
+ TQPoint rightPoint = m_completionPopup->mapToGlobal(TQPoint(m_completionPopup->width(),0));
+ TQPoint leftPoint = m_completionPopup->mapToGlobal(TQPoint(0,0));
+ TQRect screen = TQApplication::desktop()->screenGeometry ( m_commentLabel );
+ TQPoint finalPoint;
if (rightPoint.x()+m_commentLabel->width() > screen.x() + screen.width())
finalPoint.setX(leftPoint.x()-m_commentLabel->width());
else
@@ -392,13 +392,13 @@ void KateCodeCompletion::showComment()
}
KateArgHint::KateArgHint( KateView* parent, const char* name )
- : QFrame( parent, name, WType_Popup )
+ : TQFrame( parent, name, WType_Popup )
{
setBackgroundColor( black );
setPaletteForegroundColor( Qt::black );
labelDict.setAutoDelete( true );
- layout = new QVBoxLayout( this, 1, 2 );
+ layout = new TQVBoxLayout( this, 1, 2 );
layout->setAutoAdd( true );
editorView = parent;
@@ -414,7 +414,7 @@ KateArgHint::~KateArgHint()
{
}
-void KateArgHint::setArgMarkInfos( const QString& wrapping, const QString& delimiter )
+void KateArgHint::setArgMarkInfos( const TQString& wrapping, const TQString& delimiter )
{
m_wrapping = wrapping;
m_delimiter = delimiter;
@@ -454,10 +454,10 @@ void KateArgHint::cursorPositionChanged( KateView* view, int line, int col )
int nCountDelimiter = 0;
int count = 0;
- QString currentTextLine = view->doc()->textLine( line );
- QString text = currentTextLine.mid( m_currentCol, col - m_currentCol );
- QRegExp strconst_rx( "\"[^\"]*\"" );
- QRegExp chrconst_rx( "'[^']*'" );
+ TQString currentTextLine = view->doc()->textLine( line );
+ TQString text = currentTextLine.mid( m_currentCol, col - m_currentCol );
+ TQRegExp strconst_rx( "\"[^\"]*\"" );
+ TQRegExp chrconst_rx( "'[^']*'" );
text = text
.replace( strconst_rx, "\"\"" )
@@ -484,11 +484,11 @@ void KateArgHint::cursorPositionChanged( KateView* view, int line, int col )
}
-void KateArgHint::addFunction( int id, const QString& prot )
+void KateArgHint::addFunction( int id, const TQString& prot )
{
m_functionMap[ id ] = prot;
- QLabel* label = new QLabel( prot.stripWhiteSpace().simplifyWhiteSpace(), this );
- label->setBackgroundColor( QColor(255, 255, 238) );
+ TQLabel* label = new TQLabel( prot.stripWhiteSpace().simplifyWhiteSpace(), this );
+ label->setBackgroundColor( TQColor(255, 255, 238) );
label->show();
labelDict.insert( id, label );
@@ -507,15 +507,15 @@ void KateArgHint::setCurrentFunction( int currentFunction )
currentFunction = 0;
if( m_markCurrentFunction && m_currentFunction >= 0 ){
- QLabel* label = labelDict[ m_currentFunction ];
+ TQLabel* label = labelDict[ m_currentFunction ];
label->setFont( font() );
}
m_currentFunction = currentFunction;
if( m_markCurrentFunction ){
- QLabel* label = labelDict[ currentFunction ];
- QFont fnt( font() );
+ TQLabel* label = labelDict[ currentFunction ];
+ TQFont fnt( font() );
fnt.setBold( true );
label->setFont( fnt );
}
@@ -526,14 +526,14 @@ void KateArgHint::setCurrentFunction( int currentFunction )
void KateArgHint::show()
{
- QFrame::show();
+ TQFrame::show();
adjustSize();
}
-bool KateArgHint::eventFilter( QObject*, QEvent* e )
+bool KateArgHint::eventFilter( TQObject*, TQEvent* e )
{
- if( isVisible() && e->type() == QEvent::KeyPress ){
- QKeyEvent* ke = static_cast<QKeyEvent*>( e );
+ if( isVisible() && e->type() == TQEvent::KeyPress ){
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>( e );
if( (ke->state() & ControlButton) && ke->key() == Key_Left ){
setCurrentFunction( currentFunction() - 1 );
ke->accept();
@@ -553,9 +553,9 @@ bool KateArgHint::eventFilter( QObject*, QEvent* e )
void KateArgHint::adjustSize( )
{
- QRect screen = QApplication::desktop()->screenGeometry( pos() );
+ TQRect screen = TQApplication::desktop()->screenGeometry( pos() );
- QFrame::adjustSize();
+ TQFrame::adjustSize();
if( width() > screen.width() )
resize( screen.width(), height() );
diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h
index 81279d929..895151b05 100644
--- a/kate/part/katecodecompletion.h
+++ b/kate/part/katecodecompletion.h
@@ -30,12 +30,12 @@
#include <ktexteditor/codecompletioninterface.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qmap.h>
-#include <qintdict.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqmap.h>
+#include <tqintdict.h>
class KateView;
class KateArgHint;
@@ -49,13 +49,13 @@ class KateCodeCompletionCommentLabel : public QLabel
Q_OBJECT
public:
- KateCodeCompletionCommentLabel( QWidget* parent, const QString& text) : QLabel( parent, "toolTipTip",
+ KateCodeCompletionCommentLabel( TQWidget* parent, const TQString& text) : TQLabel( parent, "toolTipTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM )
{
setMargin(1);
setIndent(0);
setAutoMask( false );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 );
setAlignment( AlignAuto | AlignTop );
polish();
@@ -77,12 +77,12 @@ class KateCodeCompletion : public QObject
bool codeCompletionVisible ();
void showArgHint(
- QStringList functionList, const QString& strWrapping, const QString& strDelimiter );
+ TQStringList functionList, const TQString& strWrapping, const TQString& strDelimiter );
void showCompletionBox(
- QValueList<KTextEditor::CompletionEntry> entries, int offset = 0, bool casesensitive = true );
- bool eventFilter( QObject* o, QEvent* e );
+ TQValueList<KTextEditor::CompletionEntry> entries, int offset = 0, bool casesensitive = true );
+ bool eventFilter( TQObject* o, TQEvent* e );
- void handleKey (QKeyEvent *e);
+ void handleKey (TQKeyEvent *e);
public slots:
void slotCursorPosChanged();
@@ -94,7 +94,7 @@ class KateCodeCompletion : public QObject
void completionDone();
void argHintHidden();
void completionDone(KTextEditor::CompletionEntry);
- void filterInsertString(KTextEditor::CompletionEntry*,QString *);
+ void filterInsertString(KTextEditor::CompletionEntry*,TQString *);
private:
void doComplete();
@@ -104,9 +104,9 @@ class KateCodeCompletion : public QObject
KateArgHint* m_pArgHint;
KateView* m_view;
- QVBox* m_completionPopup;
+ TQVBox* m_completionPopup;
KateCCListBox* m_completionListBox;
- QValueList<KTextEditor::CompletionEntry> m_complList;
+ TQValueList<KTextEditor::CompletionEntry> m_complList;
uint m_lineCursor;
uint m_colCursor;
int m_offset;
@@ -125,14 +125,14 @@ class KateArgHint: public QFrame
virtual void setCurrentFunction( int );
virtual int currentFunction() const { return m_currentFunction; }
- void setArgMarkInfos( const QString&, const QString& );
+ void setArgMarkInfos( const TQString&, const TQString& );
- virtual void addFunction( int, const QString& );
- QString functionAt( int id ) const { return m_functionMap[ id ]; }
+ virtual void addFunction( int, const TQString& );
+ TQString functionAt( int id ) const { return m_functionMap[ id ]; }
virtual void show();
virtual void adjustSize();
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
signals:
void argHintHidden();
@@ -147,16 +147,16 @@ class KateArgHint: public QFrame
void slotDone(bool completed);
private:
- QMap<int, QString> m_functionMap;
+ TQMap<int, TQString> m_functionMap;
int m_currentFunction;
- QString m_wrapping;
- QString m_delimiter;
+ TQString m_wrapping;
+ TQString m_delimiter;
bool m_markCurrentFunction;
int m_currentLine;
int m_currentCol;
KateView* editorView;
- QIntDict<QLabel> labelDict;
- QLayout* layout;
+ TQIntDict<TQLabel> labelDict;
+ TQLayout* layout;
};
#endif
diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp
index 49090820b..91b4da88a 100644
--- a/kate/part/katecodefoldinghelpers.cpp
+++ b/kate/part/katecodefoldinghelpers.cpp
@@ -23,7 +23,7 @@
#include "katecursor.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#define JW_DEBUG 0
@@ -150,7 +150,7 @@ void KateCodeFoldingNode::clearChildren ()
m_children.resize (0);
}
-KateCodeFoldingTree::KateCodeFoldingTree(KateBuffer *buffer): QObject(buffer), m_buffer (buffer)
+KateCodeFoldingTree::KateCodeFoldingTree(KateBuffer *buffer): TQObject(buffer), m_buffer (buffer)
{
clear();
}
@@ -360,10 +360,10 @@ void KateCodeFoldingTree::debugDump()
dumpNode(&m_root, "");
}
-void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &prefix)
+void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const TQString &prefix)
{
//output node properties
- kdDebug(13000)<<prefix<<QString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6").
+ kdDebug(13000)<<prefix<<TQString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6").
arg(node->type).arg(node->startLineValid).arg(node->startLineRel).arg(node->endLineValid).
arg(node->endLineRel).arg(node->visible)<<endl;
@@ -371,7 +371,7 @@ void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &pre
if (node->noChildren())
return;
- QString newprefix(prefix + " ");
+ TQString newprefix(prefix + " ");
for ( uint i=0; i < node->childCount(); ++i )
dumpNode (node->child(i),newprefix);
}
@@ -380,7 +380,7 @@ void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const QString &pre
That's one of the most important functions ;)
*/
void KateCodeFoldingTree::updateLine(unsigned int line,
- QMemArray<uint> *regionChanges, bool *updated,bool changed,bool colsChanged)
+ TQMemArray<uint> *regionChanges, bool *updated,bool changed,bool colsChanged)
{
if ( (!changed) || colsChanged)
{
@@ -752,7 +752,7 @@ void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node)
break;
}
#if JW_DEBUG
- kdDebug(13000)<<QString("remove pos: %1").arg(removepos)<<endl;
+ kdDebug(13000)<<TQString("remove pos: %1").arg(removepos)<<endl;
#endif
if (removepos>-1)
{
@@ -786,7 +786,7 @@ void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node)
-void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType, QMemArray<uint>* list,unsigned int line,unsigned int charPos)
+void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType, TQMemArray<uint>* list,unsigned int line,unsigned int charPos)
{
uint startLine = getStartLine(node);
if ((startLine==line) && (node->type!=0))
@@ -948,7 +948,7 @@ void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType
}
-void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *node,signed char /* nType */, QMemArray<uint>*
+void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *node,signed char /* nType */, TQMemArray<uint>*
list,unsigned int line,int current, unsigned int startLine,unsigned int charPos)
{
while (!(list->isEmpty()))
@@ -1036,7 +1036,7 @@ void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line)
dontIgnoreUnchangedLines.insert(line+1, &trueVal);
hiddenLinesCountCacheValid = false;
#if JW_DEBUG
- kdDebug(13000)<<QString("KateCodeFoldingTree::lineHasBeenRemoved: %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::lineHasBeenRemoved: %1").arg(line)<<endl;
#endif
//line ++;
@@ -1067,7 +1067,7 @@ void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line)
if (node->parentNode)
decrementBy1(node->parentNode, node);
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start > line)
(*it).start--;
@@ -1100,7 +1100,7 @@ void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line)
hiddenLinesCountCacheValid = false;
//return;
#if JW_DEBUG
- kdDebug(13000)<<QString("KateCodeFoldingTree::lineHasBeenInserted: %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::lineHasBeenInserted: %1").arg(line)<<endl;
#endif
// findAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
@@ -1127,7 +1127,7 @@ void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line)
if (node->parentNode)
incrementBy1(node->parentNode, node);
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start > line)
(*it).start++;
@@ -1330,7 +1330,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line)
lineMapping.clear();
hiddenLinesCountCacheValid = false;
- kdDebug(13000)<<QString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl;
+ kdDebug(13000)<<TQString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl;
findAllNodesOpenedOrClosedAt(line);
for (int i=0; i<(int)nodesForLine.count(); i++)
@@ -1352,7 +1352,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line)
addHiddenLineBlock(nodesForLine.at(0),line);
else
{
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it)
if ((*it).start == line+1)
{
hiddenLines.remove(it);
@@ -1385,7 +1385,7 @@ void KateCodeFoldingTree::addHiddenLineBlock(KateCodeFoldingNode *node,unsigned
data.length = node->endLineRel-(existsOpeningAtLineAfter(line+node->endLineRel,node)?1:0); // without -1;
bool inserted = false;
- for (QValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if (((*it).start>=data.start) && ((*it).start<=data.start+data.length-1)) // another hidden block starting at the within this block already exits -> adapt new block
{
@@ -1438,14 +1438,14 @@ unsigned int KateCodeFoldingTree::getRealLine(unsigned int virtualLine)
if (hiddenLines.isEmpty())
return virtualLine;
- // kdDebug(13000)<<QString("VirtualLine %1").arg(virtualLine)<<endl;
+ // kdDebug(13000)<<TQString("VirtualLine %1").arg(virtualLine)<<endl;
unsigned int *real=lineMapping[virtualLine];
if (real)
return (*real);
unsigned int tmp = virtualLine;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
{
if ((*it).start<=virtualLine)
virtualLine += (*it).length;
@@ -1453,7 +1453,7 @@ unsigned int KateCodeFoldingTree::getRealLine(unsigned int virtualLine)
break;
}
- // kdDebug(13000)<<QString("Real Line %1").arg(virtualLine)<<endl;
+ // kdDebug(13000)<<TQString("Real Line %1").arg(virtualLine)<<endl;
lineMapping.insert(tmp, new unsigned int(virtualLine));
return virtualLine;
@@ -1468,9 +1468,9 @@ unsigned int KateCodeFoldingTree::getVirtualLine(unsigned int realLine)
if (hiddenLines.isEmpty())
return realLine;
- // kdDebug(13000)<<QString("RealLine--> %1").arg(realLine)<<endl;
+ // kdDebug(13000)<<TQString("RealLine--> %1").arg(realLine)<<endl;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.fromLast(); it!=hiddenLines.end(); --it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.fromLast(); it!=hiddenLines.end(); --it)
{
if ((*it).start <= realLine)
realLine -= (*it).length;
@@ -1478,7 +1478,7 @@ unsigned int KateCodeFoldingTree::getVirtualLine(unsigned int realLine)
// break;
}
- // kdDebug(13000)<<QString("-->virtual Line %1").arg(realLine)<<endl;
+ // kdDebug(13000)<<TQString("-->virtual Line %1").arg(realLine)<<endl;
return realLine;
}
@@ -1498,7 +1498,7 @@ unsigned int KateCodeFoldingTree::getHiddenLinesCount(unsigned int doclen)
hiddenLinesCountCacheValid = true;
hiddenLinesCountCache = 0;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it)
{
if ((*it).start+(*it).length<=doclen)
hiddenLinesCountCache += (*it).length;
@@ -1635,7 +1635,7 @@ void KateCodeFoldingTree::ensureVisible( uint line )
{
// first have a look, if the line is really hidden
bool found=false;
- for (QValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
+ for (TQValueList<KateHiddenLineBlock>::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it)
{
if ( ((*it).start<=line) && ((*it).start+(*it).length>line) )
{
diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h
index bd5e5e8d5..72aebd49d 100644
--- a/kate/part/katecodefoldinghelpers.h
+++ b/kate/part/katecodefoldinghelpers.h
@@ -20,11 +20,11 @@
#define _KATE_CODEFOLDING_HELPERS_
//BEGIN INCLUDES + FORWARDS
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qobject.h>
-#include <qintdict.h>
-#include <qmemarray.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqmemarray.h>
class KateCodeFoldingTree;
class KateTextCursor;
@@ -110,7 +110,7 @@ class KateCodeFoldingNode
bool deleteOpening;
bool deleteEnding;
- QMemArray<KateCodeFoldingNode*> m_children;
+ TQMemArray<KateCodeFoldingNode*> m_children;
};
class KateCodeFoldingTree : public QObject
@@ -148,12 +148,12 @@ class KateCodeFoldingTree : public QObject
KateBuffer *m_buffer;
- QIntDict<unsigned int> lineMapping;
- QIntDict<bool> dontIgnoreUnchangedLines;
+ TQIntDict<unsigned int> lineMapping;
+ TQIntDict<bool> dontIgnoreUnchangedLines;
- QPtrList<KateCodeFoldingNode> markedForDeleting;
- QPtrList<KateCodeFoldingNode> nodesForLine;
- QValueList<KateHiddenLineBlock> hiddenLines;
+ TQPtrList<KateCodeFoldingNode> markedForDeleting;
+ TQPtrList<KateCodeFoldingNode> nodesForLine;
+ TQValueList<KateHiddenLineBlock> hiddenLines;
unsigned int hiddenLinesCountCache;
bool something_changed;
@@ -165,9 +165,9 @@ class KateCodeFoldingTree : public QObject
bool correctEndings (signed char data, KateCodeFoldingNode *node, unsigned int line, unsigned int endCol, int insertPos);
- void dumpNode (KateCodeFoldingNode *node, const QString &prefix);
- void addOpening (KateCodeFoldingNode *node, signed char nType,QMemArray<uint>* list, unsigned int line,unsigned int charPos);
- void addOpening_further_iterations (KateCodeFoldingNode *node,signed char nType, QMemArray<uint>*
+ void dumpNode (KateCodeFoldingNode *node, const TQString &prefix);
+ void addOpening (KateCodeFoldingNode *node, signed char nType,TQMemArray<uint>* list, unsigned int line,unsigned int charPos);
+ void addOpening_further_iterations (KateCodeFoldingNode *node,signed char nType, TQMemArray<uint>*
list,unsigned int line,int current,unsigned int startLine,unsigned int charPos);
void incrementBy1 (KateCodeFoldingNode *node, KateCodeFoldingNode *after);
@@ -201,7 +201,7 @@ class KateCodeFoldingTree : public QObject
void moveSubNodesUp (KateCodeFoldingNode *node);
public slots:
- void updateLine (unsigned int line,QMemArray<uint>* regionChanges, bool *updated, bool changed,bool colschanged);
+ void updateLine (unsigned int line,TQMemArray<uint>* regionChanges, bool *updated, bool changed,bool colschanged);
void toggleRegionVisibility (unsigned int);
void collapseToplevelNodes ();
void expandToplevelNodes (int numLines);
diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp
index c580ed5c1..4b3c2f52b 100644
--- a/kate/part/kateconfig.cpp
+++ b/kate/part/kateconfig.cpp
@@ -37,8 +37,8 @@
#include <kinstance.h>
#include <kstaticdeleter.h>
-#include <qpopupmenu.h>
-#include <qtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
@@ -180,9 +180,9 @@ void KateDocumentConfig::readConfig (KConfig *config)
setSearchDirConfigDepth (config->readNumEntry("Search Dir Config Depth", 3));
- setBackupPrefix (config->readEntry("Backup Prefix", QString ("")));
+ setBackupPrefix (config->readEntry("Backup Prefix", TQString ("")));
- setBackupSuffix (config->readEntry("Backup Suffix", QString ("~")));
+ setBackupSuffix (config->readEntry("Backup Suffix", TQString ("~")));
// plugins
for (uint i=0; i<KateFactory::self()->plugins().count(); i++)
@@ -409,7 +409,7 @@ void KateDocumentConfig::setConfigFlags (uint fullFlags)
configEnd ();
}
-const QString &KateDocumentConfig::encoding () const
+const TQString &KateDocumentConfig::encoding () const
{
if (m_encodingSet || isGlobal())
return m_encoding;
@@ -417,12 +417,12 @@ const QString &KateDocumentConfig::encoding () const
return s_global->encoding();
}
-QTextCodec *KateDocumentConfig::codec ()
+TQTextCodec *KateDocumentConfig::codec ()
{
if (m_encodingSet || isGlobal())
{
if (m_encoding.isEmpty() && isGlobal())
- return KGlobal::charsets()->codecForName (QString::fromLatin1(KGlobal::locale()->encoding()));
+ return KGlobal::charsets()->codecForName (TQString::fromLatin1(KGlobal::locale()->encoding()));
else if (m_encoding.isEmpty())
return s_global->codec ();
else
@@ -432,14 +432,14 @@ QTextCodec *KateDocumentConfig::codec ()
return s_global->codec ();
}
-void KateDocumentConfig::setEncoding (const QString &encoding)
+void KateDocumentConfig::setEncoding (const TQString &encoding)
{
- QString enc = encoding;
+ TQString enc = encoding;
if (!enc.isEmpty())
{
bool found = false;
- QTextCodec *codec = KGlobal::charsets()->codecForName (encoding, found);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName (encoding, found);
if (!found || !codec)
return;
@@ -471,16 +471,16 @@ int KateDocumentConfig::eol () const
return s_global->eol();
}
-QString KateDocumentConfig::eolString ()
+TQString KateDocumentConfig::eolString ()
{
if (eol() == KateDocumentConfig::eolUnix)
- return QString ("\n");
+ return TQString ("\n");
else if (eol() == KateDocumentConfig::eolDos)
- return QString ("\r\n");
+ return TQString ("\r\n");
else if (eol() == KateDocumentConfig::eolMac)
- return QString ("\r");
+ return TQString ("\r");
- return QString ("\n");
+ return TQString ("\n");
}
void KateDocumentConfig::setEol (int mode)
@@ -529,7 +529,7 @@ void KateDocumentConfig::setBackupFlags (uint flags)
configEnd ();
}
-const QString &KateDocumentConfig::backupPrefix () const
+const TQString &KateDocumentConfig::backupPrefix () const
{
if (m_backupPrefixSet || isGlobal())
return m_backupPrefix;
@@ -537,7 +537,7 @@ const QString &KateDocumentConfig::backupPrefix () const
return s_global->backupPrefix();
}
-const QString &KateDocumentConfig::backupSuffix () const
+const TQString &KateDocumentConfig::backupSuffix () const
{
if (m_backupSuffixSet || isGlobal())
return m_backupSuffix;
@@ -545,7 +545,7 @@ const QString &KateDocumentConfig::backupSuffix () const
return s_global->backupSuffix();
}
-void KateDocumentConfig::setBackupPrefix (const QString &prefix)
+void KateDocumentConfig::setBackupPrefix (const TQString &prefix)
{
configStart ();
@@ -555,7 +555,7 @@ void KateDocumentConfig::setBackupPrefix (const QString &prefix)
configEnd ();
}
-void KateDocumentConfig::setBackupSuffix (const QString &suffix)
+void KateDocumentConfig::setBackupSuffix (const TQString &suffix)
{
configStart ();
@@ -1127,14 +1127,14 @@ void KateRendererConfig::setSchemaInternal( int schema )
KConfig *config (KateFactory::self()->schemaManager()->schema(schema));
- QColor tmp0 (KGlobalSettings::baseColor());
- QColor tmp1 (KGlobalSettings::highlightColor());
- QColor tmp2 (KGlobalSettings::alternateBackgroundColor());
- QColor tmp3 ( "#FFFF99" );
- QColor tmp4 (tmp2.dark());
- QColor tmp5 ( KGlobalSettings::textColor() );
- QColor tmp6 ( "#EAE9E8" );
- QColor tmp7 ( "#000000" );
+ TQColor tmp0 (KGlobalSettings::baseColor());
+ TQColor tmp1 (KGlobalSettings::highlightColor());
+ TQColor tmp2 (KGlobalSettings::alternateBackgroundColor());
+ TQColor tmp3 ( "#FFFF99" );
+ TQColor tmp4 (tmp2.dark());
+ TQColor tmp5 ( KGlobalSettings::textColor() );
+ TQColor tmp6 ( "#EAE9E8" );
+ TQColor tmp7 ( "#000000" );
m_backgroundColor = config->readColorEntry("Color Background", &tmp0);
m_backgroundColorSet = true;
@@ -1154,7 +1154,7 @@ void KateRendererConfig::setSchemaInternal( int schema )
m_lineNumberColorSet = true;
// same std colors like in KateDocument::markColor
- QColor mark[7];
+ TQColor mark[7];
mark[0] = Qt::blue;
mark[1] = Qt::red;
mark[2] = Qt::yellow;
@@ -1164,13 +1164,13 @@ void KateRendererConfig::setSchemaInternal( int schema )
mark[6] = Qt::red;
for (int i = 1; i <= KTextEditor::MarkInterface::reservedMarkersCount(); i++) {
- QColor col = config->readColorEntry(QString("Color MarkType%1").arg(i), &mark[i - 1]);
+ TQColor col = config->readColorEntry(TQString("Color MarkType%1").arg(i), &mark[i - 1]);
int index = i-1;
m_lineMarkerColorSet[index] = true;
m_lineMarkerColor[index] = col;
}
- QFont f (KGlobalSettings::fixedFont());
+ TQFont f (KGlobalSettings::fixedFont());
if (!m_fontSet)
{
@@ -1189,7 +1189,7 @@ KateFontStruct *KateRendererConfig::fontStruct ()
return s_global->fontStruct ();
}
-QFont *KateRendererConfig::font()
+TQFont *KateRendererConfig::font()
{
return &(fontStruct ()->myFont);
}
@@ -1199,7 +1199,7 @@ KateFontMetrics *KateRendererConfig::fontMetrics()
return &(fontStruct ()->myFontMetrics);
}
-void KateRendererConfig::setFont(const QFont &font)
+void KateRendererConfig::setFont(const TQFont &font)
{
configStart ();
@@ -1232,7 +1232,7 @@ void KateRendererConfig::setWordWrapMarker (bool on)
configEnd ();
}
-const QColor& KateRendererConfig::backgroundColor() const
+const TQColor& KateRendererConfig::backgroundColor() const
{
if (m_backgroundColorSet || isGlobal())
return m_backgroundColor;
@@ -1240,7 +1240,7 @@ const QColor& KateRendererConfig::backgroundColor() const
return s_global->backgroundColor();
}
-void KateRendererConfig::setBackgroundColor (const QColor &col)
+void KateRendererConfig::setBackgroundColor (const TQColor &col)
{
configStart ();
@@ -1250,7 +1250,7 @@ void KateRendererConfig::setBackgroundColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::selectionColor() const
+const TQColor& KateRendererConfig::selectionColor() const
{
if (m_selectionColorSet || isGlobal())
return m_selectionColor;
@@ -1258,7 +1258,7 @@ const QColor& KateRendererConfig::selectionColor() const
return s_global->selectionColor();
}
-void KateRendererConfig::setSelectionColor (const QColor &col)
+void KateRendererConfig::setSelectionColor (const TQColor &col)
{
configStart ();
@@ -1268,7 +1268,7 @@ void KateRendererConfig::setSelectionColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::highlightedLineColor() const
+const TQColor& KateRendererConfig::highlightedLineColor() const
{
if (m_highlightedLineColorSet || isGlobal())
return m_highlightedLineColor;
@@ -1276,7 +1276,7 @@ const QColor& KateRendererConfig::highlightedLineColor() const
return s_global->highlightedLineColor();
}
-void KateRendererConfig::setHighlightedLineColor (const QColor &col)
+void KateRendererConfig::setHighlightedLineColor (const TQColor &col)
{
configStart ();
@@ -1286,7 +1286,7 @@ void KateRendererConfig::setHighlightedLineColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type) const
+const TQColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type) const
{
int index = 0;
if (type > 0) { while((type >> index++) ^ 1) {} }
@@ -1294,7 +1294,7 @@ const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::Ma
if ( index < 0 || index >= KTextEditor::MarkInterface::reservedMarkersCount() )
{
- static QColor dummy;
+ static TQColor dummy;
return dummy;
}
@@ -1304,7 +1304,7 @@ const QColor& KateRendererConfig::lineMarkerColor(KTextEditor::MarkInterface::Ma
return s_global->lineMarkerColor( type );
}
-void KateRendererConfig::setLineMarkerColor (const QColor &col, KTextEditor::MarkInterface::MarkTypes type)
+void KateRendererConfig::setLineMarkerColor (const TQColor &col, KTextEditor::MarkInterface::MarkTypes type)
{
int index = static_cast<int>( log(static_cast<double>(type)) / log(2.0) );
Q_ASSERT( index >= 0 && index < KTextEditor::MarkInterface::reservedMarkersCount() );
@@ -1316,7 +1316,7 @@ void KateRendererConfig::setLineMarkerColor (const QColor &col, KTextEditor::Mar
configEnd ();
}
-const QColor& KateRendererConfig::highlightedBracketColor() const
+const TQColor& KateRendererConfig::highlightedBracketColor() const
{
if (m_highlightedBracketColorSet || isGlobal())
return m_highlightedBracketColor;
@@ -1324,7 +1324,7 @@ const QColor& KateRendererConfig::highlightedBracketColor() const
return s_global->highlightedBracketColor();
}
-void KateRendererConfig::setHighlightedBracketColor (const QColor &col)
+void KateRendererConfig::setHighlightedBracketColor (const TQColor &col)
{
configStart ();
@@ -1334,7 +1334,7 @@ void KateRendererConfig::setHighlightedBracketColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::wordWrapMarkerColor() const
+const TQColor& KateRendererConfig::wordWrapMarkerColor() const
{
if (m_wordWrapMarkerColorSet || isGlobal())
return m_wordWrapMarkerColor;
@@ -1342,7 +1342,7 @@ const QColor& KateRendererConfig::wordWrapMarkerColor() const
return s_global->wordWrapMarkerColor();
}
-void KateRendererConfig::setWordWrapMarkerColor (const QColor &col)
+void KateRendererConfig::setWordWrapMarkerColor (const TQColor &col)
{
configStart ();
@@ -1352,7 +1352,7 @@ void KateRendererConfig::setWordWrapMarkerColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::tabMarkerColor() const
+const TQColor& KateRendererConfig::tabMarkerColor() const
{
if (m_tabMarkerColorSet || isGlobal())
return m_tabMarkerColor;
@@ -1360,7 +1360,7 @@ const QColor& KateRendererConfig::tabMarkerColor() const
return s_global->tabMarkerColor();
}
-void KateRendererConfig::setTabMarkerColor (const QColor &col)
+void KateRendererConfig::setTabMarkerColor (const TQColor &col)
{
configStart ();
@@ -1370,7 +1370,7 @@ void KateRendererConfig::setTabMarkerColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::iconBarColor() const
+const TQColor& KateRendererConfig::iconBarColor() const
{
if (m_iconBarColorSet || isGlobal())
return m_iconBarColor;
@@ -1378,7 +1378,7 @@ const QColor& KateRendererConfig::iconBarColor() const
return s_global->iconBarColor();
}
-void KateRendererConfig::setIconBarColor (const QColor &col)
+void KateRendererConfig::setIconBarColor (const TQColor &col)
{
configStart ();
@@ -1388,7 +1388,7 @@ void KateRendererConfig::setIconBarColor (const QColor &col)
configEnd ();
}
-const QColor& KateRendererConfig::lineNumberColor() const
+const TQColor& KateRendererConfig::lineNumberColor() const
{
if (m_lineNumberColorSet || isGlobal())
return m_lineNumberColor;
@@ -1396,7 +1396,7 @@ const QColor& KateRendererConfig::lineNumberColor() const
return s_global->lineNumberColor();
}
-void KateRendererConfig::setLineNumberColor (const QColor &col)
+void KateRendererConfig::setLineNumberColor (const TQColor &col)
{
configStart ();
diff --git a/kate/part/kateconfig.h b/kate/part/kateconfig.h
index e81234826..1e0ea5cb8 100644
--- a/kate/part/kateconfig.h
+++ b/kate/part/kateconfig.h
@@ -21,10 +21,10 @@
#include <ktexteditor/markinterface.h>
-#include <qbitarray.h>
-#include <qcolor.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqbitarray.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class KateView;
class KateDocument;
@@ -186,10 +186,10 @@ class KateDocumentConfig : public KateConfig
void setConfigFlags (KateDocumentConfig::ConfigFlags flag, bool enable);
void setConfigFlags (uint fullFlags);
- const QString &encoding () const;
- QTextCodec *codec ();
+ const TQString &encoding () const;
+ TQTextCodec *codec ();
- void setEncoding (const QString &encoding);
+ void setEncoding (const TQString &encoding);
bool isSetEncoding () const;
@@ -201,7 +201,7 @@ class KateDocumentConfig : public KateConfig
};
int eol () const;
- QString eolString ();
+ TQString eolString ();
void setEol (int mode);
@@ -217,11 +217,11 @@ class KateDocumentConfig : public KateConfig
uint backupFlags () const;
void setBackupFlags (uint flags);
- const QString &backupPrefix () const;
- void setBackupPrefix (const QString &prefix);
+ const TQString &backupPrefix () const;
+ void setBackupPrefix (const TQString &prefix);
- const QString &backupSuffix () const;
- void setBackupSuffix (const QString &suffix);
+ const TQString &backupSuffix () const;
+ void setBackupSuffix (const TQString &suffix);
bool plugin (uint index) const;
void setPlugin (uint index, bool load);
@@ -244,14 +244,14 @@ class KateDocumentConfig : public KateConfig
uint m_undoSteps;
bool m_pageUpDownMovesCursor;
uint m_configFlags;
- QString m_encoding;
+ TQString m_encoding;
int m_eol;
bool m_allowEolDetection;
uint m_backupFlags;
int m_searchDirConfigDepth;
- QString m_backupPrefix;
- QString m_backupSuffix;
- QBitArray m_plugins;
+ TQString m_backupPrefix;
+ TQString m_backupSuffix;
+ TQBitArray m_plugins;
bool m_tabWidthSet : 1;
bool m_indentationWidthSet : 1;
@@ -268,7 +268,7 @@ class KateDocumentConfig : public KateConfig
bool m_searchDirConfigDepthSet : 1;
bool m_backupPrefixSet : 1;
bool m_backupSuffixSet : 1;
- QBitArray m_pluginsSet;
+ TQBitArray m_pluginsSet;
private:
static KateDocumentConfig *s_global;
@@ -453,42 +453,42 @@ class KateRendererConfig : public KateConfig
void reloadSchema();
KateFontStruct *fontStruct ();
- QFont *font();
+ TQFont *font();
KateFontMetrics *fontMetrics();
- void setFont(const QFont &font);
+ void setFont(const TQFont &font);
bool wordWrapMarker () const;
void setWordWrapMarker (bool on);
- const QColor& backgroundColor() const;
- void setBackgroundColor (const QColor &col);
+ const TQColor& backgroundColor() const;
+ void setBackgroundColor (const TQColor &col);
- const QColor& selectionColor() const;
- void setSelectionColor (const QColor &col);
+ const TQColor& selectionColor() const;
+ void setSelectionColor (const TQColor &col);
- const QColor& highlightedLineColor() const;
- void setHighlightedLineColor (const QColor &col);
+ const TQColor& highlightedLineColor() const;
+ void setHighlightedLineColor (const TQColor &col);
- const QColor& lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01) const; // markType01 == Bookmark
- void setLineMarkerColor (const QColor &col, KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01);
+ const TQColor& lineMarkerColor(KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01) const; // markType01 == Bookmark
+ void setLineMarkerColor (const TQColor &col, KTextEditor::MarkInterface::MarkTypes type = KTextEditor::MarkInterface::markType01);
- const QColor& highlightedBracketColor() const;
- void setHighlightedBracketColor (const QColor &col);
+ const TQColor& highlightedBracketColor() const;
+ void setHighlightedBracketColor (const TQColor &col);
- const QColor& wordWrapMarkerColor() const;
- void setWordWrapMarkerColor (const QColor &col);
+ const TQColor& wordWrapMarkerColor() const;
+ void setWordWrapMarkerColor (const TQColor &col);
- const QColor& tabMarkerColor() const;
- void setTabMarkerColor (const QColor &col);
+ const TQColor& tabMarkerColor() const;
+ void setTabMarkerColor (const TQColor &col);
- const QColor& iconBarColor() const;
- void setIconBarColor (const QColor &col);
+ const TQColor& iconBarColor() const;
+ void setIconBarColor (const TQColor &col);
// the line number color is used for the line numbers on the left bar and
// for vertical separator lines and for code folding lines.
- const QColor& lineNumberColor() const;
- void setLineNumberColor (const QColor &col);
+ const TQColor& lineNumberColor() const;
+ void setLineNumberColor (const TQColor &col);
bool showIndentationLines () const;
void setShowIndentationLines (bool on);
@@ -503,15 +503,15 @@ class KateRendererConfig : public KateConfig
KateFontStruct *m_font;
bool m_wordWrapMarker;
bool m_showIndentationLines;
- QColor m_backgroundColor;
- QColor m_selectionColor;
- QColor m_highlightedLineColor;
- QColor m_highlightedBracketColor;
- QColor m_wordWrapMarkerColor;
- QColor m_tabMarkerColor;
- QColor m_iconBarColor;
- QColor m_lineNumberColor;
- QValueVector<QColor> m_lineMarkerColor;
+ TQColor m_backgroundColor;
+ TQColor m_selectionColor;
+ TQColor m_highlightedLineColor;
+ TQColor m_highlightedBracketColor;
+ TQColor m_wordWrapMarkerColor;
+ TQColor m_tabMarkerColor;
+ TQColor m_iconBarColor;
+ TQColor m_lineNumberColor;
+ TQValueVector<TQColor> m_lineMarkerColor;
bool m_schemaSet : 1;
bool m_fontSet : 1;
@@ -525,7 +525,7 @@ class KateRendererConfig : public KateConfig
bool m_tabMarkerColorSet : 1;
bool m_iconBarColorSet : 1;
bool m_lineNumberColorSet : 1;
- QBitArray m_lineMarkerColorSet;
+ TQBitArray m_lineMarkerColorSet;
private:
static KateRendererConfig *s_global;
diff --git a/kate/part/katecursor.cpp b/kate/part/katecursor.cpp
index a67b7e475..dcd7c38bf 100644
--- a/kate/part/katecursor.cpp
+++ b/kate/part/katecursor.cpp
@@ -136,7 +136,7 @@ bool KateDocCursor::moveBackward(uint nbChar)
}
}
-bool KateDocCursor::insertText(const QString& s)
+bool KateDocCursor::insertText(const TQString& s)
{
return m_doc->insertText(line(), col(), s);
}
@@ -152,7 +152,7 @@ bool KateDocCursor::removeText(uint nbChar)
(uint)endCursor.line(), (uint)endCursor.col());
}
-QChar KateDocCursor::currentChar() const
+TQChar KateDocCursor::currentChar() const
{
return m_doc->plainKateTextLine(line())->getChar(col());
}
diff --git a/kate/part/katecursor.h b/kate/part/katecursor.h
index 20a86d5d9..c155abba4 100644
--- a/kate/part/katecursor.h
+++ b/kate/part/katecursor.h
@@ -111,9 +111,9 @@ class KateDocCursor : public KateTextCursor
// KTextEditor::Cursor interface
void position(uint *line, uint *col) const;
bool setPosition(uint line, uint col);
- bool insertText(const QString& text);
+ bool insertText(const TQString& text);
bool removeText(uint numberOfCharacters);
- QChar currentChar() const;
+ TQChar currentChar() const;
uchar currentAttrib() const;
diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp
index 91da42e8f..d3a481856 100644
--- a/kate/part/katedialogs.cpp
+++ b/kate/part/katedialogs.cpp
@@ -74,39 +74,39 @@
#include <kstandarddirs.h>
#include <ktempfile.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmap.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qptrcollection.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtextcodec.h>
-#include <qtoolbutton.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqptrcollection.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtextcodec.h>
+#include <tqtoolbutton.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
// trailing slash is important
#define HLDOWNLOADPATH "http://kate.kde.org/syntax/"
@@ -114,11 +114,11 @@
//END
//BEGIN KateConfigPage
-KateConfigPage::KateConfigPage ( QWidget *parent, const char *name )
+KateConfigPage::KateConfigPage ( TQWidget *parent, const char *name )
: Kate::ConfigPage (parent, name)
, m_changed (false)
{
- connect (this, SIGNAL(changed()), this, SLOT(somethingHasChanged ()));
+ connect (this, TQT_SIGNAL(changed()), this, TQT_SLOT(somethingHasChanged ()));
}
KateConfigPage::~KateConfigPage ()
@@ -144,47 +144,47 @@ const int KateIndentConfigTab::flags[] = {
KateDocumentConfig::cfIndentPastedText
};
-KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
+KateIndentConfigTab::KateIndentConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
int configFlags = KateDocumentConfig::global()->configFlags();
- QVGroupBox *gbAuto = new QVGroupBox(i18n("Automatic Indentation"), this);
+ TQVGroupBox *gbAuto = new TQVGroupBox(i18n("Automatic Indentation"), this);
- QHBox *indentLayout = new QHBox(gbAuto);
+ TQHBox *indentLayout = new TQHBox(gbAuto);
indentLayout->setSpacing(KDialog::spacingHint());
- QLabel *indentLabel = new QLabel(i18n("&Indentation mode:"), indentLayout);
+ TQLabel *indentLabel = new TQLabel(i18n("&Indentation mode:"), indentLayout);
m_indentMode = new KComboBox (indentLayout);
m_indentMode->insertStringList (KateAutoIndent::listModes());
indentLabel->setBuddy(m_indentMode);
- m_configPage = new QPushButton(SmallIconSet("configure"), i18n("Configure..."), indentLayout);
+ m_configPage = new TQPushButton(SmallIconSet("configure"), i18n("Configure..."), indentLayout);
- opt[5] = new QCheckBox(i18n("Insert leading Doxygen \"*\" when typing"), gbAuto);
- opt[7] = new QCheckBox(i18n("Adjust indentation of code pasted from the clipboard"), gbAuto);
+ opt[5] = new TQCheckBox(i18n("Insert leading Doxygen \"*\" when typing"), gbAuto);
+ opt[7] = new TQCheckBox(i18n("Adjust indentation of code pasted from the clipboard"), gbAuto);
- QVGroupBox *gbSpaces = new QVGroupBox(i18n("Indentation with Spaces"), this);
- QVBox *spaceLayout = new QVBox(gbSpaces);
- opt[0] = new QCheckBox(i18n("Use &spaces instead of tabs to indent"), spaceLayout );
- opt[6] = new QCheckBox(i18n("Emacs style mixed mode"), spaceLayout);
+ TQVGroupBox *gbSpaces = new TQVGroupBox(i18n("Indentation with Spaces"), this);
+ TQVBox *spaceLayout = new TQVBox(gbSpaces);
+ opt[0] = new TQCheckBox(i18n("Use &spaces instead of tabs to indent"), spaceLayout );
+ opt[6] = new TQCheckBox(i18n("Emacs style mixed mode"), spaceLayout);
indentationWidth = new KIntNumInput(KateDocumentConfig::global()->indentationWidth(), spaceLayout);
indentationWidth->setRange(1, 16, 1, false);
indentationWidth->setLabel(i18n("Number of spaces:"), AlignVCenter);
- opt[1] = new QCheckBox(i18n("Keep indent &profile"), this);
- opt[2] = new QCheckBox(i18n("&Keep extra spaces"), this);
+ opt[1] = new TQCheckBox(i18n("Keep indent &profile"), this);
+ opt[2] = new TQCheckBox(i18n("&Keep extra spaces"), this);
- QVGroupBox *keys = new QVGroupBox(i18n("Keys to Use"), this);
- opt[3] = new QCheckBox(i18n("&Tab key indents"), keys);
- opt[4] = new QCheckBox(i18n("&Backspace key indents"), keys);
+ TQVGroupBox *keys = new TQVGroupBox(i18n("Keys to Use"), this);
+ opt[3] = new TQCheckBox(i18n("&Tab key indents"), keys);
+ opt[4] = new TQCheckBox(i18n("&Backspace key indents"), keys);
- QRadioButton *rb1, *rb2, *rb3;
- m_tabs = new QButtonGroup( 1, Qt::Horizontal, i18n("Tab Key Mode if Nothing Selected"), this );
+ TQRadioButton *rb1, *rb2, *rb3;
+ m_tabs = new TQButtonGroup( 1, Qt::Horizontal, i18n("Tab Key Mode if Nothing Selected"), this );
m_tabs->setRadioButtonExclusive( true );
- m_tabs->insert( rb1=new QRadioButton( i18n("Insert indent &characters"), m_tabs ), 0 );
- m_tabs->insert( rb2=new QRadioButton( i18n("I&nsert tab character"), m_tabs ), 1 );
- m_tabs->insert( rb3=new QRadioButton( i18n("Indent current &line"), m_tabs ), 2 );
+ m_tabs->insert( rb1=new TQRadioButton( i18n("Insert indent &characters"), m_tabs ), 0 );
+ m_tabs->insert( rb2=new TQRadioButton( i18n("I&nsert tab character"), m_tabs ), 1 );
+ m_tabs->insert( rb3=new TQRadioButton( i18n("Indent current &line"), m_tabs ), 2 );
opt[0]->setChecked(configFlags & flags[0]);
opt[1]->setChecked(configFlags & flags[1]);
@@ -205,28 +205,28 @@ KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
layout->addStretch();
// What is this? help
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"Check this if you want to indent with spaces rather than tabs."));
- QWhatsThis::add(opt[2], i18n(
+ TQWhatsThis::add(opt[2], i18n(
"Indentations of more than the selected number of spaces will not be "
"shortened."));
- QWhatsThis::add(opt[3], i18n(
+ TQWhatsThis::add(opt[3], i18n(
"This allows the <b>Tab</b> key to be used to increase the indentation "
"level."));
- QWhatsThis::add(opt[4], i18n(
+ TQWhatsThis::add(opt[4], i18n(
"This allows the <b>Backspace</b> key to be used to decrease the "
"indentation level."));
- QWhatsThis::add(opt[5], i18n(
+ TQWhatsThis::add(opt[5], i18n(
"Automatically inserts a leading \"*\" while typing within a Doxygen "
"style comment."));
- QWhatsThis::add( opt[6], i18n(
+ TQWhatsThis::add( opt[6], i18n(
"Use a mix of tab and space characters for indentation.") );
- QWhatsThis::add( opt[7], i18n(
+ TQWhatsThis::add( opt[7], i18n(
"If this option is selected, pasted code from the clipboard is indented. "
"Triggering the <b>undo</b>-action removes the indentation.") );
- QWhatsThis::add(indentationWidth, i18n("The number of spaces to indent with."));
+ TQWhatsThis::add(indentationWidth, i18n("The number of spaces to indent with."));
- QWhatsThis::add(m_configPage, i18n(
+ TQWhatsThis::add(m_configPage, i18n(
"If this button is enabled, additional indenter specific options are "
"available and can be configured in an extra dialog.") );
@@ -236,27 +236,27 @@ KateIndentConfigTab::KateIndentConfigTab(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_indentMode, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_indentMode, SIGNAL(activated(int)), this, SLOT(indenterSelected(int)));
+ connect(m_indentMode, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_indentMode, TQT_SIGNAL(activated(int)), this, TQT_SLOT(indenterSelected(int)));
- connect( opt[0], SIGNAL(toggled(bool)), this, SLOT(somethingToggled()));
+ connect( opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(somethingToggled()));
- connect( opt[0], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[1], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[2], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[3], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[4], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[5], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[6], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( opt[7], SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
+ connect( opt[0], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[1], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[2], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[3], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[4], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[5], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[6], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( opt[7], TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
- connect(indentationWidth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(indentationWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- connect(m_configPage, SIGNAL(clicked()), this, SLOT(configPage()));
+ connect(m_configPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(configPage()));
}
void KateIndentConfigTab::somethingToggled() {
@@ -282,10 +282,10 @@ void KateIndentConfigTab::configPage()
KDialogBase dlg(this, "indenter_config_dialog", true, i18n("Configure Indenter"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true);
- QVBox *box = new QVBox(&dlg);
+ TQVBox *box = new TQVBox(&dlg);
box->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget(box);
- new QLabel("<qt><b>" + KateAutoIndent::modeDescription(index) + "</b></qt>", box);
+ new TQLabel("<qt><b>" + KateAutoIndent::modeDescription(index) + "</b></qt>", box);
new KSeparator(KSeparator::HLine, box);
IndenterConfigPage* page = KateAutoIndent::configPage(box, index);
@@ -293,7 +293,7 @@ void KateIndentConfigTab::configPage()
if (!page) return;
box->setStretchFactor(page, 1);
- connect( &dlg, SIGNAL(okClicked()), page, SLOT(apply()) );
+ connect( &dlg, TQT_SIGNAL(okClicked()), page, TQT_SLOT(apply()) );
dlg.resize(400, 300);
dlg.exec();
@@ -347,68 +347,68 @@ void KateIndentConfigTab::reload ()
//BEGIN KateSelectConfigTab
const int KateSelectConfigTab::flags[] = {};
-KateSelectConfigTab::KateSelectConfigTab(QWidget *parent)
+KateSelectConfigTab::KateSelectConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
int configFlags = KateDocumentConfig::global()->configFlags();
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QVGroupBox *gbCursor = new QVGroupBox(i18n("Text Cursor Movement"), this);
+ TQVGroupBox *gbCursor = new TQVGroupBox(i18n("Text Cursor Movement"), this);
- opt[0] = new QCheckBox(i18n("Smart ho&me and smart end"), gbCursor);
+ opt[0] = new TQCheckBox(i18n("Smart ho&me and smart end"), gbCursor);
opt[0]->setChecked(configFlags & KateDocumentConfig::cfSmartHome);
- connect(opt[0], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- opt[1] = new QCheckBox(i18n("Wrap c&ursor"), gbCursor);
+ opt[1] = new TQCheckBox(i18n("Wrap c&ursor"), gbCursor);
opt[1]->setChecked(configFlags & KateDocumentConfig::cfWrapCursor);
- connect(opt[1], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[1], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- e6 = new QCheckBox(i18n("&PageUp/PageDown moves cursor"), gbCursor);
+ e6 = new TQCheckBox(i18n("&PageUp/PageDown moves cursor"), gbCursor);
e6->setChecked(KateDocumentConfig::global()->pageUpDownMovesCursor());
- connect(e6, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(e6, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e4 = new KIntNumInput(KateViewConfig::global()->autoCenterLines(), gbCursor);
e4->setRange(0, 1000000, 1, false);
e4->setLabel(i18n("Autocenter cursor (lines):"), AlignVCenter);
- connect(e4, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e4, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
layout->addWidget(gbCursor);
- QRadioButton *rb1, *rb2;
+ TQRadioButton *rb1, *rb2;
- m_tabs = new QButtonGroup( 1, Qt::Horizontal, i18n("Selection Mode"), this );
+ m_tabs = new TQButtonGroup( 1, Qt::Horizontal, i18n("Selection Mode"), this );
layout->add (m_tabs);
m_tabs->setRadioButtonExclusive( true );
- m_tabs->insert( rb1=new QRadioButton( i18n("&Normal"), m_tabs ), 0 );
- m_tabs->insert( rb2=new QRadioButton( i18n("&Persistent"), m_tabs ), 1 );
+ m_tabs->insert( rb1=new TQRadioButton( i18n("&Normal"), m_tabs ), 0 );
+ m_tabs->insert( rb2=new TQRadioButton( i18n("&Persistent"), m_tabs ), 1 );
layout->addStretch();
- QWhatsThis::add(rb1, i18n(
+ TQWhatsThis::add(rb1, i18n(
"Selections will be overwritten by typed text and will be lost on "
"cursor movement."));
- QWhatsThis::add(rb2, i18n(
+ TQWhatsThis::add(rb2, i18n(
"Selections will stay even after cursor movement and typing."));
- QWhatsThis::add(e4, i18n(
+ TQWhatsThis::add(e4, i18n(
"Sets the number of lines to maintain visible above and below the "
"cursor when possible."));
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"When selected, pressing the home key will cause the cursor to skip "
"whitespace and go to the start of a line's text. "
"The same applies for the end key."));
- QWhatsThis::add(opt[1], i18n(
+ TQWhatsThis::add(opt[1], i18n(
"When on, moving the insertion cursor using the <b>Left</b> and "
"<b>Right</b> keys will go on to previous/next line at beginning/end of "
"the line, similar to most editors.<p>When off, the insertion cursor "
"cannot be moved left of the line start, but it can be moved off the "
"line end, which can be very handy for programmers."));
- QWhatsThis::add(e6, i18n("Selects whether the PageUp and PageDown keys should alter the vertical position of the cursor relative to the top of the view."));
+ TQWhatsThis::add(e6, i18n("Selects whether the PageUp and PageDown keys should alter the vertical position of the cursor relative to the top of the view."));
reload ();
@@ -417,8 +417,8 @@ KateSelectConfigTab::KateSelectConfigTab(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
}
void KateSelectConfigTab::apply ()
@@ -464,65 +464,65 @@ const int KateEditConfigTab::flags[] = {KateDocument::cfWordWrap,
KateDocument::cfAutoBrackets, KateDocument::cfShowTabs,
KateDocumentConfig::cfReplaceTabsDyn, KateDocumentConfig::cfRemoveTrailingDyn};
-KateEditConfigTab::KateEditConfigTab(QWidget *parent)
+KateEditConfigTab::KateEditConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
- QVBoxLayout *mainLayout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
int configFlags = KateDocumentConfig::global()->configFlags();
- QVGroupBox *gbWhiteSpace = new QVGroupBox(i18n("Tabulators"), this);
+ TQVGroupBox *gbWhiteSpace = new TQVGroupBox(i18n("Tabulators"), this);
- opt[3] = new QCheckBox( i18n("&Insert spaces instead of tabulators"), gbWhiteSpace );
+ opt[3] = new TQCheckBox( i18n("&Insert spaces instead of tabulators"), gbWhiteSpace );
opt[3]->setChecked( configFlags & KateDocumentConfig::cfReplaceTabsDyn );
- connect( opt[3], SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
+ connect( opt[3], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
- opt[2] = new QCheckBox(i18n("&Show tabulators"), gbWhiteSpace);
+ opt[2] = new TQCheckBox(i18n("&Show tabulators"), gbWhiteSpace);
opt[2]->setChecked(configFlags & flags[2]);
- connect(opt[2], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[2], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e2 = new KIntNumInput(KateDocumentConfig::global()->tabWidth(), gbWhiteSpace);
e2->setRange(1, 16, 1, false);
e2->setLabel(i18n("Tab width:"), AlignVCenter);
- connect(e2, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e2, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addWidget(gbWhiteSpace);
- QVGroupBox *gbWordWrap = new QVGroupBox(i18n("Static Word Wrap"), this);
+ TQVGroupBox *gbWordWrap = new TQVGroupBox(i18n("Static Word Wrap"), this);
- opt[0] = new QCheckBox(i18n("Enable static &word wrap"), gbWordWrap);
+ opt[0] = new TQCheckBox(i18n("Enable static &word wrap"), gbWordWrap);
opt[0]->setChecked(KateDocumentConfig::global()->wordWrap());
- connect(opt[0], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[0], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
- m_wwmarker = new QCheckBox( i18n("&Show static word wrap marker (if applicable)"), gbWordWrap );
+ m_wwmarker = new TQCheckBox( i18n("&Show static word wrap marker (if applicable)"), gbWordWrap );
m_wwmarker->setChecked( KateRendererConfig::global()->wordWrapMarker() );
- connect(m_wwmarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(m_wwmarker, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e1 = new KIntNumInput(KateDocumentConfig::global()->wordWrapAt(), gbWordWrap);
e1->setRange(20, 200, 1, false);
e1->setLabel(i18n("Wrap words at:"), AlignVCenter);
- connect(e1, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addWidget(gbWordWrap);
- opt[4] = new QCheckBox( i18n("Remove &trailing spaces"), this );
+ opt[4] = new TQCheckBox( i18n("Remove &trailing spaces"), this );
mainLayout->addWidget( opt[4] );
opt[4]->setChecked( configFlags & KateDocumentConfig::cfRemoveTrailingDyn );
- connect( opt[4], SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
+ connect( opt[4], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
- opt[1] = new QCheckBox(i18n("Auto &brackets"), this);
+ opt[1] = new TQCheckBox(i18n("Auto &brackets"), this);
mainLayout->addWidget(opt[1]);
opt[1]->setChecked(configFlags & flags[1]);
- connect(opt[1], SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(opt[1], TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
e3 = new KIntNumInput(e2, KateDocumentConfig::global()->undoSteps(), this);
e3->setRange(0, 1000000, 1, false);
e3->setSpecialValueText( i18n("Unlimited") );
e3->setLabel(i18n("Maximum undo steps:"), AlignVCenter);
mainLayout->addWidget(e3);
- connect(e3, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
+ connect(e3, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
- QHBoxLayout *e5Layout = new QHBoxLayout(mainLayout);
- QLabel *e5Label = new QLabel(i18n("Smart search t&ext from:"), this);
+ TQHBoxLayout *e5Layout = new TQHBoxLayout(mainLayout);
+ TQLabel *e5Label = new TQLabel(i18n("Smart search t&ext from:"), this);
e5Layout->addWidget(e5Label);
e5 = new KComboBox (this);
e5->insertItem( i18n("Nowhere") );
@@ -533,12 +533,12 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
e5->setCurrentItem(KateViewConfig::global()->textToSearchMode());
e5Layout->addWidget(e5);
e5Label->setBuddy(e5);
- connect(e5, SIGNAL(activated(int)), this, SLOT(slotChanged()));
+ connect(e5, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
mainLayout->addStretch();
// What is this? help
- QWhatsThis::add(opt[0], i18n(
+ TQWhatsThis::add(opt[0], i18n(
"Automatically start a new line of text when the current line exceeds "
"the length specified by the <b>Wrap words at:</b> option."
"<p>This option does not wrap existing lines of text - use the <b>Apply "
@@ -546,20 +546,20 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
"<p>If you want lines to be <i>visually wrapped</i> instead, according "
"to the width of the view, enable <b>Dynamic Word Wrap</b> in the "
"<b>View Defaults</b> config page."));
- QWhatsThis::add(e1, i18n(
+ TQWhatsThis::add(e1, i18n(
"If the Word Wrap option is selected this entry determines the length "
"(in characters) at which the editor will automatically start a new line."));
- QWhatsThis::add(opt[1], i18n(
+ TQWhatsThis::add(opt[1], i18n(
"When the user types a left bracket ([,(, or {) KateView automatically "
"enters the right bracket (}, ), or ]) to the right of the cursor."));
- QWhatsThis::add(opt[2], i18n(
+ TQWhatsThis::add(opt[2], i18n(
"The editor will display a symbol to indicate the presence of a tab in "
"the text."));
- QWhatsThis::add(e3, i18n(
+ TQWhatsThis::add(e3, i18n(
"Sets the number of undo/redo steps to record. More steps uses more memory."));
- QString gstfwt = i18n(
+ TQString gstfwt = i18n(
"This determines where KateView will get the search text from "
"(this will be automatically entered into the Find Text dialog): "
"<br>"
@@ -582,16 +582,16 @@ KateEditConfigTab::KateEditConfigTab(QWidget *parent)
"Note that, in all the above modes, if a search string has "
"not been or cannot be determined, then the Find Text Dialog "
"will fall back to the last search text.");
- QWhatsThis::add(e5Label, gstfwt);
- QWhatsThis::add(e5, gstfwt);
- QWhatsThis::add( opt[3], i18n(
+ TQWhatsThis::add(e5Label, gstfwt);
+ TQWhatsThis::add(e5, gstfwt);
+ TQWhatsThis::add( opt[3], i18n(
"If this is enabled, the editor will calculate the number of spaces up to "
"the next tab position as defined by the tab width, and insert that number "
"of spaces instead of a TAB character." ) );
- QWhatsThis::add( opt[4], i18n(
+ TQWhatsThis::add( opt[4], i18n(
"If this is enabled, the editor will remove any trailing whitespace on "
"lines when they are left by the insertion cursor.") );
- QWhatsThis::add( m_wwmarker, i18n(
+ TQWhatsThis::add( m_wwmarker, i18n(
"<p>If this option is checked, a vertical line will be drawn at the word "
"wrap column as defined in the <strong>Editing</strong> properties."
"<p>Note that the word wrap marker is only drawn if you use a fixed "
@@ -640,20 +640,20 @@ void KateEditConfigTab::reload ()
//END KateEditConfigTab
//BEGIN KateViewDefaultsConfig
-KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
+KateViewDefaultsConfig::KateViewDefaultsConfig(TQWidget *parent)
:KateConfigPage(parent)
{
- QRadioButton *rb1;
- QRadioButton *rb2;
+ TQRadioButton *rb1;
+ TQRadioButton *rb2;
- QVBoxLayout *blay=new QVBoxLayout(this,0,KDialog::spacingHint());
+ TQVBoxLayout *blay=new TQVBoxLayout(this,0,KDialog::spacingHint());
- QVGroupBox *gbWordWrap = new QVGroupBox(i18n("Word Wrap"), this);
+ TQVGroupBox *gbWordWrap = new TQVGroupBox(i18n("Word Wrap"), this);
- m_dynwrap=new QCheckBox(i18n("&Dynamic word wrap"),gbWordWrap);
+ m_dynwrap=new TQCheckBox(i18n("&Dynamic word wrap"),gbWordWrap);
- QHBox *m_dynwrapIndicatorsLay = new QHBox (gbWordWrap);
- m_dynwrapIndicatorsLabel = new QLabel( i18n("Dynamic word wrap indicators (if applicable):"), m_dynwrapIndicatorsLay );
+ TQHBox *m_dynwrapIndicatorsLay = new TQHBox (gbWordWrap);
+ m_dynwrapIndicatorsLabel = new TQLabel( i18n("Dynamic word wrap indicators (if applicable):"), m_dynwrapIndicatorsLay );
m_dynwrapIndicatorsCombo = new KComboBox( m_dynwrapIndicatorsLay );
m_dynwrapIndicatorsCombo->insertItem( i18n("Off") );
m_dynwrapIndicatorsCombo->insertItem( i18n("Follow Line Numbers") );
@@ -669,43 +669,43 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
blay->addWidget(gbWordWrap);
- QVGroupBox *gbFold = new QVGroupBox(i18n("Code Folding"), this);
+ TQVGroupBox *gbFold = new TQVGroupBox(i18n("Code Folding"), this);
- m_folding=new QCheckBox(i18n("Show &folding markers (if available)"), gbFold );
- m_collapseTopLevel = new QCheckBox( i18n("Collapse toplevel folding nodes"), gbFold );
+ m_folding=new TQCheckBox(i18n("Show &folding markers (if available)"), gbFold );
+ m_collapseTopLevel = new TQCheckBox( i18n("Collapse toplevel folding nodes"), gbFold );
m_collapseTopLevel->hide ();
blay->addWidget(gbFold);
- QVGroupBox *gbBar = new QVGroupBox(i18n("Borders"), this);
+ TQVGroupBox *gbBar = new TQVGroupBox(i18n("Borders"), this);
- m_icons=new QCheckBox(i18n("Show &icon border"),gbBar);
- m_line=new QCheckBox(i18n("Show &line numbers"),gbBar);
- m_scrollBarMarks=new QCheckBox(i18n("Show &scrollbar marks"),gbBar);
+ m_icons=new TQCheckBox(i18n("Show &icon border"),gbBar);
+ m_line=new TQCheckBox(i18n("Show &line numbers"),gbBar);
+ m_scrollBarMarks=new TQCheckBox(i18n("Show &scrollbar marks"),gbBar);
blay->addWidget(gbBar);
- m_bmSort = new QButtonGroup( 1, Qt::Horizontal, i18n("Sort Bookmarks Menu"), this );
+ m_bmSort = new TQButtonGroup( 1, Qt::Horizontal, i18n("Sort Bookmarks Menu"), this );
m_bmSort->setRadioButtonExclusive( true );
- m_bmSort->insert( rb1=new QRadioButton( i18n("By &position"), m_bmSort ), 0 );
- m_bmSort->insert( rb2=new QRadioButton( i18n("By c&reation"), m_bmSort ), 1 );
+ m_bmSort->insert( rb1=new TQRadioButton( i18n("By &position"), m_bmSort ), 0 );
+ m_bmSort->insert( rb2=new TQRadioButton( i18n("By c&reation"), m_bmSort ), 1 );
blay->addWidget(m_bmSort, 0 );
- m_showIndentLines = new QCheckBox(i18n("Show indentation lines"), this);
+ m_showIndentLines = new TQCheckBox(i18n("Show indentation lines"), this);
m_showIndentLines->setChecked(KateRendererConfig::global()->showIndentationLines());
blay->addWidget(m_showIndentLines);
blay->addStretch(1000);
- QWhatsThis::add(m_dynwrap,i18n(
+ TQWhatsThis::add(m_dynwrap,i18n(
"If this option is checked, the text lines will be wrapped at the view "
"border on the screen."));
- QString wtstr = i18n("Choose when the Dynamic Word Wrap Indicators should be displayed");
- QWhatsThis::add(m_dynwrapIndicatorsLabel, wtstr);
- QWhatsThis::add(m_dynwrapIndicatorsCombo, wtstr);
+ TQString wtstr = i18n("Choose when the Dynamic Word Wrap Indicators should be displayed");
+ TQWhatsThis::add(m_dynwrapIndicatorsLabel, wtstr);
+ TQWhatsThis::add(m_dynwrapIndicatorsCombo, wtstr);
// xgettext:no-c-format
- QWhatsThis::add(m_dynwrapAlignLevel, i18n(
+ TQWhatsThis::add(m_dynwrapAlignLevel, i18n(
"<p>Enables the start of dynamically wrapped lines to be aligned "
"vertically to the indentation level of the first line. This can help "
"to make code and markup more readable.</p><p>Additionally, this allows "
@@ -714,28 +714,28 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
"example, at 50%, lines whose indentation levels are deeper than 50% of "
"the width of the screen will not have vertical alignment applied to "
"subsequent wrapped lines.</p>"));
- QWhatsThis::add(m_line,i18n(
+ TQWhatsThis::add(m_line,i18n(
"If this option is checked, every new view will display line numbers "
"on the left hand side."));
- QWhatsThis::add(m_icons,i18n(
+ TQWhatsThis::add(m_icons,i18n(
"If this option is checked, every new view will display an icon border "
"on the left hand side.<br><br>The icon border shows bookmark signs, "
"for instance."));
- QWhatsThis::add(m_scrollBarMarks,i18n(
+ TQWhatsThis::add(m_scrollBarMarks,i18n(
"If this option is checked, every new view will show marks on the "
"vertical scrollbar.<br><br>These marks will, for instance, show "
"bookmarks."));
- QWhatsThis::add(m_folding,i18n(
+ TQWhatsThis::add(m_folding,i18n(
"If this option is checked, every new view will display marks for code "
"folding, if code folding is available."));
- QWhatsThis::add(m_bmSort,i18n(
+ TQWhatsThis::add(m_bmSort,i18n(
"Choose how the bookmarks should be ordered in the <b>Bookmarks</b> menu."));
- QWhatsThis::add(rb1,i18n(
+ TQWhatsThis::add(rb1,i18n(
"The bookmarks will be ordered by the line numbers they are placed at."));
- QWhatsThis::add(rb2,i18n(
+ TQWhatsThis::add(rb2,i18n(
"Each new bookmark will be added to the bottom, independently from "
"where it is placed in the document."));
- QWhatsThis::add(m_showIndentLines, i18n(
+ TQWhatsThis::add(m_showIndentLines, i18n(
"If this is enabled, the editor will display vertical lines to help "
"identify indent lines.") );
@@ -745,17 +745,17 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(QWidget *parent)
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_dynwrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_dynwrapIndicatorsCombo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_dynwrapAlignLevel, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect(m_icons, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_scrollBarMarks, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_line, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_folding, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_collapseTopLevel, SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
- connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect(m_showIndentLines, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
+ connect(m_dynwrap, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_dynwrapIndicatorsCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_dynwrapAlignLevel, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_icons, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_scrollBarMarks, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_line, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_folding, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_collapseTopLevel, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()) );
+ connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect(m_showIndentLines, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
}
KateViewDefaultsConfig::~KateViewDefaultsConfig()
@@ -807,28 +807,28 @@ void KateViewDefaultsConfig::defaults (){;}
//BEGIN KateEditKeyConfiguration
-KateEditKeyConfiguration::KateEditKeyConfiguration( QWidget* parent, KateDocument* doc )
+KateEditKeyConfiguration::KateEditKeyConfiguration( TQWidget* parent, KateDocument* doc )
: KateConfigPage( parent )
{
m_doc = doc;
m_ready = false;
}
-void KateEditKeyConfiguration::showEvent ( QShowEvent * )
+void KateEditKeyConfiguration::showEvent ( TQShowEvent * )
{
if (!m_ready)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
KateView* view = (KateView*)m_doc->views().at(0);
m_ac = view->editActionCollection();
m_keyChooser = new KKeyChooser( m_ac, this, false );
- connect( m_keyChooser, SIGNAL( keyChange() ), this, SLOT( slotChanged() ) );
+ connect( m_keyChooser, TQT_SIGNAL( keyChange() ), this, TQT_SLOT( slotChanged() ) );
m_keyChooser->show ();
m_ready = true;
}
- QWidget::show ();
+ TQWidget::show ();
}
void KateEditKeyConfiguration::apply()
@@ -846,49 +846,49 @@ void KateEditKeyConfiguration::apply()
//END KateEditKeyConfiguration
//BEGIN KateSaveConfigTab
-KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
+KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
: KateConfigPage( parent )
{
int configFlags = KateDocumentConfig::global()->configFlags();
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QVGroupBox *gbEnc = new QVGroupBox(i18n("File Format"), this);
+ TQVGroupBox *gbEnc = new TQVGroupBox(i18n("File Format"), this);
layout->addWidget( gbEnc );
- QHBox *e5Layout = new QHBox(gbEnc);
- QLabel *e5Label = new QLabel(i18n("&Encoding:"), e5Layout);
+ TQHBox *e5Layout = new TQHBox(gbEnc);
+ TQLabel *e5Label = new TQLabel(i18n("&Encoding:"), e5Layout);
m_encoding = new KComboBox (e5Layout);
e5Label->setBuddy(m_encoding);
- e5Layout = new QHBox(gbEnc);
- e5Label = new QLabel(i18n("End &of line:"), e5Layout);
+ e5Layout = new TQHBox(gbEnc);
+ e5Label = new TQLabel(i18n("End &of line:"), e5Layout);
m_eol = new KComboBox (e5Layout);
e5Label->setBuddy(m_eol);
- allowEolDetection = new QCheckBox(i18n("&Automatic end of line detection"), gbEnc);
+ allowEolDetection = new TQCheckBox(i18n("&Automatic end of line detection"), gbEnc);
m_eol->insertItem (i18n("UNIX"));
m_eol->insertItem (i18n("DOS/Windows"));
m_eol->insertItem (i18n("Macintosh"));
- QVGroupBox *gbMem = new QVGroupBox(i18n("Memory Usage"), this);
+ TQVGroupBox *gbMem = new TQVGroupBox(i18n("Memory Usage"), this);
layout->addWidget( gbMem );
- e5Layout = new QHBox(gbMem);
+ e5Layout = new TQHBox(gbMem);
e5Layout->setSpacing (32);
- blockCountLabel = new QLabel(i18n("Maximum loaded &blocks per file:"), e5Layout);
- blockCount = new QSpinBox (4, 512, 4, e5Layout);
+ blockCountLabel = new TQLabel(i18n("Maximum loaded &blocks per file:"), e5Layout);
+ blockCount = new TQSpinBox (4, 512, 4, e5Layout);
blockCount->setValue (KateBuffer::maxLoadedBlocks());
blockCountLabel->setBuddy(blockCount);
- QVGroupBox *gbWhiteSpace = new QVGroupBox(i18n("Automatic Cleanups on Load/Save"), this);
+ TQVGroupBox *gbWhiteSpace = new TQVGroupBox(i18n("Automatic Cleanups on Load/Save"), this);
layout->addWidget( gbWhiteSpace );
- removeSpaces = new QCheckBox(i18n("Re&move trailing spaces"), gbWhiteSpace);
+ removeSpaces = new TQCheckBox(i18n("Re&move trailing spaces"), gbWhiteSpace);
removeSpaces->setChecked(configFlags & KateDocument::cfRemoveSpaces);
- QVGroupBox *dirConfigBox = new QVGroupBox(i18n("Folder Config File"), this);
+ TQVGroupBox *dirConfigBox = new TQVGroupBox(i18n("Folder Config File"), this);
layout->addWidget( dirConfigBox );
dirSearchDepth = new KIntNumInput(KateDocumentConfig::global()->searchDirConfigDepth(), dirConfigBox);
@@ -896,45 +896,45 @@ KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
dirSearchDepth->setSpecialValueText( i18n("Do not use config file") );
dirSearchDepth->setLabel(i18n("Se&arch depth for config file:"), AlignVCenter);
- QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Backup on Save"), this );
+ TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Backup on Save"), this );
layout->addWidget( gb );
- cbLocalFiles = new QCheckBox( i18n("&Local files"), gb );
- cbRemoteFiles = new QCheckBox( i18n("&Remote files"), gb );
+ cbLocalFiles = new TQCheckBox( i18n("&Local files"), gb );
+ cbRemoteFiles = new TQCheckBox( i18n("&Remote files"), gb );
- QHBox *hbBuPrefix = new QHBox( gb );
- QLabel *lBuPrefix = new QLabel( i18n("&Prefix:"), hbBuPrefix );
- leBuPrefix = new QLineEdit( hbBuPrefix );
+ TQHBox *hbBuPrefix = new TQHBox( gb );
+ TQLabel *lBuPrefix = new TQLabel( i18n("&Prefix:"), hbBuPrefix );
+ leBuPrefix = new TQLineEdit( hbBuPrefix );
lBuPrefix->setBuddy( leBuPrefix );
- QHBox *hbBuSuffix = new QHBox( gb );
- QLabel *lBuSuffix = new QLabel( i18n("&Suffix:"), hbBuSuffix );
- leBuSuffix = new QLineEdit( hbBuSuffix );
+ TQHBox *hbBuSuffix = new TQHBox( gb );
+ TQLabel *lBuSuffix = new TQLabel( i18n("&Suffix:"), hbBuSuffix );
+ leBuSuffix = new TQLineEdit( hbBuSuffix );
lBuSuffix->setBuddy( leBuSuffix );
layout->addStretch();
- QWhatsThis::add(removeSpaces, i18n(
+ TQWhatsThis::add(removeSpaces, i18n(
"The editor will automatically eliminate extra spaces at the ends of "
"lines of text while loading/saving the file."));
- QWhatsThis::add( gb, i18n(
+ TQWhatsThis::add( gb, i18n(
"<p>Backing up on save will cause Kate to copy the disk file to "
"'&lt;prefix&gt;&lt;filename&gt;&lt;suffix&gt;' before saving changes."
"<p>The suffix defaults to <strong>~</strong> and prefix is empty by default" ) );
- QWhatsThis::add( allowEolDetection, i18n(
+ TQWhatsThis::add( allowEolDetection, i18n(
"Check this if you want the editor to autodetect the end of line type."
"The first found end of line type will be used for the whole file.") );
- QWhatsThis::add( cbLocalFiles, i18n(
+ TQWhatsThis::add( cbLocalFiles, i18n(
"Check this if you want backups of local files when saving") );
- QWhatsThis::add( cbRemoteFiles, i18n(
+ TQWhatsThis::add( cbRemoteFiles, i18n(
"Check this if you want backups of remote files when saving") );
- QWhatsThis::add( leBuPrefix, i18n(
+ TQWhatsThis::add( leBuPrefix, i18n(
"Enter the prefix to prepend to the backup file names" ) );
- QWhatsThis::add( leBuSuffix, i18n(
+ TQWhatsThis::add( leBuSuffix, i18n(
"Enter the suffix to add to the backup file names" ) );
- QWhatsThis::add(dirSearchDepth, i18n(
+ TQWhatsThis::add(dirSearchDepth, i18n(
"The editor will search the given number of folder levels upwards for .kateconfig file"
" and load the settings line from it." ));
- QWhatsThis::add(blockCount, i18n(
+ TQWhatsThis::add(blockCount, i18n(
"The editor will load given number of blocks (of around 2048 lines) of text into memory;"
" if the filesize is bigger than this the other blocks are swapped "
" to disk and loaded transparently as-needed.<br>"
@@ -948,16 +948,16 @@ KateSaveConfigTab::KateSaveConfigTab( QWidget *parent )
// after initial reload, connect the stuff for the changed () signal
//
- connect(m_encoding, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect(m_eol, SIGNAL(activated(int)), this, SLOT(slotChanged()));
- connect( allowEolDetection, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(blockCount, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect(removeSpaces, SIGNAL(toggled(bool)), this, SLOT(slotChanged()));
- connect( cbLocalFiles, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect( cbRemoteFiles, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
- connect(dirSearchDepth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
- connect( leBuPrefix, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( leBuSuffix, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
+ connect(m_encoding, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect(m_eol, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged()));
+ connect( allowEolDetection, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(blockCount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect(removeSpaces, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged()));
+ connect( cbLocalFiles, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect( cbRemoteFiles, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) );
+ connect(dirSearchDepth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
+ connect( leBuPrefix, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( leBuSuffix, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
}
void KateSaveConfigTab::apply()
@@ -1013,12 +1013,12 @@ void KateSaveConfigTab::reload()
m_encoding->clear ();
m_encoding->insertItem (i18n("KDE Default"));
m_encoding->setCurrentItem(0);
- QStringList encodings (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList encodings (KGlobal::charsets()->descriptiveEncodingNames());
int insert = 1;
for (uint i=0; i < encodings.count(); i++)
{
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encodings[i]), found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encodings[i]), found);
if (found)
{
@@ -1065,7 +1065,7 @@ void KateSaveConfigTab::defaults()
class KatePartPluginListItem : public QCheckListItem
{
public:
- KatePartPluginListItem(bool checked, uint i, const QString &name, QListView *parent);
+ KatePartPluginListItem(bool checked, uint i, const TQString &name, TQListView *parent);
uint pluginIndex () const { return index; }
protected:
@@ -1076,8 +1076,8 @@ class KatePartPluginListItem : public QCheckListItem
bool silentStateChange;
};
-KatePartPluginListItem::KatePartPluginListItem(bool checked, uint i, const QString &name, QListView *parent)
- : QCheckListItem(parent, name, CheckBox)
+KatePartPluginListItem::KatePartPluginListItem(bool checked, uint i, const TQString &name, TQListView *parent)
+ : TQCheckListItem(parent, name, CheckBox)
, index(i)
, silentStateChange(false)
{
@@ -1094,7 +1094,7 @@ void KatePartPluginListItem::stateChange(bool b)
//END
//BEGIN PluginListView
-KatePartPluginListView::KatePartPluginListView(QWidget *parent, const char *name)
+KatePartPluginListView::KatePartPluginListView(TQWidget *parent, const char *name)
: KListView(parent, name)
{
}
@@ -1106,10 +1106,10 @@ void KatePartPluginListView::stateChanged(KatePartPluginListItem *item, bool b)
//END
//BEGIN KatePartPluginConfigPage
-KatePartPluginConfigPage::KatePartPluginConfigPage (QWidget *parent) : KateConfigPage (parent, "")
+KatePartPluginConfigPage::KatePartPluginConfigPage (TQWidget *parent) : KateConfigPage (parent, "")
{
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
grid->setSpacing( KDialogBase::spacingHint() );
listView = new KatePartPluginListView(this);
@@ -1129,15 +1129,15 @@ KatePartPluginConfigPage::KatePartPluginConfigPage (QWidget *parent) : KateConfi
// configure button
- btnConfigure = new QPushButton( i18n("Configure..."), this );
+ btnConfigure = new TQPushButton( i18n("Configure..."), this );
btnConfigure->setEnabled( false );
grid->addWidget( btnConfigure, 1, 0, Qt::AlignRight );
- connect( btnConfigure, SIGNAL(clicked()), this, SLOT(slotConfigure()) );
+ connect( btnConfigure, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConfigure()) );
- connect( listView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotCurrentChanged(QListViewItem*)) );
- connect( listView, SIGNAL(stateChange(KatePartPluginListItem *, bool)),
- this, SLOT(slotStateChanged(KatePartPluginListItem *, bool)));
- connect(listView, SIGNAL(stateChange(KatePartPluginListItem *, bool)), this, SLOT(slotChanged()));
+ connect( listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotCurrentChanged(TQListViewItem*)) );
+ connect( listView, TQT_SIGNAL(stateChange(KatePartPluginListItem *, bool)),
+ this, TQT_SLOT(slotStateChanged(KatePartPluginListItem *, bool)));
+ connect(listView, TQT_SIGNAL(stateChange(KatePartPluginListItem *, bool)), this, TQT_SLOT(slotChanged()));
}
KatePartPluginConfigPage::~KatePartPluginConfigPage ()
@@ -1162,10 +1162,10 @@ void KatePartPluginConfigPage::apply ()
void KatePartPluginConfigPage::slotStateChanged( KatePartPluginListItem *item, bool b )
{
if ( b )
- slotCurrentChanged( (QListViewItem*)item );
+ slotCurrentChanged( (TQListViewItem*)item );
}
-void KatePartPluginConfigPage::slotCurrentChanged( QListViewItem* i )
+void KatePartPluginConfigPage::slotCurrentChanged( TQListViewItem* i )
{
KatePartPluginListItem *item = static_cast<KatePartPluginListItem *>(i);
if ( ! item ) return;
@@ -1175,7 +1175,7 @@ void KatePartPluginConfigPage::slotCurrentChanged( QListViewItem* i )
{
// load this plugin, and see if it has config pages
- KTextEditor::Plugin *plugin = KTextEditor::createPlugin(QFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
+ KTextEditor::Plugin *plugin = KTextEditor::createPlugin(TQFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
if ( plugin ) {
KTextEditor::ConfigInterfaceExtension *cie = KTextEditor::configInterfaceExtension( plugin );
b = ( cie && cie->configPages() );
@@ -1189,7 +1189,7 @@ void KatePartPluginConfigPage::slotConfigure()
{
KatePartPluginListItem *item = static_cast<KatePartPluginListItem*>(listView->currentItem());
KTextEditor::Plugin *plugin =
- KTextEditor::createPlugin(QFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
+ KTextEditor::createPlugin(TQFile::encodeName((KateFactory::self()->plugins())[item->pluginIndex()]->library()));
if ( ! plugin ) return;
@@ -1208,21 +1208,21 @@ void KatePartPluginConfigPage::slotConfigure()
KDialogBase::IconList : // still untested
KDialogBase::Plain;
- QString name = (KateFactory::self()->plugins())[item->pluginIndex()]->name();
+ TQString name = (KateFactory::self()->plugins())[item->pluginIndex()]->name();
KDialogBase *kd = new KDialogBase ( dt,
i18n("Configure %1").arg( name ),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help,
KDialogBase::Ok,
this );
- QPtrList<KTextEditor::ConfigPage> editorPages;
+ TQPtrList<KTextEditor::ConfigPage> editorPages;
for (uint i = 0; i < cife->configPages (); i++)
{
- QWidget *page;
+ TQWidget *page;
if ( dt == KDialogBase::IconList )
{
- QStringList path;
+ TQStringList path;
path.clear();
path << cife->configPageName( i );
page = kd->addVBoxPage( path, cife->configPageFullName (i),
@@ -1231,7 +1231,7 @@ void KatePartPluginConfigPage::slotConfigure()
else
{
page = kd->plainPage();
- QVBoxLayout *_l = new QVBoxLayout( page );
+ TQVBoxLayout *_l = new TQVBoxLayout( page );
_l->setAutoAdd( true );
}
@@ -1252,105 +1252,105 @@ void KatePartPluginConfigPage::slotConfigure()
//END KatePartPluginConfigPage
//BEGIN KateHlConfigPage
-KateHlConfigPage::KateHlConfigPage (QWidget *parent, KateDocument *doc)
+KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
: KateConfigPage (parent, "")
, hlData (0)
, m_doc (doc)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("H&ighlight:"), hbHl );
- hlCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
+ hlCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( hlCombo );
- connect( hlCombo, SIGNAL(activated(int)),
- this, SLOT(hlChanged(int)) );
+ connect( hlCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(hlChanged(int)) );
for( int i = 0; i < KateHlManager::self()->highlights(); i++) {
if (KateHlManager::self()->hlSection(i).length() > 0)
- hlCombo->insertItem(KateHlManager::self()->hlSection(i) + QString ("/") + KateHlManager::self()->hlNameTranslated(i));
+ hlCombo->insertItem(KateHlManager::self()->hlSection(i) + TQString ("/") + KateHlManager::self()->hlNameTranslated(i));
else
hlCombo->insertItem(KateHlManager::self()->hlNameTranslated(i));
}
- QGroupBox *gbInfo = new QGroupBox( 1, Qt::Horizontal, i18n("Information"), this );
+ TQGroupBox *gbInfo = new TQGroupBox( 1, Qt::Horizontal, i18n("Information"), this );
layout->add (gbInfo);
// author
- QHBox *hb1 = new QHBox( gbInfo);
- new QLabel( i18n("Author:"), hb1 );
- author = new QLabel (hb1);
+ TQHBox *hb1 = new TQHBox( gbInfo);
+ new TQLabel( i18n("Author:"), hb1 );
+ author = new TQLabel (hb1);
author->setTextFormat (Qt::RichText);
// license
- QHBox *hb2 = new QHBox( gbInfo);
- new QLabel( i18n("License:"), hb2 );
- license = new QLabel (hb2);
+ TQHBox *hb2 = new TQHBox( gbInfo);
+ new TQLabel( i18n("License:"), hb2 );
+ license = new TQLabel (hb2);
- QGroupBox *gbProps = new QGroupBox( 1, Qt::Horizontal, i18n("Properties"), this );
+ TQGroupBox *gbProps = new TQGroupBox( 1, Qt::Horizontal, i18n("Properties"), this );
layout->add (gbProps);
// file & mime types
- QHBox *hbFE = new QHBox( gbProps);
- QLabel *lFileExts = new QLabel( i18n("File e&xtensions:"), hbFE );
- wildcards = new QLineEdit( hbFE );
+ TQHBox *hbFE = new TQHBox( gbProps);
+ TQLabel *lFileExts = new TQLabel( i18n("File e&xtensions:"), hbFE );
+ wildcards = new TQLineEdit( hbFE );
lFileExts->setBuddy( wildcards );
- QHBox *hbMT = new QHBox( gbProps );
- QLabel *lMimeTypes = new QLabel( i18n("MIME &types:"), hbMT);
- mimetypes = new QLineEdit( hbMT );
+ TQHBox *hbMT = new TQHBox( gbProps );
+ TQLabel *lMimeTypes = new TQLabel( i18n("MIME &types:"), hbMT);
+ mimetypes = new TQLineEdit( hbMT );
lMimeTypes->setBuddy( mimetypes );
- QHBox *hbMT2 = new QHBox( gbProps );
- QLabel *lprio = new QLabel( i18n("Prio&rity:"), hbMT2);
+ TQHBox *hbMT2 = new TQHBox( gbProps );
+ TQLabel *lprio = new TQLabel( i18n("Prio&rity:"), hbMT2);
priority = new KIntNumInput( hbMT2 );
lprio->setBuddy( priority );
- QToolButton *btnMTW = new QToolButton(hbMT);
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
+ TQToolButton *btnMTW = new TQToolButton(hbMT);
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
// download/new buttons
- QHBox *hbBtns = new QHBox( this );
+ TQHBox *hbBtns = new TQHBox( this );
layout->add (hbBtns);
- ((QBoxLayout*)hbBtns->layout())->addStretch(1); // hmm.
+ ((TQBoxLayout*)hbBtns->layout())->addStretch(1); // hmm.
hbBtns->setSpacing( KDialog::spacingHint() );
- QPushButton *btnDl = new QPushButton(i18n("Do&wnload..."), hbBtns);
- connect( btnDl, SIGNAL(clicked()), this, SLOT(hlDownload()) );
+ TQPushButton *btnDl = new TQPushButton(i18n("Do&wnload..."), hbBtns);
+ connect( btnDl, TQT_SIGNAL(clicked()), this, TQT_SLOT(hlDownload()) );
int currentHl = m_doc ? m_doc->hlMode() : 0;
hlCombo->setCurrentItem( currentHl );
hlChanged( currentHl );
- QWhatsThis::add( hlCombo, i18n(
+ TQWhatsThis::add( hlCombo, i18n(
"Choose a <em>Syntax Highlight mode</em> from this list to view its "
"properties below.") );
- QWhatsThis::add( wildcards, i18n(
+ TQWhatsThis::add( wildcards, i18n(
"The list of file extensions used to determine which files to highlight "
"using the current syntax highlight mode.") );
- QWhatsThis::add( mimetypes, i18n(
+ TQWhatsThis::add( mimetypes, i18n(
"The list of Mime Types used to determine which files to highlight "
"using the current highlight mode.<p>Click the wizard button on the "
"left of the entry field to display the MimeType selection dialog.") );
- QWhatsThis::add( btnMTW, i18n(
+ TQWhatsThis::add( btnMTW, i18n(
"Display a dialog with a list of all available mime types to choose from."
"<p>The <strong>File Extensions</strong> entry will automatically be "
"edited as well.") );
- QWhatsThis::add( btnDl, i18n(
+ TQWhatsThis::add( btnDl, i18n(
"Click this button to download new or updated syntax highlight "
"descriptions from the Kate website.") );
layout->addStretch ();
- connect( wildcards, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( mimetypes, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( priority, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( wildcards, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( mimetypes, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( priority, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
}
KateHlConfigPage::~KateHlConfigPage ()
@@ -1366,7 +1366,7 @@ void KateHlConfigPage::apply ()
writeback();
- for ( QIntDictIterator<KateHlData> it( hlDataDict ); it.current(); ++it )
+ for ( TQIntDictIterator<KateHlData> it( hlDataDict ); it.current(); ++it )
KateHlManager::self()->getHl( it.currentKey() )->setData( it.current() );
KateHlManager::self()->getKConfig()->sync ();
@@ -1397,7 +1397,7 @@ void KateHlConfigPage::hlChanged(int z)
priority->setValue(hlData->priority);
// split author string if needed into multiple lines !
- QStringList l= QStringList::split (QRegExp("[,;]"), hl->author());
+ TQStringList l= TQStringList::split (TQRegExp("[,;]"), hl->author());
author->setText (l.join ("<br>"));
license->setText (hl->license());
@@ -1421,8 +1421,8 @@ void KateHlConfigPage::hlDownload()
void KateHlConfigPage::showMTDlg()
{
- QString text = i18n("Select the MimeTypes you want highlighted using the '%1' syntax highlight rules.\nPlease note that this will automatically edit the associated file extensions as well.").arg( hlCombo->currentText() );
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), mimetypes->text() );
+ TQString text = i18n("Select the MimeTypes you want highlighted using the '%1' syntax highlight rules.\nPlease note that this will automatically edit the associated file extensions as well.").arg( hlCombo->currentText() );
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), mimetypes->text() );
KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this );
if ( d.exec() == KDialogBase::Accepted ) {
@@ -1435,38 +1435,38 @@ void KateHlConfigPage::showMTDlg()
//END KateHlConfigPage
//BEGIN KateHlDownloadDialog
-KateHlDownloadDialog::KateHlDownloadDialog(QWidget *parent, const char *name, bool modal)
+KateHlDownloadDialog::KateHlDownloadDialog(TQWidget *parent, const char *name, bool modal)
:KDialogBase(KDialogBase::Swallow, i18n("Highlight Download"), User1|Close, User1, parent, name, modal, true, i18n("&Install"))
{
- QVBox* vbox = new QVBox(this);
+ TQVBox* vbox = new TQVBox(this);
setMainWidget(vbox);
vbox->setSpacing(spacingHint());
- new QLabel(i18n("Select the syntax highlighting files you want to update:"), vbox);
- list = new QListView(vbox);
+ new TQLabel(i18n("Select the syntax highlighting files you want to update:"), vbox);
+ list = new TQListView(vbox);
list->addColumn("");
list->addColumn(i18n("Name"));
list->addColumn(i18n("Installed"));
list->addColumn(i18n("Latest"));
- list->setSelectionMode(QListView::Multi);
+ list->setSelectionMode(TQListView::Multi);
list->setAllColumnsShowFocus(true);
- new QLabel(i18n("<b>Note:</b> New versions are selected automatically."), vbox);
+ new TQLabel(i18n("<b>Note:</b> New versions are selected automatically."), vbox);
actionButton (User1)->setIconSet(SmallIconSet("ok"));
transferJob = KIO::get(
- KURL(QString(HLDOWNLOADPATH)
- + QString("update-")
- + QString(KATEPART_VERSION)
- + QString(".xml")), true, true );
- connect(transferJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(listDataReceived(KIO::Job *, const QByteArray &)));
-// void data( KIO::Job *, const QByteArray &data);
+ KURL(TQString(HLDOWNLOADPATH)
+ + TQString("update-")
+ + TQString(KATEPART_VERSION)
+ + TQString(".xml")), true, true );
+ connect(transferJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(listDataReceived(KIO::Job *, const TQByteArray &)));
+// void data( KIO::Job *, const TQByteArray &data);
resize(450, 400);
}
KateHlDownloadDialog::~KateHlDownloadDialog(){}
-void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
+void KateHlDownloadDialog::listDataReceived(KIO::Job *, const TQByteArray &data)
{
if (!transferJob || transferJob->isErrorPage())
{
@@ -1474,20 +1474,20 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
return;
}
- listData+=QString(data);
- kdDebug(13000)<<QString("CurrentListData: ")<<listData<<endl<<endl;
- kdDebug(13000)<<QString("Data length: %1").arg(data.size())<<endl;
- kdDebug(13000)<<QString("listData length: %1").arg(listData.length())<<endl;
+ listData+=TQString(data);
+ kdDebug(13000)<<TQString("CurrentListData: ")<<listData<<endl<<endl;
+ kdDebug(13000)<<TQString("Data length: %1").arg(data.size())<<endl;
+ kdDebug(13000)<<TQString("listData length: %1").arg(listData.length())<<endl;
if (data.size()==0)
{
if (listData.length()>0)
{
- QString installedVersion;
+ TQString installedVersion;
KateHlManager *hlm=KateHlManager::self();
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(listData);
- QDomElement DocElem=doc.documentElement();
- QDomNode n=DocElem.firstChild();
+ TQDomElement DocElem=doc.documentElement();
+ TQDomNode n=DocElem.firstChild();
KateHighlighting *hl = 0;
if (n.isNull()) kdDebug(13000)<<"There is no usable childnode"<<endl;
@@ -1495,12 +1495,12 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
{
installedVersion=" --";
- QDomElement e=n.toElement();
+ TQDomElement e=n.toElement();
if (!e.isNull())
- kdDebug(13000)<<QString("NAME: ")<<e.tagName()<<QString(" - ")<<e.attribute("name")<<endl;
+ kdDebug(13000)<<TQString("NAME: ")<<e.tagName()<<TQString(" - ")<<e.attribute("name")<<endl;
n=n.nextSibling();
- QString Name=e.attribute("name");
+ TQString Name=e.attribute("name");
for (int i=0;i<hlm->highlights();i++)
{
@@ -1514,7 +1514,7 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
}
// autoselect entry if new or updated.
- QListViewItem* entry = new QListViewItem(
+ TQListViewItem* entry = new TQListViewItem(
list, "", e.attribute("name"), installedVersion,
e.attribute("version"),e.attribute("url"));
if (!hl || hl->version() < e.attribute("version"))
@@ -1529,14 +1529,14 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
void KateHlDownloadDialog::slotUser1()
{
- QString destdir=KGlobal::dirs()->saveLocation("data","katepart/syntax/");
- for (QListViewItem *it=list->firstChild();it;it=it->nextSibling())
+ TQString destdir=KGlobal::dirs()->saveLocation("data","katepart/syntax/");
+ for (TQListViewItem *it=list->firstChild();it;it=it->nextSibling())
{
if (list->isSelected(it))
{
KURL src(it->text(4));
- QString filename=src.fileName(false);
- QString dest = destdir+filename;
+ TQString filename=src.fileName(false);
+ TQString dest = destdir+filename;
KIO::NetAccess::download(src,dest, this);
}
@@ -1548,18 +1548,18 @@ void KateHlDownloadDialog::slotUser1()
//END KateHlDownloadDialog
//BEGIN KateGotoLineDialog
-KateGotoLineDialog::KateGotoLineDialog(QWidget *parent, int line, int max)
+KateGotoLineDialog::KateGotoLineDialog(TQWidget *parent, int line, int max)
: KDialogBase(parent, 0L, true, i18n("Go to Line"), Ok | Cancel, Ok) {
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
e1 = new KIntNumInput(line, page);
e1->setRange(1, max);
e1->setEditFocus(true);
- QLabel *label = new QLabel( e1,i18n("&Go to line:"), page );
+ TQLabel *label = new TQLabel( e1,i18n("&Go to line:"), page );
topLayout->addWidget(label);
topLayout->addWidget(e1);
topLayout->addSpacing(spacingHint()); // A little bit extra space
@@ -1575,14 +1575,14 @@ int KateGotoLineDialog::getLine() {
//BEGIN KateModOnHdPrompt
KateModOnHdPrompt::KateModOnHdPrompt( KateDocument *doc,
int modtype,
- const QString &reason,
- QWidget *parent )
+ const TQString &reason,
+ TQWidget *parent )
: KDialogBase( parent, "", true, "", Ok|Apply|Cancel|User1 ),
m_doc( doc ),
m_modtype ( modtype ),
m_tmpfile( 0 )
{
- QString title, btnOK, whatisok;
+ TQString title, btnOK, whatisok;
if ( modtype == 3 ) // deleted
{
title = i18n("File Was Deleted on Disk");
@@ -1606,23 +1606,23 @@ KateModOnHdPrompt::KateModOnHdPrompt( KateDocument *doc,
enableButtonSeparator( true );
setCaption( title );
- QFrame *w = makeMainWidget();
- QVBoxLayout *lo = new QVBoxLayout( w );
- QHBoxLayout *lo1 = new QHBoxLayout( lo );
- QLabel *icon = new QLabel( w );
+ TQFrame *w = makeMainWidget();
+ TQVBoxLayout *lo = new TQVBoxLayout( w );
+ TQHBoxLayout *lo1 = new TQHBoxLayout( lo );
+ TQLabel *icon = new TQLabel( w );
icon->setPixmap( DesktopIcon("messagebox_warning" ) );
lo1->addWidget( icon );
- lo1->addWidget( new QLabel( reason + "\n\n" + i18n("What do you want to do?"), w ) );
+ lo1->addWidget( new TQLabel( reason + "\n\n" + i18n("What do you want to do?"), w ) );
// If the file isn't deleted, present a diff button, and a overwrite action.
if ( modtype != 3 )
{
- QHBoxLayout *lo2 = new QHBoxLayout( lo );
- QPushButton *btnDiff = new QPushButton( i18n("&View Difference"), w );
+ TQHBoxLayout *lo2 = new TQHBoxLayout( lo );
+ TQPushButton *btnDiff = new TQPushButton( i18n("&View Difference"), w );
lo2->addStretch( 1 );
lo2->addWidget( btnDiff );
- connect( btnDiff, SIGNAL(clicked()), this, SLOT(slotDiff()) );
- QWhatsThis::add( btnDiff, i18n(
+ connect( btnDiff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDiff()) );
+ TQWhatsThis::add( btnDiff, i18n(
"Calculates the difference between the editor contents and the disk "
"file using diff(1) and opens the diff file with the default application "
"for that.") );
@@ -1644,8 +1644,8 @@ void KateModOnHdPrompt::slotDiff()
KProcIO *p = new KProcIO();
p->setComm( KProcess::All );
*p << "diff" << "-u" << "-" << m_doc->url().path();
- connect( p, SIGNAL(processExited(KProcess*)), this, SLOT(slotPDone(KProcess*)) );
- connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(slotPRead(KProcIO*)) );
+ connect( p, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotPDone(KProcess*)) );
+ connect( p, TQT_SIGNAL(readReady(KProcIO*)), this, TQT_SLOT(slotPRead(KProcIO*)) );
setCursor( WaitCursor );
@@ -1664,7 +1664,7 @@ void KateModOnHdPrompt::slotPRead( KProcIO *p)
if ( ! m_tmpfile )
m_tmpfile = new KTempFile();
// put all the data we have in it
- QString stmp;
+ TQString stmp;
bool dataRead = false;
while ( p->readln( stmp, false ) > -1 )
{
diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h
index ba03d5eff..8c8b2b61e 100644
--- a/kate/part/katedialogs.h
+++ b/kate/part/katedialogs.h
@@ -33,11 +33,11 @@
#include <kdialogbase.h>
#include <kmimetype.h>
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qintdict.h>
-#include <qvbox.h>
-#include <qtabwidget.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqintdict.h>
+#include <tqvbox.h>
+#include <tqtabwidget.h>
class KatePartPluginListItem;
@@ -82,7 +82,7 @@ class KateConfigPage : public Kate::ConfigPage
Q_OBJECT
public:
- KateConfigPage ( QWidget *parent=0, const char *name=0 );
+ KateConfigPage ( TQWidget *parent=0, const char *name=0 );
virtual ~KateConfigPage ();
public:
@@ -101,13 +101,13 @@ class KateGotoLineDialog : public KDialogBase
public:
- KateGotoLineDialog(QWidget *parent, int line, int max);
+ KateGotoLineDialog(TQWidget *parent, int line, int max);
int getLine();
protected:
KIntNumInput *e1;
- QPushButton *btnOK;
+ TQPushButton *btnOK;
};
class KateIndentConfigTab : public KateConfigPage
@@ -115,7 +115,7 @@ class KateIndentConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateIndentConfigTab(QWidget *parent);
+ KateIndentConfigTab(TQWidget *parent);
protected slots:
void somethingToggled();
@@ -124,11 +124,11 @@ class KateIndentConfigTab : public KateConfigPage
protected:
enum { numFlags = 8 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
KIntNumInput *indentationWidth;
- QButtonGroup *m_tabs;
+ TQButtonGroup *m_tabs;
KComboBox *m_indentMode;
- QPushButton *m_configPage;
+ TQPushButton *m_configPage;
public slots:
void configPage();
@@ -144,16 +144,16 @@ class KateSelectConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateSelectConfigTab(QWidget *parent);
+ KateSelectConfigTab(TQWidget *parent);
protected:
enum { numFlags = 2 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
- QButtonGroup *m_tabs;
+ TQButtonGroup *m_tabs;
KIntNumInput *e4;
- QCheckBox *e6;
+ TQCheckBox *e6;
public slots:
void apply ();
@@ -167,18 +167,18 @@ class KateEditConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateEditConfigTab(QWidget *parent);
+ KateEditConfigTab(TQWidget *parent);
protected:
enum { numFlags = 5 };
static const int flags[numFlags];
- QCheckBox *opt[numFlags];
+ TQCheckBox *opt[numFlags];
KIntNumInput *e1;
KIntNumInput *e2;
KIntNumInput *e3;
KComboBox *e5;
- QCheckBox *m_wwmarker;
+ TQCheckBox *m_wwmarker;
public slots:
void apply ();
@@ -192,21 +192,21 @@ class KateViewDefaultsConfig : public KateConfigPage
Q_OBJECT
public:
- KateViewDefaultsConfig( QWidget *parent );
+ KateViewDefaultsConfig( TQWidget *parent );
~KateViewDefaultsConfig();
private:
- QCheckBox *m_line;
- QCheckBox *m_folding;
- QCheckBox *m_collapseTopLevel;
- QCheckBox *m_icons;
- QCheckBox *m_scrollBarMarks;
- QCheckBox *m_dynwrap;
- QCheckBox *m_showIndentLines;
+ TQCheckBox *m_line;
+ TQCheckBox *m_folding;
+ TQCheckBox *m_collapseTopLevel;
+ TQCheckBox *m_icons;
+ TQCheckBox *m_scrollBarMarks;
+ TQCheckBox *m_dynwrap;
+ TQCheckBox *m_showIndentLines;
KIntNumInput *m_dynwrapAlignLevel;
- QLabel *m_dynwrapIndicatorsLabel;
+ TQLabel *m_dynwrapIndicatorsLabel;
KComboBox *m_dynwrapIndicatorsCombo;
- QButtonGroup *m_bmSort;
+ TQButtonGroup *m_bmSort;
public slots:
void apply ();
@@ -220,7 +220,7 @@ class KateEditKeyConfiguration: public KateConfigPage
Q_OBJECT
public:
- KateEditKeyConfiguration( QWidget* parent, KateDocument* doc );
+ KateEditKeyConfiguration( TQWidget* parent, KateDocument* doc );
public slots:
void apply();
@@ -229,7 +229,7 @@ class KateEditKeyConfiguration: public KateConfigPage
void defaults() {};
protected:
- void showEvent ( QShowEvent * );
+ void showEvent ( TQShowEvent * );
private:
bool m_ready;
@@ -242,7 +242,7 @@ class KateSaveConfigTab : public KateConfigPage
{
Q_OBJECT
public:
- KateSaveConfigTab( QWidget *parent );
+ KateSaveConfigTab( TQWidget *parent );
public slots:
void apply();
@@ -252,13 +252,13 @@ class KateSaveConfigTab : public KateConfigPage
protected:
KComboBox *m_encoding, *m_eol;
- QCheckBox *cbLocalFiles, *cbRemoteFiles;
- QCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
- QLineEdit *leBuPrefix;
- QLineEdit *leBuSuffix;
+ TQCheckBox *cbLocalFiles, *cbRemoteFiles;
+ TQCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
+ TQLineEdit *leBuPrefix;
+ TQLineEdit *leBuSuffix;
KIntNumInput *dirSearchDepth;
- class QSpinBox *blockCount;
- class QLabel *blockCountLabel;
+ class TQSpinBox *blockCount;
+ class TQLabel *blockCountLabel;
};
class KatePartPluginListItem;
@@ -270,7 +270,7 @@ class KatePartPluginListView : public KListView
friend class KatePartPluginListItem;
public:
- KatePartPluginListView (QWidget *parent = 0, const char *name = 0);
+ KatePartPluginListView (TQWidget *parent = 0, const char *name = 0);
signals:
void stateChange(KatePartPluginListItem *, bool);
@@ -285,7 +285,7 @@ class KatePartPluginConfigPage : public KateConfigPage
Q_OBJECT
public:
- KatePartPluginConfigPage (QWidget *parent);
+ KatePartPluginConfigPage (TQWidget *parent);
~KatePartPluginConfigPage ();
public slots:
@@ -295,14 +295,14 @@ class KatePartPluginConfigPage : public KateConfigPage
void defaults () {};
private slots:
- void slotCurrentChanged( QListViewItem * );
+ void slotCurrentChanged( TQListViewItem * );
void slotConfigure();
void slotStateChanged( KatePartPluginListItem *, bool );
private:
KatePartPluginListView *listView;
- QPtrList<KatePartPluginListItem> m_items;
- class QPushButton *btnConfigure;
+ TQPtrList<KatePartPluginListItem> m_items;
+ class TQPushButton *btnConfigure;
};
class KateHlConfigPage : public KateConfigPage
@@ -310,7 +310,7 @@ class KateHlConfigPage : public KateConfigPage
Q_OBJECT
public:
- KateHlConfigPage (QWidget *parent, KateDocument *doc);
+ KateHlConfigPage (TQWidget *parent, KateDocument *doc);
~KateHlConfigPage ();
public slots:
@@ -327,13 +327,13 @@ class KateHlConfigPage : public KateConfigPage
private:
void writeback ();
- QComboBox *hlCombo;
- QLineEdit *wildcards;
- QLineEdit *mimetypes;
+ TQComboBox *hlCombo;
+ TQLineEdit *wildcards;
+ TQLineEdit *mimetypes;
class KIntNumInput *priority;
- class QLabel *author, *license;
+ class TQLabel *author, *license;
- QIntDict<KateHlData> hlDataDict;
+ TQIntDict<KateHlData> hlDataDict;
KateHlData *hlData;
KateDocument *m_doc;
@@ -344,16 +344,16 @@ class KateHlDownloadDialog: public KDialogBase
Q_OBJECT
public:
- KateHlDownloadDialog(QWidget *parent, const char *name, bool modal);
+ KateHlDownloadDialog(TQWidget *parent, const char *name, bool modal);
~KateHlDownloadDialog();
private:
- class QListView *list;
- class QString listData;
+ class TQListView *list;
+ class TQString listData;
KIO::TransferJob *transferJob;
private slots:
- void listDataReceived(KIO::Job *, const QByteArray &data);
+ void listDataReceived(KIO::Job *, const TQByteArray &data);
public slots:
void slotUser1();
@@ -377,7 +377,7 @@ class KateModOnHdPrompt : public KDialogBase
Overwrite,
Ignore
};
- KateModOnHdPrompt( KateDocument *doc, int modtype, const QString &reason, QWidget *parent );
+ KateModOnHdPrompt( KateDocument *doc, int modtype, const TQString &reason, TQWidget *parent );
~KateModOnHdPrompt();
public slots:
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index c7b5a08b6..fe5e22b1d 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -70,12 +70,12 @@
#include <kmdcodec.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qclipboard.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqclipboard.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
//END includes
//BEGIN PRIVATE CLASSES
@@ -91,8 +91,8 @@ class KatePartPluginItem
// KateDocument Constructor
//
KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
- bool bReadOnly, QWidget *parentWidget,
- const char *widgetName, QObject *parent, const char *name)
+ bool bReadOnly, TQWidget *parentWidget,
+ const char *widgetName, TQObject *parent, const char *name)
: Kate::Document(parent, name),
m_plugins (KateFactory::self()->plugins().count()),
m_undoDontMerge(false),
@@ -170,8 +170,8 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
m_markDescriptions.setAutoDelete( true );
setMarksUserChangable( markType01 );
- m_undoMergeTimer = new QTimer(this);
- connect(m_undoMergeTimer, SIGNAL(timeout()), SLOT(undoCancel()));
+ m_undoMergeTimer = new TQTimer(this);
+ connect(m_undoMergeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(undoCancel()));
clearMarks ();
clearUndo ();
@@ -189,24 +189,24 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
m_indenter->updateConfig ();
// some nice signals from the buffer
- connect(m_buffer, SIGNAL(tagLines(int,int)), this, SLOT(tagLines(int,int)));
- connect(m_buffer, SIGNAL(codeFoldingUpdated()),this,SIGNAL(codeFoldingUpdated()));
+ connect(m_buffer, TQT_SIGNAL(tagLines(int,int)), this, TQT_SLOT(tagLines(int,int)));
+ connect(m_buffer, TQT_SIGNAL(codeFoldingUpdated()),this,TQT_SIGNAL(codeFoldingUpdated()));
// if the user changes the highlight with the dialog, notify the doc
- connect(KateHlManager::self(),SIGNAL(changed()),SLOT(internalHlChanged()));
+ connect(KateHlManager::self(),TQT_SIGNAL(changed()),TQT_SLOT(internalHlChanged()));
// signal for the arbitrary HL
- connect(m_arbitraryHL, SIGNAL(tagLines(KateView*, KateSuperRange*)), SLOT(tagArbitraryLines(KateView*, KateSuperRange*)));
+ connect(m_arbitraryHL, TQT_SIGNAL(tagLines(KateView*, KateSuperRange*)), TQT_SLOT(tagArbitraryLines(KateView*, KateSuperRange*)));
// signals for mod on hd
- connect( KateFactory::self()->dirWatch(), SIGNAL(dirty (const QString &)),
- this, SLOT(slotModOnHdDirty (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(dirty (const TQString &)),
+ this, TQT_SLOT(slotModOnHdDirty (const TQString &)) );
- connect( KateFactory::self()->dirWatch(), SIGNAL(created (const QString &)),
- this, SLOT(slotModOnHdCreated (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(created (const TQString &)),
+ this, TQT_SLOT(slotModOnHdCreated (const TQString &)) );
- connect( KateFactory::self()->dirWatch(), SIGNAL(deleted (const QString &)),
- this, SLOT(slotModOnHdDeleted (const QString &)) );
+ connect( KateFactory::self()->dirWatch(), TQT_SIGNAL(deleted (const TQString &)),
+ this, TQT_SLOT(slotModOnHdDeleted (const TQString &)) );
// update doc name
setDocName ("");
@@ -220,7 +220,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
setWidget( view );
}
- connect(this,SIGNAL(sigQueryClose(bool *, bool*)),this,SLOT(slotQueryClose_save(bool *, bool*)));
+ connect(this,TQT_SIGNAL(sigQueryClose(bool *, bool*)),this,TQT_SLOT(slotQueryClose_save(bool *, bool*)));
m_isasking = 0;
@@ -287,7 +287,7 @@ void KateDocument::loadPlugin (uint pluginIndex)
{
if (m_plugins[pluginIndex]) return;
- m_plugins[pluginIndex] = KTextEditor::createPlugin (QFile::encodeName((KateFactory::self()->plugins())[pluginIndex]->library()), this);
+ m_plugins[pluginIndex] = KTextEditor::createPlugin (TQFile::encodeName((KateFactory::self()->plugins())[pluginIndex]->library()), this);
enablePluginGUI (m_plugins[pluginIndex]);
}
@@ -353,16 +353,16 @@ void KateDocument::disablePluginGUI (KTextEditor::Plugin *plugin)
//BEGIN KTextEditor::Document stuff
-KTextEditor::View *KateDocument::createView( QWidget *parent, const char *name )
+KTextEditor::View *KateDocument::createView( TQWidget *parent, const char *name )
{
KateView* newView = new KateView( this, parent, name);
- connect(newView, SIGNAL(cursorPositionChanged()), SLOT(undoCancel()));
+ connect(newView, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(undoCancel()));
if ( s_fileChangedDialogsActivated )
- connect( newView, SIGNAL(gotFocus( Kate::View * )), this, SLOT(slotModifiedOnDisk()) );
+ connect( newView, TQT_SIGNAL(gotFocus( Kate::View * )), this, TQT_SLOT(slotModifiedOnDisk()) );
return newView;
}
-QPtrList<KTextEditor::View> KateDocument::views () const
+TQPtrList<KTextEditor::View> KateDocument::views () const
{
return m_textEditViews;
}
@@ -382,7 +382,7 @@ uint KateDocument::configPages () const
return 10;
}
-KTextEditor::ConfigPage *KateDocument::configPage (uint number, QWidget *parent, const char * )
+KTextEditor::ConfigPage *KateDocument::configPage (uint number, TQWidget *parent, const char * )
{
switch( number )
{
@@ -423,7 +423,7 @@ KTextEditor::ConfigPage *KateDocument::configPage (uint number, QWidget *parent,
return 0;
}
-QString KateDocument::configPageName (uint number) const
+TQString KateDocument::configPageName (uint number) const
{
switch( number )
{
@@ -458,13 +458,13 @@ QString KateDocument::configPageName (uint number) const
return i18n ("Plugins");
default:
- return QString ("");
+ return TQString ("");
}
- return QString ("");
+ return TQString ("");
}
-QString KateDocument::configPageFullName (uint number) const
+TQString KateDocument::configPageFullName (uint number) const
{
switch( number )
{
@@ -499,13 +499,13 @@ QString KateDocument::configPageFullName (uint number) const
return i18n ("Plugin Manager");
default:
- return QString ("");
+ return TQString ("");
}
- return QString ("");
+ return TQString ("");
}
-QPixmap KateDocument::configPagePixmap (uint number, int size) const
+TQPixmap KateDocument::configPagePixmap (uint number, int size) const
{
switch( number )
{
@@ -549,9 +549,9 @@ QPixmap KateDocument::configPagePixmap (uint number, int size) const
//BEGIN KTextEditor::EditInterface stuff
-QString KateDocument::text() const
+TQString KateDocument::text() const
{
- QString s;
+ TQString s;
for (uint i = 0; i < m_buffer->count(); i++)
{
@@ -569,27 +569,27 @@ QString KateDocument::text() const
return s;
}
-QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol ) const
+TQString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol ) const
{
return text(startLine, startCol, endLine, endCol, false);
}
-QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const
+TQString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const
{
if ( blockwise && (startCol > endCol) )
- return QString ();
+ return TQString ();
- QString s;
+ TQString s;
if (startLine == endLine)
{
if (startCol > endCol)
- return QString ();
+ return TQString ();
KateTextLine::Ptr textLine = m_buffer->plainLine(startLine);
if ( !textLine )
- return QString ();
+ return TQString ();
return textLine->string(startCol, endCol-startCol);
}
@@ -622,23 +622,23 @@ QString KateDocument::text ( uint startLine, uint startCol, uint endLine, uint e
return s;
}
-QString KateDocument::textLine( uint line ) const
+TQString KateDocument::textLine( uint line ) const
{
KateTextLine::Ptr l = m_buffer->plainLine(line);
if (!l)
- return QString();
+ return TQString();
return l->string();
}
-bool KateDocument::setText(const QString &s)
+bool KateDocument::setText(const TQString &s)
{
if (!isReadWrite())
return false;
- QPtrList<KTextEditor::Mark> m = marks ();
- QValueList<KTextEditor::Mark> msave;
+ TQPtrList<KTextEditor::Mark> m = marks ();
+ TQValueList<KTextEditor::Mark> msave;
for (uint i=0; i < m.count(); i++)
msave.append (*m.at(i));
@@ -675,12 +675,12 @@ bool KateDocument::clear()
return removeText (0,0,lastLine()+1, 0);
}
-bool KateDocument::insertText( uint line, uint col, const QString &s)
+bool KateDocument::insertText( uint line, uint col, const TQString &s)
{
return insertText (line, col, s, false);
}
-bool KateDocument::insertText( uint line, uint col, const QString &s, bool blockwise )
+bool KateDocument::insertText( uint line, uint col, const TQString &s, bool blockwise )
{
if (!isReadWrite())
return false;
@@ -698,7 +698,7 @@ bool KateDocument::insertText( uint line, uint col, const QString &s, bool block
uint insertPos = col;
uint len = s.length();
- QString buf;
+ TQString buf;
bool replacetabs = ( config()->configFlags() & KateDocumentConfig::cfReplaceTabsDyn && ! m_isInUndo );
uint tw = config()->tabWidth();
@@ -709,7 +709,7 @@ bool KateDocument::insertText( uint line, uint col, const QString &s, bool block
for (uint pos = 0; pos < len; pos++)
{
- QChar ch = s[pos];
+ TQChar ch = s[pos];
if (ch == '\n')
{
@@ -845,7 +845,7 @@ bool KateDocument::removeText ( uint startLine, uint startCol, uint endLine, uin
return true;
}
-bool KateDocument::insertLine( uint l, const QString &str )
+bool KateDocument::insertLine( uint l, const TQString &str )
{
if (!isReadWrite())
return false;
@@ -1064,16 +1064,16 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
kdDebug (13020) << "do wrap line: " << line << endl;
- const QChar *text = l->text();
+ const TQChar *text = l->text();
uint eolPosition = l->length()-1;
// take tabs into account here, too
uint x = 0;
- const QString & t = l->string();
+ const TQString & t = l->string();
uint z2 = 0;
for ( ; z2 < l->length(); z2++)
{
- if (t[z2] == QChar('\t'))
+ if (t[z2] == TQChar('\t'))
x += m_buffer->tabWidth() - (x % m_buffer->tabWidth());
else
x++;
@@ -1128,7 +1128,7 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
else
{
if (nextl && (nextl->length() > 0) && !nextl->getChar(0).isSpace() && ((l->length() < 1) || !l->getChar(l->length()-1).isSpace()))
- editInsertText (line+1, 0, QString (" "));
+ editInsertText (line+1, 0, TQString (" "));
bool newLineAdded = false;
editWrapLine (line, z, false, &newLineAdded);
@@ -1145,7 +1145,7 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
return true;
}
-void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
{
if (editIsRunning && editWithUndo && m_editCurrentUndo) {
m_editCurrentUndo->addItem(type, line, col, len, text);
@@ -1159,12 +1159,12 @@ void KateDocument::editAddUndo (KateUndoGroup::UndoType type, uint line, uint co
}
}
-bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
+bool KateDocument::editInsertText ( uint line, uint col, const TQString &str )
{
if (!isReadWrite())
return false;
- QString s = str;
+ TQString s = str;
KateTextLine::Ptr l = m_buffer->line(line);
@@ -1179,7 +1179,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
while ( (pos = s.find('\t')) > -1 )
{
l = tw - ( (col + pos)%tw );
- s.replace( pos, 1, QString().fill( ' ', l ) );
+ s.replace( pos, 1, TQString().fill( ' ', l ) );
}
}
@@ -1192,7 +1192,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const QString &str )
m_buffer->changeLine(line);
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editTextInserted (line, col, s.length());
editEnd ();
@@ -1219,7 +1219,7 @@ bool KateDocument::editRemoveText ( uint line, uint col, uint len )
m_buffer->changeLine(line);
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editTextRemoved (line, col, len);
editEnd ();
@@ -1239,7 +1239,7 @@ bool KateDocument::editMarkLineAutoWrapped ( uint line, bool autowrapped )
editStart ();
- editAddUndo (KateUndoGroup::editMarkLineAutoWrapped, line, autowrapped ? 1 : 0, 0, QString::null);
+ editAddUndo (KateUndoGroup::editMarkLineAutoWrapped, line, autowrapped ? 1 : 0, 0, TQString::null);
l->setAutoWrapped (autowrapped);
@@ -1281,8 +1281,8 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
m_buffer->insertLine (line+1, textLine);
m_buffer->changeLine(line);
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line )
{
@@ -1291,7 +1291,7 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
}
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line++;
@@ -1318,7 +1318,7 @@ bool KateDocument::editWrapLine ( uint line, uint col, bool newLine, bool *newLi
(*newLineAdded) = false;
}
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineWrapped (line, col, !nextLine || newLine);
editEnd ();
@@ -1360,8 +1360,8 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
m_buffer->changeLine(line+1);
}
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line+1 )
list.append( it.current() );
@@ -1377,7 +1377,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
}
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line--;
@@ -1387,7 +1387,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineUnWrapped (line, col, removeLine, length);
editEnd ();
@@ -1395,7 +1395,7 @@ bool KateDocument::editUnWrapLine ( uint line, bool removeLine, uint length )
return true;
}
-bool KateDocument::editInsertLine ( uint line, const QString &s )
+bool KateDocument::editInsertLine ( uint line, const TQString &s )
{
if (!isReadWrite())
return false;
@@ -1416,14 +1416,14 @@ bool KateDocument::editInsertLine ( uint line, const QString &s )
removeTrailingSpace( line ); // new line
- QPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ TQPtrList<KTextEditor::Mark> list;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if( it.current()->line >= line )
list.append( it.current() );
}
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line++;
@@ -1433,7 +1433,7 @@ bool KateDocument::editInsertLine ( uint line, const QString &s )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineInserted (line);
editEnd ();
@@ -1458,9 +1458,9 @@ bool KateDocument::editRemoveLine ( uint line )
m_buffer->removeLine(line);
- QPtrList<KTextEditor::Mark> list;
+ TQPtrList<KTextEditor::Mark> list;
KTextEditor::Mark* rmark = 0;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
if ( (it.current()->line > line) )
list.append( it.current() );
@@ -1471,7 +1471,7 @@ bool KateDocument::editRemoveLine ( uint line )
if (rmark)
delete (m_marks.take (rmark->line));
- for( QPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
+ for( TQPtrListIterator<KTextEditor::Mark> it( list ); it.current(); ++it )
{
KTextEditor::Mark* mark = m_marks.take( it.current()->line );
mark->line--;
@@ -1481,7 +1481,7 @@ bool KateDocument::editRemoveLine ( uint line )
if( !list.isEmpty() )
emit marksChanged();
- for( QPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
+ for( TQPtrListIterator<KateSuperCursor> it (m_superCursors); it.current(); ++it )
it.current()->editLineRemoved (line);
editEnd();
@@ -1642,7 +1642,7 @@ void KateDocument::clearRedo()
emit undoChanged ();
}
-QPtrList<KTextEditor::Cursor> KateDocument::cursors () const
+TQPtrList<KTextEditor::Cursor> KateDocument::cursors () const
{
return myCursors;
}
@@ -1650,7 +1650,7 @@ QPtrList<KTextEditor::Cursor> KateDocument::cursors () const
//BEGIN KTextEditor::SearchInterface stuff
-bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive, bool backwards)
+bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive, bool backwards)
{
if (text.isEmpty())
return false;
@@ -1732,7 +1732,7 @@ bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, co
return false;
}
-bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards)
+bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards)
{
kdDebug(13020)<<"KateDocument::searchText( "<<startLine<<", "<<startCol<<", "<<regexp.pattern()<<", "<<backwards<<" )"<<endl;
if (regexp.isEmpty() || !regexp.isValid())
@@ -1862,12 +1862,12 @@ uint KateDocument::hlModeCount ()
return KateHlManager::self()->highlights();
}
-QString KateDocument::hlModeName (uint mode)
+TQString KateDocument::hlModeName (uint mode)
{
return KateHlManager::self()->hlName (mode);
}
-QString KateDocument::hlModeSectionName (uint mode)
+TQString KateDocument::hlModeSectionName (uint mode)
{
return KateHlManager::self()->hlSection (mode);
}
@@ -1930,7 +1930,7 @@ void KateDocument::readSessionConfig(KConfig *kconfig)
KURL url (kconfig->readEntry("URL"));
// get the encoding
- QString tmpenc=kconfig->readEntry("Encoding");
+ TQString tmpenc=kconfig->readEntry("Encoding");
if (!tmpenc.isEmpty() && (tmpenc != encoding()))
setEncoding(tmpenc);
@@ -1948,7 +1948,7 @@ void KateDocument::readSessionConfig(KConfig *kconfig)
config()->setIndentationMode( (uint)kconfig->readNumEntry("Indentation Mode", config()->indentationMode() ) );
// Restore Bookmarks
- QValueList<int> marks = kconfig->readIntListEntry("Bookmarks");
+ TQValueList<int> marks = kconfig->readIntListEntry("Bookmarks");
for( uint i = 0; i < marks.count(); i++ )
addMark( marks[i], KateDocument::markType01 );
}
@@ -1969,8 +1969,8 @@ void KateDocument::writeSessionConfig(KConfig *kconfig)
kconfig->writeEntry("Indentation Mode", config()->indentationMode() );
// Save Bookmarks
- QValueList<int> marks;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ TQValueList<int> marks;
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current() && it.current()->type & KTextEditor::MarkInterface::markType01;
++it )
marks << it.current()->line;
@@ -1990,14 +1990,14 @@ void KateDocument::configDialog()
KWin::setIcons( kd->winId(), kapp->icon(), kapp->miniIcon() );
#endif
- QPtrList<KTextEditor::ConfigPage> editorPages;
+ TQPtrList<KTextEditor::ConfigPage> editorPages;
for (uint i = 0; i < KTextEditor::configInterfaceExtension (this)->configPages (); i++)
{
- QStringList path;
+ TQStringList path;
path.clear();
path << KTextEditor::configInterfaceExtension (this)->configPageName (i);
- QVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (i),
+ TQVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (i),
KTextEditor::configInterfaceExtension (this)->configPagePixmap(i, KIcon::SizeMedium) );
editorPages.append (KTextEditor::configInterfaceExtension (this)->configPage(i, page));
@@ -2122,11 +2122,11 @@ void KateDocument::removeMark( uint line, uint markType )
repaintViews(true);
}
-QPtrList<KTextEditor::Mark> KateDocument::marks()
+TQPtrList<KTextEditor::Mark> KateDocument::marks()
{
- QPtrList<KTextEditor::Mark> list;
+ TQPtrList<KTextEditor::Mark> list;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current(); ++it ) {
list.append( it.current() );
}
@@ -2136,7 +2136,7 @@ QPtrList<KTextEditor::Mark> KateDocument::marks()
void KateDocument::clearMarks()
{
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks );
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks );
it.current(); ++it ) {
KTextEditor::Mark* mark = it.current();
emit markChanged( *mark, MarkRemoved );
@@ -2149,36 +2149,36 @@ void KateDocument::clearMarks()
repaintViews(true);
}
-void KateDocument::setPixmap( MarkInterface::MarkTypes type, const QPixmap& pixmap )
+void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap )
{
- m_markPixmaps.replace( type, new QPixmap( pixmap ) );
+ m_markPixmaps.replace( type, new TQPixmap( pixmap ) );
}
-void KateDocument::setDescription( MarkInterface::MarkTypes type, const QString& description )
+void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description )
{
- m_markDescriptions.replace( type, new QString( description ) );
+ m_markDescriptions.replace( type, new TQString( description ) );
}
-QPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type )
+TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type )
{
return m_markPixmaps[type];
}
-QColor KateDocument::markColor( MarkInterface::MarkTypes type )
+TQColor KateDocument::markColor( MarkInterface::MarkTypes type )
{
uint reserved = (0x1 << KTextEditor::MarkInterface::reservedMarkersCount()) - 1;
if ((uint)type >= (uint)markType01 && (uint)type <= reserved) {
return KateRendererConfig::global()->lineMarkerColor(type);
} else {
- return QColor();
+ return TQColor();
}
}
-QString KateDocument::markDescription( MarkInterface::MarkTypes type )
+TQString KateDocument::markDescription( MarkInterface::MarkTypes type )
{
if( m_markDescriptions[type] )
return *m_markDescriptions[type];
- return QString::null;
+ return TQString::null;
}
void KateDocument::setMarksUserChangable( uint markMask )
@@ -2205,7 +2205,7 @@ bool KateDocument::print ()
//END
//BEGIN KTextEditor::DocumentInfoInterface (### unfinished)
-QString KateDocument::mimeType()
+TQString KateDocument::mimeType()
{
KMimeType::Ptr result = KMimeType::defaultMimeTypePtr();
@@ -2226,19 +2226,19 @@ long KateDocument::fileSize()
}
// TODO implement this
-QString KateDocument::niceFileSize()
+TQString KateDocument::niceFileSize()
{
return "UNKNOWN";
}
KMimeType::Ptr KateDocument::mimeTypeForContent()
{
- QByteArray buf (1024);
+ TQByteArray buf (1024);
uint bufpos = 0;
for (uint i=0; i < numLines(); i++)
{
- QString line = textLine( i );
+ TQString line = textLine( i );
uint len = line.length() + 1;
if (bufpos + len > 1024)
@@ -2305,13 +2305,13 @@ bool KateDocument::openURL( const KURL &url )
m_job = KIO::get ( url, false, isProgressInfoEnabled() );
// connect to slots
- connect( m_job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotDataKate( KIO::Job*, const QByteArray& ) ) );
+ connect( m_job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotDataKate( KIO::Job*, const TQByteArray& ) ) );
- connect( m_job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinishedKate( KIO::Job* ) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinishedKate( KIO::Job* ) ) );
- QWidget *w = widget ();
+ TQWidget *w = widget ();
if (!w && !m_views.isEmpty ())
w = m_views.first();
@@ -2324,7 +2324,7 @@ bool KateDocument::openURL( const KURL &url )
}
}
-void KateDocument::slotDataKate ( KIO::Job *, const QByteArray &data )
+void KateDocument::slotDataKate ( KIO::Job *, const TQByteArray &data )
{
// kdDebug(13020) << "KateDocument::slotData" << endl;
@@ -2384,7 +2384,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
if (job)
{
- QString metaDataCharset = job->queryMetaData("charset");
+ TQString metaDataCharset = job->queryMetaData("charset");
// only overwrite config if nothing set
if (!metaDataCharset.isEmpty () && (!m_config->isSetEncoding() || m_config->encoding().isEmpty()))
@@ -2394,7 +2394,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
// service type magic to get encoding right
//
- QString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace();
+ TQString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace();
int pos = serviceType.find(';');
if (pos != -1)
setEncoding (serviceType.mid(pos+1));
@@ -2462,7 +2462,7 @@ bool KateDocument::openFile(KIO::Job * job)
//
// set doc name, dummy value as arg, don't need it
//
- setDocName (QString::null);
+ setDocName (TQString::null);
//
// to houston, we are not modified
@@ -2567,7 +2567,7 @@ bool KateDocument::saveFile()
{
if (s_fileChangedDialogsActivated && m_modOnHd)
{
- QString str = reasonedMOHString() + "\n\n";
+ TQString str = reasonedMOHString() + "\n\n";
if (!isModified())
{
@@ -2650,12 +2650,12 @@ bool KateDocument::saveFile()
bool KateDocument::saveAs( const KURL &u )
{
- QString oldDir = url().directory();
+ TQString oldDir = url().directory();
if ( KParts::ReadWritePart::saveAs( u ) )
{
// null means base on filename
- setDocName( QString::null );
+ setDocName( TQString::null );
if ( u.directory() != oldDir )
readDirConfig();
@@ -2675,7 +2675,7 @@ void KateDocument::readDirConfig ()
if (m_url.isLocalFile() && (depth > -1))
{
- QString currentDir = QFileInfo (m_file).dirPath();
+ TQString currentDir = TQFileInfo (m_file).dirPath();
// only search as deep as specified or not at all ;)
while (depth > -1)
@@ -2683,14 +2683,14 @@ void KateDocument::readDirConfig ()
kdDebug (13020) << "search for config file in path: " << currentDir << endl;
// try to open config file in this dir
- QFile f (currentDir + "/.kateconfig");
+ TQFile f (currentDir + "/.kateconfig");
if (f.open (IO_ReadOnly))
{
- QTextStream stream (&f);
+ TQTextStream stream (&f);
uint linesRead = 0;
- QString line = stream.readLine();
+ TQString line = stream.readLine();
while ((linesRead < 32) && !line.isNull())
{
readVariableLine( line );
@@ -2703,7 +2703,7 @@ void KateDocument::readDirConfig ()
break;
}
- QString newDir = QFileInfo (currentDir).dirPath();
+ TQString newDir = TQFileInfo (currentDir).dirPath();
// bail out on looping (for example reached /)
if (currentDir == newDir)
@@ -2737,7 +2737,7 @@ void KateDocument::deactivateDirWatch ()
if (!m_dirWatchFile.isEmpty())
KateFactory::self()->dirWatch ()->removeFile (m_dirWatchFile);
- m_dirWatchFile = QString::null;
+ m_dirWatchFile = TQString::null;
}
bool KateDocument::closeURL()
@@ -2755,7 +2755,7 @@ bool KateDocument::closeURL()
widget(),
reasonedMOHString() + "\n\n" + i18n("Do you really want to continue to close this file? Data loss may occur."),
i18n("Possible Data Loss"), i18n("Close Nevertheless"),
- QString("kate_close_modonhd_%1").arg( m_modOnHdReason ) ) == KMessageBox::Continue))
+ TQString("kate_close_modonhd_%1").arg( m_modOnHdReason ) ) == KMessageBox::Continue))
return false;
}
}
@@ -2773,7 +2773,7 @@ bool KateDocument::closeURL()
// empty url + filename
//
m_url = KURL ();
- m_file = QString::null;
+ m_file = TQString::null;
// we are not modified
if (m_modOnHd)
@@ -2803,7 +2803,7 @@ bool KateDocument::closeURL()
for (KateView * view = m_views.first(); view != 0L; view = m_views.next() )
{
// Explicitly call the internal version because we don't want this to look like
- // an external request (and thus have the view not QWidget::scroll()ed.
+ // an external request (and thus have the view not TQWidget::scroll()ed.
view->setCursorPositionInternal(0, 0, 1, false);
view->clearSelection();
view->updateView(true);
@@ -2813,7 +2813,7 @@ bool KateDocument::closeURL()
emit fileNameChanged ();
// update doc name
- setDocName (QString::null);
+ setDocName (TQString::null);
// success
return true;
@@ -2951,7 +2951,7 @@ uint KateDocument::currentColumn( const KateTextCursor& cursor )
return 0;
}
-bool KateDocument::typeChars ( KateView *view, const QString &chars )
+bool KateDocument::typeChars ( KateView *view, const TQString &chars )
{
KateTextLine::Ptr textLine = m_buffer->plainLine(view->cursorLine ());
@@ -2959,22 +2959,22 @@ bool KateDocument::typeChars ( KateView *view, const QString &chars )
return false;
bool bracketInserted = false;
- QString buf;
- QChar c;
+ TQString buf;
+ TQChar c;
for( uint z = 0; z < chars.length(); z++ )
{
- QChar ch = c = chars[z];
+ TQChar ch = c = chars[z];
if (ch.isPrint() || ch == '\t')
{
buf.append (ch);
if (!bracketInserted && (config()->configFlags() & KateDocument::cfAutoBrackets))
{
- QChar end_ch;
+ TQChar end_ch;
bool complete = true;
- QChar prevChar = textLine->getChar(view->cursorColumnReal()-1);
- QChar nextChar = textLine->getChar(view->cursorColumnReal());
+ TQChar prevChar = textLine->getChar(view->cursorColumnReal()-1);
+ TQChar nextChar = textLine->getChar(view->cursorColumnReal());
switch(ch) {
case '(': end_ch = ')'; break;
case '[': end_ch = ']'; break;
@@ -3107,7 +3107,7 @@ void KateDocument::transpose( const KateTextCursor& cursor)
return;
uint line = cursor.line();
- QString s;
+ TQString s;
//clever swap code if first character on the line swap right&left
//otherwise left & right
@@ -3143,8 +3143,8 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
// if inside empty (), {}, [], '', "" delete both
KateTextLine::Ptr tl = m_buffer->plainLine(line);
if(!tl) return;
- QChar prevChar = tl->getChar(col-1);
- QChar nextChar = tl->getChar(col);
+ TQChar prevChar = tl->getChar(col-1);
+ TQChar nextChar = tl->getChar(col);
if ( (prevChar == '"' && nextChar == '"') ||
(prevChar == '\'' && nextChar == '\'') ||
@@ -3195,7 +3195,7 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
if (!textLine)
return;
- if (config()->wordWrap() && textLine->endingWith(QString::fromLatin1(" ")))
+ if (config()->wordWrap() && textLine->endingWith(TQString::fromLatin1(" ")))
{
// gg: in hard wordwrap mode, backspace must also eat the trailing space
removeText (line-1, textLine->length()-1, line, 0);
@@ -3227,12 +3227,12 @@ void KateDocument::del( KateView *view, const KateTextCursor& c )
void KateDocument::paste ( KateView* view )
{
- QString s = QApplication::clipboard()->text();
+ TQString s = TQApplication::clipboard()->text();
if (s.isEmpty())
return;
- uint lines = s.contains (QChar ('\n'));
+ uint lines = s.contains (TQChar ('\n'));
m_undoDontMerge = true;
@@ -3275,7 +3275,7 @@ void KateDocument::insertIndentChars ( KateView *view )
{
editStart ();
- QString s;
+ TQString s;
if (config()->configFlags() & KateDocument::cfSpaceIndent)
{
int width = config()->indentationWidth();
@@ -3406,7 +3406,7 @@ void KateDocument::optimizeLeadingSpace(uint line, int flags, int change)
void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint space, int flags)
{
uint length;
- QString new_space;
+ TQString new_space;
if (flags & KateDocument::cfSpaceIndent && ! (flags & KateDocumentConfig::cfMixedIndent) ) {
length = space;
@@ -3416,7 +3416,7 @@ void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint s
length = space / config()->tabWidth();
new_space.fill('\t', length);
- QString extra_space;
+ TQString extra_space;
extra_space.fill(' ', space % config()->tabWidth());
length += space % config()->tabWidth();
new_space += extra_space;
@@ -3444,7 +3444,7 @@ void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint s
Remove a given string at the begining
of the current line.
*/
-bool KateDocument::removeStringFromBegining(int line, QString &str)
+bool KateDocument::removeStringFromBegining(int line, TQString &str)
{
KateTextLine::Ptr textline = m_buffer->plainLine(line);
@@ -3474,7 +3474,7 @@ bool KateDocument::removeStringFromBegining(int line, QString &str)
Remove a given string at the end
of the current line.
*/
-bool KateDocument::removeStringFromEnd(int line, QString &str)
+bool KateDocument::removeStringFromEnd(int line, TQString &str)
{
KateTextLine::Ptr textline = m_buffer->plainLine(line);
@@ -3511,12 +3511,12 @@ void KateDocument::addStartLineCommentToSingleLine( int line, int attrib )
{
if (highlight()->getCommentSingleLinePosition(attrib)==KateHighlighting::CSLPosColumn0)
{
- QString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
+ TQString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
insertText (line, 0, commentLineMark);
}
else
{
- QString commentLineMark=highlight()->getCommentSingleLineStart(attrib);
+ TQString commentLineMark=highlight()->getCommentSingleLineStart(attrib);
KateTextLine::Ptr l = m_buffer->line(line);
int pos=l->firstChar();
if (pos >=0)
@@ -3530,8 +3530,8 @@ void KateDocument::addStartLineCommentToSingleLine( int line, int attrib )
*/
bool KateDocument::removeStartLineCommentFromSingleLine( int line, int attrib )
{
- QString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
- QString longCommentMark = shortCommentMark + " ";
+ TQString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
+ TQString longCommentMark = shortCommentMark + " ";
editStart();
@@ -3550,8 +3550,8 @@ bool KateDocument::removeStartLineCommentFromSingleLine( int line, int attrib )
*/
void KateDocument::addStartStopCommentToSingleLine( int line, int attrib )
{
- QString startCommentMark = highlight()->getCommentStart( attrib ) + " ";
- QString stopCommentMark = " " + highlight()->getCommentEnd( attrib );
+ TQString startCommentMark = highlight()->getCommentStart( attrib ) + " ";
+ TQString stopCommentMark = " " + highlight()->getCommentEnd( attrib );
editStart();
@@ -3573,10 +3573,10 @@ void KateDocument::addStartStopCommentToSingleLine( int line, int attrib )
*/
bool KateDocument::removeStartStopCommentFromSingleLine( int line, int attrib )
{
- QString shortStartCommentMark = highlight()->getCommentStart( attrib );
- QString longStartCommentMark = shortStartCommentMark + " ";
- QString shortStopCommentMark = highlight()->getCommentEnd( attrib );
- QString longStopCommentMark = " " + shortStopCommentMark;
+ TQString shortStartCommentMark = highlight()->getCommentStart( attrib );
+ TQString longStartCommentMark = shortStartCommentMark + " ";
+ TQString shortStopCommentMark = highlight()->getCommentEnd( attrib );
+ TQString longStopCommentMark = " " + shortStopCommentMark;
editStart();
@@ -3607,8 +3607,8 @@ bool KateDocument::removeStartStopCommentFromSingleLine( int line, int attrib )
*/
void KateDocument::addStartStopCommentToSelection( KateView *view, int attrib )
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3639,7 +3639,7 @@ void KateDocument::addStartStopCommentToSelection( KateView *view, int attrib )
*/
void KateDocument::addStartLineCommentToSelection( KateView *view, int attrib )
{
- QString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
+ TQString commentLineMark = highlight()->getCommentSingleLineStart( attrib ) + " ";
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3713,8 +3713,8 @@ bool KateDocument::previousNonSpaceCharPos(int &line, int &col)
*/
bool KateDocument::removeStartStopCommentFromSelection( KateView *view, int attrib )
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int sl = kMax<int> (0, view->selStartLine());
int el = kMin<int> (view->selEndLine(), lastLine());
@@ -3757,8 +3757,8 @@ bool KateDocument::removeStartStopCommentFromSelection( KateView *view, int attr
bool KateDocument::removeStartStopCommentFromRegion(const KateTextCursor &start,const KateTextCursor &end,int attrib)
{
- QString startComment = highlight()->getCommentStart( attrib );
- QString endComment = highlight()->getCommentEnd( attrib );
+ TQString startComment = highlight()->getCommentStart( attrib );
+ TQString endComment = highlight()->getCommentEnd( attrib );
int startCommentLen = startComment.length();
int endCommentLen = endComment.length();
@@ -3780,8 +3780,8 @@ bool KateDocument::removeStartStopCommentFromRegion(const KateTextCursor &start,
*/
bool KateDocument::removeStartLineCommentFromSelection( KateView *view, int attrib )
{
- QString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
- QString longCommentMark = shortCommentMark + " ";
+ TQString shortCommentMark = highlight()->getCommentSingleLineStart( attrib );
+ TQString longCommentMark = shortCommentMark + " ";
int sl = view->selStartLine();
int el = view->selEndLine();
@@ -3961,8 +3961,8 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c,
start = end;
end = t;
}
- QString s = text( ln, start, ln, end );
- QString o = s;
+ TQString s = text( ln, start, ln, end );
+ TQString o = s;
if ( t == Uppercase )
s = s.upper();
@@ -4002,8 +4002,8 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c,
selectionRestored = true;
} else { // no selection
- QString o = text( cl, cc, cl, cc + 1 );
- QString s;
+ TQString o = text( cl, cc, cl, cc + 1 );
+ TQString s;
int n ( cc );
switch ( t ) {
case Uppercase:
@@ -4078,19 +4078,19 @@ void KateDocument::joinLines( uint first, uint last )
editEnd();
}
-QString KateDocument::getWord( const KateTextCursor& cursor ) {
+TQString KateDocument::getWord( const KateTextCursor& cursor ) {
int start, end, len;
KateTextLine::Ptr textLine = m_buffer->plainLine(cursor.line());
len = textLine->length();
start = end = cursor.col();
if (start > len) // Probably because of non-wrapping cursor mode.
- return QString("");
+ return TQString("");
while (start > 0 && highlight()->isInWord(textLine->getChar(start - 1), textLine->attribute(start - 1))) start--;
while (end < len && highlight()->isInWord(textLine->getChar(end), textLine->attribute(end))) end++;
len = end - start;
- return QString(&textLine->text()[start], len);
+ return TQString(&textLine->text()[start], len);
}
void KateDocument::tagLines(int start, int end)
@@ -4137,9 +4137,9 @@ void KateDocument::setConfigFlags (uint flags)
config()->setConfigFlags(flags);
}
-inline bool isStartBracket( const QChar& c ) { return c == '{' || c == '[' || c == '('; }
-inline bool isEndBracket ( const QChar& c ) { return c == '}' || c == ']' || c == ')'; }
-inline bool isBracket ( const QChar& c ) { return isStartBracket( c ) || isEndBracket( c ); }
+inline bool isStartBracket( const TQChar& c ) { return c == '{' || c == '[' || c == '('; }
+inline bool isEndBracket ( const TQChar& c ) { return c == '}' || c == ']' || c == ')'; }
+inline bool isBracket ( const TQChar& c ) { return isStartBracket( c ) || isEndBracket( c ); }
/*
Bracket matching uses the following algorithm:
@@ -4174,9 +4174,9 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
if( !textLine )
return false;
- QChar right = textLine->getChar( start.col() );
- QChar left = textLine->getChar( start.col() - 1 );
- QChar bracket;
+ TQChar right = textLine->getChar( start.col() );
+ TQChar left = textLine->getChar( start.col() - 1 );
+ TQChar bracket;
if ( config()->configFlags() & cfOvr ) {
if( isBracket( right ) ) {
@@ -4198,7 +4198,7 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
return false;
}
- QChar opposite;
+ TQChar opposite;
switch( bracket ) {
case '{': opposite = '}'; break;
@@ -4247,7 +4247,7 @@ bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& e
continue;
/* Check for match */
- QChar c = textLine->getChar( end.col() );
+ TQChar c = textLine->getChar( end.col() );
if( c == bracket ) {
count++;
} else if( c == opposite ) {
@@ -4266,7 +4266,7 @@ void KateDocument::guiActivateEvent( KParts::GUIActivateEvent *ev )
emit selectionChanged();
}
-void KateDocument::setDocName (QString name )
+void KateDocument::setDocName (TQString name )
{
if ( name == m_docName )
return;
@@ -4300,7 +4300,7 @@ void KateDocument::setDocName (QString name )
m_docName = i18n ("Untitled");
if (m_docNameNumber > 0)
- m_docName = QString(m_docName + " (%1)").arg(m_docNameNumber+1);
+ m_docName = TQString(m_docName + " (%1)").arg(m_docNameNumber+1);
updateFileType (KateFactory::self()->fileTypeManager()->fileType (this));
emit nameChanged ((Kate::Document *) this);
@@ -4328,7 +4328,7 @@ void KateDocument::slotModifiedOnDisk( Kate::View * /*v*/ )
{
m_modOnHd = false;
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(config()->encoding(),
- url().url(),QString::null,widget(),i18n("Save File"));
+ url().url(),TQString::null,widget(),i18n("Save File"));
kdDebug(13020)<<"got "<<res.URLs.count()<<" URLs"<<endl;
if( ! res.URLs.isEmpty() && ! res.URLs.first().isEmpty() && checkOverwrite( res.URLs.first() ) )
@@ -4388,7 +4388,7 @@ void KateDocument::setModifiedOnDisk( int reason )
class KateDocumentTmpMark
{
public:
- QString line;
+ TQString line;
KTextEditor::Mark mark;
};
@@ -4415,9 +4415,9 @@ void KateDocument::reloadFile()
}
}
- QValueList<KateDocumentTmpMark> tmp;
+ TQValueList<KateDocumentTmpMark> tmp;
- for( QIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
+ for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
{
KateDocumentTmpMark m;
@@ -4434,7 +4434,7 @@ void KateDocument::reloadFile()
m_reloading = true;
- QValueList<int> lines, cols;
+ TQValueList<int> lines, cols;
for ( uint i=0; i < m_views.count(); i++ )
{
lines.append( m_views.at( i )->cursorLine() );
@@ -4448,7 +4448,7 @@ void KateDocument::reloadFile()
m_reloading = false;
- for ( QValueList<int>::size_type z=0; z < tmp.size(); z++ )
+ for ( TQValueList<int>::size_type z=0; z < tmp.size(); z++ )
{
if (z < numLines())
{
@@ -4533,12 +4533,12 @@ KateCodeFoldingTree *KateDocument::foldingTree ()
return m_buffer->foldingTree();
}
-void KateDocument::setEncoding (const QString &e)
+void KateDocument::setEncoding (const TQString &e)
{
if ( m_encodingSticky )
return;
- QString ce = m_config->encoding().lower();
+ TQString ce = m_config->encoding().lower();
if ( e.lower() == ce )
return;
@@ -4547,7 +4547,7 @@ void KateDocument::setEncoding (const QString &e)
reloadFile();
}
-QString KateDocument::encoding() const
+TQString KateDocument::encoding() const
{
return m_config->encoding();
}
@@ -4590,10 +4590,10 @@ void KateDocument::updateConfig ()
add interface for plugins/apps to set/get variables
add view stuff
*/
-QRegExp KateDocument::kvLine = QRegExp("kate:(.*)");
-QRegExp KateDocument::kvLineWildcard = QRegExp("kate-wildcard\\((.*)\\):(.*)");
-QRegExp KateDocument::kvLineMime = QRegExp("kate-mimetype\\((.*)\\):(.*)");
-QRegExp KateDocument::kvVar = QRegExp("([\\w\\-]+)\\s+([^;]+)");
+TQRegExp KateDocument::kvLine = TQRegExp("kate:(.*)");
+TQRegExp KateDocument::kvLineWildcard = TQRegExp("kate-wildcard\\((.*)\\):(.*)");
+TQRegExp KateDocument::kvLineMime = TQRegExp("kate-mimetype\\((.*)\\):(.*)");
+TQRegExp KateDocument::kvVar = TQRegExp("([\\w\\-]+)\\s+([^;]+)");
void KateDocument::readVariables(bool onlyViewAndRenderer)
{
@@ -4630,7 +4630,7 @@ void KateDocument::readVariables(bool onlyViewAndRenderer)
}
}
-void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
+void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
{
// simple check first, no regex
// no kate inside, no vars, simple...
@@ -4638,7 +4638,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
return;
// found vars, if any
- QString s;
+ TQString s;
if ( kvLine.search( t ) > -1 )
{
@@ -4648,13 +4648,13 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
else if (kvLineWildcard.search( t ) > -1) // regex given
{
- QStringList wildcards (QStringList::split(';', kvLineWildcard.cap(1)));
- QString nameOfFile = url().fileName();
+ TQStringList wildcards (TQStringList::split(';', kvLineWildcard.cap(1)));
+ TQString nameOfFile = url().fileName();
bool found = false;
- for (QStringList::size_type i = 0; !found && i < wildcards.size(); ++i)
+ for (TQStringList::size_type i = 0; !found && i < wildcards.size(); ++i)
{
- QRegExp wildcard (wildcards[i], true/*Qt::CaseSensitive*/, true/*QRegExp::Wildcard*/);
+ TQRegExp wildcard (wildcards[i], true/*Qt::CaseSensitive*/, true/*TQRegExp::Wildcard*/);
found = wildcard.exactMatch (nameOfFile);
}
@@ -4669,7 +4669,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
else if (kvLineMime.search( t ) > -1) // mime-type given
{
- QStringList types (QStringList::split(';', kvLineMime.cap(1)));
+ TQStringList types (TQStringList::split(';', kvLineMime.cap(1)));
// no matching type found
if (!types.contains (mimeType ()))
@@ -4684,7 +4684,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
return;
}
- QStringList vvl; // view variable names
+ TQStringList vvl; // view variable names
vvl << "dynamic-word-wrap" << "dynamic-word-wrap-indicators"
<< "line-numbers" << "icon-border" << "folding-markers"
<< "bookmark-sorting" << "auto-center-lines"
@@ -4696,7 +4696,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
<< "font" << "font-size" << "scheme";
int p( 0 );
- QString var, val;
+ TQString var, val;
while ( (p = kvVar.search( s, p )) > -1 )
{
p += kvVar.matchedLength();
@@ -4771,7 +4771,7 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
// STRING SETTINGS
else if ( var == "eol" || var == "end-of-line" )
{
- QStringList l;
+ TQStringList l;
l << "unix" << "dos" << "mac";
if ( (n = l.findIndex( val.lower() )) != -1 )
m_config->setEol( n );
@@ -4802,12 +4802,12 @@ void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer )
}
}
-void KateDocument::setViewVariable( QString var, QString val )
+void KateDocument::setViewVariable( TQString var, TQString val )
{
KateView *v;
bool state;
int n;
- QColor c;
+ TQColor c;
for (v = m_views.first(); v != 0L; v= m_views.next() )
{
if ( var == "dynamic-word-wrap" && checkBoolValue( val, &state ) )
@@ -4838,12 +4838,12 @@ void KateDocument::setViewVariable( QString var, QString val )
v->renderer()->config()->setWordWrapMarkerColor( c );
else if ( var == "font" || ( var == "font-size" && checkIntValue( val, &n ) ) )
{
- QFont _f( *v->renderer()->config()->font( ) );
+ TQFont _f( *v->renderer()->config()->font( ) );
if ( var == "font" )
{
_f.setFamily( val );
- _f.setFixedPitch( QFont( val ).fixedPitch() );
+ _f.setFixedPitch( TQFont( val ).fixedPitch() );
}
else
_f.setPointSize( n );
@@ -4857,10 +4857,10 @@ void KateDocument::setViewVariable( QString var, QString val )
}
}
-bool KateDocument::checkBoolValue( QString val, bool *result )
+bool KateDocument::checkBoolValue( TQString val, bool *result )
{
val = val.stripWhiteSpace().lower();
- QStringList l;
+ TQStringList l;
l << "1" << "on" << "true";
if ( l.contains( val ) )
{
@@ -4877,21 +4877,21 @@ bool KateDocument::checkBoolValue( QString val, bool *result )
return false;
}
-bool KateDocument::checkIntValue( QString val, int *result )
+bool KateDocument::checkIntValue( TQString val, int *result )
{
bool ret( false );
*result = val.toInt( &ret );
return ret;
}
-bool KateDocument::checkColorValue( QString val, QColor &c )
+bool KateDocument::checkColorValue( TQString val, TQColor &c )
{
c.setNamedColor( val );
return c.isValid();
}
// KTextEditor::variable
-QString KateDocument::variable( const QString &name ) const
+TQString KateDocument::variable( const TQString &name ) const
{
if ( m_storedVariables.contains( name ) )
return m_storedVariables[ name ];
@@ -4901,14 +4901,14 @@ QString KateDocument::variable( const QString &name ) const
//END
-void KateDocument::slotModOnHdDirty (const QString &path)
+void KateDocument::slotModOnHdDirty (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 1))
{
// compare md5 with the one we have (if we have one)
if ( ! m_digest.isEmpty() )
{
- QCString tmp;
+ TQCString tmp;
if ( createDigest( tmp ) && tmp == m_digest )
return;
}
@@ -4924,7 +4924,7 @@ void KateDocument::slotModOnHdDirty (const QString &path)
}
}
-void KateDocument::slotModOnHdCreated (const QString &path)
+void KateDocument::slotModOnHdCreated (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 2))
{
@@ -4939,7 +4939,7 @@ void KateDocument::slotModOnHdCreated (const QString &path)
}
}
-void KateDocument::slotModOnHdDeleted (const QString &path)
+void KateDocument::slotModOnHdDeleted (const TQString &path)
{
if ((path == m_dirWatchFile) && (!m_modOnHd || m_modOnHdReason != 3))
{
@@ -4954,13 +4954,13 @@ void KateDocument::slotModOnHdDeleted (const QString &path)
}
}
-bool KateDocument::createDigest( QCString &result )
+bool KateDocument::createDigest( TQCString &result )
{
bool ret = false;
result = "";
if ( url().isLocalFile() )
{
- QFile f ( url().path() );
+ TQFile f ( url().path() );
if ( f.open( IO_ReadOnly) )
{
KMD5 md5;
@@ -4973,7 +4973,7 @@ bool KateDocument::createDigest( QCString &result )
return ret;
}
-QString KateDocument::reasonedMOHString() const
+TQString KateDocument::reasonedMOHString() const
{
switch( m_modOnHdReason )
{
@@ -4987,7 +4987,7 @@ QString KateDocument::reasonedMOHString() const
return i18n("The file '%1' was deleted by another program.").arg( url().prettyURL() );
break;
default:
- return QString();
+ return TQString();
}
}
@@ -5061,7 +5061,7 @@ void KateDocument::slotQueryClose_save(bool *handled, bool* abortClosing) {
if (m_url.isEmpty())
{
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(config()->encoding(),
- QString::null,QString::null,0,i18n("Save File"));
+ TQString::null,TQString::null,0,i18n("Save File"));
if( res.URLs.isEmpty() || !checkOverwrite( res.URLs.first() ) ) {
*abortClosing=true;
@@ -5084,7 +5084,7 @@ bool KateDocument::checkOverwrite( KURL u )
if( !u.isLocalFile() )
return true;
- QFileInfo info( u.path() );
+ TQFileInfo info( u.path() );
if( !info.exists() )
return true;
@@ -5095,20 +5095,20 @@ bool KateDocument::checkOverwrite( KURL u )
i18n( "&Overwrite" ) );
}
-void KateDocument::setDefaultEncoding (const QString &encoding)
+void KateDocument::setDefaultEncoding (const TQString &encoding)
{
s_defaultEncoding = encoding;
}
//BEGIN KTextEditor::TemplateInterface
-bool KateDocument::insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *) {
+bool KateDocument::insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *) {
return (new KateTemplateHandler(this,line,column,templateString,initialValues))->initOk();
}
void KateDocument::testTemplateCode() {
int col=activeView()->cursorColumn();
int line=activeView()->cursorLine();
- insertTemplateText(line,col,"for ${index} \\${NOPLACEHOLDER} ${index} ${blah} ${fullname} \\$${Placeholder} \\${${PLACEHOLDER2}}\n next line:${ANOTHERPLACEHOLDER} $${DOLLARBEFOREPLACEHOLDER} {NOTHING} {\n${cursor}\n}",QMap<QString,QString>());
+ insertTemplateText(line,col,"for ${index} \\${NOPLACEHOLDER} ${index} ${blah} ${fullname} \\$${Placeholder} \\${${PLACEHOLDER2}}\n next line:${ANOTHERPLACEHOLDER} $${DOLLARBEFOREPLACEHOLDER} {NOTHING} {\n${cursor}\n}",TQMap<TQString,TQString>());
}
bool KateDocument::invokeTabInterceptor(KKey key) {
@@ -5139,8 +5139,8 @@ bool KateDocument::removeTabInterceptor(KateKeyInterceptorFunctor *interceptor)
bool KateDocument::hasSelection () const
{ if (m_activeView) return m_activeView->hasSelection (); return false; }
- QString KateDocument::selection () const
- { if (m_activeView) return m_activeView->selection (); return QString(""); }
+ TQString KateDocument::selection () const
+ { if (m_activeView) return m_activeView->selection (); return TQString(""); }
bool KateDocument::removeSelectedText ()
{ if (m_activeView) return m_activeView->removeSelectedText (); return false; }
diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h
index c1c5ab169..2868203de 100644
--- a/kate/part/katedocument.h
+++ b/kate/part/katedocument.h
@@ -40,9 +40,9 @@
#include <kmimetype.h>
#include <klocale.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qdatetime.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
namespace KTextEditor { class Plugin; }
@@ -91,7 +91,7 @@ class KateDocument : public Kate::Document,
public:
KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
- QWidget *parentWidget = 0, const char *widgetName = 0, QObject * = 0, const char * = 0);
+ TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
~KateDocument ();
bool closeURL();
@@ -115,7 +115,7 @@ class KateDocument : public Kate::Document,
void disablePluginGUI (KTextEditor::Plugin *plugin);
private:
- QMemArray<KTextEditor::Plugin *> m_plugins;
+ TQMemArray<KTextEditor::Plugin *> m_plugins;
public:
bool readOnly () const { return m_bReadOnly; }
@@ -134,14 +134,14 @@ class KateDocument : public Kate::Document,
// KTextEditor::Document stuff
//
public:
- KTextEditor::View *createView( QWidget *parent, const char *name );
- QPtrList<KTextEditor::View> views () const;
+ KTextEditor::View *createView( TQWidget *parent, const char *name );
+ TQPtrList<KTextEditor::View> views () const;
inline KateView *activeView () const { return m_activeView; }
private:
- QPtrList<KateView> m_views;
- QPtrList<KTextEditor::View> m_textEditViews;
+ TQPtrList<KateView> m_views;
+ TQPtrList<KTextEditor::View> m_textEditViews;
KateView *m_activeView;
/**
@@ -160,32 +160,32 @@ class KateDocument : public Kate::Document,
//
public slots:
uint configPages () const;
- KTextEditor::ConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name=0 );
- QString configPageName (uint number = 0) const;
- QString configPageFullName (uint number = 0) const;
- QPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const;
+ KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
+ TQString configPageName (uint number = 0) const;
+ TQString configPageFullName (uint number = 0) const;
+ TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const;
//
// KTextEditor::EditInterface stuff
//
public slots:
- QString text() const;
+ TQString text() const;
- QString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const;
- QString text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise ) const;
+ TQString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const;
+ TQString text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise ) const;
- QString textLine ( uint line ) const;
+ TQString textLine ( uint line ) const;
- bool setText(const QString &);
+ bool setText(const TQString &);
bool clear ();
- bool insertText ( uint line, uint col, const QString &s );
- bool insertText ( uint line, uint col, const QString &s, bool blockwise );
+ bool insertText ( uint line, uint col, const TQString &s );
+ bool insertText ( uint line, uint col, const TQString &s, bool blockwise );
bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol );
bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise );
- bool insertLine ( uint line, const QString &s );
+ bool insertLine ( uint line, const TQString &s );
bool removeLine ( uint line );
uint numLines() const;
@@ -195,8 +195,8 @@ class KateDocument : public Kate::Document,
signals:
void textChanged ();
- void charactersInteractivelyInserted(int ,int ,const QString&);
- void charactersSemiInteractivelyInserted(int ,int ,const QString&);
+ void charactersInteractivelyInserted(int ,int ,const TQString&);
+ void charactersSemiInteractivelyInserted(int ,int ,const TQString&);
void backspacePressed();
public:
@@ -228,7 +228,7 @@ class KateDocument : public Kate::Document,
* @param s string to be inserted
* @return true on success
*/
- bool editInsertText ( uint line, uint col, const QString &s );
+ bool editInsertText ( uint line, uint col, const TQString &s );
/**
* Remove a string in the given line/column
* @param line line number
@@ -275,7 +275,7 @@ class KateDocument : public Kate::Document,
* @param s string to insert
* @return true on success
*/
- bool editInsertLine ( uint line, const QString &s );
+ bool editInsertLine ( uint line, const TQString &s );
/**
* Remove a line
* @param line line number
@@ -333,7 +333,7 @@ class KateDocument : public Kate::Document,
void undoCancel();
private:
- void editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ void editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
uint editSessionNumber;
bool editIsRunning;
@@ -360,16 +360,16 @@ class KateDocument : public Kate::Document,
friend class KateTemplateHandler;
private:
- QPtrList<KateSuperCursor> m_superCursors;
+ TQPtrList<KateSuperCursor> m_superCursors;
//
// some internals for undo/redo
//
- QPtrList<KateUndoGroup> undoItems;
- QPtrList<KateUndoGroup> redoItems;
+ TQPtrList<KateUndoGroup> undoItems;
+ TQPtrList<KateUndoGroup> redoItems;
bool m_undoDontMerge; //create a setter later on and remove the friend declaration
bool m_undoIgnoreCancel;
- QTimer* m_undoMergeTimer;
+ TQTimer* m_undoMergeTimer;
// these two variables are for resetting the document to
// non-modified if all changes have been undone...
KateUndoGroup* lastUndoGroupWhenSaved;
@@ -389,20 +389,20 @@ class KateDocument : public Kate::Document,
//
public slots:
KTextEditor::Cursor *createCursor ();
- QPtrList<KTextEditor::Cursor> cursors () const;
+ TQPtrList<KTextEditor::Cursor> cursors () const;
private:
- QPtrList<KTextEditor::Cursor> myCursors;
+ TQPtrList<KTextEditor::Cursor> myCursors;
//
// KTextEditor::SearchInterface stuff
//
public slots:
bool searchText (unsigned int startLine, unsigned int startCol,
- const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol,
+ const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol,
unsigned int *matchLen, bool casesensitive = true, bool backwards = false);
bool searchText (unsigned int startLine, unsigned int startCol,
- const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol,
+ const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol,
unsigned int *matchLen, bool backwards = false);
//
@@ -412,8 +412,8 @@ class KateDocument : public Kate::Document,
uint hlMode ();
bool setHlMode (uint mode);
uint hlModeCount ();
- QString hlModeName (uint mode);
- QString hlModeSectionName (uint mode);
+ TQString hlModeName (uint mode);
+ TQString hlModeSectionName (uint mode);
public:
void bufferHlChanged ();
@@ -457,14 +457,14 @@ class KateDocument : public Kate::Document,
void addMark( uint line, uint markType );
void removeMark( uint line, uint markType );
- QPtrList<KTextEditor::Mark> marks();
+ TQPtrList<KTextEditor::Mark> marks();
void clearMarks();
- void setPixmap( MarkInterface::MarkTypes, const QPixmap& );
- void setDescription( MarkInterface::MarkTypes, const QString& );
- QString markDescription( MarkInterface::MarkTypes );
- QPixmap *markPixmap( MarkInterface::MarkTypes );
- QColor markColor( MarkInterface::MarkTypes );
+ void setPixmap( MarkInterface::MarkTypes, const TQPixmap& );
+ void setDescription( MarkInterface::MarkTypes, const TQString& );
+ TQString markDescription( MarkInterface::MarkTypes );
+ TQPixmap *markPixmap( MarkInterface::MarkTypes );
+ TQColor markColor( MarkInterface::MarkTypes );
void setMarksUserChangable( uint markMask );
uint editableMarks();
@@ -474,9 +474,9 @@ class KateDocument : public Kate::Document,
void markChanged( KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction );
private:
- QIntDict<KTextEditor::Mark> m_marks;
- QIntDict<QPixmap> m_markPixmaps;
- QIntDict<QString> m_markDescriptions;
+ TQIntDict<KTextEditor::Mark> m_marks;
+ TQIntDict<TQPixmap> m_markPixmaps;
+ TQIntDict<TQString> m_markDescriptions;
uint m_editableMarks;
//
@@ -499,7 +499,7 @@ class KateDocument : public Kate::Document,
*
* @since Kate 2.3
*/
- QString mimeType();
+ TQString mimeType();
/**
* @return the calculated size in bytes that the document would have when saved to
@@ -517,7 +517,7 @@ class KateDocument : public Kate::Document,
* @since Kate 2.3
* @todo implement this (it returns "UNKNOWN")
*/
- QString niceFileSize();
+ TQString niceFileSize();
/**
* @return a pointer to the KMimeType for this document, found by analyzing the
@@ -533,13 +533,13 @@ class KateDocument : public Kate::Document,
// KTextEditor::VariableInterface
//
public:
- QString variable( const QString &name ) const;
+ TQString variable( const TQString &name ) const;
signals:
- void variableChanged( const QString &, const QString & );
+ void variableChanged( const TQString &, const TQString & );
private:
- QMap<QString, QString> m_storedVariables;
+ TQMap<TQString, TQString> m_storedVariables;
//
// KParts::ReadWrite stuff
@@ -565,7 +565,7 @@ class KateDocument : public Kate::Document,
void setModified( bool m );
private slots:
- void slotDataKate ( KIO::Job* kio_job, const QByteArray &data );
+ void slotDataKate ( KIO::Job* kio_job, const TQByteArray &data );
void slotFinishedKate ( KIO::Job * job );
private:
@@ -574,30 +574,30 @@ class KateDocument : public Kate::Document,
void activateDirWatch ();
void deactivateDirWatch ();
- QString m_dirWatchFile;
+ TQString m_dirWatchFile;
//
// Kate::Document stuff, this is all deprecated!!!!!!!!!!
//
public:
- Kate::ConfigPage *colorConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *fontConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *indentConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *selectConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *editConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *keysConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *hlConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *viewDefaultsConfigPage (QWidget *) { return 0; }
- Kate::ConfigPage *saveConfigPage( QWidget * ) { return 0; }
-
- Kate::ActionMenu *hlActionMenu (const QString& /* text */, QObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
- Kate::ActionMenu *exportActionMenu (const QString& /* text */, QObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
+ Kate::ConfigPage *colorConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *fontConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *indentConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *selectConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *editConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *keysConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *hlConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *viewDefaultsConfigPage (TQWidget *) { return 0; }
+ Kate::ConfigPage *saveConfigPage( TQWidget * ) { return 0; }
+
+ Kate::ActionMenu *hlActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
+ Kate::ActionMenu *exportActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
public:
/**
* Type chars in a view
*/
- bool typeChars ( KateView *type, const QString &chars );
+ bool typeChars ( KateView *type, const TQString &chars );
/**
* gets the last line number (numLines() -1)
@@ -620,7 +620,7 @@ class KateDocument : public Kate::Document,
//export feature, obsolute
public slots:
- void exportAs(const QString&) { };
+ void exportAs(const TQString&) { };
signals:
void modifiedChanged ();
@@ -673,8 +673,8 @@ class KateDocument : public Kate::Document,
void optimizeLeadingSpace( uint line, int flags, int change );
void replaceWithOptimizedSpace( uint line, uint upto_column, uint space, int flags );
- bool removeStringFromBegining(int line, QString &str);
- bool removeStringFromEnd(int line, QString &str);
+ bool removeStringFromBegining(int line, TQString &str);
+ bool removeStringFromEnd(int line, TQString &str);
/**
Find the position (line and col) of the next char
@@ -743,7 +743,7 @@ class KateDocument : public Kate::Document,
bool removeStartLineCommentFromSelection( KateView *view, int attrib=0 );
public:
- QString getWord( const KateTextCursor& cursor );
+ TQString getWord( const KateTextCursor& cursor );
public:
void tagAll();
@@ -756,9 +756,9 @@ class KateDocument : public Kate::Document,
public:
- QString docName () {return m_docName;};
+ TQString docName () {return m_docName;};
- void setDocName (QString docName);
+ void setDocName (TQString docName);
void lineInfo (KateLineInfo *info, unsigned int line);
@@ -796,8 +796,8 @@ class KateDocument : public Kate::Document,
// -1: ignore once, 0: false, 1: true
public slots:
- void setEncoding (const QString &e);
- QString encoding() const;
+ void setEncoding (const TQString &e);
+ TQString encoding() const;
public slots:
void setWordWrap (bool on);
@@ -861,9 +861,9 @@ class KateDocument : public Kate::Document,
void textRemoved();
private slots:
- void slotModOnHdDirty (const QString &path);
- void slotModOnHdCreated (const QString &path);
- void slotModOnHdDeleted (const QString &path);
+ void slotModOnHdDirty (const TQString &path);
+ void slotModOnHdCreated (const TQString &path);
+ void slotModOnHdDeleted (const TQString &path);
private:
/**
@@ -875,14 +875,14 @@ class KateDocument : public Kate::Document,
*
* @since 3.3
*/
- bool createDigest ( QCString &result );
+ bool createDigest ( TQCString &result );
/**
* create a string for the modonhd warnings, giving the reason.
*
* @since 3.3
*/
- QString reasonedMOHString() const;
+ TQString reasonedMOHString() const;
/**
* Removes all trailing whitespace form @p line, if
@@ -914,9 +914,9 @@ class KateDocument : public Kate::Document,
bool m_modOnHd;
unsigned char m_modOnHdReason;
- QCString m_digest; // MD5 digest, updated on load/save
+ TQCString m_digest; // MD5 digest, updated on load/save
- QString m_docName;
+ TQString m_docName;
int m_docNameNumber;
// file type !!!
@@ -938,7 +938,7 @@ class KateDocument : public Kate::Document,
static bool checkOverwrite( KURL u );
- static void setDefaultEncoding (const QString &encoding);
+ static void setDefaultEncoding (const TQString &encoding);
void setEncodingSticky( bool e ) { m_encodingSticky = e; }
@@ -973,36 +973,36 @@ class KateDocument : public Kate::Document,
Reads and applies the variables in a single line
TODO registered variables gets saved in a [map]
*/
- void readVariableLine( QString t, bool onlyViewAndRenderer = false );
+ void readVariableLine( TQString t, bool onlyViewAndRenderer = false );
/**
Sets a view variable in all the views.
*/
- void setViewVariable( QString var, QString val );
+ void setViewVariable( TQString var, TQString val );
/**
@return weather a string value could be converted
to a bool value as supported.
The value is put in *result.
*/
- static bool checkBoolValue( QString value, bool *result );
+ static bool checkBoolValue( TQString value, bool *result );
/**
@return weather a string value could be converted
to a integer value.
The value is put in *result.
*/
- static bool checkIntValue( QString value, int *result );
+ static bool checkIntValue( TQString value, int *result );
/**
- Feeds value into @p col using QColor::setNamedColor() and returns
+ Feeds value into @p col using TQColor::setNamedColor() and returns
wheather the color is valid
*/
- static bool checkColorValue( QString value, QColor &col );
+ static bool checkColorValue( TQString value, TQColor &col );
/**
* helper regex to capture the document variables
*/
- static QRegExp kvLine;
- static QRegExp kvLineWildcard;
- static QRegExp kvLineMime;
- static QRegExp kvVar;
+ static TQRegExp kvLine;
+ static TQRegExp kvLineWildcard;
+ static TQRegExp kvLineMime;
+ static TQRegExp kvVar;
KIO::TransferJob *m_job;
KTempFile *m_tempFile;
@@ -1014,7 +1014,7 @@ class KateDocument : public Kate::Document,
bool invokeTabInterceptor(KKey);
protected:
- virtual bool insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0 );
+ virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 );
KateKeyInterceptorFunctor *m_tabInterceptor;
protected slots:
@@ -1030,7 +1030,7 @@ class KateDocument : public Kate::Document,
bool setSelection ( uint startLine, uint startCol, uint endLine, uint endCol );
bool clearSelection ();
bool hasSelection () const;
- QString selection () const;
+ TQString selection () const;
bool removeSelectedText ();
bool selectAll();
diff --git a/kate/part/katedocumenthelpers.cpp b/kate/part/katedocumenthelpers.cpp
index 9055e7ec3..370be7684 100644
--- a/kate/part/katedocumenthelpers.cpp
+++ b/kate/part/katedocumenthelpers.cpp
@@ -31,8 +31,8 @@ KateBrowserExtension::KateBrowserExtension( KateDocument* doc )
: KParts::BrowserExtension( doc, "katepartbrowserextension" ),
m_doc (doc)
{
- connect( doc, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( doc, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
emit enableAction( "print", true );
}
diff --git a/kate/part/katedocumenthelpers.h b/kate/part/katedocumenthelpers.h
index 8346ffa18..75c6740d0 100644
--- a/kate/part/katedocumenthelpers.h
+++ b/kate/part/katedocumenthelpers.h
@@ -25,8 +25,8 @@
#include <kparts/browserextension.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KateDocument;
diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp
index a02d00fe7..64bde8718 100644
--- a/kate/part/katefactory.cpp
+++ b/kate/part/katefactory.cpp
@@ -38,7 +38,7 @@
#include <kdirwatch.h>
#include <kstaticdeleter.h>
-#include <qapplication.h>
+#include <tqapplication.h>
/**
* dummy wrapper factory to be sure nobody external deletes our katefactory
@@ -50,13 +50,13 @@ class KateFactoryPublic : public KParts::Factory
* reimplemented create object method
* @param parentWidget parent widget
* @param widgetName widget name
- * @param parent QObject parent
+ * @param parent TQObject parent
* @param name object name
* @param classname class name
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *classname, const QStringList &args )
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
return KateFactory::self()->createPartObject (parentWidget, widgetName, parent, name, classname, args);
}
@@ -157,7 +157,7 @@ KateFactory::KateFactory ()
m_cmds.push_back (new KateCommands::Date ());
m_cmds.push_back (new SearchCommand());
- for ( QValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
+ for ( TQValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
KateCmd::self()->registerCommand (*it);
}
@@ -186,7 +186,7 @@ KateFactory::~KateFactory()
delete m_vm;
- for ( QValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
+ for ( TQValueList<Kate::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
delete *it;
// cu manager
@@ -206,9 +206,9 @@ KateFactory *KateFactory::self ()
return s_self;
}
-KParts::Part *KateFactory::createPartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *_classname, const QStringList & )
+KParts::Part *KateFactory::createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *_classname, const TQStringList & )
{
- QCString classname( _classname );
+ TQCString classname( _classname );
bool bWantSingleView = ( classname != "KTextEditor::Document" && classname != "Kate::Document" );
bool bWantBrowserView = ( classname == "Browser/View" );
bool bWantReadOnly = (bWantBrowserView || ( classname == "KParts::ReadOnlyPart" ));
@@ -262,7 +262,7 @@ KateJScript *KateFactory::jscript ()
}
-KateIndentScript KateFactory::indentScript (const QString &scriptname)
+KateIndentScript KateFactory::indentScript (const TQString &scriptname)
{
KateIndentScript result;
for(uint i=0;i<m_indentScriptManagers.count();i++)
diff --git a/kate/part/katefactory.h b/kate/part/katefactory.h
index 5e3986161..0fd939ce3 100644
--- a/kate/part/katefactory.h
+++ b/kate/part/katefactory.h
@@ -73,15 +73,15 @@ class KateFactory
* reimplemented create object method
* @param parentWidget parent widget
* @param widgetName widget name
- * @param parent QObject parent
+ * @param parent TQObject parent
* @param name object name
* @param classname class parent
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const char *classname,
- const QStringList &args );
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const char *classname,
+ const TQStringList &args );
/**
* public accessor to the instance
@@ -132,19 +132,19 @@ class KateFactory
* return a list of all registered docs
* @return all known documents
*/
- inline QPtrList<KateDocument> *documents () { return &m_documents; };
+ inline TQPtrList<KateDocument> *documents () { return &m_documents; };
/**
* return a list of all registered views
* @return all known views
*/
- inline QPtrList<KateView> *views () { return &m_views; };
+ inline TQPtrList<KateView> *views () { return &m_views; };
/**
* return a list of all registered renderers
* @return all known renderers
*/
- inline QPtrList<KateRenderer> *renderers () { return &m_renderers; };
+ inline TQPtrList<KateRenderer> *renderers () { return &m_renderers; };
/**
* on start detected plugins
@@ -210,7 +210,7 @@ class KateFactory
* looks up a script given by name. If there are more than
* one matching, the first found will be taken
*/
- KateIndentScript indentScript (const QString &scriptname);
+ KateIndentScript indentScript (const TQString &scriptname);
private:
/**
@@ -231,17 +231,17 @@ class KateFactory
/**
* registered docs
*/
- QPtrList<KateDocument> m_documents;
+ TQPtrList<KateDocument> m_documents;
/**
* registered views
*/
- QPtrList<KateView> m_views;
+ TQPtrList<KateView> m_views;
/**
* registered renderers
*/
- QPtrList<KateRenderer> m_renderers;
+ TQPtrList<KateRenderer> m_renderers;
/**
* global dirwatch object
@@ -286,7 +286,7 @@ class KateFactory
/**
* internal commands
*/
- QValueList<Kate::Command *> m_cmds;
+ TQValueList<Kate::Command *> m_cmds;
/**
* js interpreter
@@ -303,7 +303,7 @@ class KateFactory
/**
* manager for js based indenters
*/
- QPtrList<KateIndentScriptManagerAbstract> m_indentScriptManagers;
+ TQPtrList<KateIndentScriptManagerAbstract> m_indentScriptManagers;
};
diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp
index ea3a487cb..11d5e9a46 100644
--- a/kate/part/katefiletype.cpp
+++ b/kate/part/katefiletype.cpp
@@ -35,22 +35,22 @@
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
#define KATE_FT_HOWMANY 1024
//END Includes
@@ -74,7 +74,7 @@ void KateFileTypeManager::update ()
{
KConfig config ("katefiletyperc", false, false);
- QStringList g (config.groupList());
+ TQStringList g (config.groupList());
g.sort ();
m_types.clear ();
@@ -99,11 +99,11 @@ void KateFileTypeManager::update ()
//
// save the given list to config file + update
//
-void KateFileTypeManager::save (QPtrList<KateFileType> *v)
+void KateFileTypeManager::save (TQPtrList<KateFileType> *v)
{
KConfig config ("katefiletyperc", false, false);
- QStringList newg;
+ TQStringList newg;
for (uint z=0; z < v->count(); z++)
{
config.setGroup (v->at(z)->name);
@@ -113,8 +113,8 @@ void KateFileTypeManager::save (QPtrList<KateFileType> *v)
config.writeEntry ("Mimetypes", v->at(z)->mimetypes, ';');
config.writeEntry ("Priority", v->at(z)->priority);
- QString varLine = v->at(z)->varLine;
- if (QRegExp("kate:(.*)").search(varLine) < 0)
+ TQString varLine = v->at(z)->varLine;
+ if (TQRegExp("kate:(.*)").search(varLine) < 0)
varLine.prepend ("kate: ");
config.writeEntry ("Variables", varLine);
@@ -122,7 +122,7 @@ void KateFileTypeManager::save (QPtrList<KateFileType> *v)
newg << v->at(z)->name;
}
- QStringList g (config.groupList());
+ TQStringList g (config.groupList());
for (uint z=0; z < g.count(); z++)
{
@@ -144,7 +144,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
if (m_types.isEmpty())
return -1;
- QString fileName = doc->url().prettyURL();
+ TQString fileName = doc->url().prettyURL();
int length = doc->url().prettyURL().length();
int result;
@@ -152,18 +152,18 @@ int KateFileTypeManager::fileType (KateDocument *doc)
// Try wildcards
if ( ! fileName.isEmpty() )
{
- static QStringList commonSuffixes = QStringList::split (";", ".orig;.new;~;.bak;.BAK");
+ static TQStringList commonSuffixes = TQStringList::split (";", ".orig;.new;~;.bak;.BAK");
if ((result = wildcardsFind(fileName)) != -1)
return result;
- QString backupSuffix = KateDocumentConfig::global()->backupSuffix();
+ TQString backupSuffix = KateDocumentConfig::global()->backupSuffix();
if (fileName.endsWith(backupSuffix)) {
if ((result = wildcardsFind(fileName.left(length - backupSuffix.length()))) != -1)
return result;
}
- for (QStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
+ for (TQStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
if (*it != backupSuffix && fileName.endsWith(*it)) {
if ((result = wildcardsFind(fileName.left(length - (*it).length()))) != -1)
return result;
@@ -183,7 +183,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
// Try content-based mimetype
KMimeType::Ptr mt = doc->mimeTypeForContent();
- QPtrList<KateFileType> types;
+ TQPtrList<KateFileType> types;
for (uint z=0; z < m_types.count(); z++)
{
@@ -212,17 +212,17 @@ int KateFileTypeManager::fileType (KateDocument *doc)
return -1;
}
-int KateFileTypeManager::wildcardsFind (const QString &fileName)
+int KateFileTypeManager::wildcardsFind (const TQString &fileName)
{
- QPtrList<KateFileType> types;
+ TQPtrList<KateFileType> types;
for (uint z=0; z < m_types.count(); z++)
{
- for( QStringList::Iterator it = m_types.at(z)->wildcards.begin(); it != m_types.at(z)->wildcards.end(); ++it )
+ for( TQStringList::Iterator it = m_types.at(z)->wildcards.begin(); it != m_types.at(z)->wildcards.end(); ++it )
{
// anders: we need to be sure to match the end of string, as eg a css file
// would otherwise end up with the c hl
- QRegExp re(*it, true, true);
+ TQRegExp re(*it, true, true);
if ( ( re.search( fileName ) > -1 ) && ( re.matchedLength() == (int)fileName.length() ) )
types.append (m_types.at(z));
}
@@ -258,63 +258,63 @@ const KateFileType *KateFileTypeManager::fileType (uint number)
//END KateFileTypeManager
//BEGIN KateFileTypeConfigTab
-KateFileTypeConfigTab::KateFileTypeConfigTab( QWidget *parent )
+KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
: KateConfigPage( parent )
{
m_types.setAutoDelete (true);
m_lastType = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("&Filetype:"), hbHl );
- typeCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("&Filetype:"), hbHl );
+ typeCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( typeCombo );
- connect( typeCombo, SIGNAL(activated(int)),
- this, SLOT(typeChanged(int)) );
+ connect( typeCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(typeChanged(int)) );
- QPushButton *btnnew = new QPushButton( i18n("&New"), hbHl );
- connect( btnnew, SIGNAL(clicked()), this, SLOT(newType()) );
+ TQPushButton *btnnew = new TQPushButton( i18n("&New"), hbHl );
+ connect( btnnew, TQT_SIGNAL(clicked()), this, TQT_SLOT(newType()) );
- btndel = new QPushButton( i18n("&Delete"), hbHl );
- connect( btndel, SIGNAL(clicked()), this, SLOT(deleteType()) );
+ btndel = new TQPushButton( i18n("&Delete"), hbHl );
+ connect( btndel, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteType()) );
- gbProps = new QGroupBox( 2, Qt::Horizontal, i18n("Properties"), this );
+ gbProps = new TQGroupBox( 2, Qt::Horizontal, i18n("Properties"), this );
layout->add (gbProps);
// file & mime types
- QLabel *lname = new QLabel( i18n("N&ame:"), gbProps );
- name = new QLineEdit( gbProps );
+ TQLabel *lname = new TQLabel( i18n("N&ame:"), gbProps );
+ name = new TQLineEdit( gbProps );
lname->setBuddy( name );
// file & mime types
- QLabel *lsec = new QLabel( i18n("&Section:"), gbProps );
- section = new QLineEdit( gbProps );
+ TQLabel *lsec = new TQLabel( i18n("&Section:"), gbProps );
+ section = new TQLineEdit( gbProps );
lsec->setBuddy( section );
// file & mime types
- QLabel *lvar = new QLabel( i18n("&Variables:"), gbProps );
- varLine = new QLineEdit( gbProps );
+ TQLabel *lvar = new TQLabel( i18n("&Variables:"), gbProps );
+ varLine = new TQLineEdit( gbProps );
lvar->setBuddy( varLine );
// file & mime types
- QLabel *lFileExts = new QLabel( i18n("File e&xtensions:"), gbProps );
- wildcards = new QLineEdit( gbProps );
+ TQLabel *lFileExts = new TQLabel( i18n("File e&xtensions:"), gbProps );
+ wildcards = new TQLineEdit( gbProps );
lFileExts->setBuddy( wildcards );
- QLabel *lMimeTypes = new QLabel( i18n("MIME &types:"), gbProps);
- QHBox *hbMT = new QHBox (gbProps);
- mimetypes = new QLineEdit( hbMT );
+ TQLabel *lMimeTypes = new TQLabel( i18n("MIME &types:"), gbProps);
+ TQHBox *hbMT = new TQHBox (gbProps);
+ mimetypes = new TQLineEdit( hbMT );
lMimeTypes->setBuddy( mimetypes );
- QToolButton *btnMTW = new QToolButton(hbMT);
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
+ TQToolButton *btnMTW = new TQToolButton(hbMT);
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
- QLabel *lprio = new QLabel( i18n("Prio&rity:"), gbProps);
+ TQLabel *lprio = new TQLabel( i18n("Prio&rity:"), gbProps);
priority = new KIntNumInput( gbProps );
lprio->setBuddy( priority );
@@ -322,36 +322,36 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( QWidget *parent )
reload();
- connect( name, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( section, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( varLine, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( wildcards, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( mimetypes, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) );
- connect( priority, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( name, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( section, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( varLine, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( wildcards, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( mimetypes, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( priority, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
- QWhatsThis::add( btnnew, i18n("Create a new file type.") );
- QWhatsThis::add( btndel, i18n("Delete the current file type.") );
- QWhatsThis::add( name, i18n(
+ TQWhatsThis::add( btnnew, i18n("Create a new file type.") );
+ TQWhatsThis::add( btndel, i18n("Delete the current file type.") );
+ TQWhatsThis::add( name, i18n(
"The name of the filetype will be the text of the corresponding menu item.") );
- QWhatsThis::add( section, i18n(
+ TQWhatsThis::add( section, i18n(
"The section name is used to organize the file types in menus.") );
- QWhatsThis::add( varLine, i18n(
+ TQWhatsThis::add( varLine, i18n(
"<p>This string allows you to configure Kate's settings for the files "
"selected by this mimetype using Kate variables. You can set almost any "
"configuration option, such as highlight, indent-mode, encoding, etc.</p>"
"<p>For a full list of known variables, see the manual.</p>") );
- QWhatsThis::add( wildcards, i18n(
+ TQWhatsThis::add( wildcards, i18n(
"The wildcards mask allows you to select files by filename. A typical "
"mask uses an asterisk and the file extension, for example "
"<code>*.txt; *.text</code>. The string is a semicolon-separated list "
"of masks.") );
- QWhatsThis::add( mimetypes, i18n(
+ TQWhatsThis::add( mimetypes, i18n(
"The mime type mask allows you to select files by mimetype. The string is "
"a semicolon-separated list of mimetypes, for example "
"<code>text/plain; text/english</code>.") );
- QWhatsThis::add( btnMTW, i18n(
+ TQWhatsThis::add( btnMTW, i18n(
"Displays a wizard that helps you easily select mimetypes.") );
- QWhatsThis::add( priority, i18n(
+ TQWhatsThis::add( priority, i18n(
"Sets a priority for this file type. If more than one file type selects the same "
"file, the one with the highest priority will be used." ) );
}
@@ -399,7 +399,7 @@ void KateFileTypeConfigTab::update ()
for( uint i = 0; i < m_types.count(); i++) {
if (m_types.at(i)->section.length() > 0)
- typeCombo->insertItem(m_types.at(i)->section + QString ("/") + m_types.at(i)->name);
+ typeCombo->insertItem(m_types.at(i)->section + TQString ("/") + m_types.at(i)->name);
else
typeCombo->insertItem(m_types.at(i)->name);
}
@@ -424,7 +424,7 @@ void KateFileTypeConfigTab::deleteType ()
void KateFileTypeConfigTab::newType ()
{
- QString newN = i18n("New Filetype");
+ TQString newN = i18n("New Filetype");
for( uint i = 0; i < m_types.count(); i++) {
if (m_types.at(i)->name == newN)
@@ -451,8 +451,8 @@ void KateFileTypeConfigTab::save ()
m_lastType->name = name->text ();
m_lastType->section = section->text ();
m_lastType->varLine = varLine->text ();
- m_lastType->wildcards = QStringList::split (";", wildcards->text ());
- m_lastType->mimetypes = QStringList::split (";", mimetypes->text ());
+ m_lastType->wildcards = TQStringList::split (";", wildcards->text ());
+ m_lastType->mimetypes = TQStringList::split (";", mimetypes->text ());
m_lastType->priority = priority->value();
}
}
@@ -501,8 +501,8 @@ void KateFileTypeConfigTab::typeChanged (int type)
void KateFileTypeConfigTab::showMTDlg()
{
- QString text = i18n("Select the MimeTypes you want for this file type.\nPlease note that this will automatically edit the associated file extensions as well.");
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), mimetypes->text() );
+ TQString text = i18n("Select the MimeTypes you want for this file type.\nPlease note that this will automatically edit the associated file extensions as well.");
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), mimetypes->text() );
KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this );
if ( d.exec() == KDialogBase::Accepted ) {
// do some checking, warn user if mime types or patterns are removed.
@@ -519,9 +519,9 @@ void KateViewFileTypeAction::init()
m_doc = 0;
subMenus.setAutoDelete( true );
- popupMenu()->insertItem ( i18n("None"), this, SLOT(setType(int)), 0, 0);
+ popupMenu()->insertItem ( i18n("None"), this, TQT_SLOT(setType(int)), 0, 0);
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewFileTypeAction::updateMenu (Kate::Document *doc)
@@ -536,27 +536,27 @@ void KateViewFileTypeAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name;
- QString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section;
+ TQString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name;
+ TQString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section;
if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) )
{
if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
- QPopupMenu *menu = new QPopupMenu ();
+ TQPopupMenu *menu = new TQPopupMenu ();
subMenus.append(menu);
popupMenu()->insertItem (hlSection, menu);
}
int m = subMenusName.findIndex (hlSection);
names << hlName;
- subMenus.at(m)->insertItem ( hlName, this, SLOT(setType(int)), 0, z+1);
+ subMenus.at(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
}
else if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( hlName, this, SLOT(setType(int)), 0, z+1);
+ popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
}
}
diff --git a/kate/part/katefiletype.h b/kate/part/katefiletype.h
index cd343019c..7a927636b 100644
--- a/kate/part/katefiletype.h
+++ b/kate/part/katefiletype.h
@@ -19,10 +19,10 @@
#ifndef __kate_filetype_h__
#define __kate_filetype_h__
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qpopupmenu.h> // for QPtrList<QPopupMenu>, compile with gcc 3.4
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqpopupmenu.h> // for TQPtrList<TQPopupMenu>, compile with gcc 3.4
+#include <tqguardedptr.h>
#include "katedialogs.h"
@@ -32,12 +32,12 @@ class KateFileType
{
public:
int number;
- QString name;
- QString section;
- QStringList wildcards;
- QStringList mimetypes;
+ TQString name;
+ TQString section;
+ TQStringList wildcards;
+ TQStringList mimetypes;
int priority;
- QString varLine;
+ TQString varLine;
};
class KateFileTypeManager
@@ -51,7 +51,7 @@ class KateFileTypeManager
*/
void update ();
- void save (QPtrList<KateFileType> *v);
+ void save (TQPtrList<KateFileType> *v);
/**
* get the right fileType for the given document
@@ -67,13 +67,13 @@ class KateFileTypeManager
/**
* Don't modify
*/
- QPtrList<KateFileType> *list () { return &m_types; }
+ TQPtrList<KateFileType> *list () { return &m_types; }
private:
- int wildcardsFind (const QString &fileName);
+ int wildcardsFind (const TQString &fileName);
private:
- QPtrList<KateFileType> m_types;
+ TQPtrList<KateFileType> m_types;
};
class KateFileTypeConfigTab : public KateConfigPage
@@ -81,7 +81,7 @@ class KateFileTypeConfigTab : public KateConfigPage
Q_OBJECT
public:
- KateFileTypeConfigTab( QWidget *parent );
+ KateFileTypeConfigTab( TQWidget *parent );
public slots:
void apply();
@@ -98,17 +98,17 @@ class KateFileTypeConfigTab : public KateConfigPage
void save ();
private:
- class QGroupBox *gbProps;
- class QPushButton *btndel;
- class QComboBox *typeCombo;
- class QLineEdit *wildcards;
- class QLineEdit *mimetypes;
+ class TQGroupBox *gbProps;
+ class TQPushButton *btndel;
+ class TQComboBox *typeCombo;
+ class TQLineEdit *wildcards;
+ class TQLineEdit *mimetypes;
class KIntNumInput *priority;
- class QLineEdit *name;
- class QLineEdit *section;
- class QLineEdit *varLine;
+ class TQLineEdit *name;
+ class TQLineEdit *section;
+ class TQLineEdit *varLine;
- QPtrList<KateFileType> m_types;
+ TQPtrList<KateFileType> m_types;
KateFileType *m_lastType;
};
@@ -117,7 +117,7 @@ class KateViewFileTypeAction : public Kate::ActionMenu
Q_OBJECT
public:
- KateViewFileTypeAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewFileTypeAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: Kate::ActionMenu(text, parent, name) { init(); };
~KateViewFileTypeAction(){;};
@@ -127,10 +127,10 @@ class KateViewFileTypeAction : public Kate::ActionMenu
private:
void init();
- QGuardedPtr<KateDocument> m_doc;
- QStringList subMenusName;
- QStringList names;
- QPtrList<QPopupMenu> subMenus;
+ TQGuardedPtr<KateDocument> m_doc;
+ TQStringList subMenusName;
+ TQStringList names;
+ TQPtrList<TQPopupMenu> subMenus;
public slots:
void slotAboutToShow();
diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp
index efab0268c..361ce5cce 100644
--- a/kate/part/katefont.cpp
+++ b/kate/part/katefont.cpp
@@ -23,13 +23,13 @@
#include <kglobalsettings.h>
-#include <qfontinfo.h>
+#include <tqfontinfo.h>
//
// KateFontMetrics implementation
//
-KateFontMetrics::KateFontMetrics(const QFont& f) : QFontMetrics(f)
+KateFontMetrics::KateFontMetrics(const TQFont& f) : TQFontMetrics(f)
{
for (int i=0; i<256; i++) warray[i]=0;
}
@@ -49,7 +49,7 @@ short * KateFontMetrics::createRow (short *wa, uchar row)
return wa;
}
-int KateFontMetrics::width(QChar c)
+int KateFontMetrics::width(TQChar c)
{
uchar cell=c.cell();
uchar row=c.row();
@@ -58,7 +58,7 @@ int KateFontMetrics::width(QChar c)
if (!wa)
wa = createRow (wa, row);
- if (wa[cell]<0) wa[cell]=(short) QFontMetrics::width(c);
+ if (wa[cell]<0) wa[cell]=(short) TQFontMetrics::width(c);
return (int)wa[cell];
}
@@ -93,12 +93,12 @@ void KateFontStruct::updateFontData ()
fontHeight = maxAscent + maxDescent + 1;
fontAscent = maxAscent;
- m_fixedPitch = QFontInfo( myFont ).fixedPitch();
+ m_fixedPitch = TQFontInfo( myFont ).fixedPitch();
}
-void KateFontStruct::setFont (const QFont & font)
+void KateFontStruct::setFont (const TQFont & font)
{
- QFontMetrics testFM (font);
+ TQFontMetrics testFM (font);
// no valid font tried
if ((testFM.ascent() + testFM.descent() + 1) < 1)
@@ -106,13 +106,13 @@ void KateFontStruct::setFont (const QFont & font)
myFont = font;
- myFontBold = QFont (font);
+ myFontBold = TQFont (font);
myFontBold.setBold (true);
- myFontItalic = QFont (font);
+ myFontItalic = TQFont (font);
myFontItalic.setItalic (true);
- myFontBI = QFont (font);
+ myFontBI = TQFont (font);
myFontBI.setBold (true);
myFontBI.setItalic (true);
diff --git a/kate/part/katefont.h b/kate/part/katefont.h
index 02c2106c4..1ab3b3463 100644
--- a/kate/part/katefont.h
+++ b/kate/part/katefont.h
@@ -22,8 +22,8 @@
#ifndef __kate_font_h__
#define __kate_font_h__
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
//
// KateFontMetrics implementation
@@ -32,12 +32,12 @@
class KateFontMetrics : public QFontMetrics
{
public:
- KateFontMetrics(const QFont& f);
+ KateFontMetrics(const TQFont& f);
~KateFontMetrics();
- int width(QChar c);
+ int width(TQChar c);
- int width(QString s) { return QFontMetrics::width(s); }
+ int width(TQString s) { return TQFontMetrics::width(s); }
private:
short *createRow (short *wa, uchar row);
@@ -56,15 +56,15 @@ class KateFontStruct
KateFontStruct();
~KateFontStruct();
- void setFont(const QFont & font);
+ void setFont(const TQFont & font);
private:
void updateFontData ();
public:
- inline int width (const QString& text, int col, bool bold, bool italic, int tabWidth)
+ inline int width (const TQString& text, int col, bool bold, bool italic, int tabWidth)
{
- if (text[col] == QChar('\t'))
+ if (text[col] == TQChar('\t'))
return tabWidth * myFontMetrics.width(' ');
return (bold) ?
@@ -76,9 +76,9 @@ class KateFontStruct
myFontMetrics.charWidth(text, col) );
}
- inline int width (const QChar& c, bool bold, bool italic, int tabWidth)
+ inline int width (const TQChar& c, bool bold, bool italic, int tabWidth)
{
- if (c == QChar('\t'))
+ if (c == TQChar('\t'))
return tabWidth * myFontMetrics.width(' ');
return (bold) ?
@@ -90,7 +90,7 @@ class KateFontStruct
myFontMetrics.width(c) );
}
- inline const QFont& font(bool bold, bool italic) const
+ inline const TQFont& font(bool bold, bool italic) const
{
return (bold) ?
( (italic) ? myFontBI : myFontBold ) :
@@ -100,7 +100,7 @@ class KateFontStruct
inline bool fixedPitch() const { return m_fixedPitch; }
public:
- QFont myFont, myFontBold, myFontItalic, myFontBI;
+ TQFont myFont, myFontBold, myFontItalic, myFontBI;
KateFontMetrics myFontMetrics, myFontMetricsBold, myFontMetricsItalic, myFontMetricsBI;
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 84bfc67fd..655452184 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -46,8 +46,8 @@
#include <kstaticdeleter.h>
#include <kapplication.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
//END
//BEGIN defines
@@ -57,15 +57,15 @@
// min. x seconds between two dynamic contexts reset
static const int KATE_DYNAMIC_CONTEXTS_RESET_DELAY = 30 * 1000;
-// x is a QString. if x is "true" or "1" this expression returns "true"
-#define IS_TRUE(x) x.lower() == QString("true") || x.toInt() == 1
+// x is a TQString. if x is "true" or "1" this expression returns "true"
+#define IS_TRUE(x) x.lower() == TQString("true") || x.toInt() == 1
//END defines
//BEGIN Prviate HL classes
-inline bool kateInsideString (const QString &str, QChar ch)
+inline bool kateInsideString (const TQString &str, TQChar ch)
{
- const QChar *unicode = str.unicode();
+ const TQChar *unicode = str.unicode();
const uint len = str.length();
for (uint i=0; i < len; i++)
if (unicode[i] == ch)
@@ -84,16 +84,16 @@ class KateHlItem
// caller must keep in mind: LEN > 0 is a must !!!!!!!!!!!!!!!!!!!!!1
// Now, the function returns the offset detected, or 0 if no match is found.
// bool linestart isn't needed, this is equivalent to offset == 0.
- virtual int checkHgl(const QString& text, int offset, int len) = 0;
+ virtual int checkHgl(const TQString& text, int offset, int len) = 0;
virtual bool lineContinue(){return false;}
- virtual QStringList *capturedTexts() {return 0;}
- virtual KateHlItem *clone(const QStringList *) {return this;}
+ virtual TQStringList *capturedTexts() {return 0;}
+ virtual KateHlItem *clone(const TQStringList *) {return this;}
- static void dynamicSubstitute(QString& str, const QStringList *args);
+ static void dynamicSubstitute(TQString& str, const TQStringList *args);
- QMemArray<KateHlItem*> subItems;
+ TQMemArray<KateHlItem*> subItems;
int attr;
int ctx;
signed char region;
@@ -116,13 +116,13 @@ class KateHlItem
class KateHlContext
{
public:
- KateHlContext(const QString &_hlId, int attribute, int lineEndContext,int _lineBeginContext,
+ KateHlContext(const TQString &_hlId, int attribute, int lineEndContext,int _lineBeginContext,
bool _fallthrough, int _fallthroughContext, bool _dynamic,bool _noIndentationBasedFolding);
virtual ~KateHlContext();
- KateHlContext *clone(const QStringList *args);
+ KateHlContext *clone(const TQStringList *args);
- QValueVector<KateHlItem*> items;
- QString hlId; ///< A unique highlight identifier. Used to look up correct properties.
+ TQValueVector<KateHlItem*> items;
+ TQString hlId; ///< A unique highlight identifier. Used to look up correct properties.
int attr;
int ctx;
int lineBeginContext;
@@ -153,7 +153,7 @@ class KateEmbeddedHlInfo
class KateHlIncludeRule
{
public:
- KateHlIncludeRule(int ctx_=0, uint pos_=0, const QString &incCtxN_="", bool incAttrib=false)
+ KateHlIncludeRule(int ctx_=0, uint pos_=0, const TQString &incCtxN_="", bool incAttrib=false)
: ctx(ctx_)
, pos( pos_)
, incCtxN( incCtxN_ )
@@ -167,46 +167,46 @@ class KateHlIncludeRule
int ctx;
uint pos;
int incCtx;
- QString incCtxN;
+ TQString incCtxN;
bool includeAttrib;
};
class KateHlCharDetect : public KateHlItem
{
public:
- KateHlCharDetect(int attribute, int context,signed char regionId,signed char regionId2, QChar);
+ KateHlCharDetect(int attribute, int context,signed char regionId,signed char regionId2, TQChar);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QChar sChar;
+ TQChar sChar;
};
class KateHl2CharDetect : public KateHlItem
{
public:
- KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2);
- KateHl2CharDetect(int attribute, int context,signed char regionId,signed char regionId2, const QChar *ch);
+ KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2);
+ KateHl2CharDetect(int attribute, int context,signed char regionId,signed char regionId2, const TQChar *ch);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QChar sChar1;
- QChar sChar2;
+ TQChar sChar1;
+ TQChar sChar2;
};
class KateHlStringDetect : public KateHlItem
{
public:
- KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2, const QString &, bool inSensitive=false);
+ KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2, const TQString &, bool inSensitive=false);
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- const QString str;
+ const TQString str;
const int strLen;
const bool _inSensitive;
};
@@ -214,28 +214,28 @@ class KateHlStringDetect : public KateHlItem
class KateHlRangeDetect : public KateHlItem
{
public:
- KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2);
+ KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- QChar sChar1;
- QChar sChar2;
+ TQChar sChar1;
+ TQChar sChar2;
};
class KateHlKeyword : public KateHlItem
{
public:
- KateHlKeyword(int attribute, int context,signed char regionId,signed char regionId2, bool insensitive, const QString& delims);
+ KateHlKeyword(int attribute, int context,signed char regionId,signed char regionId2, bool insensitive, const TQString& delims);
virtual ~KateHlKeyword ();
- void addList(const QStringList &);
- virtual int checkHgl(const QString& text, int offset, int len);
+ void addList(const TQStringList &);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- QMemArray< QDict<bool>* > dict;
+ TQMemArray< TQDict<bool>* > dict;
bool _insensitive;
- const QString& deliminators;
+ const TQString& deliminators;
int minLen;
int maxLen;
};
@@ -245,7 +245,7 @@ class KateHlInt : public KateHlItem
public:
KateHlInt(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlFloat : public KateHlItem
@@ -254,7 +254,7 @@ class KateHlFloat : public KateHlItem
KateHlFloat(int attribute, int context, signed char regionId,signed char regionId2);
virtual ~KateHlFloat () {}
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCFloat : public KateHlFloat
@@ -262,8 +262,8 @@ class KateHlCFloat : public KateHlFloat
public:
KateHlCFloat(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
- int checkIntHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ int checkIntHgl(const TQString& text, int offset, int len);
};
class KateHlCOct : public KateHlItem
@@ -271,7 +271,7 @@ class KateHlCOct : public KateHlItem
public:
KateHlCOct(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCHex : public KateHlItem
@@ -279,7 +279,7 @@ class KateHlCHex : public KateHlItem
public:
KateHlCHex(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlLineContinue : public KateHlItem
@@ -287,8 +287,8 @@ class KateHlLineContinue : public KateHlItem
public:
KateHlLineContinue(int attribute, int context, signed char regionId,signed char regionId2);
- virtual bool endEnable(QChar c) {return c == '\0';}
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual bool endEnable(TQChar c) {return c == '\0';}
+ virtual int checkHgl(const TQString& text, int offset, int len);
virtual bool lineContinue(){return true;}
};
@@ -297,7 +297,7 @@ class KateHlCStringChar : public KateHlItem
public:
KateHlCStringChar(int attribute, int context, signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlCChar : public KateHlItem
@@ -305,34 +305,34 @@ class KateHlCChar : public KateHlItem
public:
KateHlCChar(int attribute, int context,signed char regionId,signed char regionId2);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
};
class KateHlAnyChar : public KateHlItem
{
public:
- KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const QString& charList);
+ KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const TQString& charList);
- virtual int checkHgl(const QString& text, int offset, int len);
+ virtual int checkHgl(const TQString& text, int offset, int len);
private:
- const QString _charList;
+ const TQString _charList;
};
class KateHlRegExpr : public KateHlItem
{
public:
- KateHlRegExpr(int attribute, int context,signed char regionId,signed char regionId2 ,QString expr, bool insensitive, bool minimal);
+ KateHlRegExpr(int attribute, int context,signed char regionId,signed char regionId2 ,TQString expr, bool insensitive, bool minimal);
~KateHlRegExpr() { delete Expr; };
- virtual int checkHgl(const QString& text, int offset, int len);
- virtual QStringList *capturedTexts();
- virtual KateHlItem *clone(const QStringList *args);
+ virtual int checkHgl(const TQString& text, int offset, int len);
+ virtual TQStringList *capturedTexts();
+ virtual KateHlItem *clone(const TQStringList *args);
private:
- QRegExp *Expr;
+ TQRegExp *Expr;
bool handlesLinestart;
- QString _regexp;
+ TQString _regexp;
bool _insensitive;
bool _minimal;
};
@@ -343,7 +343,7 @@ class KateHlDetectSpaces : public KateHlItem
KateHlDetectSpaces (int attribute, int context,signed char regionId,signed char regionId2)
: KateHlItem(attribute,context,regionId,regionId2) {}
- virtual int checkHgl(const QString& text, int offset, int len)
+ virtual int checkHgl(const TQString& text, int offset, int len)
{
int len2 = offset + len;
while ((offset < len2) && text[offset].isSpace()) offset++;
@@ -357,10 +357,10 @@ class KateHlDetectIdentifier : public KateHlItem
KateHlDetectIdentifier (int attribute, int context,signed char regionId,signed char regionId2)
: KateHlItem(attribute,context,regionId,regionId2) { alwaysStartEnable = false; }
- virtual int checkHgl(const QString& text, int offset, int len)
+ virtual int checkHgl(const TQString& text, int offset, int len)
{
// first char should be a letter or underscore
- if ( text[offset].isLetter() || text[offset] == QChar ('_') )
+ if ( text[offset].isLetter() || text[offset] == TQChar ('_') )
{
// memorize length
int len2 = offset+len;
@@ -371,7 +371,7 @@ class KateHlDetectIdentifier : public KateHlItem
// now loop for all other thingies
while (
(offset < len2)
- && (text[offset].isLetterOrNumber() || (text[offset] == QChar ('_')))
+ && (text[offset].isLetterOrNumber() || (text[offset] == TQChar ('_')))
)
offset++;
@@ -388,11 +388,11 @@ class KateHlDetectIdentifier : public KateHlItem
KateHlManager *KateHlManager::s_self = 0;
static const bool trueBool = true;
-static const QString stdDeliminator = QString (" \t.():!+,-<=>%&*/;?[]^{|}~\\");
+static const TQString stdDeliminator = TQString (" \t.():!+,-<=>%&*/;?[]^{|}~\\");
//END
//BEGIN NON MEMBER FUNCTIONS
-static KateHlItemData::ItemStyles getDefStyleNum(QString name)
+static KateHlItemData::ItemStyles getDefStyleNum(TQString name)
{
if (name=="dsNormal") return KateHlItemData::dsNormal;
else if (name=="dsKeyword") return KateHlItemData::dsKeyword;
@@ -437,7 +437,7 @@ KateHlItem::~KateHlItem()
delete subItems[i];
}
-void KateHlItem::dynamicSubstitute(QString &str, const QStringList *args)
+void KateHlItem::dynamicSubstitute(TQString &str, const TQStringList *args)
{
for (uint i = 0; i < str.length() - 1; ++i)
{
@@ -465,13 +465,13 @@ void KateHlItem::dynamicSubstitute(QString &str, const QStringList *args)
//END
//BEGIN KateHlCharDetect
-KateHlCharDetect::KateHlCharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar c)
+KateHlCharDetect::KateHlCharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar c)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar(c)
{
}
-int KateHlCharDetect::checkHgl(const QString& text, int offset, int /*len*/)
+int KateHlCharDetect::checkHgl(const TQString& text, int offset, int /*len*/)
{
if (text[offset] == sChar)
return offset + 1;
@@ -479,7 +479,7 @@ int KateHlCharDetect::checkHgl(const QString& text, int offset, int /*len*/)
return 0;
}
-KateHlItem *KateHlCharDetect::clone(const QStringList *args)
+KateHlItem *KateHlCharDetect::clone(const TQStringList *args)
{
char c = sChar.latin1();
@@ -493,14 +493,14 @@ KateHlItem *KateHlCharDetect::clone(const QStringList *args)
//END
//BEGIN KateHl2CharDetect
-KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2)
+KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar1 (ch1)
, sChar2 (ch2)
{
}
-int KateHl2CharDetect::checkHgl(const QString& text, int offset, int len)
+int KateHl2CharDetect::checkHgl(const TQString& text, int offset, int len)
{
if ((len >= 2) && text[offset++] == sChar1 && text[offset++] == sChar2)
return offset;
@@ -508,7 +508,7 @@ int KateHl2CharDetect::checkHgl(const QString& text, int offset, int len)
return 0;
}
-KateHlItem *KateHl2CharDetect::clone(const QStringList *args)
+KateHlItem *KateHl2CharDetect::clone(const TQStringList *args)
{
char c1 = sChar1.latin1();
char c2 = sChar2.latin1();
@@ -526,7 +526,7 @@ KateHlItem *KateHl2CharDetect::clone(const QStringList *args)
//END
//BEGIN KateHlStringDetect
-KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2,const QString &s, bool inSensitive)
+KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char regionId,signed char regionId2,const TQString &s, bool inSensitive)
: KateHlItem(attribute, context,regionId,regionId2)
, str(inSensitive ? s.upper() : s)
, strLen (str.length())
@@ -534,7 +534,7 @@ KateHlStringDetect::KateHlStringDetect(int attribute, int context, signed char r
{
}
-int KateHlStringDetect::checkHgl(const QString& text, int offset, int len)
+int KateHlStringDetect::checkHgl(const TQString& text, int offset, int len)
{
if (len < strLen)
return 0;
@@ -559,9 +559,9 @@ int KateHlStringDetect::checkHgl(const QString& text, int offset, int len)
return 0;
}
-KateHlItem *KateHlStringDetect::clone(const QStringList *args)
+KateHlItem *KateHlStringDetect::clone(const TQStringList *args)
{
- QString newstr = str;
+ TQString newstr = str;
dynamicSubstitute(newstr, args);
@@ -575,14 +575,14 @@ KateHlItem *KateHlStringDetect::clone(const QStringList *args)
//END
//BEGIN KateHlRangeDetect
-KateHlRangeDetect::KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, QChar ch1, QChar ch2)
+KateHlRangeDetect::KateHlRangeDetect(int attribute, int context, signed char regionId,signed char regionId2, TQChar ch1, TQChar ch2)
: KateHlItem(attribute,context,regionId,regionId2)
, sChar1 (ch1)
, sChar2 (ch2)
{
}
-int KateHlRangeDetect::checkHgl(const QString& text, int offset, int len)
+int KateHlRangeDetect::checkHgl(const TQString& text, int offset, int len)
{
if (text[offset] == sChar1)
{
@@ -601,7 +601,7 @@ int KateHlRangeDetect::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHlKeyword
-KateHlKeyword::KateHlKeyword (int attribute, int context, signed char regionId,signed char regionId2, bool insensitive, const QString& delims)
+KateHlKeyword::KateHlKeyword (int attribute, int context, signed char regionId,signed char regionId2, bool insensitive, const TQString& delims)
: KateHlItem(attribute,context,regionId,regionId2)
, _insensitive(insensitive)
, deliminators(delims)
@@ -618,7 +618,7 @@ KateHlKeyword::~KateHlKeyword ()
delete dict[i];
}
-void KateHlKeyword::addList(const QStringList& list)
+void KateHlKeyword::addList(const TQStringList& list)
{
for(uint i=0; i < list.count(); ++i)
{
@@ -640,13 +640,13 @@ void KateHlKeyword::addList(const QStringList& list)
}
if (!dict[len])
- dict[len] = new QDict<bool> (17, !_insensitive);
+ dict[len] = new TQDict<bool> (17, !_insensitive);
dict[len]->insert(list[i], &trueBool);
}
}
-int KateHlKeyword::checkHgl(const QString& text, int offset, int len)
+int KateHlKeyword::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
int wordLen = 0;
@@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const QString& text, int offset, int len)
if (wordLen < minLen) return 0;
- if ( dict[wordLen] && dict[wordLen]->find(QConstString(text.unicode() + offset, wordLen).string()) )
+ if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.unicode() + offset, wordLen).string()) )
return offset2;
return 0;
@@ -675,7 +675,7 @@ KateHlInt::KateHlInt(int attribute, int context, signed char regionId,signed cha
alwaysStartEnable = false;
}
-int KateHlInt::checkHgl(const QString& text, int offset, int len)
+int KateHlInt::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
@@ -710,7 +710,7 @@ KateHlFloat::KateHlFloat(int attribute, int context, signed char regionId,signed
alwaysStartEnable = false;
}
-int KateHlFloat::checkHgl(const QString& text, int offset, int len)
+int KateHlFloat::checkHgl(const TQString& text, int offset, int len)
{
bool b = false;
bool p = false;
@@ -806,7 +806,7 @@ KateHlCOct::KateHlCOct(int attribute, int context, signed char regionId,signed c
alwaysStartEnable = false;
}
-int KateHlCOct::checkHgl(const QString& text, int offset, int len)
+int KateHlCOct::checkHgl(const TQString& text, int offset, int len)
{
if (text[offset] == '0')
{
@@ -841,7 +841,7 @@ KateHlCHex::KateHlCHex(int attribute, int context,signed char regionId,signed ch
alwaysStartEnable = false;
}
-int KateHlCHex::checkHgl(const QString& text, int offset, int len)
+int KateHlCHex::checkHgl(const TQString& text, int offset, int len)
{
if ((len > 1) && (text[offset++] == '0') && ((text[offset++] & 0xdf) == 'X' ))
{
@@ -875,7 +875,7 @@ KateHlCFloat::KateHlCFloat(int attribute, int context, signed char regionId,sign
alwaysStartEnable = false;
}
-int KateHlCFloat::checkIntHgl(const QString& text, int offset, int len)
+int KateHlCFloat::checkIntHgl(const TQString& text, int offset, int len)
{
int offset2 = offset;
@@ -890,7 +890,7 @@ int KateHlCFloat::checkIntHgl(const QString& text, int offset, int len)
return 0;
}
-int KateHlCFloat::checkHgl(const QString& text, int offset, int len)
+int KateHlCFloat::checkHgl(const TQString& text, int offset, int len)
{
int offset2 = KateHlFloat::checkHgl(text, offset, len);
@@ -914,13 +914,13 @@ int KateHlCFloat::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHlAnyChar
-KateHlAnyChar::KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const QString& charList)
+KateHlAnyChar::KateHlAnyChar(int attribute, int context, signed char regionId,signed char regionId2, const TQString& charList)
: KateHlItem(attribute, context,regionId,regionId2)
, _charList(charList)
{
}
-int KateHlAnyChar::checkHgl(const QString& text, int offset, int)
+int KateHlAnyChar::checkHgl(const TQString& text, int offset, int)
{
if (kateInsideString (_charList, text[offset]))
return ++offset;
@@ -930,7 +930,7 @@ int KateHlAnyChar::checkHgl(const QString& text, int offset, int)
//END
//BEGIN KateHlRegExpr
-KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,signed char regionId2, QString regexp, bool insensitive, bool minimal)
+KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,signed char regionId2, TQString regexp, bool insensitive, bool minimal)
: KateHlItem(attribute, context, regionId,regionId2)
, handlesLinestart (regexp.startsWith("^"))
, _regexp(regexp)
@@ -940,35 +940,35 @@ KateHlRegExpr::KateHlRegExpr( int attribute, int context, signed char regionId,s
if (!handlesLinestart)
regexp.prepend("^");
- Expr = new QRegExp(regexp, !_insensitive);
+ Expr = new TQRegExp(regexp, !_insensitive);
Expr->setMinimal(_minimal);
}
-int KateHlRegExpr::checkHgl(const QString& text, int offset, int /*len*/)
+int KateHlRegExpr::checkHgl(const TQString& text, int offset, int /*len*/)
{
if (offset && handlesLinestart)
return 0;
- int offset2 = Expr->search( text, offset, QRegExp::CaretAtOffset );
+ int offset2 = Expr->search( text, offset, TQRegExp::CaretAtOffset );
if (offset2 == -1) return 0;
return (offset + Expr->matchedLength());
}
-QStringList *KateHlRegExpr::capturedTexts()
+TQStringList *KateHlRegExpr::capturedTexts()
{
- return new QStringList(Expr->capturedTexts());
+ return new TQStringList(Expr->capturedTexts());
}
-KateHlItem *KateHlRegExpr::clone(const QStringList *args)
+KateHlItem *KateHlRegExpr::clone(const TQStringList *args)
{
- QString regexp = _regexp;
- QStringList escArgs = *args;
+ TQString regexp = _regexp;
+ TQStringList escArgs = *args;
- for (QStringList::Iterator it = escArgs.begin(); it != escArgs.end(); ++it)
+ for (TQStringList::Iterator it = escArgs.begin(); it != escArgs.end(); ++it)
{
- (*it).replace(QRegExp("(\\W)"), "\\\\1");
+ (*it).replace(TQRegExp("(\\W)"), "\\\\1");
}
dynamicSubstitute(regexp, &escArgs);
@@ -989,7 +989,7 @@ KateHlLineContinue::KateHlLineContinue(int attribute, int context, signed char r
: KateHlItem(attribute,context,regionId,regionId2) {
}
-int KateHlLineContinue::checkHgl(const QString& text, int offset, int len)
+int KateHlLineContinue::checkHgl(const TQString& text, int offset, int len)
{
if ((len == 1) && (text[offset] == '\\'))
return ++offset;
@@ -1004,7 +1004,7 @@ KateHlCStringChar::KateHlCStringChar(int attribute, int context,signed char regi
}
// checks for C escaped chars \n and escaped hex/octal chars
-static int checkEscapedChar(const QString& text, int offset, int& len)
+static int checkEscapedChar(const TQString& text, int offset, int& len)
{
int i;
if (text[offset] == '\\' && len > 1)
@@ -1068,7 +1068,7 @@ static int checkEscapedChar(const QString& text, int offset, int& len)
return 0;
}
-int KateHlCStringChar::checkHgl(const QString& text, int offset, int len)
+int KateHlCStringChar::checkHgl(const TQString& text, int offset, int len)
{
return checkEscapedChar(text, offset, len);
}
@@ -1079,7 +1079,7 @@ KateHlCChar::KateHlCChar(int attribute, int context,signed char regionId,signed
: KateHlItem(attribute,context,regionId,regionId2) {
}
-int KateHlCChar::checkHgl(const QString& text, int offset, int len)
+int KateHlCChar::checkHgl(const TQString& text, int offset, int len)
{
if ((len > 1) && (text[offset] == '\'') && (text[offset+1] != '\''))
{
@@ -1112,24 +1112,24 @@ int KateHlCChar::checkHgl(const QString& text, int offset, int len)
//END
//BEGIN KateHl2CharDetect
-KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, const QChar *s)
+KateHl2CharDetect::KateHl2CharDetect(int attribute, int context, signed char regionId,signed char regionId2, const TQChar *s)
: KateHlItem(attribute,context,regionId,regionId2) {
sChar1 = s[0];
sChar2 = s[1];
}
//END KateHl2CharDetect
-KateHlItemData::KateHlItemData(const QString name, int defStyleNum)
+KateHlItemData::KateHlItemData(const TQString name, int defStyleNum)
: name(name), defStyleNum(defStyleNum) {
}
-KateHlData::KateHlData(const QString &wildcards, const QString &mimetypes, const QString &identifier, int priority)
+KateHlData::KateHlData(const TQString &wildcards, const TQString &mimetypes, const TQString &identifier, int priority)
: wildcards(wildcards), mimetypes(mimetypes), identifier(identifier), priority(priority)
{
}
//BEGIN KateHlContext
-KateHlContext::KateHlContext (const QString &_hlId, int attribute, int lineEndContext, int _lineBeginContext, bool _fallthrough,
+KateHlContext::KateHlContext (const TQString &_hlId, int attribute, int lineEndContext, int _lineBeginContext, bool _fallthrough,
int _fallthroughContext, bool _dynamic, bool _noIndentationBasedFolding)
{
hlId = _hlId;
@@ -1141,11 +1141,11 @@ KateHlContext::KateHlContext (const QString &_hlId, int attribute, int lineEndCo
dynamic = _dynamic;
dynamicChild = false;
noIndentationBasedFolding=_noIndentationBasedFolding;
- if (_noIndentationBasedFolding) kdDebug(13010)<<QString("**********************_noIndentationBasedFolding is TRUE*****************")<<endl;
+ if (_noIndentationBasedFolding) kdDebug(13010)<<TQString("**********************_noIndentationBasedFolding is TRUE*****************")<<endl;
}
-KateHlContext *KateHlContext::clone(const QStringList *args)
+KateHlContext *KateHlContext::clone(const TQStringList *args)
{
KateHlContext *ret = new KateHlContext(hlId, attr, ctx, lineBeginContext, fallthrough, ftctx, false,noIndentationBasedFolding);
@@ -1225,16 +1225,16 @@ KateHighlighting::~KateHighlighting()
m_contexts.clear ();
}
-void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<short>* ctxs, int *prevLine)
+void KateHighlighting::generateContextStack(int *ctxNum, int ctx, TQMemArray<short>* ctxs, int *prevLine)
{
- //kdDebug(13010)<<QString("Entering generateContextStack with %1").arg(ctx)<<endl;
+ //kdDebug(13010)<<TQString("Entering generateContextStack with %1").arg(ctx)<<endl;
while (true)
{
if (ctx >= 0)
{
(*ctxNum) = ctx;
- ctxs->resize (ctxs->size()+1, QGArray::SpeedOptim);
+ ctxs->resize (ctxs->size()+1, TQGArray::SpeedOptim);
(*ctxs)[ctxs->size()-1]=(*ctxNum);
return;
@@ -1251,12 +1251,12 @@ void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<shor
if (size > 0)
{
- ctxs->resize (size, QGArray::SpeedOptim);
+ ctxs->resize (size, TQGArray::SpeedOptim);
(*ctxNum)=(*ctxs)[size-1];
}
else
{
- ctxs->resize (0, QGArray::SpeedOptim);
+ ctxs->resize (0, TQGArray::SpeedOptim);
(*ctxNum)=0;
}
@@ -1288,9 +1288,9 @@ void KateHighlighting::generateContextStack(int *ctxNum, int ctx, QMemArray<shor
/**
* Creates a new dynamic context or reuse an old one if it has already been created.
*/
-int KateHighlighting::makeDynamicContext(KateHlContext *model, const QStringList *args)
+int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringList *args)
{
- QPair<KateHlContext *, QString> key(model, args->front());
+ QPair<KateHlContext *, TQString> key(model, args->front());
short value;
if (dynamicCtxs.contains(key))
@@ -1338,7 +1338,7 @@ void KateHighlighting::dropDynamicContexts()
*/
void KateHighlighting::doHighlight ( KateTextLine *prevLine,
KateTextLine *textLine,
- QMemArray<uint>* foldingList,
+ TQMemArray<uint>* foldingList,
bool *ctxChanged )
{
if (!textLine)
@@ -1353,7 +1353,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
}
// duplicate the ctx stack, only once !
- QMemArray<short> ctx;
+ TQMemArray<short> ctx;
ctx.duplicate (prevLine->ctxArray());
int ctxNum = 0;
@@ -1372,7 +1372,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
//kdDebug(13010) << "\t\tctxNum = " << ctxNum << " contextList[ctxNum] = " << contextList[ctxNum] << endl; // ellis
- //if (lineContinue) kdDebug(13010)<<QString("The old context should be %1").arg((int)ctxNum)<<endl;
+ //if (lineContinue) kdDebug(13010)<<TQString("The old context should be %1").arg((int)ctxNum)<<endl;
if (!(context = contextNum(ctxNum)))
context = contextNum(0);
@@ -1396,12 +1396,12 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
//kdDebug(13010)<<"test1-2-1-text4"<<endl;
- //if (lineContinue) kdDebug(13010)<<QString("The new context is %1").arg((int)ctxNum)<<endl;
+ //if (lineContinue) kdDebug(13010)<<TQString("The new context is %1").arg((int)ctxNum)<<endl;
}
// text, for programming convenience :)
- QChar lastChar = ' ';
- const QString& text = textLine->string();
+ TQChar lastChar = ' ';
+ const TQString& text = textLine->string();
const int len = textLine->length();
// calc at which char the first char occurs, set it to lenght of line if never
@@ -1459,14 +1459,14 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
if (item->region2)
{
- // kdDebug(13010)<<QString("Region mark 2 detected: %1").arg(item->region2)<<endl;
+ // kdDebug(13010)<<TQString("Region mark 2 detected: %1").arg(item->region2)<<endl;
if ( !foldingList->isEmpty() && ((item->region2 < 0) && (*foldingList)[foldingList->size()-2] == -item->region2 ) )
{
- foldingList->resize (foldingList->size()-2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()-2, TQGArray::SpeedOptim);
}
else
{
- foldingList->resize (foldingList->size()+2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()+2, TQGArray::SpeedOptim);
(*foldingList)[foldingList->size()-2] = (uint)item->region2;
if (item->region2<0) //check not really needed yet
(*foldingList)[foldingList->size()-1] = offset2;
@@ -1478,15 +1478,15 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
if (item->region)
{
- // kdDebug(13010)<<QString("Region mark detected: %1").arg(item->region)<<endl;
+ // kdDebug(13010)<<TQString("Region mark detected: %1").arg(item->region)<<endl;
/* if ( !foldingList->isEmpty() && ((item->region < 0) && (*foldingList)[foldingList->size()-1] == -item->region ) )
{
- foldingList->resize (foldingList->size()-1, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()-1, TQGArray::SpeedOptim);
}
else*/
{
- foldingList->resize (foldingList->size()+2, QGArray::SpeedOptim);
+ foldingList->resize (foldingList->size()+2, TQGArray::SpeedOptim);
(*foldingList)[foldingList->size()-2] = item->region;
if (item->region<0) //check not really needed yet
(*foldingList)[foldingList->size()-1] = offset2;
@@ -1506,7 +1506,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
// dynamic context: substitute the model with an 'instance'
if (context->dynamic)
{
- QStringList *lst = item->capturedTexts();
+ TQStringList *lst = item->capturedTexts();
if (lst != 0)
{
// Replace the top of the stack and the current context
@@ -1602,7 +1602,7 @@ void KateHighlighting::loadWildcards()
KConfig *config = KateHlManager::self()->getKConfig();
config->setGroup("Highlighting " + iName);
- QString extensionString = config->readEntry("Wildcards", iWildcards);
+ TQString extensionString = config->readEntry("Wildcards", iWildcards);
if (extensionSource != extensionString) {
regexpExtensions.clear();
@@ -1610,31 +1610,31 @@ void KateHighlighting::loadWildcards()
extensionSource = extensionString;
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
- QStringList l = QStringList::split( sep, extensionSource );
+ TQStringList l = TQStringList::split( sep, extensionSource );
- static QRegExp boringExpression("\\*\\.[\\d\\w]+");
+ static TQRegExp boringExpression("\\*\\.[\\d\\w]+");
- for( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ for( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
if (boringExpression.exactMatch(*it))
plainExtensions.append((*it).mid(1));
else
- regexpExtensions.append(QRegExp((*it), true, true));
+ regexpExtensions.append(TQRegExp((*it), true, true));
}
}
-QValueList<QRegExp>& KateHighlighting::getRegexpExtensions()
+TQValueList<TQRegExp>& KateHighlighting::getRegexpExtensions()
{
return regexpExtensions;
}
-QStringList& KateHighlighting::getPlainExtensions()
+TQStringList& KateHighlighting::getPlainExtensions()
{
return plainExtensions;
}
-QString KateHighlighting::getMimetypes()
+TQString KateHighlighting::getMimetypes()
{
KConfig *config = KateHlManager::self()->getKConfig();
config->setGroup("Highlighting " + iName);
@@ -1684,7 +1684,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
{
- QStringList s = config->readListEntry(p->name);
+ TQStringList s = config->readListEntry(p->name);
// kdDebug(13010)<<p->name<<s.count()<<endl;
if (s.count()>0)
@@ -1693,7 +1693,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
while(s.count()<9) s<<"";
p->clear();
- QString tmp=s[0]; if (!tmp.isEmpty()) p->defStyleNum=tmp.toInt();
+ TQString tmp=s[0]; if (!tmp.isEmpty()) p->defStyleNum=tmp.toInt();
QRgb col;
@@ -1733,20 +1733,20 @@ void KateHighlighting::setKateHlItemDataList(uint schema, KateHlItemDataList &li
config->setGroup("Highlighting " + iName + " - Schema "
+ KateFactory::self()->schemaManager()->name(schema));
- QStringList settings;
+ TQStringList settings;
for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
{
settings.clear();
- settings<<QString::number(p->defStyleNum,10);
- settings<<(p->itemSet(KateAttribute::TextColor)?QString::number(p->textColor().rgb(),16):"");
- settings<<(p->itemSet(KateAttribute::SelectedTextColor)?QString::number(p->selectedTextColor().rgb(),16):"");
+ settings<<TQString::number(p->defStyleNum,10);
+ settings<<(p->itemSet(KateAttribute::TextColor)?TQString::number(p->textColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::SelectedTextColor)?TQString::number(p->selectedTextColor().rgb(),16):"");
settings<<(p->itemSet(KateAttribute::Weight)?(p->bold()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::Italic)?(p->italic()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::StrikeOut)?(p->strikeOut()?"1":"0"):"");
settings<<(p->itemSet(KateAttribute::Underline)?(p->underline()?"1":"0"):"");
- settings<<(p->itemSet(KateAttribute::BGColor)?QString::number(p->bgColor().rgb(),16):"");
- settings<<(p->itemSet(KateAttribute::SelectedBGColor)?QString::number(p->selectedBGColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::BGColor)?TQString::number(p->bgColor().rgb(),16):"");
+ settings<<(p->itemSet(KateAttribute::SelectedBGColor)?TQString::number(p->selectedBGColor().rgb(),16):"");
settings<<"---";
config->writeEntry(p->name,settings);
}
@@ -1845,29 +1845,29 @@ void KateHighlighting::addToKateHlItemDataList()
while (KateHlManager::self()->syntax->nextGroup(data))
{
// read all attributes
- QString color = KateHlManager::self()->syntax->groupData(data,QString("color"));
- QString selColor = KateHlManager::self()->syntax->groupData(data,QString("selColor"));
- QString bold = KateHlManager::self()->syntax->groupData(data,QString("bold"));
- QString italic = KateHlManager::self()->syntax->groupData(data,QString("italic"));
- QString underline = KateHlManager::self()->syntax->groupData(data,QString("underline"));
- QString strikeOut = KateHlManager::self()->syntax->groupData(data,QString("strikeOut"));
- QString bgColor = KateHlManager::self()->syntax->groupData(data,QString("backgroundColor"));
- QString selBgColor = KateHlManager::self()->syntax->groupData(data,QString("selBackgroundColor"));
+ TQString color = KateHlManager::self()->syntax->groupData(data,TQString("color"));
+ TQString selColor = KateHlManager::self()->syntax->groupData(data,TQString("selColor"));
+ TQString bold = KateHlManager::self()->syntax->groupData(data,TQString("bold"));
+ TQString italic = KateHlManager::self()->syntax->groupData(data,TQString("italic"));
+ TQString underline = KateHlManager::self()->syntax->groupData(data,TQString("underline"));
+ TQString strikeOut = KateHlManager::self()->syntax->groupData(data,TQString("strikeOut"));
+ TQString bgColor = KateHlManager::self()->syntax->groupData(data,TQString("backgroundColor"));
+ TQString selBgColor = KateHlManager::self()->syntax->groupData(data,TQString("selBackgroundColor"));
KateHlItemData* newData = new KateHlItemData(
- buildPrefix+KateHlManager::self()->syntax->groupData(data,QString("name")).simplifyWhiteSpace(),
- getDefStyleNum(KateHlManager::self()->syntax->groupData(data,QString("defStyleNum"))));
+ buildPrefix+KateHlManager::self()->syntax->groupData(data,TQString("name")).simplifyWhiteSpace(),
+ getDefStyleNum(KateHlManager::self()->syntax->groupData(data,TQString("defStyleNum"))));
/* here the custom style overrides are specified, if needed */
- if (!color.isEmpty()) newData->setTextColor(QColor(color));
- if (!selColor.isEmpty()) newData->setSelectedTextColor(QColor(selColor));
+ if (!color.isEmpty()) newData->setTextColor(TQColor(color));
+ if (!selColor.isEmpty()) newData->setSelectedTextColor(TQColor(selColor));
if (!bold.isEmpty()) newData->setBold( IS_TRUE(bold) );
if (!italic.isEmpty()) newData->setItalic( IS_TRUE(italic) );
// new attributes for the new rendering view
if (!underline.isEmpty()) newData->setUnderline( IS_TRUE(underline) );
if (!strikeOut.isEmpty()) newData->setStrikeOut( IS_TRUE(strikeOut) );
- if (!bgColor.isEmpty()) newData->setBGColor(QColor(bgColor));
- if (!selBgColor.isEmpty()) newData->setSelectedBGColor(QColor(selBgColor));
+ if (!bgColor.isEmpty()) newData->setBGColor(TQColor(bgColor));
+ if (!selBgColor.isEmpty()) newData->setSelectedBGColor(TQColor(selBgColor));
internalIDList.append(newData);
}
@@ -1887,7 +1887,7 @@ void KateHighlighting::addToKateHlItemDataList()
*
* @return The index of the attribute, or 0 if the attribute isn't found
*/
-int KateHighlighting::lookupAttrName(const QString& name, KateHlItemDataList &iDl)
+int KateHighlighting::lookupAttrName(const TQString& name, KateHlItemDataList &iDl)
{
for (uint i = 0; i < iDl.count(); i++)
if (iDl.at(i)->name == buildPrefix+name)
@@ -1912,19 +1912,19 @@ int KateHighlighting::lookupAttrName(const QString& name, KateHlItemDataList &i
*/
KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
KateHlItemDataList &iDl,
- QStringList *RegionList,
- QStringList *ContextNameList)
+ TQStringList *RegionList,
+ TQStringList *ContextNameList)
{
// No highlighting -> exit
if (noHl)
return 0;
// get the (tagname) itemd type
- QString dataname=KateHlManager::self()->syntax->groupItemData(data,QString(""));
+ TQString dataname=KateHlManager::self()->syntax->groupItemData(data,TQString(""));
// code folding region handling:
- QString beginRegionStr=KateHlManager::self()->syntax->groupItemData(data,QString("beginRegion"));
- QString endRegionStr=KateHlManager::self()->syntax->groupItemData(data,QString("endRegion"));
+ TQString beginRegionStr=KateHlManager::self()->syntax->groupItemData(data,TQString("beginRegion"));
+ TQString endRegionStr=KateHlManager::self()->syntax->groupItemData(data,TQString("endRegion"));
signed char regionId=0;
signed char regionId2=0;
@@ -1960,13 +1960,13 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
}
int attr = 0;
- QString tmpAttr=KateHlManager::self()->syntax->groupItemData(data,QString("attribute")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupItemData(data,TQString("attribute")).simplifyWhiteSpace();
bool onlyConsume = tmpAttr.isEmpty();
// only relevant for non consumer
if (!onlyConsume)
{
- if (QString("%1").arg(tmpAttr.toInt())==tmpAttr)
+ if (TQString("%1").arg(tmpAttr.toInt())==tmpAttr)
{
errorsAndWarnings+=i18n(
"<B>%1</B>: Deprecated syntax. Attribute (%2) not addressed by symbolic name<BR>").
@@ -1979,44 +1979,44 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
// Info about context switch
int context = -1;
- QString unresolvedContext;
- QString tmpcontext=KateHlManager::self()->syntax->groupItemData(data,QString("context"));
+ TQString unresolvedContext;
+ TQString tmpcontext=KateHlManager::self()->syntax->groupItemData(data,TQString("context"));
if (!tmpcontext.isEmpty())
context=getIdFromString(ContextNameList, tmpcontext,unresolvedContext);
// Get the char parameter (eg DetectChar)
char chr;
- if (! KateHlManager::self()->syntax->groupItemData(data,QString("char")).isEmpty())
- chr= (KateHlManager::self()->syntax->groupItemData(data,QString("char")).latin1())[0];
+ if (! KateHlManager::self()->syntax->groupItemData(data,TQString("char")).isEmpty())
+ chr= (KateHlManager::self()->syntax->groupItemData(data,TQString("char")).latin1())[0];
else
chr=0;
// Get the String parameter (eg. StringDetect)
- QString stringdata=KateHlManager::self()->syntax->groupItemData(data,QString("String"));
+ TQString stringdata=KateHlManager::self()->syntax->groupItemData(data,TQString("String"));
// Get a second char parameter (char1) (eg Detect2Chars)
char chr1;
- if (! KateHlManager::self()->syntax->groupItemData(data,QString("char1")).isEmpty())
- chr1= (KateHlManager::self()->syntax->groupItemData(data,QString("char1")).latin1())[0];
+ if (! KateHlManager::self()->syntax->groupItemData(data,TQString("char1")).isEmpty())
+ chr1= (KateHlManager::self()->syntax->groupItemData(data,TQString("char1")).latin1())[0];
else
chr1=0;
// Will be removed eventually. Atm used for StringDetect, keyword and RegExp
- const QString & insensitive_str = KateHlManager::self()->syntax->groupItemData(data,QString("insensitive"));
+ const TQString & insensitive_str = KateHlManager::self()->syntax->groupItemData(data,TQString("insensitive"));
bool insensitive = IS_TRUE( insensitive_str );
// for regexp only
- bool minimal = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("minimal")) );
+ bool minimal = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("minimal")) );
// dominik: look ahead and do not change offset. so we can change contexts w/o changing offset1.
- bool lookAhead = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("lookAhead")) );
+ bool lookAhead = IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("lookAhead")) );
- bool dynamic= IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,QString("dynamic")) );
+ bool dynamic= IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,TQString("dynamic")) );
- bool firstNonSpace = IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,QString("firstNonSpace")) );
+ bool firstNonSpace = IS_TRUE(KateHlManager::self()->syntax->groupItemData(data,TQString("firstNonSpace")) );
int column = -1;
- QString colStr = KateHlManager::self()->syntax->groupItemData(data,QString("column"));
+ TQString colStr = KateHlManager::self()->syntax->groupItemData(data,TQString("column"));
if (!colStr.isEmpty())
column = colStr.toInt();
@@ -2070,12 +2070,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
return tmpItem;
}
-QString KateHighlighting::hlKeyForAttrib( int i ) const
+TQString KateHighlighting::hlKeyForAttrib( int i ) const
{
- // find entry. This is faster than QMap::find. m_hlIndex always has an entry
+ // find entry. This is faster than TQMap::find. m_hlIndex always has an entry
// for key '0' (it is "none"), so the result is always valid.
int k = 0;
- QMap<int,QString>::const_iterator it = m_hlIndex.constEnd();
+ TQMap<int,TQString>::const_iterator it = m_hlIndex.constEnd();
while ( it != m_hlIndex.constBegin() )
{
--it;
@@ -2086,42 +2086,42 @@ QString KateHighlighting::hlKeyForAttrib( int i ) const
return it.data();
}
-bool KateHighlighting::isInWord( QChar c, int attrib ) const
+bool KateHighlighting::isInWord( TQChar c, int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0
&& !c.isSpace() && c != '"' && c != '\'';
}
-bool KateHighlighting::canBreakAt( QChar c, int attrib ) const
+bool KateHighlighting::canBreakAt( TQChar c, int attrib ) const
{
- static const QString& sq = KGlobal::staticQString("\"'");
+ static const TQString& sq = KGlobal::staticQString("\"'");
return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.find(c) != -1) && (sq.find(c) == -1);
}
signed char KateHighlighting::commentRegion(int attr) const {
- QString commentRegion=m_additionalData[ hlKeyForAttrib( attr ) ]->multiLineRegion;
+ TQString commentRegion=m_additionalData[ hlKeyForAttrib( attr ) ]->multiLineRegion;
return (commentRegion.isEmpty()?0:(commentRegion.toShort()));
}
bool KateHighlighting::canComment( int startAttrib, int endAttrib ) const
{
- QString k = hlKeyForAttrib( startAttrib );
+ TQString k = hlKeyForAttrib( startAttrib );
return ( k == hlKeyForAttrib( endAttrib ) &&
( ( !m_additionalData[k]->multiLineCommentStart.isEmpty() && !m_additionalData[k]->multiLineCommentEnd.isEmpty() ) ||
! m_additionalData[k]->singleLineCommentMarker.isEmpty() ) );
}
-QString KateHighlighting::getCommentStart( int attrib ) const
+TQString KateHighlighting::getCommentStart( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib) ]->multiLineCommentStart;
}
-QString KateHighlighting::getCommentEnd( int attrib ) const
+TQString KateHighlighting::getCommentEnd( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib ) ]->multiLineCommentEnd;
}
-QString KateHighlighting::getCommentSingleLineStart( int attrib ) const
+TQString KateHighlighting::getCommentSingleLineStart( int attrib ) const
{
return m_additionalData[ hlKeyForAttrib( attrib) ]->singleLineCommentMarker;
}
@@ -2141,7 +2141,7 @@ void KateHighlighting::readCommentConfig()
KateHlManager::self()->syntax->setIdentifier(buildIdentifier);
KateSyntaxContextData *data=KateHlManager::self()->syntax->getGroupInfo("general","comment");
- QString cmlStart="", cmlEnd="", cmlRegion="", cslStart="";
+ TQString cmlStart="", cmlEnd="", cmlRegion="", cslStart="";
CSLPos cslPosition=CSLPosColumn0;
if (data)
@@ -2151,7 +2151,7 @@ void KateHighlighting::readCommentConfig()
if (KateHlManager::self()->syntax->groupData(data,"name")=="singleLine")
{
cslStart=KateHlManager::self()->syntax->groupData(data,"start");
- QString cslpos=KateHlManager::self()->syntax->groupData(data,"position");
+ TQString cslpos=KateHlManager::self()->syntax->groupData(data,"position");
if (cslpos=="afterwhitespace")
cslPosition=CSLPosAfterWhitespace;
else
@@ -2193,13 +2193,13 @@ void KateHighlighting::readGlobalKeywordConfig()
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("casesensitive")) ) )
+ if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("casesensitive")) ) )
casesensitive=true;
else
casesensitive=false;
//get the weak deliminators
- weakDeliminator=(KateHlManager::self()->syntax->groupItemData(data,QString("weakDeliminator")));
+ weakDeliminator=(KateHlManager::self()->syntax->groupItemData(data,TQString("weakDeliminator")));
kdDebug(13010)<<"weak delimiters are: "<<weakDeliminator<<endl;
@@ -2212,7 +2212,7 @@ void KateHighlighting::readGlobalKeywordConfig()
deliminator.remove (f, 1);
}
- QString addDelim = (KateHlManager::self()->syntax->groupItemData(data,QString("additionalDeliminator")));
+ TQString addDelim = (KateHlManager::self()->syntax->groupItemData(data,TQString("additionalDeliminator")));
if (!addDelim.isEmpty())
deliminator=deliminator+addDelim;
@@ -2223,7 +2223,7 @@ void KateHighlighting::readGlobalKeywordConfig()
{
//Default values
casesensitive=true;
- weakDeliminator=QString("");
+ weakDeliminator=TQString("");
}
kdDebug(13010)<<"readGlobalKeywordConfig:END"<<endl;
@@ -2251,12 +2251,12 @@ void KateHighlighting::readWordWrapConfig()
KateHlManager::self()->syntax->setIdentifier(buildIdentifier);
KateSyntaxContextData *data = KateHlManager::self()->syntax->getConfig("general","keywords");
- QString wordWrapDeliminator = stdDeliminator;
+ TQString wordWrapDeliminator = stdDeliminator;
if (data)
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- wordWrapDeliminator = (KateHlManager::self()->syntax->groupItemData(data,QString("wordWrapDeliminator")));
+ wordWrapDeliminator = (KateHlManager::self()->syntax->groupItemData(data,TQString("wordWrapDeliminator")));
//when no wordWrapDeliminator is defined use the deliminator list
if ( wordWrapDeliminator.length() == 0 ) wordWrapDeliminator = deliminator;
@@ -2279,7 +2279,7 @@ void KateHighlighting::readIndentationConfig()
if (data)
{
- m_indentation = (KateHlManager::self()->syntax->groupItemData(data,QString("mode")));
+ m_indentation = (KateHlManager::self()->syntax->groupItemData(data,TQString("mode")));
KateHlManager::self()->syntax->freeGroupInfo(data);
}
@@ -2297,7 +2297,7 @@ void KateHighlighting::readFoldingConfig()
{
kdDebug(13010)<<"Found global keyword config"<<endl;
- if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,QString("indentationsensitive")) ) )
+ if ( IS_TRUE( KateHlManager::self()->syntax->groupItemData(data,TQString("indentationsensitive")) ) )
m_foldingIndentationSensitive=true;
else
m_foldingIndentationSensitive=false;
@@ -2315,7 +2315,7 @@ void KateHighlighting::readFoldingConfig()
kdDebug(13010)<<"############################ use indent for fold are: "<<m_foldingIndentationSensitive<<endl;
}
-void KateHighlighting::createContextNameList(QStringList *ContextNameList,int ctx0)
+void KateHighlighting::createContextNameList(TQStringList *ContextNameList,int ctx0)
{
kdDebug(13010)<<"creatingContextNameList:BEGIN"<<endl;
@@ -2332,10 +2332,10 @@ void KateHighlighting::createContextNameList(QStringList *ContextNameList,int c
{
while (KateHlManager::self()->syntax->nextGroup(data))
{
- QString tmpAttr=KateHlManager::self()->syntax->groupData(data,QString("name")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupData(data,TQString("name")).simplifyWhiteSpace();
if (tmpAttr.isEmpty())
{
- tmpAttr=QString("!KATE_INTERNAL_DUMMY! %1").arg(id);
+ tmpAttr=TQString("!KATE_INTERNAL_DUMMY! %1").arg(id);
errorsAndWarnings +=i18n("<B>%1</B>: Deprecated syntax. Context %2 has no symbolic name<BR>").arg(buildIdentifier).arg(id-ctx0);
}
else tmpAttr=buildPrefix+tmpAttr;
@@ -2348,7 +2348,7 @@ void KateHighlighting::createContextNameList(QStringList *ContextNameList,int c
}
-int KateHighlighting::getIdFromString(QStringList *ContextNameList, QString tmpLineEndContext, /*NO CONST*/ QString &unres)
+int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tmpLineEndContext, /*NO CONST*/ TQString &unres)
{
unres="";
int context;
@@ -2370,7 +2370,7 @@ int KateHighlighting::getIdFromString(QStringList *ContextNameList, QString tmpL
int o = tmpLineEndContext.find("##");
// FIXME at least with 'foo##bar'-style contexts the rules are picked up
// but the default attribute is not
- QString tmp=tmpLineEndContext.mid(o+2);
+ TQString tmp=tmpLineEndContext.mid(o+2);
if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo());
unres=tmp+':'+tmpLineEndContext.left(o);
context=0;
@@ -2427,7 +2427,7 @@ void KateHighlighting::makeContextList()
if (!it.data().loaded) // we found one, we still have to load
{
kdDebug(13010)<<"**************** Inner loop in make ContextList"<<endl;
- QString identifierToUse;
+ TQString identifierToUse;
kdDebug(13010)<<"Trying to open highlighting definition file: "<< it.key()<<endl;
if (iName==it.key()) // the own identifier is known
identifierToUse=identifier;
@@ -2469,7 +2469,7 @@ void KateHighlighting::makeContextList()
for (KateHlUnresolvedCtxRefs::iterator unresIt=unresolvedContextReferences.begin();
unresIt!=unresolvedContextReferences.end();++unresIt)
{
- QString incCtx = unresIt.data();
+ TQString incCtx = unresIt.data();
kdDebug(13010)<<"Context "<<incCtx<<" is unresolved"<<endl;
// only resolve '##Name' contexts here; handleKateHlIncludeRules() can figure
// out 'Name##Name'-style inclusions, but we screw it up
@@ -2513,7 +2513,7 @@ void KateHighlighting::handleKateHlIncludeRules()
if (includeRules.isEmpty()) return;
buildPrefix="";
- QString dummy;
+ TQString dummy;
// By now the context0 references are resolved, now more or less only inner
// file references are resolved. If we decide that arbitrary inclusion is
@@ -2636,7 +2636,7 @@ void KateHighlighting::handleKateHlIncludeRulesRecursive(KateHlIncludeRules::ite
*
* @return the number of contexts after this is added.
*/
-int KateHighlighting::addToContextList(const QString &ident, int ctx0)
+int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
{
kdDebug(13010)<<"=== Adding hl with ident '"<<ident<<"'"<<endl;
@@ -2644,7 +2644,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
KateSyntaxContextData *data, *datasub;
KateHlItem *c;
- QString dummy;
+ TQString dummy;
// Let the syntax document class know, which file we'd like to parse
if (!KateHlManager::self()->syntax->setIdentifier(ident))
@@ -2674,7 +2674,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
readFoldingConfig ();
- QString ctxName;
+ TQString ctxName;
// This list is needed for the translation of the attribute parameter,
// if the itemData name is given instead of the index
@@ -2694,22 +2694,22 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
{
kdDebug(13010)<<"Found a context in file, building structure now"<<endl;
//BEGIN - Translation of the attribute parameter
- QString tmpAttr=KateHlManager::self()->syntax->groupData(data,QString("attribute")).simplifyWhiteSpace();
+ TQString tmpAttr=KateHlManager::self()->syntax->groupData(data,TQString("attribute")).simplifyWhiteSpace();
int attr;
- if (QString("%1").arg(tmpAttr.toInt())==tmpAttr)
+ if (TQString("%1").arg(tmpAttr.toInt())==tmpAttr)
attr=tmpAttr.toInt();
else
attr=lookupAttrName(tmpAttr,iDl);
//END - Translation of the attribute parameter
- ctxName=buildPrefix+KateHlManager::self()->syntax->groupData(data,QString("lineEndContext")).simplifyWhiteSpace();
+ ctxName=buildPrefix+KateHlManager::self()->syntax->groupData(data,TQString("lineEndContext")).simplifyWhiteSpace();
- QString tmpLineEndContext=KateHlManager::self()->syntax->groupData(data,QString("lineEndContext")).simplifyWhiteSpace();
+ TQString tmpLineEndContext=KateHlManager::self()->syntax->groupData(data,TQString("lineEndContext")).simplifyWhiteSpace();
int context;
context=getIdFromString(&ContextNameList, tmpLineEndContext,dummy);
- QString tmpNIBF = KateHlManager::self()->syntax->groupData(data, QString("noIndentationBasedFolding") );
+ TQString tmpNIBF = KateHlManager::self()->syntax->groupData(data, TQString("noIndentationBasedFolding") );
bool noIndentationBasedFolding=IS_TRUE(tmpNIBF);
//BEGIN get fallthrough props
@@ -2717,12 +2717,12 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
int ftc = 0; // fallthrough context
if ( i > 0 ) // fallthrough is not smart in context 0
{
- QString tmpFt = KateHlManager::self()->syntax->groupData(data, QString("fallthrough") );
+ TQString tmpFt = KateHlManager::self()->syntax->groupData(data, TQString("fallthrough") );
if ( IS_TRUE(tmpFt) )
ft = true;
if ( ft )
{
- QString tmpFtc = KateHlManager::self()->syntax->groupData( data, QString("fallthroughContext") );
+ TQString tmpFtc = KateHlManager::self()->syntax->groupData( data, TQString("fallthroughContext") );
ftc=getIdFromString(&ContextNameList, tmpFtc,dummy);
if (ftc == -1) ftc =0;
@@ -2733,7 +2733,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
//END falltrhough props
bool dynamic = false;
- QString tmpDynamic = KateHlManager::self()->syntax->groupData(data, QString("dynamic") );
+ TQString tmpDynamic = KateHlManager::self()->syntax->groupData(data, TQString("dynamic") );
if ( tmpDynamic.lower() == "true" || tmpDynamic.toInt() == 1 )
dynamic = true;
@@ -2741,8 +2741,8 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
ident,
attr,
context,
- (KateHlManager::self()->syntax->groupData(data,QString("lineBeginContext"))).isEmpty()?-1:
- (KateHlManager::self()->syntax->groupData(data,QString("lineBeginContext"))).toInt(),
+ (KateHlManager::self()->syntax->groupData(data,TQString("lineBeginContext"))).isEmpty()?-1:
+ (KateHlManager::self()->syntax->groupData(data,TQString("lineBeginContext"))).toInt(),
ft, ftc, dynamic,noIndentationBasedFolding);
m_contexts.push_back (ctxNew);
@@ -2756,11 +2756,11 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
// KateHlIncludeRules : add a pointer to each item in that context
// TODO add a attrib includeAttrib
- QString tag = KateHlManager::self()->syntax->groupItemData(data,QString(""));
+ TQString tag = KateHlManager::self()->syntax->groupItemData(data,TQString(""));
if ( tag == "IncludeRules" ) //if the new item is an Include rule, we have to take special care
{
- QString incCtx = KateHlManager::self()->syntax->groupItemData( data, QString("context"));
- QString incAttrib = KateHlManager::self()->syntax->groupItemData( data, QString("includeAttrib"));
+ TQString incCtx = KateHlManager::self()->syntax->groupItemData( data, TQString("context"));
+ TQString incAttrib = KateHlManager::self()->syntax->groupItemData( data, TQString("includeAttrib"));
bool includeAttrib = IS_TRUE( incAttrib );
// only context refernces of type Name, ##Name, and Subname##Name are allowed
if (incCtx.startsWith("##") || (!incCtx.startsWith("#")))
@@ -2769,8 +2769,8 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
//#stay, #pop is not interesting here
if (incCtxi >= 0)
{
- QString incSet = incCtx.mid(incCtxi + 2);
- QString incCtxN = incSet + ":" + incCtx.left(incCtxi);
+ TQString incSet = incCtx.mid(incCtxi + 2);
+ TQString incCtxN = incSet + ":" + incCtx.left(incCtxi);
//a cross highlighting reference
kdDebug(13010)<<"Cross highlight reference <IncludeRules>, context "<<incCtxN<<endl;
@@ -2798,13 +2798,13 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
}
// TODO -- can we remove the block below??
#if 0
- QString tag = KateHlManager::self()->syntax->groupKateHlItemData(data,QString(""));
+ TQString tag = KateHlManager::self()->syntax->groupKateHlItemData(data,TQString(""));
if ( tag == "IncludeRules" ) {
// attrib context: the index (jowenn, i think using names here
// would be a cool feat, goes for mentioning the context in
// any item. a map or dict?)
int ctxId = getIdFromString(&ContextNameList,
- KateHlManager::self()->syntax->groupKateHlItemData( data, QString("context")),dummy); // the index is *required*
+ KateHlManager::self()->syntax->groupKateHlItemData( data, TQString("context")),dummy); // the index is *required*
if ( ctxId > -1) { // we can even reuse rules of 0 if we want to:)
kdDebug(13010)<<"makeContextList["<<i<<"]: including all items of context "<<ctxId<<endl;
if ( ctxId < (int) i ) { // must be defined
@@ -2855,11 +2855,11 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
errorsAndWarnings+=i18n(
"<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>"
).arg(buildIdentifier).arg( m_additionalData[ ident ]->multiLineRegion );
- m_additionalData[ ident ]->multiLineRegion = QString();
+ m_additionalData[ ident ]->multiLineRegion = TQString();
kdDebug(13010)<<"ERROR comment region attribute could not be resolved"<<endl;
} else {
- m_additionalData[ ident ]->multiLineRegion=QString::number(commentregionid+1);
+ m_additionalData[ ident ]->multiLineRegion=TQString::number(commentregionid+1);
kdDebug(13010)<<"comment region resolved to:"<<m_additionalData[ ident ]->multiLineRegion<<endl;
}
}
@@ -2869,7 +2869,7 @@ int KateHighlighting::addToContextList(const QString &ident, int ctx0)
void KateHighlighting::clearAttributeArrays ()
{
- for ( QIntDictIterator< QMemArray<KateAttribute> > it( m_attributeArrays ); it.current(); ++it )
+ for ( TQIntDictIterator< TQMemArray<KateAttribute> > it( m_attributeArrays ); it.current(); ++it )
{
// k, schema correct, let create the data
KateAttributeList defaultStyleList;
@@ -2880,7 +2880,7 @@ void KateHighlighting::clearAttributeArrays ()
getKateHlItemDataList(it.currentKey(), itemDataList);
uint nAttribs = itemDataList.count();
- QMemArray<KateAttribute> *array = it.current();
+ TQMemArray<KateAttribute> *array = it.current();
array->resize (nAttribs);
for (uint z = 0; z < nAttribs; z++)
@@ -2896,9 +2896,9 @@ void KateHighlighting::clearAttributeArrays ()
}
}
-QMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
+TQMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
{
- QMemArray<KateAttribute> *array;
+ TQMemArray<KateAttribute> *array;
// found it, allready floating around
if ((array = m_attributeArrays[schema]))
@@ -2920,7 +2920,7 @@ QMemArray<KateAttribute> *KateHighlighting::attributes (uint schema)
getKateHlItemDataList(schema, itemDataList);
uint nAttribs = itemDataList.count();
- array = new QMemArray<KateAttribute> (nAttribs);
+ array = new TQMemArray<KateAttribute> (nAttribs);
for (uint z = 0; z < nAttribs; z++)
{
@@ -2953,9 +2953,9 @@ void KateHighlighting::getKateHlItemDataListCopy (uint schema, KateHlItemDataLis
//BEGIN KateHlManager
KateHlManager::KateHlManager()
- : QObject()
+ : TQObject()
, m_config ("katesyntaxhighlightingrc", false, false)
- , commonSuffixes (QStringList::split(";", ".orig;.new;~;.bak;.BAK"))
+ , commonSuffixes (TQStringList::split(";", ".orig;.new;~;.bak;.BAK"))
, syntax (new KateSyntaxDocument())
, dynamicCtxsCount(0)
, forceNoDCReset(false)
@@ -2974,8 +2974,8 @@ KateHlManager::KateHlManager()
if (insert == hlList.count())
break;
- if ( QString(hlList.at(insert)->section() + hlList.at(insert)->nameTranslated()).lower()
- > QString(hl->section() + hl->nameTranslated()).lower() )
+ if ( TQString(hlList.at(insert)->section() + hlList.at(insert)->nameTranslated()).lower()
+ > TQString(hl->section() + hl->nameTranslated()).lower() )
break;
}
@@ -3014,7 +3014,7 @@ KateHighlighting *KateHlManager::getHl(int n)
return hlList.at(n);
}
-int KateHlManager::nameFind(const QString &name)
+int KateHlManager::nameFind(const TQString &name)
{
int z (hlList.count() - 1);
for (; z > 0; z--)
@@ -3033,20 +3033,20 @@ int KateHlManager::detectHighlighting (KateDocument *doc)
return hl;
}
-int KateHlManager::wildcardFind(const QString &fileName)
+int KateHlManager::wildcardFind(const TQString &fileName)
{
int result = -1;
if ((result = realWildcardFind(fileName)) != -1)
return result;
int length = fileName.length();
- QString backupSuffix = KateDocumentConfig::global()->backupSuffix();
+ TQString backupSuffix = KateDocumentConfig::global()->backupSuffix();
if (fileName.endsWith(backupSuffix)) {
if ((result = realWildcardFind(fileName.left(length - backupSuffix.length()))) != -1)
return result;
}
- for (QStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
+ for (TQStringList::Iterator it = commonSuffixes.begin(); it != commonSuffixes.end(); ++it) {
if (*it != backupSuffix && fileName.endsWith(*it)) {
if ((result = realWildcardFind(fileName.left(length - (*it).length()))) != -1)
return result;
@@ -3056,21 +3056,21 @@ int KateHlManager::wildcardFind(const QString &fileName)
return -1;
}
-int KateHlManager::realWildcardFind(const QString &fileName)
+int KateHlManager::realWildcardFind(const TQString &fileName)
{
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
- QPtrList<KateHighlighting> highlights;
+ TQPtrList<KateHighlighting> highlights;
for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next()) {
highlight->loadWildcards();
- for (QStringList::Iterator it = highlight->getPlainExtensions().begin(); it != highlight->getPlainExtensions().end(); ++it)
+ for (TQStringList::Iterator it = highlight->getPlainExtensions().begin(); it != highlight->getPlainExtensions().end(); ++it)
if (fileName.endsWith((*it)))
highlights.append(highlight);
for (int i = 0; i < (int)highlight->getRegexpExtensions().count(); i++) {
- QRegExp re = highlight->getRegexpExtensions()[i];
+ TQRegExp re = highlight->getRegexpExtensions()[i];
if (re.exactMatch(fileName))
highlights.append(highlight);
}
@@ -3097,17 +3097,17 @@ int KateHlManager::realWildcardFind(const QString &fileName)
int KateHlManager::mimeFind( KateDocument *doc )
{
- static QRegExp sep("\\s*;\\s*");
+ static TQRegExp sep("\\s*;\\s*");
KMimeType::Ptr mt = doc->mimeTypeForContent();
- QPtrList<KateHighlighting> highlights;
+ TQPtrList<KateHighlighting> highlights;
for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next())
{
- QStringList l = QStringList::split( sep, highlight->getMimetypes() );
+ TQStringList l = TQStringList::split( sep, highlight->getMimetypes() );
- for( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ for( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
{
if ( *it == mt->name() ) // faster than a regexp i guess?
highlights.append (highlight);
@@ -3139,10 +3139,10 @@ uint KateHlManager::defaultStyles()
return 14;
}
-QString KateHlManager::defaultStyleName(int n, bool translateNames)
+TQString KateHlManager::defaultStyleName(int n, bool translateNames)
{
- static QStringList names;
- static QStringList translatedNames;
+ static TQStringList names;
+ static TQStringList translatedNames;
if (names.isEmpty())
{
@@ -3225,7 +3225,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
list.append(charAttribute);
KateAttribute* string = new KateAttribute();
- string->setTextColor(QColor::QColor("#D00"));
+ string->setTextColor(TQColor::TQColor("#D00"));
string->setSelectedTextColor(Qt::red);
list.append(string);
@@ -3242,9 +3242,9 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
KateAttribute* alert = new KateAttribute();
alert->setTextColor(Qt::black);
- alert->setSelectedTextColor( QColor::QColor("#FCC") );
+ alert->setSelectedTextColor( TQColor::TQColor("#FCC") );
alert->setBold(true);
- alert->setBGColor( QColor::QColor("#FCC") );
+ alert->setBGColor( TQColor::TQColor("#FCC") );
list.append(alert);
KateAttribute* functionAttribute = new KateAttribute();
@@ -3270,13 +3270,13 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
for (uint z = 0; z < defaultStyles(); z++)
{
KateAttribute *i = list.at(z);
- QStringList s = config->readListEntry(defaultStyleName(z));
+ TQStringList s = config->readListEntry(defaultStyleName(z));
if (!s.isEmpty())
{
while( s.count()<8)
s << "";
- QString tmp;
+ TQString tmp;
QRgb col;
tmp=s[0]; if (!tmp.isEmpty()) {
@@ -3322,17 +3322,17 @@ void KateHlManager::setDefaults(uint schema, KateAttributeList &list)
for (uint z = 0; z < defaultStyles(); z++)
{
- QStringList settings;
+ TQStringList settings;
KateAttribute *i = list.at(z);
- settings<<(i->itemSet(KateAttribute::TextColor)?QString::number(i->textColor().rgb(),16):"");
- settings<<(i->itemSet(KateAttribute::SelectedTextColor)?QString::number(i->selectedTextColor().rgb(),16):"");
+ settings<<(i->itemSet(KateAttribute::TextColor)?TQString::number(i->textColor().rgb(),16):"");
+ settings<<(i->itemSet(KateAttribute::SelectedTextColor)?TQString::number(i->selectedTextColor().rgb(),16):"");
settings<<(i->itemSet(KateAttribute::Weight)?(i->bold()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::Italic)?(i->italic()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::StrikeOut)?(i->strikeOut()?"1":"0"):"");
settings<<(i->itemSet(KateAttribute::Underline)?(i->underline()?"1":"0"):"");
- settings<<(i->itemSet(KateAttribute::BGColor)?QString::number(i->bgColor().rgb(),16):"-");
- settings<<(i->itemSet(KateAttribute::SelectedBGColor)?QString::number(i->selectedBGColor().rgb(),16):"-");
+ settings<<(i->itemSet(KateAttribute::BGColor)?TQString::number(i->bgColor().rgb(),16):"-");
+ settings<<(i->itemSet(KateAttribute::SelectedBGColor)?TQString::number(i->selectedBGColor().rgb(),16):"-");
settings<<"---";
config->writeEntry(defaultStyleName(z),settings);
@@ -3346,17 +3346,17 @@ int KateHlManager::highlights()
return (int) hlList.count();
}
-QString KateHlManager::hlName(int n)
+TQString KateHlManager::hlName(int n)
{
return hlList.at(n)->name();
}
-QString KateHlManager::hlNameTranslated(int n)
+TQString KateHlManager::hlNameTranslated(int n)
{
return hlList.at(n)->nameTranslated();
}
-QString KateHlManager::hlSection(int n)
+TQString KateHlManager::hlSection(int n)
{
return hlList.at(n)->section();
}
@@ -3366,14 +3366,14 @@ bool KateHlManager::hlHidden(int n)
return hlList.at(n)->hidden();
}
-QString KateHlManager::identifierForName(const QString& name)
+TQString KateHlManager::identifierForName(const TQString& name)
{
KateHighlighting *hl = 0;
if ((hl = hlDict[name]))
return hl->getIdentifier ();
- return QString();
+ return TQString();
}
bool KateHlManager::resetDynamicCtxs()
@@ -3401,7 +3401,7 @@ void KateViewHighlightAction::init()
m_doc = 0;
subMenus.setAutoDelete( true );
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewHighlightAction::updateMenu (Kate::Document *doc)
@@ -3416,8 +3416,8 @@ void KateViewHighlightAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateHlManager::self()->hlNameTranslated (z);
- QString hlSection = KateHlManager::self()->hlSection (z);
+ TQString hlName = KateHlManager::self()->hlNameTranslated (z);
+ TQString hlSection = KateHlManager::self()->hlSection (z);
if (!KateHlManager::self()->hlHidden(z))
{
@@ -3426,19 +3426,19 @@ void KateViewHighlightAction::slotAboutToShow()
if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
- QPopupMenu *menu = new QPopupMenu ();
+ TQPopupMenu *menu = new TQPopupMenu ();
subMenus.append(menu);
popupMenu()->insertItem ( '&' + hlSection, menu);
}
int m = subMenusName.findIndex (hlSection);
names << hlName;
- subMenus.at(m)->insertItem ( '&' + hlName, this, SLOT(setHl(int)), 0, z);
+ subMenus.at(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
}
else if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( '&' + hlName, this, SLOT(setHl(int)), 0, z);
+ popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
}
}
}
diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h
index 70b7016a3..b42fccb62 100644
--- a/kate/part/katehighlight.h
+++ b/kate/part/katehighlight.h
@@ -28,18 +28,18 @@
#include <kconfig.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qregexp.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqregexp.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
class KateHlContext;
class KateHlItem;
@@ -53,19 +53,19 @@ class KateSyntaxModeListItem;
class KateSyntaxContextData;
// some typedefs
-typedef QPtrList<KateAttribute> KateAttributeList;
-typedef QValueList<KateHlIncludeRule*> KateHlIncludeRules;
-typedef QPtrList<KateHlItemData> KateHlItemDataList;
-typedef QPtrList<KateHlData> KateHlDataList;
-typedef QMap<QString,KateEmbeddedHlInfo> KateEmbeddedHlInfos;
-typedef QMap<int*,QString> KateHlUnresolvedCtxRefs;
-typedef QValueList<int> IntList;
+typedef TQPtrList<KateAttribute> KateAttributeList;
+typedef TQValueList<KateHlIncludeRule*> KateHlIncludeRules;
+typedef TQPtrList<KateHlItemData> KateHlItemDataList;
+typedef TQPtrList<KateHlData> KateHlDataList;
+typedef TQMap<TQString,KateEmbeddedHlInfo> KateEmbeddedHlInfos;
+typedef TQMap<int*,TQString> KateHlUnresolvedCtxRefs;
+typedef TQValueList<int> IntList;
//Item Properties: name, Item Style, Item Font
class KateHlItemData : public KateAttribute
{
public:
- KateHlItemData(const QString name, int defStyleNum);
+ KateHlItemData(const TQString name, int defStyleNum);
enum ItemStyles {
dsNormal,
@@ -84,19 +84,19 @@ class KateHlItemData : public KateAttribute
dsError };
public:
- const QString name;
+ const TQString name;
int defStyleNum;
};
class KateHlData
{
public:
- KateHlData(const QString &wildcards, const QString &mimetypes,const QString &identifier, int priority);
+ KateHlData(const TQString &wildcards, const TQString &mimetypes,const TQString &identifier, int priority);
public:
- QString wildcards;
- QString mimetypes;
- QString identifier;
+ TQString wildcards;
+ TQString mimetypes;
+ TQString identifier;
int priority;
};
@@ -109,14 +109,14 @@ class KateHighlighting
public:
void doHighlight ( KateTextLine *prevLine,
KateTextLine *textLine,
- QMemArray<uint> *foldingList,
+ TQMemArray<uint> *foldingList,
bool *ctxChanged );
void loadWildcards();
- QValueList<QRegExp>& getRegexpExtensions();
- QStringList& getPlainExtensions();
+ TQValueList<TQRegExp>& getRegexpExtensions();
+ TQStringList& getPlainExtensions();
- QString getMimetypes();
+ TQString getMimetypes();
// this pointer needs to be deleted !!!!!!!!!!
KateHlData *getData();
@@ -129,15 +129,15 @@ class KateHighlighting
// keep track that you delete them, or mem will be lost
void getKateHlItemDataListCopy (uint schema, KateHlItemDataList &);
- const QString &name() const {return iName;}
- const QString &nameTranslated() const {return iNameTranslated;}
- const QString &section() const {return iSection;}
+ const TQString &name() const {return iName;}
+ const TQString &nameTranslated() const {return iNameTranslated;}
+ const TQString &section() const {return iSection;}
bool hidden() const {return iHidden;}
- const QString &version() const {return iVersion;}
- const QString &author () const { return iAuthor; }
- const QString &license () const { return iLicense; }
+ const TQString &version() const {return iVersion;}
+ const TQString &author () const { return iAuthor; }
+ const TQString &license () const { return iLicense; }
int priority();
- const QString &getIdentifier() const {return identifier;}
+ const TQString &getIdentifier() const {return identifier;}
void use();
void release();
@@ -145,13 +145,13 @@ class KateHighlighting
* @return true if the character @p c is not a deliminator character
* for the corresponding highlight.
*/
- bool isInWord( QChar c, int attrib=0 ) const;
+ bool isInWord( TQChar c, int attrib=0 ) const;
/**
* @return true if the character @p c is a wordwrap deliminator as specified
* in the general keyword section of the xml file.
*/
- bool canBreakAt( QChar c, int attrib=0 ) const;
+ bool canBreakAt( TQChar c, int attrib=0 ) const;
/**
* @return true if @p beginAttr and @p endAttr are members of the same
@@ -169,19 +169,19 @@ class KateHighlighting
* @return the mulitiline comment start marker for the highlight
* corresponding to @p attrib.
*/
- QString getCommentStart( int attrib=0 ) const;
+ TQString getCommentStart( int attrib=0 ) const;
/**
* @return the muiltiline comment end marker for the highlight corresponding
* to @p attrib.
*/
- QString getCommentEnd( int attrib=0 ) const;
+ TQString getCommentEnd( int attrib=0 ) const;
/**
* @return the single comment marker for the highlight corresponding
* to @p attrib.
*/
- QString getCommentSingleLineStart( int attrib=0 ) const;
+ TQString getCommentSingleLineStart( int attrib=0 ) const;
/**
@@ -204,19 +204,19 @@ class KateHighlighting
* map attribute to its highlighting file.
* the returned string is used as key for m_additionalData.
*/
- QString hlKeyForAttrib( int attrib ) const;
+ TQString hlKeyForAttrib( int attrib ) const;
void clearAttributeArrays ();
- QMemArray<KateAttribute> *attributes (uint schema);
+ TQMemArray<KateAttribute> *attributes (uint schema);
inline bool noHighlighting () const { return noHl; };
// be carefull: all documents hl should be invalidated after calling this method!
void dropDynamicContexts();
- QString indentation () { return m_indentation; }
+ TQString indentation () { return m_indentation; }
private:
// make this private, nobody should play with the internal data pointers
@@ -225,10 +225,10 @@ class KateHighlighting
void init();
void done();
void makeContextList ();
- int makeDynamicContext(KateHlContext *model, const QStringList *args);
+ int makeDynamicContext(KateHlContext *model, const TQStringList *args);
void handleKateHlIncludeRules ();
void handleKateHlIncludeRulesRecursive(KateHlIncludeRules::iterator it, KateHlIncludeRules *list);
- int addToContextList(const QString &ident, int ctx0);
+ int addToContextList(const TQString &ident, int ctx0);
void addToKateHlItemDataList();
void createKateHlItemData (KateHlItemDataList &list);
void readGlobalKeywordConfig();
@@ -238,58 +238,58 @@ class KateHighlighting
void readFoldingConfig ();
// manipulates the ctxs array directly ;)
- void generateContextStack(int *ctxNum, int ctx, QMemArray<short> *ctxs, int *posPrevLine);
+ void generateContextStack(int *ctxNum, int ctx, TQMemArray<short> *ctxs, int *posPrevLine);
- KateHlItem *createKateHlItem(KateSyntaxContextData *data, KateHlItemDataList &iDl, QStringList *RegionList, QStringList *ContextList);
- int lookupAttrName(const QString& name, KateHlItemDataList &iDl);
+ KateHlItem *createKateHlItem(KateSyntaxContextData *data, KateHlItemDataList &iDl, TQStringList *RegionList, TQStringList *ContextList);
+ int lookupAttrName(const TQString& name, KateHlItemDataList &iDl);
- void createContextNameList(QStringList *ContextNameList, int ctx0);
- int getIdFromString(QStringList *ContextNameList, QString tmpLineEndContext,/*NO CONST*/ QString &unres);
+ void createContextNameList(TQStringList *ContextNameList, int ctx0);
+ int getIdFromString(TQStringList *ContextNameList, TQString tmpLineEndContext,/*NO CONST*/ TQString &unres);
KateHlItemDataList internalIDList;
- QValueVector<KateHlContext*> m_contexts;
+ TQValueVector<KateHlContext*> m_contexts;
inline KateHlContext *contextNum (uint n) { if (n < m_contexts.size()) return m_contexts[n]; return 0; }
- QMap< QPair<KateHlContext *, QString>, short> dynamicCtxs;
+ TQMap< QPair<KateHlContext *, TQString>, short> dynamicCtxs;
// make them pointers perhaps
KateEmbeddedHlInfos embeddedHls;
KateHlUnresolvedCtxRefs unresolvedContextReferences;
- QStringList RegionList;
- QStringList ContextNameList;
+ TQStringList RegionList;
+ TQStringList ContextNameList;
bool noHl;
bool folding;
bool casesensitive;
- QString weakDeliminator;
- QString deliminator;
+ TQString weakDeliminator;
+ TQString deliminator;
- QString iName;
- QString iNameTranslated;
- QString iSection;
+ TQString iName;
+ TQString iNameTranslated;
+ TQString iSection;
bool iHidden;
- QString iWildcards;
- QString iMimetypes;
- QString identifier;
- QString iVersion;
- QString iAuthor;
- QString iLicense;
- QString m_indentation;
+ TQString iWildcards;
+ TQString iMimetypes;
+ TQString identifier;
+ TQString iVersion;
+ TQString iAuthor;
+ TQString iLicense;
+ TQString m_indentation;
int m_priority;
int refCount;
int startctx, base_startctx;
- QString errorsAndWarnings;
- QString buildIdentifier;
- QString buildPrefix;
+ TQString errorsAndWarnings;
+ TQString buildIdentifier;
+ TQString buildPrefix;
bool building;
uint itemData0;
uint buildContext0Offset;
KateHlIncludeRules includeRules;
bool m_foldingIndentationSensitive;
- QIntDict< QMemArray<KateAttribute> > m_attributeArrays;
+ TQIntDict< TQMemArray<KateAttribute> > m_attributeArrays;
/**
@@ -306,32 +306,32 @@ class KateHighlighting
*/
class HighlightPropertyBag {
public:
- QString singleLineCommentMarker;
- QString multiLineCommentStart;
- QString multiLineCommentEnd;
- QString multiLineRegion;
+ TQString singleLineCommentMarker;
+ TQString multiLineCommentStart;
+ TQString multiLineCommentEnd;
+ TQString multiLineRegion;
CSLPos singleLineCommentPosition;
- QString deliminator;
- QString wordWrapDeliminator;
+ TQString deliminator;
+ TQString wordWrapDeliminator;
};
/**
* Highlight properties for each included highlight definition.
* The key is the identifier
*/
- QDict<HighlightPropertyBag> m_additionalData;
+ TQDict<HighlightPropertyBag> m_additionalData;
/**
* Fast lookup of hl properties, based on attribute index
* The key is the starting index in the attribute array for each file.
* @see hlKeyForAttrib
*/
- QMap<int, QString> m_hlIndex;
+ TQMap<int, TQString> m_hlIndex;
- QString extensionSource;
- QValueList<QRegExp> regexpExtensions;
- QStringList plainExtensions;
+ TQString extensionSource;
+ TQValueList<TQRegExp> regexpExtensions;
+ TQStringList plainExtensions;
public:
inline bool foldingIndentationSensitive () { return m_foldingIndentationSensitive; }
@@ -353,24 +353,24 @@ class KateHlManager : public QObject
inline KConfig *getKConfig() { return &m_config; };
KateHighlighting *getHl(int n);
- int nameFind(const QString &name);
+ int nameFind(const TQString &name);
int detectHighlighting (class KateDocument *doc);
int findHl(KateHighlighting *h) {return hlList.find(h);}
- QString identifierForName(const QString&);
+ TQString identifierForName(const TQString&);
// methodes to get the default style count + names
static uint defaultStyles();
- static QString defaultStyleName(int n, bool translateNames = false);
+ static TQString defaultStyleName(int n, bool translateNames = false);
void getDefaults(uint schema, KateAttributeList &);
void setDefaults(uint schema, KateAttributeList &);
int highlights();
- QString hlName(int n);
- QString hlNameTranslated (int n);
- QString hlSection(int n);
+ TQString hlName(int n);
+ TQString hlNameTranslated (int n);
+ TQString hlSection(int n);
bool hlHidden(int n);
void incDynamicCtxs() { ++dynamicCtxsCount; };
@@ -384,25 +384,25 @@ class KateHlManager : public QObject
void changed();
private:
- int wildcardFind(const QString &fileName);
+ int wildcardFind(const TQString &fileName);
int mimeFind(KateDocument *);
- int realWildcardFind(const QString &fileName);
+ int realWildcardFind(const TQString &fileName);
private:
friend class KateHighlighting;
- QPtrList<KateHighlighting> hlList;
- QDict<KateHighlighting> hlDict;
+ TQPtrList<KateHighlighting> hlList;
+ TQDict<KateHighlighting> hlDict;
static KateHlManager *s_self;
KConfig m_config;
- QStringList commonSuffixes;
+ TQStringList commonSuffixes;
KateSyntaxDocument *syntax;
uint dynamicCtxsCount;
- QTime lastCtxsReset;
+ TQTime lastCtxsReset;
bool forceNoDCReset;
};
@@ -411,7 +411,7 @@ class KateViewHighlightAction: public Kate::ActionMenu
Q_OBJECT
public:
- KateViewHighlightAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewHighlightAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: Kate::ActionMenu(text, parent, name) { init(); };
~KateViewHighlightAction(){;};
@@ -421,10 +421,10 @@ class KateViewHighlightAction: public Kate::ActionMenu
private:
void init();
- QGuardedPtr<Kate::Document> m_doc;
- QStringList subMenusName;
- QStringList names;
- QPtrList<QPopupMenu> subMenus;
+ TQGuardedPtr<Kate::Document> m_doc;
+ TQStringList subMenusName;
+ TQStringList names;
+ TQPtrList<TQPopupMenu> subMenus;
public slots:
void slotAboutToShow();
diff --git a/kate/part/kateindentscriptabstracts.cpp b/kate/part/kateindentscriptabstracts.cpp
index f30dd9ebd..944bce9b0 100644
--- a/kate/part/kateindentscriptabstracts.cpp
+++ b/kate/part/kateindentscriptabstracts.cpp
@@ -19,13 +19,13 @@
#include "kateindentscriptabstracts.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
//BEGIN KateIndentScriptImplAbstractImpl
-KateIndentScriptImplAbstract::KateIndentScriptImplAbstract(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):m_refcount(0),m_filePath(filePath),m_niceName(niceName),
+KateIndentScriptImplAbstract::KateIndentScriptImplAbstract(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):m_refcount(0),m_filePath(filePath),m_niceName(niceName),
m_copyright(copyright),m_version(version)
{
}
diff --git a/kate/part/kateindentscriptabstracts.h b/kate/part/kateindentscriptabstracts.h
index a47a8431a..84dd219fb 100644
--- a/kate/part/kateindentscriptabstracts.h
+++ b/kate/part/kateindentscriptabstracts.h
@@ -19,7 +19,7 @@
#ifndef _KATEINDENTSCRIPTABSTRACTS_H_
#define _KATEINDENTSCRIPTABSTRACTS_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
namespace Kate {
@@ -32,25 +32,25 @@ class KateDocCursor;
class KateIndentScriptImplAbstract {
public:
friend class KateIndentScript;
- KateIndentScriptImplAbstract(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateIndentScriptImplAbstract(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
virtual ~KateIndentScriptImplAbstract();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg )=0;
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg )=0;
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )=0;
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg )=0;
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg )=0;
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )=0;
protected:
virtual void decRef();
long refCount() {return m_refcount;}
- QString filePath() const {return m_filePath;}
+ TQString filePath() const {return m_filePath;}
private:
void incRef();
long m_refcount;
- QString m_internalName;
- QString m_filePath;
- QString m_niceName;
- QString m_copyright;
+ TQString m_internalName;
+ TQString m_filePath;
+ TQString m_niceName;
+ TQString m_copyright;
double m_version;
};
@@ -69,15 +69,15 @@ class KateIndentScript {
return *this;
}
/*operator KateIndentJScript*() const { return m_scr; }*/
- bool processChar( class Kate::View *view, QChar c, QString &errorMsg ) {
+ bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processChar: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processChar(view,c,errorMsg); else return true;
}
- bool processLine( class Kate::View *view, const KateDocCursor& line, QString &errorMsg ) {
+ bool processLine( class Kate::View *view, const KateDocCursor& line, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processLine: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processLine(view,line,errorMsg); else return true;
}
- bool processNewline( class Kate::View *view, const KateDocCursor& begin, bool needcontinue, QString &errorMsg ) {
+ bool processNewline( class Kate::View *view, const KateDocCursor& begin, bool needcontinue, TQString &errorMsg ) {
kdDebug(13050)<<"KateIndentScript::processNewLine: m_scr:"<<m_scr<<endl;
if (m_scr) return m_scr->processNewline(view,begin,needcontinue,errorMsg); else return true;
}
@@ -93,7 +93,7 @@ class KateIndentScriptManagerAbstract
public:
KateIndentScriptManagerAbstract () {};
virtual ~KateIndentScriptManagerAbstract () {};
- virtual KateIndentScript script(const QString &scriptname)=0;
+ virtual KateIndentScript script(const TQString &scriptname)=0;
};
#endif
diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp
index 024f36500..75f5fc513 100644
--- a/kate/part/katejscript.cpp
+++ b/kate/part/katejscript.cpp
@@ -43,11 +43,11 @@
#include <kjs/interpreter.h>
#include <kjs/lookup.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
namespace KJS {
@@ -58,7 +58,7 @@ namespace KJS {
// Copyright (C) 2001-2003 David Faure (faure@kde.org)
// Copyright (C) 2003 Apple Computer, Inc.
-UString::UString(const QString &d)
+UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
@@ -66,14 +66,14 @@ UString::UString(const QString &d)
rep = UString::Rep::create(dat, len);
}
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
-QConstString UString::qconststring() const
+TQConstString UString::qconststring() const
{
- return QConstString((QChar*) data(), size());
+ return TQConstString((TQChar*) data(), size());
}
//BEGIN global methods
@@ -267,7 +267,7 @@ KJS::ObjectImp *KateJScript::wrapView (KJS::ExecState *exec, KateView *view)
return new KateJSView(exec, view);
}
-bool KateJScript::execute (KateView *view, const QString &script, QString &errorMsg)
+bool KateJScript::execute (KateView *view, const TQString &script, TQString &errorMsg)
{
// no view, no fun
if (!view)
@@ -653,13 +653,13 @@ void KateJScriptManager::collectScripts (bool force)
}
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/*.js",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/*.js",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group called:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -667,7 +667,7 @@ void KateJScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
@@ -677,11 +677,11 @@ void KateJScriptManager::collectScripts (bool force)
{
kdDebug (13050) << "add script: " << *it << endl;
- QString desktopFile = (*it).left((*it).length()-2).append ("desktop");
+ TQString desktopFile = (*it).left((*it).length()-2).append ("desktop");
kdDebug (13050) << "add script (desktop file): " << desktopFile << endl;
- QFileInfo dfi (desktopFile);
+ TQFileInfo dfi (desktopFile);
if (dfi.exists())
{
@@ -689,10 +689,10 @@ void KateJScriptManager::collectScripts (bool force)
df.setDesktopGroup ();
// get cmdname, fallback to baseName, if it is empty, therefor not use the kconfig fallback
- QString cmdname = df.readEntry ("X-Kate-Command");
+ TQString cmdname = df.readEntry ("X-Kate-Command");
if (cmdname.isEmpty())
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
cmdname = fi.baseName();
}
@@ -711,7 +711,7 @@ void KateJScriptManager::collectScripts (bool force)
{
kdDebug (13050) << "add script: fallback, no desktop file around!" << endl;
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
@@ -731,7 +731,7 @@ void KateJScriptManager::collectScripts (bool force)
config.sync();
}
-bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &errorMsg )
+bool KateJScriptManager::exec( Kate::View *view, const TQString &_cmd, TQString &errorMsg )
{
// cast it hardcore, we know that it is really a kateview :)
KateView *v = (KateView*) view;
@@ -743,8 +743,8 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
}
//create a list of args
- QStringList args( QStringList::split( QRegExp("\\s+"), _cmd ) );
- QString cmd ( args.first() );
+ TQStringList args( TQStringList::split( TQRegExp("\\s+"), _cmd ) );
+ TQString cmd ( args.first() );
args.remove( args.first() );
kdDebug(13050) << "try to exec: " << cmd << endl;
@@ -755,7 +755,7 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
return false;
}
- QFile file (m_scripts[cmd]->filename);
+ TQFile file (m_scripts[cmd]->filename);
if ( !file.open( IO_ReadOnly ) )
{
@@ -763,17 +763,17 @@ bool KateJScriptManager::exec( Kate::View *view, const QString &_cmd, QString &e
return false;
}
- QTextStream stream( &file );
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
- QString source = stream.read ();
+ TQString source = stream.read ();
file.close();
return KateFactory::self()->jscript()->execute(v, source, errorMsg);
}
-bool KateJScriptManager::help( Kate::View *, const QString &cmd, QString &msg )
+bool KateJScriptManager::help( Kate::View *, const TQString &cmd, TQString &msg )
{
if (!m_scripts[cmd] || !m_scripts[cmd]->desktopFileExists)
return false;
@@ -789,11 +789,11 @@ bool KateJScriptManager::help( Kate::View *, const QString &cmd, QString &msg )
return true;
}
-QStringList KateJScriptManager::cmds()
+TQStringList KateJScriptManager::cmds()
{
- QStringList l;
+ TQStringList l;
- QDictIterator<KateJScriptManager::Script> it( m_scripts );
+ TQDictIterator<KateJScriptManager::Script> it( m_scripts );
for( ; it.current(); ++it )
l << it.current()->name;
@@ -844,9 +844,9 @@ KJS::Value KJS::KateJSIndenterProtoFunc::call(KJS::ExecState *exec, KJS::Object
//END
//BEGIN KateIndentJScriptImpl
-KateIndentJScriptImpl::KateIndentJScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):
+KateIndentJScriptImpl::KateIndentJScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):
KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(0),m_indenter(0)
{
}
@@ -876,7 +876,7 @@ void KateIndentJScriptImpl::deleteInterpreter()
m_interpreter=0;
}
-bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
+bool KateIndentJScriptImpl::setupInterpreter(TQString &errorMsg)
{
if (!m_interpreter)
{
@@ -890,7 +890,7 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
m_interpreter->globalObject().put(m_interpreter->globalExec(),"debug", KJS::Object(new
KateJSGlobalFunctions(KateJSGlobalFunctions::Debug,1)));
m_interpreter->globalObject().put(m_interpreter->globalExec(),"indenter",*m_indenter,KJS::DontDelete | KJS::ReadOnly);
- QFile file (filePath());
+ TQFile file (filePath());
if ( !file.open( IO_ReadOnly ) )
{
@@ -899,10 +899,10 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
return false;
}
- QTextStream stream( &file );
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
- QString source = stream.read ();
+ TQString source = stream.read ();
file.close();
@@ -935,7 +935,7 @@ bool KateIndentJScriptImpl::setupInterpreter(QString &errorMsg)
}
-inline static bool KateIndentJScriptCall(Kate::View *view, QString &errorMsg, KateJSDocument *docWrapper, KateJSView *viewWrapper,
+inline static bool KateIndentJScriptCall(Kate::View *view, TQString &errorMsg, KateJSDocument *docWrapper, KateJSView *viewWrapper,
KJS::Interpreter *interpreter, KJS::Object lookupobj,const KJS::Identifier& func,KJS::List params)
{
// no view, no fun
@@ -972,24 +972,24 @@ inline static bool KateIndentJScriptCall(Kate::View *view, QString &errorMsg, Ka
return true;
}
-bool KateIndentJScriptImpl::processChar(Kate::View *view, QChar c, QString &errorMsg )
+bool KateIndentJScriptImpl::processChar(Kate::View *view, TQChar c, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processChar"<<endl;
if (!setupInterpreter(errorMsg)) return false;
KJS::List params;
- params.append(KJS::String(QString(c)));
+ params.append(KJS::String(TQString(c)));
return KateIndentJScriptCall(view,errorMsg,m_docWrapper,m_viewWrapper,m_interpreter,*m_indenter,KJS::Identifier("onchar"),params);
}
-bool KateIndentJScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, QString &errorMsg )
+bool KateIndentJScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processLine"<<endl;
if (!setupInterpreter(errorMsg)) return false;
return KateIndentJScriptCall(view,errorMsg,m_docWrapper,m_viewWrapper,m_interpreter,*m_indenter,KJS::Identifier("online"),KJS::List());
}
-bool KateIndentJScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )
+bool KateIndentJScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )
{
kdDebug(13050)<<"KateIndentJScriptImpl::processNewline"<<endl;
if (!setupInterpreter(errorMsg)) return false;
@@ -1028,13 +1028,13 @@ void KateIndentJScriptManager::collectScripts (bool force)
#endif
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.js",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.js",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group ed:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -1042,20 +1042,20 @@ void KateIndentJScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
bool readnew=false;
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
{
config.setGroup(Group);
- QString filePath=*it;
- QString internalName=config.readEntry("internlName","KATE-ERROR");
+ TQString filePath=*it;
+ TQString internalName=config.readEntry("internlName","KATE-ERROR");
if (internalName=="KATE-ERROR") readnew=true;
else
{
- QString niceName=config.readEntry("niceName",internalName);
- QString copyright=config.readEntry("copyright",i18n("(Unknown)"));
+ TQString niceName=config.readEntry("niceName",internalName);
+ TQString copyright=config.readEntry("copyright",i18n("(Unknown)"));
double version=config.readDoubleNumEntry("version",0.0);
KateIndentJScriptImpl *s=new KateIndentJScriptImpl(
internalName,filePath,niceName,copyright,version);
@@ -1065,15 +1065,15 @@ void KateIndentJScriptManager::collectScripts (bool force)
else readnew=true;
if (readnew)
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
- QString internalName=fi.baseName();
- QString filePath=*it;
- QString niceName=internalName;
- QString copyright=i18n("(Unknown)");
+ TQString internalName=fi.baseName();
+ TQString filePath=*it;
+ TQString niceName=internalName;
+ TQString copyright=i18n("(Unknown)");
double version=0.0;
parseScriptHeader(filePath,&niceName,&copyright,&version);
/*save the information for retrieval*/
@@ -1093,22 +1093,22 @@ void KateIndentJScriptManager::collectScripts (bool force)
config.sync();
}
-KateIndentScript KateIndentJScriptManager::script(const QString &scriptname) {
+KateIndentScript KateIndentJScriptManager::script(const TQString &scriptname) {
KateIndentJScriptImpl *s=m_scripts[scriptname];
kdDebug(13050)<<scriptname<<"=="<<s<<endl;
return KateIndentScript(s);
}
-void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version)
+void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version)
{
- QFile f(QFile::encodeName(filePath));
+ TQFile f(TQFile::encodeName(filePath));
if (!f.open(IO_ReadOnly) ) {
kdDebug(13050)<<"Header could not be parsed, because file could not be opened"<<endl;
return;
}
- QTextStream st(&f);
- st.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream st(&f);
+ st.setEncoding (TQTextStream::UnicodeUTF8);
if (!st.readLine().upper().startsWith("/**KATE")) {
kdDebug(13050)<<"No header found"<<endl;
f.close();
@@ -1117,12 +1117,12 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
// here the real parsing begins
kdDebug(13050)<<"Parsing indent script header"<<endl;
enum {NOTHING=0,COPYRIGHT=1} currentState=NOTHING;
- QString line;
- QString tmpblockdata="";
- QRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
- QRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
- QRegExp blockContent("[\\s\\t]*\\*(.*)$");
- while ((line=st.readLine())!=QString::null) {
+ TQString line;
+ TQString tmpblockdata="";
+ TQRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
+ TQRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
+ TQRegExp blockContent("[\\s\\t]*\\*(.*)$");
+ while ((line=st.readLine())!=TQString::null) {
if (endExpr.exactMatch(line)) {
kdDebug(13050)<<"end of config block"<<endl;
if (currentState==NOTHING) break;
@@ -1135,11 +1135,11 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
if (currentState==NOTHING)
{
if (keyValue.exactMatch(line)) {
- QStringList sl=keyValue.capturedTexts();
+ TQStringList sl=keyValue.capturedTexts();
kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl;
kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl;
- QString key=sl[1];
- QString value=sl[2];
+ TQString key=sl[1];
+ TQString value=sl[2];
if (key=="NAME") (*niceName)=value.stripWhiteSpace();
else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(0);
else if (key=="COPYRIGHT")
@@ -1152,7 +1152,7 @@ void KateIndentJScriptManager::parseScriptHeader(const QString &filePath,
} else {
if (blockContent.exactMatch(line))
{
- QString bl=blockContent.capturedTexts()[1];
+ TQString bl=blockContent.capturedTexts()[1];
//kdDebug(13050)<<"block content line:"<<bl<<endl<<bl.length()<<" "<<bl.isEmpty()<<endl;
if (bl.isEmpty())
{
diff --git a/kate/part/katejscript.h b/kate/part/katejscript.h
index ac9e20246..f9cf23280 100644
--- a/kate/part/katejscript.h
+++ b/kate/part/katejscript.h
@@ -22,7 +22,7 @@
#include "../interfaces/document.h"
#include "kateindentscriptabstracts.h"
-#include <qdict.h>
+#include <tqdict.h>
#include <kdebug.h>
/**
* Some common stuff
@@ -87,7 +87,7 @@ class KateJScript
* @param errorMsg error to return if no success
* @return success or not?
*/
- bool execute (KateView *view, const QString &script, QString &errorMsg);
+ bool execute (KateView *view, const TQString &script, TQString &errorMsg);
protected:
/**
@@ -124,18 +124,18 @@ class KateJScriptManager : public Kate::Command
* get desktop filename
* @return desktop filename
*/
- inline QString desktopFilename () { return filename.left(filename.length()-2).append ("desktop"); }
+ inline TQString desktopFilename () { return filename.left(filename.length()-2).append ("desktop"); }
public:
/**
* command name, as used for command line and more
*/
- QString name;
+ TQString name;
/**
* filename of the script
*/
- QString filename;
+ TQString filename;
/**
* has it a desktop file?
@@ -165,7 +165,7 @@ class KateJScriptManager : public Kate::Command
* @param errorMsg error to return if no success
* @return success
*/
- bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
+ bool exec( class Kate::View *view, const TQString &cmd, TQString &errorMsg );
/**
* get help for a command
@@ -174,31 +174,31 @@ class KateJScriptManager : public Kate::Command
* @param msg help message
* @return help available or not
*/
- bool help( class Kate::View *view, const QString &cmd, QString &msg );
+ bool help( class Kate::View *view, const TQString &cmd, TQString &msg );
/**
* supported commands as prefixes
* @return prefix list
*/
- QStringList cmds();
+ TQStringList cmds();
private:
/**
* we need to know somewhere which scripts are around
*/
- QDict<KateJScriptManager::Script> m_scripts;
+ TQDict<KateJScriptManager::Script> m_scripts;
};
class KateIndentJScriptImpl: public KateIndentScriptImplAbstract {
public:
- KateIndentJScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateIndentJScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
~KateIndentJScriptImpl();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg );
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg );
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg );
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg );
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg );
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg );
protected:
virtual void decRef();
private:
@@ -206,7 +206,7 @@ class KateIndentJScriptImpl: public KateIndentScriptImplAbstract {
KateJSDocument *m_docWrapper;
KJS::Object *m_indenter;
KJS::Interpreter *m_interpreter;
- bool setupInterpreter(QString &errorMsg);
+ bool setupInterpreter(TQString &errorMsg);
void deleteInterpreter();
};
@@ -216,16 +216,16 @@ class KateIndentJScriptManager: public KateIndentScriptManagerAbstract
public:
KateIndentJScriptManager ();
virtual ~KateIndentJScriptManager ();
- virtual KateIndentScript script(const QString &scriptname);
+ virtual KateIndentScript script(const TQString &scriptname);
private:
/**
* go, search our scripts
* @param force force cache updating?
*/
void collectScripts (bool force = false);
- void parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version);
- QDict<KateIndentJScriptImpl> m_scripts;
+ void parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version);
+ TQDict<KateIndentJScriptImpl> m_scripts;
};
#endif
diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp
index a8872c0e8..dbc7d1fa4 100644
--- a/kate/part/kateluaindentscript.cpp
+++ b/kate/part/kateluaindentscript.cpp
@@ -27,8 +27,8 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -156,7 +156,7 @@ static int katelua_document_insertText(lua_State *L) {
lua_pushstring(L,i18n("document.removeText:Three parameters needed (line,col,text) (number,number,string)").utf8().data());
lua_error(L);
}
- lua_pushboolean(L,katelua_doc->insertText((uint)lua_tonumber(L,1),(uint)lua_tonumber(L,2),QString::fromUtf8(lua_tostring(L,3))));
+ lua_pushboolean(L,katelua_doc->insertText((uint)lua_tonumber(L,1),(uint)lua_tonumber(L,2),TQString::fromUtf8(lua_tostring(L,3))));
return 1;
}
@@ -212,9 +212,9 @@ static void kateregistertable(lua_State* m_interpreter,const KATELUA_FUNCTIONS
//BEGIN KateLUAIndentScriptImpl
-KateLUAIndentScriptImpl::KateLUAIndentScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version):
+KateLUAIndentScriptImpl::KateLUAIndentScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version):
KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(0)/*,m_indenter(0)*/
{
}
@@ -243,7 +243,7 @@ void KateLUAIndentScriptImpl::deleteInterpreter()
}
}
-bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
+bool KateLUAIndentScriptImpl::setupInterpreter(TQString &errorMsg)
{
if (m_interpreter) return true;
m_interpreter=lua_open();
@@ -283,7 +283,7 @@ bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
/*open script*/
lua_pushstring(m_interpreter,"dofile");
lua_gettable(m_interpreter,LUA_GLOBALSINDEX);
- QCString fn=QFile::encodeName(filePath());
+ TQCString fn=TQFile::encodeName(filePath());
lua_pushstring(m_interpreter,fn.data());
int execresult=lua_pcall(m_interpreter,1,1,0);
if (execresult==0) {
@@ -299,7 +299,7 @@ bool KateLUAIndentScriptImpl::setupInterpreter(QString &errorMsg)
}
-bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processChar(Kate::View *view, TQChar c, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
katelua_doc=((KateView*)view)->doc();
@@ -310,7 +310,7 @@ bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &er
bool result=true;
if (!lua_isnil(m_interpreter,lua_gettop(m_interpreter)))
{
- lua_pushstring(m_interpreter,QString(c).utf8().data());
+ lua_pushstring(m_interpreter,TQString(c).utf8().data());
if (lua_pcall(m_interpreter,1,0,0)!=0)
{
errorMsg=i18n("Lua indenting script had errors: %1").arg(lua_tostring(m_interpreter,lua_gettop(m_interpreter)));
@@ -322,13 +322,13 @@ bool KateLUAIndentScriptImpl::processChar(Kate::View *view, QChar c, QString &er
return result;
}
-bool KateLUAIndentScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processLine(Kate::View *view, const KateDocCursor &line, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
return true;
}
-bool KateLUAIndentScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg )
+bool KateLUAIndentScriptImpl::processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg )
{
if (!setupInterpreter(errorMsg)) return false;
katelua_doc=((KateView*)view)->doc();
@@ -383,13 +383,13 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
#endif
// Let's get a list of all the .js files
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.lua",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/scripts/indent/*.lua",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group ed:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -397,20 +397,20 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
kdDebug()<<"Lua script file:"<<(*it)<<endl;
// If the group exist and we're not forced to read the .js file, let's build myModeList for katepartjscriptrc
bool readnew=false;
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
{
config.setGroup(Group);
- QString filePath=*it;
- QString internalName=config.readEntry("internlName","KATE-ERROR");
+ TQString filePath=*it;
+ TQString internalName=config.readEntry("internlName","KATE-ERROR");
if (internalName=="KATE-ERROR") readnew=true;
else
{
- QString niceName=config.readEntry("niceName",internalName);
- QString copyright=config.readEntry("copyright",i18n("(Unknown)"));
+ TQString niceName=config.readEntry("niceName",internalName);
+ TQString copyright=config.readEntry("copyright",i18n("(Unknown)"));
double version=config.readDoubleNumEntry("version",0.0);
KateLUAIndentScriptImpl *s=new KateLUAIndentScriptImpl(
internalName,filePath,niceName,copyright,version);
@@ -420,15 +420,15 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
else readnew=true;
if (readnew)
{
- QFileInfo fi (*it);
+ TQFileInfo fi (*it);
if (m_scripts[fi.baseName()])
continue;
- QString internalName=fi.baseName();
- QString filePath=*it;
- QString niceName=internalName;
- QString copyright=i18n("(Unknown)");
+ TQString internalName=fi.baseName();
+ TQString filePath=*it;
+ TQString niceName=internalName;
+ TQString copyright=i18n("(Unknown)");
double version=0.0;
parseScriptHeader(filePath,&niceName,&copyright,&version);
/*save the information for retrieval*/
@@ -448,23 +448,23 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
config.sync();
}
-KateIndentScript KateLUAIndentScriptManager::script(const QString &scriptname) {
+KateIndentScript KateLUAIndentScriptManager::script(const TQString &scriptname) {
KateLUAIndentScriptImpl *s=m_scripts[scriptname];
kdDebug(13050)<<scriptname<<"=="<<s<<endl;
return KateIndentScript(s);
}
-void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version)
+void KateLUAIndentScriptManager::parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version)
{
#if 0
- QFile f(QFile::encodeName(filePath));
+ TQFile f(TQFile::encodeName(filePath));
if (!f.open(IO_ReadOnly) ) {
kdDebug(13050)<<"Header could not be parsed, because file could not be opened"<<endl;
return;
}
- QTextStream st(&f);
- st.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream st(&f);
+ st.setEncoding (TQTextStream::UnicodeUTF8);
if (!st.readLine().upper().startsWith("/**KATE")) {
kdDebug(13050)<<"No header found"<<endl;
f.close();
@@ -473,12 +473,12 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
// here the real parsing begins
kdDebug(13050)<<"Parsing indent script header"<<endl;
enum {NOTHING=0,COPYRIGHT=1} currentState=NOTHING;
- QString line;
- QString tmpblockdata="";
- QRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
- QRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
- QRegExp blockContent("[\\s\\t]*\\*(.*)$");
- while ((line=st.readLine())!=QString::null) {
+ TQString line;
+ TQString tmpblockdata="";
+ TQRegExp endExpr("[\\s\\t]*\\*\\*\\/[\\s\\t]*$");
+ TQRegExp keyValue("[\\s\\t]*\\*\\s*(.+):(.*)$");
+ TQRegExp blockContent("[\\s\\t]*\\*(.*)$");
+ while ((line=st.readLine())!=TQString::null) {
if (endExpr.exactMatch(line)) {
kdDebug(13050)<<"end of config block"<<endl;
if (currentState==NOTHING) break;
@@ -491,11 +491,11 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
if (currentState==NOTHING)
{
if (keyValue.exactMatch(line)) {
- QStringList sl=keyValue.capturedTexts();
+ TQStringList sl=keyValue.capturedTexts();
kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl;
kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl;
- QString key=sl[1];
- QString value=sl[2];
+ TQString key=sl[1];
+ TQString value=sl[2];
if (key=="NAME") (*niceName)=value.stripWhiteSpace();
else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(0);
else if (key=="COPYRIGHT")
@@ -508,7 +508,7 @@ void KateLUAIndentScriptManager::parseScriptHeader(const QString &filePath,
} else {
if (blockContent.exactMatch(line))
{
- QString bl=blockContent.capturedTexts()[1];
+ TQString bl=blockContent.capturedTexts()[1];
//kdDebug(13050)<<"block content line:"<<bl<<endl<<bl.length()<<" "<<bl.isEmpty()<<endl;
if (bl.isEmpty())
{
diff --git a/kate/part/kateluaindentscript.h b/kate/part/kateluaindentscript.h
index 4cccf85ba..a03a85574 100644
--- a/kate/part/kateluaindentscript.h
+++ b/kate/part/kateluaindentscript.h
@@ -23,24 +23,24 @@
#define _KATELUAINDENTSCRIPT_H_
#include "kateindentscriptabstracts.h"
-#include <qdict.h>
+#include <tqdict.h>
struct lua_State;
class KateLUAIndentScriptImpl: public KateIndentScriptImplAbstract {
public:
- KateLUAIndentScriptImpl(const QString& internalName,
- const QString &filePath, const QString &niceName,
- const QString &copyright, double version);
+ KateLUAIndentScriptImpl(const TQString& internalName,
+ const TQString &filePath, const TQString &niceName,
+ const TQString &copyright, double version);
~KateLUAIndentScriptImpl();
- virtual bool processChar( class Kate::View *view, QChar c, QString &errorMsg );
- virtual bool processLine( class Kate::View *view, const KateDocCursor &line, QString &errorMsg );
- virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, QString &errorMsg );
+ virtual bool processChar( class Kate::View *view, TQChar c, TQString &errorMsg );
+ virtual bool processLine( class Kate::View *view, const KateDocCursor &line, TQString &errorMsg );
+ virtual bool processNewline( class Kate::View *view, const KateDocCursor &begin, bool needcontinue, TQString &errorMsg );
protected:
virtual void decRef();
private:
- bool setupInterpreter(QString &errorMsg);
+ bool setupInterpreter(TQString &errorMsg);
void deleteInterpreter();
struct lua_State *m_interpreter;
};
@@ -51,16 +51,16 @@ class KateLUAIndentScriptManager: public KateIndentScriptManagerAbstract
public:
KateLUAIndentScriptManager ();
virtual ~KateLUAIndentScriptManager ();
- virtual KateIndentScript script(const QString &scriptname);
+ virtual KateIndentScript script(const TQString &scriptname);
private:
/**
* go, search our scripts
* @param force force cache updating?
*/
void collectScripts (bool force = false);
- void parseScriptHeader(const QString &filePath,
- QString *niceName,QString *copyright,double *version);
- QDict<KateLUAIndentScriptImpl> m_scripts;
+ void parseScriptHeader(const TQString &filePath,
+ TQString *niceName,TQString *copyright,double *version);
+ TQDict<KateLUAIndentScriptImpl> m_scripts;
};
#endif
diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp
index 380c50216..e0dbdc728 100644
--- a/kate/part/kateprinter.cpp
+++ b/kate/part/kateprinter.cpp
@@ -40,19 +40,19 @@
#include <kurl.h>
#include <kuser.h> // for loginName
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qpaintdevicemetrics.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
//BEGIN KatePrinter
bool KatePrinter::print (KateDocument *doc)
@@ -75,8 +75,8 @@ bool KatePrinter::print (KateDocument *doc)
//renderer.config()->setSchema (1);
renderer.setPrinterFriendly(true);
- QPainter paint( &printer );
- QPaintDeviceMetrics pdm( &printer );
+ TQPainter paint( &printer );
+ TQPaintDeviceMetrics pdm( &printer );
/*
We work in tree cycles:
1) initialize variables and retrieve print settings
@@ -108,23 +108,23 @@ bool KatePrinter::print (KateDocument *doc)
uint lineNumberWidth( 0 );
// Header/Footer Page
- QFont headerFont; // used for header/footer
- QString f = printer.option("app-kate-hffont");
+ TQFont headerFont; // used for header/footer
+ TQString f = printer.option("app-kate-hffont");
if (!f.isEmpty())
headerFont.fromString( f );
bool useHeader = (printer.option("app-kate-useheader") == "true");
- QColor headerBgColor(printer.option("app-kate-headerbg"));
- QColor headerFgColor(printer.option("app-kate-headerfg"));
+ TQColor headerBgColor(printer.option("app-kate-headerbg"));
+ TQColor headerFgColor(printer.option("app-kate-headerfg"));
uint headerHeight( 0 ); // further init only if needed
- QStringList headerTagList; // do
+ TQStringList headerTagList; // do
bool headerDrawBg = false; // do
bool useFooter = (printer.option("app-kate-usefooter") == "true");
- QColor footerBgColor(printer.option("app-kate-footerbg"));
- QColor footerFgColor(printer.option("app-kate-footerfg"));
+ TQColor footerBgColor(printer.option("app-kate-footerbg"));
+ TQColor footerFgColor(printer.option("app-kate-footerfg"));
uint footerHeight( 0 ); // further init only if needed
- QStringList footerTagList = 0; // do
+ TQStringList footerTagList = 0; // do
bool footerDrawBg = 0; // do
// Layout Page
@@ -133,7 +133,7 @@ bool KatePrinter::print (KateDocument *doc)
bool useBackground = ( printer.option("app-kate-usebackground") == "true" );
bool useBox = (printer.option("app-kate-usebox") == "true");
int boxWidth(printer.option("app-kate-boxwidth").toInt());
- QColor boxColor(printer.option("app-kate-boxcolor"));
+ TQColor boxColor(printer.option("app-kate-boxcolor"));
int innerMargin = useBox ? printer.option("app-kate-boxmargin").toInt() : 6;
// Post initialization
@@ -167,7 +167,7 @@ bool KatePrinter::print (KateDocument *doc)
if ( printLineNumbers )
{
// figure out the horiizontal space required
- QString s( QString("%1 ").arg( doc->numLines() ) );
+ TQString s( TQString("%1 ").arg( doc->numLines() ) );
s.fill('5', -1); // some non-fixed fonts haven't equally wide numbers
// FIXME calculate which is actually the widest...
lineNumberWidth = renderer.currentFontMetrics()->width( s );
@@ -184,8 +184,8 @@ bool KatePrinter::print (KateDocument *doc)
// This retrieves all tags, ued or not, but
// none of theese operations should be expensive,
// and searcing each tag in the format strings is avoided.
- QDateTime dt = QDateTime::currentDateTime();
- QMap<QString,QString> tags;
+ TQDateTime dt = TQDateTime::currentDateTime();
+ TQMap<TQString,TQString> tags;
KUser u (KUser::UseRealUserID);
tags["u"] = u.loginName();
@@ -199,25 +199,25 @@ bool KatePrinter::print (KateDocument *doc)
tags["U"] = doc->url().prettyURL();
if ( selectionOnly )
{
- QString s( i18n("(Selection of) ") );
+ TQString s( i18n("(Selection of) ") );
tags["f"].prepend( s );
tags["U"].prepend( s );
}
- QRegExp reTags( "%([dDfUhuyY])" ); // TODO tjeck for "%%<TAG>"
+ TQRegExp reTags( "%([dDfUhuyY])" ); // TODO tjeck for "%%<TAG>"
if (useHeader)
{
headerDrawBg = ( printer.option("app-kate-headerusebg") == "true" );
- headerHeight = QFontMetrics( headerFont ).height();
+ headerHeight = TQFontMetrics( headerFont ).height();
if ( useBox || headerDrawBg )
headerHeight += innerMargin * 2;
else
- headerHeight += 1 + QFontMetrics( headerFont ).leading();
+ headerHeight += 1 + TQFontMetrics( headerFont ).leading();
- QString headerTags = printer.option("app-kate-headerformat");
+ TQString headerTags = printer.option("app-kate-headerformat");
int pos = reTags.search( headerTags );
- QString rep;
+ TQString rep;
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
@@ -225,7 +225,7 @@ bool KatePrinter::print (KateDocument *doc)
pos += rep.length();
pos = reTags.search( headerTags, pos );
}
- headerTagList = QStringList::split('|', headerTags, true);
+ headerTagList = TQStringList::split('|', headerTags, true);
if (!headerBgColor.isValid())
headerBgColor = Qt::lightGray;
@@ -236,15 +236,15 @@ bool KatePrinter::print (KateDocument *doc)
if (useFooter)
{
footerDrawBg = ( printer.option("app-kate-footerusebg") == "true" );
- footerHeight = QFontMetrics( headerFont ).height();
+ footerHeight = TQFontMetrics( headerFont ).height();
if ( useBox || footerDrawBg )
footerHeight += 2*innerMargin;
else
footerHeight += 1; // line only
- QString footerTags = printer.option("app-kate-footerformat");
+ TQString footerTags = printer.option("app-kate-footerformat");
int pos = reTags.search( footerTags );
- QString rep;
+ TQString rep;
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
@@ -253,7 +253,7 @@ bool KatePrinter::print (KateDocument *doc)
pos = reTags.search( footerTags, pos );
}
- footerTagList = QStringList::split('|', footerTags, true);
+ footerTagList = TQStringList::split('|', footerTags, true);
if (!footerBgColor.isValid())
footerBgColor = Qt::lightGray;
if (!footerFgColor.isValid())
@@ -306,19 +306,19 @@ bool KatePrinter::print (KateDocument *doc)
guideHeight = ( innerMargin * 4 ) + 1;
// get a title and add the height required to draw it
- QString _title = i18n("Typographical Conventions for %1").arg(doc->highlight()->name());
+ TQString _title = i18n("Typographical Conventions for %1").arg(doc->highlight()->name());
guideHeight += paint.boundingRect( 0, 0, _w, 1000, Qt::AlignTop|Qt::AlignHCenter, _title ).height();
// see how many columns we can fit in
int _widest( 0 );
- QPtrListIterator<KateHlItemData> it( ilist );
+ TQPtrListIterator<KateHlItemData> it( ilist );
KateHlItemData *_d;
int _items ( 0 );
while ( ( _d = it.current()) != 0 )
{
- _widest = kMax( _widest, ((QFontMetrics)(
+ _widest = kMax( _widest, ((TQFontMetrics)(
_d->bold() ?
_d->italic() ?
renderer.config()->fontStruct()->myFontMetricsBI :
@@ -375,12 +375,12 @@ bool KatePrinter::print (KateDocument *doc)
if ( _lt ) _pages++; // last page
// substitute both tag lists
- QString re("%P");
- QStringList::Iterator it;
+ TQString re("%P");
+ TQStringList::Iterator it;
for ( it=headerTagList.begin(); it!=headerTagList.end(); ++it )
- (*it).replace( re, QString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
for ( it=footerTagList.begin(); it!=footerTagList.end(); ++it )
- (*it).replace( re, QString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
}
} // end prepare block
@@ -421,11 +421,11 @@ bool KatePrinter::print (KateDocument *doc)
int align = valign|Qt::AlignLeft;
int marg = ( useBox || headerDrawBg ) ? innerMargin : 0;
if ( useBox ) marg += boxWidth;
- QString s;
+ TQString s;
for (int i=0; i<3; i++)
{
s = headerTagList[i];
- if (s.find("%p") != -1) s.replace("%p", QString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, 0, headerWidth-(marg*2), headerHeight, align, s);
align = valign|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -449,11 +449,11 @@ bool KatePrinter::print (KateDocument *doc)
int align = Qt::AlignVCenter|Qt::AlignLeft;
int marg = ( useBox || footerDrawBg ) ? innerMargin : 0;
if ( useBox ) marg += boxWidth;
- QString s;
+ TQString s;
for (int i=0; i<3; i++)
{
s = footerTagList[i];
- if (s.find("%p") != -1) s.replace("%p", QString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, maxHeight+innerMargin, headerWidth-(marg*2), footerHeight, align, s);
align = Qt::AlignVCenter|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -487,7 +487,7 @@ bool KatePrinter::print (KateDocument *doc)
if ( useBox )
{
- paint.setPen(QPen(boxColor, boxWidth));
+ paint.setPen(TQPen(boxColor, boxWidth));
paint.drawRect(0, 0, pdmWidth, pdm.height());
if (useHeader)
paint.drawLine(0, headerHeight, headerWidth, headerHeight);
@@ -522,7 +522,7 @@ bool KatePrinter::print (KateDocument *doc)
}
// draw a title string
paint.setFont( renderer.config()->fontStruct()->myFontBold );
- QRect _r;
+ TQRect _r;
paint.drawText( _marg, y, pdmWidth-(2*_marg), maxHeight - y,
Qt::AlignTop|Qt::AlignHCenter,
i18n("Typographical Conventions for %1").arg(doc->highlight()->name()), -1, &_r );
@@ -533,7 +533,7 @@ bool KatePrinter::print (KateDocument *doc)
y += 1 + innerMargin;
// draw attrib names using their styles
- QPtrListIterator<KateHlItemData> _it( ilist );
+ TQPtrListIterator<KateHlItemData> _it( ilist );
KateHlItemData *_d;
int _cw = _w/guideCols;
int _i(0);
@@ -561,7 +561,7 @@ bool KatePrinter::print (KateDocument *doc)
paint.setPen( renderer.config()->lineNumberColor() );
paint.drawText( (( useBox || useBackground ) ? innerMargin : 0), y,
lineNumberWidth, renderer.fontHeight(),
- Qt::AlignRight, QString("%1").arg( lineCount + 1 ) );
+ Qt::AlignRight, TQString("%1").arg( lineCount + 1 ) );
}
endCol = renderer.textWidth(doc->kateTextLine(lineCount), startCol, maxWidth, &needWrap);
@@ -633,21 +633,21 @@ bool KatePrinter::print (KateDocument *doc)
#ifndef Q_WS_WIN //TODO: reenable
//BEGIN KatePrintTextSettings
-KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Te&xt Settings") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
lo->setSpacing( KDialog::spacingHint() );
- cbSelection = new QCheckBox( i18n("Print &selected text only"), this );
+ cbSelection = new TQCheckBox( i18n("Print &selected text only"), this );
lo->addWidget( cbSelection );
- cbLineNumbers = new QCheckBox( i18n("Print &line numbers"), this );
+ cbLineNumbers = new TQCheckBox( i18n("Print &line numbers"), this );
lo->addWidget( cbLineNumbers );
- cbGuide = new QCheckBox( i18n("Print syntax &guide"), this );
+ cbGuide = new TQCheckBox( i18n("Print syntax &guide"), this );
lo->addWidget( cbGuide );
lo->addStretch( 1 );
@@ -655,26 +655,26 @@ KatePrintTextSettings::KatePrintTextSettings( KPrinter * /*printer*/, QWidget *p
// set defaults - nothing to do :-)
// whatsthis
- QWhatsThis::add( cbSelection, i18n(
+ TQWhatsThis::add( cbSelection, i18n(
"<p>This option is only available if some text is selected in the document.</p>"
"<p>If available and enabled, only the selected text is printed.</p>") );
- QWhatsThis::add( cbLineNumbers, i18n(
+ TQWhatsThis::add( cbLineNumbers, i18n(
"<p>If enabled, line numbers will be printed on the left side of the page(s).</p>") );
- QWhatsThis::add( cbGuide, i18n(
+ TQWhatsThis::add( cbGuide, i18n(
"<p>Print a box displaying typographical conventions for the document type, as "
"defined by the syntax highlighting being used.") );
}
-void KatePrintTextSettings::getOptions( QMap<QString,QString>& opts, bool )
+void KatePrintTextSettings::getOptions( TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-printselection"] = cbSelection->isChecked() ? "true" : "false";
opts["app-kate-printlinenumbers"] = cbLineNumbers->isChecked() ? "true" : "false";
opts["app-kate-printguide"] = cbGuide->isChecked() ? "true" : "false" ;
}
-void KatePrintTextSettings::setOptions( const QMap<QString,QString>& opts )
+void KatePrintTextSettings::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-printselection"];
if ( ! v.isEmpty() )
cbSelection->setChecked( v == "true" );
@@ -694,99 +694,99 @@ void KatePrintTextSettings::enableSelection( bool enable )
//END KatePrintTextSettings
//BEGIN KatePrintHeaderFooter
-KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Hea&der && Footer") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
uint sp = KDialog::spacingHint();
lo->setSpacing( sp );
// enable
- QHBoxLayout *lo1 = new QHBoxLayout ( lo );
- cbEnableHeader = new QCheckBox( i18n("Pr&int header"), this );
+ TQHBoxLayout *lo1 = new TQHBoxLayout ( lo );
+ cbEnableHeader = new TQCheckBox( i18n("Pr&int header"), this );
lo1->addWidget( cbEnableHeader );
- cbEnableFooter = new QCheckBox( i18n("Pri&nt footer"), this );
+ cbEnableFooter = new TQCheckBox( i18n("Pri&nt footer"), this );
lo1->addWidget( cbEnableFooter );
// font
- QHBoxLayout *lo2 = new QHBoxLayout( lo );
- lo2->addWidget( new QLabel( i18n("Header/footer font:"), this ) );
- lFontPreview = new QLabel( this );
- lFontPreview->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQHBoxLayout *lo2 = new TQHBoxLayout( lo );
+ lo2->addWidget( new TQLabel( i18n("Header/footer font:"), this ) );
+ lFontPreview = new TQLabel( this );
+ lFontPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
lo2->addWidget( lFontPreview );
lo2->setStretchFactor( lFontPreview, 1 );
- QPushButton *btnChooseFont = new QPushButton( i18n("Choo&se Font..."), this );
+ TQPushButton *btnChooseFont = new TQPushButton( i18n("Choo&se Font..."), this );
lo2->addWidget( btnChooseFont );
- connect( btnChooseFont, SIGNAL(clicked()), this, SLOT(setHFFont()) );
+ connect( btnChooseFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHFFont()) );
// header
- gbHeader = new QGroupBox( 2, Qt::Horizontal, i18n("Header Properties"), this );
+ gbHeader = new TQGroupBox( 2, Qt::Horizontal, i18n("Header Properties"), this );
lo->addWidget( gbHeader );
- QLabel *lHeaderFormat = new QLabel( i18n("&Format:"), gbHeader );
- QHBox *hbHeaderFormat = new QHBox( gbHeader );
+ TQLabel *lHeaderFormat = new TQLabel( i18n("&Format:"), gbHeader );
+ TQHBox *hbHeaderFormat = new TQHBox( gbHeader );
hbHeaderFormat->setSpacing( sp );
- leHeaderLeft = new QLineEdit( hbHeaderFormat );
- leHeaderCenter = new QLineEdit( hbHeaderFormat );
- leHeaderRight = new QLineEdit( hbHeaderFormat );
+ leHeaderLeft = new TQLineEdit( hbHeaderFormat );
+ leHeaderCenter = new TQLineEdit( hbHeaderFormat );
+ leHeaderRight = new TQLineEdit( hbHeaderFormat );
lHeaderFormat->setBuddy( leHeaderLeft );
- new QLabel( i18n("Colors:"), gbHeader );
- QHBox *hbHeaderColors = new QHBox( gbHeader );
+ new TQLabel( i18n("Colors:"), gbHeader );
+ TQHBox *hbHeaderColors = new TQHBox( gbHeader );
hbHeaderColors->setSpacing( sp );
- QLabel *lHeaderFgCol = new QLabel( i18n("Foreground:"), hbHeaderColors );
+ TQLabel *lHeaderFgCol = new TQLabel( i18n("Foreground:"), hbHeaderColors );
kcbtnHeaderFg = new KColorButton( hbHeaderColors );
lHeaderFgCol->setBuddy( kcbtnHeaderFg );
- cbHeaderEnableBgColor = new QCheckBox( i18n("Bac&kground"), hbHeaderColors );
+ cbHeaderEnableBgColor = new TQCheckBox( i18n("Bac&kground"), hbHeaderColors );
kcbtnHeaderBg = new KColorButton( hbHeaderColors );
- gbFooter = new QGroupBox( 2, Qt::Horizontal, i18n("Footer Properties"), this );
+ gbFooter = new TQGroupBox( 2, Qt::Horizontal, i18n("Footer Properties"), this );
lo->addWidget( gbFooter );
// footer
- QLabel *lFooterFormat = new QLabel( i18n("For&mat:"), gbFooter );
- QHBox *hbFooterFormat = new QHBox( gbFooter );
+ TQLabel *lFooterFormat = new TQLabel( i18n("For&mat:"), gbFooter );
+ TQHBox *hbFooterFormat = new TQHBox( gbFooter );
hbFooterFormat->setSpacing( sp );
- leFooterLeft = new QLineEdit( hbFooterFormat );
- leFooterCenter = new QLineEdit( hbFooterFormat );
- leFooterRight = new QLineEdit( hbFooterFormat );
+ leFooterLeft = new TQLineEdit( hbFooterFormat );
+ leFooterCenter = new TQLineEdit( hbFooterFormat );
+ leFooterRight = new TQLineEdit( hbFooterFormat );
lFooterFormat->setBuddy( leFooterLeft );
- new QLabel( i18n("Colors:"), gbFooter );
- QHBox *hbFooterColors = new QHBox( gbFooter );
+ new TQLabel( i18n("Colors:"), gbFooter );
+ TQHBox *hbFooterColors = new TQHBox( gbFooter );
hbFooterColors->setSpacing( sp );
- QLabel *lFooterBgCol = new QLabel( i18n("Foreground:"), hbFooterColors );
+ TQLabel *lFooterBgCol = new TQLabel( i18n("Foreground:"), hbFooterColors );
kcbtnFooterFg = new KColorButton( hbFooterColors );
lFooterBgCol->setBuddy( kcbtnFooterFg );
- cbFooterEnableBgColor = new QCheckBox( i18n("&Background"), hbFooterColors );
+ cbFooterEnableBgColor = new TQCheckBox( i18n("&Background"), hbFooterColors );
kcbtnFooterBg = new KColorButton( hbFooterColors );
lo->addStretch( 1 );
// user friendly
- connect( cbEnableHeader, SIGNAL(toggled(bool)), gbHeader, SLOT(setEnabled(bool)) );
- connect( cbEnableFooter, SIGNAL(toggled(bool)), gbFooter, SLOT(setEnabled(bool)) );
- connect( cbHeaderEnableBgColor, SIGNAL(toggled(bool)), kcbtnHeaderBg, SLOT(setEnabled(bool)) );
- connect( cbFooterEnableBgColor, SIGNAL(toggled(bool)), kcbtnFooterBg, SLOT(setEnabled(bool)) );
+ connect( cbEnableHeader, TQT_SIGNAL(toggled(bool)), gbHeader, TQT_SLOT(setEnabled(bool)) );
+ connect( cbEnableFooter, TQT_SIGNAL(toggled(bool)), gbFooter, TQT_SLOT(setEnabled(bool)) );
+ connect( cbHeaderEnableBgColor, TQT_SIGNAL(toggled(bool)), kcbtnHeaderBg, TQT_SLOT(setEnabled(bool)) );
+ connect( cbFooterEnableBgColor, TQT_SIGNAL(toggled(bool)), kcbtnFooterBg, TQT_SLOT(setEnabled(bool)) );
// set defaults
cbEnableHeader->setChecked( true );
leHeaderLeft->setText( "%y" );
leHeaderCenter->setText( "%f" );
leHeaderRight->setText( "%p" );
- kcbtnHeaderFg->setColor( QColor("black") );
+ kcbtnHeaderFg->setColor( TQColor("black") );
cbHeaderEnableBgColor->setChecked( true );
- kcbtnHeaderBg->setColor( QColor("lightgrey") );
+ kcbtnHeaderBg->setColor( TQColor("lightgrey") );
cbEnableFooter->setChecked( true );
leFooterRight->setText( "%U" );
- kcbtnFooterFg->setColor( QColor("black") );
+ kcbtnFooterFg->setColor( TQColor("black") );
cbFooterEnableBgColor->setChecked( true );
- kcbtnFooterBg->setColor( QColor("lightgrey") );
+ kcbtnFooterBg->setColor( TQColor("lightgrey") );
// whatsthis
- QString s = i18n("<p>Format of the page header. The following tags are supported:</p>");
- QString s1 = i18n(
+ TQString s = i18n("<p>Format of the page header. The following tags are supported:</p>");
+ TQString s1 = i18n(
"<ul><li><tt>%u</tt>: current user name</li>"
"<li><tt>%d</tt>: complete date/time in short format</li>"
"<li><tt>%D</tt>: complete date/time in long format</li>"
@@ -798,18 +798,18 @@ KatePrintHeaderFooter::KatePrintHeaderFooter( KPrinter * /*printer*/, QWidget *p
"<li><tt>%p</tt>: page number</li>"
"</ul><br>"
"<u>Note:</u> Do <b>not</b> use the '|' (vertical bar) character.");
- QWhatsThis::add(leHeaderRight, s + s1 );
- QWhatsThis::add(leHeaderCenter, s + s1 );
- QWhatsThis::add(leHeaderLeft, s + s1 );
+ TQWhatsThis::add(leHeaderRight, s + s1 );
+ TQWhatsThis::add(leHeaderCenter, s + s1 );
+ TQWhatsThis::add(leHeaderLeft, s + s1 );
s = i18n("<p>Format of the page footer. The following tags are supported:</p>");
- QWhatsThis::add(leFooterRight, s + s1 );
- QWhatsThis::add(leFooterCenter, s + s1 );
- QWhatsThis::add(leFooterLeft, s + s1 );
+ TQWhatsThis::add(leFooterRight, s + s1 );
+ TQWhatsThis::add(leFooterCenter, s + s1 );
+ TQWhatsThis::add(leFooterLeft, s + s1 );
}
-void KatePrintHeaderFooter::getOptions(QMap<QString,QString>& opts, bool )
+void KatePrintHeaderFooter::getOptions(TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-hffont"] = strFont;
@@ -826,12 +826,12 @@ void KatePrintHeaderFooter::getOptions(QMap<QString,QString>& opts, bool )
opts["app-kate-footerformat"] = leFooterLeft->text() + "|" + leFooterCenter->text() + "|" + leFooterRight->text();
}
-void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
+void KatePrintHeaderFooter::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-hffont"];
strFont = v;
- QFont f = font();
+ TQFont f = font();
if ( ! v.isEmpty() )
{
if (!strFont.isEmpty())
@@ -846,15 +846,15 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
cbEnableHeader->setChecked( v == "true" );
v = opts["app-kate-headerfg"];
if ( ! v.isEmpty() )
- kcbtnHeaderFg->setColor( QColor( v ) );
+ kcbtnHeaderFg->setColor( TQColor( v ) );
v = opts["app-kate-headerusebg"];
if ( ! v.isEmpty() )
cbHeaderEnableBgColor->setChecked( v == "true" );
v = opts["app-kate-headerbg"];
if ( ! v.isEmpty() )
- kcbtnHeaderBg->setColor( QColor( v ) );
+ kcbtnHeaderBg->setColor( TQColor( v ) );
- QStringList tags = QStringList::split('|', opts["app-kate-headerformat"], "true");
+ TQStringList tags = TQStringList::split('|', opts["app-kate-headerformat"], "true");
if (tags.count() == 3)
{
leHeaderLeft->setText(tags[0]);
@@ -867,15 +867,15 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
cbEnableFooter->setChecked( v == "true" );
v = opts["app-kate-footerfg"];
if ( ! v.isEmpty() )
- kcbtnFooterFg->setColor( QColor( v ) );
+ kcbtnFooterFg->setColor( TQColor( v ) );
v = opts["app-kate-footerusebg"];
if ( ! v.isEmpty() )
cbFooterEnableBgColor->setChecked( v == "true" );
v = opts["app-kate-footerbg"];
if ( ! v.isEmpty() )
- kcbtnFooterBg->setColor( QColor( v ) );
+ kcbtnFooterBg->setColor( TQColor( v ) );
- tags = QStringList::split('|', opts["app-kate-footerformat"], "true");
+ tags = TQStringList::split('|', opts["app-kate-footerformat"], "true");
if (tags.count() == 3)
{
leFooterLeft->setText(tags[0]);
@@ -886,7 +886,7 @@ void KatePrintHeaderFooter::setOptions( const QMap<QString,QString>& opts )
void KatePrintHeaderFooter::setHFFont()
{
- QFont fnt( lFontPreview->font() );
+ TQFont fnt( lFontPreview->font() );
// display a font dialog
if ( KFontDialog::getFont( fnt, false, this ) == KFontDialog::Accepted )
{
@@ -902,42 +902,42 @@ void KatePrintHeaderFooter::setHFFont()
//BEGIN KatePrintLayout
-KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, QWidget *parent, const char *name )
+KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("L&ayout") );
- QVBoxLayout *lo = new QVBoxLayout ( this );
+ TQVBoxLayout *lo = new TQVBoxLayout ( this );
lo->setSpacing( KDialog::spacingHint() );
- QHBox *hb = new QHBox( this );
+ TQHBox *hb = new TQHBox( this );
lo->addWidget( hb );
- QLabel *lSchema = new QLabel( i18n("&Schema:"), hb );
- cmbSchema = new QComboBox( false, hb );
+ TQLabel *lSchema = new TQLabel( i18n("&Schema:"), hb );
+ cmbSchema = new TQComboBox( false, hb );
lSchema->setBuddy( cmbSchema );
- cbDrawBackground = new QCheckBox( i18n("Draw bac&kground color"), this );
+ cbDrawBackground = new TQCheckBox( i18n("Draw bac&kground color"), this );
lo->addWidget( cbDrawBackground );
- cbEnableBox = new QCheckBox( i18n("Draw &boxes"), this );
+ cbEnableBox = new TQCheckBox( i18n("Draw &boxes"), this );
lo->addWidget( cbEnableBox );
- gbBoxProps = new QGroupBox( 2, Qt::Horizontal, i18n("Box Properties"), this );
+ gbBoxProps = new TQGroupBox( 2, Qt::Horizontal, i18n("Box Properties"), this );
lo->addWidget( gbBoxProps );
- QLabel *lBoxWidth = new QLabel( i18n("W&idth:"), gbBoxProps );
- sbBoxWidth = new QSpinBox( 1, 100, 1, gbBoxProps );
+ TQLabel *lBoxWidth = new TQLabel( i18n("W&idth:"), gbBoxProps );
+ sbBoxWidth = new TQSpinBox( 1, 100, 1, gbBoxProps );
lBoxWidth->setBuddy( sbBoxWidth );
- QLabel *lBoxMargin = new QLabel( i18n("&Margin:"), gbBoxProps );
- sbBoxMargin = new QSpinBox( 0, 100, 1, gbBoxProps );
+ TQLabel *lBoxMargin = new TQLabel( i18n("&Margin:"), gbBoxProps );
+ sbBoxMargin = new TQSpinBox( 0, 100, 1, gbBoxProps );
lBoxMargin->setBuddy( sbBoxMargin );
- QLabel *lBoxColor = new QLabel( i18n("Co&lor:"), gbBoxProps );
+ TQLabel *lBoxColor = new TQLabel( i18n("Co&lor:"), gbBoxProps );
kcbtnBoxColor = new KColorButton( gbBoxProps );
lBoxColor->setBuddy( kcbtnBoxColor );
- connect( cbEnableBox, SIGNAL(toggled(bool)), gbBoxProps, SLOT(setEnabled(bool)) );
+ connect( cbEnableBox, TQT_SIGNAL(toggled(bool)), gbBoxProps, TQT_SLOT(setEnabled(bool)) );
lo->addStretch( 1 );
// set defaults:
@@ -948,24 +948,24 @@ KatePrintLayout::KatePrintLayout( KPrinter * /*printer*/, QWidget *parent, const
// whatsthis
// FIXME uncomment when string freeze is over
-// QWhatsThis::add ( cmbSchema, i18n(
+// TQWhatsThis::add ( cmbSchema, i18n(
// "Select the color scheme to use for the print." ) );
- QWhatsThis::add( cbDrawBackground, i18n(
+ TQWhatsThis::add( cbDrawBackground, i18n(
"<p>If enabled, the background color of the editor will be used.</p>"
"<p>This may be useful if your color scheme is designed for a dark background.</p>") );
- QWhatsThis::add( cbEnableBox, i18n(
+ TQWhatsThis::add( cbEnableBox, i18n(
"<p>If enabled, a box as defined in the properties below will be drawn "
"around the contents of each page. The Header and Footer will be separated "
"from the contents with a line as well.</p>") );
- QWhatsThis::add( sbBoxWidth, i18n(
+ TQWhatsThis::add( sbBoxWidth, i18n(
"The width of the box outline" ) );
- QWhatsThis::add( sbBoxMargin, i18n(
+ TQWhatsThis::add( sbBoxMargin, i18n(
"The margin inside boxes, in pixels") );
- QWhatsThis::add( kcbtnBoxColor, i18n(
+ TQWhatsThis::add( kcbtnBoxColor, i18n(
"The line color to use for boxes") );
}
-void KatePrintLayout::getOptions(QMap<QString,QString>& opts, bool )
+void KatePrintLayout::getOptions(TQMap<TQString,TQString>& opts, bool )
{
opts["app-kate-colorscheme"] = cmbSchema->currentText();
opts["app-kate-usebackground"] = cbDrawBackground->isChecked() ? "true" : "false";
@@ -975,9 +975,9 @@ void KatePrintLayout::getOptions(QMap<QString,QString>& opts, bool )
opts["app-kate-boxcolor"] = kcbtnBoxColor->color().name();
}
-void KatePrintLayout::setOptions( const QMap<QString,QString>& opts )
+void KatePrintLayout::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString v;
+ TQString v;
v = opts["app-kate-colorscheme"];
if ( ! v.isEmpty() )
cmbSchema->setCurrentItem( KateFactory::self()->schemaManager()->number( v ) );
@@ -995,7 +995,7 @@ void KatePrintLayout::setOptions( const QMap<QString,QString>& opts )
sbBoxMargin->setValue( v.toInt() );
v = opts["app-kate-boxcolor"];
if ( ! v.isEmpty() )
- kcbtnBoxColor->setColor( QColor( v ) );
+ kcbtnBoxColor->setColor( TQColor( v ) );
}
//END KatePrintLayout
diff --git a/kate/part/kateprinter.h b/kate/part/kateprinter.h
index f2fb0bc87..3f93b96ca 100644
--- a/kate/part/kateprinter.h
+++ b/kate/part/kateprinter.h
@@ -52,17 +52,17 @@ class KatePrintTextSettings : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintTextSettings( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintTextSettings( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintTextSettings(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
/* call if view has a selection, enables the seelction checkbox according to the arg */
void enableSelection( bool );
private:
- QCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
+ TQCheckBox *cbSelection, *cbLineNumbers, *cbGuide;
};
//END Text Settings
@@ -79,26 +79,26 @@ class KatePrintHeaderFooter : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintHeaderFooter( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintHeaderFooter( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintHeaderFooter(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
public slots:
void setHFFont();
private:
- QCheckBox *cbEnableHeader, *cbEnableFooter;
- QLabel *lFontPreview;
- QString strFont;
- QGroupBox *gbHeader, *gbFooter;
- QLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
+ TQCheckBox *cbEnableHeader, *cbEnableFooter;
+ TQLabel *lFontPreview;
+ TQString strFont;
+ TQGroupBox *gbHeader, *gbFooter;
+ TQLineEdit *leHeaderLeft, *leHeaderCenter, *leHeaderRight;
KColorButton *kcbtnHeaderFg, *kcbtnHeaderBg;
- QCheckBox *cbHeaderEnableBgColor;
- QLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
+ TQCheckBox *cbHeaderEnableBgColor;
+ TQLineEdit *leFooterLeft, *leFooterCenter, *leFooterRight;
KColorButton *kcbtnFooterFg, *kcbtnFooterBg;
- QCheckBox *cbFooterEnableBgColor;
+ TQCheckBox *cbFooterEnableBgColor;
};
//END Header/Footer
@@ -117,17 +117,17 @@ class KatePrintLayout : public KPrintDialogPage
{
Q_OBJECT
public:
- KatePrintLayout( KPrinter *printer, QWidget *parent=0, const char *name=0 );
+ KatePrintLayout( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
~KatePrintLayout(){};
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
- QComboBox *cmbSchema;
- QCheckBox *cbEnableBox, *cbDrawBackground;
- QGroupBox *gbBoxProps;
- QSpinBox *sbBoxWidth, *sbBoxMargin;
+ TQComboBox *cmbSchema;
+ TQCheckBox *cbEnableBox, *cbDrawBackground;
+ TQGroupBox *gbBoxProps;
+ TQSpinBox *sbBoxWidth, *sbBoxMargin;
KColorButton* kcbtnBoxColor;
};
//END Layout
diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp
index 60851481d..265a98282 100644
--- a/kate/part/katerenderer.cpp
+++ b/kate/part/katerenderer.cpp
@@ -31,8 +31,8 @@
#include <kdebug.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
KateRenderer::KateRenderer(KateDocument* doc, KateView *view)
: m_doc(doc), m_view (view), m_caretStyle(KateRenderer::Insert)
@@ -120,7 +120,7 @@ void KateRenderer::setShowSelections(bool showSelections)
void KateRenderer::increaseFontSizes()
{
- QFont f ( *config()->font () );
+ TQFont f ( *config()->font () );
f.setPointSize (f.pointSize ()+1);
config()->setFont (f);
@@ -128,7 +128,7 @@ void KateRenderer::increaseFontSizes()
void KateRenderer::decreaseFontSizes()
{
- QFont f ( *config()->font () );
+ TQFont f ( *config()->font () );
if ((f.pointSize ()-1) > 0)
f.setPointSize (f.pointSize ()-1);
@@ -149,7 +149,7 @@ void KateRenderer::setPrinterFriendly(bool printerFriendly)
setDrawCaret(false);
}
-bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd)
+bool KateRenderer::paintTextLineBackground(TQPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd)
{
if (isPrinterFriendly())
return false;
@@ -158,7 +158,7 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
KateFontStruct *fs = config()->fontStruct();
// Normal background color
- QColor backgroundColor( config()->backgroundColor() );
+ TQColor backgroundColor( config()->backgroundColor() );
bool selectionPainted = false;
if (showSelections() && m_view->lineSelected(line))
@@ -184,7 +184,7 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
KTextEditor::MarkInterface::MarkTypes markType = (KTextEditor::MarkInterface::MarkTypes)(1<<bit);
if (mrk & markType)
{
- QColor markColor = config()->lineMarkerColor(markType);
+ TQColor markColor = config()->lineMarkerColor(markType);
if (markColor.isValid()) {
markCount++;
@@ -214,9 +214,9 @@ bool KateRenderer::paintTextLineBackground(QPainter& paint, int line, bool isCur
return selectionPainted;
}
-void KateRenderer::paintWhitespaceMarker(QPainter &paint, uint x, uint y)
+void KateRenderer::paintWhitespaceMarker(TQPainter &paint, uint x, uint y)
{
- QPen penBackup( paint.pen() );
+ TQPen penBackup( paint.pen() );
paint.setPen( config()->tabMarkerColor() );
paint.drawPoint(x, y);
paint.drawPoint(x + 1, y);
@@ -225,9 +225,9 @@ void KateRenderer::paintWhitespaceMarker(QPainter &paint, uint x, uint y)
}
-void KateRenderer::paintIndentMarker(QPainter &paint, uint x, uint row)
+void KateRenderer::paintIndentMarker(TQPainter &paint, uint x, uint row)
{
- QPen penBackup( paint.pen() );
+ TQPen penBackup( paint.pen() );
paint.setPen( config()->tabMarkerColor() );
const int top = paint.window().top();
@@ -250,7 +250,7 @@ void KateRenderer::paintIndentMarker(QPainter &paint, uint x, uint row)
}
-void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor, const KateBracketRange* bracketmark)
+void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor, const KateBracketRange* bracketmark)
{
int line = range->line;
@@ -341,7 +341,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// text attribs font/style data
KateAttribute* attr = m_doc->highlight()->attributes(m_schema)->data();
- const QColor *cursorColor = &attr[0].textColor();
+ const TQColor *cursorColor = &attr[0].textColor();
// Start arbitrary highlighting
KateTextCursor currentPos(line, startcol);
@@ -352,7 +352,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// Draws the dashed underline at the start of a folded block of text.
if (range->startsInvisibleBlock) {
- paint.setPen(QPen(config()->wordWrapMarkerColor(), 1, Qt::DashLine));
+ paint.setPen(TQPen(config()->wordWrapMarkerColor(), 1, Qt::DashLine));
paint.drawLine(0, fs->fontHeight - 1, xEnd - xStart, fs->fontHeight - 1);
}
@@ -360,7 +360,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (range->xOffset() && range->xOffset() > xStart)
{
paint.fillRect(0, 0, range->xOffset() - xStart, fs->fontHeight,
- QBrush(config()->wordWrapMarkerColor(), QBrush::DiagCrossPattern));
+ TQBrush(config()->wordWrapMarkerColor(), TQBrush::DiagCrossPattern));
}
// painting loop
@@ -373,7 +373,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (showCursor && (cursor->col() >= int(startcol)))
{
cursorVisible = true;
- cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(QChar(' '));
+ cursorXPos = xPos + cursor->col() * fs->myFontMetrics.width(TQChar(' '));
}
}
else
@@ -385,8 +385,8 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
KateAttribute customHL;
- const QColor *curColor = 0;
- const QColor *oldColor = 0;
+ const TQColor *curColor = 0;
+ const TQColor *oldColor = 0;
KateAttribute* oldAt = &attr[0];
@@ -414,7 +414,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
const uint lastIndentColumn = textLine->firstChar();
// Could be precomputed.
- const uint spaceWidth = fs->width (QChar(' '), false, false, m_tabWidth);
+ const uint spaceWidth = fs->width (TQChar(' '), false, false, m_tabWidth);
// Get current x position.
int curPos = textLine->cursorX(curCol, m_tabWidth);
@@ -425,17 +425,17 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// ### if uncommented, causes an O(n^2) behaviour
//Q_ASSERT(curPos == textLine->cursorX(curCol, m_tabWidth));
- QChar curChar = textLine->string()[curCol];
+ TQChar curChar = textLine->string()[curCol];
// Decide if this character is a tab - we treat the spacing differently
// TODO: move tab width calculation elsewhere?
- bool isTab = curChar == QChar('\t');
+ bool isTab = curChar == TQChar('\t');
// Determine current syntax highlighting attribute
// A bit legacy but doesn't need to change
KateAttribute* curAt = (noAttribs || ((*textAttributes) >= atLen)) ? &attr[0] : &attr[*textAttributes];
// X position calculation. Incorrect for fonts with non-zero leftBearing() and rightBearing() results.
- // TODO: make internal charWidth() function, use QFontMetrics::charWidth().
+ // TODO: make internal charWidth() function, use TQFontMetrics::charWidth().
xPosAfter += curAt->width(*fs, curChar, m_tabWidth);
// Tab special treatment, move to charWidth().
@@ -514,7 +514,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// the next char is a tab (removed the "and this isn't" because that's dealt with above)
// i.e. we have to draw the current text so the tab can be rendered as above.
- || (textLine->string()[nextCol] == QChar('\t'))
+ || (textLine->string()[nextCol] == TQChar('\t'))
// input method edit area
|| ( m_view && (isIMEdit != m_view->isIMEdit( line, nextCol )) )
@@ -532,21 +532,21 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
{
bool paintBackground = true;
uint width = xPosAfter - oldXPos;
- QColor fillColor;
+ TQColor fillColor;
if (isIMSel && !isTab)
{
// input method selection
- fillColor = m_view->colorGroup().color(QColorGroup::Foreground);
+ fillColor = m_view->colorGroup().color(TQColorGroup::Foreground);
}
else if (isIMEdit && !isTab)
{
// XIM support
// input method edit area
- const QColorGroup& cg = m_view->colorGroup();
+ const TQColorGroup& cg = m_view->colorGroup();
int h1, s1, v1, h2, s2, v2;
- cg.color( QColorGroup::Base ).hsv( &h1, &s1, &v1 );
- cg.color( QColorGroup::Background ).hsv( &h2, &s2, &v2 );
+ cg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
+ cg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 );
fillColor.setHsv( h1, s1, ( v1 + v2 ) / 2 );
}
else if (!selectionPainted && (isSel || currentHL.itemSet(KateAttribute::BGColor)))
@@ -576,7 +576,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (isIMSel && paintBackground && !isTab)
{
paint.save();
- paint.setPen( m_view->colorGroup().color( QColorGroup::BrightText ) );
+ paint.setPen( m_view->colorGroup().color( TQColorGroup::BrightText ) );
}
// Draw indentation markers.
@@ -612,11 +612,11 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (isTab || (curCol >= trailingWhitespaceColumn))
{
// Draw spaces too, because it might be eg. underlined
- static QString spaces;
+ static TQString spaces;
if (int(spaces.length()) != m_tabWidth)
spaces.fill(' ', m_tabWidth);
- paint.drawText(oldXPos-xStart, y, isTab ? spaces : QString(" "));
+ paint.drawText(oldXPos-xStart, y, isTab ? spaces : TQString(" "));
if (showTabs())
{
@@ -636,7 +636,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
// Draw preedit's underline
if (isIMEdit) {
- QRect r( oldXPos - xStart, 0, xPosAfter - oldXPos, fs->fontHeight );
+ TQRect r( oldXPos - xStart, 0, xPosAfter - oldXPos, fs->fontHeight );
paint.drawLine( r.bottomLeft(), r.bottomRight() );
}
@@ -707,7 +707,7 @@ void KateRenderer::paintTextLine(QPainter& paint, const KateLineRange* range, in
if (showCursor && (cursor->col() >= int(curCol)))
{
cursorVisible = true;
- cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(QChar(' '));
+ cursorXPos = xPos + (cursor->col() - int(curCol)) * fs->myFontMetrics.width(TQChar(' '));
cursorMaxWidth = xPosAfter - xPos;
cursorColor = &oldAt->textColor();
}
@@ -745,8 +745,8 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
KateFontStruct *fs = config()->fontStruct();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
int x = 0;
int width;
@@ -758,12 +758,12 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
} else {
// DF: commented out. It happens all the time.
//Q_ASSERT(!m_doc->wrapCursor());
- width = a->width(*fs, QChar(' '), m_tabWidth);
+ width = a->width(*fs, TQChar(' '), m_tabWidth);
}
x += width;
- if (z < len && unicode[z] == QChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
}
@@ -787,8 +787,8 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
*needWrap = false;
const uint len = textLine->length();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
uint z = startcol;
for (; z < len; z++)
@@ -800,7 +800,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
// How should tabs be treated when they word-wrap on a print-out?
// if startcol != 0, this messes up (then again, word wrapping messes up anyway)
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x -= x % width;
if (unicode[z].isSpace())
@@ -887,8 +887,8 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (!textLine) return 0;
const uint len = textLine->length();
- const QChar *unicode = textLine->text();
- const QString &textString = textLine->string();
+ const TQChar *unicode = textLine->text();
+ const TQString &textString = textLine->string();
x = oldX = 0;
uint z = startCol;
@@ -902,11 +902,11 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (z < len)
width = a->width(*fs, textString, z, m_tabWidth);
else
- width = a->width(*fs, QChar(' '), m_tabWidth);
+ width = a->width(*fs, TQChar(' '), m_tabWidth);
x += width;
- if (z < len && unicode[z] == QChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
z++;
@@ -919,12 +919,12 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
return x;
}
-const QFont *KateRenderer::currentFont()
+const TQFont *KateRenderer::currentFont()
{
return config()->font();
}
-const QFontMetrics* KateRenderer::currentFontMetrics()
+const TQFontMetrics* KateRenderer::currentFontMetrics()
{
return config()->fontMetrics();
}
@@ -947,7 +947,7 @@ uint KateRenderer::textPos(const KateTextLine::Ptr &textLine, int xPos, uint sta
uint z = startCol;
const uint len = textLine->length();
- const QString &textString = textLine->string();
+ const TQString &textString = textLine->string();
while ( (x < xPos) && (z < len)) {
oldX = x;
@@ -1026,7 +1026,7 @@ void KateRenderer::updateConfig ()
uint KateRenderer::spaceWidth()
{
- return attribute(0)->width(*config()->fontStruct(), QChar(' '), m_tabWidth);
+ return attribute(0)->width(*config()->fontStruct(), TQChar(' '), m_tabWidth);
}
// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katerenderer.h b/kate/part/katerenderer.h
index fc4865ab1..1b9169efd 100644
--- a/kate/part/katerenderer.h
+++ b/kate/part/katerenderer.h
@@ -26,8 +26,8 @@
#include "kateattribute.h"
#include "katetextline.h"
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
class KateDocument;
class KateView;
@@ -147,8 +147,8 @@ public:
*/
void increaseFontSizes();
void decreaseFontSizes();
- const QFont* currentFont();
- const QFontMetrics* currentFontMetrics();
+ const TQFont* currentFont();
+ const TQFontMetrics* currentFontMetrics();
/**
* @return whether the renderer is configured to paint in a
@@ -207,7 +207,7 @@ public:
* The text line is painted from the upper limit of (0,0). To move that,
* apply a transform to your painter.
*/
- void paintTextLine(QPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = 0L, const KateBracketRange* bracketmark = 0L);
+ void paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = 0L, const KateBracketRange* bracketmark = 0L);
/**
* Paint the background of a line
@@ -218,7 +218,7 @@ public:
*
* @return whether the selection has been painted or not
*/
- bool paintTextLineBackground(QPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd);
+ bool paintTextLineBackground(TQPainter& paint, int line, bool isCurrentLine, int xStart, int xEnd);
/**
* This takes an in index, and returns all the attributes for it.
@@ -235,10 +235,10 @@ public:
*
* Currently only used by the tabs, but it will also be used for highlighting trailing whitespace
*/
- void paintWhitespaceMarker(QPainter &paint, uint x, uint y);
+ void paintWhitespaceMarker(TQPainter &paint, uint x, uint y);
/** Paint a SciTE-like indent marker. */
- void paintIndentMarker(QPainter &paint, uint x, uint y);
+ void paintIndentMarker(TQPainter &paint, uint x, uint y);
KateDocument* m_doc;
KateView *m_view;
@@ -255,7 +255,7 @@ public:
bool m_showTabs;
bool m_printerFriendly;
- QMemArray<KateAttribute> *m_attributes;
+ TQMemArray<KateAttribute> *m_attributes;
/**
* Configuration
diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp
index e0a5d5dba..6e73a9f75 100644
--- a/kate/part/kateschema.cpp
+++ b/kate/part/kateschema.cpp
@@ -42,35 +42,35 @@
#include <kaboutdata.h>
#include <ktexteditor/markinterface.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qptrcollection.h>
-#include <qdialog.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qhbox.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqptrcollection.h>
+#include <tqdialog.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqhbox.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
//END
//BEGIN KateStyleListViewItem decl
/*
- QListViewItem subclass to display/edit a style, bold/italic is check boxes,
+ TQListViewItem subclass to display/edit a style, bold/italic is check boxes,
normal and selected colors are boxes, which will display a color chooser when
activated.
The context name for the style will be drawn using the editor default font and
@@ -83,9 +83,9 @@
class KateStyleListItem : public QListViewItem
{
public:
- KateStyleListItem( QListViewItem *parent=0, const QString & stylename=0,
+ KateStyleListItem( TQListViewItem *parent=0, const TQString & stylename=0,
class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
- KateStyleListItem( QListView *parent, const QString & stylename=0,
+ KateStyleListItem( TQListView *parent, const TQString & stylename=0,
class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
~KateStyleListItem() { if (st) delete is; };
@@ -97,9 +97,9 @@ class KateStyleListItem : public QListViewItem
/* updates the hldata's style */
void updateStyle();
/* reimp */
- virtual int width ( const QFontMetrics & fm, const QListView * lv, int c ) const;
+ virtual int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const;
/* calls changeProperty() if it makes sense considering pos. */
- void activate( int column, const QPoint &localPos );
+ void activate( int column, const TQPoint &localPos );
/* For bool fields, toggles them, for color fields, display a color chooser */
void changeProperty( Property p );
/** unset a color.
@@ -107,7 +107,7 @@ class KateStyleListItem : public QListViewItem
*/
void unsetColor( int c );
/* style context name */
- QString contextName() { return text(0); };
+ TQString contextName() { return text(0); };
/* only true for a hl mode item using it's default style */
bool defStyle();
/* true for default styles */
@@ -118,7 +118,7 @@ class KateStyleListItem : public QListViewItem
protected:
/* reimp */
- void paintCell(QPainter *p, const QColorGroup& cg, int col, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup& cg, int col, int width, int align);
private:
/* private methods to change properties */
@@ -144,23 +144,23 @@ class KateStyleListItem : public QListViewItem
class KateStyleListCaption : public QListViewItem
{
public:
- KateStyleListCaption( QListView *parent, const QString & name );
+ KateStyleListCaption( TQListView *parent, const TQString & name );
~KateStyleListCaption() {};
protected:
- void paintCell(QPainter *p, const QColorGroup& cg, int col, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup& cg, int col, int width, int align);
};
//END
//BEGIN KateSchemaManager
-QString KateSchemaManager::normalSchema ()
+TQString KateSchemaManager::normalSchema ()
{
- return KApplication::kApplication()->aboutData()->appName () + QString (" - Normal");
+ return KApplication::kApplication()->aboutData()->appName () + TQString (" - Normal");
}
-QString KateSchemaManager::printingSchema ()
+TQString KateSchemaManager::printingSchema ()
{
- return KApplication::kApplication()->aboutData()->appName () + QString (" - Printing");
+ return KApplication::kApplication()->aboutData()->appName () + TQString (" - Printing");
}
KateSchemaManager::KateSchemaManager ()
@@ -206,7 +206,7 @@ KConfig *KateSchemaManager::schema (uint number)
return &m_config;
}
-void KateSchemaManager::addSchema (const QString &t)
+void KateSchemaManager::addSchema (const TQString &t)
{
m_config.setGroup (t);
m_config.writeEntry("Color Background", KGlobalSettings::baseColor());
@@ -235,7 +235,7 @@ bool KateSchemaManager::validSchema (uint number)
return false;
}
-uint KateSchemaManager::number (const QString &name)
+uint KateSchemaManager::number (const TQString &name)
{
if (name == normalSchema())
return 0;
@@ -250,7 +250,7 @@ uint KateSchemaManager::number (const QString &name)
return 0;
}
-QString KateSchemaManager::name (uint number)
+TQString KateSchemaManager::name (uint number)
{
if ((number>1) && (number < m_schemas.count()))
return m_schemas[number];
@@ -266,38 +266,38 @@ QString KateSchemaManager::name (uint number)
//
//BEGIN KateSchemaConfigColorTab -- 'Colors' tab
-KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigColorTab::KateSchemaConfigColorTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
m_schema = -1;
- QHBox *b;
- QLabel *label;
+ TQHBox *b;
+ TQLabel *label;
- QVBoxLayout *blay=new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *blay=new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QVGroupBox *gbTextArea = new QVGroupBox(i18n("Text Area Background"), this);
+ TQVGroupBox *gbTextArea = new TQVGroupBox(i18n("Text Area Background"), this);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Normal text:"), b);
+ label = new TQLabel( i18n("Normal text:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_back = new KColorButton(b);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Selected text:"), b);
+ label = new TQLabel( i18n("Selected text:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_selected = new KColorButton(b);
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Current line:"), b);
+ label = new TQLabel( i18n("Current line:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_current = new KColorButton(b);
// Markers from kdelibs/interfaces/ktextinterface/markinterface.h
- b = new QHBox (gbTextArea);
+ b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
m_combobox = new KComboBox(b, "color_combo_box");
// add the predefined mark types as defined in markinterface.h
@@ -310,39 +310,39 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char
m_combobox->insertItem(i18n("Error")); // markType07
m_combobox->setCurrentItem(0);
m_markers = new KColorButton(b, "marker_color_button");
- connect( m_combobox, SIGNAL( activated( int ) ), SLOT( slotComboBoxChanged( int ) ) );
+ connect( m_combobox, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboBoxChanged( int ) ) );
blay->addWidget(gbTextArea);
- QVGroupBox *gbBorder = new QVGroupBox(i18n("Additional Elements"), this);
+ TQVGroupBox *gbBorder = new TQVGroupBox(i18n("Additional Elements"), this);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Left border background:"), b);
+ label = new TQLabel( i18n("Left border background:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_iconborder = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Line numbers:"), b);
+ label = new TQLabel( i18n("Line numbers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_linenumber = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Bracket highlight:"), b);
+ label = new TQLabel( i18n("Bracket highlight:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_bracket = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Word wrap markers:"), b);
+ label = new TQLabel( i18n("Word wrap markers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_wwmarker = new KColorButton(b);
- b = new QHBox (gbBorder);
+ b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
- label = new QLabel( i18n("Tab markers:"), b);
+ label = new TQLabel( i18n("Tab markers:"), b);
label->setAlignment( AlignLeft|AlignVCenter);
m_tmarker = new KColorButton(b);
@@ -351,32 +351,32 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( QWidget *parent, const char
blay->addStretch();
// connect signal changed(); changed is emitted by a ColorButton change!
- connect( this, SIGNAL( changed() ), parent->parentWidget(), SLOT( slotChanged() ) );
+ connect( this, TQT_SIGNAL( changed() ), parent->parentWidget(), TQT_SLOT( slotChanged() ) );
- // QWhatsThis help
- QWhatsThis::add(m_back, i18n("<p>Sets the background color of the editing area.</p>"));
- QWhatsThis::add(m_selected, i18n("<p>Sets the background color of the selection.</p>"
+ // TQWhatsThis help
+ TQWhatsThis::add(m_back, i18n("<p>Sets the background color of the editing area.</p>"));
+ TQWhatsThis::add(m_selected, i18n("<p>Sets the background color of the selection.</p>"
"<p>To set the text color for selected text, use the \"<b>Configure "
"Highlighting</b>\" dialog.</p>"));
- QWhatsThis::add(m_markers, i18n("<p>Sets the background color of the selected "
+ TQWhatsThis::add(m_markers, i18n("<p>Sets the background color of the selected "
"marker type.</p><p><b>Note</b>: The marker color is displayed lightly because "
"of transparency.</p>"));
- QWhatsThis::add(m_combobox, i18n("<p>Select the marker type you want to change.</p>"));
- QWhatsThis::add(m_current, i18n("<p>Sets the background color of the currently "
+ TQWhatsThis::add(m_combobox, i18n("<p>Select the marker type you want to change.</p>"));
+ TQWhatsThis::add(m_current, i18n("<p>Sets the background color of the currently "
"active line, which means the line where your cursor is positioned.</p>"));
- QWhatsThis::add( m_linenumber, i18n(
+ TQWhatsThis::add( m_linenumber, i18n(
"<p>This color will be used to draw the line numbers (if enabled) and the "
"lines in the code-folding pane.</p>" ) );
- QWhatsThis::add(m_bracket, i18n("<p>Sets the bracket matching color. This means, "
+ TQWhatsThis::add(m_bracket, i18n("<p>Sets the bracket matching color. This means, "
"if you place the cursor e.g. at a <b>(</b>, the matching <b>)</b> will "
"be highlighted with this color.</p>"));
- QWhatsThis::add(m_wwmarker, i18n(
+ TQWhatsThis::add(m_wwmarker, i18n(
"<p>Sets the color of Word Wrap-related markers:</p>"
"<dl><dt>Static Word Wrap</dt><dd>A vertical line which shows the column where "
"text is going to be wrapped</dd>"
"<dt>Dynamic Word Wrap</dt><dd>An arrow shown to the left of "
"visually-wrapped lines</dd></dl>"));
- QWhatsThis::add(m_tmarker, i18n(
+ TQWhatsThis::add(m_tmarker, i18n(
"<p>Sets the color of the tabulator marks:</p>"));
}
@@ -405,31 +405,31 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
m_schema = newSchema;
// first disconnect all signals otherwise setColor emits changed
- m_back ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_selected ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_current ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_bracket ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_wwmarker ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_iconborder->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_tmarker ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_markers ->disconnect( SIGNAL( changed( const QColor & ) ) );
- m_linenumber->disconnect( SIGNAL( changed( const QColor & ) ) );
+ m_back ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_selected ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_current ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_bracket ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_wwmarker ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_iconborder->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_tmarker ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_markers ->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
+ m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
// If we havent this schema, read in from config file
if ( ! m_schemas.contains( newSchema ) )
{
// fallback defaults
- QColor tmp0 (KGlobalSettings::baseColor());
- QColor tmp1 (KGlobalSettings::highlightColor());
- QColor tmp2 (KGlobalSettings::alternateBackgroundColor());
- QColor tmp3 ( "#FFFF99" );
- QColor tmp4 (tmp2.dark());
- QColor tmp5 ( KGlobalSettings::textColor() );
- QColor tmp6 ( "#EAE9E8" );
- QColor tmp7 ( "#000000" );
+ TQColor tmp0 (KGlobalSettings::baseColor());
+ TQColor tmp1 (KGlobalSettings::highlightColor());
+ TQColor tmp2 (KGlobalSettings::alternateBackgroundColor());
+ TQColor tmp3 ( "#FFFF99" );
+ TQColor tmp4 (tmp2.dark());
+ TQColor tmp5 ( KGlobalSettings::textColor() );
+ TQColor tmp6 ( "#EAE9E8" );
+ TQColor tmp7 ( "#000000" );
// same std colors like in KateDocument::markColor
- QValueVector <QColor> mark(KTextEditor::MarkInterface::reservedMarkersCount());
+ TQValueVector <TQColor> mark(KTextEditor::MarkInterface::reservedMarkersCount());
Q_ASSERT(mark.size() > 6);
mark[0] = Qt::blue;
mark[1] = Qt::red;
@@ -452,7 +452,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
c.linenumber = config->readColorEntry("Color Line Number", &tmp7);
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
- c.markerColors[i] = config->readColorEntry( QString("Color MarkType%1").arg(i+1), &mark[i] );
+ c.markerColors[i] = config->readColorEntry( TQString("Color MarkType%1").arg(i+1), &mark[i] );
m_schemas[ newSchema ] = c;
}
@@ -469,27 +469,27 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
// map from 0..reservedMarkersCount()-1 - the same index as in markInterface
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
{
- QPixmap pix(16, 16);
+ TQPixmap pix(16, 16);
pix.fill( m_schemas [ newSchema ].markerColors[i]);
m_combobox->changeItem(pix, m_combobox->text(i), i);
}
m_markers->setColor( m_schemas [ newSchema ].markerColors[ m_combobox->currentItem() ] );
- connect( m_back , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_selected , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_current , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_bracket , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_wwmarker , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_iconborder, SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_tmarker , SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_linenumber, SIGNAL( changed( const QColor& ) ), SIGNAL( changed() ) );
- connect( m_markers , SIGNAL( changed( const QColor& ) ), SLOT( slotMarkerColorChanged( const QColor& ) ) );
+ connect( m_back , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_selected , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_current , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_bracket , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_wwmarker , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_iconborder, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_tmarker , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_linenumber, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SIGNAL( changed() ) );
+ connect( m_markers , TQT_SIGNAL( changed( const TQColor& ) ), TQT_SLOT( slotMarkerColorChanged( const TQColor& ) ) );
}
void KateSchemaConfigColorTab::apply ()
{
schemaChanged( m_schema );
- QMap<int,SchemaColors>::Iterator it;
+ TQMap<int,SchemaColors>::Iterator it;
for ( it = m_schemas.begin(); it != m_schemas.end(); ++it )
{
kdDebug(13030)<<"APPLY scheme = "<<it.key()<<endl;
@@ -508,16 +508,16 @@ void KateSchemaConfigColorTab::apply ()
for (int i = 0; i < KTextEditor::MarkInterface::reservedMarkersCount(); i++)
{
- config->writeEntry(QString("Color MarkType%1").arg(i + 1), c.markerColors[i]);
+ config->writeEntry(TQString("Color MarkType%1").arg(i + 1), c.markerColors[i]);
}
}
}
-void KateSchemaConfigColorTab::slotMarkerColorChanged( const QColor& color)
+void KateSchemaConfigColorTab::slotMarkerColorChanged( const TQColor& color)
{
int index = m_combobox->currentItem();
m_schemas[ m_schema ].markerColors[ index ] = color;
- QPixmap pix(16, 16);
+ TQPixmap pix(16, 16);
pix.fill(color);
m_combobox->changeItem(pix, m_combobox->text(index), index);
@@ -527,25 +527,25 @@ void KateSchemaConfigColorTab::slotMarkerColorChanged( const QColor& color)
void KateSchemaConfigColorTab::slotComboBoxChanged(int index)
{
// temporarily disconnect the changed-signal because setColor emits changed as well
- m_markers->disconnect( SIGNAL( changed( const QColor& ) ) );
+ m_markers->disconnect( TQT_SIGNAL( changed( const TQColor& ) ) );
m_markers->setColor( m_schemas[m_schema].markerColors[index] );
- connect( m_markers, SIGNAL( changed( const QColor& ) ), SLOT( slotMarkerColorChanged( const QColor& ) ) );
+ connect( m_markers, TQT_SIGNAL( changed( const TQColor& ) ), TQT_SLOT( slotMarkerColorChanged( const TQColor& ) ) );
}
//END KateSchemaConfigColorTab
//BEGIN FontConfig -- 'Fonts' tab
-KateSchemaConfigFontTab::KateSchemaConfigFontTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
- m_fontchooser = new KFontChooser ( this, 0L, false, QStringList(), false );
+ m_fontchooser = new KFontChooser ( this, 0L, false, TQStringList(), false );
m_fontchooser->enableColumn(KFontChooser::StyleList, false);
grid->addWidget( m_fontchooser, 0, 0);
- connect (this, SIGNAL( changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
m_schema = -1;
}
@@ -553,7 +553,7 @@ KateSchemaConfigFontTab::~KateSchemaConfigFontTab()
{
}
-void KateSchemaConfigFontTab::slotFontSelected( const QFont &font )
+void KateSchemaConfigFontTab::slotFontSelected( const TQFont &font )
{
if ( m_schema > -1 )
{
@@ -578,30 +578,30 @@ void KateSchemaConfigFontTab::schemaChanged( int newSchema )
m_schema = newSchema;
- QFont f (KGlobalSettings::fixedFont());
+ TQFont f (KGlobalSettings::fixedFont());
m_fontchooser->disconnect ( this );
m_fontchooser->setFont ( KateFactory::self()->schemaManager()->schema( newSchema )->readFontEntry("Font", &f) );
m_fonts[ newSchema ] = m_fontchooser->font();
- connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & )));
+ connect (m_fontchooser, TQT_SIGNAL (fontSelected( const TQFont & )), this, TQT_SLOT (slotFontSelected( const TQFont & )));
}
//END FontConfig
//BEGIN FontColorConfig -- 'Normal Text Styles' tab
-KateSchemaConfigFontColorTab::KateSchemaConfigFontColorTab( QWidget *parent, const char * )
- : QWidget (parent)
+KateSchemaConfigFontColorTab::KateSchemaConfigFontColorTab( TQWidget *parent, const char * )
+ : TQWidget (parent)
{
m_defaultStyleLists.setAutoDelete(true);
// sizemanagment
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
m_defaultStyles = new KateStyleListView( this, false );
grid->addWidget( m_defaultStyles, 0, 0);
- connect (m_defaultStyles, SIGNAL (changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (m_defaultStyles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
- QWhatsThis::add( m_defaultStyles, i18n(
+ TQWhatsThis::add( m_defaultStyles, i18n(
"This list displays the default styles for the current schema and "
"offers the means to edit them. The style name reflects the current "
"style settings."
@@ -634,17 +634,17 @@ void KateSchemaConfigFontColorTab::schemaChanged (uint schema)
KateAttributeList *l = attributeList (schema);
// set colors
- QPalette p ( m_defaultStyles->palette() );
- QColor _c ( KGlobalSettings::baseColor() );
- p.setColor( QColorGroup::Base,
+ TQPalette p ( m_defaultStyles->palette() );
+ TQColor _c ( KGlobalSettings::baseColor() );
+ p.setColor( TQColorGroup::Base,
KateFactory::self()->schemaManager()->schema(schema)->
readColorEntry( "Color Background", &_c ) );
_c = KGlobalSettings::highlightColor();
- p.setColor( QColorGroup::Highlight,
+ p.setColor( TQColorGroup::Highlight,
KateFactory::self()->schemaManager()->schema(schema)->
readColorEntry( "Color Selection", &_c ) );
_c = l->at(0)->textColor(); // not quite as much of an assumption ;)
- p.setColor( QColorGroup::Text, _c );
+ p.setColor( TQColorGroup::Text, _c );
m_defaultStyles->viewport()->setPalette( p );
// insert the default styles backwards to get them in the right order
@@ -662,15 +662,15 @@ void KateSchemaConfigFontColorTab::reload ()
void KateSchemaConfigFontColorTab::apply ()
{
- for ( QIntDictIterator<KateAttributeList> it( m_defaultStyleLists ); it.current(); ++it )
+ for ( TQIntDictIterator<KateAttributeList> it( m_defaultStyleLists ); it.current(); ++it )
KateHlManager::self()->setDefaults(it.currentKey(), *(it.current()));
}
//END FontColorConfig
//BEGIN KateSchemaConfigHighlightTab -- 'Highlighting Text Styles' tab
-KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, const char *, KateSchemaConfigFontColorTab *page, uint hl )
- : QWidget (parent)
+KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( TQWidget *parent, const char *, KateSchemaConfigFontColorTab *page, uint hl )
+ : TQWidget (parent)
{
m_defaults = page;
@@ -679,22 +679,22 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
m_hlDict.setAutoDelete (true);
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("H&ighlight:"), hbHl );
- hlCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
+ hlCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( hlCombo );
- connect( hlCombo, SIGNAL(activated(int)),
- this, SLOT(hlChanged(int)) );
+ connect( hlCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(hlChanged(int)) );
for( int i = 0; i < KateHlManager::self()->highlights(); i++) {
if (KateHlManager::self()->hlSection(i).length() > 0)
- hlCombo->insertItem(KateHlManager::self()->hlSection(i) + QString ("/") + KateHlManager::self()->hlNameTranslated(i));
+ hlCombo->insertItem(KateHlManager::self()->hlSection(i) + TQString ("/") + KateHlManager::self()->hlNameTranslated(i));
else
hlCombo->insertItem(KateHlManager::self()->hlNameTranslated(i));
}
@@ -707,7 +707,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
hlCombo->setCurrentItem ( hl );
hlChanged ( hl );
- QWhatsThis::add( m_styles, i18n(
+ TQWhatsThis::add( m_styles, i18n(
"This list displays the contexts of the current syntax highlight mode and "
"offers the means to edit them. The context name reflects the current "
"style settings.<p>To edit using the keyboard, press "
@@ -716,7 +716,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( QWidget *parent, con
"to edit from the popup menu.<p>You can unset the Background and Selected "
"Background colors from the context menu when appropriate.") );
- connect (m_styles, SIGNAL (changed()), parent->parentWidget(), SLOT (slotChanged()));
+ connect (m_styles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
}
KateSchemaConfigHighlightTab::~KateSchemaConfigHighlightTab()
@@ -742,7 +742,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
{
kdDebug(13030) << "NEW SCHEMA, create dict" << endl;
- m_hlDict.insert (schema, new QIntDict<KateHlItemDataList>);
+ m_hlDict.insert (schema, new TQIntDict<KateHlItemDataList>);
m_hlDict[m_schema]->setAutoDelete (true);
}
@@ -761,20 +761,20 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
// We do that now, because we can now get the "normal text" color.
// TODO this reads of the KConfig object, which should be changed when
// the color tab is fixed.
- QPalette p ( m_styles->palette() );
- QColor _c ( KGlobalSettings::baseColor() );
- p.setColor( QColorGroup::Base,
+ TQPalette p ( m_styles->palette() );
+ TQColor _c ( KGlobalSettings::baseColor() );
+ p.setColor( TQColorGroup::Base,
KateFactory::self()->schemaManager()->schema(m_schema)->
readColorEntry( "Color Background", &_c ) );
_c = KGlobalSettings::highlightColor();
- p.setColor( QColorGroup::Highlight,
+ p.setColor( TQColorGroup::Highlight,
KateFactory::self()->schemaManager()->schema(m_schema)->
readColorEntry( "Color Selection", &_c ) );
_c = l->at(0)->textColor(); // not quite as much of an assumption ;)
- p.setColor( QColorGroup::Text, _c );
+ p.setColor( TQColorGroup::Text, _c );
m_styles->viewport()->setPalette( p );
- QDict<KateStyleListCaption> prefixes;
+ TQDict<KateStyleListCaption> prefixes;
for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last();
itemData != 0L;
itemData = m_hlDict[m_schema]->find(m_hl)->prev())
@@ -785,8 +785,8 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
// split them and put them into nice substructures.
int c = itemData->name.find(':');
if ( c > 0 ) {
- QString prefix = itemData->name.left(c);
- QString name = itemData->name.mid(c+1);
+ TQString prefix = itemData->name.left(c);
+ TQString name = itemData->name.mid(c+1);
KateStyleListCaption *parent = prefixes.find( prefix );
if ( ! parent )
@@ -812,8 +812,8 @@ void KateSchemaConfigHighlightTab::reload ()
void KateSchemaConfigHighlightTab::apply ()
{
- for ( QIntDictIterator< QIntDict<KateHlItemDataList> > it( m_hlDict ); it.current(); ++it )
- for ( QIntDictIterator< KateHlItemDataList > it2( *it.current() ); it2.current(); ++it2 )
+ for ( TQIntDictIterator< TQIntDict<KateHlItemDataList> > it( m_hlDict ); it.current(); ++it )
+ for ( TQIntDictIterator< KateHlItemDataList > it2( *it.current() ); it2.current(); ++it2 )
{
KateHlManager::self()->getHl( it2.currentKey() )->setKateHlItemDataList (it.currentKey(), *(it2.current()));
}
@@ -822,32 +822,32 @@ void KateSchemaConfigHighlightTab::apply ()
//END KateSchemaConfigHighlightTab
//BEGIN KateSchemaConfigPage -- Main dialog page
-KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
+KateSchemaConfigPage::KateSchemaConfigPage( TQWidget *parent, KateDocument *doc )
: KateConfigPage( parent ),
m_lastSchema (-1)
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
- QHBox *hbHl = new QHBox( this );
+ TQHBox *hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- QLabel *lHl = new QLabel( i18n("&Schema:"), hbHl );
- schemaCombo = new QComboBox( false, hbHl );
+ TQLabel *lHl = new TQLabel( i18n("&Schema:"), hbHl );
+ schemaCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( schemaCombo );
- connect( schemaCombo, SIGNAL(activated(int)),
- this, SLOT(schemaChanged(int)) );
+ connect( schemaCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(schemaChanged(int)) );
- QPushButton *btnnew = new QPushButton( i18n("&New..."), hbHl );
- connect( btnnew, SIGNAL(clicked()), this, SLOT(newSchema()) );
+ TQPushButton *btnnew = new TQPushButton( i18n("&New..."), hbHl );
+ connect( btnnew, TQT_SIGNAL(clicked()), this, TQT_SLOT(newSchema()) );
- btndel = new QPushButton( i18n("&Delete"), hbHl );
- connect( btndel, SIGNAL(clicked()), this, SLOT(deleteSchema()) );
+ btndel = new TQPushButton( i18n("&Delete"), hbHl );
+ connect( btndel, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSchema()) );
- m_tabWidget = new QTabWidget ( this );
+ m_tabWidget = new TQTabWidget ( this );
m_tabWidget->setMargin (KDialog::marginHint());
layout->add (m_tabWidget);
- connect (m_tabWidget, SIGNAL (currentChanged (QWidget *)), this, SLOT (newCurrentPage (QWidget *)));
+ connect (m_tabWidget, TQT_SIGNAL (currentChanged (TQWidget *)), this, TQT_SLOT (newCurrentPage (TQWidget *)));
m_colorTab = new KateSchemaConfigColorTab (m_tabWidget);
m_tabWidget->addTab (m_colorTab, i18n("Colors"));
@@ -862,11 +862,11 @@ KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
m_highlightTab = new KateSchemaConfigHighlightTab (m_tabWidget, "", m_fontColorTab, hl );
m_tabWidget->addTab (m_highlightTab, i18n("Highlighting Text Styles"));
- hbHl = new QHBox( this );
+ hbHl = new TQHBox( this );
layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
- lHl = new QLabel( i18n("&Default schema for %1:").arg(KApplication::kApplication()->aboutData()->programName ()), hbHl );
- defaultSchemaCombo = new QComboBox( false, hbHl );
+ lHl = new TQLabel( i18n("&Default schema for %1:").arg(KApplication::kApplication()->aboutData()->programName ()), hbHl );
+ defaultSchemaCombo = new TQComboBox( false, hbHl );
lHl->setBuddy( defaultSchemaCombo );
@@ -874,8 +874,8 @@ KateSchemaConfigPage::KateSchemaConfigPage( QWidget *parent, KateDocument *doc )
reload();
- connect( defaultSchemaCombo, SIGNAL(activated(int)),
- this, SLOT(slotChanged()) );
+ connect( defaultSchemaCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChanged()) );
}
KateSchemaConfigPage::~KateSchemaConfigPage ()
@@ -963,7 +963,7 @@ void KateSchemaConfigPage::deleteSchema ()
void KateSchemaConfigPage::newSchema ()
{
- QString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), 0, this);
+ TQString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), 0, this);
KateFactory::self()->schemaManager()->addSchema (t);
@@ -991,7 +991,7 @@ void KateSchemaConfigPage::schemaChanged (int schema)
m_lastSchema = schema;
}
-void KateSchemaConfigPage::newCurrentPage (QWidget *w)
+void KateSchemaConfigPage::newCurrentPage (TQWidget *w)
{
if (w == m_highlightTab)
m_highlightTab->schemaChanged (m_lastSchema);
@@ -1004,7 +1004,7 @@ void KateViewSchemaAction::init()
m_view = 0;
last = 0;
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewSchemaAction::updateMenu (KateView *view)
@@ -1019,12 +1019,12 @@ void KateViewSchemaAction::slotAboutToShow()
for (int z=0; z<count; z++)
{
- QString hlName = KateFactory::self()->schemaManager()->list().operator[](z);
+ TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z);
if (names.contains(hlName) < 1)
{
names << hlName;
- popupMenu()->insertItem ( hlName, this, SLOT(setSchema(int)), 0, z+1);
+ popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1);
}
}
@@ -1046,25 +1046,25 @@ void KateViewSchemaAction::setSchema (int mode)
//END SCHEMA ACTION
//BEGIN KateStyleListView
-KateStyleListView::KateStyleListView( QWidget *parent, bool showUseDefaults )
- : QListView( parent )
+KateStyleListView::KateStyleListView( TQWidget *parent, bool showUseDefaults )
+ : TQListView( parent )
{
setSorting( -1 ); // disable sorting, let the styles appear in their defined order
addColumn( i18n("Context") );
- addColumn( SmallIconSet("text_bold"), QString::null );
- addColumn( SmallIconSet("text_italic"), QString::null );
- addColumn( SmallIconSet("text_under"), QString::null );
- addColumn( SmallIconSet("text_strike"), QString::null );
+ addColumn( SmallIconSet("text_bold"), TQString::null );
+ addColumn( SmallIconSet("text_italic"), TQString::null );
+ addColumn( SmallIconSet("text_under"), TQString::null );
+ addColumn( SmallIconSet("text_strike"), TQString::null );
addColumn( i18n("Normal") );
addColumn( i18n("Selected") );
addColumn( i18n("Background") );
addColumn( i18n("Background Selected") );
if ( showUseDefaults )
addColumn( i18n("Use Default Style") );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT(slotMousePressed(int, QListViewItem*, const QPoint&, int)) );
- connect( this, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
- this, SLOT(showPopupMenu(QListViewItem*, const QPoint&)) );
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotMousePressed(int, TQListViewItem*, const TQPoint&, int)) );
+ connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&, int)),
+ this, TQT_SLOT(showPopupMenu(TQListViewItem*, const TQPoint&)) );
// grap the bg color, selected color and default font
normalcol = KGlobalSettings::textColor();
bgcol = KateRendererConfig::global()->backgroundColor();
@@ -1074,7 +1074,7 @@ KateStyleListView::KateStyleListView( QWidget *parent, bool showUseDefaults )
viewport()->setPaletteBackgroundColor( bgcol );
}
-void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globalPos, bool showtitle )
+void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &globalPos, bool showtitle )
{
if ( !dynamic_cast<KateStyleListItem*>(i) ) return;
@@ -1083,32 +1083,32 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globa
int id;
// the title is used, because the menu obscures the context name when
// displayed on behalf of spacePressed().
- QPixmap cl(16,16);
+ TQPixmap cl(16,16);
cl.fill( i->style()->textColor() );
- QPixmap scl(16,16);
+ TQPixmap scl(16,16);
scl.fill( i->style()->selectedTextColor() );
- QPixmap bgcl(16,16);
+ TQPixmap bgcl(16,16);
bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->colorGroup().base() );
- QPixmap sbgcl(16,16);
+ TQPixmap sbgcl(16,16);
sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->colorGroup().base() );
if ( showtitle )
m.insertTitle( i->contextName(), KateStyleListItem::ContextName );
- id = m.insertItem( i18n("&Bold"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Bold );
+ id = m.insertItem( i18n("&Bold"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Bold );
m.setItemChecked( id, is->bold() );
- id = m.insertItem( i18n("&Italic"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Italic );
+ id = m.insertItem( i18n("&Italic"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Italic );
m.setItemChecked( id, is->italic() );
- id = m.insertItem( i18n("&Underline"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Underline );
+ id = m.insertItem( i18n("&Underline"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Underline );
m.setItemChecked( id, is->underline() );
- id = m.insertItem( i18n("S&trikeout"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Strikeout );
+ id = m.insertItem( i18n("S&trikeout"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Strikeout );
m.setItemChecked( id, is->strikeOut() );
m.insertSeparator();
- m.insertItem( QIconSet(cl), i18n("Normal &Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Color );
- m.insertItem( QIconSet(scl), i18n("&Selected Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelColor );
- m.insertItem( QIconSet(bgcl), i18n("&Background Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::BgColor );
- m.insertItem( QIconSet(sbgcl), i18n("S&elected Background Color..."), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelBgColor );
+ m.insertItem( TQIconSet(cl), i18n("Normal &Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::Color );
+ m.insertItem( TQIconSet(scl), i18n("&Selected Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelColor );
+ m.insertItem( TQIconSet(bgcl), i18n("&Background Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::BgColor );
+ m.insertItem( TQIconSet(sbgcl), i18n("S&elected Background Color..."), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::SelBgColor );
// Unset [some] colors. I could show one only if that button was clicked, but that
// would disable setting this with the keyboard (how many aren't doing just
@@ -1119,20 +1119,20 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const QPoint &globa
{
m.insertSeparator();
if ( style->itemSet( KateAttribute::BGColor) )
- m.insertItem( i18n("Unset Background Color"), this, SLOT(unsetColor(int)), 0, 100 );
+ m.insertItem( i18n("Unset Background Color"), this, TQT_SLOT(unsetColor(int)), 0, 100 );
if ( style->itemSet( KateAttribute::SelectedBGColor ) )
- m.insertItem( i18n("Unset Selected Background Color"), this, SLOT(unsetColor(int)), 0, 101 );
+ m.insertItem( i18n("Unset Selected Background Color"), this, TQT_SLOT(unsetColor(int)), 0, 101 );
}
if ( ! i->isDefault() && ! i->defStyle() ) {
m.insertSeparator();
- id = m.insertItem( i18n("Use &Default Style"), this, SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::UseDefStyle );
+ id = m.insertItem( i18n("Use &Default Style"), this, TQT_SLOT(mSlotPopupHandler(int)), 0, KateStyleListItem::UseDefStyle );
m.setItemChecked( id, i->defStyle() );
}
m.exec( globalPos );
}
-void KateStyleListView::showPopupMenu( QListViewItem *i, const QPoint &pos )
+void KateStyleListView::showPopupMenu( TQListViewItem *i, const TQPoint &pos )
{
if ( dynamic_cast<KateStyleListItem*>(i) )
showPopupMenu( (KateStyleListItem*)i, pos, true );
@@ -1149,14 +1149,14 @@ void KateStyleListView::unsetColor( int c )
emitChanged();
}
-// Because QListViewItem::activatePos() is going to become deprecated,
+// Because TQListViewItem::activatePos() is going to become deprecated,
// and also because this attempt offers more control, I connect mousePressed to this.
-void KateStyleListView::slotMousePressed(int btn, QListViewItem* i, const QPoint& pos, int c)
+void KateStyleListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoint& pos, int c)
{
if ( dynamic_cast<KateStyleListItem*>(i) ) {
if ( btn == Qt::LeftButton && c > 0 ) {
// map pos to item/column and call KateStyleListItem::activate(col, pos)
- ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - QPoint( 0, itemRect(i).top() ) );
+ ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) );
}
}
}
@@ -1167,18 +1167,18 @@ void KateStyleListView::slotMousePressed(int btn, QListViewItem* i, const QPoint
static const int BoxSize = 16;
static const int ColorBtnWidth = 32;
-KateStyleListItem::KateStyleListItem( QListViewItem *parent, const QString & stylename,
+KateStyleListItem::KateStyleListItem( TQListViewItem *parent, const TQString & stylename,
KateAttribute *style, KateHlItemData *data )
- : QListViewItem( parent, stylename ),
+ : TQListViewItem( parent, stylename ),
ds( style ),
st( data )
{
initStyle();
}
-KateStyleListItem::KateStyleListItem( QListView *parent, const QString & stylename,
+KateStyleListItem::KateStyleListItem( TQListView *parent, const TQString & stylename,
KateAttribute *style, KateHlItemData *data )
- : QListViewItem( parent, stylename ),
+ : TQListViewItem( parent, stylename ),
ds( style ),
st( data )
{
@@ -1275,14 +1275,14 @@ bool KateStyleListItem::defStyle() { return st && st->itemsSet() != ds->itemsSet
/* true for default styles */
bool KateStyleListItem::isDefault() { return st ? false : true; }
-int KateStyleListItem::width( const QFontMetrics & /*fm*/, const QListView * lv, int col ) const
+int KateStyleListItem::width( const TQFontMetrics & /*fm*/, const TQListView * lv, int col ) const
{
int m = lv->itemMargin() * 2;
switch ( col ) {
case ContextName:
// FIXME: width for name column should reflect bold/italic
// (relevant for non-fixed fonts only - nessecary?)
- return QListViewItem::width( QFontMetrics( ((KateStyleListView*)lv)->docfont), lv, col);
+ return TQListViewItem::width( TQFontMetrics( ((KateStyleListView*)lv)->docfont), lv, col);
case Bold:
case Italic:
case UseDefStyle:
@@ -1297,9 +1297,9 @@ int KateStyleListItem::width( const QFontMetrics & /*fm*/, const QListView * lv,
}
}
-void KateStyleListItem::activate( int column, const QPoint &localPos )
+void KateStyleListItem::activate( int column, const TQPoint &localPos )
{
- QListView *lv = listView();
+ TQListView *lv = listView();
int x = 0;
for( int c = 0; c < column-1; c++ )
x += lv->columnWidth( c );
@@ -1321,7 +1321,7 @@ void KateStyleListItem::activate( int column, const QPoint &localPos )
default:
return;
}
- if ( !QRect( x, 0, w, BoxSize ).contains( localPos ) )
+ if ( !TQRect( x, 0, w, BoxSize ).contains( localPos ) )
changeProperty( (Property)column );
}
@@ -1363,8 +1363,8 @@ void KateStyleListItem::toggleDefStyle()
void KateStyleListItem::setColor( int column )
{
- QColor c; // use this
- QColor d; // default color
+ TQColor c; // use this
+ TQColor d; // default color
if ( column == Color)
{
c = is->textColor();
@@ -1386,7 +1386,7 @@ void KateStyleListItem::setColor( int column )
d = ds->selectedBGColor();
}
- if ( KColorDialog::getColor( c, d, listView() ) != QDialog::Accepted) return;
+ if ( KColorDialog::getColor( c, d, listView() ) != TQDialog::Accepted) return;
bool def = ! c.isValid();
@@ -1453,49 +1453,49 @@ void KateStyleListItem::unsetColor( int c )
updateStyle();
}
-void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int col, int width, int align )
+void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int col, int width, int align )
{
if ( !p )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
Q_ASSERT( lv ); //###
// use a private color group and set the text/highlighted text colors
- QColorGroup mcg = lv->viewport()->colorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
if ( col ) // col 0 is drawn by the superclass method
- p->fillRect( 0, 0, width, height(), QBrush( mcg.base() ) );
+ p->fillRect( 0, 0, width, height(), TQBrush( mcg.base() ) );
int marg = lv->itemMargin();
- QColor c;
+ TQColor c;
switch ( col )
{
case ContextName:
{
- mcg.setColor(QColorGroup::Text, is->textColor());
- mcg.setColor(QColorGroup::HighlightedText, is->selectedTextColor());
+ mcg.setColor(TQColorGroup::Text, is->textColor());
+ mcg.setColor(TQColorGroup::HighlightedText, is->selectedTextColor());
// text background color
c = is->bgColor();
if ( c.isValid() && is->itemSet(KateAttribute::BGColor) )
- mcg.setColor( QColorGroup::Base, c );
+ mcg.setColor( TQColorGroup::Base, c );
if ( isSelected() && is->itemSet(KateAttribute::SelectedBGColor) )
{
c = is->selectedBGColor();
if ( c.isValid() )
- mcg.setColor( QColorGroup::Highlight, c );
+ mcg.setColor( TQColorGroup::Highlight, c );
}
- QFont f ( ((KateStyleListView*)lv)->docfont );
+ TQFont f ( ((KateStyleListView*)lv)->docfont );
p->setFont( is->font(f) );
// FIXME - repainting when text is cropped, and the column is enlarged is buggy.
// Maybe I need painting the string myself :(
// (wilbert) it depends on the font used
- QListViewItem::paintCell( p, mcg, col, width, align );
+ TQListViewItem::paintCell( p, mcg, col, width, align );
}
break;
case Bold:
@@ -1510,9 +1510,9 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
int y = (height() - BoxSize) / 2;
if ( isEnabled() )
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
else
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
x++;
@@ -1523,7 +1523,7 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
(col == Strikeout && is->strikeOut()) ||
(col == UseDefStyle && *is == *ds ) )
{
- QPointArray a( 7*2 );
+ TQPointArray a( 7*2 );
int i, xx, yy;
xx = x+1+marg;
yy = y+5;
@@ -1573,12 +1573,12 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
int x = 0;
int y = (height() - BoxSize) / 2;
if ( isEnabled() )
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
else
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
p->drawRect( x+marg, y+2, ColorBtnWidth-4, BoxSize-4 );
- p->fillRect( x+marg+1,y+3,ColorBtnWidth-7,BoxSize-7,QBrush( c ) );
+ p->fillRect( x+marg+1,y+3,ColorBtnWidth-7,BoxSize-7,TQBrush( c ) );
// if this item is unset, draw a diagonal line over the button
if ( ! set )
p->drawLine( x+marg-1, BoxSize-3, ColorBtnWidth-4, y+1 );
@@ -1589,22 +1589,22 @@ void KateStyleListItem::paintCell( QPainter *p, const QColorGroup& /*cg*/, int c
//END
//BEGIN KateStyleListCaption
-KateStyleListCaption::KateStyleListCaption( QListView *parent, const QString & name )
- : QListViewItem( parent, name )
+KateStyleListCaption::KateStyleListCaption( TQListView *parent, const TQString & name )
+ : TQListViewItem( parent, name )
{
}
-void KateStyleListCaption::paintCell( QPainter *p, const QColorGroup& /*cg*/, int col, int width, int align )
+void KateStyleListCaption::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int col, int width, int align )
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
Q_ASSERT( lv ); //###
// use the same colorgroup as the other items in the viewport
- QColorGroup mcg = lv->viewport()->colorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
- QListViewItem::paintCell( p, mcg, col, width, align );
+ TQListViewItem::paintCell( p, mcg, col, width, align );
}
//END
diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h
index 917530fcc..e5bc14b0d 100644
--- a/kate/part/kateschema.h
+++ b/kate/part/kateschema.h
@@ -23,11 +23,11 @@
#include "katehighlight.h"
#include "katedialogs.h"
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qmap.h>
-#include <qlistview.h>
-#include <qfont.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqfont.h>
#include <kconfig.h>
#include <kaction.h>
@@ -57,7 +57,7 @@ class KateSchemaManager
*/
KConfig *schema (uint number);
- void addSchema (const QString &t);
+ void addSchema (const TQString &t);
void removeSchema (uint number);
@@ -69,24 +69,24 @@ class KateSchemaManager
/**
* if not found, defaults to 0
*/
- uint number (const QString &name);
+ uint number (const TQString &name);
/**
* group names in the end, no i18n involved
*/
- QString name (uint number);
+ TQString name (uint number);
/**
* Don't modify, list with the names of the schemas (i18n name for the default ones)
*/
- const QStringList &list () { return m_schemas; }
+ const TQStringList &list () { return m_schemas; }
- static QString normalSchema ();
- static QString printingSchema ();
+ static TQString normalSchema ();
+ static TQString printingSchema ();
private:
KConfig m_config;
- QStringList m_schemas;
+ TQStringList m_schemas;
};
@@ -95,7 +95,7 @@ class KateViewSchemaAction : public KActionMenu
Q_OBJECT
public:
- KateViewSchemaAction(const QString& text, QObject* parent = 0, const char* name = 0)
+ KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
: KActionMenu(text, parent, name) { init(); };
~KateViewSchemaAction(){;};
@@ -105,8 +105,8 @@ class KateViewSchemaAction : public KActionMenu
private:
void init();
- QGuardedPtr<KateView> m_view;
- QStringList names;
+ TQGuardedPtr<KateView> m_view;
+ TQStringList names;
int last;
public slots:
@@ -121,7 +121,7 @@ class KateViewSchemaAction : public KActionMenu
//
/*
- QListView that automatically adds columns for KateStyleListItems and provides a
+ TQListView that automatically adds columns for KateStyleListItems and provides a
popup menu and a slot to edit a style using the keyboard.
Added by anders, jan 23 2002.
*/
@@ -132,22 +132,22 @@ class KateStyleListView : public QListView
friend class KateStyleListItem;
public:
- KateStyleListView( QWidget *parent=0, bool showUseDefaults=false);
+ KateStyleListView( TQWidget *parent=0, bool showUseDefaults=false);
~KateStyleListView() {};
/* Display a popupmenu for item i at the specified global position, eventually with a title,
promoting the context name of that item */
- void showPopupMenu( KateStyleListItem *i, const QPoint &globalPos, bool showtitle=false );
+ void showPopupMenu( KateStyleListItem *i, const TQPoint &globalPos, bool showtitle=false );
void emitChanged() { emit changed(); };
- void setBgCol( const QColor &c ) { bgcol = c; }
- void setSelCol( const QColor &c ) { selcol = c; }
- void setNormalCol( const QColor &c ) { normalcol = c; }
+ void setBgCol( const TQColor &c ) { bgcol = c; }
+ void setSelCol( const TQColor &c ) { selcol = c; }
+ void setNormalCol( const TQColor &c ) { normalcol = c; }
private slots:
/* Display a popupmenu for item i at item position */
- void showPopupMenu( QListViewItem *i, const QPoint &globalPos );
+ void showPopupMenu( TQListViewItem *i, const TQPoint &globalPos );
/* call item to change a property, or display a menu */
- void slotMousePressed( int, QListViewItem*, const QPoint&, int );
+ void slotMousePressed( int, TQListViewItem*, const TQPoint&, int );
/* asks item to change the property in q */
void mSlotPopupHandler( int z );
void unsetColor( int );
@@ -156,8 +156,8 @@ class KateStyleListView : public QListView
void changed();
private:
- QColor bgcol, selcol, normalcol;
- QFont docfont;
+ TQColor bgcol, selcol, normalcol;
+ TQFont docfont;
};
class KateSchemaConfigColorTab : public QWidget
@@ -165,7 +165,7 @@ class KateSchemaConfigColorTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigColorTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigColorTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigColorTab();
private:
@@ -184,12 +184,12 @@ class KateSchemaConfigColorTab : public QWidget
// Class for storing the properties on 1 schema.
class SchemaColors {
public:
- QColor back, selected, current, bracket, wwmarker, iconborder, tmarker, linenumber;
- QMap<int, QColor> markerColors; // stores all markerColors
+ TQColor back, selected, current, bracket, wwmarker, iconborder, tmarker, linenumber;
+ TQMap<int, TQColor> markerColors; // stores all markerColors
};
// schemaid=data, created when a schema is entered
- QMap<int,SchemaColors> m_schemas;
+ TQMap<int,SchemaColors> m_schemas;
// current schema
int m_schema;
@@ -198,21 +198,21 @@ class KateSchemaConfigColorTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to parentWidget()->parentWidget() SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
protected slots:
- void slotMarkerColorChanged(const QColor&);
+ void slotMarkerColorChanged(const TQColor&);
void slotComboBoxChanged(int index);
};
-typedef QMap<int,QFont> FontMap; // ### remove it
+typedef TQMap<int,TQFont> FontMap; // ### remove it
class KateSchemaConfigFontTab : public QWidget
{
Q_OBJECT
public:
- KateSchemaConfigFontTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigFontTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigFontTab();
public:
@@ -223,7 +223,7 @@ class KateSchemaConfigFontTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to parentWidget()->parentWidget() SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
private:
class KFontChooser *m_fontchooser;
@@ -231,7 +231,7 @@ class KateSchemaConfigFontTab : public QWidget
int m_schema;
private slots:
- void slotFontSelected( const QFont &font );
+ void slotFontSelected( const TQFont &font );
};
class KateSchemaConfigFontColorTab : public QWidget
@@ -239,7 +239,7 @@ class KateSchemaConfigFontColorTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigFontColorTab( QWidget *parent = 0, const char *name = 0 );
+ KateSchemaConfigFontColorTab( TQWidget *parent = 0, const char *name = 0 );
~KateSchemaConfigFontColorTab();
public:
@@ -251,7 +251,7 @@ class KateSchemaConfigFontColorTab : public QWidget
private:
KateStyleListView *m_defaultStyles;
- QIntDict<KateAttributeList> m_defaultStyleLists;
+ TQIntDict<KateAttributeList> m_defaultStyleLists;
};
class KateSchemaConfigHighlightTab : public QWidget
@@ -259,7 +259,7 @@ class KateSchemaConfigHighlightTab : public QWidget
Q_OBJECT
public:
- KateSchemaConfigHighlightTab( QWidget *parent = 0, const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
+ KateSchemaConfigHighlightTab( TQWidget *parent = 0, const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
~KateSchemaConfigHighlightTab();
public:
@@ -273,13 +273,13 @@ class KateSchemaConfigHighlightTab : public QWidget
private:
KateSchemaConfigFontColorTab *m_defaults;
- QComboBox *hlCombo;
+ TQComboBox *hlCombo;
KateStyleListView *m_styles;
uint m_schema;
int m_hl;
- QIntDict< QIntDict<KateHlItemDataList> > m_hlDict;
+ TQIntDict< TQIntDict<KateHlItemDataList> > m_hlDict;
};
class KateSchemaConfigPage : public KateConfigPage
@@ -287,7 +287,7 @@ class KateSchemaConfigPage : public KateConfigPage
Q_OBJECT
public:
- KateSchemaConfigPage ( QWidget *parent, class KateDocument *doc=0 );
+ KateSchemaConfigPage ( TQWidget *parent, class KateDocument *doc=0 );
~KateSchemaConfigPage ();
public slots:
@@ -302,16 +302,16 @@ class KateSchemaConfigPage : public KateConfigPage
void newSchema ();
void schemaChanged (int schema);
- void newCurrentPage (QWidget *w);
+ void newCurrentPage (TQWidget *w);
private:
int m_lastSchema;
int m_defaultSchema;
- class QTabWidget *m_tabWidget;
- class QPushButton *btndel;
- class QComboBox *defaultSchemaCombo;
- class QComboBox *schemaCombo;
+ class TQTabWidget *m_tabWidget;
+ class TQPushButton *btndel;
+ class TQComboBox *defaultSchemaCombo;
+ class TQComboBox *schemaCombo;
KateSchemaConfigColorTab *m_colorTab;
KateSchemaConfigFontTab *m_fontTab;
KateSchemaConfigFontColorTab *m_fontColorTab;
diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp
index 96f5128b0..742b57a3f 100644
--- a/kate/part/katesearch.cpp
+++ b/kate/part/katesearch.cpp
@@ -40,17 +40,17 @@
#include <kreplacedialog.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
//BEGIN KateSearch
-QStringList KateSearch::s_searchList = QStringList();
-QStringList KateSearch::s_replaceList = QStringList();
-QString KateSearch::s_pattern = QString();
+TQStringList KateSearch::s_searchList = TQStringList();
+TQStringList KateSearch::s_replaceList = TQStringList();
+TQString KateSearch::s_pattern = TQString();
static const bool arbitraryHLExample = false;
KateSearch::KateSearch( KateView* view )
- : QObject( view, "kate search" )
+ : TQObject( view, "kate search" )
, m_view( view )
, m_doc( view->doc() )
, replacePrompt( new KateReplacePrompt( view ) )
@@ -58,7 +58,7 @@ KateSearch::KateSearch( KateView* view )
m_arbitraryHLList = new KateSuperRangeList();
if (arbitraryHLExample) m_doc->arbitraryHL()->addHighlightToView(m_arbitraryHLList, m_view);
- connect(replacePrompt,SIGNAL(clicked()),this,SLOT(replaceSlot()));
+ connect(replacePrompt,TQT_SIGNAL(clicked()),this,TQT_SLOT(replaceSlot()));
}
KateSearch::~KateSearch()
@@ -68,20 +68,20 @@ KateSearch::~KateSearch()
void KateSearch::createActions( KActionCollection* ac )
{
- KStdAction::find( this, SLOT(find()), ac )->setWhatsThis(
+ KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis(
i18n("Look up the first occurrence of a piece of text or regular expression."));
- KStdAction::findNext( this, SLOT(slotFindNext()), ac )->setWhatsThis(
+ KStdAction::findNext( this, TQT_SLOT(slotFindNext()), ac )->setWhatsThis(
i18n("Look up the next occurrence of the search phrase."));
- KStdAction::findPrev( this, SLOT(slotFindPrev()), ac, "edit_find_prev" )->setWhatsThis(
+ KStdAction::findPrev( this, TQT_SLOT(slotFindPrev()), ac, "edit_find_prev" )->setWhatsThis(
i18n("Look up the previous occurrence of the search phrase."));
- KStdAction::replace( this, SLOT(replace()), ac )->setWhatsThis(
+ KStdAction::replace( this, TQT_SLOT(replace()), ac )->setWhatsThis(
i18n("Look up a piece of text or regular expression and replace the result with some given text."));
}
-void KateSearch::addToList( QStringList& list, const QString& s )
+void KateSearch::addToList( TQStringList& list, const TQString& s )
{
if( list.count() > 0 ) {
- QStringList::Iterator it = list.find( s );
+ TQStringList::Iterator it = list.find( s );
if( *it != 0L )
list.remove( it );
if( list.count() >= 16 )
@@ -103,17 +103,17 @@ void KateSearch::find()
findDialog->setPattern (getSearchText());
- if( findDialog->exec() == QDialog::Accepted ) {
+ if( findDialog->exec() == TQDialog::Accepted ) {
s_searchList = findDialog->findHistory () ;
- // Do *not* remove the QString() wrapping, it fixes a nasty crash
- find( QString(s_searchList.first()), findDialog->options(), true, true );
+ // Do *not* remove the TQString() wrapping, it fixes a nasty crash
+ find( TQString(s_searchList.first()), findDialog->options(), true, true );
}
delete findDialog;
m_view->repaintText ();
}
-void KateSearch::find( const QString &pattern, long flags, bool add, bool shownotfound )
+void KateSearch::find( const TQString &pattern, long flags, bool add, bool shownotfound )
{
KateViewConfig::global()->setSearchFlags( flags );
if( add )
@@ -165,21 +165,21 @@ void KateSearch::replace()
replaceDialog->setPattern (getSearchText());
- if( replaceDialog->exec() == QDialog::Accepted ) {
+ if( replaceDialog->exec() == TQDialog::Accepted ) {
long opts = replaceDialog->options();
m_replacement = replaceDialog->replacement();
s_searchList = replaceDialog->findHistory () ;
s_replaceList = replaceDialog->replacementHistory () ;
- // Do *not* remove the QString() wrapping, it fixes a nasty crash
- replace( QString(s_searchList.first()), m_replacement, opts );
+ // Do *not* remove the TQString() wrapping, it fixes a nasty crash
+ replace( TQString(s_searchList.first()), m_replacement, opts );
}
delete replaceDialog;
m_view->update ();
}
-void KateSearch::replace( const QString& pattern, const QString &replacement, long flags )
+void KateSearch::replace( const TQString& pattern, const TQString &replacement, long flags )
{
if (!doc()->isReadWrite()) return;
@@ -375,18 +375,18 @@ void KateSearch::promptReplace()
void KateSearch::replaceOne()
{
- QString replaceWith = m_replacement;
+ TQString replaceWith = m_replacement;
if ( s.flags.regExp && s.flags.useBackRefs ) {
// Replace each "\0"..."\9" with the corresponding capture,
// "\n" and "\t" with newline and tab,
// "\\" with "\",
// and remove the "\" for any other sequence.
- QRegExp br("\\\\(.)");
+ TQRegExp br("\\\\(.)");
int pos = br.search( replaceWith );
int ncaps = m_re.numCaptures();
while ( pos >= 0 ) {
- QString substitute;
- QChar argument = br.cap(1).at(0);
+ TQString substitute;
+ TQChar argument = br.cap(1).at(0);
if ( argument.isDigit() ) {
// the second character is a digit, this is a backreference
int ccap = argument.digitValue();
@@ -482,12 +482,12 @@ void KateSearch::replaceSlot() {
bool KateSearch::askContinue()
{
- QString made =
+ TQString made =
i18n( "%n replacement made.",
"%n replacements made.",
replaces );
- QString reached = !s.flags.backward ?
+ TQString reached = !s.flags.backward ?
i18n( "End of document reached." ) :
i18n( "Beginning of document reached." );
@@ -498,11 +498,11 @@ bool KateSearch::askContinue()
i18n( "Beginning of selection reached." );
}
- QString question = !s.flags.backward ?
+ TQString question = !s.flags.backward ?
i18n( "Continue from the beginning?" ) :
i18n( "Continue from the end?" );
- QString text = s.flags.replace ?
+ TQString text = s.flags.replace ?
made + "\n" + reached + "\n" + question :
reached + "\n" + question;
@@ -511,13 +511,13 @@ bool KateSearch::askContinue()
KStdGuiItem::cont(), i18n("&Stop") );
}
-QString KateSearch::getSearchText()
+TQString KateSearch::getSearchText()
{
// SelectionOnly: use selection
// WordOnly: use word under cursor
// SelectionWord: use selection if available, else use word under cursor
// WordSelection: use word if available, else use selection
- QString str;
+ TQString str;
int getFrom = view()->config()->textToSearchMode();
switch (getFrom)
@@ -553,8 +553,8 @@ QString KateSearch::getSearchText()
break;
}
- str.replace( QRegExp("^\\n"), "" );
- str.replace( QRegExp("\\n.*"), "" );
+ str.replace( TQRegExp("^\\n"), "" );
+ str.replace( TQRegExp("\\n.*"), "" );
return str;
}
@@ -571,7 +571,7 @@ KateTextCursor KateSearch::getCursor( SearchFlags flags )
return KateTextCursor(view()->cursorLine(), view()->cursorColumnReal());
}
-bool KateSearch::doSearch( const QString& text )
+bool KateSearch::doSearch( const TQString& text )
{
/*
rodda: Still Working on this... :)
@@ -622,7 +622,7 @@ bool KateSearch::doSearch( const QString& text )
do {
if( regExp ) {
- m_re = QRegExp( text, caseSensitive );
+ m_re = TQRegExp( text, caseSensitive );
found = doc()->searchText( line, col, m_re,
&foundLine, &foundCol,
&matchLen, backward );
@@ -732,7 +732,7 @@ bool KateSearch::doSearch( const QString& text )
hl->setTextColor(Qt::white);
hl->setBGColor(Qt::black);
// destroy the highlight upon change
- connect(hl, SIGNAL(contentsChanged()), hl, SIGNAL(eliminated()));
+ connect(hl, TQT_SIGNAL(contentsChanged()), hl, TQT_SIGNAL(eliminated()));
m_arbitraryHLList->append(hl);
}
@@ -761,17 +761,17 @@ void KateSearch::exposeFound( KateTextCursor &cursor, int slen )
//BEGIN KateReplacePrompt
// this dialog is not modal
-KateReplacePrompt::KateReplacePrompt ( QWidget *parent )
+KateReplacePrompt::KateReplacePrompt ( TQWidget *parent )
: KDialogBase ( parent, 0L, false, i18n( "Replace Confirmation" ),
User3 | User2 | User1 | Close | Ok , Ok, true,
i18n("Replace &All"), i18n("Re&place && Close"), i18n("&Replace") )
{
setButtonOK( i18n("&Find Next") );
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel(i18n("Found an occurrence of your search term. What do you want to do?"),page);
+ TQBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ TQLabel *label = new TQLabel(i18n("Found an occurrence of your search term. What do you want to do?"),page);
topLayout->addWidget(label );
}
@@ -814,13 +814,13 @@ void KateReplacePrompt::done (int result)
//END KateReplacePrompt
//BEGIN SearchCommand
-bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &msg)
+bool SearchCommand::exec(class Kate::View *view, const TQString &cmd, TQString &msg)
{
- QString flags, pattern, replacement;
+ TQString flags, pattern, replacement;
if ( cmd.startsWith( "find" ) )
{
- static QRegExp re_find("find(?::([bcersw]*))?\\s+(.+)");
+ static TQRegExp re_find("find(?::([bcersw]*))?\\s+(.+)");
if ( re_find.search( cmd ) < 0 )
{
msg = i18n("Usage: find[:[bcersw]] PATTERN");
@@ -832,7 +832,7 @@ bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &ms
else if ( cmd.startsWith( "ifind" ) )
{
- static QRegExp re_ifind("ifind(?::([bcrs]*))?\\s+(.*)");
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s+(.*)");
if ( re_ifind.search( cmd ) < 0 )
{
msg = i18n("Usage: ifind[:[bcrs]] PATTERN");
@@ -845,11 +845,11 @@ bool SearchCommand::exec(class Kate::View *view, const QString &cmd, QString &ms
else if ( cmd.startsWith( "replace" ) )
{
// Try if the pattern and replacement is quoted, using a quote character ["']
- static QRegExp re_rep("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ static TQRegExp re_rep("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Or one quoted argument
- QRegExp re_rep1("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ TQRegExp re_rep1("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Else, it's just one or two (space separated) words
- QRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
+ TQRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
#define unbackslash(s) p=0;\
while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
{\
@@ -867,7 +867,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
int p(0);
// unbackslash backslashed delimiter strings
// in pattern ..
- QString delim = re_rep.cap( 2 );
+ TQString delim = re_rep.cap( 2 );
unbackslash(pattern);
// .. and in replacement
unbackslash(replacement);
@@ -878,7 +878,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
pattern = re_rep1.cap( 3 );
int p(0);
- QString delim = re_rep1.cap( 2 );
+ TQString delim = re_rep1.cap( 2 );
unbackslash(pattern);
}
else if ( re_rep2.search( cmd ) >= 0 )
@@ -920,7 +920,7 @@ while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
return false;
}
-bool SearchCommand::help(class Kate::View *, const QString &cmd, QString &msg)
+bool SearchCommand::help(class Kate::View *, const TQString &cmd, TQString &msg)
{
if ( cmd == "find" )
msg = i18n("<p>Usage: <code>find[:bcersw] PATTERN</code></p>");
@@ -959,25 +959,25 @@ bool SearchCommand::help(class Kate::View *, const QString &cmd, QString &msg)
return true;
}
-QStringList SearchCommand::cmds()
+TQStringList SearchCommand::cmds()
{
- QStringList l;
+ TQStringList l;
l << "find" << "replace" << "ifind";
return l;
}
-bool SearchCommand::wantsToProcessText( const QString &cmdname )
+bool SearchCommand::wantsToProcessText( const TQString &cmdname )
{
return cmdname == "ifind";
}
-void SearchCommand::processText( Kate::View *view, const QString &cmd )
+void SearchCommand::processText( Kate::View *view, const TQString &cmd )
{
- static QRegExp re_ifind("ifind(?::([bcrs]*))?\\s(.*)");
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s(.*)");
if ( re_ifind.search( cmd ) > -1 )
{
- QString flags = re_ifind.cap( 1 );
- QString pattern = re_ifind.cap( 2 );
+ TQString flags = re_ifind.cap( 1 );
+ TQString pattern = re_ifind.cap( 2 );
// if there is no setup, or the text length is 0, set up the properties
@@ -1005,7 +1005,7 @@ void SearchCommand::processText( Kate::View *view, const QString &cmd )
}
}
-void SearchCommand::ifindInit( const QString &flags )
+void SearchCommand::ifindInit( const TQString &flags )
{
long f = 0;
if ( flags.contains( 'b' ) ) f |= KFindDialog::FindBackwards;
diff --git a/kate/part/katesearch.h b/kate/part/katesearch.h
index 3f2ce2ec6..ebf228dcd 100644
--- a/kate/part/katesearch.h
+++ b/kate/part/katesearch.h
@@ -28,10 +28,10 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class KateView;
class KateDocument;
@@ -102,7 +102,7 @@ class KateSearch : public QObject
* That must now be explicitly required -- the find dialog does, but the commandline
* incremental search does not.
*/
- void find( const QString &pattern, long flags, bool add=true, bool shownotfound=false );
+ void find( const TQString &pattern, long flags, bool add=true, bool shownotfound=false );
void replace();
/**
* Replace @p pattern with @p replacement given @p flags.
@@ -112,7 +112,7 @@ class KateSearch : public QObject
* @param replacement Replacement string.
* @param flags OR'd combination of KFindDialog::Options
*/
- void replace( const QString &pattern, const QString &replacement, long flags );
+ void replace( const TQString &pattern, const TQString &replacement, long flags );
void findAgain( bool reverseDirection );
private slots:
@@ -121,12 +121,12 @@ class KateSearch : public QObject
void slotFindPrev() { findAgain( true ); }
private:
- static void addToList( QStringList&, const QString& );
- static void addToSearchList( const QString& s ) { addToList( s_searchList, s ); }
- static void addToReplaceList( const QString& s ) { addToList( s_replaceList, s ); }
- static QStringList s_searchList; ///< recent patterns
- static QStringList s_replaceList; ///< recent replacement strings
- static QString s_pattern; ///< the string to search for
+ static void addToList( TQStringList&, const TQString& );
+ static void addToSearchList( const TQString& s ) { addToList( s_searchList, s ); }
+ static void addToReplaceList( const TQString& s ) { addToList( s_replaceList, s ); }
+ static TQStringList s_searchList; ///< recent patterns
+ static TQStringList s_replaceList; ///< recent replacement strings
+ static TQString s_pattern; ///< the string to search for
void search( SearchFlags flags );
void wrapSearch();
@@ -138,9 +138,9 @@ class KateSearch : public QObject
void replaceOne();
void skipOne();
- QString getSearchText();
+ TQString getSearchText();
KateTextCursor getCursor( SearchFlags flags );
- bool doSearch( const QString& text );
+ bool doSearch( const TQString& text );
void exposeFound( KateTextCursor &cursor, int slen );
inline KateView* view() { return m_view; }
@@ -153,13 +153,13 @@ class KateSearch : public QObject
SConfig s;
- QValueList<SConfig> m_searchResults;
+ TQValueList<SConfig> m_searchResults;
int m_resultIndex;
int replaces;
- QDialog* replacePrompt;
- QString m_replacement;
- QRegExp m_re;
+ TQDialog* replacePrompt;
+ TQString m_replacement;
+ TQRegExp m_re;
};
/**
@@ -174,7 +174,7 @@ class KateReplacePrompt : public KDialogBase
* Constructor
* @param parent parent widget for the dialog
*/
- KateReplacePrompt(QWidget *parent);
+ KateReplacePrompt(TQWidget *parent);
signals:
/**
@@ -219,17 +219,17 @@ class SearchCommand : public Kate::Command, public Kate::CommandExtension
{
public:
SearchCommand() : m_ifindFlags(0) {;}
- bool exec(class Kate::View *view, const QString &cmd, QString &errorMsg);
- bool help(class Kate::View *, const QString &, QString &);
- QStringList cmds();
- bool wantsToProcessText( const QString &/*cmdname*/ );
- void processText( Kate::View *view, const QString& text );
+ bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg);
+ bool help(class Kate::View *, const TQString &, TQString &);
+ TQStringList cmds();
+ bool wantsToProcessText( const TQString &/*cmdname*/ );
+ void processText( Kate::View *view, const TQString& text );
private:
/**
* set up properties for incremental find
*/
- void ifindInit( const QString &cmd );
+ void ifindInit( const TQString &cmd );
/**
* clear properties for incremental find
*/
diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp
index 1afd8d53f..6ce2b2a72 100644
--- a/kate/part/katespell.cpp
+++ b/kate/part/katespell.cpp
@@ -34,7 +34,7 @@
#include <kmessagebox.h>
KateSpell::KateSpell( KateView* view )
- : QObject( view )
+ : TQObject( view )
, m_view (view)
, m_kspell (0)
{
@@ -53,11 +53,11 @@ KateSpell::~KateSpell()
void KateSpell::createActions( KActionCollection* ac )
{
- KStdAction::spelling( this, SLOT(spellcheck()), ac );
- KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
+ KStdAction::spelling( this, TQT_SLOT(spellcheck()), ac );
+ KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" );
a->setWhatsThis(i18n("Check the document's spelling from the cursor and forward"));
- m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
+ m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" );
m_spellcheckSelection->setWhatsThis(i18n("Check spelling of the selected text"));
}
@@ -98,7 +98,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
m_spellPosCursor = from;
m_spellLastPos = 0;
- QString mt = m_view->doc()->mimeType()/*->name()*/;
+ TQString mt = m_view->doc()->mimeType()/*->name()*/;
KSpell::SpellerType type = KSpell::Text;
if ( mt == "text/x-tex" || mt == "text/x-latex" )
@@ -107,7 +107,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
type = KSpell::HTML;
KSpellConfig *ksc = new KSpellConfig;
- QStringList ksEncodings;
+ TQStringList ksEncodings;
ksEncodings << "US-ASCII" << "ISO 8859-1" << "ISO 8859-2" << "ISO 8859-3"
<< "ISO 8859-4" << "ISO 8859-5" << "ISO 8859-7" << "ISO 8859-8"
<< "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8"
@@ -123,17 +123,17 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
kdDebug(13020)<<"KateSpell::spellCheck(): using encoding: "<<enc<<" and KSpell::Type "<<type<<" (for '"<<mt<<"')"<<endl;
m_kspell = new KSpell( m_view, i18n("Spellcheck"),
- this, SLOT(ready(KSpell *)), ksc, true, true, type );
+ this, TQT_SLOT(ready(KSpell *)), ksc, true, true, type );
- connect( m_kspell, SIGNAL(death()),
- this, SLOT(spellCleanDone()) );
+ connect( m_kspell, TQT_SIGNAL(death()),
+ this, TQT_SLOT(spellCleanDone()) );
- connect( m_kspell, SIGNAL(misspelling(const QString&, const QStringList&, unsigned int)),
- this, SLOT(misspelling(const QString&, const QStringList&, unsigned int)) );
- connect( m_kspell, SIGNAL(corrected(const QString&, const QString&, unsigned int)),
- this, SLOT(corrected(const QString&, const QString&, unsigned int)) );
- connect( m_kspell, SIGNAL(done(const QString&)),
- this, SLOT(spellResult(const QString&)) );
+ connect( m_kspell, TQT_SIGNAL(misspelling(const TQString&, const TQStringList&, unsigned int)),
+ this, TQT_SLOT(misspelling(const TQString&, const TQStringList&, unsigned int)) );
+ connect( m_kspell, TQT_SIGNAL(corrected(const TQString&, const TQString&, unsigned int)),
+ this, TQT_SLOT(corrected(const TQString&, const TQString&, unsigned int)) );
+ connect( m_kspell, TQT_SIGNAL(done(const TQString&)),
+ this, TQT_SLOT(spellResult(const TQString&)) );
}
void KateSpell::ready(KSpell *)
@@ -170,7 +170,7 @@ void KateSpell::locatePosition( uint pos, uint& line, uint& col )
col = m_spellPosCursor.col();
}
-void KateSpell::misspelling( const QString& origword, const QStringList&, unsigned int pos )
+void KateSpell::misspelling( const TQString& origword, const TQStringList&, unsigned int pos )
{
uint line, col;
@@ -180,7 +180,7 @@ void KateSpell::misspelling( const QString& origword, const QStringList&, unsign
m_view->setSelection( line, col, line, col + origword.length() );
}
-void KateSpell::corrected( const QString& originalword, const QString& newword, unsigned int pos )
+void KateSpell::corrected( const TQString& originalword, const TQString& newword, unsigned int pos )
{
uint line, col;
@@ -190,7 +190,7 @@ void KateSpell::corrected( const QString& originalword, const QString& newword,
m_view->doc()->insertText( line, col, newword );
}
-void KateSpell::spellResult( const QString& )
+void KateSpell::spellResult( const TQString& )
{
m_view->clearSelection();
m_kspell->cleanUp();
diff --git a/kate/part/katespell.h b/kate/part/katespell.h
index db7dfe0ed..f376ece49 100644
--- a/kate/part/katespell.h
+++ b/kate/part/katespell.h
@@ -60,9 +60,9 @@ class KateSpell : public QObject
void spellcheck( const KateTextCursor &from, const KateTextCursor &to=KateTextCursor() );
void ready(KSpell *);
- void misspelling( const QString&, const QStringList&, unsigned int );
- void corrected ( const QString&, const QString&, unsigned int);
- void spellResult( const QString& );
+ void misspelling( const TQString&, const TQStringList&, unsigned int );
+ void corrected ( const TQString&, const TQString&, unsigned int);
+ void spellResult( const TQString& );
void spellCleanDone();
void locatePosition( uint pos, uint& line, uint& col );
diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp
index 774b695db..8a2689014 100644
--- a/kate/part/katesupercursor.cpp
+++ b/kate/part/katesupercursor.cpp
@@ -23,10 +23,10 @@
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, KateDocCursor(cursor.line(), cursor.col(), doc)
, Kate::Cursor ()
, m_doc (doc)
@@ -38,8 +38,8 @@ KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTex
m_doc->addSuperCursor (this, privateC);
}
-KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, int lineNum, int col, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, int lineNum, int col, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, KateDocCursor(lineNum, col, doc)
, Kate::Cursor ()
, m_doc (doc)
@@ -67,7 +67,7 @@ bool KateSuperCursor::setPosition(uint line, uint col)
return KateDocCursor::setPosition(line, col);
}
-bool KateSuperCursor::insertText(const QString& s)
+bool KateSuperCursor::insertText(const TQString& s)
{
return KateDocCursor::insertText(s);
}
@@ -77,7 +77,7 @@ bool KateSuperCursor::removeText(uint nbChar)
return KateDocCursor::removeText(nbChar);
}
-QChar KateSuperCursor::currentChar() const
+TQChar KateSuperCursor::currentChar() const
{
return KateDocCursor::currentChar();
}
@@ -272,13 +272,13 @@ void KateSuperCursor::editLineRemoved(uint line)
emit positionUnChanged();
}
-KateSuperCursor::operator QString()
+KateSuperCursor::operator TQString()
{
- return QString("[%1,%1]").arg(line()).arg(col());
+ return TQString("[%1,%1]").arg(line()).arg(col());
}
-KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(start)
, m_end(end)
, m_evaluate(false)
@@ -290,8 +290,8 @@ KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QOb
init();
}
-KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(new KateSuperCursor(doc, true, range.start()))
, m_end(new KateSuperCursor(doc, true, range.end()))
, m_evaluate(false)
@@ -303,8 +303,8 @@ KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, QObjec
init();
}
-KateSuperRange::KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRange::KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_start(new KateSuperCursor(doc, true, start))
, m_end(new KateSuperCursor(doc, true, end))
, m_evaluate(false)
@@ -328,15 +328,15 @@ void KateSuperRange::init()
setBehaviour(DoNotExpand);
// Not necessarily the best implementation
- connect(m_start, SIGNAL(positionDirectlyChanged()), SIGNAL(contentsChanged()));
- connect(m_end, SIGNAL(positionDirectlyChanged()), SIGNAL(contentsChanged()));
+ connect(m_start, TQT_SIGNAL(positionDirectlyChanged()), TQT_SIGNAL(contentsChanged()));
+ connect(m_end, TQT_SIGNAL(positionDirectlyChanged()), TQT_SIGNAL(contentsChanged()));
- connect(m_start, SIGNAL(positionChanged()), SLOT(slotEvaluateChanged()));
- connect(m_end, SIGNAL(positionChanged()), SLOT(slotEvaluateChanged()));
- connect(m_start, SIGNAL(positionUnChanged()), SLOT(slotEvaluateUnChanged()));
- connect(m_end, SIGNAL(positionUnChanged()), SLOT(slotEvaluateUnChanged()));
- connect(m_start, SIGNAL(positionDeleted()), SIGNAL(boundaryDeleted()));
- connect(m_end, SIGNAL(positionDeleted()), SIGNAL(boundaryDeleted()));
+ connect(m_start, TQT_SIGNAL(positionChanged()), TQT_SLOT(slotEvaluateChanged()));
+ connect(m_end, TQT_SIGNAL(positionChanged()), TQT_SLOT(slotEvaluateChanged()));
+ connect(m_start, TQT_SIGNAL(positionUnChanged()), TQT_SLOT(slotEvaluateUnChanged()));
+ connect(m_end, TQT_SIGNAL(positionUnChanged()), TQT_SLOT(slotEvaluateUnChanged()));
+ connect(m_start, TQT_SIGNAL(positionDeleted()), TQT_SIGNAL(boundaryDeleted()));
+ connect(m_end, TQT_SIGNAL(positionDeleted()), TQT_SIGNAL(boundaryDeleted()));
}
KateSuperRange::~KateSuperRange()
@@ -411,7 +411,7 @@ bool KateSuperRange::owns(const KateTextCursor& cursor) const
if (!includes(cursor)) return false;
if (children())
- for (QObjectListIt it(*children()); *it; ++it)
+ for (TQObjectListIt it(*children()); *it; ++it)
if ((*it)->inherits("KateSuperRange"))
if (static_cast<KateSuperRange*>(*it)->owns(cursor))
return false;
@@ -446,7 +446,7 @@ bool KateSuperRange::boundaryOn(uint lineNum) const
void KateSuperRange::slotEvaluateChanged()
{
- if (sender() == static_cast<QObject*>(m_start)) {
+ if (sender() == static_cast<TQObject*>(m_start)) {
if (m_evaluate) {
if (!m_endChanged) {
// Only one was changed
@@ -484,7 +484,7 @@ void KateSuperRange::slotEvaluateChanged()
void KateSuperRange::slotEvaluateUnChanged()
{
- if (sender() == static_cast<QObject*>(m_start)) {
+ if (sender() == static_cast<TQObject*>(m_start)) {
if (m_evaluate) {
if (m_endChanged) {
// Only one changed
@@ -536,7 +536,7 @@ void KateSuperRange::evaluatePositionChanged()
emit positionChanged();
}
-int KateSuperCursorList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int KateSuperCursorList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
if (*(static_cast<KateSuperCursor*>(item1)) == *(static_cast<KateSuperCursor*>(item2)))
return 0;
@@ -544,8 +544,8 @@ int KateSuperCursorList::compareItems(QPtrCollection::Item item1, QPtrCollection
return *(static_cast<KateSuperCursor*>(item1)) < *(static_cast<KateSuperCursor*>(item2)) ? -1 : 1;
}
-KateSuperRangeList::KateSuperRangeList(bool autoManage, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRangeList::KateSuperRangeList(bool autoManage, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_autoManage(autoManage)
, m_connect(true)
, m_trackingBoundaries(false)
@@ -553,8 +553,8 @@ KateSuperRangeList::KateSuperRangeList(bool autoManage, QObject* parent, const c
setAutoManage(autoManage);
}
-KateSuperRangeList::KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList, QObject* parent, const char* name)
- : QObject(parent, name)
+KateSuperRangeList::KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent, const char* name)
+ : TQObject(parent, name)
, m_autoManage(false)
, m_connect(false)
, m_trackingBoundaries(false)
@@ -562,9 +562,9 @@ KateSuperRangeList::KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList
appendList(rangeList);
}
-void KateSuperRangeList::appendList(const QPtrList<KateSuperRange>& rangeList)
+void KateSuperRangeList::appendList(const TQPtrList<KateSuperRange>& rangeList)
{
- for (QPtrListIterator<KateSuperRange> it = rangeList; *it; ++it)
+ for (TQPtrListIterator<KateSuperRange> it = rangeList; *it; ++it)
append(*it);
}
@@ -573,7 +573,7 @@ void KateSuperRangeList::clear()
for (KateSuperRange* range = first(); range; range = next())
emit rangeEliminated(range);
- QPtrList<KateSuperRange>::clear();
+ TQPtrList<KateSuperRange>::clear();
}
void KateSuperRangeList::connectAll()
@@ -581,8 +581,8 @@ void KateSuperRangeList::connectAll()
if (!m_connect) {
m_connect = true;
for (KateSuperRange* range = first(); range; range = next()) {
- connect(range, SIGNAL(destroyed(QObject*)), SLOT(slotDeleted(QObject*)));
- connect(range, SIGNAL(eliminated()), SLOT(slotEliminated()));
+ connect(range, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(slotDeleted(TQObject*)));
+ connect(range, TQT_SIGNAL(eliminated()), TQT_SLOT(slotEliminated()));
}
}
}
@@ -598,11 +598,11 @@ void KateSuperRangeList::setAutoManage(bool autoManage)
setAutoDelete(m_autoManage);
}
-QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCursor& cursor)
+TQPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCursor& cursor)
{
sort();
- QPtrList<KateSuperRange> ret;
+ TQPtrList<KateSuperRange> ret;
for (KateSuperRange* r = first(); r; r = next())
if (r->includes(cursor))
@@ -611,11 +611,11 @@ QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(const KateTextCurso
return ret;
}
-QPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(uint line)
+TQPtrList<KateSuperRange> KateSuperRangeList::rangesIncluding(uint line)
{
sort();
- QPtrList<KateSuperRange> ret;
+ TQPtrList<KateSuperRange> ret;
for (KateSuperRange* r = first(); r; r = next())
if (r->includes(line))
@@ -636,7 +636,7 @@ bool KateSuperRangeList::rangesInclude(const KateTextCursor& cursor)
void KateSuperRangeList::slotEliminated()
{
if (sender()) {
- KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<QObject*>(sender()));
+ KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<TQObject*>(sender()));
emit rangeEliminated(range);
if (m_trackingBoundaries) {
@@ -652,7 +652,7 @@ void KateSuperRangeList::slotEliminated()
}
}
-void KateSuperRangeList::slotDeleted(QObject* range)
+void KateSuperRangeList::slotDeleted(TQObject* range)
{
//kdDebug(13020)<<"KateSuperRangeList::slotDeleted"<<endl;
KateSuperRange* r = static_cast<KateSuperRange*>(range);
@@ -685,7 +685,7 @@ KateSuperCursor* KateSuperRangeList::firstBoundary(const KateTextCursor* start)
m_columnBoundaries.sort();
if (start)
- // OPTIMISE: QMap with QPtrList for each line? (==> sorting issues :( )
+ // OPTIMISE: TQMap with TQPtrList for each line? (==> sorting issues :( )
for (KateSuperCursor* c = m_columnBoundaries.first(); c; c = m_columnBoundaries.next())
if (*start <= *c)
break;
@@ -711,7 +711,7 @@ KateSuperCursor* KateSuperRangeList::currentBoundary()
return m_columnBoundaries.current();
}
-int KateSuperRangeList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int KateSuperRangeList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
if (static_cast<KateSuperRange*>(item1)->superStart() == static_cast<KateSuperRange*>(item2)->superStart()) {
if (static_cast<KateSuperRange*>(item1)->superEnd() == static_cast<KateSuperRange*>(item2)->superEnd()) {
@@ -724,12 +724,12 @@ int KateSuperRangeList::compareItems(QPtrCollection::Item item1, QPtrCollection:
return static_cast<KateSuperRange*>(item1)->superStart() < static_cast<KateSuperRange*>(item2)->superStart() ? -1 : 1;
}
-QPtrCollection::Item KateSuperRangeList::newItem(QPtrCollection::Item d)
+TQPtrCollection::Item KateSuperRangeList::newItem(TQPtrCollection::Item d)
{
if (m_connect) {
- connect(static_cast<KateSuperRange*>(d), SIGNAL(destroyed(QObject*)), SLOT(slotDeleted(QObject*)));
- connect(static_cast<KateSuperRange*>(d), SIGNAL(eliminated()), SLOT(slotEliminated()));
- connect(static_cast<KateSuperRange*>(d), SIGNAL(tagRange(KateSuperRange*)), SIGNAL(tagRange(KateSuperRange*)));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(slotDeleted(TQObject*)));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(eliminated()), TQT_SLOT(slotEliminated()));
+ connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(tagRange(KateSuperRange*)), TQT_SIGNAL(tagRange(KateSuperRange*)));
// HACK HACK
static_cast<KateSuperRange*>(d)->slotTagRange();
@@ -740,7 +740,7 @@ QPtrCollection::Item KateSuperRangeList::newItem(QPtrCollection::Item d)
m_columnBoundaries.append(&(static_cast<KateSuperRange*>(d)->superEnd()));
}
- return QPtrList<KateSuperRange>::newItem(d);
+ return TQPtrList<KateSuperRange>::newItem(d);
}
// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesupercursor.h b/kate/part/katesupercursor.h
index e6b16baa8..ef0fd378d 100644
--- a/kate/part/katesupercursor.h
+++ b/kate/part/katesupercursor.h
@@ -42,7 +42,7 @@ class KateView;
*
* @author Hamish Rodda
**/
-class KateSuperCursor : public QObject, public KateDocCursor, public Kate::Cursor
+class KateSuperCursor : public TQObject, public KateDocCursor, public Kate::Cursor
{
Q_OBJECT
@@ -52,8 +52,8 @@ public:
* all internally only used SuperCursors should be private or people could modify them from the
* outside breaking kate's internals
*/
- KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, QObject* parent = 0L, const char* name = 0L);
- KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, QObject* parent = 0L, const char* name = 0L);
+ KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, TQObject* parent = 0L, const char* name = 0L);
~KateSuperCursor ();
@@ -61,9 +61,9 @@ public:
// KTextEditor::Cursor interface
void position(uint *line, uint *col) const;
bool setPosition(uint line, uint col);
- bool insertText(const QString& text);
+ bool insertText(const TQString& text);
bool removeText(uint numberOfCharacters);
- QChar currentChar() const;
+ TQChar currentChar() const;
/**
* @returns true if the cursor is situated at the start of the line, false if it isn't.
@@ -91,7 +91,7 @@ public:
/**
* Debug: output the position.
*/
- operator QString();
+ operator TQString();
// Reimplementations;
virtual void setLine(int lineNum);
@@ -165,7 +165,7 @@ public:
*
* Also tracks its position and emits useful signals.
*/
-class KateSuperRange : public QObject, public KateRange
+class KateSuperRange : public TQObject, public KateRange
{
friend class KateSuperRangeList;
@@ -185,9 +185,9 @@ public:
/**
* Constructor. Takes posession of @p start and @p end.
*/
- KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L);
- KateSuperRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L);
- KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
+ KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateSuperRange();
@@ -330,13 +330,13 @@ private:
bool m_allowZeroLength;
};
-class KateSuperCursorList : public QPtrList<KateSuperCursor>
+class KateSuperCursorList : public TQPtrList<KateSuperCursor>
{
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
};
-class KateSuperRangeList : public QObject, public QPtrList<KateSuperRange>
+class KateSuperRangeList : public TQObject, public TQPtrList<KateSuperRange>
{
Q_OBJECT
@@ -344,7 +344,7 @@ public:
/**
* @sa autoManage()
*/
- KateSuperRangeList(bool autoManage = true, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRangeList(bool autoManage = true, TQObject* parent = 0L, const char* name = 0L);
/**
* Semi-copy constructor.
@@ -355,7 +355,7 @@ public:
* Also, does not connect signals and slots to save time, as this is mainly
* used by the document itself while drawing (call connectAll() to re-constitute)
*/
- KateSuperRangeList(const QPtrList<KateSuperRange>& rangeList, QObject* parent = 0L, const char* name = 0L);
+ KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent = 0L, const char* name = 0L);
virtual ~KateSuperRangeList() {}
/**
@@ -363,7 +363,7 @@ public:
* If this object was created by the semi-copy constructor, it may not connect items
* (unless connectAll() has already been called), call connectAll().
*/
- void appendList(const QPtrList<KateSuperRange>& rangeList);
+ void appendList(const TQPtrList<KateSuperRange>& rangeList);
/**
* Connect items that are not connected. This only needs to be called once,
@@ -391,8 +391,8 @@ public:
* This is just a straight-forward list so that there is no confusion about whether
* this list should be auto-managed (ie. it shouldn't, to avoid double deletions).
*/
- QPtrList<KateSuperRange> rangesIncluding(const KateTextCursor& cursor);
- QPtrList<KateSuperRange> rangesIncluding(uint line);
+ TQPtrList<KateSuperRange> rangesIncluding(const KateTextCursor& cursor);
+ TQPtrList<KateSuperRange> rangesIncluding(uint line);
/**
* @retval true if one of the ranges in the list includes @p cursor
@@ -439,16 +439,16 @@ protected:
/**
* internal reimplementation
*/
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
/**
* internal reimplementation
*/
- virtual QPtrCollection::Item newItem(QPtrCollection::Item d);
+ virtual TQPtrCollection::Item newItem(TQPtrCollection::Item d);
private slots:
void slotEliminated();
- void slotDeleted(QObject* range);
+ void slotDeleted(TQObject* range);
private:
bool m_autoManage;
diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp
index e5c18c8ef..8e391b620 100644
--- a/kate/part/katesyntaxdocument.cpp
+++ b/kate/part/katesyntaxdocument.cpp
@@ -29,10 +29,10 @@
#include <kmessagebox.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
KateSyntaxDocument::KateSyntaxDocument(bool force)
- : QDomDocument()
+ : TQDomDocument()
{
// Let's build the Mode List (katesyntaxhighlightingrc)
setupModeList(force);
@@ -48,20 +48,20 @@ KateSyntaxDocument::~KateSyntaxDocument()
the new one and assign some other things.
identifier = File name and path of the new xml needed
*/
-bool KateSyntaxDocument::setIdentifier(const QString& identifier)
+bool KateSyntaxDocument::setIdentifier(const TQString& identifier)
{
// if the current file is the same as the new one don't do anything.
if(currentFile != identifier)
{
// let's open the new file
- QFile f( identifier );
+ TQFile f( identifier );
if ( f.open(IO_ReadOnly) )
{
// Let's parse the contets of the xml file
/* The result of this function should be check for robustness,
a false returned means a parse error */
- QString errorMsg;
+ TQString errorMsg;
int line, col;
bool success=setContent(&f,&errorMsg,&line,&col);
@@ -100,7 +100,7 @@ bool KateSyntaxDocument::nextGroup( KateSyntaxContextData* data)
if (data->currentGroup.isNull())
{
// Skip over non-elements. So far non-elements are just comments
- QDomNode node = data->parent.firstChild();
+ TQDomNode node = data->parent.firstChild();
while (node.isComment())
node = node.nextSibling();
@@ -109,7 +109,7 @@ bool KateSyntaxDocument::nextGroup( KateSyntaxContextData* data)
else
{
// common case, iterate over siblings, skipping comments as we go
- QDomNode node = data->currentGroup.nextSibling();
+ TQDomNode node = data->currentGroup.nextSibling();
while (node.isComment())
node = node.nextSibling();
@@ -129,7 +129,7 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
if (data->item.isNull())
{
- QDomNode node = data->currentGroup.firstChild();
+ TQDomNode node = data->currentGroup.firstChild();
while (node.isComment())
node = node.nextSibling();
@@ -137,7 +137,7 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
}
else
{
- QDomNode node = data->item.nextSibling();
+ TQDomNode node = data->item.nextSibling();
while (node.isComment())
node = node.nextSibling();
@@ -150,9 +150,9 @@ bool KateSyntaxDocument::nextItem( KateSyntaxContextData* data)
/**
* This function is used to fetch the atributes of the tags of the item in a KateSyntaxContextData.
*/
-QString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, const QString& name){
+TQString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, const TQString& name){
if(!data)
- return QString::null;
+ return TQString::null;
// If there's no name just return the tag name of data->item
if ( (!data->item.isNull()) && (name.isEmpty()))
@@ -166,14 +166,14 @@ QString KateSyntaxDocument::groupItemData( const KateSyntaxContextData* data, co
return data->item.attribute(name);
}
- return QString::null;
+ return TQString::null;
}
-QString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const QString& name)
+TQString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const TQString& name)
{
if(!data)
- return QString::null;
+ return TQString::null;
if (!data->currentGroup.isNull())
{
@@ -181,7 +181,7 @@ QString KateSyntaxDocument::groupData( const KateSyntaxContextData* data,const Q
}
else
{
- return QString::null;
+ return TQString::null;
}
}
@@ -204,25 +204,25 @@ KateSyntaxContextData* KateSyntaxDocument::getSubItems(KateSyntaxContextData* da
return retval;
}
-bool KateSyntaxDocument::getElement (QDomElement &element, const QString &mainGroupName, const QString &config)
+bool KateSyntaxDocument::getElement (TQDomElement &element, const TQString &mainGroupName, const TQString &config)
{
kdDebug(13010) << "Looking for \"" << mainGroupName << "\" -> \"" << config << "\"." << endl;
- QDomNodeList nodes = documentElement().childNodes();
+ TQDomNodeList nodes = documentElement().childNodes();
// Loop over all these child nodes looking for mainGroupName
for (unsigned int i=0; i<nodes.count(); i++)
{
- QDomElement elem = nodes.item(i).toElement();
+ TQDomElement elem = nodes.item(i).toElement();
if (elem.tagName() == mainGroupName)
{
// Found mainGroupName ...
- QDomNodeList subNodes = elem.childNodes();
+ TQDomNodeList subNodes = elem.childNodes();
// ... so now loop looking for config
for (unsigned int j=0; j<subNodes.count(); j++)
{
- QDomElement subElem = subNodes.item(j).toElement();
+ TQDomElement subElem = subNodes.item(j).toElement();
if (subElem.tagName() == config)
{
// Found it!
@@ -241,12 +241,12 @@ bool KateSyntaxDocument::getElement (QDomElement &element, const QString &mainGr
}
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::item will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::item will contain the TQDomElement found
*/
-KateSyntaxContextData* KateSyntaxDocument::getConfig(const QString& mainGroupName, const QString &config)
+KateSyntaxContextData* KateSyntaxDocument::getConfig(const TQString& mainGroupName, const TQString &config)
{
- QDomElement element;
+ TQDomElement element;
if (getElement(element, mainGroupName, config))
{
KateSyntaxContextData *data = new KateSyntaxContextData;
@@ -257,12 +257,12 @@ KateSyntaxContextData* KateSyntaxDocument::getConfig(const QString& mainGroupNam
}
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::parent will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::parent will contain the TQDomElement found
*/
-KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const QString& mainGroupName, const QString &group)
+KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const TQString& mainGroupName, const TQString &group)
{
- QDomElement element;
+ TQDomElement element;
if (getElement(element, mainGroupName, group+"s"))
{
KateSyntaxContextData *data = new KateSyntaxContextData;
@@ -275,30 +275,30 @@ KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const QString& mainGroup
/**
* Returns a list with all the keywords inside the list type
*/
-QStringList& KateSyntaxDocument::finddata(const QString& mainGroup, const QString& type, bool clearList)
+TQStringList& KateSyntaxDocument::finddata(const TQString& mainGroup, const TQString& type, bool clearList)
{
kdDebug(13010)<<"Create a list of keywords \""<<type<<"\" from \""<<mainGroup<<"\"."<<endl;
if (clearList)
m_data.clear();
- for(QDomNode node = documentElement().firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = documentElement().firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement elem = node.toElement();
+ TQDomElement elem = node.toElement();
if (elem.tagName() == mainGroup)
{
kdDebug(13010)<<"\""<<mainGroup<<"\" found."<<endl;
- QDomNodeList nodelist1 = elem.elementsByTagName("list");
+ TQDomNodeList nodelist1 = elem.elementsByTagName("list");
for (uint l=0; l<nodelist1.count(); l++)
{
if (nodelist1.item(l).toElement().attribute("name") == type)
{
kdDebug(13010)<<"List with attribute name=\""<<type<<"\" found."<<endl;
- QDomNodeList childlist = nodelist1.item(l).toElement().childNodes();
+ TQDomNodeList childlist = nodelist1.item(l).toElement().childNodes();
for (uint i=0; i<childlist.count(); i++)
{
- QString element = childlist.item(i).toElement().text().stripWhiteSpace();
+ TQString element = childlist.item(i).toElement().text().stripWhiteSpace();
if (element.isEmpty())
continue;
#ifndef NDEBUG
@@ -346,13 +346,13 @@ void KateSyntaxDocument::setupModeList (bool force)
}
// Let's get a list of all the xml files for hl
- QStringList list = KGlobal::dirs()->findAllResources("data","katepart/syntax/*.xml",false,true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data","katepart/syntax/*.xml",false,true);
// Let's iterate through the list and build the Mode List
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// Each file has a group called:
- QString Group="Cache "+ *it;
+ TQString Group="Cache "+ *it;
// Let's go to this group
config.setGroup(Group);
@@ -360,7 +360,7 @@ void KateSyntaxDocument::setupModeList (bool force)
// stat the file
struct stat sbuf;
memset (&sbuf, 0, sizeof(sbuf));
- stat(QFile::encodeName(*it), &sbuf);
+ stat(TQFile::encodeName(*it), &sbuf);
// If the group exist and we're not forced to read the xml file, let's build myModeList for katesyntax..rc
if (!force && config.hasGroup(Group) && (sbuf.st_mtime == config.readNumEntry("lastModified")))
@@ -387,13 +387,13 @@ void KateSyntaxDocument::setupModeList (bool force)
kdDebug (13010) << "UPDATE hl cache for: " << *it << endl;
// We're forced to read the xml files or the mode doesn't exist in the katesyntax...rc
- QFile f(*it);
+ TQFile f(*it);
if (f.open(IO_ReadOnly))
{
// Ok we opened the file, let's read the contents and close the file
/* the return of setContent should be checked because a false return shows a parsing error */
- QString errMsg;
+ TQString errMsg;
int line, col;
bool success = setContent(&f,&errMsg,&line,&col);
@@ -402,7 +402,7 @@ void KateSyntaxDocument::setupModeList (bool force)
if (success)
{
- QDomElement root = documentElement();
+ TQDomElement root = documentElement();
if (!root.isNull())
{
@@ -421,7 +421,7 @@ void KateSyntaxDocument::setupModeList (bool force)
mli->author = root.attribute("author");
mli->license = root.attribute("license");
- QString hidden = root.attribute("hidden");
+ TQString hidden = root.attribute("hidden");
mli->hidden = (hidden == "true" || hidden == "TRUE");
mli->identifier = *it;
@@ -458,7 +458,7 @@ void KateSyntaxDocument::setupModeList (bool force)
emli->mimetype="invalid_file/invalid_file";
emli->extension="invalid_file.invalid_file";
emli->version="1.";
- emli->name=QString ("Error: %1").arg(*it); // internal
+ emli->name=TQString ("Error: %1").arg(*it); // internal
emli->nameTranslated=i18n("Error: %1").arg(*it); // translated
emli->identifier=(*it);
diff --git a/kate/part/katesyntaxdocument.h b/kate/part/katesyntaxdocument.h
index 1e5171390..93deb731d 100644
--- a/kate/part/katesyntaxdocument.h
+++ b/kate/part/katesyntaxdocument.h
@@ -20,8 +20,8 @@
#ifndef __KATE_SYNTAXDOCUMENT_H__
#define __KATE_SYNTAXDOCUMENT_H__
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
/**
* Information about each syntax hl Mode
@@ -29,23 +29,23 @@
class KateSyntaxModeListItem
{
public:
- QString name;
- QString nameTranslated;
- QString section;
- QString mimetype;
- QString extension;
- QString identifier;
- QString version;
- QString priority;
- QString author;
- QString license;
+ TQString name;
+ TQString nameTranslated;
+ TQString section;
+ TQString mimetype;
+ TQString extension;
+ TQString identifier;
+ TQString version;
+ TQString priority;
+ TQString author;
+ TQString license;
bool hidden;
};
/**
* List of the KateSyntaxModeListItems holding all the syntax mode list items
*/
-typedef QValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
+typedef TQValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
/**
* Class holding the data around the current QDomElement
@@ -53,9 +53,9 @@ typedef QValueList<KateSyntaxModeListItem*> KateSyntaxModeList;
class KateSyntaxContextData
{
public:
- QDomElement parent;
- QDomElement currentGroup;
- QDomElement item;
+ TQDomElement parent;
+ TQDomElement currentGroup;
+ TQDomElement item;
};
/**
@@ -82,7 +82,7 @@ class KateSyntaxDocument : public QDomDocument
* @param identifier file name and path of the new xml needed
* @return success
*/
- bool setIdentifier(const QString& identifier);
+ bool setIdentifier(const TQString& identifier);
/**
* Get the mode list
@@ -107,8 +107,8 @@ class KateSyntaxDocument : public QDomDocument
/**
* This function is used to fetch the atributes of the tags.
*/
- QString groupItemData(const KateSyntaxContextData* data,const QString& name);
- QString groupData(const KateSyntaxContextData* data,const QString& name);
+ TQString groupItemData(const KateSyntaxContextData* data,const TQString& name);
+ TQString groupData(const KateSyntaxContextData* data,const TQString& name);
void freeGroupInfo(KateSyntaxContextData* data);
KateSyntaxContextData* getSubItems(KateSyntaxContextData* data);
@@ -117,18 +117,18 @@ class KateSyntaxDocument : public QDomDocument
* Get the KateSyntaxContextData of the DomElement Config inside mainGroupName
* It just fills KateSyntaxContextData::item
*/
- KateSyntaxContextData* getConfig(const QString& mainGroupName, const QString &config);
+ KateSyntaxContextData* getConfig(const TQString& mainGroupName, const TQString &config);
/**
- * Get the KateSyntaxContextData of the QDomElement Config inside mainGroupName
- * KateSyntaxContextData::parent will contain the QDomElement found
+ * Get the KateSyntaxContextData of the TQDomElement Config inside mainGroupName
+ * KateSyntaxContextData::parent will contain the TQDomElement found
*/
- KateSyntaxContextData* getGroupInfo(const QString& mainGroupName, const QString &group);
+ KateSyntaxContextData* getGroupInfo(const TQString& mainGroupName, const TQString &group);
/**
* Returns a list with all the keywords inside the list type
*/
- QStringList& finddata(const QString& mainGroup,const QString& type,bool clearList=true);
+ TQStringList& finddata(const TQString& mainGroup,const TQString& type,bool clearList=true);
private:
/**
@@ -141,7 +141,7 @@ class KateSyntaxDocument : public QDomDocument
* Used by getConfig and getGroupInfo to traverse the xml nodes and
* evenually return the found element
*/
- bool getElement (QDomElement &element, const QString &mainGroupName, const QString &config);
+ bool getElement (TQDomElement &element, const TQString &mainGroupName, const TQString &config);
/**
* List of mode items
@@ -151,12 +151,12 @@ class KateSyntaxDocument : public QDomDocument
/**
* current parsed filename
*/
- QString currentFile;
+ TQString currentFile;
/**
* last found data out of the xml
*/
- QStringList m_data;
+ TQStringList m_data;
};
#endif
diff --git a/kate/part/katetemplatehandler.cpp b/kate/part/katetemplatehandler.cpp
index 3ca86ff70..52e07a2e4 100644
--- a/kate/part/katetemplatehandler.cpp
+++ b/kate/part/katetemplatehandler.cpp
@@ -21,16 +21,16 @@
#include "katesupercursor.h"
#include "katearbitraryhighlight.h"
#include "kateview.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
KateTemplateHandler::KateTemplateHandler(
KateDocument *doc,
uint line, uint column,
- const QString &templateString,
- const QMap<QString, QString> &initialValues )
- : QObject( doc )
+ const TQString &templateString,
+ const TQMap<TQString, TQString> &initialValues )
+ : TQObject( doc )
, KateKeyInterceptorFunctor()
, m_doc( doc )
, m_currentTabStop( -1 )
@@ -38,7 +38,7 @@ KateTemplateHandler::KateTemplateHandler(
, m_initOk( false )
, m_recursion( false )
{
- connect( m_doc, SIGNAL( destroyed() ), this, SLOT( slotDocumentDestroyed() ) );
+ connect( m_doc, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDocumentDestroyed() ) );
m_ranges = new KateSuperRangeList( false, this ); //false/*,this*/);
if ( !m_doc->setTabInterceptor( this ) )
@@ -53,12 +53,12 @@ KateTemplateHandler::KateTemplateHandler(
hlr->setUnderline(true);
hlr->setOverline(true);
l->append(hlr);*/
- QValueList<KateTemplateHandlerPlaceHolderInfo> buildList;
- QRegExp rx( "([$%])\\{([^}\\s]+)\\}" );
+ TQValueList<KateTemplateHandlerPlaceHolderInfo> buildList;
+ TQRegExp rx( "([$%])\\{([^}\\s]+)\\}" );
rx.setMinimal( true );
int pos = 0;
int opos = 0;
- QString insertString = templateString;
+ TQString insertString = templateString;
while ( pos >= 0 )
{
@@ -76,8 +76,8 @@ KateTemplateHandler::KateTemplateHandler(
}
}
- QString placeholder = rx.cap( 2 );
- QString value = initialValues[ placeholder ];
+ TQString placeholder = rx.cap( 2 );
+ TQString value = initialValues[ placeholder ];
// don't add %{MACRO} to the tab navigation, unless there was not value
if ( rx.cap( 1 ) != "%" || placeholder == value )
@@ -116,13 +116,13 @@ KateTemplateHandler::KateTemplateHandler(
m_doc->tagLines( ( *it ) ->start().line(), ( *it ) ->end().line() );
}
- /* connect(doc,SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)),this,
- SLOT(slotCharactersInteractivlyInserted(int,int,const QString&)));
- connect(doc,SIGNAL(charactersSemiInteractivelyInserted(int ,int ,const QString&)),this,
- SLOT(slotCharactersInteractivlyInserted(int,int,const QString&)));*/
- connect( doc, SIGNAL( textInserted( int, int ) ), this, SLOT( slotTextInserted( int, int ) ) );
- connect( doc, SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
- connect( doc, SIGNAL( textRemoved() ), this, SLOT( slotTextRemoved() ) );
+ /* connect(doc,TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)),this,
+ TQT_SLOT(slotCharactersInteractivlyInserted(int,int,const TQString&)));
+ connect(doc,TQT_SIGNAL(charactersSemiInteractivelyInserted(int ,int ,const TQString&)),this,
+ TQT_SLOT(slotCharactersInteractivlyInserted(int,int,const TQString&)));*/
+ connect( doc, TQT_SIGNAL( textInserted( int, int ) ), this, TQT_SLOT( slotTextInserted( int, int ) ) );
+ connect( doc, TQT_SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, TQT_SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
+ connect( doc, TQT_SIGNAL( textRemoved() ), this, TQT_SLOT( slotTextRemoved() ) );
( *this ) ( Qt::Key_Tab );
}
@@ -146,13 +146,13 @@ KateTemplateHandler::~KateTemplateHandler()
void KateTemplateHandler::slotDocumentDestroyed() {m_doc = 0;}
-void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, const QString& insertString, const QValueList<KateTemplateHandlerPlaceHolderInfo> &buildList )
+void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, const TQString& insertString, const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList )
{
uint line = insertLine;
uint col = insertCol;
uint colInText = 0;
- for ( QValueList<KateTemplateHandlerPlaceHolderInfo>::const_iterator it = buildList.begin();it != buildList.end();++it )
+ for ( TQValueList<KateTemplateHandlerPlaceHolderInfo>::const_iterator it = buildList.begin();it != buildList.end();++it )
{
KateTemplatePlaceHolder *ph = m_dict[ ( *it ).placeholder ];
@@ -218,7 +218,7 @@ void KateTemplateHandler::slotTextInserted( int line, int col )
KateTemplatePlaceHolder *ph = m_tabOrder.at( m_currentTabStop );
- QString sourceText = m_doc->text ( m_currentRange->start().line(), m_currentRange->start().col(),
+ TQString sourceText = m_doc->text ( m_currentRange->start().line(), m_currentRange->start().col(),
m_currentRange->end().line(), m_currentRange->end().col(), false );
ph->isInitialValue = false;
@@ -324,9 +324,9 @@ void KateTemplateHandler::slotAboutToRemoveText( const KateTextRange &range )
if ( m_doc )
{
- disconnect( m_doc, SIGNAL( textInserted( int, int ) ), this, SLOT( slotTextInserted( int, int ) ) );
- disconnect( m_doc, SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
- disconnect( m_doc, SIGNAL( textRemoved() ), this, SLOT( slotTextRemoved() ) );
+ disconnect( m_doc, TQT_SIGNAL( textInserted( int, int ) ), this, TQT_SLOT( slotTextInserted( int, int ) ) );
+ disconnect( m_doc, TQT_SIGNAL( aboutToRemoveText( const KateTextRange& ) ), this, TQT_SLOT( slotAboutToRemoveText( const KateTextRange& ) ) );
+ disconnect( m_doc, TQT_SIGNAL( textRemoved() ), this, TQT_SLOT( slotTextRemoved() ) );
}
deleteLater();
diff --git a/kate/part/katetemplatehandler.h b/kate/part/katetemplatehandler.h
index a2f41f518..d7d56e074 100644
--- a/kate/part/katetemplatehandler.h
+++ b/kate/part/katetemplatehandler.h
@@ -20,18 +20,18 @@
#include "katesupercursor.h"
#include "katekeyinterceptorfunctor.h"
-#include <qobject.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KateDocument;
-class KateTemplateHandler: public QObject, public KateKeyInterceptorFunctor {
+class KateTemplateHandler: public TQObject, public KateKeyInterceptorFunctor {
Q_OBJECT
public:
- KateTemplateHandler(KateDocument *doc,uint line,uint column, const QString &templateString, const QMap<QString,QString> &initialValues);
+ KateTemplateHandler(KateDocument *doc,uint line,uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues);
virtual ~KateTemplateHandler();
inline bool initOk() {return m_initOk;}
virtual bool operator()(KKey key);
@@ -44,16 +44,16 @@ class KateTemplateHandler: public QObject, public KateKeyInterceptorFunctor {
class KateTemplateHandlerPlaceHolderInfo{
public:
KateTemplateHandlerPlaceHolderInfo():begin(0),len(0),placeholder(""){};
- KateTemplateHandlerPlaceHolderInfo(uint begin_,uint len_,const QString& placeholder_):begin(begin_),len(len_),placeholder(placeholder_){}
+ KateTemplateHandlerPlaceHolderInfo(uint begin_,uint len_,const TQString& placeholder_):begin(begin_),len(len_),placeholder(placeholder_){}
uint begin;
uint len;
- QString placeholder;
+ TQString placeholder;
};
class KateSuperRangeList *m_ranges;
class KateDocument *m_doc;
- QPtrList<KateTemplatePlaceHolder> m_tabOrder;
- QDict<KateTemplatePlaceHolder> m_dict;
- void generateRangeTable(uint insertLine,uint insertCol, const QString& insertString, const QValueList<KateTemplateHandlerPlaceHolderInfo> &buildList);
+ TQPtrList<KateTemplatePlaceHolder> m_tabOrder;
+ TQDict<KateTemplatePlaceHolder> m_dict;
+ void generateRangeTable(uint insertLine,uint insertCol, const TQString& insertString, const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList);
int m_currentTabStop;
KateSuperRange *m_currentRange;
void locateRange(const KateTextCursor &cursor );
diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp
index 250be5236..e64b928c7 100644
--- a/kate/part/katetextline.cpp
+++ b/kate/part/katetextline.cpp
@@ -25,7 +25,7 @@
#include <kglobal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
KateTextLine::KateTextLine ()
: m_flags(0)
@@ -36,7 +36,7 @@ KateTextLine::~KateTextLine()
{
}
-void KateTextLine::insertText (uint pos, uint insLen, const QChar *insText, uchar *insAttribs)
+void KateTextLine::insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs)
{
// nothing to do
if (insLen == 0)
@@ -110,7 +110,7 @@ void KateTextLine::truncate(uint newLen)
int KateTextLine::nextNonSpaceChar(uint pos) const
{
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = pos; i < len; i++)
{
@@ -128,7 +128,7 @@ int KateTextLine::previousNonSpaceChar(uint pos) const
if (pos >= (uint)len)
pos = len - 1;
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(int i = pos; i >= 0; i--)
{
@@ -149,23 +149,23 @@ int KateTextLine::lastChar() const
return previousNonSpaceChar(m_text.length() - 1);
}
-const QChar *KateTextLine::firstNonSpace() const
+const TQChar *KateTextLine::firstNonSpace() const
{
int first = firstChar();
- return (first > -1) ? ((QChar*)m_text.unicode())+first : m_text.unicode();
+ return (first > -1) ? ((TQChar*)m_text.unicode())+first : m_text.unicode();
}
uint KateTextLine::indentDepth (uint tabwidth) const
{
uint d = 0;
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = 0; i < len; i++)
{
if(unicode[i].isSpace())
{
- if (unicode[i] == QChar('\t'))
+ if (unicode[i] == TQChar('\t'))
d += tabwidth - (d % tabwidth);
else
d++;
@@ -177,7 +177,7 @@ uint KateTextLine::indentDepth (uint tabwidth) const
return d;
}
-bool KateTextLine::stringAtPos(uint pos, const QString& match) const
+bool KateTextLine::stringAtPos(uint pos, const TQString& match) const
{
const uint len = m_text.length();
const uint matchlen = match.length();
@@ -189,8 +189,8 @@ bool KateTextLine::stringAtPos(uint pos, const QString& match) const
// overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580
Q_ASSERT(pos < len);
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
if (unicode[i+pos] != matchUnicode[i])
@@ -199,15 +199,15 @@ bool KateTextLine::stringAtPos(uint pos, const QString& match) const
return true;
}
-bool KateTextLine::startingWith(const QString& match) const
+bool KateTextLine::startingWith(const TQString& match) const
{
const uint matchlen = match.length();
if (matchlen > m_text.length())
return false;
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
if (unicode[i] != matchUnicode[i])
@@ -216,15 +216,15 @@ bool KateTextLine::startingWith(const QString& match) const
return true;
}
-bool KateTextLine::endingWith(const QString& match) const
+bool KateTextLine::endingWith(const TQString& match) const
{
const uint matchlen = match.length();
if (matchlen > m_text.length())
return false;
- const QChar *unicode = m_text.unicode();
- const QChar *matchUnicode = match.unicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
uint start = m_text.length() - matchlen;
for (uint i=0; i < matchlen; i++)
@@ -239,11 +239,11 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const
uint x = 0;
const uint n = kMin (pos, m_text.length());
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < n; z++)
{
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -257,11 +257,11 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
{
uint x = 0;
const uint len = m_text.length();
- const QChar *unicode = m_text.unicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < len; z++)
{
- if (unicode[z] == QChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -270,7 +270,7 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
return x;
}
-bool KateTextLine::searchText (uint startCol, const QString &text, uint *foundAtCol, uint *matchLen, bool casesensitive, bool backwards)
+bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundAtCol, uint *matchLen, bool casesensitive, bool backwards)
{
int index;
@@ -301,7 +301,7 @@ bool KateTextLine::searchText (uint startCol, const QString &text, uint *foundAt
return false;
}
-bool KateTextLine::searchText (uint startCol, const QRegExp &regexp, uint *foundAtCol, uint *matchLen, bool backwards)
+bool KateTextLine::searchText (uint startCol, const TQRegExp &regexp, uint *foundAtCol, uint *matchLen, bool backwards)
{
int index;
@@ -346,8 +346,8 @@ char *KateTextLine::dump (char *buf, bool withHighlighting) const
memcpy(buf, &l, sizeof(uint));
buf += sizeof(uint);
- memcpy(buf, (char *) m_text.unicode(), sizeof(QChar)*l);
- buf += sizeof(QChar) * l;
+ memcpy(buf, (char *) m_text.unicode(), sizeof(TQChar)*l);
+ buf += sizeof(TQChar) * l;
if (!withHighlighting)
return buf;
@@ -393,8 +393,8 @@ char *KateTextLine::restore (char *buf)
buf += sizeof(uint);
// text + attributes
- m_text.setUnicode ((QChar *) buf, l);
- buf += sizeof(QChar) * l;
+ m_text.setUnicode ((TQChar *) buf, l);
+ buf += sizeof(TQChar) * l;
// we just restore a KateTextLine from a buffer first time
if (f & KateTextLine::flagNoOtherData)
diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h
index 9a6ed5e4d..2da0ca577 100644
--- a/kate/part/katetextline.h
+++ b/kate/part/katetextline.h
@@ -25,8 +25,8 @@
#include <ksharedptr.h>
-#include <qmemarray.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
class KateRenderer;
class QTextStream;
@@ -139,16 +139,16 @@ class KateTextLine : public KShared
/**
* Gets the char at the given position
* @param pos position
- * @return character at the given position or QChar::null if position is
+ * @return character at the given position or TQChar::null if position is
* beyond the length of the string
*/
- inline QChar getChar (uint pos) const { return m_text[pos]; }
+ inline TQChar getChar (uint pos) const { return m_text[pos]; }
/**
* Gets the text as a unicode representation
- * @return text of this line as QChar array
+ * @return text of this line as TQChar array
*/
- inline const QChar *text() const { return m_text.unicode(); }
+ inline const TQChar *text() const { return m_text.unicode(); }
/**
* Highlighting array
@@ -168,9 +168,9 @@ class KateTextLine : public KShared
/**
* Gets a QString
- * @return text of line as QString reference
+ * @return text of line as TQString reference
*/
- inline const QString& string() const { return m_text; }
+ inline const TQString& string() const { return m_text; }
/**
* Gets a substring.
@@ -178,14 +178,14 @@ class KateTextLine : public KShared
* @param length length of substring
* @return wanted substring
*/
- inline QString string(uint startCol, uint length) const
+ inline TQString string(uint startCol, uint length) const
{ return m_text.mid(startCol, length); }
/**
* Gets a null terminated pointer to first non space char
* @return array of QChars starting at first non-whitespace char
*/
- const QChar *firstNonSpace() const;
+ const TQChar *firstNonSpace() const;
/**
* indentation depth of this line
@@ -216,21 +216,21 @@ class KateTextLine : public KShared
* @param match string to match at given pos
* @return did the string match?
*/
- bool stringAtPos(uint pos, const QString& match) const;
+ bool stringAtPos(uint pos, const TQString& match) const;
/**
* Is the line starting with the given string
* @param match string to test
* @return does line start with given string?
*/
- bool startingWith(const QString& match) const;
+ bool startingWith(const TQString& match) const;
/**
* Is the line ending with the given string
* @param match string to test
* @return does the line end with given string?
*/
- bool endingWith(const QString& match) const;
+ bool endingWith(const TQString& match) const;
/**
* search given string
@@ -242,7 +242,7 @@ class KateTextLine : public KShared
* @param backwards search backwards?
* @return string found?
*/
- bool searchText (uint startCol, const QString &text,
+ bool searchText (uint startCol, const TQString &text,
uint *foundAtCol, uint *matchLen,
bool casesensitive = true,
bool backwards = false);
@@ -256,7 +256,7 @@ class KateTextLine : public KShared
* @param backwards search backwards?
* @return regexp found?
*/
- bool searchText (uint startCol, const QRegExp &regexp,
+ bool searchText (uint startCol, const TQRegExp &regexp,
uint *foundAtCol, uint *matchLen,
bool backwards = false);
@@ -278,7 +278,7 @@ class KateTextLine : public KShared
* context stack
* @return context stack
*/
- inline const QMemArray<short> &ctxArray () const { return m_ctx; };
+ inline const TQMemArray<short> &ctxArray () const { return m_ctx; };
/**
* @return true if any context at the line end has the noIndentBasedFolding flag set
@@ -289,13 +289,13 @@ class KateTextLine : public KShared
* folding list
* @return folding array
*/
- inline const QMemArray<uint> &foldingListArray () const { return m_foldingList; };
+ inline const TQMemArray<uint> &foldingListArray () const { return m_foldingList; };
/**
* indentation stack
* @return indentation array
*/
- inline const QMemArray<unsigned short> &indentationDepthArray () const { return m_indentationDepth; };
+ inline const TQMemArray<unsigned short> &indentationDepthArray () const { return m_indentationDepth; };
/**
* insert text into line
@@ -304,7 +304,7 @@ class KateTextLine : public KShared
* @param insText text to insert
* @param insAttribs attributes for the insert text
*/
- void insertText (uint pos, uint insLen, const QChar *insText, uchar *insAttribs = 0);
+ void insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs = 0);
/**
* remove text at given position
@@ -343,7 +343,7 @@ class KateTextLine : public KShared
* Sets the syntax highlight context number
* @param val new context array
*/
- inline void setContext (QMemArray<short> &val) { m_ctx.assign (val); }
+ inline void setContext (TQMemArray<short> &val) { m_ctx.assign (val); }
/**
* sets if for the next line indent based folding should be disabled
@@ -364,13 +364,13 @@ class KateTextLine : public KShared
* update folding list
* @param val new folding list
*/
- inline void setFoldingList (QMemArray<uint> &val) { m_foldingList.assign (val); m_foldingList.detach(); }
+ inline void setFoldingList (TQMemArray<uint> &val) { m_foldingList.assign (val); m_foldingList.detach(); }
/**
* update indentation stack
* @param val new indentation stack
*/
- inline void setIndentationDepth (QMemArray<unsigned short> &val) { m_indentationDepth.assign (val); }
+ inline void setIndentationDepth (TQMemArray<unsigned short> &val) { m_indentationDepth.assign (val); }
/**
* Methodes for dump/restore of the line in the buffer
@@ -385,7 +385,7 @@ class KateTextLine : public KShared
{
return ( 1
+ sizeof(uint)
- + (m_text.length() * sizeof(QChar))
+ + (m_text.length() * sizeof(TQChar))
+ ( withHighlighting ?
( (3 * sizeof(uint))
+ (m_text.length() * sizeof(uchar))
@@ -421,29 +421,29 @@ class KateTextLine : public KShared
/**
* text of line as unicode
*/
- QString m_text;
+ TQString m_text;
/**
* array of highlighting attributes
* This is exactly the same size as m_text.length()
* Each letter in m_text has a uchar attribute
*/
- QMemArray<uchar> m_attributes;
+ TQMemArray<uchar> m_attributes;
/**
* context stack
*/
- QMemArray<short> m_ctx;
+ TQMemArray<short> m_ctx;
/**
* list of folding starts/ends
*/
- QMemArray<uint> m_foldingList;
+ TQMemArray<uint> m_foldingList;
/**
* indentation stack
*/
- QMemArray<unsigned short> m_indentationDepth;
+ TQMemArray<unsigned short> m_indentationDepth;
/**
* flags
diff --git a/kate/part/kateundo.cpp b/kate/part/kateundo.cpp
index 0f8d3599f..379df16f0 100644
--- a/kate/part/kateundo.cpp
+++ b/kate/part/kateundo.cpp
@@ -38,7 +38,7 @@
* @param len lenght of change
* @param text text removed/inserted
*/
- KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
/**
* Destructor
@@ -112,7 +112,7 @@
* text inserted/removed
* @return text
*/
- inline const QString& text() const { return m_text; };
+ inline const TQString& text() const { return m_text; };
private:
/**
@@ -138,10 +138,10 @@
/**
* text
*/
- QString m_text;
+ TQString m_text;
};
-KateUndo::KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+KateUndo::KateUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
: m_type (type),
m_line (line),
m_col (col),
@@ -329,7 +329,7 @@ void KateUndoGroup::redo ()
m_doc->editEnd ();
}
-void KateUndoGroup::addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
+void KateUndoGroup::addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
{
addItem(new KateUndo(type, line, col, len, text));
}
diff --git a/kate/part/kateundo.h b/kate/part/kateundo.h
index 66905f5cd..4d0141189 100644
--- a/kate/part/kateundo.h
+++ b/kate/part/kateundo.h
@@ -21,8 +21,8 @@
#ifndef kate_undo_h
#define kate_undo_h
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KateDocument;
class KateUndo;
@@ -79,7 +79,7 @@ class KateUndoGroup
* @param len lenght of change
* @param text text removed/inserted
*/
- void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
+ void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
/**
* merge this group with an other
@@ -128,7 +128,7 @@ class KateUndoGroup
/**
* list of items contained
*/
- QPtrList<KateUndo> m_items;
+ TQPtrList<KateUndo> m_items;
/**
* prohibit merging with the next group
diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp
index 6592bc8cc..7840e79d5 100644
--- a/kate/part/kateview.cpp
+++ b/kate/part/kateview.cpp
@@ -71,17 +71,17 @@
#include <ktempfile.h>
#include <ksavefile.h>
-#include <qfont.h>
-#include <qfileinfo.h>
-#include <qstyle.h>
-#include <qevent.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qstylesheet.h>
+#include <tqfont.h>
+#include <tqfileinfo.h>
+#include <tqstyle.h>
+#include <tqevent.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqstylesheet.h>
//END includes
-KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
+KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name )
: Kate::View( doc, parent, name )
, m_doc( doc )
, m_search( new KateSearch( this ) )
@@ -108,7 +108,7 @@ KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
m_renderer = new KateRenderer(doc, this);
- m_grid = new QGridLayout (this, 3, 3);
+ m_grid = new TQGridLayout (this, 3, 3);
m_grid->setRowStretch ( 0, 10 );
m_grid->setRowStretch ( 1, 0 );
@@ -159,8 +159,8 @@ KateView::KateView( KateDocument *doc, QWidget *parent, const char * name )
slotHlChanged();
/*test texthint
- connect(this,SIGNAL(needTextHint(int, int, QString &)),
- this,SLOT(slotNeedTextHint(int, int, QString &)));
+ connect(this,TQT_SIGNAL(needTextHint(int, int, TQString &)),
+ this,TQT_SLOT(slotNeedTextHint(int, int, TQString &)));
enableTextHints(1000);
test texthint*/
}
@@ -172,7 +172,7 @@ KateView::~KateView()
m_doc->removeView( this );
- // its a QObject. don't double-delete
+ // its a TQObject. don't double-delete
//delete m_viewInternal;
//delete m_codeCompletion;
@@ -186,22 +186,22 @@ KateView::~KateView()
void KateView::setupConnections()
{
- connect( m_doc, SIGNAL(undoChanged()),
- this, SLOT(slotNewUndo()) );
- connect( m_doc, SIGNAL(hlChanged()),
- this, SLOT(slotHlChanged()) );
- connect( m_doc, SIGNAL(canceled(const QString&)),
- this, SLOT(slotSaveCanceled(const QString&)) );
- connect( m_viewInternal, SIGNAL(dropEventPass(QDropEvent*)),
- this, SIGNAL(dropEventPass(QDropEvent*)) );
- connect(this,SIGNAL(cursorPositionChanged()),this,SLOT(slotStatusMsg()));
- connect(this,SIGNAL(newStatus()),this,SLOT(slotStatusMsg()));
- connect(m_doc, SIGNAL(undoChanged()), this, SLOT(slotStatusMsg()));
+ connect( m_doc, TQT_SIGNAL(undoChanged()),
+ this, TQT_SLOT(slotNewUndo()) );
+ connect( m_doc, TQT_SIGNAL(hlChanged()),
+ this, TQT_SLOT(slotHlChanged()) );
+ connect( m_doc, TQT_SIGNAL(canceled(const TQString&)),
+ this, TQT_SLOT(slotSaveCanceled(const TQString&)) );
+ connect( m_viewInternal, TQT_SIGNAL(dropEventPass(TQDropEvent*)),
+ this, TQT_SIGNAL(dropEventPass(TQDropEvent*)) );
+ connect(this,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(slotStatusMsg()));
+ connect(this,TQT_SIGNAL(newStatus()),this,TQT_SLOT(slotStatusMsg()));
+ connect(m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotStatusMsg()));
if ( m_doc->browserView() )
{
- connect( this, SIGNAL(dropEventPass(QDropEvent*)),
- this, SLOT(slotDropEventPass(QDropEvent*)) );
+ connect( this, TQT_SIGNAL(dropEventPass(TQDropEvent*)),
+ this, TQT_SLOT(slotDropEventPass(TQDropEvent*)) );
}
}
@@ -212,80 +212,80 @@ void KateView::setupActions()
m_toggleWriteLock = 0;
- m_cut = a=KStdAction::cut(this, SLOT(cut()), ac);
+ m_cut = a=KStdAction::cut(this, TQT_SLOT(cut()), ac);
a->setWhatsThis(i18n("Cut the selected text and move it to the clipboard"));
- m_paste = a=KStdAction::pasteText(this, SLOT(paste()), ac);
+ m_paste = a=KStdAction::pasteText(this, TQT_SLOT(paste()), ac);
a->setWhatsThis(i18n("Paste previously copied or cut clipboard contents"));
- m_copy = a=KStdAction::copy(this, SLOT(copy()), ac);
+ m_copy = a=KStdAction::copy(this, TQT_SLOT(copy()), ac);
a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard."));
- m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, this, SLOT(copyHTML()), ac, "edit_copy_html");
+ m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, this, TQT_SLOT(copyHTML()), ac, "edit_copy_html");
a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard."));
if (!m_doc->readOnly())
{
- a=KStdAction::save(this, SLOT(save()), ac);
+ a=KStdAction::save(this, TQT_SLOT(save()), ac);
a->setWhatsThis(i18n("Save the current document"));
- a=m_editUndo = KStdAction::undo(m_doc, SLOT(undo()), ac);
+ a=m_editUndo = KStdAction::undo(m_doc, TQT_SLOT(undo()), ac);
a->setWhatsThis(i18n("Revert the most recent editing actions"));
- a=m_editRedo = KStdAction::redo(m_doc, SLOT(redo()), ac);
+ a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac);
a->setWhatsThis(i18n("Revert the most recent undo operation"));
- (new KAction(i18n("&Word Wrap Document"), "", 0, this, SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
+ (new KAction(i18n("&Word Wrap Document"), "", 0, this, TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis(
i18n("Use this command to wrap all lines of the current document which are longer than the width of the"
" current view, to fit into this view.<br><br> This is a static word wrap, meaning it is not updated"
" when the view is resized."));
// setup Tools menu
- a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, SLOT(indent()), ac, "tools_indent");
+ a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, TQT_SLOT(indent()), ac, "tools_indent");
a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
- a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, SLOT(unIndent()), ac, "tools_unindent");
+ a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, TQT_SLOT(unIndent()), ac, "tools_unindent");
a->setWhatsThis(i18n("Use this to unindent a selected block of text."));
- a=new KAction(i18n("&Clean Indentation"), 0, this, SLOT(cleanIndent()), ac, "tools_cleanIndent");
+ a=new KAction(i18n("&Clean Indentation"), 0, this, TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent");
a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>"
"You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
- a=new KAction(i18n("&Align"), 0, this, SLOT(align()), ac, "tools_align");
+ a=new KAction(i18n("&Align"), 0, this, TQT_SLOT(align()), ac, "tools_align");
a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level."));
- a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, this, SLOT(comment()),
+ a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, this, TQT_SLOT(comment()),
ac, "tools_comment");
a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
- a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, this, SLOT(uncomment()),
+ a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, this, TQT_SLOT(uncomment()),
ac, "tools_uncomment");
a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>"
"The characters for single/multiple line comments are defined within the language's highlighting."));
a = m_toggleWriteLock = new KToggleAction(
i18n("&Read Only Mode"), 0, 0,
- this, SLOT( toggleWriteLock() ),
+ this, TQT_SLOT( toggleWriteLock() ),
ac, "tools_toggle_write_lock" );
a->setWhatsThis( i18n("Lock/unlock the document for writing") );
a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, this,
- SLOT(uppercase()), ac, "tools_uppercase" );
+ TQT_SLOT(uppercase()), ac, "tools_uppercase" );
a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, this,
- SLOT(lowercase()), ac, "tools_lowercase" );
+ TQT_SLOT(lowercase()), ac, "tools_lowercase" );
a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the "
"right of the cursor if no text is selected.") );
a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, this,
- SLOT(capitalize()), ac, "tools_capitalize" );
+ TQT_SLOT(capitalize()), ac, "tools_capitalize" );
a->setWhatsThis( i18n("Capitalize the selection, or the word under the "
"cursor if no text is selected.") );
a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, this,
- SLOT( joinLines() ), ac, "tools_join_lines" );
+ TQT_SLOT( joinLines() ), ac, "tools_join_lines" );
}
else
{
@@ -295,19 +295,19 @@ void KateView::setupActions()
m_editRedo = 0;
}
- a=KStdAction::print( m_doc, SLOT(print()), ac );
+ a=KStdAction::print( m_doc, TQT_SLOT(print()), ac );
a->setWhatsThis(i18n("Print the current document."));
- a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), this, SLOT(reloadFile()), ac, "file_reload");
+ a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), this, TQT_SLOT(reloadFile()), ac, "file_reload");
a->setWhatsThis(i18n("Reload the current document from disk."));
- a=KStdAction::saveAs(this, SLOT(saveAs()), ac);
+ a=KStdAction::saveAs(this, TQT_SLOT(saveAs()), ac);
a->setWhatsThis(i18n("Save the current document to disk, with a name of your choice."));
- a=KStdAction::gotoLine(this, SLOT(gotoLine()), ac);
+ a=KStdAction::gotoLine(this, TQT_SLOT(gotoLine()), ac);
a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to."));
- a=new KAction(i18n("&Configure Editor..."), 0, m_doc, SLOT(configDialog()),ac, "set_confdlg");
+ a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg");
a->setWhatsThis(i18n("Configure various aspects of this editor."));
KateViewHighlightAction *menu = new KateViewHighlightAction (i18n("&Highlighting"), ac, "set_highlight");
@@ -324,46 +324,46 @@ void KateView::setupActions()
new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation");
// html export
- a = new KAction(i18n("E&xport as HTML..."), 0, 0, this, SLOT(exportAsHTML()), ac, "file_export_html");
+ a = new KAction(i18n("E&xport as HTML..."), 0, 0, this, TQT_SLOT(exportAsHTML()), ac, "file_export_html");
a->setWhatsThis(i18n("This command allows you to export the current document"
" with all highlighting information into a HTML document."));
- m_selectAll = a=KStdAction::selectAll(this, SLOT(selectAll()), ac);
+ m_selectAll = a=KStdAction::selectAll(this, TQT_SLOT(selectAll()), ac);
a->setWhatsThis(i18n("Select the entire text of the current document."));
- m_deSelect = a=KStdAction::deselect(this, SLOT(clearSelection()), ac);
+ m_deSelect = a=KStdAction::deselect(this, TQT_SLOT(clearSelection()), ac);
a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected."));
- a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, m_viewInternal, SLOT(slotIncFontSizes()), ac, "incFontSizes");
+ a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, m_viewInternal, TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes");
a->setWhatsThis(i18n("This increases the display font size."));
- a=new KAction(i18n("Shrink Font"), "viewmag-", 0, m_viewInternal, SLOT(slotDecFontSizes()), ac, "decFontSizes");
+ a=new KAction(i18n("Shrink Font"), "viewmag-", 0, m_viewInternal, TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes");
a->setWhatsThis(i18n("This decreases the display font size."));
a= m_toggleBlockSelection = new KToggleAction(
i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B,
- this, SLOT(toggleBlockSelectionMode()),
+ this, TQT_SLOT(toggleBlockSelectionMode()),
ac, "set_verticalSelect");
a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode."));
a= m_toggleInsert = new KToggleAction(
i18n("Overwr&ite Mode"), Key_Insert,
- this, SLOT(toggleInsert()),
+ this, TQT_SLOT(toggleInsert()),
ac, "set_insert" );
a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text."));
KToggleAction *toggleAction;
a= m_toggleDynWrap = toggleAction = new KToggleAction(
i18n("&Dynamic Word Wrap"), Key_F10,
- this, SLOT(toggleDynWordWrap()),
+ this, TQT_SLOT(toggleDynWordWrap()),
ac, "view_dynamic_word_wrap" );
a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen."));
a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators");
a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed"));
- connect(m_setDynWrapIndicators, SIGNAL(activated(int)), this, SLOT(setDynWrapIndicators(int)));
- QStringList list2;
+ connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDynWrapIndicators(int)));
+ TQStringList list2;
list2.append(i18n("&Off"));
list2.append(i18n("Follow &Line Numbers"));
list2.append(i18n("&Always On"));
@@ -371,14 +371,14 @@ void KateView::setupActions()
a= toggleAction=m_toggleFoldingMarkers = new KToggleAction(
i18n("Show Folding &Markers"), Key_F9,
- this, SLOT(toggleFoldingMarkers()),
+ this, TQT_SLOT(toggleFoldingMarkers()),
ac, "view_folding_markers" );
a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible."));
toggleAction->setCheckedState(i18n("Hide Folding &Markers"));
a= m_toggleIconBar = toggleAction = new KToggleAction(
i18n("Show &Icon Border"), Key_F6,
- this, SLOT(toggleIconBorder()),
+ this, TQT_SLOT(toggleIconBorder()),
ac, "view_border");
a=toggleAction;
a->setWhatsThis(i18n("Show/hide the icon border.<BR><BR> The icon border shows bookmark symbols, for instance."));
@@ -386,21 +386,21 @@ void KateView::setupActions()
a= toggleAction=m_toggleLineNumbers = new KToggleAction(
i18n("Show &Line Numbers"), Key_F11,
- this, SLOT(toggleLineNumbersOn()),
+ this, TQT_SLOT(toggleLineNumbersOn()),
ac, "view_line_numbers" );
a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view."));
toggleAction->setCheckedState(i18n("Hide &Line Numbers"));
a= m_toggleScrollBarMarks = toggleAction = new KToggleAction(
i18n("Show Scroll&bar Marks"), 0,
- this, SLOT(toggleScrollBarMarks()),
+ this, TQT_SLOT(toggleScrollBarMarks()),
ac, "view_scrollbar_marks");
a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<BR><BR>The marks, for instance, show bookmarks."));
toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks"));
a = toggleAction = m_toggleWWMarker = new KToggleAction(
i18n("Show Static &Word Wrap Marker"), 0,
- this, SLOT( toggleWWMarker() ),
+ this, TQT_SLOT( toggleWWMarker() ),
ac, "view_word_wrap_marker" );
a->setWhatsThis( i18n(
"Show/hide the Word Wrap Marker, a vertical line drawn at the word "
@@ -409,19 +409,19 @@ void KateView::setupActions()
a= m_switchCmdLine = new KAction(
i18n("Switch to Command Line"), Key_F7,
- this, SLOT(switchToCmdLine()),
+ this, TQT_SLOT(switchToCmdLine()),
ac, "switch_to_cmd_line" );
a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view."));
a=m_setEndOfLine = new KSelectAction(i18n("&End of Line"), 0, ac, "set_eol");
a->setWhatsThis(i18n("Choose which line endings should be used, when you save the document"));
- QStringList list;
+ TQStringList list;
list.append("&UNIX");
list.append("&Windows/DOS");
list.append("&Macintosh");
m_setEndOfLine->setItems(list);
m_setEndOfLine->setCurrentItem (m_doc->config()->eol());
- connect(m_setEndOfLine, SIGNAL(activated(int)), this, SLOT(setEol(int)));
+ connect(m_setEndOfLine, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setEol(int)));
// encoding menu
new KateViewEncodingAction (m_doc, this, i18n("E&ncoding"), ac, "set_encoding");
@@ -432,7 +432,7 @@ void KateView::setupActions()
slotSelectionChanged ();
- connect (this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect (this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
}
void KateView::setupEditActions()
@@ -442,134 +442,134 @@ void KateView::setupEditActions()
new KAction(
i18n("Move Word Left"), CTRL + Key_Left,
- this,SLOT(wordLeft()),
+ this,TQT_SLOT(wordLeft()),
ac, "word_left" );
new KAction(
i18n("Select Character Left"), SHIFT + Key_Left,
- this,SLOT(shiftCursorLeft()),
+ this,TQT_SLOT(shiftCursorLeft()),
ac, "select_char_left" );
new KAction(
i18n("Select Word Left"), SHIFT + CTRL + Key_Left,
- this, SLOT(shiftWordLeft()),
+ this, TQT_SLOT(shiftWordLeft()),
ac, "select_word_left" );
new KAction(
i18n("Move Word Right"), CTRL + Key_Right,
- this, SLOT(wordRight()),
+ this, TQT_SLOT(wordRight()),
ac, "word_right" );
new KAction(
i18n("Select Character Right"), SHIFT + Key_Right,
- this, SLOT(shiftCursorRight()),
+ this, TQT_SLOT(shiftCursorRight()),
ac, "select_char_right" );
new KAction(
i18n("Select Word Right"), SHIFT + CTRL + Key_Right,
- this,SLOT(shiftWordRight()),
+ this,TQT_SLOT(shiftWordRight()),
ac, "select_word_right" );
new KAction(
i18n("Move to Beginning of Line"), Key_Home,
- this, SLOT(home()),
+ this, TQT_SLOT(home()),
ac, "beginning_of_line" );
new KAction(
i18n("Move to Beginning of Document"), KStdAccel::home(),
- this, SLOT(top()),
+ this, TQT_SLOT(top()),
ac, "beginning_of_document" );
new KAction(
i18n("Select to Beginning of Line"), SHIFT + Key_Home,
- this, SLOT(shiftHome()),
+ this, TQT_SLOT(shiftHome()),
ac, "select_beginning_of_line" );
new KAction(
i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home,
- this, SLOT(shiftTop()),
+ this, TQT_SLOT(shiftTop()),
ac, "select_beginning_of_document" );
new KAction(
i18n("Move to End of Line"), Key_End,
- this, SLOT(end()),
+ this, TQT_SLOT(end()),
ac, "end_of_line" );
new KAction(
i18n("Move to End of Document"), KStdAccel::end(),
- this, SLOT(bottom()),
+ this, TQT_SLOT(bottom()),
ac, "end_of_document" );
new KAction(
i18n("Select to End of Line"), SHIFT + Key_End,
- this, SLOT(shiftEnd()),
+ this, TQT_SLOT(shiftEnd()),
ac, "select_end_of_line" );
new KAction(
i18n("Select to End of Document"), SHIFT + CTRL + Key_End,
- this, SLOT(shiftBottom()),
+ this, TQT_SLOT(shiftBottom()),
ac, "select_end_of_document" );
new KAction(
i18n("Select to Previous Line"), SHIFT + Key_Up,
- this, SLOT(shiftUp()),
+ this, TQT_SLOT(shiftUp()),
ac, "select_line_up" );
new KAction(
i18n("Scroll Line Up"),"", CTRL + Key_Up,
- this, SLOT(scrollUp()),
+ this, TQT_SLOT(scrollUp()),
ac, "scroll_line_up" );
- new KAction(i18n("Move to Next Line"), Key_Down, this, SLOT(down()),
+ new KAction(i18n("Move to Next Line"), Key_Down, this, TQT_SLOT(down()),
ac, "move_line_down");
- new KAction(i18n("Move to Previous Line"), Key_Up, this, SLOT(up()),
+ new KAction(i18n("Move to Previous Line"), Key_Up, this, TQT_SLOT(up()),
ac, "move_line_up");
new KAction(i18n("Move Character Right"), Key_Right, this,
- SLOT(cursorRight()), ac, "move_cursor_right");
+ TQT_SLOT(cursorRight()), ac, "move_cursor_right");
- new KAction(i18n("Move Character Left"), Key_Left, this, SLOT(cursorLeft()),
+ new KAction(i18n("Move Character Left"), Key_Left, this, TQT_SLOT(cursorLeft()),
ac, "move_cusor_left");
new KAction(
i18n("Select to Next Line"), SHIFT + Key_Down,
- this, SLOT(shiftDown()),
+ this, TQT_SLOT(shiftDown()),
ac, "select_line_down" );
new KAction(
i18n("Scroll Line Down"), CTRL + Key_Down,
- this, SLOT(scrollDown()),
+ this, TQT_SLOT(scrollDown()),
ac, "scroll_line_down" );
new KAction(
i18n("Scroll Page Up"), KStdAccel::prior(),
- this, SLOT(pageUp()),
+ this, TQT_SLOT(pageUp()),
ac, "scroll_page_up" );
new KAction(
i18n("Select Page Up"), SHIFT + Key_PageUp,
- this, SLOT(shiftPageUp()),
+ this, TQT_SLOT(shiftPageUp()),
ac, "select_page_up" );
new KAction(
i18n("Move to Top of View"), CTRL + Key_PageUp,
- this, SLOT(topOfView()),
+ this, TQT_SLOT(topOfView()),
ac, "move_top_of_view" );
new KAction(
i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp,
- this, SLOT(shiftTopOfView()),
+ this, TQT_SLOT(shiftTopOfView()),
ac, "select_top_of_view" );
new KAction(
i18n("Scroll Page Down"), KStdAccel::next(),
- this, SLOT(pageDown()),
+ this, TQT_SLOT(pageDown()),
ac, "scroll_page_down" );
new KAction(
i18n("Select Page Down"), SHIFT + Key_PageDown,
- this, SLOT(shiftPageDown()),
+ this, TQT_SLOT(shiftPageDown()),
ac, "select_page_down" );
new KAction(
i18n("Move to Bottom of View"), CTRL + Key_PageDown,
- this, SLOT(bottomOfView()),
+ this, TQT_SLOT(bottomOfView()),
ac, "move_bottom_of_view" );
new KAction(
i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown,
- this, SLOT(shiftBottomOfView()),
+ this, TQT_SLOT(shiftBottomOfView()),
ac, "select_bottom_of_view" );
new KAction(
i18n("Move to Matching Bracket"), CTRL + Key_6,
- this, SLOT(toMatchingBracket()),
+ this, TQT_SLOT(toMatchingBracket()),
ac, "to_matching_bracket" );
new KAction(
i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6,
- this, SLOT(shiftToMatchingBracket()),
+ this, TQT_SLOT(shiftToMatchingBracket()),
ac, "select_matching_bracket" );
// anders: shortcuts doing any changes should not be created in browserextension
@@ -577,40 +577,40 @@ void KateView::setupEditActions()
{
new KAction(
i18n("Transpose Characters"), CTRL + Key_T,
- this, SLOT(transpose()),
+ this, TQT_SLOT(transpose()),
ac, "transpose_char" );
new KAction(
i18n("Delete Line"), CTRL + Key_K,
- this, SLOT(killLine()),
+ this, TQT_SLOT(killLine()),
ac, "delete_line" );
new KAction(
i18n("Delete Word Left"), KStdAccel::deleteWordBack(),
- this, SLOT(deleteWordLeft()),
+ this, TQT_SLOT(deleteWordLeft()),
ac, "delete_word_left" );
new KAction(
i18n("Delete Word Right"), KStdAccel::deleteWordForward(),
- this, SLOT(deleteWordRight()),
+ this, TQT_SLOT(deleteWordRight()),
ac, "delete_word_right" );
new KAction(i18n("Delete Next Character"), Key_Delete,
- this, SLOT(keyDelete()),
+ this, TQT_SLOT(keyDelete()),
ac, "delete_next_character");
KAction *a = new KAction(i18n("Backspace"), Key_Backspace,
- this, SLOT(backspace()),
+ this, TQT_SLOT(backspace()),
ac, "backspace");
KShortcut cut = a->shortcut();
cut.append( KKey( SHIFT + Key_Backspace ) );
a->setShortcut( cut );
}
- connect( this, SIGNAL(gotFocus(Kate::View*)),
- this, SLOT(slotGotFocus()) );
- connect( this, SIGNAL(lostFocus(Kate::View*)),
- this, SLOT(slotLostFocus()) );
+ connect( this, TQT_SIGNAL(gotFocus(Kate::View*)),
+ this, TQT_SLOT(slotGotFocus()) );
+ connect( this, TQT_SIGNAL(lostFocus(Kate::View*)),
+ this, TQT_SLOT(slotLostFocus()) );
m_editActions->readShortcutSettings( "Katepart Shortcuts" );
@@ -626,18 +626,18 @@ void KateView::setupCodeFolding()
{
KActionCollection *ac=this->actionCollection();
new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus,
- m_doc->foldingTree(),SLOT(collapseToplevelNodes()),ac,"folding_toplevel");
+ m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel");
new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus,
- this,SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel");
+ this,TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel");
new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus,
- this,SLOT(slotCollapseLocal()),ac,"folding_collapselocal");
+ this,TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal");
new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus,
- this,SLOT(slotExpandLocal()),ac,"folding_expandlocal");
+ this,TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal");
#ifdef DEBUGACCELS
KAccel* debugAccels = new KAccel(this,this);
- debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,SLOT(dumpRegionTree()));
- debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,SLOT(testTemplateCode()));
+ debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree()));
+ debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode()));
debugAccels->setEnabled(true);
#endif
}
@@ -664,16 +664,16 @@ void KateView::slotExpandLocal()
void KateView::setupCodeCompletion()
{
m_codeCompletion = new KateCodeCompletion(this);
- connect( m_codeCompletion, SIGNAL(completionAborted()),
- this, SIGNAL(completionAborted()));
- connect( m_codeCompletion, SIGNAL(completionDone()),
- this, SIGNAL(completionDone()));
- connect( m_codeCompletion, SIGNAL(argHintHidden()),
- this, SIGNAL(argHintHidden()));
- connect( m_codeCompletion, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
- this, SIGNAL(completionDone(KTextEditor::CompletionEntry)));
- connect( m_codeCompletion, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*)),
- this, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*)));
+ connect( m_codeCompletion, TQT_SIGNAL(completionAborted()),
+ this, TQT_SIGNAL(completionAborted()));
+ connect( m_codeCompletion, TQT_SIGNAL(completionDone()),
+ this, TQT_SIGNAL(completionDone()));
+ connect( m_codeCompletion, TQT_SIGNAL(argHintHidden()),
+ this, TQT_SIGNAL(argHintHidden()));
+ connect( m_codeCompletion, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)));
+ connect( m_codeCompletion, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)),
+ this, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)));
}
void KateView::slotGotFocus()
@@ -695,7 +695,7 @@ void KateView::setDynWrapIndicators(int mode)
void KateView::slotStatusMsg ()
{
- QString ovrstr;
+ TQString ovrstr;
if (m_doc->isReadWrite())
{
if (m_doc->config()->configFlags() & KateDocument::cfOvr)
@@ -709,11 +709,11 @@ void KateView::slotStatusMsg ()
uint r = cursorLine() + 1;
uint c = cursorColumn() + 1;
- QString s1 = i18n(" Line: %1").arg(KGlobal::locale()->formatNumber(r, 0));
- QString s2 = i18n(" Col: %1").arg(KGlobal::locale()->formatNumber(c, 0));
+ TQString s1 = i18n(" Line: %1").arg(KGlobal::locale()->formatNumber(r, 0));
+ TQString s2 = i18n(" Col: %1").arg(KGlobal::locale()->formatNumber(c, 0));
- QString modstr = m_doc->isModified() ? QString (" * ") : QString (" ");
- QString blockstr = blockSelectionMode() ? i18n(" BLK ") : i18n(" NORM ");
+ TQString modstr = m_doc->isModified() ? TQString (" * ") : TQString (" ");
+ TQString blockstr = blockSelectionMode() ? i18n(" BLK ") : i18n(" NORM ");
emit viewStatusMsg (s1 + s2 + " " + ovrstr + blockstr + modstr);
}
@@ -751,7 +751,7 @@ void KateView::slotReadWriteChanged ()
m_cut->setEnabled (m_doc->isReadWrite());
m_paste->setEnabled (m_doc->isReadWrite());
- QStringList l;
+ TQStringList l;
l << "edit_replace" << "set_insert" << "tools_spelling" << "tools_indent"
<< "tools_unindent" << "tools_cleanIndent" << "tools_align" << "tools_comment"
@@ -778,7 +778,7 @@ void KateView::slotNewUndo()
m_editRedo->setEnabled(m_doc->redoCount() > 0);
}
-void KateView::slotDropEventPass( QDropEvent * ev )
+void KateView::slotDropEventPass( TQDropEvent * ev )
{
KURL::List lstDragURLs;
bool ok = KURLDrag::decode( ev, lstDragURLs );
@@ -788,12 +788,12 @@ void KateView::slotDropEventPass( QDropEvent * ev )
emit ext->openURLRequest( lstDragURLs.first() );
}
-void KateView::contextMenuEvent( QContextMenuEvent *ev )
+void KateView::contextMenuEvent( TQContextMenuEvent *ev )
{
if ( !m_doc || !m_doc->browserExtension() )
return;
emit m_doc->browserExtension()->popupMenu( /*this, */ev->globalPos(), m_doc->url(),
- QString::fromLatin1( "text/plain" ) );
+ TQString::fromLatin1( "text/plain" ) );
ev->accept();
}
@@ -804,12 +804,12 @@ bool KateView::setCursorPositionInternal( uint line, uint col, uint tabwidth, bo
if (!l)
return false;
- QString line_str = m_doc->textLine( line );
+ TQString line_str = m_doc->textLine( line );
uint z;
uint x = 0;
for (z = 0; z < line_str.length() && z < col; z++) {
- if (line_str[z] == QChar('\t')) x += tabwidth - (x % tabwidth); else x++;
+ if (line_str[z] == TQChar('\t')) x += tabwidth - (x % tabwidth); else x++;
}
m_viewInternal->updateCursor( KateTextCursor( line, x ), false, true, calledExternally );
@@ -860,7 +860,7 @@ KateView::saveResult KateView::saveAs()
{
KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(doc()->config()->encoding(),
- m_doc->url().url(),QString::null,this,i18n("Save File"));
+ m_doc->url().url(),TQString::null,this,i18n("Save File"));
// kdDebug()<<"urllist is emtpy?"<<res.URLs.isEmpty()<<endl;
// kdDebug()<<"url is:"<<res.URLs.first()<<endl;
@@ -880,7 +880,7 @@ bool KateView::checkOverwrite( KURL u )
if( !u.isLocalFile() )
return true;
- QFileInfo info( u.path() );
+ TQFileInfo info( u.path() );
if( !info.exists() )
return true;
@@ -893,7 +893,7 @@ bool KateView::checkOverwrite( KURL u )
);
}
-void KateView::slotSaveCanceled( const QString& error )
+void KateView::slotSaveCanceled( const TQString& error )
{
if ( !error.isEmpty() ) // happens when cancelling a job
KMessageBox::error( this, error );
@@ -903,7 +903,7 @@ void KateView::gotoLine()
{
KateGotoLineDialog *dlg = new KateGotoLineDialog (this, m_viewInternal->getCursor().line() + 1, m_doc->numLines());
- if (dlg->exec() == QDialog::Accepted)
+ if (dlg->exec() == TQDialog::Accepted)
gotoLineNumber( dlg->getLine() - 1 );
delete dlg;
@@ -1084,9 +1084,9 @@ void KateView::applyWordWrap ()
m_doc->wrapText (0, m_doc->lastLine());
}
-void KateView::slotNeedTextHint(int line, int col, QString &text)
+void KateView::slotNeedTextHint(int line, int col, TQString &text)
{
- text=QString("test %1 %2").arg(line).arg(col);
+ text=TQString("test %1 %2").arg(line).arg(col);
}
void KateView::find()
@@ -1094,7 +1094,7 @@ void KateView::find()
m_search->find();
}
-void KateView::find( const QString& pattern, long flags, bool add )
+void KateView::find( const TQString& pattern, long flags, bool add )
{
m_search->find( pattern, flags, add );
}
@@ -1104,7 +1104,7 @@ void KateView::replace()
m_search->replace();
}
-void KateView::replace( const QString &pattern, const QString &replacement, long flags )
+void KateView::replace( const TQString &pattern, const TQString &replacement, long flags )
{
m_search->replace( pattern, replacement, flags );
}
@@ -1141,12 +1141,12 @@ void KateView::switchToCmdLine ()
m_cmdLine->setFocus ();
}
-void KateView::showArgHint( QStringList arg1, const QString& arg2, const QString& arg3 )
+void KateView::showArgHint( TQStringList arg1, const TQString& arg2, const TQString& arg3 )
{
m_codeCompletion->showArgHint( arg1, arg2, arg3 );
}
-void KateView::showCompletionBox( QValueList<KTextEditor::CompletionEntry> arg1, int offset, bool cs )
+void KateView::showCompletionBox( TQValueList<KTextEditor::CompletionEntry> arg1, int offset, bool cs )
{
emit aboutToShowCompletionBox();
m_codeCompletion->showCompletionBox( arg1, offset, cs );
@@ -1251,7 +1251,7 @@ void KateView::updateFoldingConfig ()
m_toggleFoldingMarkers->setChecked( doit );
m_toggleFoldingMarkers->setEnabled( m_doc->highlight() && m_doc->highlight()->allowsFolding() );
- QStringList l;
+ TQStringList l;
l << "folding_toplevel" << "folding_expandtoplevel"
<< "folding_collapselocal" << "folding_expandlocal";
@@ -1421,7 +1421,7 @@ bool KateView::hasSelection() const
return selectStart != selectEnd;
}
-QString KateView::selection() const
+TQString KateView::selection() const
{
int sc = selectStart.col();
int ec = selectEnd.col();
@@ -1613,7 +1613,7 @@ void KateView::copy() const
if (!hasSelection())
return;
- QApplication::clipboard()->setText(selection ());
+ TQApplication::clipboard()->setText(selection ());
}
void KateView::copyHTML()
@@ -1623,16 +1623,16 @@ void KateView::copyHTML()
KMultipleDrag *drag = new KMultipleDrag();
- QTextDrag *htmltextdrag = new QTextDrag(selectionAsHtml()) ;
+ TQTextDrag *htmltextdrag = new TQTextDrag(selectionAsHtml()) ;
htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag);
- drag->addDragObject( new QTextDrag( selection()));
+ drag->addDragObject( new TQTextDrag( selection()));
- QApplication::clipboard()->setData(drag);
+ TQApplication::clipboard()->setData(drag);
}
-QString KateView::selectionAsHtml()
+TQString KateView::selectionAsHtml()
{
int sc = selectStart.col();
int ec = selectEnd.col();
@@ -1650,15 +1650,15 @@ QString KateView::selectionAsHtml()
return textAsHtml (selectStart.line(), sc, selectEnd.line(), ec, blockSelect);
}
-QString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise)
+TQString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise)
{
kdDebug(13020) << "textAsHtml" << endl;
if ( blockwise && (startCol > endCol) )
- return QString ();
+ return TQString ();
- QString s;
- QTextStream ts( &s, IO_WriteOnly );
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ TQString s;
+ TQTextStream ts( &s, IO_WriteOnly );
+ ts.setEncoding(TQTextStream::UnicodeUTF8);
ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">" << endl;
ts << "<html xmlns=\"http://www.w3.org/1999/xhtml\">" << endl;
ts << "<head>" << endl;
@@ -1675,7 +1675,7 @@ QString KateView::textAsHtml ( uint startLine, uint startCol, uint endLine, uint
return s;
}
-void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, QTextStream *ts)
+void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, TQTextStream *ts)
{
if ( (blockwise || startLine == endLine) && (startCol > endCol) )
return;
@@ -1721,15 +1721,15 @@ void KateView::textAsHtmlStream ( uint startLine, uint startCol, uint endLine, u
// fully rewritten to use only inline CSS and support all used attribs.
// anders, 2005-11-01 23:39:43
-void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, QTextStream *outputStream)
+void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, TQTextStream *outputStream)
{
if(length == 0)
return;
// do not recalculate the style strings again and again
- QMap<uchar,QString> stylecache;
+ TQMap<uchar,TQString> stylecache;
// do not insert equally styled characters one by one
- QString textcache;
+ TQString textcache;
KateAttribute *charAttributes = 0;
@@ -1750,8 +1750,8 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
if ( ! stylecache.contains( line->attribute(curPos) ) )
{
- QString textdecoration;
- QString style;
+ TQString textdecoration;
+ TQString style;
if ( charAttributes->bold() )
style.append("font-weight: bold;");
@@ -1765,12 +1765,12 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
textdecoration.append(" line-trough" );
if ( !textdecoration.isEmpty() )
style.append("text-decoration: %1;").arg(textdecoration);
- // QColor::name() returns a string in the form "#RRGGBB" in Qt 3.
+ // TQColor::name() returns a string in the form "#RRGGBB" in Qt 3.
// NOTE Qt 4 returns "#AARRGGBB"
if ( charAttributes->itemSet(KateAttribute::BGColor) )
- style.append(QString("background-color: %1;").arg(charAttributes->bgColor().name()));
+ style.append(TQString("background-color: %1;").arg(charAttributes->bgColor().name()));
if ( charAttributes->itemSet(KateAttribute::TextColor) )
- style.append(QString("color: %1;").arg(charAttributes->textColor().name()));
+ style.append(TQString("color: %1;").arg(charAttributes->textColor().name()));
stylecache[line->attribute(curPos)] = style;
}
@@ -1779,7 +1779,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, Q
<< "\">";
}
- QString s( line->getChar(curPos) );
+ TQString s( line->getChar(curPos) );
if ( s == "&" ) s = "&amp;";
else if ( s == "<" ) s = "&lt;";
else if ( s == ">" ) s = "&gt;";
@@ -1796,7 +1796,7 @@ void KateView::exportAsHTML ()
if ( url.isEmpty() )
return;
- QString filename;
+ TQString filename;
KTempFile tmp; // ### only used for network export
if ( url.isLocalFile() )
@@ -1807,9 +1807,9 @@ void KateView::exportAsHTML ()
KSaveFile *savefile=new KSaveFile(filename);
if (!savefile->status())
{
- QTextStream *outputStream = savefile->textStream();
+ TQTextStream *outputStream = savefile->textStream();
- outputStream->setEncoding(QTextStream::UnicodeUTF8);
+ outputStream->setEncoding(TQTextStream::UnicodeUTF8);
// let's write the HTML header :
(*outputStream) << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
diff --git a/kate/part/kateview.h b/kate/part/kateview.h
index 0e2f310b8..8347c4174 100644
--- a/kate/part/kateview.h
+++ b/kate/part/kateview.h
@@ -32,7 +32,7 @@
#include <ktexteditor/viewstatusmsginterface.h>
#include <ktexteditor/texthintinterface.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KateDocument;
class KateBookmarks;
@@ -69,7 +69,7 @@ class KateView : public Kate::View,
friend class KateCodeCompletion;
public:
- KateView( KateDocument* doc, QWidget* parent = 0L, const char* name = 0 );
+ KateView( KateDocument* doc, TQWidget* parent = 0L, const char* name = 0 );
~KateView ();
//
@@ -94,9 +94,9 @@ class KateView : public Kate::View,
// helper to export text as html stuff
private:
- QString selectionAsHtml ();
- QString textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise);
- void textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, QTextStream *ts);
+ TQString selectionAsHtml ();
+ TQString textAsHtml ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise);
+ void textAsHtmlStream ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise, TQTextStream *ts);
/**
* Gets a substring in valid-xml html.
@@ -110,7 +110,7 @@ class KateView : public Kate::View,
* attributes.
* @param outputStream A stream to write the html to
*/
- void lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, QTextStream *outputStream);
+ void lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, TQTextStream *outputStream);
public slots:
void exportAsHTML ();
@@ -119,14 +119,14 @@ class KateView : public Kate::View,
// KTextEditor::PopupMenuInterface
//
public:
- void installPopup( QPopupMenu* menu ) { m_rmbMenu = menu; }
- QPopupMenu* popup() const { return m_rmbMenu; }
+ void installPopup( TQPopupMenu* menu ) { m_rmbMenu = menu; }
+ TQPopupMenu* popup() const { return m_rmbMenu; }
//
// KTextEditor::ViewCursorInterface
//
public slots:
- QPoint cursorCoordinates()
+ TQPoint cursorCoordinates()
{ return m_viewInternal->cursorCoordinates(); }
void cursorPosition( uint* l, uint* c )
{ if( l ) *l = cursorLine(); if( c ) *c = cursorColumn(); }
@@ -149,15 +149,15 @@ class KateView : public Kate::View,
// KTextEditor::CodeCompletionInterface
//
public slots:
- void showArgHint( QStringList arg1, const QString& arg2, const QString& arg3 );
- void showCompletionBox( QValueList<KTextEditor::CompletionEntry> arg1, int offset = 0, bool cs = true );
+ void showArgHint( TQStringList arg1, const TQString& arg2, const TQString& arg3 );
+ void showCompletionBox( TQValueList<KTextEditor::CompletionEntry> arg1, int offset = 0, bool cs = true );
signals:
void completionAborted();
void completionDone();
void argHintHidden();
void completionDone(KTextEditor::CompletionEntry);
- void filterInsertString(KTextEditor::CompletionEntry*,QString *);
+ void filterInsertString(KTextEditor::CompletionEntry*,TQString *);
void aboutToShowCompletionBox();
//
@@ -168,7 +168,7 @@ class KateView : public Kate::View,
void disableTextHints();
signals:
- void needTextHint(int line, int col, QString &text);
+ void needTextHint(int line, int col, TQString &text);
//
// KTextEditor::DynWordWrapInterface
@@ -189,7 +189,7 @@ class KateView : public Kate::View,
bool clearSelection (bool redraw, bool finishedChangingSelection = true);
bool hasSelection () const;
- QString selection () const ;
+ TQString selection () const ;
bool removeSelectedText ();
@@ -282,16 +282,16 @@ class KateView : public Kate::View,
bool isOverwriteMode() const;
void setOverwriteMode( bool b );
- QString currentTextLine()
+ TQString currentTextLine()
{ return getDoc()->textLine( cursorLine() ); }
- QString currentWord()
+ TQString currentWord()
{ return m_doc->getWord( m_viewInternal->getCursor() ); }
- void insertText( const QString& mark )
+ void insertText( const TQString& mark )
{ getDoc()->insertText( cursorLine(), cursorColumnReal(), mark ); }
bool canDiscard();
int tabWidth() { return m_doc->config()->tabWidth(); }
void setTabWidth( int w ) { m_doc->config()->setTabWidth(w); }
- void setEncoding( QString e ) { m_doc->setEncoding(e); }
+ void setEncoding( TQString e ) { m_doc->setEncoding(e); }
bool isLastView() { return m_doc->isLastView(1); }
public slots:
@@ -377,9 +377,9 @@ class KateView : public Kate::View,
int getEol();
void setEol( int eol );
void find();
- void find( const QString&, long, bool add=true ); ///< proxy for KateSearch
+ void find( const TQString&, long, bool add=true ); ///< proxy for KateSearch
void replace();
- void replace( const QString&, const QString &, long ); ///< proxy for KateSearch
+ void replace( const TQString&, const TQString &, long ); ///< proxy for KateSearch
/** Highly confusing but KateSearch::findAgain() is backwards too. */
void findAgain( bool back );
void findAgain() { findAgain( false ); }
@@ -442,14 +442,14 @@ class KateView : public Kate::View,
void slotReadWriteChanged ();
signals:
- void dropEventPass(QDropEvent*);
- void viewStatusMsg (const QString &msg);
+ void dropEventPass(TQDropEvent*);
+ void viewStatusMsg (const TQString &msg);
public:
bool setCursorPositionInternal( uint line, uint col, uint tabwidth = 1, bool calledExternally = false );
protected:
- void contextMenuEvent( QContextMenuEvent* );
+ void contextMenuEvent( TQContextMenuEvent* );
bool checkOverwrite( KURL );
public slots:
@@ -458,9 +458,9 @@ class KateView : public Kate::View,
private slots:
void slotGotFocus();
void slotLostFocus();
- void slotDropEventPass( QDropEvent* ev );
+ void slotDropEventPass( TQDropEvent* ev );
void slotStatusMsg();
- void slotSaveCanceled( const QString& error );
+ void slotSaveCanceled( const TQString& error );
void slotExpandToplevel();
void slotCollapseLocal();
void slotExpandLocal();
@@ -504,19 +504,19 @@ class KateView : public Kate::View,
KateSearch* m_search;
KateSpell *m_spell;
KateBookmarks* m_bookmarks;
- QGuardedPtr<QPopupMenu> m_rmbMenu;
+ TQGuardedPtr<TQPopupMenu> m_rmbMenu;
KateCodeCompletion* m_codeCompletion;
KateCmdLine *m_cmdLine;
bool m_cmdLineOn;
- QGridLayout *m_grid;
+ TQGridLayout *m_grid;
bool m_active;
bool m_hasWrap;
private slots:
- void slotNeedTextHint(int line, int col, QString &text);
+ void slotNeedTextHint(int line, int col, TQString &text);
void slotHlChanged();
/**
diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp
index 4ca753486..da88676bc 100644
--- a/kate/part/kateviewhelpers.cpp
+++ b/kate/part/kateviewhelpers.cpp
@@ -40,14 +40,14 @@
#include <kcharsets.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <math.h>
@@ -55,7 +55,7 @@
//BEGIN KateScrollBar
KateScrollBar::KateScrollBar (Orientation orientation, KateViewInternal* parent, const char* name)
- : QScrollBar (orientation, parent->m_view, name)
+ : TQScrollBar (orientation, parent->m_view, name)
, m_middleMouseDown (false)
, m_view(parent->m_view)
, m_doc(parent->m_doc)
@@ -65,67 +65,67 @@ KateScrollBar::KateScrollBar (Orientation orientation, KateViewInternal* parent,
, m_savVisibleLines(0)
, m_showMarks(false)
{
- connect(this, SIGNAL(valueChanged(int)), SLOT(sliderMaybeMoved(int)));
- connect(m_doc, SIGNAL(marksChanged()), this, SLOT(marksChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderMaybeMoved(int)));
+ connect(m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(marksChanged()));
m_lines.setAutoDelete(true);
}
-void KateScrollBar::mousePressEvent(QMouseEvent* e)
+void KateScrollBar::mousePressEvent(TQMouseEvent* e)
{
if (e->button() == MidButton)
m_middleMouseDown = true;
- QScrollBar::mousePressEvent(e);
+ TQScrollBar::mousePressEvent(e);
redrawMarks();
}
-void KateScrollBar::mouseReleaseEvent(QMouseEvent* e)
+void KateScrollBar::mouseReleaseEvent(TQMouseEvent* e)
{
- QScrollBar::mouseReleaseEvent(e);
+ TQScrollBar::mouseReleaseEvent(e);
m_middleMouseDown = false;
redrawMarks();
}
-void KateScrollBar::mouseMoveEvent(QMouseEvent* e)
+void KateScrollBar::mouseMoveEvent(TQMouseEvent* e)
{
- QScrollBar::mouseMoveEvent(e);
+ TQScrollBar::mouseMoveEvent(e);
if (e->state() | LeftButton)
redrawMarks();
}
-void KateScrollBar::paintEvent(QPaintEvent *e)
+void KateScrollBar::paintEvent(TQPaintEvent *e)
{
- QScrollBar::paintEvent(e);
+ TQScrollBar::paintEvent(e);
redrawMarks();
}
-void KateScrollBar::resizeEvent(QResizeEvent *e)
+void KateScrollBar::resizeEvent(TQResizeEvent *e)
{
- QScrollBar::resizeEvent(e);
+ TQScrollBar::resizeEvent(e);
recomputeMarksPositions();
}
-void KateScrollBar::styleChange(QStyle &s)
+void KateScrollBar::styleChange(TQStyle &s)
{
- QScrollBar::styleChange(s);
+ TQScrollBar::styleChange(s);
m_topMargin = -1;
recomputeMarksPositions();
}
void KateScrollBar::valueChange()
{
- QScrollBar::valueChange();
+ TQScrollBar::valueChange();
redrawMarks();
}
void KateScrollBar::rangeChange()
{
- QScrollBar::rangeChange();
+ TQScrollBar::rangeChange();
recomputeMarksPositions();
}
@@ -139,9 +139,9 @@ void KateScrollBar::redrawMarks()
if (!m_showMarks)
return;
- QPainter painter(this);
- QRect rect = sliderRect();
- for (QIntDictIterator<QColor> it(m_lines); it.current(); ++it)
+ TQPainter painter(this);
+ TQRect rect = sliderRect();
+ for (TQIntDictIterator<TQColor> it(m_lines); it.current(); ++it)
{
if (it.currentKey() < rect.top() || it.currentKey() > rect.bottom())
{
@@ -161,7 +161,7 @@ void KateScrollBar::recomputeMarksPositions(bool forceFullUpdate)
int realHeight = frameGeometry().height() - m_topMargin - m_bottomMargin;
- QPtrList<KTextEditor::Mark> marks = m_doc->marks();
+ TQPtrList<KTextEditor::Mark> marks = m_doc->marks();
KateCodeFoldingTree *tree = m_doc->foldingTree();
for (KTextEditor::Mark *mark = marks.first(); mark; mark = marks.next())
@@ -184,7 +184,7 @@ void KateScrollBar::recomputeMarksPositions(bool forceFullUpdate)
double d = (double)line / (m_savVisibleLines - 1);
m_lines.insert(m_topMargin + (int)(d * realHeight),
- new QColor(KateRendererConfig::global()->lineMarkerColor((KTextEditor::MarkInterface::MarkTypes)mark->type)));
+ new TQColor(KateRendererConfig::global()->lineMarkerColor((KTextEditor::MarkInterface::MarkTypes)mark->type)));
}
if (forceFullUpdate)
@@ -197,7 +197,7 @@ void KateScrollBar::watchScrollBarSize()
{
int savMax = maxValue();
setMaxValue(0);
- QRect rect = sliderRect();
+ TQRect rect = sliderRect();
setMaxValue(savMax);
m_topMargin = rect.top();
@@ -216,22 +216,22 @@ class KateCmdLnWhatsThis : public QWhatsThis
{
public:
KateCmdLnWhatsThis( KateCmdLine *parent )
- : QWhatsThis( parent )
+ : TQWhatsThis( parent )
, m_parent( parent ) {;}
- QString text( const QPoint & )
+ TQString text( const TQPoint & )
{
- QString beg = "<qt background=\"white\"><div><table width=\"100%\"><tr><td bgcolor=\"brown\"><font color=\"white\"><b>Help: <big>";
- QString mid = "</big></b></font></td></tr><tr><td>";
- QString end = "</td></tr></table></div><qt>";
+ TQString beg = "<qt background=\"white\"><div><table width=\"100%\"><tr><td bgcolor=\"brown\"><font color=\"white\"><b>Help: <big>";
+ TQString mid = "</big></b></font></td></tr><tr><td>";
+ TQString end = "</td></tr></table></div><qt>";
- QString t = m_parent->text();
- QRegExp re( "\\s*help\\s+(.*)" );
+ TQString t = m_parent->text();
+ TQRegExp re( "\\s*help\\s+(.*)" );
if ( re.search( t ) > -1 )
{
- QString s;
+ TQString s;
// get help for command
- QString name = re.cap( 1 );
+ TQString name = re.cap( 1 );
if ( name == "list" )
{
return beg + i18n("Available Commands") + mid
@@ -277,9 +277,9 @@ class KateCmdLineFlagCompletion : public KCompletion
public:
KateCmdLineFlagCompletion() {;}
- QString makeCompletion( const QString & string )
+ TQString makeCompletion( const TQString & string )
{
- return QString::null;
+ return TQString::null;
}
};
@@ -295,15 +295,15 @@ KateCmdLine::KateCmdLine (KateView *view)
, m_command( 0L )
, m_oldCompletionObject( 0L )
{
- connect (this, SIGNAL(returnPressed(const QString &)),
- this, SLOT(slotReturnPressed(const QString &)));
+ connect (this, TQT_SIGNAL(returnPressed(const TQString &)),
+ this, TQT_SLOT(slotReturnPressed(const TQString &)));
completionObject()->insertItems (KateCmd::self()->cmds());
setAutoDeleteCompletionObject( false );
m_help = new KateCmdLnWhatsThis( this );
}
-void KateCmdLine::slotReturnPressed ( const QString& text )
+void KateCmdLine::slotReturnPressed ( const TQString& text )
{
// silently ignore leading space
@@ -311,16 +311,16 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
while( text[n].isSpace() )
n++;
- QString cmd = text.mid( n );
+ TQString cmd = text.mid( n );
// Built in help: if the command starts with "help", [try to] show some help
if ( cmd.startsWith( "help" ) )
{
- m_help->display( m_help->text( QPoint() ), mapToGlobal(QPoint(0,0)) );
+ m_help->display( m_help->text( TQPoint() ), mapToGlobal(TQPoint(0,0)) );
clear();
KateCmd::self()->appendHistory( cmd );
m_histpos = KateCmd::self()->historyLength();
- m_oldText = QString ();
+ m_oldText = TQString ();
return;
}
@@ -333,13 +333,13 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
if (p)
{
- QString msg;
+ TQString msg;
if (p->exec (m_view, cmd, msg))
{
KateCmd::self()->appendHistory( cmd );
m_histpos = KateCmd::self()->historyLength();
- m_oldText = QString ();
+ m_oldText = TQString ();
if (msg.length() > 0)
setText (i18n ("Success: ") + msg);
@@ -375,7 +375,7 @@ void KateCmdLine::slotReturnPressed ( const QString& text )
m_cmdend = 0;
m_view->setFocus ();
- QTimer::singleShot( 4000, this, SLOT(hideMe()) );
+ TQTimer::singleShot( 4000, this, TQT_SLOT(hideMe()) );
}
void KateCmdLine::hideMe () // unless i have focus ;)
@@ -385,7 +385,7 @@ void KateCmdLine::hideMe () // unless i have focus ;)
}
}
-void KateCmdLine::focusInEvent ( QFocusEvent *ev )
+void KateCmdLine::focusInEvent ( TQFocusEvent *ev )
{
if (m_msgMode)
{
@@ -397,7 +397,7 @@ void KateCmdLine::focusInEvent ( QFocusEvent *ev )
KLineEdit::focusInEvent (ev);
}
-void KateCmdLine::keyPressEvent( QKeyEvent *ev )
+void KateCmdLine::keyPressEvent( TQKeyEvent *ev )
{
if (ev->key() == Key_Escape)
{
@@ -415,7 +415,7 @@ void KateCmdLine::keyPressEvent( QKeyEvent *ev )
// during typing, let us see if we have a valid command
if ( ! m_cmdend || cursorpos <= m_cmdend )
{
- QChar c;
+ TQChar c;
if ( ! ev->text().isEmpty() )
c = ev->text()[0];
@@ -443,7 +443,7 @@ void KateCmdLine::keyPressEvent( QKeyEvent *ev )
if ( m_command )
{
//kdDebug(13025)<<"keypress in commandline: We have a command! "<<m_command<<endl;
- QString t = text();
+ TQString t = text();
m_cmdend = 0;
bool b = false;
for ( ; m_cmdend < t.length(); m_cmdend++ )
@@ -512,7 +512,7 @@ void KateCmdLine::fromHistory( bool up )
if ( ! KateCmd::self()->historyLength() )
return;
- QString s;
+ TQString s;
if ( up )
{
@@ -539,7 +539,7 @@ void KateCmdLine::fromHistory( bool up )
{
// Select the argument part of the command, so that it is easy to overwrite
setText( s );
- static QRegExp reCmd = QRegExp(".*[\\w\\-]+(?:[^a-zA-Z0-9_-]|:\\w+)(.*)");
+ static TQRegExp reCmd = TQRegExp(".*[\\w\\-]+(?:[^a-zA-Z0-9_-]|:\\w+)(.*)");
if ( reCmd.search( text() ) == 0 )
setSelection( text().length() - reCmd.cap(1).length(), reCmd.cap(1).length() );
}
@@ -684,8 +684,8 @@ static const char * const bookmark_xpm[] = {
const int iconPaneWidth = 16;
const int halfIPW = 8;
-KateIconBorder::KateIconBorder ( KateViewInternal* internalView, QWidget *parent )
- : QWidget(parent, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
+KateIconBorder::KateIconBorder ( KateViewInternal* internalView, TQWidget *parent )
+ : TQWidget(parent, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
, m_view( internalView->m_view )
, m_doc( internalView->m_doc )
, m_viewInternal( internalView )
@@ -697,12 +697,12 @@ KateIconBorder::KateIconBorder ( KateViewInternal* internalView, QWidget *parent
, m_cachedLNWidth( 0 )
, m_maxCharWidth( 0 )
{
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setBackgroundMode( NoBackground );
m_doc->setDescription( MarkInterface::markType01, i18n("Bookmark") );
- m_doc->setPixmap( MarkInterface::markType01, QPixmap((const char**)bookmark_xpm) );
+ m_doc->setPixmap( MarkInterface::markType01, TQPixmap((const char**)bookmark_xpm) );
updateFont();
}
@@ -716,7 +716,7 @@ void KateIconBorder::setIconBorderOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setLineNumbersOn( bool enable )
@@ -729,7 +729,7 @@ void KateIconBorder::setLineNumbersOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setDynWrapIndicators( int state )
@@ -742,7 +742,7 @@ void KateIconBorder::setDynWrapIndicators( int state )
updateGeometry ();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
void KateIconBorder::setFoldingMarkersOn( bool enable )
@@ -754,10 +754,10 @@ void KateIconBorder::setFoldingMarkersOn( bool enable )
updateGeometry();
- QTimer::singleShot( 0, this, SLOT(update()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
-QSize KateIconBorder::sizeHint() const
+TQSize KateIconBorder::sizeHint() const
{
int w = 0;
@@ -773,19 +773,19 @@ QSize KateIconBorder::sizeHint() const
w += 4;
- return QSize( w, 0 );
+ return TQSize( w, 0 );
}
// This function (re)calculates the maximum width of any of the digit characters (0 -> 9)
// for graceful handling of variable-width fonts as the linenumber font.
void KateIconBorder::updateFont()
{
- const QFontMetrics *fm = m_view->renderer()->config()->fontMetrics();
+ const TQFontMetrics *fm = m_view->renderer()->config()->fontMetrics();
m_maxCharWidth = 0;
// Loop to determine the widest numeric character in the current font.
// 48 is ascii '0'
for (int i = 48; i < 58; i++) {
- int charWidth = fm->width( QChar(i) );
+ int charWidth = fm->width( TQChar(i) );
m_maxCharWidth = kMax(m_maxCharWidth, charWidth);
}
}
@@ -801,11 +801,11 @@ int KateIconBorder::lineNumberWidth() const
int w = style().scrollBarExtent().width();
int h = m_view->renderer()->config()->fontMetrics()->height();
- QSize newSize(w, h);
+ TQSize newSize(w, h);
if ((m_arrow.size() != newSize || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) && !newSize.isEmpty()) {
m_arrow.resize(newSize);
- QPainter p(&m_arrow);
+ TQPainter p(&m_arrow);
p.fillRect( 0, 0, w, h, m_view->renderer()->config()->iconBarColor() );
h = m_view->renderer()->config()->fontMetrics()->ascent();
@@ -838,15 +838,15 @@ int KateIconBorder::lineNumberWidth() const
return width;
}
-void KateIconBorder::paintEvent(QPaintEvent* e)
+void KateIconBorder::paintEvent(TQPaintEvent* e)
{
paintBorder(e->rect().x(), e->rect().y(), e->rect().width(), e->rect().height());
}
void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
{
- static QPixmap minus_px ((const char**)minus_xpm);
- static QPixmap plus_px ((const char**)plus_xpm);
+ static TQPixmap minus_px ((const char**)minus_xpm);
+ static TQPixmap plus_px ((const char**)plus_xpm);
uint h = m_view->renderer()->config()->fontStruct()->fontHeight;
uint startz = (y / h);
@@ -878,7 +878,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
int w( this->width() ); // sane value/calc only once
- QPainter p ( this );
+ TQPainter p ( this );
p.setFont ( *m_view->renderer()->config()->font() ); // for line numbers
// the line number color is for the line numbers, vertical separator lines
// and for for the code folding lines.
@@ -922,7 +922,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
MarkInterface::MarkTypes markType = (MarkInterface::MarkTypes)(1<<bit);
if( mrk & markType )
{
- QPixmap *px_mark (m_doc->markPixmap( markType ));
+ TQPixmap *px_mark (m_doc->markPixmap( markType ));
if (px_mark)
{
@@ -953,7 +953,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
if (realLine > -1)
if (m_viewInternal->lineRanges[z].startCol == 0) {
if (m_lineNumbersOn)
- p.drawText( lnX + 1, y, lnWidth-4, h, Qt::AlignRight|Qt::AlignVCenter, QString("%1").arg( realLine + 1 ) );
+ p.drawText( lnX + 1, y, lnWidth-4, h, Qt::AlignRight|Qt::AlignVCenter, TQString("%1").arg( realLine + 1 ) );
} else if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) {
p.drawPixmap(lnX + lnWidth - m_arrow.width() - 4, y, m_arrow);
}
@@ -1016,7 +1016,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
}
}
-KateIconBorder::BorderArea KateIconBorder::positionToArea( const QPoint& p ) const
+KateIconBorder::BorderArea KateIconBorder::positionToArea( const TQPoint& p ) const
{
int x = 0;
if( m_iconBorderOn ) {
@@ -1037,30 +1037,30 @@ KateIconBorder::BorderArea KateIconBorder::positionToArea( const QPoint& p ) con
return None;
}
-void KateIconBorder::mousePressEvent( QMouseEvent* e )
+void KateIconBorder::mousePressEvent( TQMouseEvent* e )
{
m_lastClickedLine = m_viewInternal->yToKateLineRange(e->y()).line;
if ( positionToArea( e->pos() ) != IconBorder )
{
- QMouseEvent forward( QEvent::MouseButtonPress,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonPress,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mousePressEvent( &forward );
}
e->accept();
}
-void KateIconBorder::mouseMoveEvent( QMouseEvent* e )
+void KateIconBorder::mouseMoveEvent( TQMouseEvent* e )
{
if ( positionToArea( e->pos() ) != IconBorder )
{
- QMouseEvent forward( QEvent::MouseMove,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseMove,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseMoveEvent( &forward );
}
}
-void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
+void KateIconBorder::mouseReleaseEvent( TQMouseEvent* e )
{
uint cursorOnLine = m_viewInternal->yToKateLineRange(e->y()).line;
@@ -1076,12 +1076,12 @@ void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
else
m_doc->addMark( cursorOnLine, KateViewConfig::global()->defaultMarkType() );
} else {
- showMarkMenu( cursorOnLine, QCursor::pos() );
+ showMarkMenu( cursorOnLine, TQCursor::pos() );
}
}
else
if (e->button() == RightButton) {
- showMarkMenu( cursorOnLine, QCursor::pos() );
+ showMarkMenu( cursorOnLine, TQCursor::pos() );
}
}
@@ -1094,24 +1094,24 @@ void KateIconBorder::mouseReleaseEvent( QMouseEvent* e )
}
}
- QMouseEvent forward( QEvent::MouseButtonRelease,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonRelease,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseReleaseEvent( &forward );
}
-void KateIconBorder::mouseDoubleClickEvent( QMouseEvent* e )
+void KateIconBorder::mouseDoubleClickEvent( TQMouseEvent* e )
{
- QMouseEvent forward( QEvent::MouseButtonDblClick,
- QPoint( 0, e->y() ), e->button(), e->state() );
+ TQMouseEvent forward( TQEvent::MouseButtonDblClick,
+ TQPoint( 0, e->y() ), e->button(), e->state() );
m_viewInternal->mouseDoubleClickEvent( &forward );
}
-void KateIconBorder::showMarkMenu( uint line, const QPoint& pos )
+void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos )
{
- QPopupMenu markMenu;
- QPopupMenu selectDefaultMark;
+ TQPopupMenu markMenu;
+ TQPopupMenu selectDefaultMark;
- typedef QValueVector<int> MarkTypeVector;
+ typedef TQValueVector<int> MarkTypeVector;
MarkTypeVector vec( 33 );
int i=1;
@@ -1167,23 +1167,23 @@ void KateIconBorder::showMarkMenu( uint line, const QPoint& pos )
}
//END KateIconBorder
-KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const QString& text, QObject* parent, const char* name)
+KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent, const char* name)
: KActionMenu (text, parent, name), doc(_doc), view (_view)
{
- connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
+ connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
void KateViewEncodingAction::slotAboutToShow()
{
- QStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
popupMenu()->clear ();
for (uint z=0; z<modes.size(); ++z)
{
- popupMenu()->insertItem ( modes[z], this, SLOT(setMode(int)), 0, z);
+ popupMenu()->insertItem ( modes[z], this, TQT_SLOT(setMode(int)), 0, z);
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(modes[z]), found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(modes[z]), found);
if (found && codecForEnc)
{
@@ -1195,7 +1195,7 @@ void KateViewEncodingAction::slotAboutToShow()
void KateViewEncodingAction::setMode (int mode)
{
- QStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList modes (KGlobal::charsets()->descriptiveEncodingNames());
doc->config()->setEncoding( KGlobal::charsets()->encodingForName( modes[mode] ) );
// now we don't want the encoding changed again unless the user does so using the menu.
doc->setEncodingSticky( true );
diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h
index 4687365f6..8e3fa94b3 100644
--- a/kate/part/kateviewhelpers.h
+++ b/kate/part/kateviewhelpers.h
@@ -24,11 +24,11 @@
#include <kaction.h>
#include <klineedit.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qscrollbar.h>
-#include <qintdict.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqscrollbar.h>
+#include <tqintdict.h>
class KateDocument;
class KateView;
@@ -59,12 +59,12 @@ class KateScrollBar : public QScrollBar
void sliderMMBMoved(int value);
protected:
- virtual void mousePressEvent(QMouseEvent* e);
- virtual void mouseReleaseEvent(QMouseEvent* e);
- virtual void mouseMoveEvent (QMouseEvent* e);
- virtual void paintEvent(QPaintEvent *);
- virtual void resizeEvent(QResizeEvent *);
- virtual void styleChange(QStyle &oldStyle);
+ virtual void mousePressEvent(TQMouseEvent* e);
+ virtual void mouseReleaseEvent(TQMouseEvent* e);
+ virtual void mouseMoveEvent (TQMouseEvent* e);
+ virtual void paintEvent(TQPaintEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void styleChange(TQStyle &oldStyle);
virtual void valueChange();
virtual void rangeChange();
@@ -87,7 +87,7 @@ class KateScrollBar : public QScrollBar
int m_bottomMargin;
uint m_savVisibleLines;
- QIntDict<QColor> m_lines;
+ TQIntDict<TQColor> m_lines;
bool m_showMarks;
};
@@ -100,18 +100,18 @@ class KateCmdLine : public KLineEdit
KateCmdLine (KateView *view);
private slots:
- void slotReturnPressed ( const QString& cmd );
+ void slotReturnPressed ( const TQString& cmd );
void hideMe ();
protected:
- void focusInEvent ( QFocusEvent *ev );
- void keyPressEvent( QKeyEvent *ev );
+ void focusInEvent ( TQFocusEvent *ev );
+ void keyPressEvent( TQKeyEvent *ev );
private:
void fromHistory( bool up );
KateView *m_view;
bool m_msgMode;
- QString m_oldText;
+ TQString m_oldText;
uint m_histpos; ///< position in the history
uint m_cmdend; ///< the point where a command ends in the text, if we have a valid one.
Kate::Command *m_command; ///< For completing flags/args and interactiveness
@@ -124,10 +124,10 @@ class KateIconBorder : public QWidget
Q_OBJECT
public:
- KateIconBorder( KateViewInternal* internalView, QWidget *parent );
+ KateIconBorder( KateViewInternal* internalView, TQWidget *parent );
// VERY IMPORTANT ;)
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
void updateFont();
int lineNumberWidth() const;
@@ -146,21 +146,21 @@ class KateIconBorder : public QWidget
bool foldingMarkersOn() const { return m_foldingMarkersOn; }
enum BorderArea { None, LineNumbers, IconBorder, FoldingMarkers };
- BorderArea positionToArea( const QPoint& ) const;
+ BorderArea positionToArea( const TQPoint& ) const;
signals:
void toggleRegionVisibility( unsigned int );
private:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
void paintBorder (int x, int y, int width, int height);
- void mousePressEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
- void showMarkMenu( uint line, const QPoint& pos );
+ void showMarkMenu( uint line, const TQPoint& pos );
KateView *m_view;
KateDocument *m_doc;
@@ -178,8 +178,8 @@ class KateIconBorder : public QWidget
int m_maxCharWidth;
- mutable QPixmap m_arrow;
- mutable QColor m_oldBackgroundColor;
+ mutable TQPixmap m_arrow;
+ mutable TQColor m_oldBackgroundColor;
};
class KateViewEncodingAction : public KActionMenu
@@ -187,7 +187,7 @@ class KateViewEncodingAction : public KActionMenu
Q_OBJECT
public:
- KateViewEncodingAction(KateDocument *_doc, KateView *_view, const QString& text, QObject* parent = 0, const char* name = 0);
+ KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent = 0, const char* name = 0);
~KateViewEncodingAction(){;};
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index 96edc1a9c..77f98643d 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -41,18 +41,18 @@
#include <kglobalsettings.h>
#include <kurldrag.h>
-#include <qstyle.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qdropsite.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qpixmap.h>
-#include <qvbox.h>
+#include <tqstyle.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqdropsite.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqpixmap.h>
+#include <tqvbox.h>
KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
- : QWidget (view, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
+ : TQWidget (view, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase )
, editSessionNumber (0)
, editIsRunning (false)
, m_view (view)
@@ -94,18 +94,18 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
//
// scrollbar for lines
//
- m_lineScroll = new KateScrollBar(QScrollBar::Vertical, this);
+ m_lineScroll = new KateScrollBar(TQScrollBar::Vertical, this);
m_lineScroll->show();
m_lineScroll->setTracking (true);
- m_lineLayout = new QVBoxLayout();
- m_colLayout = new QHBoxLayout();
+ m_lineLayout = new TQVBoxLayout();
+ m_colLayout = new TQHBoxLayout();
m_colLayout->addWidget(m_lineScroll);
m_lineLayout->addLayout(m_colLayout);
// bottom corner box
- m_dummy = new QWidget(m_view);
+ m_dummy = new TQWidget(m_view);
m_dummy->setFixedHeight(style().scrollBarExtent().width());
if (m_view->dynWordWrap())
@@ -116,14 +116,14 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
m_lineLayout->addWidget(m_dummy);
// Hijack the line scroller's controls, so we can scroll nicely for word-wrap
- connect(m_lineScroll, SIGNAL(prevPage()), SLOT(scrollPrevPage()));
- connect(m_lineScroll, SIGNAL(nextPage()), SLOT(scrollNextPage()));
+ connect(m_lineScroll, TQT_SIGNAL(prevPage()), TQT_SLOT(scrollPrevPage()));
+ connect(m_lineScroll, TQT_SIGNAL(nextPage()), TQT_SLOT(scrollNextPage()));
- connect(m_lineScroll, SIGNAL(prevLine()), SLOT(scrollPrevLine()));
- connect(m_lineScroll, SIGNAL(nextLine()), SLOT(scrollNextLine()));
+ connect(m_lineScroll, TQT_SIGNAL(prevLine()), TQT_SLOT(scrollPrevLine()));
+ connect(m_lineScroll, TQT_SIGNAL(nextLine()), TQT_SLOT(scrollNextLine()));
- connect(m_lineScroll, SIGNAL(sliderMoved(int)), SLOT(scrollLines(int)));
- connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int)));
+ connect(m_lineScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollLines(int)));
+ connect(m_lineScroll, TQT_SIGNAL(sliderMMBMoved(int)), TQT_SLOT(scrollLines(int)));
// catch wheel events, completing the hijack
m_lineScroll->installEventFilter(this);
@@ -131,7 +131,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
//
// scrollbar for columns
//
- m_columnScroll = new QScrollBar(QScrollBar::Horizontal,m_view);
+ m_columnScroll = new TQScrollBar(TQScrollBar::Horizontal,m_view);
// hide the column scrollbar in the dynamic word wrap mode
if (m_view->dynWordWrap())
@@ -142,8 +142,8 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
m_columnScroll->setTracking(true);
m_startX = 0;
- connect( m_columnScroll, SIGNAL( valueChanged (int) ),
- this, SLOT( scrollColumns (int) ) );
+ connect( m_columnScroll, TQT_SIGNAL( valueChanged (int) ),
+ this, TQT_SLOT( scrollColumns (int) ) );
//
// iconborder ;)
@@ -151,13 +151,13 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
leftBorder = new KateIconBorder( this, m_view );
leftBorder->show ();
- connect( leftBorder, SIGNAL(toggleRegionVisibility(unsigned int)),
- m_doc->foldingTree(), SLOT(toggleRegionVisibility(unsigned int)));
+ connect( leftBorder, TQT_SIGNAL(toggleRegionVisibility(unsigned int)),
+ m_doc->foldingTree(), TQT_SLOT(toggleRegionVisibility(unsigned int)));
- connect( doc->foldingTree(), SIGNAL(regionVisibilityChangedAt(unsigned int)),
- this, SLOT(slotRegionVisibilityChangedAt(unsigned int)));
- connect( doc, SIGNAL(codeFoldingUpdated()),
- this, SLOT(slotCodeFoldingChanged()) );
+ connect( doc->foldingTree(), TQT_SIGNAL(regionVisibilityChangedAt(unsigned int)),
+ this, TQT_SLOT(slotRegionVisibilityChangedAt(unsigned int)));
+ connect( doc, TQT_SIGNAL(codeFoldingUpdated()),
+ this, TQT_SLOT(slotCodeFoldingChanged()) );
displayCursor.setPos(0, 0);
cursor.setPos(0, 0);
@@ -182,28 +182,28 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
dragInfo.state = diNone;
// timers
- connect( &m_dragScrollTimer, SIGNAL( timeout() ),
- this, SLOT( doDragScroll() ) );
+ connect( &m_dragScrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( doDragScroll() ) );
- connect( &m_scrollTimer, SIGNAL( timeout() ),
- this, SLOT( scrollTimeout() ) );
+ connect( &m_scrollTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( scrollTimeout() ) );
- connect( &m_cursorTimer, SIGNAL( timeout() ),
- this, SLOT( cursorTimeout() ) );
+ connect( &m_cursorTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( cursorTimeout() ) );
- connect( &m_textHintTimer, SIGNAL( timeout() ),
- this, SLOT( textHintTimeout() ) );
+ connect( &m_textHintTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( textHintTimeout() ) );
// selection changed to set anchor
- connect( m_view, SIGNAL( selectionChanged() ),
- this, SLOT( viewSelectionChanged() ) );
+ connect( m_view, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( viewSelectionChanged() ) );
// this is a work arround for RTL desktops
// should be changed in kde 3.3
// BTW: this comment has been "ported" from 3.1.X tree
// any hacker with BIDI knowlege is welcomed to fix kate problems :)
- if (QApplication::reverseLayout()){
+ if (TQApplication::reverseLayout()){
m_view->m_grid->addMultiCellWidget(leftBorder, 0, 1, 2, 2);
m_view->m_grid->addMultiCellWidget(m_columnScroll, 1, 1, 0, 1);
m_view->m_grid->addMultiCellLayout(m_lineLayout, 0, 0, 0, 0);
@@ -722,7 +722,7 @@ void KateViewInternal::paintText (int x, int y, int width, int height, bool pain
uint endz = startz + 1 + (height / h);
uint lineRangesSize = lineRanges.size();
- static QPixmap drawBuffer;
+ static TQPixmap drawBuffer;
if (drawBuffer.width() < KateViewInternal::width() || drawBuffer.height() < (int)h)
drawBuffer.resize(KateViewInternal::width(), (int)h);
@@ -730,8 +730,8 @@ void KateViewInternal::paintText (int x, int y, int width, int height, bool pain
if (drawBuffer.isNull())
return;
- QPainter paint(this);
- QPainter paintDrawBuffer(&drawBuffer);
+ TQPainter paint(this);
+ TQPainter paintDrawBuffer(&drawBuffer);
// TODO put in the proper places
m_view->renderer()->setCaretStyle(m_view->isOverwriteMode() ? KateRenderer::Replace : KateRenderer::Insert);
@@ -839,11 +839,11 @@ void KateViewInternal::slotRegionBeginEndAddedRemoved(unsigned int)
leftBorder->update();
}
-void KateViewInternal::showEvent ( QShowEvent *e )
+void KateViewInternal::showEvent ( TQShowEvent *e )
{
updateView ();
- QWidget::showEvent (e);
+ TQWidget::showEvent (e);
}
uint KateViewInternal::linesDisplayed() const
@@ -854,17 +854,17 @@ uint KateViewInternal::linesDisplayed() const
return (h - (h % fh)) / fh;
}
-QPoint KateViewInternal::cursorCoordinates()
+TQPoint KateViewInternal::cursorCoordinates()
{
int viewLine = displayViewLine(displayCursor, true);
if (viewLine == -1)
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
uint y = viewLine * m_view->renderer()->fontHeight();
uint x = cXPos - m_startX - lineRanges[viewLine].startX + leftBorder->width() + lineRanges[viewLine].xOffset();
- return QPoint(x, y);
+ return TQPoint(x, y);
}
void KateViewInternal::updateMicroFocusHint()
@@ -1216,7 +1216,7 @@ void KateViewInternal::moveEdge( Bias bias, bool sel )
void KateViewInternal::home( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Home, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Home, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1257,7 +1257,7 @@ void KateViewInternal::home( bool sel )
void KateViewInternal::end( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_End, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_End, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1652,13 +1652,13 @@ int KateViewInternal::lineMaxCursorX(const KateLineRange& range)
int maxX = range.endX;
if (maxX && range.wrap) {
- QChar lastCharInLine = textLine(range.line)->getChar(range.endCol - 1);
+ TQChar lastCharInLine = textLine(range.line)->getChar(range.endCol - 1);
- if (lastCharInLine == QChar('\t')) {
+ if (lastCharInLine == TQChar('\t')) {
int lineSize = 0;
int lastTabSize = 0;
for(int i = range.startCol; i < range.endCol; i++) {
- if (textLine(range.line)->getChar(i) == QChar('\t')) {
+ if (textLine(range.line)->getChar(i) == TQChar('\t')) {
lastTabSize = m_view->tabWidth() - (lineSize % m_view->tabWidth());
lineSize += lastTabSize;
} else {
@@ -1687,7 +1687,7 @@ int KateViewInternal::lineMaxCol(const KateLineRange& range)
void KateViewInternal::cursorUp(bool sel)
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Up, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Up, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1754,7 +1754,7 @@ void KateViewInternal::cursorUp(bool sel)
void KateViewInternal::cursorDown(bool sel)
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Down, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Down, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1889,7 +1889,7 @@ void KateViewInternal::setAutoCenterLines(int viewLines, bool updateView)
void KateViewInternal::pageUp( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_PageUp, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_PageUp, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -1938,7 +1938,7 @@ void KateViewInternal::pageUp( bool sel )
void KateViewInternal::pageDown( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_PageDown, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_PageDown, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2025,7 +2025,7 @@ void KateViewInternal::bottom( bool sel )
void KateViewInternal::top_home( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_Home, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Home, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2037,7 +2037,7 @@ void KateViewInternal::top_home( bool sel )
void KateViewInternal::bottom_end( bool sel )
{
if (m_view->m_codeCompletion->codeCompletionVisible()) {
- QKeyEvent e(QEvent::KeyPress, Qt::Key_End, 0, 0);
+ TQKeyEvent e(TQEvent::KeyPress, Qt::Key_End, 0, 0);
m_view->m_codeCompletion->handleKey(&e);
return;
}
@@ -2389,7 +2389,7 @@ void KateViewInternal::paintCursor()
}
// Point in content coordinates
-void KateViewInternal::placeCursor( const QPoint& p, bool keepSelection, bool updateSelection )
+void KateViewInternal::placeCursor( const TQPoint& p, bool keepSelection, bool updateSelection )
{
KateLineRange thisRange = yToKateLineRange(p.y());
@@ -2421,7 +2421,7 @@ void KateViewInternal::placeCursor( const QPoint& p, bool keepSelection, bool up
}
// Point in content coordinates
-bool KateViewInternal::isTargetSelected( const QPoint& p )
+bool KateViewInternal::isTargetSelected( const TQPoint& p )
{
KateLineRange thisRange = yToKateLineRange(p.y());
@@ -2436,26 +2436,26 @@ bool KateViewInternal::isTargetSelected( const QPoint& p )
//BEGIN EVENT HANDLING STUFF
-bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
+bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e )
{
if (obj == m_lineScroll)
{
// the second condition is to make sure a scroll on the vertical bar doesn't cause a horizontal scroll ;)
- if (e->type() == QEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue())
+ if (e->type() == TQEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue())
{
- wheelEvent((QWheelEvent*)e);
+ wheelEvent((TQWheelEvent*)e);
return true;
}
// continue processing
- return QWidget::eventFilter( obj, e );
+ return TQWidget::eventFilter( obj, e );
}
switch( e->type() )
{
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
if (m_view->m_codeCompletion->codeCompletionVisible ())
{
@@ -2478,11 +2478,11 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
} break;
- case QEvent::DragMove:
+ case TQEvent::DragMove:
{
- QPoint currentPoint = ((QDragMoveEvent*) e)->pos();
+ TQPoint currentPoint = ((TQDragMoveEvent*) e)->pos();
- QRect doNotScrollRegion( scrollMargin, scrollMargin,
+ TQRect doNotScrollRegion( scrollMargin, scrollMargin,
width() - scrollMargin * 2,
height() - scrollMargin * 2 );
@@ -2490,18 +2490,18 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
{
startDragScroll();
// Keep sending move events
- ( (QDragMoveEvent*)e )->accept( QRect(0,0,0,0) );
+ ( (TQDragMoveEvent*)e )->accept( TQRect(0,0,0,0) );
}
- dragMoveEvent((QDragMoveEvent*)e);
+ dragMoveEvent((TQDragMoveEvent*)e);
} break;
- case QEvent::DragLeave:
+ case TQEvent::DragLeave:
// happens only when pressing ESC while dragging
stopDragScroll();
break;
- case QEvent::WindowBlocked:
+ case TQEvent::WindowBlocked:
// next focus originates from an internal dialog:
// don't show the modonhd prompt
m_doc->m_isasking = -1;
@@ -2511,10 +2511,10 @@ bool KateViewInternal::eventFilter( QObject *obj, QEvent *e )
break;
}
- return QWidget::eventFilter( obj, e );
+ return TQWidget::eventFilter( obj, e );
}
-void KateViewInternal::keyPressEvent( QKeyEvent* e )
+void KateViewInternal::keyPressEvent( TQKeyEvent* e )
{
KKey key(e);
@@ -2597,7 +2597,7 @@ void KateViewInternal::keyPressEvent( QKeyEvent* e )
if (m_view->hasSelection() || (m_doc->configFlags() & KateDocumentConfig::cfTabIndentsMode))
m_doc->indent( m_view, cursor.line(), 1 );
else if (m_doc->configFlags() & KateDocumentConfig::cfTabInsertsTab)
- m_doc->typeChars ( m_view, QString ("\t") );
+ m_doc->typeChars ( m_view, TQString ("\t") );
else
m_doc->insertIndentChars ( m_view );
@@ -2635,7 +2635,7 @@ void KateViewInternal::keyPressEvent( QKeyEvent* e )
e->ignore();
}
-void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
+void KateViewInternal::keyReleaseEvent( TQKeyEvent* e )
{
KKey key(e);
@@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
if (m_selChangedByUser)
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
m_selChangedByUser = false;
}
@@ -2662,11 +2662,11 @@ void KateViewInternal::keyReleaseEvent( QKeyEvent* e )
return;
}
-void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
+void KateViewInternal::contextMenuEvent ( TQContextMenuEvent * e )
{
// try to show popup menu
- QPoint p = e->pos();
+ TQPoint p = e->pos();
if ( m_view->m_doc->browserView() )
{
@@ -2674,7 +2674,7 @@ void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
return;
}
- if ( e->reason() == QContextMenuEvent::Keyboard )
+ if ( e->reason() == TQContextMenuEvent::Keyboard )
{
makeVisible( cursor, 0 );
p = cursorCoordinates();
@@ -2689,7 +2689,7 @@ void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
}
}
-void KateViewInternal::mousePressEvent( QMouseEvent* e )
+void KateViewInternal::mousePressEvent( TQMouseEvent* e )
{
switch (e->button())
{
@@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( QMouseEvent* e )
m_view->selectLine( cursor );
}
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Keep the line at the select anchor selected during further
// mouse selection
@@ -2816,7 +2816,7 @@ void KateViewInternal::mousePressEvent( QMouseEvent* e )
}
}
-void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
+void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e)
{
switch (e->button())
{
@@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
// Move cursor to end (or beginning) of selected word
if (m_view->hasSelection())
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Shift+DC before the "cached" word should move the cursor to the
// beginning of the selection, not the end
@@ -2902,7 +2902,7 @@ void KateViewInternal::mouseDoubleClickEvent(QMouseEvent *e)
}
possibleTripleClick = true;
- QTimer::singleShot ( QApplication::doubleClickInterval(), this, SLOT(tripleClickTimeout()) );
+ TQTimer::singleShot ( TQApplication::doubleClickInterval(), this, TQT_SLOT(tripleClickTimeout()) );
scrollX = 0;
scrollY = 0;
@@ -2923,7 +2923,7 @@ void KateViewInternal::tripleClickTimeout()
possibleTripleClick = false;
}
-void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
+void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
{
switch (e->button())
{
@@ -2933,9 +2933,9 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
if (m_selChangedByUser)
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Set cursor to edge of selection... which edge depends on what
// "direction" the selection was made in
if ( m_view->selectStart < selectAnchor )
@@ -2961,9 +2961,9 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
if( m_doc->isReadWrite() )
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->paste ();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
}
e->accept ();
@@ -2975,7 +2975,7 @@ void KateViewInternal::mouseReleaseEvent( QMouseEvent* e )
}
}
-void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
+void KateViewInternal::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() & LeftButton )
{
@@ -2983,7 +2983,7 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
{
// we had a mouse down, but haven't confirmed a drag yet
// if the mouse has moved sufficiently, we will confirm
- QPoint p( e->pos() - dragInfo.start );
+ TQPoint p( e->pos() - dragInfo.start );
// we've left the drag square, we can start a real drag operation now
if( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
@@ -3023,7 +3023,7 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
scrollY = d;
}
- placeCursor( QPoint( mouseX, mouseY ), true );
+ placeCursor( TQPoint( mouseX, mouseY ), true );
}
else
@@ -3052,12 +3052,12 @@ void KateViewInternal::mouseMoveEvent( QMouseEvent* e )
}
}
-void KateViewInternal::paintEvent(QPaintEvent *e)
+void KateViewInternal::paintEvent(TQPaintEvent *e)
{
paintText(e->rect().x(), e->rect().y(), e->rect().width(), e->rect().height());
}
-void KateViewInternal::resizeEvent(QResizeEvent* e)
+void KateViewInternal::resizeEvent(TQResizeEvent* e)
{
bool expandedHorizontally = width() > e->oldSize().width();
bool expandedVertically = height() > e->oldSize().height();
@@ -3119,7 +3119,7 @@ void KateViewInternal::scrollTimeout ()
if (scrollX || scrollY)
{
scrollLines (startPos().line() + (scrollY / (int)m_view->renderer()->fontHeight()));
- placeCursor( QPoint( mouseX, mouseY ), true );
+ placeCursor( TQPoint( mouseX, mouseY ), true );
}
}
@@ -3145,14 +3145,14 @@ void KateViewInternal::textHintTimeout ()
KateTextCursor c(realLine, 0);
m_view->renderer()->textWidth( c, startX() + m_textHintMouseX, startCol);
- QString tmp;
+ TQString tmp;
emit m_view->needTextHint(c.line(), c.col(), tmp);
if (!tmp.isEmpty()) kdDebug(13030)<<"Hint text: "<<tmp<<endl;
}
-void KateViewInternal::focusInEvent (QFocusEvent *)
+void KateViewInternal::focusInEvent (TQFocusEvent *)
{
if (KApplication::cursorFlashTime() > 0)
m_cursorTimer.start ( KApplication::cursorFlashTime() / 2 );
@@ -3167,7 +3167,7 @@ void KateViewInternal::focusInEvent (QFocusEvent *)
emit m_view->gotFocus( m_view );
}
-void KateViewInternal::focusOutEvent (QFocusEvent *)
+void KateViewInternal::focusOutEvent (TQFocusEvent *)
{
if( m_view->renderer() && ! m_view->m_codeCompletion->codeCompletionVisible() )
{
@@ -3184,17 +3184,17 @@ void KateViewInternal::focusOutEvent (QFocusEvent *)
void KateViewInternal::doDrag()
{
dragInfo.state = diDragging;
- dragInfo.dragObject = new QTextDrag(m_view->selection(), this);
+ dragInfo.dragObject = new TQTextDrag(m_view->selection(), this);
dragInfo.dragObject->drag();
}
-void KateViewInternal::dragEnterEvent( QDragEnterEvent* event )
+void KateViewInternal::dragEnterEvent( TQDragEnterEvent* event )
{
- event->accept( (QTextDrag::canDecode(event) && m_doc->isReadWrite()) ||
+ event->accept( (TQTextDrag::canDecode(event) && m_doc->isReadWrite()) ||
KURLDrag::canDecode(event) );
}
-void KateViewInternal::dragMoveEvent( QDragMoveEvent* event )
+void KateViewInternal::dragMoveEvent( TQDragMoveEvent* event )
{
// track the cursor to the current drop location
placeCursor( event->pos(), true, false );
@@ -3204,17 +3204,17 @@ void KateViewInternal::dragMoveEvent( QDragMoveEvent* event )
event->acceptAction();
}
-void KateViewInternal::dropEvent( QDropEvent* event )
+void KateViewInternal::dropEvent( TQDropEvent* event )
{
if ( KURLDrag::canDecode(event) ) {
emit dropEventPass(event);
- } else if ( QTextDrag::canDecode(event) && m_doc->isReadWrite() ) {
+ } else if ( TQTextDrag::canDecode(event) && m_doc->isReadWrite() ) {
- QString text;
+ TQString text;
- if (!QTextDrag::decode(event, text))
+ if (!TQTextDrag::decode(event, text))
return;
// is the source our own document?
@@ -3235,7 +3235,7 @@ void KateViewInternal::dropEvent( QDropEvent* event )
m_doc->editStart ();
// on move: remove selected text; on copy: duplicate text
- if ( event->action() != QDropEvent::Copy )
+ if ( event->action() != TQDropEvent::Copy )
m_view->removeSelectedText();
m_doc->insertText( cursor.line(), cursor.col(), text );
@@ -3261,7 +3261,7 @@ void KateViewInternal::clear()
displayCursor.setPos(0, 0);
}
-void KateViewInternal::wheelEvent(QWheelEvent* e)
+void KateViewInternal::wheelEvent(TQWheelEvent* e)
{
if (m_lineScroll->minValue() != m_lineScroll->maxValue() && e->orientation() != Qt::Horizontal) {
// React to this as a vertical event
@@ -3271,15 +3271,15 @@ void KateViewInternal::wheelEvent(QWheelEvent* e)
else
scrollNextPage();
} else {
- scrollViewLines(-((e->delta() / 120) * QApplication::wheelScrollLines()));
+ scrollViewLines(-((e->delta() / 120) * TQApplication::wheelScrollLines()));
// maybe a menu was opened or a bubbled window title is on us -> we shall erase it
update();
leftBorder->update();
}
} else if (columnScrollingPossible()) {
- QWheelEvent copy = *e;
- QApplication::sendEvent(m_columnScroll, &copy);
+ TQWheelEvent copy = *e;
+ TQApplication::sendEvent(m_columnScroll, &copy);
} else {
e->ignore();
@@ -3301,7 +3301,7 @@ void KateViewInternal::stopDragScroll()
void KateViewInternal::doDragScroll()
{
- QPoint p = this->mapFromGlobal( QCursor::pos() );
+ TQPoint p = this->mapFromGlobal( TQCursor::pos() );
int dx = 0, dy = 0;
if ( p.y() < scrollMargin ) {
@@ -3411,7 +3411,7 @@ void KateViewInternal::viewSelectionChanged ()
}
//BEGIN IM INPUT STUFF
-void KateViewInternal::imStartEvent( QIMEvent *e )
+void KateViewInternal::imStartEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
@@ -3429,7 +3429,7 @@ void KateViewInternal::imStartEvent( QIMEvent *e )
m_view->setIMSelectionValue( m_imPreeditStartLine, m_imPreeditStart, 0, 0, 0, true );
}
-void KateViewInternal::imComposeEvent( QIMEvent *e )
+void KateViewInternal::imComposeEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
@@ -3462,7 +3462,7 @@ void KateViewInternal::imComposeEvent( QIMEvent *e )
updateView( true );
}
-void KateViewInternal::imEndEvent( QIMEvent *e )
+void KateViewInternal::imEndEvent( TQIMEvent *e )
{
if ( m_doc->m_bReadOnly ) {
e->ignore();
diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h
index c5004d6be..815eb07c0 100644
--- a/kate/part/kateviewinternal.h
+++ b/kate/part/kateviewinternal.h
@@ -30,9 +30,9 @@
#include "katetextline.h"
#include "katedocument.h"
-#include <qpoint.h>
-#include <qtimer.h>
-#include <qintdict.h>
+#include <tqpoint.h>
+#include <tqtimer.h>
+#include <tqintdict.h>
class KateView;
class KateIconBorder;
@@ -151,37 +151,37 @@ class KateViewInternal : public QWidget
void bottom_end(bool sel=false);
inline const KateTextCursor& getCursor() { return cursor; }
- QPoint cursorCoordinates();
+ TQPoint cursorCoordinates();
void paintText (int x, int y, int width, int height, bool paintOnlyDirty = false);
// EVENT HANDLING STUFF - IMPORTANT
protected:
- void paintEvent(QPaintEvent *e);
- bool eventFilter( QObject *obj, QEvent *e );
- void keyPressEvent( QKeyEvent* );
- void keyReleaseEvent( QKeyEvent* );
- void resizeEvent( QResizeEvent* );
- void mousePressEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
- void dragEnterEvent( QDragEnterEvent* );
- void dragMoveEvent( QDragMoveEvent* );
- void dropEvent( QDropEvent* );
- void showEvent ( QShowEvent *);
- void wheelEvent(QWheelEvent* e);
- void focusInEvent (QFocusEvent *);
- void focusOutEvent (QFocusEvent *);
-
- void contextMenuEvent ( QContextMenuEvent * e );
+ void paintEvent(TQPaintEvent *e);
+ bool eventFilter( TQObject *obj, TQEvent *e );
+ void keyPressEvent( TQKeyEvent* );
+ void keyReleaseEvent( TQKeyEvent* );
+ void resizeEvent( TQResizeEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dragMoveEvent( TQDragMoveEvent* );
+ void dropEvent( TQDropEvent* );
+ void showEvent ( TQShowEvent *);
+ void wheelEvent(TQWheelEvent* e);
+ void focusInEvent (TQFocusEvent *);
+ void focusOutEvent (TQFocusEvent *);
+
+ void contextMenuEvent ( TQContextMenuEvent * e );
private slots:
void tripleClickTimeout();
signals:
// emitted when KateViewInternal is not handling its own URI drops
- void dropEventPass(QDropEvent*);
+ void dropEventPass(TQDropEvent*);
private slots:
void slotRegionVisibilityChangedAt(unsigned int);
@@ -207,8 +207,8 @@ class KateViewInternal : public QWidget
void updateMicroFocusHint();
- void placeCursor( const QPoint& p, bool keepSelection = false, bool updateSelection = true );
- bool isTargetSelected( const QPoint& p );
+ void placeCursor( const TQPoint& p, bool keepSelection = false, bool updateSelection = true );
+ bool isTargetSelected( const TQPoint& p );
void doDrag();
@@ -236,8 +236,8 @@ class KateViewInternal : public QWidget
struct _dragInfo {
DragState state;
- QPoint start;
- QTextDrag* dragObject;
+ TQPoint start;
+ TQTextDrag* dragObject;
} dragInfo;
uint iconBorderHeight;
@@ -246,9 +246,9 @@ class KateViewInternal : public QWidget
// line scrollbar + first visible (virtual) line in the current view
//
KateScrollBar *m_lineScroll;
- QWidget* m_dummy;
- QVBoxLayout* m_lineLayout;
- QHBoxLayout* m_colLayout;
+ TQWidget* m_dummy;
+ TQVBoxLayout* m_lineLayout;
+ TQHBoxLayout* m_colLayout;
// These are now cursors to account for word-wrap.
KateSuperCursor m_startPos;
@@ -266,7 +266,7 @@ class KateViewInternal : public QWidget
//
// column scrollbar + x position
//
- QScrollBar *m_columnScroll;
+ TQScrollBar *m_columnScroll;
int m_startX;
// has selection changed while your mouse or shift key is pressed
@@ -284,7 +284,7 @@ class KateViewInternal : public QWidget
//
// lines Ranges, mostly useful to speedup + dyn. word wrap
//
- QMemArray<KateLineRange> lineRanges;
+ TQMemArray<KateLineRange> lineRanges;
// maximal lenght of textlines visible from given startLine
int maxLen(uint startLine);
@@ -353,10 +353,10 @@ class KateViewInternal : public QWidget
private:
// Timers
- QTimer m_dragScrollTimer;
- QTimer m_scrollTimer;
- QTimer m_cursorTimer;
- QTimer m_textHintTimer;
+ TQTimer m_dragScrollTimer;
+ TQTimer m_scrollTimer;
+ TQTimer m_cursorTimer;
+ TQTimer m_textHintTimer;
static const int scrollTime = 30;
static const int scrollMargin = 16;
@@ -381,9 +381,9 @@ class KateViewInternal : public QWidget
* IM input stuff
*/
protected:
- void imStartEvent( QIMEvent *e );
- void imComposeEvent( QIMEvent *e );
- void imEndEvent( QIMEvent *e );
+ void imStartEvent( TQIMEvent *e );
+ void imComposeEvent( TQIMEvent *e );
+ void imEndEvent( TQIMEvent *e );
private:
int m_imPreeditStartLine;
diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp
index af36f65f9..e3f9f52e6 100644
--- a/kate/part/test_regression.cpp
+++ b/kate/part/test_regression.cpp
@@ -33,8 +33,8 @@
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include "test_regression.h"
#include <unistd.h>
#include <stdio.h>
@@ -47,22 +47,22 @@
#include <ksimpleconfig.h>
#include <kglobalsettings.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qscrollview.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqpushbutton.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kstatusbar.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "katedocument.h"
#include "kateview.h"
@@ -260,7 +260,7 @@ Value KateViewFunction::call(ExecState *exec, Object &/*thisObj*/, const List &a
REP_CALL(ShiftToMatchingBracket, shiftToMatchingBracket);
case Type: {
UString str = args[0].toString(exec);
- QString res = str.qstring();
+ TQString res = str.qstring();
return Boolean(m_view->doc()->typeChars(m_view, res));
}
}
@@ -316,13 +316,13 @@ bool OutputFunction::implementsCall() const
KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
{
- if (!*o->changed) *o->outstr = QString();
+ if (!*o->changed) *o->outstr = TQString();
switch (id) {
case Write:
case Writeln: {
// Gather all parameters and concatenate to string
- QString res;
+ TQString res;
for (int i = 0; i < args.size(); i++) {
res += args[i].toString(exec).qstring();
}
@@ -336,7 +336,7 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
case WriteCursorPositionln:
case WriteCursorPosition: {
// Gather all parameters and concatenate to string
- QString res;
+ TQString res;
for (int i = 0; i < args.size(); i++) {
res += args[i].toString(exec).qstring();
}
@@ -344,7 +344,7 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
// Append cursor position
uint l, c;
o->view->cursorPosition(&l, &c);
- res += "(" + QString::number(l) + "," + QString::number(c) + ")";
+ res += "(" + TQString::number(l) + "," + TQString::number(c) + ")";
if (id == WriteCursorPositionln)
res += "\n";
@@ -364,10 +364,10 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
const char failureSnapshotPrefix[] = "testkateregressionrc-FS.";
-static QString findMostRecentFailureSnapshot() {
- QDir dir(kapp->dirs()->saveLocation("config"),
- QString(failureSnapshotPrefix)+"*",
- QDir::Time, QDir::Files);
+static TQString findMostRecentFailureSnapshot() {
+ TQDir dir(kapp->dirs()->saveLocation("config"),
+ TQString(failureSnapshotPrefix)+"*",
+ TQDir::Time, TQDir::Files);
return dir[0].mid(sizeof failureSnapshotPrefix - 1);
}
@@ -402,7 +402,7 @@ int main(int argc, char *argv[])
exit(1);
}
- QString kh("/var/tmp/%1_kate_non_existent");
+ TQString kh("/var/tmp/%1_kate_non_existent");
kh = kh.arg( pw->pw_name );
setenv( "KDEHOME", kh.latin1(), 1 );
setenv( "LC_ALL", "C", 1 );
@@ -416,12 +416,12 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
- QCString baseDir = args->getOption("base");
- QCString baseDirConfigFile(::getenv("HOME") + QCString(BASE_DIR_CONFIG));
+ TQCString baseDir = args->getOption("base");
+ TQCString baseDirConfigFile(::getenv("HOME") + TQCString(BASE_DIR_CONFIG));
{
- QFile baseDirConfig(baseDirConfigFile);
+ TQFile baseDirConfig(baseDirConfigFile);
if (baseDirConfig.open(IO_ReadOnly)) {
- QTextStream bds(&baseDirConfig);
+ TQTextStream bds(&baseDirConfig);
baseDir = bds.readLine().latin1();
}
}
@@ -449,12 +449,12 @@ int main(int argc, char *argv[])
int testcase_index = 0;
if (baseDir.isEmpty()) baseDir = args->arg(testcase_index++);
- QFileInfo bdInfo(baseDir);
- baseDir = QFile::encodeName(bdInfo.absFilePath());
+ TQFileInfo bdInfo(baseDir);
+ baseDir = TQFile::encodeName(bdInfo.absFilePath());
const char *subdirs[] = {"tests", "baseline", "output", "resources"};
for ( int i = 0; i < 2; i++ ) {
- QFileInfo sourceDir(QFile::encodeName( baseDir ) + "/" + subdirs[i]);
+ TQFileInfo sourceDir(TQFile::encodeName( baseDir ) + "/" + subdirs[i]);
if ( !sourceDir.exists() || !sourceDir.isDir() ) {
fprintf(stderr,"ERROR: Source directory \"%s/%s\": no such directory.\n", (const char *)baseDir, subdirs[i]);
exit(1);
@@ -501,7 +501,7 @@ int main(int argc, char *argv[])
7001, 7011, 6070, 6080, 6090, 0};
int channel = args->isSet( "debug" ) ? 2 : 4;
for ( int i = 0; areas[i]; ++i ) {
- dc.setGroup( QString::number( areas[i] ) );
+ dc.setGroup( TQString::number( areas[i] ) );
dc.writeEntry( "InfoOutput", channel );
}
dc.sync();
@@ -549,16 +549,16 @@ int main(int argc, char *argv[])
baseDir,
args->getOption("output"),
args->isSet("genoutput"));
- QObject::connect(part->browserExtension(), SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
- regressionTest, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
- QObject::connect(part->browserExtension(), SIGNAL(resizeTopLevelWidget( int, int )),
- regressionTest, SLOT(resizeTopLevelWidget( int, int )));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
+ regressionTest, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(resizeTopLevelWidget( int, int )),
+ regressionTest, TQT_SLOT(resizeTopLevelWidget( int, int )));
regressionTest->m_keepOutput = args->isSet("keep-output");
regressionTest->m_showGui = args->isSet("show");
{
- QString failureSnapshot = args->getOption("cmp-failures");
+ TQString failureSnapshot = args->getOption("cmp-failures");
if (failureSnapshot.isEmpty())
failureSnapshot = findMostRecentFailureSnapshot();
if (!failureSnapshot.isEmpty())
@@ -568,7 +568,7 @@ int main(int argc, char *argv[])
}
if (args->isSet("save-failures")) {
- QString failureSaver = args->getOption("save-failures");
+ TQString failureSaver = args->getOption("save-failures");
regressionTest->setFailureSnapshotSaver(
new KSimpleConfig(failureSnapshotPrefix + failureSaver, false),
failureSaver);
@@ -580,7 +580,7 @@ int main(int argc, char *argv[])
for (; testcase_index < args->count(); testcase_index++)
tests << args->arg(testcase_index);
if (tests.count() > 0)
- for (QValueListConstIterator<QCString> it = tests.begin(); it != tests.end(); ++it) {
+ for (TQValueListConstIterator<TQCString> it = tests.begin(); it != tests.end(); ++it) {
result = regressionTest->runTests(*it,true);
if (!result) break;
}
@@ -614,18 +614,18 @@ int main(int argc, char *argv[])
if ( regressionTest->m_errors )
printf("Errors: %d\n",regressionTest->m_errors);
- QFile list( regressionTest->m_outputDir + "/links.html" );
+ TQFile list( regressionTest->m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link, cl;
- link = QString( "<hr>%1 failures. (%2 expected failures)" )
+ TQString link, cl;
+ link = TQString( "<hr>%1 failures. (%2 expected failures)" )
.arg(regressionTest->m_failures_work )
.arg( regressionTest->m_failures_fail );
if (regressionTest->m_failures_new)
- link += QString(" <span style=\"color:red;font-weight:bold\">(%1 new failures since %2)</span>")
+ link += TQString(" <span style=\"color:red;font-weight:bold\">(%1 new failures since %2)</span>")
.arg(regressionTest->m_failures_new)
.arg(regressionTest->m_failureComp->group());
if (regressionTest->m_passes_new)
- link += QString(" <p style=\"color:green;font-weight:bold\">%1 new passes since %2</p>")
+ link += TQString(" <p style=\"color:green;font-weight:bold\">%1 new passes since %2</p>")
.arg(regressionTest->m_passes_new)
.arg(regressionTest->m_failureComp->group());
list.writeBlock( link.latin1(), link.length() );
@@ -651,9 +651,9 @@ int main(int argc, char *argv[])
RegressionTest *RegressionTest::curr = 0;
RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
- const QString &baseDir,
- const QString &outputDir, bool _genOutput)
- : QObject(part)
+ const TQString &baseDir,
+ const TQString &outputDir, bool _genOutput)
+ : TQObject(part)
{
m_part = part;
m_view = static_cast<KateView *>(m_part->widget());
@@ -676,9 +676,9 @@ RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
m_failures_work = m_failures_fail = m_failures_new = 0;
m_errors = 0;
- ::unlink( QFile::encodeName( m_outputDir + "/links.html" ) );
- QFile f( m_outputDir + "/empty.html" );
- QString s;
+ ::unlink( TQFile::encodeName( m_outputDir + "/links.html" ) );
+ TQFile f( m_outputDir + "/empty.html" );
+ TQString s;
f.open( IO_WriteOnly | IO_Truncate );
s = "<html><body>Follow the white rabbit";
f.writeBlock( s.latin1(), s.length() );
@@ -692,22 +692,22 @@ RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
curr = this;
}
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-static QStringList readListFile( const QString &filename )
+static TQStringList readListFile( const TQString &filename )
{
// Read ignore file for this directory
- QString ignoreFilename = filename;
- QFileInfo ignoreInfo(ignoreFilename);
- QStringList ignoreFiles;
+ TQString ignoreFilename = filename;
+ TQFileInfo ignoreInfo(ignoreFilename);
+ TQStringList ignoreFiles;
if (ignoreInfo.exists()) {
- QFile ignoreFile(ignoreFilename);
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly)) {
fprintf(stderr,"Can't open %s\n",ignoreFilename.latin1());
exit(1);
}
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull())
ignoreFiles.append(line);
ignoreFile.close();
@@ -723,23 +723,23 @@ RegressionTest::~RegressionTest()
delete m_failureSave;
}
-void RegressionTest::setFailureSnapshotConfig(KConfig *cfg, const QString &sname)
+void RegressionTest::setFailureSnapshotConfig(KConfig *cfg, const TQString &sname)
{
Q_ASSERT(cfg);
m_failureComp = cfg;
m_failureComp->setGroup(sname);
}
-void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const QString &sname)
+void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const TQString &sname)
{
Q_ASSERT(cfg);
m_failureSave = cfg;
m_failureSave->setGroup(sname);
}
-QStringList RegressionTest::concatListFiles(const QString &relPath, const QString &filename)
+TQStringList RegressionTest::concatListFiles(const TQString &relPath, const TQString &filename)
{
- QStringList cmds;
+ TQStringList cmds;
int pos = relPath.findRev('/');
if (pos >= 0)
cmds += concatListFiles(relPath.left(pos), filename);
@@ -747,17 +747,17 @@ QStringList RegressionTest::concatListFiles(const QString &relPath, const QStrin
return cmds;
}
-bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure)
+bool RegressionTest::runTests(TQString relPath, bool mustExist, int known_failure)
{
- m_currentOutput = QString::null;
+ m_currentOutput = TQString::null;
- if (!QFile(m_baseDir + "/tests/"+relPath).exists()) {
+ if (!TQFile(m_baseDir + "/tests/"+relPath).exists()) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
return false;
}
- QString fullPath = m_baseDir + "/tests/"+relPath;
- QFileInfo info(fullPath);
+ TQString fullPath = m_baseDir + "/tests/"+relPath;
+ TQFileInfo info(fullPath);
if (!info.exists() && mustExist) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
@@ -770,14 +770,14 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
}
if (info.isDir()) {
- QStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
- QStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
+ TQStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
+ TQStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
// Run each test in this directory, recusively
- QDir sourceDir(m_baseDir + "/tests/"+relPath);
+ TQDir sourceDir(m_baseDir + "/tests/"+relPath);
for (uint fileno = 0; fileno < sourceDir.count(); fileno++) {
- QString filename = sourceDir[fileno];
- QString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
+ TQString filename = sourceDir[fileno];
+ TQString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
if (filename.startsWith(".") || ignoreFiles.contains(filename) )
continue;
@@ -791,8 +791,8 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
}
else if (info.isFile()) {
- QString relativeDir = QFileInfo(relPath).dirPath();
- QString filename = info.fileName();
+ TQString relativeDir = TQFileInfo(relPath).dirPath();
+ TQString filename = info.fileName();
m_currentBase = m_baseDir + "/tests/"+relativeDir;
m_currentCategory = relativeDir;
m_currentTest = filename;
@@ -800,7 +800,7 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
m_outputCustomised = false;
// gather commands
// directory-specific commands
- QStringList commands = concatListFiles(relPath, ".kateconfig-commands");
+ TQStringList commands = concatListFiles(relPath, ".kateconfig-commands");
// testcase-specific commands
commands += readListFile(m_currentBase + "/" + filename + "-commands");
@@ -827,14 +827,14 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
return true;
}
-void RegressionTest::createLink( const QString& test, int failures )
+void RegressionTest::createLink( const TQString& test, int failures )
{
createMissingDirs( m_outputDir + "/" + test + "-compare.html" );
- QFile list( m_outputDir + "/links.html" );
+ TQFile list( m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link;
- link = QString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
+ TQString link;
+ link = TQString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
.arg( test + "-compare.html" )
.arg( test );
link += m_currentTest;
@@ -858,10 +858,10 @@ void RegressionTest::createLink( const QString& test, int failures )
* @return path with all elements replaced by .. and concerning path elements
* to be relatively reachable from base.
*/
-static QString makeRelativePath(const QString &base, const QString &path)
+static TQString makeRelativePath(const TQString &base, const TQString &path)
{
- QString absBase = QFileInfo(base).absFilePath();
- QString absPath = QFileInfo(path).absFilePath();
+ TQString absBase = TQFileInfo(base).absFilePath();
+ TQString absPath = TQFileInfo(path).absFilePath();
// kdDebug() << "absPath: \"" << absPath << "\"" << endl;
// kdDebug() << "absBase: \"" << absBase << "\"" << endl;
@@ -871,8 +871,8 @@ static QString makeRelativePath(const QString &base, const QString &path)
pos++;
int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length();
- QConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
- QConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
+ TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
+ TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@@ -884,10 +884,10 @@ static QString makeRelativePath(const QString &base, const QString &path)
// kdDebug() << "basepos " << basepos << " pathpos " << pathpos << endl;
- QString rel;
+ TQString rel;
{
- QConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
- QConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
+ TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
+ TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i)
@@ -903,43 +903,43 @@ static QString makeRelativePath(const QString &base, const QString &path)
/** processes events for at least \c msec milliseconds */
static void pause(int msec)
{
- QTime t;
+ TQTime t;
t.start();
do {
kapp->processEvents();
} while (t.elapsed() < msec);
}
-void RegressionTest::doFailureReport( const QString& test, int failures )
+void RegressionTest::doFailureReport( const TQString& test, int failures )
{
if ( failures == NoFailure ) {
- ::unlink( QFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
+ ::unlink( TQFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
return;
}
createLink( test, failures );
- QFile compare( m_outputDir + "/" + test + "-compare.html" );
+ TQFile compare( m_outputDir + "/" + test + "-compare.html" );
- QString testFile = QFileInfo(test).fileName();
+ TQString testFile = TQFileInfo(test).fileName();
- QString renderDiff;
- QString domDiff;
+ TQString renderDiff;
+ TQString domDiff;
- QString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
+ TQString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
// are blocking reads possible with KProcess?
char pwd[PATH_MAX];
(void) getcwd( pwd, PATH_MAX );
- chdir( QFile::encodeName( m_baseDir ) );
+ chdir( TQFile::encodeName( m_baseDir ) );
if ( failures & ResultFailure ) {
domDiff += "<pre>";
- FILE *pipe = popen( QString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
+ FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
- QTextIStream *is = new QTextIStream( pipe );
+ TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
- QString line = is->readLine();
+ TQString line = is->readLine();
line = line.replace( '<', "&lt;" );
line = line.replace( '>', "&gt;" );
domDiff += line + "\n";
@@ -952,13 +952,13 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
chdir( pwd );
// create a relative path so that it works via web as well. ugly
- QString relpath = makeRelativePath(m_outputDir + "/"
- + QFileInfo(test).dirPath(), m_baseDir);
+ TQString relpath = makeRelativePath(m_outputDir + "/"
+ + TQFileInfo(test).dirPath(), m_baseDir);
compare.open( IO_WriteOnly|IO_Truncate );
- QString cl;
- cl = QString( "<html><head><title>%1</title>" ).arg( test );
- cl += QString( "<script>\n"
+ TQString cl;
+ cl = TQString( "<html><head><title>%1</title>" ).arg( test );
+ cl += TQString( "<script>\n"
"var pics = new Array();\n"
"pics[0]=new Image();\n"
"pics[0].src = '%1';\n"
@@ -969,7 +969,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"var lastb=0;\n" )
.arg( relpath+"/baseline/"+test+"-dump.png" )
.arg( testFile+"-dump.png" );
- cl += QString( "function toggleVisible(visible) {\n"
+ cl += TQString( "function toggleVisible(visible) {\n"
" document.getElementById('render').style.visibility= visible == 'render' ? 'visible' : 'hidden';\n"
" document.getElementById('image').style.visibility= visible == 'image' ? 'visible' : 'hidden';\n"
" document.getElementById('dom').style.visibility= visible == 'dom' ? 'visible' : 'hidden';\n"
@@ -978,7 +978,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"document.getElementById('image').style.borderColor = t && !doflicker ? 'red' : 'gray';\n"
"toggleVisible('image');\n"
"}" );
- cl += QString ( "function runSlideShow(){\n"
+ cl += TQString ( "function runSlideShow(){\n"
" document.getElementById('image').src = pics[t].src;\n"
" if (doflicker)\n"
" t = 1 - t;\n"
@@ -995,24 +995,24 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"}\n"
"</script>\n");
- cl += QString ("<style>\n"
+ cl += TQString ("<style>\n"
".buttondown { cursor: pointer; padding: 0px 20px; color: white; background-color: blue; border: inset blue 2px;}\n"
".button { cursor: pointer; padding: 0px 20px; color: black; background-color: white; border: outset blue 2px;}\n"
".diff { position: absolute; left: 10px; top: 100px; visibility: hidden; border: 1px black solid; background-color: white; color: black; /* width: 800; height: 600; overflow: scroll; */ }\n"
"</style>\n" );
- cl += QString( "<body onload=\"m(5); toggleVisible('dom');\"" );
- cl += QString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
+ cl += TQString( "<body onload=\"m(5); toggleVisible('dom');\"" );
+ cl += TQString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
if ( renderDiff.length() )
cl += "<span id='b4' class='button' onclick='showRender();m(4)'>R-DIFF</span>&nbsp;\n";
if ( domDiff.length() )
cl += "<span id='b5' class='button' onclick='showDom();m(5);'>D-DIFF</span>&nbsp;\n";
// The test file always exists - except for checkOutput called from *.js files
- if ( QFile::exists( m_baseDir + "/tests/"+ test ) )
- cl += QString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
+ if ( TQFile::exists( m_baseDir + "/tests/"+ test ) )
+ cl += TQString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
.arg( relpath+"/tests/"+test );
- cl += QString( "<hr>"
+ cl += TQString( "<hr>"
"<img style='border: solid 5px gray' src=\"%1\" id='image'>" )
.arg( relpath+"/baseline/"+test+"-dump.png" );
@@ -1024,7 +1024,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
compare.close();
}
-void RegressionTest::testStaticFile(const QString & filename, const QStringList &commands)
+void RegressionTest::testStaticFile(const TQString & filename, const TQStringList &commands)
{
qApp->mainWidget()->resize( 800, 600); // restore size
@@ -1035,16 +1035,16 @@ void RegressionTest::testStaticFile(const QString & filename, const QStringList
// load page
KURL url;
url.setProtocol("file");
- url.setPath(QFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
+ url.setPath(TQFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
m_part->openURL(url);
// inject commands
- for (QStringList::ConstIterator cit = commands.begin(); cit != commands.end(); ++cit) {
- QString str = (*cit).stripWhiteSpace();
+ for (TQStringList::ConstIterator cit = commands.begin(); cit != commands.end(); ++cit) {
+ TQString str = (*cit).stripWhiteSpace();
if (str.isEmpty() || str.startsWith("#")) continue;
Kate::Command *cmd = KateCmd::self()->queryCommand(str);
if (cmd) {
- QString msg;
+ TQString msg;
if (!cmd->exec(m_view, str, msg))
fprintf(stderr, "ERROR executing command '%s': %s\n", str.latin1(), msg.latin1());
}
@@ -1060,7 +1060,7 @@ void RegressionTest::testStaticFile(const QString & filename, const QStringList
TestJScriptEnv jsenv(m_part);
jsenv.output()->setChangedFlag(&m_outputCustomised);
jsenv.output()->setOutputString(&m_outputString);
- script_error = evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+QFileInfo(filename).dirPath()+"/.kateconfig-script", true)
+ script_error = evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+TQFileInfo(filename).dirPath()+"/.kateconfig-script", true)
&& evalJS(jsenv.interpreter(), m_baseDir + "/tests/"+filename+"-script");
}
@@ -1093,10 +1093,10 @@ bail_out:
m_part->closeURL();
}
-bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool ignore_nonexistent)
+bool RegressionTest::evalJS(Interpreter &interp, const TQString &filename, bool ignore_nonexistent)
{
- QString fullSourceName = filename;
- QFile sourceFile(fullSourceName);
+ TQString fullSourceName = filename;
+ TQFile sourceFile(fullSourceName);
if (!sourceFile.open(IO_ReadOnly)) {
if (!ignore_nonexistent) {
@@ -1106,9 +1106,9 @@ bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool i
return ignore_nonexistent;
}
- QTextStream stream ( &sourceFile );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
- QString code = stream.read();
+ TQTextStream stream ( &sourceFile );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString code = stream.read();
sourceFile.close();
saw_failure = false;
@@ -1117,7 +1117,7 @@ bool RegressionTest::evalJS(Interpreter &interp, const QString &filename, bool i
if ( /*report_result &&*/ !ignore_errors) {
if (c.complType() == Throw) {
- QString errmsg = c.value().toString(interp.globalExec()).qstring();
+ TQString errmsg = c.value().toString(interp.globalExec()).qstring();
printf( "ERROR: %s (%s)\n",filename.latin1(), errmsg.latin1());
m_errors++;
return false;
@@ -1131,9 +1131,9 @@ public:
virtual UString className() const { return "global"; }
};
-RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFilename)
+RegressionTest::CheckResult RegressionTest::checkOutput(const TQString &againstFilename)
{
- QString absFilename = QFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
+ TQString absFilename = TQFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
if ( svnIgnored( absFilename ) ) {
m_known_failures = NoFailure;
return Ignored;
@@ -1142,7 +1142,7 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
CheckResult result = Success;
// compare result to existing file
- QString outputFilename = QFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
+ TQString outputFilename = TQFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
bool kf = false;
if ( m_known_failures & AllFailure )
kf = true;
@@ -1153,23 +1153,23 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
outputFilename = absFilename;
// get existing content
- QString data;
+ TQString data;
if (m_outputCustomised) {
data = m_outputString;
} else {
data = m_part->text();
}
- QFile file(absFilename);
+ TQFile file(absFilename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream ( &file );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream ( &file );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
- QString fileData = stream.read();
+ TQString fileData = stream.read();
result = ( fileData == data ) ? Success : Failure;
if ( !m_genOutput && result == Success && !m_keepOutput ) {
- ::unlink( QFile::encodeName( outputFilename ) );
+ ::unlink( TQFile::encodeName( outputFilename ) );
return Success;
}
} else if (!m_genOutput) {
@@ -1179,14 +1179,14 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
// generate result file
createMissingDirs( outputFilename );
- QFile file2(outputFilename);
+ TQFile file2(outputFilename);
if (!file2.open(IO_WriteOnly)) {
fprintf(stderr,"Error writing to file %s\n",outputFilename.latin1());
exit(1);
}
- QTextStream stream2(&file2);
- stream2.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream2(&file2);
+ stream2.setEncoding( TQTextStream::UnicodeUTF8 );
stream2 << data;
if ( m_genOutput )
printf("Generated %s\n", outputFilename.latin1());
@@ -1202,7 +1202,7 @@ void RegressionTest::rereadConfig()
m_view->config()->readConfig(m_baseConfig);
}
-bool RegressionTest::reportResult(CheckResult result, const QString & description, bool *newfail)
+bool RegressionTest::reportResult(CheckResult result, const TQString & description, bool *newfail)
{
if ( result == Ignored ) {
//printf("IGNORED: ");
@@ -1212,14 +1212,14 @@ bool RegressionTest::reportResult(CheckResult result, const QString & descriptio
return reportResult( result == Success, description, newfail );
}
-bool RegressionTest::reportResult(bool passed, const QString & description, bool *newfail)
+bool RegressionTest::reportResult(bool passed, const TQString & description, bool *newfail)
{
if (newfail) *newfail = false;
if (m_genOutput)
return true;
- QString filename(m_currentTest + "-" + description);
+ TQString filename(m_currentTest + "-" + description);
if (!m_currentCategory.isEmpty())
filename = m_currentCategory + "/" + filename;
@@ -1262,7 +1262,7 @@ bool RegressionTest::reportResult(bool passed, const QString & description, bool
return passed;
}
-void RegressionTest::printDescription(const QString& description)
+void RegressionTest::printDescription(const TQString& description)
{
if (!m_currentCategory.isEmpty())
printf("%s/", m_currentCategory.latin1());
@@ -1270,7 +1270,7 @@ void RegressionTest::printDescription(const QString& description)
printf("%s", m_currentTest.latin1());
if (!description.isEmpty()) {
- QString desc = description;
+ TQString desc = description;
desc.replace( '\n', ' ' );
printf(" [%s]", desc.latin1());
}
@@ -1279,28 +1279,28 @@ void RegressionTest::printDescription(const QString& description)
fflush(stdout);
}
-void RegressionTest::createMissingDirs(const QString & filename)
+void RegressionTest::createMissingDirs(const TQString & filename)
{
- QFileInfo dif(filename);
- QFileInfo dirInfo( dif.dirPath() );
+ TQFileInfo dif(filename);
+ TQFileInfo dirInfo( dif.dirPath() );
if (dirInfo.exists())
return;
- QStringList pathComponents;
- QFileInfo parentDir = dirInfo;
+ TQStringList pathComponents;
+ TQFileInfo parentDir = dirInfo;
pathComponents.prepend(parentDir.absFilePath());
while (!parentDir.exists()) {
- QString parentPath = parentDir.absFilePath();
+ TQString parentPath = parentDir.absFilePath();
int slashPos = parentPath.findRev('/');
if (slashPos < 0)
break;
parentPath = parentPath.left(slashPos);
pathComponents.prepend(parentPath);
- parentDir = QFileInfo(parentPath);
+ parentDir = TQFileInfo(parentPath);
}
for (uint pathno = 1; pathno < pathComponents.count(); pathno++) {
- if (!QFileInfo(pathComponents[pathno]).exists() &&
- !QDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
+ if (!TQFileInfo(pathComponents[pathno]).exists() &&
+ !TQDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
fprintf(stderr,"Error creating directory %s\n",pathComponents[pathno].latin1());
exit(1);
}
@@ -1314,16 +1314,16 @@ void RegressionTest::slotOpenURL(const KURL &url, const KParts::URLArgs &args)
m_part->openURL(url);
}
-bool RegressionTest::svnIgnored( const QString &filename )
+bool RegressionTest::svnIgnored( const TQString &filename )
{
- QFileInfo fi( filename );
- QString ignoreFilename = fi.dirPath() + "/svnignore";
- QFile ignoreFile(ignoreFilename);
+ TQFileInfo fi( filename );
+ TQString ignoreFilename = fi.dirPath() + "/svnignore";
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly))
return false;
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull()) {
if ( line == fi.fileName() )
return true;
@@ -1335,8 +1335,8 @@ bool RegressionTest::svnIgnored( const QString &filename )
void RegressionTest::resizeTopLevelWidget( int w, int h )
{
qApp->mainWidget()->resize( w, h );
- // Since we're not visible, this doesn't have an immediate effect, QWidget posts the event
- QApplication::sendPostedEvents( 0, QEvent::Resize );
+ // Since we're not visible, this doesn't have an immediate effect, TQWidget posts the event
+ TQApplication::sendPostedEvents( 0, TQEvent::Resize );
}
#include "test_regression.moc"
diff --git a/kate/part/test_regression.h b/kate/part/test_regression.h
index bc528b4bc..3e4075e96 100644
--- a/kate/part/test_regression.h
+++ b/kate/part/test_regression.h
@@ -27,8 +27,8 @@
#include <katejscript.h>
#include <kateview.h>
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kjs/ustring.h>
#include <kjs/object.h>
#include <kjs/interpreter.h>
@@ -128,13 +128,13 @@ class OutputObject : public KJS::ObjectImp
virtual KJS::UString className() const;
void setChangedFlag(bool *flag) { changed = flag; }
- void setOutputString(QString *s) { outstr = s; }
+ void setOutputString(TQString *s) { outstr = s; }
private:
KateDocument *doc;
KateView *view;
bool *changed;
- QString *outstr;
+ TQString *outstr;
friend class OutputFunction;
};
@@ -166,40 +166,40 @@ class RegressionTest : public QObject
public:
RegressionTest(KateDocument *part, KConfig *baseConfig,
- const QString &baseDir, const QString &outputDir,
+ const TQString &baseDir, const TQString &outputDir,
bool _genOutput);
~RegressionTest();
enum OutputType { ResultDocument };
- void testStaticFile(const QString& filename, const QStringList &commands);
+ void testStaticFile(const TQString& filename, const TQStringList &commands);
enum CheckResult { Failure = 0, Success = 1, Ignored = 2 };
- CheckResult checkOutput(const QString& againstFilename);
+ CheckResult checkOutput(const TQString& againstFilename);
enum FailureType { NoFailure = 0, AllFailure = 1, ResultFailure = 4, NewFailure = 65536 };
- bool runTests(QString relPath = QString::null, bool mustExist = false, int known_failure = NoFailure);
- bool reportResult( bool passed, const QString & description = QString::null, bool *newfailure = 0 );
- bool reportResult(CheckResult result, const QString & description = QString::null, bool *newfailure = 0 );
+ bool runTests(TQString relPath = TQString::null, bool mustExist = false, int known_failure = NoFailure);
+ bool reportResult( bool passed, const TQString & description = TQString::null, bool *newfailure = 0 );
+ bool reportResult(CheckResult result, const TQString & description = TQString::null, bool *newfailure = 0 );
void rereadConfig();
- static void createMissingDirs(const QString &path);
+ static void createMissingDirs(const TQString &path);
- void setFailureSnapshotConfig(KConfig *cfg, const QString &snapshotname);
- void setFailureSnapshotSaver(KConfig *cfg, const QString &snapshotname);
+ void setFailureSnapshotConfig(KConfig *cfg, const TQString &snapshotname);
+ void setFailureSnapshotSaver(KConfig *cfg, const TQString &snapshotname);
- void createLink( const QString& test, int failures );
- void doFailureReport( const QString& test, int failures );
+ void createLink( const TQString& test, int failures );
+ void doFailureReport( const TQString& test, int failures );
KateDocument *m_part;
KateView *m_view;
KConfig *m_baseConfig;
- QString m_baseDir;
- QString m_outputDir;
+ TQString m_baseDir;
+ TQString m_outputDir;
bool m_genOutput;
- QString m_currentBase;
+ TQString m_currentBase;
KConfig *m_failureComp;
KConfig *m_failureSave;
- QString m_currentOutput;
- QString m_currentCategory;
- QString m_currentTest;
+ TQString m_currentOutput;
+ TQString m_currentCategory;
+ TQString m_currentTest;
bool m_keepOutput;
bool m_getOutput;
@@ -215,14 +215,14 @@ public:
bool ignore_errors;
int m_known_failures;
bool m_outputCustomised;
- QString m_outputString;
+ TQString m_outputString;
static RegressionTest *curr;
private:
- void printDescription(const QString& description);
+ void printDescription(const TQString& description);
- static bool svnIgnored( const QString &filename );
+ static bool svnIgnored( const TQString &filename );
private:
/**
@@ -231,14 +231,14 @@ private:
* return true nonetheless.
* @return true if script was valid, false otherwise
*/
- bool evalJS( KJS::Interpreter &interp, const QString &filename, bool ignore = false);
+ bool evalJS( KJS::Interpreter &interp, const TQString &filename, bool ignore = false);
/**
* concatenate contents of all list files down to but not including the
* tests directory.
* @param relPath relative path against tests-directory
* @param filename file name of the list files
*/
- QStringList concatListFiles(const QString &relPath, const QString &filename);
+ TQStringList concatListFiles(const TQString &relPath, const TQString &filename);
private slots:
void slotOpenURL(const KURL &url, const KParts::URLArgs &args);
diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp
index af3acbc32..c03fcefe0 100644
--- a/kate/plugins/autobookmarker/autobookmarker.cpp
+++ b/kate/plugins/autobookmarker/autobookmarker.cpp
@@ -42,16 +42,16 @@
#include <kstaticdeleter.h>
#include <kurl.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
//#include <kdebug.h>
//END includes
@@ -59,14 +59,14 @@
//BEGIN AutoBookmarker
K_EXPORT_COMPONENT_FACTORY( ktexteditor_autobookmarker, KGenericFactory<AutoBookmarker>( "ktexteditor_autobookmarker" ) )
-AutoBookmarker::AutoBookmarker( QObject *parent,
+AutoBookmarker::AutoBookmarker( TQObject *parent,
const char* name,
- const QStringList& /*args*/ )
+ const TQStringList& /*args*/ )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ),
KTextEditor::ConfigInterfaceExtension()
{
if ( parent )
- connect( parent, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
+ connect( parent, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotCompleted() ) );
}
void AutoBookmarker::addView(KTextEditor::View */*view*/)
@@ -77,12 +77,12 @@ void AutoBookmarker::removeView(KTextEditor::View */*view*/)
{
}
-KTextEditor::ConfigPage * AutoBookmarker::configPage( uint /*number*/, QWidget *parent, const char *name )
+KTextEditor::ConfigPage * AutoBookmarker::configPage( uint /*number*/, TQWidget *parent, const char *name )
{
return new AutoBookmarkerConfigPage( parent, name );
}
-QString AutoBookmarker::configPageName( uint /*p*/ ) const
+TQString AutoBookmarker::configPageName( uint /*p*/ ) const
{
// switch (p)
// {
@@ -93,7 +93,7 @@ QString AutoBookmarker::configPageName( uint /*p*/ ) const
// }
}
-QString AutoBookmarker::configPageFullName( uint /*p*/ ) const
+TQString AutoBookmarker::configPageFullName( uint /*p*/ ) const
{
// switch (p)
// {
@@ -104,7 +104,7 @@ QString AutoBookmarker::configPageFullName( uint /*p*/ ) const
// }
}
-QPixmap AutoBookmarker::configPagePixmap( uint /*p*/, int size ) const
+TQPixmap AutoBookmarker::configPagePixmap( uint /*p*/, int size ) const
{
return UserIcon("kte_bookmark", size);
}
@@ -115,11 +115,11 @@ void AutoBookmarker::slotCompleted()
KTextEditor::DocumentInfoInterface *di =
static_cast<KTextEditor::DocumentInfoInterface*>(document()->
qt_cast("KTextEditor::DocumentInfoInterface"));
- QString mt;
+ TQString mt;
if ( di ) // we can still try match the URL otherwise
mt = di->mimeType();
- QString fileName;
+ TQString fileName;
if ( document()->url().isValid() )
fileName = document()->url().fileName();
@@ -136,9 +136,9 @@ void AutoBookmarker::slotCompleted()
if ( ! found )
found = ( ! mt.isEmpty() && e->mimemask.contains( mt ) );
if ( ! found )
- for( QStringList::Iterator it1 = e->filemask.begin(); it1 != e->filemask.end(); ++it1 )
+ for( TQStringList::Iterator it1 = e->filemask.begin(); it1 != e->filemask.end(); ++it1 )
{
- QRegExp re(*it1, true, true);
+ TQRegExp re(*it1, true, true);
if ( ( found = ( ( re.search( fileName ) > -1 ) && ( re.matchedLength() == (int)fileName.length() ) ) ) )
break;
}
@@ -160,7 +160,7 @@ void AutoBookmarker::applyEntity( AutoBookmarkEnt *e )
if ( ! ( ei && mi ) ) return;
- QRegExp re( e->pattern, e->flags & AutoBookmarkEnt::CaseSensitive );
+ TQRegExp re( e->pattern, e->flags & AutoBookmarkEnt::CaseSensitive );
re.setMinimal( e->flags & AutoBookmarkEnt::MinimalMatching );
for ( uint l( 0 ); l < ei->numLines(); l++ )
@@ -203,11 +203,11 @@ void ABGlobal::readConfig()
KConfig *config = new KConfig("ktexteditor_autobookmarkerrc");
uint n( 0 );
- while ( config->hasGroup( QString("autobookmark%1").arg( n ) ) )
+ while ( config->hasGroup( TQString("autobookmark%1").arg( n ) ) )
{
- config->setGroup( QString("autobookmark%1").arg( n ) );
- QStringList filemask = config->readListEntry( "filemask", ';' );
- QStringList mimemask = config->readListEntry( "mimemask", ';' );
+ config->setGroup( TQString("autobookmark%1").arg( n ) );
+ TQStringList filemask = config->readListEntry( "filemask", ';' );
+ TQStringList mimemask = config->readListEntry( "mimemask", ';' );
int flags = config->readNumEntry( "flags", 1 );
AutoBookmarkEnt *e = new AutoBookmarkEnt(
config->readEntry( "pattern", "" ),
@@ -229,15 +229,15 @@ void ABGlobal::writeConfig()
KConfig *config = new KConfig("ktexteditor_autobookmarkerrc");
// clean the config object
- QStringList l = config->groupList();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ TQStringList l = config->groupList();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
config->deleteGroup( *it );
// fill in the current list
for ( uint i = 0; i < m_ents->count(); i++ )
{
AutoBookmarkEnt *e = m_ents->at( i );
- config->setGroup( QString("autobookmark%1").arg( i ) );
+ config->setGroup( TQString("autobookmark%1").arg( i ) );
config->writeEntry( "pattern", e->pattern );
config->writeEntry( "filemask", e->filemask, ';' );
config->writeEntry( "mimemask", e->mimemask, ';' );
@@ -255,7 +255,7 @@ class AutoBookmarkEntItem : public QListViewItem
{
public:
AutoBookmarkEntItem( KListView *lv, AutoBookmarkEnt *e )
- : QListViewItem( lv ),
+ : TQListViewItem( lv ),
ent( e )
{
redo();
@@ -275,75 +275,75 @@ class AutoBookmarkEntItem : public QListViewItem
// Dialog for editing a single autobookmark entity
// * edit the pattern
// * set the file/mime type masks
-AutoBookmarkerEntEditor::AutoBookmarkerEntEditor( QWidget *parent, AutoBookmarkEnt *e )
+AutoBookmarkerEntEditor::AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e )
: KDialogBase( parent, "autobookmark_ent_editor",
true, i18n("Edit Entry"),
KDialogBase::Ok|KDialogBase::Cancel ),
e( e )
{
- QFrame *w = makeMainWidget();
- QGridLayout * lo = new QGridLayout( w, 5, 3 );
+ TQFrame *w = makeMainWidget();
+ TQGridLayout * lo = new TQGridLayout( w, 5, 3 );
lo->setSpacing( KDialogBase::spacingHint() );
- QLabel *l = new QLabel( i18n("&Pattern:"), w );
- lePattern = new QLineEdit( e->pattern, w );
+ TQLabel *l = new TQLabel( i18n("&Pattern:"), w );
+ lePattern = new TQLineEdit( e->pattern, w );
l->setBuddy( lePattern );
lo->addWidget( l, 0, 0 );
lo->addMultiCellWidget( lePattern, 0, 0, 1, 2 );
- QWhatsThis::add( lePattern, i18n(
+ TQWhatsThis::add( lePattern, i18n(
"<p>A regular expression. Matching lines will be bookmarked.</p>" ) );
- connect( lePattern, SIGNAL(textChanged ( const QString & ) ),this, SLOT( slotPatternChanged( const QString& ) ) );
+ connect( lePattern, TQT_SIGNAL(textChanged ( const TQString & ) ),this, TQT_SLOT( slotPatternChanged( const TQString& ) ) );
- cbCS = new QCheckBox( i18n("Case &sensitive"), w );
+ cbCS = new TQCheckBox( i18n("Case &sensitive"), w );
lo->addMultiCellWidget( cbCS, 1, 1, 0, 2 );
cbCS->setChecked( e->flags & AutoBookmarkEnt::CaseSensitive );
- QWhatsThis::add( cbCS, i18n(
+ TQWhatsThis::add( cbCS, i18n(
"<p>If enabled, the pattern matching will be case sensitive, otherwise "
"not.</p>") );
- cbMM = new QCheckBox( i18n("&Minimal matching"), w );
+ cbMM = new TQCheckBox( i18n("&Minimal matching"), w );
lo->addMultiCellWidget( cbMM, 2, 2, 0 ,2 );
cbMM->setChecked( e->flags & AutoBookmarkEnt::MinimalMatching );
- QWhatsThis::add( cbMM, i18n(
+ TQWhatsThis::add( cbMM, i18n(
"<p>If enabled, the pattern matching will use minimal matching; if you "
"do not know what that is, please read the appendix on regular expressions "
"in the kate manual.</p>") );
- l = new QLabel( i18n("&File mask:"), w );
- leFileMask = new QLineEdit( e->filemask.join( "; " ), w );
+ l = new TQLabel( i18n("&File mask:"), w );
+ leFileMask = new TQLineEdit( e->filemask.join( "; " ), w );
l->setBuddy( leFileMask );
lo->addWidget( l, 3, 0 );
lo->addMultiCellWidget( leFileMask, 3, 3, 1, 2 );
- QWhatsThis::add( leFileMask, i18n(
+ TQWhatsThis::add( leFileMask, i18n(
"<p>A list of filename masks, separated by semicolons. This can be used "
"to limit the usage of this entity to files with matching names.</p>"
"<p>Use the wizard button to the right of the mimetype entry below to "
"easily fill out both lists.</p>" ) );
- l = new QLabel( i18n("MIME &types:"), w );
- leMimeTypes = new QLineEdit( e->mimemask.join( "; " ), w );
+ l = new TQLabel( i18n("MIME &types:"), w );
+ leMimeTypes = new TQLineEdit( e->mimemask.join( "; " ), w );
l->setBuddy( leMimeTypes );
lo->addWidget( l, 4, 0 );
lo->addWidget( leMimeTypes, 4, 1 );
- QWhatsThis::add( leMimeTypes, i18n(
+ TQWhatsThis::add( leMimeTypes, i18n(
"<p>A list of mime types, separated by semicolon. This can be used to "
"limit the usage of this entity to files with matching mime types.</p>"
"<p>Use the wizard button on the right to get a list of existing file "
"types to choose from, using it will fill in the file masks as well.</p>" ) );
- QToolButton *btnMTW = new QToolButton(w);
+ TQToolButton *btnMTW = new TQToolButton(w);
lo->addWidget( btnMTW, 4, 2 );
- btnMTW->setIconSet(QIconSet(SmallIcon("wizard")));
- connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg()));
- QWhatsThis::add( btnMTW, i18n(
+ btnMTW->setIconSet(TQIconSet(SmallIcon("wizard")));
+ connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg()));
+ TQWhatsThis::add( btnMTW, i18n(
"<p>Click this button to display a checkable list of mimetypes available "
"on your system. When used, the file masks entry above will be filled in "
"with the corresponding masks.</p>") );
slotPatternChanged( lePattern->text() );
}
-void AutoBookmarkerEntEditor::slotPatternChanged( const QString&_pattern )
+void AutoBookmarkerEntEditor::slotPatternChanged( const TQString&_pattern )
{
enableButtonOK( !_pattern.isEmpty() );
}
@@ -353,8 +353,8 @@ void AutoBookmarkerEntEditor::apply()
if ( lePattern->text().isEmpty() ) return;
e->pattern = lePattern->text();
- e->filemask = QStringList::split( QRegExp("\\s*;\\s*"), leFileMask->text() );
- e->mimemask = QStringList::split( QRegExp("\\s*;\\s*"), leMimeTypes->text() );
+ e->filemask = TQStringList::split( TQRegExp("\\s*;\\s*"), leFileMask->text() );
+ e->mimemask = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimeTypes->text() );
e->flags = 0;
if ( cbCS->isOn() ) e->flags |= AutoBookmarkEnt::CaseSensitive;
if ( cbMM->isOn() ) e->flags |= AutoBookmarkEnt::MinimalMatching;
@@ -362,8 +362,8 @@ void AutoBookmarkerEntEditor::apply()
void AutoBookmarkerEntEditor::showMTDlg()
{
- QString text = i18n("Select the MimeTypes for this pattern.\nPlease note that this will automatically edit the associated file extensions as well.");
- QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimeTypes->text() );
+ TQString text = i18n("Select the MimeTypes for this pattern.\nPlease note that this will automatically edit the associated file extensions as well.");
+ TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimeTypes->text() );
KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this );
if ( d.exec() == KDialogBase::Accepted ) {
// do some checking, warn user if mime types or patterns are removed.
@@ -376,13 +376,13 @@ void AutoBookmarkerEntEditor::showMTDlg()
//BEGIN AutoBookmarkerConfigPage
// TODO allow custom mark types with icons
-AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char *name )
+AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( TQWidget *parent, const char *name )
: KTextEditor::ConfigPage( parent, name )
{
- QVBoxLayout *lo = new QVBoxLayout( this );
+ TQVBoxLayout *lo = new TQVBoxLayout( this );
lo->setSpacing( KDialogBase::spacingHint() );
- QLabel *l = new QLabel( i18n("&Patterns"), this );
+ TQLabel *l = new TQLabel( i18n("&Patterns"), this );
lo->addWidget( l );
lvPatterns = new KListView( this );
lvPatterns->addColumn( i18n("Pattern") );
@@ -390,7 +390,7 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char
lvPatterns->addColumn( i18n("File Masks") );
lo->addWidget( lvPatterns );
l->setBuddy( lvPatterns );
- QWhatsThis::add( lvPatterns, i18n(
+ TQWhatsThis::add( lvPatterns, i18n(
"<p>This list shows your configured autobookmark entities. When a document "
"is opened, each entity is used in the following way: "
"<ol>"
@@ -400,30 +400,30 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( QWidget *parent, const char
"and a bookmark is set on matching lines.</li></ul>"
"<p>Use the buttons below to manage your collection of entities.</p>") );
- QHBoxLayout *lo1 = new QHBoxLayout ( lo );
+ TQHBoxLayout *lo1 = new TQHBoxLayout ( lo );
lo1->setSpacing( KDialogBase::spacingHint() );
- btnNew = new QPushButton( i18n("&New..."), this );
+ btnNew = new TQPushButton( i18n("&New..."), this );
lo1->addWidget( btnNew );
- QWhatsThis::add( btnNew, i18n(
+ TQWhatsThis::add( btnNew, i18n(
"Press this button to create a new autobookmark entity.") );
- btnDel = new QPushButton( i18n("&Delete"), this );
+ btnDel = new TQPushButton( i18n("&Delete"), this );
lo1->addWidget( btnDel );
- QWhatsThis::add( btnDel, i18n(
+ TQWhatsThis::add( btnDel, i18n(
"Press this button to delete the currently selected entity.") );
- btnEdit = new QPushButton( i18n("&Edit..."), this );
+ btnEdit = new TQPushButton( i18n("&Edit..."), this );
lo1->addWidget( btnEdit );
- QWhatsThis::add( btnEdit, i18n(
+ TQWhatsThis::add( btnEdit, i18n(
"Press this button to edit the currently selected entity.") );
lo1->addStretch( 1 );
- connect( btnNew, SIGNAL(clicked()), this, SLOT(slotNew()) );
- connect( btnDel, SIGNAL(clicked()), this, SLOT(slotDel()) );
- connect( btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()) );
- connect( lvPatterns, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotEdit()) );
+ connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) );
+ connect( btnDel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDel()) );
+ connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) );
+ connect( lvPatterns, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotEdit()) );
m_ents = new ABEntityList();
m_ents->setAutoDelete( true );
@@ -509,7 +509,7 @@ void AutoBookmarkerConfigPage::slotEdit()
//END AutoBookmarkerConfigPage
//BEGIN AutoBookmarkEnt
-AutoBookmarkEnt::AutoBookmarkEnt( const QString &p, const QStringList &f, const QStringList &m, int fl )
+AutoBookmarkEnt::AutoBookmarkEnt( const TQString &p, const TQStringList &f, const TQStringList &m, int fl )
: pattern( p ),
filemask( f ),
mimemask( m ),
diff --git a/kate/plugins/autobookmarker/autobookmarker.h b/kate/plugins/autobookmarker/autobookmarker.h
index 188c8a360..bdeb2abcf 100644
--- a/kate/plugins/autobookmarker/autobookmarker.h
+++ b/kate/plugins/autobookmarker/autobookmarker.h
@@ -28,21 +28,21 @@
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qvbox.h>
+#include <tqptrlist.h>
+#include <tqvbox.h>
class AutoBookmarkEnt
{
public:
enum REFlags { CaseSensitive=1, MinimalMatching=2 };
- AutoBookmarkEnt(const QString &p=QString::null,
- const QStringList &f=QStringList(),
- const QStringList &m=QStringList(),
+ AutoBookmarkEnt(const TQString &p=TQString::null,
+ const TQStringList &f=TQStringList(),
+ const TQStringList &m=TQStringList(),
int flags=1 );
~AutoBookmarkEnt(){};
- QString pattern;
- QStringList filemask;
- QStringList mimemask;
+ TQString pattern;
+ TQStringList filemask;
+ TQStringList mimemask;
int flags;
};
@@ -52,9 +52,9 @@ class AutoBookmarker
{
Q_OBJECT
public:
- AutoBookmarker( QObject *parent = 0,
+ AutoBookmarker( TQObject *parent = 0,
const char* name = 0,
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
virtual ~AutoBookmarker() {};
void addView (KTextEditor::View *view);
@@ -62,10 +62,10 @@ class AutoBookmarker
// ConfigInterfaceExtention
uint configPages() const { return 1; };
- KTextEditor::ConfigPage * configPage( uint number, QWidget *parent, const char *name );
- QString configPageName( uint ) const;
- QString configPageFullName( uint ) const;
- QPixmap configPagePixmap( uint, int ) const;
+ KTextEditor::ConfigPage * configPage( uint number, TQWidget *parent, const char *name );
+ TQString configPageName( uint ) const;
+ TQString configPageFullName( uint ) const;
+ TQPixmap configPagePixmap( uint, int ) const;
bool abDone;
private slots:
@@ -73,8 +73,8 @@ class AutoBookmarker
void applyEntity( AutoBookmarkEnt *e );
};
-typedef QPtrList<AutoBookmarkEnt> ABEntityList;
-typedef QPtrListIterator<AutoBookmarkEnt> ABEntityListIterator;
+typedef TQPtrList<AutoBookmarkEnt> ABEntityList;
+typedef TQPtrListIterator<AutoBookmarkEnt> ABEntityListIterator;
/* singleton to keep the data */
class ABGlobal
@@ -98,7 +98,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage
{
Q_OBJECT
public:
- AutoBookmarkerConfigPage( QWidget *parent, const char *name );
+ AutoBookmarkerConfigPage( TQWidget *parent, const char *name );
virtual ~AutoBookmarkerConfigPage() {};
virtual void apply();
@@ -112,7 +112,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage
private:
class KListView *lvPatterns;
- class QPushButton *btnNew, *btnDel, *btnEdit;
+ class TQPushButton *btnNew, *btnDel, *btnEdit;
ABEntityList *m_ents;
};
@@ -120,17 +120,17 @@ class AutoBookmarkerEntEditor : public KDialogBase
{
Q_OBJECT
public:
- AutoBookmarkerEntEditor( QWidget *parent, AutoBookmarkEnt *e );
+ AutoBookmarkerEntEditor( TQWidget *parent, AutoBookmarkEnt *e );
~AutoBookmarkerEntEditor(){};
void apply();
private slots:
void showMTDlg();
- void slotPatternChanged( const QString& );
+ void slotPatternChanged( const TQString& );
private:
- class QLineEdit *lePattern, *leMimeTypes, *leFileMask;
- class QCheckBox *cbCS, *cbMM;
+ class TQLineEdit *lePattern, *leMimeTypes, *leFileMask;
+ class TQCheckBox *cbCS, *cbMM;
AutoBookmarkEnt *e;
};
diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp
index e25df8bd5..6a350831f 100644
--- a/kate/plugins/insertfile/insertfileplugin.cpp
+++ b/kate/plugins/insertfile/insertfileplugin.cpp
@@ -34,14 +34,14 @@
#include <ktempfile.h>
#include <kurl.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
K_EXPORT_COMPONENT_FACTORY( ktexteditor_insertfile, KGenericFactory<InsertFilePlugin>( "ktexteditor_insertfile" ) )
//BEGIN InsertFilePlugin
-InsertFilePlugin::InsertFilePlugin( QObject *parent, const char* name, const QStringList& )
+InsertFilePlugin::InsertFilePlugin( TQObject *parent, const char* name, const TQStringList& )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
}
@@ -70,19 +70,19 @@ void InsertFilePlugin::removeView(KTextEditor::View *view)
//BEGIN InsertFilePluginView
InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char *name )
- : QObject( view, name ),
+ : TQObject( view, name ),
KXMLGUIClient( view )
{
view->insertChildClient( this );
setInstance( KGenericFactory<InsertFilePlugin>::instance() );
_job = 0;
- (void) new KAction( i18n("Insert File..."), 0, this, SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" );
+ (void) new KAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" );
setXMLFile( "ktexteditor_insertfileui.rc" );
}
void InsertFilePluginView::slotInsertFile()
{
- KFileDialog dlg("::insertfile", "", (QWidget*)parent(), "filedialog", true);
+ KFileDialog dlg("::insertfile", "", (TQWidget*)parent(), "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption(i18n("Choose File to Insert"));
@@ -98,13 +98,13 @@ void InsertFilePluginView::slotInsertFile()
insertFile();
}
else {
- KTempFile tempFile( QString::null );
+ KTempFile tempFile( TQString::null );
_tmpfile = tempFile.name();
KURL destURL;
destURL.setPath( _tmpfile );
_job = KIO::file_copy( _file, destURL, 0600, true, false, true );
- connect( _job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished ( KIO::Job * ) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished ( KIO::Job * ) ) );
}
}
@@ -113,34 +113,34 @@ void InsertFilePluginView::slotFinished( KIO::Job *job )
assert( job == _job );
_job = 0;
if ( job->error() )
- KMessageBox::error( (QWidget*)parent(), i18n("Failed to load file:\n\n") + job->errorString(), i18n("Insert File Error") );
+ KMessageBox::error( (TQWidget*)parent(), i18n("Failed to load file:\n\n") + job->errorString(), i18n("Insert File Error") );
else
insertFile();
}
void InsertFilePluginView::insertFile()
{
- QString error;
+ TQString error;
if ( _tmpfile.isEmpty() )
return;
- QFileInfo fi;
+ TQFileInfo fi;
fi.setFile( _tmpfile );
if (!fi.exists() || !fi.isReadable())
error = i18n("<p>The file <strong>%1</strong> does not exist or is not readable, aborting.").arg(_file.fileName());
- QFile f( _tmpfile );
+ TQFile f( _tmpfile );
if ( !f.open(IO_ReadOnly) )
error = i18n("<p>Unable to open file <strong>%1</strong>, aborting.").arg(_file.fileName());
if ( ! error.isEmpty() ) {
- KMessageBox::sorry( (QWidget*)parent(), error, i18n("Insert File Error") );
+ KMessageBox::sorry( (TQWidget*)parent(), error, i18n("Insert File Error") );
return;
}
// now grab file contents
- QTextStream stream(&f);
- QString str, tmp;
+ TQTextStream stream(&f);
+ TQString str, tmp;
uint numlines = 0;
uint len = 0;
while (!stream.eof()) {
@@ -156,7 +156,7 @@ void InsertFilePluginView::insertFile()
if ( str.isEmpty() )
error = i18n("<p>File <strong>%1</strong> had no contents.").arg(_file.fileName());
if ( ! error.isEmpty() ) {
- KMessageBox::sorry( (QWidget*)parent(), error, i18n("Insert File Error") );
+ KMessageBox::sorry( (TQWidget*)parent(), error, i18n("Insert File Error") );
return;
}
diff --git a/kate/plugins/insertfile/insertfileplugin.h b/kate/plugins/insertfile/insertfileplugin.h
index 3e882416c..9331f8100 100644
--- a/kate/plugins/insertfile/insertfileplugin.h
+++ b/kate/plugins/insertfile/insertfileplugin.h
@@ -26,7 +26,7 @@
#include <ktexteditor/view.h>
#include <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <jobclasses.h>
#include <kurl.h>
@@ -35,9 +35,9 @@ class InsertFilePlugin : public KTextEditor::Plugin, public KTextEditor::PluginV
Q_OBJECT
public:
- InsertFilePlugin( QObject *parent = 0,
+ InsertFilePlugin( TQObject *parent = 0,
const char* name = 0,
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
virtual ~InsertFilePlugin();
void addView (KTextEditor::View *view);
@@ -45,10 +45,10 @@ class InsertFilePlugin : public KTextEditor::Plugin, public KTextEditor::PluginV
private:
- QPtrList<class InsertFilePluginView> m_views;
+ TQPtrList<class InsertFilePluginView> m_views;
};
-class InsertFilePluginView : public QObject, public KXMLGUIClient
+class InsertFilePluginView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
@@ -63,7 +63,7 @@ class InsertFilePluginView : public QObject, public KXMLGUIClient
private:
void insertFile();
KURL _file;
- QString _tmpfile;
+ TQString _tmpfile;
KIO::FileCopyJob *_job;
};
diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp
index 9a790a3ef..a74cf5d90 100644
--- a/kate/plugins/isearch/ISearchPlugin.cpp
+++ b/kate/plugins/isearch/ISearchPlugin.cpp
@@ -16,10 +16,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qpopupmenu.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqpopupmenu.h>
#include <kgenericfactory.h>
#include <klocale.h>
#include <kaction.h>
@@ -33,7 +33,7 @@
K_EXPORT_COMPONENT_FACTORY( ktexteditor_isearch, KGenericFactory<ISearchPlugin>( "ktexteditor_isearch" ) )
ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
- : QObject ( view ), KXMLGUIClient (view)
+ : TQObject ( view ), KXMLGUIClient (view)
, m_view( 0L )
, m_doc( 0L )
, m_searchIF( 0L )
@@ -66,14 +66,14 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
m_searchForwardAction = new KAction(
i18n("Search Incrementally"), CTRL+ALT+Key_F,
- this, SLOT(slotSearchForwardAction()),
+ this, TQT_SLOT(slotSearchForwardAction()),
actionCollection(), "edit_isearch" );
m_searchBackwardAction = new KAction(
i18n("Search Incrementally Backwards"), CTRL+ALT+SHIFT+Key_F,
- this, SLOT(slotSearchBackwardAction()),
+ this, TQT_SLOT(slotSearchBackwardAction()),
actionCollection(), "edit_isearch_reverse" );
- m_label = new QLabel( i18n("I-Search:"), 0L, "kde toolbar widget" );
+ m_label = new TQLabel( i18n("I-Search:"), 0L, "kde toolbar widget" );
KWidgetAction* labelAction = new KWidgetAction(
m_label,
i18n("I-Search:"), 0, 0, 0,
@@ -84,12 +84,12 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
m_combo->setDuplicatesEnabled( false );
m_combo->setMaximumWidth( 300 );
m_combo->lineEdit()->installEventFilter( this );
- connect( m_combo, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotTextChanged(const QString&)) );
- connect( m_combo, SIGNAL(returnPressed(const QString&)),
- this, SLOT(slotReturnPressed(const QString&)) );
- connect( m_combo, SIGNAL(aboutToShowContextMenu(QPopupMenu*)),
- this, SLOT(slotAddContextMenuItems(QPopupMenu*)) );
+ connect( m_combo, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotTextChanged(const TQString&)) );
+ connect( m_combo, TQT_SIGNAL(returnPressed(const TQString&)),
+ this, TQT_SLOT(slotReturnPressed(const TQString&)) );
+ connect( m_combo, TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)),
+ this, TQT_SLOT(slotAddContextMenuItems(TQPopupMenu*)) );
m_comboAction = new KWidgetAction(
m_combo,
i18n("Search"), 0, 0, 0,
@@ -106,8 +106,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
i18n("Case Sensitive"), KShortcut(),
actionCollection(), "isearch_case_sensitive" );
action->setShortcutConfigurable( false );
- connect( action, SIGNAL(toggled(bool)),
- this, SLOT(setCaseSensitive(bool)) );
+ connect( action, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setCaseSensitive(bool)) );
action->setChecked( m_caseSensitive );
optionMenu->insert( action );
@@ -115,8 +115,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
i18n("From Beginning"), KShortcut(),
actionCollection(), "isearch_from_beginning" );
action->setShortcutConfigurable( false );
- connect( action, SIGNAL(toggled(bool)),
- this, SLOT(setFromBeginning(bool)) );
+ connect( action, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setFromBeginning(bool)) );
action->setChecked( m_fromBeginning );
optionMenu->insert( action );
@@ -124,8 +124,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
i18n("Regular Expression"), KShortcut(),
actionCollection(), "isearch_reg_exp" );
action->setShortcutConfigurable( false );
- connect( action, SIGNAL(toggled(bool)),
- this, SLOT(setRegExp(bool)) );
+ connect( action, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setRegExp(bool)) );
action->setChecked( m_regExp );
optionMenu->insert( action );
@@ -134,8 +134,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
// action = new KToggleAction(
// i18n("Auto-Wrap Search"), KShortcut(),
// actionCollection(), "isearch_auto_wrap" );
-// connect( action, SIGNAL(toggled(bool)),
-// this, SLOT(setAutoWrap(bool)) );
+// connect( action, TQT_SIGNAL(toggled(bool)),
+// this, TQT_SLOT(setAutoWrap(bool)) );
// action->setChecked( m_autoWrap );
// optionMenu->insert( action );
@@ -202,31 +202,31 @@ void ISearchPluginView::setAutoWrap( bool autoWrap )
m_autoWrap = autoWrap;
}
-bool ISearchPluginView::eventFilter( QObject* o, QEvent* e )
+bool ISearchPluginView::eventFilter( TQObject* o, TQEvent* e )
{
if( o != m_combo->lineEdit() )
return false;
- if( e->type() == QEvent::FocusIn ) {
- QFocusEvent* focusEvent = (QFocusEvent*)e;
- if( focusEvent->reason() == QFocusEvent::ActiveWindow ||
- focusEvent->reason() == QFocusEvent::Popup )
+ if( e->type() == TQEvent::FocusIn ) {
+ TQFocusEvent* focusEvent = (TQFocusEvent*)e;
+ if( focusEvent->reason() == TQFocusEvent::ActiveWindow ||
+ focusEvent->reason() == TQFocusEvent::Popup )
return false;
startSearch();
}
- if( e->type() == QEvent::FocusOut ) {
- QFocusEvent* focusEvent = (QFocusEvent*)e;
- if( focusEvent->reason() == QFocusEvent::ActiveWindow ||
- focusEvent->reason() == QFocusEvent::Popup )
+ if( e->type() == TQEvent::FocusOut ) {
+ TQFocusEvent* focusEvent = (TQFocusEvent*)e;
+ if( focusEvent->reason() == TQFocusEvent::ActiveWindow ||
+ focusEvent->reason() == TQFocusEvent::Popup )
return false;
endSearch();
}
- if( e->type() == QEvent::KeyPress ) {
- QKeyEvent *keyEvent = (QKeyEvent*)e;
+ if( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *keyEvent = (TQKeyEvent*)e;
if( keyEvent->key() == Qt::Key_Escape )
- quitToView( QString::null );
+ quitToView( TQString::null );
}
return false;
@@ -237,7 +237,7 @@ void ISearchPluginView::updateLabelText(
bool failing /* = false */, bool reverse /* = false */,
bool wrapped /* = false */, bool overwrapped /* = false */ )
{
- QString text;
+ TQString text;
// Reverse binary:
// 0000
if( !failing && !reverse && !wrapped && !overwrapped ) {
@@ -309,7 +309,7 @@ void ISearchPluginView::slotSearchAction( bool reverse )
void ISearchPluginView::nextMatch( bool reverse )
{
- QString text = m_combo->currentText();
+ TQString text = m_combo->currentText();
if( text.isEmpty() )
return;
if( state != MatchSearch ) {
@@ -355,7 +355,7 @@ void ISearchPluginView::startSearch()
m_combo->blockSignals( true );
- QString text = m_selectIF->selection();
+ TQString text = m_selectIF->selection();
if( text.isEmpty() )
text = m_lastString;
m_combo->setCurrentText( text );
@@ -378,7 +378,7 @@ void ISearchPluginView::endSearch()
}
}
-void ISearchPluginView::quitToView( const QString &text )
+void ISearchPluginView::quitToView( const TQString &text )
{
if( !text.isNull() && !text.isEmpty() ) {
m_combo->addToHistory( text );
@@ -390,7 +390,7 @@ void ISearchPluginView::quitToView( const QString &text )
}
}
-void ISearchPluginView::slotTextChanged( const QString& text )
+void ISearchPluginView::slotTextChanged( const TQString& text )
{
state = TextSearch;
@@ -400,29 +400,29 @@ void ISearchPluginView::slotTextChanged( const QString& text )
iSearch( m_searchLine, m_searchCol, text, m_searchBackward, m_autoWrap );
}
-void ISearchPluginView::slotReturnPressed( const QString& text )
+void ISearchPluginView::slotReturnPressed( const TQString& text )
{
quitToView( text );
}
-void ISearchPluginView::slotAddContextMenuItems( QPopupMenu *menu )
+void ISearchPluginView::slotAddContextMenuItems( TQPopupMenu *menu )
{
if( menu ) {
menu->insertSeparator();
menu->insertItem( i18n("Case Sensitive"), this,
- SLOT(setCaseSensitive(bool)));
+ TQT_SLOT(setCaseSensitive(bool)));
menu->insertItem( i18n("From Beginning"), this,
- SLOT(setFromBeginning(bool)));
+ TQT_SLOT(setFromBeginning(bool)));
menu->insertItem( i18n("Regular Expression"), this,
- SLOT(setRegExp(bool)));
+ TQT_SLOT(setRegExp(bool)));
//menu->insertItem( i18n("Auto-Wrap Search"), this,
- // SLOT(setAutoWrap(bool)));
+ // TQT_SLOT(setAutoWrap(bool)));
}
}
bool ISearchPluginView::iSearch(
uint startLine, uint startCol,
- const QString& text, bool reverse,
+ const TQString& text, bool reverse,
bool autoWrap )
{
if( !m_view ) return false;
@@ -441,7 +441,7 @@ bool ISearchPluginView::iSearch(
} else {
found = m_searchIF->searchText( startLine,
startCol,
- QRegExp( text ),
+ TQRegExp( text ),
&m_foundLine,
&m_foundCol,
&m_matchLen,
@@ -465,7 +465,7 @@ bool ISearchPluginView::iSearch(
return found;
}
-ISearchPlugin::ISearchPlugin( QObject *parent, const char* name, const QStringList& )
+ISearchPlugin::ISearchPlugin( TQObject *parent, const char* name, const TQStringList& )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
}
diff --git a/kate/plugins/isearch/ISearchPlugin.h b/kate/plugins/isearch/ISearchPlugin.h
index d2f603fb8..9627193b8 100644
--- a/kate/plugins/isearch/ISearchPlugin.h
+++ b/kate/plugins/isearch/ISearchPlugin.h
@@ -27,8 +27,8 @@
#include <ktexteditor/selectioninterface.h>
#include <kxmlguiclient.h>
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
class QLabel;
@@ -37,17 +37,17 @@ class ISearchPlugin : public KTextEditor::Plugin, public KTextEditor::PluginView
Q_OBJECT
public:
- ISearchPlugin( QObject *parent = 0, const char* name = 0, const QStringList &args = QStringList() );
+ ISearchPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
virtual ~ISearchPlugin();
void addView (KTextEditor::View *view);
void removeView (KTextEditor::View *view);
private:
- QPtrList<class ISearchPluginView> m_views;
+ TQPtrList<class ISearchPluginView> m_views;
};
-class ISearchPluginView : public QObject, public KXMLGUIClient
+class ISearchPluginView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
@@ -55,7 +55,7 @@ public:
ISearchPluginView( KTextEditor::View *view );
virtual ~ISearchPluginView();
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
void setView( KTextEditor::View* view );
@@ -69,9 +69,9 @@ private slots:
void slotSearchForwardAction();
void slotSearchBackwardAction();
void slotSearchAction( bool reverse );
- void slotTextChanged( const QString& text );
- void slotReturnPressed( const QString& text );
- void slotAddContextMenuItems( QPopupMenu *menu);
+ void slotTextChanged( const TQString& text );
+ void slotReturnPressed( const TQString& text );
+ void slotAddContextMenuItems( TQPopupMenu *menu);
private:
void readConfig();
@@ -81,11 +81,11 @@ private:
bool wrapped = false, bool overwrapped = false );
void startSearch();
void endSearch();
- void quitToView( const QString &text );
+ void quitToView( const TQString &text );
void nextMatch( bool reverse );
bool iSearch( uint startLine, uint startCol,
- const QString& text, bool reverse, bool autoWrap );
+ const TQString& text, bool reverse, bool autoWrap );
KTextEditor::View* m_view;
KTextEditor::Document* m_doc;
@@ -95,9 +95,9 @@ private:
KAction* m_searchForwardAction;
KAction* m_searchBackwardAction;
KWidgetAction* m_comboAction;
- QGuardedPtr<QLabel> m_label;
- QGuardedPtr<KHistoryCombo> m_combo;
- QString m_lastString;
+ TQGuardedPtr<TQLabel> m_label;
+ TQGuardedPtr<KHistoryCombo> m_combo;
+ TQString m_lastString;
bool m_searchBackward;
bool m_caseSensitive;
bool m_fromBeginning;
diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp
index 3c63bcb4f..11cd645b7 100644
--- a/kate/plugins/kdatatool/kate_kdatatool.cpp
+++ b/kate/plugins/kdatatool/kate_kdatatool.cpp
@@ -37,7 +37,7 @@ K_EXPORT_COMPONENT_FACTORY( ktexteditor_kdatatool, KGenericFactory<KTextEditor::
namespace KTextEditor {
-KDataToolPlugin::KDataToolPlugin( QObject *parent, const char* name, const QStringList& )
+KDataToolPlugin::KDataToolPlugin( TQObject *parent, const char* name, const TQStringList& )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
}
@@ -76,7 +76,7 @@ KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view )
setInstance( KGenericFactory<KDataToolPlugin>::instance() );
m_menu = new KActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool");
- connect(m_menu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
+ connect(m_menu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShow()));
setXMLFile("ktexteditor_kdatatoolui.rc");
m_view = view;
@@ -91,9 +91,9 @@ KDataToolPluginView::~KDataToolPluginView()
void KDataToolPluginView::aboutToShow()
{
kdDebug()<<"KTextEditor::KDataToolPluginView::aboutToShow"<<endl;
- QString word;
+ TQString word;
m_singleWord = false;
- m_wordUnderCursor = QString::null;
+ m_wordUnderCursor = TQString::null;
// unplug old actions, if any:
KAction *ac;
@@ -121,12 +121,12 @@ void KDataToolPluginView::aboutToShow()
ci = KTextEditor::viewCursorInterface(v);
uint line, col;
ci->cursorPositionReal(&line, &col);
- QString tmp_line = ei->textLine(line);
+ TQString tmp_line = ei->textLine(line);
m_wordUnderCursor = "";
// find begin of word:
m_singleWord_start = 0;
for(int i = col; i >= 0; i--) {
- QChar ch = tmp_line.at(i);
+ TQChar ch = tmp_line.at(i);
if( ! (ch.isLetter() || ch == '-' || ch == '\'') )
{
m_singleWord_start = i+1;
@@ -137,7 +137,7 @@ void KDataToolPluginView::aboutToShow()
// find end of word:
m_singleWord_end = tmp_line.length();
for(uint i = col+1; i < tmp_line.length(); i++) {
- QChar ch = tmp_line.at(i);
+ TQChar ch = tmp_line.at(i);
if( ! (ch.isLetter() || ch == '-' || ch == '\'') )
{
m_singleWord_end = i;
@@ -150,8 +150,8 @@ void KDataToolPluginView::aboutToShow()
m_singleWord = true;
m_singleWord_line = line;
} else {
- m_notAvailable = new KAction(i18n("(not available)"), QString::null, 0, this,
- SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
+ m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this,
+ TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
m_menu->insert(m_notAvailable);
return;
}
@@ -159,21 +159,21 @@ void KDataToolPluginView::aboutToShow()
KInstance *inst=instance();
- QValueList<KDataToolInfo> tools;
- tools += KDataToolInfo::query( "QString", "text/plain", inst );
+ TQValueList<KDataToolInfo> tools;
+ tools += KDataToolInfo::query( "TQString", "text/plain", inst );
if( m_singleWord )
- tools += KDataToolInfo::query( "QString", "application/x-singleword", inst );
+ tools += KDataToolInfo::query( "TQString", "application/x-singleword", inst );
m_actionList = KDataToolAction::dataToolActionList( tools, this,
- SLOT( slotToolActivated( const KDataToolInfo &, const QString & ) ) );
+ TQT_SLOT( slotToolActivated( const KDataToolInfo &, const TQString & ) ) );
for ( ac = m_actionList.first(); ac; ac = m_actionList.next() ) {
m_menu->insert(ac);
}
if( m_actionList.isEmpty() ) {
- m_notAvailable = new KAction(i18n("(not available)"), QString::null, 0, this,
- SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
+ m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this,
+ TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av");
m_menu->insert(m_notAvailable);
}
}
@@ -186,7 +186,7 @@ void KDataToolPluginView::slotNotAvailable()
"of the KOffice package."));
}
-void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QString &command )
+void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const TQString &command )
{
KDataTool* tool = info.createTool( );
@@ -196,14 +196,14 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QS
return;
}
- QString text;
+ TQString text;
if ( selectionInterface(m_view->document())->hasSelection() )
text = selectionInterface(m_view->document())->selection();
else
text = m_wordUnderCursor;
- QString mimetype = "text/plain";
- QString datatype = "QString";
+ TQString mimetype = "text/plain";
+ TQString datatype = "TQString";
// If unsupported (and if we have a single word indeed), try application/x-singleword
if ( !info.mimeTypes().contains( mimetype ) && m_singleWord )
@@ -211,7 +211,7 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const QS
kdDebug() << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl;
- QString origText = text;
+ TQString origText = text;
if ( tool->run( command, &text, datatype, mimetype) )
{
diff --git a/kate/plugins/kdatatool/kate_kdatatool.h b/kate/plugins/kdatatool/kate_kdatatool.h
index bde5d70b2..fbe4e7bf0 100644
--- a/kate/plugins/kdatatool/kate_kdatatool.h
+++ b/kate/plugins/kdatatool/kate_kdatatool.h
@@ -22,9 +22,9 @@
#define _KATE_KDATATOOL_
#include <ktexteditor/plugin.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kxmlguiclient.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KActionMenu;
class KDataToolInfo;
@@ -39,17 +39,17 @@ class KDataToolPlugin : public KTextEditor::Plugin, public KTextEditor::PluginVi
Q_OBJECT
public:
- KDataToolPlugin( QObject *parent = 0, const char* name = 0, const QStringList &args = QStringList() );
+ KDataToolPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
virtual ~KDataToolPlugin();
void addView (KTextEditor::View *view);
void removeView (KTextEditor::View *view);
private:
- QPtrList<class KDataToolPluginView> m_views;
+ TQPtrList<class KDataToolPluginView> m_views;
};
-class KDataToolPluginView : public QObject, public KXMLGUIClient
+class KDataToolPluginView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
@@ -61,13 +61,13 @@ private:
View *m_view;
bool m_singleWord;
int m_singleWord_line, m_singleWord_start, m_singleWord_end;
- QString m_wordUnderCursor;
- QPtrList<KAction> m_actionList;
- QGuardedPtr<KActionMenu> m_menu;
+ TQString m_wordUnderCursor;
+ TQPtrList<KAction> m_actionList;
+ TQGuardedPtr<KActionMenu> m_menu;
KAction *m_notAvailable;
protected slots:
void aboutToShow();
- void slotToolActivated( const KDataToolInfo &datatoolinfo, const QString &string );
+ void slotToolActivated( const KDataToolInfo &datatoolinfo, const TQString &string );
void slotNotAvailable();
};
diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp
index 9fb7f4844..37da55224 100644
--- a/kate/plugins/wordcompletion/docwordcompletion.cpp
+++ b/kate/plugins/wordcompletion/docwordcompletion.cpp
@@ -43,24 +43,24 @@
#include <kparts/part.h>
#include <kiconloader.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qdict.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
// #include <kdebug.h>
//END
//BEGIN DocWordCompletionPlugin
K_EXPORT_COMPONENT_FACTORY( ktexteditor_docwordcompletion, KGenericFactory<DocWordCompletionPlugin>( "ktexteditor_docwordcompletion" ) )
-DocWordCompletionPlugin::DocWordCompletionPlugin( QObject *parent,
+DocWordCompletionPlugin::DocWordCompletionPlugin( TQObject *parent,
const char* name,
- const QStringList& /*args*/ )
+ const TQStringList& /*args*/ )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
readConfig();
@@ -99,23 +99,23 @@ void DocWordCompletionPlugin::removeView(KTextEditor::View *view)
}
}
-KTextEditor::ConfigPage* DocWordCompletionPlugin::configPage( uint, QWidget *parent, const char *name )
+KTextEditor::ConfigPage* DocWordCompletionPlugin::configPage( uint, TQWidget *parent, const char *name )
{
return new DocWordCompletionConfigPage( this, parent, name );
}
-QString DocWordCompletionPlugin::configPageName( uint ) const
+TQString DocWordCompletionPlugin::configPageName( uint ) const
{
return i18n("Word Completion Plugin");
}
-QString DocWordCompletionPlugin::configPageFullName( uint ) const
+TQString DocWordCompletionPlugin::configPageFullName( uint ) const
{
return i18n("Configure the Word Completion Plugin");
}
// FIXME provide sucn a icon
- QPixmap DocWordCompletionPlugin::configPagePixmap( uint, int size ) const
+ TQPixmap DocWordCompletionPlugin::configPagePixmap( uint, int size ) const
{
return UserIcon( "kte_wordcompletion", size );
}
@@ -127,16 +127,16 @@ struct DocWordCompletionPluginViewPrivate
uint line, col; // start position of last match (where to search from)
uint cline, ccol; // cursor position
uint lilen; // length of last insertion
- QString last; // last word we were trying to match
- QString lastIns; // latest applied completion
- QRegExp re; // hrm
+ TQString last; // last word we were trying to match
+ TQString lastIns; // latest applied completion
+ TQRegExp re; // hrm
KToggleAction *autopopup; // for accessing state
uint treshold; // the required length of a word before popping up the completion list automatically
int directionalPos; // be able to insert "" at the correct time
};
DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool autopopup, KTextEditor::View *view, const char *name )
- : QObject( view, name ),
+ : TQObject( view, name ),
KXMLGUIClient( view ),
m_view( view ),
d( new DocWordCompletionPluginViewPrivate )
@@ -146,15 +146,15 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au
setInstance( KGenericFactory<DocWordCompletionPlugin>::instance() );
(void) new KAction( i18n("Reuse Word Above"), CTRL+Key_8, this,
- SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" );
+ TQT_SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" );
(void) new KAction( i18n("Reuse Word Below"), CTRL+Key_9, this,
- SLOT(completeForwards()), actionCollection(), "doccomplete_fw" );
+ TQT_SLOT(completeForwards()), actionCollection(), "doccomplete_fw" );
(void) new KAction( i18n("Pop Up Completion List"), 0, this,
- SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" );
+ TQT_SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" );
(void) new KAction( i18n("Shell Completion"), 0, this,
- SLOT(shellComplete()), actionCollection(), "doccomplete_sh" );
+ TQT_SLOT(shellComplete()), actionCollection(), "doccomplete_sh" );
d->autopopup = new KToggleAction( i18n("Automatic Completion Popup"), 0, this,
- SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" );
+ TQT_SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" );
d->autopopup->setChecked( autopopup );
toggleAutoPopup();
@@ -164,12 +164,12 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au
KTextEditor::VariableInterface *vi = KTextEditor::variableInterface( view->document() );
if ( vi )
{
- QString e = vi->variable("wordcompletion-autopopup");
+ TQString e = vi->variable("wordcompletion-autopopup");
if ( ! e.isEmpty() )
d->autopopup->setEnabled( e == "true" );
- connect( view->document(), SIGNAL(variableChanged(const QString &, const QString &)),
- this, SLOT(slotVariableChanged(const QString &, const QString &)) );
+ connect( view->document(), TQT_SIGNAL(variableChanged(const TQString &, const TQString &)),
+ this, TQT_SLOT(slotVariableChanged(const TQString &, const TQString &)) );
}
}
@@ -189,7 +189,7 @@ void DocWordCompletionPluginView::completeForwards()
}
// Pop up the editors completion list if applicable
-void DocWordCompletionPluginView::popupCompletionList( QString w )
+void DocWordCompletionPluginView::popupCompletionList( TQString w )
{
if ( w.isEmpty() )
w = word();
@@ -203,15 +203,15 @@ void DocWordCompletionPluginView::popupCompletionList( QString w )
void DocWordCompletionPluginView::toggleAutoPopup()
{
if ( d->autopopup->isChecked() ) {
- if ( ! connect( m_view->document(), SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)),
- this, SLOT(autoPopupCompletionList()) ))
+ if ( ! connect( m_view->document(), TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)),
+ this, TQT_SLOT(autoPopupCompletionList()) ))
{
- connect( m_view->document(), SIGNAL(textChanged()), this, SLOT(autoPopupCompletionList()) );
+ connect( m_view->document(), TQT_SIGNAL(textChanged()), this, TQT_SLOT(autoPopupCompletionList()) );
}
} else {
- disconnect( m_view->document(), SIGNAL(textChanged()), this, SLOT(autoPopupCompletionList()) );
- disconnect( m_view->document(), SIGNAL(charactersInteractivelyInserted(int ,int ,const QString&)),
- this, SLOT(autoPopupCompletionList()) );
+ disconnect( m_view->document(), TQT_SIGNAL(textChanged()), this, TQT_SLOT(autoPopupCompletionList()) );
+ disconnect( m_view->document(), TQT_SIGNAL(charactersInteractivelyInserted(int ,int ,const TQString&)),
+ this, TQT_SLOT(autoPopupCompletionList()) );
}
}
@@ -220,7 +220,7 @@ void DocWordCompletionPluginView::toggleAutoPopup()
void DocWordCompletionPluginView::autoPopupCompletionList()
{
if ( ! m_view->hasFocus() ) return;
- QString w = word();
+ TQString w = word();
if ( w.length() >= d->treshold )
{
popupCompletionList( w );
@@ -235,14 +235,14 @@ void DocWordCompletionPluginView::shellComplete()
// find the word we are typing
uint cline, ccol;
viewCursorInterface(m_view)->cursorPositionReal(&cline, &ccol);
- QString wrd = word();
+ TQString wrd = word();
if (wrd.isEmpty())
return;
- QValueList < KTextEditor::CompletionEntry > matches = allMatches(wrd);
+ TQValueList < KTextEditor::CompletionEntry > matches = allMatches(wrd);
if (matches.size() == 0)
return;
- QString partial = findLongestUnique(matches);
+ TQString partial = findLongestUnique(matches);
if (partial.length() == wrd.length())
{
KTextEditor::CodeCompletionInterface * cci = codeCompletionInterface(m_view);
@@ -264,7 +264,7 @@ void DocWordCompletionPluginView::complete( bool fw )
// find the word we are typing
uint cline, ccol;
viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol );
- QString wrd = word();
+ TQString wrd = word();
if ( wrd.isEmpty() )
return;
@@ -320,7 +320,7 @@ void DocWordCompletionPluginView::complete( bool fw )
d->re.setPattern( "\\b" + wrd + "(\\w+)" );
int pos ( 0 );
- QString ln = ei->textLine( d->line );
+ TQString ln = ei->textLine( d->line );
while ( true )
{
@@ -330,7 +330,7 @@ void DocWordCompletionPluginView::complete( bool fw )
if ( pos > -1 ) // we matched a word
{
- QString m = d->re.cap( 1 );
+ TQString m = d->re.cap( 1 );
if ( m != d->lastIns )
{
// we got good a match! replace text and return.
@@ -393,10 +393,10 @@ void DocWordCompletionPluginView::complete( bool fw )
}
// Contributed by <brain@hdsnet.hu>
-QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextEditor::CompletionEntry > &matches)
+TQString DocWordCompletionPluginView::findLongestUnique(const TQValueList < KTextEditor::CompletionEntry > &matches)
{
- QString partial = matches.front().text;
- QValueList < KTextEditor::CompletionEntry >::const_iterator i = matches.begin();
+ TQString partial = matches.front().text;
+ TQValueList < KTextEditor::CompletionEntry >::const_iterator i = matches.begin();
for (++i; i != matches.end(); ++i)
{
if (!(*i).text.startsWith(partial))
@@ -410,7 +410,7 @@ QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextE
}
}
if (partial.length() == 0)
- return QString();
+ return TQString();
}
}
@@ -418,31 +418,31 @@ QString DocWordCompletionPluginView::findLongestUnique(const QValueList < KTextE
}
// Return the string to complete (the letters behind the cursor)
-QString DocWordCompletionPluginView::word()
+TQString DocWordCompletionPluginView::word()
{
uint cline, ccol;
viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol );
- if ( ! ccol ) return QString::null; // no word
+ if ( ! ccol ) return TQString::null; // no word
KTextEditor::EditInterface *ei = KTextEditor::editInterface( m_view->document() );
d->re.setPattern( "\\b(\\w+)$" );
if ( d->re.searchRev(
ei->text( cline, 0, cline, ccol )
) < 0 )
- return QString::null; // no word
+ return TQString::null; // no word
return d->re.cap( 1 );
}
// Scan throught the entire document for possible completions,
// ignoring any dublets
-QValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches( const QString &word )
+TQValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches( const TQString &word )
{
- QValueList<KTextEditor::CompletionEntry> l;
+ TQValueList<KTextEditor::CompletionEntry> l;
uint i( 0 );
int pos( 0 );
d->re.setPattern( "\\b("+word+"\\w+)" );
- QString s, m;
+ TQString s, m;
KTextEditor::EditInterface *ei = KTextEditor::editInterface( m_view->document() );
- QDict<int> seen; // maybe slow with > 17 matches
+ TQDict<int> seen; // maybe slow with > 17 matches
int sawit(1); // to ref for the dict
uint cline, ccol;// needed to avoid constructing a word at cursor position
viewCursorInterface( m_view )->cursorPositionReal( &cline, &ccol );
@@ -478,7 +478,7 @@ QValueList<KTextEditor::CompletionEntry> DocWordCompletionPluginView::allMatches
return l;
}
-void DocWordCompletionPluginView::slotVariableChanged( const QString &var, const QString &val )
+void DocWordCompletionPluginView::slotVariableChanged( const TQString &var, const TQString &val )
{
if ( var == "wordcompletion-autopopup" )
d->autopopup->setEnabled( val == "true" );
@@ -488,20 +488,20 @@ void DocWordCompletionPluginView::slotVariableChanged( const QString &var, const
//END
//BEGIN DocWordCompletionConfigPage
-DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, QWidget *parent, const char *name )
+DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, TQWidget *parent, const char *name )
: KTextEditor::ConfigPage( parent, name )
, m_completion( completion )
{
- QVBoxLayout *lo = new QVBoxLayout( this );
+ TQVBoxLayout *lo = new TQVBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- cbAutoPopup = new QCheckBox( i18n("Automatically &show completion list"), this );
+ cbAutoPopup = new TQCheckBox( i18n("Automatically &show completion list"), this );
lo->addWidget( cbAutoPopup );
- QHBox *hb = new QHBox( this );
+ TQHBox *hb = new TQHBox( this );
hb->setSpacing( KDialog::spacingHint() );
lo->addWidget( hb );
- QLabel *l = new QLabel( i18n(
+ TQLabel *l = new TQLabel( i18n(
"Translators: This is the first part of two strings wich will comprise the "
"sentence 'Show completions when a word is at least N characters'. The first "
"part is on the right side of the N, which is represented by a spinbox "
@@ -509,17 +509,17 @@ DocWordCompletionConfigPage::DocWordCompletionConfigPage( DocWordCompletionPlugi
"ingeger number between and including 1 and 30. Feel free to leave the "
"second part of the sentence blank if it suits your language better. ",
"Show completions &when a word is at least"), hb );
- sbAutoPopup = new QSpinBox( 1, 30, 1, hb );
+ sbAutoPopup = new TQSpinBox( 1, 30, 1, hb );
l->setBuddy( sbAutoPopup );
- lSbRight = new QLabel( i18n(
+ lSbRight = new TQLabel( i18n(
"This is the second part of two strings that will comprise teh sentence "
"'Show completions when a word is at least N characters'",
"characters long."), hb );
- QWhatsThis::add( cbAutoPopup, i18n(
+ TQWhatsThis::add( cbAutoPopup, i18n(
"Enable the automatic completion list popup as default. The popup can "
"be disabled on a view basis from the 'Tools' menu.") );
- QWhatsThis::add( sbAutoPopup, i18n(
+ TQWhatsThis::add( sbAutoPopup, i18n(
"Define the length a word should have before the completion list "
"is displayed.") );
diff --git a/kate/plugins/wordcompletion/docwordcompletion.h b/kate/plugins/wordcompletion/docwordcompletion.h
index b42560fca..ed632631a 100644
--- a/kate/plugins/wordcompletion/docwordcompletion.h
+++ b/kate/plugins/wordcompletion/docwordcompletion.h
@@ -35,9 +35,9 @@
#include <ktexteditor/configinterfaceextension.h>
#include <kxmlguiclient.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class DocWordCompletionPlugin
: public KTextEditor::Plugin
@@ -47,9 +47,9 @@ class DocWordCompletionPlugin
Q_OBJECT
public:
- DocWordCompletionPlugin( QObject *parent = 0,
+ DocWordCompletionPlugin( TQObject *parent = 0,
const char* name = 0,
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
virtual ~DocWordCompletionPlugin() {};
void addView (KTextEditor::View *view);
@@ -60,10 +60,10 @@ class DocWordCompletionPlugin
// ConfigInterfaceExtention
uint configPages() const { return 1; };
- KTextEditor::ConfigPage * configPage( uint number, QWidget *parent, const char *name );
- QString configPageName( uint ) const;
- QString configPageFullName( uint ) const;
- QPixmap configPagePixmap( uint, int ) const;
+ KTextEditor::ConfigPage * configPage( uint number, TQWidget *parent, const char *name );
+ TQString configPageName( uint ) const;
+ TQString configPageFullName( uint ) const;
+ TQPixmap configPagePixmap( uint, int ) const;
uint treshold() const { return m_treshold; };
void setTreshold( uint t ) { m_treshold = t; };
@@ -72,14 +72,14 @@ class DocWordCompletionPlugin
private:
- QPtrList<class DocWordCompletionPluginView> m_views;
+ TQPtrList<class DocWordCompletionPluginView> m_views;
uint m_treshold;
bool m_autopopup;
};
class DocWordCompletionPluginView
- : public QObject, public KXMLGUIClient
+ : public TQObject, public KXMLGUIClient
{
Q_OBJECT
@@ -95,18 +95,18 @@ class DocWordCompletionPluginView
void completeForwards();
void shellComplete();
- void popupCompletionList( QString word=QString::null );
+ void popupCompletionList( TQString word=TQString::null );
void autoPopupCompletionList();
void toggleAutoPopup();
- void slotVariableChanged( const QString &, const QString & );
+ void slotVariableChanged( const TQString &, const TQString & );
private:
void complete( bool fw=true );
- QString word();
- QValueList<KTextEditor::CompletionEntry> allMatches( const QString &word );
- QString findLongestUnique(const QValueList < KTextEditor::CompletionEntry > &matches);
+ TQString word();
+ TQValueList<KTextEditor::CompletionEntry> allMatches( const TQString &word );
+ TQString findLongestUnique(const TQValueList < KTextEditor::CompletionEntry > &matches);
KTextEditor::View *m_view;
struct DocWordCompletionPluginViewPrivate *d;
};
@@ -115,7 +115,7 @@ class DocWordCompletionConfigPage : public KTextEditor::ConfigPage
{
Q_OBJECT
public:
- DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, QWidget *parent, const char *name );
+ DocWordCompletionConfigPage( DocWordCompletionPlugin *completion, TQWidget *parent, const char *name );
virtual ~DocWordCompletionConfigPage() {};
virtual void apply();
@@ -124,9 +124,9 @@ class DocWordCompletionConfigPage : public KTextEditor::ConfigPage
private:
DocWordCompletionPlugin *m_completion;
- class QCheckBox *cbAutoPopup;
- class QSpinBox *sbAutoPopup;
- class QLabel *lSbRight;
+ class TQCheckBox *cbAutoPopup;
+ class TQSpinBox *sbAutoPopup;
+ class TQLabel *lSbRight;
};
#endif // _DocWordCompletionPlugin_h_
diff --git a/kcert/kcertpart.cc b/kcert/kcertpart.cc
index bd3b9f74c..e704ad339 100644
--- a/kcert/kcertpart.cc
+++ b/kcert/kcertpart.cc
@@ -23,14 +23,14 @@
#include <kparts/genericfactory.h>
#include <kinstance.h>
#include <kaboutdata.h>
-#include <qframe.h>
+#include <tqframe.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qbutton.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqbutton.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
#include <kmessagebox.h>
#include <kpassdlg.h>
#include <ksslall.h>
@@ -38,12 +38,12 @@
#include <ksslpemcallback.h>
#include <kfiledialog.h>
#include <kprocess.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kseparator.h>
#include <klistview.h>
#include <kio/kmimemagic.h>
-#include <qmultilineedit.h>
-#include <qregexp.h>
+#include <tqmultilineedit.h>
+#include <tqregexp.h>
#include <kcombobox.h>
#include <kparts/browserextension.h>
#include <kparts/browserinterface.h>
@@ -68,12 +68,12 @@ void KX509Item::setup(KSSLCertificate *x) {
cert = x;
if (x) {
KSSLX509Map xm(x->getSubject());
- QString OU = "OU";
- QString CN = "CN";
+ TQString OU = "OU";
+ TQString CN = "CN";
OU = xm.getValue(OU);
CN = xm.getValue(CN);
- OU.replace(QRegExp("\n.*"), "");
- CN.replace(QRegExp("\n.*"), "");
+ OU.replace(TQRegExp("\n.*"), "");
+ CN.replace(TQRegExp("\n.*"), "");
if (OU.length() > 0) {
_prettyName = OU;
@@ -104,9 +104,9 @@ KPKCS12Item::KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x) :
cert = x;
if (x) {
KSSLX509Map xm(x->getCertificate()->getSubject());
- QString CN = "CN";
+ TQString CN = "CN";
CN = xm.getValue(CN);
- CN.replace(QRegExp("\n.*"), "");
+ CN.replace(TQRegExp("\n.*"), "");
_prettyName = CN;
setText(0, _prettyName);
} else {
@@ -127,12 +127,12 @@ class KCertPartPrivate {
};
-KCertPart::KCertPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+KCertPart::KCertPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: KParts::ReadWritePart(parent, name) {
KInstance *instance = new KInstance("KCertPart");
-QGridLayout *grid;
+TQGridLayout *grid;
setInstance(instance);
@@ -149,10 +149,10 @@ _silentImport = false;
d = new KCertPartPrivate;
d->browserExtension = new KParts::BrowserExtension(this);
-_frame = new QFrame(parentWidget, widgetName);
+_frame = new TQFrame(parentWidget, widgetName);
setWidget(_frame);
-_baseGrid = new QGridLayout(_frame, 15, 9, KDialog::marginHint(),
+_baseGrid = new TQGridLayout(_frame, 15, 9, KDialog::marginHint(),
KDialog::spacingHint());
_sideList = new KListView(_frame);
@@ -167,62 +167,62 @@ _sideList->setOpen(_parentP12, true);
_baseGrid->addMultiCellWidget(_sideList, 0, 13, 0, 1);
-_importAll = new QPushButton(i18n("Import &All"), _frame);
+_importAll = new TQPushButton(i18n("Import &All"), _frame);
_baseGrid->addMultiCellWidget(_importAll, 14, 14, 0, 1);
-connect(_importAll, SIGNAL(clicked()), SLOT(slotImportAll()));
+connect(_importAll, TQT_SIGNAL(clicked()), TQT_SLOT(slotImportAll()));
//------------------------------------------------------------------------
// The PKCS widget
//------------------------------------------------------------------------
-_pkcsFrame = new QFrame(_frame);
+_pkcsFrame = new TQFrame(_frame);
-grid = new QGridLayout(_pkcsFrame, 13, 6, KDialog::marginHint(),
+grid = new TQGridLayout(_pkcsFrame, 13, 6, KDialog::marginHint(),
KDialog::spacingHint() );
-grid->addMultiCellWidget(new QLabel(i18n("KDE Secure Certificate Import"), _pkcsFrame), 0, 0, 0, 5);
-grid->addWidget(new QLabel(i18n("Chain:"), _pkcsFrame), 1, 0);
+grid->addMultiCellWidget(new TQLabel(i18n("KDE Secure Certificate Import"), _pkcsFrame), 0, 0, 0, 5);
+grid->addWidget(new TQLabel(i18n("Chain:"), _pkcsFrame), 1, 0);
_p12_chain = new KComboBox(_pkcsFrame);
grid->addMultiCellWidget(_p12_chain, 1, 1, 1, 4);
-connect(_p12_chain, SIGNAL(activated(int)), SLOT(slotChain(int)));
+connect(_p12_chain, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChain(int)));
-grid->addWidget(new QLabel(i18n("Subject:"), _pkcsFrame), 2, 0);
-grid->addWidget(new QLabel(i18n("Issued by:"), _pkcsFrame), 2, 3);
-_p12_subject = KSSLInfoDlg::certInfoWidget(_pkcsFrame, QString(""));
-_p12_issuer = KSSLInfoDlg::certInfoWidget(_pkcsFrame, QString(""));
+grid->addWidget(new TQLabel(i18n("Subject:"), _pkcsFrame), 2, 0);
+grid->addWidget(new TQLabel(i18n("Issued by:"), _pkcsFrame), 2, 3);
+_p12_subject = KSSLInfoDlg::certInfoWidget(_pkcsFrame, TQString(""));
+_p12_issuer = KSSLInfoDlg::certInfoWidget(_pkcsFrame, TQString(""));
grid->addMultiCellWidget(_p12_subject, 3, 6, 0, 2);
grid->addMultiCellWidget(_p12_issuer, 3, 6, 3, 5);
-grid->addWidget(new QLabel(i18n("File:"), _pkcsFrame), 7, 0);
-_p12_filenameLabel = new QLabel("", _pkcsFrame);
+grid->addWidget(new TQLabel(i18n("File:"), _pkcsFrame), 7, 0);
+_p12_filenameLabel = new TQLabel("", _pkcsFrame);
grid->addWidget(_p12_filenameLabel, 7, 1);
-grid->addWidget(new QLabel(i18n("File format:"), _pkcsFrame), 7, 3);
-grid->addWidget(new QLabel("PKCS#12", _pkcsFrame), 7, 4);
+grid->addWidget(new TQLabel(i18n("File format:"), _pkcsFrame), 7, 3);
+grid->addWidget(new TQLabel("PKCS#12", _pkcsFrame), 7, 4);
//
// Make the first tab
//
-_tabs = new QTabWidget(_pkcsFrame);
+_tabs = new TQTabWidget(_pkcsFrame);
grid->addMultiCellWidget(_tabs, 8, 12, 0, 5);
-QFrame *tab = new QFrame(_pkcsFrame);
-QGridLayout *tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+TQFrame *tab = new TQFrame(_pkcsFrame);
+TQGridLayout *tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("State:"), tab), 0, 0);
-_p12_certState = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("State:"), tab), 0, 0);
+_p12_certState = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_p12_certState, 0, 0, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Valid from:"), tab), 1, 0);
-_p12_validFrom = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Valid from:"), tab), 1, 0);
+_p12_validFrom = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_p12_validFrom, 1, 1, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Valid until:"), tab), 2, 0);
-_p12_validUntil = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Valid until:"), tab), 2, 0);
+_p12_validUntil = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_p12_validUntil, 2, 2, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Serial number:"), tab), 3, 0);
-_p12_serialNum = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Serial number:"), tab), 3, 0);
+_p12_serialNum = new TQLabel("", tab);
tabGrid->addWidget(_p12_serialNum, 3, 1);
_tabs->addTab(tab, i18n("State"));
@@ -230,14 +230,14 @@ _tabs->addTab(tab, i18n("State"));
//
// Make the second tab
//
-tab = new QFrame(_pkcsFrame);
-tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+tab = new TQFrame(_pkcsFrame);
+tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("MD5 digest:"), tab), 0, 0);
-_p12_digest = new QLabel(tab);
+tabGrid->addWidget(new TQLabel(i18n("MD5 digest:"), tab), 0, 0);
+_p12_digest = new TQLabel(tab);
tabGrid->addMultiCellWidget(_p12_digest, 0, 0, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Signature:"), tab), 1, 0);
-_p12_sig = new QMultiLineEdit(tab);
+tabGrid->addWidget(new TQLabel(i18n("Signature:"), tab), 1, 0);
+_p12_sig = new TQMultiLineEdit(tab);
tabGrid->addMultiCellWidget(_p12_sig, 1, 3, 1, 4);
_p12_sig->setReadOnly(true);
@@ -247,11 +247,11 @@ _tabs->addTab(tab, i18n("Signature"));
//
// Make the third tab
//
-tab = new QFrame(_pkcsFrame);
-tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+tab = new TQFrame(_pkcsFrame);
+tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("Public key:"), tab), 0, 0);
-_p12_pubkey = new QMultiLineEdit(tab);
+tabGrid->addWidget(new TQLabel(i18n("Public key:"), tab), 0, 0);
+_p12_pubkey = new TQMultiLineEdit(tab);
tabGrid->addMultiCellWidget(_p12_pubkey, 0, 3, 1, 4);
_p12_pubkey->setReadOnly(true);
@@ -267,49 +267,49 @@ _pkcsFrame->hide();
// the simple reason that the above has potential to display much
// more information, and this one has potential to display different
// information.
-_x509Frame = new QFrame(_frame);
+_x509Frame = new TQFrame(_frame);
-grid = new QGridLayout(_x509Frame, 12, 6, KDialog::marginHint(),
+grid = new TQGridLayout(_x509Frame, 12, 6, KDialog::marginHint(),
KDialog::spacingHint() );
-grid->addMultiCellWidget(new QLabel(i18n("KDE Secure Certificate Import"), _x509Frame), 0, 0, 0, 5);
+grid->addMultiCellWidget(new TQLabel(i18n("KDE Secure Certificate Import"), _x509Frame), 0, 0, 0, 5);
-grid->addWidget(new QLabel(i18n("Subject:"), _x509Frame), 1, 0);
-grid->addWidget(new QLabel(i18n("Issued by:"), _x509Frame), 1, 3);
-_ca_subject = KSSLInfoDlg::certInfoWidget(_x509Frame, QString(""));
-_ca_issuer = KSSLInfoDlg::certInfoWidget(_x509Frame, QString(""));
+grid->addWidget(new TQLabel(i18n("Subject:"), _x509Frame), 1, 0);
+grid->addWidget(new TQLabel(i18n("Issued by:"), _x509Frame), 1, 3);
+_ca_subject = KSSLInfoDlg::certInfoWidget(_x509Frame, TQString(""));
+_ca_issuer = KSSLInfoDlg::certInfoWidget(_x509Frame, TQString(""));
grid->addMultiCellWidget(_ca_subject, 2, 5, 0, 2);
grid->addMultiCellWidget(_ca_issuer, 2, 5, 3, 5);
-grid->addWidget(new QLabel(i18n("File:"), _x509Frame), 6, 0);
-_ca_filenameLabel = new QLabel("", _x509Frame);
+grid->addWidget(new TQLabel(i18n("File:"), _x509Frame), 6, 0);
+_ca_filenameLabel = new TQLabel("", _x509Frame);
grid->addWidget(_ca_filenameLabel, 6, 1);
-grid->addWidget(new QLabel(i18n("File format:"), _x509Frame), 6, 3);
-grid->addWidget(new QLabel("PEM or DER Encoded X.509", _x509Frame), 6, 4);
+grid->addWidget(new TQLabel(i18n("File format:"), _x509Frame), 6, 3);
+grid->addWidget(new TQLabel("PEM or DER Encoded X.509", _x509Frame), 6, 4);
//
// Make the first tab
//
-_tabs = new QTabWidget(_x509Frame);
+_tabs = new TQTabWidget(_x509Frame);
grid->addMultiCellWidget(_tabs, 7, 11, 0, 5);
-tab = new QFrame(_x509Frame);
-tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+tab = new TQFrame(_x509Frame);
+tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("State:"), tab), 0, 0);
-_ca_certState = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("State:"), tab), 0, 0);
+_ca_certState = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_ca_certState, 0, 0, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Valid from:"), tab), 1, 0);
-_ca_validFrom = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Valid from:"), tab), 1, 0);
+_ca_validFrom = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_ca_validFrom, 1, 1, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Valid until:"), tab), 2, 0);
-_ca_validUntil = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Valid until:"), tab), 2, 0);
+_ca_validUntil = new TQLabel("", tab);
tabGrid->addMultiCellWidget(_ca_validUntil, 2, 2, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Serial number:"), tab), 3, 0);
-_ca_serialNum = new QLabel("", tab);
+tabGrid->addWidget(new TQLabel(i18n("Serial number:"), tab), 3, 0);
+_ca_serialNum = new TQLabel("", tab);
tabGrid->addWidget(_ca_serialNum, 3, 1);
_tabs->addTab(tab, i18n("State"));
@@ -317,14 +317,14 @@ _tabs->addTab(tab, i18n("State"));
//
// Make the second tab
//
-tab = new QFrame(_x509Frame);
-tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+tab = new TQFrame(_x509Frame);
+tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("MD5 digest:"), tab), 0, 0);
-_ca_digest = new QLabel(tab);
+tabGrid->addWidget(new TQLabel(i18n("MD5 digest:"), tab), 0, 0);
+_ca_digest = new TQLabel(tab);
tabGrid->addMultiCellWidget(_ca_digest, 0, 0, 1, 4);
-tabGrid->addWidget(new QLabel(i18n("Signature:"), tab), 1, 0);
-_ca_sig = new QMultiLineEdit(tab);
+tabGrid->addWidget(new TQLabel(i18n("Signature:"), tab), 1, 0);
+_ca_sig = new TQMultiLineEdit(tab);
tabGrid->addMultiCellWidget(_ca_sig, 1, 3, 1, 4);
_ca_sig->setReadOnly(true);
@@ -334,11 +334,11 @@ _tabs->addTab(tab, i18n("Signature"));
//
// Make the third tab
//
-tab = new QFrame(_x509Frame);
-tabGrid = new QGridLayout(tab, 4, 5, KDialog::marginHint(),
+tab = new TQFrame(_x509Frame);
+tabGrid = new TQGridLayout(tab, 4, 5, KDialog::marginHint(),
KDialog::spacingHint() );
-tabGrid->addWidget(new QLabel(i18n("Public key:"), tab), 0, 0);
-_ca_pubkey = new QMultiLineEdit(tab);
+tabGrid->addWidget(new TQLabel(i18n("Public key:"), tab), 0, 0);
+_ca_pubkey = new TQMultiLineEdit(tab);
tabGrid->addMultiCellWidget(_ca_pubkey, 0, 3, 1, 4);
_ca_pubkey->setReadOnly(true);
@@ -353,10 +353,10 @@ _x509Frame->hide();
//------------------------------------------------------------------------
// The blank widget
//------------------------------------------------------------------------
-_blankFrame = new QFrame(_frame);
-grid = new QGridLayout(_blankFrame, 1, 1, KDialog::marginHint(),
+_blankFrame = new TQFrame(_frame);
+grid = new TQGridLayout(_blankFrame, 1, 1, KDialog::marginHint(),
KDialog::spacingHint() );
-grid->addMultiCellWidget(new QLabel(i18n("KDE Secure Certificate Import"), _blankFrame), 0, 0, 0, 0);
+grid->addMultiCellWidget(new TQLabel(i18n("KDE Secure Certificate Import"), _blankFrame), 0, 0, 0, 0);
_blankFrame->show();
@@ -365,18 +365,18 @@ _blankFrame->show();
// Finish it off
//
_baseGrid->addMultiCellWidget(new KSeparator(KSeparator::HLine, _frame), 13, 13, 2, 8);
-_launch = new QPushButton(i18n("&Crypto Manager..."), _frame);
-_import = new QPushButton(i18n("&Import"), _frame);
-_save = new QPushButton(i18n("&Save..."), _frame);
-_done = new QPushButton(i18n("&Done"), _frame);
+_launch = new TQPushButton(i18n("&Crypto Manager..."), _frame);
+_import = new TQPushButton(i18n("&Import"), _frame);
+_save = new TQPushButton(i18n("&Save..."), _frame);
+_done = new TQPushButton(i18n("&Done"), _frame);
_baseGrid->addMultiCellWidget(_launch, 14, 14, 4, 5);
_baseGrid->addWidget(_import, 14, 6);
_baseGrid->addWidget(_save, 14, 7);
_baseGrid->addWidget(_done, 14, 8);
-connect(_launch, SIGNAL(clicked()), SLOT(slotLaunch()));
-connect(_import, SIGNAL(clicked()), SLOT(slotImport()));
-connect(_save, SIGNAL(clicked()), SLOT(slotSave()));
-connect(_done, SIGNAL(clicked()), SLOT(slotDone()));
+connect(_launch, TQT_SIGNAL(clicked()), TQT_SLOT(slotLaunch()));
+connect(_import, TQT_SIGNAL(clicked()), TQT_SLOT(slotImport()));
+connect(_save, TQT_SIGNAL(clicked()), TQT_SLOT(slotSave()));
+connect(_done, TQT_SIGNAL(clicked()), TQT_SLOT(slotDone()));
_import->setEnabled(false);
_save->setEnabled(false);
@@ -386,8 +386,8 @@ _baseGrid->addMultiCellWidget(_pkcsFrame, 0, 12, 2, 8);
_baseGrid->addMultiCellWidget(_x509Frame, 0, 12, 2, 8);
_baseGrid->addMultiCellWidget(_blankFrame, 0, 12, 2, 8);
-connect(_sideList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotSelectionChanged(QListViewItem*)));
+connect(_sideList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
setReadWrite(true);
}
@@ -410,7 +410,7 @@ void KCertPart::setReadWrite(bool rw) {
bool KCertPart::saveFile() {
if (_p12) {
- QString certFile = KFileDialog::getSaveFileName(QString::null, "application/x-pkcs12");
+ TQString certFile = KFileDialog::getSaveFileName(TQString::null, "application/x-pkcs12");
if (certFile.isEmpty())
return false;
@@ -421,11 +421,11 @@ if (_p12) {
return true;
} else if (_ca) {
- QString certFile = KFileDialog::getSaveFileName(QString::null, "application/x-x509-ca-cert");
+ TQString certFile = KFileDialog::getSaveFileName(TQString::null, "application/x-x509-ca-cert");
if (certFile.isEmpty())
return false;
- QByteArray enc;
+ TQByteArray enc;
if (certFile.endsWith("der") || certFile.endsWith("crt")) {
enc = _ca->toDer();
} else if (certFile.endsWith("netscape")) {
@@ -434,7 +434,7 @@ if (_p12) {
enc = _ca->toPem();
}
- QFile of(certFile);
+ TQFile of(certFile);
if (!of.open(IO_WriteOnly) || (unsigned)of.writeBlock(enc) != enc.size()) {
KMessageBox::sorry(_frame, i18n("Save failed."), i18n("Certificate Import"));
@@ -456,18 +456,18 @@ bool KCertPart::openFile() {
return false;
#else
-if (QFileInfo(m_file).size() == 0) {
+if (TQFileInfo(m_file).size() == 0) {
KMessageBox::sorry(_frame, i18n("Certificate file is empty."), i18n("Certificate Import"));
return false;
}
-QString whatType = d->browserExtension->urlArgs().serviceType;
+TQString whatType = d->browserExtension->urlArgs().serviceType;
//whatType = KMimeType::findByURL(m_url,0,true)->name();
if (whatType.isEmpty())
whatType = KServiceTypeFactory::self()->findFromPattern(m_file)->name();
/*
- QString blah = "file: " + m_file
+ TQString blah = "file: " + m_file
+ "\nurl: " + m_url.url()
+ "\nserviceType: " + d->browserExtension->urlArgs().serviceType
+ "\nfactory: " + KServiceTypeFactory::self()->findFromPattern(m_file)->name()
@@ -482,7 +482,7 @@ emit completed();
// x-pkcs12 loading
/////////////////////////////////////////////////////////////////////////////
if (whatType == "application/x-pkcs12") {
- QCString pass;
+ TQCString pass;
_p12 = KSSLPKCS12::loadCertFile(m_file);
while (!_p12) {
@@ -490,7 +490,7 @@ if (whatType == "application/x-pkcs12") {
int rc = KPasswordDialog::getPassword(pass, i18n("Certificate Password"));
if (rc != KPasswordDialog::Accepted) break;
- _p12 = KSSLPKCS12::loadCertFile(m_file, QString(pass));
+ _p12 = KSSLPKCS12::loadCertFile(m_file, TQString(pass));
if (!_p12) {
rc = KMessageBox::warningContinueCancel(_frame, i18n("The certificate file could not be loaded. Try a different password?"), i18n("Certificate Import"),i18n("Try Different"));
@@ -517,14 +517,14 @@ if (whatType == "application/x-pkcs12") {
///////////// UGLY HACK TO GET AROUND OPENSSL PROBLEMS ///////////
if (whatType == "application/x-x509-ca-cert") {
// Check if it is PEM or not
- QFile qf(m_file);
+ TQFile qf(m_file);
qf.open(IO_ReadOnly);
- QByteArray theFile = qf.readAll();
+ TQByteArray theFile = qf.readAll();
qf.close();
const char *signature = "-----BEGIN CERTIFICATE-----";
theFile[(uint)(qf.size()-1)] = 0;
- isPEM = (QCString(theFile.data()).find(signature) >= 0);
+ isPEM = (TQCString(theFile.data()).find(signature) >= 0);
}
fp = fopen(m_file.local8Bit(), "r");
@@ -596,7 +596,7 @@ if (whatType == "application/x-pkcs12") {
// Dunno how to load this
/////////////////////////////////////////////////////////////////////////////
} else {
- QString emsg = i18n("I do not know how to handle this type of file.") + "\n" + whatType;
+ TQString emsg = i18n("I do not know how to handle this type of file.") + "\n" + whatType;
KMessageBox::sorry(_frame, emsg, i18n("Certificate Import"));
return false;
}
@@ -612,14 +612,14 @@ void KCertPart::displayPKCS12() {
// Set the chain if it's there
if (xc->chain().depth() > 1) {
- QPtrList<KSSLCertificate> cl = xc->chain().getChain();
+ TQPtrList<KSSLCertificate> cl = xc->chain().getChain();
int cnt = 0;
_p12_chain->setEnabled(true);
_p12_chain->clear();
_p12_chain->insertItem(i18n("0 - Site Certificate"));
for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) {
KSSLX509Map map(c->getSubject());
- _p12_chain->insertItem(QString::number(++cnt)+" - "+map.getValue("CN"));
+ _p12_chain->insertItem(TQString::number(++cnt)+" - "+map.getValue("CN"));
}
_p12_chain->setCurrentItem(0);
} else {
@@ -635,20 +635,20 @@ void KCertPart::displayCACert(KSSLCertificate *c) {
_ca_issuer->setValues(c->getIssuer());
// Set the valid period
- QPalette cspl = _ca_validFrom->palette();
- if (QDateTime::currentDateTime() < c->getQDTNotBefore()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ TQPalette cspl = _ca_validFrom->palette();
+ if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) {
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_ca_validFrom->setPalette(cspl);
_ca_validFrom->setText(c->getNotBefore());
cspl = _ca_validUntil->palette();
- if (QDateTime::currentDateTime() > c->getQDTNotAfter()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) {
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_ca_validUntil->setPalette(cspl);
_ca_validUntil->setText(c->getNotAfter());
@@ -656,9 +656,9 @@ void KCertPart::displayCACert(KSSLCertificate *c) {
_ca_serialNum->setText(c->getSerialNumber());
cspl = _ca_certState->palette();
if (!c->isValid()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_ca_certState->setPalette(cspl);
_ca_certState->setText(KSSLCertificate::verifyText(c->validate()));
@@ -676,20 +676,20 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) {
_p12_issuer->setValues(c->getIssuer());
// Set the valid period
- QPalette cspl = _p12_validFrom->palette();
- if (QDateTime::currentDateTime() < c->getQDTNotBefore()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ TQPalette cspl = _p12_validFrom->palette();
+ if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) {
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_p12_validFrom->setPalette(cspl);
_p12_validFrom->setText(c->getNotBefore());
cspl = _p12_validUntil->palette();
- if (QDateTime::currentDateTime() > c->getQDTNotAfter()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) {
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_p12_validUntil->setPalette(cspl);
_p12_validUntil->setText(c->getNotAfter());
@@ -697,9 +697,9 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) {
_p12_serialNum->setText(c->getSerialNumber());
cspl = _p12_certState->palette();
if (!c->isValid()) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
}
_p12_certState->setPalette(cspl);
_p12_certState->setText(KSSLCertificate::verifyText(c->validate()));
@@ -726,7 +726,7 @@ void KCertPart::slotImport() {
KSimpleConfig cfg("ksslcertificates", false);
if (cfg.hasGroup(_p12->getCertificate()->getSubject())) {
- QString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?");
+ TQString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?");
int rc= KMessageBox::warningContinueCancel(_frame, msg, i18n("Certificate Import"),i18n("Replace"));
if (rc == KMessageBox::Cancel) {
return;
@@ -742,7 +742,7 @@ void KCertPart::slotImport() {
} else if (_ca) {
KConfig cfg("ksslcalist", true, false);
if (cfg.hasGroup(_ca->getSubject())) {
- QString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?");
+ TQString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?");
int rc= KMessageBox::warningContinueCancel(_frame, msg, i18n("Certificate Import"),i18n("Replace"));
if (rc == KMessageBox::Cancel) {
return;
@@ -779,7 +779,7 @@ p.start(KProcess::DontCare);
}
-void KCertPart::slotSelectionChanged(QListViewItem *x) {
+void KCertPart::slotSelectionChanged(TQListViewItem *x) {
KX509Item *x5i = dynamic_cast<KX509Item*>(x);
KPKCS12Item *p12i = dynamic_cast<KPKCS12Item*>(x);
_p12 = NULL;
@@ -837,7 +837,7 @@ void KCertPart::slotSelectionChanged(QListViewItem *x) {
void KCertPart::slotImportAll() {
KSSLPKCS12 *p12Save = _p12;
KSSLCertificate *caSave = _ca;
-QString curNameSave = _curName;
+TQString curNameSave = _curName;
_p12 = NULL;
_ca = NULL;
diff --git a/kcert/kcertpart.h b/kcert/kcertpart.h
index 59dab9fa1..64bcecadc 100644
--- a/kcert/kcertpart.h
+++ b/kcert/kcertpart.h
@@ -25,8 +25,8 @@
#endif
#include <kparts/part.h>
-#include <qptrlist.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqlistview.h>
#include <klistview.h>
class KSSLCertBox;
@@ -52,7 +52,7 @@ class KX509Item : public KListViewItem {
~KX509Item();
virtual int rtti() const { return 1; }
KSSLCertificate *cert;
- QString _prettyName;
+ TQString _prettyName;
};
@@ -61,16 +61,16 @@ class KPKCS12Item : public KListViewItem {
KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x);
~KPKCS12Item();
KSSLPKCS12 *cert;
- QString _prettyName;
+ TQString _prettyName;
};
class KCertPart : public KParts::ReadWritePart {
Q_OBJECT
public:
- KCertPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent = 0L, const char *name = 0L,
- const QStringList &args = QStringList() );
+ KCertPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent = 0L, const char *name = 0L,
+ const TQStringList &args = TQStringList() );
virtual ~KCertPart();
virtual void setReadWrite(bool readwrite);
@@ -83,7 +83,7 @@ protected slots:
void slotSave();
void slotDone();
void slotLaunch();
- void slotSelectionChanged(QListViewItem *x);
+ void slotSelectionChanged(TQListViewItem *x);
void slotImportAll();
protected:
@@ -96,35 +96,35 @@ protected:
KListView *_sideList;
KListViewItem *_parentCA, *_parentP12;
- QFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame;
+ TQFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame;
// for the PKCS12 widget
- QLabel *_p12_filenameLabel, *_p12_validFrom, *_p12_validUntil,
+ TQLabel *_p12_filenameLabel, *_p12_validFrom, *_p12_validUntil,
*_p12_serialNum, *_p12_certState;
- QLabel *_p12_digest;
+ TQLabel *_p12_digest;
KComboBox *_p12_chain;
- QMultiLineEdit *_p12_pubkey, *_p12_sig;
+ TQMultiLineEdit *_p12_pubkey, *_p12_sig;
KSSLCertBox *_p12_subject, *_p12_issuer;
// for the CA widget
- QLabel *_ca_filenameLabel, *_ca_validFrom, *_ca_validUntil,
+ TQLabel *_ca_filenameLabel, *_ca_validFrom, *_ca_validUntil,
*_ca_serialNum, *_ca_certState;
- QLabel *_ca_digest;
- QMultiLineEdit *_ca_pubkey, *_ca_sig;
+ TQLabel *_ca_digest;
+ TQMultiLineEdit *_ca_pubkey, *_ca_sig;
KSSLCertBox *_ca_subject, *_ca_issuer;
// The rest
KInstance *_instance;
- QButton *_import, *_save, *_done, *_launch, *_importAll;
+ TQButton *_import, *_save, *_done, *_launch, *_importAll;
// Store the pointer to the current item
KSSLPKCS12 *_p12;
KSSLCertificate *_ca;
- QTabWidget *_tabs;
- QGridLayout *_baseGrid;
+ TQTabWidget *_tabs;
+ TQGridLayout *_baseGrid;
KSSLSigners *_signers;
bool _silentImport;
- QString _curName;
+ TQString _curName;
private:
KCertPartPrivate *d;
diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp
index e1b03d1e7..edd48f911 100644
--- a/kcmshell/main.cpp
+++ b/kcmshell/main.cpp
@@ -21,8 +21,8 @@
#include <iostream>
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <qxembed.h>
@@ -62,7 +62,7 @@ static KCmdLineOptions options[] =
KCmdLineLastOption
};
-static void listModules(const QString &baseGroup)
+static void listModules(const TQString &baseGroup)
{
KServiceGroup::Ptr group = KServiceGroup::group(baseGroup);
@@ -88,9 +88,9 @@ static void listModules(const QString &baseGroup)
}
}
-static KService::Ptr locateModule(const QCString& module)
+static KService::Ptr locateModule(const TQCString& module)
{
- QString path = QFile::decodeName(module);
+ TQString path = TQFile::decodeName(module);
if (!path.endsWith(".desktop"))
path += ".desktop";
@@ -126,12 +126,12 @@ bool KCMShell::isRunning()
dcopClient()->attach(); // Reregister as anonymous
dcopClient()->setNotifications(true);
- QByteArray data;
- QDataStream str( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream str( data, IO_WriteOnly );
str << kapp->startupId();
- QCString replyType;
- QByteArray replyData;
- if (!dcopClient()->call(m_dcopName, "dialog", "activate(QCString)",
+ TQCString replyType;
+ TQByteArray replyData;
+ if (!dcopClient()->call(m_dcopName, "dialog", "activate(TQCString)",
data, replyType, replyData))
{
kdDebug(780) << "Calling DCOP function dialog::activate() failed." << endl;
@@ -141,21 +141,21 @@ bool KCMShell::isRunning()
return true;
}
-KCMShellMultiDialog::KCMShellMultiDialog( int dialogFace, const QString& caption,
- QWidget *parent, const char *name, bool modal)
+KCMShellMultiDialog::KCMShellMultiDialog( int dialogFace, const TQString& caption,
+ TQWidget *parent, const char *name, bool modal)
: KCMultiDialog( dialogFace, caption, parent, name, modal ),
DCOPObject("dialog")
{
}
-void KCMShellMultiDialog::activate( QCString asn_id )
+void KCMShellMultiDialog::activate( TQCString asn_id )
{
kdDebug(780) << k_funcinfo << endl;
KStartupInfo::setNewStartupId( this, asn_id );
}
-void KCMShell::setDCOPName(const QCString &dcopName, bool rootMode )
+void KCMShell::setDCOPName(const TQCString &dcopName, bool rootMode )
{
m_dcopName = "kcmshell_";
if( rootMode )
@@ -170,12 +170,12 @@ void KCMShell::waitForExit()
{
kdDebug(780) << k_funcinfo << endl;
- connect(dcopClient(), SIGNAL(applicationRemoved(const QCString&)),
- SLOT( appExit(const QCString&) ));
+ connect(dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)),
+ TQT_SLOT( appExit(const TQCString&) ));
exec();
}
-void KCMShell::appExit(const QCString &appId)
+void KCMShell::appExit(const TQCString &appId)
{
kdDebug(780) << k_funcinfo << endl;
@@ -186,10 +186,10 @@ void KCMShell::appExit(const QCString &appId)
}
}
-static void setIcon(QWidget *w, const QString &iconName)
+static void setIcon(TQWidget *w, const TQString &iconName)
{
- QPixmap icon = DesktopIcon(iconName);
- QPixmap miniIcon = SmallIcon(iconName);
+ TQPixmap icon = DesktopIcon(iconName);
+ TQPixmap miniIcon = SmallIcon(iconName);
w->setIcon( icon ); //standard X11
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
KWin::setIcons(w->winId(), icon, miniIcon );
@@ -219,7 +219,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[])
const KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- const QCString lang = args->getOption("lang");
+ const TQCString lang = args->getOption("lang");
if( !lang.isNull() )
KGlobal::locale()->setLanguage(lang);
@@ -240,7 +240,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[])
for( KService::List::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it)
{
- QString entry("%1 - %2");
+ TQString entry("%1 - %2");
entry = entry.arg((*it)->desktopEntryName().leftJustify(maxLen, ' '))
.arg(!(*it)->comment().isEmpty() ? (*it)->comment()
@@ -257,7 +257,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[])
return -1;
}
- QCString dcopName;
+ TQCString dcopName;
KService::List modules;
for (int i = 0; i < args->count(); i++)
{
diff --git a/kcmshell/main.h b/kcmshell/main.h
index 6b4c944ee..6a7c34ee7 100644
--- a/kcmshell/main.h
+++ b/kcmshell/main.h
@@ -43,7 +43,7 @@ public:
* @param dcopName name to set the DCOP name to
* @param rootMode true if the kcmshell is embedding
*/
- void setDCOPName(const QCString &dcopName, bool rootMode );
+ void setDCOPName(const TQCString &dcopName, bool rootMode );
/**
* Waits until the last instance of kcmshell with the same
@@ -60,7 +60,7 @@ private slots:
/**
*/
- void appExit( const QCString &appId );
+ void appExit( const TQCString &appId );
private:
@@ -68,7 +68,7 @@ private:
* The DCOP name which actually is registered.
* For example "kcmshell_mouse".
*/
- QCString m_dcopName;
+ TQCString m_dcopName;
};
@@ -88,14 +88,14 @@ public:
/**
*/
- KCMShellMultiDialog( int dialogFace, const QString& caption,
- QWidget *parent=0, const char *name=0, bool modal=false);
+ KCMShellMultiDialog( int dialogFace, const TQString& caption,
+ TQWidget *parent=0, const char *name=0, bool modal=false);
k_dcop:
/**
*/
- virtual void activate( QCString asn_id );
+ virtual void activate( TQCString asn_id );
};
diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp
index 7bd9480a1..a3a165ab8 100644
--- a/kconf_update/kconf_update.cpp
+++ b/kconf_update/kconf_update.cpp
@@ -25,8 +25,8 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kconfig.h>
#include <ksimpleconfig.h>
@@ -51,57 +51,57 @@ class KonfUpdate
public:
KonfUpdate();
~KonfUpdate();
- QStringList findUpdateFiles(bool dirtyOnly);
+ TQStringList findUpdateFiles(bool dirtyOnly);
- QTextStream &log();
+ TQTextStream &log();
- bool checkFile(const QString &filename);
- void checkGotFile(const QString &_file, const QString &id);
+ bool checkFile(const TQString &filename);
+ void checkGotFile(const TQString &_file, const TQString &id);
- bool updateFile(const QString &filename);
+ bool updateFile(const TQString &filename);
- void gotId(const QString &_id);
- void gotFile(const QString &_file);
- void gotGroup(const QString &_group);
- void gotRemoveGroup(const QString &_group);
- void gotKey(const QString &_key);
- void gotRemoveKey(const QString &_key);
+ void gotId(const TQString &_id);
+ void gotFile(const TQString &_file);
+ void gotGroup(const TQString &_group);
+ void gotRemoveGroup(const TQString &_group);
+ void gotKey(const TQString &_key);
+ void gotRemoveKey(const TQString &_key);
void gotAllKeys();
void gotAllGroups();
- void gotOptions(const QString &_options);
- void gotScript(const QString &_script);
- void gotScriptArguments(const QString &_arguments);
+ void gotOptions(const TQString &_options);
+ void gotScript(const TQString &_script);
+ void gotScriptArguments(const TQString &_arguments);
void resetOptions();
- void copyGroup(KConfigBase *cfg1, const QString &grp1,
- KConfigBase *cfg2, const QString &grp2);
+ void copyGroup(KConfigBase *cfg1, const TQString &grp1,
+ KConfigBase *cfg2, const TQString &grp2);
protected:
KConfig *config;
- QString currentFilename;
+ TQString currentFilename;
bool skip;
bool debug;
- QString id;
+ TQString id;
- QString oldFile;
- QString newFile;
- QString newFileName;
+ TQString oldFile;
+ TQString newFile;
+ TQString newFileName;
KConfig *oldConfig1; // Config to read keys from.
KConfig *oldConfig2; // Config to delete keys from.
KConfig *newConfig;
- QString oldGroup;
- QString newGroup;
- QString oldKey;
- QString newKey;
+ TQString oldGroup;
+ TQString newGroup;
+ TQString oldKey;
+ TQString newKey;
bool m_bCopy;
bool m_bOverwrite;
bool m_bUseConfigInfo;
- QString m_arguments;
- QTextStream *m_textStream;
- QFile *m_file;
- QString m_line;
+ TQString m_arguments;
+ TQTextStream *m_textStream;
+ TQFile *m_file;
+ TQString m_line;
int m_lineCount;
};
@@ -115,7 +115,7 @@ KonfUpdate::KonfUpdate()
config = new KConfig("kconf_updaterc");
- QStringList updateFiles;
+ TQStringList updateFiles;
KCmdLineArgs *args=KCmdLineArgs::parsedArgs();
debug = args->isSet("debug");
@@ -124,11 +124,11 @@ KonfUpdate::KonfUpdate()
if (args->isSet("check"))
{
m_bUseConfigInfo = true;
- QString file = locate("data", "kconf_update/"+QFile::decodeName(args->getOption("check")));
+ TQString file = locate("data", "kconf_update/"+TQFile::decodeName(args->getOption("check")));
if (file.isEmpty())
{
qWarning("File '%s' not found.", args->getOption("check").data());
- log() << "File '" << QFile::decodeName(args->getOption("check")) << "' passed on command line not found" << endl;
+ log() << "File '" << TQFile::decodeName(args->getOption("check")) << "' passed on command line not found" << endl;
return;
}
updateFiles.append(file);
@@ -151,25 +151,25 @@ KonfUpdate::KonfUpdate()
updateAll = true;
}
- for(QStringList::ConstIterator it = updateFiles.begin();
+ for(TQStringList::ConstIterator it = updateFiles.begin();
it != updateFiles.end();
++it)
{
- QString file = *it;
+ TQString file = *it;
updateFile(file);
}
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
if (updateAll && !config->readBoolEntry("updateInfoAdded", false))
{
config->writeEntry("updateInfoAdded", true);
updateFiles = findUpdateFiles(false);
- for(QStringList::ConstIterator it = updateFiles.begin();
+ for(TQStringList::ConstIterator it = updateFiles.begin();
it != updateFiles.end();
++it)
{
- QString file = *it;
+ TQString file = *it;
checkFile(file);
}
updateFiles.clear();
@@ -183,40 +183,40 @@ KonfUpdate::~KonfUpdate()
delete m_textStream;
}
-QTextStream &
+TQTextStream &
KonfUpdate::log()
{
if (!m_textStream)
{
- QString file = locateLocal("data", "kconf_update/log/update.log");
- m_file = new QFile(file);
+ TQString file = locateLocal("data", "kconf_update/log/update.log");
+ m_file = new TQFile(file);
if (m_file->open(IO_WriteOnly | IO_Append))
{
- m_textStream = new QTextStream(m_file);
+ m_textStream = new TQTextStream(m_file);
}
else
{
// Error
- m_textStream = new QTextStream(stderr, IO_WriteOnly);
+ m_textStream = new TQTextStream(stderr, IO_WriteOnly);
}
}
- (*m_textStream) << QDateTime::currentDateTime().toString( Qt::ISODate ) << " ";
+ (*m_textStream) << TQDateTime::currentDateTime().toString( Qt::ISODate ) << " ";
return *m_textStream;
}
-QStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
+TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
{
- QStringList result;
- QStringList list = KGlobal::dirs()->findAllResources("data", "kconf_update/*.upd", false, true);
- for(QStringList::ConstIterator it = list.begin();
+ TQStringList result;
+ TQStringList list = KGlobal::dirs()->findAllResources("data", "kconf_update/*.upd", false, true);
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end();
++it)
{
- QString file = *it;
+ TQString file = *it;
struct stat buff;
- if (stat( QFile::encodeName(file), &buff) == 0)
+ if (stat( TQFile::encodeName(file), &buff) == 0)
{
int i = file.findRev('/');
if (i != -1)
@@ -234,25 +234,25 @@ QStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
return result;
}
-bool KonfUpdate::checkFile(const QString &filename)
+bool KonfUpdate::checkFile(const TQString &filename)
{
currentFilename = filename;
int i = currentFilename.findRev('/');
if (i != -1)
currentFilename = currentFilename.mid(i+1);
skip = true;
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly))
return false;
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::Latin1);
int lineCount = 0;
resetOptions();
- QString id;
+ TQString id;
while(!ts.atEnd())
{
- QString line = ts.readLine().stripWhiteSpace();
+ TQString line = ts.readLine().stripWhiteSpace();
lineCount++;
if (line.isEmpty() || (line[0] == '#'))
continue;
@@ -265,9 +265,9 @@ bool KonfUpdate::checkFile(const QString &filename)
return true;
}
-void KonfUpdate::checkGotFile(const QString &_file, const QString &id)
+void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
{
- QString file;
+ TQString file;
int i = _file.find(',');
if (i == -1)
{
@@ -282,7 +282,7 @@ void KonfUpdate::checkGotFile(const QString &_file, const QString &id)
KSimpleConfig cfg(file);
cfg.setGroup("$Version");
- QStringList ids = cfg.readListEntry("update_info");
+ TQStringList ids = cfg.readListEntry("update_info");
if (ids.contains(id))
return;
ids.append(id);
@@ -308,21 +308,21 @@ void KonfUpdate::checkGotFile(const QString &_file, const QString &id)
* Sequence:
* (Id,(File(Group,Keys)*)*)*
**/
-bool KonfUpdate::updateFile(const QString &filename)
+bool KonfUpdate::updateFile(const TQString &filename)
{
currentFilename = filename;
int i = currentFilename.findRev('/');
if (i != -1)
currentFilename = currentFilename.mid(i+1);
skip = true;
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly))
return false;
log() << "Checking update-file '" << filename << "' for new updates" << endl;
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::Latin1);
m_lineCount = 0;
resetOptions();
while(!ts.atEnd())
@@ -379,10 +379,10 @@ bool KonfUpdate::updateFile(const QString &filename)
}
}
// Flush.
- gotId(QString::null);
+ gotId(TQString::null);
struct stat buff;
- stat( QFile::encodeName(filename), &buff);
+ stat( TQFile::encodeName(filename), &buff);
config->setGroup(currentFilename);
config->writeEntry("ctime", buff.st_ctime);
config->writeEntry("mtime", buff.st_mtime);
@@ -392,12 +392,12 @@ bool KonfUpdate::updateFile(const QString &filename)
-void KonfUpdate::gotId(const QString &_id)
+void KonfUpdate::gotId(const TQString &_id)
{
if (!id.isEmpty() && !skip)
{
config->setGroup(currentFilename);
- QStringList ids = config->readListEntry("done");
+ TQStringList ids = config->readListEntry("done");
if (!ids.contains(id))
{
ids.append(id);
@@ -407,10 +407,10 @@ void KonfUpdate::gotId(const QString &_id)
}
// Flush pending changes
- gotFile(QString::null);
+ gotFile(TQString::null);
config->setGroup(currentFilename);
- QStringList ids = config->readListEntry("done");
+ TQStringList ids = config->readListEntry("done");
if (!_id.isEmpty())
{
if (ids.contains(_id))
@@ -431,10 +431,10 @@ void KonfUpdate::gotId(const QString &_id)
}
}
-void KonfUpdate::gotFile(const QString &_file)
+void KonfUpdate::gotFile(const TQString &_file)
{
// Reset group
- gotGroup(QString::null);
+ gotGroup(TQString::null);
if (!oldFile.isEmpty())
{
@@ -443,8 +443,8 @@ void KonfUpdate::gotFile(const QString &_file)
oldConfig1 = 0;
oldConfig2->setGroup("$Version");
- QStringList ids = oldConfig2->readListEntry("update_info");
- QString cfg_id = currentFilename + ":" + id;
+ TQStringList ids = oldConfig2->readListEntry("update_info");
+ TQString cfg_id = currentFilename + ":" + id;
if (!ids.contains(cfg_id) && !skip)
{
ids.append(cfg_id);
@@ -454,25 +454,25 @@ void KonfUpdate::gotFile(const QString &_file)
delete oldConfig2;
oldConfig2 = 0;
- QString file = locateLocal("config", oldFile);
+ TQString file = locateLocal("config", oldFile);
struct stat s_buf;
- if (stat(QFile::encodeName(file), &s_buf) == 0)
+ if (stat(TQFile::encodeName(file), &s_buf) == 0)
{
if (s_buf.st_size == 0)
{
// Delete empty file.
- unlink(QFile::encodeName(file));
+ unlink(TQFile::encodeName(file));
}
}
- oldFile = QString::null;
+ oldFile = TQString::null;
}
if (!newFile.isEmpty())
{
// Close new file.
newConfig->setGroup("$Version");
- QStringList ids = newConfig->readListEntry("update_info");
- QString cfg_id = currentFilename + ":" + id;
+ TQStringList ids = newConfig->readListEntry("update_info");
+ TQString cfg_id = currentFilename + ":" + id;
if (!ids.contains(cfg_id) && !skip)
{
ids.append(cfg_id);
@@ -482,7 +482,7 @@ void KonfUpdate::gotFile(const QString &_file)
delete newConfig;
newConfig = 0;
- newFile = QString::null;
+ newFile = TQString::null;
}
newConfig = 0;
@@ -496,19 +496,19 @@ void KonfUpdate::gotFile(const QString &_file)
oldFile = _file.left(i).stripWhiteSpace();
newFile = _file.mid(i+1).stripWhiteSpace();
if (oldFile == newFile)
- newFile = QString::null;
+ newFile = TQString::null;
}
if (!oldFile.isEmpty())
{
oldConfig2 = new KConfig(oldFile, false, false);
- QString cfg_id = currentFilename + ":" + id;
+ TQString cfg_id = currentFilename + ":" + id;
oldConfig2->setGroup("$Version");
- QStringList ids = oldConfig2->readListEntry("update_info");
+ TQStringList ids = oldConfig2->readListEntry("update_info");
if (ids.contains(cfg_id))
{
skip = true;
- newFile = QString::null;
+ newFile = TQString::null;
log() << currentFilename << ": Skipping update '" << id << "'" << endl;
}
@@ -532,14 +532,14 @@ void KonfUpdate::gotFile(const QString &_file)
}
else
{
- newFile = QString::null;
+ newFile = TQString::null;
}
newFileName = newFile;
if (newFileName.isEmpty())
newFileName = oldFile;
}
-void KonfUpdate::gotGroup(const QString &_group)
+void KonfUpdate::gotGroup(const TQString &_group)
{
int i = _group.find(',');
if (i == -1)
@@ -554,7 +554,7 @@ void KonfUpdate::gotGroup(const QString &_group)
}
}
-void KonfUpdate::gotRemoveGroup(const QString &_group)
+void KonfUpdate::gotRemoveGroup(const TQString &_group)
{
oldGroup = _group.stripWhiteSpace();
@@ -572,7 +572,7 @@ void KonfUpdate::gotRemoveGroup(const QString &_group)
}
-void KonfUpdate::gotKey(const QString &_key)
+void KonfUpdate::gotKey(const TQString &_key)
{
int i = _key.find(',');
if (i == -1)
@@ -599,7 +599,7 @@ void KonfUpdate::gotKey(const QString &_key)
oldConfig1->setGroup(oldGroup);
if (!oldConfig1->hasKey(oldKey))
return;
- QString value = oldConfig1->readEntry(oldKey);
+ TQString value = oldConfig1->readEntry(oldKey);
newConfig->setGroup(newGroup);
if (!m_bOverwrite && newConfig->hasKey(newKey))
{
@@ -625,7 +625,7 @@ void KonfUpdate::gotKey(const QString &_key)
}
}
-void KonfUpdate::gotRemoveKey(const QString &_key)
+void KonfUpdate::gotRemoveKey(const TQString &_key)
{
oldKey = _key.stripWhiteSpace();
@@ -662,8 +662,8 @@ void KonfUpdate::gotAllKeys()
return;
}
- QMap<QString, QString> list = oldConfig1->entryMap(oldGroup);
- for(QMap<QString, QString>::Iterator it = list.begin();
+ TQMap<TQString, TQString> list = oldConfig1->entryMap(oldGroup);
+ for(TQMap<TQString, TQString>::Iterator it = list.begin();
it != list.end(); ++it)
{
gotKey(it.key());
@@ -678,8 +678,8 @@ void KonfUpdate::gotAllGroups()
return;
}
- QStringList allGroups = oldConfig1->groupList();
- for(QStringList::ConstIterator it = allGroups.begin();
+ TQStringList allGroups = oldConfig1->groupList();
+ for(TQStringList::ConstIterator it = allGroups.begin();
it != allGroups.end(); ++it)
{
oldGroup = *it;
@@ -688,10 +688,10 @@ void KonfUpdate::gotAllGroups()
}
}
-void KonfUpdate::gotOptions(const QString &_options)
+void KonfUpdate::gotOptions(const TQString &_options)
{
- QStringList options = QStringList::split(',', _options);
- for(QStringList::ConstIterator it = options.begin();
+ TQStringList options = TQStringList::split(',', _options);
+ for(TQStringList::ConstIterator it = options.begin();
it != options.end();
++it)
{
@@ -703,27 +703,27 @@ void KonfUpdate::gotOptions(const QString &_options)
}
}
-void KonfUpdate::copyGroup(KConfigBase *cfg1, const QString &grp1,
- KConfigBase *cfg2, const QString &grp2)
+void KonfUpdate::copyGroup(KConfigBase *cfg1, const TQString &grp1,
+ KConfigBase *cfg2, const TQString &grp2)
{
cfg1->setGroup(grp1);
cfg2->setGroup(grp2);
- QMap<QString, QString> list = cfg1->entryMap(grp1);
- for(QMap<QString, QString>::Iterator it = list.begin();
+ TQMap<TQString, TQString> list = cfg1->entryMap(grp1);
+ for(TQMap<TQString, TQString>::Iterator it = list.begin();
it != list.end(); ++it)
{
cfg2->writeEntry(it.key(), cfg1->readEntry(it.key()));
}
}
-void KonfUpdate::gotScriptArguments(const QString &_arguments)
+void KonfUpdate::gotScriptArguments(const TQString &_arguments)
{
m_arguments = _arguments;
}
-void KonfUpdate::gotScript(const QString &_script)
+void KonfUpdate::gotScript(const TQString &_script)
{
- QString script, interpreter;
+ TQString script, interpreter;
int i = _script.find(',');
if (i == -1)
{
@@ -745,7 +745,7 @@ void KonfUpdate::gotScript(const QString &_script)
- QString path = locate("data","kconf_update/"+script);
+ TQString path = locate("data","kconf_update/"+script);
if (path.isEmpty())
{
if (interpreter.isEmpty())
@@ -764,7 +764,7 @@ void KonfUpdate::gotScript(const QString &_script)
else
log() << currentFilename << ": Running script '" << script << "'" << endl;
- QString cmd;
+ TQString cmd;
if (interpreter.isEmpty())
cmd = path;
else
@@ -796,8 +796,8 @@ void KonfUpdate::gotScript(const QString &_script)
if (oldGroup.isEmpty())
{
// Write all entries to tmpFile;
- QStringList grpList = oldConfig1->groupList();
- for(QStringList::ConstIterator it = grpList.begin();
+ TQStringList grpList = oldConfig1->groupList();
+ for(TQStringList::ConstIterator it = grpList.begin();
it != grpList.end();
++it)
{
@@ -806,27 +806,27 @@ void KonfUpdate::gotScript(const QString &_script)
}
else
{
- copyGroup(oldConfig1, oldGroup, &cfg, QString::null);
+ copyGroup(oldConfig1, oldGroup, &cfg, TQString::null);
}
cfg.sync();
- result = system(QFile::encodeName(QString("%1 < %2 > %3 2> %4").arg(cmd, tmp1.name(), tmp2.name(), tmp3.name())));
+ result = system(TQFile::encodeName(TQString("%1 < %2 > %3 2> %4").arg(cmd, tmp1.name(), tmp2.name(), tmp3.name())));
}
else
{
// No config file
- result = system(QFile::encodeName(QString("%1 2> %2").arg(cmd, tmp3.name())));
+ result = system(TQFile::encodeName(TQString("%1 2> %2").arg(cmd, tmp3.name())));
}
// Copy script stderr to log file
{
- QFile output(tmp3.name());
+ TQFile output(tmp3.name());
if (output.open(IO_ReadOnly))
{
- QTextStream ts( &output );
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream ts( &output );
+ ts.setEncoding(TQTextStream::UnicodeUTF8);
while(!ts.atEnd())
{
- QString line = ts.readLine();
+ TQString line = ts.readLine();
log() << "[Script] " << line << endl;
}
}
@@ -849,15 +849,15 @@ void KonfUpdate::gotScript(const QString &_script)
// Deleting old entries
{
- QString group = oldGroup;
- QFile output(tmp2.name());
+ TQString group = oldGroup;
+ TQFile output(tmp2.name());
if (output.open(IO_ReadOnly))
{
- QTextStream ts( &output );
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream ts( &output );
+ ts.setEncoding(TQTextStream::UnicodeUTF8);
while(!ts.atEnd())
{
- QString line = ts.readLine();
+ TQString line = ts.readLine();
if (line.startsWith("["))
{
int j = line.find(']')+1;
@@ -866,7 +866,7 @@ void KonfUpdate::gotScript(const QString &_script)
}
else if (line.startsWith("# DELETE "))
{
- QString key = line.mid(9);
+ TQString key = line.mid(9);
if (key[0] == '[')
{
int j = key.find(']')+1;
@@ -885,7 +885,7 @@ void KonfUpdate::gotScript(const QString &_script)
}
else if (line.startsWith("# DELETEGROUP"))
{
- QString key = line.mid(13).stripWhiteSpace();
+ TQString key = line.mid(13).stripWhiteSpace();
if (key[0] == '[')
{
int j = key.find(']')+1;
@@ -906,13 +906,13 @@ void KonfUpdate::gotScript(const QString &_script)
m_bCopy = true;
{
KConfig *saveOldConfig1 = oldConfig1;
- QString saveOldGroup = oldGroup;
- QString saveNewGroup = newGroup;
+ TQString saveOldGroup = oldGroup;
+ TQString saveNewGroup = newGroup;
oldConfig1 = new KConfig(tmp2.name(), true, false);
// For all groups...
- QStringList grpList = oldConfig1->groupList();
- for(QStringList::ConstIterator it = grpList.begin();
+ TQStringList grpList = oldConfig1->groupList();
+ for(TQStringList::ConstIterator it = grpList.begin();
it != grpList.end();
++it)
{
@@ -934,7 +934,7 @@ void KonfUpdate::resetOptions()
{
m_bCopy = false;
m_bOverwrite = false;
- m_arguments = QString::null;
+ m_arguments = TQString::null;
}
diff --git a/kdecore/DESIGN.COLOR b/kdecore/DESIGN.COLOR
index e06c7c7d3..b997a6de0 100644
--- a/kdecore/DESIGN.COLOR
+++ b/kdecore/DESIGN.COLOR
@@ -22,12 +22,12 @@ should be taken never to mix foreground colors from one group with
background colors from another group: they do not necasserily have any
contrast at all which can lead to a completely unreadable UI.
-Color schemes are supported by Qt (see QColorGroup) and can be
+Color schemes are supported by Qt (see TQColorGroup) and can be
configured on a KDE wide basis from the Control Panel. The settings
are stored in the global KDE configuration file under the "General"
setting. The KApplication class takes care that the configured
settings are passed on to Qt. Application developers can just use the
-values provided by QColorGroup.
+values provided by TQColorGroup.
There are three major color categories:
@@ -36,13 +36,13 @@ General
The colors in this group are used when no particular other group is
relevant.
-QColorGroup...: ColorRole::Background, background()
+TQColorGroup...: ColorRole::Background, background()
KDE config key: background
Control Center: i18n("Window Background")
Description...: General background color
Example use...: Background of dialogs
-QColorGroup...: ColorRole::Foreground, foreground()
+TQColorGroup...: ColorRole::Foreground, foreground()
KDE config key: foreground
Control Center: i18n("Window Text")
Description...: General foreground color
@@ -53,25 +53,25 @@ Text Areas
The colors in this group are used where the user can type text. it is
also used for lists from which the user can choose.
-QColorGroup...: ColorRole::Base, base()
+TQColorGroup...: ColorRole::Base, base()
KDE config key: windowBackground
Control Center: i18n("Standard background")
Description...: Background color for text areas.
Example use...: Background in a word-processor.
-QColorGroup...: ColorRole::Text, text()
+TQColorGroup...: ColorRole::Text, text()
KDE config key: windowForeground
Control Center: i18n("Standard text")
Description...: Text color for text areas.
Example use...: Text in a word-processor.
-QColorGroup...: ColorRole::Highlight, highlight()
+TQColorGroup...: ColorRole::Highlight, highlight()
KDE config key: selectBackground
Control Center: i18n("Select background")
Description...: Background color for selected text.
Example use...: In a selection list.
-QColorGroup...: ColorRole::HighlightedText, highlightedText()
+TQColorGroup...: ColorRole::HighlightedText, highlightedText()
KDE config key: selectForeground
Control Center: i18n("Select text")
Description...: Text color for selected text.
@@ -88,13 +88,13 @@ The colors used in this category are used for buttons in the broad
sense, including e.g.scrollbars, menubars and
popup-menus.
-QColorGroup...: ColorRole::Button, button()
+TQColorGroup...: ColorRole::Button, button()
KDE config key: buttonBackground
Control Center: i18n("Button background")
Description...: Background color for buttons.
Example use...: Background color of the OK button in a messagebox.
-QColorGroup...: ColorRole::ButtonText, buttonText()
+TQColorGroup...: ColorRole::ButtonText, buttonText()
KDE config key: buttonForeground
Control Center: i18n("Button text")
Description...: Color for text on buttons.
@@ -104,22 +104,22 @@ Example use...: Color of the OK text on a button in a messagebox.
In addition to the above colors a number of derived colors are
defined.They are all darker of lighter version of "Background".
-QColorGroup...: ColorRole::Shadow, shadow()
+TQColorGroup...: ColorRole::Shadow, shadow()
Description...: Used for shadow effects.(Very dark)
-QColorGroup...: ColorRold::BrightText, brightText()
+TQColorGroup...: ColorRold::BrightText, brightText()
Description...: Used for text on pushed pushbuttons
-QColorGroup...: ColorRole::Light, light()
+TQColorGroup...: ColorRole::Light, light()
Description...: Lighter than "Button"
-QColorGroup...: ColorRole::Midlight, midlight()
+TQColorGroup...: ColorRole::Midlight, midlight()
Description...: Between "Button" and "Light"
-QColorGroup...: ColorRole::Dark, dark()
+TQColorGroup...: ColorRole::Dark, dark()
Description...: Darker than "Button"
-QColorGroup...: ColorRole::Mid, mid()
+TQColorGroup...: ColorRole::Mid, mid()
Description...: Between "Button" and "Dark"
Well Behaved Aplications
diff --git a/kdecore/kaboutdata.cpp b/kdecore/kaboutdata.cpp
index aca080837..423166c18 100644
--- a/kdecore/kaboutdata.cpp
+++ b/kdecore/kaboutdata.cpp
@@ -22,13 +22,13 @@
#include <kaboutdata.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
QString
KAboutPerson::name() const
{
- return QString::fromUtf8(mName);
+ return TQString::fromUtf8(mName);
}
QString
@@ -37,36 +37,36 @@ KAboutPerson::task() const
if (mTask && *mTask)
return i18n(mTask);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutPerson::emailAddress() const
{
- return QString::fromUtf8(mEmailAddress);
+ return TQString::fromUtf8(mEmailAddress);
}
QString
KAboutPerson::webAddress() const
{
- return QString::fromUtf8(mWebAddress);
+ return TQString::fromUtf8(mWebAddress);
}
-KAboutTranslator::KAboutTranslator(const QString & name,
- const QString & emailAddress)
+KAboutTranslator::KAboutTranslator(const TQString & name,
+ const TQString & emailAddress)
{
mName=name;
mEmail=emailAddress;
}
-QString KAboutTranslator::name() const
+TQString KAboutTranslator::name() const
{
return mName;
}
-QString KAboutTranslator::emailAddress() const
+TQString KAboutTranslator::emailAddress() const
{
return mEmail;
}
@@ -90,8 +90,8 @@ public:
const char *translatorName;
const char *translatorEmail;
const char *productName;
- QImage* programLogo;
- QString customAuthorPlainText, customAuthorRichText;
+ TQImage* programLogo;
+ TQString customAuthorPlainText, customAuthorRichText;
bool customAuthorTextEnabled;
const char *mTranslatedProgramName;
};
@@ -166,9 +166,9 @@ KAboutData::setLicenseText( const char *licenseText )
}
void
-KAboutData::setLicenseTextFile( const QString &file )
+KAboutData::setLicenseTextFile( const TQString &file )
{
- mLicenseText = qstrdup(QFile::encodeName(file));
+ mLicenseText = qstrdup(TQFile::encodeName(file));
mLicenseKey = License_File;
}
@@ -254,7 +254,7 @@ KAboutData::programName() const
if (mProgramName && *mProgramName)
return i18n(mProgramName);
else
- return QString::null;
+ return TQString::null;
}
const char*
@@ -281,14 +281,14 @@ KAboutData::translateInternalProgramName() const
QImage
KAboutData::programLogo() const
{
- return d->programLogo ? (*d->programLogo) : QImage();
+ return d->programLogo ? (*d->programLogo) : TQImage();
}
void
-KAboutData::setProgramLogo(const QImage& image)
+KAboutData::setProgramLogo(const TQImage& image)
{
if (!d->programLogo)
- d->programLogo = new QImage( image );
+ d->programLogo = new TQImage( image );
else
*d->programLogo = image;
}
@@ -296,7 +296,7 @@ KAboutData::setProgramLogo(const QImage& image)
QString
KAboutData::version() const
{
- return QString::fromLatin1(mVersion);
+ return TQString::fromLatin1(mVersion);
}
QString
@@ -305,75 +305,75 @@ KAboutData::shortDescription() const
if (mShortDescription && *mShortDescription)
return i18n(mShortDescription);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutData::homepage() const
{
- return QString::fromLatin1(mHomepageAddress);
+ return TQString::fromLatin1(mHomepageAddress);
}
QString
KAboutData::bugAddress() const
{
- return QString::fromLatin1(mBugEmailAddress);
+ return TQString::fromLatin1(mBugEmailAddress);
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::authors() const
{
return mAuthorList;
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::credits() const
{
return mCreditList;
}
-const QValueList<KAboutTranslator>
+const TQValueList<KAboutTranslator>
KAboutData::translators() const
{
- QValueList<KAboutTranslator> personList;
+ TQValueList<KAboutTranslator> personList;
if(d->translatorName == 0)
return personList;
- QStringList nameList;
- QStringList emailList;
+ TQStringList nameList;
+ TQStringList emailList;
- QString names = i18n(d->translatorName);
- if(names != QString::fromUtf8(d->translatorName))
+ TQString names = i18n(d->translatorName);
+ if(names != TQString::fromUtf8(d->translatorName))
{
- nameList = QStringList::split(',',names);
+ nameList = TQStringList::split(',',names);
}
if(d->translatorEmail)
{
- QString emails = i18n(d->translatorEmail);
+ TQString emails = i18n(d->translatorEmail);
- if(emails != QString::fromUtf8(d->translatorEmail))
+ if(emails != TQString::fromUtf8(d->translatorEmail))
{
- emailList = QStringList::split(',',emails,true);
+ emailList = TQStringList::split(',',emails,true);
}
}
- QStringList::Iterator nit;
- QStringList::Iterator eit=emailList.begin();
+ TQStringList::Iterator nit;
+ TQStringList::Iterator eit=emailList.begin();
for(nit = nameList.begin(); nit != nameList.end(); ++nit)
{
- QString email;
+ TQString email;
if(eit != emailList.end())
{
email=*eit;
++eit;
}
- QString name=*nit;
+ TQString name=*nit;
personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
}
@@ -398,23 +398,23 @@ KAboutData::otherText() const
if (mOtherText && *mOtherText)
return i18n(mOtherText);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutData::license() const
{
- QString result;
+ TQString result;
if (!copyrightStatement().isEmpty())
result = copyrightStatement() + "\n\n";
- QString l;
- QString f;
+ TQString l;
+ TQString f;
switch ( mLicenseKey )
{
case License_File:
- f = QFile::decodeName(mLicenseText);
+ f = TQFile::decodeName(mLicenseText);
break;
case License_GPL_V2:
l = "GPL v2";
@@ -452,12 +452,12 @@ KAboutData::license() const
if (!f.isEmpty())
{
- QFile file(f);
+ TQFile file(f);
if (file.open(IO_ReadOnly))
{
result += '\n';
result += '\n';
- QTextStream str(&file);
+ TQTextStream str(&file);
result += str.read();
}
}
@@ -471,7 +471,7 @@ KAboutData::copyrightStatement() const
if (mCopyrightStatement && *mCopyrightStatement)
return i18n(mCopyrightStatement);
else
- return QString::null;
+ return TQString::null;
}
QString
@@ -493,7 +493,7 @@ KAboutData::customAuthorTextEnabled() const
}
void
-KAboutData::setCustomAuthorText(const QString &plainText, const QString &richText)
+KAboutData::setCustomAuthorText(const TQString &plainText, const TQString &richText)
{
d->customAuthorPlainText = plainText;
d->customAuthorRichText = richText;
@@ -504,8 +504,8 @@ KAboutData::setCustomAuthorText(const QString &plainText, const QString &richTex
void
KAboutData::unsetCustomAuthorText()
{
- d->customAuthorPlainText = QString::null;
- d->customAuthorRichText = QString::null;
+ d->customAuthorPlainText = TQString::null;
+ d->customAuthorRichText = TQString::null;
d->customAuthorTextEnabled = false;
}
diff --git a/kdecore/kaboutdata.h b/kdecore/kaboutdata.h
index 4a5c863fa..3165c89d9 100644
--- a/kdecore/kaboutdata.h
+++ b/kdecore/kaboutdata.h
@@ -19,9 +19,9 @@
*
*/
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqimage.h>
#include <klocale.h>
#ifndef _KABOUTDATA_H_
@@ -83,31 +83,31 @@ public:
/**
* The person's name
- * @return the person's name (can be QString::null, if it has been
+ * @return the person's name (can be TQString::null, if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The person's task
- * @return the person's task (can be QString::null, if it has been
+ * @return the person's task (can be TQString::null, if it has been
* constructed with a null task)
*/
- QString task() const;
+ TQString task() const;
/**
* The person's email address
- * @return the person's email address (can be QString::null, if it has been
+ * @return the person's email address (can be TQString::null, if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
/**
* The home page or a relevant link
- * @return the persons home page (can be QString::null, if it has been
+ * @return the persons home page (can be TQString::null, if it has been
* constructed with a null home page)
*/
- QString webAddress() const;
+ TQString webAddress() const;
private:
const char *mName;
@@ -141,26 +141,26 @@ public:
*
* @param emailAddress The email address of the person.
*/
- KAboutTranslator(const QString & name=QString::null,
- const QString & emailAddress=QString::null);
+ KAboutTranslator(const TQString & name=TQString::null,
+ const TQString & emailAddress=TQString::null);
/**
* The translator's name
- * @return the translators's name (can be QString::null, if it has been
+ * @return the translators's name (can be TQString::null, if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The translator's email
- * @return the translator's email address (can be QString::null, if it has been
+ * @return the translator's email address (can be TQString::null, if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
private:
- QString mName;
- QString mEmail;
+ TQString mName;
+ TQString mEmail;
KAboutTranslatorPrivate* d;
};
@@ -344,7 +344,7 @@ class KDECORE_EXPORT KAboutData
*
* @param file File containing the license text.
*/
- void setLicenseTextFile( const QString &file );
+ void setLicenseTextFile( const TQString &file );
/**
* Defines the program name used internally.
@@ -372,7 +372,7 @@ class KDECORE_EXPORT KAboutData
* @see programLogo()
* @since 3.4
*/
- void setProgramLogo(const QImage& image);
+ void setProgramLogo(const TQImage& image);
/**
* Defines the program version string.
@@ -462,7 +462,7 @@ class KDECORE_EXPORT KAboutData
* Returns the translated program name.
* @return the program name (translated).
*/
- QString programName() const;
+ TQString programName() const;
/**
* @internal
@@ -479,13 +479,13 @@ class KDECORE_EXPORT KAboutData
* no custom application logo defined.
* @since 3.4
*/
- QImage programLogo() const;
+ TQImage programLogo() const;
/**
* Returns the program's version.
* @return the version string.
*/
- QString version() const;
+ TQString version() const;
/**
* @internal
@@ -495,22 +495,22 @@ class KDECORE_EXPORT KAboutData
/**
* Returns a short, translated description.
* @return the short description (translated). Can be
- * QString::null if not set.
+ * TQString::null if not set.
*/
- QString shortDescription() const;
+ TQString shortDescription() const;
/**
* Returns the application homepage.
- * @return the application homepage URL. Can be QString::null if
+ * @return the application homepage URL. Can be TQString::null if
* not set.
*/
- QString homepage() const;
+ TQString homepage() const;
/**
* Returns the email address for bugs.
* @return the email address where to report bugs.
*/
- QString bugAddress() const;
+ TQString bugAddress() const;
/**
* @internal
@@ -521,31 +521,31 @@ class KDECORE_EXPORT KAboutData
* Returns a list of authors.
* @return author information (list of persons).
*/
- const QValueList<KAboutPerson> authors() const;
+ const TQValueList<KAboutPerson> authors() const;
/**
* Returns a list of persons who contributed.
* @return credit information (list of persons).
*/
- const QValueList<KAboutPerson> credits() const;
+ const TQValueList<KAboutPerson> credits() const;
/**
* Returns a list of translators.
* @return translators information (list of persons)
*/
- const QValueList<KAboutTranslator> translators() const;
+ const TQValueList<KAboutTranslator> translators() const;
/**
* Returns a message about the translation team.
* @return a message about the translation team
*/
- static QString aboutTranslationTeam();
+ static TQString aboutTranslationTeam();
/**
* Returns a translated, free form text.
- * @return the free form text (translated). Can be QString::null if not set.
+ * @return the free form text (translated). Can be TQString::null if not set.
*/
- QString otherText() const;
+ TQString otherText() const;
/**
* Returns the license. If the licenseType argument of the constructor has been
@@ -554,31 +554,31 @@ class KDECORE_EXPORT KAboutData
*
* @return The license text.
*/
- QString license() const;
+ TQString license() const;
/**
* Returns the copyright statement.
- * @return the copyright statement. Can be QString::null if not set.
+ * @return the copyright statement. Can be TQString::null if not set.
*/
- QString copyrightStatement() const;
+ TQString copyrightStatement() const;
/**
* Returns the plain text displayed around the list of authors instead
* of the default message telling users to send bug reports to bugAddress().
*
* @return the plain text displayed around the list of authors instead
- * of the default message. Can be QString::null.
+ * of the default message. Can be TQString::null.
*/
- QString customAuthorPlainText() const;
+ TQString customAuthorPlainText() const;
/**
* Returns the rich text displayed around the list of authors instead
* of the default message telling users to send bug reports to bugAddress().
*
* @return the rich text displayed around the list of authors instead
- * of the default message. Can be QString::null.
+ * of the default message. Can be TQString::null.
*/
- QString customAuthorRichText() const;
+ TQString customAuthorRichText() const;
/**
* Returns whether custom text should be displayed around the list of
@@ -596,10 +596,10 @@ class KDECORE_EXPORT KAboutData
* @param plainText The plain text.
* @param richText The rich text.
*
- * Both parameters can be QString::null to not display any message at
+ * Both parameters can be TQString::null to not display any message at
* all. Call unsetCustomAuthorText() to revert to the default mesage.
*/
- void setCustomAuthorText(const QString &plainText, const QString &richText);
+ void setCustomAuthorText(const TQString &plainText, const TQString &richText);
/**
* Clears any custom text displayed around the list of authors and falls
@@ -618,8 +618,8 @@ class KDECORE_EXPORT KAboutData
const char *mOtherText;
const char *mHomepageAddress;
const char *mBugEmailAddress;
- QValueList<KAboutPerson> mAuthorList;
- QValueList<KAboutPerson> mCreditList;
+ TQValueList<KAboutPerson> mAuthorList;
+ TQValueList<KAboutPerson> mCreditList;
const char *mLicenseText;
KAboutDataPrivate *d;
diff --git a/kdecore/kaccel.cpp b/kdecore/kaccel.cpp
index fc984021a..5cd2195cb 100644
--- a/kdecore/kaccel.cpp
+++ b/kdecore/kaccel.cpp
@@ -19,12 +19,12 @@
#include "kaccel.h"
-#include <qaccel.h>
-#include <qguardedptr.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqaccel.h>
+#include <tqguardedptr.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include "kaccelbase.h"
#include <kapplication.h>
@@ -107,7 +107,7 @@ KAccelEventHandler* KAccelEventHandler::g_pSelf = 0;
bool KAccelEventHandler::g_bAccelActivated = false;
KAccelEventHandler::KAccelEventHandler()
- : QWidget( 0, "KAccelEventHandler" )
+ : TQWidget( 0, "KAccelEventHandler" )
{
# ifdef Q_WS_X11
if ( kapp )
@@ -116,11 +116,11 @@ KAccelEventHandler::KAccelEventHandler()
}
#ifdef Q_WS_X11
-bool qt_try_modal( QWidget *, XEvent * );
+bool qt_try_modal( TQWidget *, XEvent * );
bool KAccelEventHandler::x11Event( XEvent* pEvent )
{
- if( QWidget::keyboardGrabber() || !kapp->focusWidget() )
+ if( TQWidget::keyboardGrabber() || !kapp->focusWidget() )
return false;
if ( !qt_try_modal(kapp->focusWidget(), pEvent) )
@@ -140,7 +140,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
if( key.modFlags() & KKey::ALT ) state |= Qt::AltButton;
if( key.modFlags() & KKey::WIN ) state |= Qt::MetaButton;
- QKeyEvent ke( QEvent::AccelOverride, keyCodeQt, 0, state );
+ TQKeyEvent ke( TQEvent::AccelOverride, keyCodeQt, 0, state );
ke.ignore();
g_bAccelActivated = false;
@@ -163,14 +163,14 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
// KAccelPrivate
//---------------------------------------------------------------------
-KAccelPrivate::KAccelPrivate( KAccel* pParent, QWidget* pWatch )
+KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch )
: KAccelBase( KAccelBase::QT_KEYS )
{
//kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
m_pAccel = pParent;
m_pWatch = pWatch;
m_bAutoUpdate = true;
- connect( (QAccel*)m_pAccel, SIGNAL(activated(int)), this, SLOT(slotKeyPressed(int)) );
+ connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) );
#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working
if( m_pWatch )
@@ -182,10 +182,10 @@ KAccelPrivate::KAccelPrivate( KAccel* pParent, QWidget* pWatch )
void KAccelPrivate::setEnabled( bool bEnabled )
{
m_bEnabled = bEnabled;
- ((QAccel*)m_pAccel)->setEnabled( bEnabled );
+ ((TQAccel*)m_pAccel)->setEnabled( bEnabled );
}
-bool KAccelPrivate::setEnabled( const QString& sAction, bool bEnable )
+bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
{
kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
KAccelAction* pAction = actionPtr( sAction );
@@ -196,25 +196,25 @@ bool KAccelPrivate::setEnabled( const QString& sAction, bool bEnable )
pAction->setEnabled( bEnable );
- QMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
+ TQMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
for( ; it != m_mapIDToAction.end(); ++it ) {
if( *it == pAction )
- ((QAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
+ ((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
}
return true;
}
-bool KAccelPrivate::removeAction( const QString& sAction )
+bool KAccelPrivate::removeAction( const TQString& sAction )
{
// FIXME: getID() doesn't contains any useful
// information! Use mapIDToAction. --ellis, 2/May/2002
- // Or maybe KAccelBase::remove() takes care of QAccel indirectly...
+ // Or maybe KAccelBase::remove() takes care of TQAccel indirectly...
KAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
int nID = pAction->getID();
//bool b = actions().removeAction( sAction );
bool b = KAccelBase::remove( sAction );
- ((QAccel*)m_pAccel)->removeItem( nID );
+ ((TQAccel*)m_pAccel)->removeItem( nID );
return b;
} else
return false;
@@ -232,21 +232,21 @@ bool KAccelPrivate::emitSignal( KAccelBase::Signal signal )
bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
- int nID = ((QAccel*)m_pAccel)->insertItem( keyQt );
+ int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToAction[nID] = &action;
m_mapIDToKey[nID] = keyQt;
if( action.objSlotPtr() && action.methodSlotPtr() ) {
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- ((QAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() );
+ ((TQAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() );
#else
- ((QAccel*)m_pAccel)->connectItem( nID, this, SLOT(slotKeyPressed(int)));
+ ((TQAccel*)m_pAccel)->connectItem( nID, this, TQT_SLOT(slotKeyPressed(int)));
#endif
if( !action.isEnabled() )
- ((QAccel*)m_pAccel)->setItemEnabled( nID, false );
+ ((TQAccel*)m_pAccel)->setItemEnabled( nID, false );
}
- kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << QString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
//kdDebug(125) << "m_pAccel = " << m_pAccel << endl;
return nID != 0;
}
@@ -254,24 +254,24 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key
bool KAccelPrivate::connectKey( const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
- int nID = ((QAccel*)m_pAccel)->insertItem( keyQt );
+ int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToKey[nID] = keyQt;
- kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << QString::number(keyQt,16) << " ): id = " << nID << endl;
+ kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
return nID != 0;
}
bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
- //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << QString::number(*it,16) << " == " << QString::number(keyQt,16) << endl;
+ //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl;
if( *it == keyQt ) {
int nID = it.key();
- kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << QString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
- ((QAccel*)m_pAccel)->removeItem( nID );
+ kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ ((TQAccel*)m_pAccel)->removeItem( nID );
m_mapIDToAction.remove( nID );
m_mapIDToKey.remove( it );
return true;
@@ -285,11 +285,11 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
- kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << QString::number(keyQt,16) << " )" << endl;
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( *it == keyQt ) {
- ((QAccel*)m_pAccel)->removeItem( it.key() );
+ ((TQAccel*)m_pAccel)->removeItem( it.key() );
m_mapIDToKey.remove( it );
return true;
}
@@ -306,7 +306,7 @@ void KAccelPrivate::slotKeyPressed( int id )
if( m_mapIDToKey.contains( id ) ) {
KKey key = m_mapIDToKey[id];
KKeySequence seq( key );
- QPopupMenu* pMenu = createPopupMenu( m_pWatch, seq );
+ TQPopupMenu* pMenu = createPopupMenu( m_pWatch, seq );
// If there was only one action mapped to this key,
// and that action is not a multi-key shortcut,
@@ -318,9 +318,9 @@ void KAccelPrivate::slotKeyPressed( int id )
int iAction = pMenu->idAt(1);
slotMenuActivated( iAction );
} else {
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)) );
- pMenu->exec( m_pWatch->mapToGlobal( QPoint( 0, 0 ) ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuActivated(int)) );
+ pMenu->exec( m_pWatch->mapToGlobal( TQPoint( 0, 0 ) ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuActivated(int)) );
}
delete pMenu;
}
@@ -336,23 +336,23 @@ void KAccelPrivate::slotMenuActivated( int iAction )
KAccelAction* pAction = actions().actionPtr( iAction );
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
if( pAction ) {
- connect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
- disconnect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ disconnect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
#else
emitActivatedSignal( pAction );
#endif
}
-bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
+bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
{
- if( pEvent->type() == QEvent::AccelOverride && m_bEnabled ) {
- QKeyEvent* pKeyEvent = (QKeyEvent*) pEvent;
+ if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) {
+ TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent;
KKey key( pKeyEvent );
kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
int keyCodeQt = key.keyCodeQt();
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( (*it) == keyCodeQt ) {
int nID = it.key();
@@ -363,11 +363,11 @@ bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
if( !pAction->isEnabled() )
continue;
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- QGuardedPtr<KAccelPrivate> me = this;
- connect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ TQGuardedPtr<KAccelPrivate> me = this;
+ connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me) {
- disconnect( me, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ disconnect( me, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
#else
emitActivatedSignal( pAction );
@@ -388,21 +388,21 @@ bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
{
if( pAction ) {
- QGuardedPtr<KAccelPrivate> me = this;
- QRegExp reg( "([ ]*KAccelAction.*)" );
+ TQGuardedPtr<KAccelPrivate> me = this;
+ TQRegExp reg( "([ ]*KAccelAction.*)" );
if( reg.search( pAction->methodSlotPtr()) >= 0 ) {
- connect( this, SIGNAL(menuItemActivated(KAccelAction*)),
+ connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated( pAction );
if (me)
- disconnect( me, SIGNAL(menuItemActivated(KAccelAction*)),
+ disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
} else {
- connect( this, SIGNAL(menuItemActivated()),
+ connect( this, TQT_SIGNAL(menuItemActivated()),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me)
- disconnect( me, SIGNAL(menuItemActivated()),
+ disconnect( me, TQT_SIGNAL(menuItemActivated()),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
@@ -414,15 +414,15 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
// KAccel
//---------------------------------------------------------------------
-KAccel::KAccel( QWidget* pParent, const char* psName )
-: QAccel( pParent, (psName) ? psName : "KAccel-QAccel" )
+KAccel::KAccel( TQWidget* pParent, const char* psName )
+: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" )
{
kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
d = new KAccelPrivate( this, pParent );
}
-KAccel::KAccel( QWidget* watch, QObject* pParent, const char* psName )
-: QAccel( watch, pParent, (psName) ? psName : "KAccel-QAccel" )
+KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName )
+: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" )
{
kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
if( !watch )
@@ -442,9 +442,9 @@ bool KAccel::isEnabled() { return d->isEnabled(); }
void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
-KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sLabel, sWhatsThis,
@@ -453,9 +453,9 @@ KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, con
bConfigurable, bEnabled );
}
-KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sLabel, sWhatsThis,
@@ -465,20 +465,20 @@ KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, con
}
KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- return d->insert( psAction, i18n(psAction), QString::null,
+ return d->insert( psAction, i18n(psAction), TQString::null,
cutDef, cutDef,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
}
KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- QString sAction = KStdAccel::name( id );
+ TQString sAction = KStdAccel::name( id );
if( sAction.isEmpty() )
return 0;
@@ -492,24 +492,24 @@ KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
return pAction;
}
-bool KAccel::remove( const QString& sAction )
+bool KAccel::remove( const TQString& sAction )
{ return d->removeAction( sAction ); }
bool KAccel::updateConnections()
{ return d->updateConnections(); }
-const KShortcut& KAccel::shortcut( const QString& sAction ) const
+const KShortcut& KAccel::shortcut( const TQString& sAction ) const
{
const KAccelAction* pAction = actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : KShortcut::null();
}
-bool KAccel::setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-bool KAccel::setEnabled( const QString& sAction, bool bEnable )
+bool KAccel::setEnabled( const TQString& sAction, bool bEnable )
{ return d->setEnabled( sAction, bEnable ); }
-bool KAccel::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
{
kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
KAccelAction* pAction = actions().actionPtr( sAction );
@@ -521,10 +521,10 @@ bool KAccel::setShortcut( const QString& sAction, const KShortcut& cut )
return false;
}
-const QString& KAccel::configGroup() const
+const TQString& KAccel::configGroup() const
{ return d->configGroup(); }
// for kdegames/ksirtet
-void KAccel::setConfigGroup( const QString& s )
+void KAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
bool KAccel::readSettings( KConfigBase* pConfig )
@@ -547,25 +547,25 @@ void KAccel::emitKeycodeChanged()
// Obsolete methods -- for backward compatibility
//------------------------------------------------------------
-bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
+bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
const char* cutsDef,
- int /*nIDMenu*/, QPopupMenu *, bool bConfigurable )
+ int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable )
{
KShortcut cut( cutsDef );
- bool b = d->insert( sAction, sLabel, QString::null,
+ bool b = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable ) != 0;
return b;
}
-bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
+bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
int key,
- int /*nIDMenu*/, QPopupMenu*, bool bConfigurable )
+ int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable )
{
KShortcut cut;
- cut.init( QKeySequence(key) );
- KAccelAction* pAction = d->insert( sAction, sLabel, QString::null,
+ cut.init( TQKeySequence(key) );
+ KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable );
@@ -573,9 +573,9 @@ bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
}
// Used in kdeutils/kjots
-bool KAccel::insertStdItem( KStdAccel::StdAccel id, const QString& sLabel )
+bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel )
{
- KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, QString::null,
+ KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null,
KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
0, 0 );
if( pAction )
@@ -584,7 +584,7 @@ bool KAccel::insertStdItem( KStdAccel::StdAccel id, const QString& sLabel )
return true;
}
-bool KAccel::connectItem( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot, bool bActivate )
+bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
{
kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
if( bActivate == false )
@@ -595,22 +595,22 @@ bool KAccel::connectItem( const QString& sAction, const QObject* pObjSlot, const
return b;
}
-bool KAccel::removeItem( const QString& sAction )
+bool KAccel::removeItem( const TQString& sAction )
{ return d->removeAction( sAction ); }
-bool KAccel::setItemEnabled( const QString& sAction, bool bEnable )
+bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable )
{ return setEnabled( sAction, bEnable ); }
-void KAccel::changeMenuAccel( QPopupMenu *menu, int id, const QString& action )
+void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
{
KAccelAction* pAction = actions().actionPtr( action );
- QString s = menu->text( id );
+ TQString s = menu->text( id );
if( !pAction || s.isEmpty() )
return;
int i = s.find( '\t' );
- QString k = pAction->shortcut().seq(0).toString();
+ TQString k = pAction->shortcut().seq(0).toString();
if( k.isEmpty() )
return;
@@ -621,24 +621,24 @@ void KAccel::changeMenuAccel( QPopupMenu *menu, int id, const QString& action )
s += k;
}
- QPixmap *pp = menu->pixmap(id);
+ TQPixmap *pp = menu->pixmap(id);
if( pp && !pp->isNull() )
menu->changeItem( *pp, s, id );
else
menu->changeItem( s, id );
}
-void KAccel::changeMenuAccel( QPopupMenu *menu, int id, KStdAccel::StdAccel accel )
+void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel )
{
changeMenuAccel( menu, id, KStdAccel::name( accel ) );
}
-int KAccel::stringToKey( const QString& sKey )
+int KAccel::stringToKey( const TQString& sKey )
{
return KKey( sKey ).keyCodeQt();
}
-int KAccel::currentKey( const QString& sAction ) const
+int KAccel::currentKey( const TQString& sAction ) const
{
KAccelAction* pAction = d->actionPtr( sAction );
if( pAction )
@@ -646,13 +646,13 @@ int KAccel::currentKey( const QString& sAction ) const
return 0;
}
-QString KAccel::findKey( int key ) const
+TQString KAccel::findKey( int key ) const
{
KAccelAction* pAction = d->actionPtr( KKey(key) );
if( pAction )
return pAction->name();
else
- return QString::null;
+ return TQString::null;
}
#endif // !KDE_NO_COMPAT
diff --git a/kdecore/kaccel.h b/kdecore/kaccel.h
index 84c938ea4..c72730b6b 100644
--- a/kdecore/kaccel.h
+++ b/kdecore/kaccel.h
@@ -20,7 +20,7 @@
#ifndef _KACCEL_H
#define _KACCEL_H
-#include <qaccel.h>
+#include <tqaccel.h>
#include <kshortcut.h>
#include <kstdaccel.h>
#include "kdelibs_export.h"
@@ -42,7 +42,7 @@ class KAccelPrivate;
* A KAccel contains a list of accelerator actions.
*
* For example, CTRL+Key_P could be a shortcut for printing a document. The key
- * codes are listed in qnamespace.h. "Print" could be the action name for printing.
+ * codes are listed in tqnamespace.h. "Print" could be the action name for printing.
* The action name identifies the shortcut in configuration files and the
* KKeyChooser GUI.
*
@@ -74,9 +74,9 @@ class KAccelPrivate;
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* pAccel->insert( "Scroll Up", i18n("Scroll up"),
* i18n("Scroll up the current document by one line."),
- * Qt::Key_Up, this, SLOT(slotScrollUp()) );
+ * Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) );
* // Insert an standard acclerator action.
- * pAccel->insert( KStdAccel::Print, this, SLOT(slotPrint()) );
+ * pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) );
*
* // Update the shortcuts by read any user-defined settings from the
* // application's config file.
@@ -101,7 +101,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param pParent the parent and widget to watch for key strokes
* @param psName the name of the QObject
*/
- KAccel( QWidget* pParent, const char* psName = 0 );
+ KAccel( TQWidget* pParent, const char* psName = 0 );
/**
* Creates a new KAccel that watches @p watch.
@@ -110,7 +110,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param parent the parent of the QObject
* @param psName the name of the QObject
*/
- KAccel( QWidget* watch, QObject* parent, const char* psName = 0 );
+ KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
virtual ~KAccel();
/**
@@ -129,7 +129,7 @@ class KDECORE_EXPORT KAccel : public QAccel
/**
* Checks whether the KAccel is active.
- * @return true if the QAccel is enabled
+ * @return true if the TQAccel is enabled
*/
bool isEnabled();
@@ -159,7 +159,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* insert( "Do Something", i18n("Do Something"),
* i18n("This action allows you to do something really great with this program to "
* "the currently open document."),
- * ALT+Key_D, this, SLOT(slotDoSomething()) );
+ * ALT+Key_D, this, TQT_SLOT(slotDoSomething()) );
*\endcode
*
* @param sAction The internal name of the action.
@@ -172,17 +172,17 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Same as first insert(), but with separate shortcuts defined for
* 3- and 4- modifier defaults.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* This is an overloaded function provided for convenience.
@@ -191,7 +191,7 @@ class KDECORE_EXPORT KAccel : public QAccel
*
* Usage:
* \code
- * insert( i18n("Do Something"), ALT+Key_D, this, SLOT(slotDoSomething()) );
+ * insert( i18n("Do Something"), ALT+Key_D, this, TQT_SLOT(slotDoSomething()) );
* \endcode
*
* @param psAction The name AND label of the action.
@@ -202,7 +202,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
KAccelAction* insert( const char* psAction, const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Similar to the first insert() method, but with the action
@@ -211,7 +211,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @see KStdAccel.
*/
KAccelAction* insert( KStdAccel::StdAccel id,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -220,7 +220,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param sAction the name of the action to remove
* @return true if successful, false otherwise
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Updates the connections of the accelerations after changing them.
@@ -237,7 +237,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param sAction the name of the action
* @return the action's shortcut, or a null shortcut if not found
*/
- const KShortcut& shortcut( const QString& sAction ) const;
+ const KShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
@@ -245,7 +245,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param shortcut the shortcut to set
* @return true if successful, false otherwise
*/
- bool setShortcut( const QString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
@@ -255,28 +255,28 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param psMethodSlot the name of the slot
* @return true if successful, false otherwise
*/
- bool setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enable or disable the action named by @p sAction.
* @param sAction the action to en-/disable
* @param bEnabled true to enable, false to disable
* @return true if successful, false otherwise
*/
- bool setEnabled( const QString& sAction, bool bEnabled );
+ bool setEnabled( const TQString& sAction, bool bEnabled );
/**
* Returns the configuration group of the settings.
* @return the configuration group
* @see KConfig
*/
- const QString& configGroup() const;
+ const TQString& configGroup() const;
/**
* Returns the configuration group of the settings.
* @param name the new configuration group
* @see KConfig
*/
- void setConfigGroup( const QString &name );
+ void setConfigGroup( const TQString &name );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
@@ -317,49 +317,49 @@ class KDECORE_EXPORT KAccel : public QAccel
/**
* @deprecated use insert
*/
- bool insertItem( const QString& sLabel, const QString& sAction,
+ bool insertItem( const TQString& sLabel, const TQString& sAction,
const char* psKey,
- int nIDMenu = 0, QPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
+ int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool insertItem( const QString& sLabel, const QString& sAction,
+ bool insertItem( const TQString& sLabel, const TQString& sAction,
int key,
- int nIDMenu = 0, QPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
+ int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool insertStdItem( KStdAccel::StdAccel id, const QString& descr = QString::null ) KDE_DEPRECATED;
+ bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool connectItem( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot, bool bActivate = true ) KDE_DEPRECATED;
+ bool connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate = true ) KDE_DEPRECATED;
/**
* @deprecated use insert( accel, pObjSlot, psMethodSlot );
*
*/
- KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const QObject* pObjSlot, const char* psMethodSlot )
+ KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
{ return insert( accel, pObjSlot, psMethodSlot ); }
/**
* @deprecated use remove
*/
- bool removeItem( const QString& sAction ) KDE_DEPRECATED;
+ bool removeItem( const TQString& sAction ) KDE_DEPRECATED;
/**
* @deprecated
*/
- bool setItemEnabled( const QString& sAction, bool bEnable ) KDE_DEPRECATED;
+ bool setItemEnabled( const TQString& sAction, bool bEnable ) KDE_DEPRECATED;
/**
* @deprecated see KDE3PORTING.html
*/
- void changeMenuAccel( QPopupMenu *menu, int id, const QString& action ) KDE_DEPRECATED;
+ void changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) KDE_DEPRECATED;
/**
* @deprecated see KDE3PORTING.html
*/
- void changeMenuAccel( QPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
+ void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
/**
* @deprecated
*/
- static int stringToKey( const QString& ) KDE_DEPRECATED;
+ static int stringToKey( const TQString& ) KDE_DEPRECATED;
/**
* @deprecated Use shortcut().
@@ -368,15 +368,15 @@ class KDECORE_EXPORT KAccel : public QAccel
* @p action, or zero if either the action name cannot be
* found or the current key is set to no key.
*/
- int currentKey( const QString& action ) const KDE_DEPRECATED;
+ int currentKey( const TQString& action ) const KDE_DEPRECATED;
/**
* @deprecated Use actions().actionPtr().
*
* Return the name of the accelerator item with the keycode @p key,
- * or QString::null if the item cannot be found.
+ * or TQString::null if the item cannot be found.
*/
- QString findKey( int key ) const KDE_DEPRECATED;
+ TQString findKey( int key ) const KDE_DEPRECATED;
#endif // !KDE_NO_COMPAT
protected:
diff --git a/kdecore/kaccelaction.cpp b/kdecore/kaccelaction.cpp
index de805d2fc..856bbefdc 100644
--- a/kdecore/kaccelaction.cpp
+++ b/kdecore/kaccelaction.cpp
@@ -23,7 +23,7 @@
#include "kaccelaction.h"
#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal()
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include <kconfig.h>
#include "kckey.h"
@@ -62,9 +62,9 @@ KAccelAction::KAccelAction( const KAccelAction& action )
*this = action;
}
-KAccelAction::KAccelAction( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl;
@@ -92,9 +92,9 @@ void KAccelAction::clear()
d->m_nConnections = 0;
}
-bool KAccelAction::init( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
m_sName = sName;
@@ -132,11 +132,11 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action )
return *this;
}
-void KAccelAction::setName( const QString& s )
+void KAccelAction::setName( const TQString& s )
{ m_sName = s; }
-void KAccelAction::setLabel( const QString& s )
+void KAccelAction::setLabel( const TQString& s )
{ m_sLabel = s; }
-void KAccelAction::setWhatsThis( const QString& s )
+void KAccelAction::setWhatsThis( const TQString& s )
{ m_sWhatsThis = s; }
bool KAccelAction::setShortcut( const KShortcut& cut )
@@ -145,7 +145,7 @@ bool KAccelAction::setShortcut( const KShortcut& cut )
return true;
}
-void KAccelAction::setSlot( const QObject* pObjSlot, const char* psMethodSlot )
+void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
{
m_pObjSlot = pObjSlot;
m_psMethodSlot = psMethodSlot;
@@ -156,10 +156,10 @@ void KAccelAction::setConfigurable( bool b )
void KAccelAction::setEnabled( bool b )
{ m_bEnabled = b; }
-QString KAccelAction::toString() const
+TQString KAccelAction::toString() const
{ return m_cut.toString(); }
-QString KAccelAction::toStringInternal() const
+TQString KAccelAction::toStringInternal() const
{ return m_cut.toStringInternal( &shortcutDefault() ); }
bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
@@ -294,15 +294,15 @@ bool KAccelActions::init( const KAccelActions& actions )
return true;
}
-bool KAccelActions::init( KConfigBase& config, const QString& sGroup )
+bool KAccelActions::init( KConfigBase& config, const TQString& sGroup )
{
kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl;
- QMap<QString, QString> mapEntry = config.entryMap( sGroup );
+ TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup );
resize( mapEntry.count() );
- QMap<QString, QString>::Iterator it( mapEntry.begin() );
+ TQMap<TQString, TQString>::Iterator it( mapEntry.begin() );
for( uint i = 0; it != mapEntry.end(); ++it, i++ ) {
- QString sShortcuts = *it;
+ TQString sShortcuts = *it;
KShortcut cuts;
kdDebug(125) << it.key() << " = " << sShortcuts << endl;
@@ -356,7 +356,7 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
if( pAction && pAction->m_bConfigurable ) {
KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
if( pAction2 ) {
- QString sOld = pAction->m_cut.toStringInternal();
+ TQString sOld = pAction->m_cut.toStringInternal();
pAction->m_cut = pAction2->m_cut;
kdDebug(125) << "\t" << pAction->m_sName
<< " found: " << sOld
@@ -371,7 +371,7 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
emitKeycodeChanged();
}
-int KAccelActions::actionIndex( const QString& sAction ) const
+int KAccelActions::actionIndex( const TQString& sAction ) const
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
@@ -392,13 +392,13 @@ const KAccelAction* KAccelActions::actionPtr( uint i ) const
return m_prgActions[i];
}
-KAccelAction* KAccelActions::actionPtr( const QString& sAction )
+KAccelAction* KAccelActions::actionPtr( const TQString& sAction )
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
-const KAccelAction* KAccelActions::actionPtr( const QString& sAction ) const
+const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
@@ -425,7 +425,7 @@ const KAccelAction& KAccelActions::operator []( uint i ) const
return *actionPtr( i );
}
-KAccelAction* KAccelActions::insert( const QString& sName, const QString& sLabel )
+KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel )
{
if( actionPtr( sName ) ) {
kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
@@ -442,9 +442,9 @@ KAccelAction* KAccelActions::insert( const QString& sName, const QString& sLabel
return pAction;
}
-KAccelAction* KAccelActions::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelActions::insert()2 begin" << endl;
@@ -464,7 +464,7 @@ KAccelAction* KAccelActions::insert( const QString& sAction, const QString& sLab
return pAction;
}
-bool KAccelActions::remove( const QString& sAction )
+bool KAccelActions::remove( const TQString& sAction )
{
kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl;
@@ -483,7 +483,7 @@ bool KAccelActions::remove( const QString& sAction )
return true;
}
-bool KAccelActions::readActions( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KAccelActions::readActions( const TQString& sConfigGroup, KConfigBase* pConfig )
{
KAccelShortcutList accelList(*this, false);
return accelList.readSettings( sConfigGroup, pConfig );
@@ -502,7 +502,7 @@ bool KAccelActions::readActions( const QString& sConfigGroup, KConfigBase* pConf
1) KKeySequence = Alt+F2
-> "Something=Meta+X,Asterisk;Alt+F2"
*/
-bool KAccelActions::writeActions( const QString &sGroup, KConfigBase* pConfig,
+bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig,
bool bWriteAll, bool bGlobal ) const
{
kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
@@ -517,7 +517,7 @@ bool KAccelActions::writeActions( const QString &sGroup, KConfigBase* pConfig,
}
const KAccelAction& action = *m_prgActions[i];
- QString s;
+ TQString s;
bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty();
bool bSameAsDefault = true;
bool bWriteAction = false;
diff --git a/kdecore/kaccelaction.h b/kdecore/kaccelaction.h
index 4164ca518..606bd3ccb 100644
--- a/kdecore/kaccelaction.h
+++ b/kdecore/kaccelaction.h
@@ -20,10 +20,10 @@
#ifndef _KACCELACTION_H
#define _KACCELACTION_H
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kshortcut.h>
@@ -97,9 +97,9 @@ class KDECORE_EXPORT KAccelAction
* @param bConfigurable if true the user can configure the shortcut
* @param bEnabled true if the accelerator should be enabled
*/
- KAccelAction( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
~KAccelAction();
@@ -123,9 +123,9 @@ class KDECORE_EXPORT KAccelAction
* @param bEnabled true if the accelerator should be enabled
* @return true if successful, false otherwise
*/
- bool init( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
/**
@@ -138,21 +138,21 @@ class KDECORE_EXPORT KAccelAction
* @return the name of the accelerator action, can be null if not
* set
*/
- const QString& name() const { return m_sName; }
+ const TQString& name() const { return m_sName; }
/**
* Returns the label of the accelerator action.
* @return the label of the accelerator action, can be null if
* not set
*/
- const QString& label() const { return m_sLabel; }
+ const TQString& label() const { return m_sLabel; }
/**
* Returns the What's This text of the accelerator action.
* @return the What's This text of the accelerator action, can be
* null if not set
*/
- const QString& whatsThis() const { return m_sWhatsThis; }
+ const TQString& whatsThis() const { return m_sWhatsThis; }
/**
* The shortcut that is actually used (may be used configured).
@@ -194,7 +194,7 @@ class KDECORE_EXPORT KAccelAction
* Returns the receiver of signals.
* @return the receiver of signals (can be 0 if not set)
*/
- const QObject* objSlotPtr() const { return m_pObjSlot; }
+ const TQObject* objSlotPtr() const { return m_pObjSlot; }
/**
* Returns the slot for the signal.
@@ -218,19 +218,19 @@ class KDECORE_EXPORT KAccelAction
* Sets the name of the accelerator action.
* @param name the new name
*/
- void setName( const QString& name );
+ void setName( const TQString& name );
/**
* Sets the user-readable label of the accelerator action.
* @param label the new label (i18n!)
*/
- void setLabel( const QString& label );
+ void setLabel( const TQString& label );
/**
* Sets the What's This text for the accelerator action.
* @param whatsThis the new What's This text (i18n!)
*/
- void setWhatsThis( const QString& whatsThis );
+ void setWhatsThis( const TQString& whatsThis );
/**
* Sets the new shortcut of the accelerator action.
@@ -244,7 +244,7 @@ class KDECORE_EXPORT KAccelAction
* @param pObjSlot the receiver object of the signal
* @param psMethodSlot the slot for the signal
*/
- void setSlot( const QObject* pObjSlot, const char* psMethodSlot );
+ void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enables or disabled configuring the action.
@@ -308,12 +308,12 @@ class KDECORE_EXPORT KAccelAction
* @return the string representation of the action's shortcut.
* @see KShortcut::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns true if four modifier keys will be used.
@@ -329,13 +329,13 @@ class KDECORE_EXPORT KAccelAction
static void useFourModifierKeys( bool use );
protected:
- QString m_sName /**< Name of accel. @sa setName() */,
+ TQString m_sName /**< Name of accel. @sa setName() */,
m_sLabel /**< Label of accel. User-visible. */,
m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
KShortcut m_cut /**< Shortcut actually assigned. */;
KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const QObject* m_pObjSlot /**< Object we will send signals to. */;
+ const TQObject* m_pObjSlot /**< Object we will send signals to. */;
const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
bool m_bConfigurable /**< Can this accel be configured by the user? */,
m_bEnabled /**< Is this accel enabled? */;
@@ -400,7 +400,7 @@ class KDECORE_EXPORT KAccelActions
* @param sGroup the group in the configuration file
* @return true if successful, false otherwise
*/
- bool init( KConfigBase& config, const QString& sGroup );
+ bool init( KConfigBase& config, const TQString& sGroup );
/**
* Updates the shortcuts of all actions in this object
@@ -415,7 +415,7 @@ class KDECORE_EXPORT KAccelActions
* @param sAction the action to search
* @return the index of the action, or -1 if not found
*/
- int actionIndex( const QString& sAction ) const;
+ int actionIndex( const TQString& sAction ) const;
/**
* Returns the action with the given @p index.
@@ -441,7 +441,7 @@ class KDECORE_EXPORT KAccelActions
* @return the KAccelAction with the given name, or 0
* if not found
*/
- KAccelAction* actionPtr( const QString& sAction );
+ KAccelAction* actionPtr( const TQString& sAction );
/**
* Returns the action with the given name.
@@ -449,7 +449,7 @@ class KDECORE_EXPORT KAccelActions
* @return the KAccelAction with the given name, or 0
* if not found
*/
- const KAccelAction* actionPtr( const QString& sAction ) const;
+ const KAccelAction* actionPtr( const TQString& sAction ) const;
/**
* Returns the action with the given key sequence.
@@ -494,9 +494,9 @@ class KDECORE_EXPORT KAccelActions
* @param bEnabled if true the accelerator should be enabled
* @return the new action
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot = 0, const char* psMethodSlot = 0,
+ const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -505,14 +505,14 @@ class KDECORE_EXPORT KAccelActions
* @param sLabel the label of the accelerator (i18n!)
* @return the new action
*/
- KAccelAction* insert( const QString& sName, const QString& sLabel );
+ KAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Removes the given action.
* @param sAction the name of the action.
* @return true if successful, false otherwise
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Loads the actions from the given configuration file.
@@ -521,7 +521,7 @@ class KDECORE_EXPORT KAccelActions
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- bool readActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
+ bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
/**
* Writes the actions to the given configuration file.
@@ -532,7 +532,7 @@ class KDECORE_EXPORT KAccelActions
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- bool writeActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
+ bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
/**
diff --git a/kdecore/kaccelbase.cpp b/kdecore/kaccelbase.cpp
index d8d0c36da..4ba4c9c3b 100644
--- a/kdecore/kaccelbase.cpp
+++ b/kdecore/kaccelbase.cpp
@@ -22,9 +22,9 @@
#include "kaccelbase.h"
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
#include <kconfig.h>
#include "kckey.h"
@@ -69,10 +69,10 @@ bool KAccelBase::isEnabled() const { return m_bEnabled; }
// to disable key grabbing even if enabled
bool KAccelBase::isEnabledInternal() const { return isEnabled(); }
-KAccelAction* KAccelBase::actionPtr( const QString& sAction )
+KAccelAction* KAccelBase::actionPtr( const TQString& sAction )
{ return m_rgActions.actionPtr( sAction ); }
-const KAccelAction* KAccelBase::actionPtr( const QString& sAction ) const
+const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
{ return m_rgActions.actionPtr( sAction ); }
KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
@@ -90,13 +90,13 @@ KAccelAction* KAccelBase::actionPtr( const KKey& key )
return actionPtr( k2 );
}
-void KAccelBase::setConfigGroup( const QString& sConfigGroup )
+void KAccelBase::setConfigGroup( const TQString& sConfigGroup )
{ m_sConfigGroup = sConfigGroup; }
void KAccelBase::setConfigGlobal( bool global )
{ m_bConfigIsGlobal = global; }
-bool KAccelBase::setActionEnabled( const QString& sAction, bool bEnable )
+bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
{
KAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
@@ -126,9 +126,9 @@ bool KAccelBase::setAutoUpdate( bool bAuto )
return b;
}
-KAccelAction* KAccelBase::insert( const QString& sAction, const QString& sDesc, const QString& sHelp,
+KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelBase::insert() begin" << endl;
@@ -145,10 +145,10 @@ KAccelAction* KAccelBase::insert( const QString& sAction, const QString& sDesc,
return pAction;
}
-KAccelAction* KAccelBase::insert( const QString& sName, const QString& sDesc )
+KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc )
{ return m_rgActions.insert( sName, sDesc ); }
-bool KAccelBase::remove( const QString& sAction )
+bool KAccelBase::remove( const TQString& sAction )
{
return m_rgActions.remove( sAction );
}
@@ -158,7 +158,7 @@ void KAccelBase::slotRemoveAction( KAccelAction* pAction )
removeConnection( pAction );
}
-bool KAccelBase::setActionSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{
kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
KAccelAction* pAction = m_rgActions.actionPtr( sAction );
@@ -318,7 +318,7 @@ bool KAccelBase::updateConnections()
kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl;
// Retrieve the list of keys to be connected, sorted by priority.
// (key, variation, seq)
- QValueVector<X> rgKeys;
+ TQValueVector<X> rgKeys;
createKeyList( rgKeys );
m_rgActionsNonUnique.clear();
@@ -410,7 +410,7 @@ bool KAccelBase::updateConnections()
#ifndef NDEBUG
for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
kdDebug(125) << "Key: " << it.key().key().toStringInternal() << " => '"
- << (((*it).pAction) ? (*it).pAction->name() : QString::null) << "'" << endl;
+ << (((*it).pAction) ? (*it).pAction->name() : TQString::null) << "'" << endl;
}
#endif
#endif //Q_WS_X11
@@ -419,7 +419,7 @@ bool KAccelBase::updateConnections()
#ifdef Q_WS_X11
// Construct a list of keys to be connected, sorted highest priority first.
-void KAccelBase::createKeyList( QValueVector<struct X>& rgKeys )
+void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
{
//kdDebug(125) << "KAccelBase::createKeyList()" << endl;
if( !isEnabledInternal())
@@ -548,7 +548,7 @@ bool KAccelBase::removeConnection( KAccelAction* pAction )
return true;
}
-bool KAccelBase::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
{
KAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
@@ -576,7 +576,7 @@ void KAccelBase::writeSettings( KConfigBase* pConfig ) const
m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal );
}
-QPopupMenu* KAccelBase::createPopupMenu( QWidget* pParent, const KKeySequence& seq )
+TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
{
KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq );
@@ -604,8 +604,8 @@ QPopupMenu* KAccelBase::createPopupMenu( QWidget* pParent, const KKeySequence& s
pMenu->insertAction( i, seqAction );
- //kdDebug(125) << "sLabel = " << sLabel << ", seq = " << (QString)seqMenu.qt() << ", i = " << i << endl;
- //kdDebug(125) << "pMenu->accel(" << i << ") = " << (QString)pMenu->accel(i) << endl;
+ //kdDebug(125) << "sLabel = " << sLabel << ", seq = " << (TQString)seqMenu.qt() << ", i = " << i << endl;
+ //kdDebug(125) << "pMenu->accel(" << i << ") = " << (TQString)pMenu->accel(i) << endl;
bActionInserted = true;
break;
}
diff --git a/kdecore/kaccelbase.h b/kdecore/kaccelbase.h
index c1fe515e6..3f6797f79 100644
--- a/kdecore/kaccelbase.h
+++ b/kdecore/kaccelbase.h
@@ -20,11 +20,11 @@
#ifndef _KACCELBASE_H
#define _KACCELBASE_H
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
#include "kaccelaction.h"
#include "kkeyserver.h"
@@ -79,11 +79,11 @@ class QWidget;
* a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
* // Insert an action "Scroll Down" which is not associated with any key:
* a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, SLOT( scrollUp() ) );
+ * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
* // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
* // is done automatially with the
* // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, SLOT( printDoc() ) );
+ * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
*
* a->readSettings();
*\endcode
@@ -93,12 +93,12 @@ class QWidget;
*
* \code
* int id;
- * id = popup->insertItem("&Print",this, SLOT(printDoc()));
+ * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
* a->changeMenuAccel(popup, id, KStdAccel::Print );
* \endcode
*
* If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, SLOT(printDoc()));
+ * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
* it might be a good idea to insert the standard action before as
* a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
* as well, so that the user can easily find the corresponding function.
@@ -107,7 +107,7 @@ class QWidget;
* in a menu could be done with
*
* \code
- * id = popup->insertItem(i18n"Scroll &up",this, SLOT(scrollUp()));
+ * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
* a->changeMenuAccel(popup, id, "Scroll Up" );
* \endcode
*
@@ -141,9 +141,9 @@ class KDECORE_EXPORT KAccelBase
bool isEnabled() const;
/** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const QString& sAction );
+ KAccelAction* actionPtr( const TQString& sAction );
/** Const version of the above. */
- const KAccelAction* actionPtr( const QString& sAction ) const;
+ const KAccelAction* actionPtr( const TQString& sAction ) const;
/** Returns a pointer to the KAccelAction associated with
* the key @p key. This function takes into account the
* key mapping defined in the constructor.
@@ -160,11 +160,11 @@ class KDECORE_EXPORT KAccelBase
/** Returns the name of the configuration group these
* accelerators are stored in. The default is "Shortcuts".
*/
- const QString& configGroup() const { return m_sConfigGroup; }
+ const TQString& configGroup() const { return m_sConfigGroup; }
/** Set the group (in the configuration file) for storing
* accelerators.
*/
- void setConfigGroup( const QString& group );
+ void setConfigGroup( const TQString& group );
void setConfigGlobal( bool global );
/** Enables or disables the accelerator.
* @param bEnabled determines whether the accelerator should be enabled or
@@ -181,21 +181,21 @@ class KDECORE_EXPORT KAccelBase
// Procedures for manipulating Actions.
//void clearActions();
- KAccelAction* insert( const QString& sName, const QString& sDesc );
+ KAccelAction* insert( const TQString& sName, const TQString& sDesc );
KAccelAction* insert(
- const QString& sAction, const QString& sDesc, const QString& sHelp,
+ const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
- bool remove( const QString& sAction );
- bool setActionSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool remove( const TQString& sAction );
+ bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
bool updateConnections();
- bool setShortcut( const QString& sAction, const KShortcut& cut );
+ bool setShortcut( const TQString& sAction, const KShortcut& cut );
// Modify individual Action sub-items
- bool setActionEnabled( const QString& sAction, bool bEnable );
+ bool setActionEnabled( const TQString& sAction, bool bEnable );
/**
* Read all key associations from @p config, or (if @p config
@@ -214,7 +214,7 @@ class KDECORE_EXPORT KAccelBase
*/
void writeSettings( KConfigBase* pConfig = 0 ) const;
- QPopupMenu* createPopupMenu( QWidget* pParent, const KKeySequence& );
+ TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
// Protected methods
protected:
@@ -225,7 +225,7 @@ class KDECORE_EXPORT KAccelBase
/** Constructs a list of keys to be connected, sorted highest priority first.
* @param rgKeys constructed list of keys
*/
- void createKeyList( QValueVector<struct X>& rgKeys );
+ void createKeyList( TQValueVector<struct X>& rgKeys );
bool insertConnection( KAccelAction* );
bool removeConnection( KAccelAction* );
@@ -261,15 +261,15 @@ class KDECORE_EXPORT KAccelBase
ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
{ pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
};
- typedef QMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
+ typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
KAccelActions m_rgActions;
KKeyToActionMap m_mapKeyToAction;
- QValueList<KAccelAction*> m_rgActionsNonUnique;
+ TQValueList<KAccelAction*> m_rgActionsNonUnique;
bool m_bNativeKeys; // Use native key codes instead of Qt codes
bool m_bEnabled;
bool m_bConfigIsGlobal;
- QString m_sConfigGroup;
+ TQString m_sConfigGroup;
bool m_bAutoUpdate;
KAccelAction* mtemp_pActionRemoving;
diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp
index b0aaab4f3..1b5ea4d24 100644
--- a/kdecore/kaccelmanager.cpp
+++ b/kdecore/kaccelmanager.cpp
@@ -19,26 +19,26 @@
#include "kaccelmanager.h"
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmenubar.h>
-#include <qmemarray.h>
-#include <qmetaobject.h>
-#include <qmainwindow.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtabbar.h>
-#include <qtextview.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmenubar.h>
+#include <tqmemarray.h>
+#include <tqmetaobject.h>
+#include <tqmainwindow.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtabbar.h>
+#include <tqtextview.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
#include <kstdaction.h>
#include <kstaticdeleter.h>
@@ -74,45 +74,45 @@ class KAcceleratorManagerPrivate
{
public:
- static void manage(QWidget *widget);
+ static void manage(TQWidget *widget);
static bool programmers_mode;
- static bool standardName(const QString &str);
+ static bool standardName(const TQString &str);
static bool checkChange(const KAccelString &as) {
- QString t2 = as.accelerated();
- QString t1 = as.originalText();
+ TQString t2 = as.accelerated();
+ TQString t1 = as.originalText();
if (t1 != t2)
{
if (as.accel() == -1) {
- removed_string += "<tr><td>" + QStyleSheet::escape(t1) + "</td></tr>";
+ removed_string += "<tr><td>" + TQStyleSheet::escape(t1) + "</td></tr>";
} else if (as.originalAccel() == -1) {
- added_string += "<tr><td>" + QStyleSheet::escape(t2) + "</td></tr>";
+ added_string += "<tr><td>" + TQStyleSheet::escape(t2) + "</td></tr>";
} else {
- changed_string += "<tr><td>" + QStyleSheet::escape(t1) + "</td>";
- changed_string += "<td>" + QStyleSheet::escape(t2) + "</td></tr>";
+ changed_string += "<tr><td>" + TQStyleSheet::escape(t1) + "</td>";
+ changed_string += "<td>" + TQStyleSheet::escape(t2) + "</td></tr>";
}
return true;
}
return false;
}
- static QString changed_string;
- static QString added_string;
- static QString removed_string;
- static QMap<QWidget *, int> ignored_widgets;
+ static TQString changed_string;
+ static TQString added_string;
+ static TQString removed_string;
+ static TQMap<TQWidget *, int> ignored_widgets;
private:
class Item;
public:
- typedef QPtrList<Item> ItemList;
+ typedef TQPtrList<Item> ItemList;
private:
- static void traverseChildren(QWidget *widget, Item *item);
+ static void traverseChildren(TQWidget *widget, Item *item);
- static void manageWidget(QWidget *widget, Item *item);
- static void manageMenuBar(QMenuBar *mbar, Item *item);
- static void manageTabBar(QTabBar *bar, Item *item);
+ static void manageWidget(TQWidget *widget, Item *item);
+ static void manageMenuBar(TQMenuBar *mbar, Item *item);
+ static void manageTabBar(TQTabBar *bar, Item *item);
- static void calculateAccelerators(Item *item, QString &used);
+ static void calculateAccelerators(Item *item, TQString &used);
class Item
{
@@ -123,7 +123,7 @@ private:
void addChild(Item *item);
- QWidget *m_widget;
+ TQWidget *m_widget;
KAccelString m_content;
ItemList *m_children;
int m_index;
@@ -133,17 +133,17 @@ private:
bool KAcceleratorManagerPrivate::programmers_mode = false;
-QString KAcceleratorManagerPrivate::changed_string;
-QString KAcceleratorManagerPrivate::added_string;
-QString KAcceleratorManagerPrivate::removed_string;
-static QStringList *kaccmp_sns = 0;
-static KStaticDeleter<QStringList> kaccmp_sns_d;
-QMap<QWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
+TQString KAcceleratorManagerPrivate::changed_string;
+TQString KAcceleratorManagerPrivate::added_string;
+TQString KAcceleratorManagerPrivate::removed_string;
+static TQStringList *kaccmp_sns = 0;
+static KStaticDeleter<TQStringList> kaccmp_sns_d;
+TQMap<TQWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
-bool KAcceleratorManagerPrivate::standardName(const QString &str)
+bool KAcceleratorManagerPrivate::standardName(const TQString &str)
{
if (!kaccmp_sns)
- kaccmp_sns_d.setObject(kaccmp_sns, new QStringList(KStdAction::internal_stdNames()));
+ kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames()));
return kaccmp_sns->contains(str);
}
@@ -163,7 +163,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item)
m_children->append(item);
}
-void KAcceleratorManagerPrivate::manage(QWidget *widget)
+void KAcceleratorManagerPrivate::manage(TQWidget *widget)
{
if (!widget)
{
@@ -171,10 +171,10 @@ void KAcceleratorManagerPrivate::manage(QWidget *widget)
return;
}
- if (dynamic_cast<QPopupMenu*>(widget))
+ if (dynamic_cast<TQPopupMenu*>(widget))
{
// create a popup accel manager that can deal with dynamic menus
- KPopupAccelManager::manage(static_cast<QPopupMenu*>(widget));
+ KPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
return;
}
@@ -182,13 +182,13 @@ void KAcceleratorManagerPrivate::manage(QWidget *widget)
manageWidget(widget, root);
- QString used;
+ TQString used;
calculateAccelerators(root, used);
delete root;
}
-void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used)
+void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
{
if (!item->m_children)
return;
@@ -211,19 +211,19 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
{
cnt++;
- QTabBar *tabBar = dynamic_cast<QTabBar*>(it->m_widget);
+ TQTabBar *tabBar = dynamic_cast<TQTabBar*>(it->m_widget);
if (tabBar)
{
if (checkChange(contents[cnt]))
tabBar->tabAt(it->m_index)->setText(contents[cnt].accelerated());
continue;
}
- QMenuBar *menuBar = dynamic_cast<QMenuBar*>(it->m_widget);
+ TQMenuBar *menuBar = dynamic_cast<TQMenuBar*>(it->m_widget);
if (menuBar)
{
if (it->m_index >= 0)
{
- QMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index));
+ TQMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index));
if (mitem)
{
checkChange(contents[cnt]);
@@ -233,10 +233,10 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
}
}
// we possibly reserved an accel, but we won't set it as it looks silly
- if ( dynamic_cast<QGroupBox*>( it->m_widget ) )
+ if ( dynamic_cast<TQGroupBox*>( it->m_widget ) )
continue;
// links look weird with ampersands
- if ( dynamic_cast<QLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") )
+ if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") )
continue;
int tprop = it->m_widget->metaObject()->findProperty("text", true);
@@ -260,14 +260,14 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
}
-void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item)
+void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
{
- QObjectList *childList = widget->queryList("QWidget", 0, false, false);
- for ( QObject *it = childList->first(); it; it = childList->next() )
+ TQObjectList *childList = widget->queryList("TQWidget", 0, false, false);
+ for ( TQObject *it = childList->first(); it; it = childList->next() )
{
- QWidget *w = static_cast<QWidget*>(it);
+ TQWidget *w = static_cast<TQWidget*>(it);
- if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<QPopupMenu*>(w) == NULL ) )
+ if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) )
continue;
if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
@@ -278,25 +278,25 @@ void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item)
delete childList;
}
-void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
+void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
{
// first treat the special cases
- QTabBar *tabBar = dynamic_cast<QTabBar*>(w);
+ TQTabBar *tabBar = dynamic_cast<TQTabBar*>(w);
if (tabBar)
{
manageTabBar(tabBar, item);
return;
}
- QWidgetStack *wds = dynamic_cast<QWidgetStack*>( w );
+ TQWidgetStack *wds = dynamic_cast<TQWidgetStack*>( w );
if ( wds )
{
QWidgetStackAccelManager::manage( wds );
// return;
}
- QPopupMenu *popupMenu = dynamic_cast<QPopupMenu*>(w);
+ TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu*>(w);
if (popupMenu)
{
// create a popup accel manager that can deal with dynamic menus
@@ -304,45 +304,45 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
return;
}
- QWidgetStack *wdst = dynamic_cast<QWidgetStack*>( w );
+ TQWidgetStack *wdst = dynamic_cast<TQWidgetStack*>( w );
if ( wdst )
{
QWidgetStackAccelManager::manage( wdst );
// return;
}
- QMenuBar *menuBar = dynamic_cast<QMenuBar*>(w);
+ TQMenuBar *menuBar = dynamic_cast<TQMenuBar*>(w);
if (menuBar)
{
manageMenuBar(menuBar, item);
return;
}
- if (dynamic_cast<QComboBox*>(w) || dynamic_cast<QLineEdit*>(w) ||
- dynamic_cast<QTextEdit*>(w) || dynamic_cast<QTextView*>(w) ||
- dynamic_cast<QSpinBox*>(w) || w->qt_cast( "KMultiTabBar" ))
+ if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) ||
+ dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) ||
+ dynamic_cast<TQSpinBox*>(w) || w->qt_cast( "KMultiTabBar" ))
return;
// now treat 'ordinary' widgets
- QLabel *label = dynamic_cast<QLabel*>(w);
+ TQLabel *label = dynamic_cast<TQLabel*>(w);
if ( label ) {
if ( !label->buddy() )
label = 0;
else {
if ( label->textFormat() == Qt::RichText ||
( label->textFormat() == Qt::AutoText &&
- QStyleSheet::mightBeRichText( label->text() ) ) )
+ TQStyleSheet::mightBeRichText( label->text() ) ) )
label = 0;
}
}
- if (w->isFocusEnabled() || label || dynamic_cast<QGroupBox*>(w) || dynamic_cast<QRadioButton*>( w ))
+ if (w->isFocusEnabled() || label || dynamic_cast<TQGroupBox*>(w) || dynamic_cast<TQRadioButton*>( w ))
{
- QString content;
- QVariant variant;
+ TQString content;
+ TQVariant variant;
int tprop = w->metaObject()->findProperty("text", true);
if (tprop != -1) {
- const QMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->metaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
else
@@ -352,7 +352,7 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
if (tprop == -1) {
tprop = w->metaObject()->findProperty("title", true);
if (tprop != -1) {
- const QMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->metaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
}
@@ -368,11 +368,11 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
// put some more weight on the usual action elements
int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
- if (dynamic_cast<QPushButton*>(w) || dynamic_cast<QCheckBox*>(w) || dynamic_cast<QRadioButton*>(w) || dynamic_cast<QLabel*>(w))
+ if (dynamic_cast<TQPushButton*>(w) || dynamic_cast<TQCheckBox*>(w) || dynamic_cast<TQRadioButton*>(w) || dynamic_cast<TQLabel*>(w))
weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
// don't put weight on group boxes, as usually the contents are more important
- if (dynamic_cast<QGroupBox*>(w))
+ if (dynamic_cast<TQGroupBox*>(w))
weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
// put a lot of extra weight on the KDialogBaseButton's
@@ -386,11 +386,11 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
traverseChildren(w, item);
}
-void KAcceleratorManagerPrivate::manageTabBar(QTabBar *bar, Item *item)
+void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
{
for (int i=0; i<bar->count(); i++)
{
- QString content = bar->tabAt(i)->text();
+ TQString content = bar->tabAt(i)->text();
if (content.isEmpty())
continue;
@@ -402,10 +402,10 @@ void KAcceleratorManagerPrivate::manageTabBar(QTabBar *bar, Item *item)
}
}
-void KAcceleratorManagerPrivate::manageMenuBar(QMenuBar *mbar, Item *item)
+void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
{
- QMenuItem *mitem;
- QString s;
+ TQMenuItem *mitem;
+ TQString s;
for (uint i=0; i<mbar->count(); ++i)
{
@@ -446,22 +446,22 @@ void KAcceleratorManagerPrivate::manageMenuBar(QMenuBar *mbar, Item *item)
*********************************************************************/
-void KAcceleratorManager::manage(QWidget *widget)
+void KAcceleratorManager::manage(TQWidget *widget)
{
KAcceleratorManager::manage(widget, false);
}
-void KAcceleratorManager::manage(QWidget *widget, bool programmers_mode)
+void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
{
kdDebug(131) << "KAcceleratorManager::manage\n";
- KAcceleratorManagerPrivate::changed_string = QString::null;
- KAcceleratorManagerPrivate::added_string = QString::null;
- KAcceleratorManagerPrivate::removed_string = QString::null;
+ KAcceleratorManagerPrivate::changed_string = TQString::null;
+ KAcceleratorManagerPrivate::added_string = TQString::null;
+ KAcceleratorManagerPrivate::removed_string = TQString::null;
KAcceleratorManagerPrivate::programmers_mode = programmers_mode;
KAcceleratorManagerPrivate::manage(widget);
}
-void KAcceleratorManager::last_manage(QString &added, QString &changed, QString &removed)
+void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
{
added = KAcceleratorManagerPrivate::added_string;
changed = KAcceleratorManagerPrivate::changed_string;
@@ -475,7 +475,7 @@ void KAcceleratorManager::last_manage(QString &added, QString &changed, QString
*********************************************************************/
-KAccelString::KAccelString(const QString &input, int initialWeight)
+KAccelString::KAccelString(const TQString &input, int initialWeight)
: m_pureText(input), m_weight()
{
m_orig_accel = m_pureText.find("(!)&");
@@ -502,9 +502,9 @@ KAccelString::KAccelString(const QString &input, int initialWeight)
}
-QString KAccelString::accelerated() const
+TQString KAccelString::accelerated() const
{
- QString result = m_origText;
+ TQString result = m_origText;
if (result.isEmpty())
return result;
@@ -531,10 +531,10 @@ QString KAccelString::accelerated() const
}
-QChar KAccelString::accelerator() const
+TQChar KAccelString::accelerator() const
{
if ((m_accel < 0) || (m_accel > (int)m_pureText.length()))
- return QChar();
+ return TQChar();
return m_pureText[m_accel].lower();
}
@@ -549,7 +549,7 @@ void KAccelString::calculateWeights(int initialWeight)
while (pos<m_pureText.length())
{
- QChar c = m_pureText[pos];
+ TQChar c = m_pureText[pos];
int weight = initialWeight+1;
@@ -591,9 +591,9 @@ void KAccelString::calculateWeights(int initialWeight)
}
-int KAccelString::stripAccelerator(QString &text)
+int KAccelString::stripAccelerator(TQString &text)
{
- // Note: this code is derived from QAccel::shortcutKey
+ // Note: this code is derived from TQAccel::shortcutKey
int p = 0;
while (p >= 0)
@@ -605,7 +605,7 @@ int KAccelString::stripAccelerator(QString &text)
if (text[p] != '&')
{
- QChar c = text[p];
+ TQChar c = text[p];
if (c.isPrint())
{
text.remove(p-1,1);
@@ -620,7 +620,7 @@ int KAccelString::stripAccelerator(QString &text)
}
-int KAccelString::maxWeight(int &index, const QString &used)
+int KAccelString::maxWeight(int &index, const TQString &used)
{
int max = 0;
index = -1;
@@ -639,9 +639,9 @@ int KAccelString::maxWeight(int &index, const QString &used)
void KAccelString::dump()
{
- QString s;
+ TQString s;
for (uint i=0; i<m_weight.count(); ++i)
- s += QString("%1(%2) ").arg(pure()[i]).arg(m_weight[i]);
+ s += TQString("%1(%2) ").arg(pure()[i]).arg(m_weight[i]);
kdDebug() << "s " << s << endl;
}
@@ -679,7 +679,7 @@ void KAccelString::dump()
*********************************************************************/
-void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, QString &used)
+void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString &used)
{
kdDebug(131) << "findAccelerators\n";
KAccelStringList accel_strings = result;
@@ -726,15 +726,15 @@ void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, QString
/*********************************************************************
- class KPopupAccelManager - managing QPopupMenu widgets dynamically
+ class KPopupAccelManager - managing TQPopupMenu widgets dynamically
*********************************************************************/
-KPopupAccelManager::KPopupAccelManager(QPopupMenu *popup)
- : QObject(popup), m_popup(popup), m_count(-1)
+KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
+ : TQObject(popup), m_popup(popup), m_count(-1)
{
aboutToShow(); // do one check and then connect to show
- connect(popup, SIGNAL(aboutToShow()), SLOT(aboutToShow()));
+ connect(popup, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShow()));
}
@@ -767,7 +767,7 @@ void KPopupAccelManager::aboutToShow()
void KPopupAccelManager::calculateAccelerators()
{
// find the new accelerators
- QString used;
+ TQString used;
KAccelManagerAlgorithm::findAccelerators(m_entries, used);
// change the menu entries
@@ -777,8 +777,8 @@ void KPopupAccelManager::calculateAccelerators()
void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
{
- QMenuItem *mitem;
- QString s;
+ TQMenuItem *mitem;
+ TQString s;
list.clear();
@@ -807,7 +807,7 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
{
- QMenuItem *mitem;
+ TQMenuItem *mitem;
uint cnt = 0;
for (uint i=0; i<m_popup->count(); i++)
@@ -823,36 +823,36 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
}
-void KPopupAccelManager::manage(QPopupMenu *popup)
+void KPopupAccelManager::manage(TQPopupMenu *popup)
{
// don't add more than one manager to a popup
if (popup->child(0, "KPopupAccelManager", false) == 0 )
new KPopupAccelManager(popup);
}
-void QWidgetStackAccelManager::manage( QWidgetStack *stack )
+void QWidgetStackAccelManager::manage( TQWidgetStack *stack )
{
if ( stack->child( 0, "QWidgetStackAccelManager", false ) == 0 )
new QWidgetStackAccelManager( stack );
}
-QWidgetStackAccelManager::QWidgetStackAccelManager(QWidgetStack *stack)
- : QObject(stack), m_stack(stack)
+QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack)
+ : TQObject(stack), m_stack(stack)
{
aboutToShow(stack->visibleWidget()); // do one check and then connect to show
- connect(stack, SIGNAL(aboutToShow(QWidget *)), SLOT(aboutToShow(QWidget *)));
+ connect(stack, TQT_SIGNAL(aboutToShow(TQWidget *)), TQT_SLOT(aboutToShow(TQWidget *)));
}
-bool QWidgetStackAccelManager::eventFilter ( QObject * watched, QEvent * e )
+bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e )
{
- if ( e->type() == QEvent::Show && qApp->activeWindow() ) {
+ if ( e->type() == TQEvent::Show && qApp->activeWindow() ) {
KAcceleratorManager::manage( qApp->activeWindow() );
watched->removeEventFilter( this );
}
return false;
}
-void QWidgetStackAccelManager::aboutToShow(QWidget *child)
+void QWidgetStackAccelManager::aboutToShow(TQWidget *child)
{
if (!child)
{
@@ -863,7 +863,7 @@ void QWidgetStackAccelManager::aboutToShow(QWidget *child)
child->installEventFilter( this );
}
-void KAcceleratorManager::setNoAccel( QWidget *widget )
+void KAcceleratorManager::setNoAccel( TQWidget *widget )
{
KAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
}
diff --git a/kdecore/kaccelmanager.h b/kdecore/kaccelmanager.h
index 7619d2e29..b4869f072 100644
--- a/kdecore/kaccelmanager.h
+++ b/kdecore/kaccelmanager.h
@@ -61,7 +61,7 @@ public:
* @param widget The toplevel widget you want to manage.
*/
- static void manage(QWidget *widget);
+ static void manage(TQWidget *widget);
/**
* Does the same as the above function, but puts hints in the GUI so the
@@ -72,16 +72,16 @@ public:
* @param programmers_mode if true, KAcceleratorManager adds (&) for removed
* accels and & before added accels
*/
- static void manage(QWidget *widget, bool programmers_mode);
+ static void manage(TQWidget *widget, bool programmers_mode);
/** \internal returns the result of the last manage operation. */
- static void last_manage(QString &added, QString &changed, QString &removed);
+ static void last_manage(TQString &added, TQString &changed, TQString &removed);
/**
* Use this method for a widget (and its children) you want no accels to be set on.
* @since 3.4
*/
- static void setNoAccel( QWidget *widget );
+ static void setNoAccel( TQWidget *widget );
};
diff --git a/kdecore/kaccelmanager_private.h b/kdecore/kaccelmanager_private.h
index 74c844e1d..e19b5a9a5 100644
--- a/kdecore/kaccelmanager_private.h
+++ b/kdecore/kaccelmanager_private.h
@@ -22,10 +22,10 @@
#define __KACCELMANAGER_PRIVATE_H__
-#include <qstring.h>
-#include <qmemarray.h>
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
class QWidgetStack;
@@ -44,40 +44,40 @@ class KAccelString
public:
KAccelString() : m_pureText(), m_accel(-1) {}
- KAccelString(const QString &input, int initalWeight=-1);
+ KAccelString(const TQString &input, int initalWeight=-1);
void calculateWeights(int initialWeight);
- const QString &pure() const { return m_pureText; }
- QString accelerated() const;
+ const TQString &pure() const { return m_pureText; }
+ TQString accelerated() const;
int accel() const { return m_accel; }
void setAccel(int accel) { m_accel = accel; }
int originalAccel() const { return m_orig_accel; }
- QString originalText() const { return m_origText; }
+ TQString originalText() const { return m_origText; }
- QChar accelerator() const;
+ TQChar accelerator() const;
- int maxWeight(int &index, const QString &used);
+ int maxWeight(int &index, const TQString &used);
bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
private:
- int stripAccelerator(QString &input);
+ int stripAccelerator(TQString &input);
void dump();
- QString m_pureText, m_origText;
+ TQString m_pureText, m_origText;
int m_accel, m_orig_accel;
- QMemArray<int> m_weight;
+ TQMemArray<int> m_weight;
};
-typedef QValueList<KAccelString> KAccelStringList;
+typedef TQValueList<KAccelString> KAccelStringList;
/**
@@ -114,7 +114,7 @@ public:
};
/// Method to call to find the best distribution of accelerators.
- static void findAccelerators(KAccelStringList &result, QString &used);
+ static void findAccelerators(KAccelStringList &result, TQString &used);
};
@@ -137,12 +137,12 @@ class KPopupAccelManager : public QObject
public:
- static void manage(QPopupMenu *popup);
+ static void manage(TQPopupMenu *popup);
protected:
- KPopupAccelManager(QPopupMenu *popup);
+ KPopupAccelManager(TQPopupMenu *popup);
private slots:
@@ -157,7 +157,7 @@ private:
void findMenuEntries(KAccelStringList &list);
void setMenuEntries(const KAccelStringList &list);
- QPopupMenu *m_popup;
+ TQPopupMenu *m_popup;
KAccelStringList m_entries;
int m_count;
@@ -170,24 +170,24 @@ class QWidgetStackAccelManager : public QObject
public:
- static void manage(QWidgetStack *popup);
+ static void manage(TQWidgetStack *popup);
protected:
- QWidgetStackAccelManager(QWidgetStack *popup);
+ QWidgetStackAccelManager(TQWidgetStack *popup);
private slots:
- void aboutToShow(QWidget *);
- bool eventFilter ( QObject * watched, QEvent * e );
+ void aboutToShow(TQWidget *);
+ bool eventFilter ( TQObject * watched, TQEvent * e );
private:
void calculateAccelerators();
- QWidgetStack *m_stack;
+ TQWidgetStack *m_stack;
KAccelStringList m_entries;
};
diff --git a/kdecore/kaccelprivate.h b/kdecore/kaccelprivate.h
index 7938aca0c..0a6cdc19b 100644
--- a/kdecore/kaccelprivate.h
+++ b/kdecore/kaccelprivate.h
@@ -2,30 +2,30 @@
#define __KACCELPRIVATE_H
#include "kkeyserver_x11.h"
-#include <qtimer.h>
+#include <tqtimer.h>
class KAccelAction;
/**
* @internal
*/
-class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
+class KDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase
{
Q_OBJECT
public:
KAccel* m_pAccel;
- QWidget* m_pWatch;
- QMap<int, int> m_mapIDToKey;
- QMap<int, KAccelAction*> m_mapIDToAction;
- QTimer m_timerShowMenu;
+ TQWidget* m_pWatch;
+ TQMap<int, int> m_mapIDToKey;
+ TQMap<int, KAccelAction*> m_mapIDToAction;
+ TQTimer m_timerShowMenu;
- KAccelPrivate( KAccel* pParent, QWidget* pWatch );
+ KAccelPrivate( KAccel* pParent, TQWidget* pWatch );
virtual void setEnabled( bool bEnabled );
- bool setEnabled( const QString& sAction, bool bEnable );
+ bool setEnabled( const TQString& sAction, bool bEnable );
- virtual bool removeAction( const QString& sAction );
+ virtual bool removeAction( const TQString& sAction );
virtual bool emitSignal( KAccelBase::Signal signal );
virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
@@ -47,7 +47,7 @@ class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
void slotShowMenu();
void slotMenuActivated( int iAction );
- bool eventFilter( QObject* pWatched, QEvent* pEvent ); // virtual method from QObject
+ bool eventFilter( TQObject* pWatched, TQEvent* pEvent ); // virtual method from QObject
};
#endif // !__KACCELPRIVATE_H
diff --git a/kdecore/kallocator.cpp b/kdecore/kallocator.cpp
index 6ad524dec..c02bbf3ff 100644
--- a/kdecore/kallocator.cpp
+++ b/kdecore/kallocator.cpp
@@ -88,7 +88,7 @@ void KZoneAllocator::insertHash(MemBlock *b)
unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (!hashList[key])
- hashList[key] = new QValueList<MemBlock *>;
+ hashList[key] = new TQValueList<MemBlock *>;
hashList[key]->append(b);
adr += blockSize;
}
@@ -134,8 +134,8 @@ void KZoneAllocator::initHash()
hashSize = 1024;
if (hashSize > 64*1024)
hashSize = 64*1024;
- hashList = new QValueList<MemBlock *> *[hashSize];
- memset (hashList, 0, sizeof(QValueList<MemBlock*> *) * hashSize);
+ hashList = new TQValueList<MemBlock *> *[hashSize];
+ memset (hashList, 0, sizeof(TQValueList<MemBlock*> *) * hashSize);
hashDirty = false;
for (MemBlock *b = currentBlock; b; b = b->older)
insertHash(b);
@@ -156,9 +156,9 @@ void KZoneAllocator::delBlock(MemBlock *b)
unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (hashList[key]) {
- QValueList<MemBlock *> *list = hashList[key];
- QValueList<MemBlock *>::Iterator it = list->begin();
- QValueList<MemBlock *>::Iterator endit = list->end();
+ TQValueList<MemBlock *> *list = hashList[key];
+ TQValueList<MemBlock *>::Iterator it = list->begin();
+ TQValueList<MemBlock *>::Iterator endit = list->end();
for (; it != endit; ++it)
if (*it == b) {
list->remove(it);
@@ -210,15 +210,15 @@ KZoneAllocator::deallocate(void *ptr)
initHash();
unsigned long key = (((unsigned long)ptr) >> log2) & (hashSize - 1);
- QValueList<MemBlock *> *list = hashList[key];
+ TQValueList<MemBlock *> *list = hashList[key];
if (!list) {
/* Can happen with certain usage pattern of intermixed free_since()
and deallocate(). */
//qDebug("Uhoh");
return;
}
- QValueList<MemBlock*>::ConstIterator it = list->begin();
- QValueList<MemBlock*>::ConstIterator endit = list->end();
+ TQValueList<MemBlock*>::ConstIterator it = list->begin();
+ TQValueList<MemBlock*>::ConstIterator endit = list->end();
for (; it != endit; ++it) {
MemBlock *cur = *it;
if (cur->is_in(ptr)) {
diff --git a/kdecore/kallocator.h b/kdecore/kallocator.h
index 755926c81..2fed42c85 100644
--- a/kdecore/kallocator.h
+++ b/kdecore/kallocator.h
@@ -26,7 +26,7 @@
#ifndef KALLOCATOR_H
#define KALLOCATOR_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KZoneAllocatorPrivate;
@@ -112,7 +112,7 @@ protected:
/** A single chunk of memory from the heap. @internal */
class MemBlock;
/**< A list of chunks. @internal */
- typedef QValueList<MemBlock *> MemList;
+ typedef TQValueList<MemBlock *> MemList;
void addBlock(MemBlock *b);
void delBlock(MemBlock *b);
void insertHash(MemBlock *b);
diff --git a/kdecore/kappdcopiface.cpp b/kdecore/kappdcopiface.cpp
index afe11ecc9..fc0198d87 100644
--- a/kdecore/kappdcopiface.cpp
+++ b/kdecore/kappdcopiface.cpp
@@ -39,12 +39,12 @@ void KAppDCOPInterface::disableSessionManagement()
}
-QCString KAppDCOPInterface::startupId()
+TQCString KAppDCOPInterface::startupId()
{
return "";
}
-QCString KAppDCOPInterface::caption()
+TQCString KAppDCOPInterface::caption()
{
return "";
}
diff --git a/kdecore/kappdcopiface.h b/kdecore/kappdcopiface.h
index 667885a05..448f08d66 100644
--- a/kdecore/kappdcopiface.h
+++ b/kdecore/kappdcopiface.h
@@ -21,8 +21,8 @@
#define KAPPDCOP_INTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <dcopref.h>
#include "kdelibs_export.h"
@@ -56,8 +56,8 @@ k_dcop:
**/
void disableSessionManagement();
- QCString startupId();
- QCString caption();
+ TQCString startupId();
+ TQCString caption();
void quit();
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index e89efe5b9..678d36677 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -21,28 +21,28 @@
#include "config.h"
#undef QT_NO_TRANSLATION
-#include <qtranslator.h>
+#include <tqtranslator.h>
#define QT_NO_TRANSLATION
-#include <qdir.h>
-#include <qptrcollection.h>
-#include <qwidgetlist.h>
-#include <qstrlist.h>
-#include <qfile.h>
-#include <qmessagebox.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qsessionmanager.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
-#include <qpixmapcache.h>
-#include <qtooltip.h>
-#include <qstylefactory.h>
-#include <qmetaobject.h>
+#include <tqdir.h>
+#include <tqptrcollection.h>
+#include <tqwidgetlist.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
+#include <tqmessagebox.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqsessionmanager.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
+#include <tqpixmapcache.h>
+#include <tqtooltip.h>
+#include <tqstylefactory.h>
+#include <tqmetaobject.h>
#ifndef QT_NO_SQL
-#include <qsqlpropertymap.h>
+#include <tqsqlpropertymap.h>
#endif
#undef QT_NO_TRANSLATION
@@ -67,7 +67,7 @@
#include <kstdaccel.h>
#include <kaccel.h>
#include "kcheckaccelerators.h"
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kmacroexpander.h>
#include <kshell.h>
#include <kprotocolinfo.h>
@@ -143,7 +143,7 @@ typedef void* IceIOErrorHandler;
#ifdef Q_WS_MACX
#include <Carbon/Carbon.h>
-#include <qimage.h>
+#include <tqimage.h>
#endif
#include "kappdcopiface.h"
@@ -170,7 +170,7 @@ static Atom kde_xdnd_drop;
// replaced by unpatched one
KDECORE_EXPORT bool qt_qclipboard_bailout_hack = false;
-template class QPtrList<KSessionManaged>;
+template class TQPtrList<KSessionManaged>;
#ifdef Q_WS_X11
extern "C" {
@@ -213,7 +213,7 @@ public:
refCount( 1 ),
oldIceIOErrorHandler( 0 ),
checkAccelerators( 0 ),
- overrideStyle( QString::null ),
+ overrideStyle( TQString::null ),
startup_id( "0" ),
app_started_timer( NULL ),
m_KAppDCOPInterface( 0L ),
@@ -246,10 +246,10 @@ public:
int refCount;
IceIOErrorHandler oldIceIOErrorHandler;
KCheckAccelerators* checkAccelerators;
- QString overrideStyle;
- QString geometry_arg;
- QCString startup_id;
- QTimer* app_started_timer;
+ TQString overrideStyle;
+ TQString geometry_arg;
+ TQCString startup_id;
+ TQTimer* app_started_timer;
KAppDCOPInterface *m_KAppDCOPInterface;
bool session_save;
#ifdef Q_WS_X11
@@ -275,9 +275,9 @@ public:
#define checkEqual(s, b) \
b = (s == "=");
- URLActionRule(const QString &act,
- const QString &bProt, const QString &bHost, const QString &bPath,
- const QString &dProt, const QString &dHost, const QString &dPath,
+ URLActionRule(const TQString &act,
+ const TQString &bProt, const TQString &bHost, const TQString &bPath,
+ const TQString &dProt, const TQString &dHost, const TQString &dPath,
bool perm)
: action(act),
baseProt(bProt), baseHost(bHost), basePath(bPath),
@@ -294,7 +294,7 @@ public:
checkEqual(destHost, destHostEqual);
}
- bool baseMatch(const KURL &url, const QString &protClass)
+ bool baseMatch(const KURL &url, const TQString &protClass)
{
if (baseProtWildCard)
{
@@ -331,7 +331,7 @@ public:
return true;
}
- bool destMatch(const KURL &url, const QString &protClass, const KURL &base, const QString &baseClass)
+ bool destMatch(const KURL &url, const TQString &protClass, const KURL &base, const TQString &baseClass)
{
if (destProtEqual)
{
@@ -379,13 +379,13 @@ public:
return true;
}
- QString action;
- QString baseProt;
- QString baseHost;
- QString basePath;
- QString destProt;
- QString destHost;
- QString destPath;
+ TQString action;
+ TQString baseProt;
+ TQString baseHost;
+ TQString basePath;
+ TQString destProt;
+ TQString destHost;
+ TQString destPath;
bool baseProtWildCard : 1;
bool baseHostWildCard : 1;
bool basePathWildCard : 1;
@@ -396,32 +396,32 @@ public:
bool destHostEqual : 1;
bool permission;
};
- QPtrList<URLActionRule> urlActionRestrictions;
+ TQPtrList<URLActionRule> urlActionRestrictions;
- QString sessionKey;
- QString pSessionConfigFile;
+ TQString sessionKey;
+ TQString pSessionConfigFile;
};
-static QPtrList<QWidget>*x11Filter = 0;
+static TQPtrList<TQWidget>*x11Filter = 0;
static bool autoDcopRegistration = true;
-void KApplication::installX11EventFilter( QWidget* filter )
+void KApplication::installX11EventFilter( TQWidget* filter )
{
if ( !filter )
return;
if (!x11Filter)
- x11Filter = new QPtrList<QWidget>;
- connect ( filter, SIGNAL( destroyed() ), this, SLOT( x11FilterDestroyed() ) );
+ x11Filter = new TQPtrList<TQWidget>;
+ connect ( filter, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( x11FilterDestroyed() ) );
x11Filter->append( filter );
}
void KApplication::x11FilterDestroyed()
{
- removeX11EventFilter( static_cast< const QWidget* >( sender()));
+ removeX11EventFilter( static_cast< const TQWidget* >( sender()));
}
-void KApplication::removeX11EventFilter( const QWidget* filter )
+void KApplication::removeX11EventFilter( const TQWidget* filter )
{
if ( !x11Filter || !filter )
return;
@@ -438,34 +438,34 @@ void KApplication::removeX11EventFilter( const QWidget* filter )
// in KAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02
extern bool kde_g_bKillAccelOverride;
-bool KApplication::notify(QObject *receiver, QEvent *event)
+bool KApplication::notify(TQObject *receiver, TQEvent *event)
{
- QEvent::Type t = event->type();
+ TQEvent::Type t = event->type();
if (kde_g_bKillAccelOverride)
{
kde_g_bKillAccelOverride = false;
// Indicate that the accelerator has been overridden.
- if (t == QEvent::AccelOverride)
+ if (t == TQEvent::AccelOverride)
{
- static_cast<QKeyEvent *>(event)->accept();
+ static_cast<TQKeyEvent *>(event)->accept();
return true;
}
else
kdWarning(125) << "kde_g_bKillAccelOverride set, but received an event other than AccelOverride." << endl;
}
- if ((t == QEvent::AccelOverride) || (t == QEvent::KeyPress))
+ if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{
static const KShortcut& _selectAll = KStdAccel::selectAll();
- QLineEdit *edit = ::qt_cast<QLineEdit *>(receiver);
+ TQLineEdit *edit = ::qt_cast<TQLineEdit *>(receiver);
if (edit)
{
// We have a keypress for a lineedit...
- QKeyEvent *kevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
KKey key(kevent);
if (_selectAll.contains(key))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
edit->selectAll();
return true;
@@ -478,11 +478,11 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
// Ctrl-U deletes from start of line.
if (key == KKey(Qt::CTRL + Qt::Key_U))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
if (!edit->isReadOnly())
{
- QString t(edit->text());
+ TQString t(edit->text());
t = t.mid(edit->cursorPosition());
edit->validateAndSet(t, 0, 0, 0);
}
@@ -495,14 +495,14 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
- QTextEdit *medit = ::qt_cast<QTextEdit *>(receiver);
+ TQTextEdit *medit = ::qt_cast<TQTextEdit *>(receiver);
if (medit)
{
// We have a keypress for a multilineedit...
- QKeyEvent *kevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
if (_selectAll.contains(KKey(kevent)))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
medit->selectAll();
return true;
@@ -514,19 +514,19 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
}
- if( t == QEvent::Show && receiver->isWidgetType())
+ if( t == TQEvent::Show && receiver->isWidgetType())
{
- QWidget* w = static_cast< QWidget* >( receiver );
+ TQWidget* w = static_cast< TQWidget* >( receiver );
#if defined Q_WS_X11
- if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<QShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
+ if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
KStartupInfo::setWindowStartupId( w->winId(), startupId());
#endif
if( w->isTopLevel() && !w->testWFlags( WX11BypassWM ) && !w->isPopup() && !event->spontaneous())
{
if( d->app_started_timer == NULL )
{
- d->app_started_timer = new QTimer( this, "app_started_timer" );
- connect( d->app_started_timer, SIGNAL( timeout()), SLOT( checkAppStartedSlot()));
+ d->app_started_timer = new TQTimer( this, "app_started_timer" );
+ connect( d->app_started_timer, TQT_SIGNAL( timeout()), TQT_SLOT( checkAppStartedSlot()));
}
if( !d->app_started_timer->isActive())
d->app_started_timer->start( 0, true );
@@ -534,9 +534,9 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
if( w->isTopLevel() && ( w->icon() == NULL || w->icon()->isNull()))
{
// icon() cannot be null pixmap, it'll be the "unknown" icon - so check if there is this application icon
- static QPixmap* ic = NULL;
+ static TQPixmap* ic = NULL;
if( ic == NULL )
- ic = new QPixmap( KGlobal::iconLoader()->loadIcon( iconName(),
+ ic = new TQPixmap( KGlobal::iconLoader()->loadIcon( iconName(),
KIcon::NoGroup, 0, KIcon::DefaultState, NULL, true ));
if( !ic->isNull())
{
@@ -547,7 +547,7 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
}
- return QApplication::notify(receiver, event);
+ return TQApplication::notify(receiver, event);
}
void KApplication::checkAppStartedSlot()
@@ -558,11 +558,11 @@ void KApplication::checkAppStartedSlot()
}
// the help class for session management communication
-static QPtrList<KSessionManaged>* sessionClients()
+static TQPtrList<KSessionManaged>* sessionClients()
{
- static QPtrList<KSessionManaged>* session_clients = 0L;
+ static TQPtrList<KSessionManaged>* session_clients = 0L;
if ( !session_clients )
- session_clients = new QPtrList<KSessionManaged>;
+ session_clients = new TQPtrList<KSessionManaged>;
return session_clients;
}
@@ -571,12 +571,12 @@ static QPtrList<KSessionManaged>* sessionClients()
instance specific config object.
Syntax: "session/<appname>_<sessionId>"
*/
-QString KApplication::sessionConfigName() const
+TQString KApplication::sessionConfigName() const
{
- QString sessKey = sessionKey();
+ TQString sessKey = sessionKey();
if ( sessKey.isEmpty() && !d->sessionKey.isEmpty() )
sessKey = d->sessionKey;
- return QString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey);
+ return TQString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey);
}
#ifdef Q_WS_X11
@@ -586,11 +586,11 @@ static SmcConn tmpSmcConnection = 0;
// FIXME(E): Implement for Qt Embedded
// Possibly "steal" XFree86's libSM?
#endif
-static QTime* smModificationTime = 0;
+static TQTime* smModificationTime = 0;
-KApplication::KApplication( int& argc, char** argv, const QCString& rAppName,
+KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- QApplication( argc, argv, GUIenabled ), KInstance(rAppName),
+ TQApplication( argc, argv, GUIenabled ), KInstance(rAppName),
#ifdef Q_WS_X11
display(0L),
#endif
@@ -613,7 +613,7 @@ KApplication::KApplication( int& argc, char** argv, const QCString& rAppName,
}
KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
- QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
GUIenabled ),
KInstance( KCmdLineArgs::about),
#ifdef Q_WS_X11
@@ -638,7 +638,7 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
#ifdef Q_WS_X11
KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles ) :
- QApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
visual, colormap ),
KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
{
@@ -655,7 +655,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles, KInstance * _instance ) :
- QApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
visual, colormap ),
KInstance( _instance ), display(0L), d (new KApplicationPrivate)
{
@@ -672,7 +672,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
#endif
KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance ) :
- QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
GUIenabled ),
KInstance( _instance ),
#ifdef Q_WS_X11
@@ -695,9 +695,9 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _insta
}
#ifdef Q_WS_X11
-KApplication::KApplication(Display *display, int& argc, char** argv, const QCString& rAppName,
+KApplication::KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- QApplication( display ), KInstance(rAppName),
+ TQApplication( display ), KInstance(rAppName),
display(0L),
d (new KApplicationPrivate())
{
@@ -761,7 +761,7 @@ void KApplication::iceIOErrorHandler( _IceConn *conn )
class KDETranslator : public QTranslator
{
public:
- KDETranslator(QObject *parent) : QTranslator(parent, "kdetranslator") {}
+ KDETranslator(TQObject *parent) : QTranslator(parent, "kdetranslator") {}
virtual QTranslatorMessage findMessage(const char* context,
const char *sourceText,
const char* message) const
@@ -786,7 +786,7 @@ void KApplication::init(bool GUIenabled)
(void) KClipboardSynchronizer::self();
- QApplication::setDesktopSettingsAware( false );
+ TQApplication::setDesktopSettingsAware( false );
KApp = this;
@@ -841,7 +841,7 @@ void KApplication::init(bool GUIenabled)
// * We use kdialog to warn the user, so we better not generate warnings from
// kdialog itself.
// * Don't warn if we run with a read-only $HOME
- QCString readOnly = getenv("KDE_HOME_READONLY");
+ TQCString readOnly = getenv("KDE_HOME_READONLY");
if (readOnly.isEmpty() && (qstrcmp(name(), "kdialog") != 0))
{
KConfigGroupSaver saver(config, "KDE Action Restrictions");
@@ -859,15 +859,15 @@ void KApplication::init(bool GUIenabled)
d->oldXIOErrorHandler = XSetIOErrorHandler( kde_xio_errhandler );
#endif
- connect( this, SIGNAL( aboutToQuit() ), this, SIGNAL( shutDown() ) );
+ connect( this, TQT_SIGNAL( aboutToQuit() ), this, TQT_SIGNAL( shutDown() ) );
#ifdef Q_WS_X11 //FIXME(E)
display = desktop()->x11Display();
#endif
{
- QStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
- QStringList::Iterator it = plugins.begin();
+ TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ TQStringList::Iterator it = plugins.begin();
while (it != plugins.end()) {
addLibraryPath( *it );
++it;
@@ -883,14 +883,14 @@ void KApplication::init(bool GUIenabled)
// XXX: This is a hack. Make our factory the default factory, but add the
// previous default factory to the list of factories. Why? When the default
// factory can't resolve something, it iterates in the list of factories.
- // But it QWhatsThis only uses the default factory. So if there was already
+ // But it TQWhatsThis only uses the default factory. So if there was already
// a default factory (which happens when using an image library using uic),
// we prefer KDE's factory and so we put that old default factory in the
// list and use KDE as the default. This may speed up things as well.
- QMimeSourceFactory* oldDefaultFactory = QMimeSourceFactory::takeDefaultFactory();
- QMimeSourceFactory::setDefaultFactory( mimeSourceFactory() );
+ TQMimeSourceFactory* oldDefaultFactory = TQMimeSourceFactory::takeDefaultFactory();
+ TQMimeSourceFactory::setDefaultFactory( mimeSourceFactory() );
if ( oldDefaultFactory ) {
- QMimeSourceFactory::addFactory( oldDefaultFactory );
+ TQMimeSourceFactory::addFactory( oldDefaultFactory );
}
d->checkAccelerators = new KCheckAccelerators( this );
@@ -898,10 +898,10 @@ void KApplication::init(bool GUIenabled)
#ifdef Q_WS_MACX
if (GUIenabled) {
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false );
if (!pixmap.isNull()) {
- QImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
+ TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
for(int y = 0; y < i.height(); y++) {
uchar *l = i.scanLine(y);
for(int x = 0; x < i.width(); x+=4)
@@ -935,7 +935,7 @@ void KApplication::init(bool GUIenabled)
// install appdata resource type
KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data")
- + QString::fromLatin1(name()) + '/');
+ + TQString::fromLatin1(name()) + '/');
pSessionConfig = 0L;
bSessionManagement = true;
@@ -943,7 +943,7 @@ void KApplication::init(bool GUIenabled)
// register a communication window for desktop changes (Matthias)
if (GUIenabled && kde_have_kipc )
{
- smw = new QWidget(0,0);
+ smw = new TQWidget(0,0);
long data = 1;
XChangeProperty(qt_xdisplay(), smw->winId(),
atom_DesktopWindow, atom_DesktopWindow,
@@ -990,10 +990,10 @@ DCOPClient *KApplication::dcopClient()
s_DCOPClient->setServerAddress( args->getOption("dcopserver"));
}
if( kapp ) {
- connect(s_DCOPClient, SIGNAL(attachFailed(const QString &)),
- kapp, SLOT(dcopFailure(const QString &)));
- connect(s_DCOPClient, SIGNAL(blockUserInput(bool) ),
- kapp, SLOT(dcopBlockUserInput(bool)) );
+ connect(s_DCOPClient, TQT_SIGNAL(attachFailed(const TQString &)),
+ kapp, TQT_SLOT(dcopFailure(const TQString &)));
+ connect(s_DCOPClient, TQT_SIGNAL(blockUserInput(bool) ),
+ kapp, TQT_SLOT(dcopBlockUserInput(bool)) );
}
else
s_dcopClientNeedsPostInit = true;
@@ -1007,8 +1007,8 @@ void KApplication::dcopClientPostInit()
if( s_dcopClientNeedsPostInit )
{
s_dcopClientNeedsPostInit = false;
- connect(s_DCOPClient, SIGNAL(blockUserInput(bool) ),
- SLOT(dcopBlockUserInput(bool)) );
+ connect(s_DCOPClient, TQT_SIGNAL(blockUserInput(bool) ),
+ TQT_SLOT(dcopBlockUserInput(bool)) );
s_DCOPClient->bindToApp(); // Make sure we get events from the DCOPClient.
}
}
@@ -1106,14 +1106,14 @@ bool KApplication::requestShutDown(
ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
{
#ifdef Q_WS_X11
- QApplication::syncX();
+ TQApplication::syncX();
/* use ksmserver's dcop interface if necessary */
if ( confirm == ShutdownConfirmYes ||
sdtype != ShutdownTypeDefault ||
sdmode != ShutdownModeDefault )
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)confirm << (int)sdtype << (int)sdmode;
return dcopClient()->send( "ksmserver", "ksmserver",
"logout(int,int,int)", data );
@@ -1133,7 +1133,7 @@ bool KApplication::requestShutDown(
// open a temporary connection, if possible
propagateSessionManager();
- QCString smEnv = ::getenv("SESSION_MANAGER");
+ TQCString smEnv = ::getenv("SESSION_MANAGER");
if (smEnv.isEmpty())
return false;
@@ -1168,32 +1168,32 @@ bool KApplication::requestShutDown(
void KApplication::propagateSessionManager()
{
#ifdef Q_WS_X11
- QCString fName = QFile::encodeName(locateLocal("socket", "KSMserver"));
- QCString display = ::getenv(DISPLAY);
+ TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
+ TQCString display = ::getenv(DISPLAY);
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
int i;
while( (i = display.find(':')) >= 0)
display[i] = '_';
fName += "_"+display;
- QCString smEnv = ::getenv("SESSION_MANAGER");
+ TQCString smEnv = ::getenv("SESSION_MANAGER");
bool check = smEnv.isEmpty();
if ( !check && smModificationTime ) {
- QFileInfo info( fName );
- QTime current = info.lastModified().time();
+ TQFileInfo info( fName );
+ TQTime current = info.lastModified().time();
check = current > *smModificationTime;
}
if ( check ) {
delete smModificationTime;
- QFile f( fName );
+ TQFile f( fName );
if ( !f.open( IO_ReadOnly ) )
return;
- QFileInfo info ( f );
- smModificationTime = new QTime( info.lastModified().time() );
- QTextStream t(&f);
- t.setEncoding( QTextStream::Latin1 );
- QString s = t.readLine();
+ TQFileInfo info ( f );
+ smModificationTime = new TQTime( info.lastModified().time() );
+ TQTextStream t(&f);
+ t.setEncoding( TQTextStream::Latin1 );
+ TQString s = t.readLine();
f.close();
::setenv( "SESSION_MANAGER", s.latin1(), true );
}
@@ -1213,19 +1213,19 @@ void KApplication::commitData( QSessionManager& sm )
sm.cancel();
if ( sm.allowsInteraction() ) {
- QWidgetList done;
- QWidgetList *list = QApplication::topLevelWidgets();
+ TQWidgetList done;
+ TQWidgetList *list = TQApplication::topLevelWidgets();
bool canceled = false;
- QWidget* w = list->first();
+ TQWidget* w = list->first();
while ( !canceled && w ) {
if ( !w->testWState( WState_ForceHide ) && !w->inherits("KMainWindow") ) {
- QCloseEvent e;
+ TQCloseEvent e;
sendEvent( w, &e );
canceled = !e.isAccepted();
if ( !canceled )
done.append( w );
delete list; // one never knows...
- list = QApplication::topLevelWidgets();
+ list = TQApplication::topLevelWidgets();
w = list->first();
} else {
w = list->next();
@@ -1267,8 +1267,8 @@ static void checkRestartVersion( QSessionManager& sm )
}
}
}
- QString wrapper = KStandardDirs::findExe( "kde3" );
- QStringList restartCommand = sm.restartCommand();
+ TQString wrapper = KStandardDirs::findExe( "kde3" );
+ TQStringList restartCommand = sm.restartCommand();
restartCommand.prepend( wrapper );
sm.setRestartCommand( restartCommand );
}
@@ -1306,9 +1306,9 @@ void KApplication::saveState( QSessionManager& sm )
}
// tell the session manager about our new lifecycle
- QStringList restartCommand = sm.restartCommand();
+ TQStringList restartCommand = sm.restartCommand();
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (multiHead.lower() == "true") {
// if multihead is enabled, we save our -display argument so that
// we are restored onto the correct head... one problem with this
@@ -1316,7 +1316,7 @@ void KApplication::saveState( QSessionManager& sm )
// to a different display (ie. if we are in a university lab and try,
// try to restore a multihead session, our apps could be started on
// someone else's display instead of our own)
- QCString displayname = getenv(DISPLAY);
+ TQCString displayname = getenv(DISPLAY);
if (! displayname.isNull()) {
// only store the command if we actually have a DISPLAY
// environment variable
@@ -1340,7 +1340,7 @@ void KApplication::saveState( QSessionManager& sm )
// if we created a new session config object, register a proper discard command
if ( pSessionConfig ) {
pSessionConfig->sync();
- QStringList discard;
+ TQStringList discard;
discard << "rm" << locateLocal("config", sessionConfigName());
sm.setDiscardCommand( discard );
} else {
@@ -1372,20 +1372,20 @@ void KApplication::startKdeinit()
return; // whoever held the lock has already started dcopserver
}
// Try to launch kdeinit.
- QString srv = KStandardDirs::findExe(QString::fromLatin1("kdeinit"));
+ TQString srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"));
if (srv.isEmpty())
- srv = KStandardDirs::findExe(QString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
+ srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
if (srv.isEmpty())
return;
if (kapp && (Tty != kapp->type()))
setOverrideCursor( Qt::waitCursor );
- my_system(QFile::encodeName(srv)+" --suicide"+" --new-startup");
+ my_system(TQFile::encodeName(srv)+" --suicide"+" --new-startup");
if (kapp && (Tty != kapp->type()))
restoreOverrideCursor();
#endif
}
-void KApplication::dcopFailure(const QString &msg)
+void KApplication::dcopFailure(const TQString &msg)
{
static int failureCount = 0;
failureCount++;
@@ -1401,7 +1401,7 @@ void KApplication::dcopFailure(const QString &msg)
if (KGlobal::config()->readBoolEntry("ignoreDCOPFailures", false))
return;
#endif
- QString msgStr(i18n("There was an error setting up inter-process "
+ TQString msgStr(i18n("There was an error setting up inter-process "
"communications for KDE. The message returned "
"by the system was:\n\n"));
msgStr += msg;
@@ -1409,7 +1409,7 @@ void KApplication::dcopFailure(const QString &msg)
if (Tty != kapp->type())
{
- QMessageBox::critical
+ TQMessageBox::critical
(
kapp->mainWidget(),
i18n("DCOP communications error (%1)").arg(kapp->caption()),
@@ -1436,7 +1436,7 @@ static const KCmdLineOptions qt_options[] =
#endif
{ "session <sessionId>", I18N_NOOP("Restore the application for the given 'sessionId'"), 0},
{ "cmap", I18N_NOOP("Causes the application to install a private color\nmap on an 8-bit display"), 0},
- { "ncols <count>", I18N_NOOP("Limits the number of colors allocated in the color\ncube on an 8-bit display, if the application is\nusing the QApplication::ManyColor color\nspecification"), 0},
+ { "ncols <count>", I18N_NOOP("Limits the number of colors allocated in the color\ncube on an 8-bit display, if the application is\nusing the TQApplication::ManyColor color\nspecification"), 0},
{ "nograb", I18N_NOOP("tells Qt to never grab the mouse or the keyboard"), 0},
{ "dograb", I18N_NOOP("running under a debugger can cause an implicit\n-nograb, use -dograb to override"), 0},
{ "sync", I18N_NOOP("switches to synchronous mode for debugging"), 0},
@@ -1495,17 +1495,17 @@ void KApplication::parseCommandLine( )
if (args->isSet("config"))
{
- QString config = QString::fromLocal8Bit(args->getOption("config"));
+ TQString config = TQString::fromLocal8Bit(args->getOption("config"));
setConfigName(config);
}
if (args->isSet("style"))
{
- QStringList styles = QStyleFactory::keys();
- QString reqStyle(args->getOption("style").lower());
+ TQStringList styles = TQStyleFactory::keys();
+ TQString reqStyle(args->getOption("style").lower());
- for (QStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it)
+ for (TQStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it)
if ((*it).lower() == reqStyle)
{
d->overrideStyle = *it;
@@ -1518,7 +1518,7 @@ void KApplication::parseCommandLine( )
if (args->isSet("caption"))
{
- aCaption = QString::fromLocal8Bit(args->getOption("caption"));
+ aCaption = TQString::fromLocal8Bit(args->getOption("caption"));
}
if (args->isSet("miniicon"))
@@ -1556,7 +1556,7 @@ void KApplication::parseCommandLine( )
KCrash::setCrashHandler(KCrash::defaultCrashHandler);
KCrash::setEmergencySaveFunction(NULL);
- KCrash::setApplicationName(QString(args->appName()));
+ KCrash::setApplicationName(TQString(args->appName()));
}
#ifdef Q_WS_X11
@@ -1593,12 +1593,12 @@ void KApplication::parseCommandLine( )
}
-QString KApplication::geometryArgument() const
+TQString KApplication::geometryArgument() const
{
return d->geometry_arg;
}
-QPixmap KApplication::icon() const
+TQPixmap KApplication::icon() const
{
if( !aIconPixmap.pm.icon) {
aIconPixmap.pm.icon = new QPixmap;
@@ -1609,12 +1609,12 @@ QPixmap KApplication::icon() const
return *aIconPixmap.pm.icon;
}
-QString KApplication::iconName() const
+TQString KApplication::iconName() const
{
- return aIconName.isNull() ? (QString)instanceName() : aIconName;
+ return aIconName.isNull() ? (TQString)instanceName() : aIconName;
}
-QPixmap KApplication::miniIcon() const
+TQPixmap KApplication::miniIcon() const
{
if (!aIconPixmap.pm.miniIcon) {
aIconPixmap.pm.miniIcon = new QPixmap;
@@ -1625,9 +1625,9 @@ QPixmap KApplication::miniIcon() const
return *aIconPixmap.pm.miniIcon;
}
-QString KApplication::miniIconName() const
+TQString KApplication::miniIconName() const
{
- return aMiniIconName.isNull() ? (QString)instanceName() : aMiniIconName;
+ return aMiniIconName.isNull() ? (TQString)instanceName() : aMiniIconName;
}
extern void kDebugCleanup();
@@ -1755,7 +1755,7 @@ bool KApplication::x11EventFilter( XEvent *_event )
}
if (x11Filter) {
- for (QWidget *w=x11Filter->first(); w; w=x11Filter->next()) {
+ for (TQWidget *w=x11Filter->first(); w; w=x11Filter->next()) {
if (((KAppX11HackWidget*) w)->publicx11Event(_event))
return true;
}
@@ -1808,7 +1808,7 @@ bool KApplication::x11EventFilter( XEvent *_event )
break;
case KIPC::IconChanged:
- QPixmapCache::clear();
+ TQPixmapCache::clear();
KGlobal::config()->reparseConfiguration();
KGlobal::instance()->newIconLoader();
emit updateIconLoaders();
@@ -1864,7 +1864,7 @@ unsigned long KApplication::userTimestamp() const
#endif
}
-void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time )
+void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time )
{
#if defined Q_WS_X11
if( time == 0 )
@@ -1875,11 +1875,11 @@ void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned l
void KApplication::invokeEditSlot( const char *slot )
{
- QObject *object = focusWidget();
+ TQObject *object = focusWidget();
if( !object )
return;
- QMetaObject *meta = object->metaObject();
+ TQMetaObject *meta = object->metaObject();
int idx = meta->findSlot( slot + 1, true );
if( idx < 0 )
@@ -1927,20 +1927,20 @@ void KApplication::applyGUIStyle()
if ( !useStyles ) return;
KConfigGroup pConfig (KGlobal::config(), "General");
- QString defaultStyle = KStyle::defaultStyle();
- QString styleStr = pConfig.readEntry("widgetStyle", defaultStyle);
+ TQString defaultStyle = KStyle::defaultStyle();
+ TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle);
if (d->overrideStyle.isEmpty()) {
// ### add check whether we already use the correct style to return then
// (workaround for Qt misbehavior to avoid double style initialization)
- QStyle* sp = QStyleFactory::create( styleStr );
+ TQStyle* sp = TQStyleFactory::create( styleStr );
// If there is no default style available, try falling back any available style
if ( !sp && styleStr != defaultStyle)
- sp = QStyleFactory::create( defaultStyle );
+ sp = TQStyleFactory::create( defaultStyle );
if ( !sp )
- sp = QStyleFactory::create( *(QStyleFactory::keys().begin()) );
+ sp = TQStyleFactory::create( *(TQStyleFactory::keys().begin()) );
setStyle(sp);
}
else
@@ -1949,7 +1949,7 @@ void KApplication::applyGUIStyle()
kdisplaySetPalette();
}
-QString KApplication::caption() const
+TQString KApplication::caption() const
{
// Caption set from command line ?
if( !aCaption.isNull() )
@@ -1968,62 +1968,62 @@ QString KApplication::caption() const
// 1999-09-20: Espen Sand
// An attempt to simplify consistent captions.
//
-QString KApplication::makeStdCaption( const QString &userCaption,
+TQString KApplication::makeStdCaption( const TQString &userCaption,
bool withAppName, bool modified ) const
{
- QString s = userCaption.isEmpty() ? caption() : userCaption;
+ TQString s = userCaption.isEmpty() ? caption() : userCaption;
// If the document is modified, add '[modified]'.
if (modified)
- s += QString::fromUtf8(" [") + i18n("modified") + QString::fromUtf8("]");
+ s += TQString::fromUtf8(" [") + i18n("modified") + TQString::fromUtf8("]");
if ( !userCaption.isEmpty() ) {
// Add the application name if:
// User asked for it, it's not a duplication and the app name (caption()) is not empty
if ( withAppName && !caption().isNull() && !userCaption.endsWith(caption()) )
- s += QString::fromUtf8(" - ") + caption();
+ s += TQString::fromUtf8(" - ") + caption();
}
return s;
}
-QPalette KApplication::createApplicationPalette()
+TQPalette KApplication::createApplicationPalette()
{
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "General" );
return createApplicationPalette( config, KGlobalSettings::contrast() );
}
-QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_ )
+TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_ )
{
- QColor kde34Background( 239, 239, 239 );
- QColor kde34Blue( 103,141,178 );
+ TQColor kde34Background( 239, 239, 239 );
+ TQColor kde34Blue( 103,141,178 );
- QColor kde34Button;
- if ( QPixmap::defaultDepth() > 8 )
+ TQColor kde34Button;
+ if ( TQPixmap::defaultDepth() > 8 )
kde34Button.setRgb( 221, 223, 228 );
else
kde34Button.setRgb( 220, 220, 220 );
- QColor kde34Link( 0, 0, 238 );
- QColor kde34VisitedLink( 82, 24, 139 );
+ TQColor kde34Link( 0, 0, 238 );
+ TQColor kde34VisitedLink( 82, 24, 139 );
- QColor background = config->readColorEntry( "background", &kde34Background );
- QColor foreground = config->readColorEntry( "foreground", &black );
- QColor button = config->readColorEntry( "buttonBackground", &kde34Button );
- QColor buttonText = config->readColorEntry( "buttonForeground", &black );
- QColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
- QColor highlightedText = config->readColorEntry( "selectForeground", &white );
- QColor base = config->readColorEntry( "windowBackground", &white );
- QColor baseText = config->readColorEntry( "windowForeground", &black );
- QColor link = config->readColorEntry( "linkColor", &kde34Link );
- QColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink );
+ TQColor background = config->readColorEntry( "background", &kde34Background );
+ TQColor foreground = config->readColorEntry( "foreground", &black );
+ TQColor button = config->readColorEntry( "buttonBackground", &kde34Button );
+ TQColor buttonText = config->readColorEntry( "buttonForeground", &black );
+ TQColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
+ TQColor highlightedText = config->readColorEntry( "selectForeground", &white );
+ TQColor base = config->readColorEntry( "windowBackground", &white );
+ TQColor baseText = config->readColorEntry( "windowForeground", &black );
+ TQColor link = config->readColorEntry( "linkColor", &kde34Link );
+ TQColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink );
int highlightVal, lowlightVal;
highlightVal = 100 + (2*contrast_+4)*16/10;
lowlightVal = 100 + (2*contrast_+4)*10;
- QColor disfg = foreground;
+ TQColor disfg = foreground;
int h, s, v;
disfg.hsv( &h, &s, &v );
@@ -2038,13 +2038,13 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
disfg = Qt::darkGray;
- QColorGroup disabledgrp(disfg, background,
+ TQColorGroup disabledgrp(disfg, background,
background.light(highlightVal),
background.dark(lowlightVal),
background.dark(120),
background.dark(120), base);
- QColorGroup colgrp(foreground, background, background.light(highlightVal),
+ TQColorGroup colgrp(foreground, background, background.light(highlightVal),
background.dark(lowlightVal),
background.dark(120),
baseText, base);
@@ -2053,17 +2053,17 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
if(inlowlightVal < 120)
inlowlightVal = 120;
- colgrp.setColor(QColorGroup::Highlight, highlight);
- colgrp.setColor(QColorGroup::HighlightedText, highlightedText);
- colgrp.setColor(QColorGroup::Button, button);
- colgrp.setColor(QColorGroup::ButtonText, buttonText);
- colgrp.setColor(QColorGroup::Midlight, background.light(110));
- colgrp.setColor(QColorGroup::Link, link);
- colgrp.setColor(QColorGroup::LinkVisited, visitedLink);
+ colgrp.setColor(TQColorGroup::Highlight, highlight);
+ colgrp.setColor(TQColorGroup::HighlightedText, highlightedText);
+ colgrp.setColor(TQColorGroup::Button, button);
+ colgrp.setColor(TQColorGroup::ButtonText, buttonText);
+ colgrp.setColor(TQColorGroup::Midlight, background.light(110));
+ colgrp.setColor(TQColorGroup::Link, link);
+ colgrp.setColor(TQColorGroup::LinkVisited, visitedLink);
- disabledgrp.setColor(QColorGroup::Button, button);
+ disabledgrp.setColor(TQColorGroup::Button, button);
- QColor disbtntext = buttonText;
+ TQColor disbtntext = buttonText;
disbtntext.hsv( &h, &s, &v );
if (v > 128)
// dark button, light buttonText - need a darker disabled buttonText
@@ -2075,13 +2075,13 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
// black button - use darkgray disabled buttonText
disbtntext = Qt::darkGray;
- disabledgrp.setColor(QColorGroup::ButtonText, disbtntext);
- disabledgrp.setColor(QColorGroup::Midlight, background.light(110));
- disabledgrp.setColor(QColorGroup::Highlight, highlight.dark(120));
- disabledgrp.setColor(QColorGroup::Link, link);
- disabledgrp.setColor(QColorGroup::LinkVisited, visitedLink);
+ disabledgrp.setColor(TQColorGroup::ButtonText, disbtntext);
+ disabledgrp.setColor(TQColorGroup::Midlight, background.light(110));
+ disabledgrp.setColor(TQColorGroup::Highlight, highlight.dark(120));
+ disabledgrp.setColor(TQColorGroup::Link, link);
+ disabledgrp.setColor(TQColorGroup::LinkVisited, visitedLink);
- return QPalette(colgrp, disabledgrp, colgrp);
+ return TQPalette(colgrp, disabledgrp, colgrp);
}
@@ -2097,7 +2097,7 @@ void KApplication::kdisplaySetPalette()
return;
}
#endif
- QApplication::setPalette( createApplicationPalette(), true);
+ TQApplication::setPalette( createApplicationPalette(), true);
emit kdisplayPaletteChanged();
emit appearanceChanged();
}
@@ -2105,13 +2105,13 @@ void KApplication::kdisplaySetPalette()
void KApplication::kdisplaySetFont()
{
- QApplication::setFont(KGlobalSettings::generalFont(), true);
- QApplication::setFont(KGlobalSettings::menuFont(), true, "QMenuBar");
- QApplication::setFont(KGlobalSettings::menuFont(), true, "QPopupMenu");
- QApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
+ TQApplication::setFont(KGlobalSettings::generalFont(), true);
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQMenuBar");
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQPopupMenu");
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
- // "patch" standard QStyleSheet to follow our fonts
- QStyleSheet* sheet = QStyleSheet::defaultSheet();
+ // "patch" standard TQStyleSheet to follow our fonts
+ TQStyleSheet* sheet = TQStyleSheet::defaultSheet();
sheet->item ("pre")->setFontFamily (KGlobalSettings::fixedFont().family());
sheet->item ("code")->setFontFamily (KGlobalSettings::fixedFont().family());
sheet->item ("tt")->setFontFamily (KGlobalSettings::fixedFont().family());
@@ -2137,33 +2137,33 @@ void KApplication::propagateSettings(SettingsCategory arg)
KConfigBase* config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE" );
- int num = config->readNumEntry("CursorBlinkRate", QApplication::cursorFlashTime());
+ int num = config->readNumEntry("CursorBlinkRate", TQApplication::cursorFlashTime());
if ((num != 0) && (num < 200))
num = 200;
if (num > 2000)
num = 2000;
- QApplication::setCursorFlashTime(num);
- num = config->readNumEntry("DoubleClickInterval", QApplication::doubleClickInterval());
- QApplication::setDoubleClickInterval(num);
- num = config->readNumEntry("StartDragTime", QApplication::startDragTime());
- QApplication::setStartDragTime(num);
- num = config->readNumEntry("StartDragDist", QApplication::startDragDistance());
- QApplication::setStartDragDistance(num);
- num = config->readNumEntry("WheelScrollLines", QApplication::wheelScrollLines());
- QApplication::setWheelScrollLines(num);
+ TQApplication::setCursorFlashTime(num);
+ num = config->readNumEntry("DoubleClickInterval", TQApplication::doubleClickInterval());
+ TQApplication::setDoubleClickInterval(num);
+ num = config->readNumEntry("StartDragTime", TQApplication::startDragTime());
+ TQApplication::setStartDragTime(num);
+ num = config->readNumEntry("StartDragDist", TQApplication::startDragDistance());
+ TQApplication::setStartDragDistance(num);
+ num = config->readNumEntry("WheelScrollLines", TQApplication::wheelScrollLines());
+ TQApplication::setWheelScrollLines(num);
bool b = config->readBoolEntry("EffectAnimateMenu", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateMenu, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, b);
b = config->readBoolEntry("EffectFadeMenu", false);
- QApplication::setEffectEnabled( Qt::UI_FadeMenu, b);
+ TQApplication::setEffectEnabled( Qt::UI_FadeMenu, b);
b = config->readBoolEntry("EffectAnimateCombo", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateCombo, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateCombo, b);
b = config->readBoolEntry("EffectAnimateTooltip", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateTooltip, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateTooltip, b);
b = config->readBoolEntry("EffectFadeTooltip", false);
- QApplication::setEffectEnabled( Qt::UI_FadeTooltip, b);
+ TQApplication::setEffectEnabled( Qt::UI_FadeTooltip, b);
b = !config->readBoolEntry("EffectNoTooltip", false);
- QToolTip::setGloballyEnabled( b );
+ TQToolTip::setGloballyEnabled( b );
emit settingsChanged(arg);
}
@@ -2180,8 +2180,8 @@ void KApplication::installKDEPropertyMap()
* function.
* Thanks.
*/
- // QSqlPropertyMap takes ownership of the new default map.
- QSqlPropertyMap *kdeMap = new QSqlPropertyMap;
+ // TQSqlPropertyMap takes ownership of the new default map.
+ TQSqlPropertyMap *kdeMap = new QSqlPropertyMap;
kdeMap->insert( "KColorButton", "color" );
kdeMap->insert( "KComboBox", "currentItem" );
kdeMap->insert( "KDatePicker", "date" );
@@ -2204,14 +2204,14 @@ void KApplication::installKDEPropertyMap()
kdeMap->insert( "KIntSpinBox", "value" );
kdeMap->insert( "KDoubleNumInput", "value" );
// Temp til fixed in QT then enable ifdef with the correct version num
- kdeMap->insert( "QGroupBox", "checked" );
- kdeMap->insert( "QTabWidget", "currentPage" );
- QSqlPropertyMap::installDefaultMap( kdeMap );
+ kdeMap->insert( "TQGroupBox", "checked" );
+ kdeMap->insert( "TQTabWidget", "currentPage" );
+ TQSqlPropertyMap::installDefaultMap( kdeMap );
#endif
}
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname) const
{
return invokeHelp( anchor, _appname, "" );
}
@@ -2219,29 +2219,29 @@ void KApplication::invokeHelp( const QString& anchor,
#ifndef Q_WS_WIN
// for win32 we're using simple help tools like Qt Assistant,
// see kapplication_win.cpp
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname,
- const QCString& startup_id ) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname,
+ const TQCString& startup_id ) const
{
- QString url;
- QString appname;
+ TQString url;
+ TQString appname;
if (_appname.isEmpty())
appname = name();
else
appname = _appname;
if (!anchor.isEmpty())
- url = QString("help:/%1?anchor=%2").arg(appname).arg(anchor);
+ url = TQString("help:/%1?anchor=%2").arg(appname).arg(anchor);
else
- url = QString("help:/%1/index.html").arg(appname);
+ url = TQString("help:/%1/index.html").arg(appname);
- QString error;
+ TQString error;
if ( !dcopClient()->isApplicationRegistered("khelpcenter") )
{
if (startServiceByDesktopName("khelpcenter", url, &error, 0, 0, startup_id, false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch help:\n" << error << endl;
@@ -2253,30 +2253,30 @@ void KApplication::invokeHelp( const QString& anchor,
}
#endif
-void KApplication::invokeHTMLHelp( const QString& _filename, const QString& topic ) const
+void KApplication::invokeHTMLHelp( const TQString& _filename, const TQString& topic ) const
{
kdWarning() << "invoking HTML help is deprecated! use docbook and invokeHelp!\n";
- QString filename;
+ TQString filename;
if( _filename.isEmpty() )
- filename = QString(name()) + "/index.html";
+ filename = TQString(name()) + "/index.html";
else
filename = _filename;
- QString url;
+ TQString url;
if (!topic.isEmpty())
- url = QString("help:/%1#%2").arg(filename).arg(topic);
+ url = TQString("help:/%1#%2").arg(filename).arg(topic);
else
- url = QString("help:/%1").arg(filename);
+ url = TQString("help:/%1").arg(filename);
- QString error;
+ TQString error;
if ( !dcopClient()->isApplicationRegistered("khelpcenter") )
{
if (startServiceByDesktopName("khelpcenter", url, &error, 0, 0, "", false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch help:\n" << error << endl;
@@ -2288,15 +2288,15 @@ void KApplication::invokeHTMLHelp( const QString& _filename, const QString& topi
}
-void KApplication::invokeMailer(const QString &address, const QString &subject)
+void KApplication::invokeMailer(const TQString &address, const TQString &subject)
{
return invokeMailer(address,subject,"");
}
-void KApplication::invokeMailer(const QString &address, const QString &subject, const QCString& startup_id)
+void KApplication::invokeMailer(const TQString &address, const TQString &subject, const TQCString& startup_id)
{
- invokeMailer(address, QString::null, QString::null, subject, QString::null, QString::null,
- QStringList(), startup_id );
+ invokeMailer(address, TQString::null, TQString::null, subject, TQString::null, TQString::null,
+ TQStringList(), startup_id );
}
void KApplication::invokeMailer(const KURL &mailtoURL)
@@ -2304,19 +2304,19 @@ void KApplication::invokeMailer(const KURL &mailtoURL)
return invokeMailer( mailtoURL, "" );
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_id )
+void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id )
{
return invokeMailer( mailtoURL, startup_id, false);
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_id, bool allowAttachments )
+void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments )
{
- QString address = KURL::decode_string(mailtoURL.path()), subject, cc, bcc, body;
- QStringList queries = QStringList::split('&', mailtoURL.query().mid(1));
- QStringList attachURLs;
- for (QStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
+ TQString address = KURL::decode_string(mailtoURL.path()), subject, cc, bcc, body;
+ TQStringList queries = TQStringList::split('&', mailtoURL.query().mid(1));
+ TQStringList attachURLs;
+ for (TQStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
{
- QString q = (*it).lower();
+ TQString q = (*it).lower();
if (q.startsWith("subject="))
subject = KURL::decode_string((*it).mid(8));
else
@@ -2339,12 +2339,12 @@ void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_i
address = address.isEmpty()? KURL::decode_string((*it).mid(3)): address + ',' + KURL::decode_string((*it).mid(3));
}
- invokeMailer( address, cc, bcc, subject, body, QString::null, attachURLs, startup_id );
+ invokeMailer( address, cc, bcc, subject, body, TQString::null, attachURLs, startup_id );
}
-void KApplication::invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString & messageFile, const QStringList &attachURLs)
+void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & messageFile, const TQStringList &attachURLs)
{
return invokeMailer(to,cc,bcc,subject,body,messageFile,attachURLs,"");
}
@@ -2353,7 +2353,7 @@ void KApplication::invokeMailer(const QString &to, const QString &cc, const QStr
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-static QStringList splitEmailAddressList( const QString & aStr )
+static TQStringList splitEmailAddressList( const TQString & aStr )
{
// This is a copy of KPIM::splitEmailAddrList().
// Features:
@@ -2364,12 +2364,12 @@ static QStringList splitEmailAddressList( const QString & aStr )
// - ignores everything (including double quotes and commas)
// inside comments
- QStringList list;
+ TQStringList list;
if (aStr.isEmpty())
return list;
- QString addr;
+ TQString addr;
uint addrstart = 0;
int commentlevel = 0;
bool insidequote = false;
@@ -2424,36 +2424,36 @@ static QStringList splitEmailAddressList( const QString & aStr )
return list;
}
-void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QString &_bcc,
- const QString &subject, const QString &body,
- const QString & /*messageFile TODO*/, const QStringList &attachURLs,
- const QCString& startup_id )
+void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString &_bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
+ const TQCString& startup_id )
{
KConfig config("emaildefaults");
config.setGroup("Defaults");
- QString group = config.readEntry("Profile","Default");
+ TQString group = config.readEntry("Profile","Default");
- config.setGroup( QString("PROFILE_%1").arg(group) );
- QString command = config.readPathEntry("EmailClient");
+ config.setGroup( TQString("PROFILE_%1").arg(group) );
+ TQString command = config.readPathEntry("EmailClient");
- QString to, cc, bcc;
- if (command.isEmpty() || command == QString::fromLatin1("kmail")
+ TQString to, cc, bcc;
+ if (command.isEmpty() || command == TQString::fromLatin1("kmail")
|| command.endsWith("/kmail"))
{
- command = QString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t");
+ command = TQString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t");
if ( !_to.isEmpty() )
{
// put the whole address lists into RFC2047 encoded blobs; technically
// this isn't correct, but KMail understands it nonetheless
- to = QString( "=?utf8?b?%1?=" )
+ to = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _to.utf8(), false ) );
}
if ( !_cc.isEmpty() )
- cc = QString( "=?utf8?b?%1?=" )
+ cc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _cc.utf8(), false ) );
if ( !_bcc.isEmpty() )
- bcc = QString( "=?utf8?b?%1?=" )
+ bcc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _bcc.utf8(), false ) );
} else {
to = _to;
@@ -2466,31 +2466,31 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
if (config.readBoolEntry("TerminalClient", false))
{
KConfigGroup confGroup( KGlobal::config(), "General" );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole");
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole");
command = preferredTerminal + " -e " + command;
}
- QStringList cmdTokens = KShell::splitArgs(command);
- QString cmd = cmdTokens[0];
+ TQStringList cmdTokens = KShell::splitArgs(command);
+ TQString cmd = cmdTokens[0];
cmdTokens.remove(cmdTokens.begin());
KURL url;
- QStringList qry;
+ TQStringList qry;
if (!to.isEmpty())
{
- QStringList tos = splitEmailAddressList( to );
+ TQStringList tos = splitEmailAddressList( to );
url.setPath( tos.first() );
tos.remove( tos.begin() );
- for (QStringList::ConstIterator it = tos.begin(); it != tos.end(); ++it)
+ for (TQStringList::ConstIterator it = tos.begin(); it != tos.end(); ++it)
qry.append( "to=" + KURL::encode_string( *it ) );
}
- const QStringList ccs = splitEmailAddressList( cc );
- for (QStringList::ConstIterator it = ccs.begin(); it != ccs.end(); ++it)
+ const TQStringList ccs = splitEmailAddressList( cc );
+ for (TQStringList::ConstIterator it = ccs.begin(); it != ccs.end(); ++it)
qry.append( "cc=" + KURL::encode_string( *it ) );
- const QStringList bccs = splitEmailAddressList( bcc );
- for (QStringList::ConstIterator it = bccs.begin(); it != bccs.end(); ++it)
+ const TQStringList bccs = splitEmailAddressList( bcc );
+ for (TQStringList::ConstIterator it = bccs.begin(); it != bccs.end(); ++it)
qry.append( "bcc=" + KURL::encode_string( *it ) );
- for (QStringList::ConstIterator it = attachURLs.begin(); it != attachURLs.end(); ++it)
+ for (TQStringList::ConstIterator it = attachURLs.begin(); it != attachURLs.end(); ++it)
qry.append( "attach=" + KURL::encode_string( *it ) );
if (!subject.isEmpty())
qry.append( "subject=" + KURL::encode_string( subject ) );
@@ -2500,7 +2500,7 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
if ( ! (to.isEmpty() && qry.isEmpty()) )
url.setProtocol("mailto");
- QMap<QChar, QString> keyMap;
+ TQMap<TQChar, TQString> keyMap;
keyMap.insert('t', to);
keyMap.insert('s', subject);
keyMap.insert('c', cc);
@@ -2508,22 +2508,22 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
keyMap.insert('B', body);
keyMap.insert('u', url.url());
- QString attachlist = attachURLs.join(",");
+ TQString attachlist = attachURLs.join(",");
attachlist.prepend('\'');
attachlist.append('\'');
keyMap.insert('A', attachlist);
- for (QStringList::Iterator it = cmdTokens.begin(); it != cmdTokens.end(); )
+ for (TQStringList::Iterator it = cmdTokens.begin(); it != cmdTokens.end(); )
{
if (*it == "%A")
{
if (it == cmdTokens.begin()) // better safe than sorry ...
continue;
- QStringList::ConstIterator urlit = attachURLs.begin();
- QStringList::ConstIterator urlend = attachURLs.end();
+ TQStringList::ConstIterator urlit = attachURLs.begin();
+ TQStringList::ConstIterator urlend = attachURLs.end();
if ( urlit != urlend )
{
- QStringList::Iterator previt = it;
+ TQStringList::Iterator previt = it;
--previt;
*it = *urlit;
++it;
@@ -2542,19 +2542,19 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
}
}
- QString error;
+ TQString error;
// TODO this should check if cmd has a .desktop file, and use data from it, together
// with sending more ASN data
if (kdeinitExec(cmd, cmdTokens, &error, NULL, startup_id ))
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Mail Client"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Mail Client"),
i18n("Could not launch the mail client:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch mail client:\n" << error << endl;
}
#endif
-void KApplication::invokeBrowser( const QString &url )
+void KApplication::invokeBrowser( const TQString &url )
{
return invokeBrowser( url, "" );
}
@@ -2562,14 +2562,14 @@ void KApplication::invokeBrowser( const QString &url )
#ifndef Q_WS_WIN
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const QString &url, const QCString& startup_id )
+void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
- QString error;
+ TQString error;
if (startServiceByDesktopName("kfmclient", url, &error, 0, 0, startup_id, false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Browser"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Browser"),
i18n("Could not launch the browser:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch browser:\n" << error << endl;
@@ -2580,27 +2580,27 @@ void KApplication::invokeBrowser( const QString &url, const QCString& startup_id
void KApplication::cut()
{
- invokeEditSlot( SLOT( cut() ) );
+ invokeEditSlot( TQT_SLOT( cut() ) );
}
void KApplication::copy()
{
- invokeEditSlot( SLOT( copy() ) );
+ invokeEditSlot( TQT_SLOT( copy() ) );
}
void KApplication::paste()
{
- invokeEditSlot( SLOT( paste() ) );
+ invokeEditSlot( TQT_SLOT( paste() ) );
}
void KApplication::clear()
{
- invokeEditSlot( SLOT( clear() ) );
+ invokeEditSlot( TQT_SLOT( clear() ) );
}
void KApplication::selectAll()
{
- invokeEditSlot( SLOT( selectAll() ) );
+ invokeEditSlot( TQT_SLOT( selectAll() ) );
}
void KApplication::broadcastKeyCode(unsigned int keyCode)
@@ -2615,15 +2615,15 @@ KApplication::launcher()
}
static int
-startServiceInternal( const QCString &function,
- const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+startServiceInternal( const TQCString &function,
+ const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
struct serviceResult
{
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
pid_t pid;
};
@@ -2646,20 +2646,20 @@ startServiceInternal( const QCString &function,
return -1;
}
}
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << _name << URLs;
- QCString replyType;
- QByteArray replyData;
- QCString _launcher = KApplication::launcher();
- QValueList<QCString> envs;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQCString _launcher = KApplication::launcher();
+ TQValueList<TQCString> envs;
#ifdef Q_WS_X11
if (qt_xdisplay()) {
- QCString dpystring(XDisplayString(qt_xdisplay()));
- envs.append( QCString("DISPLAY=") + dpystring );
+ TQCString dpystring(XDisplayString(qt_xdisplay()));
+ envs.append( TQCString("DISPLAY=") + dpystring );
} else if( getenv( "DISPLAY" )) {
- QCString dpystring( getenv( "DISPLAY" ));
- envs.append( QCString("DISPLAY=") + dpystring );
+ TQCString dpystring( getenv( "DISPLAY" ));
+ envs.append( TQCString("DISPLAY=") + dpystring );
}
#endif
stream << envs;
@@ -2685,7 +2685,7 @@ startServiceInternal( const QCString &function,
if (noWait)
return 0;
- QDataStream stream2(replyData, IO_ReadOnly);
+ TQDataStream stream2(replyData, IO_ReadOnly);
serviceResult result;
stream2 >> result.result >> result.dcopName >> result.error >> result.pid;
if (dcopService)
@@ -2698,111 +2698,111 @@ startServiceInternal( const QCString &function,
}
int
-KApplication::startServiceByName( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByName( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByName( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByName( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopPath( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopPath( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopPath( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopName( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopName( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopName( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopName( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid )
+KApplication::kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid )
{
return kdeinitExec( name, args, error, pid, "" );
}
int
-KApplication::kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id )
+KApplication::kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id )
{
- return startServiceInternal("kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)",
+ return startServiceInternal("kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
name, args, error, 0, pid, startup_id, false);
}
int
-KApplication::kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid )
+KApplication::kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid )
{
return kdeinitExecWait( name, args, error, pid, "" );
}
int
-KApplication::kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id )
+KApplication::kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id )
{
- return startServiceInternal("kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)",
+ return startServiceInternal("kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
name, args, error, 0, pid, startup_id, false);
}
-QString KApplication::tempSaveName( const QString& pFilename ) const
+TQString KApplication::tempSaveName( const TQString& pFilename ) const
{
- QString aFilename;
+ TQString aFilename;
- if( QDir::isRelativePath(pFilename) )
+ if( TQDir::isRelativePath(pFilename) )
{
kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
- aFilename = QFileInfo( QDir( "." ), pFilename ).absFilePath();
+ aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
aFilename = pFilename;
- QDir aAutosaveDir( QDir::homeDirPath() + "/autosave/" );
+ TQDir aAutosaveDir( TQDir::homeDirPath() + "/autosave/" );
if( !aAutosaveDir.exists() )
{
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
@@ -2818,20 +2818,20 @@ QString KApplication::tempSaveName( const QString& pFilename ) const
}
-QString KApplication::checkRecoverFile( const QString& pFilename,
+TQString KApplication::checkRecoverFile( const TQString& pFilename,
bool& bRecover ) const
{
- QString aFilename;
+ TQString aFilename;
- if( QDir::isRelativePath(pFilename) )
+ if( TQDir::isRelativePath(pFilename) )
{
kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
- aFilename = QFileInfo( QDir( "." ), pFilename ).absFilePath();
+ aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
aFilename = pFilename;
- QDir aAutosaveDir( QDir::homeDirPath() + "/autosave/" );
+ TQDir aAutosaveDir( TQDir::homeDirPath() + "/autosave/" );
if( !aAutosaveDir.exists() )
{
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
@@ -2843,7 +2843,7 @@ QString KApplication::checkRecoverFile( const QString& pFilename,
aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
- if( QFile( aFilename ).exists() )
+ if( TQFile( aFilename ).exists() )
{
bRecover = true;
return aFilename;
@@ -2856,9 +2856,9 @@ QString KApplication::checkRecoverFile( const QString& pFilename,
}
-bool checkAccess(const QString& pathname, int mode)
+bool checkAccess(const TQString& pathname, int mode)
{
- int accessOK = access( QFile::encodeName(pathname), mode );
+ int accessOK = access( TQFile::encodeName(pathname), mode );
if ( accessOK == 0 )
return true; // OK, I can really access the file
@@ -2869,11 +2869,11 @@ bool checkAccess(const QString& pathname, int mode)
return false; // Check for write access is not part of mode => bail out
- if (!access( QFile::encodeName(pathname), F_OK)) // if it already exists
+ if (!access( TQFile::encodeName(pathname), F_OK)) // if it already exists
return false;
//strip the filename (everything until '/' from the end
- QString dirName(pathname);
+ TQString dirName(pathname);
int pos = dirName.findRev('/');
if ( pos == -1 )
return false; // No path in argument. This is evil, we won't allow this
@@ -2882,7 +2882,7 @@ bool checkAccess(const QString& pathname, int mode)
dirName.truncate(pos); // strip everything starting from the last '/'
- accessOK = access( QFile::encodeName(dirName), W_OK );
+ accessOK = access( TQFile::encodeName(dirName), W_OK );
// -?- Can I write to the accessed diretory
if ( accessOK == 0 )
return true; // Yes
@@ -2890,7 +2890,7 @@ bool checkAccess(const QString& pathname, int mode)
return false; // No
}
-void KApplication::setTopWidget( QWidget *topWidget )
+void KApplication::setTopWidget( TQWidget *topWidget )
{
if( !topWidget )
return;
@@ -2911,12 +2911,12 @@ void KApplication::setTopWidget( QWidget *topWidget )
#endif
}
-QCString KApplication::startupId() const
+TQCString KApplication::startupId() const
{
return d->startup_id;
}
-void KApplication::setStartupId( const QCString& startup_id )
+void KApplication::setStartupId( const TQCString& startup_id )
{
if( startup_id == d->startup_id )
return;
@@ -2969,11 +2969,11 @@ int KApplication::random()
return rand();
}
-QString KApplication::randomString(int length)
+TQString KApplication::randomString(int length)
{
- if (length <=0 ) return QString::null;
+ if (length <=0 ) return TQString::null;
- QString str; str.setLength( length );
+ TQString str; str.setLength( length );
int i = 0;
while (length--)
{
@@ -2987,7 +2987,7 @@ QString KApplication::randomString(int length)
return str;
}
-bool KApplication::authorize(const QString &genericAction)
+bool KApplication::authorize(const TQString &genericAction)
{
if (!d->actionRestrictions)
return true;
@@ -3002,12 +3002,12 @@ bool KApplication::authorizeKAction(const char *action)
if (!d->actionRestrictions || !action)
return true;
- static const QString &action_prefix = KGlobal::staticQString( "action/" );
+ static const TQString &action_prefix = KGlobal::staticQString( "action/" );
return authorize(action_prefix + action);
}
-bool KApplication::authorizeControlModule(const QString &menuId)
+bool KApplication::authorizeControlModule(const TQString &menuId)
{
if (menuId.isEmpty() || kde_kiosk_exception)
return true;
@@ -3016,12 +3016,12 @@ bool KApplication::authorizeControlModule(const QString &menuId)
return config->readBoolEntry(menuId, true);
}
-QStringList KApplication::authorizeControlModules(const QStringList &menuIds)
+TQStringList KApplication::authorizeControlModules(const TQStringList &menuIds)
{
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE Control Module Restrictions" );
- QStringList result;
- for(QStringList::ConstIterator it = menuIds.begin();
+ TQStringList result;
+ for(TQStringList::ConstIterator it = menuIds.begin();
it != menuIds.end(); ++it)
{
if (config->readBoolEntry(*it, true))
@@ -3035,67 +3035,67 @@ void KApplication::initUrlActionRestrictions()
d->urlActionRestrictions.setAutoDelete(true);
d->urlActionRestrictions.clear();
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("open", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("open", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("list", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// TEST:
// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
-// ("list", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, false));
+// ("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, false));
// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
-// ("list", QString::null, QString::null, QString::null, "file", QString::null, QDir::homeDirPath(), true));
+// ("list", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQDir::homeDirPath(), true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("link", QString::null, QString::null, QString::null, ":internet", QString::null, QString::null, true));
+ ("link", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, ":internet", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
// We allow redirections to file: but not from internet protocols, redirecting to file:
// is very popular among io-slaves and we don't want to break them
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "file", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", ":internet", QString::null, QString::null, "file", QString::null, QString::null, false));
+ ("redirect", ":internet", TQString::null, TQString::null, "file", TQString::null, TQString::null, false));
// local protocols may redirect everywhere
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", ":local", QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("redirect", ":local", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// Anyone may redirect to about:
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "about", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "about", TQString::null, TQString::null, true));
// Anyone may redirect to itself, cq. within it's own group
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "=", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "=", TQString::null, TQString::null, true));
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE URL Restrictions" );
int count = config->readNumEntry("rule_count");
- QString keyFormat = QString("rule_%1");
+ TQString keyFormat = TQString("rule_%1");
for(int i = 1; i <= count; i++)
{
- QString key = keyFormat.arg(i);
- QStringList rule = config->readListEntry(key);
+ TQString key = keyFormat.arg(i);
+ TQStringList rule = config->readListEntry(key);
if (rule.count() != 8)
continue;
- QString action = rule[0];
- QString refProt = rule[1];
- QString refHost = rule[2];
- QString refPath = rule[3];
- QString urlProt = rule[4];
- QString urlHost = rule[5];
- QString urlPath = rule[6];
- QString strEnabled = rule[7].lower();
+ TQString action = rule[0];
+ TQString refProt = rule[1];
+ TQString refHost = rule[2];
+ TQString refPath = rule[3];
+ TQString urlProt = rule[4];
+ TQString urlHost = rule[5];
+ TQString urlPath = rule[6];
+ TQString strEnabled = rule[7].lower();
bool bEnabled = (strEnabled == "true");
if (refPath.startsWith("$HOME"))
- refPath.replace(0, 5, QDir::homeDirPath());
+ refPath.replace(0, 5, TQDir::homeDirPath());
else if (refPath.startsWith("~"))
- refPath.replace(0, 1, QDir::homeDirPath());
+ refPath.replace(0, 1, TQDir::homeDirPath());
if (urlPath.startsWith("$HOME"))
- urlPath.replace(0, 5, QDir::homeDirPath());
+ urlPath.replace(0, 5, TQDir::homeDirPath());
else if (urlPath.startsWith("~"))
- urlPath.replace(0, 1, QDir::homeDirPath());
+ urlPath.replace(0, 1, TQDir::homeDirPath());
if (refPath.startsWith("$TMP"))
refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
@@ -3107,7 +3107,7 @@ void KApplication::initUrlActionRestrictions()
}
}
-void KApplication::allowURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL)
+void KApplication::allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (authorizeURLAction(action, _baseURL, _destURL))
return;
@@ -3117,7 +3117,7 @@ void KApplication::allowURLAction(const QString &action, const KURL &_baseURL, c
_destURL.protocol(), _destURL.host(), _destURL.path(-1), true));
}
-bool KApplication::authorizeURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL)
+bool KApplication::authorizeURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (_destURL.isEmpty())
return true;
@@ -3127,11 +3127,11 @@ bool KApplication::authorizeURLAction(const QString &action, const KURL &_baseUR
initUrlActionRestrictions();
KURL baseURL(_baseURL);
- baseURL.setPath(QDir::cleanDirPath(baseURL.path()));
- QString baseClass = KProtocolInfo::protocolClass(baseURL.protocol());
+ baseURL.setPath(TQDir::cleanDirPath(baseURL.path()));
+ TQString baseClass = KProtocolInfo::protocolClass(baseURL.protocol());
KURL destURL(_destURL);
- destURL.setPath(QDir::cleanDirPath(destURL.path()));
- QString destClass = KProtocolInfo::protocolClass(destURL.protocol());
+ destURL.setPath(TQDir::cleanDirPath(destURL.path()));
+ TQString destClass = KProtocolInfo::protocolClass(destURL.protocol());
for(KApplicationPrivate::URLActionRule *rule = d->urlActionRestrictions.first();
rule; rule = d->urlActionRestrictions.next())
diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h
index ca81bfc51..b7433bc36 100644
--- a/kdecore/kapplication.h
+++ b/kdecore/kapplication.h
@@ -35,8 +35,8 @@ typedef unsigned long Atom;
typedef void Display;
#endif
-#include <qapplication.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
#include <kinstance.h>
struct _IceConn;
@@ -59,7 +59,7 @@ class KApplicationPrivate;
*
* This class provides the following services to all KDE applications.
*
-* @li It controls the event queue (see QApplication ).
+* @li It controls the event queue (see TQApplication ).
* @li It provides the application with KDE resources such as
* accelerators, common menu entries, a KConfig object. session
* management events, help invocation etc.
@@ -91,7 +91,7 @@ class KApplicationPrivate;
* @short Controls and provides information to all KDE applications.
* @author Matthias Kalle Dalheimer <kalle@kde.org>
*/
-class KDECORE_EXPORT KApplication : public QApplication, public KInstance
+class KDECORE_EXPORT KApplication : public TQApplication, public KInstance
{
Q_OBJECT
@@ -173,7 +173,7 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
- KApplication(Display *display, int& argc, char** argv, const QCString& rAppName,
+ KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles=true, bool GUIenabled=true);
#endif
@@ -202,7 +202,7 @@ public:
// REMOVE FOR KDE 4.0 - using it only gives crashing applications because
// KCmdLineArgs::init isn't called
KApplication(int& argc, char** argv,
- const QCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
+ const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
/**
* Add Qt and KDE command line options to KCmdLineArgs.
@@ -214,7 +214,7 @@ public:
/**
* Returns the current application object.
*
- * This is similar to the global QApplication pointer qApp. It
+ * This is similar to the global TQApplication pointer qApp. It
* allows access to the single global KApplication object, since
* more than one cannot be created in the same application. It
* saves you the trouble of having to pass the pointer explicitly
@@ -240,7 +240,7 @@ public:
* sessionConfig() contains data saved by a session closedown.
* @see sessionConfig()
*/
- bool isRestored() const { return QApplication::isSessionRestored(); }
+ bool isRestored() const { return TQApplication::isSessionRestored(); }
/**
* Disables session management for this application.
@@ -399,28 +399,28 @@ public:
static void disableAutoDcopRegistration();
/**
- * Returns a QPixmap with the application icon.
+ * Returns a TQPixmap with the application icon.
* @return the application icon
*/
- QPixmap icon() const;
+ TQPixmap icon() const;
/**
* Returns the name of the application icon.
* @return the icon's name
*/
- QString iconName() const;
+ TQString iconName() const;
/**
- * Returns the mini-icon for the application as a QPixmap.
+ * Returns the mini-icon for the application as a TQPixmap.
* @return the application's mini icon
*/
- QPixmap miniIcon() const;
+ TQPixmap miniIcon() const;
/**
* Returns the name of the mini-icon for the application.
* @return the mini icon's name
*/
- QString miniIconName() const;
+ TQString miniIconName() const;
/**
* Sets the top widget of the application.
@@ -432,7 +432,7 @@ public:
*
* @see icon(), caption()
**/
- void setTopWidget( QWidget *topWidget );
+ void setTopWidget( TQWidget *topWidget );
/**
* Invokes the KHelpCenter HTML help viewer from docbook sources.
@@ -446,13 +446,13 @@ public:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeHelp( const QString& anchor,
- const QString& appname,
- const QCString& startup_id ) const;
+ void invokeHelp( const TQString& anchor,
+ const TQString& appname,
+ const TQCString& startup_id ) const;
// KDE4 merge with above with startup_id = ""
- void invokeHelp( const QString& anchor = QString::null,
- const QString& appname = QString::null ) const;
+ void invokeHelp( const TQString& anchor = TQString::null,
+ const TQString& appname = TQString::null ) const;
/**
* @deprecated
@@ -468,19 +468,19 @@ public:
* value will be appended to the filename,
* prefixed with a "#" (hash) character.
*/
- void invokeHTMLHelp( const QString& aFilename, const QString& aTopic = QString::null ) const KDE_DEPRECATED;
+ void invokeHTMLHelp( const TQString& aFilename, const TQString& aTopic = TQString::null ) const KDE_DEPRECATED;
/**
* Convenience method; invokes the standard email application.
*
* @param address The destination address
- * @param subject Subject string. Can be QString::null.
+ * @param subject Subject string. Can be TQString::null.
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeMailer( const QString &address, const QString &subject, const QCString& startup_id );
+ void invokeMailer( const TQString &address, const TQString &subject, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- void invokeMailer( const QString &address, const QString &subject );
+ void invokeMailer( const TQString &address, const TQString &subject );
/**
* Invokes the standard email application.
@@ -491,9 +491,9 @@ public:
* @param allowAttachments whether attachments specified in mailtoURL should be honoured.
The default is false; do not honour requests for attachments.
*/
- void invokeMailer( const KURL &mailtoURL, const QCString& startup_id, bool allowAttachments );
+ void invokeMailer( const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments );
// KDE4 merge with above with allowAttachments = false
- void invokeMailer( const KURL &mailtoURL, const QCString& startup_id );
+ void invokeMailer( const KURL &mailtoURL, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
void invokeMailer( const KURL &mailtoURL );
@@ -512,14 +512,14 @@ public:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString &messageFile, const QStringList &attachURLs,
- const QCString& startup_id );
+ void invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString &messageFile, const TQStringList &attachURLs,
+ const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- void invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString &messageFile = QString::null, const QStringList &attachURLs = QStringList());
+ void invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString &messageFile = TQString::null, const TQStringList &attachURLs = TQStringList());
public slots:
/**
@@ -532,19 +532,19 @@ public slots:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeBrowser( const QString &url, const QCString& startup_id );
+ void invokeBrowser( const TQString &url, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
/**
* Invoke the standard browser. Uses a @p startup_id of "" (empty)
* and is otherwise the same as the above function.
*/
- void invokeBrowser( const QString &url );
+ void invokeBrowser( const TQString &url );
/**
* If the widget with focus provides a cut() slot, call that slot. Thus for a
* simple application cut can be implemented as:
* \code
- * KStdAction::cut( kapp, SLOT( cut() ), actionCollection() );
+ * KStdAction::cut( kapp, TQT_SLOT( cut() ), actionCollection() );
* \endcode
*/
void cut();
@@ -553,7 +553,7 @@ public slots:
* If the widget with focus provides a copy() slot, call that slot. Thus for a
* simple application copy can be implemented as:
* \code
- * KStdAction::copy( kapp, SLOT( copy() ), actionCollection() );
+ * KStdAction::copy( kapp, TQT_SLOT( copy() ), actionCollection() );
* \endcode
*/
void copy();
@@ -562,7 +562,7 @@ public slots:
* If the widget with focus provides a paste() slot, call that slot. Thus for a
* simple application copy can be implemented as:
* \code
- * KStdAction::paste( kapp, SLOT( paste() ), actionCollection() );
+ * KStdAction::paste( kapp, TQT_SLOT( paste() ), actionCollection() );
* \endcode
*/
void paste();
@@ -571,7 +571,7 @@ public slots:
* If the widget with focus provides a clear() slot, call that slot. Thus for a
* simple application clear() can be implemented as:
* \code
- * new KAction( i18n( "Clear" ), "editclear", 0, kapp, SLOT( clear() ), actionCollection(), "clear" );
+ * new KAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" );
* \endcode
*
* Note that for some widgets, this may not provide the intended bahavior. For
@@ -585,7 +585,7 @@ public slots:
* class MyListView : public KListView {
* Q_OBJECT
* public:
- * MyListView( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {}
+ * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {}
* virtual ~MyListView() {}
* public slots:
* virtual void clear() {}
@@ -598,7 +598,7 @@ public slots:
* If the widget with focus provides a selectAll() slot, call that slot. Thus for a
* simple application select all can be implemented as:
* \code
- * KStdAction::selectAll( kapp, SLOT( selectAll() ), actionCollection() );
+ * KStdAction::selectAll( kapp, TQT_SLOT( selectAll() ), actionCollection() );
* \endcode
*/
void selectAll();
@@ -617,7 +617,7 @@ public:
* klaucher_$host_$uid.
* @return the name of the service launcher
*/
- static QCString launcher();
+ static TQCString launcher();
/**
* Starts a service based on the (translated) name of the service.
@@ -639,8 +639,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByName( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid=0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByName( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the (translated) name of the service.
@@ -662,8 +662,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByName( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid=0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByName( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop path of the service.
@@ -685,8 +685,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopPath( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopPath( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop path of the service.
@@ -708,8 +708,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopPath( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop name of the service.
@@ -731,8 +731,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopName( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopName( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop name of the service.
@@ -754,8 +754,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopName( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopName( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a program via kdeinit.
@@ -774,11 +774,11 @@ public:
* "" ( empty string ) is the default
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id );
+ static int kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- static int kdeinitExec( const QString& name, const QStringList &args=QStringList(),
- QString *error=0, int *pid = 0 );
+ static int kdeinitExec( const TQString& name, const TQStringList &args=TQStringList(),
+ TQString *error=0, int *pid = 0 );
/**
* Starts a program via kdeinit and wait for it to finish.
@@ -797,11 +797,11 @@ public:
* "" ( empty string ) is the default
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id );
+ static int kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- static int kdeinitExecWait( const QString& name, const QStringList &args=QStringList(),
- QString *error=0, int *pid = 0 );
+ static int kdeinitExecWait( const TQString& name, const TQStringList &args=TQStringList(),
+ TQString *error=0, int *pid = 0 );
/**
* Returns a text for the window caption.
@@ -811,7 +811,7 @@ public:
* executable.
* @return the text for the window caption
*/
- QString caption() const;
+ TQString caption() const;
/**
* @deprecated
@@ -835,7 +835,7 @@ public:
* modified, i.e., it contains data that has not been saved.
* @return the created caption
*/
- QString makeStdCaption( const QString &userCaption,
+ TQString makeStdCaption( const TQString &userCaption,
bool withAppName=true, bool modified=false ) const;
/**
@@ -845,7 +845,7 @@ public:
* document.
* @return A new filename for auto-saving.
*/
- QString tempSaveName( const QString& pFilename ) const;
+ TQString tempSaveName( const TQString& pFilename ) const;
/**
* Check whether an auto-save file exists for the document you want to
@@ -856,7 +856,7 @@ public:
* file.
* @return The full path of the file to open.
*/
- QString checkRecoverFile( const QString& pFilename, bool& bRecover ) const;
+ TQString checkRecoverFile( const TQString& pFilename, bool& bRecover ) const;
#ifdef Q_WS_X11
/**
@@ -888,18 +888,18 @@ public:
* Installs widget filter as global X11 event filter.
*
* The widget
- * filter receives XEvents in its standard QWidget::x11Event() function.
+ * filter receives XEvents in its standard TQWidget::x11Event() function.
*
* Warning: Only do this when absolutely necessary. An installed X11 filter
* can slow things down.
**/
- void installX11EventFilter( QWidget* filter );
+ void installX11EventFilter( TQWidget* filter );
/**
* Removes global X11 event filter previously installed by
* installX11EventFilter().
*/
- void removeX11EventFilter( const QWidget* filter );
+ void removeX11EventFilter( const TQWidget* filter );
/**
* Generates a uniform random number.
@@ -912,7 +912,7 @@ public:
* @param length Generate a string of this length.
* @return the random string
*/
- static QString randomString(int length);
+ static TQString randomString(int length);
/**
* Adds a message type to the KIPC event mask. You can only add "system
@@ -940,7 +940,7 @@ public:
* application.
* @return the startup notification identifier
*/
- QCString startupId() const;
+ TQCString startupId() const;
/**
* @internal
@@ -949,7 +949,7 @@ public:
* @param startup_id the startup notification identifier
* @see KStartupInfo::setNewStartupId
*/
- void setStartupId( const QCString& startup_id );
+ void setStartupId( const TQCString& startup_id );
/**
* Updates the last user action timestamp to the given time, or to the current time,
@@ -974,18 +974,18 @@ public:
* Consult focus stealing prevention section in kdebase/kwin/README.
* @since 3.3
*/
- void updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time = 0 );
+ void updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time = 0 );
/**
* Returns the argument to --geometry if any, so the geometry can be set
* wherever necessary
- * @return the geometry argument, or QString::null if there is none
+ * @return the geometry argument, or TQString::null if there is none
*/
- QString geometryArgument() const;
+ TQString geometryArgument() const;
/**
* Install a Qt SQL property map with entries for all KDE widgets
- * Call this in any application using KDE widgets in QSqlForm or QDataView.
+ * Call this in any application using KDE widgets in TQSqlForm or TQDataView.
*/
void installKDEPropertyMap();
@@ -994,7 +994,7 @@ public:
* @param genericAction The name of a generic action
* @return true if the action is authorized
*/
- bool authorize(const QString &genericAction);
+ bool authorize(const TQString &genericAction);
/**
* Returns whether a certain KAction is authorized.
@@ -1018,7 +1018,7 @@ public:
* @return true when the action is authorized, false otherwise.
* @since 3.1
*/
- bool authorizeURLAction(const QString &action, const KURL &baseURL, const KURL &destURL);
+ bool authorizeURLAction(const TQString &action, const KURL &baseURL, const KURL &destURL);
/**
* Allow a certain URL action. This can be useful if your application
@@ -1029,7 +1029,7 @@ public:
* @param _destURL The object of the action
* @since 3.2
*/
- void allowURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL);
+ void allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL);
/**
* Returns whether access to a certain control module is authorized.
@@ -1038,7 +1038,7 @@ public:
* @return true if access to the module is authorized, false otherwise.
* @since 3.2
*/
- bool authorizeControlModule(const QString &menuId);
+ bool authorizeControlModule(const TQString &menuId);
/**
* Returns whether access to a certain control modules is authorized.
@@ -1048,12 +1048,12 @@ public:
* @return Those control modules for which access has been authorized.
* @since 3.2
*/
- QStringList authorizeControlModules(const QStringList &menuIds);
+ TQStringList authorizeControlModules(const TQStringList &menuIds);
/**
* Returns the state of the currently pressed keyboard modifiers (e.g. shift, control, etc.)
- * and mouse buttons, similarly to QKeyEvent::state() and QMouseEvent::state().
- * You usually should simply use the information provided by QKeyEvent and QMouseEvent,
+ * and mouse buttons, similarly to TQKeyEvent::state() and TQMouseEvent::state().
+ * You usually should simply use the information provided by TQKeyEvent and TQMouseEvent,
* but it can be useful to query for the status of the modifiers at another moment
* (e.g. some KDE apps do that upon a drop event).
* @return the keyboard modifiers and mouse buttons state
@@ -1135,7 +1135,7 @@ protected:
* This method is used internally to determine which edit slots are implemented
* by the widget that has the focus, and to invoke those slots if available.
*
- * @param slot is the slot as returned using the SLOT() macro, for example SLOT( cut() )
+ * @param slot is the slot as returned using the TQT_SLOT() macro, for example TQT_SLOT( cut() )
*
* This method can be used in KApplication subclasses to implement application wide
* edit actions not supported by the KApplication class. For example (in your subclass):
@@ -1143,7 +1143,7 @@ protected:
* \code
* void MyApplication::deselect()
* {
- * invokeEditSlot( SLOT( deselect() ) );
+ * invokeEditSlot( TQT_SLOT( deselect() ) );
* }
* \endcode
*
@@ -1151,7 +1151,7 @@ protected:
* focused widget if it provides this slot. You can combine this with KAction with:
*
* \code
- * KStdAction::deselect( static_cast<MyApplication *>( kapp ), SLOT( cut() ), actionCollection() );
+ * KStdAction::deselect( static_cast<MyApplication *>( kapp ), TQT_SLOT( cut() ), actionCollection() );
* \endcode
*
* @see cut()
@@ -1165,29 +1165,29 @@ protected:
void invokeEditSlot( const char *slot );
private slots:
- void dcopFailure(const QString &);
+ void dcopFailure(const TQString &);
void dcopBlockUserInput( bool );
void x11FilterDestroyed();
void checkAppStartedSlot();
private:
- QString sessionConfigName() const;
+ TQString sessionConfigName() const;
KConfig* pSessionConfig; //instance specific application config object
static DCOPClient *s_DCOPClient; // app specific application communication client
static bool s_dcopClientNeedsPostInit;
- QString aCaption; // the name for the window title
+ TQString aCaption; // the name for the window title
bool bSessionManagement;
- struct oldPixmapType { QPixmap a, b; };
+ struct oldPixmapType { TQPixmap a, b; };
mutable union {
struct {
- QPixmap *icon, *miniIcon;
+ TQPixmap *icon, *miniIcon;
} pm;
char unused[sizeof(oldPixmapType)];
} aIconPixmap; // KDE4: remove me
- QString aIconName;
- QString aMiniIconName;
+ TQString aIconName;
+ TQString aMiniIconName;
bool useStyles;
- QWidget *smw;
+ TQWidget *smw;
void init( bool GUIenabled );
@@ -1203,7 +1203,7 @@ public:
/**
* @internal
*/
- bool notify(QObject *receiver, QEvent *event);
+ bool notify(TQObject *receiver, TQEvent *event);
/**
@internal
@@ -1237,20 +1237,20 @@ public:
SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS };
/**
- * Used to obtain the QPalette that will be used to set the application palette.
+ * Used to obtain the TQPalette that will be used to set the application palette.
*
* This is only useful for configuration modules such as krdb and should not be
* used in normal circumstances.
* @return the QPalette
* @since 3.1
*/
- static QPalette createApplicationPalette();
+ static TQPalette createApplicationPalette();
/**
* @internal
* Raw access for use by KDM.
*/
- static QPalette createApplicationPalette( KConfig *config, int contrast );
+ static TQPalette createApplicationPalette( KConfig *config, int contrast );
/**
* Installs a handler for the SIGPIPE signal. It is thrown when you write to
@@ -1295,7 +1295,7 @@ signals:
* using explicit fonts.
*
* Note: If you derive from a QWidget-based class, a faster method is to
- * reimplement QWidget::fontChange(). This is the preferred way
+ * reimplement TQWidget::fontChange(). This is the preferred way
* to get informed about font updates.
*/
void kdisplayFontChanged();
@@ -1432,7 +1432,7 @@ private:
* @param mode The access mode, as in the access() system call.
* @return Whether the access is allowed, true = Access allowed
*/
-KDECORE_EXPORT bool checkAccess(const QString& pathname, int mode);
+KDECORE_EXPORT bool checkAccess(const TQString& pathname, int mode);
class KSessionManagedPrivate;
@@ -1441,7 +1441,7 @@ class KSessionManagedPrivate;
base.
KSessionManaged makes it possible to provide implementations for
- QApplication::commitData() and QApplication::saveState(), without
+ TQApplication::commitData() and TQApplication::saveState(), without
subclassing KApplication. KMainWindow internally makes use of this.
You don't need to do anything with this class when using
@@ -1459,7 +1459,7 @@ public:
virtual ~KSessionManaged();
/**
- See QApplication::saveState() for documentation.
+ See TQApplication::saveState() for documentation.
This function is just a convenience version to avoid subclassing KApplication.
@@ -1469,7 +1469,7 @@ public:
*/
virtual bool saveState( QSessionManager& sm );
/**
- See QApplication::commitData() for documentation.
+ See TQApplication::commitData() for documentation.
This function is just a convenience version to avoid subclassing KApplication.
diff --git a/kdecore/kapplication_win.cpp b/kdecore/kapplication_win.cpp
index dea2a3df1..abf0694b4 100644
--- a/kdecore/kapplication_win.cpp
+++ b/kdecore/kapplication_win.cpp
@@ -26,7 +26,7 @@
#include "kappdcopiface.h"
#include <qassistantclient.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "windows.h"
#include "shellapi.h"
@@ -34,7 +34,7 @@
/**
* MS Windows-related actions for KApplication startup.
*
- * - Use Qt translation which will be usable for QFileDialog
+ * - Use Qt translation which will be usable for TQFileDialog
* and other Qt-only GUIs. The "qt_<language>.qm" file should be stored
* in the same place as .po files for a given language.
*
@@ -42,7 +42,7 @@
*/
void KApplication_init_windows(bool /*GUIenabled*/)
{
- QString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
+ TQString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
+ "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" );
QTranslator *qt_transl = new QTranslator();
if (qt_transl->load( qt_transl_file, ""))
@@ -65,24 +65,24 @@ public:
int refCount;
IceIOErrorHandler oldIceIOErrorHandler;
KCheckAccelerators* checkAccelerators;
- QString overrideStyle;
- QString geometry_arg;
- QCString startup_id;
- QTimer* app_started_timer;
+ TQString overrideStyle;
+ TQString geometry_arg;
+ TQCString startup_id;
+ TQTimer* app_started_timer;
KAppDCOPInterface *m_KAppDCOPInterface;
bool session_save;
QAssistantClient* qassistantclient;
};
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname, const QCString& startup_id ) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname, const TQCString& startup_id ) const
{
if (!d->qassistantclient) {
d->qassistantclient = new QAssistantClient(
KStandardDirs::findExe( "assistant" ), 0);
- QStringList args;
+ TQStringList args;
args << "-profile";
- args << QDir::convertSeparators( locate("html", QString(name())+"/"+QString(name())+".adp") );
+ args << TQDir::convertSeparators( locate("html", TQString(name())+"/"+TQString(name())+".adp") );
d->qassistantclient->setArguments(args);
}
d->qassistantclient->openAssistant();
@@ -90,27 +90,27 @@ void KApplication::invokeHelp( const QString& anchor,
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const QString &url, const QCString& startup_id )
+void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
- QCString s = url.latin1();
+ TQCString s = url.latin1();
const unsigned short *l = (const unsigned short *)s.data();
ShellExecuteA(0, "open", s.data(), 0, 0, SW_NORMAL);
}
-void KApplication::invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString & /*messageFile TODO*/, const QStringList &attachURLs,
- const QCString& startup_id )
+void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
+ const TQCString& startup_id )
{
KURL url("mailto:"+to);
url.setQuery("?subject="+subject);
url.addQueryItem("cc", cc);
url.addQueryItem("bcc", bcc);
url.addQueryItem("body", body);
- for (QStringList::ConstIterator it = attachURLs.constBegin(); it != attachURLs.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = attachURLs.constBegin(); it != attachURLs.constEnd(); ++it)
url.addQueryItem("attach", KURL::encode_string(*it));
- QCString s = url.url().latin1();
+ TQCString s = url.url().latin1();
const unsigned short *l = (const unsigned short *)s.data();
ShellExecuteA(0, "open", s.data(), 0, 0, SW_NORMAL);
}
diff --git a/kdecore/kasyncio.h b/kdecore/kasyncio.h
index c1c3e9a11..a96e30cd8 100644
--- a/kdecore/kasyncio.h
+++ b/kdecore/kasyncio.h
@@ -21,8 +21,8 @@
#define KASYNCIO_H
-#include <qobject.h>
-#include <qiodevice.h>
+#include <tqobject.h>
+#include <tqiodevice.h>
#include "kdelibs_export.h"
class KAsyncIOPrivate;
@@ -30,12 +30,12 @@ class KAsyncIOPrivate;
* Asynchronous I/O Support
*
* This abstract class provides basic functionality for asynchronous I/O
- * support on top of QIODevice.
+ * support on top of TQIODevice.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short Asynchronous I/O support
*/
-class KDECORE_EXPORT KAsyncIO: public QObject, public QIODevice
+class KDECORE_EXPORT KAsyncIO: public TQObject, public QIODevice
{
Q_OBJECT
protected:
diff --git a/kdecore/kaudioplayer.cpp b/kdecore/kaudioplayer.cpp
index c14b7334b..0dae392c9 100644
--- a/kdecore/kaudioplayer.cpp
+++ b/kdecore/kaudioplayer.cpp
@@ -25,13 +25,13 @@
class KAudioPlayerPrivate {
public:
- QString filename;
+ TQString filename;
- KAudioPlayerPrivate(const QString &filename) : filename(filename) { }
+ KAudioPlayerPrivate(const TQString &filename) : filename(filename) { }
};
-KAudioPlayer::KAudioPlayer( const QString& filename,
- QObject* parent, const char* name ) : QObject(parent,name)
+KAudioPlayer::KAudioPlayer( const TQString& filename,
+ TQObject* parent, const char* name ) : TQObject(parent,name)
{
d = new KAudioPlayerPrivate(filename);
}
@@ -41,7 +41,7 @@ KAudioPlayer::~KAudioPlayer()
delete d;
}
-void KAudioPlayer::play(const QString &filename)
+void KAudioPlayer::play(const TQString &filename)
{
KAudioPlayer ap(filename);
ap.play();
diff --git a/kdecore/kaudioplayer.h b/kdecore/kaudioplayer.h
index bf77aeb59..81ca2cdf7 100644
--- a/kdecore/kaudioplayer.h
+++ b/kdecore/kaudioplayer.h
@@ -23,7 +23,7 @@
#ifndef __KAUDIOPLAYER_H__
#define __KAUDIOPLAYER_H__
-#include <qobject.h>
+#include <tqobject.h>
#include "kdelibs_export.h"
class KAudioPlayerPrivate;
@@ -48,23 +48,23 @@ class KAudioPlayerPrivate;
*
* \code
* KAudioPlayer player("/var/share/foo.wav");
- * connect(&button, SIGNAL(clicked()), &player, SLOT(play()));
+ * connect(&button, TQT_SIGNAL(clicked()), &player, TQT_SLOT(play()));
* \endcode
*
*/
//REVISED: hausmann
-class KDECORE_EXPORT KAudioPlayer : public QObject {
+class KDECORE_EXPORT KAudioPlayer : public TQObject {
Q_OBJECT
public:
/**
* Constructor.
*
* @param filename Absolute path to the filename of the sound file to play
- * @param parent A parent QObject for this KAudioPlayer
+ * @param parent A parent TQObject for this KAudioPlayer
* @param name An internal name for this KAudioPlayer
*/
- KAudioPlayer( const QString& filename,
- QObject* parent = 0, const char* name = 0 );
+ KAudioPlayer( const TQString& filename,
+ TQObject* parent = 0, const char* name = 0 );
/**
* Destructor.
@@ -77,7 +77,7 @@ public:
* @param filename Absolute path to the filename of the sound file to play.
* if not absolute, goes off KDEDIR/share/sounds/ (preferred)
*/
- static void play(const QString &filename);
+ static void play(const TQString &filename);
public slots:
/**
diff --git a/kdecore/kbufferedio.cpp b/kdecore/kbufferedio.cpp
index 1c46e4f05..5b9e66dce 100644
--- a/kdecore/kbufferedio.cpp
+++ b/kdecore/kbufferedio.cpp
@@ -22,8 +22,8 @@
#include <string.h>
-#include <qptrlist.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
#include "kbufferedio.h"
/**
@@ -39,7 +39,7 @@
* simply QByteArrays. The idea is that, instead of having one large, contiguous
* buffer area, we have several small ones. Even though this could be seen as
* a waste of memory, it makes our life easier, because we can just append a new
- * QByteArray to the list and not have to worry with copying the rest of the
+ * TQByteArray to the list and not have to worry with copying the rest of the
* buffer, should we need to expand.
*
* This way, we have the capability of unlimited buffering, which can grow to
@@ -47,7 +47,7 @@
*
* For each buffer, we provide three kinds of functions, available as protected
* members: consume, feed and size. The size functions calculate the current
- * size of the buffer, by adding each individual QByteArray size. The feed
+ * size of the buffer, by adding each individual TQByteArray size. The feed
* functions are used by the I/O functions that receive data from somewhere,
* i.e., from the system, in the case of the input buffer, and from the user,
* in the case of the output buffer. These two functions are used to give
@@ -73,11 +73,11 @@
*
* Both buffers work in the same way: they're an "array" of buffers, each
* concatenated to the other. All data in all buffers is valid data, except
- * for the first QByteArray, whose valid data starts at inBufIndex/outBufIndex
- * bytes from the start. That is, the data starts in the first QByteArray buffer
+ * for the first TQByteArray, whose valid data starts at inBufIndex/outBufIndex
+ * bytes from the start. That is, the data starts in the first TQByteArray buffer
* that many bytes from the start and goes on contiguously until the last
- * QByteArray. This has been decided like that because we didn't want to
- * create a new QByteArray of the remaining bytes in the first buffer, after
+ * TQByteArray. This has been decided like that because we didn't want to
+ * create a new TQByteArray of the remaining bytes in the first buffer, after
* a consume operation, because that could take some time. It is faster
* this way, although not really easy.
*
@@ -127,10 +127,10 @@ bool KBufferedIO::canReadLine() const
if (bytesAvailable() == 0)
return false; // no new line in here
- QByteArray* buf;
+ TQByteArray* buf;
- // scan each QByteArray for the occurrence of '\n'
- QPtrList<QByteArray> &buflist = ((KBufferedIO*)this)->inBuf;
+ // scan each TQByteArray for the occurrence of '\n'
+ TQPtrList<TQByteArray> &buflist = ((KBufferedIO*)this)->inBuf;
buf = buflist.first();
char *p = buf->data() + inBufIndex;
int n = buf->size() - inBufIndex;
@@ -169,7 +169,7 @@ unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool
nbytes = u; // we can't consume more than there is
}
- QByteArray *buf;
+ TQByteArray *buf;
unsigned copied = 0;
unsigned index = inBufIndex;
@@ -213,7 +213,7 @@ unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool
void KBufferedIO::consumeWriteBuffer(unsigned nbytes)
{
- QByteArray *buf = outBuf.first();
+ TQByteArray *buf = outBuf.first();
if (buf == NULL)
return; // nothing to consume
@@ -245,7 +245,7 @@ unsigned KBufferedIO::feedReadBuffer(unsigned nbytes, const char *buffer, bool a
if (nbytes == 0)
return 0;
- QByteArray *a = new QByteArray(nbytes);
+ TQByteArray *a = new TQByteArray(nbytes);
a->duplicate(buffer, nbytes);
if (atBeginning)
@@ -261,7 +261,7 @@ unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
if (nbytes == 0)
return 0;
- QByteArray *a = new QByteArray(nbytes);
+ TQByteArray *a = new TQByteArray(nbytes);
a->duplicate(buffer, nbytes);
outBuf.append(a);
return nbytes;
@@ -270,7 +270,7 @@ unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
unsigned KBufferedIO::readBufferSize() const
{
unsigned count = 0;
- QByteArray *buf = ((KBufferedIO*)this)->inBuf.first();
+ TQByteArray *buf = ((KBufferedIO*)this)->inBuf.first();
while (buf != NULL)
{
count += buf->size();
@@ -283,7 +283,7 @@ unsigned KBufferedIO::readBufferSize() const
unsigned KBufferedIO::writeBufferSize() const
{
unsigned count = 0;
- QByteArray *buf = ((KBufferedIO*)this)->outBuf.first();
+ TQByteArray *buf = ((KBufferedIO*)this)->outBuf.first();
while (buf != NULL)
{
count += buf->size();
diff --git a/kdecore/kbufferedio.h b/kdecore/kbufferedio.h
index 47579738d..b020663eb 100644
--- a/kdecore/kbufferedio.h
+++ b/kdecore/kbufferedio.h
@@ -21,8 +21,8 @@
#ifndef KBUFFEREDIO_H
#define KBUFFEREDIO_H
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include "kasyncio.h"
class KBufferedIOPrivate;
@@ -34,7 +34,7 @@ class KBufferedIOPrivate;
* available for reading, how many are still unsent and you can peek at
* the buffered data.
*
- * This class was intentionally written to resemble QSocket, because
+ * This class was intentionally written to resemble TQSocket, because
* KExtendedSocket is a subclass of this one. This is so that applications
* written using QSocket's buffering characteristics will be more easily
* ported to the more powerful KExtendedSocket class.
@@ -42,7 +42,7 @@ class KBufferedIOPrivate;
* KBufferedIO already provides a powerful internal buffering algorithm. However,
* this does not include the I/O itself, which must be implemented in
* derived classes. Thus, to implement a class that does some I/O, you must
- * override, in addition to the pure virtual QIODevice methods, these two:
+ * override, in addition to the pure virtual TQIODevice methods, these two:
* @li closeNow()
* @li waitForMore()
*
@@ -84,8 +84,8 @@ public:
* Closes the stream now, discarding the contents of the
* write buffer. That is, we won't try to flush that
* buffer before closing. If you want that buffer to be
- * flushed, you can call QIODevice::flush(), which is blocking, and
- * then closeNow, or you can call QIODevice::close() for a delayed
+ * flushed, you can call TQIODevice::flush(), which is blocking, and
+ * then closeNow, or you can call TQIODevice::close() for a delayed
* close.
*/
virtual void closeNow() = 0;
@@ -209,13 +209,13 @@ protected:
* For an explanation on how this buffer work, please refer to the comments
* at the top of kbufferedio.cpp, @ref impldetails .
*/
- QPtrList<QByteArray> inBuf;
+ TQPtrList<TQByteArray> inBuf;
/**
* For an explanation on how this buffer work, please refer to the comments
* at the top of kbufferedio.cpp, @ref impldetails .
*/
- QPtrList<QByteArray> outBuf;
+ TQPtrList<TQByteArray> outBuf;
unsigned inBufIndex /** Offset into first input buffer. */,
outBufIndex /** Offset into first output buffer. */ ;
diff --git a/kdecore/kcalendarsystem.cpp b/kdecore/kcalendarsystem.cpp
index 150dbda1b..57898da84 100644
--- a/kdecore/kcalendarsystem.cpp
+++ b/kdecore/kcalendarsystem.cpp
@@ -52,9 +52,9 @@ const KLocale * KCalendarSystem::locale() const
return KGlobal::locale();
}
-QString KCalendarSystem::dayString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::dayString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(day(pDate));
if (!bShort && sResult.length() == 1 )
@@ -63,9 +63,9 @@ QString KCalendarSystem::dayString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystem::monthString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::monthString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(month(pDate));
if (!bShort && sResult.length() == 1 )
@@ -74,9 +74,9 @@ QString KCalendarSystem::monthString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystem::yearString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::yearString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(year(pDate));
if (bShort && sResult.length() == 4 )
@@ -85,7 +85,7 @@ QString KCalendarSystem::yearString(const QDate & pDate, bool bShort) const
return sResult;
}
-static int stringToInteger(const QString & sNum, int & iLength)
+static int stringToInteger(const TQString & sNum, int & iLength)
{
unsigned int iPos = 0;
@@ -101,22 +101,22 @@ static int stringToInteger(const QString & sNum, int & iLength)
}
-int KCalendarSystem::dayStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::dayStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-int KCalendarSystem::monthStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::monthStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-int KCalendarSystem::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::yearStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-QString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
+TQString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
{
if ( shortName )
switch ( weekDay )
@@ -141,6 +141,6 @@ QString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
case 7: return locale()->translate("Sunday");
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdecore/kcalendarsystem.h b/kdecore/kcalendarsystem.h
index a2740492e..826539a65 100644
--- a/kdecore/kcalendarsystem.h
+++ b/kdecore/kcalendarsystem.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEM_H
#define KCALENDARSYSTEM_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class KLocale;
@@ -60,7 +60,7 @@ public:
* @param date gregorian date
* @return year
*/
- virtual int year (const QDate & date) const = 0;
+ virtual int year (const TQDate & date) const = 0;
/**
* Converts a date into a year literal
@@ -69,7 +69,7 @@ public:
* @param bShort If the short version of should be used
* @return The year literal of the date
*/
- virtual QString yearString(const QDate & pDate, bool bShort) const;
+ virtual TQString yearString(const TQDate & pDate, bool bShort) const;
/**
* Converts a year literal of a part of a string into a integer starting at the beginning of the string
@@ -78,7 +78,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the year
*/
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type month for a given gregorian date
@@ -86,7 +86,7 @@ public:
* @param date gregorian date
* @return month number
*/
- virtual int month (const QDate & date) const = 0;
+ virtual int month (const TQDate & date) const = 0;
/**
* Converts a date into a month literal
@@ -95,7 +95,7 @@ public:
* @param bShort If the short version of should be used
* @return The month literal of the date
*/
- virtual QString monthString(const QDate & pDate, bool bShort) const;
+ virtual TQString monthString(const TQDate & pDate, bool bShort) const;
/**
* Converts a month literal of a part of a string into a integer starting at the beginning of the string
@@ -104,7 +104,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the month
*/
- virtual int monthStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int monthStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type day number of month for a given date
@@ -112,7 +112,7 @@ public:
* @param date gregorian date equivalent to the specific one
* @return day of the month
*/
- virtual int day (const QDate & date) const = 0;
+ virtual int day (const TQDate & date) const = 0;
/**
* Converts a date into a day literal
@@ -121,7 +121,7 @@ public:
* @param bShort If the short version of should be used
* @return The day literal of the date
*/
- virtual QString dayString(const QDate & pDate, bool bShort) const;
+ virtual TQString dayString(const TQDate & pDate, bool bShort) const;
/**
* Converts a day literal of a part of a string into a integer starting at the beginning of the string
@@ -130,7 +130,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the day
*/
- virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type number of day of week number for a given
@@ -139,7 +139,7 @@ public:
* @param date gregorian date
* @return day of week
*/
- virtual int dayOfWeek (const QDate & date) const = 0;
+ virtual int dayOfWeek (const TQDate & date) const = 0;
/**
* Gets specific calendar type day number of year for a given date
@@ -147,7 +147,7 @@ public:
* @param date gregorian date equivalent to the specific one
* @return day number
*/
- virtual int dayOfYear (const QDate & date) const = 0;
+ virtual int dayOfYear (const TQDate & date) const = 0;
/**
* Changes the date's year, month and day. The range of the year, month
@@ -159,34 +159,34 @@ public:
* @param d Day of month
* @return true if the date is valid; otherwise returns false.
*/
- virtual bool setYMD(QDate & date, int y, int m, int d) const = 0;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const = 0;
/**
- * Returns a QDate object containing a date nyears later.
+ * Returns a TQDate object containing a date nyears later.
*
* @param date The old date
* @param nyears The number of years to add
* @return The new date
*/
- virtual QDate addYears(const QDate & date, int nyears) const = 0;
+ virtual TQDate addYears(const TQDate & date, int nyears) const = 0;
/**
- * Returns a QDate object containing a date nmonths later.
+ * Returns a TQDate object containing a date nmonths later.
*
* @param date The old date
* @param nmonths The number of months to add
* @return The new date
*/
- virtual QDate addMonths(const QDate & date, int nmonths) const = 0;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const = 0;
/**
- * Returns a QDate object containing a date ndays later.
+ * Returns a TQDate object containing a date ndays later.
*
* @param date The old date
* @param ndays The number of days to add
* @return The new date
*/
- virtual QDate addDays(const QDate & date, int ndays) const = 0;
+ virtual TQDate addDays(const TQDate & date, int ndays) const = 0;
/**
* Gets specific calendar type number of month for a given year
@@ -194,7 +194,7 @@ public:
* @param date The date whose year to use
* @return The number of months in that year
*/
- virtual int monthsInYear (const QDate & date) const = 0;
+ virtual int monthsInYear (const TQDate & date) const = 0;
/**
* Gets the number of days in date whose years specified.
@@ -202,7 +202,7 @@ public:
* @param date Gregorian date equivalent to the specific one
* @return The number of days in year
*/
- virtual int daysInYear (const QDate & date) const = 0;
+ virtual int daysInYear (const TQDate & date) const = 0;
/**
* Gets specific calendar type number of days in month for a given date
@@ -210,7 +210,7 @@ public:
* @param date gregorian date
* @return number of days for month in date
*/
- virtual int daysInMonth (const QDate & date) const = 0;
+ virtual int daysInMonth (const TQDate & date) const = 0;
/**
* Gets the number of weeks in a specified year
@@ -227,18 +227,18 @@ public:
* @param yearNum The year the date belongs to
* @return week number
*/
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const = 0;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const = 0;
/**
* Gets specific calendar type month name for a given month number
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, TQString::null is returned.
*
* @param month The month number
* @param year The year the month belongs to
* @param shortName Specifies if the short month name should be used
* @return The name of the month
*/
- virtual QString monthName (int month, int year, bool shortName = false) const = 0;
+ virtual TQString monthName (int month, int year, bool shortName = false) const = 0;
/**
* Gets specific calendar type month name for a given gregorian date
@@ -247,13 +247,13 @@ public:
* @param shortName Specifies if the short month name should be used
* @return The name of the month
*/
- virtual QString monthName (const QDate & date, bool shortName = false ) const = 0;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const = 0;
/**
* Returns a string containing the possessive form of the month name.
* ("of January", "of February", etc.)
* It's needed in long format dates in some languages.
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, TQString::null is returned.
*
* @param month The month number
* @param year The year the month belongs to
@@ -261,7 +261,7 @@ public:
*
* @return The possessive form of the name of the month
*/
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
/**
* Returns a string containing the possessive form of the month name.
@@ -273,17 +273,17 @@ public:
*
* @return The possessive form of the name of the month
*/
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false) const = 0;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false) const = 0;
/**
* Gets specific calendar type week day name
- * If an invalid week day is specified, QString::null is returned.
+ * If an invalid week day is specified, TQString::null is returned.
*
* @param weekDay number of day in week (1 -> Monday)
* @param shortName short or complete day name
* @return day name
*/
- virtual QString weekDayName (int weekDay, bool shortName = false) const = 0;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const = 0;
/**
* Gets specific calendar type week day name
@@ -292,7 +292,7 @@ public:
* @param shortName short or complete day name
* @return day name
*/
- virtual QString weekDayName (const QDate & date, bool shortName = false) const = 0;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const = 0;
/**
* Gets the first year value supported by specific calendar type
@@ -304,7 +304,7 @@ public:
/**
* Gets the maximum year value supported by specific calendar type
- * algorithms (QDate, 8000)
+ * algorithms (TQDate, 8000)
*
* @return maximum year supported
*/
@@ -320,7 +320,7 @@ public:
/**
* Gets the string representing the calendar
*/
- virtual QString calendarName() const = 0;
+ virtual TQString calendarName() const = 0;
/**
* Gets if the calendar is lunar based
diff --git a/kdecore/kcalendarsystemfactory.cpp b/kdecore/kcalendarsystemfactory.cpp
index 28c3a6bfa..723873497 100644
--- a/kdecore/kcalendarsystemfactory.cpp
+++ b/kdecore/kcalendarsystemfactory.cpp
@@ -40,7 +40,7 @@ KCalendarSystemFactory::~KCalendarSystemFactory()
{
}
-KCalendarSystem *KCalendarSystemFactory::create( const QString &calType,
+KCalendarSystem *KCalendarSystemFactory::create( const TQString &calType,
const KLocale * locale )
{
if ( calType == "hebrew" )
@@ -58,9 +58,9 @@ KCalendarSystem *KCalendarSystemFactory::create( const QString &calType,
return new KCalendarSystemGregorian(locale);
}
-QStringList KCalendarSystemFactory::calendarSystems()
+TQStringList KCalendarSystemFactory::calendarSystems()
{
- QStringList lst;
+ TQStringList lst;
lst.append("hebrew");
lst.append("hijri");
lst.append("gregorian");
diff --git a/kdecore/kcalendarsystemfactory.h b/kdecore/kcalendarsystemfactory.h
index ea41e156e..ec68124d7 100644
--- a/kdecore/kcalendarsystemfactory.h
+++ b/kdecore/kcalendarsystemfactory.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMFACTORY_H
#define KCALENDARSYSTEMFACTORY_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
class KCalendarSystem;
@@ -49,15 +49,15 @@ public:
* 0 is specified.
* @return a KCalendarSystem object
*/
- static KCalendarSystem *create (const QString & calType = QString::fromLatin1("gregorian"),
+ static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"),
const KLocale * locale = 0);
/**
* Gets list of names of supported calendar systems
*
- * @return A QStringList object
+ * @return A TQStringList object
*/
- static QStringList calendarSystems();
+ static TQStringList calendarSystems();
private:
};
diff --git a/kdecore/kcalendarsystemgregorian.cpp b/kdecore/kcalendarsystemgregorian.cpp
index 9df2a70a1..26a366fd6 100644
--- a/kdecore/kcalendarsystemgregorian.cpp
+++ b/kdecore/kcalendarsystemgregorian.cpp
@@ -21,8 +21,8 @@
// Derived gregorian kde calendar class
// Just a schema.
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,12 +38,12 @@ KCalendarSystemGregorian::~KCalendarSystemGregorian()
{
}
-int KCalendarSystemGregorian::year(const QDate& date) const
+int KCalendarSystemGregorian::year(const TQDate& date) const
{
return date.year();
}
-int KCalendarSystemGregorian::monthsInYear( const QDate & date ) const
+int KCalendarSystemGregorian::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
@@ -52,7 +52,7 @@ int KCalendarSystemGregorian::monthsInYear( const QDate & date ) const
int KCalendarSystemGregorian::weeksInYear(int year) const
{
- QDate temp;
+ TQDate temp;
temp.setYMD(year, 12, 31);
// If the last day of the year is in the first week, we have to check the
@@ -63,24 +63,24 @@ int KCalendarSystemGregorian::weeksInYear(int year) const
return temp.weekNumber();
}
-int KCalendarSystemGregorian::weekNumber(const QDate& date,
+int KCalendarSystemGregorian::weekNumber(const TQDate& date,
int * yearNum) const
{
return date.weekNumber(yearNum);
}
-QString KCalendarSystemGregorian::monthName(const QDate& date,
+TQString KCalendarSystemGregorian::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
-QString KCalendarSystemGregorian::monthNamePossessive(const QDate& date, bool shortName) const
+TQString KCalendarSystemGregorian::monthNamePossessive(const TQDate& date, bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
-QString KCalendarSystemGregorian::monthName(int month, int year, bool shortName) const
+TQString KCalendarSystemGregorian::monthName(int month, int year, bool shortName) const
{
Q_UNUSED(year);
@@ -141,10 +141,10 @@ QString KCalendarSystemGregorian::monthName(int month, int year, bool shortName)
return locale()->translate("December");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
+TQString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
bool shortName) const
{
Q_UNUSED(year);
@@ -206,35 +206,35 @@ QString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
return locale()->translate("of December");
}
- return QString::null;
+ return TQString::null;
}
-bool KCalendarSystemGregorian::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemGregorian::setYMD(TQDate & date, int y, int m, int d) const
{
// We don't want Qt to add 1900 to them
if ( y >= 0 && y <= 99 )
return false;
- // QDate supports gregorian internally
+ // TQDate supports gregorian internally
return date.setYMD(y, m, d);
}
-QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const
+TQDate KCalendarSystemGregorian::addYears(const TQDate & date, int nyears) const
{
return date.addYears(nyears);
}
-QDate KCalendarSystemGregorian::addMonths(const QDate & date, int nmonths) const
+TQDate KCalendarSystemGregorian::addMonths(const TQDate & date, int nmonths) const
{
return date.addMonths(nmonths);
}
-QDate KCalendarSystemGregorian::addDays(const QDate & date, int ndays) const
+TQDate KCalendarSystemGregorian::addDays(const TQDate & date, int ndays) const
{
return date.addDays(ndays);
}
-QString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
+TQString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
{
// ### Should this really be different to each calendar system? Or are we
// only going to support weeks with 7 days?
@@ -242,48 +242,48 @@ QString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
return KCalendarSystem::weekDayName(col, shortName);
}
-QString KCalendarSystemGregorian::weekDayName(const QDate& date, bool shortName) const
+TQString KCalendarSystemGregorian::weekDayName(const TQDate& date, bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
-int KCalendarSystemGregorian::dayOfWeek(const QDate& date) const
+int KCalendarSystemGregorian::dayOfWeek(const TQDate& date) const
{
return date.dayOfWeek();
}
-int KCalendarSystemGregorian::dayOfYear(const QDate & date) const
+int KCalendarSystemGregorian::dayOfYear(const TQDate & date) const
{
return date.dayOfYear();
}
-int KCalendarSystemGregorian::daysInMonth(const QDate& date) const
+int KCalendarSystemGregorian::daysInMonth(const TQDate& date) const
{
return date.daysInMonth();
}
int KCalendarSystemGregorian::minValidYear() const
{
- return 1753; // QDate limit
+ return 1753; // TQDate limit
}
int KCalendarSystemGregorian::maxValidYear() const
{
- return 8000; // QDate limit
+ return 8000; // TQDate limit
}
-int KCalendarSystemGregorian::day(const QDate& date) const
+int KCalendarSystemGregorian::day(const TQDate& date) const
{
return date.day();
}
-int KCalendarSystemGregorian::month(const QDate& date) const
+int KCalendarSystemGregorian::month(const TQDate& date) const
{
return date.month();
}
-int KCalendarSystemGregorian::daysInYear(const QDate& date) const
+int KCalendarSystemGregorian::daysInYear(const TQDate& date) const
{
return date.daysInYear();
}
@@ -293,9 +293,9 @@ int KCalendarSystemGregorian::weekDayOfPray() const
return 7; // sunday
}
-QString KCalendarSystemGregorian::calendarName() const
+TQString KCalendarSystemGregorian::calendarName() const
{
- return QString::fromLatin1("gregorian");
+ return TQString::fromLatin1("gregorian");
}
bool KCalendarSystemGregorian::isLunar() const
@@ -313,7 +313,7 @@ bool KCalendarSystemGregorian::isSolar() const
return true;
}
-int KCalendarSystemGregorian::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemGregorian::yearStringToInteger(const TQString & sNum, int & iLength) const
{
int iYear;
iYear = KCalendarSystem::yearStringToInteger(sNum, iLength);
diff --git a/kdecore/kcalendarsystemgregorian.h b/kdecore/kcalendarsystemgregorian.h
index 7feaf2ebf..b116c40f4 100644
--- a/kdecore/kcalendarsystemgregorian.h
+++ b/kdecore/kcalendarsystemgregorian.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMGREGORIAN_H
#define KCALENDARSYSTEMGREGORIAN_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -47,39 +47,39 @@ public:
KCalendarSystemGregorian (const KLocale * locale = 0);
virtual ~KCalendarSystemGregorian ();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemhebrew.cpp b/kdecore/kcalendarsystemhebrew.cpp
index 694261eda..ec39fc9ca 100644
--- a/kdecore/kcalendarsystemhebrew.cpp
+++ b/kdecore/kcalendarsystemhebrew.cpp
@@ -27,7 +27,7 @@
#include "kcalendarsystemhebrew.h"
static int hebrewDaysElapsed(int y);
-static QString num2heb(int num, bool includeMillenium);
+static TQString num2heb(int num, bool includeMillenium);
class h_date
{
@@ -143,26 +143,26 @@ static class h_date * gregorianToHebrew(int y, int m, int d)
return(&h);
}
-static QString num2heb(int num, bool includeMillenium)
+static TQString num2heb(int num, bool includeMillenium)
{
- const QChar decade[] = {0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE,
+ const TQChar decade[] = {0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE,
0x05E0, 0x05E1, 0x05E2, 0x05E4, 0x05E6};
- QString result;
+ TQString result;
if (num < 1 || num > 9999)
- return QString::number(num);
+ return TQString::number(num);
if (num >= 1000) {
if (includeMillenium || num % 1000 == 0)
- result += QChar(0x05D0 - 1 + num / 1000);
+ result += TQChar(0x05D0 - 1 + num / 1000);
num %= 1000;
}
if (num >= 100) {
while (num >= 500) {
- result += QChar(0x05EA);
+ result += TQChar(0x05EA);
num -= 400;
}
- result += QChar(0x05E7 - 1 + num / 100);
+ result += TQChar(0x05E7 - 1 + num / 100);
num %= 100;
}
if (num >= 10) {
@@ -172,7 +172,7 @@ static QString num2heb(int num, bool includeMillenium)
num %= 10;
}
if (num > 0)
- result += QChar(0x05D0 - 1 + num);
+ result += TQChar(0x05D0 - 1 + num);
if (result.length() == 1)
result += "'";
@@ -223,7 +223,7 @@ static int hebrewDaysElapsed(int y)
*/
static int long_cheshvan(int year)
{
- QDate first, last;
+ TQDate first, last;
class h_date *gd;
gd = hebrewToGregorian(year, 1, 1);
@@ -241,7 +241,7 @@ static int long_cheshvan(int year)
*/
static int short_kislev(int year)
{
- QDate first, last;
+ TQDate first, last;
class h_date * gd;
gd = hebrewToGregorian(year, 1, 1);
@@ -270,7 +270,7 @@ KCalendarSystemHebrew::~KCalendarSystemHebrew()
}
// Ok
-static class h_date * toHebrew(const QDate & date)
+static class h_date * toHebrew(const TQDate & date)
{
class h_date *sd;
sd = gregorianToHebrew(date.year(), date.month(), date.day());
@@ -280,14 +280,14 @@ static class h_date * toHebrew(const QDate & date)
}
// Ok
-int KCalendarSystemHebrew::year(const QDate& date) const
+int KCalendarSystemHebrew::year(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
return sd->hd_year;
}
// Ok
-int KCalendarSystemHebrew::monthsInYear( const QDate & date ) const
+int KCalendarSystemHebrew::monthsInYear( const TQDate & date ) const
{
if ( is_leap_year( year(date) ) )
return 13;
@@ -298,8 +298,8 @@ int KCalendarSystemHebrew::monthsInYear( const QDate & date ) const
// Ok
int KCalendarSystemHebrew::weeksInYear(int year) const
{
- QDate temp;
- setYMD(temp, year, 1, 1); // don't pass an uninitialized QDate to
+ TQDate temp;
+ setYMD(temp, year, 1, 1); // don't pass an uninitialized TQDate to
// monthsInYear in the next call
setYMD(temp, year, monthsInYear(temp), hndays(monthsInYear(temp), year) );
@@ -313,9 +313,9 @@ int KCalendarSystemHebrew::weeksInYear(int year) const
return nWeekNumber;
}
-int KCalendarSystemHebrew::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemHebrew::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -362,31 +362,31 @@ int KCalendarSystemHebrew::weekNumber(const QDate& date, int * yearNum) const
}
// Ok
-QString KCalendarSystemHebrew::monthName(const QDate& date,
+TQString KCalendarSystemHebrew::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
// Ok
-QString KCalendarSystemHebrew::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemHebrew::monthNamePossessive(const TQDate& date,
bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
// ### Fixme
-QString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/) const
+TQString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/) const
{
if ( month < 1 )
- return QString::null;
+ return TQString::null;
if ( is_leap_year(year) )
{
if ( month > 13 )
- return QString::null;
+ return TQString::null;
}
else if ( month > 12 )
- return QString::null;
+ return TQString::null;
// We must map conversion algorithm month index to real index
if( month == 6 && is_leap_year(year) )
@@ -430,17 +430,17 @@ QString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/
break;
}
- return QString::null;
+ return TQString::null;
}
// ### Fixme
-QString KCalendarSystemHebrew::monthNamePossessive(int month, int year,
+TQString KCalendarSystemHebrew::monthNamePossessive(int month, int year,
bool shortName) const
{
return "of " + monthName(month, year, shortName);
}
-bool KCalendarSystemHebrew::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemHebrew::setYMD(TQDate & date, int y, int m, int d) const
{
if( y < minValidYear() || y > maxValidYear() )
return false;
@@ -454,20 +454,20 @@ bool KCalendarSystemHebrew::setYMD(QDate & date, int y, int m, int d) const
return date.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
}
-QString KCalendarSystemHebrew::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemHebrew::weekDayName(int day, bool shortName) const
{
return KCalendarSystem::weekDayName(day, shortName);
}
// Ok
-QString KCalendarSystemHebrew::weekDayName(const QDate& date,
+TQString KCalendarSystemHebrew::weekDayName(const TQDate& date,
bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
// Ok
-int KCalendarSystemHebrew::dayOfWeek(const QDate& date) const
+int KCalendarSystemHebrew::dayOfWeek(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
if ( sd->hd_dw == 0 )
@@ -477,15 +477,15 @@ int KCalendarSystemHebrew::dayOfWeek(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::dayOfYear(const QDate & date) const
+int KCalendarSystemHebrew::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
}
-int KCalendarSystemHebrew::daysInMonth(const QDate& date) const
+int KCalendarSystemHebrew::daysInMonth(const TQDate& date) const
{
return hndays(month(date), year(date));
}
@@ -514,7 +514,7 @@ int KCalendarSystemHebrew::hndays(int mon, int year) const
// Min valid year that may be converted to QDate
int KCalendarSystemHebrew::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -523,13 +523,13 @@ int KCalendarSystemHebrew::minValidYear() const
// Max valid year that may be converted to QDate
int KCalendarSystemHebrew::maxValidYear() const
{
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
return year(date);
}
// Ok
-int KCalendarSystemHebrew::day(const QDate& date) const
+int KCalendarSystemHebrew::day(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
@@ -537,7 +537,7 @@ int KCalendarSystemHebrew::day(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::month(const QDate& date) const
+int KCalendarSystemHebrew::month(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
@@ -556,9 +556,9 @@ int KCalendarSystemHebrew::month(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::daysInYear(const QDate & date) const
+int KCalendarSystemHebrew::daysInYear(const TQDate & date) const
{
- QDate first, last;
+ TQDate first, last;
setYMD(first, year(date), 1, 1); // 1 Tishrey
setYMD(last, year(date) + 1, 1, 1); // 1 Tishrey the year later
@@ -572,15 +572,15 @@ int KCalendarSystemHebrew::weekDayOfPray() const
}
// Ok
-QDate KCalendarSystemHebrew::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemHebrew::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
// Ok
-QDate KCalendarSystemHebrew::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemHebrew::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
while ( nmonths > 0 )
{
@@ -601,9 +601,9 @@ QDate KCalendarSystemHebrew::addMonths( const QDate & date, int nmonths ) const
}
// Ok
-QDate KCalendarSystemHebrew::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemHebrew::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
@@ -612,9 +612,9 @@ QDate KCalendarSystemHebrew::addYears( const QDate & date, int nyears ) const
}
// Ok
-QString KCalendarSystemHebrew::calendarName() const
+TQString KCalendarSystemHebrew::calendarName() const
{
- return QString::fromLatin1("hebrew");
+ return TQString::fromLatin1("hebrew");
}
// Ok
@@ -635,12 +635,12 @@ bool KCalendarSystemHebrew::isSolar() const
return false;
}
-QString KCalendarSystemHebrew::dayString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystemHebrew::dayString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == QString::fromLatin1("he"))
+ if (locale()->language() == TQString::fromLatin1("he"))
sResult = num2heb(day(pDate), false);
else
sResult = KCalendarSystem::dayString(pDate, bShort);
@@ -648,12 +648,12 @@ QString KCalendarSystemHebrew::dayString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystemHebrew::yearString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystemHebrew::yearString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == QString::fromLatin1("he"))
+ if (locale()->language() == TQString::fromLatin1("he"))
sResult = num2heb(year(pDate), !bShort);
else
sResult = KCalendarSystem::yearString(pDate, bShort);
@@ -661,9 +661,9 @@ QString KCalendarSystemHebrew::yearString(const QDate & pDate, bool bShort) cons
return sResult;
}
-static int heb2num(const QString& str, int & iLength) {
- QChar c;
- QString s = str;
+static int heb2num(const TQString& str, int & iLength) {
+ TQChar c;
+ TQString s = str;
int result = 0;
iLength = 0;
int decadeValues[14] = {10, 20, 20, 30, 40, 40, 50,
@@ -673,38 +673,38 @@ static int heb2num(const QString& str, int & iLength) {
for (pos = 0 ; pos < s.length() ; pos++)
{
c = s[pos];
- if (s.length() > pos && (s[pos + 1] == QChar('\'') ||
- s[pos + 1] == QChar('\"')))
+ if (s.length() > pos && (s[pos + 1] == TQChar('\'') ||
+ s[pos + 1] == TQChar('\"')))
{
iLength++;
s.remove(pos + 1, 1);
}
- if (c >= QChar(0x05D0) && c <= QChar(0x05D7))
+ if (c >= TQChar(0x05D0) && c <= TQChar(0x05D7))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D0) &&
- s[pos + 1] <= QChar(0x05EA))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
+ s[pos + 1] <= TQChar(0x05EA))
result += (c.unicode() - 0x05D0 + 1) * 1000;
else
result += c.unicode() - 0x05D0 + 1;
}
- else if (c == QChar(0x05D8))
+ else if (c == TQChar(0x05D8))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D0) &&
- s[pos + 1] <= QChar(0x05EA) && s[pos + 1] != QChar(0x05D5) &&
- s[pos + 1] != QChar(0x05D6))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
+ s[pos + 1] <= TQChar(0x05EA) && s[pos + 1] != TQChar(0x05D5) &&
+ s[pos + 1] != TQChar(0x05D6))
result += 9000;
else
result += 9;
}
- else if (c >= QChar(0x05D9) && c <= QChar(0x05E6))
+ else if (c >= TQChar(0x05D9) && c <= TQChar(0x05E6))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D9))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9))
return -1;
else
result += decadeValues[c.unicode() - 0x05D9];
}
- else if (c >= QChar(0x05E7) && c <= QChar(0x05EA))
+ else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA))
{
result += (c.unicode() - 0x05E7 + 1) * 100;
}
@@ -719,7 +719,7 @@ static int heb2num(const QString& str, int & iLength) {
return result;
}
-int KCalendarSystemHebrew::dayStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemHebrew::dayStringToInteger(const TQString & sNum, int & iLength) const
{
int iResult;
if (locale()->language() == "he")
@@ -730,7 +730,7 @@ int KCalendarSystemHebrew::dayStringToInteger(const QString & sNum, int & iLengt
return iResult;
}
-int KCalendarSystemHebrew::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemHebrew::yearStringToInteger(const TQString & sNum, int & iLength) const
{
int iResult;
if (locale()->language() == "he")
diff --git a/kdecore/kcalendarsystemhebrew.h b/kdecore/kcalendarsystemhebrew.h
index efa91698d..ec0d82ba2 100644
--- a/kdecore/kcalendarsystemhebrew.h
+++ b/kdecore/kcalendarsystemhebrew.h
@@ -23,8 +23,8 @@
#ifndef KCALENDARSYSTEMHEBREW_H
#define KCALENDARSYSTEMHEBREW_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -49,41 +49,41 @@ public:
KCalendarSystemHebrew(const KLocale * locale = 0);
virtual ~KCalendarSystemHebrew();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
- virtual QString dayString(const QDate & pDate, bool bShort) const;
- virtual QString yearString(const QDate & pDate, bool bShort) const;
- virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual TQString dayString(const TQDate & pDate, bool bShort) const;
+ virtual TQString yearString(const TQDate & pDate, bool bShort) const;
+ virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemhijri.cpp b/kdecore/kcalendarsystemhijri.cpp
index c594cf22b..8eb403685 100644
--- a/kdecore/kcalendarsystemhijri.cpp
+++ b/kdecore/kcalendarsystemhijri.cpp
@@ -20,8 +20,8 @@
// Derived hijri kde calendar class
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -162,7 +162,7 @@ public:
};
-static void gregorianToHijri(const QDate & date, int * pYear, int * pMonth,
+static void gregorianToHijri(const TQDate & date, int * pYear, int * pMonth,
int * pDay)
{
GregorianDate gregorian(date.month(),date.day(),date.year());
@@ -187,28 +187,28 @@ KCalendarSystemHijri::~KCalendarSystemHijri()
{
}
-int KCalendarSystemHijri::year(const QDate& date) const
+int KCalendarSystemHijri::year(const TQDate& date) const
{
int y;
gregorianToHijri(date, &y, 0, 0);
return y;
}
-int KCalendarSystemHijri::month(const QDate& date) const
+int KCalendarSystemHijri::month(const TQDate& date) const
{
int m;
gregorianToHijri(date, 0, &m, 0);
return m;
}
-int KCalendarSystemHijri::day(const QDate& date) const
+int KCalendarSystemHijri::day(const TQDate& date) const
{
int d;
gregorianToHijri(date, 0, 0, &d);
return d;
}
-int KCalendarSystemHijri::monthsInYear( const QDate & date ) const
+int KCalendarSystemHijri::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
@@ -217,7 +217,7 @@ int KCalendarSystemHijri::monthsInYear( const QDate & date ) const
int KCalendarSystemHijri::weeksInYear(int year) const
{
- QDate temp;
+ TQDate temp;
setYMD(temp, year, 12, lastDayOfIslamicMonth(12, year));
// If the last day of the year is in the first week, we have to check the
@@ -228,9 +228,9 @@ int KCalendarSystemHijri::weeksInYear(int year) const
return weekNumber(temp);
}
-int KCalendarSystemHijri::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemHijri::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -274,19 +274,19 @@ int KCalendarSystemHijri::weekNumber(const QDate& date, int * yearNum) const
return week;
}
-QString KCalendarSystemHijri::monthName(const QDate& date,
+TQString KCalendarSystemHijri::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
-QString KCalendarSystemHijri::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemHijri::monthNamePossessive(const TQDate& date,
bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
-QString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
+TQString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
const {
Q_UNUSED(year);
@@ -348,10 +348,10 @@ QString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
return locale()->translate("Thu al-Hijjah");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemHijri::monthNamePossessive(int month, int year,
+TQString KCalendarSystemHijri::monthNamePossessive(int month, int year,
bool shortName) const
{
Q_UNUSED(year);
@@ -413,10 +413,10 @@ QString KCalendarSystemHijri::monthNamePossessive(int month, int year,
return locale()->translate("of Thu al-Hijjah");
}
- return QString::null;
+ return TQString::null;
}
-bool KCalendarSystemHijri::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemHijri::setYMD(TQDate & date, int y, int m, int d) const
{
// range checks
if ( y < minValidYear() || y > maxValidYear() )
@@ -436,7 +436,7 @@ bool KCalendarSystemHijri::setYMD(QDate & date, int y, int m, int d) const
gregorian.getDay());
}
-QString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
{
if ( shortName )
switch (day)
@@ -475,23 +475,23 @@ QString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
return locale()->translate("Yaum al-Ahad");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemHijri::weekDayName(const QDate& date,
+TQString KCalendarSystemHijri::weekDayName(const TQDate& date,
bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
-int KCalendarSystemHijri::dayOfWeek(const QDate& date) const
+int KCalendarSystemHijri::dayOfWeek(const TQDate& date) const
{
return date.dayOfWeek(); // same as gregorian
}
-int KCalendarSystemHijri::dayOfYear(const QDate & date) const
+int KCalendarSystemHijri::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
@@ -499,7 +499,7 @@ int KCalendarSystemHijri::dayOfYear(const QDate & date) const
return 100;
}
-int KCalendarSystemHijri::daysInMonth(const QDate& date) const
+int KCalendarSystemHijri::daysInMonth(const TQDate& date) const
{
int y, m;
gregorianToHijri(date, &y, &m, 0);
@@ -510,7 +510,7 @@ int KCalendarSystemHijri::daysInMonth(const QDate& date) const
// Min valid year that may be converted to QDate
int KCalendarSystemHijri::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -518,14 +518,14 @@ int KCalendarSystemHijri::minValidYear() const
// Max valid year that may be converted to QDate
int KCalendarSystemHijri::maxValidYear() const
{
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
return year(date);
}
-int KCalendarSystemHijri::daysInYear(const QDate & date) const
+int KCalendarSystemHijri::daysInYear(const TQDate & date) const
{
- QDate first, last;
+ TQDate first, last;
setYMD(first, year(date), 1, 1);
setYMD(last, year(date) + 1, 1, 1);
@@ -537,14 +537,14 @@ int KCalendarSystemHijri::weekDayOfPray() const
return 5; // friday
}
-QDate KCalendarSystemHijri::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemHijri::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
-QDate KCalendarSystemHijri::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemHijri::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
int m = month(date);
int y = year(date);
@@ -565,9 +565,9 @@ QDate KCalendarSystemHijri::addMonths( const QDate & date, int nmonths ) const
return result;
}
-QDate KCalendarSystemHijri::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemHijri::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
@@ -575,9 +575,9 @@ QDate KCalendarSystemHijri::addYears( const QDate & date, int nyears ) const
return result;
}
-QString KCalendarSystemHijri::calendarName() const
+TQString KCalendarSystemHijri::calendarName() const
{
- return QString::fromLatin1("hijri");
+ return TQString::fromLatin1("hijri");
}
bool KCalendarSystemHijri::isLunar() const
diff --git a/kdecore/kcalendarsystemhijri.h b/kdecore/kcalendarsystemhijri.h
index d03efe528..214b7a50a 100644
--- a/kdecore/kcalendarsystemhijri.h
+++ b/kdecore/kcalendarsystemhijri.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMHIJRI_H
#define KCALENDARSYSTEMHIJRI_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -47,36 +47,36 @@ public:
KCalendarSystemHijri(const KLocale * locale = 0);
virtual ~KCalendarSystemHijri();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemjalali.cpp b/kdecore/kcalendarsystemjalali.cpp
index df8b5d0fa..8915c585a 100644
--- a/kdecore/kcalendarsystemjalali.cpp
+++ b/kdecore/kcalendarsystemjalali.cpp
@@ -21,9 +21,9 @@
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <math.h>
#include <kglobal.h>
@@ -165,11 +165,11 @@ return (&sd);
static SDATE *gregorianToJalali(int y,int m, int d)
{
static SDATE sd;
- long jdn = civil_jdn(y,m,d);//QDate::gregorianToJulian(y, m, d);
+ long jdn = civil_jdn(y,m,d);//TQDate::gregorianToJulian(y, m, d);
sd = jdn_jalali(jdn);
return(&sd);
}
-static void gregorianToJalali(const QDate & date, int * pYear, int * pMonth,
+static void gregorianToJalali(const TQDate & date, int * pYear, int * pMonth,
int * pDay)
{
SDATE *sd;
@@ -209,7 +209,7 @@ KCalendarSystemJalali::~KCalendarSystemJalali()
{
}
-int KCalendarSystemJalali::year(const QDate& date) const
+int KCalendarSystemJalali::year(const TQDate& date) const
{
kdDebug(5400) << "Jalali year..." << endl;
@@ -218,7 +218,7 @@ int y;
return y;
}
-int KCalendarSystemJalali::month (const QDate& date) const
+int KCalendarSystemJalali::month (const TQDate& date) const
{
kdDebug(5400) << "Jalali month..." << endl;
@@ -227,7 +227,7 @@ int m;
return m;
}
-int KCalendarSystemJalali::day(const QDate& date) const
+int KCalendarSystemJalali::day(const TQDate& date) const
{
kdDebug(5400) << "Jalali day..." << endl;
@@ -236,7 +236,7 @@ int d;
return d;
}
-int KCalendarSystemJalali::dayOfWeek(const QDate& date) const
+int KCalendarSystemJalali::dayOfWeek(const TQDate& date) const
{
//same same I think?!
return date.dayOfWeek();
@@ -244,16 +244,16 @@ int KCalendarSystemJalali::dayOfWeek(const QDate& date) const
}
//NOT TESTED YET
-int KCalendarSystemJalali::dayOfYear(const QDate & date) const
+int KCalendarSystemJalali::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
}
//MAY BE BUGGY
-bool KCalendarSystemJalali::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemJalali::setYMD(TQDate & date, int y, int m, int d) const
{
// range checks
if ( y < minValidYear() || y > maxValidYear() )
@@ -270,18 +270,18 @@ bool KCalendarSystemJalali::setYMD(QDate & date, int y, int m, int d) const
return date.setYMD(gd->year, gd->mon, gd->day);
}
-QDate KCalendarSystemJalali::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemJalali::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
return result;
}
-QDate KCalendarSystemJalali::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemJalali::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
int m = month(date);
int y = year(date);
@@ -302,19 +302,19 @@ QDate KCalendarSystemJalali::addMonths( const QDate & date, int nmonths ) const
return result;
}
-QDate KCalendarSystemJalali::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemJalali::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
-int KCalendarSystemJalali::monthsInYear( const QDate & date ) const
+int KCalendarSystemJalali::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
return 12;
}
-int KCalendarSystemJalali::daysInYear(const QDate & date) const
+int KCalendarSystemJalali::daysInYear(const TQDate & date) const
{
Q_UNUSED(date);
int result;
@@ -326,7 +326,7 @@ int result;
return result;
}
-int KCalendarSystemJalali::daysInMonth(const QDate & date) const
+int KCalendarSystemJalali::daysInMonth(const TQDate & date) const
{
SDATE *sd = gregorianToJalali(date.year(),date.month(),date.day());
return hndays(sd->mon,sd->year);
@@ -340,9 +340,9 @@ int KCalendarSystemJalali::weeksInYear(int year) const
return 52;
}
-int KCalendarSystemJalali::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemJalali::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -380,7 +380,7 @@ int KCalendarSystemJalali::weekNumber(const QDate& date, int * yearNum) const
return week;
}
-QString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
+TQString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
const
{
Q_UNUSED(year);
@@ -442,10 +442,10 @@ QString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
return locale()->translate("Esfand");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemJalali::monthName(const QDate& date, bool shortName)
+TQString KCalendarSystemJalali::monthName(const TQDate& date, bool shortName)
const
{
int mon;
@@ -454,20 +454,20 @@ QString KCalendarSystemJalali::monthName(const QDate& date, bool shortName)
return (monthName(mon, 0, shortName));
}
-QString KCalendarSystemJalali::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemJalali::monthNamePossessive(const TQDate& date,
bool shortName ) const
{
return monthName(date,shortName);
}
-QString KCalendarSystemJalali::monthNamePossessive(int month, int year,
+TQString KCalendarSystemJalali::monthNamePossessive(int month, int year,
bool shortName ) const
{
return monthName(month,year,shortName);
}
-QString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
{
if ( shortName )
switch (day)
@@ -506,10 +506,10 @@ QString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
return locale()->translate("Yek-shanbe");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemJalali::weekDayName(const QDate &date,bool shortName)
+TQString KCalendarSystemJalali::weekDayName(const TQDate &date,bool shortName)
const
{
return weekDayName(dayOfWeek(date), shortName);
@@ -518,7 +518,7 @@ QString KCalendarSystemJalali::weekDayName(const QDate &date,bool shortName)
// Min valid year that may be converted to QDate
int KCalendarSystemJalali::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -527,7 +527,7 @@ int KCalendarSystemJalali::minValidYear() const
int KCalendarSystemJalali::maxValidYear() const
{
/*
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
SDATE *sd = toJalali(date);
@@ -539,9 +539,9 @@ int KCalendarSystemJalali::weekDayOfPray() const
{
return 5; // friday
}
-QString KCalendarSystemJalali::calendarName() const
+TQString KCalendarSystemJalali::calendarName() const
{
- return QString::fromLatin1("jalali");
+ return TQString::fromLatin1("jalali");
}
bool KCalendarSystemJalali::isLunar() const
diff --git a/kdecore/kcalendarsystemjalali.h b/kdecore/kcalendarsystemjalali.h
index ae24c1446..e7ec99fe3 100644
--- a/kdecore/kcalendarsystemjalali.h
+++ b/kdecore/kcalendarsystemjalali.h
@@ -24,8 +24,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -42,37 +42,37 @@ public:
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthName(int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthName(int month, int year, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcatalogue.cpp b/kdecore/kcatalogue.cpp
index d5e566db2..8bc81125e 100644
--- a/kdecore/kcatalogue.cpp
+++ b/kdecore/kcatalogue.cpp
@@ -19,7 +19,7 @@
#include <config.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -45,14 +45,14 @@ struct kde_loaded_l10nfile
class KCataloguePrivate
{
public:
- QString name;
- QString language;
+ TQString name;
+ TQString language;
int pluralType;
kde_loaded_l10nfile domain;
};
-KCatalogue::KCatalogue(const QString & name, const QString & language )
+KCatalogue::KCatalogue(const TQString & name, const TQString & language )
: d( new KCataloguePrivate )
{
d->name = name;
@@ -62,7 +62,7 @@ KCatalogue::KCatalogue(const QString & name, const QString & language )
// has to be set after we have the first catalog objects.
d->pluralType = -1;
- QString path = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( d->language )
.arg( d->name );
@@ -93,12 +93,12 @@ KCatalogue::~KCatalogue()
delete d;
}
-QString KCatalogue::name() const
+TQString KCatalogue::name() const
{
return d->name;
}
-QString KCatalogue::language() const
+TQString KCatalogue::language() const
{
return d->language;
}
@@ -114,14 +114,14 @@ int KCatalogue::pluralType() const
}
-void KCatalogue::setFileName( const QString & fileName )
+void KCatalogue::setFileName( const TQString & fileName )
{
// nothing to do if the file name is already the same
if ( this->fileName() == fileName ) return;
doUnload();
- QCString newFileName = QFile::encodeName( fileName );
+ TQCString newFileName = TQFile::encodeName( fileName );
if ( !fileName.isEmpty() )
{
@@ -132,9 +132,9 @@ void KCatalogue::setFileName( const QString & fileName )
}
}
-QString KCatalogue::fileName() const
+TQString KCatalogue::fileName() const
{
- return QFile::decodeName( d->domain.filename );
+ return TQFile::decodeName( d->domain.filename );
}
const char * KCatalogue::translate(const char * msgid) const
diff --git a/kdecore/kcatalogue.h b/kdecore/kcatalogue.h
index 38c067711..0658b9000 100644
--- a/kdecore/kcatalogue.h
+++ b/kdecore/kcatalogue.h
@@ -20,7 +20,7 @@
#ifndef KCATALOGUE_H
#define KCATALOGUE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
struct kde_loaded_l10nfile;
@@ -43,7 +43,7 @@ public:
* @param name The name of the catalog
* @param language The language of this catalog
*/
- explicit KCatalogue(const QString & name = QString::null, const QString & language = QString::null);
+ explicit KCatalogue(const TQString & name = TQString::null, const TQString & language = TQString::null);
/**
* Copy constructor.
@@ -65,14 +65,14 @@ public:
*
* @return The name of the catalog
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the language of the catalog.
*
* @return The language of the catalog
*/
- QString language() const;
+ TQString language() const;
/**
* Returns the plural type for the catalog. This type is based on the language of the catalog
@@ -109,13 +109,13 @@ private:
* @param fileName The new file name
*/
- void setFileName( const QString & fileName );
+ void setFileName( const TQString & fileName );
/**
* @internal Retrieves the current file name.
*
* @return The current file name, if any.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* @internal Unloads the current file.
diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp
index 1ac3fa94d..f4ae826f5 100644
--- a/kdecore/kcharsets.cpp
+++ b/kdecore/kcharsets.cpp
@@ -26,16 +26,16 @@
#include <klocale.h>
#include <kconfig.h>
-#include <qfontinfo.h>
-#include <qstrlist.h>
-#include <qfontdatabase.h>
+#include <tqfontinfo.h>
+#include <tqstrlist.h>
+#include <tqfontdatabase.h>
#include <kdebug.h>
-#include <qtextcodec.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <assert.h>
@@ -350,8 +350,8 @@ public:
{
delete db;
}
- QFontDatabase *db;
- QAsciiDict<QTextCodec> codecForNameDict;
+ TQFontDatabase *db;
+ TQAsciiDict<TQTextCodec> codecForNameDict;
KCharsets* kc;
};
@@ -367,9 +367,9 @@ KCharsets::~KCharsets()
delete d;
}
-QChar KCharsets::fromEntity(const QString &str)
+TQChar KCharsets::fromEntity(const TQString &str)
{
- QChar res = QChar::null;
+ TQChar res = TQChar::null;
int pos = 0;
if(str[pos] == '&') pos++;
@@ -381,11 +381,11 @@ QChar KCharsets::fromEntity(const QString &str)
if (str[pos] == 'x' || str[pos] == 'X') {
pos++;
// '&#x0000', hexadeciaml character reference
- QString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 16);
} else {
// '&#0000', decimal character reference
- QString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 10);
}
return res;
@@ -396,46 +396,46 @@ QChar KCharsets::fromEntity(const QString &str)
if(!e)
{
//kdDebug( 0 ) << "unknown entity " << str <<", len = " << str.length() << endl;
- return QChar::null;
+ return TQChar::null;
}
//kdDebug() << "got entity " << str << " = " << e->code << endl;
- return QChar(e->code);
+ return TQChar(e->code);
}
-QChar KCharsets::fromEntity(const QString &str, int &len)
+TQChar KCharsets::fromEntity(const TQString &str, int &len)
{
// entities are never longer than 8 chars... we start from
// that length and work backwards...
len = 8;
while(len > 0)
{
- QString tmp = str.left(len);
- QChar res = fromEntity(tmp);
- if( res != QChar::null ) return res;
+ TQString tmp = str.left(len);
+ TQChar res = fromEntity(tmp);
+ if( res != TQChar::null ) return res;
len--;
}
- return QChar::null;
+ return TQChar::null;
}
-QString KCharsets::toEntity(const QChar &ch)
+TQString KCharsets::toEntity(const TQChar &ch)
{
- QString ent;
+ TQString ent;
ent.sprintf("&#0x%x;", ch.unicode());
return ent;
}
-QString KCharsets::resolveEntities( const QString &input )
+TQString KCharsets::resolveEntities( const TQString &input )
{
- QString text = input;
- const QChar *p = text.unicode();
- const QChar *end = p + text.length();
- const QChar *ampersand = 0;
+ TQString text = input;
+ const TQChar *p = text.unicode();
+ const TQChar *end = p + text.length();
+ const TQChar *ampersand = 0;
bool scanForSemicolon = false;
for ( ; p < end; ++p ) {
- const QChar ch = *p;
+ const TQChar ch = *p;
if ( ch == '&' ) {
ampersand = p;
@@ -450,13 +450,13 @@ QString KCharsets::resolveEntities( const QString &input )
scanForSemicolon = false;
- const QChar *entityBegin = ampersand + 1;
+ const TQChar *entityBegin = ampersand + 1;
const uint entityLength = p - entityBegin;
if ( entityLength == 0 )
continue;
- const QChar entityValue = KCharsets::fromEntity( QConstString( entityBegin, entityLength ).string() );
+ const TQChar entityValue = KCharsets::fromEntity( TQConstString( entityBegin, entityLength ).string() );
if ( entityValue.isNull() )
continue;
@@ -472,31 +472,31 @@ QString KCharsets::resolveEntities( const QString &input )
return text;
}
-QStringList KCharsets::availableEncodingNames()
+TQStringList KCharsets::availableEncodingNames()
{
- QStringList available;
+ TQStringList available;
for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) {
//kdDebug(0) << *charsets << " available" << endl;
- available.append( QString::fromLatin1( *pos ));
+ available.append( TQString::fromLatin1( *pos ));
}
return available;
}
-QString KCharsets::languageForEncoding( const QString &encoding )
+TQString KCharsets::languageForEncoding( const TQString &encoding )
{
int lang = kcharsets_array_search< LanguageForEncoding, int >
( language_for_encoding, encoding.latin1());
return i18n( language_names[lang] );
}
-QString KCharsets::encodingForName( const QString &descriptiveName )
+TQString KCharsets::encodingForName( const TQString &descriptiveName )
{
const int left = descriptiveName.findRev( '(' );
if (left<0) // No parenthesis, so assume it is a normal encoding name
return descriptiveName.stripWhiteSpace();
- QString name(descriptiveName.mid(left+1));
+ TQString name(descriptiveName.mid(left+1));
const int right = name.findRev( ')' );
@@ -506,30 +506,30 @@ QString KCharsets::encodingForName( const QString &descriptiveName )
return name.left(right).stripWhiteSpace();
}
-QStringList KCharsets::descriptiveEncodingNames()
+TQStringList KCharsets::descriptiveEncodingNames()
{
// As we are sorting, we can directly read the array language_for_encoding
- QStringList encodings;
+ TQStringList encodings;
for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) {
- const QString name = QString::fromLatin1( pos->index );
- const QString description = i18n( language_names[ pos->data ] );
+ const TQString name = TQString::fromLatin1( pos->index );
+ const TQString description = i18n( language_names[ pos->data ] );
encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) );
}
encodings.sort();
return encodings;
}
-QTextCodec *KCharsets::codecForName(const QString &n) const
+TQTextCodec *KCharsets::codecForName(const TQString &n) const
{
bool b;
return codecForName( n, b );
}
-QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
+TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
{
ok = true;
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
// dict lookup is case insensitive anyway
if((codec = d->codecForNameDict[n.isEmpty() ? "->locale<-" : n.latin1()]))
return codec; // cache hit, return
@@ -540,17 +540,17 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
return codec;
}
- QCString name = n.lower().latin1();
- QCString key = name;
+ TQCString name = n.lower().latin1();
+ TQCString key = name;
if (name.right(8) == "_charset")
name.truncate(name.length()-8);
if (name.isEmpty()) {
ok = false;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
- codec = QTextCodec::codecForName(name);
+ codec = TQTextCodec::codecForName(name);
if(codec) {
d->codecForNameDict.replace(key, codec);
@@ -558,11 +558,11 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
}
// these codecs are built into Qt, but the name given for the codec is different,
- // so QTextCodec did not recognize it.
- QCString cname = kcharsets_array_search< Builtin, const char* >( builtin, name.data());
+ // so TQTextCodec did not recognize it.
+ TQCString cname = kcharsets_array_search< Builtin, const char* >( builtin, name.data());
if(!cname.isEmpty())
- codec = QTextCodec::codecForName(cname);
+ codec = TQTextCodec::codecForName(cname);
if(codec)
{
@@ -570,10 +570,10 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
return codec;
}
- QString dir;
+ TQString dir;
{
KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" );
- dir = KGlobal::config()->readPathEntry("i18ndir", QString::fromLatin1("/usr/share/i18n/charmaps"));
+ dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps"));
}
// these are codecs not included in Qt. They can be build up if the corresponding charmap
@@ -584,12 +584,12 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
cname = name;
cname = cname.upper();
- const QString basicName = QString::fromLatin1(cname);
+ const TQString basicName = TQString::fromLatin1(cname);
kdDebug() << k_funcinfo << endl << " Trying to find " << cname << " in " << dir << endl;
- QString charMapFileName;
+ TQString charMapFileName;
bool gzipped = false;
- QDir qdir(dir);
+ TQDir qdir(dir);
if (!qdir.exists()) {
// The directory for the charmaps does not even exist... (That is common!)
}
@@ -604,9 +604,9 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
// Check if we are asking a code page
// If yes, then check "CP99999" and "IBM99999"
// First we need to find the number of the codepage
- QRegExp regexp("^(X-)?(CP|IBM)(-| )?(0-9)+");
+ TQRegExp regexp("^(X-)?(CP|IBM)(-| )?(0-9)+");
if ( regexp.search(basicName) != -1) {
- const QString num = regexp.cap(4);
+ const TQString num = regexp.cap(4);
if (num.isEmpty()) {
// No number, not a code page (or something went wrong)
}
@@ -631,14 +631,14 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
KQIODeviceGZip gzip(dir + "/" + charMapFileName);
if (gzip.open(IO_ReadOnly)) {
kdDebug() << "Loading gzipped charset..." << endl;
- codec = QTextCodec::loadCharmap(&gzip);
+ codec = TQTextCodec::loadCharmap(&gzip);
gzip.close();
}
else
kdWarning() << "Could not open gzipped charset!" << endl;
}
else if (!charMapFileName.isEmpty()) {
- codec = QTextCodec::loadCharmapFile(dir + "/" + charMapFileName);
+ codec = TQTextCodec::loadCharmapFile(dir + "/" + charMapFileName);
}
if(codec) {
@@ -651,7 +651,7 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
cname = kcharsets_array_search< ConversionHints, const char* >( conversion_hints, (const char*)name.data() );
if(!cname.isEmpty())
- codec = QTextCodec::codecForName(cname);
+ codec = TQTextCodec::codecForName(cname);
if(codec) {
d->codecForNameDict.replace(key, codec);
@@ -660,5 +660,5 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
// could not assign a codec, let's return Latin1
ok = false;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
diff --git a/kdecore/kcharsets.h b/kdecore/kcharsets.h
index fe9bb3140..7a92c1303 100644
--- a/kdecore/kcharsets.h
+++ b/kdecore/kcharsets.h
@@ -19,10 +19,10 @@
#ifndef KCHARSETS_H
#define KCHARSETS_H
-#include <qstring.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KGlobal;
@@ -60,45 +60,45 @@ public:
/**
* Provided for compatibility.
* @param name the name of the codec
- * @return the QTextCodec. If the desired codec could not be found,
+ * @return the TQTextCodec. If the desired codec could not be found,
* it returns a default (Latin-1) codec
*/
- QTextCodec *codecForName(const QString &name) const;
+ TQTextCodec *codecForName(const TQString &name) const;
/**
- * Tries to find a QTextCodec to convert the given encoding from and to
+ * Tries to find a TQTextCodec to convert the given encoding from and to
* Unicode. If no codec could be found the latin1 codec will be returned an
* @p ok will be set to false.
- * @return the QTextCodec. If the desired codec could not be found,
+ * @return the TQTextCodec. If the desired codec could not be found,
* it returns a default (Latin-1) codec
*/
- QTextCodec *codecForName(const QString &n, bool &ok) const;
+ TQTextCodec *codecForName(const TQString &n, bool &ok) const;
/**
* Converts an entity to a character. The string must contain only the
* entity without the trailing ';'.
* @param str the entity
- * @return QChar::null if the entity could not be decoded.
+ * @return TQChar::null if the entity could not be decoded.
*/
- static QChar fromEntity(const QString &str);
+ static TQChar fromEntity(const TQString &str);
/**
* Overloaded member function. Tries to find an entity in the
- * QString str.
+ * TQString str.
* @param str the string containing entified
* @param len is a return value, that gives the length of the decoded
* entity.
- * @return a decoded entity if one could be found, QChar::null
+ * @return a decoded entity if one could be found, TQChar::null
* otherwise
*/
- static QChar fromEntity(const QString &str, int &len);
+ static TQChar fromEntity(const TQString &str, int &len);
/**
- * Converts a QChar to an entity. The returned string does already
+ * Converts a TQChar to an entity. The returned string does already
* contain the leading '&' and the trailing ';'.
* @param ch the char to convert
* @return the entity
*/
- static QString toEntity(const QChar &ch);
+ static TQString toEntity(const TQChar &ch);
/**
* Scans the given string for entities (like &amp;amp;) and resolves them
@@ -107,33 +107,33 @@ public:
* @return the clean string
* @since 3.1
*/
- static QString resolveEntities( const QString &text );
+ static TQString resolveEntities( const TQString &text );
/**
* Lists all available encodings as names.
* @return the list of all encodings
*/
- QStringList availableEncodingNames();
+ TQStringList availableEncodingNames();
/**
* Lists the available encoding names together with a more descriptive language.
* @return the list of descriptive encoding names
*/
- QStringList descriptiveEncodingNames();
+ TQStringList descriptiveEncodingNames();
/**
* Returns the language the encoding is used for.
* @param encoding the encoding for the language
* @return the language of the encoding
*/
- QString languageForEncoding( const QString &encoding );
+ TQString languageForEncoding( const TQString &encoding );
/**
* Returns the encoding for a string obtained with descriptiveEncodingNames().
* @param descriptiveName the descriptive name for the encoding
* @return the name of the encoding
*/
- QString encodingForName( const QString &descriptiveName );
+ TQString encodingForName( const TQString &descriptiveName );
private:
KCharsetsPrivate *d;
diff --git a/kdecore/kcheckaccelerators.cpp b/kdecore/kcheckaccelerators.cpp
index 98d8f2440..7b1d3621b 100644
--- a/kdecore/kcheckaccelerators.cpp
+++ b/kdecore/kcheckaccelerators.cpp
@@ -21,23 +21,23 @@
// $Id$
#define INCLUDE_MENUITEM_DEF
-#include <qmenudata.h>
+#include <tqmenudata.h>
#include "config.h"
#include "kcheckaccelerators.h"
#include "kaccelmanager.h"
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qobjectlist.h>
-#include <qmenubar.h>
-#include <qtabbar.h>
-#include <qpushbutton.h>
-#include <qmetaobject.h>
-#include <qcheckbox.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqobjectlist.h>
+#include <tqmenubar.h>
+#include <tqtabbar.h>
+#include <tqpushbutton.h>
+#include <tqmetaobject.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -76,12 +76,12 @@
accelerators.
*/
-KCheckAccelerators::KCheckAccelerators( QObject* parent )
- : QObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0)
+KCheckAccelerators::KCheckAccelerators( TQObject* parent )
+ : TQObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0)
{
parent->installEventFilter( this );
KConfigGroupSaver saver( KGlobal::config(), "Development" );
- QString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
+ TQString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
if( !sKey.isEmpty() ) {
KShortcut cuts( sKey );
if( cuts.count() > 0 )
@@ -89,36 +89,36 @@ KCheckAccelerators::KCheckAccelerators( QObject* parent )
}
alwaysShow = KGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false );
autoCheck = KGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true );
- connect( &autoCheckTimer, SIGNAL( timeout()), SLOT( autoCheckSlot()));
+ connect( &autoCheckTimer, TQT_SIGNAL( timeout()), TQT_SLOT( autoCheckSlot()));
}
-bool KCheckAccelerators::eventFilter( QObject * , QEvent * e)
+bool KCheckAccelerators::eventFilter( TQObject * , TQEvent * e)
{
if ( block )
return false;
switch ( e->type() ) { // just simplify debuggin
- case QEvent::Accel:
- if ( key && (static_cast<QKeyEvent *>(e)->key() == key) ) {
+ case TQEvent::Accel:
+ if ( key && (static_cast<TQKeyEvent *>(e)->key() == key) ) {
block = true;
checkAccelerators( false );
block = false;
- static_cast<QKeyEvent *>(e)->accept();
+ static_cast<TQKeyEvent *>(e)->accept();
return true;
}
break;
- case QEvent::ChildInserted:
- case QEvent::ChildRemoved:
- case QEvent::Resize:
- case QEvent::LayoutHint:
- case QEvent::WindowActivate:
- case QEvent::WindowDeactivate:
+ case TQEvent::ChildInserted:
+ case TQEvent::ChildRemoved:
+ case TQEvent::Resize:
+ case TQEvent::LayoutHint:
+ case TQEvent::WindowActivate:
+ case TQEvent::WindowDeactivate:
if( autoCheck )
autoCheckTimer.start( 20, true ); // 20 ms
break;
- case QEvent::Timer:
- case QEvent::MouseMove:
- case QEvent::Paint:
+ case TQEvent::Timer:
+ case TQEvent::MouseMove:
+ case TQEvent::Paint:
return false;
default:
// kdDebug(125) << "KCheckAccelerators::eventFilter " << e->type() << " " << autoCheck << endl;
@@ -139,25 +139,25 @@ void KCheckAccelerators::autoCheckSlot()
block = false;
}
-void KCheckAccelerators::createDialog(QWidget *actWin, bool automatic)
+void KCheckAccelerators::createDialog(TQWidget *actWin, bool automatic)
{
if ( drklash )
return;
- drklash = new QDialog( actWin, "kapp_accel_check_dlg", false, Qt::WDestructiveClose);
+ drklash = new TQDialog( actWin, "kapp_accel_check_dlg", false, Qt::WDestructiveClose);
drklash->setCaption( i18n( "Dr. Klash' Accelerator Diagnosis" ));
drklash->resize( 500, 460 );
- QVBoxLayout* layout = new QVBoxLayout( drklash, 11, 6 );
+ TQVBoxLayout* layout = new TQVBoxLayout( drklash, 11, 6 );
layout->setAutoAdd( true );
- drklash_view = new QTextView( drklash );
- QCheckBox* disableAutoCheck = NULL;
+ drklash_view = new TQTextView( drklash );
+ TQCheckBox* disableAutoCheck = NULL;
if( automatic ) {
- disableAutoCheck = new QCheckBox( i18n( "&Disable automatic checking" ), drklash );
- connect(disableAutoCheck, SIGNAL(toggled(bool)), SLOT(slotDisableCheck(bool)));
+ disableAutoCheck = new TQCheckBox( i18n( "&Disable automatic checking" ), drklash );
+ connect(disableAutoCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDisableCheck(bool)));
}
- QPushButton* btnClose = new QPushButton( i18n( "&Close" ), drklash );
+ TQPushButton* btnClose = new TQPushButton( i18n( "&Close" ), drklash );
btnClose->setDefault( true );
- connect( btnClose, SIGNAL( clicked() ), drklash, SLOT( close() ) );
+ connect( btnClose, TQT_SIGNAL( clicked() ), drklash, TQT_SLOT( close() ) );
if (disableAutoCheck)
disableAutoCheck->setFocus();
else
@@ -173,12 +173,12 @@ void KCheckAccelerators::slotDisableCheck(bool on)
void KCheckAccelerators::checkAccelerators( bool automatic )
{
- QWidget* actWin = qApp->activeWindow();
+ TQWidget* actWin = qApp->activeWindow();
if ( !actWin )
return;
KAcceleratorManager::manage(actWin);
- QString a, c, r;
+ TQString a, c, r;
KAcceleratorManager::last_manage(a, c, r);
if (automatic) // for now we only show dialogs on F12 checks
@@ -187,7 +187,7 @@ void KCheckAccelerators::checkAccelerators( bool automatic )
if (c.isEmpty() && r.isEmpty() && (automatic || a.isEmpty()))
return;
- QString s;
+ TQString s;
if ( ! c.isEmpty() ) {
s += i18n("<h2>Accelerators changed</h2>");
diff --git a/kdecore/kcheckaccelerators.h b/kdecore/kcheckaccelerators.h
index a01d76051..85a6f03f5 100644
--- a/kdecore/kcheckaccelerators.h
+++ b/kdecore/kcheckaccelerators.h
@@ -21,12 +21,12 @@
#ifndef KCHECKACCELERATORS_H_
#define KCHECKACCELERATORS_H_
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qkeysequence.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqkeysequence.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
class QMenuData;
class QTextView;
@@ -71,11 +71,11 @@ public:
* Creates a KCheckAccelerators instance for the given object.
* @param parent the parent to check
*/
- KCheckAccelerators( QObject* parent );
+ KCheckAccelerators( TQObject* parent );
/**
* Re-implemented to filter the parent's events.
*/
- bool eventFilter( QObject * , QEvent * e);
+ bool eventFilter( TQObject * , TQEvent * e);
private:
void checkAccelerators( bool automatic );
@@ -83,10 +83,10 @@ private:
bool alwaysShow;
bool autoCheck;
bool block;
- QTimer autoCheckTimer;
- void createDialog(QWidget *parent, bool automatic);
- QGuardedPtr<QDialog> drklash;
- QTextView *drklash_view;
+ TQTimer autoCheckTimer;
+ void createDialog(TQWidget *parent, bool automatic);
+ TQGuardedPtr<TQDialog> drklash;
+ TQTextView *drklash_view;
private slots:
void autoCheckSlot();
diff --git a/kdecore/kckey.cpp b/kdecore/kckey.cpp
index 2a06a2c9c..0feea1d49 100644
--- a/kdecore/kckey.cpp
+++ b/kdecore/kckey.cpp
@@ -1,7 +1,7 @@
// This file has been automatically generated by "generate_keys.sh"
// Distributed under the GNU Library General Public License
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "kckey.h"
const KKeys kde_KKEYS[NB_KEYS] = {
diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp
index 3a266c171..50073cc6a 100644
--- a/kdecore/kclipboard.cpp
+++ b/kdecore/kclipboard.cpp
@@ -41,8 +41,8 @@
class KClipboardSynchronizer::MimeSource : public QMimeSource
{
public:
- MimeSource( const QMimeSource * src )
- : QMimeSource(),
+ MimeSource( const TQMimeSource * src )
+ : TQMimeSource(),
m_formats( true ) // deep copies!
{
m_formats.setAutoDelete( true );
@@ -50,12 +50,12 @@ public:
if ( src )
{
- QByteArray *byteArray;
+ TQByteArray *byteArray;
const char *format;
int i = 0;
while ( (format = src->format( i++ )) )
{
- byteArray = new QByteArray();
+ byteArray = new TQByteArray();
*byteArray = src->encodedData( format ).copy();
m_data.append( byteArray );
m_formats.append( format );
@@ -74,18 +74,18 @@ public:
virtual bool provides( const char *mimeType ) const {
return ( m_formats.find( mimeType ) > -1 );
}
- virtual QByteArray encodedData( const char *format ) const
+ virtual TQByteArray encodedData( const char *format ) const
{
int index = m_formats.find( format );
if ( index > -1 )
return *(m_data.at( index ));
- return QByteArray();
+ return TQByteArray();
}
private:
- mutable QStrList m_formats;
- mutable QPtrList<QByteArray> m_data;
+ mutable TQStrList m_formats;
+ mutable TQPtrList<TQByteArray> m_data;
};
@@ -102,8 +102,8 @@ KClipboardSynchronizer * KClipboardSynchronizer::self()
return s_self;
}
-KClipboardSynchronizer::KClipboardSynchronizer( QObject *parent, const char *name )
- : QObject( parent, name )
+KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
s_self = this;
@@ -123,19 +123,19 @@ KClipboardSynchronizer::~KClipboardSynchronizer()
void KClipboardSynchronizer::setupSignals()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
disconnect( clip, NULL, this, NULL );
if( s_sync )
- connect( clip, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( clip, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
if( s_reverse_sync )
- connect( clip, SIGNAL( dataChanged() ),
- SLOT( slotClipboardChanged() ));
+ connect( clip, TQT_SIGNAL( dataChanged() ),
+ TQT_SLOT( slotClipboardChanged() ));
}
void KClipboardSynchronizer::slotSelectionChanged()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
// qDebug("*** sel changed: %i", s_blocked);
if ( s_blocked || !clip->ownsSelection() )
@@ -147,7 +147,7 @@ void KClipboardSynchronizer::slotSelectionChanged()
void KClipboardSynchronizer::slotClipboardChanged()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
// qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection());
if ( s_blocked || !clip->ownsClipboard() )
@@ -157,11 +157,11 @@ void KClipboardSynchronizer::slotClipboardChanged()
QClipboard::Selection );
}
-void KClipboardSynchronizer::setClipboard( QMimeSource *data, QClipboard::Mode mode )
+void KClipboardSynchronizer::setClipboard( TQMimeSource *data, QClipboard::Mode mode )
{
// qDebug("---> setting clipboard: %p", data);
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
s_blocked = true;
diff --git a/kdecore/kclipboard.h b/kdecore/kclipboard.h
index bfd5cf8c4..593164f54 100644
--- a/kdecore/kclipboard.h
+++ b/kdecore/kclipboard.h
@@ -19,10 +19,10 @@
#ifndef KCLIPBOARD_H
#define KCLIPBOARD_H
-#include <qclipboard.h>
-#include <qmime.h>
-#include <qobject.h>
-#include <qstrlist.h>
+#include <tqclipboard.h>
+#include <tqmime.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
#include "kdelibs_export.h"
/**
@@ -100,10 +100,10 @@ private slots:
void slotClipboardChanged();
private:
- KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L );
+ KClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
void setupSignals();
- static void setClipboard( QMimeSource* data, QClipboard::Mode mode );
+ static void setClipboard( TQMimeSource* data, QClipboard::Mode mode );
static KClipboardSynchronizer *s_self;
static bool s_sync;
diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp
index c99903009..6a032f748 100644
--- a/kdecore/kcmdlineargs.cpp
+++ b/kdecore/kcmdlineargs.cpp
@@ -30,10 +30,10 @@
#include <limits.h>
#endif
-#include <qdir.h>
-#include <qfile.h>
-#include <qasciidict.h>
-#include <qstrlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqasciidict.h>
+#include <tqstrlist.h>
#include "kcmdlineargs.h"
#include <kaboutdata.h>
@@ -53,37 +53,37 @@
#include <win32_utils.h>
#endif
-template class QAsciiDict<QCString>;
-template class QPtrList<KCmdLineArgs>;
+template class TQAsciiDict<TQCString>;
+template class TQPtrList<KCmdLineArgs>;
-class KCmdLineParsedOptions : public QAsciiDict<QCString>
+class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
{
public:
KCmdLineParsedOptions()
- : QAsciiDict<QCString>( 7 ) { }
+ : TQAsciiDict<TQCString>( 7 ) { }
// WABA: Huh?
// The compiler doesn't find KCmdLineParsedOptions::write(s) by itself ???
// WABA: No, because there is another write function that hides the
// write function in the base class even though this function has a
// different signature. (obscure C++ feature)
- QDataStream& save( QDataStream &s) const
- { return QGDict::write(s); }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGDict::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGDict::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGDict::read(s); }
protected:
- virtual QDataStream& write( QDataStream &s, QPtrCollection::Item data) const
+ virtual TQDataStream& write( TQDataStream &s, TQPtrCollection::Item data) const
{
- QCString *str = (QCString *) data;
+ TQCString *str = (TQCString *) data;
s << (*str);
return s;
}
- virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &item)
+ virtual TQDataStream& read( TQDataStream &s, TQPtrCollection::Item &item)
{
- QCString *str = new QCString;
+ TQCString *str = new QCString;
s >> (*str);
item = (void *)str;
return s;
@@ -95,16 +95,16 @@ class KCmdLineParsedArgs : public QStrList
{
public:
KCmdLineParsedArgs()
- : QStrList( true ) { }
- QDataStream& save( QDataStream &s) const
- { return QGList::write(s); }
+ : TQStrList( true ) { }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGList::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGList::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGList::read(s); }
};
-class KCmdLineArgsList: public QPtrList<KCmdLineArgs>
+class KCmdLineArgsList: public TQPtrList<KCmdLineArgs>
{
public:
KCmdLineArgsList() { }
@@ -191,9 +191,9 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKAp
KApplication::addCmdLineOptions();
}
-QString KCmdLineArgs::cwd()
+TQString KCmdLineArgs::cwd()
{
- return QFile::decodeName(QCString(mCwd));
+ return TQFile::decodeName(TQCString(mCwd));
}
const char * KCmdLineArgs::appName()
@@ -235,7 +235,7 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam
}
void
-KCmdLineArgs::saveAppArgs( QDataStream &ds)
+KCmdLineArgs::saveAppArgs( TQDataStream &ds)
{
if (!parsed)
parseAllArgs();
@@ -244,7 +244,7 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds)
removeArgs("qt");
removeArgs("kde");
- QCString qCwd = mCwd;
+ TQCString qCwd = mCwd;
ds << qCwd;
uint count = argsList ? argsList->count() : 0;
@@ -255,13 +255,13 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds)
KCmdLineArgs *args;
for(args = argsList->first(); args; args = argsList->next())
{
- ds << QCString(args->id);
+ ds << TQCString(args->id);
args->save(ds);
}
}
void
-KCmdLineArgs::loadAppArgs( QDataStream &ds)
+KCmdLineArgs::loadAppArgs( TQDataStream &ds)
{
parsed = true; // don't reparse argc/argv!
@@ -280,7 +280,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
if (ds.atEnd())
return;
- QCString qCwd;
+ TQCString qCwd;
ds >> qCwd;
delete [] mCwd;
@@ -292,7 +292,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
while(count--)
{
- QCString id;
+ TQCString id;
ds >> id;
assert( argsList );
for(args = argsList->first(); args; args = argsList->next())
@@ -352,7 +352,7 @@ void KCmdLineArgs::removeArgs(const char *id)
* +4 - no more options follow // !fork
*/
static int
-findOption(const KCmdLineOptions *options, QCString &opt,
+findOption(const KCmdLineOptions *options, TQCString &opt,
const char *&opt_name, const char *&def, bool &enabled)
{
int result;
@@ -392,7 +392,7 @@ findOption(const KCmdLineOptions *options, QCString &opt,
options++;
if (!options->name)
return result+0;
- QCString nextOption = options->name;
+ TQCString nextOption = options->name;
int p = nextOption.find(' ');
if (p > 0)
nextOption = nextOption.left(p);
@@ -426,12 +426,12 @@ findOption(const KCmdLineOptions *options, QCString &opt,
void
-KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, bool &moreOptions)
+KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
{
KCmdLineArgs *args = argsList->first();
const char *opt_name;
const char *def;
- QCString argument;
+ TQCString argument;
int j = opt.find('=');
if (j != -1)
{
@@ -455,7 +455,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
int p = 1;
while (true)
{
- QCString singleCharOption = " ";
+ TQCString singleCharOption = " ";
singleCharOption[0] = _opt[p];
args = argsList->first();
while (args)
@@ -497,7 +497,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt)));
}
if ((result & 4) != 0)
@@ -513,7 +513,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt)));
}
if (argument.isEmpty())
{
@@ -534,9 +534,9 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
}
void
-KCmdLineArgs::printQ(const QString &msg)
+KCmdLineArgs::printQ(const TQString &msg)
{
- QCString localMsg = msg.local8Bit();
+ TQCString localMsg = msg.local8Bit();
fprintf(stdout, "%s", localMsg.data());
}
@@ -593,9 +593,9 @@ KCmdLineArgs::parseAllArgs()
else if ( (::qstrcmp(option, "version") == 0) ||
(::qstrcmp(option, "v") == 0))
{
- printQ( QString("Qt: %1\n").arg(qVersion()));
- printQ( QString("KDE: %1\n").arg(KDE_VERSION_STRING));
- printQ( QString("%1: %2\n").
+ printQ( TQString("Qt: %1\n").arg(qVersion()));
+ printQ( TQString("KDE: %1\n").arg(KDE_VERSION_STRING));
+ printQ( TQString("%1: %2\n").
arg(about->programName()).arg(about->version()));
exit(0);
} else if ( (::qstrcmp(option, "license") == 0) )
@@ -607,16 +607,16 @@ KCmdLineArgs::parseAllArgs()
} else if ( ::qstrcmp( option, "author") == 0 ) {
enable_i18n();
if ( about ) {
- const QValueList<KAboutPerson> authors = about->authors();
+ const TQValueList<KAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) {
- QString authorlist;
- for (QValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
- QString email;
+ TQString authorlist;
+ for (TQValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
+ TQString email;
if ( !(*it).emailAddress().isEmpty() )
email = " <" + (*it).emailAddress() + ">";
- authorlist += QString(" ") + (*it).name() + email + "\n";
+ authorlist += TQString(" ") + (*it).name() + email + "\n";
}
- printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( QString(about->programName()) ).arg( authorlist ) );
+ printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).arg( authorlist ) );
}
} else {
printQ( i18n("This application was written by somebody who wants to remain anonymous.") );
@@ -657,7 +657,7 @@ KCmdLineArgs::parseAllArgs()
if (ignoreUnknown)
continue;
enable_i18n();
- usage( i18n("Unexpected argument '%1'.").arg(QString::fromLocal8Bit(argv[i])));
+ usage( i18n("Unexpected argument '%1'.").arg(TQString::fromLocal8Bit(argv[i])));
}
else
{
@@ -754,15 +754,15 @@ KCmdLineArgs::enable_i18n()
}
void
-KCmdLineArgs::usage(const QString &error)
+KCmdLineArgs::usage(const TQString &error)
{
assert(KGlobal::_locale);
- QCString localError = error.local8Bit();
+ TQCString localError = error.local8Bit();
if (localError[error.length()-1] == '\n')
localError = localError.left(error.length()-1);
fprintf(stderr, "%s: %s\n", argv[0], localError.data());
- QString tmp = i18n("Use --help to get a list of available command line options.");
+ TQString tmp = i18n("Use --help to get a list of available command line options.");
localError = tmp.local8Bit();
fprintf(stderr, "%s: %s\n", argv[0], localError.data());
exit(254);
@@ -775,11 +775,11 @@ KCmdLineArgs::usage(const char *id)
assert(argsList != 0); // It's an error to call usage(...) without
// having done addCmdLineOptions first!
- QString optionFormatString = " %1 %2\n";
- QString optionFormatStringDef = " %1 %2 [%3]\n";
- QString optionHeaderString = i18n("\n%1:\n");
- QString tmp;
- QString usage;
+ TQString optionFormatString = " %1 %2\n";
+ TQString optionFormatStringDef = " %1 %2 [%3]\n";
+ TQString optionHeaderString = i18n("\n%1:\n");
+ TQString tmp;
+ TQString usage;
KCmdLineArgs *args = argsList->last();
@@ -824,8 +824,8 @@ KCmdLineArgs::usage(const char *id)
{
if (args->name && args->id)
{
- QString option = QString("--help-%1").arg(args->id);
- QString desc = i18n("Show %1 specific options").arg(args->name);
+ TQString option = TQString("--help-%1").arg(args->id);
+ TQString desc = i18n("Show %1 specific options").arg(args->name);
printQ(optionFormatString.arg(option, -25).arg(desc));
}
@@ -856,22 +856,22 @@ KCmdLineArgs::usage(const char *id)
{
bool hasArgs = false;
bool hasOptions = false;
- QString optionsHeader;
+ TQString optionsHeader;
if (args->name)
- optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(QString::fromLatin1(args->name)));
+ optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name)));
else
optionsHeader = i18n("\nOptions:\n");
while (args)
{
const KCmdLineOptions *option = args->options;
- QCString opt = "";
+ TQCString opt = "";
//
while(option && option->name)
{
- QString description;
- QString descriptionRest;
- QStringList dl;
+ TQString description;
+ TQString descriptionRest;
+ TQStringList dl;
// Option header
if (option->name[0] == ':')
@@ -892,7 +892,7 @@ KCmdLineArgs::usage(const char *id)
{
if (option->description)
{
- QString tmp = "\n"+i18n(option->description);
+ TQString tmp = "\n"+i18n(option->description);
if (!tmp.endsWith("\n"))
tmp.append("\n");
printQ(tmp);
@@ -905,11 +905,11 @@ KCmdLineArgs::usage(const char *id)
if (option->description)
{
description = i18n(option->description);
- dl = QStringList::split("\n", description, true);
+ dl = TQStringList::split("\n", description, true);
description = dl.first();
dl.remove( dl.begin() );
}
- QCString name = option->name;
+ TQCString name = option->name;
if (name[0] == '!')
name = name.mid(1);
@@ -959,7 +959,7 @@ KCmdLineArgs::usage(const char *id)
opt = "";
}
}
- for(QStringList::Iterator it = dl.begin();
+ for(TQStringList::Iterator it = dl.begin();
it != dl.end();
++it)
{
@@ -1028,7 +1028,7 @@ KCmdLineArgs::reset()
}
void
-KCmdLineArgs::save( QDataStream &ds) const
+KCmdLineArgs::save( TQDataStream &ds) const
{
uint count = 0;
if (parsedOptionList)
@@ -1043,7 +1043,7 @@ KCmdLineArgs::save( QDataStream &ds) const
}
void
-KCmdLineArgs::load( QDataStream &ds)
+KCmdLineArgs::load( TQDataStream &ds)
{
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
@@ -1064,12 +1064,12 @@ KCmdLineArgs::load( QDataStream &ds)
}
void
-KCmdLineArgs::setOption(const QCString &opt, bool enabled)
+KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
{
if (isQt)
{
// Qt does it own parsing.
- QCString arg = "-";
+ TQCString arg = "-";
if( !enabled )
arg += "no";
arg += opt;
@@ -1081,18 +1081,18 @@ KCmdLineArgs::setOption(const QCString &opt, bool enabled)
}
if (enabled)
- parsedOptionList->replace( opt, new QCString("t") );
+ parsedOptionList->replace( opt, new TQCString("t") );
else
- parsedOptionList->replace( opt, new QCString("f") );
+ parsedOptionList->replace( opt, new TQCString("f") );
}
void
-KCmdLineArgs::setOption(const QCString &opt, const char *value)
+KCmdLineArgs::setOption(const TQCString &opt, const char *value)
{
if (isQt)
{
// Qt does it's own parsing.
- QCString arg = "-";
+ TQCString arg = "-";
arg += opt;
addArgument(arg);
addArgument(value);
@@ -1110,13 +1110,13 @@ KCmdLineArgs::setOption(const QCString &opt, const char *value)
parsedOptionList->setAutoDelete(true);
}
- parsedOptionList->insert( opt, new QCString(value) );
+ parsedOptionList->insert( opt, new TQCString(value) );
}
QCString
KCmdLineArgs::getOption(const char *_opt) const
{
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
value = parsedOptionList->find(_opt);
@@ -1129,7 +1129,7 @@ KCmdLineArgs::getOption(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result != 3)
@@ -1142,7 +1142,7 @@ KCmdLineArgs::getOption(const char *_opt) const
assert( 0 );
exit(255);
}
- return QCString(def);
+ return TQCString(def);
}
QCStringList
@@ -1154,7 +1154,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
while(true)
{
- QCString *value = parsedOptionList->take(_opt);
+ TQCString *value = parsedOptionList->take(_opt);
if (!value)
break;
result.prepend(*value);
@@ -1170,7 +1170,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
it != result.end();
++it)
{
- parsedOptionList->insert(_opt, new QCString(*it));
+ parsedOptionList->insert(_opt, new TQCString(*it));
}
return result;
}
@@ -1182,7 +1182,7 @@ KCmdLineArgs::isSet(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result == 0)
@@ -1196,7 +1196,7 @@ KCmdLineArgs::isSet(const char *_opt) const
exit(255);
}
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
value = parsedOptionList->find(opt);
@@ -1250,8 +1250,8 @@ KCmdLineArgs::url(int n) const
KURL KCmdLineArgs::makeURL(const char *_urlArg)
{
- const QString urlArg = QFile::decodeName(_urlArg);
- QFileInfo fileInfo(urlArg);
+ const TQString urlArg = TQFile::decodeName(_urlArg);
+ TQFileInfo fileInfo(urlArg);
if (!fileInfo.isRelative()) { // i.e. starts with '/', on unix
KURL result;
result.setPath(urlArg);
diff --git a/kdecore/kcmdlineargs.h b/kdecore/kcmdlineargs.h
index 278ad976e..b4386c629 100644
--- a/kdecore/kcmdlineargs.h
+++ b/kdecore/kcmdlineargs.h
@@ -22,11 +22,11 @@
#include "kdelibs_export.h"
#include <kurl.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* @short Structure that holds command line options.
@@ -118,13 +118,13 @@ class KCmdLineArgsPrivate;
* ....
*
* // An option which takes an additional argument
- * QCString anotherOptionArg = args->getOption("another-option");
+ * TQCString anotherOptionArg = args->getOption("another-option");
*
* // Arguments (e.g. files to open)
* for(int i = 0; i < args->count(); i++) // Counting start at 0!
* {
* // don't forget to convert to Unicode!
- * openFile( QFile::decodeName( args->arg(i)));
+ * openFile( TQFile::decodeName( args->arg(i)));
* // Or more convenient:
* // openURL( args->url(i));
*
@@ -223,7 +223,7 @@ class KDECORE_EXPORT KCmdLineArgs
{
friend class KApplication;
friend class KUniqueApplication;
- friend class QPtrList<KCmdLineArgs>;
+ friend class TQPtrList<KCmdLineArgs>;
public:
// Static functions:
@@ -242,7 +242,7 @@ public:
* @param _description A short description of what your application is about.
* @param _version A version.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*
* @since 3.2
*/
@@ -270,7 +270,7 @@ public:
* @param _argv As passed to @p main(...).
* @param about A KAboutData object describing your program.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*/
static void init(int _argc, char **_argv,
const KAboutData *about, bool noKApp = false);
@@ -378,7 +378,7 @@ public:
* where the user started a second instance.
* @return the current working directory
**/
- static QString cwd();
+ static TQString cwd();
/**
* Get the appname according to argv[0].
@@ -399,7 +399,7 @@ public:
* Print an error to stderr and the usage help to stdout and exit.
* @param error the error to print
**/
- static void usage(const QString &error);
+ static void usage(const TQString &error);
/**
* Enable i18n to be able to print a translated error message.
@@ -430,7 +430,7 @@ public:
* If the option was present more than the value of the
* last occurrence is used.
*/
- QCString getOption(const char *option) const;
+ TQCString getOption(const char *option) const;
/**
* Read out all occurrences of a string option.
@@ -532,7 +532,7 @@ public:
/**
* Load arguments from a stream.
*/
- static void loadAppArgs( QDataStream &);
+ static void loadAppArgs( TQDataStream &);
/**
* Add standard option --tempfile
@@ -571,7 +571,7 @@ private:
*
* Checks what to do with a single option
*/
- static void findOption(const char *_opt, QCString opt, int &i, bool enabled, bool &moreOptions);
+ static void findOption(const char *_opt, TQCString opt, int &i, bool enabled, bool &moreOptions);
/**
* @internal
@@ -610,21 +610,21 @@ private:
*
* Save all but the Qt and KDE arguments to a stream.
*/
- static void saveAppArgs( QDataStream &);
+ static void saveAppArgs( TQDataStream &);
/**
* @internal
*
* Set a boolean option
*/
- void setOption(const QCString &option, bool enabled);
+ void setOption(const TQCString &option, bool enabled);
/**
* @internal
*
* Set a string option
*/
- void setOption(const QCString &option, const char *value);
+ void setOption(const TQCString &option, const char *value);
/**
* @internal
@@ -638,14 +638,14 @@ private:
*
* Save to a stream.
*/
- void save( QDataStream &) const;
+ void save( TQDataStream &) const;
/**
* @internal
*
* Restore from a stream.
*/
- void load( QDataStream &);
+ void load( TQDataStream &);
/**
* @internal for KApplication only
@@ -664,7 +664,7 @@ private:
*/
static void initIgnore(int _argc, char **_argv, const char *_appname);
- static void printQ(const QString &msg);
+ static void printQ(const TQString &msg);
const KCmdLineOptions *options;
const char *name;
diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp
index dfa8f351b..84a4cfca2 100644
--- a/kdecore/kcompletion.cpp
+++ b/kdecore/kcompletion.cpp
@@ -24,7 +24,7 @@
#include <knotifyclient.h>
#include <kglobal.h>
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include "kcompletion.h"
#include "kcompletion_private.h"
@@ -68,17 +68,17 @@ void KCompletion::setIgnoreCase( bool ignoreCase )
myIgnoreCase = ignoreCase;
}
-void KCompletion::setItems( const QStringList& items )
+void KCompletion::setItems( const TQStringList& items )
{
clear();
insertItems( items );
}
-void KCompletion::insertItems( const QStringList& items )
+void KCompletion::insertItems( const TQStringList& items )
{
bool weighted = (myOrder == Weighted);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
if ( weighted ) { // determine weight
for ( it = items.begin(); it != items.end(); ++it )
addWeightedItem( *it );
@@ -89,11 +89,11 @@ void KCompletion::insertItems( const QStringList& items )
}
}
-QStringList KCompletion::items() const
+TQStringList KCompletion::items() const
{
KCompletionMatchesWrapper list; // unsorted
bool addWeight = (myOrder == Weighted);
- extractStringsFromNode( myTreeRoot, QString::null, &list, addWeight );
+ extractStringsFromNode( myTreeRoot, TQString::null, &list, addWeight );
return list.list();
}
@@ -103,16 +103,16 @@ bool KCompletion::isEmpty() const
return (myTreeRoot->childrenCount() == 0);
}
-void KCompletion::addItem( const QString& item )
+void KCompletion::addItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
addItem( item, 0 );
}
-void KCompletion::addItem( const QString& item, uint weight )
+void KCompletion::addItem( const TQString& item, uint weight )
{
if ( item.isEmpty() )
return;
@@ -139,7 +139,7 @@ void KCompletion::addItem( const QString& item, uint weight )
// qDebug("*** added: %s (%i)", item.latin1(), node->weight());
}
-void KCompletion::addWeightedItem( const QString& item )
+void KCompletion::addWeightedItem( const TQString& item )
{
if ( myOrder != Weighted ) {
addItem( item, 0 );
@@ -165,11 +165,11 @@ void KCompletion::addWeightedItem( const QString& item )
}
-void KCompletion::removeItem( const QString& item )
+void KCompletion::removeItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
myTreeRoot->remove( item );
}
@@ -179,17 +179,17 @@ void KCompletion::clear()
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
delete myTreeRoot;
myTreeRoot = new KCompTreeNode;
}
-QString KCompletion::makeCompletion( const QString& string )
+TQString KCompletion::makeCompletion( const TQString& string )
{
if ( myCompletionMode == KGlobalSettings::CompletionNone )
- return QString::null;
+ return TQString::null;
//kdDebug(0) << "KCompletion: completing: " << string << endl;
@@ -207,17 +207,17 @@ QString KCompletion::makeCompletion( const QString& string )
// postProcessMatch() during rotation
findAllCompletions( string, &d->matches, myHasMultipleMatches );
- QStringList l = d->matches.list();
+ TQStringList l = d->matches.list();
postProcessMatches( &l );
emit matches( l );
if ( l.isEmpty() )
doBeep( NoMatch );
- return QString::null;
+ return TQString::null;
}
- QString completion;
+ TQString completion;
// in case-insensitive popup mode, we search all completions at once
if ( myCompletionMode == KGlobalSettings::CompletionPopup ||
myCompletionMode == KGlobalSettings::CompletionPopupAuto ) {
@@ -248,14 +248,14 @@ QString KCompletion::makeCompletion( const QString& string )
}
-QStringList KCompletion::substringCompletion( const QString& string ) const
+TQStringList KCompletion::substringCompletion( const TQString& string ) const
{
// get all items in the tree, possibly in sorted order
bool sorted = (myOrder == Weighted);
KCompletionMatchesWrapper allItems( sorted );
- extractStringsFromNode( myTreeRoot, QString::null, &allItems, false );
+ extractStringsFromNode( myTreeRoot, TQString::null, &allItems, false );
- QStringList list = allItems.list();
+ TQStringList list = allItems.list();
// subStringMatches is invoked manually, via a shortcut, so we should
// beep here, if necessary.
@@ -269,11 +269,11 @@ QStringList KCompletion::substringCompletion( const QString& string ) const
return list;
}
- QStringList matches;
- QStringList::ConstIterator it = list.begin();
+ TQStringList matches;
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it ) {
- QString item = *it;
+ TQString item = *it;
if ( item.find( string, 0, false ) != -1 ) { // always case insensitive
matches.append( item );
}
@@ -293,7 +293,7 @@ void KCompletion::setCompletionMode( KGlobalSettings::Completion mode )
myCompletionMode = mode;
}
-QStringList KCompletion::allMatches()
+TQStringList KCompletion::allMatches()
{
// Don't use d->matches since calling postProcessMatches()
// on d->matches here would interfere with call to
@@ -301,7 +301,7 @@ QStringList KCompletion::allMatches()
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( myLastString, &matches, dummy );
- QStringList l = matches.list();
+ TQStringList l = matches.list();
postProcessMatches( &l );
return l;
}
@@ -319,17 +319,17 @@ KCompletionMatches KCompletion::allWeightedMatches()
return ret;
}
-QStringList KCompletion::allMatches( const QString &string )
+TQStringList KCompletion::allMatches( const TQString &string )
{
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( string, &matches, dummy );
- QStringList l = matches.list();
+ TQStringList l = matches.list();
postProcessMatches( &l );
return l;
}
-KCompletionMatches KCompletion::allWeightedMatches( const QString &string )
+KCompletionMatches KCompletion::allWeightedMatches( const TQString &string )
{
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
@@ -343,9 +343,9 @@ KCompletionMatches KCompletion::allWeightedMatches( const QString &string )
///////////////// tree operations ///////////////////
-QString KCompletion::nextMatch()
+TQString KCompletion::nextMatch()
{
- QString completion;
+ TQString completion;
myLastMatch = myCurrentMatch;
if ( d->matches.isEmpty() ) {
@@ -358,7 +358,7 @@ QString KCompletion::nextMatch()
return completion;
}
- QStringList matches = d->matches.list();
+ TQStringList matches = d->matches.list();
myLastMatch = matches[ myRotationIndex++ ];
if ( myRotationIndex == matches.count() -1 )
@@ -376,9 +376,9 @@ QString KCompletion::nextMatch()
-QString KCompletion::previousMatch()
+TQString KCompletion::previousMatch()
{
- QString completion;
+ TQString completion;
myLastMatch = myCurrentMatch;
if ( d->matches.isEmpty() ) {
@@ -391,7 +391,7 @@ QString KCompletion::previousMatch()
return completion;
}
- QStringList matches = d->matches.list();
+ TQStringList matches = d->matches.list();
myLastMatch = matches[ myRotationIndex ];
if ( myRotationIndex == 1 )
doBeep( Rotation ); // indicate first item -> rotating
@@ -411,10 +411,10 @@ QString KCompletion::previousMatch()
// tries to complete "string" from the tree-root
-QString KCompletion::findCompletion( const QString& string )
+TQString KCompletion::findCompletion( const TQString& string )
{
- QChar ch;
- QString completion;
+ TQChar ch;
+ TQString completion;
const KCompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
@@ -425,7 +425,7 @@ QString KCompletion::findCompletion( const QString& string )
if ( node )
completion += ch;
else
- return QString::null; // no completion
+ return TQString::null; // no completion
}
// Now we have the last node of the to be completed string.
@@ -487,7 +487,7 @@ QString KCompletion::findCompletion( const QString& string )
}
-void KCompletion::findAllCompletions(const QString& string,
+void KCompletion::findAllCompletions(const TQString& string,
KCompletionMatchesWrapper *matches,
bool& hasMultipleMatches) const
{
@@ -497,13 +497,13 @@ void KCompletion::findAllCompletions(const QString& string,
return;
if ( myIgnoreCase ) { // case insensitive completion
- extractStringsFromNodeCI( myTreeRoot, QString::null, string, matches );
+ extractStringsFromNodeCI( myTreeRoot, TQString::null, string, matches );
hasMultipleMatches = (matches->count() > 1);
return;
}
- QChar ch;
- QString completion;
+ TQChar ch;
+ TQString completion;
const KCompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
@@ -543,7 +543,7 @@ void KCompletion::findAllCompletions(const QString& string,
void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
- const QString& beginning,
+ const TQString& beginning,
KCompletionMatchesWrapper *matches,
bool addWeight ) const
{
@@ -552,8 +552,8 @@ void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
// kDebug() << "Beginning: " << beginning << endl;
const KCompTreeChildren *list = node->children();
- QString string;
- QString w;
+ TQString string;
+ TQString w;
// loop thru all children
for ( KCompTreeNode *cur = list->begin(); cur ; cur = cur->next) {
@@ -586,8 +586,8 @@ void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
}
void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
- const QString& beginning,
- const QString& restString,
+ const TQString& beginning,
+ const TQString& restString,
KCompletionMatchesWrapper *matches ) const
{
if ( restString.isEmpty() ) {
@@ -595,8 +595,8 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
return;
}
- QChar ch1 = restString.at(0);
- QString newRest = restString.mid(1);
+ TQChar ch1 = restString.at(0);
+ TQString newRest = restString.mid(1);
KCompTreeNode *child1, *child2;
child1 = node->find( ch1 ); // the correct match
@@ -607,7 +607,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
// append the case insensitive matches, if available
if ( ch1.isLetter() ) {
// find out if we have to lower or upper it. Is there a better way?
- QChar ch2 = ch1.lower();
+ TQChar ch2 = ch1.lower();
if ( ch1 == ch2 )
ch2 = ch1.upper();
if ( ch1 != ch2 ) {
@@ -624,23 +624,23 @@ void KCompletion::doBeep( BeepMode mode ) const
if ( !myBeep )
return;
- QString text, event;
+ TQString text, event;
switch ( mode ) {
case Rotation:
- event = QString::fromLatin1("Textcompletion: rotation");
+ event = TQString::fromLatin1("Textcompletion: rotation");
text = i18n("You reached the end of the list\nof matching items.\n");
break;
case PartialMatch:
if ( myCompletionMode == KGlobalSettings::CompletionShell ||
myCompletionMode == KGlobalSettings::CompletionMan ) {
- event = QString::fromLatin1("Textcompletion: partial match");
+ event = TQString::fromLatin1("Textcompletion: partial match");
text = i18n("The completion is ambiguous, more than one\nmatch is available.\n");
}
break;
case NoMatch:
if ( myCompletionMode == KGlobalSettings::CompletionShell ) {
- event = QString::fromLatin1("Textcompletion: no match");
+ event = TQString::fromLatin1("Textcompletion: no match");
text = i18n("There is no matching item available.\n");
}
break;
@@ -655,9 +655,9 @@ void KCompletion::doBeep( BeepMode mode ) const
/////////
-// Implements the tree. Every node is a QChar and has a list of children, which
+// Implements the tree. Every node is a TQChar and has a list of children, which
// are Nodes as well.
-// QChar( 0x0 ) is used as the delimiter of a string; the last child of each
+// TQChar( 0x0 ) is used as the delimiter of a string; the last child of each
// inserted string is 0x0.
KCompTreeNode::~KCompTreeNode()
@@ -674,7 +674,7 @@ KCompTreeNode::~KCompTreeNode()
// Adds a child-node "ch" to this node. If such a node is already existant,
// it will not be created. Returns the new/existing node.
-KCompTreeNode * KCompTreeNode::insert( const QChar& ch, bool sorted )
+KCompTreeNode * KCompTreeNode::insert( const TQChar& ch, bool sorted )
{
KCompTreeNode *child = find( ch );
if ( !child ) {
@@ -711,12 +711,12 @@ KCompTreeNode * KCompTreeNode::insert( const QChar& ch, bool sorted )
// Iteratively removes a string from the tree. The nicer recursive
// version apparently was a little memory hungry (see #56757)
-void KCompTreeNode::remove( const QString& str )
+void KCompTreeNode::remove( const TQString& str )
{
- QString string = str;
- string += QChar(0x0);
+ TQString string = str;
+ string += TQChar(0x0);
- QPtrVector<KCompTreeNode> deletables( string.length() + 1 );
+ TQPtrVector<KCompTreeNode> deletables( string.length() + 1 );
KCompTreeNode *child = 0L;
KCompTreeNode *parent = this;
@@ -743,7 +743,7 @@ void KCompTreeNode::remove( const QString& str )
}
}
-QStringList KCompletionMatchesWrapper::list() const
+TQStringList KCompletionMatchesWrapper::list() const
{
if ( sortedList && dirty ) {
sortedList->sort();
@@ -752,7 +752,7 @@ QStringList KCompletionMatchesWrapper::list() const
stringList.clear();
// high weight == sorted last -> reverse the sorting here
- QValueListConstIterator<KSortableItem<QString> > it;
+ TQValueListConstIterator<KSortableItem<TQString> > it;
for ( it = sortedList->begin(); it != sortedList->end(); ++it )
stringList.prepend( (*it).value() );
}
@@ -771,11 +771,11 @@ KCompletionMatches::KCompletionMatches( const KCompletionMatchesWrapper& matches
if( matches.sortedList != 0L )
KCompletionMatchesList::operator=( *matches.sortedList );
else {
- QStringList l = matches.list();
- for( QStringList::ConstIterator it = l.begin();
+ TQStringList l = matches.list();
+ for( TQStringList::ConstIterator it = l.begin();
it != l.end();
++it )
- prepend( KSortableItem<QString, int>( 1, *it ) );
+ prepend( KSortableItem<TQString, int>( 1, *it ) );
}
}
@@ -783,11 +783,11 @@ KCompletionMatches::~KCompletionMatches()
{
}
-QStringList KCompletionMatches::list( bool sort_P ) const
+TQStringList KCompletionMatches::list( bool sort_P ) const
{
if( _sorting && sort_P )
const_cast< KCompletionMatches* >( this )->sort();
- QStringList stringList;
+ TQStringList stringList;
// high weight == sorted last -> reverse the sorting here
for ( ConstIterator it = begin(); it != end(); ++it )
stringList.prepend( (*it).value() );
diff --git a/kdecore/kcompletion.h b/kdecore/kcompletion.h
index af4d5ee32..11e973dc8 100644
--- a/kdecore/kcompletion.h
+++ b/kdecore/kcompletion.h
@@ -20,12 +20,12 @@
#ifndef KCOMPLETION_H
#define KCOMPLETION_H
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include "kdelibs_export.h"
#include <kglobalsettings.h>
@@ -43,7 +43,7 @@ class QPopupMenu;
* @short A generic class for completing QStrings
*
* This class offers easy use of "auto-completion", "manual-completion" or
- * "shell completion" on QString objects. A common use is completing filenames
+ * "shell completion" on TQString objects. A common use is completing filenames
* or URLs (see KURLCompletion()).
* But it is not limited to URL-completion -- everything should be completable!
* The user should be able to complete email-addresses, telephone-numbers,
@@ -134,7 +134,7 @@ class KDECORE_EXPORT KCompletion : public QObject
Q_ENUMS( CompOrder )
Q_PROPERTY( CompOrder order READ order WRITE setOrder )
Q_PROPERTY( bool ignoreCase READ ignoreCase WRITE setIgnoreCase )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
Q_OBJECT
public:
@@ -162,7 +162,7 @@ public:
/**
* Attempts to find an item in the list of available completions,
* that begins with @p string. Will either return the first matching item
- * (if there is more than one match) or QString::null, if no match was
+ * (if there is more than one match) or TQString::null, if no match was
* found.
*
* In the latter case, a sound will be issued, depending on
@@ -176,12 +176,12 @@ public:
* This happens only in shell-completion-mode.
*
* @param string the string to complete
- * @return the matching item, or QString::null if there is no matching
+ * @return the matching item, or TQString::null if there is no matching
* item.
* @see slotMakeCompletion
* @see substringCompletion
*/
- virtual QString makeCompletion( const QString& string );
+ virtual TQString makeCompletion( const TQString& string );
/**
* Returns a list of all completion items that contain the given @p string.
@@ -191,18 +191,18 @@ public:
*
* @see makeCompletion
*/
- QStringList substringCompletion( const QString& string ) const;
+ TQStringList substringCompletion( const TQString& string ) const;
/**
* Returns the next item from the matching-items-list.
* When reaching the beginning, the list is rotated so it will return the
* last match and a sound is issued (depending on isSoundsEnabled()).
* @return the next item from the matching-items-list.
- * When there is no match, QString::null is returned and
+ * When there is no match, TQString::null is returned and
* a sound is be issued.
* @see slotPreviousMatch
*/
- QString previousMatch();
+ TQString previousMatch();
/**
* Returns the next item from the matching-items-list.
@@ -210,18 +210,18 @@ public:
* the first match and a sound is issued (depending on
* isSoundsEnabled()).
* @return the next item from the matching-items-list. When there is no
- * match, QString::null is returned and a sound is issued
+ * match, TQString::null is returned and a sound is issued
* @see slotNextMatch
*/
- QString nextMatch();
+ TQString nextMatch();
/**
* Returns the last match. Might be useful if you need to check whether
* a completion is different from the last one.
- * @return the last match. QString::null is returned when there is no
+ * @return the last match. TQString::null is returned when there is no
* last match.
*/
- virtual const QString& lastMatch() const { return myLastMatch; }
+ virtual const TQString& lastMatch() const { return myLastMatch; }
/**
* Returns a list of all items inserted into KCompletion. This is useful
@@ -241,7 +241,7 @@ public:
* @return a list of all items
* @see setItems
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Returns true when the completion object contains no entries.
@@ -322,14 +322,14 @@ public:
* @return a list of all matches for the last completed string.
* @see substringCompletion
*/
- QStringList allMatches();
+ TQStringList allMatches();
/**
* Returns a list of all items matching @p string.
* @param string the string to match
* @return the list of all matches
*/
- QStringList allMatches( const QString& string );
+ TQStringList allMatches( const TQString& string );
/**
* Returns a list of all items matching the last completed string.
@@ -350,7 +350,7 @@ public:
* @param string the string to match
* @return a list of all matches
*/
- KCompletionMatches allWeightedMatches( const QString& string );
+ KCompletionMatches allWeightedMatches( const TQString& string );
/**
* Enables/disables playing a sound when
@@ -404,7 +404,7 @@ public slots:
* @param string the string to complete
* @see makeCompletion
*/
- void slotMakeCompletion( const QString& string ) {
+ void slotMakeCompletion( const TQString& string ) {
(void) makeCompletion( string );
}
@@ -433,7 +433,7 @@ public slots:
* Does the same as setItems(), but does not call clear() before.
* @param items the items to insert
*/
- void insertItems( const QStringList& items );
+ void insertItems( const TQStringList& items );
/**
* Sets the list of items available for completion. Removes all previous
@@ -450,7 +450,7 @@ public slots:
* @param list the list of items that are available for completion
* @see items
*/
- virtual void setItems( const QStringList& list);
+ virtual void setItems( const TQStringList& list);
/**
* Adds an item to the list of available completions.
@@ -458,7 +458,7 @@ public slots:
* won't work anymore).
* @param item the item to add
*/
- void addItem( const QString& item);
+ void addItem( const TQString& item);
/**
* Adds an item to the list of available completions.
@@ -471,7 +471,7 @@ public slots:
* @param item the item to add
* @param weight the weight of the item, default is 1
*/
- void addItem( const QString& item, uint weight );
+ void addItem( const TQString& item, uint weight );
/**
* Removes an item from the list of available completions.
@@ -479,7 +479,7 @@ public slots:
* won't work anymore).
* @param item the item to remove
*/
- void removeItem( const QString& item);
+ void removeItem( const TQString& item);
/**
* Removes all inserted items.
@@ -490,11 +490,11 @@ public slots:
signals:
/**
* The matching item. Will be emitted by makeCompletion(),
- * previousMatch() or nextMatch(). May be QString::null if there
+ * previousMatch() or nextMatch(). May be TQString::null if there
* is no matching item.
- * @param item the match, or QString::null if there is none
+ * @param item the match, or TQString::null if there is none
*/
- void match( const QString& item);
+ void match( const TQString& item);
/**
* All matching items. Will be emitted by makeCompletion() in shell-
@@ -502,7 +502,7 @@ signals:
* or more often.
* @param matchlist the list of matches
*/
- void matches( const QStringList& matchlist);
+ void matches( const TQStringList& matchlist);
/**
* This signal is emitted, when calling makeCompletion() and more than
@@ -525,7 +525,7 @@ protected:
* @param match the match to process
* @see postProcessMatches
*/
- virtual void postProcessMatch( QString *match ) const { Q_UNUSED(match) }
+ virtual void postProcessMatch( TQString *match ) const { Q_UNUSED(match) }
/**
* This method is called before a list of all available completions is
@@ -537,7 +537,7 @@ protected:
* @param matches the matches to process
* @see postProcessMatch
*/
- virtual void postProcessMatches( QStringList * matches ) const { Q_UNUSED(matches)}
+ virtual void postProcessMatches( TQStringList * matches ) const { Q_UNUSED(matches)}
/**
* This method is called before a list of all available completions is
@@ -552,19 +552,19 @@ protected:
virtual void postProcessMatches( KCompletionMatches * matches ) const {Q_UNUSED(matches)}
private:
- void addWeightedItem( const QString& );
- QString findCompletion( const QString& string );
- void findAllCompletions( const QString&,
+ void addWeightedItem( const TQString& );
+ TQString findCompletion( const TQString& string );
+ void findAllCompletions( const TQString&,
KCompletionMatchesWrapper *matches,
bool& hasMultipleMatches ) const;
void extractStringsFromNode( const KCompTreeNode *,
- const QString& beginning,
+ const TQString& beginning,
KCompletionMatchesWrapper *matches,
bool addWeight = false ) const;
void extractStringsFromNodeCI( const KCompTreeNode *,
- const QString& beginning,
- const QString& restString,
+ const TQString& beginning,
+ const TQString& restString,
KCompletionMatchesWrapper *matches) const;
enum BeepMode { NoMatch, PartialMatch, Rotation };
@@ -573,11 +573,11 @@ private:
KGlobalSettings::Completion myCompletionMode;
CompOrder myOrder;
- QString myLastString;
- QString myLastMatch;
- QString myCurrentMatch;
+ TQString myLastString;
+ TQString myLastMatch;
+ TQString myCurrentMatch;
KCompTreeNode * myTreeRoot;
- QStringList myRotations;
+ TQStringList myRotations;
bool myBeep;
bool myIgnoreCase;
bool myHasMultipleMatches;
@@ -591,7 +591,7 @@ private:
};
// some more helper stuff
-typedef KSortableValueList<QString> KCompletionMatchesList;
+typedef KSortableValueList<TQString> KCompletionMatchesList;
class KCompletionMatchesPrivate;
/**
@@ -607,7 +607,7 @@ class KCompletionMatchesPrivate;
* if( !location.startsWith( "www." ))
matches += completion->allWeightedmatches( "www." + location" );
* matches.removeDuplicates();
- * QStringList list = matches.list();
+ * TQStringList list = matches.list();
* \endcode
*
* @short List for keeping matches returned from KCompletion
@@ -627,12 +627,12 @@ public:
*/
void removeDuplicates();
/**
- * Returns the matches as a QStringList.
+ * Returns the matches as a TQStringList.
* @param sort if false, the matches won't be sorted before the conversion,
* use only if you're sure the sorting is not needed
* @return the list of matches
*/
- QStringList list( bool sort = true ) const;
+ TQStringList list( bool sort = true ) const;
/**
* If sorting() returns false, the matches aren't sorted by their weight,
* even if true is passed to list().
@@ -689,7 +689,7 @@ public:
// Map for the key binding types mentioned above.
- typedef QMap<KeyBindingType, KShortcut> KeyBindingMap;
+ typedef TQMap<KeyBindingType, KShortcut> KeyBindingMap;
/**
* Default constructor.
@@ -930,14 +930,14 @@ public:
*
* @param text the completed text to be set in the widget.
*/
- virtual void setCompletedText( const QString& text ) = 0;
+ virtual void setCompletedText( const TQString& text ) = 0;
/**
* A pure virtual function that must be implemented by
* all inheriting classes.
* @param items the list of completed items
*/
- virtual void setCompletedItems( const QStringList& items ) = 0;
+ virtual void setCompletedItems( const TQStringList& items ) = 0;
/**
* Returns a pointer to the completion object.
@@ -994,7 +994,7 @@ private:
// Stores the completion mode locally.
KGlobalSettings::Completion m_iCompletionMode;
// Pointer to Completion object.
- QGuardedPtr<KCompletion> m_pCompObj;
+ TQGuardedPtr<KCompletion> m_pCompObj;
// Keybindings
KeyBindingMap m_keyMap;
// we may act as a proxy to another KCompletionBase object
diff --git a/kdecore/kcompletion_private.h b/kdecore/kcompletion_private.h
index 10d978806..35c846593 100644
--- a/kdecore/kcompletion_private.h
+++ b/kdecore/kcompletion_private.h
@@ -21,7 +21,7 @@
#ifndef KCOMPLETION_PRIVATE_H
#define KCOMPLETION_PRIVATE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <ksortablevaluelist.h>
class KCompTreeNode;
@@ -53,10 +53,10 @@ private:
typedef KCompTreeNodeList KCompTreeChildren;
/**
- * A helper class for KCompletion. Implements a tree of QChar.
+ * A helper class for KCompletion. Implements a tree of TQChar.
*
* The tree looks like this (containing the items "kde", "kde-ui",
- * "kde-core" and "pfeiffer". Every item is delimited with QChar( 0x0 )
+ * "kde-core" and "pfeiffer". Every item is delimited with TQChar( 0x0 )
*
* some_root_node
* / \
@@ -84,9 +84,9 @@ typedef KCompTreeNodeList KCompTreeChildren;
class KDECORE_EXPORT KCompTreeNode : public QChar
{
public:
- KCompTreeNode() : QChar(), myWeight(0) {}
- KCompTreeNode( const QChar& ch, uint weight = 0 )
- : QChar( ch ),
+ KCompTreeNode() : TQChar(), myWeight(0) {}
+ KCompTreeNode( const TQChar& ch, uint weight = 0 )
+ : TQChar( ch ),
myWeight( weight ) {}
~KCompTreeNode();
@@ -99,13 +99,13 @@ public:
// Returns a child of this node matching ch, if available.
// Otherwise, returns 0L
- inline KCompTreeNode * find( const QChar& ch ) const {
+ inline KCompTreeNode * find( const TQChar& ch ) const {
KCompTreeNode * cur = myChildren.begin();
while (cur && (*cur != ch)) cur = cur->next;
return cur;
}
- KCompTreeNode * insert( const QChar&, bool sorted );
- void remove( const QString& );
+ KCompTreeNode * insert( const TQChar&, bool sorted );
+ void remove( const TQString& );
inline int childrenCount() const { return myChildren.count(); }
@@ -129,7 +129,7 @@ public:
}
/* We want to handle a list of KCompTreeNodes on our own, to not
- need to use QValueList<>. And to make it even more fast we don't
+ need to use TQValueList<>. And to make it even more fast we don't
use an accessor, but just a public member. */
KCompTreeNode *next;
private:
@@ -141,7 +141,7 @@ private:
// some more helper stuff
-typedef KSortableValueList<QString> KCompletionMatchesList;
+typedef KSortableValueList<TQString> KCompletionMatchesList;
/**
* @internal
@@ -172,7 +172,7 @@ public:
return sortedList != 0L;
}
- void append( int i, const QString& string ) {
+ void append( int i, const TQString& string ) {
if ( sortedList )
sortedList->insert( i, string );
else
@@ -197,17 +197,17 @@ public:
return count() == 0;
}
- QString first() const {
+ TQString first() const {
return list().first();
}
- QString last() const {
+ TQString last() const {
return list().last();
}
- QStringList list() const;
+ TQStringList list() const;
- mutable QStringList stringList;
+ mutable TQStringList stringList;
KCompletionMatchesList *sortedList;
mutable bool dirty;
};
diff --git a/kdecore/kcompletionbase.cpp b/kdecore/kcompletionbase.cpp
index a9c70c7a1..9e7f6d746 100644
--- a/kdecore/kcompletionbase.cpp
+++ b/kdecore/kcompletionbase.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kcompletion.h>
diff --git a/kdecore/kconfig.cpp b/kdecore/kconfig.cpp
index 4712415f4..2531034ee 100644
--- a/kdecore/kconfig.cpp
+++ b/kdecore/kconfig.cpp
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include "kconfigbackend.h"
@@ -39,9 +39,9 @@
#include "kglobal.h"
#include "kstandarddirs.h"
#include "kstaticdeleter.h"
-#include <qtimer.h>
+#include <tqtimer.h>
-KConfig::KConfig( const QString& fileName,
+KConfig::KConfig( const TQString& fileName,
bool bReadOnly, bool bUseKderc, const char *resType )
: KConfigBase(), bGroupImmutable(false), bFileImmutable(false),
bForceGlobal(false)
@@ -104,9 +104,9 @@ void KConfig::rollback(bool bDeep)
(*aIt).bDirty = false;
}
-QStringList KConfig::groupList() const
+TQStringList KConfig::groupList() const
{
- QStringList retList;
+ TQStringList retList;
KEntryMapConstIterator aIt = aEntryMap.begin();
KEntryMapConstIterator aEnd = aEntryMap.end();
@@ -114,7 +114,7 @@ QStringList KConfig::groupList() const
{
while(aIt.key().mKey.isEmpty())
{
- QCString group = aIt.key().mGroup;
+ TQCString group = aIt.key().mGroup;
++aIt;
while (true)
{
@@ -127,7 +127,7 @@ QStringList KConfig::groupList() const
if (!aIt.key().bDefault && !(*aIt).bDeleted)
{
if (group != "$Version") // Special case!
- retList.append(QString::fromUtf8(group));
+ retList.append(TQString::fromUtf8(group));
break; // Group is non-empty, added, next group
}
++aIt;
@@ -138,11 +138,11 @@ QStringList KConfig::groupList() const
return retList;
}
-QMap<QString, QString> KConfig::entryMap(const QString &pGroup) const
+TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const
{
- QCString pGroup_utf = pGroup.utf8();
+ TQCString pGroup_utf = pGroup.utf8();
KEntryKey groupKey( pGroup_utf, 0 );
- QMap<QString, QString> tmpMap;
+ TQMap<TQString, TQString> tmpMap;
KEntryMapConstIterator aIt = aEntryMap.find(groupKey);
if (aIt == aEntryMap.end())
@@ -152,7 +152,7 @@ QMap<QString, QString> KConfig::entryMap(const QString &pGroup) const
{
// Leave the default values out && leave deleted entries out
if (!aIt.key().bDefault && !(*aIt).bDeleted)
- tmpMap.insert(QString::fromUtf8(aIt.key().mKey), QString::fromUtf8((*aIt).mValue.data(), (*aIt).mValue.length()));
+ tmpMap.insert(TQString::fromUtf8(aIt.key().mKey), TQString::fromUtf8((*aIt).mValue.data(), (*aIt).mValue.length()));
}
return tmpMap;
@@ -175,9 +175,9 @@ void KConfig::reparseConfiguration()
bFileImmutable = bReadOnly;
}
-KEntryMap KConfig::internalEntryMap(const QString &pGroup) const
+KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const
{
- QCString pGroup_utf = pGroup.utf8();
+ TQCString pGroup_utf = pGroup.utf8();
KEntry aEntry;
KEntryMapConstIterator aIt;
KEntryKey aKey(pGroup_utf, 0);
@@ -251,7 +251,7 @@ KEntry KConfig::lookupData(const KEntryKey &_key) const
}
}
-bool KConfig::internalHasGroup(const QCString &group) const
+bool KConfig::internalHasGroup(const TQCString &group) const
{
KEntryKey groupKey( group, 0);
@@ -284,15 +284,15 @@ KLockFile::Ptr KConfig::lockFile(bool bGlobal)
return aBackEnd->lockFile(bGlobal);
}
-void KConfig::checkUpdate(const QString &id, const QString &updateFile)
+void KConfig::checkUpdate(const TQString &id, const TQString &updateFile)
{
- QString oldGroup = group();
+ TQString oldGroup = group();
setGroup("$Version");
- QString cfg_id = updateFile+":"+id;
- QStringList ids = readListEntry("update_info");
+ TQString cfg_id = updateFile+":"+id;
+ TQStringList ids = readListEntry("update_info");
if (!ids.contains(cfg_id))
{
- QStringList args;
+ TQStringList args;
args << "--check" << updateFile;
KApplication::kdeinitExecWait("kconf_update", args);
reparseConfiguration();
@@ -300,22 +300,22 @@ void KConfig::checkUpdate(const QString &id, const QString &updateFile)
setGroup(oldGroup);
}
-KConfig* KConfig::copyTo(const QString &file, KConfig *config) const
+KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const
{
if (!config)
- config = new KConfig(QString::null, false, false);
+ config = new KConfig(TQString::null, false, false);
config->backEnd->changeFileName(file, "config", false);
config->setReadOnly(false);
config->bFileImmutable = false;
config->backEnd->mConfigState = ReadWrite;
- QStringList groups = groupList();
- for(QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = groupList();
+ for(TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it)
{
- QMap<QString, QString> map = entryMap(*it);
+ TQMap<TQString, TQString> map = entryMap(*it);
config->setGroup(*it);
- for (QMap<QString,QString>::Iterator it2 = map.begin();
+ for (TQMap<TQString,TQString>::Iterator it2 = map.begin();
it2 != map.end(); ++it2)
{
config->writeEntry(it2.key(), it2.data());
@@ -328,14 +328,14 @@ KConfig* KConfig::copyTo(const QString &file, KConfig *config) const
void KConfig::virtual_hook( int id, void* data )
{ KConfigBase::virtual_hook( id, data ); }
-static KStaticDeleter< QValueList<KSharedConfig*> > sd;
-QValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
+static KStaticDeleter< TQValueList<KSharedConfig*> > sd;
+TQValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
-KSharedConfig::Ptr KSharedConfig::openConfig(const QString& fileName, bool readOnly, bool useKDEGlobals )
+KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
{
if (s_list)
{
- for(QValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
+ for(TQValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
it != s_list->end(); ++it)
{
if ((*it)->backEnd->fileName() == fileName &&
@@ -347,12 +347,12 @@ KSharedConfig::Ptr KSharedConfig::openConfig(const QString& fileName, bool readO
return new KSharedConfig(fileName, readOnly, useKDEGlobals);
}
-KSharedConfig::KSharedConfig( const QString& fileName, bool readonly, bool usekdeglobals)
+KSharedConfig::KSharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
: KConfig(fileName, readonly, usekdeglobals)
{
if (!s_list)
{
- sd.setObject(s_list, new QValueList<KSharedConfig*>);
+ sd.setObject(s_list, new TQValueList<KSharedConfig*>);
}
s_list->append(this);
diff --git a/kdecore/kconfig.h b/kdecore/kconfig.h
index d8b4d7d54..4eb0ff84b 100644
--- a/kdecore/kconfig.h
+++ b/kdecore/kconfig.h
@@ -24,7 +24,7 @@
class QTimer;
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kconfigbase.h"
#include "klockfile.h"
@@ -59,7 +59,7 @@ public:
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
* @param resType the place to look in (config, data, etc) See KStandardDirs.
*/
- KConfig( const QString& fileName = QString::null,
+ KConfig( const TQString& fileName = TQString::null,
bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");
KConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
@@ -91,7 +91,7 @@ public:
* Returns a list of groups that are known.
* @return a list of of groups
*/
- virtual QStringList groupList() const;
+ virtual TQStringList groupList() const;
/**
* Returns a map (tree) of entries for all entries in a particular
@@ -104,7 +104,7 @@ public:
* @return A map of entries in the group specified, indexed by key.
* The returned map may be empty if the group is not found.
*/
- virtual QMap<QString, QString> entryMap(const QString &pGroup) const;
+ virtual TQMap<TQString, TQString> entryMap(const TQString &pGroup) const;
/**
* Clears all internal data structures and then reread
@@ -149,7 +149,7 @@ public:
* @param updateFile the file containing the update
* @since 3.1
*/
- void checkUpdate(const QString &id, const QString &updateFile);
+ void checkUpdate(const TQString &id, const TQString &updateFile);
/**
* Copies all entries from this config object to a new config
@@ -162,7 +162,7 @@ public:
* @param config optional config object to reuse
* @since 3.2
*/
- KConfig* copyTo(const QString &file, KConfig *config=0) const;
+ KConfig* copyTo(const TQString &file, KConfig *config=0) const;
/**
* Returns a lock file object for the configuration file or 0 if
@@ -186,7 +186,7 @@ protected:
* @param group The group to search for.
* @returns true if the group exists.
*/
- virtual bool internalHasGroup(const QCString &group) const;
+ virtual bool internalHasGroup(const TQCString &group) const;
/**
* @internal
@@ -198,7 +198,7 @@ protected:
* @param pGroup the group to provide a KEntryMap for.
* @return The map of the entries in the group.
*/
- virtual KEntryMap internalEntryMap(const QString &pGroup) const;
+ virtual KEntryMap internalEntryMap(const TQString &pGroup) const;
/**
* @internal
@@ -238,7 +238,7 @@ protected:
* keys which indicate the start of a group of entries.
*
* These special keys will have the .key portion of their KEntryKey
- * set to QString::null.
+ * set to TQString::null.
*/
KEntryMap aEntryMap;
@@ -272,7 +272,7 @@ private:
*/
class KDECORE_EXPORT KSharedConfig : public KConfig, public KShared
{
- friend class QValueList<KSharedConfig*>;
+ friend class TQValueList<KSharedConfig*>;
public:
typedef KSharedPtr<KSharedConfig> Ptr;
@@ -283,14 +283,14 @@ public:
* @param readOnly set the config object's read-only status
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
*/
- static KSharedConfig::Ptr openConfig(const QString& fileName, bool readOnly = false,
+ static KSharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
bool bUseKDEGlobals = true);
private:
- KSharedConfig( const QString& fileName, bool readOnly, bool useKDEGlobals );
+ KSharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
~KSharedConfig();
- static QValueList<KSharedConfig*> *s_list;
+ static TQValueList<KSharedConfig*> *s_list;
};
#endif
diff --git a/kdecore/kconfig_compiler/example/autoexample.cpp b/kdecore/kconfig_compiler/example/autoexample.cpp
index 528c12457..2c4e4d442 100644
--- a/kdecore/kconfig_compiler/example/autoexample.cpp
+++ b/kdecore/kconfig_compiler/example/autoexample.cpp
@@ -34,7 +34,7 @@
#include <kstandarddirs.h>
#include <kconfigdialog.h>
-#include <qlabel.h>
+#include <tqlabel.h>
int main( int argc, char **argv )
{
diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp
index 9c245e319..f11394495 100644
--- a/kdecore/kconfig_compiler/kconfig_compiler.cpp
+++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp
@@ -22,10 +22,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -52,25 +52,25 @@ static const KCmdLineOptions options[] =
bool globalEnums;
bool itemAccessors;
bool dpointer;
-QStringList allNames;
-QRegExp *validNameRegexp;
-QString This;
-QString Const;
+TQStringList allNames;
+TQRegExp *validNameRegexp;
+TQString This;
+TQString Const;
class CfgEntry
{
public:
struct Choice
{
- QString name;
- QString label;
- QString whatsThis;
+ TQString name;
+ TQString label;
+ TQString whatsThis;
};
- CfgEntry( const QString &group, const QString &type, const QString &key,
- const QString &name, const QString &label,
- const QString &whatsThis, const QString &code,
- const QString &defaultValue, const QValueList<Choice> &choices,
+ CfgEntry( const TQString &group, const TQString &type, const TQString &key,
+ const TQString &name, const TQString &label,
+ const TQString &whatsThis, const TQString &code,
+ const TQString &defaultValue, const TQValueList<Choice> &choices,
bool hidden )
: mGroup( group ), mType( type ), mKey( key ), mName( name ),
mLabel( label ), mWhatsThis( whatsThis ), mCode( code ),
@@ -79,53 +79,53 @@ class CfgEntry
{
}
- void setGroup( const QString &group ) { mGroup = group; }
- QString group() const { return mGroup; }
+ void setGroup( const TQString &group ) { mGroup = group; }
+ TQString group() const { return mGroup; }
- void setType( const QString &type ) { mType = type; }
- QString type() const { return mType; }
+ void setType( const TQString &type ) { mType = type; }
+ TQString type() const { return mType; }
- void setKey( const QString &key ) { mKey = key; }
- QString key() const { return mKey; }
+ void setKey( const TQString &key ) { mKey = key; }
+ TQString key() const { return mKey; }
- void setName( const QString &name ) { mName = name; }
- QString name() const { return mName; }
+ void setName( const TQString &name ) { mName = name; }
+ TQString name() const { return mName; }
- void setLabel( const QString &label ) { mLabel = label; }
- QString label() const { return mLabel; }
+ void setLabel( const TQString &label ) { mLabel = label; }
+ TQString label() const { return mLabel; }
- void setWhatsThis( const QString &whatsThis ) { mWhatsThis = whatsThis; }
- QString whatsThis() const { return mWhatsThis; }
+ void setWhatsThis( const TQString &whatsThis ) { mWhatsThis = whatsThis; }
+ TQString whatsThis() const { return mWhatsThis; }
- void setDefaultValue( const QString &d ) { mDefaultValue = d; }
- QString defaultValue() const { return mDefaultValue; }
+ void setDefaultValue( const TQString &d ) { mDefaultValue = d; }
+ TQString defaultValue() const { return mDefaultValue; }
- void setCode( const QString &d ) { mCode = d; }
- QString code() const { return mCode; }
+ void setCode( const TQString &d ) { mCode = d; }
+ TQString code() const { return mCode; }
- void setMinValue( const QString &d ) { mMin = d; }
- QString minValue() const { return mMin; }
+ void setMinValue( const TQString &d ) { mMin = d; }
+ TQString minValue() const { return mMin; }
- void setMaxValue( const QString &d ) { mMax = d; }
- QString maxValue() const { return mMax; }
+ void setMaxValue( const TQString &d ) { mMax = d; }
+ TQString maxValue() const { return mMax; }
- void setParam( const QString &d ) { mParam = d; }
- QString param() const { return mParam; }
+ void setParam( const TQString &d ) { mParam = d; }
+ TQString param() const { return mParam; }
- void setParamName( const QString &d ) { mParamName = d; }
- QString paramName() const { return mParamName; }
+ void setParamName( const TQString &d ) { mParamName = d; }
+ TQString paramName() const { return mParamName; }
- void setParamType( const QString &d ) { mParamType = d; }
- QString paramType() const { return mParamType; }
+ void setParamType( const TQString &d ) { mParamType = d; }
+ TQString paramType() const { return mParamType; }
- void setChoices( const QValueList<Choice> &d ) { mChoices = d; }
- QValueList<Choice> choices() const { return mChoices; }
+ void setChoices( const TQValueList<Choice> &d ) { mChoices = d; }
+ TQValueList<Choice> choices() const { return mChoices; }
- void setParamValues( const QStringList &d ) { mParamValues = d; }
- QStringList paramValues() const { return mParamValues; }
+ void setParamValues( const TQStringList &d ) { mParamValues = d; }
+ TQStringList paramValues() const { return mParamValues; }
- void setParamDefaultValues( const QStringList &d ) { mParamDefaultValues = d; }
- QString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
+ void setParamDefaultValues( const TQStringList &d ) { mParamDefaultValues = d; }
+ TQString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
void setParamMax( int d ) { mParamMax = d; }
int paramMax() const { return mParamMax; }
@@ -158,38 +158,38 @@ class CfgEntry
}
private:
- QString mGroup;
- QString mType;
- QString mKey;
- QString mName;
- QString mLabel;
- QString mWhatsThis;
- QString mCode;
- QString mDefaultValue;
- QString mParam;
- QString mParamName;
- QString mParamType;
- QValueList<Choice> mChoices;
- QStringList mParamValues;
- QStringList mParamDefaultValues;
+ TQString mGroup;
+ TQString mType;
+ TQString mKey;
+ TQString mName;
+ TQString mLabel;
+ TQString mWhatsThis;
+ TQString mCode;
+ TQString mDefaultValue;
+ TQString mParam;
+ TQString mParamName;
+ TQString mParamType;
+ TQValueList<Choice> mChoices;
+ TQStringList mParamValues;
+ TQStringList mParamDefaultValues;
int mParamMax;
bool mHidden;
- QString mMin;
- QString mMax;
+ TQString mMin;
+ TQString mMax;
};
class Param {
public:
- QString name;
- QString type;
+ TQString name;
+ TQString type;
};
// returns the name of an member variable
// use itemPath to know the full path
// like using d-> in case of dpointer
-static QString varName(const QString &n)
+static TQString varName(const TQString &n)
{
- QString result;
+ TQString result;
if ( !dpointer ) {
result = "m"+n;
result[1] = result[1].upper();
@@ -201,9 +201,9 @@ static QString varName(const QString &n)
return result;
}
-static QString varPath(const QString &n)
+static TQString varPath(const TQString &n)
{
- QString result;
+ TQString result;
if ( dpointer ) {
result = "d->"+varName(n);
}
@@ -213,16 +213,16 @@ static QString varPath(const QString &n)
return result;
}
-static QString enumName(const QString &n)
+static TQString enumName(const TQString &n)
{
- QString result = "Enum"+n;
+ TQString result = "Enum"+n;
result[4] = result[4].upper();
return result;
}
-static QString setFunction(const QString &n, const QString &className = QString::null)
+static TQString setFunction(const TQString &n, const TQString &className = TQString::null)
{
- QString result = "set"+n;
+ TQString result = "set"+n;
result[3] = result[3].upper();
if ( !className.isEmpty() )
@@ -231,9 +231,9 @@ static QString setFunction(const QString &n, const QString &className = QString:
}
-static QString getFunction(const QString &n, const QString &className = QString::null)
+static TQString getFunction(const TQString &n, const TQString &className = TQString::null)
{
- QString result = n;
+ TQString result = n;
result[0] = result[0].lower();
if ( !className.isEmpty() )
@@ -242,15 +242,15 @@ static QString getFunction(const QString &n, const QString &className = QString:
}
-static void addQuotes( QString &s )
+static void addQuotes( TQString &s )
{
if ( s.left( 1 ) != "\"" ) s.prepend( "\"" );
if ( s.right( 1 ) != "\"" ) s.append( "\"" );
}
-static QString quoteString( const QString &s )
+static TQString quoteString( const TQString &s )
{
- QString r = s;
+ TQString r = s;
r.replace( "\\", "\\\\" );
r.replace( "\"", "\\\"" );
r.replace( "\r", "" );
@@ -258,22 +258,22 @@ static QString quoteString( const QString &s )
return "\"" + r + "\"";
}
-static QString literalString( const QString &s )
+static TQString literalString( const TQString &s )
{
bool isAscii = true;
for(int i = s.length(); i--;)
if (s[i].unicode() > 127) isAscii = false;
if (isAscii)
- return "QString::fromLatin1( " + quoteString(s) + " )";
+ return "TQString::fromLatin1( " + quoteString(s) + " )";
else
- return "QString::fromUtf8( " + quoteString(s) + " )";
+ return "TQString::fromUtf8( " + quoteString(s) + " )";
}
-static QString dumpNode(const QDomNode &node)
+static TQString dumpNode(const TQDomNode &node)
{
- QString msg;
- QTextStream s(&msg, IO_WriteOnly );
+ TQString msg;
+ TQTextStream s(&msg, IO_WriteOnly );
node.save(s, 0);
msg = msg.simplifyWhiteSpace();
@@ -282,7 +282,7 @@ static QString dumpNode(const QDomNode &node)
return msg;
}
-static QString filenameOnly(QString path)
+static TQString filenameOnly(TQString path)
{
int i = path.findRev('/');
if (i >= 0)
@@ -290,10 +290,10 @@ static QString filenameOnly(QString path)
return path;
}
-static void preProcessDefault( QString &defaultValue, const QString &name,
- const QString &type,
- const QValueList<CfgEntry::Choice> &choices,
- QString &code )
+static void preProcessDefault( TQString &defaultValue, const TQString &name,
+ const TQString &type,
+ const TQValueList<CfgEntry::Choice> &choices,
+ TQString &code )
{
if ( type == "String" && !defaultValue.isEmpty() ) {
defaultValue = literalString(defaultValue);
@@ -302,33 +302,33 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
defaultValue = literalString( defaultValue );
} else if ( (type == "StringList" || type == "PathList") && !defaultValue.isEmpty() ) {
- QTextStream cpp( &code, IO_WriteOnly | IO_Append );
+ TQTextStream cpp( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
cpp << endl;
- cpp << " QStringList default" << name << ";" << endl;
- QStringList defaults = QStringList::split( ",", defaultValue );
- QStringList::ConstIterator it;
+ cpp << " TQStringList default" << name << ";" << endl;
+ TQStringList defaults = TQStringList::split( ",", defaultValue );
+ TQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
- cpp << " default" << name << ".append( QString::fromUtf8( \"" << *it << "\" ) );"
+ cpp << " default" << name << ".append( TQString::fromUtf8( \"" << *it << "\" ) );"
<< endl;
}
defaultValue = "default" + name;
} else if ( type == "Color" && !defaultValue.isEmpty() ) {
- QRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
+ TQRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
if (colorRe.exactMatch(defaultValue))
{
- defaultValue = "QColor( " + defaultValue + " )";
+ defaultValue = "TQColor( " + defaultValue + " )";
}
else
{
- defaultValue = "QColor( \"" + defaultValue + "\" )";
+ defaultValue = "TQColor( \"" + defaultValue + "\" )";
}
} else if ( type == "Enum" ) {
if ( !globalEnums ) {
- QValueList<CfgEntry::Choice>::ConstIterator it;
+ TQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
if ( (*it).name == defaultValue ) {
defaultValue.prepend( enumName(name) + "::");
@@ -338,13 +338,13 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
}
} else if ( type == "IntList" ) {
- QTextStream cpp( &code, IO_WriteOnly | IO_Append );
+ TQTextStream cpp( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
cpp << endl;
- cpp << " QValueList<int> default" << name << ";" << endl;
- QStringList defaults = QStringList::split( ",", defaultValue );
- QStringList::ConstIterator it;
+ cpp << " TQValueList<int> default" << name << ";" << endl;
+ TQStringList defaults = TQStringList::split( ",", defaultValue );
+ TQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
cpp << " default" << name << ".append( " << *it << " );"
<< endl;
@@ -354,31 +354,31 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
}
-CfgEntry *parseEntry( const QString &group, const QDomElement &element )
+CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
{
bool defaultCode = false;
- QString type = element.attribute( "type" );
- QString name = element.attribute( "name" );
- QString key = element.attribute( "key" );
- QString hidden = element.attribute( "hidden" );
- QString label;
- QString whatsThis;
- QString defaultValue;
- QString code;
- QString param;
- QString paramName;
- QString paramType;
- QValueList<CfgEntry::Choice> choices;
- QStringList paramValues;
- QStringList paramDefaultValues;
- QString minValue;
- QString maxValue;
+ TQString type = element.attribute( "type" );
+ TQString name = element.attribute( "name" );
+ TQString key = element.attribute( "key" );
+ TQString hidden = element.attribute( "hidden" );
+ TQString label;
+ TQString whatsThis;
+ TQString defaultValue;
+ TQString code;
+ TQString param;
+ TQString paramName;
+ TQString paramType;
+ TQValueList<CfgEntry::Choice> choices;
+ TQStringList paramValues;
+ TQStringList paramDefaultValues;
+ TQString minValue;
+ TQString maxValue;
int paramMax = 0;
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
if ( tag == "label" ) label = e.text();
else if ( tag == "whatsthis" ) whatsThis = e.text();
else if ( tag == "min" ) minValue = e.text();
@@ -408,14 +408,14 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
}
else if (paramType == "Enum")
{
- QDomNode n2;
+ TQDomNode n2;
for ( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if (e2.tagName() == "values")
{
- QDomNode n3;
+ TQDomNode n3;
for ( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if (e3.tagName() == "value")
{
paramValues.append( e3.text() );
@@ -447,18 +447,18 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
}
}
else if ( tag == "choices" ) {
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "choice" ) {
- QDomNode n3;
+ TQDomNode n3;
CfgEntry::Choice choice;
choice.name = e2.attribute( "name" );
if ( choice.name.isEmpty() ) {
kdError() << "Tag <choice> requires attribute 'name'." << endl;
}
for( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if ( e3.tagName() == "label" ) choice.label = e3.text();
if ( e3.tagName() == "whatsthis" ) choice.whatsThis = e3.text();
}
@@ -480,7 +480,7 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
if ( nameIsEmpty ) {
name = key;
- name.replace( " ", QString::null );
+ name.replace( " ", TQString::null );
} else if ( name.contains( ' ' ) ) {
kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl;
name.remove( ' ' );
@@ -513,20 +513,20 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
{
// Adjust name
paramName = name;
- name.replace("$("+param+")", QString::null);
+ name.replace("$("+param+")", TQString::null);
// Lookup defaults for indexed entries
for(int i = 0; i <= paramMax; i++)
{
- paramDefaultValues.append(QString::null);
+ paramDefaultValues.append(TQString::null);
}
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
if ( tag == "default" )
{
- QString index = e.attribute("param");
+ TQString index = e.attribute("param");
if (index.isEmpty())
continue;
@@ -548,7 +548,7 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
return 0;
}
- QString tmpDefaultValue = e.text();
+ TQString tmpDefaultValue = e.text();
if (e.attribute( "code" ) != "true")
preProcessDefault(tmpDefaultValue, name, type, choices, code);
@@ -605,93 +605,93 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
/**
Return parameter declaration for given type.
*/
-QString param( const QString &type )
+TQString param( const TQString &type )
{
- if ( type == "String" ) return "const QString &";
- else if ( type == "StringList" ) return "const QStringList &";
- else if ( type == "Font" ) return "const QFont &";
- else if ( type == "Rect" ) return "const QRect &";
- else if ( type == "Size" ) return "const QSize &";
- else if ( type == "Color" ) return "const QColor &";
- else if ( type == "Point" ) return "const QPoint &";
+ if ( type == "String" ) return "const TQString &";
+ else if ( type == "StringList" ) return "const TQStringList &";
+ else if ( type == "Font" ) return "const TQFont &";
+ else if ( type == "Rect" ) return "const TQRect &";
+ else if ( type == "Size" ) return "const TQSize &";
+ else if ( type == "Color" ) return "const TQColor &";
+ else if ( type == "Point" ) return "const TQPoint &";
else if ( type == "Int" ) return "int";
else if ( type == "UInt" ) return "uint";
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
- else if ( type == "DateTime" ) return "const QDateTime &";
+ else if ( type == "DateTime" ) return "const TQDateTime &";
else if ( type == "Int64" ) return "Q_INT64";
else if ( type == "UInt64" ) return "Q_UINT64";
- else if ( type == "IntList" ) return "const QValueList<int> &";
+ else if ( type == "IntList" ) return "const TQValueList<int> &";
else if ( type == "Enum" ) return "int";
- else if ( type == "Path" ) return "const QString &";
- else if ( type == "PathList" ) return "const QStringList &";
- else if ( type == "Password" ) return "const QString &";
+ else if ( type == "Path" ) return "const TQString &";
+ else if ( type == "PathList" ) return "const TQStringList &";
+ else if ( type == "Password" ) return "const TQString &";
else {
kdError() <<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
/**
Actual C++ storage type for given type.
*/
-QString cppType( const QString &type )
+TQString cppType( const TQString &type )
{
- if ( type == "String" ) return "QString";
- else if ( type == "StringList" ) return "QStringList";
- else if ( type == "Font" ) return "QFont";
- else if ( type == "Rect" ) return "QRect";
- else if ( type == "Size" ) return "QSize";
- else if ( type == "Color" ) return "QColor";
- else if ( type == "Point" ) return "QPoint";
+ if ( type == "String" ) return "TQString";
+ else if ( type == "StringList" ) return "TQStringList";
+ else if ( type == "Font" ) return "TQFont";
+ else if ( type == "Rect" ) return "TQRect";
+ else if ( type == "Size" ) return "TQSize";
+ else if ( type == "Color" ) return "TQColor";
+ else if ( type == "Point" ) return "TQPoint";
else if ( type == "Int" ) return "int";
else if ( type == "UInt" ) return "uint";
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
- else if ( type == "DateTime" ) return "QDateTime";
+ else if ( type == "DateTime" ) return "TQDateTime";
else if ( type == "Int64" ) return "Q_INT64";
else if ( type == "UInt64" ) return "Q_UINT64";
- else if ( type == "IntList" ) return "QValueList<int>";
+ else if ( type == "IntList" ) return "TQValueList<int>";
else if ( type == "Enum" ) return "int";
- else if ( type == "Path" ) return "QString";
- else if ( type == "PathList" ) return "QStringList";
- else if ( type == "Password" ) return "QString";
+ else if ( type == "Path" ) return "TQString";
+ else if ( type == "PathList" ) return "TQStringList";
+ else if ( type == "Password" ) return "TQString";
else {
kdError()<<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
-QString defaultValue( const QString &type )
+TQString defaultValue( const TQString &type )
{
if ( type == "String" ) return "\"\""; // Use empty string, not null string!
- else if ( type == "StringList" ) return "QStringList()";
+ else if ( type == "StringList" ) return "TQStringList()";
else if ( type == "Font" ) return "KGlobalSettings::generalFont()";
- else if ( type == "Rect" ) return "QRect()";
- else if ( type == "Size" ) return "QSize()";
- else if ( type == "Color" ) return "QColor(128, 128, 128)";
- else if ( type == "Point" ) return "QPoint()";
+ else if ( type == "Rect" ) return "TQRect()";
+ else if ( type == "Size" ) return "TQSize()";
+ else if ( type == "Color" ) return "TQColor(128, 128, 128)";
+ else if ( type == "Point" ) return "TQPoint()";
else if ( type == "Int" ) return "0";
else if ( type == "UInt" ) return "0";
else if ( type == "Bool" ) return "false";
else if ( type == "Double" ) return "0.0";
- else if ( type == "DateTime" ) return "QDateTime()";
+ else if ( type == "DateTime" ) return "TQDateTime()";
else if ( type == "Int64" ) return "0";
else if ( type == "UInt64" ) return "0";
- else if ( type == "IntList" ) return "QValueList<int>()";
+ else if ( type == "IntList" ) return "TQValueList<int>()";
else if ( type == "Enum" ) return "0";
else if ( type == "Path" ) return "\"\""; // Use empty string, not null string!
- else if ( type == "PathList" ) return "QStringList()";
+ else if ( type == "PathList" ) return "TQStringList()";
else if ( type == "Password" ) return "\"\""; // Use empty string, not null string!
else {
kdWarning()<<"Error, kconfig_compiler doesn't support the \""<< type <<"\" type!"<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
-QString itemType( const QString &type )
+TQString itemType( const TQString &type )
{
- QString t;
+ TQString t;
t = type;
t.replace( 0, 1, t.left( 1 ).upper() );
@@ -699,25 +699,25 @@ QString itemType( const QString &type )
return t;
}
-static QString itemDeclaration(const CfgEntry *e)
+static TQString itemDeclaration(const CfgEntry *e)
{
if (itemAccessors)
- return QString::null;
+ return TQString::null;
- QString fCap = e->name();
+ TQString fCap = e->name();
fCap[0] = fCap[0].upper();
return " KConfigSkeleton::Item"+itemType( e->type() ) +
" *item" + fCap +
- ( (!e->param().isEmpty())?(QString("[%1]").arg(e->paramMax()+1)) : QString::null) +
+ ( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString::null) +
";\n";
}
// returns the name of an item variable
// use itemPath to know the full path
// like using d-> in case of dpointer
-static QString itemVar(const CfgEntry *e)
+static TQString itemVar(const CfgEntry *e)
{
- QString result;
+ TQString result;
if (itemAccessors)
{
if ( !dpointer )
@@ -739,9 +739,9 @@ static QString itemVar(const CfgEntry *e)
return result;
}
-static QString itemPath(const CfgEntry *e)
+static TQString itemPath(const CfgEntry *e)
{
- QString result;
+ TQString result;
if ( dpointer ) {
result = "d->"+itemVar(e);
}
@@ -751,10 +751,10 @@ static QString itemPath(const CfgEntry *e)
return result;
}
-QString newItem( const QString &type, const QString &name, const QString &key,
- const QString &defaultValue, const QString &param = QString::null)
+TQString newItem( const TQString &type, const TQString &name, const TQString &key,
+ const TQString &defaultValue, const TQString &param = TQString::null)
{
- QString t = "new KConfigSkeleton::Item" + itemType( type ) +
+ TQString t = "new KConfigSkeleton::Item" + itemType( type ) +
"( currentGroup(), " + key + ", " + varPath( name ) + param;
if ( type == "Enum" ) t += ", values" + name;
if ( !defaultValue.isEmpty() ) {
@@ -767,20 +767,20 @@ QString newItem( const QString &type, const QString &name, const QString &key,
return t;
}
-QString paramString(const QString &s, const CfgEntry *e, int i)
+TQString paramString(const TQString &s, const CfgEntry *e, int i)
{
- QString result = s;
- QString needle = "$("+e->param()+")";
+ TQString result = s;
+ TQString needle = "$("+e->param()+")";
if (result.contains(needle))
{
- QString tmp;
+ TQString tmp;
if (e->paramType() == "Enum")
{
tmp = e->paramValues()[i];
}
else
{
- tmp = QString::number(i);
+ tmp = TQString::number(i);
}
result.replace(needle, tmp);
@@ -788,32 +788,32 @@ QString paramString(const QString &s, const CfgEntry *e, int i)
return result;
}
-QString paramString(const QString &group, const QValueList<Param> &parameters)
+TQString paramString(const TQString &group, const TQValueList<Param> &parameters)
{
- QString paramString = group;
- QString arguments;
+ TQString paramString = group;
+ TQString arguments;
int i = 1;
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (paramString.contains("$("+(*it).name+")"))
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("%%%d", i++);
paramString.replace("$("+(*it).name+")", tmp);
arguments += ".arg( mParam"+(*it).name+" )";
}
}
if (arguments.isEmpty())
- return "QString::fromLatin1( \""+group+"\" )";
+ return "TQString::fromLatin1( \""+group+"\" )";
- return "QString::fromLatin1( \""+paramString+"\" )"+arguments;
+ return "TQString::fromLatin1( \""+paramString+"\" )"+arguments;
}
/* int i is the value of the parameter */
-QString userTextsFunctions( CfgEntry *e, QString itemVarStr=QString::null, QString i=QString::null )
+TQString userTextsFunctions( CfgEntry *e, TQString itemVarStr=TQString::null, TQString i=TQString::null )
{
- QString txt;
+ TQString txt;
if (itemVarStr.isNull()) itemVarStr=itemPath(e);
if ( !e->label().isEmpty() ) {
txt += " " + itemVarStr + "->setLabel( i18n(";
@@ -837,12 +837,12 @@ QString userTextsFunctions( CfgEntry *e, QString itemVarStr=QString::null, QStri
// returns the member accesor implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString memberAccessorBody( CfgEntry *e )
+TQString memberAccessorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QString n = e->name();
- QString t = e->type();
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQString n = e->name();
+ TQString t = e->type();
out << "return " << This << varPath(n);
if (!e->param().isEmpty()) out << "[i]";
@@ -854,12 +854,12 @@ QString memberAccessorBody( CfgEntry *e )
// returns the member mutator implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString memberMutatorBody( CfgEntry *e )
+TQString memberMutatorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QString n = e->name();
- QString t = e->type();
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQString n = e->name();
+ TQString t = e->type();
if (!e->minValue().isEmpty())
{
@@ -883,12 +883,12 @@ QString memberMutatorBody( CfgEntry *e )
out << "}" << endl << endl;
}
- out << "if (!" << This << "isImmutable( QString::fromLatin1( \"";
+ out << "if (!" << This << "isImmutable( TQString::fromLatin1( \"";
if (!e->param().isEmpty())
{
out << e->paramName().replace("$("+e->param()+")", "%1") << "\" ).arg( ";
if ( e->paramType() == "Enum" ) {
- out << "QString::fromLatin1( ";
+ out << "TQString::fromLatin1( ";
if (globalEnums)
out << enumName(e->param()) << "ToString[i]";
@@ -919,10 +919,10 @@ QString memberMutatorBody( CfgEntry *e )
// returns the item accesor implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString itemAccessorBody( CfgEntry *e )
+TQString itemAccessorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
out << "return " << itemPath(e);
if (!e->param().isEmpty()) out << "[i]";
@@ -932,12 +932,12 @@ QString itemAccessorBody( CfgEntry *e )
}
//indents text adding X spaces per line
-QString indent(QString text, int spaces)
+TQString indent(TQString text, int spaces)
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QTextStream in(&text, IO_ReadOnly);
- QString currLine;
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQTextStream in(&text, IO_ReadOnly);
+ TQString currLine;
while ( !in.atEnd() )
{
currLine = in.readLine();
@@ -978,37 +978,37 @@ int main( int argc, char **argv )
return 1;
}
- validNameRegexp = new QRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
+ validNameRegexp = new TQRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
- QString baseDir = QFile::decodeName(args->getOption("directory"));
+ TQString baseDir = TQFile::decodeName(args->getOption("directory"));
if (!baseDir.endsWith("/"))
baseDir.append("/");
- QString inputFilename = args->url( 0 ).path();
- QString codegenFilename = args->url( 1 ).path();
+ TQString inputFilename = args->url( 0 ).path();
+ TQString codegenFilename = args->url( 1 ).path();
if (!codegenFilename.endsWith(".kcfgc"))
{
kdError() << "Codegen options file must have extension .kcfgc" << endl;
return 1;
}
- QString baseName = args->url( 1 ).fileName();
+ TQString baseName = args->url( 1 ).fileName();
baseName = baseName.left(baseName.length() - 6);
KSimpleConfig codegenConfig( codegenFilename, true );
- QString nameSpace = codegenConfig.readEntry("NameSpace");
- QString className = codegenConfig.readEntry("ClassName");
- QString inherits = codegenConfig.readEntry("Inherits");
- QString visibility = codegenConfig.readEntry("Visibility");
+ TQString nameSpace = codegenConfig.readEntry("NameSpace");
+ TQString className = codegenConfig.readEntry("ClassName");
+ TQString inherits = codegenConfig.readEntry("Inherits");
+ TQString visibility = codegenConfig.readEntry("Visibility");
if (!visibility.isEmpty()) visibility+=" ";
bool singleton = codegenConfig.readBoolEntry("Singleton", false);
bool staticAccessors = singleton;
//bool useDPointer = codegenConfig.readBoolEntry("DPointer", false);
bool customAddons = codegenConfig.readBoolEntry("CustomAdditions");
- QString memberVariables = codegenConfig.readEntry("MemberVariables");
- QStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
- QStringList mutators = codegenConfig.readListEntry("Mutators");
+ TQString memberVariables = codegenConfig.readEntry("MemberVariables");
+ TQStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
+ TQStringList mutators = codegenConfig.readListEntry("Mutators");
bool allMutators = false;
if ((mutators.count() == 1) && (mutators[0].lower() == "true"))
allMutators = true;
@@ -1019,10 +1019,10 @@ int main( int argc, char **argv )
dpointer = (memberVariables == "dpointer");
- QFile input( inputFilename );
+ TQFile input( inputFilename );
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &input, &errorMsg, &errorRow, &errorCol ) ) {
@@ -1031,38 +1031,38 @@ int main( int argc, char **argv )
return 1;
}
- QDomElement cfgElement = doc.documentElement();
+ TQDomElement cfgElement = doc.documentElement();
if ( cfgElement.isNull() ) {
kdError() << "No document in kcfg file" << endl;
return 1;
}
- QString cfgFileName;
+ TQString cfgFileName;
bool cfgFileNameArg = false;
- QValueList<Param> parameters;
- QStringList includes;
+ TQValueList<Param> parameters;
+ TQStringList includes;
- QPtrList<CfgEntry> entries;
+ TQPtrList<CfgEntry> entries;
entries.setAutoDelete( true );
- QDomNode n;
+ TQDomNode n;
for ( n = cfgElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQString tag = e.tagName();
if ( tag == "include" ) {
- QString includeFile = e.text();
+ TQString includeFile = e.text();
if (!includeFile.isEmpty())
includes.append(includeFile);
} else if ( tag == "kcfgfile" ) {
cfgFileName = e.attribute( "name" );
cfgFileNameArg = e.attribute( "arg" ).lower() == "true";
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "parameter" ) {
Param p;
p.name = e2.attribute( "name" );
@@ -1074,14 +1074,14 @@ int main( int argc, char **argv )
}
} else if ( tag == "group" ) {
- QString group = e.attribute( "name" );
+ TQString group = e.attribute( "name" );
if ( group.isEmpty() ) {
kdError() << "Group without name" << endl;
return 1;
}
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() != "entry" ) continue;
CfgEntry *entry = parseEntry( group, e2 );
if ( entry ) entries.append( entry );
@@ -1122,17 +1122,17 @@ int main( int argc, char **argv )
}
#endif
- QString headerFileName = baseName + ".h";
- QString implementationFileName = baseName + ".cpp";
- QString cppPreamble; // code to be inserted at the beginnin of the cpp file, e.g. initialization of static values
+ TQString headerFileName = baseName + ".h";
+ TQString implementationFileName = baseName + ".cpp";
+ TQString cppPreamble; // code to be inserted at the beginnin of the cpp file, e.g. initialization of static values
- QFile header( baseDir + headerFileName );
+ TQFile header( baseDir + headerFileName );
if ( !header.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << headerFileName << "' for writing." << endl;
return 1;
}
- QTextStream h( &header );
+ TQTextStream h( &header );
h << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
h << "// All changes you do to this file will be lost." << endl;
@@ -1143,7 +1143,7 @@ int main( int argc, char **argv )
<< className.upper() << "_H" << endl << endl;
// Includes
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = headerIncludes.begin(); it != headerIncludes.end(); ++it ) {
h << "#include <" << *it << ">" << endl;
}
@@ -1177,10 +1177,10 @@ int main( int argc, char **argv )
// enums
CfgEntry *e;
for( e = entries.first(); e; e = entries.next() ) {
- QValueList<CfgEntry::Choice> choices = e->choices();
+ TQValueList<CfgEntry::Choice> choices = e->choices();
if ( !choices.isEmpty() ) {
- QStringList values;
- QValueList<CfgEntry::Choice>::ConstIterator itChoice;
+ TQStringList values;
+ TQValueList<CfgEntry::Choice>::ConstIterator itChoice;
for( itChoice = choices.begin(); itChoice != choices.end(); ++itChoice ) {
values.append( (*itChoice).name );
}
@@ -1194,7 +1194,7 @@ int main( int argc, char **argv )
h << " };" << endl;
}
}
- QStringList values = e->paramValues();
+ TQStringList values = e->paramValues();
if ( !values.isEmpty() ) {
if ( globalEnums ) {
h << " enum { " << values.join( ", " ) << " };" << endl;
@@ -1221,7 +1221,7 @@ int main( int argc, char **argv )
h << " " << className << "(";
if (cfgFileNameArg)
h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = KGlobal::sharedConfig()" : ", ");
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (it != parameters.begin())
@@ -1245,8 +1245,8 @@ int main( int argc, char **argv )
Const = " const";
for( e = entries.first(); e; e = entries.next() ) {
- QString n = e->name();
- QString t = e->type();
+ TQString n = e->name();
+ TQString t = e->type();
// Manipulator
if (allMutators || mutators.contains(n))
@@ -1351,7 +1351,7 @@ int main( int argc, char **argv )
}
// Class Parameters
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
h << " " << cppType((*it).type) << " mParam" << (*it).name << ";" << endl;
@@ -1359,7 +1359,7 @@ int main( int argc, char **argv )
if ( memberVariables != "dpointer" )
{
- QString group;
+ TQString group;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
group = e->group();
@@ -1369,7 +1369,7 @@ int main( int argc, char **argv )
h << " " << cppType(e->type()) << " " << varName(e->name());
if (!e->param().isEmpty())
{
- h << QString("[%1]").arg(e->paramMax()+1);
+ h << TQString("[%1]").arg(e->paramMax()+1);
}
h << ";" << endl;
}
@@ -1378,7 +1378,7 @@ int main( int argc, char **argv )
if ( itemAccessors ) {
for( e = entries.first(); e; e = entries.next() ) {
h << " Item" << itemType( e->type() ) << " *" << itemVar( e );
- if (!e->param().isEmpty() ) h << QString("[%1]").arg( e->paramMax()+1 );
+ if (!e->param().isEmpty() ) h << TQString("[%1]").arg( e->paramMax()+1 );
h << ";" << endl;
}
}
@@ -1406,14 +1406,14 @@ int main( int argc, char **argv )
header.close();
- QFile implementation( baseDir + implementationFileName );
+ TQFile implementation( baseDir + implementationFileName );
if ( !implementation.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << implementationFileName << "' for writing."
<< endl;
return 1;
}
- QTextStream cpp( &implementation );
+ TQTextStream cpp( &implementation );
cpp << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
@@ -1432,7 +1432,7 @@ int main( int argc, char **argv )
if ( !nameSpace.isEmpty() )
cpp << "using namespace " << nameSpace << ";" << endl << endl;
- QString group;
+ TQString group;
// private class implementation
if ( dpointer )
@@ -1449,14 +1449,14 @@ int main( int argc, char **argv )
cpp << " " << cppType(e->type()) << " " << varName(e->name());
if (!e->param().isEmpty())
{
- cpp << QString("[%1]").arg(e->paramMax()+1);
+ cpp << TQString("[%1]").arg(e->paramMax()+1);
}
cpp << ";" << endl;
}
cpp << endl << " // items" << endl;
for( e = entries.first(); e; e = entries.next() ) {
cpp << " KConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e );
- if (!e->param().isEmpty() ) cpp << QString("[%1]").arg( e->paramMax()+1 );
+ if (!e->param().isEmpty() ) cpp << TQString("[%1]").arg( e->paramMax()+1 );
cpp << ";" << endl;
}
@@ -1508,7 +1508,7 @@ int main( int argc, char **argv )
cpp << (parameters.isEmpty() ? " " : ", ");
}
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (it != parameters.begin())
@@ -1518,13 +1518,13 @@ int main( int argc, char **argv )
cpp << " )" << endl;
cpp << " : " << inherits << "(";
- if ( !cfgFileName.isEmpty() ) cpp << " QString::fromLatin1( \"" << cfgFileName << "\" ";
+ if ( !cfgFileName.isEmpty() ) cpp << " TQString::fromLatin1( \"" << cfgFileName << "\" ";
if ( cfgFileNameArg ) cpp << " config ";
if ( !cfgFileName.isEmpty() ) cpp << ") ";
cpp << ")" << endl;
// Store parameters
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
cpp << " , mParam" << (*it).name << "(" << (*it).name << ")" << endl;
@@ -1539,7 +1539,7 @@ int main( int argc, char **argv )
if ( singleton )
cpp << " mSelf = this;" << endl;
- group = QString::null;
+ group = TQString::null;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
if ( !group.isEmpty() ) cpp << endl;
@@ -1547,20 +1547,20 @@ int main( int argc, char **argv )
cpp << " setCurrentGroup( " << paramString(group, parameters) << " );" << endl << endl;
}
- QString key = paramString(e->key(), parameters);
+ TQString key = paramString(e->key(), parameters);
if ( !e->code().isEmpty())
{
cpp << e->code() << endl;
}
if ( e->type() == "Enum" ) {
- cpp << " QValueList<KConfigSkeleton::ItemEnum::Choice> values"
+ cpp << " TQValueList<KConfigSkeleton::ItemEnum::Choice> values"
<< e->name() << ";" << endl;
- QValueList<CfgEntry::Choice> choices = e->choices();
- QValueList<CfgEntry::Choice>::ConstIterator it;
+ TQValueList<CfgEntry::Choice> choices = e->choices();
+ TQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
cpp << " {" << endl;
cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl;
- cpp << " choice.name = QString::fromLatin1( \"" << (*it).name << "\" );" << endl;
+ cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl;
if ( setUserTexts ) {
if ( !(*it).label.isEmpty() )
cpp << " choice.label = i18n(" << quoteString((*it).label) << ");" << endl;
@@ -1590,9 +1590,9 @@ int main( int argc, char **argv )
cpp << userTextsFunctions( e );
cpp << " addItem( " << itemPath(e);
- QString quotedName = e->name();
+ TQString quotedName = e->name();
addQuotes( quotedName );
- if ( quotedName != key ) cpp << ", QString::fromLatin1( \"" << e->name() << "\" )";
+ if ( quotedName != key ) cpp << ", TQString::fromLatin1( \"" << e->name() << "\" )";
cpp << " );" << endl;
}
else
@@ -1600,8 +1600,8 @@ int main( int argc, char **argv )
// Indexed
for(int i = 0; i <= e->paramMax(); i++)
{
- QString defaultStr;
- QString itemVarStr(itemPath(e)+QString("[%1]").arg(i));
+ TQString defaultStr;
+ TQString itemVarStr(itemPath(e)+TQString("[%1]").arg(i));
if ( !e->paramDefaultValue(i).isEmpty() )
defaultStr = e->paramDefaultValue(i);
@@ -1611,7 +1611,7 @@ int main( int argc, char **argv )
defaultStr = defaultValue( e->type() );
cpp << " " << itemVarStr << " = "
- << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, QString("[%1]").arg(i) )
+ << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, TQString("[%1]").arg(i) )
<< endl;
if ( setUserTexts )
@@ -1621,7 +1621,7 @@ int main( int argc, char **argv )
// param name. The check for isImmutable in the set* functions doesn't have the param
// name available, just the corresponding enum value (int), so we need to store the
// param names in a separate static list!.
- cpp << " addItem( " << itemVarStr << ", QString::fromLatin1( \"";
+ cpp << " addItem( " << itemVarStr << ", TQString::fromLatin1( \"";
if ( e->paramType()=="Enum" )
cpp << e->paramName().replace( "$("+e->param()+")", "%1").arg(e->paramValues()[i] );
else
@@ -1638,8 +1638,8 @@ int main( int argc, char **argv )
// setters and getters go in Cpp if in dpointer mode
for( e = entries.first(); e; e = entries.next() )
{
- QString n = e->name();
- QString t = e->type();
+ TQString n = e->name();
+ TQString t = e->type();
// Manipulator
if (allMutators || mutators.contains(n))
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
index 31f3f5ee9..2f8e7eee3 100644
--- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
+++ b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
@@ -13,8 +13,8 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kunittest/module.h>
#include "kconfigcompiler_test.h"
@@ -44,7 +44,7 @@ static CompilerTestSet testCases =
static CompilerTestSet willFailCases =
{
- // where is that QDir comming from?
+ // where is that TQDir comming from?
//"test9.cpp", NULL
NULL
};
@@ -61,7 +61,7 @@ void KConfigCompiler_Test::testExpectedOutput()
// Known to pass test cases
while (testCases[ i ])
{
- performCompare(QString::fromLatin1(testCases[ i ]));
+ performCompare(TQString::fromLatin1(testCases[ i ]));
++i;
}
@@ -69,20 +69,20 @@ void KConfigCompiler_Test::testExpectedOutput()
i= 0;
while (willFailCases[ i ])
{
- performCompare(QString::fromLatin1(willFailCases[ i ]), true);
+ performCompare(TQString::fromLatin1(willFailCases[ i ]), true);
++i;
}
}
-void KConfigCompiler_Test::performCompare(const QString &fileName, bool fail)
+void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail)
{
- QFile file(fileName);
- QFile fileRef(QString::fromLatin1(SRCDIR) + QString::fromLatin1("/") + fileName + QString::fromLatin1(".ref"));
+ TQFile file(fileName);
+ TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref"));
if ( file.open(IO_ReadOnly) && fileRef.open(IO_ReadOnly) )
{
- QString content = file.readAll();
- QString contentRef = fileRef.readAll();
+ TQString content = file.readAll();
+ TQString contentRef = fileRef.readAll();
if (!fail)
CHECK( content, contentRef);
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
index 8ccea83fa..5521ef982 100644
--- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
+++ b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
@@ -28,7 +28,7 @@ public:
public slots:
void testExpectedOutput();
private:
- void performCompare(const QString &fileName, bool fail=false);
+ void performCompare(const TQString &fileName, bool fail=false);
};
#endif
diff --git a/kdecore/kconfig_compiler/tests/myprefs.h b/kdecore/kconfig_compiler/tests/myprefs.h
index 263c409d2..ebef89c08 100644
--- a/kdecore/kconfig_compiler/tests/myprefs.h
+++ b/kdecore/kconfig_compiler/tests/myprefs.h
@@ -3,5 +3,5 @@
class MyPrefs : public KConfigSkeleton
{
public:
- MyPrefs( const QString &a ) : KConfigSkeleton( a ) {}
+ MyPrefs( const TQString &a ) : KConfigSkeleton( a ) {}
};
diff --git a/kdecore/kconfig_compiler/tests/test1.cpp.ref b/kdecore/kconfig_compiler/tests/test1.cpp.ref
index e4c9f86d8..b3050921e 100644
--- a/kdecore/kconfig_compiler/tests/test1.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test1.cpp.ref
@@ -3,67 +3,67 @@
#include "test1.h"
-Test1::Test1( const QString & transport, const QString & folder )
- : KConfigSkeleton( QString::fromLatin1( "examplerc" ) )
+Test1::Test1( const TQString & transport, const TQString & folder )
+ : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( QString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
+ setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
KConfigSkeleton::ItemBool *itemOneOption;
- itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "OneOption" ), mOneOption, true );
- addItem( itemOneOption, QString::fromLatin1( "OneOption" ) );
+ itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true );
+ addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) );
KConfigSkeleton::ItemInt *itemAnotherOption;
- itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
- addItem( itemAnotherOption, QString::fromLatin1( "AnotherOption" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
+ itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
+ addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "One" );
+ choice.name = TQString::fromLatin1( "One" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Two" );
+ choice.name = TQString::fromLatin1( "Two" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Three" );
+ choice.name = TQString::fromLatin1( "Three" );
valuesListOption.append( choice );
}
KConfigSkeleton::ItemEnum *itemListOption;
- itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
- addItem( itemListOption, QString::fromLatin1( "ListOption" ) );
+ itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
+ addItem( itemListOption, TQString::fromLatin1( "ListOption" ) );
- setCurrentGroup( QString::fromLatin1( "MyOptions" ) );
+ setCurrentGroup( TQString::fromLatin1( "MyOptions" ) );
KConfigSkeleton::ItemString *itemMyString;
- itemMyString = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MyString" ), mMyString, QString::fromLatin1( "Default String" ) );
- addItem( itemMyString, QString::fromLatin1( "MyString" ) );
+ itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) );
+ addItem( itemMyString, TQString::fromLatin1( "MyString" ) );
KConfigSkeleton::ItemPath *itemMyPath;
- itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), QString::fromLatin1( "MyPath" ), mMyPath, QDir::homeDirPath()+QString::fromLatin1(".hidden_file") );
- addItem( itemMyPath, QString::fromLatin1( "MyPath" ) );
+ itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") );
+ addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) );
KConfigSkeleton::ItemInt *itemAnotherOption2;
- itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
- addItem( itemAnotherOption2, QString::fromLatin1( "AnotherOption2" ) );
- QStringList defaultMyStringList;
- defaultMyStringList.append( QString::fromUtf8( "up" ) );
- defaultMyStringList.append( QString::fromUtf8( "down" ) );
+ itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
+ addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) );
+ TQStringList defaultMyStringList;
+ defaultMyStringList.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, QString::fromLatin1( "MyStringList" ) );
- QStringList defaultMyStringListHidden;
- defaultMyStringListHidden.append( QString::fromUtf8( "up" ) );
- defaultMyStringListHidden.append( QString::fromUtf8( "down" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ TQStringList defaultMyStringListHidden;
+ defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringListHidden;
- itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
- addItem( itemMyStringListHidden, QString::fromLatin1( "MyStringListHidden" ) );
+ itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
+ addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) );
KConfigSkeleton::ItemInt *itemMyNumber;
- itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
- addItem( itemMyNumber, QString::fromLatin1( "MyNumber" ) );
+ itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
+ addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) );
}
Test1::~Test1()
diff --git a/kdecore/kconfig_compiler/tests/test1.h.ref b/kdecore/kconfig_compiler/tests/test1.h.ref
index e08ccee8a..cc2d99c69 100644
--- a/kdecore/kconfig_compiler/tests/test1.h.ref
+++ b/kdecore/kconfig_compiler/tests/test1.h.ref
@@ -6,7 +6,7 @@
#include <kconfigskeleton.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
class Test1 : public KConfigSkeleton
{
public:
@@ -16,7 +16,7 @@ class Test1 : public KConfigSkeleton
enum type { One, Two, Three, COUNT };
};
- Test1( const QString & transport, const QString & folder );
+ Test1( const TQString & transport, const TQString & folder );
~Test1();
/**
@@ -24,7 +24,7 @@ class Test1 : public KConfigSkeleton
*/
void setOneOption( bool v )
{
- if (!isImmutable( QString::fromLatin1( "OneOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "OneOption" ) ))
mOneOption = v;
}
@@ -41,7 +41,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption( int v )
{
- if (!isImmutable( QString::fromLatin1( "AnotherOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AnotherOption" ) ))
mAnotherOption = v;
}
@@ -58,7 +58,7 @@ class Test1 : public KConfigSkeleton
*/
void setListOption( int v )
{
- if (!isImmutable( QString::fromLatin1( "ListOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "ListOption" ) ))
mListOption = v;
}
@@ -73,16 +73,16 @@ class Test1 : public KConfigSkeleton
/**
Set This is a string
*/
- void setMyString( const QString & v )
+ void setMyString( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyString" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyString" ) ))
mMyString = v;
}
/**
Get This is a string
*/
- QString myString() const
+ TQString myString() const
{
return mMyString;
}
@@ -90,16 +90,16 @@ class Test1 : public KConfigSkeleton
/**
Set This is a path
*/
- void setMyPath( const QString & v )
+ void setMyPath( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPath" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPath" ) ))
mMyPath = v;
}
/**
Get This is a path
*/
- QString myPath() const
+ TQString myPath() const
{
return mMyPath;
}
@@ -109,7 +109,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption2( int v )
{
- if (!isImmutable( QString::fromLatin1( "AnotherOption2" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AnotherOption2" ) ))
mAnotherOption2 = v;
}
@@ -124,16 +124,16 @@ class Test1 : public KConfigSkeleton
/**
Set MyStringList
*/
- void setMyStringList( const QStringList & v )
+ void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
/**
Get MyStringList
*/
- QStringList myStringList() const
+ TQStringList myStringList() const
{
return mMyStringList;
}
@@ -141,16 +141,16 @@ class Test1 : public KConfigSkeleton
/**
Set MyStringListHidden
*/
- void setMyStringListHidden( const QStringList & v )
+ void setMyStringListHidden( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringListHidden" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringListHidden" ) ))
mMyStringListHidden = v;
}
/**
Get MyStringListHidden
*/
- QStringList myStringListHidden() const
+ TQStringList myStringListHidden() const
{
return mMyStringListHidden;
}
@@ -160,7 +160,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyNumber( int v )
{
- if (!isImmutable( QString::fromLatin1( "MyNumber" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyNumber" ) ))
mMyNumber = v;
}
@@ -173,8 +173,8 @@ class Test1 : public KConfigSkeleton
}
protected:
- QString mParamtransport;
- QString mParamfolder;
+ TQString mParamtransport;
+ TQString mParamfolder;
// General-$(folder)
bool mOneOption;
@@ -182,11 +182,11 @@ class Test1 : public KConfigSkeleton
int mListOption;
// MyOptions
- QString mMyString;
- QString mMyPath;
+ TQString mMyString;
+ TQString mMyPath;
int mAnotherOption2;
- QStringList mMyStringList;
- QStringList mMyStringListHidden;
+ TQStringList mMyStringList;
+ TQStringList mMyStringListHidden;
int mMyNumber;
private:
diff --git a/kdecore/kconfig_compiler/tests/test1main.cpp b/kdecore/kconfig_compiler/tests/test1main.cpp
index f55f54195..976a7bbd6 100644
--- a/kdecore/kconfig_compiler/tests/test1main.cpp
+++ b/kdecore/kconfig_compiler/tests/test1main.cpp
@@ -24,6 +24,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test1 *t = new Test1( QString::null, QString::null );
+ Test1 *t = new Test1( TQString::null, TQString::null );
delete t;
}
diff --git a/kdecore/kconfig_compiler/tests/test2.cpp.ref b/kdecore/kconfig_compiler/tests/test2.cpp.ref
index d2197856e..2d56f7545 100644
--- a/kdecore/kconfig_compiler/tests/test2.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test2.cpp.ref
@@ -6,90 +6,90 @@
#include <klocale.h>
Test2::Test2( )
- : MyPrefs( QString::fromLatin1( "korganizerrc" ) )
+ : MyPrefs( TQString::fromLatin1( "korganizerrc" ) )
{
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
- addItem( mAutoSaveItem, QString::fromLatin1( "AutoSave" ) );
- mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
+ addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+ mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( mAutoSaveIntervalItem, QString::fromLatin1( "AutoSaveInterval" ) );
- mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
+ addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
+ mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
mConfirmItem->setLabel( i18n("Confirm deletes") );
- addItem( mConfirmItem, QString::fromLatin1( "Confirm" ) );
- mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Archive File" ), mArchiveFile );
+ addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) );
+ mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile );
mArchiveFileItem->setLabel( i18n("Archive File") );
- addItem( mArchiveFileItem, QString::fromLatin1( "ArchiveFile" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "standardDestination" );
+ choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "askDestination" );
+ choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl1" );
+ choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl2" );
+ choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl3" );
+ choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
+ mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
mDestinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( mDestinationItem, QString::fromLatin1( "Destination" ) );
+ addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) );
- setCurrentGroup( QString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::fromLatin1( "Views" ) );
- mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Hour Size" ), mHourSize, 10 );
+ mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 );
mHourSizeItem->setLabel( i18n("Hour Size") );
- addItem( mHourSizeItem, QString::fromLatin1( "HourSize" ) );
- mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
+ addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) );
+ mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( mSelectionStartsEditorItem, QString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( QString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
- QStringList defaultSelectedPlugins;
- defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) );
- defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) );
+ TQStringList defaultSelectedPlugins;
+ defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
+ defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
+ mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( mSelectedPluginsItem, QString::fromLatin1( "SelectedPlugins" ) );
+ addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( QString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Highlight Color" ), mHighlightColor, QColor( 100, 100, 255 ) );
+ mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
mHighlightColorItem->setLabel( i18n("Highlight color") );
- addItem( mHighlightColorItem, QString::fromLatin1( "HighlightColor" ) );
- mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, QColor( 255, 255, 255 ) );
+ addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
+ mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
mAgendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( mAgendaBgColorItem, QString::fromLatin1( "AgendaBgColor" ) );
+ addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( QString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
+ mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
mTimeBarFontItem->setLabel( i18n("Time bar") );
- addItem( mTimeBarFontItem, QString::fromLatin1( "TimeBarFont" ) );
+ addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
Test2::~Test2()
diff --git a/kdecore/kconfig_compiler/tests/test2.h.ref b/kdecore/kconfig_compiler/tests/test2.h.ref
index 4e8b5ec1f..6c0a74d66 100644
--- a/kdecore/kconfig_compiler/tests/test2.h.ref
+++ b/kdecore/kconfig_compiler/tests/test2.h.ref
@@ -21,7 +21,7 @@ class Test2 : public MyPrefs
*/
void setAutoSave( bool v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -46,7 +46,7 @@ class Test2 : public MyPrefs
*/
void setAutoSaveInterval( int v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
mAutoSaveInterval = v;
}
@@ -71,7 +71,7 @@ class Test2 : public MyPrefs
*/
void setConfirm( bool v )
{
- if (!isImmutable( QString::fromLatin1( "Confirm" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Confirm" ) ))
mConfirm = v;
}
@@ -94,16 +94,16 @@ class Test2 : public MyPrefs
/**
Set Archive File
*/
- void setArchiveFile( const QString & v )
+ void setArchiveFile( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "ArchiveFile" ) ))
+ if (!isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
mArchiveFile = v;
}
/**
Get Archive File
*/
- QString archiveFile() const
+ TQString archiveFile() const
{
return mArchiveFile;
}
@@ -121,7 +121,7 @@ class Test2 : public MyPrefs
*/
void setDestination( int v )
{
- if (!isImmutable( QString::fromLatin1( "Destination" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Destination" ) ))
mDestination = v;
}
@@ -146,7 +146,7 @@ class Test2 : public MyPrefs
*/
void setHourSize( int v )
{
- if (!isImmutable( QString::fromLatin1( "HourSize" ) ))
+ if (!isImmutable( TQString::fromLatin1( "HourSize" ) ))
mHourSize = v;
}
@@ -171,7 +171,7 @@ class Test2 : public MyPrefs
*/
void setSelectionStartsEditor( bool v )
{
- if (!isImmutable( QString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
mSelectionStartsEditor = v;
}
@@ -194,16 +194,16 @@ class Test2 : public MyPrefs
/**
Set SelectedPlugins
*/
- void setSelectedPlugins( const QStringList & v )
+ void setSelectedPlugins( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "SelectedPlugins" ) ))
+ if (!isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
mSelectedPlugins = v;
}
/**
Get SelectedPlugins
*/
- QStringList selectedPlugins() const
+ TQStringList selectedPlugins() const
{
return mSelectedPlugins;
}
@@ -219,16 +219,16 @@ class Test2 : public MyPrefs
/**
Set Highlight color
*/
- void setHighlightColor( const QColor & v )
+ void setHighlightColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "HighlightColor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
mHighlightColor = v;
}
/**
Get Highlight color
*/
- QColor highlightColor() const
+ TQColor highlightColor() const
{
return mHighlightColor;
}
@@ -244,16 +244,16 @@ class Test2 : public MyPrefs
/**
Set Agenda view background color
*/
- void setAgendaBgColor( const QColor & v )
+ void setAgendaBgColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "AgendaBgColor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
mAgendaBgColor = v;
}
/**
Get Agenda view background color
*/
- QColor agendaBgColor() const
+ TQColor agendaBgColor() const
{
return mAgendaBgColor;
}
@@ -269,16 +269,16 @@ class Test2 : public MyPrefs
/**
Set Time bar
*/
- void setTimeBarFont( const QFont & v )
+ void setTimeBarFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "TimeBarFont" ) ))
+ if (!isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
mTimeBarFont = v;
}
/**
Get Time bar
*/
- QFont timeBarFont() const
+ TQFont timeBarFont() const
{
return mTimeBarFont;
}
@@ -298,7 +298,7 @@ class Test2 : public MyPrefs
bool mAutoSave;
int mAutoSaveInterval;
bool mConfirm;
- QString mArchiveFile;
+ TQString mArchiveFile;
int mDestination;
// Views
@@ -306,14 +306,14 @@ class Test2 : public MyPrefs
bool mSelectionStartsEditor;
// KOrganizer Plugins
- QStringList mSelectedPlugins;
+ TQStringList mSelectedPlugins;
// Colors
- QColor mHighlightColor;
- QColor mAgendaBgColor;
+ TQColor mHighlightColor;
+ TQColor mAgendaBgColor;
// Fonts
- QFont mTimeBarFont;
+ TQFont mTimeBarFont;
private:
ItemBool *mAutoSaveItem;
diff --git a/kdecore/kconfig_compiler/tests/test3.cpp.ref b/kdecore/kconfig_compiler/tests/test3.cpp.ref
index a9435f2cf..11fe6b38f 100644
--- a/kdecore/kconfig_compiler/tests/test3.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test3.cpp.ref
@@ -6,21 +6,21 @@
using namespace TestNameSpace;
Test3::Test3( )
- : KConfigSkeleton( QString::fromLatin1( "test3rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test3rc" ) )
{
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), mAutoSave, false );
- addItem( mAutoSaveItem, QString::fromLatin1( "AutoSave" ) );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
- setCurrentGroup( QString::fromLatin1( "Blah" ) );
+ setCurrentGroup( TQString::fromLatin1( "Blah" ) );
- mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Blubb" ), mBlubb, 10 );
- addItem( mBlubbItem, QString::fromLatin1( "Blubb" ) );
- mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "BlahBlah" ), mBlahBlah, QString::fromLatin1( "a string" ) );
- addItem( mBlahBlahItem, QString::fromLatin1( "BlahBlah" ) );
- mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), QString::fromLatin1( "MyPassword" ), mMyPassword );
- addItem( mMyPasswordItem, QString::fromLatin1( "MyPassword" ) );
+ mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 );
+ addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) );
+ mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) );
+ addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) );
+ mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword );
+ addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) );
}
Test3::~Test3()
diff --git a/kdecore/kconfig_compiler/tests/test3.h.ref b/kdecore/kconfig_compiler/tests/test3.h.ref
index 4742a0ec1..75b1b0929 100644
--- a/kdecore/kconfig_compiler/tests/test3.h.ref
+++ b/kdecore/kconfig_compiler/tests/test3.h.ref
@@ -20,7 +20,7 @@ class Test3 : public KConfigSkeleton
*/
void setAutoSave( bool v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -45,7 +45,7 @@ class Test3 : public KConfigSkeleton
*/
void setBlubb( int v )
{
- if (!isImmutable( QString::fromLatin1( "Blubb" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Blubb" ) ))
mBlubb = v;
}
@@ -68,16 +68,16 @@ class Test3 : public KConfigSkeleton
/**
Set BlahBlah
*/
- void setBlahBlah( const QString & v )
+ void setBlahBlah( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "BlahBlah" ) ))
+ if (!isImmutable( TQString::fromLatin1( "BlahBlah" ) ))
mBlahBlah = v;
}
/**
Get BlahBlah
*/
- QString blahBlah() const
+ TQString blahBlah() const
{
return mBlahBlah;
}
@@ -93,16 +93,16 @@ class Test3 : public KConfigSkeleton
/**
Set MyPassword
*/
- void setMyPassword( const QString & v )
+ void setMyPassword( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPassword" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPassword" ) ))
mMyPassword = v;
}
/**
Get MyPassword
*/
- QString myPassword() const
+ TQString myPassword() const
{
return mMyPassword;
}
@@ -122,8 +122,8 @@ class Test3 : public KConfigSkeleton
// Blah
int mBlubb;
- QString mBlahBlah;
- QString mMyPassword;
+ TQString mBlahBlah;
+ TQString mMyPassword;
private:
ItemBool *mAutoSaveItem;
diff --git a/kdecore/kconfig_compiler/tests/test4.cpp.ref b/kdecore/kconfig_compiler/tests/test4.cpp.ref
index d50c98b26..6918a8c8a 100644
--- a/kdecore/kconfig_compiler/tests/test4.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test4.cpp.ref
@@ -21,57 +21,57 @@ Test4 *Test4::self()
const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" };
Test4::Test4( )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], QString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], QString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], QString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], QString::fromLatin1( "Color3" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Encrypt" );
+ choice.name = TQString::fromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Decrypt" );
+ choice.name = TQString::fromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::fromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
- addItem( itemMouseAction[0], QString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
- addItem( itemMouseAction[1], QString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
- addItem( itemMouseAction[2], QString::fromLatin1( "MouseActionleft" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test4::~Test4()
diff --git a/kdecore/kconfig_compiler/tests/test4.h.ref b/kdecore/kconfig_compiler/tests/test4.h.ref
index b7ae85287..d11dd3aee 100644
--- a/kdecore/kconfig_compiler/tests/test4.h.ref
+++ b/kdecore/kconfig_compiler/tests/test4.h.ref
@@ -28,9 +28,9 @@ class Test4 : public KConfigSkeleton
Set Block colors.
*/
static
- void setColor( int i, const QColor & v )
+ void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -38,7 +38,7 @@ class Test4 : public KConfigSkeleton
Get Block colors.
*/
static
- QColor color( int i )
+ TQColor color( int i )
{
return self()->mColor[i];
}
@@ -49,7 +49,7 @@ class Test4 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "MouseAction%1" ).arg( QString::fromLatin1( EnumButton::enumToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButton::enumToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -66,9 +66,9 @@ class Test4 : public KConfigSkeleton
Set foo bar
*/
static
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -76,7 +76,7 @@ class Test4 : public KConfigSkeleton
Get foo bar
*/
static
- QString fooBar()
+ TQString fooBar()
{
return self()->mFooBar;
}
@@ -99,7 +99,7 @@ class Test4 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
self()->mAge = v;
}
@@ -123,9 +123,9 @@ class Test4 : public KConfigSkeleton
// Foo
- QColor mColor[4];
+ TQColor mColor[4];
int mMouseAction[3];
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test5.cpp.ref b/kdecore/kconfig_compiler/tests/test5.cpp.ref
index e6dc13f85..8373eb3f6 100644
--- a/kdecore/kconfig_compiler/tests/test5.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test5.cpp.ref
@@ -21,57 +21,57 @@ Test5 *Test5::self()
const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" };
Test5::Test5( )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], QString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], QString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], QString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], QString::fromLatin1( "Color3" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Encrypt" );
+ choice.name = TQString::fromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Decrypt" );
+ choice.name = TQString::fromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::fromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
- addItem( itemMouseAction[0], QString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
- addItem( itemMouseAction[1], QString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
- addItem( itemMouseAction[2], QString::fromLatin1( "MouseActionleft" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test5::~Test5()
diff --git a/kdecore/kconfig_compiler/tests/test5.h.ref b/kdecore/kconfig_compiler/tests/test5.h.ref
index 1a61d3913..efb9b448a 100644
--- a/kdecore/kconfig_compiler/tests/test5.h.ref
+++ b/kdecore/kconfig_compiler/tests/test5.h.ref
@@ -20,9 +20,9 @@ class Test5 : public KConfigSkeleton
Set Block colors.
*/
static
- void setColor( int i, const QColor & v )
+ void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -30,7 +30,7 @@ class Test5 : public KConfigSkeleton
Get Block colors.
*/
static
- QColor color( int i )
+ TQColor color( int i )
{
return self()->mColor[i];
}
@@ -41,7 +41,7 @@ class Test5 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "MouseAction%1" ).arg( QString::fromLatin1( EnumButtonToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButtonToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -58,9 +58,9 @@ class Test5 : public KConfigSkeleton
Set foo bar
*/
static
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -68,7 +68,7 @@ class Test5 : public KConfigSkeleton
Get foo bar
*/
static
- QString fooBar()
+ TQString fooBar()
{
return self()->mFooBar;
}
@@ -91,7 +91,7 @@ class Test5 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
self()->mAge = v;
}
@@ -115,9 +115,9 @@ class Test5 : public KConfigSkeleton
// Foo
- QColor mColor[4];
+ TQColor mColor[4];
int mMouseAction[3];
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test6.cpp.ref b/kdecore/kconfig_compiler/tests/test6.cpp.ref
index 21fea85f6..51b96d4c4 100644
--- a/kdecore/kconfig_compiler/tests/test6.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test6.cpp.ref
@@ -3,26 +3,26 @@
#include "test6.h"
-Test6::Test6( const QString & Number )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+Test6::Test6( const TQString & Number )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, QColor( "red" ) );
- addItem( itemColor, QString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
- setCurrentGroup( QString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test6::~Test6()
diff --git a/kdecore/kconfig_compiler/tests/test6.h.ref b/kdecore/kconfig_compiler/tests/test6.h.ref
index 75fcfd04f..6743d6064 100644
--- a/kdecore/kconfig_compiler/tests/test6.h.ref
+++ b/kdecore/kconfig_compiler/tests/test6.h.ref
@@ -10,22 +10,22 @@ class Test6 : public KConfigSkeleton
{
public:
- Test6( const QString & Number );
+ Test6( const TQString & Number );
~Test6();
/**
Set Block colors.
*/
- void setColor( const QColor & v )
+ void setColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Color" ) ))
mColor = v;
}
/**
Get Block colors.
*/
- QColor color() const
+ TQColor color() const
{
return mColor;
}
@@ -33,16 +33,16 @@ class Test6 : public KConfigSkeleton
/**
Set foo bar
*/
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
mFooBar = v;
}
/**
Get foo bar
*/
- QString fooBar() const
+ TQString fooBar() const
{
return mFooBar;
}
@@ -64,7 +64,7 @@ class Test6 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Age" ) ))
mAge = v;
}
@@ -77,13 +77,13 @@ class Test6 : public KConfigSkeleton
}
protected:
- QString mParamNumber;
+ TQString mParamNumber;
// Foo
- QColor mColor;
+ TQColor mColor;
// Bar$(Number)
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test6main.cpp b/kdecore/kconfig_compiler/tests/test6main.cpp
index a891c097a..27dff57ff 100644
--- a/kdecore/kconfig_compiler/tests/test6main.cpp
+++ b/kdecore/kconfig_compiler/tests/test6main.cpp
@@ -25,6 +25,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test6 *t = new Test6(QString::null);
+ Test6 *t = new Test6(TQString::null);
delete t;
}
diff --git a/kdecore/kconfig_compiler/tests/test7.cpp.ref b/kdecore/kconfig_compiler/tests/test7.cpp.ref
index 8292e31d1..91a22e036 100644
--- a/kdecore/kconfig_compiler/tests/test7.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test7.cpp.ref
@@ -4,25 +4,25 @@
#include "test7.h"
Test7::Test7( int Number )
- : KConfigSkeleton( QString::fromLatin1( "test7rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test7rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, QColor( "red" ) );
- addItem( itemColor, QString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
- setCurrentGroup( QString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test7::~Test7()
diff --git a/kdecore/kconfig_compiler/tests/test7.h.ref b/kdecore/kconfig_compiler/tests/test7.h.ref
index e8983907d..8f8808da1 100644
--- a/kdecore/kconfig_compiler/tests/test7.h.ref
+++ b/kdecore/kconfig_compiler/tests/test7.h.ref
@@ -16,16 +16,16 @@ class Test7 : public KConfigSkeleton
/**
Set Block colors.
*/
- void setColor( const QColor & v )
+ void setColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Color" ) ))
mColor = v;
}
/**
Get Block colors.
*/
- QColor color() const
+ TQColor color() const
{
return mColor;
}
@@ -33,16 +33,16 @@ class Test7 : public KConfigSkeleton
/**
Set foo bar
*/
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
mFooBar = v;
}
/**
Get foo bar
*/
- QString fooBar() const
+ TQString fooBar() const
{
return mFooBar;
}
@@ -64,7 +64,7 @@ class Test7 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Age" ) ))
mAge = v;
}
@@ -80,10 +80,10 @@ class Test7 : public KConfigSkeleton
int mParamNumber;
// Foo
- QColor mColor;
+ TQColor mColor;
// Bar$(Number)
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test8a.cpp.ref b/kdecore/kconfig_compiler/tests/test8a.cpp.ref
index 868b63438..f89b7c133 100644
--- a/kdecore/kconfig_compiler/tests/test8a.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test8a.cpp.ref
@@ -6,14 +6,14 @@
Test8a::Test8a( KSharedConfig::Ptr config )
: KConfigSkeleton( config )
{
- setCurrentGroup( QString::fromLatin1( "Group" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group" ) );
KConfigSkeleton::ItemFont *itemFont;
- itemFont = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
- addItem( itemFont, QString::fromLatin1( "Font" ) );
+ itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
+ addItem( itemFont, TQString::fromLatin1( "Font" ) );
KConfigSkeleton::ItemFont *itemTitleFont;
- itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
- addItem( itemTitleFont, QString::fromLatin1( "TitleFont" ) );
+ itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
+ addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) );
}
Test8a::~Test8a()
diff --git a/kdecore/kconfig_compiler/tests/test8a.h.ref b/kdecore/kconfig_compiler/tests/test8a.h.ref
index 6d4f2a00d..2e947c437 100644
--- a/kdecore/kconfig_compiler/tests/test8a.h.ref
+++ b/kdecore/kconfig_compiler/tests/test8a.h.ref
@@ -17,16 +17,16 @@ class Test8a : public KConfigSkeleton
/**
Set Font
*/
- void setFont( const QFont & v )
+ void setFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "Font" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Font" ) ))
mFont = v;
}
/**
Get Font
*/
- QFont font() const
+ TQFont font() const
{
return mFont;
}
@@ -34,16 +34,16 @@ class Test8a : public KConfigSkeleton
/**
Set TitleFont
*/
- void setTitleFont( const QFont & v )
+ void setTitleFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "TitleFont" ) ))
+ if (!isImmutable( TQString::fromLatin1( "TitleFont" ) ))
mTitleFont = v;
}
/**
Get TitleFont
*/
- QFont titleFont() const
+ TQFont titleFont() const
{
return mTitleFont;
}
@@ -51,8 +51,8 @@ class Test8a : public KConfigSkeleton
protected:
// Group
- QFont mFont;
- QFont mTitleFont;
+ TQFont mFont;
+ TQFont mTitleFont;
private:
};
diff --git a/kdecore/kconfig_compiler/tests/test8b.cpp.ref b/kdecore/kconfig_compiler/tests/test8b.cpp.ref
index 101f2ab6a..e29e3c4e7 100644
--- a/kdecore/kconfig_compiler/tests/test8b.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test8b.cpp.ref
@@ -22,20 +22,20 @@ Test8b::Test8b( )
: Test8a()
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Group8b1" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group8b1" ) );
KConfigSkeleton::ItemUInt *itemSomething;
- itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), QString::fromLatin1( "Something" ), mSomething, 60 );
- addItem( itemSomething, QString::fromLatin1( "Something" ) );
+ itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 );
+ addItem( itemSomething, TQString::fromLatin1( "Something" ) );
- setCurrentGroup( QString::fromLatin1( "Group8b2" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group8b2" ) );
KConfigSkeleton::ItemBool *itemFooBoo;
- itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "FooBoo" ), mFooBoo, false );
- addItem( itemFooBoo, QString::fromLatin1( "FooBoo" ) );
+ itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false );
+ addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) );
KConfigSkeleton::ItemUInt *itemPort;
- itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), QString::fromLatin1( "Port" ), mPort, 1000 );
- addItem( itemPort, QString::fromLatin1( "Port" ) );
+ itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 );
+ addItem( itemPort, TQString::fromLatin1( "Port" ) );
}
Test8b::~Test8b()
diff --git a/kdecore/kconfig_compiler/tests/test8b.h.ref b/kdecore/kconfig_compiler/tests/test8b.h.ref
index 0ee51e3f8..4ca0d5c7f 100644
--- a/kdecore/kconfig_compiler/tests/test8b.h.ref
+++ b/kdecore/kconfig_compiler/tests/test8b.h.ref
@@ -21,7 +21,7 @@ class Test8b : public Test8a
static
void setSomething( uint v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Something" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Something" ) ))
self()->mSomething = v;
}
@@ -40,7 +40,7 @@ class Test8b : public Test8a
static
void setFooBoo( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBoo" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBoo" ) ))
self()->mFooBoo = v;
}
@@ -59,7 +59,7 @@ class Test8b : public Test8a
static
void setPort( uint v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Port" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Port" ) ))
self()->mPort = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test8main.cpp b/kdecore/kconfig_compiler/tests/test8main.cpp
index 912631f7a..b3c242f68 100644
--- a/kdecore/kconfig_compiler/tests/test8main.cpp
+++ b/kdecore/kconfig_compiler/tests/test8main.cpp
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test8a *config1 = new Test8a( KSharedConfig::openConfig( QString::null ) );
+ Test8a *config1 = new Test8a( KSharedConfig::openConfig( TQString::null ) );
Test8a *config2 = new Test8a();
Test8b::self();
delete config1;
diff --git a/kdecore/kconfig_compiler/tests/test9.cpp.ref b/kdecore/kconfig_compiler/tests/test9.cpp.ref
index 309c1ddbe..c5d57e4d1 100644
--- a/kdecore/kconfig_compiler/tests/test9.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test9.cpp.ref
@@ -3,30 +3,30 @@
#include "test9.h"
-Test9::Test9( const QString & transport, const QString & folder )
- : KConfigSkeleton( QString::fromLatin1( "examplerc" ) )
+Test9::Test9( const TQString & transport, const TQString & folder )
+ : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( QString::fromLatin1( "MyOptionsXX" ) );
+ setCurrentGroup( TQString::fromLatin1( "MyOptionsXX" ) );
- QStringList defaultMyStringList;
- defaultMyStringList.append( QString::fromUtf8( "up" ) );
- defaultMyStringList.append( QString::fromUtf8( "down" ) );
+ TQStringList defaultMyStringList;
+ defaultMyStringList.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, QString::fromLatin1( "MyStringList" ) );
- QStringList defaultMyPathList;
- defaultMyPathList.append( QString::fromUtf8( "/home" ) );
- defaultMyPathList.append( QString::fromUtf8( "~" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ TQStringList defaultMyPathList;
+ defaultMyPathList.append( TQString::fromUtf8( "/home" ) );
+ defaultMyPathList.append( TQString::fromUtf8( "~" ) );
KConfigSkeleton::ItemPathList *itemMyPathList;
- itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), QString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
- addItem( itemMyPathList, QString::fromLatin1( "MyPathList" ) );
+ itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
+ addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) );
KConfigSkeleton::ItemPathList *itemMyPathsList2;
- itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), QString::fromLatin1( "MyPathsList2" ), mMyPathsList2, QStringList(QString::fromLatin1("/usr/bin")) += QDir::homeDirPath() );
- addItem( itemMyPathsList2, QString::fromLatin1( "MyPathsList2" ) );
+ itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() );
+ addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) );
}
Test9::~Test9()
diff --git a/kdecore/kconfig_compiler/tests/test9.h.ref b/kdecore/kconfig_compiler/tests/test9.h.ref
index 4f3e241fc..66a629b48 100644
--- a/kdecore/kconfig_compiler/tests/test9.h.ref
+++ b/kdecore/kconfig_compiler/tests/test9.h.ref
@@ -6,27 +6,27 @@
#include <kconfigskeleton.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
class Test9 : public KConfigSkeleton
{
public:
- Test9( const QString & transport, const QString & folder );
+ Test9( const TQString & transport, const TQString & folder );
~Test9();
/**
Set MyStringList
*/
- void setMyStringList( const QStringList & v )
+ void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
/**
Get MyStringList
*/
- QStringList myStringList() const
+ TQStringList myStringList() const
{
return mMyStringList;
}
@@ -34,16 +34,16 @@ class Test9 : public KConfigSkeleton
/**
Set This is a list of paths
*/
- void setMyPathList( const QStringList & v )
+ void setMyPathList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPathList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPathList" ) ))
mMyPathList = v;
}
/**
Get This is a list of paths
*/
- QStringList myPathList() const
+ TQStringList myPathList() const
{
return mMyPathList;
}
@@ -51,29 +51,29 @@ class Test9 : public KConfigSkeleton
/**
Set This is an additional test for PathList
*/
- void setMyPathsList2( const QStringList & v )
+ void setMyPathsList2( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPathsList2" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPathsList2" ) ))
mMyPathsList2 = v;
}
/**
Get This is an additional test for PathList
*/
- QStringList myPathsList2() const
+ TQStringList myPathsList2() const
{
return mMyPathsList2;
}
protected:
public:
- QString mParamtransport;
- QString mParamfolder;
+ TQString mParamtransport;
+ TQString mParamfolder;
// MyOptionsXX
- QStringList mMyStringList;
- QStringList mMyPathList;
- QStringList mMyPathsList2;
+ TQStringList mMyStringList;
+ TQStringList mMyPathList;
+ TQStringList mMyPathsList2;
private:
};
diff --git a/kdecore/kconfig_compiler/tests/test9main.cpp b/kdecore/kconfig_compiler/tests/test9main.cpp
index 3802cd339..12e16e0d4 100644
--- a/kdecore/kconfig_compiler/tests/test9main.cpp
+++ b/kdecore/kconfig_compiler/tests/test9main.cpp
@@ -21,18 +21,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "test9.h"
#include "kinstance.h"
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
int main( int, char*[] )
{
KInstance i("test");
- Test9 *t = new Test9( QString::null, QString::null );
+ Test9 *t = new Test9( TQString::null, TQString::null );
- QStringList myPathsList2 = t->myPathsList2();
+ TQStringList myPathsList2 = t->myPathsList2();
kdWarning() << myPathsList2 << endl;
// add another path
- QStringList newlist = QDir::homeDirPath() + QString::fromLatin1("/.kde");
+ TQStringList newlist = TQDir::homeDirPath() + TQString::fromLatin1("/.kde");
myPathsList2 = myPathsList2 + newlist;
kdWarning() << myPathsList2 << endl;
diff --git a/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref b/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
index e36c50dd0..7b5f55f03 100644
--- a/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
@@ -15,7 +15,7 @@ class TestDPointerPrivate
bool autoSave;
int autoSaveInterval;
bool confirm;
- QString archiveFile;
+ TQString archiveFile;
int destination;
// Views
@@ -23,14 +23,14 @@ class TestDPointerPrivate
bool selectionStartsEditor;
// KOrganizer Plugins
- QStringList selectedPlugins;
+ TQStringList selectedPlugins;
// Colors
- QColor highlightColor;
- QColor agendaBgColor;
+ TQColor highlightColor;
+ TQColor agendaBgColor;
// Fonts
- QFont timeBarFont;
+ TQFont timeBarFont;
// items
KConfigSkeleton::ItemBool *autoSaveItem;
@@ -60,97 +60,97 @@ TestDPointer *TestDPointer::self()
}
TestDPointer::TestDPointer( )
- : KConfigSkeleton( QString::fromLatin1( "korganizerrc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) )
{
d = new TestDPointerPrivate;
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), d->autoSave, false );
+ d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false );
d->autoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
d->autoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
- addItem( d->autoSaveItem, QString::fromLatin1( "AutoSave" ) );
- d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
+ addItem( d->autoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+ d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( d->autoSaveIntervalItem, QString::fromLatin1( "AutoSaveInterval" ) );
- d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
+ addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
+ d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
d->confirmItem->setLabel( i18n("Confirm deletes") );
- addItem( d->confirmItem, QString::fromLatin1( "Confirm" ) );
- d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Archive File" ), d->archiveFile );
+ addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) );
+ d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile );
d->archiveFileItem->setLabel( i18n("Archive File") );
- addItem( d->archiveFileItem, QString::fromLatin1( "ArchiveFile" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "standardDestination" );
+ choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "askDestination" );
+ choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl1" );
+ choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl2" );
+ choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl3" );
+ choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
+ d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
d->destinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( d->destinationItem, QString::fromLatin1( "Destination" ) );
+ addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) );
- setCurrentGroup( QString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::fromLatin1( "Views" ) );
- d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
+ d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
d->hourSizeItem->setLabel( i18n("Hour Size") );
- addItem( d->hourSizeItem, QString::fromLatin1( "HourSize" ) );
- d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
+ addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) );
+ d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( d->selectionStartsEditorItem, QString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( QString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
- QStringList defaultSelectedPlugins;
- defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) );
- defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) );
+ TQStringList defaultSelectedPlugins;
+ defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
+ defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
+ d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( d->selectedPluginsItem, QString::fromLatin1( "SelectedPlugins" ) );
+ addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( QString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Highlight Color" ), d->highlightColor, QColor( 100, 100, 255 ) );
+ d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
d->highlightColorItem->setLabel( i18n("Highlight color") );
- addItem( d->highlightColorItem, QString::fromLatin1( "HighlightColor" ) );
- d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, QColor( 255, 255, 255 ) );
+ addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
+ d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
d->agendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( d->agendaBgColorItem, QString::fromLatin1( "AgendaBgColor" ) );
+ addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( QString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
+ d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
d->timeBarFontItem->setLabel( i18n("Time bar") );
- addItem( d->timeBarFontItem, QString::fromLatin1( "TimeBarFont" ) );
+ addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
void TestDPointer::setAutoSave( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AutoSave" ) ))
self()->d->autoSave = v;
}
@@ -167,7 +167,7 @@ KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
void TestDPointer::setAutoSaveInterval( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
self()->d->autoSaveInterval = v;
}
@@ -184,7 +184,7 @@ KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
void TestDPointer::setConfirm( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Confirm" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Confirm" ) ))
self()->d->confirm = v;
}
@@ -199,13 +199,13 @@ KConfigSkeleton::ItemBool *TestDPointer::confirmItem()
return d->confirmItem;
}
-void TestDPointer::setArchiveFile( const QString & v )
+void TestDPointer::setArchiveFile( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "ArchiveFile" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
self()->d->archiveFile = v;
}
-QString TestDPointer::archiveFile()
+TQString TestDPointer::archiveFile()
{
return self()->d->archiveFile;
}
@@ -218,7 +218,7 @@ KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
void TestDPointer::setDestination( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Destination" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Destination" ) ))
self()->d->destination = v;
}
@@ -235,7 +235,7 @@ KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
void TestDPointer::setHourSize( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "HourSize" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "HourSize" ) ))
self()->d->hourSize = v;
}
@@ -252,7 +252,7 @@ KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
void TestDPointer::setSelectionStartsEditor( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
self()->d->selectionStartsEditor = v;
}
@@ -267,13 +267,13 @@ KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
return d->selectionStartsEditorItem;
}
-void TestDPointer::setSelectedPlugins( const QStringList & v )
+void TestDPointer::setSelectedPlugins( const TQStringList & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "SelectedPlugins" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
self()->d->selectedPlugins = v;
}
-QStringList TestDPointer::selectedPlugins()
+TQStringList TestDPointer::selectedPlugins()
{
return self()->d->selectedPlugins;
}
@@ -284,13 +284,13 @@ KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
return d->selectedPluginsItem;
}
-void TestDPointer::setHighlightColor( const QColor & v )
+void TestDPointer::setHighlightColor( const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "HighlightColor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
self()->d->highlightColor = v;
}
-QColor TestDPointer::highlightColor()
+TQColor TestDPointer::highlightColor()
{
return self()->d->highlightColor;
}
@@ -301,13 +301,13 @@ KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
return d->highlightColorItem;
}
-void TestDPointer::setAgendaBgColor( const QColor & v )
+void TestDPointer::setAgendaBgColor( const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AgendaBgColor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
self()->d->agendaBgColor = v;
}
-QColor TestDPointer::agendaBgColor()
+TQColor TestDPointer::agendaBgColor()
{
return self()->d->agendaBgColor;
}
@@ -318,13 +318,13 @@ KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
return d->agendaBgColorItem;
}
-void TestDPointer::setTimeBarFont( const QFont & v )
+void TestDPointer::setTimeBarFont( const TQFont & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "TimeBarFont" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
self()->d->timeBarFont = v;
}
-QFont TestDPointer::timeBarFont()
+TQFont TestDPointer::timeBarFont()
{
return self()->d->timeBarFont;
}
diff --git a/kdecore/kconfig_compiler/tests/test_dpointer.h.ref b/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
index a8568fc9b..81f281e83 100644
--- a/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
+++ b/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
@@ -75,13 +75,13 @@ class TestDPointer : public KConfigSkeleton
Set Archive File
*/
static
- void setArchiveFile( const QString & v );
+ void setArchiveFile( const TQString & v );
/**
Get Archive File
*/
static
- QString archiveFile();
+ TQString archiveFile();
/**
Get Item object corresponding to ArchiveFile()
@@ -143,13 +143,13 @@ class TestDPointer : public KConfigSkeleton
Set SelectedPlugins
*/
static
- void setSelectedPlugins( const QStringList & v );
+ void setSelectedPlugins( const TQStringList & v );
/**
Get SelectedPlugins
*/
static
- QStringList selectedPlugins();
+ TQStringList selectedPlugins();
/**
Get Item object corresponding to SelectedPlugins()
@@ -160,13 +160,13 @@ class TestDPointer : public KConfigSkeleton
Set Highlight color
*/
static
- void setHighlightColor( const QColor & v );
+ void setHighlightColor( const TQColor & v );
/**
Get Highlight color
*/
static
- QColor highlightColor();
+ TQColor highlightColor();
/**
Get Item object corresponding to HighlightColor()
@@ -177,13 +177,13 @@ class TestDPointer : public KConfigSkeleton
Set Agenda view background color
*/
static
- void setAgendaBgColor( const QColor & v );
+ void setAgendaBgColor( const TQColor & v );
/**
Get Agenda view background color
*/
static
- QColor agendaBgColor();
+ TQColor agendaBgColor();
/**
Get Item object corresponding to AgendaBgColor()
@@ -194,13 +194,13 @@ class TestDPointer : public KConfigSkeleton
Set Time bar
*/
static
- void setTimeBarFont( const QFont & v );
+ void setTimeBarFont( const TQFont & v );
/**
Get Time bar
*/
static
- QFont timeBarFont();
+ TQFont timeBarFont();
/**
Get Item object corresponding to TimeBarFont()
diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp
index 2d2672282..09d3a65c1 100644
--- a/kdecore/kconfigbackend.cpp
+++ b/kdecore/kconfigbackend.cpp
@@ -34,10 +34,10 @@
#include <signal.h>
#include <setjmp.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include "kconfigbackend.h"
#include "kconfigbase.h"
@@ -50,9 +50,9 @@
#include <kurl.h>
#include <kde_file.h>
-extern bool checkAccess(const QString& pathname, int mode);
+extern bool checkAccess(const TQString& pathname, int mode);
/* translate escaped escape sequences to their actual values. */
-static QCString printableToString(const char *str, int l)
+static TQCString printableToString(const char *str, int l)
{
// Strip leading white-space.
while((l>0) &&
@@ -68,7 +68,7 @@ static QCString printableToString(const char *str, int l)
l--;
}
- QCString result(l + 1);
+ TQCString result(l + 1);
char *r = result.data();
for(int i = 0; i < l;i++, str++)
@@ -112,12 +112,12 @@ static QCString printableToString(const char *str, int l)
return result;
}
-static QCString stringToPrintable(const QCString& str){
- QCString result(str.length()*2); // Maximum 2x as long as source string
+static TQCString stringToPrintable(const TQCString& str){
+ TQCString result(str.length()*2); // Maximum 2x as long as source string
register char *r = result.data();
register char *s = str.data();
- if (!s) return QCString("");
+ if (!s) return TQCString("");
// Escape leading space
if (*s == ' ')
@@ -163,9 +163,9 @@ static QCString stringToPrintable(const QCString& str){
return result;
}
-static QCString decodeGroup(const char*s, int l)
+static TQCString decodeGroup(const char*s, int l)
{
- QCString result(l);
+ TQCString result(l);
register char *r = result.data();
l--; // Correct for trailing \0
@@ -194,10 +194,10 @@ static QCString decodeGroup(const char*s, int l)
return result;
}
-static QCString encodeGroup(const QCString &str)
+static TQCString encodeGroup(const TQCString &str)
{
int l = str.length();
- QCString result(l*2+1);
+ TQCString result(l*2+1);
register char *r = result.data();
register char *s = str.data();
while(l)
@@ -211,9 +211,9 @@ static QCString encodeGroup(const QCString &str)
return result;
}
-static QCString encodeKey(const char* key)
+static TQCString encodeKey(const char* key)
{
- QCString newKey(key);
+ TQCString newKey(key);
newKey.replace('[', "%5b");
newKey.replace(']', "%5d");
@@ -221,9 +221,9 @@ static QCString encodeKey(const char* key)
return newKey;
}
-static QCString decodeKey(const char* key)
+static TQCString decodeKey(const char* key)
{
- QCString newKey(key);
+ TQCString newKey(key);
newKey.replace("%5b", "[");
newKey.replace("%5d", "]");
@@ -234,13 +234,13 @@ static QCString decodeKey(const char* key)
class KConfigBackEnd::KConfigBackEndPrivate
{
public:
- QDateTime localLastModified;
+ TQDateTime localLastModified;
uint localLastSize;
KLockFile::Ptr localLockFile;
KLockFile::Ptr globalLockFile;
};
-void KConfigBackEnd::changeFileName(const QString &_fileName,
+void KConfigBackEnd::changeFileName(const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
{
@@ -248,19 +248,19 @@ void KConfigBackEnd::changeFileName(const QString &_fileName,
resType = _resType;
useKDEGlobals = _useKDEGlobals;
if (mfileName.isEmpty())
- mLocalFileName = QString::null;
- else if (!QDir::isRelativePath(mfileName))
+ mLocalFileName = TQString::null;
+ else if (!TQDir::isRelativePath(mfileName))
mLocalFileName = mfileName;
else
mLocalFileName = KGlobal::dirs()->saveLocation(resType) + mfileName;
if (useKDEGlobals)
mGlobalFileName = KGlobal::dirs()->saveLocation("config") +
- QString::fromLatin1("kdeglobals");
+ TQString::fromLatin1("kdeglobals");
else
- mGlobalFileName = QString::null;
+ mGlobalFileName = TQString::null;
- d->localLastModified = QDateTime();
+ d->localLastModified = TQDateTime();
d->localLastSize = 0;
d->localLockFile = 0;
d->globalLockFile = 0;
@@ -294,7 +294,7 @@ KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal)
}
KConfigBackEnd::KConfigBackEnd(KConfigBase *_config,
- const QString &_fileName,
+ const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
: pConfig(_config), bFileImmutable(false), mConfigState(KConfigBase::NoAccess), mFileMode(-1)
@@ -328,7 +328,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Create the containing dir, maybe it wasn't there
KURL path;
path.setPath(mLocalFileName);
- QString dir=path.directory();
+ TQString dir=path.directory();
KStandardDirs::makeDir(dir);
if (checkAccess(mLocalFileName, W_OK))
@@ -336,7 +336,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
mConfigState = KConfigBase::ReadWrite;
}
}
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
d->localLastModified = info.lastModified();
d->localLastSize = info.size();
}
@@ -346,26 +346,26 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Parse the general config files
if (useKDEGlobals) {
- QStringList kdercs = KGlobal::dirs()->
- findAllResources("config", QString::fromLatin1("kdeglobals"));
+ TQStringList kdercs = KGlobal::dirs()->
+ findAllResources("config", TQString::fromLatin1("kdeglobals"));
#ifdef Q_WS_WIN
- QString etc_kderc = QFile::decodeName( QCString(getenv("WINDIR")) + "\\kderc" );
+ TQString etc_kderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\kderc" );
#else
- QString etc_kderc = QString::fromLatin1("/etc/kderc");
+ TQString etc_kderc = TQString::fromLatin1("/etc/kderc");
#endif
if (checkAccess(etc_kderc, R_OK))
kdercs += etc_kderc;
kdercs += KGlobal::dirs()->
- findAllResources("config", QString::fromLatin1("system.kdeglobals"));
+ findAllResources("config", TQString::fromLatin1("system.kdeglobals"));
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = kdercs.fromLast(); it != kdercs.end(); --it) {
- QFile aConfigFile( *it );
+ TQFile aConfigFile( *it );
if (!aConfigFile.open( IO_ReadOnly ))
continue;
parseSingleConfigFile( aConfigFile, 0L, true, (*it != mGlobalFileName) );
@@ -378,7 +378,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
bool bReadFile = !mfileName.isEmpty();
while(bReadFile) {
bReadFile = false;
- QString bootLanguage;
+ TQString bootLanguage;
if (useKDEGlobals && localeString.isEmpty() && !KGlobal::_locale) {
// Boot strap language
bootLanguage = KLocale::_initLanguage(pConfig);
@@ -386,17 +386,17 @@ bool KConfigINIBackEnd::parseConfigFiles()
}
bFileImmutable = false;
- QStringList list;
- if ( !QDir::isRelativePath(mfileName) )
+ TQStringList list;
+ if ( !TQDir::isRelativePath(mfileName) )
list << mfileName;
else
list = KGlobal::dirs()->findAllResources(resType, mfileName);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = list.fromLast(); it != list.end(); --it) {
- QFile aConfigFile( *it );
+ TQFile aConfigFile( *it );
// we can already be sure that this file exists
bool bIsLocal = (*it == mLocalFileName);
if (aConfigFile.open( IO_ReadOnly )) {
@@ -408,7 +408,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
}
if (KGlobal::dirs()->isRestrictedResource(resType, mfileName))
bFileImmutable = true;
- QString currentLanguage;
+ TQString currentLanguage;
if (!bootLanguage.isEmpty())
{
currentLanguage = KLocale::_initLanguage(pConfig);
@@ -443,13 +443,13 @@ extern "C" {
extern bool kde_kiosk_exception;
-void KConfigINIBackEnd::parseSingleConfigFile(QFile &rFile,
+void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
KEntryMap *pWriteBackMap,
bool bGlobal, bool bDefault)
{
const char *s; // May get clobbered by sigsetjump, but we don't use them afterwards.
const char *eof; // May get clobbered by sigsetjump, but we don't use them afterwards.
- QByteArray data;
+ TQByteArray data;
if (!rFile.isOpen()) // come back, if you have real work for us ;->
return;
@@ -459,7 +459,7 @@ void KConfigINIBackEnd::parseSingleConfigFile(QFile &rFile,
//qWarning("Parsing %s, global = %s default = %s",
// rFile.name().latin1(), bGlobal ? "true" : "false", bDefault ? "true" : "false");
- QCString aCurrentGroup("<default>");
+ TQCString aCurrentGroup("<default>");
static unsigned int ll = localeString.length();
@@ -506,7 +506,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
bool groupOptionImmutable = false;
bool groupSkip = false;
bool foundGettextDomain = false;
- QCString gettextDomain;
+ TQCString gettextDomain;
int line = 0;
for(; s < eof; s++)
@@ -682,7 +682,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
{
// backward compatibility. C == en_US
if ( cl != 1 || ll != 5 || *locale != 'C' || memcmp(localeString.data(), "en_US", 5)) {
- //cout<<"mismatched locale '"<<QCString(locale, elocale-locale +1)<<"'"<<endl;
+ //cout<<"mismatched locale '"<<TQCString(locale, elocale-locale +1)<<"'"<<endl;
// We can ignore this one
if (!pWriteBackMap)
continue; // We just ignore it
@@ -694,11 +694,11 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
}
// insert the key/value line
- QCString key(startLine, endOfKey - startLine + 2);
- QCString val = printableToString(st, s - st);
+ TQCString key(startLine, endOfKey - startLine + 2);
+ TQCString val = printableToString(st, s - st);
//qDebug("found key '%s' with value '%s'", key.data(), val.data());
- if (QString(key.data()) == "X-Ubuntu-Gettext-Domain") {
+ if (TQString(key.data()) == "X-Ubuntu-Gettext-Domain") {
gettextDomain = val.data();
foundGettextDomain = true;
}
@@ -734,22 +734,22 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
// Ideas: only translate most important fields, only translate "Desktop Entry" files,
// do translation per KConfig not per single file
if (!pWriteBackMap) {
- QFile file("file.txt");
+ TQFile file("file.txt");
if (foundGettextDomain) {
KLocale locale(gettextDomain);
- QString language = locale.language();
- translateKey(locale, aCurrentGroup, QCString("Name"));
- translateKey(locale, aCurrentGroup, QCString("Comment"));
- translateKey(locale, aCurrentGroup, QCString("Language"));
- translateKey(locale, aCurrentGroup, QCString("Keywords"));
- translateKey(locale, aCurrentGroup, QCString("About"));
- translateKey(locale, aCurrentGroup, QCString("Description"));
- translateKey(locale, aCurrentGroup, QCString("GenericName"));
- translateKey(locale, aCurrentGroup, QCString("Query"));
- translateKey(locale, aCurrentGroup, QCString("ExtraNames"));
- translateKey(locale, aCurrentGroup, QCString("X-KDE-Submenu"));
+ TQString language = locale.language();
+ translateKey(locale, aCurrentGroup, TQCString("Name"));
+ translateKey(locale, aCurrentGroup, TQCString("Comment"));
+ translateKey(locale, aCurrentGroup, TQCString("Language"));
+ translateKey(locale, aCurrentGroup, TQCString("Keywords"));
+ translateKey(locale, aCurrentGroup, TQCString("About"));
+ translateKey(locale, aCurrentGroup, TQCString("Description"));
+ translateKey(locale, aCurrentGroup, TQCString("GenericName"));
+ translateKey(locale, aCurrentGroup, TQCString("Query"));
+ translateKey(locale, aCurrentGroup, TQCString("ExtraNames"));
+ translateKey(locale, aCurrentGroup, TQCString("X-KDE-Submenu"));
}
}
@@ -768,13 +768,13 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
#endif
}
-void KConfigINIBackEnd::translateKey(KLocale& locale, QCString currentGroup, QCString key) {
+void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) {
KEntryKey entryKey = KEntryKey(currentGroup, key);
KEntry entry = pConfig->lookupData(entryKey);
- if (QString(entry.mValue) != "") {
- QString orig = key + "=" + entry.mValue;
- QString translate = locale.translate(key + "=" + entry.mValue);
- if (QString::compare(orig, translate) != 0) {
+ if (TQString(entry.mValue) != "") {
+ TQString orig = key + "=" + entry.mValue;
+ TQString translate = locale.translate(key + "=" + entry.mValue);
+ if (TQString::compare(orig, translate) != 0) {
translate = translate.mid(key.length() + 1);
entry.mValue = translate.utf8();
entryKey.bLocal = true;
@@ -797,11 +797,11 @@ void KConfigINIBackEnd::sync(bool bMerge)
if (!mfileName.isEmpty()) {
// Create the containing dir if needed
- if ((resType!="config") && !QDir::isRelativePath(mLocalFileName))
+ if ((resType!="config") && !TQDir::isRelativePath(mLocalFileName))
{
KURL path;
path.setPath(mLocalFileName);
- QString dir=path.directory();
+ TQString dir=path.directory();
KStandardDirs::makeDir(dir);
}
@@ -827,7 +827,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
// But what if the locking failed? Ignore it for now...
}
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
if ((d->localLastSize == info.size()) &&
(d->localLastModified == info.lastModified()))
{
@@ -837,7 +837,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
else
{
// Changed...
- d->localLastModified = QDateTime();
+ d->localLastModified = TQDateTime();
d->localLastSize = 0;
}
}
@@ -854,7 +854,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
// For KDE 4.0 we may wish to reconsider that.
if (!mergeLocalFile)
{
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
d->localLastModified = info.lastModified();
d->localLastSize = info.size();
}
@@ -885,10 +885,10 @@ void KConfigINIBackEnd::sync(bool bMerge)
}
-static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultGroup, bool &firstEntry, const QCString &localeString)
+static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultGroup, bool &firstEntry, const TQCString &localeString)
{
// now write out all other groups.
- QCString currentGroup;
+ TQCString currentGroup;
for (KEntryMapConstIterator aIt = entryMap.begin();
aIt != entryMap.end(); ++aIt)
{
@@ -975,7 +975,7 @@ static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultG
}
bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
- QFile *mergeFile)
+ TQFile *mergeFile)
{
bool bEntriesLeft = false;
bFileImmutable = false;
@@ -1027,8 +1027,8 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
return bEntriesLeft;
}
-/* antlarr: KDE 4.0: make the first parameter "const QString &" */
-bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
+/* antlarr: KDE 4.0: make the first parameter "const TQString &" */
+bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal,
bool bMerge)
{
// is the config object read-only?
@@ -1036,7 +1036,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
return true; // pretend we wrote it
KEntryMap aTempMap;
- QFile *mergeFile = (bMerge ? new QFile(filename) : 0);
+ TQFile *mergeFile = (bMerge ? new TQFile(filename) : 0);
bool bEntriesLeft = getEntryMap(aTempMap, bGlobal, mergeFile);
delete mergeFile;
if (bFileImmutable)
@@ -1050,7 +1050,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
bool createNew = true;
KDE_struct_stat buf;
- if (KDE_stat(QFile::encodeName(filename), &buf) == 0)
+ if (KDE_stat(TQFile::encodeName(filename), &buf) == 0)
{
if (buf.st_uid == getuid())
{
@@ -1092,7 +1092,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
{
// Open existing file.
// We use open() to ensure that we call without O_CREAT.
- int fd = KDE_open( QFile::encodeName(filename), O_WRONLY | O_TRUNC );
+ int fd = KDE_open( TQFile::encodeName(filename), O_WRONLY | O_TRUNC );
if (fd < 0)
{
return bEntriesLeft;
@@ -1113,7 +1113,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
if ( bEmptyFile && ((fileMode == -1) || (fileMode == 0600)) )
{
// File is empty and doesn't have special permissions: delete it.
- ::unlink(QFile::encodeName(filename));
+ ::unlink(TQFile::encodeName(filename));
pConfigFile->abort();
}
else
@@ -1152,7 +1152,7 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// WARNING: Do NOT use the event loop as it may not exist at this time.
bool allWritable = true;
- QString errorMsg;
+ TQString errorMsg;
if ( !mLocalFileName.isEmpty() && !bFileImmutable && !checkAccess(mLocalFileName,W_OK) )
{
errorMsg = i18n("Will not save configuration.\n");
@@ -1173,7 +1173,7 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// Note: We don't ask the user if we should not ask this question again because we can't save the answer.
errorMsg += i18n("Please contact your system administrator.");
- QString cmdToExec = KStandardDirs::findExe(QString("kdialog"));
+ TQString cmdToExec = KStandardDirs::findExe(TQString("kdialog"));
KApplication *app = kapp;
if (!cmdToExec.isEmpty() && app)
{
diff --git a/kdecore/kconfigbackend.h b/kdecore/kconfigbackend.h
index 696062bf4..145602e0f 100644
--- a/kdecore/kconfigbackend.h
+++ b/kdecore/kconfigbackend.h
@@ -65,7 +65,7 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigBackEnd(KConfigBase *_config, const QString &_fileName,
+ KConfigBackEnd(KConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals);
/**
@@ -102,7 +102,7 @@ public:
* @param _useKDEGlobals specifies whether or not to also parse the
* global KDE configuration files.
*/
- void changeFileName(const QString &_fileName, const char * _resType,
+ void changeFileName(const TQString &_fileName, const char * _resType,
bool _useKDEGlobals);
/**
@@ -117,7 +117,7 @@ public:
* Returns the filename as passed to the constructor.
* @return the filename as passed to the constructor.
*/
- QString fileName() const { return mfileName; }
+ TQString fileName() const { return mfileName; }
/**
* Returns the resource type as passed to the constructor.
@@ -130,7 +130,7 @@ public:
* @param _localeString the identifier of the language
* @see KLocale
*/
- void setLocaleString(const QCString &_localeString) { localeString = _localeString; }
+ void setLocaleString(const TQCString &_localeString) { localeString = _localeString; }
/**
* Set the file mode for newly created files.
@@ -159,18 +159,18 @@ private:
/**
* @deprecated Use fileName() instead
*/
- KDE_DEPRECATED QString filename() const { return mfileName; }
+ KDE_DEPRECATED TQString filename() const { return mfileName; }
protected:
KConfigBase *pConfig;
- QString mfileName;
- QCString resType;
+ TQString mfileName;
+ TQCString resType;
bool useKDEGlobals : 1;
bool bFileImmutable : 1;
- QCString localeString;
- QString mLocalFileName;
- QString mGlobalFileName;
+ TQCString localeString;
+ TQString mLocalFileName;
+ TQString mGlobalFileName;
KConfigBase::ConfigState mConfigState;
int mFileMode;
@@ -207,7 +207,7 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigINIBackEnd(KConfigBase *_config, const QString &_fileName,
+ KConfigINIBackEnd(KConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals = true)
: KConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {}
@@ -248,13 +248,13 @@ protected:
* @param bDefault Specifies whether entries should be marked as
* being default values.
*/
- void parseSingleConfigFile(QFile& rFile, KEntryMap *pWriteBackMap = 0L,
+ void parseSingleConfigFile(TQFile& rFile, KEntryMap *pWriteBackMap = 0L,
bool bGlobal = false, bool bDefault = false);
// Kubuntu patch, 2006-08-03
// looks up a key in with KLocale
// see https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- void translateKey(KLocale& locale, QCString currentGroup, QCString key);
+ void translateKey(KLocale& locale, TQCString currentGroup, TQCString key);
/**
* Writes configuration file back.
@@ -270,7 +270,7 @@ protected:
* @return Whether some entries are left to be written to other
* files.
*/
- bool writeConfigFile(QString filename, bool bGlobal = false, bool bMerge = true);
+ bool writeConfigFile(TQString filename, bool bGlobal = false, bool bMerge = true);
/** Get the entry map.
*
@@ -284,7 +284,7 @@ protected:
* @return Whether there will be some entries left for writing to other
* files.
*/
- bool getEntryMap(KEntryMap &map, bool bGlobal, QFile *mergeFile);
+ bool getEntryMap(KEntryMap &map, bool bGlobal, TQFile *mergeFile);
/** Write the entries in @e aTempMap to the file stream.*/
void writeEntries(FILE *pStream, const KEntryMap &aTempMap);
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 05156e969..3c80e5710 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -51,7 +51,7 @@ KConfigBase::KConfigBase()
: backEnd(0L), bDirty(false), bLocaleInitialized(false),
bReadOnly(false), bExpand(false), d(0)
{
- setGroup(QString::null);
+ setGroup(TQString::null);
}
KConfigBase::~KConfigBase()
@@ -71,12 +71,12 @@ void KConfigBase::setLocale()
backEnd->setLocaleString(aLocaleString);
}
-QString KConfigBase::locale() const
+TQString KConfigBase::locale() const
{
- return QString::fromUtf8(aLocaleString);
+ return TQString::fromUtf8(aLocaleString);
}
-void KConfigBase::setGroup( const QString& group )
+void KConfigBase::setGroup( const TQString& group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -86,10 +86,10 @@ void KConfigBase::setGroup( const QString& group )
void KConfigBase::setGroup( const char *pGroup )
{
- setGroup(QCString(pGroup));
+ setGroup(TQCString(pGroup));
}
-void KConfigBase::setGroup( const QCString &group )
+void KConfigBase::setGroup( const TQCString &group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -97,8 +97,8 @@ void KConfigBase::setGroup( const QCString &group )
mGroup = group;
}
-QString KConfigBase::group() const {
- return QString::fromUtf8(mGroup);
+TQString KConfigBase::group() const {
+ return TQString::fromUtf8(mGroup);
}
void KConfigBase::setDesktopGroup()
@@ -106,7 +106,7 @@ void KConfigBase::setDesktopGroup()
mGroup = "Desktop Entry";
}
-bool KConfigBase::hasKey(const QString &key) const
+bool KConfigBase::hasKey(const TQString &key) const
{
return hasKey(key.utf8().data());
}
@@ -131,17 +131,17 @@ bool KConfigBase::hasKey(const char *pKey) const
return !entry.mValue.isNull();
}
-bool KConfigBase::hasGroup(const QString &group) const
+bool KConfigBase::hasGroup(const TQString &group) const
{
return internalHasGroup( group.utf8());
}
bool KConfigBase::hasGroup(const char *_pGroup) const
{
- return internalHasGroup( QCString(_pGroup));
+ return internalHasGroup( TQCString(_pGroup));
}
-bool KConfigBase::hasGroup(const QCString &_pGroup) const
+bool KConfigBase::hasGroup(const TQCString &_pGroup) const
{
return internalHasGroup( _pGroup);
}
@@ -151,7 +151,7 @@ bool KConfigBase::isImmutable() const
return (getConfigState() != ReadWrite);
}
-bool KConfigBase::groupIsImmutable(const QString &group) const
+bool KConfigBase::groupIsImmutable(const TQString &group) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -161,7 +161,7 @@ bool KConfigBase::groupIsImmutable(const QString &group) const
return entry.bImmutable;
}
-bool KConfigBase::entryIsImmutable(const QString &key) const
+bool KConfigBase::entryIsImmutable(const TQString &key) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -171,7 +171,7 @@ bool KConfigBase::entryIsImmutable(const QString &key) const
if (aEntryData.bImmutable)
return true;
- QCString utf8_key = key.utf8();
+ TQCString utf8_key = key.utf8();
entryKey.c_key = utf8_key.data();
aEntryData = lookupData(entryKey); // Normal entry
if (aEntryData.bImmutable)
@@ -183,31 +183,31 @@ bool KConfigBase::entryIsImmutable(const QString &key) const
}
-QString KConfigBase::readEntryUntranslated( const QString& pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntryUntranslated( const TQString& pKey,
+ const TQString& aDefault ) const
{
return KConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault);
}
-QString KConfigBase::readEntryUntranslated( const char *pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntryUntranslated( const char *pKey,
+ const TQString& aDefault ) const
{
- QCString result = readEntryUtf8(pKey);
+ TQCString result = readEntryUtf8(pKey);
if (result.isNull())
return aDefault;
- return QString::fromUtf8(result);
+ return TQString::fromUtf8(result);
}
-QString KConfigBase::readEntry( const QString& pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntry( const TQString& pKey,
+ const TQString& aDefault ) const
{
return KConfigBase::readEntry(pKey.utf8().data(), aDefault);
}
-QString KConfigBase::readEntry( const char *pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntry( const char *pKey,
+ const TQString& aDefault ) const
{
// we need to access _locale instead of the method locale()
// because calling locale() will create a locale object if it
@@ -219,7 +219,7 @@ QString KConfigBase::readEntry( const char *pKey,
that->setLocale();
}
- QString aValue;
+ TQString aValue;
bool expand = false;
// construct a localized version of the key
@@ -238,10 +238,10 @@ QString KConfigBase::readEntry( const char *pKey,
entryKey.bLocal = false;
aEntryData = lookupData(entryKey);
if (!aEntryData.mValue.isNull()) {
- aValue = QString::fromUtf8(aEntryData.mValue.data());
+ aValue = TQString::fromUtf8(aEntryData.mValue.data());
if (aValue.isNull())
{
- static const QString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = KGlobal::staticQString("");
aValue = emptyString;
}
expand = aEntryData.bExpand;
@@ -264,14 +264,14 @@ QString KConfigBase::readEntry( const char *pKey,
while ( (nEndPos <= aValue.length()) && (aValue[nEndPos]!=')') )
nEndPos++;
nEndPos++;
- QString cmd = aValue.mid( nDollarPos+2, nEndPos-nDollarPos-3 );
+ TQString cmd = aValue.mid( nDollarPos+2, nEndPos-nDollarPos-3 );
- QString result;
- FILE *fs = popen(QFile::encodeName(cmd).data(), "r");
+ TQString result;
+ FILE *fs = popen(TQFile::encodeName(cmd).data(), "r");
if (fs)
{
{
- QTextStream ts(fs, IO_ReadOnly);
+ TQTextStream ts(fs, IO_ReadOnly);
result = ts.read().stripWhiteSpace();
}
pclose(fs);
@@ -280,7 +280,7 @@ QString KConfigBase::readEntry( const char *pKey,
} else if( (aValue)[nDollarPos+1] != '$' ) {
uint nEndPos = nDollarPos+1;
// the next character is no $
- QString aVarName;
+ TQString aVarName;
if (aValue[nEndPos]=='{')
{
while ( (nEndPos <= aValue.length()) && (aValue[nEndPos]!='}') )
@@ -317,7 +317,7 @@ QString KConfigBase::readEntry( const char *pKey,
return aValue;
}
-QCString KConfigBase::readEntryUtf8( const char *pKey) const
+TQCString KConfigBase::readEntryUtf8( const char *pKey) const
{
// We don't try the localized key
KEntryKey entryKey(mGroup, 0);
@@ -327,129 +327,129 @@ QCString KConfigBase::readEntryUtf8( const char *pKey) const
if (aEntryData.bExpand)
{
// We need to do fancy, take the slow route.
- return readEntry(pKey, QString::null).utf8();
+ return readEntry(pKey, TQString::null).utf8();
}
return aEntryData.mValue;
}
-QVariant KConfigBase::readPropertyEntry( const QString& pKey,
- QVariant::Type type ) const
+TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+ TQVariant::Type type ) const
{
return readPropertyEntry(pKey.utf8().data(), type);
}
-QVariant KConfigBase::readPropertyEntry( const char *pKey,
- QVariant::Type type ) const
+TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+ TQVariant::Type type ) const
{
- QVariant va;
+ TQVariant va;
if ( !hasKey( pKey ) ) return va;
(void)va.cast(type);
return readPropertyEntry(pKey, va);
}
-QVariant KConfigBase::readPropertyEntry( const QString& pKey,
- const QVariant &aDefault ) const
+TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+ const TQVariant &aDefault ) const
{
return readPropertyEntry(pKey.utf8().data(), aDefault);
}
-QVariant KConfigBase::readPropertyEntry( const char *pKey,
- const QVariant &aDefault ) const
+TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+ const TQVariant &aDefault ) const
{
if ( !hasKey( pKey ) ) return aDefault;
- QVariant tmp = aDefault;
+ TQVariant tmp = aDefault;
switch( aDefault.type() )
{
- case QVariant::Invalid:
- return QVariant();
- case QVariant::String:
- return QVariant( readEntry( pKey, aDefault.toString() ) );
- case QVariant::StringList:
- return QVariant( readListEntry( pKey ) );
- case QVariant::List: {
- QStringList strList = readListEntry( pKey );
- QStringList::ConstIterator it = strList.begin();
- QStringList::ConstIterator end = strList.end();
- QValueList<QVariant> list;
+ case TQVariant::Invalid:
+ return TQVariant();
+ case TQVariant::String:
+ return TQVariant( readEntry( pKey, aDefault.toString() ) );
+ case TQVariant::StringList:
+ return TQVariant( readListEntry( pKey ) );
+ case TQVariant::List: {
+ TQStringList strList = readListEntry( pKey );
+ TQStringList::ConstIterator it = strList.begin();
+ TQStringList::ConstIterator end = strList.end();
+ TQValueList<TQVariant> list;
for (; it != end; ++it ) {
tmp = *it;
list.append( tmp );
}
- return QVariant( list );
+ return TQVariant( list );
}
- case QVariant::Font:
- return QVariant( readFontEntry( pKey, &tmp.asFont() ) );
- case QVariant::Point:
- return QVariant( readPointEntry( pKey, &tmp.asPoint() ) );
- case QVariant::Rect:
- return QVariant( readRectEntry( pKey, &tmp.asRect() ) );
- case QVariant::Size:
- return QVariant( readSizeEntry( pKey, &tmp.asSize() ) );
- case QVariant::Color:
- return QVariant( readColorEntry( pKey, &tmp.asColor() ) );
- case QVariant::Int:
- return QVariant( readNumEntry( pKey, aDefault.toInt() ) );
- case QVariant::UInt:
- return QVariant( readUnsignedNumEntry( pKey, aDefault.toUInt() ) );
- case QVariant::LongLong:
- return QVariant( readNum64Entry( pKey, aDefault.toLongLong() ) );
- case QVariant::ULongLong:
- return QVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) );
- case QVariant::Bool:
- return QVariant( readBoolEntry( pKey, aDefault.toBool() ), 0 );
- case QVariant::Double:
- return QVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) );
- case QVariant::DateTime:
- return QVariant( readDateTimeEntry( pKey, &tmp.asDateTime() ) );
- case QVariant::Date:
- return QVariant(readDateTimeEntry( pKey, &tmp.asDateTime() ).date());
-
- case QVariant::Pixmap:
- case QVariant::Image:
- case QVariant::Brush:
- case QVariant::Palette:
- case QVariant::ColorGroup:
- case QVariant::Map:
- case QVariant::IconSet:
- case QVariant::CString:
- case QVariant::PointArray:
- case QVariant::Region:
- case QVariant::Bitmap:
- case QVariant::Cursor:
- case QVariant::SizePolicy:
- case QVariant::Time:
- case QVariant::ByteArray:
- case QVariant::BitArray:
- case QVariant::KeySequence:
- case QVariant::Pen:
+ case TQVariant::Font:
+ return TQVariant( readFontEntry( pKey, &tmp.asFont() ) );
+ case TQVariant::Point:
+ return TQVariant( readPointEntry( pKey, &tmp.asPoint() ) );
+ case TQVariant::Rect:
+ return TQVariant( readRectEntry( pKey, &tmp.asRect() ) );
+ case TQVariant::Size:
+ return TQVariant( readSizeEntry( pKey, &tmp.asSize() ) );
+ case TQVariant::Color:
+ return TQVariant( readColorEntry( pKey, &tmp.asColor() ) );
+ case TQVariant::Int:
+ return TQVariant( readNumEntry( pKey, aDefault.toInt() ) );
+ case TQVariant::UInt:
+ return TQVariant( readUnsignedNumEntry( pKey, aDefault.toUInt() ) );
+ case TQVariant::LongLong:
+ return TQVariant( readNum64Entry( pKey, aDefault.toLongLong() ) );
+ case TQVariant::ULongLong:
+ return TQVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) );
+ case TQVariant::Bool:
+ return TQVariant( readBoolEntry( pKey, aDefault.toBool() ), 0 );
+ case TQVariant::Double:
+ return TQVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) );
+ case TQVariant::DateTime:
+ return TQVariant( readDateTimeEntry( pKey, &tmp.asDateTime() ) );
+ case TQVariant::Date:
+ return TQVariant(readDateTimeEntry( pKey, &tmp.asDateTime() ).date());
+
+ case TQVariant::Pixmap:
+ case TQVariant::Image:
+ case TQVariant::Brush:
+ case TQVariant::Palette:
+ case TQVariant::ColorGroup:
+ case TQVariant::Map:
+ case TQVariant::IconSet:
+ case TQVariant::CString:
+ case TQVariant::PointArray:
+ case TQVariant::Region:
+ case TQVariant::Bitmap:
+ case TQVariant::Cursor:
+ case TQVariant::SizePolicy:
+ case TQVariant::Time:
+ case TQVariant::ByteArray:
+ case TQVariant::BitArray:
+ case TQVariant::KeySequence:
+ case TQVariant::Pen:
break;
}
Q_ASSERT( 0 );
- return QVariant();
+ return TQVariant();
}
-int KConfigBase::readListEntry( const QString& pKey,
- QStrList &list, char sep ) const
+int KConfigBase::readListEntry( const TQString& pKey,
+ TQStrList &list, char sep ) const
{
return readListEntry(pKey.utf8().data(), list, sep);
}
int KConfigBase::readListEntry( const char *pKey,
- QStrList &list, char sep ) const
+ TQStrList &list, char sep ) const
{
if( !hasKey( pKey ) )
return 0;
- QCString str_list = readEntryUtf8( pKey );
+ TQCString str_list = readEntryUtf8( pKey );
if (str_list.isEmpty())
return 0;
list.clear();
- QCString value = "";
+ TQCString value = "";
int len = str_list.length();
for (int i = 0; i < len; i++) {
@@ -466,7 +466,7 @@ int KConfigBase::readListEntry( const char *pKey,
// if we fell through to here, we are at a separator. Append
// contents of value to the list
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
- // A QStrList may contain values in 8bit locale cpecified
+ // A TQStrList may contain values in 8bit locale cpecified
// encoding
list.append( value );
value.truncate(0);
@@ -477,22 +477,22 @@ int KConfigBase::readListEntry( const char *pKey,
return list.count();
}
-QStringList KConfigBase::readListEntry( const QString& pKey, char sep ) const
+TQStringList KConfigBase::readListEntry( const TQString& pKey, char sep ) const
{
return readListEntry(pKey.utf8().data(), sep);
}
-QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
+TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
{
- static const QString& emptyString = KGlobal::staticQString("");
+ static const TQString& emptyString = KGlobal::staticQString("");
- QStringList list;
+ TQStringList list;
if( !hasKey( pKey ) )
return list;
- QString str_list = readEntry( pKey );
+ TQString str_list = readEntry( pKey );
if( str_list.isEmpty() )
return list;
- QString value(emptyString);
+ TQString value(emptyString);
int len = str_list.length();
// obviously too big, but faster than letting each += resize the string.
value.reserve( len );
@@ -510,7 +510,7 @@ QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
value += str_list[i];
continue;
}
- QString finalvalue( value );
+ TQString finalvalue( value );
finalvalue.squeeze();
list.append( finalvalue );
value.truncate( 0 );
@@ -523,7 +523,7 @@ QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
return list;
}
-QStringList KConfigBase::readListEntry( const char* pKey, const QStringList& aDefault,
+TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault,
char sep ) const
{
if ( !hasKey( pKey ) )
@@ -532,17 +532,17 @@ QStringList KConfigBase::readListEntry( const char* pKey, const QStringList& aDe
return readListEntry( pKey, sep );
}
-QValueList<int> KConfigBase::readIntListEntry( const QString& pKey ) const
+TQValueList<int> KConfigBase::readIntListEntry( const TQString& pKey ) const
{
return readIntListEntry(pKey.utf8().data());
}
-QValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
+TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
{
- QStringList strlist = readListEntry(pKey);
- QValueList<int> list;
- QStringList::ConstIterator end(strlist.end());
- for (QStringList::ConstIterator it = strlist.begin(); it != end; ++it)
+ TQStringList strlist = readListEntry(pKey);
+ TQValueList<int> list;
+ TQStringList::ConstIterator end(strlist.end());
+ for (TQStringList::ConstIterator it = strlist.begin(); it != end; ++it)
// I do not check if the toInt failed because I consider the number of items
// more important than their value
list << (*it).toInt();
@@ -550,42 +550,42 @@ QValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
return list;
}
-QString KConfigBase::readPathEntry( const QString& pKey, const QString& pDefault ) const
+TQString KConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const
{
return readPathEntry(pKey.utf8().data(), pDefault);
}
-QString KConfigBase::readPathEntry( const char *pKey, const QString& pDefault ) const
+TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
- QString aValue = readEntry( pKey, pDefault );
+ TQString aValue = readEntry( pKey, pDefault );
bExpand = bExpandSave;
return aValue;
}
-QStringList KConfigBase::readPathListEntry( const QString& pKey, char sep ) const
+TQStringList KConfigBase::readPathListEntry( const TQString& pKey, char sep ) const
{
return readPathListEntry(pKey.utf8().data(), sep);
}
-QStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
+TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
- QStringList aValue = readListEntry( pKey, sep );
+ TQStringList aValue = readListEntry( pKey, sep );
bExpand = bExpandSave;
return aValue;
}
-int KConfigBase::readNumEntry( const QString& pKey, int nDefault) const
+int KConfigBase::readNumEntry( const TQString& pKey, int nDefault) const
{
return readNumEntry(pKey.utf8().data(), nDefault);
}
int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else if( aValue == "true" || aValue == "on" || aValue == "yes" )
@@ -599,14 +599,14 @@ int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
}
-unsigned int KConfigBase::readUnsignedNumEntry( const QString& pKey, unsigned int nDefault) const
+unsigned int KConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const
{
return readUnsignedNumEntry(pKey.utf8().data(), nDefault);
}
unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -618,14 +618,14 @@ unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int n
}
-long KConfigBase::readLongNumEntry( const QString& pKey, long nDefault) const
+long KConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const
{
return readLongNumEntry(pKey.utf8().data(), nDefault);
}
long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -637,14 +637,14 @@ long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
}
-unsigned long KConfigBase::readUnsignedLongNumEntry( const QString& pKey, unsigned long nDefault) const
+unsigned long KConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const
{
return readUnsignedLongNumEntry(pKey.utf8().data(), nDefault);
}
unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -655,15 +655,15 @@ unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned
}
}
-Q_INT64 KConfigBase::readNum64Entry( const QString& pKey, Q_INT64 nDefault) const
+Q_INT64 KConfigBase::readNum64Entry( const TQString& pKey, Q_INT64 nDefault) const
{
return readNum64Entry(pKey.utf8().data(), nDefault);
}
Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
{
- // Note that QCString::toLongLong() is missing, we muse use a QString instead.
- QString aValue = readEntry( pKey );
+ // Note that TQCString::toLongLong() is missing, we muse use a TQString instead.
+ TQString aValue = readEntry( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -675,15 +675,15 @@ Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
}
-Q_UINT64 KConfigBase::readUnsignedNum64Entry( const QString& pKey, Q_UINT64 nDefault) const
+Q_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault) const
{
return readUnsignedNum64Entry(pKey.utf8().data(), nDefault);
}
Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefault) const
{
- // Note that QCString::toULongLong() is missing, we muse use a QString instead.
- QString aValue = readEntry( pKey );
+ // Note that TQCString::toULongLong() is missing, we muse use a TQString instead.
+ TQString aValue = readEntry( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -694,14 +694,14 @@ Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefaul
}
}
-double KConfigBase::readDoubleNumEntry( const QString& pKey, double nDefault) const
+double KConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const
{
return readDoubleNumEntry(pKey.utf8().data(), nDefault);
}
double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -713,14 +713,14 @@ double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
}
-bool KConfigBase::readBoolEntry( const QString& pKey, bool bDefault ) const
+bool KConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const
{
return readBoolEntry(pKey.utf8().data(), bDefault);
}
bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return bDefault;
@@ -740,16 +740,16 @@ bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
}
}
-QFont KConfigBase::readFontEntry( const QString& pKey, const QFont* pDefault ) const
+TQFont KConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const
{
return readFontEntry(pKey.utf8().data(), pDefault);
}
-QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) const
+TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const
{
- QFont aRetFont;
+ TQFont aRetFont;
- QString aValue = readEntry( pKey );
+ TQString aValue = readEntry( pKey );
if( !aValue.isNull() ) {
if ( aValue.contains( ',' ) > 5 ) {
// KDE3 and upwards entry
@@ -790,7 +790,7 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
return aRetFont;
}
- aRetFont.setStyleHint( (QFont::StyleHint)aValue.mid( nOldIndex+1, nIndex-nOldIndex-1 ).toUInt() );
+ aRetFont.setStyleHint( (TQFont::StyleHint)aValue.mid( nOldIndex+1, nIndex-nOldIndex-1 ).toUInt() );
// find fourth part (char set)
nOldIndex = nIndex;
@@ -802,7 +802,7 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
return aRetFont;
}
- QString chStr=aValue.mid( nOldIndex+1,
+ TQString chStr=aValue.mid( nOldIndex+1,
nIndex-nOldIndex-1 );
// find fifth part (weight)
nOldIndex = nIndex;
@@ -837,14 +837,14 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
}
-QRect KConfigBase::readRectEntry( const QString& pKey, const QRect* pDefault ) const
+TQRect KConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const
{
return readRectEntry(pKey.utf8().data(), pDefault);
}
-QRect KConfigBase::readRectEntry( const char *pKey, const QRect* pDefault ) const
+TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -852,25 +852,25 @@ QRect KConfigBase::readRectEntry( const char *pKey, const QRect* pDefault ) cons
if (sscanf(aValue.data(), "%d,%d,%d,%d", &left, &top, &width, &height) == 4)
{
- return QRect(left, top, width, height);
+ return TQRect(left, top, width, height);
}
}
if (pDefault)
return *pDefault;
- return QRect();
+ return TQRect();
}
-QPoint KConfigBase::readPointEntry( const QString& pKey,
- const QPoint* pDefault ) const
+TQPoint KConfigBase::readPointEntry( const TQString& pKey,
+ const TQPoint* pDefault ) const
{
return readPointEntry(pKey.utf8().data(), pDefault);
}
-QPoint KConfigBase::readPointEntry( const char *pKey,
- const QPoint* pDefault ) const
+TQPoint KConfigBase::readPointEntry( const char *pKey,
+ const TQPoint* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -878,24 +878,24 @@ QPoint KConfigBase::readPointEntry( const char *pKey,
if (sscanf(aValue.data(), "%d,%d", &x, &y) == 2)
{
- return QPoint(x,y);
+ return TQPoint(x,y);
}
}
if (pDefault)
return *pDefault;
- return QPoint();
+ return TQPoint();
}
-QSize KConfigBase::readSizeEntry( const QString& pKey,
- const QSize* pDefault ) const
+TQSize KConfigBase::readSizeEntry( const TQString& pKey,
+ const TQSize* pDefault ) const
{
return readSizeEntry(pKey.utf8().data(), pDefault);
}
-QSize KConfigBase::readSizeEntry( const char *pKey,
- const QSize* pDefault ) const
+TQSize KConfigBase::readSizeEntry( const char *pKey,
+ const TQSize* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -903,28 +903,28 @@ QSize KConfigBase::readSizeEntry( const char *pKey,
if (sscanf(aValue.data(), "%d,%d", &width, &height) == 2)
{
- return QSize(width, height);
+ return TQSize(width, height);
}
}
if (pDefault)
return *pDefault;
- return QSize();
+ return TQSize();
}
-QColor KConfigBase::readColorEntry( const QString& pKey,
- const QColor* pDefault ) const
+TQColor KConfigBase::readColorEntry( const TQString& pKey,
+ const TQColor* pDefault ) const
{
return readColorEntry(pKey.utf8().data(), pDefault);
}
-QColor KConfigBase::readColorEntry( const char *pKey,
- const QColor* pDefault ) const
+TQColor KConfigBase::readColorEntry( const char *pKey,
+ const TQColor* pDefault ) const
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
- QString aValue = readEntry( pKey );
+ TQString aValue = readEntry( pKey );
if( !aValue.isEmpty() )
{
if ( aValue.at(0) == '#' )
@@ -977,39 +977,39 @@ QColor KConfigBase::readColorEntry( const char *pKey,
}
-QDateTime KConfigBase::readDateTimeEntry( const QString& pKey,
- const QDateTime* pDefault ) const
+TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey,
+ const TQDateTime* pDefault ) const
{
return readDateTimeEntry(pKey.utf8().data(), pDefault);
}
// ### currentDateTime() as fallback ? (Harri)
-QDateTime KConfigBase::readDateTimeEntry( const char *pKey,
- const QDateTime* pDefault ) const
+TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
+ const TQDateTime* pDefault ) const
{
if( !hasKey( pKey ) )
{
if( pDefault )
return *pDefault;
else
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
- QStrList list;
+ TQStrList list;
int count = readListEntry( pKey, list, ',' );
if( count == 6 ) {
- QDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ),
+ TQDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ),
atoi( list.at( 2 ) ) );
- QTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ),
+ TQTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ),
atoi( list.at( 5 ) ) );
- return QDateTime( date, time );
+ return TQDateTime( date, time );
}
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
-void KConfigBase::writeEntry( const QString& pKey, const QString& value,
+void KConfigBase::writeEntry( const TQString& pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1017,7 +1017,7 @@ void KConfigBase::writeEntry( const QString& pKey, const QString& value,
writeEntry(pKey.utf8().data(), value, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QString& value,
+void KConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1025,7 +1025,7 @@ void KConfigBase::writeEntry( const char *pKey, const QString& value,
writeEntry(pKey, value, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry( const char *pKey, const QString& value,
+void KConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS,
@@ -1058,7 +1058,7 @@ void KConfigBase::writeEntry( const char *pKey, const QString& value,
putData(entryKey, aEntryData, true);
}
-void KConfigBase::writePathEntry( const QString& pKey, const QString & path,
+void KConfigBase::writePathEntry( const TQString& pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
@@ -1066,10 +1066,10 @@ void KConfigBase::writePathEntry( const QString& pKey, const QString & path,
}
-static bool cleanHomeDirPath( QString &path, const QString &homeDir )
+static bool cleanHomeDirPath( TQString &path, const TQString &homeDir )
{
#ifdef Q_WS_WIN //safer
- if (!QDir::convertSeparators(path).startsWith(QDir::convertSeparators(homeDir)))
+ if (!TQDir::convertSeparators(path).startsWith(TQDir::convertSeparators(homeDir)))
return false;
#else
if (!path.startsWith(homeDir))
@@ -1079,13 +1079,13 @@ static bool cleanHomeDirPath( QString &path, const QString &homeDir )
unsigned int len = homeDir.length();
// replace by "$HOME" if possible
if (len && (path.length() == len || path[len] == '/')) {
- path.replace(0, len, QString::fromLatin1("$HOME"));
+ path.replace(0, len, TQString::fromLatin1("$HOME"));
return true;
} else
return false;
}
-static QString translatePath( QString path )
+static TQString translatePath( TQString path )
{
if (path.isEmpty())
return path;
@@ -1112,9 +1112,9 @@ static QString translatePath( QString path )
// since it would not recognize paths without a trailing '/'.
// All of the 3 following functions to return the user's home directory
// can return different paths. We have to test all them.
- QString homeDir0 = QFile::decodeName(getenv("HOME"));
- QString homeDir1 = QDir::homeDirPath();
- QString homeDir2 = QDir(homeDir1).canonicalPath();
+ TQString homeDir0 = TQFile::decodeName(getenv("HOME"));
+ TQString homeDir1 = TQDir::homeDirPath();
+ TQString homeDir2 = TQDir(homeDir1).canonicalPath();
if (cleanHomeDirPath(path, homeDir0) ||
cleanHomeDirPath(path, homeDir1) ||
cleanHomeDirPath(path, homeDir2) ) {
@@ -1127,40 +1127,40 @@ static QString translatePath( QString path )
return path;
}
-void KConfigBase::writePathEntry( const char *pKey, const QString & path,
+void KConfigBase::writePathEntry( const char *pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, true);
}
-void KConfigBase::writePathEntry ( const QString& pKey, const QStringList &list,
+void KConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writePathEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writePathEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QStringList new_list;
- QStringList::ConstIterator it = list.begin();
+ TQStringList new_list;
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it )
{
- QString value = *it;
+ TQString value = *it;
new_list.append( translatePath(value) );
}
writeEntry( pKey, new_list, sep, bPersistent, bGlobal, bNLS, true );
}
-void KConfigBase::deleteEntry( const QString& pKey,
+void KConfigBase::deleteEntry( const TQString& pKey,
bool bNLS,
bool bGlobal)
{
@@ -1193,7 +1193,7 @@ void KConfigBase::deleteEntry( const char *pKey,
putData(entryKey, aEntryData, true);
}
-bool KConfigBase::deleteGroup( const QString& group, bool bDeep, bool bGlobal )
+bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal )
{
KEntryMap aEntryMap = internalEntryMap(group);
@@ -1224,33 +1224,33 @@ bool KConfigBase::deleteGroup( const QString& group, bool bDeep, bool bGlobal )
return true;
}
-void KConfigBase::writeEntry ( const QString& pKey, const QVariant &prop,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), prop, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QVariant &prop,
+void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
switch( prop.type() )
{
- case QVariant::Invalid:
+ case TQVariant::Invalid:
writeEntry( pKey, "", bPersistent, bGlobal, bNLS );
return;
- case QVariant::String:
+ case TQVariant::String:
writeEntry( pKey, prop.toString(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::StringList:
+ case TQVariant::StringList:
writeEntry( pKey, prop.toStringList(), ',', bPersistent, bGlobal, bNLS );
return;
- case QVariant::List: {
- QValueList<QVariant> list = prop.toList();
- QValueList<QVariant>::ConstIterator it = list.begin();
- QValueList<QVariant>::ConstIterator end = list.end();
- QStringList strList;
+ case TQVariant::List: {
+ TQValueList<TQVariant> list = prop.toList();
+ TQValueList<TQVariant>::ConstIterator it = list.begin();
+ TQValueList<TQVariant>::ConstIterator end = list.end();
+ TQStringList strList;
for (; it != end; ++it )
strList.append( (*it).toString() );
@@ -1259,94 +1259,94 @@ void KConfigBase::writeEntry ( const char *pKey, const QVariant &prop,
return;
}
- case QVariant::Font:
+ case TQVariant::Font:
writeEntry( pKey, prop.toFont(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Point:
+ case TQVariant::Point:
writeEntry( pKey, prop.toPoint(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Rect:
+ case TQVariant::Rect:
writeEntry( pKey, prop.toRect(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Size:
+ case TQVariant::Size:
writeEntry( pKey, prop.toSize(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Color:
+ case TQVariant::Color:
writeEntry( pKey, prop.toColor(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Int:
+ case TQVariant::Int:
writeEntry( pKey, prop.toInt(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::UInt:
+ case TQVariant::UInt:
writeEntry( pKey, prop.toUInt(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::LongLong:
+ case TQVariant::LongLong:
writeEntry( pKey, prop.toLongLong(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::ULongLong:
+ case TQVariant::ULongLong:
writeEntry( pKey, prop.toULongLong(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Bool:
+ case TQVariant::Bool:
writeEntry( pKey, prop.toBool(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Double:
+ case TQVariant::Double:
writeEntry( pKey, prop.toDouble(), bPersistent, bGlobal, 'g', 6, bNLS );
return;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
writeEntry( pKey, prop.toDateTime(), bPersistent, bGlobal, bNLS);
return;
- case QVariant::Date:
- writeEntry( pKey, QDateTime(prop.toDate()), bPersistent, bGlobal, bNLS);
+ case TQVariant::Date:
+ writeEntry( pKey, TQDateTime(prop.toDate()), bPersistent, bGlobal, bNLS);
return;
- case QVariant::Pixmap:
- case QVariant::Image:
- case QVariant::Brush:
- case QVariant::Palette:
- case QVariant::ColorGroup:
- case QVariant::Map:
- case QVariant::IconSet:
- case QVariant::CString:
- case QVariant::PointArray:
- case QVariant::Region:
- case QVariant::Bitmap:
- case QVariant::Cursor:
- case QVariant::SizePolicy:
- case QVariant::Time:
- case QVariant::ByteArray:
- case QVariant::BitArray:
- case QVariant::KeySequence:
- case QVariant::Pen:
+ case TQVariant::Pixmap:
+ case TQVariant::Image:
+ case TQVariant::Brush:
+ case TQVariant::Palette:
+ case TQVariant::ColorGroup:
+ case TQVariant::Map:
+ case TQVariant::IconSet:
+ case TQVariant::CString:
+ case TQVariant::PointArray:
+ case TQVariant::Region:
+ case TQVariant::Bitmap:
+ case TQVariant::Cursor:
+ case TQVariant::SizePolicy:
+ case TQVariant::Time:
+ case TQVariant::ByteArray:
+ case TQVariant::BitArray:
+ case TQVariant::KeySequence:
+ case TQVariant::Pen:
break;
}
Q_ASSERT( 0 );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QStrList &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStrList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QString str_list;
- QStrListIterator it( list );
+ TQString str_list;
+ TQStrListIterator it( list );
for( ; it.current(); ++it )
{
uint i;
- QString value;
+ TQString value;
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
- // A QStrList may contain values in 8bit locale cpecified
+ // A TQStrList may contain values in 8bit locale cpecified
// encoding or in UTF8 encoding.
value = KStringHandler::from8Bit(it.current());
uint strLengh(value.length());
@@ -1363,35 +1363,35 @@ void KConfigBase::writeEntry ( const char *pKey, const QStrList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey, list, sep, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep, bool bPersistent,
bool bGlobal, bool bNLS, bool bExpand )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QString str_list;
+ TQString str_list;
str_list.reserve( 4096 );
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it )
{
- QString value = *it;
+ TQString value = *it;
uint i;
uint strLength(value.length());
for( i = 0; i < strLength; i++ )
@@ -1407,116 +1407,116 @@ void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QValueList<int> &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QValueList<int> &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
- QStringList strlist;
- QValueList<int>::ConstIterator end = list.end();
- for (QValueList<int>::ConstIterator it = list.begin(); it != end; it++)
- strlist << QString::number(*it);
+ TQStringList strlist;
+ TQValueList<int>::ConstIterator end = list.end();
+ for (TQValueList<int>::ConstIterator it = list.begin(); it != end; it++)
+ strlist << TQString::number(*it);
writeEntry(pKey, strlist, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, int nValue,
+void KConfigBase::writeEntry( const TQString& pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, unsigned int nValue,
+void KConfigBase::writeEntry( const TQString& pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, long nValue,
+void KConfigBase::writeEntry( const TQString& pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, unsigned long nValue,
+void KConfigBase::writeEntry( const TQString& pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, Q_INT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, Q_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, Q_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, Q_UINT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, Q_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, Q_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, double nValue,
+void KConfigBase::writeEntry( const TQString& pKey, double nValue,
bool bPersistent, bool bGlobal,
char format, int precision,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue, format, precision),
+ writeEntry( pKey, TQString::number(nValue, format, precision),
bPersistent, bGlobal, bNLS );
}
@@ -1525,12 +1525,12 @@ void KConfigBase::writeEntry( const char *pKey, double nValue,
char format, int precision,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue, format, precision),
+ writeEntry( pKey, TQString::number(nValue, format, precision),
bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, bool bValue,
+void KConfigBase::writeEntry( const TQString& pKey, bool bValue,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1543,7 +1543,7 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue,
bool bGlobal,
bool bNLS )
{
- QString aValue;
+ TQString aValue;
if( bValue )
aValue = "true";
@@ -1554,14 +1554,14 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue,
}
-void KConfigBase::writeEntry( const QString& pKey, const QFont& rFont,
+void KConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rFont, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QFont& rFont,
+void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1569,19 +1569,19 @@ void KConfigBase::writeEntry( const char *pKey, const QFont& rFont,
}
-void KConfigBase::writeEntry( const QString& pKey, const QRect& rRect,
+void KConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rRect, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QRect& rRect,
+void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rRect.left() ) );
list.insert( 1, tempstr.setNum( rRect.top() ) );
list.insert( 2, tempstr.setNum( rRect.width() ) );
@@ -1591,19 +1591,19 @@ void KConfigBase::writeEntry( const char *pKey, const QRect& rRect,
}
-void KConfigBase::writeEntry( const QString& pKey, const QPoint& rPoint,
+void KConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rPoint, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QPoint& rPoint,
+void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rPoint.x() ) );
list.insert( 1, tempstr.setNum( rPoint.y() ) );
@@ -1611,26 +1611,26 @@ void KConfigBase::writeEntry( const char *pKey, const QPoint& rPoint,
}
-void KConfigBase::writeEntry( const QString& pKey, const QSize& rSize,
+void KConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rSize, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QSize& rSize,
+void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rSize.width() ) );
list.insert( 1, tempstr.setNum( rSize.height() ) );
writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, const QColor& rColor,
+void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1638,12 +1638,12 @@ void KConfigBase::writeEntry( const QString& pKey, const QColor& rColor,
writeEntry( pKey.utf8().data(), rColor, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QColor& rColor,
+void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
{
- QString aValue;
+ TQString aValue;
if (rColor.isValid())
aValue.sprintf( "%d,%d,%d", rColor.red(), rColor.green(), rColor.blue() );
else
@@ -1652,22 +1652,22 @@ void KConfigBase::writeEntry( const char *pKey, const QColor& rColor,
writeEntry( pKey, aValue, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, const QDateTime& rDateTime,
+void KConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rDateTime, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QDateTime& rDateTime,
+void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
- QTime time = rDateTime.time();
- QDate date = rDateTime.date();
+ TQTime time = rDateTime.time();
+ TQDate date = rDateTime.date();
list.insert( 0, tempstr.setNum( date.year() ) );
list.insert( 1, tempstr.setNum( date.month() ) );
@@ -1731,7 +1731,7 @@ bool KConfigBase::readDefaults() const
return (d && d->readDefaults);
}
-void KConfigBase::revertToDefault(const QString &key)
+void KConfigBase::revertToDefault(const TQString &key)
{
setDirty(true);
@@ -1758,7 +1758,7 @@ void KConfigBase::revertToDefault(const QString &key)
putData(aEntryKey, entry, true); // Revert
}
-bool KConfigBase::hasDefault(const QString &key) const
+bool KConfigBase::hasDefault(const TQString &key) const
{
KEntryKey aEntryKey(mGroup, key.utf8());
aEntryKey.bDefault = true;
@@ -1783,7 +1783,7 @@ bool KConfigBase::hasDefault(const QString &key) const
-KConfigGroup::KConfigGroup(KConfigBase *master, const QString &group)
+KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
@@ -1796,7 +1796,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const QString &group)
setReadDefaults(mMaster->readDefaults());
}
-KConfigGroup::KConfigGroup(KConfigBase *master, const QCString &group)
+KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
diff --git a/kdecore/kconfigbase.h b/kdecore/kconfigbase.h
index a393b4d87..69c7c3bc0 100644
--- a/kdecore/kconfigbase.h
+++ b/kdecore/kconfigbase.h
@@ -23,14 +23,14 @@
#ifndef _KCONFIGBASE_H
#define _KCONFIGBASE_H
-#include <qobject.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqmap.h>
#include "kconfigdata.h"
#include "kdelibs_export.h"
@@ -96,7 +96,7 @@ public:
* Switch back to the default group by passing a null string.
* @param group The name of the new group.
*/
- void setGroup( const QString& group );
+ void setGroup( const TQString& group );
/**
* Sets the group to the "Desktop Entry" group used for
@@ -110,7 +110,7 @@ public:
*
* @return The current group.
*/
- QString group() const;
+ TQString group() const;
/**
* Returns true if the specified group is known about.
@@ -118,21 +118,21 @@ public:
* @param group The group to search for.
* @return true if the group exists.
*/
- bool hasGroup(const QString &group) const;
+ bool hasGroup(const TQString &group) const;
/**
* Returns a list of groups that are known about.
*
* @return The list of groups.
**/
- virtual QStringList groupList() const = 0;
+ virtual TQStringList groupList() const = 0;
/**
* Returns a the current locale.
*
* @return A string representing the current locale.
*/
- QString locale() const;
+ TQString locale() const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -140,85 +140,85 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readEntry(const QString& pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntry(const TQString& pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readEntry(const char *pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntry(const char *pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the given type.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
* @deprecated
*
* @param pKey The key to search for.
- * @return An invalid QVariant if the key was not found or if the
- * read value cannot be converted to the given QVariant::Type.
+ * @return An invalid TQVariant if the key was not found or if the
+ * read value cannot be converted to the given TQVariant::Type.
*/
- QVariant readPropertyEntry( const QString& pKey, QVariant::Type ) const;
+ TQVariant readPropertyEntry( const TQString& pKey, TQVariant::Type ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the given type.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @deprecated
*
* @param pKey The key to search for.
- * @return An invalid QVariant if the key was not found or if the
- * read value cannot be converted to the given QVariant::Type.
+ * @return An invalid TQVariant if the key was not found or if the
+ * read value cannot be converted to the given TQVariant::Type.
*/
- QVariant readPropertyEntry( const char *pKey, QVariant::Type ) const;
+ TQVariant readPropertyEntry( const char *pKey, TQVariant::Type ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the type of the given default value.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found or
- * if the read value cannot be converted to the QVariant::Type.
+ * if the read value cannot be converted to the TQVariant::Type.
* @return The value for the key or the default value if the key was not
* found.
*/
- QVariant readPropertyEntry( const QString& pKey,
- const QVariant &aDefault) const;
+ TQVariant readPropertyEntry( const TQString& pKey,
+ const TQVariant &aDefault) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the type of the given default value.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found or
- * if the read value cannot be converted to the QVariant::Type.
+ * if the read value cannot be converted to the TQVariant::Type.
* @return The value for the key or the default value if the key was not
* found.
*/
- QVariant readPropertyEntry( const char *pKey,
- const QVariant &aDefault) const;
+ TQVariant readPropertyEntry( const char *pKey,
+ const TQVariant &aDefault) const;
/**
* Reads a list of strings.
@@ -230,7 +230,7 @@ public:
* @param sep The list separator (default ",")
* @return The number of entries in the list.
*/
- int readListEntry( const QString& pKey, QStrList &list, char sep = ',' ) const;
+ int readListEntry( const TQString& pKey, TQStrList &list, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -242,7 +242,7 @@ public:
* @param sep The list separator (default ",")
* @return The number of entries in the list.
*/
- int readListEntry( const char *pKey, QStrList &list, char sep = ',' ) const;
+ int readListEntry( const char *pKey, TQStrList &list, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -251,7 +251,7 @@ public:
* @param sep The list separator (default is ",").
* @return The list. Empty if the entry does not exist.
*/
- QStringList readListEntry( const QString& pKey, char sep = ',' ) const;
+ TQStringList readListEntry( const TQString& pKey, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -260,7 +260,7 @@ public:
* @param sep The list separator (default is ",").
* @return The list. Empty if the entry does not exist.
*/
- QStringList readListEntry( const char *pKey, char sep = ',' ) const;
+ TQStringList readListEntry( const char *pKey, char sep = ',' ) const;
/**
* Reads a list of strings, but returns a default if the key
@@ -271,7 +271,7 @@ public:
* @return The list. Contains @p aDefault if the Key does not exist.
* @since 3.3
*/
- QStringList readListEntry( const char* pKey, const QStringList& aDefault,
+ TQStringList readListEntry( const char* pKey, const TQStringList& aDefault,
char sep = ',' ) const;
/**
@@ -280,7 +280,7 @@ public:
* @param pKey The key to search for.
* @return The list. Empty if the entry does not exist.
*/
- QValueList<int> readIntListEntry( const QString& pKey ) const;
+ TQValueList<int> readIntListEntry( const TQString& pKey ) const;
/**
* Reads a list of Integers.
@@ -288,7 +288,7 @@ public:
* @param pKey The key to search for.
* @return The list. Empty if the entry does not exist.
*/
- QValueList<int> readIntListEntry( const char *pKey ) const;
+ TQValueList<int> readIntListEntry( const char *pKey ) const;
/**
* Reads a path.
@@ -299,9 +299,9 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readPathEntry( const QString& pKey, const QString & aDefault = QString::null ) const;
+ TQString readPathEntry( const TQString& pKey, const TQString & aDefault = TQString::null ) const;
/**
* Reads a path.
@@ -312,9 +312,9 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readPathEntry( const char *pKey, const QString & aDefault = QString::null ) const;
+ TQString readPathEntry( const char *pKey, const TQString & aDefault = TQString::null ) const;
/**
* Reads a list of string paths.
@@ -328,7 +328,7 @@ public:
* @return The list. Empty if the entry does not exist.
* @since 3.1.3
*/
- QStringList readPathListEntry( const QString& pKey, char sep = ',' ) const;
+ TQStringList readPathListEntry( const TQString& pKey, char sep = ',' ) const;
/**
* Reads a list of string paths.
@@ -342,7 +342,7 @@ public:
* @return The list. Empty if the entry does not exist.
* @since 3.1.3
*/
- QStringList readPathListEntry( const char *pKey, char sep = ',' ) const;
+ TQStringList readPathListEntry( const char *pKey, char sep = ',' ) const;
/**
@@ -356,7 +356,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- int readNumEntry( const QString& pKey, int nDefault = 0 ) const;
+ int readNumEntry( const TQString& pKey, int nDefault = 0 ) const;
/**
* Reads a numerical value.
@@ -382,7 +382,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- unsigned int readUnsignedNumEntry( const QString& pKey, unsigned int nDefault = 0 ) const;
+ unsigned int readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault = 0 ) const;
/**
* Reads an unsigned numerical value.
@@ -409,7 +409,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- long readLongNumEntry( const QString& pKey, long nDefault = 0 ) const;
+ long readLongNumEntry( const TQString& pKey, long nDefault = 0 ) const;
/**
* Reads a numerical value.
@@ -435,7 +435,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- unsigned long readUnsignedLongNumEntry( const QString& pKey, unsigned long nDefault = 0 ) const;
+ unsigned long readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault = 0 ) const;
/**
* Read an unsigned numerical value.
@@ -461,7 +461,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_INT64 readNum64Entry( const QString& pKey, Q_INT64 nDefault = 0 ) const;
+ Q_INT64 readNum64Entry( const TQString& pKey, Q_INT64 nDefault = 0 ) const;
/**
* Reads a 64-bit numerical value.
@@ -487,7 +487,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_UINT64 readUnsignedNum64Entry( const QString& pKey, Q_UINT64 nDefault = 0 ) const;
+ Q_UINT64 readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault = 0 ) const;
/**
* Read an 64-bit unsigned numerical value.
@@ -513,7 +513,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- double readDoubleNumEntry( const QString& pKey, double nDefault = 0.0 ) const;
+ double readDoubleNumEntry( const TQString& pKey, double nDefault = 0.0 ) const;
/**
* Reads a floating point value.
@@ -529,30 +529,30 @@ public:
double readDoubleNumEntry( const char *pKey, double nDefault = 0.0 ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a font object.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QFont by default) returned if the
+ * @param pDefault A default value (null TQFont by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QFont readFontEntry( const QString& pKey, const QFont* pDefault = 0L ) const;
+ TQFont readFontEntry( const TQString& pKey, const TQFont* pDefault = 0L ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a font object.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QFont by default) returned if the
+ * @param pDefault A default value (null TQFont by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QFont readFontEntry( const char *pKey, const QFont* pDefault = 0L ) const;
+ TQFont readFontEntry( const char *pKey, const TQFont* pDefault = 0L ) const;
/**
* Reads a boolean entry.
@@ -565,7 +565,7 @@ public:
* @param bDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- bool readBoolEntry( const QString& pKey, bool bDefault = false ) const;
+ bool readBoolEntry( const TQString& pKey, bool bDefault = false ) const;
/**
* Reads a boolean entry.
@@ -581,112 +581,112 @@ public:
bool readBoolEntry( const char *pKey, bool bDefault = false ) const;
/**
- * Reads a QRect entry.
+ * Reads a TQRect entry.
*
* Read the value of an entry specified by pKey in the current group
- * and interpret it as a QRect object.
+ * and interpret it as a TQRect object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QRect by default) returned if the
+ * @param pDefault A default value (null TQRect by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QRect readRectEntry( const QString& pKey, const QRect* pDefault = 0L ) const;
+ TQRect readRectEntry( const TQString& pKey, const TQRect* pDefault = 0L ) const;
/**
- * Reads a QRect entry.
+ * Reads a TQRect entry.
*
* Read the value of an entry specified by pKey in the current group
- * and interpret it as a QRect object.
+ * and interpret it as a TQRect object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QRect by default) returned if the
+ * @param pDefault A default value (null TQRect by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QRect readRectEntry( const char *pKey, const QRect* pDefault = 0L ) const;
+ TQRect readRectEntry( const char *pKey, const TQRect* pDefault = 0L ) const;
/**
- * Reads a QPoint entry.
+ * Reads a TQPoint entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QPoint object.
+ * and interpret it as a TQPoint object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QPoint by default) returned if the
+ * @param pDefault A default value (null TQPoint by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QPoint readPointEntry( const QString& pKey, const QPoint* pDefault = 0L ) const;
+ TQPoint readPointEntry( const TQString& pKey, const TQPoint* pDefault = 0L ) const;
/**
- * Reads a QPoint entry.
+ * Reads a TQPoint entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QPoint object.
+ * and interpret it as a TQPoint object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QPoint by default) returned if the
+ * @param pDefault A default value (null TQPoint by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QPoint readPointEntry( const char *pKey, const QPoint* pDefault = 0L ) const;
+ TQPoint readPointEntry( const char *pKey, const TQPoint* pDefault = 0L ) const;
/**
- * Reads a QSize entry.
+ * Reads a TQSize entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QSize object.
+ * and interpret it as a TQSize object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QSize by default) returned if the
+ * @param pDefault A default value (null TQSize by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QSize readSizeEntry( const QString& pKey, const QSize* pDefault = 0L ) const;
+ TQSize readSizeEntry( const TQString& pKey, const TQSize* pDefault = 0L ) const;
/**
- * Reads a QSize entry.
+ * Reads a TQSize entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QSize object.
+ * and interpret it as a TQSize object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QSize by default) returned if the
+ * @param pDefault A default value (null TQSize by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QSize readSizeEntry( const char *pKey, const QSize* pDefault = 0L ) const;
+ TQSize readSizeEntry( const char *pKey, const TQSize* pDefault = 0L ) const;
/**
- * Reads a QColor entry.
+ * Reads a TQColor entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a color.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QColor by default) returned if the
+ * @param pDefault A default value (null TQColor by default) returned if the
* key was not found or if the value cannot be interpreted.
* @return The value for this key.
*/
- QColor readColorEntry( const QString& pKey, const QColor* pDefault = 0L ) const;
+ TQColor readColorEntry( const TQString& pKey, const TQColor* pDefault = 0L ) const;
/**
- * Reads a QColor entry.
+ * Reads a TQColor entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a color.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QColor by default) returned if the
+ * @param pDefault A default value (null TQColor by default) returned if the
* key was not found or if the value cannot be interpreted.
* @return The value for this key.
*/
- QColor readColorEntry( const char *pKey, const QColor* pDefault = 0L ) const;
+ TQColor readColorEntry( const char *pKey, const TQColor* pDefault = 0L ) const;
/**
- * Reads a QDateTime entry.
+ * Reads a TQDateTime entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a date and time.
@@ -697,10 +697,10 @@ public:
* interpreted.
* @return The value for this key.
*/
- QDateTime readDateTimeEntry( const QString& pKey, const QDateTime* pDefault = 0L ) const;
+ TQDateTime readDateTimeEntry( const TQString& pKey, const TQDateTime* pDefault = 0L ) const;
/**
- * Reads a QDateTime entry.
+ * Reads a TQDateTime entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a date and time.
@@ -711,7 +711,7 @@ public:
* interpreted.
* @return The value for this key.
*/
- QDateTime readDateTimeEntry( const char *pKey, const QDateTime* pDefault = 0L ) const;
+ TQDateTime readDateTimeEntry( const char *pKey, const TQDateTime* pDefault = 0L ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -721,8 +721,8 @@ public:
* @param aDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- QString readEntryUntranslated( const QString& pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntryUntranslated( const TQString& pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -732,8 +732,8 @@ public:
* @param aDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- QString readEntryUntranslated( const char *pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntryUntranslated( const char *pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Writes a key/value pair.
@@ -754,7 +754,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QString& pValue,
+ void writeEntry( const TQString& pKey, const TQString& pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -775,7 +775,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QString& pValue,
+ void writeEntry( const char *pKey, const TQString& pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -798,7 +798,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QVariant& rValue,
+ void writeEntry( const TQString& pKey, const TQVariant& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -820,7 +820,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QVariant& rValue,
+ void writeEntry( const char *pKey, const TQVariant& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -844,7 +844,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QStrList &rValue,
+ void writeEntry( const TQString& pKey, const TQStrList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of strings.
@@ -866,7 +866,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QStrList &rValue,
+ void writeEntry( const char *pKey, const TQStrList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
@@ -889,7 +889,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QStringList &rValue,
+ void writeEntry( const TQString& pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of strings.
@@ -911,7 +911,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QStringList &rValue,
+ void writeEntry( const char *pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
@@ -934,7 +934,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QValueList<int>& rValue,
+ void writeEntry( const TQString& pKey, const TQValueList<int>& rValue,
bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of Integers.
@@ -955,7 +955,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QValueList<int>& rValue,
+ void writeEntry( const char *pKey, const TQValueList<int>& rValue,
bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
@@ -975,10 +975,10 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const char *pValue,
+ void writeEntry( const TQString& pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
*
@@ -999,7 +999,7 @@ public:
void writeEntry( const char *pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
@@ -1016,7 +1016,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, int nValue,
+ void writeEntry( const TQString& pKey, int nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1053,7 +1053,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, unsigned int nValue,
+ void writeEntry( const TQString& pKey, unsigned int nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1089,7 +1089,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, long nValue,
+ void writeEntry( const TQString& pKey, long nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1124,7 +1124,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, unsigned long nValue,
+ void writeEntry( const TQString& pKey, unsigned long nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1159,7 +1159,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, Q_INT64 nValue,
+ void writeEntry( const TQString& pKey, Q_INT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1194,7 +1194,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, Q_UINT64 nValue,
+ void writeEntry( const TQString& pKey, Q_UINT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1228,11 +1228,11 @@ public:
* @param format @p format determines the format to which the value
* is converted. Default is 'g'.
* @param precision @p precision sets the precision with which the
- * value is converted. Default is 6 as in QString.
+ * value is converted. Default is 6 as in TQString.
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, double nValue,
+ void writeEntry( const TQString& pKey, double nValue,
bool bPersistent = true, bool bGlobal = false,
char format = 'g', int precision = 6,
bool bNLS = false );
@@ -1249,7 +1249,7 @@ public:
* @param format @p format determines the format to which the value
* is converted. Default is 'g'.
* @param precision @p precision sets the precision with which the
- * value is converted. Default is 6 as in QString.
+ * value is converted. Default is 6 as in TQString.
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
@@ -1272,7 +1272,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, bool bValue,
+ void writeEntry( const TQString& pKey, bool bValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1307,7 +1307,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QFont& rFont,
+ void writeEntry( const TQString& pKey, const TQFont& rFont,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1324,7 +1324,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QFont& rFont,
+ void writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1345,7 +1345,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QColor& rColor,
+ void writeEntry( const TQString& pKey, const TQColor& rColor,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1365,7 +1365,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QColor& rColor,
+ void writeEntry( const char *pKey, const TQColor& rColor,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1386,7 +1386,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QDateTime& rDateTime,
+ void writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1406,7 +1406,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QDateTime& rDateTime,
+ void writeEntry( const char *pKey, const TQDateTime& rDateTime,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1428,7 +1428,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QRect& rValue,
+ void writeEntry( const TQString& pKey, const TQRect& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1448,7 +1448,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QRect& rValue,
+ void writeEntry( const char *pKey, const TQRect& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1469,7 +1469,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QPoint& rValue,
+ void writeEntry( const TQString& pKey, const TQPoint& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1489,7 +1489,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QPoint& rValue,
+ void writeEntry( const char *pKey, const TQPoint& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1510,7 +1510,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QSize& rValue,
+ void writeEntry( const TQString& pKey, const TQSize& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1530,7 +1530,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QSize& rValue,
+ void writeEntry( const char *pKey, const TQSize& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1551,7 +1551,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writePathEntry( const QString& pKey, const QString & path,
+ void writePathEntry( const TQString& pKey, const TQString & path,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1571,7 +1571,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writePathEntry( const char *pKey, const QString & path,
+ void writePathEntry( const char *pKey, const TQString & path,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1598,7 +1598,7 @@ public:
* @see readPathListEntry()
* @since 3.1.3
*/
- void writePathEntry( const QString& pKey, const QStringList &rValue,
+ void writePathEntry( const TQString& pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writePathEntry() overridden to accept a list of paths (strings).
@@ -1623,7 +1623,7 @@ public:
* @see readPathListEntry()
* @since 3.1.3
*/
- void writePathEntry( const char *pKey, const QStringList &rValue,
+ void writePathEntry( const char *pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
@@ -1635,7 +1635,7 @@ public:
* application specific config file, but to the global KDE config file.
* @param bNLS If @p bNLS is true, the key with the locale tag is removed.
*/
- void deleteEntry( const QString& pKey,
+ void deleteEntry( const TQString& pKey,
bool bNLS = false, bool bGlobal = false);
/**
* Deletes the entry specified by @p pKey in the current group.
@@ -1665,7 +1665,7 @@ public:
* @return If the group is not empty and bDeep is false,
* deleteGroup returns false.
*/
- bool deleteGroup( const QString& group, bool bDeep = true, bool bGlobal = false );
+ bool deleteGroup( const TQString& group, bool bDeep = true, bool bGlobal = false );
/**
@@ -1746,7 +1746,7 @@ public:
* @param key The key to search for.
* @return If true, the key is available.
*/
- bool hasKey( const QString& key ) const;
+ bool hasKey( const TQString& key ) const;
/**
* Returns a map (tree) of entries for all entries in a particular
@@ -1758,7 +1758,7 @@ public:
* The returned map may be empty if the group is not found.
* @see QMap
*/
- virtual QMap<QString, QString> entryMap(const QString &group) const = 0;
+ virtual TQMap<TQString, TQString> entryMap(const TQString &group) const = 0;
/**
* Reparses all configuration files. This is useful for programs
@@ -1786,7 +1786,7 @@ public:
* @return whether changes may be made to @p group in this configuration
* file.
*/
- bool groupIsImmutable(const QString &group) const;
+ bool groupIsImmutable(const TQString &group) const;
/**
* Checks whether it is possible to change the given entry.
@@ -1794,7 +1794,7 @@ public:
* @return whether the entry @p key may be changed in the current group
* in this configuration file.
*/
- bool entryIsImmutable(const QString &key) const;
+ bool entryIsImmutable(const TQString &key) const;
/**
* Possible return values for getConfigState().
@@ -1852,7 +1852,7 @@ public:
* @param key The key of the entry to revert.
* @since 3.2
*/
- void revertToDefault(const QString &key);
+ void revertToDefault(const TQString &key);
/**
* Returns whether a default is specified for an entry in either the
@@ -1861,8 +1861,8 @@ public:
* If an application computes a default value at runtime for
* a certain entry, e.g. like:
* \code
- * QColor computedDefault = kapp->palette().color(QPalette::Active, QColorGroup::Text)
- * QColor color = config->readEntry(key, computedDefault);
+ * TQColor computedDefault = kapp->palette().color(TQPalette::Active, TQColorGroup::Text)
+ * TQColor color = config->readEntry(key, computedDefault);
* \encode
*
* Then it may wish to make the following check before
@@ -1880,7 +1880,7 @@ public:
* @param key The key of the entry to check.
* @since 3.2
*/
- bool hasDefault(const QString &key) const;
+ bool hasDefault(const TQString &key) const;
protected:
/**
@@ -1919,7 +1919,7 @@ protected:
* @return The map of the entries in the group.
* @internal
*/
- virtual KEntryMap internalEntryMap( const QString& pGroup ) const = 0;
+ virtual KEntryMap internalEntryMap( const TQString& pGroup ) const = 0;
/**
* Returns a map (tree) of the entries in the tree.
@@ -1967,7 +1967,7 @@ protected:
*/
virtual KEntry lookupData(const KEntryKey &_key) const = 0;
- virtual bool internalHasGroup(const QCString &group) const = 0;
+ virtual bool internalHasGroup(const TQCString &group) const = 0;
/**
* A back end for loading/saving to disk in a particular format.
@@ -1977,22 +1977,22 @@ public:
/**
* Overloaded public methods:
*/
- void setGroup( const QCString &pGroup );
+ void setGroup( const TQCString &pGroup );
void setGroup( const char *pGroup );
- bool hasGroup(const QCString &_pGroup) const;
+ bool hasGroup(const TQCString &_pGroup) const;
bool hasGroup(const char *_pGroup) const;
bool hasKey( const char *pKey ) const;
protected:
- QCString readEntryUtf8( const char *pKey) const;
+ TQCString readEntryUtf8( const char *pKey) const;
/**
* The currently selected group. */
- QCString mGroup;
+ TQCString mGroup;
/**
* The locale to retrieve keys under if possible, i.e en_US or fr. */
- QCString aLocaleString;
+ TQCString aLocaleString;
/**
* Indicates whether there are any dirty entries in the config object
@@ -2009,9 +2009,9 @@ private:
class KConfigBasePrivate;
KConfigBasePrivate *d;
- void writeEntry( const char *pKey, const QString &rValue,
+ void writeEntry( const char *pKey, const TQString &rValue,
bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
- void writeEntry( const char *pKey, const QStringList &rValue,
+ void writeEntry( const char *pKey, const TQStringList &rValue,
char sep, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
};
@@ -2028,7 +2028,7 @@ class KConfigGroupSaverPrivate;
* written as:
* \code
*
- * QString oldgroup config->group();
+ * TQString oldgroup config->group();
* config->setGroup( "TheGroupThatIWant" );
* ...
* config->writeEntry( "Blah", "Blubb" );
@@ -2066,8 +2066,8 @@ public:
* KConfigGroupSaver works on.
* @param group The new group that the config object should switch to.
*/
- KConfigGroupSaver( KConfigBase* config, QString group )
- /* KDE 4 : make the second parameter const QString & */
+ KConfigGroupSaver( KConfigBase* config, TQString group )
+ /* KDE 4 : make the second parameter const TQString & */
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
@@ -2075,7 +2075,7 @@ public:
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
- KConfigGroupSaver( KConfigBase* config, const QCString &group )
+ KConfigGroupSaver( KConfigBase* config, const TQCString &group )
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
@@ -2085,7 +2085,7 @@ public:
private:
KConfigBase* _config;
- QString _oldgroup;
+ TQString _oldgroup;
KConfigGroupSaver(const KConfigGroupSaver&);
KConfigGroupSaver& operator=(const KConfigGroupSaver&);
@@ -2105,14 +2105,14 @@ public:
* Construct a config group corresponding to @p group in @p master.
* @p group is the group name encoded in UTF-8.
*/
- KConfigGroup(KConfigBase *master, const QCString &group);
+ KConfigGroup(KConfigBase *master, const TQCString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
*
* Construct a config group corresponding to @p group in @p master
*/
- KConfigGroup(KConfigBase *master, const QString &group);
+ KConfigGroup(KConfigBase *master, const TQString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
@@ -2154,16 +2154,16 @@ private:
void isDirty() { }
// The following members are not used.
- virtual QStringList groupList() const { return QStringList(); }
+ virtual TQStringList groupList() const { return TQStringList(); }
virtual void rollback(bool) { }
virtual void reparseConfiguration() { }
- virtual QMap<QString, QString> entryMap(const QString &) const
- { return QMap<QString,QString>(); }
- virtual KEntryMap internalEntryMap( const QString&) const
+ virtual TQMap<TQString, TQString> entryMap(const TQString &) const
+ { return TQMap<TQString,TQString>(); }
+ virtual KEntryMap internalEntryMap( const TQString&) const
{ return KEntryMap(); }
virtual KEntryMap internalEntryMap() const
{ return KEntryMap(); }
- virtual bool internalHasGroup(const QCString &) const
+ virtual bool internalHasGroup(const TQCString &) const
{ return false; }
void getConfigState() { }
diff --git a/kdecore/kconfigdata.h b/kdecore/kconfigdata.h
index 281e8ecd6..e514b2781 100644
--- a/kdecore/kconfigdata.h
+++ b/kdecore/kconfigdata.h
@@ -22,7 +22,7 @@
#ifndef _KCONFIGDATA_H
#define _KCONFIGDATA_H
-#include <qmap.h> // generic red-black tree class
+#include <tqmap.h> // generic red-black tree class
#include "kdelibs_export.h"
/**
@@ -34,7 +34,7 @@ struct KDECORE_EXPORT KEntry
KEntry()
: mValue(0), bDirty(false), bNLS(false),
bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false) {}
- QCString mValue;
+ TQCString mValue;
/**
* Must the entry be written back to disk?
*/
@@ -68,18 +68,18 @@ struct KDECORE_EXPORT KEntry
*/
struct KDECORE_EXPORT KEntryKey
{
- KEntryKey(const QCString& _group = 0,
- const QCString& _key = 0)
+ KEntryKey(const TQCString& _group = 0,
+ const TQCString& _key = 0)
: mGroup(_group), mKey(_key), bLocal(false), bDefault(false),
c_key(_key.data()) {}
/**
* The "group" to which this EntryKey belongs
*/
- QCString mGroup;
+ TQCString mGroup;
/**
* The _actual_ key of the entry in question
*/
- QCString mKey;
+ TQCString mKey;
/**
* Entry is localised or not
*/
@@ -93,7 +93,7 @@ struct KDECORE_EXPORT KEntryKey
};
/**
- * compares two KEntryKeys (needed for QMap).
+ * compares two KEntryKeys (needed for TQMap).
* @internal
*/
inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
@@ -125,14 +125,14 @@ inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
* with the group name.
* @internal
*/
-typedef QMap<KEntryKey, KEntry> KEntryMap;
+typedef TQMap<KEntryKey, KEntry> KEntryMap;
/**
* \relates KEntry
* type for iterating over keys in a KEntryMap in sorted order.
* @internal
*/
-typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
+typedef TQMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
/**
* \relates KEntry
@@ -141,6 +141,6 @@ typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
* only examine them.
* @internal
*/
-typedef QMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
+typedef TQMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
#endif
diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp
index b9a310b1e..7e549e0b0 100644
--- a/kdecore/kconfigdialogmanager.cpp
+++ b/kdecore/kconfigdialogmanager.cpp
@@ -21,14 +21,14 @@
#include "kconfigdialogmanager.h"
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qobjectlist.h>
-#include <qsqlpropertymap.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqobjectlist.h>
+#include <tqsqlpropertymap.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfigskeleton.h>
@@ -43,18 +43,18 @@ public:
Private() : insideGroupBox(false) { }
public:
- QDict<QWidget> knownWidget;
- QDict<QWidget> buddyWidget;
+ TQDict<TQWidget> knownWidget;
+ TQDict<TQWidget> buddyWidget;
bool insideGroupBox;
};
-KConfigDialogManager::KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name)
- : QObject(parent, name), m_conf(conf), m_dialog(parent)
+KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name)
+ : TQObject(parent, name), m_conf(conf), m_dialog(parent)
{
d = new Private();
kapp->installKDEPropertyMap();
- propertyMap = QSqlPropertyMap::defaultMap();
+ propertyMap = TQSqlPropertyMap::defaultMap();
init(true);
}
@@ -69,102 +69,102 @@ void KConfigDialogManager::init(bool trackChanges)
if(trackChanges)
{
// QT
- changedMap.insert("QButton", SIGNAL(stateChanged(int)));
- changedMap.insert("QCheckBox", SIGNAL(stateChanged(int)));
- changedMap.insert("QPushButton", SIGNAL(stateChanged(int)));
- changedMap.insert("QRadioButton", SIGNAL(stateChanged(int)));
+ changedMap.insert("TQButton", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQCheckBox", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQPushButton", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQRadioButton", TQT_SIGNAL(stateChanged(int)));
// We can only store one thing, so you can't have
// a ButtonGroup that is checkable.
- changedMap.insert("QButtonGroup", SIGNAL(clicked(int)));
- changedMap.insert("QGroupBox", SIGNAL(toggled(bool)));
- changedMap.insert("QComboBox", SIGNAL(activated (int)));
+ changedMap.insert("TQButtonGroup", TQT_SIGNAL(clicked(int)));
+ changedMap.insert("TQGroupBox", TQT_SIGNAL(toggled(bool)));
+ changedMap.insert("TQComboBox", TQT_SIGNAL(activated (int)));
//qsqlproperty map doesn't store the text, but the value!
- //changedMap.insert("QComboBox", SIGNAL(textChanged(const QString &)));
- changedMap.insert("QDateEdit", SIGNAL(valueChanged(const QDate &)));
- changedMap.insert("QDateTimeEdit", SIGNAL(valueChanged(const QDateTime &)));
- changedMap.insert("QDial", SIGNAL(valueChanged (int)));
- changedMap.insert("QLineEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert("QSlider", SIGNAL(valueChanged(int)));
- changedMap.insert("QSpinBox", SIGNAL(valueChanged(int)));
- changedMap.insert("QTimeEdit", SIGNAL(valueChanged(const QTime &)));
- changedMap.insert("QTextEdit", SIGNAL(textChanged()));
- changedMap.insert("QTextBrowser", SIGNAL(sourceChanged(const QString &)));
- changedMap.insert("QMultiLineEdit", SIGNAL(textChanged()));
- changedMap.insert("QListBox", SIGNAL(selectionChanged()));
- changedMap.insert("QTabWidget", SIGNAL(currentChanged(QWidget *)));
+ //changedMap.insert("TQComboBox", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert("QDateEdit", TQT_SIGNAL(valueChanged(const TQDate &)));
+ changedMap.insert("QDateTimeEdit", TQT_SIGNAL(valueChanged(const TQDateTime &)));
+ changedMap.insert("TQDial", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert("TQLineEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert("TQSlider", TQT_SIGNAL(valueChanged(int)));
+ changedMap.insert("TQSpinBox", TQT_SIGNAL(valueChanged(int)));
+ changedMap.insert("QTimeEdit", TQT_SIGNAL(valueChanged(const TQTime &)));
+ changedMap.insert("TQTextEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert("TQTextBrowser", TQT_SIGNAL(sourceChanged(const TQString &)));
+ changedMap.insert("TQMultiLineEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert("TQListBox", TQT_SIGNAL(selectionChanged()));
+ changedMap.insert("TQTabWidget", TQT_SIGNAL(currentChanged(TQWidget *)));
// KDE
- changedMap.insert( "KComboBox", SIGNAL(activated (int)));
- changedMap.insert( "KFontCombo", SIGNAL(activated (int)));
- changedMap.insert( "KFontRequester", SIGNAL(fontSelected(const QFont &)));
- changedMap.insert( "KFontChooser", SIGNAL(fontSelected(const QFont &)));
- changedMap.insert( "KHistoryCombo", SIGNAL(activated (int)));
-
- changedMap.insert( "KColorButton", SIGNAL(changed(const QColor &)));
- changedMap.insert( "KDatePicker", SIGNAL(dateSelected (QDate)));
- changedMap.insert( "KDateWidget", SIGNAL(changed (QDate)));
- changedMap.insert( "KDateTimeWidget", SIGNAL(valueChanged (const QDateTime &)));
- changedMap.insert( "KEditListBox", SIGNAL(changed()));
- changedMap.insert( "KListBox", SIGNAL(selectionChanged()));
- changedMap.insert( "KLineEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KPasswordEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KRestrictedLine", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KTextBrowser", SIGNAL(sourceChanged(const QString &)));
- changedMap.insert( "KTextEdit", SIGNAL(textChanged()));
- changedMap.insert( "KURLRequester", SIGNAL(textChanged (const QString& )));
- changedMap.insert( "KIntNumInput", SIGNAL(valueChanged (int)));
- changedMap.insert( "KIntSpinBox", SIGNAL(valueChanged (int)));
- changedMap.insert( "KDoubleNumInput", SIGNAL(valueChanged (double)));
+ changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int)));
+ changedMap.insert( "KFontCombo", TQT_SIGNAL(activated (int)));
+ changedMap.insert( "KFontRequester", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "KFontChooser", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "KHistoryCombo", TQT_SIGNAL(activated (int)));
+
+ changedMap.insert( "KColorButton", TQT_SIGNAL(changed(const TQColor &)));
+ changedMap.insert( "KDatePicker", TQT_SIGNAL(dateSelected (TQDate)));
+ changedMap.insert( "KDateWidget", TQT_SIGNAL(changed (TQDate)));
+ changedMap.insert( "KDateTimeWidget", TQT_SIGNAL(valueChanged (const TQDateTime &)));
+ changedMap.insert( "KEditListBox", TQT_SIGNAL(changed()));
+ changedMap.insert( "KListBox", TQT_SIGNAL(selectionChanged()));
+ changedMap.insert( "KLineEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KPasswordEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KRestrictedLine", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KTextBrowser", TQT_SIGNAL(sourceChanged(const TQString &)));
+ changedMap.insert( "KTextEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert( "KURLRequester", TQT_SIGNAL(textChanged (const TQString& )));
+ changedMap.insert( "KIntNumInput", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert( "KIntSpinBox", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert( "KDoubleNumInput", TQT_SIGNAL(valueChanged (double)));
}
// Go through all of the children of the widgets and find all known widgets
(void) parseChildren(m_dialog, trackChanges);
}
-void KConfigDialogManager::addWidget(QWidget *widget)
+void KConfigDialogManager::addWidget(TQWidget *widget)
{
(void) parseChildren(widget, true);
}
-void KConfigDialogManager::setupWidget(QWidget *widget, KConfigSkeletonItem *item)
+void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *item)
{
- QVariant minValue = item->minValue();
+ TQVariant minValue = item->minValue();
if (minValue.isValid())
{
if (widget->metaObject()->findProperty("minValue", true) != -1)
widget->setProperty("minValue", minValue);
}
- QVariant maxValue = item->maxValue();
+ TQVariant maxValue = item->maxValue();
if (maxValue.isValid())
{
if (widget->metaObject()->findProperty("maxValue", true) != -1)
widget->setProperty("maxValue", maxValue);
}
- if (QWhatsThis::textFor( widget ).isEmpty())
+ if (TQWhatsThis::textFor( widget ).isEmpty())
{
- QString whatsThis = item->whatsThis();
+ TQString whatsThis = item->whatsThis();
if ( !whatsThis.isEmpty() )
{
- QWhatsThis::add( widget, whatsThis );
+ TQWhatsThis::add( widget, whatsThis );
}
}
}
-bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChanges)
+bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges)
{
bool valueChanged = false;
- const QObjectList *listOfChildren = widget->children();
+ const TQObjectList *listOfChildren = widget->children();
if(!listOfChildren)
return valueChanged;
- QObject *object;
- for( QPtrListIterator<QObject> it( *listOfChildren );
+ TQObject *object;
+ for( TQPtrListIterator<TQObject> it( *listOfChildren );
(object = it.current()); ++it )
{
if(!object->isWidgetType())
continue; // Skip non-widgets
- QWidget *childWidget = (QWidget *)object;
+ TQWidget *childWidget = (TQWidget *)object;
const char *widgetName = childWidget->name(0);
bool bParseChildren = true;
@@ -173,7 +173,7 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
if (widgetName && (strncmp(widgetName, "kcfg_", 5) == 0))
{
// This is one of our widgets!
- QString configId = widgetName+5;
+ TQString configId = widgetName+5;
KConfigSkeletonItem *item = m_conf->findItem(configId);
if (item)
{
@@ -181,7 +181,7 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
setupWidget(childWidget, item);
- QMap<QString, QCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
if (changedIt == changedMap.end())
{
@@ -199,18 +199,18 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
else
{
connect(childWidget, *changedIt,
- this, SIGNAL(widgetModified()));
+ this, TQT_SIGNAL(widgetModified()));
- QGroupBox *gb = dynamic_cast<QGroupBox *>(childWidget);
+ TQGroupBox *gb = dynamic_cast<TQGroupBox *>(childWidget);
if (!gb)
bParseChildren = false;
else
d->insideGroupBox = true;
- QComboBox *cb = dynamic_cast<QComboBox *>(childWidget);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(childWidget);
if (cb && cb->editable())
- connect(cb, SIGNAL(textChanged(const QString &)),
- this, SIGNAL(widgetModified()));
+ connect(cb, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SIGNAL(widgetModified()));
}
}
else
@@ -219,28 +219,28 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
assert(false);
}
}
- else if (childWidget->inherits("QLabel"))
+ else if (childWidget->inherits("TQLabel"))
{
- QLabel *label = static_cast<QLabel *>(childWidget);
- QWidget *buddy = label->buddy();
+ TQLabel *label = static_cast<TQLabel *>(childWidget);
+ TQWidget *buddy = label->buddy();
if (!buddy)
continue;
const char *buddyName = buddy->name(0);
if (buddyName && (strncmp(buddyName, "kcfg_", 5) == 0))
{
// This is one of our widgets!
- QString configId = buddyName+5;
+ TQString configId = buddyName+5;
d->buddyWidget.insert(configId, childWidget);
}
}
#ifndef NDEBUG
else if (widgetName)
{
- QMap<QString, QCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
if (changedIt != changedMap.end())
{
- if ((!d->insideGroupBox || !childWidget->inherits("QRadioButton")) &&
- !childWidget->inherits("QGroupBox"))
+ if ((!d->insideGroupBox || !childWidget->inherits("TQRadioButton")) &&
+ !childWidget->inherits("TQGroupBox"))
kdDebug(178) << "Widget '" << widgetName << "' (" << childWidget->className() << ") remains unmanaged." << endl;
}
}
@@ -263,8 +263,8 @@ void KConfigDialogManager::updateWidgets()
bool bSignalsBlocked = signalsBlocked();
blockSignals(true);
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -274,7 +274,7 @@ void KConfigDialogManager::updateWidgets()
continue;
}
- QVariant p = item->property();
+ TQVariant p = item->property();
if (p != property(widget))
{
setProperty(widget, p);
@@ -284,7 +284,7 @@ void KConfigDialogManager::updateWidgets()
if (item->isImmutable())
{
widget->setEnabled(false);
- QWidget *buddy = d->buddyWidget.find(it.currentKey());
+ TQWidget *buddy = d->buddyWidget.find(it.currentKey());
if (buddy)
buddy->setEnabled(false);
}
@@ -292,7 +292,7 @@ void KConfigDialogManager::updateWidgets()
blockSignals(bSignalsBlocked);
if (changed)
- QTimer::singleShot(0, this, SIGNAL(widgetModified()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(widgetModified()));
}
void KConfigDialogManager::updateWidgetsDefault()
@@ -306,8 +306,8 @@ void KConfigDialogManager::updateSettings()
{
bool changed = false;
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -317,7 +317,7 @@ void KConfigDialogManager::updateSettings()
continue;
}
- QVariant p = property(widget);
+ TQVariant p = property(widget);
if (p != item->property())
{
item->setProperty(p);
@@ -331,16 +331,16 @@ void KConfigDialogManager::updateSettings()
}
}
-void KConfigDialogManager::setProperty(QWidget *w, const QVariant &v)
+void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v)
{
- QButtonGroup *bg = dynamic_cast<QButtonGroup *>(w);
+ TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
{
bg->setButton(v.toInt());
return;
}
- QComboBox *cb = dynamic_cast<QComboBox *>(w);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(w);
if (cb && cb->editable())
{
cb->setCurrentText(v.toString());
@@ -350,15 +350,15 @@ void KConfigDialogManager::setProperty(QWidget *w, const QVariant &v)
propertyMap->setProperty(w, v);
}
-QVariant KConfigDialogManager::property(QWidget *w)
+TQVariant KConfigDialogManager::property(TQWidget *w)
{
- QButtonGroup *bg = dynamic_cast<QButtonGroup *>(w);
+ TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
- return QVariant(bg->selectedId());
+ return TQVariant(bg->selectedId());
- QComboBox *cb = dynamic_cast<QComboBox *>(w);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(w);
if (cb && cb->editable())
- return QVariant(cb->currentText());
+ return TQVariant(cb->currentText());
return propertyMap->property(w);
}
@@ -366,8 +366,8 @@ QVariant KConfigDialogManager::property(QWidget *w)
bool KConfigDialogManager::hasChanged()
{
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -377,7 +377,7 @@ bool KConfigDialogManager::hasChanged()
continue;
}
- QVariant p = property(widget);
+ TQVariant p = property(widget);
if (p != item->property())
{
// kdDebug(178) << "Widget for '" << it.currentKey() << "' has changed." << endl;
diff --git a/kdecore/kconfigdialogmanager.h b/kdecore/kconfigdialogmanager.h
index f7d3f0c40..ab4dd2476 100644
--- a/kdecore/kconfigdialogmanager.h
+++ b/kdecore/kconfigdialogmanager.h
@@ -21,8 +21,8 @@
#ifndef KCONFIGDIALOGMANAGER_H
#define KCONFIGDIALOGMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KConfigSkeleton;
@@ -45,11 +45,11 @@ class QSqlPropertyMap;
* "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be
* associated to the configuration entry "MyOption".
*
- * KConfigDialogManager uses the QSqlPropertyMap class to determine if it can do
+ * KConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do
* anything to a widget. Note that KConfigDialogManager doesn't require a
* database, it simply uses the functionality that is built into the
- * QSqlPropertyMap class. New widgets can be added to the map using
- * QSqlPropertyMap::installDefaultMap(). Note that you can't just add any
+ * TQSqlPropertyMap class. New widgets can be added to the map using
+ * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any
* class. The class must have a matching Q_PROPERTY(...) macro defined.
*
* For example (note that KColorButton is already added and it doesn't need to
@@ -57,25 +57,25 @@ class QSqlPropertyMap;
*
* kcolorbutton.h defines the following property:
* \code
- * Q_PROPERTY( QColor color READ color WRITE setColor )
+ * Q_PROPERTY( TQColor color READ color WRITE setColor )
* \endcode
*
* To add KColorButton the following code would be inserted in the main.
*
* \code
* kapp->installKDEPropertyMap();
- * QSqlPropertyMap *map = QSqlPropertyMap::defaultMap();
+ * TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap();
* map->insert("KColorButton", "color");
* \endcode
*
- * If you add a new widget to the QSqlPropertyMap and wish to be notified when
+ * If you add a new widget to the TQSqlPropertyMap and wish to be notified when
* it is modified you should add its signal using addWidgetChangedSignal().
* @since 3.2
* @author Benjamin C Meyer <ben+kdelibs at meyerhome dot net>
* @author Waldo Bastian <bastian@kde.org>
*/
-class KDECORE_EXPORT KConfigDialogManager : public QObject {
+class KDECORE_EXPORT KConfigDialogManager : public TQObject {
Q_OBJECT
@@ -94,7 +94,7 @@ signals:
* contains the one or more modified setting.
* @see settingsChanged()
*/
- void settingsChanged( QWidget *widget );
+ void settingsChanged( TQWidget *widget );
/**
* If retrieveSettings() was told to track changes then if
@@ -114,7 +114,7 @@ public:
* @param conf Object that contains settings
* @param name - Object name.
*/
- KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name=0);
+ KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name=0);
/**
* Destructor.
@@ -125,7 +125,7 @@ public:
* Add additional widgets to manage
* @param widget Additional widget to manage, inlcuding all its children
*/
- void addWidget(QWidget *widget);
+ void addWidget(TQWidget *widget);
/**
* Returns whether the current state of the known widgets are
@@ -185,22 +185,22 @@ protected:
* widget that are known.
* @return bool - If a widget was set to something other then its default.
*/
- bool parseChildren(const QWidget *widget, bool trackChanges);
+ bool parseChildren(const TQWidget *widget, bool trackChanges);
/**
* Set a property
*/
- void setProperty(QWidget *w, const QVariant &v);
+ void setProperty(TQWidget *w, const TQVariant &v);
/**
* Retrieve a property
*/
- QVariant property(QWidget *w);
+ TQVariant property(TQWidget *w);
/**
* Setup secondary widget properties
*/
- void setupWidget(QWidget *widget, KConfigSkeletonItem *item);
+ void setupWidget(TQWidget *widget, KConfigSkeletonItem *item);
protected:
/**
@@ -211,17 +211,17 @@ protected:
/**
* Dialog being managed
*/
- QWidget *m_dialog;
+ TQWidget *m_dialog;
/**
* Pointer to the property map for easy access.
*/
- QSqlPropertyMap *propertyMap;
+ TQSqlPropertyMap *propertyMap;
/**
* Map of the classes and the signals that they emit when changed.
*/
- QMap<QString, QCString> changedMap;
+ TQMap<TQString, TQCString> changedMap;
private:
class Private;
diff --git a/kdecore/kconfigskeleton.cpp b/kdecore/kconfigskeleton.cpp
index 819696a15..9e6070d6a 100644
--- a/kdecore/kconfigskeleton.cpp
+++ b/kdecore/kconfigskeleton.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qvariant.h>
+#include <tqcolor.h>
+#include <tqvariant.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -38,11 +38,11 @@ void KConfigSkeletonItem::readImmutability( KConfig *config )
}
-KConfigSkeleton::ItemString::ItemString( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue,
+KConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue,
Type type )
- : KConfigSkeletonGenericItem<QString>( group, key, reference, defaultValue ),
+ : KConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ),
mType( type )
{
}
@@ -74,7 +74,7 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config )
}
else if ( mType == Password )
{
- QString value = config->readEntry( mKey,
+ TQString value = config->readEntry( mKey,
KStringHandler::obscure( mDefault ) );
mReference = KStringHandler::obscure( value );
}
@@ -88,35 +88,35 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemString::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemString::setProperty(const TQVariant & p)
{
mReference = p.toString();
}
-QVariant KConfigSkeleton::ItemString::property() const
+TQVariant KConfigSkeleton::ItemString::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPassword::ItemPassword( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue)
+KConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Password )
{
}
-KConfigSkeleton::ItemPath::ItemPath( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue)
+KConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Path )
{
}
-KConfigSkeleton::ItemProperty::ItemProperty( const QString &group,
- const QString &key,
- QVariant &reference,
- QVariant defaultValue )
- : KConfigSkeletonGenericItem<QVariant>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemProperty::ItemProperty( const TQString &group,
+ const TQString &key,
+ TQVariant &reference,
+ TQVariant defaultValue )
+ : KConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue )
{
}
@@ -129,17 +129,17 @@ void KConfigSkeleton::ItemProperty::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemProperty::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemProperty::setProperty(const TQVariant & p)
{
mReference = p;
}
-QVariant KConfigSkeleton::ItemProperty::property() const
+TQVariant KConfigSkeleton::ItemProperty::property() const
{
return mReference;
}
-KConfigSkeleton::ItemBool::ItemBool( const QString &group, const QString &key,
+KConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key,
bool &reference, bool defaultValue )
: KConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue )
{
@@ -154,18 +154,18 @@ void KConfigSkeleton::ItemBool::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemBool::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemBool::setProperty(const TQVariant & p)
{
mReference = p.toBool();
}
-QVariant KConfigSkeleton::ItemBool::property() const
+TQVariant KConfigSkeleton::ItemBool::property() const
{
- return QVariant( mReference, 42 /* dummy */ );
+ return TQVariant( mReference, 42 /* dummy */ );
}
-KConfigSkeleton::ItemInt::ItemInt( const QString &group, const QString &key,
+KConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key,
int &reference, int defaultValue )
: KConfigSkeletonGenericItem<int>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -185,28 +185,28 @@ void KConfigSkeleton::ItemInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemInt::setProperty(const TQVariant & p)
{
mReference = p.toInt();
}
-QVariant KConfigSkeleton::ItemInt::property() const
+TQVariant KConfigSkeleton::ItemInt::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemInt::minValue() const
+TQVariant KConfigSkeleton::ItemInt::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemInt::maxValue() const
+TQVariant KConfigSkeleton::ItemInt::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemInt::setMinValue(int v)
@@ -222,7 +222,7 @@ void KConfigSkeleton::ItemInt::setMaxValue(int v)
}
-KConfigSkeleton::ItemInt64::ItemInt64( const QString &group, const QString &key,
+KConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key,
Q_INT64 &reference, Q_INT64 defaultValue )
: KConfigSkeletonGenericItem<Q_INT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -242,28 +242,28 @@ void KConfigSkeleton::ItemInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt64::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemInt64::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-QVariant KConfigSkeleton::ItemInt64::property() const
+TQVariant KConfigSkeleton::ItemInt64::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemInt64::minValue() const
+TQVariant KConfigSkeleton::ItemInt64::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemInt64::maxValue() const
+TQVariant KConfigSkeleton::ItemInt64::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemInt64::setMinValue(Q_INT64 v)
@@ -278,9 +278,9 @@ void KConfigSkeleton::ItemInt64::setMaxValue(Q_INT64 v)
mMax = v;
}
-KConfigSkeleton::ItemEnum::ItemEnum( const QString &group, const QString &key,
+KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key,
int &reference,
- const QValueList<Choice> &choices,
+ const TQValueList<Choice> &choices,
int defaultValue )
: ItemInt( group, key, reference, defaultValue ), mChoices( choices )
{
@@ -297,8 +297,8 @@ void KConfigSkeleton::ItemEnum::readConfig( KConfig *config )
{
int i = 0;
mReference = -1;
- QString tmp = config->readEntry( mKey ).lower();
- for(QValueList<Choice>::ConstIterator it = mChoices.begin();
+ TQString tmp = config->readEntry( mKey ).lower();
+ for(TQValueList<Choice>::ConstIterator it = mChoices.begin();
it != mChoices.end(); ++it, ++i)
{
if ((*it).name.lower() == tmp)
@@ -329,13 +329,13 @@ void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config )
}
}
-QValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const
+TQValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const
{
return mChoices;
}
-KConfigSkeleton::ItemUInt::ItemUInt( const QString &group, const QString &key,
+KConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key,
unsigned int &reference,
unsigned int defaultValue )
: KConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue )
@@ -356,28 +356,28 @@ void KConfigSkeleton::ItemUInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemUInt::setProperty(const TQVariant & p)
{
mReference = p.toUInt();
}
-QVariant KConfigSkeleton::ItemUInt::property() const
+TQVariant KConfigSkeleton::ItemUInt::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemUInt::minValue() const
+TQVariant KConfigSkeleton::ItemUInt::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemUInt::maxValue() const
+TQVariant KConfigSkeleton::ItemUInt::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemUInt::setMinValue(unsigned int v)
@@ -393,7 +393,7 @@ void KConfigSkeleton::ItemUInt::setMaxValue(unsigned int v)
}
-KConfigSkeleton::ItemUInt64::ItemUInt64( const QString &group, const QString &key,
+KConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key,
Q_UINT64 &reference, Q_UINT64 defaultValue )
: KConfigSkeletonGenericItem<Q_UINT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -413,28 +413,28 @@ void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt64::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-QVariant KConfigSkeleton::ItemUInt64::property() const
+TQVariant KConfigSkeleton::ItemUInt64::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemUInt64::minValue() const
+TQVariant KConfigSkeleton::ItemUInt64::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemUInt64::maxValue() const
+TQVariant KConfigSkeleton::ItemUInt64::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemUInt64::setMinValue(Q_UINT64 v)
@@ -449,7 +449,7 @@ void KConfigSkeleton::ItemUInt64::setMaxValue(Q_UINT64 v)
mMax = v;
}
-KConfigSkeleton::ItemLong::ItemLong( const QString &group, const QString &key,
+KConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key,
long &reference, long defaultValue )
: KConfigSkeletonGenericItem<long>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -469,28 +469,28 @@ void KConfigSkeleton::ItemLong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemLong::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemLong::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-QVariant KConfigSkeleton::ItemLong::property() const
+TQVariant KConfigSkeleton::ItemLong::property() const
{
- return QVariant((Q_LLONG) mReference);
+ return TQVariant((Q_LLONG) mReference);
}
-QVariant KConfigSkeleton::ItemLong::minValue() const
+TQVariant KConfigSkeleton::ItemLong::minValue() const
{
if (mHasMin)
- return QVariant((Q_LLONG) mMin);
- return QVariant();
+ return TQVariant((Q_LLONG) mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemLong::maxValue() const
+TQVariant KConfigSkeleton::ItemLong::maxValue() const
{
if (mHasMax)
- return QVariant((Q_LLONG) mMax);
- return QVariant();
+ return TQVariant((Q_LLONG) mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemLong::setMinValue(long v)
@@ -506,7 +506,7 @@ void KConfigSkeleton::ItemLong::setMaxValue(long v)
}
-KConfigSkeleton::ItemULong::ItemULong( const QString &group, const QString &key,
+KConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key,
unsigned long &reference,
unsigned long defaultValue )
: KConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue )
@@ -527,28 +527,28 @@ void KConfigSkeleton::ItemULong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemULong::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemULong::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-QVariant KConfigSkeleton::ItemULong::property() const
+TQVariant KConfigSkeleton::ItemULong::property() const
{
- return QVariant((Q_ULLONG) mReference);
+ return TQVariant((Q_ULLONG) mReference);
}
-QVariant KConfigSkeleton::ItemULong::minValue() const
+TQVariant KConfigSkeleton::ItemULong::minValue() const
{
if (mHasMin)
- return QVariant((Q_ULLONG) mMin);
- return QVariant();
+ return TQVariant((Q_ULLONG) mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemULong::maxValue() const
+TQVariant KConfigSkeleton::ItemULong::maxValue() const
{
if (mHasMax)
- return QVariant((Q_ULLONG) mMax);
- return QVariant();
+ return TQVariant((Q_ULLONG) mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemULong::setMinValue(unsigned long v)
@@ -564,7 +564,7 @@ void KConfigSkeleton::ItemULong::setMaxValue(unsigned long v)
}
-KConfigSkeleton::ItemDouble::ItemDouble( const QString &group, const QString &key,
+KConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key,
double &reference, double defaultValue )
: KConfigSkeletonGenericItem<double>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -584,28 +584,28 @@ void KConfigSkeleton::ItemDouble::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDouble::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemDouble::setProperty(const TQVariant & p)
{
mReference = p.toDouble();
}
-QVariant KConfigSkeleton::ItemDouble::property() const
+TQVariant KConfigSkeleton::ItemDouble::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemDouble::minValue() const
+TQVariant KConfigSkeleton::ItemDouble::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemDouble::maxValue() const
+TQVariant KConfigSkeleton::ItemDouble::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemDouble::setMinValue(double v)
@@ -621,10 +621,10 @@ void KConfigSkeleton::ItemDouble::setMaxValue(double v)
}
-KConfigSkeleton::ItemColor::ItemColor( const QString &group, const QString &key,
- QColor &reference,
- const QColor &defaultValue )
- : KConfigSkeletonGenericItem<QColor>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key,
+ TQColor &reference,
+ const TQColor &defaultValue )
+ : KConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue )
{
}
@@ -637,21 +637,21 @@ void KConfigSkeleton::ItemColor::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemColor::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemColor::setProperty(const TQVariant & p)
{
mReference = p.toColor();
}
-QVariant KConfigSkeleton::ItemColor::property() const
+TQVariant KConfigSkeleton::ItemColor::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemFont::ItemFont( const QString &group, const QString &key,
- QFont &reference,
- const QFont &defaultValue )
- : KConfigSkeletonGenericItem<QFont>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key,
+ TQFont &reference,
+ const TQFont &defaultValue )
+ : KConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue )
{
}
@@ -664,21 +664,21 @@ void KConfigSkeleton::ItemFont::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemFont::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemFont::setProperty(const TQVariant & p)
{
mReference = p.toFont();
}
-QVariant KConfigSkeleton::ItemFont::property() const
+TQVariant KConfigSkeleton::ItemFont::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemRect::ItemRect( const QString &group, const QString &key,
- QRect &reference,
- const QRect &defaultValue )
- : KConfigSkeletonGenericItem<QRect>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key,
+ TQRect &reference,
+ const TQRect &defaultValue )
+ : KConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue )
{
}
@@ -691,21 +691,21 @@ void KConfigSkeleton::ItemRect::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemRect::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemRect::setProperty(const TQVariant & p)
{
mReference = p.toRect();
}
-QVariant KConfigSkeleton::ItemRect::property() const
+TQVariant KConfigSkeleton::ItemRect::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPoint::ItemPoint( const QString &group, const QString &key,
- QPoint &reference,
- const QPoint &defaultValue )
- : KConfigSkeletonGenericItem<QPoint>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key,
+ TQPoint &reference,
+ const TQPoint &defaultValue )
+ : KConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue )
{
}
@@ -718,21 +718,21 @@ void KConfigSkeleton::ItemPoint::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemPoint::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemPoint::setProperty(const TQVariant & p)
{
mReference = p.toPoint();
}
-QVariant KConfigSkeleton::ItemPoint::property() const
+TQVariant KConfigSkeleton::ItemPoint::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemSize::ItemSize( const QString &group, const QString &key,
- QSize &reference,
- const QSize &defaultValue )
- : KConfigSkeletonGenericItem<QSize>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key,
+ TQSize &reference,
+ const TQSize &defaultValue )
+ : KConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue )
{
}
@@ -745,21 +745,21 @@ void KConfigSkeleton::ItemSize::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemSize::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemSize::setProperty(const TQVariant & p)
{
mReference = p.toSize();
}
-QVariant KConfigSkeleton::ItemSize::property() const
+TQVariant KConfigSkeleton::ItemSize::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemDateTime::ItemDateTime( const QString &group, const QString &key,
- QDateTime &reference,
- const QDateTime &defaultValue )
- : KConfigSkeletonGenericItem<QDateTime>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key,
+ TQDateTime &reference,
+ const TQDateTime &defaultValue )
+ : KConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue )
{
}
@@ -772,21 +772,21 @@ void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDateTime::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p)
{
mReference = p.toDateTime();
}
-QVariant KConfigSkeleton::ItemDateTime::property() const
+TQVariant KConfigSkeleton::ItemDateTime::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemStringList::ItemStringList( const QString &group, const QString &key,
- QStringList &reference,
- const QStringList &defaultValue )
- : KConfigSkeletonGenericItem<QStringList>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key,
+ TQStringList &reference,
+ const TQStringList &defaultValue )
+ : KConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue )
{
}
@@ -802,20 +802,20 @@ void KConfigSkeleton::ItemStringList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemStringList::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemStringList::setProperty(const TQVariant & p)
{
mReference = p.toStringList();
}
-QVariant KConfigSkeleton::ItemStringList::property() const
+TQVariant KConfigSkeleton::ItemStringList::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPathList::ItemPathList( const QString &group, const QString &key,
- QStringList &reference,
- const QStringList &defaultValue )
+KConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key,
+ TQStringList &reference,
+ const TQStringList &defaultValue )
: ItemStringList( group, key, reference, defaultValue )
{
}
@@ -840,17 +840,17 @@ void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config )
if ((mDefault == mReference) && !config->hasDefault( mKey))
config->revertToDefault( mKey );
else {
- QStringList sl = mReference;
+ TQStringList sl = mReference;
config->writePathEntry( mKey, sl );
}
}
}
-KConfigSkeleton::ItemIntList::ItemIntList( const QString &group, const QString &key,
- QValueList<int> &reference,
- const QValueList<int> &defaultValue )
- : KConfigSkeletonGenericItem<QValueList<int> >( group, key, reference, defaultValue )
+KConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key,
+ TQValueList<int> &reference,
+ const TQValueList<int> &defaultValue )
+ : KConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue )
{
}
@@ -866,19 +866,19 @@ void KConfigSkeleton::ItemIntList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemIntList::setProperty(const QVariant &)
+void KConfigSkeleton::ItemIntList::setProperty(const TQVariant &)
{
// TODO: Not yet supported
}
-QVariant KConfigSkeleton::ItemIntList::property() const
+TQVariant KConfigSkeleton::ItemIntList::property() const
{
// TODO: Not yet supported
- return QVariant();
+ return TQVariant();
}
-KConfigSkeleton::KConfigSkeleton( const QString &configname )
+KConfigSkeleton::KConfigSkeleton( const TQString &configname )
: mCurrentGroup( "No Group" ), mUseDefaults(false)
{
kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl;
@@ -910,7 +910,7 @@ KConfigSkeleton::~KConfigSkeleton()
}
}
-void KConfigSkeleton::setCurrentGroup( const QString &group )
+void KConfigSkeleton::setCurrentGroup( const TQString &group )
{
mCurrentGroup = group;
}
@@ -950,7 +950,7 @@ void KConfigSkeleton::readConfig()
{
kdDebug(177) << "KConfigSkeleton::readConfig()" << endl;
- QString origGroup = mConfig->group();
+ TQString origGroup = mConfig->group();
mConfig->reparseConfiguration();
KConfigSkeletonItem::List::ConstIterator it;
@@ -968,7 +968,7 @@ void KConfigSkeleton::writeConfig()
{
kdDebug(177) << "KConfigSkeleton::writeConfig()" << endl;
- QString origGroup = mConfig->group();
+ TQString origGroup = mConfig->group();
KConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
@@ -985,7 +985,7 @@ void KConfigSkeleton::writeConfig()
mConfig->setGroup(origGroup);
}
-void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const QString &name )
+void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name )
{
item->setName( name.isEmpty() ? item->key() : name );
mItems.append( item );
@@ -994,8 +994,8 @@ void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const QString &name )
item->readConfig( mConfig );
}
-KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemString *item;
item = new KConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key,
@@ -1005,8 +1005,8 @@ KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const QString &name
return item;
}
-KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPassword *item;
item = new KConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key,
@@ -1015,8 +1015,8 @@ KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const QString &
return item;
}
-KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPath *item;
item = new KConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key,
@@ -1025,8 +1025,8 @@ KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const QString &name, QS
return item;
}
-KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const QString &name, QVariant &reference,
- const QVariant &defaultValue, const QString &key )
+KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference,
+ const TQVariant &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemProperty *item;
item = new KConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key,
@@ -1035,8 +1035,8 @@ KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const QString &
return item;
}
-KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const QString &name, bool &reference,
- bool defaultValue, const QString &key )
+KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const TQString &name, bool &reference,
+ bool defaultValue, const TQString &key )
{
KConfigSkeleton::ItemBool *item;
item = new KConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key,
@@ -1045,8 +1045,8 @@ KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const QString &name, bo
return item;
}
-KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const QString &name, int &reference,
- int defaultValue, const QString &key )
+KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const TQString &name, int &reference,
+ int defaultValue, const TQString &key )
{
KConfigSkeleton::ItemInt *item;
item = new KConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key,
@@ -1055,8 +1055,8 @@ KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const QString &name, int
return item;
}
-KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const QString &name, unsigned int &reference,
- unsigned int defaultValue, const QString &key )
+KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference,
+ unsigned int defaultValue, const TQString &key )
{
KConfigSkeleton::ItemUInt *item;
item = new KConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key,
@@ -1065,8 +1065,8 @@ KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const QString &name, un
return item;
}
-KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const QString &name, Q_INT64 &reference,
- Q_INT64 defaultValue, const QString &key )
+KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, Q_INT64 &reference,
+ Q_INT64 defaultValue, const TQString &key )
{
KConfigSkeleton::ItemInt64 *item;
item = new KConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key,
@@ -1075,8 +1075,8 @@ KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const QString &name,
return item;
}
-KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const QString &name, Q_UINT64 &reference,
- Q_UINT64 defaultValue, const QString &key )
+KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, Q_UINT64 &reference,
+ Q_UINT64 defaultValue, const TQString &key )
{
KConfigSkeleton::ItemUInt64 *item;
item = new KConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key,
@@ -1085,8 +1085,8 @@ KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const QString &name
return item;
}
-KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const QString &name, long &reference,
- long defaultValue, const QString &key )
+KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const TQString &name, long &reference,
+ long defaultValue, const TQString &key )
{
KConfigSkeleton::ItemLong *item;
item = new KConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key,
@@ -1095,8 +1095,8 @@ KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const QString &name, lo
return item;
}
-KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const QString &name, unsigned long &reference,
- unsigned long defaultValue, const QString &key )
+KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference,
+ unsigned long defaultValue, const TQString &key )
{
KConfigSkeleton::ItemULong *item;
item = new KConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key,
@@ -1105,8 +1105,8 @@ KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const QString &name,
return item;
}
-KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const QString &name, double &reference,
- double defaultValue, const QString &key )
+KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const TQString &name, double &reference,
+ double defaultValue, const TQString &key )
{
KConfigSkeleton::ItemDouble *item;
item = new KConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key,
@@ -1115,8 +1115,8 @@ KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const QString &name
return item;
}
-KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const QString &name, QColor &reference,
- const QColor &defaultValue, const QString &key )
+KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const TQString &name, TQColor &reference,
+ const TQColor &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemColor *item;
item = new KConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key,
@@ -1125,8 +1125,8 @@ KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const QString &name,
return item;
}
-KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const QString &name, QFont &reference,
- const QFont &defaultValue, const QString &key )
+KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const TQString &name, TQFont &reference,
+ const TQFont &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemFont *item;
item = new KConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key,
@@ -1135,8 +1135,8 @@ KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const QString &name, QF
return item;
}
-KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const QString &name, QRect &reference,
- const QRect &defaultValue, const QString &key )
+KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const TQString &name, TQRect &reference,
+ const TQRect &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemRect *item;
item = new KConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key,
@@ -1145,8 +1145,8 @@ KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const QString &name, QR
return item;
}
-KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const QString &name, QPoint &reference,
- const QPoint &defaultValue, const QString &key )
+KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference,
+ const TQPoint &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPoint *item;
item = new KConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key,
@@ -1155,8 +1155,8 @@ KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const QString &name,
return item;
}
-KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const QString &name, QSize &reference,
- const QSize &defaultValue, const QString &key )
+KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const TQString &name, TQSize &reference,
+ const TQSize &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemSize *item;
item = new KConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key,
@@ -1165,8 +1165,8 @@ KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const QString &name, QS
return item;
}
-KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const QString &name, QDateTime &reference,
- const QDateTime &defaultValue, const QString &key )
+KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference,
+ const TQDateTime &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemDateTime *item;
item = new KConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key,
@@ -1175,8 +1175,8 @@ KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const QString &
return item;
}
-KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const QString &name, QStringList &reference,
- const QStringList &defaultValue, const QString &key )
+KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference,
+ const TQStringList &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemStringList *item;
item = new KConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key,
@@ -1185,8 +1185,8 @@ KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const QStri
return item;
}
-KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const QString &name, QValueList<int> &reference,
- const QValueList<int> &defaultValue, const QString &key )
+KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference,
+ const TQValueList<int> &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemIntList *item;
item = new KConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key,
@@ -1195,13 +1195,13 @@ KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const QString &na
return item;
}
-bool KConfigSkeleton::isImmutable(const QString &name)
+bool KConfigSkeleton::isImmutable(const TQString &name)
{
KConfigSkeletonItem *item = findItem(name);
return !item || item->isImmutable();
}
-KConfigSkeletonItem *KConfigSkeleton::findItem(const QString &name)
+KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name)
{
return mItemDict.find(name);
}
diff --git a/kdecore/kconfigskeleton.h b/kdecore/kconfigskeleton.h
index 44fdfc7fa..82185c090 100644
--- a/kdecore/kconfigskeleton.h
+++ b/kdecore/kconfigskeleton.h
@@ -23,16 +23,16 @@
#ifndef _KCONFIGSKELETON_H
#define _KCONFIGSKELETON_H
-#include <qcolor.h>
-#include <qdatetime.h>
-#include <qfont.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstringlist.h>
-#include <qvariant.h>
+#include <tqcolor.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -50,9 +50,9 @@
class KDECORE_EXPORT KConfigSkeletonItem
{
public:
- typedef QValueList < KConfigSkeletonItem * >List;
- typedef QDict < KConfigSkeletonItem > Dict;
- typedef QDictIterator < KConfigSkeletonItem > DictIterator;
+ typedef TQValueList < KConfigSkeletonItem * >List;
+ typedef TQDict < KConfigSkeletonItem > Dict;
+ typedef TQDictIterator < KConfigSkeletonItem > DictIterator;
/**
* Constructor.
@@ -60,7 +60,7 @@
* @param group Config file group.
* @param key Config file key.
*/
- KConfigSkeletonItem(const QString & group, const QString & key)
+ KConfigSkeletonItem(const TQString & group, const TQString & key)
:mGroup(group),mKey(key), mIsImmutable(true)
{
}
@@ -75,7 +75,7 @@
/**
* Set config file group.
*/
- void setGroup( const QString &group )
+ void setGroup( const TQString &group )
{
mGroup = group;
}
@@ -83,7 +83,7 @@
/**
* Return config file group.
*/
- QString group() const
+ TQString group() const
{
return mGroup;
}
@@ -91,7 +91,7 @@
/**
* Set config file key.
*/
- void setKey( const QString &key )
+ void setKey( const TQString &key )
{
mKey = key;
}
@@ -99,7 +99,7 @@
/**
* Return config file key.
*/
- QString key() const
+ TQString key() const
{
return mKey;
}
@@ -107,7 +107,7 @@
/**
* Set internal name of entry.
*/
- void setName(const QString &name)
+ void setName(const TQString &name)
{
mName = name;
}
@@ -115,7 +115,7 @@
/**
* Return internal name of entry.
*/
- QString name() const
+ TQString name() const
{
return mName;
}
@@ -123,7 +123,7 @@
/**
Set label providing a translated one-line description of the item.
*/
- void setLabel( const QString &l )
+ void setLabel( const TQString &l )
{
mLabel = l;
}
@@ -131,7 +131,7 @@
/**
Return label of item. See setLabel().
*/
- QString label() const
+ TQString label() const
{
return mLabel;
}
@@ -139,7 +139,7 @@
/**
Set WhatsThis description og item.
*/
- void setWhatsThis( const QString &w )
+ void setWhatsThis( const TQString &w )
{
mWhatsThis = w;
}
@@ -147,7 +147,7 @@
/**
Return WhatsThis description of item. See setWhatsThis().
*/
- QString whatsThis() const
+ TQString whatsThis() const
{
return mWhatsThis;
}
@@ -173,22 +173,22 @@
/**
* Set item to @p p
*/
- virtual void setProperty(const QVariant &p) = 0;
+ virtual void setProperty(const TQVariant &p) = 0;
/**
* Return item as property
*/
- virtual QVariant property() const = 0;
+ virtual TQVariant property() const = 0;
/**
* Return minimum value of item or invalid if not specified
*/
- virtual QVariant minValue() const { return QVariant(); }
+ virtual TQVariant minValue() const { return TQVariant(); }
/**
* Return maximum value of item or invalid if not specified
*/
- virtual QVariant maxValue() const { return QVariant(); }
+ virtual TQVariant maxValue() const { return TQVariant(); }
/**
Sets the current value to the default value.
@@ -216,22 +216,22 @@
*/
void readImmutability(KConfig *config);
- QString mGroup;
- QString mKey;
- QString mName;
+ TQString mGroup;
+ TQString mKey;
+ TQString mName;
private:
bool mIsImmutable;
- QString mLabel;
- QString mWhatsThis;
+ TQString mLabel;
+ TQString mWhatsThis;
};
template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonItem
{
public:
- KConfigSkeletonGenericItem(const QString & group, const QString & key, T & reference,
+ KConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference,
T defaultValue)
: KConfigSkeletonItem(group, key), mReference(reference),
mDefault(defaultValue), mLoadedValue(defaultValue)
@@ -330,15 +330,15 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
* {
* setCurrentGroup("MyGroup");
* addItemBool("MySetting1",mMyBool,false);
- * addItemColor("MySetting2",mMyColor,QColor(1,2,3));
+ * addItemColor("MySetting2",mMyColor,TQColor(1,2,3));
*
* setCurrentGroup("MyOtherGroup");
- * addItemFont("MySetting3",mMyFont,QFont("helvetica",12));
+ * addItemFont("MySetting3",mMyFont,TQFont("helvetica",12));
* }
*
* bool mMyBool;
- * QColor mMyColor;
- * QFont mMyFont;
+ * TQColor mMyColor;
+ * TQFont mMyFont;
* }
* \endcode
*
@@ -369,20 +369,20 @@ public:
/**
* Class for handling a string preferences item.
*/
- class KDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < QString >
+ class KDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < TQString >
{
public:
enum Type { Normal, Password, Path };
- ItemString(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::fromLatin1(""), // NOT QString::null !!
+ ItemString(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
Type type = Normal);
void writeConfig(KConfig * config);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
private:
Type mType;
@@ -394,9 +394,9 @@ public:
class KDECORE_EXPORT ItemPassword:public ItemString
{
public:
- ItemPassword(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::fromLatin1("")); // NOT QString::null !!
+ ItemPassword(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1("")); // NOT TQString::null !!
};
/**
@@ -405,24 +405,24 @@ public:
class KDECORE_EXPORT ItemPath:public ItemString
{
public:
- ItemPath(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::null);
+ ItemPath(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::null);
};
/**
- * Class for handling a QVariant preferences item.
+ * Class for handling a TQVariant preferences item.
*/
- class KDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < QVariant >
+ class KDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < TQVariant >
{
public:
- ItemProperty(const QString & group, const QString & key,
- QVariant & reference, QVariant defaultValue = 0);
+ ItemProperty(const TQString & group, const TQString & key,
+ TQVariant & reference, TQVariant defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -432,12 +432,12 @@ public:
class KDECORE_EXPORT ItemBool:public KConfigSkeletonGenericItem < bool >
{
public:
- ItemBool(const QString & group, const QString & key, bool & reference,
+ ItemBool(const TQString & group, const TQString & key, bool & reference,
bool defaultValue = true);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -447,14 +447,14 @@ public:
class KDECORE_EXPORT ItemInt:public KConfigSkeletonGenericItem < int >
{
public:
- ItemInt(const QString & group, const QString & key, int &reference,
+ ItemInt(const TQString & group, const TQString & key, int &reference,
int defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(int);
void setMaxValue(int);
@@ -472,15 +472,15 @@ public:
class KDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < Q_INT64 >
{
public:
- ItemInt64(const QString & group, const QString & key, Q_INT64 &reference,
+ ItemInt64(const TQString & group, const TQString & key, Q_INT64 &reference,
Q_INT64 defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(Q_INT64);
void setMaxValue(Q_INT64);
@@ -500,21 +500,21 @@ public:
public:
struct Choice
{
- QString name;
- QString label;
- QString whatsThis;
+ TQString name;
+ TQString label;
+ TQString whatsThis;
};
- ItemEnum(const QString & group, const QString & key, int &reference,
- const QValueList<Choice> &choices, int defaultValue = 0);
+ ItemEnum(const TQString & group, const TQString & key, int &reference,
+ const TQValueList<Choice> &choices, int defaultValue = 0);
- QValueList<Choice> choices() const;
+ TQValueList<Choice> choices() const;
void readConfig(KConfig * config);
void writeConfig(KConfig * config);
private:
- QValueList<Choice> mChoices;
+ TQValueList<Choice> mChoices;
};
@@ -524,14 +524,14 @@ public:
class KDECORE_EXPORT ItemUInt:public KConfigSkeletonGenericItem < unsigned int >
{
public:
- ItemUInt(const QString & group, const QString & key,
+ ItemUInt(const TQString & group, const TQString & key,
unsigned int &reference, unsigned int defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(unsigned int);
void setMaxValue(unsigned int);
@@ -550,14 +550,14 @@ public:
class KDECORE_EXPORT ItemLong:public KConfigSkeletonGenericItem < long >
{
public:
- ItemLong(const QString & group, const QString & key, long &reference,
+ ItemLong(const TQString & group, const TQString & key, long &reference,
long defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(long);
void setMaxValue(long);
@@ -576,14 +576,14 @@ public:
class KDECORE_EXPORT ItemULong:public KConfigSkeletonGenericItem < unsigned long >
{
public:
- ItemULong(const QString & group, const QString & key,
+ ItemULong(const TQString & group, const TQString & key,
unsigned long &reference, unsigned long defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(unsigned long);
void setMaxValue(unsigned long);
@@ -601,15 +601,15 @@ public:
class KDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < Q_UINT64 >
{
public:
- ItemUInt64(const QString & group, const QString & key, Q_UINT64 &reference,
+ ItemUInt64(const TQString & group, const TQString & key, Q_UINT64 &reference,
Q_UINT64 defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(Q_UINT64);
void setMaxValue(Q_UINT64);
@@ -627,14 +627,14 @@ public:
class KDECORE_EXPORT ItemDouble:public KConfigSkeletonGenericItem < double >
{
public:
- ItemDouble(const QString & group, const QString & key,
+ ItemDouble(const TQString & group, const TQString & key,
double &reference, double defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(double);
void setMaxValue(double);
@@ -650,108 +650,108 @@ public:
/**
* Class for handling a color preferences item.
*/
- class KDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < QColor >
+ class KDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < TQColor >
{
public:
- ItemColor(const QString & group, const QString & key,
- QColor & reference,
- const QColor & defaultValue = QColor(128, 128, 128));
+ ItemColor(const TQString & group, const TQString & key,
+ TQColor & reference,
+ const TQColor & defaultValue = TQColor(128, 128, 128));
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
* Class for handling a font preferences item.
*/
- class KDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < QFont >
+ class KDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < TQFont >
{
public:
- ItemFont(const QString & group, const QString & key, QFont & reference,
- const QFont & defaultValue = KGlobalSettings::generalFont());
+ ItemFont(const TQString & group, const TQString & key, TQFont & reference,
+ const TQFont & defaultValue = KGlobalSettings::generalFont());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QRect preferences item.
+ * Class for handling a TQRect preferences item.
*/
- class KDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < QRect >
+ class KDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < TQRect >
{
public:
- ItemRect(const QString & group, const QString & key, QRect & reference,
- const QRect & defaultValue = QRect());
+ ItemRect(const TQString & group, const TQString & key, TQRect & reference,
+ const TQRect & defaultValue = TQRect());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QPoint preferences item.
+ * Class for handling a TQPoint preferences item.
*/
- class KDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < QPoint >
+ class KDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < TQPoint >
{
public:
- ItemPoint(const QString & group, const QString & key, QPoint & reference,
- const QPoint & defaultValue = QPoint());
+ ItemPoint(const TQString & group, const TQString & key, TQPoint & reference,
+ const TQPoint & defaultValue = TQPoint());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QSize preferences item.
+ * Class for handling a TQSize preferences item.
*/
- class KDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < QSize >
+ class KDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < TQSize >
{
public:
- ItemSize(const QString & group, const QString & key, QSize & reference,
- const QSize & defaultValue = QSize());
+ ItemSize(const TQString & group, const TQString & key, TQSize & reference,
+ const TQSize & defaultValue = TQSize());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QDateTime preferences item.
+ * Class for handling a TQDateTime preferences item.
*/
- class KDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < QDateTime >
+ class KDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < TQDateTime >
{
public:
- ItemDateTime(const QString & group, const QString & key,
- QDateTime & reference,
- const QDateTime & defaultValue = QDateTime());
+ ItemDateTime(const TQString & group, const TQString & key,
+ TQDateTime & reference,
+ const TQDateTime & defaultValue = TQDateTime());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
* Class for handling a string list preferences item.
*/
- class KDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < QStringList >
+ class KDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < TQStringList >
{
public:
- ItemStringList(const QString & group, const QString & key,
- QStringList & reference,
- const QStringList & defaultValue = QStringList());
+ ItemStringList(const TQString & group, const TQString & key,
+ TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -761,9 +761,9 @@ public:
class KDECORE_EXPORT ItemPathList:public ItemStringList
{
public:
- ItemPathList(const QString & group, const QString & key,
- QStringList & reference,
- const QStringList & defaultValue = QStringList());
+ ItemPathList(const TQString & group, const TQString & key,
+ TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList());
void readConfig(KConfig * config);
void writeConfig(KConfig * config);
@@ -773,16 +773,16 @@ public:
/**
* Class for handling an integer list preferences item.
*/
- class KDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < QValueList < int > >
+ class KDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < TQValueList < int > >
{
public:
- ItemIntList(const QString & group, const QString & key,
- QValueList < int >&reference,
- const QValueList < int >&defaultValue = QValueList < int >());
+ ItemIntList(const TQString & group, const TQString & key,
+ TQValueList < int >&reference,
+ const TQValueList < int >&defaultValue = TQValueList < int >());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -793,7 +793,7 @@ public:
* @param configname name of config file. If no name is given, the default
* config file as returned by kapp()->config() is used.
*/
- KConfigSkeleton(const QString & configname = QString::null);
+ KConfigSkeleton(const TQString & configname = TQString::null);
/**
* Constructor.
@@ -829,12 +829,12 @@ public:
* until setCurrentGroup() is called with a new argument. Call this before
* you add any items. The default value is "No Group".
*/
- void setCurrentGroup(const QString & group);
+ void setCurrentGroup(const TQString & group);
/**
* Returns the current group used for addItem() calls.
*/
- QString currentGroup() // ### KDE 4.0: make const
+ TQString currentGroup() // ### KDE 4.0: make const
{
return mCurrentGroup;
}
@@ -845,10 +845,10 @@ public:
* Note that all names must be unique but that multiple entries can have
* the same key if they reside in different groups.
*/
- void addItem(KConfigSkeletonItem *, const QString & name = QString::null );
+ void addItem(KConfigSkeletonItem *, const TQString & name = TQString::null );
/**
- * Register an item of type QString.
+ * Register an item of type TQString.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -858,12 +858,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemString *addItemString(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""), // NOT QString::null !!
- const QString & key = QString::null);
+ ItemString *addItemString(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
+ const TQString & key = TQString::null);
/**
- * Register a password item of type QString. The string value is written
+ * Register a password item of type TQString. The string value is written
* encrypted to the config file. Note that the current encryption scheme
* is very weak.
*
@@ -875,12 +875,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPassword *addItemPassword(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""),
- const QString & key = QString::null);
+ ItemPassword *addItemPassword(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & key = TQString::null);
/**
- * Register a path item of type QString. The string value is interpreted
+ * Register a path item of type TQString. The string value is interpreted
* as a path. This means, dollar expension is activated for this value, so
* that e.g. $HOME gets expanded.
*
@@ -892,13 +892,13 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPath *addItemPath(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""),
- const QString & key = QString::null);
+ ItemPath *addItemPath(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & key = TQString::null);
/**
- * Register a property item of type QVariant. Note that only the following
- * QVariant types are allowed: String, StringList, Font, Point, Rect, Size,
+ * Register a property item of type TQVariant. Note that only the following
+ * TQVariant types are allowed: String, StringList, Font, Point, Rect, Size,
* Color, Int, UInt, Bool, Double, DateTime and Date.
*
* @param name Name used to indentify this setting. Names must be unique.
@@ -909,9 +909,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemProperty *addItemProperty(const QString & name, QVariant & reference,
- const QVariant & defaultValue = QVariant(),
- const QString & key = QString::null);
+ ItemProperty *addItemProperty(const TQString & name, TQVariant & reference,
+ const TQVariant & defaultValue = TQVariant(),
+ const TQString & key = TQString::null);
/**
* Register an item of type bool.
*
@@ -923,9 +923,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemBool *addItemBool(const QString & name, bool & reference,
+ ItemBool *addItemBool(const TQString & name, bool & reference,
bool defaultValue = false,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type int.
@@ -938,8 +938,8 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt *addItemInt(const QString & name, int &reference, int defaultValue = 0,
- const QString & key = QString::null);
+ ItemInt *addItemInt(const TQString & name, int &reference, int defaultValue = 0,
+ const TQString & key = TQString::null);
/**
* Register an item of type unsigned int.
@@ -952,9 +952,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt *addItemUInt(const QString & name, unsigned int &reference,
+ ItemUInt *addItemUInt(const TQString & name, unsigned int &reference,
unsigned int defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type long.
@@ -967,9 +967,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemLong *addItemLong(const QString & name, long &reference,
+ ItemLong *addItemLong(const TQString & name, long &reference,
long defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type unsigned long.
@@ -982,9 +982,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemULong *addItemULong(const QString & name, unsigned long &reference,
+ ItemULong *addItemULong(const TQString & name, unsigned long &reference,
unsigned long defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type Q_INT64.
@@ -997,9 +997,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt64 *addItemInt64(const QString & name, Q_INT64 &reference,
+ ItemInt64 *addItemInt64(const TQString & name, Q_INT64 &reference,
Q_INT64 defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type Q_UINT64
@@ -1012,9 +1012,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt64 *addItemUInt64(const QString & name, Q_UINT64 &reference,
+ ItemUInt64 *addItemUInt64(const TQString & name, Q_UINT64 &reference,
Q_UINT64 defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type double.
@@ -1027,12 +1027,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDouble *addItemDouble(const QString & name, double &reference,
+ ItemDouble *addItemDouble(const TQString & name, double &reference,
double defaultValue = 0.0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
- * Register an item of type QColor.
+ * Register an item of type TQColor.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1042,12 +1042,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemColor *addItemColor(const QString & name, QColor & reference,
- const QColor & defaultValue = QColor(128, 128, 128),
- const QString & key = QString::null);
+ ItemColor *addItemColor(const TQString & name, TQColor & reference,
+ const TQColor & defaultValue = TQColor(128, 128, 128),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QFont.
+ * Register an item of type TQFont.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1057,13 +1057,13 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemFont *addItemFont(const QString & name, QFont & reference,
- const QFont & defaultValue =
+ ItemFont *addItemFont(const TQString & name, TQFont & reference,
+ const TQFont & defaultValue =
KGlobalSettings::generalFont(),
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
- * Register an item of type QRect.
+ * Register an item of type TQRect.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1073,12 +1073,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemRect *addItemRect(const QString & name, QRect & reference,
- const QRect & defaultValue = QRect(),
- const QString & key = QString::null);
+ ItemRect *addItemRect(const TQString & name, TQRect & reference,
+ const TQRect & defaultValue = TQRect(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QPoint.
+ * Register an item of type TQPoint.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1088,12 +1088,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPoint *addItemPoint(const QString & name, QPoint & reference,
- const QPoint & defaultValue = QPoint(),
- const QString & key = QString::null);
+ ItemPoint *addItemPoint(const TQString & name, TQPoint & reference,
+ const TQPoint & defaultValue = TQPoint(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QSize.
+ * Register an item of type TQSize.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1103,12 +1103,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemSize *addItemSize(const QString & name, QSize & reference,
- const QSize & defaultValue = QSize(),
- const QString & key = QString::null);
+ ItemSize *addItemSize(const TQString & name, TQSize & reference,
+ const TQSize & defaultValue = TQSize(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QDateTime.
+ * Register an item of type TQDateTime.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1118,12 +1118,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDateTime *addItemDateTime(const QString & name, QDateTime & reference,
- const QDateTime & defaultValue = QDateTime(),
- const QString & key = QString::null);
+ ItemDateTime *addItemDateTime(const TQString & name, TQDateTime & reference,
+ const TQDateTime & defaultValue = TQDateTime(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QStringList.
+ * Register an item of type TQStringList.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1133,12 +1133,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemStringList *addItemStringList(const QString & name, QStringList & reference,
- const QStringList & defaultValue = QStringList(),
- const QString & key = QString::null);
+ ItemStringList *addItemStringList(const TQString & name, TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QValueList<int>.
+ * Register an item of type TQValueList<int>.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1148,10 +1148,10 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemIntList *addItemIntList(const QString & name, QValueList < int >&reference,
- const QValueList < int >&defaultValue =
- QValueList < int >(),
- const QString & key = QString::null);
+ ItemIntList *addItemIntList(const TQString & name, TQValueList < int >&reference,
+ const TQValueList < int >&defaultValue =
+ TQValueList < int >(),
+ const TQString & key = TQString::null);
/**
* Return the @ref KConfig object used for reading and writing the settings.
@@ -1169,12 +1169,12 @@ public:
/**
* Return whether a certain item is immutable
*/
- bool isImmutable(const QString & name);
+ bool isImmutable(const TQString & name);
/**
* Lookup item by name
*/
- KConfigSkeletonItem * findItem(const QString & name);
+ KConfigSkeletonItem * findItem(const TQString & name);
/**
* Indicate whether this object should reflect the actual
@@ -1213,7 +1213,7 @@ protected:
}
private:
- QString mCurrentGroup;
+ TQString mCurrentGroup;
KSharedConfig::Ptr mConfig; // pointer to KConfig object
diff --git a/kdecore/kcrash.cpp b/kdecore/kcrash.cpp
index 8fb8ed308..2a908670b 100644
--- a/kdecore/kcrash.cpp
+++ b/kdecore/kcrash.cpp
@@ -43,7 +43,7 @@
#include <sys/socket.h>
#include <errno.h>
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#include <kglobal.h>
#include <kinstance.h>
#include <kaboutdata.h>
@@ -349,9 +349,9 @@ static char *getDisplay()
char *colon;
char *i;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
diff --git a/kdecore/kcrash.h b/kdecore/kcrash.h
index a2fe969ea..31a802f3d 100644
--- a/kdecore/kcrash.h
+++ b/kdecore/kcrash.h
@@ -22,7 +22,7 @@
#ifndef __KCRASH_H
#define __KCRASH_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/**
@@ -97,16 +97,16 @@ class KDECORE_EXPORT KCrash
* Dr. Konqi, our nice crash display application.
* @param path the application path.
*/
- static void setApplicationPath (QString path) { appPath = qstrdup(path.local8Bit().data()); }
- /* KDE 4: Make it const QString & */
+ static void setApplicationPath (TQString path) { appPath = qstrdup(path.local8Bit().data()); }
+ /* KDE 4: Make it const TQString & */
/**
* Sets the application name @p name which should be passed to
* Dr. Konqi, our nice crash display application.
* @param name the name of the application, as shown in Dr. Konqi
*/
- static void setApplicationName (QString name) { appName = qstrdup(name.local8Bit().data()); }
- /* KDE 4: Make it const QString & */
+ static void setApplicationName (TQString name) { appName = qstrdup(name.local8Bit().data()); }
+ /* KDE 4: Make it const TQString & */
protected:
/**
diff --git a/kdecore/kdcoppropertyproxy.cpp b/kdecore/kdcoppropertyproxy.cpp
index e9c024fa0..bc720736f 100644
--- a/kdecore/kdcoppropertyproxy.cpp
+++ b/kdecore/kdcoppropertyproxy.cpp
@@ -19,18 +19,18 @@
#include "kdcoppropertyproxy.h"
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
-#include <qcursor.h>
-#include <qbitmap.h>
-#include <qregion.h>
-#include <qpointarray.h>
-#include <qiconset.h>
-#include <qfont.h>
-#include <qimage.h>
-#include <qbrush.h>
-#include <qpalette.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
+#include <tqbitmap.h>
+#include <tqregion.h>
+#include <tqpointarray.h>
+#include <tqiconset.h>
+#include <tqfont.h>
+#include <tqimage.h>
+#include <tqbrush.h>
+#include <tqpalette.h>
#include <ctype.h>
#include <assert.h>
@@ -45,10 +45,10 @@ public:
{
}
- QObject *m_object;
+ TQObject *m_object;
};
-KDCOPPropertyProxy::KDCOPPropertyProxy( QObject *object )
+KDCOPPropertyProxy::KDCOPPropertyProxy( TQObject *object )
{
d = new KDCOPPropertyProxyPrivate;
d->m_object = object;
@@ -59,51 +59,51 @@ KDCOPPropertyProxy::~KDCOPPropertyProxy()
delete d;
}
-bool KDCOPPropertyProxy::isPropertyRequest( const QCString &fun )
+bool KDCOPPropertyProxy::isPropertyRequest( const TQCString &fun )
{
return isPropertyRequest( fun, d->m_object );
}
-bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData )
+bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData )
{
return processPropertyRequest( fun, data, replyType, replyData, d->m_object );
}
-QValueList<QCString> KDCOPPropertyProxy::functions()
+TQValueList<TQCString> KDCOPPropertyProxy::functions()
{
return functions( d->m_object );
}
-bool KDCOPPropertyProxy::isPropertyRequest( const QCString &fun, QObject *object )
+bool KDCOPPropertyProxy::isPropertyRequest( const TQCString &fun, TQObject *object )
{
- if ( fun == "property(QCString)" ||
- fun == "setProperty(QCString,QVariant)" ||
+ if ( fun == "property(TQCString)" ||
+ fun == "setProperty(TQCString,TQVariant)" ||
fun == "propertyNames(bool)" )
return true;
bool set;
- QCString propName, arg;
+ TQCString propName, arg;
return decodePropertyRequestInternal( fun, object, set, propName, arg );
}
-QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
+TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object )
{
- QValueList<QCString> res;
- res << "QVariant property(QCString property)";
- res << "bool setProperty(QCString name,QVariant property)";
- res << "QValueList<QCString> propertyNames(bool super)";
-
- QMetaObject *metaObj = object->metaObject();
- QStrList properties = metaObj->propertyNames( true );
- QStrListIterator it( properties );
+ TQValueList<TQCString> res;
+ res << "TQVariant property(TQCString property)";
+ res << "bool setProperty(TQCString name,TQVariant property)";
+ res << "TQValueList<TQCString> propertyNames(bool super)";
+
+ TQMetaObject *metaObj = object->metaObject();
+ TQStrList properties = metaObj->propertyNames( true );
+ TQStrListIterator it( properties );
for (; it.current(); ++it )
{
- const QMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true );
+ const TQMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true );
assert( metaProp );
- QCString name = it.current();
+ TQCString name = it.current();
name.prepend( " " );
name.prepend( metaProp->type() );
name.append( "()" );
@@ -111,7 +111,7 @@ QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
if ( metaProp->writable() )
{
- QCString setName = it.current();
+ TQCString setName = it.current();
setName[ 0 ] = toupper( setName[ 0 ] );
setName = "void set" + setName + "(" + metaProp->type() + " " + it.current() + ")";
res << setName;
@@ -121,31 +121,31 @@ QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
return res;
}
-bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData,
- QObject *object )
+bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData,
+ TQObject *object )
{
- if ( fun == "property(QCString)" )
+ if ( fun == "property(TQCString)" )
{
- QCString propName;
- QDataStream stream( data, IO_ReadOnly );
+ TQCString propName;
+ TQDataStream stream( data, IO_ReadOnly );
stream >> propName;
- replyType = "QVariant";
- QDataStream reply( replyData, IO_WriteOnly );
+ replyType = "TQVariant";
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << object->property( propName );
return true;
}
- if ( fun == "setProperty(QCString,QVariant)" )
+ if ( fun == "setProperty(TQCString,TQVariant)" )
{
- QCString propName;
- QVariant propValue;
- QDataStream stream( data, IO_ReadOnly );
+ TQCString propName;
+ TQVariant propValue;
+ TQDataStream stream( data, IO_ReadOnly );
stream >> propName >> propValue;
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8)object->setProperty( propName, propValue );
return true;
}
@@ -153,23 +153,23 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
if ( fun == "propertyNames(bool)" )
{
Q_INT8 b;
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
stream >> b;
- QValueList<QCString> res;
- QStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) );
- QStrListIterator it( props );
+ TQValueList<TQCString> res;
+ TQStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) );
+ TQStrListIterator it( props );
for (; it.current(); ++it )
res.append( it.current() );
- replyType = "QValueList<QCString>";
- QDataStream reply( replyData, IO_WriteOnly );
+ replyType = "TQValueList<TQCString>";
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << res;
return true;
}
bool set;
- QCString propName, arg;
+ TQCString propName, arg;
bool res = decodePropertyRequestInternal( fun, object, set, propName, arg );
if ( !res )
@@ -177,60 +177,60 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
if ( set )
{
- QVariant prop;
- QDataStream stream( data, IO_ReadOnly );
+ TQVariant prop;
+ TQDataStream stream( data, IO_ReadOnly );
- QVariant::Type type = QVariant::nameToType( arg );
- if ( type == QVariant::Invalid )
+ TQVariant::Type type = TQVariant::nameToType( arg );
+ if ( type == TQVariant::Invalid )
return false;
#define DEMARSHAL( type, val ) \
- case QVariant::type: \
+ case TQVariant::type: \
{ \
val v; \
stream >> v; \
- prop = QVariant( v ); \
+ prop = TQVariant( v ); \
} \
break;
- typedef QValueList<QVariant> ListType;
- typedef QMap<QString,QVariant> MapType;
+ typedef TQValueList<TQVariant> ListType;
+ typedef TQMap<TQString,TQVariant> MapType;
switch ( type )
{
- DEMARSHAL( Cursor, QCursor )
- DEMARSHAL( Bitmap, QBitmap )
- DEMARSHAL( PointArray, QPointArray )
- DEMARSHAL( Region, QRegion )
+ DEMARSHAL( Cursor, TQCursor )
+ DEMARSHAL( Bitmap, TQBitmap )
+ DEMARSHAL( PointArray, TQPointArray )
+ DEMARSHAL( Region, TQRegion )
DEMARSHAL( List, ListType )
DEMARSHAL( Map, MapType )
- DEMARSHAL( String, QString )
- DEMARSHAL( CString, QCString )
- DEMARSHAL( StringList, QStringList )
- DEMARSHAL( Font, QFont )
- DEMARSHAL( Pixmap, QPixmap )
- DEMARSHAL( Image, QImage )
- DEMARSHAL( Brush, QBrush )
- DEMARSHAL( Point, QPoint )
- DEMARSHAL( Rect, QRect )
- DEMARSHAL( Size, QSize )
- DEMARSHAL( Color, QColor )
- DEMARSHAL( Palette, QPalette )
- DEMARSHAL( ColorGroup, QColorGroup )
- case QVariant::IconSet:
+ DEMARSHAL( String, TQString )
+ DEMARSHAL( CString, TQCString )
+ DEMARSHAL( StringList, TQStringList )
+ DEMARSHAL( Font, TQFont )
+ DEMARSHAL( Pixmap, TQPixmap )
+ DEMARSHAL( Image, TQImage )
+ DEMARSHAL( Brush, TQBrush )
+ DEMARSHAL( Point, TQPoint )
+ DEMARSHAL( Rect, TQRect )
+ DEMARSHAL( Size, TQSize )
+ DEMARSHAL( Color, TQColor )
+ DEMARSHAL( Palette, TQPalette )
+ DEMARSHAL( ColorGroup, TQColorGroup )
+ case TQVariant::IconSet:
{
- QPixmap val;
+ TQPixmap val;
stream >> val;
- prop = QVariant( QIconSet( val ) );
+ prop = TQVariant( TQIconSet( val ) );
}
break;
DEMARSHAL( Int, int )
DEMARSHAL( UInt, uint )
- case QVariant::Bool:
+ case TQVariant::Bool:
{
Q_INT8 v;
stream >> v;
- prop = QVariant( static_cast<bool>( v ), 1 );
+ prop = TQVariant( static_cast<bool>( v ), 1 );
}
break;
DEMARSHAL( Double, double )
@@ -243,16 +243,16 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
}
else
{
- QVariant prop = object->property( propName );
+ TQVariant prop = object->property( propName );
- if ( prop.type() == QVariant::Invalid )
+ if ( prop.type() == TQVariant::Invalid )
return false;
replyType = prop.typeName();
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
#define MARSHAL( type ) \
- case QVariant::type: \
+ case TQVariant::type: \
reply << prop.to##type(); \
break;
@@ -277,12 +277,12 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
MARSHAL( Color )
MARSHAL( Palette )
MARSHAL( ColorGroup )
- case QVariant::IconSet:
+ case TQVariant::IconSet:
reply << prop.toIconSet().pixmap();
break;
MARSHAL( Int )
MARSHAL( UInt )
- case QVariant::Bool:
+ case TQVariant::Bool:
reply << (Q_INT8)prop.toBool();
break;
MARSHAL( Double )
@@ -299,8 +299,8 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
return false;
}
-bool KDCOPPropertyProxy::decodePropertyRequestInternal( const QCString &fun, QObject *object, bool &set,
- QCString &propName, QCString &arg )
+bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQObject *object, bool &set,
+ TQCString &propName, TQCString &arg )
{
if ( fun.length() < 3 )
return false;
diff --git a/kdecore/kdcoppropertyproxy.h b/kdecore/kdcoppropertyproxy.h
index 97b5f6f73..9bc7736e3 100644
--- a/kdecore/kdcoppropertyproxy.h
+++ b/kdecore/kdcoppropertyproxy.h
@@ -19,21 +19,21 @@
#ifndef __kdcoppropertyproxy_h__
#define __kdcoppropertyproxy_h__
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KDCOPPropertyProxyPrivate;
/**
* The KDCOPPropertyProxy class provides an easy way to publish Qt properties of a
- * QObject through DCOP.
+ * TQObject through DCOP.
*
* The class provides DCOP equivalents for the Qt property methods setProperty() ,
* property() and propertyNames() and also provides automatic set/get methods for
- * the properties of a QObject. That means for example if your object provides a
- * QString property called foo , then KDCOPPropertyProxy translates DCOP calls
- * "setFoo( QString )" and "QString foo()" automatically into the corresponding
+ * the properties of a TQObject. That means for example if your object provides a
+ * TQString property called foo , then KDCOPPropertyProxy translates DCOP calls
+ * "setFoo( TQString )" and "TQString foo()" automatically into the corresponding
* setProperty/property calls.
*/
class KDECORE_EXPORT KDCOPPropertyProxy
@@ -41,10 +41,10 @@ class KDECORE_EXPORT KDCOPPropertyProxy
public:
/**
* Convenience constructor. Use it if you want to use this class as object, in contrary
- * to using the static methods of this class and providing a QObject argument for each
+ * to using the static methods of this class and providing a TQObject argument for each
* call.
*/
- KDCOPPropertyProxy( QObject *object );
+ KDCOPPropertyProxy( TQObject *object );
/**
* Destructor.
*/
@@ -54,31 +54,31 @@ public:
* Convenience method, when using this class as object. See documentation of the constructor and
* static isPropertyRequest method.
*/
- bool isPropertyRequest( const QCString &fun );
+ bool isPropertyRequest( const TQCString &fun );
/**
* Convenience method, when using this class as object. See documentation of the constructor and
* static processPropertyRequest method.
*/
- bool processPropertyRequest( const QCString &fun, const QByteArray &data, QCString &replyType,
- QByteArray &replyData );
+ bool processPropertyRequest( const TQCString &fun, const TQByteArray &data, TQCString &replyType,
+ TQByteArray &replyData );
/**
* Convenience method, when using this class as object. See documentation of the constructor and
* static functions method.
*/
- QValueList<QCString> functions();
+ TQValueList<TQCString> functions();
/**
* Returns a semicolon-separated list of functions understood by the PropertyProxy for the given
- * QObject argument.
+ * TQObject argument.
*
- * Returns "property(QCString);setProperty(QCString,QVariant);propertyNames();" plus set/get
+ * Returns "property(TQCString);setProperty(TQCString,TQVariant);propertyNames();" plus set/get
* methods for the properties of the given object argument.
*
* @see DCOPObject::functions()
*/
- static QValueList<QCString> functions( QObject *object );
+ static TQValueList<TQCString> functions( TQObject *object );
/**
* Returns true if the method request in the fun argument matches the signature of the three standard
@@ -87,18 +87,18 @@ public:
* Use this method in your own DCOPObject dispatcher to check if the DCOP request is a property
* request which can be handled by this class.
*/
- static bool isPropertyRequest( const QCString &fun, QObject *object );
+ static bool isPropertyRequest( const TQCString &fun, TQObject *object );
/**
* Processes the given DCOP method request by translating the request into a setProperty/property call
- * on the given QObject argument.
+ * on the given TQObject argument.
*/
- static bool processPropertyRequest( const QCString &fun, const QByteArray &data, QCString &replyType,
- QByteArray &replyData, QObject *object );
+ static bool processPropertyRequest( const TQCString &fun, const TQByteArray &data, TQCString &replyType,
+ TQByteArray &replyData, TQObject *object );
private:
- static bool decodePropertyRequestInternal( const QCString &fun, QObject *object, bool &set,
- QCString &propName, QCString &arg );
+ static bool decodePropertyRequestInternal( const TQCString &fun, TQObject *object, bool &set,
+ TQCString &propName, TQCString &arg );
KDCOPPropertyProxyPrivate *d;
};
diff --git a/kdecore/kde-config.cpp.in b/kdecore/kde-config.cpp.in
index 2a9b66bdf..da9d41782 100644
--- a/kdecore/kde-config.cpp.in
+++ b/kdecore/kde-config.cpp.in
@@ -30,9 +30,9 @@ static KCmdLineOptions options[] =
bool _expandvars = false;
-QString expandvars(const char *_input)
+TQString expandvars(const char *_input)
{
- QString result = QString::fromLatin1(_input);
+ TQString result = TQString::fromLatin1(_input);
if (!_expandvars)
return result;
@@ -103,7 +103,7 @@ QString expandvars(const char *_input)
return result;
}
-void printResult(const QString &s)
+void printResult(const TQString &s)
{
if (s.isEmpty())
printf("\n");
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
if (args->isSet("libsuffix"))
{
- QString tmp(KDELIBSUFF);
+ TQString tmp(KDELIBSUFF);
tmp.remove('"');
printResult(expandvars(tmp.local8Bit()));
return 0;
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
if (args->isSet("types"))
{
- QStringList types = KGlobal::dirs()->allTypes();
+ TQStringList types = KGlobal::dirs()->allTypes();
types.sort();
const char *helptexts[] = {
"apps", I18N_NOOP("Applications menu (.desktop files)"),
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
"socket", I18N_NOOP("UNIX Sockets (specific for both current host and current user)"),
0, 0
};
- for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it)
+ for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it)
{
int index = 0;
while (helptexts[index] && *it != helptexts[index]) {
@@ -206,7 +206,7 @@ int main(int argc, char **argv)
return 0;
}
- QString type = args->getOption("path");
+ TQString type = args->getOption("path");
if (!type.isEmpty())
{
printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index 4c9c7cf14..38e45daf6 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -32,19 +32,19 @@
#include "kinstance.h"
#include "kstandarddirs.h"
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qregion.h>
-#include <qstringlist.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qsize.h>
+#include <tqfile.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqregion.h>
+#include <tqstringlist.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqsize.h>
#include <kurl.h>
@@ -68,19 +68,19 @@ class KDebugEntry;
class KDebugEntry
{
public:
- KDebugEntry (int n, const QCString& d) {number=n; descr=d;}
+ KDebugEntry (int n, const TQCString& d) {number=n; descr=d;}
unsigned int number;
- QCString descr;
+ TQCString descr;
};
-static QIntDict<KDebugEntry> *KDebugCache;
+static TQIntDict<KDebugEntry> *KDebugCache;
-static KStaticDeleter< QIntDict<KDebugEntry> > kdd;
+static KStaticDeleter< TQIntDict<KDebugEntry> > kdd;
-static QCString getDescrFromNum(unsigned int _num)
+static TQCString getDescrFromNum(unsigned int _num)
{
if (!KDebugCache) {
- kdd.setObject(KDebugCache, new QIntDict<KDebugEntry>( 601 ));
+ kdd.setObject(KDebugCache, new TQIntDict<KDebugEntry>( 601 ));
// Do not call this deleter from ~KApplication
KGlobal::unregisterStaticDeleter(&kdd);
KDebugCache->setAutoDelete(true);
@@ -91,21 +91,21 @@ static QCString getDescrFromNum(unsigned int _num)
return ent->descr;
if ( !KDebugCache->isEmpty() ) // areas already loaded
- return QCString();
+ return TQCString();
- QString filename(locate("config","kdebug.areas"));
+ TQString filename(locate("config","kdebug.areas"));
if (filename.isEmpty())
- return QCString();
+ return TQCString();
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly)) {
qWarning("Couldn't open %s", filename.local8Bit().data());
file.close();
- return QCString();
+ return TQCString();
}
uint lineNumber=0;
- QCString line(1024);
+ TQCString line(1024);
int len;
while (( len = file.readLine(line.data(),line.size()-1) ) > 0) {
@@ -143,7 +143,7 @@ static QCString getDescrFromNum(unsigned int _num)
if ( ent )
return ent->descr;
- return QCString();
+ return TQCString();
}
enum DebugLevels {
@@ -160,7 +160,7 @@ struct kDebugPrivate {
~kDebugPrivate() { delete config; }
- QCString aAreaName;
+ TQCString aAreaName;
unsigned int oldarea;
KConfig *config;
};
@@ -197,7 +197,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
if (kDebug_data->config && kDebug_data->oldarea != nArea) {
- kDebug_data->config->setGroup( QString::number(static_cast<int>(nArea)) );
+ kDebug_data->config->setGroup( TQString::number(static_cast<int>(nArea)) );
kDebug_data->oldarea = nArea;
if ( nArea > 0 && KGlobal::_instance )
kDebug_data->aAreaName = getDescrFromNum(nArea);
@@ -207,11 +207,11 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
int nPriority = 0;
- QString aCaption;
+ TQString aCaption;
/* Determine output */
- QString key;
+ TQString key;
switch( nLevel )
{
case KDEBUG_INFO:
@@ -241,7 +241,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
// if no output mode is specified default to no debug output
short nOutput = kDebug_data->config ? kDebug_data->config->readNumEntry(key, 4) : 4;
- // If the application doesn't have a QApplication object it can't use
+ // If the application doesn't have a TQApplication object it can't use
// a messagebox.
if (!kapp && (nOutput == 1))
nOutput = 2;
@@ -281,7 +281,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
aKey = "ErrorFilename";
break;
}
- QFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
+ TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
aOutputFile.open( IO_WriteOnly | IO_Append | IO_Raw );
aOutputFile.writeBlock( buf, strlen( buf ) );
aOutputFile.close();
@@ -290,10 +290,10 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
case 1: // Message Box
{
// Since we are in kdecore here, we cannot use KMsgBox and use
- // QMessageBox instead
+ // TQMessageBox instead
if ( !kDebug_data->aAreaName.isEmpty() )
- aCaption += QString("(%1)").arg( kDebug_data->aAreaName );
- QMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
+ aCaption += TQString("(%1)").arg( kDebug_data->aAreaName );
+ TQMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
break;
}
case 2: // Shell
@@ -314,7 +314,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
abort();
}
-kdbgstream &perror( kdbgstream &s) { return s << QString::fromLocal8Bit(strerror(errno)); }
+kdbgstream &perror( kdbgstream &s) { return s << TQString::fromLocal8Bit(strerror(errno)); }
kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO); }
kdbgstream kdDebug(bool cond, int area) { if (cond) return kdbgstream(area, KDEBUG_INFO); else return kdbgstream(0, 0, false); }
@@ -335,7 +335,7 @@ void kdbgstream::flush() {
if (output.isEmpty() || !print)
return;
kDebugBackend( level, area, output.local8Bit().data() );
- output = QString::null;
+ output = TQString::null;
}
kdbgstream &kdbgstream::form(const char *format, ...)
@@ -361,7 +361,7 @@ kdbgstream& kdbgstream::operator << (char ch)
{
if (!print) return *this;
if (!isprint(ch))
- output += "\\x" + QString::number( static_cast<uint>( ch ), 16 ).rightJustify(2, '0');
+ output += "\\x" + TQString::number( static_cast<uint>( ch ), 16 ).rightJustify(2, '0');
else {
output += ch;
if (ch == '\n') flush();
@@ -369,11 +369,11 @@ kdbgstream& kdbgstream::operator << (char ch)
return *this;
}
-kdbgstream& kdbgstream::operator << (QChar ch)
+kdbgstream& kdbgstream::operator << (TQChar ch)
{
if (!print) return *this;
if (!ch.isPrint())
- output += "\\x" + QString::number( ch.unicode(), 16 ).rightJustify(2, '0');
+ output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else {
output += ch;
if (ch == '\n') flush();
@@ -381,33 +381,33 @@ kdbgstream& kdbgstream::operator << (QChar ch)
return *this;
}
-kdbgstream& kdbgstream::operator << (QWidget* widget)
+kdbgstream& kdbgstream::operator << (TQWidget* widget)
{
- return *this << const_cast< const QWidget* >( widget );
+ return *this << const_cast< const TQWidget* >( widget );
}
-kdbgstream& kdbgstream::operator << (const QWidget* widget)
+kdbgstream& kdbgstream::operator << (const TQWidget* widget)
{
- QString string, temp;
+ TQString string, temp;
// -----
if(widget==0)
{
- string=(QString)"[Null pointer]";
+ string=(TQString)"[Null pointer]";
} else {
temp.setNum((ulong)widget, 16);
- string=(QString)"["+widget->className()+" pointer "
+ string=(TQString)"["+widget->className()+" pointer "
+ "(0x" + temp + ")";
if(widget->name(0)==0)
{
string += " to unnamed widget, ";
} else {
- string += (QString)" to widget " + widget->name() + ", ";
+ string += (TQString)" to widget " + widget->name() + ", ";
}
string += "geometry="
- + QString().setNum(widget->width())
- + "x"+QString().setNum(widget->height())
- + "+"+QString().setNum(widget->x())
- + "+"+QString().setNum(widget->y())
+ + TQString().setNum(widget->width())
+ + "x"+TQString().setNum(widget->height())
+ + "+"+TQString().setNum(widget->x())
+ + "+"+TQString().setNum(widget->y())
+ "]";
}
if (!print)
@@ -423,40 +423,40 @@ kdbgstream& kdbgstream::operator << (const QWidget* widget)
}
/*
* either use 'output' directly and do the flush if needed
- * or use the QString operator which calls the char* operator
+ * or use the TQString operator which calls the char* operator
*
*/
-kdbgstream& kdbgstream::operator<<( const QDateTime& time) {
+kdbgstream& kdbgstream::operator<<( const TQDateTime& time) {
*this << time.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QDate& date) {
+kdbgstream& kdbgstream::operator<<( const TQDate& date) {
*this << date.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QTime& time ) {
+kdbgstream& kdbgstream::operator<<( const TQTime& time ) {
*this << time.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QPoint& p ) {
+kdbgstream& kdbgstream::operator<<( const TQPoint& p ) {
*this << "(" << p.x() << ", " << p.y() << ")";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QSize& s ) {
+kdbgstream& kdbgstream::operator<<( const TQSize& s ) {
*this << "[" << s.width() << "x" << s.height() << "]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QRect& r ) {
+kdbgstream& kdbgstream::operator<<( const TQRect& r ) {
*this << "[" << r.x() << "," << r.y() << " - " << r.width() << "x" << r.height() << "]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QRegion& reg ) {
+kdbgstream& kdbgstream::operator<<( const TQRegion& reg ) {
*this<< "[ ";
- QMemArray<QRect>rs=reg.rects();
+ TQMemArray<TQRect>rs=reg.rects();
for (uint i=0;i<rs.size();++i)
- *this << QString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() ) ;
+ *this << TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() ) ;
*this <<"]";
return *this;
@@ -465,21 +465,21 @@ kdbgstream& kdbgstream::operator<<( const KURL& u ) {
*this << u.prettyURL();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QStringList& l ) {
+kdbgstream& kdbgstream::operator<<( const TQStringList& l ) {
*this << "(";
*this << l.join(",");
*this << ")";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QColor& c ) {
+kdbgstream& kdbgstream::operator<<( const TQColor& c ) {
if ( c.isValid() )
*this <<c.name();
else
*this << "(invalid/default)";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QPen& p ) {
+kdbgstream& kdbgstream::operator<<( const TQPen& p ) {
static const char* const s_penStyles[] = {
"NoPen", "SolidLine", "DashLine", "DotLine", "DashDotLine",
"DashDotDotLine" };
@@ -503,7 +503,7 @@ kdbgstream& kdbgstream::operator<<( const QPen& p ) {
*this <<" ]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QBrush& b) {
+kdbgstream& kdbgstream::operator<<( const TQBrush& b) {
static const char* const s_brushStyles[] = {
"NoBrush", "SolidPattern", "Dense1Pattern", "Dense2Pattern", "Dense3Pattern",
"Dense4Pattern", "Dense5Pattern", "Dense6Pattern", "Dense7Pattern",
@@ -524,7 +524,7 @@ kdbgstream& kdbgstream::operator<<( const QBrush& b) {
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QVariant& v) {
+kdbgstream& kdbgstream::operator<<( const TQVariant& v) {
*this << "[variant: ";
*this << v.typeName();
// For now we just attempt a conversion to string.
@@ -535,13 +535,13 @@ kdbgstream& kdbgstream::operator<<( const QVariant& v) {
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QByteArray& data) {
+kdbgstream& kdbgstream::operator<<( const TQByteArray& data) {
if (!print) return *this;
output += '[';
unsigned int i = 0;
unsigned int sz = QMIN( data.size(), 64 );
for ( ; i < sz ; ++i ) {
- output += QString::number( (unsigned char) data[i], 16 ).rightJustify(2, '0');
+ output += TQString::number( (unsigned char) data[i], 16 ).rightJustify(2, '0');
if ( i < sz )
output += ' ';
}
@@ -551,9 +551,9 @@ kdbgstream& kdbgstream::operator<<( const QByteArray& data) {
return *this;
}
-QString kdBacktrace(int levels)
+TQString kdBacktrace(int levels)
{
- QString s;
+ TQString s;
#ifdef HAVE_BACKTRACE
void* trace[256];
int n = backtrace(trace, 256);
@@ -566,9 +566,9 @@ QString kdBacktrace(int levels)
s = "[\n";
for (int i = 0; i < n; ++i)
- s += QString::number(i) +
- QString::fromLatin1(": ") +
- QString::fromLatin1(strings[i]) + QString::fromLatin1("\n");
+ s += TQString::number(i) +
+ TQString::fromLatin1(": ") +
+ TQString::fromLatin1(strings[i]) + TQString::fromLatin1("\n");
s += "]\n";
if (strings)
free (strings);
@@ -576,7 +576,7 @@ QString kdBacktrace(int levels)
return s;
}
-QString kdBacktrace()
+TQString kdBacktrace()
{
return kdBacktrace(-1 /*all*/);
}
diff --git a/kdecore/kdebug.h b/kdecore/kdebug.h
index cf954454d..bc8a858f0 100644
--- a/kdecore/kdebug.h
+++ b/kdecore/kdebug.h
@@ -22,7 +22,7 @@
#ifndef _KDEBUG_H_
#define _KDEBUG_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class QWidget;
@@ -85,7 +85,7 @@ class KDECORE_EXPORT kdbgstream {
kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) :
area(_area), level(_level), print(_print) { }
kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true) :
- output(QString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
+ output(TQString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
/// Copy constructor
kdbgstream(kdbgstream &str);
kdbgstream(const kdbgstream &str) :
@@ -98,7 +98,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(bool i) {
if (!print) return *this;
- output += QString::fromLatin1(i ? "true" : "false");
+ output += TQString::fromLatin1(i ? "true" : "false");
return *this;
}
/**
@@ -108,7 +108,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(short i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -118,7 +118,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned short i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -142,7 +142,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(int i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -152,7 +152,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned int i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -162,7 +162,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(long i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -172,7 +172,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned long i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -182,7 +182,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(Q_LLONG i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -192,7 +192,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(Q_ULLONG i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
@@ -207,13 +207,13 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream &operator<<(QChar ch);
+ kdbgstream &operator<<(TQChar ch);
/**
* Prints the given value.
* @param string the string to print
* @return this stream
*/
- kdbgstream &operator<<(const QString& string) {
+ kdbgstream &operator<<(const TQString& string) {
if (!print) return *this;
output += string;
if (output.at(output.length() -1 ) == '\n')
@@ -227,7 +227,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(const char *string) {
if (!print) return *this;
- output += QString::fromUtf8(string);
+ output += TQString::fromUtf8(string);
if (output.at(output.length() - 1) == '\n')
flush();
return *this;
@@ -237,7 +237,7 @@ class KDECORE_EXPORT kdbgstream {
* @param string the string to print
* @return this stream
*/
- kdbgstream &operator<<(const QCString& string) {
+ kdbgstream &operator<<(const TQCString& string) {
*this << string.data();
return *this;
}
@@ -265,7 +265,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
*/
kdbgstream& operator<<(double d) {
- QString tmp; tmp.setNum(d); output += tmp;
+ TQString tmp; tmp.setNum(d); output += tmp;
return *this;
}
/**
@@ -280,62 +280,62 @@ class KDECORE_EXPORT kdbgstream {
#endif
;
- /** Operator to print out basic information about a QWidget.
+ /** Operator to print out basic information about a TQWidget.
* Output of class names only works if the class is moc'ified.
* @param widget the widget to print
* @return this stream
*/
- kdbgstream& operator << (const QWidget* widget);
- kdbgstream& operator << (QWidget* widget); // KDE4 merge
+ kdbgstream& operator << (const TQWidget* widget);
+ kdbgstream& operator << (TQWidget* widget); // KDE4 merge
/**
* Prints the given value.
* @param dateTime the datetime to print
* @return this stream
*/
- kdbgstream& operator << ( const QDateTime& dateTime );
+ kdbgstream& operator << ( const TQDateTime& dateTime );
/**
* Prints the given value.
* @param date the date to print
* @return this stream
*/
- kdbgstream& operator << ( const QDate& date );
+ kdbgstream& operator << ( const TQDate& date );
/**
* Prints the given value.
* @param time the time to print
* @return this stream
*/
- kdbgstream& operator << ( const QTime& time );
+ kdbgstream& operator << ( const TQTime& time );
/**
* Prints the given value.
* @param point the point to print
* @return this stream
*/
- kdbgstream& operator << ( const QPoint& point );
+ kdbgstream& operator << ( const TQPoint& point );
/**
* Prints the given value.
- * @param size the QSize to print
+ * @param size the TQSize to print
* @return this stream
*/
- kdbgstream& operator << ( const QSize& size );
+ kdbgstream& operator << ( const TQSize& size );
/**
* Prints the given value.
- * @param rect the QRect to print
+ * @param rect the TQRect to print
* @return this stream
*/
- kdbgstream& operator << ( const QRect& rect);
+ kdbgstream& operator << ( const TQRect& rect);
/**
* Prints the given value.
- * @param region the QRegion to print
+ * @param region the TQRegion to print
* @return this stream
*/
- kdbgstream& operator << ( const QRegion& region);
+ kdbgstream& operator << ( const TQRegion& region);
/**
* Prints the given value.
@@ -349,15 +349,15 @@ class KDECORE_EXPORT kdbgstream {
* @param list the stringlist to print
* @return this stream
*/
- // ### KDE4: Remove in favor of template operator for QValueList<T> below
- kdbgstream& operator << ( const QStringList& list);
+ // ### KDE4: Remove in favor of template operator for TQValueList<T> below
+ kdbgstream& operator << ( const TQStringList& list);
/**
* Prints the given value.
* @param color the color to print
* @return this stream
*/
- kdbgstream& operator << ( const QColor& color);
+ kdbgstream& operator << ( const TQColor& color);
/**
* Prints the given value.
@@ -365,14 +365,14 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.2
*/
- kdbgstream& operator << ( const QPen& pen );
+ kdbgstream& operator << ( const TQPen& pen );
/**
* Prints the given value.
* @param brush the brush to print
* @return this stream
*/
- kdbgstream& operator << ( const QBrush& brush );
+ kdbgstream& operator << ( const TQBrush& brush );
/**
* Prints the given value.
@@ -380,7 +380,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream& operator << ( const QVariant& variant );
+ kdbgstream& operator << ( const TQVariant& variant );
/**
* Prints the given value.
@@ -388,7 +388,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream& operator << ( const QByteArray& data );
+ kdbgstream& operator << ( const TQByteArray& data );
/**
* Prints the given value
@@ -397,20 +397,20 @@ class KDECORE_EXPORT kdbgstream {
* @since 3.3
*/
template <class T>
- kdbgstream& operator << ( const QValueList<T> &list );
+ kdbgstream& operator << ( const TQValueList<T> &list );
private:
- QString output;
+ TQString output;
unsigned int area, level;
bool print;
kdbgstreamprivate* d;
};
template <class T>
-kdbgstream &kdbgstream::operator<<( const QValueList<T> &list )
+kdbgstream &kdbgstream::operator<<( const TQValueList<T> &list )
{
*this << "(";
- typename QValueList<T>::ConstIterator it = list.begin();
+ typename TQValueList<T>::ConstIterator it = list.begin();
if ( !list.isEmpty() ) {
*this << *it++;
}
@@ -488,17 +488,17 @@ class KDECORE_EXPORT kndbgstream {
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(QChar) { return *this; }
+ kndbgstream &operator<<(TQChar) { return *this; }
/**
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(const QString& ) { return *this; }
+ kndbgstream &operator<<(const TQString& ) { return *this; }
/**
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(const QCString& ) { return *this; }
+ kndbgstream &operator<<(const TQCString& ) { return *this; }
/**
* Does nothing.
* @return this stream
@@ -548,31 +548,31 @@ class KDECORE_EXPORT kndbgstream {
* Does nothing.
* @return this stream
*/
- kndbgstream& operator << (const QWidget*) { return *this; }
- kndbgstream& operator << (QWidget*) { return *this; } // KDE4 merge
+ kndbgstream& operator << (const TQWidget*) { return *this; }
+ kndbgstream& operator << (TQWidget*) { return *this; } // KDE4 merge
/**
* Does nothing.
* @return this stream
*/
kndbgstream &form(const char *, ...) { return *this; }
- kndbgstream& operator<<( const QDateTime& ) { return *this; }
- kndbgstream& operator<<( const QDate& ) { return *this; }
- kndbgstream& operator<<( const QTime& ) { return *this; }
- kndbgstream& operator<<( const QPoint & ) { return *this; }
- kndbgstream& operator<<( const QSize & ) { return *this; }
- kndbgstream& operator<<( const QRect & ) { return *this; }
- kndbgstream& operator<<( const QRegion & ) { return *this; }
+ kndbgstream& operator<<( const TQDateTime& ) { return *this; }
+ kndbgstream& operator<<( const TQDate& ) { return *this; }
+ kndbgstream& operator<<( const TQTime& ) { return *this; }
+ kndbgstream& operator<<( const TQPoint & ) { return *this; }
+ kndbgstream& operator<<( const TQSize & ) { return *this; }
+ kndbgstream& operator<<( const TQRect & ) { return *this; }
+ kndbgstream& operator<<( const TQRegion & ) { return *this; }
kndbgstream& operator<<( const KURL & ) { return *this; }
- kndbgstream& operator<<( const QStringList & ) { return *this; }
- kndbgstream& operator<<( const QColor & ) { return *this; }
- kndbgstream& operator<<( const QPen & ) { return *this; }
- kndbgstream& operator<<( const QBrush & ) { return *this; }
- kndbgstream& operator<<( const QVariant & ) { return *this; }
- kndbgstream& operator<<( const QByteArray & ) { return *this; }
+ kndbgstream& operator<<( const TQStringList & ) { return *this; }
+ kndbgstream& operator<<( const TQColor & ) { return *this; }
+ kndbgstream& operator<<( const TQPen & ) { return *this; }
+ kndbgstream& operator<<( const TQBrush & ) { return *this; }
+ kndbgstream& operator<<( const TQVariant & ) { return *this; }
+ kndbgstream& operator<<( const TQByteArray & ) { return *this; }
template <class T>
- kndbgstream& operator<<( const QValueList<T> & ) { return *this; }
+ kndbgstream& operator<<( const TQValueList<T> & ) { return *this; }
};
/**
@@ -603,7 +603,7 @@ KDECORE_EXPORT kdbgstream kdDebug(bool cond, int area = 0);
* Returns a backtrace.
* @return a backtrace
*/
-KDECORE_EXPORT QString kdBacktrace();
+KDECORE_EXPORT TQString kdBacktrace();
/**
* \relates KGlobal
* Returns a backtrace.
@@ -611,7 +611,7 @@ KDECORE_EXPORT QString kdBacktrace();
* @return a backtrace
* @since 3.1
*/
-KDECORE_EXPORT QString kdBacktrace(int levels);
+KDECORE_EXPORT TQString kdBacktrace(int levels);
/**
* Returns a dummy debug stream. The stream does not print anything.
* @param area an id to identify the output, 0 for default
@@ -619,8 +619,8 @@ KDECORE_EXPORT QString kdBacktrace(int levels);
*/
inline kndbgstream kndDebug(int area = 0) { Q_UNUSED(area); return kndbgstream(); }
inline kndbgstream kndDebug(bool , int = 0) { return kndbgstream(); }
-inline QString kndBacktrace() { return QString::null; }
-inline QString kndBacktrace(int) { return QString::null; }
+inline TQString kndBacktrace() { return TQString::null; }
+inline TQString kndBacktrace(int) { return TQString::null; }
/**
* \relates KGlobal
diff --git a/kdecore/kdelibs_export.h b/kdecore/kdelibs_export.h
index 8c80f3b6e..e7faabdcf 100644
--- a/kdecore/kdelibs_export.h
+++ b/kdecore/kdelibs_export.h
@@ -24,7 +24,7 @@
#include <kdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
#include <kdelibs_export_win.h>
diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp
index 0168803ea..915b73429 100644
--- a/kdecore/kdesktopfile.cpp
+++ b/kdecore/kdesktopfile.cpp
@@ -24,9 +24,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include "kurl.h"
@@ -38,9 +38,9 @@
#include "kdesktopfile.h"
#include "kdesktopfile.moc"
-KDesktopFile::KDesktopFile(const QString &fileName, bool bReadOnly,
+KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly,
const char * resType)
- : KConfig(QString::fromLatin1(""), bReadOnly, false)
+ : KConfig(TQString::fromLatin1(""), bReadOnly, false)
{
// KConfigBackEnd will try to locate the filename that is provided
// based on the resource type specified, _only_ if the filename
@@ -56,19 +56,19 @@ KDesktopFile::~KDesktopFile()
// no need to do anything
}
-QString KDesktopFile::locateLocal(const QString &path)
+TQString KDesktopFile::locateLocal(const TQString &path)
{
- QString local;
+ TQString local;
if (path.endsWith(".directory"))
{
local = path;
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// Relative wrt apps?
local = KGlobal::dirs()->relativeLocation("apps", path);
}
- if (QDir::isRelativePath(local))
+ if (TQDir::isRelativePath(local))
{
local = ::locateLocal("apps", local); // Relative to apps
}
@@ -77,7 +77,7 @@ QString KDesktopFile::locateLocal(const QString &path)
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
local = KGlobal::dirs()->relativeLocation("xdgdata-dirs", local);
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// Hm, that didn't work...
// What now? Use filename only and hope for the best.
@@ -88,7 +88,7 @@ QString KDesktopFile::locateLocal(const QString &path)
}
else
{
- if (QDir::isRelativePath(path))
+ if (TQDir::isRelativePath(path))
{
local = ::locateLocal("apps", path); // Relative to apps
}
@@ -97,7 +97,7 @@ QString KDesktopFile::locateLocal(const QString &path)
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
local = KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// What now? Use filename only and hope for the best.
local = path.mid(path.findRev('/')+1);
@@ -108,19 +108,19 @@ QString KDesktopFile::locateLocal(const QString &path)
return local;
}
-bool KDesktopFile::isDesktopFile(const QString& path)
+bool KDesktopFile::isDesktopFile(const TQString& path)
{
int len = path.length();
- if(len > 8 && path.right(8) == QString::fromLatin1(".desktop"))
+ if(len > 8 && path.right(8) == TQString::fromLatin1(".desktop"))
return true;
- else if(len > 7 && path.right(7) == QString::fromLatin1(".kdelnk"))
+ else if(len > 7 && path.right(7) == TQString::fromLatin1(".kdelnk"))
return true;
else
return false;
}
-bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
+bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path)
{
if (!kapp || kapp->authorize("run_desktop_files"))
return true;
@@ -128,15 +128,15 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
if (path.isEmpty())
return false; // Empty paths are not ok.
- if (QDir::isRelativePath(path))
+ if (TQDir::isRelativePath(path))
return true; // Relative paths are ok.
KStandardDirs *dirs = KGlobal::dirs();
- if (QDir::isRelativePath( dirs->relativeLocation("apps", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) ))
return true;
- if (QDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
return true;
- if (QDir::isRelativePath( dirs->relativeLocation("services", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("services", path) ))
return true;
if (dirs->relativeLocation("data", path).startsWith("kdesktop/Desktop"))
return true;
@@ -145,45 +145,45 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
return false;
}
-QString KDesktopFile::readType() const
+TQString KDesktopFile::readType() const
{
return readEntry("Type");
}
-QString KDesktopFile::readIcon() const
+TQString KDesktopFile::readIcon() const
{
return readEntry("Icon");
}
-QString KDesktopFile::readName() const
+TQString KDesktopFile::readName() const
{
return readEntry("Name");
}
-QString KDesktopFile::readComment() const
+TQString KDesktopFile::readComment() const
{
return readEntry("Comment");
}
-QString KDesktopFile::readGenericName() const
+TQString KDesktopFile::readGenericName() const
{
return readEntry("GenericName");
}
-QString KDesktopFile::readPath() const
+TQString KDesktopFile::readPath() const
{
return readPathEntry("Path");
}
-QString KDesktopFile::readDevice() const
+TQString KDesktopFile::readDevice() const
{
return readEntry("Dev");
}
-QString KDesktopFile::readURL() const
+TQString KDesktopFile::readURL() const
{
if (hasDeviceType()) {
- QString device = readDevice();
+ TQString device = readDevice();
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
for(KMountPoint::List::ConstIterator it = mountPoints.begin();
@@ -197,10 +197,10 @@ QString KDesktopFile::readURL() const
return u.url();
}
}
- return QString::null;
+ return TQString::null;
} else {
- QString url = readPathEntry("URL");
- if ( !url.isEmpty() && !QDir::isRelativePath(url) )
+ TQString url = readPathEntry("URL");
+ if ( !url.isEmpty() && !TQDir::isRelativePath(url) )
{
// Handle absolute paths as such (i.e. we need to escape them)
KURL u;
@@ -211,61 +211,61 @@ QString KDesktopFile::readURL() const
}
}
-QStringList KDesktopFile::readActions() const
+TQStringList KDesktopFile::readActions() const
{
return readListEntry("Actions", ';');
}
-void KDesktopFile::setActionGroup(const QString &group)
+void KDesktopFile::setActionGroup(const TQString &group)
{
- setGroup(QString::fromLatin1("Desktop Action ") + group);
+ setGroup(TQString::fromLatin1("Desktop Action ") + group);
}
-bool KDesktopFile::hasActionGroup(const QString &group) const
+bool KDesktopFile::hasActionGroup(const TQString &group) const
{
- return hasGroup(QString::fromLatin1("Desktop Action ") + group);
+ return hasGroup(TQString::fromLatin1("Desktop Action ") + group);
}
bool KDesktopFile::hasLinkType() const
{
- return readEntry("Type") == QString::fromLatin1("Link");
+ return readEntry("Type") == TQString::fromLatin1("Link");
}
bool KDesktopFile::hasApplicationType() const
{
- return readEntry("Type") == QString::fromLatin1("Application");
+ return readEntry("Type") == TQString::fromLatin1("Application");
}
bool KDesktopFile::hasMimeTypeType() const
{
- return readEntry("Type") == QString::fromLatin1("MimeType");
+ return readEntry("Type") == TQString::fromLatin1("MimeType");
}
bool KDesktopFile::hasDeviceType() const
{
- return readEntry("Type") == QString::fromLatin1("FSDev") ||
- readEntry("Type") == QString::fromLatin1("FSDevice");
+ return readEntry("Type") == TQString::fromLatin1("FSDev") ||
+ readEntry("Type") == TQString::fromLatin1("FSDevice");
}
bool KDesktopFile::tryExec() const
{
// Test for TryExec and "X-KDE-AuthorizeAction"
- QString te = readPathEntry("TryExec");
+ TQString te = readPathEntry("TryExec");
if (!te.isEmpty()) {
- if (!QDir::isRelativePath(te)) {
- if (::access(QFile::encodeName(te), X_OK))
+ if (!TQDir::isRelativePath(te)) {
+ if (::access(TQFile::encodeName(te), X_OK))
return false;
} else {
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
// Environment PATH may contain filenames in 8bit locale cpecified
// encoding (Like a filenames).
- QStringList dirs = QStringList::split(':', QFile::decodeName(::getenv("PATH")));
- QStringList::Iterator it(dirs.begin());
+ TQStringList dirs = TQStringList::split(':', TQFile::decodeName(::getenv("PATH")));
+ TQStringList::Iterator it(dirs.begin());
bool match = false;
for (; it != dirs.end(); ++it) {
- QString fName = *it + "/" + te;
- if (::access(QFile::encodeName(fName), X_OK) == 0)
+ TQString fName = *it + "/" + te;
+ if (::access(TQFile::encodeName(fName), X_OK) == 0)
{
match = true;
break;
@@ -276,10 +276,10 @@ bool KDesktopFile::tryExec() const
return false;
}
}
- QStringList list = readListEntry("X-KDE-AuthorizeAction");
+ TQStringList list = readListEntry("X-KDE-AuthorizeAction");
if (kapp && !list.isEmpty())
{
- for(QStringList::ConstIterator it = list.begin();
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end();
++it)
{
@@ -292,7 +292,7 @@ bool KDesktopFile::tryExec() const
bool su = readBoolEntry("X-KDE-SubstituteUID");
if (su)
{
- QString user = readEntry("X-KDE-Username");
+ TQString user = readEntry("X-KDE-Username");
if (user.isEmpty())
user = ::getenv("ADMIN_ACCOUNT");
if (user.isEmpty())
@@ -325,7 +325,7 @@ KDesktopFile::sortOrder() const
void KDesktopFile::virtual_hook( int id, void* data )
{ KConfig::virtual_hook( id, data ); }
-QString KDesktopFile::readDocPath() const
+TQString KDesktopFile::readDocPath() const
{
// Depreciated, remove in KDE4 or 5?
// See: http://www.freedesktop.org/Standards/desktop-entry-spec
@@ -335,9 +335,9 @@ QString KDesktopFile::readDocPath() const
return readPathEntry( "X-DocPath" );
}
-KDesktopFile* KDesktopFile::copyTo(const QString &file) const
+KDesktopFile* KDesktopFile::copyTo(const TQString &file) const
{
- KDesktopFile *config = new KDesktopFile(QString::null, false);
+ KDesktopFile *config = new KDesktopFile(TQString::null, false);
KConfig::copyTo(file, config);
config->setDesktopGroup();
return config;
diff --git a/kdecore/kdesktopfile.h b/kdecore/kdesktopfile.h
index ff0f66407..dcbe3ea1d 100644
--- a/kdecore/kdesktopfile.h
+++ b/kdecore/kdesktopfile.h
@@ -48,7 +48,7 @@ public:
* to search for if @p fileName is not absolute. For
* instance, you might want to specify "config".
*/
- KDesktopFile( const QString &fileName, bool readOnly = false,
+ KDesktopFile( const TQString &fileName, bool readOnly = false,
const char * resType = "apps");
/**
@@ -67,7 +67,7 @@ public:
* @param path the path of the file to check
* @return true if the file appears to be a desktop file.
*/
- static bool isDesktopFile(const QString& path);
+ static bool isDesktopFile(const TQString& path);
/**
* Checks whether the user is authorized to run this desktop file.
@@ -78,81 +78,81 @@ public:
* @return true if the user is authorized to run the file
* @since 3.1
*/
- static bool isAuthorizedDesktopFile(const QString& path);
+ static bool isAuthorizedDesktopFile(const TQString& path);
/**
* Returns the location where changes for the .desktop file @p path
* should be written to.
* @since 3.2
*/
- static QString locateLocal(const QString &path);
+ static TQString locateLocal(const TQString &path);
/**
* Returns the value of the "Type=" entry.
- * @return the type or QString::null if not specified
+ * @return the type or TQString::null if not specified
*/
- QString readType() const;
+ TQString readType() const;
/**
* Returns the value of the "Icon=" entry.
- * @return the icon or QString::null if not specified
+ * @return the icon or TQString::null if not specified
*/
- QString readIcon() const;
+ TQString readIcon() const;
/**
* Returns the value of the "Name=" entry.
- * @return the name or QString::null if not specified
+ * @return the name or TQString::null if not specified
*/
- QString readName() const;
+ TQString readName() const;
/**
* Returns the value of the "Comment=" entry.
- * @return the comment or QString::null if not specified
+ * @return the comment or TQString::null if not specified
*/
- QString readComment() const;
+ TQString readComment() const;
/**
* Returns the value of the "GenericName=" entry.
- * @return the generic name or QString::null if not specified
+ * @return the generic name or TQString::null if not specified
*/
- QString readGenericName() const;
+ TQString readGenericName() const;
/**
* Returns the value of the "Path=" entry.
- * @return the path or QString::null if not specified
+ * @return the path or TQString::null if not specified
*/
- QString readPath() const;
+ TQString readPath() const;
/**
* Returns the value of the "Dev=" entry.
- * @return the device or QString::null if not specified
+ * @return the device or TQString::null if not specified
*/
- QString readDevice() const;
+ TQString readDevice() const;
/**
* Returns the value of the "URL=" entry.
- * @return the URL or QString::null if not specified
+ * @return the URL or TQString::null if not specified
*/
- QString readURL() const;
+ TQString readURL() const;
/**
* Returns a list of the "Actions=" entries.
* @return the list of actions
*/
- QStringList readActions() const;
+ TQStringList readActions() const;
/**
* Sets the desktop action group.
* @param group the new action group
*/
- void setActionGroup(const QString &group);
+ void setActionGroup(const TQString &group);
/**
* Returns true if the action group exists, false otherwise
* @param group the action group to test
* @return true if the action group exists
*/
- bool hasActionGroup(const QString &group) const;
+ bool hasActionGroup(const TQString &group) const;
/**
* Checks whether there is a "Type=Link" entry.
@@ -191,13 +191,13 @@ public:
* Returns the file name.
* @return The filename as passed to the constructor.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* Returns the resource.
* @return The resource type as passed to the constructor.
*/
- QString resource() const;
+ TQString resource() const;
/**
* Returns the value of the "X-DocPath=" Or "DocPath=" entry.
@@ -206,13 +206,13 @@ public:
* @return The value of the "X-DocPath=" Or "DocPath=" entry.
* @since 3.1
*/
- QString readDocPath() const;
+ TQString readDocPath() const;
/**
* Returns the entry of the "SortOrder=" entry.
* @return the value of the "SortOrder=" entry.
*/
- QStringList sortOrder() const;
+ TQStringList sortOrder() const;
/**
* Copies all entries from this config object to a new
@@ -224,7 +224,7 @@ public:
* @param file the new KDesktopFile object it will save itself to.
* @since 3.2
*/
- KDesktopFile* copyTo(const QString &file) const;
+ KDesktopFile* copyTo(const TQString &file) const;
#ifdef KDE_NO_COMPAT
private:
@@ -232,7 +232,7 @@ private:
/**
* @deprecated Use fileName() instead.
*/
- KDE_DEPRECATED QString filename() const { return fileName(); };
+ KDE_DEPRECATED TQString filename() const { return fileName(); };
private:
diff --git a/kdecore/kextsock.cpp b/kdecore/kextsock.cpp
index 0ee2664b1..dd670608c 100644
--- a/kdecore/kextsock.cpp
+++ b/kdecore/kextsock.cpp
@@ -36,11 +36,11 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qstring.h>
-#include <qiodevice.h>
-#include <qsocketnotifier.h>
-#include <qguardedptr.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
+#include <tqsocketnotifier.h>
+#include <tqguardedptr.h>
#include "kresolver.h"
@@ -75,7 +75,7 @@ public:
::KSocketAddress *local; // local socket address
::KSocketAddress *peer; // peer socket address
- QSocketNotifier *qsnIn, *qsnOut;
+ TQSocketNotifier *qsnIn, *qsnOut;
int inMaxSize, outMaxSize;
bool emitRead : 1, emitWrite : 1;
mutable bool addressReusable : 1, ipv6only : 1;
@@ -189,7 +189,7 @@ KExtendedSocket::KExtendedSocket() :
}
// constructor with hostname
-KExtendedSocket::KExtendedSocket(const QString& host, int port, int flags) :
+KExtendedSocket::KExtendedSocket(const TQString& host, int port, int flags) :
sockfd(-1), d(new KExtendedSocketPrivate)
{
setAddress(host, port);
@@ -197,7 +197,7 @@ KExtendedSocket::KExtendedSocket(const QString& host, int port, int flags) :
}
// same
-KExtendedSocket::KExtendedSocket(const QString& host, const QString& service, int flags) :
+KExtendedSocket::KExtendedSocket(const TQString& host, const TQString& service, int flags) :
sockfd(-1), d(new KExtendedSocketPrivate)
{
setAddress(host, service);
@@ -273,7 +273,7 @@ int KExtendedSocket::socketFlags() const
* Sets socket target hostname
* This is only allowed if we are in nothing state
*/
-bool KExtendedSocket::setHost(const QString& host)
+bool KExtendedSocket::setHost(const TQString& host)
{
if (d->status > nothing)
return false; // error!
@@ -285,7 +285,7 @@ bool KExtendedSocket::setHost(const QString& host)
/*
* returns the hostname
*/
-QString KExtendedSocket::host() const
+TQString KExtendedSocket::host() const
{
return d->resRemote.nodeName();
}
@@ -296,10 +296,10 @@ QString KExtendedSocket::host() const
*/
bool KExtendedSocket::setPort(int port)
{
- return setPort(QString::number(port));
+ return setPort(TQString::number(port));
}
-bool KExtendedSocket::setPort(const QString& service)
+bool KExtendedSocket::setPort(const TQString& service)
{
if (d->status > nothing)
return false; // error
@@ -311,7 +311,7 @@ bool KExtendedSocket::setPort(const QString& service)
/*
* returns the service port number
*/
-QString KExtendedSocket::port() const
+TQString KExtendedSocket::port() const
{
return d->resRemote.serviceName();
}
@@ -319,7 +319,7 @@ QString KExtendedSocket::port() const
/*
* sets the address
*/
-bool KExtendedSocket::setAddress(const QString& host, int port)
+bool KExtendedSocket::setAddress(const TQString& host, int port)
{
return setHost(host) && setPort(port);
}
@@ -327,7 +327,7 @@ bool KExtendedSocket::setAddress(const QString& host, int port)
/*
* the same
*/
-bool KExtendedSocket::setAddress(const QString& host, const QString& serv)
+bool KExtendedSocket::setAddress(const TQString& host, const TQString& serv)
{
return setHost(host) && setPort(serv);
}
@@ -337,7 +337,7 @@ bool KExtendedSocket::setAddress(const QString& host, const QString& serv)
* This is only valid in the 'nothing' state and if this is not a
* passiveSocket socket
*/
-bool KExtendedSocket::setBindHost(const QString& host)
+bool KExtendedSocket::setBindHost(const TQString& host)
{
if (d->status > nothing || d->flags & passiveSocket)
return false; // error
@@ -352,13 +352,13 @@ bool KExtendedSocket::setBindHost(const QString& host)
*/
bool KExtendedSocket::unsetBindHost()
{
- return setBindHost(QString::null);
+ return setBindHost(TQString::null);
}
/*
* returns the binding host
*/
-QString KExtendedSocket::bindHost() const
+TQString KExtendedSocket::bindHost() const
{
return d->resLocal.serviceName();
}
@@ -369,10 +369,10 @@ QString KExtendedSocket::bindHost() const
*/
bool KExtendedSocket::setBindPort(int port)
{
- return setBindPort(QString::number(port));
+ return setBindPort(TQString::number(port));
}
-bool KExtendedSocket::setBindPort(const QString& service)
+bool KExtendedSocket::setBindPort(const TQString& service)
{
if (d->status > nothing || d->flags & passiveSocket)
return false; // error
@@ -386,13 +386,13 @@ bool KExtendedSocket::setBindPort(const QString& service)
*/
bool KExtendedSocket::unsetBindPort()
{
- return setBindPort(QString::null);
+ return setBindPort(TQString::null);
}
/*
* returns the binding port
*/
-QString KExtendedSocket::bindPort() const
+TQString KExtendedSocket::bindPort() const
{
return d->resLocal.serviceName();
}
@@ -400,7 +400,7 @@ QString KExtendedSocket::bindPort() const
/*
* sets the binding address
*/
-bool KExtendedSocket::setBindAddress(const QString& host, int port)
+bool KExtendedSocket::setBindAddress(const TQString& host, int port)
{
return setBindHost(host) && setBindPort(port);
}
@@ -408,7 +408,7 @@ bool KExtendedSocket::setBindAddress(const QString& host, int port)
/*
* same
*/
-bool KExtendedSocket::setBindAddress(const QString& host, const QString& service)
+bool KExtendedSocket::setBindAddress(const TQString& host, const TQString& service)
{
return setBindHost(host) && setBindPort(service);
}
@@ -638,8 +638,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
// closed
if (d->qsnIn == NULL)
{
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
d->qsnIn->setEnabled(true);
}
@@ -686,8 +686,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
if (d->qsnOut == NULL)
{
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
// if the class is being created now, there's nothing to write yet
// so socketActivityWrite() will get called once and disable
// the notifier
@@ -701,8 +701,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
// check we didn't turn something off we shouldn't
if (d->emitWrite && d->qsnOut == NULL)
{
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
}
return true;
@@ -783,8 +783,8 @@ int KExtendedSocket::startAsyncLookup()
d->resRemote.setFlags(flags);
d->resRemote.setFamily(familyMask);
d->resRemote.setSocketType(socktype);
- QObject::connect(&d->resRemote, SIGNAL(finished(KResolverResults)),
- this, SLOT(dnsResultsReady()));
+ TQObject::connect(&d->resRemote, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(dnsResultsReady()));
if (!d->resRemote.start())
{
@@ -800,8 +800,8 @@ int KExtendedSocket::startAsyncLookup()
d->resLocal.setFlags(flags);
d->resLocal.setFamily(familyMask);
d->resLocal.setSocketType(socktype);
- QObject::connect(&d->resLocal, SIGNAL(finished(KResolverResults)),
- this, SLOT(dnsResultsReady()));
+ TQObject::connect(&d->resLocal, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(dnsResultsReady()));
if (!d->resLocal.start())
{
@@ -895,8 +895,8 @@ int KExtendedSocket::listen(int N)
else
{
d->status = listening;
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
}
return retval == -1 ? -1 : 0;
}
@@ -1218,7 +1218,7 @@ int KExtendedSocket::startAsyncConnect()
// signal lookupFinished to do connection
if (d->status < lookupDone)
{
- QObject::connect(this, SIGNAL(lookupFinished(int)), this, SLOT(startAsyncConnectSlot()));
+ TQObject::connect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
if (d->status < lookupInProgress)
return startAsyncLookup();
else
@@ -1228,7 +1228,7 @@ int KExtendedSocket::startAsyncConnect()
// here we have d->status >= lookupDone and <= connecting
// we can do our connection
d->status = connecting;
- QGuardedPtr<QObject> p = this;
+ TQGuardedPtr<TQObject> p = this;
connectionEvent();
if (!p)
return -1; // We have been deleted.
@@ -1385,8 +1385,8 @@ void KExtendedSocket::flush()
// better by concatenating a few of them into a big buffer
// question is: how big should that buffer be? 16 kB should be enough
- QByteArray buf(16384);
- QByteArray *a = outBuf.first();
+ TQByteArray buf(16384);
+ TQByteArray *a = outBuf.first();
unsigned count = 0;
while (a && count + (a->size() - offset) <= buf.size())
@@ -1657,7 +1657,7 @@ void KExtendedSocket::socketActivityRead()
if (d->flags & inputBufferedSocket)
{
// aye. Do read from the socket and feed our buffer
- QByteArray a;
+ TQByteArray a;
char buf[1024];
int len, totalread = 0;
@@ -1908,10 +1908,10 @@ void KExtendedSocket::connectionEvent()
// error here is either EWOULDBLOCK or EINPROGRESS
// so, it is a good condition
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
// ok, let the Qt event loop do the selecting for us
return;
@@ -1969,14 +1969,14 @@ void KExtendedSocket::dnsResultsReady()
void KExtendedSocket::startAsyncConnectSlot()
{
- QObject::disconnect(this, SIGNAL(lookupFinished(int)), this, SLOT(startAsyncConnectSlot()));
+ TQObject::disconnect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
if (d->status == lookupDone)
startAsyncConnect();
}
-int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, QString &host,
- QString &port, int flags)
+int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, TQString &host,
+ TQString &port, int flags)
{
kdDebug(170) << "Deprecated function called:" << k_funcinfo << endl;
@@ -1986,26 +1986,26 @@ int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, QString &host,
h[0] = s[0] = '\0';
err = getnameinfo(sock, len, h, sizeof(h) - 1, s, sizeof(s) - 1, flags);
- host = QString::fromUtf8(h);
- port = QString::fromUtf8(s);
+ host = TQString::fromUtf8(h);
+ port = TQString::fromUtf8(s);
return err;
}
-int KExtendedSocket::resolve(::KSocketAddress *sock, QString &host, QString &port,
+int KExtendedSocket::resolve(::KSocketAddress *sock, TQString &host, TQString &port,
int flags)
{
return resolve(sock->data, sock->datasize, host, port, flags);
}
-QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QString& port,
+TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQString& port,
int userflags, int *error)
{
kdDebug(170) << "Deprecated function called:" << k_funcinfo << endl;
int socktype, familyMask, flags;
unsigned i;
- QPtrList<KAddressInfo> l;
+ TQPtrList<KAddressInfo> l;
/* check socket type flags */
if (!process_flags(userflags, socktype, familyMask, flags))
@@ -2032,7 +2032,7 @@ QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QStrin
ai->ai->ai_family = res[i].family();
ai->ai->ai_socktype = res[i].socketType();
ai->ai->ai_protocol = res[i].protocol();
- QString canon = res[i].canonicalName();
+ TQString canon = res[i].canonicalName();
if (!canon.isEmpty())
{
ai->ai->ai_canonname = (char *) malloc(canon.length()+1);
@@ -2153,7 +2153,7 @@ QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QStrin
return peer;
}
-QString KExtendedSocket::strError(int code, int syserr)
+TQString KExtendedSocket::strError(int code, int syserr)
{
const char * msg;
if (code == IO_LookupError)
@@ -2161,12 +2161,12 @@ QString KExtendedSocket::strError(int code, int syserr)
else
msg = strerror(syserr);
- return QString::fromLocal8Bit(msg);
+ return TQString::fromLocal8Bit(msg);
}
-QSocketNotifier *KExtendedSocket::readNotifier() { return d->qsnIn; }
-QSocketNotifier *KExtendedSocket::writeNotifier() { return d->qsnOut; }
+TQSocketNotifier *KExtendedSocket::readNotifier() { return d->qsnIn; }
+TQSocketNotifier *KExtendedSocket::writeNotifier() { return d->qsnOut; }
/*
* class KAddressInfo
diff --git a/kdecore/kextsock.h b/kdecore/kextsock.h
index f3d1f5923..ed3dbfc3e 100644
--- a/kdecore/kextsock.h
+++ b/kdecore/kextsock.h
@@ -26,9 +26,9 @@
#include <sys/time.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qiodevice.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqiodevice.h>
#include "kbufferedio.h"
#include "ksockaddr.h"
@@ -42,7 +42,7 @@ class QSocketNotifier;
/*
* This is extending QIODevice's error codes
*
- * According to qiodevice.h, the last error is IO_UnspecifiedError
+ * According to tqiodevice.h, the last error is IO_UnspecifiedError
* These errors will never occur in functions declared in QIODevice
* (except open, but you shouldn't call open)
*/
@@ -88,7 +88,7 @@ class KExtendedSocketPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short an extended socket
*/
-class KDECORE_EXPORT KExtendedSocket: public KBufferedIO // public QObject, public QIODevice
+class KDECORE_EXPORT KExtendedSocket: public KBufferedIO // public TQObject, public QIODevice
{
Q_OBJECT
@@ -167,7 +167,7 @@ public:
*
* If this is a listening (passive) socket, the hostname and port specify
* the address to listen on. In order to listen on every interface
- * available on this node, set @p host to QString::null. To let the operating
+ * available on this node, set @p host to TQString::null. To let the operating
* system select a port, set it to 0.
*
* @sa setAddress
@@ -175,7 +175,7 @@ public:
* @param port the port number
* @param flags flags
*/
- KExtendedSocket(const QString& host, int port, int flags = 0);
+ KExtendedSocket(const TQString& host, int port, int flags = 0);
/**
* Creates a socket with the given hostname and service.
@@ -185,7 +185,7 @@ public:
*
* If this is a listening (passive) socket, the hostname and service specify
* the address to listen on. In order to listen on every interface
- * available on this node, set @p host to QString::null. To let the operating
+ * available on this node, set @p host to TQString::null. To let the operating
* system select a port, set the service to "0".
*
* @sa setAddress
@@ -193,7 +193,7 @@ public:
* @param service the service
* @param flags flags
*/
- KExtendedSocket(const QString& host, const QString& service, int flags = 0);
+ KExtendedSocket(const TQString& host, const TQString& service, int flags = 0);
/**
* Destroys the socket, disconnecting if still connected and
@@ -246,7 +246,7 @@ public:
*
* If this is a listening (passive) socket, the hostname is the host to which the socket
* will bind in order to listen. If you want to listen in every interface, set it
- * to "*" or QString::null.
+ * to "*" or TQString::null.
*
* If this is a connecting (active) socket, the hostname is the host to which we will try
* to connect.
@@ -254,13 +254,13 @@ public:
* @param host the hostname
* @return true on success, false on error
*/
- bool setHost(const QString& host);
+ bool setHost(const TQString& host);
/**
* Returns the hostname.
- * @return the hostname or QString::null if no host has been set
+ * @return the hostname or TQString::null if no host has been set
*/
- QString host() const;
+ TQString host() const;
/**
* Sets the port/service.
@@ -277,13 +277,13 @@ public:
* @param port the port
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setPort(const QString& port);
+ bool setPort(const TQString& port);
/**
* Returns the port/service. If it is a port, the string contains a number.
- * @return the port or QString::null if it has not been set.
+ * @return the port or TQString::null if it has not been set.
*/
- QString port() const;
+ TQString port() const;
/**
* Sets the address where we will connect to.
@@ -294,7 +294,7 @@ public:
* @param port port number
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setAddress(const QString& host, int port);
+ bool setAddress(const TQString& host, int port);
/**
* Sets the address where we will connect to.
@@ -305,14 +305,14 @@ public:
* @param serv the service
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setAddress(const QString& host, const QString& serv);
+ bool setAddress(const TQString& host, const TQString& serv);
/**
* Sets the hostname to which we will bind locally before connecting.
* @param host the hostname
* @return false if this is a passiveSocket, otherwise true.
*/
- bool setBindHost(const QString& host);
+ bool setBindHost(const TQString& host);
/**
* Unsets the bind hostname. That is, don't request a binding host.
@@ -322,9 +322,9 @@ public:
/**
* Returns the hostname to which the socket will be/is bound.
- * @return the host or QString::null if it has not been set.
+ * @return the host or TQString::null if it has not been set.
*/
- QString bindHost() const;
+ TQString bindHost() const;
/**
* Sets the port/service to which we will bind before connecting
@@ -338,7 +338,7 @@ public:
* @param service the port number or service name
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindPort(const QString& service);
+ bool setBindPort(const TQString& service);
/**
* Unsets the bind port/service.
@@ -348,9 +348,9 @@ public:
/**
* Returns the service to which the socket will be/is bound.
- * @return the host or QString::null if it has not been set.
+ * @return the host or TQString::null if it has not been set.
*/
- QString bindPort() const;
+ TQString bindPort() const;
/**
* Sets both host and port to which we will bind the socket. Will return
@@ -359,7 +359,7 @@ public:
* @param port the port number
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindAddress(const QString& host, int port);
+ bool setBindAddress(const TQString& host, int port);
/**
* Sets both host and service to which we will bind the socket. Will return
@@ -368,7 +368,7 @@ public:
* @param service the service
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindAddress(const QString& host, const QString& service);
+ bool setBindAddress(const TQString& host, const TQString& service);
/**
* Unsets the bind address for the socket. That means that we won't
@@ -608,7 +608,7 @@ public:
virtual void cancelAsyncConnect();
/**
- * Implementation of QIODevice::open() pure virtual function.
+ * Implementation of TQIODevice::open() pure virtual function.
* This depends on the target host address already being there.
* If this is a passiveSocket, this is identical to call listen(); else, if
* this is not a passiveSocket and no connection attempt is in progress, this
@@ -886,8 +886,8 @@ protected slots:
protected:
- QSocketNotifier *readNotifier();
- QSocketNotifier *writeNotifier();
+ TQSocketNotifier *readNotifier();
+ TQSocketNotifier *writeNotifier();
private:
@@ -899,7 +899,7 @@ private:
* This is actually a wrapper around getaddrinfo().
* @internal
*/
- static int doLookup(const QString& host, const QString& serv, addrinfo& hint,
+ static int doLookup(const TQString& host, const TQString& serv, addrinfo& hint,
kde_addrinfo** result);
protected:
@@ -930,7 +930,7 @@ public:
* @param flags the same flags as getnameinfo()
* @returns 0 on success, nonzero otherwise.
*/
- static int resolve(sockaddr* sock, ksocklen_t len, QString& host, QString& port, int flags = 0) KDE_DEPRECATED;
+ static int resolve(sockaddr* sock, ksocklen_t len, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
/**
* Performs resolution on the given socket address.
@@ -944,7 +944,7 @@ public:
* @param flags the same flags as getnameinfo()
* @returns 0 on success, nonzero otherwise.
*/
- static int resolve(::KSocketAddress* sock, QString& host, QString& port, int flags = 0) KDE_DEPRECATED;
+ static int resolve(::KSocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
/** @deprecated
* This function is now deprecated. Please use @ref KNetwork::KResolver::resolve.
@@ -954,7 +954,7 @@ public:
* The error code can be transformed into string by KExtendedSocket::strError()
* with code of IO_LookupError.
*
- * IMPORTANT: the result values of the QPtrList must be deleted after use. So,
+ * IMPORTANT: the result values of the TQPtrList must be deleted after use. So,
* if you don't copy the KAddressInfo objects, the best way to assure that
* is to call setAutoDelete(true) on the list right after this function
* returns. If you do copy the results out, you must assure that the objects
@@ -966,7 +966,7 @@ public:
* @param error pointer to a variable holding the error code
* @return a list of KAddressInfos
*/
- static QPtrList<KAddressInfo> lookup(const QString& host, const QString& port, int flags = 0, int *error = 0) KDE_DEPRECATED;
+ static TQPtrList<KAddressInfo> lookup(const TQString& host, const TQString& port, int flags = 0, int *error = 0) KDE_DEPRECATED;
/**
* Returns the local socket address
@@ -991,7 +991,7 @@ public:
* @param syserr the system error, as from systemError()
* @return the text for the given error code
*/
- static QString strError(int code, int syserr);
+ static TQString strError(int code, int syserr);
/**
* Sets/unsets address reusing flag for this socket.
diff --git a/kdecore/kgenericfactory.h b/kdecore/kgenericfactory.h
index facdcde20..0bdeaa846 100644
--- a/kdecore/kgenericfactory.h
+++ b/kdecore/kgenericfactory.h
@@ -49,7 +49,7 @@ public:
virtual ~KGenericFactoryBase()
{
if ( s_instance )
- KGlobal::locale()->removeCatalogue( QString::fromAscii( s_instance->instanceName() ) );
+ KGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) );
delete s_instance;
s_instance = 0;
s_self = 0;
@@ -72,7 +72,7 @@ protected:
virtual void setupTranslations( void )
{
if ( instance() )
- KGlobal::locale()->insertCatalogue( QString::fromAscii( instance()->instanceName() ) );
+ KGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) );
}
void initializeMessageCatalogue()
@@ -85,7 +85,7 @@ protected:
}
private:
- QCString m_instanceName;
+ TQCString m_instanceName;
const KAboutData *m_aboutData;
bool m_catalogueInitialized;
@@ -123,21 +123,21 @@ KInstance *KGenericFactoryBase<T>::instance()
* Note that the class specified as template argument needs to provide
* a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -161,15 +161,15 @@ KInstance *KGenericFactoryBase<T>::instance()
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
* K_EXPORT_COMPONENT_FACTORY( libmyplugin, KGenericFactory&lt;MyPlugin&gt; )
* \endcode
*/
-template <class Product, class ParentType = QObject>
+template <class Product, class ParentType = TQObject>
class KGenericFactory : public KLibFactory, public KGenericFactoryBase<Product>
{
public:
@@ -186,8 +186,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
KGenericFactoryBase<Product>::initializeMessageCatalogue();
return KDEPrivate::ConcreteFactory<Product, ParentType>
@@ -206,21 +206,21 @@ protected:
* Note that each class in the specified in the typelist template argument
* needs to provide a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -244,8 +244,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -253,8 +253,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( QWidget *parentWidget, const char *name,
- * const QStringList &args );
+ * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -263,7 +263,7 @@ protected:
* \endcode
*/
template <class Product, class ProductListTail>
-class KGenericFactory< KTypeList<Product, ProductListTail>, QObject >
+class KGenericFactory< KTypeList<Product, ProductListTail>, TQObject >
: public KLibFactory,
public KGenericFactoryBase< KTypeList<Product, ProductListTail> >
{
@@ -281,8 +281,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
this->initializeMessageCatalogue();
return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail > >
@@ -301,21 +301,21 @@ protected:
* Note that each class in the specified in the typelist template argument
* needs to provide a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -339,8 +339,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -348,8 +348,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( QWidget *parentWidget, const char *name,
- * const QStringList &args );
+ * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -377,8 +377,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
this->initializeMessageCatalogue();
return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail >,
diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp
index 188e8f447..b886d8d7f 100644
--- a/kdecore/kglobal.cpp
+++ b/kdecore/kglobal.cpp
@@ -22,9 +22,9 @@
* Generated: Sat May 1 02:08:43 EST 1999
*/
-#include <qglobal.h>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
#include "kglobal.h"
#include <kapplication.h>
@@ -38,7 +38,7 @@
#include <kinstance.h>
#include "kstaticdeleter.h"
-#include <qfont.h>
+#include <tqfont.h>
#ifndef NDEBUG
#define MYASSERT(x) if (!x) \
@@ -115,51 +115,51 @@ void KGlobal::setActiveInstance(KInstance *i)
{
_activeInstance = i;
if (i && _locale)
- _locale->setActiveCatalogue(QString::fromUtf8(i->instanceName()));
+ _locale->setActiveCatalogue(TQString::fromUtf8(i->instanceName()));
}
/**
* Create a static QString
*
* To be used inside functions(!) like:
- * static const QString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = KGlobal::staticQString("myText");
*/
-const QString &
+const TQString &
KGlobal::staticQString(const char *str)
{
- return staticQString(QString::fromLatin1(str));
+ return staticQString(TQString::fromLatin1(str));
}
-class KStringDict : public QDict<QString>
+class KStringDict : public TQDict<TQString>
{
public:
- KStringDict() : QDict<QString>(139) { }
+ KStringDict() : TQDict<TQString>(139) { }
};
/**
* Create a static QString
*
* To be used inside functions(!) like:
- * static const QString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
*/
-const QString &
-KGlobal::staticQString(const QString &str)
+const TQString &
+KGlobal::staticQString(const TQString &str)
{
if (!_stringDict) {
_stringDict = new KStringDict;
_stringDict->setAutoDelete( true );
kglobal_init();
}
- QString *result = _stringDict->find(str);
+ TQString *result = _stringDict->find(str);
if (!result)
{
- result = new QString(str);
+ result = new TQString(str);
_stringDict->insert(str, result);
}
return *result;
}
-class KStaticDeleterList: public QPtrList<KStaticDeleterBase>
+class KStaticDeleterList: public TQPtrList<KStaticDeleterBase>
{
public:
KStaticDeleterList() { }
diff --git a/kdecore/kglobal.h b/kdecore/kglobal.h
index 1c1f75967..14bf26d32 100644
--- a/kdecore/kglobal.h
+++ b/kdecore/kglobal.h
@@ -90,42 +90,42 @@ public:
static KCharsets *charsets();
/**
- * Creates a static QString.
+ * Creates a static TQString.
*
* To be used inside functions(!) like:
* \code
- * static const QString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = KGlobal::staticQString("myText");
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static QString myString = KGlobal::staticQString("myText");
+ * static TQString myString = KGlobal::staticQString("myText");
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
* @param str the string to create
* @return the static string
*/
- static const QString &staticQString(const char *str);
+ static const TQString &staticQString(const char *str);
/**
- * Creates a static QString.
+ * Creates a static TQString.
*
* To be used inside functions(!) like:
* \code
- * static const QString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static QString myString = KGlobal::staticQString(i18n("myText"));
+ * static TQString myString = KGlobal::staticQString(i18n("myText"));
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
* @param str the string to create
* @return the static string
*/
- static const QString &staticQString(const QString &str);
+ static const TQString &staticQString(const TQString &str);
/**
* Registers a static deleter.
@@ -228,7 +228,7 @@ int KDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
* of other (but no less important) things.
*
* All KDE applications should link to the kdecore library. Also, using a
- * KApplication derived class instead of QApplication is almost
+ * KApplication derived class instead of TQApplication is almost
* mandatory if you expect your application to behave nicely within the
* KDE environment.
*/
diff --git a/kdecore/kglobalaccel.cpp b/kdecore/kglobalaccel.cpp
index 9628b34d3..a3c4ecf33 100644
--- a/kdecore/kglobalaccel.cpp
+++ b/kdecore/kglobalaccel.cpp
@@ -28,7 +28,7 @@
#include "kglobalaccel_emb.h"
#endif
-#include <qstring.h>
+#include <tqstring.h>
#include "kaccelbase.h"
#include <kdebug.h>
#include <kshortcut.h>
@@ -36,8 +36,8 @@
//----------------------------------------------------
-KGlobalAccel::KGlobalAccel( QObject* pParent, const char* psName )
-: QObject( pParent, psName )
+KGlobalAccel::KGlobalAccel( TQObject* pParent, const char* psName )
+: TQObject( pParent, psName )
{
kdDebug(125) << "KGlobalAccel(): this = " << this << endl;
d = new KGlobalAccelPrivate();
@@ -74,9 +74,9 @@ void KGlobalAccel::blockShortcuts( bool block )
void KGlobalAccel::disableBlocking( bool disable )
{ d->disableBlocking( disable ); }
-KAccelAction* KGlobalAccel::insert( const QString& sAction, const QString& sDesc, const QString& sHelp,
+KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sDesc, sHelp,
@@ -85,38 +85,38 @@ KAccelAction* KGlobalAccel::insert( const QString& sAction, const QString& sDesc
bConfigurable, bEnabled );
}
-KAccelAction* KGlobalAccel::insert( const QString& sName, const QString& sDesc )
+KAccelAction* KGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
{ return d->insert( sName, sDesc ); }
bool KGlobalAccel::updateConnections()
{ return d->updateConnections(); }
-bool KGlobalAccel::remove( const QString& sAction )
+bool KGlobalAccel::remove( const TQString& sAction )
{ return d->remove( sAction ); }
-const KShortcut& KGlobalAccel::shortcut( const QString& sAction ) const
+const KShortcut& KGlobalAccel::shortcut( const TQString& sAction ) const
{
const KAccelAction* pAction = d->actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : KShortcut::null();
}
-bool KGlobalAccel::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
{ return d->setShortcut( sAction, cut ); }
-bool KGlobalAccel::setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-QString KGlobalAccel::label( const QString& sAction ) const
+TQString KGlobalAccel::label( const TQString& sAction ) const
{
const KAccelAction* pAction = d->actions().actionPtr( sAction );
- return (pAction) ? pAction->label() : QString();
+ return (pAction) ? pAction->label() : TQString();
}
-bool KGlobalAccel::setActionEnabled( const QString& sAction, bool bEnable )
+bool KGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
{
return d->setActionEnabled( sAction, bEnable );
}
-const QString& KGlobalAccel::configGroup() const
+const TQString& KGlobalAccel::configGroup() const
{ return d->configGroup(); }
// for kdemultimedia/kmix
-void KGlobalAccel::setConfigGroup( const QString& s )
+void KGlobalAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
bool KGlobalAccel::readSettings( KConfigBase* pConfig )
diff --git a/kdecore/kglobalaccel.h b/kdecore/kglobalaccel.h
index e4b847cdc..9ef9c9fa7 100644
--- a/kdecore/kglobalaccel.h
+++ b/kdecore/kglobalaccel.h
@@ -20,7 +20,7 @@
#ifndef _KGLOBALACCEL_H_
#define _KGLOBALACCEL_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kshortcut.h>
class QPopupMenu;
@@ -52,7 +52,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param pParent the parent of the QObject
* @param psName the name of the QObject
*/
- KGlobalAccel( QObject* pParent, const char* psName = 0 );
+ KGlobalAccel( TQObject* pParent, const char* psName = 0 );
virtual ~KGlobalAccel();
/**
@@ -76,7 +76,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* insert( "Do Something", i18n("Do Something"),
* i18n("This action allows you to do something really great with this program to "
* "the currently open document."),
- * ALT+CTRL+Key_Q, KKey::QtWIN+CTRL+Key_Q, this, SLOT(slotDoSomething()) );
+ * ALT+CTRL+Key_Q, KKey::QtWIN+CTRL+Key_Q, this, TQT_SLOT(slotDoSomething()) );
*\endcode
*
* @param sAction The internal name of the action.
@@ -90,9 +90,9 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -101,7 +101,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sAction the name of the action to remove
* @since 3.1
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Use this to insert a label into the action list. This will be
@@ -110,7 +110,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sLabel a user-readable (i18n!) name for the action
* @return the KAccelAction of the action
*/
- KAccelAction* insert( const QString& sName, const QString& sLabel );
+ KAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Updates the connections of the accelerations after changing them.
@@ -123,14 +123,14 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sAction the name of the action
* @return the shortcut. If the action does not exist a null shortcut will be returned.
*/
- const KShortcut& shortcut( const QString& sAction ) const;
+ const KShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
* @param sAction the name of the action
* @param shortcut the shortcut for the action
* @return true if successful, false otherwise
*/
- bool setShortcut( const QString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
* by @p sAction is pressed.
@@ -139,34 +139,34 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param psMethodSlot the slot to receive the signal
* @return true if successful, false otherwise
*/
- bool setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enables or disables action @p sAction.
* @since 3.4
*/
- bool setActionEnabled( const QString& sAction, bool bEnable );
+ bool setActionEnabled( const TQString& sAction, bool bEnable );
/**
* Return the label (i18n'ized short description) associated with the action named by @p sAction.
* @param sAction the name of the action
* @return the label
* @since 3.3
*/
- QString label( const QString& sAction ) const;
+ TQString label( const TQString& sAction ) const;
/**
* Returns the configuration group that is used to save the accelerators.
* @return the configuration group
* @see KConfig
*/
- const QString& configGroup() const;
+ const TQString& configGroup() const;
/**
* Sets the configuration group that is used to save the accelerators.
* @param cg the configuration group
* @see KConfig
*/
- void setConfigGroup( const QString &cg );
+ void setConfigGroup( const TQString &cg );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
diff --git a/kdecore/kglobalaccel_mac.h b/kdecore/kglobalaccel_mac.h
index 413842256..1bed4f3cc 100644
--- a/kdecore/kglobalaccel_mac.h
+++ b/kdecore/kglobalaccel_mac.h
@@ -1,7 +1,7 @@
#ifndef _KGLOBALACCEL_MAC_H
#define _KGLOBALACCEL_MAC_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kshortcut.h"
#include "kaccelbase.h"
diff --git a/kdecore/kglobalaccel_win.cpp b/kdecore/kglobalaccel_win.cpp
index bfd389627..8b0c81f1a 100644
--- a/kdecore/kglobalaccel_win.cpp
+++ b/kdecore/kglobalaccel_win.cpp
@@ -19,17 +19,17 @@
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#ifdef Q_WS_WIN
#include "kglobalaccel_win.h"
#include "kglobalaccel.h"
#include "kkeyserver_x11.h"
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -37,7 +37,7 @@
//----------------------------------------------------
-static QValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
KGlobalAccelPrivate::KGlobalAccelPrivate()
: KAccelBase( KAccelBase::NATIVE_KEYS )
@@ -45,7 +45,7 @@ KGlobalAccelPrivate::KGlobalAccelPrivate()
, m_blockingDisabled( false )
{
if( all_accels == NULL )
- all_accels = new QValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< KGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
// kapp->installX11EventFilter( this );
@@ -74,7 +74,7 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( QValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -128,7 +128,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
keyCodeX = 111;
}
- kdDebug(125) << QString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
+ kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
.arg( key.key().toStringInternal() ).arg( bGrab )
.arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 );
if( !keyCodeX )
@@ -140,13 +140,13 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
- QString sDebug = QString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
+ TQString sDebug = TQString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
#endif
uint keyModMaskX = ~g_keyModMaskXOnOrOff;
for( uint irrelevantBitsMask = 0; irrelevantBitsMask <= 0xff; irrelevantBitsMask++ ) {
if( (irrelevantBitsMask & keyModMaskX) == 0 ) {
#ifndef NDEBUG
- sDebug += QString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
+ sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
@@ -202,7 +202,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
if( x11KeyPress( pEvent ) )
return true;
default:
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
}
@@ -221,7 +221,7 @@ void KGlobalAccelPrivate::x11MappingNotify()
bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
- if ( !QWidget::keyboardGrabber() && !QApplication::activePopupWidget() ) {
+ if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
XFlush( qt_xdisplay()); // avoid X(?) bug
}
@@ -261,7 +261,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
KKey key = keyNative;
kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 state: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -269,8 +269,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -282,10 +282,10 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -301,9 +301,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
{
kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
- QRegExp rexPassIndex( "([ ]*int[ ]*)" );
- QRegExp rexPassInfo( " QString" );
- QRegExp rexIndex( " ([0-9]+)$" );
+ TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
+ TQRegExp rexPassInfo( " TQString" );
+ TQRegExp rexIndex( " ([0-9]+)$" );
// If the slot to be called accepts an integer index
// and an index is present at the end of the action's name,
@@ -315,7 +315,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( slot_id >= 0 ) {
QUObject o[2];
static_QUType_int.set(o+1,n);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
@@ -324,12 +324,12 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
static_QUType_QString.set(o+1,pAction->name());
static_QUType_QString.set(o+2,pAction->label());
static_QUType_ptr.set(o+3,&seq);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
}
diff --git a/kdecore/kglobalaccel_win.h b/kdecore/kglobalaccel_win.h
index d711115cd..414254881 100644
--- a/kdecore/kglobalaccel_win.h
+++ b/kdecore/kglobalaccel_win.h
@@ -20,8 +20,8 @@
#ifndef _KGLOBALACCEL_WIN_H
#define _KGLOBALACCEL_WIN_H
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include "kaccelbase.h"
#include "kkeyserver.h"
@@ -30,7 +30,7 @@
/**
* @internal
*/
-class KGlobalAccelPrivate : public QWidget, public KAccelBase
+class KGlobalAccelPrivate : public TQWidget, public KAccelBase
{
friend class KGlobalAccel;
Q_OBJECT
diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp
index 249c06460..54038f81a 100644
--- a/kdecore/kglobalaccel_x11.cpp
+++ b/kdecore/kglobalaccel_x11.cpp
@@ -19,17 +19,17 @@
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#ifdef Q_WS_X11
#include "kglobalaccel_x11.h"
#include "kglobalaccel.h"
#include "kkeyserver_x11.h"
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -76,7 +76,7 @@ static void calculateGrabMasks()
//----------------------------------------------------
-static QValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
KGlobalAccelPrivate::KGlobalAccelPrivate()
: KAccelBase( KAccelBase::NATIVE_KEYS )
@@ -85,11 +85,11 @@ KGlobalAccelPrivate::KGlobalAccelPrivate()
, m_suspended( false )
{
if( all_accels == NULL )
- all_accels = new QValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< KGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
kapp->installX11EventFilter( this );
- connect(kapp, SIGNAL(coreFakeKeyPress(unsigned int)), this, SLOT(fakeKeyPressed(unsigned int)));
+ connect(kapp, TQT_SIGNAL(coreFakeKeyPress(unsigned int)), this, TQT_SLOT(fakeKeyPressed(unsigned int)));
}
KGlobalAccelPrivate::~KGlobalAccelPrivate()
@@ -115,7 +115,7 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( QValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -179,7 +179,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
#ifndef __osf__
// this crashes under Tru64 so .....
- kdDebug(125) << QString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
+ kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
.arg( key.key().toStringInternal() ).arg( bGrab )
.arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 );
#endif
@@ -195,13 +195,13 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
- QString sDebug = QString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
+ TQString sDebug = TQString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
#endif
uint keyModMaskX = ~g_keyModMaskXOnOrOff;
for( uint irrelevantBitsMask = 0; irrelevantBitsMask <= 0xff; irrelevantBitsMask++ ) {
if( (irrelevantBitsMask & keyModMaskX) == 0 ) {
#ifndef NDEBUG
- sDebug += QString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
+ sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
@@ -256,7 +256,7 @@ bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
if( x11KeyPress( pEvent ) )
return true;
default:
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
}
@@ -278,7 +278,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
KKey key = (keyCode, 0);
kdDebug(125) << "fakeKeyPressed: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -286,8 +286,8 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -300,10 +300,10 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -316,7 +316,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
- if ( !QWidget::keyboardGrabber() && !QApplication::activePopupWidget() ) {
+ if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
XFlush( qt_xdisplay()); // avoid X(?) bug
}
@@ -356,7 +356,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
KKey key = keyNative;
kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 state: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -364,8 +364,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -378,10 +378,10 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -397,9 +397,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
{
kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
- QRegExp rexPassIndex( "([ ]*int[ ]*)" );
- QRegExp rexPassInfo( " QString" );
- QRegExp rexIndex( " ([0-9]+)$" );
+ TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
+ TQRegExp rexPassInfo( " TQString" );
+ TQRegExp rexIndex( " ([0-9]+)$" );
// If the slot to be called accepts an integer index
// and an index is present at the end of the action's name,
@@ -411,7 +411,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( slot_id >= 0 ) {
QUObject o[2];
static_QUType_int.set(o+1,n);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
@@ -420,12 +420,12 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
static_QUType_QString.set(o+1,pAction->name());
static_QUType_QString.set(o+2,pAction->label());
static_QUType_ptr.set(o+3,&seq);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
}
diff --git a/kdecore/kglobalaccel_x11.h b/kdecore/kglobalaccel_x11.h
index 393596837..3022e0d90 100644
--- a/kdecore/kglobalaccel_x11.h
+++ b/kdecore/kglobalaccel_x11.h
@@ -20,8 +20,8 @@
#ifndef _KGLOBALACCEL_X11_H
#define _KGLOBALACCEL_X11_H
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include "kaccelbase.h"
#include "kkeyserver_x11.h"
@@ -30,7 +30,7 @@
/**
* @internal
*/
-class KGlobalAccelPrivate : public QWidget, public KAccelBase
+class KGlobalAccelPrivate : public TQWidget, public KAccelBase
{
friend class KGlobalAccel;
Q_OBJECT
@@ -73,7 +73,7 @@ class KGlobalAccelPrivate : public QWidget, public KAccelBase
return false;
}
};
- typedef QMap<CodeMod, KAccelAction*> CodeModMap;
+ typedef TQMap<CodeMod, KAccelAction*> CodeModMap;
CodeModMap m_rgCodeModToAction;
diff --git a/kdecore/kglobalsettings.cpp b/kdecore/kglobalsettings.cpp
index 25e95f5c6..60f09fadb 100644
--- a/kdecore/kglobalsettings.cpp
+++ b/kdecore/kglobalsettings.cpp
@@ -18,10 +18,10 @@
#include "config.h"
#include "kglobalsettings.h"
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qfontdatabase.h>
-#include <qcursor.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqfontdatabase.h>
+#include <tqcursor.h>
#include <kconfig.h>
#include <ksimpleconfig.h>
@@ -46,61 +46,61 @@ static QRgb qt_colorref2qrgb(COLORREF col)
#include <kcharsets.h>
#include <kaccel.h>
#include <klocale.h>
-#include <qfontinfo.h>
+#include <tqfontinfo.h>
#include <stdlib.h>
#include <kprotocolinfo.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
-QString* KGlobalSettings::s_desktopPath = 0;
-QString* KGlobalSettings::s_autostartPath = 0;
-QString* KGlobalSettings::s_trashPath = 0;
-QString* KGlobalSettings::s_documentPath = 0;
-QFont *KGlobalSettings::_generalFont = 0;
-QFont *KGlobalSettings::_fixedFont = 0;
-QFont *KGlobalSettings::_toolBarFont = 0;
-QFont *KGlobalSettings::_menuFont = 0;
-QFont *KGlobalSettings::_windowTitleFont = 0;
-QFont *KGlobalSettings::_taskbarFont = 0;
-QFont *KGlobalSettings::_largeFont = 0;
-QColor *KGlobalSettings::_kde34Blue = 0;
-QColor *KGlobalSettings::_inactiveBackground = 0;
-QColor *KGlobalSettings::_inactiveForeground = 0;
-QColor *KGlobalSettings::_activeBackground = 0;
-QColor *KGlobalSettings::_buttonBackground = 0;
-QColor *KGlobalSettings::_selectBackground = 0;
-QColor *KGlobalSettings::_linkColor = 0;
-QColor *KGlobalSettings::_visitedLinkColor = 0;
-QColor *KGlobalSettings::alternateColor = 0;
+TQString* KGlobalSettings::s_desktopPath = 0;
+TQString* KGlobalSettings::s_autostartPath = 0;
+TQString* KGlobalSettings::s_trashPath = 0;
+TQString* KGlobalSettings::s_documentPath = 0;
+TQFont *KGlobalSettings::_generalFont = 0;
+TQFont *KGlobalSettings::_fixedFont = 0;
+TQFont *KGlobalSettings::_toolBarFont = 0;
+TQFont *KGlobalSettings::_menuFont = 0;
+TQFont *KGlobalSettings::_windowTitleFont = 0;
+TQFont *KGlobalSettings::_taskbarFont = 0;
+TQFont *KGlobalSettings::_largeFont = 0;
+TQColor *KGlobalSettings::_kde34Blue = 0;
+TQColor *KGlobalSettings::_inactiveBackground = 0;
+TQColor *KGlobalSettings::_inactiveForeground = 0;
+TQColor *KGlobalSettings::_activeBackground = 0;
+TQColor *KGlobalSettings::_buttonBackground = 0;
+TQColor *KGlobalSettings::_selectBackground = 0;
+TQColor *KGlobalSettings::_linkColor = 0;
+TQColor *KGlobalSettings::_visitedLinkColor = 0;
+TQColor *KGlobalSettings::alternateColor = 0;
KGlobalSettings::KMouseSettings *KGlobalSettings::s_mouseSettings = 0;
// helper function for reading xdg user dirs: it is required in order to take
// care of locale stuff
-void readXdgUserDirs(QString *desktop, QString *documents)
+void readXdgUserDirs(TQString *desktop, TQString *documents)
{
- QFile f( QDir::homeDirPath() + "/.config/user-dirs.dirs" );
+ TQFile f( TQDir::homeDirPath() + "/.config/user-dirs.dirs" );
if (!f.open(IO_ReadOnly))
return;
// set the codec for the current locale
- QTextStream s(&f);
- s.setCodec( QTextCodec::codecForLocale() );
+ TQTextStream s(&f);
+ s.setCodec( TQTextCodec::codecForLocale() );
- QString line = s.readLine();
+ TQString line = s.readLine();
while (!line.isNull())
{
if (line.startsWith("XDG_DESKTOP_DIR="))
- *desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ *desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_DOCUMENTS_DIR="))
- *documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ *documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
line = s.readLine();
}
@@ -109,7 +109,7 @@ void readXdgUserDirs(QString *desktop, QString *documents)
int KGlobalSettings::dndEventDelay()
{
KConfigGroup g( KGlobal::config(), "General" );
- return g.readNumEntry("StartDragDist", QApplication::startDragDistance());
+ return g.readNumEntry("StartDragDist", TQApplication::startDragDistance());
}
bool KGlobalSettings::singleClick()
@@ -184,51 +184,51 @@ int KGlobalSettings::contextMenuKey ()
return cut.keyCodeQt();
}
-QColor KGlobalSettings::toolBarHighlightColor()
+TQColor KGlobalSettings::toolBarHighlightColor()
{
initColors();
KConfigGroup g( KGlobal::config(), "Toolbar style" );
return g.readColorEntry("HighlightColor", _kde34Blue);
}
-QColor KGlobalSettings::inactiveTitleColor()
+TQColor KGlobalSettings::inactiveTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION));
#else
if (!_inactiveBackground)
- _inactiveBackground = new QColor(157, 170, 186);
+ _inactiveBackground = new TQColor(157, 170, 186);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "inactiveBackground", _inactiveBackground );
#endif
}
-QColor KGlobalSettings::inactiveTextColor()
+TQColor KGlobalSettings::inactiveTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
#else
if (!_inactiveForeground)
- _inactiveForeground = new QColor(221,221,221);
+ _inactiveForeground = new TQColor(221,221,221);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "inactiveForeground", _inactiveForeground );
#endif
}
-QColor KGlobalSettings::activeTitleColor()
+TQColor KGlobalSettings::activeTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION));
#else
initColors();
if (!_activeBackground)
- _activeBackground = new QColor(65,142,220);
+ _activeBackground = new TQColor(65,142,220);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "activeBackground", _activeBackground);
#endif
}
-QColor KGlobalSettings::activeTextColor()
+TQColor KGlobalSettings::activeTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT));
@@ -244,15 +244,15 @@ int KGlobalSettings::contrast()
return g.readNumEntry( "contrast", 7 );
}
-QColor KGlobalSettings::buttonBackground()
+TQColor KGlobalSettings::buttonBackground()
{
if (!_buttonBackground)
- _buttonBackground = new QColor(221,223,228);
+ _buttonBackground = new TQColor(221,223,228);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "buttonBackground", _buttonBackground );
}
-QColor KGlobalSettings::buttonTextColor()
+TQColor KGlobalSettings::buttonTextColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "buttonForeground", &Qt::black );
@@ -261,7 +261,7 @@ QColor KGlobalSettings::buttonTextColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::baseColor()
+TQColor KGlobalSettings::baseColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "windowBackground", &Qt::white );
@@ -270,7 +270,7 @@ QColor KGlobalSettings::baseColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::textColor()
+TQColor KGlobalSettings::textColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "windowForeground", &Qt::black );
@@ -279,7 +279,7 @@ QColor KGlobalSettings::textColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::highlightedTextColor()
+TQColor KGlobalSettings::highlightedTextColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "selectForeground", &Qt::white );
@@ -288,16 +288,16 @@ QColor KGlobalSettings::highlightedTextColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::highlightColor()
+TQColor KGlobalSettings::highlightColor()
{
initColors();
if (!_selectBackground)
- _selectBackground = new QColor(103,141,178);
+ _selectBackground = new TQColor(103,141,178);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "selectBackground", _selectBackground );
}
-QColor KGlobalSettings::alternateBackgroundColor()
+TQColor KGlobalSettings::alternateBackgroundColor()
{
initColors();
KConfigGroup g( KGlobal::config(), "General" );
@@ -305,10 +305,10 @@ QColor KGlobalSettings::alternateBackgroundColor()
return g.readColorEntry( "alternateBackground", alternateColor );
}
-QColor KGlobalSettings::calculateAlternateBackgroundColor(const QColor& base)
+TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base)
{
if (base == Qt::white)
- return QColor(238,246,255);
+ return TQColor(238,246,255);
else
{
int h, s, v;
@@ -318,7 +318,7 @@ QColor KGlobalSettings::calculateAlternateBackgroundColor(const QColor& base)
else if (base != Qt::black)
return base.light(110);
- return QColor(32,32,32);
+ return TQColor(32,32,32);
}
}
@@ -328,32 +328,32 @@ bool KGlobalSettings::shadeSortColumn()
return g.readBoolEntry( "shadeSortColumn", KDE_DEFAULT_SHADE_SORT_COLUMN );
}
-QColor KGlobalSettings::linkColor()
+TQColor KGlobalSettings::linkColor()
{
initColors();
if (!_linkColor)
- _linkColor = new QColor(0,0,238);
+ _linkColor = new TQColor(0,0,238);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "linkColor", _linkColor );
}
-QColor KGlobalSettings::visitedLinkColor()
+TQColor KGlobalSettings::visitedLinkColor()
{
if (!_visitedLinkColor)
- _visitedLinkColor = new QColor(82,24,139);
+ _visitedLinkColor = new TQColor(82,24,139);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "visitedLinkColor", _visitedLinkColor );
}
-QFont KGlobalSettings::generalFont()
+TQFont KGlobalSettings::generalFont()
{
if (_generalFont)
return *_generalFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _generalFont = new QFont("Sans Serif", 10);
+ _generalFont = new TQFont("Sans Serif", 10);
_generalFont->setPointSize(10);
- _generalFont->setStyleHint(QFont::SansSerif);
+ _generalFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_generalFont = g.readFontEntry("font", _generalFont);
@@ -361,15 +361,15 @@ QFont KGlobalSettings::generalFont()
return *_generalFont;
}
-QFont KGlobalSettings::fixedFont()
+TQFont KGlobalSettings::fixedFont()
{
if (_fixedFont)
return *_fixedFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _fixedFont = new QFont("Monospace", 10);
+ _fixedFont = new TQFont("Monospace", 10);
_fixedFont->setPointSize(10);
- _fixedFont->setStyleHint(QFont::TypeWriter);
+ _fixedFont->setStyleHint(TQFont::TypeWriter);
KConfigGroup g( KGlobal::config(), "General" );
*_fixedFont = g.readFontEntry("fixed", _fixedFont);
@@ -377,15 +377,15 @@ QFont KGlobalSettings::fixedFont()
return *_fixedFont;
}
-QFont KGlobalSettings::toolBarFont()
+TQFont KGlobalSettings::toolBarFont()
{
if(_toolBarFont)
return *_toolBarFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _toolBarFont = new QFont("Sans Serif", 10);
+ _toolBarFont = new TQFont("Sans Serif", 10);
_toolBarFont->setPointSize(10);
- _toolBarFont->setStyleHint(QFont::SansSerif);
+ _toolBarFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_toolBarFont = g.readFontEntry("toolBarFont", _toolBarFont);
@@ -393,15 +393,15 @@ QFont KGlobalSettings::toolBarFont()
return *_toolBarFont;
}
-QFont KGlobalSettings::menuFont()
+TQFont KGlobalSettings::menuFont()
{
if(_menuFont)
return *_menuFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _menuFont = new QFont("Sans Serif", 10);
+ _menuFont = new TQFont("Sans Serif", 10);
_menuFont->setPointSize(10);
- _menuFont->setStyleHint(QFont::SansSerif);
+ _menuFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_menuFont = g.readFontEntry("menuFont", _menuFont);
@@ -409,15 +409,15 @@ QFont KGlobalSettings::menuFont()
return *_menuFont;
}
-QFont KGlobalSettings::windowTitleFont()
+TQFont KGlobalSettings::windowTitleFont()
{
if(_windowTitleFont)
return *_windowTitleFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _windowTitleFont = new QFont("Sans Serif", 9, QFont::Bold);
+ _windowTitleFont = new TQFont("Sans Serif", 9, TQFont::Bold);
_windowTitleFont->setPointSize(10);
- _windowTitleFont->setStyleHint(QFont::SansSerif);
+ _windowTitleFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "WM" );
*_windowTitleFont = g.readFontEntry("activeFont", _windowTitleFont); // inconsistency
@@ -425,15 +425,15 @@ QFont KGlobalSettings::windowTitleFont()
return *_windowTitleFont;
}
-QFont KGlobalSettings::taskbarFont()
+TQFont KGlobalSettings::taskbarFont()
{
if(_taskbarFont)
return *_taskbarFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _taskbarFont = new QFont("Sans Serif", 10);
+ _taskbarFont = new TQFont("Sans Serif", 10);
_taskbarFont->setPointSize(10);
- _taskbarFont->setStyleHint(QFont::SansSerif);
+ _taskbarFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont);
@@ -442,10 +442,10 @@ QFont KGlobalSettings::taskbarFont()
}
-QFont KGlobalSettings::largeFont(const QString &text)
+TQFont KGlobalSettings::largeFont(const TQString &text)
{
- QFontDatabase db;
- QStringList fam = db.families();
+ TQFontDatabase db;
+ TQStringList fam = db.families();
// Move a bunch of preferred fonts to the front.
if (fam.remove("Arial"))
@@ -466,14 +466,14 @@ QFont KGlobalSettings::largeFont(const QString &text)
if (_largeFont)
fam.prepend(_largeFont->family());
- for(QStringList::ConstIterator it = fam.begin();
+ for(TQStringList::ConstIterator it = fam.begin();
it != fam.end(); ++it)
{
if (db.isSmoothlyScalable(*it) && !db.isFixedPitch(*it))
{
- QFont font(*it);
+ TQFont font(*it);
font.setPixelSize(75);
- QFontMetrics metrics(font);
+ TQFontMetrics metrics(font);
int h = metrics.height();
if ((h < 60) || ( h > 90))
continue;
@@ -491,11 +491,11 @@ QFont KGlobalSettings::largeFont(const QString &text)
continue;
font.setPointSize(48);
- _largeFont = new QFont(font);
+ _largeFont = new TQFont(font);
return *_largeFont;
}
}
- _largeFont = new QFont(KGlobalSettings::generalFont());
+ _largeFont = new TQFont(KGlobalSettings::generalFont());
_largeFont->setPointSize(48);
return *_largeFont;
}
@@ -505,28 +505,28 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
if ( s_desktopPath != 0 )
return;
- s_desktopPath = new QString();
- s_autostartPath = new QString();
- s_trashPath = new QString();
- s_documentPath = new QString();
+ s_desktopPath = new TQString();
+ s_autostartPath = new TQString();
+ s_trashPath = new TQString();
+ s_documentPath = new TQString();
KConfigGroup g( KGlobal::config(), "Paths" );
// Read desktop and documents path using XDG_USER_DIRS
readXdgUserDirs(s_desktopPath, s_documentPath);
- *s_desktopPath = QDir::cleanDirPath( *s_desktopPath );
+ *s_desktopPath = TQDir::cleanDirPath( *s_desktopPath );
if ( !s_desktopPath->endsWith("/") )
s_desktopPath->append('/');
- *s_documentPath = QDir::cleanDirPath( *s_documentPath );
+ *s_documentPath = TQDir::cleanDirPath( *s_documentPath );
if ( !s_documentPath->endsWith("/"))
s_documentPath->append('/');
// Trash Path - TODO remove in KDE4 (kio_trash can't use it for interoperability reasons)
*s_trashPath = *s_desktopPath + i18n("Trash") + "/";
*s_trashPath = g.readPathEntry( "Trash" , *s_trashPath);
- *s_trashPath = QDir::cleanDirPath( *s_trashPath );
+ *s_trashPath = TQDir::cleanDirPath( *s_trashPath );
if ( !s_trashPath->endsWith("/") )
s_trashPath->append('/');
// We need to save it in any case, in case the language changes later on,
@@ -539,7 +539,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
// Autostart Path
*s_autostartPath = KGlobal::dirs()->localkdedir() + "Autostart/";
*s_autostartPath = g.readPathEntry( "Autostart" , *s_autostartPath);
- *s_autostartPath = QDir::cleanDirPath( *s_autostartPath );
+ *s_autostartPath = TQDir::cleanDirPath( *s_autostartPath );
if ( !s_autostartPath->endsWith("/") )
s_autostartPath->append('/');
@@ -551,13 +551,13 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
void KGlobalSettings::initColors()
{
if (!_kde34Blue) {
- if (QPixmap::defaultDepth() > 8)
- _kde34Blue = new QColor(103,141,178);
+ if (TQPixmap::defaultDepth() > 8)
+ _kde34Blue = new TQColor(103,141,178);
else
- _kde34Blue = new QColor(0, 0, 192);
+ _kde34Blue = new TQColor(0, 0, 192);
}
if (!alternateColor)
- alternateColor = new QColor(237, 244, 249);
+ alternateColor = new TQColor(237, 244, 249);
}
void KGlobalSettings::rereadFontSettings()
@@ -598,7 +598,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings()
#ifndef Q_WS_WIN
KConfigGroup g( KGlobal::config(), "Mouse" );
- QString setting = g.readEntry("MouseButtonMapping");
+ TQString setting = g.readEntry("MouseButtonMapping");
if (setting == "RightHanded")
s.handed = KMouseSettings::RightHanded;
else if (setting == "LeftHanded")
@@ -652,7 +652,7 @@ bool KGlobalSettings::isMultiHead()
#ifdef Q_WS_WIN
return GetSystemMetrics(SM_CMONITORS) > 1;
#else
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.lower() == "true");
}
@@ -666,16 +666,16 @@ bool KGlobalSettings::wheelMouseZooms()
return g.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM );
}
-QRect KGlobalSettings::splashScreenDesktopGeometry()
+TQRect KGlobalSettings::splashScreenDesktopGeometry()
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
int scr = group.readNumEntry("Unmanaged", -3);
if (group.readBoolEntry("XineramaEnabled", true) && scr != -2) {
if (scr == -3)
- scr = dw->screenNumber(QCursor::pos());
+ scr = dw->screenNumber(TQCursor::pos());
return dw->screenGeometry(scr);
} else {
return dw->geometry();
@@ -685,9 +685,9 @@ QRect KGlobalSettings::splashScreenDesktopGeometry()
}
}
-QRect KGlobalSettings::desktopGeometry(const QPoint& point)
+TQRect KGlobalSettings::desktopGeometry(const TQPoint& point)
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
@@ -702,9 +702,9 @@ QRect KGlobalSettings::desktopGeometry(const QPoint& point)
}
}
-QRect KGlobalSettings::desktopGeometry(QWidget* w)
+TQRect KGlobalSettings::desktopGeometry(TQWidget* w)
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
@@ -731,7 +731,7 @@ bool KGlobalSettings::showIconsOnPushButtons()
bool KGlobalSettings::showFilePreview(const KURL &url)
{
KConfigGroup g(KGlobal::config(), "PreviewSettings");
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
bool defaultSetting = KProtocolInfo::showFilePreview( protocol );
return g.readBoolEntry(protocol, defaultSetting );
}
diff --git a/kdecore/kglobalsettings.h b/kdecore/kglobalsettings.h
index 4f5977bd2..7b5c37ed1 100644
--- a/kdecore/kglobalsettings.h
+++ b/kdecore/kglobalsettings.h
@@ -18,9 +18,9 @@
#ifndef _KGLOBALSETTINGS_H
#define _KGLOBALSETTINGS_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "kdelibs_export.h"
#define KDE_DEFAULT_SINGLECLICK true
@@ -55,25 +55,25 @@ class KDECORE_EXPORT KGlobalSettings
* to click on something but moved the mouse a bit while doing so.
*
* For this to work you must save the position of the mouse (oldPos)
- * in the QWidget::mousePressEvent().
+ * in the TQWidget::mousePressEvent().
* When the position of the mouse (newPos)
- * in a QWidget::mouseMoveEvent() exceeds this threshold
+ * in a TQWidget::mouseMoveEvent() exceeds this threshold
* you may start a drag
* which should originate from oldPos.
*
* Example code:
* \code
- * void KColorCells::mousePressEvent( QMouseEvent *e )
+ * void KColorCells::mousePressEvent( TQMouseEvent *e )
* {
* mOldPos = e->pos();
* }
*
- * void KColorCells::mouseMoveEvent( QMouseEvent *e )
+ * void KColorCells::mouseMoveEvent( TQMouseEvent *e )
* {
* if( !(e->state() && LeftButton)) return;
*
* int delay = KGlobalSettings::dndEventDelay();
- * QPoint newPos = e->pos();
+ * TQPoint newPos = e->pos();
* if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
* newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
* {
@@ -222,20 +222,20 @@ class KDECORE_EXPORT KGlobalSettings
* The path to the desktop directory of the current user.
* @return the user's desktop directory
*/
- static QString desktopPath() { initStatic(); return *s_desktopPath; }
+ static TQString desktopPath() { initStatic(); return *s_desktopPath; }
/**
* The path to the autostart directory of the current user.
* @return the path of the autostart directory
*/
- static QString autostartPath() { initStatic(); return *s_autostartPath; }
+ static TQString autostartPath() { initStatic(); return *s_autostartPath; }
/**
* DEPRECATED (starting from kde-3.4).
* This isn't where the trash contents is, anymore.
* Use KIO::trash() to trash files, "trash:/" to list the trash contents.
*/
- static QString trashPath() { initStatic(); return *s_trashPath; }
+ static TQString trashPath() { initStatic(); return *s_trashPath; }
// KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs
// to know the old location of the trash
@@ -243,38 +243,38 @@ class KDECORE_EXPORT KGlobalSettings
* The path where documents are stored of the current user.
* @return the path of the document directory
*/
- static QString documentPath() { initStatic(); return *s_documentPath; }
+ static TQString documentPath() { initStatic(); return *s_documentPath; }
/**
* The default color to use when highlighting toolbar buttons.
* @return the toolbar highlight color
*/
- static QColor toolBarHighlightColor();
+ static TQColor toolBarHighlightColor();
/**
* The default color to use for inactive titles.
* @return the inactive title color
*/
- static QColor inactiveTitleColor();
+ static TQColor inactiveTitleColor();
/**
* The default color to use for inactive texts.
* @return the inactive text color
*/
- static QColor inactiveTextColor();
+ static TQColor inactiveTextColor();
/**
* The default color to use for active titles.
* @return the active title color
*/
- static QColor activeTitleColor();
+ static TQColor activeTitleColor();
/**
* The default color to use for active texts.
* @return the active text color
*/
- static QColor activeTextColor();
+ static TQColor activeTextColor();
/**
* Returns the contrast for borders.
@@ -288,54 +288,54 @@ class KDECORE_EXPORT KGlobalSettings
* @return the button background color
* @since 3.4
*/
- static QColor buttonBackground();
+ static TQColor buttonBackground();
/**
* Returns the button text color
* @return the button text color
* @since 3.4
*/
- static QColor buttonTextColor();
+ static TQColor buttonTextColor();
/**
* Returns the default base (background) color.
* @return the default base (background) color
- * @see QColorGroup::base()
+ * @see TQColorGroup::base()
*/
- static QColor baseColor();
+ static TQColor baseColor();
/**
* Returns the default text color.
* @return the default text color
- * @see QColorGroup::text()
+ * @see TQColorGroup::text()
*/
- static QColor textColor();
+ static TQColor textColor();
/**
* Returns the default link color.
* @return the default link color
*/
- static QColor linkColor();
+ static TQColor linkColor();
/**
* Returns the default color for visited links.
* @return the default color for visited links
*/
- static QColor visitedLinkColor();
+ static TQColor visitedLinkColor();
/**
* Returns the default color for highlighted text.
* @return the default color for highlighted text
- * @see QColorGroup::hightlightedText()
+ * @see TQColorGroup::hightlightedText()
*/
- static QColor highlightedTextColor();
+ static TQColor highlightedTextColor();
/**
* Returns the default color for text highlights.
* @return the default color for text highlights
- * @see QColorGroup::hightlight()
+ * @see TQColorGroup::hightlight()
*/
- static QColor highlightColor();
+ static TQColor highlightColor();
/**
* Returns the alternate background color used by KListView with
@@ -345,7 +345,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the alternate background color
* @see calculateAlternateBackgroundColor
*/
- static QColor alternateBackgroundColor();
+ static TQColor alternateBackgroundColor();
/**
* Calculates a color based on @p base to be used as alternating
@@ -354,7 +354,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the calculated color
* @see alternateBackgroundColor
*/
- static QColor calculateAlternateBackgroundColor(const QColor& base);
+ static TQColor calculateAlternateBackgroundColor(const TQColor& base);
/**
* Returns if the sorted column in a KListView shall be drawn with a
@@ -368,37 +368,37 @@ class KDECORE_EXPORT KGlobalSettings
* Returns the default general font.
* @return the default general font.
*/
- static QFont generalFont();
+ static TQFont generalFont();
/**
* Returns the default fixed font.
* @return the default fixed font.
*/
- static QFont fixedFont();
+ static TQFont fixedFont();
/**
* Returns the default toolbar font.
* @return the default toolbar font.
*/
- static QFont toolBarFont();
+ static TQFont toolBarFont();
/**
* Returns the default menu font.
* @return the default menu font.
*/
- static QFont menuFont();
+ static TQFont menuFont();
/**
* Returns the default window title font.
* @return the default window title font.
*/
- static QFont windowTitleFont();
+ static TQFont windowTitleFont();
/**
* Returns the default taskbar font.
* @return the default taskbar font.
*/
- static QFont taskbarFont();
+ static TQFont taskbarFont();
/**
* Returns a font of approx. 48 pt. capable of showing @p text.
@@ -406,7 +406,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the font that is capable to show the text with 48 pt
* @since 3.1
*/
- static QFont largeFont(const QString &text = QString::null);
+ static TQFont largeFont(const TQString &text = TQString::null);
/**
* Returns if the user specified multihead. In case the display
@@ -418,9 +418,9 @@ class KDECORE_EXPORT KGlobalSettings
static bool isMultiHead();
/**
- * Typically, QScrollView derived classes can be scrolled fast by
+ * Typically, TQScrollView derived classes can be scrolled fast by
* holding down the Ctrl-button during wheel-scrolling.
- * But QTextEdit and derived classes perform zooming instead of fast
+ * But TQTextEdit and derived classes perform zooming instead of fast
* scrolling.
*
* This value determines whether the user wants to zoom or scroll fast
@@ -441,7 +441,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect splashScreenDesktopGeometry();
+ static TQRect splashScreenDesktopGeometry();
/**
* This function returns the desktop geometry for an application that needs
@@ -459,7 +459,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect desktopGeometry(const QPoint& point);
+ static TQRect desktopGeometry(const TQPoint& point);
/**
* This function returns the desktop geometry for an application that needs
@@ -474,7 +474,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect desktopGeometry(QWidget* w);
+ static TQRect desktopGeometry(TQWidget* w);
/**
* This function determines if the user wishes to see icons on the
@@ -498,7 +498,7 @@ class KDECORE_EXPORT KGlobalSettings
/**
* Whether the user wishes to use opaque resizing. Primarily
- * intended for QSplitter::setOpaqueResize()
+ * intended for TQSplitter::setOpaqueResize()
*
* @return Returns true if user wants to use opaque resizing.
*
@@ -538,26 +538,26 @@ private:
static void rereadMouseSettings();
- static QString* s_desktopPath;
- static QString* s_autostartPath;
- static QString* s_trashPath;
- static QString* s_documentPath;
- static QFont *_generalFont;
- static QFont *_fixedFont;
- static QFont *_toolBarFont;
- static QFont *_menuFont;
- static QFont *_windowTitleFont;
- static QFont *_taskbarFont;
- static QFont *_largeFont;
- static QColor * _kde34Blue;
- static QColor * _inactiveBackground;
- static QColor * _inactiveForeground;
- static QColor * _activeBackground;
- static QColor * _buttonBackground;
- static QColor * _selectBackground;
- static QColor * _linkColor;
- static QColor * _visitedLinkColor;
- static QColor * alternateColor;
+ static TQString* s_desktopPath;
+ static TQString* s_autostartPath;
+ static TQString* s_trashPath;
+ static TQString* s_documentPath;
+ static TQFont *_generalFont;
+ static TQFont *_fixedFont;
+ static TQFont *_toolBarFont;
+ static TQFont *_menuFont;
+ static TQFont *_windowTitleFont;
+ static TQFont *_taskbarFont;
+ static TQFont *_largeFont;
+ static TQColor * _kde34Blue;
+ static TQColor * _inactiveBackground;
+ static TQColor * _inactiveForeground;
+ static TQColor * _activeBackground;
+ static TQColor * _buttonBackground;
+ static TQColor * _selectBackground;
+ static TQColor * _linkColor;
+ static TQColor * _visitedLinkColor;
+ static TQColor * alternateColor;
static KMouseSettings *s_mouseSettings;
friend class KApplication;
diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp
index 780bea576..cf0095ca9 100644
--- a/kdecore/kiconeffect.cpp
+++ b/kdecore/kiconeffect.cpp
@@ -15,18 +15,18 @@
#include <unistd.h>
#include <math.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qapplication.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqapplication.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -45,8 +45,8 @@ extern bool qt_has_xft;
class KIconEffectPrivate
{
public:
- QString mKey[6][3];
- QColor mColor2[6][3];
+ TQString mKey[6][3];
+ TQColor mColor2[6][3];
};
KIconEffect::KIconEffect()
@@ -66,25 +66,25 @@ void KIconEffect::init()
KConfig *config = KGlobal::config();
int i, j, effect=-1;
- QStringList groups;
+ TQStringList groups;
groups += "Desktop";
groups += "Toolbar";
groups += "MainToolbar";
groups += "Small";
groups += "Panel";
- QStringList states;
+ TQStringList states;
states += "Default";
states += "Active";
states += "Disabled";
- QStringList::ConstIterator it, it2;
- QString _togray("togray");
- QString _colorize("colorize");
- QString _desaturate("desaturate");
- QString _togamma("togamma");
- QString _none("none");
- QString _tomonochrome("tomonochrome");
+ TQStringList::ConstIterator it, it2;
+ TQString _togray("togray");
+ TQString _colorize("colorize");
+ TQString _desaturate("desaturate");
+ TQString _togamma("togamma");
+ TQString _none("none");
+ TQString _tomonochrome("tomonochrome");
KConfigGroupSaver cs(config, "default");
@@ -101,17 +101,17 @@ void KIconEffect::init()
mValue[i][0] = 1.0;
mValue[i][1] = ((i==0)||(i==4)) ? 0.7 : 1.0;
mValue[i][2] = 1.0;
- mColor[i][0] = QColor(144,128,248);
- mColor[i][1] = QColor(169,156,255);
- mColor[i][2] = QColor(34,202,0);
- d->mColor2[i][0] = QColor(0,0,0);
- d->mColor2[i][1] = QColor(0,0,0);
- d->mColor2[i][2] = QColor(0,0,0);
+ mColor[i][0] = TQColor(144,128,248);
+ mColor[i][1] = TQColor(169,156,255);
+ mColor[i][2] = TQColor(34,202,0);
+ d->mColor2[i][0] = TQColor(0,0,0);
+ d->mColor2[i][1] = TQColor(0,0,0);
+ d->mColor2[i][2] = TQColor(0,0,0);
config->setGroup(*it + "Icons");
for (it2=states.begin(), j=0; it2!=states.end(); it2++, j++)
{
- QString tmp = config->readEntry(*it2 + "Effect");
+ TQString tmp = config->readEntry(*it2 + "Effect");
if (tmp == _togray)
effect = ToGray;
else if (tmp == _colorize)
@@ -142,19 +142,19 @@ bool KIconEffect::hasEffect(int group, int state) const
return mEffect[group][state] != NoEffect;
}
-QString KIconEffect::fingerprint(int group, int state) const
+TQString KIconEffect::fingerprint(int group, int state) const
{
if ( group >= KIcon::LastGroup ) return "";
- QString cached = d->mKey[group][state];
+ TQString cached = d->mKey[group][state];
if (cached.isEmpty())
{
- QString tmp;
+ TQString tmp;
cached = tmp.setNum(mEffect[group][state]);
cached += ':';
cached += tmp.setNum(mValue[group][state]);
cached += ':';
- cached += mTrans[group][state] ? QString::fromLatin1("trans")
- : QString::fromLatin1("notrans");
+ cached += mTrans[group][state] ? TQString::fromLatin1("trans")
+ : TQString::fromLatin1("notrans");
if (mEffect[group][state] == Colorize || mEffect[group][state] == ToMonochrome)
{
cached += ':';
@@ -172,7 +172,7 @@ QString KIconEffect::fingerprint(int group, int state) const
return cached;
}
-QImage KIconEffect::apply(QImage image, int group, int state) const
+TQImage KIconEffect::apply(TQImage image, int group, int state) const
{
if (state >= KIcon::LastState)
{
@@ -188,12 +188,12 @@ QImage KIconEffect::apply(QImage image, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-QImage KIconEffect::apply(QImage image, int effect, float value, const QColor col, bool trans) const
+TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
{
return apply (image, effect, value, col, KGlobalSettings::baseColor(), trans);
}
-QImage KIconEffect::apply(QImage image, int effect, float value, const QColor col, const QColor col2, bool trans) const
+TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
{
if (effect >= LastEffect )
{
@@ -229,7 +229,7 @@ QImage KIconEffect::apply(QImage image, int effect, float value, const QColor co
return image;
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int group, int state) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
{
if (state >= KIcon::LastState)
{
@@ -245,16 +245,16 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
- const QColor col, bool trans) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+ const TQColor col, bool trans) const
{
return apply (pixmap, effect, value, col, KGlobalSettings::baseColor(), trans);
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
- const QColor col, const QColor col2, bool trans) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+ const TQColor col, const TQColor col2, bool trans) const
{
- QPixmap result;
+ TQPixmap result;
if (effect >= LastEffect )
{
@@ -269,7 +269,7 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
}
else if ( effect != NoEffect )
{
- QImage tmpImg = pixmap.convertToImage();
+ TQImage tmpImg = pixmap.convertToImage();
tmpImg = apply(tmpImg, effect, value, col, col2, trans);
result.convertFromImage(tmpImg);
}
@@ -282,7 +282,7 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
// Taken from KImageEffect. We don't want to link kdecore to kdeui! As long
// as this code is not too big, it doesn't seem much of a problem to me.
-void KIconEffect::toGray(QImage &img, float value)
+void KIconEffect::toGray(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -304,7 +304,7 @@ void KIconEffect::toGray(QImage &img, float value)
}
}
-void KIconEffect::colorize(QImage &img, const QColor &col, float value)
+void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -345,7 +345,7 @@ void KIconEffect::colorize(QImage &img, const QColor &col, float value)
}
}
-void KIconEffect::toMonochrome(QImage &img, const QColor &black, const QColor &white, float value) {
+void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
@@ -395,13 +395,13 @@ void KIconEffect::toMonochrome(QImage &img, const QColor &black, const QColor &w
}
}
-void KIconEffect::deSaturate(QImage &img, float value)
+void KIconEffect::deSaturate(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
- QColor color;
+ TQColor color;
int h, s, v, i;
for (i=0; i<pixels; i++)
{
@@ -413,13 +413,13 @@ void KIconEffect::deSaturate(QImage &img, float value)
}
}
-void KIconEffect::toGamma(QImage &img, float value)
+void KIconEffect::toGamma(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
- QColor color;
+ TQColor color;
int i, rval, gval, bval;
float gamma;
gamma = 1/(2*value+0.5);
@@ -435,7 +435,7 @@ void KIconEffect::toGamma(QImage &img, float value)
}
}
-void KIconEffect::semiTransparent(QImage &img)
+void KIconEffect::semiTransparent(TQImage &img)
{
img.setAlphaBuffer(true);
@@ -509,22 +509,22 @@ void KIconEffect::semiTransparent(QImage &img)
}
}
-void KIconEffect::semiTransparent(QPixmap &pix)
+void KIconEffect::semiTransparent(TQPixmap &pix)
{
if ( qt_use_xrender && qt_has_xft )
{
- QImage img=pix.convertToImage();
+ TQImage img=pix.convertToImage();
semiTransparent(img);
pix.convertFromImage(img);
return;
}
- QImage img;
+ TQImage img;
if (pix.mask() != 0L)
img = pix.mask()->convertToImage();
else
{
- img.create(pix.size(), 1, 2, QImage::BigEndian);
+ img.create(pix.size(), 1, 2, TQImage::BigEndian);
img.fill(1);
}
@@ -535,14 +535,14 @@ void KIconEffect::semiTransparent(QPixmap &pix)
for (int x=0; x<(img.width()+31)/32; x++)
line[x] &= pattern;
}
- QBitmap mask;
+ TQBitmap mask;
mask.convertFromImage(img);
pix.setMask(mask);
}
-QImage KIconEffect::doublePixels(QImage src) const
+TQImage KIconEffect::doublePixels(TQImage src) const
{
- QImage dst;
+ TQImage dst;
if (src.depth() == 1)
{
kdDebug(265) << "image depth 1 not supported\n";
@@ -589,7 +589,7 @@ QImage KIconEffect::doublePixels(QImage src) const
return dst;
}
-void KIconEffect::overlay(QImage &src, QImage &overlay)
+void KIconEffect::overlay(TQImage &src, TQImage &overlay)
{
if (src.depth() != overlay.depth())
{
@@ -704,7 +704,7 @@ void KIconEffect::overlay(QImage &src, QImage &overlay)
}
void
-KIconEffect::visualActivate(QWidget * widget, QRect rect)
+KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{
if (!KGlobalSettings::visualActivate())
return;
@@ -738,12 +738,12 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect)
//kdDebug() << "actCount=" << actCount << " actDelay=" << actDelay << endl;
- QPoint c = rect.center();
+ TQPoint c = rect.center();
- QPainter p(widget);
+ TQPainter p(widget);
// Use NotROP to avoid having to repaint the pixmap each time.
- p.setPen(QPen(Qt::black, 2, Qt::DotLine));
+ p.setPen(TQPen(Qt::black, 2, Qt::DotLine));
p.setRasterOp(Qt::NotROP);
// The spacing between the rects we draw.
@@ -772,7 +772,7 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect)
}
void
-KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
+KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{
if (!KGlobalSettings::visualActivate())
return;
@@ -811,8 +811,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
unsigned int deltaX = rect.width() / actCount * 1.5;
unsigned int deltaY = rect.height() / actCount * 1.5;
- QPoint c = rect.center();
- QRect maxRect(c.x() - (actCount * 2) * deltaX /2,
+ TQPoint c = rect.center();
+ TQRect maxRect(c.x() - (actCount * 2) * deltaX /2,
c.y() - (actCount * 2) * deltaY /2,
actCount * 2 * deltaX,
actCount * 2 * deltaY);
@@ -821,7 +821,7 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
if ((widget->rect().width() <= maxRect.width())
|| (widget->rect().height() <= maxRect.height()))
{
- QPoint topLeft(rect.x(), rect.y());
+ TQPoint topLeft(rect.x(), rect.y());
rect.moveLeft(widget->mapToGlobal(topLeft).x());
rect.moveTop(widget->mapToGlobal(topLeft).y());
c = rect.center();
@@ -831,12 +831,12 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
actCount * 2 * deltaY);
}
- QPainter *p;
- QImage img = pixmap->convertToImage();
- QPixmap pix;
- QPixmap composite(maxRect.width(), maxRect.height(), -1, QPixmap::BestOptim);
- QPainter cPainter(&composite);
- QPoint cComposite = composite.rect().center();
+ TQPainter *p;
+ TQImage img = pixmap->convertToImage();
+ TQPixmap pix;
+ TQPixmap composite(maxRect.width(), maxRect.height(), -1, TQPixmap::BestOptim);
+ TQPainter cPainter(&composite);
+ TQPoint cComposite = composite.rect().center();
// enable alpha blending
img.setAlphaBuffer(true);
@@ -846,8 +846,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
if ((widget->rect().width() <= maxRect.width())
|| (widget->rect().height() <= maxRect.height()))
{
- p = new QPainter(QApplication::desktop()->screen( -1 ), TRUE);
- pix = QPixmap::grabWindow((QApplication::desktop()->screen( -1 ))->winId(),
+ p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE);
+ pix = TQPixmap::grabWindow((TQApplication::desktop()->screen( -1 ))->winId(),
maxRect.x(),
maxRect.y(),
maxRect.width(),
@@ -855,8 +855,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
} else
{
// not as ugly as drawing directly to the screen
- p = new QPainter(widget);
- pix = QPixmap::grabWidget(widget,
+ p = new TQPainter(widget);
+ pix = TQPixmap::grabWidget(widget,
maxRect.x(),
maxRect.y(),
maxRect.width(),
diff --git a/kdecore/kiconeffect.h b/kdecore/kiconeffect.h
index de698f4ab..c0eba9c69 100644
--- a/kdecore/kiconeffect.h
+++ b/kdecore/kiconeffect.h
@@ -13,10 +13,10 @@
#ifndef __KIconEffect_h_Included__
#define __KIconEffect_h_Included__
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include "kdelibs_export.h"
class QWidget;
@@ -74,13 +74,13 @@ public:
/**
* Returns a fingerprint for the effect by encoding
- * the given @p group and @p state into a QString. This
+ * the given @p group and @p state into a TQString. This
* is useful for caching.
* @param group the group, see KIcon::Group
* @param state the state, see KIcon::States
* @return the fingerprint of the given @p group+@p state
*/
- QString fingerprint(int group, int state) const;
+ TQString fingerprint(int group, int state) const;
/**
* Applies an effect to an image. The effect to apply depends on the
@@ -90,7 +90,7 @@ public:
* @param state The icon's state, see KIcon::States
* @return An image with the effect applied.
*/
- QImage apply(QImage src, int group, int state) const;
+ TQImage apply(TQImage src, int group, int state) const;
/**
* Applies an effect to an image.
@@ -102,11 +102,11 @@ public:
* @return An image with the effect applied.
*/
// KDE4: make them references
- QImage apply(QImage src, int effect, float value, const QColor rgb, bool trans) const;
+ TQImage apply(TQImage src, int effect, float value, const TQColor rgb, bool trans) const;
/**
* @since 3.4
*/
- QImage apply(QImage src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
+ TQImage apply(TQImage src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
/**
* Applies an effect to a pixmap.
@@ -115,7 +115,7 @@ public:
* @param state The icon's state, see KIcon::States
* @return A pixmap with the effect applied.
*/
- QPixmap apply(QPixmap src, int group, int state) const;
+ TQPixmap apply(TQPixmap src, int group, int state) const;
/**
* Applies an effect to a pixmap.
@@ -126,18 +126,18 @@ public:
* @param trans Add Transparency if trans = true.
* @return A pixmap with the effect applied.
*/
- QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, bool trans) const;
+ TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, bool trans) const;
/**
* @since 3.4
*/
- QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
+ TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
/**
* Returns an image twice as large, consisting of 2x2 pixels.
* @param src the image.
* @return the scaled image.
*/
- QImage doublePixels(QImage src) const;
+ TQImage doublePixels(TQImage src) const;
/**
* Provides visual feedback to show activation of an icon on a widget.
@@ -151,8 +151,8 @@ public:
* @param widget The widget on which the effect should be painted
* @param rect This rectangle defines the effect's borders
*/
- static void visualActivate(QWidget *widget, QRect rect);
- static void visualActivate(QWidget *widget, QRect rect, QPixmap *pixmap);
+ static void visualActivate(TQWidget *widget, TQRect rect);
+ static void visualActivate(TQWidget *widget, TQRect rect, TQPixmap *pixmap);
/**
* Tints an image gray.
@@ -160,7 +160,7 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void toGray(QImage &image, float value);
+ static void toGray(TQImage &image, float value);
/**
* Colorizes an image with a specific color.
@@ -169,7 +169,7 @@ public:
* @param col The color with which the @p image is tinted
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void colorize(QImage &image, const QColor &col, float value);
+ static void colorize(TQImage &image, const TQColor &col, float value);
/**
* Produces a monochrome icon with a given foreground and background color
@@ -180,7 +180,7 @@ public:
* @param value Strength of the effect. 0 <= @p value <= 1
* @since 3.4
*/
- static void toMonochrome(QImage &image, const QColor &black, const QColor &white, float value);
+ static void toMonochrome(TQImage &image, const TQColor &black, const TQColor &white, float value);
/**
* Desaturates an image.
@@ -188,7 +188,7 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void deSaturate(QImage &image, float value);
+ static void deSaturate(TQImage &image, float value);
/**
* Changes the gamma value of an image.
@@ -196,21 +196,21 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void toGamma(QImage &image, float value);
+ static void toGamma(TQImage &image, float value);
/**
* Renders an image semi-transparent.
*
* @param image The image
*/
- static void semiTransparent(QImage &image);
+ static void semiTransparent(TQImage &image);
/**
* Renders a pixmap semi-transparent.
*
* @param pixmap The pixmap
*/
- static void semiTransparent(QPixmap &pixmap);
+ static void semiTransparent(TQPixmap &pixmap);
/**
* Overlays an image with an other image.
@@ -218,12 +218,12 @@ public:
* @param src The image
* @param overlay The image to overlay @p src with
*/
- static void overlay(QImage &src, QImage &overlay);
+ static void overlay(TQImage &src, TQImage &overlay);
private:
int mEffect[6][3];
float mValue[6][3];
- QColor mColor[6][3];
+ TQColor mColor[6][3];
bool mTrans[6][3];
KIconEffectPrivate *d;
};
diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp
index 3c2a7be40..6ff13f879 100644
--- a/kdecore/kiconloader.cpp
+++ b/kdecore/kiconloader.cpp
@@ -13,18 +13,18 @@
* kiconloader.cpp: An icon loader for KDE with theming functionality.
*/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qintdict.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qiconset.h>
-#include <qmovie.h>
-#include <qbitmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqintdict.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqiconset.h>
+#include <tqmovie.h>
+#include <tqbitmap.h>
#include <kapplication.h>
#include <kipc.h>
@@ -65,7 +65,7 @@ KIconThemeNode::~KIconThemeNode()
delete theme;
}
-void KIconThemeNode::printTree(QString& dbgString) const
+void KIconThemeNode::printTree(TQString& dbgString) const
{
/* This method doesn't have much sense anymore, so maybe it should
be removed in the (near?) future */
@@ -74,21 +74,21 @@ void KIconThemeNode::printTree(QString& dbgString) const
dbgString += ")";
}
-void KIconThemeNode::queryIcons(QStringList *result,
+void KIconThemeNode::queryIcons(TQStringList *result,
int size, KIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIcons(size, context);
}
-void KIconThemeNode::queryIconsByContext(QStringList *result,
+void KIconThemeNode::queryIconsByContext(TQStringList *result,
int size, KIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIconsByContext(size, context);
}
-KIcon KIconThemeNode::findIcon(const QString& name, int size,
+KIcon KIconThemeNode::findIcon(const TQString& name, int size,
KIcon::MatchType match) const
{
return theme->iconPath(name, size, match);
@@ -110,29 +110,29 @@ struct KIconGroup
// to detect bugs like #68528.
struct KIconLoaderDebug
{
- KIconLoaderDebug( KIconLoader* l, const QString& a )
+ KIconLoaderDebug( KIconLoader* l, const TQString& a )
: loader( l ), appname( a ), valid( true )
{}
- KIconLoaderDebug() {}; // this QValueList feature annoys me
+ KIconLoaderDebug() {}; // this TQValueList feature annoys me
KIconLoader* loader;
- QString appname;
+ TQString appname;
bool valid;
- QString delete_bt;
+ TQString delete_bt;
};
-static QValueList< KIconLoaderDebug > *kiconloaders;
+static TQValueList< KIconLoaderDebug > *kiconloaders;
#endif
/*** KIconLoader: the icon loader ***/
-KIconLoader::KIconLoader(const QString& _appname, KStandardDirs *_dirs)
+KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
{
#ifdef KICONLOADER_CHECKS
if( kiconloaders == NULL )
- kiconloaders = new QValueList< KIconLoaderDebug>();
+ kiconloaders = new TQValueList< KIconLoaderDebug>();
// check for the (very unlikely case) that new KIconLoader gets allocated
// at exactly same address like some previous one
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
)
{
@@ -151,25 +151,25 @@ KIconLoader::KIconLoader(const QString& _appname, KStandardDirs *_dirs)
if (kapp) {
kapp->addKipcEventMask(KIPC::IconChanged);
- QObject::connect(kapp, SIGNAL(updateIconLoaders()), d, SLOT(reconfigure()));
+ TQObject::connect(kapp, TQT_SIGNAL(updateIconLoaders()), d, TQT_SLOT(reconfigure()));
}
init( _appname, _dirs );
}
-void KIconLoader::reconfigure( const QString& _appname, KStandardDirs *_dirs )
+void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs )
{
d->links.clear();
d->imgDict.clear();
d->mThemesInTree.clear();
d->lastImage.reset();
- d->lastImageKey = QString::null;
+ d->lastImageKey = TQString::null;
delete [] d->mpGroups;
init( _appname, _dirs );
}
-void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
+void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
{
// If this is unequal to 0, the iconloader is initialized
// successfully.
@@ -184,7 +184,7 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
else
d->mpDirs = KGlobal::dirs();
- QString appname = _appname;
+ TQString appname = _appname;
if (appname.isEmpty())
appname = KGlobal::instance()->instanceName();
@@ -221,10 +221,10 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
{
if (groups[i] == 0L)
break;
- config->setGroup(QString::fromLatin1(groups[i]) + "Icons");
+ config->setGroup(TQString::fromLatin1(groups[i]) + "Icons");
d->mpGroups[i].size = config->readNumEntry("Size", 0);
d->mpGroups[i].dblPixels = config->readBoolEntry("DoublePixels", false);
- if (QPixmap::defaultDepth()>8)
+ if (TQPixmap::defaultDepth()>8)
d->mpGroups[i].alphaBlending = config->readBoolEntry("AlphaBlending", true);
else
d->mpGroups[i].alphaBlending = false;
@@ -241,18 +241,18 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
appname + "/toolbar/");
// Add legacy icon dirs.
- QStringList dirs;
+ TQStringList dirs;
dirs += d->mpDirs->resourceDirs("icon");
dirs += d->mpDirs->resourceDirs("pixmap");
dirs += d->mpDirs->resourceDirs("xdgdata-icon");
dirs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
dirs += d->mpDirs->resourceDirs("xdgdata-pixmap");
- for (QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it)
+ for (TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it)
d->mpDirs->addResourceDir("appicon", *it);
#ifndef NDEBUG
- QString dbgString = "Theme tree: ";
+ TQString dbgString = "Theme tree: ";
d->mpThemeRoot->printTree(dbgString);
kdDebug(264) << dbgString << endl;
#endif
@@ -261,7 +261,7 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
KIconLoader::~KIconLoader()
{
#ifdef KICONLOADER_CHECKS
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -290,7 +290,7 @@ bool KIconLoader::isDelayedIconSetLoadingEnabled() const
return d->delayedLoading;
}
-void KIconLoader::addAppDir(const QString& appname)
+void KIconLoader::addAppDir(const TQString& appname)
{
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
appname + "/pics/");
@@ -300,7 +300,7 @@ void KIconLoader::addAppDir(const QString& appname)
addAppThemes(appname);
}
-void KIconLoader::addAppThemes(const QString& appname)
+void KIconLoader::addAppThemes(const TQString& appname)
{
if ( KIconTheme::current() != KIconTheme::defaultThemeName() )
{
@@ -321,10 +321,10 @@ void KIconLoader::addAppThemes(const QString& appname)
addBaseThemes(node, appname);
}
-void KIconLoader::addBaseThemes(KIconThemeNode *node, const QString &appname)
+void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname)
{
- QStringList lst = node->theme->inherits();
- QStringList::ConstIterator it;
+ TQStringList lst = node->theme->inherits();
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
{
@@ -346,29 +346,29 @@ void KIconLoader::addExtraDesktopThemes()
{
if ( d->extraDesktopIconsLoaded ) return;
- QStringList list;
- QStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
- QStringList::ConstIterator it;
+ TQStringList list;
+ TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::ConstIterator it;
char buf[1000];
int r;
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
- QDir dir(*it);
+ TQDir dir(*it);
if (!dir.exists())
continue;
- QStringList lst = dir.entryList("default.*", QDir::Dirs);
- QStringList::ConstIterator it2;
+ TQStringList lst = dir.entryList("default.*", TQDir::Dirs);
+ TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if (!KStandardDirs::exists(*it + *it2 + "/index.desktop")
&& !KStandardDirs::exists(*it + *it2 + "/index.theme"))
continue;
- r=readlink( QFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
+ r=readlink( TQFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
if ( r>0 )
{
buf[r]=0;
- QDir dir2( buf );
- QString themeName=dir2.dirName();
+ TQDir dir2( buf );
+ TQString themeName=dir2.dirName();
if (!list.contains(themeName))
list.append(themeName);
@@ -380,7 +380,7 @@ void KIconLoader::addExtraDesktopThemes()
{
if ( d->mThemesInTree.contains(*it) )
continue;
- if ( *it == QString("default.kde") ) continue;
+ if ( *it == TQString("default.kde") ) continue;
KIconTheme *def = new KIconTheme( *it, "" );
KIconThemeNode* node = new KIconThemeNode(def);
@@ -398,21 +398,21 @@ bool KIconLoader::extraDesktopThemesAdded() const
return d->extraDesktopIconsLoaded;
}
-QString KIconLoader::removeIconExtension(const QString &name) const
+TQString KIconLoader::removeIconExtension(const TQString &name) const
{
int extensionLength=0;
- QString ext = name.right(4);
+ TQString ext = name.right(4);
- static const QString &png_ext = KGlobal::staticQString(".png");
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
if (ext == png_ext || ext == xpm_ext)
extensionLength=4;
#ifdef HAVE_LIBART
else
{
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
if (name.right(5) == svgz_ext)
extensionLength=5;
@@ -428,9 +428,9 @@ QString KIconLoader::removeIconExtension(const QString &name) const
return name;
}
-QString KIconLoader::removeIconExtensionInternal(const QString &name) const
+TQString KIconLoader::removeIconExtensionInternal(const TQString &name) const
{
- QString name_noext = removeIconExtension(name);
+ TQString name_noext = removeIconExtension(name);
#ifndef NDEBUG
if (name != name_noext)
@@ -443,21 +443,21 @@ QString KIconLoader::removeIconExtensionInternal(const QString &name) const
return name_noext;
}
-KIcon KIconLoader::findMatchingIcon(const QString& name, int size) const
+KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const
{
KIcon icon;
- const QString *ext[4];
+ const TQString *ext[4];
int count=0;
- static const QString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
ext[count++]=&png_ext;
#ifdef HAVE_LIBART
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
ext[count++]=&svgz_ext;
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
ext[count++]=&svg_ext;
#endif
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
ext[count++]=&xpm_ext;
/* JRT: To follow the XDG spec, the order in which we look for an
@@ -491,43 +491,43 @@ KIcon KIconLoader::findMatchingIcon(const QString& name, int size) const
return icon;
}
-inline QString KIconLoader::unknownIconPath( int size ) const
+inline TQString KIconLoader::unknownIconPath( int size ) const
{
- static const QString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = KGlobal::staticQString("unknown");
KIcon icon = findMatchingIcon(str_unknown, size);
if (!icon.isValid())
{
kdDebug(264) << "Warning: could not find \"Unknown\" icon for size = "
<< size << endl;
- return QString::null;
+ return TQString::null;
}
return icon.path;
}
// Finds the absolute path to an icon.
-QString KIconLoader::iconPath(const QString& _name, int group_or_size,
+TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
bool canReturnNull) const
{
if (d->mpThemeRoot == 0L)
- return QString::null;
+ return TQString::null;
- if (!QDir::isRelativePath(_name))
+ if (!TQDir::isRelativePath(_name))
return _name;
- QString name = removeIconExtensionInternal( _name );
+ TQString name = removeIconExtensionInternal( _name );
- QString path;
+ TQString path;
if (group_or_size == KIcon::User)
{
- static const QString &png_ext = KGlobal::staticQString(".png");
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
path = d->mpDirs->findResource("appicon", name + png_ext);
#ifdef HAVE_LIBART
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
if (path.isEmpty())
path = d->mpDirs->findResource("appicon", name + svgz_ext);
if (path.isEmpty())
@@ -552,7 +552,7 @@ QString KIconLoader::iconPath(const QString& _name, int group_or_size,
if (_name.isEmpty()) {
if (canReturnNull)
- return QString::null;
+ return TQString::null;
else
return unknownIconPath(size);
}
@@ -567,19 +567,19 @@ QString KIconLoader::iconPath(const QString& _name, int group_or_size,
return path;
if (canReturnNull)
- return QString::null;
+ return TQString::null;
else
return unknownIconPath(size);
}
return icon.path;
}
-QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size,
- int state, QString *path_store, bool canReturnNull) const
+TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int size,
+ int state, TQString *path_store, bool canReturnNull) const
{
- QString name = _name;
- QPixmap pix;
- QString key;
+ TQString name = _name;
+ TQPixmap pix;
+ TQString key;
bool absolutePath=false, favIconOverlay=false;
if (d->mpThemeRoot == 0L)
@@ -591,21 +591,21 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
favIconOverlay = true;
name = locateLocal("cache", name+".png");
}
- if (!QDir::isRelativePath(name)) absolutePath=true;
+ if (!TQDir::isRelativePath(name)) absolutePath=true;
- static const QString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = KGlobal::staticQString("unknown");
// Special case for "User" icons.
if (group == KIcon::User)
{
key = "$kicou_";
- key += QString::number(size); key += '_';
+ key += TQString::number(size); key += '_';
key += name;
- bool inCache = QPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::find(key, pix);
if (inCache && (path_store == 0L))
return pix;
- QString path = (absolutePath) ? name :
+ TQString path = (absolutePath) ? name :
iconPath(name, KIcon::User, canReturnNull);
if (path.isEmpty())
{
@@ -624,12 +624,12 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
*path_store = path;
if (inCache)
return pix;
- QImage img(path);
+ TQImage img(path);
if (size != 0)
img=img.smoothScale(size,size);
pix.convertFromImage(img);
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
@@ -674,28 +674,28 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
key = "$kico_";
key += name; key += '_';
- key += QString::number(size); key += '_';
+ key += TQString::number(size); key += '_';
- QString overlayStr = QString::number( overlay );
+ TQString overlayStr = TQString::number( overlay );
- QString noEffectKey = key + '_' + overlayStr;
+ TQString noEffectKey = key + '_' + overlayStr;
if (group >= 0)
{
key += d->mpEffect.fingerprint(group, state);
if (d->mpGroups[group].dblPixels)
- key += QString::fromLatin1(":dblsize");
+ key += TQString::fromLatin1(":dblsize");
} else
- key += QString::fromLatin1("noeffect");
+ key += TQString::fromLatin1("noeffect");
key += '_';
key += overlayStr;
// Is the icon in the cache?
- bool inCache = QPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::find(key, pix);
if (inCache && (path_store == 0L))
return pix;
- QImage *img = 0;
+ TQImage *img = 0;
int iconType;
int iconThreshold;
@@ -713,7 +713,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
else
{
if (!name.isEmpty())
- icon = findMatchingIcon(favIconOverlay ? QString("www") : name, size);
+ icon = findMatchingIcon(favIconOverlay ? TQString("www") : name, size);
if (!icon.isValid())
{
@@ -721,7 +721,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if (!name.isEmpty())
pix = loadIcon(name, KIcon::User, size, state, path_store, true);
if (!pix.isNull() || canReturnNull) {
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
@@ -742,10 +742,10 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
return pix;
// Use the extension as the format. Works for XPM and PNG, but not for SVG
- QString ext = icon.path.right(3).upper();
+ TQString ext = icon.path.right(3).upper();
if(ext != "SVG" && ext != "VGZ")
{
- img = new QImage(icon.path, ext.latin1());
+ img = new TQImage(icon.path, ext.latin1());
if (img->isNull()) {
delete img;
return pix;
@@ -760,7 +760,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if(svgEngine->load(size, size, icon.path))
img = svgEngine->painter()->image();
else
- img = new QImage();
+ img = new TQImage();
delete svgEngine;
}
@@ -776,7 +776,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
}
else
{
- img = new QImage( d->lastImage.copy() );
+ img = new TQImage( d->lastImage.copy() );
iconType = d->lastIconType;
iconThreshold = d->lastIconThreshold;
}
@@ -784,7 +784,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
// Blend in all overlays
if (overlay)
{
- QImage *ovl;
+ TQImage *ovl;
KIconTheme *theme = d->mpThemeRoot->theme;
if ((overlay & KIcon::LockOverlay) &&
((ovl = loadOverlay(theme->lockOverlay(), size)) != 0L))
@@ -832,7 +832,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if (favIconOverlay)
{
- QImage favIcon(name, "PNG");
+ TQImage favIcon(name, "PNG");
int x = img->width() - favIcon.width() - 1,
y = img->height() - favIcon.height() - 1;
if( favIcon.depth() != 32 )
@@ -859,14 +859,14 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
delete img;
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
-QImage *KIconLoader::loadOverlay(const QString &name, int size) const
+TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const
{
- QString key = name + '_' + QString::number(size);
- QImage *image = d->imgDict.find(key);
+ TQString key = name + '_' + TQString::number(size);
+ TQImage *image = d->imgDict.find(key);
if (image != 0L)
return image;
@@ -876,7 +876,7 @@ QImage *KIconLoader::loadOverlay(const QString &name, int size) const
kdDebug(264) << "Overlay " << name << "not found." << endl;
return 0L;
}
- image = new QImage(icon.path);
+ image = new TQImage(icon.path);
// In some cases (since size in findMatchingIcon() is more a hint than a
// constraint) image->size can be != size. If so perform rescaling.
if ( size != image->width() )
@@ -887,21 +887,21 @@ QImage *KIconLoader::loadOverlay(const QString &name, int size) const
-QMovie KIconLoader::loadMovie(const QString& name, KIcon::Group group, int size) const
+TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int size) const
{
- QString file = moviePath( name, group, size );
+ TQString file = moviePath( name, group, size );
if (file.isEmpty())
- return QMovie();
+ return TQMovie();
int dirLen = file.findRev('/');
- QString icon = iconPath(name, size ? -size : group, true);
+ TQString icon = iconPath(name, size ? -size : group, true);
if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen))
- return QMovie();
- return QMovie(file);
+ return TQMovie();
+ return TQMovie(file);
}
-QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size) const
+TQString KIconLoader::moviePath(const TQString& name, KIcon::Group group, int size) const
{
- if (!d->mpGroups) return QString::null;
+ if (!d->mpGroups) return TQString::null;
if ( (group < -1 || group >= KIcon::LastGroup) && group != KIcon::User )
{
@@ -914,7 +914,7 @@ QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size
group = KIcon::Desktop;
}
- QString file = name + ".mng";
+ TQString file = name + ".mng";
if (group == KIcon::User)
{
file = d->mpDirs->findResource("appicon", file);
@@ -937,15 +937,15 @@ QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size
}
icon_found:
- file = icon.isValid() ? icon.path : QString::null;
+ file = icon.isValid() ? icon.path : TQString::null;
}
return file;
}
-QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, int size) const
+TQStringList KIconLoader::loadAnimated(const TQString& name, KIcon::Group group, int size) const
{
- QStringList lst;
+ TQStringList lst;
if (!d->mpGroups) return lst;
@@ -960,7 +960,7 @@ QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, i
group = KIcon::Desktop;
}
- QString file = name + "/0001";
+ TQString file = name + "/0001";
if (group == KIcon::User)
{
file = d->mpDirs->findResource("appicon", file + ".png");
@@ -969,21 +969,21 @@ QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, i
if (size == 0)
size = d->mpGroups[group].size;
KIcon icon = findMatchingIcon(file, size);
- file = icon.isValid() ? icon.path : QString::null;
+ file = icon.isValid() ? icon.path : TQString::null;
}
if (file.isEmpty())
return lst;
- QString path = file.left(file.length()-8);
- DIR* dp = opendir( QFile::encodeName(path) );
+ TQString path = file.left(file.length()-8);
+ DIR* dp = opendir( TQFile::encodeName(path) );
if(!dp)
return lst;
struct dirent* ep;
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn(QFile::decodeName(ep->d_name));
+ TQString fn(TQFile::decodeName(ep->d_name));
if(!(fn.left(4)).toUInt())
continue;
@@ -1012,21 +1012,21 @@ int KIconLoader::currentSize(KIcon::Group group) const
return d->mpGroups[group].size;
}
-QStringList KIconLoader::queryIconsByDir( const QString& iconsDir ) const
+TQStringList KIconLoader::queryIconsByDir( const TQString& iconsDir ) const
{
- QDir dir(iconsDir);
- QStringList lst = dir.entryList("*.png;*.xpm", QDir::Files);
- QStringList result;
- QStringList::ConstIterator it;
+ TQDir dir(iconsDir);
+ TQStringList lst = dir.entryList("*.png;*.xpm", TQDir::Files);
+ TQStringList result;
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
result += iconsDir + "/" + *it;
return result;
}
-QStringList KIconLoader::queryIconsByContext(int group_or_size,
+TQStringList KIconLoader::queryIconsByContext(int group_or_size,
KIcon::Context context) const
{
- QStringList result;
+ TQStringList result;
if (group_or_size >= KIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
@@ -1043,9 +1043,9 @@ QStringList KIconLoader::queryIconsByContext(int group_or_size,
themeNode->queryIconsByContext(&result, size, context);
// Eliminate duplicate entries (same icon in different directories)
- QString name;
- QStringList res2, entries;
- QStringList::ConstIterator it;
+ TQString name;
+ TQStringList res2, entries;
+ TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
int n = (*it).findRev('/');
@@ -1064,9 +1064,9 @@ QStringList KIconLoader::queryIconsByContext(int group_or_size,
}
-QStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) const
+TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) const
{
- QStringList result;
+ TQStringList result;
if (group_or_size >= KIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
@@ -1083,9 +1083,9 @@ QStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) c
themeNode->queryIcons(&result, size, context);
// Eliminate duplicate entries (same icon in different directories)
- QString name;
- QStringList res2, entries;
- QStringList::ConstIterator it;
+ TQString name;
+ TQStringList res2, entries;
+ TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
int n = (*it).findRev('/');
@@ -1130,29 +1130,29 @@ bool KIconLoader::alphaBlending(KIcon::Group group) const
return d->mpGroups[group].alphaBlending;
}
-QIconSet KIconLoader::loadIconSet(const QString& name, KIcon::Group group, int size, bool canReturnNull)
+TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size, bool canReturnNull)
{
return loadIconSet( name, group, size, canReturnNull, true );
}
-QIconSet KIconLoader::loadIconSet(const QString& name, KIcon::Group group, int size)
+TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size)
{
return loadIconSet( name, group, size, false );
}
-/*** class for delayed icon loading for QIconSet ***/
+/*** class for delayed icon loading for TQIconSet ***/
class KIconFactory
: public QIconFactory
{
public:
- KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+ KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P );
- KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+ KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P, bool canReturnNull );
- virtual QPixmap* createPixmap( const QIconSet&, QIconSet::Size, QIconSet::Mode, QIconSet::State );
+ virtual TQPixmap* createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode, TQIconSet::State );
private:
- QString iconName;
+ TQString iconName;
KIcon::Group group;
int size;
KIconLoader* loader;
@@ -1160,7 +1160,7 @@ class KIconFactory
};
-QIconSet KIconLoader::loadIconSet( const QString& name, KIcon::Group g, int s,
+TQIconSet KIconLoader::loadIconSet( const TQString& name, KIcon::Group g, int s,
bool canReturnNull, bool immediateExistenceCheck)
{
if ( !d->delayedLoading )
@@ -1174,39 +1174,39 @@ QIconSet KIconLoader::loadIconSet( const QString& name, KIcon::Group g, int s,
if(canReturnNull && immediateExistenceCheck)
{ // we need to find out if the icon actually exists
- QPixmap pm = loadIcon( name, g, s, KIcon::DefaultState, NULL, true );
+ TQPixmap pm = loadIcon( name, g, s, KIcon::DefaultState, NULL, true );
if( pm.isNull())
- return QIconSet();
+ return TQIconSet();
- QIconSet ret( pm );
+ TQIconSet ret( pm );
ret.installIconFactory( new KIconFactory( name, g, s, this ));
return ret;
}
- QIconSet ret;
+ TQIconSet ret;
ret.installIconFactory( new KIconFactory( name, g, s, this, canReturnNull ));
return ret;
}
-QIconSet KIconLoader::loadIconSetNonDelayed( const QString& name,
+TQIconSet KIconLoader::loadIconSetNonDelayed( const TQString& name,
KIcon::Group g,
int s, bool canReturnNull )
{
- QIconSet iconset;
- QPixmap tmp = loadIcon(name, g, s, KIcon::ActiveState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Active );
+ TQIconSet iconset;
+ TQPixmap tmp = loadIcon(name, g, s, KIcon::ActiveState, NULL, canReturnNull);
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Active );
// we don't use QIconSet's resizing anyway
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Active );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Active );
tmp = loadIcon(name, g, s, KIcon::DisabledState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Disabled );
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Disabled );
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Disabled );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Disabled );
tmp = loadIcon(name, g, s, KIcon::DefaultState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Normal );
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Normal );
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Normal );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Normal );
return iconset;
}
-KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P )
: iconName( iconName_P ), group( group_P ), size( size_P ), loader( loader_P )
{
@@ -1214,7 +1214,7 @@ KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
setAutoDelete( true );
}
-KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P, bool canReturnNull_P )
: iconName( iconName_P ), group( group_P ), size( size_P ),
loader( loader_P ), canReturnNull( canReturnNull_P)
@@ -1222,11 +1222,11 @@ KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
setAutoDelete( true );
}
-QPixmap* KIconFactory::createPixmap( const QIconSet&, QIconSet::Size, QIconSet::Mode mode_P, QIconSet::State )
+TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode mode_P, TQIconSet::State )
{
#ifdef KICONLOADER_CHECKS
bool found = false;
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -1266,109 +1266,109 @@ QPixmap* KIconFactory::createPixmap( const QIconSet&, QIconSet::Size, QIconSet::
#endif
}
#endif
- // QIconSet::Mode to KIcon::State conversion
+ // TQIconSet::Mode to KIcon::State conversion
static const KIcon::States tbl[] = { KIcon::DefaultState, KIcon::DisabledState, KIcon::ActiveState };
int state = KIcon::DefaultState;
- if( mode_P <= QIconSet::Active )
+ if( mode_P <= TQIconSet::Active )
state = tbl[ mode_P ];
if( group >= 0 && state == KIcon::ActiveState )
{ // active and normal icon are usually the same
if( loader->iconEffect()->fingerprint(group, KIcon::ActiveState )
== loader->iconEffect()->fingerprint(group, KIcon::DefaultState ))
- return 0; // so let QIconSet simply duplicate it
+ return 0; // so let TQIconSet simply duplicate it
}
// ignore passed size
// ignore passed state (i.e. on/off)
- QPixmap pm = loader->loadIcon( iconName, group, size, state, 0, canReturnNull );
- return new QPixmap( pm );
+ TQPixmap pm = loader->loadIcon( iconName, group, size, state, 0, canReturnNull );
+ return new TQPixmap( pm );
}
// Easy access functions
-QPixmap DesktopIcon(const QString& name, int force_size, int state,
+TQPixmap DesktopIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Desktop, force_size, state);
}
-QPixmap DesktopIcon(const QString& name, KInstance *instance)
+TQPixmap DesktopIcon(const TQString& name, KInstance *instance)
{
return DesktopIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet DesktopIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet DesktopIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Desktop, force_size );
}
-QPixmap BarIcon(const QString& name, int force_size, int state,
+TQPixmap BarIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Toolbar, force_size, state);
}
-QPixmap BarIcon(const QString& name, KInstance *instance)
+TQPixmap BarIcon(const TQString& name, KInstance *instance)
{
return BarIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet BarIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet BarIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Toolbar, force_size );
}
-QPixmap SmallIcon(const QString& name, int force_size, int state,
+TQPixmap SmallIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Small, force_size, state);
}
-QPixmap SmallIcon(const QString& name, KInstance *instance)
+TQPixmap SmallIcon(const TQString& name, KInstance *instance)
{
return SmallIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet SmallIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet SmallIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Small, force_size );
}
-QPixmap MainBarIcon(const QString& name, int force_size, int state,
+TQPixmap MainBarIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::MainToolbar, force_size, state);
}
-QPixmap MainBarIcon(const QString& name, KInstance *instance)
+TQPixmap MainBarIcon(const TQString& name, KInstance *instance)
{
return MainBarIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet MainBarIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet MainBarIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::MainToolbar, force_size );
}
-QPixmap UserIcon(const QString& name, int state, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, int state, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::User, 0, state);
}
-QPixmap UserIcon(const QString& name, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, KInstance *instance)
{
return UserIcon(name, KIcon::DefaultState, instance);
}
-QIconSet UserIconSet(const QString& name, KInstance *instance)
+TQIconSet UserIconSet(const TQString& name, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::User );
@@ -1380,13 +1380,13 @@ int IconSize(KIcon::Group group, KInstance *instance)
return loader->currentSize(group);
}
-QPixmap KIconLoader::unknown()
+TQPixmap KIconLoader::unknown()
{
- QPixmap pix;
- if ( QPixmapCache::find("unknown", pix) )
+ TQPixmap pix;
+ if ( TQPixmapCache::find("unknown", pix) )
return pix;
- QString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
+ TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
if (path.isEmpty())
{
kdDebug(264) << "Warning: Cannot find \"unknown\" icon." << endl;
@@ -1394,7 +1394,7 @@ QPixmap KIconLoader::unknown()
} else
{
pix.load(path);
- QPixmapCache::insert("unknown", pix);
+ TQPixmapCache::insert("unknown", pix);
}
return pix;
diff --git a/kdecore/kiconloader.h b/kdecore/kiconloader.h
index 7c445b962..f8ac3fbc7 100644
--- a/kdecore/kiconloader.h
+++ b/kdecore/kiconloader.h
@@ -12,16 +12,16 @@
#ifndef __KIconLoader_h_Included__
#define __KIconLoader_h_Included__
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qiconset.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
// Grmbl, X headers.....
#ifdef Status
#define KIconLoaderXStatus Status
#undef Status
#endif
-#include <qmovie.h>
+#include <tqmovie.h>
#ifdef KIconLoaderXStatus
#define Status int
#undef KIconLoaderXStatus
@@ -92,7 +92,7 @@ public:
* @see KGlobal::iconLoader()
* @see KInstance::iconLoader()
*/
- KIconLoader(const QString& appname=QString::null, KStandardDirs *dirs = 0);
+ KIconLoader(const TQString& appname=TQString::null, KStandardDirs *dirs = 0);
/**
* Cleanup
@@ -103,7 +103,7 @@ public:
* Adds @p appname to the list of application specific directories.
* @param appname The application name.
*/
- void addAppDir(const QString& appname);
+ void addAppDir(const TQString& appname);
/**
* Loads an icon. It will try very hard to find an icon which is
@@ -123,11 +123,11 @@ public:
* @param path_store If not null, the path of the icon is stored here.
* @param canReturnNull Can return a null pixmap? If false, the
* "unknown" pixmap is returned when no appropriate icon has been found.
- * @return the QPixmap. Can be null when not found, depending on
+ * @return the TQPixmap. Can be null when not found, depending on
* @p canReturnNull.
*/
- QPixmap loadIcon(const QString& name, KIcon::Group group, int size=0,
- int state=KIcon::DefaultState, QString *path_store=0L,
+ TQPixmap loadIcon(const TQString& name, KIcon::Group group, int size=0,
+ int state=KIcon::DefaultState, TQString *path_store=0L,
bool canReturnNull=false) const;
/**
@@ -148,10 +148,10 @@ public:
* @p canReturnNull.
* @since 3.5
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
bool canReturnNull, bool immediateExistenceCheck);
- // KDE4 merge as (const QString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -168,10 +168,10 @@ public:
* @p canReturnNull.
* @since 3.1
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
bool canReturnNull);
- // KDE4 merge as (const QString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -183,7 +183,7 @@ public:
* See KIcon::StdSizes.
* @return the icon set. Can be null when not found
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size=0);
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size=0);
/**
* Returns the path of an icon.
@@ -199,7 +199,7 @@ public:
* @return the path of an icon, can be null or the "unknown" icon when
* not found, depending on @p canReturnNull.
*/
- QString iconPath(const QString& name, int group_or_size,
+ TQString iconPath(const TQString& name, int group_or_size,
bool canReturnNull=false) const;
/**
@@ -208,9 +208,9 @@ public:
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
- * @return A QMovie object. Can be null if not found.
+ * @return A TQMovie object. Can be null if not found.
*/
- QMovie loadMovie(const QString& name, KIcon::Group group, int size=0) const;
+ TQMovie loadMovie(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Returns the path to an animated icon.
@@ -221,19 +221,19 @@ public:
* @return the full path to the movie, ready to be passed to QMovie's constructor.
* Empty string if not found.
*/
- QString moviePath(const QString& name, KIcon::Group group, int size=0) const;
+ TQString moviePath(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Loads an animated icon as a series of still frames. If you want to load
- * a .mng animation as QMovie instead, please use loadMovie() instead.
+ * a .mng animation as TQMovie instead, please use loadMovie() instead.
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
- * @return A QStringList containing the absolute path of all the frames
+ * @return A TQStringList containing the absolute path of all the frames
* making up the animation.
*/
- QStringList loadAnimated(const QString& name, KIcon::Group group, int size=0) const;
+ TQStringList loadAnimated(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Queries all available icons for a specific group, having a specific
@@ -245,7 +245,7 @@ public:
* @param context The icon context.
* @return a list of all icons
*/
- QStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
+ TQStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
/**
* Queries all available icons for a specific context.
@@ -255,10 +255,10 @@ public:
* negative numbers are negated sizes. See KIcon::Group and
* KIcon::StdSizes
* @param context The icon context.
- * @return A QStringList containing the icon names
+ * @return A TQStringList containing the icon names
* available for that context
*/
- QStringList queryIconsByContext(int group_or_size,
+ TQStringList queryIconsByContext(int group_or_size,
KIcon::Context context=KIcon::Any) const;
/**
@@ -270,10 +270,10 @@ public:
* Returns a list of all icons (*.png or *.xpm extension) in the
* given directory.
* @param iconsDir the directory to search in
- * @return A QStringList containing the icon paths
+ * @return A TQStringList containing the icon paths
* @since 3.1
*/
- QStringList queryIconsByDir( const QString& iconsDir ) const;
+ TQStringList queryIconsByDir( const TQString& iconsDir ) const;
/**
* Returns the current size of the group.
@@ -301,14 +301,14 @@ public:
* @param _dirs the new standard directories. If 0, the directories
* from KGlobal will be taken.
*/
- void reconfigure( const QString& _appname, KStandardDirs *_dirs );
+ void reconfigure( const TQString& _appname, KStandardDirs *_dirs );
/**
* Returns the unknown icon. An icon that is used when no other icon
* can be found.
* @return the unknown pixmap
*/
- static QPixmap unknown();
+ static TQPixmap unknown();
/**
* Checks whether the user wants to blend the icons with the background
@@ -334,7 +334,7 @@ public:
bool extraDesktopThemesAdded() const;
/**
- * Enables on-demand icon loading for QIconSets using QIconFactory.
+ * Enables on-demand icon loading for QIconSets using TQIconFactory.
* Icons loaded via loadIconSet() will be loaded as soon as they
* need to be displayed, not earlier.
*
@@ -355,7 +355,7 @@ public:
void enableDelayedIconSetLoading( bool enable );
/**
- * Checks whether delayed loading for QIconSet is enabled.
+ * Checks whether delayed loading for TQIconSet is enabled.
* @return whether icons for QIconSets will be loaded on demand.
* @see enableDelayedIconSetLoading()
* @see QIconFactory
@@ -368,40 +368,40 @@ public:
/**
* @internal
*/
- void init( const QString& _appname, KStandardDirs *_dirs );
+ void init( const TQString& _appname, KStandardDirs *_dirs );
/**
* @internal
* tries to find an icon with the name. It tries some extension and
* match strategies
*/
- KIcon findMatchingIcon(const QString& name, int size) const;
+ KIcon findMatchingIcon(const TQString& name, int size) const;
/**
* @internal
* Loads and caches an overlay.
*/
- QImage *loadOverlay(const QString& name, int size) const;
+ TQImage *loadOverlay(const TQString& name, int size) const;
/**
* @internal
* Adds themes installed in the application's directory.
**/
- void addAppThemes(const QString& appname);
+ void addAppThemes(const TQString& appname);
/**
* Adds all themes that are part of this node and the themes
* below (the fallbacks of the theme) in the tree.
* @internal
*/
- void addBaseThemes(KIconThemeNode *node, const QString &appname);
+ void addBaseThemes(KIconThemeNode *node, const TQString &appname);
/**
* @internal
* return the path for the unknown icon in that size
* @since 3.1
*/
- QString unknownIconPath( int size ) const;
+ TQString unknownIconPath( int size ) const;
/**
* Checks if name ends in one of the supported icon formats (i.e. .png)
@@ -418,7 +418,7 @@ public:
* TODO: KDE 4 make public & static
* @since 3.1
*/
- QString removeIconExtension(const QString &name) const;
+ TQString removeIconExtension(const TQString &name) const;
/**
* Same as removeIconExtension except it prints a debug message
@@ -429,12 +429,12 @@ public:
*
* TODO: KDE 4 make static
*/
- QString removeIconExtensionInternal(const QString &name) const;
+ TQString removeIconExtensionInternal(const TQString &name) const;
/**
* Loads all the different sizes for an iconset.
*/
- QIconSet loadIconSetNonDelayed( const QString& name, KIcon::Group group,
+ TQIconSet loadIconSetNonDelayed( const TQString& name, KIcon::Group group,
int size, bool canReturnNull );
// @internal the data object
@@ -445,7 +445,7 @@ public:
* \relates KIconLoader
* Load a desktop icon.
*/
-KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -453,40 +453,40 @@ KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a desktop icon.
*/
-KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a desktop icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet DesktopIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a toolbar icon.
*/
-KDECORE_EXPORT QPixmap BarIcon(const QString& name, int size=0, int state=KIcon::DefaultState,
+KDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a toolbar icon.
*/
-KDECORE_EXPORT QPixmap BarIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap BarIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a toolbar icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet BarIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a small icon.
*/
-KDECORE_EXPORT QPixmap SmallIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -494,20 +494,20 @@ KDECORE_EXPORT QPixmap SmallIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a small icon.
*/
-KDECORE_EXPORT QPixmap SmallIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a small icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet SmallIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a main toolbar icon.
*/
-KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -515,33 +515,33 @@ KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a main toolbar icon.
*/
-KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a main toolbar icon, and apply the effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet MainBarIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-KDECORE_EXPORT QPixmap UserIcon(const QString& name, int state=KIcon::DefaultState,
+KDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-KDECORE_EXPORT QPixmap UserIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap UserIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a user icon, and apply the effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet UserIconSet(const QString& name,
+KDECORE_EXPORT TQIconSet UserIconSet(const TQString& name,
KInstance *instance=KGlobal::instance());
/**
diff --git a/kdecore/kiconloader_p.h b/kdecore/kiconloader_p.h
index a3201137b..41083b38c 100644
--- a/kdecore/kiconloader_p.h
+++ b/kdecore/kiconloader_p.h
@@ -12,12 +12,12 @@
#ifndef __KIconLoader_p_h_Included__
#define __KIconLoader_p_h_Included__
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kicontheme.h>
#include <kiconloader.h>
#include <kiconeffect.h>
-#include <qdict.h>
+#include <tqdict.h>
class KIconThemeNode
{
@@ -25,10 +25,10 @@ public:
KIconThemeNode(KIconTheme *_theme);
~KIconThemeNode();
- void queryIcons(QStringList *lst, int size, KIcon::Context context) const;
- void queryIconsByContext(QStringList *lst, int size, KIcon::Context context) const;
- KIcon findIcon(const QString& name, int size, KIcon::MatchType match) const;
- void printTree(QString& dbgString) const;
+ void queryIcons(TQStringList *lst, int size, KIcon::Context context) const;
+ void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const;
+ KIcon findIcon(const TQString& name, int size, KIcon::MatchType match) const;
+ void printTree(TQString& dbgString) const;
KIconTheme *theme;
};
@@ -37,19 +37,19 @@ class KIconLoaderPrivate : public QObject
{
Q_OBJECT
public:
- QStringList mThemesInTree;
+ TQStringList mThemesInTree;
KIconGroup *mpGroups;
KIconThemeNode *mpThemeRoot;
KStandardDirs *mpDirs;
KIconLoader *q;
KIconEffect mpEffect;
- QDict<QImage> imgDict;
- QImage lastImage; // last loaded image without effect applied
- QString lastImageKey; // key for icon without effect
- QString appname;
+ TQDict<TQImage> imgDict;
+ TQImage lastImage; // last loaded image without effect applied
+ TQString lastImageKey; // key for icon without effect
+ TQString appname;
int lastIconType; // see KIcon::type
int lastIconThreshold; // see KIcon::threshold
- QPtrList<KIconThemeNode> links;
+ TQPtrList<KIconThemeNode> links;
bool extraDesktopIconsLoaded;
bool delayedLoading;
diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp
index 62044d27e..6bbeba512 100644
--- a/kdecore/kicontheme.cpp
+++ b/kdecore/kicontheme.cpp
@@ -18,15 +18,15 @@
#include <stdlib.h>
#include <config.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -40,8 +40,8 @@
class KIconThemePrivate
{
public:
- QString example, screenshot;
- QString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
+ TQString example, screenshot;
+ TQString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
bool hidden;
KSharedConfig::Ptr sharedConfig;
};
@@ -52,12 +52,12 @@ public:
class KIconThemeDir
{
public:
- KIconThemeDir(const QString& dir, const KConfigBase *config);
+ KIconThemeDir(const TQString& dir, const KConfigBase *config);
bool isValid() const { return mbValid; }
- QString iconPath(const QString& name) const;
- QStringList iconList() const;
- QString dir() const { return mDir; }
+ TQString iconPath(const TQString& name) const;
+ TQStringList iconList() const;
+ TQString dir() const { return mDir; }
KIcon::Context context() const { return mContext; }
KIcon::Type type() const { return mType; }
@@ -73,20 +73,20 @@ private:
int mSize, mMinSize, mMaxSize;
int mThreshold;
- QString mDir;
+ TQString mDir;
};
/*** KIconTheme ***/
-KIconTheme::KIconTheme(const QString& name, const QString& appName)
+KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
{
d = new KIconThemePrivate;
- QStringList icnlibs;
- QStringList::ConstIterator it, itDir;
- QStringList themeDirs;
- QString cDir;
+ TQStringList icnlibs;
+ TQStringList::ConstIterator it, itDir;
+ TQStringList themeDirs;
+ TQString cDir;
// Applications can have local additions to the global "locolor" and
// "hicolor" icon themes. For these, the _global_ theme description
@@ -99,7 +99,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
cDir = *it + appName + "/icons/" + name;
- if (QFile::exists( cDir ))
+ if (TQFile::exists( cDir ))
themeDirs += cDir + "/";
}
}
@@ -128,8 +128,8 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
return;
}
- QString fileName, mainSection;
- if(QFile::exists(mDir + "index.desktop")) {
+ TQString fileName, mainSection;
+ if(TQFile::exists(mDir + "index.desktop")) {
fileName = mDir + "index.desktop";
mainSection="KDE Icon Theme";
} else {
@@ -148,7 +148,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
mDepth = cfg.readNumEntry("DisplayDepth", 32);
mInherits = cfg.readListEntry("Inherits");
if ( name != "crystalsvg" )
- for ( QStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
+ for ( TQStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
if ( *it == "default" || *it == "hicolor" ) *it="crystalsvg";
d->hidden = cfg.readBoolEntry("Hidden", false);
@@ -159,7 +159,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
d->zipOverlay = cfg.readEntry("ZipOverlay", "zip");
d->shareOverlay = cfg.readEntry("ShareOverlay","share");
- QStringList dirs = cfg.readPathListEntry("Directories");
+ TQStringList dirs = cfg.readPathListEntry("Directories");
mDirs.setAutoDelete(true);
for (it=dirs.begin(); it!=dirs.end(); ++it)
{
@@ -182,19 +182,19 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
// Expand available sizes for scalable icons to their full range
int i;
- QMap<int,QValueList<int> > scIcons;
+ TQMap<int,TQValueList<int> > scIcons;
for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
{
if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size()))
{
- QValueList<int> lst;
+ TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++)
lst += i;
scIcons[dir->size()] = lst;
}
}
- QStringList groups;
+ TQStringList groups;
groups += "Desktop";
groups += "Toolbar";
groups += "MainToolbar";
@@ -205,8 +205,8 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
for (it=groups.begin(), i=0; it!=groups.end(); ++it, i++)
{
mDefSize[i] = cfg.readNumEntry(*it + "Default", defDefSizes[i]);
- QValueList<int> exp, lst = cfg.readIntListEntry(*it + "Sizes");
- QValueList<int>::ConstIterator it2;
+ TQValueList<int> exp, lst = cfg.readIntListEntry(*it + "Sizes");
+ TQValueList<int>::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if (scIcons.contains(*it2))
@@ -234,12 +234,12 @@ bool KIconTheme::isHidden() const
return d->hidden;
}
-QString KIconTheme::example() const { return d->example; }
-QString KIconTheme::screenshot() const { return d->screenshot; }
-QString KIconTheme::linkOverlay() const { return d->linkOverlay; }
-QString KIconTheme::lockOverlay() const { return d->lockOverlay; }
-QString KIconTheme::zipOverlay() const { return d->zipOverlay; }
-QString KIconTheme::shareOverlay() const { return d->shareOverlay; }
+TQString KIconTheme::example() const { return d->example; }
+TQString KIconTheme::screenshot() const { return d->screenshot; }
+TQString KIconTheme::linkOverlay() const { return d->linkOverlay; }
+TQString KIconTheme::lockOverlay() const { return d->lockOverlay; }
+TQString KIconTheme::zipOverlay() const { return d->zipOverlay; }
+TQString KIconTheme::shareOverlay() const { return d->shareOverlay; }
int KIconTheme::defaultSize(KIcon::Group group) const
{
@@ -251,9 +251,9 @@ int KIconTheme::defaultSize(KIcon::Group group) const
return mDefSize[group];
}
-QValueList<int> KIconTheme::querySizes(KIcon::Group group) const
+TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
{
- QValueList<int> empty;
+ TQValueList<int> empty;
if ((group < 0) || (group >= KIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
@@ -262,15 +262,15 @@ QValueList<int> KIconTheme::querySizes(KIcon::Group group) const
return mSizes[group];
}
-QStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
+TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
{
int delta = 1000, dw;
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
// Try to find exact match
- QStringList result;
+ TQStringList result;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
@@ -310,21 +310,21 @@ QStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
best = dir;
}
if (best == 0L)
- return QStringList();
+ return TQStringList();
return best->iconList();
}
-QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
+TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
{
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
int dw;
KIconThemeDir *dir;
// We want all the icons for a given context, but we prefer icons
// of size size . Note that this may (will) include duplicate icons
- //QStringList iconlist[34]; // 33 == 48-16+1
- QStringList iconlist[128]; // 33 == 48-16+1
+ //TQStringList iconlist[34]; // 33 == 48-16+1
+ TQStringList iconlist[128]; // 33 == 48-16+1
// Usually, only the 0, 6 (22-16), 10 (32-22), 16 (48-32 or 32-16),
// 26 (48-22) and 32 (48-16) will be used, but who knows if someone
// will make icon themes with different icon sizes.
@@ -338,7 +338,7 @@ QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) co
iconlist[(dw<127)?dw:127]+=dir->iconList();
}
- QStringList iconlistResult;
+ TQStringList iconlistResult;
for (int i=0; i<128; i++) iconlistResult+=iconlist[i];
return iconlistResult;
@@ -346,7 +346,7 @@ QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) co
bool KIconTheme::hasContext(KIcon::Context context) const
{
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
for ( ; dirs.current(); ++dirs)
@@ -358,15 +358,15 @@ bool KIconTheme::hasContext(KIcon::Context context) const
return false;
}
-KIcon KIconTheme::iconPath(const QString& name, int size, KIcon::MatchType match) const
+KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType match) const
{
KIcon icon;
- QString path;
+ TQString path;
int delta = -1000, dw;
KIconThemeDir *dir;
dw = 1000; // shut up, gcc
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
@@ -435,54 +435,54 @@ KIcon KIconTheme::iconPath(const QString& name, int size, KIcon::MatchType match
}
// static
-QString *KIconTheme::_theme = 0L;
+TQString *KIconTheme::_theme = 0L;
// static
-QStringList *KIconTheme::_theme_list = 0L;
+TQStringList *KIconTheme::_theme_list = 0L;
// static
-QString KIconTheme::current()
+TQString KIconTheme::current()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme != 0L)
return *_theme;
- _theme = new QString();
+ _theme = new TQString();
KConfig *config = KGlobal::config();
KConfigGroupSaver saver(config, "Icons");
*_theme = config->readEntry("Theme",defaultThemeName());
- if ( *_theme == QString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
+ if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
/* if (_theme->isEmpty())
{
- if (QPixmap::defaultDepth() > 8)
+ if (TQPixmap::defaultDepth() > 8)
*_theme = defaultThemeName();
else
- *_theme = QString::fromLatin1("locolor");
+ *_theme = TQString::fromLatin1("locolor");
}*/
return *_theme;
}
// static
-QStringList KIconTheme::list()
+TQStringList KIconTheme::list()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme_list != 0L)
return *_theme_list;
- _theme_list = new QStringList();
- QStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
+ _theme_list = new TQStringList();
+ TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
icnlibs += (KGlobal::dirs()->resourceDirs("xdgdata-icon"));
icnlibs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
- QDir dir(*it);
+ TQDir dir(*it);
if (!dir.exists())
continue;
- QStringList lst = dir.entryList(QDir::Dirs);
- QStringList::ConstIterator it2;
+ TQStringList lst = dir.entryList(TQDir::Dirs);
+ TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if ((*it2 == ".") || (*it2 == "..") || (*it2).startsWith("default.") )
@@ -509,14 +509,14 @@ void KIconTheme::reconfigure()
}
// static
-QString KIconTheme::defaultThemeName()
+TQString KIconTheme::defaultThemeName()
{
- return QString::fromLatin1("crystalsvg");
+ return TQString::fromLatin1("crystalsvg");
}
/*** KIconThemeDir ***/
-KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
+KIconThemeDir::KIconThemeDir(const TQString& dir, const KConfigBase *config)
{
mbValid = false;
mDir = dir;
@@ -528,7 +528,7 @@ KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
if (mSize == 0)
return;
- QString tmp = config->readEntry("Context");
+ TQString tmp = config->readEntry("Context");
if (tmp == "Devices")
mContext = KIcon::Device;
else if (tmp == "MimeTypes")
@@ -577,28 +577,28 @@ KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
mbValid = true;
}
-QString KIconThemeDir::iconPath(const QString& name) const
+TQString KIconThemeDir::iconPath(const TQString& name) const
{
if (!mbValid)
- return QString::null;
- QString file = mDir + "/" + name;
+ return TQString::null;
+ TQString file = mDir + "/" + name;
- if (access(QFile::encodeName(file), R_OK) == 0)
+ if (access(TQFile::encodeName(file), R_OK) == 0)
return file;
- return QString::null;
+ return TQString::null;
}
-QStringList KIconThemeDir::iconList() const
+TQStringList KIconThemeDir::iconList() const
{
- QDir dir(mDir);
+ TQDir dir(mDir);
#ifdef HAVE_LIBART
- QStringList lst = dir.entryList("*.png;*.svg;*.svgz;*.xpm", QDir::Files);
+ TQStringList lst = dir.entryList("*.png;*.svg;*.svgz;*.xpm", TQDir::Files);
#else
- QStringList lst = dir.entryList("*.png;*.xpm", QDir::Files);
+ TQStringList lst = dir.entryList("*.png;*.xpm", TQDir::Files);
#endif
- QStringList result;
- QStringList::ConstIterator it;
+ TQStringList result;
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
result += mDir + "/" + *it;
return result;
diff --git a/kdecore/kicontheme.h b/kdecore/kicontheme.h
index 424586df7..06c9aea5e 100644
--- a/kdecore/kicontheme.h
+++ b/kdecore/kicontheme.h
@@ -13,9 +13,9 @@
#ifndef __KIconTheme_h_Included__
#define __KIconTheme_h_Included__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KConfig;
@@ -169,7 +169,7 @@ public:
/**
* The full path of the icon.
*/
- QString path;
+ TQString path;
private:
KIconPrivate *d;
@@ -192,71 +192,71 @@ public:
* @param appName the name of the application. Can be null. This argument
* allows applications to have themed application icons.
*/
- KIconTheme(const QString& name, const QString& appName=QString::null);
+ KIconTheme(const TQString& name, const TQString& appName=TQString::null);
~KIconTheme();
/**
* The stylized name of the icon theme.
* @return the (human-readable) name of the theme
*/
- QString name() const { return mName; }
+ TQString name() const { return mName; }
/**
* A description for the icon theme.
- * @return a human-readable description of the theme, QString::null
+ * @return a human-readable description of the theme, TQString::null
* if there is none
*/
- QString description() const { return mDesc; }
+ TQString description() const { return mDesc; }
/**
* Return the name of the "example" icon. This can be used to
* present the theme to the user.
- * @return the name of the example icon, QString::null if there is none
+ * @return the name of the example icon, TQString::null if there is none
*/
- QString example() const;
+ TQString example() const;
/**
* Return the name of the screenshot.
- * @return the name of the screenshot, QString::null if there is none
+ * @return the name of the screenshot, TQString::null if there is none
*/
- QString screenshot() const;
+ TQString screenshot() const;
/**
* Returns the name of this theme's link overlay.
* @return the name of the link overlay
*/
- QString linkOverlay() const;
+ TQString linkOverlay() const;
/**
* Returns the name of this theme's zip overlay.
* @return the name of the zip overlay
*/
- QString zipOverlay() const;
+ TQString zipOverlay() const;
/**
* Returns the name of this theme's lock overlay.
* @return the name of the lock overlay
*/
- QString lockOverlay() const;
+ TQString lockOverlay() const;
/**
* Returns the name of this theme's share overlay.
* @return the name of the share overlay
* @since 3.1
*/
- QString shareOverlay () const;
+ TQString shareOverlay () const;
/**
* Returns the toplevel theme directory.
* @return the directory of the theme
*/
- QString dir() const { return mDir; }
+ TQString dir() const { return mDir; }
/**
* The themes this icon theme falls back on.
* @return a list of icon themes that are used as fall-backs
*/
- QStringList inherits() const { return mInherits; }
+ TQStringList inherits() const { return mInherits; }
/**
* The icon theme exists?
@@ -290,7 +290,7 @@ public:
* @param group The icon group. See KIcon::Group.
* @return a list of available sized for the given group
*/
- QValueList<int> querySizes(KIcon::Group group) const;
+ TQValueList<int> querySizes(KIcon::Group group) const;
/**
* Query available icons for a size and context.
@@ -298,7 +298,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- QStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
/**
* Query available icons for a context and preferred size.
@@ -306,7 +306,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- QStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
/**
@@ -319,7 +319,7 @@ public:
* @return A KIcon class that describes the icon. If an icon is found,
* @see KIcon::isValid will return true, and false otherwise.
*/
- KIcon iconPath(const QString& name, int size, KIcon::MatchType match) const;
+ KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
/**
* Returns true if the theme has any icons for the given context.
@@ -331,13 +331,13 @@ public:
* List all icon themes installed on the system, global and local.
* @return the list of all icon themes
*/
- static QStringList list();
+ static TQStringList list();
/**
* Returns the current icon theme.
* @return the name of the current theme
*/
- static QString current();
+ static TQString current();
/**
* Reconfigure the theme.
@@ -349,20 +349,20 @@ public:
* @return the name of the default theme name
* @since 3.1
*/
- static QString defaultThemeName();
+ static TQString defaultThemeName();
private:
int mDefSize[8];
- QValueList<int> mSizes[8];
+ TQValueList<int> mSizes[8];
int mDepth;
- QString mDir, mName, mDesc;
- QStringList mInherits;
- QPtrList<KIconThemeDir> mDirs;
+ TQString mDir, mName, mDesc;
+ TQStringList mInherits;
+ TQPtrList<KIconThemeDir> mDirs;
KIconThemePrivate *d;
- static QString *_theme;
- static QStringList *_theme_list;
+ static TQString *_theme;
+ static TQStringList *_theme_list;
};
#endif
diff --git a/kdecore/kidna.cpp b/kdecore/kidna.cpp
index f3289b26c..c7e1ccdb5 100644
--- a/kdecore/kidna.cpp
+++ b/kdecore/kidna.cpp
@@ -30,34 +30,34 @@
using namespace KNetwork;
#endif
-QCString KIDNA::toAsciiCString(const QString &idna)
+TQCString KIDNA::toAsciiCString(const TQString &idna)
{
#ifndef Q_WS_WIN //TODO kresolver not ported
return KResolver::domainToAscii(idna);
#else
- return QCString();
+ return TQCString();
#endif
}
-QString KIDNA::toAscii(const QString &idna)
+TQString KIDNA::toAscii(const TQString &idna)
{
if (idna.length() && (idna[0] == "."))
{
- QString host = QString::fromLatin1(toAsciiCString(idna.mid(1)));
+ TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1)));
if (host.isEmpty())
- return QString::null; // Error
+ return TQString::null; // Error
return idna[0] + host;
}
- return QString::fromLatin1(toAsciiCString(idna));
+ return TQString::fromLatin1(toAsciiCString(idna));
}
-QString KIDNA::toUnicode(const QString &idna)
+TQString KIDNA::toUnicode(const TQString &idna)
{
#ifndef Q_WS_WIN //TODO kresolver not ported
if (idna.length() && (idna[0] == "."))
return idna[0] + KResolver::domainToUnicode(idna.mid(1));
return KResolver::domainToUnicode(idna);
#else
- return QString::null;
+ return TQString::null;
#endif
}
diff --git a/kdecore/kidna.h b/kdecore/kidna.h
index a8b04200b..9feac63b5 100644
--- a/kdecore/kidna.h
+++ b/kdecore/kidna.h
@@ -21,7 +21,7 @@
#ifndef _KIDNA_H
#define _KIDNA_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
namespace KIDNA {
@@ -31,7 +31,7 @@ namespace KIDNA {
*
* If conversion is not possible, an empty string is returned.
*/
- KDECORE_EXPORT QCString toAsciiCString(const QString &idna);
+ KDECORE_EXPORT TQCString toAsciiCString(const TQString &idna);
/**
* Converts an International Domain Name @p idna to
@@ -39,13 +39,13 @@ namespace KIDNA {
*
* If conversion is not possible, an empty string is returned.
*/
- KDECORE_EXPORT QString toAscii(const QString &idna);
+ KDECORE_EXPORT TQString toAscii(const TQString &idna);
/**
* Converts an International Domain Name @p idna to
* its UNICODE representation
*/
- KDECORE_EXPORT QString toUnicode(const QString &idna);
+ KDECORE_EXPORT TQString toUnicode(const TQString &idna);
}
#endif /* _KIDNA_H */
diff --git a/kdecore/kinstance.cpp b/kdecore/kinstance.cpp
index cc1e0837d..2a579de0a 100644
--- a/kdecore/kinstance.cpp
+++ b/kdecore/kinstance.cpp
@@ -30,17 +30,17 @@
#include "kglobal.h"
#include "kmimesourcefactory.h"
-#include <qfont.h>
+#include <tqfont.h>
#include "config.h"
#ifndef NDEBUG
#include <assert.h>
- #include <qptrdict.h>
- static QPtrList<KInstance> *allInstances = 0;
- static QPtrDict<QCString> *allOldInstances = 0;
- #define DEBUG_ADD do { if (!allInstances) { allInstances = new QPtrList<KInstance>(); allOldInstances = new QPtrDict<QCString>(); } allInstances->append(this); allOldInstances->insert( this, new QCString( _name)); } while (false);
+ #include <tqptrdict.h>
+ static TQPtrList<KInstance> *allInstances = 0;
+ static TQPtrDict<TQCString> *allOldInstances = 0;
+ #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false);
#define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false);
- #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { QCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
+ #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
#else
#define DEBUG_ADD
#define DEBUG_REMOVE
@@ -61,12 +61,12 @@ public:
}
KMimeSourceFactory* mimeSourceFactory;
- QString configName;
+ TQString configName;
bool ownAboutdata;
KSharedConfig::Ptr sharedConfig;
};
-KInstance::KInstance( const QCString& name)
+KInstance::KInstance( const TQCString& name)
: _dirs (0L),
_config (0L),
_iconLoader (0L),
@@ -184,10 +184,10 @@ KConfig *KInstance::config() const
// Check whether custom config files are allowed.
d->sharedConfig->setGroup( "KDE Action Restrictions" );
- QString kioskException = d->sharedConfig->readEntry("kiosk_exception");
+ TQString kioskException = d->sharedConfig->readEntry("kiosk_exception");
if (d->sharedConfig->readBoolEntry( "custom_config", true))
{
- d->sharedConfig->setGroup(QString::null);
+ d->sharedConfig->setGroup(TQString::null);
}
else
{
@@ -201,11 +201,11 @@ KConfig *KInstance::config() const
if ( !_name.isEmpty() )
d->sharedConfig = KSharedConfig::openConfig( _name + "rc");
else
- d->sharedConfig = KSharedConfig::openConfig( QString::null );
+ d->sharedConfig = KSharedConfig::openConfig( TQString::null );
}
// Check if we are excempt from kiosk restrictions
- if (kde_kiosk_admin && !kde_kiosk_exception && !QCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
+ if (kde_kiosk_admin && !kde_kiosk_exception && !TQCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
{
kde_kiosk_exception = true;
d->sharedConfig = 0;
@@ -230,7 +230,7 @@ KSharedConfig *KInstance::sharedConfig() const
return d->sharedConfig;
}
-void KInstance::setConfigName(const QString &configName)
+void KInstance::setConfigName(const TQString &configName)
{
DEBUG_CHECK_ALIVE
d->configName = configName;
@@ -260,7 +260,7 @@ const KAboutData * KInstance::aboutData() const
return _aboutData;
}
-QCString KInstance::instanceName() const
+TQCString KInstance::instanceName() const
{
DEBUG_CHECK_ALIVE
return _name;
diff --git a/kdecore/kinstance.h b/kdecore/kinstance.h
index 88678ba99..f502eefc5 100644
--- a/kdecore/kinstance.h
+++ b/kdecore/kinstance.h
@@ -28,7 +28,7 @@ class KInstancePrivate;
class KMimeSourceFactory;
class KSharedConfig;
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
@@ -49,7 +49,7 @@ class KDECORE_EXPORT KInstance
* Constructor.
* @param instanceName the name of the instance
*/
- KInstance( const QCString& instanceName) ;
+ KInstance( const TQCString& instanceName) ;
/**
* Constructor.
@@ -118,7 +118,7 @@ class KDECORE_EXPORT KInstance
* @return the instance name, can be null if the KInstance has been
* created with a null name
*/
- QCString instanceName() const;
+ TQCString instanceName() const;
/**
* Returns the KMimeSourceFactory of the instance.
@@ -138,7 +138,7 @@ protected:
* @param name the name of the default config file
* @since 3.1
*/
- void setConfigName(const QString &name);
+ void setConfigName(const TQString &name);
private:
mutable KStandardDirs *_dirs;
@@ -146,7 +146,7 @@ private:
mutable KConfig *_config;
mutable KIconLoader *_iconLoader;
- QCString _name;
+ TQCString _name;
const KAboutData *_aboutData;
protected:
diff --git a/kdecore/kipc.cpp b/kdecore/kipc.cpp
index 087f28c86..3d21be6d1 100644
--- a/kdecore/kipc.cpp
+++ b/kdecore/kipc.cpp
@@ -27,7 +27,7 @@
*/
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#if defined Q_WS_X11
#include <X11/X.h>
diff --git a/kdecore/kipc.h b/kdecore/kipc.h
index d50697926..384620cde 100644
--- a/kdecore/kipc.h
+++ b/kdecore/kipc.h
@@ -22,7 +22,7 @@
#ifndef __KIPC_h_Included__
#define __KIPC_h_Included__
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#include "kdelibs_export.h"
/**
diff --git a/kdecore/kkeynative_x11.cpp b/kdecore/kkeynative_x11.cpp
index c0f00eecf..7733d3de7 100644
--- a/kdecore/kkeynative_x11.cpp
+++ b/kdecore/kkeynative_x11.cpp
@@ -20,16 +20,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qnamespace.h>
-#include <qwindowdefs.h>
+#include <tqnamespace.h>
+#include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
#include "kkeynative.h"
#include "kkeyserver_x11.h"
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kckey.h"
#include <kdebug.h>
#include <klocale.h>
diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp
index 3f3bddc0a..96411bca5 100644
--- a/kdecore/kkeyserver_x11.cpp
+++ b/kdecore/kkeyserver_x11.cpp
@@ -22,8 +22,8 @@
#include <config.h>
-#include <qnamespace.h>
-#include <qwindowdefs.h>
+#include <tqnamespace.h>
+#include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
@@ -81,7 +81,7 @@ struct ModInfo
uint modX;
#endif
const char* psName;
- QString sLabel;
+ TQString sLabel;
};
struct SymVariation
@@ -107,10 +107,10 @@ struct TransKey {
static ModInfo g_rgModInfo[KKey::MOD_FLAG_COUNT] =
{
- { KKey::SHIFT, Qt::SHIFT, X11_ONLY(ShiftMask) I18N_NOOP("Shift"), QString() },
- { KKey::CTRL, Qt::CTRL, X11_ONLY(ControlMask) I18N_NOOP("Ctrl"), QString() },
- { KKey::ALT, Qt::ALT, X11_ONLY(Mod1Mask) I18N_NOOP("Alt"), QString() },
- { KKey::WIN, KKey::QtWIN, X11_ONLY(Mod4Mask) I18N_NOOP("Win"), QString() }
+ { KKey::SHIFT, Qt::SHIFT, X11_ONLY(ShiftMask) I18N_NOOP("Shift"), TQString() },
+ { KKey::CTRL, Qt::CTRL, X11_ONLY(ControlMask) I18N_NOOP("Ctrl"), TQString() },
+ { KKey::ALT, Qt::ALT, X11_ONLY(Mod1Mask) I18N_NOOP("Alt"), TQString() },
+ { KKey::WIN, KKey::QtWIN, X11_ONLY(Mod4Mask) I18N_NOOP("Win"), TQString() }
};
// Special Names List
@@ -365,7 +365,7 @@ bool initializeMods()
g_bInitializedMods = true;
- kdDebug(125) << "KKeyServer::initializeMods(): Win Mod = 0x" << QString::number(g_rgModInfo[3].modX, 16) << endl;
+ kdDebug(125) << "KKeyServer::initializeMods(): Win Mod = 0x" << TQString::number(g_rgModInfo[3].modX, 16) << endl;
return true;
}
@@ -392,7 +392,7 @@ static void intializeKKeyLabels()
// class Mod
//---------------------------------------------------------------------
-/*void Mod::init( const QString& s )
+/*void Mod::init( const TQString& s )
{
}*/
@@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt )
int symQt = keyQt & 0xffff;
if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) {
- m_sym = QChar(symQt).lower().unicode();
+ m_sym = TQChar(symQt).lower().unicode();
return true;
}
@@ -424,7 +424,7 @@ bool Sym::initQt( int keyQt )
m_sym = 0;
if( symQt != Qt::Key_Shift && symQt != Qt::Key_Control && symQt != Qt::Key_Alt &&
symQt != Qt::Key_Meta && symQt != Qt::Key_Direction_L && symQt != Qt::Key_Direction_R )
- kdDebug(125) << "Sym::initQt( " << QString::number(keyQt,16) << " ): failed to convert key." << endl;
+ kdDebug(125) << "Sym::initQt( " << TQString::number(keyQt,16) << " ): failed to convert key." << endl;
return false;
#elif defined(Q_WS_MACX)
m_sym = symQt;
@@ -432,7 +432,7 @@ bool Sym::initQt( int keyQt )
#endif
}
-bool Sym::init( const QString& s )
+bool Sym::init( const TQString& s )
{
// If it's a single character, get unicode value.
if( s.length() == 1 ) {
@@ -463,7 +463,7 @@ bool Sym::init( const QString& s )
if( !m_sym ) {
m_sym = XStringToKeysym( s.lower().latin1() );
if( !m_sym ) {
- QString s2 = s;
+ TQString s2 = s;
s2[0] = s2[0].upper();
m_sym = XStringToKeysym( s2.latin1() );
}
@@ -476,7 +476,7 @@ int Sym::qt() const
{
if( m_sym < 0x1000 ) {
if( m_sym >= 'a' && m_sym <= 'z' )
- return QChar(m_sym).upper();
+ return TQChar(m_sym).upper();
return m_sym;
}
#ifdef Q_WS_WIN
@@ -493,10 +493,10 @@ int Sym::qt() const
return Qt::Key_unknown;
}
-QString Sym::toString( bool bUserSpace ) const
+TQString Sym::toString( bool bUserSpace ) const
{
if( m_sym == 0 )
- return QString::null;
+ return TQString::null;
// If it's a unicode character,
#ifdef Q_WS_WIN
@@ -504,7 +504,7 @@ QString Sym::toString( bool bUserSpace ) const
#else
else if( m_sym < 0x3000 ) {
#endif
- QChar c = QChar(m_sym).upper();
+ TQChar c = TQChar(m_sym).upper();
// Print all non-space characters directly when output is user-visible.
// Otherwise only print alphanumeric latin1 characters directly (A,B,C,1,2,3).
if( (c.latin1() && c.isLetterOrNumber())
@@ -515,22 +515,22 @@ QString Sym::toString( bool bUserSpace ) const
// Look up in special names list
for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) {
if( m_sym == g_rgSymNames[i].sym )
- return bUserSpace ? i18n(g_rgSymNames[i].psName) : QString(g_rgSymNames[i].psName);
+ return bUserSpace ? i18n(g_rgSymNames[i].psName) : TQString(g_rgSymNames[i].psName);
}
- QString s;
+ TQString s;
#ifdef Q_WS_WIN
- s = QKeySequence( m_sym );
+ s = TQKeySequence( m_sym );
#elif defined(Q_WS_X11)
// Get X-name
s = XKeysymToString( m_sym );
#endif
capitalizeKeyname( s );
- return bUserSpace ? i18n("QAccel", s.latin1()) : s;
+ return bUserSpace ? i18n("TQAccel", s.latin1()) : s;
}
-QString Sym::toStringInternal() const { return toString( false ); }
-QString Sym::toString() const { return toString( true ); }
+TQString Sym::toStringInternal() const { return toString( false ); }
+TQString Sym::toString() const { return toString( true ); }
uint Sym::getModsRequired() const
{
@@ -541,7 +541,7 @@ uint Sym::getModsRequired() const
if( m_sym == XK_Break ) return KKey::CTRL;
if( m_sym < 0x3000 ) {
- QChar c(m_sym);
+ TQChar c(m_sym);
if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() )
return KKey::SHIFT;
}
@@ -576,7 +576,7 @@ uint Sym::getSymVariation() const
return 0;
}
-void Sym::capitalizeKeyname( QString& s )
+void Sym::capitalizeKeyname( TQString& s )
{
s[0] = s[0].upper();
int len = s.length();
@@ -773,33 +773,33 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym )
}
#endif //!Q_WS_WIN
-static QString modToString( uint mod, bool bUserSpace )
+static TQString modToString( uint mod, bool bUserSpace )
{
if( bUserSpace && !g_bInitializedKKeyLabels )
intializeKKeyLabels();
- QString s;
+ TQString s;
for( int i = KKey::MOD_FLAG_COUNT-1; i >= 0; i-- ) {
if( mod & g_rgModInfo[i].mod ) {
if( !s.isEmpty() )
s += '+';
s += (bUserSpace)
? g_rgModInfo[i].sLabel
- : QString(g_rgModInfo[i].psName);
+ : TQString(g_rgModInfo[i].psName);
}
}
return s;
}
-QString modToStringInternal( uint mod ) { return modToString( mod, false ); }
-QString modToStringUser( uint mod ) { return modToString( mod, true ); }
+TQString modToStringInternal( uint mod ) { return modToString( mod, false ); }
+TQString modToStringUser( uint mod ) { return modToString( mod, true ); }
-uint stringUserToMod( const QString& mod )
+uint stringUserToMod( const TQString& mod )
{
if( !g_bInitializedKKeyLabels )
intializeKKeyLabels();
- QString s;
+ TQString s;
for( int i = KKey::MOD_FLAG_COUNT-1; i >= 0; i-- ) {
if( mod.lower() == g_rgModInfo[i].sLabel.lower())
return g_rgModInfo[i].mod;
@@ -843,7 +843,7 @@ uint stringUserToMod( const QString& mod )
// Get X key symbol. Only works if Qt name is same as X name.
if( psKeySym ) {
- QString sKeySym = psKeySym;
+ TQString sKeySym = psKeySym;
// Check for lower-case equalent first because most
// X11 names are all lower-case.
@@ -1040,8 +1040,8 @@ void KKey::simplify()
}
// If this is a letter, don't remove any modifiers.
- if( m_sym < 0x3000 && QChar(m_sym).isLetter() )
- m_sym = QChar(m_sym).lower().unicode();
+ if( m_sym < 0x3000 && TQChar(m_sym).isLetter() )
+ m_sym = TQChar(m_sym).lower().unicode();
// Remove modifers from modifier list which are implicit in the symbol.
// Ex. Shift+Plus => Plus (en)
diff --git a/kdecore/kkeyserver_x11.h b/kdecore/kkeyserver_x11.h
index 73c800db2..dbca533e4 100644
--- a/kdecore/kkeyserver_x11.h
+++ b/kdecore/kkeyserver_x11.h
@@ -64,7 +64,7 @@ namespace KKeyServer
* @param s the description of the symbol
* @see toString()
*/
- Sym( const QString& s )
+ Sym( const TQString& s )
{ init( s ); }
/**
@@ -81,7 +81,7 @@ namespace KKeyServer
* @return true if successful, false otherwise
* @see toString()
*/
- bool init( const QString &s );
+ bool init( const TQString &s );
/**
* Returns the qt key code of the symbol.
@@ -92,13 +92,13 @@ namespace KKeyServer
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns the string representation of the symbol.
* @return the string representation of the symbol
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns the mods that are required for this symbol as
@@ -125,9 +125,9 @@ namespace KKeyServer
Sym& operator =( uint sym ) { m_sym = sym; return *this; }
private:
- QString toString( bool bUserSpace ) const;
+ TQString toString( bool bUserSpace ) const;
- static void capitalizeKeyname( QString& );
+ static void capitalizeKeyname( TQString& );
};
/**
@@ -443,7 +443,7 @@ namespace KKeyServer
/**
* @internal
*/
- KDECORE_EXPORT QString modToStringInternal( uint mod );
+ KDECORE_EXPORT TQString modToStringInternal( uint mod );
/**
* Converts the mask of ORed KKey::ModFlag modifiers to a
@@ -451,7 +451,7 @@ namespace KKeyServer
* @param mod the mask of ORed KKey::ModFlag modifiers
* @return the user-readable string
*/
- KDECORE_EXPORT QString modToStringUser( uint mod );
+ KDECORE_EXPORT TQString modToStringUser( uint mod );
/**
* Converts the modifier given as user-readable string
@@ -459,13 +459,13 @@ namespace KKeyServer
* @internal
* @since 3.5
*/
- KDECORE_EXPORT uint stringUserToMod( const QString& mod );
+ KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
/**
* @internal
* Unimplemented?
*/
- KDECORE_EXPORT bool stringToSymMod( const QString&, uint& sym, uint& mod );
+ KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
/**
* @internal
diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp
index e994d7274..61155e7c9 100644
--- a/kdecore/klibloader.cpp
+++ b/kdecore/klibloader.cpp
@@ -19,11 +19,11 @@
#include "config.h"
#include <config.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qobjectdict.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqobjectdict.h>
#include "kapplication.h"
#include "klibloader.h"
@@ -33,7 +33,7 @@
#include "ltdl.h"
-template class QAsciiDict<KLibrary>;
+template class TQAsciiDict<KLibrary>;
#include <stdlib.h> //getenv
@@ -57,19 +57,19 @@ template class QAsciiDict<KLibrary>;
class KLibLoaderPrivate
{
public:
- QPtrList<KLibWrapPrivate> loaded_stack;
- QPtrList<KLibWrapPrivate> pending_close;
+ TQPtrList<KLibWrapPrivate> loaded_stack;
+ TQPtrList<KLibWrapPrivate> pending_close;
enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
- QString errorMessage;
+ TQString errorMessage;
};
KLibLoader* KLibLoader::s_self = 0;
// -------------------------------------------------------------------------
-KLibFactory::KLibFactory( QObject* parent, const char* name )
- : QObject( parent, name )
+KLibFactory::KLibFactory( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
}
@@ -78,16 +78,16 @@ KLibFactory::~KLibFactory()
// kdDebug(150) << "Deleting KLibFactory " << this << endl;
}
-QObject* KLibFactory::create( QObject* parent, const char* name, const char* classname, const QStringList &args )
+TQObject* KLibFactory::create( TQObject* parent, const char* name, const char* classname, const TQStringList &args )
{
- QObject* obj = createObject( parent, name, classname, args );
+ TQObject* obj = createObject( parent, name, classname, args );
if ( obj )
emit objectCreated( obj );
return obj;
}
-QObject* KLibFactory::createObject( QObject*, const char*, const char*, const QStringList &)
+TQObject* KLibFactory::createObject( TQObject*, const char*, const char*, const TQStringList &)
{
return 0;
}
@@ -95,7 +95,7 @@ QObject* KLibFactory::createObject( QObject*, const char*, const char*, const QS
// -----------------------------------------------
-KLibrary::KLibrary( const QString& libname, const QString& filename, void * handle )
+KLibrary::KLibrary( const TQString& libname, const TQString& filename, void * handle )
{
/* Make sure, we have a KLibLoader */
(void) KLibLoader::self();
@@ -115,12 +115,12 @@ KLibrary::~KLibrary()
// If any object is remaining, delete
if ( m_objs.count() > 0 )
{
- QPtrListIterator<QObject> it( m_objs );
+ TQPtrListIterator<TQObject> it( m_objs );
for ( ; it.current() ; ++it )
{
kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
- disconnect( it.current(), SIGNAL( destroyed() ),
- this, SLOT( slotObjectDestroyed() ) );
+ disconnect( it.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotObjectDestroyed() ) );
}
m_objs.setAutoDelete(true);
m_objs.clear();
@@ -133,12 +133,12 @@ KLibrary::~KLibrary()
}
}
-QString KLibrary::name() const
+TQString KLibrary::name() const
{
return m_libname;
}
-QString KLibrary::fileName() const
+TQString KLibrary::fileName() const
{
return m_filename;
}
@@ -148,7 +148,7 @@ KLibFactory* KLibrary::factory()
if ( m_factory )
return m_factory;
- QCString symname;
+ TQCString symname;
symname.sprintf("init_%s", name().latin1() );
void* sym = symbol( symname );
@@ -170,8 +170,8 @@ KLibFactory* KLibrary::factory()
return 0;
}
- connect( m_factory, SIGNAL( objectCreated( QObject * ) ),
- this, SLOT( slotObjectCreated( QObject * ) ) );
+ connect( m_factory, TQT_SIGNAL( objectCreated( TQObject * ) ),
+ this, TQT_SLOT( slotObjectCreated( TQObject * ) ) );
return m_factory;
}
@@ -181,7 +181,7 @@ void* KLibrary::symbol( const char* symname ) const
void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
if ( !sym )
{
- KLibLoader::self()->d->errorMessage = "KLibrary: " + QString::fromLocal8Bit( lt_dlerror() );
+ KLibLoader::self()->d->errorMessage = "KLibrary: " + TQString::fromLocal8Bit( lt_dlerror() );
kdWarning(150) << KLibLoader::self()->d->errorMessage << endl;
return 0;
}
@@ -198,10 +198,10 @@ bool KLibrary::hasSymbol( const char* symname ) const
void KLibrary::unload() const
{
if (KLibLoader::s_self)
- KLibLoader::s_self->unloadLibrary(QFile::encodeName(name()));
+ KLibLoader::s_self->unloadLibrary(TQFile::encodeName(name()));
}
-void KLibrary::slotObjectCreated( QObject *obj )
+void KLibrary::slotObjectCreated( TQObject *obj )
{
if ( !obj )
return;
@@ -212,8 +212,8 @@ void KLibrary::slotObjectCreated( QObject *obj )
if ( m_objs.containsRef( obj ) )
return; // we know this object already
- connect( obj, SIGNAL( destroyed() ),
- this, SLOT( slotObjectDestroyed() ) );
+ connect( obj, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotObjectDestroyed() ) );
m_objs.append( obj );
}
@@ -229,9 +229,9 @@ void KLibrary::slotObjectDestroyed()
if ( !m_timer )
{
- m_timer = new QTimer( this, "klibrary_shutdown_timer" );
- connect( m_timer, SIGNAL( timeout() ),
- this, SLOT( slotTimeout() ) );
+ m_timer = new TQTimer( this, "klibrary_shutdown_timer" );
+ connect( m_timer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotTimeout() ) );
}
// as long as it's not stable make the timeout short, for debugging
@@ -267,8 +267,8 @@ public:
enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
int ref_count;
lt_dlhandle handle;
- QString name;
- QString filename;
+ TQString name;
+ TQString filename;
};
KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, lt_dlhandle h)
@@ -299,8 +299,8 @@ void KLibLoader::cleanUp()
s_self = 0L;
}
-KLibLoader::KLibLoader( QObject* parent, const char* name )
- : QObject( parent, name )
+KLibLoader::KLibLoader( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
s_self = this;
d = new KLibLoaderPrivate;
@@ -317,7 +317,7 @@ KLibLoader::~KLibLoader()
{
// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ TQAsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
{
kdDebug(150) << "The KLibLoader contains the library " << it.current()->name
@@ -331,9 +331,9 @@ KLibLoader::~KLibLoader()
d = 0L;
}
-static inline QCString makeLibName( const char* name )
+static inline TQCString makeLibName( const char* name )
{
- QCString libname(name);
+ TQCString libname(name);
// only append ".la" if there is no extension
// this allows to load non-libtool libraries as well
// (mhk, 20000228)
@@ -346,15 +346,15 @@ static inline QCString makeLibName( const char* name )
}
//static
-QString KLibLoader::findLibrary( const char * name, const KInstance * instance )
+TQString KLibLoader::findLibrary( const char * name, const KInstance * instance )
{
- QCString libname = makeLibName( name );
+ TQCString libname = makeLibName( name );
// only look up the file if it is not an absolute filename
// (mhk, 20000228)
- QString libfile;
- if (!QDir::isRelativePath(libname))
- libfile = QFile::decodeName( libname );
+ TQString libfile;
+ if (!TQDir::isRelativePath(libname))
+ libfile = TQFile::decodeName( libname );
else
{
libfile = instance->dirs()->findResource( "module", libname );
@@ -401,7 +401,7 @@ KLibrary* KLibLoader::library( const char *name )
/* Test if this library was loaded at some time, but got
unloaded meanwhile, whithout being dlclose()'ed. */
- QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
+ TQPtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
for (; it.current(); ++it) {
if (it.current()->name == name)
wrap = it.current();
@@ -415,10 +415,10 @@ KLibrary* KLibLoader::library( const char *name )
}
wrap->ref_count++;
} else {
- QString libfile = findLibrary( name );
+ TQString libfile = findLibrary( name );
if ( libfile.isEmpty() )
{
- const QCString libname = makeLibName( name );
+ const TQCString libname = makeLibName( name );
#ifndef NDEBUG
kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl;
#endif
@@ -426,18 +426,18 @@ KLibrary* KLibLoader::library( const char *name )
return 0;
}
- lt_dlhandle handle = lt_dlopen( QFile::encodeName(libfile) );
+ lt_dlhandle handle = lt_dlopen( TQFile::encodeName(libfile) );
if ( !handle )
{
const char* errmsg = lt_dlerror();
if(errmsg)
- d->errorMessage = QString::fromLocal8Bit(errmsg);
+ d->errorMessage = TQString::fromLocal8Bit(errmsg);
else
- d->errorMessage = QString::null;
+ d->errorMessage = TQString::null;
return 0;
}
else
- d->errorMessage = QString::null;
+ d->errorMessage = TQString::null;
KLibrary *lib = new KLibrary( name, libfile, handle );
wrap = new KLibWrapPrivate(lib, handle);
@@ -445,13 +445,13 @@ KLibrary* KLibLoader::library( const char *name )
}
m_libs.insert( name, wrap );
- connect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ connect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
return wrap->lib;
}
-QString KLibLoader::lastErrorMessage() const
+TQString KLibLoader::lastErrorMessage() const
{
return d->errorMessage;
}
@@ -468,8 +468,8 @@ void KLibLoader::unloadLibrary( const char *libname )
m_libs.remove( libname );
- disconnect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ disconnect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
close_pending( wrap );
}
@@ -486,7 +486,7 @@ void KLibLoader::slotLibraryDestroyed()
{
const KLibrary *lib = static_cast<const KLibrary *>( sender() );
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ TQAsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
if ( it.current()->lib == lib )
{
@@ -505,12 +505,12 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
/* First delete all KLibrary objects in pending_close, but _don't_ unload
the DSO behind it. */
- QPtrListIterator<KLibWrapPrivate> it(d->pending_close);
+ TQPtrListIterator<KLibWrapPrivate> it(d->pending_close);
for (; it.current(); ++it) {
wrap = it.current();
if (wrap->lib) {
- disconnect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ disconnect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
KLibrary* to_delete = wrap->lib;
wrap->lib = 0L; // unset first, because KLibrary dtor can cause
delete to_delete; // recursive call to close_pending()
diff --git a/kdecore/klibloader.h b/kdecore/klibloader.h
index 1230f9944..27fc2becc 100644
--- a/kdecore/klibloader.h
+++ b/kdecore/klibloader.h
@@ -18,11 +18,11 @@
#ifndef KLIBLOADER_H
#define KLIBLOADER_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqasciidict.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <stdlib.h> // For backwards compatibility
@@ -50,26 +50,26 @@ class KLibraryPrivate;
class KDECORE_EXPORT KLibrary : public QObject
{
friend class KLibLoader;
- friend class QAsciiDict<KLibrary>;
+ friend class TQAsciiDict<KLibrary>;
Q_OBJECT
public:
/**
* Don't create KLibrary objects on your own. Instead use KLibLoader.
*/
- KLibrary( const QString& libname, const QString& filename, void * handle );
+ KLibrary( const TQString& libname, const TQString& filename, void * handle );
/**
* Returns the name of the library.
* @return The name of the library like "libkspread".
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the file name of the library.
* @return The filename of the library, for example "/opt/kde2&/lib/libkspread.la"
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* Returns the factory of the library.
@@ -107,7 +107,7 @@ public:
void unload() const;
private slots:
- void slotObjectCreated( QObject *obj );
+ void slotObjectCreated( TQObject *obj );
void slotObjectDestroyed();
void slotTimeout();
@@ -118,12 +118,12 @@ private:
*/
~KLibrary();
- QString m_libname;
- QString m_filename;
+ TQString m_libname;
+ TQString m_filename;
KLibFactory* m_factory;
void * m_handle;
- QPtrList<QObject> m_objs;
- QTimer *m_timer;
+ TQPtrList<TQObject> m_objs;
+ TQTimer *m_timer;
KLibraryPrivate *d;
};
@@ -222,12 +222,12 @@ public:
/**
* Returns an error message that can be useful to debug the problem.
- * Returns QString::null if the last call to library() was successful.
+ * Returns TQString::null if the last call to library() was successful.
* You can call this function more than once. The error message is only
* reset by a new call to library().
- * @return the last error message, or QString::null if there was no error
+ * @return the last error message, or TQString::null if there was no error
*/
- QString lastErrorMessage() const;
+ TQString lastErrorMessage() const;
/**
* Unloads the library with the given name.
@@ -273,16 +273,16 @@ public:
* ".la" will be appended.
* @param instance a KInstance used to get the standard paths
*/
- static QString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
+ static TQString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
protected:
- KLibLoader( QObject* parent = 0, const char* name = 0 );
+ KLibLoader( TQObject* parent = 0, const char* name = 0 );
private slots:
void slotLibraryDestroyed();
private:
void close_pending( KLibWrapPrivate * );
- QAsciiDict<KLibWrapPrivate> m_libs;
+ TQAsciiDict<KLibWrapPrivate> m_libs;
static KLibLoader* s_self;
@@ -322,7 +322,7 @@ private:
* The KLibFactory is used to create the components, the library has to offer.
* The factory of KSpread for example will create instances of KSpreadDoc,
* while the Konqueror factory will create KonqView widgets.
- * All objects created by the factory must be derived from QObject, since QObject
+ * All objects created by the factory must be derived from TQObject, since QObject
* offers type safe casting.
*
* KLibFactory is an abstract class. Reimplement the
@@ -336,10 +336,10 @@ class KDECORE_EXPORT KLibFactory : public QObject
public:
/**
* Create a new factory.
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
*/
- KLibFactory( QObject* parent = 0, const char* name = 0 );
+ KLibFactory( TQObject* parent = 0, const char* name = 0 );
virtual ~KLibFactory();
/**
@@ -349,7 +349,7 @@ public:
* It is valid behavior to create different kinds of objects
* depending on the requested @p classname. For example a koffice
* library may usually return a pointer to KoDocument. But
- * if asked for a "QWidget", it could create a wrapper widget,
+ * if asked for a "TQWidget", it could create a wrapper widget,
* that encapsulates the Koffice specific features.
*
* create() automatically emits a signal objectCreated to tell
@@ -357,20 +357,20 @@ public:
* important for reference counting, and allows unloading the
* library automatically once all its objects have been destroyed.
*
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
* @param classname the name of the class
* @param args a list of arguments
*/
- QObject* create( QObject* parent = 0, const char* name = 0, const char* classname = "QObject", const QStringList &args = QStringList() );
+ TQObject* create( TQObject* parent = 0, const char* name = 0, const char* classname = "TQObject", const TQStringList &args = TQStringList() );
signals:
/**
* Emitted in #create
* @param obj the new object
*/
- void objectCreated( QObject *obj );
+ void objectCreated( TQObject *obj );
protected:
@@ -382,18 +382,18 @@ protected:
* It is valid behavior to create different kinds of objects
* depending on the requested @p className. For example a koffice
* library may usually return a pointer to KoDocument. But
- * if asked for a "QWidget", it could create a wrapper widget,
+ * if asked for a "TQWidget", it could create a wrapper widget,
* that encapsulates the Koffice specific features.
*
* This function is called by #create()
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
* @param className the name of the class
* @param args a list of arguments
*/
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* className = "QObject",
- const QStringList &args = QStringList() ) = 0;
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* className = "TQObject",
+ const TQStringList &args = TQStringList() ) = 0;
protected:
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index 59981d4b1..f8a82e3f5 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -25,12 +25,12 @@
#include <stdlib.h> // getenv
-#include <qtextcodec.h>
-#include <qfile.h>
-#include <qprinter.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
+#include <tqprinter.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include "kcatalogue.h"
#include "kglobal.h"
@@ -57,22 +57,22 @@ public:
int weekStartDay;
bool nounDeclension;
bool dateMonthNamePossessive;
- QStringList languageList;
- QStringList catalogNames; // list of all catalogs (regardless of language)
- QValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language
- QString encoding;
- QTextCodec * codecForEncoding;
+ TQStringList languageList;
+ TQStringList catalogNames; // list of all catalogs (regardless of language)
+ TQValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language
+ TQString encoding;
+ TQTextCodec * codecForEncoding;
KConfig * config;
bool formatInited;
- int /*QPrinter::PageSize*/ pageSize;
+ int /*TQPrinter::PageSize*/ pageSize;
KLocale::MeasureSystem measureSystem;
- QStringList langTwoAlpha;
+ TQStringList langTwoAlpha;
KConfig *languages;
- QString calendarType;
+ TQString calendarType;
KCalendarSystem * calendar;
bool utf8FileEncoding;
- QString appName;
+ TQString appName;
#ifdef Q_WS_WIN
char win32SystemEncoding[3+7]; //"cp " + lang ID
#endif
@@ -81,7 +81,7 @@ public:
static KLocale *this_klocale = 0;
-KLocale::KLocale( const QString & catalog, KConfig * config )
+KLocale::KLocale( const TQString & catalog, KConfig * config )
{
d = new KLocalePrivate;
d->config = config;
@@ -103,7 +103,7 @@ KLocale::KLocale( const QString & catalog, KConfig * config )
initMainCatalogues(catalog);
}
-QString KLocale::_initLanguage(KConfigBase *config)
+TQString KLocale::_initLanguage(KConfigBase *config)
{
if (this_klocale)
{
@@ -112,18 +112,18 @@ QString KLocale::_initLanguage(KConfigBase *config)
// todo: adapt current catalog list: remove unused languages, insert main catalogs, if not already found
return this_klocale->language();
}
- return QString::null;
+ return TQString::null;
}
-void KLocale::initMainCatalogues(const QString & catalog)
+void KLocale::initMainCatalogues(const TQString & catalog)
{
// Use the first non-null string.
- QString mainCatalogue = catalog;
+ TQString mainCatalogue = catalog;
// don't use main catalogue if we're looking up .desktop translations
if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) {
if (maincatalogue) {
- mainCatalogue = QString::fromLatin1(maincatalogue);
+ mainCatalogue = TQString::fromLatin1(maincatalogue);
}
}
@@ -153,10 +153,10 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
m_country = defaultCountry();
// Reset the list and add the new languages
- QStringList languageList;
+ TQStringList languageList;
if ( useEnv )
- languageList += QStringList::split
- (':', QFile::decodeName( ::getenv("KDE_LANG") ));
+ languageList += TQStringList::split
+ (':', TQFile::decodeName( ::getenv("KDE_LANG") ));
languageList += config->readListEntry("Language", ':');
@@ -164,17 +164,17 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
if ( useEnv )
{
// HPB: Only run splitLocale on the environment variables..
- QStringList langs;
+ TQStringList langs;
- langs << QFile::decodeName( ::getenv("LC_ALL") );
- langs << QFile::decodeName( ::getenv("LC_MESSAGES") );
- langs << QFile::decodeName( ::getenv("LANG") );
+ langs << TQFile::decodeName( ::getenv("LC_ALL") );
+ langs << TQFile::decodeName( ::getenv("LC_MESSAGES") );
+ langs << TQFile::decodeName( ::getenv("LANG") );
- for ( QStringList::Iterator it = langs.begin();
+ for ( TQStringList::Iterator it = langs.begin();
it != langs.end();
++it )
{
- QString ln, ct, chrset;
+ TQString ln, ct, chrset;
splitLocale(*it, ln, ct, chrset);
if (!ct.isEmpty()) {
@@ -195,20 +195,20 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
void KLocale::initPluralTypes()
{
- for ( QValueList<KCatalogue>::Iterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
- QString language = (*it).language();
+ TQString language = (*it).language();
int pt = pluralType( language );
(*it).setPluralType( pt );
}
}
-int KLocale::pluralType( const QString & language )
+int KLocale::pluralType( const TQString & language )
{
- for ( QValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
@@ -230,7 +230,7 @@ int KLocale::pluralType( const KCatalogue& catalog )
"Better leave that out if unsure, the programs will "
"crash!!\nDefinition of PluralForm - to be set by the "
"translator of kdelibs.po");
- QString pf (catalog.translate( pluralFormString));
+ TQString pf (catalog.translate( pluralFormString));
if ( pf.isEmpty() ) {
return -1;
}
@@ -312,13 +312,13 @@ void KLocale::initFormat()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig entry(locate("locale",
- QString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_country)), true);
entry.setGroup("KCM Locale");
// Numeric
#define readConfigEntry(key, default, save) \
- save = entry.readEntry(key, QString::fromLatin1(default)); \
+ save = entry.readEntry(key, TQString::fromLatin1(default)); \
save = config->readEntry(key, save);
#define readConfigNumEntry(key, default, save, type) \
@@ -331,7 +331,7 @@ void KLocale::initFormat()
readConfigEntry("DecimalSymbol", ".", m_decimalSymbol);
readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator);
- m_thousandsSeparator.replace( QString::fromLatin1("$0"), QString::null );
+ m_thousandsSeparator.replace( TQString::fromLatin1("$0"), TQString::null );
//kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl;
readConfigEntry("PositiveSign", "", m_positiveSign);
@@ -342,7 +342,7 @@ void KLocale::initFormat()
readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol);
readConfigEntry("MonetaryThousandsSeparator", ",",
m_monetaryThousandsSeparator);
- m_monetaryThousandsSeparator.replace(QString::fromLatin1("$0"), QString::null);
+ m_monetaryThousandsSeparator.replace(TQString::fromLatin1("$0"), TQString::null);
readConfigNumEntry("FracDigits", 2, m_fracDigits, int);
readConfigBoolEntry("PositivePrefixCurrencySymbol", true,
@@ -362,7 +362,7 @@ void KLocale::initFormat()
readConfigNumEntry("WeekStartDay", 1, d->weekStartDay, int);
// other
- readConfigNumEntry("PageSize", (int)QPrinter::A4, d->pageSize, int);
+ readConfigNumEntry("PageSize", (int)TQPrinter::A4, d->pageSize, int);
readConfigNumEntry("MeasureSystem", (int)Metric, d->measureSystem,
MeasureSystem);
readConfigEntry("CalendarSystem", "gregorian", d->calendarType);
@@ -372,7 +372,7 @@ void KLocale::initFormat()
//Grammatical
//Precedence here is l10n / i18n / config file
KSimpleConfig language(locate("locale",
- QString::fromLatin1("%1/entry.desktop")
+ TQString::fromLatin1("%1/entry.desktop")
.arg(m_language)), true);
language.setGroup("KCM Locale");
#define read3ConfigBoolEntry(key, default, save) \
@@ -388,7 +388,7 @@ void KLocale::initFormat()
KGlobal::_locale = lsave;
}
-bool KLocale::setCountry(const QString & country)
+bool KLocale::setCountry(const TQString & country)
{
// Check if the file exists too??
if ( country.isEmpty() )
@@ -401,17 +401,17 @@ bool KLocale::setCountry(const QString & country)
return true;
}
-QString KLocale::catalogueFileName(const QString & language,
+TQString KLocale::catalogueFileName(const TQString & language,
const KCatalogue & catalog)
{
- QString path = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( catalog.name() );
return locate( "locale", path );
}
-bool KLocale::setLanguage(const QString & language)
+bool KLocale::setLanguage(const TQString & language)
{
if ( d->languageList.contains( language ) ) {
d->languageList.remove( language );
@@ -429,9 +429,9 @@ bool KLocale::setLanguage(const QString & language)
return true; // Maybe the mo-files for this language are empty, but in principle we can speak all languages
}
-bool KLocale::setLanguage(const QStringList & languages)
+bool KLocale::setLanguage(const TQStringList & languages)
{
- QStringList languageList( languages );
+ TQStringList languageList( languages );
// This list might contain
// 1) some empty strings that we have to eliminate
// 2) duplicate entries like in de:fr:de, where we have to keep the first occurrance of a language in order
@@ -442,7 +442,7 @@ bool KLocale::setLanguage(const QStringList & languages)
// right to left (like Hebrew or Arabic) is set in kdelibs.mo. If you only have kdelibs.mo
// but nothing from appname.mo, you get a mostly English app with layout from right to left.
// That was considered to be a bug by the Hebrew translators.
- for( QStringList::Iterator it = languageList.fromLast();
+ for( TQStringList::Iterator it = languageList.fromLast();
it != languageList.begin(); --it )
{
// kdDebug() << "checking " << (*it) << endl;
@@ -456,7 +456,7 @@ bool KLocale::setLanguage(const QStringList & languages)
// The question why this is the case is left as an exercise for the reader...
// Besides the list might have been empty all the way, so check that too.
if ( languageList.begin() != languageList.end() ) {
- QStringList::Iterator it = languageList.begin(); // now pointing to the first element
+ TQStringList::Iterator it = languageList.begin(); // now pointing to the first element
// kdDebug() << "checking " << (*it) << endl;
if( (*it).isEmpty() || !(isApplicationTranslatedInto( *it )) ) {
// kdDebug() << "removing " << (*it) << endl;
@@ -480,7 +480,7 @@ bool KLocale::setLanguage(const QStringList & languages)
return true; // we found something. Maybe it's only English, but we found something
}
-bool KLocale::isApplicationTranslatedInto( const QString & language)
+bool KLocale::isApplicationTranslatedInto( const TQString & language)
{
if ( language.isEmpty() ) {
return false;
@@ -491,9 +491,9 @@ bool KLocale::isApplicationTranslatedInto( const QString & language)
return true;
}
- QString appName = d->appName;
+ TQString appName = d->appName;
if (maincatalogue) {
- appName = QString::fromLatin1(maincatalogue);
+ appName = TQString::fromLatin1(maincatalogue);
}
// sorry, catalogueFileName requires catalog object,k which we do not have here
// path finding was supposed to be moved completely to KCatalogue. The interface cannot
@@ -501,31 +501,31 @@ bool KLocale::isApplicationTranslatedInto( const QString & language)
// duplicated code for file path evaluation. Cleanup will follow later. We could have e.g.
// a static method in KCataloge that can translate between these file names.
// a stat
- QString sFileName = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString sFileName = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( appName );
// kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl;
- QString sAbsFileName = locate( "locale", sFileName );
+ TQString sAbsFileName = locate( "locale", sFileName );
// kdDebug() << "isApplicationTranslatedInto: absname " << sAbsFileName << endl;
return ! sAbsFileName.isEmpty();
}
-void KLocale::splitLocale(const QString & aStr,
- QString & language,
- QString & country,
- QString & chrset)
+void KLocale::splitLocale(const TQString & aStr,
+ TQString & language,
+ TQString & country,
+ TQString & chrset)
{
- QString str = aStr;
+ TQString str = aStr;
// just in case, there is another language appended
int f = str.find(':');
if (f >= 0)
str.truncate(f);
- country = QString::null;
- chrset = QString::null;
- language = QString::null;
+ country = TQString::null;
+ chrset = TQString::null;
+ language = TQString::null;
f = str.find('.');
if (f >= 0)
@@ -544,17 +544,17 @@ void KLocale::splitLocale(const QString & aStr,
language = str;
}
-QString KLocale::language() const
+TQString KLocale::language() const
{
return m_language;
}
-QString KLocale::country() const
+TQString KLocale::country() const
{
return m_country;
}
-QString KLocale::monthName(int i, bool shortName) const
+TQString KLocale::monthName(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -589,10 +589,10 @@ QString KLocale::monthName(int i, bool shortName) const
case 12: return translate("December");
}
- return QString::null;
+ return TQString::null;
}
-QString KLocale::monthNamePossessive(int i, bool shortName) const
+TQString KLocale::monthNamePossessive(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -627,15 +627,15 @@ QString KLocale::monthNamePossessive(int i, bool shortName) const
case 12: return translate("of December");
}
- return QString::null;
+ return TQString::null;
}
-QString KLocale::weekDayName (int i, bool shortName) const
+TQString KLocale::weekDayName (int i, bool shortName) const
{
return calendar()->weekDayName(i, shortName);
}
-void KLocale::insertCatalogue( const QString & catalog )
+void KLocale::insertCatalogue( const TQString & catalog )
{
if ( !d->catalogNames.contains( catalog) ) {
d->catalogNames.append( catalog );
@@ -658,7 +658,7 @@ void KLocale::updateCatalogues( )
// 3.2) else create a new catalog.
// but we will do this later.
- for ( QValueList<KCatalogue>::Iterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end(); )
{
it = d->catalogues.remove(it);
@@ -668,10 +668,10 @@ void KLocale::updateCatalogues( )
// the sequence must be e.g. nds/appname nds/kdelibs nds/kio de/appname de/kdelibs de/kio etc.
// and not nds/appname de/appname nds/kdelibs de/kdelibs etc. Otherwise we would be in trouble with a language
// sequende nds,en_US, de. In this case en_US must hide everything below in the language list.
- for ( QStringList::ConstIterator itLangs = d->languageList.begin();
+ for ( TQStringList::ConstIterator itLangs = d->languageList.begin();
itLangs != d->languageList.end(); ++itLangs)
{
- for ( QStringList::ConstIterator itNames = d->catalogNames.begin();
+ for ( TQStringList::ConstIterator itNames = d->catalogNames.begin();
itNames != d->catalogNames.end(); ++itNames)
{
KCatalogue cat( *itNames, *itLangs ); // create Catalog for this name and this language
@@ -684,7 +684,7 @@ void KLocale::updateCatalogues( )
-void KLocale::removeCatalogue(const QString &catalog)
+void KLocale::removeCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog )) {
d->catalogNames.remove( catalog );
@@ -693,7 +693,7 @@ void KLocale::removeCatalogue(const QString &catalog)
}
}
-void KLocale::setActiveCatalogue(const QString &catalog)
+void KLocale::setActiveCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog ) ) {
d->catalogNames.remove( catalog );
@@ -710,7 +710,7 @@ KLocale::~KLocale()
d = 0L;
}
-QString KLocale::translate_priv(const char *msgid,
+TQString KLocale::translate_priv(const char *msgid,
const char *fallback,
const char **translated,
int* pluralType ) const
@@ -722,14 +722,14 @@ QString KLocale::translate_priv(const char *msgid,
{
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() ) { // shortcut evaluation if en_US is main language: do not consult the catalogs
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
- for ( QValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
@@ -737,7 +737,7 @@ QString KLocale::translate_priv(const char *msgid,
// the catalog as it will not have an assiciated mo-file. For this default language we can
// immediately pick the fallback string.
if ( (*it).language() == defaultLanguage() ) {
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
const char * text = (*it).translate( msgid );
@@ -751,77 +751,77 @@ QString KLocale::translate_priv(const char *msgid,
if ( pluralType) {
*pluralType = (*it).pluralType(); // remember the plural type information from the catalog that was used
}
- return QString::fromUtf8( text );
+ return TQString::fromUtf8( text );
}
}
// Always use UTF-8 if the string was not found
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
-QString KLocale::translate(const char* msgid) const
+TQString KLocale::translate(const char* msgid) const
{
return translate_priv(msgid, msgid);
}
-QString KLocale::translate( const char *index, const char *fallback) const
+TQString KLocale::translate( const char *index, const char *fallback) const
{
if (!index || !index[0] || !fallback || !fallback[0])
{
kdDebug(173) << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() )
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
char *newstring = new char[strlen(index) + strlen(fallback) + 5];
sprintf(newstring, "_: %s\n%s", index, fallback);
- // as copying QString is very fast, it looks slower as it is ;/
- QString r = translate_priv(newstring, fallback);
+ // as copying TQString is very fast, it looks slower as it is ;/
+ TQString r = translate_priv(newstring, fallback);
delete [] newstring;
return r;
}
-static QString put_n_in(const QString &orig, unsigned long n)
+static TQString put_n_in(const TQString &orig, unsigned long n)
{
- QString ret = orig;
+ TQString ret = orig;
int index = ret.find("%n");
if (index == -1)
return ret;
- ret.replace(index, 2, QString::number(n));
+ ret.replace(index, 2, TQString::number(n));
return ret;
}
#define EXPECT_LENGTH(x) \
if (forms.count() != x) { \
kdError() << "translation of \"" << singular << "\" doesn't contain " << x << " different plural forms as expected\n"; \
- return QString( "BROKEN TRANSLATION %1" ).arg( singular ); }
+ return TQString( "BROKEN TRANSLATION %1" ).arg( singular ); }
-QString KLocale::translate( const char *singular, const char *plural,
+TQString KLocale::translate( const char *singular, const char *plural,
unsigned long n ) const
{
if (!singular || !singular[0] || !plural || !plural[0])
{
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
char *newstring = new char[strlen(singular) + strlen(plural) + 6];
sprintf(newstring, "_n: %s\n%s", singular, plural);
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
int pluralType = -1;
- QString r = translate_priv(newstring, 0, 0, &pluralType);
+ TQString r = translate_priv(newstring, 0, 0, &pluralType);
delete [] newstring;
if ( r.isEmpty() || useDefaultLanguage() || pluralType == -1) {
if ( n == 1 ) {
- return put_n_in( QString::fromUtf8( singular ), n );
+ return put_n_in( TQString::fromUtf8( singular ), n );
} else {
- QString tmp = QString::fromUtf8( plural );
+ TQString tmp = TQString::fromUtf8( plural );
#ifndef NDEBUG
if (tmp.find("%n") == -1) {
kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl;
@@ -831,7 +831,7 @@ QString KLocale::translate( const char *singular, const char *plural,
}
}
- QStringList forms = QStringList::split( "\n", r, false );
+ TQStringList forms = TQStringList::split( "\n", r, false );
switch ( pluralType ) {
case 0: // NoPlural
EXPECT_LENGTH( 1 );
@@ -950,31 +950,31 @@ QString KLocale::translate( const char *singular, const char *plural,
}
kdFatal() << "The function should have been returned in another way\n";
- return QString::null;
+ return TQString::null;
}
-QString KLocale::translateQt( const char *context, const char *source,
+TQString KLocale::translateQt( const char *context, const char *source,
const char *message) const
{
if (!source || !source[0]) {
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() ) {
- return QString::null;
+ return TQString::null;
}
char *newstring = 0;
const char *translation = 0;
- QString r;
+ TQString r;
if ( message && message[0]) {
char *newstring = new char[strlen(source) + strlen(message) + 5];
sprintf(newstring, "_: %s\n%s", source, message);
const char *translation = 0;
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
r = translate_priv(newstring, source, &translation);
delete [] newstring;
if (translation)
@@ -984,7 +984,7 @@ QString KLocale::translateQt( const char *context, const char *source,
if ( context && context[0] && message && message[0]) {
newstring = new char[strlen(context) + strlen(message) + 5];
sprintf(newstring, "_: %s\n%s", context, message);
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
r = translate_priv(newstring, source, &translation);
delete [] newstring;
if (translation)
@@ -994,7 +994,7 @@ QString KLocale::translateQt( const char *context, const char *source,
r = translate_priv(source, source, &translation);
if (translation)
return r;
- return QString::null;
+ return TQString::null;
}
bool KLocale::nounDeclension() const
@@ -1021,43 +1021,43 @@ bool KLocale::weekStartsMonday() const //deprecated
return (d->weekStartDay==1);
}
-QString KLocale::decimalSymbol() const
+TQString KLocale::decimalSymbol() const
{
doFormatInit();
return m_decimalSymbol;
}
-QString KLocale::thousandsSeparator() const
+TQString KLocale::thousandsSeparator() const
{
doFormatInit();
return m_thousandsSeparator;
}
-QString KLocale::currencySymbol() const
+TQString KLocale::currencySymbol() const
{
doFormatInit();
return m_currencySymbol;
}
-QString KLocale::monetaryDecimalSymbol() const
+TQString KLocale::monetaryDecimalSymbol() const
{
doFormatInit();
return m_monetaryDecimalSymbol;
}
-QString KLocale::monetaryThousandsSeparator() const
+TQString KLocale::monetaryThousandsSeparator() const
{
doFormatInit();
return m_monetaryThousandsSeparator;
}
-QString KLocale::positiveSign() const
+TQString KLocale::positiveSign() const
{
doFormatInit();
return m_positiveSign;
}
-QString KLocale::negativeSign() const
+TQString KLocale::negativeSign() const
{
doFormatInit();
return m_negativeSign;
@@ -1093,26 +1093,26 @@ KLocale::SignPosition KLocale::negativeMonetarySignPosition() const
return m_negativeMonetarySignPosition;
}
-static inline void put_it_in( QChar *buffer, uint& index, const QString &s )
+static inline void put_it_in( TQChar *buffer, uint& index, const TQString &s )
{
for ( uint l = 0; l < s.length(); l++ )
buffer[index++] = s.at( l );
}
-static inline void put_it_in( QChar *buffer, uint& index, int number )
+static inline void put_it_in( TQChar *buffer, uint& index, int number )
{
buffer[index++] = number / 10 + '0';
buffer[index++] = number % 10 + '0';
}
// insert (thousands)-"separator"s into the non-fractional part of str
-static void _insertSeparator(QString &str, const QString &separator,
- const QString &decimalSymbol)
+static void _insertSeparator(TQString &str, const TQString &separator,
+ const TQString &decimalSymbol)
{
// leave fractional part untouched
- QString mainPart = str.section(decimalSymbol, 0, 0);
- QString fracPart = str.section(decimalSymbol, 1, 1,
- QString::SectionIncludeLeadingSep);
+ TQString mainPart = str.section(decimalSymbol, 0, 0);
+ TQString fracPart = str.section(decimalSymbol, 1, 1,
+ TQString::SectionIncludeLeadingSep);
for (int pos = mainPart.length() - 3; pos > 0; pos -= 3)
mainPart.insert(pos, separator);
@@ -1120,22 +1120,22 @@ static void _insertSeparator(QString &str, const QString &separator,
str = mainPart + fracPart;
}
-QString KLocale::formatMoney(double num,
- const QString & symbol,
+TQString KLocale::formatMoney(double num,
+ const TQString & symbol,
int precision) const
{
// some defaults
- QString currency = symbol.isNull()
+ TQString currency = symbol.isNull()
? currencySymbol()
: symbol;
if (precision < 0) precision = fracDigits();
// the number itself
bool neg = num < 0;
- QString res = QString::number(neg?-num:num, 'f', precision);
+ TQString res = TQString::number(neg?-num:num, 'f', precision);
// Replace dot with locale decimal separator
- res.replace(QChar('.'), monetaryDecimalSymbol());
+ res.replace(TQChar('.'), monetaryDecimalSymbol());
// Insert the thousand separators
_insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol());
@@ -1144,7 +1144,7 @@ QString KLocale::formatMoney(double num,
int signpos = neg
? negativeMonetarySignPosition()
: positiveMonetarySignPosition();
- QString sign = neg
+ TQString sign = neg
? negativeSign()
: positiveSign();
@@ -1181,30 +1181,30 @@ QString KLocale::formatMoney(double num,
return res;
}
-QString KLocale::formatMoney(const QString &numStr) const
+TQString KLocale::formatMoney(const TQString &numStr) const
{
return formatMoney(numStr.toDouble());
}
-QString KLocale::formatNumber(double num, int precision) const
+TQString KLocale::formatNumber(double num, int precision) const
{
if (precision == -1) precision = 2;
- // no need to round since QString::number does this for us
- return formatNumber(QString::number(num, 'f', precision), false, 0);
+ // no need to round since TQString::number does this for us
+ return formatNumber(TQString::number(num, 'f', precision), false, 0);
}
-QString KLocale::formatLong(long num) const
+TQString KLocale::formatLong(long num) const
{
return formatNumber((double)num, 0);
}
-QString KLocale::formatNumber(const QString &numStr) const
+TQString KLocale::formatNumber(const TQString &numStr) const
{
return formatNumber(numStr, true, 2);
}
// increase the digit at 'position' by one
-static void _inc_by_one(QString &str, int position)
+static void _inc_by_one(TQString &str, int position)
{
for (int i = position; i >= 0; i--)
{
@@ -1250,7 +1250,7 @@ static void _inc_by_one(QString &str, int position)
}
// Cut off if more digits in fractional part than 'precision'
-static void _round(QString &str, int precision)
+static void _round(TQString &str, int precision)
{
int decimalSymbolPos = str.find('.');
@@ -1263,7 +1263,7 @@ static void _round(QString &str, int precision)
}
// fill up with more than enough zeroes (in case fractional part too short)
- str.append(QString().fill('0', precision));
+ str.append(TQString().fill('0', precision));
// Now decide whether to round up or down
char last_char = str[decimalSymbolPos + precision + 1].latin1();
@@ -1294,12 +1294,12 @@ static void _round(QString &str, int precision)
if (precision == 0) str = str.section('.', 0, 0);
}
-QString KLocale::formatNumber(const QString &numStr, bool round,
+TQString KLocale::formatNumber(const TQString &numStr, bool round,
int precision) const
{
- QString tmpString = numStr;
+ TQString tmpString = numStr;
if ((round && precision < 0) ||
- ! QRegExp("^[+-]?\\d+(\\.\\d+)*(e[+-]?\\d+)?$").exactMatch(tmpString))
+ ! TQRegExp("^[+-]?\\d+(\\.\\d+)*(e[+-]?\\d+)?$").exactMatch(tmpString))
return numStr;
@@ -1308,16 +1308,16 @@ QString KLocale::formatNumber(const QString &numStr, bool round,
if (neg || tmpString[0] == '+') tmpString.remove(0, 1);
// Split off exponential part (including 'e'-symbol)
- QString mantString = tmpString.section('e', 0, 0,
- QString::SectionCaseInsensitiveSeps);
- QString expString = tmpString.section('e', 1, 1,
- QString::SectionCaseInsensitiveSeps |
- QString::SectionIncludeLeadingSep);
+ TQString mantString = tmpString.section('e', 0, 0,
+ TQString::SectionCaseInsensitiveSeps);
+ TQString expString = tmpString.section('e', 1, 1,
+ TQString::SectionCaseInsensitiveSeps |
+ TQString::SectionIncludeLeadingSep);
if (round) _round(mantString, precision);
// Replace dot with locale decimal separator
- mantString.replace(QChar('.'), decimalSymbol());
+ mantString.replace(TQChar('.'), decimalSymbol());
// Insert the thousand separators
_insertSeparator(mantString, thousandsSeparator(), decimalSymbol());
@@ -1328,11 +1328,11 @@ QString KLocale::formatNumber(const QString &numStr, bool round,
return mantString + expString;
}
-QString KLocale::formatDate(const QDate &pDate, bool shortFormat) const
+TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
- const QString rst = shortFormat?dateFormatShort():dateFormat();
+ const TQString rst = shortFormat?dateFormatShort():dateFormat();
- QString buffer;
+ TQString buffer;
if ( ! pDate.isValid() ) return buffer;
@@ -1408,9 +1408,9 @@ void KLocale::setMainCatalogue(const char *catalog)
maincatalogue = catalog;
}
-double KLocale::readNumber(const QString &_str, bool * ok) const
+double KLocale::readNumber(const TQString &_str, bool * ok) const
{
- QString str = _str.stripWhiteSpace();
+ TQString str = _str.stripWhiteSpace();
bool neg = str.find(negativeSign()) == 0;
if (neg)
str.remove( 0, negativeSign().length() );
@@ -1418,7 +1418,7 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
/* will hold the scientific notation portion of the number.
Example, with 2.34E+23, exponentialPart == "E+23"
*/
- QString exponentialPart;
+ TQString exponentialPart;
int EPos;
EPos = str.find('E', 0, false);
@@ -1430,8 +1430,8 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
}
int pos = str.find(decimalSymbol());
- QString major;
- QString minor;
+ TQString major;
+ TQString minor;
if ( pos == -1 )
major = str;
else
@@ -1465,7 +1465,7 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
return 0.0;
}
- QString tot;
+ TQString tot;
if (neg) tot = '-';
tot += major + '.' + minor + exponentialPart;
@@ -1473,12 +1473,12 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
return tot.toDouble(ok);
}
-double KLocale::readMoney(const QString &_str, bool * ok) const
+double KLocale::readMoney(const TQString &_str, bool * ok) const
{
- QString str = _str.stripWhiteSpace();
+ TQString str = _str.stripWhiteSpace();
bool neg = false;
bool currencyFound = false;
- QString symbol = currencySymbol();
+ TQString symbol = currencySymbol();
// First try removing currency symbol from either end
int pos = str.find(symbol);
if ( pos == 0 || pos == (int) str.length()-symbol.length() )
@@ -1528,8 +1528,8 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
// And parse the rest as a number
pos = str.find(monetaryDecimalSymbol());
- QString major;
- QString minior;
+ TQString major;
+ TQString minior;
if (pos == -1)
major = str;
else
@@ -1562,7 +1562,7 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
return 0.0;
}
- QString tot;
+ TQString tot;
if (neg) tot = '-';
tot += major + '.' + minior;
return tot.toDouble(ok);
@@ -1574,7 +1574,7 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
* @param pos the position to start at. It will be updated when we parse it.
* @return the integer read in the string, or -1 if no string
*/
-static int readInt(const QString &str, uint &pos)
+static int readInt(const TQString &str, uint &pos)
{
if (!str.at(pos).isDigit()) return -1;
int result = 0;
@@ -1587,27 +1587,27 @@ static int readInt(const QString &str, uint &pos)
return result;
}
-QDate KLocale::readDate(const QString &intstr, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
{
- QDate date;
+ TQDate date;
date = readDate(intstr, ShortFormat, ok);
if (date.isValid()) return date;
return readDate(intstr, NormalFormat, ok);
}
-QDate KLocale::readDate(const QString &intstr, ReadDateFlags flags, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
{
- QString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
+ TQString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
return readDate( intstr, fmt, ok );
}
-QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
{
//kdDebug() << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
- QString str = intstr.simplifyWhiteSpace().lower();
+ TQString str = intstr.simplifyWhiteSpace().lower();
int day = -1, month = -1;
// allow the year to be omitted if not in the format
- int year = calendar()->year(QDate::currentDate());
+ int year = calendar()->year(TQDate::currentDate());
uint strpos = 0;
uint fmtpos = 0;
@@ -1618,7 +1618,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
while (fmt.length() > fmtpos && str.length() > strpos && !error)
{
- QChar c = fmt.at(fmtpos++);
+ TQChar c = fmt.at(fmtpos++);
if (c != '%') {
if (c.isSpace() && str.at(strpos).isSpace())
@@ -1642,7 +1642,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
error = true;
j = 1;
while (error && (j < 8)) {
- QString s = calendar()->weekDayName(j, c == 'a').lower();
+ TQString s = calendar()->weekDayName(j, c == 'a').lower();
int len = s.length();
if (str.mid(strpos, len) == s)
{
@@ -1659,7 +1659,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
if (d->nounDeclension && d->dateMonthNamePossessive) {
j = 1;
while (error && (j < 13)) {
- QString s = calendar()->monthNamePossessive(j, year, c == 'b').lower();
+ TQString s = calendar()->monthNamePossessive(j, year, c == 'b').lower();
int len = s.length();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1671,7 +1671,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
}
j = 1;
while (error && (j < 13)) {
- QString s = calendar()->monthName(j, year, c == 'b').lower();
+ TQString s = calendar()->monthName(j, year, c == 'b').lower();
int len = s.length();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1720,7 +1720,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
{
if (ok) *ok = true;
- QDate result;
+ TQDate result;
calendar()->setYMD(result, year, month, day);
return result;
@@ -1728,24 +1728,24 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
else
{
if (ok) *ok = false;
- return QDate(); // invalid date
+ return TQDate(); // invalid date
}
}
-QTime KLocale::readTime(const QString &intstr, bool *ok) const
+TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
{
- QTime _time;
+ TQTime _time;
_time = readTime(intstr, WithSeconds, ok);
if (_time.isValid()) return _time;
return readTime(intstr, WithoutSeconds, ok);
}
-QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) const
+TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
{
- QString str = intstr.simplifyWhiteSpace().lower();
- QString Format = timeFormat().simplifyWhiteSpace();
+ TQString str = intstr.simplifyWhiteSpace().lower();
+ TQString Format = timeFormat().simplifyWhiteSpace();
if (flags & WithoutSeconds)
- Format.remove(QRegExp(".%S"));
+ Format.remove(TQRegExp(".%S"));
int hour = -1, minute = -1;
int second = ( (flags & WithoutSeconds) == 0 ) ? -1 : 0; // don't require seconds
@@ -1758,7 +1758,7 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
{
if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error;
- QChar c = Format.at(Formatpos++);
+ TQChar c = Format.at(Formatpos++);
if (c != '%')
{
@@ -1778,7 +1778,7 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
{
case 'p':
{
- QString s;
+ TQString s;
s = translate("pm").lower();
int len = s.length();
if (str.mid(strpos, len) == s)
@@ -1839,27 +1839,27 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
}
if (ok) *ok = true;
- return QTime(hour, minute, second);
+ return TQTime(hour, minute, second);
error:
if (ok) *ok = false;
// ######## KDE4: remove this
- return QTime(-1, -1, -1); // return invalid date if it didn't work
+ return TQTime(-1, -1, -1); // return invalid date if it didn't work
}
//BIC: merge with below
-QString KLocale::formatTime(const QTime &pTime, bool includeSecs) const
+TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs) const
{
return formatTime( pTime, includeSecs, false );
}
-QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuration) const
+TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
{
- const QString rst = timeFormat();
+ const TQString rst = timeFormat();
// only "pm/am" here can grow, the rest shrinks, but
// I'm rather safe than sorry
- QChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
+ TQChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
uint index = 0;
bool escape = false;
@@ -1917,7 +1917,7 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
case 'p':
if ( !isDuration )
{
- QString s;
+ TQString s;
if ( pTime.hour() >= 12 )
put_it_in( buffer, index, translate("pm") );
else
@@ -1931,7 +1931,7 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
escape = false;
}
}
- QString ret( buffer, index );
+ TQString ret( buffer, index );
delete [] buffer;
if ( isDuration ) // eliminate trailing-space due to " %p"
return ret.stripWhiteSpace();
@@ -1941,24 +1941,24 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
bool KLocale::use12Clock() const
{
- if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) ||
- (timeFormat().contains(QString::fromLatin1("%l")) > 0))
+ if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) ||
+ (timeFormat().contains(TQString::fromLatin1("%l")) > 0))
return true;
else
return false;
}
-QString KLocale::languages() const
+TQString KLocale::languages() const
{
- return d->languageList.join( QString::fromLatin1(":") );
+ return d->languageList.join( TQString::fromLatin1(":") );
}
-QStringList KLocale::languageList() const
+TQStringList KLocale::languageList() const
{
return d->languageList;
}
-QString KLocale::formatDateTime(const QDateTime &pDateTime,
+TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
bool shortFormat,
bool includeSeconds) const
{
@@ -1967,31 +1967,31 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
.arg( formatTime( pDateTime.time(), includeSeconds ) );
}
-QString i18n(const char* text)
+TQString i18n(const char* text)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(text);
- return QString::fromUtf8(text);
+ return TQString::fromUtf8(text);
}
-QString i18n(const char* index, const char *text)
+TQString i18n(const char* index, const char *text)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(index, text);
- return QString::fromUtf8(text);
+ return TQString::fromUtf8(text);
}
-QString i18n(const char* singular, const char* plural, unsigned long n)
+TQString i18n(const char* singular, const char* plural, unsigned long n)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(singular, plural, n);
if (n == 1)
- return put_n_in(QString::fromUtf8(singular), n);
+ return put_n_in(TQString::fromUtf8(singular), n);
else
- return put_n_in(QString::fromUtf8(plural), n);
+ return put_n_in(TQString::fromUtf8(plural), n);
}
void KLocale::initInstance()
@@ -2001,45 +2001,45 @@ void KLocale::initInstance()
KInstance *app = KGlobal::instance();
if (app) {
- KGlobal::_locale = new KLocale(QString::fromLatin1(app->instanceName()));
+ KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName()));
// only do this for the global instance
- QTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
+ TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
}
else
kdDebug(173) << "no app name available using KLocale - nothing to do\n";
}
-QString KLocale::langLookup(const QString &fname, const char *rtype)
+TQString KLocale::langLookup(const TQString &fname, const char *rtype)
{
- QStringList search;
+ TQStringList search;
// assemble the local search paths
- const QStringList localDoc = KGlobal::dirs()->resourceDirs(rtype);
+ const TQStringList localDoc = KGlobal::dirs()->resourceDirs(rtype);
// look up the different languages
for (int id=localDoc.count()-1; id >= 0; --id)
{
- QStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = KGlobal::locale()->languageList();
langs.append( "en" );
langs.remove( defaultLanguage() );
- QStringList::ConstIterator lang;
+ TQStringList::ConstIterator lang;
for (lang = langs.begin(); lang != langs.end(); ++lang)
- search.append(QString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
+ search.append(TQString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
}
// try to locate the file
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = search.begin(); it != search.end(); ++it)
{
kdDebug(173) << "Looking for help in: " << *it << endl;
- QFileInfo info(*it);
+ TQFileInfo info(*it);
if (info.exists() && info.isFile() && info.isReadable())
return *it;
}
- return QString::null;
+ return TQString::null;
}
bool KLocale::useDefaultLanguage() const
@@ -2052,7 +2052,7 @@ void KLocale::initEncoding(KConfig *)
const int mibDefault = 4; // ISO 8859-1
// This all made more sense when we still had the EncodingEnum config key.
- setEncoding( QTextCodec::codecForLocale()->mibEnum() );
+ setEncoding( TQTextCodec::codecForLocale()->mibEnum() );
if ( !d->codecForEncoding )
{
@@ -2070,30 +2070,30 @@ void KLocale::initFileNameEncoding(KConfig *)
d->utf8FileEncoding = getenv("KDE_UTF8_FILENAMES") != 0;
if (d->utf8FileEncoding)
{
- QFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
- QFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
+ TQFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
+ TQFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
}
// Otherwise, stay with QFile's default filename encoding functions
// which, on Unix platforms, use the locale's codec.
}
-QCString KLocale::encodeFileNameUTF8( const QString & fileName )
+TQCString KLocale::encodeFileNameUTF8( const TQString & fileName )
{
return fileName.utf8();
}
-QString KLocale::decodeFileNameUTF8( const QCString & localFileName )
+TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName )
{
- return QString::fromUtf8(localFileName);
+ return TQString::fromUtf8(localFileName);
}
-void KLocale::setDateFormat(const QString & format)
+void KLocale::setDateFormat(const TQString & format)
{
doFormatInit();
m_dateFormat = format.stripWhiteSpace();
}
-void KLocale::setDateFormatShort(const QString & format)
+void KLocale::setDateFormatShort(const TQString & format)
{
doFormatInit();
m_dateFormatShort = format.stripWhiteSpace();
@@ -2105,7 +2105,7 @@ void KLocale::setDateMonthNamePossessive(bool possessive)
d->dateMonthNamePossessive = possessive;
}
-void KLocale::setTimeFormat(const QString & format)
+void KLocale::setTimeFormat(const TQString & format)
{
doFormatInit();
m_timeFormat = format.stripWhiteSpace();
@@ -2129,44 +2129,44 @@ void KLocale::setWeekStartDay(int day)
d->weekStartDay = day;
}
-QString KLocale::dateFormat() const
+TQString KLocale::dateFormat() const
{
doFormatInit();
return m_dateFormat;
}
-QString KLocale::dateFormatShort() const
+TQString KLocale::dateFormatShort() const
{
doFormatInit();
return m_dateFormatShort;
}
-QString KLocale::timeFormat() const
+TQString KLocale::timeFormat() const
{
doFormatInit();
return m_timeFormat;
}
-void KLocale::setDecimalSymbol(const QString & symbol)
+void KLocale::setDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_decimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setThousandsSeparator(const QString & separator)
+void KLocale::setThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_thousandsSeparator = separator;
}
-void KLocale::setPositiveSign(const QString & sign)
+void KLocale::setPositiveSign(const TQString & sign)
{
doFormatInit();
m_positiveSign = sign.stripWhiteSpace();
}
-void KLocale::setNegativeSign(const QString & sign)
+void KLocale::setNegativeSign(const TQString & sign)
{
doFormatInit();
m_negativeSign = sign.stripWhiteSpace();
@@ -2202,20 +2202,20 @@ void KLocale::setFracDigits(int digits)
m_fracDigits = digits;
}
-void KLocale::setMonetaryThousandsSeparator(const QString & separator)
+void KLocale::setMonetaryThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_monetaryThousandsSeparator = separator;
}
-void KLocale::setMonetaryDecimalSymbol(const QString & symbol)
+void KLocale::setMonetaryDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_monetaryDecimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setCurrencySymbol(const QString & symbol)
+void KLocale::setCurrencySymbol(const TQString & symbol)
{
doFormatInit();
m_currencySymbol = symbol.stripWhiteSpace();
@@ -2246,14 +2246,14 @@ void KLocale::setMeasureSystem(MeasureSystem value)
d->measureSystem = value;
}
-QString KLocale::defaultLanguage()
+TQString KLocale::defaultLanguage()
{
- return QString::fromLatin1("en_US");
+ return TQString::fromLatin1("en_US");
}
-QString KLocale::defaultCountry()
+TQString KLocale::defaultCountry()
{
- return QString::fromLatin1("C");
+ return TQString::fromLatin1("C");
}
const char * KLocale::encoding() const
@@ -2285,38 +2285,38 @@ int KLocale::fileEncodingMib() const
return codecForEncoding()->mibEnum();
}
-QTextCodec * KLocale::codecForEncoding() const
+TQTextCodec * KLocale::codecForEncoding() const
{
return d->codecForEncoding;
}
bool KLocale::setEncoding(int mibEnum)
{
- QTextCodec * codec = QTextCodec::codecForMib(mibEnum);
+ TQTextCodec * codec = TQTextCodec::codecForMib(mibEnum);
if (codec)
d->codecForEncoding = codec;
return codec != 0;
}
-QStringList KLocale::languagesTwoAlpha() const
+TQStringList KLocale::languagesTwoAlpha() const
{
if (d->langTwoAlpha.count())
return d->langTwoAlpha;
- const QStringList &origList = languageList();
+ const TQStringList &origList = languageList();
- QStringList result;
+ TQStringList result;
- KConfig config(QString::fromLatin1("language.codes"), true, false);
+ KConfig config(TQString::fromLatin1("language.codes"), true, false);
config.setGroup("TwoLetterCodes");
- for ( QStringList::ConstIterator it = origList.begin();
+ for ( TQStringList::ConstIterator it = origList.begin();
it != origList.end();
++it )
{
- QString lang = *it;
- QStringList langLst;
+ TQString lang = *it;
+ TQStringList langLst;
if (config.hasKey( lang ))
langLst = config.readListEntry( lang );
else
@@ -2327,7 +2327,7 @@ QStringList KLocale::languagesTwoAlpha() const
langLst << lang;
}
- for ( QStringList::ConstIterator langIt = langLst.begin();
+ for ( TQStringList::ConstIterator langIt = langLst.begin();
langIt != langLst.end();
++langIt )
{
@@ -2339,7 +2339,7 @@ QStringList KLocale::languagesTwoAlpha() const
return result;
}
-QStringList KLocale::allLanguagesTwoAlpha() const
+TQStringList KLocale::allLanguagesTwoAlpha() const
{
if (!d->languages)
d->languages = new KConfig("all_languages", true, false, "locale");
@@ -2347,12 +2347,12 @@ QStringList KLocale::allLanguagesTwoAlpha() const
return d->languages->groupList();
}
-QString KLocale::twoAlphaToLanguageName(const QString &code) const
+TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
{
if (!d->languages)
d->languages = new KConfig("all_languages", true, false, "locale");
- QString groupName = code;
+ TQString groupName = code;
const int i = groupName.find('_');
groupName.replace(0, i, groupName.left(i).lower());
@@ -2360,28 +2360,28 @@ QString KLocale::twoAlphaToLanguageName(const QString &code) const
return d->languages->readEntry("Name");
}
-QStringList KLocale::allCountriesTwoAlpha() const
+TQStringList KLocale::allCountriesTwoAlpha() const
{
- QStringList countries;
- QStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
- for(QStringList::ConstIterator it = paths.begin();
+ TQStringList countries;
+ TQStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
+ for(TQStringList::ConstIterator it = paths.begin();
it != paths.end(); ++it)
{
- QString code = (*it).mid((*it).length()-16, 2);
+ TQString code = (*it).mid((*it).length()-16, 2);
if (code != "/C")
countries.append(code);
}
return countries;
}
-QString KLocale::twoAlphaToCountryName(const QString &code) const
+TQString KLocale::twoAlphaToCountryName(const TQString &code) const
{
KConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale");
cfg.setGroup("KCM Locale");
return cfg.readEntry("Name");
}
-void KLocale::setCalendar(const QString & calType)
+void KLocale::setCalendar(const TQString & calType)
{
doFormatInit();
@@ -2391,7 +2391,7 @@ void KLocale::setCalendar(const QString & calType)
d->calendar = 0;
}
-QString KLocale::calendarType() const
+TQString KLocale::calendarType() const
{
doFormatInit();
@@ -2448,8 +2448,8 @@ KLocale & KLocale::operator=(const KLocale & rhs)
return *this;
}
-bool KLocale::setCharset(const QString & ) { return true; }
-QString KLocale::charset() const { return QString::fromLatin1("UTF-8"); }
+bool KLocale::setCharset(const TQString & ) { return true; }
+TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); }
// KDE4: remove
#if 0
diff --git a/kdecore/klocale.h b/kdecore/klocale.h
index 437e4780c..ca665152a 100644
--- a/kdecore/klocale.h
+++ b/kdecore/klocale.h
@@ -22,7 +22,7 @@
#ifndef _KLOCALE_H
#define _KLOCALE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QStringList;
@@ -67,7 +67,7 @@ class KCalendarSystem;
* \relates KLocale
* i18n is the function that does everything you need to translate
* a string. You just wrap around every user visible string a i18n
- * call to get a QString with the string in the user's preferred
+ * call to get a TQString with the string in the user's preferred
* language.
*
* The argument must be an UTF-8 encoded string (If you only use
@@ -75,7 +75,7 @@ class KCalendarSystem;
* for e.g. German umlauts or French accents should be recoded to
* UTF-8)
**/
-KDECORE_EXPORT QString i18n(const char *text);
+KDECORE_EXPORT TQString i18n(const char *text);
/**
* \relates KLocale
@@ -84,7 +84,7 @@ KDECORE_EXPORT QString i18n(const char *text);
* text.
* @see translate
**/
-KDECORE_EXPORT QString i18n(const char *comment, const char *text);
+KDECORE_EXPORT TQString i18n(const char *comment, const char *text);
/**
* \relates KLocale
@@ -97,7 +97,7 @@ KDECORE_EXPORT QString i18n(const char *comment, const char *text);
* depending on n
* @see translate
**/
-KDECORE_EXPORT QString i18n(const char *singular, const char *plural, unsigned long n);
+KDECORE_EXPORT TQString i18n(const char *singular, const char *plural, unsigned long n);
/**
* \relates KLocale
@@ -105,7 +105,7 @@ KDECORE_EXPORT QString i18n(const char *singular, const char *plural, unsigned l
* with our i18n method. We use uic -tr tr2i18n to redirect
* to the right i18n() function
**/
-inline QString tr2i18n(const char* message, const char* =0) {
+inline TQString tr2i18n(const char* message, const char* =0) {
return i18n(message);
}
@@ -141,7 +141,7 @@ public:
* @param catalog The name of the main language file
* @param config The configuration file to use.
*/
- KLocale( const QString& catalog, KConfig *config = 0 );
+ KLocale( const TQString& catalog, KConfig *config = 0 );
/**
* Copy constructor.
@@ -176,7 +176,7 @@ public:
*
* @param index The lookup text and default text, if not found.
*/
- QString translate( const char *index ) const;
+ TQString translate( const char *index ) const;
/**
* Translates the string into the corresponding string in the
@@ -203,7 +203,7 @@ public:
* @param fallback the default text, if not found
* @return translation
*/
- QString translate( const char *comment, const char *fallback) const;
+ TQString translate( const char *comment, const char *fallback) const;
/**
* Used to get the correct, translated singular or plural of a
@@ -215,7 +215,7 @@ public:
* @return the correct singular or plural for the selected language,
* depending on n
*/
- QString translate( const char *singular, const char *plural,
+ TQString translate( const char *singular, const char *plural,
unsigned long n) const;
/**
@@ -236,7 +236,7 @@ public:
*
* @return True on success.
*/
- bool setLanguage(const QString & language);
+ bool setLanguage(const TQString & language);
/**
* Changes the list of prefed languages for the locale. The first valid
@@ -247,7 +247,7 @@ public:
*
* @return True if one of the specified languages were used.
*/
- bool setLanguage(const QStringList & languages);
+ bool setLanguage(const TQStringList & languages);
/**
* Changes the current country. The current country will be left
@@ -258,7 +258,7 @@ public:
*
* @return True on success.
*/
- bool setCountry(const QString & country);
+ bool setCountry(const TQString & country);
/**
* Various positions for where to place the positive or negative
@@ -274,7 +274,7 @@ public:
*
* @return The decimal symbol used by locale.
*/
- QString decimalSymbol() const;
+ TQString decimalSymbol() const;
/**
* Returns what the thousands separator should look
@@ -283,7 +283,7 @@ public:
*
* @return The thousands separator used by locale.
*/
- QString thousandsSeparator() const;
+ TQString thousandsSeparator() const;
/**
* Returns what the symbol denoting currency in the current locale
@@ -291,7 +291,7 @@ public:
*
* @return The default currency symbol used by locale.
*/
- QString currencySymbol() const;
+ TQString currencySymbol() const;
/**
* Returns what a decimal point should look like ("." or "," etc.)
@@ -300,7 +300,7 @@ public:
*
* @return The monetary decimal symbol used by locale.
*/
- QString monetaryDecimalSymbol() const;
+ TQString monetaryDecimalSymbol() const;
/**
* Returns what a thousands separator for monetary values should
@@ -309,7 +309,7 @@ public:
*
* @return The monetary thousands separator used by locale.
*/
- QString monetaryThousandsSeparator() const;
+ TQString monetaryThousandsSeparator() const;
/**
* Returns what a positive sign should look like ("+", " ", etc.)
@@ -317,7 +317,7 @@ public:
*
* @return The positive sign used by locale.
*/
- QString positiveSign() const;
+ TQString positiveSign() const;
/**
* Returns what a negative sign should look like ("-", etc.)
@@ -325,7 +325,7 @@ public:
*
* @return The negative sign used by locale.
*/
- QString negativeSign() const;
+ TQString negativeSign() const;
/**
* The number of fractional digits to include in numeric/monetary
@@ -383,8 +383,8 @@ public:
* @return The number of money as a localized string
* @see fracDigits()
*/
- QString formatMoney(double num,
- const QString & currency = QString::null,
+ TQString formatMoney(double num,
+ const TQString & currency = TQString::null,
int digits = -1) const;
/**
@@ -400,18 +400,18 @@ public:
* @param precision Number of fractional digits used.
*
* @return The number as a localized string
- * @see formatNumber(const QString, bool, int)
+ * @see formatNumber(const TQString, bool, int)
*/
- QString formatNumber(double num, int precision = -1) const;
+ TQString formatNumber(double num, int precision = -1) const;
/**
* @deprecated
*
- * KDE 4.0: merge with formatNumber(const QString int)
+ * KDE 4.0: merge with formatNumber(const TQString int)
*
* calls formatNumber(numStr, 2)
*/
- QString formatNumber(const QString &numStr) const KDE_DEPRECATED;
+ TQString formatNumber(const TQString &numStr) const KDE_DEPRECATED;
/**
* Given a string representing a number, converts that to a numeric
@@ -426,7 +426,7 @@ public:
* @return The number as a localized string
* @since 3.5
*/
- QString formatNumber(const QString &numStr, bool round, int precision) const;
+ TQString formatNumber(const TQString &numStr, bool round, int precision) const;
/**
* Given an integer, converts that to a numeric string containing
@@ -439,7 +439,7 @@ public:
* @return The number as a localized string
* @since 3.2
*/
- QString formatLong(long num) const;
+ TQString formatLong(long num) const;
/**
* Use this to determine whether nouns are declined in
@@ -460,7 +460,7 @@ public:
*
* @return The date as a string
*/
- QString formatDate(const QDate &pDate, bool shortFormat = false) const;
+ TQString formatDate(const TQDate &pDate, bool shortFormat = false) const;
/**
* Use this to determine whether in dates a possessive form of month
@@ -483,7 +483,7 @@ public:
*
* @return The time as a string
*/
- QString formatTime(const QTime &pTime, bool includeSecs, bool isDuration /*=false*/) const;
+ TQString formatTime(const TQTime &pTime, bool includeSecs, bool isDuration /*=false*/) const;
/**
* Returns a string formatted to the current locale's conventions
@@ -495,7 +495,7 @@ public:
*
* @return The time as a string
*/
- QString formatTime(const QTime &pTime, bool includeSecs = false) const; // BIC: merge with above
+ TQString formatTime(const TQTime &pTime, bool includeSecs = false) const; // BIC: merge with above
/**
* Use this to determine if the user wants a 12 hour clock.
@@ -534,7 +534,7 @@ public:
* @return The name of the month
*
* Typically the correct replacement for this deprecated class is
- * calendar()->monthString(), which requires a QDate (rather than an
+ * calendar()->monthString(), which requires a TQDate (rather than an
* integer month) or both a month and a year.
* This will work across different calendars.
* Note that you also need to add
@@ -543,7 +543,7 @@ public:
* \endcode
* to the applicable file.
*/
- QString monthName(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString monthName(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* @deprecated
@@ -559,7 +559,7 @@ public:
* @since 3.1
*
* Typically the correct replacement for this deprecated class is
- * calendar()->monthNamePossessive(), which requires a QDate (rather than
+ * calendar()->monthNamePossessive(), which requires a TQDate (rather than
* an integer month) or both a month and a year.
* This will work across different calendars.
* Note that you also need to add
@@ -568,7 +568,7 @@ public:
* \endcode
* to the applicable file.
*/
- QString monthNamePossessive(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString monthNamePossessive(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* @deprecated use calendar()->weekDayName
@@ -580,7 +580,7 @@ public:
*
* @return The name of the day
*/
- QString weekDayName(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString weekDayName(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* Returns a pointer to the calendar system object.
@@ -597,7 +597,7 @@ public:
* @return the name of the calendar system
* @since 3.2
*/
- QString calendarType() const;
+ TQString calendarType() const;
/**
* Changes the current calendar system to the calendar specified.
@@ -607,7 +607,7 @@ public:
* @param calendarType the name of the calendar type
* @since 3.2
*/
- void setCalendar(const QString & calendarType);
+ void setCalendar(const TQString & calendarType);
/**
* Returns a string formated to the current locale's conventions
@@ -619,7 +619,7 @@ public:
*
* @return The date and time as a string
*/
- QString formatDateTime(const QDateTime &pDateTime,
+ TQString formatDateTime(const TQDateTime &pDateTime,
bool shortFormat = true,
bool includeSecs = false) const;
@@ -632,7 +632,7 @@ public:
*
* @return The string converted to a double
*/
- double readMoney(const QString &numStr, bool * ok = 0) const;
+ double readMoney(const TQString &numStr, bool * ok = 0) const;
/**
* Converts a localized numeric string to a double.
@@ -643,10 +643,10 @@ public:
*
* @return The string converted to a double
*/
- double readNumber(const QString &numStr, bool * ok = 0) const;
+ double readNumber(const TQString &numStr, bool * ok = 0) const;
/**
- * Converts a localized date string to a QDate.
+ * Converts a localized date string to a TQDate.
* The bool pointed by ok will be invalid if the date entered was not valid.
*
* @param str the string we want to convert.
@@ -655,13 +655,13 @@ public:
*
* @return The string converted to a QDate
*/
- QDate readDate(const QString &str, bool* ok = 0) const;
+ TQDate readDate(const TQString &str, bool* ok = 0) const;
/**
- * Converts a localized date string to a QDate, using the specified format.
+ * Converts a localized date string to a TQDate, using the specified format.
* You will usually not want to use this method.
*/
- QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
+ TQDate readDate( const TQString &intstr, const TQString &fmt, bool* ok = 0) const;
enum ReadDateFlags {
NormalFormat = 1,
@@ -669,7 +669,7 @@ public:
};
/**
- * Converts a localized date string to a QDate.
+ * Converts a localized date string to a TQDate.
* This method is stricter than readDate(str,&ok): it will either accept
* a date in full format or a date in short format, depending on @p flags.
*
@@ -681,10 +681,10 @@ public:
* @return The string converted to a QDate
* @since 3.2
*/
- QDate readDate(const QString &str, ReadDateFlags flags, bool *ok = 0) const;
+ TQDate readDate(const TQString &str, ReadDateFlags flags, bool *ok = 0) const;
/**
- * Converts a localized time string to a QTime.
+ * Converts a localized time string to a TQTime.
* This method will try to parse it with seconds, then without seconds.
* The bool pointed to by @p ok will be set to false if the time entered was
* not valid.
@@ -695,14 +695,14 @@ public:
*
* @return The string converted to a QTime
*/
- QTime readTime(const QString &str, bool* ok = 0) const;
+ TQTime readTime(const TQString &str, bool* ok = 0) const;
enum ReadTimeFlags {
WithSeconds = 0, // default (no flag set)
WithoutSeconds = 1
}; // (maybe use this enum as a bitfield, if adding independent features?)
/**
- * Converts a localized time string to a QTime.
+ * Converts a localized time string to a TQTime.
* This method is stricter than readTime(str,&ok): it will either accept
* a time with seconds or a time without seconds.
* Use this method when the format is known by the application.
@@ -715,7 +715,7 @@ public:
* @return The string converted to a QTime
* @since 3.2
*/
- QTime readTime(const QString &str, ReadTimeFlags flags, bool *ok = 0) const;
+ TQTime readTime(const TQString &str, ReadTimeFlags flags, bool *ok = 0) const;
/**
* Returns the language used by this object. The domain AND the
@@ -724,7 +724,7 @@ public:
*
* @return The currently used language.
*/
- QString language() const;
+ TQString language() const;
/**
* Returns the country code of the country where the user lives.
@@ -732,7 +732,7 @@ public:
*
* @return The country code for the user.
*/
- QString country() const;
+ TQString country() const;
/**
* Returns the preferred languages as ISO 639-1 codes. This means
@@ -747,7 +747,7 @@ public:
*
* @see languageList
*/
- QStringList languagesTwoAlpha() const;
+ TQStringList languagesTwoAlpha() const;
/**
* Returns the languages selected by user. The codes returned here is the
@@ -757,7 +757,7 @@ public:
*
* @see languagesTwoAlpha
*/
- QStringList languageList() const;
+ TQStringList languageList() const;
/**
* Returns the user's preferred encoding.
@@ -786,15 +786,15 @@ public:
* @see encoding
* @see encodingMib
*/
- QTextCodec * codecForEncoding() const;
+ TQTextCodec * codecForEncoding() const;
/**
* Returns the file encoding.
*
* @return The Mib of the file encoding
*
- * @see QFile::encodeName
- * @see QFile::decodeName
+ * @see TQFile::encodeName
+ * @see TQFile::decodeName
*/
int fileEncodingMib() const;
@@ -820,7 +820,7 @@ public:
*
* @param format The new date format
*/
- void setDateFormat(const QString & format);
+ void setDateFormat(const TQString & format);
/**
* Changes the current short date format.
*
@@ -843,7 +843,7 @@ public:
*
* @param format The new short date format
*/
- void setDateFormatShort(const QString & format);
+ void setDateFormatShort(const TQString & format);
/**
* Changes the form of month name used in dates.
*
@@ -870,7 +870,7 @@ public:
*
* @param format The new time format
*/
- void setTimeFormat(const QString & format);
+ void setTimeFormat(const TQString & format);
/**
* @deprecated
@@ -896,47 +896,47 @@ public:
* @return Current date format.
* @see setDateFormat()
*/
- QString dateFormat() const;
+ TQString dateFormat() const;
/**
* Returns the currently selected short date format.
*
* @return Current short date format.
* @see setDateFormatShort()
*/
- QString dateFormatShort() const;
+ TQString dateFormatShort() const;
/**
* Returns the currently selected time format.
*
* @return Current time format.
* @see setTimeFormat()
*/
- QString timeFormat() const;
+ TQString timeFormat() const;
/**
* Changes the symbol used to identify the decimal pointer.
*
* @param symbol The new decimal symbol.
*/
- void setDecimalSymbol(const QString & symbol);
+ void setDecimalSymbol(const TQString & symbol);
/**
* Changes the separator used to group digits when formating numbers.
*
* @param separator The new thousands separator.
*/
- void setThousandsSeparator(const QString & separator);
+ void setThousandsSeparator(const TQString & separator);
/**
* Changes the sign used to identify a positive number. Normally this is
* left blank.
*
* @param sign Sign used for positive numbers.
*/
- void setPositiveSign(const QString & sign);
+ void setPositiveSign(const TQString & sign);
/**
* Changes the sign used to identify a negative number.
*
* @param sign Sign used for negative numbers.
*/
- void setNegativeSign(const QString & sign);
+ void setNegativeSign(const TQString & sign);
/**
* Changes the sign position used for positive monetary values.
*
@@ -976,32 +976,32 @@ public:
*
* @param separator The new thousands separator.
*/
- void setMonetaryThousandsSeparator(const QString & separator);
+ void setMonetaryThousandsSeparator(const TQString & separator);
/**
* Changes the symbol used to identify the decimal pointer for monetary
* values.
*
* @param symbol The new decimal symbol.
*/
- void setMonetaryDecimalSymbol(const QString & symbol);
+ void setMonetaryDecimalSymbol(const TQString & symbol);
/**
* Changes the current currency symbol.
*
* @param symbol The new currency symbol
*/
- void setCurrencySymbol(const QString & symbol);
+ void setCurrencySymbol(const TQString & symbol);
/**
* Returns the preferred page size for printing.
*
- * @return The preferred page size, cast it to QPrinter::PageSize
+ * @return The preferred page size, cast it to TQPrinter::PageSize
*/
int pageSize() const;
/**
* Changes the preferred page size when printing.
*
- * @param paperFormat the new preferred page size in the format QPrinter::PageSize
+ * @param paperFormat the new preferred page size in the format TQPrinter::PageSize
*/
void setPageSize(int paperFormat);
@@ -1035,28 +1035,28 @@ public:
*
* @param catalog The catalog to add.
*/
- void insertCatalogue(const QString& catalog);
+ void insertCatalogue(const TQString& catalog);
/**
* Removes a catalog for translation lookup.
* @param catalog The catalog to remove.
* @see insertCatalogue()
*/
- void removeCatalogue(const QString &catalog);
+ void removeCatalogue(const TQString &catalog);
/**
* Sets the active catalog for translation lookup.
* @param catalog The catalog to activate.
*/
- void setActiveCatalogue(const QString &catalog);
+ void setActiveCatalogue(const TQString &catalog);
/**
* Translates a message as a QTranslator is supposed to.
* The parameters are similar to i18n(), but the result
- * value has other semantics (it can be QString::null)
+ * value has other semantics (it can be TQString::null)
* @since 3.1
**/
- QString translateQt(const char *context,
+ TQString translateQt(const char *context,
const char *sourceText,
const char *message) const;
@@ -1065,7 +1065,7 @@ public:
* @return a list of all language codes
* @since 3.1
*/
- QStringList allLanguagesTwoAlpha() const;
+ TQStringList allLanguagesTwoAlpha() const;
/**
* Convert a ISO 639-1 code to a human readable form.
@@ -1073,14 +1073,14 @@ public:
* @return the human readable form
* @since 3.1
*/
- QString twoAlphaToLanguageName(const QString &code) const;
+ TQString twoAlphaToLanguageName(const TQString &code) const;
/**
* Returns list of all known country codes.
* @return a list of all country codes
* @since 3.1
*/
- QStringList allCountriesTwoAlpha() const;
+ TQStringList allCountriesTwoAlpha() const;
/**
* Convert a country code to a human readable form.
@@ -1088,7 +1088,7 @@ public:
* @return the human readable form of the country name
* @since 3.1
*/
- QString twoAlphaToCountryName(const QString &code) const;
+ TQString twoAlphaToCountryName(const TQString &code) const;
/**
* Returns the parts of the parameter str understood as language setting
@@ -1099,10 +1099,10 @@ public:
* @param country This will be set to the country part of the string.
* @param charset This will be set to the charset part of the string.
*/
- static void splitLocale(const QString & str,
- QString & language,
- QString & country,
- QString & charset);
+ static void splitLocale(const TQString & str,
+ TQString & language,
+ TQString & country,
+ TQString & charset);
/**
* Use this as main catalog for *all* KLocales, if not the appname
@@ -1120,27 +1120,27 @@ public:
* @param fname relative path to find
* @param rtype resource type to use
*/
- static QString langLookup(const QString &fname, const char *rtype = "html");
+ static TQString langLookup(const TQString &fname, const char *rtype = "html");
/**
* Returns the name of the internal language.
*
* @return Name of the default language
*/
- static QString defaultLanguage();
+ static TQString defaultLanguage();
/**
* Returns the name of the default country.
*
* @return Name of the default country
*/
- static QString defaultCountry();
+ static TQString defaultCountry();
/**
* @internal Called from KConfigBackend to initialize language.
*/
- static QString _initLanguage(KConfigBase *config);
+ static TQString _initLanguage(KConfigBase *config);
#ifdef KDE_NO_COMPAT
private:
@@ -1149,7 +1149,7 @@ private:
* @deprecated
* use formatMoney(double)
*/
- QString formatMoney(const QString &numStr) const KDE_DEPRECATED;
+ TQString formatMoney(const TQString &numStr) const KDE_DEPRECATED;
/**
* @deprecated
@@ -1157,19 +1157,19 @@ private:
*
* @return String containing language codes separated by colons
*/
- QString languages() const KDE_DEPRECATED;
+ TQString languages() const KDE_DEPRECATED;
/**
* @deprecated
* @return True
*/
- bool setCharset(const QString & charset) KDE_DEPRECATED;
+ bool setCharset(const TQString & charset) KDE_DEPRECATED;
/**
* @deprecated
* @see encoding
*/
- QString charset() const KDE_DEPRECATED;
+ TQString charset() const KDE_DEPRECATED;
protected:
/**
@@ -1193,7 +1193,7 @@ private:
* @param config The configuration object used for init
* @param useEnv True if we should use environment variables
*/
- void initMainCatalogues(const QString & catalog);
+ void initMainCatalogues(const TQString & catalog);
/**
* @internal Initializes the list of valid languages from the user's point of view. This is the list of
@@ -1214,19 +1214,19 @@ private:
/**
* @internal Figures out which encoding the user prefers for filenames
- * and sets up the appropriate QFile encoding and decoding functions.
+ * and sets up the appropriate TQFile encoding and decoding functions.
*/
void initFileNameEncoding(KConfig *config);
/**
- * @internal A QFile filename encoding function (QFile::encodeFn).
+ * @internal A TQFile filename encoding function (TQFile::encodeFn).
*/
- static QCString encodeFileNameUTF8( const QString & fileName );
+ static TQCString encodeFileNameUTF8( const TQString & fileName );
/**
- * @internal QFile filename decoding function (QFile::decodeFn).
+ * @internal TQFile filename decoding function (TQFile::decodeFn).
*/
- static QString decodeFileNameUTF8( const QCString & localFileName );
+ static TQString decodeFileNameUTF8( const TQCString & localFileName );
/**
* @internal Changes the file name of the catalog to the correct
@@ -1247,7 +1247,7 @@ private:
/**
* @internal function used by the two translate versions
*/
- QString translate_priv(const char *index,
+ TQString translate_priv(const char *index,
const char *text,
const char ** original = 0,
int* pluralType = 0) const;
@@ -1260,7 +1260,7 @@ private:
/**
* @internal Checks if the specified language is installed
*/
- bool isLanguageInstalled(const QString & language) const;
+ bool isLanguageInstalled(const TQString & language) const;
/**
* @internal evaluate the list of catalogs and check that all instances for all languages are loaded
@@ -1277,7 +1277,7 @@ private:
*
* @param language The language to examine
*/
- int pluralType( const QString & language );
+ int pluralType( const TQString & language );
/**
* @internal Find the plural type information for a given catalog. This catalog will be a kdelibs.mo. Method
@@ -1292,14 +1292,14 @@ private:
* @param language language of the catalog
* @param name name of the catalog
*/
- // const KCatalogue * catalog( const QString & language, const QString & name );
+ // const KCatalogue * catalog( const TQString & language, const TQString & name );
/**
- * @internal Retrieves the file name of the catalog, or QString::null
+ * @internal Retrieves the file name of the catalog, or TQString::null
* if not found.
*/
- static QString catalogueFileName(const QString & language,
+ static TQString catalogueFileName(const TQString & language,
const KCatalogue & catalog);
public:
/**
@@ -1307,28 +1307,28 @@ public:
*
* @param language language to check
*/
- bool isApplicationTranslatedInto( const QString & language);
+ bool isApplicationTranslatedInto( const TQString & language);
private:
// Numbers and money
- QString m_decimalSymbol;
- QString m_thousandsSeparator;
- QString m_currencySymbol;
- QString m_monetaryDecimalSymbol;
- QString m_monetaryThousandsSeparator;
- QString m_positiveSign;
- QString m_negativeSign;
+ TQString m_decimalSymbol;
+ TQString m_thousandsSeparator;
+ TQString m_currencySymbol;
+ TQString m_monetaryDecimalSymbol;
+ TQString m_monetaryThousandsSeparator;
+ TQString m_positiveSign;
+ TQString m_negativeSign;
int m_fracDigits;
SignPosition m_positiveMonetarySignPosition;
SignPosition m_negativeMonetarySignPosition;
// Date and time
- QString m_timeFormat;
- QString m_dateFormat;
- QString m_dateFormatShort;
+ TQString m_timeFormat;
+ TQString m_dateFormat;
+ TQString m_dateFormatShort;
- QString m_language;
- QString m_country;
+ TQString m_language;
+ TQString m_country;
bool m_weekStartsMonday; //### remove for KDE 4.0
bool m_positivePrefixCurrencySymbol;
diff --git a/kdecore/klockfile.cpp b/kdecore/klockfile.cpp
index 41946a36a..3bd6edb30 100644
--- a/kdecore/klockfile.cpp
+++ b/kdecore/klockfile.cpp
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kde_file.h>
#include <kapplication.h>
@@ -47,22 +47,22 @@
class KLockFile::KLockFilePrivate {
public:
- QString file;
+ TQString file;
int staleTime;
bool isLocked;
bool recoverLock;
bool linkCountSupport;
- QTime staleTimer;
+ TQTime staleTimer;
KDE_struct_stat statBuf;
int pid;
- QString hostname;
- QString instance;
- QString lockRecoverFile;
+ TQString hostname;
+ TQString instance;
+ TQString lockRecoverFile;
};
// 30 seconds
-KLockFile::KLockFile(const QString &file)
+KLockFile::KLockFile(const TQString &file)
{
d = new KLockFilePrivate();
d->file = file;
@@ -99,7 +99,7 @@ static bool statResultIsEqual(KDE_struct_stat &st_buf1, KDE_struct_stat &st_buf2
#undef FIELD_EQ
}
-static bool testLinkCountSupport(const QCString &fileName)
+static bool testLinkCountSupport(const TQCString &fileName)
{
KDE_struct_stat st_buf;
// Check if hardlinks raise the link count at all?
@@ -109,14 +109,14 @@ static bool testLinkCountSupport(const QCString &fileName)
return ((result == 0) && (st_buf.st_nlink == 2));
}
-static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
- QCString lockFileName = QFile::encodeName( lockFile );
+ TQCString lockFileName = TQFile::encodeName( lockFile );
int result = KDE_lstat( lockFileName, &st_buf );
if (result == 0)
return KLockFile::LockFail;
- KTempFile uniqueFile(lockFile, QString::null, 0644);
+ KTempFile uniqueFile(lockFile, TQString::null, 0644);
uniqueFile.setAutoDelete(true);
if (uniqueFile.status() != 0)
return KLockFile::LockError;
@@ -125,14 +125,14 @@ static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &
hostname[0] = 0;
gethostname(hostname, 255);
hostname[255] = 0;
- QCString instanceName = KCmdLineArgs::appName();
+ TQCString instanceName = KCmdLineArgs::appName();
- (*(uniqueFile.textStream())) << QString::number(getpid()) << endl
+ (*(uniqueFile.textStream())) << TQString::number(getpid()) << endl
<< instanceName << endl
<< hostname << endl;
uniqueFile.close();
- QCString uniqueName = QFile::encodeName( uniqueFile.name() );
+ TQCString uniqueName = TQFile::encodeName( uniqueFile.name() );
#ifdef Q_OS_UNIX
// Create lock file
@@ -171,7 +171,7 @@ static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &
return KLockFile::LockOK;
}
-static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
// This is dangerous, we could be deleting a new lock instead of
// the old stale one, let's be very careful
@@ -181,8 +181,8 @@ static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct
if (ktmpFile.status() != 0)
return KLockFile::LockError;
- QCString lckFile = QFile::encodeName(lockFile);
- QCString tmpFile = QFile::encodeName(ktmpFile.name());
+ TQCString lckFile = TQFile::encodeName(lockFile);
+ TQCString tmpFile = TQFile::encodeName(ktmpFile.name());
ktmpFile.close();
ktmpFile.unlink();
@@ -251,12 +251,12 @@ KLockFile::LockResult KLockFile::lock(int options)
result = lockFile(d->file, st_buf, d->linkCountSupport);
if (result == KLockFile::LockOK)
{
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
break;
}
else if (result == KLockFile::LockError)
{
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
if (--hardErrors == 0)
{
break;
@@ -265,7 +265,7 @@ KLockFile::LockResult KLockFile::lock(int options)
else // KLockFile::Fail
{
if (!d->staleTimer.isNull() && !statResultIsEqual(d->statBuf, st_buf))
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
if (!d->staleTimer.isNull())
{
@@ -299,7 +299,7 @@ KLockFile::LockResult KLockFile::lock(int options)
if (result == KLockFile::LockOK)
{
// Lock deletion successful
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
continue; // Now try to get the new lock
}
else if (result != KLockFile::LockFail)
@@ -314,13 +314,13 @@ KLockFile::LockResult KLockFile::lock(int options)
d->staleTimer.start();
d->pid = -1;
- d->hostname = QString::null;
- d->instance = QString::null;
+ d->hostname = TQString::null;
+ d->instance = TQString::null;
- QFile file(d->file);
+ TQFile file(d->file);
if (file.open(IO_ReadOnly))
{
- QTextStream ts(&file);
+ TQTextStream ts(&file);
if (!ts.atEnd())
d->pid = ts.readLine().toInt();
if (!ts.atEnd())
@@ -360,12 +360,12 @@ void KLockFile::unlock()
{
if (d->isLocked)
{
- ::unlink(QFile::encodeName(d->file));
+ ::unlink(TQFile::encodeName(d->file));
d->isLocked = false;
}
}
-bool KLockFile::getLockInfo(int &pid, QString &hostname, QString &appname)
+bool KLockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname)
{
if (d->pid == -1)
return false;
diff --git a/kdecore/klockfile.h b/kdecore/klockfile.h
index b48d09926..fac66831a 100644
--- a/kdecore/klockfile.h
+++ b/kdecore/klockfile.h
@@ -20,8 +20,8 @@
#ifndef _KLOCKFILE_H_
#define _KLOCKFILE_H_
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <ksharedptr.h>
/**
@@ -35,7 +35,7 @@ class KDECORE_EXPORT KLockFile : public KShared
public:
typedef KSharedPtr<KLockFile> Ptr;
- KLockFile(const QString &file);
+ KLockFile(const TQString &file);
/**
* Destroys the object, releasing the lock if held
@@ -113,7 +113,7 @@ public:
* the lock after the lock functon has returned with LockStale.
* @returns false if the pid and hostname could not be determined
*/
- bool getLockInfo(int &pid, QString &hostname, QString &appname);
+ bool getLockInfo(int &pid, TQString &hostname, TQString &appname);
private:
class KLockFilePrivate;
diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp
index f098f68e4..81fd5478f 100644
--- a/kdecore/kmacroexpander.cpp
+++ b/kdecore/kmacroexpander.cpp
@@ -22,10 +22,10 @@
#include <kmacroexpander.h>
-#include <qvaluestack.h>
-#include <qregexp.h>
+#include <tqvaluestack.h>
+#include <tqregexp.h>
-KMacroExpanderBase::KMacroExpanderBase( QChar c )
+KMacroExpanderBase::KMacroExpanderBase( TQChar c )
{
escapechar = c;
}
@@ -35,7 +35,7 @@ KMacroExpanderBase::~KMacroExpanderBase()
}
void
-KMacroExpanderBase::setEscapeChar( QChar c )
+KMacroExpanderBase::setEscapeChar( TQChar c )
{
escapechar = c;
}
@@ -46,13 +46,13 @@ KMacroExpanderBase::escapeChar() const
return escapechar;
}
-void KMacroExpanderBase::expandMacros( QString &str )
+void KMacroExpanderBase::expandMacros( TQString &str )
{
uint pos;
int len;
- QChar ec( escapechar );
- QStringList rst;
- QString rsts;
+ TQChar ec( escapechar );
+ TQStringList rst;
+ TQString rsts;
for (pos = 0; pos < str.length(); ) {
if (ec != (char)0) {
@@ -89,7 +89,7 @@ namespace KMacroExpander {
bool dquote;
} State;
typedef struct {
- QString str;
+ TQString str;
uint pos;
} Save;
@@ -97,19 +97,19 @@ namespace KMacroExpander {
using namespace KMacroExpander;
-bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
+bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
{
int len;
uint pos2;
- QChar ec( escapechar );
+ TQChar ec( escapechar );
State state = { noquote, false };
- QValueStack<State> sstack;
- QValueStack<Save> ostack;
- QStringList rst;
- QString rsts;
+ TQValueStack<State> sstack;
+ TQValueStack<Save> ostack;
+ TQStringList rst;
+ TQString rsts;
while (pos < str.length()) {
- QChar cc( str.unicode()[pos] );
+ TQChar cc( str.unicode()[pos] );
if (ec != (char)0) {
if (cc != ec)
goto nohit;
@@ -125,10 +125,10 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
}
if (state.dquote) {
rsts = rst.join( " " );
- rsts.replace( QRegExp("([$`\"\\\\])"), "\\\\1" );
+ rsts.replace( TQRegExp("([$`\"\\\\])"), "\\\\1" );
} else if (state.current == dollarquote) {
rsts = rst.join( " " );
- rsts.replace( QRegExp("(['\\\\])"), "\\\\1" );
+ rsts.replace( TQRegExp("(['\\\\])"), "\\\\1" );
} else if (state.current == singlequote) {
rsts = rst.join( " " );
rsts.replace( '\'', "'\\''");
@@ -139,14 +139,14 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
} else {
rsts = "'";
#if 0 // this could pay off if join() would be cleverer and the strings were long
- for (QStringList::Iterator it = rst.begin(); it != rst.end(); ++it)
+ for (TQStringList::Iterator it = rst.begin(); it != rst.end(); ++it)
(*it).replace( '\'', "'\\''" );
rsts += rst.join( "' '" );
#else
- for (QStringList::ConstIterator it = rst.begin(); it != rst.end(); ++it) {
+ for (TQStringList::ConstIterator it = rst.begin(); it != rst.end(); ++it) {
if (it != rst.begin())
rsts += "' '";
- QString trsts( *it );
+ TQString trsts( *it );
trsts.replace( '\'', "'\\''" );
rsts += trsts;
}
@@ -278,16 +278,16 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
return sstack.empty();
}
-bool KMacroExpanderBase::expandMacrosShellQuote( QString &str )
+bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str )
{
uint pos = 0;
return expandMacrosShellQuote( str, pos ) && pos == str.length();
}
-int KMacroExpanderBase::expandPlainMacro( const QString &, uint, QStringList & )
+int KMacroExpanderBase::expandPlainMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandPlainMacro called!" ); return 0; }
-int KMacroExpanderBase::expandEscapedMacro( const QString &, uint, QStringList & )
+int KMacroExpanderBase::expandEscapedMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandEscapedMacro called!" ); return 0; }
@@ -297,18 +297,18 @@ template<class KT,class VT>
class KMacroMapExpander : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<KT,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<KT,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<KT,VT> macromap;
+ TQMap<KT,VT> macromap;
};
-static QStringList &operator+=( QStringList &s, const QString &n) { s << n; return s; }
+static TQStringList &operator+=( TQStringList &s, const TQString &n) { s << n; return s; }
////////
@@ -321,25 +321,25 @@ isIdentifier( uint c )
////////
template<class VT>
-class KMacroMapExpander<QChar,VT> : public KMacroExpanderBase {
+class KMacroMapExpander<TQChar,VT> : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<QChar,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<TQChar,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<QChar,VT> macromap;
+ TQMap<TQChar,VT> macromap;
};
template<class VT>
int
-KMacroMapExpander<QChar,VT>::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQChar,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
- QMapConstIterator<QChar,VT> it = macromap.find(str[pos]);
+ TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos]);
if (it != macromap.end()) {
ret += it.data();
return 1;
@@ -349,13 +349,13 @@ KMacroMapExpander<QChar,VT>::expandPlainMacro( const QString &str, uint pos, QSt
template<class VT>
int
-KMacroMapExpander<QChar,VT>::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQChar,VT>::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
- QMapConstIterator<QChar,VT> it = macromap.find(str[pos+1]);
+ TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos+1]);
if (it != macromap.end()) {
ret += it.data();
return 2;
@@ -365,23 +365,23 @@ KMacroMapExpander<QChar,VT>::expandEscapedMacro( const QString &str, uint pos, Q
}
template<class VT>
-class KMacroMapExpander<QString,VT> : public KMacroExpanderBase {
+class KMacroMapExpander<TQString,VT> : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<QString,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<TQString,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<QString,VT> macromap;
+ TQMap<TQString,VT> macromap;
};
template<class VT>
int
-KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (isIdentifier( str[pos - 1].unicode() ))
return 0;
@@ -389,8 +389,8 @@ KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, Q
for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl)
return 0;
- QMapConstIterator<QString,VT> it =
- macromap.find( QConstString( str.unicode() + pos, sl ).string() );
+ TQMapConstIterator<TQString,VT> it =
+ macromap.find( TQConstString( str.unicode() + pos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return sl;
@@ -400,10 +400,10 @@ KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, Q
template<class VT>
int
-KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
uint sl, rsl, rpos;
@@ -420,8 +420,8 @@ KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos,
}
if (!sl)
return 0;
- QMapConstIterator<QString,VT> it =
- macromap.find( QConstString( str.unicode() + rpos, sl ).string() );
+ TQMapConstIterator<TQString,VT> it =
+ macromap.find( TQConstString( str.unicode() + rpos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return rsl;
@@ -432,7 +432,7 @@ KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos,
////////////
int
-KCharMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KCharMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (expandMacro( str[pos], ret ))
return 1;
@@ -440,10 +440,10 @@ KCharMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList
}
int
-KCharMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
if (expandMacro( str[pos+1], ret ))
@@ -452,7 +452,7 @@ KCharMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
}
int
-KWordMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (isIdentifier( str[pos - 1].unicode() ))
return 0;
@@ -460,16 +460,16 @@ KWordMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList
for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl)
return 0;
- if (expandMacro( QConstString( str.unicode() + pos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret ))
return sl;
return 0;
}
int
-KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
uint sl, rsl, rpos;
@@ -486,7 +486,7 @@ KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
}
if (!sl)
return 0;
- if (expandMacro( QConstString( str.unicode() + rpos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret ))
return rsl;
return 0;
}
@@ -495,9 +495,9 @@ KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
template<class KT,class VT>
inline QString
-TexpandMacros( const QString &ostr, const QMap<KT,VT> &map, QChar c )
+TexpandMacros( const TQString &ostr, const TQMap<KT,VT> &map, TQChar c )
{
- QString str( ostr );
+ TQString str( ostr );
KMacroMapExpander<KT,VT> kmx( map, c );
kmx.expandMacros( str );
return str;
@@ -505,25 +505,25 @@ TexpandMacros( const QString &ostr, const QMap<KT,VT> &map, QChar c )
template<class KT,class VT>
inline QString
-TexpandMacrosShellQuote( const QString &ostr, const QMap<KT,VT> &map, QChar c )
+TexpandMacrosShellQuote( const TQString &ostr, const TQMap<KT,VT> &map, TQChar c )
{
- QString str( ostr );
+ TQString str( ostr );
KMacroMapExpander<KT,VT> kmx( map, c );
if (!kmx.expandMacrosShellQuote( str ))
- return QString::null;
+ return TQString::null;
return str;
}
// public API
namespace KMacroExpander {
- QString expandMacros( const QString &ostr, const QMap<QChar,QString> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QChar,QString> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QString,QString> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QString,QString> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QChar,QStringList> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QChar,QStringList> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QString,QStringList> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QString,QStringList> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQChar,TQString> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQChar,TQString> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQString,TQString> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQString,TQString> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQChar,TQStringList> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQChar,TQStringList> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQString,TQStringList> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQString,TQStringList> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
} // namespace
diff --git a/kdecore/kmacroexpander.h b/kdecore/kmacroexpander.h
index deb12e284..226264990 100644
--- a/kdecore/kmacroexpander.h
+++ b/kdecore/kmacroexpander.h
@@ -22,9 +22,9 @@
#ifndef _KMACROEXPANDER_H
#define _KMACROEXPANDER_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "kdelibs_export.h"
/**
@@ -39,9 +39,9 @@ class KDECORE_EXPORT KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KMacroExpanderBase( QChar c = '%' );
+ KMacroExpanderBase( TQChar c = '%' );
/**
* Destructor.
@@ -53,7 +53,7 @@ public:
*
* @param str the string in which macros are expanded in-place
*/
- void expandMacros( QString &str );
+ void expandMacros( TQString &str );
/*
* Perform safe macro expansion (substitution) on a string for use
@@ -83,30 +83,30 @@ public:
* or brace outside any shell construct is @em not an error (unlike in
* the function below), but still prematurely terminates processing.
*/
- bool expandMacrosShellQuote( QString &str, uint &pos );
+ bool expandMacrosShellQuote( TQString &str, uint &pos );
/**
* Same as above, but always starts at position 0, and unmatched closing
* parens and braces are treated as errors.
*/
- bool expandMacrosShellQuote( QString &str );
+ bool expandMacrosShellQuote( TQString &str );
/**
* Set the macro escape character.
- * @param c escape char indicating start of macros, or QChar::null if none
+ * @param c escape char indicating start of macros, or TQChar::null if none
*/
- void setEscapeChar( QChar c );
+ void setEscapeChar( TQChar c );
/**
* Obtain the macro escape character.
- * @return escape char indicating start of macros, or QChar::null if none
+ * @return escape char indicating start of macros, or TQChar::null if none
*/
- QChar escapeChar() const;
+ TQChar escapeChar() const;
protected:
/**
* This function is called for every single char within the string if
- * the escape char is QChar::null. It should determine whether the
+ * the escape char is TQChar::null. It should determine whether the
* string starting at @p pos within @p str is a valid macro and return
* the substitution value for it if so.
* @param str the input string
@@ -117,11 +117,11 @@ protected:
* than zero, subtract this value from @p pos (to skip a macro, i.e.,
* substitute it with itself). zero requests no special action.
*/
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* This function is called every time the escape char is found if it is
- * not QChar::null. It should determine whether the
+ * not TQChar::null. It should determine whether the
* string starting at @p pos witin @p str is a valid macro and return
* the substitution value for it if so.
* @param str the input string
@@ -133,10 +133,10 @@ protected:
* than zero, subtract this value from @p pos (to skip a macro, i.e.,
* substitute it with itself). zero requests no special action.
*/
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QChar escapechar;
+ TQChar escapechar;
};
/**
@@ -150,7 +150,7 @@ private:
* class MyClass {
* ...
* private:
- * QString m_str;
+ * TQString m_str;
* ...
* friend class MyExpander;
* };
@@ -159,12 +159,12 @@ private:
* public:
* MyExpander( MyClass *_that ) : KWordMacroExpander(), that( _that ) {}
* protected:
- * virtual bool expandMacro( const QString &str, QStringList &ret );
+ * virtual bool expandMacro( const TQString &str, TQStringList &ret );
* private:
* MyClass *that;
* };
*
- * bool MyExpander::expandMacro( const QString &str, QStringList &ret )
+ * bool MyExpander::expandMacro( const TQString &str, TQStringList &ret )
* {
* if (str == "macro") {
* ret += complexOperation( that->m_str );
@@ -175,7 +175,7 @@ private:
*
* ... MyClass::...(...)
* {
- * QString str;
+ * TQString str;
* ...
* MyExpander mx( this );
* mx.expandMacrosShellQuote( str );
@@ -193,13 +193,13 @@ class KDECORE_EXPORT KWordMacroExpander : public KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KWordMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {}
+ KWordMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* Return substitution list @p ret for string macro @p str.
@@ -208,7 +208,7 @@ protected:
* when expandMacro is entered.
* @return @c true iff @p chr was a recognized macro name
*/
- virtual bool expandMacro( const QString &str, QStringList &ret ) = 0;
+ virtual bool expandMacro( const TQString &str, TQStringList &ret ) = 0;
};
/**
@@ -226,13 +226,13 @@ class KDECORE_EXPORT KCharMacroExpander : public KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KCharMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {}
+ KCharMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* Return substitution list @p ret for single-character macro @p chr.
@@ -241,7 +241,7 @@ protected:
* when expandMacro is entered.
* @return @c true iff @p chr was a recognized macro name
*/
- virtual bool expandMacro( QChar chr, QStringList &ret ) = 0;
+ virtual bool expandMacro( TQChar chr, TQStringList &ret ) = 0;
};
/**
@@ -257,20 +257,20 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded
*
* \code
* // Code example
- * QMap<QChar,QString> map;
+ * TQMap<TQChar,TQString> map;
* map.insert('u', "/tmp/myfile.txt");
* map.insert('n', "My File");
- * QString s = "%% Title: %u:%n";
+ * TQString s = "%% Title: %u:%n";
* s = KMacroExpander::expandMacros(s, map);
* // s is now "% Title: /tmp/myfile.txt:My File";
* \endcode
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string for use
@@ -280,22 +280,22 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded, or a null string
* if a shell syntax error was detected in the command
*
* \code
* // Code example
- * QMap<QChar,QString> map;
+ * TQMap<TQChar,TQString> map;
* map.insert('u', "/tmp/myfile.txt");
* map.insert('n', "My File");
- * QString s = "kedit --caption %n %u";
+ * TQString s = "kedit --caption %n %u";
* s = KMacroExpander::expandMacrosShellQuote(s, map);
* // s is now "kedit --caption 'My File' '/tmp/myfile.txt'";
- * system(QFile::encodeName(s));
+ * system(TQFile::encodeName(s));
* \endcode
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string.
@@ -307,20 +307,20 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded
*
* \code
* // Code example
- * QMap<QString,QString> map;
+ * TQMap<TQString,TQString> map;
* map.insert("url", "/tmp/myfile.txt");
* map.insert("name", "My File");
- * QString s = "Title: %{url}-%name";
+ * TQString s = "Title: %{url}-%name";
* s = KMacroExpander::expandMacros(s, map);
* // s is now "Title: /tmp/myfile.txt-My File";
* \endcode
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string for use
@@ -333,33 +333,33 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded, or a null string
* if a shell syntax error was detected in the command
*
* \code
* // Code example
- * QMap<QString,QString> map;
+ * TQMap<TQString,TQString> map;
* map.insert("url", "/tmp/myfile.txt");
* map.insert("name", "My File");
- * QString s = "kedit --caption %name %{url}";
+ * TQString s = "kedit --caption %name %{url}";
* s = KMacroExpander::expandMacrosShellQuote(s, map);
* // s is now "kedit --caption 'My File' '/tmp/myfile.txt'";
- * system(QFile::encodeName(s));
+ * system(TQFile::encodeName(s));
* \endcode
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists that
* are simply join(" ")ed together.
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists that
* are simply join(" ")ed together.
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists.
@@ -367,14 +367,14 @@ namespace KMacroExpander {
* join(" ")ed together; otherwise every element expands to a separate
* quoted string.
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists.
* If the macro appears inside a quoted string, the list is simply
* join(" ")ed together; otherwise every element expands to a separate
* quoted string.
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' );
}
#endif /* _KMACROEXPANDER_H */
diff --git a/kdecore/kmanagerselection.cpp b/kdecore/kmanagerselection.cpp
index f82df9ff1..b88990dbf 100644
--- a/kdecore/kmanagerselection.cpp
+++ b/kdecore/kmanagerselection.cpp
@@ -40,13 +40,13 @@ DEALINGS IN THE SOFTWARE.
#include <unistd.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E)
#include "kmanagerselection.h"
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kxerrorhandler.h>
#include <X11/Xatom.h>
@@ -73,8 +73,8 @@ bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P )
return owner->filterEvent( ev_P );
}
-KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
window( None ),
@@ -84,8 +84,8 @@ KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, QObject* paren
{
}
-KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( XInternAtom( qt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
window( None ),
@@ -390,8 +390,8 @@ bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P )
}
-KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
selection_owner( None ),
@@ -400,8 +400,8 @@ KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, QObject* p
init();
}
-KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( XInternAtom( qt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
selection_owner( None ),
diff --git a/kdecore/kmanagerselection.h b/kdecore/kmanagerselection.h
index 9b277b998..b6aefd9db 100644
--- a/kdecore/kmanagerselection.h
+++ b/kdecore/kmanagerselection.h
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef __KMANAGERSELECTION_H
#define __KMANAGERSELECTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11 // FIXME(E)
@@ -56,7 +56,7 @@ class KDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( Atom selection, int screen = -1, QObject* parent = NULL );
+ KSelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -66,7 +66,7 @@ class KDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( const char* selection, int screen = -1, QObject* parent = NULL );
+ KSelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
/**
* Destructor. Calls release().
*/
@@ -179,7 +179,7 @@ class KDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( Atom selection, int screen = -1, QObject* parent = NULL );
+ KSelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -189,7 +189,7 @@ class KDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( const char* selection, int screen = -1, QObject* parent = NULL );
+ KSelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
virtual ~KSelectionWatcher();
/**
* Return the current owner of the manager selection, if any.
diff --git a/kdecore/kmdcodec.cpp b/kdecore/kmdcodec.cpp
index 10fca9307..76c80d329 100644
--- a/kdecore/kmdcodec.cpp
+++ b/kdecore/kmdcodec.cpp
@@ -151,24 +151,24 @@ static int rikFindChar(register const char * _s, const char c)
return s - _s;
}
-QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
+TQCString KCodecs::quotedPrintableEncode(const TQByteArray& in, bool useCRLF)
{
- QByteArray out;
+ TQByteArray out;
quotedPrintableEncode (in, out, useCRLF);
- return QCString (out.data(), out.size()+1);
+ return TQCString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF)
+TQCString KCodecs::quotedPrintableEncode(const TQCString& str, bool useCRLF)
{
if (str.isEmpty())
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy (in.data(), str.data(), str.length());
return quotedPrintableEncode(in, useCRLF);
}
-void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool useCRLF)
+void KCodecs::quotedPrintableEncode(const TQByteArray& in, TQByteArray& out, bool useCRLF)
{
out.resize (0);
if (in.isEmpty())
@@ -284,24 +284,24 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
out.truncate(cursor - out.data());
}
-QCString KCodecs::quotedPrintableDecode(const QByteArray & in)
+TQCString KCodecs::quotedPrintableDecode(const TQByteArray & in)
{
- QByteArray out;
+ TQByteArray out;
quotedPrintableDecode (in, out);
- return QCString (out.data(), out.size()+1);
+ return TQCString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableDecode(const QCString & str)
+TQCString KCodecs::quotedPrintableDecode(const TQCString & str)
{
if (str.isEmpty())
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy (in.data(), str.data(), str.length());
return quotedPrintableDecode (in);
}
-void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
+void KCodecs::quotedPrintableDecode(const TQByteArray& in, TQByteArray& out)
{
// clear out the output buffer
out.resize (0);
@@ -359,24 +359,24 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
out.truncate(cursor - out.data());
}
-QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
+TQCString KCodecs::base64Encode( const TQCString& str, bool insertLFs )
{
if ( str.isEmpty() )
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy( in.data(), str.data(), str.length() );
return base64Encode( in, insertLFs );
}
-QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
+TQCString KCodecs::base64Encode( const TQByteArray& in, bool insertLFs )
{
- QByteArray out;
+ TQByteArray out;
base64Encode( in, out, insertLFs );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
+void KCodecs::base64Encode( const TQByteArray& in, TQByteArray& out,
bool insertLFs )
{
// clear out the output buffer
@@ -448,24 +448,24 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
}
}
-QCString KCodecs::base64Decode( const QCString& str )
+TQCString KCodecs::base64Decode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in( str.length() );
+ TQByteArray in( str.length() );
memcpy( in.data(), str.data(), str.length() );
return base64Decode( in );
}
-QCString KCodecs::base64Decode( const QByteArray& in )
+TQCString KCodecs::base64Decode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
base64Decode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
+void KCodecs::base64Decode( const TQByteArray& in, TQByteArray& out )
{
out.resize(0);
if ( in.isEmpty() )
@@ -549,25 +549,25 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
out.resize(len);
}
-QCString KCodecs::uuencode( const QCString& str )
+TQCString KCodecs::uuencode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in;
+ TQByteArray in;
in.resize( str.length() );
memcpy( in.data(), str.data(), str.length() );
return uuencode( in );
}
-QCString KCodecs::uuencode( const QByteArray& in )
+TQCString KCodecs::uuencode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
uuencode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
+void KCodecs::uuencode( const TQByteArray& in, TQByteArray& out )
{
out.resize( 0 );
if( in.isEmpty() )
@@ -646,25 +646,25 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
out.resize( 0 );
}
-QCString KCodecs::uudecode( const QCString& str )
+TQCString KCodecs::uudecode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in;
+ TQByteArray in;
in.resize( str.length() );
memcpy( in.data(), str.data(), str.length() );
return uudecode( in );
}
-QCString KCodecs::uudecode( const QByteArray& in )
+TQCString KCodecs::uudecode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
uudecode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
+void KCodecs::uudecode( const TQByteArray& in, TQByteArray& out )
{
out.resize( 0 );
if( in.isEmpty() )
@@ -762,24 +762,24 @@ KMD5::KMD5(const char *in, int len)
update(in, len);
}
-KMD5::KMD5(const QByteArray& in)
+KMD5::KMD5(const TQByteArray& in)
{
init();
update( in );
}
-KMD5::KMD5(const QCString& in)
+KMD5::KMD5(const TQCString& in)
{
init();
update( in );
}
-void KMD5::update(const QByteArray& in)
+void KMD5::update(const TQByteArray& in)
{
update(in.data(), int(in.size()));
}
-void KMD5::update(const QCString& in)
+void KMD5::update(const TQCString& in)
{
update(in.data(), int(in.length()));
}
@@ -827,7 +827,7 @@ void KMD5::update(const unsigned char* in, int len)
memcpy(m_buffer+buffer_index, in+in_index, in_length-in_index);
}
-bool KMD5::update(QIODevice& file)
+bool KMD5::update(TQIODevice& file)
{
char buffer[1024];
int len;
@@ -880,7 +880,7 @@ bool KMD5::verify( const KMD5::Digest& digest)
return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest)));
}
-bool KMD5::verify( const QCString& hexdigest)
+bool KMD5::verify( const TQCString& hexdigest)
{
finalize();
return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -899,9 +899,9 @@ void KMD5::rawDigest( KMD5::Digest& bin )
}
-QCString KMD5::hexDigest()
+TQCString KMD5::hexDigest()
{
- QCString s(33);
+ TQCString s(33);
finalize();
sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -912,7 +912,7 @@ QCString KMD5::hexDigest()
return s;
}
-void KMD5::hexDigest(QCString& s)
+void KMD5::hexDigest(TQCString& s)
{
finalize();
s.resize(33);
@@ -922,9 +922,9 @@ void KMD5::hexDigest(QCString& s)
m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
}
-QCString KMD5::base64Digest()
+TQCString KMD5::base64Digest()
{
- QByteArray ba(16);
+ TQByteArray ba(16);
finalize();
memcpy(ba.data(), m_digest, 16);
@@ -1151,24 +1151,24 @@ KMD4::KMD4(const char *in, int len)
update(in, len);
}
-KMD4::KMD4(const QByteArray& in)
+KMD4::KMD4(const TQByteArray& in)
{
init();
update( in );
}
-KMD4::KMD4(const QCString& in)
+KMD4::KMD4(const TQCString& in)
{
init();
update( in );
}
-void KMD4::update(const QByteArray& in)
+void KMD4::update(const TQByteArray& in)
{
update(in.data(), int(in.size()));
}
-void KMD4::update(const QCString& in)
+void KMD4::update(const TQCString& in)
{
update(in.data(), int(in.length()));
}
@@ -1235,7 +1235,7 @@ void KMD4::update(const unsigned char *in, int len)
memcpy (m_buffer, in, len);
}
-bool KMD4::update(QIODevice& file)
+bool KMD4::update(TQIODevice& file)
{
char buffer[1024];
int len;
@@ -1303,7 +1303,7 @@ bool KMD4::verify( const KMD4::Digest& digest)
return (0 == memcmp(rawDigest(), digest, sizeof(KMD4::Digest)));
}
-bool KMD4::verify( const QCString& hexdigest)
+bool KMD4::verify( const TQCString& hexdigest)
{
finalize();
return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -1321,9 +1321,9 @@ void KMD4::rawDigest( KMD4::Digest& bin )
memcpy( bin, m_digest, 16 );
}
-QCString KMD4::hexDigest()
+TQCString KMD4::hexDigest()
{
- QCString s(33);
+ TQCString s(33);
finalize();
sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -1334,7 +1334,7 @@ QCString KMD4::hexDigest()
return s;
}
-void KMD4::hexDigest(QCString& s)
+void KMD4::hexDigest(TQCString& s)
{
finalize();
s.resize(33);
@@ -1344,9 +1344,9 @@ void KMD4::hexDigest(QCString& s)
m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
}
-QCString KMD4::base64Digest()
+TQCString KMD4::base64Digest()
{
- QByteArray ba(16);
+ TQByteArray ba(16);
finalize();
memcpy(ba.data(), m_digest, 16);
diff --git a/kdecore/kmdcodec.h b/kdecore/kmdcodec.h
index 7b1023393..ef1d49d1e 100644
--- a/kdecore/kmdcodec.h
+++ b/kdecore/kmdcodec.h
@@ -36,9 +36,9 @@
#define KBase64 KCodecs
-#include <qglobal.h>
-#include <qstring.h>
-#include <qiodevice.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
#include "kdelibs_export.h"
/**
@@ -50,8 +50,8 @@
* \b Usage:
*
* \code
- * QCString input = "Aladdin:open sesame";
- * QCString result = KCodecs::base64Encode(input);
+ * TQCString input = "Aladdin:open sesame";
+ * TQCString result = KCodecs::base64Encode(input);
* cout << "Result: " << result.data() << endl;
* \endcode
*
@@ -64,7 +64,7 @@
* (ones that accept/return null-terminated strings) to encode/decode
* a string. If what you need is to encode or decode binary data, then
* it is highly recommended that you use the functions that take an input
- * and output QByteArray as arguments. These functions are specifically
+ * and output TQByteArray as arguments. These functions are specifically
* tailored for encoding and decoding binary data.
*
* @short A collection of commonly used encoding and decoding algorithms.
@@ -84,7 +84,7 @@ public:
* breaks, too.
* @return quoted-printable encoded string.
*/
- static QCString quotedPrintableEncode(const QByteArray & in,
+ static TQCString quotedPrintableEncode(const TQByteArray & in,
bool useCRLF = true);
/**
@@ -99,7 +99,7 @@ public:
* breaks, too.
* @return quoted-printable encoded string.
*/
- static QCString quotedPrintableEncode(const QCString & str,
+ static TQCString quotedPrintableEncode(const TQCString & str,
bool useCRLF = true);
/**
@@ -120,7 +120,7 @@ public:
* CRLF line breaks and the output will have CRLF line
* breaks, too.
*/
- static void quotedPrintableEncode(const QByteArray & in, QByteArray& out,
+ static void quotedPrintableEncode(const TQByteArray & in, TQByteArray& out,
bool useCRLF);
/**
@@ -131,7 +131,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString quotedPrintableDecode(const QByteArray & in);
+ static TQCString quotedPrintableDecode(const TQByteArray & in);
/**
* @overload
@@ -142,7 +142,7 @@ public:
* @param str string to be decoded.
* @return decoded string.
*/
- static QCString quotedPrintableDecode(const QCString & str);
+ static TQCString quotedPrintableDecode(const TQCString & str);
/**
* Decodes a quoted-printable encoded data.
@@ -161,7 +161,7 @@ public:
* @param in data to be decoded.
* @param out decoded data.
*/
- static void quotedPrintableDecode(const QByteArray & in, QByteArray& out);
+ static void quotedPrintableDecode(const TQByteArray & in, TQByteArray& out);
/**
@@ -175,7 +175,7 @@ public:
* @param in data to be uuencoded
* @return uuencoded string.
*/
- static QCString uuencode( const QByteArray& in );
+ static TQCString uuencode( const TQByteArray& in );
/**
* @overload
@@ -186,7 +186,7 @@ public:
* @param str string to be uuencoded.
* @return encoded string.
*/
- static QCString uuencode( const QCString& str );
+ static TQCString uuencode( const TQCString& str );
/**
* Encodes the given data using the uuencode algorithm.
@@ -203,7 +203,7 @@ public:
* @param in data to be uuencoded.
* @param out uudecoded data.
*/
- static void uuencode( const QByteArray& in, QByteArray& out );
+ static void uuencode( const TQByteArray& in, TQByteArray& out );
/**
* Decodes the given data using the uudecode algorithm.
@@ -215,7 +215,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString uudecode( const QByteArray& in );
+ static TQCString uudecode( const TQByteArray& in );
/**
* @overload
@@ -226,7 +226,7 @@ public:
* @param str string to be decoded.
* @return uudecoded string.
*/
- static QCString uudecode( const QCString& str );
+ static TQCString uudecode( const TQCString& str );
/**
* Decodes the given data using the uudecode algorithm.
@@ -247,7 +247,7 @@ public:
* @param in data to be decoded.
* @param out uudecoded data.
*/
- static void uudecode( const QByteArray& in, QByteArray& out );
+ static void uudecode( const TQByteArray& in, TQByteArray& out );
/**
@@ -263,7 +263,7 @@ public:
*
* @return base64 encoded string.
*/
- static QCString base64Encode( const QByteArray& in, bool insertLFs = false);
+ static TQCString base64Encode( const TQByteArray& in, bool insertLFs = false);
/**
* @overload
@@ -275,7 +275,7 @@ public:
* @param insertLFs limit the number of characters per line.
* @return decoded string.
*/
- static QCString base64Encode( const QCString& str, bool insertLFs = false );
+ static TQCString base64Encode( const TQCString& str, bool insertLFs = false );
/**
* Encodes the given data using the base64 algorithm.
@@ -298,7 +298,7 @@ public:
* @param out encoded data.
* @param insertLFs limit the number of characters per line.
*/
- static void base64Encode( const QByteArray& in, QByteArray& out,
+ static void base64Encode( const TQByteArray& in, TQByteArray& out,
bool insertLFs = false );
/**
@@ -308,7 +308,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString base64Decode( const QByteArray& in );
+ static TQCString base64Decode( const TQByteArray& in );
/**
* @overload
@@ -319,7 +319,7 @@ public:
* @param str string to be decoded.
* @return decoded string.
*/
- static QCString base64Decode( const QCString& str );
+ static TQCString base64Decode( const TQCString& str );
/**
* Decodes the given data that was encoded with the base64
@@ -338,7 +338,7 @@ public:
* @param in data to be decoded.
* @param out decoded data.
*/
- static void base64Decode( const QByteArray& in, QByteArray& out );
+ static void base64Decode( const TQByteArray& in, TQByteArray& out );
private:
@@ -420,16 +420,16 @@ public:
/**
* @overload
*
- * Same as above except it accepts a QByteArray as its argument.
+ * Same as above except it accepts a TQByteArray as its argument.
*/
- KMD5(const QByteArray& a );
+ KMD5(const TQByteArray& a );
/**
* @overload
*
- * Same as above except it accepts a QCString as its argument.
+ * Same as above except it accepts a TQCString as its argument.
*/
- KMD5(const QCString& a );
+ KMD5(const TQCString& a );
/**
* Updates the message to be digested. Be sure to add all data
@@ -449,21 +449,21 @@ public:
/**
* @overload
*
- * @param in message to be added to the digest (QByteArray).
+ * @param in message to be added to the digest (TQByteArray).
*/
- void update(const QByteArray& in );
+ void update(const TQByteArray& in );
/**
* @overload
*
- * @param in message to be added to the digest (QCString).
+ * @param in message to be added to the digest (TQCString).
*/
- void update(const QCString& in );
+ void update(const TQCString& in );
/**
* @overload
*
- * reads the data from an I/O device, i.e. from a file (QFile).
+ * reads the data from an I/O device, i.e. from a file (TQFile).
*
* NOTE that the file must be open for reading.
*
@@ -471,7 +471,7 @@ public:
*
* @returns false if an error occurred during reading.
*/
- bool update(QIODevice& file);
+ bool update(TQIODevice& file);
/**
* Calling this function will reset the calculated message digest.
@@ -500,18 +500,18 @@ public:
* Returns the value of the calculated message digest in
* a hexadecimal representation.
*/
- QCString hexDigest ();
+ TQCString hexDigest ();
/**
* @overload
*/
- void hexDigest(QCString&);
+ void hexDigest(TQCString&);
/**
* Returns the value of the calculated message digest in
* a base64-encoded representation.
*/
- QCString base64Digest ();
+ TQCString base64Digest ();
/**
* returns true if the calculated digest for the given
@@ -522,7 +522,7 @@ public:
/**
* @overload
*/
- bool verify(const QCString&);
+ bool verify(const TQCString&);
protected:
/**
@@ -595,16 +595,16 @@ public:
/**
* @overload
*
- * Same as above except it accepts a QByteArray as its argument.
+ * Same as above except it accepts a TQByteArray as its argument.
*/
- KMD4(const QByteArray& a );
+ KMD4(const TQByteArray& a );
/**
* @overload
*
- * Same as above except it accepts a QCString as its argument.
+ * Same as above except it accepts a TQCString as its argument.
*/
- KMD4(const QCString& a );
+ KMD4(const TQCString& a );
/**
* Updates the message to be digested. Be sure to add all data
@@ -624,21 +624,21 @@ public:
/**
* @overload
*
- * @param in message to be added to the digest (QByteArray).
+ * @param in message to be added to the digest (TQByteArray).
*/
- void update(const QByteArray& in );
+ void update(const TQByteArray& in );
/**
* @overload
*
- * @param in message to be added to the digest (QCString).
+ * @param in message to be added to the digest (TQCString).
*/
- void update(const QCString& in );
+ void update(const TQCString& in );
/**
* @overload
*
- * reads the data from an I/O device, i.e. from a file (QFile).
+ * reads the data from an I/O device, i.e. from a file (TQFile).
*
* NOTE that the file must be open for reading.
*
@@ -646,7 +646,7 @@ public:
*
* @returns false if an error occurred during reading.
*/
- bool update(QIODevice& file);
+ bool update(TQIODevice& file);
/**
* Calling this function will reset the calculated message digest.
@@ -675,18 +675,18 @@ public:
* Returns the value of the calculated message digest in
* a hexadecimal representation.
*/
- QCString hexDigest ();
+ TQCString hexDigest ();
/**
* @overload
*/
- void hexDigest(QCString&);
+ void hexDigest(TQCString&);
/**
* Returns the value of the calculated message digest in
* a base64-encoded representation.
*/
- QCString base64Digest ();
+ TQCString base64Digest ();
/**
* returns true if the calculated digest for the given
@@ -697,7 +697,7 @@ public:
/**
* @overload
*/
- bool verify(const QCString&);
+ bool verify(const TQCString&);
protected:
/**
diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp
index a74d69fc8..37745d398 100644
--- a/kdecore/kmimesourcefactory.cpp
+++ b/kdecore/kmimesourcefactory.cpp
@@ -45,7 +45,7 @@ public:
};
KMimeSourceFactory::KMimeSourceFactory (KIconLoader* loader)
- : QMimeSourceFactory (),
+ : TQMimeSourceFactory (),
d (new KMimeSourceFactoryPrivate (loader))
{
}
@@ -55,10 +55,10 @@ KMimeSourceFactory::~KMimeSourceFactory()
delete d;
}
-QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QString& context) const
+TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const TQString& context) const
{
- QString myName;
- QString myContext;
+ TQString myName;
+ TQString myContext;
const int pos = absOrRelName.find ('|');
if (pos > -1)
@@ -67,7 +67,7 @@ QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QSt
myName = absOrRelName.right (absOrRelName.length() - myContext.length() - 1);
}
- QString result;
+ TQString result;
if (myContext == "desktop")
{
@@ -91,7 +91,7 @@ QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QSt
}
if (result.isEmpty())
- result = QMimeSourceFactory::makeAbsolute (absOrRelName, context);
+ result = TQMimeSourceFactory::makeAbsolute (absOrRelName, context);
return result;
}
diff --git a/kdecore/kmimesourcefactory.h b/kdecore/kmimesourcefactory.h
index ec73621a7..ce91ee0f8 100644
--- a/kdecore/kmimesourcefactory.h
+++ b/kdecore/kmimesourcefactory.h
@@ -22,18 +22,18 @@
#ifndef KMIMESOURCEFACTORY_H
#define KMIMESOURCEFACTORY_H
-#include <qmime.h>
+#include <tqmime.h>
#include <kglobal.h>
class KMimeSourceFactoryPrivate;
class KInstance;
/**
- * An extension to QMimeSourceFactory that uses KIconLoader to
+ * An extension to TQMimeSourceFactory that uses KIconLoader to
* find images.
*
* Normally you don't have to instantiate this class at all, KApplication does that for
- * you automagically and sets QMimeSourceFactory::setDefaultFactory().
+ * you automagically and sets TQMimeSourceFactory::setDefaultFactory().
*
* @author Peter Putzer <putzer@kde.org>
*/
@@ -67,7 +67,7 @@ public:
* @param abs_or_rel_name is the absolute or relative pathname.
* @param context is the path of the context object for the queried resource. Almost always empty.
*/
- virtual QString makeAbsolute (const QString& abs_or_rel_name, const QString& context) const;
+ virtual TQString makeAbsolute (const TQString& abs_or_rel_name, const TQString& context) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdecore/kmountpoint.cpp b/kdecore/kmountpoint.cpp
index a04780a37..764f085a0 100644
--- a/kdecore/kmountpoint.cpp
+++ b/kdecore/kmountpoint.cpp
@@ -23,7 +23,7 @@
#include <config.h>
#include <stdlib.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "kstandarddirs.h"
@@ -139,17 +139,17 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
while (GETMNTENT(fstab, fe))
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(FSNAME(fe));
+ mp->m_mountedFrom = TQFile::decodeName(FSNAME(fe));
- mp->m_mountPoint = QFile::decodeName(MOUNTPOINT(fe));
- mp->m_mountType = QFile::decodeName(MOUNTTYPE(fe));
+ mp->m_mountPoint = TQFile::decodeName(MOUNTPOINT(fe));
+ mp->m_mountType = TQFile::decodeName(MOUNTTYPE(fe));
//Devices using supermount have their device names in the mount options
//instead of the device field. That's why we need to read the mount options
if (infoNeeded & NeedMountOptions || (mp->m_mountType == "supermount"))
{
- QString options = QFile::decodeName(MOUNTOPTIONS(fe));
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(MOUNTOPTIONS(fe));
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if(mp->m_mountType == "supermount")
@@ -165,12 +165,12 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
}
ENDMNTENT(fstab);
#else
- QFile f(FSTAB);
+ TQFile f(FSTAB);
if ( !f.open(IO_ReadOnly) )
return result;
- QTextStream t (&f);
- QString s;
+ TQTextStream t (&f);
+ TQString s;
while (! t.eof())
{
@@ -179,7 +179,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
continue;
// not empty or commented out by '#'
- QStringList item = QStringList::split(' ', s);
+ TQStringList item = TQStringList::split(' ', s);
#ifdef _OS_SOLARIS_
if (item.count() < 5)
@@ -199,11 +199,11 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
#endif
mp->m_mountPoint = item[i++];
mp->m_mountType = item[i++];
- QString options = item[i++];
+ TQString options = item[i++];
if (infoNeeded & NeedMountOptions)
{
- mp->m_mountOptions = QStringList::split(',', options);
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (infoNeeded & NeedRealDeviceName)
@@ -237,20 +237,20 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
for (int i=0;i<num_fs;i++)
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(mounted[i].f_mntfromname);
- mp->m_mountPoint = QFile::decodeName(mounted[i].f_mntonname);
+ mp->m_mountedFrom = TQFile::decodeName(mounted[i].f_mntfromname);
+ mp->m_mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
#ifdef __osf__
- mp->m_mountType = QFile::decodeName(mnt_names[mounted[i].f_type]);
+ mp->m_mountType = TQFile::decodeName(mnt_names[mounted[i].f_type]);
#else
- mp->m_mountType = QFile::decodeName(mounted[i].f_fstypename);
+ mp->m_mountType = TQFile::decodeName(mounted[i].f_fstypename);
#endif
if (infoNeeded & NeedMountOptions)
{
struct fstab *ft = getfsfile(mounted[i].f_mntonname);
- QString options = QFile::decodeName(ft->fs_mntops);
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(ft->fs_mntops);
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (infoNeeded & NeedRealDeviceName)
@@ -305,9 +305,9 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
struct vfs_ent* ent = getvfsbytype(vm->vmt_gfstype);
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(mountedfrom);
- mp->m_mountPoint = QFile::decodeName(mountedto);
- mp->m_mountType = QFile::decodeName(ent->vfsent_name);
+ mp->m_mountedFrom = TQFile::decodeName(mountedfrom);
+ mp->m_mountPoint = TQFile::decodeName(mountedto);
+ mp->m_mountType = TQFile::decodeName(ent->vfsent_name);
free(mountedfrom);
free(mountedto);
@@ -344,17 +344,17 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
while (GETMNTENT(mnttab, fe))
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(FSNAME(fe));
+ mp->m_mountedFrom = TQFile::decodeName(FSNAME(fe));
- mp->m_mountPoint = QFile::decodeName(MOUNTPOINT(fe));
- mp->m_mountType = QFile::decodeName(MOUNTTYPE(fe));
+ mp->m_mountPoint = TQFile::decodeName(MOUNTPOINT(fe));
+ mp->m_mountType = TQFile::decodeName(MOUNTTYPE(fe));
//Devices using supermount have their device names in the mount options
//instead of the device field. That's why we need to read the mount options
if (infoNeeded & NeedMountOptions || (mp->m_mountType == "supermount"))
{
- QString options = QFile::decodeName(MOUNTOPTIONS(fe));
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(MOUNTOPTIONS(fe));
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (mp->m_mountType == "supermount")
@@ -373,13 +373,13 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
return result;
}
-QString KMountPoint::devNameFromOptions(const QStringList &options)
+TQString KMountPoint::devNameFromOptions(const TQStringList &options)
{
// Search options to find the device name
- for ( QStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
+ for ( TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
{
if( (*it).startsWith("dev="))
- return QString(*it).remove("dev=");
+ return TQString(*it).remove("dev=");
}
- return QString("none");
+ return TQString("none");
}
diff --git a/kdecore/kmountpoint.h b/kdecore/kmountpoint.h
index ee3ea3941..fd4fe9c5d 100644
--- a/kdecore/kmountpoint.h
+++ b/kdecore/kmountpoint.h
@@ -20,8 +20,8 @@
#ifndef _KMOUNTPOINT_H_
#define _KMOUNTPOINT_H_
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
@@ -37,7 +37,7 @@ class KDECORE_EXPORT KMountPoint : public KShared
typedef signed long long int filesize_t;
public:
typedef KSharedPtr<KMountPoint> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
enum { NeedMountOptions = 1, NeedRealDeviceName = 2 };
@@ -59,37 +59,37 @@ public:
* Where this filesystem gets mounted from.
* This can refer to a device, a remote server or something else.
*/
- QString mountedFrom() const { return m_mountedFrom; }
+ TQString mountedFrom() const { return m_mountedFrom; }
/**
* Canonical name of the device where the filesystem got mounted from.
* (Or empty, if not a device)
* Only available when the NeedRealDeviceName flag was set.
*/
- QString realDeviceName() const { return m_device; }
+ TQString realDeviceName() const { return m_device; }
/**
* Path where the filesystem is mounted or can be mounted.
*/
- QString mountPoint() const { return m_mountPoint; }
+ TQString mountPoint() const { return m_mountPoint; }
/**
* Type of filesystem
*/
- QString mountType() const { return m_mountType; }
+ TQString mountType() const { return m_mountType; }
/**
* Options used to mount the filesystem.
* Only available when the NeedMountOptions flag was set.
*/
- QStringList mountOptions() const { return m_mountOptions; }
+ TQStringList mountOptions() const { return m_mountOptions; }
/**
* When using supermount, the device name is in the options field
* as dev=/my/device
* @since 3.4
*/
- static QString devNameFromOptions(const QStringList &options);
+ static TQString devNameFromOptions(const TQStringList &options);
/**
* Destructor
@@ -102,11 +102,11 @@ private:
*/
KMountPoint();
- QString m_mountedFrom;
- QString m_device;
- QString m_mountPoint;
- QString m_mountType;
- QStringList m_mountOptions;
+ TQString m_mountedFrom;
+ TQString m_device;
+ TQString m_mountPoint;
+ TQString m_mountType;
+ TQStringList m_mountOptions;
class KMountPointPrivate;
KMountPointPrivate *d;
diff --git a/kdecore/kmultipledrag.cpp b/kdecore/kmultipledrag.cpp
index 03ad74294..29d56bd85 100644
--- a/kdecore/kmultipledrag.cpp
+++ b/kdecore/kmultipledrag.cpp
@@ -22,13 +22,13 @@
#ifndef QT_NO_DRAGANDDROP
-KMultipleDrag::KMultipleDrag( QWidget *dragSource, const char *name )
- : QDragObject( dragSource, name )
+KMultipleDrag::KMultipleDrag( TQWidget *dragSource, const char *name )
+ : TQDragObject( dragSource, name )
{
m_dragObjects.setAutoDelete( true );
}
-void KMultipleDrag::addDragObject( QDragObject *dragObject )
+void KMultipleDrag::addDragObject( TQDragObject *dragObject )
{
//kdDebug() << "KMultipleDrag::addDragObject" << endl;
m_dragObjects.append( dragObject );
@@ -39,11 +39,11 @@ void KMultipleDrag::addDragObject( QDragObject *dragObject )
m_numberFormats.append( i ); // e.g. if it supports two formats, 0 and 1, store 2.
}
-QByteArray KMultipleDrag::encodedData( const char *mime ) const
+TQByteArray KMultipleDrag::encodedData( const char *mime ) const
{
//kdDebug() << "KMultipleDrag::encodedData " << mime << endl;
// Iterate over the drag objects, and find the format in the right one
- QPtrListIterator<QDragObject> it( m_dragObjects );
+ TQPtrListIterator<TQDragObject> it( m_dragObjects );
for ( ; it.current(); ++it )
{
for ( int i = 0; it.current()->format( i ); ++i )
@@ -52,7 +52,7 @@ QByteArray KMultipleDrag::encodedData( const char *mime ) const
return it.current()->encodedData( mime );
}
}
- return QByteArray();
+ return TQByteArray();
}
const char* KMultipleDrag::format( int i ) const
@@ -64,9 +64,9 @@ const char* KMultipleDrag::format( int i ) const
// i=1 -> textdrag->format( 0 )
// i=2 -> textdrag->format( 1 )
// etc.
- QValueList<int>::ConstIterator nit = m_numberFormats.begin();
- QValueList<int>::ConstIterator nend = m_numberFormats.end();
- QPtrListIterator<QDragObject> it( m_dragObjects );
+ TQValueList<int>::ConstIterator nit = m_numberFormats.begin();
+ TQValueList<int>::ConstIterator nend = m_numberFormats.end();
+ TQPtrListIterator<TQDragObject> it( m_dragObjects );
for ( ; nit != nend && i >= *nit ; ++nit, ++it )
i -= *nit;
if ( it.current() )
diff --git a/kdecore/kmultipledrag.h b/kdecore/kmultipledrag.h
index bb08c86cc..85a0a66a3 100644
--- a/kdecore/kmultipledrag.h
+++ b/kdecore/kmultipledrag.h
@@ -22,8 +22,8 @@
#ifndef QT_NO_DRAGANDDROP
-#include <qdragobject.h>
-#include <qvaluelist.h>
+#include <tqdragobject.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KMultipleDragPrivate;
@@ -34,14 +34,14 @@ class KMultipleDragPrivate;
*
* Instead of creating a specific class for each case (as would otherwise
* be necessary), you can simply create independent drag objects (e.g.
- * a QImageDrag object and a KURLDrag object), and bundle them together
+ * a TQImageDrag object and a KURLDrag object), and bundle them together
* using KMultipleDrag.
*
* Sample code for this:
*
* \code
* KMultipleDrag *drag = new KMultipleDrag( parentWidget );
- * drag->addDragObject( new QImageDrag( someQImage, 0 ) );
+ * drag->addDragObject( new TQImageDrag( someQImage, 0 ) );
* drag->addDragObject( new KURLDrag( someKURL, 0 ) );
* drag->drag();
* \endcode
@@ -62,7 +62,7 @@ public:
* 0 for a parent-less object
* @param name the name of the object, can be 0
*/
- KMultipleDrag( QWidget *dragSource = 0, const char *name = 0 );
+ KMultipleDrag( TQWidget *dragSource = 0, const char *name = 0 );
/**
* Call this to add each underlying drag object to the multiple drag object.
@@ -71,7 +71,7 @@ public:
*
* @param dragObject the drag object to add. Should have no parent object.
*/
- void addDragObject( QDragObject *dragObject );
+ void addDragObject( TQDragObject *dragObject );
/**
* Returns the data of a drag object with that supports the given
@@ -80,7 +80,7 @@ public:
* @return the data, or a null byte array if not found
* @reimp
*/
- virtual QByteArray encodedData( const char *mime ) const;
+ virtual TQByteArray encodedData( const char *mime ) const;
/**
* Returns the @p i'th supported format, or 0.
@@ -92,8 +92,8 @@ public:
protected:
// KDE4: make private
- QPtrList<QDragObject> m_dragObjects;
- QValueList<int> m_numberFormats;
+ TQPtrList<TQDragObject> m_dragObjects;
+ TQValueList<int> m_numberFormats;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdecore/knotifyclient.cpp b/kdecore/knotifyclient.cpp
index ab3032c35..bce90d86a 100644
--- a/kdecore/knotifyclient.cpp
+++ b/kdecore/knotifyclient.cpp
@@ -20,8 +20,8 @@
#include "knotifyclient.h"
-#include <qdatastream.h>
-#include <qptrstack.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -33,7 +33,7 @@
static const char daemonName[] = "knotify";
-static bool canAvoidStartupEvent( const QString& event, const QString& appname, int present )
+static bool canAvoidStartupEvent( const TQString& event, const TQString& appname, int present )
{
static bool checkAvoid = true;
if( !checkAvoid )
@@ -62,9 +62,9 @@ static bool canAvoidStartupEvent( const QString& event, const QString& appname,
return true;
}
-static int sendNotifyEvent(const QString &message, const QString &text,
- int present, int level, const QString &sound,
- const QString &file, int winId )
+static int sendNotifyEvent(const TQString &message, const TQString &text,
+ int present, int level, const TQString &sound,
+ const TQString &file, int winId )
{
if (!kapp) return 0;
@@ -76,7 +76,7 @@ static int sendNotifyEvent(const QString &message, const QString &text,
return 0;
}
- QString appname = KNotifyClient::instance()->instanceName();
+ TQString appname = KNotifyClient::instance()->instanceName();
if( canAvoidStartupEvent( message, appname, present ))
return -1; // done "successfully" - there will be no event presentation
@@ -84,19 +84,19 @@ static int sendNotifyEvent(const QString &message, const QString &text,
int uniqueId = kMax( 1, kapp->random() ); // must not be 0 -- means failure!
// knotify daemon needs toplevel window
- QWidget* widget = QWidget::find( (WId)winId );
+ TQWidget* widget = TQWidget::find( (WId)winId );
if( widget )
winId = (int)widget->topLevelWidget()->winId();
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << message << appname << text << sound << file << present << level
<< winId << uniqueId;
if ( !KNotifyClient::startDaemon() )
return 0;
- if ( client->send(daemonName, "Notify", "notify(QString,QString,QString,QString,QString,int,int,int,int)", data) )
+ if ( client->send(daemonName, "Notify", "notify(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", data) )
{
return uniqueId;
}
@@ -104,63 +104,63 @@ static int sendNotifyEvent(const QString &message, const QString &text,
return 0;
}
-int KNotifyClient::event( StandardEvent type, const QString& text )
+int KNotifyClient::event( StandardEvent type, const TQString& text )
{
return event( 0, type, text );
}
-int KNotifyClient::event(const QString &message, const QString &text)
+int KNotifyClient::event(const TQString &message, const TQString &text)
{
return event(0, message, text);
}
-int KNotifyClient::userEvent(const QString &text, int present, int level,
- const QString &sound, const QString &file)
+int KNotifyClient::userEvent(const TQString &text, int present, int level,
+ const TQString &sound, const TQString &file)
{
return userEvent( 0, text, present, level, sound, file );
}
-int KNotifyClient::event( int winId, StandardEvent type, const QString& text )
+int KNotifyClient::event( int winId, StandardEvent type, const TQString& text )
{
- QString message;
+ TQString message;
switch ( type ) {
case cannotOpenFile:
- message = QString::fromLatin1("cannotopenfile");
+ message = TQString::fromLatin1("cannotopenfile");
break;
case warning:
- message = QString::fromLatin1("warning");
+ message = TQString::fromLatin1("warning");
break;
case fatalError:
- message = QString::fromLatin1("fatalerror");
+ message = TQString::fromLatin1("fatalerror");
break;
case catastrophe:
- message = QString::fromLatin1("catastrophe");
+ message = TQString::fromLatin1("catastrophe");
break;
case notification: // fall through
default:
- message = QString::fromLatin1("notification");
+ message = TQString::fromLatin1("notification");
break;
}
return sendNotifyEvent( message, text, Default, Default,
- QString::null, QString::null, winId );
+ TQString::null, TQString::null, winId );
}
-int KNotifyClient::event(int winId, const QString &message,
- const QString &text)
+int KNotifyClient::event(int winId, const TQString &message,
+ const TQString &text)
{
- return sendNotifyEvent(message, text, Default, Default, QString::null, QString::null, winId);
+ return sendNotifyEvent(message, text, Default, Default, TQString::null, TQString::null, winId);
}
-int KNotifyClient::userEvent(int winId, const QString &text, int present,
+int KNotifyClient::userEvent(int winId, const TQString &text, int present,
int level,
- const QString &sound, const QString &file)
+ const TQString &sound, const TQString &file)
{
- return sendNotifyEvent(QString::null, text, present, level, sound, file, winId);
+ return sendNotifyEvent(TQString::null, text, present, level, sound, file, winId);
}
-int KNotifyClient::getPresentation(const QString &eventname)
+int KNotifyClient::getPresentation(const TQString &eventname)
{
int present;
if (eventname.isEmpty()) return Default;
@@ -173,9 +173,9 @@ int KNotifyClient::getPresentation(const QString &eventname)
return present;
}
-QString KNotifyClient::getFile(const QString &eventname, int present)
+TQString KNotifyClient::getFile(const TQString &eventname, int present)
{
- if (eventname.isEmpty()) return QString::null;
+ if (eventname.isEmpty()) return TQString::null;
KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
eventsfile.setGroup(eventname);
@@ -188,10 +188,10 @@ QString KNotifyClient::getFile(const QString &eventname, int present)
return eventsfile.readPathEntry("logfile");
}
- return QString::null;
+ return TQString::null;
}
-int KNotifyClient::getDefaultPresentation(const QString &eventname)
+int KNotifyClient::getDefaultPresentation(const TQString &eventname)
{
int present;
if (eventname.isEmpty()) return Default;
@@ -204,9 +204,9 @@ int KNotifyClient::getDefaultPresentation(const QString &eventname)
return present;
}
-QString KNotifyClient::getDefaultFile(const QString &eventname, int present)
+TQString KNotifyClient::getDefaultFile(const TQString &eventname, int present)
{
- if (eventname.isEmpty()) return QString::null;
+ if (eventname.isEmpty()) return TQString::null;
KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
eventsfile.setGroup(eventname);
@@ -219,7 +219,7 @@ QString KNotifyClient::getDefaultFile(const QString &eventname, int present)
return eventsfile.readPathEntry("default_logfile");
}
- return QString::null;
+ return TQString::null;
}
bool KNotifyClient::startDaemon()
@@ -236,10 +236,10 @@ bool KNotifyClient::startDaemon()
}
-void KNotifyClient::beep(const QString& reason)
+void KNotifyClient::beep(const TQString& reason)
{
if ( !kapp || KNotifyClient::Instance::currentInstance()->useSystemBell() ) {
- QApplication::beep();
+ TQApplication::beep();
return;
}
@@ -249,14 +249,14 @@ void KNotifyClient::beep(const QString& reason)
client->attach();
if (!client->isAttached() || !client->isApplicationRegistered(daemonName))
{
- QApplication::beep();
+ TQApplication::beep();
return;
}
}
// The kaccess daemon handles visual and other audible beeps
if ( client->isApplicationRegistered( "kaccess" ) )
{
- QApplication::beep();
+ TQApplication::beep();
return;
}
@@ -300,7 +300,7 @@ public:
}
private:
- QPtrStack<Instance> m_instances;
+ TQPtrStack<Instance> m_instances;
Instance *m_defaultInstance;
};
diff --git a/kdecore/knotifyclient.h b/kdecore/knotifyclient.h
index e7be1798e..2de3e297d 100644
--- a/kdecore/knotifyclient.h
+++ b/kdecore/knotifyclient.h
@@ -17,7 +17,7 @@
*/
#ifndef _KNOTIFY_CLIENT
#define _KNOTIFY_CLIENT
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class KInstance;
@@ -182,19 +182,19 @@ namespace KNotifyClient
* @deprecated
* @param message The name of the event
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED;
+ KDECORE_EXPORT int event(const TQString &message, const TQString &text=TQString::null) KDE_DEPRECATED;
/**
* @deprecated
* Allows to easily emit standard events.
* @param event The event you want to raise.
- * @param text The text explaining the event you raise. Can be QString::null.
+ * @param text The text explaining the event you raise. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int event( StandardEvent event, const QString& text=QString::null ) KDE_DEPRECATED;
+ KDECORE_EXPORT int event( StandardEvent event, const TQString& text=TQString::null ) KDE_DEPRECATED;
/**
* @deprecated
@@ -206,8 +206,8 @@ namespace KNotifyClient
* @param file The log file to append the message to if selected with @p present
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int userEvent(const QString &text=QString::null, int present=Default, int level=Default,
- const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED;
+ KDECORE_EXPORT int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default,
+ const TQString &sound=TQString::null, const TQString &file=TQString::null) KDE_DEPRECATED;
//#endif
@@ -222,13 +222,13 @@ namespace KNotifyClient
* @param winId The winId() of the widget where the event originates
* @param message The name of the event
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
* @since 3.1.1
*/
// KDE4: use WId instead of int
- KDECORE_EXPORT int event( int winId, const QString& message,
- const QString& text = QString::null );
+ KDECORE_EXPORT int event( int winId, const TQString& message,
+ const TQString& text = TQString::null );
/**
* You should
@@ -237,13 +237,13 @@ namespace KNotifyClient
* @param winId The winId() of the widget where the event originates
* @param event The event you want to raise
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
* @since 3.1.1
*/
// KDE4: use WId instead of int
KDECORE_EXPORT int event( int winId, StandardEvent event,
- const QString& text = QString::null );
+ const TQString& text = TQString::null );
/**
* Will fire an event that's not registered.
@@ -260,18 +260,18 @@ namespace KNotifyClient
* @since 3.1.1
*/
// KDE4: use WId instead of int
- KDECORE_EXPORT int userEvent(int winId, const QString &text=QString::null, int present=Default, int level=Default,
- const QString &sound=QString::null, const QString &file=QString::null);
+ KDECORE_EXPORT int userEvent(int winId, const TQString &text=TQString::null, int present=Default, int level=Default,
+ const TQString &sound=TQString::null, const TQString &file=TQString::null);
/**
- * This is a simple substitution for QApplication::beep().
+ * This is a simple substitution for TQApplication::beep().
* It simply calls
* \code
* KNotifyClient::event( KNotifyClient::notification, reason );
* \endcode
- * @param reason the reason, can be QString::null.
+ * @param reason the reason, can be TQString::null.
*/
- KDECORE_EXPORT void beep(const QString& reason=QString::null);
+ KDECORE_EXPORT void beep(const TQString& reason=TQString::null);
/**
* Gets the presentation associated with a certain event name
@@ -282,7 +282,7 @@ namespace KNotifyClient
* @param eventname the event name to check
* @return the presentation methods
*/
- KDECORE_EXPORT int getPresentation(const QString &eventname);
+ KDECORE_EXPORT int getPresentation(const TQString &eventname);
/**
* Gets the default file associated with a certain event name
@@ -290,9 +290,9 @@ namespace KNotifyClient
* This has the potential for being slow.
* @param eventname the name of the event
* @param present the presentation method
- * @return the associated file. Can be QString::null if not found.
+ * @return the associated file. Can be TQString::null if not found.
*/
- KDECORE_EXPORT QString getFile(const QString &eventname, int present);
+ KDECORE_EXPORT TQString getFile(const TQString &eventname, int present);
/**
* Gets the default presentation for the event of this program.
@@ -302,7 +302,7 @@ namespace KNotifyClient
* \endcode
* @return the presentation methods
*/
- KDECORE_EXPORT int getDefaultPresentation(const QString &eventname);
+ KDECORE_EXPORT int getDefaultPresentation(const TQString &eventname);
/**
* Gets the default File for the event of this program.
@@ -311,9 +311,9 @@ namespace KNotifyClient
* Some do (Sound)
* @param eventname the name of the event
* @param present the presentation method
- * @return the default file. Can be QString::null if not found.
+ * @return the default file. Can be TQString::null if not found.
*/
- KDECORE_EXPORT QString getDefaultFile(const QString &eventname, int present);
+ KDECORE_EXPORT TQString getDefaultFile(const TQString &eventname, int present);
/**
* Shortcut to KNotifyClient::Instance::current() :)
diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp
index 293dc293e..49cacc79b 100644
--- a/kdecore/kpalette.cpp
+++ b/kdecore/kpalette.cpp
@@ -21,23 +21,23 @@
#include "kpalette.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <ksavefile.h>
#include <kstringhandler.h>
-template class QPtrList<KPalette::kolor>;
+template class TQPtrList<KPalette::kolor>;
QStringList
KPalette::getPaletteList()
{
- QStringList paletteList;
+ TQStringList paletteList;
KGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList);
int strip = strlen("colors/");
- for(QStringList::Iterator it = paletteList.begin();
+ for(TQStringList::Iterator it = paletteList.begin();
it != paletteList.end();
it++)
{
@@ -47,21 +47,21 @@ KPalette::getPaletteList()
return paletteList;
}
-KPalette::KPalette(const QString &name)
+KPalette::KPalette(const TQString &name)
: mName(name)
{
mKolorList.setAutoDelete(true);
if (mName.isEmpty()) return;
- QString filename = locate("config", "colors/"+mName);
+ TQString filename = locate("config", "colors/"+mName);
if (filename.isEmpty()) return;
- QFile paletteFile(filename);
+ TQFile paletteFile(filename);
if (!paletteFile.exists()) return;
if (!paletteFile.open(IO_ReadOnly)) return;
uint maxLength = 1024;
- QString line;
+ TQString line;
// Read first line
// Expected "GIMP Palette"
@@ -112,7 +112,7 @@ KPalette::KPalette(const KPalette &p)
// Make a deep copy of the color list
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) &p.mKolorList;
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) &p.mKolorList;
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
mKolorList.append(new kolor(*node));
@@ -127,20 +127,20 @@ KPalette::~KPalette()
bool
KPalette::save()
{
- QString filename = locateLocal("config", "colors/"+mName);
+ TQString filename = locateLocal("config", "colors/"+mName);
KSaveFile sf(filename);
if (sf.status() != 0) return false;
- QTextStream *str = sf.textStream();
+ TQTextStream *str = sf.textStream();
- QString description = mDesc.stripWhiteSpace();
- description = "#"+QStringList::split("\n", description, true).join("\n#");
+ TQString description = mDesc.stripWhiteSpace();
+ description = "#"+TQStringList::split("\n", description, true).join("\n#");
(*str) << "KDE RGB Palette\n";
(*str) << description << "\n";
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) (&mKolorList);
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) (&mKolorList);
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
int r,g,b;
@@ -159,7 +159,7 @@ KPalette::operator=( const KPalette &p)
// Make a deep copy of the color list
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) &p.mKolorList;
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) &p.mKolorList;
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
mKolorList.append(new kolor(*node));
@@ -174,20 +174,20 @@ QColor
KPalette::color(int index)
{
if ((index < 0) || (index >= nrColors()))
- return QColor();
+ return TQColor();
kolor *node = mKolorList.at(index);
if (!node)
- return QColor();
+ return TQColor();
return node->color;
}
int
-KPalette::findColor(const QColor &color) const
+KPalette::findColor(const TQColor &color) const
{
int index;
- QPtrListIterator<kolor> it( mKolorList );
+ TQPtrListIterator<kolor> it( mKolorList );
for (index = 0; it.current(); ++it, ++index)
{
if (it.current()->color == color)
@@ -200,17 +200,17 @@ QString
KPalette::colorName(int index)
{
if ((index < 0) || (index >= nrColors()))
- return QString::null;
+ return TQString::null;
kolor *node = mKolorList.at(index);
if (!node)
- return QString::null;
+ return TQString::null;
return node->name;
}
int
-KPalette::addColor(const QColor &newColor, const QString &newColorName)
+KPalette::addColor(const TQColor &newColor, const TQString &newColorName)
{
kolor *node = new kolor();
node->color = newColor;
@@ -221,8 +221,8 @@ KPalette::addColor(const QColor &newColor, const QString &newColorName)
int
KPalette::changeColor(int index,
- const QColor &newColor,
- const QString &newColorName)
+ const TQColor &newColor,
+ const TQString &newColorName)
{
if ((index < 0) || (index >= nrColors()))
return -1;
diff --git a/kdecore/kpalette.h b/kdecore/kpalette.h
index 93103c33a..4f9c74029 100644
--- a/kdecore/kpalette.h
+++ b/kdecore/kpalette.h
@@ -22,10 +22,10 @@
#ifndef KDELIBS_KPALETTE_H
#define KDELIBS_KPALETTE_H
-#include <qcolor.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
class KPalettePrivate;
@@ -39,7 +39,7 @@ class KPalettePrivate;
*
* This class uses the "GIMP" palette file format.
*
- * This class is totally unrelated to QPalette.
+ * This class is totally unrelated to TQPalette.
*
* @author Waldo Bastian (bastian@kde.org)
**/
@@ -51,14 +51,14 @@ public:
*
* @return A list with a palette names.
*/
- static QStringList getPaletteList();
+ static TQStringList getPaletteList();
/**
* KPalette constructor. Creates a KPalette from a file
* the filename is derived from the name.
* @param name The name of palette as returned by getPaletteList()
**/
- KPalette(const QString &name=QString::null);
+ KPalette(const TQString &name=TQString::null);
/**
* KPalette copy constructor.
@@ -86,28 +86,28 @@ public:
* Get the description of the palette.
* @return the description of the palette.
**/
- QString description() const
+ TQString description() const
{ return mDesc; }
/**
* Set the description of the palette.
* @param desc the new description
**/
- void setDescription(const QString &desc)
+ void setDescription(const TQString &desc)
{ mDesc = desc; }
/**
* Get the name of the palette.
* @return the name of the palette
**/
- QString name() const
+ TQString name() const
{ return mName; }
/**
* Set the name of the palette.
* @param name the name of the palette
**/
- void setName(const QString &name)
+ void setName(const TQString &name)
{ mName = name; }
/**
@@ -146,7 +146,7 @@ public:
* @param index the index of the desired color
* @return The @p index -th color of the palette, null if not found.
**/
- QColor color(int index);
+ TQColor color(int index);
/**
* Find index by @p color.
@@ -154,7 +154,7 @@ public:
* @return The index of the color in the palette or -1 if the
* color is not found.
**/
- int findColor(const QColor &color) const;
+ int findColor(const TQColor &color) const;
/**
* Find color name by @p index.
@@ -163,7 +163,7 @@ public:
* Note that not all palettes have named the colors. Null is
* returned if the color does not exist or has no name.
**/
- QString colorName(int index);
+ TQString colorName(int index);
/**
* Find color name by @p color.
@@ -172,7 +172,7 @@ public:
* Note also that each palette can give the same color
* a different name.
**/
- QString colorName(const QColor &color)
+ TQString colorName(const TQColor &color)
{ return colorName( findColor(color)); }
/**
@@ -182,8 +182,8 @@ public:
* the name.
* @return The index of the added color.
**/
- int addColor(const QColor &newColor,
- const QString &newColorName = QString::null);
+ int addColor(const TQColor &newColor,
+ const TQString &newColorName = TQString::null);
/**
* Change a color.
@@ -195,8 +195,8 @@ public:
* be changed.
**/
int changeColor(int index,
- const QColor &newColor,
- const QString &newColorName = QString::null);
+ const TQColor &newColor,
+ const TQString &newColorName = TQString::null);
/**
* Change a color.
@@ -207,17 +207,17 @@ public:
* @return The index of the new color or -1 if the color couldn't
* be changed.
**/
- int changeColor(const QColor &oldColor,
- const QColor &newColor,
- const QString &newColorName = QString::null)
+ int changeColor(const TQColor &oldColor,
+ const TQColor &newColor,
+ const TQString &newColorName = TQString::null)
{ return changeColor( findColor(oldColor), newColor, newColorName); }
private:
- typedef struct { QColor color; QString name; } kolor;
- QPtrList<kolor> mKolorList;
+ typedef struct { TQColor color; TQString name; } kolor;
+ TQPtrList<kolor> mKolorList;
- QString mName;
- QString mDesc;
+ TQString mName;
+ TQString mDesc;
Editable mEditable;
KPalettePrivate *d;
diff --git a/kdecore/kpixmapprovider.h b/kdecore/kpixmapprovider.h
index fb7ac7d0a..8b3c653af 100644
--- a/kdecore/kpixmapprovider.h
+++ b/kdecore/kpixmapprovider.h
@@ -21,7 +21,7 @@
#ifndef KPIXMAPPROVIDER_H
#define KPIXMAPPROVIDER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kdelibs_export.h"
/**
@@ -46,7 +46,7 @@ public:
* See KIcon::StdSize.
* @return the pixmap for the arguments, or null if there is none
*/
- virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0;
+ virtual TQPixmap pixmapFor( const TQString& text, int size = 0 ) = 0;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kdecore/kprocctrl.cpp b/kdecore/kprocctrl.cpp
index 363d2d8ef..d8170c0a8 100644
--- a/kdecore/kprocctrl.cpp
+++ b/kdecore/kprocctrl.cpp
@@ -31,7 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
KProcessController *KProcessController::theKProcessController;
int KProcessController::refCount;
@@ -69,10 +69,10 @@ KProcessController::KProcessController()
fcntl( fd[0], F_SETFD, FD_CLOEXEC );
fcntl( fd[1], F_SETFD, FD_CLOEXEC );
- notifier = new QSocketNotifier( fd[0], QSocketNotifier::Read );
+ notifier = new TQSocketNotifier( fd[0], TQSocketNotifier::Read );
notifier->setEnabled( true );
- QObject::connect( notifier, SIGNAL(activated(int)),
- SLOT(slotDoHousekeeping()));
+ TQObject::connect( notifier, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotDoHousekeeping()));
}
KProcessController::~KProcessController()
@@ -192,8 +192,8 @@ void KProcessController::slotDoHousekeeping()
int status;
again:
- QValueListIterator<KProcess*> it( kProcessList.begin() );
- QValueListIterator<KProcess*> eit( kProcessList.end() );
+ TQValueListIterator<KProcess*> it( kProcessList.begin() );
+ TQValueListIterator<KProcess*> eit( kProcessList.end() );
while( it != eit )
{
KProcess *prc = *it;
@@ -207,8 +207,8 @@ void KProcessController::slotDoHousekeeping()
}
++it;
}
- QValueListIterator<int> uit( unixProcessList.begin() );
- QValueListIterator<int> ueit( unixProcessList.end() );
+ TQValueListIterator<int> uit( unixProcessList.begin() );
+ TQValueListIterator<int> ueit( unixProcessList.end() );
while( uit != ueit )
{
if( waitpid( *uit, 0, WNOHANG ) > 0 )
diff --git a/kdecore/kprocctrl.h b/kdecore/kprocctrl.h
index 104c8d9e5..3af87fff5 100644
--- a/kdecore/kprocctrl.h
+++ b/kdecore/kprocctrl.h
@@ -20,7 +20,7 @@
#ifndef __KPROCCTRL_H__
#define __KPROCCTRL_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kprocess.h"
@@ -124,9 +124,9 @@ private:
int fd[2];
bool needcheck;
- QSocketNotifier *notifier;
- QValueList<KProcess*> kProcessList;
- QValueList<int> unixProcessList;
+ TQSocketNotifier *notifier;
+ TQValueList<KProcess*> kProcessList;
+ TQValueList<int> unixProcessList;
static void setupHandlers();
static void resetHandlers();
diff --git a/kdecore/kprocess.cpp b/kdecore/kprocess.cpp
index 286790bcb..f13813d15 100644
--- a/kdecore/kprocess.cpp
+++ b/kdecore/kprocess.cpp
@@ -72,9 +72,9 @@
#include <pwd.h>
#include <grp.h>
-#include <qfile.h>
-#include <qsocketnotifier.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqsocketnotifier.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -107,18 +107,18 @@ public:
int priority;
- QMap<QString,QString> env;
- QString wd;
- QCString shell;
- QCString executable;
+ TQMap<TQString,TQString> env;
+ TQString wd;
+ TQCString shell;
+ TQCString executable;
};
/////////////////////////////
// public member functions //
/////////////////////////////
-KProcess::KProcess( QObject* parent, const char *name )
- : QObject( parent, name ),
+KProcess::KProcess( TQObject* parent, const char *name )
+ : TQObject( parent, name ),
run_mode(NotifyOnExit),
runs(false),
pid_(0),
@@ -143,7 +143,7 @@ KProcess::KProcess( QObject* parent, const char *name )
}
KProcess::KProcess()
- : QObject(),
+ : TQObject(),
run_mode(NotifyOnExit),
runs(false),
pid_(0),
@@ -168,13 +168,13 @@ KProcess::KProcess()
}
void
-KProcess::setEnvironment(const QString &name, const QString &value)
+KProcess::setEnvironment(const TQString &name, const TQString &value)
{
d->env.insert(name, value);
}
void
-KProcess::setWorkingDirectory(const QString &dir)
+KProcess::setWorkingDirectory(const TQString &dir)
{
d->wd = dir;
}
@@ -182,15 +182,15 @@ KProcess::setWorkingDirectory(const QString &dir)
void
KProcess::setupEnvironment()
{
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for(it = d->env.begin(); it != d->env.end(); ++it)
{
- setenv(QFile::encodeName(it.key()).data(),
- QFile::encodeName(it.data()).data(), 1);
+ setenv(TQFile::encodeName(it.key()).data(),
+ TQFile::encodeName(it.data()).data(), 1);
}
if (!d->wd.isEmpty())
{
- chdir(QFile::encodeName(d->wd).data());
+ chdir(TQFile::encodeName(d->wd).data());
}
}
@@ -252,7 +252,7 @@ void KProcess::setBinaryExecutable(const char *filename)
d->executable = filename;
}
-bool KProcess::setExecutable(const QString& proc)
+bool KProcess::setExecutable(const TQString& proc)
{
if (runs) return false;
@@ -260,20 +260,20 @@ bool KProcess::setExecutable(const QString& proc)
if (!arguments.isEmpty())
arguments.remove(arguments.begin());
- arguments.prepend(QFile::encodeName(proc));
+ arguments.prepend(TQFile::encodeName(proc));
return true;
}
-KProcess &KProcess::operator<<(const QStringList& args)
+KProcess &KProcess::operator<<(const TQStringList& args)
{
- QStringList::ConstIterator it = args.begin();
+ TQStringList::ConstIterator it = args.begin();
for ( ; it != args.end() ; ++it )
- arguments.append(QFile::encodeName(*it));
+ arguments.append(TQFile::encodeName(*it));
return *this;
}
-KProcess &KProcess::operator<<(const QCString& arg)
+KProcess &KProcess::operator<<(const TQCString& arg)
{
return operator<< (arg.data());
}
@@ -284,9 +284,9 @@ KProcess &KProcess::operator<<(const char* arg)
return *this;
}
-KProcess &KProcess::operator<<(const QString& arg)
+KProcess &KProcess::operator<<(const TQString& arg)
{
- arguments.append(QFile::encodeName(arg));
+ arguments.append(TQFile::encodeName(arg));
return *this;
}
@@ -309,7 +309,7 @@ bool KProcess::start(RunMode runmode, Communication comm)
}
#ifdef Q_OS_UNIX
char **arglist;
- QCString shellCmd;
+ TQCString shellCmd;
if (d->useShell)
{
if (d->shell.isEmpty()) {
@@ -806,10 +806,10 @@ KPty *KProcess::pty() const
}
#endif //Q_OS_UNIX
-QString KProcess::quote(const QString &arg)
+TQString KProcess::quote(const TQString &arg)
{
- QChar q('\'');
- return QString(arg).replace(q, "'\\''").prepend(q).append(q);
+ TQChar q('\'');
+ return TQString(arg).replace(q, "'\\''").prepend(q).append(q);
}
@@ -956,27 +956,27 @@ int KProcess::commSetupDoneP()
if (communication & Stdin) {
fcntl(in[1], F_SETFL, O_NONBLOCK | fcntl(in[1], F_GETFL));
- innot = new QSocketNotifier(in[1], QSocketNotifier::Write, this);
+ innot = new TQSocketNotifier(in[1], TQSocketNotifier::Write, this);
Q_CHECK_PTR(innot);
innot->setEnabled(false); // will be enabled when data has to be sent
- QObject::connect(innot, SIGNAL(activated(int)),
- this, SLOT(slotSendData(int)));
+ TQObject::connect(innot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSendData(int)));
}
if (communication & Stdout) {
- outnot = new QSocketNotifier(out[0], QSocketNotifier::Read, this);
+ outnot = new TQSocketNotifier(out[0], TQSocketNotifier::Read, this);
Q_CHECK_PTR(outnot);
- QObject::connect(outnot, SIGNAL(activated(int)),
- this, SLOT(slotChildOutput(int)));
+ TQObject::connect(outnot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChildOutput(int)));
if (communication & NoRead)
suspend();
}
if (communication & Stderr) {
- errnot = new QSocketNotifier(err[0], QSocketNotifier::Read, this );
+ errnot = new TQSocketNotifier(err[0], TQSocketNotifier::Read, this );
Q_CHECK_PTR(errnot);
- QObject::connect(errnot, SIGNAL(activated(int)),
- this, SLOT(slotChildError(int)));
+ TQObject::connect(errnot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChildError(int)));
}
return 1;
@@ -1121,7 +1121,7 @@ KShellProcess::KShellProcess(const char *shellname):
KShellProcess::~KShellProcess() {
}
-QString KShellProcess::quote(const QString &arg)
+TQString KShellProcess::quote(const TQString &arg)
{
return KProcess::quote(arg);
}
diff --git a/kdecore/kprocess.h b/kdecore/kprocess.h
index 4b3e88cd4..cb64dda81 100644
--- a/kdecore/kprocess.h
+++ b/kdecore/kprocess.h
@@ -24,9 +24,9 @@
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqobject.h>
#include "kdelibs_export.h"
class QSocketNotifier;
@@ -91,8 +91,8 @@ class KPty;
*
* *proc << "my_executable";
* *proc << "These" << "are" << "the" << "command" << "line" << "args";
- * QApplication::connect(proc, SIGNAL(processExited(KProcess *)),
- * pointer_to_my_object, SLOT(my_objects_slot(KProcess *)));
+ * TQApplication::connect(proc, TQT_SIGNAL(processExited(KProcess *)),
+ * pointer_to_my_object, TQT_SLOT(my_objects_slot(KProcess *)));
* proc->start();
* \endcode
*
@@ -186,7 +186,7 @@ public:
* Constructor
* @since 3.2
*/
- KProcess( QObject* parent, const char *name = 0 );
+ KProcess( TQObject* parent, const char *name = 0 );
/**
* Constructor
@@ -214,7 +214,7 @@ public:
@see operator<<()
*/
- bool setExecutable(const QString& proc) KDE_DEPRECATED;
+ bool setExecutable(const TQString& proc) KDE_DEPRECATED;
/**
@@ -230,17 +230,17 @@ public:
* @param arg the argument to add
* @return a reference to this KProcess
**/
- KProcess &operator<<(const QString& arg);
+ KProcess &operator<<(const TQString& arg);
/**
* Similar to previous method, takes a char *, supposed to be in locale 8 bit already.
*/
KProcess &operator<<(const char * arg);
/**
- * Similar to previous method, takes a QCString, supposed to be in locale 8 bit already.
+ * Similar to previous method, takes a TQCString, supposed to be in locale 8 bit already.
* @param arg the argument to add
* @return a reference to this KProcess
*/
- KProcess &operator<<(const QCString & arg);
+ KProcess &operator<<(const TQCString & arg);
/**
* Sets the executable and the command line argument list for this process,
@@ -248,7 +248,7 @@ public:
* @param args the arguments to add
* @return a reference to this KProcess
**/
- KProcess &operator<<(const QStringList& args);
+ KProcess &operator<<(const TQStringList& args);
/**
* Clear a command line argument list that has been set by using
@@ -464,7 +464,7 @@ public:
* Lets you see what your arguments are for debugging.
* @return the list of arguments
*/
- const QValueList<QCString> &args() /* const */ { return arguments; }
+ const TQValueList<TQCString> &args() /* const */ { return arguments; }
/**
* Controls whether the started process should drop any
@@ -490,7 +490,7 @@ public:
* @param name the name of the environment variable
* @param value the new value for the environment variable
*/
- void setEnvironment(const QString &name, const QString &value);
+ void setEnvironment(const TQString &name, const TQString &value);
/**
* Changes the current working directory (CWD) of the process
@@ -498,7 +498,7 @@ public:
* This function must be called before starting the process.
* @param dir the new directory
*/
- void setWorkingDirectory(const QString &dir);
+ void setWorkingDirectory(const TQString &dir);
/**
* Specify whether to start the command via a shell or directly.
@@ -527,7 +527,7 @@ public:
* @return the quoted argument
* @since 3.1
*/
- static QString quote(const QString &arg);
+ static TQString quote(const TQString &arg);
/**
* Detaches KProcess from child process. All communication is closed.
@@ -601,7 +601,7 @@ signals:
* data structures before returning from the slot.
* Example:
* \code
- * QString myBuf = QString::fromLatin1(buffer, buflen);
+ * TQString myBuf = TQString::fromLatin1(buffer, buflen);
* \endcode
**/
void receivedStdout(KProcess *proc, char *buffer, int buflen);
@@ -671,7 +671,7 @@ protected slots:
/**
* Called when another bulk of data can be sent to the child's
* stdin. If there is no more data to be sent to stdin currently
- * available, this function must disable the QSocketNotifier innot.
+ * available, this function must disable the TQSocketNotifier innot.
* @param dummy ignore this argument
*/
void slotSendData(int dummy); // KDE 4: remove dummy
@@ -688,7 +688,7 @@ protected:
* The list of the process' command line arguments. The first entry
* in this list is the executable itself.
*/
- QValueList<QCString> arguments;
+ TQValueList<TQCString> arguments;
/**
* How to run the process (Block, NotifyOnExit, DontCare). You should
* not modify this data member directly from derived classes.
@@ -830,15 +830,15 @@ protected:
/**
* The socket notifier for in[1].
*/
- QSocketNotifier *innot;
+ TQSocketNotifier *innot;
/**
* The socket notifier for out[0].
*/
- QSocketNotifier *outnot;
+ TQSocketNotifier *outnot;
/**
* The socket notifier for err[0].
*/
- QSocketNotifier *errnot;
+ TQSocketNotifier *errnot;
/**
* Lists the communication links that are activated for the child
@@ -917,10 +917,10 @@ public:
virtual bool start(RunMode runmode = NotifyOnExit,
Communication comm = NoCommunication);
- static QString quote(const QString &arg);
+ static TQString quote(const TQString &arg);
private:
- QCString shell;
+ TQCString shell;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp
index d6fe33d89..15a2f70bc 100644
--- a/kdecore/kprocio.cpp
+++ b/kdecore/kprocio.cpp
@@ -27,7 +27,7 @@
#include "kprocio.h"
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
class KProcIOPrivate {
public:
@@ -35,7 +35,7 @@ public:
KProcess::Communication comm;
};
-KProcIO::KProcIO ( QTextCodec *_codec)
+KProcIO::KProcIO ( TQTextCodec *_codec)
: codec(_codec), d(new KProcIOPrivate)
{
rbi=0;
@@ -44,7 +44,7 @@ KProcIO::KProcIO ( QTextCodec *_codec)
if (!codec)
{
- codec = QTextCodec::codecForName("ISO 8859-1");
+ codec = TQTextCodec::codecForName("ISO 8859-1");
if (!codec)
{
kdError(174) << "Can't create ISO 8859-1 codec!" << endl;
@@ -67,14 +67,14 @@ KProcIO::resetAll ()
rbi=0;
readsignalon=writeready=true;
- disconnect (this, SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
- disconnect (this, SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
- disconnect (this, SIGNAL (wroteStdin(KProcess *)),
- this, SLOT (sent (KProcess *)));
+ disconnect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
+ this, TQT_SLOT (sent (KProcess *)));
outbuffer.clear();
@@ -87,29 +87,29 @@ void KProcIO::setComm (Communication comm)
bool KProcIO::start (RunMode runmode, bool includeStderr)
{
- connect (this, SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
if (includeStderr)
{
- connect (this, SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
}
- connect (this, SIGNAL (wroteStdin(KProcess *)),
- this, SLOT (sent (KProcess *)));
+ connect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
+ this, TQT_SLOT (sent (KProcess *)));
return KProcess::start (runmode, d->comm);
}
-bool KProcIO::writeStdin (const QString &line, bool appendnewline)
+bool KProcIO::writeStdin (const TQString &line, bool appendnewline)
{
return writeStdin(codec->fromUnicode(line), appendnewline);
}
-bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
+bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)
{
- QCString *qs = new QCString(line);
+ TQCString *qs = new TQCString(line);
if (appendnewline)
{
@@ -123,7 +123,7 @@ bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
return true;
}
- QByteArray *b = (QByteArray *) qs;
+ TQByteArray *b = (TQByteArray *) qs;
b->truncate(l); // Strip trailing null
outbuffer.append(b);
@@ -136,11 +136,11 @@ bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
return true;
}
-bool KProcIO::writeStdin(const QByteArray &data)
+bool KProcIO::writeStdin(const TQByteArray &data)
{
if (!data.size())
return true;
- QByteArray *b = new QByteArray(data);
+ TQByteArray *b = new TQByteArray(data);
outbuffer.append(b);
if (writeready)
@@ -173,7 +173,7 @@ void KProcIO::sent(KProcess *)
}
else
{
- QByteArray *b = outbuffer.first();
+ TQByteArray *b = outbuffer.first();
if (!b)
{
closeStdin();
@@ -188,7 +188,7 @@ void KProcIO::sent(KProcess *)
void KProcIO::received (KProcess *, char *buffer, int buflen)
{
- recvbuffer += QCString(buffer, buflen+1);
+ recvbuffer += TQCString(buffer, buflen+1);
controlledEmission();
}
@@ -222,7 +222,7 @@ void KProcIO::enableReadSignals (bool enable)
emit readReady (this);
}
-int KProcIO::readln (QString &line, bool autoAck, bool *partial)
+int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
{
int len;
diff --git a/kdecore/kprocio.h b/kdecore/kprocio.h
index 192c16fc1..1cd397deb 100644
--- a/kdecore/kprocio.h
+++ b/kdecore/kprocio.h
@@ -18,9 +18,9 @@
#ifndef KPROCIO_H_
#define KPROCIO_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <kprocess.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include "kdelibs_export.h"
class KProcIOPrivate;
@@ -55,7 +55,7 @@ public:
/**
* Constructor
*/
- KProcIO ( QTextCodec *codec = 0 );
+ KProcIO ( TQTextCodec *codec = 0 );
/**
* Destructor
@@ -93,7 +93,7 @@ public:
* @param appendnewline if true, a newline '\\n' is appended.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QString &line, bool appendnewline=true);
+ bool writeStdin(const TQString &line, bool appendnewline=true);
/**
* Writes text to stdin of the process.
@@ -101,14 +101,14 @@ public:
* @param appendnewline if true, a newline '\\n' is appended.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QCString &line, bool appendnewline);
+ bool writeStdin(const TQCString &line, bool appendnewline);
/**
* Writes data to stdin of the process.
* @param data Data to write.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QByteArray &data);
+ bool writeStdin(const TQByteArray &data);
//I like fputs better -- it's the same as writeStdin
//inline
@@ -120,7 +120,7 @@ public:
* @return true if successful, false otherwise
* @deprecated
**/
- KDE_DEPRECATED bool fputs (const QString &line, bool AppendNewLine=true)
+ KDE_DEPRECATED bool fputs (const TQString &line, bool AppendNewLine=true)
{ return writeStdin(line, AppendNewLine); }
/**
@@ -149,7 +149,7 @@ public:
* false if the line contains a '\\n' and false otherwise.
* @return the number of characters read, or -1 if no data is available.
**/
- int readln (QString &line, bool autoAck=true, bool *partial=0);
+ int readln (TQString &line, bool autoAck=true, bool *partial=0);
/**
* This function calls readln().
@@ -159,7 +159,7 @@ public:
* @deprecated use readln. Note that it has an inverted autoAck default,
* though.
**/
- KDE_DEPRECATED int fgets (QString &line, bool autoAck=false)
+ KDE_DEPRECATED int fgets (TQString &line, bool autoAck=false)
{ return readln (line, autoAck); }
/**
@@ -195,9 +195,9 @@ signals:
void readReady(KProcIO *pio);
protected:
- QPtrList<QByteArray> outbuffer;
- QCString recvbuffer;
- QTextCodec *codec;
+ TQPtrList<TQByteArray> outbuffer;
+ TQCString recvbuffer;
+ TQTextCodec *codec;
int rbi;
bool needreadsignal, readsignalon, writeready;
diff --git a/kdecore/kprotocolinfo_kdecore.cpp b/kdecore/kprotocolinfo_kdecore.cpp
index 0c40c36d3..203f455a1 100644
--- a/kdecore/kprotocolinfo_kdecore.cpp
+++ b/kdecore/kprotocolinfo_kdecore.cpp
@@ -36,8 +36,8 @@
class KProtocolInfo::KProtocolInfoPrivate
{
public:
- QString docPath;
- QString protClass;
+ TQString docPath;
+ TQString protClass;
KProtocolInfo::ExtraFieldList extraFields;
bool showPreviews;
bool canRenameFromFile;
@@ -45,18 +45,18 @@ public:
bool canDeleteRecursive;
bool fileNameUsedForCopying; // true if using UDS_NAME, false if using KURL::fileName() [default]
KURL::URIMode uriMode;
- QStringList capabilities;
- QString proxyProtocol;
+ TQStringList capabilities;
+ TQString proxyProtocol;
};
//
// Internal functions:
//
-KProtocolInfo::KProtocolInfo(const QString &path)
+KProtocolInfo::KProtocolInfo(const TQString &path)
: KSycocaEntry(path)
{
d = new KProtocolInfoPrivate;
- QString fullPath = locate("services", path);
+ TQString fullPath = locate("services", path);
KSimpleConfig config( fullPath, true );
config.setGroup( "Protocol" );
@@ -89,7 +89,7 @@ KProtocolInfo::KProtocolInfo(const QString &path)
m_config = config.readEntry( "config", m_name );
m_maxSlaves = config.readNumEntry( "maxInstances", 1);
- QString tmp = config.readEntry( "input" );
+ TQString tmp = config.readEntry( "input" );
if ( tmp == "filesystem" )
m_inputType = KProtocolInfo::T_FILESYSTEM;
else if ( tmp == "stream" )
@@ -110,17 +110,17 @@ KProtocolInfo::KProtocolInfo(const QString &path)
if (d->protClass[0] != ':')
d->protClass.prepend(':');
- QStringList extraNames = config.readListEntry( "ExtraNames" );
- QStringList extraTypes = config.readListEntry( "ExtraTypes" );
- QStringList::Iterator it = extraNames.begin();
- QStringList::Iterator typeit = extraTypes.begin();
+ TQStringList extraNames = config.readListEntry( "ExtraNames" );
+ TQStringList extraTypes = config.readListEntry( "ExtraTypes" );
+ TQStringList::Iterator it = extraNames.begin();
+ TQStringList::Iterator typeit = extraTypes.begin();
for( ; it != extraNames.end() && typeit != extraTypes.end(); ++it, ++typeit ) {
d->extraFields.append( ExtraField( *it, *typeit ) );
}
d->showPreviews = config.readBoolEntry( "ShowPreviews", d->protClass == ":local" );
- tmp = config.readEntry( "URIMode", QString::null ).lower();
+ tmp = config.readEntry( "URIMode", TQString::null ).lower();
if (tmp == "rawuri")
d->uriMode = KURL::RawURI;
else if (tmp == "mailto")
@@ -134,7 +134,7 @@ KProtocolInfo::KProtocolInfo(const QString &path)
d->proxyProtocol = config.readEntry( "ProxiedBy" );
}
-KProtocolInfo::KProtocolInfo( QDataStream& _str, int offset) :
+KProtocolInfo::KProtocolInfo( TQDataStream& _str, int offset) :
KSycocaEntry( _str, offset)
{
d = new KProtocolInfoPrivate;
@@ -147,7 +147,7 @@ KProtocolInfo::~KProtocolInfo()
}
void
-KProtocolInfo::load( QDataStream& _str)
+KProtocolInfo::load( TQDataStream& _str)
{
// You may add new fields at the end. Make sure to update the version
// number in ksycoca.h
@@ -200,7 +200,7 @@ KProtocolInfo::load( QDataStream& _str)
}
void
-KProtocolInfo::save( QDataStream& _str)
+KProtocolInfo::save( TQDataStream& _str)
{
KSycocaEntry::save( _str );
@@ -259,12 +259,12 @@ KProtocolInfo::save( QDataStream& _str)
// Static functions:
//
-QStringList KProtocolInfo::protocols()
+TQStringList KProtocolInfo::protocols()
{
return KProtocolInfoFactory::self()->protocols();
}
-bool KProtocolInfo::isSourceProtocol( const QString& _protocol )
+bool KProtocolInfo::isSourceProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -273,7 +273,7 @@ bool KProtocolInfo::isSourceProtocol( const QString& _protocol )
return prot->m_isSourceProtocol;
}
-bool KProtocolInfo::isFilterProtocol( const QString& _protocol )
+bool KProtocolInfo::isFilterProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -282,7 +282,7 @@ bool KProtocolInfo::isFilterProtocol( const QString& _protocol )
return !prot->m_isSourceProtocol;
}
-bool KProtocolInfo::isHelperProtocol( const QString& _protocol )
+bool KProtocolInfo::isHelperProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -291,13 +291,13 @@ bool KProtocolInfo::isHelperProtocol( const QString& _protocol )
return prot->m_isHelperProtocol;
}
-bool KProtocolInfo::isKnownProtocol( const QString& _protocol )
+bool KProtocolInfo::isKnownProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
return ( prot != 0);
}
-bool KProtocolInfo::supportsListing( const QString& _protocol )
+bool KProtocolInfo::supportsListing( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -306,16 +306,16 @@ bool KProtocolInfo::supportsListing( const QString& _protocol )
return prot->m_supportsListing;
}
-QStringList KProtocolInfo::listing( const QString& _protocol )
+TQStringList KProtocolInfo::listing( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->m_listing;
}
-bool KProtocolInfo::supportsReading( const QString& _protocol )
+bool KProtocolInfo::supportsReading( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -324,7 +324,7 @@ bool KProtocolInfo::supportsReading( const QString& _protocol )
return prot->m_supportsReading;
}
-bool KProtocolInfo::supportsWriting( const QString& _protocol )
+bool KProtocolInfo::supportsWriting( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -333,7 +333,7 @@ bool KProtocolInfo::supportsWriting( const QString& _protocol )
return prot->m_supportsWriting;
}
-bool KProtocolInfo::supportsMakeDir( const QString& _protocol )
+bool KProtocolInfo::supportsMakeDir( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -342,7 +342,7 @@ bool KProtocolInfo::supportsMakeDir( const QString& _protocol )
return prot->m_supportsMakeDir;
}
-bool KProtocolInfo::supportsDeleting( const QString& _protocol )
+bool KProtocolInfo::supportsDeleting( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -351,7 +351,7 @@ bool KProtocolInfo::supportsDeleting( const QString& _protocol )
return prot->m_supportsDeleting;
}
-bool KProtocolInfo::supportsLinking( const QString& _protocol )
+bool KProtocolInfo::supportsLinking( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -360,7 +360,7 @@ bool KProtocolInfo::supportsLinking( const QString& _protocol )
return prot->m_supportsLinking;
}
-bool KProtocolInfo::supportsMoving( const QString& _protocol )
+bool KProtocolInfo::supportsMoving( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -369,7 +369,7 @@ bool KProtocolInfo::supportsMoving( const QString& _protocol )
return prot->m_supportsMoving;
}
-bool KProtocolInfo::canCopyFromFile( const QString& _protocol )
+bool KProtocolInfo::canCopyFromFile( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -379,7 +379,7 @@ bool KProtocolInfo::canCopyFromFile( const QString& _protocol )
}
-bool KProtocolInfo::canCopyToFile( const QString& _protocol )
+bool KProtocolInfo::canCopyToFile( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -388,25 +388,25 @@ bool KProtocolInfo::canCopyToFile( const QString& _protocol )
return prot->m_canCopyToFile;
}
-QString KProtocolInfo::icon( const QString& _protocol )
+TQString KProtocolInfo::icon( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::fromLatin1("unknown");
+ return TQString::fromLatin1("unknown");
return prot->m_icon;
}
-QString KProtocolInfo::config( const QString& _protocol )
+TQString KProtocolInfo::config( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
- return QString("kio_%1rc").arg(prot->m_config);
+ return TQString("kio_%1rc").arg(prot->m_config);
}
-int KProtocolInfo::maxSlaves( const QString& _protocol )
+int KProtocolInfo::maxSlaves( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -415,16 +415,16 @@ int KProtocolInfo::maxSlaves( const QString& _protocol )
return prot->m_maxSlaves;
}
-QString KProtocolInfo::defaultMimetype( const QString& _protocol )
+TQString KProtocolInfo::defaultMimetype( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_defaultMimetype;
}
-bool KProtocolInfo::determineMimetypeFromExtension( const QString &_protocol )
+bool KProtocolInfo::determineMimetypeFromExtension( const TQString &_protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol( _protocol );
if ( !prot )
@@ -433,16 +433,16 @@ bool KProtocolInfo::determineMimetypeFromExtension( const QString &_protocol )
return prot->m_determineMimetypeFromExtension;
}
-QString KProtocolInfo::exec( const QString& _protocol )
+TQString KProtocolInfo::exec( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_exec;
}
-KProtocolInfo::Type KProtocolInfo::inputType( const QString& _protocol )
+KProtocolInfo::Type KProtocolInfo::inputType( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -451,7 +451,7 @@ KProtocolInfo::Type KProtocolInfo::inputType( const QString& _protocol )
return prot->m_inputType;
}
-KProtocolInfo::Type KProtocolInfo::outputType( const QString& _protocol )
+KProtocolInfo::Type KProtocolInfo::outputType( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -469,25 +469,25 @@ KProtocolInfo::ExtraFieldList KProtocolInfo::extraFields( const KURL &url )
return prot->d->extraFields;
}
-QString KProtocolInfo::docPath( const QString& _protocol )
+TQString KProtocolInfo::docPath( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->docPath;
}
-QString KProtocolInfo::protocolClass( const QString& _protocol )
+TQString KProtocolInfo::protocolClass( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->protClass;
}
-bool KProtocolInfo::showFilePreview( const QString& _protocol )
+bool KProtocolInfo::showFilePreview( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -496,7 +496,7 @@ bool KProtocolInfo::showFilePreview( const QString& _protocol )
return prot->d->showPreviews;
}
-KURL::URIMode KProtocolInfo::uriParseMode( const QString& _protocol )
+KURL::URIMode KProtocolInfo::uriParseMode( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -505,20 +505,20 @@ KURL::URIMode KProtocolInfo::uriParseMode( const QString& _protocol )
return prot->d->uriMode;
}
-QStringList KProtocolInfo::capabilities( const QString& _protocol )
+TQStringList KProtocolInfo::capabilities( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->d->capabilities;
}
-QString KProtocolInfo::proxiedBy( const QString& _protocol )
+TQString KProtocolInfo::proxiedBy( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->proxyProtocol;
}
@@ -543,13 +543,13 @@ KProtocolInfo::FileNameUsedForCopying KProtocolInfo::fileNameUsedForCopying() co
return d->fileNameUsedForCopying ? Name : FromURL;
}
-QDataStream& operator>>( QDataStream& s, KProtocolInfo::ExtraField& field ) {
+TQDataStream& operator>>( TQDataStream& s, KProtocolInfo::ExtraField& field ) {
s >> field.name;
s >> field.type;
return s;
}
-QDataStream& operator<<( QDataStream& s, const KProtocolInfo::ExtraField& field ) {
+TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& field ) {
s << field.name;
s << field.type;
return s;
diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp
index fc2544853..e47cbb881 100644
--- a/kdecore/kprotocolinfofactory.cpp
+++ b/kdecore/kprotocolinfofactory.cpp
@@ -45,7 +45,7 @@ KProtocolInfoFactory::createEntry(int offset)
{
KProtocolInfo *info = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch (type)
{
case KST_KProtocolInfo:
@@ -63,9 +63,9 @@ KProtocolInfoFactory::createEntry(int offset)
}
-QStringList KProtocolInfoFactory::protocols()
+TQStringList KProtocolInfoFactory::protocols()
{
- QStringList res;
+ TQStringList res;
KSycocaEntry::List list = allEntries();
for( KSycocaEntry::List::Iterator it = list.begin();
@@ -82,11 +82,11 @@ QStringList KProtocolInfoFactory::protocols()
}
KProtocolInfo *
-KProtocolInfoFactory::findProtocol(const QString &protocol)
+KProtocolInfoFactory::findProtocol(const TQString &protocol)
{
if (!m_sycocaDict) return 0; // Error!
- QMap<QString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol);
+ TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol);
if (it != m_cache.end())
return (*it);
diff --git a/kdecore/kprotocolinfofactory.h b/kdecore/kprotocolinfofactory.h
index 822f5b455..f710e8ecc 100644
--- a/kdecore/kprotocolinfofactory.h
+++ b/kdecore/kprotocolinfofactory.h
@@ -22,9 +22,9 @@
#include "../kio/kio/kprotocolinfo.h"
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <ksycocafactory.h>
@@ -58,19 +58,19 @@ public:
* @param protocol the protocol to search for
* @return the pointer to the KProtocolInfo, or 0 if not found
*/
- KProtocolInfo *findProtocol(const QString &protocol);
+ KProtocolInfo *findProtocol(const TQString &protocol);
/**
* Returns list of all known protocols.
* @return a list of all protocols
*/
- QStringList protocols();
+ TQStringList protocols();
protected:
/**
* @internal Not used.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ return 0; }
/**
@@ -81,7 +81,7 @@ protected:
protected:
static KProtocolInfoFactory *_self;
- QMap<QString,KProtocolInfo::Ptr> m_cache;
+ TQMap<TQString,KProtocolInfo::Ptr> m_cache;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdecore/kpty.cpp b/kdecore/kpty.cpp
index af83e9eab..b6c3782c4 100644
--- a/kdecore/kpty.cpp
+++ b/kdecore/kpty.cpp
@@ -183,7 +183,7 @@ struct KPtyPrivate {
int slaveFd;
struct winsize winSize;
- QCString ttyName;
+ TQCString ttyName;
};
/////////////////////////////
@@ -217,7 +217,7 @@ bool KPty::setPty(int pty_master)
bool KPty::_attachPty(int pty_master)
{
- QCString ptyName;
+ TQCString ptyName;
kdWarning(175)
<< "_attachPty() " << pty_master << endl;
@@ -309,7 +309,7 @@ bool KPty::open()
if (d->masterFd >= 0)
return true;
- QCString ptyName;
+ TQCString ptyName;
// Find a master pty that we can open ////////////////////////////////
@@ -571,7 +571,7 @@ int KPty::slaveFd() const
bool KPty::chownpty(bool grant)
{
KProcess proc;
- proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << QString::number(d->masterFd);
+ proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << TQString::number(d->masterFd);
return proc.start(KProcess::Block) && proc.normalExit() && !proc.exitStatus();
}
diff --git a/kdecore/kpty.h b/kdecore/kpty.h
index a2ae33b28..5b9a94112 100644
--- a/kdecore/kpty.h
+++ b/kdecore/kpty.h
@@ -23,7 +23,7 @@
#ifndef __kpty_h__
#define __kpty_h__
-#include <qglobal.h>
+#include <tqglobal.h>
#include <kdelibs_export.h>
#ifdef Q_OS_UNIX
diff --git a/kdecore/kqiodevicegzip_p.cpp b/kdecore/kqiodevicegzip_p.cpp
index cb0cd2fe6..2f949b9ee 100644
--- a/kdecore/kqiodevicegzip_p.cpp
+++ b/kdecore/kqiodevicegzip_p.cpp
@@ -19,10 +19,10 @@
// TODO: more error report and control
-#include <qstring.h>
+#include <tqstring.h>
#include "kqiodevicegzip_p.h"
-KQIODeviceGZip::KQIODeviceGZip(const QString& filename)
+KQIODeviceGZip::KQIODeviceGZip(const TQString& filename)
{
m_gzfile=0;
m_ungetchar=-1;
@@ -46,11 +46,11 @@ bool KQIODeviceGZip::open(int mode)
if (IO_ReadOnly==mode)
{
- m_gzfile=gzopen(QFile::encodeName(m_filename),"rb");
+ m_gzfile=gzopen(TQFile::encodeName(m_filename),"rb");
}
else if (IO_WriteOnly==mode)
{
- m_gzfile=gzopen(QFile::encodeName(m_filename),"wb9"); // Always set best compression
+ m_gzfile=gzopen(TQFile::encodeName(m_filename),"wb9"); // Always set best compression
}
else
{
@@ -78,19 +78,19 @@ void KQIODeviceGZip::flush(void)
}
}
-QIODevice::Offset KQIODeviceGZip::size(void) const
+TQIODevice::Offset KQIODeviceGZip::size(void) const
{
return 0; // You cannot determine size!
}
-QIODevice::Offset KQIODeviceGZip::at() const
+TQIODevice::Offset KQIODeviceGZip::at() const
{
if (!m_gzfile)
return 0;
return gztell(m_gzfile);
}
-bool KQIODeviceGZip::at(QIODevice::Offset pos)
+bool KQIODeviceGZip::at(TQIODevice::Offset pos)
{
if (!m_gzfile)
return false;
diff --git a/kdecore/kqiodevicegzip_p.h b/kdecore/kqiodevicegzip_p.h
index c8ebe9be9..02c3fe039 100644
--- a/kdecore/kqiodevicegzip_p.h
+++ b/kdecore/kqiodevicegzip_p.h
@@ -20,22 +20,22 @@
#ifndef KDELIBS_KQIODEVICEGZIP_H
#define KDELIBS_KQIODEVICEGZIP_H
-#include <qiodevice.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <zlib.h>
/**
- * \brief QIODevice class for a gzipped file
+ * \brief TQIODevice class for a gzipped file
* \internal This class is internal to KDE.
* The class KFilterDev should be used instead.
*/
class KQIODeviceGZip : public QIODevice
{
public:
- KQIODeviceGZip(const QString& filename);
+ KQIODeviceGZip(const TQString& filename);
~KQIODeviceGZip(void);
bool open(int mode);
@@ -57,7 +57,7 @@ public:
private:
gzFile m_gzfile;
int m_ungetchar;
- QString m_filename;
+ TQString m_filename;
};
diff --git a/kdecore/krandomsequence.cpp b/kdecore/krandomsequence.cpp
index 415329e60..8e4c88297 100644
--- a/kdecore/krandomsequence.cpp
+++ b/kdecore/krandomsequence.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "krandomsequence.h"
#include "kapplication.h"
@@ -221,12 +221,12 @@ class KRandomSequenceList : public QGList
{
friend class KRandomSequence;
public:
- KRandomSequenceList() : QGList() { }
- virtual void deleteItem( QPtrCollection::Item ) {}
+ KRandomSequenceList() : TQGList() { }
+ virtual void deleteItem( TQPtrCollection::Item ) {}
};
void
-KRandomSequence::randomize(QGList *_list)
+KRandomSequence::randomize(TQGList *_list)
{
KRandomSequenceList *list = (KRandomSequenceList *)_list;
KRandomSequenceList l;
diff --git a/kdecore/krandomsequence.h b/kdecore/krandomsequence.h
index 7d18f732d..877df7a1c 100644
--- a/kdecore/krandomsequence.h
+++ b/kdecore/krandomsequence.h
@@ -104,7 +104,7 @@ public:
*
* @param list the list whose order will be modified
*/
- void randomize(QGList *list);
+ void randomize(TQGList *list);
/**
* Modulate the random sequence.
diff --git a/kdecore/kregexp.h b/kdecore/kregexp.h
index 74489fa3f..c3ed8ff3d 100644
--- a/kdecore/kregexp.h
+++ b/kdecore/kregexp.h
@@ -24,12 +24,12 @@ class KRegExpPrivate;
/**
* @deprecated
- * Please use QRegExp instead.
+ * Please use TQRegExp instead.
*
* Regular expression (regexp) matching with back-references.
*
* This was implemented
- * because QRegExp did not support back-references. It now does and
+ * because TQRegExp did not support back-references. It now does and
* is recommended over KRegExp because of the unicode support and the
* more powerful API.
*
diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp
index 4e214a81f..fc57bc2d3 100644
--- a/kdecore/krfcdate.cpp
+++ b/kdecore/krfcdate.cpp
@@ -27,7 +27,7 @@
#include <ctype.h>
#include <stdlib.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <krfcdate.h>
@@ -95,7 +95,7 @@ static const struct {
};
time_t
-KRFCDate::parseDate(const QString &_date)
+KRFCDate::parseDate(const TQString &_date)
{
if (_date.isEmpty())
return 0;
@@ -340,7 +340,7 @@ KRFCDate::parseDate(const QString &_date)
}
time_t
-KRFCDate::parseDateISO8601( const QString& input_ )
+KRFCDate::parseDateISO8601( const TQString& input_ )
{
if (input_.isEmpty())
return 0;
@@ -360,7 +360,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int offset = 0;
- QString input = input_;
+ TQString input = input_;
// First find the 'T' separator, if any.
int tPos = input.find('T');
@@ -380,11 +380,11 @@ KRFCDate::parseDateISO8601( const QString& input_ )
// Now parse the date part.
- QString dateString = input.left(tPos).stripWhiteSpace();
+ TQString dateString = input.left(tPos).stripWhiteSpace();
- QString timeString = input.mid(tPos + 1).stripWhiteSpace();
+ TQString timeString = input.mid(tPos + 1).stripWhiteSpace();
- QStringList l = QStringList::split('-', dateString);
+ TQStringList l = TQStringList::split('-', dateString);
if (l.size() < 3)
return 0;
@@ -403,7 +403,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int plusPos = timeString.findRev('+');
if (-1 != plusPos) {
- QString offsetString = timeString.mid(plusPos + 1);
+ TQString offsetString = timeString.mid(plusPos + 1);
offset = offsetString.left(2).toUInt() * 60 + offsetString.right(2).toUInt();
@@ -412,7 +412,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int minusPos = timeString.findRev('-');
if (-1 != minusPos) {
- QString offsetString = timeString.mid(minusPos + 1);
+ TQString offsetString = timeString.mid(minusPos + 1);
offset = - int(offsetString.left(2).toUInt() * 60 + offsetString.right(2).toUInt());
@@ -429,7 +429,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
// Now parse the time part.
- l = QStringList::split(':', timeString);
+ l = TQStringList::split(':', timeString);
if (l.size() < 3)
return 0;
@@ -481,13 +481,13 @@ static const char * const month_names[] = {
};
-QCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
+TQCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
{
utcTime += utcOffset * 60;
tm *tM = gmtime(&utcTime);
char sgn = (utcOffset < 0) ? '-' : '+';
int z = (utcOffset < 0) ? -utcOffset : utcOffset;
- QCString dateStr;
+ TQCString dateStr;
dateStr.sprintf("%s, %02d %s %04d %02d:%02d:%02d %c%02d%02d",
day_names[tM->tm_wday], tM->tm_mday,
@@ -499,7 +499,7 @@ QCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
}
-QCString KRFCDate::rfc2822DateString(time_t utcTime)
+TQCString KRFCDate::rfc2822DateString(time_t utcTime)
{
return rfc2822DateString(utcTime, localUTCOffset());
}
diff --git a/kdecore/krfcdate.h b/kdecore/krfcdate.h
index b8884eb0f..ade819622 100644
--- a/kdecore/krfcdate.h
+++ b/kdecore/krfcdate.h
@@ -20,7 +20,7 @@
#ifndef _KRFCDATE_H_
#define _KRFCDATE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <time.h>
#include "kdelibs_export.h"
@@ -44,7 +44,7 @@ public:
* @param date the date to parse
* @return the date, or 0 if not possible
*/
- static time_t parseDate(const QString &date);
+ static time_t parseDate(const TQString &date);
/**
* This function tries to parse a string containing a date/time in
@@ -61,7 +61,7 @@ public:
* @param date the date to parse
* @return the date, or 0 if not possible
*/
- static time_t parseDateISO8601(const QString &date);
+ static time_t parseDateISO8601(const TQString &date);
/**
* Returns the local timezone offset to UTC in minutes
@@ -79,7 +79,7 @@ public:
* @return the string representation of the date
*/
- static QCString rfc2822DateString(time_t utcTime, int utcOffset);
+ static TQCString rfc2822DateString(time_t utcTime, int utcOffset);
/**
@@ -93,7 +93,7 @@ public:
* @return the string representation of the date
*/
- static QCString rfc2822DateString(time_t utcTime);
+ static TQCString rfc2822DateString(time_t utcTime);
};
diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp
index aca5b8255..2d545f30b 100644
--- a/kdecore/krootprop.cpp
+++ b/kdecore/krootprop.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include "config.h"
#ifdef Q_WS_X11 // not needed anyway :-)
@@ -27,12 +27,12 @@
#include "klocale.h"
#include "kcharsets.h"
#include "kapplication.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
-KRootProp::KRootProp(const QString& rProp )
+KRootProp::KRootProp(const TQString& rProp )
{
atom = 0;
dirty = false;
@@ -50,15 +50,15 @@ void KRootProp::sync()
if ( !dirty )
return;
- QString propString;
+ TQString propString;
if ( !propDict.isEmpty() )
{
- QMap<QString,QString>::Iterator it = propDict.begin();
- QString keyvalue;
+ TQMap<TQString,TQString>::Iterator it = propDict.begin();
+ TQString keyvalue;
while ( it != propDict.end() )
{
- keyvalue = QString( "%1=%2\n").arg(it.key()).arg(it.data());
+ keyvalue = TQString( "%1=%2\n").arg(it.key()).arg(it.data());
propString += keyvalue;
++it;
}
@@ -71,7 +71,7 @@ void KRootProp::sync()
XFlush( qt_xdisplay() );
}
-void KRootProp::setProp( const QString& rProp )
+void KRootProp::setProp( const TQString& rProp )
{
Atom type;
int format;
@@ -91,7 +91,7 @@ void KRootProp::setProp( const QString& rProp )
atom = XInternAtom( qt_xdisplay(), rProp.utf8(), False);
- QString s;
+ TQString s;
offset = 0; bytes_after = 1;
while (bytes_after != 0)
{
@@ -100,7 +100,7 @@ void KRootProp::setProp( const QString& rProp )
False, XA_STRING, &type, &format, &nitems, &bytes_after,
&buf) == Success && buf)
{
- s += QString::fromUtf8((const char*)buf);
+ s += TQString::fromUtf8((const char*)buf);
offset += nitems/4;
XFree(buf);
}
@@ -109,10 +109,10 @@ void KRootProp::setProp( const QString& rProp )
// Parse through the property string stripping out key value pairs
// and putting them in the dictionary
- QString keypair;
+ TQString keypair;
int i=0;
- QString key;
- QString value;
+ TQString key;
+ TQString value;
while(s.length() >0 )
{
@@ -142,7 +142,7 @@ void KRootProp::setProp( const QString& rProp )
}
-QString KRootProp::prop() const
+TQString KRootProp::prop() const
{
return property_;
}
@@ -157,8 +157,8 @@ void KRootProp::destroy()
}
}
-QString KRootProp::readEntry( const QString& rKey,
- const QString& pDefault ) const
+TQString KRootProp::readEntry( const TQString& rKey,
+ const TQString& pDefault ) const
{
if( propDict.contains( rKey ) )
return propDict[ rKey ];
@@ -166,10 +166,10 @@ QString KRootProp::readEntry( const QString& rKey,
return pDefault;
}
-int KRootProp::readNumEntry( const QString& rKey, int nDefault ) const
+int KRootProp::readNumEntry( const TQString& rKey, int nDefault ) const
{
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( !aValue.isNull() )
{
bool ok;
@@ -182,16 +182,16 @@ int KRootProp::readNumEntry( const QString& rKey, int nDefault ) const
}
-QFont KRootProp::readFontEntry( const QString& rKey,
- const QFont* pDefault ) const
+TQFont KRootProp::readFontEntry( const TQString& rKey,
+ const TQFont* pDefault ) const
{
- QFont aRetFont;
- QFont aDefFont;
+ TQFont aRetFont;
+ TQFont aDefFont;
if (pDefault)
aDefFont = *pDefault;
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( aValue.isNull() )
return aDefFont; // Return default font
@@ -202,16 +202,16 @@ QFont KRootProp::readFontEntry( const QString& rKey,
}
-QColor KRootProp::readColorEntry( const QString& rKey,
- const QColor* pDefault ) const
+TQColor KRootProp::readColorEntry( const TQString& rKey,
+ const TQColor* pDefault ) const
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
if( pDefault )
aRetColor = *pDefault;
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( aValue.isNull() )
return aRetColor;
@@ -243,58 +243,58 @@ QColor KRootProp::readColorEntry( const QString& rKey,
return aRetColor;
}
-QString KRootProp::writeEntry( const QString& rKey, const QString& rValue )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue )
{
dirty = true;
if ( propDict.contains( rKey ) ) {
- QString aValue = propDict[ rKey ];
+ TQString aValue = propDict[ rKey ];
propDict.replace( rKey, rValue );
return aValue;
}
else {
propDict.insert( rKey, rValue );
- return QString::null;
+ return TQString::null;
}
}
-QString KRootProp::writeEntry( const QString& rKey, int nValue )
+TQString KRootProp::writeEntry( const TQString& rKey, int nValue )
{
- QString aValue;
+ TQString aValue;
aValue.setNum( nValue );
return writeEntry( rKey, aValue );
}
-QString KRootProp::writeEntry( const QString& rKey, const QFont& rFont )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQFont& rFont )
{
return writeEntry( rKey, rFont.toString() );
}
-QString KRootProp::writeEntry( const QString& rKey, const QColor& rColor )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor )
{
- QString aValue = QString( "%1,%2,%3").arg(rColor.red()).arg(rColor.green()).arg(rColor.blue() );
+ TQString aValue = TQString( "%1,%2,%3").arg(rColor.red()).arg(rColor.green()).arg(rColor.blue() );
return writeEntry( rKey, aValue );
}
-QString KRootProp::removeEntry(const QString& rKey)
+TQString KRootProp::removeEntry(const TQString& rKey)
{
if (propDict.contains(rKey)) {
dirty = true;
- QString aValue = propDict[rKey];
+ TQString aValue = propDict[rKey];
propDict.remove(rKey);
return aValue;
} else
- return QString::null;
+ return TQString::null;
}
-QStringList KRootProp::listEntries() const
+TQStringList KRootProp::listEntries() const
{
- QMap<QString,QString>::ConstIterator it;
- QStringList list;
+ TQMap<TQString,TQString>::ConstIterator it;
+ TQStringList list;
- QMap<QString,QString>::ConstIterator end(propDict.end());
+ TQMap<TQString,TQString>::ConstIterator end(propDict.end());
for (it=propDict.begin(); it!=end; ++it)
list += it.key();
diff --git a/kdecore/krootprop.h b/kdecore/krootprop.h
index 1234f143e..6d6a43a24 100644
--- a/kdecore/krootprop.h
+++ b/kdecore/krootprop.h
@@ -21,10 +21,10 @@
typedef unsigned long Atom;
-#include <qcolor.h>
-#include <qfont.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -47,8 +47,8 @@ class KDECORE_EXPORT KRootProp
{
private:
Atom atom;
- QMap<QString,QString> propDict;
- QString property_;
+ TQMap<TQString,TQString> propDict;
+ TQString property_;
bool dirty;
KRootPropPrivate *d;
@@ -59,7 +59,7 @@ public:
* do nothing
* @see setProp()
**/
- KRootProp( const QString& rProp = QString::null );
+ KRootProp( const TQString& rProp = TQString::null );
/**
* Destructs the KRootProp object.
*
@@ -71,12 +71,12 @@ public:
* Sets the property in which keys will be searched.
* @param rProp the property that will be searched
**/
- void setProp(const QString& rProp=QString());
+ void setProp(const TQString& rProp=TQString());
/**
* Returns the name of the property under which keys are searched.
* @return the property that will be searched
**/
- QString prop() const;
+ TQString prop() const;
/**
* Destroys the property completely.
@@ -94,8 +94,8 @@ public:
* @return The value for this key or the default if no value
* was found.
**/
- QString readEntry( const QString& rKey,
- const QString& pDefault = QString::null ) const ;
+ TQString readEntry( const TQString& rKey,
+ const TQString& pDefault = TQString::null ) const ;
/**
* Reads a numerical value.
@@ -107,10 +107,10 @@ public:
* @param nDefault A default value returned if the key was not found.
* @return The value for this key or the default if no value was found.
*/
- int readNumEntry( const QString& rKey, int nDefault = 0 ) const;
+ int readNumEntry( const TQString& rKey, int nDefault = 0 ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Reads the value of an entry specified by @p rKey in the current property
* and interpret it as a font object.
@@ -119,11 +119,11 @@ public:
* @param pDefault A default value returned if the key was not found.
* @return The value for this key or a default font if no value was found.
*/
- QFont readFontEntry( const QString& rKey,
- const QFont* pDefault = 0 ) const;
+ TQFont readFontEntry( const TQString& rKey,
+ const TQFont* pDefault = 0 ) const;
/**
- * Reads a QColor.
+ * Reads a TQColor.
*
* Reads the value of an entry specified by @p rKey in the current property
* and interprets it as a color.
@@ -133,8 +133,8 @@ public:
* @return The value for this key or a default color if no value
* was found.
*/
- QColor readColorEntry( const QString& rKey,
- const QColor* pDefault = 0 ) const;
+ TQColor readColorEntry( const TQString& rKey,
+ const TQColor* pDefault = 0 ) const;
/**
@@ -149,7 +149,7 @@ public:
* a null string is returned.
*
**/
- QString writeEntry( const QString& rKey, const QString& rValue );
+ TQString writeEntry( const TQString& rKey, const TQString& rValue );
/**
* Writes the (key/value) pair.
@@ -159,7 +159,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, int nValue );
+ TQString writeEntry( const TQString& rKey, int nValue );
/**
* Writes the (key/value) pair.
@@ -169,7 +169,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, const QFont& rFont );
+ TQString writeEntry( const TQString& rKey, const TQFont& rFont );
/**
* Writes the (key/value) pair.
@@ -179,7 +179,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, const QColor& rColor );
+ TQString writeEntry( const TQString& rKey, const TQColor& rColor );
/**
* Removes an entry.
@@ -187,13 +187,13 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString removeEntry(const QString& rKey);
+ TQString removeEntry(const TQString& rKey);
/**
* Returns a list of all keys.
- * @return A QStringList containing all the keys.
+ * @return A TQStringList containing all the keys.
**/
- QStringList listEntries() const;
+ TQStringList listEntries() const;
/**
* Flushes the entry cache.
diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp
index 35ec51da1..77b0a6b41 100644
--- a/kdecore/ksavefile.cpp
+++ b/kdecore/ksavefile.cpp
@@ -32,19 +32,19 @@
#include <test.h>
#endif
-#include <qdatetime.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
#include <kde_file.h>
#include "kapplication.h"
#include "ksavefile.h"
#include "kstandarddirs.h"
-KSaveFile::KSaveFile(const QString &filename, int mode)
+KSaveFile::KSaveFile(const TQString &filename, int mode)
: mTempFile(true)
{
// follow symbolic link, if any
- QString real_filename = KStandardDirs::realFilePath(filename);
+ TQString real_filename = KStandardDirs::realFilePath(filename);
// we only check here if the directory can be written to
// the actual filename isn't written to, but replaced later
@@ -55,7 +55,7 @@ KSaveFile::KSaveFile(const QString &filename, int mode)
return;
}
- if (mTempFile.create(real_filename, QString::fromLatin1(".new"), mode))
+ if (mTempFile.create(real_filename, TQString::fromLatin1(".new"), mode))
{
mFileName = real_filename; // Set filename upon success
@@ -63,7 +63,7 @@ KSaveFile::KSaveFile(const QString &filename, int mode)
// permissions are the same as existing file so the existing
// file's permissions are preserved
KDE_struct_stat stat_buf;
- if (KDE_stat(QFile::encodeName(real_filename), &stat_buf)==0)
+ if (KDE_stat(TQFile::encodeName(real_filename), &stat_buf)==0)
{
// But only if we own the existing file
if (stat_buf.st_uid == getuid())
@@ -115,7 +115,7 @@ KSaveFile::close()
}
if (mTempFile.close())
{
- if (0==KDE_rename(QFile::encodeName(mTempFile.name()), QFile::encodeName(mFileName)))
+ if (0==KDE_rename(TQFile::encodeName(mTempFile.name()), TQFile::encodeName(mFileName)))
return true; // Success!
mTempFile.setError(errno);
}
@@ -142,10 +142,10 @@ write_all(int fd, const char *buf, size_t len)
return 0;
}
-bool KSaveFile::backupFile( const QString& qFilename, const QString& backupDir,
- const QString& backupExtension)
+bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir,
+ const TQString& backupExtension)
{
- QCString cFilename = QFile::encodeName(qFilename);
+ TQCString cFilename = TQFile::encodeName(qFilename);
const char *filename = cFilename.data();
int fd = KDE_open( filename, O_RDONLY );
@@ -159,23 +159,23 @@ bool KSaveFile::backupFile( const QString& qFilename, const QString& backupDir,
return false;
}
- QCString cBackup;
+ TQCString cBackup;
if ( backupDir.isEmpty() )
cBackup = cFilename;
else
{
- QCString nameOnly;
+ TQCString nameOnly;
int slash = cFilename.findRev('/');
if (slash < 0)
nameOnly = cFilename;
else
nameOnly = cFilename.mid(slash + 1);
- cBackup = QFile::encodeName(backupDir);
+ cBackup = TQFile::encodeName(backupDir);
if ( backupDir[backupDir.length()-1] != '/' )
cBackup += '/';
cBackup += nameOnly;
}
- cBackup += QFile::encodeName(backupExtension);
+ cBackup += TQFile::encodeName(backupExtension);
const char *backup = cBackup.data();
int permissions = buff.st_mode & 07777;
diff --git a/kdecore/ksavefile.h b/kdecore/ksavefile.h
index 7e05aaa81..ae68b2d1f 100644
--- a/kdecore/ksavefile.h
+++ b/kdecore/ksavefile.h
@@ -20,7 +20,7 @@
#ifndef _KSAVEFILE_H_
#define _KSAVEFILE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include <ktempfile.h>
@@ -46,7 +46,7 @@ public:
* @param filename the path of the file
* @param mode the mode of the file (see chmod(1))
*/
- KSaveFile(const QString &filename, int mode = 0666 );
+ KSaveFile(const TQString &filename, int mode = 0666 );
/**
* The destructor closes the file.
@@ -70,10 +70,10 @@ public:
/**
* The name of the file as passed to the constructor.
- * @return The name of the file, or QString::null if opening the
+ * @return The name of the file, or TQString::null if opening the
* file has failed
**/
- QString name() const;
+ TQString name() const;
/**
* An integer file descriptor open for writing to the file.
@@ -92,27 +92,27 @@ public:
{ return mTempFile.fstream(); }
/**
- * A QFile* open for writing to the file.
- * @return A QFile open for writing to the file, or 0 if
+ * A TQFile* open for writing to the file.
+ * @return A TQFile open for writing to the file, or 0 if
* opening the temporary file failed.
**/
- QFile *file()
+ TQFile *file()
{ return mTempFile.file(); }
/**
- * A QTextStream* open for writing to the file.
- * @return A QTextStream that is open for writing to the file, or 0
+ * A TQTextStream* open for writing to the file.
+ * @return A TQTextStream that is open for writing to the file, or 0
* if opening the temporary file failed
**/
- QTextStream *textStream()
+ TQTextStream *textStream()
{ return mTempFile.textStream(); }
/**
- * A QDataStream* open for writing to the file.
- * @return A QDataStream that is open for writing to the file, or 0
+ * A TQDataStream* open for writing to the file.
+ * @return A TQDataStream that is open for writing to the file, or 0
* if opening the file failed
**/
- QDataStream *dataStream()
+ TQDataStream *dataStream()
{ return mTempFile.dataStream(); }
/**
@@ -138,12 +138,12 @@ public:
* @param backupExtension the extension to append to @p filename, "~" by default.
* @since 3.2
*/
- static bool backupFile( const QString& filename,
- const QString& backupDir = QString::null,
- const QString& backupExtension = QString::fromLatin1( "~" ) );
+ static bool backupFile( const TQString& filename,
+ const TQString& backupDir = TQString::null,
+ const TQString& backupExtension = TQString::fromLatin1( "~" ) );
private:
- QString mFileName;
+ TQString mFileName;
KTempFile mTempFile;
KSaveFilePrivate *d;
diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp
index 2d688a85f..3dcb3f273 100644
--- a/kdecore/kshell.cpp
+++ b/kdecore/kshell.cpp
@@ -21,13 +21,13 @@
#include <kshell.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/types.h>
-static int fromHex( QChar c )
+static int fromHex( TQChar c )
{
if (c >= '0' && c <= '9')
return c - '0';
@@ -62,19 +62,19 @@ inline static bool isMeta( uint c )
return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
}
-QStringList KShell::splitArgs( const QString &args, int flags, int *err )
+TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
{
- QStringList ret;
+ TQStringList ret;
bool firstword = flags & AbortOnMeta;
for (uint pos = 0; ; ) {
- QChar c;
+ TQChar c;
do {
if (pos >= args.length())
goto okret;
c = args.unicode()[pos++];
} while (c.isSpace());
- QString cret;
+ TQString cret;
if ((flags & TildeExpand) && c == '~') {
uint opos = pos;
for (; ; pos++) {
@@ -91,7 +91,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
if ((flags & AbortOnMeta) && isMeta( c ))
goto metaerr;
}
- QString ccret = homeDir( QConstString( args.unicode() + opos, pos - opos ).string() );
+ TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() );
if (ccret.isEmpty()) {
pos = opos;
c = '~';
@@ -113,7 +113,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
if (firstword) {
if (c == '_' || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
uint pos2 = pos;
- QChar cc;
+ TQChar cc;
do
cc = args[pos2++];
while (cc == '_' || (cc >= 'A' && cc <= 'Z') ||
@@ -131,7 +131,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
goto quoteerr;
c = args.unicode()[pos++];
} while (c != '\'');
- cret += QConstString( args.unicode() + spos, pos - spos - 1 ).string();
+ cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string();
} else if (c == '"') {
for (;;) {
if (pos >= args.length())
@@ -184,7 +184,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
hv = hv * 16 + hhv;
pos++;
}
- cret += QChar( hv );
+ cret += TQChar( hv );
}
break;
}
@@ -198,7 +198,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
hv = hv * 8 + (c - '0');
pos++;
}
- cret += QChar( hv );
+ cret += TQChar( hv );
} else {
cret += '\\';
cret += c;
@@ -236,12 +236,12 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
quoteerr:
if (err)
*err = BadQuoting;
- return QStringList();
+ return TQStringList();
metaerr:
if (err)
*err = FoundMeta;
- return QStringList();
+ return TQStringList();
}
inline static bool isSpecial( uint c )
@@ -254,11 +254,11 @@ inline static bool isSpecial( uint c )
return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
}
-QString KShell::joinArgs( const QStringList &args )
+TQString KShell::joinArgs( const TQStringList &args )
{
- QChar q( '\'' );
- QString ret;
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
+ TQChar q( '\'' );
+ TQString ret;
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
if (!ret.isEmpty())
ret += ' ';
if (!(*it).length())
@@ -266,7 +266,7 @@ QString KShell::joinArgs( const QStringList &args )
else {
for (uint i = 0; i < (*it).length(); i++)
if (isSpecial((*it).unicode()[i])) {
- QString tmp(*it);
+ TQString tmp(*it);
tmp.replace( q, "'\\''" );
ret += q;
tmp += q;
@@ -280,19 +280,19 @@ QString KShell::joinArgs( const QStringList &args )
return ret;
}
-QString KShell::joinArgs( const char * const *args, int nargs )
+TQString KShell::joinArgs( const char * const *args, int nargs )
{
if (!args)
- return QString::null; // well, QString::empty, in fact. qt sucks ;)
- QChar q( '\'' );
- QString ret;
+ return TQString::null; // well, TQString::empty, in fact. qt sucks ;)
+ TQChar q( '\'' );
+ TQString ret;
for (const char * const *argp = args; nargs && *argp; argp++, nargs--) {
if (!ret.isEmpty())
ret += ' ';
if (!**argp)
ret.append( q ).append( q );
else {
- QString tmp( QFile::decodeName( *argp ) );
+ TQString tmp( TQFile::decodeName( *argp ) );
for (uint i = 0; i < tmp.length(); i++)
if (isSpecial(tmp.unicode()[i])) {
tmp.replace( q, "'\\''" );
@@ -308,11 +308,11 @@ QString KShell::joinArgs( const char * const *args, int nargs )
return ret;
}
-QString KShell::joinArgsDQ( const QStringList &args )
+TQString KShell::joinArgsDQ( const TQStringList &args )
{
- QChar q( '\'' ), sp( ' ' ), bs( '\\' );
- QString ret;
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
+ TQChar q( '\'' ), sp( ' ' ), bs( '\\' );
+ TQString ret;
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
if (!ret.isEmpty())
ret += sp;
if (!(*it).length())
@@ -352,26 +352,26 @@ QString KShell::joinArgsDQ( const QStringList &args )
return ret;
}
-QString KShell::tildeExpand( const QString &fname )
+TQString KShell::tildeExpand( const TQString &fname )
{
if (fname[0] == '~') {
int pos = fname.find( '/' );
if (pos < 0)
- return homeDir( QConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
- QString ret = homeDir( QConstString( fname.unicode() + 1, pos - 1 ).string() );
+ return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
+ TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() );
if (!ret.isNull())
- ret += QConstString( fname.unicode() + pos, fname.length() - pos ).string();
+ ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string();
return ret;
}
return fname;
}
-QString KShell::homeDir( const QString &user )
+TQString KShell::homeDir( const TQString &user )
{
if (user.isEmpty())
- return QFile::decodeName( getenv( "HOME" ) );
- struct passwd *pw = getpwnam( QFile::encodeName( user ).data() );
+ return TQFile::decodeName( getenv( "HOME" ) );
+ struct passwd *pw = getpwnam( TQFile::encodeName( user ).data() );
if (!pw)
- return QString::null;
- return QFile::decodeName( pw->pw_dir );
+ return TQString::null;
+ return TQFile::decodeName( pw->pw_dir );
}
diff --git a/kdecore/kshell.h b/kdecore/kshell.h
index 1b52de099..2e9f3ad98 100644
--- a/kdecore/kshell.h
+++ b/kdecore/kshell.h
@@ -21,8 +21,8 @@
#ifndef _KSHELL_H
#define _KSHELL_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
/**
@@ -90,7 +90,7 @@ namespace KShell {
* target, see Errors
* @return a list of unquoted words or an empty list if an error occurred
*/
- KDECORE_EXPORT QStringList splitArgs( const QString &cmd, int flags = 0, int *err = 0 );
+ KDECORE_EXPORT TQStringList splitArgs( const TQString &cmd, int flags = 0, int *err = 0 );
/**
* Quotes and joins @p args together according to POSIX shell rules.
@@ -98,7 +98,7 @@ namespace KShell {
* @param args a list of strings to quote and join
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgs( const QStringList &args );
+ KDECORE_EXPORT TQString joinArgs( const TQStringList &args );
/**
* Same as above, but $'' is used instead of '' for the quoting.
@@ -110,7 +110,7 @@ namespace KShell {
* @param args a list of strings to quote and join
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgsDQ( const QStringList &args );
+ KDECORE_EXPORT TQString joinArgsDQ( const TQStringList &args );
/**
* Quotes and joins @p argv together according to POSIX shell rules.
@@ -121,7 +121,7 @@ namespace KShell {
* @p argv must be null-terminated.
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgs( const char * const *argv, int argc = -1 );
+ KDECORE_EXPORT TQString joinArgs( const char * const *argv, int argc = -1 );
/**
* Performs tilde expansion on @p path. Interprets "~/path" and
@@ -130,7 +130,7 @@ namespace KShell {
* @param path the path to tilde-expand
* @return the expanded path
*/
- KDECORE_EXPORT QString tildeExpand( const QString &path );
+ KDECORE_EXPORT TQString tildeExpand( const TQString &path );
/**
* Obtain a @p user's home directory.
@@ -139,7 +139,7 @@ namespace KShell {
* An empty string denotes the current user.
* @return The user's home directory.
*/
- KDECORE_EXPORT QString homeDir( const QString &user );
+ KDECORE_EXPORT TQString homeDir( const TQString &user );
}
diff --git a/kdecore/kshortcut.cpp b/kdecore/kshortcut.cpp
index 4e03b1a2a..4847b8742 100644
--- a/kdecore/kshortcut.cpp
+++ b/kdecore/kshortcut.cpp
@@ -21,8 +21,8 @@
#include "kkeynative.h"
#include "kkeyserver.h"
-#include <qevent.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -42,10 +42,10 @@ static KShortcut* g_pcut = 0;
KKey::KKey() { clear(); }
KKey::KKey( uint key, uint modFlags ) { init( key, modFlags ); }
KKey::KKey( int keyQt ) { init( keyQt ); }
-KKey::KKey( const QKeySequence& seq ) { init( seq ); }
-KKey::KKey( const QKeyEvent* pEvent ) { init( pEvent ); }
+KKey::KKey( const TQKeySequence& seq ) { init( seq ); }
+KKey::KKey( const TQKeyEvent* pEvent ) { init( pEvent ); }
KKey::KKey( const KKey& key ) { init( key ); }
-KKey::KKey( const QString& sKey ) { init( sKey ); }
+KKey::KKey( const TQString& sKey ) { init( sKey ); }
KKey::~KKey()
{
@@ -79,13 +79,13 @@ bool KKey::init( int keyQt )
}
}
-bool KKey::init( const QKeySequence& key )
+bool KKey::init( const TQKeySequence& key )
{
// TODO: if key.count() > 1, should we return failure?
return init( (int) key );
}
-bool KKey::init( const QKeyEvent* pEvent )
+bool KKey::init( const TQKeyEvent* pEvent )
{
int keyQt = pEvent->key();
if( pEvent->state() & Qt::ShiftButton ) keyQt |= Qt::SHIFT;
@@ -102,22 +102,22 @@ bool KKey::init( const KKey& key )
return true;
}
-bool KKey::init( const QString& sSpec )
+bool KKey::init( const TQString& sSpec )
{
clear();
- QString sKey = sSpec.stripWhiteSpace();
+ TQString sKey = sSpec.stripWhiteSpace();
if( sKey.startsWith( "default(" ) && sKey.endsWith( ")" ) )
sKey = sKey.mid( 8, sKey.length() - 9 );
// i.e., "Ctrl++" = "Ctrl+Plus"
if( sKey.endsWith( "++" ) )
sKey = sKey.left( sKey.length() - 1 ) + "plus";
- QStringList rgs = QStringList::split( '+', sKey, true );
+ TQStringList rgs = TQStringList::split( '+', sKey, true );
uint i;
// Check for modifier keys first.
for( i = 0; i < rgs.size(); i++ ) {
- QString s = rgs[i].lower();
+ TQString s = rgs[i].lower();
if( s == "shift" ) m_mod |= KKey::SHIFT;
else if( s == "ctrl" ) m_mod |= KKey::CTRL;
else if( s == "alt" ) m_mod |= KKey::ALT;
@@ -139,8 +139,8 @@ bool KKey::init( const QString& sSpec )
m_mod = 0;
kdDebug(125) << "KKey::init( \"" << sSpec << "\" ):"
- << " m_sym = " << QString::number(m_sym, 16)
- << ", m_mod = " << QString::number(m_mod, 16) << endl;
+ << " m_sym = " << TQString::number(m_sym, 16)
+ << ", m_mod = " << TQString::number(m_mod, 16) << endl;
return m_sym != 0;
}
@@ -163,9 +163,9 @@ int KKey::keyCodeQt() const
return KKeyNative( *this ).keyCodeQt();
}
-QString KKey::toString() const
+TQString KKey::toString() const
{
- QString s;
+ TQString s;
s = KKeyServer::modToStringUser( m_mod );
if( !s.isEmpty() )
@@ -175,12 +175,12 @@ QString KKey::toString() const
return s;
}
-QString KKey::toStringInternal() const
+TQString KKey::toStringInternal() const
{
//kdDebug(125) << "KKey::toStringInternal(): this = " << this
- // << " mod = " << QString::number(m_mod, 16)
- // << " key = " << QString::number(m_sym, 16) << endl;
- QString s;
+ // << " mod = " << TQString::number(m_mod, 16)
+ // << " key = " << TQString::number(m_sym, 16) << endl;
+ TQString s;
s = KKeyServer::modToStringInternal( m_mod );
if( !s.isEmpty() )
@@ -198,7 +198,7 @@ KKey& KKey::null()
return *g_pspec;
}
-QString KKey::modFlagLabel( ModFlag modFlag )
+TQString KKey::modFlagLabel( ModFlag modFlag )
{
return KKeyServer::modToStringUser( modFlag );
}
@@ -208,10 +208,10 @@ QString KKey::modFlagLabel( ModFlag modFlag )
//---------------------------------------------------------------------
KKeySequence::KKeySequence() { clear(); }
-KKeySequence::KKeySequence( const QKeySequence& seq ) { init( seq ); }
+KKeySequence::KKeySequence( const TQKeySequence& seq ) { init( seq ); }
KKeySequence::KKeySequence( const KKey& key ) { init( key ); }
KKeySequence::KKeySequence( const KKeySequence& seq ) { init( seq ); }
-KKeySequence::KKeySequence( const QString& s ) { init( s ); }
+KKeySequence::KKeySequence( const TQString& s ) { init( s ); }
KKeySequence::~KKeySequence()
{
@@ -223,7 +223,7 @@ void KKeySequence::clear()
m_bTriggerOnRelease = false;
}
-bool KKeySequence::init( const QKeySequence& seq )
+bool KKeySequence::init( const TQKeySequence& seq )
{
clear();
if( !seq.isEmpty() ) {
@@ -264,11 +264,11 @@ bool KKeySequence::init( const KKeySequence& seq )
return true;
}
-bool KKeySequence::init( const QString& s )
+bool KKeySequence::init( const TQString& s )
{
m_bTriggerOnRelease = false;
//kdDebug(125) << "KKeySequence::init( " << s << " )" << endl;
- QStringList rgs = QStringList::split( ',', s );
+ TQStringList rgs = TQStringList::split( ',', s );
if( s == "none" || rgs.size() == 0 ) {
clear();
return true;
@@ -343,13 +343,13 @@ int KKeySequence::compare( const KKeySequence& seq ) const
return 0;
}
-QKeySequence KKeySequence::qt() const
+TQKeySequence KKeySequence::qt() const
{
int k[4] = { 0, 0, 0, 0 };
for( uint i = 0; i < count(); i++ )
k[i] = KKeyNative(key(i)).keyCodeQt();
- QKeySequence seq( k[0], k[1], k[2], k[3] );
+ TQKeySequence seq( k[0], k[1], k[2], k[3] );
return seq;
}
@@ -358,11 +358,11 @@ int KKeySequence::keyCodeQt() const
return (count() == 1) ? KKeyNative(key(0)).keyCodeQt() : 0;
}
-QString KKeySequence::toString() const
+TQString KKeySequence::toString() const
{
- if( m_nKeys < 1 ) return QString::null;
+ if( m_nKeys < 1 ) return TQString::null;
- QString s;
+ TQString s;
s = m_rgvar[0].toString();
for( uint i = 1; i < m_nKeys; i++ ) {
s += ",";
@@ -372,11 +372,11 @@ QString KKeySequence::toString() const
return s;
}
-QString KKeySequence::toStringInternal() const
+TQString KKeySequence::toStringInternal() const
{
- if( m_nKeys < 1 ) return QString::null;
+ if( m_nKeys < 1 ) return TQString::null;
- QString s;
+ TQString s;
s = m_rgvar[0].toStringInternal();
for( uint i = 1; i < m_nKeys; i++ ) {
s += ",";
@@ -401,12 +401,12 @@ KKeySequence& KKeySequence::null()
KShortcut::KShortcut() { clear(); }
KShortcut::KShortcut( int keyQt ) { init( keyQt ); }
-KShortcut::KShortcut( const QKeySequence& key ) { init( key ); }
+KShortcut::KShortcut( const TQKeySequence& key ) { init( key ); }
KShortcut::KShortcut( const KKey& key ) { init( key ); }
KShortcut::KShortcut( const KKeySequence& seq ) { init( seq ); }
KShortcut::KShortcut( const KShortcut& cut ) { init( cut ); }
-KShortcut::KShortcut( const char* ps ) { init( QString(ps) ); }
-KShortcut::KShortcut( const QString& s ) { init( s ); }
+KShortcut::KShortcut( const char* ps ) { init( TQString(ps) ); }
+KShortcut::KShortcut( const TQString& s ) { init( s ); }
KShortcut::~KShortcut()
{
@@ -421,13 +421,13 @@ bool KShortcut::init( int keyQt )
{
if( keyQt ) {
m_nSeqs = 1;
- m_rgseq[0].init( QKeySequence(keyQt) );
+ m_rgseq[0].init( TQKeySequence(keyQt) );
} else
clear();
return true;
}
-bool KShortcut::init( const QKeySequence& key )
+bool KShortcut::init( const TQKeySequence& key )
{
m_nSeqs = 1;
m_rgseq[0].init( key );
@@ -456,17 +456,17 @@ bool KShortcut::init( const KShortcut& cut )
return true;
}
-bool KShortcut::init( const QString& s )
+bool KShortcut::init( const TQString& s )
{
bool bRet = true;
- QStringList rgs = QStringList::split( ';', s );
+ TQStringList rgs = TQStringList::split( ';', s );
if( s == "none" || rgs.size() == 0 )
clear();
else if( rgs.size() <= MAX_SEQUENCES ) {
m_nSeqs = rgs.size();
for( uint i = 0; i < m_nSeqs; i++ ) {
- QString& sSeq = rgs[i];
+ TQString& sSeq = rgs[i];
if( sSeq.startsWith( "default(" ) )
sSeq = sSeq.mid( 8, sSeq.length() - 9 );
m_rgseq[i].init( sSeq );
@@ -478,15 +478,15 @@ bool KShortcut::init( const QString& s )
}
if( !s.isEmpty() ) {
- QString sDebug;
- QTextStream os( &sDebug, IO_WriteOnly );
+ TQString sDebug;
+ TQTextStream os( &sDebug, IO_WriteOnly );
os << "KShortcut::init( \"" << s << "\" ): ";
for( uint i = 0; i < m_nSeqs; i++ ) {
os << " m_rgseq[" << i << "]: ";
KKeyServer::Variations vars;
vars.init( m_rgseq[i].key(0), true );
for( uint j = 0; j < vars.count(); j++ )
- os << QString::number(vars.m_rgkey[j].keyCodeQt(),16) << ',';
+ os << TQString::number(vars.m_rgkey[j].keyCodeQt(),16) << ',';
}
kdDebug(125) << sDebug << endl;
}
@@ -508,7 +508,7 @@ int KShortcut::keyCodeQt() const
{
if( m_nSeqs >= 1 )
return m_rgseq[0].keyCodeQt();
- return QKeySequence();
+ return TQKeySequence();
}
bool KShortcut::isNull() const
@@ -621,17 +621,17 @@ bool KShortcut::append( const KShortcut& cut )
return true;
}
-KShortcut::operator QKeySequence () const
+KShortcut::operator TQKeySequence () const
{
if( count() >= 1 )
return m_rgseq[0].qt();
else
- return QKeySequence();
+ return TQKeySequence();
}
-QString KShortcut::toString() const
+TQString KShortcut::toString() const
{
- QString s;
+ TQString s;
for( uint i = 0; i < count(); i++ ) {
s += m_rgseq[i].toString();
@@ -642,9 +642,9 @@ QString KShortcut::toString() const
return s;
}
-QString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
+TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
{
- QString s;
+ TQString s;
for( uint i = 0; i < count(); i++ ) {
const KKeySequence& seq = m_rgseq[i];
diff --git a/kdecore/kshortcut.h b/kdecore/kshortcut.h
index b06e19f23..ec36cfa93 100644
--- a/kdecore/kshortcut.h
+++ b/kdecore/kshortcut.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUT_H
#define __KSHORTCUT_H
-#include <qkeysequence.h>
-#include <qstring.h>
+#include <tqkeysequence.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class QKeyEvent;
@@ -76,13 +76,13 @@ class KDECORE_EXPORT KKey
* Creates a new key from the first key code of the given key sequence.
* @param keySeq the key sequence that contains the key
*/
- KKey( const QKeySequence& keySeq );
+ KKey( const TQKeySequence& keySeq );
/**
* Extracts the key from the given key event.
* @param keyEvent the key event to get the key from
*/
- KKey( const QKeyEvent* keyEvent );
+ KKey( const TQKeyEvent* keyEvent );
/**
* Copy constructor.
@@ -97,7 +97,7 @@ class KDECORE_EXPORT KKey
* @param key the description of the key
* @see KKeyServer::Sym::init()
*/
- KKey( const QString& key );
+ KKey( const TQString& key );
/**
* @internal
*/
@@ -124,14 +124,14 @@ class KDECORE_EXPORT KKey
* @param keySeq the key sequence that contains the key
* @return true if successful, false otherwise
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the key by extracting the code from the given key event.
* @param keyEvent the key event to get the key from
* @return true if successful, false otherwise
*/
- bool init( const QKeyEvent* keyEvent );
+ bool init( const TQKeyEvent* keyEvent );
/**
* Copies the given key.
@@ -149,7 +149,7 @@ class KDECORE_EXPORT KKey
* @return true if successful, false otherwise
* @see KKeyServer::Sym::init()
*/
- bool init( const QString& key);
+ bool init( const TQString& key);
/**
* @internal
@@ -228,13 +228,13 @@ class KDECORE_EXPORT KKey
* @return the string representation of the key
* @see toStringInternal()
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns an untranslated text representation of the key in the form
* "modifier+key", suitable e.g. for saving in configuration files.
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
// Operation methods
/**
@@ -255,7 +255,7 @@ class KDECORE_EXPORT KKey
* @param f the modifiers to convert
* @return the string representation of the modifiers
*/
- static QString modFlagLabel( ModFlag f );
+ static TQString modFlagLabel( ModFlag f );
private:
/*
@@ -266,7 +266,7 @@ class KDECORE_EXPORT KKey
* Returns the native key symbol value key. Under X11, this is the X
* keycode. Under Qt/Embedded, this is the Qt keycode.
* @see /usr/include/X11/keysymdef.h
- * @see qnamespace.h
+ * @see tqnamespace.h
*/
uint m_sym;
/**
@@ -303,7 +303,7 @@ class KDECORE_EXPORT KKeySequence
* Copies the given qt key sequence.
* @param keySeq the qt key sequence to copy
*/
- KKeySequence( const QKeySequence& keySeq );
+ KKeySequence( const TQKeySequence& keySeq );
/**
* Create a new key sequence that only contains the given key.
@@ -326,12 +326,12 @@ class KDECORE_EXPORT KKeySequence
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of comma-separated keys as
- * required by KKey::KKey(const QString&).
+ * required by KKey::KKey(const TQString&).
* @param keySeq the description of the key
* @see KKeyServer::Sym::init()
- * @see KKey::KKey(const QString&)
+ * @see KKey::KKey(const TQString&)
*/
- KKeySequence( const QString& keySeq );
+ KKeySequence( const TQString& keySeq );
~KKeySequence();
@@ -347,7 +347,7 @@ class KDECORE_EXPORT KKeySequence
* @param keySeq the qt key sequence to copy
* @return true if successful, false otherwise
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the key sequence to only contain the given key.
@@ -373,13 +373,13 @@ class KDECORE_EXPORT KKeySequence
/**
* Initializes this key sequence to contain the given key sequence.
* The description consists of comma-separated keys as
- * required by KKey::KKey(const QString&).
+ * required by KKey::KKey(const TQString&).
* @param key the description of the key
* @return true if successful, false otherwise
* @see KKeyServer::Sym::init()
- * @see KKey::KKey(const QString&)
+ * @see KKey::KKey(const TQString&)
*/
- bool init( const QString& key );
+ bool init( const TQString& key );
/**
* Copy the given key sequence into this sequence.
@@ -469,13 +469,13 @@ class KDECORE_EXPORT KKeySequence
*/
bool operator < ( const KKeySequence& seq ) const
{ return compare( seq ) < 0; }
- // TODO: consider adding Qt::SequenceMatch matches(...) methods for QKeySequence equivalence
+ // TODO: consider adding Qt::SequenceMatch matches(...) methods for TQKeySequence equivalence
/**
- * Converts this key sequence to a QKeySequence.
+ * Converts this key sequence to a TQKeySequence.
* @return the QKeySequence
*/
- QKeySequence qt() const;
+ TQKeySequence qt() const;
/**
* Returns the qt key code of the first key.
@@ -491,12 +491,12 @@ class KDECORE_EXPORT KKeySequence
* @return the string represenation of this key sequence
* @see KKey::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns a null key sequence.
@@ -528,7 +528,7 @@ class KDECORE_EXPORT KKeySequence
* the below code binds the escape key to the close action.
*
* \code
-* KAction *closeAction = KStdAction::close( this, SLOT( close() ), actionCollection() );
+* KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() );
* KShortcut closeShortcut = closeAction->shortcut();
* closeShortcut.append( KKey(Key_Escape));
* closeAction->setShortcut(closeShortcut);
@@ -570,7 +570,7 @@ class KDECORE_EXPORT KShortcut
* sequence.
* @param keySeq the qt key sequence to add
*/
- KShortcut( const QKeySequence& keySeq );
+ KShortcut( const TQKeySequence& keySeq );
/**
* Creates a new shortcut that contains only the given key
@@ -595,20 +595,20 @@ class KDECORE_EXPORT KShortcut
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
KShortcut( const char* shortcut );
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
- KShortcut( const QString& shortcut );
+ KShortcut( const TQString& shortcut );
~KShortcut();
/**
@@ -630,7 +630,7 @@ class KDECORE_EXPORT KShortcut
* Initializes the shortcut with the given qt key sequence.
* @param keySeq the qt key sequence to add
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the shortcut with the given key as its only sequence.
@@ -653,11 +653,11 @@ class KDECORE_EXPORT KShortcut
/**
* Initializes the key sequence with the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
- bool init( const QString& shortcut );
+ bool init( const TQString& shortcut );
/**
* Copies the given shortcut over this shortcut.
@@ -810,7 +810,7 @@ class KDECORE_EXPORT KShortcut
* Converts this shortcut to a key sequence. The first key sequence
* will be taken.
*/
- operator QKeySequence () const;
+ operator TQKeySequence () const;
/**
* Returns a description of the shortcut as semicolon-separated
@@ -819,12 +819,12 @@ class KDECORE_EXPORT KShortcut
* @see KKey::toString()
* @see KKeySequence::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal( const KShortcut* pcutDefault = 0 ) const;
+ TQString toStringInternal( const KShortcut* pcutDefault = 0 ) const;
/**
* Returns a null shortcut.
diff --git a/kdecore/kshortcutlist.cpp b/kdecore/kshortcutlist.cpp
index 327153ce8..865bdc257 100644
--- a/kdecore/kshortcutlist.cpp
+++ b/kdecore/kshortcutlist.cpp
@@ -1,5 +1,5 @@
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <kaccel.h>
#include "kaccelaction.h"
@@ -28,7 +28,7 @@ bool KShortcutList::isGlobal( uint ) const
return false;
}
-int KShortcutList::index( const QString& sName ) const
+int KShortcutList::index( const TQString& sName ) const
{
uint nSize = count();
for( uint i = 0;
@@ -58,22 +58,22 @@ const KInstance* KShortcutList::instance() const
return 0;
}
-QVariant KShortcutList::getOther( Other, uint ) const
+TQVariant KShortcutList::getOther( Other, uint ) const
{
- return QVariant();
+ return TQVariant();
}
-bool KShortcutList::setOther( Other, uint, QVariant )
+bool KShortcutList::setOther( Other, uint, TQVariant )
{
return false;
}
-bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pConfig )
{
kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
if( !pConfig )
pConfig = KGlobal::config();
- QString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : QString("Shortcuts");
+ TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
// If the config file still has the old group name:
// FIXME: need to rename instead? -- and don't do this if hasGroup( "Shortcuts" ).
@@ -89,7 +89,7 @@ bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pCon
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
if( isConfigurable(i) ) {
- QString sEntry = pConfig->readEntry( name(i) );
+ TQString sEntry = pConfig->readEntry( name(i) );
if( !sEntry.isEmpty() ) {
if( sEntry == "none" )
setShortcut( i, KShortcut() );
@@ -106,13 +106,13 @@ bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pCon
return true;
}
-bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
+bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
{
kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
if( !pConfig )
pConfig = KGlobal::config();
- QString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : QString("Shortcuts");
+ TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
// If it has the deprecated group [Keys], remove it
if( pConfig->hasGroup( "Keys" ) )
@@ -123,13 +123,13 @@ bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pCo
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
if( isConfigurable(i) ) {
- const QString& sName = name(i);
+ const TQString& sName = name(i);
bool bConfigHasAction = !pConfig->readEntry( sName ).isEmpty();
bool bSameAsDefault = (shortcut(i) == shortcutDefault(i));
// If we're using a global config or this setting
// differs from the default, then we want to write.
if( bWriteAll || !bSameAsDefault ) {
- QString s = shortcut(i).toStringInternal();
+ TQString s = shortcut(i).toStringInternal();
if( s.isEmpty() )
s = "none";
kdDebug(125) << "\twriting " << sName << " = " << s << endl;
@@ -155,7 +155,7 @@ bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pCo
class KAccelShortcutListPrivate
{
public:
- QString m_configGroup;
+ TQString m_configGroup;
};
KAccelShortcutList::KAccelShortcutList( KAccel* pAccel )
@@ -186,11 +186,11 @@ KAccelShortcutList::~KAccelShortcutList()
{ delete d;}
uint KAccelShortcutList::count() const
{ return m_actions.count(); }
-QString KAccelShortcutList::name( uint i ) const
+TQString KAccelShortcutList::name( uint i ) const
{ return m_actions.actionPtr(i)->name(); }
-QString KAccelShortcutList::label( uint i ) const
+TQString KAccelShortcutList::label( uint i ) const
{ return m_actions.actionPtr(i)->label(); }
-QString KAccelShortcutList::whatsThis( uint i ) const
+TQString KAccelShortcutList::whatsThis( uint i ) const
{ return m_actions.actionPtr(i)->whatsThis(); }
const KShortcut& KAccelShortcutList::shortcut( uint i ) const
{ return m_actions.actionPtr(i)->shortcut(); }
@@ -200,11 +200,11 @@ bool KAccelShortcutList::isConfigurable( uint i ) const
{ return m_actions.actionPtr(i)->isConfigurable(); }
bool KAccelShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions.actionPtr(i)->setShortcut( cut ); }
-QVariant KAccelShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
+TQVariant KAccelShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
bool KAccelShortcutList::isGlobal( uint ) const
{ return m_bGlobal; }
-bool KAccelShortcutList::setOther( Other, uint, QVariant )
+bool KAccelShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool KAccelShortcutList::save() const
{ return writeSettings( d->m_configGroup ); }
diff --git a/kdecore/kshortcutlist.h b/kdecore/kshortcutlist.h
index f20808962..47339c93c 100644
--- a/kdecore/kshortcutlist.h
+++ b/kdecore/kshortcutlist.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUTLIST_H
#define __KSHORTCUTLIST_H
-#include <qglobal.h> // For uint
-#include <qstring.h>
+#include <tqglobal.h> // For uint
+#include <tqstring.h>
#include "kdelibs_export.h"
class QVariant;
@@ -65,23 +65,23 @@ class KDECORE_EXPORT KShortcutList
* @param index the index of the shortcut (must be < count())
* @return the name of the shortcut
*/
- virtual QString name( uint index ) const = 0;
+ virtual TQString name( uint index ) const = 0;
/**
* Returns the (i18n'd) label of the shortcut with the given @p index.
* @param index the index of the shortcut (must be < count())
* @return the label (i18n'd) of the shortcut
*/
- virtual QString label( uint index ) const = 0;
+ virtual TQString label( uint index ) const = 0;
/**
* Returns the (i18n'd) What's This text of the shortcut with the given @p index.
* @param index the index of the shortcut (must be < count())
* @return the What's This text (i18n'd) of the shortcut
*/
- virtual QString whatsThis( uint index ) const = 0;
+ virtual TQString whatsThis( uint index ) const = 0;
- // TODO KDE4: add virtual QString toolTip( uint index ) const = 0
+ // TODO KDE4: add virtual TQString toolTip( uint index ) const = 0
// Will then be used by the listview in kkeydialog
/**
@@ -127,7 +127,7 @@ class KDECORE_EXPORT KShortcutList
* @param sName the name of the shortcut to search
* @return the index of the shortcut, of -1 if not found
*/
- virtual int index( const QString& sName ) const;
+ virtual int index( const TQString& sName ) const;
/**
* Returns the index of the shortcut with he given key sequence.
@@ -145,9 +145,9 @@ class KDECORE_EXPORT KShortcutList
// These are here in order to handle expansion.
enum Other { };
/** \internal */
- virtual QVariant getOther( Other, uint index ) const = 0;
+ virtual TQVariant getOther( Other, uint index ) const = 0;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant ) = 0;
+ virtual bool setOther( Other, uint index, TQVariant ) = 0;
/**
* Save the shortcut list.
@@ -162,7 +162,7 @@ class KDECORE_EXPORT KShortcutList
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- virtual bool readSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 );
+ virtual bool readSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 );
/**
* Writes the shortcuts to the given configuration file.
@@ -173,7 +173,7 @@ class KDECORE_EXPORT KShortcutList
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- virtual bool writeSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0,
+ virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
protected:
@@ -223,9 +223,9 @@ class KDECORE_EXPORT KAccelShortcutList : public KShortcutList
virtual ~KAccelShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
@@ -233,9 +233,9 @@ class KDECORE_EXPORT KAccelShortcutList : public KShortcutList
virtual bool isGlobal( uint index ) const;
/** \internal */
- virtual QVariant getOther( Other, uint index ) const;
+ virtual TQVariant getOther( Other, uint index ) const;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant );
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
@@ -270,18 +270,18 @@ class KDECORE_EXPORT ShortcutList : public KShortcutList
virtual ~ShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
virtual bool setShortcut( uint index , const KShortcut& shortcut );
/** \internal */
- virtual QVariant getOther( Other, uint index ) const;
+ virtual TQVariant getOther( Other, uint index ) const;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant );
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp
index 5d7fea1f8..399096877 100644
--- a/kdecore/kshortcutmenu.cpp
+++ b/kdecore/kshortcutmenu.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qkeysequence.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <tqkeysequence.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
#include "kaccelaction.h"
#include <kdebug.h>
@@ -27,19 +27,19 @@
#include "kshortcutmenu.h"
//#include <kkeynative.h>
-KShortcutMenu::KShortcutMenu( QWidget* pParent, KAccelActions* pActions, KKeySequence seq )
-: QPopupMenu( pParent ),
+KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq )
+: TQPopupMenu( pParent ),
m_pActions( pActions ),
m_seq( seq )
{
kdDebug() << seq.toStringInternal() << endl;
- QFont fontTitle = KGlobalSettings::menuFont();
+ TQFont fontTitle = KGlobalSettings::menuFont();
fontTitle.setBold( true );
- pTitle = new QLabel( "", (QWidget*)0 );
+ pTitle = new TQLabel( "", (TQWidget*)0 );
pTitle->setFont( fontTitle );
- pTitle->setFrameShape( QFrame::Panel );
+ pTitle->setFrameShape( TQFrame::Panel );
insertItem( pTitle );
}
@@ -67,9 +67,9 @@ void KShortcutMenu::updateShortcuts()
KAccelAction* pAction = m_pActions->actionPtr( iAction );
if( pAction ) {
KKeySequence seq = m_seqs[iItem];
- QString sSeq = seq.key(m_seq.count()).toString();
+ TQString sSeq = seq.key(m_seq.count()).toString();
for( uint iKey = m_seq.count() + 1; iKey < seq.count(); iKey++ )
- sSeq += QString(",") + seq.key(iKey).toString();
+ sSeq += TQString(",") + seq.key(iKey).toString();
kdDebug(125) << "seq = " << seq.toStringInternal() << " sSeq = " << sSeq << endl;
changeItem( iAction, pAction->label() + "\t" + sSeq );
@@ -78,7 +78,7 @@ void KShortcutMenu::updateShortcuts()
}
}
-void KShortcutMenu::keyPressEvent( QKeyEvent* pEvent )
+void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
{
kdDebug() << "keypress; " << pEvent->key() << endl;
KKey key( pEvent );
@@ -106,7 +106,7 @@ void KShortcutMenu::keyPressEvent( QKeyEvent* pEvent )
// And permit Enter, Return to select the item.
if( pEvent->key() == Qt::Key_Up || pEvent->key() == Qt::Key_Down ||
pEvent->key() == Qt::Key_Enter || pEvent->key() == Qt::Key_Return )
- QPopupMenu::keyPressEvent( pEvent );
+ TQPopupMenu::keyPressEvent( pEvent );
else
close();
}
diff --git a/kdecore/kshortcutmenu.h b/kdecore/kshortcutmenu.h
index 1a8bb7921..3be542a13 100644
--- a/kdecore/kshortcutmenu.h
+++ b/kdecore/kshortcutmenu.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUTMENU_H
#define __KSHORTCUTMENU_H
-#include <qmap.h>
-#include <qpopupmenu.h>
+#include <tqmap.h>
+#include <tqpopupmenu.h>
#include "kshortcut.h"
@@ -36,25 +36,25 @@ class KDECORE_EXPORT KShortcutMenu : public QPopupMenu
{
Q_OBJECT
public:
- KShortcutMenu( QWidget* pParent, KAccelActions* pActions, KKeySequence seq );
+ KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq );
bool insertAction( uint iAction, KKeySequence seq );
void updateShortcuts();
protected:
- void keyPressEvent( QKeyEvent* pEvent );
+ void keyPressEvent( TQKeyEvent* pEvent );
private:
int searchForKey( KKey key );
void keepItemsMatching( KKey key );
private:
- typedef QMap<uint, KKeySequence> IndexToKKeySequence;
+ typedef TQMap<uint, KKeySequence> IndexToKKeySequence;
KAccelActions* m_pActions;
KKeySequence m_seq;
- QLabel* pTitle;
+ TQLabel* pTitle;
IndexToKKeySequence m_seqs;
};
diff --git a/kdecore/ksimpleconfig.cpp b/kdecore/ksimpleconfig.cpp
index b23236be9..6b4e13a14 100644
--- a/kdecore/ksimpleconfig.cpp
+++ b/kdecore/ksimpleconfig.cpp
@@ -28,8 +28,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include "kglobal.h"
#include "kstandarddirs.h"
@@ -37,14 +37,14 @@
#include "ksimpleconfig.h"
-KSimpleConfig::KSimpleConfig(const QString &fileName, bool bReadOnly)
- : KConfig(QString::fromLatin1(""), bReadOnly, false)
+KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
+ : KConfig(TQString::fromLatin1(""), bReadOnly, false)
{
// the difference between KConfig and KSimpleConfig is just that
// for KSimpleConfig an absolute filename is guaranteed
- if (!fileName.isNull() && QDir::isRelativePath(fileName)) {
+ if (!fileName.isNull() && TQDir::isRelativePath(fileName)) {
backEnd->changeFileName( KGlobal::dirs()->
- saveLocation("config", QString::null, !bReadOnly)+fileName, "config", false);
+ saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false);
} else {
backEnd->changeFileName(fileName, "config", false);
}
diff --git a/kdecore/ksimpleconfig.h b/kdecore/ksimpleconfig.h
index 6d556d456..89d380512 100644
--- a/kdecore/ksimpleconfig.h
+++ b/kdecore/ksimpleconfig.h
@@ -53,7 +53,7 @@ public:
* directory for "config" files is used.
* @param bReadOnly Whether the object should be read-only.
*/
- KSimpleConfig( const QString &fileName, bool bReadOnly = false);
+ KSimpleConfig( const TQString &fileName, bool bReadOnly = false);
KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
diff --git a/kdecore/ksock.cpp b/kdecore/ksock.cpp
index da28a64d5..10c694512 100644
--- a/kdecore/ksock.cpp
+++ b/kdecore/ksock.cpp
@@ -80,20 +80,20 @@ extern "C" {
#define SOMAXCONN 5
#endif
-#include <qapplication.h>
-#include <qsocketnotifier.h>
+#include <tqapplication.h>
+#include <tqsocketnotifier.h>
#include "netsupp.h" // leave this last
#ifdef __CYGWIN__
-#include "qwindowdefs.h"
+#include "tqwindowdefs.h"
#endif
class KSocketPrivate
{
public:
- QSocketNotifier *readNotifier;
- QSocketNotifier *writeNotifier;
+ TQSocketNotifier *readNotifier;
+ TQSocketNotifier *writeNotifier;
KSocketPrivate() :
readNotifier(0), writeNotifier(0)
@@ -134,8 +134,8 @@ void KSocket::enableRead( bool _state )
{
if ( !d->readNotifier )
{
- d->readNotifier = new QSocketNotifier( sock, QSocketNotifier::Read );
- QObject::connect( d->readNotifier, SIGNAL( activated(int) ), this, SLOT( slotRead(int) ) );
+ d->readNotifier = new TQSocketNotifier( sock, TQSocketNotifier::Read );
+ TQObject::connect( d->readNotifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotRead(int) ) );
}
else
d->readNotifier->setEnabled( true );
@@ -150,9 +150,9 @@ void KSocket::enableWrite( bool _state )
{
if ( !d->writeNotifier )
{
- d->writeNotifier = new QSocketNotifier( sock, QSocketNotifier::Write );
- QObject::connect( d->writeNotifier, SIGNAL( activated(int) ), this,
- SLOT( slotWrite(int) ) );
+ d->writeNotifier = new TQSocketNotifier( sock, TQSocketNotifier::Write );
+ TQObject::connect( d->writeNotifier, TQT_SIGNAL( activated(int) ), this,
+ TQT_SLOT( slotWrite(int) ) );
}
else
d->writeNotifier->setEnabled( true );
@@ -182,7 +182,7 @@ void KSocket::slotWrite( int )
*/
bool KSocket::connect( const char *_path )
{
- KExtendedSocket ks(QString::null, _path, KExtendedSocket::unixSocket);
+ KExtendedSocket ks(TQString::null, _path, KExtendedSocket::unixSocket);
ks.connect();
sock = ks.fd();
@@ -194,7 +194,7 @@ bool KSocket::connect( const char *_path )
/*
* Connects the socket to _host, _port.
*/
-bool KSocket::connect( const QString& _host, unsigned short int _port, int _timeout )
+bool KSocket::connect( const TQString& _host, unsigned short int _port, int _timeout )
{
KExtendedSocket ks(_host, _port, KExtendedSocket::inetSocket);
ks.setTimeout(_timeout, 0);
@@ -240,7 +240,7 @@ bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, uns
if (domain != PF_INET)
return false;
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(hostname, QString::number(port),
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(hostname, TQString::number(port),
KExtendedSocket::ipv4Socket);
list.setAutoDelete(true);
@@ -278,7 +278,7 @@ class KServerSocketPrivate
{
public:
bool bind;
- QCString path;
+ TQCString path;
unsigned short int port;
KExtendedSocket *ks;
};
@@ -307,7 +307,7 @@ bool KServerSocket::init( const char *_path )
unlink(_path );
d->path = _path;
- KExtendedSocket *ks = new KExtendedSocket(QString::null, _path, KExtendedSocket::passiveSocket |
+ KExtendedSocket *ks = new KExtendedSocket(TQString::null, _path, KExtendedSocket::passiveSocket |
KExtendedSocket::unixSocket);
d->ks = ks;
@@ -321,7 +321,7 @@ bool KServerSocket::init( unsigned short int _port )
{
d->port = _port;
KExtendedSocket *ks;
- ks = new KExtendedSocket(QString::null, _port, KExtendedSocket::passiveSocket |
+ ks = new KExtendedSocket(TQString::null, _port, KExtendedSocket::passiveSocket |
KExtendedSocket::inetSocket);
d->ks = ks;
@@ -349,7 +349,7 @@ bool KServerSocket::bindAndListen()
sock = d->ks->fd();
- connect( d->ks->readNotifier(), SIGNAL( activated(int) ), this, SLOT( slotAccept(int) ) );
+ connect( d->ks->readNotifier(), TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) );
return true;
}
diff --git a/kdecore/ksock.h b/kdecore/ksock.h
index 566d23236..ab8b8828d 100644
--- a/kdecore/ksock.h
+++ b/kdecore/ksock.h
@@ -24,7 +24,7 @@
#ifdef Q_OS_UNIX
-#include <qobject.h>
+#include <tqobject.h>
#include <sys/types.h>
// we define STRICT_ANSI to get rid of some warnings in glibc
#ifndef __STRICT_ANSI__
@@ -210,7 +210,7 @@ public slots:
void slotRead( int x );
protected:
- bool connect( const QString& _host, unsigned short int _port, int timeout = 0 );
+ bool connect( const TQString& _host, unsigned short int _port, int timeout = 0 );
bool connect( const char *_path );
/******************************************************
diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp
index be3e08b58..82bed0d5c 100644
--- a/kdecore/ksockaddr.cpp
+++ b/kdecore/ksockaddr.cpp
@@ -34,8 +34,8 @@
#include <sys/un.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qfile.h>
+#include <tqglobal.h>
+#include <tqfile.h>
#include "kdebug.h"
#include "klocale.h"
@@ -107,7 +107,7 @@ KSocketAddress::~KSocketAddress()
free(data);
}
-QString KSocketAddress::pretty() const
+TQString KSocketAddress::pretty() const
{
return i18n("<unknown socket>");
}
@@ -193,14 +193,14 @@ bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const
return false;
}
-QString KSocketAddress::nodeName() const
+TQString KSocketAddress::nodeName() const
{
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::serviceName() const
+TQString KSocketAddress::serviceName() const
{
- return QString::null;
+ return TQString::null;
}
int KSocketAddress::ianaFamily(int af)
@@ -303,7 +303,7 @@ KInetSocketAddress::KInetSocketAddress(const in6_addr& addr, unsigned short port
setAddress(addr, port);
}
-KInetSocketAddress::KInetSocketAddress(const QString& addr, unsigned short port, int family) :
+KInetSocketAddress::KInetSocketAddress(const TQString& addr, unsigned short port, int family) :
d(new KInetSocketAddressPrivate)
{
setAddress(addr, port, family);
@@ -377,7 +377,7 @@ bool KInetSocketAddress::setAddress(const in6_addr& addr, unsigned short port)
return setHost(addr) && setPort(port);
}
-bool KInetSocketAddress::setAddress(const QString& addr, unsigned short port, int family)
+bool KInetSocketAddress::setAddress(const TQString& addr, unsigned short port, int family)
{
return setHost(addr, family) && setPort(port);
}
@@ -402,7 +402,7 @@ bool KInetSocketAddress::setHost(const in6_addr& addr)
#endif
}
-bool KInetSocketAddress::setHost(const QString& addr, int family)
+bool KInetSocketAddress::setHost(const TQString& addr, int family)
{
// if family == -1, we'll try to guess the host name
if ((family != -1) && (family != AF_INET)
@@ -411,7 +411,7 @@ bool KInetSocketAddress::setHost(const QString& addr, int family)
#endif
)
{
- kdWarning() << "KInetSocketAddress::setHost(QString, int) called with unknown family address\n";
+ kdWarning() << "KInetSocketAddress::setHost(TQString, int) called with unknown family address\n";
return false;
}
@@ -556,7 +556,7 @@ in6_addr KInetSocketAddress::hostV6() const
}
#endif
-QString KInetSocketAddress::pretty() const
+TQString KInetSocketAddress::pretty() const
{
if (d->sockfamily != AF_INET
#ifdef AF_INET6
@@ -571,7 +571,7 @@ QString KInetSocketAddress::pretty() const
return i18n("1: hostname, 2: port number", "%1 port %2").arg(nodeName()).arg(serviceName());
}
-QString KInetSocketAddress::nodeName() const
+TQString KInetSocketAddress::nodeName() const
{
char buf[INET6_ADDRSTRLEN]; // INET6_ADDRSTRLEN > INET_ADDRSTRLEN
@@ -587,12 +587,12 @@ QString KInetSocketAddress::nodeName() const
return i18n("<empty>");
}
- return QString::fromLatin1(buf); // FIXME! What's the encoding?
+ return TQString::fromLatin1(buf); // FIXME! What's the encoding?
}
-QString KInetSocketAddress::serviceName() const
+TQString KInetSocketAddress::serviceName() const
{
- return QString::number(port());
+ return TQString::number(port());
}
unsigned short KInetSocketAddress::port() const
@@ -713,11 +713,11 @@ void KInetSocketAddress::fromV6()
#endif
}
-QString KInetSocketAddress::addrToString(int family, const void* addr)
+TQString KInetSocketAddress::addrToString(int family, const void* addr)
{
char buf[INET6_ADDRSTRLEN+1];
- return QString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
+ return TQString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
}
bool KInetSocketAddress::stringToAddr(int family, const char *text, void *dest)
@@ -749,7 +749,7 @@ KUnixSocketAddress::KUnixSocketAddress(const sockaddr_un* _sun, ksocklen_t size)
setAddress(_sun, size);
}
-KUnixSocketAddress::KUnixSocketAddress(QCString pathname) :
+KUnixSocketAddress::KUnixSocketAddress(TQCString pathname) :
d(new KUnixSocketAddressPrivate)
{
setAddress(pathname);
@@ -799,7 +799,7 @@ bool KUnixSocketAddress::setAddress(const sockaddr_un* _sun, ksocklen_t _size)
return 1;
}
-bool KUnixSocketAddress::setAddress(QCString path)
+bool KUnixSocketAddress::setAddress(TQCString path)
{
// the +1 is necessary for the ending zero
ksocklen_t newsize = offsetof(sockaddr_un, sun_path) + path.length() + 1;
@@ -835,7 +835,7 @@ bool KUnixSocketAddress::setAddress(QCString path)
return 1;
}
-QCString KUnixSocketAddress::pathname() const
+TQCString KUnixSocketAddress::pathname() const
{
if (d->m_sun != NULL)
{
@@ -843,20 +843,20 @@ QCString KUnixSocketAddress::pathname() const
return d->m_sun->sun_path;
return "";
}
- return QCString(0);
+ return TQCString(0);
}
-QString KUnixSocketAddress::pretty() const
+TQString KUnixSocketAddress::pretty() const
{
- QCString pname = pathname();
+ TQCString pname = pathname();
if (pname.isEmpty())
return i18n("<empty UNIX socket>");
- return QFile::decodeName(pathname());
+ return TQFile::decodeName(pathname());
}
-QString KUnixSocketAddress::serviceName() const
+TQString KUnixSocketAddress::serviceName() const
{
- return QString::fromUtf8(pathname());
+ return TQString::fromUtf8(pathname());
}
const sockaddr_un* KUnixSocketAddress::address() const
diff --git a/kdecore/ksockaddr.h b/kdecore/ksockaddr.h
index be522f72b..8b62f7da9 100644
--- a/kdecore/ksockaddr.h
+++ b/kdecore/ksockaddr.h
@@ -20,9 +20,9 @@
#ifndef KSOCKADDR_H
#define KSOCKADDR_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/*
@@ -69,7 +69,7 @@ public:
* Returns a string representation of this socket.
* @return a pretty string representation
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/**
* Returns a sockaddr structure, for passing down to library functions.
@@ -152,19 +152,19 @@ public:
* Returns the node name of this socket, as KExtendedSocket::lookup expects
* as the first argument.
* In the case of Internet sockets, this is the hostname.
- * The default implementation returns QString::null.
- * @return the node name, can be QString::null
+ * The default implementation returns TQString::null.
+ * @return the node name, can be TQString::null
*/
- virtual QString nodeName() const;
+ virtual TQString nodeName() const;
/**
* Returns the service name for this socket, as KExtendedSocket::lookup expects
* as the service argument.
* In the case of Internet sockets, this is the port number.
- * The default implementation returns QString::null.
- * @return the service name, can be QString::null
+ * The default implementation returns TQString::null.
+ * @return the service name, can be TQString::null
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
protected:
sockaddr* data;
@@ -281,7 +281,7 @@ public:
* family type
* @see setAddress
*/
- KInetSocketAddress(const QString& addr, unsigned short port, int family = -1);
+ KInetSocketAddress(const TQString& addr, unsigned short port, int family = -1);
/**
* Destructor
@@ -346,7 +346,7 @@ public:
* @param family the address family, -1 for any
* @return true if successful, false otherwise
*/
- bool setAddress(const QString& addr, unsigned short port, int family = -1);
+ bool setAddress(const TQString& addr, unsigned short port, int family = -1);
/**
* Sets this socket's host address to given raw address.
@@ -368,7 +368,7 @@ public:
* @param family the address family, -1 to guess the family
* @return true if successful, false otherwise
*/
- bool setHost(const QString& addr, int family = -1);
+ bool setHost(const TQString& addr, int family = -1);
/**
* Sets this socket's port number to given port number.
@@ -404,20 +404,20 @@ public:
* Returns a pretty representation of this address.
* @return a pretty representation
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/**
* Returns the text representation of the host address.
* @return a text representation of the host address
*/
- virtual QString nodeName() const;
- // QString prettyHost() const;
+ virtual TQString nodeName() const;
+ // TQString prettyHost() const;
/**
* Returns the text representation of the port number.
* @return the name of the service (a number)
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns the socket address.
@@ -536,12 +536,12 @@ private:
public:
/**
* Convert s the given raw address into text form.
- * This function returns QString::null if the address cannot be converted.
+ * This function returns TQString::null if the address cannot be converted.
* @param family the family of the address
* @param addr the address, in raw form
- * @return the converted address, or QString::null if not possible.
+ * @return the converted address, or TQString::null if not possible.
*/
- static QString addrToString(int family, const void *addr);
+ static TQString addrToString(int family, const void *addr);
/**
* Converts the address given in text form into raw form.
@@ -574,7 +574,7 @@ class KUnixSocketAddressPrivate;
*
* This is a Unix socket address.
*
- * This class expects QCString instead of QString values, which means the
+ * This class expects TQCString instead of TQString values, which means the
* filenames should be encoded in whatever form locale/system deems necessary
* before passing down to the function
*
@@ -601,7 +601,7 @@ public:
* Constructor from pathname.
* @param pathname pathname
*/
- KUnixSocketAddress(QCString pathname);
+ KUnixSocketAddress(TQCString pathname);
/**
* Destructor
@@ -621,28 +621,28 @@ public:
* @param path pathname
* @return true if successful, false otherwise
*/
- bool setAddress(QCString path);
+ bool setAddress(TQCString path);
/**
* Returns the pathname.
- * @return the pathname, can be QCString::null if uninitialized, or
+ * @return the pathname, can be TQCString::null if uninitialized, or
* "" if unknown
*/
- QCString pathname() const;
+ TQCString pathname() const;
/**
* Returns pretty representation of this socket.
* @return a pretty text representation of the socket.
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/*
- * Returns the path in the form of a QString.
+ * Returns the path in the form of a TQString.
* This can be fed into KExtendedSocket.
- * @return the path (can be QString::null).
+ * @return the path (can be TQString::null).
* @see pathname()
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns raw socket address.
diff --git a/kdecore/ksocks.cpp b/kdecore/ksocks.cpp
index be9331548..e596c50d9 100644
--- a/kdecore/ksocks.cpp
+++ b/kdecore/ksocks.cpp
@@ -22,9 +22,9 @@
#include <sys/time.h>
#endif
-#include <qfile.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <klocale.h>
#include <kdebug.h>
@@ -86,9 +86,9 @@ class KSocksTable {
virtual ~KSocksTable();
// The name of each symbol and it's SOCKS replacement
- QMap<SymbolKeys,QString> symbols;
+ TQMap<SymbolKeys,TQString> symbols;
// The name of this library
- QString myname;
+ TQString myname;
bool hasWorkingAsyncConnect;
};
@@ -269,12 +269,12 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
<< "libsocks5_sh.so"; // NEC
// Add the custom library paths here
- QStringList newlibs = config->readListEntry("SOCKS_lib_path");
+ TQStringList newlibs = config->readListEntry("SOCKS_lib_path");
- for (QStringList::Iterator it = newlibs.begin();
+ for (TQStringList::Iterator it = newlibs.begin();
it != newlibs.end();
++it) {
- QString thisone = *it;
+ TQString thisone = *it;
if (thisone[thisone.length()-1] != '/') thisone += "/";
_libPaths << thisone;
kdDebug(171) << "KSocks added a new library path: " << thisone << endl;
@@ -305,10 +305,10 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
_socksLib = 0L;
}
} else // leave this here "else for {}"
- for (QStringList::Iterator pit = _libPaths.begin();
+ for (TQStringList::Iterator pit = _libPaths.begin();
!_hasSocks && pit != _libPaths.end();
++pit)
- for (QStringList::Iterator it = _libNames.begin();
+ for (TQStringList::Iterator it = _libNames.begin();
it != _libNames.end();
++it) {
_socksLib = ll->library((*pit + *it).latin1());
@@ -336,7 +336,7 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
// Load in all the symbols
if (_st) {
- for (QMap<SymbolKeys,QString>::Iterator it = _st->symbols.begin();
+ for (TQMap<SymbolKeys,TQString>::Iterator it = _st->symbols.begin();
it != _st->symbols.end();
++it) {
switch(it.key()) {
diff --git a/kdecore/ksocks.h b/kdecore/ksocks.h
index 04fb4f79a..a95de56d4 100644
--- a/kdecore/ksocks.h
+++ b/kdecore/ksocks.h
@@ -18,7 +18,7 @@
#ifndef _KSOCKS_H_
#define _KSOCKS_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <sys/time.h>
#include <kstaticdeleter.h>
@@ -195,8 +195,8 @@ private:
static KSocks *_me;
static bool _disabled;
- QStringList _libNames;
- QStringList _libPaths;
+ TQStringList _libNames;
+ TQStringList _libPaths;
bool _useSocks, _hasSocks;
KLibrary* _socksLib;
diff --git a/kdecore/ksortablevaluelist.h b/kdecore/ksortablevaluelist.h
index e83bdf4ab..fc164bf07 100644
--- a/kdecore/ksortablevaluelist.h
+++ b/kdecore/ksortablevaluelist.h
@@ -20,8 +20,8 @@
#ifndef KSORTABLEVALUELIST_H
#define KSORTABLEVALUELIST_H
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
/**
@@ -121,13 +121,13 @@ public:
/**
- * KSortableValueList is a special QValueList for
+ * KSortableValueList is a special TQValueList for
* KSortableItem. It includes convenience operators
* to get the first value of the KSortableItem and a method
* to sort all items.
*/
template <class T, class Key = int>
-class KSortableValueList : public QValueList<KSortableItem<T, Key> >
+class KSortableValueList : public TQValueList<KSortableItem<T, Key> >
{
public:
/**
@@ -136,7 +136,7 @@ public:
* @param t the second value
*/
void insert( Key i, const T& t ) {
- QValueList<KSortableItem<T, Key> >::append( KSortableItem<T, Key>( i, t ) );
+ TQValueList<KSortableItem<T, Key> >::append( KSortableItem<T, Key>( i, t ) );
}
// add more as you please...
@@ -145,7 +145,7 @@ public:
* @return the first value of the KSortableItem
*/
T& operator[]( Key i ) {
- return QValueList<KSortableItem<T, Key> >::operator[]( i ).value();
+ return TQValueList<KSortableItem<T, Key> >::operator[]( i ).value();
}
/**
@@ -153,7 +153,7 @@ public:
* @return the first value of the KSortableItem
*/
const T& operator[]( Key i ) const {
- return QValueList<KSortableItem<T, Key> >::operator[]( i ).value();
+ return TQValueList<KSortableItem<T, Key> >::operator[]( i ).value();
}
/**
@@ -164,7 +164,7 @@ public:
}
};
-// template <class T> class KSortableValueListIterator : public QValueListIterator<KSortableItem<T> >
+// template <class T> class KSortableValueListIterator : public TQValueListIterator<KSortableItem<T> >
// {
// };
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 28568b74e..6ec8eb1bc 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -38,13 +38,13 @@
#include <pwd.h>
#include <grp.h>
-#include <qregexp.h>
-#include <qasciidict.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqasciidict.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kstandarddirs.h"
#include "kconfig.h"
@@ -56,7 +56,7 @@
#include "kstaticdeleter.h"
#include <kde_file.h>
-template class QDict<QStringList>;
+template class TQDict<TQStringList>;
class KStandardDirs::KStandardDirsPrivate
{
@@ -70,9 +70,9 @@ public:
bool restrictionsActive;
bool dataRestrictionActive;
bool checkRestrictions;
- QAsciiDict<bool> restrictions;
- QStringList xdgdata_prefixes;
- QStringList xdgconf_prefixes;
+ TQAsciiDict<bool> restrictions;
+ TQStringList xdgdata_prefixes;
+ TQStringList xdgconf_prefixes;
};
// Singleton, with data shared by all kstandarddirs instances.
@@ -80,8 +80,8 @@ public:
class KStandardDirsSingleton
{
public:
- QString defaultprefix;
- QString defaultbindir;
+ TQString defaultprefix;
+ TQString defaultbindir;
static KStandardDirsSingleton* self();
private:
static KStandardDirsSingleton* s_self;
@@ -103,8 +103,8 @@ static const char* const types[] = {"html", "icon", "apps", "sound",
"xdgdata-icon", "xdgdata-pixmap",
"kcfg", "emoticons", 0 };
-static int tokenize( QStringList& token, const QString& str,
- const QString& delim );
+static int tokenize( TQStringList& token, const TQString& str,
+ const TQString& delim );
KStandardDirs::KStandardDirs( ) : addedCustoms(false)
{
@@ -121,7 +121,7 @@ KStandardDirs::~KStandardDirs()
delete d;
}
-bool KStandardDirs::isRestrictedResource(const char *type, const QString& relPath) const
+bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const
{
if (!d || !d->restrictionsActive)
return false;
@@ -141,9 +141,9 @@ bool KStandardDirs::isRestrictedResource(const char *type, const QString& relPat
return false;
}
-void KStandardDirs::applyDataRestrictions(const QString &relPath) const
+void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
{
- QString key;
+ TQString key;
int i = relPath.find('/');
if (i != -1)
key = "data_"+relPath.left(i);
@@ -155,20 +155,20 @@ void KStandardDirs::applyDataRestrictions(const QString &relPath) const
}
-QStringList KStandardDirs::allTypes() const
+TQStringList KStandardDirs::allTypes() const
{
- QStringList list;
+ TQStringList list;
for (int i = 0; types[i] != 0; ++i)
- list.append(QString::fromLatin1(types[i]));
+ list.append(TQString::fromLatin1(types[i]));
return list;
}
-static void priorityAdd(QStringList &prefixes, const QString& dir, bool priority)
+static void priorityAdd(TQStringList &prefixes, const TQString& dir, bool priority)
{
if (priority && !prefixes.isEmpty())
{
// Add in front but behind $KDEHOME
- QStringList::iterator it = prefixes.begin();
+ TQStringList::iterator it = prefixes.begin();
it++;
prefixes.insert(it, 1, dir);
}
@@ -178,17 +178,17 @@ static void priorityAdd(QStringList &prefixes, const QString& dir, bool priority
}
}
-void KStandardDirs::addPrefix( const QString& _dir )
+void KStandardDirs::addPrefix( const TQString& _dir )
{
addPrefix(_dir, false);
}
-void KStandardDirs::addPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -198,17 +198,17 @@ void KStandardDirs::addPrefix( const QString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgConfigPrefix( const QString& _dir )
+void KStandardDirs::addXdgConfigPrefix( const TQString& _dir )
{
addXdgConfigPrefix(_dir, false);
}
-void KStandardDirs::addXdgConfigPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -218,17 +218,17 @@ void KStandardDirs::addXdgConfigPrefix( const QString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgDataPrefix( const QString& _dir )
+void KStandardDirs::addXdgDataPrefix( const TQString& _dir )
{
addXdgDataPrefix(_dir, false);
}
-void KStandardDirs::addXdgDataPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -238,39 +238,39 @@ void KStandardDirs::addXdgDataPrefix( const QString& _dir, bool priority )
}
}
-QString KStandardDirs::kfsstnd_prefixes()
+TQString KStandardDirs::kfsstnd_prefixes()
{
- return prefixes.join(QChar(KPATH_SEPARATOR));
+ return prefixes.join(TQChar(KPATH_SEPARATOR));
}
-QString KStandardDirs::kfsstnd_xdg_conf_prefixes()
+TQString KStandardDirs::kfsstnd_xdg_conf_prefixes()
{
- return d->xdgconf_prefixes.join(QChar(KPATH_SEPARATOR));
+ return d->xdgconf_prefixes.join(TQChar(KPATH_SEPARATOR));
}
-QString KStandardDirs::kfsstnd_xdg_data_prefixes()
+TQString KStandardDirs::kfsstnd_xdg_data_prefixes()
{
- return d->xdgdata_prefixes.join(QChar(KPATH_SEPARATOR));
+ return d->xdgdata_prefixes.join(TQChar(KPATH_SEPARATOR));
}
bool KStandardDirs::addResourceType( const char *type,
- const QString& relativename )
+ const TQString& relativename )
{
return addResourceType(type, relativename, true);
}
bool KStandardDirs::addResourceType( const char *type,
- const QString& relativename,
+ const TQString& relativename,
bool priority )
{
if (relativename.isEmpty())
return false;
- QStringList *rels = relatives.find(type);
+ TQStringList *rels = relatives.find(type);
if (!rels) {
- rels = new QStringList();
+ rels = new TQStringList();
relatives.insert(type, rels);
}
- QString copy = relativename;
+ TQString copy = relativename;
if (copy.at(copy.length() - 1) != '/')
copy += '/';
if (!rels->contains(copy)) {
@@ -285,22 +285,22 @@ bool KStandardDirs::addResourceType( const char *type,
}
bool KStandardDirs::addResourceDir( const char *type,
- const QString& absdir)
+ const TQString& absdir)
{
// KDE4: change priority to bring in line with addResourceType
return addResourceDir(type, absdir, false);
}
bool KStandardDirs::addResourceDir( const char *type,
- const QString& absdir,
+ const TQString& absdir,
bool priority)
{
- QStringList *paths = absolutes.find(type);
+ TQStringList *paths = absolutes.find(type);
if (!paths) {
- paths = new QStringList();
+ paths = new TQStringList();
absolutes.insert(type, paths);
}
- QString copy = absdir;
+ TQString copy = absdir;
if (copy.at(copy.length() - 1) != '/')
copy += '/';
@@ -315,15 +315,15 @@ bool KStandardDirs::addResourceDir( const char *type,
return false;
}
-QString KStandardDirs::findResource( const char *type,
- const QString& filename ) const
+TQString KStandardDirs::findResource( const char *type,
+ const TQString& filename ) const
{
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
return filename; // absolute dirs are absolute dirs, right? :-/
#if 0
kdDebug() << "Find resource: " << type << endl;
-for (QStringList::ConstIterator pit = prefixes.begin();
+for (TQStringList::ConstIterator pit = prefixes.begin();
pit != prefixes.end();
pit++)
{
@@ -331,15 +331,15 @@ for (QStringList::ConstIterator pit = prefixes.begin();
}
#endif
- QString dir = findResourceDir(type, filename);
+ TQString dir = findResourceDir(type, filename);
if (dir.isEmpty())
return dir;
else return dir + filename;
}
-static Q_UINT32 updateHash(const QString &file, Q_UINT32 hash)
+static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash)
{
- QCString cFile = QFile::encodeName(file);
+ TQCString cFile = TQFile::encodeName(file);
KDE_struct_stat buff;
if ((access(cFile, R_OK) == 0) &&
(KDE_stat( cFile, &buff ) == 0) &&
@@ -351,21 +351,21 @@ static Q_UINT32 updateHash(const QString &file, Q_UINT32 hash)
}
Q_UINT32 KStandardDirs::calcResourceHash( const char *type,
- const QString& filename, bool deep) const
+ const TQString& filename, bool deep) const
{
Q_UINT32 hash = 0;
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
{
// absolute dirs are absolute dirs, right? :-/
return updateHash(filename, hash);
}
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(filename);
- QStringList candidates = resourceDirs(type);
- QString fullPath;
+ TQStringList candidates = resourceDirs(type);
+ TQString fullPath;
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
{
hash = updateHash(*it + filename, hash);
@@ -376,12 +376,12 @@ Q_UINT32 KStandardDirs::calcResourceHash( const char *type,
}
-QStringList KStandardDirs::findDirs( const char *type,
- const QString& reldir ) const
+TQStringList KStandardDirs::findDirs( const char *type,
+ const TQString& reldir ) const
{
- QDir testdir;
- QStringList list;
- if (!QDir::isRelativePath(reldir))
+ TQDir testdir;
+ TQStringList list;
+ if (!TQDir::isRelativePath(reldir))
{
testdir.setPath(reldir);
if (testdir.exists())
@@ -398,9 +398,9 @@ QStringList KStandardDirs::findDirs( const char *type,
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(reldir);
- QStringList candidates = resourceDirs(type);
+ TQStringList candidates = resourceDirs(type);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it) {
testdir.setPath(*it + reldir);
if (testdir.exists())
@@ -410,22 +410,22 @@ QStringList KStandardDirs::findDirs( const char *type,
return list;
}
-QString KStandardDirs::findResourceDir( const char *type,
- const QString& filename) const
+TQString KStandardDirs::findResourceDir( const char *type,
+ const TQString& filename) const
{
#ifndef NDEBUG
if (filename.isEmpty()) {
kdWarning() << "filename for type " << type << " in KStandardDirs::findResourceDir is not supposed to be empty!!" << endl;
- return QString::null;
+ return TQString::null;
}
#endif
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(filename);
- QStringList candidates = resourceDirs(type);
- QString fullPath;
+ TQStringList candidates = resourceDirs(type);
+ TQString fullPath;
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it) {
if (exists(*it + filename)) {
#ifdef Q_WS_WIN //this ensures we're using installed .la files
@@ -445,13 +445,13 @@ QString KStandardDirs::findResourceDir( const char *type,
kdDebug() << "KStdDirs::findResDir(): can't find \"" << filename << "\" in type \"" << type << "\"." << endl;
#endif
- return QString::null;
+ return TQString::null;
}
-bool KStandardDirs::exists(const QString &fullPath)
+bool KStandardDirs::exists(const TQString &fullPath)
{
KDE_struct_stat buff;
- if (access(QFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( QFile::encodeName(fullPath), &buff ) == 0)
+ if (access(TQFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)
if (fullPath.at(fullPath.length() - 1) != '/') {
if (S_ISREG( buff.st_mode ))
return true;
@@ -461,19 +461,19 @@ bool KStandardDirs::exists(const QString &fullPath)
return false;
}
-static void lookupDirectory(const QString& path, const QString &relPart,
- const QRegExp &regexp,
- QStringList& list,
- QStringList& relList,
+static void lookupDirectory(const TQString& path, const TQString &relPart,
+ const TQRegExp &regexp,
+ TQStringList& list,
+ TQStringList& relList,
bool recursive, bool unique)
{
- QString pattern = regexp.pattern();
+ TQString pattern = regexp.pattern();
if (recursive || pattern.contains('?') || pattern.contains('*'))
{
if (path.isEmpty()) //for sanity
return;
// We look for a set of files.
- DIR *dp = opendir( QFile::encodeName(path));
+ DIR *dp = opendir( TQFile::encodeName(path));
if (!dp)
return;
@@ -486,20 +486,20 @@ static void lookupDirectory(const QString& path, const QString &relPart,
struct dirent *ep;
KDE_struct_stat buff;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~')
continue;
if (!recursive && !regexp.exactMatch(fn))
continue; // No match
- QString pathfn = path + fn;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 ) {
+ TQString pathfn = path + fn;
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 ) {
kdDebug() << "Error stat'ing " << pathfn << " : " << perror << endl;
continue; // Couldn't stat (e.g. no read permissions)
}
@@ -524,10 +524,10 @@ static void lookupDirectory(const QString& path, const QString &relPart,
else
{
// We look for a single file.
- QString fn = pattern;
- QString pathfn = path + fn;
+ TQString fn = pattern;
+ TQString pathfn = path + fn;
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 )
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 )
return; // File not found
if ( S_ISREG( buff.st_mode))
{
@@ -540,11 +540,11 @@ static void lookupDirectory(const QString& path, const QString &relPart,
}
}
-static void lookupPrefix(const QString& prefix, const QString& relpath,
- const QString& relPart,
- const QRegExp &regexp,
- QStringList& list,
- QStringList& relList,
+static void lookupPrefix(const TQString& prefix, const TQString& relpath,
+ const TQString& relPart,
+ const TQRegExp &regexp,
+ TQStringList& list,
+ TQStringList& relList,
bool recursive, bool unique)
{
if (relpath.isEmpty()) {
@@ -552,8 +552,8 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
relList, recursive, unique);
return;
}
- QString path;
- QString rest;
+ TQString path;
+ TQString rest;
if (relpath.length())
{
@@ -577,28 +577,28 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
if (path.contains('*') || path.contains('?')) {
- QRegExp pathExp(path, true, true);
- DIR *dp = opendir( QFile::encodeName(prefix) );
+ TQRegExp pathExp(path, true, true);
+ DIR *dp = opendir( TQFile::encodeName(prefix) );
if (!dp) {
return;
}
struct dirent *ep;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == '~')
continue;
if ( !pathExp.exactMatch(fn) )
continue; // No match
- QString rfn = relPart+fn;
+ TQString rfn = relPart+fn;
fn = prefix + fn;
- if ( KDE_stat( QFile::encodeName(fn), &buff ) != 0 ) {
+ if ( KDE_stat( TQFile::encodeName(fn), &buff ) != 0 ) {
kdDebug() << "Error statting " << fn << " : " << perror << endl;
continue; // Couldn't stat (e.g. no permissions)
}
@@ -618,14 +618,14 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
QStringList
KStandardDirs::findAllResources( const char *type,
- const QString& filter,
+ const TQString& filter,
bool recursive,
bool unique,
- QStringList &relList) const
+ TQStringList &relList) const
{
- QStringList list;
- QString filterPath;
- QString filterFile;
+ TQStringList list;
+ TQString filterPath;
+ TQString filterFile;
if (filter.length())
{
@@ -640,8 +640,8 @@ KStandardDirs::findAllResources( const char *type,
checkConfig();
- QStringList candidates;
- if (!QDir::isRelativePath(filter)) // absolute path
+ TQStringList candidates;
+ if (!TQDir::isRelativePath(filter)) // absolute path
{
#ifdef Q_OS_WIN
candidates << filterPath.left(3); //e.g. "C:\"
@@ -660,9 +660,9 @@ KStandardDirs::findAllResources( const char *type,
if (filterFile.isEmpty())
filterFile = "*";
- QRegExp regExp(filterFile, true, true);
+ TQRegExp regExp(filterFile, true, true);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
{
lookupPrefix(*it, filterPath, "", regExp, list,
@@ -674,42 +674,42 @@ KStandardDirs::findAllResources( const char *type,
QStringList
KStandardDirs::findAllResources( const char *type,
- const QString& filter,
+ const TQString& filter,
bool recursive,
bool unique) const
{
- QStringList relList;
+ TQStringList relList;
return findAllResources(type, filter, recursive, unique, relList);
}
QString
-KStandardDirs::realPath(const QString &dirname)
+KStandardDirs::realPath(const TQString &dirname)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(dirname).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) {
// success, use result from realpath
int len = strlen(realpath_buffer);
realpath_buffer[len] = '/';
realpath_buffer[len+1] = 0;
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return dirname;
}
QString
-KStandardDirs::realFilePath(const QString &filename)
+KStandardDirs::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
// success, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
@@ -720,15 +720,15 @@ void KStandardDirs::createSpecialResource(const char *type)
char hostname[256];
hostname[0] = 0;
gethostname(hostname, 255);
- QString dir = QString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
+ TQString dir = TQString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
char link[1024];
link[1023] = 0;
- int result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ int result = readlink(TQFile::encodeName(dir).data(), link, 1023);
bool relink = (result == -1) && (errno == ENOENT);
if (result > 0)
{
link[result] = 0;
- if (!QDir::isRelativePath(link))
+ if (!TQDir::isRelativePath(link))
{
KDE_struct_stat stat_buf;
int res = KDE_lstat(link, &stat_buf);
@@ -754,35 +754,35 @@ void KStandardDirs::createSpecialResource(const char *type)
if (!makeDir(dir, 0700))
fprintf(stderr, "failed to create \"%s\"", dir.latin1());
else
- result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ result = readlink(TQFile::encodeName(dir).data(), link, 1023);
}
#else //UNIX
if (relink)
{
- QString srv = findExe(QString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir());
+ TQString srv = findExe(TQString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir());
if (srv.isEmpty())
- srv = findExe(QString::fromLatin1("lnusertemp"));
+ srv = findExe(TQString::fromLatin1("lnusertemp"));
if (!srv.isEmpty())
{
- system(QFile::encodeName(srv)+" "+type);
- result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ system(TQFile::encodeName(srv)+" "+type);
+ result = readlink(TQFile::encodeName(dir).data(), link, 1023);
}
}
if (result > 0)
{
link[result] = 0;
if (link[0] == '/')
- dir = QFile::decodeName(link);
+ dir = TQFile::decodeName(link);
else
- dir = QDir::cleanDirPath(dir+QFile::decodeName(link));
+ dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link));
}
#endif
addResourceDir(type, dir+'/');
}
-QStringList KStandardDirs::resourceDirs(const char *type) const
+TQStringList KStandardDirs::resourceDirs(const char *type) const
{
- QStringList *candidates = dircache.find(type);
+ TQStringList *candidates = dircache.find(type);
if (!candidates) { // filling cache
if (strcmp(type, "socket") == 0)
@@ -792,10 +792,10 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
else if (strcmp(type, "cache") == 0)
const_cast<KStandardDirs *>(this)->createSpecialResource(type);
- QDir testdir;
+ TQDir testdir;
- candidates = new QStringList();
- QStringList *dirs;
+ candidates = new TQStringList();
+ TQStringList *dirs;
bool restrictionActive = false;
if (d && d->restrictionsActive)
@@ -813,7 +813,7 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
if (dirs)
{
bool local = true;
- const QStringList *prefixList = 0;
+ const TQStringList *prefixList = 0;
if (strncmp(type, "xdgdata-", 8) == 0)
prefixList = &(d->xdgdata_prefixes);
else if (strncmp(type, "xdgconf-", 8) == 0)
@@ -821,13 +821,13 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
else
prefixList = &prefixes;
- for (QStringList::ConstIterator pit = prefixList->begin();
+ for (TQStringList::ConstIterator pit = prefixList->begin();
pit != prefixList->end();
++pit)
{
- for (QStringList::ConstIterator it = dirs->begin();
+ for (TQStringList::ConstIterator it = dirs->begin();
it != dirs->end(); ++it) {
- QString path = realPath(*pit + *it);
+ TQString path = realPath(*pit + *it);
testdir.setPath(path);
if (local && restrictionActive)
continue;
@@ -843,13 +843,13 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
}
dirs = absolutes.find(type);
if (dirs)
- for (QStringList::ConstIterator it = dirs->begin();
+ for (TQStringList::ConstIterator it = dirs->begin();
it != dirs->end(); ++it)
{
testdir.setPath(*it);
if (testdir.exists())
{
- QString filename = realPath(*it);
+ TQString filename = realPath(*it);
if (!candidates->contains(filename))
candidates->append(filename);
}
@@ -859,7 +859,7 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
#if 0
kdDebug() << "found dirs for resource " << type << ":" << endl;
- for (QStringList::ConstIterator pit = candidates->begin();
+ for (TQStringList::ConstIterator pit = candidates->begin();
pit != candidates->end();
pit++)
{
@@ -871,21 +871,21 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
return *candidates;
}
-QStringList KStandardDirs::systemPaths( const QString& pstr )
+TQStringList KStandardDirs::systemPaths( const TQString& pstr )
{
- QStringList tokens;
- QString p = pstr;
+ TQStringList tokens;
+ TQString p = pstr;
if( p.isNull() )
{
p = getenv( "PATH" );
}
- QString delimiters(QChar(KPATH_SEPARATOR));
+ TQString delimiters(TQChar(KPATH_SEPARATOR));
delimiters += "\b";
tokenize( tokens, p, delimiters );
- QStringList exePaths;
+ TQStringList exePaths;
// split path using : or \b as delimiters
for( unsigned i = 0; i < tokens.count(); i++ )
@@ -899,14 +899,14 @@ QStringList KStandardDirs::systemPaths( const QString& pstr )
len = p.length();
if ( len == 1 )
{
- p.replace( 0, 1, QDir::homeDirPath() );
+ p.replace( 0, 1, TQDir::homeDirPath() );
}
else
{
- QString user = p.mid( 1, len - 1 );
+ TQString user = p.mid( 1, len - 1 );
struct passwd *dir = getpwnam( user.local8Bit().data() );
if ( dir && strlen( dir->pw_dir ) )
- p.replace( 0, len, QString::fromLocal8Bit( dir->pw_dir ) );
+ p.replace( 0, len, TQString::fromLocal8Bit( dir->pw_dir ) );
}
}
@@ -917,36 +917,36 @@ QStringList KStandardDirs::systemPaths( const QString& pstr )
}
-QString KStandardDirs::findExe( const QString& appname,
- const QString& pstr, bool ignore)
+TQString KStandardDirs::findExe( const TQString& appname,
+ const TQString& pstr, bool ignore)
{
#ifdef Q_WS_WIN
- QString real_appname = appname + ".exe";
+ TQString real_appname = appname + ".exe";
#else
- QString real_appname = appname;
+ TQString real_appname = appname;
#endif
- QFileInfo info;
+ TQFileInfo info;
// absolute or relative path given
- if (real_appname.find(QDir::separator()) >= 0)
+ if (real_appname.find(TQDir::separator()) >= 0)
{
info.setFile( real_appname );
if( info.exists() && ( ignore || info.isExecutable() )
&& info.isFile() ) {
return info.absFilePath();
}
- return QString::null;
+ return TQString::null;
}
- QString p = QString("%1/%2").arg(kfsstnd_defaultbindir()).arg(real_appname);
+ TQString p = TQString("%1/%2").arg(kfsstnd_defaultbindir()).arg(real_appname);
info.setFile( p );
if( info.exists() && ( ignore || info.isExecutable() )
&& ( info.isFile() || info.isSymLink() ) ) {
return p;
}
- QStringList exePaths = systemPaths( pstr );
- for (QStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
+ TQStringList exePaths = systemPaths( pstr );
+ for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
{
p = (*it) + "/";
p += real_appname;
@@ -963,23 +963,23 @@ QString KStandardDirs::findExe( const QString& appname,
// If we reach here, the executable wasn't found.
// So return empty string.
- return QString::null;
+ return TQString::null;
}
-int KStandardDirs::findAllExe( QStringList& list, const QString& appname,
- const QString& pstr, bool ignore )
+int KStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
+ const TQString& pstr, bool ignore )
{
#ifdef Q_WS_WIN
- QString real_appname = appname + ".exe";
+ TQString real_appname = appname + ".exe";
#else
- QString real_appname = appname;
+ TQString real_appname = appname;
#endif
- QFileInfo info;
- QString p;
+ TQFileInfo info;
+ TQString p;
list.clear();
- QStringList exePaths = systemPaths( pstr );
- for (QStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
+ TQStringList exePaths = systemPaths( pstr );
+ for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
{
p = (*it) + "/";
p += real_appname;
@@ -995,11 +995,11 @@ int KStandardDirs::findAllExe( QStringList& list, const QString& appname,
return list.count();
}
-static int tokenize( QStringList& tokens, const QString& str,
- const QString& delim )
+static int tokenize( TQStringList& tokens, const TQString& str,
+ const TQString& delim )
{
int len = str.length();
- QString token = "";
+ TQString token = "";
for( int index = 0; index < len; index++)
{
@@ -1021,7 +1021,7 @@ static int tokenize( QStringList& tokens, const QString& str,
return tokens.count();
}
-QString KStandardDirs::kde_default(const char *type) {
+TQString KStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data"))
return "share/apps/";
if (!strcmp(type, "html"))
@@ -1075,19 +1075,19 @@ QString KStandardDirs::kde_default(const char *type) {
qFatal("unknown resource type %s", type);
- return QString::null;
+ return TQString::null;
}
-QString KStandardDirs::saveLocation(const char *type,
- const QString& suffix,
+TQString KStandardDirs::saveLocation(const char *type,
+ const TQString& suffix,
bool create) const
{
checkConfig();
- QString *pPath = savelocations.find(type);
+ TQString *pPath = savelocations.find(type);
if (!pPath)
{
- QStringList *dirs = relatives.find(type);
+ TQStringList *dirs = relatives.find(type);
if (!dirs && (
(strcmp(type, "socket") == 0) ||
(strcmp(type, "tmp") == 0) ||
@@ -1100,28 +1100,28 @@ QString KStandardDirs::saveLocation(const char *type,
{
// Check for existence of typed directory + suffix
if (strncmp(type, "xdgdata-", 8) == 0)
- pPath = new QString(realPath(localxdgdatadir() + dirs->last()));
+ pPath = new TQString(realPath(localxdgdatadir() + dirs->last()));
else if (strncmp(type, "xdgconf-", 8) == 0)
- pPath = new QString(realPath(localxdgconfdir() + dirs->last()));
+ pPath = new TQString(realPath(localxdgconfdir() + dirs->last()));
else
- pPath = new QString(realPath(localkdedir() + dirs->last()));
+ pPath = new TQString(realPath(localkdedir() + dirs->last()));
}
else {
dirs = absolutes.find(type);
if (!dirs)
qFatal("KStandardDirs: The resource type %s is not registered", type);
- pPath = new QString(realPath(dirs->last()));
+ pPath = new TQString(realPath(dirs->last()));
}
savelocations.insert(type, pPath);
}
- QString fullPath = *pPath + (pPath->endsWith("/") ? "" : "/") + suffix;
+ TQString fullPath = *pPath + (pPath->endsWith("/") ? "" : "/") + suffix;
KDE_struct_stat st;
- if (KDE_stat(QFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) {
+ if (KDE_stat(TQFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) {
if(!create) {
#ifndef NDEBUG
- kdDebug() << QString("save location %1 doesn't exist").arg(fullPath) << endl;
+ kdDebug() << TQString("save location %1 doesn't exist").arg(fullPath) << endl;
#endif
return fullPath;
}
@@ -1135,18 +1135,18 @@ QString KStandardDirs::saveLocation(const char *type,
return fullPath;
}
-QString KStandardDirs::relativeLocation(const char *type, const QString &absPath)
+TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath)
{
- QString fullPath = absPath;
+ TQString fullPath = absPath;
int i = absPath.findRev('/');
if (i != -1)
{
fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize
}
- QStringList candidates = resourceDirs(type);
+ TQStringList candidates = resourceDirs(type);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
if (fullPath.startsWith(*it))
{
@@ -1157,20 +1157,20 @@ QString KStandardDirs::relativeLocation(const char *type, const QString &absPath
}
-bool KStandardDirs::makeDir(const QString& dir, int mode)
+bool KStandardDirs::makeDir(const TQString& dir, int mode)
{
// we want an absolute path
- if (QDir::isRelativePath(dir))
+ if (TQDir::isRelativePath(dir))
return false;
- QString target = dir;
+ TQString target = dir;
uint len = target.length();
// append trailing slash if missing
if (dir.at(len - 1) != '/')
target += '/';
- QString base("");
+ TQString base("");
uint i = 1;
while( i < len )
@@ -1178,7 +1178,7 @@ bool KStandardDirs::makeDir(const QString& dir, int mode)
KDE_struct_stat st;
int pos = target.find('/', i);
base += target.mid(i - 1, pos - i + 1);
- QCString baseEncoded = QFile::encodeName(base);
+ TQCString baseEncoded = TQFile::encodeName(base);
// bail out if we encountered a problem
if (KDE_stat(baseEncoded, &st) != 0)
{
@@ -1198,47 +1198,47 @@ bool KStandardDirs::makeDir(const QString& dir, int mode)
return true;
}
-static QString readEnvPath(const char *env)
+static TQString readEnvPath(const char *env)
{
- QCString c_path = getenv(env);
+ TQCString c_path = getenv(env);
if (c_path.isEmpty())
- return QString::null;
+ return TQString::null;
#ifdef Q_OS_WIN
//win32 paths are case-insensitive: avoid duplicates on various dir lists
- return QFile::decodeName(c_path).lower();
+ return TQFile::decodeName(c_path).lower();
#else
- return QFile::decodeName(c_path);
+ return TQFile::decodeName(c_path);
#endif
}
#ifdef __linux__
-static QString executablePrefix()
+static TQString executablePrefix()
{
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
int length = readlink ("/proc/self/exe", path_buffer, MAXPATHLEN);
if (length == -1)
- return QString::null;
+ return TQString::null;
path_buffer[length] = '\0';
- QString path = QFile::decodeName(path_buffer);
+ TQString path = TQFile::decodeName(path_buffer);
if(path.isEmpty())
- return QString::null;
+ return TQString::null;
int pos = path.findRev('/'); // Skip filename
if(pos <= 0)
- return QString::null;
+ return TQString::null;
pos = path.findRev('/', pos - 1); // Skip last directory
if(pos <= 0)
- return QString::null;
+ return TQString::null;
return path.left(pos);
}
#endif
-QString KStandardDirs::kfsstnd_defaultprefix()
+TQString KStandardDirs::kfsstnd_defaultprefix()
{
KStandardDirsSingleton* s = KStandardDirsSingleton::self();
if (!s->defaultprefix.isEmpty())
@@ -1246,7 +1246,7 @@ QString KStandardDirs::kfsstnd_defaultprefix()
#ifdef Q_WS_WIN
s->defaultprefix = readEnvPath("KDEDIR");
if (s->defaultprefix.isEmpty()) {
- s->defaultprefix = QFile::decodeName("c:\\kde");
+ s->defaultprefix = TQFile::decodeName("c:\\kde");
//TODO: find other location (the Registry?)
}
#else //UNIX
@@ -1257,17 +1257,17 @@ QString KStandardDirs::kfsstnd_defaultprefix()
return s->defaultprefix;
}
-QString KStandardDirs::kfsstnd_defaultbindir()
+TQString KStandardDirs::kfsstnd_defaultbindir()
{
KStandardDirsSingleton* s = KStandardDirsSingleton::self();
if (!s->defaultbindir.isEmpty())
return s->defaultbindir;
#ifdef Q_WS_WIN
- s->defaultbindir = kfsstnd_defaultprefix() + QString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#else //UNIX
s->defaultbindir = __KDE_BINDIR;
if (s->defaultbindir.isEmpty())
- s->defaultbindir = kfsstnd_defaultprefix() + QString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#endif
if (s->defaultbindir.isEmpty())
kdWarning() << "KStandardDirs::kfsstnd_defaultbindir(): default binary KDE dir not found!" << endl;
@@ -1276,17 +1276,17 @@ QString KStandardDirs::kfsstnd_defaultbindir()
void KStandardDirs::addKDEDefaults()
{
- QStringList kdedirList;
+ TQStringList kdedirList;
// begin KDEDIRS
- QString kdedirs = readEnvPath("KDEDIRS");
+ TQString kdedirs = readEnvPath("KDEDIRS");
if (!kdedirs.isEmpty())
{
- tokenize(kdedirList, kdedirs, QChar(KPATH_SEPARATOR));
+ tokenize(kdedirList, kdedirs, TQChar(KPATH_SEPARATOR));
}
else
{
- QString kdedir = readEnvPath("KDEDIR");
+ TQString kdedir = readEnvPath("KDEDIR");
if (!kdedir.isEmpty())
{
kdedir = KShell::tildeExpand(kdedir);
@@ -1299,19 +1299,19 @@ void KStandardDirs::addKDEDefaults()
#endif
#ifdef __KDE_EXECPREFIX
- QString execPrefix(__KDE_EXECPREFIX);
+ TQString execPrefix(__KDE_EXECPREFIX);
if (execPrefix!="NONE")
kdedirList.append(execPrefix);
#endif
#ifdef __linux__
- const QString linuxExecPrefix = executablePrefix();
+ const TQString linuxExecPrefix = executablePrefix();
if ( !linuxExecPrefix.isEmpty() )
kdedirList.append( linuxExecPrefix );
#endif
// We treat root differently to prevent a "su" shell messing up the
// file permissions in the user's home directory.
- QString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
+ TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
if (!localKdeDir.isEmpty())
{
if (localKdeDir[localKdeDir.length()-1] != '/')
@@ -1319,7 +1319,7 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localKdeDir = QDir::homeDirPath() + "/.kde3/";
+ localKdeDir = TQDir::homeDirPath() + "/.kde3/";
}
if (localKdeDir != "-/")
@@ -1328,21 +1328,21 @@ void KStandardDirs::addKDEDefaults()
addPrefix(localKdeDir);
}
- QStringList::ConstIterator end(kdedirList.end());
- for (QStringList::ConstIterator it = kdedirList.begin();
+ TQStringList::ConstIterator end(kdedirList.end());
+ for (TQStringList::ConstIterator it = kdedirList.begin();
it != end; ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addPrefix(dir);
}
// end KDEDIRS
// begin XDG_CONFIG_XXX
- QStringList xdgdirList;
- QString xdgdirs = readEnvPath("XDG_CONFIG_DIRS");
+ TQStringList xdgdirList;
+ TQString xdgdirs = readEnvPath("XDG_CONFIG_DIRS");
if (!xdgdirs.isEmpty())
{
- tokenize(xdgdirList, xdgdirs, QChar(KPATH_SEPARATOR));
+ tokenize(xdgdirList, xdgdirs, TQChar(KPATH_SEPARATOR));
}
else
{
@@ -1355,7 +1355,7 @@ void KStandardDirs::addKDEDefaults()
#endif
}
- QString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
+ TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
if (!localXdgDir.isEmpty())
{
if (localXdgDir[localXdgDir.length()-1] != '/')
@@ -1363,16 +1363,16 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localXdgDir = QDir::homeDirPath() + "/.config/";
+ localXdgDir = TQDir::homeDirPath() + "/.config/";
}
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgConfigPrefix(localXdgDir);
- for (QStringList::ConstIterator it = xdgdirList.begin();
+ for (TQStringList::ConstIterator it = xdgdirList.begin();
it != xdgdirList.end(); ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addXdgConfigPrefix(dir);
}
// end XDG_CONFIG_XXX
@@ -1381,15 +1381,15 @@ void KStandardDirs::addKDEDefaults()
xdgdirs = readEnvPath("XDG_DATA_DIRS");
if (!xdgdirs.isEmpty())
{
- tokenize(xdgdirList, xdgdirs, QChar(KPATH_SEPARATOR));
+ tokenize(xdgdirList, xdgdirs, TQChar(KPATH_SEPARATOR));
}
else
{
xdgdirList.clear();
- for (QStringList::ConstIterator it = kdedirList.begin();
+ for (TQStringList::ConstIterator it = kdedirList.begin();
it != kdedirList.end(); ++it)
{
- QString dir = *it;
+ TQString dir = *it;
if (dir[dir.length()-1] != '/')
dir += '/';
xdgdirList.append(dir+"share/");
@@ -1407,16 +1407,16 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localXdgDir = QDir::homeDirPath() + "/.local/share/";
+ localXdgDir = TQDir::homeDirPath() + "/.local/share/";
}
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgDataPrefix(localXdgDir);
- for (QStringList::ConstIterator it = xdgdirList.begin();
+ for (TQStringList::ConstIterator it = xdgdirList.begin();
it != xdgdirList.end(); ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addXdgDataPrefix(dir);
}
// end XDG_DATA_XXX
@@ -1428,7 +1428,7 @@ void KStandardDirs::addKDEDefaults()
index++;
}
- addResourceDir("home", QDir::homeDirPath());
+ addResourceDir("home", TQDir::homeDirPath());
addResourceDir("locale", "/usr/share/locale-langpack/", true);
}
@@ -1439,11 +1439,11 @@ void KStandardDirs::checkConfig() const
const_cast<KStandardDirs*>(this)->addCustomized(KGlobal::_instance->_config);
}
-static QStringList lookupProfiles(const QString &mapFile)
+static TQStringList lookupProfiles(const TQString &mapFile)
{
- QStringList profiles;
+ TQStringList profiles;
- if (mapFile.isEmpty() || !QFile::exists(mapFile))
+ if (mapFile.isEmpty() || !TQFile::exists(mapFile))
{
profiles << "default";
return profiles;
@@ -1456,7 +1456,7 @@ static QStringList lookupProfiles(const QString &mapFile)
return profiles; // Not good
}
- QCString user = pw->pw_name;
+ TQCString user = pw->pw_name;
gid_t sup_gids[512];
int sup_gids_nr = getgroups(512, sup_gids);
@@ -1470,14 +1470,14 @@ static QStringList lookupProfiles(const QString &mapFile)
}
mapCfg.setGroup("General");
- QStringList groups = mapCfg.readListEntry("groups");
+ TQStringList groups = mapCfg.readListEntry("groups");
mapCfg.setGroup("Groups");
- for( QStringList::ConstIterator it = groups.begin();
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it )
{
- QCString grp = (*it).utf8();
+ TQCString grp = (*it).utf8();
// Check if user is in this group
struct group *grp_ent = getgrnam(grp);
if (!grp_ent) continue;
@@ -1518,7 +1518,7 @@ bool KStandardDirs::addCustomized(KConfig *config)
uint configdirs = resourceDirs("config").count();
// Remember original group
- QString oldGroup = config->group();
+ TQString oldGroup = config->group();
if (!addedCustoms)
{
@@ -1526,15 +1526,15 @@ bool KStandardDirs::addCustomized(KConfig *config)
addedCustoms = true;
// reading the prefixes in
- QString group = QString::fromLatin1("Directories");
+ TQString group = TQString::fromLatin1("Directories");
config->setGroup(group);
- QString kioskAdmin = config->readEntry("kioskAdmin");
+ TQString kioskAdmin = config->readEntry("kioskAdmin");
if (!kioskAdmin.isEmpty() && !kde_kiosk_admin)
{
int i = kioskAdmin.find(':');
- QString user = kioskAdmin.left(i);
- QString host = kioskAdmin.mid(i+1);
+ TQString user = kioskAdmin.left(i);
+ TQString host = kioskAdmin.mid(i+1);
KUser thisUser;
char hostname[ 256 ];
@@ -1551,25 +1551,25 @@ bool KStandardDirs::addCustomized(KConfig *config)
bool readProfiles = true;
- if (kde_kiosk_admin && !QCString(getenv("KDE_KIOSK_NO_PROFILES")).isEmpty())
+ if (kde_kiosk_admin && !TQCString(getenv("KDE_KIOSK_NO_PROFILES")).isEmpty())
readProfiles = false;
- QString userMapFile = config->readEntry("userProfileMapFile");
- QString profileDirsPrefix = config->readEntry("profileDirsPrefix");
+ TQString userMapFile = config->readEntry("userProfileMapFile");
+ TQString profileDirsPrefix = config->readEntry("profileDirsPrefix");
if (!profileDirsPrefix.isEmpty() && !profileDirsPrefix.endsWith("/"))
profileDirsPrefix.append('/');
- QStringList profiles;
+ TQStringList profiles;
if (readProfiles)
profiles = lookupProfiles(userMapFile);
- QString profile;
+ TQString profile;
bool priority = false;
while(true)
{
config->setGroup(group);
- QStringList list = config->readListEntry("prefixes");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = config->readListEntry("prefixes");
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
addPrefix(*it, priority);
addXdgConfigPrefix(*it+"/etc/xdg", priority);
@@ -1579,7 +1579,7 @@ bool KStandardDirs::addCustomized(KConfig *config)
// for this profile under <profileDirsPrefix>
if (list.isEmpty() && !profile.isEmpty() && !profileDirsPrefix.isEmpty())
{
- QString dir = profileDirsPrefix + profile;
+ TQString dir = profileDirsPrefix + profile;
addPrefix(dir, priority);
addXdgConfigPrefix(dir+"/etc/xdg", priority);
addXdgDataPrefix(dir+"/share", priority);
@@ -1587,16 +1587,16 @@ bool KStandardDirs::addCustomized(KConfig *config)
// iterating over all entries in the group Directories
// to find entries that start with dir_$type
- QMap<QString, QString> entries = config->entryMap(group);
- for (QMap<QString, QString>::ConstIterator it2 = entries.begin();
+ TQMap<TQString, TQString> entries = config->entryMap(group);
+ for (TQMap<TQString, TQString>::ConstIterator it2 = entries.begin();
it2 != entries.end(); it2++)
{
- QString key = it2.key();
+ TQString key = it2.key();
if (key.startsWith("dir_")) {
// generate directory list, there may be more than 1.
- QStringList dirs = QStringList::split(',', *it2);
- QStringList::Iterator sIt(dirs.begin());
- QString resType = key.mid(4, key.length());
+ TQStringList dirs = TQStringList::split(',', *it2);
+ TQStringList::Iterator sIt(dirs.begin());
+ TQString resType = key.mid(4, key.length());
for (; sIt != dirs.end(); ++sIt)
{
addResourceDir(resType.latin1(), *sIt, priority);
@@ -1606,21 +1606,21 @@ bool KStandardDirs::addCustomized(KConfig *config)
if (profiles.isEmpty())
break;
profile = profiles.back();
- group = QString::fromLatin1("Directories-%1").arg(profile);
+ group = TQString::fromLatin1("Directories-%1").arg(profile);
profiles.pop_back();
priority = true;
}
}
// Process KIOSK restrictions.
- if (!kde_kiosk_admin || QCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
+ if (!kde_kiosk_admin || TQCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
{
config->setGroup("KDE Resource Restrictions");
- QMap<QString, QString> entries = config->entryMap("KDE Resource Restrictions");
- for (QMap<QString, QString>::ConstIterator it2 = entries.begin();
+ TQMap<TQString, TQString> entries = config->entryMap("KDE Resource Restrictions");
+ for (TQMap<TQString, TQString>::ConstIterator it2 = entries.begin();
it2 != entries.end(); it2++)
{
- QString key = it2.key();
+ TQString key = it2.key();
if (!config->readBoolEntry(key, true))
{
d->restrictionsActive = true;
@@ -1640,19 +1640,19 @@ bool KStandardDirs::addCustomized(KConfig *config)
return configDirsChanged;
}
-QString KStandardDirs::localkdedir() const
+TQString KStandardDirs::localkdedir() const
{
// Return the prefix to use for saving
return prefixes.first();
}
-QString KStandardDirs::localxdgdatadir() const
+TQString KStandardDirs::localxdgdatadir() const
{
// Return the prefix to use for saving
return d->xdgdata_prefixes.first();
}
-QString KStandardDirs::localxdgconfdir() const
+TQString KStandardDirs::localxdgconfdir() const
{
// Return the prefix to use for saving
return d->xdgconf_prefixes.first();
@@ -1660,29 +1660,29 @@ QString KStandardDirs::localxdgconfdir() const
// just to make code more readable without macros
-QString locate( const char *type,
- const QString& filename, const KInstance* inst )
+TQString locate( const char *type,
+ const TQString& filename, const KInstance* inst )
{
return inst->dirs()->findResource(type, filename);
}
-QString locateLocal( const char *type,
- const QString& filename, const KInstance* inst )
+TQString locateLocal( const char *type,
+ const TQString& filename, const KInstance* inst )
{
return locateLocal(type, filename, true, inst);
}
-QString locateLocal( const char *type,
- const QString& filename, bool createDir, const KInstance* inst )
+TQString locateLocal( const char *type,
+ const TQString& filename, bool createDir, const KInstance* inst )
{
// try to find slashes. If there are some, we have to
// create the subdir first
int slash = filename.findRev('/')+1;
if (!slash) // only one filename
- return inst->dirs()->saveLocation(type, QString::null, createDir) + filename;
+ return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename;
// split path from filename
- QString dir = filename.left(slash);
- QString file = filename.mid(slash);
+ TQString dir = filename.left(slash);
+ TQString file = filename.mid(slash);
return inst->dirs()->saveLocation(type, dir, createDir) + file;
}
diff --git a/kdecore/kstandarddirs.h b/kdecore/kstandarddirs.h
index ca9b2870b..ded472d1d 100644
--- a/kdecore/kstandarddirs.h
+++ b/kdecore/kstandarddirs.h
@@ -23,9 +23,9 @@
#ifndef SSK_KSTDDIRS_H
#define SSK_KSTDDIRS_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#include <kglobal.h>
class KConfig;
@@ -144,7 +144,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addPrefix( const QString& dir );
+ void addPrefix( const TQString& dir );
/**
* Adds another search dir to front of the XDG_CONFIG_XXX list
@@ -153,7 +153,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addXdgConfigPrefix( const QString& dir );
+ void addXdgConfigPrefix( const TQString& dir );
/**
* Adds another search dir to front of the XDG_DATA_XXX list
@@ -162,7 +162,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addXdgDataPrefix( const QString& dir );
+ void addXdgDataPrefix( const TQString& dir );
/**
* Adds suffixes for types.
@@ -184,7 +184,7 @@ public:
* @return true if successful, false otherwise.
*/
bool addResourceType( const char *type,
- const QString& relativename );
+ const TQString& relativename );
/**
* Adds absolute path at the end of the search path for
@@ -202,7 +202,7 @@ public:
* @return true if successful, false otherwise.
*/
bool addResourceDir( const char *type,
- const QString& absdir);
+ const TQString& absdir);
/**
* Tries to find a resource in the following order:
@@ -220,10 +220,10 @@ public:
* @param filename A relative filename of the resource.
*
* @return A full path to the filename specified in the second
- * argument, or QString::null if not found.
+ * argument, or TQString::null if not found.
*/
- QString findResource( const char *type,
- const QString& filename ) const;
+ TQString findResource( const char *type,
+ const TQString& filename ) const;
/**
* Checks whether a resource is restricted as part of the KIOSK
@@ -241,7 +241,7 @@ public:
* @since 3.1
*/
bool isRestrictedResource( const char *type,
- const QString& relPath=QString::null ) const;
+ const TQString& relPath=TQString::null ) const;
/**
* Returns a number that identifies this version of the resource.
@@ -256,7 +256,7 @@ public:
* resource.
*/
Q_UINT32 calcResourceHash( const char *type,
- const QString& filename, bool deep) const;
+ const TQString& filename, bool deep) const;
/**
* Tries to find all directories whose names consist of the
@@ -274,8 +274,8 @@ public:
* @return A list of matching directories, or an empty
* list if the resource specified is not found.
*/
- QStringList findDirs( const char *type,
- const QString& reldir ) const;
+ TQStringList findDirs( const char *type,
+ const TQString& reldir ) const;
/**
* Tries to find the directory the file is in.
@@ -293,12 +293,12 @@ public:
* @param type The type of the wanted resource
* @param filename A relative filename of the resource.
* @return The directory where the file specified in the second
- * argument is located, or QString::null if the type
+ * argument is located, or TQString::null if the type
* of resource specified is unknown or the resource
* cannot be found.
*/
- QString findResourceDir( const char *type,
- const QString& filename) const;
+ TQString findResourceDir( const char *type,
+ const TQString& filename) const;
/**
@@ -310,7 +310,7 @@ public:
* @param type The type of resource to locate directories for.
* @param filter Only accept filenames that fit to filter. The filter
* may consist of an optional directory and a QRegExp
- * wildcard expression. E.g. "images\*.jpg". Use QString::null
+ * wildcard expression. E.g. "images\*.jpg". Use TQString::null
* if you do not want a filter.
* @param recursive Specifies if the function should decend
* into subdirectories.
@@ -320,8 +320,8 @@ public:
* @return List of all the files whose filename matches the
* specified filter.
*/
- QStringList findAllResources( const char *type,
- const QString& filter = QString::null,
+ TQStringList findAllResources( const char *type,
+ const TQString& filter = TQString::null,
bool recursive = false,
bool unique = false) const;
@@ -335,7 +335,7 @@ public:
* @param type The type of resource to locate directories for.
* @param filter Only accept filenames that fit to filter. The filter
* may consist of an optional directory and a QRegExp
- * wildcard expression. E.g. "images\*.jpg". Use QString::null
+ * wildcard expression. E.g. "images\*.jpg". Use TQString::null
* if you do not want a filter.
* @param recursive Specifies if the function should decend
* into subdirectories.
@@ -347,22 +347,22 @@ public:
* @return List of all the files whose filename matches the
* specified filter.
*/
- QStringList findAllResources( const char *type,
- const QString& filter,
+ TQStringList findAllResources( const char *type,
+ const TQString& filter,
bool recursive,
bool unique,
- QStringList &relPaths) const;
+ TQStringList &relPaths) const;
/**
- * Returns a QStringList list of pathnames in the system path.
+ * Returns a TQStringList list of pathnames in the system path.
*
* @param pstr The path which will be searched. If this is
* null (default), the $PATH environment variable will
* be searched.
*
- * @return a QStringList list of pathnames in the system path.
+ * @return a TQStringList list of pathnames in the system path.
*/
- static QStringList systemPaths( const QString& pstr=QString::null );
+ static TQStringList systemPaths( const TQString& pstr=TQString::null );
/**
* Finds the executable in the system path.
@@ -378,11 +378,11 @@ public:
* even if its executable bit is not set.
*
* @return The path of the executable. If it was not found,
- * it will return QString::null.
+ * it will return TQString::null.
* @see findAllExe()
*/
- static QString findExe( const QString& appname,
- const QString& pathstr=QString::null,
+ static TQString findExe( const TQString& appname,
+ const TQString& pathstr=TQString::null,
bool ignoreExecBit=false );
/**
@@ -403,8 +403,8 @@ public:
*
* @see findExe()
*/
- static int findAllExe( QStringList& list, const QString& appname,
- const QString& pathstr=QString::null,
+ static int findAllExe( TQStringList& list, const TQString& appname,
+ const TQString& pathstr=TQString::null,
bool ignoreExecBit=false );
/**
@@ -440,7 +440,7 @@ public:
* Note, that the directories are assured to exist beside the save
* location, which may not exist, but is returned anyway.
*/
- QStringList resourceDirs(const char *type) const;
+ TQStringList resourceDirs(const char *type) const;
/**
* This function will return a list of all the types that KStandardDirs
@@ -448,7 +448,7 @@ public:
*
* @return All types that KDE supports
*/
- QStringList allTypes() const;
+ TQStringList allTypes() const;
/**
* Finds a location to save files into for the given type
@@ -465,10 +465,10 @@ public:
* needed (including those given by @p suffix).
*
* @return A path where resources of the specified type should be
- * saved, or QString::null if the resource type is unknown.
+ * saved, or TQString::null if the resource type is unknown.
*/
- QString saveLocation(const char *type,
- const QString& suffix = QString::null,
+ TQString saveLocation(const char *type,
+ const TQString& suffix = TQString::null,
bool create = true) const;
/**
@@ -486,7 +486,7 @@ public:
* will find @p absPath. If no such relative path exists, absPath
* will be returned unchanged.
*/
- QString relativeLocation(const char *type, const QString &absPath);
+ TQString relativeLocation(const char *type, const TQString &absPath);
/**
* Recursively creates still-missing directories in the given path.
@@ -498,7 +498,7 @@ public:
* @param mode Directory permissions.
* @return true if successful, false otherwise
*/
- static bool makeDir(const QString& dir, int mode = 0755);
+ static bool makeDir(const TQString& dir, int mode = 0755);
/**
* This returns a default relative path for the standard KDE
@@ -527,22 +527,22 @@ public:
* @see locate()
* @see locateLocal()
*/
- static QString kde_default(const char *type);
+ static TQString kde_default(const char *type);
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_prefixes();
+ TQString kfsstnd_prefixes();
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_xdg_conf_prefixes();
+ TQString kfsstnd_xdg_conf_prefixes();
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_xdg_data_prefixes();
+ TQString kfsstnd_xdg_data_prefixes();
/**
* Returns the toplevel directory in which KStandardDirs
@@ -550,40 +550,40 @@ public:
* Don't use this function if you can use locateLocal
* @return the toplevel directory
*/
- QString localkdedir() const;
+ TQString localkdedir() const;
/**
* @internal
* Returns the default toplevel directory where KDE is installed.
*/
- static QString kfsstnd_defaultprefix();
+ static TQString kfsstnd_defaultprefix();
/**
* @internal
* Returns the default bin directory in which KDE executables are stored.
*/
- static QString kfsstnd_defaultbindir();
+ static TQString kfsstnd_defaultbindir();
/**
* @return $XDG_DATA_HOME
* See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
*/
- QString localxdgdatadir() const;
+ TQString localxdgdatadir() const;
/**
* @return $XDG_CONFIG_HOME
* See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
*/
- QString localxdgconfdir() const;
+ TQString localxdgconfdir() const;
/**
* Checks for existence and accessability of a file or directory.
- * Faster than creating a QFileInfo first.
+ * Faster than creating a TQFileInfo first.
* @param fullPath the path to check. IMPORTANT: must end with a slash if expected to be a directory
* (and no slash for a file, obviously).
* @return true if the directory exists
*/
- static bool exists(const QString &fullPath);
+ static bool exists(const TQString &fullPath);
/**
* Expands all symbolic links and resolves references to
@@ -593,7 +593,7 @@ public:
* or '/../' components.
* @since 3.1
*/
- static QString realPath(const QString &dirname);
+ static TQString realPath(const TQString &dirname);
/**
* Expands all symbolic links and resolves references to
@@ -603,18 +603,18 @@ public:
* or '/../' components.
* @since 3.4
*/
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
private:
- QStringList prefixes;
+ TQStringList prefixes;
// Directory dictionaries
- QDict<QStringList> absolutes;
- QDict<QStringList> relatives;
+ TQDict<TQStringList> absolutes;
+ TQDict<TQStringList> relatives;
- mutable QDict<QStringList> dircache;
- mutable QDict<QString> savelocations;
+ mutable TQDict<TQStringList> dircache;
+ mutable TQDict<TQString> savelocations;
// Disallow assignment and copy-construction
KStandardDirs( const KStandardDirs& );
@@ -626,22 +626,22 @@ public:
KStandardDirsPrivate *d;
void checkConfig() const;
- void applyDataRestrictions(const QString &) const;
+ void applyDataRestrictions(const TQString &) const;
void createSpecialResource(const char*);
// Like their public counter parts but with an extra priority argument
// If priority is true, the directory is added directly after
// $KDEHOME/$XDG_DATA_HOME/$XDG_CONFIG_HOME
- void addPrefix( const QString& dir, bool priority );
- void addXdgConfigPrefix( const QString& dir, bool priority );
- void addXdgDataPrefix( const QString& dir, bool priority );
+ void addPrefix( const TQString& dir, bool priority );
+ void addXdgConfigPrefix( const TQString& dir, bool priority );
+ void addXdgDataPrefix( const TQString& dir, bool priority );
// If priority is true, the directory is added before any other,
// otherwise after
bool addResourceType( const char *type,
- const QString& relativename, bool priority );
+ const TQString& relativename, bool priority );
bool addResourceDir( const char *type,
- const QString& absdir, bool priority);
+ const TQString& absdir, bool priority);
};
/**
@@ -700,7 +700,7 @@ public:
* This function is just for convenience. It simply calls
*instance->dirs()->\link KStandardDirs::findResource() findResource\endlink(type, filename).
**/
-KDECORE_EXPORT QString locate( const char *type, const QString& filename, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
/*!
* \relates KStandardDirs
@@ -711,7 +711,7 @@ KDECORE_EXPORT QString locate( const char *type, const QString& filename, const
* specific file, filename must have a trailing slash.
*
**/
-KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
/*!
* \relates KStandardDirs
@@ -722,7 +722,7 @@ KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, c
* filename must have a trailing slash.
*
**/
-KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, bool createDir, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const KInstance* instance = KGlobal::instance() );
/*! @} */
diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp
index 93107c128..40f06127e 100644
--- a/kdecore/kstartupinfo.cpp
+++ b/kdecore/kstartupinfo.cpp
@@ -30,17 +30,17 @@ DEALINGS IN THE SOFTWARE.
#warning Extra KStartupInfo debug messages enabled.
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include "config.h"
#ifdef Q_WS_X11
//#ifdef Q_WS_X11 // FIXME(E): Re-implement in a less X11 specific way
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-// need to resolve INT32(qglobal.h)<>INT32(Xlibint.h) conflict
+// need to resolve INT32(tqglobal.h)<>INT32(Xlibint.h) conflict
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
@@ -50,7 +50,7 @@ DEALINGS IN THE SOFTWARE.
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#ifdef Q_WS_X11
#include <netwm.h>
#endif
@@ -71,12 +71,12 @@ static const char* const NET_STARTUP_ENV = "DESKTOP_STARTUP_ID";
static bool auto_app_started_sending = true;
-static long get_num( const QString& item_P );
-static unsigned long get_unum( const QString& item_P );
-static QString get_str( const QString& item_P );
-static QCString get_cstr( const QString& item_P );
-static QStringList get_fields( const QString& txt_P );
-static QString escape_str( const QString& str_P );
+static long get_num( const TQString& item_P );
+static unsigned long get_unum( const TQString& item_P );
+static TQString get_str( const TQString& item_P );
+static TQCString get_cstr( const TQString& item_P );
+static TQStringList get_fields( const TQString& txt_P );
+static TQString escape_str( const TQString& str_P );
static Atom utf8_string_atom = None;
@@ -85,7 +85,7 @@ class KStartupInfo::Data
{
public:
Data() : KStartupInfoData(), age(0) {} // just because it's in a QMap
- Data( const QString& txt_P )
+ Data( const TQString& txt_P )
: KStartupInfoData( txt_P ), age( 0 ) {}
unsigned int age;
};
@@ -93,16 +93,16 @@ class KStartupInfo::Data
struct KStartupInfoPrivate
{
public:
- QMap< KStartupInfoId, KStartupInfo::Data > startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > startups;
// contains silenced ASN's only if !AnnounceSilencedChanges
- QMap< KStartupInfoId, KStartupInfo::Data > silent_startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > silent_startups;
// contains ASN's that had change: but no new: yet
- QMap< KStartupInfoId, KStartupInfo::Data > uninited_startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > uninited_startups;
#ifdef Q_WS_X11
KWinModule* wm_module;
KXMessages msgs;
#endif
- QTimer* cleanup;
+ TQTimer* cleanup;
int flags;
KStartupInfoPrivate( int flags_P )
:
@@ -112,15 +112,15 @@ struct KStartupInfoPrivate
flags( flags_P ) {}
};
-KStartupInfo::KStartupInfo( int flags_P, QObject* parent_P, const char* name_P )
- : QObject( parent_P, name_P ),
+KStartupInfo::KStartupInfo( int flags_P, TQObject* parent_P, const char* name_P )
+ : TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( flags_P );
}
-KStartupInfo::KStartupInfo( bool clean_on_cantdetect_P, QObject* parent_P, const char* name_P )
- : QObject( parent_P, name_P ),
+KStartupInfo::KStartupInfo( bool clean_on_cantdetect_P, TQObject* parent_P, const char* name_P )
+ : TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( clean_on_cantdetect_P ? CleanOnCantDetect : 0 );
@@ -139,15 +139,15 @@ void KStartupInfo::init( int flags_P )
if( !( d->flags & DisableKWinModule ))
{
d->wm_module = new KWinModule( this );
- connect( d->wm_module, SIGNAL( windowAdded( WId )), SLOT( slot_window_added( WId )));
- connect( d->wm_module, SIGNAL( systemTrayWindowAdded( WId )), SLOT( slot_window_added( WId )));
+ connect( d->wm_module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( slot_window_added( WId )));
+ connect( d->wm_module, TQT_SIGNAL( systemTrayWindowAdded( WId )), TQT_SLOT( slot_window_added( WId )));
}
else
d->wm_module = NULL;
- connect( &d->msgs, SIGNAL( gotMessage( const QString& )), SLOT( got_message( const QString& )));
+ connect( &d->msgs, TQT_SIGNAL( gotMessage( const TQString& )), TQT_SLOT( got_message( const TQString& )));
#endif
- d->cleanup = new QTimer( this, "cleanup" );
- connect( d->cleanup, SIGNAL( timeout()), SLOT( startups_cleanup()));
+ d->cleanup = new TQTimer( this, "cleanup" );
+ connect( d->cleanup, TQT_SIGNAL( timeout()), TQT_SLOT( startups_cleanup()));
}
KStartupInfo::~KStartupInfo()
@@ -155,11 +155,11 @@ KStartupInfo::~KStartupInfo()
delete d;
}
-void KStartupInfo::got_message( const QString& msg_P )
+void KStartupInfo::got_message( const TQString& msg_P )
{
// TODO do something with SCREEN= ?
kdDebug( 172 ) << "got:" << msg_P << endl;
- QString msg = msg_P.stripWhiteSpace();
+ TQString msg = msg_P.stripWhiteSpace();
if( msg.startsWith( "new:" )) // must match length below
got_startup_info( msg.mid( 4 ), false );
else if( msg.startsWith( "change:" )) // must match length below
@@ -181,7 +181,7 @@ class DelayedWindowEvent
{
public:
DelayedWindowEvent( WId w_P )
- : QCustomEvent( QEvent::User + 15 ), w( w_P ) {}
+ : TQCustomEvent( TQEvent::User + 15 ), w( w_P ) {}
Window w;
};
}
@@ -191,12 +191,12 @@ void KStartupInfo::slot_window_added( WId w_P )
kapp->postEvent( this, new DelayedWindowEvent( w_P ));
}
-void KStartupInfo::customEvent( QCustomEvent* e_P )
+void KStartupInfo::customEvent( TQCustomEvent* e_P )
{
- if( e_P->type() == QEvent::User + 15 )
+ if( e_P->type() == TQEvent::User + 15 )
window_added( static_cast< DelayedWindowEvent* >( e_P )->w );
else
- QObject::customEvent( e_P );
+ TQObject::customEvent( e_P );
}
void KStartupInfo::window_added( WId w_P )
@@ -218,7 +218,7 @@ void KStartupInfo::window_added( WId w_P )
}
}
-void KStartupInfo::got_startup_info( const QString& msg_P, bool update_P )
+void KStartupInfo::got_startup_info( const TQString& msg_P, bool update_P )
{
KStartupInfoId id( msg_P );
if( id.none())
@@ -298,7 +298,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
d->cleanup->start( 1000 ); // 1 sec
}
-void KStartupInfo::got_remove_startup_info( const QString& msg_P )
+void KStartupInfo::got_remove_startup_info( const TQString& msg_P )
{
KStartupInfoId id( msg_P );
KStartupInfoData data( msg_P );
@@ -340,7 +340,7 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoData& data_P )
{ // first find the matching info
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -368,7 +368,7 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P,
data = &d->uninited_startups[ id_P ];
else
return;
- for( QValueList< pid_t >::ConstIterator it2 = data_P.pids().begin();
+ for( TQValueList< pid_t >::ConstIterator it2 = data_P.pids().begin();
it2 != data_P.pids().end();
++it2 )
data->remove_pid( *it2 ); // remove all pids from the info
@@ -381,7 +381,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::fromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, qt_xscreen());
kdDebug( 172 ) << "sending " << msg << endl;
@@ -394,7 +394,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::fromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P ));
#ifdef KSTARTUPINFO_ALL_DEBUG
@@ -403,20 +403,20 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-QString KStartupInfo::check_required_startup_fields( const QString& msg, const KStartupInfoData& data_P,
+TQString KStartupInfo::check_required_startup_fields( const TQString& msg, const KStartupInfoData& data_P,
int screen )
{
- QString ret = msg;
+ TQString ret = msg;
if( data_P.name().isEmpty())
{
// kdWarning( 172 ) << "NAME not specified in initial startup message" << endl;
- QString name = data_P.bin();
+ TQString name = data_P.bin();
if( name.isEmpty())
name = "UNKNOWN";
- ret += QString( " NAME=\"%1\"" ).arg( escape_str( name ));
+ ret += TQString( " NAME=\"%1\"" ).arg( escape_str( name ));
}
if( data_P.screen() == -1 ) // add automatically if needed
- ret += QString( " SCREEN=%1" ).arg( screen );
+ ret += TQString( " SCREEN=%1" ).arg( screen );
return ret;
}
@@ -425,7 +425,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::fromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -437,7 +437,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::fromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -450,7 +450,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
return true;
@@ -460,7 +460,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
#endif
@@ -472,7 +472,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::fromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -484,7 +484,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
{
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
- QString msg = QString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::fromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -500,7 +500,7 @@ void KStartupInfo::appStarted()
appStarted( KStartupInfo::currentStartupIdEnv().id());
}
-void KStartupInfo::appStarted( const QCString& startup_id )
+void KStartupInfo::appStarted( const TQCString& startup_id )
{
KStartupInfoId id;
id.initId( startup_id );
@@ -543,7 +543,7 @@ void KStartupInfo::handleAutoAppStartedSending()
appStarted();
}
-void KStartupInfo::setNewStartupId( QWidget* window, const QCString& startup_id )
+void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_id )
{
bool activate = true;
kapp->setStartupId( startup_id );
@@ -607,7 +607,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
// - Yes - test for pid match
// - No - test for WM_CLASS match
kdDebug( 172 ) << "check_startup" << endl;
- QCString id = windowStartupId( w_P );
+ TQCString id = windowStartupId( w_P );
if( !id.isNull())
{
if( id.isEmpty() || id == "0" ) // means ignore this window
@@ -623,7 +623,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
pid_t pid = info.pid();
if( pid > 0 )
{
- QCString hostname = get_window_hostname( w_P );
+ TQCString hostname = get_window_hostname( w_P );
if( !hostname.isEmpty()
&& find_pid( pid, hostname, id_O, data_O ))
return Match;
@@ -632,8 +632,8 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
XClassHint hint;
if( XGetClassHint( qt_xdisplay(), w_P, &hint ) != 0 )
{ // We managed to read the class hint
- QCString res_name = hint.res_name;
- QCString res_class = hint.res_class;
+ TQCString res_name = hint.res_name;
+ TQCString res_class = hint.res_class;
XFree( hint.res_name );
XFree( hint.res_class );
if( find_wclass( res_name, res_class, id_O, data_O ))
@@ -661,7 +661,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
return CantDetect;
}
-bool KStartupInfo::find_id( const QCString& id_P, KStartupInfoId* id_O,
+bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
KStartupInfoData* data_O )
{
if( d == NULL )
@@ -681,13 +681,13 @@ bool KStartupInfo::find_id( const QCString& id_P, KStartupInfoId* id_O,
return false;
}
-bool KStartupInfo::find_pid( pid_t pid_P, const QCString& hostname_P,
+bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
KStartupInfoId* id_O, KStartupInfoData* data_O )
{
if( d == NULL )
return false;
kdDebug( 172 ) << "find_pid:" << pid_P << endl;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -706,7 +706,7 @@ bool KStartupInfo::find_pid( pid_t pid_P, const QCString& hostname_P,
return false;
}
-bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
+bool KStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
KStartupInfoId* id_O, KStartupInfoData* data_O )
{
if( d == NULL )
@@ -714,11 +714,11 @@ bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
res_name = res_name.lower();
res_class = res_class.lower();
kdDebug( 172 ) << "find_wclass:" << res_name << ":" << res_class << endl;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
- const QCString wmclass = ( *it ).findWMClass();
+ const TQCString wmclass = ( *it ).findWMClass();
if( wmclass.lower() == res_name || wmclass.lower() == res_class )
{ // Found it !
if( id_O != NULL )
@@ -737,9 +737,9 @@ bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
#ifdef Q_WS_X11
static Atom net_startup_atom = None;
-static QCString read_startup_id_property( WId w_P )
+static TQCString read_startup_id_property( WId w_P )
{
- QCString ret;
+ TQCString ret;
unsigned char *name_ret;
Atom type_ret;
int format_ret;
@@ -758,14 +758,14 @@ static QCString read_startup_id_property( WId w_P )
#endif
-QCString KStartupInfo::windowStartupId( WId w_P )
+TQCString KStartupInfo::windowStartupId( WId w_P )
{
#ifdef Q_WS_X11
if( net_startup_atom == None )
net_startup_atom = XInternAtom( qt_xdisplay(), NET_STARTUP_WINDOW, False );
if( utf8_string_atom == None )
utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False );
- QCString ret = read_startup_id_property( w_P );
+ TQCString ret = read_startup_id_property( w_P );
if( ret.isEmpty())
{ // retry with window group leader, as the spec says
XWMHints* hints = XGetWMHints( qt_xdisplay(), w_P );
@@ -776,11 +776,11 @@ QCString KStartupInfo::windowStartupId( WId w_P )
}
return ret;
#else
- return QCString();
+ return TQCString();
#endif
}
-void KStartupInfo::setWindowStartupId( WId w_P, const QCString& id_P )
+void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
{
#ifdef Q_WS_X11
if( id_P.isNull())
@@ -794,7 +794,7 @@ void KStartupInfo::setWindowStartupId( WId w_P, const QCString& id_P )
#endif
}
-QCString KStartupInfo::get_window_hostname( WId w_P )
+TQCString KStartupInfo::get_window_hostname( WId w_P )
{
#ifdef Q_WS_X11
XTextProperty tp;
@@ -805,7 +805,7 @@ QCString KStartupInfo::get_window_hostname( WId w_P )
{
if( cnt == 1 )
{
- QCString hostname = hh[ 0 ];
+ TQCString hostname = hh[ 0 ];
XFreeStringList( hh );
return hostname;
}
@@ -813,14 +813,14 @@ QCString KStartupInfo::get_window_hostname( WId w_P )
}
#endif
// no hostname
- return QCString();
+ return TQCString();
}
void KStartupInfo::setTimeout( unsigned int secs_P )
{
timeout = secs_P;
// schedule removing entries that are older than the new timeout
- QTimer::singleShot( 0, this, SLOT( startups_cleanup_no_age()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( startups_cleanup_no_age()));
}
void KStartupInfo::startups_cleanup_no_age()
@@ -845,7 +845,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
{
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -864,7 +864,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( QMap< KStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
it != d->silent_startups.end();
)
{
@@ -883,7 +883,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( QMap< KStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
it != d->uninited_startups.end();
)
{
@@ -908,7 +908,7 @@ void KStartupInfo::clean_all_noncompliant()
{
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -924,7 +924,7 @@ void KStartupInfo::clean_all_noncompliant()
}
}
-QCString KStartupInfo::createNewStartupId()
+TQCString KStartupInfo::createNewStartupId()
{
// Assign a unique id, use hostname+time+pid, that should be 200% unique.
// Also append the user timestamp (for focus stealing prevention).
@@ -939,7 +939,7 @@ QCString KStartupInfo::createNewStartupId()
#else
unsigned long qt_x_user_time = 0;
#endif
- QCString id = QString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
+ TQCString id = TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
.arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time ).utf8();
kdDebug( 172 ) << "creating: " << id << ":" << qAppName() << endl;
return id;
@@ -949,26 +949,26 @@ QCString KStartupInfo::createNewStartupId()
struct KStartupInfoIdPrivate
{
KStartupInfoIdPrivate() : id( "" ) {}
- QCString id; // id
+ TQCString id; // id
};
-const QCString& KStartupInfoId::id() const
+const TQCString& KStartupInfoId::id() const
{
return d->id;
}
-QString KStartupInfoId::to_text() const
+TQString KStartupInfoId::to_text() const
{
- return QString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
+ return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
}
-KStartupInfoId::KStartupInfoId( const QString& txt_P )
+KStartupInfoId::KStartupInfoId( const TQString& txt_P )
{
d = new KStartupInfoIdPrivate;
- QStringList items = get_fields( txt_P );
- const QString id_str = QString::fromLatin1( "ID=" );
- for( QStringList::Iterator it = items.begin();
+ TQStringList items = get_fields( txt_P );
+ const TQString id_str = TQString::fromLatin1( "ID=" );
+ for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
{
@@ -977,7 +977,7 @@ KStartupInfoId::KStartupInfoId( const QString& txt_P )
}
}
-void KStartupInfoId::initId( const QCString& id_P )
+void KStartupInfoId::initId( const TQCString& id_P )
{
if( !id_P.isEmpty())
{
@@ -1110,14 +1110,14 @@ struct KStartupInfoDataPrivate
{
KStartupInfoDataPrivate() : desktop( 0 ), wmclass( "" ), hostname( "" ),
silent( KStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
- QString bin;
- QString name;
- QString description;
- QString icon;
+ TQString bin;
+ TQString name;
+ TQString description;
+ TQString icon;
int desktop;
- QValueList< pid_t > pids;
- QCString wmclass;
- QCString hostname;
+ TQValueList< pid_t > pids;
+ TQCString wmclass;
+ TQCString hostname;
KStartupInfoData::TriState silent;
unsigned long timestamp;
int screen;
@@ -1125,59 +1125,59 @@ struct KStartupInfoDataPrivate
WId launched_by;
};
-QString KStartupInfoData::to_text() const
+TQString KStartupInfoData::to_text() const
{
- QString ret = "";
+ TQString ret = "";
if( !d->bin.isEmpty())
- ret += QString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
+ ret += TQString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
if( !d->name.isEmpty())
- ret += QString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
+ ret += TQString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
if( !d->description.isEmpty())
- ret += QString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
+ ret += TQString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
if( !d->icon.isEmpty())
- ret += QString::fromLatin1( " ICON=%1" ).arg( d->icon );
+ ret += TQString::fromLatin1( " ICON=%1" ).arg( d->icon );
if( d->desktop != 0 )
- ret += QString::fromLatin1( " DESKTOP=%1" )
+ ret += TQString::fromLatin1( " DESKTOP=%1" )
.arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0
if( !d->wmclass.isEmpty())
- ret += QString::fromLatin1( " WMCLASS=\"%1\"" ).arg( d->wmclass );
+ ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( d->wmclass );
if( !d->hostname.isEmpty())
- ret += QString::fromLatin1( " HOSTNAME=%1" ).arg( d->hostname );
- for( QValueList< pid_t >::ConstIterator it = d->pids.begin();
+ ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( d->hostname );
+ for( TQValueList< pid_t >::ConstIterator it = d->pids.begin();
it != d->pids.end();
++it )
- ret += QString::fromLatin1( " PID=%1" ).arg( *it );
+ ret += TQString::fromLatin1( " PID=%1" ).arg( *it );
if( d->silent != Unknown )
- ret += QString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
+ ret += TQString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
if( d->timestamp != -1U )
- ret += QString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
+ ret += TQString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
if( d->screen != -1 )
- ret += QString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
+ ret += TQString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
if( d->xinerama != -1 )
- ret += QString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
+ ret += TQString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
if( d->launched_by != 0 )
- ret += QString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
+ ret += TQString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
return ret;
}
-KStartupInfoData::KStartupInfoData( const QString& txt_P )
+KStartupInfoData::KStartupInfoData( const TQString& txt_P )
{
d = new KStartupInfoDataPrivate;
- QStringList items = get_fields( txt_P );
- const QString bin_str = QString::fromLatin1( "BIN=" );
- const QString name_str = QString::fromLatin1( "NAME=" );
- const QString description_str = QString::fromLatin1( "DESCRIPTION=" );
- const QString icon_str = QString::fromLatin1( "ICON=" );
- const QString desktop_str = QString::fromLatin1( "DESKTOP=" );
- const QString wmclass_str = QString::fromLatin1( "WMCLASS=" );
- const QString hostname_str = QString::fromLatin1( "HOSTNAME=" ); // SELI nonstd
- const QString pid_str = QString::fromLatin1( "PID=" ); // SELI nonstd
- const QString silent_str = QString::fromLatin1( "SILENT=" );
- const QString timestamp_str = QString::fromLatin1( "TIMESTAMP=" );
- const QString screen_str = QString::fromLatin1( "SCREEN=" );
- const QString xinerama_str = QString::fromLatin1( "XINERAMA=" );
- const QString launched_by_str = QString::fromLatin1( "LAUNCHED_BY=" );
- for( QStringList::Iterator it = items.begin();
+ TQStringList items = get_fields( txt_P );
+ const TQString bin_str = TQString::fromLatin1( "BIN=" );
+ const TQString name_str = TQString::fromLatin1( "NAME=" );
+ const TQString description_str = TQString::fromLatin1( "DESCRIPTION=" );
+ const TQString icon_str = TQString::fromLatin1( "ICON=" );
+ const TQString desktop_str = TQString::fromLatin1( "DESKTOP=" );
+ const TQString wmclass_str = TQString::fromLatin1( "WMCLASS=" );
+ const TQString hostname_str = TQString::fromLatin1( "HOSTNAME=" ); // SELI nonstd
+ const TQString pid_str = TQString::fromLatin1( "PID=" ); // SELI nonstd
+ const TQString silent_str = TQString::fromLatin1( "SILENT=" );
+ const TQString timestamp_str = TQString::fromLatin1( "TIMESTAMP=" );
+ const TQString screen_str = TQString::fromLatin1( "SCREEN=" );
+ const TQString xinerama_str = TQString::fromLatin1( "XINERAMA=" );
+ const TQString launched_by_str = TQString::fromLatin1( "LAUNCHED_BY=" );
+ for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
{
@@ -1244,7 +1244,7 @@ void KStartupInfoData::update( const KStartupInfoData& data_P )
d->wmclass = data_P.d->wmclass;
if( !data_P.d->hostname.isEmpty())
d->hostname = data_P.d->hostname;
- for( QValueList< pid_t >::ConstIterator it = data_P.d->pids.begin();
+ for( TQValueList< pid_t >::ConstIterator it = data_P.d->pids.begin();
it != data_P.d->pids.end();
++it )
addPid( *it );
@@ -1270,63 +1270,63 @@ KStartupInfoData::~KStartupInfoData()
delete d;
}
-void KStartupInfoData::setBin( const QString& bin_P )
+void KStartupInfoData::setBin( const TQString& bin_P )
{
d->bin = bin_P;
}
-const QString& KStartupInfoData::bin() const
+const TQString& KStartupInfoData::bin() const
{
return d->bin;
}
-void KStartupInfoData::setName( const QString& name_P )
+void KStartupInfoData::setName( const TQString& name_P )
{
d->name = name_P;
}
-const QString& KStartupInfoData::name() const
+const TQString& KStartupInfoData::name() const
{
return d->name;
}
-const QString& KStartupInfoData::findName() const
+const TQString& KStartupInfoData::findName() const
{
if( !name().isEmpty())
return name();
return bin();
}
-void KStartupInfoData::setDescription( const QString& desc_P )
+void KStartupInfoData::setDescription( const TQString& desc_P )
{
d->description = desc_P;
}
-const QString& KStartupInfoData::description() const
+const TQString& KStartupInfoData::description() const
{
return d->description;
}
-const QString& KStartupInfoData::findDescription() const
+const TQString& KStartupInfoData::findDescription() const
{
if( !description().isEmpty())
return description();
return name();
}
-void KStartupInfoData::setIcon( const QString& icon_P )
+void KStartupInfoData::setIcon( const TQString& icon_P )
{
d->icon = icon_P;
}
-const QString& KStartupInfoData::findIcon() const
+const TQString& KStartupInfoData::findIcon() const
{
if( !icon().isEmpty())
return icon();
return bin();
}
-const QString& KStartupInfoData::icon() const
+const TQString& KStartupInfoData::icon() const
{
return d->icon;
}
@@ -1341,24 +1341,24 @@ int KStartupInfoData::desktop() const
return d->desktop;
}
-void KStartupInfoData::setWMClass( const QCString& wmclass_P )
+void KStartupInfoData::setWMClass( const TQCString& wmclass_P )
{
d->wmclass = wmclass_P;
}
-const QCString KStartupInfoData::findWMClass() const
+const TQCString KStartupInfoData::findWMClass() const
{
if( !WMClass().isEmpty() && WMClass() != "0" )
return WMClass();
return bin().utf8();
}
-const QCString& KStartupInfoData::WMClass() const
+const TQCString& KStartupInfoData::WMClass() const
{
return d->wmclass;
}
-void KStartupInfoData::setHostname( const QCString& hostname_P )
+void KStartupInfoData::setHostname( const TQCString& hostname_P )
{
if( !hostname_P.isNull())
d->hostname = hostname_P;
@@ -1372,7 +1372,7 @@ void KStartupInfoData::setHostname( const QCString& hostname_P )
}
}
-const QCString& KStartupInfoData::hostname() const
+const TQCString& KStartupInfoData::hostname() const
{
return d->hostname;
}
@@ -1388,7 +1388,7 @@ void KStartupInfoData::remove_pid( pid_t pid_P )
d->pids.remove( pid_P );
}
-const QValueList< pid_t >& KStartupInfoData::pids() const
+const TQValueList< pid_t >& KStartupInfoData::pids() const
{
return d->pids;
}
@@ -1449,45 +1449,45 @@ WId KStartupInfoData::launchedBy() const
}
static
-long get_num( const QString& item_P )
+long get_num( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
return item_P.mid( pos + 1 ).toLong();
}
static
-unsigned long get_unum( const QString& item_P )
+unsigned long get_unum( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
return item_P.mid( pos + 1 ).toULong();
}
static
-QString get_str( const QString& item_P )
+TQString get_str( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == '\"' )
{
int pos2 = item_P.left( pos + 2 ).find( '\"' );
if( pos2 < 0 )
- return QString::null; // 01234
+ return TQString::null; // 01234
return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C"
}
return item_P.mid( pos + 1 );
}
static
-QCString get_cstr( const QString& item_P )
+TQCString get_cstr( const TQString& item_P )
{
return get_str( item_P ).utf8();
}
static
-QStringList get_fields( const QString& txt_P )
+TQStringList get_fields( const TQString& txt_P )
{
- QString txt = txt_P.simplifyWhiteSpace();
- QStringList ret;
- QString item = "";
+ TQString txt = txt_P.simplifyWhiteSpace();
+ TQStringList ret;
+ TQString item = "";
bool in = false;
bool escape = false;
for( unsigned int pos = 0;
@@ -1515,9 +1515,9 @@ QStringList get_fields( const QString& txt_P )
return ret;
}
-static QString escape_str( const QString& str_P )
+static TQString escape_str( const TQString& str_P )
{
- QString ret = "";
+ TQString ret = "";
for( unsigned int pos = 0;
pos < str_P.length();
++pos )
diff --git a/kdecore/kstartupinfo.h b/kdecore/kstartupinfo.h
index ca8b21c66..e35bdba56 100644
--- a/kdecore/kstartupinfo.h
+++ b/kdecore/kstartupinfo.h
@@ -26,13 +26,13 @@ DEALINGS IN THE SOFTWARE.
#define __KSTARTUPINFO_H
#include <sys/types.h>
-#include <qobject.h>
+#include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way
-#include <qcstring.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KStartupInfoId;
@@ -89,7 +89,7 @@ class KDECORE_EXPORT KStartupInfo
* with id startup_id should end.
* @since 3.2
*/
- static void appStarted( const QCString& startup_id );
+ static void appStarted( const TQCString& startup_id );
/**
* Use this function if the application got a request with startup
@@ -100,7 +100,7 @@ class KDECORE_EXPORT KStartupInfo
* needed only when a window is reused.
* @since 3.2
*/
- static void setNewStartupId( QWidget* window, const QCString& startup_id );
+ static void setNewStartupId( TQWidget* window, const TQCString& startup_id );
/**
* If your application shows temporarily some window during its startup,
@@ -118,7 +118,7 @@ class KDECORE_EXPORT KStartupInfo
* user timestamp.
* @since 3.3
*/
- static QCString createNewStartupId();
+ static TQCString createNewStartupId();
/**
*
*/
@@ -142,23 +142,23 @@ class KDECORE_EXPORT KStartupInfo
* With this flag, the change is normally announced with gotStartupChange().
*
* @param flags OR-ed combination of flags
- * @param parent the parent of this QObject (can be 0 for no parent)
- * @param name the name of the QObject (can be 0 for no name)
+ * @param parent the parent of this TQObject (can be 0 for no parent)
+ * @param name the name of the TQObject (can be 0 for no name)
*
*/
- KStartupInfo( int flags, QObject* parent = NULL, const char* name = NULL );
+ KStartupInfo( int flags, TQObject* parent = NULL, const char* name = NULL );
/**
* Creates an instance that will receive the startup notifications.
*
* @param clean_on_cantdetect if true, and a new unknown window appears,
* removes all notification for applications that are not compliant
* with the app startup protocol
- * @param parent the parent of this QObject (can be 0 for no parent)
- * @param name the name of the QObject (can be 0 for no name)
+ * @param parent the parent of this TQObject (can be 0 for no parent)
+ * @param name the name of the TQObject (can be 0 for no name)
*
* @obsolete
*/
- KStartupInfo( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 );
+ KStartupInfo( bool clean_on_cantdetect, TQObject* parent = 0, const char* name = 0 );
virtual ~KStartupInfo();
/**
* Sends given notification data about started application
@@ -300,13 +300,13 @@ class KDECORE_EXPORT KStartupInfo
* @param window the id of the window
* @param id the startup notification id
*/
- static void setWindowStartupId( WId window, const QCString& id );
+ static void setWindowStartupId( WId window, const TQCString& id );
/**
* Returns startup notification identification of the given window.
* @param w the id of the window
* @return the startup notification id. Can be null if not found.
*/
- static QCString windowStartupId( WId w );
+ static TQCString windowStartupId( WId w );
/**
* @internal
*/
@@ -340,34 +340,34 @@ class KDECORE_EXPORT KStartupInfo
/**
*
*/
- virtual void customEvent( QCustomEvent* e_P );
+ virtual void customEvent( TQCustomEvent* e_P );
private slots:
void startups_cleanup();
void startups_cleanup_no_age();
- void got_message( const QString& msg );
+ void got_message( const TQString& msg );
void window_added( WId w );
void slot_window_added( WId w );
private:
void init( int flags );
friend class KStartupInfoPrivate;
- void got_startup_info( const QString& msg_P, bool update_only_P );
- void got_remove_startup_info( const QString& msg_P );
+ void got_startup_info( const TQString& msg_P, bool update_only_P );
+ void got_remove_startup_info( const TQString& msg_P );
void new_startup_info_internal( const KStartupInfoId& id_P,
Data& data_P, bool update_only_P );
void remove_startup_info_internal( const KStartupInfoId& id_P );
void remove_startup_pids( const KStartupInfoId& id, const KStartupInfoData& data );
void remove_startup_pids( const KStartupInfoData& data );
startup_t check_startup_internal( WId w, KStartupInfoId* id, KStartupInfoData* data );
- bool find_id( const QCString& id_P, KStartupInfoId* id_O,
+ bool find_id( const TQCString& id_P, KStartupInfoId* id_O,
KStartupInfoData* data_O );
- bool find_pid( pid_t pid_P, const QCString& hostname, KStartupInfoId* id_O,
+ bool find_pid( pid_t pid_P, const TQCString& hostname, KStartupInfoId* id_O,
KStartupInfoData* data_O );
- bool find_wclass( QCString res_name_P, QCString res_class_P,
+ bool find_wclass( TQCString res_name_P, TQCString res_class_P,
KStartupInfoId* id_O, KStartupInfoData* data_O );
- static QCString get_window_hostname( WId w_P );
+ static TQCString get_window_hostname( WId w_P );
void startups_cleanup_internal( bool age_P );
void clean_all_noncompliant();
- static QString check_required_startup_fields( const QString& msg,
+ static TQString check_required_startup_fields( const TQString& msg,
const KStartupInfoData& data, int screen );
bool clean_on_cantdetect_; // KDE4 remove unused
unsigned int timeout;
@@ -412,12 +412,12 @@ class KDECORE_EXPORT KStartupInfoId
* @param id the new identification, "0" for no notification or "" to read
* the environment variable
*/
- void initId( const QCString& id = "" );
+ void initId( const TQCString& id = "" );
/**
* Returns the notification identifier as string.
* @return the identification string for the notification
*/
- const QCString& id() const;
+ const TQCString& id() const;
/**
* Return the user timestamp for the startup notification, or 0 if no timestamp
* is set.
@@ -441,8 +441,8 @@ class KDECORE_EXPORT KStartupInfoId
KStartupInfoId& operator=( const KStartupInfoId& data );
bool operator<( const KStartupInfoId& id ) const;
private:
- KStartupInfoId( const QString& txt );
- QString to_text() const;
+ KStartupInfoId( const TQString& txt );
+ TQString to_text() const;
friend class KStartupInfo;
KStartupInfoIdPrivate* d;
};
@@ -467,66 +467,66 @@ class KDECORE_EXPORT KStartupInfoData
* Sets the binary name of the application ( e.g. 'kcontrol' ).
* @param bin the new binary name of the application
*/
- void setBin( const QString& bin );
+ void setBin( const TQString& bin );
/**
* Returns the binary name of the starting application
* @return the new binary name of the application
*/
- const QString& bin() const;
+ const TQString& bin() const;
/**
* Sets the name for the notification (e.g. 'Control Center')
*/
- void setName( const QString& name );
+ void setName( const TQString& name );
/**
* Returns the name of the startup notification. If it's not available,
* it tries to use other information (binary name).
* @return the name of the startup notification
*/
- const QString& findName() const;
+ const TQString& findName() const;
/**
* Returns the name of the startup notification, or empty if not available.
* @return the name of the startup notification, or an empty string
* if not set.
*/
- const QString& name() const;
+ const TQString& name() const;
/**
* Sets the description for the notification (e.g. 'Launching Control Center').
* I.e. name() describes what is being started, while description() is
* the actual action performed by the starting.
* @since 3.2
*/
- void setDescription( const QString& descr );
+ void setDescription( const TQString& descr );
/**
* Returns the description of the startup notification. If it's not available,
* it returns name().
* @return the description of the startup notification
* @since 3.2
*/
- const QString& findDescription() const;
+ const TQString& findDescription() const;
/**
* Returns the name of the startup notification, or empty if not available.
* @return the name of the startup notificaiton, or an empty string
* if not set.
* @since 3.2
*/
- const QString& description() const;
+ const TQString& description() const;
/**
* Sets the icon for the startup notification ( e.g. 'kcontrol' )
* @param icon the name of the icon
*/
- void setIcon( const QString& icon );
+ void setIcon( const TQString& icon );
/**
* Returns the icon of the startup notification, and if it's not available,
* tries to get it from the binary name.
* @return the name of the startup notification's icon, or the name of
* the binary if not set
*/
- const QString& findIcon() const;
+ const TQString& findIcon() const;
/**
* Returns the icon of the startup notification, or empty if not available.
* @return the name of the icon, or an empty string if not set.
*/
- const QString& icon() const;
+ const TQString& icon() const;
/**
* Sets the desktop for the startup notification ( i.e. the desktop on which
* the starting application should appear ).
@@ -544,20 +544,20 @@ class KDECORE_EXPORT KStartupInfoData
* detected correctly.
* @param wmclass the WM_CLASS value for the startup notification
*/
- void setWMClass( const QCString& wmclass );
+ void setWMClass( const TQCString& wmclass );
/**
* Returns the WM_CLASS value for the startup notification, or binary name if not
* available.
* @return the WM_CLASS value for the startup notification, or the binary name
* if not set
*/
- const QCString findWMClass() const;
+ const TQCString findWMClass() const;
/**
* Returns the WM_CLASS value for the startup notification, or empty if not available.
* @return the WM_CLASS value for the startup notification, or empty
* if not set
*/
- const QCString& WMClass() const;
+ const TQCString& WMClass() const;
/**
* Adds a PID to the list of processes that belong to the startup notification. It
* may be used to increase the chance that the windows created by the starting
@@ -570,7 +570,7 @@ class KDECORE_EXPORT KStartupInfoData
* Returns all PIDs for the startup notification.
* @return the list of all PIDs
*/
- const QValueList< pid_t >& pids() const;
+ const TQValueList< pid_t >& pids() const;
/**
* Checks whether the given @p pid is in the list of PIDs for starup
* notification.
@@ -582,12 +582,12 @@ class KDECORE_EXPORT KStartupInfoData
* it if PIDs are set.
* @param hostname the application's hostname. If it's a null string, the current hostname is used
*/
- void setHostname( const QCString& hostname = QCString());
+ void setHostname( const TQCString& hostname = TQCString());
/**
* Returns the hostname for the startup notification.
* @return the hostname
*/
- const QCString& hostname() const;
+ const TQCString& hostname() const;
/**
*
@@ -679,8 +679,8 @@ class KDECORE_EXPORT KStartupInfoData
~KStartupInfoData();
KStartupInfoData& operator=( const KStartupInfoData& data );
private:
- KStartupInfoData( const QString& txt );
- QString to_text() const;
+ KStartupInfoData( const TQString& txt );
+ TQString to_text() const;
void remove_pid( pid_t pid );
friend class KStartupInfo;
friend class KStartupInfo::Data;
diff --git a/kdecore/kstdaccel.cpp b/kdecore/kstdaccel.cpp
index 262535e45..8e1819735 100644
--- a/kdecore/kstdaccel.cpp
+++ b/kdecore/kstdaccel.cpp
@@ -135,7 +135,7 @@ static void initialize( StdAccel id )
}
if( saver.config()->hasKey( pInfo->psName ) ) {
- QString s = saver.config()->readEntry( pInfo->psName );
+ TQString s = saver.config()->readEntry( pInfo->psName );
if( s != "none" )
pInfo->cut.init( s );
else
@@ -145,30 +145,30 @@ static void initialize( StdAccel id )
pInfo->bInitialized = true;
}
-QString name( StdAccel id )
+TQString name( StdAccel id )
{
KStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
- return QString::null;
+ return TQString::null;
return pInfo->psName;
}
-QString label( StdAccel id )
+TQString label( StdAccel id )
{
KStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
- return QString::null;
+ return TQString::null;
return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName);
}
// TODO: Add psWhatsThis entry to KStdAccelInfo
-QString whatsThis( StdAccel /*id*/ )
+TQString whatsThis( StdAccel /*id*/ )
{
// KStdAccelInfo* pInfo = infoPtr( id );
// if( pInfo && pInfo->psWhatsThis )
// return i18n(pInfo->psWhatsThis);
// else
- return QString::null;
+ return TQString::null;
}
const KShortcut& shortcut( StdAccel id )
@@ -232,12 +232,12 @@ KShortcut shortcutDefault4( StdAccel id )
KKeySequence key2;
cut.init( (info.cutDefault4) ?
- QKeySequence(info.cutDefault) : QKeySequence(info.cutDefault4) );
+ TQKeySequence(info.cutDefault) : TQKeySequence(info.cutDefault4) );
if( info.cutDefault4B )
- key2.init( QKeySequence(info.cutDefault4B) );
+ key2.init( TQKeySequence(info.cutDefault4B) );
else if( info.cutDefault3B )
- key2.init( QKeySequence(info.cutDefault3B) );
+ key2.init( TQKeySequence(info.cutDefault3B) );
if( key2.count() )
cut.append( key2 );
@@ -258,7 +258,7 @@ void createAccelActions( KAccelActions& actions )
if( id != AccelNone ) {
actions.insert( pInfo->psName,
i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName),
- QString::null, // pInfo->psWhatsThis,
+ TQString::null, // pInfo->psWhatsThis,
shortcutDefault3(id),
shortcutDefault4(id) );
} else
@@ -336,14 +336,14 @@ uint ShortcutList::count() const
return g_nAccels;
}
-QString ShortcutList::name( uint i ) const
+TQString ShortcutList::name( uint i ) const
{ return g_infoStdAccel[i].psName; }
-QString ShortcutList::label( uint i ) const
+TQString ShortcutList::label( uint i ) const
{ return i18n((g_infoStdAccel[i].psDesc) ? g_infoStdAccel[i].psDesc : g_infoStdAccel[i].psName); }
-QString ShortcutList::whatsThis( uint ) const
- { return QString::null; }
+TQString ShortcutList::whatsThis( uint ) const
+ { return TQString::null; }
const KShortcut& ShortcutList::shortcut( uint i ) const
{
@@ -365,27 +365,27 @@ bool ShortcutList::isConfigurable( uint i ) const
bool ShortcutList::setShortcut( uint i, const KShortcut& cut )
{ g_infoStdAccel[i].cut = cut; return true; }
-QVariant ShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
+TQVariant ShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
-bool ShortcutList::setOther( Other, uint, QVariant )
+bool ShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool ShortcutList::save() const
{
- return writeSettings( QString::null, 0, false, true );
+ return writeSettings( TQString::null, 0, false, true );
}
-KDECORE_EXPORT QString action(StdAccel id)
+KDECORE_EXPORT TQString action(StdAccel id)
{ return name(id); }
-KDECORE_EXPORT QString description(StdAccel id)
+KDECORE_EXPORT TQString description(StdAccel id)
{ return label(id); }
KDECORE_EXPORT int key(StdAccel id)
{ return shortcut(id).keyCodeQt(); }
KDECORE_EXPORT int defaultKey(StdAccel id)
{ return shortcutDefault(id).keyCodeQt(); }
-KDECORE_EXPORT bool isEqual(const QKeyEvent* ev, int keyQt)
+KDECORE_EXPORT bool isEqual(const TQKeyEvent* ev, int keyQt)
{
KKey key1( ev ), key2( keyQt );
return key1 == key2;
diff --git a/kdecore/kstdaccel.h b/kdecore/kstdaccel.h
index 655d7e349..af102d063 100644
--- a/kdecore/kstdaccel.h
+++ b/kdecore/kstdaccel.h
@@ -20,7 +20,7 @@
#ifndef KSTDACCEL_H
#define KSTDACCEL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kshortcut.h>
#include "kdelibs_export.h"
@@ -94,21 +94,21 @@ namespace KStdAccel
* @param id the id of the accelerator
* @return the unique name of the accelerator
*/
- KDECORE_EXPORT QString name(StdAccel id);
+ KDECORE_EXPORT TQString name(StdAccel id);
/**
* Returns a localized label for user-visible display.
* @param id the id of the accelerator
* @return a localized label for the accelerator
*/
- KDECORE_EXPORT QString label(StdAccel id);
+ KDECORE_EXPORT TQString label(StdAccel id);
/**
* Returns an extended WhatsThis description for the given accelerator.
* @param id the id of the accelerator
* @return a localized description of the accelerator
*/
- KDECORE_EXPORT QString whatsThis(StdAccel id);
+ KDECORE_EXPORT TQString whatsThis(StdAccel id);
/**
* Return the StdAccel id of the standard accel action which
@@ -452,12 +452,12 @@ namespace KStdAccel
* @deprecated
* Obsolete. Use name(). Returns a string representation for @p accel.
*/
- KDECORE_EXPORT QString action(StdAccel id) KDE_DEPRECATED;
+ KDECORE_EXPORT TQString action(StdAccel id) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete. Use desc(). Returns a localized description of @p accel.
*/
- KDECORE_EXPORT QString description(StdAccel id) KDE_DEPRECATED;
+ KDECORE_EXPORT TQString description(StdAccel id) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete. Use shortcut(). Returns the keybinding for @p accel.
@@ -470,13 +470,13 @@ namespace KStdAccel
KDECORE_EXPORT int defaultKey(StdAccel accel) KDE_DEPRECATED;
/**
- * @deprecated. Use KKey(const QKeyEvent*) == KKey(int).
+ * @deprecated. Use KKey(const TQKeyEvent*) == KKey(int).
*
* Compare the keys generated by the key event with
* the value of the integer.
*
* If a modifier (Shift, Alt, Ctrl) key is present in
- * QKeyEvent, its sum with the actual key value
+ * TQKeyEvent, its sum with the actual key value
* is used for comparing it with the integer parameter.
*
* @param pEvent the key event to be used in the comparison.
@@ -484,7 +484,7 @@ namespace KStdAccel
*
* @return true if the int value matches the integer representation of the QKeyEvent
*/
- KDECORE_EXPORT bool isEqual(const QKeyEvent* pEvent, int keyQt) KDE_DEPRECATED;
+ KDECORE_EXPORT bool isEqual(const TQKeyEvent* pEvent, int keyQt) KDE_DEPRECATED;
#endif // !KDE_NO_COMPAT
}
diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp
index 185a0316a..6f786d904 100644
--- a/kdecore/kstringhandler.cpp
+++ b/kdecore/kstringhandler.cpp
@@ -20,7 +20,7 @@
#include "kstringhandler.h"
#include "kglobal.h"
-static void parsePythonRange( const QCString &range, uint &start, uint &end )
+static void parsePythonRange( const TQCString &range, uint &start, uint &end )
{
const int colon = range.find( ':' );
if ( colon == -1 ) {
@@ -36,21 +36,21 @@ static void parsePythonRange( const QCString &range, uint &start, uint &end )
}
}
-QString KStringHandler::word( const QString &text , uint pos )
+TQString KStringHandler::word( const TQString &text , uint pos )
{
return text.section( ' ', pos, pos );
}
-QString KStringHandler::word( const QString &text , const char *range )
+TQString KStringHandler::word( const TQString &text , const char *range )
{
// Format in: START:END
// Note index starts a 0 (zero)
//
// 0: first word to end
// 1:3 second to fourth words
- QStringList list = QStringList::split( " ", text , true );
- QString tmp = "";
- QString r = range;
+ TQStringList list = TQStringList::split( " ", text , true );
+ TQString tmp = "";
+ TQString r = range;
if ( text.isEmpty() )
return tmp;
@@ -62,7 +62,7 @@ QString KStringHandler::word( const QString &text , const char *range )
// Extract words
//
int wordsToExtract = cnt-pos+1;
- QStringList::Iterator it = list.at( pos);
+ TQStringList::Iterator it = list.at( pos);
while ( (it != list.end()) && (wordsToExtract-- > 0))
{
@@ -77,7 +77,7 @@ QString KStringHandler::word( const QString &text , const char *range )
//
// Insertion and removal routines
//
-QString KStringHandler::insword( const QString &text , const QString &word , uint pos )
+TQString KStringHandler::insword( const TQString &text , const TQString &word , uint pos )
{
if ( text.isEmpty() )
return word;
@@ -86,7 +86,7 @@ QString KStringHandler::insword( const QString &text , const QString &word , uin
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos >= list.count() )
list.append( word );
@@ -97,7 +97,7 @@ QString KStringHandler::insword( const QString &text , const QString &word , uin
return list.join( " " );
}
-QString KStringHandler::setword( const QString &text , const QString &word , uint pos )
+TQString KStringHandler::setword( const TQString &text , const TQString &word , uint pos )
{
if ( text.isEmpty() )
return word;
@@ -106,7 +106,7 @@ QString KStringHandler::setword( const QString &text , const QString &word , uin
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos >= list.count() )
list.append( word );
@@ -119,16 +119,16 @@ QString KStringHandler::setword( const QString &text , const QString &word , uin
return list.join( " " );
}
-QString KStringHandler::remrange( const QString &text , const char *range )
+TQString KStringHandler::remrange( const TQString &text , const char *range )
{
// Format in: START:END
// Note index starts a 0 (zero)
//
// 0: first word to end
// 1:3 second to fourth words
- QStringList list = QStringList::split( " ", text , true );
- QString tmp = "";
- QString r = range;
+ TQStringList list = TQStringList::split( " ", text , true );
+ TQString tmp = "";
+ TQString r = range;
if ( text.isEmpty() )
return tmp;
@@ -140,7 +140,7 @@ QString KStringHandler::remrange( const QString &text , const char *range )
// Remove that range of words
//
int wordsToDelete = cnt-pos+1;
- QStringList::Iterator it = list.at( pos);
+ TQStringList::Iterator it = list.at( pos);
while ( (it != list.end()) && (wordsToDelete-- > 0))
it = list.remove( it );
@@ -148,15 +148,15 @@ QString KStringHandler::remrange( const QString &text , const char *range )
return list.join( " " );
}
-QString KStringHandler::remword( const QString &text , uint pos )
+TQString KStringHandler::remword( const TQString &text , uint pos )
{
- QString tmp = "";
+ TQString tmp = "";
if ( text.isEmpty() )
return tmp;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos < list.count() )
list.remove( list.at( pos ) );
@@ -165,9 +165,9 @@ QString KStringHandler::remword( const QString &text , uint pos )
return list.join( " " );
}
-QString KStringHandler::remword( const QString &text , const QString &word )
+TQString KStringHandler::remword( const TQString &text , const TQString &word )
{
- QString tmp = "";
+ TQString tmp = "";
if ( text.isEmpty() )
return tmp;
@@ -176,9 +176,9 @@ QString KStringHandler::remword( const QString &text , const QString &word )
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
- QStringList::Iterator it = list.find(word);
+ TQStringList::Iterator it = list.find(word);
if (it != list.end())
list.remove( it );
@@ -190,24 +190,24 @@ QString KStringHandler::remword( const QString &text , const QString &word )
//
// Capitalization routines
//
-QString KStringHandler::capwords( const QString &text )
+TQString KStringHandler::capwords( const TQString &text )
{
if ( text.isEmpty() ) {
return text;
}
- const QString strippedText = text.stripWhiteSpace();
- const QStringList words = capwords( QStringList::split( ' ', strippedText ) );
+ const TQString strippedText = text.stripWhiteSpace();
+ const TQStringList words = capwords( TQStringList::split( ' ', strippedText ) );
- QString result = text;
+ TQString result = text;
result.replace( strippedText, words.join( " " ) );
return result;
}
-QStringList KStringHandler::capwords( const QStringList &list )
+TQStringList KStringHandler::capwords( const TQStringList &list )
{
- QStringList tmp = list;
- for ( QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) {
+ TQStringList tmp = list;
+ for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) {
*it = ( *it )[ 0 ].upper() + ( *it ).mid( 1 );
}
return tmp;
@@ -216,28 +216,28 @@ QStringList KStringHandler::capwords( const QStringList &list )
//
// Reverse routines
//
-QString KStringHandler::reverse( const QString &text )
+TQString KStringHandler::reverse( const TQString &text )
{
- QString tmp;
+ TQString tmp;
if ( text.isEmpty() )
return tmp;
- QStringList list;
- list = QStringList::split( " ", text, true );
+ TQStringList list;
+ list = TQStringList::split( " ", text, true );
list = reverse( list );
return list.join( " " );
}
-QStringList KStringHandler::reverse( const QStringList &list )
+TQStringList KStringHandler::reverse( const TQStringList &list )
{
- QStringList tmp;
+ TQStringList tmp;
if ( list.count() == 0 )
return tmp;
- for ( QStringList::ConstIterator it= list.begin();
+ for ( TQStringList::ConstIterator it= list.begin();
it != list.end();
it++)
tmp.prepend( *it );
@@ -248,70 +248,70 @@ QStringList KStringHandler::reverse( const QStringList &list )
//
// Left, Right, Center justification
//
-QString KStringHandler::ljust( const QString &text , uint width )
+TQString KStringHandler::ljust( const TQString &text , uint width )
{
return text.stripWhiteSpace().leftJustify( width );
}
-QString KStringHandler::rjust( const QString &text , uint width )
+TQString KStringHandler::rjust( const TQString &text , uint width )
{
return text.stripWhiteSpace().rightJustify( width );
}
-QString KStringHandler::center( const QString &text , uint width )
+TQString KStringHandler::center( const TQString &text , uint width )
{
- const QString s = text.stripWhiteSpace();
+ const TQString s = text.stripWhiteSpace();
const unsigned int length = s.length();
if ( width <= length ) {
return s;
}
- QString result;
+ TQString result;
result.fill( ' ', ( width - length ) / 2 );
result += s;
return result.leftJustify( width );
}
-QString KStringHandler::lsqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::lsqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen) {
int part = maxlen-3;
- return QString("..." + str.right(part));
+ return TQString("..." + str.right(part));
}
else return str;
}
-QString KStringHandler::csqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::csqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen && maxlen > 3) {
int part = (maxlen-3)/2;
- return QString(str.left(part) + "..." + str.right(part));
+ return TQString(str.left(part) + "..." + str.right(part));
}
else return str;
}
-QString KStringHandler::rsqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::rsqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen) {
int part = maxlen-3;
- return QString(str.left(part) + "...");
+ return TQString(str.left(part) + "...");
}
else return str;
}
-QString KStringHandler::lEmSqueeze(const QString &name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::lEmSqueeze(const TQString &name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return lPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::lPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxPixels)
+TQString KStringHandler::lPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
if (maxPixels < nameWidth)
{
- QString tmp = name;
+ TQString tmp = name;
const uint em = fontMetrics.maxWidth();
maxPixels -= fontMetrics.width("...");
@@ -330,12 +330,12 @@ QString KStringHandler::lPixelSqueeze(const QString& name, const QFontMetrics& f
return name;
}
-QString KStringHandler::cEmSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::cEmSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return cPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::cPixelSqueeze(const QString& s, const QFontMetrics& fm, uint width)
+TQString KStringHandler::cPixelSqueeze(const TQString& s, const TQFontMetrics& fm, uint width)
{
if ( s.isEmpty() || uint( fm.width( s ) ) <= width ) {
return s;
@@ -377,18 +377,18 @@ QString KStringHandler::cPixelSqueeze(const QString& s, const QFontMetrics& fm,
return s.left( leftIdx ) + "..." + s.right( rightIdx );
}
-QString KStringHandler::rEmSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::rEmSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return rPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::rPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxPixels)
+TQString KStringHandler::rPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
if (maxPixels < nameWidth)
{
- QString tmp = name;
+ TQString tmp = name;
const uint em = fontMetrics.maxWidth();
maxPixels -= fontMetrics.width("...");
@@ -410,7 +410,7 @@ QString KStringHandler::rPixelSqueeze(const QString& name, const QFontMetrics& f
///// File name patterns (like *.txt)
-bool KStringHandler::matchFileName( const QString& filename, const QString& pattern )
+bool KStringHandler::matchFileName( const TQString& filename, const TQString& pattern )
{
int len = filename.length();
int pattern_len = pattern.length();
@@ -425,8 +425,8 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
}
- const QChar *c1 = pattern.unicode();
- const QChar *c2 = filename.unicode();
+ const TQChar *c1 = pattern.unicode();
+ const TQChar *c2 = filename.unicode();
int cnt = 1;
while ( cnt < pattern_len && *c1++ == *c2++ )
++cnt;
@@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
// Patterns like "*~", "*.extension"
if ( pattern[ 0 ] == '*' && len + 1 >= pattern_len )
{
- const QChar *c1 = pattern.unicode() + pattern_len - 1;
- const QChar *c2 = filename.unicode() + len - 1;
+ const TQChar *c1 = pattern.unicode() + pattern_len - 1;
+ const TQChar *c2 = filename.unicode() + len - 1;
int cnt = 1;
while ( cnt < pattern_len && *c1-- == *c2-- )
++cnt;
@@ -449,11 +449,11 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
}
QStringList
-KStringHandler::perlSplit(const QString & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
@@ -475,11 +475,11 @@ KStringHandler::perlSplit(const QString & sep, const QString & s, uint max)
}
QStringList
-KStringHandler::perlSplit(const QChar & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
@@ -501,11 +501,11 @@ KStringHandler::perlSplit(const QChar & sep, const QString & s, uint max)
}
QStringList
-KStringHandler::perlSplit(const QRegExp & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQRegExp & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
int tokenStart = sep.search(s, searchStart);
@@ -528,23 +528,23 @@ KStringHandler::perlSplit(const QRegExp & sep, const QString & s, uint max)
}
QString
-KStringHandler::tagURLs( const QString& text )
+KStringHandler::tagURLs( const TQString& text )
{
- /*static*/ QRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]");
+ /*static*/ TQRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]");
- QString richText( text );
+ TQString richText( text );
int urlPos = 0, urlLen;
while ((urlPos = urlEx.search(richText, urlPos)) >= 0)
{
urlLen = urlEx.matchedLength();
- QString href = richText.mid( urlPos, urlLen );
+ TQString href = richText.mid( urlPos, urlLen );
// Qt doesn't support (?<=pattern) so we do it here
if((urlPos > 0) && richText[urlPos-1].isLetterOrNumber()){
urlPos++;
continue;
}
- // Don't use QString::arg since %01, %20, etc could be in the string
- QString anchor = "<a href=\"" + href + "\">" + href + "</a>";
+ // Don't use TQString::arg since %01, %20, etc could be in the string
+ TQString anchor = "<a href=\"" + href + "\">" + href + "</a>";
richText.replace( urlPos, urlLen, anchor );
@@ -553,13 +553,13 @@ KStringHandler::tagURLs( const QString& text )
return richText;
}
-QString KStringHandler::obscure( const QString &str )
+TQString KStringHandler::obscure( const TQString &str )
{
- QString result;
- const QChar *unicode = str.unicode();
+ TQString result;
+ const TQChar *unicode = str.unicode();
for ( uint i = 0; i < str.length(); ++i )
result += ( unicode[ i ].unicode() <= 0x21 ) ? unicode[ i ] :
- QChar( 0x1001F - unicode[ i ].unicode() );
+ TQChar( 0x1001F - unicode[ i ].unicode() );
return result;
}
@@ -649,15 +649,15 @@ done:
#undef I
#undef X
-QString KStringHandler::from8Bit( const char *str )
+TQString KStringHandler::from8Bit( const char *str )
{
if (!str)
- return QString::null;
+ return TQString::null;
if (!*str) {
- static const QString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = KGlobal::staticQString("");
return emptyString;
}
return KStringHandler::isUtf8( str ) ?
- QString::fromUtf8( str ) :
- QString::fromLocal8Bit( str );
+ TQString::fromUtf8( str ) :
+ TQString::fromLocal8Bit( str );
}
diff --git a/kdecore/kstringhandler.h b/kdecore/kstringhandler.h
index e01c4493b..47075a066 100644
--- a/kdecore/kstringhandler.h
+++ b/kdecore/kstringhandler.h
@@ -19,16 +19,16 @@
#ifndef KSTRINGHANDLER_H
#define KSTRINGHANDLER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h> // for the word ranges
-#include <qfontmetrics.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h> // for the word ranges
+#include <tqfontmetrics.h>
#include "kdelibs_export.h"
/**
* This class contains utility functions for handling strings.
*
- * This class is @em not a substitute for the QString class. What
+ * This class is @em not a substitute for the TQString class. What
* I tried to do with this class is provide an easy way to
* cut/slice/splice words inside sentences in whatever order desired.
* While the main focus of this class are words (ie characters
@@ -43,7 +43,7 @@
*
* The ranges are a fairly powerful way of getting/stripping words from
* a string. These ranges function, for the large part, as they would in
- * python. See the word(const QString&, const char *) and remword(const QString&, uint) functions for more detail.
+ * python. See the word(const TQString&, const char *) and remword(const TQString&, uint) functions for more detail.
*
* This class contains no data members of its own. All strings are cut
* on the fly and returned as new qstrings/qstringlists.
@@ -52,7 +52,7 @@
*
* \code
* KStringHandler kstr;
- * QString line = "This is a test of the strings";
+ * TQString line = "This is a test of the strings";
*
* cout << "1> " << kstr.word( line , "4:" ) << "\n";
* cout << "2> " << kstr.remrange( line , "2:5" ) << "\n";
@@ -75,9 +75,9 @@ public:
* @param text the string to search for the words
* @param pos the position of the word to search
* @return the word, or an empty string if not found
- * @deprecated use QString::section instead
+ * @deprecated use TQString::section instead
*/
- static QString word( const QString &text , uint pos ) KDE_DEPRECATED;
+ static TQString word( const TQString &text , uint pos ) KDE_DEPRECATED;
/** Returns a range of words from that string.
* Ie:
@@ -91,7 +91,7 @@ public:
* @param range the words to return (see description)
* @return the words, or an empty string if not found
*/
- static QString word( const QString &text , const char *range );
+ static TQString word( const TQString &text , const char *range );
/** Inserts a word into the string, and returns
* a new string with the word included. the first
@@ -102,7 +102,7 @@ public:
* @param pos the position (in words) for the new word
* @return the resulting string
*/
- static QString insword( const QString &text , const QString &word , uint pos );
+ static TQString insword( const TQString &text , const TQString &word , uint pos );
/** Replaces a word in the string, and returns
* a new string with the word included. the first
@@ -113,7 +113,7 @@ public:
* @param pos the position (in words) for the new word
* @return the resulting string
*/
- static QString setword( const QString &text , const QString &word , uint pos );
+ static TQString setword( const TQString &text , const TQString &word , uint pos );
/** Removes a word or ranges of words from the string,
* and returns a new string. The ranges definitions
@@ -127,7 +127,7 @@ public:
* @param range the words to remove (see description)
* @return the resulting string
*/
- static QString remrange( const QString &text , const char *range );
+ static TQString remrange( const TQString &text , const char *range );
/** Removes a word at the given index, and returns a
@@ -136,7 +136,7 @@ public:
* @param pos the position (in words) of thw word to delete
* @return the resulting string
*/
- static QString remword( const QString &text , uint pos );
+ static TQString remword( const TQString &text , uint pos );
/** Removes a matching word from the string, and returns
* a new string. Note that only ONE match is removed.
@@ -144,35 +144,35 @@ public:
* @param word the word to remove
* @return the resulting string
*/
- static QString remword( const QString &text , const QString &word );
+ static TQString remword( const TQString &text , const TQString &word );
/** Capitalizes each word in the string
* "hello there" becomes "Hello There" (string)
* @param text the text to capitalize
* @return the resulting string
*/
- static QString capwords( const QString &text );
+ static TQString capwords( const TQString &text );
/** Capitalizes each word in the list
* [hello, there] becomes [Hello, There] (list)
* @param list the list to capitalize
* @return the resulting list
*/
- static QStringList capwords( const QStringList &list );
+ static TQStringList capwords( const TQStringList &list );
/** Reverses the order of the words in a string
* "hello there" becomes "there hello" (string)
* @param text the text to reverse
* @return the resulting string
*/
- static QString reverse( const QString &text );
+ static TQString reverse( const TQString &text );
/** Reverses the order of the words in a list
* [hello, there] becomes [there, hello] (list)
* @param list the list to reverse
* @return the resulting list
*/
- static QStringList reverse( const QStringList &list );
+ static TQStringList reverse( const TQStringList &list );
/** Left-justifies a string and returns a string at least 'width' characters
* wide.
@@ -181,9 +181,9 @@ public:
* @param text the text to justify
* @param width the desired width of the new string
* @return the resulting string
- * @deprecated use QString::leftJustify instead
+ * @deprecated use TQString::leftJustify instead
*/
- static QString ljust( const QString &text , uint width ) KDE_DEPRECATED;
+ static TQString ljust( const TQString &text , uint width ) KDE_DEPRECATED;
/** Right-justifies a string and returns a string at least 'width' characters
* wide.
@@ -192,9 +192,9 @@ public:
* @param text the text to justify
* @param width the desired width of the new string
* @return the resulting string
- * @deprecated use QString::rightJustify instead
+ * @deprecated use TQString::rightJustify instead
*/
- static QString rjust( const QString &text , uint width ) KDE_DEPRECATED;
+ static TQString rjust( const TQString &text , uint width ) KDE_DEPRECATED;
/** Centers a string and returns a string at least 'width' characters
* wide.
@@ -204,7 +204,7 @@ public:
* @param width the desired width of the new string
* @return the resulting string
*/
- static QString center( const QString &text , uint width );
+ static TQString center( const TQString &text , uint width );
/** Substitute characters at the beginning of a string by "...".
* @param str is the string to modify
@@ -212,7 +212,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString lsqueeze( const QString & str, uint maxlen = 40 );
+ static TQString lsqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters at the beginning of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -224,8 +224,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString lEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString lEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters at the beginning of a string by "...". Similar to
@@ -237,8 +237,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString lPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString lPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/** Substitute characters at the middle of a string by "...".
@@ -247,7 +247,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString csqueeze( const QString & str, uint maxlen = 40 );
+ static TQString csqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters in the middle of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -259,8 +259,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString cEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString cEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters in the middle of a string by "...". Similar to
@@ -272,8 +272,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString cPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString cPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/** Substitute characters at the end of a string by "...".
@@ -282,7 +282,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString rsqueeze( const QString & str, uint maxlen = 40 );
+ static TQString rsqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters at the end of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -294,8 +294,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString rEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString rEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters at the end of a string by "...". Similar to
@@ -307,8 +307,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString rPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString rPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/**
@@ -319,68 +319,68 @@ public:
* Patterns with two asterisks like "*.*pk" are not supported.
* @return true if the given filename matches the given pattern
*/
- static bool matchFileName( const QString& filename, const QString& pattern );
+ static bool matchFileName( const TQString& filename, const TQString& pattern );
// KDE4: move to KShell
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
* perlSplit("__", "some__string__for__you__here", 4)
- * QStringList contains: "some", "string", "for", "you__here"
+ * TQStringList contains: "some", "string", "for", "you__here"
* \endcode
*
* @param sep is the string to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QString & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQString & sep, const TQString & s, uint max = 0);
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
* perlSplit(' ', "kparts reaches the parts other parts can't", 3)
- * QStringList contains: "kparts", "reaches", "the parts other parts can't"
+ * TQStringList contains: "kparts", "reaches", "the parts other parts can't"
* \endcode
*
* @param sep is the character to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QChar & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQChar & sep, const TQString & s, uint max = 0);
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
- * perlSplit(QRegExp("[! ]", "Split me up ! I'm bored ! OK ?", 3)
- * QStringList contains: "Split", "me", "up ! I'm bored, OK ?"
+ * perlSplit(TQRegExp("[! ]", "Split me up ! I'm bored ! OK ?", 3)
+ * TQStringList contains: "Split", "me", "up ! I'm bored, OK ?"
* \endcode
*
* @param sep is the regular expression to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QRegExp & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQRegExp & sep, const TQString & s, uint max = 0);
/**
* This method auto-detects URLs in strings, and adds HTML markup to them
@@ -390,7 +390,7 @@ public:
* @return the resulting text
* @since 3.1
*/
- static QString tagURLs( const QString& text );
+ static TQString tagURLs( const TQString& text );
/**
Obscure string by using a simple symmetric encryption. Applying the
@@ -405,7 +405,7 @@ public:
@return obscured string
@since 3.2
*/
- static QString obscure( const QString &str );
+ static TQString obscure( const TQString &str );
/**
Guess whether a string is UTF8 encoded.
@@ -417,14 +417,14 @@ public:
static bool isUtf8( const char *str );
/**
- Construct QString from a c string, guessing whether it is UTF8- or
+ Construct TQString from a c string, guessing whether it is UTF8- or
Local8Bit-encoded.
@param str the input string
- @return the (hopefully correctly guessed) QString representation of @p str
+ @return the (hopefully correctly guessed) TQString representation of @p str
@since 3.2
*/
- static QString from8Bit( const char *str );
+ static TQString from8Bit( const char *str );
#ifdef KDE_NO_COMPAT
private:
@@ -432,7 +432,7 @@ private:
/**
* @deprecated Use matchFileName () instead.
*/
- static KDE_DEPRECATED bool matchFilename( const QString& filename, const QString& pattern )
+ static KDE_DEPRECATED bool matchFilename( const TQString& filename, const TQString& pattern )
{
return matchFileName (filename, pattern);
}
diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp
index b4a3533fe..fd4d9aa95 100644
--- a/kdecore/ksycoca.cpp
+++ b/kdecore/ksycoca.cpp
@@ -22,9 +22,9 @@
#include "ksycocatype.h"
#include "ksycocafactory.h"
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qbuffer.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqbuffer.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -53,7 +53,7 @@ extern "C"
#define MAP_FAILED ((void *) -1)
#endif
-template class QPtrList<KSycocaFactory>;
+template class TQPtrList<KSycocaFactory>;
// The following limitations are in place:
// Maximum length of a single string: 8192 bytes
@@ -71,13 +71,13 @@ public:
updateSig = 0;
autoRebuild = true;
}
- QFile *database;
- QStringList changeList;
- QString language;
+ TQFile *database;
+ TQStringList changeList;
+ TQString language;
bool readError;
bool autoRebuild;
Q_UINT32 updateSig;
- QStringList allResourceDirs;
+ TQStringList allResourceDirs;
};
int KSycoca::version()
@@ -110,15 +110,15 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
m_sycoca_mmap = 0;
m_str = 0;
- QString path;
- QCString ksycoca_env = getenv("KDESYCOCA");
+ TQString path;
+ TQCString ksycoca_env = getenv("KDESYCOCA");
if (ksycoca_env.isEmpty())
path = KGlobal::dirs()->saveLocation("cache") + "ksycoca";
else
- path = QFile::decodeName(ksycoca_env);
+ path = TQFile::decodeName(ksycoca_env);
kdDebug(7011) << "Trying to open ksycoca from " << path << endl;
- QFile *database = new QFile(path);
+ TQFile *database = new TQFile(path);
bool bOpen = database->open( IO_ReadOnly );
if (!bOpen)
{
@@ -127,7 +127,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
kdDebug(7011) << "Trying to open global ksycoca from " << path << endl;
delete database;
- database = new QFile(path);
+ database = new TQFile(path);
bOpen = database->open( IO_ReadOnly );
}
}
@@ -146,7 +146,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
kdDebug(7011) << "mmap failed. (length = " << m_sycoca_size << ")" << endl;
#endif
- m_str = new QDataStream(database);
+ m_str = new TQDataStream(database);
#ifdef HAVE_MMAP
}
else
@@ -154,11 +154,11 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
#ifdef HAVE_MADVISE
(void) madvise((char*)m_sycoca_mmap, m_sycoca_size, MADV_WILLNEED);
#endif
- QByteArray b_array;
+ TQByteArray b_array;
b_array.setRawData(m_sycoca_mmap, m_sycoca_size);
- QBuffer *buffer = new QBuffer( b_array );
+ TQBuffer *buffer = new TQBuffer( b_array );
buffer->open(IO_ReadWrite);
- m_str = new QDataStream( buffer);
+ m_str = new TQDataStream( buffer);
}
#endif
bNoDatabase = false;
@@ -176,9 +176,9 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
// We open a dummy database instead.
//kdDebug(7011) << "No database, opening a dummy one." << endl;
- QBuffer *buffer = new QBuffer( QByteArray() );
+ TQBuffer *buffer = new TQBuffer( TQByteArray() );
buffer->open(IO_ReadWrite);
- m_str = new QDataStream( buffer);
+ m_str = new TQDataStream( buffer);
(*m_str) << (Q_INT32) KSYCOCA_VERSION;
(*m_str) << (Q_INT32) 0;
}
@@ -226,13 +226,13 @@ KSycoca::~KSycoca()
void KSycoca::closeDatabase()
{
- QIODevice *device = 0;
+ TQIODevice *device = 0;
if (m_str)
device = m_str->device();
#ifdef HAVE_MMAP
if (device && m_sycoca_mmap)
{
- QBuffer *buf = (QBuffer *) device;
+ TQBuffer *buf = (TQBuffer *) device;
buf->buffer().resetRawData(m_sycoca_mmap, m_sycoca_size);
// Solaris has munmap(char*, size_t) and everything else should
// be happy with a char* for munmap(void*, size_t)
@@ -265,7 +265,7 @@ bool KSycoca::isChanged(const char *type)
return self()->d->changeList.contains(type);
}
-void KSycoca::notifyDatabaseChanged(const QStringList &changeList)
+void KSycoca::notifyDatabaseChanged(const TQStringList &changeList)
{
d->changeList = changeList;
//kdDebug(7011) << "got a notifyDatabaseChanged signal !" << endl;
@@ -279,16 +279,16 @@ void KSycoca::notifyDatabaseChanged(const QStringList &changeList)
emit databaseChanged();
}
-QDataStream * KSycoca::findEntry(int offset, KSycocaType &type)
+TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type)
{
if ( !m_str )
openDatabase();
- //kdDebug(7011) << QString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl;
m_str->device()->at(offset);
Q_INT32 aType;
(*m_str) >> aType;
type = (KSycocaType) aType;
- //kdDebug(7011) << QString("KSycoca::found type %1").arg(aType) << endl;
+ //kdDebug(7011) << TQString("KSycoca::found type %1").arg(aType) << endl;
return m_str;
}
@@ -315,7 +315,7 @@ bool KSycoca::checkVersion(bool abortOnError)
return true;
}
-QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
+TQDataStream * KSycoca::findFactory(KSycocaFactoryId id)
{
// The constructor found no database, but we want one
if (bNoDatabase)
@@ -347,7 +347,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
while(true)
{
(*m_str) >> aId;
- //kdDebug(7011) << QString("KSycoca::findFactory : found factory %1").arg(aId) << endl;
+ //kdDebug(7011) << TQString("KSycoca::findFactory : found factory %1").arg(aId) << endl;
if (aId == 0)
{
kdError(7011) << "Error, KSycocaFactory (id = " << int(id) << ") not found!" << endl;
@@ -356,7 +356,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
(*m_str) >> aOffset;
if (aId == id)
{
- //kdDebug(7011) << QString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl;
+ //kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl;
m_str->device()->at(aOffset);
return m_str;
}
@@ -364,7 +364,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
return 0;
}
-QString KSycoca::kfsstnd_prefixes()
+TQString KSycoca::kfsstnd_prefixes()
{
if (bNoDatabase) return "";
if (!checkVersion(false)) return "";
@@ -380,7 +380,7 @@ QString KSycoca::kfsstnd_prefixes()
break; // just read 0
}
// We now point to the header
- QString prefixes;
+ TQString prefixes;
KSycocaEntry::read(*m_str, prefixes);
(*m_str) >> m_timeStamp;
KSycocaEntry::read(*m_str, d->language);
@@ -403,32 +403,32 @@ Q_UINT32 KSycoca::updateSignature()
return d->updateSig;
}
-QString KSycoca::language()
+TQString KSycoca::language()
{
if (d->language.isEmpty())
(void) kfsstnd_prefixes();
return d->language;
}
-QStringList KSycoca::allResourceDirs()
+TQStringList KSycoca::allResourceDirs()
{
if (!m_timeStamp)
(void) kfsstnd_prefixes();
return d->allResourceDirs;
}
-QString KSycoca::determineRelativePath( const QString & _fullpath, const char *_resource )
+TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char *_resource )
{
- QString sRelativeFilePath;
- QStringList dirs = KGlobal::dirs()->resourceDirs( _resource );
- QStringList::ConstIterator dirsit = dirs.begin();
+ TQString sRelativeFilePath;
+ TQStringList dirs = KGlobal::dirs()->resourceDirs( _resource );
+ TQStringList::ConstIterator dirsit = dirs.begin();
for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) {
// might need canonicalPath() ...
if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath
sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs
}
if ( sRelativeFilePath.isEmpty() )
- kdFatal(7011) << QString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl;
+ kdFatal(7011) << TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl;
//else
// debug code
//kdDebug(7011) << sRelativeFilePath << endl;
@@ -467,19 +467,19 @@ bool KSycoca::readError()
return b;
}
-void KSycocaEntry::read( QDataStream &s, QString &str )
+void KSycocaEntry::read( TQDataStream &s, TQString &str )
{
Q_UINT32 bytes;
s >> bytes; // read size of string
if ( bytes > 8192 ) { // null string or too big
if (bytes != 0xffffffff)
KSycoca::flagError();
- str = QString::null;
+ str = TQString::null;
}
else if ( bytes > 0 ) { // not empty
int bt = bytes/2;
str.setLength( bt );
- QChar* ch = (QChar *) str.unicode();
+ TQChar* ch = (TQChar *) str.unicode();
char t[8192];
char *b = t;
s.readRawBytes( b, bytes );
@@ -492,7 +492,7 @@ void KSycocaEntry::read( QDataStream &s, QString &str )
}
}
-void KSycocaEntry::read( QDataStream &s, QStringList &list )
+void KSycocaEntry::read( TQDataStream &s, TQStringList &list )
{
list.clear();
Q_UINT32 count;
@@ -504,7 +504,7 @@ void KSycocaEntry::read( QDataStream &s, QStringList &list )
}
for(Q_UINT32 i = 0; i < count; i++)
{
- QString str;
+ TQString str;
read(s, str);
list.append( str );
if (s.atEnd())
diff --git a/kdecore/ksycoca.h b/kdecore/ksycoca.h
index 00c72431f..408c48234 100644
--- a/kdecore/ksycoca.h
+++ b/kdecore/ksycoca.h
@@ -20,8 +20,8 @@
#define __ksycoca_h__
#include <dcopobject.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "ksycocatype.h"
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KSycocaFactoryList;
* @internal
* Read-only SYstem COnfiguration CAche
*/
-class KDECORE_EXPORT KSycoca : public QObject, public DCOPObject
+class KDECORE_EXPORT KSycoca : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -73,19 +73,19 @@ public:
* @internal - called by factories in read-only mode
* This is how factories get a stream to an entry
*/
- QDataStream *findEntry(int offset, KSycocaType &type);
+ TQDataStream *findEntry(int offset, KSycocaType &type);
/**
* @internal - called by factories in read-only mode
*/
- QDataStream *findFactory( KSycocaFactoryId id);
+ TQDataStream *findFactory( KSycocaFactoryId id);
/**
* @internal - returns kfsstnd stored inside database
*/
- QString kfsstnd_prefixes();
+ TQString kfsstnd_prefixes();
/**
* @internal - returns language stored inside database
*/
- QString language();
+ TQString language();
/**
* @internal - returns timestamp of database
@@ -110,7 +110,7 @@ public:
* @internal - returns all directories with information
* stored inside sycoca.
*/
- QStringList allResourceDirs();
+ TQStringList allResourceDirs();
/**
* @internal - add a factory
@@ -131,7 +131,7 @@ public:
/**
* Determine relative path for a .desktop file from a full path and a resource name
*/
- static QString determineRelativePath( const QString & _fullpath, const char *_resource );
+ static TQString determineRelativePath( const TQString & _fullpath, const char *_resource );
/**
* When you receive a "databaseChanged" signal, you can query here if
@@ -154,7 +154,7 @@ k_dcop:
/**
* internal function for receiving kded/kbuildsycoca's signal, when the sycoca file changes
*/
- void notifyDatabaseChanged(const QStringList &);
+ void notifyDatabaseChanged(const TQStringList &);
signals:
/**
@@ -168,7 +168,7 @@ protected:
bool openDatabase(bool openDummyIfNotFound=true);
void closeDatabase();
KSycocaFactoryList *m_lstFactories;
- QDataStream *m_str;
+ TQDataStream *m_str;
bool bNoDatabase;
size_t m_sycoca_size;
const char *m_sycoca_mmap;
diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp
index cc7f87471..ce7529682 100644
--- a/kdecore/ksycocadict.cpp
+++ b/kdecore/ksycocadict.cpp
@@ -20,27 +20,27 @@
#include "ksycocaentry.h"
#include "ksycoca.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <stdlib.h>
namespace
{
struct string_entry {
- string_entry(QString _key, KSycocaEntry *_payload)
+ string_entry(TQString _key, KSycocaEntry *_payload)
{ keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; }
uint hash;
int length;
- const QChar *key;
- QString keyStr;
+ const TQChar *key;
+ TQString keyStr;
KSycocaEntry *payload;
};
}
-template class QPtrList<string_entry>;
+template class TQPtrList<string_entry>;
-class KSycocaDictStringList : public QPtrList<string_entry>
+class KSycocaDictStringList : public TQPtrList<string_entry>
{
public:
KSycocaDictStringList();
@@ -56,7 +56,7 @@ KSycocaDict::KSycocaDict()
{
}
-KSycocaDict::KSycocaDict(QDataStream *str, int offset)
+KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
: d(0), mStr(str), mOffset(offset)
{
Q_UINT32 test1, test2;
@@ -82,7 +82,7 @@ KSycocaDict::~KSycocaDict()
}
void
-KSycocaDict::add(const QString &key, KSycocaEntry *payload)
+KSycocaDict::add(const TQString &key, KSycocaEntry *payload)
{
if (key.isEmpty()) return; // Not allowed (should never happen)
if (!payload) return; // Not allowed!
@@ -96,7 +96,7 @@ KSycocaDict::add(const QString &key, KSycocaEntry *payload)
}
void
-KSycocaDict::remove(const QString &key)
+KSycocaDict::remove(const TQString &key)
{
if (d)
{
@@ -112,9 +112,9 @@ KSycocaDict::remove(const QString &key)
}
int
-KSycocaDict::find_string(const QString &key )
+KSycocaDict::find_string(const TQString &key )
{
- //kdDebug(7011) << QString("KSycocaDict::find_string(%1)").arg(key) << endl;
+ //kdDebug(7011) << TQString("KSycocaDict::find_string(%1)").arg(key) << endl;
if (!mStr || !mOffset)
{
@@ -127,16 +127,16 @@ KSycocaDict::find_string(const QString &key )
// Read hash-table data
uint hash = hashKey(key) % mHashTableSize;
- //kdDebug(7011) << QString("hash is %1").arg(hash) << endl;
+ //kdDebug(7011) << TQString("hash is %1").arg(hash) << endl;
uint off = mOffset+sizeof(Q_INT32)*hash;
- //kdDebug(7011) << QString("off is %1").arg(off,8,16) << endl;
+ //kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl;
mStr->device()->at( off );
Q_INT32 offset;
(*mStr) >> offset;
- //kdDebug(7011) << QString("offset is %1").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("offset is %1").arg(offset,8,16) << endl;
if (offset == 0)
return 0;
@@ -147,15 +147,15 @@ KSycocaDict::find_string(const QString &key )
offset = -offset;
mStr->device()->at(offset);
- //kdDebug(7011) << QString("Looking up duplicate list at %1").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl;
while(true)
{
(*mStr) >> offset;
if (offset == 0) break;
- QString dupkey;
+ TQString dupkey;
(*mStr) >> dupkey;
- //kdDebug(7011) << QString(">> %1 %2").arg(offset,8,16).arg(dupkey) << endl;
+ //kdDebug(7011) << TQString(">> %1 %2").arg(offset,8,16).arg(dupkey) << endl;
if (dupkey == key) return offset;
}
//kdWarning(7011) << "Not found!" << endl;
@@ -179,7 +179,7 @@ KSycocaDict::clear()
}
uint
-KSycocaDict::hashKey( const QString &key)
+KSycocaDict::hashKey( const TQString &key)
{
int l = key.length();
register uint h = 0;
@@ -275,7 +275,7 @@ addDiversity(KSycocaDictStringList *d, int pos)
void
-KSycocaDict::save(QDataStream &str)
+KSycocaDict::save(TQDataStream &str)
{
if (count() == 0)
{
@@ -288,7 +288,7 @@ KSycocaDict::save(QDataStream &str)
mOffset = str.device()->at();
- //kdDebug(7011) << QString("KSycocaDict: %1 entries.").arg(count()) << endl;
+ //kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl;
//kdDebug(7011) << "Calculating hash keys.." << endl;
@@ -301,7 +301,7 @@ KSycocaDict::save(QDataStream &str)
maxLength = entry->length;
}
- //kdDebug(7011) << QString("Max string length = %1").arg(maxLength) << endl;
+ //kdDebug(7011) << TQString("Max string length = %1").arg(maxLength) << endl;
// use "almost prime" number for sz (to calculate diversity) and later
// for the table size of big tables
@@ -366,7 +366,7 @@ KSycocaDict::save(QDataStream &str)
struct hashtable_entry {
string_entry *entry;
- QPtrList<string_entry> *duplicates;
+ TQPtrList<string_entry> *duplicates;
int duplicate_offset;
};
@@ -391,7 +391,7 @@ KSycocaDict::save(QDataStream &str)
{
if (!hashTable[hash].duplicates)
{ // Second entry, build duplicate list.
- hashTable[hash].duplicates = new QPtrList<string_entry>();
+ hashTable[hash].duplicates = new TQPtrList<string_entry>();
hashTable[hash].duplicates->append(hashTable[hash].entry);
hashTable[hash].duplicate_offset = 0;
}
@@ -403,12 +403,12 @@ KSycocaDict::save(QDataStream &str)
str << mHashList;
mOffset = str.device()->at(); // mOffset points to start of hashTable
- //kdDebug(7011) << QString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl;
+ //kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl;
for(int pass = 1; pass <= 2; pass++)
{
str.device()->at(mOffset);
- //kdDebug(7011) << QString("Writing hash table (pass #%1)").arg(pass) << endl;
+ //kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
{
Q_INT32 tmpid;
@@ -419,29 +419,29 @@ KSycocaDict::save(QDataStream &str)
else
tmpid = (Q_INT32) -hashTable[i].duplicate_offset; // Negative ID
str << tmpid;
- //kdDebug(7011) << QString("Hash table : %1").arg(tmpid,8,16) << endl;
+ //kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl;
}
- //kdDebug(7011) << QString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl;
- //kdDebug(7011) << QString("Writing duplicate lists (pass #%1)").arg(pass) << endl;
+ //kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
{
if (hashTable[i].duplicates)
{
- QPtrList<string_entry> *dups = hashTable[i].duplicates;
+ TQPtrList<string_entry> *dups = hashTable[i].duplicates;
hashTable[i].duplicate_offset = str.device()->at();
- /*kdDebug(7011) << QString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl;
+ /*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl;
*/
for(string_entry *dup = dups->first(); dup; dup=dups->next())
{
str << (Q_INT32) dup->payload->offset(); // Positive ID
- str << dup->keyStr; // Key (QString)
+ str << dup->keyStr; // Key (TQString)
}
str << (Q_INT32) 0; // End of list marker (0)
}
}
- //kdDebug(7011) << QString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl;
}
//kdDebug(7011) << "Cleaning up hash table." << endl;
diff --git a/kdecore/ksycocadict.h b/kdecore/ksycocadict.h
index dec6a8cc8..94a2bc646 100644
--- a/kdecore/ksycocadict.h
+++ b/kdecore/ksycocadict.h
@@ -19,9 +19,9 @@
#ifndef __ksycocadict_h__
#define __ksycocadict_h__
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdatastream.h>
#include "kdelibs_export.h"
class KSycocaEntry;
@@ -41,7 +41,7 @@ public:
/**
* Create a dict from an existing database
*/
- KSycocaDict(QDataStream *str, int offset);
+ KSycocaDict(TQDataStream *str, int offset);
~KSycocaDict();
@@ -51,14 +51,14 @@ public:
* 'payload' should have a valid offset by the time
* the dictionary gets saved.
**/
- void add(const QString &key, KSycocaEntry *payload);
+ void add(const TQString &key, KSycocaEntry *payload);
/**
* Removes the 'payload' from the dictionary with key 'key'.
*
* Not very fast, use with care O(N)
**/
- void remove(const QString &key);
+ void remove(const TQString &key);
/**
* Looks up an entry identified by 'key'.
@@ -72,7 +72,7 @@ public:
* indeed matches the search key. If it doesn't
* then no matching entry exists.
*/
- int find_string(const QString &key );
+ int find_string(const TQString &key );
/**
* The number of entries in the dictionary.
@@ -108,16 +108,16 @@ public:
* The hash table size will be approx. 20Kb.
* The duplicate list size will be approx. 12Kb.
**/
- void save(QDataStream &str);
+ void save(TQDataStream &str);
protected:
- Q_UINT32 hashKey( const QString &);
+ Q_UINT32 hashKey( const TQString &);
private:
KSycocaDictStringList *d;
- QDataStream *mStr;
+ TQDataStream *mStr;
Q_INT32 mOffset;
Q_UINT32 mHashTableSize;
- QValueList<Q_INT32> mHashList;
+ TQValueList<Q_INT32> mHashList;
};
#endif
diff --git a/kdecore/ksycocaentry.h b/kdecore/ksycocaentry.h
index 93ec00eb1..fc06dcc3b 100644
--- a/kdecore/ksycocaentry.h
+++ b/kdecore/ksycocaentry.h
@@ -21,7 +21,7 @@
#include "ksycocatype.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
class QDataStream;
@@ -43,24 +43,24 @@ public:
public:
typedef KSharedPtr<KSycocaEntry> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* Default constructor
*/
- KSycocaEntry(const QString &path) : mOffset(0), m_bDeleted(false), mPath(path) { }
+ KSycocaEntry(const TQString &path) : mOffset(0), m_bDeleted(false), mPath(path) { }
/**
* Safe demarshalling functions.
*/
- static void read( QDataStream &s, QString &str );
- static void read( QDataStream &s, QStringList &list );
+ static void read( TQDataStream &s, TQString &str );
+ static void read( TQDataStream &s, TQStringList &list );
/**
* @internal
* Restores itself from a stream.
*/
- KSycocaEntry( QDataStream &_str, int offset ) :
+ KSycocaEntry( TQDataStream &_str, int offset ) :
mOffset( offset ), m_bDeleted(false)
{
read(_str, mPath);
@@ -69,14 +69,14 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* @return the name of this entry
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/**
* @return the path of this entry
* The path can be absolute or relative.
* The corresponding factory should know relative to what.
*/
- QString entryPath() const { return mPath; }
+ TQString entryPath() const { return mPath; }
/**
* @return true if valid
@@ -99,7 +99,7 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* Save ourselves to the database. Don't forget to call the parent class
* first if you override this function.
*/
- virtual void save(QDataStream &s)
+ virtual void save(TQDataStream &s)
{
mOffset = s.device()->at(); // store position in member variable
s << (Q_INT32) sycocaType() << mPath;
@@ -109,13 +109,13 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* @internal
* Load ourselves from the database. Don't call the parent class!
*/
- virtual void load(QDataStream &) = 0;
+ virtual void load(TQDataStream &) = 0;
private:
int mOffset;
protected:
bool m_bDeleted;
- QString mPath;
+ TQString mPath;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kdecore/ksycocafactory.cpp b/kdecore/ksycocafactory.cpp
index 3542fa0cb..e5816dc23 100644
--- a/kdecore/ksycocafactory.cpp
+++ b/kdecore/ksycocafactory.cpp
@@ -21,12 +21,12 @@
#include "ksycocafactory.h"
#include "ksycocaentry.h"
#include "ksycocadict.h"
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <kdebug.h>
-template class QDict<KSycocaEntry>;
-template class QDict<KSharedPtr<KSycocaEntry> >;
+template class TQDict<KSycocaEntry>;
+template class TQDict<KSharedPtr<KSycocaEntry> >;
KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
: m_resourceList(0), m_entryDict(0), m_sycocaDict(0)
@@ -75,7 +75,7 @@ KSycocaFactory::~KSycocaFactory()
}
void
-KSycocaFactory::saveHeader(QDataStream &str)
+KSycocaFactory::saveHeader(TQDataStream &str)
{
// Write header
str.device()->at(mOffset);
@@ -85,7 +85,7 @@ KSycocaFactory::saveHeader(QDataStream &str)
}
void
-KSycocaFactory::save(QDataStream &str)
+KSycocaFactory::save(TQDataStream &str)
{
if (!m_entryDict) return; // Error! Function should only be called when
// building database
@@ -101,7 +101,7 @@ KSycocaFactory::save(QDataStream &str)
// Write all entries.
int entryCount = 0;
- for(QDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
@@ -115,7 +115,7 @@ KSycocaFactory::save(QDataStream &str)
// Write indices...
// Linear index
str << (Q_INT32) entryCount;
- for(QDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
@@ -144,7 +144,7 @@ KSycocaFactory::addEntry(KSycocaEntry *newEntry, const char *)
if (!m_sycocaDict) return; // Error!
- QString name = newEntry->name();
+ TQString name = newEntry->name();
m_entryDict->insert( name, new KSycocaEntry::Ptr(newEntry) );
m_sycocaDict->add( name, newEntry );
}
@@ -157,7 +157,7 @@ KSycocaFactory::removeEntry(KSycocaEntry *newEntry)
if (!m_sycocaDict) return; // Error!
- QString name = newEntry->name();
+ TQString name = newEntry->name();
m_entryDict->remove( name );
m_sycocaDict->remove( name );
}
diff --git a/kdecore/ksycocafactory.h b/kdecore/ksycocafactory.h
index 65bb9d98e..b7def5369 100644
--- a/kdecore/ksycocafactory.h
+++ b/kdecore/ksycocafactory.h
@@ -22,15 +22,15 @@
#include "ksycocatype.h"
#include "ksycocaentry.h"
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
class KSycoca;
class QStringList;
class QString;
class KSycocaDict;
class KSycocaResourceList;
-typedef QDict<KSycocaEntry::Ptr> KSycocaEntryDict;
+typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
/**
* @internal
@@ -65,7 +65,7 @@ public:
* Construct an entry from a config file.
* To be implemented in the real factories.
*/
- virtual KSycocaEntry *createEntry(const QString &file, const char *resource) = 0;
+ virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
/**
* Add an entry
@@ -99,7 +99,7 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Writes out a header to the stream 'str'.
@@ -108,7 +108,7 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* @return the resources for which this factory is responsible.
@@ -122,7 +122,7 @@ protected:
int m_sycocaDictOffset;
int m_beginEntryOffset;
int m_endEntryOffset;
- QDataStream *m_str;
+ TQDataStream *m_str;
KSycocaResourceList *m_resourceList;
KSycocaEntryDict *m_entryDict;
@@ -134,7 +134,7 @@ protected:
/** This, instead of a typedef, allows to declare "class ..." in header files
* @internal
*/
-class KDECORE_EXPORT KSycocaFactoryList : public QPtrList<KSycocaFactory>
+class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
{
public:
KSycocaFactoryList() { }
diff --git a/kdecore/ktempdir.cpp b/kdecore/ktempdir.cpp
index 141ee71a0..70a442730 100644
--- a/kdecore/ktempdir.cpp
+++ b/kdecore/ktempdir.cpp
@@ -44,8 +44,8 @@
#define _PATH_TMP "/tmp"
#endif
-#include <qdatetime.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
#include "kglobal.h"
#include "kapplication.h"
@@ -56,7 +56,7 @@
#include <kdebug.h>
#include "kde_file.h"
-KTempDir::KTempDir(QString directoryPrefix, int mode)
+KTempDir::KTempDir(TQString directoryPrefix, int mode)
{
bAutoDelete = false;
bExisting = false;
@@ -69,26 +69,26 @@ KTempDir::KTempDir(QString directoryPrefix, int mode)
}
bool
-KTempDir::create(const QString &directoryPrefix, int mode)
+KTempDir::create(const TQString &directoryPrefix, int mode)
{
// make sure the random seed is randomized
(void) KApplication::random();
- QCString nme = QFile::encodeName(directoryPrefix) + "XXXXXX";
+ TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
char *realName;
if((realName=mkdtemp(nme.data())) == 0)
{
// Recreate it for the warning, mkdtemps emptied it
- QCString nme = QFile::encodeName(directoryPrefix) + "XXXXXX";
+ TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
qWarning("KTempDir: Error trying to create %s: %s", nme.data(), strerror(errno));
mError = errno;
- mTmpName = QString::null;
+ mTmpName = TQString::null;
return false;
}
// got a return value != 0
- QCString realNameStr(realName);
- mTmpName = QFile::decodeName(realNameStr)+"/";
+ TQCString realNameStr(realName);
+ mTmpName = TQFile::decodeName(realNameStr)+"/";
kdDebug(180) << "KTempDir: Temporary directory created :" << mTmpName << endl;
mode_t tmp = 0;
mode_t umsk = umask(tmp);
@@ -130,10 +130,10 @@ KTempDir::existing() const
return bExisting;
}
-QDir *
+TQDir *
KTempDir::qDir()
{
- if (bExisting) return new QDir(mTmpName);
+ if (bExisting) return new TQDir(mTmpName);
return 0;
}
@@ -150,7 +150,7 @@ KTempDir::unlink()
// Auxiliary recursive function for removeDirs
static bool
-rmtree(const QCString& name)
+rmtree(const TQCString& name)
{
kdDebug() << "Checking directory for remove " << name << endl;
KDE_struct_stat st;
@@ -169,7 +169,7 @@ rmtree(const QCString& name)
kdDebug() << "CHECKING " << name << "/" << ep->d_name << endl;
if ( !qstrcmp( ep->d_name, "." ) || !qstrcmp( ep->d_name, ".." ) )
continue;
- QCString newName( name );
+ TQCString newName( name );
newName += "/"; // Careful: do not add '/' instead or you get problems with Qt3.
newName += ep->d_name;
/*
@@ -205,13 +205,13 @@ rmtree(const QCString& name)
}
bool
-KTempDir::removeDir(const QString& path)
+KTempDir::removeDir(const TQString& path)
{
kdDebug() << k_funcinfo << " " << path << endl;
- if ( !QFile::exists( path ) )
+ if ( !TQFile::exists( path ) )
return true; // The goal is that there is no directory
- const QCString cstr( QFile::encodeName( path ) );
+ const TQCString cstr( TQFile::encodeName( path ) );
return rmtree( cstr );
}
diff --git a/kdecore/ktempdir.h b/kdecore/ktempdir.h
index e8455e479..7f47276ab 100644
--- a/kdecore/ktempdir.h
+++ b/kdecore/ktempdir.h
@@ -20,7 +20,7 @@
#ifndef _KTEMPDIR_H_
#define _KTEMPDIR_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include "kdelibs_export.h"
@@ -59,7 +59,7 @@ public:
*
* The default \p directoryPrefix is "$KDEHOME/tmp-$HOST/appname"
* @param directoryPrefix the prefix of the file name, or
- * QString::null for the default value
+ * TQString::null for the default value
* @param mode the file permissions,
* almost always in octal. The first digit selects permissions for
* the user who owns the file: read (4), write (2), and execute
@@ -68,7 +68,7 @@ public:
* users not in the file's group, with the same values.
*
**/
- KTempDir(QString directoryPrefix=QString::null,
+ KTempDir(TQString directoryPrefix=TQString::null,
int mode = 0700 );
@@ -97,18 +97,18 @@ public:
/**
* Returns the full path and name of the directory, including a trailing '/'.
- * @return The name of the directory, or QString::null if creating the
+ * @return The name of the directory, or TQString::null if creating the
* directory has failed or the directory has been unlinked
**/
- QString name() const;
+ TQString name() const;
/**
- * Returns the QDir* of the temporary directory.
- * @return QDir directory information of the directory or 0 if their is no managed directory
+ * Returns the TQDir* of the temporary directory.
+ * @return TQDir directory information of the directory or 0 if their is no managed directory
* The caller has to free the pointer open for writing to the
**/
- QDir *qDir();
+ TQDir *qDir();
/**
* Deletes the directory recursively
@@ -141,7 +141,7 @@ public:
* (Use errno for more details about the error.)
* @since 3.5.2
*/
- static bool removeDir( const QString& path );
+ static bool removeDir( const TQString& path );
protected:
@@ -152,7 +152,7 @@ protected:
* @param mode directory permissions
* @return bool true upon sucess
*/
- bool create(const QString &directoryPrefix, int mode);
+ bool create(const TQString &directoryPrefix, int mode);
/**
* Sets the errno value
@@ -162,7 +162,7 @@ protected:
private:
int mError;
- QString mTmpName;
+ TQString mTmpName;
bool bExisting;
bool bAutoDelete;
diff --git a/kdecore/ktempfile.cpp b/kdecore/ktempfile.cpp
index 9c6c8cdfb..c04f725fe 100644
--- a/kdecore/ktempfile.cpp
+++ b/kdecore/ktempfile.cpp
@@ -43,10 +43,10 @@
#define _PATH_TMP "/tmp"
#endif
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qdatastream.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqdatastream.h>
+#include <tqtextstream.h>
#include "kglobal.h"
#include "kapplication.h"
@@ -56,8 +56,8 @@
#include "kde_file.h"
#include "kdebug.h"
-/* antlarr: KDE 4: make the parameters const QString & */
-KTempFile::KTempFile(QString filePrefix, QString fileExtension, int mode)
+/* antlarr: KDE 4: make the parameters const TQString & */
+KTempFile::KTempFile(TQString filePrefix, TQString fileExtension, int mode)
{
bAutoDelete = false;
mFd = -1;
@@ -89,26 +89,26 @@ KTempFile::KTempFile(bool)
}
bool
-KTempFile::create(const QString &filePrefix, const QString &fileExtension,
+KTempFile::create(const TQString &filePrefix, const TQString &fileExtension,
int mode)
{
// make sure the random seed is randomized
(void) KApplication::random();
- QCString ext = QFile::encodeName(fileExtension);
- QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext;
+ TQCString ext = TQFile::encodeName(fileExtension);
+ TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext;
if((mFd = mkstemps(nme.data(), ext.length())) < 0)
{
// Recreate it for the warning, mkstemps emptied it
- QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext;
+ TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext;
kdWarning() << "KTempFile: Error trying to create " << nme << ": " << strerror(errno) << endl;
mError = errno;
- mTmpName = QString::null;
+ mTmpName = TQString::null;
return false;
}
// got a file descriptor. nme contains the name
- mTmpName = QFile::decodeName(nme);
+ mTmpName = TQFile::decodeName(nme);
mode_t tmp = 0;
mode_t umsk = umask(tmp);
umask(umsk);
@@ -166,35 +166,35 @@ KTempFile::fstream()
return mStream;
}
-QFile *
+TQFile *
KTempFile::file()
{
if (mFile) return mFile;
if ( !fstream() ) return 0;
- mFile = new QFile();
+ mFile = new TQFile();
mFile->setName( name() );
mFile->open(IO_ReadWrite, mStream);
return mFile;
}
-QTextStream *
+TQTextStream *
KTempFile::textStream()
{
if (mTextStream) return mTextStream;
if ( !file() ) return 0; // Initialize mFile
- mTextStream = new QTextStream( mFile );
+ mTextStream = new TQTextStream( mFile );
return mTextStream;
}
-QDataStream *
+TQDataStream *
KTempFile::dataStream()
{
if (mDataStream) return mDataStream;
if ( !file() ) return 0; // Initialize mFile
- mDataStream = new QDataStream( mFile );
+ mDataStream = new TQDataStream( mFile );
return mDataStream;
}
@@ -202,8 +202,8 @@ void
KTempFile::unlink()
{
if (!mTmpName.isEmpty())
- QFile::remove( mTmpName );
- mTmpName = QString::null;
+ TQFile::remove( mTmpName );
+ mTmpName = TQString::null;
}
#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0
diff --git a/kdecore/ktempfile.h b/kdecore/ktempfile.h
index c868a3fa1..bba2d6442 100644
--- a/kdecore/ktempfile.h
+++ b/kdecore/ktempfile.h
@@ -20,7 +20,7 @@
#ifndef _KTEMPFILE_H_
#define _KTEMPFILE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include "kdelibs_export.h"
@@ -62,14 +62,14 @@ public:
*
* The default @p filePrefix is "$KDEHOME/tmp-$HOST/appname/"
* The default @p fileExtension is ".tmp"
- * @param filePrefix the prefix of the file name, or QString::null
+ * @param filePrefix the prefix of the file name, or TQString::null
* for the default value
- * @param fileExtension the extension of the prefix, or QString::null for the
+ * @param fileExtension the extension of the prefix, or TQString::null for the
* default value
* @param mode the file permissions
**/
- KTempFile(QString filePrefix=QString::null,
- QString fileExtension=QString::null,
+ KTempFile(TQString filePrefix=TQString::null,
+ TQString fileExtension=TQString::null,
int mode = 0600 );
@@ -116,10 +116,10 @@ public:
* since it may lead to the kind of symlink vulnerabilities that the KTempFile
* design attempts to prevent.
*
- * @return The name of the file, or QString::null if opening the
+ * @return The name of the file, or TQString::null if opening the
* file has failed or the file has been unlinked already.
**/
- QString name() const;
+ TQString name() const;
/**
* An integer file descriptor open for writing to the file
@@ -136,25 +136,25 @@ public:
FILE *fstream();
/**
- * Returns the QTextStream for writing.
- * @return QTextStream open for writing to the file, or 0
+ * Returns the TQTextStream for writing.
+ * @return TQTextStream open for writing to the file, or 0
* if opening the file failed
**/
- QTextStream *textStream();
+ TQTextStream *textStream();
/**
- * Returns a QDataStream for writing.
- * @return QDataStream open for writing to the file, or 0
+ * Returns a TQDataStream for writing.
+ * @return TQDataStream open for writing to the file, or 0
* if opening the file failed
**/
- QDataStream *dataStream();
+ TQDataStream *dataStream();
/**
- * Returns a QFile.
- * @return A QFile open for writing to the file, or 0 if
+ * Returns a TQFile.
+ * @return A TQFile open for writing to the file, or 0 if
* opening the file failed.
**/
- QFile *file();
+ TQFile *file();
/**
* Unlinks the file from the directory. The file is
@@ -192,18 +192,18 @@ protected:
* @internal
* Create function used internally by KTempFile and KSaveFile
**/
- bool create(const QString &filePrefix,
- const QString &fileExtension, int mode);
+ bool create(const TQString &filePrefix,
+ const TQString &fileExtension, int mode);
void setError(int error) { mError = error; }
private:
int mError;
- QString mTmpName;
+ TQString mTmpName;
int mFd;
FILE *mStream;
- QFile *mFile;
- QTextStream *mTextStream;
- QDataStream *mDataStream;
+ TQFile *mFile;
+ TQTextStream *mTextStream;
+ TQDataStream *mDataStream;
bool bOpen;
bool bAutoDelete;
diff --git a/kdecore/ktimezones.cpp b/kdecore/ktimezones.cpp
index c74dc8143..5ebf9bd4a 100644
--- a/kdecore/ktimezones.cpp
+++ b/kdecore/ktimezones.cpp
@@ -26,11 +26,11 @@
#include <kstringhandler.h>
#include <ktempfile.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <cerrno>
#include <climits>
@@ -52,7 +52,7 @@ class AbbreviationsMatch :
public KTimezoneDetails
{
public:
- AbbreviationsMatch(const QString &stdZone, const QString &dstZone = "")
+ AbbreviationsMatch(const TQString &stdZone, const TQString &dstZone = "")
{
m_stdZone = stdZone;
m_dstZone = dstZone;
@@ -72,10 +72,10 @@ public:
private:
bool m_foundStd;
bool m_foundDst;
- QString m_stdZone;
- QString m_dstZone;
+ TQString m_stdZone;
+ TQString m_dstZone;
- virtual void gotAbbreviation(int /*index*/, const QString &value)
+ virtual void gotAbbreviation(int /*index*/, const TQString &value)
{
if (m_stdZone == value)
{
@@ -100,7 +100,7 @@ public:
{
}
- virtual bool parse(const QString &/*zone*/, KTimezoneDetails &/*dataReceiver*/) const
+ virtual bool parse(const TQString &/*zone*/, KTimezoneDetails &/*dataReceiver*/) const
{
return true;
}
@@ -138,7 +138,7 @@ public:
return m_isDst;
}
- QString abbreviation()
+ TQString abbreviation()
{
return m_abbr;
}
@@ -150,7 +150,7 @@ private:
int m_abbrIndex;
int m_offset;
bool m_isDst;
- QString m_abbr;
+ TQString m_abbr;
virtual void gotTransitionTime(int index, unsigned transitionTime)
{
@@ -181,7 +181,7 @@ private:
}
}
- virtual void gotAbbreviation(int index, const QString &value)
+ virtual void gotAbbreviation(int index, const TQString &value)
{
if (index == m_abbrIndex)
{
@@ -203,9 +203,9 @@ bool KTimezone::isValidLongitude(float longitude)
}
KTimezone::KTimezone(
- KSharedPtr<KTimezoneSource> db, const QString& name,
- const QString &countryCode, float latitude, float longitude,
- const QString &comment) :
+ KSharedPtr<KTimezoneSource> db, const TQString& name,
+ const TQString &countryCode, float latitude, float longitude,
+ const TQString &comment) :
m_db(db),
m_name(name),
m_countryCode(countryCode),
@@ -227,12 +227,12 @@ KTimezone::~KTimezone()
// delete d;
}
-QString KTimezone::comment() const
+TQString KTimezone::comment() const
{
return m_comment;
}
-QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime) const
+TQDateTime KTimezone::convert(const KTimezone *newZone, const TQDateTime &dateTime) const
{
char *originalZone = ::getenv("TZ");
@@ -244,7 +244,7 @@ QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime
// Set the timezone and convert UTC to localtime.
::setenv("TZ", newZone->name().utf8(), 1);
tzset();
- QDateTime remoteTime;
+ TQDateTime remoteTime;
remoteTime.setTime_t(utc, Qt::LocalTime);
// Now restore things
@@ -260,7 +260,7 @@ QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime
return remoteTime;
}
-QString KTimezone::countryCode() const
+TQString KTimezone::countryCode() const
{
return m_countryCode;
}
@@ -275,7 +275,7 @@ float KTimezone::longitude() const
return m_longitude;
}
-QString KTimezone::name() const
+TQString KTimezone::name() const
{
return m_name;
}
@@ -285,12 +285,12 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const
char *originalZone = ::getenv("TZ");
// Get the time in the current timezone.
- QDateTime basisTime = QDateTime::currentDateTime(basisSpec);
+ TQDateTime basisTime = TQDateTime::currentDateTime(basisSpec);
// Set the timezone and find out what time it is there compared to the basis.
::setenv("TZ", m_name.utf8(), 1);
tzset();
- QDateTime remoteTime = QDateTime::currentDateTime(Qt::LocalTime);
+ TQDateTime remoteTime = TQDateTime::currentDateTime(Qt::LocalTime);
int offset = remoteTime.secsTo(basisTime);
// Now restore things
@@ -306,7 +306,7 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const
return offset;
}
-int KTimezone::offset(const QDateTime &dateTime) const
+int KTimezone::offset(const TQDateTime &dateTime) const
{
OffsetFind finder(dateTime.toTime_t());
int result = 0;
@@ -370,7 +370,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
// is the place to look. The TZI binary value is the TIME_ZONE_INFORMATION structure.
//
// For Unix its all easy except knowing where to look. Try the LSB location first.
- QFile f;
+ TQFile f;
m_zoneinfoDir = "/usr/share/zoneinfo";
f.setName(m_zoneinfoDir + "/zone.tab");
if (!f.open(IO_ReadOnly))
@@ -412,16 +412,16 @@ const KTimezones::ZoneMap KTimezones::allZones()
}
// Parse the zone.tab.
- QTextStream str(&f);
- QRegExp lineSeparator("[ \t]");
- QRegExp ordinateSeparator("[+-]");
+ TQTextStream str(&f);
+ TQRegExp lineSeparator("[ \t]");
+ TQRegExp ordinateSeparator("[+-]");
KSharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
while (!str.atEnd())
{
- QString line = str.readLine();
+ TQString line = str.readLine();
if (line.isEmpty() || '#' == line[0])
continue;
- QStringList tokens = KStringHandler::perlSplit(lineSeparator, line, 4);
+ TQStringList tokens = KStringHandler::perlSplit(lineSeparator, line, 4);
if (tokens.count() < 3)
{
kdError() << "invalid record: " << line << endl;
@@ -429,7 +429,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
}
// Got three tokens. Now check for two ordinates plus first one is "".
- QStringList ordinates = KStringHandler::perlSplit(ordinateSeparator, tokens[1], 2);
+ TQStringList ordinates = KStringHandler::perlSplit(ordinateSeparator, tokens[1], 2);
if (ordinates.count() < 2)
{
kdError() << "invalid coordinates: " << tokens[1] << endl;
@@ -452,7 +452,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
/**
* Convert sHHMM or sHHMMSS to a floating point number of degrees.
*/
-float KTimezones::convertCoordinate(const QString &coordinate)
+float KTimezones::convertCoordinate(const TQString &coordinate)
{
int value = coordinate.toInt();
int degrees = 0;
@@ -500,7 +500,7 @@ const KTimezone *KTimezones::local()
return local;
// Try to match /etc/localtime against the list of zoneinfo files.
- QFile f;
+ TQFile f;
f.setName("/etc/localtime");
if (f.open(IO_ReadOnly))
{
@@ -508,8 +508,8 @@ const KTimezone *KTimezones::local()
KMD5 context("");
context.reset();
context.update(f);
- QIODevice::Offset referenceSize = f.size();
- QString referenceMd5Sum = context.hexDigest();
+ TQIODevice::Offset referenceSize = f.size();
+ TQString referenceMd5Sum = context.hexDigest();
f.close();
if (!m_zoneinfoDir.isEmpty())
{
@@ -520,8 +520,8 @@ const KTimezone *KTimezones::local()
f.setName(m_zoneinfoDir + '/' + zone->name());
if (f.open(IO_ReadOnly))
{
- QIODevice::Offset candidateSize = f.size();
- QString candidateMd5Sum;
+ TQIODevice::Offset candidateSize = f.size();
+ TQString candidateMd5Sum;
if (candidateSize == referenceSize)
{
// Only do the heavy lifting for file sizes which match.
@@ -544,7 +544,7 @@ const KTimezone *KTimezones::local()
return local;
// BSD support.
- QString fileZone;
+ TQString fileZone;
f.setName("/etc/timezone");
if (!f.open(IO_ReadOnly))
{
@@ -558,8 +558,8 @@ const KTimezone *KTimezones::local()
}
else
{
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
// Read the last line starting "TZ=".
while (!ts.atEnd())
@@ -578,8 +578,8 @@ const KTimezone *KTimezones::local()
}
else
{
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
// Read the first line.
if (!ts.atEnd())
@@ -619,7 +619,7 @@ const KTimezone *KTimezones::local()
return m_UTC;
}
-const KTimezone *KTimezones::zone(const QString &name)
+const KTimezone *KTimezones::zone(const TQString &name)
{
if (name.isEmpty())
return m_UTC;
@@ -639,7 +639,7 @@ KTimezoneDetails::~KTimezoneDetails()
{
}
-void KTimezoneDetails::gotAbbreviation(int /*index*/, const QString &)
+void KTimezoneDetails::gotAbbreviation(int /*index*/, const TQString &)
{}
void KTimezoneDetails::gotHeader(
@@ -671,7 +671,7 @@ void KTimezoneDetails::parseEnded()
void KTimezoneDetails::parseStarted()
{}
-KTimezoneSource::KTimezoneSource(const QString &db) :
+KTimezoneSource::KTimezoneSource(const TQString &db) :
m_db(db)
{
}
@@ -680,14 +680,14 @@ KTimezoneSource::~KTimezoneSource()
{
}
-QString KTimezoneSource::db()
+TQString KTimezoneSource::db()
{
return m_db;
}
-bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver) const
+bool KTimezoneSource::parse(const TQString &zone, KTimezoneDetails &dataReceiver) const
{
- QFile f(m_db + '/' + zone);
+ TQFile f(m_db + '/' + zone);
if (!f.open(IO_ReadOnly))
{
kdError() << "Cannot open " << f.name() << endl;
@@ -718,9 +718,9 @@ bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver)
Q_UINT8 isStandard;
Q_UINT8 isUTC;
- QDataStream str(&f);
+ TQDataStream str(&f);
str >> T >> z >> i_ >> f_;
- // kdError() << "signature: " << QChar(T) << QChar(z) << QChar(i_) << QChar(f_) << endl;
+ // kdError() << "signature: " << TQChar(T) << TQChar(z) << TQChar(i_) << TQChar(f_) << endl;
unsigned i;
for (i = 0; i < 4; i++)
str >> tzh.ttisgmtcnt;
@@ -752,7 +752,7 @@ bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver)
kdError() << "excessive length for timezone abbreviations: " << tzh.charcnt << endl;
return false;
}
- QByteArray array(tzh.charcnt);
+ TQByteArray array(tzh.charcnt);
str.readRawBytes(array.data(), array.size());
char *abbrs = array.data();
if (abbrs[tzh.charcnt - 1] != 0)
diff --git a/kdecore/ktimezones.h b/kdecore/ktimezones.h
index 28b7e1ad9..3055f202f 100644
--- a/kdecore/ktimezones.h
+++ b/kdecore/ktimezones.h
@@ -21,10 +21,10 @@
#define _KTIMEZONES_H
#include "kdelibs_export.h"
-#include <qdatetime.h>
-#include <qnamespace.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <ksharedptr.h>
class KTimezoneDetails;
@@ -52,24 +52,24 @@ class KDECORE_EXPORT KTimezoneSource :
public KShared
{
public:
- KTimezoneSource(const QString &db);
+ KTimezoneSource(const TQString &db);
virtual ~KTimezoneSource();
/**
* Location of system timezone information.
* @return value which can be combined with zone name to retrieve timezone info.
*/
- virtual QString db();
+ virtual TQString db();
/**
* Extract timezone detail information. The default implementation consists
* of a parser for zoneinfo files in tzfile(5).
* @return true if the parse encountered no errors.
*/
- virtual bool parse(const QString &zone, KTimezoneDetails &dataReceiver) const;
+ virtual bool parse(const TQString &zone, KTimezoneDetails &dataReceiver) const;
private:
- QString m_db;
+ TQString m_db;
};
/**
@@ -114,9 +114,9 @@ public:
* @param comment description of the timezone, if any.
*/
KTimezone(
- KSharedPtr<KTimezoneSource> db, const QString &name,
- const QString &countryCode = QString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
- const QString &comment = QString());
+ KSharedPtr<KTimezoneSource> db, const TQString &name,
+ const TQString &countryCode = TQString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
+ const TQString &comment = TQString());
~KTimezone();
/**
@@ -124,14 +124,14 @@ public:
*
* @return name in system-dependent format.
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the two-letter country code of the timezone.
*
* @return ISO 3166 2-character country code, empty if unknown.
*/
- QString countryCode() const;
+ TQString countryCode() const;
/**
* Returns the latitude of the timezone.
@@ -164,7 +164,7 @@ public:
*
* @return offset in seconds.
*/
- int offset(const QDateTime &dateTime) const;
+ int offset(const TQDateTime &dateTime) const;
/**
* Convert a date/time (which is interpreted as being localtime in this
@@ -172,14 +172,14 @@ public:
*
* @return converted date/time.
*/
- QDateTime convert(const KTimezone *newZone, const QDateTime &dateTime) const;
+ TQDateTime convert(const KTimezone *newZone, const TQDateTime &dateTime) const;
/**
* Returns any comment for the timezone.
*
* @return comment, may be empty.
*/
- QString comment() const;
+ TQString comment() const;
/**
* Extract timezone detail information.
@@ -192,11 +192,11 @@ private:
KTimezone& operator=(const KTimezone&);
KSharedPtr<KTimezoneSource> m_db;
- QString m_name;
- QString m_countryCode;
+ TQString m_name;
+ TQString m_countryCode;
float m_latitude;
float m_longitude;
- QString m_comment;
+ TQString m_comment;
KTimezonePrivate *d;
};
@@ -265,7 +265,7 @@ public:
* is NOT a simple incrementing integer, rather it matches the sequence
* of abbrIndex values from {@link gotLocalTime() }.
*/
- virtual void gotAbbreviation(int index, const QString &abbr);
+ virtual void gotAbbreviation(int index, const TQString &abbr);
/**
* Called when a leap second adjustment is seen.
@@ -321,9 +321,9 @@ public:
* @param name Name of timezone. Empty is equivalent to UTC.
* @return named timezone, NULL on error.
*/
- const KTimezone *zone(const QString &name);
+ const KTimezone *zone(const TQString &name);
- typedef QMap<QString, KTimezone *> ZoneMap;
+ typedef TQMap<TQString, KTimezone *> ZoneMap;
/**
* Return timezone database.
@@ -340,9 +340,9 @@ private:
KTimezones(const KTimezones&);
KTimezones& operator=(const KTimezones&);
- float convertCoordinate(const QString &coordinate);
+ float convertCoordinate(const TQString &coordinate);
- QString m_zoneinfoDir;
+ TQString m_zoneinfoDir;
ZoneMap *m_zones;
KTimezone *m_UTC;
KTimezonesPrivate *d;
diff --git a/kdecore/kuniqueapplication.cpp b/kdecore/kuniqueapplication.cpp
index 1ef94fbbe..7cd0575cc 100644
--- a/kdecore/kuniqueapplication.cpp
+++ b/kdecore/kuniqueapplication.cpp
@@ -29,9 +29,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kcmdlineargs.h>
@@ -71,14 +71,14 @@ static KCmdLineOptions kunique_options[] =
};
struct DCOPRequest {
- QCString fun;
- QByteArray data;
+ TQCString fun;
+ TQByteArray data;
DCOPClientTransaction *transaction;
};
class KUniqueApplicationPrivate {
public:
- QPtrList <DCOPRequest> requestList;
+ TQPtrList <DCOPRequest> requestList;
bool processingRequest;
bool firstInstance;
};
@@ -104,13 +104,13 @@ KUniqueApplication::start()
delete args;
#endif
- QCString appName = KCmdLineArgs::about->appName();
+ TQCString appName = KCmdLineArgs::about->appName();
if (s_nofork)
{
if (s_multipleInstances)
{
- QCString pid;
+ TQCString pid;
pid.setNum(getpid());
appName = appName + "-" + pid;
}
@@ -149,14 +149,14 @@ KUniqueApplication::start()
// Child
::close(fd[0]);
if (s_multipleInstances)
- appName.append("-").append(QCString().setNum(getpid()));
+ appName.append("-").append(TQCString().setNum(getpid()));
dc = dcopClient();
{
- QCString regName = dc->registerAs(appName, false);
+ TQCString regName = dc->registerAs(appName, false);
if (regName.isEmpty())
{
// Check DISPLAY
- if (QCString(getenv(DISPLAY)).isEmpty())
+ if (TQCString(getenv(DISPLAY)).isEmpty())
{
kdError() << "KUniqueApplication: Can't determine DISPLAY. Aborting." << endl;
result = -1; // Error
@@ -238,7 +238,7 @@ KUniqueApplication::start()
// DCOPClient::emergencyClose();
// dcopClient()->detach();
if (s_multipleInstances)
- appName.append("-").append(QCString().setNum(fork_result));
+ appName.append("-").append(TQCString().setNum(fork_result));
::close(fd[1]);
for(;;)
{
@@ -271,7 +271,7 @@ KUniqueApplication::start()
kdError() << "KUniqueApplication: Registering failed!" << endl;
}
- QCString new_asn_id;
+ TQCString new_asn_id;
#if defined Q_WS_X11
KStartupInfoId id;
if( kapp != NULL ) // KApplication constructor unsets the env. variable
@@ -282,14 +282,14 @@ KUniqueApplication::start()
new_asn_id = id.id();
#endif
- QByteArray data, reply;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data, reply;
+ TQDataStream ds(data, IO_WriteOnly);
KCmdLineArgs::saveAppArgs(ds);
ds << new_asn_id;
dc->setPriorityCall(true);
- QCString replyType;
+ TQCString replyType;
if (!dc->call(appName, KCmdLineArgs::about->appName(), "newInstance()", data, replyType, reply))
{
kdError() << "Communication problem with " << KCmdLineArgs::about->appName() << ", it probably crashed." << endl;
@@ -303,7 +303,7 @@ KUniqueApplication::start()
delete dc; // Clean up DCOP commmunication
::exit(255);
}
- QDataStream rs(reply, IO_ReadOnly);
+ TQDataStream rs(reply, IO_ReadOnly);
int exitCode;
rs >> exitCode;
delete dc; // Clean up DCOP commmunication
@@ -324,7 +324,7 @@ KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool c
if (s_nofork)
// Can't call newInstance directly from the constructor since it's virtual...
- QTimer::singleShot( 0, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(newInstanceNoFork()) );
}
@@ -340,7 +340,7 @@ KUniqueApplication::KUniqueApplication(Display *display, Qt::HANDLE visual,
if (s_nofork)
// Can't call newInstance directly from the constructor since it's virtual...
- QTimer::singleShot( 0, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(newInstanceNoFork()) );
}
#endif
@@ -350,7 +350,7 @@ KUniqueApplication::~KUniqueApplication()
delete d;
}
-// this gets called before even entering QApplication::QApplication()
+// this gets called before even entering TQApplication::TQApplication()
KInstance* KUniqueApplication::initHack( bool configUnique )
{
KInstance* inst = new KInstance( KCmdLineArgs::about );
@@ -370,7 +370,7 @@ void KUniqueApplication::newInstanceNoFork()
if (dcopClient()->isSuspended())
{
// Try again later.
- QTimer::singleShot( 200, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 200, this, TQT_SLOT(newInstanceNoFork()) );
return;
}
@@ -390,8 +390,8 @@ void KUniqueApplication::newInstanceNoFork()
// What to do with the return value ?
}
-bool KUniqueApplication::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+bool KUniqueApplication::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
if (fun == "newInstance()")
{
@@ -402,7 +402,7 @@ bool KUniqueApplication::process(const QCString &fun, const QByteArray &data,
}
void
-KUniqueApplication::delayRequest(const QCString &fun, const QByteArray &data)
+KUniqueApplication::delayRequest(const TQCString &fun, const TQByteArray &data)
{
DCOPRequest *request = new DCOPRequest;
request->fun = fun;
@@ -411,7 +411,7 @@ KUniqueApplication::delayRequest(const QCString &fun, const QByteArray &data)
d->requestList.append(request);
if (!d->processingRequest)
{
- QTimer::singleShot(0, this, SLOT(processDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processDelayed()));
}
}
@@ -421,22 +421,22 @@ KUniqueApplication::processDelayed()
if (dcopClient()->isSuspended())
{
// Try again later.
- QTimer::singleShot( 200, this, SLOT(processDelayed()));
+ TQTimer::singleShot( 200, this, TQT_SLOT(processDelayed()));
return;
}
d->processingRequest = true;
while( !d->requestList.isEmpty() )
{
DCOPRequest *request = d->requestList.take(0);
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
if (request->fun == "newInstance()") {
dcopClient()->setPriorityCall(false);
- QDataStream ds(request->data, IO_ReadOnly);
+ TQDataStream ds(request->data, IO_ReadOnly);
KCmdLineArgs::loadAppArgs(ds);
if( !ds.atEnd()) // backwards compatibility
{
- QCString asn_id;
+ TQCString asn_id;
ds >> asn_id;
setStartupId( asn_id );
}
@@ -447,7 +447,7 @@ KUniqueApplication::processDelayed()
if( s_handleAutoStarted )
KStartupInfo::handleAutoAppStartedSending(); // KDE4 remove?
#endif
- QDataStream rs(replyData, IO_WriteOnly);
+ TQDataStream rs(replyData, IO_WriteOnly);
rs << exitCode;
replyType = "int";
}
diff --git a/kdecore/kuniqueapplication.h b/kdecore/kuniqueapplication.h
index 049627f62..f5c4bcc18 100644
--- a/kdecore/kuniqueapplication.h
+++ b/kdecore/kuniqueapplication.h
@@ -152,8 +152,8 @@ public:
* @param replyData the reply
* @see DCOPObject
*/
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
/**
* Creates a new "instance" of the application.
@@ -194,7 +194,7 @@ private:
/**
* Delays the processing of a DCOP request.
*/
- void delayRequest(const QCString &fun, const QByteArray &data);
+ void delayRequest(const TQCString &fun, const TQByteArray &data);
private slots:
/**
diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp
index 0f54d19c4..2d2082e7f 100644
--- a/kdecore/kurl.cpp
+++ b/kdecore/kurl.cpp
@@ -38,14 +38,14 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qurl.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qmap.h>
-#include <qtextcodec.h>
-#include <qmutex.h>
+#include <tqurl.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqmap.h>
+#include <tqtextcodec.h>
+#include <tqmutex.h>
#ifdef Q_WS_WIN
# define KURL_ROOTDIR_PATH "C:/"
@@ -53,28 +53,28 @@
# define KURL_ROOTDIR_PATH "/"
#endif
-static const QString fileProt = "file";
+static const TQString fileProt = "file";
-static QTextCodec * codecForHint( int encoding_hint /* not 0 ! */ )
+static TQTextCodec * codecForHint( int encoding_hint /* not 0 ! */ )
{
- return QTextCodec::codecForMib( encoding_hint );
+ return TQTextCodec::codecForMib( encoding_hint );
}
// encoding_offset:
// 0 encode both @ and /
// 1 encode @ but not /
// 2 encode neither @ or /
-static QString encode( const QString& segment, int encoding_offset, int encoding_hint, bool isRawURI = false )
+static TQString encode( const TQString& segment, int encoding_offset, int encoding_hint, bool isRawURI = false )
{
const char *encode_string = "/@<>#\"&?={}|^~[]\'`\\:+%";
encode_string += encoding_offset;
- QCString local;
+ TQCString local;
if (encoding_hint==0)
local = segment.local8Bit();
else
{
- QTextCodec * textCodec = codecForHint( encoding_hint );
+ TQTextCodec * textCodec = codecForHint( encoding_hint );
if (!textCodec)
local = segment.local8Bit();
else
@@ -84,10 +84,10 @@ static QString encode( const QString& segment, int encoding_offset, int encoding
int old_length = isRawURI ? local.size() - 1 : local.length();
if ( !old_length )
- return segment.isNull() ? QString::null : QString(""); // differentiate null and empty
+ return segment.isNull() ? TQString::null : TQString(""); // differentiate null and empty
// a worst case approximation
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -115,12 +115,12 @@ static QString encode( const QString& segment, int encoding_offset, int encoding
new_segment[ new_length++ ] = local[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-static QString encodeHost( const QString& segment, bool encode_slash, int encoding_hint )
+static TQString encodeHost( const TQString& segment, bool encode_slash, int encoding_hint )
{
// Hostnames are encoded differently
// we use the IDNA transformation instead
@@ -129,7 +129,7 @@ static QString encodeHost( const QString& segment, bool encode_slash, int encodi
#ifndef KDE_QT_ONLY
Q_UNUSED( encode_slash );
Q_UNUSED( encoding_hint );
- QString host = KIDNA::toAscii(segment);
+ TQString host = KIDNA::toAscii(segment);
if (host.isEmpty())
return segment;
return host;
@@ -159,15 +159,15 @@ static int hex2int( unsigned int _char )
// KURL(url.prettyURL()).url()
-static QString lazy_encode( const QString& segment, bool encodeAt=true )
+static TQString lazy_encode( const TQString& segment, bool encodeAt=true )
{
int old_length = segment.length();
if ( !old_length )
- return QString::null;
+ return TQString::null;
// a worst case approximation
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -199,28 +199,28 @@ static QString lazy_encode( const QString& segment, bool encodeAt=true )
new_segment[ new_length++ ] = segment[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-static void decode( const QString& segment, QString &decoded, QString &encoded, int encoding_hint=0, bool updateDecoded = true, bool isRawURI = false )
+static void decode( const TQString& segment, TQString &decoded, TQString &encoded, int encoding_hint=0, bool updateDecoded = true, bool isRawURI = false )
{
- decoded = QString::null;
+ decoded = TQString::null;
encoded = segment;
int old_length = segment.length();
if ( !old_length )
return;
- QTextCodec *textCodec = 0;
+ TQTextCodec *textCodec = 0;
if (encoding_hint)
textCodec = codecForHint( encoding_hint );
if (!textCodec)
- textCodec = QTextCodec::codecForLocale();
+ textCodec = TQTextCodec::codecForLocale();
- QCString csegment = textCodec->fromUnicode(segment);
+ TQCString csegment = textCodec->fromUnicode(segment);
// Check if everything went ok
if (textCodec->toUnicode(csegment) != segment)
{
@@ -235,7 +235,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
// make a copy of the old one
char *new_segment = new char[ old_length + 1 ];
- QChar *new_usegment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_usegment = new QChar[ old_length * 3 + 1 ];
int i = 0;
while( i < old_length )
@@ -284,7 +284,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
}
new_segment [ new_length ] = 0;
- encoded = QString( new_usegment, new_length2);
+ encoded = TQString( new_usegment, new_length2);
// Encoding specified
if (updateDecoded)
@@ -293,18 +293,18 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
if ( isRawURI ) {
int length = qstrlen( new_segment );
while ( length < new_length ) {
- decoded += QChar::null;
+ decoded += TQChar::null;
length += 1;
decoded += textCodec->toUnicode( new_segment + length );
length += qstrlen( new_segment + length );
}
}
- QCString validate = textCodec->fromUnicode(decoded);
+ TQCString validate = textCodec->fromUnicode(decoded);
if (strcmp(validate.data(), new_segment) != 0)
{
- decoded = QString::fromLocal8Bit(new_segment, new_length);
+ decoded = TQString::fromLocal8Bit(new_segment, new_length);
}
}
@@ -312,38 +312,38 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
delete [] new_usegment;
}
-static QString decode(const QString &segment, int encoding_hint = 0, bool isRawURI = false)
+static TQString decode(const TQString &segment, int encoding_hint = 0, bool isRawURI = false)
{
- QString result;
- QString tmp;
+ TQString result;
+ TQString tmp;
decode(segment, result, tmp, encoding_hint, true, isRawURI);
return result;
}
-static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool decodeDots)
+static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool decodeDots)
{
- if (_path.isEmpty()) return QString::null;
+ if (_path.isEmpty()) return TQString::null;
- if (QDir::isRelativePath(_path))
+ if (TQDir::isRelativePath(_path))
return _path; // Don't mangle mailto-style URLs
- QString path = _path;
+ TQString path = _path;
int len = path.length();
if (decodeDots)
{
#ifndef KDE_QT_ONLY
- static const QString &encodedDot = KGlobal::staticQString("%2e");
+ static const TQString &encodedDot = KGlobal::staticQString("%2e");
#else
- QString encodedDot("%2e");
+ TQString encodedDot("%2e");
#endif
if (path.find(encodedDot, 0, false) != -1)
{
#ifndef KDE_QT_ONLY
- static const QString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
+ static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
#else
- QString encodedDOT("%2E");
+ TQString encodedDOT("%2E");
#endif
path.replace(encodedDot, ".");
path.replace(encodedDOT, ".");
@@ -355,12 +355,12 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
(len > 1 && path[len-2] == '/' && path[len-1] == '.');
// The following code cleans up directory path much like
- // QDir::cleanDirPath() except it can be made to ignore multiple
+ // TQDir::cleanDirPath() except it can be made to ignore multiple
// directory separators by setting the flag to false. That fixes
// bug# 15044, mail.altavista.com and other similar brain-dead server
// implementations that do not follow what has been specified in
// RFC 2396!! (dA)
- QString result;
+ TQString result;
int cdUp, orig_pos, pos;
cdUp = 0;
@@ -388,7 +388,7 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
#ifdef Q_WS_WIN // prepend drive letter if exists (js)
if (orig_pos >= 2 && isalpha(path[0].latin1()) && path[1]==':') {
- result.prepend(QString(path[0])+":");
+ result.prepend(TQString(path[0])+":");
}
#endif
@@ -400,11 +400,11 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
return result;
}
-bool KURL::isRelativeURL(const QString &_url)
+bool KURL::isRelativeURL(const TQString &_url)
{
int len = _url.length();
if (!len) return true; // Very short relative URL.
- const QChar *str = _url.unicode();
+ const TQChar *str = _url.unicode();
// Absolute URL must start with alpha-character
if (!isalpha(str[0].latin1()))
@@ -429,9 +429,9 @@ KURL::List::List(const KURL &url)
append( url );
}
-KURL::List::List(const QStringList &list)
+KURL::List::List(const TQStringList &list)
{
- for (QStringList::ConstIterator it = list.begin();
+ for (TQStringList::ConstIterator it = list.begin();
it != list.end();
it++)
{
@@ -439,9 +439,9 @@ KURL::List::List(const QStringList &list)
}
}
-QStringList KURL::List::toStringList() const
+TQStringList KURL::List::toStringList() const
{
- QStringList lst;
+ TQStringList lst;
for( KURL::List::ConstIterator it = begin();
it != end();
it++)
@@ -462,7 +462,7 @@ KURL::~KURL()
}
-KURL::KURL( const QString &url, int encoding_hint )
+KURL::KURL( const TQString &url, int encoding_hint )
{
reset();
parse( url, encoding_hint );
@@ -471,13 +471,13 @@ KURL::KURL( const QString &url, int encoding_hint )
KURL::KURL( const char * url, int encoding_hint )
{
reset();
- parse( QString::fromLatin1(url), encoding_hint );
+ parse( TQString::fromLatin1(url), encoding_hint );
}
-KURL::KURL( const QCString& url, int encoding_hint )
+KURL::KURL( const TQCString& url, int encoding_hint )
{
reset();
- parse( QString::fromLatin1(url), encoding_hint );
+ parse( TQString::fromLatin1(url), encoding_hint );
}
KURL::KURL( const KURL& _u )
@@ -485,9 +485,9 @@ KURL::KURL( const KURL& _u )
*this = _u;
}
-QDataStream & operator<< (QDataStream & s, const KURL & a)
+TQDataStream & operator<< (TQDataStream & s, const KURL & a)
{
- QString QueryForWire=a.m_strQuery_encoded;
+ TQString QueryForWire=a.m_strQuery_encoded;
if (!a.m_strQuery_encoded.isNull())
QueryForWire.prepend("?");
@@ -497,17 +497,17 @@ QDataStream & operator<< (QDataStream & s, const KURL & a)
return s;
}
-QDataStream & operator>> (QDataStream & s, KURL & a)
+TQDataStream & operator>> (TQDataStream & s, KURL & a)
{
Q_INT8 malf;
- QString QueryFromWire;
+ TQString QueryFromWire;
s >> a.m_strProtocol >> a.m_strUser >> a.m_strPass >> a.m_strHost
>> a.m_strPath >> a.m_strPath_encoded >> QueryFromWire >> a.m_strRef_encoded
>> malf >> a.m_iPort;
a.m_bIsMalformed = (malf != 0);
if ( QueryFromWire.isNull() )
- a.m_strQuery_encoded = QString::null;
+ a.m_strQuery_encoded = TQString::null;
else if ( QueryFromWire.length() == 1 ) // empty query
a.m_strQuery_encoded = "";
else
@@ -519,13 +519,13 @@ QDataStream & operator>> (QDataStream & s, KURL & a)
}
#ifndef QT_NO_NETWORKPROTOCOL
-KURL::KURL( const QUrl &u )
+KURL::KURL( const TQUrl &u )
{
*this = u;
}
#endif
-KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
+KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
{
if (_u.hasSubURL()) // Operate on the last suburl, not the first
{
@@ -539,7 +539,7 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
// WORKAROUND THE RFC 1606 LOOPHOLE THAT ALLOWS
// http:/index.html AS A VALID SYNTAX FOR RELATIVE
// URLS. ( RFC 2396 section 5.2 item # 3 )
- QString rUrl = _rel_url;
+ TQString rUrl = _rel_url;
int len = _u.m_strProtocol.length();
if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() &&
rUrl.find( _u.m_strProtocol, 0, false ) == 0 &&
@@ -563,19 +563,19 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
else if ( isRelativeURL( rUrl) )
{
*this = _u;
- m_strQuery_encoded = QString::null;
- m_strRef_encoded = QString::null;
+ m_strQuery_encoded = TQString::null;
+ m_strRef_encoded = TQString::null;
if ( rUrl[0] == '/')
{
if ((rUrl.length() > 1) && (rUrl[1] == '/'))
{
- m_strHost = QString::null;
+ m_strHost = TQString::null;
// File protocol returns file:/// without host, strip // from rUrl
if (_u.m_strProtocol == fileProt)
rUrl.remove(0, 2);
}
- m_strPath = QString::null;
- m_strPath_encoded = QString::null;
+ m_strPath = TQString::null;
+ m_strPath_encoded = TQString::null;
}
else if ( rUrl[0] != '?' )
{
@@ -616,14 +616,14 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
void KURL::reset()
{
- m_strProtocol = QString::null;
- m_strUser = QString::null;
- m_strPass = QString::null;
- m_strHost = QString::null;
- m_strPath = QString::null;
- m_strPath_encoded = QString::null;
- m_strQuery_encoded = QString::null;
- m_strRef_encoded = QString::null;
+ m_strProtocol = TQString::null;
+ m_strUser = TQString::null;
+ m_strPass = TQString::null;
+ m_strHost = TQString::null;
+ m_strPath = TQString::null;
+ m_strPath_encoded = TQString::null;
+ m_strQuery_encoded = TQString::null;
+ m_strRef_encoded = TQString::null;
m_bIsMalformed = true;
m_iPort = 0;
m_iUriMode = Auto;
@@ -634,7 +634,7 @@ bool KURL::isEmpty() const
return (m_strPath.isEmpty() && m_strProtocol.isEmpty());
}
-void KURL::parse( const QString& _url, int encoding_hint )
+void KURL::parse( const TQString& _url, int encoding_hint )
{
if ( _url.isEmpty() || m_iUriMode == Invalid )
{
@@ -643,13 +643,13 @@ void KURL::parse( const QString& _url, int encoding_hint )
return;
}
- const QChar* buf = _url.unicode();
- const QChar* orig = buf;
+ const TQChar* buf = _url.unicode();
+ const TQChar* orig = buf;
uint len = _url.length();
uint pos = 0;
// Node 1: Accept alpha or slash
- QChar x = buf[pos++];
+ TQChar x = buf[pos++];
#ifdef Q_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x);
@@ -677,7 +677,7 @@ void KURL::parse( const QString& _url, int encoding_hint )
if (pos < len && buf[pos] == ':' )
{
- m_strProtocol = QString( orig, pos ).lower();
+ m_strProtocol = TQString( orig, pos ).lower();
if ( m_iUriMode == Auto )
m_iUriMode = uriModeForProtocol( m_strProtocol );
// Proceed to correct parse function.
@@ -704,10 +704,10 @@ NodeErr:
m_iUriMode = Invalid;
}
-void KURL::parseRawURI( const QString& _url, int encoding_hint )
+void KURL::parseRawURI( const TQString& _url, int encoding_hint )
{
uint len = _url.length();
- const QChar* buf = _url.unicode();
+ const TQChar* buf = _url.unicode();
uint pos = 0;
@@ -728,49 +728,49 @@ void KURL::parseRawURI( const QString& _url, int encoding_hint )
}
if ( pos == len ) // can't happen, the caller checked this already
- m_strPath = QString::null;
+ m_strPath = TQString::null;
else
- m_strPath = decode( QString( buf + pos, len - pos ), encoding_hint, true );
+ m_strPath = decode( TQString( buf + pos, len - pos ), encoding_hint, true );
m_bIsMalformed = false;
return;
}
-void KURL::parseMailto( const QString& _url, int encoding_hint )
+void KURL::parseMailto( const TQString& _url, int encoding_hint )
{
parseURL( _url, encoding_hint);
if ( m_bIsMalformed )
return;
- QRegExp mailre("(.+@)(.+)");
+ TQRegExp mailre("(.+@)(.+)");
if ( mailre.exactMatch( m_strPath ) )
{
#ifndef KDE_QT_ONLY
- QString host = KIDNA::toUnicode( mailre.cap( 2 ) );
+ TQString host = KIDNA::toUnicode( mailre.cap( 2 ) );
if (host.isEmpty())
host = mailre.cap( 2 ).lower();
#else
- QString host = mailre.cap( 2 ).lower();
+ TQString host = mailre.cap( 2 ).lower();
#endif
m_strPath = mailre.cap( 1 ) + host;
}
}
-void KURL::parseURL( const QString& _url, int encoding_hint )
+void KURL::parseURL( const TQString& _url, int encoding_hint )
{
- QString port;
+ TQString port;
bool badHostName = false;
int start = 0;
uint len = _url.length();
- const QChar* buf = _url.unicode();
+ const TQChar* buf = _url.unicode();
- QChar delim;
- QString tmp;
+ TQChar delim;
+ TQString tmp;
uint pos = 0;
// Node 1: Accept alpha or slash
- QChar x = buf[pos++];
+ TQChar x = buf[pos++];
#ifdef Q_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x);
@@ -827,12 +827,12 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
goto NodeOk;
}
if ( x == '@' )
{
- m_strUser = decode(QString( buf + start, pos - start ), encoding_hint);
+ m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++;
goto Node7;
}
@@ -841,13 +841,13 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
start = pos;
goto Node9;
}
else if ( x != ':' )
goto NodeErr;
- m_strUser = decode(QString( buf + start, pos - start ), encoding_hint);
+ m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++;
// Node 5: We need at least one character
@@ -869,8 +869,8 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
setHost(m_strUser);
- m_strUser = QString::null;
- QString tmp( buf + start, pos - start );
+ m_strUser = TQString::null;
+ TQString tmp( buf + start, pos - start );
char *endptr;
m_iPort = (unsigned short int)strtol(tmp.ascii(), &endptr, 10);
if ((pos == len) && (strlen(endptr) == 0))
@@ -886,7 +886,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
start = pos;
goto Node9;
}
- m_strPass = decode(QString( buf + start, pos - start), encoding_hint);
+ m_strPass = decode(TQString( buf + start, pos - start), encoding_hint);
pos++;
// Node 7: We need at least one character
@@ -921,7 +921,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
}
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
if (pos < len) pos++; // Skip ']'
if (pos == len)
goto NodeOk;
@@ -946,10 +946,10 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
goto NodeErr;
if ( pos == len )
{
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
goto NodeOk;
}
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
}
x = buf[pos];
if ( x == '/' || x == '#' || x == '?' )
@@ -970,7 +970,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
// Node 8d: Accept any amount of digits
while( pos < len && isdigit( buf[pos] ) ) pos++;
- port = QString( buf + start, pos - start );
+ port = TQString( buf + start, pos - start );
m_iPort = port.toUShort();
if ( pos == len )
goto NodeOk;
@@ -980,7 +980,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
while( pos < len && buf[pos] != '#' && buf[pos]!='?' ) pos++;
- tmp = QString( buf + start, pos - start );
+ tmp = TQString( buf + start, pos - start );
//kdDebug(126)<<" setting encoded path to:"<<tmp<<endl;
setEncodedPath( tmp, encoding_hint );
@@ -994,7 +994,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
while(pos < len && buf[pos]!=delim ) pos++;
- tmp = QString(buf + start, pos - start);
+ tmp = TQString(buf + start, pos - start);
if (delim=='#')
_setQuery(tmp, encoding_hint);
else
@@ -1004,7 +1004,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
goto NodeOk;
//Node11: // feed the rest into the remaining variable
- tmp = QString( buf + pos + 1, len - pos - 1);
+ tmp = TQString( buf + pos + 1, len - pos - 1);
if (delim == '#')
m_strRef_encoded = tmp;
else
@@ -1029,7 +1029,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
m_iUriMode = Invalid;
}
-KURL& KURL::operator=( const QString& _url )
+KURL& KURL::operator=( const TQString& _url )
{
reset();
parse( _url );
@@ -1040,13 +1040,13 @@ KURL& KURL::operator=( const QString& _url )
KURL& KURL::operator=( const char * _url )
{
reset();
- parse( QString::fromLatin1(_url) );
+ parse( TQString::fromLatin1(_url) );
return *this;
}
#ifndef QT_NO_NETWORKPROTOCOL
-KURL& KURL::operator=( const QUrl & u )
+KURL& KURL::operator=( const TQUrl & u )
{
m_strProtocol = u.protocol();
m_iUriMode = Auto;
@@ -1054,7 +1054,7 @@ KURL& KURL::operator=( const QUrl & u )
m_strPass = u.password();
m_strHost = u.host();
m_strPath = u.path( false );
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
m_strQuery_encoded = u.query();
m_strRef_encoded = u.ref();
m_bIsMalformed = !u.isValid();
@@ -1145,7 +1145,7 @@ bool KURL::operator==( const KURL& _u ) const
return false;
}
-bool KURL::operator==( const QString& _u ) const
+bool KURL::operator==( const TQString& _u ) const
{
KURL u( _u );
return ( *this == u );
@@ -1163,8 +1163,8 @@ bool KURL::equals( const KURL &_u, bool ignore_trailing ) const
if ( ignore_trailing )
{
- QString path1 = path(1);
- QString path2 = _u.path(1);
+ TQString path1 = path(1);
+ TQString path2 = _u.path(1);
if ( path1 != path2 )
return false;
@@ -1199,10 +1199,10 @@ bool KURL::isParentOf( const KURL& _u ) const
if ( path().isEmpty() || _u.path().isEmpty() )
return false; // can't work with implicit paths
- QString p1( cleanpath( path(), true, false ) );
+ TQString p1( cleanpath( path(), true, false ) );
if ( p1[p1.length()-1] != '/' )
p1 += '/';
- QString p2( cleanpath( _u.path(), true, false ) );
+ TQString p2( cleanpath( _u.path(), true, false ) );
if ( p2[p2.length()-1] != '/' )
p2 += '/';
@@ -1215,18 +1215,18 @@ bool KURL::isParentOf( const KURL& _u ) const
return false;
}
-void KURL::setFileName( const QString& _txt )
+void KURL::setFileName( const TQString& _txt )
{
- m_strRef_encoded = QString::null;
+ m_strRef_encoded = TQString::null;
int i = 0;
while( _txt[i] == '/' ) ++i;
- QString tmp;
+ TQString tmp;
if ( i )
tmp = _txt.mid( i );
else
tmp = _txt;
- QString path = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
+ TQString path = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
if ( path.isEmpty() )
path = "/";
else
@@ -1262,9 +1262,9 @@ void KURL::cleanPath( bool cleanDirSeparator ) // taken from the old KURL
m_strPath_encoded = cleanpath(m_strPath_encoded, cleanDirSeparator, true);
}
-static QString trailingSlash( int _trailing, const QString &path )
+static TQString trailingSlash( int _trailing, const TQString &path )
{
- QString result = path;
+ TQString result = path;
if ( _trailing == 0 )
return result;
@@ -1289,7 +1289,7 @@ static QString trailingSlash( int _trailing, const QString &path )
}
else {
assert( 0 );
- return QString::null;
+ return TQString::null;
}
}
@@ -1303,9 +1303,9 @@ void KURL::adjustPath( int _trailing )
}
-QString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encoding_hint ) const
+TQString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encoding_hint ) const
{
- QString tmp;
+ TQString tmp;
if (!m_strPath_encoded.isEmpty() && encoding_hint == 0)
{
tmp = trailingSlash( _trailing, m_strPath_encoded );
@@ -1331,27 +1331,27 @@ QString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encod
return tmp;
}
-void KURL::setEncodedPath( const QString& _txt, int encoding_hint )
+void KURL::setEncodedPath( const TQString& _txt, int encoding_hint )
{
m_strPath_encoded = _txt;
decode( m_strPath_encoded, m_strPath, m_strPath_encoded, encoding_hint );
// Throw away encoding for local files, makes file-operations faster.
if (m_strProtocol == fileProt)
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( m_iUriMode == Auto )
m_iUriMode = URL;
}
-void KURL::setEncodedPathAndQuery( const QString& _txt, int encoding_hint )
+void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint )
{
int pos = _txt.find( '?' );
if ( pos == -1 )
{
setEncodedPath(_txt, encoding_hint);
- m_strQuery_encoded = QString::null;
+ m_strQuery_encoded = TQString::null;
}
else
{
@@ -1360,7 +1360,7 @@ void KURL::setEncodedPathAndQuery( const QString& _txt, int encoding_hint )
}
}
-QString KURL::path( int _trailing ) const
+TQString KURL::path( int _trailing ) const
{
return trailingSlash( _trailing, path() );
}
@@ -1384,21 +1384,21 @@ bool KURL::isLocalFile() const
return (m_strHost == hostname);
}
-void KURL::setFileEncoding(const QString &encoding)
+void KURL::setFileEncoding(const TQString &encoding)
{
if (!isLocalFile())
return;
- QString q = query();
+ TQString q = query();
if (!q.isEmpty() && (q[0] == '?'))
q = q.mid(1);
- QStringList args = QStringList::split('&', q);
- for(QStringList::Iterator it = args.begin();
+ TQStringList args = TQStringList::split('&', q);
+ for(TQStringList::Iterator it = args.begin();
it != args.end();)
{
- QString s = decode_string(*it);
+ TQString s = decode_string(*it);
if (s.startsWith("charset="))
it = args.erase(it);
else
@@ -1408,34 +1408,34 @@ void KURL::setFileEncoding(const QString &encoding)
args.append("charset="+encode_string(encoding));
if (args.isEmpty())
- _setQuery(QString::null);
+ _setQuery(TQString::null);
else
_setQuery(args.join("&"));
}
-QString KURL::fileEncoding() const
+TQString KURL::fileEncoding() const
{
if (!isLocalFile())
- return QString::null;
+ return TQString::null;
- QString q = query();
+ TQString q = query();
if (q.isEmpty())
- return QString::null;
+ return TQString::null;
if (q[0] == '?')
q = q.mid(1);
- QStringList args = QStringList::split('&', q);
- for(QStringList::ConstIterator it = args.begin();
+ TQStringList args = TQStringList::split('&', q);
+ for(TQStringList::ConstIterator it = args.begin();
it != args.end();
++it)
{
- QString s = decode_string(*it);
+ TQString s = decode_string(*it);
if (s.startsWith("charset="))
return s.mid(8);
}
- return QString::null;
+ return TQString::null;
}
bool KURL::hasSubURL() const
@@ -1461,7 +1461,7 @@ bool KURL::hasSubURL() const
return false;
}
-QString KURL::url( int _trailing, int encoding_hint ) const
+TQString KURL::url( int _trailing, int encoding_hint ) const
{
if( m_bIsMalformed )
{
@@ -1471,7 +1471,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
return m_strProtocol;
}
- QString u = m_strProtocol;
+ TQString u = m_strProtocol;
if (!u.isEmpty())
u += ":";
@@ -1496,7 +1496,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
else
u += encodeHost(m_strHost, true, encoding_hint);
if ( m_iPort != 0 ) {
- QString buffer;
+ TQString buffer;
buffer.sprintf( ":%u", m_iPort );
u += buffer;
}
@@ -1521,7 +1521,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
return u;
}
-QString KURL::prettyURL( int _trailing ) const
+TQString KURL::prettyURL( int _trailing ) const
{
if( m_bIsMalformed )
{
@@ -1531,7 +1531,7 @@ QString KURL::prettyURL( int _trailing ) const
return m_strProtocol;
}
- QString u = m_strProtocol;
+ TQString u = m_strProtocol;
if (!u.isEmpty())
u += ":";
@@ -1561,7 +1561,7 @@ QString KURL::prettyURL( int _trailing ) const
u += lazy_encode(m_strHost);
}
if ( m_iPort != 0 ) {
- QString buffer;
+ TQString buffer;
buffer.sprintf( ":%u", m_iPort );
u += buffer;
}
@@ -1588,19 +1588,19 @@ QString KURL::prettyURL( int _trailing ) const
return u;
}
-QString KURL::prettyURL( int _trailing, AdjustementFlags _flags) const
+TQString KURL::prettyURL( int _trailing, AdjustementFlags _flags) const
{
- QString u = prettyURL(_trailing);
+ TQString u = prettyURL(_trailing);
if (_flags & StripFileProtocol && u.startsWith("file://")) {
u.remove(0, 7);
#ifdef Q_WS_WIN
- return QDir::convertSeparators(u);
+ return TQDir::convertSeparators(u);
#endif
}
return u;
}
-QString KURL::pathOrURL() const
+TQString KURL::pathOrURL() const
{
if ( isLocalFile() && m_strRef_encoded.isNull() && m_strQuery_encoded.isNull() ) {
return path();
@@ -1609,21 +1609,21 @@ QString KURL::pathOrURL() const
}
}
-QString KURL::htmlURL() const
+TQString KURL::htmlURL() const
{
- return QStyleSheet::escape(prettyURL());
+ return TQStyleSheet::escape(prettyURL());
}
KURL::List KURL::split( const KURL& _url )
{
- QString ref;
+ TQString ref;
KURL::List lst;
KURL url = _url;
while(true)
{
KURL u = url;
- u.m_strRef_encoded = QString::null;
+ u.m_strRef_encoded = TQString::null;
lst.append(u);
if (url.hasSubURL())
{
@@ -1646,7 +1646,7 @@ KURL::List KURL::split( const KURL& _url )
return lst;
}
-KURL::List KURL::split( const QString& _url )
+KURL::List KURL::split( const TQString& _url )
{
return split(KURL(_url));
}
@@ -1671,15 +1671,15 @@ KURL KURL::join( const KURL::List & lst )
return tmp;
}
-QString KURL::fileName( bool _strip_trailing_slash ) const
+TQString KURL::fileName( bool _strip_trailing_slash ) const
{
- QString fname;
+ TQString fname;
if (hasSubURL()) { // If we have a suburl, then return the filename from there
KURL::List list = KURL::split(*this);
KURL::List::Iterator it = list.fromLast();
return (*it).fileName(_strip_trailing_slash);
}
- const QString &path = m_strPath;
+ const TQString &path = m_strPath;
int len = path.length();
if ( len == 0 )
@@ -1705,7 +1705,7 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
// Count in the encoded string how many encoded slashes follow the last
// unencoded one.
int i = m_strPath_encoded.findRev( '/', len - 1 );
- QString fileName_encoded = m_strPath_encoded.mid(i+1);
+ TQString fileName_encoded = m_strPath_encoded.mid(i+1);
n += fileName_encoded.contains("%2f", false);
}
int i = len;
@@ -1730,7 +1730,7 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
return fname;
}
-void KURL::addPath( const QString& _txt )
+void KURL::addPath( const TQString& _txt )
{
if (hasSubURL())
{
@@ -1741,7 +1741,7 @@ void KURL::addPath( const QString& _txt )
return;
}
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( _txt.isEmpty() )
return;
@@ -1763,10 +1763,10 @@ void KURL::addPath( const QString& _txt )
m_strPath += _txt.mid( i );
}
-QString KURL::directory( bool _strip_trailing_slash_from_result,
+TQString KURL::directory( bool _strip_trailing_slash_from_result,
bool _ignore_trailing_slash_in_path ) const
{
- QString result = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
+ TQString result = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
if ( _ignore_trailing_slash_in_path )
result = trailingSlash( -1, result );
@@ -1777,7 +1777,7 @@ QString KURL::directory( bool _strip_trailing_slash_from_result,
// If ( i == -1 ) => the first character is not a '/'
// So it's some URL like file:blah.tgz, with no path
if ( i == -1 )
- return QString::null;
+ return TQString::null;
if ( i == 0 )
{
@@ -1797,7 +1797,7 @@ QString KURL::directory( bool _strip_trailing_slash_from_result,
}
-bool KURL::cd( const QString& _dir )
+bool KURL::cd( const TQString& _dir )
{
if ( _dir.isEmpty() || m_bIsMalformed )
return false;
@@ -1814,22 +1814,22 @@ bool KURL::cd( const QString& _dir )
// absolute path ?
if ( _dir[0] == '/' )
{
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
m_strPath = _dir;
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
// Users home directory on the local disk ?
if ( ( _dir[0] == '~' ) && ( m_strProtocol == fileProt ))
{
- m_strPath_encoded = QString::null;
- m_strPath = QDir::homeDirPath();
+ m_strPath_encoded = TQString::null;
+ m_strPath = TQDir::homeDirPath();
m_strPath += "/";
m_strPath += _dir.right(m_strPath.length() - 1);
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
@@ -1838,13 +1838,13 @@ bool KURL::cd( const QString& _dir )
// Sub URLs are not touched.
// append '/' if necessary
- QString p = path(1);
+ TQString p = path(1);
p += _dir;
p = cleanpath( p, true, false );
setPath( p );
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
@@ -1854,7 +1854,7 @@ KURL KURL::upURL( ) const
if (!query().isEmpty())
{
KURL u(*this);
- u._setQuery(QString::null);
+ u._setQuery(TQString::null);
return u;
};
@@ -1874,7 +1874,7 @@ KURL KURL::upURL( ) const
while (true)
{
KURL &u = lst.last();
- QString old = u.path();
+ TQString old = u.path();
u.cd("../");
if (u.path() != old)
break; // Finshed.
@@ -1885,7 +1885,7 @@ KURL KURL::upURL( ) const
return join( lst );
}
-QString KURL::htmlRef() const
+TQString KURL::htmlRef() const
{
if ( !hasSubURL() )
{
@@ -1896,7 +1896,7 @@ QString KURL::htmlRef() const
return decode( (*lst.begin()).ref() );
}
-QString KURL::encodedHtmlRef() const
+TQString KURL::encodedHtmlRef() const
{
if ( !hasSubURL() )
{
@@ -1907,7 +1907,7 @@ QString KURL::encodedHtmlRef() const
return (*lst.begin()).ref();
}
-void KURL::setHTMLRef( const QString& _ref )
+void KURL::setHTMLRef( const TQString& _ref )
{
if ( !hasSubURL() )
{
@@ -1934,7 +1934,7 @@ bool KURL::hasHTMLRef() const
}
void
-KURL::setProtocol( const QString& _txt )
+KURL::setProtocol( const TQString& _txt )
{
m_strProtocol = _txt;
if ( m_iUriMode == Auto ) m_iUriMode = uriModeForProtocol( m_strProtocol );
@@ -1942,25 +1942,25 @@ KURL::setProtocol( const QString& _txt )
}
void
-KURL::setUser( const QString& _txt )
+KURL::setUser( const TQString& _txt )
{
if ( _txt.isEmpty() )
- m_strUser = QString::null;
+ m_strUser = TQString::null;
else
m_strUser = _txt;
}
void
-KURL::setPass( const QString& _txt )
+KURL::setPass( const TQString& _txt )
{
if ( _txt.isEmpty() )
- m_strPass = QString::null;
+ m_strPass = TQString::null;
else
m_strPass = _txt;
}
void
-KURL::setHost( const QString& _txt )
+KURL::setHost( const TQString& _txt )
{
if ( m_iUriMode == Auto )
m_iUriMode = URL;
@@ -1987,7 +1987,7 @@ KURL::setPort( unsigned short int _p )
m_iPort = _p;
}
-void KURL::setPath( const QString & path )
+void KURL::setPath( const TQString & path )
{
if (isEmpty())
m_bIsMalformed = false;
@@ -1996,12 +1996,12 @@ void KURL::setPath( const QString & path )
m_strProtocol = fileProt;
}
m_strPath = path;
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( m_iUriMode == Auto )
m_iUriMode = URL;
}
-void KURL::setDirectory( const QString &dir)
+void KURL::setDirectory( const TQString &dir)
{
if ( dir.endsWith("/"))
setPath(dir);
@@ -2009,7 +2009,7 @@ void KURL::setDirectory( const QString &dir)
setPath(dir+"/");
}
-void KURL::setQuery( const QString &_txt, int encoding_hint)
+void KURL::setQuery( const TQString &_txt, int encoding_hint)
{
if (_txt[0] == '?')
_setQuery( _txt.length() > 1 ? _txt.mid(1) : "" /*empty, not null*/, encoding_hint );
@@ -2018,7 +2018,7 @@ void KURL::setQuery( const QString &_txt, int encoding_hint)
}
// This is a private function that expects a query without '?'
-void KURL::_setQuery( const QString &_txt, int encoding_hint)
+void KURL::_setQuery( const TQString &_txt, int encoding_hint)
{
m_strQuery_encoded = _txt;
if (!_txt.length())
@@ -2026,7 +2026,7 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
int l = m_strQuery_encoded.length();
int i = 0;
- QString result;
+ TQString result;
while (i < l)
{
int s = i;
@@ -2042,8 +2042,8 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
}
if (i > s)
{
- QString tmp = m_strQuery_encoded.mid(s, i-s);
- QString newTmp;
+ TQString tmp = m_strQuery_encoded.mid(s, i-s);
+ TQString newTmp;
decode( tmp, newTmp, tmp, encoding_hint, false );
result += tmp;
}
@@ -2056,29 +2056,29 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
m_strQuery_encoded = result;
}
-QString KURL::query() const
+TQString KURL::query() const
{
if (m_strQuery_encoded.isNull())
- return QString::null;
+ return TQString::null;
return '?'+m_strQuery_encoded;
}
-QString KURL::decode_string(const QString &str, int encoding_hint)
+TQString KURL::decode_string(const TQString &str, int encoding_hint)
{
return decode(str, encoding_hint);
}
-QString KURL::encode_string(const QString &str, int encoding_hint)
+TQString KURL::encode_string(const TQString &str, int encoding_hint)
{
return encode(str, 1, encoding_hint);
}
-QString KURL::encode_string_no_slash(const QString &str, int encoding_hint)
+TQString KURL::encode_string_no_slash(const TQString &str, int encoding_hint)
{
return encode(str, 0, encoding_hint);
}
-bool urlcmp( const QString& _url1, const QString& _url2 )
+bool urlcmp( const TQString& _url1, const TQString& _url2 )
{
// Both empty ?
if ( _url1.isEmpty() && _url2.isEmpty() )
@@ -2097,7 +2097,7 @@ bool urlcmp( const QString& _url1, const QString& _url2 )
return ( list1 == list2 );
}
-bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing, bool _ignore_ref )
+bool urlcmp( const TQString& _url1, const TQString& _url2, bool _ignore_trailing, bool _ignore_ref )
{
// Both empty ?
if ( _url1.isEmpty() && _url2.isEmpty() )
@@ -2119,8 +2119,8 @@ bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing,
if ( _ignore_ref )
{
- (*list1.begin()).setRef(QString::null);
- (*list2.begin()).setRef(QString::null);
+ (*list1.begin()).setRef(TQString::null);
+ (*list2.begin()).setRef(TQString::null);
}
KURL::List::Iterator it1 = list1.begin();
@@ -2132,84 +2132,84 @@ bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing,
return true;
}
-QMap< QString, QString > KURL::queryItems( int options ) const {
+TQMap< TQString, TQString > KURL::queryItems( int options ) const {
return queryItems(options, 0);
}
-QMap< QString, QString > KURL::queryItems( int options, int encoding_hint ) const {
+TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) const {
if ( m_strQuery_encoded.isEmpty() )
- return QMap<QString,QString>();
+ return TQMap<TQString,TQString>();
- QMap< QString, QString > result;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
- for ( QStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) {
+ TQMap< TQString, TQString > result;
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
+ for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) {
int equal_pos = (*it).find( '=' );
if ( equal_pos > 0 ) { // = is not the first char...
- QString name = (*it).left( equal_pos );
+ TQString name = (*it).left( equal_pos );
if ( options & CaseInsensitiveKeys )
name = name.lower();
- QString value = (*it).mid( equal_pos + 1 );
+ TQString value = (*it).mid( equal_pos + 1 );
if ( value.isEmpty() )
- result.insert( name, QString::fromLatin1("") );
+ result.insert( name, TQString::fromLatin1("") );
else {
// ### why is decoding name not necessary?
value.replace( '+', ' ' ); // + in queries means space
result.insert( name, decode_string( value, encoding_hint ) );
}
} else if ( equal_pos < 0 ) { // no =
- QString name = (*it);
+ TQString name = (*it);
if ( options & CaseInsensitiveKeys )
name = name.lower();
- result.insert( name, QString::null );
+ result.insert( name, TQString::null );
}
}
return result;
}
-QString KURL::queryItem( const QString& _item ) const
+TQString KURL::queryItem( const TQString& _item ) const
{
return queryItem( _item, 0 );
}
-QString KURL::queryItem( const QString& _item, int encoding_hint ) const
+TQString KURL::queryItem( const TQString& _item, int encoding_hint ) const
{
- QString item = _item + '=';
+ TQString item = _item + '=';
if ( m_strQuery_encoded.length() <= 1 )
- return QString::null;
+ return TQString::null;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
unsigned int _len = item.length();
- for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
+ for ( TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
{
if ( (*it).startsWith( item ) )
{
if ( (*it).length() > _len )
{
- QString str = (*it).mid( _len );
+ TQString str = (*it).mid( _len );
str.replace( '+', ' ' ); // + in queries means space.
return decode_string( str, encoding_hint );
}
else // empty value
- return QString::fromLatin1("");
+ return TQString::fromLatin1("");
}
}
- return QString::null;
+ return TQString::null;
}
-void KURL::removeQueryItem( const QString& _item )
+void KURL::removeQueryItem( const TQString& _item )
{
- QString item = _item + '=';
+ TQString item = _item + '=';
if ( m_strQuery_encoded.length() <= 1 )
return;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
- for ( QStringList::Iterator it = items.begin(); it != items.end(); )
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); )
{
if ( (*it).startsWith( item ) || (*it == _item) )
{
- QStringList::Iterator deleteIt = it;
+ TQStringList::Iterator deleteIt = it;
++it;
items.remove(deleteIt);
}
@@ -2221,10 +2221,10 @@ void KURL::removeQueryItem( const QString& _item )
m_strQuery_encoded = items.join( "&" );
}
-void KURL::addQueryItem( const QString& _item, const QString& _value, int encoding_hint )
+void KURL::addQueryItem( const TQString& _item, const TQString& _value, int encoding_hint )
{
- QString item = _item + '=';
- QString value = encode( _value, 0, encoding_hint );
+ TQString item = _item + '=';
+ TQString value = encode( _value, 0, encoding_hint );
if (!m_strQuery_encoded.isEmpty())
m_strQuery_encoded += '&';
@@ -2232,13 +2232,13 @@ void KURL::addQueryItem( const QString& _item, const QString& _value, int encodi
}
// static
-KURL KURL::fromPathOrURL( const QString& text )
+KURL KURL::fromPathOrURL( const TQString& text )
{
if ( text.isEmpty() )
return KURL();
KURL url;
- if (!QDir::isRelativePath(text))
+ if (!TQDir::isRelativePath(text))
url.setPath( text );
else
url = text;
@@ -2246,10 +2246,10 @@ KURL KURL::fromPathOrURL( const QString& text )
return url;
}
-static QString _relativePath(const QString &base_dir, const QString &path, bool &isParent)
+static TQString _relativePath(const TQString &base_dir, const TQString &path, bool &isParent)
{
- QString _base_dir(QDir::cleanDirPath(base_dir));
- QString _path(QDir::cleanDirPath(path.isEmpty() || (path[0] != '/') ? _base_dir+"/"+path : path));
+ TQString _base_dir(TQDir::cleanDirPath(base_dir));
+ TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != '/') ? _base_dir+"/"+path : path));
if (_base_dir.isEmpty())
return _path;
@@ -2257,15 +2257,15 @@ static QString _relativePath(const QString &base_dir, const QString &path, bool
if (_base_dir[_base_dir.length()-1] != '/')
_base_dir.append('/');
- QStringList list1 = QStringList::split('/', _base_dir);
- QStringList list2 = QStringList::split('/', _path);
+ TQStringList list1 = TQStringList::split('/', _base_dir);
+ TQStringList list2 = TQStringList::split('/', _path);
// Find where they meet
uint level = 0;
uint maxLevel = QMIN(list1.count(), list2.count());
while((level < maxLevel) && (list1[level] == list2[level])) level++;
- QString result;
+ TQString result;
// Need to go down out of the first path to the common branch.
for(uint i = level; i < list1.count(); i++)
result.append("../");
@@ -2282,10 +2282,10 @@ static QString _relativePath(const QString &base_dir, const QString &path, bool
return result;
}
-QString KURL::relativePath(const QString &base_dir, const QString &path, bool *isParent)
+TQString KURL::relativePath(const TQString &base_dir, const TQString &path, bool *isParent)
{
bool parent = false;
- QString result = _relativePath(base_dir, path, parent);
+ TQString result = _relativePath(base_dir, path, parent);
if (parent)
result.prepend("./");
@@ -2296,7 +2296,7 @@ QString KURL::relativePath(const QString &base_dir, const QString &path, bool *i
}
-QString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hint)
+TQString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hint)
{
if ((url.protocol() != base_url.protocol()) ||
(url.host() != base_url.host()) ||
@@ -2307,12 +2307,12 @@ QString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hi
return url.url(0, encoding_hint);
}
- QString relURL;
+ TQString relURL;
if ((base_url.path() != url.path()) || (base_url.query() != url.query()))
{
bool dummy;
- QString basePath = base_url.directory(false, false);
+ TQString basePath = base_url.directory(false, false);
relURL = encode( _relativePath(basePath, url.path(), dummy), 1, encoding_hint);
relURL += url.query();
}
@@ -2334,7 +2334,7 @@ int KURL::uriMode() const
return m_iUriMode;
}
-KURL::URIMode KURL::uriModeForProtocol(const QString& protocol)
+KURL::URIMode KURL::uriModeForProtocol(const TQString& protocol)
{
#ifndef KDE_QT_ONLY
KURL::URIMode mode = Auto;
diff --git a/kdecore/kurl.h b/kdecore/kurl.h
index d637d620c..62c4861ff 100644
--- a/kdecore/kurl.h
+++ b/kdecore/kurl.h
@@ -20,8 +20,8 @@
#ifndef __kurl_h__
#define __kurl_h__
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class QUrl;
@@ -52,16 +52,16 @@ class KURLPrivate;
* the position within a document)
* - space -> "%20"
*
- * The constructor KURL(const QString&) expects a string properly escaped,
+ * The constructor KURL(const TQString&) expects a string properly escaped,
* or at least non-ambiguous.
* For instance a local file or directory <tt>"/bar/#foo#"</tt> would have the
* URL <tt>"file:///bar/%23foo%23"</tt>.
* If you have the absolute path and need the URL-escaping you should create
- * KURL via the default-constructor and then call setPath(const QString&):
+ * KURL via the default-constructor and then call setPath(const TQString&):
* @code
* KURL kurl;
* kurl.setPath( "/bar/#foo#" );
- * QString url = kurl.url(); // -> "file:///bar/%23foo%23"
+ * TQString url = kurl.url(); // -> "file:///bar/%23foo%23"
* @endcode
*
* If you have the URL of a local file or directory and need the absolute path,
@@ -70,7 +70,7 @@ class KURLPrivate;
* KURL url( "file:///bar/%23foo%23" );
* ...
* if ( url.isLocalFile() )
- * QString path = url.path(); // -> "/bar/#foo#"
+ * TQString path = url.path(); // -> "/bar/#foo#"
* @endcode
*
* The other way round: if the user can enter a string, that can be either a
@@ -85,18 +85,18 @@ class KURLPrivate;
*
* Wrong:
* @code
- * QString dirUrl = "file:///bar/";
- * QString fileName = "#foo#";
- * QString invalidURL = dirUrl + fileName; // -> "file:///bar/#foo#" won't behave like you would expect.
+ * TQString dirUrl = "file:///bar/";
+ * TQString fileName = "#foo#";
+ * TQString invalidURL = dirUrl + fileName; // -> "file:///bar/#foo#" won't behave like you would expect.
* @endcode
* Instead you should use addPath().
*
* Right:
* @code
* KURL url( "file:///bar/" );
- * QString fileName = "#foo#";
+ * TQString fileName = "#foo#";
* url.addPath( fileName );
- * QString validURL = url.url(); // -> "file:///bar/%23foo%23"
+ * TQString validURL = url.url(); // -> "file:///bar/%23foo%23"
* @endcode
*
* Also consider that some URLs contain the password, but this shouldn't be
@@ -105,7 +105,7 @@ class KURLPrivate;
*
* @code
* KURL url( "ftp://name:password@ftp.faraway.org/bar/%23foo%23");
- * QString visibleURL = url.prettyURL(); // -> "ftp://name@ftp.faraway.org/bar/%23foo%23"
+ * TQString visibleURL = url.prettyURL(); // -> "ftp://name@ftp.faraway.org/bar/%23foo%23"
* @endcode
* Note that prettyURL() doesn't change the character escapes (like <tt>"%23"</tt>).
* Otherwise the URL would be invalid and the user wouldn't be able to use it in another
@@ -179,12 +179,12 @@ public:
};
/**
- * KURL::List is a QValueList that contains KURLs with a few
+ * KURL::List is a TQValueList that contains KURLs with a few
* convenience methods.
* @see KURL
* @see QValueList
*/
- class KDECORE_EXPORT List : public QValueList<KURL>
+ class KDECORE_EXPORT List : public TQValueList<KURL>
{
public:
/**
@@ -207,9 +207,9 @@ public:
*
* @param list the list containing the URLs as strings
*
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
*/
- List(const QStringList &list);
+ List(const TQStringList &list);
/**
* @brief Converts the URLs of this list to a list of strings
*
@@ -223,7 +223,7 @@ public:
*
* @see KURL::url()
*/
- QStringList toStringList() const;
+ TQStringList toStringList() const;
};
/**
* @brief Constructs an empty URL
@@ -253,11 +253,11 @@ public:
* @param url a URL, not a filename. If the URL does not have a protocol
* part, @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
*/
- KURL( const QString& url, int encoding_hint = 0 );
+ KURL( const TQString& url, int encoding_hint = 0 );
/**
* @brief Constructor taking an URL encoded in a C string
*
@@ -278,16 +278,16 @@ public:
* @param url an encoded URL. If the URL does not have a protocol part,
* @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see QString::fromLatin1()
+ * @see TQString::fromLatin1()
*/
KURL( const char * url, int encoding_hint = 0 );
/**
* @brief Constructor taking an URL encoded in a QCString
*
- * Constructor taking a QCString @p url, which is an @em encoded
+ * Constructor taking a TQCString @p url, which is an @em encoded
* representation of the URL, exactly like the usual constructor. This is
* useful when the URL, in its encoded form, is strictly ASCII.
*
@@ -304,12 +304,12 @@ public:
* @param url A encoded URL. If the URL does not have a protocol part,
* @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see QString::fromLatin1()
+ * @see TQString::fromLatin1()
*/
- KURL( const QCString& url, int encoding_hint = 0 );
+ KURL( const TQCString& url, int encoding_hint = 0 );
/**
* @brief Copy constructor
@@ -324,7 +324,7 @@ public:
*
* @param u the QUrl
*/
- KURL( const QUrl &u );
+ KURL( const TQUrl &u );
/**
* @brief Constructor allowing relative URLs
*
@@ -346,11 +346,11 @@ public:
* So do NOT pass a path here (use setPath() or addPath() or
* fromPathOrURL() instead)
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
*/
- KURL( const KURL& _baseurl, const QString& _rel_url, int encoding_hint=0 );
+ KURL( const KURL& _baseurl, const TQString& _rel_url, int encoding_hint=0 );
/**
* @brief Returns the protocol for the URL
@@ -359,12 +359,12 @@ public:
* @c "mailto:" and other pseudo protocols.
*
* @return the protocol of the URL, does not include the colon. If the
- * URL is malformed, @c QString::null will be returned
+ * URL is malformed, @c TQString::null will be returned
*
* @see setProtocol()
* @see isValid()
*/
- QString protocol() const { return m_bIsMalformed ? QString::null : m_strProtocol; }
+ TQString protocol() const { return m_bIsMalformed ? TQString::null : m_strProtocol; }
/**
* @brief Sets the protocol for the URL
*
@@ -375,7 +375,7 @@ public:
*
* @see protocol()
*/
- void setProtocol( const QString& _txt );
+ void setProtocol( const TQString& _txt );
/**
* @brief Returns the URI processing mode for the URL
@@ -393,12 +393,12 @@ public:
* @brief Returns the decoded user name (login, user id, etc) included in
* the URL
*
- * @return the user name or @c QString::null if there is no user name
+ * @return the user name or @c TQString::null if there is no user name
*
* @see setUser()
* @see hasUser()
*/
- QString user() const { return m_strUser; }
+ TQString user() const { return m_strUser; }
/**
* @brief Sets the user name (login, user id, etc) to include in the URL
*
@@ -406,13 +406,13 @@ public:
* If there is a password associated with the user, it can be set using
* setPass().
*
- * @param _txt the name of the user or @c QString::null to remove the user
+ * @param _txt the name of the user or @c TQString::null to remove the user
*
* @see user()
* @see hasUser()
* @see hasPass()
*/
- void setUser( const QString& _txt );
+ void setUser( const TQString& _txt );
/**
* @brief Tests if this URL has a user name included in it
*
@@ -431,13 +431,13 @@ public:
* @note a password can only appear in a URL string if you also set
* a user, see setUser().
*
- * @return the password or @c QString::null if it does not exist
+ * @return the password or @c TQString::null if it does not exist
*
* @see setPass()
* @see hasPass()
* @see hasUser()
*/
- QString pass() const { return m_strPass; }
+ TQString pass() const { return m_strPass; }
/**
* @brief Sets the password (corresponding to user()) to include in the URL
*
@@ -445,13 +445,13 @@ public:
* @note a password can only appear in a URL string if you also set
* a user, see setUser().
*
- * @param _txt the password to set or @c QString::null to remove the password
+ * @param _txt the password to set or @c TQString::null to remove the password
*
* @see pass()
* @see hasPass()
* @see hasUser()
*/
- void setPass( const QString& _txt );
+ void setPass( const TQString& _txt );
/**
* @brief Tests if this URL has a password included in it
*
@@ -469,24 +469,24 @@ public:
/**
* @brief Returns the decoded hostname included in the URL
*
- * @return the name of the host or @c QString::null if no host is set
+ * @return the name of the host or @c TQString::null if no host is set
*
* @see setHost()
* @see hasHost()
*/
- QString host() const { return m_strHost; }
+ TQString host() const { return m_strHost; }
/**
* @brief Sets the hostname to include in the URL
*
* Special characters in the hostname will appear encoded in the URL.
*
- * @param _txt the new name of the host or QString::null to remove the host
+ * @param _txt the new name of the host or TQString::null to remove the host
*
* @see host()
* @see hasHost()
*/
- void setHost( const QString& _txt );
+ void setHost( const TQString& _txt );
/**
* @brief Tests if this URL has a hostname included in it
*
@@ -522,14 +522,14 @@ public:
*
* This does @em not include the query.
*
- * @return the path of the URL (without query), or @c QString::null if no
+ * @return the path of the URL (without query), or @c TQString::null if no
* path is set
*
* @see path(int)
* @see setPath()
* @see hasPath()
*/
- QString path() const { return m_strPath; }
+ TQString path() const { return m_strPath; }
/**
* @brief Returns the current decoded path
@@ -552,7 +552,7 @@ public:
* @c '/', @c +1 adds a trailing @c '/' if there is none yet
* and @c 0 returns the path unchanged
*
- * @return the path of the URL (without query), or @c QString::null if no
+ * @return the path of the URL (without query), or @c TQString::null if no
* path is set
*
* @see path()
@@ -560,7 +560,7 @@ public:
* @see hasPath()
* @see adjustPath()
*/
- QString path( int _trailing ) const;
+ TQString path( int _trailing ) const;
/**
* @brief Sets the decoded path of the URL
@@ -572,13 +572,13 @@ public:
* beginning of the query part. Something that might look encoded,
* like @c "%3f" will not become decoded.
*
- * @param path the new, decoded, path or @c QString::null to remove the path
+ * @param path the new, decoded, path or @c TQString::null to remove the path
*
* @see path()
* @see path(int)
* @see hasPath()
*/
- void setPath( const QString& path );
+ void setPath( const TQString& path );
/**
* @brief Tests if this URL has a path included in it
@@ -638,25 +638,25 @@ public:
*
* @param _txt the new encoded path and encoded query
* @param encoding_hint MIB of original encoding of @p _txt .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see encodedPathAndQuery()
* @see setPath()
* @see setQuery()
*/
- void setEncodedPathAndQuery( const QString& _txt, int encoding_hint = 0 );
+ void setEncodedPathAndQuery( const TQString& _txt, int encoding_hint = 0 );
/**
* @brief Sets the (already encoded) path of the URL
*
* @param _txt the new encoded path
* @param encoding_hint MIB of original encoding of @p _txt .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see setEncodedPathAndQuery()
* @see setPath()
*/
- void setEncodedPath(const QString& _txt, int encoding_hint = 0 );
+ void setEncodedPath(const TQString& _txt, int encoding_hint = 0 );
/**
* @brief Returns the encoded path and the query
@@ -679,7 +679,7 @@ public:
* @param _no_empty_path if set to @c true then an empty path is substituted
* by @c "/"
* @param encoding_hint MIB of desired encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the concatenation of the encoded path , @c '?' and the
* encoded query
@@ -688,7 +688,7 @@ public:
* @see path()
* @see query()
*/
- QString encodedPathAndQuery( int _trailing = 0, bool _no_empty_path = false, int encoding_hint = 0) const;
+ TQString encodedPathAndQuery( int _trailing = 0, bool _no_empty_path = false, int encoding_hint = 0) const;
/**
* @brief Sets the encoded query of the URL
@@ -699,11 +699,11 @@ public:
* the query may contain the @c '0' character
*
* @param encoding_hint MIB of the encoding. Reserved, should be @c 0 .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see query()
*/
- void setQuery( const QString& _txt, int encoding_hint = 0);
+ void setQuery( const TQString& _txt, int encoding_hint = 0);
/**
* @brief Returns the encoded query of the URL
@@ -713,24 +713,24 @@ public:
* A single @c '?' means an empty query.
* An empty string means no query.
*
- * @return the encoded query or @c QString::null if there is none
+ * @return the encoded query or @c TQString::null if there is none
*
* @see setQuery()
*/
- QString query() const;
+ TQString query() const;
/**
* @brief Returns the encoded reference of the URL
*
* The reference is @em never decoded automatically.
*
- * @return the undecoded reference, or @c QString::null if there is none
+ * @return the undecoded reference, or @c TQString::null if there is none
*
* @see setRef()
* @see hasRef()
* @see htmlRef()
*/
- QString ref() const { return m_strRef_encoded; }
+ TQString ref() const { return m_strRef_encoded; }
/**
* @brief Sets the encoded reference part (everything after @c '#')
@@ -738,12 +738,12 @@ public:
* This is considered to be encoded, i.e. characters that are not allowed
* as part of the reference will @em not be encoded.
*
- * @param _txt the encoded reference or @c QString::null to remove it
+ * @param _txt the encoded reference or @c TQString::null to remove it
*
* @see ref()
* @see hasRef()
*/
- void setRef( const QString& _txt ) { m_strRef_encoded = _txt; }
+ void setRef( const TQString& _txt ) { m_strRef_encoded = _txt; }
/**
* @brief Tests if the URL has a reference part
@@ -770,7 +770,7 @@ public:
* @see hasSubURL()
* @see ref()
*/
- QString htmlRef() const;
+ TQString htmlRef() const;
/**
* @brief Returns the encoded HTML-style reference
@@ -782,18 +782,18 @@ public:
* @see setHTMLRef()
* @see hasHTMLRef()
*/
- QString encodedHtmlRef() const;
+ TQString encodedHtmlRef() const;
/**
* @brief Sets the decoded HTML-style reference
*
* @param _ref the new reference. This is considered to be @em not encoded in
- * contrast to setRef(). Use @c QString::null to remove it
+ * contrast to setRef(). Use @c TQString::null to remove it
*
* @see htmlRef()
* @see hasHTMLRef()
*/
- void setHTMLRef( const QString& _ref );
+ void setHTMLRef( const TQString& _ref );
/**
* @brief Tests if there is an HTML-style reference
@@ -840,23 +840,23 @@ public:
* Adds encoding information to the URL by adding a @c "charset" parameter.
* If there is already a charset parameter, it will be replaced.
*
- * @param encoding the encoding to add or @c QString::null to remove the
+ * @param encoding the encoding to add or @c TQString::null to remove the
* encoding
*
* @see fileEncoding()
- * @see QTextCodec::codecForName()
+ * @see TQTextCodec::codecForName()
*/
- void setFileEncoding(const QString &encoding);
+ void setFileEncoding(const TQString &encoding);
/**
* @brief Returns encoding information of the URL
*
* The encoding information is the content of the @c "charset" parameter.
*
- * @return an encoding suitable for QTextCodec::codecForName()
- * or @c QString::null if not encoding was specified
+ * @return an encoding suitable for TQTextCodec::codecForName()
+ * or @c TQString::null if not encoding was specified
*/
- QString fileEncoding() const;
+ TQString fileEncoding() const;
/**
* @brief Tests if the URL has any sub URLs
@@ -883,14 +883,14 @@ public:
* @see setPath()
* @see hasPath()
*/
- void addPath( const QString& txt );
+ void addPath( const TQString& txt );
/**
* @brief Returns the value of a certain query item
*
* @param item item whose value we want
*
- * @return the value of the given query item name or @c QString::null if the
+ * @return the value of the given query item name or @c TQString::null if the
* specified item does not exist
*
* @see addQueryItem()
@@ -898,16 +898,16 @@ public:
* @see queryItems()
* @see query()
*/
- QString queryItem( const QString& item ) const;
+ TQString queryItem( const TQString& item ) const;
/**
* @brief Returns the value of a certain query item
*
* @param item item whose value we want
* @param encoding_hint MIB of encoding of query.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
- * @return the value of the given query item name or @c QString::null if the
+ * @return the value of the given query item name or @c TQString::null if the
* specified item does not exist
*
* @see addQueryItem()
@@ -915,7 +915,7 @@ public:
* @see queryItems()
* @see query()
*/
- QString queryItem( const QString& item, int encoding_hint ) const;
+ TQString queryItem( const TQString& item, int encoding_hint ) const;
/**
* Options for queryItems()
@@ -933,14 +933,14 @@ public:
/**
* @internal, override for the below function
*/
- QMap< QString, QString > queryItems( int options=0 ) const;
+ TQMap< TQString, TQString > queryItems( int options=0 ) const;
/**
* @brief Returns the list of query items as a map mapping keys to values
*
* @param options any of QueryItemsOptions <em>OR</em>ed together
* @param encoding_hint MIB of encoding of query.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the map of query items or the empty map if the URL has no
* query items
@@ -952,7 +952,7 @@ public:
*
* @since 3.1
*/
- QMap< QString, QString > queryItems( int options, int encoding_hint ) const;
+ TQMap< TQString, TQString > queryItems( int options, int encoding_hint ) const;
/**
* @brief Adds an additional query item
@@ -963,13 +963,13 @@ public:
* @param _item name of item to add
* @param _value value of item to add
* @param encoding_hint MIB of encoding to use for _value.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see queryItem()
* @see queryItems()
* @see query()
*/
- void addQueryItem( const QString& _item, const QString& _value, int encoding_hint = 0 );
+ void addQueryItem( const TQString& _item, const TQString& _value, int encoding_hint = 0 );
/**
* @brief Removea an item from the query
@@ -981,7 +981,7 @@ public:
* @see queryItems()
* @see query()
*/
- void removeQueryItem( const QString& _item );
+ void removeQueryItem( const TQString& _item );
/**
* @brief Sets the filename of the path
@@ -1003,7 +1003,7 @@ public:
* @see setDirectory()
* @see setPath()
*/
- void setFileName( const QString&_txt );
+ void setFileName( const TQString&_txt );
/**
* @brief Returns the filename of the path
@@ -1016,13 +1016,13 @@ public:
* behind the last @c '/' is considered to be the filename
*
* @return the filename of the current path. The returned string is decoded.
- * @c QString::null if there is no file (and thus no path)
+ * @c TQString::null if there is no file (and thus no path)
*
* @see setFileName()
* @see directory()
* @see path()
*/
- QString fileName( bool _ignore_trailing_slash_in_path = true ) const;
+ TQString fileName( bool _ignore_trailing_slash_in_path = true ) const;
/**
* @brief Returns the directory of the path
@@ -1043,14 +1043,14 @@ public:
* @param _ignore_trailing_slash_in_path if set to @c false, then everything
* behind the last @c '/' is considered to be the filename
*
- * @return the directory part of the current path or @c QString::null when
+ * @return the directory part of the current path or @c TQString::null when
* there is no path. The returned string is decoded
*
* @see setDirectory()
* @see fileName()
* @see path()
*/
- QString directory( bool _strip_trailing_slash_from_result = true,
+ TQString directory( bool _strip_trailing_slash_from_result = true,
bool _ignore_trailing_slash_in_path = true ) const;
/**
@@ -1062,7 +1062,7 @@ public:
* @see setFileName()
* @see setPath()
*/
- void setDirectory(const QString &dir);
+ void setDirectory(const TQString &dir);
/**
* @brief Changes the directory by descending into the given directory
@@ -1082,7 +1082,7 @@ public:
* @see directory()
* @see path()
*/
- bool cd( const QString& _dir );
+ bool cd( const TQString& _dir );
/**
* @brief Returns the URL as string, with all escape sequences intact,
@@ -1110,7 +1110,7 @@ public:
* @c '/', @c +1 adds a trailing @c '/' if there is none yet
* and @c 0 returns the path unchanged
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the complete URL, with all escape sequences intact, encoded
* in a given charset
@@ -1119,7 +1119,7 @@ public:
* @see pathOrURL()
* @see htmlURL()
*/
- QString url( int _trailing = 0, int encoding_hint = 0) const;
+ TQString url( int _trailing = 0, int encoding_hint = 0) const;
/**
* @brief Returns the URL as string in human-friendly format
@@ -1153,7 +1153,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString prettyURL( int _trailing = 0) const;
+ TQString prettyURL( int _trailing = 0) const;
/**
* @brief Returns the URL as string in human-friendly format
@@ -1190,7 +1190,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString prettyURL( int _trailing, AdjustementFlags _flags) const;
+ TQString prettyURL( int _trailing, AdjustementFlags _flags) const;
// ### BIC: Merge the two above + spell it as "Adjustment"
// Or remove completely, and let people use pathOrURL() instead
@@ -1212,7 +1212,7 @@ public:
*
* @since 3.4
*/
- QString pathOrURL() const;
+ TQString pathOrURL() const;
/**
* @brief Returns the URL as string, escaped for HTML
@@ -1225,7 +1225,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString htmlURL() const;
+ TQString htmlURL() const;
/**
@@ -1285,10 +1285,10 @@ public:
*
* bool lessThan = url1 < url2; // false. Both invalid, no protocols
*
- * url2.setProtocol( QString::null );
+ * url2.setProtocol( TQString::null );
* lessThan = url1 < url2; // true. url2 is valid because of setProtocol()
*
- * url1.setProtocol( QString::null );
+ * url1.setProtocol( TQString::null );
* lessThan = url1 < url2; // false. Both valid and everything empty
*
* url1.setProtocol( "http" );
@@ -1311,7 +1311,7 @@ public:
* (equal or greater than)
*
* @see operator==()
- * @see QString::compare()
+ * @see TQString::compare()
*/
bool operator<(const KURL& _u) const;
@@ -1334,14 +1334,14 @@ public:
* This will reset the current URL and parse the given string.
* See the similar constructor for known limitations.
*
- * @param _url the QString to parse for values
+ * @param _url the TQString to parse for values
*
* @return a reference to this URL (*this)
*
* @see equals()
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
*/
- KURL& operator=( const QString& _url );
+ KURL& operator=( const TQString& _url );
/**
* @brief Assigns the URL, given as a C string, to this one
@@ -1368,9 +1368,9 @@ public:
* @return a reference to this URL (*this)
*
* @see equals()
- * @see KURL(const QUrl &)
+ * @see KURL(const TQUrl &)
*/
- KURL& operator=( const QUrl & u );
+ KURL& operator=( const TQUrl & u );
/**
* @brief Tests if this URL is equal to the given one
@@ -1406,14 +1406,14 @@ public:
* @return @c true if equal and neither this URL nor @p _u is malformed.
* Otherwise @c false
*
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
* @see operator==(const KURL &)
* @see equals()
* @see isValid()
* @see operator!=()
* @see operator<()
*/
- bool operator==( const QString& _u ) const;
+ bool operator==( const TQString& _u ) const;
/**
* @brief Tests if this URL is different from the given one
@@ -1432,16 +1432,16 @@ public:
/**
* @brief Tests if this URL is different from the one given as a string
*
- * Tests by negating the result of operator==(const QString &)
+ * Tests by negating the result of operator==(const TQString &)
*
* @param _u the URL to compare to
*
- * @return the negated result of operator==(const QString &)
+ * @return the negated result of operator==(const TQString &)
*
- * @see operator==(const QString &)
+ * @see operator==(const TQString &)
* @see operator<()
*/
- bool operator!=( const QString& _u ) const { return !( *this == _u ); }
+ bool operator!=( const TQString& _u ) const { return !( *this == _u ); }
/**
* @brief Compares this URL with another one
@@ -1511,10 +1511,10 @@ public:
* @return an empty list on error or the list of split URLs
*
* @see hasSubURL()
- * @see KURL(const QString&, int)
+ * @see KURL(const TQString&, int)
* @see join()
*/
- static List split( const QString& _url );
+ static List split( const TQString& _url );
/**
* @brief Splits nested URLs into a list of URLs
@@ -1559,12 +1559,12 @@ public:
static KURL join( const List& _list );
/**
- * @brief Creates a KURL object from a QString representing either an
+ * @brief Creates a KURL object from a TQString representing either an
* absolute path or a real URL
*
* Use this method instead of
* @code
- * QString someDir = ...
+ * TQString someDir = ...
* KURL url = someDir;
* @endcode
*
@@ -1575,11 +1575,11 @@ public:
* @return the new KURL
*
* @see pathOrURL()
- * @see KURL(const QString&, int)
+ * @see KURL(const TQString&, int)
*
* @since 3.1
*/
- static KURL fromPathOrURL( const QString& text );
+ static KURL fromPathOrURL( const TQString& text );
/**
* @brief Encodes a string for use in URLs
@@ -1589,16 +1589,16 @@ public:
* Convert unicoded string to local encoding and use %%-style
* encoding for all common delimiters / non-ascii characters.
*
- * @param str the string to encode (can be @c QString::null)
+ * @param str the string to encode (can be @c TQString::null)
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the encoded string
*
* @see encode_string_no_slash()
* @see decode_string()
*/
- static QString encode_string(const QString &str, int encoding_hint = 0);
+ static TQString encode_string(const TQString &str, int encoding_hint = 0);
/**
* @brief Encodes a string for use in URLs
@@ -1609,14 +1609,14 @@ public:
* encoding for all common delimiters and non-ascii characters
* as well as the slash @c '/'.
*
- * @param str the string to encode (can be @c QString::null)
+ * @param str the string to encode (can be @c TQString::null)
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see encode_string()
* @see decode_string()
*/
- static QString encode_string_no_slash(const QString &str, int encoding_hint = 0);
+ static TQString encode_string_no_slash(const TQString &str, int encoding_hint = 0);
/**
* @brief Decodes a string as used in URLs
@@ -1627,16 +1627,16 @@ public:
*
* Reverse of encode_string()
*
- * @param str the string to decode (can be @c QString::null)
+ * @param str the string to decode (can be @c TQString::null)
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the decoded string
*
* @see encode_string()
* @see encode_string_no_slash()
*/
- static QString decode_string(const QString &str, int encoding_hint = 0);
+ static TQString decode_string(const TQString &str, int encoding_hint = 0);
/**
* @brief Tests if a given URL is a relative as opposed to an absolute URL
@@ -1652,7 +1652,7 @@ public:
*
* @see relativeURL()
*/
- static bool isRelativeURL(const QString &_url);
+ static bool isRelativeURL(const TQString &_url);
/**
* @brief Creates an URL relative to a base URL for a given input URL
@@ -1671,13 +1671,13 @@ public:
* @param base_url the URL to derive from
* @param url the URL to point to relatively from @p base_url
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see isRelativeURL()
* @see relativePath()
* @see adjustPath()
*/
- static QString relativeURL(const KURL &base_url, const KURL &url, int encoding_hint = 0);
+ static TQString relativeURL(const KURL &base_url, const KURL &url, int encoding_hint = 0);
/**
* @brief Creates a path relative to a base path for a given input path
@@ -1693,7 +1693,7 @@ public:
*
* @see relativeURL()
*/
- static QString relativePath(const QString &base_dir, const QString &path, bool *isParent=0);
+ static TQString relativePath(const TQString &base_dir, const TQString &path, bool *isParent=0);
/**
* @brief Determines which URI mode is suitable for processing URIs of a
@@ -1707,7 +1707,7 @@ public:
*
* @since 3.2
*/
- static URIMode uriModeForProtocol(const QString& protocol);
+ static URIMode uriModeForProtocol(const TQString& protocol);
#ifdef KDE_NO_COMPAT
private:
@@ -1715,7 +1715,7 @@ private:
/**
* @deprecated change code to call fileName()
*/
- QString filename( bool _ignore_trailing_slash_in_path = true ) const
+ TQString filename( bool _ignore_trailing_slash_in_path = true ) const
{
return fileName(_ignore_trailing_slash_in_path);
}
@@ -1724,7 +1724,7 @@ protected:
/**
* @brief Resets the members to their "null" state
*
- * All QString members get reset to @c QString::null, the port to @c 0
+ * All TQString members get reset to @c TQString::null, the port to @c 0
* the URIMode to @c Auto and the URL becomes invalid.
*
* This is like assigning a null URL, but more efficient as it doesn't
@@ -1745,9 +1745,9 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseURL( const QString& _url, int encoding_hint = 0 );
+ void parseURL( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
@@ -1755,9 +1755,9 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseRawURI( const QString& _url, int encoding_hint = 0 );
+ void parseRawURI( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
@@ -1765,36 +1765,36 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseMailto( const QString& _url, int encoding_hint = 0 );
+ void parseMailto( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parse( const QString& _url, int encoding_hint = 0 );
+ void parse( const TQString& _url, int encoding_hint = 0 );
private:
- void _setQuery( const QString& _txt, int encoding_hint = 0);
-
- QString m_strProtocol;
- QString m_strUser;
- QString m_strPass;
- QString m_strHost;
- QString m_strPath;
- QString m_strRef_encoded;
- QString m_strQuery_encoded;
+ void _setQuery( const TQString& _txt, int encoding_hint = 0);
+
+ TQString m_strProtocol;
+ TQString m_strUser;
+ TQString m_strPass;
+ TQString m_strHost;
+ TQString m_strPath;
+ TQString m_strRef_encoded;
+ TQString m_strQuery_encoded;
bool m_bIsMalformed : 1;
enum URIMode m_iUriMode : 3;
uint freeForUse : 4;
unsigned short int m_iPort;
- QString m_strPath_encoded;
+ TQString m_strPath_encoded;
- friend KDECORE_EXPORT QDataStream & operator<< (QDataStream & s, const KURL & a);
- friend KDECORE_EXPORT QDataStream & operator>> (QDataStream & s, KURL & a);
+ friend KDECORE_EXPORT TQDataStream & operator<< (TQDataStream & s, const KURL & a);
+ friend KDECORE_EXPORT TQDataStream & operator>> (TQDataStream & s, KURL & a);
private:
KURLPrivate* d;
};
@@ -1806,7 +1806,7 @@ private:
* are nevertheless considered to be unequal.
* That means no malformed URL equals anything else.
*/
-KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2 );
+KDECORE_EXPORT bool urlcmp( const TQString& _url1, const TQString& _url2 );
/**
* \relates KURL
@@ -1820,9 +1820,9 @@ KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2 );
* @param _ignore_trailing Described in KURL::cmp
* @param _ignore_ref If true, disables comparison of HTML-style references.
*/
-KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing, bool _ignore_ref );
+KDECORE_EXPORT bool urlcmp( const TQString& _url1, const TQString& _url2, bool _ignore_trailing, bool _ignore_ref );
-KDECORE_EXPORT QDataStream & operator<< (QDataStream & s, const KURL & a);
-KDECORE_EXPORT QDataStream & operator>> (QDataStream & s, KURL & a);
+KDECORE_EXPORT TQDataStream & operator<< (TQDataStream & s, const KURL & a);
+KDECORE_EXPORT TQDataStream & operator>> (TQDataStream & s, KURL & a);
#endif
diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp
index 092bf76cd..7147f7a74 100644
--- a/kdecore/kurldrag.cpp
+++ b/kdecore/kurldrag.cpp
@@ -18,9 +18,9 @@
*/
#include "kurldrag.h"
-#include <qstrlist.h>
-#include <qdragobject.h>
-#include <qfont.h>
+#include <tqstrlist.h>
+#include <tqdragobject.h>
+#include <tqfont.h>
#include <unistd.h>
#include <kdeversion.h>
@@ -34,15 +34,15 @@ public:
bool m_exportAsText;
};
-KURLDrag::KURLDrag( const KURL::List &urls, QWidget* dragSource, const char * name )
- : QUriDrag(dragSource, name), m_metaData(), d( 0 )
+KURLDrag::KURLDrag( const KURL::List &urls, TQWidget* dragSource, const char * name )
+ : TQUriDrag(dragSource, name), m_metaData(), d( 0 )
{
init(urls);
}
-KURLDrag::KURLDrag( const KURL::List &urls, const QMap<QString,QString>& metaData,
- QWidget* dragSource, const char * name )
- : QUriDrag(dragSource, name), m_metaData(metaData), d( 0 )
+KURLDrag::KURLDrag( const KURL::List &urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget* dragSource, const char * name )
+ : TQUriDrag(dragSource, name), m_metaData(metaData), d( 0 )
{
init(urls);
}
@@ -73,21 +73,21 @@ void KURLDrag::setExportAsText( bool exp )
d->m_exportAsText = exp;
}
-KURLDrag * KURLDrag::newDrag( const KURL::List &urls, QWidget* dragSource, const char * name )
+KURLDrag * KURLDrag::newDrag( const KURL::List &urls, TQWidget* dragSource, const char * name )
{
- return new KURLDrag( urls, QMap<QString, QString>(), dragSource, name );
+ return new KURLDrag( urls, TQMap<TQString, TQString>(), dragSource, name );
}
-KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource, const char * name )
+KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource, const char * name )
{
return new KURLDrag( urls, metaData, dragSource, name );
}
-bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
+bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris )
{
if ( e->provides( "application/x-kde-urilist" ) ) {
- QByteArray payload = e->encodedData( "application/x-kde-urilist" );
+ TQByteArray payload = e->encodedData( "application/x-kde-urilist" );
if ( payload.size() ) {
uint c=0;
const char* d = payload.data();
@@ -97,7 +97,7 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
while (c < payload.size() && d[c] && d[c]!='\r'
&& d[c] != '\n')
c++;
- QCString s(d+f,c-f+1);
+ TQCString s(d+f,c-f+1);
if ( s[0] != '#' ) // non-comment?
uris.append(stringToUrl(s));
// Skip junk
@@ -109,9 +109,9 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
}
}
- QStrList lst;
- QUriDrag::decode( e, lst );
- for (QStrListIterator it(lst); *it; ++it)
+ TQStrList lst;
+ TQUriDrag::decode( e, lst );
+ for (TQStrListIterator it(lst); *it; ++it)
{
KURL url = stringToUrl( *it );
if ( !url.isValid() )
@@ -124,18 +124,18 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
return !uris.isEmpty();
}
-bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris, QMap<QString,QString>& metaData )
+bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,TQString>& metaData )
{
if ( decode( e, uris ) ) // first decode the URLs (see above)
{
- QByteArray ba = e->encodedData( "application/x-kio-metadata" );
+ TQByteArray ba = e->encodedData( "application/x-kio-metadata" );
if ( ba.size() )
{
- QString s = ba.data();
- QStringList l = QStringList::split( "$@@$", s );
- QStringList::ConstIterator it = l.begin();
+ TQString s = ba.data();
+ TQStringList l = TQStringList::split( "$@@$", s );
+ TQStringList::ConstIterator it = l.begin();
bool readingKey = true; // true, then false, then true, etc.
- QString key;
+ TQString key;
for ( ; it != l.end(); ++it ) {
if ( readingKey )
key = *it;
@@ -151,10 +151,10 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris, QMap<QString,QStr
}
#ifdef Q_WS_QWS
-bool KURLDrag::decode( QStringList const &e, KURL::List &uris )
+bool KURLDrag::decode( TQStringList const &e, KURL::List &uris )
{
- QStringList::ConstIterator end(e.end());
- for(QStringList::ConstIterator it=e.begin(); it!=end; ++it)
+ TQStringList::ConstIterator end(e.end());
+ for(TQStringList::ConstIterator it=e.begin(); it!=end; ++it)
{
KURL url = KURL( *it, 106 ); // 106 is mib enum for utf8 codec
if ( !url.isValid() )
@@ -187,19 +187,19 @@ const char * KURLDrag::format( int i ) const
else return 0;
}
-QByteArray KURLDrag::encodedData( const char* mime ) const
+TQByteArray KURLDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::encodedData( mime );
else if ( mimetype == "text/plain" )
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
if( uris.count() > 1 ) // terminate last line, unless it's the only line
s.append( "\n" );
a.resize( s.length());
@@ -207,12 +207,12 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
}
else if ( mimetype.lower() == "text/plain;charset=iso-8859-1")
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).url(0, 4)); // 4 is mib for latin1
- QCString s = uris.join( "\n" ).latin1();
+ TQCString s = uris.join( "\n" ).latin1();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -220,11 +220,11 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
}
else if ( mimetype.lower() == "text/plain;charset=utf-8")
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).utf8();
+ TQCString s = uris.join( "\n" ).utf8();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -234,8 +234,8 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
{
if ( !m_metaData.isEmpty() )
{
- QString s;
- QMap<QString,QString>::ConstIterator it;
+ TQString s;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = m_metaData.begin(); it != m_metaData.end(); ++it )
{
s += it.key();
@@ -250,7 +250,7 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
return a;
}
-KURL KURLDrag::stringToUrl(const QCString &s)
+KURL KURLDrag::stringToUrl(const TQCString &s)
{
if (strncmp(s.data(), "file:", 5) == 0)
return KURL(s, KGlobal::locale()->fileEncodingMib());
@@ -258,7 +258,7 @@ KURL KURLDrag::stringToUrl(const QCString &s)
return KURL(s, 106); // 106 is mib enum for utf8 codec;
}
-QString KURLDrag::urlToString(const KURL &url)
+TQString KURLDrag::urlToString(const KURL &url)
{
if (url.isLocalFile())
{
@@ -268,14 +268,14 @@ QString KURLDrag::urlToString(const KURL &url)
// According to the XDND spec, file:/ URLs for DND must have
// the hostname part. But in really it just breaks many apps,
// so it's disabled for now.
- QString s = url.url(0, KGlobal::locale()->fileEncodingMib());
+ TQString s = url.url(0, KGlobal::locale()->fileEncodingMib());
if( !s.startsWith( "file://" ))
{
char hostname[257];
if ( gethostname( hostname, 255 ) == 0 )
{
hostname[256] = '\0';
- return QString( "file://" ) + hostname + s.mid( 5 );
+ return TQString( "file://" ) + hostname + s.mid( 5 );
}
}
#endif
@@ -289,6 +289,6 @@ QString KURLDrag::urlToString(const KURL &url)
}
// deprecated ctor
-KURLDrag::KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
- QWidget * dragSource, const char* name ) :
-QUriDrag( urls, dragSource, name ), m_urls( urls ), m_metaData( metaData ), d( 0 ) {}
+KURLDrag::KURLDrag( const TQStrList & urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget * dragSource, const char* name ) :
+TQUriDrag( urls, dragSource, name ), m_urls( urls ), m_metaData( metaData ), d( 0 ) {}
diff --git a/kdecore/kurldrag.h b/kdecore/kurldrag.h
index fec73f322..f69161985 100644
--- a/kdecore/kurldrag.h
+++ b/kdecore/kurldrag.h
@@ -20,16 +20,16 @@
#ifndef __KURLDRAG_H
#define __KURLDRAG_H
-#include <qstringlist.h>
-#include <qdragobject.h>
+#include <tqstringlist.h>
+#include <tqdragobject.h>
#include <kurl.h>
#include "kdelibs_export.h"
class QMimeSource;
class KURLDragPrivate;
/**
- * This class is to be used instead of QUriDrag when using KURL.
- * The reason is: QUriDrag (and the XDND/W3C standards) expect URLs to
+ * This class is to be used instead of TQUriDrag when using KURL.
+ * The reason is: TQUriDrag (and the XDND/W3C standards) expect URLs to
* be encoded in UTF-8 (unicode), but KURL uses the current locale
* by default.
* The other reasons for using this class are:
@@ -39,34 +39,34 @@ class KURLDragPrivate;
* require it for downloading e.g. an image).
*
* To create a drag object, use the KURLDrag constructor.
- * To handle drops, use QUriDrag::canDecode() and KURLDrag::decode()
+ * To handle drops, use TQUriDrag::canDecode() and KURLDrag::decode()
*/
class KDECORE_EXPORT KURLDrag : public QUriDrag
{
public:
/**
* Constructs an object to drag the list of URLs in @p urls.
- * The @p dragSource and @p name arguments are passed on to QUriDrag,
+ * The @p dragSource and @p name arguments are passed on to TQUriDrag,
* and the list of urls is converted to UTF-8 before being passed
- * to QUriDrag.
+ * to TQUriDrag.
* @param urls the list of URLs
- * @param dragSource the parent of the QObject. Should be set when doing drag-n-drop,
+ * @param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
* but should be 0 when copying to the clipboard
* @param name the name of the QObject
*/
- KURLDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 );
+ KURLDrag( const KURL::List &urls, TQWidget* dragSource = 0, const char * name = 0 );
/**
* Constructs an object to drag the list of URLs in @p urls.
* This version also includes metadata.
* @param urls the list of URLs
* @param metaData a map containing meta data
- * @param dragSource the parent of the QObject. Should be set when doing drag-n-drop,
+ * @param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
* but should be 0 when copying to the clipboard
* @param name the name of the QObject
* @see metaData()
*/
- KURLDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource = 0, const char * name = 0 );
+ KURLDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource = 0, const char * name = 0 );
virtual ~KURLDrag();
@@ -82,13 +82,13 @@ public:
/**
* @deprecated Is equivalent with "new KURLDrag(urls, dragSource, name)".
*/
- static KURLDrag * newDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
+ static KURLDrag * newDrag( const KURL::List &urls, TQWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
/**
* @deprecated Is equivalent with "new KURLDrag(urls, metaData, dragSource, name)".
*/
- static KURLDrag * newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
+ static KURLDrag * newDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
/**
* Meta-data to associate with those URLs.
@@ -97,7 +97,7 @@ public:
* drag->metaData()["key"] = data;
* @see KIO::TransferJob
*/
- QMap<QString, QString> &metaData() { return m_metaData; }
+ TQMap<TQString, TQString> &metaData() { return m_metaData; }
/**
* Convenience method that decodes the contents of @p e
@@ -107,7 +107,7 @@ public:
* @param urls the list of urls will be written here
* @return true if successful, false otherwise
*/
- static bool decode( const QMimeSource *e, KURL::List &urls );
+ static bool decode( const TQMimeSource *e, KURL::List &urls );
/**
* Convenience method that decodes the contents of @p e
@@ -119,19 +119,19 @@ public:
* @param metaData the metadata map will be written here
* @return true if successful, false otherwise
*/
- static bool decode( const QMimeSource *e, KURL::List &urls, QMap<QString,QString>& metaData );
+ static bool decode( const TQMimeSource *e, KURL::List &urls, TQMap<TQString,TQString>& metaData );
/**
* Converts a URL to a string representation suitable for dragging.
* @since 3.2
*/
- static QString urlToString(const KURL &url);
+ static TQString urlToString(const KURL &url);
/**
* Converts a string used for dragging to a URL.
* @since 3.2
*/
- static KURL stringToUrl(const QCString &s);
+ static KURL stringToUrl(const TQCString &s);
#ifdef Q_WS_QWS
/**
@@ -139,26 +139,26 @@ public:
* into a list of KURLs for Qt versions without a MIME clipboard.
* Decoding will fail if at least one value in the list is not a valid KURL.
*/
- static bool decode( QStringList const &e, KURL::List &uris );
+ static bool decode( TQStringList const &e, KURL::List &uris );
#endif
/// @reimp
virtual const char * format( int i ) const;
/// @reimp
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
protected:
/**
* @deprecated Use a KURLDrag constructor with a KURL::List
*/
- KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
- QWidget * dragSource, const char* name ) KDE_DEPRECATED;
+ KURLDrag( const TQStrList & urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget * dragSource, const char* name ) KDE_DEPRECATED;
private:
void init(const KURL::List &urls);
- QStrList m_urls;
- QMap<QString,QString> m_metaData;
+ TQStrList m_urls;
+ TQMap<TQString,TQString> m_metaData;
KURLDragPrivate* d;
};
diff --git a/kdecore/kuser.cpp b/kdecore/kuser.cpp
index 184cedadd..3fffddf4f 100644
--- a/kdecore/kuser.cpp
+++ b/kdecore/kuser.cpp
@@ -22,8 +22,8 @@
#include <kuser.h>
#include "kstringhandler.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <pwd.h>
@@ -37,21 +37,21 @@ class KUserPrivate : public KShared
public:
bool valid;
long uid, gid;
- QString loginName, fullName;
- QString roomNumber, workPhone, homePhone;
- QString homeDir, shell;
+ TQString loginName, fullName;
+ TQString roomNumber, workPhone, homePhone;
+ TQString homeDir, shell;
KUserPrivate() : valid(false) {}
KUserPrivate(long _uid,
long _gid,
- const QString &_loginname,
- const QString &_fullname,
- const QString &_room,
- const QString &_workPhone,
- const QString &_homePhone,
- const QString &_homedir,
- const QString &_shell) :
+ const TQString &_loginname,
+ const TQString &_fullname,
+ const TQString &_room,
+ const TQString &_workPhone,
+ const TQString &_homePhone,
+ const TQString &_homedir,
+ const TQString &_shell) :
valid(true),
uid(_uid),
gid(_gid),
@@ -83,7 +83,7 @@ KUser::KUser(long uid) {
fillPasswd( ::getpwuid( uid ) );
}
-KUser::KUser(const QString& name) {
+KUser::KUser(const TQString& name) {
fillName( name.local8Bit().data() );
}
@@ -125,18 +125,18 @@ void KUser::fillName(const char *name) {
void KUser::fillPasswd(struct passwd *p) {
if (p) {
- QString gecos = KStringHandler::from8Bit(p->pw_gecos);
- QStringList gecosList = QStringList::split(',', gecos, true);
+ TQString gecos = KStringHandler::from8Bit(p->pw_gecos);
+ TQStringList gecosList = TQStringList::split(',', gecos, true);
d = new KUserPrivate(p->pw_uid,
p->pw_gid,
- QString::fromLocal8Bit(p->pw_name),
- (gecosList.size() > 0) ? gecosList[0] : QString::null,
- (gecosList.size() > 1) ? gecosList[1] : QString::null,
- (gecosList.size() > 2) ? gecosList[2] : QString::null,
- (gecosList.size() > 3) ? gecosList[3] : QString::null,
- QString::fromLocal8Bit(p->pw_dir),
- QString::fromLocal8Bit(p->pw_shell));
+ TQString::fromLocal8Bit(p->pw_name),
+ (gecosList.size() > 0) ? gecosList[0] : TQString::null,
+ (gecosList.size() > 1) ? gecosList[1] : TQString::null,
+ (gecosList.size() > 2) ? gecosList[2] : TQString::null,
+ (gecosList.size() > 3) ? gecosList[3] : TQString::null,
+ TQString::fromLocal8Bit(p->pw_dir),
+ TQString::fromLocal8Bit(p->pw_shell));
}
else
d = new KUserPrivate();
@@ -164,61 +164,61 @@ bool KUser::isSuperUser() const {
return uid() == 0;
}
-QString KUser::loginName() const {
+TQString KUser::loginName() const {
if (d->valid)
return d->loginName;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::fullName() const {
+TQString KUser::fullName() const {
if (d->valid)
return d->fullName;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::roomNumber() const {
+TQString KUser::roomNumber() const {
if (d->valid)
return d->roomNumber;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::workPhone() const {
+TQString KUser::workPhone() const {
if (d->valid)
return d->workPhone;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::homePhone() const {
+TQString KUser::homePhone() const {
if (d->valid)
return d->homePhone;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::homeDir() const {
+TQString KUser::homeDir() const {
if (d->valid)
return d->homeDir;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::shell() const {
+TQString KUser::shell() const {
if (d->valid)
return d->shell;
else
- return QString::null;
+ return TQString::null;
}
-QValueList<KUserGroup> KUser::groups() const {
- QValueList<KUserGroup> result;
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QValueList<KUserGroup>::const_iterator it;
+TQValueList<KUserGroup> KUser::groups() const {
+ TQValueList<KUserGroup> result;
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QValueList<KUser> users = (*it).users();
+ TQValueList<KUser> users = (*it).users();
if ( users.find( *this ) != users.end()) {
result.append(*it);
}
@@ -226,12 +226,12 @@ QValueList<KUserGroup> KUser::groups() const {
return result;
}
-QStringList KUser::groupNames() const {
- QStringList result;
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QValueList<KUserGroup>::const_iterator it;
+TQStringList KUser::groupNames() const {
+ TQStringList result;
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QValueList<KUser> users = (*it).users();
+ TQValueList<KUser> users = (*it).users();
if ( users.find( *this ) != users.end()) {
result.append((*it).name());
}
@@ -240,8 +240,8 @@ QStringList KUser::groupNames() const {
}
-QValueList<KUser> KUser::allUsers() {
- QValueList<KUser> result;
+TQValueList<KUser> KUser::allUsers() {
+ TQValueList<KUser> result;
struct passwd* p;
@@ -254,13 +254,13 @@ QValueList<KUser> KUser::allUsers() {
return result;
}
-QStringList KUser::allUserNames() {
- QStringList result;
+TQStringList KUser::allUserNames() {
+ TQStringList result;
struct passwd* p;
while ((p = getpwent())) {
- result.append(QString::fromLocal8Bit(p->pw_name));
+ result.append(TQString::fromLocal8Bit(p->pw_name));
}
endpwent();
@@ -276,14 +276,14 @@ class KUserGroupPrivate : public KShared
public:
bool valid;
long gid;
- QString name;
- QValueList<KUser> users;
+ TQString name;
+ TQValueList<KUser> users;
KUserGroupPrivate() : valid(false) {}
KUserGroupPrivate(long _gid,
- const QString & _name,
- const QValueList<KUser> & _users):
+ const TQString & _name,
+ const TQValueList<KUser> & _users):
valid(true),
gid(_gid),
name(_name),
@@ -299,7 +299,7 @@ KUserGroup::KUserGroup(long gid) {
fillGroup(getgrgid(gid));
}
-KUserGroup::KUserGroup(const QString& name) {
+KUserGroup::KUserGroup(const TQString& name) {
fillName(name.local8Bit().data());
}
@@ -345,17 +345,17 @@ void KUserGroup::fillGroup(struct group *p) {
return;
}
- QString name = KStringHandler::from8Bit(p->gr_name);
- QValueList<KUser> users;
+ TQString name = KStringHandler::from8Bit(p->gr_name);
+ TQValueList<KUser> users;
char **user = p->gr_mem;
for ( ; *user; user++) {
- KUser kUser(QString::fromLocal8Bit(*user));
+ KUser kUser(TQString::fromLocal8Bit(*user));
users.append(kUser);
}
d = new KUserGroupPrivate(p->gr_gid,
- QString::fromLocal8Bit(p->gr_name),
+ TQString::fromLocal8Bit(p->gr_name),
users);
}
@@ -371,20 +371,20 @@ long KUserGroup::gid() const {
return -1;
}
-QString KUserGroup::name() const {
+TQString KUserGroup::name() const {
if (d->valid)
return d->name;
else
- return QString::null;
+ return TQString::null;
}
-const QValueList<KUser>& KUserGroup::users() const {
+const TQValueList<KUser>& KUserGroup::users() const {
return d->users;
}
-QStringList KUserGroup::userNames() const {
- QStringList result;
- QValueList<KUser>::const_iterator it;
+TQStringList KUserGroup::userNames() const {
+ TQStringList result;
+ TQValueList<KUser>::const_iterator it;
for ( it = d->users.begin(); it != d->users.end(); ++it ) {
result.append((*it).loginName());
}
@@ -393,8 +393,8 @@ QStringList KUserGroup::userNames() const {
-QValueList<KUserGroup> KUserGroup::allGroups() {
- QValueList<KUserGroup> result;
+TQValueList<KUserGroup> KUserGroup::allGroups() {
+ TQValueList<KUserGroup> result;
struct group* g;
while ((g = getgrent())) {
@@ -406,12 +406,12 @@ QValueList<KUserGroup> KUserGroup::allGroups() {
return result;
}
-QStringList KUserGroup::allGroupNames() {
- QStringList result;
+TQStringList KUserGroup::allGroupNames() {
+ TQStringList result;
struct group* g;
while ((g = getgrent())) {
- result.append(QString::fromLocal8Bit(g->gr_name));
+ result.append(TQString::fromLocal8Bit(g->gr_name));
}
endgrent();
diff --git a/kdecore/kuser.h b/kdecore/kuser.h
index 9826d994c..ac8a1ac0c 100644
--- a/kdecore/kuser.h
+++ b/kdecore/kuser.h
@@ -82,7 +82,7 @@ public:
* @param name the name of the user
*/
// XXX KDE4: Make this explicit
- KUser(const QString& name);
+ KUser(const TQString& name);
/**
* Creates an object that contains information about the user with the given
@@ -157,62 +157,62 @@ public:
/**
* The login name of the user.
- * @return the login name of the user or QString::null if user is invalid
+ * @return the login name of the user or TQString::null if user is invalid
*/
- QString loginName() const;
+ TQString loginName() const;
/**
* The full name of the user.
- * @return the full name of the user or QString::null if user is invalid
+ * @return the full name of the user or TQString::null if user is invalid
*/
- QString fullName() const;
+ TQString fullName() const;
/**
* The user's room number.
- * @return the room number of the user or QString::null if not set or the
+ * @return the room number of the user or TQString::null if not set or the
* user is invalid
*/
- QString roomNumber() const;
+ TQString roomNumber() const;
/**
* The user's work phone.
- * @return the work phone of the user or QString::null if not set or the
+ * @return the work phone of the user or TQString::null if not set or the
* user is invalid
*/
- QString workPhone() const;
+ TQString workPhone() const;
/**
* The user's home phone.
- * @return the home phone of the user or QString::null if not set or the
+ * @return the home phone of the user or TQString::null if not set or the
* user is invalid
*/
- QString homePhone() const;
+ TQString homePhone() const;
/**
* The path to the user's home directory.
- * @return the home directory of the user or QString::null if the
+ * @return the home directory of the user or TQString::null if the
* user is invalid
*/
- QString homeDir() const;
+ TQString homeDir() const;
/**
* The path to the user's login shell.
- * @return the login shell of the user or QString::null if the
+ * @return the login shell of the user or TQString::null if the
* user is invalid
*/
- QString shell() const;
+ TQString shell() const;
/**
* Returns all groups of the user
* @return all groups of the user
*/
- QValueList<KUserGroup> groups() const;
+ TQValueList<KUserGroup> groups() const;
/**
* Returns all group names of the user
* @return all group names of the user
*/
- QStringList groupNames() const;
+ TQStringList groupNames() const;
/**
@@ -224,13 +224,13 @@ public:
* Returns all users of the system.
* @return all users of the system.
*/
- static QValueList<KUser> allUsers();
+ static TQValueList<KUser> allUsers();
/**
* Returns all user names of the system.
* @return all user names of the system.
*/
- static QStringList allUserNames();
+ static TQStringList allUserNames();
private:
KSharedPtr<KUserPrivate> d;
@@ -282,7 +282,7 @@ public:
* If the group does not exist, isValid() will return false.
* @param name the name of the group
*/
- explicit KUserGroup(const QString& name);
+ explicit KUserGroup(const TQString& name);
/**
* Create an object from a group name.
@@ -344,19 +344,19 @@ public:
* The name of the group.
* @return the name of the group
*/
- QString name() const;
+ TQString name() const;
/**
* Returns a list of all users of the group.
* @return a list of all users of the group
*/
- const QValueList<KUser>& users() const;
+ const TQValueList<KUser>& users() const;
/**
* Returns a list of all user login names of the group.
* @return a list of all user login names of the group
*/
- QStringList userNames() const;
+ TQStringList userNames() const;
/**
@@ -367,12 +367,12 @@ public:
/**
* Returns a list of all groups on this system
*/
- static QValueList<KUserGroup> allGroups();
+ static TQValueList<KUserGroup> allGroups();
/**
* Returns a list of all group names on this system
*/
- static QStringList allGroupNames();
+ static TQStringList allGroupNames();
private:
KSharedPtr<KUserGroupPrivate> d;
diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp
index 21d418434..996d55791 100644
--- a/kdecore/kvmallocator.cpp
+++ b/kdecore/kvmallocator.cpp
@@ -28,8 +28,8 @@
#include <unistd.h>
#include <sys/mman.h>
-#include <qintdict.h>
-#include <qmap.h>
+#include <tqintdict.h>
+#include <tqmap.h>
#include <ktempfile.h>
#include <kdebug.h>
@@ -53,8 +53,8 @@ class KVMAllocatorPrivate
public:
KTempFile *tempfile;
off_t max_length;
- QMap<off_t, KVMAllocator::Block> used_blocks;
- QMap<off_t, KVMAllocator::Block> free_blocks;
+ TQMap<off_t, KVMAllocator::Block> used_blocks;
+ TQMap<off_t, KVMAllocator::Block> free_blocks;
};
/**
@@ -85,11 +85,11 @@ KVMAllocator::allocate(size_t _size)
{
if (!d->tempfile)
{
- d->tempfile = new KTempFile(QString::null, "vmdata");
+ d->tempfile = new KTempFile(TQString::null, "vmdata");
d->tempfile->unlink();
}
// Search in free list
- QMap<off_t,KVMAllocator::Block>::iterator it;
+ TQMap<off_t,KVMAllocator::Block>::iterator it;
it = d->free_blocks.begin();
while (it != d->free_blocks.end())
{
@@ -137,7 +137,7 @@ KVMAllocator::free(Block *block_p)
kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is still mmapped!"<<endl;
return;
}
- QMap<off_t,KVMAllocator::Block>::iterator it;
+ TQMap<off_t,KVMAllocator::Block>::iterator it;
it = d->used_blocks.find(block.start);
if (it == d->used_blocks.end())
{
@@ -146,7 +146,7 @@ KVMAllocator::free(Block *block_p)
}
d->used_blocks.remove(it);
it = d->free_blocks.replace(block.start, block);
- QMap<off_t,KVMAllocator::Block>::iterator before = it;
+ TQMap<off_t,KVMAllocator::Block>::iterator before = it;
--before;
if (before != d->free_blocks.end())
{
@@ -163,7 +163,7 @@ KVMAllocator::free(Block *block_p)
}
}
- QMap<off_t,KVMAllocator::Block>::iterator after = it;
+ TQMap<off_t,KVMAllocator::Block>::iterator after = it;
++after;
if (after != d->free_blocks.end())
{
diff --git a/kdecore/kwin.cpp b/kdecore/kwin.cpp
index 1e94b99db..64be09d30 100644
--- a/kdecore/kwin.cpp
+++ b/kdecore/kwin.cpp
@@ -27,11 +27,11 @@
#endif
#include <kuniqueapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qwhatsthis.h>
-#include <qcstring.h>
-#include <qdialog.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqwhatsthis.h>
+#include <tqcstring.h>
+#include <tqdialog.h>
#include "config.h"
#include "kwin.h"
@@ -166,13 +166,13 @@ public:
};
ContextWidget::ContextWidget()
- : QWidget(0,0)
+ : TQWidget(0,0)
{
kwin_net_create_atoms();
kapp->installX11EventFilter( this );
- QWhatsThis::enterWhatsThisMode();
- QCursor c = *QApplication::overrideCursor();
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
+ TQCursor c = *TQApplication::overrideCursor();
+ TQWhatsThis::leaveWhatsThisMode();
XGrabPointer( qt_xdisplay(), qt_xrootwin(), true,
(uint)( ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | EnterWindowMask |
@@ -230,7 +230,7 @@ void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
NETRootInfo rootinfo( qt_xdisplay(), NET::Supported );
if( !rootinfo.isSupported( NET::WMKDESystemTrayWinFor )) {
DCOPRef ref( "kded", "kded" );
- if( !ref.send( "loadModule", QCString( "kdetrayproxy" )))
+ if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
}
#endif
@@ -304,15 +304,15 @@ WId KWin::transientFor( WId win )
#endif
}
-void KWin::setMainWindow( QWidget* subwindow, WId mainwindow )
+void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
{
#ifdef Q_WS_X11
if( mainwindow != 0 )
{
/*
- Grmbl. See QDialog::show(). That should get fixed in Qt somehow.
+ Grmbl. See TQDialog::show(). That should get fixed in Qt somehow.
*/
- if( qt_cast< QDialog* >( subwindow ) != NULL
+ if( qt_cast< TQDialog* >( subwindow ) != NULL
&& subwindow->parentWidget() == NULL
&& kapp->mainWidget() != NULL )
{
@@ -368,16 +368,16 @@ KWin::Info KWin::info( WId win )
w.strut = inf.strut();
w.windowType = inf.windowType( -1U );
if ( inf.name() ) {
- w.name = QString::fromUtf8( inf.name() );
+ w.name = TQString::fromUtf8( inf.name() );
} else {
char* c = 0;
if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) {
- w.name = QString::fromLocal8Bit( c );
+ w.name = TQString::fromLocal8Bit( c );
XFree( c );
}
}
if ( inf.visibleName() )
- w.visibleName = QString::fromUtf8( inf.visibleName() );
+ w.visibleName = TQString::fromUtf8( inf.visibleName() );
else
w.visibleName = w.name;
@@ -392,26 +392,26 @@ KWin::Info KWin::info( WId win )
return w;
}
-QPixmap KWin::icon( WId win, int width, int height, bool scale )
+TQPixmap KWin::icon( WId win, int width, int height, bool scale )
{
return icon( win, width, height, scale, NETWM | WMHints | ClassHint | XApp );
}
-QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
+TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
{
#ifdef Q_WS_X11
KXErrorHandler handler; // ignore badwindow
#endif
- QPixmap result;
+ TQPixmap result;
#ifdef Q_WS_X11
if( flags & NETWM ) {
NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMIcon );
NETIcon ni = info.icon( width, height );
if ( ni.data && ni.size.width > 0 && ni.size.height > 0 ) {
- QImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, QImage::IgnoreEndian );
+ TQImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, TQImage::IgnoreEndian );
img.setAlphaBuffer( true );
- if ( scale && width > 0 && height > 0 &&img.size() != QSize( width, height ) && !img.isNull() )
+ if ( scale && width > 0 && height > 0 &&img.size() != TQSize( width, height ) && !img.isNull() )
img = img.smoothScale( width, height );
if ( !img.isNull() )
result.convertFromImage( img );
@@ -442,14 +442,14 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
XGetGeometry(qt_xdisplay(), p, &root,
&x, &y, &w, &h, &border_w, &depth);
if (w > 0 && h > 0){
- QPixmap pm(w, h, depth);
+ TQPixmap pm(w, h, depth);
// Always detach before doing something behind QPixmap's back.
pm.detach();
XCopyArea(qt_xdisplay(), p, pm.handle(),
qt_xget_temp_gc(qt_xscreen(), depth==1),
0, 0, w, h, 0, 0);
if (p_mask != None){
- QBitmap bm(w, h);
+ TQBitmap bm(w, h);
XCopyArea(qt_xdisplay(), p_mask, bm.handle(),
qt_xget_temp_gc(qt_xscreen(), true),
0, 0, w, h, 0, 0);
@@ -483,9 +483,9 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
XClassHint hint;
if( XGetClassHint( qt_xdisplay(), win, &hint ) ) {
- QString className = hint.res_class;
+ TQString className = hint.res_class;
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
@@ -502,7 +502,7 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
// If the icon is still a null pixmap, load the 'xapp' icon
// as a last resort:
if ( result.isNull() ) {
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
@@ -514,13 +514,13 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
return result;
}
-void KWin::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon )
+void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
{
#ifdef Q_WS_X11
if ( icon.isNull() )
return;
NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
- QImage img = icon.convertToImage().convertDepth( 32 );
+ TQImage img = icon.convertToImage().convertDepth( 32 );
NETIcon ni;
ni.size.width = img.size().width();
ni.size.height = img.size().height();
@@ -672,7 +672,7 @@ void KWin::setCurrentDesktop( int desktop )
#endif
}
-void KWin::setCurrentDesktopViewport( int desktop, QPoint viewport )
+void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport )
{
#ifdef Q_WS_X11
NETRootInfo info( qt_xdisplay(), NET::CurrentDesktop );
@@ -750,10 +750,10 @@ class KWin::WindowInfoPrivate
NETWinInfo* info;
#endif
WId win_;
- QString name_;
- QString iconic_name_;
- QRect geometry_;
- QRect frame_geometry_;
+ TQString name_;
+ TQString iconic_name_;
+ TQRect geometry_;
+ TQRect frame_geometry_;
int ref;
bool valid;
private:
@@ -793,13 +793,13 @@ KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long p
d->win_ = win;
if( properties & NET::WMName ) {
if( d->info->name() && d->info->name()[ 0 ] != '\0' )
- d->name_ = QString::fromUtf8( d->info->name() );
+ d->name_ = TQString::fromUtf8( d->info->name() );
else
d->name_ = readNameProperty( win, XA_WM_NAME );
}
if( properties & NET::WMIconName ) {
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- d->iconic_name_ = QString::fromUtf8( d->info->iconName());
+ d->iconic_name_ = TQString::fromUtf8( d->info->iconName());
else
d->iconic_name_ = readNameProperty( win, XA_WM_ICON_NAME );
}
@@ -813,7 +813,7 @@ KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long p
#endif
}
-// this one is only to make QValueList<> or similar happy
+// this one is only to make TQValueList<> or similar happy
KWin::WindowInfo::WindowInfo()
: d( NULL )
{
@@ -945,9 +945,9 @@ NET::WindowType KWin::WindowInfo::windowType( int supported_types ) const
#endif
}
-QString KWin::WindowInfo::visibleNameWithState() const
+TQString KWin::WindowInfo::visibleNameWithState() const
{
- QString s = visibleName();
+ TQString s = visibleName();
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -955,9 +955,9 @@ QString KWin::WindowInfo::visibleNameWithState() const
return s;
}
-QString KWin::Info::visibleNameWithState() const
+TQString KWin::Info::visibleNameWithState() const
{
- QString s = visibleName;
+ TQString s = visibleName;
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -965,32 +965,32 @@ QString KWin::Info::visibleNameWithState() const
return s;
}
-QString KWin::WindowInfo::visibleName() const
+TQString KWin::WindowInfo::visibleName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleName ) == 0, 176 )
<< "Pass NET::WMVisibleName to KWin::windowInfo()" << endl;
return d->info->visibleName() && d->info->visibleName()[ 0 ] != '\0'
- ? QString::fromUtf8(d->info->visibleName()) : name();
+ ? TQString::fromUtf8(d->info->visibleName()) : name();
#else
- return QString("name");
+ return TQString("name");
#endif
}
-QString KWin::WindowInfo::name() const
+TQString KWin::WindowInfo::name() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMName ) == 0, 176 )
<< "Pass NET::WMName to KWin::windowInfo()" << endl;
return d->name_;
#else
- return QString();
+ return TQString();
#endif
}
-QString KWin::WindowInfo::visibleIconNameWithState() const
+TQString KWin::WindowInfo::visibleIconNameWithState() const
{
- QString s = visibleIconName();
+ TQString s = visibleIconName();
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -998,28 +998,28 @@ QString KWin::WindowInfo::visibleIconNameWithState() const
return s;
}
-QString KWin::WindowInfo::visibleIconName() const
+TQString KWin::WindowInfo::visibleIconName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleIconName ) == 0, 176 )
<< "Pass NET::WMVisibleIconName to KWin::windowInfo()" << endl;
if( d->info->visibleIconName() && d->info->visibleIconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->visibleIconName());
+ return TQString::fromUtf8( d->info->visibleIconName());
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->iconName());
+ return TQString::fromUtf8( d->info->iconName());
if( !d->iconic_name_.isEmpty())
return d->iconic_name_;
#endif
return visibleName();
}
-QString KWin::WindowInfo::iconName() const
+TQString KWin::WindowInfo::iconName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMIconName ) == 0, 176 )
<< "Pass NET::WMIconName to KWin::windowInfo()" << endl;
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->iconName());
+ return TQString::fromUtf8( d->info->iconName());
if( !d->iconic_name_.isEmpty())
return d->iconic_name_;
#endif
@@ -1068,25 +1068,25 @@ int KWin::WindowInfo::desktop() const
#endif
}
-QRect KWin::WindowInfo::geometry() const
+TQRect KWin::WindowInfo::geometry() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMGeometry ) == 0, 176 )
<< "Pass NET::WMGeometry to KWin::windowInfo()" << endl;
return d->geometry_;
#else
- return QRect( 100, 100, 200, 200 );
+ return TQRect( 100, 100, 200, 200 );
#endif
}
-QRect KWin::WindowInfo::frameGeometry() const
+TQRect KWin::WindowInfo::frameGeometry() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMKDEFrameStrut ) == 0, 176 )
<< "Pass NET::WMKDEFrameStrut to KWin::windowInfo()" << endl;
return d->frame_geometry_;
#else
- return QRect();
+ return TQRect();
#endif
}
@@ -1112,7 +1112,7 @@ WId KWin::WindowInfo::groupLeader() const
#endif
}
-QCString KWin::WindowInfo::windowClassClass() const
+TQCString KWin::WindowInfo::windowClassClass() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
@@ -1123,7 +1123,7 @@ QCString KWin::WindowInfo::windowClassClass() const
#endif
}
-QCString KWin::WindowInfo::windowClassName() const
+TQCString KWin::WindowInfo::windowClassName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
@@ -1134,7 +1134,7 @@ QCString KWin::WindowInfo::windowClassName() const
#endif
}
-QCString KWin::WindowInfo::windowRole() const
+TQCString KWin::WindowInfo::windowRole() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowRole ) == 0, 176 )
@@ -1145,7 +1145,7 @@ QCString KWin::WindowInfo::windowRole() const
#endif
}
-QCString KWin::WindowInfo::clientMachine() const
+TQCString KWin::WindowInfo::clientMachine() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ClientMachine ) == 0, 176 )
@@ -1236,14 +1236,14 @@ bool KWin::allowedActionsSupported()
#endif
}
-QString KWin::readNameProperty( WId win, unsigned long atom )
+TQString KWin::readNameProperty( WId win, unsigned long atom )
{
#ifdef Q_WS_X11
XTextProperty tp;
char **text = NULL;
int count;
#endif
- QString result;
+ TQString result;
#ifdef Q_WS_X11
if ( XGetTextProperty( qt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL )
{
@@ -1251,13 +1251,13 @@ QString KWin::readNameProperty( WId win, unsigned long atom )
kwin_UTF8_STRING = XInternAtom( qt_xdisplay(), "UTF8_STRING", False);
if ( tp.encoding == kwin_UTF8_STRING ) {
- result = QString::fromUtf8 ( (const char*) tp.value );
+ result = TQString::fromUtf8 ( (const char*) tp.value );
}
else if ( XmbTextPropertyToTextList( qt_xdisplay(), &tp, &text, &count) == Success &&
text != NULL && count > 0 ) {
- result = QString::fromLocal8Bit( text[0] );
+ result = TQString::fromLocal8Bit( text[0] );
} else if ( tp.encoding == XA_STRING )
- result = QString::fromLocal8Bit( (const char*) tp.value );
+ result = TQString::fromLocal8Bit( (const char*) tp.value );
if( text != NULL )
XFreeStringList( text );
XFree( tp.value );
diff --git a/kdecore/kwin.h b/kdecore/kwin.h
index 45d0eede9..36cccb125 100644
--- a/kdecore/kwin.h
+++ b/kdecore/kwin.h
@@ -20,9 +20,9 @@
#define KWIN_H
#include <sys/types.h>
-#include <qwindowdefs.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqwindowdefs.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
#include "kdelibs_export.h"
#ifdef Q_OS_UNIX
@@ -145,18 +145,18 @@ public:
/**
* Sets the parent window of @p subwindow to be @p mainwindow.
- * This overrides the parent set the usual way as the QWidget parent,
+ * This overrides the parent set the usual way as the TQWidget parent,
* but only for the window manager - e.g. stacking order and window grouping
* will be affected, but features like automatic deletion of children
* when the parent is deleted are unaffected and normally use
- * the QWidget parent.
+ * the TQWidget parent.
*
* This function should be used before a dialog is shown for a window
* that belongs to another application.
*
* @since 3.4
*/
- static void setMainWindow( QWidget* subwindow, WId mainwindow );
+ static void setMainWindow( TQWidget* subwindow, WId mainwindow );
/**
* Makes @p trayWin a system tray window for @p forWin.
@@ -218,7 +218,7 @@ public:
* icon will not be modified.
* @return the icon of the window
*/
- static QPixmap icon( WId win, int width = -1, int height = -1, bool scale = false );
+ static TQPixmap icon( WId win, int width = -1, int height = -1, bool scale = false );
/**
* Masks specifying from which sources to read an icon. They are tried from the best
@@ -248,7 +248,7 @@ public:
* @param flags OR-ed flags from the IconSource enum
* @since 3.2
*/
- static QPixmap icon( WId win, int width, int height, bool scale, int flags );
+ static TQPixmap icon( WId win, int width, int height, bool scale, int flags );
/**
* Sets an @p icon and a @p miniIcon on window @p win
@@ -256,7 +256,7 @@ public:
* @param icon the new icon
* @param miniIcon the new mini icon
*/
- static void setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon );
+ static void setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon );
/**
* Sets the type of window @p win to @p windowType.
@@ -397,7 +397,7 @@ public:
* @param viewport the position of the new viewport
* @since 3.5.5
*/
- static void setCurrentDesktopViewport( int desktop, QPoint viewport );
+ static void setCurrentDesktopViewport( int desktop, TQPoint viewport );
/**
* Iconifies a window. Compatible to XIconifyWindow but has an
@@ -422,7 +422,7 @@ public:
/**
* Raises the given window. This call is only for pagers and similar
* tools that represent direct user actions. Applications should not
- * use it, they should keep using QWidget::raise() or XRaiseWindow()
+ * use it, they should keep using TQWidget::raise() or XRaiseWindow()
* if necessary.
* @since 3.2
*/
@@ -431,7 +431,7 @@ public:
/**
* Lowers the given window. This call is only for pagers and similar
* tools that represent direct user actions. Applications should not
- * use it, they should keep using QWidget::lower() or XLowerWindow()
+ * use it, they should keep using TQWidget::lower() or XLowerWindow()
* if necessary.
* @since 3.2
*/
@@ -455,7 +455,7 @@ public:
* property (WM_NAME, WM_ICON_NAME,...).
* @since 3.2
*/
- static QString readNameProperty( WId window, unsigned long atom );
+ static TQString readNameProperty( WId window, unsigned long atom );
/**
* Returns true if a compositing manager is running (i.e. ARGB windows
@@ -481,9 +481,9 @@ public:
/// The window type.
NET::WindowType windowType;
/// The visible name of the window.
- QString visibleName;
+ TQString visibleName;
/// The name of the window.
- QString name;
+ TQString name;
/// The number of the window's desktop.
int desktop;
/// true if the window is on all desktops.
@@ -491,11 +491,11 @@ public:
/// The process id of the window's owner
pid_t pid;
/// Position and size of the window contents.
- QRect geometry;
+ TQRect geometry;
/// Position and size of the window's frame.
- QRect frameGeometry;
+ TQRect frameGeometry;
- QString visibleNameWithState() const;
+ TQString visibleNameWithState() const;
};
/**
@@ -526,7 +526,7 @@ public:
* Reads all the info about the given window.
*/
WindowInfo( WId window, unsigned long properties, unsigned long properties2 );
- WindowInfo(); // to make QValueList and others happy
+ WindowInfo(); // to make TQValueList and others happy
~WindowInfo();
/**
* Returns false if this window info is not valid (most probably the given
@@ -554,7 +554,7 @@ public:
* Returns true if the window is minimized. Note that it is true only if
* the window is truly minimized, not shaded or on another virtual desktops,
* which makes it different from mappingState() == NET::Iconic
- * or QWidget::isMinimized().
+ * or TQWidget::isMinimized().
* Requires NET::WMState and NET::XAWMState passed to KWin::windowInfo().
*/
bool isMinimized() const;
@@ -587,7 +587,7 @@ public:
* when there are two or more windows with the same name).
* Requires NET::WMVisibleName passed to KWin::windowInfo().
*/
- QString visibleName() const;
+ TQString visibleName() const;
/**
* Returns a visible name with state.
*
@@ -597,20 +597,20 @@ public:
* to KWin::windowInfo().
* @return the window name with state
*/
- QString visibleNameWithState() const;
+ TQString visibleNameWithState() const;
/**
* Returns the name of the window, as specified by the application, without
* any modifications. You should often use visibleName() instead.
* Requires NET::WMName passed to KWin::windowInfo().
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the visible name of the window that should be shown in taskbar
* and all other "iconic" representations of the window. Note that this
* has nothing to do with normal icons.
* Requires NET::WMVisibleIconName passed to KWin::windowInfo().
*/
- QString visibleIconName() const;
+ TQString visibleIconName() const;
/**
* Returns a visible name with state.
*
@@ -621,14 +621,14 @@ public:
* to KWin::windowInfo().
* @return the window iconic name with state
*/
- QString visibleIconNameWithState() const;
+ TQString visibleIconNameWithState() const;
/**
* Returns the name of the window that should be shown in taskbar and all other
* "iconic" representations of the window. Note that this has nothing to do
* with normal icons.
* Requires NET::WMIconName passed to KWin::windowInfo().
*/
- QString iconName() const;
+ TQString iconName() const;
/**
* Returns true if the window is on the currently active virtual desktop.
* Requires NET::WMDesktop passed to KWin::windowInfo().
@@ -655,12 +655,12 @@ public:
* Returns the position and size of the window contents.
* Requires NET::WMGeometry passed to KWin::windowInfo().
*/
- QRect geometry() const;
+ TQRect geometry() const;
/**
* Returns the frame geometry of the window, i.e. including the window decoration.
* Requires NET::WMKDEFrameStrut passed to KWin::windowInfo().
*/
- QRect frameGeometry() const;
+ TQRect frameGeometry() const;
/**
* Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow
* for this window.
@@ -679,7 +679,7 @@ public:
* Requires NET::WM2WindowClass passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowClassClass() const;
+ TQCString windowClassClass() const;
/**
* Returns the name component of the window class for the window
@@ -687,21 +687,21 @@ public:
* Requires NET::WM2WindowClass passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowClassName() const;
+ TQCString windowClassName() const;
/**
* Returns the window role for the window (i.e. WM_WINDOW_ROLE property).
* Requires NET::WM2WindowRole passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowRole() const;
+ TQCString windowRole() const;
/**
* Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property).
* Requires NET::WMClientMachine passed to KWin::windowInfo().
* @since 3.3
*/
- QCString clientMachine() const;
+ TQCString clientMachine() const;
/**
* Returns true if the given action is currently supported for the window
diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp
index 9e3532b0f..7e4d4f773 100644
--- a/kdecore/kwinmodule.cpp
+++ b/kdecore/kwinmodule.cpp
@@ -21,15 +21,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "kwinmodule.h"
#include "kwin.h"
#include <X11/Xatom.h>
#include "kapplication.h"
#include "kdebug.h"
-#include <qtl.h>
-#include <qptrlist.h>
+#include <tqtl.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <dcopclient.h>
#include "netwm.h"
@@ -58,11 +58,11 @@ static unsigned long desktop_properties[ 2 ] = {
NET::KDESystemTrayWindows,
NET::WM2ShowingDesktop };
-class KWinModulePrivate : public QWidget, public NETRootInfo4
+class KWinModulePrivate : public TQWidget, public NETRootInfo4
{
public:
KWinModulePrivate(int _what)
- : QWidget(0,0), NETRootInfo4( qt_xdisplay(),
+ : TQWidget(0,0), NETRootInfo4( qt_xdisplay(),
_what >= KWinModule::INFO_WINDOWS ?
windows_properties : desktop_properties,
2,
@@ -79,23 +79,23 @@ public:
~KWinModulePrivate()
{
}
- QPtrList<KWinModule> modules;
+ TQPtrList<KWinModule> modules;
- QValueList<WId> windows;
- QValueList<WId> stackingOrder;
- QValueList<WId> systemTrayWindows;
+ TQValueList<WId> windows;
+ TQValueList<WId> stackingOrder;
+ TQValueList<WId> systemTrayWindows;
struct StrutData
{
StrutData( WId window_, const NETStrut& strut_, int desktop_ )
: window( window_ ), strut( strut_ ), desktop( desktop_ ) {};
- StrutData() {}; // for QValueList to be happy
+ StrutData() {}; // for TQValueList to be happy
WId window;
NETStrut strut;
int desktop;
};
- QValueList<StrutData> strutWindows;
- QValueList<WId> possibleStrutWindows;
+ TQValueList<StrutData> strutWindows;
+ TQValueList<WId> possibleStrutWindows;
bool strutSignalConnected;
int what;
@@ -109,18 +109,18 @@ public:
void updateStackingOrder();
bool removeStrutWindow( WId );
- QSize numberOfViewports(int desktop) const;
- QPoint currentViewport(int desktop) const;
+ TQSize numberOfViewports(int desktop) const;
+ TQPoint currentViewport(int desktop) const;
};
-KWinModule::KWinModule( QObject* parent )
- : QObject( parent, "kwin_module" )
+KWinModule::KWinModule( TQObject* parent )
+ : TQObject( parent, "kwin_module" )
{
init(INFO_ALL);
}
-KWinModule::KWinModule( QObject* parent, int what )
- : QObject( parent, "kwin_module" )
+KWinModule::KWinModule( TQObject* parent, int what )
+ : TQObject( parent, "kwin_module" )
{
init(what);
}
@@ -138,11 +138,11 @@ void KWinModule::init(int what)
}
else if (static_d->what < what)
{
- QPtrList<KWinModule> modules = static_d->modules;
+ TQPtrList<KWinModule> modules = static_d->modules;
delete static_d;
static_d = new KWinModulePrivate(what);
static_d->modules = modules;
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
(*mit)->d = static_d;
}
@@ -159,12 +159,12 @@ KWinModule::~KWinModule()
}
}
-const QValueList<WId>& KWinModule::windows() const
+const TQValueList<WId>& KWinModule::windows() const
{
return d->windows;
}
-const QValueList<WId>& KWinModule::stackingOrder() const
+const TQValueList<WId>& KWinModule::stackingOrder() const
{
return d->stackingOrder;
}
@@ -175,16 +175,16 @@ bool KWinModule::hasWId(WId w) const
return d->windows.findIndex( w ) != -1;
}
-const QValueList<WId>& KWinModule::systemTrayWindows() const
+const TQValueList<WId>& KWinModule::systemTrayWindows() const
{
return d->systemTrayWindows;
}
-QSize KWinModulePrivate::numberOfViewports(int desktop) const
+TQSize KWinModulePrivate::numberOfViewports(int desktop) const
{
NETSize netdesktop = desktopGeometry(desktop);
- QSize s(netdesktop.width / QApplication::desktop()->width(),
- netdesktop.height / QApplication::desktop()->height());
+ TQSize s(netdesktop.width / TQApplication::desktop()->width(),
+ netdesktop.height / TQApplication::desktop()->height());
// workaround some kwin bugs
if (s.width() < 1) s.setWidth(1);
@@ -192,12 +192,12 @@ QSize KWinModulePrivate::numberOfViewports(int desktop) const
return s;
}
-QPoint KWinModulePrivate::currentViewport(int desktop) const
+TQPoint KWinModulePrivate::currentViewport(int desktop) const
{
NETPoint netviewport = desktopViewport(desktop);
- return QPoint(1+(netviewport.x / QApplication::desktop()->width()),
- 1+(netviewport.y / QApplication::desktop()->height()));
+ return TQPoint(1+(netviewport.x / TQApplication::desktop()->width()),
+ 1+(netviewport.y / TQApplication::desktop()->height()));
}
bool KWinModulePrivate::x11Event( XEvent * ev )
@@ -211,36 +211,36 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
NETRootInfo::event( ev, m, 5 );
if (( m[ PROTOCOLS ] & CurrentDesktop ) && currentDesktop() != old_current_desktop )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->currentDesktopChanged( currentDesktop() );
if (( m[ PROTOCOLS ] & ActiveWindow ) && activeWindow() != old_active_window )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->activeWindowChanged( activeWindow() );
if ( m[ PROTOCOLS ] & DesktopViewport ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->currentDesktopViewportChanged(currentDesktop(),
currentViewport(currentDesktop()));
}
if ( m[ PROTOCOLS ] & DesktopGeometry ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->desktopGeometryChanged(currentDesktop());
}
if ( m[ PROTOCOLS ] & DesktopNames )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->desktopNamesChanged();
if (( m[ PROTOCOLS ] & NumberOfDesktops ) && numberOfDesktops() != old_number_of_desktops )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->numberOfDesktopsChanged( numberOfDesktops() );
if ( m[ PROTOCOLS ] & WorkArea )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->workAreaChanged();
if ( m[ PROTOCOLS ] & ClientListStacking ) {
updateStackingOrder();
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->stackingOrderChanged();
}
if(( m[ PROTOCOLS2 ] & WM2ShowingDesktop ) && showingDesktop() != old_showing_desktop ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->showingDesktopChanged( showingDesktop());
}
} else if ( windows.findIndex( ev->xany.window ) != -1 ){
@@ -261,7 +261,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
possibleStrutWindows.append( ev->xany.window );
}
if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowChanged( ev->xany.window );
emit (*mit)->windowChanged( ev->xany.window, dirty );
emit (*mit)->windowChanged( ev->xany.window, dirty[ NETWinInfo::PROTOCOLS ] );
@@ -276,7 +276,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
bool KWinModulePrivate::removeStrutWindow( WId w )
{
- for( QValueList< StrutData >::Iterator it = strutWindows.begin();
+ for( TQValueList< StrutData >::Iterator it = strutWindows.begin();
it != strutWindows.end();
++it )
if( (*it).window == w ) {
@@ -295,7 +295,7 @@ void KWinModulePrivate::updateStackingOrder()
void KWinModulePrivate::addClient(Window w)
{
- if ( (what >= KWinModule::INFO_WINDOWS) && !QWidget::find( w ) )
+ if ( (what >= KWinModule::INFO_WINDOWS) && !TQWidget::find( w ) )
XSelectInput( qt_xdisplay(), w, PropertyChangeMask | StructureNotifyMask );
bool emit_strutChanged = false;
if( strutSignalConnected && modules.count() > 0 ) {
@@ -308,7 +308,7 @@ void KWinModulePrivate::addClient(Window w)
} else
possibleStrutWindows.append( w );
windows.append( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowAdded( w );
if ( emit_strutChanged )
emit (*mit)->strutChanged();
@@ -327,7 +327,7 @@ void KWinModulePrivate::removeClient(Window w)
}
possibleStrutWindows.remove( w );
windows.remove( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowRemoved( w );
if ( emit_strutChanged )
emit (*mit)->strutChanged();
@@ -337,14 +337,14 @@ void KWinModulePrivate::removeClient(Window w)
void KWinModulePrivate::addSystemTrayWin(Window w)
{
systemTrayWindows.append( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->systemTrayWindowAdded( w );
}
void KWinModulePrivate::removeSystemTrayWin(Window w)
{
systemTrayWindows.remove( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->systemTrayWindowRemoved( w );
}
@@ -358,12 +358,12 @@ int KWinModule::numberOfDesktops() const
return d->numberOfDesktops();
}
-QSize KWinModule::numberOfViewports(int desktop) const
+TQSize KWinModule::numberOfViewports(int desktop) const
{
return d->numberOfViewports(desktop);
}
-QPoint KWinModule::currentViewport(int desktop) const
+TQPoint KWinModule::currentViewport(int desktop) const
{
return d->currentViewport(desktop);
}
@@ -378,26 +378,26 @@ bool KWinModule::showingDesktop() const
return d->showingDesktop();
}
-QRect KWinModule::workArea( int desktop ) const
+TQRect KWinModule::workArea( int desktop ) const
{
int desk = (desktop > 0 && desktop <= (int) d->numberOfDesktops() ) ? desktop : currentDesktop();
if ( desk <= 0 )
- return QApplication::desktop()->geometry();
+ return TQApplication::desktop()->geometry();
NETRect r = d->workArea( desk );
if( r.size.width <= 0 || r.size.height <= 0 ) // not set
- return QApplication::desktop()->geometry();
- return QRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
+ return TQApplication::desktop()->geometry();
+ return TQRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
}
-QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
+TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) const
{
- QRect all = QApplication::desktop()->geometry();
- QRect a = all;
+ TQRect all = TQApplication::desktop()->geometry();
+ TQRect a = all;
if (desktop == -1)
desktop = d->currentDesktop();
- QValueList<WId>::ConstIterator it1;
+ TQValueList<WId>::ConstIterator it1;
for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) {
if(exclude.findIndex(*it1) != -1) continue;
@@ -406,7 +406,7 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
// to repeatedly find out struts of all windows. Therefore strut values for strut
// windows are cached here.
NETStrut strut;
- QValueList< KWinModulePrivate::StrutData >::Iterator it2 = d->strutWindows.begin();
+ TQValueList< KWinModulePrivate::StrutData >::Iterator it2 = d->strutWindows.begin();
for( ;
it2 != d->strutWindows.end();
++it2 )
@@ -426,7 +426,7 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
} else
continue; // not a strut window
- QRect r = all;
+ TQRect r = all;
if ( strut.left > 0 )
r.setLeft( r.left() + (int) strut.left );
if ( strut.top > 0 )
@@ -443,20 +443,20 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
void KWinModule::connectNotify( const char* signal )
{
- if( !d->strutSignalConnected && qstrcmp( signal, SIGNAL(strutChanged())) == 0 )
+ if( !d->strutSignalConnected && qstrcmp( signal, TQT_SIGNAL(strutChanged())) == 0 )
d->strutSignalConnected = true;
- QObject::connectNotify( signal );
+ TQObject::connectNotify( signal );
}
-QString KWinModule::desktopName( int desktop ) const
+TQString KWinModule::desktopName( int desktop ) const
{
const char* name = d->desktopName( (desktop > 0 && desktop <= (int) d->numberOfDesktops() ) ? desktop : currentDesktop() );
if ( name && name[0] )
- return QString::fromUtf8( name );
+ return TQString::fromUtf8( name );
return i18n("Desktop %1").arg( desktop );
}
-void KWinModule::setDesktopName( int desktop, const QString& name )
+void KWinModule::setDesktopName( int desktop, const TQString& name )
{
if (desktop <= 0 || desktop > (int) d->numberOfDesktops() )
desktop = currentDesktop();
@@ -464,15 +464,15 @@ void KWinModule::setDesktopName( int desktop, const QString& name )
}
-void KWinModule::doNotManage( const QString& title )
+void KWinModule::doNotManage( const TQString& title )
{
if ( !kapp->dcopClient()->isAttached() )
kapp->dcopClient()->attach();
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << title;
- kapp->dcopClient()->call("kwin", "", "doNotManage(QString)",
+ kapp->dcopClient()->call("kwin", "", "doNotManage(TQString)",
data, replyType, replyData);
}
diff --git a/kdecore/kwinmodule.h b/kdecore/kwinmodule.h
index d0e9624b9..f680d561d 100644
--- a/kdecore/kwinmodule.h
+++ b/kdecore/kwinmodule.h
@@ -23,8 +23,8 @@
#ifndef KWINMODULE_H
#define KWINMODULE_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
#ifdef Q_OS_UNIX
@@ -83,15 +83,15 @@ public:
* systemTrayWindowRemoved,
* windowChanged,
* strutChanged,
- * workArea(const QValueList<WId> &excludes, int desktop)
+ * workArea(const TQValueList<WId> &excludes, int desktop)
**/
- KWinModule( QObject* parent, int what );
+ KWinModule( TQObject* parent, int what );
/**
* Creates a KWinModule object and connects to the window
* manager.
* @param parent the parent for the QObject
**/
- KWinModule( QObject* parent = 0 );
+ KWinModule( TQObject* parent = 0 );
/**
* Destructor. Internal cleanup, nothing fancy.
@@ -108,7 +108,7 @@ public:
*
* Iteration over this list can be done easily with
* \code
- * QValueList<WId>::ConstIterator it;
+ * TQValueList<WId>::ConstIterator it;
* for ( it = module->windows().begin();
* it != modules->windows().end(); ++it ) {
* ... do something here, (*it) is the current WId.
@@ -116,7 +116,7 @@ public:
* \endcode
* @return the list of all toplevel windows
*/
- const QValueList<WId>& windows() const;
+ const TQValueList<WId>& windows() const;
/**
* Returns the list of all toplevel windows currently managed by the
@@ -124,7 +124,7 @@ public:
* higher). May be useful for pagers.
* @return the list of all toplevel windows in stacking order
*/
- const QValueList<WId>& stackingOrder() const;
+ const TQValueList<WId>& stackingOrder() const;
/**
* Test to see if @p id still managed at present.
@@ -137,7 +137,7 @@ public:
* Returns a list of the system tray windows.
* @return a list of all system tray windows
**/
- const QValueList<WId>& systemTrayWindows() const;
+ const TQValueList<WId>& systemTrayWindows() const;
/**
* Returns the current virtual desktop.
@@ -157,14 +157,14 @@ public:
* @return the number of virtual desktops
* @since 3.5.5
**/
- QSize numberOfViewports(int desktop) const;
+ TQSize numberOfViewports(int desktop) const;
/**
* Returns the current viewport on the given virtual desktop
* @return the number of virtual desktops
* @since 3.5.5
**/
- QPoint currentViewport(int desktop) const;
+ TQPoint currentViewport(int desktop) const;
/**
* Returns the currently active window, or 0 if no window is active.
@@ -180,7 +180,7 @@ public:
* current desktop
* @return the size and position of the desktop
**/
- QRect workArea( int desktop = - 1 ) const;
+ TQRect workArea( int desktop = - 1 ) const;
/**
@@ -193,21 +193,21 @@ public:
* current desktop
* @return the size and position of the desktop
**/
- QRect workArea( const QValueList<WId> &excludes, int desktop = -1) const;
+ TQRect workArea( const TQValueList<WId> &excludes, int desktop = -1) const;
/**
* Returns the name of the specified desktop.
* @param desktop the number of the desktop
* @return the name of the desktop
**/
- QString desktopName( int desktop ) const;
+ TQString desktopName( int desktop ) const;
/**
* Sets the name of the specified desktop.
* @param desktop the number of the desktop
* @param name the new name for the desktop
**/
- void setDesktopName( int desktop, const QString& name );
+ void setDesktopName( int desktop, const TQString& name );
/**
* Returns the state of showing the desktop.
@@ -224,7 +224,7 @@ public:
*
* @param title the title of the window
*/
- void doNotManage( const QString& title );
+ void doNotManage( const TQString& title );
signals:
@@ -340,7 +340,7 @@ signals:
* The viewport position has changed
* @since 3.5
*/
- void currentDesktopViewportChanged(int desktop, const QPoint& viewport);
+ void currentDesktopViewportChanged(int desktop, const TQPoint& viewport);
protected:
virtual void connectNotify( const char* signal );
diff --git a/kdecore/kxerrorhandler.cpp b/kdecore/kxerrorhandler.cpp
index c632012d2..43a05f42e 100644
--- a/kdecore/kxerrorhandler.cpp
+++ b/kdecore/kxerrorhandler.cpp
@@ -22,7 +22,7 @@
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "kxerrorhandler.h"
diff --git a/kdecore/kxerrorhandler.h b/kdecore/kxerrorhandler.h
index 2140bbd44..9c0bd1e24 100644
--- a/kdecore/kxerrorhandler.h
+++ b/kdecore/kxerrorhandler.h
@@ -25,8 +25,8 @@
#ifndef KXERRORHANDLER_H
#define KXERRORHANDLER_H
-#include <qvaluelist.h>
-#include <qwindowdefs.h>
+#include <tqvaluelist.h>
+#include <tqwindowdefs.h>
#include <kdelibs_export.h>
#include <X11/Xlib.h>
diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp
index b730c73a7..6b6f971a2 100644
--- a/kdecore/kxmessages.cpp
+++ b/kdecore/kxmessages.cpp
@@ -37,8 +37,8 @@ DEALINGS IN THE SOFTWARE.
const long BROADCAST_MASK = PropertyChangeMask;
// CHECKME
-KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P )
- : QWidget( parent_P )
+KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P )
+ : TQWidget( parent_P )
{
if( accept_broadcast_P != NULL )
{
@@ -51,11 +51,11 @@ KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P )
{
accept_atom1 = accept_atom2 = None;
}
- handle = new QWidget( this );
+ handle = new TQWidget( this );
}
-KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P, bool obsolete_P )
- : QWidget( parent_P )
+KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P, bool obsolete_P )
+ : TQWidget( parent_P )
{
if( accept_broadcast_P != NULL )
{
@@ -63,13 +63,13 @@ KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P, bool
kapp->installX11EventFilter( this ); // i.e. PropertyChangeMask
accept_atom2 = XInternAtom( qt_xdisplay(), accept_broadcast_P, false );
accept_atom1 = obsolete_P ? accept_atom2
- : XInternAtom( qt_xdisplay(), QCString( accept_broadcast_P ) + "_BEGIN", false );
+ : XInternAtom( qt_xdisplay(), TQCString( accept_broadcast_P ) + "_BEGIN", false );
}
else
{
accept_atom1 = accept_atom2 = None;
}
- handle = new QWidget( this );
+ handle = new TQWidget( this );
}
KXMessages::~KXMessages()
@@ -78,47 +78,47 @@ KXMessages::~KXMessages()
}
-void KXMessages::broadcastMessage( const char* msg_type_P, const QString& message_P )
+void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& message_P )
{
broadcastMessage( msg_type_P, message_P, -1, true );
}
-void KXMessages::broadcastMessage( const char* msg_type_P, const QString& message_P,
+void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& message_P,
int screen_P, bool obsolete_P )
{
Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
Window root = screen_P == -1 ? qt_xrootwin() : qt_xrootwin( screen_P );
send_message_internal( root, message_P, BROADCAST_MASK, qt_xdisplay(),
a1, a2, handle->winId());
}
-void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const QString& message_P )
+void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& message_P )
{
sendMessage( w_P, msg_type_P, message_P, true );
}
-void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const QString& message_P,
+void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& message_P,
bool obsolete_P )
{
Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
send_message_internal( w_P, message_P, 0, qt_xdisplay(), a1, a2, handle->winId());
}
bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
- const QString& message_P )
+ const TQString& message_P )
{
return broadcastMessageX( disp, msg_type_P, message_P, -1, true );
}
bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
- const QString& message_P, int screen_P, bool obsolete_P )
+ const TQString& message_P, int screen_P, bool obsolete_P )
{
if( disp == NULL )
return false;
Atom a2 = XInternAtom( disp, msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( disp, QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( disp, TQCString( msg_type_P ) + "_BEGIN", false );
Window root = screen_P == -1 ? DefaultRootWindow( disp ) : RootWindow( disp, screen_P );
Window win = XCreateSimpleWindow( disp, root, 0, 0, 1, 1,
0, BlackPixel( disp, screen_P == -1 ? DefaultScreen( disp ) : screen_P ),
@@ -130,18 +130,18 @@ bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
}
bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
- const QString& message_P )
+ const TQString& message_P )
{
return sendMessageX( disp, w_P, msg_type_P, message_P, true );
}
bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
- const QString& message_P, bool obsolete_P )
+ const TQString& message_P, bool obsolete_P )
{
if( disp == NULL )
return false;
Atom a2 = XInternAtom( disp, msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( disp, QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( disp, TQCString( msg_type_P ) + "_BEGIN", false );
Window win = XCreateSimpleWindow( disp, DefaultRootWindow( disp ), 0, 0, 1, 1,
0, BlackPixelOfScreen( DefaultScreenOfDisplay( disp )),
BlackPixelOfScreen( DefaultScreenOfDisplay( disp )));
@@ -150,11 +150,11 @@ bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
return true;
}
-void KXMessages::send_message_internal( WId w_P, const QString& msg_P, long mask_P,
+void KXMessages::send_message_internal( WId w_P, const TQString& msg_P, long mask_P,
Display* disp, Atom atom1_P, Atom atom2_P, Window handle_P )
{
unsigned int pos = 0;
- QCString msg = msg_P.utf8();
+ TQCString msg = msg_P.utf8();
unsigned int len = strlen( msg );
XEvent e;
e.xclient.type = ClientMessage;
@@ -179,9 +179,9 @@ void KXMessages::send_message_internal( WId w_P, const QString& msg_P, long mask
bool KXMessages::x11Event( XEvent* ev_P )
{
if( ev_P->type != ClientMessage || ev_P->xclient.format != 8 )
- return QWidget::x11Event( ev_P );
+ return TQWidget::x11Event( ev_P );
if( ev_P->xclient.message_type != accept_atom1 && ev_P->xclient.message_type != accept_atom2 )
- return QWidget::x11Event( ev_P );
+ return TQWidget::x11Event( ev_P );
char buf[ 21 ]; // can't be longer
int i;
for( i = 0;
@@ -193,7 +193,7 @@ bool KXMessages::x11Event( XEvent* ev_P )
{
if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 )
// two different messages on the same window at the same time shouldn't happen anyway
- incoming_messages[ ev_P->xclient.window ] = QCString();
+ incoming_messages[ ev_P->xclient.window ] = TQCString();
incoming_messages[ ev_P->xclient.window ] += buf;
}
else
@@ -204,7 +204,7 @@ bool KXMessages::x11Event( XEvent* ev_P )
}
if( i < 20 ) // last message fragment
{
- emit gotMessage( QString::fromUtf8( incoming_messages[ ev_P->xclient.window ] ));
+ emit gotMessage( TQString::fromUtf8( incoming_messages[ ev_P->xclient.window ] ));
incoming_messages.remove( ev_P->xclient.window );
}
return false; // lets other KXMessages instances get the event too
diff --git a/kdecore/kxmessages.h b/kdecore/kxmessages.h
index 9595ebde5..8c71679fe 100644
--- a/kdecore/kxmessages.h
+++ b/kdecore/kxmessages.h
@@ -25,9 +25,9 @@ DEALINGS IN THE SOFTWARE.
#ifndef __KXMESSAGES_H
#define __KXMESSAGES_H
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11
#include <X11/X.h>
@@ -58,12 +58,12 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- KXMessages( const char* accept_broadcast, QWidget* parent, bool obsolete );
+ KXMessages( const char* accept_broadcast, TQWidget* parent, bool obsolete );
/**
* @deprecated
* This method is equivalent to the other constructor with obsolete = true.
*/
- KXMessages( const char* accept_broadcast = NULL, QWidget* parent = NULL );
+ KXMessages( const char* accept_broadcast = NULL, TQWidget* parent = NULL );
virtual ~KXMessages();
/**
@@ -76,13 +76,13 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- void sendMessage( WId w, const char* msg_type, const QString& message,
+ void sendMessage( WId w, const char* msg_type, const TQString& message,
bool obsolete );
/**
* @deprecated
* This method is equivalent to sendMessage() with obsolete = true.
*/
- void sendMessage( WId w, const char* msg_type, const QString& message );
+ void sendMessage( WId w, const char* msg_type, const TQString& message );
/**
* Broadcasts the given message with the given message type.
* @param msg_type the type of the message
@@ -91,13 +91,13 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- void broadcastMessage( const char* msg_type, const QString& message,
+ void broadcastMessage( const char* msg_type, const TQString& message,
int screen, bool obsolete );
/**
* @deprecated
* This method is equivalent to broadcastMessage() with obsolete = true.
*/
- void broadcastMessage( const char* msg_type, const QString& message );
+ void broadcastMessage( const char* msg_type, const TQString& message );
/**
* Sends the given message with the given message type only to given
@@ -113,13 +113,13 @@ class KDECORE_EXPORT KXMessages
* @return false when an error occurred, true otherwise
*/
static bool sendMessageX( Display* disp, WId w, const char* msg_type,
- const QString& message, bool obsolete );
+ const TQString& message, bool obsolete );
/**
* @deprecated
* This method is equivalent to sendMessageX() with obsolete = true.
*/
static bool sendMessageX( Display* disp, WId w, const char* msg_type,
- const QString& message );
+ const TQString& message );
/**
* Broadcasts the given message with the given message type.
@@ -134,32 +134,32 @@ class KDECORE_EXPORT KXMessages
* @return false when an error occurred, true otherwise
*/
static bool broadcastMessageX( Display* disp, const char* msg_type,
- const QString& message, int screen, bool obsolete );
+ const TQString& message, int screen, bool obsolete );
/**
* @deprecated
* This method is equivalent to broadcastMessageX() with obsolete = true.
*/
static bool broadcastMessageX( Display* disp, const char* msg_type,
- const QString& message );
+ const TQString& message );
signals:
/**
* Emitted when a message was received.
* @param message the message that has been received
*/
- void gotMessage( const QString& message );
+ void gotMessage( const TQString& message );
protected:
/**
* @internal
*/
virtual bool x11Event( XEvent* ev );
private:
- static void send_message_internal( WId w_P, const QString& msg_P, long mask_P,
+ static void send_message_internal( WId w_P, const TQString& msg_P, long mask_P,
Display* disp, Atom atom1_P, Atom atom2_P, Window handle_P );
- QWidget* handle;
+ TQWidget* handle;
Atom accept_atom2;
- QCString cached_atom_name_; // KDE4 unused
+ TQCString cached_atom_name_; // KDE4 unused
Atom accept_atom1;
- QMap< WId, QCString > incoming_messages;
+ TQMap< WId, TQCString > incoming_messages;
KXMessagesPrivate* d;
};
diff --git a/kdecore/libintl.cpp b/kdecore/libintl.cpp
index 2b60302d3..aadfcd821 100644
--- a/kdecore/libintl.cpp
+++ b/kdecore/libintl.cpp
@@ -51,7 +51,7 @@ Boston, MA 02110-1301, USA. */
#include "kde_file.h"
#include <config.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <stdlib.h>
diff --git a/kdecore/netsupp.cpp b/kdecore/netsupp.cpp
index ee8ddad23..6d56e147d 100644
--- a/kdecore/netsupp.cpp
+++ b/kdecore/netsupp.cpp
@@ -28,7 +28,7 @@
#include <unistd.h>
#include <arpa/inet.h>
-#include <qglobal.h>
+#include <tqglobal.h>
// This is so that, if addrinfo is defined, it doesn't clobber our definition
// It might be defined in the few cases in which we are replacing the system's
diff --git a/kdecore/netsupp.h b/kdecore/netsupp.h
index 66435d24b..4dba3f6cc 100644
--- a/kdecore/netsupp.h
+++ b/kdecore/netsupp.h
@@ -144,7 +144,7 @@ struct kde_sockaddr_in6
#define KAI_SYSTEM 0 /* data is all-system */
#define KAI_LOCALUNIX 1 /* data contains a Unix addrinfo allocated by us */
-#define KAI_QDNS 2 /* data contains data derived from QDns */
+#define KAI_QDNS 2 /* data contains data derived from TQDns */
struct addrinfo; /* forward declaration; this could be needed */
diff --git a/kdecore/netwm.cpp b/kdecore/netwm.cpp
index 9e7d4580e..9c8bd1283 100644
--- a/kdecore/netwm.cpp
+++ b/kdecore/netwm.cpp
@@ -25,7 +25,7 @@
//#define NETWMDEBUG
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "netwm.h"
@@ -2798,8 +2798,8 @@ NET::Orientation NETRootInfo::desktopLayoutOrientation() const {
}
-QSize NETRootInfo::desktopLayoutColumnsRows() const {
- return QSize( p->desktop_layout_columns, p->desktop_layout_rows );
+TQSize NETRootInfo::desktopLayoutColumnsRows() const {
+ return TQSize( p->desktop_layout_columns, p->desktop_layout_rows );
}
diff --git a/kdecore/netwm.h b/kdecore/netwm.h
index b7ccfd351..cc39ada1d 100644
--- a/kdecore/netwm.h
+++ b/kdecore/netwm.h
@@ -28,7 +28,7 @@
#define __net_wm_h
#include "kdelibs_export.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -381,7 +381,7 @@ public:
Returns the desktop layout number of columns and rows. Note that
either may be 0 (see _NET_DESKTOP_LAYOUT).
**/
- QSize desktopLayoutColumnsRows() const;
+ TQSize desktopLayoutColumnsRows() const;
/**
Returns the desktop layout starting corner.
diff --git a/kdecore/netwm_def.h b/kdecore/netwm_def.h
index 94042cf1c..1f6860243 100644
--- a/kdecore/netwm_def.h
+++ b/kdecore/netwm_def.h
@@ -35,7 +35,7 @@
this class is to keep the implementation from being dependant on a
separate framework/library.
- NETPoint is only used by the NET API. Usually QPoint is the
+ NETPoint is only used by the NET API. Usually TQPoint is the
appropriate class for representing a point.
@author Bradley T. Hughes <bhughes@trolltech.com>
@@ -62,7 +62,7 @@ struct NETPoint {
existence of this class is to keep the implementation from being dependant
on a separate framework/library.
- NETSize is only used by the NET API. Usually QSize is the
+ NETSize is only used by the NET API. Usually TQSize is the
appropriate class for representing a size.
@author Bradley T. Hughes <bhughes@trolltech.com>
@@ -88,7 +88,7 @@ struct NETSize {
size width by height. The existence of this class is to keep the implementation
from being dependant on a separate framework/library;
- NETRect is only used by the NET API. Usually QRect is the
+ NETRect is only used by the NET API. Usually TQRect is the
appropriate class for representing a rectangle.
**/
struct NETRect {
diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp
index 7207a9c4f..52d826c88 100644
--- a/kdecore/network/kbufferedsocket.cpp
+++ b/kdecore/network/kbufferedsocket.cpp
@@ -24,8 +24,8 @@
#include <config.h>
-#include <qmutex.h>
-#include <qtimer.h>
+#include <tqmutex.h>
+#include <tqtimer.h>
#include "ksocketdevice.h"
#include "ksocketaddress.h"
@@ -47,8 +47,8 @@ public:
}
};
-KBufferedSocket::KBufferedSocket(const QString& host, const QString& service,
- QObject *parent, const char *name)
+KBufferedSocket::KBufferedSocket(const TQString& host, const TQString& service,
+ TQObject *parent, const char *name)
: KStreamSocket(host, service, parent, name),
d(new KBufferedSocketPrivate)
{
@@ -86,7 +86,7 @@ void KBufferedSocket::close()
else
{
setState(Closing);
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(false);
emit stateChanged(Closing);
@@ -177,7 +177,7 @@ Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
resetError();
// enable notifier to send data
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(true);
@@ -200,7 +200,7 @@ void KBufferedSocket::enableRead(bool enable)
if (!enable && d->input)
{
// reenable it
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(true);
}
@@ -208,7 +208,7 @@ void KBufferedSocket::enableRead(bool enable)
if (enable && state() != Connected && d->input && !d->input->isEmpty())
// this means the buffer is still dirty
// allow the signal to be emitted
- QTimer::singleShot(0, this, SLOT(slotReadActivity()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
}
void KBufferedSocket::enableWrite(bool enable)
@@ -217,7 +217,7 @@ void KBufferedSocket::enableWrite(bool enable)
if (!enable && d->output && !d->output->isEmpty())
{
// reenable it
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(true);
}
@@ -243,7 +243,7 @@ void KBufferedSocket::stateChanging(SocketState newState)
void KBufferedSocket::setInputBuffering(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (!enable)
{
delete d->input;
@@ -262,7 +262,7 @@ KIOBufferBase* KBufferedSocket::inputBuffer()
void KBufferedSocket::setOutputBuffering(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (!enable)
{
delete d->output;
@@ -302,7 +302,7 @@ bool KBufferedSocket::canReadLine() const
return d->input->canReadLine();
}
-QCString KBufferedSocket::readLine()
+TQCString KBufferedSocket::readLine()
{
return d->input->readLine();
}
@@ -358,7 +358,7 @@ void KBufferedSocket::slotReadActivity()
{
// buffer isn't empty
// keep emitting signals till it is
- QTimer::singleShot(0, this, SLOT(slotReadActivity()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
emit readyRead();
}
}
diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h
index b0b99f8d1..d99862781 100644
--- a/kdecore/network/kbufferedsocket.h
+++ b/kdecore/network/kbufferedsocket.h
@@ -25,9 +25,9 @@
#ifndef KBUFFEREDSOCKET_H
#define KBUFFEREDSOCKET_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kstreamsocket.h"
#include <kdelibs_export.h>
@@ -49,7 +49,7 @@ class KBufferedSocketPrivate;
*
* @note Buffered sockets only make sense if you're using them from
* the main (event-loop) thread. This is actually a restriction
- * imposed by Qt's QSocketNotifier. If you want to use a socket
+ * imposed by Qt's TQSocketNotifier. If you want to use a socket
* in an auxiliary thread, please use KStreamSocket.
*
* @see KNetwork::KStreamSocket, KNetwork::KServerSocket
@@ -67,8 +67,8 @@ public:
* @param parent the parent object for this object
* @param name the internal name for this object
*/
- KBufferedSocket(const QString& node = QString::null, const QString& service = QString::null,
- QObject* parent = 0L, const char *name = 0L);
+ KBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
@@ -195,7 +195,7 @@ public:
/**
* Reads a line of data from the socket buffers.
*/
- QCString readLine();
+ TQCString readLine();
// KDE4: make virtual, add timeout to match the Qt4 signature
// and move to another class up the hierarchy
diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp
index b777dc8de..2da802d56 100644
--- a/kdecore/network/kclientsocketbase.cpp
+++ b/kdecore/network/kclientsocketbase.cpp
@@ -24,9 +24,9 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qtimer.h>
-#include <qmutex.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -47,8 +47,8 @@ public:
bool enableRead : 1, enableWrite : 1;
};
-KClientSocketBase::KClientSocketBase(QObject *parent, const char *name)
- : QObject(parent, name), d(new KClientSocketBasePrivate)
+KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KClientSocketBasePrivate)
{
d->state = Idle;
d->enableRead = true;
@@ -74,7 +74,7 @@ void KClientSocketBase::setState(SocketState state)
bool KClientSocketBase::setSocketOptions(int opts)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts); // call parent
// don't create the device unnecessarily
@@ -140,14 +140,14 @@ bool KClientSocketBase::lookup()
{
if (d->localResolver.serviceName().isNull() &&
!d->localResolver.nodeName().isNull())
- d->localResolver.setServiceName(QString::fromLatin1(""));
+ d->localResolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
- QObject::connect(&d->peerResolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
- QObject::connect(&d->localResolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->peerResolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->localResolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
if (d->localResolver.status() <= 0)
d->localResolver.start();
@@ -164,7 +164,7 @@ bool KClientSocketBase::lookup()
if (blocking())
lookupFinishedSlot();
else
- QTimer::singleShot(0, this, SLOT(lookupFinishedSlot()));
+ TQTimer::singleShot(0, this, TQT_SLOT(lookupFinishedSlot()));
}
else
{
@@ -387,10 +387,10 @@ bool KClientSocketBase::emitsReadyRead() const
void KClientSocketBase::enableRead(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
d->enableRead = enable;
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(enable);
}
@@ -402,10 +402,10 @@ bool KClientSocketBase::emitsReadyWrite() const
void KClientSocketBase::enableWrite(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
d->enableWrite = enable;
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(enable);
}
@@ -427,8 +427,8 @@ void KClientSocketBase::lookupFinishedSlot()
if (d->peerResolver.isRunning() || d->localResolver.isRunning() || state() != HostLookup)
return;
- QObject::disconnect(&d->peerResolver, 0L, this, SLOT(lookupFinishedSlot()));
- QObject::disconnect(&d->localResolver, 0L, this, SLOT(lookupFinishedSlot()));
+ TQObject::disconnect(&d->peerResolver, 0L, this, TQT_SLOT(lookupFinishedSlot()));
+ TQObject::disconnect(&d->localResolver, 0L, this, TQT_SLOT(lookupFinishedSlot()));
if (d->peerResolver.status() < 0 || d->localResolver.status() < 0)
{
setState(Idle); // backtrack
@@ -449,11 +449,11 @@ void KClientSocketBase::stateChanging(SocketState newState)
{
if (newState == Connected && socketDevice())
{
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
{
n->setEnabled(d->enableRead);
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotReadActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity()));
}
else
return;
@@ -462,7 +462,7 @@ void KClientSocketBase::stateChanging(SocketState newState)
if (n)
{
n->setEnabled(d->enableWrite);
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotWriteActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity()));
}
else
return;
diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h
index ccd94994a..1a6d3b8b1 100644
--- a/kdecore/network/kclientsocketbase.h
+++ b/kdecore/network/kclientsocketbase.h
@@ -25,8 +25,8 @@
#ifndef KCLIENTSOCKETBASE_H
#define KCLIENTSOCKETBASE_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "ksocketbase.h"
#include "kresolver.h"
@@ -46,7 +46,7 @@ class KClientSocketBasePrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KClientSocketBase : public QObject, public KActiveSocketBase
+class KDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase
{
Q_OBJECT
@@ -87,10 +87,10 @@ public:
/**
* Default constructor.
*
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KClientSocketBase(QObject* parent, const char *name);
+ KClientSocketBase(TQObject* parent, const char *name);
/**
* Destructor.
@@ -202,14 +202,14 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null) = 0;
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null) = 0;
/**
* Reimplemented from KSocketBase. Connect this socket to this
* specific address.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound
* signal will be emitted.
*/
@@ -243,8 +243,8 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null) = 0;
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null) = 0;
/**
* @overload
@@ -255,10 +255,10 @@ public:
/**
* @deprecated
* This is a convenience function provided to ease migrating from
- * Qt 3.x's QSocket class.
+ * Qt 3.x's TQSocket class.
*/
- inline void connectToHost(const QString& host, Q_UINT16 port)
- { connect(host, QString::number(port)); }
+ inline void connectToHost(const TQString& host, Q_UINT16 port)
+ { connect(host, TQString::number(port)); }
/**
* Disconnects the socket.
@@ -267,7 +267,7 @@ public:
virtual bool disconnect();
/**
- * Opens the socket. Reimplemented from QIODevice.
+ * Opens the socket. Reimplemented from TQIODevice.
*
* You should not call this function; instead, use @ref connect
*/
@@ -275,7 +275,7 @@ public:
{ return connect(); }
/**
- * Closes the socket. Reimplemented from QIODevice.
+ * Closes the socket. Reimplemented from TQIODevice.
*
* The closing of the socket causes the emission of the
* signal @ref closed.
@@ -283,7 +283,7 @@ public:
virtual void close();
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
*/
virtual void flush()
{ }
diff --git a/kdecore/network/kdatagramsocket.cpp b/kdecore/network/kdatagramsocket.cpp
index a0d3bc05d..d598d2d14 100644
--- a/kdecore/network/kdatagramsocket.cpp
+++ b/kdecore/network/kdatagramsocket.cpp
@@ -41,7 +41,7 @@ using namespace KNetwork;
*
*/
-KDatagramSocket::KDatagramSocket(QObject* parent, const char *name)
+KDatagramSocket::KDatagramSocket(TQObject* parent, const char *name)
: KClientSocketBase(parent, name), d(0L)
{
peerResolver().setFamily(KResolver::KnownFamily);
@@ -52,11 +52,11 @@ KDatagramSocket::KDatagramSocket(QObject* parent, const char *name)
localResolver().setFlags(KResolver::Passive);
- // QObject::connect(localResolver(), SIGNAL(finished(KResolverResults)),
- // this, SLOT(lookupFinishedLocal()));
- QObject::connect(&peerResolver(), SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedPeer()));
- QObject::connect(this, SIGNAL(hostFound()), this, SLOT(lookupFinishedLocal()));
+ // TQObject::connect(localResolver(), TQT_SIGNAL(finished(KResolverResults)),
+ // this, TQT_SLOT(lookupFinishedLocal()));
+ TQObject::connect(&peerResolver(), TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedPeer()));
+ TQObject::connect(this, TQT_SIGNAL(hostFound()), this, TQT_SLOT(lookupFinishedLocal()));
}
KDatagramSocket::~KDatagramSocket()
@@ -66,7 +66,7 @@ KDatagramSocket::~KDatagramSocket()
//delete d;
}
-bool KDatagramSocket::bind(const QString& node, const QString& service)
+bool KDatagramSocket::bind(const TQString& node, const TQString& service)
{
if (state() >= Bound)
return false;
@@ -89,7 +89,7 @@ bool KDatagramSocket::bind(const QString& node, const QString& service)
return true;
}
-bool KDatagramSocket::connect(const QString& node, const QString& service)
+bool KDatagramSocket::connect(const TQString& node, const TQString& service)
{
if (state() >= Connected)
return true; // already connected
@@ -152,7 +152,7 @@ KDatagramPacket KDatagramSocket::receive()
size = bytesAvailable();
}
- QByteArray data(size);
+ TQByteArray data(size);
KSocketAddress address;
// now do the reading
@@ -261,11 +261,11 @@ bool KDatagramSocket::doBind()
void KDatagramSocket::setupSignals()
{
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
{
n->setEnabled(emitsReadyRead());
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotReadActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity()));
}
else
return;
@@ -274,7 +274,7 @@ void KDatagramSocket::setupSignals()
if (n)
{
n->setEnabled(emitsReadyWrite());
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotWriteActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity()));
}
else
return;
diff --git a/kdecore/network/kdatagramsocket.h b/kdecore/network/kdatagramsocket.h
index 31ccf9af7..6b94c1d42 100644
--- a/kdecore/network/kdatagramsocket.h
+++ b/kdecore/network/kdatagramsocket.h
@@ -25,7 +25,7 @@
#ifndef KDATAGRAMSOCKET_H
#define KDATAGRAMSOCKET_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include "ksocketaddress.h"
#include "kclientsocketbase.h"
@@ -43,14 +43,14 @@ class KResolverEntry;
* consists of data as well as a network address associated (whither to send
* the data or whence it came).
*
- * This is a lightweight class. Data is stored in a @ref QByteArray, which means
+ * This is a lightweight class. Data is stored in a @ref TQByteArray, which means
* that it is explicitly shared.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
class KDECORE_EXPORT KDatagramPacket
{
- QByteArray m_data;
+ TQByteArray m_data;
KSocketAddress m_address;
public:
@@ -63,7 +63,7 @@ public:
/**
* Constructs the datagram with the specified content.
*/
- KDatagramPacket(const QByteArray& content)
+ KDatagramPacket(const TQByteArray& content)
: m_data(content)
{ }
@@ -78,7 +78,7 @@ public:
/**
* Constructs the datagram with the specified content and address.
*/
- KDatagramPacket(const QByteArray& content, const KSocketAddress& addr)
+ KDatagramPacket(const TQByteArray& content, const KSocketAddress& addr)
: m_data(content), m_address(addr)
{ }
@@ -104,7 +104,7 @@ public:
/**
* Returns the data.
*/
- const QByteArray& data() const
+ const TQByteArray& data() const
{ return m_data; }
/**
@@ -145,7 +145,7 @@ public:
/**
* Detaches our data from a shared pool.
- * @see QByteArray::detach
+ * @see TQByteArray::detach
*/
void detach()
{ m_data.detach(); }
@@ -153,7 +153,7 @@ public:
/**
* Sets the data to the given value. Data is explicitly shared.
*/
- void setData(const QByteArray& data)
+ void setData(const TQByteArray& data)
{ m_data = data; }
/**
@@ -185,7 +185,7 @@ public:
/**
* Default constructor.
*/
- KDatagramSocket(QObject* parent = 0L, const char *name = 0L);
+ KDatagramSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This closes the socket.
@@ -205,8 +205,8 @@ public:
* Some protocol families will use anonymous source addresses, while others
* will allocate an address automatically.
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* @overload
@@ -227,8 +227,8 @@ public:
* @note Calling connect will not cause the socket to be bound. You have
* to call @ref bind explicitly.
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* @overload
diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp
index 73e433a2e..09d8dd7a5 100644
--- a/kdecore/network/khttpproxysocketdevice.cpp
+++ b/kdecore/network/khttpproxysocketdevice.cpp
@@ -27,8 +27,8 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include <qsocketnotifier.h>
-#include <qcstring.h>
+#include <tqsocketnotifier.h>
+#include <tqcstring.h>
#include "kresolver.h"
#include "ksocketaddress.h"
@@ -43,8 +43,8 @@ class KNetwork::KHttpProxySocketDevicePrivate
{
public:
KResolverEntry proxy;
- QCString request;
- QCString reply;
+ TQCString request;
+ TQCString reply;
KSocketAddress peer;
KHttpProxySocketDevicePrivate()
@@ -89,7 +89,7 @@ void KHttpProxySocketDevice::setProxyServer(const KResolverEntry& proxy)
void KHttpProxySocketDevice::close()
{
- d->reply = d->request = QCString();
+ d->reply = d->request = TQCString();
d->peer = KSocketAddress();
KSocketDevice::close();
}
@@ -128,7 +128,7 @@ bool KHttpProxySocketDevice::connect(const KResolverEntry& address)
return parseServerReply();
}
-bool KHttpProxySocketDevice::connect(const QString& node, const QString& service)
+bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& service)
{
// same safety checks as above
if (m_sockfd == -1 && (d->proxy.family() == AF_UNSPEC ||
@@ -153,11 +153,11 @@ bool KHttpProxySocketDevice::connect(const QString& node, const QString& service
setState(0); // unset open flag
// prepare the request
- QString request = QString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
+ TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
"Cache-Control: no-cache\r\n"
"Host: \r\n"
"\r\n");
- QString node2 = node;
+ TQString node2 = node;
if (node.contains(':'))
node2 = '[' + node + ']';
@@ -216,11 +216,11 @@ bool KHttpProxySocketDevice::parseServerReply()
else if (avail < 0)
return false; // error!
- QByteArray buf(avail);
+ TQByteArray buf(avail);
if (peekBlock(buf.data(), avail) < 0)
return false; // error!
- QCString fullHeaders = d->reply + buf.data();
+ TQCString fullHeaders = d->reply + buf.data();
// search for the end of the headers
index = fullHeaders.find("\r\n\r\n");
if (index == -1)
diff --git a/kdecore/network/khttpproxysocketdevice.h b/kdecore/network/khttpproxysocketdevice.h
index ed4f1d60c..7c9908ad5 100644
--- a/kdecore/network/khttpproxysocketdevice.h
+++ b/kdecore/network/khttpproxysocketdevice.h
@@ -87,7 +87,7 @@ public:
* Name-based connection.
* We can tell the HTTP proxy server the full name.
*/
- virtual bool connect(const QString& name, const QString& service);
+ virtual bool connect(const TQString& name, const TQString& service);
/**
* Return the peer address.
diff --git a/kdecore/network/kiobuffer.h b/kdecore/network/kiobuffer.h
index 4da5ecb43..2fc5b49e3 100644
--- a/kdecore/network/kiobuffer.h
+++ b/kdecore/network/kiobuffer.h
@@ -25,7 +25,7 @@
#ifndef KIOBUFFER_H
#define KIOBUFFER_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -77,7 +77,7 @@ public:
/**
* Reads a line from the buffer and discards it.
*/
- virtual QCString readLine() = 0;
+ virtual TQCString readLine() = 0;
/**
* Returns the number of bytes in the buffer. Note that this is not
diff --git a/kdecore/network/kmulticastsocket.h b/kdecore/network/kmulticastsocket.h
index 80c2f6990..7fbd6e0f2 100644
--- a/kdecore/network/kmulticastsocket.h
+++ b/kdecore/network/kmulticastsocket.h
@@ -52,7 +52,7 @@ public:
/**
* Constructor.
*/
- KMulticastSocket(QObject* parent = 0L, const char *name = 0L);
+ KMulticastSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp
index 915288123..598b6de55 100644
--- a/kdecore/network/kresolver.cpp
+++ b/kdecore/network/kresolver.cpp
@@ -37,16 +37,16 @@
#include <unistd.h>
// Qt includes
-#include <qapplication.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qshared.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qmutex.h>
-#include <qguardedptr.h>
+#include <tqapplication.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqshared.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
+#include <tqguardedptr.h>
// IDN
#ifdef HAVE_IDNA_H
@@ -63,7 +63,7 @@
#ifdef NEED_MUTEX
#warning "mutex"
-QMutex getXXbyYYmutex;
+TQMutex getXXbyYYmutex;
#endif
using namespace KNetwork;
@@ -78,8 +78,8 @@ public:
KSocketAddress addr;
int socktype;
int protocol;
- QString canonName;
- QCString encodedName;
+ TQString canonName;
+ TQCString encodedName;
inline KResolverEntryPrivate() :
socktype(0), protocol(0)
@@ -94,7 +94,7 @@ KResolverEntry::KResolverEntry() :
// constructor with stuff
KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
- const QString& canonName, const QCString& encodedName) :
+ const TQString& canonName, const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
d->addr = addr;
@@ -106,8 +106,8 @@ KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int pro
// constructor with even more stuff
KResolverEntry::KResolverEntry(const struct sockaddr* sa, Q_UINT16 salen, int socktype,
- int protocol, const QString& canonName,
- const QCString& encodedName) :
+ int protocol, const TQString& canonName,
+ const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
d->addr = KSocketAddress(sa, salen);
@@ -153,15 +153,15 @@ int KResolverEntry::family() const
}
// returns the canonical name
-QString KResolverEntry::canonicalName() const
+TQString KResolverEntry::canonicalName() const
{
- return d ? d->canonName : QString::null;
+ return d ? d->canonName : TQString::null;
}
// returns the encoded name
-QCString KResolverEntry::encodedName() const
+TQCString KResolverEntry::encodedName() const
{
- return d ? d->encodedName : QCString();
+ return d ? d->encodedName : TQCString();
}
// returns the socket type
@@ -196,7 +196,7 @@ KResolverEntry& KResolverEntry::operator= (const KResolverEntry& that)
class KNetwork::KResolverResultsPrivate
{
public:
- QString node, service;
+ TQString node, service;
int errorcode, syserror;
KResolverResultsPrivate() :
@@ -212,7 +212,7 @@ KResolverResults::KResolverResults()
// copy constructor
KResolverResults::KResolverResults(const KResolverResults& other)
- : QValueList<KResolverEntry>(other), d(new KResolverResultsPrivate)
+ : TQValueList<KResolverEntry>(other), d(new KResolverResultsPrivate)
{
*d = *other.d;
}
@@ -233,8 +233,8 @@ KResolverResults::operator= (const KResolverResults& other)
// copy over the other data
*d = *other.d;
- // now let QValueList do the rest of the work
- QValueList<KResolverEntry>::operator =(other);
+ // now let TQValueList do the rest of the work
+ TQValueList<KResolverEntry>::operator =(other);
return *this;
}
@@ -259,20 +259,20 @@ void KResolverResults::setError(int errorcode, int systemerror)
}
// gets the hostname
-QString KResolverResults::nodeName() const
+TQString KResolverResults::nodeName() const
{
return d->node;
}
// gets the service name
-QString KResolverResults::serviceName() const
+TQString KResolverResults::serviceName() const
{
return d->service;
}
// sets the address
-void KResolverResults::setAddress(const QString& node,
- const QString& service)
+void KResolverResults::setAddress(const TQString& node,
+ const TQString& service)
{
d->node = node;
d->service = service;
@@ -285,19 +285,19 @@ void KResolverResults::virtual_hook( int, void* )
///////////////////////
// class KResolver
-QStringList *KResolver::idnDomains = 0;
+TQStringList *KResolver::idnDomains = 0;
// default constructor
-KResolver::KResolver(QObject *parent, const char *name)
- : QObject(parent, name), d(new KResolverPrivate(this))
+KResolver::KResolver(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KResolverPrivate(this))
{
}
// constructor with host and service
-KResolver::KResolver(const QString& nodename, const QString& servicename,
- QObject *parent, const char *name)
- : QObject(parent, name), d(new KResolverPrivate(this, nodename, servicename))
+KResolver::KResolver(const TQString& nodename, const TQString& servicename,
+ TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KResolverPrivate(this, nodename, servicename))
{
}
@@ -333,19 +333,19 @@ bool KResolver::isRunning() const
}
// get the hostname
-QString KResolver::nodeName() const
+TQString KResolver::nodeName() const
{
return d->input.node;
}
// get the service
-QString KResolver::serviceName() const
+TQString KResolver::serviceName() const
{
return d->input.service;
}
// sets the hostname
-void KResolver::setNodeName(const QString& nodename)
+void KResolver::setNodeName(const TQString& nodename)
{
// don't touch those values if we're working!
if (!isRunning())
@@ -357,7 +357,7 @@ void KResolver::setNodeName(const QString& nodename)
}
// sets the service
-void KResolver::setServiceName(const QString& service)
+void KResolver::setServiceName(const TQString& service)
{
// don't change if running
if (!isRunning())
@@ -369,7 +369,7 @@ void KResolver::setServiceName(const QString& service)
}
// sets the address
-void KResolver::setAddress(const QString& nodename, const QString& service)
+void KResolver::setAddress(const TQString& nodename, const TQString& service)
{
setNodeName(nodename);
setServiceName(service);
@@ -462,7 +462,7 @@ bool KResolver::wait(int msec)
return true;
}
- QMutexLocker locker(&d->mutex);
+ TQMutexLocker locker(&d->mutex);
if (!isRunning())
{
@@ -476,7 +476,7 @@ bool KResolver::wait(int msec)
}
else
{
- QTime t;
+ TQTime t;
t.start();
while (!msec || t.elapsed() < msec)
@@ -525,7 +525,7 @@ KResolver::results() const
return r;
}
-bool KResolver::event(QEvent* e)
+bool KResolver::event(TQEvent* e)
{
if (static_cast<int>(e->type()) == KResolverManager::ResolutionCompleted)
{
@@ -541,7 +541,7 @@ void KResolver::emitFinished()
if (isRunning())
d->status = KResolver::Success;
- QGuardedPtr<QObject> p = this; // guard against deletion
+ TQGuardedPtr<TQObject> p = this; // guard against deletion
emit finished(d->results);
@@ -549,7 +549,7 @@ void KResolver::emitFinished()
deleteLater(); // in QObject
}
-QString KResolver::errorString(int errorcode, int syserror)
+TQString KResolver::errorString(int errorcode, int syserror)
{
// no i18n now...
static const char * const messages[] =
@@ -574,17 +574,17 @@ QString KResolver::errorString(int errorcode, int syserror)
return i18n("request was canceled");
if (errorcode > 0 || errorcode < SystemError)
- return QString::null;
+ return TQString::null;
- QString msg = i18n(messages[-errorcode]);
+ TQString msg = i18n(messages[-errorcode]);
if (errorcode == SystemError)
- msg.arg(QString::fromLocal8Bit(strerror(syserror)));
+ msg.arg(TQString::fromLocal8Bit(strerror(syserror)));
return msg;
}
KResolverResults
-KResolver::resolve(const QString& host, const QString& service, int flags,
+KResolver::resolve(const TQString& host, const TQString& service, int flags,
int families)
{
KResolver qres(host, service, qApp, "synchronous KResolver");
@@ -595,23 +595,23 @@ KResolver::resolve(const QString& host, const QString& service, int flags,
return qres.results();
}
-bool KResolver::resolveAsync(QObject* userObj, const char *userSlot,
- const QString& host, const QString& service,
+bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot,
+ const TQString& host, const TQString& service,
int flags, int families)
{
KResolver* qres = new KResolver(host, service, qApp, "asynchronous KResolver");
- QObject::connect(qres, SIGNAL(finished(KResolverResults)), userObj, userSlot);
+ TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot);
qres->setFlags(flags);
qres->setFamily(families);
qres->d->deleteWhenDone = true; // this is the only difference from the example code
return qres->start();
}
-QStrList KResolver::protocolName(int protonum)
+TQStrList KResolver::protocolName(int protonum)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobynumber(protonum);
@@ -639,7 +639,7 @@ QStrList KResolver::protocolName(int protonum)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (pe != NULL)
{
lst.append(pe->p_name);
@@ -654,11 +654,11 @@ QStrList KResolver::protocolName(int protonum)
return lst;
}
-QStrList KResolver::protocolName(const char *protoname)
+TQStrList KResolver::protocolName(const char *protoname)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobyname(protoname);
@@ -686,7 +686,7 @@ QStrList KResolver::protocolName(const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (pe != NULL)
{
lst.append(pe->p_name);
@@ -705,7 +705,7 @@ int KResolver::protocolNumber(const char *protoname)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobyname(protoname);
@@ -748,7 +748,7 @@ int KResolver::servicePort(const char *servname, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyname(servname, protoname);
@@ -787,11 +787,11 @@ int KResolver::servicePort(const char *servname, const char *protoname)
return servport;
}
-QStrList KResolver::serviceName(const char* servname, const char *protoname)
+TQStrList KResolver::serviceName(const char* servname, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyname(servname, protoname);
@@ -819,7 +819,7 @@ QStrList KResolver::serviceName(const char* servname, const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (se != NULL)
{
lst.append(se->s_name);
@@ -834,11 +834,11 @@ QStrList KResolver::serviceName(const char* servname, const char *protoname)
return lst;
}
-QStrList KResolver::serviceName(int port, const char *protoname)
+TQStrList KResolver::serviceName(int port, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYPORT_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyport(port, protoname);
@@ -866,7 +866,7 @@ QStrList KResolver::serviceName(int port, const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (se != NULL)
{
lst.append(se->s_name);
@@ -881,9 +881,9 @@ QStrList KResolver::serviceName(int port, const char *protoname)
return lst;
}
-QString KResolver::localHostName()
+TQString KResolver::localHostName()
{
- QCString name;
+ TQCString name;
int len;
#ifdef MAXHOSTNAMELEN
@@ -910,12 +910,12 @@ QString KResolver::localHostName()
else
{
// Oops! Unknown error!
- name = QCString();
+ name = TQCString();
}
}
if (name.isEmpty())
- return QString::fromLatin1("localhost");
+ return TQString::fromLatin1("localhost");
if (name.find('.') == -1)
{
@@ -924,7 +924,7 @@ QString KResolver::localHostName()
KResolverResults results = resolve(name, "0", CanonName);
if (results.isEmpty())
// cannot find a valid hostname!
- return QString::fromLatin1("localhost");
+ return TQString::fromLatin1("localhost");
else
return results.first().canonicalName();
}
@@ -934,31 +934,31 @@ QString KResolver::localHostName()
// forward declaration
-static QStringList splitLabels(const QString& unicodeDomain);
-static QCString ToASCII(const QString& label);
-static QString ToUnicode(const QString& label);
+static TQStringList splitLabels(const TQString& unicodeDomain);
+static TQCString ToASCII(const TQString& label);
+static TQString ToUnicode(const TQString& label);
-static QStringList *KResolver_initIdnDomains()
+static TQStringList *KResolver_initIdnDomains()
{
const char *kde_use_idn = getenv("KDE_USE_IDN");
if (!kde_use_idn)
kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn";
- return new QStringList(QStringList::split(':', QString::fromLatin1(kde_use_idn).lower()));
+ return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower()));
}
// implement the ToAscii function, as described by IDN documents
-QCString KResolver::domainToAscii(const QString& unicodeDomain)
+TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
{
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
- QCString retval;
+ TQCString retval;
// RFC 3490, section 4 describes the operation:
// 1) this is a query, so don't allow unassigned
// 2) split the domain into individual labels, without
// separators.
- QStringList input = splitLabels(unicodeDomain);
+ TQStringList input = splitLabels(unicodeDomain);
// Do we allow IDN names for this TLD?
if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
@@ -968,13 +968,13 @@ QCString KResolver::domainToAscii(const QString& unicodeDomain)
// we don't enforce
// 4) for each label, apply ToASCII
- QStringList::Iterator it = input.begin();
- const QStringList::Iterator end = input.end();
+ TQStringList::Iterator it = input.begin();
+ const TQStringList::Iterator end = input.end();
for ( ; it != end; ++it)
{
- QCString cs = ToASCII(*it);
+ TQCString cs = ToASCII(*it);
if (cs.isNull())
- return QCString(); // error!
+ return TQCString(); // error!
// no, all is Ok.
if (!retval.isEmpty())
@@ -985,20 +985,20 @@ QCString KResolver::domainToAscii(const QString& unicodeDomain)
return retval;
}
-QString KResolver::domainToUnicode(const QCString& asciiDomain)
+TQString KResolver::domainToUnicode(const TQCString& asciiDomain)
{
- return domainToUnicode(QString::fromLatin1(asciiDomain));
+ return domainToUnicode(TQString::fromLatin1(asciiDomain));
}
// implement the ToUnicode function, as described by IDN documents
-QString KResolver::domainToUnicode(const QString& asciiDomain)
+TQString KResolver::domainToUnicode(const TQString& asciiDomain)
{
if (asciiDomain.isEmpty())
return asciiDomain;
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
- QString retval;
+ TQString retval;
// draft-idn-idna-14.txt, section 4 describes the operation:
// 1) this is a query, so don't allow unassigned
@@ -1006,7 +1006,7 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
// 2) split the domain into individual labels, without
// separators.
- QStringList input = splitLabels(asciiDomain);
+ TQStringList input = splitLabels(asciiDomain);
// Do we allow IDN names for this TLD?
if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
@@ -1016,11 +1016,11 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
// we don't enforce
// 4) for each label, apply ToUnicode
- QStringList::Iterator it;
- const QStringList::Iterator end = input.end();
+ TQStringList::Iterator it;
+ const TQStringList::Iterator end = input.end();
for (it = input.begin(); it != end; ++it)
{
- QString label = ToUnicode(*it).lower();
+ TQString label = ToUnicode(*it).lower();
// ToUnicode can't fail
if (!retval.isEmpty())
@@ -1031,7 +1031,7 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
return retval;
}
-QString KResolver::normalizeDomain(const QString& domain)
+TQString KResolver::normalizeDomain(const TQString& domain)
{
return domainToUnicode(domainToAscii(domain));
}
@@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* )
// RFC 3492 - Punycode: A Bootstring encoding of Unicode
// for Internationalized Domain Names in Applications (IDNA)
-static QStringList splitLabels(const QString& unicodeDomain)
+static TQStringList splitLabels(const TQString& unicodeDomain)
{
// From RFC 3490 section 3.1:
// "Whenever dots are used as label separators, the following characters
@@ -1057,7 +1057,7 @@ static QStringList splitLabels(const QString& unicodeDomain)
// stop)."
static const unsigned int separators[] = { 0x002E, 0x3002, 0xFF0E, 0xFF61 };
- QStringList lst;
+ TQStringList lst;
int start = 0;
uint i;
for (i = 0; i < unicodeDomain.length(); i++)
@@ -1081,7 +1081,7 @@ static QStringList splitLabels(const QString& unicodeDomain)
return lst;
}
-static QCString ToASCII(const QString& label)
+static TQCString ToASCII(const TQString& label)
{
#ifdef HAVE_IDNA_H
// We have idna.h, so we can use the idna_to_ascii
@@ -1092,9 +1092,9 @@ static QCString ToASCII(const QString& label)
if (label.length() == 0)
// this is allowed
- return QCString(""); // empty, not null
+ return TQCString(""); // empty, not null
- QCString retval;
+ TQCString retval;
char buf[65];
Q_UINT32* ucs4 = new Q_UINT32[label.length() + 1];
@@ -1115,7 +1115,7 @@ static QCString ToASCII(const QString& label)
#endif
}
-static QString ToUnicode(const QString& label)
+static TQString ToUnicode(const TQString& label)
{
#ifdef HAVE_IDNA_H
// We have idna.h, so we can use the idna_to_unicode
@@ -1147,7 +1147,7 @@ static QString ToUnicode(const QString& label)
}
// now set the answer
- QString result;
+ TQString result;
result.setLength(outlen);
for (uint i = 0; i < outlen; i++)
result[i] = (unsigned int)ucs4_output[i];
diff --git a/kdecore/network/kresolver.h b/kdecore/network/kresolver.h
index b4e4334be..cfc1226a5 100644
--- a/kdecore/network/kresolver.h
+++ b/kdecore/network/kresolver.h
@@ -27,8 +27,8 @@
//////////////////
// Needed includes
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
#include "ksocketaddress.h"
@@ -85,8 +85,8 @@ public:
* @param encodedName the ASCII-compatible encoding of the hostname
*/
KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
- const QString& canonName = QString::null,
- const QCString& encodedName = QCString());
+ const TQString& canonName = TQString::null,
+ const TQCString& encodedName = TQCString());
/**
* Constructs a new KResolverEntry from raw forms of
@@ -102,8 +102,8 @@ public:
* @param encodedName the ASCII-compatible encoding of the hostname
*/
KResolverEntry(const struct sockaddr *sa, Q_UINT16 salen, int socktype,
- int protocol, const QString& canonName = QString::null,
- const QCString& encodedName = QCString());
+ int protocol, const TQString& canonName = TQString::null,
+ const TQCString& encodedName = TQCString());
/**
* Copy constructor.
@@ -137,21 +137,21 @@ public:
/**
* Retrieves the canonical name associated with this entry, if there is any.
- * If the canonical name was not found, this function returns QString::null.
+ * If the canonical name was not found, this function returns TQString::null.
*/
- QString canonicalName() const;
+ TQString canonicalName() const;
/**
* Retrieves the encoded domain name associated with this entry, if there is
* any. If this domain has been resolved through DNS, this will be the
* the ACE-encoded hostname.
*
- * Returns a null QCString if such information is not available.
+ * Returns a null TQCString if such information is not available.
*
* Please note that this information is NOT to be presented to the user,
* unless requested.
*/
- QCString encodedName() const;
+ TQCString encodedName() const;
/**
* Retrieves the socket type associated with this entry.
@@ -181,7 +181,7 @@ class KResolverResultsPrivate;
* @brief Name and service resolution results.
*
* This object contains the results of a name and service resolution, as
- * those performed by @ref KResolver. It is also a descendant of QValueList, so
+ * those performed by @ref KResolver. It is also a descendant of TQValueList, so
* you may use all its member functions here to access the elements.
*
* A KResolverResults object is associated with a resolution, so, in addition
@@ -194,7 +194,7 @@ class KResolverResultsPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KResolverResults: public QValueList<KResolverEntry>
+class KDECORE_EXPORT KResolverResults: public TQValueList<KResolverEntry>
{
public:
/**
@@ -250,17 +250,17 @@ public:
/**
* The nodename to which the resolution was performed.
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* The service name to which the resolution was performed.
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* Sets the new nodename and service name
*/
- void setAddress(const QString& host, const QString& service);
+ void setAddress(const TQString& host, const TQString& service);
protected:
virtual void virtual_hook( int id, void* data );
@@ -435,7 +435,7 @@ public:
* names and flags using the member functions before starting
* the name resolution.
*/
- KResolver(QObject * = 0L, const char * = 0L);
+ KResolver(TQObject * = 0L, const char * = 0L);
/**
* Constructor with host and service names.
@@ -447,8 +447,8 @@ public:
* @param nodename The host name we want resolved.
* @param servicename The service name associated, like "http".
*/
- KResolver(const QString& nodename, const QString& servicename = QString::null,
- QObject * = 0L, const char * = 0L);
+ KResolver(const TQString& nodename, const TQString& servicename = TQString::null,
+ TQObject * = 0L, const char * = 0L);
/**
* Destructor.
@@ -490,7 +490,7 @@ public:
/**
* Returns the textual representation of the error in this object.
*/
- inline QString errorString() const
+ inline TQString errorString() const
{ return errorString(error(), systemError()); }
/**
@@ -501,37 +501,37 @@ public:
/**
* The nodename to which the resolution was/is to be performed.
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* The service name to which the resolution was/is to be performed.
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* Sets the nodename for the resolution.
*
- * Set the nodename to QString::null to unset it.
+ * Set the nodename to TQString::null to unset it.
* @param nodename The nodename to be resolved.
*/
- void setNodeName(const QString& nodename);
+ void setNodeName(const TQString& nodename);
/**
* Sets the service name to be resolved.
*
- * Set it to QString::null to unset it.
+ * Set it to TQString::null to unset it.
* @param service The service to be resolved.
*/
- void setServiceName(const QString& service);
+ void setServiceName(const TQString& service);
/**
* Sets both the host and the service names.
*
- * Setting either value to QString::null will unset them.
+ * Setting either value to TQString::null will unset them.
* @param node The nodename
* @param service The service name
*/
- void setAddress(const QString& node, const QString& service);
+ void setAddress(const TQString& node, const TQString& service);
/**
* Retrieves the flags set for the resolution.
@@ -673,14 +673,14 @@ public:
KResolverResults results() const;
/**
- * Handles events. Reimplemented from QObject.
+ * Handles events. Reimplemented from TQObject.
*
* This function handles the events generated by the manager indicating that
* this object has finished processing.
*
* Do not post events to this object.
*/
- virtual bool event(QEvent*);
+ virtual bool event(TQEvent*);
signals:
// signals
@@ -691,7 +691,7 @@ signals:
* will contain the resolved data.
*
* Note: if you are doing multiple resolutions, you can use the
- * QObject::sender() function to distinguish one Resolver object from
+ * TQObject::sender() function to distinguish one Resolver object from
* another.
*
* @param results the resolved data; might be empty if the resolution
@@ -717,7 +717,7 @@ public:
* @return the string representation. This is already
* i18n'ed.
*/
- static QString errorString(int errorcode, int syserror = 0);
+ static TQString errorString(int errorcode, int syserror = 0);
/**
* Resolve the nodename and service name synchronously
@@ -742,7 +742,7 @@ public:
* @return a KResolverResults object containing the results
* @see KResolverResults for information on how to obtain the error code
*/
- static KResolverResults resolve(const QString& host, const QString& service,
+ static KResolverResults resolve(const TQString& host, const TQString& service,
int flags = 0, int families = KResolver::InternetFamily);
/**
@@ -758,7 +758,7 @@ public:
*
* \code
* KResolver* qres = new KResolver(host, service);
- * QObject::connect(qres, SIGNAL(finished(KResolverResults)),
+ * TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)),
* userObj, userSlot);
* qres->setFlags(flags);
* qres->setFamily(families);
@@ -767,7 +767,7 @@ public:
*
* You should use it like this in your code:
* \code
- * KResolver::resolveAsync(myObj, SLOT(mySlot(KResolverResults)), host, service);
+ * KResolver::resolveAsync(myObj, TQT_SLOT(mySlot(KResolverResults)), host, service);
* \endcode
*
* @param userObj the object whose slot @p userSlot we will connect
@@ -779,8 +779,8 @@ public:
* @return true if the queueing was successful, false if not
* @see KResolverResults for information on how to obtain the error code
*/
- static bool resolveAsync(QObject* userObj, const char *userSlot,
- const QString& host, const QString& service,
+ static bool resolveAsync(TQObject* userObj, const char *userSlot,
+ const TQString& host, const TQString& service,
int flags = 0, int families = KResolver::InternetFamily);
/**
@@ -789,7 +789,7 @@ public:
* over the Internet.
*
* Note this function may fail, in which case it'll return a null
- * QCString. Reasons for failure include use of unknown code
+ * TQCString. Reasons for failure include use of unknown code
* points (Unicode characters).
*
* Note that the encoding is illegible and, thus, should not be presented
@@ -797,9 +797,9 @@ public:
*
* @param unicodeDomain the domain name to be encoded
* @return the ACE-encoded suitable for DNS queries if successful, a null
- * QCString if failure.
+ * TQCString if failure.
*/
- static QCString domainToAscii(const QString& unicodeDomain);
+ static TQCString domainToAscii(const TQString& unicodeDomain);
/**
* Does the inverse of @ref domainToAscii and return an Unicode domain
@@ -819,16 +819,16 @@ public:
* if successful, the original string if not
* @note ACE = ASCII-Compatible Encoding, i.e., 7-bit
*/
- static QString domainToUnicode(const QCString& asciiDomain);
+ static TQString domainToUnicode(const TQCString& asciiDomain);
/**
- * The same as above, but taking a QString argument.
+ * The same as above, but taking a TQString argument.
*
* @param asciiDomain the ACE-encoded domain name to be decoded
* @return the Unicode representation of the given domain name
- * if successful, QString::null if not.
+ * if successful, TQString::null if not.
*/
- static QString domainToUnicode(const QString& asciiDomain);
+ static TQString domainToUnicode(const TQString& asciiDomain);
/**
* Normalise a domain name.
@@ -850,21 +850,21 @@ public:
* hostname.
*
* @param domain a domain to be normalised
- * @return the normalised domain, or QString::null if the domain is
+ * @return the normalised domain, or TQString::null if the domain is
* invalid.
*/
- static QString normalizeDomain(const QString& domain);
+ static TQString normalizeDomain(const TQString& domain);
/**
* Resolves a protocol number to its names
*
- * Note: the returned QStrList operates on deep-copies.
+ * Note: the returned TQStrList operates on deep-copies.
*
* @param protonum the protocol number to be looked for
* @return all the protocol names in a list. The first is the "proper"
* name.
*/
- static QStrList protocolName(int protonum);
+ static TQStrList protocolName(int protonum);
/**
* Finds all aliases for a given protocol name
@@ -873,7 +873,7 @@ public:
* @return all the protocol names in a list. The first is the "proper"
* name.
*/
- static QStrList protocolName(const char *protoname);
+ static TQStrList protocolName(const char *protoname);
/**
* Resolves a protocol name to its number
@@ -895,26 +895,26 @@ public:
/**
* Finds all the aliases for a given service name
*
- * Note: the returned QStrList operates on deep-copies.
+ * Note: the returned TQStrList operates on deep-copies.
*
* @param servname the service alias to be looked for
* @param protoname the protocol it is associated with
* @return all the service names in a list. The first is the "proper"
* name.
*/
- static QStrList serviceName(const char *servname, const char *protoname);
+ static TQStrList serviceName(const char *servname, const char *protoname);
/**
* Resolves a port number to its names
*
- * Note: the returned QStrList operates on deep copies.
+ * Note: the returned TQStrList operates on deep copies.
*
* @param port the port number, in host byte-order
* @param protoname the protocol it is associated with
* @return all the service names in a list. The first is the "proper"
* name.
*/
- static QStrList serviceName(int port, const char *protoname);
+ static TQStrList serviceName(int port, const char *protoname);
/**
* Returns this machine's local hostname.
@@ -922,7 +922,7 @@ public:
* @return this machine's local hostname
* @since 3.5
*/
- static QString localHostName();
+ static TQString localHostName();
protected:
@@ -937,7 +937,7 @@ private:
friend class KResolverResults;
friend class ::KNetwork::Internal::KResolverManager;
- static QStringList *idnDomains;
+ static TQStringList *idnDomains;
};
} // namespace KNetwork
diff --git a/kdecore/network/kresolver_p.h b/kdecore/network/kresolver_p.h
index 2fac7eb45..e29304383 100644
--- a/kdecore/network/kresolver_p.h
+++ b/kdecore/network/kresolver_p.h
@@ -28,23 +28,23 @@
#include <config.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qptrqueue.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qsemaphore.h>
-#include <qevent.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqptrqueue.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqsemaphore.h>
+#include <tqevent.h>
#include "kresolver.h"
/* decide whether we need a mutex */
#if !defined(HAVE_GETPROTOBYNAME_R) || !defined(HAVE_GETSERVBYNAME_R) || !defined(HAVE_GETHOSTBYNAME_R) || !defined(HAVE_GETSERVBYPORT_R)
# define NEED_MUTEX
-extern QMutex getXXbyYYmutex;
+extern TQMutex getXXbyYYmutex;
#endif
/* some systems have the functions, but don't declare them */
@@ -90,8 +90,8 @@ namespace KNetwork
struct InputData
{
- QString node, service;
- QCString protocolName;
+ TQString node, service;
+ TQCString protocolName;
int flags;
int familyMask;
int socktype;
@@ -115,14 +115,14 @@ namespace KNetwork
Internal::InputData input;
// mutex
- QMutex mutex;
+ TQMutex mutex;
// output data
KResolverResults results;
KResolverPrivate(KResolver* _parent,
- const QString& _node = QString::null,
- const QString& _service = QString::null)
+ const TQString& _node = TQString::null,
+ const TQString& _service = TQString::null)
: parent(_parent), deleteWhenDone(false), waiting(false),
status(0), errorcode(0), syserror(0)
{
@@ -166,7 +166,7 @@ namespace KNetwork
* objects in wait state will be woken up and will check if they are done.
* If they aren't, they will go back to sleeping.
*/
- QWaitCondition notifyWaiters;
+ TQWaitCondition notifyWaiters;
private:
/*
@@ -185,22 +185,22 @@ namespace KNetwork
* data available that has to be processed. All worker threads wait on this
* waitcond for a limited amount of time.
*/
- QWaitCondition feedWorkers;
+ TQWaitCondition feedWorkers;
// this mutex protects the data in this object
- QMutex mutex;
+ TQMutex mutex;
// hold a list of all the current threads we have
- QPtrList<KResolverThread> workers;
+ TQPtrList<KResolverThread> workers;
// hold a list of all the new requests we have
- QPtrList<RequestData> newRequests;
+ TQPtrList<RequestData> newRequests;
// hold a list of all the requests in progress we have
- QPtrList<RequestData> currentRequests;
+ TQPtrList<RequestData> currentRequests;
// hold a list of all the workers we have
- QPtrList<KNetwork::KResolverWorkerFactoryBase> workerFactories;
+ TQPtrList<KNetwork::KResolverWorkerFactoryBase> workerFactories;
// private constructor
KResolverManager();
diff --git a/kdecore/network/kresolvermanager.cpp b/kdecore/network/kresolvermanager.cpp
index 204031915..b3c7172ae 100644
--- a/kdecore/network/kresolvermanager.cpp
+++ b/kdecore/network/kresolvermanager.cpp
@@ -38,15 +38,15 @@ extern "C" {
# include <resolv.h>
#endif
-#include <qapplication.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qwaitcondition.h>
-#include <qsemaphore.h>
+#include <tqapplication.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqwaitcondition.h>
+#include <tqsemaphore.h>
#include <kde_file.h>
#include <kdebug.h>
@@ -134,8 +134,8 @@ public:
int useCount;
# ifndef RES_INIT_THREADSAFE
- QWaitCondition cond;
- QMutex mutex;
+ TQWaitCondition cond;
+ TQMutex mutex;
# endif
bool shouldResInit()
@@ -178,7 +178,7 @@ public:
void release()
{
# ifndef RES_INIT_THREADSAFE
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
if (--useCount == 0)
{
if (shouldResInit())
@@ -264,13 +264,13 @@ void KResolverThread::run()
// initialisation
// enter the loop already
- //qDebug("KResolverThread(thread %u/%p): started", pid, (void*)QThread::currentThread());
+ //qDebug("KResolverThread(thread %u/%p): started", pid, (void*)TQThread::currentThread());
KResolverManager::manager()->registerThread(this);
while (true)
{
data = KResolverManager::manager()->requestData(this, ::maxThreadWaitTime);
//qDebug("KResolverThread(thread %u/%p) got data %p", KResolverManager::pid,
- // (void*)QThread::currentThread(), (void*)data);
+ // (void*)TQThread::currentThread(), (void*)data);
if (data)
{
// yes, we got data
@@ -292,7 +292,7 @@ void KResolverThread::run()
}
KResolverManager::manager()->unregisterThread(this);
- //qDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)QThread::currentThread());
+ //qDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)TQThread::currentThread());
}
bool KResolverThread::checkResolver()
@@ -366,7 +366,7 @@ RequestData* KResolverManager::requestData(KResolverThread *th, int maxWaitTime)
// lock the mutex, so that the manager thread or other threads won't
// interfere.
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
RequestData *data = findData(th);
if (data)
@@ -416,7 +416,7 @@ void KResolverManager::releaseData(KResolverThread *, RequestData* data)
/////
//qDebug("KResolverManager::releaseData(%u/%p): %p has been released", pid,
-// (void*)QThread::currentThread(), (void*)data);
+// (void*)TQThread::currentThread(), (void*)data);
if (data->obj)
{
@@ -434,7 +434,7 @@ void KResolverManager::releaseData(KResolverThread *, RequestData* data)
void KResolverManager::handleFinished()
{
bool redo = false;
- QPtrQueue<RequestData> doneRequests;
+ TQPtrQueue<RequestData> doneRequests;
mutex.lock();
@@ -601,7 +601,7 @@ void KResolverManager::doNotifying(RequestData *p)
r.setAddress(p->input->node, p->input->service);
//qDebug("KResolverManager::doNotifying(%u/%p): for %p whose status is %d and has %d results",
- //pid, (void*)QThread::currentThread(), (void*)p, p->obj->status, r.count());
+ //pid, (void*)TQThread::currentThread(), (void*)p, p->obj->status, r.count());
p->obj->errorcode = r.error();
p->obj->syserror = r.systemError();
@@ -619,7 +619,7 @@ void KResolverManager::doNotifying(RequestData *p)
// no, so we must post an event requesting that the signal be emitted
// sorry for the C-style cast, but neither static nor reintepret cast work
// here; I'd have to do two casts
- QApplication::postEvent(parent, new QEvent((QEvent::Type)(ResolutionCompleted)));
+ TQApplication::postEvent(parent, new TQEvent((TQEvent::Type)(ResolutionCompleted)));
// release the mutex
p->obj->mutex.unlock();
@@ -693,7 +693,7 @@ void KResolverManager::dispatch(RequestData *data)
// is supposed to verify the availability of threads, start
// any if necessary
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
// add to the queue
newRequests.append(data);
@@ -817,6 +817,6 @@ bool KResolverManager::dequeueNew(KResolver* obj)
// it's expected to be thread-safe
void KResolverManager::dequeue(KResolver *obj)
{
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
dequeueNew(obj);
}
diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp
index 93c706306..f64803ced 100644
--- a/kdecore/network/kresolverstandardworkers.cpp
+++ b/kdecore/network/kresolverstandardworkers.cpp
@@ -38,10 +38,10 @@
#include <net/if.h>
#endif
-#include <qthread.h>
-#include <qmutex.h>
-#include <qstrlist.h>
-#include <qfile.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
#include "kdebug.h"
#include "kglobal.h"
@@ -76,8 +76,8 @@ static bool hasIPv6()
}
// blacklist management
-static QMutex blacklistMutex; // KDE4: change to a QReadWriteLock
-QStringList KBlacklistWorker::blacklist;
+static TQMutex blacklistMutex; // KDE4: change to a QReadWriteLock
+TQStringList KBlacklistWorker::blacklist;
void KBlacklistWorker::init()
{
@@ -98,21 +98,21 @@ void KBlacklistWorker::init()
void KBlacklistWorker::loadBlacklist()
{
- QMutexLocker locker(&blacklistMutex);
- QStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist");
+ TQMutexLocker locker(&blacklistMutex);
+ TQStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist");
- QStringList::ConstIterator it = filelist.constBegin(),
+ TQStringList::ConstIterator it = filelist.constBegin(),
end = filelist.constEnd();
for ( ; it != end; ++it)
{
// for each file, each line is a domainname to be blacklisted
- QFile f(*it);
+ TQFile f(*it);
if (!f.open(IO_ReadOnly))
continue;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Latin1);
- for (QString line = stream.readLine(); !line.isNull();
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Latin1);
+ for (TQString line = stream.readLine(); !line.isNull();
line = stream.readLine())
{
if (line.isEmpty())
@@ -131,7 +131,7 @@ void KBlacklistWorker::loadBlacklist()
// checks the blacklist to see if the domain is listed
// it matches the domain ending part
-bool KBlacklistWorker::isBlacklisted(const QString& host)
+bool KBlacklistWorker::isBlacklisted(const TQString& host)
{
KBlacklistWorker::init();
@@ -140,12 +140,12 @@ bool KBlacklistWorker::isBlacklisted(const QString& host)
return false;
// KDE4: QLatin1String
- QString ascii = QString::fromLatin1(KResolver::domainToAscii(host));
+ TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host));
- QMutexLocker locker(&blacklistMutex);
+ TQMutexLocker locker(&blacklistMutex);
// now find out if this hostname is present
- QStringList::ConstIterator it = blacklist.constBegin(),
+ TQStringList::ConstIterator it = blacklist.constBegin(),
end = blacklist.constEnd();
for ( ; it != end; ++it)
if (ascii.endsWith(*it))
@@ -207,7 +207,7 @@ namespace
class GetHostByNameThread: public KResolverWorkerBase
{
public:
- QCString m_hostname; // might be different!
+ TQCString m_hostname; // might be different!
Q_UINT16 m_port;
int m_scopeid;
int m_af;
@@ -251,7 +251,7 @@ namespace
// check blacklist
if (m_af != AF_INET &&
- KBlacklistWorker::isBlacklisted(QString::fromLatin1(m_hostname)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname)))
break;
# ifdef USE_GETHOSTBYNAME2_R
@@ -358,7 +358,7 @@ namespace
if (socktype == 0)
socktype = SOCK_STREAM; // default
- QString canon = KResolver::domainToUnicode(QString::fromLatin1(he->h_name));
+ TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name));
KInetSocketAddress sa;
sa.setPort(m_port);
if (he->h_addrtype != AF_INET)
@@ -378,8 +378,8 @@ namespace
class GetAddrInfoThread: public KResolverWorkerBase
{
public:
- QCString m_node;
- QCString m_serv;
+ TQCString m_node;
+ TQCString m_serv;
int m_af;
int m_flags;
KResolverResults& results;
@@ -404,7 +404,7 @@ namespace
{
// check blacklist
if ((m_af != AF_INET && m_af != AF_UNSPEC) &&
- KBlacklistWorker::isBlacklisted(QString::fromLatin1(m_node)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node)))
{
results.setError(KResolver::NoName);
finished();
@@ -510,7 +510,7 @@ namespace
}
// if we are here, lookup succeeded
- QString canon;
+ TQString canon;
const char *previous_canon = 0L;
for (addrinfo* p = result; p; p = p->ai_next)
@@ -521,7 +521,7 @@ namespace
(p->ai_canonname != previous_canon &&
strcmp(p->ai_canonname, previous_canon) != 0))
{
- canon = KResolver::domainToUnicode(QString::fromAscii(p->ai_canonname));
+ canon = KResolver::domainToUnicode(TQString::fromAscii(p->ai_canonname));
previous_canon = p->ai_canonname;
}
@@ -546,12 +546,12 @@ bool KStandardWorker::sanityCheck()
if (!nodeName().isEmpty())
{
- QString node = nodeName();
+ TQString node = nodeName();
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == QString::fromLatin1("*") ||
- node == QString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
m_encodedName.truncate(0);
else
{
@@ -588,7 +588,7 @@ bool KStandardWorker::resolveScopeId()
if (pos == -1)
return true;
- QString scopename = nodeName().mid(pos + 1);
+ TQString scopename = nodeName().mid(pos + 1);
bool ok;
scopeid = scopename.toInt(&ok);
@@ -616,12 +616,12 @@ bool KStandardWorker::resolveService()
// service name does not contain a port number
// must be a name
- if (serviceName().isEmpty() || serviceName().compare(QString::fromLatin1("*")) == 0)
+ if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0)
port = 0;
else
{
// it's a name. We need the protocol name in order to lookup.
- QCString protoname = protocolName();
+ TQCString protoname = protocolName();
if (protoname.isEmpty() && protocol())
{
@@ -670,7 +670,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
if (protocol() || protocolName())
return KResolver::BadFlags; // cannot have Unix sockets with protocols
- QString pathname = serviceName();
+ TQString pathname = serviceName();
if (pathname.isEmpty())
return KResolver::NoName;; // no path?
@@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically()
// now try to resolve the hostname numerically
KInetSocketAddress sa;
setError(KResolver::NoError);
- sa.setHost(KIpAddress(QString::fromLatin1(m_encodedName)));
+ sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName)));
// if it failed, the length was reset to 0
bool ok = sa.length() != 0;
diff --git a/kdecore/network/kresolverstandardworkers_p.h b/kdecore/network/kresolverstandardworkers_p.h
index 30c8f3c1e..310849bf3 100644
--- a/kdecore/network/kresolverstandardworkers_p.h
+++ b/kdecore/network/kresolverstandardworkers_p.h
@@ -28,9 +28,9 @@
#include <sys/types.h>
#include <netdb.h>
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include "kresolver.h"
#include "kresolverworkerbase.h"
@@ -48,11 +48,11 @@ namespace KNetwork { namespace Internal
class KBlacklistWorker: public KNetwork::KResolverWorkerBase
{
public:
- static QStringList blacklist;
+ static TQStringList blacklist;
static void loadBlacklist();
static void init();
- static bool isBlacklisted(const QString&);
+ static bool isBlacklisted(const TQString&);
virtual bool preprocess();
virtual bool run();
@@ -65,10 +65,10 @@ namespace KNetwork { namespace Internal
class KStandardWorker: public KNetwork::KResolverWorkerBase
{
protected:
- mutable QCString m_encodedName;
+ mutable TQCString m_encodedName;
Q_UINT16 port;
int scopeid;
- QPtrList<KNetwork::KResolverResults> resultList;
+ TQPtrList<KNetwork::KResolverResults> resultList;
public:
bool sanityCheck();
diff --git a/kdecore/network/kresolverworkerbase.cpp b/kdecore/network/kresolverworkerbase.cpp
index 5d8cdaa9b..ee6ee1011 100644
--- a/kdecore/network/kresolverworkerbase.cpp
+++ b/kdecore/network/kresolverworkerbase.cpp
@@ -26,8 +26,8 @@
#include <assert.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include "kresolver.h"
#include "kresolver_p.h"
@@ -45,18 +45,18 @@ KResolverWorkerBase::~KResolverWorkerBase()
{
}
-QString KResolverWorkerBase::nodeName() const
+TQString KResolverWorkerBase::nodeName() const
{
if (input)
return input->node;
- return QString::null;
+ return TQString::null;
}
-QString KResolverWorkerBase::serviceName() const
+TQString KResolverWorkerBase::serviceName() const
{
if (input)
return input->service;
- return QString::null;
+ return TQString::null;
}
int KResolverWorkerBase::flags() const
@@ -87,9 +87,9 @@ int KResolverWorkerBase::protocol() const
return 0;
}
-QCString KResolverWorkerBase::protocolName() const
+TQCString KResolverWorkerBase::protocolName() const
{
- QCString res;
+ TQCString res;
if (input)
res = input->protocolName;
return res;
diff --git a/kdecore/network/kresolverworkerbase.h b/kdecore/network/kresolverworkerbase.h
index 8776e9142..9c2728cdf 100644
--- a/kdecore/network/kresolverworkerbase.h
+++ b/kdecore/network/kresolverworkerbase.h
@@ -63,7 +63,7 @@ public:
/**
* Helper class for locking the resolver subsystem.
- * Similar to QMutexLocker.
+ * Similar to TQMutexLocker.
*
* @author Luís Pedro Coelho
* @since 3.4
@@ -134,12 +134,12 @@ public:
/**
* This is the hostname to be looked for
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* And this is the service name
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* gets the flags
@@ -164,7 +164,7 @@ public:
/**
* gets the protocol name, if applicable
*/
- QCString protocolName() const;
+ TQCString protocolName() const;
/**
* Call this function to indicate that processing
diff --git a/kdecore/network/kreverseresolver.cpp b/kdecore/network/kreverseresolver.cpp
index dbcc23d79..639f6dbe4 100644
--- a/kdecore/network/kreverseresolver.cpp
+++ b/kdecore/network/kreverseresolver.cpp
@@ -31,9 +31,9 @@
#include <signal.h>
// Qt
-#include <qevent.h>
-#include <qmutex.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqapplication.h>
// Us
#include "kreverseresolver.h"
@@ -73,22 +73,22 @@ namespace
KReverseResolver *m_parent;
// output:
- QString node;
- QString service;
+ TQString node;
+ TQString service;
bool success;
};
class KReverseResolverEvent: public QEvent
{
public:
- static const int myType = QEvent::User + 63; // arbitrary value
- QString node;
- QString service;
+ static const int myType = TQEvent::User + 63; // arbitrary value
+ TQString node;
+ TQString service;
bool success;
- KReverseResolverEvent(const QString& _node, const QString& _service,
+ KReverseResolverEvent(const TQString& _node, const TQString& _service,
bool _success)
- : QEvent((Type)myType), node(_node),
+ : TQEvent((Type)myType), node(_node),
service(_service), success(_success)
{ }
};
@@ -97,8 +97,8 @@ namespace
class KNetwork::KReverseResolverPrivate
{
public:
- QString node;
- QString service;
+ TQString node;
+ TQString service;
KSocketAddress addr;
int flags;
@@ -111,8 +111,8 @@ public:
};
KReverseResolver::KReverseResolver(const KSocketAddress& addr, int flags,
- QObject *parent, const char* name)
- : QObject(parent, name), d(new KReverseResolverPrivate(addr))
+ TQObject *parent, const char* name)
+ : TQObject(parent, name), d(new KReverseResolverPrivate(addr))
{
d->flags = flags;
}
@@ -138,12 +138,12 @@ bool KReverseResolver::failure() const
return !isRunning() && !d->success;
}
-QString KReverseResolver::node() const
+TQString KReverseResolver::node() const
{
return d->node;
}
-QString KReverseResolver::service() const
+TQString KReverseResolver::service() const
{
return d->service;
}
@@ -170,10 +170,10 @@ bool KReverseResolver::start()
return true;
}
-bool KReverseResolver::event(QEvent *e)
+bool KReverseResolver::event(TQEvent *e)
{
if (e->type() != KReverseResolverEvent::myType)
- return QObject::event(e); // call parent
+ return TQObject::event(e); // call parent
KReverseResolverEvent *re = static_cast<KReverseResolverEvent*>(e);
d->node = re->node;
@@ -190,8 +190,8 @@ bool KReverseResolver::event(QEvent *e)
return true;
}
-bool KReverseResolver::resolve(const KSocketAddress& addr, QString& node,
- QString& serv, int flags)
+bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
+ TQString& serv, int flags)
{
ReverseThread th(addr, flags);
if (th.run())
@@ -204,7 +204,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, QString& node,
}
bool KReverseResolver::resolve(const struct sockaddr* sa, Q_UINT16 salen,
- QString& node, QString& serv, int flags)
+ TQString& node, TQString& serv, int flags)
{
return resolve(KSocketAddress(sa, salen), node, serv, flags);
}
@@ -230,7 +230,7 @@ bool ReverseThread::run()
{
#ifdef NEED_MUTEX
- QMutexLocker locker(&::getXXbyYYmutex);
+ TQMutexLocker locker(&::getXXbyYYmutex);
#endif
err = ::getnameinfo(m_addr, m_addr.length(),
h, sizeof(h) - 1, s, sizeof(s) - 1, niflags);
@@ -238,13 +238,13 @@ bool ReverseThread::run()
if (err == 0)
{
- node = KResolver::domainToUnicode(QString::fromLatin1(h));
- service = QString::fromLatin1(s);
+ node = KResolver::domainToUnicode(TQString::fromLatin1(h));
+ service = TQString::fromLatin1(s);
success = true;
}
else
{
- node = service = QString::null;
+ node = service = TQString::null;
success = false;
}
@@ -255,7 +255,7 @@ bool ReverseThread::postprocess()
{
// post an event
if (m_parent)
- QApplication::postEvent(m_parent,
+ TQApplication::postEvent(m_parent,
new KReverseResolverEvent(node, service, success));
return true;
}
diff --git a/kdecore/network/kreverseresolver.h b/kdecore/network/kreverseresolver.h
index 325d97d82..26274e586 100644
--- a/kdecore/network/kreverseresolver.h
+++ b/kdecore/network/kreverseresolver.h
@@ -27,8 +27,8 @@
//////////////////
// Needed includes
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "ksocketaddress.h"
@@ -88,7 +88,7 @@ public:
* @param flags the flags to use, see @ref Flags
*/
KReverseResolver(const KSocketAddress& addr, int flags = 0,
- QObject * = 0L, const char * = 0L);
+ TQObject * = 0L, const char * = 0L);
/**
* Destructor.
@@ -114,15 +114,15 @@ public:
/**
* Returns the resolved node name, if the resolution has finished
- * successfully, or QString::null otherwise.
+ * successfully, or TQString::null otherwise.
*/
- QString node() const;
+ TQString node() const;
/**
* Returns the resolved service name, if the resolution has finished
- * successfully, or QString::null otherwise.
+ * successfully, or TQString::null otherwise.
*/
- QString service() const;
+ TQString service() const;
/**
* Returns the socket address which was subject to resolution.
@@ -138,7 +138,7 @@ public:
/**
* Overrides event handling
*/
- virtual bool event(QEvent* );
+ virtual bool event(TQEvent* );
signals:
/**
@@ -158,14 +158,14 @@ public:
* binary representation to a textual form, even if numeric only.
*
* @param addr the socket address to be resolved
- * @param node the QString where we will store the resolved node
- * @param serv the QString where we will store the resolved service
+ * @param node the TQString where we will store the resolved node
+ * @param serv the TQString where we will store the resolved service
* @param flags flags to be used for this resolution.
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
- static bool resolve(const KSocketAddress& addr, QString& node,
- QString& serv, int flags = 0);
+ static bool resolve(const KSocketAddress& addr, TQString& node,
+ TQString& serv, int flags = 0);
/**
* Resolves a socket address to its textual representation
@@ -177,14 +177,14 @@ public:
*
* @param sa the sockaddr structure containing the address to be resolved
* @param salen the length of the sockaddr structure
- * @param node the QString where we will store the resolved node
- * @param serv the QString where we will store the resolved service
+ * @param node the TQString where we will store the resolved node
+ * @param serv the TQString where we will store the resolved service
* @param flags flags to be used for this resolution.
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
static bool resolve(const struct sockaddr* sa, Q_UINT16 salen,
- QString& node, QString& serv, int flags = 0);
+ TQString& node, TQString& serv, int flags = 0);
private:
KReverseResolverPrivate* d;
diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp
index 9f32b4119..49facb12c 100644
--- a/kdecore/network/kserversocket.cpp
+++ b/kdecore/network/kserversocket.cpp
@@ -24,8 +24,8 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qmutex.h>
+#include <tqsocketnotifier.h>
+#include <tqmutex.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -58,27 +58,27 @@ public:
}
};
-KServerSocket::KServerSocket(QObject* parent, const char *name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
}
-KServerSocket::KServerSocket(const QString& service, QObject* parent, const char *name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(const TQString& service, TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
d->resolver.setServiceName(service);
}
-KServerSocket::KServerSocket(const QString& node, const QString& service,
- QObject* parent, const char* name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(const TQString& node, const TQString& service,
+ TQObject* parent, const char* name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
setAddress(node, service);
}
@@ -90,7 +90,7 @@ KServerSocket::~KServerSocket()
bool KServerSocket::setSocketOptions(int opts)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts); // call parent
bool result = socketDevice()->setSocketOptions(opts); // and set the implementation
copyError();
@@ -120,16 +120,16 @@ void KServerSocket::setFamily(int families)
d->resolver.setFamily(families);
}
-void KServerSocket::setAddress(const QString& service)
+void KServerSocket::setAddress(const TQString& service)
{
- d->resolver.setNodeName(QString::null);
+ d->resolver.setNodeName(TQString::null);
d->resolver.setServiceName(service);
d->resolverResults.empty();
if (d->state <= KServerSocketPrivate::LookupDone)
d->state = KServerSocketPrivate::None;
}
-void KServerSocket::setAddress(const QString& node, const QString& service)
+void KServerSocket::setAddress(const TQString& node, const TQString& service)
{
d->resolver.setNodeName(node);
d->resolver.setServiceName(service);
@@ -155,7 +155,7 @@ bool KServerSocket::lookup()
// make sure we have at least one parameter for lookup
if (d->resolver.serviceName().isNull() &&
!d->resolver.nodeName().isNull())
- d->resolver.setServiceName(QString::fromLatin1(""));
+ d->resolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
@@ -193,13 +193,13 @@ bool KServerSocket::bind(const KResolverEntry& address)
return false;
}
-bool KServerSocket::bind(const QString& node, const QString& service)
+bool KServerSocket::bind(const TQString& node, const TQString& service)
{
setAddress(node, service);
return bind();
}
-bool KServerSocket::bind(const QString& service)
+bool KServerSocket::bind(const TQString& service)
{
setAddress(service);
return bind();
@@ -403,8 +403,8 @@ bool KServerSocket::doListen()
}
// set up ready accept signal
- QObject::connect(socketDevice()->readNotifier(), SIGNAL(activated(int)),
- this, SIGNAL(readyAccept()));
+ TQObject::connect(socketDevice()->readNotifier(), TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(readyAccept()));
d->state = KServerSocketPrivate::Listening;
return true;
}
diff --git a/kdecore/network/kserversocket.h b/kdecore/network/kserversocket.h
index 27b3df1cc..30d8b40b0 100644
--- a/kdecore/network/kserversocket.h
+++ b/kdecore/network/kserversocket.h
@@ -25,7 +25,7 @@
#ifndef KSERVERSOCKET_H
#define KSERVERSOCKET_H
-#include <qobject.h>
+#include <tqobject.h>
#include "ksocketbase.h"
namespace KNetwork {
@@ -48,10 +48,10 @@ class KServerSocketPrivate;
*
* A typical example would look like:
* \code
- * QString service = "http";
+ * TQString service = "http";
* KServerSocket *ss = new KServerSocket(service);
- * connect(ss, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept()));
- * connect(ss, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept()));
+ * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
* ss->listen();
* \endcode
*
@@ -74,7 +74,7 @@ class KServerSocketPrivate;
* ss->setFamily(KResolver::InetFamily);
* bool found = false;
* for( unsigned int port = firstport; port <= lastport; ++port) {
- * ss->setAddress( QString::number( port ) );
+ * ss->setAddress( TQString::number( port ) );
* bool success = ss->listen();
* if( found = ( success && ss->error() ==
* KSocketBase::NoError ) )
@@ -84,8 +84,8 @@ class KServerSocketPrivate;
* if( !found ) {
* // Couldn't connect to any port.
* } else {
- * connect(ss, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept()));
- * connect(ss, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept()));
+ * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
* ss->listen();
* }
* \endcode
@@ -104,7 +104,7 @@ class KServerSocketPrivate;
* @see KNetwork::KStreamSocket, KNetwork::KBufferedSocket
* @author Thiago Macieira <thiago@kde.org>
*/
-class KDECORE_EXPORT KServerSocket: public QObject, public KPassiveSocketBase
+class KDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase
{
Q_OBJECT
public:
@@ -115,10 +115,10 @@ public:
* bind to all interfaces on this node and the port will be selected by the
* operating system.
*
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the service to listen on.
@@ -134,10 +134,10 @@ public:
* See RFC 1700 for more information on services.
*
* @param service the service name to listen on
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const QString& service, QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the node and service names to listen on.
@@ -154,11 +154,11 @@ public:
*
* @param node the node to bind to
* @param service the service port to listen on
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const QString& node, const QString& service,
- QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(const TQString& node, const TQString& service,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This will close the socket, if open.
@@ -227,7 +227,7 @@ public:
*
* @param service the service name to listen on
*/
- void setAddress(const QString& service);
+ void setAddress(const TQString& service);
/**
* @overload
@@ -244,7 +244,7 @@ public:
* @param node the node to bind to
* @param service the service port to listen on
*/
- void setAddress(const QString& node, const QString& service);
+ void setAddress(const TQString& node, const TQString& service);
/**
* Sets the timeout for accepting. When you call @ref accept,
@@ -287,7 +287,7 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node, const QString& service);
+ virtual bool bind(const TQString& node, const TQString& service);
/**
* Binds the socket to the given service name.
@@ -295,7 +295,7 @@ public:
*
* @param service the service
*/
- virtual bool bind(const QString& service);
+ virtual bool bind(const TQString& service);
/**
* Binds the socket to the addresses previously set with @ref setAddress.
@@ -307,7 +307,7 @@ public:
/**
* Connect this socket to this specific address. Reimplemented from KSocketBase.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound signal
* will be emitted.
*/
diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp
index 6c1316e94..adfc76b06 100644
--- a/kdecore/network/ksocketaddress.cpp
+++ b/kdecore/network/ksocketaddress.cpp
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include "klocale.h"
#include "ksocketaddress.h"
@@ -126,7 +126,7 @@ bool KIpAddress::compare(const KIpAddress& other, bool checkMapped) const
}
// sets the address to the given address
-bool KIpAddress::setAddress(const QString& address)
+bool KIpAddress::setAddress(const TQString& address)
{
m_version = 0;
@@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const QString& address)
bool KIpAddress::setAddress(const char* address)
{
- return setAddress(QString::fromLatin1(address));
+ return setAddress(TQString::fromLatin1(address));
}
// set from binary data
@@ -186,7 +186,7 @@ bool KIpAddress::setAddress(const void* raw, int version)
}
// presentation form
-QString KIpAddress::toString() const
+TQString KIpAddress::toString() const
{
char buf[sizeof "1111:2222:3333:4444:5555:6666:255.255.255.255" + 2];
buf[0] = '\0';
@@ -194,16 +194,16 @@ QString KIpAddress::toString() const
{
case 4:
inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1);
- return QString::fromLatin1(buf);
+ return TQString::fromLatin1(buf);
case 6:
#ifdef AF_INET6
inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1);
#endif
- return QString::fromLatin1(buf);
+ return TQString::fromLatin1(buf);
}
- return QString::null;
+ return TQString::null;
}
Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
@@ -559,10 +559,10 @@ bool KSocketAddress::operator ==(const KSocketAddress& other) const
return false; // not equal in any other case
}
-QString KSocketAddress::nodeName() const
+TQString KSocketAddress::nodeName() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
switch (d->addr.generic->sa_family)
{
@@ -570,9 +570,9 @@ QString KSocketAddress::nodeName() const
#ifdef AF_INET6
case AF_INET6:
- QString scopeid("%");
+ TQString scopeid("%");
if (d->addr.generic->sa_family == AF_INET6 && d->addr.in6->sin6_scope_id)
- scopeid += QString::number(d->addr.in6->sin6_scope_id);
+ scopeid += TQString::number(d->addr.in6->sin6_scope_id);
else
scopeid.truncate(0);
return d->ref.ipAddress().toString() + scopeid;
@@ -582,13 +582,13 @@ QString KSocketAddress::nodeName() const
}
// any other case, including AF_UNIX
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::serviceName() const
+TQString KSocketAddress::serviceName() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
switch (d->addr.generic->sa_family)
{
@@ -596,21 +596,21 @@ QString KSocketAddress::serviceName() const
#ifdef AF_INET6
case AF_INET6:
#endif
- return QString::number(d->ref.port());
+ return TQString::number(d->ref.port());
case AF_UNIX:
return d->ref.pathname();
}
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::toString() const
+TQString KSocketAddress::toString() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
- QString fmt;
+ TQString fmt;
if (d->addr.generic->sa_family == AF_INET)
fmt = "%1:%2";
@@ -619,7 +619,7 @@ QString KSocketAddress::toString() const
fmt = "[%1]:%2";
#endif
else if (d->addr.generic->sa_family == AF_UNIX)
- return QString::fromLatin1("unix:%1").arg(serviceName());
+ return TQString::fromLatin1("unix:%1").arg(serviceName());
else
return i18n("1: the unknown socket address family number",
"Unknown family %1").arg(d->addr.generic->sa_family);
@@ -916,7 +916,7 @@ KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
{
}
-KUnixSocketAddress::KUnixSocketAddress(const QString& pathname)
+KUnixSocketAddress::KUnixSocketAddress(const TQString& pathname)
{
setPathname(pathname);
}
@@ -936,18 +936,18 @@ KUnixSocketAddress& KUnixSocketAddress::operator =(const KUnixSocketAddress& oth
return *this;
}
-QString KUnixSocketAddress::pathname() const
+TQString KUnixSocketAddress::pathname() const
{
if (!d->invalid() && d->addr.un->sun_family == AF_UNIX)
- return QFile::decodeName(d->addr.un->sun_path);
- return QString::null;
+ return TQFile::decodeName(d->addr.un->sun_path);
+ return TQString::null;
}
-KUnixSocketAddress& KUnixSocketAddress::setPathname(const QString& path)
+KUnixSocketAddress& KUnixSocketAddress::setPathname(const TQString& path)
{
d->dup(0L, MIN_SOCKADDR_UN_LEN + path.length());
d->addr.un->sun_family = AF_UNIX;
- strcpy(d->addr.un->sun_path, QFile::encodeName(path));
+ strcpy(d->addr.un->sun_path, TQFile::encodeName(path));
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
d->addr.un->sun_len = d->reallen;
diff --git a/kdecore/network/ksocketaddress.h b/kdecore/network/ksocketaddress.h
index 456422f9f..6889527e3 100644
--- a/kdecore/network/ksocketaddress.h
+++ b/kdecore/network/ksocketaddress.h
@@ -25,8 +25,8 @@
#ifndef KSOCKETADDRESS_H
#define KSOCKETADDRESS_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -87,7 +87,7 @@ public:
*
* @param addr the address
*/
- inline KIpAddress(const QString& addr)
+ inline KIpAddress(const TQString& addr)
{ setAddress(addr); }
/**
@@ -189,7 +189,7 @@ public:
* @return true if the address was successfully parsed; otherwise returns
* false and leaves the object unchanged.
*/
- bool setAddress(const QString& address);
+ bool setAddress(const TQString& address);
/**
* Sets the address to the given string representation.
@@ -212,7 +212,7 @@ public:
/**
* Returns the address as a string.
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns a pointer to binary raw data representing the address.
@@ -564,23 +564,23 @@ public:
* Returns the node name of this socket.
*
* In the case of Internet sockets, this is string representation of the IP address.
- * The default implementation returns QString::null.
+ * The default implementation returns TQString::null.
*
- * @return the node name, can be QString::null
+ * @return the node name, can be TQString::null
* @bug use KResolver to resolve unknown families
*/
- virtual QString nodeName() const;
+ virtual TQString nodeName() const;
/**
* Returns the service name for this socket.
*
* In the case of Internet sockets, this is the port number.
- * The default implementation returns QString::null.
+ * The default implementation returns TQString::null.
*
- * @return the service name, can be QString::null
+ * @return the service name, can be TQString::null
* @bug use KResolver to resolve unknown families
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns this socket address as a string suitable for
@@ -588,7 +588,7 @@ public:
*
* @bug use KResolver to resolve unknown families
*/
- virtual QString toString() const;
+ virtual TQString toString() const;
/**
* Returns an object reference that can be used to manipulate this socket
@@ -867,7 +867,7 @@ public:
/**
* Constructs an object from the given pathname.
*/
- KUnixSocketAddress(const QString& pathname);
+ KUnixSocketAddress(const TQString& pathname);
/**
* Destructor.
@@ -890,16 +890,16 @@ public:
/**
* Returns the pathname associated with this object. Will return
- * QString::null if this object is empty.
+ * TQString::null if this object is empty.
*/
- QString pathname() const;
+ TQString pathname() const;
/**
* Sets the pathname for the object.
*
* @return a reference to itself
*/
- KUnixSocketAddress& setPathname(const QString& path);
+ KUnixSocketAddress& setPathname(const TQString& path);
protected:
/// @internal
diff --git a/kdecore/network/ksocketbase.cpp b/kdecore/network/ksocketbase.cpp
index f3bfa766c..9071eea0e 100644
--- a/kdecore/network/ksocketbase.cpp
+++ b/kdecore/network/ksocketbase.cpp
@@ -23,7 +23,7 @@
*/
#include <config.h>
-#include <qmutex.h>
+#include <tqmutex.h>
#include "klocale.h"
#include "ksocketbase.h"
@@ -40,7 +40,7 @@ public:
mutable KSocketDevice* device;
- QMutex mutex;
+ TQMutex mutex;
KSocketBasePrivate()
: mutex(true) // create recursive
@@ -119,7 +119,7 @@ KSocketDevice* KSocketBase::socketDevice() const
return d->device;
// it doesn't exist, so create it
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->device)
return d->device;
@@ -135,7 +135,7 @@ KSocketDevice* KSocketBase::socketDevice() const
void KSocketBase::setSocketDevice(KSocketDevice* device)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->device == 0L)
d->device = device;
}
@@ -163,9 +163,9 @@ KSocketBase::SocketError KSocketBase::error() const
}
// static
-QString KSocketBase::errorString(KSocketBase::SocketError code)
+TQString KSocketBase::errorString(KSocketBase::SocketError code)
{
- QString reason;
+ TQString reason;
switch (code)
{
case NoError:
@@ -248,7 +248,7 @@ QString KSocketBase::errorString(KSocketBase::SocketError code)
break;
default:
- reason = QString::null;
+ reason = TQString::null;
break;
}
@@ -275,7 +275,7 @@ void KSocketBase::unsetSocketDevice()
d->device = 0L;
}
-QMutex* KSocketBase::mutex() const
+TQMutex* KSocketBase::mutex() const
{
return &d->mutex;
}
diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h
index acbbdf9b9..e416c8e93 100644
--- a/kdecore/network/ksocketbase.h
+++ b/kdecore/network/ksocketbase.h
@@ -56,8 +56,8 @@
#ifndef KSOCKETBASE_H
#define KSOCKETBASE_H
-#include <qiodevice.h>
-#include <qstring.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
#include "ksocketaddress.h"
#include <kdelibs_export.h>
@@ -65,7 +65,7 @@
/*
* This is extending QIODevice's error codes
*
- * According to qiodevice.h, the last error is IO_UnspecifiedError
+ * According to tqiodevice.h, the last error is IO_UnspecifiedError
* These errors will never occur in functions declared in QIODevice
* (except open, but you shouldn't call open)
*/
@@ -380,7 +380,7 @@ public:
/**
* Returns the error string corresponding to this error condition.
*/
- inline QString errorString() const
+ inline TQString errorString() const
{ return errorString(error()); }
/**
@@ -398,7 +398,7 @@ public:
* while destroying it. You must ensure there are no further references to this
* object when deleting it.
*/
- QMutex* mutex() const;
+ TQMutex* mutex() const;
public:
/**
@@ -406,7 +406,7 @@ public:
*
* @param code the error code
*/
- static QString errorString(SocketError code);
+ static TQString errorString(SocketError code);
/**
* Returns true if the given error code is a fatal one, false
@@ -440,7 +440,7 @@ private:
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KActiveSocketBase: public QIODevice, virtual public KSocketBase
+class KDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public KSocketBase
{
public:
/**
@@ -501,28 +501,28 @@ public:
virtual bool disconnect() = 0;
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
virtual Offset size() const
{ return 0; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
virtual Offset at() const
{ return 0; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return false.
*/
virtual bool at(Offset)
{ return false; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return true.
*/
virtual bool atEnd() const
@@ -550,7 +550,7 @@ public:
/**
* Reads data from the socket.
*
- * Reimplemented from QIODevice. See QIODevice::readBlock for
+ * Reimplemented from TQIODevice. See TQIODevice::readBlock for
* more information.
*/
virtual Q_LONG readBlock(char *data, Q_ULONG len) = 0;
@@ -598,7 +598,7 @@ public:
/**
* Writes the given data to the socket.
*
- * Reimplemented from QIODevice. See QIODevice::writeBlock for
+ * Reimplemented from TQIODevice. See TQIODevice::writeBlock for
* more information.
*/
virtual Q_LONG writeBlock(const char *data, Q_ULONG len) = 0;
@@ -618,18 +618,18 @@ public:
/**
* Reads one character from the socket.
- * Reimplementation from QIODevice. See QIODevice::getch for more information.
+ * Reimplementation from TQIODevice. See TQIODevice::getch for more information.
*/
virtual int getch();
/**
* Writes one character to the socket.
- * Reimplementation from QIODevice. See QIODevice::putch for more information.
+ * Reimplementation from TQIODevice. See TQIODevice::putch for more information.
*/
virtual int putch(int ch);
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return -1;
*/
virtual int ungetch(int)
diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp
index d458a4f15..18c926c83 100644
--- a/kdecore/network/ksocketbuffer.cpp
+++ b/kdecore/network/ksocketbuffer.cpp
@@ -46,13 +46,13 @@ KSocketBuffer::KSocketBuffer(const KSocketBuffer& other)
KSocketBuffer::~KSocketBuffer()
{
- // QValueList takes care of deallocating memory
+ // TQValueList takes care of deallocating memory
}
KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
{
- QMutexLocker locker1(&m_mutex);
- QMutexLocker locker2(&other.m_mutex);
+ TQMutexLocker locker1(&m_mutex);
+ TQMutexLocker locker2(&other.m_mutex);
KIOBufferBase::operator=(other);
@@ -66,11 +66,11 @@ KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
bool KSocketBuffer::canReadLine() const
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
- QValueListConstIterator<QByteArray> it = m_list.constBegin(),
+ TQValueListConstIterator<TQByteArray> it = m_list.constBegin(),
end = m_list.constEnd();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
// walk the buffer
for ( ; it != end; ++it)
@@ -85,18 +85,18 @@ bool KSocketBuffer::canReadLine() const
return false; // not found
}
-QCString KSocketBuffer::readLine()
+TQCString KSocketBuffer::readLine()
{
if (!canReadLine())
- return QCString(); // empty
+ return TQCString(); // empty
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// find the offset of the newline in the buffer
int newline = 0;
- QValueListConstIterator<QByteArray> it = m_list.constBegin(),
+ TQValueListConstIterator<TQByteArray> it = m_list.constBegin(),
end = m_list.constEnd();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
// walk the buffer
for ( ; it != end; ++it)
@@ -115,7 +115,7 @@ QCString KSocketBuffer::readLine()
break;
}
- QCString result(newline + 2 - m_offset);
+ TQCString result(newline + 2 - m_offset);
consumeBuffer(result.data(), newline + 1 - m_offset);
return result;
}
@@ -137,7 +137,7 @@ bool KSocketBuffer::setSize(Q_LONG size)
return true;
// size is now smaller than length
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// repeat the test
if (m_length < m_size)
@@ -154,13 +154,13 @@ Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
if (isFull())
return -1; // can't write
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// verify if we can add len bytes
if (m_size != -1 && (m_size - m_length) < len)
len = m_size - m_length;
- QByteArray a(len);
+ TQByteArray a(len);
a.duplicate(data, len);
m_list.append(a);
@@ -173,9 +173,9 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
if (maxlen == 0 || isEmpty())
return 0;
- QValueListIterator<QByteArray> it = m_list.begin(),
+ TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
Q_LONG copied = 0;
// walk the buffer
@@ -222,7 +222,7 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
void KSocketBuffer::clear()
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
m_list.clear();
m_offset = 0;
m_length = 0;
@@ -233,11 +233,11 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
if (len == 0 || isEmpty())
return 0;
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
- QValueListIterator<QByteArray> it = m_list.begin(),
+ TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
Q_LONG written = 0;
// walk the buffer
@@ -251,7 +251,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
Q_ULONG bufsize = 1460;
if (len != -1 && len < bufsize)
bufsize = len;
- QByteArray buf(bufsize);
+ TQByteArray buf(bufsize);
Q_LONG count = 0;
while (it != end && count + ((*it).size() - offset) <= bufsize)
@@ -298,7 +298,7 @@ Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
if (len == 0 || isFull())
return 0;
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
if (len == -1)
len = dev->bytesAvailable();
@@ -313,7 +313,7 @@ Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
// here, len contains just as many bytes as we're supposed to read
// now do the reading
- QByteArray a(len);
+ TQByteArray a(len);
len = dev->readBlock(a.data(), len);
if (len == -1)
diff --git a/kdecore/network/ksocketbuffer_p.h b/kdecore/network/ksocketbuffer_p.h
index ddcc692bd..a4a0d6a9e 100644
--- a/kdecore/network/ksocketbuffer_p.h
+++ b/kdecore/network/ksocketbuffer_p.h
@@ -25,9 +25,9 @@
#ifndef KSOCKETBUFFER_P_H
#define KSOCKETBUFFER_P_H
-#include <qmutex.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqmutex.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kiobuffer.h"
namespace KNetwork {
@@ -78,7 +78,7 @@ public:
/**
* Reads a line from the buffer and discard it from the buffer.
*/
- virtual QCString readLine();
+ virtual TQCString readLine();
/**
* Returns the number of bytes in the buffer. Note that this is not
@@ -151,9 +151,9 @@ public:
virtual Q_LONG receiveFrom(KActiveSocketBase* device, Q_LONG len = -1);
protected:
- mutable QMutex m_mutex;
- QValueList<QByteArray> m_list;
- QIODevice::Offset m_offset; ///< offset of the start of data in the first element
+ mutable TQMutex m_mutex;
+ TQValueList<TQByteArray> m_list;
+ TQIODevice::Offset m_offset; ///< offset of the start of data in the first element
Q_LONG m_size; ///< the maximum length of the buffer
mutable Q_LONG m_length;
diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp
index b3004ccc2..2885efdb3 100644
--- a/kdecore/network/ksocketdevice.cpp
+++ b/kdecore/network/ksocketdevice.cpp
@@ -24,7 +24,7 @@
#include <config.h>
-#include <qmap.h>
+#include <tqmap.h>
#ifdef USE_SOLARIS
# include <sys/filio.h>
@@ -49,8 +49,8 @@
// Include syssocket before our local includes
#include "syssocket.h"
-#include <qmutex.h>
-#include <qsocketnotifier.h>
+#include <tqmutex.h>
+#include <tqsocketnotifier.h>
#include "kresolver.h"
#include "ksocketaddress.h"
@@ -63,7 +63,7 @@ using namespace KNetwork;
class KNetwork::KSocketDevicePrivate
{
public:
- mutable QSocketNotifier *input, *output, *exception;
+ mutable TQSocketNotifier *input, *output, *exception;
KSocketAddress local, peer;
int af;
@@ -110,7 +110,7 @@ KSocketDevice::~KSocketDevice()
bool KSocketDevice::setSocketOptions(int opts)
{
// must call parent
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts);
if (m_sockfd == -1)
@@ -606,12 +606,12 @@ KSocketAddress KSocketDevice::externalAddress() const
return localAddress();
}
-QSocketNotifier* KSocketDevice::readNotifier() const
+TQSocketNotifier* KSocketDevice::readNotifier() const
{
if (d->input)
return d->input;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->input)
return d->input;
@@ -621,15 +621,15 @@ QSocketNotifier* KSocketDevice::readNotifier() const
return 0L;
}
- return d->input = createNotifier(QSocketNotifier::Read);
+ return d->input = createNotifier(TQSocketNotifier::Read);
}
-QSocketNotifier* KSocketDevice::writeNotifier() const
+TQSocketNotifier* KSocketDevice::writeNotifier() const
{
if (d->output)
return d->output;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->output)
return d->output;
@@ -639,15 +639,15 @@ QSocketNotifier* KSocketDevice::writeNotifier() const
return 0L;
}
- return d->output = createNotifier(QSocketNotifier::Write);
+ return d->output = createNotifier(TQSocketNotifier::Write);
}
-QSocketNotifier* KSocketDevice::exceptionNotifier() const
+TQSocketNotifier* KSocketDevice::exceptionNotifier() const
{
if (d->exception)
return d->exception;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->exception)
return d->exception;
@@ -657,7 +657,7 @@ QSocketNotifier* KSocketDevice::exceptionNotifier() const
return 0L;
}
- return d->exception = createNotifier(QSocketNotifier::Exception);
+ return d->exception = createNotifier(TQSocketNotifier::Exception);
}
bool KSocketDevice::poll(bool *input, bool *output, bool *exception,
@@ -788,12 +788,12 @@ bool KSocketDevice::poll(int timeout, bool *timedout)
return poll(&input, &output, &exception, timeout, timedout);
}
-QSocketNotifier* KSocketDevice::createNotifier(QSocketNotifier::Type type) const
+TQSocketNotifier* KSocketDevice::createNotifier(TQSocketNotifier::Type type) const
{
if (m_sockfd == -1)
return 0L;
- return new QSocketNotifier(m_sockfd, type);
+ return new TQSocketNotifier(m_sockfd, type);
}
namespace
@@ -832,8 +832,8 @@ namespace
}
static KSocketDeviceFactoryBase* defaultImplFactory;
-static QMutex defaultImplFactoryMutex;
-typedef QMap<int, KSocketDeviceFactoryBase* > factoryMap;
+static TQMutex defaultImplFactoryMutex;
+typedef TQMap<int, KSocketDeviceFactoryBase* > factoryMap;
static factoryMap factories;
KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent)
@@ -857,7 +857,7 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie
if (device != 0L)
return device;
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
factoryMap::ConstIterator it = factories.constBegin();
for ( ; it != factories.constEnd(); ++it)
if ((it.key() & capabilities) == capabilities)
@@ -870,7 +870,7 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie
KSocketDeviceFactoryBase*
KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
{
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
KSocketDeviceFactoryBase* old = defaultImplFactory;
defaultImplFactory = factory;
return old;
@@ -878,7 +878,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities)
{
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
if (factories.contains(capabilities))
delete factories[capabilities];
factories.insert(capabilities, factory);
diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h
index 301bc2b07..1bf4771c2 100644
--- a/kdecore/network/ksocketdevice.h
+++ b/kdecore/network/ksocketdevice.h
@@ -25,7 +25,7 @@
#ifndef KSOCKETDEVICE_H
#define KSOCKETDEVICE_H
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include "ksocketbase.h"
namespace KNetwork {
@@ -140,19 +140,19 @@ public:
virtual bool setSocketOptions(int opts);
/**
- * Reimplementation from QIODevice. You should not call this function in sockets.
+ * Reimplementation from TQIODevice. You should not call this function in sockets.
*/
virtual bool open(int mode);
/**
- * Closes the socket. Reimplemented from QIODevice.
+ * Closes the socket. Reimplemented from TQIODevice.
*
* Use this function to close the socket this object is holding open.
*/
virtual void close();
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
*/
virtual void flush()
{ }
@@ -272,7 +272,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* readNotifier() const;
+ TQSocketNotifier* readNotifier() const;
/**
* Returns a socket notifier for output on this socket.
@@ -280,7 +280,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* writeNotifier() const;
+ TQSocketNotifier* writeNotifier() const;
/**
* Returns a socket notifier for exceptional events on this socket.
@@ -288,7 +288,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* exceptionNotifier() const;
+ TQSocketNotifier* exceptionNotifier() const;
/**
* Executes a poll in the socket, via select(2) or poll(2).
@@ -344,12 +344,12 @@ protected:
* not need to call this function again.
*
* Reimplement this function in your derived class if your socket type
- * requires a different kind of QSocketNotifier. The return value should
+ * requires a different kind of TQSocketNotifier. The return value should
* be deleteable with delete. (@ref close deletes them).
*
* @param type the socket notifier type
*/
- virtual QSocketNotifier* createNotifier(QSocketNotifier::Type type) const;
+ virtual TQSocketNotifier* createNotifier(TQSocketNotifier::Type type) const;
public:
/**
diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp
index bcfee405c..07e3555fa 100644
--- a/kdecore/network/ksrvresolverworker.cpp
+++ b/kdecore/network/ksrvresolverworker.cpp
@@ -25,8 +25,8 @@
#include <sys/socket.h>
#include <stdlib.h>
-#include <qapplication.h>
-#include <qevent.h>
+#include <tqapplication.h>
+#include <tqevent.h>
using namespace KNetwork;
using namespace KNetwork::Internal;
@@ -35,7 +35,7 @@ namespace
{
struct KSrvStartEvent: public QCustomEvent
{
- inline KSrvStartEvent() : QCustomEvent(QEvent::User) { }
+ inline KSrvStartEvent() : TQCustomEvent(TQEvent::User) { }
};
}
@@ -50,12 +50,12 @@ bool KSrvResolverWorker::preprocess()
if ((flags() & (KResolver::NoSrv | KResolver::UseSrv)) != KResolver::UseSrv)
return false;
- QString node = nodeName();
+ TQString node = nodeName();
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == QString::fromLatin1("*") ||
- node == QString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
return false; // empty == localhost
encodedName = KResolver::domainToAscii(node);
@@ -73,13 +73,13 @@ bool KSrvResolverWorker::preprocess()
return false; // it is numeric
// check the protocol for something we know
- QCString protoname;
+ TQCString protoname;
int sockettype = socketType();
if (!protocolName().isEmpty())
protoname = protocolName();
else if (protocol() != 0)
{
- QStrList names = KResolver::protocolName(protocol());
+ TQStrList names = KResolver::protocolName(protocol());
names.setAutoDelete(true);
if (names.isEmpty())
return false;
@@ -106,11 +106,11 @@ bool KSrvResolverWorker::preprocess()
bool KSrvResolverWorker::run()
{
- sem = new QSemaphore(1);
+ sem = new TQSemaphore(1);
// zero out
sem->tryAccess(sem->available());
- QApplication::postEvent(this, new KSrvStartEvent);
+ TQApplication::postEvent(this, new KSrvStartEvent);
// block
(*sem)++;
@@ -146,10 +146,10 @@ bool KSrvResolverWorker::run()
else
{
// now process the results
- QValueList<QDns::Server>::ConstIterator it = rawResults.begin();
+ TQValueList<TQDns::Server>::ConstIterator it = rawResults.begin();
while (it != rawResults.end())
{
- const QDns::Server& srv = *it;
+ const TQDns::Server& srv = *it;
PriorityClass& r = myResults[srv.priority];
r.totalWeight += srv.weight;
@@ -170,15 +170,15 @@ bool KSrvResolverWorker::run()
// sort the priority
sortPriorityClass(*mapit);
- QValueList<Entry>& entries = (*mapit).entries;
+ TQValueList<Entry>& entries = (*mapit).entries;
// start the resolvers
- for (QValueList<Entry>::Iterator it = entries.begin();
+ for (TQValueList<Entry>::Iterator it = entries.begin();
it != entries.end(); ++it)
{
Entry &e = *it;
- KResolver* r = new KResolver(e.name, QString::number(e.port));
+ KResolver* r = new KResolver(e.name, TQString::number(e.port));
r->setFlags(flags() | KResolver::NoSrv);
r->setFamily(familyMask());
r->setSocketType(socketType());
@@ -203,7 +203,7 @@ bool KSrvResolverWorker::postprocess()
for (mapit = myResults.begin(), mapend = myResults.end();
mapit != mapend; ++mapit)
{
- QValueList<Entry>::Iterator it = (*mapit).entries.begin(),
+ TQValueList<Entry>::Iterator it = (*mapit).entries.begin(),
end = (*mapit).entries.end();
for ( ; it != end; ++it)
{
@@ -223,10 +223,10 @@ bool KSrvResolverWorker::postprocess()
return true;
}
-void KSrvResolverWorker::customEvent(QCustomEvent*)
+void KSrvResolverWorker::customEvent(TQCustomEvent*)
{
- dns = new QDns(QString::fromLatin1(encodedName), QDns::Srv);
- QObject::connect(dns, SIGNAL(resultsReady()), this, SLOT(dnsResultsReady()));
+ dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv);
+ TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady()));
}
void KSrvResolverWorker::dnsResultsReady()
diff --git a/kdecore/network/ksrvresolverworker_p.h b/kdecore/network/ksrvresolverworker_p.h
index 143fb0d4b..7022df826 100644
--- a/kdecore/network/ksrvresolverworker_p.h
+++ b/kdecore/network/ksrvresolverworker_p.h
@@ -20,11 +20,11 @@
#ifndef KSRVRESOLVERWORKER_P_H
#define KSRVRESOLVERWORKER_P_H
-#include <qobject.h>
-#include <qdns.h>
-#include <qsemaphore.h>
-#include <qvaluelist.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdns.h>
+#include <tqsemaphore.h>
+#include <tqvaluelist.h>
+#include <tqdict.h>
#include "kresolver.h"
#include "kresolverworkerbase.h"
@@ -38,7 +38,7 @@ namespace KNetwork
* @internal
* This class implements SRV-based resolution
*/
- class KSrvResolverWorker: public QObject,
+ class KSrvResolverWorker: public TQObject,
public KNetwork::KResolverWorkerBase
{
Q_OBJECT
@@ -46,7 +46,7 @@ namespace KNetwork
public:
struct Entry
{
- QString name;
+ TQString name;
Q_UINT16 port;
Q_UINT16 weight;
KNetwork::KResolver* resolver;
@@ -56,17 +56,17 @@ namespace KNetwork
{
PriorityClass() : totalWeight(0) { }
- QValueList<Entry> entries;
+ TQValueList<Entry> entries;
Q_UINT16 totalWeight;
};
private:
- QDns *dns;
- QValueList<QDns::Server> rawResults;
- QCString encodedName;
- QSemaphore *sem;
+ TQDns *dns;
+ TQValueList<TQDns::Server> rawResults;
+ TQCString encodedName;
+ TQSemaphore *sem;
- typedef QMap<Q_UINT16, PriorityClass> Results;
+ typedef TQMap<Q_UINT16, PriorityClass> Results;
Results myResults;
public:
@@ -74,7 +74,7 @@ namespace KNetwork
virtual bool run();
virtual bool postprocess();
- virtual void customEvent(QCustomEvent*);
+ virtual void customEvent(TQCustomEvent*);
public slots:
void dnsResultsReady();
diff --git a/kdecore/network/kstreamsocket.cpp b/kdecore/network/kstreamsocket.cpp
index 93c423804..8ca4f91f6 100644
--- a/kdecore/network/kstreamsocket.cpp
+++ b/kdecore/network/kstreamsocket.cpp
@@ -24,10 +24,10 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqsocketnotifier.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -40,8 +40,8 @@ class KNetwork::KStreamSocketPrivate
{
public:
KResolverResults::ConstIterator local, peer;
- QTime startTime;
- QTimer timer;
+ TQTime startTime;
+ TQTimer timer;
int timeout;
@@ -50,8 +50,8 @@ public:
{ }
};
-KStreamSocket::KStreamSocket(const QString& node, const QString& service,
- QObject* parent, const char *name)
+KStreamSocket::KStreamSocket(const TQString& node, const TQString& service,
+ TQObject* parent, const char *name)
: KClientSocketBase(parent, name), d(new KStreamSocketPrivate)
{
peerResolver().setNodeName(node);
@@ -61,7 +61,7 @@ KStreamSocket::KStreamSocket(const QString& node, const QString& service,
setSocketOptions(socketOptions() & ~Blocking);
- QObject::connect(&d->timer, SIGNAL(timeout()), this, SLOT(timeoutSlot()));
+ TQObject::connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeoutSlot()));
}
KStreamSocket::~KStreamSocket()
@@ -93,7 +93,7 @@ void KStreamSocket::setTimeout(int msecs)
d->timer.changeInterval(msecs);
}
-bool KStreamSocket::bind(const QString& node, const QString& service)
+bool KStreamSocket::bind(const TQString& node, const TQString& service)
{
if (state() != Idle)
return false;
@@ -105,7 +105,7 @@ bool KStreamSocket::bind(const QString& node, const QString& service)
return true;
}
-bool KStreamSocket::connect(const QString& node, const QString& service)
+bool KStreamSocket::connect(const TQString& node, const TQString& service)
{
if (state() == Connected)
return true; // already connected
@@ -130,7 +130,7 @@ bool KStreamSocket::connect(const QString& node, const QString& service)
// connection hasn't started yet
if (!blocking())
{
- QObject::connect(this, SIGNAL(hostFound()), SLOT(hostFoundSlot()));
+ TQObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot()));
return lookup();
}
@@ -196,10 +196,10 @@ bool KStreamSocket::connect(const KResolverEntry& entry)
void KStreamSocket::hostFoundSlot()
{
- QObject::disconnect(this, SLOT(hostFoundSlot()));
+ TQObject::disconnect(this, TQT_SLOT(hostFoundSlot()));
if (timeout() > 0)
d->timer.start(timeout(), true);
- QTimer::singleShot(0, this, SLOT(connectionEvent()));
+ TQTimer::singleShot(0, this, TQT_SLOT(connectionEvent()));
}
void KStreamSocket::connectionEvent()
@@ -266,14 +266,14 @@ void KStreamSocket::connectionEvent()
// socket is attempting to connect
if (socketDevice()->error() == InProgress)
{
- QSocketNotifier *n = socketDevice()->readNotifier();
- QObject::connect(n, SIGNAL(activated(int)),
- this, SLOT(connectionEvent()));
+ TQSocketNotifier *n = socketDevice()->readNotifier();
+ TQObject::connect(n, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(connectionEvent()));
n->setEnabled(true);
n = socketDevice()->writeNotifier();
- QObject::connect(n, SIGNAL(activated(int)),
- this, SLOT(connectionEvent()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(connectionEvent()));
n->setEnabled(true);
return; // wait for activity
@@ -311,7 +311,7 @@ void KStreamSocket::timeoutSlot()
setState(HostFound);
emit stateChanged(HostFound);
- QGuardedPtr<KStreamSocket> that = this;
+ TQGuardedPtr<KStreamSocket> that = this;
emit gotError(Timeout);
if (!that.isNull())
emit timedOut();
@@ -350,8 +350,8 @@ bool KStreamSocket::bindLocallyFor(const KResolverEntry& peer)
void KStreamSocket::connectionSucceeded(const KResolverEntry& peer)
{
- QObject::disconnect(socketDevice()->readNotifier(), 0, this, SLOT(connectionEvent()));
- QObject::disconnect(socketDevice()->writeNotifier(), 0, this, SLOT(connectionEvent()));
+ TQObject::disconnect(socketDevice()->readNotifier(), 0, this, TQT_SLOT(connectionEvent()));
+ TQObject::disconnect(socketDevice()->writeNotifier(), 0, this, TQT_SLOT(connectionEvent()));
resetError();
setFlags(IO_Sequential | IO_Raw | IO_ReadWrite | IO_Open | IO_Async);
diff --git a/kdecore/network/kstreamsocket.h b/kdecore/network/kstreamsocket.h
index d9be79657..099826cb8 100644
--- a/kdecore/network/kstreamsocket.h
+++ b/kdecore/network/kstreamsocket.h
@@ -25,7 +25,7 @@
#ifndef KSTREAMSOCKET_H
#define KSTREAMSOCKET_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kclientsocketbase.h"
@@ -54,30 +54,30 @@ class KStreamSocketPrivate;
*
* Sample usage:
* \code
- * QByteArray httpGet(const QString& hostname)
+ * TQByteArray httpGet(const TQString& hostname)
* {
* KStreamSocket socket(hostname, "http");
* if (!socket.connect())
- * return QByteArray();
- * QByteArray data = socket.readAll();
+ * return TQByteArray();
+ * TQByteArray data = socket.readAll();
* return data;
* }
* \endcode
*
* Here's another sample, showing asynchronous operation:
* \code
- * DataRetriever::DataRetriever(const QString& hostname, const QString& port)
+ * DataRetriever::DataRetriever(const TQString& hostname, const TQString& port)
* : socket(hostname, port)
* {
* // connect signals to our slots
- * QObject::connect(&socket, SIGNAL(connected(const KResolverEntry&)),
- * this, SLOT(slotSocketConnected()));
- * QObject::connect(&socket, SIGNAL(gotError(int)),
- * this, SLOT(slotSocketError(int)));
- * QObject::connect(&socket, SIGNAL(readyRead()),
- * this, SLOT(slotSocketReadyToRead()));
- * QObject::connect(&socket, SIGNAL(readyWrite()),
- * this, SLOT(slotSocketReadyToWrite()));
+ * TQObject::connect(&socket, TQT_SIGNAL(connected(const KResolverEntry&)),
+ * this, TQT_SLOT(slotSocketConnected()));
+ * TQObject::connect(&socket, TQT_SIGNAL(gotError(int)),
+ * this, TQT_SLOT(slotSocketError(int)));
+ * TQObject::connect(&socket, TQT_SIGNAL(readyRead()),
+ * this, TQT_SLOT(slotSocketReadyToRead()));
+ * TQObject::connect(&socket, TQT_SIGNAL(readyWrite()),
+ * this, TQT_SLOT(slotSocketReadyToWrite()));
*
* // set non-blocking mode in order to work asynchronously
* socket.setBlocking(false);
@@ -104,11 +104,11 @@ public:
*
* @param node destination host
* @param service destination service to connect to
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name name for this object
*/
- KStreamSocket(const QString& node = QString::null, const QString& service = QString::null,
- QObject* parent = 0L, const char *name = 0L);
+ KStreamSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This closes the socket.
@@ -142,7 +142,7 @@ public:
* Binds this socket to the given nodename and service,
* or use the default ones if none are given. In order to bind to a service
* and allow the operating system to choose the interface, set @p node to
- * QString::null.
+ * TQString::null.
*
* Reimplemented from KClientSocketBase.
*
@@ -161,14 +161,14 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* Reimplemented from KClientSocketBase. Connect this socket to this
* specific address.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound
* signal will be emitted.
*/
@@ -196,8 +196,8 @@ public:
* @param node the remote node to connect to
* @param service the service on the remote node to connect to
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* Unshadowing from KClientSocketBase.
diff --git a/kdecore/svgicons/ksvgiconengine.cpp b/kdecore/svgicons/ksvgiconengine.cpp
index 66bf33f0b..18d52bee7 100644
--- a/kdecore/svgicons/ksvgiconengine.cpp
+++ b/kdecore/svgicons/ksvgiconengine.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
#include <kmdcodec.h>
@@ -44,25 +44,25 @@ public:
{
}
- double toPixel(const QString &s, bool hmode)
+ double toPixel(const TQString &s, bool hmode)
{
return m_engine->painter()->toPixel(s, hmode);
}
- ArtGradientStop *parseGradientStops(QDomElement element, int &offsets)
+ ArtGradientStop *parseGradientStops(TQDomElement element, int &offsets)
{
if (!element.hasChildNodes())
return 0;
- QValueList<ArtGradientStop> stopList;
+ TQValueList<ArtGradientStop> stopList;
float oldOffset = -1, newOffset = -1;
- for(QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
oldOffset = newOffset;
- QString temp = element.attribute("offset");
+ TQString temp = element.attribute("offset");
if(temp.contains("%"))
{
@@ -83,8 +83,8 @@ public:
stop.offset = newOffset;
- QString parseOpacity;
- QString parseColor;
+ TQString parseOpacity;
+ TQString parseColor;
if(element.hasAttribute("stop-opacity"))
parseOpacity = element.attribute("stop-opacity");
@@ -94,14 +94,14 @@ public:
if(parseOpacity.isEmpty() || parseColor.isEmpty())
{
- QString style = element.attribute("style");
+ TQString style = element.attribute("style");
- QStringList substyles = QStringList::split(';', style);
- for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ TQStringList substyles = TQStringList::split(';', style);
+ for(TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
{
- QStringList substyle = QStringList::split(':', (*it));
- QString command = substyle[0];
- QString params = substyle[1];
+ TQStringList substyle = TQStringList::split(':', (*it));
+ TQString command = substyle[0];
+ TQString params = substyle[1];
command = command.stripWhiteSpace();
params = params.stripWhiteSpace();
@@ -124,7 +124,7 @@ public:
// Parse color using KSVGIconPainter (which uses Qt)
// Supports all svg-needed color formats
- QColor qStopColor = m_engine->painter()->parseColor(parseColor);
+ TQColor qStopColor = m_engine->painter()->parseColor(parseColor);
// Convert in a libart suitable form
Q_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor);
@@ -154,8 +154,8 @@ public:
ArtGradientStop *stops = new ArtGradientStop[stopList.count()];
- QValueList<ArtGradientStop>::iterator it = stopList.begin();
- QValueList<ArtGradientStop>::iterator end = stopList.end();
+ TQValueList<ArtGradientStop>::iterator it = stopList.begin();
+ TQValueList<ArtGradientStop>::iterator end = stopList.end();
for (int i = 0; it != end; ++i, ++it)
stops[i] = *it;
@@ -163,28 +163,28 @@ public:
return stops;
}
- QPointArray parsePoints(QString points)
+ TQPointArray parsePoints(TQString points)
{
if(points.isEmpty())
- return QPointArray();
+ return TQPointArray();
points = points.simplifyWhiteSpace();
if(points.contains(",,") || points.contains(", ,"))
- return QPointArray();
+ return TQPointArray();
points.replace(',', ' ');
- points.replace('\r', QString::null);
- points.replace('\n', QString::null);
+ points.replace('\r', TQString::null);
+ points.replace('\n', TQString::null);
points = points.simplifyWhiteSpace();
- QStringList pointList = QStringList::split(' ', points);
+ TQStringList pointList = TQStringList::split(' ', points);
- QPointArray array(pointList.count() / 2);
+ TQPointArray array(pointList.count() / 2);
int i = 0;
- for(QStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
+ for(TQStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
{
float x = (*(it++)).toFloat();
float y = (*(it)).toFloat();
@@ -196,16 +196,16 @@ public:
return array;
}
- void parseTransform(const QString &transform)
+ void parseTransform(const TQString &transform)
{
// Combine new and old matrix
- QWMatrix matrix = m_engine->painter()->parseTransform(transform);
+ TQWMatrix matrix = m_engine->painter()->parseTransform(transform);
- QWMatrix *current = m_engine->painter()->worldMatrix();
+ TQWMatrix *current = m_engine->painter()->worldMatrix();
*current = matrix * *current;
}
- void parseCommonAttributes(QDomNode &node)
+ void parseCommonAttributes(TQDomNode &node)
{
// Set important default attributes
m_engine->painter()->setFillColor("black");
@@ -218,21 +218,21 @@ public:
// m_engine->painter()->setStrokeOpacity(255, true);
// Collect parent node's attributes
- QPtrList<QDomNamedNodeMap> applyList;
+ TQPtrList<TQDomNamedNodeMap> applyList;
applyList.setAutoDelete(true);
- QDomNode shape = node.parentNode();
+ TQDomNode shape = node.parentNode();
for(; !shape.isNull() ; shape = shape.parentNode())
- applyList.prepend(new QDomNamedNodeMap(shape.attributes()));
+ applyList.prepend(new TQDomNamedNodeMap(shape.attributes()));
// Apply parent attributes
- for(QDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next())
+ for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next())
{
- QDomNamedNodeMap attr = *map;
+ TQDomNamedNodeMap attr = *map;
for(unsigned int i = 0; i < attr.count(); i++)
{
- QString name, value;
+ TQString name, value;
name = attr.item(i).nodeName().lower();
value = attr.item(i).nodeValue();
@@ -247,11 +247,11 @@ public:
}
// Apply local attributes
- QDomNamedNodeMap attr = node.attributes();
+ TQDomNamedNodeMap attr = node.attributes();
for(unsigned int i = 0; i < attr.count(); i++)
{
- QDomNode current = attr.item(i);
+ TQDomNode current = attr.item(i);
if(current.nodeName().lower() == "transform")
parseTransform(current.nodeValue());
@@ -262,7 +262,7 @@ public:
}
}
- bool handleTags(QDomElement element, bool paint)
+ bool handleTags(TQDomElement element, bool paint)
{
if(element.attribute("display") == "none")
return false;
@@ -274,7 +274,7 @@ public:
gradient->stops = parseGradientStops(element, offsets);
gradient->n_stops = offsets + 1;
- QString spread = element.attribute("spreadMethod");
+ TQString spread = element.attribute("spreadMethod");
if(spread == "repeat")
gradient->spread = ART_GRADIENT_REPEAT;
else if(spread == "reflect")
@@ -323,12 +323,12 @@ public:
}
else if(element.tagName() == "switch")
{
- QDomNode iterate = element.firstChild();
+ TQDomNode iterate = element.firstChild();
while(!iterate.isNull())
{
// Reset matrix
- m_engine->painter()->setWorldMatrix(new QWMatrix(m_initialMatrix));
+ m_engine->painter()->setWorldMatrix(new TQWMatrix(m_initialMatrix));
// Parse common attributes, style / transform
parseCommonAttributes(iterate);
@@ -341,12 +341,12 @@ public:
}
else if(element.tagName() == "g" || element.tagName() == "defs")
{
- QDomNode iterate = element.firstChild();
+ TQDomNode iterate = element.firstChild();
while(!iterate.isNull())
{
// Reset matrix
- m_engine->painter()->setWorldMatrix(new QWMatrix(m_initialMatrix));
+ m_engine->painter()->setWorldMatrix(new TQWMatrix(m_initialMatrix));
// Parse common attributes, style / transform
parseCommonAttributes(iterate);
@@ -389,13 +389,13 @@ public:
}
else if(element.tagName() == "polyline")
{
- QPointArray polyline = parsePoints(element.attribute("points"));
+ TQPointArray polyline = parsePoints(element.attribute("points"));
m_engine->painter()->drawPolyline(polyline);
return true;
}
else if(element.tagName() == "polygon")
{
- QPointArray polygon = parsePoints(element.attribute("points"));
+ TQPointArray polygon = parsePoints(element.attribute("points"));
m_engine->painter()->drawPolygon(polygon);
return true;
}
@@ -419,16 +419,16 @@ public:
double w = toPixel(element.attribute("width"), true);
double h = toPixel(element.attribute("height"), false);
- QString href = element.attribute("xlink:href");
+ TQString href = element.attribute("xlink:href");
- QImage image;
+ TQImage image;
if(href.startsWith("data:"))
{
// Get input
- QCString input = href.remove(QRegExp("^data:image/.*;base64,")).utf8();
+ TQCString input = href.remove(TQRegExp("^data:image/.*;base64,")).utf8();
// Decode into 'output'
- QByteArray output;
+ TQByteArray output;
KCodecs::base64Decode(input, output);
// Display
@@ -441,7 +441,7 @@ public:
{
// Scale, if needed
if(image.width() != (int) w || image.height() != (int) h)
- image = image.smoothScale((int) w, (int) h, QImage::ScaleFree);
+ image = image.smoothScale((int) w, (int) h, TQImage::ScaleFree);
m_engine->painter()->drawImage(x, y, image);
}
@@ -451,14 +451,14 @@ public:
return false;
}
- void parseStyle(const QString &style)
+ void parseStyle(const TQString &style)
{
- QStringList substyles = QStringList::split(';', style);
- for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ TQStringList substyles = TQStringList::split(';', style);
+ for(TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
{
- QStringList substyle = QStringList::split(':', (*it));
- QString command = substyle[0];
- QString params = substyle[1];
+ TQStringList substyle = TQStringList::split(':', (*it));
+ TQString command = substyle[0];
+ TQString params = substyle[1];
command = command.stripWhiteSpace();
params = params.stripWhiteSpace();
@@ -466,7 +466,7 @@ public:
}
}
- void parsePA(const QString &command, const QString &value)
+ void parsePA(const TQString &command, const TQString &value)
{
if(command == "stroke-width") // TODO: horiz:false correct?
m_engine->painter()->setStrokeWidth(toPixel(value, false));
@@ -505,7 +505,7 @@ private:
friend class KSVGIconEngine;
KSVGIconEngine *m_engine;
- QWMatrix m_initialMatrix;
+ TQWMatrix m_initialMatrix;
};
struct KSVGIconEngine::Private
@@ -536,10 +536,10 @@ KSVGIconEngine::~KSVGIconEngine()
delete d;
}
-bool KSVGIconEngine::load(int width, int height, const QString &path)
+bool KSVGIconEngine::load(int width, int height, const TQString &path)
{
- QDomDocument svgDocument("svg");
- QFile file(path);
+ TQDomDocument svgDocument("svg");
+ TQFile file(path);
if(path.right(3).upper() == "SVG")
{
@@ -555,10 +555,10 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
if(!svgz)
return false;
- QString data;
+ TQString data;
bool done = false;
- QCString buffer(1024);
+ TQCString buffer(1024);
int length = 0;
while(!done)
@@ -583,12 +583,12 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
return false;
// Check for root element
- QDomNode rootNode = svgDocument.namedItem("svg");
+ TQDomNode rootNode = svgDocument.namedItem("svg");
if(rootNode.isNull() || !rootNode.isElement())
return false;
// Detect width and height
- QDomElement rootElement = rootNode.toElement();
+ TQDomElement rootElement = rootNode.toElement();
// Create icon painter
d->painter = new KSVGIconPainter(width, height);
@@ -611,7 +611,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
// Apply viewbox
if(rootElement.hasAttribute("viewBox"))
{
- QStringList points = QStringList::split(' ', rootElement.attribute("viewBox").simplifyWhiteSpace());
+ TQStringList points = TQStringList::split(' ', rootElement.attribute("viewBox").simplifyWhiteSpace());
float w = points[2].toFloat();
float h = points[3].toFloat();
@@ -634,7 +634,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
d->painter->worldMatrix()->scale(ratiow, ratioh);
}
- QWMatrix initialMatrix = *d->painter->worldMatrix();
+ TQWMatrix initialMatrix = *d->painter->worldMatrix();
d->helper->m_initialMatrix = initialMatrix;
// Apply transform
@@ -642,10 +642,10 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
d->helper->parseTransform(rootElement.attribute("transform"));
// Go through all elements
- QDomNode svgNode = rootElement.firstChild();
+ TQDomNode svgNode = rootElement.firstChild();
while(!svgNode.isNull())
{
- QDomElement svgChild = svgNode.toElement();
+ TQDomElement svgChild = svgNode.toElement();
if(!svgChild.isNull())
{
d->helper->parseCommonAttributes(svgNode);
@@ -655,7 +655,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
svgNode = svgNode.nextSibling();
// Reset matrix
- d->painter->setWorldMatrix(new QWMatrix(initialMatrix));
+ d->painter->setWorldMatrix(new TQWMatrix(initialMatrix));
}
d->painter->finish();
@@ -668,7 +668,7 @@ KSVGIconPainter *KSVGIconEngine::painter()
return d->painter;
}
-QImage *KSVGIconEngine::image()
+TQImage *KSVGIconEngine::image()
{
return d->painter->image();
}
diff --git a/kdecore/svgicons/ksvgiconengine.h b/kdecore/svgicons/ksvgiconengine.h
index 3d3f46ea5..3ef2063e9 100644
--- a/kdecore/svgicons/ksvgiconengine.h
+++ b/kdecore/svgicons/ksvgiconengine.h
@@ -33,10 +33,10 @@ public:
KSVGIconEngine();
~KSVGIconEngine();
- bool load(int width, int height, const QString &path);
+ bool load(int width, int height, const TQString &path);
KSVGIconPainter *painter();
- QImage *image();
+ TQImage *image();
double width();
double height();
diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp
index 100369570..811dfe918 100644
--- a/kdecore/svgicons/ksvgiconpainter.cpp
+++ b/kdecore/svgicons/ksvgiconpainter.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvaluevector.h>
-#include <qstringlist.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqdom.h>
#include <math.h>
@@ -65,10 +65,10 @@ public:
m_useFillGradient = false;
m_useStrokeGradient = false;
- m_worldMatrix = new QWMatrix();
+ m_worldMatrix = new TQWMatrix();
// Create new image with alpha support
- m_image = new QImage(width, height, 32);
+ m_image = new TQImage(width, height, 32);
m_image->setAlphaBuffer(true);
m_strokeWidth = 1.0;
@@ -104,14 +104,14 @@ public:
delete m_image;
delete m_worldMatrix;
- for(QMap<QString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it)
+ for(TQMap<TQString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it)
{
if (!it.data())
continue;
delete [] it.data()->stops;
delete it.data();
}
- for(QMap<QString, ArtGradientRadial *>::Iterator it = m_radialGradientMap.begin(); it != m_radialGradientMap.end(); ++it)
+ for(TQMap<TQString, ArtGradientRadial *>::Iterator it = m_radialGradientMap.begin(); it != m_radialGradientMap.end(); ++it)
{
if (!it.data())
continue;
@@ -130,7 +130,7 @@ public:
return art_new(ArtBpath, number);
}
- void ensureSpace(QMemArray<ArtBpath> &vec, int index)
+ void ensureSpace(TQMemArray<ArtBpath> &vec, int index)
{
if(vec.size() == (unsigned int) index)
vec.resize(index + 1);
@@ -185,10 +185,10 @@ public:
m_tempBuffer = 0;
}
- Q_UINT32 toArtColor(const QColor &color)
+ Q_UINT32 toArtColor(const TQColor &color)
{
// Convert in a libart suitable form
- QString tempName = color.name();
+ TQString tempName = color.name();
const char *str = tempName.latin1();
int result = 0;
@@ -272,7 +272,7 @@ public:
// Filling
{
int index = -1;
- QValueVector<int> toCorrect;
+ TQValueVector<int> toCorrect;
while(vec[++index].code != ART_END)
{
if(vec[index].code == ART_END2)
@@ -300,7 +300,7 @@ public:
art_svp_free(temp);
- QValueVector<int>::iterator it;
+ TQValueVector<int>::iterator it;
for(it = toCorrect.begin(); it != toCorrect.end(); ++it)
vec[(*it)].code = (ArtPathcode)ART_END2;
}
@@ -337,8 +337,8 @@ public:
if(m_dashes.length() > 0)
{
- QRegExp reg("[, ]");
- QStringList dashList = QStringList::split(reg, m_dashes);
+ TQRegExp reg("[, ]");
+ TQStringList dashList = TQStringList::split(reg, m_dashes);
double *dashes = new double[dashList.count()];
for(unsigned int i = 0; i < dashList.count(); i++)
@@ -428,12 +428,12 @@ public:
art_free(vec);
}
- void applyLinearGradient(ArtSVP *svp, const QString &ref)
+ void applyLinearGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientLinear *linear = m_linearGradientMap[ref];
if(linear)
{
- QDomElement element = m_linearGradientElementMap[linear];
+ TQDomElement element = m_linearGradientElementMap[linear];
double x1, y1, x2, y2;
if(element.hasAttribute("x1"))
@@ -457,7 +457,7 @@ public:
y2 = 0;
// Adjust to gradientTransform
- QWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
+ TQWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
m.map(x1, y1, &x1, &y1);
m.map(x2, y2, &x2, &y2);
@@ -482,12 +482,12 @@ public:
}
}
- void applyRadialGradient(ArtSVP *svp, const QString &ref)
+ void applyRadialGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientRadial *radial = m_radialGradientMap[ref];
if(radial)
{
- QDomElement element = m_radialGradientElementMap[radial];
+ TQDomElement element = m_radialGradientElementMap[radial];
double cx, cy, r, fx, fy;
if(element.hasAttribute("cx"))
@@ -528,7 +528,7 @@ public:
double aff1[6], aff2[6], gradTransform[6];
// Respect gradientTransform
- QWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
+ TQWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
gradTransform[0] = m.m11();
gradTransform[1] = m.m12();
@@ -553,12 +553,12 @@ public:
}
}
- void applyGradient(ArtSVP *svp, const QString &ref)
+ void applyGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientLinear *linear = m_linearGradientMap[ref];
if(linear)
{
- QDomElement element = m_linearGradientElementMap[linear];
+ TQDomElement element = m_linearGradientElementMap[linear];
if(!element.hasAttribute("xlink:href"))
{
@@ -568,23 +568,23 @@ public:
else
{
ArtGradientLinear *linear = m_linearGradientMap[element.attribute("xlink:href").mid(1)];
- QDomElement newElement = m_linearGradientElementMap[linear];
+ TQDomElement newElement = m_linearGradientElementMap[linear];
// Saved 'old' attributes
- QDict<QString> refattrs;
+ TQDict<TQString> refattrs;
refattrs.setAutoDelete(true);
for(unsigned int i = 0; i < newElement.attributes().length(); ++i)
- refattrs.insert(newElement.attributes().item(i).nodeName(), new QString(newElement.attributes().item(i).nodeValue()));
+ refattrs.insert(newElement.attributes().item(i).nodeName(), new TQString(newElement.attributes().item(i).nodeValue()));
// Copy attributes
if(!newElement.isNull())
{
- QDomNamedNodeMap attr = element.attributes();
+ TQDomNamedNodeMap attr = element.attributes();
for(unsigned int i = 0; i < attr.length(); i++)
{
- QString name = attr.item(i).nodeName();
+ TQString name = attr.item(i).nodeName();
if(name != "xlink:href" && name != "id")
newElement.setAttribute(name, attr.item(i).nodeValue());
}
@@ -593,7 +593,7 @@ public:
applyGradient(svp, element.attribute("xlink:href").mid(1));
// Restore attributes
- QDictIterator<QString> itr(refattrs);
+ TQDictIterator<TQString> itr(refattrs);
for(; itr.current(); ++itr)
newElement.setAttribute(itr.currentKey(), *(itr.current()));
@@ -604,7 +604,7 @@ public:
ArtGradientRadial *radial = m_radialGradientMap[ref];
if(radial)
{
- QDomElement element = m_radialGradientElementMap[radial];
+ TQDomElement element = m_radialGradientElementMap[radial];
if(!element.hasAttribute("xlink:href"))
{
@@ -614,23 +614,23 @@ public:
else
{
ArtGradientRadial *radial = m_radialGradientMap[element.attribute("xlink:href").mid(1)];
- QDomElement newElement = m_radialGradientElementMap[radial];
+ TQDomElement newElement = m_radialGradientElementMap[radial];
// Saved 'old' attributes
- QDict<QString> refattrs;
+ TQDict<TQString> refattrs;
refattrs.setAutoDelete(true);
for(unsigned int i = 0; i < newElement.attributes().length(); ++i)
- refattrs.insert(newElement.attributes().item(i).nodeName(), new QString(newElement.attributes().item(i).nodeValue()));
+ refattrs.insert(newElement.attributes().item(i).nodeName(), new TQString(newElement.attributes().item(i).nodeValue()));
// Copy attributes
if(!newElement.isNull())
{
- QDomNamedNodeMap attr = element.attributes();
+ TQDomNamedNodeMap attr = element.attributes();
for(unsigned int i = 0; i < attr.length(); i++)
{
- QString name = attr.item(i).nodeName();
+ TQString name = attr.item(i).nodeName();
if(name != "xlink:href" && name != "id")
newElement.setAttribute(name, attr.item(i).nodeValue());
}
@@ -639,7 +639,7 @@ public:
applyGradient(svp, element.attribute("xlink:href").mid(1));
// Restore attributes
- QDictIterator<QString> itr(refattrs);
+ TQDictIterator<TQString> itr(refattrs);
for(; itr.current(); ++itr)
newElement.setAttribute(itr.currentKey(), *(itr.current()));
@@ -650,7 +650,7 @@ public:
void applyGradient(ArtSVP *svp, bool fill)
{
- QString ref;
+ TQString ref;
if(fill)
{
@@ -680,7 +680,7 @@ public:
}
}
- void calculateArc(bool relative, QMemArray<ArtBpath> &vec, int &index, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
+ void calculateArc(bool relative, TQMemArray<ArtBpath> &vec, int &index, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
{
double sin_th, cos_th;
double a00, a01, a10, a11;
@@ -1122,20 +1122,20 @@ private:
friend class KSVGIconPainter;
ArtSVP *m_clipSVP;
- QImage *m_image;
- QWMatrix *m_worldMatrix;
+ TQImage *m_image;
+ TQWMatrix *m_worldMatrix;
- QString m_fillRule;
- QString m_joinStyle;
- QString m_capStyle;
+ TQString m_fillRule;
+ TQString m_joinStyle;
+ TQString m_capStyle;
int m_strokeMiterLimit;
- QString m_dashes;
+ TQString m_dashes;
unsigned short m_dashOffset;
- QColor m_fillColor;
- QColor m_strokeColor;
+ TQColor m_fillColor;
+ TQColor m_strokeColor;
art_u8 *m_buffer;
art_u8 *m_tempBuffer;
@@ -1155,14 +1155,14 @@ private:
bool m_useFillGradient;
bool m_useStrokeGradient;
- QString m_fillGradientReference;
- QString m_strokeGradientReference;
+ TQString m_fillGradientReference;
+ TQString m_strokeGradientReference;
- QMap<QString, ArtGradientLinear *> m_linearGradientMap;
- QMap<ArtGradientLinear *, QDomElement> m_linearGradientElementMap;
+ TQMap<TQString, ArtGradientLinear *> m_linearGradientMap;
+ TQMap<ArtGradientLinear *, TQDomElement> m_linearGradientElementMap;
- QMap<QString, ArtGradientRadial *> m_radialGradientMap;
- QMap<ArtGradientRadial *, QDomElement> m_radialGradientElementMap;
+ TQMap<TQString, ArtGradientRadial *> m_radialGradientMap;
+ TQMap<ArtGradientRadial *, TQDomElement> m_radialGradientElementMap;
KSVGIconPainter *m_painter;
@@ -1206,17 +1206,17 @@ void KSVGIconPainter::finish()
d->helper->blit();
}
-QImage *KSVGIconPainter::image()
+TQImage *KSVGIconPainter::image()
{
- return new QImage(*d->helper->m_image);
+ return new TQImage(*d->helper->m_image);
}
-QWMatrix *KSVGIconPainter::worldMatrix()
+TQWMatrix *KSVGIconPainter::worldMatrix()
{
return d->helper->m_worldMatrix;
}
-void KSVGIconPainter::setWorldMatrix(QWMatrix *matrix)
+void KSVGIconPainter::setWorldMatrix(TQWMatrix *matrix)
{
if(d->helper->m_worldMatrix)
delete d->helper->m_worldMatrix;
@@ -1229,39 +1229,39 @@ void KSVGIconPainter::setStrokeWidth(double width)
d->helper->m_strokeWidth = width;
}
-void KSVGIconPainter::setStrokeMiterLimit(const QString &miter)
+void KSVGIconPainter::setStrokeMiterLimit(const TQString &miter)
{
d->helper->m_strokeMiterLimit = miter.toInt();
}
-void KSVGIconPainter::setStrokeDashOffset(const QString &dashOffset)
+void KSVGIconPainter::setStrokeDashOffset(const TQString &dashOffset)
{
d->helper->m_dashOffset = dashOffset.toUInt();
}
-void KSVGIconPainter::setStrokeDashArray(const QString &dashes)
+void KSVGIconPainter::setStrokeDashArray(const TQString &dashes)
{
d->helper->m_dashes = dashes;
}
-void KSVGIconPainter::setCapStyle(const QString &cap)
+void KSVGIconPainter::setCapStyle(const TQString &cap)
{
d->helper->m_capStyle = cap;
}
-void KSVGIconPainter::setJoinStyle(const QString &join)
+void KSVGIconPainter::setJoinStyle(const TQString &join)
{
d->helper->m_joinStyle = join;
}
-void KSVGIconPainter::setStrokeColor(const QString &stroke)
+void KSVGIconPainter::setStrokeColor(const TQString &stroke)
{
if(stroke.startsWith("url"))
{
d->helper->m_useStroke = false;
d->helper->m_useStrokeGradient = true;
- QString url = stroke;
+ TQString url = stroke;
unsigned int start = url.find("#") + 1;
unsigned int end = url.findRev(")");
@@ -1273,7 +1273,7 @@ void KSVGIconPainter::setStrokeColor(const QString &stroke)
d->helper->m_strokeColor = parseColor(stroke);
d->helper->m_useStrokeGradient = false;
- d->helper->m_strokeGradientReference = QString::null;
+ d->helper->m_strokeGradientReference = TQString::null;
if(stroke.stripWhiteSpace().lower() != "none")
setUseStroke(true);
@@ -1282,14 +1282,14 @@ void KSVGIconPainter::setStrokeColor(const QString &stroke)
}
}
-void KSVGIconPainter::setFillColor(const QString &fill)
+void KSVGIconPainter::setFillColor(const TQString &fill)
{
if(fill.startsWith("url"))
{
d->helper->m_useFill = false;
d->helper->m_useFillGradient = true;
- QString url = fill;
+ TQString url = fill;
unsigned int start = url.find("#") + 1;
unsigned int end = url.findRev(")");
@@ -1301,7 +1301,7 @@ void KSVGIconPainter::setFillColor(const QString &fill)
d->helper->m_fillColor = parseColor(fill);
d->helper->m_useFillGradient = false;
- d->helper->m_fillGradientReference = QString::null;
+ d->helper->m_fillGradientReference = TQString::null;
if(fill.stripWhiteSpace().lower() != "none")
setUseFill(true);
@@ -1310,12 +1310,12 @@ void KSVGIconPainter::setFillColor(const QString &fill)
}
}
-void KSVGIconPainter::setFillRule(const QString &fillRule)
+void KSVGIconPainter::setFillRule(const TQString &fillRule)
{
d->helper->m_fillRule = fillRule;
}
-Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
+Q_UINT32 KSVGIconPainter::parseOpacity(const TQString &data)
{
int opacity = 255;
@@ -1325,7 +1325,7 @@ Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
if(data.contains("%"))
{
- QString tempString = data.left(data.length() - 1);
+ TQString tempString = data.left(data.length() - 1);
temp = double(255 * tempString.toDouble()) / 100.0;
}
else
@@ -1337,17 +1337,17 @@ Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
return opacity;
}
-void KSVGIconPainter::setFillOpacity(const QString &fillOpacity)
+void KSVGIconPainter::setFillOpacity(const TQString &fillOpacity)
{
d->helper->m_fillOpacity = parseOpacity(fillOpacity);
}
-void KSVGIconPainter::setStrokeOpacity(const QString &strokeOpacity)
+void KSVGIconPainter::setStrokeOpacity(const TQString &strokeOpacity)
{
d->helper->m_strokeOpacity = parseOpacity(strokeOpacity);
}
-void KSVGIconPainter::setOpacity(const QString &opacity)
+void KSVGIconPainter::setOpacity(const TQString &opacity)
{
d->helper->m_opacity = parseOpacity(opacity);
}
@@ -1594,7 +1594,7 @@ void KSVGIconPainter::drawLine(double x1, double y1, double x2, double y2)
d->helper->drawVPath(vec);
}
-void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
+void KSVGIconPainter::drawPolyline(TQPointArray polyArray, int points)
{
if(polyArray.point(0).x() == -1 || polyArray.point(0).y() == -1)
return;
@@ -1612,7 +1612,7 @@ void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
int index;
for(index = 1; index < points; index++)
{
- QPoint point = polyArray.point(index);
+ TQPoint point = polyArray.point(index);
polyline[index].code = ART_LINETO;
polyline[index].x = point.x();
polyline[index].y = point.y();
@@ -1630,7 +1630,7 @@ void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
d->helper->drawVPath(polyline);
}
-void KSVGIconPainter::drawPolygon(QPointArray polyArray)
+void KSVGIconPainter::drawPolygon(TQPointArray polyArray)
{
ArtVpath *polygon;
@@ -1642,7 +1642,7 @@ void KSVGIconPainter::drawPolygon(QPointArray polyArray)
unsigned int index;
for(index = 1; index < polyArray.count(); index++)
{
- QPoint point = polyArray.point(index);
+ TQPoint point = polyArray.point(index);
polygon[index].code = ART_LINETO;
polygon[index].x = point.x();
polygon[index].y = point.y();
@@ -1724,19 +1724,19 @@ static const char *getCoord(const char *ptr, double &number)
return ptr;
}
-void KSVGIconPainter::drawPath(const QString &data, bool filled)
+void KSVGIconPainter::drawPath(const TQString &data, bool filled)
{
if (!data.isEmpty())
{
- QString value = data;
+ TQString value = data;
- QMemArray<ArtBpath> vec;
+ TQMemArray<ArtBpath> vec;
int index = -1;
double curx = 0.0, cury = 0.0, contrlx = 0.0, contrly = 0.0, xc, yc;
unsigned int lastCommand = 0;
- QString _d = value.replace(",", " ");
+ TQString _d = value.replace(",", " ");
_d = _d.simplifyWhiteSpace();
const char *ptr = _d.latin1();
const char *end = _d.latin1() + _d.length() + 1;
@@ -2304,7 +2304,7 @@ void KSVGIconPainter::drawPath(const QString &data, bool filled)
}
}
-void KSVGIconPainter::drawImage(double x, double y, QImage &image)
+void KSVGIconPainter::drawImage(double x, double y, TQImage &image)
{
if(image.depth() != 32)
image = image.convertDepth(32);
@@ -2322,343 +2322,343 @@ void KSVGIconPainter::drawImage(double x, double y, QImage &image)
image.width() * 4, affine);
}
-QColor KSVGIconPainter::parseColor(const QString &param)
+TQColor KSVGIconPainter::parseColor(const TQString &param)
{
if(param.stripWhiteSpace().startsWith("#"))
{
- QColor color;
+ TQColor color;
color.setNamedColor(param.stripWhiteSpace());
return color;
}
else if(param.stripWhiteSpace().startsWith("rgb("))
{
- QString parse = param.stripWhiteSpace();
- QStringList colors = QStringList::split(',', parse);
- QString r = colors[0].right((colors[0].length() - 4));
- QString g = colors[1];
- QString b = colors[2].left((colors[2].length() - 1));
+ TQString parse = param.stripWhiteSpace();
+ TQStringList colors = TQStringList::split(',', parse);
+ TQString r = colors[0].right((colors[0].length() - 4));
+ TQString g = colors[1];
+ TQString b = colors[2].left((colors[2].length() - 1));
if(r.contains("%"))
{
r = r.left(r.length() - 1);
- r = QString::number(int((double(255 * r.toDouble()) / 100.0)));
+ r = TQString::number(int((double(255 * r.toDouble()) / 100.0)));
}
if(g.contains("%"))
{
g = g.left(g.length() - 1);
- g = QString::number(int((double(255 * g.toDouble()) / 100.0)));
+ g = TQString::number(int((double(255 * g.toDouble()) / 100.0)));
}
if(b.contains("%"))
{
b = b.left(b.length() - 1);
- b = QString::number(int((double(255 * b.toDouble()) / 100.0)));
+ b = TQString::number(int((double(255 * b.toDouble()) / 100.0)));
}
- return QColor(r.toInt(), g.toInt(), b.toInt());
+ return TQColor(r.toInt(), g.toInt(), b.toInt());
}
else
{
- QString rgbColor = param.stripWhiteSpace();
+ TQString rgbColor = param.stripWhiteSpace();
if(rgbColor == "aliceblue")
- return QColor(240, 248, 255);
+ return TQColor(240, 248, 255);
else if(rgbColor == "antiquewhite")
- return QColor(250, 235, 215);
+ return TQColor(250, 235, 215);
else if(rgbColor == "aqua")
- return QColor(0, 255, 255);
+ return TQColor(0, 255, 255);
else if(rgbColor == "aquamarine")
- return QColor(127, 255, 212);
+ return TQColor(127, 255, 212);
else if(rgbColor == "azure")
- return QColor(240, 255, 255);
+ return TQColor(240, 255, 255);
else if(rgbColor == "beige")
- return QColor(245, 245, 220);
+ return TQColor(245, 245, 220);
else if(rgbColor == "bisque")
- return QColor(255, 228, 196);
+ return TQColor(255, 228, 196);
else if(rgbColor == "black")
- return QColor(0, 0, 0);
+ return TQColor(0, 0, 0);
else if(rgbColor == "blanchedalmond")
- return QColor(255, 235, 205);
+ return TQColor(255, 235, 205);
else if(rgbColor == "blue")
- return QColor(0, 0, 255);
+ return TQColor(0, 0, 255);
else if(rgbColor == "blueviolet")
- return QColor(138, 43, 226);
+ return TQColor(138, 43, 226);
else if(rgbColor == "brown")
- return QColor(165, 42, 42);
+ return TQColor(165, 42, 42);
else if(rgbColor == "burlywood")
- return QColor(222, 184, 135);
+ return TQColor(222, 184, 135);
else if(rgbColor == "cadetblue")
- return QColor(95, 158, 160);
+ return TQColor(95, 158, 160);
else if(rgbColor == "chartreuse")
- return QColor(127, 255, 0);
+ return TQColor(127, 255, 0);
else if(rgbColor == "chocolate")
- return QColor(210, 105, 30);
+ return TQColor(210, 105, 30);
else if(rgbColor == "coral")
- return QColor(255, 127, 80);
+ return TQColor(255, 127, 80);
else if(rgbColor == "cornflowerblue")
- return QColor(100, 149, 237);
+ return TQColor(100, 149, 237);
else if(rgbColor == "cornsilk")
- return QColor(255, 248, 220);
+ return TQColor(255, 248, 220);
else if(rgbColor == "crimson")
- return QColor(220, 20, 60);
+ return TQColor(220, 20, 60);
else if(rgbColor == "cyan")
- return QColor(0, 255, 255);
+ return TQColor(0, 255, 255);
else if(rgbColor == "darkblue")
- return QColor(0, 0, 139);
+ return TQColor(0, 0, 139);
else if(rgbColor == "darkcyan")
- return QColor(0, 139, 139);
+ return TQColor(0, 139, 139);
else if(rgbColor == "darkgoldenrod")
- return QColor(184, 134, 11);
+ return TQColor(184, 134, 11);
else if(rgbColor == "darkgray")
- return QColor(169, 169, 169);
+ return TQColor(169, 169, 169);
else if(rgbColor == "darkgrey")
- return QColor(169, 169, 169);
+ return TQColor(169, 169, 169);
else if(rgbColor == "darkgreen")
- return QColor(0, 100, 0);
+ return TQColor(0, 100, 0);
else if(rgbColor == "darkkhaki")
- return QColor(189, 183, 107);
+ return TQColor(189, 183, 107);
else if(rgbColor == "darkmagenta")
- return QColor(139, 0, 139);
+ return TQColor(139, 0, 139);
else if(rgbColor == "darkolivegreen")
- return QColor(85, 107, 47);
+ return TQColor(85, 107, 47);
else if(rgbColor == "darkorange")
- return QColor(255, 140, 0);
+ return TQColor(255, 140, 0);
else if(rgbColor == "darkorchid")
- return QColor(153, 50, 204);
+ return TQColor(153, 50, 204);
else if(rgbColor == "darkred")
- return QColor(139, 0, 0);
+ return TQColor(139, 0, 0);
else if(rgbColor == "darksalmon")
- return QColor(233, 150, 122);
+ return TQColor(233, 150, 122);
else if(rgbColor == "darkseagreen")
- return QColor(143, 188, 143);
+ return TQColor(143, 188, 143);
else if(rgbColor == "darkslateblue")
- return QColor(72, 61, 139);
+ return TQColor(72, 61, 139);
else if(rgbColor == "darkslategray")
- return QColor(47, 79, 79);
+ return TQColor(47, 79, 79);
else if(rgbColor == "darkslategrey")
- return QColor(47, 79, 79);
+ return TQColor(47, 79, 79);
else if(rgbColor == "darkturquoise")
- return QColor(0, 206, 209);
+ return TQColor(0, 206, 209);
else if(rgbColor == "darkviolet")
- return QColor(148, 0, 211);
+ return TQColor(148, 0, 211);
else if(rgbColor == "deeppink")
- return QColor(255, 20, 147);
+ return TQColor(255, 20, 147);
else if(rgbColor == "deepskyblue")
- return QColor(0, 191, 255);
+ return TQColor(0, 191, 255);
else if(rgbColor == "dimgray")
- return QColor(105, 105, 105);
+ return TQColor(105, 105, 105);
else if(rgbColor == "dimgrey")
- return QColor(105, 105, 105);
+ return TQColor(105, 105, 105);
else if(rgbColor == "dodgerblue")
- return QColor(30, 144, 255);
+ return TQColor(30, 144, 255);
else if(rgbColor == "firebrick")
- return QColor(178, 34, 34);
+ return TQColor(178, 34, 34);
else if(rgbColor == "floralwhite")
- return QColor(255, 250, 240);
+ return TQColor(255, 250, 240);
else if(rgbColor == "forestgreen")
- return QColor(34, 139, 34);
+ return TQColor(34, 139, 34);
else if(rgbColor == "fuchsia")
- return QColor(255, 0, 255);
+ return TQColor(255, 0, 255);
else if(rgbColor == "gainsboro")
- return QColor(220, 220, 220);
+ return TQColor(220, 220, 220);
else if(rgbColor == "ghostwhite")
- return QColor(248, 248, 255);
+ return TQColor(248, 248, 255);
else if(rgbColor == "gold")
- return QColor(255, 215, 0);
+ return TQColor(255, 215, 0);
else if(rgbColor == "goldenrod")
- return QColor(218, 165, 32);
+ return TQColor(218, 165, 32);
else if(rgbColor == "gray")
- return QColor(128, 128, 128);
+ return TQColor(128, 128, 128);
else if(rgbColor == "grey")
- return QColor(128, 128, 128);
+ return TQColor(128, 128, 128);
else if(rgbColor == "green")
- return QColor(0, 128, 0);
+ return TQColor(0, 128, 0);
else if(rgbColor == "greenyellow")
- return QColor(173, 255, 47);
+ return TQColor(173, 255, 47);
else if(rgbColor == "honeydew")
- return QColor(240, 255, 240);
+ return TQColor(240, 255, 240);
else if(rgbColor == "hotpink")
- return QColor(255, 105, 180);
+ return TQColor(255, 105, 180);
else if(rgbColor == "indianred")
- return QColor(205, 92, 92);
+ return TQColor(205, 92, 92);
else if(rgbColor == "indigo")
- return QColor(75, 0, 130);
+ return TQColor(75, 0, 130);
else if(rgbColor == "ivory")
- return QColor(255, 255, 240);
+ return TQColor(255, 255, 240);
else if(rgbColor == "khaki")
- return QColor(240, 230, 140);
+ return TQColor(240, 230, 140);
else if(rgbColor == "lavender")
- return QColor(230, 230, 250);
+ return TQColor(230, 230, 250);
else if(rgbColor == "lavenderblush")
- return QColor(255, 240, 245);
+ return TQColor(255, 240, 245);
else if(rgbColor == "lawngreen")
- return QColor(124, 252, 0);
+ return TQColor(124, 252, 0);
else if(rgbColor == "lemonchiffon")
- return QColor(255, 250, 205);
+ return TQColor(255, 250, 205);
else if(rgbColor == "lightblue")
- return QColor(173, 216, 230);
+ return TQColor(173, 216, 230);
else if(rgbColor == "lightcoral")
- return QColor(240, 128, 128);
+ return TQColor(240, 128, 128);
else if(rgbColor == "lightcyan")
- return QColor(224, 255, 255);
+ return TQColor(224, 255, 255);
else if(rgbColor == "lightgoldenrodyellow")
- return QColor(250, 250, 210);
+ return TQColor(250, 250, 210);
else if(rgbColor == "lightgray")
- return QColor(211, 211, 211);
+ return TQColor(211, 211, 211);
else if(rgbColor == "lightgrey")
- return QColor(211, 211, 211);
+ return TQColor(211, 211, 211);
else if(rgbColor == "lightgreen")
- return QColor(144, 238, 144);
+ return TQColor(144, 238, 144);
else if(rgbColor == "lightpink")
- return QColor(255, 182, 193);
+ return TQColor(255, 182, 193);
else if(rgbColor == "lightsalmon")
- return QColor(255, 160, 122);
+ return TQColor(255, 160, 122);
else if(rgbColor == "lightseagreen")
- return QColor(32, 178, 170);
+ return TQColor(32, 178, 170);
else if(rgbColor == "lightskyblue")
- return QColor(135, 206, 250);
+ return TQColor(135, 206, 250);
else if(rgbColor == "lightslategray")
- return QColor(119, 136, 153);
+ return TQColor(119, 136, 153);
else if(rgbColor == "lightslategrey")
- return QColor(119, 136, 153);
+ return TQColor(119, 136, 153);
else if(rgbColor == "lightsteelblue")
- return QColor(176, 196, 222);
+ return TQColor(176, 196, 222);
else if(rgbColor == "lightyellow")
- return QColor(255, 255, 224);
+ return TQColor(255, 255, 224);
else if(rgbColor == "lime")
- return QColor(0, 255, 0);
+ return TQColor(0, 255, 0);
else if(rgbColor == "limegreen")
- return QColor(50, 205, 50);
+ return TQColor(50, 205, 50);
else if(rgbColor == "linen")
- return QColor(250, 240, 230);
+ return TQColor(250, 240, 230);
else if(rgbColor == "magenta")
- return QColor(255, 0, 255);
+ return TQColor(255, 0, 255);
else if(rgbColor == "maroon")
- return QColor(128, 0, 0);
+ return TQColor(128, 0, 0);
else if(rgbColor == "mediumaquamarine")
- return QColor(102, 205, 170);
+ return TQColor(102, 205, 170);
else if(rgbColor == "mediumblue")
- return QColor(0, 0, 205);
+ return TQColor(0, 0, 205);
else if(rgbColor == "mediumorchid")
- return QColor(186, 85, 211);
+ return TQColor(186, 85, 211);
else if(rgbColor == "mediumpurple")
- return QColor(147, 112, 219);
+ return TQColor(147, 112, 219);
else if(rgbColor == "mediumseagreen")
- return QColor(60, 179, 113);
+ return TQColor(60, 179, 113);
else if(rgbColor == "mediumslateblue")
- return QColor(123, 104, 238);
+ return TQColor(123, 104, 238);
else if(rgbColor == "mediumspringgreen")
- return QColor(0, 250, 154);
+ return TQColor(0, 250, 154);
else if(rgbColor == "mediumturquoise")
- return QColor(72, 209, 204);
+ return TQColor(72, 209, 204);
else if(rgbColor == "mediumvioletred")
- return QColor(199, 21, 133);
+ return TQColor(199, 21, 133);
else if(rgbColor == "midnightblue")
- return QColor(25, 25, 112);
+ return TQColor(25, 25, 112);
else if(rgbColor == "mintcream")
- return QColor(245, 255, 250);
+ return TQColor(245, 255, 250);
else if(rgbColor == "mistyrose")
- return QColor(255, 228, 225);
+ return TQColor(255, 228, 225);
else if(rgbColor == "moccasin")
- return QColor(255, 228, 181);
+ return TQColor(255, 228, 181);
else if(rgbColor == "navajowhite")
- return QColor(255, 222, 173);
+ return TQColor(255, 222, 173);
else if(rgbColor == "navy")
- return QColor(0, 0, 128);
+ return TQColor(0, 0, 128);
else if(rgbColor == "oldlace")
- return QColor(253, 245, 230);
+ return TQColor(253, 245, 230);
else if(rgbColor == "olive")
- return QColor(128, 128, 0);
+ return TQColor(128, 128, 0);
else if(rgbColor == "olivedrab")
- return QColor(107, 142, 35);
+ return TQColor(107, 142, 35);
else if(rgbColor == "orange")
- return QColor(255, 165, 0);
+ return TQColor(255, 165, 0);
else if(rgbColor == "orangered")
- return QColor(255, 69, 0);
+ return TQColor(255, 69, 0);
else if(rgbColor == "orchid")
- return QColor(218, 112, 214);
+ return TQColor(218, 112, 214);
else if(rgbColor == "palegoldenrod")
- return QColor(238, 232, 170);
+ return TQColor(238, 232, 170);
else if(rgbColor == "palegreen")
- return QColor(152, 251, 152);
+ return TQColor(152, 251, 152);
else if(rgbColor == "paleturquoise")
- return QColor(175, 238, 238);
+ return TQColor(175, 238, 238);
else if(rgbColor == "palevioletred")
- return QColor(219, 112, 147);
+ return TQColor(219, 112, 147);
else if(rgbColor == "papayawhip")
- return QColor(255, 239, 213);
+ return TQColor(255, 239, 213);
else if(rgbColor == "peachpuff")
- return QColor(255, 218, 185);
+ return TQColor(255, 218, 185);
else if(rgbColor == "peru")
- return QColor(205, 133, 63);
+ return TQColor(205, 133, 63);
else if(rgbColor == "pink")
- return QColor(255, 192, 203);
+ return TQColor(255, 192, 203);
else if(rgbColor == "plum")
- return QColor(221, 160, 221);
+ return TQColor(221, 160, 221);
else if(rgbColor == "powderblue")
- return QColor(176, 224, 230);
+ return TQColor(176, 224, 230);
else if(rgbColor == "purple")
- return QColor(128, 0, 128);
+ return TQColor(128, 0, 128);
else if(rgbColor == "red")
- return QColor(255, 0, 0);
+ return TQColor(255, 0, 0);
else if(rgbColor == "rosybrown")
- return QColor(188, 143, 143);
+ return TQColor(188, 143, 143);
else if(rgbColor == "royalblue")
- return QColor(65, 105, 225);
+ return TQColor(65, 105, 225);
else if(rgbColor == "saddlebrown")
- return QColor(139, 69, 19);
+ return TQColor(139, 69, 19);
else if(rgbColor == "salmon")
- return QColor(250, 128, 114);
+ return TQColor(250, 128, 114);
else if(rgbColor == "sandybrown")
- return QColor(244, 164, 96);
+ return TQColor(244, 164, 96);
else if(rgbColor == "seagreen")
- return QColor(46, 139, 87);
+ return TQColor(46, 139, 87);
else if(rgbColor == "seashell")
- return QColor(255, 245, 238);
+ return TQColor(255, 245, 238);
else if(rgbColor == "sienna")
- return QColor(160, 82, 45);
+ return TQColor(160, 82, 45);
else if(rgbColor == "silver")
- return QColor(192, 192, 192);
+ return TQColor(192, 192, 192);
else if(rgbColor == "skyblue")
- return QColor(135, 206, 235);
+ return TQColor(135, 206, 235);
else if(rgbColor == "slateblue")
- return QColor(106, 90, 205);
+ return TQColor(106, 90, 205);
else if(rgbColor == "slategray")
- return QColor(112, 128, 144);
+ return TQColor(112, 128, 144);
else if(rgbColor == "slategrey")
- return QColor(112, 128, 144);
+ return TQColor(112, 128, 144);
else if(rgbColor == "snow")
- return QColor(255, 250, 250);
+ return TQColor(255, 250, 250);
else if(rgbColor == "springgreen")
- return QColor(0, 255, 127);
+ return TQColor(0, 255, 127);
else if(rgbColor == "steelblue")
- return QColor(70, 130, 180);
+ return TQColor(70, 130, 180);
else if(rgbColor == "tan")
- return QColor(210, 180, 140);
+ return TQColor(210, 180, 140);
else if(rgbColor == "teal")
- return QColor(0, 128, 128);
+ return TQColor(0, 128, 128);
else if(rgbColor == "thistle")
- return QColor(216, 191, 216);
+ return TQColor(216, 191, 216);
else if(rgbColor == "tomato")
- return QColor(255, 99, 71);
+ return TQColor(255, 99, 71);
else if(rgbColor == "turquoise")
- return QColor(64, 224, 208);
+ return TQColor(64, 224, 208);
else if(rgbColor == "violet")
- return QColor(238, 130, 238);
+ return TQColor(238, 130, 238);
else if(rgbColor == "wheat")
- return QColor(245, 222, 179);
+ return TQColor(245, 222, 179);
else if(rgbColor == "white")
- return QColor(255, 255, 255);
+ return TQColor(255, 255, 255);
else if(rgbColor == "whitesmoke")
- return QColor(245, 245, 245);
+ return TQColor(245, 245, 245);
else if(rgbColor == "yellow")
- return QColor(255, 255, 0);
+ return TQColor(255, 255, 0);
else if(rgbColor == "yellowgreen")
- return QColor(154, 205, 50);
+ return TQColor(154, 205, 50);
}
- return QColor();
+ return TQColor();
}
double KSVGIconPainter::dpi()
@@ -2666,12 +2666,12 @@ double KSVGIconPainter::dpi()
return 90.0; // TODO: make modal?
}
-double KSVGIconPainter::toPixel(const QString &s, bool hmode)
+double KSVGIconPainter::toPixel(const TQString &s, bool hmode)
{
if(s.isEmpty())
return 0.0;
- QString check = s;
+ TQString check = s;
double ret = 0.0;
@@ -2713,69 +2713,69 @@ double KSVGIconPainter::toPixel(const QString &s, bool hmode)
return ret;
}
-ArtGradientLinear *KSVGIconPainter::linearGradient(const QString &id)
+ArtGradientLinear *KSVGIconPainter::linearGradient(const TQString &id)
{
return d->helper->m_linearGradientMap[id];
}
-void KSVGIconPainter::addLinearGradient(const QString &id, ArtGradientLinear *gradient)
+void KSVGIconPainter::addLinearGradient(const TQString &id, ArtGradientLinear *gradient)
{
d->helper->m_linearGradientMap.insert(id, gradient);
}
-QDomElement KSVGIconPainter::linearGradientElement(ArtGradientLinear *linear)
+TQDomElement KSVGIconPainter::linearGradientElement(ArtGradientLinear *linear)
{
return d->helper->m_linearGradientElementMap[linear];
}
-void KSVGIconPainter::addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element)
+void KSVGIconPainter::addLinearGradientElement(ArtGradientLinear *gradient, TQDomElement element)
{
d->helper->m_linearGradientElementMap.insert(gradient, element);
}
-ArtGradientRadial *KSVGIconPainter::radialGradient(const QString &id)
+ArtGradientRadial *KSVGIconPainter::radialGradient(const TQString &id)
{
return d->helper->m_radialGradientMap[id];
}
-void KSVGIconPainter::addRadialGradient(const QString &id, ArtGradientRadial *gradient)
+void KSVGIconPainter::addRadialGradient(const TQString &id, ArtGradientRadial *gradient)
{
d->helper->m_radialGradientMap.insert(id, gradient);
}
-QDomElement KSVGIconPainter::radialGradientElement(ArtGradientRadial *radial)
+TQDomElement KSVGIconPainter::radialGradientElement(ArtGradientRadial *radial)
{
return d->helper->m_radialGradientElementMap[radial];
}
-void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element)
+void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, TQDomElement element)
{
d->helper->m_radialGradientElementMap.insert(gradient, element);
}
-Q_UINT32 KSVGIconPainter::toArtColor(const QColor &color)
+Q_UINT32 KSVGIconPainter::toArtColor(const TQColor &color)
{
return d->helper->toArtColor(color);
}
-QWMatrix KSVGIconPainter::parseTransform(const QString &transform)
+TQWMatrix KSVGIconPainter::parseTransform(const TQString &transform)
{
- QWMatrix result;
+ TQWMatrix result;
// Split string for handling 1 transform statement at a time
- QStringList subtransforms = QStringList::split(')', transform);
- QStringList::ConstIterator it = subtransforms.begin();
- QStringList::ConstIterator end = subtransforms.end();
+ TQStringList subtransforms = TQStringList::split(')', transform);
+ TQStringList::ConstIterator it = subtransforms.begin();
+ TQStringList::ConstIterator end = subtransforms.end();
for(; it != end; ++it)
{
- QStringList subtransform = QStringList::split('(', (*it));
+ TQStringList subtransform = TQStringList::split('(', (*it));
subtransform[0] = subtransform[0].stripWhiteSpace().lower();
subtransform[1] = subtransform[1].simplifyWhiteSpace();
- QRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
+ TQRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
int pos = 0;
- QStringList params;
+ TQStringList params;
while(pos >= 0)
{
diff --git a/kdecore/svgicons/ksvgiconpainter.h b/kdecore/svgicons/ksvgiconpainter.h
index 6617897fc..9061e5570 100644
--- a/kdecore/svgicons/ksvgiconpainter.h
+++ b/kdecore/svgicons/ksvgiconpainter.h
@@ -39,9 +39,9 @@ public:
void setDrawWidth(int dwidth);
void setDrawHeight(int dheight);
- QImage *image();
+ TQImage *image();
- QWMatrix *worldMatrix();
+ TQWMatrix *worldMatrix();
void finish();
@@ -49,49 +49,49 @@ public:
void setUseStroke(bool stroke);
void setStrokeWidth(double width);
- void setStrokeMiterLimit(const QString &miter);
- void setCapStyle(const QString &cap);
- void setJoinStyle(const QString &join);
- void setStrokeColor(const QString &stroke);
- void setFillColor(const QString &fill);
- void setFillRule(const QString &fillRule);
- void setOpacity(const QString &opacity);
- void setFillOpacity(const QString &fillOpacity);
- void setStrokeOpacity(const QString &strokeOpacity);
- void setStrokeDashOffset(const QString &dashOffset);
- void setStrokeDashArray(const QString &dashes);
-
- void setWorldMatrix(QWMatrix *worldMatrix);
+ void setStrokeMiterLimit(const TQString &miter);
+ void setCapStyle(const TQString &cap);
+ void setJoinStyle(const TQString &join);
+ void setStrokeColor(const TQString &stroke);
+ void setFillColor(const TQString &fill);
+ void setFillRule(const TQString &fillRule);
+ void setOpacity(const TQString &opacity);
+ void setFillOpacity(const TQString &fillOpacity);
+ void setStrokeOpacity(const TQString &strokeOpacity);
+ void setStrokeDashOffset(const TQString &dashOffset);
+ void setStrokeDashArray(const TQString &dashes);
+
+ void setWorldMatrix(TQWMatrix *worldMatrix);
void setClippingRect(int x, int y, int w, int h);
void drawRectangle(double x, double y, double w, double h, double rx, double ry);
void drawEllipse(double cx, double cy, double rx, double ry);
void drawLine(double x1, double y1, double x2, double y2);
- void drawPolyline(QPointArray polyArray, int points = -1);
- void drawPolygon(QPointArray polyArray);
- void drawPath(const QString &data, bool fill);
- void drawImage(double x, double y, QImage &image);
+ void drawPolyline(TQPointArray polyArray, int points = -1);
+ void drawPolygon(TQPointArray polyArray);
+ void drawPath(const TQString &data, bool fill);
+ void drawImage(double x, double y, TQImage &image);
- QColor parseColor(const QString &param);
- Q_UINT32 toArtColor(const QColor &color);
- Q_UINT32 parseOpacity(const QString &data);
+ TQColor parseColor(const TQString &param);
+ Q_UINT32 toArtColor(const TQColor &color);
+ Q_UINT32 parseOpacity(const TQString &data);
- double toPixel(const QString &s, bool hmode);
+ double toPixel(const TQString &s, bool hmode);
double dpi();
- ArtGradientLinear *linearGradient(const QString &id);
- void addLinearGradient(const QString &id, ArtGradientLinear *gradient);
+ ArtGradientLinear *linearGradient(const TQString &id);
+ void addLinearGradient(const TQString &id, ArtGradientLinear *gradient);
- QDomElement linearGradientElement(ArtGradientLinear *linear);
- void addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element);
+ TQDomElement linearGradientElement(ArtGradientLinear *linear);
+ void addLinearGradientElement(ArtGradientLinear *gradient, TQDomElement element);
- ArtGradientRadial *radialGradient(const QString &id);
- void addRadialGradient(const QString &id, ArtGradientRadial *gradient);
+ ArtGradientRadial *radialGradient(const TQString &id);
+ void addRadialGradient(const TQString &id, ArtGradientRadial *gradient);
- QDomElement radialGradientElement(ArtGradientRadial *radial);
- void addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element);
+ TQDomElement radialGradientElement(ArtGradientRadial *radial);
+ void addRadialGradientElement(ArtGradientRadial *gradient, TQDomElement element);
- QWMatrix parseTransform(const QString &transform);
+ TQWMatrix parseTransform(const TQString &transform);
private:
struct Private;
diff --git a/kdecore/tests/KIDLTest.cpp b/kdecore/tests/KIDLTest.cpp
index 89e2142fc..a763f85c8 100644
--- a/kdecore/tests/KIDLTest.cpp
+++ b/kdecore/tests/KIDLTest.cpp
@@ -3,17 +3,17 @@
#include <kapplication.h>
#include <dcopclient.h>
-KIDLTest::KIDLTest( const QCString& id )
+KIDLTest::KIDLTest( const TQCString& id )
: DCOPObject( id )
{
}
-QString KIDLTest::hello( const QString& name )
+TQString KIDLTest::hello( const TQString& name )
{
qDebug("Du heter %s", name.latin1() );
qDebug("Ha det %s", name.latin1() );
- return QString("Jeg heter KIDLTest");
+ return TQString("Jeg heter KIDLTest");
}
int main( int argc, char** argv )
diff --git a/kdecore/tests/KIDLTest.h b/kdecore/tests/KIDLTest.h
index f0c4aaefd..6955bb6ca 100644
--- a/kdecore/tests/KIDLTest.h
+++ b/kdecore/tests/KIDLTest.h
@@ -7,10 +7,10 @@ class KIDLTest : virtual public DCOPObject
{
K_DCOP
public:
- KIDLTest( const QCString& id );
+ KIDLTest( const TQCString& id );
k_dcop:
- virtual QString hello( const QString& name );
+ virtual TQString hello( const TQString& name );
};
#endif
diff --git a/kdecore/tests/KIDLTestClient.cpp b/kdecore/tests/KIDLTestClient.cpp
index 0b9e45768..21125bff5 100644
--- a/kdecore/tests/KIDLTestClient.cpp
+++ b/kdecore/tests/KIDLTestClient.cpp
@@ -12,6 +12,6 @@ int main( int argc, char** argv )
KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" );
- QString ret = t->hello("Torben");
+ TQString ret = t->hello("Torben");
qDebug("Server says: %s", ret.latin1() );
}
diff --git a/kdecore/tests/cplusplustest.cpp b/kdecore/tests/cplusplustest.cpp
index 387dac014..1f789fea7 100644
--- a/kdecore/tests/cplusplustest.cpp
+++ b/kdecore/tests/cplusplustest.cpp
@@ -16,15 +16,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqdict.h>
class A { int foo; };
class B { int bar; };
class C : public A, public B { int foobar; };
-QDict<A> dictA;
-QDict<B> dictB;
+TQDict<A> dictA;
+TQDict<B> dictB;
int main(int , char *[])
{
diff --git a/kdecore/tests/dcopkonqtest.cpp b/kdecore/tests/dcopkonqtest.cpp
index 95dd726e3..8830d34c7 100644
--- a/kdecore/tests/dcopkonqtest.cpp
+++ b/kdecore/tests/dcopkonqtest.cpp
@@ -9,12 +9,12 @@ int main( int argc, char** argv )
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
- QByteArray data;
+ TQByteArray data;
kdDebug() << "sending reparseConfiguration to object KonquerorIface in konqueror" << endl;
- QByteArray snd;
- QByteArray rcv;
- QCString _type_;
+ TQByteArray snd;
+ TQByteArray rcv;
+ TQCString _type_;
kapp->dcopClient()->call( "konqueror", "KonquerorIface", "reparseConfiguration()", snd, _type_, rcv );
kdDebug() << _type_ << endl;
if( _type_ != "void" ) kdDebug() << "void expected, " << _type_.data() << " returned" << endl;
diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp
index 18b4fc297..51a40b892 100644
--- a/kdecore/tests/kcalendartest.cpp
+++ b/kdecore/tests/kcalendartest.cpp
@@ -5,7 +5,7 @@
#include "kcalendarsystemfactory.h"
#include "kcalendarsystem.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -16,7 +16,7 @@
class KLocale;
-void test(QDate & date);
+void test(TQDate & date);
static const char description[] = "KCalendarTest";
@@ -29,8 +29,8 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv) {
- QDate date;
- QString calType, option;
+ TQDate date;
+ TQString calType, option;
KAboutData aboutData( "kcalendartest", "KCalendarTest" ,
"0.1", description, KAboutData::License_GPL,
@@ -46,9 +46,9 @@ int main(int argc, char **argv) {
KApplication app(false, false);
- QStringList lst = KCalendarSystemFactory::calendarSystems();
+ TQStringList lst = KCalendarSystemFactory::calendarSystems();
kdDebug() << "Supported calendar types: " << endl;
- for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
+ for (TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
kdDebug() << *it << endl;
kdDebug() << endl;
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
option = args->getOption("date");
date = KGlobal::locale()->readDate(option);
} else
- date = QDate::currentDate();
+ date = TQDate::currentDate();
args->clear(); // Free up some memory.
@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
}
-void test(QDate & date) {
+void test(TQDate & date) {
kdDebug() << "(KLocale) readDate" << endl;
diff --git a/kdecore/tests/kcharsetstest.cpp b/kdecore/tests/kcharsetstest.cpp
index de281d3d9..09b9486c0 100644
--- a/kdecore/tests/kcharsetstest.cpp
+++ b/kdecore/tests/kcharsetstest.cpp
@@ -5,8 +5,8 @@
int main()
{
- QString input( "&lt;Hello &amp;World&gt;" );
- QString output = KCharsets::resolveEntities( input );
+ TQString input( "&lt;Hello &amp;World&gt;" );
+ TQString output = KCharsets::resolveEntities( input );
assert( output == "<Hello &World>" );
return 0;
}
diff --git a/kdecore/tests/kcmdlineargstest.cpp b/kdecore/tests/kcmdlineargstest.cpp
index 2d6c7ecd2..0ad9807c9 100644
--- a/kdecore/tests/kcmdlineargstest.cpp
+++ b/kdecore/tests/kcmdlineargstest.cpp
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
}
// Read the value of an option.
- QCString baudrate = args->getOption("baud"); // 9600 is the default value.
+ TQCString baudrate = args->getOption("baud"); // 9600 is the default value.
printf("Baudrate = %s\n", baudrate.data());
diff --git a/kdecore/tests/kconfigtest.cpp b/kdecore/tests/kconfigtest.cpp
index 5ec4c309f..1842b5036 100644
--- a/kdecore/tests/kconfigtest.cpp
+++ b/kdecore/tests/kconfigtest.cpp
@@ -44,11 +44,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
#define STRINGENTRY5 " "
#define STRINGENTRY6 ""
#define LOCAL8BITENTRY "Hello äöü"
-#define POINTENTRY QPoint( 4351, 1235 )
-#define SIZEENTRY QSize( 10, 20 )
-#define RECTENTRY QRect( 10, 23, 5321, 13 )
-#define DATETIMEENTRY QDateTime( QDate( 2002, 06, 23 ), QTime( 12, 55, 40 ) )
-#define STRINGLISTENTRY QStringList( "Hello," )
+#define POINTENTRY TQPoint( 4351, 1235 )
+#define SIZEENTRY TQSize( 10, 20 )
+#define RECTENTRY TQRect( 10, 23, 5321, 13 )
+#define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) )
+#define STRINGLISTENTRY TQStringList( "Hello," )
void KConfigTest::writeConfigFile()
{
@@ -62,7 +62,7 @@ void KConfigTest::writeConfigFile()
sc.writeEntry( "boolEntry1", BOOLENTRY1 );
sc.writeEntry( "boolEntry2", BOOLENTRY2 );
- sc.writeEntry( "Test", QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ sc.writeEntry( "Test", TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
sc.writeEntry( "Test2", "");
sc.writeEntry( "stringEntry1", STRINGENTRY1 );
sc.writeEntry( "stringEntry2", STRINGENTRY2 );
@@ -119,29 +119,29 @@ void KConfigTest::allTests()
sc2.setGroup("AAA");
CHECK( sc2.hasKey( "stringEntry1" ), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
CHECK( sc2.entryIsImmutable("stringEntry1"), bImmutable );
CHECK( sc2.hasKey( "stringEntry2" ), false );
- CHECK( sc2.readEntry( "stringEntry2", "bla" ), QString( "bla" ) );
+ CHECK( sc2.readEntry( "stringEntry2", "bla" ), TQString( "bla" ) );
CHECK( sc2.hasDefault( "stringEntry1" ), false );
sc2.setGroup("Hello");
- CHECK( sc2.readEntry( "Test" ), QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ CHECK( sc2.readEntry( "Test" ), TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
CHECK( sc2.readEntry("Test2", "Fietsbel").isEmpty(), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
- CHECK( sc2.readEntry( "stringEntry2" ), QString( STRINGENTRY2 ) );
- CHECK( sc2.readEntry( "stringEntry3" ), QString( STRINGENTRY3 ) );
- CHECK( sc2.readEntry( "stringEntry4" ), QString( STRINGENTRY4 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry2" ), TQString( STRINGENTRY2 ) );
+ CHECK( sc2.readEntry( "stringEntry3" ), TQString( STRINGENTRY3 ) );
+ CHECK( sc2.readEntry( "stringEntry4" ), TQString( STRINGENTRY4 ) );
CHECK( sc2.hasKey( "stringEntry5" ), false);
- CHECK( sc2.readEntry( "stringEntry5", "test" ), QString( "test" ) );
+ CHECK( sc2.readEntry( "stringEntry5", "test" ), TQString( "test" ) );
CHECK( sc2.hasKey( "stringEntry6" ), false);
- CHECK( sc2.readEntry( "stringEntry6", "foo" ), QString( "foo" ) );
+ CHECK( sc2.readEntry( "stringEntry6", "foo" ), TQString( "foo" ) );
CHECK( sc2.readBoolEntry( "boolEntry1" ), BOOLENTRY1 );
CHECK( sc2.readBoolEntry( "boolEntry2" ), BOOLENTRY2 );
#if 0
- QString s;
+ TQString s;
s = sc2.readEntry( "keywith=equalsign" );
fprintf(stderr, "comparing keywith=equalsign %s with %s -> ", STRINGENTRY1, s.latin1());
if (s == STRINGENTRY1)
diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp
index 6dbf98e52..abd476396 100644
--- a/kdecore/tests/kconfigtestgui.cpp
+++ b/kdecore/tests/kconfigtestgui.cpp
@@ -30,19 +30,19 @@
#include <unistd.h>
#include <stdlib.h>
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
#include <config.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kconfig.h>
@@ -59,8 +59,8 @@
// Construct the KConfigTestView with buttons
//
-KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
- : QDialog( parent, name ),
+KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
+ : TQDialog( parent, name ),
pConfig( 0L ),
pFile( 0L ),
pStream( 0L )
@@ -70,61 +70,61 @@ KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
setCaption( "KConfig test" );
// Label and edit for the app config file
- pAppFileLabel = new QLabel( this, "appconfiglabel" );
+ pAppFileLabel = new TQLabel( this, "appconfiglabel" );
pAppFileLabel->setText( "Application config file:" );
pAppFileLabel->setGeometry( 20, 20, 200, 20 );
- pAppFileEdit = new QLineEdit( this, "appconfigedit" );
+ pAppFileEdit = new TQLineEdit( this, "appconfigedit" );
pAppFileEdit->setGeometry( 240, 20, 160, 20 );
- connect( pAppFileEdit, SIGNAL(returnPressed()),
- SLOT(appConfigEditReturnPressed()));
+ connect( pAppFileEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(appConfigEditReturnPressed()));
// Label and edit for the group
- pGroupLabel = new QLabel( this, "grouplabel" );
+ pGroupLabel = new TQLabel( this, "grouplabel" );
pGroupLabel->setText( "Group:" );
pGroupLabel->setGeometry( 20, 60, 80, 20 );
- pGroupEdit = new QLineEdit( this, "groupedit" );
+ pGroupEdit = new TQLineEdit( this, "groupedit" );
pGroupEdit->setGeometry( 120, 60, 100, 20 );
- connect( pGroupEdit, SIGNAL(returnPressed()),
- SLOT(groupEditReturnPressed()));
+ connect( pGroupEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(groupEditReturnPressed()));
// Edit and label for the key/value pair
- pKeyEdit = new QLineEdit( this, "keyedit" );
+ pKeyEdit = new TQLineEdit( this, "keyedit" );
pKeyEdit->setGeometry( 20, 100, 80, 20 );
- connect( pKeyEdit, SIGNAL( returnPressed()),
- SLOT(keyEditReturnPressed()));
+ connect( pKeyEdit, TQT_SIGNAL( returnPressed()),
+ TQT_SLOT(keyEditReturnPressed()));
- pEqualsLabel = new QLabel( this, "equalslabel" );
+ pEqualsLabel = new TQLabel( this, "equalslabel" );
pEqualsLabel->setGeometry( 105, 100, 20, 20 );
pEqualsLabel->setText( "=" );
- pValueEdit = new QLineEdit( this, "valueedit" );
+ pValueEdit = new TQLineEdit( this, "valueedit" );
pValueEdit->setGeometry( 120, 100, 100, 20 );
pValueEdit->setText( "---" );
- pWriteButton = new QPushButton( this, "writebutton" );
+ pWriteButton = new TQPushButton( this, "writebutton" );
pWriteButton->setGeometry( 20,140, 80, 20 );
pWriteButton->setText( "Write entry" );
- connect( pWriteButton, SIGNAL(clicked()), SLOT( writeButtonClicked() ) );
+ connect( pWriteButton, TQT_SIGNAL(clicked()), TQT_SLOT( writeButtonClicked() ) );
// Labels for the info line
- pInfoLabel1 = new QLabel( this, "infolabel1" );
+ pInfoLabel1 = new TQLabel( this, "infolabel1" );
pInfoLabel1->setGeometry( 20, 200, 60, 20 );
pInfoLabel1->setText( "Info:" );
- pInfoLabel2 = new QLabel( this, "infolabel2" );
+ pInfoLabel2 = new TQLabel( this, "infolabel2" );
pInfoLabel2->setGeometry( 100, 200, 300, 20 );
- pInfoLabel2->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ pInfoLabel2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// Quit button
- pQuitButton = new QPushButton( this, "quitbutton" );
+ pQuitButton = new TQPushButton( this, "quitbutton" );
pQuitButton->setText( "Quit" );
pQuitButton->setGeometry( 340, 60, 60, 60 );
- connect( pQuitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
+ connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) );
// create a default KConfig object in order to be able to start right away
- pConfig = new KConfig( QString::null );
+ pConfig = new KConfig( TQString::null );
}
KConfigTestView::~KConfigTestView()
@@ -156,15 +156,15 @@ void KConfigTestView::groupEditReturnPressed()
pConfig->setGroup( pGroupEdit->text() );
// according to the Qt doc, this is begging for trouble, but for a
// test program this will do
- QString aText;
- aText.sprintf( "Group set to %s", QString( pConfig->group() ).isEmpty() ?
- QString("<default>").ascii() : pConfig->group().ascii() );
+ TQString aText;
+ aText.sprintf( "Group set to %s", TQString( pConfig->group() ).isEmpty() ?
+ TQString("<default>").ascii() : pConfig->group().ascii() );
pInfoLabel2->setText( aText );
}
void KConfigTestView::keyEditReturnPressed()
{
- QString aValue = pConfig->readEntry( pKeyEdit->text() );
+ TQString aValue = pConfig->readEntry( pKeyEdit->text() );
// just checking aValue.isNull() would be easier here, but this is
// to demonstrate the HasKey()-method. Besides, it is better data
// encapsulation because we do not make any assumption about coding
@@ -183,7 +183,7 @@ void KConfigTestView::keyEditReturnPressed()
void KConfigTestView::writeButtonClicked()
{
- pConfig->writeEntry( pKeyEdit->text(), QString( pValueEdit->text() ) );
+ pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) );
pInfoLabel2->setText( "Entry written" );
kdDebug() << "Entry written: " << 27 << endl;
diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h
index e293000f5..8311952b5 100644
--- a/kdecore/tests/kconfigtestgui.h
+++ b/kdecore/tests/kconfigtestgui.h
@@ -20,18 +20,18 @@
#define _KCONFIG_TEST_H
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
@@ -43,7 +43,7 @@ class KConfigTestView : public QDialog
{
Q_OBJECT
public:
- KConfigTestView( QWidget *parent=0, const char *name=0 );
+ KConfigTestView( TQWidget *parent=0, const char *name=0 );
~KConfigTestView();
private slots:
@@ -53,20 +53,20 @@ private slots:
void writeButtonClicked();
private:
- QLabel* pAppFileLabel;
- QLineEdit* pAppFileEdit;
- QLabel* pGroupLabel;
- QLineEdit* pGroupEdit;
- QLineEdit* pKeyEdit;
- QLabel* pEqualsLabel;
- QLineEdit* pValueEdit;
- QPushButton* pWriteButton;
- QLabel* pInfoLabel1, *pInfoLabel2;
- QPushButton* pQuitButton;
+ TQLabel* pAppFileLabel;
+ TQLineEdit* pAppFileEdit;
+ TQLabel* pGroupLabel;
+ TQLineEdit* pGroupEdit;
+ TQLineEdit* pKeyEdit;
+ TQLabel* pEqualsLabel;
+ TQLineEdit* pValueEdit;
+ TQPushButton* pWriteButton;
+ TQLabel* pInfoLabel1, *pInfoLabel2;
+ TQPushButton* pQuitButton;
KConfig* pConfig;
- QFile* pFile;
- QTextStream* pStream;
+ TQFile* pFile;
+ TQTextStream* pStream;
};
#endif
diff --git a/kdecore/tests/kdebugtest.cpp b/kdecore/tests/kdebugtest.cpp
index d97fb671b..ee49127ea 100644
--- a/kdecore/tests/kdebugtest.cpp
+++ b/kdecore/tests/kdebugtest.cpp
@@ -1,27 +1,27 @@
#include "kdebug.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kinstance.h>
#include <iostream>
-#include <qapplication.h>
-#include <qpen.h>
-#include <qvariant.h>
+#include <tqapplication.h>
+#include <tqpen.h>
+#include <tqvariant.h>
class TestWidget : public QWidget
{
public:
- TestWidget(QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TestWidget(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
kdDebug().form("mytest %s", "hello") << endl;
- QString test = "%20C this is a string";
+ TQString test = "%20C this is a string";
kdDebug(150) << test << endl;
- QCString cstr = test.latin1();
+ TQCString cstr = test.latin1();
kdDebug(150) << test << endl;
- QChar ch = 'a';
- kdDebug() << "QChar a: " << ch << endl;
+ TQChar ch = 'a';
+ kdDebug() << "TQChar a: " << ch << endl;
ch = '\r';
- kdDebug() << "QChar \\r: " << ch << endl;
+ kdDebug() << "TQChar \\r: " << ch << endl;
kdDebug() << k_lineinfo << "error on this line" << endl;
kdDebug(2 == 2) << "this is right " << perror << endl;
kdDebug() << "Before instance creation" << endl;
@@ -32,42 +32,42 @@ public:
// kdDebug() << "This number should come out as appname " << 5 << " " << "test" << endl;
kdWarning() << "1+1 = " << 1+1+1 << endl;
kdError(1+1 != 2) << "there is something really odd!" << endl;
- QString s = "mystring";
+ TQString s = "mystring";
kdDebug() << s << endl;
kdError(1202) << "Error !!!" << endl;
kdError() << "Error with no area" << endl;
- kdDebug() << "Printing a null QWidget pointer: " << (QWidget*)0 << endl;
+ kdDebug() << "Printing a null TQWidget pointer: " << (TQWidget*)0 << endl;
kdDebug() << "char " << '^' << " " << char(26) << endl;
- QPoint p(0,9);
+ TQPoint p(0,9);
kdDebug() << p << endl;
- QRect r(9,12,58,234);
+ TQRect r(9,12,58,234);
kdDebug() << r << endl;
- QRegion reg(r);
- reg += QRect(1,60,200,59);
+ TQRegion reg(r);
+ reg += TQRect(1,60,200,59);
kdDebug() << reg << endl;
- QStringList sl;
+ TQStringList sl;
sl << "hi" << "this" << "list" << "is" << "short";
kdDebug() << sl << endl;
- QValueList<int> il;
- kdDebug() << "Empty QValueList<int>: " << il << endl;
+ TQValueList<int> il;
+ kdDebug() << "Empty TQValueList<int>: " << il << endl;
il << 1 << 2 << 3 << 4 << 5;
- kdDebug() << "QValueList<int> filled: " << il << endl;
+ kdDebug() << "TQValueList<int> filled: " << il << endl;
Q_LLONG big = 65536LL*65536*500;
kdDebug() << big << endl;
- QVariant v( 0.12345 );
+ TQVariant v( 0.12345 );
kdDebug() << "Variant: " << v << endl;
- v = QPen( Qt::red );
+ v = TQPen( Qt::red );
kdDebug() << "Variant: " << v << endl;
- QByteArray data( 6 );
+ TQByteArray data( 6 );
data[0] = 42;
data[1] = 'H';
data[2] = 'e';
@@ -79,7 +79,7 @@ public:
data.fill( 42 );
kdDebug() << data << endl;
}
- void resizeEvent(QResizeEvent*)
+ void resizeEvent(TQResizeEvent*)
{
kdDebug() << this << endl;
}
@@ -87,7 +87,7 @@ public:
int main(int argc, char** argv)
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
TestWidget widget(0, "NoNameWidget");
widget.setGeometry(45, 54, 120, 80);
widget.show();
diff --git a/kdecore/tests/kglobaltest.cpp b/kdecore/tests/kglobaltest.cpp
index 90332e3e6..d03be209e 100644
--- a/kdecore/tests/kglobaltest.cpp
+++ b/kdecore/tests/kglobaltest.cpp
@@ -8,12 +8,12 @@
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kiconloadertest.cpp b/kdecore/tests/kiconloadertest.cpp
index 77930218c..96a7a6813 100644
--- a/kdecore/tests/kiconloadertest.cpp
+++ b/kdecore/tests/kiconloadertest.cpp
@@ -1,5 +1,5 @@
#include <kiconloader.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#include <kapplication.h>
#include <stdlib.h>
@@ -11,16 +11,16 @@ int main(int argc, char *argv[])
KIconLoader * mpLoader = KGlobal::iconLoader();
KIcon::Context mContext = KIcon::Application;
- QTime dt;
+ TQTime dt;
dt.start();
int count = 0;
for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
{
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
- QStringList filelist=mpLoader->queryIcons(mGroup, mContext);
+ TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
kdDebug() << " -> found " << filelist.count() << " icons." << endl;
int i=0;
- for(QStringList::Iterator it = filelist.begin();
+ for(TQStringList::Iterator it = filelist.begin();
it != filelist.end() /*&& i<10*/;
++it, ++i )
{
diff --git a/kdecore/tests/kipctest.cpp b/kdecore/tests/kipctest.cpp
index 15daa24d9..136aa6d70 100644
--- a/kdecore/tests/kipctest.cpp
+++ b/kdecore/tests/kipctest.cpp
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kapplication.h>
#include <kipc.h>
#include "kipctest.h"
MyObject::MyObject()
- : QObject(0L, "testobj")
+ : TQObject(0L, "testobj")
{
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(slotPaletteChanged()));
- connect(kapp, SIGNAL(kdisplayFontChanged()), SLOT(slotFontChanged()));
- connect(kapp, SIGNAL(kdisplayStyleChanged()), SLOT(slotStyleChanged()));
- connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)));
- connect(kapp, SIGNAL(appearanceChanged()), SLOT(slotAppearanceChanged()));
- connect(kapp, SIGNAL(kipcMessage(int,int)), SLOT(slotMessage(int,int)));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(slotFontChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
+ connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotAppearanceChanged()));
+ connect(kapp, TQT_SIGNAL(kipcMessage(int,int)), TQT_SLOT(slotMessage(int,int)));
}
int main(int argc, char **argv)
diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h
index 5a9a18467..a8abd2e76 100644
--- a/kdecore/tests/kipctest.h
+++ b/kdecore/tests/kipctest.h
@@ -1,7 +1,7 @@
#ifndef __blah__h__
#define __blah__h__
-#include <qobject.h>
+#include <tqobject.h>
class MyObject: public QObject
{
diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp
index acec373de..a980359b0 100644
--- a/kdecore/tests/klocaletest.cpp
+++ b/kdecore/tests/klocaletest.cpp
@@ -8,8 +8,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qdatetime.h>
-#include <qlabel.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
#include <kglobal.h>
#include <kglobalsettings.h>
@@ -20,12 +20,12 @@
#include "klocaletest.h"
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -36,7 +36,7 @@ bool check(QString txt, QString a, QString b)
return true;
}
-bool checkDate(QString txt, QDate a, QDate b)
+bool checkDate(TQString txt, TQDate a, TQDate b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a.toString() << "' against expected value '" << b.toString() << "'... " << "ok" << endl;
@@ -48,12 +48,12 @@ bool checkDate(QString txt, QDate a, QDate b)
return true;
}
-Test::Test( QWidget *parent, const char *name )
- : QWidget( parent, name )
+Test::Test( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setCaption("Testing KLocale");
- QWidget *d = qApp->desktop();
+ TQWidget *d = qApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
createFields();
@@ -67,7 +67,7 @@ Test::~Test()
void Test::createFields()
{
- QString string;
+ TQString string;
string+="Selected languages: ";
string+=KGlobal::locale()->languages()+"\n";
@@ -77,21 +77,21 @@ void Test::createFields()
string+="Used language: ";
string+=KGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=QString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
string+="\nLocalized monetary numbers: ";
string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
- string+=QString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
- string+=QString::fromLatin1("No = ")+i18n("No")+"\n";
- string+=QString::fromLatin1("Help = ")+i18n("Help")+"\n";
- string+=QString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
+ string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
+ string+=TQString::fromLatin1("No = ")+i18n("No")+"\n";
+ string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n";
+ string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
- label=new QLabel(string,this,"Label");
+ label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
label->setFont(KGlobalSettings::generalFont());
label->show();
@@ -102,11 +102,11 @@ int main( int argc, char ** argv )
KLocale::setMainCatalogue("kdelibs");
KApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(QString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(QString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(QString::fromLatin1(","));
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
+ KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
+ KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
- QString formatted;
+ TQString formatted;
formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
@@ -139,7 +139,7 @@ int main( int argc, char ** argv )
num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
- qDebug( "%s", QString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
+ qDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
KLocale locale(*KGlobal::locale());
@@ -149,18 +149,18 @@ int main( int argc, char ** argv )
num = locale.readMoney("-1,234,567.89$$", &ok);
check("readMoney(-1,234,567.89$$)",ok?"yes":"no","yes");
- QDate date;
+ TQDate date;
date.setYMD( 2002, 5, 3 );
checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- date = QDate::currentDate();
- checkDate("readDate( QDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ date = TQDate::currentDate();
+ checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- QTime time;
+ TQTime time;
time = KGlobal::locale()->readTime( "11:22:33", &ok );
- check("readTime(\"11:22:33\")", (ok && time == QTime(11, 22, 33)) ?
+ check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "11:22", &ok );
- check("readTime(\"11:22\")", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "foo", &ok );
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
@@ -170,23 +170,23 @@ int main( int argc, char ** argv )
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
- check("readTime(\"11:22\", WithoutSeconds)", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
KGlobal::locale()->setTimeFormat( "%H:%M %p" );
- time = QTime( 0, 22, 33 );
- QString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
+ time = TQTime( 0, 22, 33 );
+ TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" );
timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("C"));
- kdDebug() << "C: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("de"));
- kdDebug() << "de: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
Test m;
diff --git a/kdecore/tests/klocaletest.h b/kdecore/tests/klocaletest.h
index 7b6cb328e..ad24a75cd 100644
--- a/kdecore/tests/klocaletest.h
+++ b/kdecore/tests/klocaletest.h
@@ -3,7 +3,7 @@
#ifndef KLOCALETEST_H
#define KLOCALETEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
@@ -18,15 +18,15 @@ public:
//@{
/** Constructor
*/
- Test( QWidget *parent=0, const char *name=0 );
+ Test( TQWidget *parent=0, const char *name=0 );
/** Destructor
*/
~Test();
private:
- QString showLocale(QString cat);
+ TQString showLocale(TQString cat);
void createFields();
- QLabel *label;
+ TQLabel *label;
};
#endif // TEST_H
diff --git a/kdecore/tests/kmacroexpandertest.cpp b/kdecore/tests/kmacroexpandertest.cpp
index 6c92ba935..0c41a309b 100644
--- a/kdecore/tests/kmacroexpandertest.cpp
+++ b/kdecore/tests/kmacroexpandertest.cpp
@@ -6,12 +6,12 @@
#include <stdlib.h>
-bool check(QString txt, QString s, QString a, QString b)
+bool check(TQString txt, TQString s, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b)
kdDebug() << txt << " (" << s << ") : '" << a << "' - ok" << endl;
else {
@@ -25,10 +25,10 @@ class MyCExpander : public KCharMacroExpander {
public:
MyCExpander() : KCharMacroExpander() {}
protected:
- bool expandMacro(QChar chr, QStringList &ret)
+ bool expandMacro(TQChar chr, TQStringList &ret)
{
if (chr == 'm') {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -39,10 +39,10 @@ class MyWExpander : public KWordMacroExpander {
public:
MyWExpander() : KWordMacroExpander() {}
protected:
- bool expandMacro(const QString &str, QStringList &ret)
+ bool expandMacro(const TQString &str, TQStringList &ret)
{
if (str == "macro") {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -53,11 +53,11 @@ int main(int argc, char *argv[])
{
KCmdLineArgs::init(argc, argv, ":", "", "", "");
KApplication app(false,false);
- QString s, s2;
+ TQString s, s2;
- QMap<QChar,QStringList> map1;
+ TQMap<TQChar,TQStringList> map1;
map1.insert('n', "Restaurant \"Chew It\"");
- QStringList li;
+ TQStringList li;
li << "element1" << "'element2'";
map1.insert('l', li);
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
s = "text \"%l %n\" text";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map1), "text \"element1 'element2' Restaurant \\\"Chew It\\\"\" text");
- QMap<QChar,QString> map;
+ TQMap<TQChar,TQString> map;
map.insert('a', "%n");
map.insert('f', "filename.txt");
map.insert('u', "http://www.kde.org/index.html");
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
s = "kedit --caption \"`echo %n`\" %f";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"$( echo 'Restaurant `echo hello`')\" 'filename.txt'");
- QMap<QString,QString> smap;
+ TQMap<TQString,TQString> smap;
smap.insert("foo", "%n");
smap.insert("file", "filename.txt");
smap.insert("url", "http://www.kde.org/index.html");
diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp
index 1156f03f2..243d0d289 100644
--- a/kdecore/tests/kmdcodectest.cpp
+++ b/kdecore/tests/kmdcodectest.cpp
@@ -23,8 +23,8 @@
#include <iostream>
-#include <qbuffer.h>
-#include <qfile.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
@@ -57,7 +57,7 @@ void MD5_verify (const char*, const char*, bool);
void MD5_file (const char * , bool rawOutput = false);
void MD5_string (const char *, const char *expected = 0, bool rawOutput = false);
-long readContent (const QFile& f, long count, QByteArray& buf)
+long readContent (const TQFile& f, long count, TQByteArray& buf)
{
long result;
int old_size;
@@ -85,14 +85,14 @@ long readContent (const QFile& f, long count, QByteArray& buf)
void testCodec (const char* msg, Codec type, bool isFile)
{
- QByteArray output;
+ TQByteArray output;
if ( isFile )
{
int count;
- QByteArray data;
+ TQByteArray data;
- QFile f (QFile::encodeName(msg));
+ TQFile f (TQFile::encodeName(msg));
if (!f.exists())
{
@@ -147,12 +147,12 @@ void testCodec (const char* msg, Codec type, bool isFile)
break;
}
- QCString result (output.data(), output.size()+1);
+ TQCString result (output.data(), output.size()+1);
cout << "Result: " << endl << result << endl;
}
else
{
- QCString result;
+ TQCString result;
const size_t len = strlen(msg);
output.resize(len);
@@ -246,13 +246,13 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
if ( !isFile )
{
- context.update (QCString(input));
+ context.update (TQCString(input));
result = context.verify( digest );
cout << "Input string: " << input << endl;
}
else
{
- QFile f (input);
+ TQFile f (input);
if (!f.open (IO_ReadOnly))
{
@@ -273,7 +273,7 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
void MD5_file (const char *filename, bool rawOutput )
{
- QFile f (QFile::encodeName(filename));
+ TQFile f (TQFile::encodeName(filename));
if (!f.open(IO_ReadOnly))
{
@@ -296,7 +296,7 @@ void MD5_file (const char *filename, bool rawOutput )
void MD5_string (const char *input, const char* expected, bool rawOutput )
{
KMD5 context;
- context.update (QCString(input));
+ context.update (TQCString(input));
cout << "Checking MD5 for: " << input << endl;
@@ -372,7 +372,7 @@ int main (int argc, char *argv[])
{
const char* opt = args->getOption( "c" ).data();
for ( int i=0 ; i < count; i++ )
- MD5_verify ( QCString(args->arg(i)), opt, (isString || !isFile) );
+ MD5_verify ( TQCString(args->arg(i)), opt, (isString || !isFile) );
}
else
{
diff --git a/kdecore/tests/kprocesstest.cpp b/kdecore/tests/kprocesstest.cpp
index 79769a90d..af04cd421 100644
--- a/kdecore/tests/kprocesstest.cpp
+++ b/kdecore/tests/kprocesstest.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
//
p1 << "kghostview";
- QObject::connect(&p1, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
printf("starting kghostview blocking (close to continue)\n");
p1.start(KProcess::Block);
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
printf("Starting konsole with /bin/tcsh as shell (close to continue)\n");
p2 << "konsole" << "-e" << "/bin/tcsh";
p2.setWorkingDirectory("/tmp");
- QObject::connect(&p2, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p2, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
p2.start(KProcess::Block);
//
@@ -70,13 +70,13 @@ int main(int argc, char *argv[])
//
p3 << "ls" << "-l";
- QObject::connect(&p3, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p3, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p3, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
p3.start(KProcess::NotifyOnExit, KProcess::AllOutput);
@@ -93,16 +93,16 @@ int main(int argc, char *argv[])
//
p4 << "sort";
- QObject::connect(&p4, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p4, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(wroteStdin(KProcess *)),
- &dummy, SLOT(outputDone(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(KProcess *)),
+ &dummy, TQT_SLOT(outputDone(KProcess *)));
p4.start(KProcess::NotifyOnExit, KProcess::All);
printf("after p4.start");
diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h
index 193895510..3e5d989ec 100644
--- a/kdecore/tests/kprocesstest.h
+++ b/kdecore/tests/kprocesstest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocess.h"
class Dummy : public QObject
diff --git a/kdecore/tests/kprociotest.cpp b/kdecore/tests/kprociotest.cpp
index 7585b7657..446dacb30 100644
--- a/kdecore/tests/kprociotest.cpp
+++ b/kdecore/tests/kprociotest.cpp
@@ -41,8 +41,8 @@ int main(int argc, char *argv[])
p << "rev";
- p.connect(&p, SIGNAL(processExited(KProcess*)), &dummy, SLOT(printMessage(KProcess*)));
- p.connect(&p, SIGNAL(readReady(KProcIO*)), &dummy, SLOT(gotOutput(KProcIO*)));
+ p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*)));
+ p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*)));
bool b;
diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h
index a7bb36f0f..6392fc708 100644
--- a/kdecore/tests/kprociotest.h
+++ b/kdecore/tests/kprociotest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocio.h"
class Dummy : public QObject
@@ -27,7 +27,7 @@ class Dummy : public QObject
void gotOutput(KProcIO*proc)
{
- QString line;
+ TQString line;
while(true) {
int result = proc->readln(line);
if (result == -1) return;
diff --git a/kdecore/tests/krandomsequencetest.cpp b/kdecore/tests/krandomsequencetest.cpp
index 215349a05..8f337c2f1 100644
--- a/kdecore/tests/krandomsequencetest.cpp
+++ b/kdecore/tests/krandomsequencetest.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "krandomsequence.h"
#include "kapplication.h"
@@ -56,34 +56,34 @@ main(int argc, char *argv[])
seq.setSeed(kapp->random());
- QPtrList<QString> list;
- list.append(new QString("A"));
- list.append(new QString("B"));
- list.append(new QString("C"));
- list.append(new QString("D"));
- list.append(new QString("E"));
- list.append(new QString("F"));
- list.append(new QString("G"));
+ TQPtrList<TQString> list;
+ list.append(new TQString("A"));
+ list.append(new TQString("B"));
+ list.append(new TQString("C"));
+ list.append(new TQString("D"));
+ list.append(new TQString("E"));
+ list.append(new TQString("F"));
+ list.append(new TQString("G"));
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp
index 30003265a..f1d3c11f9 100644
--- a/kdecore/tests/kresolvertest.cpp
+++ b/kdecore/tests/kresolvertest.cpp
@@ -33,8 +33,8 @@
#include <sys/socket.h>
#include <unistd.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kuniqueapplication.h>
#include <ksocks.h>
@@ -69,17 +69,17 @@ public:
KUniqueApplication()
{ }
- int newInstance(QValueList<QCString> params);
+ int newInstance(TQValueList<TQCString> params);
};
bool tryLookup(const char* node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -138,11 +138,11 @@ bool try_pton()
bool tryLookup6(const char *node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -403,7 +403,7 @@ void go()
printf("\n\nTest finished\n");
}
-int TestApp::newInstance(QValueList<QCString> /*params*/)
+int TestApp::newInstance(TQValueList<TQCString> /*params*/)
{
go();
}
diff --git a/kdecore/tests/krfcdatetest.cpp b/kdecore/tests/krfcdatetest.cpp
index 1c1957b54..368a1106f 100644
--- a/kdecore/tests/krfcdatetest.cpp
+++ b/kdecore/tests/krfcdatetest.cpp
@@ -4,10 +4,10 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <krfcdate.h>
-bool check(QString txt, time_t a, time_t b)
+bool check(TQString txt, time_t a, time_t b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -71,9 +71,9 @@ int main(int argc, char *argv[])
// empty/null strings
- check("parseDateISO8601(QString())", KRFCDate::parseDateISO8601(QString()), b);
+ check("parseDateISO8601(TQString())", KRFCDate::parseDateISO8601(TQString()), b);
check("parseDateISO8601(\"\")", KRFCDate::parseDateISO8601(""), b);
- check("parseDate(QString())", KRFCDate::parseDate(QString()), b);
+ check("parseDate(TQString())", KRFCDate::parseDate(TQString()), b);
check("parseDate(\"\")", KRFCDate::parseDate(""), b);
printf("\nTest OK !\n");
diff --git a/kdecore/tests/kshelltest.cpp b/kdecore/tests/kshelltest.cpp
index eaca1fcbe..394394e28 100644
--- a/kdecore/tests/kshelltest.cpp
+++ b/kdecore/tests/kshelltest.cpp
@@ -3,7 +3,7 @@
#include <iostream>
static QCString
-ps(const QString &s)
+ps(const TQString &s)
{
if (s.isNull())
return "(null)";
@@ -34,7 +34,7 @@ int main()
tx("~sulli");
#endif
#if 1
- QStringList lst;
+ TQStringList lst;
lst << "this" << "is" << "text";
std::cout << KShell::joinArgs(lst).latin1() << std::endl;
#endif
diff --git a/kdecore/tests/ksocktest.cpp b/kdecore/tests/ksocktest.cpp
index 89b59c62a..042701c93 100644
--- a/kdecore/tests/ksocktest.cpp
+++ b/kdecore/tests/ksocktest.cpp
@@ -37,12 +37,12 @@
#include <arpa/inet.h>
#include <netdb.h>
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
KApplication app;
- QString host, port;
+ TQString host, port;
KInetSocketAddress host_address("213.203.58.36", 80);
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
printf( "resolve result: %d\n", result );
check("KExtendedSocket::resolve() host=", host, "www.kde.org");
// check("KExtendedSocket::resolve() port=", port, "http");
- QPtrList<KAddressInfo> list;
+ TQPtrList<KAddressInfo> list;
list = KExtendedSocket::lookup("www.kde.org", "http", KExtendedSocket::inetSocket);
for(KAddressInfo *info = list.first(); info; info = list.next())
{
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
int err;
- QPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
+ TQPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
for (KAddressInfo *x = cns.first(); x; x = cns.next()) {
const char *canon = x->canonname();
qWarning( "Lookup: %s", canon ? canon : "<Null>");
@@ -96,7 +96,7 @@ main(int argc, char *argv[])
check("KExtendedSocket::lookup() canonical", cns.first()->canonname(), "www.kde.org");
KExtendedSocket * sock2 = new KExtendedSocket( "www.kde.org", 80 );
- check( "KExtendedSocket ctor / connect", QString::number( sock2->connect() ), "0" );
+ check( "KExtendedSocket ctor / connect", TQString::number( sock2->connect() ), "0" );
printf("FD %d\n", sock2->fd());
diff --git a/kdecore/tests/ksortablevaluelisttest.cpp b/kdecore/tests/ksortablevaluelisttest.cpp
index de937c797..301054045 100644
--- a/kdecore/tests/ksortablevaluelisttest.cpp
+++ b/kdecore/tests/ksortablevaluelisttest.cpp
@@ -1,9 +1,9 @@
-#include <qstring.h>
+#include <tqstring.h>
#include <ksortablevaluelist.h>
int main( int argc, char **argv )
{
- KSortableValueList<QString> list;
+ KSortableValueList<TQString> list;
list.insert( 1, "FOO (1)" );
list.insert( 2, "Test (2)" );
list.insert( 1, "Huba! (1)" );
@@ -12,7 +12,7 @@ int main( int argc, char **argv )
list.insert( 2, "I was here :) (2)" );
list.insert( 4, "Yeehaa... (4)" );
- QValueListIterator<KSortableItem<QString> > it = list.begin();
+ TQValueListIterator<KSortableItem<TQString> > it = list.begin();
qDebug("Insertion order:");
qDebug("================");
diff --git a/kdecore/tests/kstdacceltest.cpp b/kdecore/tests/kstdacceltest.cpp
index 71eff30cd..ff8842139 100644
--- a/kdecore/tests/kstdacceltest.cpp
+++ b/kdecore/tests/kstdacceltest.cpp
@@ -5,12 +5,12 @@
#include <kstdaccel.h>
#include <stdlib.h> // for exit
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kstddirstest.cpp b/kdecore/tests/kstddirstest.cpp
index 23c0f0a1c..fa797d665 100644
--- a/kdecore/tests/kstddirstest.cpp
+++ b/kdecore/tests/kstddirstest.cpp
@@ -10,8 +10,8 @@ int main(int argc, char **argv)
KStandardDirs t;
KConfig config; // to add custom entries - a bit tricky :/
- QStringList list;
- QString s;
+ TQStringList list;
+ TQString s;
t.saveLocation("icon");
@@ -19,32 +19,32 @@ int main(int argc, char **argv)
if (!s.isNull()) kdDebug() << s << endl;
list = t.findAllResources("data", "kfind/toolbar", true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "data " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc", false, true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config2 " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "en/*/index.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "*/*/*.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findDirs("data", "kwin");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "kwin dirs " << (*it).ascii() << endl;
}
diff --git a/kdecore/tests/kstringhandlertest.cpp b/kdecore/tests/kstringhandlertest.cpp
index 75695309d..2efdc96fc 100644
--- a/kdecore/tests/kstringhandlertest.cpp
+++ b/kdecore/tests/kstringhandlertest.cpp
@@ -3,7 +3,7 @@
using std::cout;
using std::endl;
-bool check(const QString &txt, const QString &a, const QString &b)
+bool check(const TQString &txt, const TQString &a, const TQString &b)
{
if ( a != b ) {
cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
@@ -17,7 +17,7 @@ bool check(const QString &txt, const QString &a, const QString &b)
int main(int argc, char *argv[])
{
- QString test = "The quick brown fox jumped over the lazy bridge. ";
+ TQString test = "The quick brown fox jumped over the lazy bridge. ";
check("word(test, 3)",
KStringHandler::word(test, 2),
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
check("reverse(test)",
KStringHandler::reverse(test),
" bridge. lazy the over jumped fox brown quick The");
- QString result;
+ TQString result;
result = KStringHandler::ljust(test, 70);
if (result.length() != 70)
{
diff --git a/kdecore/tests/ktempfiletest.cpp b/kdecore/tests/ktempfiletest.cpp
index aacf30255..60404f03a 100644
--- a/kdecore/tests/ktempfiletest.cpp
+++ b/kdecore/tests/ktempfiletest.cpp
@@ -19,7 +19,7 @@
#include "ktempfile.h"
#include "kapplication.h"
#include "kstandarddirs.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <unistd.h>
#include <stdio.h>
@@ -34,14 +34,14 @@ main(int argc, char *argv[])
printf("Filename = %s\n", f4.name().ascii());
printf("Making tempfile with \".ps\" extension.\n");
- KTempFile f2(QString::null, ".ps");
+ KTempFile f2(TQString::null, ".ps");
printf("Filename = %s\n", f2.name().ascii());
printf("Making tempfile in home directory.\n");
- KTempFile f3(QString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
+ KTempFile f3(TQString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
printf("Filename = %s\n", f3.name().ascii());
- QString name = locateLocal("socket", "test");
+ TQString name = locateLocal("socket", "test");
printf("Socket Filename = %s\n", name.ascii());
printf("Done.\n");
diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp
index 7be8bd621..650cc0512 100644
--- a/kdecore/tests/ktimezonestest.cpp
+++ b/kdecore/tests/ktimezonestest.cpp
@@ -17,13 +17,13 @@ int main(int argc, char *argv[])
// Find the current offset of the UTC timezone.
timezone = timezones.zone("UTC");
- printf( "UTC timezone offset should be 0: %d\n", timezone->offset(QDateTime::currentDateTime()) );
+ printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) );
// Find some offsets for Europe/London.
char *london = "Europe/London";
timezone = timezones.zone(london);
- QDateTime winter(QDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
- QDateTime summer(QDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
+ TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
+ TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
printf( "%s winter timezone offset should be 0: %d\n", london, timezone->offset(winter) );
printf( "%s summer timezone offset should be 3600: %d\n", london, timezone->offset(summer) );
@@ -33,14 +33,14 @@ int main(int argc, char *argv[])
char *bstAfterPdt = "2005-05-01T00:00:00";
char *gmtBeforePst = "2005-10-30T01:00:00";
char *gmtAfterPst = "2005-12-01T00:00:00";
- QString result;
- result = timezone->convert(losAngeles, QDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
+ TQString result;
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST before PDT, %s should be 2005-03-27T15:00:00: %s\n", bstBeforePdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST and PDT, %s should be 2005-04-30T16:00:00: %s\n", bstAfterPdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT before PST, %s should be 2005-10-29T17:00:00: %s\n", gmtBeforePst, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT and PST, %s should be 2005-11-30T16:00:00: %s\n", gmtAfterPst, result.latin1() );
printf( "Latitude 89 should be valid: %svalid\n", KTimezone::isValidLatitude(89.0) ? "" : "in");
printf( "Latitude 91 should be invalid: %svalid\n", KTimezone::isValidLatitude(91.0) ? "" : "in");
diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp
index 60e8ace09..e80561d2c 100644
--- a/kdecore/tests/kurltest.cpp
+++ b/kdecore/tests/kurltest.cpp
@@ -7,17 +7,17 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qdatastream.h>
+#include <tqtextcodec.h>
+#include <tqdatastream.h>
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -64,11 +64,11 @@ void testAdjustPath()
// Equivalent tests written by the KDirLister maintainer :)
- KURL u3( QCString("ftp://brade@ftp.kde.org///") );
+ KURL u3( TQCString("ftp://brade@ftp.kde.org///") );
u3.adjustPath(-1);
check("KURL::adjustPath()", u3.url(), "ftp://brade@ftp.kde.org/");
- KURL u4( QCString("ftp://brade@ftp.kde.org/kde///") );
+ KURL u4( TQCString("ftp://brade@ftp.kde.org/kde///") );
u4.adjustPath(-1);
check("KURL::adjustPath()", u4.url(), "ftp://brade@ftp.kde.org/kde");
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
KURL url2( baseURL, "../../////kdebase/konqueror" );
check( "KURL::url()", url2.url(), "file:///usr/local/src/kde2/////kdebase/konqueror" );
- QString u1 = "file:/home/dfaure/my#myref";
+ TQString u1 = "file:/home/dfaure/my#myref";
url1 = u1;
check("KURL::url()", url1.url(), "file:///home/dfaure/my#myref");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
@@ -167,11 +167,11 @@ int main(int argc, char *argv[])
KURL dxOffEagle( KURL("http://something/other.html"), "newpage.html?[{\"foo: bar\"}]" );
check("isValid", dxOffEagle.isValid() ? "OK" : "KO", "OK");
- check("url", dxOffEagle.url(), QString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
+ check("url", dxOffEagle.url(), TQString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
KURL javascript( KURL("javascript:window.location+\"__flashplugin_unique__\"") );
check("isValid", javascript.isValid() ? "OK" : "KO", "OK");
- check("url", javascript.url(), QString("javascript:window.location+\"__flashplugin_unique__\"") );
+ check("url", javascript.url(), TQString("javascript:window.location+\"__flashplugin_unique__\"") );
u1 = "file:///home/dfaure/my#myref";
@@ -192,16 +192,16 @@ int main(int argc, char *argv[])
url1= "$HOME/.kde/share/config";
check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "FALSE" );
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- url1 = KURL( QCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
+ url1 = KURL( TQCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
check("query", url1.query(), "?foo=bar" );
url1.setQuery( "toto=titi&kde=rocks" );
check("query", url1.query(), "?toto=titi&kde=rocks" );
@@ -211,24 +211,24 @@ int main(int argc, char *argv[])
check("setQuery(\"?\") -> query", url1.query(), "?" );
url1.setQuery( "" );
check("setQuery(\"\") -> query", url1.query(), "?" );
- url1.setQuery( QString::null );
- check("setQuery(QString::null) -> query", url1.query(), QString::null );
+ url1.setQuery( TQString::null );
+ check("setQuery(TQString::null) -> query", url1.query(), TQString::null );
- u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject:connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject:connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
KURL udir;
printf("\n* Empty URL\n");
- check("KURL::url()", udir.url(), QString::null);
+ check("KURL::url()", udir.url(), TQString::null);
check("KURL::isEmpty()", udir.isEmpty() ? "ok" : "ko", "ok");
check("KURL::isValid()", udir.isValid() ? "ok" : "ko", "ko");
udir = udir.upURL();
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
check("KURL::directory(false,false)", udir.directory(false,false), "/home/dfaure/");
check("KURL::directory(true,false)", udir.directory(true,false), "/home/dfaure");
- KURL u2( QCString("/home/dfaure/") );
+ KURL u2( TQCString("/home/dfaure/") );
printf("\n* URL is %s\n",u2.url().ascii());
// not ignoring trailing slash
check("KURL::directory(false,false)", u2.directory(false,false), "/home/dfaure/");
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
u2.setFileName( "myotherfile.txt" );
check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt");
// more tricky, renaming a directory (kpropsdlg.cc, line ~ 238)
- QString tmpurl = "file:/home/dfaure/myolddir/";
+ TQString tmpurl = "file:/home/dfaure/myolddir/";
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -425,15 +425,15 @@ int main(int argc, char *argv[])
check("KURL::split()", lst.first().url(), "ftp://host/dir1/dir2/myfile.txt");
// cdUp code
KURL lastUrl = lst.last();
- QString dir = lastUrl.directory( true, true );
+ TQString dir = lastUrl.directory( true, true );
check( "KURL::directory(true,true)", dir, "/dir1/dir2");
/// Comparisons
- QString ucmp1 = "ftp://ftp.de.kde.org/dir";
- QString ucmp2 = "ftp://ftp.de.kde.org/dir/";
+ TQString ucmp1 = "ftp://ftp.de.kde.org/dir";
+ TQString ucmp2 = "ftp://ftp.de.kde.org/dir/";
check("urlcmp(only slash difference)", urlcmp(ucmp1,ucmp2)?"ko":"ok","ok");
check("urlcmp(only slash difference, ignore_trailing)", urlcmp(ucmp1,ucmp2,true,false)?"ok":"ko","ok");
- QString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
+ TQString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
check("urlcmp(only hash difference)", urlcmp(ucmp2,ucmp3)?"ko":"ok","ok");
check("urlcmp(only hash difference, ignore_ref)", urlcmp(ucmp2,ucmp3,false,true)?"ok":"ko","ok");
check("urlcmp(slash and hash difference, ignore_trailing, ignore_ref)", urlcmp(ucmp2,ucmp3,true,true)?"ok":"ko","ok");
@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
KURL ftpUrl ( "ftp://ftp.de.kde.org" );
printf("\n* URL is %s\n",ftpUrl.url().latin1());
- check("KURL::path()", ftpUrl.path(), QString::null);
+ check("KURL::path()", ftpUrl.path(), TQString::null);
ftpUrl = "ftp://ftp.de.kde.org/";
check("KURL::isParentOf()", ftpUrl.isParentOf( "ftp://ftp.de.kde.org/host/subdir/") ? "yes" : "no", "yes");
ftpUrl = "ftp://ftp/host/subdir/";
@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
check("http: Set user", waba1.url(), "http://waldo@www.website.com/directory/filename?bla#blub");
waba1.setUser("waldo/bastian");
check("http: Set user with slash in it", waba1.url(), "http://waldo%2Fbastian@www.website.com/directory/filename?bla#blub");
- waba1.setRef( QString::null );
+ waba1.setRef( TQString::null );
waba1.setPass( "pass" );
waba1.setDirectory( "/foo" );
waba1.setProtocol( "https" );
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
"http://www.kde.org/cgi/test.cgi#");
check("hasRef()", waba1.hasRef()?"true":"false","true");
check("hasHTMLRef()", waba1.hasHTMLRef()?"true":"false","true");
- check("encodedHtmlRef()", waba1.encodedHtmlRef(),QString::null);
+ check("encodedHtmlRef()", waba1.encodedHtmlRef(),TQString::null);
// URLs who forgot to encode spaces in the query.
waba1 = "http://www.kde.org/cgi/test.cgi?hello=My Value";
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389?b=c";
check( "http: URL with port, query, and empty path; url", waba1.url(), "http://a:389?b=c" );
check( "http: URL with port, query, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, query, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, query, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, query, and empty path; path", waba1.path(), "" );
check( "http: URL with port, query, and empty path; query", waba1.query(), "?b=c" );
@@ -635,7 +635,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389#b=c";
check( "http: URL with port, ref, and empty path; url", waba1.url(), "http://a:389#b=c" );
check( "http: URL with port, ref, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, ref, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, ref, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, ref, and empty path; path", waba1.path(), "" );
check( "http: URL with port, ref, and empty path; ref", waba1.ref(), "b=c" );
check( "http: URL with port, ref, and empty path; query", waba1.query(), "" );
@@ -644,7 +644,7 @@ int main(int argc, char *argv[])
waba1 = "http://[::FFFF:129.144.52.38]:81/index.html";
check("http: IPV6 host", waba1.host(),
"::ffff:129.144.52.38");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -655,7 +655,7 @@ int main(int argc, char *argv[])
"waba");
check("http: IPV6 host", waba1.pass(),
"pass");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -684,27 +684,27 @@ int main(int argc, char *argv[])
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81?query");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; query", waba1.query(), "?query");
waba1 = "http://[::ffff:129.144.52.38]:81#ref";
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81#ref");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; ref", waba1.ref(), "ref");
// Streaming operators
KURL origURL( "http://www.website.com/directory/?#ref" );
waba1 = "http://[::ffff:129.144.52.38]:81?query";
- QByteArray buffer;
+ TQByteArray buffer;
{
- QDataStream stream( buffer, IO_WriteOnly );
+ TQDataStream stream( buffer, IO_WriteOnly );
stream << origURL
<< KURL( "file:" ) // an invalid one
<< waba1; // the IPv6 one
}
{
- QDataStream stream( buffer, IO_ReadOnly );
+ TQDataStream stream( buffer, IO_ReadOnly );
KURL restoredURL;
stream >> restoredURL;
check( "Streaming valid URL", origURL.url(), restoredURL.url() );
@@ -742,7 +742,7 @@ int main(int argc, char *argv[])
check("Broken stuff #3 directory(true, false)", waba1.directory(true, false), "");
check("Broken stuff #3 directory(false, true)", waba1.directory(true, true), "");
KURL broken;
- broken.setPath( QString::null );
+ broken.setPath( TQString::null );
check("Broken stuff #4 empty", broken.isEmpty()?"EMPTY":"NOT", "NOT");
// It's valid: because isValid refers to parsing, not to what happens afterwards.
check("Broken stuff #4 valid", broken.isValid()?"VALID":"MALFORMED", "VALID");
@@ -819,9 +819,9 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#endif
- QString raw = "data:text/html,%00%2540%00";
+ TQString raw = "data:text/html,%00%2540%00";
check("data URL: encode-decode of %00", KURL(raw).url(), raw );
// UTF8 tests
@@ -864,10 +864,10 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
#endif
baseURL = "file:/home/coolo";
- KURL russian = baseURL.directory(false, true) + QString::fromLocal8Bit( "ÆÇÎ7" );
+ KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ÆÇÎ7" );
check( "russian", russian.url(), "file:///home/%C6%C7%CE7" );
KURL tobi1("http://some.host.net/path/to/file#fragmentPrecedes?theQuery");
@@ -895,27 +895,27 @@ int main(int argc, char *argv[])
check("queryItem (first item)", theKow.queryItem("q"), "frerich");
check("queryItem (middle item)", theKow.queryItem("hl"), "de");
check("queryItem (last item)", theKow.queryItem("lr"), "lang de");
- check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), QString::null);
+ check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), TQString::null);
check("queryItem (empty item)", theKow.queryItem("empty"), "");
check("queryItem (item with encoded chars)", theKow.queryItem("test"), "+ :%");
check("encodedPathAndQuery", theKow.encodedPathAndQuery(), "/search?q=frerich&hlx=xx&hl=de&empty=&lr=lang+de&test=%2B%20%3A%25");
- // checks for queryItems(), which returns a QMap<QString,QString>:
+ // checks for queryItems(), which returns a TQMap<TQString,TQString>:
KURL queryUrl( "mailto:Marc%20Mutz%20%3cmutz@kde.org%3E?"
"Subject=subscribe+me&"
"body=subscribe+mutz%40kde.org&"
"Cc=majordomo%40lists.kde.org" );
check("queryItems (c.s. keys)",
- QStringList(queryUrl.queryItems().keys()).join(", "),
+ TQStringList(queryUrl.queryItems().keys()).join(", "),
"Cc, Subject, body" );
check("queryItems (c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
"body, cc, subject" );
check("queryItems (values; c.s. keys)",
- QStringList(queryUrl.queryItems().values()).join(", "),
+ TQStringList(queryUrl.queryItems().values()).join(", "),
"majordomo@lists.kde.org, subscribe me, subscribe mutz@kde.org" );
check("queryItems (values; c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
"subscribe mutz@kde.org, majordomo@lists.kde.org, subscribe me" );
KURL umlaut1("http://www.clever-tanken.de/liste.asp?ort=N%FCrnberg&typ=Diesel");
@@ -940,12 +940,12 @@ int main(int argc, char *argv[])
check("amantia.url()", amantia.url(), "http://?.foo.de"); // why not
#endif
- KURL thiago( QString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
+ KURL thiago( TQString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
check("thiago.isValid()", thiago.isValid() ? "true" : "false", "true");
#ifdef HAVE_IDNA_H
check("thiago.url()", thiago.url(), "http://xn--4ca.de"); // Non-ascii is allowed in IDN domain names.
#else
- check("thiago.url()", thiago.url(), QString::fromUtf8( "http://\303\244.de" ) );
+ check("thiago.url()", thiago.url(), TQString::fromUtf8( "http://\303\244.de" ) );
#endif
@@ -1003,16 +1003,16 @@ int main(int argc, char *argv[])
check("com2.url()", com2.url(), "http://server.com/dir/blubb/blah/");
KURL utf8_1("audiocd:/By%20Name/15%20Geantra%C3%AE.wav", 106);
- check("utf8_1.fileName()", utf8_1.fileName(), QString::fromLatin1("15 Geantraî.wav"));
+ check("utf8_1.fileName()", utf8_1.fileName(), TQString::fromLatin1("15 Geantraî.wav"));
KURL utf8_2("audiocd:/By%20Name/15%2fGeantra%C3%AE.wav", 106);
- check("utf8_2.fileName()", utf8_2.fileName(), QString::fromLatin1("15/Geantraî.wav"));
+ check("utf8_2.fileName()", utf8_2.fileName(), TQString::fromLatin1("15/Geantraî.wav"));
KURL url_newline_1("http://www.foo.bar/foo/bar\ngnork");
- check("url_newline_1.url()", url_newline_1.url(), QString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
+ check("url_newline_1.url()", url_newline_1.url(), TQString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
KURL url_newline_2("http://www.foo.bar/foo?bar\ngnork");
- check("url_newline_2.url()", url_newline_2.url(), QString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
+ check("url_newline_2.url()", url_newline_2.url(), TQString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
KURL local_file_1("file://localhost/my/file");
check("local_file_1.isLocalFile()", local_file_1.isLocalFile() ? "true" : "false", "true");
@@ -1033,7 +1033,7 @@ int main(int argc, char *argv[])
local_file_5.setPath("/foo?bar");
check("local_file_5.url()", local_file_5.url(), "file:///foo%3Fbar");
- QString basePath = "/home/bastian";
+ TQString basePath = "/home/bastian";
check("relativePath(\"/home/bastian\", \"/home/bastian\")", KURL::relativePath(basePath, "/home/bastian"), "./");
bool b;
@@ -1064,7 +1064,7 @@ int main(int argc, char *argv[])
baseURL = "http://mlc:80/";
check("isValid()?", baseURL.isValid() ? "true" : "false", "true");
- check("port()?", QString::number(baseURL.port()), "80");
+ check("port()?", TQString::number(baseURL.port()), "80");
check("path()?", baseURL.path(), "/");
baseURL = "ptal://mlc:usb@PC_970"; // User=mlc, password=usb, host=PC_970
@@ -1085,7 +1085,7 @@ int main(int argc, char *argv[])
KURL ldap = "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)";
check("host()?", ldap.host(), "host.com");
- check("port()?", QString("%1").arg(ldap.port()), "6666");
+ check("port()?", TQString("%1").arg(ldap.port()), "6666");
check("path()?", ldap.path(), "/o=University of Michigan,c=US");
check("query()?", ldap.query(), "??sub?(cn=Babs%20Jensen)");
check("url()?", ldap.url(), "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)");
@@ -1101,13 +1101,13 @@ int main(int argc, char *argv[])
// URI Mode tests
url1 = "http://www.foobar.com/";
- check("KURL(\"http://www.foobar.com/\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::URL));
+ check("KURL(\"http://www.foobar.com/\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::URL));
url1 = "mailto:user@host.com";
- check("KURL(\"mailto:user@host.com\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::Mailto));
+ check("KURL(\"mailto:user@host.com\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::Mailto));
check("KURL(\"mailto:user@host.com\").url()", url1.url(), "mailto:user@host.com");
check("KURL(\"mailto:user@host.com\").url(0, 106)", url1.url(0, 106), "mailto:user@host.com");
url1 = "data:text/plain,foobar?gazonk=flarp";
- check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::RawURI));
+ check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::RawURI));
check("KURL(\"data:text/plain,foobar?gazonk=flarp\").path()", url1.path(), "text/plain,foobar?gazonk=flarp");
url1 = "mailto:User@Host.COM?subject=Hello";
check("KURL(\"mailto:User@Host.COM?subject=Hello\").path()", url1.path(), "User@host.com");
diff --git a/kdecore/tests/kxerrorhandlertest.cpp b/kdecore/tests/kxerrorhandlertest.cpp
index cb97be170..c2efc7443 100644
--- a/kdecore/tests/kxerrorhandlertest.cpp
+++ b/kdecore/tests/kxerrorhandlertest.cpp
@@ -1,4 +1,4 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Xlib.h>
#include <iostream>
using namespace std;
diff --git a/kdecore/tests/startserviceby.cpp b/kdecore/tests/startserviceby.cpp
index 4411eed53..93e6716ef 100644
--- a/kdecore/tests/startserviceby.cpp
+++ b/kdecore/tests/startserviceby.cpp
@@ -32,10 +32,10 @@ main(int argc, char *argv[])
KApplication a;
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int pid;
- a.startServiceByDesktopName( "kaddressbook", QString::null, &error, &dcopService, &pid );
+ a.startServiceByDesktopName( "kaddressbook", TQString::null, &error, &dcopService, &pid );
kdDebug() << "Started. error=" << error << " dcopService=" << dcopService << " pid=" << pid << endl;
a.exec();
}
diff --git a/kdecore/tests/testqtargs.cpp b/kdecore/tests/testqtargs.cpp
index 918b07735..2b3606a59 100644
--- a/kdecore/tests/testqtargs.cpp
+++ b/kdecore/tests/testqtargs.cpp
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
}
args->clear();
- QWidget *w = new QWidget();
+ TQWidget *w = new TQWidget();
app.setMainWidget(w);
w->show();
diff --git a/kded/kbuildimageiofactory.cpp b/kded/kbuildimageiofactory.cpp
index 933ac338a..a0a3ce76e 100644
--- a/kded/kbuildimageiofactory.cpp
+++ b/kded/kbuildimageiofactory.cpp
@@ -38,9 +38,9 @@ KBuildImageIOFactory::KBuildImageIOFactory() :
// return all service types for this factory
// i.e. first arguments to m_resourceList->add() above
-QStringList KBuildImageIOFactory::resourceTypes()
+TQStringList KBuildImageIOFactory::resourceTypes()
{
- return QStringList() << "services";
+ return TQStringList() << "services";
}
KBuildImageIOFactory::~KBuildImageIOFactory()
@@ -49,9 +49,9 @@ KBuildImageIOFactory::~KBuildImageIOFactory()
}
KSycocaEntry *
-KBuildImageIOFactory::createEntry( const QString& file, const char *resource )
+KBuildImageIOFactory::createEntry( const TQString& file, const char *resource )
{
- QString fullPath = locate( resource, file);
+ TQString fullPath = locate( resource, file);
KImageIOFormat *format = new KImageIOFormat(fullPath);
return format;
@@ -87,7 +87,7 @@ KBuildImageIOFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
void
-KBuildImageIOFactory::saveHeader(QDataStream &str)
+KBuildImageIOFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
@@ -95,15 +95,15 @@ KBuildImageIOFactory::saveHeader(QDataStream &str)
}
void
-KBuildImageIOFactory::save(QDataStream &str)
+KBuildImageIOFactory::save(TQDataStream &str)
{
rPath.sort();
// Remove duplicates from rPath:
- QString last;
- for(QStringList::Iterator it = rPath.begin();
+ TQString last;
+ for(TQStringList::Iterator it = rPath.begin();
it != rPath.end(); )
{
- QStringList::Iterator it2 = it++;
+ TQStringList::Iterator it2 = it++;
if (*it2 == last)
{
// remove duplicate
diff --git a/kded/kbuildimageiofactory.h b/kded/kbuildimageiofactory.h
index 2ca70ef58..65197e17f 100644
--- a/kded/kbuildimageiofactory.h
+++ b/kded/kbuildimageiofactory.h
@@ -20,7 +20,7 @@
#define __k_build_imageio_factory_h__
#include <kimageiofactory.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* Service group factory for building ksycoca
@@ -39,17 +39,17 @@ public:
/**
* Save header info to database
*/
- virtual void saveHeader(QDataStream &);
+ virtual void saveHeader(TQDataStream &);
/**
* Write out service type specific index files.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Create new entry.
*/
- virtual KSycocaEntry* createEntry(const QString &, const char *);
+ virtual KSycocaEntry* createEntry(const TQString &, const char *);
virtual KSycocaEntry * createEntry( int ) { assert(0); return 0L; }
@@ -58,7 +58,7 @@ public:
/**
* Returns all resource types for this service factory
*/
- static QStringList resourceTypes();
+ static TQStringList resourceTypes();
};
#endif
diff --git a/kded/kbuildprotocolinfofactory.cpp b/kded/kbuildprotocolinfofactory.cpp
index 3b1a24bc0..c17b1e772 100644
--- a/kded/kbuildprotocolinfofactory.cpp
+++ b/kded/kbuildprotocolinfofactory.cpp
@@ -37,9 +37,9 @@ KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() :
// return all service types for this factory
// i.e. first arguments to m_resourceList->add() above
-QStringList KBuildProtocolInfoFactory::resourceTypes()
+TQStringList KBuildProtocolInfoFactory::resourceTypes()
{
- return QStringList() << "services";
+ return TQStringList() << "services";
}
KBuildProtocolInfoFactory::~KBuildProtocolInfoFactory()
@@ -48,7 +48,7 @@ KBuildProtocolInfoFactory::~KBuildProtocolInfoFactory()
}
KProtocolInfo *
-KBuildProtocolInfoFactory::createEntry( const QString& file, const char * )
+KBuildProtocolInfoFactory::createEntry( const TQString& file, const char * )
{
return new KProtocolInfo(file);
}
diff --git a/kded/kbuildprotocolinfofactory.h b/kded/kbuildprotocolinfofactory.h
index a83ba7156..e4ddcf6b8 100644
--- a/kded/kbuildprotocolinfofactory.h
+++ b/kded/kbuildprotocolinfofactory.h
@@ -21,7 +21,7 @@
#include <kprotocolinfofactory.h>
#include <assert.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* Protocol Info factory for building ksycoca
@@ -40,7 +40,7 @@ public:
/**
* Create new entry.
*/
- virtual KProtocolInfo* createEntry(const QString &, const char *);
+ virtual KProtocolInfo* createEntry(const TQString &, const char *);
virtual KProtocolInfo* createEntry(int) { assert(0); return 0L; }
@@ -52,7 +52,7 @@ public:
/**
* Returns all resource types for this service factory
*/
- static QStringList resourceTypes();
+ static TQStringList resourceTypes();
};
#endif
diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp
index 18aef1d29..f8f8c34f1 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -47,9 +47,9 @@ KBuildServiceFactory::KBuildServiceFactory( KSycocaFactory *serviceTypeFactory,
// return all service types for this factory
// i.e. first arguments to m_resourceList->add() above
-QStringList KBuildServiceFactory::resourceTypes()
+TQStringList KBuildServiceFactory::resourceTypes()
{
- return QStringList() << "apps" << "services";
+ return TQStringList() << "apps" << "services";
}
KBuildServiceFactory::~KBuildServiceFactory()
@@ -57,16 +57,16 @@ KBuildServiceFactory::~KBuildServiceFactory()
delete m_resourceList;
}
-KService * KBuildServiceFactory::findServiceByName(const QString &_name)
+KService * KBuildServiceFactory::findServiceByName(const TQString &_name)
{
return m_serviceDict[_name];
}
KSycocaEntry *
-KBuildServiceFactory::createEntry( const QString& file, const char *resource )
+KBuildServiceFactory::createEntry( const TQString& file, const char *resource )
{
- QString name = file;
+ TQString name = file;
int pos = name.findRev('/');
if (pos != -1)
{
@@ -97,7 +97,7 @@ KBuildServiceFactory::createEntry( const QString& file, const char *resource )
void
-KBuildServiceFactory::saveHeader(QDataStream &str)
+KBuildServiceFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
@@ -109,7 +109,7 @@ KBuildServiceFactory::saveHeader(QDataStream &str)
}
void
-KBuildServiceFactory::save(QDataStream &str)
+KBuildServiceFactory::save(TQDataStream &str)
{
KSycocaFactory::save(str);
@@ -136,19 +136,19 @@ KBuildServiceFactory::save(QDataStream &str)
}
void
-KBuildServiceFactory::saveOfferList(QDataStream &str)
+KBuildServiceFactory::saveOfferList(TQDataStream &str)
{
m_offerListOffset = str.device()->at();
bool isNumber;
- for(QDictIterator<KSycocaEntry::Ptr> itserv ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> itserv ( *m_entryDict );
itserv.current();
++itserv)
{
KService *service = (KService *) ((KSycocaEntry *)(*itserv.current()));
- QStringList serviceTypeList = service->serviceTypes();
+ TQStringList serviceTypeList = service->serviceTypes();
KServiceType::List serviceTypes;
- QStringList::ConstIterator it = serviceTypeList.begin();
+ TQStringList::ConstIterator it = serviceTypeList.begin();
for( ; it != serviceTypeList.end(); ++it )
{
(*it).toInt(&isNumber);
@@ -178,7 +178,7 @@ KBuildServiceFactory::saveOfferList(QDataStream &str)
}
// For each entry in servicetypeFactory
- for(QDictIterator<KSycocaEntry::Ptr> it ( *(m_serviceTypeFactory->entryDict()) );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *(m_serviceTypeFactory->entryDict()) );
it.current();
++it)
{
@@ -199,13 +199,13 @@ KBuildServiceFactory::saveOfferList(QDataStream &str)
}
void
-KBuildServiceFactory::saveInitList(QDataStream &str)
+KBuildServiceFactory::saveInitList(TQDataStream &str)
{
m_initListOffset = str.device()->at();
KService::List initList;
- for(QDictIterator<KSycocaEntry::Ptr> itserv ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> itserv ( *m_entryDict );
itserv.current();
++itserv)
{
@@ -237,18 +237,18 @@ KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
if (!service->isDeleted())
{
- QString parent = service->parentApp();
+ TQString parent = service->parentApp();
if (!parent.isEmpty())
m_serviceGroupFactory->addNewChild(parent, resource, service);
}
- QString name = service->desktopEntryName();
+ TQString name = service->desktopEntryName();
m_nameDict->add( name, newEntry );
m_serviceDict.replace(name, service);
- QString relName = service->desktopEntryPath();
+ TQString relName = service->desktopEntryPath();
m_relNameDict->add( relName, newEntry );
- QString menuId = service->menuId();
+ TQString menuId = service->menuId();
if (!menuId.isEmpty())
m_menuIdDict->add( menuId, newEntry );
}
diff --git a/kded/kbuildservicefactory.h b/kded/kbuildservicefactory.h
index f777aaa6e..eca439c5d 100644
--- a/kded/kbuildservicefactory.h
+++ b/kded/kbuildservicefactory.h
@@ -21,8 +21,8 @@
#ifndef __k_build_service_factory_h__
#define __k_build_service_factory_h__
-#include <qptrdict.h>
-#include <qstringlist.h>
+#include <tqptrdict.h>
+#include <tqstringlist.h>
#include <kservicefactory.h>
// We export the services to the service group factory!
@@ -43,12 +43,12 @@ public:
virtual ~KBuildServiceFactory();
- KService *findServiceByName(const QString &_name);
+ KService *findServiceByName(const TQString &_name);
/**
* Construct a KService from a config file.
*/
- virtual KSycocaEntry * createEntry(const QString &file, const char *resource);
+ virtual KSycocaEntry * createEntry(const TQString &file, const char *resource);
virtual KService * createEntry( int ) { assert(0); return 0L; }
@@ -60,7 +60,7 @@ public:
/**
* Write out service specific index files.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Write out header information
@@ -68,18 +68,18 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* Returns all resource types for this service factory
*/
- static QStringList resourceTypes();
+ static TQStringList resourceTypes();
private:
- void saveOfferList(QDataStream &str);
- void saveInitList(QDataStream &str);
+ void saveOfferList(TQDataStream &str);
+ void saveInitList(TQDataStream &str);
- QDict<KService> m_serviceDict;
- QPtrDict<KService> m_dupeDict;
+ TQDict<KService> m_serviceDict;
+ TQPtrDict<KService> m_dupeDict;
KSycocaFactory *m_serviceTypeFactory;
KBuildServiceGroupFactory *m_serviceGroupFactory;
};
diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp
index f55fdcf2f..e75931182 100644
--- a/kded/kbuildservicegroupfactory.cpp
+++ b/kded/kbuildservicegroupfactory.cpp
@@ -37,9 +37,9 @@ KBuildServiceGroupFactory::KBuildServiceGroupFactory() :
// return all service types for this factory
// i.e. first arguments to m_resourceList->add() above
-QStringList KBuildServiceGroupFactory::resourceTypes()
+TQStringList KBuildServiceGroupFactory::resourceTypes()
{
- return QStringList(); // << "apps";
+ return TQStringList(); // << "apps";
}
KBuildServiceGroupFactory::~KBuildServiceGroupFactory()
@@ -48,7 +48,7 @@ KBuildServiceGroupFactory::~KBuildServiceGroupFactory()
}
KServiceGroup *
-KBuildServiceGroupFactory::createEntry( const QString&, const char * )
+KBuildServiceGroupFactory::createEntry( const TQString&, const char * )
{
// Unused
kdWarning("!!!! KBuildServiceGroupFactory::createEntry called!");
@@ -56,7 +56,7 @@ KBuildServiceGroupFactory::createEntry( const QString&, const char * )
}
-void KBuildServiceGroupFactory::addNewEntryTo( const QString &menuName, KService *newEntry)
+void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KService *newEntry)
{
KServiceGroup *entry = 0;
KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName);
@@ -72,7 +72,7 @@ void KBuildServiceGroupFactory::addNewEntryTo( const QString &menuName, KService
}
KServiceGroup *
-KBuildServiceGroupFactory::addNew( const QString &menuName, const QString& file, KServiceGroup *entry, bool isDeleted)
+KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& file, KServiceGroup *entry, bool isDeleted)
{
KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName);
if (ptr)
@@ -93,7 +93,7 @@ KBuildServiceGroupFactory::addNew( const QString &menuName, const QString& file,
{
// Make sure parent dir exists.
KServiceGroup *parentEntry = 0;
- QString parent = menuName.left(menuName.length()-1);
+ TQString parent = menuName.left(menuName.length()-1);
int i = parent.findRev('/');
if (i > 0) {
parent = parent.left(i+1);
@@ -118,9 +118,9 @@ KBuildServiceGroupFactory::addNew( const QString &menuName, const QString& file,
}
KServiceGroup *
-KBuildServiceGroupFactory::addNewChild( const QString &parent, const char *resource, KSycocaEntry *newEntry)
+KBuildServiceGroupFactory::addNewChild( const TQString &parent, const char *resource, KSycocaEntry *newEntry)
{
- QString name = "#parent#"+parent;
+ TQString name = "#parent#"+parent;
KServiceGroup *entry = 0;
KSycocaEntry::Ptr *ptr = m_entryDict->find(name);
@@ -153,7 +153,7 @@ KBuildServiceGroupFactory::addEntry( KSycocaEntry *newEntry, const char *resourc
}
void
-KBuildServiceGroupFactory::saveHeader(QDataStream &str)
+KBuildServiceGroupFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
@@ -161,7 +161,7 @@ KBuildServiceGroupFactory::saveHeader(QDataStream &str)
}
void
-KBuildServiceGroupFactory::save(QDataStream &str)
+KBuildServiceGroupFactory::save(TQDataStream &str)
{
KSycocaFactory::save(str);
diff --git a/kded/kbuildservicegroupfactory.h b/kded/kbuildservicegroupfactory.h
index 08d825be5..b4d303502 100644
--- a/kded/kbuildservicegroupfactory.h
+++ b/kded/kbuildservicegroupfactory.h
@@ -20,8 +20,8 @@
#define __k_build_service_group_factory_h__
#include <kservicegroupfactory.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
/**
* Service group factory for building ksycoca
@@ -40,14 +40,14 @@ public:
/**
* Create new entry.
*/
- virtual KServiceGroup * createEntry(const QString &, const char *);
+ virtual KServiceGroup * createEntry(const TQString &, const char *);
virtual KServiceGroup * createEntry(int) { assert(0); return 0L; }
/**
* Adds the entry @p newEntry to the menu @p menuName
*/
- void addNewEntryTo( const QString &menuName, KService *newEntry);
+ void addNewEntryTo( const TQString &menuName, KService *newEntry);
/**
* Adds the entry @p newEntry to the "parent group" @p parent, creating
@@ -55,14 +55,14 @@ public:
* A "parent group" is a group of services that all have the same
* "X-KDE-ParentApp".
*/
- KServiceGroup *addNewChild( const QString &parent, const char *resource, KSycocaEntry *newEntry);
+ KServiceGroup *addNewChild( const TQString &parent, const char *resource, KSycocaEntry *newEntry);
/**
* Add new menu @p menuName defined by @p file
* When @p entry is non-null it is re-used, otherwise a new group is created.
* A pointer to the group is returned.
*/
- KServiceGroup *addNew( const QString &menuName, const QString& file, KServiceGroup *entry, bool isDeleted);
+ KServiceGroup *addNew( const TQString &menuName, const TQString& file, KServiceGroup *entry, bool isDeleted);
/**
* Add a new menu entry
@@ -72,17 +72,17 @@ public:
/**
* Write out servicegroup specific index files.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Write out header information
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* Returns all resource types for this service factory
*/
- static QStringList resourceTypes();
+ static TQStringList resourceTypes();
};
#endif
diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp
index d4a5d12d9..4861c3fba 100644
--- a/kded/kbuildservicetypefactory.cpp
+++ b/kded/kbuildservicetypefactory.cpp
@@ -29,7 +29,7 @@
#include <assert.h>
#include <kdesktopfile.h>
-template class QDict<KMimeType>;
+template class TQDict<KMimeType>;
KBuildServiceTypeFactory::KBuildServiceTypeFactory() :
KServiceTypeFactory()
@@ -44,9 +44,9 @@ KBuildServiceTypeFactory::KBuildServiceTypeFactory() :
// return all service types for this factory
// i.e. first arguments to m_resourceList->add() above
-QStringList KBuildServiceTypeFactory::resourceTypes()
+TQStringList KBuildServiceTypeFactory::resourceTypes()
{
- return QStringList() << "servicetypes" << "mime";
+ return TQStringList() << "servicetypes" << "mime";
}
KBuildServiceTypeFactory::~KBuildServiceTypeFactory()
@@ -54,7 +54,7 @@ KBuildServiceTypeFactory::~KBuildServiceTypeFactory()
delete m_resourceList;
}
-KServiceType * KBuildServiceTypeFactory::findServiceTypeByName(const QString &_name)
+KServiceType * KBuildServiceTypeFactory::findServiceTypeByName(const TQString &_name)
{
assert (KSycoca::self()->isBuilding());
// We're building a database - the service type must be in memory
@@ -66,9 +66,9 @@ KServiceType * KBuildServiceTypeFactory::findServiceTypeByName(const QString &_n
KSycocaEntry *
-KBuildServiceTypeFactory::createEntry(const QString &file, const char *resource)
+KBuildServiceTypeFactory::createEntry(const TQString &file, const char *resource)
{
- QString name = file;
+ TQString name = file;
int pos = name.findRev('/');
if (pos != -1)
{
@@ -84,12 +84,12 @@ KBuildServiceTypeFactory::createEntry(const QString &file, const char *resource)
return 0;
// TODO check Type field first
- QString mime = desktopFile.readEntry( "MimeType" );
- QString service = desktopFile.readEntry( "X-KDE-ServiceType" );
+ TQString mime = desktopFile.readEntry( "MimeType" );
+ TQString service = desktopFile.readEntry( "X-KDE-ServiceType" );
if ( mime.isEmpty() && service.isEmpty() )
{
- QString tmp = QString("The service/mime type config file\n%1\n"
+ TQString tmp = TQString("The service/mime type config file\n%1\n"
"does not contain a ServiceType=...\nor MimeType=... entry").arg( file );
kdWarning(7012) << tmp << endl;
return 0;
@@ -124,14 +124,14 @@ KBuildServiceTypeFactory::createEntry(const QString &file, const char *resource)
}
void
-KBuildServiceTypeFactory::saveHeader(QDataStream &str)
+KBuildServiceTypeFactory::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
str << (Q_INT32) m_fastPatternOffset;
str << (Q_INT32) m_otherPatternOffset;
str << (Q_INT32) m_propertyTypeDict.count();
- QMapIterator<QString, int> it;
+ TQMapIterator<TQString, int> it;
for (it = m_propertyTypeDict.begin(); it != m_propertyTypeDict.end(); ++it)
{
str << it.key() << (Q_INT32)it.data();
@@ -140,7 +140,7 @@ KBuildServiceTypeFactory::saveHeader(QDataStream &str)
}
void
-KBuildServiceTypeFactory::save(QDataStream &str)
+KBuildServiceTypeFactory::save(TQDataStream &str)
{
KSycocaFactory::save(str);
@@ -156,15 +156,15 @@ KBuildServiceTypeFactory::save(QDataStream &str)
}
void
-KBuildServiceTypeFactory::savePatternLists(QDataStream &str)
+KBuildServiceTypeFactory::savePatternLists(TQDataStream &str)
{
// Store each patterns in one of the 2 string lists (for sorting)
- QStringList fastPatterns; // for *.a to *.abcd
- QStringList otherPatterns; // for the rest (core.*, *.tar.bz2, *~) ...
- QDict<KMimeType> dict;
+ TQStringList fastPatterns; // for *.a to *.abcd
+ TQStringList otherPatterns; // for the rest (core.*, *.tar.bz2, *~) ...
+ TQDict<KMimeType> dict;
// For each mimetype in servicetypeFactory
- for(QDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
@@ -172,11 +172,11 @@ KBuildServiceTypeFactory::savePatternLists(QDataStream &str)
if ( entry->isType( KST_KMimeType ) )
{
KMimeType *mimeType = (KMimeType *) entry;
- QStringList pat = mimeType->patterns();
- QStringList::ConstIterator patit = pat.begin();
+ TQStringList pat = mimeType->patterns();
+ TQStringList::ConstIterator patit = pat.begin();
for ( ; patit != pat.end() ; ++patit )
{
- const QString &pattern = *patit;
+ const TQString &pattern = *patit;
if ( pattern.findRev('*') == 0
&& pattern.findRev('.') == 1
&& pattern.length() <= 6 )
@@ -205,14 +205,14 @@ KBuildServiceTypeFactory::savePatternLists(QDataStream &str)
str << entrySize;
// For each fast pattern
- QStringList::ConstIterator it = fastPatterns.begin();
+ TQStringList::ConstIterator it = fastPatterns.begin();
for ( ; it != fastPatterns.end() ; ++it )
{
int start = str.device()->at();
// Justify to 6 chars with spaces, so that the size remains constant
// in the database file.
- QString paddedPattern = (*it).leftJustify(6).right(4); // remove leading "*."
- //kdDebug(7021) << QString("FAST : '%1' '%2'").arg(paddedPattern).arg(dict[(*it)]->name()) << endl;
+ TQString paddedPattern = (*it).leftJustify(6).right(4); // remove leading "*."
+ //kdDebug(7021) << TQString("FAST : '%1' '%2'").arg(paddedPattern).arg(dict[(*it)]->name()) << endl;
str << paddedPattern;
str << dict[(*it)]->offset();
entrySize = str.device()->at() - start;
@@ -233,12 +233,12 @@ KBuildServiceTypeFactory::savePatternLists(QDataStream &str)
it = otherPatterns.begin();
for ( ; it != otherPatterns.end() ; ++it )
{
- //kdDebug(7021) << QString("OTHER : '%1' '%2'").arg(*it).arg(dict[(*it)]->name()) << endl;
+ //kdDebug(7021) << TQString("OTHER : '%1' '%2'").arg(*it).arg(dict[(*it)]->name()) << endl;
str << (*it);
str << dict[(*it)]->offset();
}
- str << QString(""); // end of list marker (has to be a string !)
+ str << TQString(""); // end of list marker (has to be a string !)
}
void
@@ -257,8 +257,8 @@ KBuildServiceTypeFactory::addEntry(KSycocaEntry *newEntry, const char *resource)
KSycocaFactory::addEntry(newEntry, resource);
- const QMap<QString,QVariant::Type>& pd = serviceType->propertyDefs();
- QMap<QString,QVariant::Type>::ConstIterator pit = pd.begin();
+ const TQMap<TQString,TQVariant::Type>& pd = serviceType->propertyDefs();
+ TQMap<TQString,TQVariant::Type>::ConstIterator pit = pd.begin();
for( ; pit != pd.end(); ++pit )
{
if (!m_propertyTypeDict.contains(pit.key()))
diff --git a/kded/kbuildservicetypefactory.h b/kded/kbuildservicetypefactory.h
index ea99785ad..a68b8851b 100644
--- a/kded/kbuildservicetypefactory.h
+++ b/kded/kbuildservicetypefactory.h
@@ -21,7 +21,7 @@
#define __k_build_service_type_factory_h__
#include <kservicetypefactory.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* Service-type factory for building ksycoca
@@ -41,12 +41,12 @@ public:
* Find a service type in the database file
* @return a pointer to the servicetype in the memory dict (don't free!)
*/
- virtual KServiceType * findServiceTypeByName(const QString &_name);
+ virtual KServiceType * findServiceTypeByName(const TQString &_name);
/**
* Construct a KServiceType from a config file.
*/
- virtual KSycocaEntry * createEntry(const QString &file, const char *resource);
+ virtual KSycocaEntry * createEntry(const TQString &file, const char *resource);
virtual KServiceType * createEntry( int ) { assert(0); return 0L; }
@@ -58,7 +58,7 @@ public:
/**
* Write out service type specific index files.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Write out header information
@@ -66,15 +66,15 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* Returns all resource types for this service factory
*/
- static QStringList resourceTypes();
+ static TQStringList resourceTypes();
private:
- void savePatternLists(QDataStream &str);
+ void savePatternLists(TQDataStream &str);
};
#endif
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp
index cc89515fc..20669faa4 100644
--- a/kded/kbuildsycoca.cpp
+++ b/kded/kbuildsycoca.cpp
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qdir.h>
-#include <qeventloop.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
#include <config.h>
#include "kbuildsycoca.h"
@@ -35,9 +35,9 @@
#include <kctimefactory.h>
#include <kdatastream.h>
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <assert.h>
#include <kapplication.h>
@@ -54,7 +54,7 @@
#ifdef KBUILDSYCOCA_GUI // KBUILDSYCOCA_GUI is used on win32 to build
// GUI version of kbuildsycoca, so-called "kbuildsycocaw".
-# include <qlabel.h>
+# include <tqlabel.h>
# include <kmessagebox.h>
bool silent;
bool showprogress;
@@ -65,8 +65,8 @@
#include <time.h>
#include <memory> // auto_ptr
-typedef QDict<KSycocaEntry> KBSEntryDict;
-typedef QValueList<KSycocaEntry::List> KSycocaEntryListList;
+typedef TQDict<KSycocaEntry> KBSEntryDict;
+typedef TQValueList<KSycocaEntry::List> KSycocaEntryListList;
static Q_UINT32 newTimestamp = 0;
@@ -74,13 +74,13 @@ static KBuildServiceFactory *g_bsf = 0;
static KBuildServiceGroupFactory *g_bsgf = 0;
static KSycocaFactory *g_factory = 0;
static KCTimeInfo *g_ctimeInfo = 0;
-static QDict<Q_UINT32> *g_ctimeDict = 0;
+static TQDict<Q_UINT32> *g_ctimeDict = 0;
static const char *g_resource = 0;
static KBSEntryDict *g_entryDict = 0;
static KBSEntryDict *g_serviceGroupEntryDict = 0;
static KSycocaEntryListList *g_allEntries = 0;
-static QStringList *g_changeList = 0;
-static QStringList *g_allResourceDirs = 0;
+static TQStringList *g_changeList = 0;
+static TQStringList *g_allResourceDirs = 0;
static bool g_changed = false;
static KSycocaEntry::List g_tempStorage;
static VFolderMenu *g_vfolder = 0;
@@ -98,9 +98,9 @@ void crashHandler(int)
unlink(cSycocaPath);
}
-static QString sycocaPath()
+static TQString sycocaPath()
{
- QString path;
+ TQString path;
if (bGlobalDatabase)
{
@@ -108,23 +108,23 @@ static QString sycocaPath()
}
else
{
- QCString ksycoca_env = getenv("KDESYCOCA");
+ TQCString ksycoca_env = getenv("KDESYCOCA");
if (ksycoca_env.isEmpty())
path = KGlobal::dirs()->saveLocation("cache")+"ksycoca";
else
- path = QFile::decodeName(ksycoca_env);
+ path = TQFile::decodeName(ksycoca_env);
}
return path;
}
-static QString oldSycocaPath()
+static TQString oldSycocaPath()
{
- QCString ksycoca_env = getenv("KDESYCOCA");
+ TQCString ksycoca_env = getenv("KDESYCOCA");
if (ksycoca_env.isEmpty())
return KGlobal::dirs()->saveLocation("tmp")+"ksycoca";
- return QString::null;
+ return TQString::null;
}
KBuildSycoca::KBuildSycoca()
@@ -139,18 +139,18 @@ KBuildSycoca::~KBuildSycoca()
void KBuildSycoca::processGnomeVfs()
{
- QString file = locate("app-reg", "gnome-vfs.applications");
+ TQString file = locate("app-reg", "gnome-vfs.applications");
if (file.isEmpty())
{
// kdDebug(7021) << "gnome-vfs.applications not found." << endl;
return;
}
- QString app;
+ TQString app;
char line[1024*64];
- FILE *f = fopen(QFile::encodeName(file), "r");
+ FILE *f = fopen(TQFile::encodeName(file), "r");
while (!feof(f))
{
if (!fgets(line, sizeof(line)-1, f))
@@ -160,22 +160,22 @@ void KBuildSycoca::processGnomeVfs()
if (line[0] != '\t')
{
- app = QString::fromLatin1(line);
+ app = TQString::fromLatin1(line);
app.truncate(app.length()-1);
}
else if (strncmp(line+1, "mime_types=", 11) == 0)
{
- QString mimetypes = QString::fromLatin1(line+12);
+ TQString mimetypes = TQString::fromLatin1(line+12);
mimetypes.truncate(mimetypes.length()-1);
- mimetypes.replace(QRegExp("\\*"), "all");
+ mimetypes.replace(TQRegExp("\\*"), "all");
KService *s = g_bsf->findServiceByName(app);
if (!s)
continue;
- QStringList &serviceTypes = s->accessServiceTypes();
+ TQStringList &serviceTypes = s->accessServiceTypes();
if (serviceTypes.count() <= 1)
{
- serviceTypes += QStringList::split(',', mimetypes);
+ serviceTypes += TQStringList::split(',', mimetypes);
// kdDebug(7021) << "Adding gnome mimetypes for '" << app << "'.\n";
// kdDebug(7021) << "ServiceTypes=" << s->serviceTypes().join(":") << endl;
}
@@ -184,7 +184,7 @@ void KBuildSycoca::processGnomeVfs()
fclose( f );
}
-KSycocaEntry *KBuildSycoca::createEntry(const QString &file, bool addToFactory)
+KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory)
{
Q_UINT32 timeStamp = g_ctimeInfo->ctime(file);
if (!timeStamp)
@@ -246,7 +246,7 @@ KSycocaEntry *KBuildSycoca::createEntry(const QString &file, bool addToFactory)
return 0;
}
-void KBuildSycoca::slotCreateEntry(const QString &file, KService **service)
+void KBuildSycoca::slotCreateEntry(const TQString &file, KService **service)
{
KSycocaEntry *entry = createEntry(file, false);
*service = dynamic_cast<KService *>(entry);
@@ -255,7 +255,7 @@ void KBuildSycoca::slotCreateEntry(const QString &file, KService **service)
// returns false if the database is up to date
bool KBuildSycoca::build()
{
- typedef QPtrList<KBSEntryDict> KBSEntryDictList;
+ typedef TQPtrList<KBSEntryDict> KBSEntryDictList;
KBSEntryDictList *entryDictList = 0;
KBSEntryDict *serviceEntryDict = 0;
@@ -285,7 +285,7 @@ bool KBuildSycoca::build()
entryDictList->append(entryDict);
}
- QStringList allResources;
+ TQStringList allResources;
// For each factory
for (KSycocaFactory *factory = m_lstFactories->first();
factory;
@@ -308,17 +308,17 @@ bool KBuildSycoca::build()
g_ctimeInfo = new KCTimeInfo(); // This is a build factory too, don't delete!!
bool uptodate = true;
// For all resources
- for( QStringList::ConstIterator it1 = allResources.begin();
+ for( TQStringList::ConstIterator it1 = allResources.begin();
it1 != allResources.end();
++it1 )
{
g_changed = false;
g_resource = (*it1).ascii();
- QStringList relFiles;
+ TQStringList relFiles;
(void) KGlobal::dirs()->findAllResources( g_resource,
- QString::null,
+ TQString::null,
true, // Recursive!
true, // uniq
relFiles);
@@ -344,7 +344,7 @@ bool KBuildSycoca::build()
if (res.resource != (*it1)) continue;
// For each file in the resource
- for( QStringList::ConstIterator it3 = relFiles.begin();
+ for( TQStringList::ConstIterator it3 = relFiles.begin();
it3 != relFiles.end();
++it3 )
{
@@ -376,22 +376,22 @@ bool KBuildSycoca::build()
if (!m_trackId.isEmpty())
g_vfolder->setTrackId(m_trackId);
- connect(g_vfolder, SIGNAL(newService(const QString &, KService **)),
- this, SLOT(slotCreateEntry(const QString &, KService **)));
+ connect(g_vfolder, TQT_SIGNAL(newService(const TQString &, KService **)),
+ this, TQT_SLOT(slotCreateEntry(const TQString &, KService **)));
VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
KServiceGroup *entry = g_bsgf->addNew("/", kdeMenu->directoryFile, 0, false);
entry->setLayoutInfo(kdeMenu->layoutList);
- createMenu(QString::null, QString::null, kdeMenu);
+ createMenu(TQString::null, TQString::null, kdeMenu);
KServiceGroup::Ptr g(entry);
(void) existingResourceDirs();
*g_allResourceDirs += g_vfolder->allDirectories();
- disconnect(g_vfolder, SIGNAL(newService(const QString &, KService **)),
- this, SLOT(slotCreateEntry(const QString &, KService **)));
+ disconnect(g_vfolder, TQT_SIGNAL(newService(const TQString &, KService **)),
+ this, TQT_SLOT(slotCreateEntry(const TQString &, KService **)));
if (g_changed || !g_allEntries)
{
@@ -405,13 +405,13 @@ bool KBuildSycoca::build()
return result;
}
-void KBuildSycoca::createMenu(QString caption, QString name, VFolderMenu::SubMenu *menu)
+void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubMenu *menu)
{
for(VFolderMenu::SubMenu *subMenu = menu->subMenus.first(); subMenu; subMenu = menu->subMenus.next())
{
- QString subName = name+subMenu->name+"/";
+ TQString subName = name+subMenu->name+"/";
- QString directoryFile = subMenu->directoryFile;
+ TQString directoryFile = subMenu->directoryFile;
if (directoryFile.isEmpty())
directoryFile = subName+".directory";
Q_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile);
@@ -444,7 +444,7 @@ void KBuildSycoca::createMenu(QString caption, QString name, VFolderMenu::SubMen
caption += "/";
if (name.isEmpty())
name += "/";
- for(QDictIterator<KService> it(menu->items); it.current(); ++it)
+ for(TQDictIterator<KService> it(menu->items); it.current(); ++it)
{
if (bMenuTest)
{
@@ -461,7 +461,7 @@ void KBuildSycoca::createMenu(QString caption, QString name, VFolderMenu::SubMen
bool KBuildSycoca::recreate()
{
- QString path(sycocaPath());
+ TQString path(sycocaPath());
#ifdef Q_WS_WIN
printf("kbuildsycoca: path='%s'\n", (const char*)path);
#endif
@@ -469,9 +469,9 @@ bool KBuildSycoca::recreate()
// KSaveFile first writes to a temp file.
// Upon close() it moves the stuff to the right place.
std::auto_ptr<KSaveFile> database( new KSaveFile(path) );
- if (database->status() == EACCES && QFile::exists(path))
+ if (database->status() == EACCES && TQFile::exists(path))
{
- QFile::remove( path );
+ TQFile::remove( path );
database.reset( new KSaveFile(path) ); // try again
}
if (database->status() != 0)
@@ -526,10 +526,10 @@ bool KBuildSycoca::recreate()
if (!bGlobalDatabase)
{
// update the timestamp file
- QString stamppath = path + "stamp";
- QFile ksycocastamp(stamppath);
+ TQString stamppath = path + "stamp";
+ TQFile ksycocastamp(stamppath);
ksycocastamp.open( IO_WriteOnly );
- QDataStream str( &ksycocastamp );
+ TQDataStream str( &ksycocastamp );
str << newTimestamp;
str << existingResourceDirs();
if (g_vfolder)
@@ -602,19 +602,19 @@ void KBuildSycoca::save()
m_str->device()->at(endOfData);
}
-bool KBuildSycoca::checkDirTimestamps( const QString& dirname, const QDateTime& stamp, bool top )
+bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime& stamp, bool top )
{
if( top )
{
- QFileInfo inf( dirname );
+ TQFileInfo inf( dirname );
if( inf.lastModified() > stamp )
{
kdDebug( 7021 ) << "timestamp changed:" << dirname << endl;
return false;
}
}
- QDir dir( dirname );
- const QFileInfoList *list = dir.entryInfoList( QDir::DefaultFilter, QDir::Unsorted );
+ TQDir dir( dirname );
+ const QFileInfoList *list = dir.entryInfoList( TQDir::DefaultFilter, TQDir::Unsorted );
if (!list)
return true;
@@ -622,7 +622,7 @@ bool KBuildSycoca::checkDirTimestamps( const QString& dirname, const QDateTime&
it.current() != NULL;
++it )
{
- QFileInfo* fi = it.current();
+ TQFileInfo* fi = it.current();
if( fi->fileName() == "." || fi->fileName() == ".." )
continue;
if( fi->lastModified() > stamp )
@@ -640,12 +640,12 @@ bool KBuildSycoca::checkDirTimestamps( const QString& dirname, const QDateTime&
// and also their directories
// if all of them all older than the timestamp in file ksycocastamp, this
// means that there's no need to rebuild ksycoca
-bool KBuildSycoca::checkTimestamps( Q_UINT32 timestamp, const QStringList &dirs )
+bool KBuildSycoca::checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs )
{
kdDebug( 7021 ) << "checking file timestamps" << endl;
- QDateTime stamp;
+ TQDateTime stamp;
stamp.setTime_t( timestamp );
- for( QStringList::ConstIterator it = dirs.begin();
+ for( TQStringList::ConstIterator it = dirs.begin();
it != dirs.end();
++it )
{
@@ -656,15 +656,15 @@ bool KBuildSycoca::checkTimestamps( Q_UINT32 timestamp, const QStringList &dirs
return true;
}
-QStringList KBuildSycoca::existingResourceDirs()
+TQStringList KBuildSycoca::existingResourceDirs()
{
- static QStringList* dirs = NULL;
+ static TQStringList* dirs = NULL;
if( dirs != NULL )
return *dirs;
dirs = new QStringList;
g_allResourceDirs = new QStringList;
// these are all resources cached by ksycoca
- QStringList resources;
+ TQStringList resources;
resources += KBuildServiceTypeFactory::resourceTypes();
resources += KBuildServiceGroupFactory::resourceTypes();
resources += KBuildServiceFactory::resourceTypes();
@@ -672,17 +672,17 @@ QStringList KBuildSycoca::existingResourceDirs()
resources += KBuildProtocolInfoFactory::resourceTypes();
while( !resources.empty())
{
- QString res = resources.front();
+ TQString res = resources.front();
*dirs += KGlobal::dirs()->resourceDirs( res.latin1());
resources.remove( res ); // remove this 'res' and all its duplicates
}
*g_allResourceDirs = *dirs;
- for( QStringList::Iterator it = dirs->begin();
+ for( TQStringList::Iterator it = dirs->begin();
it != dirs->end(); )
{
- QFileInfo inf( *it );
+ TQFileInfo inf( *it );
if( !inf.exists() || !inf.isReadable() )
it = dirs->remove( it );
else
@@ -747,8 +747,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
#ifdef KBUILDSYCOCA_GUI
silent = args->isSet("silent");
showprogress = args->isSet("showprogress");
- QLabel progress( QString("<p><br><nobr> %1 </nobr><br>").arg( i18n("Reloading KDE configuration, please wait...") ), 0, "", Qt::WType_Dialog | Qt::WStyle_DialogBorder | Qt::WStyle_Customize| Qt::WStyle_Title );
- QString capt = i18n("KDE Configuration Manager");
+ TQLabel progress( TQString("<p><br><nobr> %1 </nobr><br>").arg( i18n("Reloading KDE configuration, please wait...") ), 0, "", Qt::WType_Dialog | Qt::WStyle_DialogBorder | Qt::WStyle_Customize| Qt::WStyle_Title );
+ TQString capt = i18n("KDE Configuration Manager");
if (!silent) {
if (KMessageBox::No == KMessageBox::questionYesNo(0, i18n("Do you want to reload KDE configuration?"), capt, i18n("Reload"), i18n("Do Not Reload")))
return 0;
@@ -761,7 +761,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KCrash::setCrashHandler(KCrash::defaultCrashHandler);
KCrash::setEmergencySaveFunction(crashHandler);
- KCrash::setApplicationName(QString(appName));
+ KCrash::setApplicationName(TQString(appName));
// this program is in kdelibs so it uses kdelibs as catalog
KLocale::setMainCatalogue("kdelibs");
@@ -774,7 +774,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
while(true)
{
- QCString registeredName = dcopClient->registerAs(appName, false);
+ TQCString registeredName = dcopClient->registerAs(appName, false);
if (registeredName.isEmpty())
{
fprintf(stderr, "Warning: %s is unable to register with DCOP.\n", appName);
@@ -790,8 +790,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
while (dcopClient->isApplicationRegistered(appName))
{
WaitForSignal *obj = new WaitForSignal;
- obj->connect(dcopClient, SIGNAL(applicationRemoved(const QCString &)),
- SLOT(deleteLater()));
+ obj->connect(dcopClient, TQT_SIGNAL(applicationRemoved(const TQCString &)),
+ TQT_SLOT(deleteLater()));
kapp->eventLoop()->enterLoop();
}
dcopClient->setNotifications( false );
@@ -804,8 +804,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
if (incremental || !checkfiles)
{
KSycoca::self()->disableAutoRebuild(); // Prevent deadlock
- QString current_language = KGlobal::locale()->language();
- QString ksycoca_language = KSycoca::self()->language();
+ TQString current_language = KGlobal::locale()->language();
+ TQString ksycoca_language = KSycoca::self()->language();
Q_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true);
Q_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature();
@@ -823,16 +823,16 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
bool checkstamps = incremental && args->isSet("checkstamps") && checkfiles;
Q_UINT32 filestamp = 0;
- QStringList oldresourcedirs;
+ TQStringList oldresourcedirs;
if( checkstamps && incremental )
{
- QString path = sycocaPath()+"stamp";
- QCString qPath = QFile::encodeName(path);
+ TQString path = sycocaPath()+"stamp";
+ TQCString qPath = TQFile::encodeName(path);
cSycocaPath = qPath.data(); // Delete timestamps on crash
- QFile ksycocastamp(path);
+ TQFile ksycocastamp(path);
if( ksycocastamp.open( IO_ReadOnly ))
{
- QDataStream str( &ksycocastamp );
+ TQDataStream str( &ksycocastamp );
if (!str.atEnd())
str >> filestamp;
if (!str.atEnd())
@@ -847,7 +847,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
}
if (!str.atEnd())
{
- QStringList extraResourceDirs;
+ TQStringList extraResourceDirs;
str >> extraResourceDirs;
oldresourcedirs += extraResourceDirs;
}
@@ -863,7 +863,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
if( checkfiles && ( !checkstamps || !KBuildSycoca::checkTimestamps( filestamp, oldresourcedirs )))
{
- QCString qSycocaPath = QFile::encodeName(sycocaPath());
+ TQCString qSycocaPath = TQFile::encodeName(sycocaPath());
cSycocaPath = qSycocaPath.data();
g_allEntries = 0;
@@ -874,7 +874,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KSycoca *oldSycoca = KSycoca::self();
KSycocaFactoryList *factories = new KSycocaFactoryList;
g_allEntries = new KSycocaEntryListList;
- g_ctimeDict = new QDict<Q_UINT32>(523);
+ g_ctimeDict = new TQDict<Q_UINT32>(523);
// Must be in same order as in KBuildSycoca::recreate()!
factories->append( new KServiceTypeFactory );
@@ -901,7 +901,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KBuildSycoca *sycoca= new KBuildSycoca; // Build data base
if (args->isSet("track"))
- sycoca->setTrackId(QString::fromLocal8Bit(args->getOption("track")));
+ sycoca->setTrackId(TQString::fromLocal8Bit(args->getOption("track")));
if (!sycoca->recreate()) {
#ifdef KBUILDSYCOCA_GUI
if (!silent || showprogress)
@@ -914,26 +914,26 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
// These directories may have been created with 0700 permission
// better delete them if they are empty
- QString applnkDir = KGlobal::dirs()->saveLocation("apps", QString::null, false);
- ::rmdir(QFile::encodeName(applnkDir));
- QString servicetypesDir = KGlobal::dirs()->saveLocation("servicetypes", QString::null, false);
- ::rmdir(QFile::encodeName(servicetypesDir));
+ TQString applnkDir = KGlobal::dirs()->saveLocation("apps", TQString::null, false);
+ ::rmdir(TQFile::encodeName(applnkDir));
+ TQString servicetypesDir = KGlobal::dirs()->saveLocation("servicetypes", TQString::null, false);
+ ::rmdir(TQFile::encodeName(servicetypesDir));
}
}
if (!bGlobalDatabase)
{
// Recreate compatibility symlink
- QString oldPath = oldSycocaPath();
+ TQString oldPath = oldSycocaPath();
if (!oldPath.isEmpty())
{
KTempFile tmp;
if (tmp.status() == 0)
{
- QString tmpFile = tmp.name();
+ TQString tmpFile = tmp.name();
tmp.unlink();
- symlink(QFile::encodeName(sycocaPath()), QFile::encodeName(tmpFile));
- rename(QFile::encodeName(tmpFile), QFile::encodeName(oldPath));
+ symlink(TQFile::encodeName(sycocaPath()), TQFile::encodeName(tmpFile));
+ rename(TQFile::encodeName(tmpFile), TQFile::encodeName(oldPath));
}
}
}
@@ -941,10 +941,10 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
if (args->isSet("signal"))
{
// Notify ALL applications that have a ksycoca object, using a broadcast
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << *g_changeList;
- dcopClient->send( "*", "ksycoca", "notifyDatabaseChanged(QStringList)", data );
+ dcopClient->send( "*", "ksycoca", "notifyDatabaseChanged(TQStringList)", data );
}
#ifdef KBUILDSYCOCA_GUI
diff --git a/kded/kbuildsycoca.h b/kded/kbuildsycoca.h
index ec7210437..809b55309 100644
--- a/kded/kbuildsycoca.h
+++ b/kded/kbuildsycoca.h
@@ -20,9 +20,9 @@
#include <sys/stat.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdict.h>
#include <kservice.h>
#include <ksycoca.h>
@@ -47,14 +47,14 @@ public:
*/
bool recreate();
- static bool checkTimestamps( Q_UINT32 timestamp, const QStringList &dirs );
+ static bool checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs );
- static QStringList existingResourceDirs();
+ static TQStringList existingResourceDirs();
- void setTrackId(const QString &id) { m_trackId = id; }
+ void setTrackId(const TQString &id) { m_trackId = id; }
protected slots:
- void slotCreateEntry(const QString &file, KService **entry);
+ void slotCreateEntry(const TQString &file, KService **entry);
protected:
@@ -67,12 +67,12 @@ protected:
* Add single entry to the sycoca database.
* Either from a previous database or regenerated from file.
*/
- KSycocaEntry *createEntry(const QString &file, bool addToFactory);
+ KSycocaEntry *createEntry(const TQString &file, bool addToFactory);
/**
* Convert a VFolderMenu::SubMenu to KServiceGroups.
*/
- void createMenu(QString caption, QString name, VFolderMenu::SubMenu *menu);
+ void createMenu(TQString caption, TQString name, VFolderMenu::SubMenu *menu);
/**
* Build the whole system cache, from .desktop files
@@ -89,7 +89,7 @@ protected:
*/
void clear();
- static bool checkDirTimestamps( const QString& dir, const QDateTime& stamp, bool top );
+ static bool checkDirTimestamps( const TQString& dir, const TQDateTime& stamp, bool top );
/**
* @internal
@@ -97,8 +97,8 @@ protected:
*/
virtual bool isBuilding() { return true; }
- QStringList m_allResourceDirs;
- QString m_trackId;
+ TQStringList m_allResourceDirs;
+ TQString m_trackId;
};
#endif
diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp
index bfc69af2c..25d78bab0 100644
--- a/kded/kctimefactory.cpp
+++ b/kded/kctimefactory.cpp
@@ -41,7 +41,7 @@ KCTimeInfo::~KCTimeInfo()
}
void
-KCTimeInfo::saveHeader(QDataStream &str)
+KCTimeInfo::saveHeader(TQDataStream &str)
{
KSycocaFactory::saveHeader(str);
@@ -49,18 +49,18 @@ KCTimeInfo::saveHeader(QDataStream &str)
}
void
-KCTimeInfo::save(QDataStream &str)
+KCTimeInfo::save(TQDataStream &str)
{
KSycocaFactory::save(str);
m_dictOffset = str.device()->at();
- QDictIterator<Q_UINT32> it(ctimeDict);
+ TQDictIterator<Q_UINT32> it(ctimeDict);
while( it.current())
{
str << it.currentKey() << *(it.current());
++it;
}
- str << QString::null << (Q_UINT32) 0;
+ str << TQString::null << (Q_UINT32) 0;
int endOfFactoryData = str.device()->at();
@@ -69,25 +69,25 @@ KCTimeInfo::save(QDataStream &str)
}
void
-KCTimeInfo::addCTime(const QString &path, Q_UINT32 ctime)
+KCTimeInfo::addCTime(const TQString &path, Q_UINT32 ctime)
{
assert(!path.isEmpty());
ctimeDict.replace(path, new Q_UINT32(ctime));
}
Q_UINT32
-KCTimeInfo::ctime(const QString &path)
+KCTimeInfo::ctime(const TQString &path)
{
Q_UINT32 *ctimeP = ctimeDict[path];
return ctimeP ? *ctimeP : 0;
}
void
-KCTimeInfo::fillCTimeDict(QDict<Q_UINT32> &dict)
+KCTimeInfo::fillCTimeDict(TQDict<Q_UINT32> &dict)
{
assert(m_str);
m_str->device()->at(m_dictOffset);
- QString path;
+ TQString path;
Q_UINT32 ctime;
while(true)
{
diff --git a/kded/kctimefactory.h b/kded/kctimefactory.h
index 616d5f6ff..b878b3033 100644
--- a/kded/kctimefactory.h
+++ b/kded/kctimefactory.h
@@ -20,7 +20,7 @@
#define __k_ctime_factory_h__
#include <ksycocafactory.h>
-#include <qdict.h>
+#include <tqdict.h>
/**
* Service group factory for building ksycoca
@@ -40,24 +40,24 @@ public:
/**
* Write out header information
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* Write out data
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
- KSycocaEntry * createEntry(const QString &, const char *) { return 0; }
+ KSycocaEntry * createEntry(const TQString &, const char *) { return 0; }
KSycocaEntry * createEntry(int) { return 0; }
- void addCTime(const QString &path, Q_UINT32 ctime);
+ void addCTime(const TQString &path, Q_UINT32 ctime);
- Q_UINT32 ctime(const QString &path);
+ Q_UINT32 ctime(const TQString &path);
- void fillCTimeDict(QDict<Q_UINT32> &dict);
+ void fillCTimeDict(TQDict<Q_UINT32> &dict);
protected:
- QDict<Q_UINT32> ctimeDict;
+ TQDict<Q_UINT32> ctimeDict;
int m_dictOffset;
};
diff --git a/kded/kde-menu.cpp b/kded/kde-menu.cpp
index 242fcce4c..89ee5a857 100644
--- a/kded/kde-menu.cpp
+++ b/kded/kde-menu.cpp
@@ -18,7 +18,7 @@
#include <stdlib.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -50,7 +50,7 @@ static bool bPrintMenuId;
static bool bPrintMenuName;
static bool bHighlight;
-static void result(const QString &txt)
+static void result(const TQString &txt)
{
if (utf8)
puts( txt.utf8() );
@@ -58,13 +58,13 @@ static void result(const QString &txt)
puts( txt.local8Bit() );
}
-static void error(int exitCode, const QString &txt)
+static void error(int exitCode, const TQString &txt)
{
qWarning("kde-menu: %s", txt.local8Bit().data());
exit(exitCode);
}
-static void findMenuEntry(KServiceGroup::Ptr parent, const QString &name, const QString &menuId)
+static void findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const TQString &menuId)
{
KServiceGroup::List list = parent->entries(true, true, false);
KServiceGroup::List::ConstIterator it = list.begin();
@@ -143,11 +143,11 @@ int main(int argc, char **argv)
if (args->isSet("cache-update"))
{
- QStringList args;
+ TQStringList args;
args.append("--incremental");
args.append("--checkstamps");
- QString command = "kbuildsycoca";
- QCString _launcher = KApplication::launcher();
+ TQString command = "kbuildsycoca";
+ TQCString _launcher = KApplication::launcher();
if (!DCOPRef(_launcher, _launcher).call("kdeinit_exec_wait", command, args).isValid())
{
qWarning("Can't talk to klauncher!");
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
}
}
- QString menuId = QFile::decodeName(args->arg(0));
+ TQString menuId = TQFile::decodeName(args->arg(0));
KService::Ptr s = KService::serviceByMenuId(menuId);
if (!s)
diff --git a/kded/kded.cpp b/kded/kded.cpp
index df16faddb..fa655df42 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qdir.h>
+#include <tqdir.h>
#include "kded.h"
#include "kdedmodule.h"
@@ -30,8 +30,8 @@
#include <signal.h>
#include <time.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <dcopclient.h>
@@ -58,9 +58,9 @@ Kded *Kded::_self = 0;
static bool checkStamps = true;
static bool delayedCheck = false;
-static void runBuildSycoca(QObject *callBackObj=0, const char *callBackSlot=0)
+static void runBuildSycoca(TQObject *callBackObj=0, const char *callBackSlot=0)
{
- QStringList args;
+ TQStringList args;
args.append("--incremental");
if(checkStamps)
args.append("--checkstamps");
@@ -70,12 +70,12 @@ static void runBuildSycoca(QObject *callBackObj=0, const char *callBackSlot=0)
checkStamps = false; // useful only during kded startup
if (callBackObj)
{
- QByteArray data;
- QDataStream dataStream( data, IO_WriteOnly );
- dataStream << QString("kbuildsycoca") << args;
- QCString _launcher = KApplication::launcher();
+ TQByteArray data;
+ TQDataStream dataStream( data, IO_WriteOnly );
+ dataStream << TQString("kbuildsycoca") << args;
+ TQCString _launcher = KApplication::launcher();
- kapp->dcopClient()->callAsync(_launcher, _launcher, "kdeinit_exec_wait(QString,QStringList)", data, callBackObj, callBackSlot);
+ kapp->dcopClient()->callAsync(_launcher, _launcher, "kdeinit_exec_wait(TQString,TQStringList)", data, callBackObj, callBackSlot);
}
else
{
@@ -85,14 +85,14 @@ static void runBuildSycoca(QObject *callBackObj=0, const char *callBackSlot=0)
static void runKonfUpdate()
{
- KApplication::kdeinitExecWait( "kconf_update", QStringList(), 0, 0, "0" /*no startup notification*/ );
+ KApplication::kdeinitExecWait( "kconf_update", TQStringList(), 0, 0, "0" /*no startup notification*/ );
}
-static void runDontChangeHostname(const QCString &oldName, const QCString &newName)
+static void runDontChangeHostname(const TQCString &oldName, const TQCString &newName)
{
- QStringList args;
- args.append(QFile::decodeName(oldName));
- args.append(QFile::decodeName(newName));
+ TQStringList args;
+ args.append(TQFile::decodeName(oldName));
+ args.append(TQFile::decodeName(newName));
KApplication::kdeinitExecWait( "kdontchangethehostname", args );
}
@@ -103,16 +103,16 @@ Kded::Kded(bool checkUpdates, bool new_startup)
m_newStartup( new_startup )
{
_self = this;
- QCString cPath;
- QCString ksycoca_env = getenv("KDESYCOCA");
+ TQCString cPath;
+ TQCString ksycoca_env = getenv("KDESYCOCA");
if (ksycoca_env.isEmpty())
- cPath = QFile::encodeName(KGlobal::dirs()->saveLocation("tmp")+"ksycoca");
+ cPath = TQFile::encodeName(KGlobal::dirs()->saveLocation("tmp")+"ksycoca");
else
cPath = ksycoca_env;
- m_pTimer = new QTimer(this);
- connect(m_pTimer, SIGNAL(timeout()), this, SLOT(recreate()));
+ m_pTimer = new TQTimer(this);
+ connect(m_pTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(recreate()));
- QTimer::singleShot(100, this, SLOT(installCrashHandler()));
+ TQTimer::singleShot(100, this, TQT_SLOT(installCrashHandler()));
m_pDirWatch = 0;
@@ -130,14 +130,14 @@ Kded::~Kded()
delete m_pDirWatch;
// We have to delete the modules while we're still able to process incoming
// DCOP messages, since modules might make DCOP calls in their destructors.
- QAsciiDictIterator<KDEDModule> it(m_modules);
+ TQAsciiDictIterator<KDEDModule> it(m_modules);
while (!it.isEmpty())
delete it.toFirst();
}
-bool Kded::process(const QCString &obj, const QCString &fun,
- const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+bool Kded::process(const TQCString &obj, const TQCString &fun,
+ const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
if (obj == "ksycoca") return false; // Ignore this one.
@@ -162,8 +162,8 @@ void Kded::initModules()
kde_running = false;
// Preload kded modules.
KService::List kdedModules = KServiceType::offers("KDEDModule");
- QString version = getenv( "KDE_SESSION_VERSION" );
- QStringList blacklist;
+ TQString version = getenv( "KDE_SESSION_VERSION" );
+ TQStringList blacklist;
if ( version >= "4" )
{
kdDebug(7020) << "KDE4 is running." << endl;
@@ -172,10 +172,10 @@ void Kded::initModules()
for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it)
{
KService::Ptr service = *it;
- bool autoload = service->property("X-KDE-Kded-autoload", QVariant::Bool).toBool();
- config->setGroup(QString("Module-%1").arg(service->desktopEntryName()));
+ bool autoload = service->property("X-KDE-Kded-autoload", TQVariant::Bool).toBool();
+ config->setGroup(TQString("Module-%1").arg(service->desktopEntryName()));
autoload = config->readBoolEntry("autoload", autoload);
- for (QStringList::Iterator module = blacklist.begin(); module != blacklist.end(); ++module)
+ for (TQStringList::Iterator module = blacklist.begin(); module != blacklist.end(); ++module)
{
if (service->desktopEntryName() == *module)
{
@@ -186,7 +186,7 @@ void Kded::initModules()
if( m_newStartup )
{
// see ksmserver's README for description of the phases
- QVariant phasev = service->property("X-KDE-Kded-phase", QVariant::Int );
+ TQVariant phasev = service->property("X-KDE-Kded-phase", TQVariant::Int );
int phase = phasev.isValid() ? phasev.toInt() : 2;
bool prevent_autoload = false;
switch( phase )
@@ -211,7 +211,7 @@ void Kded::initModules()
loadModule(service, false);
}
bool dontLoad = false;
- QVariant p = service->property("X-KDE-Kded-load-on-demand", QVariant::Bool);
+ TQVariant p = service->property("X-KDE-Kded-load-on-demand", TQVariant::Bool);
if (p.isValid() && (p.toBool() == false))
dontLoad = true;
if (dontLoad)
@@ -230,22 +230,22 @@ void Kded::loadSecondPhase()
for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it)
{
KService::Ptr service = *it;
- bool autoload = service->property("X-KDE-Kded-autoload", QVariant::Bool).toBool();
- config->setGroup(QString("Module-%1").arg(service->desktopEntryName()));
+ bool autoload = service->property("X-KDE-Kded-autoload", TQVariant::Bool).toBool();
+ config->setGroup(TQString("Module-%1").arg(service->desktopEntryName()));
autoload = config->readBoolEntry("autoload", autoload);
- QVariant phasev = service->property("X-KDE-Kded-phase", QVariant::Int );
+ TQVariant phasev = service->property("X-KDE-Kded-phase", TQVariant::Int );
int phase = phasev.isValid() ? phasev.toInt() : 2;
if( phase == 2 && autoload )
loadModule(service, false);
}
}
-void Kded::noDemandLoad(const QString &obj)
+void Kded::noDemandLoad(const TQString &obj)
{
m_dontLoad.insert(obj.latin1(), this);
}
-KDEDModule *Kded::loadModule(const QCString &obj, bool onDemand)
+KDEDModule *Kded::loadModule(const TQCString &obj, bool onDemand)
{
KDEDModule *module = m_modules.find(obj);
if (module)
@@ -259,14 +259,14 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand)
KDEDModule *module = 0;
if (s && !s->library().isEmpty())
{
- QCString obj = s->desktopEntryName().latin1();
+ TQCString obj = s->desktopEntryName().latin1();
KDEDModule *oldModule = m_modules.find(obj);
if (oldModule)
return oldModule;
if (onDemand)
{
- QVariant p = s->property("X-KDE-Kded-load-on-demand", QVariant::Bool);
+ TQVariant p = s->property("X-KDE-Kded-load-on-demand", TQVariant::Bool);
if (p.isValid() && (p.toBool() == false))
{
noDemandLoad(s->desktopEntryName());
@@ -277,49 +277,49 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand)
KLibLoader *loader = KLibLoader::self();
- QVariant v = s->property("X-KDE-FactoryName", QVariant::String);
- QString factory = v.isValid() ? v.toString() : QString::null;
+ TQVariant v = s->property("X-KDE-FactoryName", TQVariant::String);
+ TQString factory = v.isValid() ? v.toString() : TQString::null;
if (factory.isEmpty())
{
// Stay bugward compatible
- v = s->property("X-KDE-Factory", QVariant::String);
- factory = v.isValid() ? v.toString() : QString::null;
+ v = s->property("X-KDE-Factory", TQVariant::String);
+ factory = v.isValid() ? v.toString() : TQString::null;
}
if (factory.isEmpty())
factory = s->library();
factory = "create_" + factory;
- QString libname = "kded_"+s->library();
+ TQString libname = "kded_"+s->library();
- KLibrary *lib = loader->library(QFile::encodeName(libname));
+ KLibrary *lib = loader->library(TQFile::encodeName(libname));
if (!lib)
{
kdWarning() << k_funcinfo << "Could not load library. [ "
<< loader->lastErrorMessage() << " ]" << endl;
libname.prepend("lib");
- lib = loader->library(QFile::encodeName(libname));
+ lib = loader->library(TQFile::encodeName(libname));
}
if (lib)
{
// get the create_ function
- void *create = lib->symbol(QFile::encodeName(factory));
+ void *create = lib->symbol(TQFile::encodeName(factory));
if (create)
{
// create the module
- KDEDModule* (*func)(const QCString &);
- func = (KDEDModule* (*)(const QCString &)) create;
+ KDEDModule* (*func)(const TQCString &);
+ func = (KDEDModule* (*)(const TQCString &)) create;
module = func(obj);
if (module)
{
m_modules.insert(obj, module);
m_libs.insert(obj, lib);
- connect(module, SIGNAL(moduleDeleted(KDEDModule *)), SLOT(slotKDEDModuleRemoved(KDEDModule *)));
+ connect(module, TQT_SIGNAL(moduleDeleted(KDEDModule *)), TQT_SLOT(slotKDEDModuleRemoved(KDEDModule *)));
kdDebug(7020) << "Successfully loaded module '" << obj << "'\n";
return module;
}
}
- loader->unloadLibrary(QFile::encodeName(libname));
+ loader->unloadLibrary(TQFile::encodeName(libname));
}
else
{
@@ -331,7 +331,7 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand)
return 0;
}
-bool Kded::unloadModule(const QCString &obj)
+bool Kded::unloadModule(const TQCString &obj)
{
KDEDModule *module = m_modules.take(obj);
if (!module)
@@ -345,7 +345,7 @@ bool Kded::unloadModule(const QCString &obj)
QCStringList Kded::loadedModules()
{
QCStringList modules;
- QAsciiDictIterator<KDEDModule> it( m_modules );
+ TQAsciiDictIterator<KDEDModule> it( m_modules );
for ( ; it.current(); ++it)
modules.append( it.currentKey() );
@@ -367,22 +367,22 @@ void Kded::slotKDEDModuleRemoved(KDEDModule *module)
lib->unload();
}
-void Kded::slotApplicationRemoved(const QCString &appId)
+void Kded::slotApplicationRemoved(const TQCString &appId)
{
- for(QAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
+ for(TQAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
{
it.current()->removeAll(appId);
}
- QValueList<long> *windowIds = m_windowIdList.find(appId);
+ TQValueList<long> *windowIds = m_windowIdList.find(appId);
if (windowIds)
{
- for( QValueList<long>::ConstIterator it = windowIds->begin();
+ for( TQValueList<long>::ConstIterator it = windowIds->begin();
it != windowIds->end(); ++it)
{
long windowId = *it;
m_globalWindowIdList.remove(windowId);
- for(QAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
+ for(TQAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
{
emit it.current()->windowUnregistered(windowId);
}
@@ -398,15 +398,15 @@ void Kded::updateDirWatch()
delete m_pDirWatch;
m_pDirWatch = new KDirWatch;
- QObject::connect( m_pDirWatch, SIGNAL(dirty(const QString&)),
- this, SLOT(update(const QString&)));
- QObject::connect( m_pDirWatch, SIGNAL(created(const QString&)),
- this, SLOT(update(const QString&)));
- QObject::connect( m_pDirWatch, SIGNAL(deleted(const QString&)),
- this, SLOT(dirDeleted(const QString&)));
+ TQObject::connect( m_pDirWatch, TQT_SIGNAL(dirty(const TQString&)),
+ this, TQT_SLOT(update(const TQString&)));
+ TQObject::connect( m_pDirWatch, TQT_SIGNAL(created(const TQString&)),
+ this, TQT_SLOT(update(const TQString&)));
+ TQObject::connect( m_pDirWatch, TQT_SIGNAL(deleted(const TQString&)),
+ this, TQT_SLOT(dirDeleted(const TQString&)));
// For each resource
- for( QStringList::ConstIterator it = m_allResourceDirs.begin();
+ for( TQStringList::ConstIterator it = m_allResourceDirs.begin();
it != m_allResourceDirs.end();
++it )
{
@@ -422,9 +422,9 @@ void Kded::updateResourceList()
if (delayedCheck) return;
- QStringList dirs = KSycoca::self()->allResourceDirs();
+ TQStringList dirs = KSycoca::self()->allResourceDirs();
// For each resource
- for( QStringList::ConstIterator it = dirs.begin();
+ for( TQStringList::ConstIterator it = dirs.begin();
it != dirs.end();
++it )
{
@@ -474,7 +474,7 @@ void Kded::recreate(bool initial)
if (!initial)
{
updateDirWatch(); // Update tree first, to be sure to miss nothing.
- runBuildSycoca(this, SLOT(recreateDone()));
+ runBuildSycoca(this, TQT_SLOT(recreateDone()));
}
else
{
@@ -485,7 +485,7 @@ void Kded::recreate(bool initial)
if(delayedCheck)
{
// do a proper ksycoca check after a delay
- QTimer::singleShot( 60000, this, SLOT( runDelayedCheck()));
+ TQTimer::singleShot( 60000, this, TQT_SLOT( runDelayedCheck()));
m_needDelayedCheck = true;
delayedCheck = false;
}
@@ -500,8 +500,8 @@ void Kded::recreateDone()
for(; m_recreateCount; m_recreateCount--)
{
- QCString replyType = "void";
- QByteArray replyData;
+ TQCString replyType = "void";
+ TQByteArray replyData;
DCOPClientTransaction *transaction = m_recreateRequests.first();
if (transaction)
kapp->dcopClient()->endTransaction(transaction, replyType, replyData);
@@ -517,12 +517,12 @@ void Kded::recreateDone()
}
}
-void Kded::dirDeleted(const QString& path)
+void Kded::dirDeleted(const TQString& path)
{
update(path);
}
-void Kded::update(const QString& )
+void Kded::update(const TQString& )
{
if (!m_recreateBusy)
{
@@ -534,8 +534,8 @@ void Kded::update(const QString& )
}
}
-bool Kded::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+bool Kded::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
if (fun == "recreate()") {
if (!m_recreateBusy)
@@ -556,17 +556,17 @@ bool Kded::process(const QCString &fun, const QByteArray &data,
}
-void Kded::readDirectory( const QString& _path )
+void Kded::readDirectory( const TQString& _path )
{
- QString path( _path );
+ TQString path( _path );
if ( path.right(1) != "/" )
path += "/";
if ( m_pDirWatch->contains( path ) ) // Already seen this one?
return;
- QDir d( _path, QString::null, QDir::Unsorted, QDir::Readable | QDir::Executable | QDir::Dirs | QDir::Hidden );
- // set QDir ...
+ TQDir d( _path, TQString::null, TQDir::Unsorted, TQDir::Readable | TQDir::Executable | TQDir::Dirs | TQDir::Hidden );
+ // set TQDir ...
//************************************************************************
@@ -577,7 +577,7 @@ void Kded::readDirectory( const QString& _path )
if ( !d.exists() ) // exists&isdir?
{
- kdDebug(7020) << QString("Does not exist! (%1)").arg(_path) << endl;
+ kdDebug(7020) << TQString("Does not exist! (%1)").arg(_path) << endl;
return; // return false
}
@@ -586,7 +586,7 @@ void Kded::readDirectory( const QString& _path )
//************************************************************************
// Reading
//************************************************************************
- QString file;
+ TQString file;
unsigned int i; // counter and string length.
unsigned int count = d.count();
for( i = 0; i < count; i++ ) // check all entries
@@ -611,19 +611,19 @@ bool Kded::isWindowRegistered(long windowId)
void Kded::registerWindowId(long windowId)
{
m_globalWindowIdList.replace(windowId, &windowId);
- QCString sender = callingDcopClient()->senderId();
+ TQCString sender = callingDcopClient()->senderId();
if( sender.isEmpty()) // local call
sender = callingDcopClient()->appId();
- QValueList<long> *windowIds = m_windowIdList.find(sender);
+ TQValueList<long> *windowIds = m_windowIdList.find(sender);
if (!windowIds)
{
- windowIds = new QValueList<long>;
+ windowIds = new TQValueList<long>;
m_windowIdList.insert(sender, windowIds);
}
windowIds->append(windowId);
- for(QAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
+ for(TQAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
{
emit it.current()->windowRegistered(windowId);
}
@@ -633,10 +633,10 @@ void Kded::registerWindowId(long windowId)
void Kded::unregisterWindowId(long windowId)
{
m_globalWindowIdList.remove(windowId);
- QCString sender = callingDcopClient()->senderId();
+ TQCString sender = callingDcopClient()->senderId();
if( sender.isEmpty()) // local call
sender = callingDcopClient()->appId();
- QValueList<long> *windowIds = m_windowIdList.find(sender);
+ TQValueList<long> *windowIds = m_windowIdList.find(sender);
if (windowIds)
{
windowIds->remove(windowId);
@@ -644,7 +644,7 @@ void Kded::unregisterWindowId(long windowId)
m_windowIdList.remove(sender);
}
- for(QAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
+ for(TQAsciiDictIterator<KDEDModule> it(m_modules); it.current(); ++it)
{
emit it.current()->windowUnregistered(windowId);
}
@@ -661,16 +661,16 @@ KUpdateD::KUpdateD()
{
m_pDirWatch = new KDirWatch;
m_pTimer = new QTimer;
- connect(m_pTimer, SIGNAL(timeout()), this, SLOT(runKonfUpdate()));
- QObject::connect( m_pDirWatch, SIGNAL(dirty(const QString&)),
- this, SLOT(slotNewUpdateFile()));
+ connect(m_pTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(runKonfUpdate()));
+ TQObject::connect( m_pDirWatch, TQT_SIGNAL(dirty(const TQString&)),
+ this, TQT_SLOT(slotNewUpdateFile()));
- QStringList dirs = KGlobal::dirs()->findDirs("data", "kconf_update");
- for( QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = KGlobal::dirs()->findDirs("data", "kconf_update");
+ for( TQStringList::ConstIterator it = dirs.begin();
it != dirs.end();
++it )
{
- QString path = *it;
+ TQString path = *it;
if (path[path.length()-1] != '/')
path += "/";
@@ -698,7 +698,7 @@ void KUpdateD::slotNewUpdateFile()
KHostnameD::KHostnameD(int pollInterval)
{
m_Timer.start(pollInterval, false /* repetitive */ );
- connect(&m_Timer, SIGNAL(timeout()), this, SLOT(checkHostname()));
+ connect(&m_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(checkHostname()));
checkHostname();
}
@@ -723,7 +723,7 @@ void KHostnameD::checkHostname()
if (m_hostname == buf)
return;
- QCString newHostname = buf;
+ TQCString newHostname = buf;
runDontChangeHostname(m_hostname, newHostname);
m_hostname = newHostname;
@@ -742,8 +742,8 @@ class KDEDQtDCOPObject : public DCOPObject
public:
KDEDQtDCOPObject() : DCOPObject("qt/kded") { }
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
if ( kapp && (fun == "quit()") )
{
@@ -779,7 +779,7 @@ public:
if( Kded::self()->newStartup())
Kded::self()->initModules();
else
- QTimer::singleShot(500, Kded::self(), SLOT(initModules()));
+ TQTimer::singleShot(500, Kded::self(), TQT_SLOT(initModules()));
} else
runBuildSycoca();
@@ -789,8 +789,8 @@ public:
QCStringList functions()
{
QCStringList res = KUniqueApplication::functions();
- res += "bool loadModule(QCString)";
- res += "bool unloadModule(QCString)";
+ res += "bool loadModule(TQCString)";
+ res += "bool unloadModule(TQCString)";
res += "void registerWindowId(long int)";
res += "void unregisterWindowId(long int)";
res += "QCStringList loadedModules()";
@@ -800,32 +800,32 @@ public:
return res;
}
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
- if (fun == "loadModule(QCString)") {
- QCString module;
- QDataStream arg( data, IO_ReadOnly );
+ if (fun == "loadModule(TQCString)") {
+ TQCString module;
+ TQDataStream arg( data, IO_ReadOnly );
arg >> module;
bool result = (Kded::self()->loadModule(module, false) != 0);
replyType = "bool";
- QDataStream _replyStream( replyData, IO_WriteOnly );
+ TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << result;
return true;
}
- else if (fun == "unloadModule(QCString)") {
- QCString module;
- QDataStream arg( data, IO_ReadOnly );
+ else if (fun == "unloadModule(TQCString)") {
+ TQCString module;
+ TQDataStream arg( data, IO_ReadOnly );
arg >> module;
bool result = Kded::self()->unloadModule(module);
replyType = "bool";
- QDataStream _replyStream( replyData, IO_WriteOnly );
+ TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << result;
return true;
}
else if (fun == "registerWindowId(long int)") {
long windowId;
- QDataStream arg( data, IO_ReadOnly );
+ TQDataStream arg( data, IO_ReadOnly );
arg >> windowId;
Kded::self()->setCallingDcopClient(callingDcopClient());
Kded::self()->registerWindowId(windowId);
@@ -834,7 +834,7 @@ public:
}
else if (fun == "unregisterWindowId(long int)") {
long windowId;
- QDataStream arg( data, IO_ReadOnly );
+ TQDataStream arg( data, IO_ReadOnly );
arg >> windowId;
Kded::self()->setCallingDcopClient(callingDcopClient());
Kded::self()->unregisterWindowId(windowId);
@@ -843,7 +843,7 @@ public:
}
else if (fun == "loadedModules()") {
replyType = "QCStringList";
- QDataStream _replyStream(replyData, IO_WriteOnly);
+ TQDataStream _replyStream(replyData, IO_WriteOnly);
_replyStream << Kded::self()->loadedModules();
return true;
}
@@ -896,7 +896,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
// Check DCOP communication.
{
DCOPClient testDCOP;
- QCString dcopName = testDCOP.registerAs("kded", false);
+ TQCString dcopName = testDCOP.registerAs("kded", false);
if (dcopName.isEmpty())
{
kdFatal() << "DCOP communication problem!" << endl;
@@ -949,8 +949,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
(void) new KHostnameD(HostnamePollInterval); // Watch for hostname changes
DCOPClient *client = kapp->dcopClient();
- QObject::connect(client, SIGNAL(applicationRemoved(const QCString&)),
- kded, SLOT(slotApplicationRemoved(const QCString&)));
+ TQObject::connect(client, TQT_SIGNAL(applicationRemoved(const TQCString&)),
+ kded, TQT_SLOT(slotApplicationRemoved(const TQCString&)));
client->setNotifications(true);
client->setDaemonMode( true );
@@ -960,9 +960,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
// If the database changed, kbuildsycoca's signal didn't go anywhere
// anyway, because it was too early, so let's send this signal
// unconditionnally (David)
- QByteArray data;
+ TQByteArray data;
client->send( "*", "ksycoca", "notifyDatabaseChanged()", data );
- client->send( "ksplash", "", "upAndRunning(QString)", QString("kded"));
+ client->send( "ksplash", "", "upAndRunning(TQString)", TQString("kded"));
#ifdef Q_WS_X11
XEvent e;
e.xclient.type = ClientMessage;
diff --git a/kded/kded.h b/kded/kded.h
index 71694b5f7..1b6ebe481 100644
--- a/kded/kded.h
+++ b/kded/kded.h
@@ -20,11 +20,11 @@
#ifndef __kded_h__
#define __kded_h__
-#include <qobject.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qasciidict.h>
-#include <qintdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqasciidict.h>
+#include <tqintdict.h>
#include <dcopclient.h>
#include <dcopobject.h>
@@ -38,7 +38,7 @@ class KDirWatch;
class KService;
// No need for this in libkio - apps only get readonly access
-class Kded : public QObject, public DCOPObject, public DCOPObjectProxy
+class Kded : public TQObject, public DCOPObject, public DCOPObjectProxy
{
Q_OBJECT
public:
@@ -49,25 +49,25 @@ public:
/**
* Catch calls to unknown objects.
*/
- bool process(const QCString &obj, const QCString &fun,
- const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &obj, const TQCString &fun,
+ const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
/**
* process DCOP message. Only calls to "recreate" are supported at
* this time.
*/
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
virtual QCStringList functions();
- void noDemandLoad(const QString &obj); // Don't load obj on demand
+ void noDemandLoad(const TQString &obj); // Don't load obj on demand
- KDEDModule *loadModule(const QCString &obj, bool onDemand);
+ KDEDModule *loadModule(const TQCString &obj, bool onDemand);
KDEDModule *loadModule(const KService *service, bool onDemand);
QCStringList loadedModules();
- bool unloadModule(const QCString &obj);
+ bool unloadModule(const TQCString &obj);
bool isWindowRegistered(long windowId);
void registerWindowId(long windowId);
void unregisterWindowId(long windowId);
@@ -103,7 +103,7 @@ public slots:
/**
* An application unregistered itself with DCOP
*/
- void slotApplicationRemoved(const QCString &appId);
+ void slotApplicationRemoved(const TQCString &appId);
/**
* A KDEDModule is about to get destroyed.
@@ -115,12 +115,12 @@ protected slots:
/**
* @internal Triggers rebuilding
*/
- void dirDeleted(const QString& path);
+ void dirDeleted(const TQString& path);
/**
* @internal Triggers rebuilding
*/
- void update (const QString& dir );
+ void update (const TQString& dir );
/**
* @internal Installs crash handler
@@ -133,7 +133,7 @@ protected:
/**
* Scans dir for new files and new subdirectories.
*/
- void readDirectory(const QString& dir );
+ void readDirectory(const TQString& dir );
static void crashHandler(int);
@@ -152,18 +152,18 @@ protected:
* before rebuilding the binary - so that multiple updates result
* in only one rebuilding.
*/
- QTimer* m_pTimer;
+ TQTimer* m_pTimer;
- QValueList<DCOPClientTransaction *> m_recreateRequests;
+ TQValueList<DCOPClientTransaction *> m_recreateRequests;
int m_recreateCount;
bool m_recreateBusy;
- QAsciiDict<KDEDModule> m_modules;
- QAsciiDict<KLibrary> m_libs;
- QAsciiDict<QObject> m_dontLoad;
- QAsciiDict<QValueList<long> > m_windowIdList;
- QIntDict<long> m_globalWindowIdList;
- QStringList m_allResourceDirs;
+ TQAsciiDict<KDEDModule> m_modules;
+ TQAsciiDict<KLibrary> m_libs;
+ TQAsciiDict<TQObject> m_dontLoad;
+ TQAsciiDict<TQValueList<long> > m_windowIdList;
+ TQIntDict<long> m_globalWindowIdList;
+ TQStringList m_allResourceDirs;
bool m_needDelayedCheck;
bool m_newStartup;
public:
@@ -197,7 +197,7 @@ private:
* before rebuilding the binary - so that multiple updates result
* in only one rebuilding.
*/
- QTimer* m_pTimer;
+ TQTimer* m_pTimer;
};
class KHostnameD : public QObject
@@ -214,8 +214,8 @@ private:
/**
* Timer for interval hostname checking.
*/
- QTimer m_Timer;
- QCString m_hostname;
+ TQTimer m_Timer;
+ TQCString m_hostname;
};
#endif
diff --git a/kded/kdedmodule.cpp b/kded/kdedmodule.cpp
index 8755c19da..ca28a5c62 100644
--- a/kded/kdedmodule.cpp
+++ b/kded/kdedmodule.cpp
@@ -20,28 +20,28 @@
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kded.h"
#include "kdedmodule.h"
#include "kconfigdata.h"
-typedef QMap<KEntryKey, KSharedPtr<KShared> > KDEDObjectMap;
+typedef TQMap<KEntryKey, KSharedPtr<KShared> > KDEDObjectMap;
class KDEDModulePrivate
{
public:
KDEDObjectMap *objMap;
int timeout;
- QTimer timer;
+ TQTimer timer;
};
-KDEDModule::KDEDModule(const QCString &name) : QObject(), DCOPObject(name)
+KDEDModule::KDEDModule(const TQCString &name) : TQObject(), DCOPObject(name)
{
d = new KDEDModulePrivate;
d->objMap = 0;
d->timeout = 0;
- connect(&(d->timer), SIGNAL(timeout()), this, SLOT(idle()));
+ connect(&(d->timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(idle()));
}
KDEDModule::~KDEDModule()
@@ -62,7 +62,7 @@ void KDEDModule::resetIdle()
d->timer.start(d->timeout, true);
}
-void KDEDModule::insert(const QCString &app, const QCString &key, KShared *obj)
+void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj)
{
if (!d->objMap)
d->objMap = new KDEDObjectMap;
@@ -80,7 +80,7 @@ void KDEDModule::insert(const QCString &app, const QCString &key, KShared *obj)
resetIdle();
}
-KShared * KDEDModule::find(const QCString &app, const QCString &key)
+KShared * KDEDModule::find(const TQCString &app, const TQCString &key)
{
if (!d->objMap)
return 0;
@@ -93,7 +93,7 @@ KShared * KDEDModule::find(const QCString &app, const QCString &key)
return it.data().data();
}
-void KDEDModule::remove(const QCString &app, const QCString &key)
+void KDEDModule::remove(const TQCString &app, const TQCString &key)
{
if (!d->objMap)
return;
@@ -103,7 +103,7 @@ void KDEDModule::remove(const QCString &app, const QCString &key)
resetIdle();
}
-void KDEDModule::removeAll(const QCString &app)
+void KDEDModule::removeAll(const TQCString &app)
{
if (!d->objMap)
return;
diff --git a/kded/kdedmodule.h b/kded/kdedmodule.h
index 3e8c7b12c..041f50303 100644
--- a/kded/kdedmodule.h
+++ b/kded/kdedmodule.h
@@ -22,7 +22,7 @@
#ifndef __KDEDMODULE_H__
#define __KDEDMODULE_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
#include <ksharedptr.h>
@@ -40,7 +40,7 @@ class Kded;
*
* \code
* extern "C" {
- * KDE_EXPORT KDEDModule *create_xyz(QCString *name)
+ * KDE_EXPORT KDEDModule *create_xyz(TQCString *name)
* {
* return new XYZ(name);
* }
@@ -52,7 +52,7 @@ class Kded;
* @author Waldo Bastian <bastian@kde.org>
*/
-class KDE_EXPORT KDEDModule : public QObject, public DCOPObject
+class KDE_EXPORT KDEDModule : public TQObject, public DCOPObject
{
Q_OBJECT
// For inclusion in KDE4 (since it's BIC) long-needed fix for allowing
@@ -64,7 +64,7 @@ public:
/**
* Create a DCOPObject named @p name
*/
- KDEDModule(const QCString &name);
+ KDEDModule(const TQCString &name);
virtual ~KDEDModule();
@@ -91,24 +91,24 @@ public:
* Any previous object inserted with the same values for @p app
* and @p key will be removed.
*/
- void insert(const QCString &app, const QCString &key, KShared *obj);
+ void insert(const TQCString &app, const TQCString &key, KShared *obj);
/**
* Lookup object indexed with @p app and @p key
*/
- KShared *find(const QCString &app, const QCString &key);
+ KShared *find(const TQCString &app, const TQCString &key);
/**
* remove object indexed with @p app and @p key.
* The object will be deleted when it is no more referenced.
*/
- void remove(const QCString &app, const QCString &key);
+ void remove(const TQCString &app, const TQCString &key);
/**
* remove all objects indexed with @p app.
* The objects will be deleted when they are no more referenced.
*/
- void removeAll(const QCString &app);
+ void removeAll(const TQCString &app);
/**
* Returns whether a certain mainwindow has registered itself with KDED
diff --git a/kded/khostname.cpp b/kded/khostname.cpp
index fe534119b..e38c88f53 100644
--- a/kded/khostname.cpp
+++ b/kded/khostname.cpp
@@ -22,9 +22,9 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <dcopclient.h>
@@ -53,14 +53,14 @@ public:
void changeX();
void changeDcop();
- void changeStdDirs(const QCString &type);
+ void changeStdDirs(const TQCString &type);
void changeSessionManager();
protected:
- QCString oldName;
- QCString newName;
- QCString display;
- QCString home;
+ TQCString oldName;
+ TQCString newName;
+ TQCString display;
+ TQCString home;
};
KHostName::KHostName()
@@ -82,7 +82,7 @@ KHostName::KHostName()
display = ::getenv("DISPLAY");
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
if (display.isEmpty())
{
fprintf(stderr, "%s", i18n("Error: DISPLAY environment variable not set.\n").local8Bit().data());
@@ -90,7 +90,7 @@ KHostName::KHostName()
}
}
-static QCStringList split(const QCString &str)
+static QCStringList split(const TQCString &str)
{
const char *s = str.data();
QCStringList result;
@@ -99,10 +99,10 @@ static QCStringList split(const QCString &str)
const char *i = strchr(s, ' ');
if (!i)
{
- result.append(QCString(s));
+ result.append(TQCString(s));
return result;
}
- result.append(QCString(s, i-s+1));
+ result.append(TQCString(s, i-s+1));
s = i;
while (*s == ' ') s++;
}
@@ -111,8 +111,8 @@ static QCStringList split(const QCString &str)
void KHostName::changeX()
{
- QString cmd = "xauth list";
- FILE *xFile = popen(QFile::encodeName(cmd), "r");
+ TQString cmd = "xauth list";
+ FILE *xFile = popen(TQFile::encodeName(cmd), "r");
if (!xFile)
{
fprintf(stderr, "Warning: Can't run xauth.\n");
@@ -123,7 +123,7 @@ void KHostName::changeX()
char buf[1024+1];
while (!feof(xFile))
{
- QCString line = fgets(buf, 1024, xFile);
+ TQCString line = fgets(buf, 1024, xFile);
if (line.length())
line.truncate(line.length()-1); // Strip LF.
if (!line.isEmpty())
@@ -139,14 +139,14 @@ void KHostName::changeX()
if (entries.count() != 3)
continue;
- QCString netId = entries[0];
- QCString authName = entries[1];
- QCString authKey = entries[2];
+ TQCString netId = entries[0];
+ TQCString authName = entries[1];
+ TQCString authKey = entries[2];
int i = netId.findRev(':');
if (i == -1)
continue;
- QCString netDisplay = netId.mid(i);
+ TQCString netDisplay = netId.mid(i);
if (netDisplay != display)
continue;
@@ -154,29 +154,29 @@ void KHostName::changeX()
if (i == -1)
continue;
- QCString newNetId = newName+netId.mid(i);
- QCString oldNetId = netId.left(i);
+ TQCString newNetId = newName+netId.mid(i);
+ TQCString oldNetId = netId.left(i);
if(oldNetId != oldName)
continue;
cmd = "xauth remove "+KProcess::quote(netId);
- system(QFile::encodeName(cmd));
+ system(TQFile::encodeName(cmd));
cmd = "xauth add ";
cmd += KProcess::quote(newNetId);
cmd += " ";
cmd += KProcess::quote(authName);
cmd += " ";
cmd += KProcess::quote(authKey);
- system(QFile::encodeName(cmd));
+ system(TQFile::encodeName(cmd));
}
}
void KHostName::changeDcop()
{
- QCString origFNameOld = DCOPClient::dcopServerFileOld(oldName);
- QCString fname = DCOPClient::dcopServerFile(oldName);
- QCString origFName = fname;
+ TQCString origFNameOld = DCOPClient::dcopServerFileOld(oldName);
+ TQCString fname = DCOPClient::dcopServerFile(oldName);
+ TQCString origFName = fname;
FILE *dcopFile = fopen(fname.data(), "r");
if (!dcopFile)
{
@@ -184,7 +184,7 @@ void KHostName::changeDcop()
return;
}
- QCString line1, line2;
+ TQCString line1, line2;
{
char buf[1024+1];
line1 = fgets(buf, 1024, dcopFile);
@@ -197,7 +197,7 @@ void KHostName::changeDcop()
}
fclose(dcopFile);
- QCString oldNetId = line1;
+ TQCString oldNetId = line1;
if (!newName.isEmpty())
{
@@ -208,7 +208,7 @@ void KHostName::changeDcop()
return;
}
line1 = "local/"+newName+line1.mid(i);
- QCString newNetId = line1;
+ TQCString newNetId = line1;
fname = DCOPClient::dcopServerFile(newName);
unlink(fname.data());
dcopFile = fopen(fname.data(), "w");
@@ -225,12 +225,12 @@ void KHostName::changeDcop()
fclose(dcopFile);
- QCString compatLink = DCOPClient::dcopServerFileOld(newName);
+ TQCString compatLink = DCOPClient::dcopServerFileOld(newName);
::symlink(fname.data(), compatLink.data()); // Compatibility link
// Update .ICEauthority
- QString cmd = "iceauth list "+KProcess::quote("netid="+oldNetId);
- FILE *iceFile = popen(QFile::encodeName(cmd), "r");
+ TQString cmd = "iceauth list "+KProcess::quote("netid="+oldNetId);
+ FILE *iceFile = popen(TQFile::encodeName(cmd), "r");
if (!iceFile)
{
fprintf(stderr, "Warning: Can't run iceauth.\n");
@@ -241,7 +241,7 @@ void KHostName::changeDcop()
char buf[1024+1];
while (!feof(iceFile))
{
- QCString line = fgets(buf, 1024, iceFile);
+ TQCString line = fgets(buf, 1024, iceFile);
if (line.length())
line.truncate(line.length()-1); // Strip LF.
if (!line.isEmpty())
@@ -257,10 +257,10 @@ void KHostName::changeDcop()
if (entries.count() != 5)
continue;
- QCString protName = entries[0];
- QCString netId = entries[2];
- QCString authName = entries[3];
- QCString authKey = entries[4];
+ TQCString protName = entries[0];
+ TQCString netId = entries[2];
+ TQCString authName = entries[3];
+ TQCString authKey = entries[4];
if (netId != oldNetId)
continue;
@@ -272,25 +272,25 @@ void KHostName::changeDcop()
cmd += KProcess::quote(authName);
cmd += " ";
cmd += KProcess::quote(authKey);
- system(QFile::encodeName(cmd));
+ system(TQFile::encodeName(cmd));
}
}
// Remove old entries
{
- QString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId);
- system(QFile::encodeName(cmd));
+ TQString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId);
+ system(TQFile::encodeName(cmd));
unlink(origFName.data());
origFName = DCOPClient::dcopServerFileOld(oldName); // Compatibility link
unlink(origFName.data());
}
}
-void KHostName::changeStdDirs(const QCString &type)
+void KHostName::changeStdDirs(const TQCString &type)
{
// We make links to the old dirs cause we can't delete the old dirs.
- QCString oldDir = QFile::encodeName(QString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(oldName));
- QCString newDir = QFile::encodeName(QString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(newName));
+ TQCString oldDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(oldName));
+ TQCString newDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(newName));
KDE_struct_stat st_buf;
@@ -324,7 +324,7 @@ void KHostName::changeStdDirs(const QCString &type)
void KHostName::changeSessionManager()
{
- QCString sm = ::getenv("SESSION_MANAGER");
+ TQCString sm = ::getenv("SESSION_MANAGER");
if (sm.isEmpty())
{
fprintf(stderr, "Warning: No session management specified.\n");
@@ -337,9 +337,9 @@ void KHostName::changeSessionManager()
return;
}
sm = "local/"+newName+sm.mid(i);
- QCString name = "SESSION_MANAGER";
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQCString name = "SESSION_MANAGER";
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << name << sm;
DCOPClient *client = new DCOPClient();
if (!client->attach())
@@ -348,8 +348,8 @@ void KHostName::changeSessionManager()
delete client;
return;
}
- QCString launcher = KApplication::launcher();
- client->send(launcher, launcher, "setLaunchEnv(QCString,QCString)", params);
+ TQCString launcher = KApplication::launcher();
+ client->send(launcher, launcher, "setLaunchEnv(TQCString,TQCString)", params);
delete client;
}
diff --git a/kded/kresourcelist.h b/kded/kresourcelist.h
index 3b08af067..425481d2d 100644
--- a/kded/kresourcelist.h
+++ b/kded/kresourcelist.h
@@ -18,24 +18,24 @@
#ifndef __kresourcelist_h__
#define __kresourcelist_h__
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
class QDataStream;
class KSycocaEntry;
struct KSycocaResource
{
- QString resource;
- QString extension;
+ TQString resource;
+ TQString extension;
};
-class KSycocaResourceList : public QValueList<KSycocaResource>
+class KSycocaResourceList : public TQValueList<KSycocaResource>
{
public:
KSycocaResourceList() { };
- void add(const QString &resource, const QString &filter)
+ void add(const TQString &resource, const TQString &filter)
{
KSycocaResource res;
res.resource = resource;
diff --git a/kded/test/test.cpp b/kded/test/test.cpp
index 3e130abf6..13b7c2944 100644
--- a/kded/test/test.cpp
+++ b/kded/test/test.cpp
@@ -3,21 +3,21 @@
class TestObject : public KShared
{
public:
- TestObject(const QCString &_app) : app(_app)
+ TestObject(const TQCString &_app) : app(_app)
{ qWarning("Creating TestObject belonging to '%s'", app.data()); }
~TestObject()
{ qWarning("Destructing TestObject belonging to '%s'", app.data()); }
protected:
- QCString app;
+ TQCString app;
};
-TestModule::TestModule(const QCString &obj) : KDEDModule(obj)
+TestModule::TestModule(const TQCString &obj) : KDEDModule(obj)
{
// Do stuff here
setIdleTimeout(15); // 15 seconds idle timeout.
}
-QString TestModule::world()
+TQString TestModule::world()
{
return "Hello World!";
}
@@ -27,14 +27,14 @@ void TestModule::idle()
qWarning("TestModule is idle.");
}
-void TestModule::registerMe(const QCString &app)
+void TestModule::registerMe(const TQCString &app)
{
insert(app, "test", new TestObject(app));
// When 'app' unregisters with DCOP, the TestObject will get deleted.
}
extern "C" {
- KDE_EXPORT KDEDModule *create_test(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_test(const TQCString &obj)
{
return new TestModule(obj);
}
diff --git a/kded/test/test.h b/kded/test/test.h
index c805b7921..9382a6fba 100644
--- a/kded/test/test.h
+++ b/kded/test/test.h
@@ -11,13 +11,13 @@ class TestModule : public KDEDModule
Q_OBJECT
K_DCOP
public:
- TestModule(const QCString &obj);
+ TestModule(const TQCString &obj);
void idle();
k_dcop:
- QString world();
- void registerMe(const QCString &app);
+ TQString world();
+ void registerMe(const TQCString &app);
};
#endif
diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp
index baa3c88b0..b48662cb2 100644
--- a/kded/vfolder_menu.cpp
+++ b/kded/vfolder_menu.cpp
@@ -28,18 +28,18 @@
#include <kservice.h>
#include <kde_file.h>
-#include <qmap.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include "vfolder_menu.h"
-static void foldNode(QDomElement &docElem, QDomElement &e, QMap<QString,QDomElement> &dupeList, QString s=QString::null)
+static void foldNode(TQDomElement &docElem, TQDomElement &e, TQMap<TQString,TQDomElement> &dupeList, TQString s=TQString::null)
{
if (s.isEmpty())
s = e.text();
- QMap<QString,QDomElement>::iterator it = dupeList.find(s);
+ TQMap<TQString,TQDomElement>::iterator it = dupeList.find(s);
if (it != dupeList.end())
{
kdDebug(7021) << e.tagName() << " and " << s << " requires combining!" << endl;
@@ -50,46 +50,46 @@ static void foldNode(QDomElement &docElem, QDomElement &e, QMap<QString,QDomElem
dupeList.insert(s, e);
}
-static void replaceNode(QDomElement &docElem, QDomNode &n, const QStringList &list, const QString &tag)
+static void replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList &list, const TQString &tag)
{
- for(QStringList::ConstIterator it = list.begin();
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end(); ++it)
{
- QDomElement e = docElem.ownerDocument().createElement(tag);
- QDomText txt = docElem.ownerDocument().createTextNode(*it);
+ TQDomElement e = docElem.ownerDocument().createElement(tag);
+ TQDomText txt = docElem.ownerDocument().createTextNode(*it);
e.appendChild(txt);
docElem.insertAfter(e, n);
}
- QDomNode next = n.nextSibling();
+ TQDomNode next = n.nextSibling();
docElem.removeChild(n);
n = next;
// kdDebug(7021) << "Next tag = " << n.toElement().tagName() << endl;
}
-void VFolderMenu::registerFile(const QString &file)
+void VFolderMenu::registerFile(const TQString &file)
{
int i = file.findRev('/');
if (i < 0)
return;
- QString dir = file.left(i+1); // Include trailing '/'
+ TQString dir = file.left(i+1); // Include trailing '/'
registerDirectory(dir);
}
-void VFolderMenu::registerDirectory(const QString &directory)
+void VFolderMenu::registerDirectory(const TQString &directory)
{
m_allDirectories.append(directory);
}
-QStringList VFolderMenu::allDirectories()
+TQStringList VFolderMenu::allDirectories()
{
if (m_allDirectories.isEmpty())
return m_allDirectories;
m_allDirectories.sort();
- QStringList::Iterator it = m_allDirectories.begin();
- QString previous = *it++;
+ TQStringList::Iterator it = m_allDirectories.begin();
+ TQString previous = *it++;
for(;it != m_allDirectories.end();)
{
if ((*it).startsWith(previous))
@@ -106,27 +106,27 @@ QStringList VFolderMenu::allDirectories()
}
static void
-track(const QString &menuId, const QString &menuName, QDict<KService> *includeList, QDict<KService> *excludeList, QDict<KService> *itemList, const QString &comment)
+track(const TQString &menuId, const TQString &menuName, TQDict<KService> *includeList, TQDict<KService> *excludeList, TQDict<KService> *itemList, const TQString &comment)
{
if (itemList->find(menuId))
printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->find(menuId) ? 1 : 0, excludeList->find(menuId) ? 1 : 0);
}
void
-VFolderMenu::includeItems(QDict<KService> *items1, QDict<KService> *items2)
+VFolderMenu::includeItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
- for(QDictIterator<KService> it(*items2); it.current(); ++it)
+ for(TQDictIterator<KService> it(*items2); it.current(); ++it)
{
items1->replace(it.current()->menuId(), it.current());
}
}
void
-VFolderMenu::matchItems(QDict<KService> *items1, QDict<KService> *items2)
+VFolderMenu::matchItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
- for(QDictIterator<KService> it(*items1); it.current(); )
+ for(TQDictIterator<KService> it(*items1); it.current(); )
{
- QString id = it.current()->menuId();
+ TQString id = it.current()->menuId();
++it;
if (!items2->find(id))
items1->remove(id);
@@ -134,20 +134,20 @@ VFolderMenu::matchItems(QDict<KService> *items1, QDict<KService> *items2)
}
void
-VFolderMenu::excludeItems(QDict<KService> *items1, QDict<KService> *items2)
+VFolderMenu::excludeItems(TQDict<KService> *items1, TQDict<KService> *items2)
{
- for(QDictIterator<KService> it(*items2); it.current(); ++it)
+ for(TQDictIterator<KService> it(*items2); it.current(); ++it)
{
items1->remove(it.current()->menuId());
}
}
VFolderMenu::SubMenu*
-VFolderMenu::takeSubMenu(SubMenu *parentMenu, const QString &menuName)
+VFolderMenu::takeSubMenu(SubMenu *parentMenu, const TQString &menuName)
{
int i = menuName.find('/');
- QString s1 = i > 0 ? menuName.left(i) : menuName;
- QString s2 = menuName.mid(i+1);
+ TQString s1 = i > 0 ? menuName.left(i) : menuName;
+ TQString s2 = menuName.mid(i+1);
// Look up menu
for(SubMenu *menu = parentMenu->subMenus.first(); menu; menu = parentMenu->subMenus.next())
@@ -173,8 +173,8 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority)
{
if (m_track)
{
- track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->items), QString("Before MenuMerge w. %1 (incl)").arg(menu2->name));
- track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->excludeItems), QString("Before MenuMerge w. %1 (excl)").arg(menu2->name));
+ track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->items), TQString("Before MenuMerge w. %1 (incl)").arg(menu2->name));
+ track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->excludeItems), TQString("Before MenuMerge w. %1 (excl)").arg(menu2->name));
}
if (reversePriority)
{
@@ -221,20 +221,20 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority)
if (m_track)
{
- track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->items), QString("After MenuMerge w. %1 (incl)").arg(menu2->name));
- track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->excludeItems), QString("After MenuMerge w. %1 (excl)").arg(menu2->name));
+ track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->items), TQString("After MenuMerge w. %1 (incl)").arg(menu2->name));
+ track(m_trackId, menu1->name, &(menu1->items), &(menu1->excludeItems), &(menu2->excludeItems), TQString("After MenuMerge w. %1 (excl)").arg(menu2->name));
}
delete menu2;
}
void
-VFolderMenu::insertSubMenu(SubMenu *parentMenu, const QString &menuName, SubMenu *newMenu, bool reversePriority)
+VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMenu *newMenu, bool reversePriority)
{
int i = menuName.find('/');
- QString s1 = menuName.left(i);
- QString s2 = menuName.mid(i+1);
+ TQString s1 = menuName.left(i);
+ TQString s2 = menuName.mid(i+1);
// Look up menu
for(SubMenu *menu = parentMenu->subMenus.first(); menu; menu = parentMenu->subMenus.next())
@@ -269,7 +269,7 @@ VFolderMenu::insertSubMenu(SubMenu *parentMenu, const QString &menuName, SubMenu
}
void
-VFolderMenu::insertService(SubMenu *parentMenu, const QString &name, KService *newService)
+VFolderMenu::insertService(SubMenu *parentMenu, const TQString &name, KService *newService)
{
int i = name.find('/');
@@ -280,8 +280,8 @@ VFolderMenu::insertService(SubMenu *parentMenu, const QString &name, KService *n
return;
}
- QString s1 = name.left(i);
- QString s2 = name.mid(i+1);
+ TQString s1 = name.left(i);
+ TQString s2 = name.mid(i+1);
// Look up menu
for(SubMenu *menu = parentMenu->subMenus.first(); menu; menu = parentMenu->subMenus.next())
@@ -315,7 +315,7 @@ VFolderMenu::~VFolderMenu()
for(appsInfo *info = m_appsInfoStack.first(); \
info; info = m_appsInfoStack.next()) \
{ \
- for(QDictIterator<KService> it( info->applications ); \
+ for(TQDictIterator<KService> it( info->applications ); \
it.current(); ++it ) \
{
#define FOR_ALL_APPLICATIONS_END } }
@@ -331,7 +331,7 @@ VFolderMenu::~VFolderMenu()
#define FOR_CATEGORY_END } }
KService *
-VFolderMenu::findApplication(const QString &relPath)
+VFolderMenu::findApplication(const TQString &relPath)
{
for(appsInfo *info = m_appsInfoStack.first();
info; info = m_appsInfoStack.next())
@@ -344,7 +344,7 @@ VFolderMenu::findApplication(const QString &relPath)
}
void
-VFolderMenu::addApplication(const QString &id, KService *service)
+VFolderMenu::addApplication(const TQString &id, KService *service)
{
service->setMenuId(id);
m_appsInfo->applications.replace(id, service);
@@ -353,16 +353,16 @@ VFolderMenu::addApplication(const QString &id, KService *service)
void
VFolderMenu::buildApplicationIndex(bool unusedOnly)
{
- QPtrList<appsInfo>::ConstIterator appsInfo_it = m_appsInfoList.begin();
+ TQPtrList<appsInfo>::ConstIterator appsInfo_it = m_appsInfoList.begin();
for( ; appsInfo_it != m_appsInfoList.end(); ++appsInfo_it )
{
appsInfo *info = *appsInfo_it;
info->dictCategories.clear();
- for(QDictIterator<KService> it( info->applications );
+ for(TQDictIterator<KService> it( info->applications );
it.current(); )
{
KService *s = it.current();
- QDictIterator<KService> tmpIt = it;
+ TQDictIterator<KService> tmpIt = it;
++it;
if (unusedOnly && m_usedAppsDict.find(s->menuId()))
{
@@ -371,11 +371,11 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly)
continue;
}
- QStringList cats = s->categories();
- for(QStringList::ConstIterator it2 = cats.begin();
+ TQStringList cats = s->categories();
+ for(TQStringList::ConstIterator it2 = cats.begin();
it2 != cats.end(); ++it2)
{
- const QString &cat = *it2;
+ const TQString &cat = *it2;
KService::List *list = info->dictCategories.find(cat);
if (!list)
{
@@ -429,17 +429,17 @@ VFolderMenu::unloadAppsInfo()
}
QString
-VFolderMenu::absoluteDir(const QString &_dir, const QString &baseDir, bool keepRelativeToCfg)
+VFolderMenu::absoluteDir(const TQString &_dir, const TQString &baseDir, bool keepRelativeToCfg)
{
- QString dir = _dir;
- if (QDir::isRelativePath(dir))
+ TQString dir = _dir;
+ if (TQDir::isRelativePath(dir))
{
dir = baseDir + dir;
}
if (!dir.endsWith("/"))
dir += '/';
- if (QDir::isRelativePath(dir) && !keepRelativeToCfg)
+ if (TQDir::isRelativePath(dir) && !keepRelativeToCfg)
{
dir = KGlobal::dirs()->findResource("xdgconf-menu", dir);
}
@@ -449,23 +449,23 @@ VFolderMenu::absoluteDir(const QString &_dir, const QString &baseDir, bool keepR
return dir;
}
-static void tagBaseDir(QDomDocument &doc, const QString &tag, const QString &dir)
+static void tagBaseDir(TQDomDocument &doc, const TQString &tag, const TQString &dir)
{
- QDomNodeList mergeFileList = doc.elementsByTagName(tag);
+ TQDomNodeList mergeFileList = doc.elementsByTagName(tag);
for(int i = 0; i < (int)mergeFileList.count(); i++)
{
- QDomAttr attr = doc.createAttribute("__BaseDir");
+ TQDomAttr attr = doc.createAttribute("__BaseDir");
attr.setValue(dir);
mergeFileList.item(i).toElement().setAttributeNode(attr);
}
}
-static void tagBasePath(QDomDocument &doc, const QString &tag, const QString &path)
+static void tagBasePath(TQDomDocument &doc, const TQString &tag, const TQString &path)
{
- QDomNodeList mergeFileList = doc.elementsByTagName(tag);
+ TQDomNodeList mergeFileList = doc.elementsByTagName(tag);
for(int i = 0; i < (int)mergeFileList.count(); i++)
{
- QDomAttr attr = doc.createAttribute("__BasePath");
+ TQDomAttr attr = doc.createAttribute("__BasePath");
attr.setValue(path);
mergeFileList.item(i).toElement().setAttributeNode(attr);
}
@@ -474,18 +474,18 @@ static void tagBasePath(QDomDocument &doc, const QString &tag, const QString &pa
QDomDocument
VFolderMenu::loadDoc()
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( m_docInfo.path.isEmpty() )
{
return doc;
}
- QFile file( m_docInfo.path );
+ TQFile file( m_docInfo.path );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning(7021) << "Could not open " << m_docInfo.path << endl;
return doc;
}
- QString errorMsg;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) {
@@ -507,18 +507,18 @@ VFolderMenu::loadDoc()
void
-VFolderMenu::mergeFile(QDomElement &parent, const QDomNode &mergeHere)
+VFolderMenu::mergeFile(TQDomElement &parent, const TQDomNode &mergeHere)
{
kdDebug(7021) << "VFolderMenu::mergeFile: " << m_docInfo.path << endl;
- QDomDocument doc = loadDoc();
+ TQDomDocument doc = loadDoc();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
- QDomNode last = mergeHere;
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
+ TQDomNode last = mergeHere;
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
- QDomNode next = n.nextSibling();
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomNode next = n.nextSibling();
if (e.isNull())
{
@@ -538,19 +538,19 @@ kdDebug(7021) << "VFolderMenu::mergeFile: " << m_docInfo.path << endl;
void
-VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
+VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name)
{
- QMap<QString,QDomElement> menuNodes;
- QMap<QString,QDomElement> directoryNodes;
- QMap<QString,QDomElement> appDirNodes;
- QMap<QString,QDomElement> directoryDirNodes;
- QMap<QString,QDomElement> legacyDirNodes;
- QDomElement defaultLayoutNode;
- QDomElement layoutNode;
-
- QDomNode n = docElem.firstChild();
+ TQMap<TQString,TQDomElement> menuNodes;
+ TQMap<TQString,TQDomElement> directoryNodes;
+ TQMap<TQString,TQDomElement> appDirNodes;
+ TQMap<TQString,TQDomElement> directoryDirNodes;
+ TQMap<TQString,TQDomElement> legacyDirNodes;
+ TQDomElement defaultLayoutNode;
+ TQDomElement layoutNode;
+
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( e.isNull() ) {
// kdDebug(7021) << "Empty node" << endl;
}
@@ -587,10 +587,10 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
}
else if( e.tagName() == "Move") {
// Filter out dupes
- QString orig;
- QDomNode n2 = e.firstChild();
+ TQString orig;
+ TQDomNode n2 = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement(); // try to convert the node to an element.
+ TQDomElement e2 = n2.toElement(); // try to convert the node to an element.
if( e2.tagName() == "Old")
{
orig = e2.text();
@@ -601,17 +601,17 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
foldNode(docElem, e, appDirNodes, orig);
}
else if( e.tagName() == "Menu") {
- QString name;
+ TQString name;
mergeMenus(e, name);
- QMap<QString,QDomElement>::iterator it = menuNodes.find(name);
+ TQMap<TQString,TQDomElement>::iterator it = menuNodes.find(name);
if (it != menuNodes.end())
{
- QDomElement docElem2 = *it;
- QDomNode n2 = docElem2.firstChild();
- QDomNode first = e.firstChild();
+ TQDomElement docElem2 = *it;
+ TQDomNode n2 = docElem2.firstChild();
+ TQDomNode first = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement(); // try to convert the node to an element.
- QDomNode n3 = n2.nextSibling();
+ TQDomElement e2 = n2.toElement(); // try to convert the node to an element.
+ TQDomNode n3 = n2.nextSibling();
e.insertBefore(n2, first);
docElem2.removeChild(n2);
n2 = n3;
@@ -634,23 +634,23 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
mergeFile(docElem, n);
popDocInfo();
- QDomNode last = n;
+ TQDomNode last = n;
n = n.nextSibling();
docElem.removeChild(last); // Remove the MergeFile node
continue;
}
else if( e.tagName() == "MergeDir") {
- QString dir = absoluteDir(e.text(), e.attribute("__BaseDir"), true);
+ TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"), true);
- QStringList dirs = KGlobal::dirs()->findDirs("xdgconf-menu", dir);
- for(QStringList::ConstIterator it=dirs.begin();
+ TQStringList dirs = KGlobal::dirs()->findDirs("xdgconf-menu", dir);
+ for(TQStringList::ConstIterator it=dirs.begin();
it != dirs.end(); ++it)
{
registerDirectory(*it);
}
- QStringList fileList;
- if (!QDir::isRelativePath(dir))
+ TQStringList fileList;
+ if (!TQDir::isRelativePath(dir))
{
// Absolute
fileList = KGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, false);
@@ -661,7 +661,7 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
(void) KGlobal::dirs()->findAllResources("xdgconf-menu", dir+"*.menu", false, true, fileList);
}
- for(QStringList::ConstIterator it=fileList.begin();
+ for(TQStringList::ConstIterator it=fileList.begin();
it != fileList.end(); ++it)
{
pushDocInfo(*it);
@@ -669,7 +669,7 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
popDocInfo();
}
- QDomNode last = n;
+ TQDomNode last = n;
n = n.nextSibling();
docElem.removeChild(last); // Remove the MergeDir node
@@ -693,19 +693,19 @@ VFolderMenu::mergeMenus(QDomElement &docElem, QString &name)
}
void
-VFolderMenu::pushDocInfo(const QString &fileName, const QString &baseDir)
+VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir)
{
m_docInfoStack.push(m_docInfo);
if (!baseDir.isEmpty())
{
- if (!QDir::isRelativePath(baseDir))
+ if (!TQDir::isRelativePath(baseDir))
m_docInfo.baseDir = KGlobal::dirs()->relativeLocation("xdgconf-menu", baseDir);
else
m_docInfo.baseDir = baseDir;
}
- QString baseName = fileName;
- if (!QDir::isRelativePath(baseName))
+ TQString baseName = fileName;
+ if (!TQDir::isRelativePath(baseName))
registerFile(baseName);
else
baseName = m_docInfo.baseDir + baseName;
@@ -713,8 +713,8 @@ VFolderMenu::pushDocInfo(const QString &fileName, const QString &baseDir)
m_docInfo.path = locateMenuFile(fileName);
if (m_docInfo.path.isEmpty())
{
- m_docInfo.baseDir = QString::null;
- m_docInfo.baseName = QString::null;
+ m_docInfo.baseDir = TQString::null;
+ m_docInfo.baseName = TQString::null;
kdDebug(7021) << "Menu " << fileName << " not found." << endl;
return;
}
@@ -727,30 +727,30 @@ VFolderMenu::pushDocInfo(const QString &fileName, const QString &baseDir)
}
else
{
- m_docInfo.baseDir = QString::null;
+ m_docInfo.baseDir = TQString::null;
m_docInfo.baseName = baseName.left( baseName.length() - 5 );
}
}
void
-VFolderMenu::pushDocInfoParent(const QString &basePath, const QString &baseDir)
+VFolderMenu::pushDocInfoParent(const TQString &basePath, const TQString &baseDir)
{
m_docInfoStack.push(m_docInfo);
m_docInfo.baseDir = baseDir;
- QString fileName = basePath.mid(basePath.findRev('/')+1);
+ TQString fileName = basePath.mid(basePath.findRev('/')+1);
m_docInfo.baseName = fileName.left( fileName.length() - 5 );
- QString baseName = QDir::cleanDirPath(m_docInfo.baseDir + fileName);
+ TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName);
- QStringList result = KGlobal::dirs()->findAllResources("xdgconf-menu", baseName);
+ TQStringList result = KGlobal::dirs()->findAllResources("xdgconf-menu", baseName);
while( !result.isEmpty() && (result[0] != basePath))
result.remove(result.begin());
if (result.count() <= 1)
{
- m_docInfo.path = QString::null; // No parent found
+ m_docInfo.path = TQString::null; // No parent found
return;
}
m_docInfo.path = result[1];
@@ -763,29 +763,29 @@ VFolderMenu::popDocInfo()
}
QString
-VFolderMenu::locateMenuFile(const QString &fileName)
+VFolderMenu::locateMenuFile(const TQString &fileName)
{
- if (!QDir::isRelativePath(fileName))
+ if (!TQDir::isRelativePath(fileName))
{
if (KStandardDirs::exists(fileName))
return fileName;
- return QString::null;
+ return TQString::null;
}
- QString result;
+ TQString result;
- //QString xdgMenuPrefix = QString::fromLocal8Bit(getenv("XDG_MENU_PREFIX"));
+ //TQString xdgMenuPrefix = TQString::fromLocal8Bit(getenv("XDG_MENU_PREFIX"));
// hardcode xdgMenuPrefix to "kde-" string until proper upstream fix
- QString xdgMenuPrefix = "kde-";
+ TQString xdgMenuPrefix = "kde-";
if (!xdgMenuPrefix.isEmpty())
{
- QFileInfo fileInfo(fileName);
+ TQFileInfo fileInfo(fileName);
- QString fileNameOnly = fileInfo.fileName();
+ TQString fileNameOnly = fileInfo.fileName();
if (!fileNameOnly.startsWith(xdgMenuPrefix))
fileNameOnly = xdgMenuPrefix + fileNameOnly;
- QString baseName = QDir::cleanDirPath(m_docInfo.baseDir +
+ TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir +
fileInfo.dirPath() + "/" +
fileNameOnly);
result = locate("xdgconf-menu", baseName);
@@ -793,7 +793,7 @@ VFolderMenu::locateMenuFile(const QString &fileName)
if (result.isEmpty())
{
- QString baseName = QDir::cleanDirPath(m_docInfo.baseDir + fileName);
+ TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName);
result = locate("xdgconf-menu", baseName);
}
@@ -801,21 +801,21 @@ VFolderMenu::locateMenuFile(const QString &fileName)
}
QString
-VFolderMenu::locateDirectoryFile(const QString &fileName)
+VFolderMenu::locateDirectoryFile(const TQString &fileName)
{
if (fileName.isEmpty())
- return QString::null;
+ return TQString::null;
- if (!QDir::isRelativePath(fileName))
+ if (!TQDir::isRelativePath(fileName))
{
if (KStandardDirs::exists(fileName))
return fileName;
- return QString::null;
+ return TQString::null;
}
// First location in the list wins
- QString tmp;
- for(QStringList::ConstIterator it = m_directoryDirs.begin();
+ TQString tmp;
+ for(TQStringList::ConstIterator it = m_directoryDirs.begin();
it != m_directoryDirs.end();
++it)
{
@@ -824,23 +824,23 @@ VFolderMenu::locateDirectoryFile(const QString &fileName)
return tmp;
}
- return QString::null;
+ return TQString::null;
}
void
VFolderMenu::initDirs()
{
- m_defaultDataDirs = QStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes());
- QString localDir = m_defaultDataDirs.first();
+ m_defaultDataDirs = TQStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes());
+ TQString localDir = m_defaultDataDirs.first();
m_defaultDataDirs.remove(localDir); // Remove local dir
- m_defaultAppDirs = KGlobal::dirs()->findDirs("xdgdata-apps", QString::null);
- m_defaultDirectoryDirs = KGlobal::dirs()->findDirs("xdgdata-dirs", QString::null);
+ m_defaultAppDirs = KGlobal::dirs()->findDirs("xdgdata-apps", TQString::null);
+ m_defaultDirectoryDirs = KGlobal::dirs()->findDirs("xdgdata-dirs", TQString::null);
m_defaultLegacyDirs = KGlobal::dirs()->resourceDirs("apps");
}
void
-VFolderMenu::loadMenu(const QString &fileName)
+VFolderMenu::loadMenu(const TQString &fileName)
{
m_defaultMergeDirs.clear();
@@ -861,21 +861,21 @@ VFolderMenu::loadMenu(const QString &fileName)
return;
}
- QDomElement e = m_doc.documentElement();
- QString name;
+ TQDomElement e = m_doc.documentElement();
+ TQString name;
mergeMenus(e, name);
}
void
-VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
+VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items)
{
if (domElem.tagName() == "And")
{
- QDomNode n = domElem.firstChild();
+ TQDomNode n = domElem.firstChild();
// Look for the first child element
while (!n.isNull()) // loop in case of comments
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling();
if ( !e.isNull() ) {
processCondition(e, items);
@@ -883,15 +883,15 @@ VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
}
}
- QDict<KService> andItems;
+ TQDict<KService> andItems;
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "Not")
{
// Special handling for "and not"
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
andItems.clear();
processCondition(e2, &andItems);
excludeItems(items, &andItems);
@@ -909,11 +909,11 @@ VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
}
else if (domElem.tagName() == "Or")
{
- QDomNode n = domElem.firstChild();
+ TQDomNode n = domElem.firstChild();
// Look for the first child element
while (!n.isNull()) // loop in case of comments
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling();
if ( !e.isNull() ) {
processCondition(e, items);
@@ -921,9 +921,9 @@ VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
}
}
- QDict<KService> orItems;
+ TQDict<KService> orItems;
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() ) {
orItems.clear();
processCondition(e, &orItems);
@@ -941,10 +941,10 @@ VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
}
FOR_ALL_APPLICATIONS_END
- QDict<KService> notItems;
- QDomNode n = domElem.firstChild();
+ TQDict<KService> notItems;
+ TQDomNode n = domElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() ) {
notItems.clear();
processCondition(e, &notItems);
@@ -973,7 +973,7 @@ VFolderMenu::processCondition(QDomElement &domElem, QDict<KService> *items)
}
else if (domElem.tagName() == "Filename")
{
- QString filename = domElem.text();
+ TQString filename = domElem.text();
kdDebug(7021) << "Adding file " << filename << endl;
KService *s = findApplication(filename);
if (s)
@@ -982,29 +982,29 @@ kdDebug(7021) << "Adding file " << filename << endl;
}
void
-VFolderMenu::loadApplications(const QString &dir, const QString &prefix)
+VFolderMenu::loadApplications(const TQString &dir, const TQString &prefix)
{
kdDebug(7021) << "Looking up applications under " << dir << endl;
// We look for a set of files.
- DIR *dp = opendir( QFile::encodeName(dir));
+ DIR *dp = opendir( TQFile::encodeName(dir));
if (!dp)
return;
struct dirent *ep;
KDE_struct_stat buff;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~')
continue;
- QString pathfn = dir + fn;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 ) {
+ TQString pathfn = dir + fn;
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 ) {
continue; // Couldn't stat (e.g. no read permissions)
}
if ( S_ISDIR( buff.st_mode )) {
@@ -1031,24 +1031,24 @@ VFolderMenu::processKDELegacyDirs()
{
kdDebug(7021) << "processKDELegacyDirs()" << endl;
- QDict<KService> items;
- QString prefix = "kde-";
+ TQDict<KService> items;
+ TQString prefix = "kde-";
- QStringList relFiles;
- QRegExp files("\\.(desktop|kdelnk)$");
- QRegExp dirs("\\.directory$");
+ TQStringList relFiles;
+ TQRegExp files("\\.(desktop|kdelnk)$");
+ TQRegExp dirs("\\.directory$");
(void) KGlobal::dirs()->findAllResources( "apps",
- QString::null,
+ TQString::null,
true, // Recursive!
true, // uniq
relFiles);
- for(QStringList::ConstIterator it = relFiles.begin();
+ for(TQStringList::ConstIterator it = relFiles.begin();
it != relFiles.end(); ++it)
{
if (!m_forcedLegacyLoad && (dirs.search(*it) != -1))
{
- QString name = *it;
+ TQString name = *it;
if (!name.endsWith("/.directory"))
continue; // Probably ".directory", skip it.
@@ -1063,13 +1063,13 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
if (files.search(*it) != -1)
{
- QString name = *it;
+ TQString name = *it;
KService *service = 0;
emit newService(name, &service);
if (service && !m_forcedLegacyLoad)
{
- QString id = name;
+ TQString id = name;
// Strip path from id
int i = id.findRev('/');
if (i >= 0)
@@ -1091,30 +1091,30 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl;
}
void
-VFolderMenu::processLegacyDir(const QString &dir, const QString &relDir, const QString &prefix)
+VFolderMenu::processLegacyDir(const TQString &dir, const TQString &relDir, const TQString &prefix)
{
kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix << ")" << endl;
- QDict<KService> items;
+ TQDict<KService> items;
// We look for a set of files.
- DIR *dp = opendir( QFile::encodeName(dir));
+ DIR *dp = opendir( TQFile::encodeName(dir));
if (!dp)
return;
struct dirent *ep;
KDE_struct_stat buff;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~')
continue;
- QString pathfn = dir + fn;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 ) {
+ TQString pathfn = dir + fn;
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 ) {
continue; // Couldn't stat (e.g. no read permissions)
}
if ( S_ISDIR( buff.st_mode )) {
@@ -1140,7 +1140,7 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix
emit newService(pathfn, &service);
if (service)
{
- QString id = prefix+fn;
+ TQString id = prefix+fn;
// TODO: Add legacy category
addApplication(id, service);
@@ -1158,23 +1158,23 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix
void
-VFolderMenu::processMenu(QDomElement &docElem, int pass)
+VFolderMenu::processMenu(TQDomElement &docElem, int pass)
{
SubMenu *parentMenu = m_currentMenu;
unsigned int oldDirectoryDirsCount = m_directoryDirs.count();
- QString name;
- QString directoryFile;
+ TQString name;
+ TQString directoryFile;
bool onlyUnallocated = false;
bool isDeleted = false;
bool kdeLegacyDirsDone = false;
- QDomElement defaultLayoutNode;
- QDomElement layoutNode;
+ TQDomElement defaultLayoutNode;
+ TQDomElement layoutNode;
- QDomElement query;
- QDomNode n = docElem.firstChild();
+ TQDomElement query;
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Name")
{
name = e.text();
@@ -1185,7 +1185,7 @@ VFolderMenu::processMenu(QDomElement &docElem, int pass)
}
else if (e.tagName() == "DirectoryDir")
{
- QString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
+ TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
m_directoryDirs.prepend(dir);
}
@@ -1250,7 +1250,7 @@ VFolderMenu::processMenu(QDomElement &docElem, int pass)
}
// Override previous directoryFile iff available
- QString tmp = locateDirectoryFile(directoryFile);
+ TQString tmp = locateDirectoryFile(directoryFile);
if (! tmp.isEmpty())
m_currentMenu->directoryFile = tmp;
m_currentMenu->isDeleted = isDeleted;
@@ -1281,18 +1281,18 @@ VFolderMenu::processMenu(QDomElement &docElem, int pass)
// Process AppDir and LegacyDir
if (pass == 0)
{
- QDomElement query;
- QDomNode n = docElem.firstChild();
+ TQDomElement query;
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "AppDir")
{
createAppsInfo();
- QString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
+ TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
registerDirectory(dir);
- loadApplications(dir, QString::null);
+ loadApplications(dir, TQString::null);
}
else if (e.tagName() == "KDELegacyDirs")
{
@@ -1314,9 +1314,9 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl;
else if (e.tagName() == "LegacyDir")
{
createAppsInfo();
- QString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
+ TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
- QString prefix = e.attributes().namedItem("prefix").toAttr().value();
+ TQString prefix = e.attributes().namedItem("prefix").toAttr().value();
if (m_defaultLegacyDirs.contains(dir))
{
@@ -1341,7 +1341,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
registerDirectory(dir);
- processLegacyDir(dir, QString::null, prefix);
+ processLegacyDir(dir, TQString::null, prefix);
m_legacyNodes.replace(dir, m_currentMenu);
m_currentMenu = oldMenu;
@@ -1358,14 +1358,14 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Include")
{
- QDict<KService> items;
+ TQDict<KService> items;
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
items.clear();
processCondition(e2, &items);
if (m_track)
@@ -1383,11 +1383,11 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
else if (e.tagName() == "Exclude")
{
- QDict<KService> items;
+ TQDict<KService> items;
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
items.clear();
processCondition(e2, &items);
if (m_track)
@@ -1406,7 +1406,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Menu")
{
processMenu(e, pass);
@@ -1420,7 +1420,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
if (e.tagName() == "LegacyDir")
{
// Add legacy nodes to Menu structure
- QString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
+ TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir"));
SubMenu *legacyMenu = m_legacyNodes.find(dir);
if (legacyMenu)
{
@@ -1431,7 +1431,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
else if (e.tagName() == "KDELegacyDirs")
{
// Add legacy nodes to Menu structure
- QString dir = "<KDE>";
+ TQString dir = "<KDE>";
SubMenu *legacyMenu = m_legacyNodes.find(dir);
if (legacyMenu)
{
@@ -1446,14 +1446,14 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
{
n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Move")
{
- QString orig;
- QString dest;
- QDomNode n2 = e.firstChild();
+ TQString orig;
+ TQString dest;
+ TQDomNode n2 = e.firstChild();
while( !n2.isNull() ) {
- QDomElement e2 = n2.toElement(); // try to convert the node to an element.
+ TQDomElement e2 = n2.toElement(); // try to convert the node to an element.
if( e2.tagName() == "Old")
orig = e2.text();
if( e2.tagName() == "New")
@@ -1485,12 +1485,12 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl;
-static QString parseAttribute( const QDomElement &e)
+static TQString parseAttribute( const TQDomElement &e)
{
- QString option;
+ TQString option;
if ( e.hasAttribute( "show_empty" ) )
{
- QString str = e.attribute( "show_empty" );
+ TQString str = e.attribute( "show_empty" );
if ( str=="true" )
option= "ME ";
else if ( str=="false" )
@@ -1500,7 +1500,7 @@ static QString parseAttribute( const QDomElement &e)
}
if ( e.hasAttribute( "inline" ) )
{
- QString str = e.attribute( "inline" );
+ TQString str = e.attribute( "inline" );
if ( str=="true" )
option+="I ";
else if ( str=="false" )
@@ -1513,11 +1513,11 @@ static QString parseAttribute( const QDomElement &e)
bool ok;
int value = e.attribute( "inline_limit" ).toInt(&ok);
if ( ok )
- option+=QString( "IL[%1] " ).arg( value );
+ option+=TQString( "IL[%1] " ).arg( value );
}
if ( e.hasAttribute( "inline_header" ) )
{
- QString str = e.attribute( "inline_header" );
+ TQString str = e.attribute( "inline_header" );
if ( str=="true")
option+="IH ";
else if ( str == "false" )
@@ -1528,7 +1528,7 @@ static QString parseAttribute( const QDomElement &e)
}
if ( e.hasAttribute( "inline_alias" ) && e.attribute( "inline_alias" )=="true")
{
- QString str = e.attribute( "inline_alias" );
+ TQString str = e.attribute( "inline_alias" );
if ( str=="true" )
option+="IA";
else if ( str=="false" )
@@ -1544,19 +1544,19 @@ static QString parseAttribute( const QDomElement &e)
}
-static QStringList parseLayoutNode(const QDomElement &docElem)
+static TQStringList parseLayoutNode(const TQDomElement &docElem)
{
- QStringList layout;
+ TQStringList layout;
- QString optionDefaultLayout;
+ TQString optionDefaultLayout;
if( docElem.tagName()=="DefaultLayout")
optionDefaultLayout = parseAttribute( docElem);
if ( !optionDefaultLayout.isEmpty() )
layout.append( optionDefaultLayout );
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "Separator")
{
layout.append(":S");
@@ -1568,13 +1568,13 @@ static QStringList parseLayoutNode(const QDomElement &docElem)
else if (e.tagName() == "Menuname")
{
layout.append("/"+e.text());
- QString option = parseAttribute( e );
+ TQString option = parseAttribute( e );
if( !option.isEmpty())
layout.append( option );
}
else if (e.tagName() == "Merge")
{
- QString type = e.attributeNode("type").value();
+ TQString type = e.attributeNode("type").value();
if (type == "files")
layout.append(":F");
else if (type == "menus")
@@ -1589,7 +1589,7 @@ static QStringList parseLayoutNode(const QDomElement &docElem)
}
void
-VFolderMenu::layoutMenu(VFolderMenu::SubMenu *menu, QStringList defaultLayout)
+VFolderMenu::layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout)
{
if (!menu->defaultLayoutNode.isNull())
{
@@ -1614,23 +1614,23 @@ VFolderMenu::layoutMenu(VFolderMenu::SubMenu *menu, QStringList defaultLayout)
}
void
-VFolderMenu::markUsedApplications(QDict<KService> *items)
+VFolderMenu::markUsedApplications(TQDict<KService> *items)
{
- for(QDictIterator<KService> it(*items); it.current(); ++it)
+ for(TQDictIterator<KService> it(*items); it.current(); ++it)
{
m_usedAppsDict.replace(it.current()->menuId(), it.current());
}
}
VFolderMenu::SubMenu *
-VFolderMenu::parseMenu(const QString &file, bool forceLegacyLoad)
+VFolderMenu::parseMenu(const TQString &file, bool forceLegacyLoad)
{
m_forcedLegacyLoad = false;
m_legacyLoaded = false;
m_appsInfo = 0;
- QStringList dirs = KGlobal::dirs()->resourceDirs("xdgconf-menu");
- for(QStringList::ConstIterator it=dirs.begin();
+ TQStringList dirs = KGlobal::dirs()->resourceDirs("xdgconf-menu");
+ for(TQStringList::ConstIterator it=dirs.begin();
it != dirs.end(); ++it)
{
registerDirectory(*it);
@@ -1641,7 +1641,7 @@ VFolderMenu::parseMenu(const QString &file, bool forceLegacyLoad)
delete m_rootMenu;
m_rootMenu = m_currentMenu = 0;
- QDomElement docElem = m_doc.documentElement();
+ TQDomElement docElem = m_doc.documentElement();
for (int pass = 0; pass <= 2; pass++)
{
@@ -1657,7 +1657,7 @@ VFolderMenu::parseMenu(const QString &file, bool forceLegacyLoad)
}
if (pass == 2)
{
- QStringList defaultLayout;
+ TQStringList defaultLayout;
defaultLayout << ":M"; // Sub-Menus
defaultLayout << ":F"; // Individual entries
layoutMenu(m_rootMenu, defaultLayout);
@@ -1674,7 +1674,7 @@ VFolderMenu::parseMenu(const QString &file, bool forceLegacyLoad)
}
void
-VFolderMenu::setTrackId(const QString &id)
+VFolderMenu::setTrackId(const TQString &id)
{
m_track = !id.isEmpty();
m_trackId = id;
diff --git a/kded/vfolder_menu.h b/kded/vfolder_menu.h
index 96b7e4ea6..ce7183056 100644
--- a/kded/vfolder_menu.h
+++ b/kded/vfolder_menu.h
@@ -20,12 +20,12 @@
#ifndef _VFOLDER_MENU_H_
#define _VFOLDER_MENU_H_
-#include <qobject.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qvaluestack.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqvaluestack.h>
#include <kservice.h>
@@ -40,15 +40,15 @@ public:
~SubMenu() { subMenus.setAutoDelete(true); }
public:
- QString name;
- QString directoryFile;
- QPtrList<SubMenu> subMenus;
- QDict<KService> items;
- QDict<KService> excludeItems; // Needed when merging due to Move.
- QDomElement defaultLayoutNode;
- QDomElement layoutNode;
+ TQString name;
+ TQString directoryFile;
+ TQPtrList<SubMenu> subMenus;
+ TQDict<KService> items;
+ TQDict<KService> excludeItems; // Needed when merging due to Move.
+ TQDomElement defaultLayoutNode;
+ TQDomElement layoutNode;
bool isDeleted;
- QStringList layoutList;
+ TQStringList layoutList;
appsInfo *apps_info;
};
@@ -64,7 +64,7 @@ public:
* @param forceLegacyLoad flag indicating whether the KDE "applnk"
* directory should be processed at least once.
*/
- SubMenu *parseMenu(const QString &file, bool forceLegacyLoad=false);
+ SubMenu *parseMenu(const TQString &file, bool forceLegacyLoad=false);
/**
* Returns a list of all directories involved in the last call to
@@ -73,16 +73,16 @@ public:
* A change in any of these directories or in any of their child-
* directories can result in changes to the menu.
*/
- QStringList allDirectories();
+ TQStringList allDirectories();
/**
* Debug function to enable tracking of what happens with a specific
* menu item id
*/
- void setTrackId(const QString &id);
+ void setTrackId(const TQString &id);
signals:
- void newService(const QString &path, KService **entry);
+ void newService(const TQString &path, KService **entry);
public:
struct MenuItem
@@ -96,28 +96,28 @@ public:
};
public:
- QStringList m_allDirectories; // A list of all the directories that we touch
+ TQStringList m_allDirectories; // A list of all the directories that we touch
- QStringList m_defaultDataDirs;
- QStringList m_defaultAppDirs;
- QStringList m_defaultDirectoryDirs;
- QStringList m_defaultMergeDirs;
- QStringList m_defaultLegacyDirs;
+ TQStringList m_defaultDataDirs;
+ TQStringList m_defaultAppDirs;
+ TQStringList m_defaultDirectoryDirs;
+ TQStringList m_defaultMergeDirs;
+ TQStringList m_defaultLegacyDirs;
- QStringList m_directoryDirs; // Current set of applicable <DirectoryDir> dirs
- QDict<SubMenu> m_legacyNodes; // Dictionary that stores Menu nodes
+ TQStringList m_directoryDirs; // Current set of applicable <DirectoryDir> dirs
+ TQDict<SubMenu> m_legacyNodes; // Dictionary that stores Menu nodes
// associated with legacy tree.
class docInfo {
public:
- QString baseDir; // Relative base dir of current menu file
- QString baseName; // Filename of current menu file without ".menu"
- QString path; // Full path of current menu file including ".menu"
+ TQString baseDir; // Relative base dir of current menu file
+ TQString baseName; // Filename of current menu file without ".menu"
+ TQString path; // Full path of current menu file including ".menu"
};
docInfo m_docInfo; // docInfo for current doc
- QValueStack<VFolderMenu::docInfo> m_docInfoStack;
+ TQValueStack<VFolderMenu::docInfo> m_docInfoStack;
class appsInfo {
public:
@@ -126,39 +126,39 @@ public:
dictCategories.setAutoDelete(true);
}
- QDict<KService::List> dictCategories; // category -> apps
- QDict<KService> applications; // rel path -> service
- QPtrDict<QString> appRelPaths; // service -> rel path
+ TQDict<KService::List> dictCategories; // category -> apps
+ TQDict<KService> applications; // rel path -> service
+ TQPtrDict<TQString> appRelPaths; // service -> rel path
};
appsInfo *m_appsInfo; // appsInfo for current menu
- QPtrList<appsInfo> m_appsInfoStack; // All applicable appsInfo for current menu
- QPtrList<appsInfo> m_appsInfoList; // List of all appsInfo objects.
- QDict<KService> m_usedAppsDict; // all applications that have been allocated
+ TQPtrList<appsInfo> m_appsInfoStack; // All applicable appsInfo for current menu
+ TQPtrList<appsInfo> m_appsInfoList; // List of all appsInfo objects.
+ TQDict<KService> m_usedAppsDict; // all applications that have been allocated
- QDomDocument m_doc;
+ TQDomDocument m_doc;
SubMenu *m_rootMenu;
SubMenu *m_currentMenu;
bool m_forcedLegacyLoad;
bool m_legacyLoaded;
bool m_track;
- QString m_trackId;
+ TQString m_trackId;
private:
/**
* Lookup application by relative path
*/
- KService *findApplication(const QString &relPath);
+ KService *findApplication(const TQString &relPath);
/**
* Lookup applications by category
*/
- QPtrList<KService::List> findCategory(const QString &category);
+ TQPtrList<KService::List> findCategory(const TQString &category);
/**
* Add new application
*/
- void addApplication(const QString &id, KService *service);
+ void addApplication(const TQString &id, KService *service);
/**
* Build application indices
@@ -180,25 +180,25 @@ private:
*/
void unloadAppsInfo();
- QDomDocument loadDoc();
- void mergeMenus(QDomElement &docElem, QString &name);
- void mergeFile(QDomElement &docElem, const QDomNode &mergeHere);
- void loadMenu(const QString &filename);
+ TQDomDocument loadDoc();
+ void mergeMenus(TQDomElement &docElem, TQString &name);
+ void mergeFile(TQDomElement &docElem, const TQDomNode &mergeHere);
+ void loadMenu(const TQString &filename);
/**
* Merge the items2 set into the items1 set
*/
- void includeItems(QDict<KService> *items1, QDict<KService> *items2);
+ void includeItems(TQDict<KService> *items1, TQDict<KService> *items2);
/**
* Remove all items from the items1 set that aren't also in the items2 set
*/
- void matchItems(QDict<KService> *items1, QDict<KService> *items2);
+ void matchItems(TQDict<KService> *items1, TQDict<KService> *items2);
/**
* Remove all items in the items2 set from the items1 set
*/
- void excludeItems(QDict<KService> *items1, QDict<KService> *items2);
+ void excludeItems(TQDict<KService> *items1, TQDict<KService> *items2);
/**
* Search the parentMenu tree for the menu menuName and takes it
@@ -207,7 +207,7 @@ private:
* This function returns a pointer to the menu if it was found
* or 0 if it was not found.
*/
- SubMenu* takeSubMenu(SubMenu *parentMenu, const QString &menuName);
+ SubMenu* takeSubMenu(SubMenu *parentMenu, const TQString &menuName);
/**
* Insert the menu newMenu with name menuName into the parentMenu.
@@ -218,7 +218,7 @@ private:
* If reversePriority is true, the existing menu has priority over newMenu
* during merging.
*/
- void insertSubMenu(VFolderMenu::SubMenu *parentMenu, const QString &menuName, VFolderMenu::SubMenu *newMenu, bool reversePriority=false);
+ void insertSubMenu(VFolderMenu::SubMenu *parentMenu, const TQString &menuName, VFolderMenu::SubMenu *newMenu, bool reversePriority=false);
/**
* Merge menu2 and it's submenus into menu1 and it's submenus
@@ -231,41 +231,41 @@ private:
* Inserts service into the menu using name relative to parentMenu
* Any missing sub-menus are created.
*/
- void insertService(SubMenu *parentMenu, const QString &name, KService *newService);
+ void insertService(SubMenu *parentMenu, const TQString &name, KService *newService);
/**
* Register the directory that @p file is in.
* @see allDirectories()
*/
- void registerFile(const QString &file);
+ void registerFile(const TQString &file);
/**
* Fill m_usedAppsDict with all applications from @p items
*/
- void markUsedApplications(QDict<KService> *items);
+ void markUsedApplications(TQDict<KService> *items);
/**
* Register @p directory
* @see allDirectories()
*/
- void registerDirectory(const QString &directory);
+ void registerDirectory(const TQString &directory);
void processKDELegacyDirs();
- void processLegacyDir(const QString &dir, const QString &relDir, const QString &prefix);
- void processMenu(QDomElement &docElem, int pass);
- void layoutMenu(VFolderMenu::SubMenu *menu, QStringList defaultLayout);
- void processCondition(QDomElement &docElem, QDict<KService> *items);
+ void processLegacyDir(const TQString &dir, const TQString &relDir, const TQString &prefix);
+ void processMenu(TQDomElement &docElem, int pass);
+ void layoutMenu(VFolderMenu::SubMenu *menu, TQStringList defaultLayout);
+ void processCondition(TQDomElement &docElem, TQDict<KService> *items);
void initDirs();
- void pushDocInfo(const QString &fileName, const QString &baseDir = QString::null);
- void pushDocInfoParent(const QString &basePath, const QString &baseDir);
+ void pushDocInfo(const TQString &fileName, const TQString &baseDir = TQString::null);
+ void pushDocInfoParent(const TQString &basePath, const TQString &baseDir);
void popDocInfo();
- QString absoluteDir(const QString &_dir, const QString &baseDir, bool keepRelativeToCfg=false);
- QString locateMenuFile(const QString &fileName);
- QString locateDirectoryFile(const QString &fileName);
- void loadApplications(const QString&, const QString&);
+ TQString absoluteDir(const TQString &_dir, const TQString &baseDir, bool keepRelativeToCfg=false);
+ TQString locateMenuFile(const TQString &fileName);
+ TQString locateDirectoryFile(const TQString &fileName);
+ void loadApplications(const TQString&, const TQString&);
};
#endif
diff --git a/kdefx/kdrawutil.cpp b/kdefx/kdrawutil.cpp
index 7ba703886..0fccb94f1 100644
--- a/kdefx/kdrawutil.cpp
+++ b/kdefx/kdrawutil.cpp
@@ -16,17 +16,17 @@
Boston, MA 02110-1301, USA.
*/
#include "kdrawutil.h"
-#include <qdrawutil.h>
+#include <tqdrawutil.h>
-KDEFX_EXPORT void kDrawNextButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken,
- const QBrush *fill)
+KDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken,
+ const TQBrush *fill)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x2 = x+w-1;
int y2 = y+h-1;
p->fillRect(x+1, y+1, w-2, h-2,
- fill ? *fill : g.brush(QColorGroup::Button));
+ fill ? *fill : g.brush(TQColorGroup::Button));
p->setPen(sunken ? Qt::black : g.light());
p->drawLine(x, y, x2-1, y);
p->drawLine(x, y, x, y2-1);
@@ -40,16 +40,16 @@ KDEFX_EXPORT void kDrawNextButton(QPainter *p, int x, int y, int w, int h,
}
-KDEFX_EXPORT void kDrawNextButton(QPainter *p, const QRect &r, const QColorGroup &g,
- bool sunken, const QBrush *fill)
+KDEFX_EXPORT void kDrawNextButton(TQPainter *p, const TQRect &r, const TQColorGroup &g,
+ bool sunken, const TQBrush *fill)
{
kDrawNextButton(p, r.x(), r.y(), r.width(), r.height(), g, sunken, fill);
}
-KDEFX_EXPORT void kDrawBeButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, const QBrush *fill)
+KDEFX_EXPORT void kDrawBeButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, const TQBrush *fill)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x2 = x+w-1;
int y2 = y+h-1;
p->setPen(g.dark());
@@ -90,20 +90,20 @@ KDEFX_EXPORT void kDrawBeButton(QPainter *p, int x, int y, int w, int h,
p->setPen(oldPen);
}
-KDEFX_EXPORT void kDrawBeButton(QPainter *p, QRect &r, const QColorGroup &g, bool sunken,
- const QBrush *fill)
+KDEFX_EXPORT void kDrawBeButton(TQPainter *p, TQRect &r, const TQColorGroup &g, bool sunken,
+ const TQBrush *fill)
{
kDrawBeButton(p, r.x(), r.y(), r.width(), r.height(), g, sunken, fill);
}
-KDEFX_EXPORT void kDrawRoundButton(QPainter *p, const QRect &r, const QColorGroup &g,
+KDEFX_EXPORT void kDrawRoundButton(TQPainter *p, const TQRect &r, const TQColorGroup &g,
bool sunken)
{
int x, y, x2, y2;
r.coords(&x, &y, &x2, &y2);
if(r.width() > 16 && r.height() > 16){
- QPen oldPen = p->pen();
- QPointArray hPntArray, lPntArray;
+ TQPen oldPen = p->pen();
+ TQPointArray hPntArray, lPntArray;
hPntArray.putPoints(0, 12, x+4,y+1, x+5,y+1, // top left
x+3,y+2, x+2,y+3, x+1,y+4, x+1,y+5,
x+1,y2-5, x+1,y2-4, x+2,y2-3, // half corners
@@ -136,16 +136,16 @@ KDEFX_EXPORT void kDrawRoundButton(QPainter *p, const QRect &r, const QColorGrou
qDrawWinPanel(p, x, y, r.width(), r.height(), g, sunken);
}
-KDEFX_EXPORT void kDrawRoundButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken)
+KDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken)
{
- QRect r(x, y, w, h);
+ TQRect r(x, y, w, h);
kDrawRoundButton(p, r, g, sunken);
}
#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
-KDEFX_EXPORT void kDrawRoundMask(QPainter *p, int x, int y, int w, int h, bool clear)
+KDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear)
{
// round edge fills
static const QCOORD btm_left_fill[]={ 0,0,1,0,2,0,3,0,4,0,0,1,1,1,2,1,3,1,4,1,
@@ -161,14 +161,14 @@ KDEFX_EXPORT void kDrawRoundMask(QPainter *p, int x, int y, int w, int h, bool c
3,1,3,2,3,3,3,4,3,0,4,1,4,2,4,3,4,4,4 };
if(clear)
- p->fillRect(x, y, w, h, QBrush(Qt::color0, Qt::SolidPattern));
+ p->fillRect(x, y, w, h, TQBrush(Qt::color0, Qt::SolidPattern));
- QBrush fillBrush(Qt::color1, Qt::SolidPattern);
+ TQBrush fillBrush(Qt::color1, Qt::SolidPattern);
p->setPen(Qt::color1);
if(w > 16 && h > 16){
int x2 = x+w-1;
int y2 = y+h-1;
- QPointArray a(QCOORDARRLEN(top_left_fill), top_left_fill);
+ TQPointArray a(QCOORDARRLEN(top_left_fill), top_left_fill);
a.translate(1, 1);
p->drawPoints(a);
a.setPoints(QCOORDARRLEN(btm_left_fill), btm_left_fill);
@@ -194,35 +194,35 @@ KDEFX_EXPORT void kDrawRoundMask(QPainter *p, int x, int y, int w, int h, bool c
p->fillRect(x, y, w, h, fillBrush);
}
-KDEFX_EXPORT void kRoundMaskRegion(QRegion &r, int x, int y, int w, int h)
+KDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h)
{
- // using a bunch of QRect lines seems much more efficient than bitmaps or
+ // using a bunch of TQRect lines seems much more efficient than bitmaps or
// point arrays, even tho it uses more statements
- r += QRect(x+6, y+0, w-12, h);
- r += QRect(x+5, y+1, 1, h-2); // left
- r += QRect(x+4, y+1, 1, h-2);
- r += QRect(x+3, y+2, 1, h-4);
- r += QRect(x+2, y+3, 1, h-6);
- r += QRect(x+1, y+4, 1, h-8);
- r += QRect(x, y+6, 1, h-12);
+ r += TQRect(x+6, y+0, w-12, h);
+ r += TQRect(x+5, y+1, 1, h-2); // left
+ r += TQRect(x+4, y+1, 1, h-2);
+ r += TQRect(x+3, y+2, 1, h-4);
+ r += TQRect(x+2, y+3, 1, h-6);
+ r += TQRect(x+1, y+4, 1, h-8);
+ r += TQRect(x, y+6, 1, h-12);
int x2 = x+w-1;
- r += QRect(x2-5, y+1, 1, h-2); // right
- r += QRect(x2-4, y+1, 1, h-2);
- r += QRect(x2-3, y+2, 1, h-4);
- r += QRect(x2-2, y+3, 1, h-6);
- r += QRect(x2-1, y+4, 1, h-8);
- r += QRect(x2, y+6, 1, h-12);
+ r += TQRect(x2-5, y+1, 1, h-2); // right
+ r += TQRect(x2-4, y+1, 1, h-2);
+ r += TQRect(x2-3, y+2, 1, h-4);
+ r += TQRect(x2-2, y+3, 1, h-6);
+ r += TQRect(x2-1, y+4, 1, h-8);
+ r += TQRect(x2, y+6, 1, h-12);
}
-KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y,
- QBitmap *lightColor, QBitmap *midColor,
- QBitmap *midlightColor, QBitmap *darkColor,
- QBitmap *blackColor, QBitmap *whiteColor)
+KDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int y,
+ TQBitmap *lightColor, TQBitmap *midColor,
+ TQBitmap *midlightColor, TQBitmap *darkColor,
+ TQBitmap *blackColor, TQBitmap *whiteColor)
{
- QBitmap *bitmaps[]={lightColor, midColor, midlightColor, darkColor,
+ TQBitmap *bitmaps[]={lightColor, midColor, midlightColor, darkColor,
blackColor, whiteColor};
- QColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
+ TQColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
Qt::black, Qt::white};
int i;
@@ -236,7 +236,7 @@ KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y,
}
}
-KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y, int w,
+KDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int y, int w,
int h, bool isXBitmaps, const uchar *lightColor,
const uchar *midColor, const uchar *midlightColor,
const uchar *darkColor, const uchar *blackColor,
@@ -245,14 +245,14 @@ KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y,
const uchar *data[]={lightColor, midColor, midlightColor, darkColor,
blackColor, whiteColor};
- QColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
+ TQColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
Qt::black, Qt::white};
int i;
- QBitmap b;
+ TQBitmap b;
for(i=0; i < 6; ++i){
if(data[i]){
- b = QBitmap(w, h, data[i], isXBitmaps);
+ b = TQBitmap(w, h, data[i], isXBitmaps);
b.setMask(b);
p->setPen(colors[i]);
p->drawPixmap(x, y, b);
diff --git a/kdefx/kdrawutil.h b/kdefx/kdrawutil.h
index f16a7ab02..27be8ac58 100644
--- a/kdefx/kdrawutil.h
+++ b/kdefx/kdrawutil.h
@@ -18,15 +18,15 @@
#ifndef __KDRAWUTIL_H
#define __KDRAWUTIL_H
-#include <qnamespace.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qpalette.h>
+#include <tqnamespace.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqpalette.h>
#include <kdelibs_export.h>
/*
- * Various drawing routines. Also see Qt's qdrawutil.h for some more routines
+ * Various drawing routines. Also see Qt's tqdrawutil.h for some more routines
* contained in Qt.
*
* (C) Daniel M. Duley <mosfet@kde.org>
@@ -45,16 +45,16 @@
* @param fill The brush to use for filling the interior of the button.
* Pass @a null to prevent the button from being filled.
*/
-KDEFX_EXPORT void kDrawNextButton(QPainter *p, const QRect &r, const QColorGroup &g,
- bool sunken=false, const QBrush *fill=0);
+KDEFX_EXPORT void kDrawNextButton(TQPainter *p, const TQRect &r, const TQColorGroup &g,
+ bool sunken=false, const TQBrush *fill=0);
/**
* @relates KStyle
* @overload
*/
-KDEFX_EXPORT void kDrawNextButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken=false,
- const QBrush *fill=0);
+KDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken=false,
+ const TQBrush *fill=0);
/**
* @relates KStyle
@@ -69,17 +69,17 @@ KDEFX_EXPORT void kDrawNextButton(QPainter *p, int x, int y, int w, int h,
* @param fill The brush to use for filling the interior of the button.
* Pass @a null to prevent the button from being filled.
*/
-KDEFX_EXPORT void kDrawBeButton(QPainter *p, QRect &r, const QColorGroup &g,
- bool sunken=false, const QBrush *fill=0);
+KDEFX_EXPORT void kDrawBeButton(TQPainter *p, TQRect &r, const TQColorGroup &g,
+ bool sunken=false, const TQBrush *fill=0);
/**
* @relates KStyle
* @c \#include @c <kdrawutil.h>
* @overload
*/
-KDEFX_EXPORT void kDrawBeButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken=false,
- const QBrush *fill=0);
+KDEFX_EXPORT void kDrawBeButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken=false,
+ const TQBrush *fill=0);
/**
* @relates KStyle
@@ -93,15 +93,15 @@ KDEFX_EXPORT void kDrawBeButton(QPainter *p, int x, int y, int w, int h,
* @param g Specifies the shading colors.
* @param sunken Whether to draw the button as sunken (pressed) or not.
*/
-KDEFX_EXPORT void kDrawRoundButton(QPainter *p, const QRect &r, const QColorGroup &g,
+KDEFX_EXPORT void kDrawRoundButton(TQPainter *p, const TQRect &r, const TQColorGroup &g,
bool sunken=false);
/**
* @relates KStyle
* @overload
*/
-KDEFX_EXPORT void kDrawRoundButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken=false);
+KDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken=false);
/**
* @relates KStyle
@@ -118,14 +118,14 @@ KDEFX_EXPORT void kDrawRoundButton(QPainter *p, int x, int y, int w, int h,
*
* @see kDrawRoundButton() and kDrawRoundMask()
*/
-KDEFX_EXPORT void kRoundMaskRegion(QRegion &r, int x, int y, int w, int h);
+KDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
/**
* @relates KStyle
* @c \#include @c <kdrawutil.h>
*
* Paints the pixels covered by a round button of the given size with
- * Qt::color1. This function is useful in QStyle::drawControlMask().
+ * Qt::color1. This function is useful in TQStyle::drawControlMask().
*
* @param p The painter to use for drawing the button.
* @param x The X coordinate of the button.
@@ -135,7 +135,7 @@ KDEFX_EXPORT void kRoundMaskRegion(QRegion &r, int x, int y, int w, int h);
* @param clear Whether to clear the rectangle specified by @p (x, y, w, h) to
* Qt::color0 before drawing the mask.
*/
-KDEFX_EXPORT void kDrawRoundMask(QPainter *p, int x, int y, int w, int h, bool clear=false);
+KDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear=false);
/**
* @relates KStyle
@@ -161,17 +161,17 @@ KDEFX_EXPORT void kDrawRoundMask(QPainter *p, int x, int y, int w, int h, bool c
*
* @see QColorGroup
*/
-KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y,
- QBitmap *lightColor=0, QBitmap *midColor=0,
- QBitmap *midlightColor=0, QBitmap *darkColor=0,
- QBitmap *blackColor=0, QBitmap *whiteColor=0);
+KDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int y,
+ TQBitmap *lightColor=0, TQBitmap *midColor=0,
+ TQBitmap *midlightColor=0, TQBitmap *darkColor=0,
+ TQBitmap *blackColor=0, TQBitmap *whiteColor=0);
/**
* @relates KStyle
* @c \#include @c <kdrawutil.h>
* @overload
*/
- KDEFX_EXPORT void kColorBitmaps(QPainter *p, const QColorGroup &g, int x, int y, int w,
+ KDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int y, int w,
int h, bool isXBitmaps=true, const uchar *lightColor = 0,
const uchar *midColor=0, const uchar *midlightColor=0,
const uchar *darkColor=0, const uchar *blackColor=0,
diff --git a/kdefx/kimageeffect.cpp b/kdefx/kimageeffect.cpp
index b2a859563..ca72e37c1 100644
--- a/kdefx/kimageeffect.cpp
+++ b/kdefx/kimageeffect.cpp
@@ -34,7 +34,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <math.h>
#include <assert.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <stdlib.h>
#include <iostream>
@@ -121,13 +121,13 @@ struct short_packet
//
//======================================================================
-QImage KImageEffect::gradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType eff, int ncols)
+TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
+ const TQColor &cb, GradientType eff, int ncols)
{
int rDiff, gDiff, bDiff;
int rca, gca, bca, rcb, gcb, bcb;
- QImage image(size, 32);
+ TQImage image(size, 32);
if (size.width() == 0 || size.height() == 0) {
#ifndef NDEBUG
@@ -357,10 +357,10 @@ QImage KImageEffect::gradient(const QSize &size, const QColor &ca,
}
// dither if necessary
- if (ncols && (QPixmap::defaultDepth() < 15 )) {
+ if (ncols && (TQPixmap::defaultDepth() < 15 )) {
if ( ncols < 2 || ncols > 256 )
ncols = 3;
- QColor *dPal = new QColor[ncols];
+ TQColor *dPal = new QColor[ncols];
for (int i=0; i<ncols; i++) {
dPal[i].setRgb ( rca + rDiff * i / ( ncols - 1 ),
gca + gDiff * i / ( ncols - 1 ),
@@ -385,8 +385,8 @@ QImage KImageEffect::gradient(const QSize &size, const QColor &ca,
// the balanced code would suffer with no other gain than a mere
// source code and byte code size economy.
-QImage KImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType eff, int xfactor, int yfactor,
+TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
+ const TQColor &cb, GradientType eff, int xfactor, int yfactor,
int ncols)
{
int dir; // general parameter used for direction switches
@@ -415,7 +415,7 @@ QImage KImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
int rDiff, gDiff, bDiff;
int rca, gca, bca, rcb, gcb, bcb;
- QImage image(size, 32);
+ TQImage image(size, 32);
if (size.width() == 0 || size.height() == 0) {
#ifndef NDEBUG
@@ -432,7 +432,7 @@ QImage KImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
bDiff = (bcb = cb.blue()) - (bca = ca.blue());
if( eff == VerticalGradient || eff == HorizontalGradient){
- QColor cRow;
+ TQColor cRow;
uint *p;
uint rgbRow;
@@ -596,10 +596,10 @@ QImage KImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
}
}
- if (ncols && (QPixmap::defaultDepth() < 15 )) {
+ if (ncols && (TQPixmap::defaultDepth() < 15 )) {
if ( ncols < 2 || ncols > 256 )
ncols = 3;
- QColor *dPal = new QColor[ncols];
+ TQColor *dPal = new QColor[ncols];
for (int i=0; i<ncols; i++) {
dPal[i].setRgb ( rca + rDiff * i / ( ncols - 1 ),
gca + gDiff * i / ( ncols - 1 ),
@@ -651,7 +651,7 @@ struct KIE8Pack
* less expensive than doing a float operation on the 3 color components of
* each pixel. (mosfet)
*/
-QImage& KImageEffect::intensity(QImage &image, float percent)
+TQImage& KImageEffect::intensity(TQImage &image, float percent)
{
if (image.width() == 0 || image.height() == 0) {
#ifndef NDEBUG
@@ -843,7 +843,7 @@ QImage& KImageEffect::intensity(QImage &image, float percent)
return image;
}
-QImage& KImageEffect::channelIntensity(QImage &image, float percent,
+TQImage& KImageEffect::channelIntensity(TQImage &image, float percent,
RGBComponent channel)
{
if (image.width() == 0 || image.height() == 0) {
@@ -934,7 +934,7 @@ QImage& KImageEffect::channelIntensity(QImage &image, float percent,
// Modulate an image with an RBG channel of another image
//
-QImage& KImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
+TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
ModulationType type, int factor, RGBComponent channel)
{
if (image.width() == 0 || image.height() == 0 ||
@@ -946,7 +946,7 @@ QImage& KImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
}
int r, g, b, h, s, v, a;
- QColor clr;
+ TQColor clr;
int mod=0;
unsigned int x1, x2, y1, y2;
register int x, y;
@@ -1064,7 +1064,7 @@ QImage& KImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
// Nice and fast direct pixel manipulation
-QImage& KImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
+TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
{
if (dst.width() <= 0 || dst.height() <= 0)
return dst;
@@ -1305,7 +1305,7 @@ QImage& KImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
}
// Nice and fast direct pixel manipulation
-QImage& KImageEffect::blend(QImage& src, QImage& dst, float opacity)
+TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
{
if (src.width() <= 0 || src.height() <= 0)
return dst;
@@ -1534,8 +1534,8 @@ QImage& KImageEffect::blend(QImage& src, QImage& dst, float opacity)
}
-QImage& KImageEffect::blend(QImage &image, float initial_intensity,
- const QColor &bgnd, GradientType eff,
+TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
+ const TQColor &bgnd, GradientType eff,
bool anti_dir)
{
if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
@@ -1742,17 +1742,17 @@ QImage& KImageEffect::blend(QImage &image, float initial_intensity,
// Not very efficient as we create a third big image...
//
-QImage& KImageEffect::blend(QImage &image1, QImage &image2,
+TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
GradientType gt, int xf, int yf)
{
if (image1.width() == 0 || image1.height() == 0 ||
image2.width() == 0 || image2.height() == 0)
return image1;
- QImage image3;
+ TQImage image3;
image3 = KImageEffect::unbalancedGradient(image1.size(),
- QColor(0,0,0), QColor(255,255,255),
+ TQColor(0,0,0), TQColor(255,255,255),
gt, xf, yf, 0);
return blend(image1,image2,image3, Red); // Channel to use is arbitrary
@@ -1760,8 +1760,8 @@ QImage& KImageEffect::blend(QImage &image1, QImage &image2,
// Blend image2 into image1, using an RBG channel of blendImage
//
-QImage& KImageEffect::blend(QImage &image1, QImage &image2,
- QImage &blendImage, RGBComponent channel)
+TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
+ TQImage &blendImage, RGBComponent channel)
{
if (image1.width() == 0 || image1.height() == 0 ||
image2.width() == 0 || image2.height() == 0 ||
@@ -1863,7 +1863,7 @@ unsigned int KImageEffect::uHash(unsigned int c)
// -----------------------------------------------------------------------------
-QImage& KImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
+TQImage& KImageEffect::hash(TQImage &image, Lighting lite, unsigned int spacing)
{
if (image.width() == 0 || image.height() == 0) {
#ifndef NDEBUG
@@ -1944,8 +1944,8 @@ QImage& KImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
//
//======================================================================
-QImage& KImageEffect::flatten(QImage &img, const QColor &ca,
- const QColor &cb, int ncols)
+TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
+ const TQColor &cb, int ncols)
{
if (img.width() == 0 || img.height() == 0)
return img;
@@ -2020,13 +2020,13 @@ QImage& KImageEffect::flatten(QImage &img, const QColor &ca,
if (ncols == 1) ncols++;
if (ncols > 256) ncols = 256;
- QColor *pal = new QColor[ncols];
+ TQColor *pal = new QColor[ncols];
sr = ((float) r2 - r1) / (ncols - 1);
sg = ((float) g2 - g1) / (ncols - 1);
sb = ((float) b2 - b1) / (ncols - 1);
for (int i=0; i<ncols; i++)
- pal[i] = QColor(r1 + int(sr*i), g1 + int(sg*i), b1 + int(sb*i));
+ pal[i] = TQColor(r1 + int(sr*i), g1 + int(sg*i), b1 + int(sb*i));
dither(img, pal, ncols);
@@ -2041,7 +2041,7 @@ QImage& KImageEffect::flatten(QImage &img, const QColor &ca,
//
//======================================================================
-QImage& KImageEffect::fade(QImage &img, float val, const QColor &color)
+TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
{
if (img.width() == 0 || img.height() == 0)
return img;
@@ -2123,7 +2123,7 @@ QImage& KImageEffect::fade(QImage &img, float val, const QColor &color)
//
// It does produce lower quality grayscale ;-) Use fast == true for the fast
// algorithm, false for the higher quality one (mosfet).
-QImage& KImageEffect::toGray(QImage &img, bool fast)
+TQImage& KImageEffect::toGray(TQImage &img, bool fast)
{
if (img.width() == 0 || img.height() == 0)
return img;
@@ -2173,7 +2173,7 @@ QImage& KImageEffect::toGray(QImage &img, bool fast)
}
// CT 29Jan2000 - desaturation algorithms
-QImage& KImageEffect::desaturate(QImage &img, float desat)
+TQImage& KImageEffect::desaturate(TQImage &img, float desat)
{
if (img.width() == 0 || img.height() == 0)
return img;
@@ -2185,7 +2185,7 @@ QImage& KImageEffect::desaturate(QImage &img, float desat)
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
(unsigned int *)img.colorTable();
int h, s, v, i;
- QColor clr; // keep constructor out of loop (mosfet)
+ TQColor clr; // keep constructor out of loop (mosfet)
for(i=0; i < pixels; ++i){
clr.setRgb(data[i]);
clr.hsv(&h, &s, &v);
@@ -2196,7 +2196,7 @@ QImage& KImageEffect::desaturate(QImage &img, float desat)
}
// Contrast stuff (mosfet)
-QImage& KImageEffect::contrast(QImage &img, int c)
+TQImage& KImageEffect::contrast(TQImage &img, int c)
{
if (img.width() == 0 || img.height() == 0)
return img;
@@ -2258,13 +2258,13 @@ QImage& KImageEffect::contrast(QImage &img, int c)
// Floyd-Steinberg dithering
// Ref: Bitmapped Graphics Programming in C++
// Marv Luse, Addison-Wesley Publishing, 1993.
-QImage& KImageEffect::dither(QImage &img, const QColor *palette, int size)
+TQImage& KImageEffect::dither(TQImage &img, const TQColor *palette, int size)
{
if (img.width() == 0 || img.height() == 0 ||
palette == 0 || img.depth() <= 8)
return img;
- QImage dImage( img.width(), img.height(), 8, size );
+ TQImage dImage( img.width(), img.height(), 8, size );
int i;
dImage.setNumColors( size );
@@ -2345,7 +2345,7 @@ QImage& KImageEffect::dither(QImage &img, const QColor *palette, int size)
return img;
}
-int KImageEffect::nearestColor( int r, int g, int b, const QColor *palette, int size )
+int KImageEffect::nearestColor( int r, int g, int b, const TQColor *palette, int size )
{
if (palette == 0)
return 0;
@@ -2376,9 +2376,9 @@ int KImageEffect::nearestColor( int r, int g, int b, const QColor *palette, int
}
bool KImageEffect::blend(
- const QImage & upper,
- const QImage & lower,
- QImage & output
+ const TQImage & upper,
+ const TQImage & lower,
+ TQImage & output
)
{
if (
@@ -2435,10 +2435,10 @@ bool KImageEffect::blend(
#if 0
// Not yet...
bool KImageEffect::blend(
- const QImage & upper,
- const QImage & lower,
- QImage & output,
- const QRect & destRect
+ const TQImage & upper,
+ const TQImage & lower,
+ TQImage & output,
+ const TQRect & destRect
)
{
output = lower.copy();
@@ -2449,9 +2449,9 @@ bool KImageEffect::blend(
bool KImageEffect::blend(
int &x, int &y,
- const QImage & upper,
- const QImage & lower,
- QImage & output
+ const TQImage & upper,
+ const TQImage & lower,
+ TQImage & output
)
{
int cx=0, cy=0, cw=upper.width(), ch=upper.height();
@@ -2513,8 +2513,8 @@ bool KImageEffect::blend(
bool KImageEffect::blendOnLower(
int x, int y,
- const QImage & upper,
- const QImage & lower
+ const TQImage & upper,
+ const TQImage & lower
)
{
int cx=0, cy=0, cw=upper.width(), ch=upper.height();
@@ -2581,11 +2581,11 @@ bool KImageEffect::blendOnLower(
return true;
}
-void KImageEffect::blendOnLower(const QImage &upper, const QPoint &upperOffset,
- QImage &lower, const QRect &lowerRect)
+void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset,
+ TQImage &lower, const TQRect &lowerRect)
{
// clip rect
- QRect lr = lowerRect & lower.rect();
+ TQRect lr = lowerRect & lower.rect();
lr.setWidth( QMIN(lr.width(), upper.width()-upperOffset.x()) );
lr.setHeight( QMIN(lr.height(), upper.height()-upperOffset.y()) );
if ( !lr.isValid() ) return;
@@ -2603,11 +2603,11 @@ void KImageEffect::blendOnLower(const QImage &upper, const QPoint &upperOffset,
}
}
-void KImageEffect::blendOnLower(const QImage &upper, const QPoint &upperOffset,
- QImage &lower, const QRect &lowerRect, float opacity)
+void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset,
+ TQImage &lower, const TQRect &lowerRect, float opacity)
{
// clip rect
- QRect lr = lowerRect & lower.rect();
+ TQRect lr = lowerRect & lower.rect();
lr.setWidth( QMIN(lr.width(), upper.width()-upperOffset.x()) );
lr.setHeight( QMIN(lr.height(), upper.height()-upperOffset.y()) );
if ( !lr.isValid() ) return;
@@ -2625,14 +2625,14 @@ void KImageEffect::blendOnLower(const QImage &upper, const QPoint &upperOffset,
}
}
-QRect KImageEffect::computeDestinationRect(const QSize &lowerSize,
- Disposition disposition, QImage &upper)
+TQRect KImageEffect::computeDestinationRect(const TQSize &lowerSize,
+ Disposition disposition, TQImage &upper)
{
int w = lowerSize.width();
int h = lowerSize.height();
int ww = upper.width();
int wh = upper.height();
- QRect d;
+ TQRect d;
switch (disposition) {
case NoImage:
@@ -2690,19 +2690,19 @@ QRect KImageEffect::computeDestinationRect(const QSize &lowerSize,
return d;
}
-void KImageEffect::blendOnLower(QImage &upper, QImage &lower,
+void KImageEffect::blendOnLower(TQImage &upper, TQImage &lower,
Disposition disposition, float opacity)
{
- QRect r = computeDestinationRect(lower.size(), disposition, upper);
+ TQRect r = computeDestinationRect(lower.size(), disposition, upper);
for (int y = r.top(); y<r.bottom(); y += upper.height())
for (int x = r.left(); x<r.right(); x += upper.width())
- blendOnLower(upper, QPoint(-QMIN(x, 0), -QMIN(y, 0)),
- lower, QRect(x, y, upper.width(), upper.height()), opacity);
+ blendOnLower(upper, TQPoint(-QMIN(x, 0), -QMIN(y, 0)),
+ lower, TQRect(x, y, upper.width(), upper.height()), opacity);
}
// For selected icons
-QImage& KImageEffect::selectedImage( QImage &img, const QColor &col )
+TQImage& KImageEffect::selectedImage( TQImage &img, const TQColor &col )
{
return blend( col, img, 0.5);
}
@@ -2744,14 +2744,14 @@ dealings in ImageMagick without prior written authorization from the
ImageMagick Studio.
*/
-QImage KImageEffect::sample(QImage &src, int w, int h)
+TQImage KImageEffect::sample(TQImage &src, int w, int h)
{
if(w == src.width() && h == src.height())
return(src);
int depth = src.depth();
- QImage dest(w, h, depth, depth <= 8 ? src.numColors() : 0,
- depth == 1 ? QImage::LittleEndian : QImage::IgnoreEndian);
+ TQImage dest(w, h, depth, depth <= 8 ? src.numColors() : 0,
+ depth == 1 ? TQImage::LittleEndian : TQImage::IgnoreEndian);
int *x_offset = (int *)malloc(w*sizeof(int));
int *y_offset = (int *)malloc(h*sizeof(int));
if(!x_offset || !y_offset){
@@ -2778,7 +2778,7 @@ QImage KImageEffect::sample(QImage &src, int w, int h)
}
}
else if(depth == 1) {
- int r = src.bitOrder() == QImage::LittleEndian;
+ int r = src.bitOrder() == TQImage::LittleEndian;
memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(QRgb));
for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y);
@@ -2807,7 +2807,7 @@ QImage KImageEffect::sample(QImage &src, int w, int h)
return(dest);
}
-void KImageEffect::threshold(QImage &img, unsigned int threshold)
+void KImageEffect::threshold(TQImage &img, unsigned int threshold)
{
int i, count;
unsigned int *data;
@@ -2903,7 +2903,7 @@ void KImageEffect::hull(const int x_offset, const int y_offset,
}
}
-QImage KImageEffect::despeckle(QImage &src)
+TQImage KImageEffect::despeckle(TQImage &src)
{
int i, j, x, y;
unsigned int *blue_channel, *red_channel, *green_channel, *buffer,
@@ -2914,7 +2914,7 @@ QImage KImageEffect::despeckle(QImage &src)
Y[4]= {1, 0, 1, 1};
unsigned int *destData;
- QImage dest(src.width(), src.height(), 32);
+ TQImage dest(src.width(), src.height(), 32);
packets = (src.width()+2)*(src.height()+2);
red_channel = (unsigned int *)calloc(packets, sizeof(unsigned int));
@@ -3109,10 +3109,10 @@ unsigned int KImageEffect::generateNoise(unsigned int pixel,
return((unsigned int) (value+0.5));
}
-QImage KImageEffect::addNoise(QImage &src, NoiseType noise_type)
+TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
{
int x, y;
- QImage dest(src.width(), src.height(), 32);
+ TQImage dest(src.width(), src.height(), 32);
unsigned int *destData;
if(src.depth() > 8){ // DirectClass source image
@@ -3148,7 +3148,7 @@ QImage KImageEffect::addNoise(QImage &src, NoiseType noise_type)
return(dest);
}
-unsigned int KImageEffect::interpolateColor(QImage *image, double x_offset,
+unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset,
double y_offset,
unsigned int background)
{
@@ -3239,7 +3239,7 @@ unsigned int KImageEffect::interpolateColor(QImage *image, double x_offset,
(unsigned char)(beta*(alpha*qAlpha(p)+x_offset*qAlpha(q))+y_offset*(alpha*qAlpha(r)+x_offset*qAlpha(s)))));
}
-QImage KImageEffect::implode(QImage &src, double factor,
+TQImage KImageEffect::implode(TQImage &src, double factor,
unsigned int background)
{
double amount, distance, radius;
@@ -3248,7 +3248,7 @@ QImage KImageEffect::implode(QImage &src, double factor,
unsigned int *destData;
int x, y;
- QImage dest(src.width(), src.height(), 32);
+ TQImage dest(src.width(), src.height(), 32);
// compute scaling factor
x_scale = 1.0;
@@ -3320,9 +3320,9 @@ QImage KImageEffect::implode(QImage &src, double factor,
return(dest);
}
-QImage KImageEffect::rotate(QImage &img, RotateDirection r)
+TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
{
- QImage dest;
+ TQImage dest;
int x, y;
if(img.depth() > 8){
unsigned int *srcData, *destData;
@@ -3418,7 +3418,7 @@ QImage KImageEffect::rotate(QImage &img, RotateDirection r)
return(dest);
}
-void KImageEffect::solarize(QImage &img, double factor)
+void KImageEffect::solarize(TQImage &img, double factor)
{
int i, count;
int threshold;
@@ -3441,13 +3441,13 @@ void KImageEffect::solarize(QImage &img, double factor)
}
}
-QImage KImageEffect::spread(QImage &src, unsigned int amount)
+TQImage KImageEffect::spread(TQImage &src, unsigned int amount)
{
int quantum, x, y;
int x_distance, y_distance;
if(src.width() < 3 || src.height() < 3)
return(src);
- QImage dest(src);
+ TQImage dest(src);
dest.detach();
quantum=(amount+1) >> 1;
if(src.depth() > 8){ // DirectClass source image
@@ -3492,14 +3492,14 @@ QImage KImageEffect::spread(QImage &src, unsigned int amount)
return(dest);
}
-QImage KImageEffect::swirl(QImage &src, double degrees,
+TQImage KImageEffect::swirl(TQImage &src, double degrees,
unsigned int background)
{
double cosine, distance, factor, radius, sine, x_center, x_distance,
x_scale, y_center, y_distance, y_scale;
int x, y;
unsigned int *q;
- QImage dest(src.width(), src.height(), 32);
+ TQImage dest(src.width(), src.height(), 32);
// compute scaling factor
x_center = src.width()/2.0;
@@ -3570,14 +3570,14 @@ QImage KImageEffect::swirl(QImage &src, double degrees,
return(dest);
}
-QImage KImageEffect::wave(QImage &src, double amplitude, double wavelength,
+TQImage KImageEffect::wave(TQImage &src, double amplitude, double wavelength,
unsigned int background)
{
double *sine_map;
int x, y;
unsigned int *q;
- QImage dest(src.width(), src.height() + (int)(2*fabs(amplitude)), 32);
+ TQImage dest(src.width(), src.height() + (int)(2*fabs(amplitude)), 32);
// allocate sine map
sine_map = (double *)malloc(dest.width()*sizeof(double));
if(!sine_map)
@@ -3603,13 +3603,13 @@ QImage KImageEffect::wave(QImage &src, double amplitude, double wavelength,
// New algorithms based on ImageMagick 5.5.6 (05/26/03)
-QImage KImageEffect::oilPaint(QImage &src, int /*radius*/)
+TQImage KImageEffect::oilPaint(TQImage &src, int /*radius*/)
{
/* binary compat method - remove me when possible! */
return(oilPaintConvolve(src, 0));
}
-QImage KImageEffect::oilPaintConvolve(QImage &src, double radius)
+TQImage KImageEffect::oilPaintConvolve(TQImage &src, double radius)
{
unsigned long count /*,*histogram*/;
unsigned long histogram[256];
@@ -3621,7 +3621,7 @@ QImage KImageEffect::oilPaintConvolve(QImage &src, double radius)
if(src.depth() < 32)
src.convertDepth(32);
- QImage dest(src);
+ TQImage dest(src);
dest.detach();
width = getOptimalKernelWidth(radius, 0.5);
@@ -3674,15 +3674,15 @@ QImage KImageEffect::oilPaintConvolve(QImage &src, double radius)
return(dest);
}
-QImage KImageEffect::charcoal(QImage &src, double /*factor*/)
+TQImage KImageEffect::charcoal(TQImage &src, double /*factor*/)
{
/* binary compat method - remove me when possible! */
return(charcoal(src, 0, 1));
}
-QImage KImageEffect::charcoal(QImage &src, double radius, double sigma)
+TQImage KImageEffect::charcoal(TQImage &src, double radius, double sigma)
{
- QImage img(edge(src, radius));
+ TQImage img(edge(src, radius));
img = blur(img, radius, sigma);
normalize(img);
img.invertPixels(false);
@@ -3690,7 +3690,7 @@ QImage KImageEffect::charcoal(QImage &src, double radius, double sigma)
return(img);
}
-void KImageEffect::normalize(QImage &image)
+void KImageEffect::normalize(TQImage &image)
{
struct double_packet high, low, intensity, *histogram;
struct short_packet *normalize_map;
@@ -3900,7 +3900,7 @@ void KImageEffect::normalize(QImage &image)
liberateMemory(&normalize_map);
}
-void KImageEffect::equalize(QImage &image)
+void KImageEffect::equalize(TQImage &image)
{
struct double_packet high, low, intensity, *map, *histogram;
struct short_packet *equalize_map;
@@ -4000,12 +4000,12 @@ void KImageEffect::equalize(QImage &image)
}
-QImage KImageEffect::edge(QImage &image, double radius)
+TQImage KImageEffect::edge(TQImage &image, double radius)
{
double *kernel;
int width;
register long i;
- QImage dest;
+ TQImage dest;
if(radius == 50.0){
/* For binary compatability! Remove me when possible! This used to
@@ -4032,18 +4032,18 @@ QImage KImageEffect::edge(QImage &image, double radius)
return(dest);
}
-QImage KImageEffect::emboss(QImage &src)
+TQImage KImageEffect::emboss(TQImage &src)
{
/* binary compat method - remove me when possible! */
return(emboss(src, 0, 1));
}
-QImage KImageEffect::emboss(QImage &image, double radius, double sigma)
+TQImage KImageEffect::emboss(TQImage &image, double radius, double sigma)
{
double alpha, *kernel;
int j, width;
register long i, u, v;
- QImage dest;
+ TQImage dest;
if(sigma == 0.0){
qWarning("KImageEffect::emboss(): Zero sigma is not permitted!");
@@ -4251,16 +4251,16 @@ int KImageEffect::getBlurKernel(int width, double sigma, double **kernel)
return(width);
}
-QImage KImageEffect::blur(QImage &src, double /*factor*/)
+TQImage KImageEffect::blur(TQImage &src, double /*factor*/)
{
/* binary compat method - remove me when possible! */
return(blur(src, 0, 1));
}
-QImage KImageEffect::blur(QImage &src, double radius, double sigma)
+TQImage KImageEffect::blur(TQImage &src, double radius, double sigma)
{
double *kernel;
- QImage dest;
+ TQImage dest;
int width;
int x, y;
unsigned int *scanline, *temp;
@@ -4329,7 +4329,7 @@ QImage KImageEffect::blur(QImage &src, double radius, double sigma)
return(dest);
}
-bool KImageEffect::convolveImage(QImage *image, QImage *dest,
+bool KImageEffect::convolveImage(TQImage *image, TQImage *dest,
const unsigned int order,
const double *kernel)
{
@@ -4427,18 +4427,18 @@ int KImageEffect::getOptimalKernelWidth(double radius, double sigma)
return((int)width-2);
}
-QImage KImageEffect::sharpen(QImage &src, double /*factor*/)
+TQImage KImageEffect::sharpen(TQImage &src, double /*factor*/)
{
/* binary compat method - remove me when possible! */
return(sharpen(src, 0, 1));
}
-QImage KImageEffect::sharpen(QImage &image, double radius, double sigma)
+TQImage KImageEffect::sharpen(TQImage &image, double radius, double sigma)
{
double alpha, normalize, *kernel;
int width;
register long i, u, v;
- QImage dest;
+ TQImage dest;
if(sigma == 0.0){
qWarning("KImageEffect::sharpen(): Zero sigma is not permitted!");
@@ -4473,7 +4473,7 @@ QImage KImageEffect::sharpen(QImage &image, double radius, double sigma)
// End of new algorithms
-QImage KImageEffect::shade(QImage &src, bool color_shading, double azimuth,
+TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
double elevation)
{
struct PointInfo{
@@ -4487,7 +4487,7 @@ QImage KImageEffect::shade(QImage &src, bool color_shading, double azimuth,
unsigned int *q;
- QImage dest(src.width(), src.height(), 32);
+ TQImage dest(src.width(), src.height(), 32);
azimuth = DegreesToRadians(azimuth);
elevation = DegreesToRadians(elevation);
@@ -4611,13 +4611,13 @@ QImage KImageEffect::shade(QImage &src, bool color_shading, double azimuth,
// taking a grayscale threshold (ie: 128) and incrementing RGB color
// channels above it and decrementing those below it, but this gives much
// better results. (mosfet 12/28/01)
-void KImageEffect::contrastHSV(QImage &img, bool sharpen)
+void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
{
int i, sign;
unsigned int *data;
int count;
double brightness, scale, theta;
- QColor c;
+ TQColor c;
int h, s, v;
sign = sharpen ? 1 : -1;
@@ -4848,12 +4848,12 @@ static void bumpmap_row( uint *src,
* @return The destination image (dst) containing the result.
* @author Zack Rusin <zack@kde.org>
*/
-QImage KImageEffect::bumpmap(QImage &img, QImage &map, double azimuth, double elevation,
+TQImage KImageEffect::bumpmap(TQImage &img, TQImage &map, double azimuth, double elevation,
int depth, int xofs, int yofs, int waterlevel,
int ambient, bool compensate, bool invert,
BumpmapType type, bool tiled)
{
- QImage dst;
+ TQImage dst;
if ( img.depth() != 32 || img.depth() != 32 ) {
qWarning( "Bump-mapping effect works only with 32 bit images");
diff --git a/kdefx/kimageeffect.h b/kdefx/kimageeffect.h
index 7bca73820..4a4c68dd4 100644
--- a/kdefx/kimageeffect.h
+++ b/kdefx/kimageeffect.h
@@ -40,7 +40,7 @@ class QPoint;
class QRect;
/**
- * This class includes various QImage based graphical effects.
+ * This class includes various TQImage based graphical effects.
*
* Everything is
* static, so there is no need to create an instance of this class. You can
@@ -143,8 +143,8 @@ public:
* truecolor display. The gradient will be dithered to this number of
* colors. Pass 0 to prevent dithering.
*/
- static QImage gradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType type, int ncols=3);
+ static TQImage gradient(const TQSize &size, const TQColor &ca,
+ const TQColor &cb, GradientType type, int ncols=3);
/**
* Create an unbalanced gradient.
@@ -160,8 +160,8 @@ public:
* @param yfactor The y decay length.
* @param ncols The number of colors. See KImageEffect:gradient.
*/
- static QImage unbalancedGradient(const QSize &size, const QColor &ca,
- const QColor &cb, GradientType type, int xfactor = 100,
+ static TQImage unbalancedGradient(const TQSize &size, const TQColor &ca,
+ const TQColor &cb, GradientType type, int xfactor = 100,
int yfactor = 100, int ncols = 3);
/**
@@ -180,7 +180,7 @@ public:
* @author Karol Szwed (gallium@kde.org)
* @author Fredrik H&ouml;glund (fredrik@kde.org)
*/
- static QImage& blend(const QColor& clr, QImage& dst, float opacity);
+ static TQImage& blend(const TQColor& clr, TQImage& dst, float opacity);
/**
* Blend the src image into the destination image, using an opacity
@@ -198,7 +198,7 @@ public:
* @author Karol Szwed (gallium@kde.org)
* @author Fredrik H&ouml;glund (fredrik@kde.org)
*/
- static QImage& blend(QImage& src, QImage& dst, float opacity);
+ static TQImage& blend(TQImage& src, TQImage& dst, float opacity);
/**
* Blend the provided image into a background of the indicated color.
@@ -214,8 +214,8 @@ public:
* with concentric blending effects)
* @param image must be 32bpp
*/
- static QImage& blend(QImage &image, float initial_intensity,
- const QColor &bgnd, GradientType eff,
+ static TQImage& blend(TQImage &image, float initial_intensity,
+ const TQColor &bgnd, GradientType eff,
bool anti_dir=false);
/**
@@ -228,7 +228,7 @@ public:
* @param xf x decay length for unbalanced gradient tpye
* @param yf y decay length for unbalanced gradient tpye
*/
- static QImage& blend(QImage &image1,QImage &image2,
+ static TQImage& blend(TQImage &image1,TQImage &image2,
GradientType gt, int xf=100, int yf=100);
/**
@@ -243,8 +243,8 @@ public:
* in between, a corresponding blending is used.
* @param channel The RBG channel to use for the blending decision.
*/
- static QImage& blend(QImage &image1, QImage &image2,
- QImage &blendImage, RGBComponent channel);
+ static TQImage& blend(TQImage &image1, TQImage &image2,
+ TQImage &blendImage, RGBComponent channel);
/**
* Blend an image into another one, using alpha in the expected way.
@@ -253,13 +253,13 @@ public:
* @param output the target image
* @author Rik Hemsley (rikkus) <rik@kde.org>
*/
- static bool blend(const QImage & upper, const QImage & lower, QImage & output);
-// Not yet... static bool blend(const QImage & image1, const QImage & image2, QImage & output, const QRect & destRect);
+ static bool blend(const TQImage & upper, const TQImage & lower, TQImage & output);
+// Not yet... static bool blend(const TQImage & image1, const TQImage & image2, TQImage & output, const TQRect & destRect);
/**
* Blend an image into another one, using alpha in the expected way and
* over coordinates @p x and @p y with respect to the lower image.
- * The output is a QImage which is the @p upper image already blended
+ * The output is a TQImage which is the @p upper image already blended
* with the @p lower one, so its size will be (in general) the same than
* @p upper instead of the same size than @p lower like the method above.
* In fact, the size of @p output is like upper's one only when it can be
@@ -272,7 +272,7 @@ public:
* @param lower the "lower" image
* @param output the target image
*/
- static bool blend(int &x, int &y, const QImage & upper, const QImage & lower, QImage & output);
+ static bool blend(int &x, int &y, const TQImage & upper, const TQImage & lower, TQImage & output);
/**
* Blend an image into another one, using alpha in the expected way and
@@ -284,7 +284,7 @@ public:
* @param upper the "upper" image
* @param lower the "lower" image, which becomes the output image
*/
- static bool blendOnLower(int x, int y, const QImage & upper, const QImage & lower);
+ static bool blendOnLower(int x, int y, const TQImage & upper, const TQImage & lower);
/**
* Blend part of an image into part of another, using the alpha channel in
@@ -298,8 +298,8 @@ public:
* blending will occur.
* @since 3.2
*/
- static void blendOnLower(const QImage &upper, const QPoint &upperOffset,
- QImage &lower, const QRect &lowerRect);
+ static void blendOnLower(const TQImage &upper, const TQPoint &upperOffset,
+ TQImage &lower, const TQRect &lowerRect);
/**
* Blend part of an image into part of another, using the opacity value
@@ -315,8 +315,8 @@ public:
* the source image will be blended into the destination image.
* @since 3.2
*/
- static void blendOnLower(const QImage &upper, const QPoint &upperOffset,
- QImage &lower, const QRect &lowerRect, float opacity);
+ static void blendOnLower(const TQImage &upper, const TQPoint &upperOffset,
+ TQImage &lower, const TQRect &lowerRect, float opacity);
/**
* Disposition of a source image on top of a destination image.
@@ -347,8 +347,8 @@ public:
* @return the computed rectangle. Its size may exceed @e lowerSize.
* @since 3.2
*/
- static QRect computeDestinationRect(const QSize &lowerSize,
- Disposition disposition, QImage &upper);
+ static TQRect computeDestinationRect(const TQSize &lowerSize,
+ Disposition disposition, TQImage &upper);
/**
* Blend an image on top of another using a given disposition and a given
@@ -356,19 +356,19 @@ public:
* way. Beware the upper image may be modified.
* @since 3.2
*/
- static void blendOnLower(QImage &upper, QImage &lower,
+ static void blendOnLower(TQImage &upper, TQImage &lower,
Disposition disposition, float opacity);
/**
* Modifies the intensity of a pixmap's RGB channel component.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param percent Percent value. Use a negative value to dim.
* @param channel Which channel(s) should be modified
* @return The @p image, provided for convenience.
* @author Daniel M. Duley (mosfet)
*/
- static QImage& channelIntensity(QImage &image, float percent,
+ static TQImage& channelIntensity(TQImage &image, float percent,
RGBComponent channel);
/**
@@ -376,36 +376,36 @@ public:
*
* The number of colors will not be changed.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param val The strength of the effect. 0 <= val <= 1.
* @param color The background color.
* @return Returns the image(), provided for convenience.
*/
- static QImage& fade(QImage &image, float val, const QColor &color);
+ static TQImage& fade(TQImage &image, float val, const TQColor &color);
/**
* This recolors a pixmap. The most dark color will become color a,
* the most bright one color b, and in between.
*
- * @param image A QImage to process.
+ * @param image A TQImage to process.
* @param ca Color a
* @param cb Color b
* @param ncols The number of colors to dither the image to.
* Pass 0 to prevent dithering.
*/
- static QImage& flatten(QImage &image, const QColor &ca,
- const QColor &cb, int ncols=0);
+ static TQImage& flatten(TQImage &image, const TQColor &ca,
+ const TQColor &cb, int ncols=0);
/**
* Build a hash on any given QImage
*
- * @param image The QImage to process
+ * @param image The TQImage to process
* @param lite The hash faces the indicated lighting (cardinal poles).
* @param spacing How many unmodified pixels in between hashes.
* @return Returns the image(), provided for convenience.
*/
- static QImage& hash(QImage &image, Lighting lite=NorthLite,
+ static TQImage& hash(TQImage &image, Lighting lite=NorthLite,
unsigned int spacing=0);
/**
@@ -415,77 +415,77 @@ public:
* This function uses MMX instructions to process the image
* on processors that support it.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param percent The percent value. Use a negative value to dim.
* @return Returns The image(), provided for convenience.
* @author Daniel M. Duley (mosfet)
* @author Benjamin Roe (ben@benroe.com)
*/
- static QImage& intensity(QImage &image, float percent);
+ static TQImage& intensity(TQImage &image, float percent);
/**
* Modulate the image with a color channel of another image.
*
- * @param image The QImage to modulate and result.
- * @param modImage The QImage to use for modulation.
+ * @param image The TQImage to modulate and result.
+ * @param modImage The TQImage to use for modulation.
* @param reverse Invert the meaning of image/modImage; result is image!
* @param type The modulation Type to use.
* @param factor The modulation amplitude; with 0 no effect [-200;200].
* @param channel The RBG channel of image2 to use for modulation.
* @return Returns the image(), provided for convenience.
*/
- static QImage& modulate(QImage &image, QImage &modImage, bool reverse,
+ static TQImage& modulate(TQImage &image, TQImage &modImage, bool reverse,
ModulationType type, int factor, RGBComponent channel);
/**
* Convert an image to grayscale.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param fast Set to @p true in order to use a faster but non-photographic
* quality algorithm. Appropriate for things such as toolbar icons.
* @return Returns the image(), provided for convenience.
* @author Daniel M. Duley (mosfet)
*/
- static QImage& toGray(QImage &image, bool fast = false);
+ static TQImage& toGray(TQImage &image, bool fast = false);
/**
* Desaturate an image evenly.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param desat A value between 0 and 1 setting the degree of desaturation
* @return Returns the image(), provided for convenience.
*/
- static QImage& desaturate(QImage &image, float desat = 0.3);
+ static TQImage& desaturate(TQImage &image, float desat = 0.3);
/**
* Fast, but low quality contrast of an image. Also see contrastHSV.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param c A contrast value between -255 to 255.
* @return The image(), provided for convenience.
* @author Daniel M. Duley (mosfet)
* ### KDE 4: remove
*/
- static QImage& contrast(QImage &image, int c);
+ static TQImage& contrast(TQImage &image, int c);
/**
* Dither an image using Floyd-Steinberg dithering for low-color
* situations.
*
- * @param image The QImage to process.
+ * @param image The TQImage to process.
* @param palette The color palette to use
* @param size The size of the palette
* @return Returns the image(), provided for convenience.
*/
- static QImage& dither(QImage &image, const QColor *palette, int size);
+ static TQImage& dither(TQImage &image, const TQColor *palette, int size);
/**
* Calculate the image for a selected image, for instance a selected icon
* on the desktop.
- * @param img the QImage to select
- * @param col the selected color, usually from QColorGroup::highlight().
+ * @param img the TQImage to select
+ * @param col the selected color, usually from TQColorGroup::highlight().
*/
- static QImage& selectedImage( QImage &img, const QColor &col );
+ static TQImage& selectedImage( TQImage &img, const TQColor &col );
/**
* High quality, expensive HSV contrast. You can do a faster one by just
@@ -493,12 +493,12 @@ public:
* channels above it and decrementing those below it, but this gives much
* better results.
*
- * @param img The QImage to process.
+ * @param img The TQImage to process.
* @param sharpen If true sharpness is increase, (spiffed). Otherwise
* it is decreased, (dulled).
* @author Daniel M. Duley (mosfet)
*/
- static void contrastHSV(QImage &img, bool sharpen=true);
+ static void contrastHSV(TQImage &img, bool sharpen=true);
/**
* Normalises the pixel values to span the full range of color values.
@@ -506,7 +506,7 @@ public:
* @param img the image that is normalised
* @author Daniel M. Duley (mosfet)
*/
- static void normalize(QImage &img);
+ static void normalize(TQImage &img);
/**
* Performs histogram equalisation on the reference
@@ -514,35 +514,35 @@ public:
* @param img the image that is equalised
* @author Daniel M. Duley (mosfet)
*/
- static void equalize(QImage &img);
+ static void equalize(TQImage &img);
/**
* Thresholds the reference image. You can also threshold images by using
- * ThresholdDither in the various QPixmap/QImage convert methods, but this
+ * ThresholdDither in the various QPixmap/TQImage convert methods, but this
* lets you specify a threshold value.
*
- * @param img The QImage to process.
+ * @param img The TQImage to process.
* @param value The threshold value.
* @author Daniel M. Duley (mosfet)
*/
- static void threshold(QImage &img, unsigned int value=128);
+ static void threshold(TQImage &img, unsigned int value=128);
/**
* Produces a 'solarization' effect seen when exposing a photographic
* film to light during the development process.
*
- * @param img The QImage to process.
+ * @param img The TQImage to process.
* @param factor The extent of the solarization (0-99.9)
* @author Daniel M. Duley (mosfet)
*/
- static void solarize(QImage &img, double factor=50.0);
+ static void solarize(TQImage &img, double factor=50.0);
/**
* Embosses the source image. This involves highlighting the edges
* and applying various other enhancements in order to get a metal
* effect.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @param sigma The standard deviation of the gaussian. Use 1 if you're not
@@ -550,27 +550,27 @@ public:
* @return The embossed image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage emboss(QImage &src, double radius, double sigma);
+ static TQImage emboss(TQImage &src, double radius, double sigma);
/**
* Convenience method.
*/
- static QImage emboss(QImage &src);
+ static TQImage emboss(TQImage &src);
/**
* Minimizes speckle noise in the source image using the 8 hull
* algorithm.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @return The despeckled image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage despeckle(QImage &src);
+ static TQImage despeckle(TQImage &src);
/**
* Produces a neat little "charcoal" effect.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @param sigma The standard deviation of the gaussian. Use 1 if you're not
@@ -578,51 +578,51 @@ public:
* @return The charcoal image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage charcoal(QImage &src, double radius, double sigma);
+ static TQImage charcoal(TQImage &src, double radius, double sigma);
/**
* This is provided for binary compatability only! Use the above method
* with a radius and sigma instead!
*/
- static QImage charcoal(QImage &src, double factor=50.0);
+ static TQImage charcoal(TQImage &src, double factor=50.0);
/**
* Rotates the image by the specified amount
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param r The rotate direction.
* @return The rotated image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage rotate(QImage &src, RotateDirection r);
+ static TQImage rotate(TQImage &src, RotateDirection r);
/**
* Scales an image using simple pixel sampling. This does not produce
- * nearly as nice a result as QImage::smoothScale(), but has the
+ * nearly as nice a result as TQImage::smoothScale(), but has the
* advantage of being much faster - only a few milliseconds.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param w The new width.
* @param h The new height.
* @return The scaled image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage sample(QImage &src, int w, int h);
+ static TQImage sample(TQImage &src, int w, int h);
/**
* Adds noise to an image.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param type The algorithm used to generate the noise.
* @return The image with noise added. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage addNoise(QImage &src, NoiseType type = GaussianNoise);
+ static TQImage addNoise(TQImage &src, NoiseType type = GaussianNoise);
/**
* Blurs an image by convolving pixel neighborhoods.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @param sigma The standard deviation of the gaussian. Use 1 if you're not
@@ -630,60 +630,60 @@ public:
* @return The blurred image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage blur(QImage &src, double radius, double sigma);
+ static TQImage blur(TQImage &src, double radius, double sigma);
/**
* This is provided for binary compatability only! Use the above method
* with a radius and sigma instead!
*/
- static QImage blur(QImage &src, double factor=50.0);
+ static TQImage blur(TQImage &src, double factor=50.0);
/**
* Detects edges in an image using pixel neighborhoods and an edge
* detection mask.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @return The image with edges detected. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage edge(QImage &src, double radius);
+ static TQImage edge(TQImage &src, double radius);
/**
* Implodes an image by a specified percent.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param factor The extent of the implosion.
* @param background An RGBA value to use for the background. After the
* effect some pixels may be "empty". This value is used for those pixels.
* @return The imploded image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage implode(QImage &src, double factor=30.0,
+ static TQImage implode(TQImage &src, double factor=30.0,
unsigned int background = 0xFFFFFFFF);
/**
* Produces an oil painting effect.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @return The new image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage oilPaintConvolve(QImage &src, double radius);
+ static TQImage oilPaintConvolve(TQImage &src, double radius);
/**
* This is provided for binary compatability only! Use the above method
* instead!
*/
- static QImage oilPaint(QImage &src, int radius=3);
+ static TQImage oilPaint(TQImage &src, int radius=3);
/**
* Sharpens the pixels in the image using pixel neighborhoods.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
* center pixel. Use 0 and a suitable radius will be automatically used.
* @param sigma The standard deviation of the gaussian. Use 1 if you're not
@@ -691,53 +691,53 @@ public:
* @return The sharpened image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage sharpen(QImage &src, double radius, double sigma);
+ static TQImage sharpen(TQImage &src, double radius, double sigma);
/**
* This is provided for binary compatability only! Use the above method
* instead!
*/
- static QImage sharpen(QImage &src, double factor=30.0);
+ static TQImage sharpen(TQImage &src, double factor=30.0);
/**
* Randomly displaces pixels.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param amount The vicinity for choosing a random pixel to swap.
* @return The image with pixels displaced. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage spread(QImage &src, unsigned int amount=3);
+ static TQImage spread(TQImage &src, unsigned int amount=3);
/**
* Shades the image using a distance light source.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param color_shading If true do color shading, otherwise do grayscale.
* @param azimuth Determines the light source and direction.
* @param elevation Determines the light source and direction.
* @return The shaded image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage shade(QImage &src, bool color_shading=true, double azimuth=30.0,
+ static TQImage shade(TQImage &src, bool color_shading=true, double azimuth=30.0,
double elevation=30.0);
/**
* Swirls the image by a specified amount
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param degrees The tightness of the swirl.
* @param background An RGBA value to use for the background. After the
* effect some pixels may be "empty". This value is used for those pixels.
* @return The swirled image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage swirl(QImage &src, double degrees=50.0, unsigned int background =
+ static TQImage swirl(TQImage &src, double degrees=50.0, unsigned int background =
0xFFFFFFFF);
/**
* Modifies the pixels along a sine wave.
*
- * @param src The QImage to process.
+ * @param src The TQImage to process.
* @param amplitude The amplitude of the sine wave.
* @param frequency The frequency of the sine wave.
* @param background An RGBA value to use for the background. After the
@@ -745,7 +745,7 @@ public:
* @return The new image. The original is not changed.
* @author Daniel M. Duley (mosfet)
*/
- static QImage wave(QImage &src, double amplitude=25.0, double frequency=150.0,
+ static TQImage wave(TQImage &src, double amplitude=25.0, double frequency=150.0,
unsigned int background = 0xFFFFFFFF);
/**
@@ -768,7 +768,7 @@ public:
* @return The destination image (dst) containing the result.
* @author Zack Rusin <zack@kde.org>
*/
- static QImage bumpmap(QImage &img, QImage &map, double azimuth, double elevation,
+ static TQImage bumpmap(TQImage &img, TQImage &map, double azimuth, double elevation,
int depth, int xofs, int yofs, int waterlevel,
int ambient, bool compensate, bool invert,
BumpmapType type, bool tiled);
@@ -785,17 +785,17 @@ private:
/**
* Helper function to find the nearest color to the RBG triplet
*/
- static int nearestColor( int r, int g, int b, const QColor *pal, int size );
+ static int nearestColor( int r, int g, int b, const TQColor *pal, int size );
static void hull(const int x_offset, const int y_offset, const int polarity,
const int width, const int height,
unsigned int *f, unsigned int *g);
static unsigned int generateNoise(unsigned int pixel, NoiseType type);
- static unsigned int interpolateColor(QImage *image, double x, double y,
+ static unsigned int interpolateColor(TQImage *image, double x, double y,
unsigned int background);
/* Various convolve routines */
static int getOptimalKernelWidth(double radius, double sigma);
- static bool convolveImage(QImage *image, QImage *dest,
+ static bool convolveImage(TQImage *image, TQImage *dest,
const unsigned int order,
const double *kernel);
static void blurScanLine(double *kernel, int width,
diff --git a/kdefx/kpixmap.cpp b/kdefx/kpixmap.cpp
index 9d7b186bd..ac8cd6d4e 100644
--- a/kdefx/kpixmap.cpp
+++ b/kdefx/kpixmap.cpp
@@ -21,18 +21,18 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
#include <stdlib.h>
#include "kpixmap.h"
// Fast diffuse dither to 3x3x3 color cube
// Based on Qt's image conversion functions
-static bool kdither_32_to_8( const QImage *src, QImage *dst )
+static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
{
// register QRgb *p;
uchar *b;
@@ -77,7 +77,7 @@ static bool kdither_32_to_8( const QImage *src, QImage *dst )
for ( y=0; y < src->height(); y++ ) {
// p = (QRgb *)src->scanLine(y);
b = dst->scanLine(y);
- int endian = (QImage::systemBitOrder() == QImage::BigEndian);
+ int endian = (TQImage::systemBitOrder() == TQImage::BigEndian);
int x;
uchar* q = src->scanLine(y);
uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0);
@@ -161,10 +161,10 @@ KPixmap::~KPixmap()
{
}
-bool KPixmap::load( const QString& fileName, const char *format,
+bool KPixmap::load( const TQString& fileName, const char *format,
int conversion_flags )
{
- QImageIO io( fileName, format );
+ TQImageIO io( fileName, format );
bool result = io.read();
@@ -175,7 +175,7 @@ bool KPixmap::load( const QString& fileName, const char *format,
return result;
}
-bool KPixmap::load( const QString& fileName, const char *format,
+bool KPixmap::load( const TQString& fileName, const char *format,
ColorMode mode )
{
int conversion_flags = 0;
@@ -198,7 +198,7 @@ bool KPixmap::load( const QString& fileName, const char *format,
return load( fileName, format, conversion_flags );
}
-bool KPixmap::convertFromImage( const QImage &img, ColorMode mode )
+bool KPixmap::convertFromImage( const TQImage &img, ColorMode mode )
{
int conversion_flags = 0;
switch (mode) {
@@ -220,7 +220,7 @@ bool KPixmap::convertFromImage( const QImage &img, ColorMode mode )
return convertFromImage( img, conversion_flags );
}
-bool KPixmap::convertFromImage( const QImage &img, int conversion_flags )
+bool KPixmap::convertFromImage( const TQImage &img, int conversion_flags )
{
if ( img.isNull() ) {
#if defined(CHECK_NULL)
@@ -235,7 +235,7 @@ bool KPixmap::convertFromImage( const QImage &img, int conversion_flags )
// If color mode not one of KPixmaps extra modes nothing to do
if ( ( conversion_flags & KColorMode_Mask ) != LowOnly &&
( conversion_flags & KColorMode_Mask ) != WebOnly ) {
- return QPixmap::convertFromImage ( img, conversion_flags );
+ return TQPixmap::convertFromImage ( img, conversion_flags );
}
// If the default pixmap depth is not 8bpp, KPixmap color modes have no
@@ -244,7 +244,7 @@ bool KPixmap::convertFromImage( const QImage &img, int conversion_flags )
if ( ( conversion_flags & KColorMode_Mask ) == LowOnly ||
( conversion_flags & KColorMode_Mask ) == WebOnly )
conversion_flags = (conversion_flags & ~KColorMode_Mask) | Auto;
- return QPixmap::convertFromImage ( img, conversion_flags );
+ return TQPixmap::convertFromImage ( img, conversion_flags );
}
if ( ( conversion_flags & KColorMode_Mask ) == LowOnly ) {
@@ -256,14 +256,14 @@ bool KPixmap::convertFromImage( const QImage &img, int conversion_flags )
// If image uses icon palette don't dither it.
if( img.numColors() > 0 && img.numColors() <=40 ) {
if ( checkColorTable( img ) )
- return QPixmap::convertFromImage( img, QPixmap::Auto );
+ return TQPixmap::convertFromImage( img, TQPixmap::Auto );
}
- QBitmap mask;
+ TQBitmap mask;
bool isMask = false;
- QImage image = img.convertDepth(32);
- QImage tImage( image.width(), image.height(), 8, 256 );
+ TQImage image = img.convertDepth(32);
+ TQImage tImage( image.width(), image.height(), 8, 256 );
if( img.hasAlphaBuffer() ) {
image.setAlphaBuffer( true );
@@ -273,22 +273,22 @@ bool KPixmap::convertFromImage( const QImage &img, int conversion_flags )
kdither_32_to_8( &image, &tImage );
- if( QPixmap::convertFromImage( tImage ) ) {
- if ( isMask ) QPixmap::setMask( mask );
+ if( TQPixmap::convertFromImage( tImage ) ) {
+ if ( isMask ) TQPixmap::setMask( mask );
return true;
} else
return false;
} else {
- QImage image = img.convertDepth( 32 );
+ TQImage image = img.convertDepth( 32 );
image.setAlphaBuffer( img.hasAlphaBuffer() );
conversion_flags = (conversion_flags & ~ColorMode_Mask) | Auto;
- return QPixmap::convertFromImage ( image, conversion_flags );
+ return TQPixmap::convertFromImage ( image, conversion_flags );
}
}
-static QColor* kpixmap_iconPalette = 0;
+static TQColor* kpixmap_iconPalette = 0;
-bool KPixmap::checkColorTable( const QImage &image )
+bool KPixmap::checkColorTable( const TQImage &image )
{
int i = 0;
@@ -315,45 +315,45 @@ bool KPixmap::checkColorTable( const QImage &image )
kpixmap_iconPalette[i++] = black;
// Pastels
- kpixmap_iconPalette[i++] = QColor( 255, 192, 192 );
- kpixmap_iconPalette[i++] = QColor( 192, 255, 192 );
- kpixmap_iconPalette[i++] = QColor( 192, 192, 255 );
- kpixmap_iconPalette[i++] = QColor( 255, 255, 192 );
- kpixmap_iconPalette[i++] = QColor( 255, 192, 255 );
- kpixmap_iconPalette[i++] = QColor( 192, 255, 255 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 192, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 255, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 192, 255 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 255, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 192, 255 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 255, 255 );
// Reds
- kpixmap_iconPalette[i++] = QColor( 64, 0, 0 );
- kpixmap_iconPalette[i++] = QColor( 192, 0, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 64, 0, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 0, 0 );
// Oranges
- kpixmap_iconPalette[i++] = QColor( 255, 128, 0 );
- kpixmap_iconPalette[i++] = QColor( 192, 88, 0 );
- kpixmap_iconPalette[i++] = QColor( 255, 168, 88 );
- kpixmap_iconPalette[i++] = QColor( 255, 220, 168 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 128, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 88, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 168, 88 );
+ kpixmap_iconPalette[i++] = TQColor( 255, 220, 168 );
// Blues
- kpixmap_iconPalette[i++] = QColor( 0, 0, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 0, 0, 192 );
// Turquoise
- kpixmap_iconPalette[i++] = QColor( 0, 64, 64 );
- kpixmap_iconPalette[i++] = QColor( 0, 192, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 0, 64, 64 );
+ kpixmap_iconPalette[i++] = TQColor( 0, 192, 192 );
// Yellows
- kpixmap_iconPalette[i++] = QColor( 64, 64, 0 );
- kpixmap_iconPalette[i++] = QColor( 192, 192, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 64, 64, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 192, 0 );
// Greens
- kpixmap_iconPalette[i++] = QColor( 0, 64, 0 );
- kpixmap_iconPalette[i++] = QColor( 0, 192, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 0, 64, 0 );
+ kpixmap_iconPalette[i++] = TQColor( 0, 192, 0 );
// Purples
- kpixmap_iconPalette[i++] = QColor( 192, 0, 192 );
+ kpixmap_iconPalette[i++] = TQColor( 192, 0, 192 );
// Greys
- kpixmap_iconPalette[i++] = QColor( 88, 88, 88 );
- kpixmap_iconPalette[i++] = QColor( 48, 48, 48 );
- kpixmap_iconPalette[i++] = QColor( 220, 220, 220 );
+ kpixmap_iconPalette[i++] = TQColor( 88, 88, 88 );
+ kpixmap_iconPalette[i++] = TQColor( 48, 48, 48 );
+ kpixmap_iconPalette[i++] = TQColor( 220, 220, 220 );
}
@@ -383,7 +383,7 @@ bool KPixmap::checkColorTable( const QImage &image )
}
-KPixmap::KPixmap(const QPixmap& p)
- : QPixmap(p)
+KPixmap::KPixmap(const TQPixmap& p)
+ : TQPixmap(p)
{
}
diff --git a/kdefx/kpixmap.h b/kdefx/kpixmap.h
index 9a1af03bb..8b76e87af 100644
--- a/kdefx/kpixmap.h
+++ b/kdefx/kpixmap.h
@@ -24,7 +24,7 @@
#ifndef __KPIXMAP_H__
#define __KPIXMAP_H__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdelibs_export.h>
@@ -79,7 +79,7 @@ public:
/**
* Constructs a null pixmap.
*/
- KPixmap() : QPixmap() {};
+ KPixmap() : TQPixmap() {};
/**
* Destructs the pixmap.
@@ -88,9 +88,9 @@ public:
~KPixmap();
/**
- * Copies the QPixmap @p pix.
+ * Copies the TQPixmap @p pix.
*/
- KPixmap(const QPixmap& pix);
+ KPixmap(const TQPixmap& pix);
/**
* Converts an image and sets this pixmap.
@@ -148,7 +148,7 @@ public:
* @param conversion_flags bitmask, described above
* @return @p true if successful.
**/
- bool convertFromImage( const QImage &img, int conversion_flags );
+ bool convertFromImage( const TQImage &img, int conversion_flags );
/**
* This is an overloaded member function, provided for
@@ -158,7 +158,7 @@ public:
* @param mode a ColorMode to apply
* @return @p true if successful.
**/
- bool convertFromImage( const QImage &img, ColorMode mode = WebColor );
+ bool convertFromImage( const TQImage &img, ColorMode mode = WebColor );
/**
* Loads a pixmap from the file @p fileName.
@@ -168,7 +168,7 @@ public:
* specified (default), the loader reads a few bytes from the
* header to guess the file format.
*
- * The QImageIO documentation lists the supported image
+ * The TQImageIO documentation lists the supported image
* formats and explains how to add extra formats.
*
* @param fileName the name of the file to load the image from
@@ -178,7 +178,7 @@ public:
* @return @p true if successful, or false if the pixmap
* could not be loaded.
**/
- bool load( const QString& fileName, const char *format,
+ bool load( const TQString& fileName, const char *format,
int conversion_flags );
/**
@@ -191,7 +191,7 @@ public:
* @return @p true if successful, or false if the pixmap
* could not be loaded.
**/
- bool load( const QString& fileName,
+ bool load( const TQString& fileName,
const char *format = 0,
ColorMode mode = WebColor );
@@ -204,7 +204,7 @@ public:
* transparent background.
* @param image the image to test
**/
- bool checkColorTable(const QImage &image);
+ bool checkColorTable(const TQImage &image);
private:
KPixmapPrivate *d;
diff --git a/kdefx/kpixmapeffect.cpp b/kdefx/kpixmapeffect.cpp
index 5184c323e..91f85eac2 100644
--- a/kdefx/kpixmapeffect.cpp
+++ b/kdefx/kpixmapeffect.cpp
@@ -7,8 +7,8 @@
// $Id$
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include "kpixmapeffect.h"
#include "kpixmap.h"
@@ -21,8 +21,8 @@
//======================================================================
-KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
- const QColor &cb, GradientType eff, int ncols)
+KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const TQColor &ca,
+ const TQColor &cb, GradientType eff, int ncols)
{
if(pixmap.depth() > 8 &&
(eff == VerticalGradient || eff == HorizontalGradient)) {
@@ -44,7 +44,7 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
int gcdelta = ((1<<16) / (eff == VerticalGradient ? pixmap.height() : pixmap.width())) * gDiff;
int bcdelta = ((1<<16) / (eff == VerticalGradient ? pixmap.height() : pixmap.width())) * bDiff;
- QPainter p(&pixmap);
+ TQPainter p(&pixmap);
// these for-loops could be merged, but the if's in the inner loop
// would make it slow
@@ -55,7 +55,7 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
gl += gcdelta;
bl += bcdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(0, y, pixmap.width()-1, y);
}
break;
@@ -65,7 +65,7 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
gl += gcdelta;
bl += bcdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(x, 0, x, pixmap.height()-1);
}
break;
@@ -74,7 +74,7 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
}
}
else {
- QImage image = KImageEffect::gradient(pixmap.size(), ca, cb,
+ TQImage image = KImageEffect::gradient(pixmap.size(), ca, cb,
(KImageEffect::GradientType) eff, ncols);
pixmap.convertFromImage(image);
}
@@ -85,11 +85,11 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const QColor &ca,
// -----------------------------------------------------------------------------
-KPixmap& KPixmapEffect::unbalancedGradient(KPixmap &pixmap, const QColor &ca,
- const QColor &cb, GradientType eff, int xfactor, int yfactor,
+KPixmap& KPixmapEffect::unbalancedGradient(KPixmap &pixmap, const TQColor &ca,
+ const TQColor &cb, GradientType eff, int xfactor, int yfactor,
int ncols)
{
- QImage image = KImageEffect::unbalancedGradient(pixmap.size(), ca, cb,
+ TQImage image = KImageEffect::unbalancedGradient(pixmap.size(), ca, cb,
(KImageEffect::GradientType) eff,
xfactor, yfactor, ncols);
pixmap.convertFromImage(image);
@@ -108,7 +108,7 @@ KPixmap& KPixmapEffect::unbalancedGradient(KPixmap &pixmap, const QColor &ca,
KPixmap& KPixmapEffect::intensity(KPixmap &pixmap, float percent)
{
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
KImageEffect::intensity(image, percent);
pixmap.convertFromImage(image);
@@ -121,7 +121,7 @@ KPixmap& KPixmapEffect::intensity(KPixmap &pixmap, float percent)
KPixmap& KPixmapEffect::channelIntensity(KPixmap &pixmap, float percent,
RGBComponent channel)
{
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
KImageEffect::channelIntensity(image, percent,
(KImageEffect::RGBComponent) channel);
pixmap.convertFromImage(image);
@@ -138,11 +138,11 @@ KPixmap& KPixmapEffect::channelIntensity(KPixmap &pixmap, float percent,
KPixmap& KPixmapEffect::blend(KPixmap &pixmap, float initial_intensity,
- const QColor &bgnd, GradientType eff,
+ const TQColor &bgnd, GradientType eff,
bool anti_dir, int ncols)
{
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
if (image.depth() <=8)
image = image.convertDepth(32); //Sloww..
@@ -154,7 +154,7 @@ KPixmap& KPixmapEffect::blend(KPixmap &pixmap, float initial_intensity,
if(pixmap.depth() <= 8 ) {
if ( ncols < 2 || ncols > 256 )
ncols = 3;
- QColor *dPal = new QColor[ncols];
+ TQColor *dPal = new QColor[ncols];
for (int i=0; i<ncols; i++) {
tmp = 0 + 255 * i / ( ncols - 1 );
dPal[i].setRgb ( tmp, tmp, tmp );
@@ -179,7 +179,7 @@ KPixmap& KPixmapEffect::blend(KPixmap &pixmap, float initial_intensity,
KPixmap& KPixmapEffect::hash(KPixmap &pixmap, Lighting lite,
unsigned int spacing, int ncols)
{
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
KImageEffect::hash(image, (KImageEffect::Lighting) lite, spacing);
unsigned int tmp;
@@ -187,7 +187,7 @@ KPixmap& KPixmapEffect::hash(KPixmap &pixmap, Lighting lite,
if(pixmap.depth() <= 8 ) {
if ( ncols < 2 || ncols > 256 )
ncols = 3;
- QColor *dPal = new QColor[ncols];
+ TQColor *dPal = new QColor[ncols];
for (int i=0; i<ncols; i++) {
tmp = 0 + 255 * i / ( ncols - 1 );
dPal[i].setRgb ( tmp, tmp, tmp );
@@ -210,23 +210,23 @@ KPixmap& KPixmapEffect::hash(KPixmap &pixmap, Lighting lite,
//======================================================================
#if 0
-void KPixmapEffect::pattern(KPixmap &pixmap, const QColor &ca,
- const QColor &cb, unsigned pat[8])
+void KPixmapEffect::pattern(KPixmap &pixmap, const TQColor &ca,
+ const TQColor &cb, unsigned pat[8])
{
- QImage img = pattern(pixmap.size(), ca, cb, pat);
+ TQImage img = pattern(pixmap.size(), ca, cb, pat);
pixmap.convertFromImage(img);
}
#endif
// -----------------------------------------------------------------------------
-KPixmap KPixmapEffect::pattern(const KPixmap& pmtile, QSize size,
- const QColor &ca, const QColor &cb, int ncols)
+KPixmap KPixmapEffect::pattern(const KPixmap& pmtile, TQSize size,
+ const TQColor &ca, const TQColor &cb, int ncols)
{
if (pmtile.depth() > 8)
ncols = 0;
- QImage img = pmtile.convertToImage();
+ TQImage img = pmtile.convertToImage();
KImageEffect::flatten(img, ca, cb, ncols);
KPixmap pixmap;
pixmap.convertFromImage(img);
@@ -237,11 +237,11 @@ KPixmap KPixmapEffect::pattern(const KPixmap& pmtile, QSize size,
// -----------------------------------------------------------------------------
-KPixmap KPixmapEffect::createTiled(const KPixmap& pixmap, QSize size)
+KPixmap KPixmapEffect::createTiled(const KPixmap& pixmap, TQSize size)
{
KPixmap pix(size);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.drawTiledPixmap(0, 0, size.width(), size.height(), pixmap);
return pix;
@@ -254,9 +254,9 @@ KPixmap KPixmapEffect::createTiled(const KPixmap& pixmap, QSize size)
//
//======================================================================
-KPixmap& KPixmapEffect::fade(KPixmap &pixmap, double val, const QColor &color)
+KPixmap& KPixmapEffect::fade(KPixmap &pixmap, double val, const TQColor &color)
{
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KImageEffect::fade(img, val, color);
pixmap.convertFromImage(img);
@@ -267,7 +267,7 @@ KPixmap& KPixmapEffect::fade(KPixmap &pixmap, double val, const QColor &color)
// -----------------------------------------------------------------------------
KPixmap& KPixmapEffect::toGray(KPixmap &pixmap, bool fast)
{
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KImageEffect::toGray(img, fast);
pixmap.convertFromImage(img);
@@ -277,7 +277,7 @@ KPixmap& KPixmapEffect::toGray(KPixmap &pixmap, bool fast)
// -----------------------------------------------------------------------------
KPixmap& KPixmapEffect::desaturate(KPixmap &pixmap, float desat)
{
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KImageEffect::desaturate(img, desat);
pixmap.convertFromImage(img);
@@ -286,7 +286,7 @@ KPixmap& KPixmapEffect::desaturate(KPixmap &pixmap, float desat)
// -----------------------------------------------------------------------------
KPixmap& KPixmapEffect::contrast(KPixmap &pixmap, int c)
{
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KImageEffect::contrast(img, c);
pixmap.convertFromImage(img);
@@ -300,9 +300,9 @@ KPixmap& KPixmapEffect::contrast(KPixmap &pixmap, int c)
//======================================================================
// -----------------------------------------------------------------------------
-KPixmap& KPixmapEffect::dither(KPixmap &pixmap, const QColor *palette, int size)
+KPixmap& KPixmapEffect::dither(KPixmap &pixmap, const TQColor *palette, int size)
{
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KImageEffect::dither(img, palette, size);
pixmap.convertFromImage(img);
@@ -315,9 +315,9 @@ KPixmap& KPixmapEffect::dither(KPixmap &pixmap, const QColor *palette, int size)
//
//======================================================================
-KPixmap KPixmapEffect::selectedPixmap( const KPixmap &pix, const QColor &col )
+KPixmap KPixmapEffect::selectedPixmap( const KPixmap &pix, const TQColor &col )
{
- QImage img = pix.convertToImage();
+ TQImage img = pix.convertToImage();
KImageEffect::selectedImage(img, col);
KPixmap outPix;
outPix.convertFromImage(img);
diff --git a/kdefx/kpixmapeffect.h b/kdefx/kpixmapeffect.h
index a4776f0e6..d3199c083 100644
--- a/kdefx/kpixmapeffect.h
+++ b/kdefx/kpixmapeffect.h
@@ -12,7 +12,7 @@
#include <kdelibs_export.h>
-#include <qsize.h>
+#include <tqsize.h>
class KPixmap;
class QColor;
@@ -48,7 +48,7 @@ public:
* colors. Pass 0 to prevent dithering.
* @return Returns the generated pixmap, for convenience.
*/
- static KPixmap& gradient(KPixmap& pixmap, const QColor &ca, const QColor &cb,
+ static KPixmap& gradient(KPixmap& pixmap, const TQColor &ca, const TQColor &cb,
GradientType type, int ncols=3);
/**
@@ -66,8 +66,8 @@ public:
* @param ncols The number of colors. See #gradient.
* @return The generated pixmap, for convencience.
*/
- static KPixmap& unbalancedGradient(KPixmap& pixmap, const QColor &ca,
- const QColor &cb, GradientType type, int xfactor = 100,
+ static KPixmap& unbalancedGradient(KPixmap& pixmap, const TQColor &ca,
+ const TQColor &cb, GradientType type, int xfactor = 100,
int yfactor = 100, int ncols=3);
/**
@@ -81,7 +81,7 @@ public:
* @param size The size the new pixmap should have.
* @return The generated, tiled pixmap.
*/
- static KPixmap createTiled(const KPixmap& pixmap, QSize size);
+ static KPixmap createTiled(const KPixmap& pixmap, TQSize size);
/**
* Either brightens or dims a pixmap by a specified ratio.
@@ -121,7 +121,7 @@ public:
* @return Returns the pixmap(), provided for convenience.
*/
static KPixmap& blend(KPixmap& pixmap, float initial_intensity,
- const QColor &bgnd, GradientType eff,
+ const TQColor &bgnd, GradientType eff,
bool anti_dir=false, int ncols=3);
/**
@@ -153,8 +153,8 @@ public:
* dithered to this depth. Pass zero to prevent dithering.
* @return The resulting pixmap.
*/
- static KPixmap pattern(const KPixmap& pixmap, QSize size,
- const QColor &ca, const QColor &cb, int ncols=8);
+ static KPixmap pattern(const KPixmap& pixmap, TQSize size,
+ const TQColor &ca, const TQColor &cb, int ncols=8);
/**
* Fades a pixmap to a certain color.
@@ -164,7 +164,7 @@ public:
* @param color The color to blend to.
* @return Returns the pixmap(), provided for convenience.
*/
- static KPixmap& fade(KPixmap& pixmap, double val, const QColor &color);
+ static KPixmap& fade(KPixmap& pixmap, double val, const TQColor &color);
/**
* Converts a pixmap to grayscale.
@@ -203,15 +203,15 @@ public:
* @param size The size of the palette.
* @return Returns the pixmap(), provided for convenience.
*/
- static KPixmap& dither(KPixmap &pixmap, const QColor *palette, int size);
+ static KPixmap& dither(KPixmap &pixmap, const TQColor *palette, int size);
/**
* Calculate a 'selected' pixmap, for instance a selected icon
* on the desktop.
* @param pixmap the pixmap to select
- * @param col the selected color, usually from QColorGroup::highlight().
+ * @param col the selected color, usually from TQColorGroup::highlight().
*/
- static KPixmap selectedPixmap( const KPixmap &pixmap, const QColor &col );
+ static KPixmap selectedPixmap( const KPixmap &pixmap, const TQColor &col );
};
diff --git a/kdefx/kpixmapsplitter.cpp b/kdefx/kpixmapsplitter.cpp
index 83fc3de5b..44b8f01fa 100644
--- a/kdefx/kpixmapsplitter.cpp
+++ b/kdefx/kpixmapsplitter.cpp
@@ -33,13 +33,13 @@ KPixmapSplitter::~KPixmapSplitter()
{
}
-void KPixmapSplitter::setPixmap( const QPixmap& pixmap )
+void KPixmapSplitter::setPixmap( const TQPixmap& pixmap )
{
m_pixmap = pixmap;
m_dirty = true;
}
-void KPixmapSplitter::setItemSize( const QSize& size )
+void KPixmapSplitter::setItemSize( const TQSize& size )
{
if ( size != m_itemSize ) {
m_itemSize = size;
@@ -64,10 +64,10 @@ void KPixmapSplitter::setHSpacing( int spacing )
}
-QRect KPixmapSplitter::coordinates( int pos )
+TQRect KPixmapSplitter::coordinates( int pos )
{
if ( pos < 0 || m_pixmap.isNull() )
- return QRect();
+ return TQRect();
if ( m_dirty ) {
m_numCols = m_pixmap.width() / ( m_itemSize.width() + m_hSpacing );
@@ -77,18 +77,18 @@ QRect KPixmapSplitter::coordinates( int pos )
}
if ( m_numCols == 0 || m_numRows == 0 )
- return QRect();
+ return TQRect();
int row = pos / m_numCols;
int col = pos - (row * m_numCols);
- return QRect( col * (m_itemSize.width() + m_hSpacing),
+ return TQRect( col * (m_itemSize.width() + m_hSpacing),
row * (m_itemSize.height() + m_vSpacing),
m_itemSize.width(),
m_itemSize.height() );
}
-QRect KPixmapSplitter::coordinates( const QChar& ch )
+TQRect KPixmapSplitter::coordinates( const TQChar& ch )
{
return coordinates( (unsigned char) ch.latin1() );
}
diff --git a/kdefx/kpixmapsplitter.h b/kdefx/kpixmapsplitter.h
index 6c525c172..84b5a8647 100644
--- a/kdefx/kpixmapsplitter.h
+++ b/kdefx/kpixmapsplitter.h
@@ -20,10 +20,10 @@
#ifndef KPIXMAPSPLITTER_H
#define KPIXMAPSPLITTER_H
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -39,13 +39,13 @@ class KPixmapSplitterPrivate;
* \code
* KPixmapSplitter splitter;
* splitter.setPixmap( somePixmap );
- * splitter.setItemSize( QSize( 20, 10 ));
+ * splitter.setItemSize( TQSize( 20, 10 ));
*
- * QPixmap item( 20, 10 );
+ * TQPixmap item( 20, 10 );
* item.fill( Qt::white );
- * QRect rect = splitter.coordinates( 4 );
+ * TQRect rect = splitter.coordinates( 4 );
* if ( !rect.isEmpty() )
- * bitBlt( &item, QPoint(0,0), &somePixmap, rect, CopyROP );
+ * bitBlt( &item, TQPoint(0,0), &somePixmap, rect, CopyROP );
* \endcode
*
* @author Carsten Pfeiffer <pfeiffer@kde.org>
@@ -62,25 +62,25 @@ public:
/**
* Sets the pixmap to be split.
*/
- void setPixmap( const QPixmap& pixmap );
+ void setPixmap( const TQPixmap& pixmap );
/**
* @returns the pixmap that has been set via setPixmap().
*/
- const QPixmap& pixmap() const { return m_pixmap; }
+ const TQPixmap& pixmap() const { return m_pixmap; }
/**
* Sets the size of the items you want to get out of the given pixmap.
- * The QRect of #coordinates(int) will have the width and height of exactly
+ * The TQRect of #coordinates(int) will have the width and height of exactly
* this @p size.
*/
- void setItemSize( const QSize& size );
+ void setItemSize( const TQSize& size );
/**
* @returns the set size of the items (coordinates) you want to get
* out of the given pixmap.
*/
- QSize itemSize() const { return m_itemSize; }
+ TQSize itemSize() const { return m_itemSize; }
/**
* If there is space between rows in the given pixmap, you have to specify
@@ -98,17 +98,17 @@ public:
* @returns the coordinates of the item at position pos in the given
* pixmap.
*/
- QRect coordinates( int pos );
+ TQRect coordinates( int pos );
/**
* Overloaded for convenience. Returns the item at the position of the
* given character (when using a latin1 font-pixmap)
*/
- QRect coordinates( const QChar& ch );
+ TQRect coordinates( const TQChar& ch );
private:
- QPixmap m_pixmap;
- QSize m_itemSize;
+ TQPixmap m_pixmap;
+ TQSize m_itemSize;
int m_vSpacing;
int m_hSpacing;
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index 08fe94995..526d0e467 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -3,7 +3,7 @@
* KStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
*
- * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
+ * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
* Copyright (C) 1998-2000 TrollTech AS.
*
* Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
@@ -29,23 +29,23 @@
#include "kstyle.h"
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qcleanuphandler.h>
-#include <qmap.h>
-#include <qimage.h>
-#include <qlistview.h>
-#include <qmenubar.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qprogressbar.h>
-#include <qscrollbar.h>
-#include <qsettings.h>
-#include <qslider.h>
-#include <qstylefactory.h>
-#include <qtabbar.h>
-#include <qtoolbar.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqcleanuphandler.h>
+#include <tqmap.h>
+#include <tqimage.h>
+#include <tqlistview.h>
+#include <tqmenubar.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqprogressbar.h>
+#include <tqscrollbar.h>
+#include <tqsettings.h>
+#include <tqslider.h>
+#include <tqstylefactory.h>
+#include <tqtabbar.h>
+#include <tqtoolbar.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
@@ -76,12 +76,12 @@ namespace
// Drop Shadow
struct ShadowElements {
- QWidget* w1;
- QWidget* w2;
+ TQWidget* w1;
+ TQWidget* w2;
};
- typedef QMap<const QPopupMenu*,ShadowElements> ShadowMap;
+ typedef TQMap<const TQPopupMenu*,ShadowElements> ShadowMap;
static ShadowMap *_shadowMap = 0;
- QSingleCleanupHandler<ShadowMap> cleanupShadowMap;
+ TQSingleCleanupHandler<ShadowMap> cleanupShadowMap;
ShadowMap &shadowMap() {
if ( !_shadowMap ) {
_shadowMap = new ShadowMap;
@@ -124,22 +124,22 @@ class TransparencyHandler : public QObject
TransparencyHandler(KStyle* style, TransparencyEngine tEngine,
float menuOpacity, bool useDropShadow);
~TransparencyHandler();
- bool eventFilter(QObject* object, QEvent* event);
+ bool eventFilter(TQObject* object, TQEvent* event);
protected:
- void blendToColor(const QColor &col);
- void blendToPixmap(const QColorGroup &cg, const QPopupMenu* p);
+ void blendToColor(const TQColor &col);
+ void blendToPixmap(const TQColorGroup &cg, const TQPopupMenu* p);
#ifdef HAVE_XRENDER
- void XRenderBlendToPixmap(const QPopupMenu* p);
+ void XRenderBlendToPixmap(const TQPopupMenu* p);
#endif
- void createShadowWindows(const QPopupMenu* p);
- void removeShadowWindows(const QPopupMenu* p);
- void rightShadow(QImage& dst);
- void bottomShadow(QImage& dst);
+ void createShadowWindows(const TQPopupMenu* p);
+ void removeShadowWindows(const TQPopupMenu* p);
+ void rightShadow(TQImage& dst);
+ void bottomShadow(TQImage& dst);
private:
bool dropShadow;
float opacity;
- QPixmap pix;
+ TQPixmap pix;
KStyle* kstyle;
TransparencyEngine te;
};
@@ -164,24 +164,24 @@ struct KStylePrivate
KStyle::KStyleFlags flags;
//For KPE_ListViewBranch
- QBitmap *verticalLine;
- QBitmap *horizontalLine;
+ TQBitmap *verticalLine;
+ TQBitmap *horizontalLine;
};
// -----------------------------------------------------------------------------
KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
- : QCommonStyle(), d(new KStylePrivate)
+ : TQCommonStyle(), d(new KStylePrivate)
{
d->flags = flags;
bool useMenuTransparency = (flags & AllowMenuTransparency);
d->useFilledFrameWorkaround = (flags & FilledFrameWorkaround);
d->scrollbarType = sbtype;
- d->highcolor = QPixmap::defaultDepth() > 8;
+ d->highcolor = TQPixmap::defaultDepth() > 8;
// Read style settings
- QSettings settings;
+ TQSettings settings;
d->popupMenuDelay = settings.readNumEntry ("/KStyle/Settings/PopupMenuDelay", 256);
d->sloppySubMenus = settings.readBoolEntry("/KStyle/Settings/SloppySubMenus", false);
d->etchDisabledText = settings.readBoolEntry("/KStyle/Settings/EtchDisabledText", true);
@@ -192,7 +192,7 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
d->menuHandler = NULL;
if (useMenuTransparency) {
- QString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled");
+ TQString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled");
#ifdef HAVE_XRENDER
if (effectEngine == "XRender")
@@ -237,35 +237,35 @@ KStyle::~KStyle()
}
-QString KStyle::defaultStyle()
+TQString KStyle::defaultStyle()
{
- if (QPixmap::defaultDepth() > 8)
- return QString("plastik");
+ if (TQPixmap::defaultDepth() > 8)
+ return TQString("plastik");
else
- return QString("light, 3rd revision");
+ return TQString("light, 3rd revision");
}
-void KStyle::polish( QWidget* widget )
+void KStyle::polish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
- QFrame::Shape shape = frame->frameShape();
- if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) {
+ TQFrame::Shape shape = frame->frameShape();
+ if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->installEventFilter(this);
}
}
}
-void KStyle::unPolish( QWidget* widget )
+void KStyle::unPolish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
- QFrame::Shape shape = frame->frameShape();
- if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) {
+ TQFrame::Shape shape = frame->frameShape();
+ if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
}
}
@@ -273,7 +273,7 @@ void KStyle::unPolish( QWidget* widget )
// Style changes (should) always re-polish popups.
-void KStyle::polishPopupMenu( QPopupMenu* p )
+void KStyle::polishPopupMenu( TQPopupMenu* p )
{
if (!p->testWState( WState_Polished ))
p->setCheckable(true);
@@ -299,20 +299,20 @@ KStyle::KStyleFlags KStyle::styleFlags() const
return d->flags;
}
-void KStyle::renderMenuBlendPixmap( KPixmap &pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void KStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
pix.fill(cg.button()); // Just tint as the default behavior
}
void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& /* opt */ ) const
+ const TQStyleOption& /* opt */ ) const
{
switch( kpe )
{
@@ -322,7 +322,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_DockWindowHandle: {
// Draws a nice DockWindow handle including the dock title.
- QWidget* wid = const_cast<QWidget*>(widget);
+ TQWidget* wid = const_cast<TQWidget*>(widget);
bool horizontal = flags & Style_Horizontal;
int x,y,w,h,x2,y2;
@@ -336,23 +336,23 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
x2 = x + w - 1;
y2 = y + h - 1;
- QFont fnt;
- fnt = QApplication::font(wid);
+ TQFont fnt;
+ fnt = TQApplication::font(wid);
fnt.setPointSize( fnt.pointSize()-2 );
// Draw the item on an off-screen pixmap
// to preserve Xft antialiasing for
// vertically oriented handles.
- QPixmap pix;
+ TQPixmap pix;
if (horizontal)
pix.resize( h-2, w-2 );
else
pix.resize( w-2, h-2 );
- QString title = wid->parentWidget()->caption();
- QPainter p2;
+ TQString title = wid->parentWidget()->caption();
+ TQPainter p2;
p2.begin(&pix);
- p2.fillRect(pix.rect(), cg.brush(QColorGroup::Highlight));
+ p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.setFont(fnt);
p2.drawText(pix.rect(), AlignCenter, title);
@@ -367,9 +367,9 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->drawLine(x2, y+1, x2, y2);
if (horizontal) {
- QWMatrix m;
+ TQWMatrix m;
m.rotate(-90.0);
- QPixmap vpix = pix.xForm(m);
+ TQPixmap vpix = pix.xForm(m);
bitBlt(wid, r.x()+1, r.y()+1, &vpix);
} else
bitBlt(wid, r.x()+1, r.y()+1, &pix);
@@ -410,10 +410,10 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
// make 128*1 and 1*128 bitmaps that can be used for
// drawing the right sort of lines.
- d->verticalLine = new QBitmap( 1, 129, true );
- d->horizontalLine = new QBitmap( 128, 1, true );
- QPointArray a( 64 );
- QPainter p2;
+ d->verticalLine = new TQBitmap( 1, 129, true );
+ d->horizontalLine = new TQBitmap( 128, 1, true );
+ TQPointArray a( 64 );
+ TQPainter p2;
p2.begin( d->verticalLine );
int i;
@@ -422,7 +422,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
d->verticalLine->setMask( *d->verticalLine );
p2.begin( d->horizontalLine );
@@ -431,7 +431,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
d->horizontalLine->setMask( *d->horizontalLine );
}
@@ -492,7 +492,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
}
-int KStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget* /* widget */) const
+int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const
{
int value;
switch(kpm)
@@ -520,29 +520,29 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget* /* widget */) co
// -----------------------------------------------------------------------------
void KStyle::drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
// TOOLBAR/DOCK WINDOW HANDLE
// ------------------------------------------------------------------------
if (pe == PE_DockWindowHandle)
{
// Wild workarounds are here. Beware.
- QWidget *widget, *parent;
+ TQWidget *widget, *parent;
- if (p && p->device()->devType() == QInternal::Widget) {
- widget = static_cast<QWidget*>(p->device());
+ if (p && p->device()->devType() == TQInternal::Widget) {
+ widget = static_cast<TQWidget*>(p->device());
parent = widget->parentWidget();
} else
return; // Don't paint on non-widgets
// Check if we are a normal toolbar or a hidden dockwidget.
if ( parent &&
- (parent->inherits("QToolBar") || // Normal toolbar
- (parent->inherits("QMainWindow")) )) // Collapsed dock
+ (parent->inherits("TQToolBar") || // Normal toolbar
+ (parent->inherits("TQMainWindow")) )) // Collapsed dock
// Draw a toolbar handle
drawKStylePrimitive( KPE_ToolBarHandle, p, widget, r, cg, flags, opt );
@@ -557,9 +557,9 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
#if QT_VERSION >= 0x030300
#ifdef HAVE_XRENDER
- } else if ( d->semiTransparentRubberband && pe == QStyle::PE_RubberBand ) {
- QRect rect = r.normalize();
- QPoint point;
+ } else if ( d->semiTransparentRubberband && pe == TQStyle::PE_RubberBand ) {
+ TQRect rect = r.normalize();
+ TQPoint point;
point = p->xForm( point );
static XRenderColor clr = { 0, 0, 0, 0 };
@@ -596,7 +596,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
p->save();
p->setRasterOp( Qt::CopyROP );
- p->setPen( QPen( cg.highlight().dark( 160 ), 1 ) );
+ p->setPen( TQPen( cg.highlight().dark( 160 ), 1 ) );
p->setBrush( NoBrush );
p->drawRect(
rect.x() + point.x(),
@@ -607,32 +607,32 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
#endif
#endif
} else
- QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+ TQCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
}
void KStyle::drawControl( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch (element)
{
// TABS
// ------------------------------------------------------------------------
case CE_TabBarTab: {
- const QTabBar* tb = (const QTabBar*) widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = (const TQTabBar*) widget;
+ TQTabBar::Shape tbs = tb->shape();
bool selected = flags & Style_Selected;
int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right();
switch (tbs) {
- case QTabBar::RoundedAbove: {
+ case TQTabBar::RoundedAbove: {
if (!selected)
p->translate(0,1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -665,7 +665,7 @@ void KStyle::drawControl( ControlElement element,
break;
}
- case QTabBar::RoundedBelow: {
+ case TQTabBar::RoundedBelow: {
if (!selected)
p->translate(0,-1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -699,7 +699,7 @@ void KStyle::drawControl( ControlElement element,
break;
}
- case QTabBar::TriangularAbove: {
+ case TQTabBar::TriangularAbove: {
if (!selected)
p->translate(0,1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -720,7 +720,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen(cg.mid());
p->drawLine(right-1, y+6, right-1, bottom);
- QPointArray a(6);
+ TQPointArray a(6);
a.setPoint(0, x+2, bottom);
a.setPoint(1, x+2, y+7);
a.setPoint(2, x+7, y+2);
@@ -739,7 +739,7 @@ void KStyle::drawControl( ControlElement element,
break;
}
- default: { // QTabBar::TriangularBelow
+ default: { // TQTabBar::TriangularBelow
if (!selected)
p->translate(0,-1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -763,7 +763,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen(cg.mid());
p->drawLine(right-1, bottom-6, right-1, y);
- QPointArray a(6);
+ TQPointArray a(6);
a.setPoint(0, x+2, y);
a.setPoint(1, x+2, bottom-7);
a.setPoint(2, x+7, bottom-2);
@@ -799,17 +799,17 @@ void KStyle::drawControl( ControlElement element,
// PROGRESSBAR
// ------------------------------------------------------------------------
case CE_ProgressBarGroove: {
- QRect fr = subRect(SR_ProgressBarGroove, widget);
- drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, QStyleOption::Default);
+ TQRect fr = subRect(SR_ProgressBarGroove, widget);
+ drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::Default);
break;
}
case CE_ProgressBarContents: {
// ### Take into account totalSteps() for busy indicator
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
@@ -836,10 +836,10 @@ void KStyle::drawControl( ControlElement element,
if (reverse)
p->fillRect(cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
else
p->fillRect(cr.x() + pstep, cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
return;
}
@@ -847,7 +847,7 @@ void KStyle::drawControl( ControlElement element,
// Do fancy gradient for highcolor displays
if (d->highcolor) {
- QColor c(cg.highlight());
+ TQColor c(cg.highlight());
KPixmap pix;
pix.resize(cr.width(), cr.height());
KPixmapEffect::gradient(pix, reverse ? c.light(150) : c.dark(150),
@@ -861,25 +861,25 @@ void KStyle::drawControl( ControlElement element,
} else
if (reverse)
p->fillRect(cr.x()+(cr.width()-width), cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
else
p->fillRect(cr.x(), cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
}
break;
}
case CE_ProgressBarLabel: {
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
return;
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold(true);
p->setFont(font);
@@ -887,7 +887,7 @@ void KStyle::drawControl( ControlElement element,
if (progress > 0 || steps == 0) {
double pg = (steps == 0) ? 1.0 : progress / steps;
int width = QMIN(cr.width(), (int)(pg * cr.width()));
- QRect crect;
+ TQRect crect;
if (reverse)
crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height());
else
@@ -910,12 +910,12 @@ void KStyle::drawControl( ControlElement element,
}
default:
- QCommonStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-QRect KStyle::subRect(SubRect r, const QWidget* widget) const
+TQRect KStyle::subRect(SubRect r, const TQWidget* widget) const
{
switch(r)
{
@@ -927,17 +927,17 @@ QRect KStyle::subRect(SubRect r, const QWidget* widget) const
case SR_ProgressBarContents:
case SR_ProgressBarLabel: {
// ### take into account indicatorFollowsStyle()
- QRect rt = widget->rect();
- return QRect(rt.x()+2, rt.y()+2, rt.width()-4, rt.height()-4);
+ TQRect rt = widget->rect();
+ return TQRect(rt.x()+2, rt.y()+2, rt.width()-4, rt.height()-4);
}
default:
- return QCommonStyle::subRect(r, widget);
+ return TQCommonStyle::subRect(r, widget);
}
}
-int KStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
+int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
{
switch(m)
{
@@ -949,16 +949,16 @@ int KStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
case PM_DockWindowHandleExtent:
{
- QWidget* parent = 0;
+ TQWidget* parent = 0;
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
if (widget && (parent = widget->parentWidget() )
- && !parent->inherits("QToolBar")
- && !parent->inherits("QMainWindow")
+ && !parent->inherits("TQToolBar")
+ && !parent->inherits("TQMainWindow")
&& widget->inherits("QDockWindowHandle") )
return widget->fontMetrics().lineSpacing();
else
- return QCommonStyle::pixelMetric(m, widget);
+ return TQCommonStyle::pixelMetric(m, widget);
}
// TABS
@@ -967,20 +967,20 @@ int KStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
return 24;
case PM_TabBarTabVSpace: {
- const QTabBar * tb = (const QTabBar *) widget;
- if ( tb->shape() == QTabBar::RoundedAbove ||
- tb->shape() == QTabBar::RoundedBelow )
+ const TQTabBar * tb = (const TQTabBar *) widget;
+ if ( tb->shape() == TQTabBar::RoundedAbove ||
+ tb->shape() == TQTabBar::RoundedBelow )
return 10;
else
return 4;
}
case PM_TabBarTabOverlap: {
- const QTabBar* tb = (const QTabBar*)widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = (const TQTabBar*)widget;
+ TQTabBar::Shape tbs = tb->shape();
- if ( (tbs == QTabBar::RoundedAbove) ||
- (tbs == QTabBar::RoundedBelow) )
+ if ( (tbs == TQTabBar::RoundedAbove) ||
+ (tbs == TQTabBar::RoundedBelow) )
return 0;
else
return 2;
@@ -997,14 +997,14 @@ int KStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
// Determines how much space to leave for the actual non-tickmark
// portion of the slider.
case PM_SliderControlThickness: {
- const QSlider* slider = (const QSlider*)widget;
- QSlider::TickSetting ts = slider->tickmarks();
+ const TQSlider* slider = (const TQSlider*)widget;
+ TQSlider::TickSetting ts = slider->tickmarks();
int thickness = (slider->orientation() == Horizontal) ?
slider->height() : slider->width();
switch (ts) {
- case QSlider::NoMarks: // Use total area.
+ case TQSlider::NoMarks: // Use total area.
break;
- case QSlider::Both:
+ case TQSlider::Both:
thickness = (thickness/2) + 3; // Use approx. 1/2 of area.
break;
default: // Use approx. 2/3 of area
@@ -1045,14 +1045,14 @@ int KStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
return pixelMetric( PM_ScrollBarExtent, 0);
default:
- return QCommonStyle::pixelMetric( m, widget );
+ return TQCommonStyle::pixelMetric( m, widget );
}
}
//Helper to find the next sibling that's not hidden
-static QListViewItem* nextVisibleSibling(QListViewItem* item)
+static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
{
- QListViewItem* sibling = item;
+ TQListViewItem* sibling = item;
do
{
sibling = sibling->nextSibling();
@@ -1063,14 +1063,14 @@ static QListViewItem* nextVisibleSibling(QListViewItem* item)
}
void KStyle::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch(control)
{
@@ -1080,13 +1080,13 @@ void KStyle::drawComplexControl( ComplexControl control,
// Many thanks to Brad Hughes for contributing this code.
bool useThreeButtonScrollBar = (d->scrollbarType & ThreeButtonScrollBar);
- const QScrollBar *sb = (const QScrollBar*)widget;
+ const TQScrollBar *sb = (const TQScrollBar*)widget;
bool maxedOut = (sb->minValue() == sb->maxValue());
bool horizontal = (sb->orientation() == Qt::Horizontal);
SFlags sflags = ((horizontal ? Style_Horizontal : Style_Default) |
(maxedOut ? Style_Default : Style_Enabled));
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, opt);
addline = querySubControlMetrics(control, widget, SC_ScrollBarAddLine, opt);
subpage = querySubControlMetrics(control, widget, SC_ScrollBarSubPage, opt);
@@ -1145,7 +1145,7 @@ void KStyle::drawComplexControl( ComplexControl control,
Style_Down : Style_Default));
// Draw focus rect
if (sb->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -1157,19 +1157,19 @@ void KStyle::drawComplexControl( ComplexControl control,
// SLIDER
// -------------------------------------------------------------------
case CC_Slider: {
- const QSlider* slider = (const QSlider*)widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt);
- QRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt);
+ const TQSlider* slider = (const TQSlider*)widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt);
+ TQRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt);
// Double-buffer slider for no flicker
- QPixmap pix(widget->size());
- QPainter p2;
+ TQPixmap pix(widget->size());
+ TQPainter p2;
p2.begin(&pix);
if ( slider->parentWidget() &&
slider->parentWidget()->backgroundPixmap() &&
!slider->parentWidget()->backgroundPixmap()->isNull() ) {
- QPixmap pixmap = *(slider->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap());
p2.drawTiledPixmap(r, pixmap, slider->pos());
} else
pix.fill(cg.background());
@@ -1185,7 +1185,7 @@ void KStyle::drawComplexControl( ComplexControl control,
// Draw the tickmarks
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, &p2, widget,
+ TQCommonStyle::drawComplexControl(control, &p2, widget,
r, cg, flags, SC_SliderTickmarks, active, opt);
// Draw the slider handle
@@ -1196,7 +1196,7 @@ void KStyle::drawComplexControl( ComplexControl control,
}
p2.end();
- bitBlt((QWidget*)widget, r.x(), r.y(), &pix);
+ bitBlt((TQWidget*)widget, r.x(), r.y(), &pix);
break;
}
@@ -1205,13 +1205,13 @@ void KStyle::drawComplexControl( ComplexControl control,
case CC_ListView: {
/*
- * Many thanks to TrollTech AS for donating CC_ListView from QWindowsStyle.
+ * Many thanks to TrollTech AS for donating CC_ListView from TQWindowsStyle.
* CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
*/
// Paint the icon and text.
if ( controls & SC_ListView )
- QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1220,20 +1220,20 @@ void KStyle::drawComplexControl( ComplexControl control,
if (opt.isDefault())
break;
- QListViewItem *item = opt.listViewItem();
- QListViewItem *child = item->firstChild();
+ TQListViewItem *item = opt.listViewItem();
+ TQListViewItem *child = item->firstChild();
int y = r.y();
int c; // dotline vertice count
int dotoffset = 0;
- QPointArray dotlines;
+ TQPointArray dotlines;
if ( active == SC_All && controls == SC_ListViewExpand ) {
// We only need to draw a vertical line
c = 2;
dotlines.resize(2);
- dotlines[0] = QPoint( r.right(), r.top() );
- dotlines[1] = QPoint( r.right(), r.bottom() );
+ dotlines[0] = TQPoint( r.right(), r.top() );
+ dotlines[1] = TQPoint( r.right(), r.bottom() );
} else {
@@ -1253,15 +1253,15 @@ void KStyle::drawComplexControl( ComplexControl control,
int bx = r.width() / 2;
// paint stuff in the magical area
- QListView* v = item->listView();
+ TQListView* v = item->listView();
int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(),
- QApplication::globalStrut().height() );
+ TQApplication::globalStrut().height() );
if ( lh % 2 > 0 )
lh++;
// Draw all the expand/close boxes...
- QRect boxrect;
- QStyle::StyleFlags boxflags;
+ TQRect boxrect;
+ TQStyle::StyleFlags boxflags;
while ( child && y < r.height() )
{
linebot = y + lh/2;
@@ -1269,23 +1269,23 @@ void KStyle::drawComplexControl( ComplexControl control,
(child->height() > 0) )
{
// The primitive requires a rect.
- boxrect = QRect( bx-4, linebot-4, 9, 9 );
- boxflags = child->isOpen() ? QStyle::Style_Off : QStyle::Style_On;
+ boxrect = TQRect( bx-4, linebot-4, 9, 9 );
+ boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On;
// KStyle extension: Draw the box and expand/collapse indicator
drawKStylePrimitive( KPE_ListViewExpander, p, NULL, boxrect, cg, boxflags, opt );
// dotlinery
p->setPen( cg.mid() );
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot - 5 );
- dotlines[c++] = QPoint( bx + 5, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot - 5 );
+ dotlines[c++] = TQPoint( bx + 5, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
linetop = linebot + 5;
} else {
// just dotlinery
- dotlines[c++] = QPoint( bx+1, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx+1, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
}
y += child->totalHeight();
@@ -1297,16 +1297,16 @@ void KStyle::drawComplexControl( ComplexControl control,
if ( linetop < linebot )
{
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot );
}
}
// Draw all the branches...
static int thickness = kPixelMetric( KPM_ListViewBranchThickness );
int line; // index into dotlines
- QRect branchrect;
- QStyle::StyleFlags branchflags;
+ TQRect branchrect;
+ TQStyle::StyleFlags branchflags;
for( line = 0; line < c; line += 2 )
{
// assumptions here: lines are horizontal or vertical.
@@ -1323,8 +1323,8 @@ void KStyle::drawComplexControl( ComplexControl control,
int point = dotlines[line].x();
int other = dotlines[line].y();
- branchrect = QRect( point, other-(thickness/2), end-point, thickness );
- branchflags = QStyle::Style_Horizontal;
+ branchrect = TQRect( point, other-(thickness/2), end-point, thickness );
+ branchflags = TQStyle::Style_Horizontal;
// KStyle extension: Draw the horizontal branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
@@ -1336,11 +1336,11 @@ void KStyle::drawComplexControl( ComplexControl control,
int other = dotlines[line].x();
int pixmapoffset = ((point & 1) != dotoffset ) ? 1 : 0;
- branchrect = QRect( other-(thickness/2), point, thickness, end-point );
+ branchrect = TQRect( other-(thickness/2), point, thickness, end-point );
if (!pixmapoffset) // ### Hackish - used to hint the offset
- branchflags = QStyle::Style_NoChange;
+ branchflags = TQStyle::Style_NoChange;
else
- branchflags = QStyle::Style_Default;
+ branchflags = TQStyle::Style_Default;
// KStyle extension: Draw the vertical branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
@@ -1351,19 +1351,19 @@ void KStyle::drawComplexControl( ComplexControl control,
}
default:
- QCommonStyle::drawComplexControl( control, p, widget, r, cg,
+ TQCommonStyle::drawComplexControl( control, p, widget, r, cg,
flags, controls, active, opt );
break;
}
}
-QStyle::SubControl KStyle::querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint &pos,
- const QStyleOption &opt ) const
+TQStyle::SubControl KStyle::querySubControl( ComplexControl control,
+ const TQWidget* widget,
+ const TQPoint &pos,
+ const TQStyleOption &opt ) const
{
- QStyle::SubControl ret = QCommonStyle::querySubControl(control, widget, pos, opt);
+ TQStyle::SubControl ret = TQCommonStyle::querySubControl(control, widget, pos, opt);
if (d->scrollbarType == ThreeButtonScrollBar) {
// Enable third button
@@ -1374,12 +1374,12 @@ QStyle::SubControl KStyle::querySubControl( ComplexControl control,
}
-QRect KStyle::querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+TQRect KStyle::querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl sc,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
- QRect ret;
+ TQRect ret;
if (control == CC_ScrollBar)
{
@@ -1387,7 +1387,7 @@ QRect KStyle::querySubControlMetrics( ComplexControl control,
bool platinumScrollBar = d->scrollbarType & PlatinumStyleScrollBar;
bool nextScrollBar = d->scrollbarType & NextStyleScrollBar;
- const QScrollBar *sb = (const QScrollBar*)widget;
+ const TQScrollBar *sb = (const TQScrollBar*)widget;
bool horizontal = sb->orientation() == Qt::Horizontal;
int sliderstart = sb->sliderStart();
int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
@@ -1508,11 +1508,11 @@ QRect KStyle::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, opt);
break;
}
} else
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, opt);
return ret;
}
@@ -1759,40 +1759,40 @@ static const char* const critical_xpm[]={
"...........aaaaaaaaaaa..........",
".............aaaaaaa............"};
-QPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
switch (stylepixmap) {
case SP_TitleBarShadeButton:
- return QPixmap(const_cast<const char**>(kstyle_shade_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_shade_xpm));
case SP_TitleBarUnshadeButton:
- return QPixmap(const_cast<const char**>(kstyle_unshade_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_unshade_xpm));
case SP_TitleBarNormalButton:
- return QPixmap(const_cast<const char**>(kstyle_normalizeup_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_normalizeup_xpm));
case SP_TitleBarMinButton:
- return QPixmap(const_cast<const char**>(kstyle_minimize_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_minimize_xpm));
case SP_TitleBarMaxButton:
- return QPixmap(const_cast<const char**>(kstyle_maximize_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_maximize_xpm));
case SP_TitleBarCloseButton:
- return QPixmap(const_cast<const char**>(kstyle_close_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_close_xpm));
case SP_DockWindowCloseButton:
- return QPixmap(const_cast<const char**>(dock_window_close_xpm ));
+ return TQPixmap(const_cast<const char**>(dock_window_close_xpm ));
case SP_MessageBoxInformation:
- return QPixmap(const_cast<const char**>(information_xpm));
+ return TQPixmap(const_cast<const char**>(information_xpm));
case SP_MessageBoxWarning:
- return QPixmap(const_cast<const char**>(warning_xpm));
+ return TQPixmap(const_cast<const char**>(warning_xpm));
case SP_MessageBoxCritical:
- return QPixmap(const_cast<const char**>(critical_xpm));
+ return TQPixmap(const_cast<const char**>(critical_xpm));
default:
break;
}
- return QCommonStyle::stylePixmap(stylepixmap, widget, opt);
+ return TQCommonStyle::stylePixmap(stylepixmap, widget, opt);
}
-int KStyle::styleHint( StyleHint sh, const QWidget* w,
- const QStyleOption &opt, QStyleHintReturn* shr) const
+int KStyle::styleHint( StyleHint sh, const TQWidget* w,
+ const TQStyleOption &opt, QStyleHintReturn* shr) const
{
switch (sh)
{
@@ -1831,10 +1831,10 @@ int KStyle::styleHint( StyleHint sh, const QWidget* w,
case SH_LineEdit_PasswordCharacter:
{
if (w) {
- const QFontMetrics &fm = w->fontMetrics();
- if (fm.inFont(QChar(0x25CF))) {
+ const TQFontMetrics &fm = w->fontMetrics();
+ if (fm.inFont(TQChar(0x25CF))) {
return 0x25CF;
- } else if (fm.inFont(QChar(0x2022))) {
+ } else if (fm.inFont(TQChar(0x2022))) {
return 0x2022;
}
}
@@ -1842,51 +1842,51 @@ int KStyle::styleHint( StyleHint sh, const QWidget* w,
}
default:
- return QCommonStyle::styleHint(sh, w, opt, shr);
+ return TQCommonStyle::styleHint(sh, w, opt, shr);
}
}
-bool KStyle::eventFilter( QObject* object, QEvent* event )
+bool KStyle::eventFilter( TQObject* object, TQEvent* event )
{
if ( d->useFilledFrameWorkaround )
{
- // Make the QMenuBar/QToolBar paintEvent() cover a larger area to
+ // Make the QMenuBar/TQToolBar paintEvent() cover a larger area to
// ensure that the filled frame contents are properly painted.
// We essentially modify the paintEvent's rect to include the
// panel border, which also paints the widget's interior.
// This is nasty, but I see no other way to properly repaint
// filled frames in all QMenuBars and QToolBars.
// -- Karol.
- QFrame *frame = 0;
- if ( event->type() == QEvent::Paint
- && (frame = ::qt_cast<QFrame*>(object)) )
+ TQFrame *frame = 0;
+ if ( event->type() == TQEvent::Paint
+ && (frame = ::qt_cast<TQFrame*>(object)) )
{
- if (frame->frameShape() != QFrame::ToolBarPanel && frame->frameShape() != QFrame::MenuBarPanel)
+ if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false;
bool horizontal = true;
- QPaintEvent* pe = (QPaintEvent*)event;
- QToolBar *toolbar = ::qt_cast< QToolBar *>( frame );
- QRect r = pe->rect();
+ TQPaintEvent* pe = (TQPaintEvent*)event;
+ TQToolBar *toolbar = ::qt_cast< TQToolBar *>( frame );
+ TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == Qt::Vertical)
horizontal = false;
if (horizontal) {
if ( r.height() == frame->height() )
- return false; // Let QFrame handle the painting now.
+ return false; // Let TQFrame handle the painting now.
// Else, send a new paint event with an updated paint rect.
- QPaintEvent dummyPE( QRect( r.x(), 0, r.width(), frame->height()) );
- QApplication::sendEvent( frame, &dummyPE );
+ TQPaintEvent dummyPE( TQRect( r.x(), 0, r.width(), frame->height()) );
+ TQApplication::sendEvent( frame, &dummyPE );
}
else { // Vertical
if ( r.width() == frame->width() )
return false;
- QPaintEvent dummyPE( QRect( 0, r.y(), frame->width(), r.height()) );
- QApplication::sendEvent( frame, &dummyPE );
+ TQPaintEvent dummyPE( TQRect( 0, r.y(), frame->width(), r.height()) );
+ TQApplication::sendEvent( frame, &dummyPE );
}
// Discard this event as we sent a new paintEvent.
@@ -1904,13 +1904,13 @@ bool KStyle::eventFilter( QObject* object, QEvent* event )
TransparencyHandler::TransparencyHandler( KStyle* style,
TransparencyEngine tEngine, float menuOpacity, bool useDropShadow )
- : QObject()
+ : TQObject()
{
te = tEngine;
kstyle = style;
opacity = menuOpacity;
dropShadow = useDropShadow;
- pix.setOptimization(QPixmap::BestOptim);
+ pix.setOptimization(TQPixmap::BestOptim);
}
TransparencyHandler::~TransparencyHandler()
@@ -1918,7 +1918,7 @@ TransparencyHandler::~TransparencyHandler()
}
// This is meant to be ugly but fast.
-void TransparencyHandler::rightShadow(QImage& dst)
+void TransparencyHandler::rightShadow(TQImage& dst)
{
if (dst.depth() != 32)
dst = dst.convertDepth(32);
@@ -1957,7 +1957,7 @@ void TransparencyHandler::rightShadow(QImage& dst)
}
}
-void TransparencyHandler::bottomShadow(QImage& dst)
+void TransparencyHandler::bottomShadow(TQImage& dst)
{
if (dst.depth() != 32)
dst = dst.convertDepth(32);
@@ -1997,18 +1997,18 @@ void TransparencyHandler::bottomShadow(QImage& dst)
}
// Create a shadow of thickness 4.
-void TransparencyHandler::createShadowWindows(const QPopupMenu* p)
+void TransparencyHandler::createShadowWindows(const TQPopupMenu* p)
{
#ifdef Q_WS_X11
int x2 = p->x()+p->width();
int y2 = p->y()+p->height();
- QRect shadow1(x2, p->y() + 4, 4, p->height());
- QRect shadow2(p->x() + 4, y2, p->width() - 4, 4);
+ TQRect shadow1(x2, p->y() + 4, 4, p->height());
+ TQRect shadow2(p->x() + 4, y2, p->width() - 4, 4);
// Create a fake drop-down shadow effect via blended Xwindows
ShadowElements se;
- se.w1 = new QWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM );
- se.w2 = new QWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM );
+ se.w1 = new TQWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM );
+ se.w2 = new TQWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM );
se.w1->setGeometry(shadow1);
se.w2->setGeometry(shadow2);
XSelectInput(qt_xdisplay(), se.w1->winId(), StructureNotifyMask );
@@ -2018,12 +2018,12 @@ void TransparencyHandler::createShadowWindows(const QPopupMenu* p)
shadowMap()[p] = se;
// Some hocus-pocus here to create the drop-shadow.
- QPixmap pix_shadow1 = QPixmap::grabWindow(qt_xrootwin(),
+ TQPixmap pix_shadow1 = TQPixmap::grabWindow(qt_xrootwin(),
shadow1.x(), shadow1.y(), shadow1.width(), shadow1.height());
- QPixmap pix_shadow2 = QPixmap::grabWindow(qt_xrootwin(),
+ TQPixmap pix_shadow2 = TQPixmap::grabWindow(qt_xrootwin(),
shadow2.x(), shadow2.y(), shadow2.width(), shadow2.height());
- QImage img;
+ TQImage img;
img = pix_shadow1.convertToImage();
rightShadow(img);
pix_shadow1.convertFromImage(img);
@@ -2036,7 +2036,7 @@ void TransparencyHandler::createShadowWindows(const QPopupMenu* p)
se.w2->setErasePixmap(pix_shadow2);
// Show the 'shadow' just before showing the popup menu window
- // Don't use QWidget::show() so we don't confuse QEffects, thus causing broken focus.
+ // Don't use TQWidget::show() so we don't confuse QEffects, thus causing broken focus.
XMapWindow(qt_xdisplay(), se.w1->winId());
XMapWindow(qt_xdisplay(), se.w2->winId());
#else
@@ -2044,7 +2044,7 @@ void TransparencyHandler::createShadowWindows(const QPopupMenu* p)
#endif
}
-void TransparencyHandler::removeShadowWindows(const QPopupMenu* p)
+void TransparencyHandler::removeShadowWindows(const TQPopupMenu* p)
{
#ifdef Q_WS_X11
ShadowMap::iterator it = shadowMap().find(p);
@@ -2063,22 +2063,22 @@ void TransparencyHandler::removeShadowWindows(const QPopupMenu* p)
#endif
}
-bool TransparencyHandler::eventFilter( QObject* object, QEvent* event )
+bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
{
#if !defined Q_WS_MAC && !defined Q_WS_WIN
// Transparency idea was borrowed from KDE2's "MegaGradient" Style,
// Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
// Added 'fake' menu shadows <04-Jul-2002> -- Karol
- QPopupMenu* p = (QPopupMenu*)object;
- QEvent::Type et = event->type();
+ TQPopupMenu* p = (TQPopupMenu*)object;
+ TQEvent::Type et = event->type();
- if (et == QEvent::Show)
+ if (et == TQEvent::Show)
{
// Handle translucency
if (te != Disabled)
{
- pix = QPixmap::grabWindow(qt_xrootwin(),
+ pix = TQPixmap::grabWindow(qt_xrootwin(),
p->x(), p->y(), p->width(), p->height());
switch (te) {
@@ -2112,7 +2112,7 @@ bool TransparencyHandler::eventFilter( QObject* object, QEvent* event )
if (dropShadow && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p ))
createShadowWindows(p);
}
- else if (et == QEvent::Hide)
+ else if (et == TQEvent::Hide)
{
// Handle drop shadow
if (dropShadow)
@@ -2120,7 +2120,7 @@ bool TransparencyHandler::eventFilter( QObject* object, QEvent* event )
// Handle translucency
if (te != Disabled)
- p->setErasePixmap(QPixmap());
+ p->setErasePixmap(TQPixmap());
}
#endif
@@ -2128,19 +2128,19 @@ bool TransparencyHandler::eventFilter( QObject* object, QEvent* event )
}
-// Blends a QImage to a predefined color, with a given opacity.
-void TransparencyHandler::blendToColor(const QColor &col)
+// Blends a TQImage to a predefined color, with a given opacity.
+void TransparencyHandler::blendToColor(const TQColor &col)
{
if (opacity < 0.0 || opacity > 1.0)
return;
- QImage img = pix.convertToImage();
+ TQImage img = pix.convertToImage();
KImageEffect::blend(col, img, opacity);
pix.convertFromImage(img);
}
-void TransparencyHandler::blendToPixmap(const QColorGroup &cg, const QPopupMenu* p)
+void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQPopupMenu* p)
{
if (opacity < 0.0 || opacity > 1.0)
return;
@@ -2155,8 +2155,8 @@ void TransparencyHandler::blendToPixmap(const QColorGroup &cg, const QPopupMenu*
// Allow styles to define the blend pixmap - allows for some interesting effects.
kstyle->renderMenuBlendPixmap( blendPix, cg, p );
- QImage blendImg = blendPix.convertToImage();
- QImage backImg = pix.convertToImage();
+ TQImage blendImg = blendPix.convertToImage();
+ TQImage backImg = pix.convertToImage();
KImageEffect::blend(blendImg, backImg, opacity);
pix.convertFromImage(backImg);
}
@@ -2166,7 +2166,7 @@ void TransparencyHandler::blendToPixmap(const QColorGroup &cg, const QPopupMenu*
// Here we go, use XRender in all its glory.
// NOTE: This is actually a bit slower than the above routines
// on non-accelerated displays. -- Karol.
-void TransparencyHandler::XRenderBlendToPixmap(const QPopupMenu* p)
+void TransparencyHandler::XRenderBlendToPixmap(const TQPopupMenu* p)
{
KPixmap renderPix;
renderPix.resize( pix.width(), pix.height() );
diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h
index 91d581ac7..fc332bd50 100644
--- a/kdefx/kstyle.h
+++ b/kdefx/kstyle.h
@@ -4,7 +4,7 @@
* KStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
*
- * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
+ * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
* Copyright (C) 1998-2000 TrollTech AS.
*
* Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
@@ -32,7 +32,7 @@
// This API is still subject to change.
// I will remove this warning when I feel the API is sufficiently flexible.
-#include <qcommonstyle.h>
+#include <tqcommonstyle.h>
#include <kdelibs_export.h>
@@ -40,17 +40,17 @@ class KPixmap;
struct KStylePrivate;
/**
- * Simplifies and extends the QStyle API to make style coding easier.
+ * Simplifies and extends the TQStyle API to make style coding easier.
*
* The KStyle class provides a simple internal menu transparency engine
* which attempts to use XRender for accelerated blending where requested,
* or falls back to fast internal software tinting/blending routines.
- * It also simplifies more complex portions of the QStyle API, such as
+ * It also simplifies more complex portions of the TQStyle API, such as
* the PopupMenuItems, ScrollBars and Sliders by providing extra "primitive
* elements" which are simple to implement by the style writer.
*
- * @see QStyle::QStyle
- * @see QCommonStyle::QCommonStyle
+ * @see TQStyle::QStyle
+ * @see TQCommonStyle::QCommonStyle
* @author Karol Szwed (gallium@kde.org)
* @version $Id$
*/
@@ -71,7 +71,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
*
* @li FilledFrameWorkaround - Enable this flag to facilitate
* proper repaints of QMenuBars and QToolBars when the style chooses
- * to paint the interior of a QFrame. The style primitives in question
+ * to paint the interior of a TQFrame. The style primitives in question
* are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses
* this workaround to enable painting of gradients in menubars and
* toolbars.
@@ -118,9 +118,9 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
*
* Select the appropriate KStyle flags and scrollbar type
* for your style. The user's style preferences selected in KControl
- * are read by using QSettings and are automatically applied to the style.
+ * are read by using TQSettings and are automatically applied to the style.
* As a fallback, KStyle paints progressbars and tabbars. It inherits from
- * QCommonStyle for speed, so don't expect much to be implemented.
+ * TQCommonStyle for speed, so don't expect much to be implemented.
*
* It is advisable to use a currently implemented style such as the HighColor
* style as a foundation for any new KStyle, so the limited number of
@@ -143,7 +143,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
/**
* Returns the default widget style depending on color depth.
*/
- static QString defaultStyle();
+ static TQString defaultStyle();
/**
* Modifies the scrollbar type used by the style.
@@ -178,14 +178,14 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
* This virtual is never called if XRender/Software blending is disabled by
* the user in KDE's style control module.
*/
- virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg,
- const QPopupMenu* popup ) const;
+ virtual void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup& cg,
+ const TQPopupMenu* popup ) const;
/**
* KStyle Primitive Elements:
*
* The KStyle class extends the Qt's Style API by providing certain
- * simplifications for parts of QStyle. To do this, the KStylePrimitive
+ * simplifications for parts of TQStyle. To do this, the KStylePrimitive
* elements were defined, which are very similar to Qt's PrimitiveElement.
*
* The first three Handle primitives simplify and extend PE_DockWindowHandle,
@@ -202,10 +202,10 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
*
* @li KPE_ToolBarHandle - This primitive must be reimplemented. It currently
* only paints a filled rectangle as default behavior. This primitive is used
- * to render QToolBar handles.
+ * to render TQToolBar handles.
*
* @li KPE_GeneralHandle - This primitive must be reimplemented. It is used
- * to render general handles that are not part of a QToolBar or QDockWindow, such
+ * to render general handles that are not part of a TQToolBar or TQDockWindow, such
* as the applet handles used in Kicker. The default implementation paints a filled
* rect of arbitrary color.
*
@@ -237,21 +237,21 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
};
/**
- * This function is identical to Qt's QStyle::drawPrimitive(), except that
+ * This function is identical to Qt's TQStyle::drawPrimitive(), except that
* it adds one further parameter, 'widget', that can be used to determine
* the widget state of the KStylePrimitive in question.
*
* @see KStyle::KStylePrimitive
- * @see QStyle::drawPrimitive
- * @see QStyle::drawComplexControl
+ * @see TQStyle::drawPrimitive
+ * @see TQStyle::drawComplexControl
*/
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
enum KStylePixelMetric {
@@ -266,66 +266,66 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
KPM_ListViewBranchThickness = 0x00000100
};
- int kPixelMetric( KStylePixelMetric kpm, const QWidget* widget = 0 ) const;
+ int kPixelMetric( KStylePixelMetric kpm, const TQWidget* widget = 0 ) const;
// ---------------------------------------------------------------------------
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
- void polishPopupMenu( QPopupMenu* );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
+ void polishPopupMenu( TQPopupMenu* );
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
SubControl querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint &pos,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQWidget* widget,
+ const TQPoint &pos,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+ TQRect querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl sc,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric( PixelMetric m,
- const QWidget* widget = 0 ) const;
+ const TQWidget* widget = 0 ) const;
- QRect subRect( SubRect r,
- const QWidget* widget ) const;
+ TQRect subRect( SubRect r,
+ const TQWidget* widget ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
int styleHint( StyleHint sh,
- const QWidget* w = 0,
- const QStyleOption &opt = QStyleOption::Default,
+ const TQWidget* w = 0,
+ const TQStyleOption &opt = TQStyleOption::Default,
QStyleHintReturn* shr = 0 ) const;
protected:
- bool eventFilter( QObject* object, QEvent* event );
+ bool eventFilter( TQObject* object, TQEvent* event );
private:
// Disable copy constructor and = operator
diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp
index 993a72c9b..ef1b0f4e8 100644
--- a/kdeprint/cups/cupsaddsmb2.cpp
+++ b/kdeprint/cups/cupsaddsmb2.cpp
@@ -21,93 +21,93 @@
#include "cupsinfos.h"
#include "sidepixmap.h"
-#include <qtimer.h>
-#include <qprogressbar.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qmessagebox.h>
-#include <qfile.h>
+#include <tqmessagebox.h>
+#include <tqfile.h>
#include <kio/passdlg.h>
#include <kdebug.h>
#include <kseparator.h>
#include <kactivelabel.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
#include <cups/cups.h>
#include <ctype.h>
-CupsAddSmb::CupsAddSmb(QWidget *parent, const char *name)
+CupsAddSmb::CupsAddSmb(TQWidget *parent, const char *name)
: KDialog(parent, name)
{
m_state = None;
m_status = false;
m_actionindex = 0;
- connect(&m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotReceived(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotReceived(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotReceived(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotReceived(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
m_side = new SidePixmap(this);
- m_doit = new QPushButton(i18n("&Export"), this);
+ m_doit = new TQPushButton(i18n("&Export"), this);
m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- connect(m_cancel, SIGNAL(clicked()), SLOT(reject()));
- connect(m_doit, SIGNAL(clicked()), SLOT(slotActionClicked()));
- m_bar = new QProgressBar(this);
+ connect(m_cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
+ connect(m_doit, TQT_SIGNAL(clicked()), TQT_SLOT(slotActionClicked()));
+ m_bar = new TQProgressBar(this);
m_text = new KActiveLabel(this);
- QLabel *m_title = new QLabel(i18n("Export Printer Driver to Windows Clients"), this);
+ QLabel *m_title = new TQLabel(i18n("Export Printer Driver to Windows Clients"), this);
setCaption(m_title->text());
QFont f(m_title->font());
f.setBold(true);
m_title->setFont(f);
KSeparator *m_sep = new KSeparator(Qt::Horizontal, this);
- m_textinfo = new QLabel( this );
- m_logined = new QLineEdit( this );
- m_passwded = new QLineEdit( this );
- m_passwded->setEchoMode( QLineEdit::Password );
- m_servered = new QLineEdit( this );
- QLabel *m_loginlab = new QLabel( i18n( "&Username:" ), this );
- QLabel *m_serverlab = new QLabel( i18n( "&Samba server:" ), this );
- QLabel *m_passwdlab = new QLabel( i18n( "&Password:" ), this );
+ m_textinfo = new TQLabel( this );
+ m_logined = new TQLineEdit( this );
+ m_passwded = new TQLineEdit( this );
+ m_passwded->setEchoMode( TQLineEdit::Password );
+ m_servered = new TQLineEdit( this );
+ TQLabel *m_loginlab = new TQLabel( i18n( "&Username:" ), this );
+ TQLabel *m_serverlab = new TQLabel( i18n( "&Samba server:" ), this );
+ TQLabel *m_passwdlab = new TQLabel( i18n( "&Password:" ), this );
m_loginlab->setBuddy( m_logined );
m_serverlab->setBuddy( m_servered );
m_passwdlab->setBuddy( m_passwded );
- QString txt = i18n( "<p><b>Samba server</b></p>"
+ TQString txt = i18n( "<p><b>Samba server</b></p>"
"Adobe Windows PostScript driver files plus the CUPS printer PPD will be "
"exported to the <tt>[print$]</tt> special share of the Samba server (to change "
"the source CUPS server, use the <nobr><i>Configure Manager -> CUPS server</i></nobr> first). "
"The <tt>[print$]</tt> share must exist on the Samba side prior to clicking the "
"<b>Export</b> button below." );
- QWhatsThis::add( m_serverlab, txt );
- QWhatsThis::add( m_servered, txt );
+ TQWhatsThis::add( m_serverlab, txt );
+ TQWhatsThis::add( m_servered, txt );
txt = i18n( "<p><b>Samba username</b></p>"
"User needs to have write access to the <tt>[print$]</tt> share on the Samba server. "
"<tt>[print$]</tt> holds printer drivers prepared for download to Windows clients. "
"This dialog does not work for Samba servers configured with <tt>security = share</tt> "
"(but works fine with <tt>security = user</tt>)." );
- QWhatsThis::add( m_loginlab, txt );
- QWhatsThis::add( m_logined, txt );
+ TQWhatsThis::add( m_loginlab, txt );
+ TQWhatsThis::add( m_logined, txt );
txt = i18n( "<p><b>Samba password</b></p>"
"The Samba setting <tt>encrypt passwords = yes</tt> "
"(default) requires prior use of <tt>smbpasswd -a [username]</tt> command, "
"to create an encrypted Samba password and have Samba recognize it." );
- QWhatsThis::add( m_passwdlab, txt );
- QWhatsThis::add( m_passwded, txt );
+ TQWhatsThis::add( m_passwdlab, txt );
+ TQWhatsThis::add( m_passwded, txt );
- QHBoxLayout *l0 = new QHBoxLayout(this, 10, 10);
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 10);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 10, 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 10);
l0->addWidget(m_side);
l0->addLayout(l1);
l1->addWidget(m_title);
l1->addWidget(m_sep);
l1->addWidget(m_text);
- QGridLayout *l3 = new QGridLayout( 0, 3, 2, 0, 10 );
+ TQGridLayout *l3 = new TQGridLayout( 0, 3, 2, 0, 10 );
l1->addLayout( l3 );
l3->addWidget( m_loginlab, 1, 0 );
l3->addWidget( m_passwdlab, 2, 0 );
@@ -120,7 +120,7 @@ CupsAddSmb::CupsAddSmb(QWidget *parent, const char *name)
l1->addWidget(m_bar);
l1->addWidget( m_textinfo );
l1->addSpacing(30);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10);
l1->addLayout(l2);
l2->addStretch(1);
l2->addWidget(m_doit);
@@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen)
while (1)
{
// read a line
- line = QString::fromLatin1("");
+ line = TQString::fromLatin1("");
partial = true;
while (index < buflen)
{
@@ -244,7 +244,7 @@ void CupsAddSmb::checkActionStatus()
void CupsAddSmb::nextAction()
{
if (m_actionindex < (int)(m_actions.count()))
- QTimer::singleShot(1, this, SLOT(doNextAction()));
+ TQTimer::singleShot(1, this, TQT_SLOT(doNextAction()));
}
void CupsAddSmb::doNextAction()
@@ -273,7 +273,7 @@ void CupsAddSmb::doNextAction()
m_state = Copy;
//m_text->setText(i18n("Uploading %1").arg(m_actions[m_actionindex+1]));
m_textinfo->setText(i18n("Uploading %1").arg(m_actions[m_actionindex+1]));
- s.append(" ").append(QFile::encodeName(m_actions[m_actionindex]).data()).append(" ").append(m_actions[m_actionindex+1].latin1());
+ s.append(" ").append(TQFile::encodeName(m_actions[m_actionindex]).data()).append(" ").append(m_actions[m_actionindex+1].latin1());
m_actionindex += 2;
}
else if (s == "adddriver")
@@ -332,7 +332,7 @@ void CupsAddSmb::slotProcessExited(KProcess*)
m_passwded->setEnabled( true );
m_text->setText(i18n("Driver successfully exported."));
m_bar->reset();
- m_textinfo->setText( QString::null );
+ m_textinfo->setText( TQString::null );
return;
}
}
@@ -353,7 +353,7 @@ void CupsAddSmb::slotProcessExited(KProcess*)
}
}
-void CupsAddSmb::showError(const QString& msg)
+void CupsAddSmb::showError(const TQString& msg)
{
m_text->setText(i18n("<h3>Operation failed.</h3><p>%1</p>").arg(msg));
m_cancel->setEnabled(true);
@@ -364,7 +364,7 @@ void CupsAddSmb::showError(const QString& msg)
m_state = None;
}
-bool CupsAddSmb::exportDest(const QString &dest, const QString& datadir)
+bool CupsAddSmb::exportDest(const TQString &dest, const TQString& datadir)
{
CupsAddSmb dlg;
dlg.m_dest = dest;
@@ -386,8 +386,8 @@ bool CupsAddSmb::doExport()
m_status = false;
m_state = None;
- if (!QFile::exists(m_datadir+"/drivers/ADOBEPS5.DLL") ||
- !QFile::exists(m_datadir+"/drivers/ADOBEPS4.DRV"))
+ if (!TQFile::exists(m_datadir+"/drivers/ADOBEPS5.DLL") ||
+ !TQFile::exists(m_datadir+"/drivers/ADOBEPS4.DRV"))
{
showError(
i18n("Some driver files are missing. You can get them on "
@@ -433,7 +433,7 @@ bool CupsAddSmb::doExport()
m_actions << "quit";
m_proc.clearArguments();
- m_proc << "smbclient" << QString::fromLatin1("//")+m_servered->text()+"/print$";
+ m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$";
return startProcess();
}
diff --git a/kdeprint/cups/cupsaddsmb2.h b/kdeprint/cups/cupsaddsmb2.h
index 1f364fc26..43cd61e8c 100644
--- a/kdeprint/cups/cupsaddsmb2.h
+++ b/kdeprint/cups/cupsaddsmb2.h
@@ -20,8 +20,8 @@
#ifndef CUPSADDSMB_H
#define CUPSADDSMB_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kprocess.h>
#include <kdialog.h>
@@ -38,10 +38,10 @@ class CupsAddSmb : public KDialog
public:
enum State { None, Start, MkDir, Copy, AddDriver, AddPrinter };
- CupsAddSmb(QWidget *parent = 0, const char *name = 0);
+ CupsAddSmb(TQWidget *parent = 0, const char *name = 0);
~CupsAddSmb();
- static bool exportDest(const QString& dest, const QString& datadir);
+ static bool exportDest(const TQString& dest, const TQString& datadir);
protected slots:
void slotReceived(KProcess*, char*, int);
@@ -55,7 +55,7 @@ protected:
bool startProcess();
bool doExport();
bool doInstall();
- void showError(const QString& msg);
+ void showError(const TQString& msg);
private:
KProcess m_proc;
@@ -69,8 +69,8 @@ private:
SidePixmap *m_side;
QPushButton *m_doit, *m_cancel;
KActiveLabel *m_text;
- QLabel *m_textinfo;
- QLineEdit *m_logined, *m_passwded, *m_servered;
+ TQLabel *m_textinfo;
+ TQLineEdit *m_logined, *m_passwded, *m_servered;
QString m_datadir;
};
diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp
index b7472c5a4..1811abf68 100644
--- a/kdeprint/cups/cupsdconf2/addressdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp
@@ -19,27 +19,27 @@
#include "addressdialog.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-AddressDialog::AddressDialog(QWidget *parent, const char *name)
+AddressDialog::AddressDialog(TQWidget *parent, const char *name)
: KDialogBase(Swallow, i18n("ACL Address"), Ok|Cancel, Ok, parent, name, true, true)
{
- QWidget *w = new QWidget(this);
- type_ = new QComboBox(w);
- address_ = new QLineEdit(w);
+ TQWidget *w = new TQWidget(this);
+ type_ = new TQComboBox(w);
+ address_ = new TQLineEdit(w);
type_->insertItem(i18n("Allow"));
type_->insertItem(i18n("Deny"));
- QLabel *l1 = new QLabel(i18n("Type:"), w);
- QLabel *l2 = new QLabel(i18n("Address:"), w);
+ QLabel *l1 = new TQLabel(i18n("Type:"), w);
+ QLabel *l2 = new TQLabel(i18n("Address:"), w);
- QGridLayout *m1 = new QGridLayout(w, 2, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(w, 2, 2, 0, 5);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -50,9 +50,9 @@ AddressDialog::AddressDialog(QWidget *parent, const char *name)
resize(300, 100);
}
-QString AddressDialog::addressString()
+TQString AddressDialog::addressString()
{
- QString s;
+ TQString s;
if (type_->currentItem() == 0)
s.append("Allow ");
else
@@ -64,16 +64,16 @@ QString AddressDialog::addressString()
return s;
}
-QString AddressDialog::newAddress(QWidget *parent)
+TQString AddressDialog::newAddress(TQWidget *parent)
{
AddressDialog dlg(parent);
if (dlg.exec())
return dlg.addressString();
else
- return QString::null;
+ return TQString::null;
}
-QString AddressDialog::editAddress(const QString& addr, QWidget *parent)
+TQString AddressDialog::editAddress(const TQString& addr, TQWidget *parent)
{
AddressDialog dlg(parent);
int p = addr.find(' ');
@@ -85,5 +85,5 @@ QString AddressDialog::editAddress(const QString& addr, QWidget *parent)
if (dlg.exec())
return dlg.addressString();
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/cups/cupsdconf2/addressdialog.h b/kdeprint/cups/cupsdconf2/addressdialog.h
index 4560dd72b..0372f8cc6 100644
--- a/kdeprint/cups/cupsdconf2/addressdialog.h
+++ b/kdeprint/cups/cupsdconf2/addressdialog.h
@@ -28,11 +28,11 @@ class QLineEdit;
class AddressDialog : public KDialogBase
{
public:
- AddressDialog(QWidget *parent = 0, const char *name = 0);
+ AddressDialog(TQWidget *parent = 0, const char *name = 0);
- QString addressString();
- static QString newAddress(QWidget *parent = 0);
- static QString editAddress(const QString& s, QWidget *parent = 0);
+ TQString addressString();
+ static TQString newAddress(TQWidget *parent = 0);
+ static TQString editAddress(const TQString& s, TQWidget *parent = 0);
private:
QComboBox *type_;
diff --git a/kdeprint/cups/cupsdconf2/browsedialog.cpp b/kdeprint/cups/cupsdconf2/browsedialog.cpp
index 846ea41a5..0856df11a 100644
--- a/kdeprint/cups/cupsdconf2/browsedialog.cpp
+++ b/kdeprint/cups/cupsdconf2/browsedialog.cpp
@@ -20,35 +20,35 @@
#include "browsedialog.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <klocale.h>
-BrowseDialog::BrowseDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+BrowseDialog::BrowseDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- type_ = new QComboBox(dummy);
- from_ = new QLineEdit(dummy);
- to_ = new QLineEdit(dummy);
+ type_ = new TQComboBox(dummy);
+ from_ = new TQLineEdit(dummy);
+ to_ = new TQLineEdit(dummy);
type_->insertItem(i18n("Send"));
type_->insertItem(i18n("Allow"));
type_->insertItem(i18n("Deny"));
type_->insertItem(i18n("Relay"));
type_->insertItem(i18n("Poll"));
- QLabel *l1 = new QLabel(i18n("Type:"), dummy);
- QLabel *l2 = new QLabel(i18n("From:"), dummy);
- QLabel *l3 = new QLabel(i18n("To:"), dummy);
+ QLabel *l1 = new TQLabel(i18n("Type:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("From:"), dummy);
+ QLabel *l3 = new TQLabel(i18n("To:"), dummy);
- QGridLayout *m1 = new QGridLayout(dummy, 3, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(dummy, 3, 2, 0, 5);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
m1->addWidget(l3, 2, 0, Qt::AlignRight);
@@ -56,16 +56,16 @@ BrowseDialog::BrowseDialog(QWidget *parent, const char *name)
m1->addWidget(from_, 1, 1);
m1->addWidget(to_, 2, 1);
- connect(type_, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
+ connect(type_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
slotTypeChanged(type_->currentItem());
setCaption(i18n("Browse Address"));
resize(250, 100);
}
-QString BrowseDialog::addressString()
+TQString BrowseDialog::addressString()
{
- QString s;
+ TQString s;
switch (type_->currentItem())
{
case 0:
@@ -93,10 +93,10 @@ QString BrowseDialog::addressString()
void BrowseDialog::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(type_, conf->comments_.toolTip("browsetype"));
+ TQWhatsThis::add(type_, conf->comments_.toolTip("browsetype"));
}
-QString BrowseDialog::newAddress(QWidget *parent, CupsdConf *conf)
+TQString BrowseDialog::newAddress(TQWidget *parent, CupsdConf *conf)
{
BrowseDialog dlg(parent);
dlg.setInfos(conf);
@@ -104,14 +104,14 @@ QString BrowseDialog::newAddress(QWidget *parent, CupsdConf *conf)
{
return dlg.addressString();
}
- return QString::null;
+ return TQString::null;
}
-QString BrowseDialog::editAddress(const QString& s, QWidget *parent, CupsdConf *conf)
+TQString BrowseDialog::editAddress(const TQString& s, TQWidget *parent, CupsdConf *conf)
{
BrowseDialog dlg(parent);
dlg.setInfos(conf);
- QStringList l = QStringList::split(QRegExp("\\s"), s, false);
+ QStringList l = TQStringList::split(TQRegExp("\\s"), s, false);
if (l.count() > 1)
{
if (l[0] == "Send") dlg.type_->setCurrentItem(0);
@@ -130,7 +130,7 @@ QString BrowseDialog::editAddress(const QString& s, QWidget *parent, CupsdConf *
{
return dlg.addressString();
}
- return QString::null;
+ return TQString::null;
}
void BrowseDialog::slotTypeChanged(int index)
diff --git a/kdeprint/cups/cupsdconf2/browsedialog.h b/kdeprint/cups/cupsdconf2/browsedialog.h
index ac5be55b7..d579c3dbf 100644
--- a/kdeprint/cups/cupsdconf2/browsedialog.h
+++ b/kdeprint/cups/cupsdconf2/browsedialog.h
@@ -31,12 +31,12 @@ class BrowseDialog : public KDialogBase
Q_OBJECT
public:
- BrowseDialog(QWidget *parent = 0, const char *name = 0);
+ BrowseDialog(TQWidget *parent = 0, const char *name = 0);
- QString addressString();
+ TQString addressString();
void setInfos(CupsdConf*);
- static QString newAddress(QWidget *parent = 0, CupsdConf *conf = 0);
- static QString editAddress(const QString& s, QWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString newAddress(TQWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString editAddress(const TQString& s, TQWidget *parent = 0, CupsdConf *conf = 0);
protected slots:
void slotTypeChanged(int);
diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
index a61742458..7c2b6276a 100644
--- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
@@ -22,16 +22,16 @@
#include "editlist.h"
#include "browsedialog.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
+CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Browsing"));
@@ -41,15 +41,15 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
browseinterval_ = new KIntNumInput(this);
browseport_ = new KIntNumInput(this);
browsetimeout_ = new KIntNumInput(this);
- browsing_ = new QCheckBox(i18n("Use browsing"), this);
- cups_ = new QCheckBox("CUPS", this);
- slp_ = new QCheckBox("SLP", this);
+ browsing_ = new TQCheckBox(i18n("Use browsing"), this);
+ cups_ = new TQCheckBox("CUPS", this);
+ slp_ = new TQCheckBox("SLP", this);
browseaddresses_ = new EditList(this);
- browseorder_ = new QComboBox(this);
- useimplicitclasses_ = new QCheckBox(i18n("Implicit classes"), this);
- hideimplicitmembers_ = new QCheckBox(i18n("Hide implicit members"), this);
- useshortnames_ = new QCheckBox(i18n("Use short names"), this);
- useanyclasses_ = new QCheckBox(i18n("Use \"any\" classes"), this);
+ browseorder_ = new TQComboBox(this);
+ useimplicitclasses_ = new TQCheckBox(i18n("Implicit classes"), this);
+ hideimplicitmembers_ = new TQCheckBox(i18n("Hide implicit members"), this);
+ useshortnames_ = new TQCheckBox(i18n("Use short names"), this);
+ useanyclasses_ = new TQCheckBox(i18n("Use \"any\" classes"), this);
browseorder_->insertItem(i18n("Allow, Deny"));
browseorder_->insertItem(i18n("Deny, Allow"));
@@ -63,17 +63,17 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
browsetimeout_->setSteps(1, 10);
browsetimeout_->setSuffix(i18n(" sec"));
- QLabel *l1 = new QLabel(i18n("Browse port:"), this);
- QLabel *l2 = new QLabel(i18n("Browse interval:"), this);
- QLabel *l3 = new QLabel(i18n("Browse timeout:"), this);
- QLabel *l4 = new QLabel(i18n("Browse addresses:"), this);
- QLabel *l5 = new QLabel(i18n("Browse order:"), this);
- QLabel *l6 = new QLabel(i18n("Browse options:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Browse port:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Browse interval:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Browse timeout:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Browse addresses:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Browse order:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Browse options:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
- QHBoxLayout *m2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 10);
m1->addMultiCellLayout(m2, 0, 0, 0, 1);
m2->addWidget(browsing_);
m2->addWidget(cups_);
@@ -90,40 +90,40 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
m1->addWidget(browsetimeout_, 3, 1);
m1->addWidget(browseaddresses_, 4, 1);
m1->addWidget(browseorder_, 5, 1);
- QGridLayout *m3 = new QGridLayout(0, 2, 2, 0, 5);
+ QGridLayout *m3 = new TQGridLayout(0, 2, 2, 0, 5);
m1->addLayout(m3, 6, 1);
m3->addWidget(useimplicitclasses_, 0, 0);
m3->addWidget(useanyclasses_, 0, 1);
m3->addWidget(hideimplicitmembers_, 1, 0);
m3->addWidget(useshortnames_, 1, 1);
- connect(browsing_, SIGNAL(toggled(bool)), cups_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), slp_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseport_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseinterval_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browsetimeout_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseaddresses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseorder_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useimplicitclasses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useanyclasses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), hideimplicitmembers_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useshortnames_, SLOT(setEnabled(bool)));
-
- connect(browsing_, SIGNAL(toggled(bool)), l1, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l2, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l3, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l4, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l5, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l6, SLOT(setEnabled(bool)));
-
- connect(browseaddresses_, SIGNAL(add()), SLOT(slotAdd()));
- connect(browseaddresses_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(browseaddresses_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(browseinterval_, SIGNAL(valueChanged(int)), SLOT(intervalChanged(int)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), cups_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), slp_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseport_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseinterval_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browsetimeout_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseaddresses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseorder_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useimplicitclasses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useanyclasses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), hideimplicitmembers_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useshortnames_, TQT_SLOT(setEnabled(bool)));
+
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l1, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l2, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l3, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l4, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l5, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l6, TQT_SLOT(setEnabled(bool)));
+
+ connect(browseaddresses_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(browseaddresses_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(browseaddresses_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(browseinterval_, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(intervalChanged(int)));
browsing_->setChecked(true);
}
-bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
browsing_->setChecked(conf_->browsing_);
@@ -142,7 +142,7 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->browsing_ = browsing_->isChecked();
QStringList l;
@@ -164,30 +164,30 @@ bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, QString&)
void CupsdBrowsingPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(browsing_, conf->comments_.toolTip("browsing"));
- QWhatsThis::add(cups_, conf->comments_.toolTip("browseprotocols"));
- QWhatsThis::add(slp_, conf->comments_.toolTip("browseprotocols"));
- QWhatsThis::add(browseinterval_, conf->comments_.toolTip("browseinterval"));
- QWhatsThis::add(browseport_, conf->comments_.toolTip("browseport"));
- QWhatsThis::add(browsetimeout_, conf->comments_.toolTip("browsetimeout"));
- QWhatsThis::add(browseaddresses_, conf->comments_.toolTip("browseaddresses"));
- QWhatsThis::add(browseorder_, conf->comments_.toolTip("browseorder"));
- QWhatsThis::add(useimplicitclasses_, conf->comments_.toolTip("implicitclasses"));
- QWhatsThis::add(useanyclasses_, conf->comments_.toolTip("implicitanyclasses"));
- QWhatsThis::add(hideimplicitmembers_, conf->comments_.toolTip("hideimplicitmembers"));
- QWhatsThis::add(useshortnames_, conf->comments_.toolTip("browseshortnames"));
+ TQWhatsThis::add(browsing_, conf->comments_.toolTip("browsing"));
+ TQWhatsThis::add(cups_, conf->comments_.toolTip("browseprotocols"));
+ TQWhatsThis::add(slp_, conf->comments_.toolTip("browseprotocols"));
+ TQWhatsThis::add(browseinterval_, conf->comments_.toolTip("browseinterval"));
+ TQWhatsThis::add(browseport_, conf->comments_.toolTip("browseport"));
+ TQWhatsThis::add(browsetimeout_, conf->comments_.toolTip("browsetimeout"));
+ TQWhatsThis::add(browseaddresses_, conf->comments_.toolTip("browseaddresses"));
+ TQWhatsThis::add(browseorder_, conf->comments_.toolTip("browseorder"));
+ TQWhatsThis::add(useimplicitclasses_, conf->comments_.toolTip("implicitclasses"));
+ TQWhatsThis::add(useanyclasses_, conf->comments_.toolTip("implicitanyclasses"));
+ TQWhatsThis::add(hideimplicitmembers_, conf->comments_.toolTip("hideimplicitmembers"));
+ TQWhatsThis::add(useshortnames_, conf->comments_.toolTip("browseshortnames"));
}
void CupsdBrowsingPage::slotAdd()
{
- QString s = BrowseDialog::newAddress(this, conf_);
+ TQString s = BrowseDialog::newAddress(this, conf_);
if (!s.isEmpty())
browseaddresses_->insertItem(s);
}
void CupsdBrowsingPage::slotEdit(int index)
{
- QString s = browseaddresses_->text(index);
+ TQString s = browseaddresses_->text(index);
s = BrowseDialog::editAddress(s, this, conf_);
if (!s.isEmpty())
browseaddresses_->setText(index, s);
diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
index 655998a5e..b2060c4d0 100644
--- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
@@ -32,10 +32,10 @@ class CupsdBrowsingPage : public CupsdPage
Q_OBJECT
public:
- CupsdBrowsingPage(QWidget *parent = 0, const char *name = 0);
+ CupsdBrowsingPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
index d49a104a3..43847299b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
@@ -19,37 +19,37 @@
#include "cupsdcomment.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
-QString Comment::comment()
+TQString Comment::comment()
{
- QString str = comment_;
- str.replace(QRegExp("<[^>]*>"), "");
+ TQString str = comment_;
+ str.replace(TQRegExp("<[^>]*>"), "");
str += ("#\n" + example_);
return str;
}
-QString Comment::toolTip()
+TQString Comment::toolTip()
{
- QString str = comment_;
- str.replace(QRegExp("^#[\\s]*"), "").replace(QRegExp("\n#[\\s]*"), "\n");
+ TQString str = comment_;
+ str.replace(TQRegExp("^#[\\s]*"), "").replace(TQRegExp("\n#[\\s]*"), "\n");
return i18n("Do not translate the keyword between brackets (e.g. ServerName, ServerAdmin, etc.)", str.utf8());
}
-QString Comment::key()
+TQString Comment::key()
{
return key_;
}
-bool Comment::load(QFile *f)
+bool Comment::load(TQFile *f)
{
comment_ = "";
example_ = "";
key_ = "";
- QString line, *current = &comment_;
+ TQString line, *current = &comment_;
while (!f->atEnd())
{
f->readLine(line, 1024);
@@ -83,12 +83,12 @@ bool Comment::load(QFile *f)
//------------------------------------------------------------------------------------------------------------
-QString CupsdComment::operator[] (const QString& key)
+TQString CupsdComment::operator[] (const TQString& key)
{
return comment(key);
}
-QString CupsdComment::comment(const QString& key)
+TQString CupsdComment::comment(const TQString& key)
{
if (comments_.count() != 0 || loadComments())
{
@@ -96,10 +96,10 @@ QString CupsdComment::comment(const QString& key)
if (comm)
return comm->comment();
}
- return QString::null;
+ return TQString::null;
}
-QString CupsdComment::toolTip(const QString& key)
+TQString CupsdComment::toolTip(const TQString& key)
{
if (comments_.count() != 0 || loadComments())
{
@@ -107,7 +107,7 @@ QString CupsdComment::toolTip(const QString& key)
if (comm)
return comm->toolTip();
}
- return QString::null;
+ return TQString::null;
}
bool CupsdComment::loadComments()
diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.h b/kdeprint/cups/cupsdconf2/cupsdcomment.h
index efe242765..8b1922f5b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdcomment.h
+++ b/kdeprint/cups/cupsdconf2/cupsdcomment.h
@@ -20,36 +20,36 @@
#ifndef CUPSDCOMMENT_H
#define CUPSDCOMMENT_H
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
class QFile;
class Comment
{
public:
- bool load(QFile* f);
- QString toolTip();
- QString comment();
- QString key();
+ bool load(TQFile* f);
+ TQString toolTip();
+ TQString comment();
+ TQString key();
private:
- QString comment_;
- QString example_;
- QString key_;
+ TQString comment_;
+ TQString example_;
+ TQString key_;
};
class CupsdComment
{
public:
- QString operator[] (const QString& key);
- QString comment(const QString& key);
- QString toolTip(const QString& key);
+ TQString operator[] (const TQString& key);
+ TQString comment(const TQString& key);
+ TQString toolTip(const TQString& key);
private:
bool loadComments();
private:
- QDict<Comment> comments_;
+ TQDict<Comment> comments_;
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
index 1794d693d..f500d219c 100644
--- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
@@ -20,8 +20,8 @@
#include <config.h>
#include "cupsdconf.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -31,18 +31,18 @@
#include <cups/ipp.h>
#include <cups/language.h>
-QString findDir(const QStringList& list)
+TQString findDir(const TQStringList& list)
{
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
- if (QFile::exists(*it))
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ if (TQFile::exists(*it))
return *it;
// if nothing found, just use the first as default value
return list[0];
}
-void splitSizeSpec(const QString& s, int& sz, int& suff)
+void splitSizeSpec(const TQString& s, int& sz, int& suff)
{
- int p = s.find(QRegExp("\\D"));
+ int p = s.find(TQRegExp("\\D"));
sz = s.mid(0, p).toInt();
if (p != -1)
{
@@ -62,28 +62,28 @@ void splitSizeSpec(const QString& s, int& sz, int& suff)
CupsdConf::CupsdConf()
{
// start by trying to find CUPS directories (useful later)
- datadir_ = findDir(QStringList("/usr/share/cups")
+ datadir_ = findDir(TQStringList("/usr/share/cups")
<< "/usr/local/share/cups"
<< "/opt/share/cups"
<< "/opt/local/share/cups");
- documentdir_ = findDir(QStringList(datadir_+"/doc-root")
+ documentdir_ = findDir(TQStringList(datadir_+"/doc-root")
<< datadir_.left(datadir_.length()-5)+"/doc/cups");
//fontpath_ << (datadir_+"/fonts");
- requestdir_ = findDir(QStringList("/var/spool/cups")
+ requestdir_ = findDir(TQStringList("/var/spool/cups")
<< "/var/cups");
- serverbin_ = findDir(QStringList("/usr/lib" KDELIBSUFF "/cups")
+ serverbin_ = findDir(TQStringList("/usr/lib" KDELIBSUFF "/cups")
<< "/usr/local/lib" KDELIBSUFF "/cups"
<< "/opt/lib" KDELIBSUFF "/cups"
<< "/opt/local/lib" KDELIBSUFF "/cups");
- serverfiles_ = findDir(QStringList("/etc/cups")
+ serverfiles_ = findDir(TQStringList("/etc/cups")
<< "/usr/local/etc/cups");
tmpfiles_ = requestdir_+"/tmp";
// other options
- servername_ = QString::null;
- serveradmin_ = QString::null;
+ servername_ = TQString::null;
+ serveradmin_ = TQString::null;
classification_ = CLASS_NONE;
- otherclassname_ = QString::null;
+ otherclassname_ = TQString::null;
classoverride_ = false;
charset_ = "utf-8";
language_ = "en";
@@ -100,7 +100,7 @@ CupsdConf::CupsdConf()
maxrequestsize_ = "0";
clienttimeout_ = 300;
// listenaddresses_
- QString logdir = findDir(QStringList("/var/log/cups")
+ QString logdir = findDir(TQStringList("/var/log/cups")
<< "/var/spool/cups/log"
<< "/var/cups/log");
accesslog_ = logdir+"/access_log";
@@ -137,7 +137,7 @@ CupsdConf::~CupsdConf()
{
}
-bool CupsdConf::loadFromFile(const QString& filename)
+bool CupsdConf::loadFromFile(const TQString& filename)
{
QFile f(filename);
if (!f.exists() || !f.open(IO_ReadOnly)) return false;
@@ -173,7 +173,7 @@ bool CupsdConf::loadFromFile(const QString& filename)
}
}
-bool CupsdConf::saveToFile(const QString& filename)
+bool CupsdConf::saveToFile(const TQString& filename)
{
QFile f(filename);
if (!f.open(IO_WriteOnly))
@@ -283,7 +283,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << endl;
t << "Satisfy " << (loc->satisfy_ == SATISFY_ALL ? "All" : "Any") << endl;
t << "Order " << (loc->order_ == ORDER_ALLOW_DENY ? "allow,deny" : "deny,allow") << endl;
- for (QStringList::ConstIterator it=loc->addresses_.begin(); it!=loc->addresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=loc->addresses_.begin(); it!=loc->addresses_.end(); ++it)
t << *it << endl;
t << "</Location>" << endl;
}
@@ -316,7 +316,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << "Timeout " << clienttimeout_ << endl;
t << endl << comments_["listen"] << endl;
- for (QStringList::ConstIterator it=listenaddresses_.begin(); it!=listenaddresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=listenaddresses_.begin(); it!=listenaddresses_.end(); ++it)
t << *it << endl;
t << endl << "# Log" << endl;
@@ -387,7 +387,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << "DocumentRoot " << documentdir_ << endl;
t << endl << comments_["fontpath"] << endl;
- for (QStringList::ConstIterator it=fontpath_.begin(); it!=fontpath_.end(); ++it)
+ for (TQStringList::ConstIterator it=fontpath_.begin(); it!=fontpath_.end(); ++it)
t << "FontPath " << *it << endl;
t << endl << comments_["requestroot"] << endl;
@@ -410,7 +410,7 @@ bool CupsdConf::saveToFile(const QString& filename)
if (browsing_)
{
t << "BrowseProtocols ";
- for (QStringList::ConstIterator it=browseprotocols_.begin(); it!=browseprotocols_.end(); ++it)
+ for (TQStringList::ConstIterator it=browseprotocols_.begin(); it!=browseprotocols_.end(); ++it)
t << (*it).upper() << " ";
t << endl;
}
@@ -426,7 +426,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << endl << comments_["browseaddress"] << endl;
if (browsing_)
- for (QStringList::ConstIterator it=browseaddresses_.begin(); it!=browseaddresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=browseaddresses_.begin(); it!=browseaddresses_.end(); ++it)
if ((*it).startsWith("Send"))
t << "BrowseAddress " << (*it).mid(5) << endl;
else
@@ -448,14 +448,14 @@ bool CupsdConf::saveToFile(const QString& filename)
if (browsing_) t << "BrowseShortNames " << (useshortnames_ ? "Yes" : "No") << endl;
t << endl << "# Unknown" << endl;
- for (QValueList< QPair<QString,QString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it)
+ for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it)
t << (*it).first << " " << (*it).second << endl;
return true;
}
}
-bool CupsdConf::parseLocation(CupsLocation *location, QTextStream& file)
+bool CupsdConf::parseLocation(CupsLocation *location, TQTextStream& file)
{
QString line;
bool done(false);
@@ -479,10 +479,10 @@ bool CupsdConf::parseLocation(CupsLocation *location, QTextStream& file)
return value;
}
-bool CupsdConf::parseOption(const QString& line)
+bool CupsdConf::parseOption(const TQString& line)
{
int p(-1);
- QString keyword, value, l(line.simplifyWhiteSpace());
+ TQString keyword, value, l(line.simplifyWhiteSpace());
if ((p=l.find(' ')) != -1)
{
@@ -507,11 +507,11 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "browseprotocols")
{
browseprotocols_.clear();
- QStringList prots = QStringList::split(QRegExp("\\s"), value, false);
+ TQStringList prots = TQStringList::split(TQRegExp("\\s"), value, false);
if (prots.find("all") != prots.end())
browseprotocols_ << "CUPS" << "SLP";
else
- for (QStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it)
+ for (TQStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it)
browseprotocols_ << (*it).upper();
}
else if (keyword == "browserelay") browseaddresses_.append("Relay "+value);
@@ -540,12 +540,12 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "documentroot") documentdir_ = value;
else if (keyword == "errorlog") errorlog_ = value;
else if (keyword == "filterlimit") filterlimit_ = value.toInt();
- else if (keyword == "fontpath") fontpath_ += QStringList::split(':', value, false);
+ else if (keyword == "fontpath") fontpath_ += TQStringList::split(':', value, false);
else if (keyword == "group") group_ = value;
else if (keyword == "hideimplicitmembers") hideimplicitmembers_ = (value.lower() != "no");
else if (keyword == "hostnamelookups")
{
- QString h = value.lower();
+ TQString h = value.lower();
if (h == "on") hostnamelookup_ = HOSTNAME_ON;
else if (h == "double") hostnamelookup_ = HOSTNAME_DOUBLE;
else hostnamelookup_ = HOSTNAME_OFF;
@@ -557,7 +557,7 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "listen") listenaddresses_.append("Listen "+value);
else if (keyword == "loglevel")
{
- QString ll = value.lower();
+ TQString ll = value.lower();
if (ll == "none") loglevel_ = LOGLEVEL_NONE;
else if (ll == "error") loglevel_ = LOGLEVEL_ERROR;
else if (ll == "warn") loglevel_ = LOGLEVEL_WARN;
@@ -600,7 +600,7 @@ bool CupsdConf::parseOption(const QString& line)
else
{
// unrecognized option
- unknown_ << QPair<QString,QString>(keyword, value);
+ unknown_ << QPair<TQString,TQString>(keyword, value);
}
return true;
}
@@ -695,7 +695,7 @@ CupsLocation::CupsLocation()
resourcename_ = "";
authtype_ = AUTHTYPE_NONE;
authclass_ = AUTHCLASS_ANONYMOUS;
- authname_ = QString::null;
+ authname_ = TQString::null;
encryption_ = ENCRYPT_IFREQUESTED;
satisfy_ = SATISFY_ALL;
order_ = ORDER_ALLOW_DENY;
@@ -715,7 +715,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc)
{
}
-bool CupsLocation::parseResource(const QString& line)
+bool CupsLocation::parseResource(const TQString& line)
{
QString str = line.simplifyWhiteSpace();
int p1 = line.find(' '), p2 = line.find('>');
@@ -727,10 +727,10 @@ bool CupsLocation::parseResource(const QString& line)
else return false;
}
-bool CupsLocation::parseOption(const QString& line)
+bool CupsLocation::parseOption(const TQString& line)
{
int p(-1);
- QString keyword, value, l(line.simplifyWhiteSpace());
+ TQString keyword, value, l(line.simplifyWhiteSpace());
if ((p=l.find(' ')) != -1)
{
@@ -744,14 +744,14 @@ bool CupsLocation::parseOption(const QString& line)
if (keyword == "authtype")
{
- QString a = value.lower();
+ TQString a = value.lower();
if (a == "basic") authtype_ = AUTHTYPE_BASIC;
else if (a == "digest") authtype_ = AUTHTYPE_DIGEST;
else authtype_ = AUTHTYPE_NONE;
}
else if (keyword == "authclass")
{
- QString a = value.lower();
+ TQString a = value.lower();
if (a == "user") authclass_ = AUTHCLASS_USER;
else if (a == "system") authclass_ = AUTHCLASS_SYSTEM;
else if (a == "group") authclass_ = AUTHCLASS_GROUP;
@@ -764,7 +764,7 @@ bool CupsLocation::parseOption(const QString& line)
if (p != -1)
{
authname_ = value.mid(p+1);
- QString cl = value.left(p).lower();
+ TQString cl = value.left(p).lower();
if (cl == "user")
authclass_ = AUTHCLASS_USER;
else if (cl == "group")
@@ -776,7 +776,7 @@ bool CupsLocation::parseOption(const QString& line)
else if (keyword == "order") order_ = (value.lower() == "deny,allow" ? ORDER_DENY_ALLOW : ORDER_ALLOW_DENY);
else if (keyword == "encryption")
{
- QString e = value.lower();
+ TQString e = value.lower();
if (e == "always") encryption_ = ENCRYPT_ALWAYS;
else if (e == "never") encryption_ = ENCRYPT_NEVER;
else if (e == "required") encryption_ = ENCRYPT_REQUIRED;
@@ -794,19 +794,19 @@ CupsResource::CupsResource()
type_ = RESOURCE_GLOBAL;
}
-CupsResource::CupsResource(const QString& path)
+CupsResource::CupsResource(const TQString& path)
{
setPath(path);
}
-void CupsResource::setPath(const QString& path)
+void CupsResource::setPath(const TQString& path)
{
path_ = path;
type_ = typeFromPath(path_);
text_ = pathToText(path_);
}
-int CupsResource::typeFromText(const QString& text)
+int CupsResource::typeFromText(const TQString& text)
{
if (text == i18n("Base", "Root") || text == i18n("All printers") || text == i18n("All classes") || text == i18n("Print jobs")) return RESOURCE_GLOBAL;
else if (text == i18n("Administration")) return RESOURCE_ADMIN;
@@ -815,7 +815,7 @@ int CupsResource::typeFromText(const QString& text)
else return RESOURCE_PRINTER;
}
-int CupsResource::typeFromPath(const QString& path)
+int CupsResource::typeFromPath(const TQString& path)
{
if (path == "/admin") return RESOURCE_ADMIN;
else if (path == "/printers" || path == "/classes" || path == "/" || path == "/jobs") return RESOURCE_GLOBAL;
@@ -824,7 +824,7 @@ int CupsResource::typeFromPath(const QString& path)
else return RESOURCE_GLOBAL;
}
-QString CupsResource::textToPath(const QString& text)
+TQString CupsResource::textToPath(const TQString& text)
{
QString path("/");
if (text == i18n("Administration")) path = "/admin";
@@ -845,7 +845,7 @@ QString CupsResource::textToPath(const QString& text)
return path;
}
-QString CupsResource::pathToText(const QString& path)
+TQString CupsResource::pathToText(const TQString& path)
{
QString text(i18n("Base", "Root"));
if (path == "/admin") text = i18n("Administration");
@@ -868,17 +868,17 @@ QString CupsResource::pathToText(const QString& path)
return text;
}
-QString CupsResource::typeToIconName(int type)
+TQString CupsResource::typeToIconName(int type)
{
switch (type)
{
case RESOURCE_ADMIN:
case RESOURCE_GLOBAL:
- return QString("folder");
+ return TQString("folder");
case RESOURCE_PRINTER:
- return QString("kdeprint_printer");
+ return TQString("kdeprint_printer");
case RESOURCE_CLASS:
- return QString("kdeprint_printer_class");
+ return TQString("kdeprint_printer_class");
}
- return QString("folder");
+ return TQString("folder");
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.h b/kdeprint/cups/cupsdconf2/cupsdconf.h
index 3c53c5390..e58e52b31 100644
--- a/kdeprint/cups/cupsdconf2/cupsdconf.h
+++ b/kdeprint/cups/cupsdconf2/cupsdconf.h
@@ -20,11 +20,11 @@
#ifndef CUPSDCONF_H
#define CUPSDCONF_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
+#include <tqpair.h>
#include "cupsdcomment.h"
@@ -50,10 +50,10 @@ struct CupsdConf
CupsdConf();
~CupsdConf();
- bool loadFromFile(const QString& filename);
- bool saveToFile(const QString& filename);
- bool parseOption(const QString& line);
- bool parseLocation(CupsLocation *location, QTextStream& file);
+ bool loadFromFile(const TQString& filename);
+ bool saveToFile(const TQString& filename);
+ bool parseOption(const TQString& line);
+ bool parseLocation(CupsLocation *location, TQTextStream& file);
bool loadAvailableResources();
@@ -67,35 +67,35 @@ struct CupsdConf
QString servername_;
QString serveradmin_;
int classification_;
- QString otherclassname_;
+ TQString otherclassname_;
bool classoverride_;
- QString charset_;
- QString language_;
- QString printcap_;
+ TQString charset_;
+ TQString language_;
+ TQString printcap_;
int printcapformat_;
// Security
- QString remoteroot_;
- QString systemgroup_;
- QString encryptcert_;
- QString encryptkey_;
- QPtrList<CupsLocation> locations_;
- QPtrList<CupsResource> resources_;
+ TQString remoteroot_;
+ TQString systemgroup_;
+ TQString encryptcert_;
+ TQString encryptkey_;
+ TQPtrList<CupsLocation> locations_;
+ TQPtrList<CupsResource> resources_;
// Network
int hostnamelookup_;
bool keepalive_;
int keepalivetimeout_;
int maxclients_;
- QString maxrequestsize_;
+ TQString maxrequestsize_;
int clienttimeout_;
- QStringList listenaddresses_;
+ TQStringList listenaddresses_;
// Log
- QString accesslog_;
- QString errorlog_;
- QString pagelog_;
- QString maxlogsize_;
+ TQString accesslog_;
+ TQString errorlog_;
+ TQString pagelog_;
+ TQString maxlogsize_;
int loglevel_;
// Jobs
@@ -107,27 +107,27 @@ struct CupsdConf
int maxjobsperuser_;
// Filter
- QString user_;
- QString group_;
- QString ripcache_;
+ TQString user_;
+ TQString group_;
+ TQString ripcache_;
int filterlimit_;
// Directories
- QString datadir_;
- QString documentdir_;
- QStringList fontpath_;
- QString requestdir_;
- QString serverbin_;
- QString serverfiles_;
- QString tmpfiles_;
+ TQString datadir_;
+ TQString documentdir_;
+ TQStringList fontpath_;
+ TQString requestdir_;
+ TQString serverbin_;
+ TQString serverfiles_;
+ TQString tmpfiles_;
// Browsing
bool browsing_;
- QStringList browseprotocols_;
+ TQStringList browseprotocols_;
int browseport_;
int browseinterval_;
int browsetimeout_;
- QStringList browseaddresses_;
+ TQStringList browseaddresses_;
int browseorder_;
bool useimplicitclasses_;
bool hideimplicitmembers_;
@@ -138,7 +138,7 @@ struct CupsdConf
CupsdComment comments_;
// unrecognized options
- QValueList< QPair<QString,QString> > unknown_;
+ TQValueList< QPair<TQString,TQString> > unknown_;
};
struct CupsLocation
@@ -146,8 +146,8 @@ struct CupsLocation
CupsLocation();
CupsLocation(const CupsLocation& loc);
- bool parseOption(const QString& line);
- bool parseResource(const QString& line);
+ bool parseOption(const TQString& line);
+ bool parseResource(const TQString& line);
CupsResource *resource_;
QString resourcename_;
@@ -163,19 +163,19 @@ struct CupsLocation
struct CupsResource
{
CupsResource();
- CupsResource(const QString& path);
+ CupsResource(const TQString& path);
- void setPath(const QString& path);
+ void setPath(const TQString& path);
int type_;
QString path_;
QString text_;
- static QString textToPath(const QString& text);
- static QString pathToText(const QString& path);
- static int typeFromPath(const QString& path);
- static int typeFromText(const QString& text);
- static QString typeToIconName(int type);
+ static TQString textToPath(const TQString& text);
+ static TQString pathToText(const TQString& path);
+ static int typeFromPath(const TQString& path);
+ static int typeFromText(const TQString& text);
+ static TQString typeToIconName(int type);
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
index 92f8eef51..77f35e1e3 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
@@ -31,16 +31,16 @@
#include "cupsdbrowsingpage.h"
#include "cupsdsecuritypage.h"
-#include <qdir.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqvbox.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
#include <kio/passdlg.h>
#include <kguiitem.h>
#include <kprocess.h>
@@ -54,14 +54,14 @@ static QString pass_string;
extern "C"
{
#include "cups-util.h"
- KDEPRINT_EXPORT bool restartServer(QString& msg)
+ KDEPRINT_EXPORT bool restartServer(TQString& msg)
{
return CupsdDialog::restartServer(msg);
}
- KDEPRINT_EXPORT bool configureServer(QWidget *parent, QString& msg)
+ KDEPRINT_EXPORT bool configureServer(TQWidget *parent, TQString& msg)
{
dynamically_loaded = true;
- bool result = CupsdDialog::configure(QString::null, parent, &msg);
+ bool result = CupsdDialog::configure(TQString::null, parent, &msg);
dynamically_loaded = false;
return result;
}
@@ -69,7 +69,7 @@ extern "C"
int getServerPid()
{
- QDir dir("/proc",QString::null,QDir::Name,QDir::Dirs);
+ QDir dir("/proc",TQString::null,TQDir::Name,TQDir::Dirs);
for (uint i=0;i<dir.count();i++)
{
if (dir[i] == "." || dir[i] == ".." || dir[i] == "self") continue;
@@ -94,7 +94,7 @@ const char* getPassword(const char*)
QString user(cupsUser());
QString pass;
- if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == QDialog::Accepted)
+ if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == TQDialog::Accepted)
{
cupsSetUser(user.latin1());
pass_string = pass;
@@ -109,7 +109,7 @@ const char* getPassword(const char*)
//---------------------------------------------------
-CupsdDialog::CupsdDialog(QWidget *parent, const char *name)
+CupsdDialog::CupsdDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList, "", Ok|Cancel|User1, Ok, parent, name, true, true, KGuiItem(i18n("Short Help"), "help"))
{
KGlobal::iconLoader()->addAppDir("kdeprint");
@@ -135,14 +135,14 @@ CupsdDialog::~CupsdDialog()
void CupsdDialog::addConfPage(CupsdPage *page)
{
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
page->pixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
);
QVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon);
- page->reparent(box, QPoint(0,0));
+ page->reparent(box, TQPoint(0,0));
pagelist_.append(page);
}
@@ -165,7 +165,7 @@ void CupsdDialog::constructDialog()
}
}
-bool CupsdDialog::setConfigFile(const QString& filename)
+bool CupsdDialog::setConfigFile(const TQString& filename)
{
filename_ = filename;
if (!conf_->loadFromFile(filename_))
@@ -177,7 +177,7 @@ bool CupsdDialog::setConfigFile(const QString& filename)
{
// there were some unknown options, warn the user
QString msg;
- for (QValueList< QPair<QString,QString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it)
+ for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it)
msg += ((*it).first + " = " + (*it).second + "<br>");
msg.prepend("<p>" + i18n("Some options were not recognized by this configuration tool. "
"They will be left untouched and you won't be able to change them.") + "</p>");
@@ -195,7 +195,7 @@ bool CupsdDialog::setConfigFile(const QString& filename)
return true;
}
-bool CupsdDialog::restartServer(QString& msg)
+bool CupsdDialog::restartServer(TQString& msg)
{
int serverPid = getServerPid();
msg.truncate(0);
@@ -215,10 +215,10 @@ bool CupsdDialog::restartServer(QString& msg)
return (msg.isEmpty());
}
-bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *msg)
+bool CupsdDialog::configure(const TQString& filename, TQWidget *parent, TQString *msg)
{
bool needUpload(false);
- QString errormsg;
+ TQString errormsg;
bool result = true;
// init password dialog if needed
@@ -259,7 +259,7 @@ bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *m
CupsdDialog dlg(parent);
if (dlg.setConfigFile(fn) && dlg.exec())
{
- QCString encodedFn = QFile::encodeName(fn);
+ QCString encodedFn = TQFile::encodeName(fn);
if (!needUpload)
KMessageBox::information(parent,
i18n("The config file has not been uploaded to the "
@@ -276,7 +276,7 @@ bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *m
}
if (needUpload)
- QFile::remove(fn);
+ TQFile::remove(fn);
if ( msg )
*msg = errormsg;
@@ -314,7 +314,7 @@ void CupsdDialog::slotOk()
void CupsdDialog::slotUser1()
{
- QWhatsThis::enterWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
}
int CupsdDialog::serverPid()
@@ -338,7 +338,7 @@ int CupsdDialog::serverOwner()
str = t.readLine();
if (str.find("Uid:",0,false) == 0)
{
- QStringList list = QStringList::split('\t', str, false);
+ QStringList list = TQStringList::split('\t', str, false);
if (list.count() >= 2)
{
bool ok;
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.h b/kdeprint/cups/cupsdconf2/cupsddialog.h
index 4de5cd3dc..ed8a33613 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.h
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.h
@@ -21,7 +21,7 @@
#define CUPSDDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class CupsdPage;
struct CupsdConf;
@@ -30,13 +30,13 @@ class CupsdDialog : public KDialogBase
{
Q_OBJECT
public:
- CupsdDialog(QWidget *parent = 0, const char *name = 0);
+ CupsdDialog(TQWidget *parent = 0, const char *name = 0);
~CupsdDialog();
- bool setConfigFile(const QString& filename);
+ bool setConfigFile(const TQString& filename);
- static bool configure(const QString& filename = QString::null, QWidget *parent = 0, QString *errormsg = 0);
- static bool restartServer(QString& msg);
+ static bool configure(const TQString& filename = TQString::null, TQWidget *parent = 0, TQString *errormsg = 0);
+ static bool restartServer(TQString& msg);
static int serverPid();
static int serverOwner();
@@ -50,7 +50,7 @@ protected:
void restartServer();
private:
- QPtrList<CupsdPage> pagelist_;
+ TQPtrList<CupsdPage> pagelist_;
CupsdConf *conf_;
QString filename_;
};
diff --git a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
index 04a94c30a..75b979d3d 100644
--- a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
@@ -22,13 +22,13 @@
#include "qdirlineedit.h"
#include "qdirmultilineedit.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
+CupsdDirPage::CupsdDirPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Folders"));
@@ -43,15 +43,15 @@ CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
serverfiles_ = new QDirLineEdit(false, this);
tmpfiles_ = new QDirLineEdit(false, this);
- QLabel *l1 = new QLabel(i18n("Data folder:"), this);
- QLabel *l2 = new QLabel(i18n("Document folder:"), this);
- QLabel *l3 = new QLabel(i18n("Font path:"), this);
- QLabel *l4 = new QLabel(i18n("Request folder:"), this);
- QLabel *l5 = new QLabel(i18n("Server binaries:"), this);
- QLabel *l6 = new QLabel(i18n("Server files:"), this);
- QLabel *l7 = new QLabel(i18n("Temporary files:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Data folder:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Document folder:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Font path:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Request folder:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Server binaries:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Server files:"), this);
+ TQLabel *l7 = new TQLabel(i18n("Temporary files:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -70,7 +70,7 @@ CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
m1->addWidget(tmpfiles_, 6, 1);
}
-bool CupsdDirPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdDirPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
datadir_->setURL(conf_->datadir_);
@@ -84,7 +84,7 @@ bool CupsdDirPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdDirPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdDirPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->datadir_ = datadir_->url();
conf->documentdir_ = documentdir_->url();
@@ -99,11 +99,11 @@ bool CupsdDirPage::saveConfig(CupsdConf *conf, QString&)
void CupsdDirPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(datadir_, conf->comments_.toolTip("datadir"));
- QWhatsThis::add(documentdir_, conf->comments_.toolTip("documentroot"));
- QWhatsThis::add(fontpath_, conf->comments_.toolTip("fontpath"));
- QWhatsThis::add(requestdir_, conf->comments_.toolTip("requestroot"));
- QWhatsThis::add(serverbin_, conf->comments_.toolTip("serverbin"));
- QWhatsThis::add(serverfiles_, conf->comments_.toolTip("serverroot"));
- QWhatsThis::add(tmpfiles_, conf->comments_.toolTip("tempdir"));
+ TQWhatsThis::add(datadir_, conf->comments_.toolTip("datadir"));
+ TQWhatsThis::add(documentdir_, conf->comments_.toolTip("documentroot"));
+ TQWhatsThis::add(fontpath_, conf->comments_.toolTip("fontpath"));
+ TQWhatsThis::add(requestdir_, conf->comments_.toolTip("requestroot"));
+ TQWhatsThis::add(serverbin_, conf->comments_.toolTip("serverbin"));
+ TQWhatsThis::add(serverfiles_, conf->comments_.toolTip("serverroot"));
+ TQWhatsThis::add(tmpfiles_, conf->comments_.toolTip("tempdir"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsddirpage.h b/kdeprint/cups/cupsdconf2/cupsddirpage.h
index ffce797e8..6056f79c4 100644
--- a/kdeprint/cups/cupsdconf2/cupsddirpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsddirpage.h
@@ -28,10 +28,10 @@ class QDirMultiLineEdit;
class CupsdDirPage : public CupsdPage
{
public:
- CupsdDirPage(QWidget *parent = 0, const char *name = 0);
+ CupsdDirPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
index 12270bc26..b8458c10c 100644
--- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
@@ -21,24 +21,24 @@
#include "cupsdconf.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
+CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Filter"));
setHeader(i18n("Filter Settings"));
setPixmap("filter");
- user_ = new QLineEdit(this);
- group_ = new QLineEdit(this);
+ user_ = new TQLineEdit(this);
+ group_ = new TQLineEdit(this);
ripcache_ = new SizeWidget(this);
filterlimit_ = new KIntNumInput(this);
@@ -46,12 +46,12 @@ CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
filterlimit_->setSpecialValueText(i18n("Unlimited"));
filterlimit_->setSteps(1, 10);
- QLabel *l1 = new QLabel(i18n("User:"), this);
- QLabel *l2 = new QLabel(i18n("Group:"), this);
- QLabel *l3 = new QLabel(i18n("RIP cache:"), this);
- QLabel *l4 = new QLabel(i18n("Filter limit:"), this);
+ TQLabel *l1 = new TQLabel(i18n("User:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Group:"), this);
+ TQLabel *l3 = new TQLabel(i18n("RIP cache:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Filter limit:"), this);
- QGridLayout *m1 = new QGridLayout(this, 5, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 5, 2, 10, 7);
m1->setRowStretch(4, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -64,7 +64,7 @@ CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
m1->addWidget(filterlimit_, 3, 1);
}
-bool CupsdFilterPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdFilterPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
user_->setText(conf_->user_);
@@ -75,7 +75,7 @@ bool CupsdFilterPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdFilterPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdFilterPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->user_ = user_->text();
conf->group_ = group_->text();
@@ -87,8 +87,8 @@ bool CupsdFilterPage::saveConfig(CupsdConf *conf, QString&)
void CupsdFilterPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(user_, conf->comments_.toolTip("user"));
- QWhatsThis::add(group_, conf->comments_.toolTip("group"));
- QWhatsThis::add(ripcache_, conf->comments_.toolTip("ripcache"));
- QWhatsThis::add(filterlimit_, conf->comments_.toolTip("filterlimit"));
+ TQWhatsThis::add(user_, conf->comments_.toolTip("user"));
+ TQWhatsThis::add(group_, conf->comments_.toolTip("group"));
+ TQWhatsThis::add(ripcache_, conf->comments_.toolTip("ripcache"));
+ TQWhatsThis::add(filterlimit_, conf->comments_.toolTip("filterlimit"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
index 894777520..858b5e011 100644
--- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
@@ -30,10 +30,10 @@ class KIntNumInput;
class CupsdFilterPage : public CupsdPage
{
public:
- CupsdFilterPage(QWidget *parent = 0, const char *name = 0);
+ CupsdFilterPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
index bfb2832eb..52d9eaf15 100644
--- a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
@@ -20,24 +20,24 @@
#include "cupsdjobspage.h"
#include "cupsdconf.h"
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
+CupsdJobsPage::CupsdJobsPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Jobs"));
setHeader(i18n("Print Jobs Settings"));
setPixmap("fileprint");
- keepjobhistory_ = new QCheckBox(i18n("Preserve job history"), this);
- keepjobfiles_ = new QCheckBox(i18n("Preserve job files"), this);
- autopurgejobs_ = new QCheckBox(i18n("Auto purge jobs"), this);
+ keepjobhistory_ = new TQCheckBox(i18n("Preserve job history"), this);
+ keepjobfiles_ = new TQCheckBox(i18n("Preserve job files"), this);
+ autopurgejobs_ = new TQCheckBox(i18n("Auto purge jobs"), this);
maxjobs_ = new KIntNumInput(this);
maxjobsperprinter_ = new KIntNumInput(this);
maxjobsperuser_ = new KIntNumInput(this);
@@ -52,11 +52,11 @@ CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
maxjobsperuser_->setSpecialValueText(i18n("Unlimited"));
maxjobsperuser_->setSteps(1, 10);
- QLabel *l1 = new QLabel(i18n("Max jobs:"), this);
- QLabel *l2 = new QLabel(i18n("Max jobs per printer:"), this);
- QLabel *l3 = new QLabel(i18n("Max jobs per user:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Max jobs:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Max jobs per printer:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Max jobs per user:"), this);
- QGridLayout *m1 = new QGridLayout(this, 7, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 7, 2, 10, 7);
m1->setRowStretch(6, 1);
m1->setColStretch(1, 1);
m1->addWidget(keepjobhistory_, 0, 1);
@@ -69,11 +69,11 @@ CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
m1->addWidget(maxjobsperprinter_, 4, 1);
m1->addWidget(maxjobsperuser_, 5, 1);
- connect(keepjobhistory_, SIGNAL(toggled(bool)), SLOT(historyChanged(bool)));
+ connect(keepjobhistory_, TQT_SIGNAL(toggled(bool)), TQT_SLOT(historyChanged(bool)));
keepjobhistory_->setChecked(true);
}
-bool CupsdJobsPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdJobsPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
keepjobhistory_->setChecked(conf_->keepjobhistory_);
@@ -89,7 +89,7 @@ bool CupsdJobsPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdJobsPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdJobsPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->keepjobhistory_ = keepjobhistory_->isChecked();
if (conf->keepjobhistory_)
@@ -106,12 +106,12 @@ bool CupsdJobsPage::saveConfig(CupsdConf *conf, QString&)
void CupsdJobsPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(keepjobhistory_, conf->comments_.toolTip("preservejobhistory"));
- QWhatsThis::add(keepjobfiles_, conf->comments_.toolTip("preservejobfiles"));
- QWhatsThis::add(autopurgejobs_, conf->comments_.toolTip("autopurgejobs"));
- QWhatsThis::add(maxjobs_, conf->comments_.toolTip("maxjobs"));
- QWhatsThis::add(maxjobsperprinter_, conf->comments_.toolTip("maxjobsperprinter"));
- QWhatsThis::add(maxjobsperuser_, conf->comments_.toolTip("maxjobsperuser"));
+ TQWhatsThis::add(keepjobhistory_, conf->comments_.toolTip("preservejobhistory"));
+ TQWhatsThis::add(keepjobfiles_, conf->comments_.toolTip("preservejobfiles"));
+ TQWhatsThis::add(autopurgejobs_, conf->comments_.toolTip("autopurgejobs"));
+ TQWhatsThis::add(maxjobs_, conf->comments_.toolTip("maxjobs"));
+ TQWhatsThis::add(maxjobsperprinter_, conf->comments_.toolTip("maxjobsperprinter"));
+ TQWhatsThis::add(maxjobsperuser_, conf->comments_.toolTip("maxjobsperuser"));
}
void CupsdJobsPage::historyChanged(bool on)
diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.h b/kdeprint/cups/cupsdconf2/cupsdjobspage.h
index 19e76a2aa..f29721516 100644
--- a/kdeprint/cups/cupsdconf2/cupsdjobspage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.h
@@ -30,10 +30,10 @@ class CupsdJobsPage : public CupsdPage
Q_OBJECT
public:
- CupsdJobsPage(QWidget *parent = 0, const char *name = 0);
+ CupsdJobsPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
index 49840050e..032af5526 100644
--- a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
@@ -22,15 +22,15 @@
#include "qdirlineedit.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kfiledialog.h>
-CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
+CupsdLogPage::CupsdLogPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Log"));
@@ -41,7 +41,7 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
errorlog_ = new QDirLineEdit(true, this);
pagelog_ = new QDirLineEdit(true, this);
maxlogsize_ = new SizeWidget(this);
- loglevel_ = new QComboBox(this);
+ loglevel_ = new TQComboBox(this);
loglevel_->insertItem(i18n("Detailed Debugging"));
loglevel_->insertItem(i18n("Debug Information"));
@@ -55,15 +55,15 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
maxlogsize_->setSpecialValueText(i18n("Unlimited"));
maxlogsize_->setSuffix(i18n("MB"));*/
- QLabel *l1 = new QLabel(i18n("Access log:"), this);
- QLabel *l2 = new QLabel(i18n("Error log:"), this);
- QLabel *l3 = new QLabel(i18n("Page log:"), this);
- QLabel *l4 = new QLabel(i18n("Max log size:"), this);
- QLabel *l5 = new QLabel(i18n("Log level:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Access log:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Error log:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Page log:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Max log size:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Log level:"), this);
loglevel_->setCurrentItem(2);
- QGridLayout *m1 = new QGridLayout(this, 6, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7);
m1->setRowStretch(5, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -78,7 +78,7 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
m1->addWidget(loglevel_, 4, 1);
}
-bool CupsdLogPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdLogPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
accesslog_->setURL(conf_->accesslog_);
@@ -90,7 +90,7 @@ bool CupsdLogPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdLogPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdLogPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->accesslog_ = accesslog_->url();
conf->errorlog_ = errorlog_->url();
@@ -103,9 +103,9 @@ bool CupsdLogPage::saveConfig(CupsdConf *conf, QString&)
void CupsdLogPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(accesslog_, conf->comments_.toolTip("accesslog"));
- QWhatsThis::add(errorlog_, conf->comments_.toolTip("errorlog"));
- QWhatsThis::add(pagelog_, conf->comments_.toolTip("pagelog"));
- QWhatsThis::add(maxlogsize_, conf->comments_.toolTip("maxlogsize"));
- QWhatsThis::add(loglevel_, conf->comments_.toolTip("loglevel"));
+ TQWhatsThis::add(accesslog_, conf->comments_.toolTip("accesslog"));
+ TQWhatsThis::add(errorlog_, conf->comments_.toolTip("errorlog"));
+ TQWhatsThis::add(pagelog_, conf->comments_.toolTip("pagelog"));
+ TQWhatsThis::add(maxlogsize_, conf->comments_.toolTip("maxlogsize"));
+ TQWhatsThis::add(loglevel_, conf->comments_.toolTip("loglevel"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.h b/kdeprint/cups/cupsdconf2/cupsdlogpage.h
index 68e15ff45..de7826827 100644
--- a/kdeprint/cups/cupsdconf2/cupsdlogpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.h
@@ -29,10 +29,10 @@ class QComboBox;
class CupsdLogPage : public CupsdPage
{
public:
- CupsdLogPage(QWidget *parent = 0, const char *name = 0);
+ CupsdLogPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
index 6b0f196b5..3cc360150 100644
--- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
@@ -23,28 +23,28 @@
#include "portdialog.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
+CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Network"));
setHeader(i18n("Network Settings"));
setPixmap("network");
- keepalive_ = new QCheckBox(i18n("Keep alive"), this);
+ keepalive_ = new TQCheckBox(i18n("Keep alive"), this);
keepalivetimeout_ = new KIntNumInput(this);
maxclients_ = new KIntNumInput(this);
maxrequestsize_ = new SizeWidget(this);
clienttimeout_ = new KIntNumInput(this);
- hostnamelookup_ = new QComboBox(this);
+ hostnamelookup_ = new TQComboBox(this);
listen_ = new EditList(this);
keepalivetimeout_->setRange(0, 10000, 1, true);
@@ -64,14 +64,14 @@ CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
hostnamelookup_->insertItem(i18n("On"));
hostnamelookup_->insertItem(i18n("Double"));
- QLabel *l1 = new QLabel(i18n("Hostname lookups:"), this);
- QLabel *l2 = new QLabel(i18n("Keep-alive timeout:"), this);
- QLabel *l3 = new QLabel(i18n("Max clients:"), this);
- QLabel *l4 = new QLabel(i18n("Max request size:"), this);
- QLabel *l5 = new QLabel(i18n("Client timeout:"), this);
- QLabel *l6 = new QLabel(i18n("Listen to:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Hostname lookups:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Keep-alive timeout:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Max clients:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Max request size:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Client timeout:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Listen to:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -88,14 +88,14 @@ CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
m1->addWidget(clienttimeout_, 5, 1);
m1->addWidget(listen_, 6, 1);
- connect(listen_, SIGNAL(add()), SLOT(slotAdd()));
- connect(listen_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(listen_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(keepalive_, SIGNAL(toggled(bool)), keepalivetimeout_, SLOT(setEnabled(bool)));
+ connect(listen_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(listen_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(listen_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(keepalive_, TQT_SIGNAL(toggled(bool)), keepalivetimeout_, TQT_SLOT(setEnabled(bool)));
keepalive_->setChecked(true);
}
-bool CupsdNetworkPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdNetworkPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
hostnamelookup_->setCurrentItem(conf_->hostnamelookup_);
@@ -109,7 +109,7 @@ bool CupsdNetworkPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdNetworkPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdNetworkPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->hostnamelookup_ = hostnamelookup_->currentItem();
conf->keepalive_ = keepalive_->isChecked();
@@ -124,13 +124,13 @@ bool CupsdNetworkPage::saveConfig(CupsdConf *conf, QString&)
void CupsdNetworkPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(hostnamelookup_, conf->comments_.toolTip("hostnamelookups"));
- QWhatsThis::add(keepalive_, conf->comments_.toolTip("keepalive"));
- QWhatsThis::add(keepalivetimeout_, conf->comments_.toolTip("keepalivetimeout"));
- QWhatsThis::add(maxclients_, conf->comments_.toolTip("maxclients"));
- QWhatsThis::add(maxrequestsize_, conf->comments_.toolTip("maxrequestsize"));
- QWhatsThis::add(clienttimeout_, conf->comments_.toolTip("timeout"));
- QWhatsThis::add(listen_, conf->comments_.toolTip("listen"));
+ TQWhatsThis::add(hostnamelookup_, conf->comments_.toolTip("hostnamelookups"));
+ TQWhatsThis::add(keepalive_, conf->comments_.toolTip("keepalive"));
+ TQWhatsThis::add(keepalivetimeout_, conf->comments_.toolTip("keepalivetimeout"));
+ TQWhatsThis::add(maxclients_, conf->comments_.toolTip("maxclients"));
+ TQWhatsThis::add(maxrequestsize_, conf->comments_.toolTip("maxrequestsize"));
+ TQWhatsThis::add(clienttimeout_, conf->comments_.toolTip("timeout"));
+ TQWhatsThis::add(listen_, conf->comments_.toolTip("listen"));
}
void CupsdNetworkPage::slotAdd()
@@ -142,7 +142,7 @@ void CupsdNetworkPage::slotAdd()
void CupsdNetworkPage::slotEdit(int index)
{
- QString s = listen_->text(index);
+ TQString s = listen_->text(index);
s = PortDialog::editListen(s, this, conf_);
if (!s.isEmpty())
listen_->setText(index, s);
diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
index c4c8bd450..82b728982 100644
--- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
@@ -33,10 +33,10 @@ class CupsdNetworkPage : public CupsdPage
Q_OBJECT
public:
- CupsdNetworkPage(QWidget *parent = 0, const char *name = 0);
+ CupsdNetworkPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.cpp b/kdeprint/cups/cupsdconf2/cupsdpage.cpp
index 00798552c..e4a47bf1f 100644
--- a/kdeprint/cups/cupsdconf2/cupsdpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdpage.cpp
@@ -19,8 +19,8 @@
#include "cupsdpage.h"
-CupsdPage::CupsdPage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+CupsdPage::CupsdPage(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
conf_ = 0;
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.h b/kdeprint/cups/cupsdconf2/cupsdpage.h
index dedd53ade..e503319ca 100644
--- a/kdeprint/cups/cupsdconf2/cupsdpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdpage.h
@@ -20,7 +20,7 @@
#ifndef CUPSDPAGE_H
#define CUPSDPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
struct CupsdConf;
@@ -28,21 +28,21 @@ class CupsdPage : public QWidget
{
Q_OBJECT
public:
- CupsdPage(QWidget *parent = 0, const char *name = 0);
+ CupsdPage(TQWidget *parent = 0, const char *name = 0);
virtual ~CupsdPage();
- virtual bool loadConfig(CupsdConf *conf, QString& msg) = 0;
- virtual bool saveConfig(CupsdConf *conf, QString& msg) = 0;
+ virtual bool loadConfig(CupsdConf *conf, TQString& msg) = 0;
+ virtual bool saveConfig(CupsdConf *conf, TQString& msg) = 0;
virtual void setInfos(CupsdConf*) {}
- QString pageLabel() const { return label_; }
- QString header() const { return header_; }
- QString pixmap() const { return pixmap_; }
+ TQString pageLabel() const { return label_; }
+ TQString header() const { return header_; }
+ TQString pixmap() const { return pixmap_; }
protected:
- void setPageLabel(const QString& s) { label_ = s; }
- void setHeader(const QString& s) { header_ = s; }
- void setPixmap(const QString& s) { pixmap_ = s; }
+ void setPageLabel(const TQString& s) { label_ = s; }
+ void setHeader(const TQString& s) { header_ = s; }
+ void setPixmap(const TQString& s) { pixmap_ = s; }
protected:
CupsdConf *conf_;
diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
index a77f21708..0bf290fb9 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
@@ -23,16 +23,16 @@
#include "editlist.h"
#include "locationdialog.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
+CupsdSecurityPage::CupsdSecurityPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Security"));
@@ -40,19 +40,19 @@ CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
setPixmap("password");
locs_.setAutoDelete(true);
- remoteroot_ = new QLineEdit(this);
- systemgroup_ = new QLineEdit(this);
+ remoteroot_ = new TQLineEdit(this);
+ systemgroup_ = new TQLineEdit(this);
encryptcert_ = new QDirLineEdit(true, this);
encryptkey_ = new QDirLineEdit(true, this);
locations_ = new EditList(this);
- QLabel *l1 = new QLabel(i18n("Remote root user:"), this);
- QLabel *l2 = new QLabel(i18n("System group:"), this);
- QLabel *l3 = new QLabel(i18n("Encryption certificate:"), this);
- QLabel *l4 = new QLabel(i18n("Encryption key:"), this);
- QLabel *l5 = new QLabel(i18n("Locations:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Remote root user:"), this);
+ TQLabel *l2 = new TQLabel(i18n("System group:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Encryption certificate:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Encryption key:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Locations:"), this);
- QGridLayout *m1 = new QGridLayout(this, 6, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7);
m1->setRowStretch(5, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -66,13 +66,13 @@ CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
m1->addWidget(encryptkey_, 3, 1);
m1->addWidget(locations_, 4, 1);
- connect(locations_, SIGNAL(add()), SLOT(slotAdd()));
- connect(locations_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(locations_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(locations_, SIGNAL(deleted(int)), SLOT(slotDeleted(int)));
+ connect(locations_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(locations_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(locations_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(locations_, TQT_SIGNAL(deleted(int)), TQT_SLOT(slotDeleted(int)));
}
-bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdSecurityPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
remoteroot_->setText(conf_->remoteroot_);
@@ -80,7 +80,7 @@ bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
encryptcert_->setURL(conf_->encryptcert_);
encryptkey_->setURL(conf_->encryptkey_);
locs_.clear();
- QPtrListIterator<CupsLocation> it(conf_->locations_);
+ TQPtrListIterator<CupsLocation> it(conf_->locations_);
for (;it.current();++it)
{
locs_.append(new CupsLocation(*(it.current())));
@@ -93,14 +93,14 @@ bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdSecurityPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdSecurityPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->remoteroot_ = remoteroot_->text();
conf->systemgroup_ = systemgroup_->text();
conf->encryptcert_ = encryptcert_->url();
conf->encryptkey_ = encryptkey_->url();
conf->locations_.clear();
- QPtrListIterator<CupsLocation> it(locs_);
+ TQPtrListIterator<CupsLocation> it(locs_);
for (;it.current();++it)
conf->locations_.append(new CupsLocation(*(it.current())));
@@ -109,11 +109,11 @@ bool CupsdSecurityPage::saveConfig(CupsdConf *conf, QString&)
void CupsdSecurityPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(remoteroot_, conf->comments_.toolTip("remoteroot"));
- QWhatsThis::add(systemgroup_, conf->comments_.toolTip("systemgroup"));
- QWhatsThis::add(encryptcert_, conf->comments_.toolTip("servercertificate"));
- QWhatsThis::add(encryptkey_, conf->comments_.toolTip("serverkey"));
- QWhatsThis::add(locations_, conf->comments_.toolTip("locationsshort"));
+ TQWhatsThis::add(remoteroot_, conf->comments_.toolTip("remoteroot"));
+ TQWhatsThis::add(systemgroup_, conf->comments_.toolTip("systemgroup"));
+ TQWhatsThis::add(encryptcert_, conf->comments_.toolTip("servercertificate"));
+ TQWhatsThis::add(encryptkey_, conf->comments_.toolTip("serverkey"));
+ TQWhatsThis::add(locations_, conf->comments_.toolTip("locationsshort"));
}
void CupsdSecurityPage::slotAdd()
@@ -125,7 +125,7 @@ void CupsdSecurityPage::slotAdd()
for (locs_.first(); locs_.current(); locs_.next())
if (locs_.current()->resource_ == loc->resource_)
{
- if (KMessageBox::warningContinueCancel(this, i18n("This location is already defined. Do you want to replace the existing one?"),QString::null,i18n("Replace")) == KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel(this, i18n("This location is already defined. Do you want to replace the existing one?"),TQString::null,i18n("Replace")) == KMessageBox::Continue)
{
index = locs_.at();
locs_.remove();
diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
index 56a9e2e45..e0bcfc6da 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
@@ -21,7 +21,7 @@
#define CUPSDSECURITYPAGE_H
#include "cupsdpage.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QLineEdit;
class EditList;
@@ -33,10 +33,10 @@ class CupsdSecurityPage : public CupsdPage
Q_OBJECT
public:
- CupsdSecurityPage(QWidget *parent = 0, const char *name = 0);
+ CupsdSecurityPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
@@ -50,7 +50,7 @@ private:
QDirLineEdit *encryptcert_, *encryptkey_;
EditList *locations_;
- QPtrList<CupsLocation> locs_;
+ TQPtrList<CupsLocation> locs_;
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
index 861dad9de..cc0804f5b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
@@ -20,16 +20,16 @@
#include "cupsdserverpage.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-int findComboItem(QComboBox *cb, const QString& str)
+int findComboItem(TQComboBox *cb, const TQString& str)
{
for (int i=0; i<cb->count(); i++)
if (cb->text(i) == str)
@@ -37,22 +37,22 @@ int findComboItem(QComboBox *cb, const QString& str)
return (-1);
}
-CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
+CupsdServerPage::CupsdServerPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Server"));
setHeader(i18n("Server Settings"));
setPixmap("gear");
- servername_ = new QLineEdit(this);
- serveradmin_ = new QLineEdit(this);
- otherclassname_ = new QLineEdit(this);
- language_ = new QLineEdit(this);
- printcap_ = new QLineEdit(this);
- classification_ = new QComboBox(this);
- charset_ = new QComboBox(this);
- printcapformat_ = new QComboBox(this);
- classoverride_ = new QCheckBox(i18n("Allow overrides"), this);
+ servername_ = new TQLineEdit(this);
+ serveradmin_ = new TQLineEdit(this);
+ otherclassname_ = new TQLineEdit(this);
+ language_ = new TQLineEdit(this);
+ printcap_ = new TQLineEdit(this);
+ classification_ = new TQComboBox(this);
+ charset_ = new TQComboBox(this);
+ printcapformat_ = new TQComboBox(this);
+ classoverride_ = new TQCheckBox(i18n("Allow overrides"), this);
classification_->insertItem(i18n("None"));
classification_->insertItem(i18n("Classified"));
@@ -80,21 +80,21 @@ CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
printcapformat_->insertItem("BSD");
printcapformat_->insertItem("SOLARIS");
- QLabel *l1 = new QLabel(i18n("Server name:"), this);
- QLabel *l2 = new QLabel(i18n("Server administrator:"), this);
- QLabel *l3 = new QLabel(i18n("Classification:"), this);
- QLabel *l4 = new QLabel(i18n("Default character set:"), this);
- QLabel *l5 = new QLabel(i18n("Default language:"), this);
- QLabel *l6 = new QLabel(i18n("Printcap file:"), this);
- QLabel *l7 = new QLabel(i18n("Printcap format:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Server name:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Server administrator:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Classification:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Default character set:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Default language:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Printcap file:"), this);
+ TQLabel *l7 = new TQLabel(i18n("Printcap format:"), this);
- connect(classification_, SIGNAL(activated(int)), SLOT(classChanged(int)));
+ connect(classification_, TQT_SIGNAL(activated(int)), TQT_SLOT(classChanged(int)));
classification_->setCurrentItem(0);
charset_->setCurrentItem(0);
printcapformat_->setCurrentItem(0);
classChanged(0);
- QGridLayout *m1 = new QGridLayout(this, 9, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 9, 2, 10, 7);
m1->setRowStretch(8, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -110,19 +110,19 @@ CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
m1->addWidget(language_, 5, 1);
m1->addWidget(printcap_, 6, 1);
m1->addWidget(printcapformat_, 7, 1);
- QHBoxLayout *m2 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 5);
m1->addLayout(m2, 2, 1);
m2->addWidget(classification_);
m2->addWidget(otherclassname_);
- QWidget *w = new QWidget(this);
+ QWidget *w = new TQWidget(this);
w->setFixedWidth(20);
- QHBoxLayout *m3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *m3 = new TQHBoxLayout(0, 0, 0);
m1->addLayout(m3, 3, 1);
m3->addWidget(w);
m3->addWidget(classoverride_);
}
-bool CupsdServerPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdServerPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
servername_->setText(conf_->servername_);
@@ -143,7 +143,7 @@ bool CupsdServerPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdServerPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdServerPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->servername_ = servername_->text();
conf->serveradmin_ = serveradmin_->text();
@@ -162,14 +162,14 @@ bool CupsdServerPage::saveConfig(CupsdConf *conf, QString&)
void CupsdServerPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(servername_, conf->comments_.toolTip("servername"));
- QWhatsThis::add(serveradmin_, conf->comments_.toolTip("serveradmin"));
- QWhatsThis::add(classification_, conf->comments_.toolTip("classification"));
- QWhatsThis::add(classoverride_, conf->comments_.toolTip("classifyoverride"));
- QWhatsThis::add(charset_, conf->comments_.toolTip("defaultcharset"));
- QWhatsThis::add(language_, conf->comments_.toolTip("defaultlanguage"));
- QWhatsThis::add(printcap_, conf->comments_.toolTip("printcap"));
- QWhatsThis::add(printcapformat_, conf->comments_.toolTip("printcapformat"));
+ TQWhatsThis::add(servername_, conf->comments_.toolTip("servername"));
+ TQWhatsThis::add(serveradmin_, conf->comments_.toolTip("serveradmin"));
+ TQWhatsThis::add(classification_, conf->comments_.toolTip("classification"));
+ TQWhatsThis::add(classoverride_, conf->comments_.toolTip("classifyoverride"));
+ TQWhatsThis::add(charset_, conf->comments_.toolTip("defaultcharset"));
+ TQWhatsThis::add(language_, conf->comments_.toolTip("defaultlanguage"));
+ TQWhatsThis::add(printcap_, conf->comments_.toolTip("printcap"));
+ TQWhatsThis::add(printcapformat_, conf->comments_.toolTip("printcapformat"));
}
void CupsdServerPage::classChanged(int index)
diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.h b/kdeprint/cups/cupsdconf2/cupsdserverpage.h
index d82367c30..e7aeee196 100644
--- a/kdeprint/cups/cupsdconf2/cupsdserverpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.h
@@ -31,10 +31,10 @@ class CupsdServerPage : public CupsdPage
Q_OBJECT
public:
- CupsdServerPage(QWidget *parent = 0, const char *name = 0);
+ CupsdServerPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
index 7a623e972..9dd7581a8 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
@@ -19,33 +19,33 @@
#include "cupsdsplash.h"
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kstandarddirs.h>
-CupsdSplash::CupsdSplash(QWidget *parent, const char *name)
+CupsdSplash::CupsdSplash(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setHeader(i18n("Welcome to the CUPS Server Configuration Tool"));
setPageLabel(i18n("Welcome"));
setPixmap("go");
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 10);
- QHBoxLayout *sub_ = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10);
+ QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10);
main_->addLayout(sub_);
- QLabel *cupslogo_ = new QLabel(this);
- QString logopath = locate("data", QString("kdeprint/cups_logo.png"));
- cupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
+ QLabel *cupslogo_ = new TQLabel(this);
+ QString logopath = locate("data", TQString("kdeprint/cups_logo.png"));
+ cupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath));
cupslogo_->setAlignment(Qt::AlignCenter);
- QLabel *kupslogo_ = new QLabel(this);
- logopath = locate("data", QString("kdeprint/kde_logo.png"));
- kupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
+ QLabel *kupslogo_ = new TQLabel(this);
+ logopath = locate("data", TQString("kdeprint/kde_logo.png"));
+ kupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath));
kupslogo_->setAlignment(Qt::AlignCenter);
- QLabel *helptxt_ = new QLabel(this);
+ QLabel *helptxt_ = new TQLabel(this);
helptxt_->setText(i18n( "<p>This tool will help you to configure graphically the server of the CUPS printing system. "
"The available options are grouped into sets of related topics and can be accessed "
"quickly through the icon view located on the left. Each option has a default value that is "
@@ -62,12 +62,12 @@ CupsdSplash::~CupsdSplash()
{
}
-bool CupsdSplash::loadConfig(CupsdConf*, QString&)
+bool CupsdSplash::loadConfig(CupsdConf*, TQString&)
{
return true;
}
-bool CupsdSplash::saveConfig(CupsdConf*, QString&)
+bool CupsdSplash::saveConfig(CupsdConf*, TQString&)
{
return true;
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.h b/kdeprint/cups/cupsdconf2/cupsdsplash.h
index ed548948d..9acf27395 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsplash.h
+++ b/kdeprint/cups/cupsdconf2/cupsdsplash.h
@@ -25,11 +25,11 @@
class CupsdSplash : public CupsdPage
{
public:
- CupsdSplash(QWidget *parent = 0, const char *name = 0);
+ CupsdSplash(TQWidget *parent = 0, const char *name = 0);
~CupsdSplash();
- bool loadConfig(CupsdConf *conf, QString& msg);
- bool saveConfig(CupsdConf *conf, QString& msg);
+ bool loadConfig(CupsdConf *conf, TQString& msg);
+ bool saveConfig(CupsdConf *conf, TQString& msg);
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/editlist.cpp b/kdeprint/cups/cupsdconf2/editlist.cpp
index 4c924dbb4..a91fdc3d3 100644
--- a/kdeprint/cups/cupsdconf2/editlist.cpp
+++ b/kdeprint/cups/cupsdconf2/editlist.cpp
@@ -21,13 +21,13 @@
#include <klistbox.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kguiitem.h>
-EditList::EditList(QWidget *parent, const char *name)
- : QWidget(parent, name)
+EditList::EditList(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
list_ = new KListBox(this);
addbtn_ = new KPushButton(KGuiItem(i18n("Add..."), "filenew"), this);
@@ -35,7 +35,7 @@ EditList::EditList(QWidget *parent, const char *name)
delbtn_ = new KPushButton(KGuiItem(i18n("Delete"), "editdelete"), this);
defbtn_ = new KPushButton(KGuiItem(i18n("Default List"), "history"), this);
- QGridLayout *m1 = new QGridLayout(this, 4, 2, 0, 0);
+ TQGridLayout *m1 = new TQGridLayout(this, 4, 2, 0, 0);
m1->setColStretch(0, 1);
m1->addMultiCellWidget(list_, 0, 3, 0, 1);
m1->addWidget(addbtn_, 0, 1);
@@ -43,11 +43,11 @@ EditList::EditList(QWidget *parent, const char *name)
m1->addWidget(delbtn_, 2, 1);
m1->addWidget(defbtn_, 3, 1);
- connect(addbtn_, SIGNAL(clicked()), SIGNAL(add()));
- connect(editbtn_, SIGNAL(clicked()), SLOT(slotEdit()));
- connect(delbtn_, SIGNAL(clicked()), SLOT(slotDelete()));
- connect(defbtn_, SIGNAL(clicked()), SIGNAL(defaultList()));
- connect(list_, SIGNAL(highlighted(int)), SLOT(slotSelected(int)));
+ connect(addbtn_, TQT_SIGNAL(clicked()), TQT_SIGNAL(add()));
+ connect(editbtn_, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
+ connect(delbtn_, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete()));
+ connect(defbtn_, TQT_SIGNAL(clicked()), TQT_SIGNAL(defaultList()));
+ connect(list_, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotSelected(int)));
slotSelected(-1);
}
@@ -72,12 +72,12 @@ void EditList::slotSelected(int index)
delbtn_->setEnabled(index >= 0);
}
-QString EditList::text(int index)
+TQString EditList::text(int index)
{
return list_->text(index);
}
-void EditList::setText(int index, const QString& s)
+void EditList::setText(int index, const TQString& s)
{
if (list_->text(index) != s)
{
@@ -95,27 +95,27 @@ void EditList::clear()
slotSelected(-1);
}
-void EditList::insertItem(const QString& s)
+void EditList::insertItem(const TQString& s)
{
if (!list_->findItem(s, Qt::ExactMatch))
list_->insertItem(s);
}
-void EditList::insertItem(const QPixmap& icon, const QString& s)
+void EditList::insertItem(const TQPixmap& icon, const TQString& s)
{
if (!list_->findItem(s, Qt::ExactMatch))
list_->insertItem(icon, s);
}
-void EditList::insertItems(const QStringList& l)
+void EditList::insertItems(const TQStringList& l)
{
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
insertItem(*it);
}
-QStringList EditList::items()
+TQStringList EditList::items()
{
- QStringList l;
+ TQStringList l;
for (uint i=0; i<list_->count(); i++)
l << list_->text(i);
return l;
diff --git a/kdeprint/cups/cupsdconf2/editlist.h b/kdeprint/cups/cupsdconf2/editlist.h
index 773667304..30c31d731 100644
--- a/kdeprint/cups/cupsdconf2/editlist.h
+++ b/kdeprint/cups/cupsdconf2/editlist.h
@@ -20,8 +20,8 @@
#ifndef EDITLIST_H
#define EDITLIST_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
class KListBox;
class QPushButton;
@@ -31,14 +31,14 @@ class EditList : public QWidget
Q_OBJECT
public:
- EditList(QWidget *parent = 0, const char *name = 0);
-
- QString text(int);
- void setText(int, const QString&);
- void insertItem(const QString&);
- void insertItem(const QPixmap&, const QString&);
- void insertItems(const QStringList&);
- QStringList items();
+ EditList(TQWidget *parent = 0, const char *name = 0);
+
+ TQString text(int);
+ void setText(int, const TQString&);
+ void insertItem(const TQString&);
+ void insertItem(const TQPixmap&, const TQString&);
+ void insertItems(const TQStringList&);
+ TQStringList items();
void clear();
signals:
diff --git a/kdeprint/cups/cupsdconf2/locationdialog.cpp b/kdeprint/cups/cupsdconf2/locationdialog.cpp
index fc5c55076..d360d62e2 100644
--- a/kdeprint/cups/cupsdconf2/locationdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/locationdialog.cpp
@@ -22,28 +22,28 @@
#include "editlist.h"
#include "addressdialog.h"
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
-LocationDialog::LocationDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+LocationDialog::LocationDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- resource_ = new QComboBox(dummy);
- authtype_ = new QComboBox(dummy);
- authclass_ = new QComboBox(dummy);
- authname_ = new QLineEdit(dummy);
- encryption_ = new QComboBox(dummy);
- satisfy_ = new QComboBox(dummy);
- order_ = new QComboBox(dummy);
+ resource_ = new TQComboBox(dummy);
+ authtype_ = new TQComboBox(dummy);
+ authclass_ = new TQComboBox(dummy);
+ authname_ = new TQLineEdit(dummy);
+ encryption_ = new TQComboBox(dummy);
+ satisfy_ = new TQComboBox(dummy);
+ order_ = new TQComboBox(dummy);
addresses_ = new EditList(dummy);
authtype_->insertItem(i18n("None"));
@@ -66,19 +66,19 @@ LocationDialog::LocationDialog(QWidget *parent, const char *name)
order_->insertItem(i18n("Allow, Deny"));
order_->insertItem(i18n("Deny, Allow"));
- connect(authclass_, SIGNAL(activated(int)), SLOT(slotClassChanged(int)));
- connect(authtype_, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
+ connect(authclass_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotClassChanged(int)));
+ connect(authtype_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
- QLabel *l1 = new QLabel(i18n("Resource:"), dummy);
- QLabel *l2 = new QLabel(i18n("Authentication:"), dummy);
- QLabel *l3 = new QLabel(i18n("Class:"), dummy);
- QLabel *l4 = new QLabel(i18n("Names:"), dummy);
- QLabel *l5 = new QLabel(i18n("Encryption:"), dummy);
- QLabel *l6 = new QLabel(i18n("Satisfy:"), dummy);
- QLabel *l7 = new QLabel(i18n("ACL order:"), dummy);
- QLabel *l8 = new QLabel(i18n("ACL addresses:"),dummy);
+ QLabel *l1 = new TQLabel(i18n("Resource:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("Authentication:"), dummy);
+ QLabel *l3 = new TQLabel(i18n("Class:"), dummy);
+ QLabel *l4 = new TQLabel(i18n("Names:"), dummy);
+ QLabel *l5 = new TQLabel(i18n("Encryption:"), dummy);
+ QLabel *l6 = new TQLabel(i18n("Satisfy:"), dummy);
+ QLabel *l7 = new TQLabel(i18n("ACL order:"), dummy);
+ QLabel *l8 = new TQLabel(i18n("ACL addresses:"),dummy);
- QGridLayout *m1 = new QGridLayout(dummy, 8, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(dummy, 8, 2, 0, 5);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -104,26 +104,26 @@ LocationDialog::LocationDialog(QWidget *parent, const char *name)
slotClassChanged(AUTHCLASS_ANONYMOUS);
encryption_->setCurrentItem(ENCRYPT_IFREQUESTED);
- connect(addresses_, SIGNAL(add()), SLOT(slotAdd()));
- connect(addresses_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(addresses_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
+ connect(addresses_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(addresses_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(addresses_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
}
void LocationDialog::setInfos(CupsdConf *conf)
{
conf_ = conf;
- QPtrListIterator<CupsResource> it(conf->resources_);
+ TQPtrListIterator<CupsResource> it(conf->resources_);
for (; it.current(); ++it)
resource_->insertItem(SmallIcon(it.current()->typeToIconName(it.current()->type_)), it.current()->text_);
- QWhatsThis::add(encryption_, conf_->comments_.toolTip("encryption"));
- QWhatsThis::add(order_, conf_->comments_.toolTip("order"));
- QWhatsThis::add(authclass_, conf_->comments_.toolTip("authclass"));
- QWhatsThis::add(authtype_, conf_->comments_.toolTip("authtype"));
- QWhatsThis::add(authname_, conf_->comments_.toolTip("authname"));
- QWhatsThis::add(satisfy_, conf_->comments_.toolTip("satisfy"));
- QWhatsThis::add(addresses_, conf_->comments_.toolTip("allowdeny"));
+ TQWhatsThis::add(encryption_, conf_->comments_.toolTip("encryption"));
+ TQWhatsThis::add(order_, conf_->comments_.toolTip("order"));
+ TQWhatsThis::add(authclass_, conf_->comments_.toolTip("authclass"));
+ TQWhatsThis::add(authtype_, conf_->comments_.toolTip("authtype"));
+ TQWhatsThis::add(authname_, conf_->comments_.toolTip("authname"));
+ TQWhatsThis::add(satisfy_, conf_->comments_.toolTip("satisfy"));
+ TQWhatsThis::add(addresses_, conf_->comments_.toolTip("allowdeny"));
}
void LocationDialog::fillLocation(CupsLocation *loc)
@@ -132,7 +132,7 @@ void LocationDialog::fillLocation(CupsLocation *loc)
loc->resourcename_ = loc->resource_->path_;
loc->authtype_ = authtype_->currentItem();
loc->authclass_ = (loc->authtype_ == AUTHTYPE_NONE ? AUTHCLASS_ANONYMOUS : authclass_->currentItem());
- loc->authname_ = (loc->authclass_ == AUTHCLASS_USER || loc->authclass_ == AUTHCLASS_GROUP ? authname_->text() : QString::null);
+ loc->authname_ = (loc->authclass_ == AUTHCLASS_USER || loc->authclass_ == AUTHCLASS_GROUP ? authname_->text() : TQString::null);
loc->encryption_ = encryption_->currentItem();
loc->satisfy_ = satisfy_->currentItem();
loc->order_ = order_->currentItem();
@@ -169,7 +169,7 @@ void LocationDialog::slotClassChanged(int index)
authname_->setEnabled((index == AUTHCLASS_USER || index == AUTHCLASS_GROUP));
}
-bool LocationDialog::newLocation(CupsLocation *loc, QWidget *parent, CupsdConf *conf)
+bool LocationDialog::newLocation(CupsLocation *loc, TQWidget *parent, CupsdConf *conf)
{
LocationDialog dlg(parent);
if (conf)
@@ -183,7 +183,7 @@ bool LocationDialog::newLocation(CupsLocation *loc, QWidget *parent, CupsdConf *
return false;
}
-bool LocationDialog::editLocation(CupsLocation *loc, QWidget *parent, CupsdConf *conf)
+bool LocationDialog::editLocation(CupsLocation *loc, TQWidget *parent, CupsdConf *conf)
{
LocationDialog dlg(parent);
if (conf)
@@ -201,14 +201,14 @@ bool LocationDialog::editLocation(CupsLocation *loc, QWidget *parent, CupsdConf
void LocationDialog::slotAdd()
{
- QString addr = AddressDialog::newAddress(this);
+ TQString addr = AddressDialog::newAddress(this);
if (!addr.isEmpty())
addresses_->insertItem(addr);
}
void LocationDialog::slotEdit(int index)
{
- QString addr = addresses_->text(index);
+ TQString addr = addresses_->text(index);
addr = AddressDialog::editAddress(addr, this);
if (!addr.isEmpty())
addresses_->insertItem(addr);
diff --git a/kdeprint/cups/cupsdconf2/locationdialog.h b/kdeprint/cups/cupsdconf2/locationdialog.h
index 5ca8c4d53..fef270405 100644
--- a/kdeprint/cups/cupsdconf2/locationdialog.h
+++ b/kdeprint/cups/cupsdconf2/locationdialog.h
@@ -32,14 +32,14 @@ class LocationDialog : public KDialogBase
{
Q_OBJECT
public:
- LocationDialog(QWidget *parent = 0, const char *name = 0);
+ LocationDialog(TQWidget *parent = 0, const char *name = 0);
void setInfos(CupsdConf*);
void fillLocation(CupsLocation*);
void setLocation(CupsLocation*);
- static bool newLocation(CupsLocation*, QWidget *parent = 0, CupsdConf *conf = 0);
- static bool editLocation(CupsLocation*, QWidget *parent = 0, CupsdConf *conf = 0);
+ static bool newLocation(CupsLocation*, TQWidget *parent = 0, CupsdConf *conf = 0);
+ static bool editLocation(CupsLocation*, TQWidget *parent = 0, CupsdConf *conf = 0);
protected slots:
void slotTypeChanged(int);
diff --git a/kdeprint/cups/cupsdconf2/main.cpp b/kdeprint/cups/cupsdconf2/main.cpp
index e8fd3df6a..cc0918f41 100644
--- a/kdeprint/cups/cupsdconf2/main.cpp
+++ b/kdeprint/cups/cupsdconf2/main.cpp
@@ -19,7 +19,7 @@
#include "cupsddialog.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp
index f866450b8..e17e2b081 100644
--- a/kdeprint/cups/cupsdconf2/portdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/portdialog.cpp
@@ -20,31 +20,31 @@
#include "portdialog.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-PortDialog::PortDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+PortDialog::PortDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- address_ = new QLineEdit(dummy);
- port_ = new QSpinBox(0, 9999, 1, dummy);
+ address_ = new TQLineEdit(dummy);
+ port_ = new TQSpinBox(0, 9999, 1, dummy);
port_->setValue(631);
- usessl_ = new QCheckBox(i18n("Use SSL encryption"), dummy);
+ usessl_ = new TQCheckBox(i18n("Use SSL encryption"), dummy);
- QLabel *l1 = new QLabel(i18n("Address:"), dummy);
- QLabel *l2 = new QLabel(i18n("Port:"), dummy);
+ QLabel *l1 = new TQLabel(i18n("Address:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("Port:"), dummy);
- QVBoxLayout *m1 = new QVBoxLayout(dummy, 0, 10);
- QGridLayout *m2 = new QGridLayout(0, 3, 2, 0, 5);
+ QVBoxLayout *m1 = new TQVBoxLayout(dummy, 0, 10);
+ QGridLayout *m2 = new TQGridLayout(0, 3, 2, 0, 5);
m1->addLayout(m2);
m2->addWidget(l1, 0, 0, Qt::AlignRight);
m2->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -56,9 +56,9 @@ PortDialog::PortDialog(QWidget *parent, const char *name)
resize(250, 100);
}
-QString PortDialog::listenString()
+TQString PortDialog::listenString()
{
- QString s;
+ TQString s;
if (usessl_->isChecked())
s.append("SSLListen ");
else
@@ -73,12 +73,12 @@ QString PortDialog::listenString()
void PortDialog::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(address_, conf->comments_.toolTip("address"));
- QWhatsThis::add(port_, conf->comments_.toolTip("port"));
- QWhatsThis::add(usessl_, conf->comments_.toolTip("usessl"));
+ TQWhatsThis::add(address_, conf->comments_.toolTip("address"));
+ TQWhatsThis::add(port_, conf->comments_.toolTip("port"));
+ TQWhatsThis::add(usessl_, conf->comments_.toolTip("usessl"));
}
-QString PortDialog::newListen(QWidget *parent, CupsdConf *conf)
+TQString PortDialog::newListen(TQWidget *parent, CupsdConf *conf)
{
PortDialog dlg(parent);
dlg.setInfos(conf);
@@ -86,10 +86,10 @@ QString PortDialog::newListen(QWidget *parent, CupsdConf *conf)
{
return dlg.listenString();
}
- return QString::null;
+ return TQString::null;
}
-QString PortDialog::editListen(const QString& s, QWidget *parent, CupsdConf *conf)
+TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf *conf)
{
PortDialog dlg(parent);
dlg.setInfos(conf);
@@ -114,5 +114,5 @@ QString PortDialog::editListen(const QString& s, QWidget *parent, CupsdConf *con
{
return dlg.listenString();
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/cups/cupsdconf2/portdialog.h b/kdeprint/cups/cupsdconf2/portdialog.h
index 8f0b9f3e9..44ab5bb72 100644
--- a/kdeprint/cups/cupsdconf2/portdialog.h
+++ b/kdeprint/cups/cupsdconf2/portdialog.h
@@ -30,12 +30,12 @@ struct CupsdConf;
class PortDialog : public KDialogBase
{
public:
- PortDialog(QWidget *parent = 0, const char *name = 0);
+ PortDialog(TQWidget *parent = 0, const char *name = 0);
- QString listenString();
+ TQString listenString();
void setInfos(CupsdConf*);
- static QString newListen(QWidget *parent = 0, CupsdConf *conf = 0);
- static QString editListen(const QString& s, QWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString newListen(TQWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString editListen(const TQString& s, TQWidget *parent = 0, CupsdConf *conf = 0);
private:
QLineEdit *address_;
diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
index 931d6ac4a..66df30652 100644
--- a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
+++ b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
@@ -19,21 +19,21 @@
#include "qdirlineedit.h"
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-QDirLineEdit::QDirLineEdit(bool file, QWidget *parent, const char *name)
- : QWidget(parent, name)
+QDirLineEdit::QDirLineEdit(bool file, TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- edit_ = new QLineEdit(this);
+ edit_ = new TQLineEdit(this);
button_ = new KPushButton(this);
button_->setPixmap(SmallIcon("fileopen"));
- connect(button_,SIGNAL(clicked()),SLOT(buttonClicked()));
+ connect(button_,TQT_SIGNAL(clicked()),TQT_SLOT(buttonClicked()));
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 3);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 3);
main_->addWidget(edit_);
main_->addWidget(button_);
@@ -44,12 +44,12 @@ QDirLineEdit::~QDirLineEdit()
{
}
-void QDirLineEdit::setURL(const QString& txt)
+void QDirLineEdit::setURL(const TQString& txt)
{
edit_->setText(txt);
}
-QString QDirLineEdit::url()
+TQString QDirLineEdit::url()
{
return edit_->text();
}
@@ -60,7 +60,7 @@ void QDirLineEdit::buttonClicked()
if (!fileedit_)
dirname = KFileDialog::getExistingDirectory(edit_->text(), this);
else
- dirname = KFileDialog::getOpenFileName(edit_->text(), QString::null, this);
+ dirname = KFileDialog::getOpenFileName(edit_->text(), TQString::null, this);
if (!dirname.isEmpty())
edit_->setText(dirname);
}
diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.h b/kdeprint/cups/cupsdconf2/qdirlineedit.h
index b4b977b75..ff554d91c 100644
--- a/kdeprint/cups/cupsdconf2/qdirlineedit.h
+++ b/kdeprint/cups/cupsdconf2/qdirlineedit.h
@@ -20,8 +20,8 @@
#ifndef QDIRLINEEDIT_H
#define QDIRLINEEDIT_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
class QLineEdit;
class QPushButton;
@@ -30,11 +30,11 @@ class QDirLineEdit : public QWidget
{
Q_OBJECT
public:
- QDirLineEdit(bool file, QWidget *parent = 0, const char *name = 0);
+ QDirLineEdit(bool file, TQWidget *parent = 0, const char *name = 0);
~QDirLineEdit();
- void setURL(const QString& txt);
- QString url();
+ void setURL(const TQString& txt);
+ TQString url();
void setFileEdit(bool on = true);
private slots:
diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
index 31a544e91..1daca81cb 100644
--- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
+++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
@@ -19,35 +19,35 @@
#include "qdirmultilineedit.h"
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-QDirMultiLineEdit::QDirMultiLineEdit(QWidget *parent, const char *name)
-: QWidget(parent, name)
+QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_view = new KListView(this);
m_view->header()->hide();
m_view->addColumn("");
m_view->setFullWidth(true);
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelected(QListViewItem*)));
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotSelected(TQListViewItem*)));
- m_add = new QPushButton(this);
+ m_add = new TQPushButton(this);
m_add->setPixmap(SmallIcon("folder_new"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddClicked()));
- m_remove = new QPushButton(this);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddClicked()));
+ m_remove = new TQPushButton(this);
m_remove->setPixmap(SmallIcon("editdelete"));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveClicked()));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked()));
m_remove->setEnabled(false);
m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->sizeHint().height()*2));
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, 3);
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3);
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0);
l0->addWidget(m_view);
l0->addLayout(l1);
l1->addWidget(m_add);
@@ -59,14 +59,14 @@ QDirMultiLineEdit::~QDirMultiLineEdit()
{
}
-void QDirMultiLineEdit::setURLs(const QStringList& urls)
+void QDirMultiLineEdit::setURLs(const TQStringList& urls)
{
m_view->clear();
- for (QStringList::ConstIterator it=urls.begin(); it!=urls.end(); ++it)
+ for (TQStringList::ConstIterator it=urls.begin(); it!=urls.end(); ++it)
addURL(*it);
}
-QStringList QDirMultiLineEdit::urls()
+TQStringList QDirMultiLineEdit::urls()
{
QListViewItem *item = m_view->firstChild();
QStringList l;
@@ -78,15 +78,15 @@ QStringList QDirMultiLineEdit::urls()
return l;
}
-void QDirMultiLineEdit::addURL(const QString& url)
+void QDirMultiLineEdit::addURL(const TQString& url)
{
- QListViewItem *item = new QListViewItem(m_view, url);
+ QListViewItem *item = new TQListViewItem(m_view, url);
item->setRenameEnabled(0, true);
}
void QDirMultiLineEdit::slotAddClicked()
{
- QString dirname = KFileDialog::getExistingDirectory(QString::null, this);
+ QString dirname = KFileDialog::getExistingDirectory(TQString::null, this);
if (!dirname.isEmpty())
addURL(dirname);
}
@@ -101,7 +101,7 @@ void QDirMultiLineEdit::slotRemoveClicked()
}
}
-void QDirMultiLineEdit::slotSelected(QListViewItem *item)
+void QDirMultiLineEdit::slotSelected(TQListViewItem *item)
{
m_remove->setEnabled((item != NULL));
}
diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
index 963292985..95cdc8241 100644
--- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
+++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
@@ -20,7 +20,7 @@
#ifndef QDIRMULTILINEEDIT_H
#define QDIRMULTILINEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KListView;
class QListViewItem;
@@ -31,19 +31,19 @@ class QDirMultiLineEdit : public QWidget
Q_OBJECT
public:
- QDirMultiLineEdit(QWidget *parent = 0, const char *name = 0);
+ QDirMultiLineEdit(TQWidget *parent = 0, const char *name = 0);
~QDirMultiLineEdit();
- void setURLs(const QStringList&);
- QStringList urls();
+ void setURLs(const TQStringList&);
+ TQStringList urls();
protected:
- void addURL(const QString&);
+ void addURL(const TQString&);
private slots:
void slotAddClicked();
void slotRemoveClicked();
- void slotSelected(QListViewItem*);
+ void slotSelected(TQListViewItem*);
private:
KListView *m_view;
diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp
index c61996282..d77fe5aaa 100644
--- a/kdeprint/cups/cupsdconf2/sizewidget.cpp
+++ b/kdeprint/cups/cupsdconf2/sizewidget.cpp
@@ -19,17 +19,17 @@
#include "sizewidget.h"
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <klocale.h>
-SizeWidget::SizeWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SizeWidget::SizeWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- m_size = new QSpinBox( 0, 9999, 1, this );
- m_unit = new QComboBox( this );
+ m_size = new TQSpinBox( 0, 9999, 1, this );
+ m_unit = new TQComboBox( this );
m_unit->insertItem( i18n( "KB" ) );
m_unit->insertItem( i18n( "MB" ) );
@@ -38,14 +38,14 @@ SizeWidget::SizeWidget( QWidget *parent, const char *name )
m_unit->setCurrentItem( 1 );
m_size->setSpecialValueText( i18n( "Unlimited" ) );
- QHBoxLayout *l0 = new QHBoxLayout( this, 0, 5 );
+ TQHBoxLayout *l0 = new TQHBoxLayout( this, 0, 5 );
l0->addWidget( m_size, 1 );
l0->addWidget( m_unit, 0 );
}
-void SizeWidget::setSizeString( const QString& sz )
+void SizeWidget::setSizeString( const TQString& sz )
{
- int p = sz.find( QRegExp( "\\D" ) );
+ int p = sz.find( TQRegExp( "\\D" ) );
m_size->setValue( sz.left( p ).toInt() );
switch( sz[ p ].latin1() )
{
@@ -58,9 +58,9 @@ void SizeWidget::setSizeString( const QString& sz )
m_unit->setCurrentItem( p );
}
-QString SizeWidget::sizeString() const
+TQString SizeWidget::sizeString() const
{
- QString result = QString::number( m_size->value() );
+ TQString result = TQString::number( m_size->value() );
switch ( m_unit->currentItem() )
{
case 0: result.append( "k" ); break;
diff --git a/kdeprint/cups/cupsdconf2/sizewidget.h b/kdeprint/cups/cupsdconf2/sizewidget.h
index c7f6557df..7bee0283b 100644
--- a/kdeprint/cups/cupsdconf2/sizewidget.h
+++ b/kdeprint/cups/cupsdconf2/sizewidget.h
@@ -20,7 +20,7 @@
#ifndef SIZEWIDGET_H
#define SIZEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QSpinBox;
class QComboBox;
@@ -28,16 +28,16 @@ class QComboBox;
class SizeWidget : public QWidget
{
public:
- SizeWidget( QWidget *parent = 0, const char *name = 0 );
+ SizeWidget( TQWidget *parent = 0, const char *name = 0 );
- void setSizeString( const QString& sizeString );
- QString sizeString() const;
+ void setSizeString( const TQString& sizeString );
+ TQString sizeString() const;
void setValue( int sz );
int value() const;
private:
- QSpinBox *m_size;
- QComboBox *m_unit;
+ TQSpinBox *m_size;
+ TQComboBox *m_unit;
};
#endif
diff --git a/kdeprint/cups/cupsinfos.cpp b/kdeprint/cups/cupsinfos.cpp
index f96451d76..839f83612 100644
--- a/kdeprint/cups/cupsinfos.cpp
+++ b/kdeprint/cups/cupsinfos.cpp
@@ -58,9 +58,9 @@ CupsInfos::CupsInfos()
load();
/* host_ = cupsServer();
login_ = cupsUser();
- if (login_.isEmpty()) login_ = QString::null;
+ if (login_.isEmpty()) login_ = TQString::null;
port_ = ippPort();
- password_ = QString::null;*/
+ password_ = TQString::null;*/
cupsSetPasswordCB(cupsGetPasswordCB);
}
@@ -69,14 +69,14 @@ CupsInfos::~CupsInfos()
{
}
-QString CupsInfos::hostaddr() const
+TQString CupsInfos::hostaddr() const
{
if (host_[0] != '/')
- return host_ + ":" + QString::number(port_);
+ return host_ + ":" + TQString::number(port_);
return "localhost";
}
-void CupsInfos::setHost(const QString& s)
+void CupsInfos::setHost(const TQString& s)
{
host_ = s;
cupsSetServer(s.latin1());
@@ -88,13 +88,13 @@ void CupsInfos::setPort(int p)
ippSetPort(p);
}
-void CupsInfos::setLogin(const QString& s)
+void CupsInfos::setLogin(const TQString& s)
{
login_ = s;
cupsSetUser(s.latin1());
}
-void CupsInfos::setPassword(const QString& s)
+void CupsInfos::setPassword(const TQString& s)
{
password_ = s;
}
@@ -106,7 +106,7 @@ void CupsInfos::setSavePassword( bool on )
const char* CupsInfos::getPasswordCB()
{
- QPair<QString,QString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ );
+ QPair<TQString,TQString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ );
if ( pwd.first.isEmpty() && pwd.second.isEmpty() )
return NULL;
@@ -119,9 +119,9 @@ void CupsInfos::load()
{
KConfig *conf_ = KMFactory::self()->printConfig();
conf_->setGroup("CUPS");
- host_ = conf_->readEntry("Host",QString::fromLatin1(cupsServer()));
+ host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer()));
port_ = conf_->readNumEntry("Port",ippPort());
- login_ = conf_->readEntry("Login",QString::fromLatin1(cupsUser()));
+ login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser()));
savepwd_ = conf_->readBoolEntry( "SavePassword", false );
if ( savepwd_ )
{
@@ -129,8 +129,8 @@ void CupsInfos::load()
KMFactory::self()->initPassword( login_, password_, host_, port_ );
}
else
- password_ = QString::null;
- if (login_.isEmpty()) login_ = QString::null;
+ password_ = TQString::null;
+ if (login_.isEmpty()) login_ = TQString::null;
reallogin_ = cupsUser();
// synchronize with CUPS
diff --git a/kdeprint/cups/cupsinfos.h b/kdeprint/cups/cupsinfos.h
index 429970b9d..b62329d4b 100644
--- a/kdeprint/cups/cupsinfos.h
+++ b/kdeprint/cups/cupsinfos.h
@@ -20,7 +20,7 @@
#ifndef CUPSINFOS_H
#define CUPSINFOS_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kpreloadobject.h"
class CupsInfos : public KPReloadObject
@@ -31,18 +31,18 @@ public:
CupsInfos();
~CupsInfos();
- const QString& host() const;
- QString hostaddr() const;
+ const TQString& host() const;
+ TQString hostaddr() const;
int port() const;
- const QString& login() const;
- const QString& password() const;
- const QString& realLogin() const;
+ const TQString& login() const;
+ const TQString& password() const;
+ const TQString& realLogin() const;
bool savePassword() const;
- void setHost(const QString& s);
+ void setHost(const TQString& s);
void setPort(int p);
- void setLogin(const QString& s);
- void setPassword(const QString& s);
+ void setLogin(const TQString& s);
+ void setPassword(const TQString& s);
void setSavePassword( bool on );
const char* getPasswordCB();
@@ -67,19 +67,19 @@ private:
int count_;
};
-inline const QString& CupsInfos::host() const
+inline const TQString& CupsInfos::host() const
{ return host_; }
inline int CupsInfos::port() const
{ return port_; }
-inline const QString& CupsInfos::login() const
+inline const TQString& CupsInfos::login() const
{ return login_; }
-inline const QString& CupsInfos::password() const
+inline const TQString& CupsInfos::password() const
{ return password_; }
-inline const QString& CupsInfos::realLogin() const
+inline const TQString& CupsInfos::realLogin() const
{ return reallogin_; }
inline bool CupsInfos::savePassword() const
diff --git a/kdeprint/cups/image.cpp b/kdeprint/cups/image.cpp
index 7ec0ed7a6..4fe214bc1 100644
--- a/kdeprint/cups/image.cpp
+++ b/kdeprint/cups/image.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qimage.h>
+#include <tqimage.h>
#include <math.h>
void
@@ -245,7 +245,7 @@ bright(float mat[3][3],
//----------------------------------------------------------------------------------------------------
-QImage convertImage(const QImage& image, int hue, int saturation, int brightness, int gamma)
+TQImage convertImage(const TQImage& image, int hue, int saturation, int brightness, int gamma)
{
float mat[3][3] = {{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
int lut[3][3][256];
diff --git a/kdeprint/cups/imageposition.cpp b/kdeprint/cups/imageposition.cpp
index 0489b5079..bc2b207fd 100644
--- a/kdeprint/cups/imageposition.cpp
+++ b/kdeprint/cups/imageposition.cpp
@@ -19,10 +19,10 @@
#include "imageposition.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
-static void draw3DPage(QPainter *p, QRect r)
+static void draw3DPage(TQPainter *p, TQRect r)
{
// draw white page
p->fillRect(r,Qt::white);
@@ -40,12 +40,12 @@ static void draw3DPage(QPainter *p, QRect r)
p->lineTo(r.right()-1,r.top()+1);
}
-ImagePosition::ImagePosition(QWidget *parent, const char *name)
- : QWidget(parent,name)
+ImagePosition::ImagePosition(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
position_ = Center;
setMinimumSize(sizeHint());
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding));
pix_.load(locate("data", "kdeprint/preview-mini.png"));
}
@@ -82,7 +82,7 @@ void ImagePosition::setPosition(int horiz, int vert)
setPosition((PositionType)type);
}
-QString ImagePosition::positionString() const
+TQString ImagePosition::positionString() const
{
switch (position_) {
case TopLeft: return "top-left";
@@ -98,7 +98,7 @@ QString ImagePosition::positionString() const
return "center";
}
-void ImagePosition::paintEvent(QPaintEvent*)
+void ImagePosition::paintEvent(TQPaintEvent*)
{
int horiz, vert, x, y;
int margin = 5;
@@ -131,7 +131,7 @@ void ImagePosition::paintEvent(QPaintEvent*)
case 1: y = (page.top()+page.bottom()-img.height())/2; break;
case 2: y = page.bottom()-margin-img.height(); break;
}
- img.moveTopLeft(QPoint(x,y));
+ img.moveTopLeft(TQPoint(x,y));
// draw page
QPainter p(this);
@@ -147,7 +147,7 @@ void ImagePosition::paintEvent(QPaintEvent*)
p.end();
}
-QSize ImagePosition::sizeHint() const
+TQSize ImagePosition::sizeHint() const
{
- return QSize(60, 80);
+ return TQSize(60, 80);
}
diff --git a/kdeprint/cups/imageposition.h b/kdeprint/cups/imageposition.h
index 64a105db7..caaa63ca2 100644
--- a/kdeprint/cups/imageposition.h
+++ b/kdeprint/cups/imageposition.h
@@ -20,9 +20,9 @@
#ifndef IMAGEPOSITION_H
#define IMAGEPOSITION_H
-#include <qwidget.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
class ImagePosition : public QWidget
{
@@ -37,18 +37,18 @@ public:
Bottom,
BottomRight};
- ImagePosition(QWidget *parent = 0, const char *name = 0);
+ ImagePosition(TQWidget *parent = 0, const char *name = 0);
~ImagePosition();
void setPosition(const char *type = "center");
void setPosition(PositionType type = Center);
void setPosition(int horiz = 1, int vert = 1);
PositionType position() const { return (PositionType)position_; }
- QString positionString() const;
- QSize sizeHint() const;
+ TQString positionString() const;
+ TQSize sizeHint() const;
protected:
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
private:
int position_;
diff --git a/kdeprint/cups/imagepreview.cpp b/kdeprint/cups/imagepreview.cpp
index a7badd09b..7ae5dabf0 100644
--- a/kdeprint/cups/imagepreview.cpp
+++ b/kdeprint/cups/imagepreview.cpp
@@ -19,14 +19,14 @@
#include "imagepreview.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpaintdevice.h>
// forward definition
-QImage convertImage(const QImage& image, int hue, int saturation, int brightness, int gamma);
+TQImage convertImage(const TQImage& image, int hue, int saturation, int brightness, int gamma);
-ImagePreview::ImagePreview(QWidget *parent, const char *name ) : QWidget(parent,name) {
+ImagePreview::ImagePreview(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
brightness_ = 100;
hue_ = 0;
saturation_ = 100;
@@ -39,7 +39,7 @@ ImagePreview::ImagePreview(QWidget *parent, const char *name ) : QWidget(parent,
ImagePreview::~ImagePreview(){
}
-void ImagePreview::setImage(const QImage& image){
+void ImagePreview::setImage(const TQImage& image){
image_ = image.convertDepth(32);
image_.detach();
resize(image_.size());
@@ -54,7 +54,7 @@ void ImagePreview::setParameters(int brightness, int hue, int saturation, int ga
repaint();
}
-void ImagePreview::paintEvent(QPaintEvent*){
+void ImagePreview::paintEvent(TQPaintEvent*){
QImage tmpImage = convertImage(image_,hue_,(bw_ ? 0 : saturation_),brightness_,gamma_);
int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2;
@@ -64,7 +64,7 @@ void ImagePreview::paintEvent(QPaintEvent*){
p.drawImage(x,y,tmpImage);
p.end();
- bitBlt(this, QPoint(0, 0), &buffer, buffer.rect(), Qt::CopyROP);
+ bitBlt(this, TQPoint(0, 0), &buffer, buffer.rect(), Qt::CopyROP);
}
void ImagePreview::setBlackAndWhite(bool on){
@@ -72,7 +72,7 @@ void ImagePreview::setBlackAndWhite(bool on){
update();
}
-QSize ImagePreview::minimumSizeHint() const
+TQSize ImagePreview::minimumSizeHint() const
{
return image_.size();
}
diff --git a/kdeprint/cups/imagepreview.h b/kdeprint/cups/imagepreview.h
index e709490fb..1967efdc2 100644
--- a/kdeprint/cups/imagepreview.h
+++ b/kdeprint/cups/imagepreview.h
@@ -20,19 +20,19 @@
#ifndef IMAGEPREVIEW_H
#define IMAGEPREVIEW_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
class ImagePreview : public QWidget
{
public:
- ImagePreview(QWidget *parent=0, const char *name=0);
+ ImagePreview(TQWidget *parent=0, const char *name=0);
~ImagePreview();
void setParameters(int brightness, int hue, int saturation, int gamma);
- void setImage(const QImage& image);
+ void setImage(const TQImage& image);
void setBlackAndWhite(bool on);
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
private: // Private attributes
int brightness_;
@@ -40,10 +40,10 @@ private: // Private attributes
int saturation_;
int gamma_;
bool bw_;
- QImage image_;
+ TQImage image_;
protected: // Protected methods
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
};
#endif
diff --git a/kdeprint/cups/ippreportdlg.cpp b/kdeprint/cups/ippreportdlg.cpp
index 71256ce39..343cd4118 100644
--- a/kdeprint/cups/ippreportdlg.cpp
+++ b/kdeprint/cups/ippreportdlg.cpp
@@ -26,11 +26,11 @@
#include <kmessagebox.h>
#include <kdebug.h>
#include <ktextedit.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
-IppReportDlg::IppReportDlg(QWidget *parent, const char *name)
+IppReportDlg::IppReportDlg(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("IPP Report"), Close|User1, Close, false, KGuiItem(i18n("&Print"), "fileprint"))
{
m_edit = new KTextEdit(this);
@@ -60,7 +60,7 @@ void IppReportDlg::slotUser1()
while (1)
{
rich.draw(&painter, margin, margin, r, colorGroup());
- QString s = caption() + ": " + QString::number(page);
+ QString s = caption() + ": " + TQString::number(page);
QRect br = painter.fontMetrics().boundingRect(s);
painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s);
r.moveBy(0, r.height()-10);
@@ -76,7 +76,7 @@ void IppReportDlg::slotUser1()
}
}
-void IppReportDlg::report(IppRequest *req, int group, const QString& caption)
+void IppReportDlg::report(IppRequest *req, int group, const TQString& caption)
{
QString str_report;
QTextStream t(&str_report, IO_WriteOnly);
diff --git a/kdeprint/cups/ippreportdlg.h b/kdeprint/cups/ippreportdlg.h
index fe3f36621..8e3eea8c5 100644
--- a/kdeprint/cups/ippreportdlg.h
+++ b/kdeprint/cups/ippreportdlg.h
@@ -29,8 +29,8 @@ class IppReportDlg : public KDialogBase
{
Q_OBJECT
public:
- IppReportDlg(QWidget *parent = 0, const char *name = 0);
- static void report(IppRequest *req, int group, const QString& caption = QString::null);
+ IppReportDlg(TQWidget *parent = 0, const char *name = 0);
+ static void report(IppRequest *req, int group, const TQString& caption = TQString::null);
protected slots:
void slotUser1();
diff --git a/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp
index b4812a171..0b32e45e7 100644
--- a/kdeprint/cups/ipprequest.cpp
+++ b/kdeprint/cups/ipprequest.cpp
@@ -25,8 +25,8 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <cups/cups.h>
#ifdef HAVE_CONFIG_H
@@ -34,11 +34,11 @@
#endif
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#include <qcstring.h>
-static QCString cups_authstring = "";
+#include <tqcstring.h>
+static TQCString cups_authstring = "";
#endif
-void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::null)
+void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString::null)
{
kdDebug(500) << "==========" << endl;
if (s.isEmpty())
@@ -51,29 +51,29 @@ void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::nu
kdDebug(500) << "Null request" << endl;
return;
}
- kdDebug(500) << "State = 0x" << QString::number(req->state, 16) << endl;
- kdDebug(500) << "ID = 0x" << QString::number(req->request.status.request_id, 16) << endl;
+ kdDebug(500) << "State = 0x" << TQString::number(req->state, 16) << endl;
+ kdDebug(500) << "ID = 0x" << TQString::number(req->request.status.request_id, 16) << endl;
if (answer)
{
- kdDebug(500) << "Status = 0x" << QString::number(req->request.status.status_code, 16) << endl;
+ kdDebug(500) << "Status = 0x" << TQString::number(req->request.status.status_code, 16) << endl;
kdDebug(500) << "Status message = " << ippErrorString(req->request.status.status_code) << endl;
}
else
- kdDebug(500) << "Operation = 0x" << QString::number(req->request.op.operation_id, 16) << endl;
+ kdDebug(500) << "Operation = 0x" << TQString::number(req->request.op.operation_id, 16) << endl;
kdDebug(500) << "Version = " << (int)(req->request.status.version[0]) << "." << (int)(req->request.status.version[1]) << endl;
kdDebug(500) << endl;
ipp_attribute_t *attr = req->attrs;
while (attr)
{
- QString s = QString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16);
+ TQString s = TQString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16);
for (int i=0;i<attr->num_values;i++)
{
switch (attr->value_tag)
{
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
- s += ("0x"+QString::number(attr->values[i].integer, 16));
+ s += ("0x"+TQString::number(attr->values[i].integer, 16));
break;
case IPP_TAG_BOOLEAN:
s += (attr->values[i].boolean ? "true" : "false");
@@ -101,7 +101,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::nu
}
}
-QString errorString(int status)
+TQString errorString(int status)
{
QString str;
switch (status)
@@ -122,7 +122,7 @@ QString errorString(int status)
str = i18n("The target printer is not accepting print jobs.");
break;
default:
- str = QString::fromLocal8Bit(ippErrorString((ipp_status_t)status));
+ str = TQString::fromLocal8Bit(ippErrorString((ipp_status_t)status));
break;
}
return str;
@@ -134,7 +134,7 @@ IppRequest::IppRequest()
{
request_ = 0;
port_ = -1;
- host_ = QString::null;
+ host_ = TQString::null;
dump_ = 0;
init();
}
@@ -155,7 +155,7 @@ void IppRequest::init()
}
request_ = ippNew();
//kdDebug(500) << "kdeprint: IPP request, lang=" << KGlobal::locale()->language() << endl;
- QCString langstr = KGlobal::locale()->language().latin1();
+ TQCString langstr = KGlobal::locale()->language().latin1();
cups_lang_t* lang = cupsLangGet(langstr.data());
// default charset to UTF-8 (ugly hack)
lang->encoding = CUPS_UTF8;
@@ -164,51 +164,51 @@ void IppRequest::init()
cupsLangFree(lang);
}
-void IppRequest::addString_p(int group, int type, const QString& name, const QString& value)
+void IppRequest::addString_p(int group, int type, const TQString& name, const TQString& value)
{
if (!name.isEmpty())
ippAddString(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),NULL,(value.isEmpty() ? "" : value.local8Bit().data()));
}
-void IppRequest::addStringList_p(int group, int type, const QString& name, const QStringList& values)
+void IppRequest::addStringList_p(int group, int type, const TQString& name, const TQStringList& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddStrings(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL,NULL);
int i(0);
- for (QStringList::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQStringList::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].string.text = strdup((*it).local8Bit());
}
}
-void IppRequest::addInteger_p(int group, int type, const QString& name, int value)
+void IppRequest::addInteger_p(int group, int type, const TQString& name, int value)
{
if (!name.isEmpty()) ippAddInteger(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),value);
}
-void IppRequest::addIntegerList_p(int group, int type, const QString& name, const QValueList<int>& values)
+void IppRequest::addIntegerList_p(int group, int type, const TQString& name, const TQValueList<int>& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddIntegers(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL);
int i(0);
- for (QValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].integer = *it;
}
}
-void IppRequest::addBoolean(int group, const QString& name, bool value)
+void IppRequest::addBoolean(int group, const TQString& name, bool value)
{
if (!name.isEmpty()) ippAddBoolean(request_,(ipp_tag_t)group,name.latin1(),(char)value);
}
-void IppRequest::addBoolean(int group, const QString& name, const QValueList<bool>& values)
+void IppRequest::addBoolean(int group, const TQString& name, const TQValueList<bool>& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddBooleans(request_,(ipp_tag_t)group,name.latin1(),(int)(values.count()),NULL);
int i(0);
- for (QValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].boolean = (char)(*it);
}
}
@@ -224,7 +224,7 @@ int IppRequest::status()
return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2));
}
-QString IppRequest::statusMessage()
+TQString IppRequest::statusMessage()
{
QString msg;
switch (status())
@@ -242,7 +242,7 @@ QString IppRequest::statusMessage()
return msg;
}
-bool IppRequest::integerValue_p(const QString& name, int& value, int type)
+bool IppRequest::integerValue_p(const TQString& name, int& value, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
@@ -254,19 +254,19 @@ bool IppRequest::integerValue_p(const QString& name, int& value, int type)
else return false;
}
-bool IppRequest::stringValue_p(const QString& name, QString& value, int type)
+bool IppRequest::stringValue_p(const TQString& name, TQString& value, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
if (attr)
{
- value = QString::fromLocal8Bit(attr->values[0].string.text);
+ value = TQString::fromLocal8Bit(attr->values[0].string.text);
return true;
}
else return false;
}
-bool IppRequest::stringListValue_p(const QString& name, QStringList& values, int type)
+bool IppRequest::stringListValue_p(const TQString& name, TQStringList& values, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
@@ -274,13 +274,13 @@ bool IppRequest::stringListValue_p(const QString& name, QStringList& values, int
if (attr)
{
for (int i=0;i<attr->num_values;i++)
- values.append(QString::fromLocal8Bit(attr->values[i].string.text));
+ values.append(TQString::fromLocal8Bit(attr->values[i].string.text));
return true;
}
else return false;
}
-bool IppRequest::boolean(const QString& name, bool& value)
+bool IppRequest::boolean(const TQString& name, bool& value)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), IPP_TAG_BOOLEAN);
@@ -292,7 +292,7 @@ bool IppRequest::boolean(const QString& name, bool& value)
else return false;
}
-bool IppRequest::doFileRequest(const QString& res, const QString& filename)
+bool IppRequest::doFileRequest(const TQString& res, const TQString& filename)
{
QString myHost = host_;
int myPort = port_;
@@ -319,7 +319,7 @@ bool IppRequest::doFileRequest(const QString& res, const QString& filename)
if (dump_ > 0)
{
- dumpRequest(request_, false, "Request to "+myHost+":"+QString::number(myPort));
+ dumpRequest(request_, false, "Request to "+myHost+":"+TQString::number(myPort));
}
request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1()));
@@ -348,7 +348,7 @@ bool IppRequest::doFileRequest(const QString& res, const QString& filename)
return true;
}
-bool IppRequest::htmlReport(int group, QTextStream& output)
+bool IppRequest::htmlReport(int group, TQTextStream& output)
{
if (!request_) return false;
// start table
@@ -430,9 +430,9 @@ bool IppRequest::htmlReport(int group, QTextStream& output)
return true;
}
-QMap<QString,QString> IppRequest::toMap(int group)
+TQMap<TQString,TQString> IppRequest::toMap(int group)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
if (request_)
{
ipp_attribute_t *attr = first();
@@ -450,19 +450,19 @@ QMap<QString,QString> IppRequest::toMap(int group)
{
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
- value.append(QString::number(attr->values[i].integer)).append(",");
+ value.append(TQString::number(attr->values[i].integer)).append(",");
break;
case IPP_TAG_BOOLEAN:
value.append((attr->values[i].boolean ? "true" : "false")).append(",");
break;
case IPP_TAG_RANGE:
if (attr->values[i].range.lower > 0)
- value.append(QString::number(attr->values[i].range.lower));
+ value.append(TQString::number(attr->values[i].range.lower));
if (attr->values[i].range.lower != attr->values[i].range.upper)
{
value.append("-");
if (attr->values[i].range.upper > 0)
- value.append(QString::number(attr->values[i].range.upper));
+ value.append(TQString::number(attr->values[i].range.upper));
}
value.append(",");
break;
@@ -476,7 +476,7 @@ QMap<QString,QString> IppRequest::toMap(int group)
case IPP_TAG_TEXTLANG:
case IPP_TAG_CHARSET:
case IPP_TAG_LANGUAGE:
- value.append(QString::fromLocal8Bit(attr->values[i].string.text)).append(",");
+ value.append(TQString::fromLocal8Bit(attr->values[i].string.text)).append(",");
break;
default:
break;
@@ -484,14 +484,14 @@ QMap<QString,QString> IppRequest::toMap(int group)
}
if (!value.isEmpty())
value.truncate(value.length()-1);
- opts[QString::fromLocal8Bit(attr->name)] = value;
+ opts[TQString::fromLocal8Bit(attr->name)] = value;
attr = attr->next;
}
}
return opts;
}
-void IppRequest::setMap(const QMap<QString,QString>& opts)
+void IppRequest::setMap(const TQMap<TQString,TQString>& opts)
{
if (!request_)
return;
@@ -499,7 +499,7 @@ void IppRequest::setMap(const QMap<QString,QString>& opts)
QRegExp re("^\"|\"$");
cups_option_t *options = NULL;
int n = 0;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("app-"))
continue;
diff --git a/kdeprint/cups/ipprequest.h b/kdeprint/cups/ipprequest.h
index 68fe3ec0b..1265ee966 100644
--- a/kdeprint/cups/ipprequest.h
+++ b/kdeprint/cups/ipprequest.h
@@ -20,10 +20,10 @@
#ifndef IPPREQUEST_H
#define IPPREQUEST_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <cups/ipp.h>
@@ -36,64 +36,64 @@ public:
void init(); // re-initializes the request
// request building functions
- void addMime(int group, const QString& name, const QString& mime);
- void addKeyword(int group, const QString& name, const QString& key);
- void addKeyword(int group, const QString& name, const QStringList& keys);
- void addURI(int group, const QString& name, const QString& uri);
- void addURI(int group, const QString& name, const QStringList& uris);
- void addText(int group, const QString& name, const QString& txt);
- void addText(int group, const QString& name, const QStringList& txts);
- void addName(int group, const QString& name, const QString& nm);
- void addName(int group, const QString& name, const QStringList& nms);
- void addInteger(int group, const QString& name, int value);
- void addInteger(int group, const QString& name, const QValueList<int>& values);
- void addEnum(int group, const QString& name, int value);
- void addEnum(int group, const QString& name, const QValueList<int>& values);
- void addBoolean(int group, const QString& name, bool value);
- void addBoolean(int group, const QString& name, const QValueList<bool>& values);
+ void addMime(int group, const TQString& name, const TQString& mime);
+ void addKeyword(int group, const TQString& name, const TQString& key);
+ void addKeyword(int group, const TQString& name, const TQStringList& keys);
+ void addURI(int group, const TQString& name, const TQString& uri);
+ void addURI(int group, const TQString& name, const TQStringList& uris);
+ void addText(int group, const TQString& name, const TQString& txt);
+ void addText(int group, const TQString& name, const TQStringList& txts);
+ void addName(int group, const TQString& name, const TQString& nm);
+ void addName(int group, const TQString& name, const TQStringList& nms);
+ void addInteger(int group, const TQString& name, int value);
+ void addInteger(int group, const TQString& name, const TQValueList<int>& values);
+ void addEnum(int group, const TQString& name, int value);
+ void addEnum(int group, const TQString& name, const TQValueList<int>& values);
+ void addBoolean(int group, const TQString& name, bool value);
+ void addBoolean(int group, const TQString& name, const TQValueList<bool>& values);
void setOperation(int op);
- void setHost(const QString& host);
+ void setHost(const TQString& host);
void setPort(int p);
// request answer functions
int status();
- QString statusMessage();
- bool integer(const QString& name, int& value);
- bool boolean(const QString& name, bool& value);
- bool enumvalue(const QString& name, int& value);
- bool name(const QString& name, QString& value);
- bool name(const QString& name, QStringList& value);
- bool text(const QString& name, QString& value);
- bool text(const QString& name, QStringList& value);
- bool uri(const QString& name, QString& value);
- bool uri(const QString& name, QStringList& value);
- bool keyword(const QString& name, QString& value);
- bool keyword(const QString& name, QStringList& value);
- bool mime(const QString& name, QString& value);
+ TQString statusMessage();
+ bool integer(const TQString& name, int& value);
+ bool boolean(const TQString& name, bool& value);
+ bool enumvalue(const TQString& name, int& value);
+ bool name(const TQString& name, TQString& value);
+ bool name(const TQString& name, TQStringList& value);
+ bool text(const TQString& name, TQString& value);
+ bool text(const TQString& name, TQStringList& value);
+ bool uri(const TQString& name, TQString& value);
+ bool uri(const TQString& name, TQStringList& value);
+ bool keyword(const TQString& name, TQString& value);
+ bool keyword(const TQString& name, TQStringList& value);
+ bool mime(const TQString& name, TQString& value);
ipp_attribute_t* first();
ipp_attribute_t* last();
- QMap<QString,QString> toMap(int group = -1);
- void setMap(const QMap<QString,QString>& opts);
+ TQMap<TQString,TQString> toMap(int group = -1);
+ void setMap(const TQMap<TQString,TQString>& opts);
// processing functions
- bool doRequest(const QString& res);
- bool doFileRequest(const QString& res, const QString& filename = QString::null);
+ bool doRequest(const TQString& res);
+ bool doFileRequest(const TQString& res, const TQString& filename = TQString::null);
// report functions
- bool htmlReport(int group, QTextStream& output);
+ bool htmlReport(int group, TQTextStream& output);
// debug function
void dump(int state);
protected:
- void addString_p(int group, int type, const QString& name, const QString& value);
- void addStringList_p(int group, int type, const QString& name, const QStringList& values);
- void addInteger_p(int group, int type, const QString& name, int value);
- void addIntegerList_p(int group, int type, const QString& name, const QValueList<int>& values);
- bool stringValue_p(const QString& name, QString& value, int type);
- bool stringListValue_p(const QString& name, QStringList& values, int type);
- bool integerValue_p(const QString& name, int& value, int type);
+ void addString_p(int group, int type, const TQString& name, const TQString& value);
+ void addStringList_p(int group, int type, const TQString& name, const TQStringList& values);
+ void addInteger_p(int group, int type, const TQString& name, int value);
+ void addIntegerList_p(int group, int type, const TQString& name, const TQValueList<int>& values);
+ bool stringValue_p(const TQString& name, TQString& value, int type);
+ bool stringListValue_p(const TQString& name, TQStringList& values, int type);
+ bool integerValue_p(const TQString& name, int& value, int type);
private:
ipp_t *request_;
@@ -103,79 +103,79 @@ private:
int dump_;
};
-inline void IppRequest::addMime(int group, const QString& name, const QString& mime)
+inline void IppRequest::addMime(int group, const TQString& name, const TQString& mime)
{ addString_p(group, IPP_TAG_MIMETYPE, name, mime); }
-inline void IppRequest::addKeyword(int group, const QString& name, const QString& key)
+inline void IppRequest::addKeyword(int group, const TQString& name, const TQString& key)
{ addString_p(group, IPP_TAG_KEYWORD, name, key); }
-inline void IppRequest::addKeyword(int group, const QString& name, const QStringList& keys)
+inline void IppRequest::addKeyword(int group, const TQString& name, const TQStringList& keys)
{ addStringList_p(group, IPP_TAG_KEYWORD, name, keys); }
-inline void IppRequest::addURI(int group, const QString& name, const QString& uri)
+inline void IppRequest::addURI(int group, const TQString& name, const TQString& uri)
{ addString_p(group, IPP_TAG_URI, name, uri); }
-inline void IppRequest::addURI(int group, const QString& name, const QStringList& uris)
+inline void IppRequest::addURI(int group, const TQString& name, const TQStringList& uris)
{ addStringList_p(group, IPP_TAG_URI, name, uris); }
-inline void IppRequest::addText(int group, const QString& name, const QString& txt)
+inline void IppRequest::addText(int group, const TQString& name, const TQString& txt)
{ addString_p(group, IPP_TAG_TEXT, name, txt); }
-inline void IppRequest::addText(int group, const QString& name, const QStringList& txts)
+inline void IppRequest::addText(int group, const TQString& name, const TQStringList& txts)
{ addStringList_p(group, IPP_TAG_TEXT, name, txts); }
-inline void IppRequest::addName(int group, const QString& name, const QString& nm)
+inline void IppRequest::addName(int group, const TQString& name, const TQString& nm)
{ addString_p(group, IPP_TAG_NAME, name, nm); }
-inline void IppRequest::addName(int group, const QString& name, const QStringList& nms)
+inline void IppRequest::addName(int group, const TQString& name, const TQStringList& nms)
{ addStringList_p(group, IPP_TAG_NAME, name, nms); }
-inline void IppRequest::addInteger(int group, const QString& name, int value)
+inline void IppRequest::addInteger(int group, const TQString& name, int value)
{ addInteger_p(group, IPP_TAG_INTEGER, name, value); }
-inline void IppRequest::addInteger(int group, const QString& name, const QValueList<int>& values)
+inline void IppRequest::addInteger(int group, const TQString& name, const TQValueList<int>& values)
{ addIntegerList_p(group, IPP_TAG_INTEGER, name, values); }
-inline void IppRequest::addEnum(int group, const QString& name, int value)
+inline void IppRequest::addEnum(int group, const TQString& name, int value)
{ addInteger_p(group, IPP_TAG_ENUM, name, value); }
-inline void IppRequest::addEnum(int group, const QString& name, const QValueList<int>& values)
+inline void IppRequest::addEnum(int group, const TQString& name, const TQValueList<int>& values)
{ addIntegerList_p(group, IPP_TAG_ENUM, name, values); }
-inline bool IppRequest::integer(const QString& name, int& value)
+inline bool IppRequest::integer(const TQString& name, int& value)
{ return integerValue_p(name, value, IPP_TAG_INTEGER); }
-inline bool IppRequest::enumvalue(const QString& name, int& value)
+inline bool IppRequest::enumvalue(const TQString& name, int& value)
{ return integerValue_p(name, value, IPP_TAG_ENUM); }
-inline bool IppRequest::name(const QString& name, QString& value)
+inline bool IppRequest::name(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_NAME); }
-inline bool IppRequest::name(const QString& name, QStringList& values)
+inline bool IppRequest::name(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_NAME); }
-inline bool IppRequest::text(const QString& name, QString& value)
+inline bool IppRequest::text(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_TEXT); }
-inline bool IppRequest::text(const QString& name, QStringList& values)
+inline bool IppRequest::text(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_TEXT); }
-inline bool IppRequest::uri(const QString& name, QString& value)
+inline bool IppRequest::uri(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_URI); }
-inline bool IppRequest::uri(const QString& name, QStringList& values)
+inline bool IppRequest::uri(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_URI); }
-inline bool IppRequest::keyword(const QString& name, QString& value)
+inline bool IppRequest::keyword(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_KEYWORD); }
-inline bool IppRequest::keyword(const QString& name, QStringList& values)
+inline bool IppRequest::keyword(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_KEYWORD); }
-inline bool IppRequest::mime(const QString& name, QString& value)
+inline bool IppRequest::mime(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_MIMETYPE); }
-inline bool IppRequest::doRequest(const QString& res)
+inline bool IppRequest::doRequest(const TQString& res)
{ return doFileRequest(res); }
inline ipp_attribute_t* IppRequest::first()
@@ -184,7 +184,7 @@ inline ipp_attribute_t* IppRequest::first()
inline ipp_attribute_t* IppRequest::last()
{ return (request_ ? request_->last : NULL); }
-inline void IppRequest::setHost(const QString& host)
+inline void IppRequest::setHost(const TQString& host)
{ host_ = host; }
inline void IppRequest::setPort(int p)
diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp
index 665183063..1bf6d55bf 100644
--- a/kdeprint/cups/kcupsprinterimpl.cpp
+++ b/kdeprint/cups/kcupsprinterimpl.cpp
@@ -24,14 +24,14 @@
#include "kmmanager.h"
#include "cupsinfos.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <cups/cups.h>
#include <stdlib.h>
#include <kprocess.h>
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd);
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd);
-QSize rangeToSize(const QString& s)
+TQSize rangeToSize(const TQString& s)
{
QString range = s;
int p(-1);
@@ -49,11 +49,11 @@ QSize rangeToSize(const QString& s)
else
from = to = 0;
- return QSize(from,to);
+ return TQSize(from,to);
}
//******************************************************************************************************
-KCupsPrinterImpl::KCupsPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KCupsPrinterImpl::KCupsPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -62,13 +62,13 @@ KCupsPrinterImpl::~KCupsPrinterImpl()
{
}
-bool KCupsPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// check printer object
if (!printer) return false;
- QString hoststr = QString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
- cmd = QString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
+ QString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
+ cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
if (!CupsInfos::self()->login().isEmpty())
{
QString userstr(CupsInfos::self()->login());
@@ -107,12 +107,12 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
}
else
{ // No translation needed (but range => (from,to))
- QString range = printer->option("kde-range");
+ TQString range = printer->option("kde-range");
if (!range.isEmpty())
{
QSize s = rangeToSize(range);
- printer->setOption("kde-from",QString::number(s.width()));
- printer->setOption("kde-to",QString::number(s.height()));
+ printer->setOption("kde-from",TQString::number(s.width()));
+ printer->setOption("kde-to",TQString::number(s.height()));
}
}
@@ -120,14 +120,14 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
KPrinterImpl::preparePrinting(printer);
}
-void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
KPrinterImpl::broadcastOption(key,value);
if (key == "kde-orientation")
KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3"));
else if (key == "kde-pagesize")
{
- QString pagename = QString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
+ QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
KPrinterImpl::broadcastOption("PageSize",pagename);
// simple hack for classes
KPrinterImpl::broadcastOption("media",pagename);
@@ -136,15 +136,15 @@ void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
//******************************************************************************************************
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd)
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd)
{
QString optstr;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
// only encode those options that doesn't start with "kde-" or "app-".
if (!it.key().startsWith("kde-") && !it.key().startsWith("app-") && !it.key().startsWith("_kde"))
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("KDEPrint-"))
/* Those are keys added by the "Additional Tags" page. *
* Strip the prefix to build valid a CUPS option. */
diff --git a/kdeprint/cups/kcupsprinterimpl.h b/kdeprint/cups/kcupsprinterimpl.h
index 81b0a364a..f2eeab88f 100644
--- a/kdeprint/cups/kcupsprinterimpl.h
+++ b/kdeprint/cups/kcupsprinterimpl.h
@@ -25,12 +25,12 @@
class KCupsPrinterImpl : public KPrinterImpl
{
public:
- KCupsPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/ = QStringList());
+ KCupsPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/ = TQStringList());
~KCupsPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
void preparePrinting(KPrinter*);
- void broadcastOption(const QString& key, const QString& value);
+ void broadcastOption(const TQString& key, const TQString& value);
};
#endif
diff --git a/kdeprint/cups/kmconfigcups.cpp b/kdeprint/cups/kmconfigcups.cpp
index 3d5ece0ab..c23f5d54c 100644
--- a/kdeprint/cups/kmconfigcups.cpp
+++ b/kdeprint/cups/kmconfigcups.cpp
@@ -24,9 +24,9 @@
#include <kconfig.h>
#include <kdialog.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-KMConfigCups::KMConfigCups(QWidget *parent)
+KMConfigCups::KMConfigCups(TQWidget *parent)
: KMConfigPage(parent,"ConfigCups")
{
setPageName(i18n("CUPS Server"));
@@ -35,7 +35,7 @@ KMConfigCups::KMConfigCups(QWidget *parent)
m_widget = new KMCupsConfigWidget(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_widget);
lay0->addStretch(1);
}
diff --git a/kdeprint/cups/kmconfigcups.h b/kdeprint/cups/kmconfigcups.h
index 3f0afa2bb..52dac657c 100644
--- a/kdeprint/cups/kmconfigcups.h
+++ b/kdeprint/cups/kmconfigcups.h
@@ -27,7 +27,7 @@ class KMCupsConfigWidget;
class KMConfigCups : public KMConfigPage
{
public:
- KMConfigCups(QWidget *parent = 0);
+ KMConfigCups(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/cups/kmconfigcupsdir.cpp b/kdeprint/cups/kmconfigcupsdir.cpp
index 31005752d..5e6958565 100644
--- a/kdeprint/cups/kmconfigcupsdir.cpp
+++ b/kdeprint/cups/kmconfigcupsdir.cpp
@@ -19,36 +19,36 @@
#include "kmconfigcupsdir.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <klocale.h>
#include <kdialog.h>
#include <kconfig.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <kcursor.h>
-KMConfigCupsDir::KMConfigCupsDir(QWidget *parent)
+KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent)
: KMConfigPage(parent,"ConfigCupsDir")
{
setPageName(i18n("Folder"));
setPageHeader(i18n("CUPS Folder Settings"));
setPagePixmap("folder");
- QGroupBox *m_dirbox = new QGroupBox(0, Qt::Vertical, i18n("Installation Folder"), this);
+ TQGroupBox *m_dirbox = new TQGroupBox(0, Qt::Vertical, i18n("Installation Folder"), this);
m_installdir = new KURLRequester(m_dirbox);
m_installdir->setMode((KFile::Mode)(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly));
- m_stddir = new QCheckBox(i18n("Standard installation (/)"), m_dirbox);
+ m_stddir = new TQCheckBox(i18n("Standard installation (/)"), m_dirbox);
m_stddir->setCursor(KCursor::handCursor());
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_dirbox);
lay0->addStretch(1);
- QVBoxLayout *lay1 = new QVBoxLayout(m_dirbox->layout(), 10);
+ TQVBoxLayout *lay1 = new TQVBoxLayout(m_dirbox->layout(), 10);
lay1->addWidget(m_stddir);
lay1->addWidget(m_installdir);
- connect(m_stddir,SIGNAL(toggled(bool)),m_installdir,SLOT(setDisabled(bool)));
+ connect(m_stddir,TQT_SIGNAL(toggled(bool)),m_installdir,TQT_SLOT(setDisabled(bool)));
m_stddir->setChecked(true);
}
@@ -63,5 +63,5 @@ void KMConfigCupsDir::loadConfig(KConfig *conf)
void KMConfigCupsDir::saveConfig(KConfig *conf)
{
conf->setGroup("CUPS");
- conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? QString::null : m_installdir->url()));
+ conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? TQString::null : m_installdir->url()));
}
diff --git a/kdeprint/cups/kmconfigcupsdir.h b/kdeprint/cups/kmconfigcupsdir.h
index 253b2bd2d..ca365ba19 100644
--- a/kdeprint/cups/kmconfigcupsdir.h
+++ b/kdeprint/cups/kmconfigcupsdir.h
@@ -28,7 +28,7 @@ class QCheckBox;
class KMConfigCupsDir : public KMConfigPage
{
public:
- KMConfigCupsDir(QWidget *parent = 0);
+ KMConfigCupsDir(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/cups/kmcupsconfigwidget.cpp b/kdeprint/cups/kmcupsconfigwidget.cpp
index 9c3fa7516..684d8b850 100644
--- a/kdeprint/cups/kmcupsconfigwidget.cpp
+++ b/kdeprint/cups/kmcupsconfigwidget.cpp
@@ -20,13 +20,13 @@
#include "kmcupsconfigwidget.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kcursor.h>
@@ -36,64 +36,64 @@
class PortValidator : public QIntValidator
{
public:
- PortValidator(QWidget *parent, const char *name = 0);
- virtual QValidator::State validate(QString&, int&) const;
+ PortValidator(TQWidget *parent, const char *name = 0);
+ virtual TQValidator::State validate(TQString&, int&) const;
};
-PortValidator::PortValidator(QWidget *parent, const char *name)
-: QIntValidator(1, 65535, parent, name)
+PortValidator::PortValidator(TQWidget *parent, const char *name)
+: TQIntValidator(1, 65535, parent, name)
{
}
-QValidator::State PortValidator::validate(QString& txt, int&) const
+TQValidator::State PortValidator::validate(TQString& txt, int&) const
{
bool ok(false);
int p = txt.toInt(&ok);
if (txt.isEmpty())
- return QValidator::Intermediate;
+ return TQValidator::Intermediate;
else if (ok && p >= bottom() && p <= top())
- return QValidator::Acceptable;
- return QValidator::Invalid;
+ return TQValidator::Acceptable;
+ return TQValidator::Invalid;
}
//******************************************************************************************
-KMCupsConfigWidget::KMCupsConfigWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
// widget creation
- QGroupBox *m_hostbox = new QGroupBox(0, Qt::Vertical, i18n("Server Information"), this);
- QGroupBox *m_loginbox = new QGroupBox(0, Qt::Vertical, i18n("Account Information"), this);
- QLabel *m_hostlabel = new QLabel(i18n("&Host:"), m_hostbox);
- QLabel *m_portlabel = new QLabel(i18n("&Port:"), m_hostbox);
- m_host = new QLineEdit(m_hostbox);
- m_port = new QLineEdit(m_hostbox);
+ QGroupBox *m_hostbox = new TQGroupBox(0, Qt::Vertical, i18n("Server Information"), this);
+ QGroupBox *m_loginbox = new TQGroupBox(0, Qt::Vertical, i18n("Account Information"), this);
+ QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), m_hostbox);
+ QLabel *m_portlabel = new TQLabel(i18n("&Port:"), m_hostbox);
+ m_host = new TQLineEdit(m_hostbox);
+ m_port = new TQLineEdit(m_hostbox);
m_hostlabel->setBuddy(m_host);
m_portlabel->setBuddy(m_port);
m_port->setValidator(new PortValidator(m_port));
- m_login = new QLineEdit(m_loginbox);
- QLabel *m_loginlabel = new QLabel(i18n("&User:"), m_loginbox);
- QLabel *m_passwordlabel = new QLabel(i18n("Pass&word:"), m_loginbox);
- m_password = new QLineEdit(m_loginbox);
- m_password->setEchoMode(QLineEdit::Password);
- m_savepwd = new QCheckBox( i18n( "&Store password in configuration file" ), m_loginbox );
+ m_login = new TQLineEdit(m_loginbox);
+ QLabel *m_loginlabel = new TQLabel(i18n("&User:"), m_loginbox);
+ QLabel *m_passwordlabel = new TQLabel(i18n("Pass&word:"), m_loginbox);
+ m_password = new TQLineEdit(m_loginbox);
+ m_password->setEchoMode(TQLineEdit::Password);
+ m_savepwd = new TQCheckBox( i18n( "&Store password in configuration file" ), m_loginbox );
m_savepwd->setCursor( KCursor::handCursor() );
- m_anonymous = new QCheckBox(i18n("Use &anonymous access"), m_loginbox);
+ m_anonymous = new TQCheckBox(i18n("Use &anonymous access"), m_loginbox);
m_anonymous->setCursor(KCursor::handCursor());
m_loginlabel->setBuddy(m_login);
m_passwordlabel->setBuddy(m_password);
// layout creation
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
lay0->addWidget(m_hostbox,1);
lay0->addWidget(m_loginbox,1);
- QGridLayout *lay2 = new QGridLayout(m_hostbox->layout(), 2, 2, 10);
+ QGridLayout *lay2 = new TQGridLayout(m_hostbox->layout(), 2, 2, 10);
lay2->setColStretch(1,1);
lay2->addWidget(m_hostlabel,0,0);
lay2->addWidget(m_portlabel,1,0);
lay2->addWidget(m_host,0,1);
lay2->addWidget(m_port,1,1);
- QGridLayout *lay3 = new QGridLayout(m_loginbox->layout(), 4, 2, 10);
+ QGridLayout *lay3 = new TQGridLayout(m_loginbox->layout(), 4, 2, 10);
lay3->setColStretch(1,1);
lay3->addWidget(m_loginlabel,0,0);
lay3->addWidget(m_passwordlabel,1,0);
@@ -103,16 +103,16 @@ KMCupsConfigWidget::KMCupsConfigWidget(QWidget *parent, const char *name)
lay3->addMultiCellWidget(m_anonymous,3,3,0,1);
// connections
- connect(m_anonymous,SIGNAL(toggled(bool)),m_login,SLOT(setDisabled(bool)));
- connect(m_anonymous,SIGNAL(toggled(bool)),m_password,SLOT(setDisabled(bool)));
- connect(m_anonymous,SIGNAL(toggled(bool)),m_savepwd,SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_login,TQT_SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_password,TQT_SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_savepwd,TQT_SLOT(setDisabled(bool)));
}
void KMCupsConfigWidget::load()
{
CupsInfos *inf = CupsInfos::self();
m_host->setText(inf->host());
- m_port->setText(QString::number(inf->port()));
+ m_port->setText(TQString::number(inf->port()));
if (inf->login().isEmpty())
m_anonymous->setChecked(true);
else
@@ -130,8 +130,8 @@ void KMCupsConfigWidget::save(bool sync)
inf->setPort(m_port->text().toInt());
if (m_anonymous->isChecked())
{
- inf->setLogin(QString::null);
- inf->setPassword(QString::null);
+ inf->setLogin(TQString::null);
+ inf->setPassword(TQString::null);
inf->setSavePassword( false );
}
else
@@ -148,10 +148,10 @@ void KMCupsConfigWidget::saveConfig(KConfig *conf)
conf->setGroup("CUPS");
conf->writeEntry("Host",m_host->text());
conf->writeEntry("Port",m_port->text().toInt());
- conf->writeEntry("Login",(m_anonymous->isChecked() ? QString::null : m_login->text()));
+ conf->writeEntry("Login",(m_anonymous->isChecked() ? TQString::null : m_login->text()));
conf->writeEntry( "SavePassword", ( m_anonymous->isChecked() ? false : m_savepwd->isChecked() ) );
if ( m_savepwd->isChecked() && !m_anonymous->isChecked() )
- conf->writeEntry( "Password", ( m_anonymous->isChecked() ? QString::null : KStringHandler::obscure( m_password->text() ) ) );
+ conf->writeEntry( "Password", ( m_anonymous->isChecked() ? TQString::null : KStringHandler::obscure( m_password->text() ) ) );
else
conf->deleteEntry( "Password" );
// synchronize CupsInfos object
diff --git a/kdeprint/cups/kmcupsconfigwidget.h b/kdeprint/cups/kmcupsconfigwidget.h
index 34c488290..ef493166a 100644
--- a/kdeprint/cups/kmcupsconfigwidget.h
+++ b/kdeprint/cups/kmcupsconfigwidget.h
@@ -20,7 +20,7 @@
#ifndef KMCUPSCONFIGWIDGET_H
#define KMCUPSCONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QCheckBox;
@@ -29,7 +29,7 @@ class KConfig;
class KMCupsConfigWidget : public QWidget
{
public:
- KMCupsConfigWidget(QWidget *parent = 0, const char *name = 0);
+ KMCupsConfigWidget(TQWidget *parent = 0, const char *name = 0);
void load();
void save(bool sync = true);
diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp
index 73f6005d9..011256cd6 100644
--- a/kdeprint/cups/kmcupsjobmanager.cpp
+++ b/kdeprint/cups/kmcupsjobmanager.cpp
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <kurl.h>
-KMCupsJobManager::KMCupsJobManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMCupsJobManager::KMCupsJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMJobManager(parent,name)
{
}
@@ -50,13 +50,13 @@ int KMCupsJobManager::actions()
return KMJob::All;
}
-bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& argstr)
+bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& argstr)
{
IppRequest req;
QString uri;
bool value(true);
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
for (;it.current() && value;++it)
{
// hypothesis: job operation are always done on local jobs. The only operation
@@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int act
if (argstr.isEmpty()) return false;
req.setOperation(CUPS_MOVE_JOB);
uri =
- QString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(),
+ TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(),
argstr);
req.addURI(IPP_TAG_OPERATION, "job-printer-uri", uri);
break;
@@ -108,7 +108,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int act
return value;
}
-bool KMCupsJobManager::listJobs(const QString& prname, KMJobManager::JobType type, int limit)
+bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType type, int limit)
{
IppRequest req;
QStringList keys;
@@ -144,13 +144,13 @@ bool KMCupsJobManager::listJobs(const QString& prname, KMJobManager::JobType typ
*/
}
else
- req.addURI(IPP_TAG_OPERATION, "printer-uri", QString("ipp://%1/%2/%3").arg(infos->hostaddr(),
+ req.addURI(IPP_TAG_OPERATION, "printer-uri", TQString("ipp://%1/%2/%3").arg(infos->hostaddr(),
(mp&&mp->isClass())?"classes":"printers", prname));
// other attributes
req.addKeyword(IPP_TAG_OPERATION, "requested-attributes", keys);
if (type == KMJobManager::CompletedJobs)
- req.addKeyword(IPP_TAG_OPERATION,"which-jobs",QString::fromLatin1("completed"));
+ req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::fromLatin1("completed"));
if (limit > 0)
req.addInteger(IPP_TAG_OPERATION,"limit",limit);
@@ -172,8 +172,8 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
{
QString name(attr->name);
if (name == "job-id") job->setId(attr->values[0].integer);
- else if (name == "job-uri") job->setUri(QString::fromLocal8Bit(attr->values[0].string.text));
- else if (name == "job-name") job->setName(QString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-uri") job->setUri(TQString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-name") job->setName(TQString::fromLocal8Bit(attr->values[0].string.text));
else if (name == "job-state")
{
switch (attr->values[0].integer)
@@ -205,7 +205,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
}
}
else if (name == "job-k-octets") job->setSize(attr->values[0].integer);
- else if (name == "job-originating-user-name") job->setOwner(QString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-originating-user-name") job->setOwner(TQString::fromLocal8Bit(attr->values[0].string.text));
else if (name == "job-k-octets-completed") job->setProcessedSize(attr->values[0].integer);
else if (name == "job-media-sheets") job->setPages(attr->values[0].integer);
else if (name == "job-media-sheets-completed") job->setProcessedPages(attr->values[0].integer);
@@ -218,12 +218,12 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
}
else if (name == "job-priority")
{
- job->setAttribute(0, QString::fromLatin1("%1").arg(attr->values[0].integer, 3));
+ job->setAttribute(0, TQString::fromLatin1("%1").arg(attr->values[0].integer, 3));
}
else if (name == "job-billing")
{
job->setAttributeCount(2);
- job->setAttribute(1, QString::fromLocal8Bit(attr->values[0].string.text));
+ job->setAttribute(1, TQString::fromLocal8Bit(attr->values[0].string.text));
}
if (name.isEmpty() || attr == req.last())
@@ -240,7 +240,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
delete job;
}
-bool KMCupsJobManager::doPluginAction(int ID, const QPtrList<KMJob>& jobs)
+bool KMCupsJobManager::doPluginAction(int ID, const TQPtrList<KMJob>& jobs)
{
switch (ID)
{
@@ -280,9 +280,9 @@ bool KMCupsJobManager::jobIppReport(KMJob *j)
return result;
}
-QValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *coll)
+TQValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *coll)
{
- QValueList<KAction*> list;
+ TQValueList<KAction*> list;
KAction *act(0);
list << (act = new PluginAction(0, i18n("&Job IPP Report"), "kdeprint_report", 0, coll, "plugin_ipp"));
@@ -297,9 +297,9 @@ QValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *co
return list;
}
-void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const QPtrList<KMJob>& joblist)
+void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPtrList<KMJob>& joblist)
{
- QPtrListIterator<KMJob> it(joblist);
+ TQPtrListIterator<KMJob> it(joblist);
bool flag(true);
for (; it.current(); ++it)
{
@@ -319,9 +319,9 @@ void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const QPtr
a->setEnabled( flag && ( joblist.count() == 1 ) );
}
-bool KMCupsJobManager::changePriority(const QPtrList<KMJob>& jobs, bool up)
+bool KMCupsJobManager::changePriority(const TQPtrList<KMJob>& jobs, bool up)
{
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool result(true);
for (; it.current() && result; ++it)
{
@@ -349,11 +349,11 @@ bool KMCupsJobManager::changePriority(const QPtrList<KMJob>& jobs, bool up)
return result;
}
-static QString processRange(const QString& range)
+static TQString processRange(const TQString& range)
{
- QStringList l = QStringList::split(',', range, false);
+ QStringList l = TQStringList::split(',', range, false);
QString s;
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
s.append(*it);
if ((*it).find('-') == -1)
@@ -385,7 +385,7 @@ bool KMCupsJobManager::editJobAttributes(KMJob *j)
return false;
}
- QMap<QString,QString> opts = req.toMap(IPP_TAG_JOB);
+ TQMap<TQString,TQString> opts = req.toMap(IPP_TAG_JOB);
// translate the "Copies" option to non-CUPS syntax
if (opts.contains("copies"))
opts["kde-copies"] = opts["copies"];
diff --git a/kdeprint/cups/kmcupsjobmanager.h b/kdeprint/cups/kmcupsjobmanager.h
index 27f3073aa..cba3371dc 100644
--- a/kdeprint/cups/kmcupsjobmanager.h
+++ b/kdeprint/cups/kmcupsjobmanager.h
@@ -22,7 +22,7 @@
#include "kmjobmanager.h"
#include "ipprequest.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KMPrinter;
@@ -31,22 +31,22 @@ class KMCupsJobManager : public KMJobManager
Q_OBJECT
public:
- KMCupsJobManager(QObject *parent, const char *name, const QStringList &/*args*/);
+ KMCupsJobManager(TQObject *parent, const char *name, const TQStringList &/*args*/);
virtual ~KMCupsJobManager();
int actions();
- QValueList<KAction*> createPluginActions(KActionCollection*);
- void validatePluginActions(KActionCollection*, const QPtrList<KMJob>&);
- bool doPluginAction(int, const QPtrList<KMJob>&);
+ TQValueList<KAction*> createPluginActions(KActionCollection*);
+ void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&);
+ bool doPluginAction(int, const TQPtrList<KMJob>&);
protected:
bool jobIppReport(KMJob*);
- bool changePriority(const QPtrList<KMJob>&, bool);
+ bool changePriority(const TQPtrList<KMJob>&, bool);
bool editJobAttributes(KMJob*);
protected:
- bool listJobs(const QString&, JobType, int = 0);
- bool sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
+ bool listJobs(const TQString&, JobType, int = 0);
+ bool sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
void parseListAnswer(IppRequest& req, KMPrinter *pr);
};
diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp
index 003d408fc..63513ba55 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -33,12 +33,12 @@
#include "foomatic2loader.h"
#include "ppdloader.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qsocket.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -58,17 +58,17 @@
#include <cups/ppd.h>
#include <math.h>
-#define ppdi18n(s) i18n(QString::fromLocal8Bit(s).utf8())
+#define ppdi18n(s) i18n(TQString::fromLocal8Bit(s).utf8())
-static void extractMaticData(QString& buf, const QString& filename);
-static QString printerURI(KMPrinter *p, bool useExistingURI);
-static QString downloadDriver(KMPrinter *p);
+static void extractMaticData(TQString& buf, const TQString& filename);
+static TQString printerURI(KMPrinter *p, bool useExistingURI);
+static TQString downloadDriver(KMPrinter *p);
static int trials = 5;
//*****************************************************************************************************
- KMCupsManager::KMCupsManager(QObject *parent, const char *name, const QStringList & /*args*/)
+ KMCupsManager::KMCupsManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
// be sure to create the CupsInfos object -> password
@@ -93,12 +93,12 @@ KMCupsManager::~KMCupsManager()
delete m_socket;
}
-QString KMCupsManager::driverDbCreationProgram()
+TQString KMCupsManager::driverDbCreationProgram()
{
- return QString::fromLatin1("/opt/kde3/bin/make_driver_db_cups");
+ return TQString::fromLatin1("/opt/kde3/bin/make_driver_db_cups");
}
-QString KMCupsManager::driverDirectory()
+TQString KMCupsManager::driverDirectory()
{
QString d = cupsInstallDir();
if (d.isEmpty())
@@ -109,7 +109,7 @@ QString KMCupsManager::driverDirectory()
return d;
}
-QString KMCupsManager::cupsInstallDir()
+TQString KMCupsManager::cupsInstallDir()
{
KConfig *conf= KMFactory::self()->printConfig();
conf->setGroup("CUPS");
@@ -138,8 +138,8 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
req.setOperation(CUPS_ADD_CLASS);
QStringList members = p->members(), uris;
QString s;
- s = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
- for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
+ s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
uris.append(s+(*it));
req.addURI(IPP_TAG_PRINTER,"member-uris",uris);
}
@@ -152,7 +152,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
if (!otherP || otherP->device() != p->device())
{
/**
- * As now the device is a QString instead of KURL, special encoding
+ * As now the device is a TQString instead of KURL, special encoding
* required for SMB is not needed anymore. Use a unique mechanism
* for all backends.
*/
@@ -160,7 +160,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
}
if (!p->option("kde-banners").isEmpty())
{
- QStringList bans = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList bans = TQStringList::split(',',p->option("kde-banners"),false);
while (bans.count() < 2)
bans.append("none");
req.addName(IPP_TAG_PRINTER,"job-sheets-default",bans);
@@ -169,11 +169,11 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
req.addInteger(IPP_TAG_PRINTER,"job-k-limit",p->option("job-k-limit").toInt());
req.addInteger(IPP_TAG_PRINTER,"job-page-limit",p->option("job-page-limit").toInt());
if (!p->option("requesting-user-name-denied").isEmpty())
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-denied",QStringList::split(",",p->option("requesting-user-name-denied"),false));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-denied",TQStringList::split(",",p->option("requesting-user-name-denied"),false));
else if (!p->option("requesting-user-name-allowed").isEmpty())
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",QStringList::split(",",p->option("requesting-user-name-allowed"),false));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false));
else
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",QString::fromLatin1("all"));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all"));
}
req.addText(IPP_TAG_PRINTER,"printer-info",p->description());
req.addText(IPP_TAG_PRINTER,"printer-location",p->location());
@@ -247,11 +247,11 @@ bool KMCupsManager::completePrinter(KMPrinter *p)
// update the KMPrinter object
p->setManufacturer(entry.manufacturer);
p->setModel(entry.model);
- p->setDriverInfo(QString::fromLocal8Bit(ppd->nickname));
+ p->setDriverInfo(TQString::fromLocal8Bit(ppd->nickname));
ppdClose(ppd);
}
if (!ppdname.isEmpty())
- QFile::remove(ppdname);
+ TQFile::remove(ppdname);
return true;
}
@@ -281,14 +281,14 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
// Give 2 seconds to connect to the printer, or abort
KExtendedSocket *kes = new KExtendedSocket(p->uri().host(),
p->uri().port());
- connect(kes, SIGNAL(connectionSuccess()), this, SLOT(hostPingSlot()));
- connect(kes, SIGNAL(connectionFailed(int)), this, SLOT(hostPingFailedSlot()));
+ connect(kes, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(hostPingSlot()));
+ connect(kes, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(hostPingFailedSlot()));
if (kes->startAsyncConnect() != 0) {
delete kes;
m_hostSuccess = false;
} else {
- QDateTime tm = QDateTime::currentDateTime().addSecs(2);
- while (!m_lookupDone && (QDateTime::currentDateTime() < tm))
+ TQDateTime tm = TQDateTime::currentDateTime().addSecs(2);
+ while (!m_lookupDone && (TQDateTime::currentDateTime() < tm))
qApp->processEvents();
kes->cancelAsyncConnect();
@@ -337,7 +337,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
{
/**
* No specific treatment required as the device is
- * a normal QString instead of a KURL
+ * a normal TQString instead of a KURL
*/
p->setDevice( value );
}
@@ -345,7 +345,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
/* if (req.uri("member-uris",values))
{
QStringList members;
- for (QStringList::ConstIterator it=values.begin(); it!=values.end(); ++it)
+ for (TQStringList::ConstIterator it=values.begin(); it!=values.end(); ++it)
{
int p = (*it).findRev('/');
if (p != -1)
@@ -358,14 +358,14 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
// banners
req.name("job-sheets-default",values);
while (values.count() < 2) values.append("none");
- p->setOption("kde-banners",values.join(QString::fromLatin1(",")));
- if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(QString::fromLatin1(",")));
+ p->setOption("kde-banners",values.join(TQString::fromLatin1(",")));
+ if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(",")));
// quotas
int ival;
- if (req.integer("job-quota-period",ival)) p->setOption("job-quota-period",QString::number(ival));
- if (req.integer("job-k-limit",ival)) p->setOption("job-k-limit",QString::number(ival));
- if (req.integer("job-page-limit",ival)) p->setOption("job-page-limit",QString::number(ival));
+ if (req.integer("job-quota-period",ival)) p->setOption("job-quota-period",TQString::number(ival));
+ if (req.integer("job-k-limit",ival)) p->setOption("job-k-limit",TQString::number(ival));
+ if (req.integer("job-page-limit",ival)) p->setOption("job-page-limit",TQString::number(ival));
// access permissions (allow and deny are mutually exclusives)
if (req.name("requesting-user-name-allowed",values) && values.count() > 0)
@@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p)
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript");
if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login());
- req.addName(IPP_TAG_OPERATION,"job-name",QString::fromLatin1("KDE Print Test"));
+ req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test"));
if (req.doFileRequest("/printers/",testpage))
return true;
reportIppError(&req);
@@ -435,7 +435,7 @@ void KMCupsManager::loadServerPrinters()
req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",keys);
// filtering by username (hides printers user doesn't have allowance to use)
- req.addName(IPP_TAG_OPERATION, "requesting-user-name", QString(cupsUser()));
+ req.addName(IPP_TAG_OPERATION, "requesting-user-name", TQString(cupsUser()));
if (req.doRequest("/printers/"))
{
@@ -453,10 +453,10 @@ void KMCupsManager::loadServerPrinters()
// load default
req.init();
req.setOperation(CUPS_GET_DEFAULT);
- req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",QString::fromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
- QString s = QString::null;
+ QString s = TQString::null;
req.name("printer-name",s);
setHardDefault(findPrinter(s));
}
@@ -482,7 +482,7 @@ void KMCupsManager::processRequest(IppRequest* req)
QString attrname(attr->name);
if (attrname == "printer-name")
{
- QString value = QString::fromLocal8Bit(attr->values[0].string.text);
+ QString value = TQString::fromLocal8Bit(attr->values[0].string.text);
printer->setName(value);
printer->setPrinterName(value);
}
@@ -512,7 +512,7 @@ void KMCupsManager::processRequest(IppRequest* req)
}
else if (attrname == "printer-location")
{
- printer->setLocation(QString::fromLocal8Bit(attr->values[0].string.text));
+ printer->setLocation(TQString::fromLocal8Bit(attr->values[0].string.text));
}
else if (attrname == "printer-is-accepting-jobs")
{
@@ -562,7 +562,7 @@ DrMain* KMCupsManager::loadPrinterDriver(KMPrinter *p, bool)
return driver;
}
-DrMain* KMCupsManager::loadFileDriver(const QString& filename)
+DrMain* KMCupsManager::loadFileDriver(const TQString& filename)
{
if (filename.startsWith("ppd:"))
return loadDriverFile(filename.mid(4));
@@ -572,11 +572,11 @@ DrMain* KMCupsManager::loadFileDriver(const QString& filename)
return loadDriverFile(filename);
}
-DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
+DrMain* KMCupsManager::loadMaticDriver(const TQString& drname)
{
- QStringList comps = QStringList::split('/', drname, false);
+ QStringList comps = TQStringList::split('/', drname, false);
QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -587,7 +587,7 @@ DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
KPipeProcess in;
QFile out(tmpFile);
- QString cmd = KProcess::quote(exe);
+ TQString cmd = KProcess::quote(exe);
cmd += " -t cups -d ";
cmd += KProcess::quote(comps[2]);
cmd += " -p ";
@@ -615,15 +615,15 @@ DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
setErrorMsg(i18n("Unable to create the Foomatic driver [%1,%2]. "
"Either that driver does not exist, or you don't have "
"the required permissions to perform that operation.").arg(comps[1]).arg(comps[2]));
- QFile::remove(tmpFile);
+ TQFile::remove(tmpFile);
return NULL;
}
-DrMain* KMCupsManager::loadDriverFile(const QString& fname)
+DrMain* KMCupsManager::loadDriverFile(const TQString& fname)
{
- if (QFile::exists(fname))
+ if (TQFile::exists(fname))
{
- QString msg; /* possible error message */
+ TQString msg; /* possible error message */
DrMain *driver = PPDLoader::loadDriver( fname, &msg );
if ( driver )
{
@@ -637,10 +637,10 @@ DrMain* KMCupsManager::loadDriverFile(const QString& fname)
return NULL;
}
-void KMCupsManager::saveDriverFile(DrMain *driver, const QString& filename)
+void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
{
kdDebug( 500 ) << "Saving PPD file with template=" << driver->get( "template" ) << endl;
- QIODevice *in = KFilterDev::deviceForFile( driver->get( "template" ) );
+ TQIODevice *in = KFilterDev::deviceForFile( driver->get( "template" ) );
QFile out(filename);
if (in && in->open(IO_ReadOnly) && out.open(IO_WriteOnly))
{
@@ -691,7 +691,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const QString& filename)
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
- bopt = driver->findOption( QString::fromLatin1( "PageSize" ) );
+ bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) );
else
bopt = driver->findOption( keyword );
if (bopt)
@@ -751,7 +751,7 @@ bool KMCupsManager::savePrinterDriver(KMPrinter *p, DrMain *d)
result = req.doFileRequest("/admin/",tmpfilename);
// remove temporary file
- QFile::remove(tmpfilename);
+ TQFile::remove(tmpfilename);
if (!result)
reportIppError(&req);
@@ -787,7 +787,7 @@ void KMCupsManager::unloadCupsdConf()
bool KMCupsManager::restartServer()
{
QString msg;
- bool (*f1)(QString&) = (bool(*)(QString&))loadCupsdConfFunction("restartServer");
+ bool (*f1)(TQString&) = (bool(*)(TQString&))loadCupsdConfFunction("restartServer");
bool result(false);
if (f1)
{
@@ -798,10 +798,10 @@ bool KMCupsManager::restartServer()
return result;
}
-bool KMCupsManager::configureServer(QWidget *parent)
+bool KMCupsManager::configureServer(TQWidget *parent)
{
- QString msg;
- bool (*f2)(QWidget*, QString&) = (bool(*)(QWidget*, QString&))loadCupsdConfFunction("configureServer");
+ TQString msg;
+ bool (*f2)(TQWidget*, TQString&) = (bool(*)(TQWidget*, TQString&))loadCupsdConfFunction("configureServer");
bool result(false);
if (f2)
{
@@ -813,7 +813,7 @@ bool KMCupsManager::configureServer(QWidget *parent)
return result;
}
-QStringList KMCupsManager::detectLocalPrinters()
+TQStringList KMCupsManager::detectLocalPrinters()
{
QStringList list;
IppRequest req;
@@ -833,10 +833,10 @@ QStringList KMCupsManager::detectLocalPrinters()
{
if (!uri.isEmpty())
{
- if (printer == "Unknown") printer = QString::null;
+ if (printer == "Unknown") printer = TQString::null;
list << cl << uri << desc << printer;
}
- uri = desc = printer = cl = QString::null;
+ uri = desc = printer = cl = TQString::null;
}
attr = attr->next;
}
@@ -846,9 +846,9 @@ QStringList KMCupsManager::detectLocalPrinters()
void KMCupsManager::createPluginActions(KActionCollection *coll)
{
- KAction *act = new KAction(i18n("&Export Driver..."), "kdeprint_uploadsmb", 0, this, SLOT(exportDriver()), coll, "plugin_export_driver");
+ KAction *act = new KAction(i18n("&Export Driver..."), "kdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver");
act->setGroup("plugin");
- act = new KAction(i18n("&Printer IPP Report"), "kdeprint_report", 0, this, SLOT(printerIppReport()), coll, "plugin_printer_ipp_report");
+ act = new KAction(i18n("&Printer IPP Report"), "kdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report");
act->setGroup("plugin");
}
@@ -903,17 +903,17 @@ void KMCupsManager::printerIppReport()
}
}
-void KMCupsManager::ippReport(IppRequest& req, int group, const QString& caption)
+void KMCupsManager::ippReport(IppRequest& req, int group, const TQString& caption)
{
IppReportDlg::report(&req, group, caption);
}
-QString KMCupsManager::stateInformation()
+TQString KMCupsManager::stateInformation()
{
- return QString("%1: %2")
+ return TQString("%1: %2")
.arg(i18n("Server"))
.arg(CupsInfos::self()->host()[0] != '/' ?
- QString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port())
+ TQString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port())
: CupsInfos::self()->host());
}
@@ -923,12 +923,12 @@ void KMCupsManager::checkUpdatePossibleInternal()
delete m_socket;
m_socket = new KNetwork::KBufferedSocket;
m_socket->setTimeout( 1500 );
- connect( m_socket, SIGNAL( connected(const KResolverEntry&) ),
- SLOT( slotConnectionSuccess() ) );
- connect( m_socket, SIGNAL( gotError( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( m_socket, TQT_SIGNAL( connected(const KResolverEntry&) ),
+ TQT_SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, TQT_SIGNAL( gotError( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
trials = 5;
- QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( slotAsyncConnect() ) );
}
void KMCupsManager::slotConnectionSuccess()
@@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess()
IppRequest req;
req.setOperation( CUPS_GET_PRINTERS );
- req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", QString::fromLatin1( "printer-name" ) );
+ req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) );
if ( req.doRequest( "/printers/" ) )
setUpdatePossible( true );
else
@@ -947,7 +947,7 @@ void KMCupsManager::slotConnectionSuccess()
if ( trials > 0 )
{
trials--;
- QTimer::singleShot( 1000, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotAsyncConnect() ) );
}
else
{
@@ -963,7 +963,7 @@ void KMCupsManager::slotAsyncConnect()
kdDebug(500) << "Starting async connect to " << CupsInfos::self()->hostaddr() << endl;
//m_socket->startAsyncConnect();
if (CupsInfos::self()->host().startsWith("/"))
- m_socket->connect( QString(), CupsInfos::self()->host());
+ m_socket->connect( TQString(), CupsInfos::self()->host());
else
m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
}
@@ -977,19 +977,19 @@ void KMCupsManager::slotConnectionFailed( int errcode )
//m_socket->cancelAsyncConnect();
trials--;
m_socket->close();
- QTimer::singleShot( 1000, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotAsyncConnect() ) );
return;
}
- QString einfo;
+ TQString einfo;
switch (errcode) {
case KNetwork::KSocketBase::ConnectionRefused:
case KNetwork::KSocketBase::ConnectionTimedOut:
- einfo = i18n("connection refused") + QString(" (%1)").arg(errcode);
+ einfo = i18n("connection refused") + TQString(" (%1)").arg(errcode);
break;
case KNetwork::KSocketBase::LookupFailure:
- einfo = i18n("host not found") + QString(" (%1)").arg(errcode);
+ einfo = i18n("host not found") + TQString(" (%1)").arg(errcode);
break;
case KNetwork::KSocketBase::WouldBlock:
default:
@@ -1014,7 +1014,7 @@ void KMCupsManager::hostPingFailedSlot() {
//*****************************************************************************************************
-static void extractMaticData(QString& buf, const QString& filename)
+static void extractMaticData(TQString& buf, const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -1030,17 +1030,17 @@ static void extractMaticData(QString& buf, const QString& filename)
}
}
-static QString printerURI(KMPrinter *p, bool use)
+static TQString printerURI(KMPrinter *p, bool use)
{
QString uri;
if (use && !p->uri().isEmpty())
uri = p->uri().prettyURL();
else
- uri = QString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
+ uri = TQString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
return uri;
}
-static QString downloadDriver(KMPrinter *p)
+static TQString downloadDriver(KMPrinter *p)
{
QString driverfile, prname = p->printerName();
bool changed(false);
@@ -1056,7 +1056,7 @@ static QString downloadDriver(KMPrinter *p)
cupsSetServer(p->uri().host().local8Bit());
ippSetPort(p->uri().port());
// strip any "@..." from the printer name
- prname = prname.replace(QRegExp("@.*"), "");
+ prname = prname.replace(TQRegExp("@.*"), "");
changed = true;
}
*/
diff --git a/kdeprint/cups/kmcupsmanager.h b/kdeprint/cups/kmcupsmanager.h
index 54307fc86..132decb34 100644
--- a/kdeprint/cups/kmcupsmanager.h
+++ b/kdeprint/cups/kmcupsmanager.h
@@ -37,7 +37,7 @@ class KMCupsManager : public KMManager
Q_OBJECT
public:
- KMCupsManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMCupsManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
virtual ~KMCupsManager();
// printer management functions
@@ -52,20 +52,20 @@ public:
// printer listing functions
// driver DB functions
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
- DrMain* loadFileDriver(const QString& filename);
+ DrMain* loadFileDriver(const TQString& filename);
bool savePrinterDriver(KMPrinter *p, DrMain *d);
bool restartServer();
- bool configureServer(QWidget *parent = 0);
- QStringList detectLocalPrinters();
+ bool configureServer(TQWidget *parent = 0);
+ TQStringList detectLocalPrinters();
void createPluginActions(KActionCollection*);
void validatePluginActions(KActionCollection*, KMPrinter*);
- QString stateInformation();
+ TQString stateInformation();
public slots:
void exportDriver();
@@ -85,14 +85,14 @@ protected:
void loadServerPrinters();
void processRequest(IppRequest*);
bool setPrinterState(KMPrinter *p, int st);
- DrMain* loadDriverFile(const QString& filename);
- DrMain* loadMaticDriver(const QString& drname);
- void saveDriverFile(DrMain *driver, const QString& filename);
+ DrMain* loadDriverFile(const TQString& filename);
+ DrMain* loadMaticDriver(const TQString& drname);
+ void saveDriverFile(DrMain *driver, const TQString& filename);
void reportIppError(IppRequest*);
void* loadCupsdConfFunction(const char*);
void unloadCupsdConf();
- QString cupsInstallDir();
- void ippReport(IppRequest&, int, const QString&);
+ TQString cupsInstallDir();
+ void ippReport(IppRequest&, int, const TQString&);
void checkUpdatePossibleInternal();
private:
diff --git a/kdeprint/cups/kmcupsuimanager.cpp b/kdeprint/cups/kmcupsuimanager.cpp
index 897199f88..9cefccac3 100644
--- a/kdeprint/cups/kmcupsuimanager.cpp
+++ b/kdeprint/cups/kmcupsuimanager.cpp
@@ -53,14 +53,14 @@
#include "ipprequest.h"
#include "cupsinfos.h"
-#include <qlistview.h>
-#include <qwhatsthis.h>
+#include <tqlistview.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
#include <kaction.h>
#include <kmessagebox.h>
-KMCupsUiManager::KMCupsUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMCupsUiManager::KMCupsUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
@@ -81,28 +81,28 @@ void KMCupsUiManager::setupPropertyPages(KMPropertyPage *p)
void KMCupsUiManager::setupWizard(KMWizard *wizard)
{
- QString whatsThisRemoteCUPSIPPBackend =
+ TQString whatsThisRemoteCUPSIPPBackend =
i18n( "<qt><p>Print queue on remote CUPS server</p>"
"<p>Use this for a print queue installed on a remote "
"machine running a CUPS server. This allows to use "
"remote printers when CUPS browsing is turned off.</p></qt>"
);
- QString whatsThisRemotePrinterIPPBackend =
+ TQString whatsThisRemotePrinterIPPBackend =
i18n( "<qt><p>Network IPP printer</p>"
"<p>Use this for a network-enabled printer using the "
"IPP protocol. Modern high-end printers can use this mode. "
"Use this mode instead of TCP if your printer can do both.</p></qt>"
);
- QString whatsThisSerialFaxModemBackend =
+ TQString whatsThisSerialFaxModemBackend =
i18n( "<qt><p>Fax/Modem printer</p>"
"<p>Use this for a fax/modem printer. This requires the installation "
"of the <a href=\"http://vigna.dsi.unimi.it/fax4CUPS/\">fax4CUPS</a> backend. Documents sent on this printer will be faxed "
"to the given target fax number.</p></qt>"
);
- QString whatsThisOtherPrintertypeBackend =
+ TQString whatsThisOtherPrintertypeBackend =
i18n( "<qt><p>Other printer</p>"
"<p>Use this for any printer type. To use this option, you must know "
"the URI of the printer you want to install. Refer to the CUPS documentation "
@@ -110,7 +110,7 @@ void KMCupsUiManager::setupWizard(KMWizard *wizard)
"printer types using 3rd party backends not covered by the other possibilities.</p></qt>"
);
- QString whatsThisClassOfPrinters =
+ TQString whatsThisClassOfPrinters =
i18n( "<qt><p>Class of printers</p>"
"<p>Use this to create a class of printers. When sending a document to a class, "
"the document is actually sent to the first available (idle) printer in the class. "
@@ -135,7 +135,7 @@ void KMCupsUiManager::setupWizard(KMWizard *wizard)
QString uri;
req.setOperation(CUPS_GET_DEVICES);
- uri = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
@@ -204,13 +204,13 @@ int KMCupsUiManager::pluginPageCap()
return (KMUiManager::CopyAll & ~KMUiManager::Current);
}
-void KMCupsUiManager::setupPrintDialogPages(QPtrList<KPrintDialogPage>* pages)
+void KMCupsUiManager::setupPrintDialogPages(TQPtrList<KPrintDialogPage>* pages)
{
pages->append(new KPSchedulePage());
pages->append(new KPTagsPage());
}
-void KMCupsUiManager::setupJobViewer(QListView *lv)
+void KMCupsUiManager::setupJobViewer(TQListView *lv)
{
lv->addColumn(i18n("Priority"));
lv->setColumnAlignment(lv->columns()-1, Qt::AlignRight|Qt::AlignVCenter);
diff --git a/kdeprint/cups/kmcupsuimanager.h b/kdeprint/cups/kmcupsuimanager.h
index 15ab8684d..88c2c962a 100644
--- a/kdeprint/cups/kmcupsuimanager.h
+++ b/kdeprint/cups/kmcupsuimanager.h
@@ -25,7 +25,7 @@
class KMCupsUiManager : public KMUiManager
{
public:
- KMCupsUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMCupsUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMCupsUiManager();
void setupPropertyPages(KMPropertyPage*);
@@ -33,8 +33,8 @@ public:
void setupPrinterPropertyDialog(KPrinterPropertyDialog*);
void setupConfigDialog(KMConfigDialog*);
int pluginPageCap();
- void setupPrintDialogPages(QPtrList<KPrintDialogPage>*);
- void setupJobViewer(QListView*);
+ void setupPrintDialogPages(TQPtrList<KPrintDialogPage>*);
+ void setupJobViewer(TQListView*);
};
#endif
diff --git a/kdeprint/cups/kmpropbanners.cpp b/kdeprint/cups/kmpropbanners.cpp
index 3826de708..7be161f6d 100644
--- a/kdeprint/cups/kmpropbanners.cpp
+++ b/kdeprint/cups/kmpropbanners.cpp
@@ -22,23 +22,23 @@
#include "kmwizard.h"
#include "kmwbanners.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropBanners::KMPropBanners(QWidget *parent, const char *name)
+KMPropBanners::KMPropBanners(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_startbanner = new QLabel(this);
- m_stopbanner = new QLabel(this);
+ m_startbanner = new TQLabel(this);
+ m_stopbanner = new TQLabel(this);
- QLabel *l1 = new QLabel(i18n("&Starting banner:"), this);
- QLabel *l2 = new QLabel(i18n("&Ending banner:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Starting banner:"), this);
+ QLabel *l2 = new TQLabel(i18n("&Ending banner:"), this);
l1->setBuddy(m_startbanner);
l2->setBuddy(m_stopbanner);
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 10);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 10);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
main_->addWidget(l1,0,0);
@@ -59,7 +59,7 @@ void KMPropBanners::setPrinter(KMPrinter *p)
{
if (p && p->isPrinter())
{
- QStringList l = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',p->option("kde-banners"),false);
while ( l.count() < 2 )
l.append( "none" );
m_startbanner->setText(i18n(mapBanner(l[0]).utf8()));
diff --git a/kdeprint/cups/kmpropbanners.h b/kdeprint/cups/kmpropbanners.h
index eb8d85204..1b5b51115 100644
--- a/kdeprint/cups/kmpropbanners.h
+++ b/kdeprint/cups/kmpropbanners.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropBanners : public KMPropWidget
{
public:
- KMPropBanners(QWidget *parent = 0, const char *name = 0);
+ KMPropBanners(TQWidget *parent = 0, const char *name = 0);
~KMPropBanners();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmpropquota.cpp b/kdeprint/cups/kmpropquota.cpp
index ffce459e0..12e360746 100644
--- a/kdeprint/cups/kmpropquota.cpp
+++ b/kdeprint/cups/kmpropquota.cpp
@@ -21,30 +21,30 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
// some forward declarations (see kmwquota.cpp)
const char* unitKeyword(int);
int findUnit(int&);
-KMPropQuota::KMPropQuota(QWidget *parent, const char *name)
+KMPropQuota::KMPropQuota(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_period = new QLabel(this);
- m_sizelimit = new QLabel(this);
- m_pagelimit = new QLabel(this);
+ m_period = new TQLabel(this);
+ m_sizelimit = new TQLabel(this);
+ m_pagelimit = new TQLabel(this);
- QLabel *l1 = new QLabel(i18n("&Period:"), this);
- QLabel *l2 = new QLabel(i18n("&Size limit (KB):"), this);
- QLabel *l3 = new QLabel(i18n("&Page limit:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Period:"), this);
+ QLabel *l2 = new TQLabel(i18n("&Size limit (KB):"), this);
+ QLabel *l3 = new TQLabel(i18n("&Page limit:"), this);
l1->setBuddy(m_period);
l2->setBuddy(m_sizelimit);
l3->setBuddy(m_pagelimit);
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 10);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 10);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
main_->addWidget(l1,0,0);
@@ -75,9 +75,9 @@ void KMPropQuota::setPrinter(KMPrinter *p)
qu = -1;
if (qu > 0)
un = findUnit(qu);
- m_period->setText(qu == -1 ? i18n("No quota") : QString::number(qu).append(" ").append(i18n(unitKeyword(un))));
- m_sizelimit->setText(si ? QString::number(si) : i18n("None"));
- m_pagelimit->setText(pa ? QString::number(pa) : i18n("None"));
+ m_period->setText(qu == -1 ? i18n("No quota") : TQString::number(qu).append(" ").append(i18n(unitKeyword(un))));
+ m_sizelimit->setText(si ? TQString::number(si) : i18n("None"));
+ m_pagelimit->setText(pa ? TQString::number(pa) : i18n("None"));
emit enable(true);
emit enableChange(p->isLocal());
}
diff --git a/kdeprint/cups/kmpropquota.h b/kdeprint/cups/kmpropquota.h
index 53ed8c59c..b7845894d 100644
--- a/kdeprint/cups/kmpropquota.h
+++ b/kdeprint/cups/kmpropquota.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropQuota : public KMPropWidget
{
public:
- KMPropQuota(QWidget *parent = 0, const char *name = 0);
+ KMPropQuota(TQWidget *parent = 0, const char *name = 0);
~KMPropQuota();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmpropusers.cpp b/kdeprint/cups/kmpropusers.cpp
index 58b3301de..3f0792d9c 100644
--- a/kdeprint/cups/kmpropusers.cpp
+++ b/kdeprint/cups/kmpropusers.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qtextview.h>
-#include <qlayout.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropUsers::KMPropUsers(QWidget *parent, const char *name)
+KMPropUsers::KMPropUsers(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_text = new QTextView(this);
+ m_text = new TQTextView(this);
m_text->setPaper(colorGroup().background());
- m_text->setFrameStyle(QFrame::NoFrame);
+ m_text->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout *l0 = new QVBoxLayout(this, 10, 0);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0);
l0->addWidget(m_text, 1);
m_title = i18n("Users");
@@ -53,21 +53,21 @@ void KMPropUsers::setPrinter(KMPrinter *p)
if (!p->option("requesting-user-name-denied").isEmpty())
{
txt = txt.arg(i18n("Denied users"));
- users = QStringList::split(",", p->option("requesting-user-name-denied"), false);
+ users = TQStringList::split(",", p->option("requesting-user-name-denied"), false);
if (users.count() == 1 && users[0] == "none")
users.clear();
}
else if (!p->option("requesting-user-name-allowed").isEmpty())
{
txt = txt.arg(i18n("Allowed users"));
- users = QStringList::split(",", p->option("requesting-user-name-allowed"), false);
+ users = TQStringList::split(",", p->option("requesting-user-name-allowed"), false);
if (users.count() == 1 && users[0] == "all")
users.clear();
}
if (users.count() > 0)
{
QString s;
- for (QStringList::ConstIterator it=users.begin(); it!=users.end(); ++it)
+ for (TQStringList::ConstIterator it=users.begin(); it!=users.end(); ++it)
s.append("<li>").append(*it).append("</li>");
txt = txt.arg(s);
m_text->setText(txt);
diff --git a/kdeprint/cups/kmpropusers.h b/kdeprint/cups/kmpropusers.h
index 2d007baf8..6421006c9 100644
--- a/kdeprint/cups/kmpropusers.h
+++ b/kdeprint/cups/kmpropusers.h
@@ -27,7 +27,7 @@ class QTextView;
class KMPropUsers : public KMPropWidget
{
public:
- KMPropUsers(QWidget *parent = 0, const char *name = 0);
+ KMPropUsers(TQWidget *parent = 0, const char *name = 0);
~KMPropUsers();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp
index 0572d0e34..80a21a37c 100644
--- a/kdeprint/cups/kmwbanners.cpp
+++ b/kdeprint/cups/kmwbanners.cpp
@@ -23,24 +23,24 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
#include <klocale.h>
-QStringList defaultBanners()
+TQStringList defaultBanners()
{
QStringList bans;
- QPtrList<KMPrinter> *list = KMFactory::self()->manager()->printerList(false);
+ TQPtrList<KMPrinter> *list = KMFactory::self()->manager()->printerList(false);
if (list && list->count() > 0)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
for (;it.current() && !it.current()->isPrinter(); ++it) ;
if (it.current() && KMFactory::self()->manager()->completePrinter(it.current()))
{
QString s = list->getFirst()->option("kde-banners-supported");
- bans = QStringList::split(',',s,false);
+ bans = TQStringList::split(',',s,false);
}
}
if (bans.count() == 0)
@@ -64,13 +64,13 @@ static struct
{ 0, 0 }
};
-QString mapBanner( const QString& ban )
+TQString mapBanner( const TQString& ban )
{
- static QMap<QString,QString> map;
+ static TQMap<TQString,TQString> map;
if ( map.size() == 0 )
for ( int i=0; bannermap[ i ].banner; i++ )
map[ bannermap[ i ].banner ] = bannermap[ i ].name;
- QMap<QString,QString>::ConstIterator it = map.find( ban );
+ TQMap<TQString,TQString>::ConstIterator it = map.find( ban );
if ( it == map.end() )
return ban;
else
@@ -79,28 +79,28 @@ QString mapBanner( const QString& ban )
//**************************************************************************************************************
-KMWBanners::KMWBanners(QWidget *parent, const char *name)
+KMWBanners::KMWBanners(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Banners;
m_title = i18n("Banner Selection");
m_nextpage = KMWizard::Custom+3;
- m_start = new QComboBox(this);
- m_end = new QComboBox(this);
+ m_start = new TQComboBox(this);
+ m_end = new TQComboBox(this);
- QLabel *l1 = new QLabel(i18n("&Starting banner:"),this);
- QLabel *l2 = new QLabel(i18n("&Ending banner:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Starting banner:"),this);
+ QLabel *l2 = new TQLabel(i18n("&Ending banner:"),this);
l1->setBuddy(m_start);
l2->setBuddy(m_end);
- QLabel *l0 = new QLabel(this);
+ QLabel *l0 = new TQLabel(this);
l0->setText(i18n("<p>Select the default banners associated with this printer. These "
"banners will be inserted before and/or after each print job sent "
"to the printer. If you don't want to use banners, select <b>No Banner</b>.</p>"));
- QGridLayout *lay = new QGridLayout(this, 5, 2, 0, 10);
+ QGridLayout *lay = new TQGridLayout(this, 5, 2, 0, 10);
lay->setColStretch(1,1);
lay->addRowSpacing(1,20);
lay->setRowStretch(4,1);
@@ -117,18 +117,18 @@ void KMWBanners::initPrinter(KMPrinter *p)
{
if (m_start->count() == 0)
{
- m_bans = QStringList::split(',',p->option("kde-banners-supported"),false);
+ m_bans = TQStringList::split(',',p->option("kde-banners-supported"),false);
if (m_bans.count() == 0)
m_bans = defaultBanners();
if (m_bans.find("none") == m_bans.end())
m_bans.prepend("none");
- for ( QStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it )
+ for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it )
{
m_start->insertItem( i18n( mapBanner(*it).utf8() ) );
m_end->insertItem( i18n( mapBanner(*it).utf8() ) );
}
}
- QStringList l = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',p->option("kde-banners"),false);
while (l.count() < 2)
l.append("none");
m_start->setCurrentItem(m_bans.findIndex(l[0]));
diff --git a/kdeprint/cups/kmwbanners.h b/kdeprint/cups/kmwbanners.h
index 2fa820767..ce3bdca31 100644
--- a/kdeprint/cups/kmwbanners.h
+++ b/kdeprint/cups/kmwbanners.h
@@ -21,14 +21,14 @@
#define KMWBANNERS_H
#include "kmwizardpage.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QComboBox;
class KMWBanners : public KMWizardPage
{
public:
- KMWBanners(QWidget *parent = 0, const char *name = 0);
+ KMWBanners(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
@@ -38,6 +38,6 @@ private:
QStringList m_bans;
};
-QString mapBanner( const QString& );
+TQString mapBanner( const TQString& );
#endif
diff --git a/kdeprint/cups/kmwfax.cpp b/kdeprint/cups/kmwfax.cpp
index da42b8400..ea5b98f3b 100644
--- a/kdeprint/cups/kmwfax.cpp
+++ b/kdeprint/cups/kmwfax.cpp
@@ -23,32 +23,32 @@
#include "ipprequest.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klistbox.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kurl.h>
-KMWFax::KMWFax(QWidget *parent, const char *name)
+KMWFax::KMWFax(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+2;
m_title = i18n("Fax Serial Device");
m_nextpage = KMWizard::Driver;
- QLabel *lab = new QLabel(this);
+ QLabel *lab = new TQLabel(this);
lab->setText(i18n("<p>Select the device which your serial Fax/Modem is connected to.</p>"));
m_list = new KListBox(this);
- QVBoxLayout *l1 = new QVBoxLayout(this,0,10);
+ QVBoxLayout *l1 = new TQVBoxLayout(this,0,10);
l1->addWidget(lab,0);
l1->addWidget(m_list,1);
// initialize
IppRequest req;
req.setOperation(CUPS_GET_DEVICES);
- QString uri = QString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ QString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
{
@@ -57,14 +57,14 @@ KMWFax::KMWFax(QWidget *parent, const char *name)
{
if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0)
{
- m_list->insertItem(SmallIcon("blockdevice"),QString::fromLatin1(attr->values[0].string.text));
+ m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text));
}
attr = attr->next;
}
}
}
-bool KMWFax::isValid(QString& msg)
+bool KMWFax::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
diff --git a/kdeprint/cups/kmwfax.h b/kdeprint/cups/kmwfax.h
index 4a46bc29b..8fc846a7b 100644
--- a/kdeprint/cups/kmwfax.h
+++ b/kdeprint/cups/kmwfax.h
@@ -27,9 +27,9 @@ class KListBox;
class KMWFax : public KMWizardPage
{
public:
- KMWFax(QWidget *parent = 0, const char *name = 0);
+ KMWFax(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
private:
diff --git a/kdeprint/cups/kmwipp.cpp b/kdeprint/cups/kmwipp.cpp
index fbef937cf..c0d30c452 100644
--- a/kdeprint/cups/kmwipp.cpp
+++ b/kdeprint/cups/kmwipp.cpp
@@ -21,30 +21,30 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <cups/http.h>
-KMWIpp::KMWIpp(QWidget *parent, const char *name)
+KMWIpp::KMWIpp(TQWidget *parent, const char *name)
: KMWInfoBase(2,parent,name)
{
m_ID = KMWizard::IPP;
m_title = i18n("Remote IPP server");
m_nextpage = KMWizard::IPPSelect;
- lineEdit( 1 )->setValidator( new QIntValidator( this ) );
+ lineEdit( 1 )->setValidator( new TQIntValidator( this ) );
setInfo(i18n("<p>Enter the information concerning the remote IPP server "
"owning the targeted printer. This wizard will poll the server "
"before continuing.</p>"));
setLabel(0,i18n("Host:"));
setLabel(1,i18n("Port:"));
- setText( 1, QString::fromLatin1( "631" ) );
+ setText( 1, TQString::fromLatin1( "631" ) );
}
-bool KMWIpp::isValid(QString& msg)
+bool KMWIpp::isValid(TQString& msg)
{
// check informations
if (text(0).isEmpty())
diff --git a/kdeprint/cups/kmwipp.h b/kdeprint/cups/kmwipp.h
index 81856c8cd..42e36814e 100644
--- a/kdeprint/cups/kmwipp.h
+++ b/kdeprint/cups/kmwipp.h
@@ -25,9 +25,9 @@
class KMWIpp : public KMWInfoBase
{
public:
- KMWIpp(QWidget *parent = 0, const char *name = 0);
+ KMWIpp(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/cups/kmwippprinter.cpp b/kdeprint/cups/kmwippprinter.cpp
index de636ea8c..4900a584b 100644
--- a/kdeprint/cups/kmwippprinter.cpp
+++ b/kdeprint/cups/kmwippprinter.cpp
@@ -25,21 +25,21 @@
#include "networkscanner.h"
#include <klistview.h>
-#include <qheader.h>
+#include <tqheader.h>
#include <kpushbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
-#include <qtextview.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kseparator.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kguiitem.h>
#include <kurl.h>
-KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
+KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("IPP Printer Information");
@@ -49,16 +49,16 @@ KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
m_list = new KListView(this);
m_list->addColumn("");
m_list->header()->hide();
- m_list->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_list->setLineWidth(1);
- QLabel *l1 = new QLabel(i18n("&Printer URI:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Printer URI:"),this);
- m_uri = new QLineEdit(this);
+ m_uri = new TQLineEdit(this);
l1->setBuddy(m_uri);
- m_info = new QTextView(this);
+ m_info = new TQTextView(this);
m_info->setPaper(colorGroup().background());
m_info->setMinimumHeight(100);
m_info->setText(i18n("<p>Either enter the printer URI directly, or use the network scanning facility.</p>"));
@@ -70,17 +70,17 @@ KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(20);
- connect(m_list,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
- connect( m_scanner, SIGNAL( scanStarted() ), SLOT( slotScanStarted() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), SLOT( slotScanFinished() ) );
- connect( m_scanner, SIGNAL( scanStarted() ), parent, SLOT( disableWizard() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), parent, SLOT( enableWizard() ) );
- connect(m_ippreport, SIGNAL(clicked()), SLOT(slotIppReport()));
+ connect(m_list,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), TQT_SLOT( slotScanStarted() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), TQT_SLOT( slotScanFinished() ) );
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), parent, TQT_SLOT( disableWizard() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), parent, TQT_SLOT( enableWizard() ) );
+ connect(m_ippreport, TQT_SIGNAL(clicked()), TQT_SLOT(slotIppReport()));
// layout
- QHBoxLayout *lay3 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 0);
- QHBoxLayout *lay4 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay4 = new TQHBoxLayout(0, 0, 0);
lay3->addWidget(m_list,1);
lay3->addLayout(lay2,1);
@@ -105,7 +105,7 @@ void KMWIppPrinter::updatePrinter(KMPrinter *p)
p->setDevice(m_uri->text());
}
-bool KMWIppPrinter::isValid(QString& msg)
+bool KMWIppPrinter::isValid(TQString& msg)
{
if (m_uri->text().isEmpty())
{
@@ -130,8 +130,8 @@ void KMWIppPrinter::slotScanStarted()
void KMWIppPrinter::slotScanFinished()
{
m_ippreport->setEnabled(false);
- const QPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
- QPtrListIterator<NetworkScanner::SocketInfo> it(*list);
+ const TQPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
+ TQPtrListIterator<NetworkScanner::SocketInfo> it(*list);
for (;it.current();++it)
{
QString name;
@@ -139,12 +139,12 @@ void KMWIppPrinter::slotScanFinished()
name = i18n("Unknown host - 1 is the IP", "<Unknown> (%1)").arg(it.current()->IP);
else
name = it.current()->Name;
- QListViewItem *item = new QListViewItem(m_list,name,it.current()->IP,QString::number(it.current()->Port));
+ QListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port));
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
-void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
+void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item)
{
m_ippreport->setEnabled(item != 0);
if (!item) return;
@@ -157,7 +157,7 @@ void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
req.setOperation(IPP_GET_PRINTER_ATTRIBUTES);
req.setHost(item->text(1));
req.setPort(item->text(2).toInt());
- uri = QString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2));
+ uri = TQString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2));
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
keys.append("printer-name");
keys.append("printer-state");
@@ -172,11 +172,11 @@ void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
int state;
if (req.name("printer-name",value)) txt.append(i18n("<b>Name</b>: %1<br>").arg(value));
if (req.text("printer-location",value) && !value.isEmpty()) txt.append(i18n("<b>Location</b>: %1<br>").arg(value));
- if (req.text("printer-info",value) && !value.isEmpty()) txt.append(i18n("<b>Description</b>: %1<br>").arg(value.replace(QRegExp(";"),"<br>")));
+ if (req.text("printer-info",value) && !value.isEmpty()) txt.append(i18n("<b>Description</b>: %1<br>").arg(value.replace(TQRegExp(";"),"<br>")));
if (req.uri("printer-uri-supported",value))
{
if (value[0] == '/')
- value.prepend(QString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2)));
+ value.prepend(TQString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2)));
m_uri->setText(value);
}
if (req.text("printer-make-and-model",value) && !value.isEmpty()) txt.append(i18n("<b>Model</b>: %1<br>").arg(value));
diff --git a/kdeprint/cups/kmwippprinter.h b/kdeprint/cups/kmwippprinter.h
index f928c3e68..627a28f7d 100644
--- a/kdeprint/cups/kmwippprinter.h
+++ b/kdeprint/cups/kmwippprinter.h
@@ -33,16 +33,16 @@ class KMWIppPrinter : public KMWizardPage
{
Q_OBJECT
public:
- KMWIppPrinter(QWidget *parent = 0, const char *name = 0);
+ KMWIppPrinter(TQWidget *parent = 0, const char *name = 0);
~KMWIppPrinter();
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
protected slots:
void slotScanStarted();
void slotScanFinished();
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
void slotIppReport();
private:
diff --git a/kdeprint/cups/kmwippselect.cpp b/kdeprint/cups/kmwippselect.cpp
index d70c8603d..fbfa597c7 100644
--- a/kdeprint/cups/kmwippselect.cpp
+++ b/kdeprint/cups/kmwippselect.cpp
@@ -24,12 +24,12 @@
#include "ipprequest.h"
#include <klistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
-KMWIppSelect::KMWIppSelect(QWidget *parent, const char *name)
+KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::IPPSelect;
@@ -38,11 +38,11 @@ KMWIppSelect::KMWIppSelect(QWidget *parent, const char *name)
m_list = new KListBox(this);
- QVBoxLayout *lay = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0);
lay->addWidget(m_list);
}
-bool KMWIppSelect::isValid(QString& msg)
+bool KMWIppSelect::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
@@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p)
IppRequest req;
QString uri;
req.setOperation(CUPS_GET_PRINTERS);
- uri = QString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
- req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",QString::fromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
ipp_attribute_t *attr = req.first();
while (attr)
{
if (attr->name && strcmp(attr->name,"printer-name") == 0)
- m_list->insertItem(SmallIcon("kdeprint_printer"),QString::fromLatin1(attr->values[0].string.text));
+ m_list->insertItem(SmallIcon("kdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text));
attr = attr->next;
}
m_list->sort();
diff --git a/kdeprint/cups/kmwippselect.h b/kdeprint/cups/kmwippselect.h
index 5bf12e0c8..26ce6e563 100644
--- a/kdeprint/cups/kmwippselect.h
+++ b/kdeprint/cups/kmwippselect.h
@@ -27,9 +27,9 @@ class KListBox;
class KMWIppSelect : public KMWizardPage
{
public:
- KMWIppSelect(QWidget *parent = 0, const char *name = 0);
+ KMWIppSelect(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp
index 034c88bb2..36e80c76d 100644
--- a/kdeprint/cups/kmwother.cpp
+++ b/kdeprint/cups/kmwother.cpp
@@ -23,40 +23,40 @@
#include "kmmanager.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qheader.h>
-#include <qdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
+#include <tqdict.h>
#include <klocale.h>
#include <klistview.h>
#include <kiconloader.h>
#include <kdebug.h>
-KMWOther::KMWOther(QWidget *parent, const char *name)
+KMWOther::KMWOther(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+5;
m_title = i18n("URI Selection");
m_nextpage = KMWizard::Driver;
- m_uri = new QLineEdit(this);
- QLabel *l1 = new QLabel(this);
+ m_uri = new TQLineEdit(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>Enter the URI corresponding to the printer to be installed. "
"Examples:</p><ul>"
"<li>smb://[login[:passwd]@]server/printer</li>"
"<li>lpd://server/queue</li>"
"<li>parallel:/dev/lp0</li></ul>"));
- QLabel *l2 = new QLabel(i18n("URI:"), this);
+ QLabel *l2 = new TQLabel(i18n("URI:"), this);
m_uriview = new KListView( this );
m_uriview->addColumn( "" );
m_uriview->header()->hide();
m_uriview->setSorting( -1 );
- connect( m_uriview, SIGNAL( pressed( QListViewItem* ) ), SLOT( slotPressed( QListViewItem* ) ) );
+ connect( m_uriview, TQT_SIGNAL( pressed( TQListViewItem* ) ), TQT_SLOT( slotPressed( TQListViewItem* ) ) );
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 15);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 5);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5);
lay1->addWidget(l1);
lay1->addLayout(lay2);
lay1->addWidget( m_uriview );
@@ -70,29 +70,29 @@ void KMWOther::initPrinter(KMPrinter *p)
if ( m_uriview->childCount() == 0 )
{
- QStringList l = KMManager::self()->detectLocalPrinters();
+ TQStringList l = KMManager::self()->detectLocalPrinters();
if ( l.isEmpty() || l.count() % 4 != 0 )
return;
- QListViewItem *item = 0, *lastparent = 0, *root;
- root = new QListViewItem( m_uriview, i18n( "CUPS Server %1:%2" ).arg( CupsInfos::self()->host() ).arg( CupsInfos::self()->port() ) );
+ TQListViewItem *item = 0, *lastparent = 0, *root;
+ root = new TQListViewItem( m_uriview, i18n( "CUPS Server %1:%2" ).arg( CupsInfos::self()->host() ).arg( CupsInfos::self()->port() ) );
root->setPixmap( 0, SmallIcon( "gear" ) );
root->setOpen( true );
- QDict<QListViewItem> parents, last;
+ TQDict<TQListViewItem> parents, last;
parents.setAutoDelete( false );
last.setAutoDelete( false );
- for ( QStringList::Iterator it=l.begin(); it!=l.end(); ++it )
+ for ( TQStringList::Iterator it=l.begin(); it!=l.end(); ++it )
{
- QString cl = *it;
- QString uri = *( ++it );
- QString desc = *( ++it );
- QString prt = *( ++it );
+ TQString cl = *it;
+ TQString uri = *( ++it );
+ TQString desc = *( ++it );
+ TQString prt = *( ++it );
if ( !prt.isEmpty() )
desc.append( " [" + prt + "]" );
- QListViewItem *parent = parents.find( cl );
+ TQListViewItem *parent = parents.find( cl );
if ( !parent )
{
- parent = new QListViewItem( root, lastparent, cl );
+ parent = new TQListViewItem( root, lastparent, cl );
parent->setOpen( true );
if ( cl == "network" )
parent->setPixmap( 0, SmallIcon( "network" ) );
@@ -105,7 +105,7 @@ void KMWOther::initPrinter(KMPrinter *p)
lastparent = parent;
parents.insert( cl, parent );
}
- item = new QListViewItem( parent, last.find( cl ), desc, uri);
+ item = new TQListViewItem( parent, last.find( cl ), desc, uri);
last.insert( cl, item );
}
}
@@ -116,7 +116,7 @@ void KMWOther::updatePrinter(KMPrinter *p)
p->setDevice( m_uri->text() );
}
-void KMWOther::slotPressed( QListViewItem *item )
+void KMWOther::slotPressed( TQListViewItem *item )
{
if ( item && !item->text( 1 ).isEmpty() )
m_uri->setText( item->text( 1 ) );
diff --git a/kdeprint/cups/kmwother.h b/kdeprint/cups/kmwother.h
index 211a670e9..68f13077f 100644
--- a/kdeprint/cups/kmwother.h
+++ b/kdeprint/cups/kmwother.h
@@ -30,13 +30,13 @@ class KMWOther : public KMWizardPage
{
Q_OBJECT
public:
- KMWOther(QWidget *parent = 0, const char *name = 0);
+ KMWOther(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPressed( QListViewItem* );
+ void slotPressed( TQListViewItem* );
private:
QLineEdit *m_uri;
diff --git a/kdeprint/cups/kmwquota.cpp b/kdeprint/cups/kmwquota.cpp
index e0b5d5f27..f9c34c04a 100644
--- a/kdeprint/cups/kmwquota.cpp
+++ b/kdeprint/cups/kmwquota.cpp
@@ -23,10 +23,10 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
#include <klocale.h>
#ifdef HAVE_LIMITS_H
@@ -72,41 +72,41 @@ int findUnit(int& period)
const char* unitKeyword(int i)
{ return time_keywords[i]; }
-KMWQuota::KMWQuota(QWidget *parent, const char *name)
+KMWQuota::KMWQuota(TQWidget *parent, const char *name)
: KMWizardPage(parent, name)
{
m_ID = KMWizard::Custom+3;
m_title = i18n("Printer Quota Settings");
m_nextpage = KMWizard::Custom+4;
- m_period = new QSpinBox(this);
+ m_period = new TQSpinBox(this);
m_period->setRange(-1, INT_MAX);
m_period->setSpecialValueText(i18n("No quota"));
- m_sizelimit = new QSpinBox(this);
+ m_sizelimit = new TQSpinBox(this);
m_sizelimit->setRange(0, INT_MAX);
m_sizelimit->setSpecialValueText(i18n("None"));
- m_pagelimit = new QSpinBox(this);
+ m_pagelimit = new TQSpinBox(this);
m_pagelimit->setRange(0, INT_MAX);
m_pagelimit->setSpecialValueText(i18n("None"));
- m_timeunit = new QComboBox(this);
+ m_timeunit = new TQComboBox(this);
for (int i=0;i<N_TIME_LIMITS;i++)
m_timeunit->insertItem(i18n(time_keywords[i]));
m_timeunit->setCurrentItem(3);
- QLabel *lab1 = new QLabel(i18n("&Period:"), this);
- QLabel *lab2 = new QLabel(i18n("&Size limit (KB):"), this);
- QLabel *lab3 = new QLabel(i18n("&Page limit:"), this);
+ QLabel *lab1 = new TQLabel(i18n("&Period:"), this);
+ QLabel *lab2 = new TQLabel(i18n("&Size limit (KB):"), this);
+ QLabel *lab3 = new TQLabel(i18n("&Page limit:"), this);
lab1->setBuddy(m_period);
lab2->setBuddy(m_sizelimit);
lab3->setBuddy(m_pagelimit);
- QLabel *lab4 = new QLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means "
+ QLabel *lab4 = new TQLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means "
"that no quota will be used. This is equivalent to set quota period to "
"<b><nobr>No quota</nobr></b> (-1). Quota limits are defined on a per-user base and "
"applied to all users.</p>"), this);
- QGridLayout *l0 = new QGridLayout(this, 5, 3, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 5, 3, 0, 10);
l0->setRowStretch(4, 1);
l0->setColStretch(1, 1);
l0->addMultiCellWidget(lab4, 0, 0, 0, 2);
@@ -123,7 +123,7 @@ KMWQuota::~KMWQuota()
{
}
-bool KMWQuota::isValid(QString& msg)
+bool KMWQuota::isValid(TQString& msg)
{
if (m_period->value() >= 0 && m_sizelimit->value() == 0 && m_pagelimit->value() == 0)
{
@@ -164,8 +164,8 @@ void KMWQuota::updatePrinter(KMPrinter *p)
}
qu *= time_periods[m_timeunit->currentItem()];
- p->setOption("job-quota-period", QString::number(qu));
- p->setOption("job-k-limit", QString::number(si));
- p->setOption("job-page-limit", QString::number(pa));
+ p->setOption("job-quota-period", TQString::number(qu));
+ p->setOption("job-k-limit", TQString::number(si));
+ p->setOption("job-page-limit", TQString::number(pa));
}
#include "kmwquota.moc"
diff --git a/kdeprint/cups/kmwquota.h b/kdeprint/cups/kmwquota.h
index 88b6359c9..8261546b9 100644
--- a/kdeprint/cups/kmwquota.h
+++ b/kdeprint/cups/kmwquota.h
@@ -29,10 +29,10 @@ class KMWQuota : public KMWizardPage
{
Q_OBJECT
public:
- KMWQuota(QWidget *parent = 0, const char *name = 0);
+ KMWQuota(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWQuota();
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwusers.cpp b/kdeprint/cups/kmwusers.cpp
index 3dedddd47..4466c4223 100644
--- a/kdeprint/cups/kmwusers.cpp
+++ b/kdeprint/cups/kmwusers.cpp
@@ -23,13 +23,13 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <keditlistbox.h>
-KMWUsers::KMWUsers(QWidget *parent, const char *name)
+KMWUsers::KMWUsers(TQWidget *parent, const char *name)
: KMWizardPage(parent, name)
{
m_ID = KMWizard::Custom+4;
@@ -37,17 +37,17 @@ KMWUsers::KMWUsers(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_users = new KEditListBox(i18n("Users"), this, 0, false, KEditListBox::Add|KEditListBox::Remove);
- m_type = new QComboBox(this);
+ m_type = new TQComboBox(this);
m_type->insertItem(i18n("Allowed Users"));
m_type->insertItem(i18n("Denied Users"));
- QLabel *lab1 = new QLabel(i18n("Define here a group of allowed/denied users for this printer."), this);
- QLabel *lab2 = new QLabel(i18n("&Type:"), this);
+ QLabel *lab1 = new TQLabel(i18n("Define here a group of allowed/denied users for this printer."), this);
+ QLabel *lab2 = new TQLabel(i18n("&Type:"), this);
lab2->setBuddy(m_type);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
l0->addWidget(lab1, 0);
l0->addLayout(l1, 0);
l1->addWidget(lab2, 0);
@@ -65,14 +65,14 @@ void KMWUsers::initPrinter(KMPrinter *p)
int i(1);
if (!p->option("requesting-user-name-denied").isEmpty())
{
- l = QStringList::split(",", p->option("requesting-user-name-denied"), false);
+ l = TQStringList::split(",", p->option("requesting-user-name-denied"), false);
if (l.count() == 1 && l[0] == "none")
l.clear();
}
else if (!p->option("requesting-user-name-allowed").isEmpty())
{
i = 0;
- l = QStringList::split(",", p->option("requesting-user-name-allowed"), false);
+ l = TQStringList::split(",", p->option("requesting-user-name-allowed"), false);
if (l.count() && l[0] == "all")
l.clear();
}
diff --git a/kdeprint/cups/kmwusers.h b/kdeprint/cups/kmwusers.h
index 9c970bb54..cb269cd76 100644
--- a/kdeprint/cups/kmwusers.h
+++ b/kdeprint/cups/kmwusers.h
@@ -29,7 +29,7 @@ class KMWUsers : public KMWizardPage
{
Q_OBJECT
public:
- KMWUsers(QWidget *parent = 0, const char *name = 0);
+ KMWUsers(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWUsers();
void initPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kphpgl2page.cpp b/kdeprint/cups/kphpgl2page.cpp
index c6672aeaf..7ec413e52 100644
--- a/kdeprint/cups/kphpgl2page.cpp
+++ b/kdeprint/cups/kphpgl2page.cpp
@@ -19,18 +19,18 @@
#include "kphpgl2page.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
+KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBlackplotHpgl2Page = i18n( " <qt> "
+ TQString whatsThisBlackplotHpgl2Page = i18n( " <qt> "
" <b>Print in Black Only (Blackplot)</b> "
" <p>The \'blackplot\' option specifies that all pens should plot in black-only:"
" The default is to use the colors defined in the plot file, or the standard "
@@ -45,7 +45,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisFitplotHpgl2Page = i18n( " <qt> "
+ TQString whatsThisFitplotHpgl2Page = i18n( " <qt> "
" <b>Scale Print Image to Page Size</b> "
" <p>The 'fitplot' option specifies that the HP-GL image should be scaled to fill "
" exactly the page with the (elsewhere selected) media size. </p> "
@@ -65,7 +65,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPenwidthHpgl2Page = i18n( " <qt> "
+ TQString whatsThisPenwidthHpgl2Page = i18n( " <qt> "
" <b>Set Pen Width for HP-GL (if not defined in file)</b>. "
" <p>The pen width value can be set here in case the original HP-GL file does not have it "
" set. The pen width specifies the value in micrometers. The default value of 1000 produces "
@@ -82,7 +82,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisAllOptionsHpgl2Page = i18n( " <qt> "
+ TQString whatsThisAllOptionsHpgl2Page = i18n( " <qt> "
" <b>HP-GL Print Options</b> "
" <p>All options on this page are only applicable if you use KDEPrint to send HP-GL and "
" HP-GL/2 files to one of your printers. </p> "
@@ -110,36 +110,36 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
setTitle("HP-GL/2");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this);
- m_blackplot = new QCheckBox(i18n("&Use only black pen"), box);
- QWhatsThis::add(m_blackplot, whatsThisBlackplotHpgl2Page);
+ m_blackplot = new TQCheckBox(i18n("&Use only black pen"), box);
+ TQWhatsThis::add(m_blackplot, whatsThisBlackplotHpgl2Page);
- m_fitplot = new QCheckBox(i18n("&Fit plot to page"), box);
- QWhatsThis::add(m_fitplot, whatsThisFitplotHpgl2Page);
+ m_fitplot = new TQCheckBox(i18n("&Fit plot to page"), box);
+ TQWhatsThis::add(m_fitplot, whatsThisFitplotHpgl2Page);
m_penwidth = new KIntNumInput(1000, box);
m_penwidth->setLabel(i18n("&Pen width:"), Qt::AlignLeft|Qt::AlignVCenter);
m_penwidth->setSuffix(" [um]");
m_penwidth->setRange(0, 10000, 100, true);
- QWhatsThis::add(m_penwidth, whatsThisPenwidthHpgl2Page);
+ TQWhatsThis::add(m_penwidth, whatsThisPenwidthHpgl2Page);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(box);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), 10);
l1->addWidget(m_blackplot);
l1->addWidget(m_fitplot);
l1->addWidget(m_penwidth);
- QWhatsThis::add(this, whatsThisAllOptionsHpgl2Page);
+ TQWhatsThis::add(this, whatsThisAllOptionsHpgl2Page);
}
KPHpgl2Page::~KPHpgl2Page()
{
}
-void KPHpgl2Page::setOptions(const QMap<QString,QString>& opts)
+void KPHpgl2Page::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (opts.contains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true"))
@@ -150,10 +150,10 @@ void KPHpgl2Page::setOptions(const QMap<QString,QString>& opts)
m_penwidth->setValue(value.toInt());
}
-void KPHpgl2Page::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPHpgl2Page::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_penwidth->value() != 1000)
- opts["penwidth"] = QString::number(m_penwidth->value());
+ opts["penwidth"] = TQString::number(m_penwidth->value());
if (m_blackplot->isChecked())
opts["blackplot"] = "true";
else if (incldef)
diff --git a/kdeprint/cups/kphpgl2page.h b/kdeprint/cups/kphpgl2page.h
index 206c409d8..cc77e8ab8 100644
--- a/kdeprint/cups/kphpgl2page.h
+++ b/kdeprint/cups/kphpgl2page.h
@@ -28,11 +28,11 @@ class QCheckBox;
class KPHpgl2Page : public KPrintDialogPage
{
public:
- KPHpgl2Page(QWidget *parent = 0, const char *name = 0);
+ KPHpgl2Page(TQWidget *parent = 0, const char *name = 0);
~KPHpgl2Page();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
private:
KIntNumInput *m_penwidth;
diff --git a/kdeprint/cups/kpimagepage.cpp b/kdeprint/cups/kpimagepage.cpp
index 9ebdc9548..c4cf50e48 100644
--- a/kdeprint/cups/kpimagepage.cpp
+++ b/kdeprint/cups/kpimagepage.cpp
@@ -22,26 +22,26 @@
#include "imagepreview.h"
#include "driver.h"
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
#include <kseparator.h>
#include <kstandarddirs.h>
-KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
+KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBrightnessImagePage = i18n( " <qt> "
+ TQString whatsThisBrightnessImagePage = i18n( " <qt> "
" <p><b>Brightness:</b> Slider to control the brightness value of all colors used.</p>"
" <p> The brightness value can range from 0 to 200. Values greater than 100 will "
" lighten the print. Values less than 100 will darken the print. </p> "
@@ -55,7 +55,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisHueImagePage = i18n( " <qt> "
+ TQString whatsThisHueImagePage = i18n( " <qt> "
" <p><b>Hue (Tint):</b> Slider to control the hue value for color rotation.</p>"
" <p> The hue value is a number from -360 to 360 and represents the color hue rotation. "
" The following table summarizes the change you will see for the base colors: "
@@ -80,7 +80,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisSaturationImagePage = i18n( " <qt> "
+ TQString whatsThisSaturationImagePage = i18n( " <qt> "
" <p><b>Saturation:</b> Slider to control the saturation value for all colors used.</p>"
" <p> The saturation value adjusts the saturation of the colors in an image, similar to "
" the color knob on your television. The color saturation value.can range from 0 to 200."
@@ -98,7 +98,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisGammaImagePage = i18n( " <qt> "
+ TQString whatsThisGammaImagePage = i18n( " <qt> "
" <p><b>Gamma:</b> Slider to control the gamma value for color correction.</p>"
" <p> The gamma value can range from 1 to 3000. "
" A gamma values greater than 1000 lightens the print. A gamma value less than 1000 "
@@ -115,7 +115,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisImagePage = i18n( " <qt> "
+ TQString whatsThisImagePage = i18n( " <qt> "
" <p><b>Image Printing Options</b></p> "
" <p>All options controlled on this page only apply to printing images. "
" Most image file formats are supported. To name a few: JPEG, TIFF, PNG, GIF, "
@@ -133,7 +133,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisColorationPreviewImagePage = i18n( " <qt> "
+ TQString whatsThisColorationPreviewImagePage = i18n( " <qt> "
" <p><b>Coloration Preview Thumbnail</b></p> "
" <p>The coloration preview thumbnail indicates change of image coloration by different settings. "
" Options to influence output are: "
@@ -149,7 +149,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisSizeImagePage = i18n( " <qt> "
+ TQString whatsThisSizeImagePage = i18n( " <qt> "
" <p><b>Image Size:</b> Dropdown menu to control the image size on the printed paper. Dropdown "
" works in conjunction with slider below. Dropdown options are:.</p>"
" <ul> "
@@ -189,7 +189,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPreviewPositionImagePage = i18n( " <qt> "
+ TQString whatsThisPreviewPositionImagePage = i18n( " <qt> "
" <p><b>Position Preview Thumbnail</b></p> "
" <p>This position preview thumbnail indicates the position of the image on the paper sheet. "
" <p>Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: "
@@ -207,7 +207,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisResetButtonImagePage = i18n( " <qt> "
+ TQString whatsThisResetButtonImagePage = i18n( " <qt> "
" <p><b>Reset to Default Values</b> </p> "
" <p> Reset all coloration settings to default values. Default values are: "
" <ul> "
@@ -219,7 +219,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPositionImagePage = i18n( " <qt> "
+ TQString whatsThisPositionImagePage = i18n( " <qt> "
" <p><b>Image Positioning:</b></p> "
" <p>Select a pair of radiobuttons to "
" move image to the position you want on the paper printout. Default "
@@ -236,42 +236,42 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
setTitle(i18n("Image"));
- QGroupBox *colorbox = new QGroupBox(0, Qt::Vertical, i18n("Color Settings"), this);
- QWhatsThis::add(this, whatsThisImagePage);
- QGroupBox *sizebox = new QGroupBox(0, Qt::Vertical, i18n("Image Size"), this);
- QWhatsThis::add(sizebox, whatsThisSizeImagePage);
- QGroupBox *positionbox = new QGroupBox(0, Qt::Vertical, i18n("Image Position"), this);
- QWhatsThis::add(positionbox, whatsThisPositionImagePage);
+ QGroupBox *colorbox = new TQGroupBox(0, Qt::Vertical, i18n("Color Settings"), this);
+ TQWhatsThis::add(this, whatsThisImagePage);
+ QGroupBox *sizebox = new TQGroupBox(0, Qt::Vertical, i18n("Image Size"), this);
+ TQWhatsThis::add(sizebox, whatsThisSizeImagePage);
+ QGroupBox *positionbox = new TQGroupBox(0, Qt::Vertical, i18n("Image Position"), this);
+ TQWhatsThis::add(positionbox, whatsThisPositionImagePage);
m_brightness = new KIntNumInput(100, colorbox);
m_brightness->setLabel(i18n("&Brightness:"));
m_brightness->setRange(0, 200, 20, true);
- QWhatsThis::add(m_brightness, whatsThisBrightnessImagePage);
+ TQWhatsThis::add(m_brightness, whatsThisBrightnessImagePage);
m_hue = new KIntNumInput(m_brightness, 0, colorbox);
m_hue->setLabel(i18n("&Hue (Color rotation):"));
m_hue->setRange(-360, 360, 36, true);
- QWhatsThis::add(m_hue, whatsThisHueImagePage);
+ TQWhatsThis::add(m_hue, whatsThisHueImagePage);
m_saturation = new KIntNumInput(m_brightness, 100, colorbox);
m_saturation->setLabel(i18n("&Saturation:"));
m_saturation->setRange(0, 200, 20, true);
- QWhatsThis::add(m_saturation, whatsThisSaturationImagePage);
+ TQWhatsThis::add(m_saturation, whatsThisSaturationImagePage);
m_gamma = new KIntNumInput(m_saturation, 1000, colorbox);
m_gamma->setLabel(i18n("&Gamma (Color correction):"));
m_gamma->setRange(1, 3000, 100, true);
- QWhatsThis::add(m_gamma, whatsThisGammaImagePage);
+ TQWhatsThis::add(m_gamma, whatsThisGammaImagePage);
- connect(m_brightness, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- connect(m_hue, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- connect(m_saturation, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- //connect(m_gamma, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
+ connect(m_brightness, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ connect(m_hue, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ connect(m_saturation, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ //connect(m_gamma, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
m_preview = new ImagePreview(colorbox);
bool useColor = (driver ? driver->get("colordevice") == "1" : true);
m_preview->setBlackAndWhite(!useColor);
- QWhatsThis::add(m_preview, whatsThisColorationPreviewImagePage);
+ TQWhatsThis::add(m_preview, whatsThisColorationPreviewImagePage);
m_hue->setEnabled(useColor);
m_saturation->setEnabled(useColor);
@@ -280,12 +280,12 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
KSeparator *sep = new KSeparator(Qt::Horizontal, colorbox);
- QPushButton *defbtn = new QPushButton(i18n("&Default Settings"), colorbox);
- QWhatsThis::add(defbtn, whatsThisResetButtonImagePage);
- connect(defbtn, SIGNAL(clicked()), SLOT(slotDefaultClicked()));
+ QPushButton *defbtn = new TQPushButton(i18n("&Default Settings"), colorbox);
+ TQWhatsThis::add(defbtn, whatsThisResetButtonImagePage);
+ connect(defbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultClicked()));
slotDefaultClicked();
- m_sizetype = new QComboBox(sizebox);
+ m_sizetype = new TQComboBox(sizebox);
m_sizetype->insertItem(i18n("Natural Image Size"));
m_sizetype->insertItem(i18n("Resolution (ppi)"));
// xgettext:no-c-format
@@ -297,22 +297,22 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
m_size->setRange(1, 1200, 20, true);
m_size->setValue(72);
- connect(m_sizetype, SIGNAL(activated(int)), SLOT(slotSizeTypeChanged(int)));
+ connect(m_sizetype, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSizeTypeChanged(int)));
m_sizetype->setCurrentItem(0);
slotSizeTypeChanged(0);
- QLabel *lab = new QLabel(i18n("&Image size type:"), sizebox);
+ QLabel *lab = new TQLabel(i18n("&Image size type:"), sizebox);
lab->setBuddy(m_sizetype);
m_position = new ImagePosition(positionbox);
- QWhatsThis::add(m_position, whatsThisPreviewPositionImagePage);
-
- QRadioButton *bottom = new QRadioButton(positionbox);
- QRadioButton *top = new QRadioButton(positionbox);
- QRadioButton *vcenter = new QRadioButton(positionbox);
- QRadioButton *left = new QRadioButton(positionbox);
- QRadioButton *right = new QRadioButton(positionbox);
- QRadioButton *hcenter = new QRadioButton(positionbox);
+ TQWhatsThis::add(m_position, whatsThisPreviewPositionImagePage);
+
+ QRadioButton *bottom = new TQRadioButton(positionbox);
+ QRadioButton *top = new TQRadioButton(positionbox);
+ QRadioButton *vcenter = new TQRadioButton(positionbox);
+ QRadioButton *left = new TQRadioButton(positionbox);
+ QRadioButton *right = new TQRadioButton(positionbox);
+ QRadioButton *hcenter = new TQRadioButton(positionbox);
QSize sz = bottom->sizeHint();
bottom->setFixedSize(sz);
vcenter->setFixedSize(sz);
@@ -321,16 +321,16 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
hcenter->setFixedSize(sz);
right->setFixedSize(sz);
- m_vertgrp = new QButtonGroup(positionbox);
+ m_vertgrp = new TQButtonGroup(positionbox);
m_vertgrp->hide();
- m_horizgrp = new QButtonGroup(positionbox);
+ m_horizgrp = new TQButtonGroup(positionbox);
m_horizgrp->hide();
m_vertgrp->insert(top, 0);
m_vertgrp->insert(vcenter, 1);
m_vertgrp->insert(bottom, 2);
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
m_horizgrp->insert(left, 2);
m_horizgrp->insert(hcenter, 1);
@@ -342,18 +342,18 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
m_horizgrp->insert(hcenter, 1);
m_horizgrp->insert(right, 2);
}
- connect(m_vertgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged()));
- connect(m_horizgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged()));
+ connect(m_vertgrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPositionChanged()));
+ connect(m_horizgrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPositionChanged()));
m_vertgrp->setButton(1);
m_horizgrp->setButton(1);
slotPositionChanged();
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10);
l0->addMultiCellWidget(colorbox, 0, 0, 0, 1);
l0->addWidget(sizebox, 1, 0);
l0->addWidget(positionbox, 1, 1);
l0->setColStretch(0, 1);
- QGridLayout *l1 = new QGridLayout(colorbox->layout(), 5, 2, 10);
+ QGridLayout *l1 = new TQGridLayout(colorbox->layout(), 5, 2, 10);
l1->addWidget(m_brightness, 0, 0);
l1->addWidget(m_hue, 1, 0);
l1->addWidget(m_saturation, 2, 0);
@@ -361,16 +361,16 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
l1->addWidget(m_gamma, 4, 0);
l1->addMultiCellWidget(m_preview, 0, 3, 1, 1);
l1->addWidget(defbtn, 4, 1);
- QVBoxLayout *l2 = new QVBoxLayout(sizebox->layout(), 3);
+ QVBoxLayout *l2 = new TQVBoxLayout(sizebox->layout(), 3);
l2->addStretch(1);
l2->addWidget(lab);
l2->addWidget(m_sizetype);
l2->addSpacing(10);
l2->addWidget(m_size);
l2->addStretch(1);
- QGridLayout *l3 = new QGridLayout(positionbox->layout(), 2, 2, 10);
- QHBoxLayout *l4 = new QHBoxLayout(0, 0, 10);
- QVBoxLayout *l5 = new QVBoxLayout(0, 0, 10);
+ QGridLayout *l3 = new TQGridLayout(positionbox->layout(), 2, 2, 10);
+ QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10);
+ QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10);
l3->addLayout(l4, 0, 1);
l3->addLayout(l5, 1, 0);
l3->addWidget(m_position, 1, 1);
@@ -386,7 +386,7 @@ KPImagePage::~KPImagePage()
{
}
-void KPImagePage::setOptions(const QMap<QString,QString>& opts)
+void KPImagePage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (!(value=opts["brightness"]).isEmpty())
@@ -420,19 +420,19 @@ void KPImagePage::setOptions(const QMap<QString,QString>& opts)
}
}
-void KPImagePage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPImagePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_brightness->value() != 100)
- opts["brightness"] = QString::number(m_brightness->value());
+ opts["brightness"] = TQString::number(m_brightness->value());
if (m_hue->isEnabled())
{
if (incldef || m_hue->value() != 0)
- opts["hue"] = QString::number(m_hue->value());
+ opts["hue"] = TQString::number(m_hue->value());
if (incldef || m_saturation->value() != 100)
- opts["saturation"] = QString::number(m_saturation->value());
+ opts["saturation"] = TQString::number(m_saturation->value());
}
if (incldef || m_gamma->value() != 1000)
- opts["gamma"] = QString::number(m_gamma->value());
+ opts["gamma"] = TQString::number(m_gamma->value());
QString name;
if (incldef)
@@ -449,7 +449,7 @@ void KPImagePage::getOptions(QMap<QString,QString>& opts, bool incldef)
case 3: name = "natural-scaling"; break;
}
if (!name.isEmpty())
- opts[name] = QString::number(m_size->value());
+ opts[name] = TQString::number(m_size->value());
if (incldef || m_position->position() != ImagePosition::Center)
opts["position"] = m_position->positionString();
diff --git a/kdeprint/cups/kpimagepage.h b/kdeprint/cups/kpimagepage.h
index 9ec623686..49b7ec0ea 100644
--- a/kdeprint/cups/kpimagepage.h
+++ b/kdeprint/cups/kpimagepage.h
@@ -32,11 +32,11 @@ class KPImagePage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPImagePage(DrMain *driver = 0, QWidget *parent = 0, const char *name = 0);
+ KPImagePage(DrMain *driver = 0, TQWidget *parent = 0, const char *name = 0);
~KPImagePage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotSizeTypeChanged(int);
diff --git a/kdeprint/cups/kpschedulepage.cpp b/kdeprint/cups/kpschedulepage.cpp
index a698b1d51..3c2edaf0f 100644
--- a/kdeprint/cups/kpschedulepage.cpp
+++ b/kdeprint/cups/kpschedulepage.cpp
@@ -19,25 +19,25 @@
#include "kpschedulepage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qregexp.h>
-#include <qdatetimeedit.h>
-#include <qdatetime.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqregexp.h>
+#include <tqdatetimeedit.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kseparator.h>
#include <knuminput.h>
#include <time.h>
-KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
+KPSchedulePage::KPSchedulePage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBillingInfo = i18n( " <qt> <p><b>Print Job Billing and Accounting</b></p> "
+ TQString whatsThisBillingInfo = i18n( " <qt> <p><b>Print Job Billing and Accounting</b></p> "
" <p>Insert a meaningful string here to associate"
" the current print job with a certain account. This"
" string will appear in the CUPS \"page_log\" to help"
@@ -57,7 +57,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisScheduledPrinting = i18n(" <qt> <p><b>Scheduled Printing</b></p> "
+ TQString whatsThisScheduledPrinting = i18n(" <qt> <p><b>Scheduled Printing</b></p> "
" <p>Scheduled printing lets you control the time"
" of the actual printout, while you can still send away your"
" job <b>now</b> and have it out of your way."
@@ -84,7 +84,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPageLabel = i18n( " <qt> <p><b>Page Labels</b></p> "
+ TQString whatsThisPageLabel = i18n( " <qt> <p><b>Page Labels</b></p> "
" <p>Page Labels are printed by CUPS at the top and bottom"
" of each page. They appear on the pages surrounded by a little"
" frame box."
@@ -99,7 +99,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisJobPriority = i18n( " <qt> <p><b>Job Priority</b></p> "
+ TQString whatsThisJobPriority = i18n( " <qt> <p><b>Job Priority</b></p> "
" <p>Usually CUPS prints all jobs per queue according to"
" the \"FIFO\" principle: <em>First In, First Out</em>."
" <p> The"
@@ -133,7 +133,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
ts = localtime(&ct);
m_gmtdiff -= ts->tm_hour;
- m_time = new QComboBox(this);
+ m_time = new TQComboBox(this);
m_time->insertItem(i18n("Immediately"));
m_time->insertItem(i18n("Never (hold indefinitely)"));
m_time->insertItem(i18n("Daytime (6 am - 6 pm)"));
@@ -143,38 +143,38 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
m_time->insertItem(i18n("Second Shift (4 pm - 12 am)"));
m_time->insertItem(i18n("Third Shift (12 am - 8 am)"));
m_time->insertItem(i18n("Specified Time"));
- QWhatsThis::add(m_time, whatsThisScheduledPrinting);
+ TQWhatsThis::add(m_time, whatsThisScheduledPrinting);
m_tedit = new QTimeEdit(this);
m_tedit->setAutoAdvance(true);
- m_tedit->setTime(QTime::currentTime());
+ m_tedit->setTime(TQTime::currentTime());
m_tedit->setEnabled(false);
- QWhatsThis::add(m_tedit, whatsThisScheduledPrinting);
- m_billing = new QLineEdit(this);
- QWhatsThis::add(m_billing, whatsThisBillingInfo);
- m_pagelabel = new QLineEdit(this);
- QWhatsThis::add(m_pagelabel, whatsThisPageLabel);
+ TQWhatsThis::add(m_tedit, whatsThisScheduledPrinting);
+ m_billing = new TQLineEdit(this);
+ TQWhatsThis::add(m_billing, whatsThisBillingInfo);
+ m_pagelabel = new TQLineEdit(this);
+ TQWhatsThis::add(m_pagelabel, whatsThisPageLabel);
m_priority = new KIntNumInput(50, this);
- QWhatsThis::add(m_priority, whatsThisJobPriority);
+ TQWhatsThis::add(m_priority, whatsThisJobPriority);
m_priority->setRange(1, 100, 10, true);
- QLabel *lab = new QLabel(i18n("&Scheduled printing:"), this);
+ QLabel *lab = new TQLabel(i18n("&Scheduled printing:"), this);
lab->setBuddy(m_time);
- QWhatsThis::add(lab, whatsThisScheduledPrinting);
- QLabel *lab1 = new QLabel(i18n("&Billing information:"), this);
- QWhatsThis::add(lab1, whatsThisBillingInfo);
+ TQWhatsThis::add(lab, whatsThisScheduledPrinting);
+ QLabel *lab1 = new TQLabel(i18n("&Billing information:"), this);
+ TQWhatsThis::add(lab1, whatsThisBillingInfo);
lab1->setBuddy(m_billing);
- QLabel *lab2 = new QLabel(i18n("T&op/Bottom page label:"), this);
- QWhatsThis::add(lab2, whatsThisPageLabel);
+ QLabel *lab2 = new TQLabel(i18n("T&op/Bottom page label:"), this);
+ TQWhatsThis::add(lab2, whatsThisPageLabel);
lab2->setBuddy(m_pagelabel);
m_priority->setLabel(i18n("&Job priority:"), Qt::AlignVCenter|Qt::AlignLeft);
- QWhatsThis::add(m_priority, whatsThisJobPriority);
+ TQWhatsThis::add(m_priority, whatsThisJobPriority);
KSeparator *sep0 = new KSeparator(this);
sep0->setFixedHeight(10);
- QGridLayout *l0 = new QGridLayout(this, 6, 2, 0, 7);
+ QGridLayout *l0 = new TQGridLayout(this, 6, 2, 0, 7);
l0->addWidget(lab, 0, 0);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 5);
l0->addLayout(l1, 0, 1);
l1->addWidget(m_time);
l1->addWidget(m_tedit);
@@ -186,14 +186,14 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
l0->addMultiCellWidget(m_priority, 4, 4, 0, 1);
l0->setRowStretch(5, 1);
- connect(m_time, SIGNAL(activated(int)), SLOT(slotTimeChanged()));
+ connect(m_time, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTimeChanged()));
}
KPSchedulePage::~KPSchedulePage()
{
}
-bool KPSchedulePage::isValid(QString& msg)
+bool KPSchedulePage::isValid(TQString& msg)
{
if (m_time->currentItem() == 8 && !m_tedit->time().isValid())
{
@@ -203,7 +203,7 @@ bool KPSchedulePage::isValid(QString& msg)
return true;
}
-void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
+void KPSchedulePage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString t = opts["job-hold-until"];
if (!t.isEmpty())
@@ -220,7 +220,7 @@ void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
else if (t == "third-shift") item = 7;
else
{
- QTime qt = QTime::fromString(t);
+ QTime qt = TQTime::fromString(t);
m_tedit->setTime(qt.addSecs(-3600 * m_gmtdiff));
item = 8;
}
@@ -243,7 +243,7 @@ void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
m_priority->setValue(val);
}
-void KPSchedulePage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPSchedulePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_time->currentItem() != 0)
{
@@ -269,7 +269,7 @@ void KPSchedulePage::getOptions(QMap<QString,QString>& opts, bool incldef)
if (incldef || !m_pagelabel->text().isEmpty())
opts["page-label"] = "\"" + m_pagelabel->text() + "\"";
if (incldef || m_priority->value() != 50)
- opts["job-priority"] = QString::number(m_priority->value());
+ opts["job-priority"] = TQString::number(m_priority->value());
}
void KPSchedulePage::slotTimeChanged()
diff --git a/kdeprint/cups/kpschedulepage.h b/kdeprint/cups/kpschedulepage.h
index b8a5946fe..5753747c9 100644
--- a/kdeprint/cups/kpschedulepage.h
+++ b/kdeprint/cups/kpschedulepage.h
@@ -31,12 +31,12 @@ class KPSchedulePage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPSchedulePage(QWidget *parent = 0, const char *name = 0);
+ KPSchedulePage(TQWidget *parent = 0, const char *name = 0);
~KPSchedulePage();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
- bool isValid(QString& msg);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ bool isValid(TQString& msg);
protected slots:
void slotTimeChanged();
diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp
index ec7e451b7..7a1fd0924 100644
--- a/kdeprint/cups/kptagspage.cpp
+++ b/kdeprint/cups/kptagspage.cpp
@@ -19,21 +19,21 @@
#include "kptagspage.h"
-#include <qtable.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqtable.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-KPTagsPage::KPTagsPage(bool ro, QWidget *parent, const char *name)
+KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAdditionalTagsTable = i18n(" <qt><p><b>Additional Tags</b></p>"
+ TQString whatsThisAdditionalTagsTable = i18n(" <qt><p><b>Additional Tags</b></p>"
" You may send additional commands to the CUPS server via this editable list. "
" There are 3 purposes for this:"
" <ul>"
@@ -77,19 +77,19 @@ KPTagsPage::KPTagsPage(bool ro, QWidget *parent, const char *name)
setTitle(i18n("Additional Tags"));
setOnlyRealPrinters(true);
- m_tags = new QTable(10, 2, this);
+ m_tags = new TQTable(10, 2, this);
m_tags->horizontalHeader()->setStretchEnabled(true);
m_tags->horizontalHeader()->setLabel(0, i18n("Name"));
m_tags->horizontalHeader()->setLabel(1, i18n("Value"));
m_tags->setReadOnly(ro);
- QWhatsThis::add(m_tags, whatsThisAdditionalTagsTable);
+ TQWhatsThis::add(m_tags, whatsThisAdditionalTagsTable);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 5);
l0->addWidget(m_tags);
if (ro)
{
- QLabel *lab = new QLabel(i18n("Read-Only"), this);
+ QLabel *lab = new TQLabel(i18n("Read-Only"), this);
QFont f = lab->font();
f.setBold(true);
lab->setFont(f);
@@ -102,7 +102,7 @@ KPTagsPage::~KPTagsPage()
{
}
-bool KPTagsPage::isValid(QString& msg)
+bool KPTagsPage::isValid(TQString& msg)
{
QRegExp re("\\s");
for (int r=0; r<m_tags->numCols(); r++)
@@ -119,11 +119,11 @@ bool KPTagsPage::isValid(QString& msg)
return true;
}
-void KPTagsPage::setOptions(const QMap<QString,QString>& opts)
+void KPTagsPage::setOptions(const TQMap<TQString,TQString>& opts)
{
int r(0);
QRegExp re("^\"|\"$");
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end() && r<m_tags->numRows(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end() && r<m_tags->numRows(); ++it)
{
if (it.key().startsWith("KDEPrint-"))
{
@@ -135,12 +135,12 @@ void KPTagsPage::setOptions(const QMap<QString,QString>& opts)
}
for (; r<m_tags->numRows(); r++)
{
- m_tags->setText(r, 0, QString::null);
- m_tags->setText(r, 1, QString::null);
+ m_tags->setText(r, 0, TQString::null);
+ m_tags->setText(r, 1, TQString::null);
}
}
-void KPTagsPage::getOptions(QMap<QString,QString>& opts, bool)
+void KPTagsPage::getOptions(TQMap<TQString,TQString>& opts, bool)
{
for (int r=0; r<m_tags->numRows(); r++)
{
@@ -153,12 +153,12 @@ void KPTagsPage::getOptions(QMap<QString,QString>& opts, bool)
}
}
-QSize KPTagsPage::sizeHint() const
+TQSize KPTagsPage::sizeHint() const
{
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
-QSize KPTagsPage::minimumSizeHint() const
+TQSize KPTagsPage::minimumSizeHint() const
{
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
diff --git a/kdeprint/cups/kptagspage.h b/kdeprint/cups/kptagspage.h
index 2dd55c8d8..800f7ddc6 100644
--- a/kdeprint/cups/kptagspage.h
+++ b/kdeprint/cups/kptagspage.h
@@ -27,15 +27,15 @@ class QTable;
class KPTagsPage : public KPrintDialogPage
{
public:
- KPTagsPage(bool ro = false, QWidget *parent = 0, const char *name = 0);
+ KPTagsPage(bool ro = false, TQWidget *parent = 0, const char *name = 0);
~KPTagsPage();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
- bool isValid(QString& msg);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ bool isValid(TQString& msg);
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
private:
QTable *m_tags;
diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp
index b896606e0..75fc838cc 100644
--- a/kdeprint/cups/kptextpage.cpp
+++ b/kdeprint/cups/kptextpage.cpp
@@ -22,23 +22,23 @@
#include "driver.h"
#include "kprinter.h"
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
#include <kdebug.h>
-KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
+KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, driver, parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisCPITextPage = i18n( " <qt> "
+ TQString whatsThisCPITextPage = i18n( " <qt> "
" <p><b>Characters Per Inch</b></p> "
" <p>This setting controls the horizontal size of characters when printing a text file. </p>"
" <p>The default value is 10, meaning that the font is scaled in a way that 10 characters "
@@ -52,7 +52,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisLPITextPage = i18n( " <qt> "
+ TQString whatsThisLPITextPage = i18n( " <qt> "
" <p><b>Lines Per Inch</b></p> "
" <p>This setting controls the vertical size of characters when printing a text file. </p>"
" <p>The default value is 6, meaning that the font is scaled in a way that 6 lines "
@@ -66,7 +66,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisColumnsTextPage = i18n( " <qt> "
+ TQString whatsThisColumnsTextPage = i18n( " <qt> "
" <p><b>Columns</b></p> "
" <p>This setting controls how many columns of text will be printed on each page when."
" printing text files. </p> "
@@ -81,10 +81,10 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintPreviewIconTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintPreviewIconTextPage = i18n( " <qt> "
" Preview icon changes when you turn on or off prettyprint. "
" </qt>" );
- QString whatsThisFormatTextPage = i18n( " <qt> "
+ TQString whatsThisFormatTextPage = i18n( " <qt> "
" <p><b>Text Formats</b></p> "
" <p>These settings control the appearance of text on printouts. They are only valid for "
" printing text files or input directly through kprinter. </p> "
@@ -105,7 +105,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisMarginsTextPage = i18n( " <qt> "
+ TQString whatsThisMarginsTextPage = i18n( " <qt> "
" <p><b>Margins</b></p> "
" <p>These settings control the margins of printouts on the paper. They are not valid for "
" jobs originating from applications which define their own page layout internally and "
@@ -131,7 +131,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintButtonOnTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintButtonOnTextPage = i18n( " <qt> "
" <p><b>Turn Text Printing with Syntax Highlighting (Prettyprint) On!</b></p> "
" <p>ASCII text file printouts can be 'prettyfied' by enabling this option. If you do so, "
" a header is printed at the top of each page. The header contains "
@@ -150,7 +150,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintButtonOffTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintButtonOffTextPage = i18n( " <qt> "
" <p><b>Turn Text Printing with Syntax Highlighting (Prettyprint) Off! </b></p> "
" <p>ASCII text file printing with this option turned off are appearing without a page "
" header and without syntax highlighting. (You can still set the page margins, though.) </p> "
@@ -164,7 +164,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintFrameTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintFrameTextPage = i18n( " <qt> "
" <p><b>Print Text with Syntax Highlighting (Prettyprint)</b></p> "
" <p>ASCII file printouts can be 'prettyfied' by enabling this option. If you do so, "
" a header is printed at the top of each page. The header contains "
@@ -188,61 +188,61 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
setTitle(i18n("Text"));
m_block = false;
- QGroupBox *formatbox = new QGroupBox(0, Qt::Vertical, i18n("Text Format"), this);
- QWhatsThis::add(formatbox, whatsThisFormatTextPage);
- QGroupBox *prettybox = new QGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this);
- QWhatsThis::add(prettybox, whatsThisPrettyprintFrameTextPage);
- QGroupBox *marginbox = new QGroupBox(0, Qt::Vertical, i18n("Margins"), this);
- QWhatsThis::add(marginbox, whatsThisMarginsTextPage);
+ QGroupBox *formatbox = new TQGroupBox(0, Qt::Vertical, i18n("Text Format"), this);
+ TQWhatsThis::add(formatbox, whatsThisFormatTextPage);
+ QGroupBox *prettybox = new TQGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this);
+ TQWhatsThis::add(prettybox, whatsThisPrettyprintFrameTextPage);
+ QGroupBox *marginbox = new TQGroupBox(0, Qt::Vertical, i18n("Margins"), this);
+ TQWhatsThis::add(marginbox, whatsThisMarginsTextPage);
m_cpi = new KIntNumInput(10, formatbox);
- QWhatsThis::add(m_cpi, whatsThisCPITextPage);
+ TQWhatsThis::add(m_cpi, whatsThisCPITextPage);
m_cpi->setLabel(i18n("&Chars per inch:"), Qt::AlignLeft|Qt::AlignVCenter);
m_cpi->setRange(1, 999, 1, false);
m_lpi = new KIntNumInput(m_cpi, 6, formatbox);
- QWhatsThis::add(m_lpi, whatsThisLPITextPage);
+ TQWhatsThis::add(m_lpi, whatsThisLPITextPage);
m_lpi->setLabel(i18n("&Lines per inch:"), Qt::AlignLeft|Qt::AlignVCenter);
m_lpi->setRange(1, 999, 1, false);
m_columns = new KIntNumInput(m_lpi, 1, formatbox);
- QWhatsThis::add(m_columns, whatsThisColumnsTextPage);
+ TQWhatsThis::add(m_columns, whatsThisColumnsTextPage);
m_columns->setLabel(i18n("C&olumns:"), Qt::AlignLeft|Qt::AlignVCenter);
m_columns->setRange(1, 10, 1, false);
KSeparator *sep = new KSeparator(Qt::Horizontal, formatbox);
- connect(m_columns, SIGNAL(valueChanged(int)), SLOT(slotColumnsChanged(int)));
+ connect(m_columns, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotColumnsChanged(int)));
- m_prettypix = new QLabel(prettybox);
- QWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage);
+ m_prettypix = new TQLabel(prettybox);
+ TQWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage);
m_prettypix->setAlignment(Qt::AlignCenter);
- QRadioButton *off = new QRadioButton(i18n("&Disabled"), prettybox);
- QWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage);
- QRadioButton *on = new QRadioButton(i18n("&Enabled"), prettybox);
- QWhatsThis::add(on, whatsThisPrettyprintButtonOnTextPage);
- m_prettyprint = new QButtonGroup(prettybox);
+ QRadioButton *off = new TQRadioButton(i18n("&Disabled"), prettybox);
+ TQWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage);
+ QRadioButton *on = new TQRadioButton(i18n("&Enabled"), prettybox);
+ TQWhatsThis::add(on, whatsThisPrettyprintButtonOnTextPage);
+ m_prettyprint = new TQButtonGroup(prettybox);
m_prettyprint->hide();
m_prettyprint->insert(off, 0);
m_prettyprint->insert(on, 1);
m_prettyprint->setButton(0);
- connect(m_prettyprint, SIGNAL(clicked(int)), SLOT(slotPrettyChanged(int)));
+ connect(m_prettyprint, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPrettyChanged(int)));
slotPrettyChanged(0);
m_margin = new MarginWidget(marginbox);
- QWhatsThis::add(m_margin, whatsThisMarginsTextPage);
+ TQWhatsThis::add(m_margin, whatsThisMarginsTextPage);
m_margin->setPageSize(595, 842);
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10);
l0->addWidget(formatbox, 0, 0);
l0->addWidget(prettybox, 0, 1);
l0->addMultiCellWidget(marginbox, 1, 1, 0, 1);
- QVBoxLayout *l1 = new QVBoxLayout(formatbox->layout(), 5);
+ QVBoxLayout *l1 = new TQVBoxLayout(formatbox->layout(), 5);
l1->addWidget(m_cpi);
l1->addWidget(m_lpi);
l1->addWidget(sep);
l1->addWidget(m_columns);
- QGridLayout *l2 = new QGridLayout(prettybox->layout(), 2, 2, 10);
+ QGridLayout *l2 = new TQGridLayout(prettybox->layout(), 2, 2, 10);
l2->addWidget(off, 0, 0);
l2->addWidget(on, 1, 0);
l2->addMultiCellWidget(m_prettypix, 0, 1, 1, 1);
- QVBoxLayout *l3 = new QVBoxLayout(marginbox->layout(), 10);
+ QVBoxLayout *l3 = new TQVBoxLayout(marginbox->layout(), 10);
l3->addWidget(m_margin);
}
@@ -250,7 +250,7 @@ KPTextPage::~KPTextPage()
{
}
-void KPTextPage::setOptions(const QMap<QString,QString>& opts)
+void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
@@ -296,22 +296,22 @@ void KPTextPage::setOptions(const QMap<QString,QString>& opts)
m_margin->setCustomEnabled(marginset);
}
-void KPTextPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPTextPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_cpi->value() != 10)
- opts["cpi"] = QString::number(m_cpi->value());
+ opts["cpi"] = TQString::number(m_cpi->value());
if (incldef || m_lpi->value() != 6)
- opts["lpi"] = QString::number(m_lpi->value());
+ opts["lpi"] = TQString::number(m_lpi->value());
if (incldef || m_columns->value() != 1)
- opts["columns"] = QString::number(m_columns->value());
+ opts["columns"] = TQString::number(m_columns->value());
//if (m_margin->isCustomEnabled() || incldef)
if (m_margin->isCustomEnabled())
{
- opts["page-top"] = QString::number(( int )( m_margin->top()+0.5 ));
- opts["page-bottom"] = QString::number(( int )( m_margin->bottom()+0.5 ));
- opts["page-left"] = QString::number(( int )( m_margin->left()+0.5 ));
- opts["page-right"] = QString::number(( int )( m_margin->right()+0.5 ));
+ opts["page-top"] = TQString::number(( int )( m_margin->top()+0.5 ));
+ opts["page-bottom"] = TQString::number(( int )( m_margin->bottom()+0.5 ));
+ opts["page-left"] = TQString::number(( int )( m_margin->left()+0.5 ));
+ opts["page-right"] = TQString::number(( int )( m_margin->right()+0.5 ));
}
else
{
diff --git a/kdeprint/cups/kptextpage.h b/kdeprint/cups/kptextpage.h
index 72029f4af..b2550afa0 100644
--- a/kdeprint/cups/kptextpage.h
+++ b/kdeprint/cups/kptextpage.h
@@ -32,11 +32,11 @@ class KPTextPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPTextPage(DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPTextPage(DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPTextPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotPrettyChanged(int);
diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp
index c1e2b434d..ce411f0a4 100644
--- a/kdeprint/driver.cpp
+++ b/kdeprint/driver.cpp
@@ -20,8 +20,8 @@
#include "driver.h"
#include "driveritem.h"
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
#include <stdlib.h>
@@ -40,17 +40,17 @@ DrBase::~DrBase()
{
}
-QString DrBase::valueText()
+TQString DrBase::valueText()
{
- return QString::null;
+ return TQString::null;
}
-QString DrBase::prettyText()
+TQString DrBase::prettyText()
{
return valueText();
}
-void DrBase::setValueText(const QString&)
+void DrBase::setValueText(const TQString&)
{
}
@@ -59,12 +59,12 @@ DriverItem* DrBase::createItem(DriverItem *parent, DriverItem *after)
return new DriverItem(parent, after, this);
}
-void DrBase::setOptions(const QMap<QString,QString>& opts)
+void DrBase::setOptions(const TQMap<TQString,TQString>& opts)
{
if (opts.contains(name())) setValueText(opts[name()]);
}
-void DrBase::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrBase::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QString val = valueText();
if ( incldef || get( "persistent" ) == "1" || get("default") != val )
@@ -109,10 +109,10 @@ DrMain::~DrMain()
{
// remove a possible temporary file
if (has("temporary"))
- QFile::remove(get("temporary"));
+ TQFile::remove(get("temporary"));
}
-DriverItem* DrMain::createTreeView(QListView *parent)
+DriverItem* DrMain::createTreeView(TQListView *parent)
{
DriverItem *root = new DriverItem(parent, this);
createTree(root);
@@ -123,7 +123,7 @@ int DrMain::checkConstraints()
{
int result(0);
clearConflict();
- QPtrListIterator<DrConstraint> it(m_constraints);
+ TQPtrListIterator<DrConstraint> it(m_constraints);
for (;it.current();++it)
if (it.current()->check(this))
result++;
@@ -135,7 +135,7 @@ void DrMain::addPageSize(DrPageSize *ps)
m_pagesizes.insert(ps->pageName(),ps);
}
-void DrMain::removeOptionGlobally(const QString& name)
+void DrMain::removeOptionGlobally(const TQString& name)
{
DrGroup *grp(0);
DrBase *opt = findOption(name, &grp);
@@ -159,9 +159,9 @@ void DrMain::removeGroupGlobally(DrGroup *grp)
}
}
-QMap<QString, DrBase*> DrMain::flatten()
+TQMap<TQString, DrBase*> DrMain::flatten()
{
- QMap<QString, DrBase*> optmap;
+ TQMap<TQString, DrBase*> optmap;
int index(0);
flattenGroup(optmap, index);
return optmap;
@@ -171,11 +171,11 @@ DrMain* DrMain::cloneDriver()
{
DrMain *driver = static_cast<DrMain*>(clone());
- QPtrListIterator<DrConstraint> cit(m_constraints);
+ TQPtrListIterator<DrConstraint> cit(m_constraints);
for (; cit.current(); ++cit)
driver->addConstraint(new DrConstraint(*(cit.current())));
- QDictIterator<DrPageSize> pit(m_pagesizes);
+ TQDictIterator<DrPageSize> pit(m_pagesizes);
for (; pit.current(); ++pit)
driver->addPageSize(new DrPageSize(*(pit.current())));
@@ -222,7 +222,7 @@ void DrGroup::addObject(DrBase *optgrp)
addGroup(static_cast<DrGroup*>(optgrp));
}
-void DrGroup::removeOption(const QString& name)
+void DrGroup::removeOption(const TQString& name)
{
DrBase *opt = m_options.find(name);
if (opt)
@@ -253,21 +253,21 @@ void DrGroup::createTree(DriverItem *parent)
{
DriverItem *item(0);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
item = lit.current()->createItem(parent, item);
- QPtrListIterator<DrBase> dit(m_listoptions);
+ TQPtrListIterator<DrBase> dit(m_listoptions);
for (;dit.current();++dit)
item = dit.current()->createItem(parent, item);
}
-DrBase* DrGroup::findOption(const QString& name, DrGroup **parentGroup)
+DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup)
{
DrBase *opt = m_options.find(name);
if (!opt)
{
- QPtrListIterator<DrGroup> it(m_subgroups);
+ TQPtrListIterator<DrGroup> it(m_subgroups);
for (;it.current() && !opt; ++it)
opt = it.current()->findOption(name, parentGroup);
}
@@ -281,7 +281,7 @@ DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup)
DrGroup *group = (m_subgroups.findRef(grp) == -1 ? 0 : grp);
if (!group)
{
- QPtrListIterator<DrGroup> it(m_subgroups);
+ TQPtrListIterator<DrGroup> it(m_subgroups);
for (;it.current() && !group; ++it)
group = it.current()->findGroup(grp, parentGroup);
}
@@ -292,49 +292,49 @@ DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup)
void DrGroup::clearConflict()
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->setConflict(false);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->clearConflict();
}
-void DrGroup::setOptions(const QMap<QString,QString>& opts)
+void DrGroup::setOptions(const TQMap<TQString,TQString>& opts)
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->setOptions(opts);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->setOptions(opts);
}
-void DrGroup::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrGroup::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->getOptions(opts,incldef);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->getOptions(opts,incldef);
}
-void DrGroup::flattenGroup(QMap<QString, DrBase*>& optmap, int& index)
+void DrGroup::flattenGroup(TQMap<TQString, DrBase*>& optmap, int& index)
{
- QPtrListIterator<DrGroup> git(m_subgroups);
+ TQPtrListIterator<DrGroup> git(m_subgroups);
for (; git.current(); ++git)
git.current()->flattenGroup(optmap, index);
- QDictIterator<DrBase> oit(m_options);
+ TQDictIterator<DrBase> oit(m_options);
for (; oit.current(); ++oit)
optmap[oit.current()->name()] = oit.current();
if (name().isEmpty())
- optmap[QString::fromLatin1("group%1").arg(index++)] = this;
+ optmap[TQString::fromLatin1("group%1").arg(index++)] = this;
else
optmap[name()] = this;
@@ -351,20 +351,20 @@ DrBase* DrGroup::clone()
{
DrGroup *grp = static_cast<DrGroup*>(DrBase::clone());
- QPtrListIterator<DrGroup> git(m_subgroups);
+ TQPtrListIterator<DrGroup> git(m_subgroups);
for (; git.current(); ++git)
grp->addGroup(static_cast<DrGroup*>(git.current()->clone()));
- QPtrListIterator<DrBase> oit(m_listoptions);
+ TQPtrListIterator<DrBase> oit(m_listoptions);
for (; oit.current(); ++oit)
grp->addOption(oit.current()->clone());
return static_cast<DrBase*>(grp);
}
-QString DrGroup::groupForOption( const QString& optname )
+TQString DrGroup::groupForOption( const TQString& optname )
{
- QString grpname;
+ TQString grpname;
if ( optname == "PageSize" ||
optname == "InputSlot" ||
optname == "ManualFeed" ||
@@ -424,12 +424,12 @@ DrStringOption::~DrStringOption()
{
}
-QString DrStringOption::valueText()
+TQString DrStringOption::valueText()
{
return m_value;
}
-void DrStringOption::setValueText(const QString& s)
+void DrStringOption::setValueText(const TQString& s)
{
m_value = s;
}
@@ -451,25 +451,25 @@ DrIntegerOption::~DrIntegerOption()
{
}
-QString DrIntegerOption::valueText()
+TQString DrIntegerOption::valueText()
{
- QString s = QString::number(m_value);
+ QString s = TQString::number(m_value);
return s;
}
-void DrIntegerOption::setValueText(const QString& s)
+void DrIntegerOption::setValueText(const TQString& s)
{
m_value = s.toInt();
}
-QString DrIntegerOption::fixedVal()
+TQString DrIntegerOption::fixedVal()
{
- QStringList vals = QStringList::split("|", get("fixedvals"), false);
+ QStringList vals = TQStringList::split("|", get("fixedvals"), false);
if (vals.count() == 0)
return valueText();
int d(0);
QString val;
- for (QStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
+ for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
{
int thisVal = (*it).toInt();
if (val.isEmpty() || abs(thisVal - m_value) < d)
@@ -501,25 +501,25 @@ DrFloatOption::~DrFloatOption()
{
}
-QString DrFloatOption::valueText()
+TQString DrFloatOption::valueText()
{
- QString s = QString::number(m_value,'f',3);
+ QString s = TQString::number(m_value,'f',3);
return s;
}
-void DrFloatOption::setValueText(const QString& s)
+void DrFloatOption::setValueText(const TQString& s)
{
m_value = s.toFloat();
}
-QString DrFloatOption::fixedVal()
+TQString DrFloatOption::fixedVal()
{
- QStringList vals = QStringList::split("|", get("fixedvals"), false);
+ QStringList vals = TQStringList::split("|", get("fixedvals"), false);
if (vals.count() == 0)
return valueText();
float d(0);
QString val;
- for (QStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
+ for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
{
float thisVal = (*it).toFloat();
if (val.isEmpty() || fabs(thisVal - m_value) < d)
@@ -551,21 +551,21 @@ DrListOption::~DrListOption()
{
}
-QString DrListOption::valueText()
+TQString DrListOption::valueText()
{
- QString s = (m_current ? m_current->name() : QString::null);
+ QString s = (m_current ? m_current->name() : TQString::null);
return s;
}
-QString DrListOption::prettyText()
+TQString DrListOption::prettyText()
{
if (m_current)
return m_current->get("text");
else
- return QString::null;
+ return TQString::null;
}
-void DrListOption::setValueText(const QString& s)
+void DrListOption::setValueText(const TQString& s)
{
m_current = findChoice(s);
if (!m_current)
@@ -577,9 +577,9 @@ void DrListOption::setValueText(const QString& s)
}
}
-DrBase* DrListOption::findChoice(const QString& txt)
+DrBase* DrListOption::findChoice(const TQString& txt)
{
- QPtrListIterator<DrBase> it(m_choices);
+ TQPtrListIterator<DrBase> it(m_choices);
for (;it.current();++it)
if (it.current()->name() == txt)
return it.current();
@@ -590,7 +590,7 @@ DrBase* DrListOption::clone()
{
DrListOption *opt = static_cast<DrListOption*>(DrBase::clone());
- QPtrListIterator<DrBase> it(m_choices);
+ TQPtrListIterator<DrBase> it(m_choices);
for (; it.current(); ++it)
opt->addChoice(it.current()->clone());
@@ -599,14 +599,14 @@ DrBase* DrListOption::clone()
return static_cast<DrBase*>(opt);
}
-void DrListOption::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrListOption::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
DrBase::getOptions(opts, incldef);
if (currentChoice() && currentChoice()->type() == DrBase::ChoiceGroup)
currentChoice()->getOptions(opts, incldef);
}
-void DrListOption::setOptions(const QMap<QString,QString>& opts)
+void DrListOption::setOptions(const TQMap<TQString,TQString>& opts)
{
DrBase::setOptions(opts);
if (currentChoice() && currentChoice()->type() == DrBase::ChoiceGroup)
@@ -635,7 +635,7 @@ void DrListOption::setChoice(int choicenum)
* DrConstraint members *
************************/
-DrConstraint::DrConstraint(const QString& o1, const QString& o2, const QString& c1, const QString& c2)
+DrConstraint::DrConstraint(const TQString& o1, const TQString& o2, const TQString& c1, const TQString& c2)
: m_opt1(o1), m_opt2(o2), m_choice1(c1), m_choice2(c2), m_option1(0), m_option2(0)
{
}
@@ -676,7 +676,7 @@ bool DrConstraint::check(DrMain *driver)
* DrPageSize members *
**********************/
-DrPageSize::DrPageSize(const QString& s, float width, float height, float left, float bottom, float right, float top)
+DrPageSize::DrPageSize(const TQString& s, float width, float height, float left, float bottom, float right, float top)
: m_name(s),
m_width( width ),
m_height( height ),
@@ -698,17 +698,17 @@ DrPageSize::DrPageSize(const DrPageSize& d)
{
}
-QSize DrPageSize::pageSize() const
+TQSize DrPageSize::pageSize() const
{
- return QSize( ( int )m_width, ( int )m_height );
+ return TQSize( ( int )m_width, ( int )m_height );
}
-QRect DrPageSize::pageRect() const
+TQRect DrPageSize::pageRect() const
{
- return QRect( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ), ( int )( m_width-m_left-m_right ), ( int )( m_height-m_top-m_bottom ) );
+ return TQRect( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ), ( int )( m_width-m_left-m_right ), ( int )( m_height-m_top-m_bottom ) );
}
-QSize DrPageSize::margins() const
+TQSize DrPageSize::margins() const
{
- return QSize( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ) );
+ return TQSize( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ) );
}
diff --git a/kdeprint/driver.h b/kdeprint/driver.h
index 3bba797a8..f8102d175 100644
--- a/kdeprint/driver.h
+++ b/kdeprint/driver.h
@@ -25,12 +25,12 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qrect.h>
-#include <qsize.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqrect.h>
+#include <tqsize.h>
#include <kdelibs_export.h>
@@ -69,24 +69,24 @@ public:
Type type() const { return m_type; }
bool isOption() const { return (m_type >= DrBase::String); }
- const QString& get(const QString& key) const { return m_map[key]; }
- void set(const QString& key, const QString& val) { m_map[key] = val; }
- bool has(const QString& key) const { return m_map.contains(key); }
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; }
+ const TQString& get(const TQString& key) const { return m_map[key]; }
+ void set(const TQString& key, const TQString& val) { m_map[key] = val; }
+ bool has(const TQString& key) const { return m_map.contains(key); }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; }
bool conflict() const { return m_conflict; }
void setConflict(bool on) { m_conflict = on; }
- virtual QString valueText();
- virtual QString prettyText();
- virtual void setValueText(const QString&);
+ virtual TQString valueText();
+ virtual TQString prettyText();
+ virtual void setValueText(const TQString&);
virtual DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
- virtual void setOptions(const QMap<QString,QString>& opts);
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
virtual DrBase* clone();
protected:
- QMap<QString,QString> m_map;
+ TQMap<TQString,TQString> m_map;
QString m_name; // used as a search key, better to have defined directly
Type m_type;
bool m_conflict;
@@ -113,30 +113,30 @@ public:
void addGroup(DrGroup *grp);
void addObject(DrBase *optgrp);
void clearConflict();
- void removeOption(const QString& name);
+ void removeOption(const TQString& name);
void removeGroup(DrGroup *grp);
bool isEmpty();
virtual DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
- DrBase* findOption(const QString& name, DrGroup **parentGroup = 0);
+ DrBase* findOption(const TQString& name, DrGroup **parentGroup = 0);
DrGroup* findGroup(DrGroup *grp, DrGroup **parentGroup = 0);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
DrBase* clone();
- const QPtrList<DrGroup>& groups() { return m_subgroups; }
- const QPtrList<DrBase>& options() { return m_listoptions; }
+ const TQPtrList<DrGroup>& groups() { return m_subgroups; }
+ const TQPtrList<DrBase>& options() { return m_listoptions; }
- static QString groupForOption( const QString& optname );
+ static TQString groupForOption( const TQString& optname );
protected:
void createTree(DriverItem *parent);
- void flattenGroup(QMap<QString, DrBase*>&, int&);
+ void flattenGroup(TQMap<TQString, DrBase*>&, int&);
protected:
- QPtrList<DrGroup> m_subgroups;
- QDict<DrBase> m_options;
- QPtrList<DrBase> m_listoptions; // keep track of order of appearance
+ TQPtrList<DrGroup> m_subgroups;
+ TQDict<DrBase> m_options;
+ TQPtrList<DrBase> m_listoptions; // keep track of order of appearance
};
/*********************
@@ -156,19 +156,19 @@ public:
DrMain();
~DrMain();
- DriverItem* createTreeView(QListView *parent);
+ DriverItem* createTreeView(TQListView *parent);
void addConstraint(DrConstraint *c) { m_constraints.append(c); }
int checkConstraints();
- DrPageSize* findPageSize(const QString& name) { return m_pagesizes.find(name); }
+ DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.find(name); }
void addPageSize(DrPageSize *sz);
- void removeOptionGlobally(const QString& name);
+ void removeOptionGlobally(const TQString& name);
void removeGroupGlobally(DrGroup *grp);
- QMap<QString, DrBase*> flatten();
+ TQMap<TQString, DrBase*> flatten();
DrMain* cloneDriver();
protected:
- QPtrList<DrConstraint> m_constraints;
- QDict<DrPageSize> m_pagesizes;
+ TQPtrList<DrConstraint> m_constraints;
+ TQDict<DrPageSize> m_pagesizes;
};
/**********************************************************
@@ -208,8 +208,8 @@ public:
DrStringOption();
~DrStringOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
protected:
QString m_value;
@@ -232,9 +232,9 @@ public:
DrIntegerOption();
~DrIntegerOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
- QString fixedVal();
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
+ TQString fixedVal();
protected:
int m_value;
@@ -257,9 +257,9 @@ public:
DrFloatOption();
~DrFloatOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
- QString fixedVal();
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
+ TQString fixedVal();
protected:
float m_value;
@@ -283,21 +283,21 @@ public:
~DrListOption();
void addChoice(DrBase *ch) { m_choices.append(ch); }
- QPtrList<DrBase>* choices() { return &m_choices; }
+ TQPtrList<DrBase>* choices() { return &m_choices; }
DrBase* currentChoice() const { return m_current; }
- DrBase* findChoice(const QString& txt);
+ DrBase* findChoice(const TQString& txt);
void setChoice(int choicenum);
- virtual QString valueText();
- virtual QString prettyText();
- virtual void setValueText(const QString& s);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual TQString valueText();
+ virtual TQString prettyText();
+ virtual void setValueText(const TQString& s);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
DrBase* clone();
protected:
- QPtrList<DrBase> m_choices;
+ TQPtrList<DrBase> m_choices;
DrBase *m_current;
};
@@ -330,7 +330,7 @@ public:
class DrConstraint
{
public:
- DrConstraint(const QString& o1, const QString& o2, const QString& c1 = QString::null, const QString& c2 = QString::null);
+ DrConstraint(const TQString& o1, const TQString& o2, const TQString& c1 = TQString::null, const TQString& c2 = TQString::null);
DrConstraint(const DrConstraint&);
bool check(DrMain*);
@@ -355,7 +355,7 @@ protected:
class DrPageSize
{
public:
- DrPageSize(const QString& s, float width, float height, float left, float bottom, float right, float top);
+ DrPageSize(const TQString& s, float width, float height, float left, float bottom, float right, float top);
DrPageSize(const DrPageSize&);
/**
@@ -369,11 +369,11 @@ public:
float rightMargin() const { return m_right; }
float topMargin() const { return m_top; }
float bottomMargin() const { return m_bottom; }
- QString pageName() const { return m_name; }
+ TQString pageName() const { return m_name; }
- QSize pageSize() const;
- QRect pageRect() const;
- QSize margins() const;
+ TQSize pageSize() const;
+ TQRect pageRect() const;
+ TQSize margins() const;
protected:
QString m_name;
diff --git a/kdeprint/driveritem.cpp b/kdeprint/driveritem.cpp
index 026c369a6..7bb1715aa 100644
--- a/kdeprint/driveritem.cpp
+++ b/kdeprint/driveritem.cpp
@@ -20,20 +20,20 @@
#include "driveritem.h"
#include "driver.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdebug.h>
-DriverItem::DriverItem(QListView *parent, DrBase *item)
-: QListViewItem(parent), m_item(item), m_conflict(false)
+DriverItem::DriverItem(TQListView *parent, DrBase *item)
+: TQListViewItem(parent), m_item(item), m_conflict(false)
{
setOpen(depth() < 3);
setPixmap(0,SmallIcon("fileprint"));
updateText();
}
-DriverItem::DriverItem(QListViewItem *parent, QListViewItem *after, DrBase *item)
-: QListViewItem(parent, after), m_item(item), m_conflict(false)
+DriverItem::DriverItem(TQListViewItem *parent, TQListViewItem *after, DrBase *item)
+: TQListViewItem(parent, after), m_item(item), m_conflict(false)
{
setOpen(depth() < 3);
if (item) setPixmap(0,SmallIcon((item->isOption() ? "document" : "folder")));
@@ -46,7 +46,7 @@ void DriverItem::updateText()
{
QString s(m_item->get("text"));
if (m_item->isOption())
- s.append(QString::fromLatin1(": <%1>").arg(m_item->prettyText()));
+ s.append(TQString::fromLatin1(": <%1>").arg(m_item->prettyText()));
if (m_item->type() == DrBase::List)
{
// remove all children: something has changed (otherwise this
@@ -69,7 +69,7 @@ void DriverItem::updateText()
widthChanged();
}
-void DriverItem::paintCell(QPainter *p, const QColorGroup& cg, int, int width, int)
+void DriverItem::paintCell(TQPainter *p, const TQColorGroup& cg, int, int width, int)
{
// background
p->fillRect(0, 0, width, height(), cg.base());
@@ -107,7 +107,7 @@ void DriverItem::paintCell(QPainter *p, const QColorGroup& cg, int, int width, i
p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s);
w += w1;
p->setPen(cg.text());
- s = QString::fromLatin1(">");
+ s = TQString::fromLatin1(">");
w1 = p->fontMetrics().width(s);
p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s);
}
diff --git a/kdeprint/driveritem.h b/kdeprint/driveritem.h
index cb1227574..1d6fdcd4a 100644
--- a/kdeprint/driveritem.h
+++ b/kdeprint/driveritem.h
@@ -21,15 +21,15 @@
#ifndef DRIVERITEM_H
#define DRIVERITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
class DrBase;
class DriverItem : public QListViewItem
{
public:
- DriverItem(QListView *parent, DrBase *item);
- DriverItem(QListViewItem *parent, QListViewItem *after, DrBase *item);
+ DriverItem(TQListView *parent, DrBase *item);
+ DriverItem(TQListViewItem *parent, TQListViewItem *after, DrBase *item);
void updateText();
void updateTextRecursive();
@@ -37,7 +37,7 @@ public:
bool hasConflict() { return m_conflict; }
bool updateConflict();
- void paintCell(QPainter*, const QColorGroup&, int, int, int);
+ void paintCell(TQPainter*, const TQColorGroup&, int, int, int);
private:
DrBase *m_item;
diff --git a/kdeprint/driverview.cpp b/kdeprint/driverview.cpp
index 60fe0b26d..8b1ad67c7 100644
--- a/kdeprint/driverview.cpp
+++ b/kdeprint/driverview.cpp
@@ -22,29 +22,29 @@
#include "driveritem.h"
#include "driver.h"
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-DrListView::DrListView(QWidget *parent, const char *name)
+DrListView::DrListView(TQWidget *parent, const char *name)
: KListView(parent,name)
{
addColumn("");
header()->hide();
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setSorting(-1);
}
//****************************************************************************************************
-DriverView::DriverView(QWidget *parent, const char *name)
-: QWidget(parent,name)
+DriverView::DriverView(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPPDOptionsDriverPage = i18n( " <qt> "
+ TQString whatsThisPPDOptionsDriverPage = i18n( " <qt> "
" <b>List of Driver Options (from PPD)</b>. "
" <p>The upper pane of this dialog page contains all printjob options as laid "
" down in the printer's description file (PostScript Printer Description == 'PPD') </p>"
@@ -68,7 +68,7 @@ DriverView::DriverView(QWidget *parent, const char *name)
" in the kprinter dialog.</p> "
" </qt>" );
- QString whatsThisOptionSettingsDriverPage = i18n( " <qt> "
+ TQString whatsThisOptionSettingsDriverPage = i18n( " <qt> "
" <b>List of Possible Values for given Option (from PPD)</b>. "
" <p>The lower pane of this dialog page contains all possible values of the printoption "
" highlighted above, as laid "
@@ -94,19 +94,19 @@ DriverView::DriverView(QWidget *parent, const char *name)
m_driver = 0;
- QSplitter *splitter = new QSplitter(this);
- splitter->setOrientation(QSplitter::Vertical);
+ QSplitter *splitter = new TQSplitter(this);
+ splitter->setOrientation(TQSplitter::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(this, 0, 10);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, 10);
vbox->addWidget(splitter);
m_view = new DrListView(splitter);
- QWhatsThis::add(m_view, whatsThisPPDOptionsDriverPage);
+ TQWhatsThis::add(m_view, whatsThisPPDOptionsDriverPage);
m_optview = new DrOptionView(splitter);
- QWhatsThis::add(m_optview, whatsThisOptionSettingsDriverPage);
+ TQWhatsThis::add(m_optview, whatsThisOptionSettingsDriverPage);
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),m_optview,SLOT(slotItemSelected(QListViewItem*)));
- connect(m_optview,SIGNAL(changed()),SLOT(slotChanged()));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),m_optview,TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(m_optview,TQT_SIGNAL(changed()),TQT_SLOT(slotChanged()));
}
DriverView::~DriverView()
@@ -133,7 +133,7 @@ void DriverView::slotChanged()
}
}
-void DriverView::setOptions(const QMap<QString,QString>& opts)
+void DriverView::setOptions(const TQMap<TQString,TQString>& opts)
{
if (m_driver)
{
@@ -144,7 +144,7 @@ void DriverView::setOptions(const QMap<QString,QString>& opts)
}
}
-void DriverView::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DriverView::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (m_driver)
m_driver->getOptions(opts,incldef);
diff --git a/kdeprint/driverview.h b/kdeprint/driverview.h
index a35c3e14c..59f72133b 100644
--- a/kdeprint/driverview.h
+++ b/kdeprint/driverview.h
@@ -21,9 +21,9 @@
#ifndef DRIVERVIEW_H
#define DRIVERVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -33,19 +33,19 @@ class DrMain;
class KDEPRINT_EXPORT DrListView : public KListView
{
public:
- DrListView(QWidget *parent = 0, const char *name = 0);
+ DrListView(TQWidget *parent = 0, const char *name = 0);
};
class KDEPRINT_EXPORT DriverView : public QWidget
{
Q_OBJECT
public:
- DriverView(QWidget *parent = 0, const char *name = 0);
+ DriverView(TQWidget *parent = 0, const char *name = 0);
~DriverView();
void setDriver(DrMain*);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
void setAllowFixed(bool on);
bool hasConflict() const { return (m_conflict != 0); }
diff --git a/kdeprint/droptionview.cpp b/kdeprint/droptionview.cpp
index c8a91f4b9..f4ccedca4 100644
--- a/kdeprint/droptionview.cpp
+++ b/kdeprint/droptionview.cpp
@@ -22,22 +22,22 @@
#include "driveritem.h"
#include <math.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqlabel.h>
#include <klistbox.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qapplication.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kdialog.h>
#include <klocale.h>
-OptionBaseView::OptionBaseView(QWidget *parent, const char *name)
-: QWidget(parent,name)
+OptionBaseView::OptionBaseView(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
blockSS = false;
}
@@ -46,27 +46,27 @@ void OptionBaseView::setOption(DrBase*)
{
}
-void OptionBaseView::setValue(const QString&)
+void OptionBaseView::setValue(const TQString&)
{
}
//******************************************************************************************************
-OptionNumericView::OptionNumericView(QWidget *parent, const char *name)
+OptionNumericView::OptionNumericView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_edit = new QLineEdit(this);
- m_slider = new QSlider(Qt::Horizontal,this);
- m_slider->setTickmarks(QSlider::Below);
- QLabel *lab = new QLabel(i18n("Value:"),this);
- m_minval = new QLabel(this);
- m_maxval = new QLabel(this);
+ m_edit = new TQLineEdit(this);
+ m_slider = new TQSlider(Qt::Horizontal,this);
+ m_slider->setTickmarks(TQSlider::Below);
+ QLabel *lab = new TQLabel(i18n("Value:"),this);
+ m_minval = new TQLabel(this);
+ m_maxval = new TQLabel(this);
m_integer = true;
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *sub_ = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *sub2_ = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 5);
main_->addStretch(1);
main_->addLayout(sub_,0);
main_->addLayout(sub2_,0);
@@ -78,8 +78,8 @@ OptionNumericView::OptionNumericView(QWidget *parent, const char *name)
sub2_->addWidget(m_slider,1);
sub2_->addWidget(m_maxval,0);
- connect(m_slider,SIGNAL(valueChanged(int)),SLOT(slotSliderChanged(int)));
- connect(m_edit,SIGNAL(textChanged(const QString&)),SLOT(slotEditChanged(const QString&)));
+ connect(m_slider,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(slotSliderChanged(int)));
+ connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SLOT(slotEditChanged(const TQString&)));
}
void OptionNumericView::setOption(DrBase *opt)
@@ -95,8 +95,8 @@ void OptionNumericView::setOption(DrBase *opt)
int max_ = opt->get("maxval").toInt();
m_slider->setRange(min_,max_);
m_slider->setSteps(1,QMAX((max_-min_)/20,1));
- m_minval->setText(QString::number(min_));
- m_maxval->setText(QString::number(max_));
+ m_minval->setText(TQString::number(min_));
+ m_maxval->setText(TQString::number(max_));
}
else
{
@@ -114,7 +114,7 @@ void OptionNumericView::setOption(DrBase *opt)
setValue(opt->valueText());
}
-void OptionNumericView::setValue(const QString& val)
+void OptionNumericView::setValue(const TQString& val)
{
m_edit->setText(val);
}
@@ -125,16 +125,16 @@ void OptionNumericView::slotSliderChanged(int value)
QString txt;
if (m_integer)
- txt = QString::number(value);
+ txt = TQString::number(value);
else
- txt = QString::number(float(value)/1000.0,'f',3);
+ txt = TQString::number(float(value)/1000.0,'f',3);
blockSS = true;
m_edit->setText(txt);
blockSS = false;
emit valueChanged(txt);
}
-void OptionNumericView::slotEditChanged(const QString& txt)
+void OptionNumericView::slotEditChanged(const TQString& txt)
{
if (blockSS) return;
@@ -154,25 +154,25 @@ void OptionNumericView::slotEditChanged(const QString& txt)
else
{
m_edit->selectAll();
- QApplication::beep();
+ TQApplication::beep();
}
}
//******************************************************************************************************
-OptionStringView::OptionStringView(QWidget *parent, const char *name)
+OptionStringView::OptionStringView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_edit = new QLineEdit(this);
- QLabel *lab = new QLabel(i18n("String value:"),this);
+ m_edit = new TQLineEdit(this);
+ QLabel *lab = new TQLabel(i18n("String value:"),this);
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 5);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 5);
main_->addStretch(1);
main_->addWidget(lab,0);
main_->addWidget(m_edit,0);
main_->addStretch(1);
- connect(m_edit,SIGNAL(textChanged(const QString&)),SIGNAL(valueChanged(const QString&)));
+ connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SIGNAL(valueChanged(const TQString&)));
}
void OptionStringView::setOption(DrBase *opt)
@@ -181,22 +181,22 @@ void OptionStringView::setOption(DrBase *opt)
m_edit->setText(opt->valueText());
}
-void OptionStringView::setValue(const QString& val)
+void OptionStringView::setValue(const TQString& val)
{
m_edit->setText(val);
}
//******************************************************************************************************
-OptionListView::OptionListView(QWidget *parent, const char *name)
+OptionListView::OptionListView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
m_list = new KListBox(this);
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(m_list);
- connect(m_list,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
+ connect(m_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
}
void OptionListView::setOption(DrBase *opt)
@@ -206,7 +206,7 @@ void OptionListView::setOption(DrBase *opt)
blockSS = true;
m_list->clear();
m_choices.clear();
- QPtrListIterator<DrBase> it(*(((DrListOption*)opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(((DrListOption*)opt)->choices()));
for (;it.current();++it)
{
m_list->insertItem(it.current()->get("text"));
@@ -217,7 +217,7 @@ void OptionListView::setOption(DrBase *opt)
}
}
-void OptionListView::setValue(const QString& val)
+void OptionListView::setValue(const TQString& val)
{
m_list->setCurrentItem(m_choices.findIndex(val));
}
@@ -232,28 +232,28 @@ void OptionListView::slotSelectionChanged()
//******************************************************************************************************
-OptionBooleanView::OptionBooleanView(QWidget *parent, const char *name)
+OptionBooleanView::OptionBooleanView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_group = new QVButtonGroup(this);
- m_group->setFrameStyle(QFrame::NoFrame);
+ m_group = new TQVButtonGroup(this);
+ m_group->setFrameStyle(TQFrame::NoFrame);
- QRadioButton *btn = new QRadioButton(m_group);
+ QRadioButton *btn = new TQRadioButton(m_group);
btn->setCursor(KCursor::handCursor());
- btn = new QRadioButton(m_group);
+ btn = new TQRadioButton(m_group);
btn->setCursor(KCursor::handCursor());
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(m_group);
- connect(m_group,SIGNAL(clicked(int)),SLOT(slotSelected(int)));
+ connect(m_group,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotSelected(int)));
}
void OptionBooleanView::setOption(DrBase *opt)
{
if (opt->type() == DrBase::Boolean)
{
- QPtrListIterator<DrBase> it(*(((DrBooleanOption*)opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(((DrBooleanOption*)opt)->choices()));
m_choices.clear();
m_group->find(0)->setText(it.toFirst()->get("text"));
m_choices.append(it.toFirst()->name());
@@ -263,7 +263,7 @@ void OptionBooleanView::setOption(DrBase *opt)
}
}
-void OptionBooleanView::setValue(const QString& val)
+void OptionBooleanView::setValue(const TQString& val)
{
int ID = m_choices.findIndex(val);
m_group->setButton(ID);
@@ -277,29 +277,29 @@ void OptionBooleanView::slotSelected(int ID)
//******************************************************************************************************
-DrOptionView::DrOptionView(QWidget *parent, const char *name)
-: QGroupBox(parent,name)
+DrOptionView::DrOptionView(TQWidget *parent, const char *name)
+: TQGroupBox(parent,name)
{
- m_stack = new QWidgetStack(this);
+ m_stack = new TQWidgetStack(this);
OptionBaseView *w = new OptionListView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::List);
w = new OptionStringView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::String);
w = new OptionNumericView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::Integer);
w = new OptionBooleanView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::Boolean);
w = new OptionBaseView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,0); // empty widget
m_stack->raiseWidget(w);
@@ -308,7 +308,7 @@ DrOptionView::DrOptionView(QWidget *parent, const char *name)
setColumnLayout(0, Qt::Vertical );
layout()->setSpacing( KDialog::spacingHint() );
layout()->setMargin( KDialog::marginHint() );
- QVBoxLayout *main_ = new QVBoxLayout(layout(), KDialog::marginHint());
+ QVBoxLayout *main_ = new TQVBoxLayout(layout(), KDialog::marginHint());
main_->addWidget(m_stack);
m_item = 0;
@@ -316,7 +316,7 @@ DrOptionView::DrOptionView(QWidget *parent, const char *name)
m_allowfixed = true;
}
-void DrOptionView::slotItemSelected(QListViewItem *i)
+void DrOptionView::slotItemSelected(TQListViewItem *i)
{
m_item = (DriverItem*)i;
if (m_item && !m_item->drItem()->isOption())
@@ -345,7 +345,7 @@ void DrOptionView::slotItemSelected(QListViewItem *i)
}
}
-void DrOptionView::slotValueChanged(const QString& val)
+void DrOptionView::slotValueChanged(const TQString& val)
{
if (m_item && m_item->drItem() && !m_block)
{
diff --git a/kdeprint/droptionview.h b/kdeprint/droptionview.h
index 4426f91c6..3a36b8510 100644
--- a/kdeprint/droptionview.h
+++ b/kdeprint/droptionview.h
@@ -20,9 +20,9 @@
#ifndef DROPTIONVIEW_H
#define DROPTIONVIEW_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqstringlist.h>
class QLineEdit;
class QSlider;
@@ -39,12 +39,12 @@ class OptionBaseView : public QWidget
{
Q_OBJECT
public:
- OptionBaseView(QWidget *parent = 0, const char *name = 0);
+ OptionBaseView(TQWidget *parent = 0, const char *name = 0);
virtual void setOption(DrBase*);
- virtual void setValue(const QString&);
+ virtual void setValue(const TQString&);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
protected:
bool blockSS;
@@ -54,13 +54,13 @@ class OptionNumericView : public OptionBaseView
{
Q_OBJECT
public:
- OptionNumericView(QWidget *parent = 0, const char *name = 0);
+ OptionNumericView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSliderChanged(int);
- void slotEditChanged(const QString&);
+ void slotEditChanged(const TQString&);
private:
QLineEdit *m_edit;
@@ -72,9 +72,9 @@ private:
class OptionStringView : public OptionBaseView
{
public:
- OptionStringView(QWidget *parent = 0, const char *name = 0);
+ OptionStringView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
private:
QLineEdit *m_edit;
@@ -84,9 +84,9 @@ class OptionListView : public OptionBaseView
{
Q_OBJECT
public:
- OptionListView(QWidget *parent = 0, const char *name = 0);
+ OptionListView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSelectionChanged();
@@ -100,9 +100,9 @@ class OptionBooleanView : public OptionBaseView
{
Q_OBJECT
public:
- OptionBooleanView(QWidget *parent = 0, const char *name = 0);
+ OptionBooleanView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSelected(int);
@@ -116,15 +116,15 @@ class DrOptionView : public QGroupBox
{
Q_OBJECT
public:
- DrOptionView(QWidget *parent = 0, const char *name = 0);
+ DrOptionView(TQWidget *parent = 0, const char *name = 0);
void setAllowFixed(bool on) { m_allowfixed = on; }
signals:
void changed();
public slots:
- void slotValueChanged(const QString&);
- void slotItemSelected(QListViewItem*);
+ void slotValueChanged(const TQString&);
+ void slotItemSelected(TQListViewItem*);
private:
QWidgetStack *m_stack;
diff --git a/kdeprint/ext/kextprinterimpl.cpp b/kdeprint/ext/kextprinterimpl.cpp
index 09dc74832..c92657497 100644
--- a/kdeprint/ext/kextprinterimpl.cpp
+++ b/kdeprint/ext/kextprinterimpl.cpp
@@ -20,12 +20,12 @@
#include "kextprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
-KExtPrinterImpl::KExtPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KExtPrinterImpl::KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -36,10 +36,10 @@ KExtPrinterImpl::~KExtPrinterImpl()
void KExtPrinterImpl::preparePrinting(KPrinter *printer)
{
- printer->setOption("kde-qtcopies",QString::number(printer->numCopies()));
+ printer->setOption("kde-qtcopies",TQString::number(printer->numCopies()));
}
-bool KExtPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KExtPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
cmd = printer->option("kde-printcommand").stripWhiteSpace();
if (cmd.isEmpty())
diff --git a/kdeprint/ext/kextprinterimpl.h b/kdeprint/ext/kextprinterimpl.h
index b73c6d1c9..653593592 100644
--- a/kdeprint/ext/kextprinterimpl.h
+++ b/kdeprint/ext/kextprinterimpl.h
@@ -25,11 +25,11 @@
class KExtPrinterImpl : public KPrinterImpl
{
public:
- KExtPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KExtPrinterImpl();
void preparePrinting(KPrinter*);
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
};
#endif
diff --git a/kdeprint/ext/kmextmanager.cpp b/kdeprint/ext/kmextmanager.cpp
index 94e126e09..017142a14 100644
--- a/kdeprint/ext/kmextmanager.cpp
+++ b/kdeprint/ext/kmextmanager.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
-KMExtManager::KMExtManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMExtManager::KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(false);
diff --git a/kdeprint/ext/kmextmanager.h b/kdeprint/ext/kmextmanager.h
index 56094acee..8811f952d 100644
--- a/kdeprint/ext/kmextmanager.h
+++ b/kdeprint/ext/kmextmanager.h
@@ -21,13 +21,13 @@
#define KMEXTMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
class KMExtManager : public KMManager
{
public:
- KMExtManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMExtManager();
protected:
diff --git a/kdeprint/ext/kmextuimanager.cpp b/kdeprint/ext/kmextuimanager.cpp
index 55981231b..ea698b8cd 100644
--- a/kdeprint/ext/kmextuimanager.cpp
+++ b/kdeprint/ext/kmextuimanager.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-KMExtUiManager::KMExtUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMExtUiManager::KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
m_printdialogflags |= KMUiManager::PrintCommand;
diff --git a/kdeprint/ext/kmextuimanager.h b/kdeprint/ext/kmextuimanager.h
index daf31a406..671d8e76b 100644
--- a/kdeprint/ext/kmextuimanager.h
+++ b/kdeprint/ext/kmextuimanager.h
@@ -25,7 +25,7 @@
class KMExtUiManager : public KMUiManager
{
public:
- KMExtUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMExtUiManager();
int pluginPageCap();
diff --git a/kdeprint/foomatic/kfoomaticprinterimpl.cpp b/kdeprint/foomatic/kfoomaticprinterimpl.cpp
index e476b5581..b72fbd191 100644
--- a/kdeprint/foomatic/kfoomaticprinterimpl.cpp
+++ b/kdeprint/foomatic/kfoomaticprinterimpl.cpp
@@ -23,7 +23,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
-KFoomaticPrinterImpl::KFoomaticPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KFoomaticPrinterImpl::KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -33,18 +33,18 @@ KFoomaticPrinterImpl::~KFoomaticPrinterImpl()
}
// look for executable
-QString KFoomaticPrinterImpl::executable()
+TQString KFoomaticPrinterImpl::executable()
{
QString exe = KStandardDirs::findExe("foomatic-printjob");
return exe;
}
-bool KFoomaticPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KFoomaticPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
QString exe = executable();
if (!exe.isEmpty())
{
- cmd = exe + QString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd = exe + TQString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies());
return true;
}
else
diff --git a/kdeprint/foomatic/kfoomaticprinterimpl.h b/kdeprint/foomatic/kfoomaticprinterimpl.h
index 7d0699b58..74dfdc8f4 100644
--- a/kdeprint/foomatic/kfoomaticprinterimpl.h
+++ b/kdeprint/foomatic/kfoomaticprinterimpl.h
@@ -25,13 +25,13 @@
class KFoomaticPrinterImpl : public KPrinterImpl
{
public:
- KFoomaticPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KFoomaticPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- QString executable();
+ TQString executable();
};
#endif
diff --git a/kdeprint/foomatic/kmfoomaticmanager.cpp b/kdeprint/foomatic/kmfoomaticmanager.cpp
index 33be966b9..57edf07c9 100644
--- a/kdeprint/foomatic/kmfoomaticmanager.cpp
+++ b/kdeprint/foomatic/kmfoomaticmanager.cpp
@@ -21,14 +21,14 @@
#include "kpipeprocess.h"
#include "driver.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kdebug.h>
#include <kprocess.h>
#include <unistd.h>
-KMFoomaticManager::KMFoomaticManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMFoomaticManager::KMFoomaticManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(getuid() == 0);
@@ -87,7 +87,7 @@ DrMain* KMFoomaticManager::loadPrinterDriver(KMPrinter *printer, bool)
return createDriverFromXML(&docElem);
}
-KMPrinter* KMFoomaticManager::createPrinterFromElement(QDomElement *elem)
+KMPrinter* KMFoomaticManager::createPrinterFromElement(TQDomElement *elem)
{
QDomElement e = elem->namedItem("name").toElement();
if (!e.isNull())
@@ -128,7 +128,7 @@ KMPrinter* KMFoomaticManager::createPrinterFromElement(QDomElement *elem)
return NULL;
}
-DrMain* KMFoomaticManager::createDriverFromXML(QDomElement *elem)
+DrMain* KMFoomaticManager::createDriverFromXML(TQDomElement *elem)
{
DrMain *driver = new DrMain();
QDomElement pelem = elem->namedItem("printer").toElement(), delem = elem->namedItem("driver").toElement();
@@ -136,7 +136,7 @@ DrMain* KMFoomaticManager::createDriverFromXML(QDomElement *elem)
{
driver->set("manufacturer", pelem.namedItem("make").toElement().text());
driver->set("model", pelem.namedItem("model").toElement().text());
- QString s = QString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text());
+ QString s = TQString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text());
driver->set("description", s);
driver->set("text", s);
diff --git a/kdeprint/foomatic/kmfoomaticmanager.h b/kdeprint/foomatic/kmfoomaticmanager.h
index b5d18fc0c..65fa0067e 100644
--- a/kdeprint/foomatic/kmfoomaticmanager.h
+++ b/kdeprint/foomatic/kmfoomaticmanager.h
@@ -28,15 +28,15 @@ class KMPrinter;
class KMFoomaticManager : public KMManager
{
public:
- KMFoomaticManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMFoomaticManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
virtual ~KMFoomaticManager();
DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
protected:
void listPrinters();
- KMPrinter* createPrinterFromElement(QDomElement*);
- DrMain* createDriverFromXML(QDomElement*);
+ KMPrinter* createPrinterFromElement(TQDomElement*);
+ DrMain* createDriverFromXML(TQDomElement*);
};
#endif
diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp
index 4fdd990ce..4ca1464dd 100644
--- a/kdeprint/foomatic2loader.cpp
+++ b/kdeprint/foomatic2loader.cpp
@@ -20,13 +20,13 @@
#include "foomatic2loader.h"
#include "driver.h"
-#include <qfile.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
-void kdeprint_foomatic2scanner_init( QIODevice* );
+void kdeprint_foomatic2scanner_init( TQIODevice* );
void kdeprint_foomatic2scanner_terminate();
Foomatic2Loader::Foomatic2Loader()
@@ -37,7 +37,7 @@ Foomatic2Loader::~Foomatic2Loader()
{
}
-bool Foomatic2Loader::read( QIODevice *d )
+bool Foomatic2Loader::read( TQIODevice *d )
{
bool result = true;
m_foodata.clear();
@@ -48,26 +48,26 @@ bool Foomatic2Loader::read( QIODevice *d )
return result;
}
-bool Foomatic2Loader::readFromFile( const QString& filename )
+bool Foomatic2Loader::readFromFile( const TQString& filename )
{
- QFile f( filename );
+ TQFile f( filename );
m_foodata.clear();
if ( f.open( IO_ReadOnly ) )
return read( &f );
return false;
}
-bool Foomatic2Loader::readFromBuffer( const QString& buffer )
+bool Foomatic2Loader::readFromBuffer( const TQString& buffer )
{
- QCString buf = buffer.utf8();
- QBuffer d( buf );
+ TQCString buf = buffer.utf8();
+ TQBuffer d( buf );
m_foodata.clear();
if ( d.open( IO_ReadOnly ) )
return read( &d );
return false;
}
-DrBase* Foomatic2Loader::createValue( const QString& name, const QMap<QString,QVariant>& m ) const
+DrBase* Foomatic2Loader::createValue( const TQString& name, const TQMap<TQString,TQVariant>& m ) const
{
DrBase *choice = new DrBase;
choice->setName( name );
@@ -75,18 +75,18 @@ DrBase* Foomatic2Loader::createValue( const QString& name, const QMap<QString,QV
return choice;
}
-DrBase* Foomatic2Loader::createOption( const QMap<QString,QVariant>& m ) const
+DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) const
{
- QString type = m.operator[]( "type" ).toString();
+ TQString type = m.operator[]( "type" ).toString();
DrBase *opt = NULL;
if ( type == "enum" )
{
DrListOption *lopt = new DrListOption;
- QVariant a = m.operator[]( "vals_byname" );
- QMap<QString,QVariant>::ConstIterator it = a.mapBegin();
+ TQVariant a = m.operator[]( "vals_byname" );
+ TQMap<TQString,TQVariant>::ConstIterator it = a.mapBegin();
for ( ; it!=a.mapEnd(); ++it )
{
- if ( it.data().type() != QVariant::Map )
+ if ( it.data().type() != TQVariant::Map )
continue;
DrBase *ch = createValue( it.key(), it.data().toMap() );
if ( ch )
@@ -126,7 +126,7 @@ DrBase* Foomatic2Loader::createOption( const QMap<QString,QVariant>& m ) const
{
opt->setName( m.operator[]( "name" ).toString() );
opt->set( "text", m.operator[]( "comment" ).toString() );
- QString defval = m.operator[]( "default" ).toString();
+ TQString defval = m.operator[]( "default" ).toString();
if ( !defval.isEmpty() )
{
opt->setValueText( defval );
@@ -141,30 +141,30 @@ DrMain* Foomatic2Loader::buildDriver() const
if ( m_foodata.isEmpty() )
return NULL;
- QVariant v = m_foodata.find( "VAR" ).data();
- if ( !v.isNull() && v.type() == QVariant::Map )
+ TQVariant v = m_foodata.find( "VAR" ).data();
+ if ( !v.isNull() && v.type() == TQVariant::Map )
{
DrMain *driver = new DrMain;
- QMap<QString,DrGroup*> groups;
+ TQMap<TQString,DrGroup*> groups;
driver->set( "manufacturer", v.mapFind( "make" ).data().toString() );
driver->set( "model", v.mapFind( "model" ).data().toString() );
driver->set( "matic_printer", v.mapFind( "id" ).data().toString() );
driver->set( "matic_driver", v.mapFind( "driver" ).data().toString() );
- driver->set( "text", QString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) );
+ driver->set( "text", TQString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) );
if ( m_foodata.contains( "POSTPIPE" ) )
driver->set( "postpipe", m_foodata.find( "POSTPIPE" ).data().toString() );
v = v.mapFind( "args" ).data();
- if ( !v.isNull() && v.type() == QVariant::List )
+ if ( !v.isNull() && v.type() == TQVariant::List )
{
- QValueList<QVariant>::ConstIterator it = v.listBegin();
+ TQValueList<TQVariant>::ConstIterator it = v.listBegin();
for ( ; it!=v.listEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
{
- QString group = DrGroup::groupForOption( opt->name() );
+ TQString group = DrGroup::groupForOption( opt->name() );
DrGroup *grp = NULL;
if ( !groups.contains( group ) )
{
@@ -179,14 +179,14 @@ DrMain* Foomatic2Loader::buildDriver() const
if ( opt->name() == "PageSize" )
{
// try to add the corresponding page sizes
- QVariant choices = ( *it ).mapFind( "vals_byname" ).data();
- QRegExp re( "(\\d+) +(\\d+)" );
- if ( choices.type() == QVariant::Map )
+ TQVariant choices = ( *it ).mapFind( "vals_byname" ).data();
+ TQRegExp re( "(\\d+) +(\\d+)" );
+ if ( choices.type() == TQVariant::Map )
{
- QMap<QString,QVariant>::ConstIterator it = choices.mapBegin();
+ TQMap<TQString,TQVariant>::ConstIterator it = choices.mapBegin();
for ( ; it!=choices.mapEnd(); ++it )
{
- QString driverval = ( *it ).mapFind( "driverval" ).data().toString();
+ TQString driverval = ( *it ).mapFind( "driverval" ).data().toString();
if ( re.exactMatch( driverval ) )
{
driver->addPageSize( new DrPageSize( it.key(), re.cap( 1 ).toInt(), re.cap( 2 ).toInt(), 36, 24, 36, 24 ) );
@@ -208,19 +208,19 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
{
if ( !m_foodata.isEmpty() )
{
- QValueList<DrBase*> optList;
+ TQValueList<DrBase*> optList;
DrGroup *grp = NULL;
- QVariant V = m_foodata.find( "VAR" ).data();
- if ( !V.isNull() && V.type() == QVariant::Map )
+ TQVariant V = m_foodata.find( "VAR" ).data();
+ if ( !V.isNull() && V.type() == TQVariant::Map )
{
- QVariant v = V.mapFind( "args" ).data();
- if ( !v.isNull() && v.type() == QVariant::List )
+ TQVariant v = V.mapFind( "args" ).data();
+ if ( !v.isNull() && v.type() == TQVariant::List )
{
- QValueList<QVariant>::ConstIterator it = v.listBegin();
+ TQValueList<TQVariant>::ConstIterator it = v.listBegin();
for ( ; it!=v.listEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
@@ -232,12 +232,12 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
else
{
v = V.mapFind( "args_byname" ).data();
- if ( !v.isNull() && v.type() == QVariant::Map )
+ if ( !v.isNull() && v.type() == TQVariant::Map )
{
- QMap<QString,QVariant>::ConstIterator it = v.mapBegin();
+ TQMap<TQString,TQVariant>::ConstIterator it = v.mapBegin();
for ( ; it!=v.mapEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
@@ -249,7 +249,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
}
}
- for ( QValueList<DrBase*>::ConstIterator it=optList.begin(); it!=optList.end(); ++it )
+ for ( TQValueList<DrBase*>::ConstIterator it=optList.begin(); it!=optList.end(); ++it )
{
DrBase *opt = ( *it );
if ( opt )
@@ -271,8 +271,8 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
DrBase *oldOpt = driver->findOption( opt->name() );
if ( oldOpt && oldOpt->type() == DrBase::List )
{
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( oldOpt )->choices() ) );
- QString fixedvals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( oldOpt )->choices() ) );
+ TQString fixedvals;
for ( ; it.current(); ++it )
{
fixedvals.append( it.current()->name() );
@@ -292,7 +292,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
return driver;
}
-DrMain* Foomatic2Loader::loadDriver( const QString& filename )
+DrMain* Foomatic2Loader::loadDriver( const TQString& filename )
{
Foomatic2Loader loader;
if ( loader.readFromFile( filename ) )
diff --git a/kdeprint/foomatic2loader.h b/kdeprint/foomatic2loader.h
index 2456ff693..3559bfd73 100644
--- a/kdeprint/foomatic2loader.h
+++ b/kdeprint/foomatic2loader.h
@@ -20,7 +20,7 @@
#ifndef FOOMATIC2LOADER_H
#define FOOMATIC2LOADER_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdelibs_export.h>
@@ -33,24 +33,24 @@ public:
Foomatic2Loader();
~Foomatic2Loader();
- bool read( QIODevice *d );
- bool readFromBuffer( const QString& buffer );
- bool readFromFile( const QString& filename );
- QMap<QString,QVariant> data() const;
+ bool read( TQIODevice *d );
+ bool readFromBuffer( const TQString& buffer );
+ bool readFromFile( const TQString& filename );
+ TQMap<TQString,TQVariant> data() const;
DrMain* buildDriver() const;
DrMain* modifyDriver( DrMain* ) const;
- static DrMain* loadDriver( const QString& filename );
+ static DrMain* loadDriver( const TQString& filename );
private:
- QMap<QString,QVariant> m_foodata;
+ TQMap<TQString,TQVariant> m_foodata;
friend int kdeprint_foomatic2parse( void* );
- DrBase* createValue( const QString&, const QMap<QString,QVariant>& ) const;
- DrBase* createOption( const QMap<QString,QVariant>& ) const;
+ DrBase* createValue( const TQString&, const TQMap<TQString,TQVariant>& ) const;
+ DrBase* createOption( const TQMap<TQString,TQVariant>& ) const;
};
-inline QMap<QString,QVariant> Foomatic2Loader::data() const
+inline TQMap<TQString,TQVariant> Foomatic2Loader::data() const
{ return m_foodata; }
#endif /* FOOMATIC2LOADER_H */
diff --git a/kdeprint/fooparser.cpp b/kdeprint/fooparser.cpp
index f434e79b3..329f80ca5 100644
--- a/kdeprint/fooparser.cpp
+++ b/kdeprint/fooparser.cpp
@@ -44,7 +44,7 @@
#define YYDEBUG 1
#include <stdlib.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "foomatic2loader.h"
void yyerror(const char*) {}
@@ -737,7 +737,7 @@ case 5:
break;}
case 6:
#line 51 "./fooparser.y"
-{ QMap<QString,QVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
+{ TQMap<TQString,TQVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
break;}
case 7:
#line 54 "./fooparser.y"
@@ -753,7 +753,7 @@ case 9:
break;}
case 10:
#line 61 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
case 11:
#line 62 "./fooparser.y"
@@ -773,11 +773,11 @@ case 14:
break;}
case 15:
#line 66 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
case 16:
#line 67 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
diff --git a/kdeprint/fooscanner.cpp b/kdeprint/fooscanner.cpp
index f67b2f186..cab7426ab 100644
--- a/kdeprint/fooscanner.cpp
+++ b/kdeprint/fooscanner.cpp
@@ -444,8 +444,8 @@ char *yytext;
* Boston, MA 02110-1301, USA.
**/
-#include <qvariant.h>
-#include <qiodevice.h>
+#include <tqvariant.h>
+#include <tqiodevice.h>
#define YYSTYPE QVariant
#include "fooparser.cpp.h"
@@ -463,7 +463,7 @@ char *yytext;
result = 0; \
}
-QIODevice* kdeprint_foomatic2scanner_device = NULL;
+TQIODevice* kdeprint_foomatic2scanner_device = NULL;
#line 468 "./fooscanner.cpp"
/* Macros after this point can all be overridden by user definitions in
@@ -776,12 +776,12 @@ YY_RULE_SETUP
case 14:
YY_RULE_SETUP
#line 64 "./fooscanner.l"
-{ yylval = QCString(yytext+1, strlen(yytext)-1); return STRING; }
+{ yylval = TQCString(yytext+1, strlen(yytext)-1); return STRING; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 65 "./fooscanner.l"
-{ yylval = QCString(yytext+1, strlen(yytext)-1); return QUOTED; }
+{ yylval = TQCString(yytext+1, strlen(yytext)-1); return QUOTED; }
YY_BREAK
case 16:
YY_RULE_SETUP
@@ -1696,7 +1696,7 @@ int main()
#line 73 "./fooscanner.l"
-void kdeprint_foomatic2scanner_init( QIODevice *d )
+void kdeprint_foomatic2scanner_init( TQIODevice *d )
{
kdeprint_foomatic2scanner_device = d;
}
diff --git a/kdeprint/kdeprintcheck.cpp b/kdeprint/kdeprintcheck.cpp
index 9e9cccac4..5c807ae9b 100644
--- a/kdeprint/kdeprintcheck.cpp
+++ b/kdeprint/kdeprintcheck.cpp
@@ -41,7 +41,7 @@
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kextsock.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <unistd.h>
static const char* const config_stddirs[] = {
@@ -53,7 +53,7 @@ static const char* const config_stddirs[] = {
0
};
-bool KdeprintChecker::check(KConfig *conf, const QString& group)
+bool KdeprintChecker::check(KConfig *conf, const TQString& group)
{
if (!group.isEmpty())
conf->setGroup(group);
@@ -61,10 +61,10 @@ bool KdeprintChecker::check(KConfig *conf, const QString& group)
return check(uris);
}
-bool KdeprintChecker::check(const QStringList& uris)
+bool KdeprintChecker::check(const TQStringList& uris)
{
bool state(true);
- for (QStringList::ConstIterator it=uris.begin(); it!=uris.end() && state; ++it)
+ for (TQStringList::ConstIterator it=uris.begin(); it!=uris.end() && state; ++it)
{
state = (state && checkURL(KURL(*it)));
// kdDebug( 500 ) << "auto-detection uri=" << *it << ", state=" << state << endl;
@@ -101,8 +101,8 @@ bool KdeprintChecker::checkConfig(const KURL& url)
const char* const *p = config_stddirs;
while (*p)
{
- // kdDebug( 500 ) << "checkConfig() with " << QString::fromLatin1( *p ) + f << endl;
- if ( QFile::exists( QString::fromLatin1( *p ) + f ) )
+ // kdDebug( 500 ) << "checkConfig() with " << TQString::fromLatin1( *p ) + f << endl;
+ if ( TQFile::exists( TQString::fromLatin1( *p ) + f ) )
{
state = true;
break;
diff --git a/kdeprint/kdeprintcheck.h b/kdeprint/kdeprintcheck.h
index c188c9f3a..f538dc2a4 100644
--- a/kdeprint/kdeprintcheck.h
+++ b/kdeprint/kdeprintcheck.h
@@ -20,16 +20,16 @@
#ifndef KDEPRINTCHECK_H
#define KDEPRINTCHECK_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kurl.h>
class KDEPRINT_EXPORT KdeprintChecker
{
public:
- static bool check(KConfig *conf, const QString& group = QString::null);
- static bool check(const QStringList& uris);
+ static bool check(KConfig *conf, const TQString& group = TQString::null);
+ static bool check(const TQStringList& uris);
private:
static bool checkURL(const KURL&);
diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp
index 3506b6469..198147463 100644
--- a/kdeprint/kdeprintd.cpp
+++ b/kdeprint/kdeprintd.cpp
@@ -20,7 +20,7 @@
#include "kdeprintd.h"
#include "kprintprocess.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <knotifyclient.h>
#include <kmessagebox.h>
@@ -28,21 +28,21 @@
#include <dcopclient.h>
#include <kio/passdlg.h>
#include <kio/authinfo.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kwin.h>
#include <kapplication.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <unistd.h>
extern "C"
{
- KDE_EXPORT KDEDModule *create_kdeprintd(const QCString& name)
+ KDE_EXPORT KDEDModule *create_kdeprintd(const TQCString& name)
{
return new KDEPrintd(name);
}
@@ -52,7 +52,7 @@ class StatusWindow : public QWidget
{
public:
StatusWindow(int pid = -1);
- void setMessage(const QString&);
+ void setMessage(const TQString&);
int pid() const { return m_pid; }
private:
@@ -63,31 +63,31 @@ private:
};
StatusWindow::StatusWindow(int pid)
-: QWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid)
+: TQWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid)
{
- m_label = new QLabel(this);
+ m_label = new TQLabel(this);
m_label->setAlignment(AlignCenter);
m_button = new KPushButton(KStdGuiItem::close(), this);
- m_icon = new QLabel(this);
+ m_icon = new TQLabel(this);
m_icon->setPixmap(DesktopIcon("fileprint"));
m_icon->setAlignment(AlignCenter);
KWin::setIcons(winId(), *(m_icon->pixmap()), SmallIcon("fileprint"));
- QGridLayout *l0 = new QGridLayout(this, 2, 3, 10, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 3, 10, 10);
l0->setRowStretch(0, 1);
l0->setColStretch(1, 1);
l0->addMultiCellWidget(m_label, 0, 0, 1, 2);
l0->addWidget(m_button, 1, 2);
l0->addMultiCellWidget(m_icon, 0, 1, 0, 0);
- connect(m_button, SIGNAL(clicked()), SLOT(hide()));
+ connect(m_button, TQT_SIGNAL(clicked()), TQT_SLOT(hide()));
resize(200, 50);
}
-void StatusWindow::setMessage(const QString& msg)
+void StatusWindow::setMessage(const TQString& msg)
{
//QSize oldSz = size();
m_label->setText(msg);
//QSize sz = m_label->sizeHint();
- //sz += QSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->sizeHint().height());
+ //sz += TQSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->sizeHint().height());
// dialog will never be smaller
//sz = sz.expandedTo(oldSz);
//resize(sz);
@@ -97,7 +97,7 @@ void StatusWindow::setMessage(const QString& msg)
//*****************************************************************************************************
-KDEPrintd::KDEPrintd(const QCString& obj)
+KDEPrintd::KDEPrintd(const TQCString& obj)
: KDEDModule(obj)
{
m_processpool.setAutoDelete(true);
@@ -109,21 +109,21 @@ KDEPrintd::~KDEPrintd()
{
}
-int KDEPrintd::print(const QString& cmd, const QStringList& files, bool remflag)
+int KDEPrintd::print(const TQString& cmd, const TQStringList& files, bool remflag)
{
KPrintProcess *proc = new KPrintProcess;
QString command(cmd);
- QRegExp re( "\\$out\\{([^}]*)\\}" );
+ TQRegExp re( "\\$out\\{([^}]*)\\}" );
- connect(proc,SIGNAL(printTerminated(KPrintProcess*)),SLOT(slotPrintTerminated(KPrintProcess*)));
- connect(proc,SIGNAL(printError(KPrintProcess*,const QString&)),SLOT(slotPrintError(KPrintProcess*,const QString&)));
+ connect(proc,TQT_SIGNAL(printTerminated(KPrintProcess*)),TQT_SLOT(slotPrintTerminated(KPrintProcess*)));
+ connect(proc,TQT_SIGNAL(printError(KPrintProcess*,const TQString&)),TQT_SLOT(slotPrintError(KPrintProcess*,const TQString&)));
proc->setCommand( command );
if ( re.search( command ) != -1 )
{
KURL url( re.cap( 1 ) );
if ( !url.isLocalFile() )
{
- QString tmpFilename = locateLocal( "tmp", "kdeprint_" + kapp->randomString( 8 ) );
+ TQString tmpFilename = locateLocal( "tmp", "kdeprint_" + kapp->randomString( 8 ) );
command.replace( re, KProcess::quote( tmpFilename ) );
proc->setOutput( re.cap( 1 ) );
proc->setTempOutput( tmpFilename );
@@ -153,13 +153,13 @@ void KDEPrintd::slotPrintTerminated( KPrintProcess *proc )
m_processpool.removeRef( proc );
}
-void KDEPrintd::slotPrintError( KPrintProcess *proc, const QString& msg )
+void KDEPrintd::slotPrintError( KPrintProcess *proc, const TQString& msg )
{
KNotifyClient::event("printerror",i18n("<p><nobr>A print error occurred. Error message received from system:</nobr></p><br>%1").arg(msg));
m_processpool.removeRef( proc );
}
-QString KDEPrintd::openPassDlg(const QString& user)
+TQString KDEPrintd::openPassDlg(const TQString& user)
{
QString user_(user), pass_, result;
if (KIO::PasswordDialog::getNameAndPassword(user_, pass_, NULL) == KDialog::Accepted)
@@ -167,17 +167,17 @@ QString KDEPrintd::openPassDlg(const QString& user)
return result;
}
-bool KDEPrintd::checkFiles(QString& cmd, const QStringList& files)
+bool KDEPrintd::checkFiles(TQString& cmd, const TQStringList& files)
{
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
- if (::access(QFile::encodeName(*it).data(), R_OK) != 0)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ if (::access(TQFile::encodeName(*it).data(), R_OK) != 0)
{
if (KMessageBox::warningContinueCancel(0,
i18n("Some of the files to print are not readable by the KDE "
"print daemon. This may happen if you are trying to print "
"as a different user to the one currently logged in. To continue "
"printing, you need to provide root's password."),
- QString::null,
+ TQString::null,
i18n("Provide root's Password"),
"provideRootsPassword") == KMessageBox::Continue)
{
@@ -190,17 +190,17 @@ bool KDEPrintd::checkFiles(QString& cmd, const QStringList& files)
return true;
}
-void KDEPrintd::statusMessage(const QString& msg, int pid, const QString& appName)
+void KDEPrintd::statusMessage(const TQString& msg, int pid, const TQString& appName)
{
StatusWindow *w = m_windows.find(pid);
if (!w && !msg.isEmpty())
{
w = new StatusWindow(pid);
if (appName.isEmpty())
- w->setCaption(i18n("Printing Status - %1").arg("(pid="+QString::number(pid)+")"));
+ w->setCaption(i18n("Printing Status - %1").arg("(pid="+TQString::number(pid)+")"));
else
w->setCaption(i18n("Printing Status - %1").arg(appName));
- connect(w, SIGNAL(destroyed()), SLOT(slotClosed()));
+ connect(w, TQT_SIGNAL(destroyed()), TQT_SLOT(slotClosed()));
w->show();
m_windows.insert(pid, w);
}
@@ -228,21 +228,21 @@ class KDEPrintd::Request
{
public:
DCOPClientTransaction *transaction;
- QString user;
- QString uri;
+ TQString user;
+ TQString uri;
int seqNbr;
};
-QString KDEPrintd::requestPassword( const QString& user, const QString& host, int port, int seqNbr )
+TQString KDEPrintd::requestPassword( const TQString& user, const TQString& host, int port, int seqNbr )
{
Request *req = new Request;
req->user = user;
- req->uri = "print://" + user + "@" + host + ":" + QString::number(port);
+ req->uri = "print://" + user + "@" + host + ":" + TQString::number(port);
req->seqNbr = seqNbr;
req->transaction = callingDcopClient()->beginTransaction();
m_requestsPending.append( req );
if ( m_requestsPending.count() == 1 )
- QTimer::singleShot( 0, this, SLOT( processRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processRequest() ) );
return "::";
}
@@ -253,29 +253,29 @@ void KDEPrintd::processRequest()
Request *req = m_requestsPending.first();
KIO::AuthInfo info;
- QByteArray params, reply;
- QCString replyType;
- QString authString( "::" );
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQString authString( "::" );
info.username = req->user;
info.keepPassword = true;
info.url = req->uri;
info.comment = i18n( "Printing system" );
- QDataStream input( params, IO_WriteOnly );
+ TQDataStream input( params, IO_WriteOnly );
input << info << i18n( "Authentication failed (user name=%1)" ).arg( info.username ) << 0L << (long int) req->seqNbr;
- if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,QString,long int,long int)",
+ if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,TQString,long int,long int)",
params, replyType, reply ) )
{
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream output( reply, IO_ReadOnly );
+ TQDataStream output( reply, IO_ReadOnly );
KIO::AuthInfo result;
int seqNbr;
output >> result >> seqNbr;
if ( result.isModified() )
- authString = result.username + ":" + result.password + ":" + QString::number( seqNbr );
+ authString = result.username + ":" + result.password + ":" + TQString::number( seqNbr );
}
else
kdWarning( 500 ) << "DCOP returned type error, expected KIO::AuthInfo, received " << replyType << endl;
@@ -283,28 +283,28 @@ void KDEPrintd::processRequest()
else
kdWarning( 500 ) << "Cannot communicate with kded_kpasswdserver" << endl;
- QByteArray outputData;
- QDataStream output( outputData, IO_WriteOnly );
+ TQByteArray outputData;
+ TQDataStream output( outputData, IO_WriteOnly );
output << authString;
- replyType = "QString";
+ replyType = "TQString";
callingDcopClient()->endTransaction( req->transaction, replyType, outputData );
m_requestsPending.remove( ( unsigned int )0 );
if ( m_requestsPending.count() > 0 )
- QTimer::singleShot( 0, this, SLOT( processRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processRequest() ) );
}
-void KDEPrintd::initPassword( const QString& user, const QString& passwd, const QString& host, int port )
+void KDEPrintd::initPassword( const TQString& user, const TQString& passwd, const TQString& host, int port )
{
- QByteArray params, reply;
- QCString replyType;
+ TQByteArray params, reply;
+ TQCString replyType;
KIO::AuthInfo info;
info.username = user;
info.password = passwd;
- info.url = "print://" + user + "@" + host + ":" + QString::number(port);
+ info.url = "print://" + user + "@" + host + ":" + TQString::number(port);
- QDataStream input( params, IO_WriteOnly );
+ TQDataStream input( params, IO_WriteOnly );
input << info << ( long int )0;
if ( !callingDcopClient()->call( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo,long int)",
diff --git a/kdeprint/kdeprintd.h b/kdeprint/kdeprintd.h
index 50c805624..48fcdd021 100644
--- a/kdeprint/kdeprintd.h
+++ b/kdeprint/kdeprintd.h
@@ -21,11 +21,11 @@
#define KDEPRINTD_H
#include <kdedmodule.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
-#include <qintdict.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
+#include <tqintdict.h>
class KPrintProcess;
class KProcess;
@@ -37,30 +37,30 @@ class KDEPrintd : public KDEDModule
K_DCOP
public:
- KDEPrintd(const QCString& obj);
+ KDEPrintd(const TQCString& obj);
~KDEPrintd();
k_dcop:
- int print(const QString& cmd, const QStringList& files, bool remove);
- QString openPassDlg(const QString& user);
- ASYNC statusMessage(const QString& msg, int pid = -1, const QString& appName = QString::null);
- QString requestPassword( const QString& user, const QString& host, int port, int seqNbr );
- void initPassword( const QString& user, const QString& passwd, const QString& host, int port );
+ int print(const TQString& cmd, const TQStringList& files, bool remove);
+ TQString openPassDlg(const TQString& user);
+ ASYNC statusMessage(const TQString& msg, int pid = -1, const TQString& appName = TQString::null);
+ TQString requestPassword( const TQString& user, const TQString& host, int port, int seqNbr );
+ void initPassword( const TQString& user, const TQString& passwd, const TQString& host, int port );
protected slots:
void slotPrintTerminated( KPrintProcess* );
- void slotPrintError( KPrintProcess*, const QString& );
+ void slotPrintError( KPrintProcess*, const TQString& );
void slotClosed();
void processRequest();
protected:
- bool checkFiles(QString& cmd, const QStringList& files);
+ bool checkFiles(TQString& cmd, const TQStringList& files);
private:
class Request;
- QPtrList<KPrintProcess> m_processpool;
- QIntDict<StatusWindow> m_windows;
- QPtrList<Request> m_requestsPending;
+ TQPtrList<KPrintProcess> m_processpool;
+ TQIntDict<StatusWindow> m_windows;
+ TQPtrList<Request> m_requestsPending;
};
#endif
diff --git a/kdeprint/kfilelist.cpp b/kdeprint/kfilelist.cpp
index 6be6f4ecb..c61f3b948 100644
--- a/kdeprint/kfilelist.cpp
+++ b/kdeprint/kfilelist.cpp
@@ -19,12 +19,12 @@
#include "kfilelist.h"
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
+#include <tqwhatsthis.h>
#include <kio/netaccess.h>
#include <kurldrag.h>
@@ -35,11 +35,11 @@
#include <krun.h>
#include <kmimetype.h>
-KFileList::KFileList(QWidget *parent, const char *name)
-: QWidget(parent, name)
+KFileList::KFileList(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAddFileButton = i18n( " <qt> <b>Add File button</b>"
+ TQString whatsThisAddFileButton = i18n( " <qt> <b>Add File button</b>"
" <p>This button calls the <em>'File Open'</em> dialog to let you"
" select a file for printing. Note, that "
" <ul><li>you can select ASCII or International Text, PDF,"
@@ -51,26 +51,26 @@ KFileList::KFileList(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisRemoveFileButton = i18n(" <qt> <b>Remove File button</b>"
+ TQString whatsThisRemoveFileButton = i18n(" <qt> <b>Remove File button</b>"
" <p>This button removes the highlighted file from the"
" list of to-be-printed files."
" </qt>" );
- QString whatsThisMoveFileUpButton = i18n(" <qt> <b>Move File Up button</b>"
+ TQString whatsThisMoveFileUpButton = i18n(" <qt> <b>Move File Up button</b>"
" <p>This button moves the highlighted file up in the list"
" of files to be printed.</p>"
" <p>In effect, this changes the order"
" of the files' printout.</p>"
" </qt>" );
- QString whatsThisMoveFileDownButton = i18n(" <qt> <b>Move File Down button</b>"
+ TQString whatsThisMoveFileDownButton = i18n(" <qt> <b>Move File Down button</b>"
" <p>This button moves the highlighted file down in the list"
" of files to be printed.</p>"
" <p>In effect, this changes the order"
" of the files' printout.</p>"
" </qt>" );
- QString whatsThisOpenFileButton = i18n( " <qt> <b>File Open button</b>"
+ TQString whatsThisOpenFileButton = i18n( " <qt> <b>File Open button</b>"
" <p>This button tries to open the highlighted file, so"
" you can view or edit it before you send it to the printing"
" system.</p>"
@@ -79,7 +79,7 @@ KFileList::KFileList(QWidget *parent, const char *name)
" the file.</p>"
" </qt>" );
- QString whatsThisFileSelectionListview = i18n( " <qt> <b>File List view</b>"
+ TQString whatsThisFileSelectionListview = i18n( " <qt> <b>File List view</b>"
" <p>This list displays all the files you selected for printing."
" You can see the file name(s), file path(s) and the file"
" (MIME) type(s) as determined by KDEPrint. You may re-arrange the "
@@ -104,53 +104,53 @@ KFileList::KFileList(QWidget *parent, const char *name)
m_files->setAllColumnsShowFocus(true);
m_files->setSorting(-1);
m_files->setAcceptDrops(false);
- m_files->setSelectionMode(QListView::Extended);
+ m_files->setSelectionMode(TQListView::Extended);
m_files->header()->setStretchEnabled(true, 2);
- QWhatsThis::add(m_files, whatsThisFileSelectionListview);
- connect(m_files, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ TQWhatsThis::add(m_files, whatsThisFileSelectionListview);
+ connect(m_files, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
- m_add = new QToolButton(this);
+ m_add = new TQToolButton(this);
m_add->setIconSet(SmallIconSet("fileopen"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddFile()));
- QToolTip::add(m_add, i18n("Add file"));
- QWhatsThis::add(m_add, whatsThisAddFileButton);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddFile()));
+ TQToolTip::add(m_add, i18n("Add file"));
+ TQWhatsThis::add(m_add, whatsThisAddFileButton);
- m_remove = new QToolButton(this);
+ m_remove = new TQToolButton(this);
m_remove->setIconSet(SmallIconSet("remove"));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveFile()));
- QToolTip::add(m_remove, i18n("Remove file"));
- QWhatsThis::add(m_remove, whatsThisRemoveFileButton);
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveFile()));
+ TQToolTip::add(m_remove, i18n("Remove file"));
+ TQWhatsThis::add(m_remove, whatsThisRemoveFileButton);
m_remove->setEnabled(false);
- m_open = new QToolButton(this);
+ m_open = new TQToolButton(this);
m_open->setIconSet(SmallIconSet("filefind"));
- connect(m_open, SIGNAL(clicked()), SLOT(slotOpenFile()));
- QToolTip::add(m_open, i18n("Open file"));
- QWhatsThis::add(m_open, whatsThisOpenFileButton);
+ connect(m_open, TQT_SIGNAL(clicked()), TQT_SLOT(slotOpenFile()));
+ TQToolTip::add(m_open, i18n("Open file"));
+ TQWhatsThis::add(m_open, whatsThisOpenFileButton);
m_open->setEnabled(false);
- m_up = new QToolButton(this);
+ m_up = new TQToolButton(this);
m_up->setIconSet(SmallIconSet("up"));
- connect(m_up, SIGNAL(clicked()), SLOT(slotUp()));
- QToolTip::add(m_up, i18n("Move up"));
- QWhatsThis::add(m_up, whatsThisMoveFileUpButton);
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp()));
+ TQToolTip::add(m_up, i18n("Move up"));
+ TQWhatsThis::add(m_up, whatsThisMoveFileUpButton);
m_up->setEnabled(false);
- m_down = new QToolButton(this);
+ m_down = new TQToolButton(this);
m_down->setIconSet(SmallIconSet("down"));
- connect(m_down, SIGNAL(clicked()), SLOT(slotDown()));
- QToolTip::add(m_down, i18n("Move down"));
- QWhatsThis::add(m_down, whatsThisMoveFileDownButton);
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown()));
+ TQToolTip::add(m_down, i18n("Move down"));
+ TQWhatsThis::add(m_down, whatsThisMoveFileDownButton);
m_down->setEnabled(false);
setAcceptDrops(true);
- QToolTip::add(m_files, i18n(
+ TQToolTip::add(m_files, i18n(
"Drag file(s) here or use the button to open a file dialog. "
"Leave empty for <b>&lt;STDIN&gt;</b>."));
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, KDialog::spacingHint());
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 1);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 1);
l0->addWidget(m_files);
l0->addLayout(l1);
l1->addWidget(m_add);
@@ -166,12 +166,12 @@ KFileList::~KFileList()
{
}
-void KFileList::dragEnterEvent(QDragEnterEvent *e)
+void KFileList::dragEnterEvent(TQDragEnterEvent *e)
{
e->accept(KURLDrag::canDecode(e));
}
-void KFileList::dropEvent(QDropEvent *e)
+void KFileList::dropEvent(TQDropEvent *e)
{
KURL::List files;
if (KURLDrag::decode(e, files))
@@ -192,7 +192,7 @@ void KFileList::addFiles(const KURL::List& files)
for (KURL::List::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KMimeType::Ptr mime = KMimeType::findByURL( *it, 0, true, false);
- item = new QListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url());
+ item = new TQListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url());
item->setPixmap(0, mime->pixmap(*it, KIcon::Small));
}
@@ -209,21 +209,21 @@ void KFileList::addFiles(const KURL::List& files)
}
}
-void KFileList::setFileList(const QStringList& files)
+void KFileList::setFileList(const TQStringList& files)
{
m_files->clear();
- QListViewItem *item = 0;
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ TQListViewItem *item = 0;
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KURL url = KURL::fromPathOrURL( *it );
KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false);
- item = new QListViewItem(m_files, item, url.fileName(), mime->comment(), url.url());
+ item = new TQListViewItem(m_files, item, url.fileName(), mime->comment(), url.url());
item->setPixmap(0, mime->pixmap(url, KIcon::Small));
}
slotSelectionChanged();
}
-QStringList KFileList::fileList() const
+TQStringList KFileList::fileList() const
{
QStringList l;
QListViewItem *item = m_files->firstChild();
@@ -237,14 +237,14 @@ QStringList KFileList::fileList() const
void KFileList::slotAddFile()
{
- KURL::List fnames = KFileDialog::getOpenURLs(QString::null, QString::null, this);
+ KURL::List fnames = KFileDialog::getOpenURLs(TQString::null, TQString::null, this);
if (!fnames.empty())
addFiles(fnames);
}
void KFileList::slotRemoveFile()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
l.setAutoDelete(true);
m_block = true;
@@ -263,12 +263,12 @@ void KFileList::slotOpenFile()
}
}
-QSize KFileList::sizeHint() const
+TQSize KFileList::sizeHint() const
{
- return QSize(100, 100);
+ return TQSize(100, 100);
}
-void KFileList::selection(QPtrList<QListViewItem>& l)
+void KFileList::selection(TQPtrList<TQListViewItem>& l)
{
l.setAutoDelete(false);
QListViewItem *item = m_files->firstChild();
@@ -285,7 +285,7 @@ void KFileList::slotSelectionChanged()
if (m_block)
return;
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
m_remove->setEnabled(l.count() > 0);
m_open->setEnabled(l.count() == 1);
@@ -295,12 +295,12 @@ void KFileList::slotSelectionChanged()
void KFileList::slotUp()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
if (l.count() == 1 && l.first()->itemAbove())
{
QListViewItem *item(l.first()), *clone;
- clone = new QListViewItem(m_files, item->itemAbove()->itemAbove(), item->text(0), item->text(1), item->text(2));
+ clone = new TQListViewItem(m_files, item->itemAbove()->itemAbove(), item->text(0), item->text(1), item->text(2));
clone->setPixmap(0, *(item->pixmap(0)));
delete item;
m_files->setCurrentItem(clone);
@@ -310,12 +310,12 @@ void KFileList::slotUp()
void KFileList::slotDown()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
if (l.count() == 1 && l.first()->itemBelow())
{
QListViewItem *item(l.first()), *clone;
- clone = new QListViewItem(m_files, item->itemBelow(), item->text(0), item->text(1), item->text(2));
+ clone = new TQListViewItem(m_files, item->itemBelow(), item->text(0), item->text(1), item->text(2));
clone->setPixmap(0, *(item->pixmap(0)));
delete item;
m_files->setCurrentItem(clone);
diff --git a/kdeprint/kfilelist.h b/kdeprint/kfilelist.h
index 730e5bab3..2fdcc60dd 100644
--- a/kdeprint/kfilelist.h
+++ b/kdeprint/kfilelist.h
@@ -20,8 +20,8 @@
#ifndef KFILELIST_H
#define KFILELIST_H
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kurl.h>
class KListView;
@@ -32,12 +32,12 @@ class KFileList : public QWidget
{
Q_OBJECT
public:
- KFileList(QWidget *parent = 0, const char *name = 0);
+ KFileList(TQWidget *parent = 0, const char *name = 0);
virtual ~KFileList();
- void setFileList(const QStringList&);
- QStringList fileList() const;
- QSize sizeHint() const;
+ void setFileList(const TQStringList&);
+ TQStringList fileList() const;
+ TQSize sizeHint() const;
protected slots:
void slotAddFile();
@@ -48,10 +48,10 @@ protected slots:
void slotDown();
protected:
- void dragEnterEvent(QDragEnterEvent*);
- void dropEvent(QDropEvent*);
+ void dragEnterEvent(TQDragEnterEvent*);
+ void dropEvent(TQDropEvent*);
void addFiles(const KURL::List&);
- void selection(QPtrList<QListViewItem>&);
+ void selection(TQPtrList<TQListViewItem>&);
private:
KListView *m_files;
diff --git a/kdeprint/kmdbentry.h b/kdeprint/kmdbentry.h
index 327bc2a20..901980a34 100644
--- a/kdeprint/kmdbentry.h
+++ b/kdeprint/kmdbentry.h
@@ -20,8 +20,8 @@
#ifndef KMDBENTRY_H
#define KMDBENTRY_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -46,7 +46,7 @@ struct KDEPRINT_EXPORT KMDBEntry
bool validate(bool checkIt = true);
};
-typedef QPtrList<KMDBEntry> KMDBEntryList;
-typedef QPtrListIterator<KMDBEntry> KMDBEntryListIterator;
+typedef TQPtrList<KMDBEntry> KMDBEntryList;
+typedef TQPtrListIterator<KMDBEntry> KMDBEntryListIterator;
#endif
diff --git a/kdeprint/kmfactory.cpp b/kdeprint/kmfactory.cpp
index 4fb7f7ca5..96397adc4 100644
--- a/kdeprint/kmfactory.cpp
+++ b/kdeprint/kmfactory.cpp
@@ -27,9 +27,9 @@
#include "kdeprintcheck.h"
#include "kxmlcommand.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qsettings.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqsettings.h>
#include <klibloader.h>
#include <kconfig.h>
@@ -79,7 +79,7 @@ void KMFactory::release()
}
KMFactory::KMFactory()
- : QObject(NULL, "Factory")
+ : TQObject(NULL, "Factory")
{
m_settings = new Settings;
m_settings->application = KPrinter::Dialog;
@@ -108,7 +108,7 @@ KMFactory::KMFactory()
// By default, embed PS fonts
bool ok = false;
- QSettings settings;
+ TQSettings settings;
settings.readBoolEntry( "/qt/embedFonts", true, &ok );
if ( !ok )
settings.writeEntry( "/qt/embedFonts", true );
@@ -205,7 +205,7 @@ void KMFactory::createPrinterImpl()
if (!m_implementation) m_implementation = new KPrinterImpl(this,"PrinterImpl");
}
-void KMFactory::loadFactory(const QString& syst)
+void KMFactory::loadFactory(const TQString& syst)
{
if (!m_factory)
{
@@ -213,8 +213,8 @@ void KMFactory::loadFactory(const QString& syst)
if (sys.isEmpty())
// load default configured print plugin
sys = printSystem();
- QString libname = QString::fromLatin1("kdeprint_%1").arg(sys);
- m_factory = KLibLoader::self()->factory(QFile::encodeName(libname));
+ QString libname = TQString::fromLatin1("kdeprint_%1").arg(sys);
+ m_factory = KLibLoader::self()->factory(TQFile::encodeName(libname));
if (!m_factory)
{
KMessageBox::error(0,
@@ -224,7 +224,7 @@ void KMFactory::loadFactory(const QString& syst)
}
}
-KConfig* KMFactory::printConfig(const QString& group)
+KConfig* KMFactory::printConfig(const TQString& group)
{
if (!m_printconfig)
{
@@ -236,7 +236,7 @@ KConfig* KMFactory::printConfig(const QString& group)
return m_printconfig;
}
-QString KMFactory::printSystem()
+TQString KMFactory::printSystem()
{
KConfig *conf = printConfig();
conf->setGroup("General");
@@ -265,10 +265,10 @@ void KMFactory::unload()
m_factory = 0;
}
-void KMFactory::reload(const QString& syst, bool saveSyst)
+void KMFactory::reload(const TQString& syst, bool saveSyst)
{
// notify all registered objects about the coming reload
- QPtrListIterator<KPReloadObject> it(m_objects);
+ TQPtrListIterator<KPReloadObject> it(m_objects);
for (;it.current();++it)
it.current()->aboutToReload();
@@ -293,10 +293,10 @@ void KMFactory::reload(const QString& syst, bool saveSyst)
it.current()->reload();
}
-QValueList<KMFactory::PluginInfo> KMFactory::pluginList()
+TQValueList<KMFactory::PluginInfo> KMFactory::pluginList()
{
- QDir d(locate("data", "kdeprint/plugins/"), "*.print", QDir::Name, QDir::Files);
- QValueList<PluginInfo> list;
+ QDir d(locate("data", "kdeprint/plugins/"), "*.print", TQDir::Name, TQDir::Files);
+ TQValueList<PluginInfo> list;
for (uint i=0; i<d.count(); i++)
{
PluginInfo info(pluginInfo(d.absFilePath(d[i])));
@@ -307,11 +307,11 @@ QValueList<KMFactory::PluginInfo> KMFactory::pluginList()
return list;
}
-KMFactory::PluginInfo KMFactory::pluginInfo(const QString& name)
+KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name)
{
QString path(name);
if (path[0] != '/')
- path = locate("data", QString::fromLatin1("kdeprint/plugins/%1.print").arg(name));
+ path = locate("data", TQString::fromLatin1("kdeprint/plugins/%1.print").arg(name));
KSimpleConfig conf(path);
PluginInfo info;
@@ -350,9 +350,9 @@ void KMFactory::unregisterObject(KPReloadObject *obj)
kdDebug(500) << "kdeprint: unregistering " << (void*)obj << ", number of objects = " << m_objects.count() << endl;
}
-QString KMFactory::autoDetect()
+TQString KMFactory::autoDetect()
{
- QValueList<PluginInfo> plugins = pluginList();
+ TQValueList<PluginInfo> plugins = pluginList();
int pluginIndex(-1), currentPrecedence(0);
for (uint i=0;i<plugins.count();i++)
{
@@ -363,7 +363,7 @@ QString KMFactory::autoDetect()
currentPrecedence = plugins[i].detectPrecedence;
}
}
- return (pluginIndex == -1 ? QString::fromLatin1("lpdunix") : plugins[pluginIndex].name);
+ return (pluginIndex == -1 ? TQString::fromLatin1("lpdunix") : plugins[pluginIndex].name);
}
void KMFactory::slot_pluginChanged(pid_t pid)
@@ -392,7 +392,7 @@ void KMFactory::slot_configChanged()
printConfig();
// notify all registered objects about the coming reload
- QPtrListIterator<KPReloadObject> it(m_objects);
+ TQPtrListIterator<KPReloadObject> it(m_objects);
/*for (;it.current();++it)
it.current()->aboutToReload();*/
@@ -412,7 +412,7 @@ void KMFactory::saveConfig()
// need to reload the config file.
}
-QPair<QString,QString> KMFactory::requestPassword( int& seqNbr, const QString& user, const QString& host, int port )
+QPair<TQString,TQString> KMFactory::requestPassword( int& seqNbr, const TQString& user, const TQString& host, int port )
{
DCOPRef kdeprintd( "kded", "kdeprintd" );
/**
@@ -424,21 +424,21 @@ QPair<QString,QString> KMFactory::requestPassword( int& seqNbr, const QString& u
DCOPReply reply = kdeprintd.call( "requestPassword", user, host, port, seqNbr );
if ( reply.isValid() )
{
- QString replyString = reply;
+ TQString replyString = reply;
if ( replyString != "::" )
{
- QStringList l = QStringList::split( ':', replyString, true );
+ TQStringList l = TQStringList::split( ':', replyString, true );
if ( l.count() == 3 )
{
seqNbr = l[ 2 ].toInt();
- return QPair<QString,QString>( l[ 0 ], l[ 1 ] );
+ return QPair<TQString,TQString>( l[ 0 ], l[ 1 ] );
}
}
}
- return QPair<QString,QString>( QString::null, QString::null );
+ return QPair<TQString,TQString>( TQString::null, TQString::null );
}
-void KMFactory::initPassword( const QString& user, const QString& password, const QString& host, int port )
+void KMFactory::initPassword( const TQString& user, const TQString& password, const TQString& host, int port )
{
DCOPRef kdeprintd( "kded", "kdeprintd" );
/**
diff --git a/kdeprint/kmfactory.h b/kdeprint/kmfactory.h
index 05cd124fe..0e9ad8021 100644
--- a/kdeprint/kmfactory.h
+++ b/kdeprint/kmfactory.h
@@ -21,12 +21,12 @@
#ifndef KMFACTORY_H
#define KMFACTORY_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqpair.h>
#include <dcopobject.h>
#include <sys/types.h>
@@ -42,7 +42,7 @@ class KLibFactory;
class KConfig;
class KPReloadObject;
-class KDEPRINT_EXPORT KMFactory : public QObject, public DCOPObject
+class KDEPRINT_EXPORT KMFactory : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -72,13 +72,13 @@ public:
KMSpecialManager* specialManager();
KXmlCommandManager* commandManager();
KPrinterImpl* printerImplementation();
- KConfig* printConfig(const QString& group = QString::null);
- QString printSystem();
- QValueList<PluginInfo> pluginList();
- PluginInfo pluginInfo(const QString& name);
+ KConfig* printConfig(const TQString& group = TQString::null);
+ TQString printSystem();
+ TQValueList<PluginInfo> pluginList();
+ PluginInfo pluginInfo(const TQString& name);
void saveConfig();
- void reload(const QString& syst, bool saveSyst = true);
+ void reload(const TQString& syst, bool saveSyst = true);
void registerObject(KPReloadObject*, bool = false);
void unregisterObject(KPReloadObject*);
@@ -92,8 +92,8 @@ public:
};
Settings* settings() const { return m_settings; }
- QPair<QString,QString> requestPassword( int& seqNbr, const QString& user, const QString& host = "localhost", int port = 0 );
- void initPassword( const QString& user, const QString& password, const QString& host = "localhsot", int port = 0 );
+ QPair<TQString,TQString> requestPassword( int& seqNbr, const TQString& user, const TQString& host = "localhost", int port = 0 );
+ void initPassword( const TQString& user, const TQString& password, const TQString& host = "localhsot", int port = 0 );
k_dcop:
ASYNC slot_pluginChanged(pid_t);
@@ -108,9 +108,9 @@ private:
void createJobManager();
void createUiManager();
void createPrinterImpl();
- void loadFactory(const QString& syst = QString::null);
+ void loadFactory(const TQString& syst = TQString::null);
void unload();
- QString autoDetect();
+ TQString autoDetect();
private:
static KMFactory *m_self;
@@ -123,7 +123,7 @@ private:
KConfig *m_printconfig;
Settings *m_settings;
- QPtrList<KPReloadObject> m_objects;
+ TQPtrList<KPReloadObject> m_objects;
};
#endif
diff --git a/kdeprint/kmjob.cpp b/kdeprint/kmjob.cpp
index 665c7474f..0576303e2 100644
--- a/kdeprint/kmjob.cpp
+++ b/kdeprint/kmjob.cpp
@@ -71,11 +71,11 @@ void KMJob::copy(const KMJob& j)
setDiscarded(false);
}
-QString KMJob::pixmap()
+TQString KMJob::pixmap()
{
// special case
if (m_type == KMJob::Threaded)
- return QString::fromLatin1("exec");
+ return TQString::fromLatin1("exec");
// normal case
QString str("kdeprint_job");
@@ -102,7 +102,7 @@ QString KMJob::pixmap()
return str;
}
-QString KMJob::stateString()
+TQString KMJob::stateString()
{
QString str;
switch (m_state)
diff --git a/kdeprint/kmjob.h b/kdeprint/kmjob.h
index 7ea5cf10b..379f7cfd8 100644
--- a/kdeprint/kmjob.h
+++ b/kdeprint/kmjob.h
@@ -25,8 +25,8 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kdeprint/kmobject.h>
#include <kdelibs_export.h>
@@ -69,26 +69,26 @@ public:
KMJob& operator=(const KMJob& j);
void copy(const KMJob& j);
- QString pixmap();
- QString stateString();
+ TQString pixmap();
+ TQString stateString();
bool isCompleted() const { return (m_state >= Cancelled && m_state <= Completed); }
bool isActive() const { return !isCompleted(); }
// inline access functions
int id() const { return m_ID; }
void setId(int id) { m_ID = id; }
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; }
- const QString& printer() const { return m_printer; }
- void setPrinter(const QString& s) { m_printer = s; }
- const QString& owner() const { return m_owner; }
- void setOwner(const QString& s) { m_owner = s; }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; }
+ const TQString& printer() const { return m_printer; }
+ void setPrinter(const TQString& s) { m_printer = s; }
+ const TQString& owner() const { return m_owner; }
+ void setOwner(const TQString& s) { m_owner = s; }
int state() const { return m_state; }
void setState(int s) { m_state = s; }
int size() const { return m_size; }
void setSize(int s) { m_size = s; }
- const QString& uri() const { return m_uri; }
- void setUri(const QString& s) { m_uri = s; }
+ const TQString& uri() const { return m_uri; }
+ void setUri(const TQString& s) { m_uri = s; }
int type() const { return m_type; }
void setType(int t) { m_type = t; }
int pages() const { return m_pages; }
@@ -100,8 +100,8 @@ public:
bool isRemote() const { return m_remote; }
void setRemote(bool on) { m_remote = on; }
- QString attribute(int i) const { return m_attributes[i]; }
- void setAttribute(int i, const QString& att) { m_attributes[i] = att; }
+ TQString attribute(int i) const { return m_attributes[i]; }
+ void setAttribute(int i, const TQString& att) { m_attributes[i] = att; }
int attributeCount() const { return m_attributes.size(); }
void setAttributeCount(int c) { m_attributes.resize(c); }
@@ -124,7 +124,7 @@ protected:
// internal members
QString m_uri;
- QValueVector<QString> m_attributes;
+ TQValueVector<TQString> m_attributes;
};
#endif
diff --git a/kdeprint/kmjobmanager.cpp b/kdeprint/kmjobmanager.cpp
index 470b73ee3..afbca7a2f 100644
--- a/kdeprint/kmjobmanager.cpp
+++ b/kdeprint/kmjobmanager.cpp
@@ -26,8 +26,8 @@
#include <kdebug.h>
#include <kconfig.h>
-KMJobManager::KMJobManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMJobManager::KMJobManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_jobs.setAutoDelete(true);
m_threadjob = new KMThreadJob(this, "ThreadJob");
@@ -45,7 +45,7 @@ KMJobManager* KMJobManager::self()
void KMJobManager::discardAllJobs()
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
it.current()->setDiscarded(true);
}
@@ -62,16 +62,16 @@ void KMJobManager::removeDiscardedJobs()
/*KMJob* KMJobManager::findJob(int ID)
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
if (it.current()->id() == ID)
return it.current();
return 0;
}*/
-KMJob* KMJobManager::findJob(const QString& uri)
+KMJob* KMJobManager::findJob(const TQString& uri)
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
if (it.current()->uri() == uri)
return it.current();
@@ -99,12 +99,12 @@ void KMJobManager::addJob(KMJob *job)
delete job;
}
-/*bool KMJobManager::sendCommand(int ID, int action, const QString& arg)
+/*bool KMJobManager::sendCommand(int ID, int action, const TQString& arg)
{
KMJob *job = findJob(ID);
if (job)
{
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
l.setAutoDelete(false);
l.append(job);
return sendCommand(l,action,arg);
@@ -112,12 +112,12 @@ void KMJobManager::addJob(KMJob *job)
return false;
}*/
-bool KMJobManager::sendCommand(const QString& uri, int action, const QString& arg)
+bool KMJobManager::sendCommand(const TQString& uri, int action, const TQString& arg)
{
KMJob *job = findJob(uri);
if (job)
{
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
l.setAutoDelete(false);
l.append(job);
return sendCommand(l,action,arg);
@@ -125,13 +125,13 @@ bool KMJobManager::sendCommand(const QString& uri, int action, const QString& ar
return false;
}
-bool KMJobManager::sendCommand(const QPtrList<KMJob>& jobs, int action, const QString& args)
+bool KMJobManager::sendCommand(const TQPtrList<KMJob>& jobs, int action, const TQString& args)
{
// split jobs in 2 classes
- QPtrList<KMJob> csystem, cthread;
+ TQPtrList<KMJob> csystem, cthread;
csystem.setAutoDelete(false);
cthread.setAutoDelete(false);
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
for (;it.current();++it)
if (it.current()->type() == KMJob::Threaded) cthread.append(it.current());
else csystem.append(it.current());
@@ -144,34 +144,34 @@ bool KMJobManager::sendCommand(const QPtrList<KMJob>& jobs, int action, const QS
return true;
}
-bool KMJobManager::sendCommandSystemJob(const QPtrList<KMJob>&, int, const QString&)
+bool KMJobManager::sendCommandSystemJob(const TQPtrList<KMJob>&, int, const TQString&)
{
return false;
}
-bool KMJobManager::sendCommandThreadJob(const QPtrList<KMJob>& jobs, int action, const QString&)
+bool KMJobManager::sendCommandThreadJob(const TQPtrList<KMJob>& jobs, int action, const TQString&)
{
if (action != KMJob::Remove)
return false;
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool result(true);
for (;it.current() && result; ++it)
result = m_threadjob->removeJob(it.current()->id());
return result;
}
-bool KMJobManager::listJobs(const QString&, KMJobManager::JobType, int)
+bool KMJobManager::listJobs(const TQString&, KMJobManager::JobType, int)
{
return true;
}
-const QPtrList<KMJob>& KMJobManager::jobList(bool reload)
+const TQPtrList<KMJob>& KMJobManager::jobList(bool reload)
{
if (reload || m_jobs.count() == 0)
{
discardAllJobs();
- QDictIterator<JobFilter> it(m_filter);
+ TQDictIterator<JobFilter> it(m_filter);
int joblimit = limit();
bool threadjobs_updated = false;
for (; it.current(); ++it)
@@ -203,16 +203,16 @@ int KMJobManager::actions()
return 0;
}
-QValueList<KAction*> KMJobManager::createPluginActions(KActionCollection*)
+TQValueList<KAction*> KMJobManager::createPluginActions(KActionCollection*)
{
- return QValueList<KAction*>();
+ return TQValueList<KAction*>();
}
-void KMJobManager::validatePluginActions(KActionCollection*, const QPtrList<KMJob>&)
+void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&)
{
}
-void KMJobManager::addPrinter(const QString& pr, KMJobManager::JobType type, bool isSpecial)
+void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bool isSpecial)
{
struct JobFilter *jf = m_filter.find(pr);
if (!jf)
@@ -224,7 +224,7 @@ void KMJobManager::addPrinter(const QString& pr, KMJobManager::JobType type, boo
jf->m_isspecial = isSpecial;
}
-void KMJobManager::removePrinter(const QString& pr, KMJobManager::JobType type)
+void KMJobManager::removePrinter(const TQString& pr, KMJobManager::JobType type)
{
struct JobFilter *jf = m_filter.find(pr);
if (jf)
@@ -235,7 +235,7 @@ void KMJobManager::removePrinter(const QString& pr, KMJobManager::JobType type)
}
}
-bool KMJobManager::doPluginAction(int, const QPtrList<KMJob>&)
+bool KMJobManager::doPluginAction(int, const TQPtrList<KMJob>&)
{
return true;
}
diff --git a/kdeprint/kmjobmanager.h b/kdeprint/kmjobmanager.h
index 2148a4810..643be34d1 100644
--- a/kdeprint/kmjobmanager.h
+++ b/kdeprint/kmjobmanager.h
@@ -24,10 +24,10 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -56,48 +56,48 @@ public:
bool m_isspecial;
};
- KMJobManager(QObject *parent = 0, const char *name = 0);
+ KMJobManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMJobManager();
static KMJobManager* self();
- void addPrinter(const QString& pr, JobType type = ActiveJobs, bool isSpecial = false);
- void removePrinter(const QString& pr, JobType type = ActiveJobs);
+ void addPrinter(const TQString& pr, JobType type = ActiveJobs, bool isSpecial = false);
+ void removePrinter(const TQString& pr, JobType type = ActiveJobs);
void clearFilter();
- QDict<JobFilter>* filter();
+ TQDict<JobFilter>* filter();
int limit();
void setLimit(int val);
//KMJob* findJob(int ID);
- KMJob* findJob(const QString& uri);
- //bool sendCommand(int ID, int action, const QString& arg = QString::null);
- bool sendCommand(const QString& uri, int action, const QString& arg = QString::null);
- bool sendCommand(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
- const QPtrList<KMJob>& jobList(bool reload = true);
+ KMJob* findJob(const TQString& uri);
+ //bool sendCommand(int ID, int action, const TQString& arg = TQString::null);
+ bool sendCommand(const TQString& uri, int action, const TQString& arg = TQString::null);
+ bool sendCommand(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
+ const TQPtrList<KMJob>& jobList(bool reload = true);
void addJob(KMJob*);
KMThreadJob* threadJob();
virtual int actions();
- virtual QValueList<KAction*> createPluginActions(KActionCollection*);
- virtual void validatePluginActions(KActionCollection*, const QPtrList<KMJob>&);
- virtual bool doPluginAction(int, const QPtrList<KMJob>&);
+ virtual TQValueList<KAction*> createPluginActions(KActionCollection*);
+ virtual void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&);
+ virtual bool doPluginAction(int, const TQPtrList<KMJob>&);
protected:
void discardAllJobs();
void removeDiscardedJobs();
protected:
- virtual bool listJobs(const QString& prname, JobType type, int limit = 0);
- virtual bool sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
- bool sendCommandThreadJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
+ virtual bool listJobs(const TQString& prname, JobType type, int limit = 0);
+ virtual bool sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
+ bool sendCommandThreadJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
protected:
- QPtrList<KMJob> m_jobs;
- QDict<JobFilter> m_filter;
+ TQPtrList<KMJob> m_jobs;
+ TQDict<JobFilter> m_filter;
KMThreadJob *m_threadjob;
};
-inline QDict<KMJobManager::JobFilter>* KMJobManager::filter()
+inline TQDict<KMJobManager::JobFilter>* KMJobManager::filter()
{ return &m_filter; }
inline void KMJobManager::clearFilter()
diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp
index 0905d029d..ec161d755 100644
--- a/kdeprint/kmmanager.cpp
+++ b/kdeprint/kmmanager.cpp
@@ -27,7 +27,7 @@
#include "kprinter.h"
#include <zlib.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
#include <klibloader.h>
#include <unistd.h>
-KMManager::KMManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMManager::KMManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_printers.setAutoDelete(true);
m_fprinters.setAutoDelete(false);
@@ -96,7 +96,7 @@ bool KMManager::removePrinter(KMPrinter*)
return notImplemented();
}
-bool KMManager::removePrinter(const QString& name)
+bool KMManager::removePrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? removePrinter(p) : false);
@@ -107,7 +107,7 @@ bool KMManager::enablePrinter(KMPrinter*, bool)
return notImplemented();
}
-bool KMManager::enablePrinter(const QString& name, bool state)
+bool KMManager::enablePrinter(const TQString& name, bool state)
{
KMPrinter *p = findPrinter(name);
return (p ? enablePrinter(p, state) : false);
@@ -118,7 +118,7 @@ bool KMManager::startPrinter(KMPrinter*, bool)
return notImplemented();
}
-bool KMManager::startPrinter(const QString& name, bool state)
+bool KMManager::startPrinter(const TQString& name, bool state)
{
KMPrinter *p = findPrinter(name);
return (p ? startPrinter(p, state) : false);
@@ -143,7 +143,7 @@ bool KMManager::completePrinterShort(KMPrinter *p)
return completePrinter(p);
}
-bool KMManager::completePrinter(const QString& name)
+bool KMManager::completePrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? completePrinter(p) : false);
@@ -154,7 +154,7 @@ bool KMManager::setDefaultPrinter(KMPrinter*)
return notImplemented();
}
-bool KMManager::setDefaultPrinter(const QString& name)
+bool KMManager::setDefaultPrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? setDefaultPrinter(p) : false);
@@ -186,9 +186,9 @@ bool KMManager::testPrinter(KMPrinter *prt)
// return notImplemented();
}
-KMPrinter* KMManager::findPrinter(const QString& name)
+KMPrinter* KMManager::findPrinter(const TQString& name)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (it.current()->name() == name) return it.current();
//setErrorMsg(i18n("%1: printer not found.").arg(name));
@@ -197,7 +197,7 @@ KMPrinter* KMManager::findPrinter(const QString& name)
KMPrinter* KMManager::softDefault() const
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (it.current()->isSoftDefault()) return it.current();
return 0;
@@ -205,7 +205,7 @@ KMPrinter* KMManager::softDefault() const
KMPrinter* KMManager::hardDefault() const
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current();++it)
if (it.current()->isHardDefault())
return it.current();
@@ -221,9 +221,9 @@ KMPrinter* KMManager::defaultPrinter()
return prt;
}
-QPtrList<KMPrinter>* KMManager::printerList(bool reload)
+TQPtrList<KMPrinter>* KMManager::printerList(bool reload)
{
- setErrorMsg(QString::null);
+ setErrorMsg(TQString::null);
//kdDebug(500) << "Getting printer list: " << reload << endl;
if (reload || m_printers.count() == 0)
@@ -268,7 +268,7 @@ QPtrList<KMPrinter>* KMManager::printerList(bool reload)
// - use the PRINTER variable
if (!softDefault())
{
- KMPrinter *defprinter = findPrinter(QString::fromLatin1(getenv("PRINTER")));
+ KMPrinter *defprinter = findPrinter(TQString::fromLatin1(getenv("PRINTER")));
if (defprinter)
setSoftDefault(defprinter);
}
@@ -277,7 +277,7 @@ QPtrList<KMPrinter>* KMManager::printerList(bool reload)
return &m_fprinters;
}
-QPtrList<KMPrinter>* KMManager::printerListComplete(bool reload)
+TQPtrList<KMPrinter>* KMManager::printerListComplete(bool reload)
{
printerList(reload);
return &m_printers;
@@ -312,14 +312,14 @@ void KMManager::addPrinter(KMPrinter *p)
}
}
-QString KMManager::driverDbCreationProgram()
+TQString KMManager::driverDbCreationProgram()
{
- return QString::null;
+ return TQString::null;
}
-QString KMManager::driverDirectory()
+TQString KMManager::driverDirectory()
{
- return QString::null;
+ return TQString::null;
}
DrMain* KMManager::loadPrinterDriver(KMPrinter*, bool)
@@ -332,7 +332,7 @@ DrMain* KMManager::loadDbDriver(KMDBEntry *entry)
return loadFileDriver(entry->file);
}
-DrMain* KMManager::loadFileDriver(const QString&)
+DrMain* KMManager::loadFileDriver(const TQString&)
{
return NULL;
}
@@ -350,11 +350,11 @@ bool KMManager::savePrinterDriver(KMPrinter*,DrMain*)
return notImplemented();
}
-bool KMManager::uncompressFile(const QString& filename, QString& destname)
+bool KMManager::uncompressFile(const TQString& filename, TQString& destname)
{
QFile f(filename);
bool result(true);
- destname = QString::null;
+ destname = TQString::null;
if (f.exists() && f.open(IO_ReadOnly))
{
char buf[1024] = {0};
@@ -383,7 +383,7 @@ bool KMManager::uncompressFile(const QString& filename, QString& destname)
void KMManager::setHardDefault(KMPrinter *p)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
it.current()->setHardDefault(false);
if (p) p->setHardDefault(true);
@@ -391,7 +391,7 @@ void KMManager::setHardDefault(KMPrinter *p)
void KMManager::setSoftDefault(KMPrinter *p)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
{
it.current()->setSoftDefault(false);
@@ -411,12 +411,12 @@ bool KMManager::restartServer()
return notImplemented();
}
-bool KMManager::configureServer(QWidget*)
+bool KMManager::configureServer(TQWidget*)
{
return notImplemented();
}
-QString KMManager::testPage()
+TQString KMManager::testPage()
{
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("General");
@@ -428,7 +428,7 @@ QString KMManager::testPage()
void KMManager::discardAllPrinters(bool on)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (!on || !it.current()->isSpecial())
it.current()->setDiscarded(on);
@@ -471,22 +471,22 @@ bool KMManager::removeSpecialPrinter(KMPrinter *p)
Defaults to 3 parallel printers
*/
-QStringList KMManager::detectLocalPrinters()
+TQStringList KMManager::detectLocalPrinters()
{
QStringList list;
for (int i=0; i<3; i++)
- list << QString::null << QString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << QString::null;
+ list << TQString::null << TQString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString::null;
return list;
}
-int KMManager::addPrinterWizard(QWidget *parent)
+int KMManager::addPrinterWizard(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library("libkdeprint_management_module");
if (!lib)
setErrorMsg(i18n("Unable to load KDE print management library: %1").arg(KLibLoader::self()->lastErrorMessage()));
else
{
- int (*func)(QWidget*) = (int(*)(QWidget*))lib->symbol("add_printer_wizard");
+ int (*func)(TQWidget*) = (int(*)(TQWidget*))lib->symbol("add_printer_wizard");
if (!func)
setErrorMsg(i18n("Unable to find wizard object in management library."));
else
@@ -495,14 +495,14 @@ int KMManager::addPrinterWizard(QWidget *parent)
return (-1);
}
-bool KMManager::invokeOptionsDialog(QWidget *parent)
+bool KMManager::invokeOptionsDialog(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library("libkdeprint_management_module");
if (!lib)
setErrorMsg(i18n("Unable to load KDE print management library: %1").arg(KLibLoader::self()->lastErrorMessage()));
else
{
- bool (*func)(QWidget*) = (bool(*)(QWidget*))lib->symbol("config_dialog");
+ bool (*func)(TQWidget*) = (bool(*)(TQWidget*))lib->symbol("config_dialog");
if (!func)
setErrorMsg(i18n("Unable to find options dialog in management library."));
else
@@ -529,7 +529,7 @@ bool KMManager::isFilterEnabled() const
return m_printerfilter->isEnabled();
}
-QString KMManager::stateInformation()
+TQString KMManager::stateInformation()
{
return i18n("No plugin information available");
}
diff --git a/kdeprint/kmmanager.h b/kdeprint/kmmanager.h
index 17bf3347a..ee3c4064f 100644
--- a/kdeprint/kmmanager.h
+++ b/kdeprint/kmmanager.h
@@ -26,9 +26,9 @@
#include <kdeprint/kmprinter.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class DrMain;
class KMDBEntry;
@@ -69,14 +69,14 @@ public:
ServerAll = 0xF
};
- KMManager(QObject *parent = 0, const char *name = 0);
+ KMManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMManager();
static KMManager* self();
// error management functions
- QString errorMsg() const { return m_errormsg; }
- void setErrorMsg(const QString& s) { m_errormsg = s; }
+ TQString errorMsg() const { return m_errormsg; }
+ void setErrorMsg(const TQString& s) { m_errormsg = s; }
// support management ?
bool hasManagement() const { return m_hasmanagement; }
@@ -92,47 +92,47 @@ public:
virtual bool testPrinter(KMPrinter *p);
bool upPrinter(KMPrinter *p, bool state);
bool modifyPrinter(KMPrinter *oldp, KMPrinter *newp);
- bool removePrinter(const QString& name);
- bool enablePrinter(const QString& name, bool state);
- bool startPrinter(const QString& name, bool state);
- bool completePrinter(const QString& name);
- bool setDefaultPrinter(const QString& name);
+ bool removePrinter(const TQString& name);
+ bool enablePrinter(const TQString& name, bool state);
+ bool startPrinter(const TQString& name, bool state);
+ bool completePrinter(const TQString& name);
+ bool setDefaultPrinter(const TQString& name);
int printerOperationMask() const { return m_printeroperationmask; }
- int addPrinterWizard(QWidget *parent = 0);
+ int addPrinterWizard(TQWidget *parent = 0);
// special printer management functions
bool createSpecialPrinter(KMPrinter *p);
bool removeSpecialPrinter(KMPrinter *p);
// printer listing functions
- KMPrinter* findPrinter(const QString& name);
- QPtrList<KMPrinter>* printerList(bool reload = true);
- QPtrList<KMPrinter>* printerListComplete(bool reload = true);
+ KMPrinter* findPrinter(const TQString& name);
+ TQPtrList<KMPrinter>* printerList(bool reload = true);
+ TQPtrList<KMPrinter>* printerListComplete(bool reload = true);
KMPrinter* defaultPrinter();
void enableFilter(bool on);
bool isFilterEnabled() const;
// driver DB functions
- virtual QString driverDbCreationProgram();
- virtual QString driverDirectory();
+ virtual TQString driverDbCreationProgram();
+ virtual TQString driverDirectory();
// driver functions
virtual DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
virtual DrMain* loadDbDriver(KMDBEntry *entry);
- virtual DrMain* loadFileDriver(const QString& filename);
+ virtual DrMain* loadFileDriver(const TQString& filename);
DrMain* loadDriver(KMPrinter *p, bool config = false);
virtual bool savePrinterDriver(KMPrinter *p, DrMain *d);
virtual bool validateDbDriver(KMDBEntry *entry);
// configuration functions
- bool invokeOptionsDialog(QWidget *parent = 0);
- virtual QString stateInformation();
+ bool invokeOptionsDialog(TQWidget *parent = 0);
+ virtual TQString stateInformation();
// server functions
int serverOperationMask() const { return m_serveroperationmask; }
virtual bool restartServer();
- virtual bool configureServer(QWidget *parent = 0);
- virtual QStringList detectLocalPrinters();
+ virtual bool configureServer(TQWidget *parent = 0);
+ virtual TQStringList detectLocalPrinters();
// additional actions (for print manager)
virtual void createPluginActions(KActionCollection*);
@@ -158,12 +158,12 @@ protected:
// this function uncompress the given file (or does nothing
// if the file is not compressed). Returns wether the file was
// compressed or not.
- bool uncompressFile(const QString& srcname, QString& destname);
+ bool uncompressFile(const TQString& srcname, TQString& destname);
bool notImplemented();
void setHasManagement(bool on) { m_hasmanagement = on; }
void setPrinterOperationMask(int m) { m_printeroperationmask = m; }
void setServerOperationMask(int m) { m_serveroperationmask = m; }
- QString testPage();
+ TQString testPage();
void discardAllPrinters(bool);
void setUpdatePossible( bool );
virtual void checkUpdatePossibleInternal();
diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp
index 6467970c2..5749a47c5 100644
--- a/kdeprint/kmprinter.cpp
+++ b/kdeprint/kmprinter.cpp
@@ -86,7 +86,7 @@ DrMain* KMPrinter::takeDriver()
return dr;
}
-QString KMPrinter::pixmap()
+TQString KMPrinter::pixmap()
{
if (!m_pixmap.isEmpty()) return m_pixmap;
@@ -117,13 +117,13 @@ int KMPrinter::compare(KMPrinter *p1, KMPrinter *p2)
if (p1 && p2)
{
bool s1(p1->isSpecial()), s2(p2->isSpecial());
- if (s1 && s2) return QString::compare(p1->name(),p2->name());
+ if (s1 && s2) return TQString::compare(p1->name(),p2->name());
else if (s1) return 1;
else if (s2) return -1;
else
{
bool c1(p1->isClass(false)), c2(p2->isClass(false));
- if (c1 == c2) return QString::compare(p1->name(),p2->name());
+ if (c1 == c2) return TQString::compare(p1->name(),p2->name());
else if (c1 && !c2) return -1;
else if (!c1 && c2) return 1;
}
@@ -131,7 +131,7 @@ int KMPrinter::compare(KMPrinter *p1, KMPrinter *p2)
return 0;
}
-QString KMPrinter::stateString() const
+TQString KMPrinter::stateString() const
{
QString s;
switch (state())
@@ -145,7 +145,7 @@ QString KMPrinter::stateString() const
return s;
}
-bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
+bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent)
{
// standard settings
printer->setPrinterName(printerName());
@@ -160,7 +160,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
if (option("kde-special-file") == "1")
{
// build-up default filename/directory
- QString fName = printer->docFileName(), ext = option( "kde-special-extension" );
+ TQString fName = printer->docFileName(), ext = option( "kde-special-extension" );
if ( fName.isEmpty() )
fName = ( printer->docName() + "." + ext );
else
@@ -178,7 +178,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
// build-up file dialog
KFileDialog *dialog = new KFileDialog (fName,
- QString::null,
+ TQString::null,
parent,
"filedialog",
true);
@@ -188,7 +188,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
if (!mimetype.isEmpty())
{
- QStringList filter;
+ TQStringList filter;
filter << mimetype;
filter << "all/allfiles";
dialog->setMimeFilter (filter, mimetype);
@@ -214,11 +214,11 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
return true;
}
-QString KMPrinter::deviceProtocol() const
+TQString KMPrinter::deviceProtocol() const
{
int p = m_device.find( ':' );
if ( p != -1 )
return m_device.left( p );
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/kmprinter.h b/kdeprint/kmprinter.h
index 810793e3d..4b78a4b01 100644
--- a/kdeprint/kmprinter.h
+++ b/kdeprint/kmprinter.h
@@ -24,11 +24,11 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdeprint/kmobject.h>
class KMDBEntry;
@@ -88,38 +88,38 @@ public:
// inline access functions
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; if (m_printername.isEmpty()) m_printername = s; }
- const QString& printerName() const { return m_printername; }
- void setPrinterName(const QString& s) { m_printername = s; if (m_name.isEmpty()) m_name = s; }
- const QString& instanceName() const { return m_instancename; }
- void setInstanceName(const QString& s) { m_instancename = s; }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; if (m_printername.isEmpty()) m_printername = s; }
+ const TQString& printerName() const { return m_printername; }
+ void setPrinterName(const TQString& s) { m_printername = s; if (m_name.isEmpty()) m_name = s; }
+ const TQString& instanceName() const { return m_instancename; }
+ void setInstanceName(const TQString& s) { m_instancename = s; }
int type() const { return m_type; }
void setType(int t) { m_type = t; }
void addType(int t) { m_type |= t; }
PrinterState state(bool complete = false) const { return PrinterState(m_state & (complete ? ~0x0 : StateMask)); }
- QString stateString() const;
+ TQString stateString() const;
void setState(PrinterState s) { m_state = PrinterState((m_state & ~StateMask) | s); }
bool acceptJobs() const { return !(m_state & Rejecting); }
void setAcceptJobs(bool on) { m_state = PrinterState((m_state & StateMask) | (on ? 0 : Rejecting)); }
- const QString& device() const { return m_device; }
- QString deviceProtocol() const;
- void setDevice(const QString& d) { m_device = d; }
- const QStringList& members() const { return m_members; }
- void setMembers(const QStringList& l) { m_members = l; }
- void addMember(const QString& s) { m_members.append(s); }
- const QString& description() const { return m_description; }
- void setDescription(const QString& s) { m_description = s; }
- const QString& location() const { return m_location; }
- void setLocation(const QString& s) { m_location = s; }
+ const TQString& device() const { return m_device; }
+ TQString deviceProtocol() const;
+ void setDevice(const TQString& d) { m_device = d; }
+ const TQStringList& members() const { return m_members; }
+ void setMembers(const TQStringList& l) { m_members = l; }
+ void addMember(const TQString& s) { m_members.append(s); }
+ const TQString& description() const { return m_description; }
+ void setDescription(const TQString& s) { m_description = s; }
+ const TQString& location() const { return m_location; }
+ void setLocation(const TQString& s) { m_location = s; }
const KURL& uri() const { return m_uri; }
void setUri(const KURL& u) { m_uri = u; }
- const QString& manufacturer() const { return m_manufacturer; }
- void setManufacturer(const QString&s ) { m_manufacturer = s; }
- const QString& model() const { return m_model; }
- void setModel(const QString& s) { m_model = s; }
- const QString& driverInfo() const { return m_driverinfo; }
- void setDriverInfo(const QString& s) { m_driverinfo = s; }
+ const TQString& manufacturer() const { return m_manufacturer; }
+ void setManufacturer(const TQString&s ) { m_manufacturer = s; }
+ const TQString& model() const { return m_model; }
+ void setModel(const TQString& s) { m_model = s; }
+ const TQString& driverInfo() const { return m_driverinfo; }
+ void setDriverInfo(const TQString& s) { m_driverinfo = s; }
int printerCap() const { return m_printercap; }
void setPrinterCap( int c ) { m_printercap = c; }
void addPrinterCap( int c ) { m_printercap |= c; }
@@ -137,8 +137,8 @@ public:
// misc
KMDBEntry* dbEntry() const { return m_dbentry; }
void setDbEntry(KMDBEntry *e) { m_dbentry = e; }
- QString pixmap();
- void setPixmap(const QString& s) { m_pixmap = s; }
+ TQString pixmap();
+ void setPixmap(const TQString& s) { m_pixmap = s; }
bool isHardDefault() const { return m_harddefault; }
void setHardDefault(bool on) { m_harddefault = on; }
bool isSoftDefault() const { return m_softdefault; }
@@ -146,29 +146,29 @@ public:
bool ownSoftDefault() const { return m_ownsoftdefault; }
void setOwnSoftDefault(bool on) { m_ownsoftdefault = on; }
static int compare(KMPrinter *p1, KMPrinter *p2);
- const QString& option(const QString& key) const { return m_options[key]; }
- bool hasOption(const QString& key) const { return m_options.contains(key); }
- void setOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_options[key] = value; }
- void removeOption(const QString& key) { m_options.remove(key); }
- QMap<QString,QString> options() const { return m_options; }
- void setOptions(const QMap<QString,QString>& opts) { m_options = opts; }
+ const TQString& option(const TQString& key) const { return m_options[key]; }
+ bool hasOption(const TQString& key) const { return m_options.contains(key); }
+ void setOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_options[key] = value; }
+ void removeOption(const TQString& key) { m_options.remove(key); }
+ TQMap<TQString,TQString> options() const { return m_options; }
+ void setOptions(const TQMap<TQString,TQString>& opts) { m_options = opts; }
DrMain* driver() const { return m_driver; }
void setDriver(DrMain*);
DrMain* takeDriver();
// configure an existing KPrinter object
- bool autoConfigure(KPrinter *prt, QWidget *parent = 0);
+ bool autoConfigure(KPrinter *prt, TQWidget *parent = 0);
// default options
- const QString& defaultOption(const QString& key) const { return m_defaultoptions[key]; }
- void setDefaultOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_defaultoptions[key] = value; }
- QMap<QString,QString> defaultOptions() const { return m_defaultoptions; }
- void setDefaultOptions(const QMap<QString,QString>& opts) { m_defaultoptions = opts; }
+ const TQString& defaultOption(const TQString& key) const { return m_defaultoptions[key]; }
+ void setDefaultOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_defaultoptions[key] = value; }
+ TQMap<TQString,TQString> defaultOptions() const { return m_defaultoptions; }
+ void setDefaultOptions(const TQMap<TQString,TQString>& opts) { m_defaultoptions = opts; }
// edited options
- const QString& editedOption(const QString& key) const { return m_editedoptions[key]; }
- void setEditedOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_editedoptions[key] = value; }
- QMap<QString,QString> editedOptions() const { return m_editedoptions; }
- void setEditedOptions(const QMap<QString,QString>& opts) { m_editedoptions = opts; }
+ const TQString& editedOption(const TQString& key) const { return m_editedoptions[key]; }
+ void setEditedOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_editedoptions[key] = value; }
+ TQMap<TQString,TQString> editedOptions() const { return m_editedoptions; }
+ void setEditedOptions(const TQMap<TQString,TQString>& opts) { m_editedoptions = opts; }
// edited flag
bool isEdited() const { return m_isedited; }
void setEdited(bool on) { m_isedited = on; }
@@ -210,26 +210,26 @@ protected:
bool m_ownsoftdefault;
// other options (for any use)
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
// options used for instances, and print library. These options are not
// overwritten when copying from another KMPrinter object. This allows to
// to keep the user settings through an application session. The difference
// between "default" and "edited" can be used for option saving (only save
// the options corresponding to current edited printer).
- QMap<QString,QString> m_defaultoptions;
- QMap<QString,QString> m_editedoptions;
+ TQMap<TQString,TQString> m_defaultoptions;
+ TQMap<TQString,TQString> m_editedoptions;
bool m_isedited;
// printer capabilities (based on CUPS model)
int m_printercap;
};
-class KMPrinterList : public QPtrList<KMPrinter>
+class KMPrinterList : public TQPtrList<KMPrinter>
{
public:
- KMPrinterList() : QPtrList<KMPrinter>() {}
- virtual int compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2)
+ KMPrinterList() : TQPtrList<KMPrinter>() {}
+ virtual int compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2)
{ return KMPrinter::compare((KMPrinter*)i1, (KMPrinter*)i2); }
};
diff --git a/kdeprint/kmspecialmanager.cpp b/kdeprint/kmspecialmanager.cpp
index 7e9288e6d..7ccebedff 100644
--- a/kdeprint/kmspecialmanager.cpp
+++ b/kdeprint/kmspecialmanager.cpp
@@ -24,7 +24,7 @@
#include "kxmlcommand.h"
#include "driver.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <ksimpleconfig.h>
@@ -36,7 +36,7 @@
#include <sys/stat.h>
KMSpecialManager::KMSpecialManager(KMManager *parent, const char *name)
-: QObject(parent,name), m_mgr(parent), m_loaded(false)
+: TQObject(parent,name), m_mgr(parent), m_loaded(false)
{
}
@@ -66,15 +66,15 @@ bool KMSpecialManager::savePrinters()
conf.setGroup("General");
int n = conf.readNumEntry("Number",0);
for (int i=0;i<n;i++)
- conf.deleteGroup(QString::fromLatin1("Printer %1").arg(i),true);
+ conf.deleteGroup(TQString::fromLatin1("Printer %1").arg(i),true);
// then add printers
n = 0;
- QPtrListIterator<KMPrinter> it(m_mgr->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_mgr->m_printers);
for (;it.current();++it)
{
if (!it.current()->isSpecial() || it.current()->isVirtual()) continue;
- conf.setGroup(QString::fromLatin1("Printer %1").arg(n));
+ conf.setGroup(TQString::fromLatin1("Printer %1").arg(n));
conf.writeEntry("Name",it.current()->name());
conf.writeEntry("Description",it.current()->description());
conf.writeEntry("Comment",it.current()->location());
@@ -93,7 +93,7 @@ bool KMSpecialManager::savePrinters()
if (getuid() == 0)
{
conf.sync();
- ::chmod(QFile::encodeName(confname), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ ::chmod(TQFile::encodeName(confname), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
}
// force reload on next update
@@ -112,7 +112,7 @@ bool KMSpecialManager::loadPrinters()
// local files should processed last, so we need to reorder the list
// and put local files at the end
QStringList orderedFiles;
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
if ((*it).startsWith(localDir))
orderedFiles.append(*it);
@@ -120,7 +120,7 @@ bool KMSpecialManager::loadPrinters()
orderedFiles.prepend(*it);
}
// then parse the ordered list
- for (QStringList::ConstIterator it=orderedFiles.begin(); it!=orderedFiles.end() && result; ++it)
+ for (TQStringList::ConstIterator it=orderedFiles.begin(); it!=orderedFiles.end() && result; ++it)
{
// skip the local file for root
if (getuid() == 0 && (*it).startsWith(localDir))
@@ -132,14 +132,14 @@ bool KMSpecialManager::loadPrinters()
return result;
}
-bool KMSpecialManager::loadDesktopFile(const QString& filename)
+bool KMSpecialManager::loadDesktopFile(const TQString& filename)
{
KSimpleConfig conf(filename);
conf.setGroup("General");
int n = conf.readNumEntry("Number",0);
for (int i=0;i<n;i++)
{
- QString grpname = QString::fromLatin1("Printer %1").arg(i);
+ QString grpname = TQString::fromLatin1("Printer %1").arg(i);
if (!conf.hasGroup(grpname)) continue;
conf.setGroup(grpname);
KMPrinter *printer = new KMPrinter;
@@ -172,13 +172,13 @@ void KMSpecialManager::refresh()
loadPrinters();
else
{
- QPtrListIterator<KMPrinter> it(m_mgr->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_mgr->m_printers);
for (;it.current();++it)
if (it.current()->isSpecial())
{
it.current()->setDiscarded(false);
it.current()->setType(KMPrinter::Special);
- if (KdeprintChecker::check(QStringList::split(',',it.current()->option("kde-special-require"),false)))
+ if (KdeprintChecker::check(TQStringList::split(',',it.current()->option("kde-special-require"),false)))
it.current()->addType(KMPrinter::Invalid);
}
}
@@ -192,7 +192,7 @@ KXmlCommand* KMSpecialManager::loadCommand(KMPrinter *pr)
return xmlCmd;
}
-KXmlCommand* KMSpecialManager::loadCommand(const QString& xmlId)
+KXmlCommand* KMSpecialManager::loadCommand(const TQString& xmlId)
{
return KXmlCommandManager::self()->loadCommand(xmlId, true);
}
@@ -211,7 +211,7 @@ DrMain* KMSpecialManager::loadDriver(KMPrinter *pr)
return driver;
}
-QString KMSpecialManager::setupCommand(const QString& cmd, const QMap<QString,QString>& opts)
+TQString KMSpecialManager::setupCommand(const TQString& cmd, const TQMap<TQString,TQString>& opts)
{
QString s(cmd);
if (!s.isEmpty())
diff --git a/kdeprint/kmspecialmanager.h b/kdeprint/kmspecialmanager.h
index fb4ae049a..f8619a6f9 100644
--- a/kdeprint/kmspecialmanager.h
+++ b/kdeprint/kmspecialmanager.h
@@ -20,8 +20,8 @@
#ifndef KMSPECIALMANAGER_H
#define KMSPECIALMANAGER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
class KMPrinter;
class KMManager;
@@ -37,12 +37,12 @@ public:
bool savePrinters();
void refresh();
KXmlCommand* loadCommand(KMPrinter*);
- KXmlCommand* loadCommand(const QString& cmd);
+ KXmlCommand* loadCommand(const TQString& cmd);
DrMain* loadDriver(KMPrinter*);
- QString setupCommand(const QString& cmd, const QMap<QString,QString>& opts);
+ TQString setupCommand(const TQString& cmd, const TQMap<TQString,TQString>& opts);
protected:
- bool loadDesktopFile(const QString&);
+ bool loadDesktopFile(const TQString&);
private:
KMManager *m_mgr;
diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp
index bc88f2042..bea9382db 100644
--- a/kdeprint/kmthreadjob.cpp
+++ b/kdeprint/kmthreadjob.cpp
@@ -21,9 +21,9 @@
#include "kmjob.h"
#include "kmjobmanager.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kstandarddirs.h>
#include <errno.h>
@@ -32,8 +32,8 @@
#define CHARSEP '$'
-KMThreadJob::KMThreadJob(QObject *parent, const char *name)
-: QObject(parent,name)
+KMThreadJob::KMThreadJob(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_jobs.setAutoDelete(true);
}
@@ -42,7 +42,7 @@ KMThreadJob::~KMThreadJob()
{
}
-QString KMThreadJob::jobFile()
+TQString KMThreadJob::jobFile()
{
QString f = locateLocal("data","kdeprint/printjobs");
return f;
@@ -54,7 +54,7 @@ bool KMThreadJob::saveJobs()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QIntDictIterator<KMJob> it(m_jobs);
+ TQIntDictIterator<KMJob> it(m_jobs);
for (;it.current();++it)
t << it.current()->id() << CHARSEP << it.current()->name() << CHARSEP << it.current()->printer() << CHARSEP << it.current()->owner() << CHARSEP << it.current()->size() << endl;
return true;
@@ -76,7 +76,7 @@ bool KMThreadJob::loadJobs()
line = t.readLine().stripWhiteSpace();
if (line.isEmpty())
continue;
- QStringList ll = QStringList::split(CHARSEP,line,true);
+ QStringList ll = TQStringList::split(CHARSEP,line,true);
if (ll.count() == 5)
{
KMJob *job = new KMJob();
@@ -109,7 +109,7 @@ KMJob* KMThreadJob::findJob(int ID)
return m_jobs.find(ID);
}
-KMJob* KMThreadJob::findJob(const QString& uri)
+KMJob* KMThreadJob::findJob(const TQString& uri)
{
if (uri.startsWith("proc:/"))
{
@@ -132,7 +132,7 @@ bool KMThreadJob::removeJob(int ID)
return false;
}
-void KMThreadJob::createJob(int ID, const QString& printer, const QString& name, const QString& owner, int size)
+void KMThreadJob::createJob(int ID, const TQString& printer, const TQString& name, const TQString& owner, int size)
{
KMThreadJob mth(0);
KMJob *job = new KMJob();
@@ -161,7 +161,7 @@ void KMThreadJob::createJob(KMJob *job)
void KMThreadJob::updateManager(KMJobManager *mgr)
{
loadJobs();
- QIntDictIterator<KMJob> it(m_jobs);
+ TQIntDictIterator<KMJob> it(m_jobs);
for (;it.current();++it)
{
KMJob *job = new KMJob(*(it.current()));
diff --git a/kdeprint/kmthreadjob.h b/kdeprint/kmthreadjob.h
index cd2f75aeb..3d2e6cf2f 100644
--- a/kdeprint/kmthreadjob.h
+++ b/kdeprint/kmthreadjob.h
@@ -20,8 +20,8 @@
#ifndef KMTHREADJOB_H
#define KMTHREADJOB_H
-#include <qintdict.h>
-#include <qobject.h>
+#include <tqintdict.h>
+#include <tqobject.h>
class KMJob;
class KMJobManager;
@@ -29,25 +29,25 @@ class KMJobManager;
class KMThreadJob : public QObject
{
public:
- KMThreadJob(QObject *parent = 0, const char *name = 0);
+ KMThreadJob(TQObject *parent = 0, const char *name = 0);
~KMThreadJob();
KMJob* findJob(int ID);
- KMJob* findJob(const QString& uri);
+ KMJob* findJob(const TQString& uri);
bool removeJob(int ID);
void createJob(KMJob*);
void updateManager(KMJobManager*);
- static void createJob(int ID, const QString& printer, const QString& name = QString::null, const QString& owner = QString::null, int size = 0);
+ static void createJob(int ID, const TQString& printer, const TQString& name = TQString::null, const TQString& owner = TQString::null, int size = 0);
protected:
- QString jobFile();
+ TQString jobFile();
bool loadJobs();
bool saveJobs();
bool checkJob(int ID);
private:
- QIntDict<KMJob> m_jobs;
+ TQIntDict<KMJob> m_jobs;
};
#endif
diff --git a/kdeprint/kmuimanager.cpp b/kdeprint/kmuimanager.cpp
index 96573fb3d..53921d39f 100644
--- a/kdeprint/kmuimanager.cpp
+++ b/kdeprint/kmuimanager.cpp
@@ -39,8 +39,8 @@
#include <klocale.h>
#include <kdebug.h>
-KMUiManager::KMUiManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMUiManager::KMUiManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_printdialogflags = KMUiManager::PrintDialogAll;
m_printdialogpages.setAutoDelete(false);
@@ -190,11 +190,11 @@ int KMUiManager::pluginPageCap()
return 0;
}
-void KMUiManager::setupPrintDialogPages(QPtrList<KPrintDialogPage>*)
+void KMUiManager::setupPrintDialogPages(TQPtrList<KPrintDialogPage>*)
{
}
-void KMUiManager::setupJobViewer(QListView*)
+void KMUiManager::setupJobViewer(TQListView*)
{
}
diff --git a/kdeprint/kmuimanager.h b/kdeprint/kmuimanager.h
index ad55ccf9b..61088bd2f 100644
--- a/kdeprint/kmuimanager.h
+++ b/kdeprint/kmuimanager.h
@@ -20,8 +20,8 @@
#ifndef KMUIMANAGER_H
#define KMUIMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "kprinter.h"
@@ -59,7 +59,7 @@ public:
NoAutoCollate = 0x100
};
- KMUiManager(QObject *parent = 0, const char *name = 0);
+ KMUiManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMUiManager();
// print management
@@ -72,7 +72,7 @@ public:
int copyFlags(KPrinter *pr = 0, bool usePlugin = true);
int dialogFlags();
void setupPrintDialog(KPrintDialog*);
- virtual void setupPrintDialogPages(QPtrList<KPrintDialogPage>*);
+ virtual void setupPrintDialogPages(TQPtrList<KPrintDialogPage>*);
// printer property dialog
void setupPropertyDialog(KPrinterPropertyDialog*);
@@ -84,11 +84,11 @@ public:
int pageCap();
// job management
- virtual void setupJobViewer(QListView*);
+ virtual void setupJobViewer(TQListView*);
protected:
int m_printdialogflags;
- QPtrList<KPrintDialogPage> m_printdialogpages;
+ TQPtrList<KPrintDialogPage> m_printdialogpages;
};
#endif
diff --git a/kdeprint/kmvirtualmanager.cpp b/kdeprint/kmvirtualmanager.cpp
index 51a50292a..a6e263faf 100644
--- a/kdeprint/kmvirtualmanager.cpp
+++ b/kdeprint/kmvirtualmanager.cpp
@@ -24,10 +24,10 @@
#include "kprinter.h"
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kurl.h>
@@ -36,7 +36,7 @@
#include <unistd.h>
-static QString instanceName(const QString& prname, const QString& instname)
+static TQString instanceName(const TQString& prname, const TQString& instname)
{
QString str(prname);
if (!instname.isEmpty())
@@ -45,7 +45,7 @@ static QString instanceName(const QString& prname, const QString& instname)
}
KMVirtualManager::KMVirtualManager(KMManager *parent, const char *name)
-: QObject(parent,name), m_manager(parent)
+: TQObject(parent,name), m_manager(parent)
{
}
@@ -53,12 +53,12 @@ KMVirtualManager::~KMVirtualManager()
{
}
-KMPrinter* KMVirtualManager::findPrinter(const QString& name)
+KMPrinter* KMVirtualManager::findPrinter(const TQString& name)
{
return m_manager->findPrinter(name);
}
-KMPrinter* KMVirtualManager::findInstance(KMPrinter *p, const QString& name)
+KMPrinter* KMVirtualManager::findInstance(KMPrinter *p, const TQString& name)
{
QString instname(instanceName(p->printerName(),name));
return findPrinter(instname);
@@ -90,11 +90,11 @@ void KMVirtualManager::addPrinter(KMPrinter *p)
void KMVirtualManager::setDefault(KMPrinter *p, bool saveflag)
{
m_manager->setSoftDefault(p);
- m_defaultprinter = (p ? p->printerName() : QString::null);
+ m_defaultprinter = (p ? p->printerName() : TQString::null);
if (saveflag) triggerSave();
}
-bool KMVirtualManager::isDefault(KMPrinter *p, const QString& name)
+bool KMVirtualManager::isDefault(KMPrinter *p, const TQString& name)
{
QString instname(instanceName(p->printerName(),name));
KMPrinter *printer = findPrinter(instname);
@@ -104,7 +104,7 @@ bool KMVirtualManager::isDefault(KMPrinter *p, const QString& name)
return false;
}
-void KMVirtualManager::create(KMPrinter *p, const QString& name)
+void KMVirtualManager::create(KMPrinter *p, const TQString& name)
{
QString instname = instanceName(p->printerName(),name);
if (findPrinter(instname) != NULL) return;
@@ -121,7 +121,7 @@ void KMVirtualManager::create(KMPrinter *p, const QString& name)
triggerSave();
}
-void KMVirtualManager::copy(KMPrinter *p, const QString& src, const QString& name)
+void KMVirtualManager::copy(KMPrinter *p, const TQString& src, const TQString& name)
{
QString instsrc(instanceName(p->printerName(),src)), instname(instanceName(p->printerName(),name));
KMPrinter *prsrc = findPrinter(instsrc);
@@ -135,15 +135,15 @@ void KMVirtualManager::copy(KMPrinter *p, const QString& src, const QString& nam
triggerSave();
}
-void KMVirtualManager::remove(KMPrinter *p, const QString& name)
+void KMVirtualManager::remove(KMPrinter *p, const TQString& name)
{
QString instname = instanceName(p->printerName(),name);
KMPrinter *printer = findPrinter(instname);
if (!printer) return;
if (name.isEmpty())
{ // remove default instance => only remove options, keep the KMPrinter object
- printer->setDefaultOptions(QMap<QString,QString>());
- printer->setEditedOptions(QMap<QString,QString>());
+ printer->setDefaultOptions(TQMap<TQString,TQString>());
+ printer->setEditedOptions(TQMap<TQString,TQString>());
printer->setEdited(false);
}
else
@@ -151,7 +151,7 @@ void KMVirtualManager::remove(KMPrinter *p, const QString& name)
triggerSave();
}
-void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *parent)
+void KMVirtualManager::setAsDefault(KMPrinter *p, const TQString& name, TQWidget *parent)
{
QString instname(instanceName(p->printerName(),name));
@@ -163,7 +163,7 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *
"applications. Note that this will only make your personal default printer "
"as undefined for non-KDE applications and should not prevent you from "
"printing normally. Do you really want to set <b>%1</b> as your personal default?</qt>" ).arg( instname ),
- QString::null, i18n("Set as Default"), "setSpecialAsDefault" ) == KMessageBox::No )
+ TQString::null, i18n("Set as Default"), "setSpecialAsDefault" ) == KMessageBox::No )
return;
}
@@ -179,8 +179,8 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *
void KMVirtualManager::refresh()
{
- QFileInfo fi(QDir::homeDirPath() + QFile::decodeName("/.lpoptions"));
- QFileInfo fi2(QFile::decodeName("/etc/cups/lpoptions"));
+ QFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions"));
+ QFileInfo fi2(TQFile::decodeName("/etc/cups/lpoptions"));
// if root, then only use global file: trick -> use twice the same file
if (getuid() == 0)
@@ -188,7 +188,7 @@ void KMVirtualManager::refresh()
if (!m_checktime.isValid() || m_checktime < QMAX(fi.lastModified(),fi2.lastModified()))
{
- m_defaultprinter = QString::null;
+ m_defaultprinter = TQString::null;
if (fi2.exists())
loadFile(fi2.absFilePath());
if (fi.exists() && fi.absFilePath() != fi2.absFilePath())
@@ -198,7 +198,7 @@ void KMVirtualManager::refresh()
else
{ // parse printers looking for instances -> undiscarded them, real printers
// are undiscarded by the manager itself. Also update printer status.
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
if (!it.current()->instanceName().isEmpty())
{
@@ -224,12 +224,12 @@ void KMVirtualManager::checkPrinter(KMPrinter *p)
}
}
-QString KMVirtualManager::defaultPrinterName()
+TQString KMVirtualManager::defaultPrinterName()
{
return m_defaultprinter;
}
-void KMVirtualManager::virtualList(QPtrList<KMPrinter>& list, const QString& prname)
+void KMVirtualManager::virtualList(TQPtrList<KMPrinter>& list, const TQString& prname)
{
// load printers if necessary
refresh();
@@ -238,13 +238,13 @@ void KMVirtualManager::virtualList(QPtrList<KMPrinter>& list, const QString& prn
list.setAutoDelete(false);
list.clear();
kdDebug(500) << "KMVirtualManager::virtualList() prname=" << prname << endl;
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
if (it.current()->printerName() == prname)
list.append(it.current());
}
-void KMVirtualManager::loadFile(const QString& filename)
+void KMVirtualManager::loadFile(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -260,9 +260,9 @@ void KMVirtualManager::loadFile(const QString& filename)
{
line = t.readLine().stripWhiteSpace();
if (line.isEmpty()) continue;
- words = QStringList::split(' ',line,false);
+ words = TQStringList::split(' ',line,false);
if (words.count() < 2) continue;
- pair = QStringList::split('/',words[1],false);
+ pair = TQStringList::split('/',words[1],false);
realprinter = m_manager->findPrinter(KURL::decode_string(pair[0]));
if (realprinter && !realprinter->isDiscarded())
{ // keep only instances corresponding to an existing and
@@ -279,8 +279,8 @@ void KMVirtualManager::loadFile(const QString& filename)
// parse options
for (uint i=2; i<words.count(); i++)
{
- pair = QStringList::split('=',words[i],false);
- printer->setDefaultOption(pair[0],(pair.count() > 1 ? pair[1] : QString::null));
+ pair = TQStringList::split('=',words[i],false);
+ printer->setDefaultOption(pair[0],(pair.count() > 1 ? pair[1] : TQString::null));
}
// add printer to the manager
addPrinter(printer); // don't use "printer" after this point !!!
@@ -297,25 +297,25 @@ void KMVirtualManager::triggerSave()
QString filename;
if (getuid() == 0)
{
- if (KStandardDirs::makeDir(QFile::decodeName("/etc/cups")))
- filename = QFile::decodeName("/etc/cups/lpoptions");
+ if (KStandardDirs::makeDir(TQFile::decodeName("/etc/cups")))
+ filename = TQFile::decodeName("/etc/cups/lpoptions");
}
else
- filename = QDir::homeDirPath() + QFile::decodeName("/.lpoptions");
+ filename = TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions");
if (!filename.isEmpty())
{
saveFile(filename);
- m_checktime = QFileInfo(filename).lastModified();
+ m_checktime = TQFileInfo(filename).lastModified();
}
}
-void KMVirtualManager::saveFile(const QString& filename)
+void KMVirtualManager::saveFile(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
{
if (it.current()->isSpecial())
@@ -327,8 +327,8 @@ void KMVirtualManager::saveFile(const QString& filename)
}
else
t << (it.current()->isSoftDefault() ? "Default " : "Dest ") << it.current()->name();
- QMap<QString,QString> opts = it.current()->defaultOptions();
- for (QMap<QString,QString>::ConstIterator oit=opts.begin(); oit!=opts.end(); ++oit)
+ TQMap<TQString,TQString> opts = it.current()->defaultOptions();
+ for (TQMap<TQString,TQString>::ConstIterator oit=opts.begin(); oit!=opts.end(); ++oit)
{
t << ' ' << oit.key();
if (!oit.data().isEmpty())
diff --git a/kdeprint/kmvirtualmanager.h b/kdeprint/kmvirtualmanager.h
index de1d5e437..0f0820366 100644
--- a/kdeprint/kmvirtualmanager.h
+++ b/kdeprint/kmvirtualmanager.h
@@ -20,9 +20,9 @@
#ifndef KMVIRTUALMANAGER_H
#define KMVIRTUALMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -32,7 +32,7 @@ class KMPrinter;
class KMManager;
class QWidget;
-class KDEPRINT_EXPORT KMVirtualManager : public QObject, public KPReloadObject
+class KDEPRINT_EXPORT KMVirtualManager : public TQObject, public KPReloadObject
{
public:
KMVirtualManager(KMManager *parent = 0, const char *name = 0);
@@ -40,24 +40,24 @@ public:
void refresh();
void reset();
- void virtualList(QPtrList<KMPrinter>& list, const QString& prname);
+ void virtualList(TQPtrList<KMPrinter>& list, const TQString& prname);
void triggerSave();
- KMPrinter* findPrinter(const QString& name);
- KMPrinter* findInstance(KMPrinter *p, const QString& name);
+ KMPrinter* findPrinter(const TQString& name);
+ KMPrinter* findInstance(KMPrinter *p, const TQString& name);
void setDefault(KMPrinter *p, bool save = true);
- QString defaultPrinterName();
- bool isDefault(KMPrinter *p, const QString& name);
+ TQString defaultPrinterName();
+ bool isDefault(KMPrinter *p, const TQString& name);
bool testInstance(KMPrinter *p);
- void create(KMPrinter *p, const QString& name);
- void remove(KMPrinter *p, const QString& name);
- void copy(KMPrinter *p, const QString& src, const QString& name);
- void setAsDefault(KMPrinter *p, const QString& name, QWidget *parent = NULL);
+ void create(KMPrinter *p, const TQString& name);
+ void remove(KMPrinter *p, const TQString& name);
+ void copy(KMPrinter *p, const TQString& src, const TQString& name);
+ void setAsDefault(KMPrinter *p, const TQString& name, TQWidget *parent = NULL);
protected:
- void loadFile(const QString& filename);
- void saveFile(const QString& filename);
+ void loadFile(const TQString& filename);
+ void saveFile(const TQString& filename);
void addPrinter(KMPrinter *p);
void checkPrinter(KMPrinter*);
void reload();
@@ -66,10 +66,10 @@ protected:
private:
KMManager *m_manager;
QDateTime m_checktime;
- QString m_defaultprinter;
+ TQString m_defaultprinter;
};
inline void KMVirtualManager::reset()
-{ m_checktime = QDateTime(); }
+{ m_checktime = TQDateTime(); }
#endif
diff --git a/kdeprint/kpcopiespage.cpp b/kdeprint/kpcopiespage.cpp
index af74ff19f..1a7756913 100644
--- a/kdeprint/kpcopiespage.cpp
+++ b/kdeprint/kpcopiespage.cpp
@@ -23,41 +23,41 @@
#include "kprinter.h"
#include "kxmlcommand.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
+KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPageSelectionLabel = i18n( " <qt><p><b>Page Selection</b></p> "
+ TQString whatsThisPageSelectionLabel = i18n( " <qt><p><b>Page Selection</b></p> "
" <p>Here you can control if you print a certain selection only out of all"
" the pages from the complete document."
" </p>"
" </qt>" );
- QString whatsThisAllPagesLabel = i18n( " <qt><b>All Pages:</b> Select \"All\" to print the complete document."
+ TQString whatsThisAllPagesLabel = i18n( " <qt><b>All Pages:</b> Select \"All\" to print the complete document."
" Since this is the default, it is pre-selected."
" </p>"
" </qt>" );
- QString whatsThisCurrentPagesLabel = i18n( " <qt><b>Current Page:</b> Select <em>\"Current\"</em> if you want "
+ TQString whatsThisCurrentPagesLabel = i18n( " <qt><b>Current Page:</b> Select <em>\"Current\"</em> if you want "
" to print the page currently visible in your KDE application.</p>"
" <p><b>Note:</b> this field is disabled if you print from"
" non-KDE applications like Mozilla or OpenOffice.org, since here KDEPrint has no"
" means to determine which document page you are currently viewing.</p></qt>" );
- QString whatsThisPageRangeLabel = i18n( " <qt><b>Page Range:</b> Choose a \"Page Range\" to select a subset of the"
+ TQString whatsThisPageRangeLabel = i18n( " <qt><b>Page Range:</b> Choose a \"Page Range\" to select a subset of the"
" complete document pages"
" to be printed. The format is <em>\"n,m,o-p,q,r,s-t, u\"</em>.</p>"
" <p><b>Example:</b> <em>\"4,6,10-13,17,20,23-25\"</em> will print"
@@ -71,7 +71,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
"</qt>" );
- QString whatsThisPageSetLabel = i18n( " <qt><b>Page Set:</b>"
+ TQString whatsThisPageSetLabel = i18n( " <qt><b>Page Set:</b>"
" <p>Choose <em>\"All Pages\"</em>, <em>\"Even Pages\"</em> or"
" <em>\"Odd Pages\"</em>"
" if you want to print a page selection matching one of these terms. The default"
@@ -94,7 +94,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisCopiesLabel = i18n( " <qt><b>Output Settings:</b>"
+ TQString whatsThisCopiesLabel = i18n( " <qt><b>Output Settings:</b>"
" Here you can determine the number of copies, the output order and the collate"
" mode for the pages of your printjob. (Note, that the maximum number of copies "
" allowed to print may be restricted by your print subsystem.)</p>"
@@ -112,7 +112,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
".</qt>" );
- QString whatsThisNumberOfCopiesLabel = i18n( " <qt><b>Number of Copies:</b> Determine the number of requested copies here."
+ TQString whatsThisNumberOfCopiesLabel = i18n( " <qt><b>Number of Copies:</b> Determine the number of requested copies here."
" You can increase or decrease"
" the number of printed copies by clicking on the up and down arrows. You can also type the figure"
" directly into the box. </p>"
@@ -125,7 +125,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisCollateLabel = i18n( " <qt><b>Collate Copies</b>"
+ TQString whatsThisCollateLabel = i18n( " <qt><b>Collate Copies</b>"
" <p>If the <em>\"Collate\"</em> checkbox is enabled (default), the output order for"
" multiple copies of a multi-page document will be \"1-2-3-..., 1-2-3-..., 1-2-3-...\".</p>"
" <p>If the <em>\"Collate\"</em> checkbox is disabled, the output order for"
@@ -139,7 +139,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisReverseLabel = i18n( " <qt><b>Reverse Order</b>"
+ TQString whatsThisReverseLabel = i18n( " <qt><b>Reverse Order</b>"
" <p> If the <em>\"Reverse\"</em> checkbox is enabled, the output order for"
" multiple copies of a multi-page document will be \"...-3-2-1, ...-3-2-1, ...-3-2-1\", if you"
" also have <em>en</em>abled the <em>\"Collate\"</em> checkbox at the same time"
@@ -164,76 +164,76 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
setId(KPrinter::CopiesPage);
// widget creation
- QButtonGroup *m_pagebox = new QButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this);
- QWhatsThis::add(m_pagebox, whatsThisPageSelectionLabel);
- m_all = new QRadioButton(i18n("&All"), m_pagebox);
- QWhatsThis::add(m_all, whatsThisAllPagesLabel);
- m_current = new QRadioButton(i18n("Cu&rrent"), m_pagebox);
- QWhatsThis::add(m_current, whatsThisCurrentPagesLabel);
- m_range = new QRadioButton(i18n("Ran&ge"), m_pagebox);
- QWhatsThis::add(m_range, whatsThisPageRangeLabel);
- m_rangeedit = new QLineEdit(m_pagebox);
- QWhatsThis::add(m_rangeedit, whatsThisPageRangeLabel);
- connect(m_range, SIGNAL(clicked()), m_rangeedit, SLOT(setFocus()));
- QToolTip::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
-// QWhatsThis::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
- //QLabel *m_rangeexpl = new QLabel(m_pagebox);
+ QButtonGroup *m_pagebox = new TQButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this);
+ TQWhatsThis::add(m_pagebox, whatsThisPageSelectionLabel);
+ m_all = new TQRadioButton(i18n("&All"), m_pagebox);
+ TQWhatsThis::add(m_all, whatsThisAllPagesLabel);
+ m_current = new TQRadioButton(i18n("Cu&rrent"), m_pagebox);
+ TQWhatsThis::add(m_current, whatsThisCurrentPagesLabel);
+ m_range = new TQRadioButton(i18n("Ran&ge"), m_pagebox);
+ TQWhatsThis::add(m_range, whatsThisPageRangeLabel);
+ m_rangeedit = new TQLineEdit(m_pagebox);
+ TQWhatsThis::add(m_rangeedit, whatsThisPageRangeLabel);
+ connect(m_range, TQT_SIGNAL(clicked()), m_rangeedit, TQT_SLOT(setFocus()));
+ TQToolTip::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
+// TQWhatsThis::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
+ //QLabel *m_rangeexpl = new TQLabel(m_pagebox);
//m_rangeexpl->setText(i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
- QGroupBox *m_copybox = new QGroupBox(0, Qt::Vertical, i18n("Output Settings"), this);
- QWhatsThis::add(m_copybox, whatsThisCopiesLabel);
- m_collate = new QCheckBox(i18n("Co&llate"), m_copybox);
- QWhatsThis::add(m_collate, whatsThisCollateLabel);
- m_order = new QCheckBox(i18n("Re&verse"), m_copybox);
- QWhatsThis::add(m_order, whatsThisReverseLabel);
- m_collatepix = new QLabel(m_copybox);
+ QGroupBox *m_copybox = new TQGroupBox(0, Qt::Vertical, i18n("Output Settings"), this);
+ TQWhatsThis::add(m_copybox, whatsThisCopiesLabel);
+ m_collate = new TQCheckBox(i18n("Co&llate"), m_copybox);
+ TQWhatsThis::add(m_collate, whatsThisCollateLabel);
+ m_order = new TQCheckBox(i18n("Re&verse"), m_copybox);
+ TQWhatsThis::add(m_order, whatsThisReverseLabel);
+ m_collatepix = new TQLabel(m_copybox);
m_collatepix->setAlignment(Qt::AlignCenter);
m_collatepix->setMinimumHeight(70);
- QLabel *m_copieslabel = new QLabel(i18n("Cop&ies:"), m_copybox);
- m_copies = new QSpinBox(m_copybox);
+ QLabel *m_copieslabel = new TQLabel(i18n("Cop&ies:"), m_copybox);
+ m_copies = new TQSpinBox(m_copybox);
m_copies->setRange(1,999);
- QWhatsThis::add(m_copies, whatsThisNumberOfCopiesLabel);
+ TQWhatsThis::add(m_copies, whatsThisNumberOfCopiesLabel);
m_copieslabel->setBuddy(m_copies);
- QWhatsThis::add(m_copieslabel, whatsThisNumberOfCopiesLabel);
- m_pageset = new QComboBox(m_pagebox);
+ TQWhatsThis::add(m_copieslabel, whatsThisNumberOfCopiesLabel);
+ m_pageset = new TQComboBox(m_pagebox);
m_pageset->insertItem(i18n("All Pages"));
m_pageset->insertItem(i18n("Odd Pages"));
m_pageset->insertItem(i18n("Even Pages"));
- QWhatsThis::add(m_pageset, whatsThisPageSetLabel);
- QLabel *m_pagesetlabel = new QLabel(i18n("Page &set:"), m_pagebox);
+ TQWhatsThis::add(m_pageset, whatsThisPageSetLabel);
+ QLabel *m_pagesetlabel = new TQLabel(i18n("Page &set:"), m_pagebox);
m_pagesetlabel->setBuddy(m_pageset);
- QWhatsThis::add(m_pagesetlabel, whatsThisPageSetLabel);
+ TQWhatsThis::add(m_pagesetlabel, whatsThisPageSetLabel);
KSeparator *sepline = new KSeparator(Horizontal, m_pagebox);
sepline->setMinimumHeight(10);
- QWidget::setTabOrder( m_all, m_current );
- QWidget::setTabOrder( m_current, m_range );
- QWidget::setTabOrder( m_range, m_rangeedit );
- QWidget::setTabOrder( m_rangeedit, m_pageset );
- QWidget::setTabOrder( m_pageset, m_copies );
- QWidget::setTabOrder( m_copies, m_collate );
- QWidget::setTabOrder( m_collate, m_order );
+ TQWidget::setTabOrder( m_all, m_current );
+ TQWidget::setTabOrder( m_current, m_range );
+ TQWidget::setTabOrder( m_range, m_rangeedit );
+ TQWidget::setTabOrder( m_rangeedit, m_pageset );
+ TQWidget::setTabOrder( m_pageset, m_copies );
+ TQWidget::setTabOrder( m_copies, m_collate );
+ TQWidget::setTabOrder( m_collate, m_order );
// layout creation
- QGridLayout *l1 = new QGridLayout(this, 2, 2, 0, 5);
+ QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, 5);
l1->setRowStretch(1,1);
l1->setColStretch(0,1);
l1->setColStretch(1,1);
l1->addWidget(m_pagebox,0,0);
l1->addWidget(m_copybox,0,1);
- QVBoxLayout *l3 = new QVBoxLayout(m_pagebox->layout(), 5);
+ QVBoxLayout *l3 = new TQVBoxLayout(m_pagebox->layout(), 5);
l3->addWidget(m_all);
l3->addWidget(m_current);
- QHBoxLayout *l4 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5);
l3->addLayout(l4);
l4->addWidget(m_range,0);
l4->addWidget(m_rangeedit,1);
//l3->addWidget(m_rangeexpl);
l3->addWidget(sepline);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5);
l3->addLayout(l2);
l2->addWidget(m_pagesetlabel,0);
l2->addWidget(m_pageset,1);
- QGridLayout *l5 = new QGridLayout(m_copybox->layout(), 4, 2, 10);
+ QGridLayout *l5 = new TQGridLayout(m_copybox->layout(), 4, 2, 10);
l5->setRowStretch(4,1);
l5->addWidget(m_copieslabel,0,0);
l5->addWidget(m_copies,0,1);
@@ -248,9 +248,9 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
slotCollateClicked();
// connections
- connect(m_rangeedit,SIGNAL(textChanged(const QString&)),SLOT(slotRangeEntered()));
- connect(m_collate,SIGNAL(clicked()),SLOT(slotCollateClicked()));
- connect(m_order,SIGNAL(clicked()),SLOT(slotCollateClicked()));
+ connect(m_rangeedit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SLOT(slotRangeEntered()));
+ connect(m_collate,TQT_SIGNAL(clicked()),TQT_SLOT(slotCollateClicked()));
+ connect(m_order,TQT_SIGNAL(clicked()),TQT_SLOT(slotCollateClicked()));
if (!kapp->authorize("print/copies"))
{
@@ -293,7 +293,7 @@ void KPCopiesPage::initialize(bool usePlugin)
slotCollateClicked();
}
-void KPCopiesPage::setOptions(const QMap<QString,QString>& options)
+void KPCopiesPage::setOptions(const TQMap<TQString,TQString>& options)
{
QString value;
// copies
@@ -326,7 +326,7 @@ void KPCopiesPage::setOptions(const QMap<QString,QString>& options)
m_pageset->setCurrentItem(0);
}
-void KPCopiesPage::getOptions(QMap<QString,QString>& options, bool incldef)
+void KPCopiesPage::getOptions(TQMap<TQString,TQString>& options, bool incldef)
{
// copies
options["kde-copies"] = m_copies->text();
@@ -336,9 +336,9 @@ void KPCopiesPage::getOptions(QMap<QString,QString>& options, bool incldef)
options["kde-collate"] = (m_collate->isChecked() ? "Collate" : "Uncollate");
// ranges
options["kde-current"] = (m_current->isChecked() ? "1" : "0");
- options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? QString::fromLatin1("1-") : QString::fromLatin1("")));
+ options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::fromLatin1("1-") : TQString::fromLatin1("")));
// page set
- options["kde-pageset"] = QString::number(m_pageset->currentItem());
+ options["kde-pageset"] = TQString::number(m_pageset->currentItem());
}
void KPCopiesPage::reload()
diff --git a/kdeprint/kpcopiespage.h b/kdeprint/kpcopiespage.h
index d20b09c73..3cca90ca8 100644
--- a/kdeprint/kpcopiespage.h
+++ b/kdeprint/kpcopiespage.h
@@ -35,11 +35,11 @@ class KDEPRINT_EXPORT KPCopiesPage : public KPrintDialogPage, public KPReloadObj
{
Q_OBJECT
public:
- KPCopiesPage(KPrinter *prt = 0, QWidget *parent = 0, const char *name = 0);
+ KPCopiesPage(KPrinter *prt = 0, TQWidget *parent = 0, const char *name = 0);
~KPCopiesPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
void initialize(bool usePlugin = true);
protected slots:
diff --git a/kdeprint/kpdriverpage.cpp b/kdeprint/kpdriverpage.cpp
index 749cf5cf2..e3d04c0a3 100644
--- a/kdeprint/kpdriverpage.cpp
+++ b/kdeprint/kpdriverpage.cpp
@@ -21,10 +21,10 @@
#include "driverview.h"
#include "driver.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, QWidget *parent, const char *name)
+KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char *name)
: KPrintDialogPage(p,d,parent,name)
{
setTitle(i18n("Driver Settings"));
@@ -33,7 +33,7 @@ KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, QWidget *parent, const char
m_view->setAllowFixed(false);
if (driver()) m_view->setDriver(driver());
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0);
lay1->addWidget(m_view);
}
@@ -41,7 +41,7 @@ KPDriverPage::~KPDriverPage()
{
}
-bool KPDriverPage::isValid(QString& msg)
+bool KPDriverPage::isValid(TQString& msg)
{
if (m_view->hasConflict())
{
@@ -52,12 +52,12 @@ bool KPDriverPage::isValid(QString& msg)
return true;
}
-void KPDriverPage::setOptions(const QMap<QString,QString>& opts)
+void KPDriverPage::setOptions(const TQMap<TQString,TQString>& opts)
{
m_view->setOptions(opts);
}
-void KPDriverPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPDriverPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
m_view->getOptions(opts,incldef);
}
diff --git a/kdeprint/kpdriverpage.h b/kdeprint/kpdriverpage.h
index a802e03c3..90f3ebb2d 100644
--- a/kdeprint/kpdriverpage.h
+++ b/kdeprint/kpdriverpage.h
@@ -27,12 +27,12 @@ class DriverView;
class KDEPRINT_EXPORT KPDriverPage : public KPrintDialogPage
{
public:
- KPDriverPage(KMPrinter *p, DrMain *d = 0, QWidget *parent = 0, const char *name = 0);
+ KPDriverPage(KMPrinter *p, DrMain *d = 0, TQWidget *parent = 0, const char *name = 0);
~KPDriverPage();
- bool isValid(QString& msg);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ bool isValid(TQString& msg);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
DriverView *m_view;
diff --git a/kdeprint/kpfileselectpage.cpp b/kdeprint/kpfileselectpage.cpp
index da7f9e115..5292c613f 100644
--- a/kdeprint/kpfileselectpage.cpp
+++ b/kdeprint/kpfileselectpage.cpp
@@ -20,14 +20,14 @@
#include "kpfileselectpage.h"
#include "kfilelist.h"
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qheader.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kiconloader.h>
-KPFileSelectPage::KPFileSelectPage(QWidget *parent, const char *name)
+KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
setTitle(i18n("&Files"));
@@ -35,13 +35,13 @@ KPFileSelectPage::KPFileSelectPage(QWidget *parent, const char *name)
m_files = new KFileList(this);
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, 10);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 10);
l0->addWidget(m_files);
resize(100, 100);
}
-void KPFileSelectPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPFileSelectPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
// (incldef == false) is a hint telling that it should be the last time
// and we want to do it only once
@@ -52,12 +52,12 @@ void KPFileSelectPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
-void KPFileSelectPage::setOptions(const QMap<QString,QString>& opts)
+void KPFileSelectPage::setOptions(const TQMap<TQString,TQString>& opts)
{
// do it only once as files will only be selected there
if (m_first)
{
- QStringList l = QStringList::split("@@", opts["kde-filelist"], false);
+ QStringList l = TQStringList::split("@@", opts["kde-filelist"], false);
m_files->setFileList(l);
m_first = false;
diff --git a/kdeprint/kpfileselectpage.h b/kdeprint/kpfileselectpage.h
index 5f3822859..518f5a106 100644
--- a/kdeprint/kpfileselectpage.h
+++ b/kdeprint/kpfileselectpage.h
@@ -27,10 +27,10 @@ class KFileList;
class KPFileSelectPage : public KPrintDialogPage
{
public:
- KPFileSelectPage(QWidget *parent = 0, const char *name = 0);
+ KPFileSelectPage(TQWidget *parent = 0, const char *name = 0);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
KFileList *m_files;
diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp
index 50aa30135..d7906a290 100644
--- a/kdeprint/kpfilterpage.cpp
+++ b/kdeprint/kpfilterpage.cpp
@@ -21,11 +21,11 @@
#include "kmfactory.h"
#include "kxmlcommand.h"
-#include <qtoolbutton.h>
-#include <qheader.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -35,11 +35,11 @@
#include <kapplication.h>
#include <kdialog.h>
-KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
+KPFilterPage::KPFilterPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAddFilterButton = i18n( " <qt> <b>Add Filter button</b>"
+ TQString whatsThisAddFilterButton = i18n( " <qt> <b>Add Filter button</b>"
" <p>This button calls a little dialog to let you"
" select a filter here. </p>"
" <p><b>Note 1:</b> You can chain different filters as long as you make "
@@ -51,28 +51,28 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisRemoveFilterButton = i18n(" <qt> <b>Remove Filter button</b>"
+ TQString whatsThisRemoveFilterButton = i18n(" <qt> <b>Remove Filter button</b>"
" <p>This button removes the highlighted filter from the"
" list of filters."
" </qt>" );
- QString whatsThisMoveFilterUpButton = i18n(" <qt> <b>Move Filter Up button</b>"
+ TQString whatsThisMoveFilterUpButton = i18n(" <qt> <b>Move Filter Up button</b>"
" <p>This button moves the highlighted filter up in the list"
" of filters, towards the front of the filtering chain. </p>"
" </qt>" );
- QString whatsThisMoveFilterDownButton = i18n(" <qt> <b>Move Filter Down button</b>"
+ TQString whatsThisMoveFilterDownButton = i18n(" <qt> <b>Move Filter Down button</b>"
" <p>This button moves the highlighted filter down in the list"
" of filters, towards the end of the filtering chain..</p>"
" </qt>" );
- QString whatsThisConfigureFilterButton = i18n( " <qt> <b>Configure Filter button</b>"
+ TQString whatsThisConfigureFilterButton = i18n( " <qt> <b>Configure Filter button</b>"
" <p>This button lets you configure the currently highlighted filter."
" It opens a separate dialog. "
" </p>"
" </qt>" );
- QString whatsThisFilterInfoPane = i18n( " <qt> <b>Filter Info Pane</b>"
+ TQString whatsThisFilterInfoPane = i18n( " <qt> <b>Filter Info Pane</b>"
" <p>This field shows some general info about the selected filter. "
" Amongst them are: "
" <ul> "
@@ -88,7 +88,7 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
" </p>"
" </qt>" );
- QString whatsThisFilterchainListView = i18n( " <qt> <b>Filtering Chain</b> (if enabled, is run <em>before</em> actual "
+ TQString whatsThisFilterchainListView = i18n( " <qt> <b>Filtering Chain</b> (if enabled, is run <em>before</em> actual "
" job submission to print system)"
" <p>This field shows which filters are currently selected to act as 'pre-filters' "
" for KDEPrint. Pre-filters are processing the print files <em>before</em> they are "
@@ -127,56 +127,56 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
m_valid = true;
m_view = new KListView(this);
- QWhatsThis::add(m_view, whatsThisFilterchainListView);
+ TQWhatsThis::add(m_view, whatsThisFilterchainListView);
m_view->addColumn("");
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
m_view->setSorting(-1);
m_view->header()->hide();
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotItemSelected(QListViewItem*)));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotItemSelected(TQListViewItem*)));
- m_add = new QToolButton(this);
- QWhatsThis::add(m_add, whatsThisAddFilterButton);
+ m_add = new TQToolButton(this);
+ TQWhatsThis::add(m_add, whatsThisAddFilterButton);
m_add->setIconSet(BarIconSet("filter"));
- QToolTip::add(m_add, i18n("Add filter"));
+ TQToolTip::add(m_add, i18n("Add filter"));
- m_remove = new QToolButton(this);
- QWhatsThis::add(m_remove, whatsThisRemoveFilterButton);
+ m_remove = new TQToolButton(this);
+ TQWhatsThis::add(m_remove, whatsThisRemoveFilterButton);
m_remove->setIconSet(BarIconSet("remove"));
- QToolTip::add(m_remove, i18n("Remove filter"));
+ TQToolTip::add(m_remove, i18n("Remove filter"));
- m_up = new QToolButton(this);
- QWhatsThis::add(m_up, whatsThisMoveFilterUpButton);
+ m_up = new TQToolButton(this);
+ TQWhatsThis::add(m_up, whatsThisMoveFilterUpButton);
m_up->setIconSet(BarIconSet("up"));
- QToolTip::add(m_up, i18n("Move filter up"));
+ TQToolTip::add(m_up, i18n("Move filter up"));
- m_down = new QToolButton(this);
- QWhatsThis::add(m_down, whatsThisMoveFilterDownButton);
+ m_down = new TQToolButton(this);
+ TQWhatsThis::add(m_down, whatsThisMoveFilterDownButton);
m_down->setIconSet(BarIconSet("down"));
- QToolTip::add(m_down, i18n("Move filter down"));
+ TQToolTip::add(m_down, i18n("Move filter down"));
- m_configure = new QToolButton(this);
- QWhatsThis::add(m_configure, whatsThisConfigureFilterButton);
+ m_configure = new TQToolButton(this);
+ TQWhatsThis::add(m_configure, whatsThisConfigureFilterButton);
m_configure->setIconSet(BarIconSet("configure"));
- QToolTip::add(m_configure, i18n("Configure filter"));
+ TQToolTip::add(m_configure, i18n("Configure filter"));
- connect(m_add,SIGNAL(clicked()),SLOT(slotAddClicked()));
- connect(m_remove,SIGNAL(clicked()),SLOT(slotRemoveClicked()));
- connect(m_up,SIGNAL(clicked()),SLOT(slotUpClicked()));
- connect(m_down,SIGNAL(clicked()),SLOT(slotDownClicked()));
- connect(m_configure,SIGNAL(clicked()),SLOT(slotConfigureClicked()));
- connect(m_view,SIGNAL(doubleClicked(QListViewItem*)),SLOT(slotConfigureClicked()));
+ connect(m_add,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddClicked()));
+ connect(m_remove,TQT_SIGNAL(clicked()),TQT_SLOT(slotRemoveClicked()));
+ connect(m_up,TQT_SIGNAL(clicked()),TQT_SLOT(slotUpClicked()));
+ connect(m_down,TQT_SIGNAL(clicked()),TQT_SLOT(slotDownClicked()));
+ connect(m_configure,TQT_SIGNAL(clicked()),TQT_SLOT(slotConfigureClicked()));
+ connect(m_view,TQT_SIGNAL(doubleClicked(TQListViewItem*)),TQT_SLOT(slotConfigureClicked()));
m_info = new KActiveLabel(this);
- QWhatsThis::add(m_info, whatsThisFilterInfoPane);
- m_info->setVScrollBarMode( QScrollView::Auto );
- m_info->setHScrollBarMode( QScrollView::Auto );
- m_info->setFrameStyle( QFrame::Panel|QFrame::Sunken );
- m_info->setMinimumSize( QSize( 240, 100 ) );
+ TQWhatsThis::add(m_info, whatsThisFilterInfoPane);
+ m_info->setVScrollBarMode( TQScrollView::Auto );
+ m_info->setHScrollBarMode( TQScrollView::Auto );
+ m_info->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
+ m_info->setMinimumSize( TQSize( 240, 100 ) );
- QGridLayout *l1 = new QGridLayout(this, 2, 2, 0, KDialog::spacingHint());
+ QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, KDialog::spacingHint());
l1->setColStretch(0, 1);
- QVBoxLayout *l2 = new QVBoxLayout(0, 0, 1);
+ QVBoxLayout *l2 = new TQVBoxLayout(0, 0, 1);
l1->addWidget(m_view, 0, 0);
l1->addLayout(l2, 0, 1);
l2->addWidget(m_add);
@@ -210,7 +210,7 @@ void KPFilterPage::updateButton()
void KPFilterPage::slotAddClicked()
{
bool ok;
- QString choice = KXmlCommandManager::self()->selectCommand( this );
+ TQString choice = KXmlCommandManager::self()->selectCommand( this );
ok = !choice.isEmpty();
if (ok)
{
@@ -226,7 +226,7 @@ void KPFilterPage::slotAddClicked()
prev = prev->nextSibling();
}
m_activefilters.insert(cmd->name(), cmd);
- QListViewItem *item = new QListViewItem(m_view, prev, cmd->description(), cmd->name());
+ QListViewItem *item = new TQListViewItem(m_view, prev, cmd->description(), cmd->name());
item->setPixmap(0, SmallIcon("filter"));
checkFilterChain();
}
@@ -251,7 +251,7 @@ void KPFilterPage::slotUpClicked()
QListViewItem *item = m_view->selectedItem();
if (item && item->itemAbove())
{
- QListViewItem *clone = new QListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1));
+ QListViewItem *clone = new TQListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1));
clone->setPixmap(0, SmallIcon("filter"));
delete item;
m_view->setSelected(clone, true);
@@ -264,7 +264,7 @@ void KPFilterPage::slotDownClicked()
QListViewItem *item = m_view->selectedItem();
if (item && item->itemBelow())
{
- QListViewItem *clone = new QListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1));
+ QListViewItem *clone = new TQListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1));
clone->setPixmap(0, SmallIcon("filter"));
delete item;
m_view->setSelected(clone, true);
@@ -279,7 +279,7 @@ void KPFilterPage::slotConfigureClicked()
KMessageBox::error(this,i18n("Internal error: unable to load filter."));
}
-void KPFilterPage::slotItemSelected(QListViewItem *item)
+void KPFilterPage::slotItemSelected(TQListViewItem *item)
{
m_remove->setEnabled((item != 0));
m_up->setEnabled((item != 0 && item->itemAbove() != 0));
@@ -288,11 +288,11 @@ void KPFilterPage::slotItemSelected(QListViewItem *item)
updateInfo();
}
-void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
+void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts)
{
- QStringList filters = QStringList::split(',',opts["_kde-filters"],false);
+ QStringList filters = TQStringList::split(',',opts["_kde-filters"],false);
// remove unneeded filters
- QDictIterator<KXmlCommand> dit(m_activefilters);
+ TQDictIterator<KXmlCommand> dit(m_activefilters);
for (;dit.current();)
{
if (filters.find(dit.currentKey()) == filters.end())
@@ -306,7 +306,7 @@ void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
// add needed filters
m_view->clear();
QListViewItem *item(0);
- for (QStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit)
+ for (TQStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit)
{
KXmlCommand *f(0);
if ((f=m_activefilters.find(*sit)) == 0)
@@ -319,15 +319,15 @@ void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
}
}
if (f)
- item = new QListViewItem(m_view,item,f->description(),f->name());
+ item = new TQListViewItem(m_view,item,f->description(),f->name());
}
checkFilterChain();
}
-void KPFilterPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QStringList filters = activeList();
- for (QStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it)
+ for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it)
{
KXmlCommand *f = m_activefilters.find(*it);
if (f)
@@ -339,7 +339,7 @@ void KPFilterPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
-QStringList KPFilterPage::activeList()
+TQStringList KPFilterPage::activeList()
{
QStringList list;
QListViewItem *item = m_view->firstChild();
@@ -387,7 +387,7 @@ void KPFilterPage::checkFilterChain()
}
}
-bool KPFilterPage::isValid(QString& msg)
+bool KPFilterPage::isValid(TQString& msg)
{
if (!m_valid)
{
diff --git a/kdeprint/kpfilterpage.h b/kdeprint/kpfilterpage.h
index f6becc6a5..c05b72e56 100644
--- a/kdeprint/kpfilterpage.h
+++ b/kdeprint/kpfilterpage.h
@@ -22,8 +22,8 @@
#include "kprintdialogpage.h"
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
class KListView;
class KXmlCommand;
@@ -35,12 +35,12 @@ class KPFilterPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPFilterPage(QWidget *parent = 0, const char *name = 0);
+ KPFilterPage(TQWidget *parent = 0, const char *name = 0);
~KPFilterPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- bool isValid(QString& msg);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ bool isValid(TQString& msg);
protected slots:
void slotAddClicked();
@@ -48,18 +48,18 @@ protected slots:
void slotUpClicked();
void slotDownClicked();
void slotConfigureClicked();
- void slotItemSelected(QListViewItem*);
+ void slotItemSelected(TQListViewItem*);
protected:
KXmlCommand* currentFilter();
void checkFilterChain();
void updateInfo();
- QStringList activeList();
+ TQStringList activeList();
void updateButton();
private:
KListView *m_view;
QStringList m_filters; // <idname,description> pairs
- QDict<KXmlCommand> m_activefilters;
+ TQDict<KXmlCommand> m_activefilters;
QToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure;
bool m_valid;
QTextBrowser *m_info;
diff --git a/kdeprint/kpgeneralpage.cpp b/kdeprint/kpgeneralpage.cpp
index 076d64e23..73f21f4af 100644
--- a/kdeprint/kpgeneralpage.cpp
+++ b/kdeprint/kpgeneralpage.cpp
@@ -22,12 +22,12 @@
#include "kmprinter.h"
#include "kprinter.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <kdebug.h>
@@ -49,10 +49,10 @@
#define NUP_2_ID 1
#define NUP_4_ID 2
-static void initCombo(QComboBox *cb, DrListOption *opt)
+static void initCombo(TQComboBox *cb, DrListOption *opt)
{
cb->clear();
- QPtrListIterator<DrBase> it(*(opt->choices()));
+ TQPtrListIterator<DrBase> it(*(opt->choices()));
for (;it.current();++it)
{
cb->insertItem(it.current()->get("text"));
@@ -61,7 +61,7 @@ static void initCombo(QComboBox *cb, DrListOption *opt)
}
}
-static void setComboItem(QComboBox *cb, const QString& txt)
+static void setComboItem(TQComboBox *cb, const TQString& txt)
{
for (int i=0;i<cb->count();i++)
if (cb->text(i) == txt)
@@ -71,7 +71,7 @@ static void setComboItem(QComboBox *cb, const QString& txt)
}
}
-static int findOption(const char *strs[], int n, const QString& txt)
+static int findOption(const char *strs[], int n, const TQString& txt)
{
for (int i=0;i<n;i+=2)
if (txt == strs[i]) return (i/2);
@@ -116,11 +116,11 @@ static const char* default_type[] = {
//***************************************************************************************************
-KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const char *name)
+KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const char *name)
: KPrintDialogPage(pr,dr,parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPrintPropertiesGeneralPage = i18n( " <qt> "
+ TQString whatsThisPrintPropertiesGeneralPage = i18n( " <qt> "
" <p><b>\"General\"</b> </p> "
" <p>This dialog page contains <em>general</em> print job settings."
" General settings are applicable to most printers, most jobs "
@@ -128,7 +128,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" <p>To get more specific help, enable the \"WhatsThis\" cursor and click on any of the "
" text labels or GUI elements of this dialog. "
" </qt>" );
- QString whatsThisGeneralPageSizeLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPageSizeLabel = i18n( " <qt> "
" <p><b>Page size:</b> Select paper size to be printed on from "
" the drop-down menu. </p>"
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed.</p> "
@@ -141,7 +141,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPaperTypeLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPaperTypeLabel = i18n( " <qt> "
" <p><b>Paper type:</b> Select paper type to be printed on from "
" the drop-down menu. </p>"
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. </p>"
@@ -154,7 +154,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPaperSourceLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPaperSourceLabel = i18n( " <qt> "
" <p><b>Paper source:</b> Select paper source tray for the paper"
" to be printed on from the drop-down menu. "
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. </p>"
@@ -167,7 +167,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralOrientationLabel = i18n( " <qt> "
+ TQString whatsThisGeneralOrientationLabel = i18n( " <qt> "
" <p><b>Image Orientation:</b> Orientation of the printed "
" page image on your paper is controlled by the radio buttons. By default, "
" the orientation is <em>Portrait</em> "
@@ -188,7 +188,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralDuplexLabel = i18n( " <qt> "
+ TQString whatsThisGeneralDuplexLabel = i18n( " <qt> "
" <p><b>Duplex Printing:</b> These controls may be grayed out if your printer "
" does not support <em>duplex printing</em> (i.e. printing on both sides of the sheet). "
" These controls are active if your printer supports duplex printing. "
@@ -214,7 +214,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralBannersLabel = i18n( " <qt> "
+ TQString whatsThisGeneralBannersLabel = i18n( " <qt> "
" <p><b>Banner Page(s):</b> Select banner(s) to print one or two special sheets "
" of paper just before or after your main job. </p>"
" <p>Banners may contain some pieces of job information, such as user name, time of printing, job"
@@ -236,7 +236,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPagesPerSheetLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPagesPerSheetLabel = i18n( " <qt> "
" <p><b>Pages per Sheet:</b> "
" You can choose to print more than one page onto each sheet of paper. "
" This is sometimes useful to save paper. </p>"
@@ -260,75 +260,75 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
setTitle(i18n("General"));
// widget creation
- QLabel *m_pagesizelabel = new QLabel(i18n("Page s&ize:"), this);
+ QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this);
m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel);
+ TQWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel);
- QLabel *m_papertypelabel = new QLabel(i18n("Paper t&ype:"), this);
+ QLabel *m_papertypelabel = new TQLabel(i18n("Paper t&ype:"), this);
m_papertypelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel);
+ TQWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel);
- QLabel *m_inputslotlabel = new QLabel(i18n("Paper so&urce:"), this);
+ QLabel *m_inputslotlabel = new TQLabel(i18n("Paper so&urce:"), this);
m_inputslotlabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel);
+ TQWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel);
- m_pagesize = new QComboBox(this);
- QWhatsThis::add(m_pagesize, whatsThisGeneralPageSizeLabel);
+ m_pagesize = new TQComboBox(this);
+ TQWhatsThis::add(m_pagesize, whatsThisGeneralPageSizeLabel);
- m_papertype = new QComboBox(this);
- QWhatsThis::add(m_papertype, whatsThisGeneralPaperTypeLabel);
+ m_papertype = new TQComboBox(this);
+ TQWhatsThis::add(m_papertype, whatsThisGeneralPaperTypeLabel);
- m_inputslot = new QComboBox(this);
- QWhatsThis::add(m_inputslot, whatsThisGeneralPaperSourceLabel);
+ m_inputslot = new TQComboBox(this);
+ TQWhatsThis::add(m_inputslot, whatsThisGeneralPaperSourceLabel);
m_pagesizelabel->setBuddy(m_pagesize);
m_papertypelabel->setBuddy(m_papertype);
m_inputslotlabel->setBuddy(m_inputslot);
- m_orientbox = new QButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
- QWhatsThis::add(m_orientbox, whatsThisGeneralOrientationLabel);
+ m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
+ TQWhatsThis::add(m_orientbox, whatsThisGeneralOrientationLabel);
- m_duplexbox = new QButtonGroup(0, Qt::Vertical, i18n("Duplex Printing"), this);
- QWhatsThis::add(m_duplexbox, whatsThisGeneralDuplexLabel);
+ m_duplexbox = new TQButtonGroup(0, Qt::Vertical, i18n("Duplex Printing"), this);
+ TQWhatsThis::add(m_duplexbox, whatsThisGeneralDuplexLabel);
- m_nupbox = new QButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
- QWhatsThis::add(m_nupbox, whatsThisGeneralPagesPerSheetLabel);
+ m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
+ TQWhatsThis::add(m_nupbox, whatsThisGeneralPagesPerSheetLabel);
- m_bannerbox = new QGroupBox(0, Qt::Vertical, i18n("Banners"), this);
- QWhatsThis::add(m_bannerbox, whatsThisGeneralBannersLabel);
+ m_bannerbox = new TQGroupBox(0, Qt::Vertical, i18n("Banners"), this);
+ TQWhatsThis::add(m_bannerbox, whatsThisGeneralBannersLabel);
- QRadioButton *m_portrait = new QRadioButton(i18n("&Portrait"), m_orientbox);
- QRadioButton *m_landscape = new QRadioButton(i18n("&Landscape"), m_orientbox);
- QRadioButton *m_revland = new QRadioButton(i18n("&Reverse landscape"), m_orientbox);
- QRadioButton *m_revport = new QRadioButton(i18n("R&everse portrait"), m_orientbox);
+ QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox);
+ QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox);
+ QRadioButton *m_revland = new TQRadioButton(i18n("&Reverse landscape"), m_orientbox);
+ QRadioButton *m_revport = new TQRadioButton(i18n("R&everse portrait"), m_orientbox);
m_portrait->setChecked(true);
- m_orientpix = new QLabel(m_orientbox);
+ m_orientpix = new TQLabel(m_orientbox);
m_orientpix->setAlignment(Qt::AlignCenter);
- QRadioButton *m_dupnone = new QRadioButton(i18n("duplex orientation", "&None"), m_duplexbox);
- QRadioButton *m_duplong = new QRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox);
- QRadioButton *m_dupshort = new QRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox);
+ QRadioButton *m_dupnone = new TQRadioButton(i18n("duplex orientation", "&None"), m_duplexbox);
+ QRadioButton *m_duplong = new TQRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox);
+ QRadioButton *m_dupshort = new TQRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox);
m_dupnone->setChecked(true);
- m_duplexpix = new QLabel(m_duplexbox);
+ m_duplexpix = new TQLabel(m_duplexbox);
m_duplexpix->setAlignment(Qt::AlignCenter);
- QRadioButton *m_nup1 = new QRadioButton("&1", m_nupbox);
- QRadioButton *m_nup2 = new QRadioButton("&2", m_nupbox);
- QRadioButton *m_nup4 = new QRadioButton("&4", m_nupbox);
+ QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox);
+ QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox);
+ QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox);
m_nup1->setChecked(true);
- m_nuppix = new QLabel(m_nupbox);
+ m_nuppix = new TQLabel(m_nupbox);
m_nuppix->setAlignment(Qt::AlignCenter);
- m_startbanner = new QComboBox(m_bannerbox);
- m_endbanner = new QComboBox(m_bannerbox);
- QLabel *m_startbannerlabel = new QLabel(i18n("S&tart:"), m_bannerbox);
- QLabel *m_endbannerlabel = new QLabel(i18n("En&d:"), m_bannerbox);
+ m_startbanner = new TQComboBox(m_bannerbox);
+ m_endbanner = new TQComboBox(m_bannerbox);
+ QLabel *m_startbannerlabel = new TQLabel(i18n("S&tart:"), m_bannerbox);
+ QLabel *m_endbannerlabel = new TQLabel(i18n("En&d:"), m_bannerbox);
m_startbannerlabel->setBuddy(m_startbanner);
m_endbannerlabel->setBuddy(m_endbanner);
// layout creation
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QWhatsThis::add(this, whatsThisPrintPropertiesGeneralPage);
- QGridLayout *lay1 = new QGridLayout(0, 3, 2, 0, KDialog::spacingHint());
- QGridLayout *lay2 = new QGridLayout(0, 2, 2, 0, KDialog::spacingHint());
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQWhatsThis::add(this, whatsThisPrintPropertiesGeneralPage);
+ QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, KDialog::spacingHint());
+ QGridLayout *lay2 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint());
lay0->addStretch(1);
lay0->addLayout(lay1);
lay0->addStretch(1);
@@ -346,27 +346,27 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
lay2->addWidget(m_nupbox, 1, 1);
lay2->setColStretch(0, 1);
lay2->setColStretch(1, 1);
- QGridLayout *lay3 = new QGridLayout(m_orientbox->layout(), 4, 2,
+ QGridLayout *lay3 = new TQGridLayout(m_orientbox->layout(), 4, 2,
KDialog::spacingHint());
lay3->addWidget(m_portrait, 0, 0);
lay3->addWidget(m_landscape, 1, 0);
lay3->addWidget(m_revland, 2, 0);
lay3->addWidget(m_revport, 3, 0);
lay3->addMultiCellWidget(m_orientpix, 0, 3, 1, 1);
- QGridLayout *lay4 = new QGridLayout(m_duplexbox->layout(), 3, 2,
+ QGridLayout *lay4 = new TQGridLayout(m_duplexbox->layout(), 3, 2,
KDialog::spacingHint());
lay4->addWidget(m_dupnone, 0, 0);
lay4->addWidget(m_duplong, 1, 0);
lay4->addWidget(m_dupshort, 2, 0);
lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 1);
lay4->setRowStretch( 0, 1 );
- QGridLayout *lay5 = new QGridLayout(m_nupbox->layout(), 3, 2,
+ QGridLayout *lay5 = new TQGridLayout(m_nupbox->layout(), 3, 2,
KDialog::spacingHint());
lay5->addWidget(m_nup1, 0, 0);
lay5->addWidget(m_nup2, 1, 0);
lay5->addWidget(m_nup4, 2, 0);
lay5->addMultiCellWidget(m_nuppix, 0, 2, 1, 1);
- QGridLayout *lay6 = new QGridLayout(m_bannerbox->layout(), 2, 2,
+ QGridLayout *lay6 = new TQGridLayout(m_bannerbox->layout(), 2, 2,
KDialog::spacingHint());
lay6->addWidget(m_startbannerlabel, 0, 0);
lay6->addWidget(m_endbannerlabel, 1, 0);
@@ -375,9 +375,9 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
lay6->setColStretch(1, 1);
// connections (+ misc)
- connect(m_orientbox,SIGNAL(clicked(int)),SLOT(slotOrientationChanged(int)));
- connect(m_nupbox,SIGNAL(clicked(int)),SLOT(slotNupChanged(int)));
- connect(m_duplexbox,SIGNAL(clicked(int)),SLOT(slotDuplexChanged(int)));
+ connect(m_orientbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotOrientationChanged(int)));
+ connect(m_nupbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotNupChanged(int)));
+ connect(m_duplexbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotDuplexChanged(int)));
// init
initialize();
@@ -408,7 +408,7 @@ void KPGeneralPage::initialize()
if ( opt->choices()->count() == 2 )
{
// probably a On/Off option instead of the standard PS one
- QButton *btn = m_duplexbox->find( DUPLEX_SHORT_ID );
+ TQButton *btn = m_duplexbox->find( DUPLEX_SHORT_ID );
m_duplexbox->remove( btn );
btn->hide();
//delete btn;
@@ -455,15 +455,15 @@ void KPGeneralPage::initialize()
}
// Banners
- QStringList values = QStringList::split(',',printer()->option("kde-banners-supported"),false);
+ QStringList values = TQStringList::split(',',printer()->option("kde-banners-supported"),false);
if (values.count() > 0)
{
- for (QStringList::ConstIterator it = values.begin(); it != values.end(); ++it)
+ for (TQStringList::ConstIterator it = values.begin(); it != values.end(); ++it)
{
m_startbanner->insertItem(*it);
m_endbanner->insertItem(*it);
}
- values = QStringList::split(',',printer()->option("kde-banners"),false);
+ values = TQStringList::split(',',printer()->option("kde-banners"),false);
while (values.count() < 2) values.append("none");
setComboItem(m_startbanner, values[0]);
setComboItem(m_endbanner, values[1]);
@@ -475,15 +475,15 @@ void KPGeneralPage::initialize()
slotNupChanged(NUP_1_ID);
}
-void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
+void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (driver())
{
value = opts["media"];
- QStringList l = QStringList::split(',',value,false);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ QStringList l = TQStringList::split(',',value,false);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
{
value = *it;
DrBase *ch;
@@ -546,8 +546,8 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
if (!value.isEmpty())
{
int index(-1);
- QStringList l = QStringList::split(',',value,false);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ QStringList l = TQStringList::split(',',value,false);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
{
value = *it;
@@ -575,7 +575,7 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
value = opts["job-sheets"];
if (!value.isEmpty())
{
- QStringList l = QStringList::split(',',value,false);
+ QStringList l = TQStringList::split(',',value,false);
if (l.count() > 0) setComboItem(m_startbanner,l[0]);
if (l.count() > 1) setComboItem(m_endbanner,l[1]);
}
@@ -612,7 +612,7 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
}
-void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QString value;
@@ -649,7 +649,7 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
else
{
- value = QString("%1,%2,%3").arg(default_size[m_pagesize->currentItem()*2]).arg(default_type[m_papertype->currentItem()*2]).arg(default_source[m_inputslot->currentItem()*2]);
+ value = TQString("%1,%2,%3").arg(default_size[m_pagesize->currentItem()*2]).arg(default_type[m_papertype->currentItem()*2]).arg(default_source[m_inputslot->currentItem()*2]);
opts["media"] = value;
if (m_duplexbox->isEnabled())
@@ -664,7 +664,7 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
- value = QString::number(m_orientbox->id(m_orientbox->selected())+3);
+ value = TQString::number(m_orientbox->id(m_orientbox->selected())+3);
if (value != "3" || incldef) opts["orientation-requested"] = value;
if (m_nupbox->isEnabled())
@@ -680,11 +680,11 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
if (m_bannerbox->isEnabled())
{
- QStringList l = QStringList::split(',',printer()->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',printer()->option("kde-banners"),false);
if (incldef || (l.count() == 2 && (l[0] != m_startbanner->currentText() || l[1] != m_endbanner->currentText()))
|| (l.count() == 0 && (m_startbanner->currentText() != "none" || m_endbanner->currentText() != "none")))
{
- value = QString("%1,%2").arg(m_startbanner->currentText()).arg(m_endbanner->currentText());
+ value = TQString("%1,%2").arg(m_startbanner->currentText()).arg(m_endbanner->currentText());
opts["job-sheets"] = value;
}
}
diff --git a/kdeprint/kpgeneralpage.h b/kdeprint/kpgeneralpage.h
index 58296310f..9a0bd22cd 100644
--- a/kdeprint/kpgeneralpage.h
+++ b/kdeprint/kpgeneralpage.h
@@ -32,11 +32,11 @@ class KDEPRINT_EXPORT KPGeneralPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent = 0, const char *name = 0);
+ KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent = 0, const char *name = 0);
~KPGeneralPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
void initialize();
diff --git a/kdeprint/kpipeprocess.cpp b/kdeprint/kpipeprocess.cpp
index e95e3b290..a3ef560c8 100644
--- a/kdeprint/kpipeprocess.cpp
+++ b/kdeprint/kpipeprocess.cpp
@@ -19,8 +19,8 @@
#include "kpipeprocess.h"
-KPipeProcess::KPipeProcess(const QString& cmd, int mode)
-: QFile()
+KPipeProcess::KPipeProcess(const TQString& cmd, int mode)
+: TQFile()
{
m_pipe = NULL;
if (!cmd.isEmpty())
@@ -32,7 +32,7 @@ KPipeProcess::~KPipeProcess()
close();
}
-bool KPipeProcess::open(const QString& cmd, int mode)
+bool KPipeProcess::open(const TQString& cmd, int mode)
{
// close first if needed
close();
@@ -43,7 +43,7 @@ bool KPipeProcess::open(const QString& cmd, int mode)
// create the pipe
m_pipe = popen(cmd.latin1(),(mode == IO_WriteOnly ? "w" : "r"));
if (m_pipe)
- if (!QFile::open(mode,m_pipe))
+ if (!TQFile::open(mode,m_pipe))
close();
return (m_pipe != NULL);
}
@@ -52,7 +52,7 @@ void KPipeProcess::close()
{
if (m_pipe != NULL)
{
- QFile::close();
+ TQFile::close();
/* pipe must be close to be sure the process is terminated */
pclose( m_pipe );
m_pipe = NULL;
diff --git a/kdeprint/kpipeprocess.h b/kdeprint/kpipeprocess.h
index a875c13e4..966838d53 100644
--- a/kdeprint/kpipeprocess.h
+++ b/kdeprint/kpipeprocess.h
@@ -20,7 +20,7 @@
#ifndef KPIPEPROCESS_H
#define KPIPEPROCESS_H
-#include <qfile.h>
+#include <tqfile.h>
#include <stdio.h>
#include <kdelibs_export.h>
@@ -28,10 +28,10 @@
class KDEPRINT_EXPORT KPipeProcess : public QFile
{
public:
- KPipeProcess(const QString& cmd = QString::null, int mode = IO_ReadOnly);
+ KPipeProcess(const TQString& cmd = TQString::null, int mode = IO_ReadOnly);
~KPipeProcess();
- bool open(const QString& cmd, int mode = IO_ReadOnly);
+ bool open(const TQString& cmd, int mode = IO_ReadOnly);
void close();
private:
diff --git a/kdeprint/kpmarginpage.cpp b/kdeprint/kpmarginpage.cpp
index 793ad99ab..9b91ce56f 100644
--- a/kdeprint/kpmarginpage.cpp
+++ b/kdeprint/kpmarginpage.cpp
@@ -25,30 +25,30 @@
#include "driver.h"
#include "marginwidget.h"
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qprinter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqprinter.h>
+#include <tqpaintdevicemetrics.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
#include <kglobal.h>
-KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, QWidget *parent, const char *name)
+KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, driver, parent, name)
{
m_printer = prt;
setTitle(i18n("Margins"));
m_usedriver = true;
- QGroupBox *box = new QGroupBox(1, Qt::Vertical, i18n("Margins"), this);
+ QGroupBox *box = new TQGroupBox(1, Qt::Vertical, i18n("Margins"), this);
m_margin = new MarginWidget(box, "MarginWidget", (m_printer != 0));
//m_margin->setSymetricMargins(true);
//if (m_printer)
// m_margin->setResolution(m_printer->resolution());
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(box);
l0->addStretch(1);
}
@@ -57,12 +57,12 @@ KPMarginPage::~KPMarginPage()
{
}
-void KPMarginPage::initPageSize(const QString& ps, bool landscape)
+void KPMarginPage::initPageSize(const TQString& ps, bool landscape)
{
// first retrieve the Qt values for page size and margins
- QPrinter prt(QPrinter::PrinterResolution);
+ QPrinter prt(TQPrinter::PrinterResolution);
prt.setFullPage(true);
- prt.setPageSize((QPrinter::PageSize)(ps.isEmpty() ? KGlobal::locale()->pageSize() : ps.toInt()));
+ prt.setPageSize((TQPrinter::PageSize)(ps.isEmpty() ? KGlobal::locale()->pageSize() : ps.toInt()));
QPaintDeviceMetrics metrics(&prt);
float w = metrics.width();
float h = metrics.height();
@@ -103,11 +103,11 @@ void KPMarginPage::initPageSize(const QString& ps, bool landscape)
m_margin->setCustomEnabled(false);
}
-void KPMarginPage::setOptions(const QMap<QString,QString>& opts)
+void KPMarginPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString orient = opts["orientation-requested"];
bool land = (orient.isEmpty()? opts["kde-orientation"] == "Landscape" : orient == "4" || orient == "5");
- QString ps = opts[ "kde-printsize" ];
+ TQString ps = opts[ "kde-printsize" ];
if ( ps.isEmpty() )
{
m_usedriver = true;
@@ -144,14 +144,14 @@ void KPMarginPage::setOptions(const QMap<QString,QString>& opts)
m_margin->setCustomEnabled(marginset);
}
-void KPMarginPage::getOptions(QMap<QString,QString>& opts, bool /* incldef */)
+void KPMarginPage::getOptions(TQMap<TQString,TQString>& opts, bool /* incldef */)
{
if (m_margin->isCustomEnabled() /*|| incldef*/)
{
- opts["kde-margin-top"] = QString::number(m_margin->top());
- opts["kde-margin-left"] = QString::number(m_margin->left());
- opts["kde-margin-bottom"] = QString::number(m_margin->bottom());
- opts["kde-margin-right"] = QString::number(m_margin->right());
+ opts["kde-margin-top"] = TQString::number(m_margin->top());
+ opts["kde-margin-left"] = TQString::number(m_margin->left());
+ opts["kde-margin-bottom"] = TQString::number(m_margin->bottom());
+ opts["kde-margin-right"] = TQString::number(m_margin->right());
}
else
{
diff --git a/kdeprint/kpmarginpage.h b/kdeprint/kpmarginpage.h
index 061b0eff0..fd6da6920 100644
--- a/kdeprint/kpmarginpage.h
+++ b/kdeprint/kpmarginpage.h
@@ -29,14 +29,14 @@ class KPrinter;
class KPMarginPage : public KPrintDialogPage
{
public:
- KPMarginPage(KPrinter *prt, DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPMarginPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
- void initPageSize(const QString&, bool);
+ void initPageSize(const TQString&, bool);
private:
MarginWidget *m_margin;
diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp
index 463dd9e32..fa4b1481b 100644
--- a/kdeprint/kpposterpage.cpp
+++ b/kdeprint/kpposterpage.cpp
@@ -23,27 +23,27 @@
#include "kmfactory.h"
#include "util.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <klocale.h>
#include <knuminput.h>
#include <kiconloader.h>
-KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
+KPPosterPage::KPPosterPage( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThis5_PosterPage = i18n( " <qt> "
+ TQString whatsThis5_PosterPage = i18n( " <qt> "
" 5. "
" </qt>" );
- QString whatsThisEnablePosterPage = i18n( " <qt> "
+ TQString whatsThisEnablePosterPage = i18n( " <qt> "
" <b>Print Poster</b> (enabled or disabled). "
" <p>If you enable this option, you can print posters of different sizes "
" The printout will happen in the form <em>'tiles'</em> printed on smaller "
@@ -65,7 +65,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" </p> "
" </qt>" );
- QString whatsThisTileSelectionPosterPage = i18n( " <qt> "
+ TQString whatsThisTileSelectionPosterPage = i18n( " <qt> "
" <b>Tile Selection widget</b> "
" <p>This GUI element is <em>not only for viewing</em> your selections: it also "
" lets you interactively select the tile(s) you want to print. "
@@ -86,7 +86,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisPostersizePosterPage = i18n( " <qt> "
+ TQString whatsThisPostersizePosterPage = i18n( " <qt> "
" <b>Poster Size</b> "
" <p>Select the poster size you want from the dropdown list. </p> "
" Available sizes are all standard paper sizes up to "
@@ -105,7 +105,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisPrintsizePosterPage = i18n( " <qt> "
+ TQString whatsThisPrintsizePosterPage = i18n( " <qt> "
" <b>Paper Size</b> "
" <p>This field indicates the paper size the poster tiles will be printed on. "
" To select a different paper size for your poster tiles, go to the 'General' tab "
@@ -129,7 +129,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisCutmarginPosterPage = i18n( " <qt> "
+ TQString whatsThisCutmarginPosterPage = i18n( " <qt> "
" <b>Cut Margin selection</b> "
" <p>Slider and spinbox let you determine a <em>'cut margin'</em> which will be printed onto "
" each tile of your poster to help you cut the pieces as needed. </p>"
@@ -140,7 +140,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" keywords of its driver PPD file. </p> "
" </qt>" );
- QString whatsThisTileOrderSelectionPosterPage = i18n( " <qt> "
+ TQString whatsThisTileOrderSelectionPosterPage = i18n( " <qt> "
" <b>Order and number of tile pages to be printed</b> "
" <p>This field displays and sets the individual tiles to be printed, as well as the order "
" for their printout. </p> "
@@ -159,43 +159,43 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
setTitle( i18n( "Poster" ) );
- m_postercheck = new QCheckBox( i18n( "&Print poster" ), this );
- QWhatsThis::add(m_postercheck, whatsThisEnablePosterPage);
- QWidget *dummy = new QWidget( this );
+ m_postercheck = new TQCheckBox( i18n( "&Print poster" ), this );
+ TQWhatsThis::add(m_postercheck, whatsThisEnablePosterPage);
+ TQWidget *dummy = new TQWidget( this );
m_preview = new PosterPreview( dummy );
- QWhatsThis::add(m_preview, whatsThisTileSelectionPosterPage);
- m_postersize = new QComboBox( dummy );
- QWhatsThis::add(m_postersize, whatsThisPostersizePosterPage);
- m_printsize = new QComboBox( dummy );
- QWhatsThis::add(m_printsize, whatsThisPrintsizePosterPage);
+ TQWhatsThis::add(m_preview, whatsThisTileSelectionPosterPage);
+ m_postersize = new TQComboBox( dummy );
+ TQWhatsThis::add(m_postersize, whatsThisPostersizePosterPage);
+ m_printsize = new TQComboBox( dummy );
+ TQWhatsThis::add(m_printsize, whatsThisPrintsizePosterPage);
m_lockbtn = new KPushButton( dummy );
- //QWhatsThis::add(m_lockbtn, whatsThis5_PosterPage); //FIXME ASK_MICHAEL: which pushbutton would that be?
- m_mediasize = new QLabel( dummy );
- QWhatsThis::add(m_mediasize, whatsThisPrintsizePosterPage);
- m_mediasize->setFrameStyle( QFrame::Panel|QFrame::Sunken );
- QLabel *posterlab = new QLabel( i18n( "Poste&r size:" ), dummy );
- QWhatsThis::add(posterlab, whatsThisPostersizePosterPage);
- QLabel *medialab = new QLabel( i18n( "Media size:" ), dummy );
- QWhatsThis::add(medialab, whatsThisPrintsizePosterPage);
- QLabel *printlab = new QLabel( i18n( "Pri&nt size:" ), dummy );
- QWhatsThis::add(printlab, whatsThisPrintsizePosterPage);
+ //TQWhatsThis::add(m_lockbtn, whatsThis5_PosterPage); //FIXME ASK_MICHAEL: which pushbutton would that be?
+ m_mediasize = new TQLabel( dummy );
+ TQWhatsThis::add(m_mediasize, whatsThisPrintsizePosterPage);
+ m_mediasize->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
+ TQLabel *posterlab = new TQLabel( i18n( "Poste&r size:" ), dummy );
+ TQWhatsThis::add(posterlab, whatsThisPostersizePosterPage);
+ TQLabel *medialab = new TQLabel( i18n( "Media size:" ), dummy );
+ TQWhatsThis::add(medialab, whatsThisPrintsizePosterPage);
+ TQLabel *printlab = new TQLabel( i18n( "Pri&nt size:" ), dummy );
+ TQWhatsThis::add(printlab, whatsThisPrintsizePosterPage);
posterlab->setBuddy( m_postersize );
printlab->setBuddy( m_printsize );
m_cutmargin = new KIntNumInput( 5, dummy );
- QWhatsThis::add(m_cutmargin, whatsThisCutmarginPosterPage);
+ TQWhatsThis::add(m_cutmargin, whatsThisCutmarginPosterPage);
// xgettext:no-c-format
m_cutmargin->setLabel( i18n( "C&ut margin (% of media):" ) );
m_cutmargin->setRange( 0, 100, 2, true ); // step width was too big, changed from 10 to 2 (-kp-)
- m_selection = new QLineEdit( dummy );
- QWhatsThis::add(m_selection, whatsThisTileOrderSelectionPosterPage);
- QLabel *selectionlab = new QLabel( i18n( "&Tile pages (to be printed):" ), dummy );
- QWhatsThis::add(selectionlab, whatsThisTileOrderSelectionPosterPage);
+ m_selection = new TQLineEdit( dummy );
+ TQWhatsThis::add(m_selection, whatsThisTileOrderSelectionPosterPage);
+ TQLabel *selectionlab = new TQLabel( i18n( "&Tile pages (to be printed):" ), dummy );
+ TQWhatsThis::add(selectionlab, whatsThisTileOrderSelectionPosterPage);
selectionlab->setBuddy( m_selection );
m_lockbtn->setToggleButton( true );
m_lockbtn->setPixmap( SmallIcon( "encrypted" ) );
m_lockbtn->setOn( true );
m_lockbtn->setFixedSize( m_lockbtn->sizeHint() );
- QToolTip::add( m_lockbtn, i18n( "Link/unlink poster and print size" ) );
+ TQToolTip::add( m_lockbtn, i18n( "Link/unlink poster and print size" ) );
for ( int i=0; i<KPrinter::NPageSize-1; i++ )
{
@@ -205,15 +205,15 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
m_postersize->setCurrentItem( findIndex( KPrinter::A3 ) );
slotPosterSizeChanged( m_postersize->currentItem() );
- connect( m_postercheck, SIGNAL( toggled( bool ) ), dummy, SLOT( setEnabled( bool ) ) );
+ connect( m_postercheck, TQT_SIGNAL( toggled( bool ) ), dummy, TQT_SLOT( setEnabled( bool ) ) );
dummy->setEnabled( false );
- connect( m_postersize, SIGNAL( activated( int ) ), SLOT( slotPosterSizeChanged( int ) ) );
- connect( m_cutmargin, SIGNAL( valueChanged( int ) ), SLOT( slotMarginChanged( int ) ) );
- connect( m_lockbtn, SIGNAL( toggled( bool ) ), m_printsize, SLOT( setDisabled( bool ) ) );
+ connect( m_postersize, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotPosterSizeChanged( int ) ) );
+ connect( m_cutmargin, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotMarginChanged( int ) ) );
+ connect( m_lockbtn, TQT_SIGNAL( toggled( bool ) ), m_printsize, TQT_SLOT( setDisabled( bool ) ) );
m_printsize->setEnabled( false );
- connect( m_lockbtn, SIGNAL( toggled( bool ) ), SLOT( slotLockToggled( bool ) ) );
- connect( m_selection, SIGNAL( textChanged( const QString& ) ), m_preview, SLOT( setSelectedPages( const QString& ) ) );
- connect( m_preview, SIGNAL( selectionChanged( const QString& ) ), m_selection, SLOT( setText( const QString& ) ) );
+ connect( m_lockbtn, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotLockToggled( bool ) ) );
+ connect( m_selection, TQT_SIGNAL( textChanged( const TQString& ) ), m_preview, TQT_SLOT( setSelectedPages( const TQString& ) ) );
+ connect( m_preview, TQT_SIGNAL( selectionChanged( const TQString& ) ), m_selection, TQT_SLOT( setText( const TQString& ) ) );
if ( KMFactory::self()->settings()->application != KPrinter::Dialog
&& KMFactory::self()->settings()->application >= 0 )
@@ -223,10 +223,10 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
printlab->hide();
}
- QVBoxLayout *l0 = new QVBoxLayout( this, 0, 10 );
+ TQVBoxLayout *l0 = new TQVBoxLayout( this, 0, 10 );
l0->addWidget( m_postercheck );
l0->addWidget( dummy, 1 );
- QGridLayout *l1 = new QGridLayout( dummy, 8, 3, 0, 5 );
+ TQGridLayout *l1 = new TQGridLayout( dummy, 8, 3, 0, 5 );
l1->addWidget( posterlab, 0, 0 );
l1->addWidget( m_postersize, 0, 1 );
l1->addWidget( printlab, 1, 0 );
@@ -236,7 +236,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
l1->addMultiCellWidget( m_preview, 4, 4, 0, 2 );
l1->addMultiCellWidget( m_cutmargin, 6, 6, 0, 2 );
l1->addMultiCellWidget( m_lockbtn, 0, 1, 2, 2 );
- QHBoxLayout *l2 = new QHBoxLayout( 0, 0, 5 );
+ TQHBoxLayout *l2 = new TQHBoxLayout( 0, 0, 5 );
l1->addMultiCellLayout( l2, 7, 7, 0, 2 );
l2->addWidget( selectionlab );
l2->addWidget( m_selection );
@@ -250,9 +250,9 @@ KPPosterPage::~KPPosterPage()
{
}
-void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
+void KPPosterPage::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString ps = opts[ "PageSize" ];
+ TQString ps = opts[ "PageSize" ];
if ( ps.isEmpty() && !opts[ "kde-pagesize" ].isEmpty() )
{
ps = pageSizeToPageName( ( KPrinter::PageSize )opts[ "kde-pagesize" ].toInt() );
@@ -269,7 +269,7 @@ void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
{
m_postercheck->setChecked( true );
ps = opts[ "_kde-poster-size" ];
- QString prtsize = opts[ "kde-printsize" ];
+ TQString prtsize = opts[ "kde-printsize" ];
if ( !ps.isEmpty() )
{
m_postersize->setCurrentItem( findIndex( pageNameToPageSize( ps ) ) );
@@ -287,9 +287,9 @@ void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
m_postercheck->setChecked( false );
}
-void KPPosterPage::getOptions( QMap<QString,QString>& opts, bool )
+void KPPosterPage::getOptions( TQMap<TQString,TQString>& opts, bool )
{
- QStringList o = QStringList::split( ",", opts[ "_kde-filters" ], false );
+ TQStringList o = TQStringList::split( ",", opts[ "_kde-filters" ], false );
if ( !m_postercheck->isChecked() )
{
o.remove( "poster" );
@@ -307,8 +307,8 @@ void KPPosterPage::getOptions( QMap<QString,QString>& opts, bool )
opts[ "_kde-filters" ] = o.join( "," );
opts[ "_kde-poster-media" ] = m_mediasize->text();
opts[ "_kde-poster-size" ] = pageSizeToPageName( ( KPrinter::PageSize )page_sizes[ m_postersize->currentItem() ].ID );
- opts[ "kde-printsize" ] = QString::number( page_sizes[ m_printsize->currentItem() ].ID );
- opts[ "_kde-poster-cut" ] = QString::number( m_cutmargin->value() );
+ opts[ "kde-printsize" ] = TQString::number( page_sizes[ m_printsize->currentItem() ].ID );
+ opts[ "_kde-poster-cut" ] = TQString::number( m_cutmargin->value() );
opts[ "_kde-poster-select" ] = m_selection->text().stripWhiteSpace();
}
}
diff --git a/kdeprint/kpposterpage.h b/kdeprint/kpposterpage.h
index 2d0f77eda..0caefe717 100644
--- a/kdeprint/kpposterpage.h
+++ b/kdeprint/kpposterpage.h
@@ -34,11 +34,11 @@ class KPPosterPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPPosterPage( QWidget *parent = 0, const char *name = 0 );
+ KPPosterPage( TQWidget *parent = 0, const char *name = 0 );
~KPPosterPage();
- void setOptions( const QMap<QString,QString>& opts );
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
+ void setOptions( const TQMap<TQString,TQString>& opts );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
bool isValid();
protected slots:
@@ -47,14 +47,14 @@ protected slots:
void slotLockToggled( bool );
private:
- QComboBox *m_postersize;
- QComboBox *m_printsize;
+ TQComboBox *m_postersize;
+ TQComboBox *m_printsize;
PosterPreview *m_preview;
- QCheckBox *m_postercheck;
- QLabel *m_mediasize;
+ TQCheckBox *m_postercheck;
+ TQLabel *m_mediasize;
KIntNumInput *m_cutmargin;
- QPushButton *m_lockbtn;
- QLineEdit *m_selection;
+ TQPushButton *m_lockbtn;
+ TQLineEdit *m_selection;
};
#endif /* KPPOSTERPAGE_H */
diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp
index d3148b037..c6d19a506 100644
--- a/kdeprint/kpqtpage.cpp
+++ b/kdeprint/kpqtpage.cpp
@@ -24,12 +24,12 @@
#include "driver.h"
#include "util.h"
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -48,13 +48,13 @@
//*****************************************************************************************************
-KPQtPage::KPQtPage(QWidget *parent, const char *name)
+KPQtPage::KPQtPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
init();
}
-KPQtPage::KPQtPage(DrMain *driver, QWidget *parent, const char *name)
+KPQtPage::KPQtPage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, (driver && driver->findOption("PageSize") ? driver : 0), parent, name)
{
init();
@@ -67,7 +67,7 @@ KPQtPage::~KPQtPage()
void KPQtPage::init()
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisColorModeOtPageLabel = i18n( " <qt> "
+ TQString whatsThisColorModeOtPageLabel = i18n( " <qt> "
" <b>Selection of color mode:</b> You can choose between 2 options: "
" <ul><li><b>Color</b> and</li> "
" <li><b>Grayscale</b></li></ul> "
@@ -76,12 +76,12 @@ void KPQtPage::init()
" enough information about your print file. In this case the embedded color- or grayscale information "
" of your printfile, and the default handling of the printer take precedence. "
" </qt>" );
- QString whatsThisPageSizeOtPageLabel = i18n( " <qt> "
+ TQString whatsThisPageSizeOtPageLabel = i18n( " <qt> "
" <b>Selection of page size:</b> Select paper size to be printed on from "
" the drop-down menu. "
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. "
" </qt>" );
- QString whatsThisPagesPerSheetOtPageLabel = i18n( " <qt> "
+ TQString whatsThisPagesPerSheetOtPageLabel = i18n( " <qt> "
" <b>Selection of pages per sheet:</b> "
" You can choose to print more than one page onto each sheet of paper. "
" This is sometimes useful to save paper. "
@@ -99,7 +99,7 @@ void KPQtPage::init()
" <li> and configure it (bottom-most button on the right of the \"Filters\" tab). </li>"
" </ul>"
" </qt>" );
- QString whatsThisOrientationOtPageLabel = i18n( " <qt> "
+ TQString whatsThisOrientationOtPageLabel = i18n( " <qt> "
" <b>Selection of image orientation:</b> Orientation of the printed "
" pageimage on your paper is controlled by the radio buttons. By default, "
" the orientation is <em>Portrait</em> "
@@ -113,50 +113,50 @@ void KPQtPage::init()
setTitle(i18n("Print Format"));
// widget creation
- m_pagesize = new QComboBox(this);
- QWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel);
- QLabel *m_pagesizelabel = new QLabel(i18n("Page s&ize:"), this);
+ m_pagesize = new TQComboBox(this);
+ TQWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel);
+ QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this);
m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
m_pagesizelabel->setBuddy(m_pagesize);
- m_orientbox = new QButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
- QWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel);
- m_colorbox = new QButtonGroup(0, Qt::Vertical, i18n("Color Mode"), this);
- QWhatsThis::add(m_colorbox, whatsThisColorModeOtPageLabel);
- QRadioButton *m_portrait = new QRadioButton(i18n("&Portrait"), m_orientbox);
- QWhatsThis::add(m_portrait, whatsThisOrientationOtPageLabel);
+ m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
+ TQWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel);
+ m_colorbox = new TQButtonGroup(0, Qt::Vertical, i18n("Color Mode"), this);
+ TQWhatsThis::add(m_colorbox, whatsThisColorModeOtPageLabel);
+ QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox);
+ TQWhatsThis::add(m_portrait, whatsThisOrientationOtPageLabel);
- QRadioButton *m_landscape = new QRadioButton(i18n("&Landscape"), m_orientbox);
- QWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel);
+ QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox);
+ TQWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel);
- m_orientpix = new QLabel(m_orientbox);
+ m_orientpix = new TQLabel(m_orientbox);
m_orientpix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel);
+ TQWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel);
- QRadioButton *m_color = new QRadioButton(i18n("Colo&r"), m_colorbox);
- QWhatsThis::add(m_color, whatsThisColorModeOtPageLabel);
+ QRadioButton *m_color = new TQRadioButton(i18n("Colo&r"), m_colorbox);
+ TQWhatsThis::add(m_color, whatsThisColorModeOtPageLabel);
- QRadioButton *m_grayscale = new QRadioButton(i18n("&Grayscale"), m_colorbox);
- m_colorpix = new QLabel(m_colorbox);
+ QRadioButton *m_grayscale = new TQRadioButton(i18n("&Grayscale"), m_colorbox);
+ m_colorpix = new TQLabel(m_colorbox);
m_colorpix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel);
+ TQWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel);
- m_nupbox = new QButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
- // QWhatsThis::add(m_nupbox, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup1 = new QRadioButton("&1", m_nupbox);
- QWhatsThis::add(m_nup1, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup2 = new QRadioButton("&2", m_nupbox);
- QWhatsThis::add(m_nup2, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup4 = new QRadioButton("&4", m_nupbox);
- QWhatsThis::add(m_nup4, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nupother = new QRadioButton(i18n("Ot&her"), m_nupbox);
- QWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel);
+ m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
+ // TQWhatsThis::add(m_nupbox, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox);
+ TQWhatsThis::add(m_nup1, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox);
+ TQWhatsThis::add(m_nup2, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox);
+ TQWhatsThis::add(m_nup4, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nupother = new TQRadioButton(i18n("Ot&her"), m_nupbox);
+ TQWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel);
- m_nuppix = new QLabel(m_nupbox);
+ m_nuppix = new TQLabel(m_nupbox);
m_nuppix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel);
+ TQWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel);
// layout creation
- QGridLayout *lay0 = new QGridLayout(this, 3, 2, 0, 10);
+ QGridLayout *lay0 = new TQGridLayout(this, 3, 2, 0, 10);
lay0->setRowStretch(1,1);
lay0->setRowStretch(2,1);
lay0->addWidget(m_pagesizelabel,0,0);
@@ -164,15 +164,15 @@ void KPQtPage::init()
lay0->addWidget(m_orientbox,1,0);
lay0->addWidget(m_colorbox,1,1);
lay0->addWidget(m_nupbox,2,0);
- QGridLayout *lay1 = new QGridLayout(m_orientbox->layout(), 2, 2, 10);
+ QGridLayout *lay1 = new TQGridLayout(m_orientbox->layout(), 2, 2, 10);
lay1->addWidget(m_portrait,0,0);
lay1->addWidget(m_landscape,1,0);
lay1->addMultiCellWidget(m_orientpix,0,1,1,1);
- QGridLayout *lay2 = new QGridLayout(m_colorbox->layout(), 2, 2, 10);
+ QGridLayout *lay2 = new TQGridLayout(m_colorbox->layout(), 2, 2, 10);
lay2->addWidget(m_color,0,0);
lay2->addWidget(m_grayscale,1,0);
lay2->addMultiCellWidget(m_colorpix,0,1,1,1);
- QGridLayout *lay3 = new QGridLayout(m_nupbox->layout(), 4, 2, 5);
+ QGridLayout *lay3 = new TQGridLayout(m_nupbox->layout(), 4, 2, 5);
lay3->addWidget(m_nup1,0,0);
lay3->addWidget(m_nup2,1,0);
lay3->addWidget(m_nup4,2,0);
@@ -208,7 +208,7 @@ void KPQtPage::init()
else
{
DrListOption *lopt = static_cast<DrListOption*>(driver()->findOption("PageSize"));
- QPtrListIterator<DrBase> it(*(lopt->choices()));
+ TQPtrListIterator<DrBase> it(*(lopt->choices()));
for (; it.current(); ++it)
{
m_pagesize->insertItem(it.current()->get("text"));
@@ -218,9 +218,9 @@ void KPQtPage::init()
}
// connections
- connect(m_orientbox,SIGNAL(clicked(int)),SLOT(slotOrientationChanged(int)));
- connect(m_colorbox,SIGNAL(clicked(int)),SLOT(slotColorModeChanged(int)));
- connect(m_nupbox,SIGNAL(clicked(int)),SLOT(slotNupChanged(int)));
+ connect(m_orientbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotOrientationChanged(int)));
+ connect(m_colorbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotColorModeChanged(int)));
+ connect(m_nupbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotNupChanged(int)));
}
void KPQtPage::slotOrientationChanged(int ID)
@@ -246,7 +246,7 @@ void KPQtPage::slotNupChanged(int ID)
m_nuppix->setPixmap(UserIcon(pixstr));
}
-void KPQtPage::setOptions(const QMap<QString,QString>& opts)
+void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts)
{
int ID = (opts["kde-orientation"] == "Landscape" ? ORIENT_LANDSCAPE_ID : ORIENT_PORTRAIT_ID);
m_orientbox->setButton(ID);
@@ -296,7 +296,7 @@ void KPQtPage::setOptions(const QMap<QString,QString>& opts)
m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
}
-void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
opts["kde-orientation"] = (m_orientbox->id(m_orientbox->selected()) == ORIENT_LANDSCAPE_ID ? "Landscape" : "Portrait");
opts["kde-colormode"] = (m_colorbox->id(m_colorbox->selected()) == COLORMODE_GRAYSCALE_ID ? "GrayScale" : "Color");
@@ -313,7 +313,7 @@ void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
else
- opts["kde-pagesize"] = QString::number(page_sizes[m_pagesize->currentItem()].ID);
+ opts["kde-pagesize"] = TQString::number(page_sizes[m_pagesize->currentItem()].ID);
int ID = m_nupbox->id(m_nupbox->selected());
QString s = opts["_kde-filters"];
if (ID == NUP_1)
@@ -325,11 +325,11 @@ void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
int nup(ID == NUP_2 ? 2 : 4);
if (s.find("psnup") == -1)
{
- QStringList fl = QStringList::split(',', s, false);
+ QStringList fl = TQStringList::split(',', s, false);
KXmlCommandManager::self()->insertCommand(fl, "psnup");
s = fl.join(",");
}
- opts["_kde-psnup-nup"] = QString::number(nup);
+ opts["_kde-psnup-nup"] = TQString::number(nup);
}
opts["_kde-filters"] = s;
}
diff --git a/kdeprint/kpqtpage.h b/kdeprint/kpqtpage.h
index f71f08461..78fe34511 100644
--- a/kdeprint/kpqtpage.h
+++ b/kdeprint/kpqtpage.h
@@ -33,12 +33,12 @@ class KDEPRINT_EXPORT KPQtPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPQtPage(QWidget *parent = 0, const char *name = 0);
- KPQtPage(DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPQtPage(TQWidget *parent = 0, const char *name = 0);
+ KPQtPage(DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPQtPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotOrientationChanged(int);
diff --git a/kdeprint/kprintaction.cpp b/kdeprint/kprintaction.cpp
index ffd771da3..4e62e791b 100644
--- a/kdeprint/kprintaction.cpp
+++ b/kdeprint/kprintaction.cpp
@@ -36,24 +36,24 @@ public:
PrinterType type;
QStringList printers;
- QWidget *parentWidget;
+ TQWidget *parentWidget;
};
-KPrintAction::KPrintAction(const QString& text, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, parent, name)
{
d = new KPrintActionPrivate();
initialize(type, parentWidget);
}
-KPrintAction::KPrintAction(const QString& text, const QIconSet& icon, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, icon, parent, name)
{
d = new KPrintActionPrivate();
initialize(type, parentWidget);
}
-KPrintAction::KPrintAction(const QString& text, const QString& icon, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, icon, parent, name)
{
d = new KPrintActionPrivate();
@@ -65,10 +65,10 @@ KPrintAction::~KPrintAction()
delete d;
}
-void KPrintAction::initialize(PrinterType type, QWidget *parentWidget)
+void KPrintAction::initialize(PrinterType type, TQWidget *parentWidget)
{
- connect(popupMenu(), SIGNAL(aboutToShow()), SLOT(slotAboutToShow()));
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow()));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
d->type = type;
d->parentWidget = parentWidget;
@@ -78,10 +78,10 @@ void KPrintAction::slotAboutToShow()
{
popupMenu()->clear();
d->printers.clear();
- QPtrList<KMPrinter> *prts = KMManager::self()->printerList();
+ TQPtrList<KMPrinter> *prts = KMManager::self()->printerList();
if (prts && !prts->isEmpty())
{
- QPtrListIterator<KMPrinter> it(*prts);
+ TQPtrListIterator<KMPrinter> it(*prts);
bool first(false);
int ID(0);
for (; it.current(); ++it)
@@ -112,17 +112,17 @@ void KPrintAction::slotActivated(int ID)
}
}
-KPrintAction* KPrintAction::exportAll(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportAll(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), All, parentWidget, parent, (name ? name : "export_all"));
}
-KPrintAction* KPrintAction::exportRegular(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportRegular(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), Regular, parentWidget, parent, (name ? name : "export_regular"));
}
-KPrintAction* KPrintAction::exportSpecial(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportSpecial(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), Specials, parentWidget, parent, (name ? name : "export_special"));
}
diff --git a/kdeprint/kprintaction.h b/kdeprint/kprintaction.h
index a8408f181..eb23d6e31 100644
--- a/kdeprint/kprintaction.h
+++ b/kdeprint/kprintaction.h
@@ -30,14 +30,14 @@ class KDEPRINT_EXPORT KPrintAction : public KActionMenu
public:
enum PrinterType { All, Regular, Specials };
- KPrintAction(const QString& text, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- KPrintAction(const QString& text, const QIconSet& icon, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- KPrintAction(const QString& text, const QString& icon, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, const TQString& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
virtual ~KPrintAction();
- static KPrintAction* exportAll(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- static KPrintAction* exportRegular(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- static KPrintAction* exportSpecial(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportAll(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportRegular(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportSpecial(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
signals:
void print(KPrinter*);
@@ -47,7 +47,7 @@ protected slots:
void slotActivated(int);
protected:
- void initialize(PrinterType type, QWidget *parentWidget);
+ void initialize(PrinterType type, TQWidget *parentWidget);
private:
class KPrintActionPrivate;
diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp
index 3570393bb..c84472677 100644
--- a/kdeprint/kprintdialog.cpp
+++ b/kdeprint/kprintdialog.cpp
@@ -37,19 +37,19 @@
#include "treecombobox.h"
#include "messagewindow.h"
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
-#include <qdir.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqdir.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -83,33 +83,33 @@ public:
QCheckBox *m_persistent;
bool m_reduced;
- QPtrList<KPrintDialogPage> m_pages;
+ TQPtrList<KPrintDialogPage> m_pages;
KPrinter *m_printer;
bool b_optionsEnabled;
bool b_propertiesEnabled;
bool b_systemEnabled;
};
-KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
+KPrintDialog::KPrintDialog(TQWidget *parent, const char *name)
: KDialog(parent,name,true)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisLocationLabel = i18n( " <qt><b>Printer Location:</b> The <em>Location</em> may describe where the"
+ TQString whatsThisLocationLabel = i18n( " <qt><b>Printer Location:</b> The <em>Location</em> may describe where the"
" selected printer is located. The Location description is created"
" by the administrator of the print system (or may be"
" left empty)."
" </qt>" );
- QString whatsThisPrinterType = i18n( " <qt><b>Printer Type:</b> The <em>Type</em> indicates your printer type."
+ TQString whatsThisPrinterType = i18n( " <qt><b>Printer Type:</b> The <em>Type</em> indicates your printer type."
" </qt>" );
- QString whatsThisPrinterState = i18n( " <qt><b>Printer State:</b> The <em>State</em> indicates the state of the"
+ TQString whatsThisPrinterState = i18n( " <qt><b>Printer State:</b> The <em>State</em> indicates the state of the"
" print queue on the print server (which could be your localhost). The"
" state may be 'Idle', 'Processing', 'Stopped', 'Paused' or similar."
" </qt>" );
- QString whatsThisPrinterComment = i18n( " <qt><b>Printer Comment:</b> The <em>Comment</em> may describe the selected"
+ TQString whatsThisPrinterComment = i18n( " <qt><b>Printer Comment:</b> The <em>Comment</em> may describe the selected"
" printer. This comment is created by the administrator"
" of the print system (or may be left empty)."
" </qt>" );
- QString whatsThisPrinterSelect = i18n( " <qt><b>Printer Selection Menu:</b> "
+ TQString whatsThisPrinterSelect = i18n( " <qt><b>Printer Selection Menu:</b> "
" <p>Use this combo box to select the printer to which you want to print."
" Initially (if you run KDEPrint for the first time), you may only find the "
" <em>KDE special printers</em> (which save"
@@ -134,11 +134,11 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" can be made through a selection in the drop-down menu at bottom of this dialog when "
" fully expanded). </p> "
" </qt>" );
- QString whatsThisPrintJobProperties = i18n( " <qt><b>Print Job Properties:</b> "
+ TQString whatsThisPrintJobProperties = i18n( " <qt><b>Print Job Properties:</b> "
" <p>This button opens a dialog where you can make decisions"
" regarding all supported print job options."
" </qt>" );
- QString whatsThisPrinterFilter = i18n( " <qt><b>Selective View on List of Printers:</b>"
+ TQString whatsThisPrinterFilter = i18n( " <qt><b>Selective View on List of Printers:</b>"
" <p> This button reduces the list of visible printers"
" to a shorter, more convenient, pre-defined list.</p>"
" <p>This is particularly useful in enterprise environments"
@@ -151,7 +151,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" <em>'selective view list'</em> will make all printers dissappear from the "
" view. (To re-enable all printers, just click this button again.) </p> "
" </qt>" );
- QString whatsThisAddPrinterWizard = i18n( "<qt><b>KDE Add Printer Wizard</b>"
+ TQString whatsThisAddPrinterWizard = i18n( "<qt><b>KDE Add Printer Wizard</b>"
" <p>This button starts the <em>KDE Add Printer Wizard</em>.</p>"
" <p>Use the Wizard (with <em>\"CUPS\"</em> or <em>\"RLPR\"</em>) to add locally"
" defined printers to your system. </p>"
@@ -160,14 +160,14 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" <em>\"Generic LPD</em>\", <em>\"LPRng\"</em>, or <em>\"Print Through "
" an External Program</em>\".) </p> "
" </qt>" );
- QString whatsThisExternalPrintCommand = i18n( " <qt><b>External Print Command</b>"
+ TQString whatsThisExternalPrintCommand = i18n( " <qt><b>External Print Command</b>"
" <p>Here you can enter any command that would also print for you in "
" a <em>konsole</em> window. </p>"
" <b>Example:</b> <pre>a2ps -P &lt;printername&gt; --medium=A3</pre>."
" </qt>" );
- QString whatsThisOptions = i18n( " <qt><b>Additional Print Job Options</b>"
+ TQString whatsThisOptions = i18n( " <qt><b>Additional Print Job Options</b>"
" <p>This button shows or hides additional printing options.</qt>" );
- QString whatsThisSystemOptions = i18n( " <qt><b>System Options:</b> "
+ TQString whatsThisSystemOptions = i18n( " <qt><b>System Options:</b> "
" <p>This button starts a new dialog where you can adjust various"
" settings of your printing system. Amongst them:"
" <ul><li> Should KDE"
@@ -179,21 +179,21 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" </ul> and many more.... "
" </qt>" );
- QString whatsThisHelpButton = i18n( " <qt><b>Help:</b> This button takes you to the complete <em>KDEPrint"
+ TQString whatsThisHelpButton = i18n( " <qt><b>Help:</b> This button takes you to the complete <em>KDEPrint"
" Manual</em>."
" </qt>" );
- QString whatsThisCancelButton = i18n( " <qt><b>Cancel:</b> This button cancels your print job and quits the"
+ TQString whatsThisCancelButton = i18n( " <qt><b>Cancel:</b> This button cancels your print job and quits the"
" kprinter dialog."
" </qt>" );
- QString whatsThisPrintButton = i18n( " <qt><b>Print:</b> This button sends the job to the printing process."
+ TQString whatsThisPrintButton = i18n( " <qt><b>Print:</b> This button sends the job to the printing process."
" If you are sending non-PostScript files, you may be"
" asked if you want KDE to convert the files into PostScript,"
" or if you want your print subsystem (like CUPS) to do this."
" </qt>" );
- QString whatsThisKeepDialogOpenCheckbox = i18n( " <qt><b>Keep Printing Dialog Open</b>"
+ TQString whatsThisKeepDialogOpenCheckbox = i18n( " <qt><b>Keep Printing Dialog Open</b>"
"<p>If you enable this checkbox, the printing dialog"
" stays open after you hit the <em>Print</em> button.</p>"
" <p> This is"
@@ -203,7 +203,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" the other) to have it finished more quickly.</p>"
" </qt>" );
- QString whatsThisOutputFileLabel = i18n(" <qt><b>Output File Name and Path:</b> The \"Output file:\" shows "
+ TQString whatsThisOutputFileLabel = i18n(" <qt><b>Output File Name and Path:</b> The \"Output file:\" shows "
" you where your file will be"
" saved if you decide to \"Print to File\" your job, using one of the"
" KDE <em>Special Printers</em> named \"Print to File (PostScript)\""
@@ -211,18 +211,18 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" your need by using the button and/or editing the line on the right."
" </qt>" );
- QString whatsThisOutputFileLineedit = i18n(" <qt><b>Output File Name and Path:</b> Edit this line to create a "
+ TQString whatsThisOutputFileLineedit = i18n(" <qt><b>Output File Name and Path:</b> Edit this line to create a "
" path and filename that suits your needs."
" (Button and Lineedit field are only available if you \"Print to File\")"
" </qt>" );
- QString whatsThisOutputFileButton = i18n(" <qt><b>Browse Directories button:<b> This button calls "
+ TQString whatsThisOutputFileButton = i18n(" <qt><b>Browse Directories button:<b> This button calls "
" the \"File Open / Browsed Directories\" dialog to let you"
" choose a directory and file name where your \"Print-to-File\""
" job should be saved."
" </qt>" );
- QString whatsThisAddFileButton = i18n( " <qt><b>Add File to Job</b>"
+ TQString whatsThisAddFileButton = i18n( " <qt><b>Add File to Job</b>"
" <p>This button calls the \"File Open / Browse Directories\" dialog to allow you"
" to select a file for printing. Note, that "
" <ul><li>you can select ASCII or International Text, PDF,"
@@ -234,7 +234,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisPreviewCheckBox = i18n(" <qt><b>Print Preview</b>"
+ TQString whatsThisPreviewCheckBox = i18n(" <qt><b>Print Preview</b>"
" Enable this checkbox if you want to see a preview of"
" your printout. A preview lets you check if, for instance,"
" your intended \"poster\" or \"pamphlet\" layout"
@@ -247,7 +247,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" Firefox or OpenOffice), print preview is not available here. "
" </qt>" );
- QString whatsThisSetDefaultPrinter = i18n(" <qt><b>Set as Default Printer</b>"
+ TQString whatsThisSetDefaultPrinter = i18n(" <qt><b>Set as Default Printer</b>"
" This button sets the current printer as the user's"
" default. "
" <p><b>Note:</b> (Button is only visible if the checkbox for "
@@ -262,98 +262,98 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
setCaption(i18n("Print"));
// widget creation
- QGroupBox *m_pbox = new QGroupBox(0,Qt::Vertical,i18n("Printer"), this);
- d->m_type = new QLabel(m_pbox);
- QWhatsThis::add(d->m_type, whatsThisPrinterType);
- d->m_state = new QLabel(m_pbox);
- QWhatsThis::add(d->m_state, whatsThisPrinterState);
- d->m_comment = new QLabel(m_pbox);
- QWhatsThis::add(d->m_comment, whatsThisPrinterComment);
- d->m_location = new QLabel(m_pbox);
- QWhatsThis::add(d->m_location, whatsThisLocationLabel);
+ QGroupBox *m_pbox = new TQGroupBox(0,Qt::Vertical,i18n("Printer"), this);
+ d->m_type = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_type, whatsThisPrinterType);
+ d->m_state = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_state, whatsThisPrinterState);
+ d->m_comment = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_comment, whatsThisPrinterComment);
+ d->m_location = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_location, whatsThisLocationLabel);
d->m_printers = new TreeComboBox(m_pbox);
- QWhatsThis::add(d->m_printers, whatsThisPrinterSelect);
+ TQWhatsThis::add(d->m_printers, whatsThisPrinterSelect);
d->m_printers->setMinimumHeight(25);
- QLabel *m_printerlabel = new QLabel(i18n("&Name:"), m_pbox);
- QWhatsThis::add(m_printerlabel, whatsThisPrinterSelect);
- QLabel *m_statelabel = new QLabel(i18n("Status", "State:"), m_pbox);
- QWhatsThis::add(m_statelabel, whatsThisPrinterState);
- QLabel *m_typelabel = new QLabel(i18n("Type:"), m_pbox);
- QWhatsThis::add(m_typelabel, whatsThisPrinterType);
- QLabel *m_locationlabel = new QLabel(i18n("Location:"), m_pbox);
- QWhatsThis::add(m_locationlabel, whatsThisLocationLabel);
- QLabel *m_commentlabel = new QLabel(i18n("Comment:"), m_pbox);
- QWhatsThis::add(m_commentlabel, whatsThisPrinterComment);
+ QLabel *m_printerlabel = new TQLabel(i18n("&Name:"), m_pbox);
+ TQWhatsThis::add(m_printerlabel, whatsThisPrinterSelect);
+ QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), m_pbox);
+ TQWhatsThis::add(m_statelabel, whatsThisPrinterState);
+ QLabel *m_typelabel = new TQLabel(i18n("Type:"), m_pbox);
+ TQWhatsThis::add(m_typelabel, whatsThisPrinterType);
+ QLabel *m_locationlabel = new TQLabel(i18n("Location:"), m_pbox);
+ TQWhatsThis::add(m_locationlabel, whatsThisLocationLabel);
+ QLabel *m_commentlabel = new TQLabel(i18n("Comment:"), m_pbox);
+ TQWhatsThis::add(m_commentlabel, whatsThisPrinterComment);
m_printerlabel->setBuddy(d->m_printers);
d->m_properties = new KPushButton(KGuiItem(i18n("P&roperties"), "edit"), m_pbox);
- QWhatsThis::add( d->m_properties, whatsThisPrintJobProperties);
+ TQWhatsThis::add( d->m_properties, whatsThisPrintJobProperties);
d->m_options = new KPushButton(KGuiItem(i18n("System Op&tions"), "kdeprint_configmgr"), this);
- QWhatsThis::add(d->m_options,whatsThisSystemOptions);
+ TQWhatsThis::add(d->m_options,whatsThisSystemOptions);
d->m_default = new KPushButton(KGuiItem(i18n("Set as &Default"), "kdeprint_defaultsoft"), m_pbox);
- QWhatsThis::add(d->m_default,whatsThisSetDefaultPrinter);
- d->m_filter = new QPushButton(m_pbox);
+ TQWhatsThis::add(d->m_default,whatsThisSetDefaultPrinter);
+ d->m_filter = new TQPushButton(m_pbox);
d->m_filter->setPixmap(SmallIcon("filter"));
- d->m_filter->setMinimumSize(QSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
+ d->m_filter->setMinimumSize(TQSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
d->m_filter->setToggleButton(true);
d->m_filter->setOn(KMManager::self()->isFilterEnabled());
- QToolTip::add(d->m_filter, i18n("Toggle selective view on printer list"));
- QWhatsThis::add(d->m_filter, whatsThisPrinterFilter);
- d->m_wizard = new QPushButton(m_pbox);
+ TQToolTip::add(d->m_filter, i18n("Toggle selective view on printer list"));
+ TQWhatsThis::add(d->m_filter, whatsThisPrinterFilter);
+ d->m_wizard = new TQPushButton(m_pbox);
d->m_wizard->setPixmap(SmallIcon("wizard"));
- d->m_wizard->setMinimumSize(QSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
- QToolTip::add(d->m_wizard, i18n("Add printer..."));
- QWhatsThis::add(d->m_wizard, whatsThisAddPrinterWizard);
+ d->m_wizard->setMinimumSize(TQSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
+ TQToolTip::add(d->m_wizard, i18n("Add printer..."));
+ TQWhatsThis::add(d->m_wizard, whatsThisAddPrinterWizard);
d->m_ok = new KPushButton(KGuiItem(i18n("&Print"), "fileprint"), this);
- QWhatsThis::add( d->m_ok, whatsThisPrintButton);
+ TQWhatsThis::add( d->m_ok, whatsThisPrintButton);
d->m_ok->setDefault(true);
d->m_ok->setEnabled( false );
QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- QWhatsThis::add(m_cancel, whatsThisCancelButton);
- d->m_preview = new QCheckBox(i18n("Previe&w"), m_pbox);
- QWhatsThis::add(d->m_preview, whatsThisPreviewCheckBox);
- d->m_filelabel = new QLabel(i18n("O&utput file:"), m_pbox);
- QWhatsThis::add(d->m_filelabel,whatsThisOutputFileLabel);
- d->m_file = new KURLRequester(QDir::homeDirPath()+"/print.ps", m_pbox);
- QWhatsThis::add(d->m_file,whatsThisOutputFileLineedit);
+ TQWhatsThis::add(m_cancel, whatsThisCancelButton);
+ d->m_preview = new TQCheckBox(i18n("Previe&w"), m_pbox);
+ TQWhatsThis::add(d->m_preview, whatsThisPreviewCheckBox);
+ d->m_filelabel = new TQLabel(i18n("O&utput file:"), m_pbox);
+ TQWhatsThis::add(d->m_filelabel,whatsThisOutputFileLabel);
+ d->m_file = new KURLRequester(TQDir::homeDirPath()+"/print.ps", m_pbox);
+ TQWhatsThis::add(d->m_file,whatsThisOutputFileLineedit);
d->m_file->setEnabled(false);
d->m_filelabel->setBuddy(d->m_file);
- d->m_cmdlabel = new QLabel(i18n("Print co&mmand:"), m_pbox);
- QWhatsThis::add( d->m_cmdlabel, whatsThisExternalPrintCommand);
+ d->m_cmdlabel = new TQLabel(i18n("Print co&mmand:"), m_pbox);
+ TQWhatsThis::add( d->m_cmdlabel, whatsThisExternalPrintCommand);
- d->m_cmd = new QLineEdit(m_pbox);
- QWhatsThis::add( d->m_cmd, whatsThisExternalPrintCommand);
+ d->m_cmd = new TQLineEdit(m_pbox);
+ TQWhatsThis::add( d->m_cmd, whatsThisExternalPrintCommand);
d->m_cmdlabel->setBuddy(d->m_cmd);
- d->m_dummy = new QVBox(this);
+ d->m_dummy = new TQVBox(this);
d->m_plugin = new PluginComboBox(this);
d->m_extbtn = new KPushButton(this);
- QToolTip::add(d->m_extbtn, i18n("Show/hide advanced options"));
- QWhatsThis::add(d->m_extbtn, whatsThisOptions);
- d->m_persistent = new QCheckBox(i18n("&Keep this dialog open after printing"), this);
- QWhatsThis::add( d->m_persistent, whatsThisKeepDialogOpenCheckbox);
+ TQToolTip::add(d->m_extbtn, i18n("Show/hide advanced options"));
+ TQWhatsThis::add(d->m_extbtn, whatsThisOptions);
+ d->m_persistent = new TQCheckBox(i18n("&Keep this dialog open after printing"), this);
+ TQWhatsThis::add( d->m_persistent, whatsThisKeepDialogOpenCheckbox);
QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this);
- QWhatsThis::add( m_help, whatsThisHelpButton);
-
- QWidget::setTabOrder( d->m_printers, d->m_filter );
- QWidget::setTabOrder( d->m_filter, d->m_wizard );
- QWidget::setTabOrder( d->m_wizard, d->m_properties );
- QWidget::setTabOrder( d->m_properties, d->m_preview );
- QWidget::setTabOrder( d->m_preview, d->m_file );
- QWidget::setTabOrder( d->m_file, d->m_cmd );
- QWidget::setTabOrder( d->m_plugin, d->m_persistent );
- QWidget::setTabOrder( d->m_persistent, d->m_extbtn );
- QWidget::setTabOrder( d->m_extbtn, d->m_options );
- QWidget::setTabOrder( d->m_options, m_help );
- QWidget::setTabOrder( m_help, d->m_ok );
- QWidget::setTabOrder( d->m_ok, m_cancel );
+ TQWhatsThis::add( m_help, whatsThisHelpButton);
+
+ TQWidget::setTabOrder( d->m_printers, d->m_filter );
+ TQWidget::setTabOrder( d->m_filter, d->m_wizard );
+ TQWidget::setTabOrder( d->m_wizard, d->m_properties );
+ TQWidget::setTabOrder( d->m_properties, d->m_preview );
+ TQWidget::setTabOrder( d->m_preview, d->m_file );
+ TQWidget::setTabOrder( d->m_file, d->m_cmd );
+ TQWidget::setTabOrder( d->m_plugin, d->m_persistent );
+ TQWidget::setTabOrder( d->m_persistent, d->m_extbtn );
+ TQWidget::setTabOrder( d->m_extbtn, d->m_options );
+ TQWidget::setTabOrder( d->m_options, m_help );
+ TQWidget::setTabOrder( m_help, d->m_ok );
+ TQWidget::setTabOrder( d->m_ok, m_cancel );
// layout creation
- QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(this, 10, 10);
l1->addWidget(m_pbox,0);
l1->addWidget(d->m_dummy,1);
l1->addWidget(d->m_plugin,0);
l1->addWidget(d->m_persistent);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10);
l1->addLayout(l2);
l2->addWidget(d->m_extbtn,0);
l2->addWidget(d->m_options,0);
@@ -361,17 +361,17 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l2->addStretch(1);
l2->addWidget(d->m_ok,0);
l2->addWidget(m_cancel,0);
- QGridLayout *l3 = new QGridLayout(m_pbox->layout(),3,3,7);
+ QGridLayout *l3 = new TQGridLayout(m_pbox->layout(),3,3,7);
l3->setColStretch(1,1);
l3->setRowStretch(0,1);
- QGridLayout *l4 = new QGridLayout(0, 5, 2, 0, 5);
+ QGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5);
l3->addMultiCellLayout(l4,0,0,0,1);
l4->addWidget(m_printerlabel,0,0);
l4->addWidget(m_statelabel,1,0);
l4->addWidget(m_typelabel,2,0);
l4->addWidget(m_locationlabel,3,0);
l4->addWidget(m_commentlabel,4,0);
- QHBoxLayout *ll4 = new QHBoxLayout(0, 0, 3);
+ QHBoxLayout *ll4 = new TQHBoxLayout(0, 0, 3);
l4->addLayout(ll4,0,1);
ll4->addWidget(d->m_printers,1);
ll4->addWidget(d->m_filter,0);
@@ -382,7 +382,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l4->addWidget(d->m_location,3,1);
l4->addWidget(d->m_comment,4,1);
l4->setColStretch(1,1);
- QVBoxLayout *l5 = new QVBoxLayout(0, 0, 10);
+ QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10);
l3->addLayout(l5,0,2);
l5->addWidget(d->m_properties,0);
l5->addWidget(d->m_default,0);
@@ -396,19 +396,19 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l3->addMultiCellWidget(d->m_cmd,2,2,1,2);
// connections
- connect(d->m_ok,SIGNAL(clicked()),SLOT(accept()));
- connect(m_cancel,SIGNAL(clicked()),SLOT(reject()));
- connect(d->m_properties,SIGNAL(clicked()),SLOT(slotProperties()));
- connect(d->m_default,SIGNAL(clicked()),SLOT(slotSetDefault()));
- connect(d->m_printers,SIGNAL(activated(int)),SLOT(slotPrinterSelected(int)));
- connect(d->m_options,SIGNAL(clicked()),SLOT(slotOptions()));
- connect(d->m_wizard,SIGNAL(clicked()),SLOT(slotWizard()));
- connect(d->m_extbtn, SIGNAL(clicked()), SLOT(slotExtensionClicked()));
- connect(d->m_filter, SIGNAL(toggled(bool)), SLOT(slotToggleFilter(bool)));
- connect(m_help, SIGNAL(clicked()), SLOT(slotHelp()));
- connect(d->m_file, SIGNAL(urlSelected(const QString&)), SLOT(slotOutputFileSelected(const QString&)));
- connect( d->m_file, SIGNAL( openFileDialog( KURLRequester* ) ), SLOT( slotOpenFileDialog() ) );
- connect( KMFactory::self()->manager(), SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect(d->m_ok,TQT_SIGNAL(clicked()),TQT_SLOT(accept()));
+ connect(m_cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()));
+ connect(d->m_properties,TQT_SIGNAL(clicked()),TQT_SLOT(slotProperties()));
+ connect(d->m_default,TQT_SIGNAL(clicked()),TQT_SLOT(slotSetDefault()));
+ connect(d->m_printers,TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int)));
+ connect(d->m_options,TQT_SIGNAL(clicked()),TQT_SLOT(slotOptions()));
+ connect(d->m_wizard,TQT_SIGNAL(clicked()),TQT_SLOT(slotWizard()));
+ connect(d->m_extbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotExtensionClicked()));
+ connect(d->m_filter, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));
+ connect(m_help, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()));
+ connect(d->m_file, TQT_SIGNAL(urlSelected(const TQString&)), TQT_SLOT(slotOutputFileSelected(const TQString&)));
+ connect( d->m_file, TQT_SIGNAL( openFileDialog( KURLRequester* ) ), TQT_SLOT( slotOpenFileDialog() ) );
+ connect( KMFactory::self()->manager(), TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
d->b_optionsEnabled = kapp->authorize("print/options") && kapp->authorize("print/selection");
d->b_propertiesEnabled = kapp->authorize("print/properties") && kapp->authorize("print/selection");
@@ -473,28 +473,28 @@ void KPrintDialog::setFlags(int f)
d->m_wizard->setEnabled((mgr->hasManagement() && (mgr->printerOperationMask() & KMManager::PrinterCreation)));
}
-void KPrintDialog::setDialogPages(QPtrList<KPrintDialogPage> *pages)
+void KPrintDialog::setDialogPages(TQPtrList<KPrintDialogPage> *pages)
{
if (!pages) return;
if (pages->count() + d->m_pages.count() == 1)
{
// only one page, reparent the page to d->m_dummy and remove any
- // QTabWidget child if any.
+ // TQTabWidget child if any.
if (pages->count() > 0)
d->m_pages.append(pages->take(0));
- d->m_pages.first()->reparent(d->m_dummy, QPoint(0,0));
+ d->m_pages.first()->reparent(d->m_dummy, TQPoint(0,0));
d->m_pages.first()->show();
- delete d->m_dummy->child("TabWidget", "QTabWidget");
+ delete d->m_dummy->child("TabWidget", "TQTabWidget");
}
else
{
// more than one page.
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
if (!tabs)
{
- // QTabWidget doesn't exist. Create it and reparent all
+ // TQTabWidget doesn't exist. Create it and reparent all
// already existing pages.
- tabs = new QTabWidget(d->m_dummy, "TabWidget");
+ tabs = new TQTabWidget(d->m_dummy, "TabWidget");
tabs->setMargin(10);
for (d->m_pages.first(); d->m_pages.current(); d->m_pages.next())
{
@@ -512,7 +512,7 @@ void KPrintDialog::setDialogPages(QPtrList<KPrintDialogPage> *pages)
d->m_extbtn->setEnabled(d->m_pages.count() > 0);
}
-KPrintDialog* KPrintDialog::printerDialog(KPrinter *printer, QWidget *parent, const QString& caption, bool forceExpand)
+KPrintDialog* KPrintDialog::printerDialog(KPrinter *printer, TQWidget *parent, const TQString& caption, bool forceExpand)
{
if (printer)
{
@@ -543,7 +543,7 @@ void KPrintDialog::initialize(KPrinter *printer)
d->m_printer = printer;
// first retrieve printer list and update combo box (get default or last used printer also)
- QPtrList<KMPrinter> *plist = KMFactory::self()->manager()->printerList();
+ TQPtrList<KMPrinter> *plist = KMFactory::self()->manager()->printerList();
if (!KMManager::self()->errorMsg().isEmpty())
{
KMessageBox::error(parentWidget(),
@@ -556,7 +556,7 @@ void KPrintDialog::initialize(KPrinter *printer)
{
QString oldP = d->m_printers->currentText();
d->m_printers->clear();
- QPtrListIterator<KMPrinter> it(*plist);
+ TQPtrListIterator<KMPrinter> it(*plist);
int defsoft(-1), defhard(-1), defsearch(-1);
bool sep(false);
for (;it.current();++it)
@@ -568,7 +568,7 @@ void KPrintDialog::initialize(KPrinter *printer)
if (!sep && it.current()->isSpecial())
{
sep = true;
- d->m_printers->insertItem(QPixmap(), QString::fromLatin1("--------"));
+ d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------"));
}
d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay)),it.current()->name(),false/*sep*/);
if (it.current()->isSoftDefault())
@@ -599,7 +599,7 @@ void KPrintDialog::initialize(KPrinter *printer)
d->m_preview->setChecked(true);
d->m_preview->setEnabled(!d->m_printer->previewOnly());
d->m_cmd->setText(d->m_printer->option("kde-printcommand"));
- QPtrListIterator<KPrintDialogPage> it(d->m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(d->m_pages);
for (;it.current();++it)
it.current()->setOptions(d->m_printer->options());
}
@@ -607,10 +607,10 @@ void KPrintDialog::initialize(KPrinter *printer)
void KPrintDialog::slotPrinterSelected(int index)
{
bool ok(false);
- d->m_location->setText(QString::null);
- d->m_state->setText(QString::null);
- d->m_comment->setText(QString::null);
- d->m_type->setText(QString::null);
+ d->m_location->setText(TQString::null);
+ d->m_state->setText(TQString::null);
+ d->m_comment->setText(TQString::null);
+ d->m_type->setText(TQString::null);
if (index >= 0 && index < d->m_printers->count())
{
KMManager *mgr = KMFactory::self()->manager();
@@ -654,12 +654,12 @@ void KPrintDialog::done(int result)
{
if (result == Accepted && d->m_printer)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
KMPrinter *prt(0);
// get options from global pages
QString msg;
- QPtrListIterator<KPrintDialogPage> it(d->m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(d->m_pages);
for (;it.current();++it)
if (it.current()->isEnabled())
{
@@ -692,8 +692,8 @@ void KPrintDialog::done(int result)
opts["kde-special-command"] = prt->option("kde-special-command");
// merge options with KMPrinter object options
- QMap<QString,QString> popts = (prt->isEdited() ? prt->editedOptions() : prt->defaultOptions());
- for (QMap<QString,QString>::ConstIterator it=popts.begin(); it!=popts.end(); ++it)
+ TQMap<TQString,TQString> popts = (prt->isEdited() ? prt->editedOptions() : prt->defaultOptions());
+ for (TQMap<TQString,TQString>::ConstIterator it=popts.begin(); it!=popts.end(); ++it)
opts[it.key()] = it.data();
// update KPrinter object
@@ -730,7 +730,7 @@ bool KPrintDialog::checkOutputFile()
{
//value = (KMessageBox::warningYesNo(this,i18n("File \"%1\" already exists. Overwrite?").arg(f.absFilePath())) == KMessageBox::Yes);
time_t mtimeDest = f.lastModified().toTime_t();
- KIO::RenameDlg dlg( this, i18n( "Print" ), QString::null, d->m_file->url(),
+ KIO::RenameDlg dlg( this, i18n( "Print" ), TQString::null, d->m_file->url(),
KIO::M_OVERWRITE, ( time_t ) -1, f.size(), ( time_t ) -1, f.created().toTime_t() , mtimeDest+1, mtimeDest, true );
int result = dlg.exec();
switch ( result )
@@ -755,7 +755,7 @@ bool KPrintDialog::checkOutputFile()
}
else
{
- QFileInfo d( f.dirPath( true ) );
+ TQFileInfo d( f.dirPath( true ) );
if ( !d.exists() )
KMessageBox::error( this, i18n( "The output directory does not exist." ) );
else if ( !d.isWritable() )
@@ -794,12 +794,12 @@ void KPrintDialog::enableSpecial(bool on)
d->m_pages.current()->setEnabled(!on);
}
-void KPrintDialog::setOutputFileExtension(const QString& ext)
+void KPrintDialog::setOutputFileExtension(const TQString& ext)
{
if (!ext.isEmpty())
{
KURL url( d->m_file->url() );
- QString f( url.fileName() );
+ TQString f( url.fileName() );
int p = f.findRev( '.' );
// change "file.ext"; don't change "file", "file." or ".file" but do change ".file.ext"
if ( p > 0 && p != int (f.length () - 1) )
@@ -822,7 +822,7 @@ void KPrintDialog::slotWizard()
void KPrintDialog::reload()
{
// remove printer dependent pages (usually from plugin)
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
for (uint i=0; i<d->m_pages.count(); i++)
if (d->m_pages.at(i)->onlyRealPrinters())
{
@@ -832,7 +832,7 @@ void KPrintDialog::reload()
delete page;
}
// reload printer dependent pages from plugin
- QPtrList<KPrintDialogPage> pages;
+ TQPtrList<KPrintDialogPage> pages;
pages.setAutoDelete(false);
KMFactory::self()->uiManager()->setupPrintDialogPages(&pages);
// add those pages to the dialog
@@ -841,7 +841,7 @@ void KPrintDialog::reload()
d->m_dummy->show();
// other initializations
setFlags(KMFactory::self()->uiManager()->dialogFlags());
- connect( KMFactory::self()->manager(), SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect( KMFactory::self()->manager(), TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
init();
}
@@ -914,10 +914,10 @@ void KPrintDialog::slotToggleFilter(bool on)
void KPrintDialog::slotHelp()
{
- kapp->invokeHelp(QString::null, "kdeprint");
+ kapp->invokeHelp(TQString::null, "kdeprint");
}
-void KPrintDialog::slotOutputFileSelected(const QString& txt)
+void KPrintDialog::slotOutputFileSelected(const TQString& txt)
{
d->m_file->setURL( txt );
}
@@ -951,7 +951,7 @@ void KPrintDialog::enableDialogPage( int index, bool flag )
if ( d->m_pages.count() > 1 )
{
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
tabs->setTabEnabled( d->m_pages.at( index ), flag );
}
else
@@ -974,7 +974,7 @@ void KPrintDialog::slotOpenFileDialog()
if (!mimetype.isEmpty())
{
- QStringList filter;
+ TQStringList filter;
filter << mimetype;
filter << "all/allfiles";
dialog->setMimeFilter (filter, mimetype);
diff --git a/kdeprint/kprintdialog.h b/kdeprint/kprintdialog.h
index 4182ebb82..0e4adfd64 100644
--- a/kdeprint/kprintdialog.h
+++ b/kdeprint/kprintdialog.h
@@ -25,7 +25,7 @@
#endif
#include <kdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdeprint/kpreloadobject.h>
class KPrinter;
@@ -42,15 +42,15 @@ class KDEPRINT_EXPORT KPrintDialog : public KDialog, public KPReloadObject
{
Q_OBJECT
public:
- KPrintDialog(QWidget *parent = 0, const char *name = 0);
+ KPrintDialog(TQWidget *parent = 0, const char *name = 0);
~KPrintDialog();
void setFlags(int f);
- void setDialogPages(QPtrList<KPrintDialogPage> *pages);
+ void setDialogPages(TQPtrList<KPrintDialogPage> *pages);
void enableDialogPage( int index, bool flag = true );
KPrinter* printer() const;
- static KPrintDialog* printerDialog(KPrinter*, QWidget*, const QString& caption = QString::null, bool forceExpand = false);
+ static KPrintDialog* printerDialog(KPrinter*, TQWidget*, const TQString& caption = TQString::null, bool forceExpand = false);
signals:
void printRequested(KPrinter*);
@@ -65,7 +65,7 @@ protected slots:
void slotExtensionClicked();
void slotToggleFilter(bool);
void slotHelp();
- void slotOutputFileSelected(const QString&);
+ void slotOutputFileSelected(const TQString&);
void slotUpdatePossible( bool );
void slotOpenFileDialog();
@@ -73,7 +73,7 @@ protected:
bool checkOutputFile();
void enableSpecial(bool on);
void enableOutputFile(bool on);
- void setOutputFileExtension(const QString&);
+ void setOutputFileExtension(const TQString&);
void reload();
void configChanged();
void expandDialog(bool on = true);
diff --git a/kdeprint/kprintdialogpage.cpp b/kdeprint/kprintdialogpage.cpp
index b49011487..0bd860623 100644
--- a/kdeprint/kprintdialogpage.cpp
+++ b/kdeprint/kprintdialogpage.cpp
@@ -20,13 +20,13 @@
#include "kprintdialogpage.h"
-KPrintDialogPage::KPrintDialogPage(QWidget *parent, const char *name)
-: QWidget(parent,name), m_printer(0), m_driver(0), m_ID(0), m_onlyreal(false)
+KPrintDialogPage::KPrintDialogPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name), m_printer(0), m_driver(0), m_ID(0), m_onlyreal(false)
{
}
-KPrintDialogPage::KPrintDialogPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const char *name)
-: QWidget(parent,name), m_printer(pr), m_driver(dr), m_ID(0), m_onlyreal(false)
+KPrintDialogPage::KPrintDialogPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const char *name)
+: TQWidget(parent,name), m_printer(pr), m_driver(dr), m_ID(0), m_onlyreal(false)
{
}
@@ -34,15 +34,15 @@ KPrintDialogPage::~KPrintDialogPage()
{
}
-void KPrintDialogPage::setOptions(const QMap<QString,QString>&)
+void KPrintDialogPage::setOptions(const TQMap<TQString,TQString>&)
{
}
-void KPrintDialogPage::getOptions(QMap<QString,QString>&, bool)
+void KPrintDialogPage::getOptions(TQMap<TQString,TQString>&, bool)
{
}
-bool KPrintDialogPage::isValid(QString&)
+bool KPrintDialogPage::isValid(TQString&)
{
return true;
}
diff --git a/kdeprint/kprintdialogpage.h b/kdeprint/kprintdialogpage.h
index 125cfa36d..70416d18f 100644
--- a/kdeprint/kprintdialogpage.h
+++ b/kdeprint/kprintdialogpage.h
@@ -21,8 +21,8 @@
#ifndef KPRINTDIALOGPAGE_H
#define KPRINTDIALOGPAGE_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -44,36 +44,36 @@ class DrMain;
* class MyDialogPage : public KPrintDialogPage
* {
* public:
- * MyDialogPage( QWidget *parent = 0, const char *name = 0 );
+ * MyDialogPage( TQWidget *parent = 0, const char *name = 0 );
*
* //reimplement virtual functions
- * void getOptions( QMap<QString,QString>& opts, bool incldef = false );
- * void setOptions( const QMap<QString,QString>& opts );
- * bool isValid( QString& msg );
+ * void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
+ * void setOptions( const TQMap<TQString,TQString>& opts );
+ * bool isValid( TQString& msg );
*
* private:
- * QComboBox *m_fontcombo;
+ * TQComboBox *m_fontcombo;
* };
*
- * MyDialogPage::MyDialogPage( QWidget *parent, const char *name )
+ * MyDialogPage::MyDialogPage( TQWidget *parent, const char *name )
* : KPrintDialogPage( parent, name )
* {
* setTitle( i18n( "My Page" ) );
* }
*
- * void MyDialogPage::getOptions( QMap<QString,QString>& opts, bool incldef )
+ * void MyDialogPage::getOptions( TQMap<TQString,TQString>& opts, bool incldef )
* {
* if ( incldef || m_fontcombo->currentText() != mydefaultvalue )
* opts[ "kde-myapp-fontname" ] = m_fontcombo->currentText();
* }
*
- * void MyDialogPage::setOptions( const QMap<QString,QString>& opts )
+ * void MyDialogPage::setOptions( const TQMap<TQString,TQString>& opts )
* {
- * QString fntname = opts[ "kde-myapp-fontname" ];
+ * TQString fntname = opts[ "kde-myapp-fontname" ];
* m_fontcombo->setEditText( fntname );
* }
*
- * bool MyDialogPage::isValid( QString& msg)
+ * bool MyDialogPage::isValid( TQString& msg)
* {
* if ( m_fontcombo->currentText().isEmpty() )
* {
@@ -94,11 +94,11 @@ public:
/**
* Standard constructor.
*/
- KPrintDialogPage(QWidget *parent = 0, const char *name = 0);
+ KPrintDialogPage(TQWidget *parent = 0, const char *name = 0);
/**
* Modified constructor. For internal use only.
*/
- KPrintDialogPage(KMPrinter *pr, DrMain *dr = 0, QWidget *parent = 0, const char *name = 0);
+ KPrintDialogPage(KMPrinter *pr, DrMain *dr = 0, TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
*/
@@ -112,13 +112,13 @@ public:
* @param incldef if true, include also options with default values
* @see setOptions()
*/
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
/**
* This function is called to update the current page with the options contained in @p opts.
* Reimplement it in subclasses.
* @param opts the structure containing the options to update the page
*/
- virtual void setOptions(const QMap<QString,QString>& opts);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
/**
* Returns true if options selected in the page are valid (no conflict), false otherwise.
* When returning false, @p msg should contain an error message explaining what is wrong
@@ -126,7 +126,7 @@ public:
* @param msg should contain an error message when returning false
* @returns valid status
*/
- virtual bool isValid(QString& msg);
+ virtual bool isValid(TQString& msg);
/**
* Get the ID of the page. Not used yet.
* @returns the page ID
@@ -151,7 +151,7 @@ public:
* @param txt the page title
* @see title()
*/
- void setTitle(const QString& txt) { m_title = txt; }
+ void setTitle(const TQString& txt) { m_title = txt; }
/**
* Tell wether or not the page should be disable if a non real printer (special
* printer) is selected in the print dialog. Returns false by default. Application
diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp
index bba70e62d..c96db7a8d 100644
--- a/kdeprint/kprinter.cpp
+++ b/kdeprint/kprinter.cpp
@@ -28,11 +28,11 @@
#include "kmmanager.h"
#include "driver.h"
-#include <qpaintdevicemetrics.h>
-#include <qfile.h>
-#include <qtl.h>
-#include <qdir.h>
-#include <qguardedptr.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfile.h>
+#include <tqtl.h>
+#include <tqdir.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -45,7 +45,7 @@
#include <klibloader.h>
#include <kmessagebox.h>
-static void dumpOptions(const QMap<QString,QString>& opts);
+static void dumpOptions(const TQMap<TQString,TQString>& opts);
static void reportError(KPrinter*);
//**************************************************************************************
@@ -59,15 +59,15 @@ public:
KPrinterWrapper(KPrinter*, PrinterMode m = ScreenResolution);
~KPrinterWrapper();
protected:
- virtual bool cmd(int, QPainter*, QPDevCmdParam*);
+ virtual bool cmd(int, TQPainter*, QPDevCmdParam*);
virtual int metric(int) const;
int qprinterMetric(int) const;
private:
KPrinter *m_printer;
};
-KPrinterWrapper::KPrinterWrapper(KPrinter *prt, QPrinter::PrinterMode m)
-: QPrinter(m), m_printer(prt)
+KPrinterWrapper::KPrinterWrapper(KPrinter *prt, TQPrinter::PrinterMode m)
+: TQPrinter(m), m_printer(prt)
{
}
@@ -75,9 +75,9 @@ KPrinterWrapper::~KPrinterWrapper()
{
}
-bool KPrinterWrapper::cmd(int c, QPainter *painter, QPDevCmdParam *p)
+bool KPrinterWrapper::cmd(int c, TQPainter *painter, QPDevCmdParam *p)
{
- return QPrinter::cmd(c,painter,p);
+ return TQPrinter::cmd(c,painter,p);
}
int KPrinterWrapper::metric(int m) const
@@ -87,7 +87,7 @@ int KPrinterWrapper::metric(int m) const
int KPrinterWrapper::qprinterMetric(int m) const
{
- return QPrinter::metric(m);
+ return TQPrinter::metric(m);
}
//**************************************************************************************
@@ -97,14 +97,14 @@ int KPrinterWrapper::qprinterMetric(int m) const
class KPrinterPrivate
{
public:
- QGuardedPtr<KPrinterImpl> m_impl;
+ TQGuardedPtr<KPrinterImpl> m_impl;
bool m_restore;
bool m_previewonly;
WId m_parentId;
QString m_docfilename;
- QString m_docdirectory;
+ TQString m_docdirectory;
KPrinterWrapper *m_wrapper;
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
QString m_tmpbuffer;
QString m_printername;
QString m_searchname;
@@ -120,8 +120,8 @@ public:
// KPrinter class
//**************************************************************************************
-KPrinter::KPrinter(bool restore, QPrinter::PrinterMode m)
-: QPaintDevice(QInternal::Printer|QInternal::ExternalDevice)
+KPrinter::KPrinter(bool restore, TQPrinter::PrinterMode m)
+: TQPaintDevice(TQInternal::Printer|TQInternal::ExternalDevice)
{
init(restore, m);
}
@@ -140,7 +140,7 @@ KPrinter::~KPrinter()
delete d;
}
-void KPrinter::init(bool restore, QPrinter::PrinterMode m)
+void KPrinter::init(bool restore, TQPrinter::PrinterMode m)
{
// Private data initialization
d = new KPrinterPrivate;
@@ -150,7 +150,7 @@ void KPrinter::init(bool restore, QPrinter::PrinterMode m)
d->m_parentId = 0;
d->m_pagesize = 0;
- // initialize QPrinter wrapper
+ // initialize TQPrinter wrapper
d->m_wrapper = new KPrinterWrapper(this, m);
// other initialization
@@ -216,11 +216,11 @@ void KPrinter::saveSettings()
conf->writePathEntry( "DocDirectory", d->m_docdirectory );
}
-bool KPrinter::setup(QWidget *parent, const QString& caption, bool forceExpand)
+bool KPrinter::setup(TQWidget *parent, const TQString& caption, bool forceExpand)
{
if (!kapp->authorize("print/dialog"))
{
- autoConfigure(QString::null, parent);
+ autoConfigure(TQString::null, parent);
return true; // Just print it
}
@@ -272,10 +272,10 @@ KPrinter::ApplicationType KPrinter::applicationType()
return (ApplicationType)KMFactory::self()->settings()->application;
}
-bool KPrinter::cmd(int c, QPainter *painter, QPDevCmdParam *p)
+bool KPrinter::cmd(int c, TQPainter *painter, QPDevCmdParam *p)
{
bool value(true);
- if (c == QPaintDevice::PdcBegin)
+ if (c == TQPaintDevice::PdcBegin)
{
d->m_impl->statusMessage(i18n("Initialization..."), this);
d->m_pagenumber = 1;
@@ -283,10 +283,10 @@ bool KPrinter::cmd(int c, QPainter *painter, QPDevCmdParam *p)
d->m_impl->statusMessage(i18n("Generating print data: page %1").arg(d->m_pagenumber), this);
}
value = d->m_wrapper->cmd(c,painter,p);
- if (c == QPaintDevice::PdcEnd)
+ if (c == TQPaintDevice::PdcEnd)
{
// this call should take care of everything (preview, output-to-file, filtering, ...)
- value = value && printFiles(QStringList(d->m_wrapper->outputFileName()),true);
+ value = value && printFiles(TQStringList(d->m_wrapper->outputFileName()),true);
// reset "ready" state
finishPrinting();
}
@@ -298,12 +298,12 @@ void KPrinter::translateQtOptions()
d->m_wrapper->setCreator(creator());
d->m_wrapper->setDocName(docName());
d->m_wrapper->setFullPage(fullPage());
- d->m_wrapper->setColorMode((QPrinter::ColorMode)colorMode());
- d->m_wrapper->setOrientation((QPrinter::Orientation)orientation());
+ d->m_wrapper->setColorMode((TQPrinter::ColorMode)colorMode());
+ d->m_wrapper->setOrientation((TQPrinter::Orientation)orientation());
if ( !option( "kde-printsize" ).isEmpty() )
- d->m_wrapper->setPageSize( ( QPrinter::PageSize )option( "kde-printsize" ).toInt() );
+ d->m_wrapper->setPageSize( ( TQPrinter::PageSize )option( "kde-printsize" ).toInt() );
else
- d->m_wrapper->setPageSize((QPrinter::PageSize)pageSize());
+ d->m_wrapper->setPageSize((TQPrinter::PageSize)pageSize());
d->m_wrapper->setOutputToFile(true);
d->m_wrapper->setOutputFileName(d->m_tmpbuffer);
d->m_wrapper->setNumCopies(option("kde-qtcopies").isEmpty() ? 1 : option("kde-qtcopies").toInt());
@@ -355,7 +355,7 @@ void KPrinter::translateQtOptions()
d->m_wrapper->setNumCopies(numCopies());
}
-bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
+bool KPrinter::printFiles(const TQStringList& l, bool flag, bool startviewer)
{
QStringList files(l);
bool status(true);
@@ -393,7 +393,7 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
if (((files.count() != 1 || option("kde-preview") != "1") && !d->m_previewonly) || doPreview(files[0]))
{
// check if printing has been prepared (it may be not prepared if the KPrinter object is not
- // use as a QPaintDevice object)
+ // use as a TQPaintDevice object)
preparePrinting();
if (!d->m_impl->printFiles(this, files, flag))
@@ -403,9 +403,9 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
}
else
{
- if (/* !outputToFile() && */ startviewer && !QFile::exists("/etc/xdg/autostart/system-config-printer-applet-kde.desktop") )
+ if (/* !outputToFile() && */ startviewer && !TQFile::exists("/etc/xdg/autostart/system-config-printer-applet-kde.desktop") )
{
- QStringList args;
+ TQStringList args;
args << "-d";
args << printerName();
args << "--noshow";
@@ -417,17 +417,17 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
// situation: only one file, it has been previewed and printing has been canceled, then
// we should remove the file ourself
{
- QFile::remove(files[0]);
+ TQFile::remove(files[0]);
}
}
finishPrinting();
return status;
}
-bool KPrinter::doPreview(const QString& file)
+bool KPrinter::doPreview(const TQString& file)
{
d->m_impl->statusMessage(i18n("Previewing..."), this);
- d->m_impl->statusMessage(QString::null, this);
+ d->m_impl->statusMessage(TQString::null, this);
return KPrintPreview::preview(file, d->m_previewonly, d->m_parentId);
}
@@ -437,7 +437,7 @@ void KPrinter::preparePrinting()
if (d->m_ready) return;
// re-initialize error
- setErrorMessage(QString::null);
+ setErrorMessage(TQString::null);
// re-initialize margins and page size (by default, use Qt mechanism)
setRealPageSize(NULL);
@@ -464,12 +464,12 @@ void KPrinter::finishPrinting()
{
d->m_ready = false;
// close the status window
- d->m_impl->statusMessage(QString::null, this);
+ d->m_impl->statusMessage(TQString::null, this);
}
-QValueList<int> KPrinter::pageList() const
+TQValueList<int> KPrinter::pageList() const
{
- QValueList<int> list;
+ TQValueList<int> list;
int mp(minPage()), MP(maxPage());
if (mp > 0 && MP > 0 && MP >= mp)
{ // do something only if bounds specified
@@ -483,8 +483,8 @@ QValueList<int> KPrinter::pageList() const
// process range specification
if (!option("kde-range").isEmpty())
{
- QStringList ranges = QStringList::split(',',option("kde-range"),false);
- for (QStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it)
+ QStringList ranges = TQStringList::split(',',option("kde-range"),false);
+ for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it)
{
int p = (*it).find('-');
bool ok;
@@ -526,7 +526,7 @@ QValueList<int> KPrinter::pageList() const
if (pageSet() != AllPages)
{
bool keepEven = (pageSet() == EvenPages);
- for (QValueList<int>::Iterator it=list.begin();it!=list.end();)
+ for (TQValueList<int>::Iterator it=list.begin();it!=list.end();)
if ((((*it) % 2) != 0 && keepEven) ||
(((*it) % 2) == 0 && !keepEven)) it = list.remove(it);
else ++it;
@@ -537,7 +537,7 @@ QValueList<int> KPrinter::pageList() const
}
//**************************************************************************************
-// QPrinter interface
+// TQPrinter interface
//**************************************************************************************
int KPrinter::numCopies() const
@@ -547,7 +547,7 @@ int KPrinter::numCopies() const
return (ok ? p : 1);
}
-QSize KPrinter::margins() const
+TQSize KPrinter::margins() const
{
return d->m_wrapper->margins();
}
@@ -568,26 +568,26 @@ int KPrinter::metric(int m) const
margins( &top, &left, &bottom, &right );
switch ( m )
{
- case QPaintDeviceMetrics::PdmWidth:
+ case TQPaintDeviceMetrics::PdmWidth:
val = (land ? ( int )d->m_pagesize->pageHeight() : ( int )d->m_pagesize->pageWidth());
if ( res != 72 )
val = (val * res + 36) / 72;
if ( !fullPage() )
val -= ( left + right );
break;
- case QPaintDeviceMetrics::PdmHeight:
+ case TQPaintDeviceMetrics::PdmHeight:
val = (land ? ( int )d->m_pagesize->pageWidth() : ( int )d->m_pagesize->pageHeight());
if ( res != 72 )
val = (val * res + 36) / 72;
if ( !fullPage() )
val -= ( top + bottom );
break;
- case QPaintDeviceMetrics::PdmWidthMM:
- val = metric( QPaintDeviceMetrics::PdmWidth );
+ case TQPaintDeviceMetrics::PdmWidthMM:
+ val = metric( TQPaintDeviceMetrics::PdmWidth );
val = (val * 254 + 5*res) / (10*res); // +360 to get the right rounding
break;
- case QPaintDeviceMetrics::PdmHeightMM:
- val = metric( QPaintDeviceMetrics::PdmHeight );
+ case TQPaintDeviceMetrics::PdmHeightMM:
+ val = metric( TQPaintDeviceMetrics::PdmHeight );
val = (val * 254 + 5*res) / (10*res);
break;
default:
@@ -605,7 +605,7 @@ void KPrinter::setOrientation(Orientation o)
d->m_impl->broadcastOption( "kde-orientation-fixed", "1" );
}
-void KPrinter::setOption( const QString& key, const QString& value, bool broadcast )
+void KPrinter::setOption( const TQString& key, const TQString& value, bool broadcast )
{
setOption( key, value );
if ( broadcast )
@@ -615,15 +615,15 @@ void KPrinter::setOption( const QString& key, const QString& value, bool broadca
void KPrinter::setPageSize(PageSize s)
{
KMFactory::self()->settings()->pageSize = s;
- setOption("kde-pagesize",QString::number((int)s),true);
+ setOption("kde-pagesize",TQString::number((int)s),true);
d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
}
-void KPrinter::setOptions(const QMap<QString,QString>& opts)
+void KPrinter::setOptions(const TQMap<TQString,TQString>& opts)
{ // This functions remove all options except those with "kde-..."
// which correspond to externally-sets options (use the value
// from "opts" if specified
- QMap<QString,QString> tmpset = d->m_options;
+ TQMap<TQString,TQString> tmpset = d->m_options;
d->m_options = opts;
// remove some problematic options that may not be overwritten (ugly hack).
// Default values will be used instead, except if the dialog has set new ones.
@@ -637,16 +637,16 @@ void KPrinter::setOptions(const QMap<QString,QString>& opts)
tmpset.remove("kde-margin-right");
tmpset.remove( "kde-resolution" );
tmpset.remove( "kde-fonts" );
- for (QMap<QString,QString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it)
if (it.key().left(4) == "kde-" && !(d->m_options.contains(it.key())))
d->m_options[it.key()] = it.data();
}
-void KPrinter::initOptions(const QMap<QString,QString>& opts)
+void KPrinter::initOptions(const TQMap<TQString,TQString>& opts)
{ // This function can be used to initialize the KPrinter object just after
// creation to set some options. Non global options will be propagated to
// all listed printers (non-global => start with "kde-...")
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
setOption(it.key(), it.data());
if (it.key().left(4) != "kde-")
@@ -664,7 +664,7 @@ void KPrinter::reload()
//initOptions(d->m_options);
}
-bool KPrinter::autoConfigure(const QString& prname, QWidget *parent)
+bool KPrinter::autoConfigure(const TQString& prname, TQWidget *parent)
{
KMManager *mgr = KMManager::self();
KMPrinter *mprt(0);
@@ -691,9 +691,9 @@ void reportError(KPrinter *p)
kdDebug(500) << "could not send notify event" << endl;
}
-KPrinter::PageSize pageNameToPageSize(const QString& _name)
+KPrinter::PageSize pageNameToPageSize(const TQString& _name)
{
- QString name = _name.upper();
+ TQString name = _name.upper();
if (name == "LETTER") return KPrinter::Letter;
else if (name == "LEGAL") return KPrinter::Legal;
else if (name == "A4") return KPrinter::A4;
@@ -766,38 +766,38 @@ const char* pageSizeToPageName(KPrinter::PageSize s)
}
// FIXME: remove for 4.0
-QSize rangeToSize( const QString& )
+TQSize rangeToSize( const TQString& )
{
- kdWarning( 500 ) << "rangeToSize(QString) is obsolete, do not use (no effect)" << endl;
- return QSize();
+ kdWarning( 500 ) << "rangeToSize(TQString) is obsolete, do not use (no effect)" << endl;
+ return TQSize();
}
-static void dumpOptions(const QMap<QString,QString>& opts)
+static void dumpOptions(const TQMap<TQString,TQString>& opts)
{
kdDebug(500) << "********************" << endl;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
kdDebug(500) << it.key() << " = " << it.data() << endl;
}
KPrinterImpl* KPrinter::implementation() const
{ return d->m_impl; }
-const QString& KPrinter::option(const QString& key) const
+const TQString& KPrinter::option(const TQString& key) const
{ return ((const KPrinterPrivate*)(d))->m_options[key]; }
-void KPrinter::setOption(const QString& key, const QString& value)
+void KPrinter::setOption(const TQString& key, const TQString& value)
{ d->m_options[key] = value; }
-QString KPrinter::docName() const
+TQString KPrinter::docName() const
{ return option("kde-docname"); }
-void KPrinter::setDocName(const QString& d)
+void KPrinter::setDocName(const TQString& d)
{ setOption("kde-docname",d); }
-QString KPrinter::creator() const
+TQString KPrinter::creator() const
{ return option("kde-creator"); }
-void KPrinter::setCreator(const QString& d)
+void KPrinter::setCreator(const TQString& d)
{ setOption("kde-creator",d); }
bool KPrinter::fullPage() const
@@ -813,7 +813,7 @@ void KPrinter::setColorMode(ColorMode m)
{ setOption("kde-colormode",(m == Color ? "Color" : "GrayScale")); }
void KPrinter::setNumCopies(int n)
-{ setOption("kde-copies",QString::number(n)); }
+{ setOption("kde-copies",TQString::number(n)); }
KPrinter::Orientation KPrinter::orientation() const
{ return (option("kde-orientation") == "Landscape" ? Landscape : Portrait); }
@@ -837,7 +837,7 @@ int KPrinter::maxPage() const
{ return (option("kde-maxpage").isEmpty() ? 0 : option("kde-maxpage").toInt()); }
void KPrinter::setMinMax(int m, int M)
-{ setOption("kde-minpage",QString::number(m)); setOption("kde-maxpage",QString::number(M)); }
+{ setOption("kde-minpage",TQString::number(m)); setOption("kde-maxpage",TQString::number(M)); }
int KPrinter::fromPage() const
{ return (option("kde-frompage").isEmpty() ? 0 : option("kde-frompage").toInt()); }
@@ -846,7 +846,7 @@ int KPrinter::toPage() const
{ return (option("kde-topage").isEmpty() ? 0 : option("kde-topage").toInt()); }
void KPrinter::setFromTo(int m, int M)
-{ setOption("kde-frompage",QString::number(m)); setOption("kde-topage",QString::number(M)); setOption("kde-range",(m>0 && M>0 ? QString("%1-%2").arg(m).arg(M) : QString::fromLatin1(""))); }
+{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::fromLatin1(""))); }
// if no page size defined, use the localized one
KPrinter::PageSize KPrinter::pageSize() const
@@ -859,18 +859,18 @@ int KPrinter::currentPage() const
{ return (option("kde-currentpage").isEmpty() ? 0 : option("kde-currentpage").toInt()); }
void KPrinter::setCurrentPage(int p)
-{ setOption("kde-currentpage",QString::number(p)); }
+{ setOption("kde-currentpage",TQString::number(p)); }
-QString KPrinter::printerName() const
+TQString KPrinter::printerName() const
{ return d->m_printername; }
-void KPrinter::setPrinterName(const QString& s)
+void KPrinter::setPrinterName(const TQString& s)
{ d->m_printername = s; }
-QString KPrinter::printProgram() const
-{ return (option("kde-isspecial") == "1" ? option("kde-special-command") : QString::null); }
+TQString KPrinter::printProgram() const
+{ return (option("kde-isspecial") == "1" ? option("kde-special-command") : TQString::null); }
-void KPrinter::setPrintProgram(const QString& prg)
+void KPrinter::setPrintProgram(const TQString& prg)
{
if (prg.isNull())
{
@@ -888,19 +888,19 @@ void KPrinter::setPrintProgram(const QString& prg)
}
}
-QString KPrinter::printerSelectionOption() const
-{ return QString::fromLatin1(""); }
+TQString KPrinter::printerSelectionOption() const
+{ return TQString::fromLatin1(""); }
-void KPrinter::setPrinterSelectionOption(const QString&)
+void KPrinter::setPrinterSelectionOption(const TQString&)
{}
-const QMap<QString,QString>& KPrinter::options() const
+const TQMap<TQString,TQString>& KPrinter::options() const
{ return d->m_options; }
-QString KPrinter::searchName() const
+TQString KPrinter::searchName() const
{ return d->m_searchname; }
-void KPrinter::setSearchName(const QString& s)
+void KPrinter::setSearchName(const TQString& s)
{ d->m_searchname = s; }
bool KPrinter::newPage()
@@ -910,10 +910,10 @@ bool KPrinter::newPage()
return d->m_wrapper->newPage();
}
-QString KPrinter::outputFileName() const
+TQString KPrinter::outputFileName() const
{ return option("kde-outputfilename"); }
-void KPrinter::setOutputFileName(const QString& f)
+void KPrinter::setOutputFileName(const TQString& f)
{ setOption("kde-outputfilename",f); setOutputToFile(!f.isEmpty()); }
bool KPrinter::outputToFile() const
@@ -924,7 +924,7 @@ void KPrinter::setOutputToFile(bool on)
setOption("kde-outputtofile",(on ? "1" : "0"));
if (on)
{
- setOption("kde-special-command",QString::null);
+ setOption("kde-special-command",TQString::null);
setOption("kde-isspecial","1");
}
}
@@ -935,7 +935,7 @@ bool KPrinter::abort()
bool KPrinter::aborted() const
{ return d->m_wrapper->aborted(); }
-void KPrinter::setMargins(QSize m)
+void KPrinter::setMargins(TQSize m)
{
setMargins( m.height(), m.width(), m.height(), m.width() );
}
@@ -943,20 +943,20 @@ void KPrinter::setMargins(QSize m)
void KPrinter::setMargins( uint top, uint left, uint bottom, uint right )
{
d->m_wrapper->setMargins( top, left, bottom, right );
- setOption( "kde-margin-top", QString::number( top ), true );
- setOption( "kde-margin-left", QString::number( left ), true );
- setOption( "kde-margin-bottom", QString::number( bottom ), true );
- setOption( "kde-margin-right", QString::number( right ), true );
+ setOption( "kde-margin-top", TQString::number( top ), true );
+ setOption( "kde-margin-left", TQString::number( left ), true );
+ setOption( "kde-margin-bottom", TQString::number( bottom ), true );
+ setOption( "kde-margin-right", TQString::number( right ), true );
}
// FIXME: remove for 4.0
-QSize KPrinter::realPageSize() const
+TQSize KPrinter::realPageSize() const
{
kdWarning( 500 ) << "KPrinter::realPageSize() is obsolete, do not use" << endl;
if ( d->m_pagesize )
return d->m_pagesize->pageSize();
else
- return QSize();
+ return TQSize();
}
void KPrinter::setRealPageSize(DrPageSize *p)
@@ -983,36 +983,36 @@ void KPrinter::setRealPageSize(DrPageSize *p)
}
// FIXME: remove for 4.0
-void KPrinter::setRealPageSize( QSize )
+void KPrinter::setRealPageSize( TQSize )
{
- kdWarning( 500 ) << "KPrinter::setRealPageSize(QSize) is obsolete, do not use (no effect)" << endl;
+ kdWarning( 500 ) << "KPrinter::setRealPageSize(TQSize) is obsolete, do not use (no effect)" << endl;
}
// FIXME: remove for 4.0
-void KPrinter::setRealDrawableArea( const QRect& )
+void KPrinter::setRealDrawableArea( const TQRect& )
{
- kdWarning( 500 ) << "KPrinter::setRealDrawableArea(QRect) is obsolete, do not use (no effect)" << endl;
+ kdWarning( 500 ) << "KPrinter::setRealDrawableArea(TQRect) is obsolete, do not use (no effect)" << endl;
}
// FIXME: remove for 4.0
-QRect KPrinter::realDrawableArea() const
+TQRect KPrinter::realDrawableArea() const
{
kdWarning( 500 ) << "KPrinter::realDrawableArea() is obsolete, do not use" << endl;
if ( d->m_pagesize )
return d->m_pagesize->pageRect();
else
- return QRect();
+ return TQRect();
}
-QString KPrinter::errorMessage() const
+TQString KPrinter::errorMessage() const
{ return d->m_errormsg; }
-void KPrinter::setErrorMessage(const QString& msg)
+void KPrinter::setErrorMessage(const TQString& msg)
{ d->m_errormsg = msg; }
/* we're using a builtin member to store this state because we don't
* want to keep it from object to object. So there's no need to use
- * the QMap structure to store this
+ * the TQMap structure to store this
*/
void KPrinter::setPreviewOnly(bool on)
{ d->m_previewonly = on; }
@@ -1020,17 +1020,17 @@ void KPrinter::setPreviewOnly(bool on)
bool KPrinter::previewOnly() const
{ return d->m_previewonly; }
-void KPrinter::setDocFileName(const QString& s)
+void KPrinter::setDocFileName(const TQString& s)
{ d->m_docfilename = s; }
-QString KPrinter::docFileName() const
+TQString KPrinter::docFileName() const
{ return d->m_docfilename; }
-void KPrinter::setDocDirectory( const QString& s )
+void KPrinter::setDocDirectory( const TQString& s )
{ d->m_docdirectory = s; }
-QString KPrinter::docDirectory() const
-{ return ( d->m_docdirectory.isEmpty() ? QDir::homeDirPath() : d->m_docdirectory ); }
+TQString KPrinter::docDirectory() const
+{ return ( d->m_docdirectory.isEmpty() ? TQDir::homeDirPath() : d->m_docdirectory ); }
void KPrinter::setResolution(int dpi)
{
diff --git a/kdeprint/kprinter.h b/kdeprint/kprinter.h
index 7682c89f9..286fdc029 100644
--- a/kdeprint/kprinter.h
+++ b/kdeprint/kprinter.h
@@ -21,12 +21,12 @@
#ifndef KPRINTER_H
#define KPRINTER_H
-#include <qpaintdevice.h>
-#include <qprinter.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqpaintdevice.h>
+#include <tqprinter.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kdemacros.h>
#include <kdelibs_export.h>
@@ -40,17 +40,17 @@ class DrPageSize;
/**
* This class is the main interface to access the KDE print framework. It allows KDE
* applications to easily access the print system, through an interface that is compatible
- * with QPrinter. So that the porting of an existing application should be as easy as
- * replacing any occurrence of QPrinter by KPrinter. However applications that explicitly
- * used the QPrintDialog class must be changed to the standard KPrinter way of accessing
+ * with TQPrinter. So that the porting of an existing application should be as easy as
+ * replacing any occurrence of TQPrinter by KPrinter. However applications that explicitly
+ * used the TQPrintDialog class must be changed to the standard KPrinter way of accessing
* the print dialog.
*
* Basically, a KDE application will use the KPrinter object as a paint device, and will draw
- * on it using QPainter. In a standard application, the use of the KPrinter class will
+ * on it using TQPainter. In a standard application, the use of the KPrinter class will
* look like this:
* \code
* #include <kprinter.h>
- * #include <qpainter.h>
+ * #include <tqpainter.h>
*
* void MyClass::doPrint()
* {
@@ -63,7 +63,7 @@ class DrPageSize;
* if ( printer.setup( this ) )
* {
* // create a painter to paint on the printer object
- * QPainter painter;
+ * TQPainter painter;
*
* // start painting
* painter.begin( &printer );
@@ -83,9 +83,9 @@ class DrPageSize;
*
* @short The central interface class to access the KDE print system.
* @author Michael Goffioul
- * @see QPrinter, KPrintDialogPage
+ * @see TQPrinter, KPrintDialogPage
*/
-class KDEPRINT_EXPORT KPrinter : public QPaintDevice, public KPReloadObject
+class KDEPRINT_EXPORT KPrinter : public TQPaintDevice, public KPReloadObject
{
friend class KPrinterWrapper;
friend class KPrinterImpl;
@@ -125,7 +125,7 @@ public:
*/
enum ApplicationType { Dialog = 0x00, StandAlone = 0x01, StandAlonePersistent = 0x02 };
- // QPrinter extension
+ // TQPrinter extension
/**
* Defines the page set to print:
* @li @p AllPages: all pages
@@ -144,59 +144,59 @@ public:
*/
enum CollateType { Collate = 0x00, Uncollate = 0x01 };
- // from QPrinter class
+ // from TQPrinter class
/**
* Defines the color mode of the printer
- * @see QPrinter::ColorMode
+ * @see TQPrinter::ColorMode
*/
- enum ColorMode { GrayScale = QPrinter::GrayScale, Color = QPrinter::Color };
+ enum ColorMode { GrayScale = TQPrinter::GrayScale, Color = TQPrinter::Color };
/**
* Defines the orientation of the paper
- * @see QPrinter::Orientation
+ * @see TQPrinter::Orientation
*/
- enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape };
+ enum Orientation { Portrait = TQPrinter::Portrait, Landscape = TQPrinter::Landscape };
/**
* Defines the page order of the print job
- * @see QPrinter::PageOrder
+ * @see TQPrinter::PageOrder
*/
- enum PageOrder { FirstPageFirst = QPrinter::FirstPageFirst, LastPageFirst = QPrinter::LastPageFirst };
+ enum PageOrder { FirstPageFirst = TQPrinter::FirstPageFirst, LastPageFirst = TQPrinter::LastPageFirst };
/**
* Defines the paper size to use
- * @see QPrinter::PageSize
+ * @see TQPrinter::PageSize
*/
enum PageSize
{
- A4 = QPrinter::A4,
- B5 = QPrinter::B5,
- Letter = QPrinter::Letter,
- Legal = QPrinter::Legal,
- Executive = QPrinter::Executive,
- A0 = QPrinter::A0,
- A1 = QPrinter::A1,
- A2 = QPrinter::A2,
- A3 = QPrinter::A3,
- A5 = QPrinter::A5,
- A6 = QPrinter::A6,
- A7 = QPrinter::A7,
- A8 = QPrinter::A8,
- A9 = QPrinter::A9,
- B0 = QPrinter::B0,
- B1 = QPrinter::B1,
- B10 = QPrinter::B10,
- B2 = QPrinter::B2,
- B3 = QPrinter::B3,
- B4 = QPrinter::B4,
- B6 = QPrinter::B6,
- B7 = QPrinter::B7,
- B8 = QPrinter::B8,
- B9 = QPrinter::B9,
- C5E = QPrinter::C5E,
- Comm10E = QPrinter::Comm10E,
- DLE = QPrinter::DLE,
- Folio = QPrinter::Folio,
- Ledger = QPrinter::Ledger,
- Tabloid = QPrinter::Tabloid,
- NPageSize = QPrinter::NPageSize
+ A4 = TQPrinter::A4,
+ B5 = TQPrinter::B5,
+ Letter = TQPrinter::Letter,
+ Legal = TQPrinter::Legal,
+ Executive = TQPrinter::Executive,
+ A0 = TQPrinter::A0,
+ A1 = TQPrinter::A1,
+ A2 = TQPrinter::A2,
+ A3 = TQPrinter::A3,
+ A5 = TQPrinter::A5,
+ A6 = TQPrinter::A6,
+ A7 = TQPrinter::A7,
+ A8 = TQPrinter::A8,
+ A9 = TQPrinter::A9,
+ B0 = TQPrinter::B0,
+ B1 = TQPrinter::B1,
+ B10 = TQPrinter::B10,
+ B2 = TQPrinter::B2,
+ B3 = TQPrinter::B3,
+ B4 = TQPrinter::B4,
+ B6 = TQPrinter::B6,
+ B7 = TQPrinter::B7,
+ B8 = TQPrinter::B8,
+ B9 = TQPrinter::B9,
+ C5E = TQPrinter::C5E,
+ Comm10E = TQPrinter::Comm10E,
+ DLE = TQPrinter::DLE,
+ Folio = TQPrinter::Folio,
+ Ledger = TQPrinter::Ledger,
+ Tabloid = TQPrinter::Tabloid,
+ NPageSize = TQPrinter::NPageSize
};
// constructors / destructor
@@ -205,97 +205,97 @@ public:
* the same application run, if @p restore is true. Setting @p restore to false may
* be useful if you want an independent/clean KPrinter object.
* @param restore if true, options will be restored/saved between successive KPrinter objects
- * @param m the mode to establish the KPrinter in (see QPrinter::PrinterMode)
+ * @param m the mode to establish the KPrinter in (see TQPrinter::PrinterMode)
*/
- KPrinter(bool restore = true, QPrinter::PrinterMode m = QPrinter::ScreenResolution );
+ KPrinter(bool restore = true, TQPrinter::PrinterMode m = TQPrinter::ScreenResolution );
/**
* Destructor. This also saves the current KPrinter state for future printing.
*/
~KPrinter();
- // QPrinter interface (+ some extensions)
+ // TQPrinter interface (+ some extensions)
/**
- * See QPrinter::newPage().
+ * See TQPrinter::newPage().
*/
bool newPage();
/**
- * See QPrinter::abort().
+ * See TQPrinter::abort().
*/
bool abort();
/**
- * See QPrinter::aborted(.)
+ * See TQPrinter::aborted(.)
*/
bool aborted() const;
/**
- * See QPrinter::outputToFile().
+ * See TQPrinter::outputToFile().
*/
bool outputToFile() const;
/**
- * See QPrinter::setOutputToFile().
+ * See TQPrinter::setOutputToFile().
*/
void setOutputToFile(bool);
/**
- * See QPrinter::outputFileName().
+ * See TQPrinter::outputFileName().
*/
- QString outputFileName() const;
+ TQString outputFileName() const;
/**
- * See QPrinter::setOutputFileName().
+ * See TQPrinter::setOutputFileName().
*/
- void setOutputFileName(const QString&);
+ void setOutputFileName(const TQString&);
/**
- * See QPrinter::docName().
+ * See TQPrinter::docName().
*/
- QString docName() const;
+ TQString docName() const;
/**
- * See QPrinter::setDocName().
+ * See TQPrinter::setDocName().
*/
- void setDocName(const QString&);
+ void setDocName(const TQString&);
/**
- * See QPrinter::creator().
+ * See TQPrinter::creator().
*/
- QString creator() const;
+ TQString creator() const;
/**
- * See QPrinter::setCreator().
+ * See TQPrinter::setCreator().
*/
- void setCreator(const QString&);
+ void setCreator(const TQString&);
/**
- * See QPrinter::fullPage().
+ * See TQPrinter::fullPage().
*/
bool fullPage() const;
/**
- * See QPrinter::setFullPage().
+ * See TQPrinter::setFullPage().
*/
void setFullPage(bool);
/**
- * See QPrinter::colorMode().
+ * See TQPrinter::colorMode().
*/
ColorMode colorMode() const;
/**
- * See QPrinter::setColorMode().
+ * See TQPrinter::setColorMode().
*/
void setColorMode(ColorMode);
/**
- * See QPrinter::numCopies().
+ * See TQPrinter::numCopies().
*/
int numCopies() const;
/**
- * See QPrinter::setNumCopies().
+ * See TQPrinter::setNumCopies().
*/
void setNumCopies(int n);
/**
- * See QPrinter::orientation().
+ * See TQPrinter::orientation().
*/
Orientation orientation() const;
/**
- * See QPrinter::setOrientation().
+ * See TQPrinter::setOrientation().
*/
void setOrientation(Orientation);
/**
- * See QPrinter::pageOrder().
+ * See TQPrinter::pageOrder().
*/
PageOrder pageOrder() const;
/**
- * See QPrinter::setPageOrder().
+ * See TQPrinter::setPageOrder().
*/
void setPageOrder(PageOrder);
/**
@@ -307,15 +307,15 @@ public:
*/
void setCollate(CollateType type);
/**
- * See QPrinter::minPage().
+ * See TQPrinter::minPage().
*/
int minPage() const;
/**
- * See QPrinter::maxPage().
+ * See TQPrinter::maxPage().
*/
int maxPage() const;
/**
- * See QPrinter::setMinMax().
+ * See TQPrinter::setMinMax().
*/
void setMinMax(int, int);
/**
@@ -337,32 +337,32 @@ public:
*/
int toPage() const;
/**
- * Sets the first and last page to be printed. See QPrinter::setFromTo().
+ * Sets the first and last page to be printed. See TQPrinter::setFromTo().
*/
void setFromTo(int, int);
/**
- * See QPrinter::pageSize().
+ * See TQPrinter::pageSize().
*/
PageSize pageSize() const;
/**
- * See QPrinter::setPageSize().
+ * See TQPrinter::setPageSize().
*/
void setPageSize(PageSize);
/**
- * See QPrinter::printerName().
+ * See TQPrinter::printerName().
*/
- QString printerName() const;
+ TQString printerName() const;
/**
- * See QPrinter::setPrinterName().
+ * See TQPrinter::setPrinterName().
*/
- void setPrinterName(const QString&);
+ void setPrinterName(const TQString&);
/**
* Returns the print program as set by setPrintProgram() or by the print dialog
* if a special printer has been selected.
* @return the print command line
* @see setPrintProgram()
*/
- QString printProgram() const;
+ TQString printProgram() const;
/**
* Sets the command line to use when printing. This function is useful
* when using a KPrinter object without the print dialog, to control what
@@ -375,7 +375,7 @@ public:
* @li %psl : the page size in lower case. This may be useful with some
* programs like gs.
* \code
- * void createPNGOutputFile(const QString& filename)
+ * void createPNGOutputFile(const TQString& filename)
* {
* // use a clean KPrinter object
* KPrinter prt(false);
@@ -384,22 +384,22 @@ public:
* prt.setOutputFileName( filename );
* prt.setPrintProgram( "gs -sDEVICE=png256 -sPAPERSIZE=%psl -sOutputFile=%out %in" );
*
- * QPainter painter( &prt );
+ * TQPainter painter( &prt );
* doPaint( &painter );
* }
* \endcode
* @param cmd the print command line (containing at least the @p %in tag)
* @see printProgram()
*/
- void setPrintProgram(const QString& cmd);
+ void setPrintProgram(const TQString& cmd);
/**
- * See QPrinter::printerSelectionOption(). Unused.
+ * See TQPrinter::printerSelectionOption(). Unused.
*/
- QString printerSelectionOption() const;
+ TQString printerSelectionOption() const;
/**
- * See QPrinter::setPrinterSelectionOption(). Unused
+ * See TQPrinter::setPrinterSelectionOption(). Unused
*/
- void setPrinterSelectionOption(const QString&);
+ void setPrinterSelectionOption(const TQString&);
/**
* Returns the current page number.
* @see setCurrentPage()
@@ -424,7 +424,7 @@ public:
* printer.setCurrentPage( mycurrentpage );
* if ( printer.setup( this ) )
* {
- * QValueList<int> pages = printer.pageList();
+ * TQValueList<int> pages = printer.pageList();
* // print the pages
* ...
* }
@@ -444,40 +444,40 @@ public:
* @param forceExpand force the expansion of the dialog (the show/hide button will be hidden)
* @returns boolean value corresponding to the button clicked by the user
*/
- bool setup(QWidget *parent = 0, const QString& caption = QString::null, bool forceExpand = false);
+ bool setup(TQWidget *parent = 0, const TQString& caption = TQString::null, bool forceExpand = false);
/**
- * See QPrinter::margins().
+ * See TQPrinter::margins().
*/
- QSize margins() const;
+ TQSize margins() const;
/**
* Not used yet.
*/
- void setMargins(QSize m);
+ void setMargins(TQSize m);
/**
* Returns the page size in dot unit ( 1 dot = 1/72th in ). This method is intended for
- * internal use, if you want to access actual page size, use a QPaintDeviceMetrics object
+ * internal use, if you want to access actual page size, use a TQPaintDeviceMetrics object
* instead. Note that the size returned by this method does not take resolution into
* account, and that it can returns invalid size if no page metric was found in the printer
* driver. DO NOT USE, WILL BE REMOVED.
* @see setRealPageSize
* @obsolete
*/
- QSize realPageSize() const;
+ TQSize realPageSize() const;
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- void setRealPageSize( QSize p );
+ void setRealPageSize( TQSize p );
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- void setRealDrawableArea( const QRect& r );
+ void setRealDrawableArea( const TQRect& r );
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- QRect realDrawableArea() const;
+ TQRect realDrawableArea() const;
void margins( uint *top, uint *left, uint *bottom, uint *right ) const;
void setMargins( uint top, uint left, uint bottom, uint right );
@@ -488,7 +488,7 @@ public:
* application does page selection itself.
* @see setCurrentPage()
*/
- QValueList<int> pageList() const;
+ TQValueList<int> pageList() const;
/**
* Sets the KPrinter object to preview mode if @p on is true. In this mode, nothing will be
* printed but only a preview dialog will be popped up with the single "Close" action. Using
@@ -501,7 +501,7 @@ public:
* KPrinter prt( false );
* prt.setPreviewOnly( true );
*
- * QPainter painter( &prt );
+ * TQPainter painter( &prt );
* doPrint( &painter );
* }
* \endcode
@@ -550,10 +550,10 @@ public:
* Prints the files given in argument. This will first filter the files accorsing to the filtering
* options selected by the user in the print dialog, then send the filtered files to the printer
* with the print options selected. This function is called automatically when calling
- * QPainter::end() for a painter object constructed on KPrinter. In normal use, you don't need
+ * TQPainter::end() for a painter object constructed on KPrinter. In normal use, you don't need
* this use this function explicitly.
*/
- bool printFiles(const QStringList& files, bool removeafter = false, bool startviewer = true);
+ bool printFiles(const TQStringList& files, bool removeafter = false, bool startviewer = true);
/**
* Adds a customized page to the print dialog. The pages will appear in a tab widget in the
@@ -612,14 +612,14 @@ public:
* @param parent the parent widget for the wizard
* @returns 1: success, 0: cancel, -1: error
*/
- //static int addPrinterWizard(QWidget *parent = 0);
+ //static int addPrinterWizard(TQWidget *parent = 0);
/**
- * The KPrinter object stores all its settings in an internal QMap structure on
- * QString. This allows to store any property. This method allows an application to access
+ * The KPrinter object stores all its settings in an internal TQMap structure on
+ * TQString. This allows to store any property. This method allows an application to access
* any print option from the KPrinter object, using the option name. For example if your
* application add a customized page to the print dialog, this page will saves its settings
- * into the KPrinter object using this QMap<QString,QString> structure. After showing the
+ * into the KPrinter object using this TQMap<TQString,TQString> structure. After showing the
* print dialog, your application can then access these options using this method. The
* custom option name should follow the form "kde-appname-optionname".
* \code
@@ -633,7 +633,7 @@ public:
* // open print dialog
* if ( prt.setup( this ) )
* {
- * QString fntname = prt.option( "kde-myapp-fontname" );
+ * TQString fntname = prt.option( "kde-myapp-fontname" );
* ...
* do_something;
* ...
@@ -641,10 +641,10 @@ public:
* }
* \endcode
* @param key the option name (key)
- * @returns the option value correponding to the key, or QString::null
+ * @returns the option value correponding to the key, or TQString::null
* @see KPrintDialogPage, setOption, options(), setOptions()
*/
- const QString& option(const QString& key) const;
+ const TQString& option(const TQString& key) const;
/**
* Adds or modifies an option in the KPrinter object. You probably don't need to use this function
* explicitly. This will be done implicitely for example when reimplementing
@@ -653,26 +653,26 @@ public:
* @param value the option value
* @see option(), KPrintDialogPage
*/
- void setOption(const QString& key, const QString& value);
+ void setOption(const TQString& key, const TQString& value);
/**
* Returns the complete set of print options from the KPrinter object. For internal use.
- * @returns the option set as a QMap object
+ * @returns the option set as a TQMap object
*/
- const QMap<QString,QString>& options() const;
+ const TQMap<TQString,TQString>& options() const;
/**
* Sets the option set in one operation. This method has some side effects like merging
* the internal map with the one given in argument, but only for option in the form
* "kde-...". For internal use only.
* @param opts the option set to be merged in the KPrinter object
*/
- void setOptions(const QMap<QString,QString>& opts);
+ void setOptions(const TQMap<TQString,TQString>& opts);
/**
* For internal use only. Does a similar job as setOption(), except that all possible
* internal printers are initialized with the option if it has the form "kde-...".
* @param opts the option set
* @see setOptions()
*/
- void initOptions(const QMap<QString,QString>& opts);
+ void initOptions(const TQMap<TQString,TQString>& opts);
/**
* Returns the search name of the printer selected by the user. Each printer is identified by
@@ -680,23 +680,23 @@ public:
* @returns the unique printer search name
* @see setSearchName
*/
- QString searchName() const;
+ TQString searchName() const;
/**
* Sets the search name of the KPrinter object. For internal use.
* @param n the unique printer search name
* @see searchName()
*/
- void setSearchName(const QString& n);
+ void setSearchName(const TQString& n);
/**
* Returns the last error message issued by the print system. Unimplemented yet.
* @returns the last error message
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/**
* Sets the last error message. For internal use.
* @param msg the error message
*/
- void setErrorMessage(const QString& msg);
+ void setErrorMessage(const TQString& msg);
/**
* Configure the KPrinter object to be used with the printer named
* @p prname. After the call, the KPrinter object can be used without
@@ -714,7 +714,7 @@ public:
* user clicked "Cancel" in the file dialog.
* @see setup()
*/
- bool autoConfigure(const QString& prname = QString::null, QWidget *parent = 0);
+ bool autoConfigure(const TQString& prname = TQString::null, TQWidget *parent = 0);
/**
* Set the default document filename. This filename will be used as the
* default basename for the output file, instead of the default "print".
@@ -723,14 +723,14 @@ public:
* @param filename the default document basename to use
* @see docFileName()
*/
- void setDocFileName(const QString& filename);
+ void setDocFileName(const TQString& filename);
/**
* Get the default document filename, that is the default basename used for
* the output file.
* @returns the default document basename
* @see setDocFileName()
*/
- QString docFileName() const;
+ TQString docFileName() const;
/**
* Set the default document directory. This directory will be used as
* the default location for any output file. If not set, $HOME directory
@@ -738,17 +738,17 @@ public:
* @param dir the new default output directory
* @see docDirectory()
*/
- void setDocDirectory( const QString& dir );
+ void setDocDirectory( const TQString& dir );
/**
* Get the default document directory, that is the directory used for
* any output file. By default, it is the $HOME directory.
* @returns the default output directory
* @see setDocDirectory
*/
- QString docDirectory() const;
+ TQString docDirectory() const;
protected:
- virtual bool cmd(int, QPainter*, QPDevCmdParam*);
+ virtual bool cmd(int, TQPainter*, QPDevCmdParam*);
virtual int metric(int) const;
void translateQtOptions();
void loadSettings();
@@ -756,10 +756,10 @@ protected:
void preparePrinting();
void finishPrinting();
void reload();
- void init(bool restore = true, QPrinter::PrinterMode m = QPrinter::ScreenResolution);
- bool doPreview(const QString& file);
+ void init(bool restore = true, TQPrinter::PrinterMode m = TQPrinter::ScreenResolution);
+ bool doPreview(const TQString& file);
void setRealPageSize(DrPageSize* p);
- void setOption( const QString& key, const QString& value, bool broadcast );
+ void setOption( const TQString& key, const TQString& value, bool broadcast );
protected:
KPrinterPrivate *d;
@@ -769,12 +769,12 @@ protected:
// Utility functions
-KDEPRINT_EXPORT KPrinter::PageSize pageNameToPageSize(const QString& name);
+KDEPRINT_EXPORT KPrinter::PageSize pageNameToPageSize(const TQString& name);
KDEPRINT_EXPORT const char* pageSizeToPageName(KPrinter::PageSize s);
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
-QSize rangeToSize( const QString& );
+TQSize rangeToSize( const TQString& );
#endif
diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp
index 15c5bea7b..94750b607 100644
--- a/kdeprint/kprinterimpl.cpp
+++ b/kdeprint/kprinterimpl.cpp
@@ -29,8 +29,8 @@
#include "kmprinter.h"
#include "driver.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <dcopclient.h>
@@ -45,7 +45,7 @@
#include <stdlib.h>
-void dumpOptions(const QMap<QString,QString>&);
+void dumpOptions(const TQMap<TQString,TQString>&);
void initEditPrinter(KMPrinter *p)
{
if (!p->isEdited())
@@ -57,8 +57,8 @@ void initEditPrinter(KMPrinter *p)
//****************************************************************************************
-KPrinterImpl::KPrinterImpl(QObject *parent, const char *name)
-: QObject(parent,name)
+KPrinterImpl::KPrinterImpl(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
loadAppOptions();
}
@@ -87,7 +87,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
if (!psname.isEmpty())
{
- printer->setOption("kde-pagesize",QString::number((int)pageNameToPageSize(psname)));
+ printer->setOption("kde-pagesize",TQString::number((int)pageNameToPageSize(psname)));
DrPageSize *ps = driver->findPageSize(psname);
if (ps)
{
@@ -101,7 +101,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
// 3) default printer resolution
// The resolution must have the format: XXXdpi or XXXxYYYdpi. In the second
// case the YYY value is used as resolution.
- QString res = printer->option( "Resolution" );
+ TQString res = printer->option( "Resolution" );
if ( res.isEmpty() )
{
DrBase *opt = driver->findOption( "Resolution" );
@@ -112,7 +112,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
if ( !res.isEmpty() )
{
- QRegExp re( "(\\d+)(?:x(\\d+))?dpi" );
+ TQRegExp re( "(\\d+)(?:x(\\d+))?dpi" );
if ( re.search( res ) != -1 )
{
if ( !re.cap( 2 ).isEmpty() )
@@ -123,7 +123,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
// Find the supported fonts
- QString fonts = driver->get( "fonts" );
+ TQString fonts = driver->get( "fonts" );
if ( !fonts.isEmpty() )
printer->setOption( "kde-fonts", fonts );
@@ -132,12 +132,12 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
-bool KPrinterImpl::setupCommand(QString&, KPrinter*)
+bool KPrinterImpl::setupCommand(TQString&, KPrinter*)
{
return false;
}
-bool KPrinterImpl::printFiles(KPrinter *p, const QStringList& f, bool flag)
+bool KPrinterImpl::printFiles(KPrinter *p, const TQStringList& f, bool flag)
{
QString cmd;
if (p->option("kde-isspecial") == "1")
@@ -177,13 +177,13 @@ bool KPrinterImpl::printFiles(KPrinter *p, const QStringList& f, bool flag)
return startPrinting(cmd,p,f,flag);
}
-void KPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
// force printer listing if not done yet (or reload needed)
- QPtrList<KMPrinter> *printers = KMFactory::self()->manager()->printerListComplete(false);
+ TQPtrList<KMPrinter> *printers = KMFactory::self()->manager()->printerListComplete(false);
if (printers)
{
- QPtrListIterator<KMPrinter> it(*printers);
+ TQPtrListIterator<KMPrinter> it(*printers);
for (;it.current();++it)
{
initEditPrinter(it.current());
@@ -192,7 +192,7 @@ void KPrinterImpl::broadcastOption(const QString& key, const QString& value)
}
}
-int KPrinterImpl::dcopPrint(const QString& cmd, const QStringList& files, bool removeflag)
+int KPrinterImpl::dcopPrint(const TQString& cmd, const TQStringList& files, bool removeflag)
{
kdDebug(500) << "kdeprint: print command: " << cmd << endl;
@@ -203,24 +203,24 @@ int KPrinterImpl::dcopPrint(const QString& cmd, const QStringList& files, bool r
return result;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << cmd;
arg << files;
arg << removeflag;
- if (dclient->call( "kded", "kdeprintd", "print(QString,QStringList,bool)", data, replyType, replyData ))
+ if (dclient->call( "kded", "kdeprintd", "print(TQString,TQStringList,bool)", data, replyType, replyData ))
{
if (replyType == "int")
{
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
}
}
return result;
}
-void KPrinterImpl::statusMessage(const QString& msg, KPrinter *printer)
+void KPrinterImpl::statusMessage(const TQString& msg, KPrinter *printer)
{
kdDebug(500) << "kdeprint: status message: " << msg << endl;
KConfig *conf = KMFactory::self()->printConfig();
@@ -238,15 +238,15 @@ void KPrinterImpl::statusMessage(const QString& msg, KPrinter *printer)
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << message;
arg << (int)getpid();
arg << kapp->caption();
- dclient->send( "kded", "kdeprintd", "statusMessage(QString,int,QString)", data );
+ dclient->send( "kded", "kdeprintd", "statusMessage(TQString,int,TQString)", data );
}
-bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QStringList& files, bool flag)
+bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const TQStringList& files, bool flag)
{
statusMessage(i18n("Sending print data to printer: %1").arg(printer->printerName()), printer);
@@ -254,8 +254,8 @@ bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QS
QStringList printfiles;
if (command.find("%in") == -1) command.append(" %in");
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
- if (QFile::exists(*it))
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ if (TQFile::exists(*it))
{
// quote filenames
filestr.append(quote(*it)).append(" ");
@@ -292,18 +292,18 @@ bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QS
//}
}
-QString KPrinterImpl::tempFile()
+TQString KPrinterImpl::tempFile()
{
QString f;
// be sure the file doesn't exist
- do f = locateLocal("tmp","kdeprint_") + KApplication::randomString(8); while (QFile::exists(f));
+ do f = locateLocal("tmp","kdeprint_") + KApplication::randomString(8); while (TQFile::exists(f));
return f;
}
-int KPrinterImpl::filterFiles(KPrinter *printer, QStringList& files, bool flag)
+int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag)
{
- QStringList flist = QStringList::split(',',printer->option("_kde-filters"),false);
- QMap<QString,QString> opts = printer->options();
+ QStringList flist = TQStringList::split(',',printer->option("_kde-filters"),false);
+ TQMap<TQString,TQString> opts = printer->options();
// generic page selection mechanism (using psselect filter)
// do it only if:
@@ -339,7 +339,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, QStringList& files, bool flag)
return doFilterFiles(printer, files, flist, opts, flag);
}
-int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QStringList& flist, const QMap<QString,QString>& opts, bool flag)
+int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQStringList& flist, const TQMap<TQString,TQString>& opts, bool flag)
{
// nothing to do
if (flist.count() == 0)
@@ -376,7 +376,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
QString rin("%in"), rout("%out"), rpsl("%psl"), rpsu("%psu");
QString ps = pageSizeToPageName( printer->option( "kde-printsize" ).isEmpty() ? printer->pageSize() : ( KPrinter::PageSize )printer->option( "kde-printsize" ).toInt() );
- for (QStringList::Iterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it)
{
QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
if (inputMimeTypes.find(mime) == inputMimeTypes.end())
@@ -386,7 +386,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
"(this may happen with non-CUPS spoolers when performing page selection "
"on a non-PostScript file). Do you want KDE to convert the file to a supported "
"format?</p>").arg(mime),
- QString::null, i18n("Convert")) == KMessageBox::Continue)
+ TQString::null, i18n("Convert")) == KMessageBox::Continue)
{
QStringList ff;
int done(0);
@@ -411,7 +411,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
}
else
{
- int result = doFilterFiles(printer, ff, filters, QMap<QString,QString>(), flag);
+ int result = doFilterFiles(printer, ff, filters, TQMap<TQString,TQString>(), flag);
if (result == 1)
{
*it = ff[0];
@@ -439,22 +439,22 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
cmd.replace(rpsu,ps);
cmd.replace(rin,quote(*it)); // Replace as last, filename could contain "%psl"
statusMessage(i18n("Filtering print data"), printer);
- int status = system(QFile::encodeName(cmd));
+ int status = system(TQFile::encodeName(cmd));
if (status < 0 || WEXITSTATUS(status) == 127)
{
printer->setErrorMessage(i18n("Error while filtering. Command was: <b>%1</b>.").arg(filtercmd));
return -1;
}
- if (flag) QFile::remove(*it);
+ if (flag) TQFile::remove(*it);
*it = tmpfile;
}
return 1;
}
-int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool flag)
+int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool flag)
{
- QString primaryMimeType = "application/postscript";
- QStringList mimeTypes( primaryMimeType );
+ TQString primaryMimeType = "application/postscript";
+ TQStringList mimeTypes( primaryMimeType );
if ( printer->option( "kde-isspecial" ) == "1" )
{
if ( !printer->option( "kde-special-command" ).isEmpty() )
@@ -477,7 +477,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
}
KMFactory::PluginInfo info = KMFactory::self()->pluginInfo(KMFactory::self()->printSystem());
int status(0), result;
- for (QStringList::Iterator it=files.begin(); it!=files.end(); )
+ for (TQStringList::Iterator it=files.begin(); it!=files.end(); )
{
QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
if ( mime == "application/x-zerosize" )
@@ -485,9 +485,9 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
// special case of empty file
KMessageBox::information( NULL,
i18n( "<qt>The print file is empty and will be ignored:<p>%1</p></qt>" ).arg( *it ),
- QString::null, "emptyFileNotPrinted" );
+ TQString::null, "emptyFileNotPrinted" );
if ( flag )
- QFile::remove( *it );
+ TQFile::remove( *it );
it = files.remove( it );
continue;
}
@@ -505,10 +505,10 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
"(Select <em>Cancel</em>) </li>"
"</ul> "
"Do you want KDE to attempt and convert this file to %2?</qt>").arg(mime).arg(primaryMimeType),
- QString::null,
+ TQString::null,
i18n("Convert"),
i18n("Keep"),
- QString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
+ TQString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
{
// find the filter chain
QStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType);
@@ -525,12 +525,12 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
"</qt>").arg(mime).arg(primaryMimeType),
i18n("Print"));
if (flag)
- QFile::remove(*it);
+ TQFile::remove(*it);
it = files.remove(it);
continue;
}
QStringList l(*it);
- switch (doFilterFiles(printer, l, flist, QMap<QString,QString>(), flag))
+ switch (doFilterFiles(printer, l, flist, TQMap<TQString,TQString>(), flag))
{
case -1:
return -1;
@@ -553,7 +553,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
return status;
}
-bool KPrinterImpl::setupSpecialCommand(QString& cmd, KPrinter *p, const QStringList&)
+bool KPrinterImpl::setupSpecialCommand(TQString& cmd, KPrinter *p, const TQStringList&)
{
QString s(p->option("kde-special-command"));
if (s.isEmpty())
@@ -572,10 +572,10 @@ bool KPrinterImpl::setupSpecialCommand(QString& cmd, KPrinter *p, const QStringL
return true;
}
-QString KPrinterImpl::quote(const QString& s)
+TQString KPrinterImpl::quote(const TQString& s)
{ return KProcess::quote(s); }
-void KPrinterImpl::saveOptions(const QMap<QString,QString>& opts)
+void KPrinterImpl::saveOptions(const TQMap<TQString,TQString>& opts)
{
m_options = opts;
saveAppOptions();
@@ -594,7 +594,7 @@ void KPrinterImpl::loadAppOptions()
void KPrinterImpl::saveAppOptions()
{
QStringList optlist;
- for (QMap<QString,QString>::ConstIterator it=m_options.begin(); it!=m_options.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=m_options.begin(); it!=m_options.end(); ++it)
if (it.key().startsWith("app-"))
optlist << it.key() << it.data();
diff --git a/kdeprint/kprinterimpl.h b/kdeprint/kprinterimpl.h
index 94096e20a..ae6b8b75d 100644
--- a/kdeprint/kprinterimpl.h
+++ b/kdeprint/kprinterimpl.h
@@ -21,10 +21,10 @@
#ifndef KPRINTERIMPL_H
#define KPRINTERIMPL_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -35,36 +35,36 @@ class KDEPRINT_EXPORT KPrinterImpl : public QObject
{
Q_OBJECT
public:
- KPrinterImpl(QObject *parent = 0, const char *name = 0);
+ KPrinterImpl(TQObject *parent = 0, const char *name = 0);
virtual ~KPrinterImpl();
- virtual bool setupCommand(QString& cmd, KPrinter*);
+ virtual bool setupCommand(TQString& cmd, KPrinter*);
virtual void preparePrinting(KPrinter*);
- virtual void broadcastOption(const QString& key, const QString& value);
+ virtual void broadcastOption(const TQString& key, const TQString& value);
- bool printFiles(KPrinter*, const QStringList&, bool removeflag = false);
+ bool printFiles(KPrinter*, const TQStringList&, bool removeflag = false);
// result:
// -1 -> error
// 0 -> nothing happened
// 1 -> files filterd
- int filterFiles(KPrinter*, QStringList&, bool removeflag = false);
- int autoConvertFiles(KPrinter*, QStringList&, bool removeflag = false);
- void saveOptions(const QMap<QString,QString>& opts);
- const QMap<QString,QString>& loadOptions() const { return m_options; }
- QString tempFile();
- QString quote(const QString&);
- void statusMessage(const QString&, KPrinter* = 0);
+ int filterFiles(KPrinter*, TQStringList&, bool removeflag = false);
+ int autoConvertFiles(KPrinter*, TQStringList&, bool removeflag = false);
+ void saveOptions(const TQMap<TQString,TQString>& opts);
+ const TQMap<TQString,TQString>& loadOptions() const { return m_options; }
+ TQString tempFile();
+ TQString quote(const TQString&);
+ void statusMessage(const TQString&, KPrinter* = 0);
protected:
- bool startPrinting(const QString& cmd, KPrinter *printer, const QStringList& files, bool removeflag = false);
- int dcopPrint(const QString& cmd, const QStringList& files, bool removeflag = false);
- bool setupSpecialCommand(QString&, KPrinter*, const QStringList&);
- int doFilterFiles(KPrinter* pr, QStringList& files, const QStringList& flist, const QMap<QString,QString>& opts, bool removeflag = false);
+ bool startPrinting(const TQString& cmd, KPrinter *printer, const TQStringList& files, bool removeflag = false);
+ int dcopPrint(const TQString& cmd, const TQStringList& files, bool removeflag = false);
+ bool setupSpecialCommand(TQString&, KPrinter*, const TQStringList&);
+ int doFilterFiles(KPrinter* pr, TQStringList& files, const TQStringList& flist, const TQMap<TQString,TQString>& opts, bool removeflag = false);
void loadAppOptions();
void saveAppOptions();
protected:
- QMap<QString,QString> m_options; // use to save current options
+ TQMap<TQString,TQString> m_options; // use to save current options
};
#endif
diff --git a/kdeprint/kprinterpropertydialog.cpp b/kdeprint/kprinterpropertydialog.cpp
index 8bafeb171..ab3b44f05 100644
--- a/kdeprint/kprinterpropertydialog.cpp
+++ b/kdeprint/kprinterpropertydialog.cpp
@@ -26,21 +26,21 @@
#include "driver.h"
#include <kmessagebox.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kguiitem.h>
-KPrinterPropertyDialog::KPrinterPropertyDialog(KMPrinter *p, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Ok, false, KStdGuiItem::save()),
+KPrinterPropertyDialog::KPrinterPropertyDialog(KMPrinter *p, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Ok, false, KStdGuiItem::save()),
m_printer(p), m_driver(0), m_current(0)
{
m_pages.setAutoDelete(false);
// set a margin
- m_tw = new QTabWidget(this);
+ m_tw = new TQTabWidget(this);
m_tw->setMargin(10);
- connect(m_tw,SIGNAL(currentChanged(QWidget*)),SLOT(slotCurrentChanged(QWidget*)));
+ connect(m_tw,TQT_SIGNAL(currentChanged(TQWidget*)),TQT_SLOT(slotCurrentChanged(TQWidget*)));
setMainWidget(m_tw);
if (m_printer)
@@ -52,7 +52,7 @@ KPrinterPropertyDialog::~KPrinterPropertyDialog()
delete m_driver;
}
-void KPrinterPropertyDialog::slotCurrentChanged(QWidget *w)
+void KPrinterPropertyDialog::slotCurrentChanged(TQWidget *w)
{
if (m_current) m_current->getOptions(m_options,true);
m_current = (KPrintDialogPage*)w;
@@ -69,7 +69,7 @@ bool KPrinterPropertyDialog::synchronize()
{
if (m_current) m_current->getOptions(m_options,true);
QString msg;
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (;it.current();++it)
{
it.current()->setOptions(m_options);
@@ -82,25 +82,25 @@ bool KPrinterPropertyDialog::synchronize()
return true;
}
-void KPrinterPropertyDialog::setOptions(const QMap<QString,QString>& opts)
+void KPrinterPropertyDialog::setOptions(const TQMap<TQString,TQString>& opts)
{
// merge the 2 options sets
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
m_options[it.key()] = it.data();
// update all existing pages
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (; it.current(); ++it)
it.current()->setOptions(m_options);
}
-void KPrinterPropertyDialog::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPrinterPropertyDialog::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
collectOptions(opts, incldef);
}
-void KPrinterPropertyDialog::collectOptions(QMap<QString,QString>& opts, bool incldef)
+void KPrinterPropertyDialog::collectOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (;it.current();++it)
it.current()->getOptions(opts,incldef);
}
@@ -116,10 +116,10 @@ void KPrinterPropertyDialog::slotUser1()
{
if (m_printer && synchronize())
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
collectOptions(opts, false);
m_printer->setDefaultOptions(opts);
- m_printer->setEditedOptions(QMap<QString,QString>());
+ m_printer->setEditedOptions(TQMap<TQString,TQString>());
m_printer->setEdited(false);
KMFactory::self()->virtualManager()->triggerSave();
}
@@ -130,7 +130,7 @@ void KPrinterPropertyDialog::enableSaveButton(bool state)
showButton(KDialogBase::User1, state);
}
-void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, QWidget *parent)
+void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, TQWidget *parent)
{
KPrinterPropertyDialog dlg(pr,parent,"PropertyDialog");
KMFactory::self()->uiManager()->setupPropertyDialog(&dlg);
@@ -138,7 +138,7 @@ void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, QWidget *parent)
KMessageBox::information(parent,i18n("No configurable options for that printer."),i18n("Printer Configuration"));
else if (dlg.exec())
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
dlg.collectOptions(opts, false);
pr->setEditedOptions(opts);
pr->setEdited(true);
diff --git a/kdeprint/kprinterpropertydialog.h b/kdeprint/kprinterpropertydialog.h
index 5f6830b21..de99e0bfd 100644
--- a/kdeprint/kprinterpropertydialog.h
+++ b/kdeprint/kprinterpropertydialog.h
@@ -22,8 +22,8 @@
#define KPRINTERPROPERTYDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class KMPrinter;
class KPrintDialogPage;
@@ -34,34 +34,34 @@ class KDEPRINT_EXPORT KPrinterPropertyDialog : public KDialogBase
{
Q_OBJECT
public:
- KPrinterPropertyDialog(KMPrinter *printer, QWidget *parent = 0, const char *name = 0);
+ KPrinterPropertyDialog(KMPrinter *printer, TQWidget *parent = 0, const char *name = 0);
~KPrinterPropertyDialog();
KMPrinter* printer() { return m_printer; }
DrMain* driver() { return m_driver; }
void setDriver(DrMain* d) { if (!m_driver) m_driver = d; }
void addPage(KPrintDialogPage*);
- void setOptions(const QMap<QString,QString>&);
- void getOptions(QMap<QString,QString>&, bool = false);
+ void setOptions(const TQMap<TQString,TQString>&);
+ void getOptions(TQMap<TQString,TQString>&, bool = false);
void enableSaveButton(bool);
- static void setupPrinter(KMPrinter *printer, QWidget *parent);
+ static void setupPrinter(KMPrinter *printer, TQWidget *parent);
protected:
bool synchronize();
- void collectOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void collectOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
- void slotCurrentChanged(QWidget*);
+ void slotCurrentChanged(TQWidget*);
void slotUser1();
void slotOk();
protected:
KMPrinter *m_printer;
DrMain *m_driver;
- QPtrList<KPrintDialogPage> m_pages;
+ TQPtrList<KPrintDialogPage> m_pages;
KPrintDialogPage *m_current;
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
QTabWidget *m_tw;
QPushButton *m_save;
};
diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp
index 6118f19b8..ab669ea6e 100644
--- a/kdeprint/kprintpreview.cpp
+++ b/kdeprint/kprintpreview.cpp
@@ -21,9 +21,9 @@
#include "kprintpreview.h"
#include "kmfactory.h"
-#include <qfile.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kparts/part.h>
#include <kaccel.h>
@@ -45,7 +45,7 @@ KPreviewProc::KPreviewProc()
: KProcess()
{
m_bOk = false;
- connect(this, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
}
KPreviewProc::~KPreviewProc()
@@ -80,7 +80,7 @@ class KPrintPreview::KPrintPreviewPrivate
public:
KPrintPreviewPrivate(KPrintPreview *dlg) : gvpart_(0)
{
- mainwidget_ = new QWidget(dlg, "MainWidget");
+ mainwidget_ = new TQWidget(dlg, "MainWidget");
toolbar_ = new KToolBar(mainwidget_, "PreviewToolBar", true);
actions_ = new KActionCollection(dlg);
accel_ = new KAccel(dlg);
@@ -108,11 +108,11 @@ static KLibFactory* componentFactory()
{
kdDebug(500) << "kdeprint: querying trader for 'application/postscript' service" << endl;
KLibFactory *factory(0);
- KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("application/postscript"), QString::fromLatin1("KParts/ReadOnlyPart"), QString::null, QString::null);
+ KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null);
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
KService::Ptr service = *it;
- factory = KLibLoader::self()->factory(QFile::encodeName(service->library()));
+ factory = KLibLoader::self()->factory(TQFile::encodeName(service->library()));
if (factory)
break;
}
@@ -124,7 +124,7 @@ static KLibFactory* componentFactory()
return factory;
}
-static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly)
+static bool continuePrint(const TQString& msg_, TQWidget *parent, bool previewOnly)
{
QString msg(msg_);
if (previewOnly)
@@ -135,13 +135,13 @@ static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly
else
{
msg.append(" ").append(i18n("Do you want to continue printing anyway?"));
- return (KMessageBox::warningContinueCancel(parent, msg, QString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
+ return (KMessageBox::warningContinueCancel(parent, msg, TQString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
}
}
//*******************************************************************************************
-KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
+KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly)
: KDialogBase(parent, "PreviewDlg", true, i18n("Print Preview"), 0)
{
kdDebug(500) << "kdeprint: creating preview dialog" << endl;
@@ -151,11 +151,11 @@ KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
// create main view and actions
setMainWidget(d->mainwidget_);
if (previewOnly)
- KStdAction::close(this, SLOT(reject()), d->actions_, "close_print");
+ KStdAction::close(this, TQT_SLOT(reject()), d->actions_, "close_print");
else
{
- new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, SLOT(accept()), d->actions_, "continue_print");
- new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, SLOT(reject()), d->actions_, "stop_print");
+ new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, TQT_SLOT(accept()), d->actions_, "continue_print");
+ new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, TQT_SLOT(reject()), d->actions_, "stop_print");
}
}
@@ -180,14 +180,14 @@ void KPrintPreview::initView(KLibFactory *factory)
}
if (d->gvpart_)
{
- QDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
+ TQDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
if ( l.length() > 0 )
{
d->toolbar_->insertLineSeparator();
- QDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
+ TQDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
for ( uint i=0; i<acts.length(); i++ )
{
- QDomElement a = acts.item( i ).toElement();
+ TQDomElement a = acts.item( i ).toElement();
if ( a.attribute( "name" ) == "goToPage" )
continue;
KAction *act = d->gvpart_->action( a );
@@ -215,7 +215,7 @@ void KPrintPreview::initView(KLibFactory *factory)
//d->adjustSize();
// construct the layout
- QVBoxLayout *l0 = new QVBoxLayout(d->mainwidget_, 0, 0);
+ QVBoxLayout *l0 = new TQVBoxLayout(d->mainwidget_, 0, 0);
l0->addWidget(d->toolbar_, AlignTop);
if (d->gvpart_)
l0->addWidget(d->gvpart_->widget());
@@ -224,7 +224,7 @@ void KPrintPreview::initView(KLibFactory *factory)
setCaption(i18n("Print Preview"));
}
-void KPrintPreview::openFile(const QString& file)
+void KPrintPreview::openFile(const TQString& file)
{
d->gvpart_->openURL(KURL(file));
}
@@ -234,7 +234,7 @@ bool KPrintPreview::isValid() const
return (d->gvpart_ != 0);
}
-bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
+bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId)
{
KMimeType::Ptr mime = KMimeType::findByPath( file );
bool isPS = ( mime->name() == "application/postscript" );
@@ -245,7 +245,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
conf->setGroup("General");
KLibFactory *factory(0);
bool externalPreview = conf->readBoolEntry("ExternalPreview", false);
- QWidget *parentW = QWidget::find(parentId);
+ QWidget *parentW = TQWidget::find(parentId);
QString exe;
if (!externalPreview && isPS && (factory = componentFactory()) != 0)
{
@@ -282,12 +282,12 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else
{
- KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), QString::null );
+ KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), TQString::null );
if ( serv )
{
KURL url;
url.setPath( file );
- QStringList args = KRun::processDesktopExec( *serv, url, false );
+ TQStringList args = KRun::processDesktopExec( *serv, url, false );
proc << args;
exe = serv->name();
}
@@ -295,7 +295,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
{
// in that case, the PS viewer component could not be loaded and no service
// could be found to view PS
- QString msg;
+ TQString msg;
if ( isPS )
msg = i18n("Preview failed: neither the internal KDE PostScript "
"viewer (KGhostView) nor any other external PostScript "
@@ -316,7 +316,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else if (!previewOnly)
{
- return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), QString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
+ return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), TQString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
}
else
return false;
diff --git a/kdeprint/kprintpreview.h b/kdeprint/kprintpreview.h
index 05e2b3ed3..9193bad3e 100644
--- a/kdeprint/kprintpreview.h
+++ b/kdeprint/kprintpreview.h
@@ -22,7 +22,7 @@
#define KPRINTPREVIEW_H
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kprocess.h>
class KLibFactory;
@@ -31,13 +31,13 @@ class KPrintPreview : public KDialogBase
{
Q_OBJECT
public:
- KPrintPreview(QWidget *parent = 0, bool previewOnly = false);
+ KPrintPreview(TQWidget *parent = 0, bool previewOnly = false);
~KPrintPreview();
- void openFile(const QString& file);
+ void openFile(const TQString& file);
bool isValid() const;
- static bool preview(const QString& file, bool previewOnly = false, WId parentId = 0);
+ static bool preview(const TQString& file, bool previewOnly = false, WId parentId = 0);
private:
void initView(KLibFactory*);
diff --git a/kdeprint/kprintprocess.cpp b/kdeprint/kprintprocess.cpp
index 830f8c885..65ae44eb5 100644
--- a/kdeprint/kprintprocess.cpp
+++ b/kdeprint/kprintprocess.cpp
@@ -20,35 +20,35 @@
#include "kprintprocess.h"
#include <kapplication.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
KPrintProcess::KPrintProcess()
: KShellProcess()
{
// redirect everything to a single buffer
- connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect(this,SIGNAL(receivedStderr(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect( this, SIGNAL( processExited( KProcess* ) ), SLOT( slotExited( KProcess* ) ) );
+ connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect( this, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( slotExited( KProcess* ) ) );
m_state = None;
}
KPrintProcess::~KPrintProcess()
{
if ( !m_tempoutput.isEmpty() )
- QFile::remove( m_tempoutput );
+ TQFile::remove( m_tempoutput );
if ( m_tempfiles.size() > 0 )
- for ( QStringList::ConstIterator it=m_tempfiles.begin(); it!=m_tempfiles.end(); ++it )
- QFile::remove( *it );
+ for ( TQStringList::ConstIterator it=m_tempfiles.begin(); it!=m_tempfiles.end(); ++it )
+ TQFile::remove( *it );
}
-QString KPrintProcess::errorMessage() const
+TQString KPrintProcess::errorMessage() const
{
return m_buffer;
}
bool KPrintProcess::print()
{
- m_buffer = QString::null;
+ m_buffer = TQString::null;
m_state = Printing;
return start(NotifyOnExit,All);
}
@@ -57,7 +57,7 @@ void KPrintProcess::slotReceivedStderr(KProcess *proc, char *buf, int len)
{
if (proc == this)
{
- QCString str = QCString(buf,len).stripWhiteSpace();
+ QCString str = TQCString(buf,len).stripWhiteSpace();
m_buffer.append(str.append("\n"));
}
}
diff --git a/kdeprint/kprintprocess.h b/kdeprint/kprintprocess.h
index 5669d6a4c..13943d05d 100644
--- a/kdeprint/kprintprocess.h
+++ b/kdeprint/kprintprocess.h
@@ -21,7 +21,7 @@
#define KPRINTPROCESS_H
#include <kprocess.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPrintProcess : public KShellProcess
{
@@ -31,23 +31,23 @@ public:
~KPrintProcess();
bool print();
- QString errorMessage() const;
+ TQString errorMessage() const;
- void setOutput( const QString& output );
- const QString& output() const;
- void setTempOutput( const QString& output );
- const QString& tempOutput() const;
- void setTempFiles( const QStringList& files );
- const QStringList& tempFiles() const;
- void setCommand( const QString& cmd );
- const QString& command() const;
+ void setOutput( const TQString& output );
+ const TQString& output() const;
+ void setTempOutput( const TQString& output );
+ const TQString& tempOutput() const;
+ void setTempFiles( const TQStringList& files );
+ const TQStringList& tempFiles() const;
+ void setCommand( const TQString& cmd );
+ const TQString& command() const;
enum State { None = 0, Printing, Finishing };
int state() const;
signals:
void printTerminated( KPrintProcess* );
- void printError( KPrintProcess*, const QString& );
+ void printError( KPrintProcess*, const TQString& );
protected slots:
void slotReceivedStderr(KProcess*, char*, int);
@@ -55,33 +55,33 @@ protected slots:
private:
QString m_buffer;
- QStringList m_tempfiles;
- QString m_output, m_tempoutput, m_command;
+ TQStringList m_tempfiles;
+ TQString m_output, m_tempoutput, m_command;
int m_state;
};
-inline const QString& KPrintProcess::output() const
+inline const TQString& KPrintProcess::output() const
{ return m_output; }
-inline const QString& KPrintProcess::tempOutput() const
+inline const TQString& KPrintProcess::tempOutput() const
{ return m_tempoutput; }
-inline const QStringList& KPrintProcess::tempFiles() const
+inline const TQStringList& KPrintProcess::tempFiles() const
{ return m_tempfiles; }
-inline const QString& KPrintProcess::command() const
+inline const TQString& KPrintProcess::command() const
{ return m_command; }
-inline void KPrintProcess::setOutput( const QString& s )
+inline void KPrintProcess::setOutput( const TQString& s )
{ m_output = s; }
-inline void KPrintProcess::setTempOutput( const QString& s )
+inline void KPrintProcess::setTempOutput( const TQString& s )
{ m_tempoutput = s; }
-inline void KPrintProcess::setTempFiles( const QStringList& l )
+inline void KPrintProcess::setTempFiles( const TQStringList& l )
{ m_tempfiles = l; }
-inline void KPrintProcess::setCommand( const QString& c )
+inline void KPrintProcess::setCommand( const TQString& c )
{ m_command = c; }
inline int KPrintProcess::state() const
diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp
index c937e3443..27f8c6642 100644
--- a/kdeprint/kxmlcommand.cpp
+++ b/kdeprint/kxmlcommand.cpp
@@ -23,12 +23,12 @@
#include "kdeprintcheck.h"
#include "driverview.h"
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qinputdialog.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqinputdialog.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -38,7 +38,7 @@
#include <klibloader.h>
#include <kmessagebox.h>
-static void setOptionText(DrBase *opt, const QString& s)
+static void setOptionText(DrBase *opt, const TQString& s)
{
if (s.isEmpty())
opt->set("text", opt->name());
@@ -61,11 +61,11 @@ public:
QStringList m_inputMime;
QStringList m_requirements;
bool m_loaded[2]; // 0 -> Desktop, 1 -> XML
- QString m_comment;
+ TQString m_comment;
};
-KXmlCommand::KXmlCommand(const QString& xmlId)
-: QObject(KXmlCommandManager::self(), "XmlCommand")
+KXmlCommand::KXmlCommand(const TQString& xmlId)
+: TQObject(KXmlCommandManager::self(), "XmlCommand")
{
init();
d->m_name = xmlId;
@@ -87,19 +87,19 @@ void KXmlCommand::init()
d->m_loaded[0] = d->m_loaded[1] = false;
}
-QString KXmlCommand::name() const
+TQString KXmlCommand::name() const
{ return d->m_name; }
-void KXmlCommand::setName(const QString& s)
+void KXmlCommand::setName(const TQString& s)
{ d->m_name = s; }
-QString KXmlCommand::command()
+TQString KXmlCommand::command()
{
check(true);
return d->m_command;
}
-void KXmlCommand::setCommand(const QString& s)
+void KXmlCommand::setCommand(const TQString& s)
{
d->m_command = s;
}
@@ -125,74 +125,74 @@ void KXmlCommand::setDriver(DrMain *driver)
d->m_driver = driver;
}
-QString KXmlCommand::io(bool io_input, bool io_pipe)
+TQString KXmlCommand::io(bool io_input, bool io_pipe)
{
check(true);
return d->m_io[(io_input?0:1)].m_format[(io_pipe?1:0)];
}
-void KXmlCommand::setIo(const QString& s, bool io_input, bool io_pipe)
+void KXmlCommand::setIo(const TQString& s, bool io_input, bool io_pipe)
{
d->m_io[(io_input?0:1)].m_format[(io_pipe?1:0)] = s;
}
-QString KXmlCommand::description()
+TQString KXmlCommand::description()
{
check();
return d->m_description;
}
-void KXmlCommand::setDescription(const QString& s)
+void KXmlCommand::setDescription(const TQString& s)
{
d->m_description = s;
}
-QString KXmlCommand::mimeType()
+TQString KXmlCommand::mimeType()
{
check();
return d->m_outputMime;
}
-void KXmlCommand::setMimeType(const QString& s)
+void KXmlCommand::setMimeType(const TQString& s)
{
d->m_outputMime = s;
}
-bool KXmlCommand::acceptMimeType(const QString& s)
+bool KXmlCommand::acceptMimeType(const TQString& s)
{
check();
return (d->m_inputMime.find(s) != d->m_inputMime.end());
}
-QStringList KXmlCommand::inputMimeTypes()
+TQStringList KXmlCommand::inputMimeTypes()
{
check();
return d->m_inputMime;
}
-void KXmlCommand::setInputMimeTypes(const QStringList& l)
+void KXmlCommand::setInputMimeTypes(const TQStringList& l)
{
d->m_inputMime = l;
}
-QStringList KXmlCommand::requirements()
+TQStringList KXmlCommand::requirements()
{
check();
return d->m_requirements;
}
-void KXmlCommand::setRequirements(const QStringList& l)
+void KXmlCommand::setRequirements(const TQStringList& l)
{
d->m_requirements = l;
}
-QString KXmlCommand::comment()
+TQString KXmlCommand::comment()
{
check();
return d->m_comment;
}
-void KXmlCommand::setComment( const QString& s )
+void KXmlCommand::setComment( const TQString& s )
{
d->m_comment = s;
}
@@ -272,7 +272,7 @@ void KXmlCommand::loadXml()
}
}
-void KXmlCommand::parseIO(const QDomElement& e, int n)
+void KXmlCommand::parseIO(const TQDomElement& e, int n)
{
QDomElement elem = e.firstChild().toElement();
while (!elem.isNull())
@@ -286,7 +286,7 @@ void KXmlCommand::parseIO(const QDomElement& e, int n)
}
}
-DrGroup* KXmlCommand::parseGroup(const QDomElement& e, DrGroup *grp)
+DrGroup* KXmlCommand::parseGroup(const TQDomElement& e, DrGroup *grp)
{
if (!grp)
grp = new DrGroup;
@@ -314,7 +314,7 @@ DrGroup* KXmlCommand::parseGroup(const QDomElement& e, DrGroup *grp)
return grp;
}
-DrBase* KXmlCommand::parseArgument(const QDomElement& e)
+DrBase* KXmlCommand::parseArgument(const TQDomElement& e)
{
DrBase *opt(0);
QString type = e.attribute("type");
@@ -363,26 +363,26 @@ DrBase* KXmlCommand::parseArgument(const QDomElement& e)
return opt;
}
-QString KXmlCommand::buildCommand(const QMap<QString,QString>& opts, bool pipein, bool pipeout)
+TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pipein, bool pipeout)
{
check(true);
QString str, cmd = d->m_command;
- QString re( "%value" ), quotedRe( "'%value'" );
+ TQString re( "%value" ), quotedRe( "'%value'" );
if (d->m_driver)
{
- QMap<QString,QString> fopts;
+ TQMap<TQString,TQString> fopts;
d->m_driver->setOptions(opts);
d->m_driver->getOptions(fopts, false);
- for (QMap<QString,QString>::ConstIterator it=fopts.begin(); it!=fopts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=fopts.begin(); it!=fopts.end(); ++it)
{
DrBase *dopt = d->m_driver->findOption(it.key());
if (dopt)
{
QString format = dopt->get("format");
- QString value = dopt->valueText();
+ TQString value = dopt->valueText();
if ( format.find( quotedRe ) != -1 )
{
if ( ( value.right( 1 ) == "'" && value.left( 1 ) == "'" ) ||
@@ -407,7 +407,7 @@ QString KXmlCommand::buildCommand(const QMap<QString,QString>& opts, bool pipein
return cmd;
}
-void KXmlCommand::setOptions(const QMap<QString,QString>& opts)
+void KXmlCommand::setOptions(const TQMap<TQString,TQString>& opts)
{
if (opts.count() == 0)
return;
@@ -416,7 +416,7 @@ void KXmlCommand::setOptions(const QMap<QString,QString>& opts)
d->m_driver->setOptions(opts);
}
-void KXmlCommand::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KXmlCommand::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
// force loading the driver
if (driver())
@@ -460,7 +460,7 @@ void KXmlCommand::saveXml()
f.close();
}
-QDomElement KXmlCommand::createIO(QDomDocument& doc, int n, const QString& tag)
+TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& tag)
{
QDomElement elem = doc.createElement(tag);
if (d->m_command.find("%"+tag) != -1)
@@ -477,24 +477,24 @@ QDomElement KXmlCommand::createIO(QDomDocument& doc, int n, const QString& tag)
return elem;
}
-QDomElement KXmlCommand::createGroup(QDomDocument& doc, DrGroup *group)
+TQDomElement KXmlCommand::createGroup(TQDomDocument& doc, DrGroup *group)
{
QDomElement elem = doc.createElement("filtergroup");
elem.setAttribute("name", group->name());
elem.setAttribute("description", group->get("text"));
- QPtrListIterator<DrGroup> git(group->groups());
+ TQPtrListIterator<DrGroup> git(group->groups());
for (; git.current(); ++git)
elem.appendChild(createGroup(doc, git.current()));
- QPtrListIterator<DrBase> oit(group->options());
+ TQPtrListIterator<DrBase> oit(group->options());
for (; oit.current(); ++oit)
elem.appendChild(createElement(doc, oit.current()));
return elem;
}
-QDomElement KXmlCommand::createElement(QDomDocument& doc, DrBase *opt)
+TQDomElement KXmlCommand::createElement(TQDomDocument& doc, DrBase *opt)
{
QDomElement elem = doc.createElement("filterarg");
QString elemName = opt->name();
@@ -521,7 +521,7 @@ QDomElement KXmlCommand::createElement(QDomDocument& doc, DrBase *opt)
case DrBase::List:
elem.setAttribute("type", (opt->type() == DrBase::List ? "list" : "bool"));
{
- QPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
for (; it.current(); ++it)
{
QDomElement chElem = doc.createElement("value");
@@ -544,8 +544,8 @@ class KXmlCommandManager::KXmlCommandManagerPrivate
{
public:
QStringList m_cmdlist;
- QMap<QString, QValueList<KXmlCommand*> > m_mimemap;
- QMap<QString, KXmlCommand*> m_cmdmap;
+ TQMap<TQString, TQValueList<KXmlCommand*> > m_mimemap;
+ TQMap<TQString, KXmlCommand*> m_cmdmap;
};
KXmlCommandManager* KXmlCommandManager::m_self = 0;
@@ -561,7 +561,7 @@ KXmlCommandManager* KXmlCommandManager::self()
}
KXmlCommandManager::KXmlCommandManager()
-: QObject(KMFactory::self(), "XmlCommandManager")
+: TQObject(KMFactory::self(), "XmlCommandManager")
{
d = new KXmlCommandManagerPrivate;
}
@@ -572,7 +572,7 @@ KXmlCommandManager::~KXmlCommandManager()
delete d;
}
-KXmlCommand* KXmlCommandManager::loadCommand(const QString& xmlId, bool check)
+KXmlCommand* KXmlCommandManager::loadCommand(const TQString& xmlId, bool check)
{
if (check)
{
@@ -593,7 +593,7 @@ void KXmlCommandManager::saveCommand(KXmlCommand *xmlCmd)
void KXmlCommandManager::cleanUp()
{
- for (QMap<QString, KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
+ for (TQMap<TQString, KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
delete (*it);
d->m_cmdmap.clear();
d->m_mimemap.clear();
@@ -605,13 +605,13 @@ void KXmlCommandManager::preload()
if (d->m_cmdmap.count() == 0)
{
commandList();
- for (QStringList::Iterator it=d->m_cmdlist.begin(); it!=d->m_cmdlist.end(); ++it)
+ for (TQStringList::Iterator it=d->m_cmdlist.begin(); it!=d->m_cmdlist.end(); ++it)
{
KXmlCommand *xmlCmd = loadCommand(*it);
if (!xmlCmd) continue; // Error!
QStringList inputMime = xmlCmd->inputMimeTypes();
- for (QStringList::ConstIterator mime=inputMime.begin(); mime!=inputMime.end(); ++mime)
+ for (TQStringList::ConstIterator mime=inputMime.begin(); mime!=inputMime.end(); ++mime)
{
d->m_mimemap[*mime].append(xmlCmd);
d->m_cmdmap[*it] = xmlCmd;
@@ -620,16 +620,16 @@ void KXmlCommandManager::preload()
}
}
-QStringList KXmlCommandManager::commandList()
+TQStringList KXmlCommandManager::commandList()
{
if (d->m_cmdlist.isEmpty())
{
QStringList dirs = KGlobal::dirs()->findDirs("data", "kdeprint/filters/");
- for (QStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it)
+ for (TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it)
{
- QStringList list = QDir(*it).entryList("*.desktop", QDir::Files, QDir::Unsorted);
- for (QStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2)
+ QStringList list = TQDir(*it).entryList("*.desktop", TQDir::Files, TQDir::Unsorted);
+ for (TQStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2)
{
QString cmdName = (*it2).left((*it2).length()-8);
if (d->m_cmdlist.find(cmdName) == d->m_cmdlist.end())
@@ -643,43 +643,43 @@ QStringList KXmlCommandManager::commandList()
return d->m_cmdlist;
}
-QStringList KXmlCommandManager::commandListWithDescription()
+TQStringList KXmlCommandManager::commandListWithDescription()
{
preload();
QStringList l;
- for (QMap<QString,KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
+ for (TQMap<TQString,KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
l << (*it)->name() << (*it)->description();
return l;
}
-QString KXmlCommandManager::selectCommand(QWidget *parent)
+TQString KXmlCommandManager::selectCommand(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library( "libkdeprint_management_module" );
if ( !lib )
{
KMessageBox::error( parent, i18n( "Unable to load KDE print management library: %1" ).arg( KLibLoader::self()->lastErrorMessage() ) );
- return QString::null;
+ return TQString::null;
}
else
{
- QString ( *func )( QWidget* ) = ( QString( * )( QWidget* ) )lib->symbol( "select_command" );
+ TQString ( *func )( TQWidget* ) = ( TQString( * )( TQWidget* ) )lib->symbol( "select_command" );
if ( !func )
{
KMessageBox::error( parent, i18n( "Unable to find wizard object in management library." ) );
- return QString::null;
+ return TQString::null;
}
else
return func( parent );
}
}
-KXmlCommand* KXmlCommandManager::command(const QString& xmlId) const
+KXmlCommand* KXmlCommandManager::command(const TQString& xmlId) const
{
return (d->m_cmdmap.contains(xmlId) ? d->m_cmdmap[xmlId] : 0);
}
-int KXmlCommandManager::insertCommand(QStringList& list, const QString& filtername, bool defaultToStart)
+int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart)
{
preload();
@@ -688,7 +688,7 @@ int KXmlCommandManager::insertCommand(QStringList& list, const QString& filterna
if (f1 && f1->inputMimeTypes().count() > 0)
{
QString mimetype = f1->inputMimeTypes()[0];
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it, pos++)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it, pos++)
{
f2 = command(*it);
if (!f2)
@@ -721,7 +721,7 @@ int KXmlCommandManager::insertCommand(QStringList& list, const QString& filterna
return pos;
}
-QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QString& mimedest)
+TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQString& mimedest)
{
QStringList chain;
uint score(0);
@@ -730,8 +730,8 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
if (d->m_mimemap.contains(mimesrc))
{
- const QValueList<KXmlCommand*> l = d->m_mimemap[mimesrc];
- for (QValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ const TQValueList<KXmlCommand*> l = d->m_mimemap[mimesrc];
+ for (TQValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
// check filter availability
if (!KdeprintChecker::check((*it)->requirements()))
@@ -740,7 +740,7 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
// direct filter: shortest path => return immediately
if ((*it)->mimeType() == mimedest)
{
- chain = QStringList((*it)->name());
+ chain = TQStringList((*it)->name());
break;
}
// non direct filter: find the shortest way between
@@ -769,7 +769,7 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
return chain;
}
-bool KXmlCommandManager::checkCommand(const QString& xmlId, int inputCheck, int outputCheck, QString *msg)
+bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int outputCheck, TQString *msg)
{
KXmlCommand *xmlCmd = command(xmlId);
QString errmsg;
@@ -812,7 +812,7 @@ bool KXmlCommandManager::checkCommand(const QString& xmlId, int inputCheck, int
return status;
}
-bool KXmlCommandManager::configure(KXmlCommand *xmlCmd, QWidget *parent)
+bool KXmlCommandManager::configure(KXmlCommand *xmlCmd, TQWidget *parent)
{
if (xmlCmd->driver())
{
diff --git a/kdeprint/kxmlcommand.h b/kdeprint/kxmlcommand.h
index 66a3a14c3..c6e4c25fc 100644
--- a/kdeprint/kxmlcommand.h
+++ b/kdeprint/kxmlcommand.h
@@ -20,9 +20,9 @@
#ifndef KXMLCOMMAND_H
#define KXMLCOMMAND_H
-#include <qdom.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -37,31 +37,31 @@ class KDEPRINT_EXPORT KXmlCommand : public QObject
public:
~KXmlCommand();
- QString name() const;
- void setName(const QString&);
- QString command();
- void setCommand(const QString&);
+ TQString name() const;
+ void setName(const TQString&);
+ TQString command();
+ void setCommand(const TQString&);
DrMain* driver();
DrMain* takeDriver();
void setDriver(DrMain*);
- QString io(bool io_input = true, bool io_pipe = false);
- void setIo(const QString&, bool io_input = true, bool io_pipe = false);
- QString description();
- void setDescription(const QString&);
- QString mimeType();
- void setMimeType(const QString&);
- bool acceptMimeType(const QString&);
- QStringList inputMimeTypes();
- void setInputMimeTypes(const QStringList&);
- QStringList requirements();
- void setRequirements(const QStringList&);
- QString comment();
- void setComment( const QString& );
+ TQString io(bool io_input = true, bool io_pipe = false);
+ void setIo(const TQString&, bool io_input = true, bool io_pipe = false);
+ TQString description();
+ void setDescription(const TQString&);
+ TQString mimeType();
+ void setMimeType(const TQString&);
+ bool acceptMimeType(const TQString&);
+ TQStringList inputMimeTypes();
+ void setInputMimeTypes(const TQStringList&);
+ TQStringList requirements();
+ void setRequirements(const TQStringList&);
+ TQString comment();
+ void setComment( const TQString& );
bool isValid();
- QString buildCommand(const QMap<QString,QString>& opts, bool pipein = true, bool pipeout = true);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ TQString buildCommand(const TQMap<TQString,TQString>& opts, bool pipein = true, bool pipeout = true);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
void init();
@@ -70,16 +70,16 @@ protected:
void loadDesktop();
void saveDesktop();
void check(bool use_xml = false);
- DrGroup* parseGroup(const QDomElement& e, DrGroup *grp = 0);
- DrBase* parseArgument(const QDomElement& e);
- void parseIO(const QDomElement& e, int n);
- QDomElement createIO(QDomDocument&, int, const QString&);
- QDomElement createGroup(QDomDocument&, DrGroup*);
- QDomElement createElement(QDomDocument&, DrBase*);
+ DrGroup* parseGroup(const TQDomElement& e, DrGroup *grp = 0);
+ DrBase* parseArgument(const TQDomElement& e);
+ void parseIO(const TQDomElement& e, int n);
+ TQDomElement createIO(TQDomDocument&, int, const TQString&);
+ TQDomElement createGroup(TQDomDocument&, DrGroup*);
+ TQDomElement createElement(TQDomDocument&, DrBase*);
// use protected constructor to only allow the manager to
// create KXmlCommand object.
- KXmlCommand(const QString& xmlId = QString::null);
+ KXmlCommand(const TQString& xmlId = TQString::null);
private:
class KXmlCommandPrivate;
@@ -94,23 +94,23 @@ public:
KXmlCommandManager();
~KXmlCommandManager();
- KXmlCommand* loadCommand(const QString& xmlId, bool check = false);
+ KXmlCommand* loadCommand(const TQString& xmlId, bool check = false);
void saveCommand(KXmlCommand *xmlCmd);
- QStringList commandList();
- QStringList commandListWithDescription();
- QString selectCommand(QWidget *parent = 0);
-
- QStringList autoConvert(const QString& mimesrc, const QString& mimedest);
- int insertCommand(QStringList& list, const QString& filtername, bool defaultToStart = true);
- bool checkCommand(const QString&, int inputCheck = Advanced, int outputCheck = Advanced, QString *msg = 0);
- bool configure(KXmlCommand*, QWidget *parent = 0);
+ TQStringList commandList();
+ TQStringList commandListWithDescription();
+ TQString selectCommand(TQWidget *parent = 0);
+
+ TQStringList autoConvert(const TQString& mimesrc, const TQString& mimedest);
+ int insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart = true);
+ bool checkCommand(const TQString&, int inputCheck = Advanced, int outputCheck = Advanced, TQString *msg = 0);
+ bool configure(KXmlCommand*, TQWidget *parent = 0);
void cleanUp();
static KXmlCommandManager* self();
protected:
void preload();
- KXmlCommand* command(const QString&) const;
+ KXmlCommand* command(const TQString&) const;
private:
class KXmlCommandManagerPrivate;
diff --git a/kdeprint/lpd/gschecker.cpp b/kdeprint/lpd/gschecker.cpp
index a4142abbb..8f23fcc32 100644
--- a/kdeprint/lpd/gschecker.cpp
+++ b/kdeprint/lpd/gschecker.cpp
@@ -20,15 +20,15 @@
#include "gschecker.h"
#include "kpipeprocess.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-GsChecker::GsChecker(QObject *parent, const char *name)
-: QObject(parent,name)
+GsChecker::GsChecker(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
}
-bool GsChecker::checkGsDriver(const QString& name)
+bool GsChecker::checkGsDriver(const TQString& name)
{
if (m_driverlist.count() == 0)
loadDriverList();
@@ -53,9 +53,9 @@ void GsChecker::loadDriverList()
else
buffer.append(line).append(" ");
}
- else if (line.startsWith(QString::fromLatin1("Available devices:")))
+ else if (line.startsWith(TQString::fromLatin1("Available devices:")))
ok = true;
}
- m_driverlist = QStringList::split(' ',buffer,false);
+ m_driverlist = TQStringList::split(' ',buffer,false);
}
}
diff --git a/kdeprint/lpd/gschecker.h b/kdeprint/lpd/gschecker.h
index d7c040315..65f247380 100644
--- a/kdeprint/lpd/gschecker.h
+++ b/kdeprint/lpd/gschecker.h
@@ -20,15 +20,15 @@
#ifndef GSCHECKER_H
#define GSCHECKER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
class GsChecker : public QObject
{
public:
- GsChecker(QObject *parent = 0, const char *name = 0);
- bool checkGsDriver(const QString& name);
+ GsChecker(TQObject *parent = 0, const char *name = 0);
+ bool checkGsDriver(const TQString& name);
protected:
void loadDriverList();
diff --git a/kdeprint/lpd/klpdprinterimpl.cpp b/kdeprint/lpd/klpdprinterimpl.cpp
index ad8912c47..8a04927e6 100644
--- a/kdeprint/lpd/klpdprinterimpl.cpp
+++ b/kdeprint/lpd/klpdprinterimpl.cpp
@@ -20,11 +20,11 @@
#include "klpdprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <klocale.h>
-KLpdPrinterImpl::KLpdPrinterImpl(QObject *parent, const char *name)
+KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent, const char *name)
: KPrinterImpl(parent,name)
{
}
@@ -33,12 +33,12 @@ KLpdPrinterImpl::~KLpdPrinterImpl()
{
}
-QString KLpdPrinterImpl::executable()
+TQString KLpdPrinterImpl::executable()
{
return KStandardDirs::findExe("lpr");
}
-bool KLpdPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
QString exestr = executable();
if (exestr.isEmpty())
@@ -46,6 +46,6 @@ bool KLpdPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("lpr"));
return false;
}
- cmd = QString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd = TQString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies());
return true;
}
diff --git a/kdeprint/lpd/klpdprinterimpl.h b/kdeprint/lpd/klpdprinterimpl.h
index ea88c1138..654c2606e 100644
--- a/kdeprint/lpd/klpdprinterimpl.h
+++ b/kdeprint/lpd/klpdprinterimpl.h
@@ -25,13 +25,13 @@
class KLpdPrinterImpl : public KPrinterImpl
{
public:
- KLpdPrinterImpl(QObject *parent = 0, const char *name = 0);
+ KLpdPrinterImpl(TQObject *parent = 0, const char *name = 0);
~KLpdPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- QString executable();
+ TQString executable();
};
#endif
diff --git a/kdeprint/lpd/kmlpdfactory.cpp b/kdeprint/lpd/kmlpdfactory.cpp
index 3285a32a2..a1882c3ca 100644
--- a/kdeprint/lpd/kmlpdfactory.cpp
+++ b/kdeprint/lpd/kmlpdfactory.cpp
@@ -30,7 +30,7 @@ extern "C"
}
};
-KLpdFactory::KLpdFactory(QObject *parent, const char *name)
+KLpdFactory::KLpdFactory(TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -39,7 +39,7 @@ KLpdFactory::~KLpdFactory()
{
}
-QObject* KLpdFactory::createObject(QObject *parent, const char *name, const char *classname, const QStringList&)
+TQObject* KLpdFactory::createObject(TQObject *parent, const char *name, const char *classname, const TQStringList&)
{
if (strcmp(classname,"KMManager") == 0)
return new KMLpdManager(parent,name);
diff --git a/kdeprint/lpd/kmlpdfactory.h b/kdeprint/lpd/kmlpdfactory.h
index 2d4dc7efb..6e6c2fda8 100644
--- a/kdeprint/lpd/kmlpdfactory.h
+++ b/kdeprint/lpd/kmlpdfactory.h
@@ -25,11 +25,11 @@
class KLpdFactory : public KLibFactory
{
public:
- KLpdFactory(QObject *parent = 0, const char *name = 0);
+ KLpdFactory(TQObject *parent = 0, const char *name = 0);
virtual ~KLpdFactory();
protected:
- QObject* createObject(QObject *parent = 0, const char *name = 0, const char *className = "QObject", const QStringList& args = QStringList());
+ TQObject* createObject(TQObject *parent = 0, const char *name = 0, const char *className = "TQObject", const TQStringList& args = TQStringList());
};
#endif
diff --git a/kdeprint/lpd/kmlpdmanager.cpp b/kdeprint/lpd/kmlpdmanager.cpp
index a19cd3f5f..95623a56f 100644
--- a/kdeprint/lpd/kmlpdmanager.cpp
+++ b/kdeprint/lpd/kmlpdmanager.cpp
@@ -26,11 +26,11 @@
#include "gschecker.h"
#include "kpipeprocess.h"
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -45,11 +45,11 @@
// only there to allow testing on my system. Should be removed
// when everything has proven to be working and stable
QString lpdprefix = "";
-QString ptPrinterType(KMPrinter*);
+TQString ptPrinterType(KMPrinter*);
//************************************************************************************************
-KMLpdManager::KMLpdManager(QObject *parent, const char *name)
+KMLpdManager::KMLpdManager(TQObject *parent, const char *name)
: KMManager(parent,name)
{
m_entries.setAutoDelete(true);
@@ -63,14 +63,14 @@ KMLpdManager::~KMLpdManager()
{
}
-QString KMLpdManager::driverDbCreationProgram()
+TQString KMLpdManager::driverDbCreationProgram()
{
- return QString::fromLatin1("make_driver_db_lpd");
+ return TQString::fromLatin1("make_driver_db_lpd");
}
-QString KMLpdManager::driverDirectory()
+TQString KMLpdManager::driverDirectory()
{
- return QString::fromLatin1("/usr/lib/rhs/rhs-printfilters");
+ return TQString::fromLatin1("/usr/lib/rhs/rhs-printfilters");
}
bool KMLpdManager::completePrinter(KMPrinter *printer)
@@ -91,29 +91,29 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer)
KURL url;
if (!entry->arg("rm").isEmpty())
{
- url = QString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp"));
+ url = TQString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp"));
printer->setDescription(i18n("Remote LPD queue %1@%2").arg(entry->arg("rp")).arg(entry->arg("rm")));
}
else if (!lp.isEmpty() && lp != "/dev/null")
- url = QString::fromLatin1("parallel:%1").arg(lp);
- else if (QFile::exists(entry->arg("sd")+"/.config"))
+ url = TQString::fromLatin1("parallel:%1").arg(lp);
+ else if (TQFile::exists(entry->arg("sd")+"/.config"))
{
- QMap<QString,QString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config");
+ TQMap<TQString,TQString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config");
if (type == "SMB")
{
- QStringList l = QStringList::split('\\',map["share"],false);
+ QStringList l = TQStringList::split('\\',map["share"],false);
if (map["workgroup"].isEmpty())
- url = QString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]);
+ url = TQString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]);
else
- url = QString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]);
+ url = TQString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]);
url.setUser(map["user"]);
url.setPass(map["password"]);
}
else if (type == "DIRECT")
- url = QString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]);
+ url = TQString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]);
else if (type == "NCP")
{
- url = QString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]);
+ url = TQString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]);
url.setUser(map["user"]);
url.setPass(map["password"]);
}
@@ -146,12 +146,12 @@ bool KMLpdManager::createPrinter(KMPrinter *printer)
{
// remote lpd queue
ent->m_args["rm"] = printer->device().host();
- ent->m_args["rp"] = printer->device().path().replace("/",QString::fromLatin1(""));
+ ent->m_args["rp"] = printer->device().path().replace("/",TQString::fromLatin1(""));
ent->m_args["lpd_bounce"] = "true";
- ent->m_comment = QString::fromLatin1("##PRINTTOOL3## REMOTE");
+ ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## REMOTE");
}
ent->m_args["mx"] = (printer->option("mx").isEmpty() ? "#0" : printer->option("mx"));
- ent->m_args["sh"] = QString::null;
+ ent->m_args["sh"] = TQString::null;
// create spool directory (if necessary) and update PrintcapEntry object
if (!createSpooldir(ent))
{
@@ -184,10 +184,10 @@ bool KMLpdManager::createPrinter(KMPrinter *printer)
}
// 4) change permissions of spool directory
- QCString cmd = "chmod -R o-rwx,g+rwX ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ TQCString cmd = "chmod -R o-rwx,g+rwX ";
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
cmd += "&& chown -R lp.lp ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
if (system(cmd.data()) != 0)
{
setErrorMsg(i18n("Unable to set correct permissions on spool directory %1 for printer <b>%2</b>.").arg(ent->arg("sd")).arg(ent->m_name));
@@ -208,8 +208,8 @@ bool KMLpdManager::removePrinter(KMPrinter *printer)
m_entries.insert(ent->m_name,ent);
return false;
}
- QCString cmd = "rm -rf ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ TQCString cmd = "rm -rf ";
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
system(cmd.data());
delete ent;
return true;
@@ -259,9 +259,9 @@ bool KMLpdManager::disablePrinter(KMPrinter *printer)
void KMLpdManager::listPrinters()
{
m_entries.clear();
- loadPrintcapFile(QString::fromLatin1("%1/etc/printcap").arg(lpdprefix));
+ loadPrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix));
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (;it.current();++it)
{
KMPrinter *printer = it.current()->createPrinter();
@@ -271,7 +271,7 @@ void KMLpdManager::listPrinters()
checkStatus();
}
-QString KMLpdManager::programName(int f)
+TQString KMLpdManager::programName(int f)
{
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("LPD");
@@ -281,7 +281,7 @@ QString KMLpdManager::programName(int f)
case 1: return conf->readPathEntry("LpdQueue","lpq");
case 2: return conf->readPathEntry("LpdRemove","lprm");
}
- return QString::null;
+ return TQString::null;
}
void KMLpdManager::checkStatus()
@@ -312,7 +312,7 @@ void KMLpdManager::checkStatus()
bool KMLpdManager::writePrinters()
{
- if (!writePrintcapFile(QString::fromLatin1("%1/etc/printcap").arg(lpdprefix)))
+ if (!writePrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix)))
{
setErrorMsg(i18n("Unable to write printcap file."));
return false;
@@ -320,7 +320,7 @@ bool KMLpdManager::writePrinters()
return true;
}
-void KMLpdManager::loadPrintcapFile(const QString& filename)
+void KMLpdManager::loadPrintcapFile(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -348,14 +348,14 @@ void KMLpdManager::loadPrintcapFile(const QString& filename)
}
}
-bool KMLpdManager::writePrintcapFile(const QString& filename)
+bool KMLpdManager::writePrintcapFile(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "# File generated by KDE print (LPD plugin).\n#Don't edit by hand." << endl << endl;
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (;it.current();++it)
it.current()->writeEntry(t);
return true;
@@ -363,7 +363,7 @@ bool KMLpdManager::writePrintcapFile(const QString& filename)
return false;
}
-PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const QString& name)
+PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const TQString& name)
{
if (m_ptentries.count() == 0)
loadPrinttoolDb(driverDirectory()+"/printerdb");
@@ -373,7 +373,7 @@ PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const QString& name)
return ent;
}
-void KMLpdManager::loadPrinttoolDb(const QString& filename)
+void KMLpdManager::loadPrinttoolDb(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -404,7 +404,7 @@ DrMain* KMLpdManager::loadDbDriver(KMDBEntry *entry)
return NULL;
}
-PrintcapEntry* KMLpdManager::findPrintcapEntry(const QString& name)
+PrintcapEntry* KMLpdManager::findPrintcapEntry(const TQString& name)
{
PrintcapEntry *ent = m_entries.find(name);
if (!ent)
@@ -420,9 +420,9 @@ DrMain* KMLpdManager::loadPrinterDriver(KMPrinter *printer, bool config)
// check for printtool driver (only for configuration)
QString sd = entry->arg("sd"), dr(entry->comment(7));
- if (QFile::exists(sd+"/postscript.cfg") && config && !dr.isEmpty())
+ if (TQFile::exists(sd+"/postscript.cfg") && config && !dr.isEmpty())
{
- QMap<QString,QString> map = loadPrinttoolCfgFile(sd+"/postscript.cfg");
+ TQMap<TQString,TQString> map = loadPrinttoolCfgFile(sd+"/postscript.cfg");
PrinttoolEntry *ptentry = findPrinttoolEntry(dr);
if (!ptentry)
return NULL;
@@ -443,7 +443,7 @@ DrMain* KMLpdManager::loadPrinterDriver(KMPrinter *printer, bool config)
return NULL;
}
-bool KMLpdManager::checkGsDriver(const QString& gsdriver)
+bool KMLpdManager::checkGsDriver(const TQString& gsdriver)
{
if (gsdriver == "ppa" || gsdriver == "POSTSCRIPT" || gsdriver == "TEXT")
return true;
@@ -455,10 +455,10 @@ bool KMLpdManager::checkGsDriver(const QString& gsdriver)
return true;
}
-QMap<QString,QString> KMLpdManager::loadPrinttoolCfgFile(const QString& filename)
+TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& filename)
{
QFile f(filename);
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
if (f.exists() && f.open(IO_ReadOnly))
{
QTextStream t(&f);
@@ -485,11 +485,11 @@ QMap<QString,QString> KMLpdManager::loadPrinttoolCfgFile(const QString& filename
return map;
}
-bool KMLpdManager::savePrinttoolCfgFile(const QString& templatefile, const QString& dirname, const QMap<QString,QString>& options)
+bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options)
{
// defines input and output file
- QString fname = QFileInfo(templatefile).fileName();
- fname.replace(QRegExp("\\.in$"),QString::fromLatin1(""));
+ QString fname = TQFileInfo(templatefile).fileName();
+ fname.replace(TQRegExp("\\.in$"),TQString::fromLatin1(""));
QFile fin(templatefile);
QFile fout(dirname + "/" + fname);
if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly))
@@ -508,7 +508,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const QString& templatefile, const QStri
if (line.startsWith("export "))
{
tout << "export ";
- line.replace(0,7,QString::fromLatin1(""));
+ line.replace(0,7,TQString::fromLatin1(""));
}
if ((p=line.find('=')) != -1)
{
@@ -533,7 +533,7 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver)
if (driver->get("drtype") == "printtool" && !spooldir.isEmpty())
{
- QMap<QString,QString> options;
+ TQMap<TQString,TQString> options;
driver->getOptions(options,true);
// add some standard options
options["DESIRED_TO"] = "ps";
@@ -543,15 +543,15 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver)
return false;
QString resol(options["RESOLUTION"]), color(options["COLOR"]);
// update entry comment to make printtool happy and save printcap file
- ent->m_comment = QString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? QString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? QString::fromLatin1("Default") : color.right(color.length()-15)));
- ent->m_args["if"] = spooldir+QString::fromLatin1("/filter");
+ ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::fromLatin1("Default") : color.right(color.length()-15)));
+ ent->m_args["if"] = spooldir+TQString::fromLatin1("/filter");
if (!writePrinters())
return false;
// write various driver files using templates
- QCString cmd = "cp ";
- cmd += QFile::encodeName(KProcess::quote(driverDirectory()+"/master-filter"));
+ TQCString cmd = "cp ";
+ cmd += TQFile::encodeName(KProcess::quote(driverDirectory()+"/master-filter"));
cmd += " ";
- cmd += QFile::encodeName(KProcess::quote(spooldir + "/filter"));
+ cmd += TQFile::encodeName(KProcess::quote(spooldir + "/filter"));
if (system(cmd.data()) == 0 &&
savePrinttoolCfgFile(driverDirectory()+"/general.cfg.in",spooldir,options) &&
savePrinttoolCfgFile(driverDirectory()+"/postscript.cfg.in",spooldir,options) &&
@@ -566,11 +566,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
{
KURL dev(printer->device());
QString prot = dev.protocol(), sd(entry->arg("sd"));
- entry->m_comment = QString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer));
+ entry->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer));
if (prot == "smb" || prot == "ncp" || prot == "socket")
{
- entry->m_args["af"] = sd+QString::fromLatin1("/acct");
- QFile f(sd+QString::fromLatin1("/.config"));
+ entry->m_args["af"] = sd+TQString::fromLatin1("/acct");
+ QFile f(sd+TQString::fromLatin1("/.config"));
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
@@ -578,11 +578,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
{
t << "printer_ip=" << dev.host() << endl;
t << "port=" << dev.port() << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/directprint");
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/directprint");
}
else if (prot == "smb")
{
- QStringList l = QStringList::split('/',dev.path(),false);
+ QStringList l = TQStringList::split('/',dev.path(),false);
if (l.count() == 2)
{
t << "share='\\\\" << l[0] << '\\' << l[1] << '\'' << endl;
@@ -594,20 +594,20 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
t << "hostip=" << endl;
t << "user='" << dev.user() << '\'' << endl;
t << "password='" << dev.pass() << '\'' << endl;
- t << "workgroup='" << (l.count() == 2 ? dev.host() : QString::fromLatin1("")) << '\'' << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/smbprint");
+ t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::fromLatin1("")) << '\'' << endl;
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/smbprint");
}
else if (prot == "ncp")
{
t << "server=" << dev.host() << endl;
- t << "queue=" << dev.path().replace("/",QString::fromLatin1("")) << endl;
+ t << "queue=" << dev.path().replace("/",TQString::fromLatin1("")) << endl;
t << "user=" << dev.user() << endl;
t << "password=" << dev.pass() << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/ncpprint");
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/ncpprint");
}
}
else return false;
- entry->m_args["lp"] = QString::fromLatin1("/dev/null");
+ entry->m_args["lp"] = TQString::fromLatin1("/dev/null");
}
else if (prot != "lpd")
entry->m_args["lp"] = dev.path();
@@ -618,14 +618,14 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry)
{
// first check if it has a "sd" defined
if (entry->arg("sd").isEmpty())
- entry->m_args["sd"] = QString::fromLatin1("/var/spool/lpd/")+entry->m_name;
+ entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name;
QString sd = entry->arg("sd");
if (!KStandardDirs::exists(sd))
{
if (!KStandardDirs::makeDir(sd,0750))
return false;
struct passwd *lp_pw = getpwnam("lp");
- if (lp_pw && chown(QFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0)
+ if (lp_pw && chown(TQFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0)
return false;
}
return true;
@@ -639,7 +639,7 @@ bool KMLpdManager::validateDbDriver(KMDBEntry *entry)
//************************************************************************************************
-QString ptPrinterType(KMPrinter *p)
+TQString ptPrinterType(KMPrinter *p)
{
QString type, prot = p->device().protocol();
if (prot == "lpd") type = "REMOTE";
diff --git a/kdeprint/lpd/kmlpdmanager.h b/kdeprint/lpd/kmlpdmanager.h
index e38fdb6aa..0af2d1e15 100644
--- a/kdeprint/lpd/kmlpdmanager.h
+++ b/kdeprint/lpd/kmlpdmanager.h
@@ -21,7 +21,7 @@
#define KMLPDMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
+#include <tqdict.h>
class PrintcapEntry;
class PrinttoolEntry;
@@ -30,7 +30,7 @@ class GsChecker;
class KMLpdManager : public KMManager
{
public:
- KMLpdManager(QObject *parent = 0, const char *name = 0);
+ KMLpdManager(TQObject *parent = 0, const char *name = 0);
~KMLpdManager();
bool completePrinterShort(KMPrinter*);
@@ -41,8 +41,8 @@ public:
bool disablePrinter(KMPrinter*);
// Driver DB functions
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
// Driver loading functions
DrMain* loadDbDriver(KMDBEntry*);
@@ -53,23 +53,23 @@ public:
protected:
void listPrinters();
bool writePrinters();
- void loadPrintcapFile(const QString& filename);
- bool writePrintcapFile(const QString& filename);
- void loadPrinttoolDb(const QString& filename);
- QMap<QString,QString> loadPrinttoolCfgFile(const QString& filename);
- bool savePrinttoolCfgFile(const QString& templatefile, const QString& dirname, const QMap<QString,QString>& options);
- bool checkGsDriver(const QString& gsdriver);
+ void loadPrintcapFile(const TQString& filename);
+ bool writePrintcapFile(const TQString& filename);
+ void loadPrinttoolDb(const TQString& filename);
+ TQMap<TQString,TQString> loadPrinttoolCfgFile(const TQString& filename);
+ bool savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options);
+ bool checkGsDriver(const TQString& gsdriver);
bool createSpooldir(PrintcapEntry*);
bool createPrinttoolEntry(KMPrinter*, PrintcapEntry*);
- PrintcapEntry* findPrintcapEntry(const QString& name);
- PrinttoolEntry* findPrinttoolEntry(const QString& name);
- QString programName(int);
+ PrintcapEntry* findPrintcapEntry(const TQString& name);
+ PrinttoolEntry* findPrinttoolEntry(const TQString& name);
+ TQString programName(int);
void checkStatus();
bool enablePrinter(KMPrinter*, bool);
private:
- QDict<PrintcapEntry> m_entries;
- QDict<PrinttoolEntry> m_ptentries;
+ TQDict<PrintcapEntry> m_entries;
+ TQDict<PrinttoolEntry> m_ptentries;
GsChecker *m_gschecker;
};
diff --git a/kdeprint/lpd/kmlpduimanager.cpp b/kdeprint/lpd/kmlpduimanager.cpp
index 911f96b12..be243c688 100644
--- a/kdeprint/lpd/kmlpduimanager.cpp
+++ b/kdeprint/lpd/kmlpduimanager.cpp
@@ -26,10 +26,10 @@
#include "kmpropbackend.h"
#include "kmpropdriver.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
-KMLpdUiManager::KMLpdUiManager(QObject *parent, const char *name)
+KMLpdUiManager::KMLpdUiManager(TQObject *parent, const char *name)
: KMUiManager(parent,name)
{
}
@@ -48,9 +48,9 @@ void KMLpdUiManager::setupWizard(KMWizard *wizard)
backend->addBackend(KMWizard::File,i18n("File printer (print to file)"),true);
KMManager *mgr = KMFactory::self()->manager();
- if (QFile::exists(mgr->driverDirectory()+"/smbprint")) backend->enableBackend(KMWizard::SMB,true);
- if (QFile::exists(mgr->driverDirectory()+"/directprint")) backend->enableBackend(KMWizard::TCP,true);
- if (QFile::exists(mgr->driverDirectory()+"/ncpprint")) backend->enableBackend(KMWizard::Custom+1,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/smbprint")) backend->enableBackend(KMWizard::SMB,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/directprint")) backend->enableBackend(KMWizard::TCP,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/ncpprint")) backend->enableBackend(KMWizard::Custom+1,true);
}
void KMLpdUiManager::setupPropertyPages(KMPropertyPage *p)
diff --git a/kdeprint/lpd/kmlpduimanager.h b/kdeprint/lpd/kmlpduimanager.h
index df3fb4561..0483df181 100644
--- a/kdeprint/lpd/kmlpduimanager.h
+++ b/kdeprint/lpd/kmlpduimanager.h
@@ -25,7 +25,7 @@
class KMLpdUiManager : public KMUiManager
{
public:
- KMLpdUiManager(QObject *parent = 0, const char *name = 0);
+ KMLpdUiManager(TQObject *parent = 0, const char *name = 0);
~KMLpdUiManager();
void setupWizard(KMWizard*);
diff --git a/kdeprint/lpd/lpdtools.cpp b/kdeprint/lpd/lpdtools.cpp
index bba934e61..3b1651337 100644
--- a/kdeprint/lpd/lpdtools.cpp
+++ b/kdeprint/lpd/lpdtools.cpp
@@ -21,7 +21,7 @@
#include "driver.h"
#include "kmprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
static const char *pt_pagesize[] = {
@@ -53,7 +53,7 @@ void setupBooleanOption(DrBooleanOption *opt)
}
}
-QString nextWord(const QString& s, int& pos)
+TQString nextWord(const TQString& s, int& pos)
{
int p1(pos), p2(0);
while (s[p1].isSpace() && p1 < (int)s.length()) p1++;
@@ -73,9 +73,9 @@ QString nextWord(const QString& s, int& pos)
//************************************************************************************************
-bool PrintcapEntry::readLine(const QString& line)
+bool PrintcapEntry::readLine(const TQString& line)
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 0)
{
m_name = l[0];
@@ -97,12 +97,12 @@ bool PrintcapEntry::readLine(const QString& line)
return false;
}
-void PrintcapEntry::writeEntry(QTextStream& t)
+void PrintcapEntry::writeEntry(TQTextStream& t)
{
if (m_comment.isEmpty()) t << "# Entry for printer " << m_name << endl;
else t << m_comment << endl;
t << m_name << ":";
- for (QMap<QString,QString>::ConstIterator it=m_args.begin(); it!=m_args.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=m_args.begin(); it!=m_args.end(); ++it)
{
t << "\\\n\t:" << it.key();
if (!it.data().isEmpty())
@@ -112,7 +112,7 @@ void PrintcapEntry::writeEntry(QTextStream& t)
t << endl << endl;
}
-QString PrintcapEntry::comment(int index)
+TQString PrintcapEntry::comment(int index)
{
QString w;
if (m_comment.startsWith("##PRINTTOOL3##"))
@@ -129,7 +129,7 @@ KMPrinter* PrintcapEntry::createPrinter()
KMPrinter *printer = new KMPrinter();
printer->setName(m_name);
printer->setPrinterName(m_name);
- printer->setInstanceName(QString::null);
+ printer->setInstanceName(TQString::null);
printer->setState(KMPrinter::Idle);
printer->setType(KMPrinter::Printer);
return printer;
@@ -137,7 +137,7 @@ KMPrinter* PrintcapEntry::createPrinter()
//************************************************************************************************
-QStringList splitPrinttoolLine(const QString& line)
+TQStringList splitPrinttoolLine(const TQString& line)
{
QStringList l;
int p = line.find(':');
@@ -164,7 +164,7 @@ QStringList splitPrinttoolLine(const QString& line)
return l;
}
-bool PrinttoolEntry::readEntry(QTextStream& t)
+bool PrinttoolEntry::readEntry(TQTextStream& t)
{
QString line;
QStringList args;
@@ -253,15 +253,15 @@ DrMain* PrinttoolEntry::createDriver()
lopt->setName("RESOLUTION");
lopt->set("text",i18n("Resolution"));
gr->addOption(lopt);
- QPtrListIterator<Resolution> it(m_resolutions);
+ TQPtrListIterator<Resolution> it(m_resolutions);
for (int i=0;it.current();++it,i++)
{
ch = new DrBase;
- ch->setName(QString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->setName(TQString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi));
if (it.current()->comment.isEmpty())
- ch->set("text",QString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->set("text",TQString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi));
else
- ch->set("text",QString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->set("text",TQString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi));
lopt->addChoice(ch);
}
QString defval = lopt->choices()->first()->name();
@@ -276,18 +276,18 @@ DrMain* PrinttoolEntry::createDriver()
lopt->setName("COLOR");
lopt->set("text",i18n("Color depth"));
gr->addOption(lopt);
- QPtrListIterator<BitsPerPixel> it(m_depths);
+ TQPtrListIterator<BitsPerPixel> it(m_depths);
for (int i=0;it.current();++it,i++)
{
ch = new DrBase;
if (m_gsdriver != "uniprint")
- ch->setName(QString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp));
+ ch->setName(TQString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp));
else
ch->setName(it.current()->bpp);
if (it.current()->comment.isEmpty())
ch->set("text",it.current()->bpp);
else
- ch->set("text",QString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment));
+ ch->set("text",TQString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment));
lopt->addChoice(ch);
}
QString defval = lopt->choices()->first()->name();
@@ -333,7 +333,7 @@ DrMain* PrinttoolEntry::createDriver()
while (pt_nup[i] != -1)
{
ch = new DrBase();
- ch->setName(QString::number(pt_nup[i++]));
+ ch->setName(TQString::number(pt_nup[i++]));
ch->set("text",ch->name());
lopt->addChoice(ch);
}
@@ -392,7 +392,7 @@ DrMain* PrinttoolEntry::createDriver()
//************************************************************************************************
-QString getPrintcapLine(QTextStream& t, QString *lastcomment)
+TQString getPrintcapLine(TQTextStream& t, TQString *lastcomment)
{
QString line, buffer, comm;
while (!t.eof())
diff --git a/kdeprint/lpd/lpdtools.h b/kdeprint/lpd/lpdtools.h
index 2f8b8c975..3592437e6 100644
--- a/kdeprint/lpd/lpdtools.h
+++ b/kdeprint/lpd/lpdtools.h
@@ -19,10 +19,10 @@
#ifndef LPDTOOLS_H
#define LPDTOOLS_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
class KMLpdManager;
class DrMain;
@@ -32,15 +32,15 @@ class PrintcapEntry
{
friend class KMLpdManager;
public:
- bool readLine(const QString& line);
- void writeEntry(QTextStream&);
+ bool readLine(const TQString& line);
+ void writeEntry(TQTextStream&);
KMPrinter* createPrinter();
- QString arg(const QString& key) const { return m_args[key]; }
- QString comment(int i);
+ TQString arg(const TQString& key) const { return m_args[key]; }
+ TQString comment(int i);
private:
QString m_name;
QString m_comment;
- QMap<QString,QString> m_args;
+ TQMap<TQString,TQString> m_args;
};
//*****************************************************************************************************
@@ -61,16 +61,16 @@ class PrinttoolEntry
{
friend class KMLpdManager;
public:
- bool readEntry(QTextStream& t);
+ bool readEntry(TQTextStream& t);
DrMain* createDriver();
private:
QString m_name, m_gsdriver, m_description, m_about;
- QPtrList<Resolution> m_resolutions;
- QPtrList<BitsPerPixel> m_depths;
+ TQPtrList<Resolution> m_resolutions;
+ TQPtrList<BitsPerPixel> m_depths;
};
//*****************************************************************************************************
-QString getPrintcapLine(QTextStream& t, QString *lastcomment = NULL);
+TQString getPrintcapLine(TQTextStream& t, TQString *lastcomment = NULL);
#endif // LPDTOOLS_H
diff --git a/kdeprint/lpdunix/klpdunixprinterimpl.cpp b/kdeprint/lpdunix/klpdunixprinterimpl.cpp
index 51cc5145d..7a9a3ad81 100644
--- a/kdeprint/lpdunix/klpdunixprinterimpl.cpp
+++ b/kdeprint/lpdunix/klpdunixprinterimpl.cpp
@@ -20,12 +20,12 @@
#include "klpdunixprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kmacroexpander.h>
-KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -34,18 +34,18 @@ KLpdUnixPrinterImpl::~KLpdUnixPrinterImpl()
{
}
-void KLpdUnixPrinterImpl::initLpPrint(QString& cmd, KPrinter *printer)
+void KLpdUnixPrinterImpl::initLpPrint(TQString& cmd, KPrinter *printer)
{
- cmd += QString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd += TQString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies());
}
-void KLpdUnixPrinterImpl::initLprPrint(QString& cmd, KPrinter *printer)
+void KLpdUnixPrinterImpl::initLprPrint(TQString& cmd, KPrinter *printer)
{
- cmd += QString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd += TQString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies());
}
// look for executable, starting with "lpr"
-QString KLpdUnixPrinterImpl::executable()
+TQString KLpdUnixPrinterImpl::executable()
{
QString exe = KStandardDirs::findExe("lpr");
if (exe.isEmpty())
@@ -53,9 +53,9 @@ QString KLpdUnixPrinterImpl::executable()
return exe;
}
-bool KLpdUnixPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLpdUnixPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
- QString exe = printer->option( "kde-printcommand" );
+ TQString exe = printer->option( "kde-printcommand" );
if ( exe.isEmpty() || exe == "<automatic>" )
{
exe = executable();
@@ -74,9 +74,9 @@ bool KLpdUnixPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
}
else
{
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
map.insert( "printer", printer->printerName() );
- map.insert( "copies", QString::number( printer->numCopies() ) );
+ map.insert( "copies", TQString::number( printer->numCopies() ) );
cmd = KMacroExpander::expandMacrosShellQuote( exe, map );
return true;
}
diff --git a/kdeprint/lpdunix/klpdunixprinterimpl.h b/kdeprint/lpdunix/klpdunixprinterimpl.h
index e3fba97a2..cc16f10f2 100644
--- a/kdeprint/lpdunix/klpdunixprinterimpl.h
+++ b/kdeprint/lpdunix/klpdunixprinterimpl.h
@@ -27,15 +27,15 @@ class KProcess;
class KLpdUnixPrinterImpl : public KPrinterImpl
{
public:
- KLpdUnixPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KLpdUnixPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- void initLpPrint(QString&, KPrinter*);
- void initLprPrint(QString&, KPrinter*);
- QString executable();
+ void initLpPrint(TQString&, KPrinter*);
+ void initLprPrint(TQString&, KPrinter*);
+ TQString executable();
};
#endif
diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp
index f19e76f8f..f288702eb 100644
--- a/kdeprint/lpdunix/kmlpdunixmanager.cpp
+++ b/kdeprint/lpdunix/kmlpdunixmanager.cpp
@@ -21,11 +21,11 @@
#include "kmfactory.h"
#include "kmprinter.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -38,22 +38,22 @@
class KTextBuffer
{
public:
- KTextBuffer(QIODevice *dev) : m_stream(dev) {}
+ KTextBuffer(TQIODevice *dev) : m_stream(dev) {}
bool eof() const { return (m_stream.eof() && m_linebuf.isEmpty()); }
- QString readLine();
- void unreadLine(const QString& l) { m_linebuf = l; }
+ TQString readLine();
+ void unreadLine(const TQString& l) { m_linebuf = l; }
private:
QTextStream m_stream;
QString m_linebuf;
};
-QString KTextBuffer::readLine()
+TQString KTextBuffer::readLine()
{
QString line;
if (!m_linebuf.isEmpty())
{
line = m_linebuf;
- m_linebuf = QString::null;
+ m_linebuf = TQString::null;
}
else
line = m_stream.readLine();
@@ -71,7 +71,7 @@ QString KTextBuffer::readLine()
//
// New entry is detected by a line which have first character different from
// '#', '|', ':'. The line is then put back in the IODevice.
-QString readLine(KTextBuffer& t)
+TQString readLine(KTextBuffer& t)
{
QString line, buffer;
bool lineContinue(false);
@@ -103,14 +103,14 @@ QString readLine(KTextBuffer& t)
}
// extact an entry (printcap-like)
-QMap<QString,QString> readEntry(KTextBuffer& t)
+TQMap<TQString,TQString> readEntry(KTextBuffer& t)
{
QString line = readLine(t);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
if (!line.isEmpty())
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 0)
{
int p(-1);
@@ -122,14 +122,14 @@ QMap<QString,QString> readEntry(KTextBuffer& t)
if ((p=l[i].find('=')) != -1)
entry[l[i].left(p).stripWhiteSpace()] = l[i].right(l[i].length()-p-1).stripWhiteSpace();
else
- entry[l[i].stripWhiteSpace()] = QString::null;
+ entry[l[i].stripWhiteSpace()] = TQString::null;
}
}
return entry;
}
// create basic printer from entry
-KMPrinter* createPrinter(const QMap<QString,QString>& entry)
+KMPrinter* createPrinter(const TQMap<TQString,TQString>& entry)
{
KMPrinter *printer = new KMPrinter();
printer->setName(entry["printer-name"]);
@@ -138,16 +138,16 @@ KMPrinter* createPrinter(const QMap<QString,QString>& entry)
printer->setState(KMPrinter::Idle);
return printer;
}
-KMPrinter* createPrinter(const QString& prname)
+KMPrinter* createPrinter(const TQString& prname)
{
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
map["printer-name"] = prname;
return createPrinter(map);
}
// this function support LPRng piping feature, it defaults to
// /etc/printcap in any other cases (basic support)
-QString getPrintcapFileName()
+TQString getPrintcapFileName()
{
// check if LPRng system
QString printcap("/etc/printcap");
@@ -168,7 +168,7 @@ QString getPrintcapFileName()
if (pcentry[0] == '|')
{ // printcap through pipe
printcap = locateLocal("tmp","printcap");
- QString cmd = QString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap);
+ QString cmd = TQString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap);
kdDebug() << "printcap obtained through pipe" << endl << "executing: " << cmd << endl;
::system(cmd.local8Bit());
}
@@ -187,7 +187,7 @@ void KMLpdUnixManager::parseEtcPrintcap()
if (f.exists() && f.open(IO_ReadOnly))
{
KTextBuffer t(&f);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
while (!t.eof())
{
@@ -199,12 +199,12 @@ void KMLpdUnixManager::parseEtcPrintcap()
if (entry.contains("all"))
{
// find separator
- int p = entry["all"].find(QRegExp("[^a-zA-Z0-9_\\s-]"));
+ int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]"));
if (p != -1)
{
QChar c = entry["all"][p];
- QStringList prs = QStringList::split(c,entry["all"],false);
- for (QStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
+ QStringList prs = TQStringList::split(c,entry["all"],false);
+ for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
{
KMPrinter *printer = ::createPrinter(*it);
printer->setDescription(i18n("Description unavailable"));
@@ -227,16 +227,16 @@ void KMLpdUnixManager::parseEtcPrintcap()
}
// helper function for NIS support in Solaris-2.6 (use "ypcat printers.conf.byname")
-QString getEtcPrintersConfName()
+TQString getEtcPrintersConfName()
{
QString printersconf("/etc/printers.conf");
- if (!QFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty())
+ if (!TQFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty())
{
// standard file not found, try NIS
printersconf = locateLocal("tmp","printers.conf");
- QString cmd = QString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf);
+ QString cmd = TQString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf);
kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl;
- ::system(QFile::encodeName(cmd));
+ ::system(TQFile::encodeName(cmd));
}
return printersconf;
}
@@ -248,7 +248,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
if (f.exists() && f.open(IO_ReadOnly))
{
KTextBuffer t(&f);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
QString default_printer;
while (!t.eof())
@@ -267,7 +267,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
KMPrinter *printer = ::createPrinter(entry);
if (entry.contains("bsdaddr"))
{
- QStringList l = QStringList::split(',',entry["bsdaddr"],false);
+ QStringList l = TQStringList::split(',',entry["bsdaddr"],false);
printer->setDescription(i18n("Remote printer queue on %1").arg(l[0]));
}
else
@@ -285,7 +285,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
void KMLpdUnixManager::parseEtcLpPrinters()
{
QDir d("/etc/lp/printers");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Dirs);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Dirs);
if (!prlist)
return;
@@ -305,7 +305,7 @@ void KMLpdUnixManager::parseEtcLpPrinters()
if (line.isEmpty()) continue;
if (line.startsWith("Remote:"))
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 1) remote = l[1];
}
}
@@ -327,7 +327,7 @@ void KMLpdUnixManager::parseEtcLpPrinters()
void KMLpdUnixManager::parseEtcLpMember()
{
QDir d("/etc/lp/member");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Files);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Files);
if (!prlist)
return;
@@ -348,7 +348,7 @@ void KMLpdUnixManager::parseEtcLpMember()
void KMLpdUnixManager::parseSpoolInterface()
{
QDir d("/usr/spool/interfaces/lp");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Files);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Files);
if (!prlist)
return;
@@ -366,7 +366,7 @@ void KMLpdUnixManager::parseSpoolInterface()
line = t.readLine().stripWhiteSpace();
if (line.startsWith("HOSTNAME"))
{
- QStringList l = QStringList::split('=',line,false);
+ QStringList l = TQStringList::split('=',line,false);
if (l.count() > 1) remote = l[1];
}
}
@@ -387,7 +387,7 @@ void KMLpdUnixManager::parseSpoolInterface()
//*********************************************************************************************************
-KMLpdUnixManager::KMLpdUnixManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLpdUnixManager::KMLpdUnixManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
m_loaded = false;
diff --git a/kdeprint/lpdunix/kmlpdunixmanager.h b/kdeprint/lpdunix/kmlpdunixmanager.h
index 29c536a21..7abc91752 100644
--- a/kdeprint/lpdunix/kmlpdunixmanager.h
+++ b/kdeprint/lpdunix/kmlpdunixmanager.h
@@ -25,7 +25,7 @@
class KMLpdUnixManager : public KMManager
{
public:
- KMLpdUnixManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLpdUnixManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
protected:
void listPrinters();
diff --git a/kdeprint/lpdunix/kmlpdunixuimanager.cpp b/kdeprint/lpdunix/kmlpdunixuimanager.cpp
index 20c62c845..5dc281c85 100644
--- a/kdeprint/lpdunix/kmlpdunixuimanager.cpp
+++ b/kdeprint/lpdunix/kmlpdunixuimanager.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-KMLpdUnixUiManager::KMLpdUnixUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLpdUnixUiManager::KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
m_printdialogflags |= KMUiManager::PrintCommand;
diff --git a/kdeprint/lpdunix/kmlpdunixuimanager.h b/kdeprint/lpdunix/kmlpdunixuimanager.h
index 4882399e9..23616e511 100644
--- a/kdeprint/lpdunix/kmlpdunixuimanager.h
+++ b/kdeprint/lpdunix/kmlpdunixuimanager.h
@@ -25,7 +25,7 @@
class KMLpdUnixUiManager : public KMUiManager
{
public:
- KMLpdUnixUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMLpdUnixUiManager();
int pluginPageCap();
diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp
index 5b7bef943..fc6ade276 100644
--- a/kdeprint/lpr/apshandler.cpp
+++ b/kdeprint/lpr/apshandler.cpp
@@ -26,10 +26,10 @@
#include "util.h"
#include "kprinter.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqvaluestack.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kdebug.h>
@@ -50,8 +50,8 @@ bool ApsHandler::validate(PrintcapEntry *entry)
KMPrinter* ApsHandler::createPrinter(PrintcapEntry *entry)
{
- entry->comment = QString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
- entry->postcomment = QString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter);
+ entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
+ entry->postcomment = TQString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter);
m_counter++;
return LprHandler::createPrinter(entry);
}
@@ -62,7 +62,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
{
if (!shortmode)
{
- QMap<QString,QString> opts = loadResources(entry);
+ TQMap<TQString,TQString> opts = loadResources(entry);
if (opts.contains("PRINTER"))
{
prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"]));
@@ -71,12 +71,12 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
}
if (prt->device().isEmpty())
{
- QString prot;
+ TQString prot;
QString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf");
QString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf");
- if (QFile::exists(smbname))
+ if (TQFile::exists(smbname))
{
- QMap<QString,QString> opts = loadVarFile(smbname);
+ TQMap<TQString,TQString> opts = loadVarFile(smbname);
if (opts.count() == 0)
prt->setDevice("smb://<unknown>/<unknown>");
else
@@ -90,15 +90,15 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
}
prot = "smb";
}
- else if (QFile::exists(ncpname))
+ else if (TQFile::exists(ncpname))
{
- QMap<QString,QString> opts = loadVarFile(ncpname);
+ TQMap<TQString,TQString> opts = loadVarFile(ncpname);
if (opts.count() == 0)
prt->setDevice("ncp://<unknown>/<unknown>");
else
{
- QString uri = buildSmbURI(
- QString::null,
+ TQString uri = buildSmbURI(
+ TQString::null,
opts[ "NCP_SERVER" ],
opts[ "NCP_PRINTER" ],
opts[ "NCP_USER" ],
@@ -116,29 +116,29 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
return false;
}
-QString ApsHandler::sysconfDir()
+TQString ApsHandler::sysconfDir()
{
- return QFile::encodeName("/etc/apsfilter");
+ return TQFile::encodeName("/etc/apsfilter");
}
-QString ApsHandler::shareDir()
+TQString ApsHandler::shareDir()
{
return driverDirectory();
}
-QString ApsHandler::driverDirInternal()
+TQString ApsHandler::driverDirInternal()
{
return locateDir("apsfilter/setup", "/usr/share:/usr/local/share:/opt/share");
}
-QMap<QString,QString> ApsHandler::loadResources(PrintcapEntry *entry)
+TQMap<TQString,TQString> ApsHandler::loadResources(PrintcapEntry *entry)
{
- return loadVarFile(sysconfDir() + "/" + (entry ? entry->name : QString::null) + "/apsfilterrc");
+ return loadVarFile(sysconfDir() + "/" + (entry ? entry->name : TQString::null) + "/apsfilterrc");
}
-QMap<QString,QString> ApsHandler::loadVarFile(const QString& filename)
+TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QFile f(filename);
if (f.open(IO_ReadOnly))
{
@@ -165,7 +165,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
DrMain *driver = loadApsDriver(config);
if (driver /* && config */ ) // Load resources in all case, to get the correct page size
{
- QMap<QString,QString> opts = loadResources(entry);
+ TQMap<TQString,TQString> opts = loadResources(entry);
if ( !config && opts.contains( "PAPERSIZE" ) )
{
// this is needed to keep applications informed
@@ -185,7 +185,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
return driver;
}
-DrMain* ApsHandler::loadDbDriver(const QString& s)
+DrMain* ApsHandler::loadDbDriver(const TQString& s)
{
int p = s.find('/');
DrMain *driver = loadApsDriver(true);
@@ -224,8 +224,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
if (prot == "smb" || prot == "ncp")
{
// either "smb" or "ncp"
- QFile::remove(path + "/smbclient.conf");
- QFile::remove(path + "/netware.conf");
+ TQFile::remove(path + "/smbclient.conf");
+ TQFile::remove(path + "/netware.conf");
QFile f;
if (prot == "smb")
{
@@ -233,7 +233,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QString work, server, printer, user, passwd;
+ TQString work, server, printer, user, passwd;
if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) )
{
if (work.isEmpty())
@@ -270,8 +270,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
f.setName(path + "/netware.conf");
if (f.open(IO_WriteOnly))
{
- QString work, server, printer, user, passwd;
- QString uri = prt->device();
+ TQString work, server, printer, user, passwd;
+ TQString uri = prt->device();
uri.replace( 0, 3, "smb" );
if ( splitSmbURI( uri, work, server, printer, user, passwd ) )
{
@@ -297,7 +297,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
}
}
// change file permissions
- ::chmod(QFile::encodeName(f.name()).data(), S_IRUSR|S_IWUSR);
+ ::chmod(TQFile::encodeName(f.name()).data(), S_IRUSR|S_IWUSR);
}
PrintcapEntry *entry = LprHandler::createEntry(prt);
if (!entry)
@@ -309,8 +309,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
entry->addField("af", Field::String, sd + "/acct");
entry->addField("lf", Field::String, sd + "/log");
entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter");
- entry->comment = QString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
- entry->postcomment = QString::fromLatin1("# APS%1_END").arg(m_counter);
+ entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
+ entry->postcomment = TQString::fromLatin1("# APS%1_END").arg(m_counter);
m_counter++;
return entry;
}
@@ -328,15 +328,15 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain
QTextStream t(&f);
t << "# File generated by KDEPrint" << endl;
t << "PRINTER='" << driver->get("gsdriver") << "'" << endl;
- QValueStack<DrGroup*> stack;
+ TQValueStack<DrGroup*> stack;
stack.push(driver);
while (stack.count() > 0)
{
DrGroup *grp = stack.pop();
- QPtrListIterator<DrGroup> git(grp->groups());
+ TQPtrListIterator<DrGroup> git(grp->groups());
for (; git.current(); ++git)
stack.push(git.current());
- QPtrListIterator<DrBase> oit(grp->options());
+ TQPtrListIterator<DrBase> oit(grp->options());
QString value;
for (; oit.current(); ++oit)
{
@@ -372,10 +372,10 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain
bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry)
{
QString path(sysconfDir() + "/" + entry->name);
- QFile::remove(path + "/smbclient.conf");
- QFile::remove(path + "/netware.conf");
- QFile::remove(path + "/apsfilterrc");
- if (!QDir(path).rmdir(path))
+ TQFile::remove(path + "/smbclient.conf");
+ TQFile::remove(path + "/netware.conf");
+ TQFile::remove(path + "/apsfilterrc");
+ if (!TQDir(path).rmdir(path))
{
manager()->setErrorMsg(i18n("Unable to remove directory %1.").arg(path));
return false;
@@ -383,11 +383,11 @@ bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry)
return true;
}
-QString ApsHandler::printOptions(KPrinter *printer)
+TQString ApsHandler::printOptions(KPrinter *printer)
{
QString optstr;
- QMap<QString,QString> opts = printer->options();
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ TQMap<TQString,TQString> opts = printer->options();
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key().startsWith( "app-" ))
continue;
diff --git a/kdeprint/lpr/apshandler.h b/kdeprint/lpr/apshandler.h
index 58e6b8878..02ee79c92 100644
--- a/kdeprint/lpr/apshandler.h
+++ b/kdeprint/lpr/apshandler.h
@@ -22,7 +22,7 @@
#include "lprhandler.h"
-#include <qmap.h>
+#include <tqmap.h>
class ApsHandler : public LprHandler
{
@@ -33,21 +33,21 @@ public:
KMPrinter* createPrinter(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
void reset();
PrintcapEntry* createEntry(KMPrinter*);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
bool removePrinter(KMPrinter*, PrintcapEntry*);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QString driverDirInternal();
+ TQString driverDirInternal();
private:
- QMap<QString,QString> loadResources(PrintcapEntry*);
- QMap<QString,QString> loadVarFile(const QString&);
- QString sysconfDir();
- QString shareDir();
+ TQMap<TQString,TQString> loadResources(PrintcapEntry*);
+ TQMap<TQString,TQString> loadVarFile(const TQString&);
+ TQString sysconfDir();
+ TQString shareDir();
DrMain* loadApsDriver(bool = false);
private:
diff --git a/kdeprint/lpr/editentrydialog.cpp b/kdeprint/lpr/editentrydialog.cpp
index 270b58235..6b0fb63f7 100644
--- a/kdeprint/lpr/editentrydialog.cpp
+++ b/kdeprint/lpr/editentrydialog.cpp
@@ -19,45 +19,45 @@
#include "editentrydialog.h"
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <klistview.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
#include <klocale.h>
#include <kiconloader.h>
-EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel)
+EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel)
{
- QWidget *w = new QWidget(this);
+ QWidget *w = new TQWidget(this);
setMainWidget(w);
- QLabel *lab0 = new QLabel(i18n("Aliases:"), w);
- m_aliases = new QLineEdit(w);
+ QLabel *lab0 = new TQLabel(i18n("Aliases:"), w);
+ m_aliases = new TQLineEdit(w);
m_view = new KListView(w);
m_view->addColumn("");
m_view->header()->hide();
- m_type = new QComboBox(w);
+ m_type = new TQComboBox(w);
m_type->insertItem(i18n("String"));
m_type->insertItem(i18n("Number"));
m_type->insertItem(i18n("Boolean"));
- m_stack = new QWidgetStack(w);
- m_boolean = new QCheckBox(i18n("Enabled"), m_stack);
- m_string = new QLineEdit(m_stack);
- m_number = new QSpinBox(0, 9999, 1, m_stack);
+ m_stack = new TQWidgetStack(w);
+ m_boolean = new TQCheckBox(i18n("Enabled"), m_stack);
+ m_string = new TQLineEdit(m_stack);
+ m_number = new TQSpinBox(0, 9999, 1, m_stack);
m_stack->addWidget(m_string, 0);
m_stack->addWidget(m_boolean, 2);
m_stack->addWidget(m_number, 1);
- m_name = new QLineEdit(w);
+ m_name = new TQLineEdit(w);
- QVBoxLayout *l0 = new QVBoxLayout(w, 0, 10);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(w, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5);
l0->addLayout(l1);
l1->addWidget(lab0);
l1->addWidget(m_aliases);
@@ -72,12 +72,12 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const ch
setCaption(i18n("Printcap Entry: %1").arg(entry->name));
m_fields = entry->fields;
m_aliases->setText(entry->aliases.join("|"));
- QListViewItem *root = new QListViewItem(m_view, entry->name), *item = 0;
+ QListViewItem *root = new TQListViewItem(m_view, entry->name), *item = 0;
root->setSelectable(false);
root->setOpen(true);
root->setPixmap(0, SmallIcon("fileprint"));
- for (QMap<QString,Field>::ConstIterator it=m_fields.begin(); it!=m_fields.end(); ++it)
- item = new QListViewItem(root, item, (*it).toString(), it.key());
+ for (TQMap<TQString,Field>::ConstIterator it=m_fields.begin(); it!=m_fields.end(); ++it)
+ item = new TQListViewItem(root, item, (*it).toString(), it.key());
}
m_block = true;
@@ -86,12 +86,12 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const ch
slotTypeChanged(0);
m_block = false;
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotItemSelected(QListViewItem*)));
- connect(m_string, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_boolean, SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(m_number, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
- connect(m_name, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(m_string, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_boolean, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(m_number, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
+ connect(m_name, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
resize(500,400);
}
@@ -122,7 +122,7 @@ void EditEntryDialog::slotChanged()
}
}
-void EditEntryDialog::slotItemSelected(QListViewItem *item)
+void EditEntryDialog::slotItemSelected(TQListViewItem *item)
{
m_stack->setEnabled(item);
m_name->setEnabled(item);
@@ -144,7 +144,7 @@ void EditEntryDialog::slotItemSelected(QListViewItem *item)
void EditEntryDialog::fillEntry(PrintcapEntry *entry)
{
- entry->aliases = QStringList::split('|', m_aliases->text(), false);
+ entry->aliases = TQStringList::split('|', m_aliases->text(), false);
entry->fields = m_fields;
}
diff --git a/kdeprint/lpr/editentrydialog.h b/kdeprint/lpr/editentrydialog.h
index 906bc45db..eb861ccd7 100644
--- a/kdeprint/lpr/editentrydialog.h
+++ b/kdeprint/lpr/editentrydialog.h
@@ -35,12 +35,12 @@ class EditEntryDialog : public KDialogBase
{
Q_OBJECT
public:
- EditEntryDialog(PrintcapEntry *entry, QWidget *parent = 0, const char *name = 0);
+ EditEntryDialog(PrintcapEntry *entry, TQWidget *parent = 0, const char *name = 0);
void fillEntry(PrintcapEntry *entry);
protected slots:
- void slotItemSelected(QListViewItem*);
+ void slotItemSelected(TQListViewItem*);
void slotChanged();
void slotTypeChanged(int);
@@ -48,7 +48,7 @@ protected:
Field createField();
private:
- QMap<QString,Field> m_fields;
+ TQMap<TQString,Field> m_fields;
QLineEdit *m_name, *m_string, *m_aliases;
QCheckBox *m_boolean;
QComboBox *m_type;
diff --git a/kdeprint/lpr/klprprinterimpl.cpp b/kdeprint/lpr/klprprinterimpl.cpp
index f6f416376..1d77b166c 100644
--- a/kdeprint/lpr/klprprinterimpl.cpp
+++ b/kdeprint/lpr/klprprinterimpl.cpp
@@ -22,10 +22,10 @@
#include "kmlprmanager.h"
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
-KLprPrinterImpl::KLprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KLprPrinterImpl::KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
m_exepath = KStandardDirs::findExe("lpr");
@@ -35,25 +35,25 @@ KLprPrinterImpl::~KLprPrinterImpl()
{
}
-bool KLprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// check printer object
if (!printer || m_exepath.isEmpty())
return false;
- cmd = QString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() );
+ cmd = TQString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() );
QString opts = static_cast<KMLprManager*>(KMManager::self())->printOptions(printer);
if (!opts.isEmpty())
cmd += (" " + opts);
return true;
}
-void KLprPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KLprPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
KPrinterImpl::broadcastOption(key,value);
if (key == "kde-pagesize")
{
- QString pagename = QString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
+ QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
KPrinterImpl::broadcastOption("PageSize",pagename);
}
}
diff --git a/kdeprint/lpr/klprprinterimpl.h b/kdeprint/lpr/klprprinterimpl.h
index e603e9396..ca346ab8a 100644
--- a/kdeprint/lpr/klprprinterimpl.h
+++ b/kdeprint/lpr/klprprinterimpl.h
@@ -25,11 +25,11 @@
class KLprPrinterImpl : public KPrinterImpl
{
public:
- KLprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KLprPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
- void broadcastOption(const QString& key, const QString& value);
+ bool setupCommand(TQString&, KPrinter*);
+ void broadcastOption(const TQString& key, const TQString& value);
private:
QString m_exepath;
diff --git a/kdeprint/lpr/kmconfiglpr.cpp b/kdeprint/lpr/kmconfiglpr.cpp
index ccf6a71a1..95a2e02d4 100644
--- a/kdeprint/lpr/kmconfiglpr.cpp
+++ b/kdeprint/lpr/kmconfiglpr.cpp
@@ -20,27 +20,27 @@
#include "kmconfiglpr.h"
#include "lprsettings.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kconfig.h>
-KMConfigLpr::KMConfigLpr(QWidget *parent, const char *name)
+KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Spooler"));
setPageHeader(i18n("Spooler Settings"));
setPagePixmap("gear");
- QGroupBox *m_modebox = new QGroupBox(1, Qt::Vertical, i18n("Spooler"), this);
+ QGroupBox *m_modebox = new TQGroupBox(1, Qt::Vertical, i18n("Spooler"), this);
- m_mode = new QComboBox(m_modebox);
+ m_mode = new TQComboBox(m_modebox);
m_mode->insertItem("LPR (BSD compatible)");
m_mode->insertItem("LPRng");
- QVBoxLayout *l0 = new QVBoxLayout(this, 5, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 5, 10);
l0->addWidget(m_modebox);
l0->addStretch(1);
}
diff --git a/kdeprint/lpr/kmconfiglpr.h b/kdeprint/lpr/kmconfiglpr.h
index 26538eb8f..13e52fb42 100644
--- a/kdeprint/lpr/kmconfiglpr.h
+++ b/kdeprint/lpr/kmconfiglpr.h
@@ -27,7 +27,7 @@ class QComboBox;
class KMConfigLpr : public KMConfigPage
{
public:
- KMConfigLpr(QWidget *parent = 0, const char *name = 0);
+ KMConfigLpr(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/lpr/kmlprjobmanager.cpp b/kdeprint/lpr/kmlprjobmanager.cpp
index d60a41020..f002043d5 100644
--- a/kdeprint/lpr/kmlprjobmanager.cpp
+++ b/kdeprint/lpr/kmlprjobmanager.cpp
@@ -24,21 +24,21 @@
#include "kmjob.h"
#include "lprsettings.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klocale.h>
-KMLprJobManager::KMLprJobManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprJobManager::KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMJobManager(parent, name)
{
m_lpqhelper = new LpqHelper(this, "LpqHelper");
}
-bool KMLprJobManager::listJobs(const QString& prname, JobType, int limit)
+bool KMLprJobManager::listJobs(const TQString& prname, JobType, int limit)
{
- QPtrList<KMJob> jobList;
+ TQPtrList<KMJob> jobList;
jobList.setAutoDelete(false);
m_lpqhelper->listJobs(jobList, prname, limit);
- QPtrListIterator<KMJob> it(jobList);
+ TQPtrListIterator<KMJob> it(jobList);
for (; it.current(); ++it)
addJob(it.current());
return false;
@@ -58,10 +58,10 @@ int KMLprJobManager::actions()
return (KMJob::Remove | KMJob::Hold | KMJob::Resume);
}
-bool KMLprJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg)
+bool KMLprJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg)
{
QString msg;
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool status(true);
LpcHelper *helper = lpcHelper();
diff --git a/kdeprint/lpr/kmlprjobmanager.h b/kdeprint/lpr/kmlprjobmanager.h
index 555b5e75b..83d65a296 100644
--- a/kdeprint/lpr/kmlprjobmanager.h
+++ b/kdeprint/lpr/kmlprjobmanager.h
@@ -28,14 +28,14 @@ class LpcHelper;
class KMLprJobManager : public KMJobManager
{
public:
- KMLprJobManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
int actions();
protected:
- bool listJobs(const QString&, JobType, int = 0);
+ bool listJobs(const TQString&, JobType, int = 0);
LpcHelper* lpcHelper();
- bool sendCommandSystemJob(const QPtrList<KMJob>&, int, const QString& = QString::null);
+ bool sendCommandSystemJob(const TQPtrList<KMJob>&, int, const TQString& = TQString::null);
private:
LpqHelper *m_lpqhelper;
diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp
index e383bca2f..65b08eb67 100644
--- a/kdeprint/lpr/kmlprmanager.cpp
+++ b/kdeprint/lpr/kmlprmanager.cpp
@@ -28,8 +28,8 @@
#include "driver.h"
#include "editentrydialog.h"
-#include <qfileinfo.h>
-#include <qptrlist.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <unistd.h>
-KMLprManager::KMLprManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprManager::KMLprManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
m_handlers.setAutoDelete(true);
@@ -78,7 +78,7 @@ void KMLprManager::listPrinters()
// cleanup previous entries
m_entries.clear();
// notify handlers
- QPtrListIterator<LprHandler> hit(m_handlerlist);
+ TQPtrListIterator<LprHandler> hit(m_handlerlist);
for (; hit.current(); ++hit)
hit.current()->reset();
@@ -91,7 +91,7 @@ void KMLprManager::listPrinters()
reader.setPrintcapFile(&f);
while ((entry = reader.nextEntry()) != NULL)
{
- QPtrListIterator<LprHandler> it(m_handlerlist);
+ TQPtrListIterator<LprHandler> it(m_handlerlist);
for (; it.current(); ++it)
if (it.current()->validate(entry))
{
@@ -110,7 +110,7 @@ void KMLprManager::listPrinters()
}
else
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
if (!it.current()->isSpecial())
{
@@ -138,9 +138,9 @@ void KMLprManager::initHandlers()
// now load external handlers
QStringList l = KGlobal::dirs()->findAllResources("data", "kdeprint/lpr/*.la");
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
- KLibrary *library = KLibLoader::self()->library(QFile::encodeName(*it));
+ KLibrary *library = KLibLoader::self()->library(TQFile::encodeName(*it));
if (library)
{
kdDebug() << "loading external handler from " << *it << endl;
@@ -228,10 +228,10 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config)
return NULL;
}
-DrMain* KMLprManager::loadFileDriver(const QString& filename)
+DrMain* KMLprManager::loadFileDriver(const TQString& filename)
{
int p = filename.find('/');
- QString handler_str = (p != -1 ? filename.left(p) : QString::fromLatin1("default"));
+ QString handler_str = (p != -1 ? filename.left(p) : TQString::fromLatin1("default"));
LprHandler *handler = m_handlers.find(handler_str);
if (handler)
{
@@ -293,7 +293,7 @@ bool KMLprManager::savePrintcapFile()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (; it.current(); ++it)
{
it.current()->writeEntry(t);
@@ -361,7 +361,7 @@ bool KMLprManager::createPrinter(KMPrinter *prt)
entry->addField("mx", Field::Integer, "0");
entry->addField("sd", Field::String, sd);
if (!prt->option("kde-aliases").isEmpty())
- entry->aliases += QStringList::split("|", prt->option("kde-aliases"), false);
+ entry->aliases += TQStringList::split("|", prt->option("kde-aliases"), false);
// insert the new entry and save printcap file
m_entries.insert(prt->printerName(), entry);
@@ -405,7 +405,7 @@ bool KMLprManager::removePrinter(KMPrinter *prt)
{
// printcap file saved, entry can be deleted now
delete entry;
- status = (::system(QFile::encodeName("rm -rf " + KProcess::quote(sd))) == 0);
+ status = (::system(TQFile::encodeName("rm -rf " + KProcess::quote(sd))) == 0);
if (!status)
setErrorMsg(i18n("Unable to remove spool directory %1. "
"Check that you have write permissions "
@@ -420,14 +420,14 @@ bool KMLprManager::removePrinter(KMPrinter *prt)
return false;
}
-QString KMLprManager::driverDbCreationProgram()
+TQString KMLprManager::driverDbCreationProgram()
{
- return QString::fromLatin1("make_driver_db_lpr");
+ return TQString::fromLatin1("make_driver_db_lpr");
}
-QString KMLprManager::driverDirectory()
+TQString KMLprManager::driverDirectory()
{
- QPtrListIterator<LprHandler> it(m_handlerlist);
+ TQPtrListIterator<LprHandler> it(m_handlerlist);
QString dbDirs;
for (; it.current(); ++it)
{
@@ -440,7 +440,7 @@ QString KMLprManager::driverDirectory()
return dbDirs;
}
-QString KMLprManager::printOptions(KPrinter *prt)
+TQString KMLprManager::printOptions(KPrinter *prt)
{
KMPrinter *mprt = findPrinter(prt->printerName());
QString opts;
@@ -450,12 +450,12 @@ QString KMLprManager::printOptions(KPrinter *prt)
if (handler)
return handler->printOptions(prt);
}
- return QString::null;
+ return TQString::null;
}
void KMLprManager::createPluginActions(KActionCollection *coll)
{
- KAction *act = new KAction(i18n("&Edit printcap Entry..."), "kdeprint_report", 0, this, SLOT(slotEditPrintcap()), coll, "plugin_editprintcap");
+ KAction *act = new KAction(i18n("&Edit printcap Entry..."), "kdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap");
act->setGroup("plugin");
}
@@ -473,7 +473,7 @@ void KMLprManager::slotEditPrintcap()
i18n("Editing a printcap entry manually should only be "
"done by confirmed system administrator. This may "
"prevent your printer from working. Do you want to "
- "continue?"), QString::null, KStdGuiItem::cont(),
+ "continue?"), TQString::null, KStdGuiItem::cont(),
"editPrintcap") == KMessageBox::Cancel)
return;
@@ -484,7 +484,7 @@ void KMLprManager::slotEditPrintcap()
}
}
-QString KMLprManager::stateInformation()
+TQString KMLprManager::stateInformation()
{
return i18n("Spooler type: %1").arg(LprSettings::self()->mode() == LprSettings::LPR ? "LPR (BSD compatible)" : "LPRng");
}
diff --git a/kdeprint/lpr/kmlprmanager.h b/kdeprint/lpr/kmlprmanager.h
index 5a7612e38..516494f95 100644
--- a/kdeprint/lpr/kmlprmanager.h
+++ b/kdeprint/lpr/kmlprmanager.h
@@ -22,9 +22,9 @@
#include "kmmanager.h"
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include <kurl.h>
class LprHandler;
@@ -36,7 +36,7 @@ class KMLprManager : public KMManager
{
Q_OBJECT
public:
- KMLprManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
bool completePrinter(KMPrinter*);
bool completePrinterShort(KMPrinter*);
@@ -44,19 +44,19 @@ public:
bool startPrinter(KMPrinter*, bool);
bool savePrinterDriver(KMPrinter*, DrMain*);
DrMain* loadPrinterDriver(KMPrinter*, bool = false);
- DrMain* loadFileDriver(const QString&);
+ DrMain* loadFileDriver(const TQString&);
bool createPrinter(KMPrinter*);
bool removePrinter(KMPrinter*);
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
LpcHelper* lpcHelper() { return m_lpchelper; }
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
void createPluginActions(KActionCollection*);
void validatePluginActions(KActionCollection*, KMPrinter*);
- QString stateInformation();
+ TQString stateInformation();
protected slots:
void slotEditPrintcap();
@@ -71,9 +71,9 @@ protected:
bool savePrintcapFile();
private:
- QDict<LprHandler> m_handlers;
- QPtrList<LprHandler> m_handlerlist;
- QDict<PrintcapEntry> m_entries;
+ TQDict<LprHandler> m_handlers;
+ TQPtrList<LprHandler> m_handlerlist;
+ TQDict<PrintcapEntry> m_entries;
QDateTime m_updtime;
LpcHelper *m_lpchelper;
KMPrinter *m_currentprinter;
diff --git a/kdeprint/lpr/kmlpruimanager.cpp b/kdeprint/lpr/kmlpruimanager.cpp
index 7b621d66f..ea48c9bf9 100644
--- a/kdeprint/lpr/kmlpruimanager.cpp
+++ b/kdeprint/lpr/kmlpruimanager.cpp
@@ -31,7 +31,7 @@
#include <klocale.h>
-KMLprUiManager::KMLprUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprUiManager::KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
diff --git a/kdeprint/lpr/kmlpruimanager.h b/kdeprint/lpr/kmlpruimanager.h
index 46eedb189..e7e015e2a 100644
--- a/kdeprint/lpr/kmlpruimanager.h
+++ b/kdeprint/lpr/kmlpruimanager.h
@@ -25,7 +25,7 @@
class KMLprUiManager : public KMUiManager
{
public:
- KMLprUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMLprUiManager();
void setupPropertyPages(KMPropertyPage*);
diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp
index b4cd6f9e1..516e85af3 100644
--- a/kdeprint/lpr/lpchelper.cpp
+++ b/kdeprint/lpr/lpchelper.cpp
@@ -23,14 +23,14 @@
#include "lprsettings.h"
#include <kstandarddirs.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
#include <kprocess.h>
#include <stdlib.h>
-static QString execute(const QString& cmd)
+static TQString execute(const TQString& cmd)
{
KPipeProcess proc;
QString output;
@@ -44,8 +44,8 @@ static QString execute(const QString& cmd)
return output;
}
-LpcHelper::LpcHelper(QObject *parent, const char *name)
-: QObject(parent, name)
+LpcHelper::LpcHelper(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
// look for the "lpc" executable. Use the PATH variable and
// add some specific dirs.
@@ -60,7 +60,7 @@ LpcHelper::~LpcHelper()
{
}
-KMPrinter::PrinterState LpcHelper::state(const QString& prname) const
+KMPrinter::PrinterState LpcHelper::state(const TQString& prname) const
{
if (m_state.contains(prname))
return m_state[prname];
@@ -72,7 +72,7 @@ KMPrinter::PrinterState LpcHelper::state(KMPrinter *prt) const
return state(prt->printerName());
}
-void LpcHelper::parseStatusLPR(QTextStream &t)
+void LpcHelper::parseStatusLPR(TQTextStream &t)
{
QString printer, line;
int p(-1);
@@ -107,7 +107,7 @@ void LpcHelper::parseStatusLPR(QTextStream &t)
}
}
-void LpcHelper::parseStatusLPRng(QTextStream& t)
+void LpcHelper::parseStatusLPRng(TQTextStream& t)
{
QStringList l;
int p(-1);
@@ -118,7 +118,7 @@ void LpcHelper::parseStatusLPRng(QTextStream& t)
break;
while (!t.atEnd())
{
- l = QStringList::split(QRegExp("\\s"), t.readLine(), false);
+ l = TQStringList::split(TQRegExp("\\s"), t.readLine(), false);
if (l.count() < 4)
continue;
p = l[0].find('@');
@@ -163,7 +163,7 @@ void LpcHelper::updateStates()
}
-bool LpcHelper::enable(KMPrinter *prt, bool state, QString& msg)
+bool LpcHelper::enable(KMPrinter *prt, bool state, TQString& msg)
{
int st = m_state[prt->printerName()] & KMPrinter::StateMask;
if (changeState(prt->printerName(), (state ? "enable" : "disable"), msg))
@@ -174,7 +174,7 @@ bool LpcHelper::enable(KMPrinter *prt, bool state, QString& msg)
return false;
}
-bool LpcHelper::start(KMPrinter *prt, bool state, QString& msg)
+bool LpcHelper::start(KMPrinter *prt, bool state, TQString& msg)
{
int rej = m_state[prt->printerName()] & ~KMPrinter::StateMask;
if (changeState(prt->printerName(), (state ? "start" : "stop"), msg))
@@ -190,7 +190,7 @@ bool LpcHelper::start(KMPrinter *prt, bool state, QString& msg)
// -1 : permission denied
// -2 : unknown printer
// 1 : unknown error
-int LpcHelper::parseStateChangeLPR(const QString& result, const QString& printer)
+int LpcHelper::parseStateChangeLPR(const TQString& result, const TQString& printer)
{
if (result.startsWith(printer + ":"))
return 0;
@@ -202,7 +202,7 @@ int LpcHelper::parseStateChangeLPR(const QString& result, const QString& printer
return 1;
}
-static QString lprngAnswer(const QString& result, const QString& printer)
+static TQString lprngAnswer(const TQString& result, const TQString& printer)
{
int p, q;
@@ -214,10 +214,10 @@ static QString lprngAnswer(const QString& result, const QString& printer)
QString answer = result.mid(q, p-q).stripWhiteSpace();
return answer;
}
- return QString::null;
+ return TQString::null;
}
-int LpcHelper::parseStateChangeLPRng(const QString& result, const QString& printer)
+int LpcHelper::parseStateChangeLPRng(const TQString& result, const TQString& printer)
{
QString answer = lprngAnswer(result, printer);
if (answer == "no")
@@ -228,7 +228,7 @@ int LpcHelper::parseStateChangeLPRng(const QString& result, const QString& print
return 1;
}
-bool LpcHelper::changeState(const QString& printer, const QString& op, QString& msg)
+bool LpcHelper::changeState(const TQString& printer, const TQString& op, TQString& msg)
{
if (m_exepath.isEmpty())
{
@@ -260,20 +260,20 @@ bool LpcHelper::changeState(const QString& printer, const QString& op, QString&
break;
default:
case 1:
- msg = i18n("Unknown error: %1").arg(result.replace(QRegExp("\\n"), " "));
+ msg = i18n("Unknown error: %1").arg(result.replace(TQRegExp("\\n"), " "));
break;
}
return (status == 0);
}
-bool LpcHelper::removeJob(KMJob *job, QString& msg)
+bool LpcHelper::removeJob(KMJob *job, TQString& msg)
{
if (m_lprmpath.isEmpty())
{
msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lprm");
return false;
}
- QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + QString::number(job->id()));
+ QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id()));
if (result.find("dequeued") != -1)
return true;
else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1)
@@ -284,14 +284,14 @@ bool LpcHelper::removeJob(KMJob *job, QString& msg)
}
// LPRng only
-bool LpcHelper::changeJobState(KMJob *job, int state, QString& msg)
+bool LpcHelper::changeJobState(KMJob *job, int state, TQString& msg)
{
if (m_lprmpath.isEmpty())
{
msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lpc");
return false;
}
- QString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + QString::number(job->id()));
+ QString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + TQString::number(job->id()));
QString answer = lprngAnswer(result, job->printer());
if (answer == "no")
{
@@ -302,7 +302,7 @@ bool LpcHelper::changeJobState(KMJob *job, int state, QString& msg)
return true;
}
-bool LpcHelper::restart(QString& msg)
+bool LpcHelper::restart(TQString& msg)
{
QString s;
if (m_exepath.isEmpty())
@@ -314,7 +314,7 @@ bool LpcHelper::restart(QString& msg)
msg = i18n("The executable %1 couldn't be found in your PATH.").arg(s);
return false;
}
- ::system(QFile::encodeName(m_exepath + " reread"));
- ::system(QFile::encodeName(m_checkpcpath + " -f"));
+ ::system(TQFile::encodeName(m_exepath + " reread"));
+ ::system(TQFile::encodeName(m_checkpcpath + " -f"));
return true;
}
diff --git a/kdeprint/lpr/lpchelper.h b/kdeprint/lpr/lpchelper.h
index a4474354d..d7e6c7897 100644
--- a/kdeprint/lpr/lpchelper.h
+++ b/kdeprint/lpr/lpchelper.h
@@ -20,9 +20,9 @@
#ifndef LPCHELPER_H
#define LPCHELPER_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qtextstream.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqtextstream.h>
#include "kmprinter.h"
class KMJob;
@@ -30,29 +30,29 @@ class KMJob;
class LpcHelper : public QObject
{
public:
- LpcHelper(QObject *parent = 0, const char *name = 0);
+ LpcHelper(TQObject *parent = 0, const char *name = 0);
~LpcHelper();
- KMPrinter::PrinterState state(const QString&) const;
+ KMPrinter::PrinterState state(const TQString&) const;
KMPrinter::PrinterState state(KMPrinter*) const;
void updateStates();
- bool enable(KMPrinter*, bool, QString&);
- bool start(KMPrinter*, bool, QString&);
- bool removeJob(KMJob*, QString&);
- bool changeJobState(KMJob*, int, QString&);
+ bool enable(KMPrinter*, bool, TQString&);
+ bool start(KMPrinter*, bool, TQString&);
+ bool removeJob(KMJob*, TQString&);
+ bool changeJobState(KMJob*, int, TQString&);
- bool restart(QString&);
+ bool restart(TQString&);
protected:
- bool changeState(const QString&, const QString&, QString&);
- void parseStatusLPR(QTextStream&);
- void parseStatusLPRng(QTextStream&);
- int parseStateChangeLPR(const QString&, const QString&);
- int parseStateChangeLPRng(const QString&, const QString&);
+ bool changeState(const TQString&, const TQString&, TQString&);
+ void parseStatusLPR(TQTextStream&);
+ void parseStatusLPRng(TQTextStream&);
+ int parseStateChangeLPR(const TQString&, const TQString&);
+ int parseStateChangeLPRng(const TQString&, const TQString&);
private:
- QMap<QString, KMPrinter::PrinterState> m_state;
+ TQMap<TQString, KMPrinter::PrinterState> m_state;
QString m_exepath, m_lprmpath, m_checkpcpath;
};
diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp
index c9f26174b..2675c9d41 100644
--- a/kdeprint/lpr/lpqhelper.cpp
+++ b/kdeprint/lpr/lpqhelper.cpp
@@ -26,8 +26,8 @@
#include <kprocess.h>
#include <kdebug.h>
-LpqHelper::LpqHelper(QObject *parent, const char *name)
-: QObject(parent, name)
+LpqHelper::LpqHelper(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
m_exepath = KStandardDirs::findExe("lpq");
}
@@ -36,7 +36,7 @@ LpqHelper::~LpqHelper()
{
}
-KMJob* LpqHelper::parseLineLpr(const QString& line)
+KMJob* LpqHelper::parseLineLpr(const TQString& line)
{
QString rank = line.left(7);
if (!rank[0].isDigit() && rank != "active")
@@ -54,7 +54,7 @@ KMJob* LpqHelper::parseLineLpr(const QString& line)
return job;
}
-KMJob* LpqHelper::parseLineLPRng(const QString& line)
+KMJob* LpqHelper::parseLineLPRng(const TQString& line)
{
QString rank = line.left(7).stripWhiteSpace();
if (!rank[0].isDigit() && rank != "active" && rank != "hold")
@@ -80,7 +80,7 @@ KMJob* LpqHelper::parseLineLPRng(const QString& line)
return job;
}
-void LpqHelper::listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit)
+void LpqHelper::listJobs(TQPtrList<KMJob>& jobs, const TQString& prname, int limit)
{
KPipeProcess proc;
if (!m_exepath.isEmpty() && proc.open(m_exepath + " -P " + KProcess::quote(prname)))
@@ -105,7 +105,7 @@ void LpqHelper::listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit
if (job)
{
job->setPrinter(prname);
- job->setUri("lpd://"+prname+"/"+QString::number(job->id()));
+ job->setUri("lpd://"+prname+"/"+TQString::number(job->id()));
jobs.append(job);
count++;
}
diff --git a/kdeprint/lpr/lpqhelper.h b/kdeprint/lpr/lpqhelper.h
index 1c9af35a6..b41521f66 100644
--- a/kdeprint/lpr/lpqhelper.h
+++ b/kdeprint/lpr/lpqhelper.h
@@ -20,22 +20,22 @@
#ifndef LPQHELPER_H
#define LPQHELPER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KMJob;
class LpqHelper : public QObject
{
public:
- LpqHelper(QObject *parent = 0, const char *name = 0);
+ LpqHelper(TQObject *parent = 0, const char *name = 0);
~LpqHelper();
- void listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit = 0);
+ void listJobs(TQPtrList<KMJob>& jobs, const TQString& prname, int limit = 0);
protected:
- KMJob* parseLineLpr(const QString&);
- KMJob* parseLineLPRng(const QString&);
+ KMJob* parseLineLpr(const TQString&);
+ KMJob* parseLineLPRng(const TQString&);
private:
QString m_exepath;
diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp
index 396562691..600df4796 100644
--- a/kdeprint/lpr/lprhandler.cpp
+++ b/kdeprint/lpr/lprhandler.cpp
@@ -24,14 +24,14 @@
#include "lprsettings.h"
#include "driver.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqvaluestack.h>
#include <klocale.h>
#include <unistd.h>
-LprHandler::LprHandler(const QString& name, KMManager *mgr)
+LprHandler::LprHandler(const TQString& name, KMManager *mgr)
: m_name(name), m_manager(mgr)
{
}
@@ -57,7 +57,7 @@ KMPrinter* LprHandler::createPrinter(PrintcapEntry *entry)
bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool)
{
prt->setDescription(i18n("Unknown (unrecognized entry)"));
- QString val = entry->field("lp");
+ TQString val = entry->field("lp");
KURL uri;
if (!val.isEmpty() && val != "/dev/null")
{
@@ -85,7 +85,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool)
}
else if (!(val = entry->field("rp")).isEmpty())
{
- QString rm = entry->has("rm") ?
+ TQString rm = entry->has("rm") ?
entry->field("rm") :
LprSettings::self()->defaultRemoteHost();
prt->setLocation(i18n("Remote queue (%1) on %2").arg(val).arg(rm));
@@ -111,7 +111,7 @@ bool LprHandler::savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool*)
return false;
}
-DrMain* LprHandler::loadDbDriver(const QString&)
+DrMain* LprHandler::loadDbDriver(const TQString&)
{
manager()->setErrorMsg(i18n("Unrecognized entry."));
return NULL;
@@ -138,15 +138,15 @@ PrintcapEntry* LprHandler::createEntry(KMPrinter *prt)
entry->addField("rp", Field::String, rp);
// force this entry to null (otherwise it seems it's redirected
// to /dev/lp0 by default)
- entry->addField("lp", Field::String, QString::null);
+ entry->addField("lp", Field::String, TQString::null);
}
else if ( prot == "socket" )
{
- QString lp = uri.host();
+ TQString lp = uri.host();
if ( uri.port() == 0 )
lp.append( "%9100" );
else
- lp.append( "%" ).append( QString::number( uri.port() ) );
+ lp.append( "%" ).append( TQString::number( uri.port() ) );
entry->addField("lp", Field::String, lp);
}
else
@@ -161,22 +161,22 @@ bool LprHandler::removePrinter(KMPrinter*, PrintcapEntry*)
return true;
}
-QString LprHandler::printOptions(KPrinter*)
+TQString LprHandler::printOptions(KPrinter*)
{
- return QString::null;
+ return TQString::null;
}
void LprHandler::reset()
{
}
-DrMain* LprHandler::loadToolDriver(const QString& filename)
+DrMain* LprHandler::loadToolDriver(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_ReadOnly))
{
DrMain *driver = new DrMain;
- QValueStack<DrGroup*> groups;
+ TQValueStack<DrGroup*> groups;
QTextStream t(&f);
QStringList l;
DrListOption *lopt(0);
@@ -186,7 +186,7 @@ DrMain* LprHandler::loadToolDriver(const QString& filename)
driver->set("text", "Tool Driver");
while (!t.atEnd())
{
- l = QStringList::split('|', t.readLine().stripWhiteSpace(), false);
+ l = TQStringList::split('|', t.readLine().stripWhiteSpace(), false);
if (l.count() == 0)
continue;
if (l[0] == "GROUP")
@@ -245,26 +245,26 @@ DrMain* LprHandler::loadToolDriver(const QString& filename)
return NULL;
}
-QString LprHandler::driverDirectory()
+TQString LprHandler::driverDirectory()
{
if (m_cacheddriverdir.isEmpty())
m_cacheddriverdir = driverDirInternal();
return m_cacheddriverdir;
}
-QString LprHandler::driverDirInternal()
+TQString LprHandler::driverDirInternal()
{
- return QString::null;
+ return TQString::null;
}
-QString LprHandler::locateDir(const QString& dirname, const QString& paths)
+TQString LprHandler::locateDir(const TQString& dirname, const TQString& paths)
{
- QStringList pathlist = QStringList::split(':', paths, false);
- for (QStringList::ConstIterator it=pathlist.begin(); it!=pathlist.end(); ++it)
+ QStringList pathlist = TQStringList::split(':', paths, false);
+ for (TQStringList::ConstIterator it=pathlist.begin(); it!=pathlist.end(); ++it)
{
QString testpath = *it + "/" + dirname;
- if (::access(QFile::encodeName(testpath), F_OK) == 0)
+ if (::access(TQFile::encodeName(testpath), F_OK) == 0)
return testpath;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/lpr/lprhandler.h b/kdeprint/lpr/lprhandler.h
index 49b9c6236..98b9c3819 100644
--- a/kdeprint/lpr/lprhandler.h
+++ b/kdeprint/lpr/lprhandler.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
+#include <tqstring.h>
class PrintcapEntry;
class KMPrinter;
@@ -42,30 +42,30 @@ class KPrinter;
class LprHandler
{
public:
- LprHandler(const QString& name, KMManager *mgr = 0);
+ LprHandler(const TQString& name, KMManager *mgr = 0);
virtual ~LprHandler();
virtual bool validate(PrintcapEntry*);
virtual KMPrinter* createPrinter(PrintcapEntry*);
virtual bool completePrinter(KMPrinter*, PrintcapEntry*, bool shortmode = true);
virtual DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- virtual DrMain* loadDbDriver(const QString&);
+ virtual DrMain* loadDbDriver(const TQString&);
virtual bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
virtual PrintcapEntry* createEntry(KMPrinter*);
virtual bool removePrinter(KMPrinter*, PrintcapEntry*);
- virtual QString printOptions(KPrinter*);
+ virtual TQString printOptions(KPrinter*);
virtual void reset();
- QString name() const;
+ TQString name() const;
KMManager* manager() const;
- QString driverDirectory();
+ TQString driverDirectory();
protected:
- DrMain* loadToolDriver(const QString&);
- QString locateDir(const QString& dirname, const QString& paths);
- QString cachedDriverDir() const;
- void setCachedDriverDir(const QString&);
- virtual QString driverDirInternal();
+ DrMain* loadToolDriver(const TQString&);
+ TQString locateDir(const TQString& dirname, const TQString& paths);
+ TQString cachedDriverDir() const;
+ void setCachedDriverDir(const TQString&);
+ virtual TQString driverDirInternal();
protected:
QString m_name;
@@ -73,16 +73,16 @@ protected:
QString m_cacheddriverdir;
};
-inline QString LprHandler::name() const
+inline TQString LprHandler::name() const
{ return m_name; }
inline KMManager* LprHandler::manager() const
{ return m_manager; }
-inline QString LprHandler::cachedDriverDir() const
+inline TQString LprHandler::cachedDriverDir() const
{ return m_cacheddriverdir; }
-inline void LprHandler::setCachedDriverDir(const QString& s)
+inline void LprHandler::setCachedDriverDir(const TQString& s)
{ m_cacheddriverdir = s; }
#endif
diff --git a/kdeprint/lpr/lprngtoolhandler.cpp b/kdeprint/lpr/lprngtoolhandler.cpp
index 1b08d70b9..3710496a9 100644
--- a/kdeprint/lpr/lprngtoolhandler.cpp
+++ b/kdeprint/lpr/lprngtoolhandler.cpp
@@ -26,8 +26,8 @@
#include "kmmanager.h"
#include "kprinter.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <klocale.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -50,7 +50,7 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
QString str, lp;
// look for type in comment
- QStringList l = QStringList::split(' ', entry->comment, false);
+ QStringList l = TQStringList::split(' ', entry->comment, false);
lp = entry->field("lp");
if (l.count() < 1)
return false;
@@ -59,10 +59,10 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
LprHandler::completePrinter(prt, entry, shortmode);
else if (l[1] == "SMB")
{
- QMap<QString,QString> opts = parseXferOptions(entry->field("xfer_options"));
+ TQMap<TQString,TQString> opts = parseXferOptions(entry->field("xfer_options"));
QString user, pass;
loadAuthFile(LprSettings::self()->baseSpoolDir() + "/" + entry->name + "/" + opts["authfile"], user, pass);
- QString uri = buildSmbURI(
+ TQString uri = buildSmbURI(
opts[ "workgroup" ],
opts[ "host" ],
opts[ "printer" ],
@@ -103,15 +103,15 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
return true;
}
-QMap<QString,QString> LPRngToolHandler::parseXferOptions(const QString& str)
+TQMap<TQString,TQString> LPRngToolHandler::parseXferOptions(const TQString& str)
{
uint p(0), q;
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QString key, val;
while (p < str.length())
{
- key = val = QString::null;
+ key = val = TQString::null;
// skip spaces
while (p < str.length() && str[p].isSpace())
p++;
@@ -130,7 +130,7 @@ QMap<QString,QString> LPRngToolHandler::parseXferOptions(const QString& str)
return opts;
}
-void LPRngToolHandler::loadAuthFile(const QString& filename, QString& user, QString& pass)
+void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQString& pass)
{
QFile f(filename);
if (f.open(IO_ReadOnly))
@@ -170,7 +170,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool
driver->set("text", i18n("LPRngTool Common Driver (%1)").arg((model.isEmpty() ? i18n("unknown") : model)));
if (!model.isEmpty())
driver->set("driverID", model);
- QMap<QString,QString> opts = parseZOptions(entry->field("prefix_z"));
+ TQMap<TQString,TQString> opts = parseZOptions(entry->field("prefix_z"));
opts["lpr"] = entry->field("lpr");
driver->setOptions(opts);
// if not configuring, don't show the "lpr" options
@@ -180,7 +180,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool
return driver;
}
-DrMain* LPRngToolHandler::loadDbDriver(const QString& s)
+DrMain* LPRngToolHandler::loadDbDriver(const TQString& s)
{
int p = s.find('/');
DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1"));
@@ -189,10 +189,10 @@ DrMain* LPRngToolHandler::loadDbDriver(const QString& s)
return driver;
}
-QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const QString& filename)
+TQValueList< QPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(const TQString& filename)
{
QFile f(filename);
- QValueList< QPair<QString,QStringList> > dict;
+ TQValueList< QPair<TQString,TQStringList> > dict;
if (f.open(IO_ReadOnly))
{
QTextStream t(&f);
@@ -204,9 +204,9 @@ QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const
if (line.startsWith("OPTION"))
{
if (l.count() > 0 && !key.isEmpty())
- dict << QPair<QString,QStringList>(key, l);
+ dict << QPair<TQString,TQStringList>(key, l);
l.clear();
- key = QString::null;
+ key = TQString::null;
if (line.contains('|') == 2 || line.right(7) == "BOOLEAN")
{
int p = line.find('|', 7);
@@ -223,10 +223,10 @@ QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const
return dict;
}
-QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
+TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr)
{
- QMap<QString,QString> opts;
- QStringList l = QStringList::split(',', optstr, false);
+ TQMap<TQString,TQString> opts;
+ QStringList l = TQStringList::split(',', optstr, false);
if (l.count() == 0)
return opts;
@@ -234,10 +234,10 @@ QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
m_dict = loadChoiceDict(locate("data", "kdeprint/lprngtooldriver1"));
QString unknown;
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
bool found(false);
- for (QValueList< QPair<QString,QStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p)
+ for (TQValueList< QPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p)
{
if ((*p).second.find(*it) != (*p).second.end())
{
@@ -258,12 +258,12 @@ QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
return opts;
}
-QString LPRngToolHandler::filterDir()
+TQString LPRngToolHandler::filterDir()
{
return driverDirectory();
}
-QString LPRngToolHandler::driverDirInternal()
+TQString LPRngToolHandler::driverDirInternal()
{
return locateDir("filters", "/usr/lib:/usr/local/lib:/opt/lib:/usr/libexec:/usr/local/libexec:/opt/libexec");
}
@@ -293,7 +293,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
if (url.port() == 0)
lp.append("%9100");
else
- lp.append("%").append(QString::number(url.port()));
+ lp.append("%").append(TQString::number(url.port()));
}
else if (prot == "lpd")
{
@@ -308,7 +308,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
QString work, server, printer, user, passwd;
if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) )
{
- entry->addField("xfer_options", Field::String, QString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work));
+ entry->addField("xfer_options", Field::String, TQString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work));
QFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth");
if (authfile.open(IO_WriteOnly))
{
@@ -331,12 +331,12 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
DrMain *driver = prt->driver();
comment.append("filtertype=IFHP ifhp_options=status@,sync@,pagecount@,waitend@ printerdb_entry=");
comment.append(driver->get("driverID"));
- entry->addField("ifhp", Field::String, QString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID")));
- entry->addField("lprngtooloptions", Field::String, QString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID")));
- QMap<QString,QString> opts;
+ entry->addField("ifhp", Field::String, TQString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID")));
+ entry->addField("lprngtooloptions", Field::String, TQString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID")));
+ TQMap<TQString,TQString> opts;
QString optstr;
driver->getOptions(opts, false);
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
if (it.key() != "lpr")
optstr.append(*it).append(",");
if (!optstr.isEmpty())
@@ -357,10 +357,10 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMain *driver, bool *mustSave)
{
// save options in the "prefix_z" field and tell the manager to save the printcap file
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QString optstr;
driver->getOptions(opts, false);
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
if (it.key() != "lpr")
optstr.append(*it).append(",");
if (!optstr.isEmpty())
@@ -374,11 +374,11 @@ bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMai
return true;
}
-QString LPRngToolHandler::printOptions(KPrinter *printer)
+TQString LPRngToolHandler::printOptions(KPrinter *printer)
{
QString optstr;
- QMap<QString,QString> opts = printer->options();
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ TQMap<TQString,TQString> opts = printer->options();
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key() == "lpr" || it.key().startsWith( "app-" ))
continue;
diff --git a/kdeprint/lpr/lprngtoolhandler.h b/kdeprint/lpr/lprngtoolhandler.h
index ceff82393..6d7ec299f 100644
--- a/kdeprint/lpr/lprngtoolhandler.h
+++ b/kdeprint/lpr/lprngtoolhandler.h
@@ -21,9 +21,9 @@
#define LPRNGTOOLHANDLER_H
#include "lprhandler.h"
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqpair.h>
class LPRngToolHandler : public LprHandler
{
@@ -33,22 +33,22 @@ public:
bool validate(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
PrintcapEntry* createEntry(KMPrinter*);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QMap<QString,QString> parseXferOptions(const QString&);
- void loadAuthFile(const QString&, QString&, QString&);
- QValueList< QPair<QString,QStringList> > loadChoiceDict(const QString&);
- QMap<QString,QString> parseZOptions(const QString&);
- QString filterDir();
- QString driverDirInternal();
+ TQMap<TQString,TQString> parseXferOptions(const TQString&);
+ void loadAuthFile(const TQString&, TQString&, TQString&);
+ TQValueList< QPair<TQString,TQStringList> > loadChoiceDict(const TQString&);
+ TQMap<TQString,TQString> parseZOptions(const TQString&);
+ TQString filterDir();
+ TQString driverDirInternal();
private:
- QValueList< QPair<QString,QStringList> > m_dict;
+ TQValueList< QPair<TQString,TQStringList> > m_dict;
};
#endif
diff --git a/kdeprint/lpr/lprsettings.cpp b/kdeprint/lpr/lprsettings.cpp
index 90662a94c..15eef4126 100644
--- a/kdeprint/lpr/lprsettings.cpp
+++ b/kdeprint/lpr/lprsettings.cpp
@@ -22,16 +22,16 @@
#include "kmfactory.h"
#include <kconfig.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#define LPDCONF "/etc/lpd.conf"
#define PRINTCAP "/etc/printcap"
LprSettings* LprSettings::m_self = 0;
-LprSettings::LprSettings(QObject *parent, const char *name)
-: QObject(parent, name), KPReloadObject(true)
+LprSettings::LprSettings(TQObject *parent, const char *name)
+: TQObject(parent, name), KPReloadObject(true)
{
init();
}
@@ -63,21 +63,21 @@ void LprSettings::init()
else
{
// try to guess
- if (QFile::exists(LPDCONF))
+ if (TQFile::exists(LPDCONF))
m_mode = LPRng;
else
m_mode = LPR;
}
// Printcap file
- m_printcapfile = QString::null;
+ m_printcapfile = TQString::null;
m_local = true;
// Spool directory
m_spooldir = "/var/spool/lpd";
}
-QString LprSettings::printcapFile()
+TQString LprSettings::printcapFile()
{
if (m_printcapfile.isEmpty())
{
@@ -86,7 +86,7 @@ QString LprSettings::printcapFile()
if (m_mode == LPRng)
{
// look into /etc/lpd/conf file
- QFile cf(LPDCONF);
+ TQFile cf(LPDCONF);
if (cf.open(IO_ReadOnly))
{
QTextStream t(&cf);
@@ -112,12 +112,12 @@ QString LprSettings::printcapFile()
return m_printcapfile;
}
-QString LprSettings::defaultRemoteHost()
+TQString LprSettings::defaultRemoteHost()
{
if (m_defaultremotehost.isEmpty())
{
m_defaultremotehost = "localhost";
- QFile cf(LPDCONF);
+ TQFile cf(LPDCONF);
if (cf.open(IO_ReadOnly))
{
QTextStream t(&cf);
diff --git a/kdeprint/lpr/lprsettings.h b/kdeprint/lpr/lprsettings.h
index c6d6fe64f..419ec46d1 100644
--- a/kdeprint/lpr/lprsettings.h
+++ b/kdeprint/lpr/lprsettings.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kdeprint/kpreloadobject.h>
/**
@@ -34,10 +34,10 @@
* if you're a KDEPrint developer. The API might change in the
* future and binary compatibility might be broken.
*/
-class LprSettings : public QObject, public KPReloadObject
+class LprSettings : public TQObject, public KPReloadObject
{
public:
- LprSettings(QObject *parent = 0, const char *name = 0);
+ LprSettings(TQObject *parent = 0, const char *name = 0);
~LprSettings();
static LprSettings* self();
@@ -45,10 +45,10 @@ public:
enum Mode { LPR, LPRng };
Mode mode() const { return m_mode; }
void setMode(Mode m) { m_mode = m; }
- QString printcapFile();
- QString defaultRemoteHost();
+ TQString printcapFile();
+ TQString defaultRemoteHost();
bool isLocalPrintcap() { return m_local; }
- QString baseSpoolDir() { return m_spooldir; }
+ TQString baseSpoolDir() { return m_spooldir; }
protected:
void init();
@@ -61,7 +61,7 @@ private:
QString m_printcapfile;
bool m_local;
QString m_spooldir;
- QString m_defaultremotehost;
+ TQString m_defaultremotehost;
};
#endif
diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp
index a4b0d39a6..f3f0d4cdc 100644
--- a/kdeprint/lpr/matichandler.cpp
+++ b/kdeprint/lpr/matichandler.cpp
@@ -34,9 +34,9 @@
#include <kapplication.h>
#include <kdebug.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <sys/wait.h>
@@ -104,18 +104,18 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
KURL url ( parsePostpipe(postpipe) );
if (!url.isEmpty())
{
- QString ds = QString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol());
+ QString ds = TQString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol());
prt->setDevice(url.url());
prt->setLocation(ds);
}
}
- QMap<QString,QVariant> m = loader.data()[ "VAR" ].toMap();
+ TQMap<TQString,TQVariant> m = loader.data()[ "VAR" ].toMap();
if ( !m.isEmpty() )
{
prt->setManufacturer(m["make"].toString());
prt->setModel(m["model"].toString());
- prt->setDriverInfo(QString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString()));
+ prt->setDriverInfo(TQString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString()));
}
}
}
@@ -123,11 +123,11 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
return true;
}
-QString MaticHandler::parsePostpipe(const QString& s)
+TQString MaticHandler::parsePostpipe(const TQString& s)
{
QString url;
int p = s.findRev('|');
- QStringList args = QStringList::split(" ", s.right(s.length()-p-1));
+ QStringList args = TQStringList::split(" ", s.right(s.length()-p-1));
if (args.count() != 0)
{
@@ -143,7 +143,7 @@ QString MaticHandler::parsePostpipe(const QString& s)
// smb printer
else if (args[0].right(10) == "/smbclient")
{
- QStringList host_components = QStringList::split(QRegExp("/|\\\\\""), args[1], false);
+ QStringList host_components = TQStringList::split(TQRegExp("/|\\\\\""), args[1], false);
QString workgrp, user, pass;
for (uint i=2; i<args.count(); i++)
{
@@ -181,7 +181,7 @@ QString MaticHandler::parsePostpipe(const QString& s)
return url;
}
-QString MaticHandler::createPostpipe(const QString& _url)
+TQString MaticHandler::createPostpipe(const TQString& _url)
{
KURL url( _url );
QString prot = url.protocol();
@@ -191,7 +191,7 @@ QString MaticHandler::createPostpipe(const QString& _url)
str += ("| " + m_ncpath);
str += (" " + url.host());
if (url.port() != 0)
- str += (" " + QString::number(url.port()));
+ str += (" " + TQString::number(url.port()));
}
else if (prot == "lpd")
{
@@ -201,7 +201,7 @@ QString MaticHandler::createPostpipe(const QString& _url)
}
else if (prot == "smb")
{
- QString work, server, printer, user, passwd;
+ TQString work, server, printer, user, passwd;
if ( splitSmbURI( _url, work, server, printer, user, passwd ) )
{
str += ("| (\\n echo \\\"print -\\\"\\n cat \\n) | " + m_smbpath);
@@ -225,7 +225,7 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool)
// changing printer name), the template would be also removed
QString origfilename = maticFile(entry);
QString filename = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- ::system(QFile::encodeName("cp " + KProcess::quote(origfilename) + " " + KProcess::quote(filename)));
+ ::system(TQFile::encodeName("cp " + KProcess::quote(origfilename) + " " + KProcess::quote(filename)));
DrMain *driver = Foomatic2Loader::loadDriver(filename);
if (driver)
{
@@ -237,9 +237,9 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool)
return NULL;
}
-DrMain* MaticHandler::loadDbDriver(const QString& path)
+DrMain* MaticHandler::loadDbDriver(const TQString& path)
{
- QStringList comps = QStringList::split('/', path, false);
+ QStringList comps = TQStringList::split('/', path, false);
if (comps.count() < 3 || comps[0] != "foomatic")
{
manager()->setErrorMsg(i18n("Internal error."));
@@ -247,7 +247,7 @@ DrMain* MaticHandler::loadDbDriver(const QString& path)
}
QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -258,7 +258,7 @@ DrMain* MaticHandler::loadDbDriver(const QString& path)
KPipeProcess in;
QFile out(tmpFile);
- QString cmd = KProcess::quote(exe);
+ TQString cmd = KProcess::quote(exe);
cmd += " -t lpd -d ";
cmd += KProcess::quote(comps[2]);
cmd += " -p ";
@@ -330,28 +330,28 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai
tmpFile.close();
QString cmd = "mv " + KProcess::quote(tmpFile.name()) + " " + KProcess::quote(outFile);
- int status = ::system(QFile::encodeName(cmd).data());
- QFile::remove(tmpFile.name());
+ int status = ::system(TQFile::encodeName(cmd).data());
+ TQFile::remove(tmpFile.name());
result = (status != -1 && WEXITSTATUS(status) == 0);
}
if (!result)
manager()->setErrorMsg(i18n("You probably don't have the required permissions "
"to perform that operation."));
- QFile::remove(tmpFile.name());
+ TQFile::remove(tmpFile.name());
if (!result || entry->field("ppdfile").isEmpty())
return result;
else
return savePpdFile(driver, entry->field("ppdfile"));
}
-bool MaticHandler::savePpdFile(DrMain *driver, const QString& filename)
+bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename)
{
QString mdriver(driver->get("matic_driver")), mprinter(driver->get("matic_printer"));
if (mdriver.isEmpty() || mprinter.isEmpty())
return true;
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -452,7 +452,7 @@ bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry)
QString af = entry->field("af");
if (af.isEmpty())
return true;
- if (!QFile::remove(af))
+ if (!TQFile::remove(af))
{
manager()->setErrorMsg(i18n("Unable to remove driver file %1.").arg(af));
return false;
@@ -460,11 +460,11 @@ bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry)
return true;
}
-QString MaticHandler::printOptions(KPrinter *printer)
+TQString MaticHandler::printOptions(KPrinter *printer)
{
- QMap<QString,QString> opts = printer->options();
+ TQMap<TQString,TQString> opts = printer->options();
QString str;
- for (QMap<QString,QString>::Iterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::Iterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key().startsWith( "app-" ))
continue;
@@ -475,7 +475,7 @@ QString MaticHandler::printOptions(KPrinter *printer)
return str;
}
-QString MaticHandler::driverDirInternal()
+TQString MaticHandler::driverDirInternal()
{
return locateDir("foomatic/db/source", "/usr/share:/usr/local/share:/opt/share");
}
diff --git a/kdeprint/lpr/matichandler.h b/kdeprint/lpr/matichandler.h
index 1cbcc9941..a7111f5ff 100644
--- a/kdeprint/lpr/matichandler.h
+++ b/kdeprint/lpr/matichandler.h
@@ -35,19 +35,19 @@ public:
KMPrinter* createPrinter(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
PrintcapEntry* createEntry(KMPrinter*);
bool removePrinter(KMPrinter*, PrintcapEntry*);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QString driverDirInternal();
+ TQString driverDirInternal();
private:
- QString parsePostpipe(const QString&);
- QString createPostpipe(const QString&);
- bool savePpdFile(DrMain*, const QString&);
+ TQString parsePostpipe(const TQString&);
+ TQString createPostpipe(const TQString&);
+ bool savePpdFile(DrMain*, const TQString&);
private:
QString m_exematicpath;
diff --git a/kdeprint/lpr/matichelper.cpp b/kdeprint/lpr/matichelper.cpp
index 230bcd55b..544db8c71 100644
--- a/kdeprint/lpr/matichelper.cpp
+++ b/kdeprint/lpr/matichelper.cpp
@@ -21,7 +21,7 @@
#include "printcapentry.h"
#include "driver.h"
-QString maticFile(PrintcapEntry *entry)
+TQString maticFile(PrintcapEntry *entry)
{
QString s(entry->field("af"));
if (s.isEmpty())
diff --git a/kdeprint/lpr/matichelper.h b/kdeprint/lpr/matichelper.h
index 8d78d57e7..622dd06aa 100644
--- a/kdeprint/lpr/matichelper.h
+++ b/kdeprint/lpr/matichelper.h
@@ -20,10 +20,10 @@
#ifndef MATICHELPER_H
#define MATICHELPER_H
-#include <qstring.h>
+#include <tqstring.h>
class PrintcapEntry;
-QString maticFile(PrintcapEntry*);
+TQString maticFile(PrintcapEntry*);
#endif
diff --git a/kdeprint/lpr/printcapentry.cpp b/kdeprint/lpr/printcapentry.cpp
index 0a8d79ce4..419a532a9 100644
--- a/kdeprint/lpr/printcapentry.cpp
+++ b/kdeprint/lpr/printcapentry.cpp
@@ -19,7 +19,7 @@
#include "printcapentry.h"
-QString Field::toString() const
+TQString Field::toString() const
{
QString s = name;
switch (type)
@@ -38,14 +38,14 @@ QString Field::toString() const
return s;
}
-bool PrintcapEntry::writeEntry(QTextStream& t)
+bool PrintcapEntry::writeEntry(TQTextStream& t)
{
t << comment << endl;
t << name;
if (aliases.count() > 0)
t << '|' << aliases.join("|");
t << ':';
- for (QMap<QString,Field>::ConstIterator it=fields.begin(); it!=fields.end(); ++it)
+ for (TQMap<TQString,Field>::ConstIterator it=fields.begin(); it!=fields.end(); ++it)
{
t << '\\' << endl << " :";
t << (*it).name;
@@ -72,7 +72,7 @@ bool PrintcapEntry::writeEntry(QTextStream& t)
return true;
}
-void PrintcapEntry::addField(const QString& name, Field::Type type, const QString& value)
+void PrintcapEntry::addField(const TQString& name, Field::Type type, const TQString& value)
{
Field f;
f.name = name;
diff --git a/kdeprint/lpr/printcapentry.h b/kdeprint/lpr/printcapentry.h
index 17dbb9275..15adafddd 100644
--- a/kdeprint/lpr/printcapentry.h
+++ b/kdeprint/lpr/printcapentry.h
@@ -24,10 +24,10 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
/**
* @internal
@@ -49,7 +49,7 @@ public:
value = f.value;
return (*this);
}
- QString toString() const;
+ TQString toString() const;
Type type;
QString name;
@@ -69,13 +69,13 @@ public:
QString name;
QStringList aliases;
QString comment;
- QMap<QString,Field> fields;
+ TQMap<TQString,Field> fields;
QString postcomment;
- bool has(const QString& f) const { return fields.contains(f); }
- QString field(const QString& f) const { return fields[f].value; }
- bool writeEntry(QTextStream&);
- void addField(const QString& name, Field::Type type = Field::Boolean, const QString& value = QString::null);
+ bool has(const TQString& f) const { return fields.contains(f); }
+ TQString field(const TQString& f) const { return fields[f].value; }
+ bool writeEntry(TQTextStream&);
+ void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null);
};
#endif
diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp
index b57d33ba0..a3ab30e8f 100644
--- a/kdeprint/lpr/printcapreader.cpp
+++ b/kdeprint/lpr/printcapreader.cpp
@@ -20,26 +20,26 @@
#include "printcapreader.h"
#include "printcapentry.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
-void PrintcapReader::setPrintcapFile(QFile *f)
+void PrintcapReader::setPrintcapFile(TQFile *f)
{
if (f->isOpen())
{
m_stream.setDevice(f);
- m_buffer = QString::null;
+ m_buffer = TQString::null;
}
}
-bool PrintcapReader::nextLine(QString& line)
+bool PrintcapReader::nextLine(TQString& line)
{
if (m_stream.atEnd() && m_buffer.isEmpty())
return false;
else if (!m_buffer.isEmpty())
{
line = m_buffer;
- m_buffer = QString::null;
+ m_buffer = TQString::null;
}
else
line = m_stream.readLine().stripWhiteSpace();
@@ -49,7 +49,7 @@ bool PrintcapReader::nextLine(QString& line)
return true;
}
-void PrintcapReader::unputLine(const QString& s)
+void PrintcapReader::unputLine(const TQString& s)
{
m_buffer = s;
}
@@ -59,7 +59,7 @@ PrintcapEntry* PrintcapReader::nextEntry()
if (!m_stream.device())
return NULL;
- QString line, comment, name, fields, buf;
+ TQString line, comment, name, fields, buf;
// skip comments, keep last one
while (1)
{
@@ -114,7 +114,7 @@ PrintcapEntry* PrintcapReader::nextEntry()
if (!name.isEmpty())
{
PrintcapEntry *entry = new PrintcapEntry;
- QStringList l = QStringList::split('|', name, false);
+ TQStringList l = TQStringList::split('|', name, false);
entry->name = l[0];
entry->comment = comment;
// kdDebug() << "Printer: " << entry->name << endl;
@@ -128,8 +128,8 @@ PrintcapEntry* PrintcapReader::nextEntry()
{
// kdDebug() << "Fields:" << endl;
// kdDebug() << "(" << fields << ")" << endl;
- l = QStringList::split(':', fields, false);
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ l = TQStringList::split(':', fields, false);
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
Field f;
int p = (*it).find('=');
diff --git a/kdeprint/lpr/printcapreader.h b/kdeprint/lpr/printcapreader.h
index 4741f2520..117b34f8c 100644
--- a/kdeprint/lpr/printcapreader.h
+++ b/kdeprint/lpr/printcapreader.h
@@ -20,8 +20,8 @@
#ifndef PRINTCAPREADER_H
#define PRINTCAPREADER_H
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
class QFile;
class PrintcapEntry;
@@ -29,15 +29,15 @@ class PrintcapEntry;
class PrintcapReader
{
public:
- void setPrintcapFile(QFile*);
+ void setPrintcapFile(TQFile*);
PrintcapEntry* nextEntry();
private:
- QString m_buffer;
- QTextStream m_stream;
+ TQString m_buffer;
+ TQTextStream m_stream;
- bool nextLine(QString&);
- void unputLine(const QString&);
+ bool nextLine(TQString&);
+ void unputLine(const TQString&);
};
#endif
diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp
index a2ea52b2e..7bad07264 100644
--- a/kdeprint/management/cjanuswidget.cpp
+++ b/kdeprint/management/cjanuswidget.cpp
@@ -19,11 +19,11 @@
#include "cjanuswidget.h"
-#include <qwidgetstack.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqwidgetstack.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <klistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kseparator.h>
class CJanusWidget::CPage
@@ -41,35 +41,35 @@ public:
class CJanusWidget::CListBoxItem : public QListBoxItem
{
public:
- CListBoxItem(QListBox *lb, QListBoxItem *after, const QPixmap& pix, const QString& text);
- int height(const QListBox*) const;
- int width(const QListBox*) const;
+ CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text);
+ int height(const TQListBox*) const;
+ int width(const TQListBox*) const;
protected:
- void paint(QPainter*);
+ void paint(TQPainter*);
private:
QPixmap m_pix;
};
-CJanusWidget::CListBoxItem::CListBoxItem(QListBox *lb, QListBoxItem *after, const QPixmap& pix, const QString& text)
-: QListBoxItem(lb, after), m_pix(pix)
+CJanusWidget::CListBoxItem::CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text)
+: TQListBoxItem(lb, after), m_pix(pix)
{
setText(text);
}
-int CJanusWidget::CListBoxItem::height(const QListBox *lb) const
+int CJanusWidget::CListBoxItem::height(const TQListBox *lb) const
{
return (m_pix.height() + lb->fontMetrics().lineSpacing() + 12);
}
-int CJanusWidget::CListBoxItem::width(const QListBox *lb) const
+int CJanusWidget::CListBoxItem::width(const TQListBox *lb) const
{
int w = QMAX(lb->fontMetrics().width(text()),m_pix.width());
return (w + 10);
}
-void CJanusWidget::CListBoxItem::paint(QPainter *p)
+void CJanusWidget::CListBoxItem::paint(TQPainter *p)
{
int w1 = (listBox()->contentsWidth()-m_pix.width())/2;
@@ -82,16 +82,16 @@ void CJanusWidget::CListBoxItem::paint(QPainter *p)
class CJanusWidget::CListBox : public KListBox
{
public:
- CListBox(QWidget *parent = 0, const char *name = 0);
+ CListBox(TQWidget *parent = 0, const char *name = 0);
~CListBox();
void computeWidth();
protected:
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
};
-CJanusWidget::CListBox::CListBox(QWidget *parent, const char *name)
+CJanusWidget::CListBox::CListBox(TQWidget *parent, const char *name)
: KListBox(parent,name)
{
verticalScrollBar()->installEventFilter(this);
@@ -101,9 +101,9 @@ CJanusWidget::CListBox::~CListBox()
{
}
-bool CJanusWidget::CListBox::eventFilter(QObject *o, QEvent *e)
+bool CJanusWidget::CListBox::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::Show || e->type() == QEvent::Hide)
+ if (e->type() == TQEvent::Show || e->type() == TQEvent::Hide)
computeWidth();
return KListBox::eventFilter(o,e);
}
@@ -125,13 +125,13 @@ void CJanusWidget::CListBox::computeWidth()
//***********************************************************************************
-CJanusWidget::CJanusWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+CJanusWidget::CJanusWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_pages.setAutoDelete(true);
- m_stack = new QWidgetStack(this);
- m_header = new QLabel(this);
+ m_stack = new TQWidgetStack(this);
+ m_header = new TQLabel(this);
QFont f(m_header->font());
f.setBold(true);
m_header->setFont(f);
@@ -143,13 +143,13 @@ CJanusWidget::CJanusWidget(QWidget *parent, const char *name)
f = m_iconlist->font();
f.setBold(true);
m_iconlist->setFont(f);
- connect(m_iconlist,SIGNAL(selectionChanged(QListBoxItem*)),SLOT(slotSelected(QListBoxItem*)));
+ connect(m_iconlist,TQT_SIGNAL(selectionChanged(TQListBoxItem*)),TQT_SLOT(slotSelected(TQListBoxItem*)));
- m_empty = new QWidget(this, "Empty");
+ m_empty = new TQWidget(this, "Empty");
m_stack->addWidget(m_empty,0);
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *sub_ = new QVBoxLayout(0, 0, 5);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 5);
main_->addWidget(m_iconlist,0);
main_->addLayout(sub_,1);
sub_->addWidget(m_header,0);
@@ -161,7 +161,7 @@ CJanusWidget::~CJanusWidget()
{
}
-void CJanusWidget::addPage(QWidget *w, const QString& text, const QString& header, const QPixmap& pix)
+void CJanusWidget::addPage(TQWidget *w, const TQString& text, const TQString& header, const TQPixmap& pix)
{
CPage *page = new CPage();
m_pages.append(page);
@@ -177,7 +177,7 @@ void CJanusWidget::addPage(QWidget *w, const QString& text, const QString& heade
m_iconlist->setSelected(page->m_item,true);
}
-void CJanusWidget::enablePage(QWidget *w)
+void CJanusWidget::enablePage(TQWidget *w)
{
CPage *page = findPage(w);
if (page && !page->m_item)
@@ -189,7 +189,7 @@ void CJanusWidget::enablePage(QWidget *w)
}
}
-void CJanusWidget::disablePage(QWidget *w)
+void CJanusWidget::disablePage(TQWidget *w)
{
CPage *page = findPage(w);
if (page && page->m_item)
@@ -206,7 +206,7 @@ void CJanusWidget::disablePage(QWidget *w)
}
}
-void CJanusWidget::slotSelected(QListBoxItem *item)
+void CJanusWidget::slotSelected(TQListBoxItem *item)
{
CPage *page = findPage(item);
if (page)
@@ -221,25 +221,25 @@ void CJanusWidget::slotSelected(QListBoxItem *item)
}
}
-CJanusWidget::CPage* CJanusWidget::findPage(QWidget *w)
+CJanusWidget::CPage* CJanusWidget::findPage(TQWidget *w)
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current();++it)
if (it.current()->m_widget == w)
return it.current();
return 0;
}
-CJanusWidget::CPage* CJanusWidget::findPage(QListBoxItem *i)
+CJanusWidget::CPage* CJanusWidget::findPage(TQListBoxItem *i)
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current();++it)
if (it.current()->m_item == i)
return it.current();
return 0;
}
-QListBoxItem* CJanusWidget::findPrevItem(CPage *p)
+TQListBoxItem* CJanusWidget::findPrevItem(CPage *p)
{
if (m_pages.findRef(p) == -1)
m_pages.last();
@@ -253,7 +253,7 @@ QListBoxItem* CJanusWidget::findPrevItem(CPage *p)
void CJanusWidget::clearPages()
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current(); ++it)
{
delete it.current()->m_widget;
diff --git a/kdeprint/management/cjanuswidget.h b/kdeprint/management/cjanuswidget.h
index b0d1da50f..7bfb2ab46 100644
--- a/kdeprint/management/cjanuswidget.h
+++ b/kdeprint/management/cjanuswidget.h
@@ -20,9 +20,9 @@
#ifndef CJANUSWIDGET_H
#define CJANUSWIDGET_H
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
class QWidgetStack;
class QLabel;
@@ -32,16 +32,16 @@ class CJanusWidget : public QWidget
{
Q_OBJECT
public:
- CJanusWidget(QWidget *parent, const char *name);
+ CJanusWidget(TQWidget *parent, const char *name);
~CJanusWidget();
- void addPage(QWidget *w, const QString& text, const QString& header, const QPixmap& pix);
- void enablePage(QWidget *w);
- void disablePage(QWidget *w);
+ void addPage(TQWidget *w, const TQString& text, const TQString& header, const TQPixmap& pix);
+ void enablePage(TQWidget *w);
+ void disablePage(TQWidget *w);
void clearPages();
protected slots:
- void slotSelected(QListBoxItem*);
+ void slotSelected(TQListBoxItem*);
public:
class CPage;
@@ -49,12 +49,12 @@ public:
class CListBoxItem;
private:
- CPage* findPage(QWidget *w);
- CPage* findPage(QListBoxItem *i);
- QListBoxItem* findPrevItem(CPage*);
+ CPage* findPage(TQWidget *w);
+ CPage* findPage(TQListBoxItem *i);
+ TQListBoxItem* findPrevItem(CPage*);
private:
- QPtrList<CPage> m_pages;
+ TQPtrList<CPage> m_pages;
CListBox *m_iconlist;
QLabel *m_header;
QWidgetStack *m_stack;
diff --git a/kdeprint/management/jobitem.cpp b/kdeprint/management/jobitem.cpp
index 61a2eaf9d..171a91657 100644
--- a/kdeprint/management/jobitem.cpp
+++ b/kdeprint/management/jobitem.cpp
@@ -22,8 +22,8 @@
#include <kiconloader.h>
-JobItem::JobItem(QListView *parent, KMJob *job)
-: QListViewItem(parent)
+JobItem::JobItem(TQListView *parent, KMJob *job)
+: TQListViewItem(parent)
{
m_job = new KMJob;
init(job);
@@ -39,13 +39,13 @@ void JobItem::init(KMJob *job)
m_job->copy(job ? *job : KMJob());
setPixmap(0,SmallIcon(m_job->pixmap()));
- setText(0,QString::number(m_job->id()));
+ setText(0,TQString::number(m_job->id()));
//setText(6,m_job->printer());
setText(2,m_job->name());
setText(1,m_job->owner());
setText(3,m_job->stateString());
- setText(4,QString::number(m_job->size()));
- setText(5,QString::number(m_job->processedPages()));
+ setText(4,TQString::number(m_job->size()));
+ setText(5,TQString::number(m_job->processedPages()));
m_ID = m_job->id();
m_uri = m_job->uri();
@@ -56,7 +56,7 @@ void JobItem::init(KMJob *job)
widthChanged();
}
-int JobItem::compare(QListViewItem *item, int col, bool asc) const
+int JobItem::compare(TQListViewItem *item, int col, bool asc) const
{
switch (col)
{
@@ -69,6 +69,6 @@ int JobItem::compare(QListViewItem *item, int col, bool asc) const
break;
}
default:
- return QListViewItem::compare(item, col, asc);
+ return TQListViewItem::compare(item, col, asc);
}
}
diff --git a/kdeprint/management/jobitem.h b/kdeprint/management/jobitem.h
index fdb310b31..31c7923d8 100644
--- a/kdeprint/management/jobitem.h
+++ b/kdeprint/management/jobitem.h
@@ -20,21 +20,21 @@
#ifndef JOBITEM_H
#define JOBITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "kmobject.h"
class KMJob;
-class JobItem : public QListViewItem, public KMObject
+class JobItem : public TQListViewItem, public KMObject
{
public:
- JobItem(QListView *parent, KMJob *job = 0);
+ JobItem(TQListView *parent, KMJob *job = 0);
~JobItem();
void init(KMJob *job);
- int compare(QListViewItem*, int, bool) const;
+ int compare(TQListViewItem*, int, bool) const;
int jobID() const;
- QString jobUri() const;
+ TQString jobUri() const;
KMJob* job() const;
private:
@@ -49,7 +49,7 @@ inline int JobItem::jobID() const
inline KMJob* JobItem::job() const
{ return m_job; }
-inline QString JobItem::jobUri() const
+inline TQString JobItem::jobUri() const
{ return m_uri; }
#endif
diff --git a/kdeprint/management/kdeprint_management_module.cpp b/kdeprint/management/kdeprint_management_module.cpp
index 276eb76f5..70c7b4cfd 100644
--- a/kdeprint/management/kdeprint_management_module.cpp
+++ b/kdeprint/management/kdeprint_management_module.cpp
@@ -32,25 +32,25 @@
extern "C"
{
- KDEPRINT_EXPORT int add_printer_wizard(QWidget *parent)
+ KDEPRINT_EXPORT int add_printer_wizard(TQWidget *parent)
{
return kdeprint_management_add_printer_wizard( parent );
}
- KDEPRINT_EXPORT bool config_dialog(QWidget *parent)
+ KDEPRINT_EXPORT bool config_dialog(TQWidget *parent)
{
KMConfigDialog dlg(parent);
return dlg.exec();
}
- KDEPRINT_EXPORT QString select_command( QWidget* parent )
+ KDEPRINT_EXPORT TQString select_command( TQWidget* parent )
{
KDialogBase dlg( parent, 0, true, i18n( "Select Command" ), KDialogBase::Ok|KDialogBase::Cancel );
KXmlCommandSelector *xmlSel = new KXmlCommandSelector( false, &dlg, "CommandSelector", &dlg );
dlg.setMainWidget( xmlSel );
if ( dlg.exec() )
return xmlSel->command();
- return QString::null;
+ return TQString::null;
}
}
diff --git a/kdeprint/management/kiconselectaction.cpp b/kdeprint/management/kiconselectaction.cpp
index 9939d061e..6b22dbee8 100644
--- a/kdeprint/management/kiconselectaction.cpp
+++ b/kdeprint/management/kiconselectaction.cpp
@@ -19,7 +19,7 @@
#include "kiconselectaction.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <ktoolbar.h>
@@ -33,10 +33,10 @@ public:
m_menu = 0;
}
QStringList m_iconlst;
- QPopupMenu* m_menu;
+ TQPopupMenu* m_menu;
};
-KIconSelectAction::KIconSelectAction(const QString& text, int accel, QObject* parent, const char* name)
+KIconSelectAction::KIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name)
: KSelectAction(text, accel, parent, name)
{
d = new KIconSelectActionPrivate;
@@ -66,17 +66,17 @@ void KIconSelectAction::createPopupMenu()
}
}
-void KIconSelectAction::setItems(const QStringList& lst, const QStringList& iconlst)
+void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst)
{
KSelectAction::setItems(lst);
d->m_iconlst = iconlst;
updateIcons();
}
-int KIconSelectAction::plug(QWidget* widget, int index)
+int KIconSelectAction::plug(TQWidget* widget, int index)
{
int value(-1);
- if (widget->inherits("QPopupMenu"))
+ if (widget->inherits("TQPopupMenu"))
{
createPopupMenu();
value = KSelectAction::plug(widget, index);
@@ -94,7 +94,7 @@ int KIconSelectAction::plug(QWidget* widget, int index)
bar->getButton(id)->setPopup(d->m_menu, true);
bar->setItemEnabled(id, isEnabled());
addContainer(bar, id);
- connect(bar, SIGNAL(destroyed()), SLOT(slotDestroyed()));
+ connect(bar, TQT_SIGNAL(destroyed()), TQT_SLOT(slotDestroyed()));
value = containerCount()-1;
}
@@ -103,7 +103,7 @@ int KIconSelectAction::plug(QWidget* widget, int index)
void KIconSelectAction::updateCurrentItem(int id)
{
- QWidget* w = container(id);
+ TQWidget* w = container(id);
if (w->inherits("KToolBar"))
static_cast<KToolBar*>(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]);
else
diff --git a/kdeprint/management/kiconselectaction.h b/kdeprint/management/kiconselectaction.h
index 0cfcdaf84..dfd6ea17b 100644
--- a/kdeprint/management/kiconselectaction.h
+++ b/kdeprint/management/kiconselectaction.h
@@ -28,13 +28,13 @@ class KIconSelectAction : public KSelectAction
{
Q_OBJECT
public:
- KIconSelectAction(const QString& text, int accel = 0, QObject* parent = 0, const char* name = 0);
+ KIconSelectAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0);
virtual ~KIconSelectAction();
- virtual int plug(QWidget* widget, int index = -1);
+ virtual int plug(TQWidget* widget, int index = -1);
public slots:
- virtual void setItems(const QStringList& lst, const QStringList& iconlst);
+ virtual void setItems(const TQStringList& lst, const TQStringList& iconlst);
virtual void setCurrentItem(int index);
protected:
diff --git a/kdeprint/management/kmconfigcommand.cpp b/kdeprint/management/kmconfigcommand.cpp
index 5af13e170..21a1a330b 100644
--- a/kdeprint/management/kmconfigcommand.cpp
+++ b/kdeprint/management/kmconfigcommand.cpp
@@ -20,22 +20,22 @@
#include "kmconfigcommand.h"
#include "kxmlcommandselector.h"
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdialog.h>
-KMConfigCommand::KMConfigCommand(QWidget *parent, const char *name)
+KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Commands"));
setPageHeader(i18n("Command Settings"));
setPagePixmap("exec");
- QGroupBox *gb = new QGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this);
- QLabel *lab = new QLabel(i18n(
+ QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this);
+ QLabel *lab = new TQLabel(i18n(
"<p>Command objects perform a conversion from input to output.<br>"
"They are used as the basis to build both print filters "
"and special printers. They are described by a command string, a "
@@ -44,10 +44,10 @@ KMConfigCommand::KMConfigCommand(QWidget *parent, const char *name)
"changes will only be effective for you."), gb);
KXmlCommandSelector *sel = new KXmlCommandSelector(false, gb);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(gb);
l0->addStretch(1);
- QVBoxLayout *l2 = new QVBoxLayout(gb->layout(), KDialog::spacingHint());
+ QVBoxLayout *l2 = new TQVBoxLayout(gb->layout(), KDialog::spacingHint());
l2->addWidget(lab);
l2->addWidget(sel);
}
diff --git a/kdeprint/management/kmconfigcommand.h b/kdeprint/management/kmconfigcommand.h
index 17aa88042..2ec662d95 100644
--- a/kdeprint/management/kmconfigcommand.h
+++ b/kdeprint/management/kmconfigcommand.h
@@ -25,7 +25,7 @@
class KMConfigCommand : public KMConfigPage
{
public:
- KMConfigCommand(QWidget *parent = 0, const char *name = 0);
+ KMConfigCommand(TQWidget *parent = 0, const char *name = 0);
};
#endif
diff --git a/kdeprint/management/kmconfigdialog.cpp b/kdeprint/management/kmconfigdialog.cpp
index b775786e8..9bd20e494 100644
--- a/kdeprint/management/kmconfigdialog.cpp
+++ b/kdeprint/management/kmconfigdialog.cpp
@@ -29,12 +29,12 @@
#include "kmconfigfonts.h"
#include "kmconfigjobs.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kconfig.h>
-KMConfigDialog::KMConfigDialog(QWidget *parent, const char *name)
+KMConfigDialog::KMConfigDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList,i18n("KDE Print Configuration"),Ok|Cancel,Ok,parent,name,true,true)
{
m_pages.setAutoDelete(false);
@@ -48,7 +48,7 @@ KMConfigDialog::KMConfigDialog(QWidget *parent, const char *name)
// initialize pages
KConfig *conf = KMFactory::self()->printConfig();
- QPtrListIterator<KMConfigPage> it(m_pages);
+ TQPtrListIterator<KMConfigPage> it(m_pages);
for (;it.current();++it)
it.current()->loadConfig(conf);
@@ -60,15 +60,15 @@ void KMConfigDialog::addConfigPage(KMConfigPage *page)
{
if (page)
{
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
page->pagePixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
);
QFrame *frame = addPage(page->pageName(),page->pageHeader(),icon);
- page->reparent(frame,QPoint(0,0));
- QVBoxLayout *lay = new QVBoxLayout(frame, 0, 0);
+ page->reparent(frame,TQPoint(0,0));
+ QVBoxLayout *lay = new TQVBoxLayout(frame, 0, 0);
lay->addWidget(page);
m_pages.append(page);
}
@@ -78,7 +78,7 @@ void KMConfigDialog::slotOk()
{
// save configuration
KConfig *conf = KMFactory::self()->printConfig();
- QPtrListIterator<KMConfigPage> it(m_pages);
+ TQPtrListIterator<KMConfigPage> it(m_pages);
for (;it.current();++it)
it.current()->saveConfig(conf);
KMFactory::self()->saveConfig();
diff --git a/kdeprint/management/kmconfigdialog.h b/kdeprint/management/kmconfigdialog.h
index 977408d70..ed60378c5 100644
--- a/kdeprint/management/kmconfigdialog.h
+++ b/kdeprint/management/kmconfigdialog.h
@@ -21,7 +21,7 @@
#define KMCONFIGDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kmconfigpage.h"
@@ -29,7 +29,7 @@ class KDEPRINT_EXPORT KMConfigDialog : public KDialogBase
{
Q_OBJECT
public:
- KMConfigDialog(QWidget *parent = 0, const char *name = 0);
+ KMConfigDialog(TQWidget *parent = 0, const char *name = 0);
void addConfigPage(KMConfigPage*);
@@ -37,7 +37,7 @@ protected slots:
void slotOk();
private:
- QPtrList<KMConfigPage> m_pages;
+ TQPtrList<KMConfigPage> m_pages;
};
#endif
diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp
index 1a62112f7..10dff4749 100644
--- a/kdeprint/management/kmconfigfilter.cpp
+++ b/kdeprint/management/kmconfigfilter.cpp
@@ -21,12 +21,12 @@
#include "kmmanager.h"
#include "kmfactory.h"
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kconfig.h>
@@ -34,38 +34,38 @@
#include <klistbox.h>
#include <kdialog.h>
-KMConfigFilter::KMConfigFilter(QWidget *parent, const char *name)
+KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Filter"));
setPageHeader(i18n("Printer Filtering Settings"));
setPagePixmap("filter");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this);
m_list1 = new KListBox(box);
m_list1->setSelectionMode(KListBox::Extended);
m_list2 = new KListBox(box);
m_list2->setSelectionMode(KListBox::Extended);
- m_add = new QToolButton( box );
- m_add->setIconSet(QApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" ));
- m_remove = new QToolButton( box );
- m_remove->setIconSet(QApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" ));
- m_locationre = new QLineEdit(box);
- QLabel *lab = new QLabel(box);
+ m_add = new TQToolButton( box );
+ m_add->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" ));
+ m_remove = new TQToolButton( box );
+ m_remove->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" ));
+ m_locationre = new TQLineEdit(box);
+ QLabel *lab = new TQLabel(box);
lab->setText(i18n("The printer filtering allows you to view only a specific set of "
"printers instead of all of them. This may be useful when there are a "
"lot of printers available but you only use a few ones. Select the "
"printers you want to see from the list on the left or enter a <b>Location</b> "
"filter (ex: Group_1*). Both are cumulative and ignored if empty."));
lab->setTextFormat(Qt::RichText);
- QLabel *lab1 = new QLabel(i18n("Location filter:"), box);
+ QLabel *lab1 = new TQLabel(i18n("Location filter:"), box);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box, 1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(lab);
- QGridLayout *l2 = new QGridLayout(0, 4, 3, 0, KDialog::spacingHint());
+ QGridLayout *l2 = new TQGridLayout(0, 4, 3, 0, KDialog::spacingHint());
l1->addLayout(l2);
l2->setRowStretch(0, 1);
l2->setRowStretch(3, 1);
@@ -75,15 +75,15 @@ KMConfigFilter::KMConfigFilter(QWidget *parent, const char *name)
l2->addMultiCellWidget(m_list2, 0, 3, 2, 2);
l2->addWidget(m_add, 1, 1);
l2->addWidget(m_remove, 2, 1);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l3, 0);
l3->addWidget(lab1, 0);
l3->addWidget(m_locationre, 1);
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddClicked()));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveClicked()));
- connect(m_list1, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
- connect(m_list2, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddClicked()));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked()));
+ connect(m_list1, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
+ connect(m_list2, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
m_add->setEnabled(false);
m_remove->setEnabled(false);
}
@@ -92,7 +92,7 @@ void KMConfigFilter::loadConfig(KConfig *conf)
{
conf->setGroup("Filter");
QStringList m_plist = conf->readListEntry("Printers");
- QPtrListIterator<KMPrinter> it(*(KMManager::self()->printerListComplete(false)));
+ TQPtrListIterator<KMPrinter> it(*(KMManager::self()->printerListComplete(false)));
for (; it.current(); ++it)
{
if (!it.current()->isSpecial() && !it.current()->isVirtual())
diff --git a/kdeprint/management/kmconfigfilter.h b/kdeprint/management/kmconfigfilter.h
index 2374f3b05..82ac2190b 100644
--- a/kdeprint/management/kmconfigfilter.h
+++ b/kdeprint/management/kmconfigfilter.h
@@ -30,7 +30,7 @@ class KMConfigFilter : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigFilter(QWidget *parent = 0, const char *name = 0);
+ KMConfigFilter(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmconfigfonts.cpp b/kdeprint/management/kmconfigfonts.cpp
index c7b4420cb..e59f75728 100644
--- a/kdeprint/management/kmconfigfonts.cpp
+++ b/kdeprint/management/kmconfigfonts.cpp
@@ -19,14 +19,14 @@
#include "kmconfigfonts.h"
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qsettings.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqsettings.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kconfig.h>
@@ -36,17 +36,17 @@
#include <klistview.h>
#include <kdialog.h>
-KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
+KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Fonts"));
setPageHeader(i18n("Font Settings"));
setPagePixmap("fonts");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this);
- QGroupBox *box2 = new QGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this);
+ QGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this);
- m_embedfonts = new QCheckBox(i18n("&Embed fonts in PostScript data when printing"), box);
+ m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box);
m_fontpath = new KListView(box2);
m_fontpath->addColumn("");
m_fontpath->header()->setStretchEnabled(true, 0);
@@ -58,14 +58,14 @@ KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
m_down = new KPushButton(KGuiItem(i18n("&Down"), "down"), box2);
m_add = new KPushButton(KGuiItem(i18n("&Add"), "add"), box2);
m_remove = new KPushButton(KGuiItem(i18n("&Remove"), "editdelete"), box2);
- QLabel *lab0 = new QLabel(i18n("Additional director&y:"), box2);
+ QLabel *lab0 = new TQLabel(i18n("Additional director&y:"), box2);
lab0->setBuddy(m_addpath);
- QVBoxLayout *l0 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l0->addWidget(m_embedfonts);
- QVBoxLayout *l1 = new QVBoxLayout(box2->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box2->layout(), KDialog::spacingHint());
l1->addWidget(m_fontpath);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l2);
l2->addWidget(m_up);
l2->addWidget(m_down);
@@ -73,30 +73,30 @@ KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
l1->addSpacing(10);
l1->addWidget(lab0);
l1->addWidget(m_addpath);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l3);
l3->addStretch(1);
l3->addWidget(m_add);
- QVBoxLayout *l4 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l4 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l4->addWidget(box);
l4->addWidget(box2);
- QWhatsThis::add(m_embedfonts,
+ TQWhatsThis::add(m_embedfonts,
i18n("These options will automatically put fonts in the PostScript file "
"which are not present on the printer. Font embedding usually produces better print results "
"(closer to what you see on the screen), but larger print data as well."));
- QWhatsThis::add(m_fontpath,
+ TQWhatsThis::add(m_fontpath,
i18n("When using font embedding you can select additional directories where "
"KDE should search for embeddable font files. By default, the X server "
"font path is used, so adding those directories is not needed. The default "
"search path should be sufficient in most cases."));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemove()));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAdd()));
- connect(m_up, SIGNAL(clicked()), SLOT(slotUp()));
- connect(m_down, SIGNAL(clicked()), SLOT(slotDown()));
- connect(m_fontpath, SIGNAL(selectionChanged()), SLOT(slotSelected()));
- connect(m_addpath, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged(const QString&)));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove()));
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd()));
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp()));
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown()));
+ connect(m_fontpath, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected()));
+ connect(m_addpath, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged(const TQString&)));
m_add->setEnabled(false);
m_remove->setEnabled(false);
m_up->setEnabled(false);
@@ -109,8 +109,8 @@ void KMConfigFonts::loadConfig(KConfig *)
m_embedfonts->setChecked(settings.readBoolEntry("/qt/embedFonts", true));
QStringList paths = settings.readListEntry("/qt/fontPath", ':');
QListViewItem *item(0);
- for (QStringList::ConstIterator it=paths.begin(); it!=paths.end(); ++it)
- item = new QListViewItem(m_fontpath, item, *it);
+ for (TQStringList::ConstIterator it=paths.begin(); it!=paths.end(); ++it)
+ item = new TQListViewItem(m_fontpath, item, *it);
}
void KMConfigFonts::saveConfig(KConfig *)
@@ -142,7 +142,7 @@ void KMConfigFonts::slotAdd()
QListViewItem *lastItem(m_fontpath->firstChild());
while (lastItem && lastItem->nextSibling())
lastItem = lastItem->nextSibling();
- QListViewItem *item = new QListViewItem(m_fontpath, lastItem, m_addpath->url());
+ QListViewItem *item = new TQListViewItem(m_fontpath, lastItem, m_addpath->url());
m_fontpath->setSelected(item, true);
}
@@ -159,7 +159,7 @@ void KMConfigFonts::slotUp()
QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0;
if (!citem || !citem->itemAbove())
return;
- nitem = new QListViewItem(m_fontpath, citem->itemAbove()->itemAbove(), citem->text(0));
+ nitem = new TQListViewItem(m_fontpath, citem->itemAbove()->itemAbove(), citem->text(0));
delete citem;
m_fontpath->setSelected(nitem, true);
}
@@ -169,12 +169,12 @@ void KMConfigFonts::slotDown()
QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0;
if (!citem || !citem->itemBelow())
return;
- nitem = new QListViewItem(m_fontpath, citem->itemBelow(), citem->text(0));
+ nitem = new TQListViewItem(m_fontpath, citem->itemBelow(), citem->text(0));
delete citem;
m_fontpath->setSelected(nitem, true);
}
-void KMConfigFonts::slotTextChanged(const QString& t)
+void KMConfigFonts::slotTextChanged(const TQString& t)
{
m_add->setEnabled(!t.isEmpty());
}
diff --git a/kdeprint/management/kmconfigfonts.h b/kdeprint/management/kmconfigfonts.h
index c1c383199..a20ead918 100644
--- a/kdeprint/management/kmconfigfonts.h
+++ b/kdeprint/management/kmconfigfonts.h
@@ -31,7 +31,7 @@ class KMConfigFonts : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigFonts(QWidget *parent = 0, const char *name = 0);
+ KMConfigFonts(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
@@ -42,7 +42,7 @@ protected slots:
void slotRemove();
void slotAdd();
void slotSelected();
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
private:
QCheckBox *m_embedfonts;
diff --git a/kdeprint/management/kmconfiggeneral.cpp b/kdeprint/management/kmconfiggeneral.cpp
index 65f9d2437..c729c6516 100644
--- a/kdeprint/management/kmconfiggeneral.cpp
+++ b/kdeprint/management/kmconfiggeneral.cpp
@@ -19,11 +19,11 @@
#include "kmconfiggeneral.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <klocale.h>
@@ -38,63 +38,63 @@
#include <kguiitem.h>
#include <kdialog.h>
-KMConfigGeneral::KMConfigGeneral(QWidget *parent)
+KMConfigGeneral::KMConfigGeneral(TQWidget *parent)
: KMConfigPage(parent,"ConfigTimer")
{
setPageName(i18n("General"));
setPageHeader(i18n("General Settings"));
setPagePixmap("fileprint");
- QGroupBox *m_timerbox = new QGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this);
+ QGroupBox *m_timerbox = new TQGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this);
m_timer = new KIntNumInput(m_timerbox,"Timer");
m_timer->setRange(0,30);
m_timer->setSuffix( i18n( " sec" ) );
m_timer->setSpecialValueText(i18n("Disabled"));
- QWhatsThis::add(m_timer, i18n("This time setting controls the refresh rate of various "
+ TQWhatsThis::add(m_timer, i18n("This time setting controls the refresh rate of various "
"<b>KDE Print</b> components like the print manager "
"and the job viewer."));
- QGroupBox *m_testpagebox = new QGroupBox(0, Qt::Vertical, i18n("Test Page"), this);
- m_defaulttestpage = new QCheckBox(i18n("&Specify personal test page"), m_testpagebox, "TestPageCheck");
+ QGroupBox *m_testpagebox = new TQGroupBox(0, Qt::Vertical, i18n("Test Page"), this);
+ m_defaulttestpage = new TQCheckBox(i18n("&Specify personal test page"), m_testpagebox, "TestPageCheck");
m_testpage = new KURLRequester(m_testpagebox,"TestPage");
m_preview = new KPushButton(KGuiItem(i18n("Preview..."), "filefind"), m_testpagebox);
- connect(m_defaulttestpage,SIGNAL(toggled(bool)),m_testpage,SLOT(setEnabled(bool)));
- connect(m_defaulttestpage,SIGNAL(toggled(bool)),this,SLOT(setEnabledPreviewButton(bool)));
- connect(m_preview,SIGNAL(clicked()),SLOT(slotTestPagePreview()));
- connect(m_testpage->lineEdit(),SIGNAL(textChanged ( const QString & )),this,SLOT(testPageChanged(const QString & )));
+ connect(m_defaulttestpage,TQT_SIGNAL(toggled(bool)),m_testpage,TQT_SLOT(setEnabled(bool)));
+ connect(m_defaulttestpage,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(setEnabledPreviewButton(bool)));
+ connect(m_preview,TQT_SIGNAL(clicked()),TQT_SLOT(slotTestPagePreview()));
+ connect(m_testpage->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(testPageChanged(const TQString & )));
m_testpage->setDisabled(true);
m_preview->setDisabled(true);
m_defaulttestpage->setCursor(KCursor::handCursor());
- QGroupBox *m_statusbox = new QGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this);
- m_statusmsg = new QCheckBox(i18n("Sho&w printing status message box"), m_statusbox);
- m_uselast = new QCheckBox(i18n("De&faults to the last printer used in the application"), m_statusbox);
+ QGroupBox *m_statusbox = new TQGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this);
+ m_statusmsg = new TQCheckBox(i18n("Sho&w printing status message box"), m_statusbox);
+ m_uselast = new TQCheckBox(i18n("De&faults to the last printer used in the application"), m_statusbox);
//layout
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_timerbox);
lay0->addWidget(m_testpagebox);
lay0->addWidget(m_statusbox);
lay0->addStretch(1);
- QVBoxLayout *lay1 = new QVBoxLayout(m_timerbox->layout(),
+ QVBoxLayout *lay1 = new TQVBoxLayout(m_timerbox->layout(),
KDialog::spacingHint());
lay1->addWidget(m_timer);
- QVBoxLayout *lay2 = new QVBoxLayout(m_testpagebox->layout(),
+ QVBoxLayout *lay2 = new TQVBoxLayout(m_testpagebox->layout(),
KDialog::spacingHint());
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 0);
lay2->addWidget(m_defaulttestpage);
lay2->addWidget(m_testpage);
lay2->addLayout(lay3);
lay3->addStretch(1);
lay3->addWidget(m_preview);
- QVBoxLayout *lay4 = new QVBoxLayout(m_statusbox->layout(),
+ QVBoxLayout *lay4 = new TQVBoxLayout(m_statusbox->layout(),
KDialog::spacingHint());
lay4->addWidget(m_statusmsg);
lay4->addWidget(m_uselast);
m_preview->setEnabled( !m_testpage->url().isEmpty());
}
-void KMConfigGeneral::testPageChanged(const QString &test )
+void KMConfigGeneral::testPageChanged(const TQString &test )
{
m_preview->setEnabled( !test.isEmpty());
}
@@ -122,7 +122,7 @@ void KMConfigGeneral::saveConfig(KConfig *conf)
{
conf->setGroup("General");
conf->writeEntry("TimerDelay",m_timer->value());
- conf->writePathEntry("TestPage",(m_defaulttestpage->isChecked() ? m_testpage->url() : QString::null));
+ conf->writePathEntry("TestPage",(m_defaulttestpage->isChecked() ? m_testpage->url() : TQString::null));
if (m_defaulttestpage->isChecked() && KMimeMagic::self()->findFileType(m_testpage->url())->mimeType() != "application/postscript")
KMessageBox::sorry(this, i18n("The selected test page is not a PostScript file. You may not "
"be able to test your printer anymore."));
diff --git a/kdeprint/management/kmconfiggeneral.h b/kdeprint/management/kmconfiggeneral.h
index 87c10c2bf..f28f29446 100644
--- a/kdeprint/management/kmconfiggeneral.h
+++ b/kdeprint/management/kmconfiggeneral.h
@@ -30,14 +30,14 @@ class KMConfigGeneral : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigGeneral(QWidget *parent = 0);
+ KMConfigGeneral(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
protected slots:
void slotTestPagePreview();
- void testPageChanged(const QString & );
+ void testPageChanged(const TQString & );
void setEnabledPreviewButton(bool b);
private:
KIntNumInput *m_timer;
diff --git a/kdeprint/management/kmconfigjobs.cpp b/kdeprint/management/kmconfigjobs.cpp
index 31ca1ed26..1aaf0ec26 100644
--- a/kdeprint/management/kmconfigjobs.cpp
+++ b/kdeprint/management/kmconfigjobs.cpp
@@ -19,32 +19,32 @@
#include "kmconfigjobs.h"
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <knuminput.h>
#include <klocale.h>
#include <kconfig.h>
#include <kdialog.h>
-KMConfigJobs::KMConfigJobs(QWidget *parent, const char *name)
+KMConfigJobs::KMConfigJobs(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Jobs"));
setPageHeader(i18n("Print Job Settings"));
setPagePixmap("exec");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this);
m_limit = new KIntNumInput(box);
m_limit->setRange(0, 9999, 1, true);
m_limit->setSpecialValueText(i18n("Unlimited"));
m_limit->setLabel(i18n("Maximum number of jobs shown:"));
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box, 0);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(m_limit);
}
diff --git a/kdeprint/management/kmconfigjobs.h b/kdeprint/management/kmconfigjobs.h
index c1a301b32..73d6274ba 100644
--- a/kdeprint/management/kmconfigjobs.h
+++ b/kdeprint/management/kmconfigjobs.h
@@ -28,7 +28,7 @@ class KMConfigJobs : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigJobs(QWidget *parent = 0, const char *name = 0);
+ KMConfigJobs(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmconfigpage.cpp b/kdeprint/management/kmconfigpage.cpp
index afeda5f9e..b31575d33 100644
--- a/kdeprint/management/kmconfigpage.cpp
+++ b/kdeprint/management/kmconfigpage.cpp
@@ -19,8 +19,8 @@
#include "kmconfigpage.h"
-KMConfigPage::KMConfigPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMConfigPage::KMConfigPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_name = "Name";
m_header = "Header";
diff --git a/kdeprint/management/kmconfigpage.h b/kdeprint/management/kmconfigpage.h
index d3db9994b..138d7c152 100644
--- a/kdeprint/management/kmconfigpage.h
+++ b/kdeprint/management/kmconfigpage.h
@@ -20,7 +20,7 @@
#ifndef KMCONFIGPAGE_H
#define KMCONFIGPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -30,19 +30,19 @@ class KDEPRINT_EXPORT KMConfigPage : public QWidget
{
Q_OBJECT
public:
- KMConfigPage(QWidget *parent = 0, const char *name = 0);
+ KMConfigPage(TQWidget *parent = 0, const char *name = 0);
virtual void loadConfig(KConfig*);
virtual void saveConfig(KConfig*);
- QString pageName() const { return m_name; }
- QString pageHeader() const { return m_header; }
- QString pagePixmap() const { return m_pixmap; }
+ TQString pageName() const { return m_name; }
+ TQString pageHeader() const { return m_header; }
+ TQString pagePixmap() const { return m_pixmap; }
protected:
- void setPageName(const QString& s) { m_name = s; }
- void setPageHeader(const QString& s) { m_header = s; }
- void setPagePixmap(const QString& s) { m_pixmap = s; }
+ void setPageName(const TQString& s) { m_name = s; }
+ void setPageHeader(const TQString& s) { m_header = s; }
+ void setPagePixmap(const TQString& s) { m_pixmap = s; }
protected:
QString m_name;
diff --git a/kdeprint/management/kmconfigpreview.cpp b/kdeprint/management/kmconfigpreview.cpp
index a3ed5581e..1bd9f46e5 100644
--- a/kdeprint/management/kmconfigpreview.cpp
+++ b/kdeprint/management/kmconfigpreview.cpp
@@ -19,43 +19,43 @@
#include "kmconfigpreview.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kurlrequester.h>
#include <kconfig.h>
#include <kdialog.h>
-KMConfigPreview::KMConfigPreview(QWidget *parent, const char *name)
+KMConfigPreview::KMConfigPreview(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Preview"));
setPageHeader(i18n("Preview Settings"));
setPagePixmap("filefind");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Preview Program"), this);
+ TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Preview Program"), this);
- m_useext = new QCheckBox(i18n("&Use external preview program"), box);
+ m_useext = new TQCheckBox(i18n("&Use external preview program"), box);
m_program = new KURLRequester(box);
- QLabel *lab = new QLabel(box);
+ QLabel *lab = new TQLabel(box);
lab->setText(i18n("You can use an external preview program (PS viewer) instead of the "
"KDE built-in preview system. Note that if the KDE default PS viewer "
"(KGhostView) cannot be found, KDE tries automatically to find another "
"external PostScript viewer"));
lab->setTextFormat(Qt::RichText);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(lab);
l1->addWidget(m_useext);
l1->addWidget(m_program);
- connect(m_useext, SIGNAL(toggled(bool)), m_program, SLOT(setEnabled(bool)));
+ connect(m_useext, TQT_SIGNAL(toggled(bool)), m_program, TQT_SLOT(setEnabled(bool)));
m_program->setEnabled(false);
}
diff --git a/kdeprint/management/kmconfigpreview.h b/kdeprint/management/kmconfigpreview.h
index e37aa2b8f..52a9704d1 100644
--- a/kdeprint/management/kmconfigpreview.h
+++ b/kdeprint/management/kmconfigpreview.h
@@ -28,7 +28,7 @@ class KURLRequester;
class KMConfigPreview : public KMConfigPage
{
public:
- KMConfigPreview(QWidget *parent = 0, const char *name = 0);
+ KMConfigPreview(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp
index 021619db9..3b271ff00 100644
--- a/kdeprint/management/kmdbcreator.cpp
+++ b/kdeprint/management/kmdbcreator.cpp
@@ -21,23 +21,23 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qprogressdialog.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqprogressdialog.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-KMDBCreator::KMDBCreator(QObject *parent, const char *name)
-: QObject(parent,name)
+KMDBCreator::KMDBCreator(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_dlg = 0;
m_status = true;
- connect(&m_proc,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(&m_proc,SIGNAL(receivedStderr(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect(&m_proc,SIGNAL(processExited(KProcess*)),SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(&m_proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(&m_proc,TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotProcessExited(KProcess*)));
}
KMDBCreator::~KMDBCreator()
@@ -48,7 +48,7 @@ KMDBCreator::~KMDBCreator()
// it's parent. It will be destroyed along with its parent.
}
-bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
+bool KMDBCreator::checkDriverDB(const TQString& dirname, const TQDateTime& d)
{
// don't block GUI
kapp->processEvents();
@@ -60,13 +60,13 @@ bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
// then check most recent file in current directory
QDir dir(dirname);
- const QFileInfoList *list = dir.entryInfoList(QDir::Files,QDir::Time);
+ const QFileInfoList *list = dir.entryInfoList(TQDir::Files,TQDir::Time);
if (list && list->count() > 0 && list->getFirst()->lastModified() > d)
return false;
// then loop into subdirs
- QStringList slist = dir.entryList(QDir::Dirs,QDir::Time);
- for (QStringList::ConstIterator it=slist.begin(); it!=slist.end(); ++it)
+ QStringList slist = dir.entryList(TQDir::Dirs,TQDir::Time);
+ for (TQStringList::ConstIterator it=slist.begin(); it!=slist.end(); ++it)
if ((*it) != "." && (*it) != ".." && !checkDriverDB(dir.absFilePath(*it),d))
return false;
@@ -74,7 +74,7 @@ bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
return true;
}
-bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename, QWidget *parent)
+bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filename, TQWidget *parent)
{
bool started(true);
@@ -109,10 +109,10 @@ bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename
{
if (!m_dlg)
{
- m_dlg = new QProgressDialog(parent->topLevelWidget(),"progress-dialog",true);
+ m_dlg = new TQProgressDialog(parent->topLevelWidget(),"progress-dialog",true);
m_dlg->setLabelText(i18n("Please wait while KDE rebuilds a driver database."));
m_dlg->setCaption(i18n("Driver Database"));
- connect(m_dlg,SIGNAL(canceled()),SLOT(slotCancelled()));
+ connect(m_dlg,TQT_SIGNAL(canceled()),TQT_SLOT(slotCancelled()));
}
m_dlg->setMinimumDuration(0); // always show the dialog
m_dlg->setProgress(0); // to force showing
@@ -127,7 +127,7 @@ bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename
void KMDBCreator::slotReceivedStdout(KProcess*, char *buf, int len)
{
// save buffer
- QString str( QCString(buf, len) );
+ QString str( TQCString(buf, len) );
// get the number, cut the string at the first '\n' otherwise
// the toInt() will return 0. If that occurs for the first number,
@@ -171,7 +171,7 @@ void KMDBCreator::slotProcessExited(KProcess*)
KMFactory::self()->manager()->setErrorMsg(i18n("Error while creating driver database: abnormal child-process termination."));
// remove the incomplete driver DB file so that, it will be
// reconstructed on next check
- QFile::remove(m_proc.args()[2]);
+ TQFile::remove(m_proc.args()[2]);
}
//else
emit dbCreated();
diff --git a/kdeprint/management/kmdbcreator.h b/kdeprint/management/kmdbcreator.h
index 8af6e5bcf..188ff9a42 100644
--- a/kdeprint/management/kmdbcreator.h
+++ b/kdeprint/management/kmdbcreator.h
@@ -20,9 +20,9 @@
#ifndef KMDBCREATOR_H
#define KMDBCREATOR_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kprocess.h>
class QWidget;
@@ -32,11 +32,11 @@ class KMDBCreator : public QObject
{
Q_OBJECT
public:
- KMDBCreator(QObject *parent = 0, const char *name = 0);
+ KMDBCreator(TQObject *parent = 0, const char *name = 0);
~KMDBCreator();
- bool checkDriverDB(const QString& dirname, const QDateTime& d);
- bool createDriverDB(const QString& dirname, const QString& filename, QWidget *parent = 0);
+ bool checkDriverDB(const TQString& dirname, const TQDateTime& d);
+ bool createDriverDB(const TQString& dirname, const TQString& filename, TQWidget *parent = 0);
bool status() const { return m_status; }
protected slots:
diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp
index d75588d0d..6e275a6d4 100644
--- a/kdeprint/management/kmdriverdb.cpp
+++ b/kdeprint/management/kmdriverdb.cpp
@@ -24,9 +24,9 @@
#include "kmfactory.h"
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kstandarddirs.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -43,11 +43,11 @@ KMDriverDB* KMDriverDB::self()
return m_self;
}
-KMDriverDB::KMDriverDB(QObject *parent, const char *name)
-: QObject(parent,name)
+KMDriverDB::KMDriverDB(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_creator = new KMDBCreator(this,"db-creator");
- connect(m_creator,SIGNAL(dbCreated()),SLOT(slotDbCreated()));
+ connect(m_creator,TQT_SIGNAL(dbCreated()),TQT_SLOT(slotDbCreated()));
m_entries.setAutoDelete(true);
m_pnpentries.setAutoDelete(true);
@@ -57,21 +57,21 @@ KMDriverDB::~KMDriverDB()
{
}
-QString KMDriverDB::dbFile()
+TQString KMDriverDB::dbFile()
{
// this calls insure missing directories creation
- QString filename = locateLocal("data",QString::fromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem()));
+ QString filename = locateLocal("data",TQString::fromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem()));
return filename;
}
-void KMDriverDB::init(QWidget *parent)
+void KMDriverDB::init(TQWidget *parent)
{
QFileInfo dbfi(dbFile());
QString dirname = KMFactory::self()->manager()->driverDirectory();
- QStringList dbDirs = QStringList::split(':', dirname, false);
+ QStringList dbDirs = TQStringList::split(':', dirname, false);
bool createflag(false);
- for (QStringList::ConstIterator it=dbDirs.begin(); it!=dbDirs.end() && !createflag; ++it)
+ for (TQStringList::ConstIterator it=dbDirs.begin(); it!=dbDirs.end() && !createflag; ++it)
if (!(*it).startsWith("module:") && !m_creator->checkDriverDB(*it, dbfi.lastModified()))
createflag = true;
@@ -108,23 +108,23 @@ void KMDriverDB::slotDbCreated()
//emit dbLoaded(true);
}
-KMDBEntryList* KMDriverDB::findEntry(const QString& manu, const QString& model)
+KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model)
{
- QDict<KMDBEntryList> *models = m_entries.find(manu);
+ TQDict<KMDBEntryList> *models = m_entries.find(manu);
if (models)
return models->find(model);
return 0;
}
-KMDBEntryList* KMDriverDB::findPnpEntry(const QString& manu, const QString& model)
+KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& model)
{
- QDict<KMDBEntryList> *models = m_pnpentries.find(manu);
+ TQDict<KMDBEntryList> *models = m_pnpentries.find(manu);
if (models)
return models->find(model);
return 0;
}
-QDict<KMDBEntryList>* KMDriverDB::findModels(const QString& manu)
+TQDict<KMDBEntryList>* KMDriverDB::findModels(const TQString& manu)
{
return m_entries.find(manu);
}
@@ -140,10 +140,10 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
}
// insert it in normal entries
- QDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer);
+ TQDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer);
if (!models)
{
- models = new QDict<KMDBEntryList>(17,false);
+ models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_entries.insert(entry->manufacturer,models);
}
@@ -162,7 +162,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
models = m_pnpentries.find(entry->manufacturer);
if (!models)
{
- models = new QDict<KMDBEntryList>(17,false);
+ models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_pnpentries.insert(entry->manufacturer,models);
}
diff --git a/kdeprint/management/kmdriverdb.h b/kdeprint/management/kmdriverdb.h
index e0f3a7eba..1ffecdc0a 100644
--- a/kdeprint/management/kmdriverdb.h
+++ b/kdeprint/management/kmdriverdb.h
@@ -20,10 +20,10 @@
#ifndef KMDRIVERDB_H
#define KMDRIVERDB_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include "kmdbentry.h"
@@ -35,31 +35,31 @@ class KMDriverDB : public QObject
public:
static KMDriverDB* self();
- KMDriverDB(QObject *parent = 0, const char *name = 0);
+ KMDriverDB(TQObject *parent = 0, const char *name = 0);
~KMDriverDB();
- void init(QWidget *parent = 0);
- KMDBEntryList* findEntry(const QString& manu, const QString& model);
- KMDBEntryList* findPnpEntry(const QString& manu, const QString& model);
- QDict<KMDBEntryList>* findModels(const QString& manu);
- const QDict< QDict<KMDBEntryList> >& manufacturers() const { return m_entries; }
+ void init(TQWidget *parent = 0);
+ KMDBEntryList* findEntry(const TQString& manu, const TQString& model);
+ KMDBEntryList* findPnpEntry(const TQString& manu, const TQString& model);
+ TQDict<KMDBEntryList>* findModels(const TQString& manu);
+ const TQDict< TQDict<KMDBEntryList> >& manufacturers() const { return m_entries; }
protected:
void loadDbFile();
void insertEntry(KMDBEntry *entry);
- QString dbFile();
+ TQString dbFile();
protected slots:
void slotDbCreated();
signals:
void dbLoaded(bool reloaded);
- void error(const QString&);
+ void error(const TQString&);
private:
KMDBCreator *m_creator;
- QDict< QDict<KMDBEntryList> > m_entries;
- QDict< QDict<KMDBEntryList> > m_pnpentries;
+ TQDict< TQDict<KMDBEntryList> > m_entries;
+ TQDict< TQDict<KMDBEntryList> > m_pnpentries;
static KMDriverDB *m_self;
};
diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp
index 076b8897e..fdd3d263c 100644
--- a/kdeprint/management/kmdriverdbwidget.cpp
+++ b/kdeprint/management/kmdriverdbwidget.cpp
@@ -25,13 +25,13 @@
#include <klistbox.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcursor.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstrlist.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
#include <klocale.h>
#include <kcursor.h>
@@ -39,29 +39,29 @@
#include <kguiitem.h>
#include <kio/netaccess.h>
-KMDriverDbWidget::KMDriverDbWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMDriverDbWidget::KMDriverDbWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
- m_external = QString::null;
+ m_external = TQString::null;
m_valid = false;
// build widget
m_manu = new KListBox(this);
m_model = new KListBox(this);
- m_postscript = new QCheckBox(i18n("&PostScript printer"),this);
- m_raw = new QCheckBox(i18n("&Raw printer (no driver needed)"),this);
+ m_postscript = new TQCheckBox(i18n("&PostScript printer"),this);
+ m_raw = new TQCheckBox(i18n("&Raw printer (no driver needed)"),this);
m_postscript->setCursor(KCursor::handCursor());
m_raw->setCursor(KCursor::handCursor());
m_other = new KPushButton(KGuiItem(i18n("&Other..."), "fileopen"), this);
- QLabel *l1 = new QLabel(i18n("&Manufacturer:"), this);
- QLabel *l2 = new QLabel(i18n("Mo&del:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Manufacturer:"), this);
+ QLabel *l2 = new TQLabel(i18n("Mo&del:"), this);
l1->setBuddy(m_manu);
l2->setBuddy(m_model);
// build layout
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QGridLayout *sub1_ = new QGridLayout(0, 2, 3, 0, 0);
- QHBoxLayout *sub2_ = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QGridLayout *sub1_ = new TQGridLayout(0, 2, 3, 0, 0);
+ QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 10);
main_->addLayout(sub1_);
main_->addLayout(sub2_);
main_->addWidget(m_raw);
@@ -74,26 +74,26 @@ KMDriverDbWidget::KMDriverDbWidget(QWidget *parent, const char *name)
sub2_->addWidget(m_other,0);
// build connections
- connect(KMDriverDB::self(),SIGNAL(dbLoaded(bool)),SLOT(slotDbLoaded(bool)));
- connect(KMDriverDB::self(), SIGNAL(error(const QString&)), SLOT(slotError(const QString&)));
- connect(m_manu,SIGNAL(highlighted(const QString&)),SLOT(slotManufacturerSelected(const QString&)));
- connect(m_raw,SIGNAL(toggled(bool)),m_manu,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_model,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_other,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_postscript,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_manu,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_model,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_other,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_raw,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),SLOT(slotPostscriptToggled(bool)));
- connect(m_other,SIGNAL(clicked()),SLOT(slotOtherClicked()));
+ connect(KMDriverDB::self(),TQT_SIGNAL(dbLoaded(bool)),TQT_SLOT(slotDbLoaded(bool)));
+ connect(KMDriverDB::self(), TQT_SIGNAL(error(const TQString&)), TQT_SLOT(slotError(const TQString&)));
+ connect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),TQT_SLOT(slotManufacturerSelected(const TQString&)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_manu,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_model,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_other,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_postscript,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_manu,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_model,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_other,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_raw,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotPostscriptToggled(bool)));
+ connect(m_other,TQT_SIGNAL(clicked()),TQT_SLOT(slotOtherClicked()));
}
KMDriverDbWidget::~KMDriverDbWidget()
{
}
-void KMDriverDbWidget::setDriver(const QString& manu, const QString& model)
+void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model)
{
QListBoxItem *item = m_manu->findItem(manu);
QString model_(model);
@@ -105,7 +105,7 @@ void KMDriverDbWidget::setDriver(const QString& manu, const QString& model)
// try by stripping the manufacturer name from
// the beginning of the model string. This is
// often the case with PPD files
- item = m_model->findItem(model_.replace(0,manu.length()+1,QString::fromLatin1("")));
+ item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::fromLatin1("")));
if (item)
m_model->setCurrentItem(item);
}
@@ -127,12 +127,12 @@ void KMDriverDbWidget::setHaveOther(bool on)
m_other->hide();
}
-QString KMDriverDbWidget::manufacturer()
+TQString KMDriverDbWidget::manufacturer()
{
return m_manu->currentText();
}
-QString KMDriverDbWidget::model()
+TQString KMDriverDbWidget::model()
{
return m_model->currentText();
}
@@ -151,7 +151,7 @@ void KMDriverDbWidget::init()
{
if (!m_valid)
{
- QApplication::setOverrideCursor(KCursor::waitCursor());
+ TQApplication::setOverrideCursor(KCursor::waitCursor());
m_manu->clear();
m_model->clear();
m_manu->insertItem(i18n("Loading..."));
@@ -161,13 +161,13 @@ void KMDriverDbWidget::init()
void KMDriverDbWidget::slotDbLoaded(bool reloaded)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_valid = true;
if (reloaded || m_manu->count() == 0 || (m_manu->count() == 1 && m_manu->text(0) == i18n("Loading...")))
{ // do something only if DB reloaded
m_manu->clear();
m_model->clear();
- QDictIterator< QDict<KMDBEntryList> > it(KMDriverDB::self()->manufacturers());
+ TQDictIterator< TQDict<KMDBEntryList> > it(KMDriverDB::self()->manufacturers());
for (;it.current();++it)
m_manu->insertItem(it.currentKey());
m_manu->sort();
@@ -175,22 +175,22 @@ void KMDriverDbWidget::slotDbLoaded(bool reloaded)
}
}
-void KMDriverDbWidget::slotError(const QString& msg)
+void KMDriverDbWidget::slotError(const TQString& msg)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_valid = false;
m_manu->clear();
KMessageBox::error(this, "<qt>"+msg+"</qt>");
}
-void KMDriverDbWidget::slotManufacturerSelected(const QString& name)
+void KMDriverDbWidget::slotManufacturerSelected(const TQString& name)
{
m_model->clear();
- QDict<KMDBEntryList> *models = KMDriverDB::self()->findModels(name);
+ TQDict<KMDBEntryList> *models = KMDriverDB::self()->findModels(name);
if (models)
{
QStrIList ilist(true);
- QDictIterator<KMDBEntryList> it(*models);
+ TQDictIterator<KMDBEntryList> it(*models);
for (;it.current();++it)
ilist.append(it.currentKey().latin1());
ilist.sort();
@@ -223,7 +223,7 @@ void KMDriverDbWidget::slotOtherClicked()
{
if (m_external.isEmpty())
{
- KFileDialog dlg( QString::null, QString::null, this, 0, true );
+ KFileDialog dlg( TQString::null, TQString::null, this, 0, true );
KURL url;
dlg.setMode( KFile::File );
@@ -233,14 +233,14 @@ void KMDriverDbWidget::slotOtherClicked()
if ( !url.isEmpty() )
{
- QString filename;
+ TQString filename;
if ( KIO::NetAccess::download( url, filename, this ) )
{
DrMain *driver = KMFactory::self()->manager()->loadFileDriver(filename);
if (driver)
{
m_external = filename;
- disconnect(m_manu,SIGNAL(highlighted(const QString&)),this,SLOT(slotManufacturerSelected(const QString&)));
+ disconnect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotManufacturerSelected(const TQString&)));
m_manu->clear();
m_model->clear();
QString s = driver->get("manufacturer");
@@ -263,10 +263,10 @@ void KMDriverDbWidget::slotOtherClicked()
}
else
{
- m_external = QString::null;
- connect(m_manu,SIGNAL(highlighted(const QString&)),this,SLOT(slotManufacturerSelected(const QString&)));
+ m_external = TQString::null;
+ connect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotManufacturerSelected(const TQString&)));
m_other->setText(i18n("Other"));
- m_desc = QString::null;
+ m_desc = TQString::null;
slotDbLoaded(true);
}
}
diff --git a/kdeprint/management/kmdriverdbwidget.h b/kdeprint/management/kmdriverdbwidget.h
index aa040e110..8e111f042 100644
--- a/kdeprint/management/kmdriverdbwidget.h
+++ b/kdeprint/management/kmdriverdbwidget.h
@@ -20,7 +20,7 @@
#ifndef KMDRIVERDBWIDGET_H
#define KMDRIVERDBWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kmdbentry.h"
class QListBox;
@@ -31,28 +31,28 @@ class KMDriverDbWidget : public QWidget
{
Q_OBJECT
public:
- KMDriverDbWidget(QWidget *parent = 0, const char *name = 0);
+ KMDriverDbWidget(TQWidget *parent = 0, const char *name = 0);
~KMDriverDbWidget();
void init();
void setHaveRaw(bool on);
void setHaveOther(bool on);
- void setDriver(const QString& manu, const QString& model);
+ void setDriver(const TQString& manu, const TQString& model);
- QString manufacturer();
- QString model();
- QString description() { return m_desc; }
+ TQString manufacturer();
+ TQString model();
+ TQString description() { return m_desc; }
KMDBEntryList* drivers();
- QString driverFile();
+ TQString driverFile();
bool isRaw();
bool isExternal();
protected slots:
void slotDbLoaded(bool reloaded);
- void slotManufacturerSelected(const QString& name);
+ void slotManufacturerSelected(const TQString& name);
void slotPostscriptToggled(bool);
void slotOtherClicked();
- void slotError(const QString&);
+ void slotError(const TQString&);
private:
QListBox *m_manu;
@@ -65,7 +65,7 @@ private:
bool m_valid;
};
-inline QString KMDriverDbWidget::driverFile()
+inline TQString KMDriverDbWidget::driverFile()
{ return m_external; }
inline bool KMDriverDbWidget::isExternal()
diff --git a/kdeprint/management/kmdriverdialog.cpp b/kdeprint/management/kmdriverdialog.cpp
index f25ba8725..2e79a8c6f 100644
--- a/kdeprint/management/kmdriverdialog.cpp
+++ b/kdeprint/management/kmdriverdialog.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kmessagebox.h>
-KMDriverDialog::KMDriverDialog(QWidget *parent, const char *name)
+KMDriverDialog::KMDriverDialog(TQWidget *parent, const char *name)
: KDialogBase(KDialogBase::Swallow,i18n("Configure"),KDialogBase::Ok|KDialogBase::Cancel,KDialogBase::Ok,parent,name,true,false)
{
m_view = new DriverView(0);
diff --git a/kdeprint/management/kmdriverdialog.h b/kdeprint/management/kmdriverdialog.h
index b3368ae13..8720213d7 100644
--- a/kdeprint/management/kmdriverdialog.h
+++ b/kdeprint/management/kmdriverdialog.h
@@ -29,7 +29,7 @@ class KMDriverDialog : public KDialogBase
{
Q_OBJECT
public:
- KMDriverDialog(QWidget *parent = 0, const char *name = 0);
+ KMDriverDialog(TQWidget *parent = 0, const char *name = 0);
~KMDriverDialog();
void setDriver(DrMain*);
diff --git a/kdeprint/management/kmiconview.cpp b/kdeprint/management/kmiconview.cpp
index cabd4496a..5d16e34d0 100644
--- a/kdeprint/management/kmiconview.cpp
+++ b/kdeprint/management/kmiconview.cpp
@@ -20,21 +20,21 @@
#include "kmiconview.h"
#include "kmprinter.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdebug.h>
-KMIconViewItem::KMIconViewItem(QIconView *parent, KMPrinter *p)
-: QIconViewItem(parent)
+KMIconViewItem::KMIconViewItem(TQIconView *parent, KMPrinter *p)
+: TQIconViewItem(parent)
{
m_state = 0;
m_mode = parent->itemTextPos();
- m_pixmap = QString::null;
+ m_pixmap = TQString::null;
m_isclass = false;
updatePrinter(p, m_mode);
}
-void KMIconViewItem::paintItem(QPainter *p, const QColorGroup& cg)
+void KMIconViewItem::paintItem(TQPainter *p, const TQColorGroup& cg)
{
if (m_state != 0)
{
@@ -43,10 +43,10 @@ void KMIconViewItem::paintItem(QPainter *p, const QColorGroup& cg)
if (m_state & 0x2) f.setItalic(true);
p->setFont(f);
}
- QIconViewItem::paintItem(p,cg);
+ TQIconViewItem::paintItem(p,cg);
}
-void KMIconViewItem::calcRect(const QString&)
+void KMIconViewItem::calcRect(const TQString&)
{
QRect ir(rect()), pr, tr;
@@ -59,25 +59,25 @@ void KMIconViewItem::calcRect(const QString&)
if (m_state & 0x1) f.setBold(true);
if (m_state & 0x2) f.setItalic(true);
QFontMetrics fm(f);
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
tr = fm.boundingRect(0, 0, iconView()->maxItemWidth(), 0xFFFFFF, AlignHCenter|AlignTop|WordBreak|BreakAnywhere, text()+"X");
else
tr = fm.boundingRect(0, 0, 0xFFFFFF, 0xFFFFFF, AlignLeft|AlignTop, text()+"X");
// item rect
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
{
ir.setHeight(pr.height() + tr.height() + 15);
ir.setWidth(QMAX(pr.width(), tr.width()) + 10);
- pr = QRect((ir.width()-pr.width())/2, 5, pr.width(), pr.height());
- tr = QRect((ir.width()-tr.width())/2, 10+pr.height(), tr.width(), tr.height());
+ pr = TQRect((ir.width()-pr.width())/2, 5, pr.width(), pr.height());
+ tr = TQRect((ir.width()-tr.width())/2, 10+pr.height(), tr.width(), tr.height());
}
else
{
ir.setHeight(QMAX(pr.height(), tr.height()) + 4);
ir.setWidth(pr.width() + tr.width() + 6);
- pr = QRect(2, (ir.height()-pr.height())/2, pr.width(), pr.height());
- tr = QRect(4+pr.width(), (ir.height()-tr.height())/2, tr.width(), tr.height());
+ pr = TQRect(2, (ir.height()-pr.height())/2, pr.width(), pr.height());
+ tr = TQRect(4+pr.width(), (ir.height()-tr.height())/2, tr.width(), tr.height());
}
// set rects
@@ -96,10 +96,10 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
update = (oldstate != m_state);
if (p->name() != text() || update)
{
- setText(QString::null);
+ setText(TQString::null);
setText(p->name());
}
- setKey(QString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name()));
+ setKey(TQString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name()));
m_isclass = p->isClass(false);
}
if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap))
@@ -108,7 +108,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
if (p)
m_pixmap = p->pixmap();
m_mode = mode;
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
setPixmap(DesktopIcon(m_pixmap, 0, iconstate));
else
setPixmap(SmallIcon(m_pixmap, 0, iconstate));
@@ -118,19 +118,19 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
setDiscarded(false);
}
-KMIconView::KMIconView(QWidget *parent, const char *name)
+KMIconView::KMIconView(TQWidget *parent, const char *name)
: KIconView(parent,name)
{
setMode(KIconView::Select);
- setSelectionMode(QIconView::Single);
+ setSelectionMode(TQIconView::Single);
setItemsMovable(false);
- setResizeMode(QIconView::Adjust);
+ setResizeMode(TQIconView::Adjust);
m_items.setAutoDelete(false);
setViewMode(KMIconView::Big);
- connect(this,SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)),SLOT(slotRightButtonClicked(QIconViewItem*,const QPoint&)));
- connect(this,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
+ connect(this,TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)),TQT_SLOT(slotRightButtonClicked(TQIconViewItem*,const TQPoint&)));
+ connect(this,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
}
KMIconView::~KMIconView()
@@ -141,7 +141,7 @@ KMIconViewItem* KMIconView::findItem(KMPrinter *p)
{
if (p)
{
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
if (it.current()->text() == p->name()
&& it.current()->isClass() == p->isClass())
@@ -150,17 +150,17 @@ KMIconViewItem* KMIconView::findItem(KMPrinter *p)
return 0;
}
-void KMIconView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMIconView::setPrinterList(TQPtrList<KMPrinter> *list)
{
bool changed(false);
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
it.current()->setDiscarded(true);
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
KMIconViewItem *item(0);
for (;it.current();++it)
{
@@ -195,32 +195,32 @@ void KMIconView::setViewMode(ViewMode m)
{
m_mode = m;
bool big = (m == KMIconView::Big);
- int mode = (big ? QIconView::Bottom : QIconView::Right);
+ int mode = (big ? TQIconView::Bottom : TQIconView::Right);
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
it.current()->updatePrinter(0, mode);
- setArrangement((big ? QIconView::LeftToRight : QIconView::TopToBottom));
- setItemTextPos((QIconView::ItemTextPos)mode);
+ setArrangement((big ? TQIconView::LeftToRight : TQIconView::TopToBottom));
+ setItemTextPos((TQIconView::ItemTextPos)mode);
//setGridX((big ? 60 : -1));
setWordWrapIconText(true);
}
-void KMIconView::slotRightButtonClicked(QIconViewItem *item, const QPoint& p)
+void KMIconView::slotRightButtonClicked(TQIconViewItem *item, const TQPoint& p)
{
- emit rightButtonClicked(item ? item->text() : QString::null, p);
+ emit rightButtonClicked(item ? item->text() : TQString::null, p);
}
void KMIconView::slotSelectionChanged()
{
KMIconViewItem *item = static_cast<KMIconViewItem*>(currentItem());
- emit printerSelected((item && !item->isDiscarded() && item->isSelected() ? item->text() : QString::null));
+ emit printerSelected((item && !item->isDiscarded() && item->isSelected() ? item->text() : TQString::null));
}
-void KMIconView::setPrinter(const QString& prname)
+void KMIconView::setPrinter(const TQString& prname)
{
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (; it.current(); ++it)
if (it.current()->text() == prname)
{
@@ -231,7 +231,7 @@ void KMIconView::setPrinter(const QString& prname)
void KMIconView::setPrinter(KMPrinter *p)
{
- setPrinter(p ? p->name() : QString::null);
+ setPrinter(p ? p->name() : TQString::null);
}
#include "kmiconview.moc"
diff --git a/kdeprint/management/kmiconview.h b/kdeprint/management/kmiconview.h
index 1cc8daa09..1c3aeb542 100644
--- a/kdeprint/management/kmiconview.h
+++ b/kdeprint/management/kmiconview.h
@@ -21,22 +21,22 @@
#define KMICONVIEW_H
#include <kiconview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kmobject.h"
class KMPrinter;
-class KMIconViewItem : public QIconViewItem, public KMObject
+class KMIconViewItem : public TQIconViewItem, public KMObject
{
public:
- KMIconViewItem(QIconView *parent, KMPrinter *p);
- void updatePrinter(KMPrinter *printer = 0, int mode = QIconView::Bottom);
+ KMIconViewItem(TQIconView *parent, KMPrinter *p);
+ void updatePrinter(KMPrinter *printer = 0, int mode = TQIconView::Bottom);
bool isClass() const { return m_isclass; }
protected:
- virtual void paintItem(QPainter*, const QColorGroup&);
- virtual void calcRect(const QString& text_ = QString::null);
+ virtual void paintItem(TQPainter*, const TQColorGroup&);
+ virtual void calcRect(const TQString& text_ = TQString::null);
private:
int m_mode;
@@ -51,27 +51,27 @@ class KMIconView : public KIconView
public:
enum ViewMode { Big, Small };
- KMIconView(QWidget *parent = 0, const char *name = 0);
+ KMIconView(TQWidget *parent = 0, const char *name = 0);
~KMIconView();
- void setPrinterList(QPtrList<KMPrinter> *list);
- void setPrinter(const QString&);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
+ void setPrinter(const TQString&);
void setPrinter(KMPrinter*);
void setViewMode(ViewMode);
signals:
- void rightButtonClicked(const QString&, const QPoint&);
- void printerSelected(const QString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
+ void printerSelected(const TQString&);
protected slots:
- void slotRightButtonClicked(QIconViewItem*, const QPoint&);
+ void slotRightButtonClicked(TQIconViewItem*, const TQPoint&);
void slotSelectionChanged();
private:
KMIconViewItem* findItem(KMPrinter *p);
private:
- QPtrList<KMIconViewItem> m_items;
+ TQPtrList<KMIconViewItem> m_items;
ViewMode m_mode;
};
diff --git a/kdeprint/management/kminfopage.cpp b/kdeprint/management/kminfopage.cpp
index 4366265ab..e06fa3c28 100644
--- a/kdeprint/management/kminfopage.cpp
+++ b/kdeprint/management/kminfopage.cpp
@@ -20,44 +20,44 @@
#include "kminfopage.h"
#include "kmprinter.h"
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KMInfoPage::KMInfoPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMInfoPage::KMInfoPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
- m_title = new QLabel(this);
- m_titlepixmap = new QLabel(this);
+ m_title = new TQLabel(this);
+ m_titlepixmap = new TQLabel(this);
m_titlepixmap->setAlignment(Qt::AlignCenter);
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
- m_type = new QLabel(this);
- m_description = new QLabel(this);
- m_state = new QLabel(this);
- m_location = new QLabel(this);
- m_model = new QLabel(this);
- m_uri = new QLabel(this);
- m_device = new QLabel(this);
- QLabel *m_loclabel = new QLabel(i18n("Physical Location", "Location:"), this);
+ m_type = new TQLabel(this);
+ m_description = new TQLabel(this);
+ m_state = new TQLabel(this);
+ m_location = new TQLabel(this);
+ m_model = new TQLabel(this);
+ m_uri = new TQLabel(this);
+ m_device = new TQLabel(this);
+ QLabel *m_loclabel = new TQLabel(i18n("Physical Location", "Location:"), this);
m_loclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_desclabel = new QLabel(i18n("Description:"), this);
+ QLabel *m_desclabel = new TQLabel(i18n("Description:"), this);
m_desclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_typelabel = new QLabel(i18n("Type:"), this);
+ QLabel *m_typelabel = new TQLabel(i18n("Type:"), this);
m_typelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_statelabel = new QLabel(i18n("Status", "State:"), this);
+ QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), this);
m_statelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_urilabel = new QLabel(i18n("URI:"), this);
+ QLabel *m_urilabel = new TQLabel(i18n("URI:"), this);
m_urilabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- m_devlabel = new QLabel(i18n("Device:"), this);
+ m_devlabel = new TQLabel(i18n("Device:"), this);
m_devlabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_modellabel = new QLabel(i18n("Model:"), this);
+ QLabel *m_modellabel = new TQLabel(i18n("Model:"), this);
m_modellabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QGridLayout *lay0 = new QGridLayout(this, 11, 2, 0, 5);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 10);
+ QGridLayout *lay0 = new TQGridLayout(this, 11, 2, 0, 5);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10);
lay0->addRowSpacing(7,20);
lay0->setRowStretch(7,0);
lay0->setRowStretch(10,1);
@@ -95,19 +95,19 @@ void KMInfoPage::setPrinter(KMPrinter *p)
// clear everything if p == 0
if (!p)
{
- m_title->setText(QString::null);
- m_titlepixmap->setPixmap(QPixmap());
- m_type->setText(QString::null);
- m_state->setText(QString::null);
- m_location->setText(QString::null);
- m_description->setText(QString::null);
- m_uri->setText(QString::null);
- m_device->setText(QString::null);
- m_model->setText(QString::null);
+ m_title->setText(TQString::null);
+ m_titlepixmap->setPixmap(TQPixmap());
+ m_type->setText(TQString::null);
+ m_state->setText(TQString::null);
+ m_location->setText(TQString::null);
+ m_description->setText(TQString::null);
+ m_uri->setText(TQString::null);
+ m_device->setText(TQString::null);
+ m_model->setText(TQString::null);
}
else
{
- m_title->setText(QString::fromLatin1("<b>%1</b>").arg(p->name()));
+ m_title->setText(TQString::fromLatin1("<b>%1</b>").arg(p->name()));
m_titlepixmap->setPixmap(SmallIcon(p->pixmap()));
if (p->isImplicit()) m_type->setText(i18n("Implicit class"));
else if (p->isClass(false))
@@ -126,7 +126,7 @@ void KMInfoPage::setPrinter(KMPrinter *p)
if (p->isClass(false))
{
QString s;
- for (QStringList::ConstIterator it=p->members().begin(); it!=p->members().end(); ++it)
+ for (TQStringList::ConstIterator it=p->members().begin(); it!=p->members().end(); ++it)
s.append(KURL(*it).prettyURL() + ", ");
s.truncate(s.length()-2);
m_device->setText(s);
diff --git a/kdeprint/management/kminfopage.h b/kdeprint/management/kminfopage.h
index a93aa1296..9c1c6ff10 100644
--- a/kdeprint/management/kminfopage.h
+++ b/kdeprint/management/kminfopage.h
@@ -21,14 +21,14 @@
#define KMINFOPAGE_H
#include "kmprinterpage.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
-class KMInfoPage : public QWidget, public KMPrinterPage
+class KMInfoPage : public TQWidget, public KMPrinterPage
{
public:
- KMInfoPage(QWidget *parent = 0, const char *name = 0);
+ KMInfoPage(TQWidget *parent = 0, const char *name = 0);
~KMInfoPage();
void setPrinter(KMPrinter *p);
diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp
index d4bb32687..6e6fcc391 100644
--- a/kdeprint/management/kminstancepage.cpp
+++ b/kdeprint/management/kminstancepage.cpp
@@ -26,10 +26,10 @@
#include "kprinter.h"
#include "kmtimer.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
#include <klistbox.h>
@@ -38,26 +38,26 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-KMInstancePage::KMInstancePage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMInstancePage::KMInstancePage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_view = new KListBox(this);
m_printer = 0;
initActions();
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 0);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 0);
main_->addWidget(m_view);
- QVBoxLayout *sub_ = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 0);
main_->addLayout(sub_);
- for (QValueList<QButton*>::Iterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
+ for (TQValueList<TQButton*>::Iterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
if (*it)
sub_->addWidget(*it);
else
sub_->addSpacing(10);
sub_->addStretch(1);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("Define/Edit here instances for the current selected "
"printer. An instance is a combination of a real "
"(physical) printer and a set of predefined options. "
@@ -72,26 +72,26 @@ KMInstancePage::~KMInstancePage()
{
}
-void KMInstancePage::addButton(const QString& txt, const QString& pixmap, const char *receiver)
+void KMInstancePage::addButton(const TQString& txt, const TQString& pixmap, const char *receiver)
{
- QPushButton *btn = new QPushButton(this, 0L);
+ QPushButton *btn = new TQPushButton(this, 0L);
btn->setText(txt);
btn->setIconSet(BarIconSet(pixmap));
btn->setFlat(true);
- connect(btn, SIGNAL(clicked()), receiver);
+ connect(btn, TQT_SIGNAL(clicked()), receiver);
m_buttons.append(btn);
}
void KMInstancePage::initActions()
{
- addButton(i18n("New..."), "filenew", SLOT(slotNew()));
- addButton(i18n("Copy..."), "editcopy", SLOT(slotCopy()));
- addButton(i18n("Remove"), "edittrash", SLOT(slotRemove()));
+ addButton(i18n("New..."), "filenew", TQT_SLOT(slotNew()));
+ addButton(i18n("Copy..."), "editcopy", TQT_SLOT(slotCopy()));
+ addButton(i18n("Remove"), "edittrash", TQT_SLOT(slotRemove()));
m_buttons.append(0);
- addButton(i18n("Set as Default"), "exec", SLOT(slotDefault()));
- addButton(i18n("Settings"), "configure", SLOT(slotSettings()));
+ addButton(i18n("Set as Default"), "exec", TQT_SLOT(slotDefault()));
+ addButton(i18n("Settings"), "configure", TQT_SLOT(slotSettings()));
m_buttons.append(0);
- addButton(i18n("Test..."), "fileprint", SLOT(slotTest()));
+ addButton(i18n("Test..."), "fileprint", TQT_SLOT(slotTest()));
}
void KMInstancePage::setPrinter(KMPrinter *p)
@@ -104,18 +104,18 @@ void KMInstancePage::setPrinter(KMPrinter *p)
bool ok = (p != 0);
if (ok)
{
- QPtrList<KMPrinter> list;
+ TQPtrList<KMPrinter> list;
KMFactory::self()->virtualManager()->virtualList(list,p->name());
- QPtrListIterator<KMPrinter> it(list);
+ TQPtrListIterator<KMPrinter> it(list);
for (;it.current();++it)
{
- QStringList pair = QStringList::split('/',it.current()->name(),false);
+ QStringList pair = TQStringList::split('/',it.current()->name(),false);
m_view->insertItem(SmallIcon((it.current()->isSoftDefault() ? "exec" : "fileprint")),(pair.count() > 1 ? pair[1] : i18n("(Default)")));
}
m_view->sort();
}
- for (QValueList<QButton*>::ConstIterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
+ for (TQValueList<TQButton*>::ConstIterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
if (*it)
(*it)->setEnabled(ok);
@@ -138,12 +138,12 @@ void KMInstancePage::slotNew()
i18n("(Default)"),&ok,this);
if (ok)
{
- if (name.find(QRegExp("[/\\s]")) != -1)
+ if (name.find(TQRegExp("[/\\s]")) != -1)
KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes."));
else
{
if (name == i18n("(Default)"))
- name = QString::null;
+ name = TQString::null;
KMFactory::self()->virtualManager()->create(m_printer,name);
setPrinter(m_printer);
}
@@ -158,11 +158,11 @@ void KMInstancePage::slotRemove()
bool reload(false);
QString src = m_view->currentText();
- QString msg = (src != i18n("(Default)") ? i18n("Do you really want to remove instance %1?") : i18n("You can't remove the default instance. However all settings of %1 will be discarded. Continue?"));
- if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),QString::null,KStdGuiItem::del()) == KMessageBox::Continue)
+ TQString msg = (src != i18n("(Default)") ? i18n("Do you really want to remove instance %1?") : i18n("You can't remove the default instance. However all settings of %1 will be discarded. Continue?"));
+ if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue)
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
reload = KMFactory::self()->virtualManager()->isDefault(m_printer,src);
KMFactory::self()->virtualManager()->remove(m_printer,src);
setPrinter(m_printer);
@@ -183,14 +183,14 @@ void KMInstancePage::slotCopy()
i18n("(Default)"),&ok,this);
if (ok)
{
- if (name.find(QRegExp("[/\\s]")) != -1)
+ if (name.find(TQRegExp("[/\\s]")) != -1)
KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes."));
else
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
if (name == i18n("(Default)"))
- name = QString::null;
+ name = TQString::null;
KMFactory::self()->virtualManager()->copy(m_printer,src,name);
setPrinter(m_printer);
}
@@ -207,7 +207,7 @@ void KMInstancePage::slotSettings()
QString src = m_view->currentText();
if (!src.isEmpty())
{
- if (src == i18n("(Default)")) src = QString::null;
+ if (src == i18n("(Default)")) src = TQString::null;
KMPrinter *pr = KMFactory::self()->virtualManager()->findInstance(m_printer,src);
if ( !pr )
KMessageBox::error( this, i18n( "Unable to find instance %1." ).arg( m_view->currentText() ) );
@@ -222,7 +222,7 @@ void KMInstancePage::slotSettings()
if (pr->isEdited())
{ // printer edited, need to save changes
pr->setDefaultOptions(pr->editedOptions());
- pr->setEditedOptions(QMap<QString,QString>());
+ pr->setEditedOptions(TQMap<TQString,TQString>());
pr->setEdited(false);
KMFactory::self()->virtualManager()->triggerSave();
}
@@ -242,7 +242,7 @@ void KMInstancePage::slotDefault()
if (!src.isEmpty())
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
KMFactory::self()->virtualManager()->setAsDefault(m_printer,src);
setPrinter(m_printer);
}
@@ -258,11 +258,11 @@ void KMInstancePage::slotTest()
if (!src.isEmpty())
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
KMPrinter *mpr = KMFactory::self()->virtualManager()->findInstance(m_printer,src);
if (!mpr)
KMessageBox::error(this,i18n("Internal error: printer not found."));
- else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), QString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
+ else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), TQString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
{
if (!KMFactory::self()->virtualManager()->testInstance(mpr))
KMessageBox::error(this, i18n("Unable to send test page to %1.").arg(mpr->printerName()));
diff --git a/kdeprint/management/kminstancepage.h b/kdeprint/management/kminstancepage.h
index d85a4bdb9..876c1f030 100644
--- a/kdeprint/management/kminstancepage.h
+++ b/kdeprint/management/kminstancepage.h
@@ -21,18 +21,18 @@
#define KMINSTANCEPAGE_H
#include "kmprinterpage.h"
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
class KListBox;
class KMPrinter;
class QButton;
-class KMInstancePage : public QWidget, public KMPrinterPage
+class KMInstancePage : public TQWidget, public KMPrinterPage
{
Q_OBJECT
public:
- KMInstancePage(QWidget *parent = 0, const char *name = 0);
+ KMInstancePage(TQWidget *parent = 0, const char *name = 0);
~KMInstancePage();
void setPrinter(KMPrinter*);
@@ -47,11 +47,11 @@ protected slots:
protected:
void initActions();
- void addButton(const QString& text, const QString& pixmap, const char *receiver);
+ void addButton(const TQString& text, const TQString& pixmap, const char *receiver);
private:
KListBox *m_view;
- QValueList<QButton*> m_buttons;
+ TQValueList<TQButton*> m_buttons;
KMPrinter *m_printer;
};
diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp
index bc27d0928..a5e419fc6 100644
--- a/kdeprint/management/kmjobviewer.cpp
+++ b/kdeprint/management/kmjobviewer.cpp
@@ -32,7 +32,7 @@
#include <klistview.h>
#include <kstatusbar.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kpopupmenu.h>
@@ -45,12 +45,12 @@
#include <kdebug.h>
#include <kwin.h>
#include <kio/netaccess.h>
-#include <qtimer.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
#include <stdlib.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurldrag.h>
#include <kconfig.h>
@@ -60,20 +60,20 @@
class KJobListView : public KListView
{
public:
- KJobListView( QWidget *parent = 0, const char *name = 0 );
+ KJobListView( TQWidget *parent = 0, const char *name = 0 );
protected:
- bool acceptDrag( QDropEvent* ) const;
+ bool acceptDrag( TQDropEvent* ) const;
};
-KJobListView::KJobListView( QWidget *parent, const char *name )
+KJobListView::KJobListView( TQWidget *parent, const char *name )
: KListView( parent, name )
{
setAcceptDrops( true );
setDropVisualizer( false );
}
-bool KJobListView::acceptDrag( QDropEvent *e ) const
+bool KJobListView::acceptDrag( TQDropEvent *e ) const
{
if ( KURLDrag::canDecode( e ) )
return true;
@@ -81,7 +81,7 @@ bool KJobListView::acceptDrag( QDropEvent *e ) const
return KListView::acceptDrag( e );
}
-KMJobViewer::KMJobViewer(QWidget *parent, const char *name)
+KMJobViewer::KMJobViewer(TQWidget *parent, const char *name)
: KMainWindow(parent,name)
{
m_view = 0;
@@ -100,7 +100,7 @@ KMJobViewer::KMJobViewer(QWidget *parent, const char *name)
{
setCaption(i18n("No Printer"));
KConfig *conf = KMFactory::self()->printConfig();
- QSize defSize( 550, 250 );
+ TQSize defSize( 550, 250 );
conf->setGroup( "Jobs" );
resize( conf->readSizeEntry( "Size", &defSize ) );
}
@@ -121,10 +121,10 @@ KMJobViewer::~KMJobViewer()
void KMJobViewer::setPrinter(KMPrinter *p)
{
- setPrinter((p ? p->printerName() : QString::null));
+ setPrinter((p ? p->printerName() : TQString::null));
}
-void KMJobViewer::setPrinter(const QString& prname)
+void KMJobViewer::setPrinter(const TQString& prname)
{
// We need to trigger a refresh even if the printer
// has not changed, some jobs may have been canceled
@@ -177,7 +177,7 @@ void KMJobViewer::addToManager()
if (m_prname == i18n("All Printers"))
{
loadPrinters();
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
m_manager->addPrinter(it.current()->printerName(), (KMJobManager::JobType)m_type, it.current()->isSpecial());
}
@@ -193,7 +193,7 @@ void KMJobViewer::removeFromManager()
{
if (m_prname == i18n("All Printers"))
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
m_manager->removePrinter(it.current()->printerName(), (KMJobManager::JobType)m_type);
}
@@ -206,7 +206,7 @@ void KMJobViewer::removeFromManager()
void KMJobViewer::refresh(bool reload)
{
m_jobs.clear();
- QPtrListIterator<KMJob> it(m_manager->jobList(reload));
+ TQPtrListIterator<KMJob> it(m_manager->jobList(reload));
bool all = (m_prname == i18n("All Printers")), active = (m_type == KMJobManager::ActiveJobs);
for (; it.current(); ++it)
if ((all || it.current()->printer() == m_prname)
@@ -239,17 +239,17 @@ void KMJobViewer::init()
m_view->addColumn(i18n("Size (KB)"));
m_view->addColumn(i18n("Page(s)"));
m_view->setColumnAlignment(5,Qt::AlignRight|Qt::AlignVCenter);
- connect( m_view, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), SLOT( slotDropped( QDropEvent*, QListViewItem* ) ) );
+ connect( m_view, TQT_SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ), TQT_SLOT( slotDropped( TQDropEvent*, TQListViewItem* ) ) );
//m_view->addColumn(i18n("Printer"));
//m_view->setColumnAlignment(6,Qt::AlignRight|Qt::AlignVCenter);
KMFactory::self()->uiManager()->setupJobViewer(m_view);
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
m_view->setSorting(0);
m_view->setAllColumnsShowFocus(true);
- m_view->setSelectionMode(QListView::Extended);
- connect(m_view,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
- connect(m_view,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),SLOT(slotRightClicked(QListViewItem*,const QPoint&,int)));
+ m_view->setSelectionMode(TQListView::Extended);
+ connect(m_view,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
+ connect(m_view,TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint&,int)),TQT_SLOT(slotRightClicked(TQListViewItem*,const TQPoint&,int)));
setCentralWidget(m_view);
}
@@ -259,35 +259,35 @@ void KMJobViewer::init()
void KMJobViewer::initActions()
{
// job actions
- KAction *hact = new KAction(i18n("&Hold"),"stop",0,this,SLOT(slotHold()),actionCollection(),"job_hold");
- KAction *ract = new KAction(i18n("&Resume"),"run",0,this,SLOT(slotResume()),actionCollection(),"job_resume");
- KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,this,SLOT(slotRemove()),actionCollection(),"job_remove");
- KAction *sact = new KAction(i18n("Res&tart"),"redo",0,this,SLOT(slotRestart()),actionCollection(),"job_restart");
+ KAction *hact = new KAction(i18n("&Hold"),"stop",0,this,TQT_SLOT(slotHold()),actionCollection(),"job_hold");
+ KAction *ract = new KAction(i18n("&Resume"),"run",0,this,TQT_SLOT(slotResume()),actionCollection(),"job_resume");
+ KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,this,TQT_SLOT(slotRemove()),actionCollection(),"job_remove");
+ KAction *sact = new KAction(i18n("Res&tart"),"redo",0,this,TQT_SLOT(slotRestart()),actionCollection(),"job_restart");
KActionMenu *mact = new KActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move");
mact->setDelayed(false);
- connect(mact->popupMenu(),SIGNAL(activated(int)),SLOT(slotMove(int)));
- connect(mact->popupMenu(),SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(mact->popupMenu(),SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect(mact->popupMenu(),SIGNAL(aboutToShow()),SLOT(slotShowMoveMenu()));
+ connect(mact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotMove(int)));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowMoveMenu()));
KToggleAction *tact = new KToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed");
tact->setEnabled(m_manager->actions() & KMJob::ShowCompleted);
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotShowCompleted(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowCompleted(bool)));
KToggleAction *uact = new KToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs");
uact->setCheckedState(KGuiItem(i18n("Hide Only User Jobs"),"personal"));
- connect(uact, SIGNAL(toggled(bool)), SLOT(slotUserOnly(bool)));
- m_userfield = new QLineEdit(0);
+ connect(uact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUserOnly(bool)));
+ m_userfield = new TQLineEdit(0);
m_userfield->setText(getenv("USER"));
- connect(m_userfield, SIGNAL(returnPressed()), SLOT(slotUserChanged()));
- connect(uact, SIGNAL(toggled(bool)), m_userfield, SLOT(setEnabled(bool)));
+ connect(m_userfield, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotUserChanged()));
+ connect(uact, TQT_SIGNAL(toggled(bool)), m_userfield, TQT_SLOT(setEnabled(bool)));
m_userfield->setEnabled(false);
- m_userfield->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ m_userfield->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
KWidgetAction *ufact = new KWidgetAction(m_userfield, i18n("User Name"), 0, 0, 0, actionCollection(), "view_username");
if (!m_pop)
{
- m_pop = new QPopupMenu(this);
- connect(m_pop,SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(m_pop,SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
+ m_pop = new TQPopupMenu(this);
+ connect(m_pop,TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(m_pop,TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
hact->plug(m_pop);
ract->plug(m_pop);
m_pop->insertSeparator();
@@ -300,10 +300,10 @@ void KMJobViewer::initActions()
// Filter actions
KActionMenu *fact = new KActionMenu(i18n("&Select Printer"), "kdeprint_printer", actionCollection(), "filter_modify");
fact->setDelayed(false);
- connect(fact->popupMenu(),SIGNAL(activated(int)),SLOT(slotPrinterSelected(int)));
- connect(fact->popupMenu(),SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(fact->popupMenu(),SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect(fact->popupMenu(),SIGNAL(aboutToShow()),SLOT(slotShowPrinterMenu()));
+ connect(fact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int)));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowPrinterMenu()));
if (!m_standalone)
{
@@ -322,16 +322,16 @@ void KMJobViewer::initActions()
}
else
{// stand-alone application
- KStdAction::quit(kapp,SLOT(quit()),actionCollection());
- KStdAction::close(this,SLOT(slotClose()),actionCollection());
- KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection());
+ KStdAction::quit(kapp,TQT_SLOT(quit()),actionCollection());
+ KStdAction::close(this,TQT_SLOT(slotClose()),actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection());
// refresh action
- new KAction(i18n("Refresh"),"reload",0,this,SLOT(slotRefresh()),actionCollection(),"refresh");
+ new KAction(i18n("Refresh"),"reload",0,this,TQT_SLOT(slotRefresh()),actionCollection(),"refresh");
// create status bar
KStatusBar *statusbar = statusBar();
- m_stickybox = new QCheckBox( i18n( "Keep window permanent" ), statusbar );
+ m_stickybox = new TQCheckBox( i18n( "Keep window permanent" ), statusbar );
statusbar->addWidget( m_stickybox, 1, false );
statusbar->insertItem(" " + i18n("Max.: %1").arg(i18n("Unlimited"))+ " ", 0, 0, true);
statusbar->setItemFixed(0);
@@ -344,12 +344,12 @@ void KMJobViewer::initActions()
slotSelectionChanged();
}
-void KMJobViewer::buildPrinterMenu(QPopupMenu *menu, bool use_all, bool use_specials)
+void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_specials)
{
loadPrinters();
menu->clear();
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
int i(0);
if (use_all)
{
@@ -379,11 +379,11 @@ void KMJobViewer::slotShowPrinterMenu()
void KMJobViewer::updateJobs()
{
- QPtrListIterator<JobItem> jit(m_items);
+ TQPtrListIterator<JobItem> jit(m_items);
for (;jit.current();++jit)
jit.current()->setDiscarded(true);
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
{
KMJob *j(it.current());
@@ -407,9 +407,9 @@ void KMJobViewer::updateJobs()
slotSelectionChanged();
}
-JobItem* KMJobViewer::findItem(const QString& uri)
+JobItem* KMJobViewer::findItem(const TQString& uri)
{
- QPtrListIterator<JobItem> it(m_items);
+ TQPtrListIterator<JobItem> it(m_items);
for (;it.current();++it)
if (it.current()->jobUri() == uri) return it.current();
return 0;
@@ -422,8 +422,8 @@ void KMJobViewer::slotSelectionChanged()
int thread(0);
bool completed(true), remote(false);
- QPtrListIterator<JobItem> it(m_items);
- QPtrList<KMJob> joblist;
+ TQPtrListIterator<JobItem> it(m_items);
+ TQPtrList<KMJob> joblist;
joblist.setAutoDelete(false);
for (;it.current();++it)
@@ -459,26 +459,26 @@ void KMJobViewer::slotSelectionChanged()
m_manager->validatePluginActions(actionCollection(), joblist);
}
-void KMJobViewer::jobSelection(QPtrList<KMJob>& l)
+void KMJobViewer::jobSelection(TQPtrList<KMJob>& l)
{
l.setAutoDelete(false);
- QPtrListIterator<JobItem> it(m_items);
+ TQPtrListIterator<JobItem> it(m_items);
for (;it.current();++it)
if (it.current()->isSelected())
l.append(it.current()->job());
}
-void KMJobViewer::send(int cmd, const QString& name, const QString& arg)
+void KMJobViewer::send(int cmd, const TQString& name, const TQString& arg)
{
KMTimer::self()->hold();
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
jobSelection(l);
if (!m_manager->sendCommand(l,cmd,arg))
{
KMessageBox::error(this,"<qt>"+i18n("Unable to perform action \"%1\" on selected jobs. Error received from manager:").arg(name)+"<p>"+KMManager::self()->errorMsg()+"</p></qt>");
// error reported, clean it
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
triggerRefresh();
@@ -515,7 +515,7 @@ void KMJobViewer::slotMove(int prID)
}
}
-void KMJobViewer::slotRightClicked(QListViewItem*,const QPoint& p,int)
+void KMJobViewer::slotRightClicked(TQListViewItem*,const TQPoint& p,int)
{
if (m_pop) m_pop->popup(p);
}
@@ -525,7 +525,7 @@ void KMJobViewer::loadPrinters()
m_printers.clear();
// retrieve printer list without reloading it (faster)
- QPtrListIterator<KMPrinter> it(*(KMFactory::self()->manager()->printerList(false)));
+ TQPtrListIterator<KMPrinter> it(*(KMFactory::self()->manager()->printerList(false)));
for (;it.current();++it)
{
// keep only real printers (no instance, no implicit) and special printers
@@ -594,25 +594,25 @@ void KMJobViewer::loadPluginActions()
}
}
- QValueList<KAction*> acts = m_manager->createPluginActions(actionCollection());
- for (QValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
+ TQValueList<KAction*> acts = m_manager->createPluginActions(actionCollection());
+ for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
{
// connect the action to this
- connect((*it), SIGNAL(activated(int)), SLOT(pluginActionActivated(int)));
+ connect((*it), TQT_SIGNAL(activated(int)), TQT_SLOT(pluginActionActivated(int)));
// should add it to the toolbar and menubar
(*it)->plug(toolBar(), toolbarindex++);
if (m_pop)
(*it)->plug(m_pop, mpopindex++);
if (menu)
- (*it)->plug(static_cast<QPopupMenu*>(menu), menuindex++);
+ (*it)->plug(static_cast<TQPopupMenu*>(menu), menuindex++);
}
}
void KMJobViewer::removePluginActions()
{
- QValueList<KAction*> acts = actionCollection()->actions("plugin");
- for (QValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
+ TQValueList<KAction*> acts = actionCollection()->actions("plugin");
+ for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
{
(*it)->unplugAll();
delete (*it);
@@ -653,7 +653,7 @@ void KMJobViewer::reload()
static_cast<KToggleAction*>(actionCollection()->action("view_completed"))->setChecked(false);
}
-void KMJobViewer::closeEvent(QCloseEvent *e)
+void KMJobViewer::closeEvent(TQCloseEvent *e)
{
if (m_standalone && !kapp->sessionSaving())
{
@@ -668,7 +668,7 @@ void KMJobViewer::pluginActionActivated(int ID)
{
KMTimer::self()->hold();
- QPtrList<KMJob> joblist;
+ TQPtrList<KMJob> joblist;
jobSelection(joblist);
if (!m_manager->doPluginAction(ID, joblist))
KMessageBox::error(this, "<qt>"+i18n("Operation failed.")+"<p>"+KMManager::self()->errorMsg()+"</p></qt>");
@@ -679,7 +679,7 @@ void KMJobViewer::pluginActionActivated(int ID)
void KMJobViewer::slotUserOnly(bool on)
{
- m_username = (on ? m_userfield->text() : QString::null);
+ m_username = (on ? m_userfield->text() : TQString::null);
refresh(false);
}
@@ -717,10 +717,10 @@ bool KMJobViewer::isSticky() const
return ( m_stickybox ? m_stickybox->isChecked() : false );
}
-void KMJobViewer::slotDropped( QDropEvent *e, QListViewItem* )
+void KMJobViewer::slotDropped( TQDropEvent *e, TQListViewItem* )
{
- QStringList files;
- QString target;
+ TQStringList files;
+ TQString target;
KURL::List uris;
KURLDrag::decode( e, uris );
diff --git a/kdeprint/management/kmjobviewer.h b/kdeprint/management/kmjobviewer.h
index 69a3f27d6..9cdf6aceb 100644
--- a/kdeprint/management/kmjobviewer.h
+++ b/kdeprint/management/kmjobviewer.h
@@ -50,19 +50,19 @@ class KDEPRINT_EXPORT KMJobViewer : public KMainWindow, public KMPrinterPage, pu
{
Q_OBJECT
public:
- KMJobViewer(QWidget *parent = 0, const char *name = 0);
+ KMJobViewer(TQWidget *parent = 0, const char *name = 0);
~KMJobViewer();
- void setPrinter(const QString& prname);
+ void setPrinter(const TQString& prname);
void setPrinter(KMPrinter *p);
void refresh(bool reload = false);
- QString printer() const;
+ TQString printer() const;
bool isSticky() const;
signals:
void jobsShown(KMJobViewer*, bool hasJobs);
void refreshClicked();
- void printerChanged(KMJobViewer*, const QString& prname);
+ void printerChanged(KMJobViewer*, const TQString& prname);
void viewerDestroyed(KMJobViewer*);
public slots:
@@ -74,7 +74,7 @@ protected slots:
void slotResume();
void slotRemove();
void slotRestart();
- void slotRightClicked(QListViewItem*,const QPoint&,int);
+ void slotRightClicked(TQListViewItem*,const TQPoint&,int);
void slotMove(int prID);
void slotPrinterSelected(int);
void slotShowCompleted(bool);
@@ -85,34 +85,34 @@ protected slots:
void slotUserOnly(bool);
void slotUserChanged();
void slotConfigure();
- void slotDropped( QDropEvent*, QListViewItem* );
+ void slotDropped( TQDropEvent*, TQListViewItem* );
protected:
void init();
void updateJobs();
void initActions();
- JobItem* findItem(const QString& uri);
- void jobSelection(QPtrList<KMJob>& l);
- void send(int cmd, const QString& name, const QString& arg = QString::null);
+ JobItem* findItem(const TQString& uri);
+ void jobSelection(TQPtrList<KMJob>& l);
+ void send(int cmd, const TQString& name, const TQString& arg = TQString::null);
void loadPrinters();
void loadPluginActions();
void removePluginActions();
void reload();
//void aboutToReload();
- void closeEvent(QCloseEvent*);
+ void closeEvent(TQCloseEvent*);
void triggerRefresh();
void addToManager();
void removeFromManager();
- void buildPrinterMenu(QPopupMenu *menu, bool use_all = false, bool use_specials = false);
+ void buildPrinterMenu(TQPopupMenu *menu, bool use_all = false, bool use_specials = false);
void updateCaption();
void updateStatusBar();
private:
KListView *m_view;
- QPtrList<KMJob> m_jobs;
- QPtrList<JobItem> m_items;
+ TQPtrList<KMJob> m_jobs;
+ TQPtrList<JobItem> m_items;
QPopupMenu *m_pop;
- QPtrList<KMPrinter> m_printers;
+ TQPtrList<KMPrinter> m_printers;
QString m_prname;
int m_type;
QString m_username;
@@ -121,7 +121,7 @@ private:
bool m_standalone;
};
-inline QString KMJobViewer::printer() const
+inline TQString KMJobViewer::printer() const
{ return m_prname; }
#endif
diff --git a/kdeprint/management/kmlistview.cpp b/kdeprint/management/kmlistview.cpp
index cbb1ca088..e754cfe1d 100644
--- a/kdeprint/management/kmlistview.cpp
+++ b/kdeprint/management/kmlistview.cpp
@@ -21,20 +21,20 @@
#include "kmprinter.h"
#include "kmobject.h"
-#include <qheader.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kcursor.h>
-class KMListViewItem : public QListViewItem, public KMObject
+class KMListViewItem : public TQListViewItem, public KMObject
{
public:
- KMListViewItem(QListView *parent, const QString& txt);
- KMListViewItem(QListViewItem *parent, const QString& txt);
- KMListViewItem(QListViewItem *parent, KMPrinter *p);
+ KMListViewItem(TQListView *parent, const TQString& txt);
+ KMListViewItem(TQListViewItem *parent, const TQString& txt);
+ KMListViewItem(TQListViewItem *parent, KMPrinter *p);
- virtual void paintCell(QPainter*, const QColorGroup&, int, int, int);
+ virtual void paintCell(TQPainter*, const TQColorGroup&, int, int, int);
void updatePrinter(KMPrinter *p);
bool isClass() const { return m_isclass; }
@@ -46,20 +46,20 @@ private:
bool m_isclass;
};
-KMListViewItem::KMListViewItem(QListView *parent, const QString& txt)
-: QListViewItem(parent,txt)
+KMListViewItem::KMListViewItem(TQListView *parent, const TQString& txt)
+: TQListViewItem(parent,txt)
{
init();
}
-KMListViewItem::KMListViewItem(QListViewItem *parent, const QString& txt)
-: QListViewItem(parent,txt)
+KMListViewItem::KMListViewItem(TQListViewItem *parent, const TQString& txt)
+: TQListViewItem(parent,txt)
{
init();
}
-KMListViewItem::KMListViewItem(QListViewItem *parent, KMPrinter *p)
-: QListViewItem(parent)
+KMListViewItem::KMListViewItem(TQListViewItem *parent, KMPrinter *p)
+: TQListViewItem(parent)
{
init(p);
}
@@ -92,7 +92,7 @@ void KMListViewItem::updatePrinter(KMPrinter *p)
repaint();
}
-void KMListViewItem::paintCell(QPainter *p, const QColorGroup& cg, int c, int w, int a)
+void KMListViewItem::paintCell(TQPainter *p, const TQColorGroup& cg, int c, int w, int a)
{
if (m_state != 0)
{
@@ -101,26 +101,26 @@ void KMListViewItem::paintCell(QPainter *p, const QColorGroup& cg, int c, int w,
if (m_state & 0x2) f.setItalic(true);
p->setFont(f);
}
- QListViewItem::paintCell(p,cg,c,w,a);
+ TQListViewItem::paintCell(p,cg,c,w,a);
}
//************************************************************************************************
-KMListView::KMListView(QWidget *parent, const char *name)
-: QListView(parent,name)
+KMListView::KMListView(TQWidget *parent, const char *name)
+: TQListView(parent,name)
{
m_items.setAutoDelete(false);
addColumn("");
header()->hide();
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setLineWidth(1);
setSorting(0);
- connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)),SLOT(slotRightButtonClicked(QListViewItem*,const QPoint&,int)));
- connect(this,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
- connect(this,SIGNAL(onItem(QListViewItem*)),SLOT(slotOnItem(QListViewItem*)));
- connect(this,SIGNAL(onViewport()),SLOT(slotOnViewport()));
+ connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)),TQT_SLOT(slotRightButtonClicked(TQListViewItem*,const TQPoint&,int)));
+ connect(this,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
+ connect(this,TQT_SIGNAL(onItem(TQListViewItem*)),TQT_SLOT(slotOnItem(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(onViewport()),TQT_SLOT(slotOnViewport()));
m_root = new KMListViewItem(this,i18n("Print System"));
m_root->setPixmap(0,SmallIcon("kdeprint_printer"));
@@ -142,16 +142,16 @@ KMListView::~KMListView()
{
}
-void KMListView::slotRightButtonClicked(QListViewItem *item, const QPoint& p, int)
+void KMListView::slotRightButtonClicked(TQListViewItem *item, const TQPoint& p, int)
{
- emit rightButtonClicked(item && item->depth() == 2 ? item->text(0) : QString::null, p);
+ emit rightButtonClicked(item && item->depth() == 2 ? item->text(0) : TQString::null, p);
}
KMListViewItem* KMListView::findItem(KMPrinter *p)
{
if (p)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
bool isVirtual(p->isVirtual()), isClass(p->isClass());
for (;it.current();++it)
if (isVirtual)
@@ -169,26 +169,26 @@ KMListViewItem* KMListView::findItem(KMPrinter *p)
return 0;
}
-KMListViewItem* KMListView::findItem(const QString& prname)
+KMListViewItem* KMListView::findItem(const TQString& prname)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (; it.current(); ++it)
if (it.current()->depth() == 2 && it.current()->text(0) == prname)
return it.current();
return 0;
}
-void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMListView::setPrinterList(TQPtrList<KMPrinter> *list)
{
bool changed(false);
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (;it.current();++it)
it.current()->setDiscarded(true);
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
KMListViewItem *item (0);
for (;it.current();++it)
{
@@ -213,7 +213,7 @@ void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
}
}
- QPtrList<KMListViewItem> deleteList;
+ TQPtrList<KMListViewItem> deleteList;
deleteList.setAutoDelete(true);
for (uint i=0; i<m_items.count(); i++)
if (m_items.at(i)->isDiscarded())
@@ -237,12 +237,12 @@ void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
void KMListView::slotSelectionChanged()
{
KMListViewItem *item = static_cast<KMListViewItem*>(currentItem());
- emit printerSelected((item && !item->isDiscarded() && item->depth() == 2 ? item->text(0) : QString::null));
+ emit printerSelected((item && !item->isDiscarded() && item->depth() == 2 ? item->text(0) : TQString::null));
}
-void KMListView::setPrinter(const QString& prname)
+void KMListView::setPrinter(const TQString& prname)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (;it.current();++it)
if (it.current()->text(0) == prname)
{
@@ -253,10 +253,10 @@ void KMListView::setPrinter(const QString& prname)
void KMListView::setPrinter(KMPrinter *p)
{
- setPrinter(p ? p->name() : QString::null);
+ setPrinter(p ? p->name() : TQString::null);
}
-void KMListView::slotOnItem(QListViewItem *)
+void KMListView::slotOnItem(TQListViewItem *)
{
setCursor(KCursor::handCursor());
}
diff --git a/kdeprint/management/kmlistview.h b/kdeprint/management/kmlistview.h
index 9e5ce6651..e9a6b29e5 100644
--- a/kdeprint/management/kmlistview.h
+++ b/kdeprint/management/kmlistview.h
@@ -20,8 +20,8 @@
#ifndef KMLISTVIEW_H
#define KMLISTVIEW_H
-#include <qlistview.h>
-#include <qptrlist.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
class KMListViewItem;
class KMPrinter;
@@ -30,29 +30,29 @@ class KMListView : public QListView
{
Q_OBJECT
public:
- KMListView(QWidget *parent = 0, const char *name = 0);
+ KMListView(TQWidget *parent = 0, const char *name = 0);
~KMListView();
- void setPrinterList(QPtrList<KMPrinter> *list);
- void setPrinter(const QString&);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
+ void setPrinter(const TQString&);
void setPrinter(KMPrinter*);
signals:
- void rightButtonClicked(const QString&, const QPoint&);
- void printerSelected(const QString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
+ void printerSelected(const TQString&);
protected slots:
- void slotRightButtonClicked(QListViewItem*, const QPoint&, int);
+ void slotRightButtonClicked(TQListViewItem*, const TQPoint&, int);
void slotSelectionChanged();
- void slotOnItem(QListViewItem*);
+ void slotOnItem(TQListViewItem*);
void slotOnViewport();
protected:
KMListViewItem* findItem(KMPrinter*);
- KMListViewItem* findItem(const QString&);
+ KMListViewItem* findItem(const TQString&);
private:
- QPtrList<KMListViewItem> m_items;
+ TQPtrList<KMListViewItem> m_items;
KMListViewItem *m_root, *m_classes, *m_printers, *m_specials;
};
diff --git a/kdeprint/management/kmmainview.cpp b/kdeprint/management/kmmainview.cpp
index 3bb20a99e..0e53f2757 100644
--- a/kdeprint/management/kmmainview.cpp
+++ b/kdeprint/management/kmmainview.cpp
@@ -35,13 +35,13 @@
#include "kiconselectaction.h"
#include "messagewindow.h"
-#include <qdockarea.h>
+#include <tqdockarea.h>
#include <kmenubar.h>
-#include <qtimer.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqtimer.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <kmessagebox.h>
#include <kaction.h>
#include <klocale.h>
@@ -59,7 +59,7 @@
#undef m_manager
#define m_manager KMFactory::self()->manager()
-int kdeprint_management_add_printer_wizard( QWidget* parent )
+int kdeprint_management_add_printer_wizard( TQWidget* parent )
{
KMWizard dlg(parent);
int flag(0);
@@ -77,8 +77,8 @@ int kdeprint_management_add_printer_wizard( QWidget* parent )
return flag;
}
-KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *coll)
-: QWidget(parent, name)
+KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *coll)
+: TQWidget(parent, name)
{
m_current = 0;
m_first = true;
@@ -86,7 +86,7 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
// create widgets
m_printerview = new KMPrinterView(this, "PrinterView");
m_printerpages = new KMPages(this, "PrinterPages");
- m_pop = new QPopupMenu(this);
+ m_pop = new TQPopupMenu(this);
m_toolbar = new KToolBar(this, "ToolBar");
m_toolbar->setMovingEnabled(false);
m_plugin = new PluginComboBox(this, "Plugin");
@@ -99,10 +99,10 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
m_menubar->setMovingEnabled( false );
// layout
- QVBoxLayout *m_layout = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *m_layout = new TQVBoxLayout(this, 0, 0);
m_layout->addWidget(m_toolbar);
m_layout->addWidget( m_menubar );
- m_boxlayout = new QBoxLayout(QBoxLayout::TopToBottom, 0, 0);
+ m_boxlayout = new TQBoxLayout(TQBoxLayout::TopToBottom, 0, 0);
m_layout->addLayout(m_boxlayout);
m_boxlayout->addWidget(m_printerview);
m_boxlayout->addWidget(m_printerpages);
@@ -110,12 +110,12 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
m_layout->addWidget(m_plugin, 0);
// connections
- connect(KMTimer::self(),SIGNAL(timeout()),SLOT(slotTimer()));
- connect(m_printerview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
- connect(m_printerview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SLOT(slotRightButtonClicked(const QString&,const QPoint&)));
- connect(m_pop,SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(m_pop,SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect( m_manager, SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect(KMTimer::self(),TQT_SIGNAL(timeout()),TQT_SLOT(slotTimer()));
+ connect(m_printerview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
+ connect(m_printerview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SLOT(slotRightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_pop,TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(m_pop,TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
// actions
if (coll)
@@ -176,64 +176,64 @@ void KMMainView::initActions()
KIconSelectAction *vact = new KIconSelectAction(i18n("&View"),0,m_actions,"view_change");
QStringList iconlst;
iconlst << "view_icon" << "view_detailed" << "view_tree";
- vact->setItems(QStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
+ vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
vact->setCurrentItem(0);
- connect(vact,SIGNAL(activated(int)),SLOT(slotChangeView(int)));
+ connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int)));
KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "kdeprint_printstate", m_actions, "printer_state_change");
stateAct->setDelayed(false);
- stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_start"));
- stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
+ stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start"));
+ stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "kdeprint_queuestate", m_actions, "printer_spool_change");
stateAct->setDelayed(false);
- stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
- stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
-
- new KAction(i18n("&Remove"),"edittrash",0,this,SLOT(slotRemove()),m_actions,"printer_remove");
- new KAction(i18n("&Configure..."),"configure",0,this,SLOT(slotConfigure()),m_actions,"printer_configure");
- new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,this,SLOT(slotAdd()),m_actions,"printer_add");
- new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,this,SLOT(slotAddSpecial()),m_actions,"printer_add_special");
- new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,this,SLOT(slotHardDefault()),m_actions,"printer_hard_default");
- new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,this,SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
- new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,this,SLOT(slotTest()),m_actions,"printer_test");
- new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,this,SLOT(slotManagerConfigure()),m_actions,"manager_configure");
- new KAction(i18n("Initialize Manager/&View"),"reload",0,this,SLOT(slotInit()),m_actions,"view_refresh");
+ stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
+ stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
+
+ new KAction(i18n("&Remove"),"edittrash",0,this,TQT_SLOT(slotRemove()),m_actions,"printer_remove");
+ new KAction(i18n("&Configure..."),"configure",0,this,TQT_SLOT(slotConfigure()),m_actions,"printer_configure");
+ new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,this,TQT_SLOT(slotAdd()),m_actions,"printer_add");
+ new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,this,TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special");
+ new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,this,TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default");
+ new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,this,TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
+ new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,this,TQT_SLOT(slotTest()),m_actions,"printer_test");
+ new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,this,TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
+ new KAction(i18n("Initialize Manager/&View"),"reload",0,this,TQT_SLOT(slotInit()),m_actions,"view_refresh");
KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change");
iconlst.clear();
iconlst << "view_top_bottom" << "view_left_right";
- dact->setItems(QStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
+ dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
dact->setCurrentItem(0);
- connect(dact,SIGNAL(activated(int)),SLOT(slotChangeDirection(int)));
+ connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int)));
- new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,SLOT(slotServerRestart()),m_actions,"server_restart");
- new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,SLOT(slotServerConfigure()),m_actions,"server_configure");
- new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure");
+ new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,TQT_SLOT(slotServerRestart()),m_actions,"server_restart");
+ new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerConfigure()),m_actions,"server_configure");
+ new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure");
KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar");
tact->setCheckedState(i18n("Hide &Toolbar"));
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotToggleToolBar(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool)));
tact = new KToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" );
tact->setCheckedState(i18n("Hide Me&nu Toolbar"));
- connect( tact, SIGNAL( toggled( bool ) ), SLOT( slotToggleMenuBar( bool ) ) );
+ connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) );
tact = new KToggleAction(i18n("Show Pr&inter Details"),"kdeprint_printer_infos", 0,m_actions,"view_printerinfos");
tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"kdeprint_printer_infos"));
tact->setChecked(true);
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotShowPrinterInfos(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool)));
tact = new KToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter");
tact->setChecked(KMManager::self()->isFilterEnabled());
- connect(tact, SIGNAL(toggled(bool)), SLOT(slotToggleFilter(bool)));
+ connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));
- new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, this, SLOT( slotHelp() ), m_actions, "invoke_help" );
- new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, this, SLOT( slotHelp() ), m_actions, "invoke_web" );
+ new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_help" );
+ new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_web" );
KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool");
mact->setDelayed(false);
- connect(mact->popupMenu(), SIGNAL(activated(int)), SLOT(slotToolSelected(int)));
+ connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int)));
QStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/tools/*.desktop");
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KSimpleConfig conf(*it);
conf.setGroup("Desktop Entry");
@@ -269,13 +269,13 @@ void KMMainView::initActions()
m_actions->action("view_pfilter")->plug(m_toolbar);
// add actions to the menu bar
- QPopupMenu *menu = new QPopupMenu( this );
+ TQPopupMenu *menu = new TQPopupMenu( this );
m_actions->action( "printer_add" )->plug( menu );
m_actions->action( "printer_add_special" )->plug( menu );
//m_menubar->insertItem( i18n( "Add" ), menu );
m_menubar->insertButton( "wizard", 0, true, i18n( "Add" ) );
m_menubar->getButton( 0 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("printer_state_change")->plug( menu );
m_actions->action("printer_spool_change")->plug( menu );
menu->insertSeparator();
@@ -290,19 +290,19 @@ void KMMainView::initActions()
//m_menubar->insertItem( i18n( "Printer" ), menu );
m_menubar->insertButton( "printer1", 1, true, i18n( "Printer" ) );
m_menubar->getButton( 1 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("server_restart")->plug( menu );
m_actions->action("server_configure")->plug( menu );
//m_menubar->insertItem( i18n( "Server" ), menu );
m_menubar->insertButton( "misc", 2, true, i18n( "Print Server" ) );
m_menubar->getButton( 2 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("manager_configure")->plug( menu );
m_actions->action("view_refresh")->plug( menu );
//m_menubar->insertItem( i18n( "Manager" ), menu );
m_menubar->insertButton( "kdeprint_configmgr", 3, true, i18n( "Print Manager" ) );
m_menubar->getButton( 3 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("view_printerinfos")->plug( menu );
m_actions->action("view_change")->plug( menu );
m_actions->action("orientation_change")->plug( menu );
@@ -314,14 +314,14 @@ void KMMainView::initActions()
m_menubar->insertButton( "view_remove", 4, true, i18n( "View" ) );
m_menubar->getButton( 4 )->setPopup( menu, true );
//m_menubar->setMinimumHeight( m_menubar->heightForWidth( 1000 ) );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action( "invoke_help" )->plug( menu );
m_actions->action( "invoke_web" )->plug( menu );
m_menubar->insertButton( "help", 5, true, i18n( "Documentation" ) );
m_menubar->getButton( 5 )->setPopup( menu, true );
loadPluginActions();
- slotPrinterSelected(QString::null);
+ slotPrinterSelected(TQString::null);
}
void KMMainView::slotRefresh()
@@ -332,7 +332,7 @@ void KMMainView::slotRefresh()
void KMMainView::slotTimer()
{
kdDebug() << "KMMainView::slotTimer" << endl;
- QPtrList<KMPrinter> *printerlist = m_manager->printerList();
+ TQPtrList<KMPrinter> *printerlist = m_manager->printerList();
bool ok = m_manager->errorMsg().isEmpty();
m_printerview->setPrinterList(printerlist);
if ( m_first )
@@ -346,7 +346,7 @@ void KMMainView::slotTimer()
* - hard default printer
* - first printer
*/
- QPtrListIterator<KMPrinter> it( *printerlist );
+ TQPtrListIterator<KMPrinter> it( *printerlist );
KMPrinter *p1 = 0, *p2 = 0, *p3 = 0;
while ( it.current() )
{
@@ -371,7 +371,7 @@ void KMMainView::slotTimer()
}
}
-void KMMainView::slotPrinterSelected(const QString& prname)
+void KMMainView::slotPrinterSelected(const TQString& prname)
{
KMPrinter *p = KMManager::self()->findPrinter(prname);
m_current = p;
@@ -425,7 +425,7 @@ void KMMainView::slotChangeView(int ID)
m_printerview->setViewType((KMPrinterView::ViewType)ID);
}
-void KMMainView::slotRightButtonClicked(const QString& prname, const QPoint& p)
+void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p)
{
KMPrinter *printer = KMManager::self()->findPrinter(prname);
// construct popup menu
@@ -467,8 +467,8 @@ void KMMainView::slotRightButtonClicked(const QString& prname, const QPoint& p)
}
if (!printer->isSpecial())
{
- QValueList<KAction*> pactions = m_actions->actions("plugin");
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
(*it)->plug(m_pop);
if (pactions.count() > 0)
m_pop->insertSeparator();
@@ -608,7 +608,7 @@ void KMMainView::slotSoftDefault()
if (m_current)
{
KMTimer::self()->hold();
- KMFactory::self()->virtualManager()->setAsDefault(m_current,QString::null);
+ KMFactory::self()->virtualManager()->setAsDefault(m_current,TQString::null);
KMTimer::self()->release(true);
}
}
@@ -621,11 +621,11 @@ void KMMainView::setOrientation(int o)
}
int KMMainView::orientation() const
-{ return (m_boxlayout->direction() == QBoxLayout::LeftToRight ? Qt::Horizontal : Qt::Vertical); }
+{ return (m_boxlayout->direction() == TQBoxLayout::LeftToRight ? Qt::Horizontal : Qt::Vertical); }
void KMMainView::slotChangeDirection(int d)
{
- m_boxlayout->setDirection(d == 1 ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom);
+ m_boxlayout->setDirection(d == 1 ? TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom);
}
void KMMainView::slotTest()
@@ -633,7 +633,7 @@ void KMMainView::slotTest()
if (m_current)
{
KMTimer::self()->hold();
- if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(m_current->printerName()), QString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(m_current->printerName()), TQString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
{
if (KMFactory::self()->manager()->testPrinter(m_current))
KMessageBox::information(this,i18n("Test page successfully sent to printer %1.").arg(m_current->printerName()));
@@ -644,7 +644,7 @@ void KMMainView::slotTest()
}
}
-void KMMainView::showErrorMsg(const QString& msg, bool usemgr)
+void KMMainView::showErrorMsg(const TQString& msg, bool usemgr)
{
QString s(msg);
if (usemgr)
@@ -657,7 +657,7 @@ void KMMainView::showErrorMsg(const QString& msg, bool usemgr)
else
s = s.arg(m_manager->errorMsg());
// clean up error message
- m_manager->setErrorMsg(QString::null);
+ m_manager->setErrorMsg(TQString::null);
}
s.prepend("<qt>").append("</qt>");
KMTimer::self()->hold();
@@ -783,7 +783,7 @@ void KMMainView::reload()
loadPluginActions();
// redo the connection as the old manager object has been removed
- connect( m_manager, SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
// We must delay the refresh such that all objects has been
// correctly reloaded (otherwise, crash in KMJobViewer).
@@ -804,11 +804,11 @@ bool KMMainView::printerInfosShown() const
void KMMainView::loadPluginActions()
{
KMFactory::self()->manager()->createPluginActions(m_actions);
- QValueList<KAction*> pactions = m_actions->actions("plugin");
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
int index = m_pactionsindex;
- //QPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup();
- QPopupMenu *menu = m_menubar->getButton( 1 )->popup();
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ //TQPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup();
+ TQPopupMenu *menu = m_menubar->getButton( 1 )->popup();
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
{
(*it)->plug(m_toolbar, index++);
( *it )->plug( menu );
@@ -817,8 +817,8 @@ void KMMainView::loadPluginActions()
void KMMainView::removePluginActions()
{
- QValueList<KAction*> pactions = m_actions->actions("plugin");
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
{
(*it)->unplugAll();
delete (*it);
@@ -874,7 +874,7 @@ void KMMainView::slotUpdatePossible( bool flag )
KMTimer::self()->release( true );
}
-void KMMainView::createMessageWindow( const QString& txt, int delay )
+void KMMainView::createMessageWindow( const TQString& txt, int delay )
{
destroyMessageWindow();
MessageWindow::add( m_printerview, txt, delay );
@@ -890,7 +890,7 @@ void KMMainView::slotInit()
reset( i18n( "Initializing manager..." ), true, true );
}
-void KMMainView::reset( const QString& msg, bool useDelay, bool holdTimer )
+void KMMainView::reset( const TQString& msg, bool useDelay, bool holdTimer )
{
if ( holdTimer )
KMTimer::self()->hold();
@@ -903,12 +903,12 @@ void KMMainView::reset( const QString& msg, bool useDelay, bool holdTimer )
void KMMainView::slotHelp()
{
- QString s = sender()->name();
+ TQString s = sender()->name();
if ( s == "invoke_help" )
- kapp->invokeHelp( QString::null, "kdeprint" );
+ kapp->invokeHelp( TQString::null, "kdeprint" );
else if ( s == "invoke_web" )
{
- QStringList args;
+ TQStringList args;
args << "exec" << "http://printing.kde.org";
kapp->kdeinitExec( "kfmclient", args );
}
diff --git a/kdeprint/management/kmmainview.h b/kdeprint/management/kmmainview.h
index 2e521e50f..f8ab6a388 100644
--- a/kdeprint/management/kmmainview.h
+++ b/kdeprint/management/kmmainview.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdeprint/kpreloadobject.h>
#include <kmainwindow.h>
@@ -50,11 +50,11 @@ class QMenuBar;
* if you're a KDEPrint developer. The API might change in the
* future and binary compatibility might be broken.
*/
-class KDEPRINT_EXPORT KMMainView : public QWidget, public KPReloadObject
+class KDEPRINT_EXPORT KMMainView : public TQWidget, public KPReloadObject
{
Q_OBJECT
public:
- KMMainView(QWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
+ KMMainView(TQWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
~KMMainView();
void setOrientation(int);
@@ -87,8 +87,8 @@ public slots:
void slotHelp();
protected slots:
- void slotPrinterSelected(const QString&);
- void slotRightButtonClicked(const QString&, const QPoint&);
+ void slotPrinterSelected(const TQString&);
+ void slotRightButtonClicked(const TQString&, const TQPoint&);
void slotToggleToolBar(bool);
void slotToggleMenuBar(bool);
void slotChangeView(int);
@@ -98,7 +98,7 @@ protected slots:
protected:
void initActions();
- void showErrorMsg(const QString& msg, bool usemgr = true);
+ void showErrorMsg(const TQString& msg, bool usemgr = true);
void restoreSettings();
void saveSettings();
void loadParameters();
@@ -107,9 +107,9 @@ protected:
//void aboutToReload();
void loadPluginActions();
void removePluginActions();
- void createMessageWindow( const QString&, int delay = 500 );
+ void createMessageWindow( const TQString&, int delay = 500 );
void destroyMessageWindow();
- void reset( const QString& msg = QString::null, bool useDelay = true, bool holdTimer = true );
+ void reset( const TQString& msg = TQString::null, bool useDelay = true, bool holdTimer = true );
private:
KMPrinterView *m_printerview;
@@ -128,6 +128,6 @@ private:
KToolBar *m_menubar;
};
-KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( QWidget* parent );
+KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( TQWidget* parent );
#endif
diff --git a/kdeprint/management/kmpages.cpp b/kdeprint/management/kmpages.cpp
index 9387b33a0..be7f2f87a 100644
--- a/kdeprint/management/kmpages.cpp
+++ b/kdeprint/management/kmpages.cpp
@@ -27,8 +27,8 @@
#include <kiconloader.h>
#include <kdialog.h>
-KMPages::KMPages(QWidget *parent, const char *name)
-: QTabWidget(parent,name)
+KMPages::KMPages(TQWidget *parent, const char *name)
+: TQTabWidget(parent,name)
{
m_pages.setAutoDelete(false);
initialize();
@@ -40,7 +40,7 @@ KMPages::~KMPages()
void KMPages::setPrinter(KMPrinter *p)
{
- QPtrListIterator<KMPrinterPage> it(m_pages);
+ TQPtrListIterator<KMPrinterPage> it(m_pages);
for (int i=0;it.current();++it,i++)
it.current()->setPrinter(p);
}
diff --git a/kdeprint/management/kmpages.h b/kdeprint/management/kmpages.h
index 5af1da108..e300aa998 100644
--- a/kdeprint/management/kmpages.h
+++ b/kdeprint/management/kmpages.h
@@ -20,8 +20,8 @@
#ifndef KMPAGES_H
#define KMPAGES_H
-#include <qtabwidget.h>
-#include <qptrlist.h>
+#include <tqtabwidget.h>
+#include <tqptrlist.h>
class KMPrinter;
class KMPrinterPage;
@@ -29,7 +29,7 @@ class KMPrinterPage;
class KMPages : public QTabWidget
{
public:
- KMPages(QWidget *parent = 0, const char *name = 0);
+ KMPages(TQWidget *parent = 0, const char *name = 0);
~KMPages();
void setPrinter(KMPrinter *p);
@@ -38,7 +38,7 @@ protected:
void initialize();
private:
- QPtrList<KMPrinterPage> m_pages;
+ TQPtrList<KMPrinterPage> m_pages;
};
#endif
diff --git a/kdeprint/management/kmprinterview.cpp b/kdeprint/management/kmprinterview.cpp
index 89549ed94..794683f54 100644
--- a/kdeprint/management/kmprinterview.cpp
+++ b/kdeprint/management/kmprinterview.cpp
@@ -24,37 +24,37 @@
#include "kmtimer.h"
#include "kmmanager.h"
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <klocale.h>
-KMPrinterView::KMPrinterView(QWidget *parent, const char *name)
-: QWidgetStack(parent,name), m_type(KMPrinterView::Icons)
+KMPrinterView::KMPrinterView(TQWidget *parent, const char *name)
+: TQWidgetStack(parent,name), m_type(KMPrinterView::Icons)
{
m_iconview = new KMIconView(this);
addWidget(m_iconview,0);
m_listview = new KMListView(this);
addWidget(m_listview,1);
- m_current = QString::null;
+ m_current = TQString::null;
m_listset = false;
- connect(m_iconview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SIGNAL(rightButtonClicked(const QString&,const QPoint&)));
- connect(m_listview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SIGNAL(rightButtonClicked(const QString&,const QPoint&)));
- connect(m_iconview,SIGNAL(printerSelected(const QString&)),SIGNAL(printerSelected(const QString&)));
- connect(m_listview,SIGNAL(printerSelected(const QString&)),SIGNAL(printerSelected(const QString&)));
- connect(m_iconview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
- connect(m_listview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
+ connect(m_iconview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_listview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_iconview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SIGNAL(printerSelected(const TQString&)));
+ connect(m_listview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SIGNAL(printerSelected(const TQString&)));
+ connect(m_iconview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
+ connect(m_listview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
setViewType(m_type);
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
}
KMPrinterView::~KMPrinterView()
{
}
-void KMPrinterView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMPrinterView::setPrinterList(TQPtrList<KMPrinter> *list)
{
if (m_type != KMPrinterView::Tree || list == 0)
m_iconview->setPrinterList(list);
@@ -100,14 +100,14 @@ void KMPrinterView::setViewType(ViewType t)
}
}
-void KMPrinterView::slotPrinterSelected(const QString& p)
+void KMPrinterView::slotPrinterSelected(const TQString& p)
{
m_current = p;
}
-QSize KMPrinterView::minimumSizeHint() const
+TQSize KMPrinterView::minimumSizeHint() const
{
- return QWidgetStack::minimumSizeHint();
+ return TQWidgetStack::minimumSizeHint();
}
#include "kmprinterview.moc"
diff --git a/kdeprint/management/kmprinterview.h b/kdeprint/management/kmprinterview.h
index 394ff7f19..0b8c30c23 100644
--- a/kdeprint/management/kmprinterview.h
+++ b/kdeprint/management/kmprinterview.h
@@ -20,8 +20,8 @@
#ifndef KMPRINTERVIEW_H
#define KMPRINTERVIEW_H
-#include <qwidgetstack.h>
-#include <qptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqptrlist.h>
class KMIconView;
class KMListView;
@@ -34,22 +34,22 @@ class KMPrinterView : public QWidgetStack
public:
enum ViewType { Icons = 0, List, Tree };
- KMPrinterView(QWidget *parent = 0, const char *name = 0);
+ KMPrinterView(TQWidget *parent = 0, const char *name = 0);
~KMPrinterView();
- void setPrinterList(QPtrList<KMPrinter> *list);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
void setPrinter( KMPrinter* );
void setViewType(ViewType t);
ViewType viewType() const { return m_type; }
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
signals:
- void printerSelected(const QString&);
- void rightButtonClicked(const QString&, const QPoint&);
+ void printerSelected(const TQString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
protected slots:
- void slotPrinterSelected(const QString&);
+ void slotPrinterSelected(const TQString&);
private:
KMIconView *m_iconview;
diff --git a/kdeprint/management/kmpropbackend.cpp b/kdeprint/management/kmpropbackend.cpp
index bf92e7fdc..ea6434563 100644
--- a/kdeprint/management/kmpropbackend.cpp
+++ b/kdeprint/management/kmpropbackend.cpp
@@ -21,21 +21,21 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropBackend::KMPropBackend(QWidget *parent, const char *name)
+KMPropBackend::KMPropBackend(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_uri = new QLabel("",this);
- m_type = new QLabel("",this);
+ m_uri = new TQLabel("",this);
+ m_type = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Printer type:"), this);
- QLabel *l2 = new QLabel(i18n("URI:"), this);
+ QLabel *l1 = new TQLabel(i18n("Printer type:"), this);
+ QLabel *l2 = new TQLabel(i18n("URI:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
diff --git a/kdeprint/management/kmpropbackend.h b/kdeprint/management/kmpropbackend.h
index fb8c299d8..ffdd15513 100644
--- a/kdeprint/management/kmpropbackend.h
+++ b/kdeprint/management/kmpropbackend.h
@@ -29,7 +29,7 @@ class QLabel;
class KDEPRINT_EXPORT KMPropBackend : public KMPropWidget
{
public:
- KMPropBackend(QWidget *parent = 0, const char *name = 0);
+ KMPropBackend(TQWidget *parent = 0, const char *name = 0);
~KMPropBackend();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropcontainer.cpp b/kdeprint/management/kmpropcontainer.cpp
index cc55aa901..90be6da19 100644
--- a/kdeprint/management/kmpropcontainer.cpp
+++ b/kdeprint/management/kmpropcontainer.cpp
@@ -21,13 +21,13 @@
#include "kmpropwidget.h"
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kseparator.h>
#include <kguiitem.h>
-KMPropContainer::KMPropContainer(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMPropContainer::KMPropContainer(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(5);
@@ -35,8 +35,8 @@ KMPropContainer::KMPropContainer(QWidget *parent, const char *name)
m_button = new KPushButton(KGuiItem(i18n("Change..."), "edit"), this);
m_widget = 0;
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *btn_ = new QHBoxLayout(0, 0, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 0);
main_->addWidget(sep,0);
main_->addLayout(btn_,0);
btn_->addStretch(1);
@@ -52,11 +52,11 @@ void KMPropContainer::setWidget(KMPropWidget *w)
if (!m_widget)
{
m_widget = w;
- m_widget->reparent(this,QPoint(0,0));
- connect(m_button,SIGNAL(clicked()),m_widget,SLOT(slotChange()));
- connect(m_widget,SIGNAL(enable(bool)),SIGNAL(enable(bool)));
- connect(m_widget,SIGNAL(enableChange(bool)),SLOT(slotEnableChange(bool)));
- QVBoxLayout *lay = dynamic_cast<QVBoxLayout*>(layout());
+ m_widget->reparent(this,TQPoint(0,0));
+ connect(m_button,TQT_SIGNAL(clicked()),m_widget,TQT_SLOT(slotChange()));
+ connect(m_widget,TQT_SIGNAL(enable(bool)),TQT_SIGNAL(enable(bool)));
+ connect(m_widget,TQT_SIGNAL(enableChange(bool)),TQT_SLOT(slotEnableChange(bool)));
+ QVBoxLayout *lay = dynamic_cast<TQVBoxLayout*>(layout());
if (lay)
{
lay->insertWidget(0,m_widget,1);
diff --git a/kdeprint/management/kmpropcontainer.h b/kdeprint/management/kmpropcontainer.h
index 95d7cb57a..00b125067 100644
--- a/kdeprint/management/kmpropcontainer.h
+++ b/kdeprint/management/kmpropcontainer.h
@@ -20,7 +20,7 @@
#ifndef KMPROPCONTAINER_H
#define KMPROPCONTAINER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KMPropWidget;
class QPushButton;
@@ -30,7 +30,7 @@ class KMPropContainer : public QWidget
{
Q_OBJECT
public:
- KMPropContainer(QWidget *parent = 0, const char *name = 0);
+ KMPropContainer(TQWidget *parent = 0, const char *name = 0);
~KMPropContainer();
void setWidget(KMPropWidget*);
diff --git a/kdeprint/management/kmpropdriver.cpp b/kdeprint/management/kmpropdriver.cpp
index 8298ee8a8..6b88f63ea 100644
--- a/kdeprint/management/kmpropdriver.cpp
+++ b/kdeprint/management/kmpropdriver.cpp
@@ -21,24 +21,24 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropDriver::KMPropDriver(QWidget *parent, const char *name)
+KMPropDriver::KMPropDriver(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_manufacturer = new QLabel("",this);
- m_model = new QLabel("",this);
- m_driverinfo = new QLabel("",this);
+ m_manufacturer = new TQLabel("",this);
+ m_model = new TQLabel("",this);
+ m_driverinfo = new TQLabel("",this);
m_driverinfo->setTextFormat(Qt::RichText);
- QLabel *l1 = new QLabel(i18n("Manufacturer:"), this);
- QLabel *l2 = new QLabel(i18n("Printer model:"), this);
- QLabel *l3 = new QLabel(i18n("Driver info:"), this);
+ QLabel *l1 = new TQLabel(i18n("Manufacturer:"), this);
+ QLabel *l2 = new TQLabel(i18n("Printer model:"), this);
+ QLabel *l3 = new TQLabel(i18n("Driver info:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
diff --git a/kdeprint/management/kmpropdriver.h b/kdeprint/management/kmpropdriver.h
index 9c07fe727..40952162c 100644
--- a/kdeprint/management/kmpropdriver.h
+++ b/kdeprint/management/kmpropdriver.h
@@ -29,7 +29,7 @@ class QLabel;
class KDEPRINT_EXPORT KMPropDriver : public KMPropWidget
{
public:
- KMPropDriver(QWidget *parent = 0, const char *name = 0);
+ KMPropDriver(TQWidget *parent = 0, const char *name = 0);
~KMPropDriver();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropertypage.cpp b/kdeprint/management/kmpropertypage.cpp
index aa8f61663..19461e258 100644
--- a/kdeprint/management/kmpropertypage.cpp
+++ b/kdeprint/management/kmpropertypage.cpp
@@ -26,10 +26,10 @@
#include "kmpropgeneral.h"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kiconloader.h>
-KMPropertyPage::KMPropertyPage(QWidget *parent, const char *name)
+KMPropertyPage::KMPropertyPage(TQWidget *parent, const char *name)
: CJanusWidget(parent,name)
{
m_widgets.setAutoDelete(false);
@@ -43,7 +43,7 @@ KMPropertyPage::~KMPropertyPage()
void KMPropertyPage::setPrinter(KMPrinter *p)
{
- QPtrListIterator<KMPropWidget> it(m_widgets);
+ TQPtrListIterator<KMPropWidget> it(m_widgets);
for (;it.current();++it)
it.current()->setPrinterBase(p);
}
@@ -55,9 +55,9 @@ void KMPropertyPage::addPropPage(KMPropWidget *w)
m_widgets.append(w);
KMPropContainer *ctn = new KMPropContainer(this,"Container");
ctn->setWidget(w);
- connect(ctn,SIGNAL(enable(bool)),SLOT(slotEnable(bool)));
+ connect(ctn,TQT_SIGNAL(enable(bool)),TQT_SLOT(slotEnable(bool)));
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
w->pixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
@@ -68,7 +68,7 @@ void KMPropertyPage::addPropPage(KMPropWidget *w)
void KMPropertyPage::slotEnable(bool on)
{
- QWidget *w = (QWidget*)(sender());
+ QWidget *w = (TQWidget*)(sender());
if (on)
enablePage(w);
else
diff --git a/kdeprint/management/kmpropertypage.h b/kdeprint/management/kmpropertypage.h
index 7f2f1c074..5698beff8 100644
--- a/kdeprint/management/kmpropertypage.h
+++ b/kdeprint/management/kmpropertypage.h
@@ -24,7 +24,7 @@
#include "kmprinterpage.h"
#include <kdeprint/kpreloadobject.h>
#include <kdelibs_export.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KMPropWidget;
class KMPrinter;
@@ -33,7 +33,7 @@ class KDEPRINT_EXPORT KMPropertyPage : public CJanusWidget, public KMPrinterPage
{
Q_OBJECT
public:
- KMPropertyPage(QWidget *parent = 0, const char *name = 0);
+ KMPropertyPage(TQWidget *parent = 0, const char *name = 0);
~KMPropertyPage();
void addPropPage(KMPropWidget*);
@@ -47,7 +47,7 @@ protected:
void reload();
private:
- QPtrList<KMPropWidget> m_widgets;
+ TQPtrList<KMPropWidget> m_widgets;
};
#endif
diff --git a/kdeprint/management/kmpropgeneral.cpp b/kdeprint/management/kmpropgeneral.cpp
index cea16bd5d..1c9389941 100644
--- a/kdeprint/management/kmpropgeneral.cpp
+++ b/kdeprint/management/kmpropgeneral.cpp
@@ -23,23 +23,23 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropGeneral::KMPropGeneral(QWidget *parent, const char *name)
+KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_name = new QLabel("",this);
- m_location = new QLabel("",this);
- m_description = new QLabel("",this);
+ m_name = new TQLabel("",this);
+ m_location = new TQLabel("",this);
+ m_description = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Printer name:"), this);
- QLabel *l2 = new QLabel(i18n("Physical Location", "Location:"), this);
- QLabel *l3 = new QLabel(i18n("Description:"), this);
+ QLabel *l1 = new TQLabel(i18n("Printer name:"), this);
+ QLabel *l2 = new TQLabel(i18n("Physical Location", "Location:"), this);
+ QLabel *l3 = new TQLabel(i18n("Description:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
diff --git a/kdeprint/management/kmpropgeneral.h b/kdeprint/management/kmpropgeneral.h
index 4fad67996..76bdc3171 100644
--- a/kdeprint/management/kmpropgeneral.h
+++ b/kdeprint/management/kmpropgeneral.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropGeneral : public KMPropWidget
{
public:
- KMPropGeneral(QWidget *parent = 0, const char *name = 0);
+ KMPropGeneral(TQWidget *parent = 0, const char *name = 0);
~KMPropGeneral();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropmembers.cpp b/kdeprint/management/kmpropmembers.cpp
index 958ee763b..775c71f89 100644
--- a/kdeprint/management/kmpropmembers.cpp
+++ b/kdeprint/management/kmpropmembers.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qtextview.h>
-#include <qlayout.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropMembers::KMPropMembers(QWidget *parent, const char *name)
+KMPropMembers::KMPropMembers(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_members = new QTextView(this);
+ m_members = new TQTextView(this);
m_members->setPaper(colorGroup().background());
- m_members->setFrameStyle(QFrame::NoFrame);
+ m_members->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0);
main_->addWidget(m_members);
m_pixmap = "kdeprint_printer_class";
@@ -50,7 +50,7 @@ void KMPropMembers::setPrinter(KMPrinter *p)
{
QStringList l = p->members();
QString txt("<ul>");
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
txt.append("<li>" + (*it) + "</li>");
txt.append("</ul>");
m_members->setText(txt);
diff --git a/kdeprint/management/kmpropmembers.h b/kdeprint/management/kmpropmembers.h
index 67f519dc7..c0dda4978 100644
--- a/kdeprint/management/kmpropmembers.h
+++ b/kdeprint/management/kmpropmembers.h
@@ -27,7 +27,7 @@ class QTextView;
class KDEPRINT_EXPORT KMPropMembers : public KMPropWidget
{
public:
- KMPropMembers(QWidget *parent = 0, const char *name = 0);
+ KMPropMembers(TQWidget *parent = 0, const char *name = 0);
~KMPropMembers();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropwidget.cpp b/kdeprint/management/kmpropwidget.cpp
index aa93f6a5f..b112c390b 100644
--- a/kdeprint/management/kmpropwidget.cpp
+++ b/kdeprint/management/kmpropwidget.cpp
@@ -26,15 +26,15 @@
#include <kmessagebox.h>
#include <klocale.h>
-KMPropWidget::KMPropWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMPropWidget::KMPropWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_pixmap = "folder";
m_title = m_header = "Title";
m_printer = 0;
m_canchange = ((KMFactory::self()->manager()->printerOperationMask() & KMManager::PrinterCreation) && KMFactory::self()->manager()->hasManagement());
- connect(this,SIGNAL(enable(bool)),this,SIGNAL(enableChange(bool)));
+ connect(this,TQT_SIGNAL(enable(bool)),this,TQT_SIGNAL(enableChange(bool)));
}
KMPropWidget::~KMPropWidget()
@@ -48,7 +48,7 @@ void KMPropWidget::slotChange()
if (value == -1)
{
KMessageBox::error(this, i18n("<qt>Unable to change printer properties. Error received from manager:<p>%1</p></qt>").arg(KMManager::self()->errorMsg()));
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
KMTimer::self()->release((value == 1));
}
diff --git a/kdeprint/management/kmpropwidget.h b/kdeprint/management/kmpropwidget.h
index 43d84d410..f4d3a865b 100644
--- a/kdeprint/management/kmpropwidget.h
+++ b/kdeprint/management/kmpropwidget.h
@@ -20,7 +20,7 @@
#ifndef KMPROPWIDGET_H
#define KMPROPWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -31,14 +31,14 @@ class KDEPRINT_EXPORT KMPropWidget : public QWidget
{
Q_OBJECT
public:
- KMPropWidget(QWidget *parent = 0, const char *name = 0);
+ KMPropWidget(TQWidget *parent = 0, const char *name = 0);
virtual ~KMPropWidget();
virtual void setPrinter(KMPrinter*);
void setPrinterBase(KMPrinter*);
- QString pixmap() const { return m_pixmap; }
- QString title() const { return m_title; }
- QString header() const { return m_header; }
+ TQString pixmap() const { return m_pixmap; }
+ TQString title() const { return m_title; }
+ TQString header() const { return m_header; }
bool canChange() const { return m_canchange; }
signals:
diff --git a/kdeprint/management/kmspecialprinterdlg.cpp b/kdeprint/management/kmspecialprinterdlg.cpp
index 31728249f..20d8d17b7 100644
--- a/kdeprint/management/kmspecialprinterdlg.cpp
+++ b/kdeprint/management/kmspecialprinterdlg.cpp
@@ -26,36 +26,36 @@
#include "kxmlcommand.h"
#include "driver.h"
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kicondialog.h>
#include <kfiledialog.h>
#include <kseparator.h>
-KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok)
+KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok)
{
setCaption(i18n("Add Special Printer"));
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
// widget creation
- m_name = new QLineEdit(dummy);
- connect(m_name, SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString & )));
- m_description = new QLineEdit(dummy);
- m_location = new QLineEdit(dummy);
- QLabel *m_namelabel = new QLabel(i18n("&Name:"), dummy);
- QLabel *m_desclabel = new QLabel(i18n("&Description:"), dummy);
- QLabel *m_loclabel = new QLabel(i18n("&Location:"), dummy);
+ m_name = new TQLineEdit(dummy);
+ connect(m_name, TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(slotTextChanged(const TQString & )));
+ m_description = new TQLineEdit(dummy);
+ m_location = new TQLineEdit(dummy);
+ QLabel *m_namelabel = new TQLabel(i18n("&Name:"), dummy);
+ QLabel *m_desclabel = new TQLabel(i18n("&Description:"), dummy);
+ QLabel *m_loclabel = new TQLabel(i18n("&Location:"), dummy);
m_namelabel->setBuddy(m_name);
m_desclabel->setBuddy(m_description);
m_loclabel->setBuddy(m_location);
@@ -63,16 +63,16 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, dummy);
sep->setFixedHeight(10);
- QGroupBox *m_gb = new QGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy);
+ QGroupBox *m_gb = new TQGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy);
m_command = new KXmlCommandSelector(true, m_gb, "CommandSelector", this);
- QGroupBox *m_outfile_gb = new QGroupBox( 0, Qt::Horizontal, i18n( "Outp&ut File" ), dummy );
+ TQGroupBox *m_outfile_gb = new TQGroupBox( 0, Qt::Horizontal, i18n( "Outp&ut File" ), dummy );
- m_usefile = new QCheckBox( i18n("&Enable output file"), m_outfile_gb);
+ m_usefile = new TQCheckBox( i18n("&Enable output file"), m_outfile_gb);
- m_mimetype = new QComboBox(m_outfile_gb);
+ m_mimetype = new TQComboBox(m_outfile_gb);
KMimeType::List list = KMimeType::allMimeTypes();
- for (QValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
QString mimetype = (*it)->name();
m_mimelist << mimetype;
@@ -80,31 +80,31 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
m_mimelist.sort();
m_mimetype->insertStringList(m_mimelist);
- QLabel *m_mimetypelabel = new QLabel(i18n("&Format:"), m_outfile_gb);
+ QLabel *m_mimetypelabel = new TQLabel(i18n("&Format:"), m_outfile_gb);
m_mimetypelabel->setBuddy (m_mimetype);
- m_extension = new QLineEdit(m_outfile_gb);
+ m_extension = new TQLineEdit(m_outfile_gb);
- QLabel *m_extensionlabel = new QLabel(i18n("Filename e&xtension:"), m_outfile_gb);
+ QLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb);
m_extensionlabel->setBuddy(m_extension);
m_icon = new KIconButton(dummy);
m_icon->setIcon("fileprint");
- m_icon->setFixedSize(QSize(48,48));
+ m_icon->setFixedSize(TQSize(48,48));
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_mimetype, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_extension, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_mimetypelabel, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_extensionlabel, SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_mimetype, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_extension, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_mimetypelabel, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_extensionlabel, TQT_SLOT( setEnabled( bool ) ) );
m_mimetypelabel->setEnabled( false );
m_mimetype->setEnabled( false );
m_extensionlabel->setEnabled( false );
m_extension->setEnabled( false );
- QWhatsThis::add(m_usefile,
+ TQWhatsThis::add(m_usefile,
i18n("<p>The command will use an output file. If checked, make sure the "
"command contains an output tag.</p>"));
- QWhatsThis::add(m_command,
+ TQWhatsThis::add(m_command,
i18n("<p>The command to execute when printing on this special printer. Either enter "
"the command to execute directly, or associate/create a command object with/for "
"this special printer. The command object is the preferred method as it provides "
@@ -115,16 +115,16 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
"<li><b>%out</b>: the output file (required if using an output file).</li>"
"<li><b>%psl</b>: the paper size in lower case.</li>"
"<li><b>%psu</b>: the paper size with the first letter in upper case.</li></ul>"));
- QString mimetypeWhatsThis = i18n("<p>The default mimetype for the output file (e.g. application/postscript).</p>");
- QWhatsThis::add(m_mimetypelabel, mimetypeWhatsThis);
- QWhatsThis::add(m_mimetype, mimetypeWhatsThis);
- QString extensionWhatsThis = i18n("<p>The default extension for the output file (e.g. ps, pdf, ps.gz).</p>");
- QWhatsThis::add(m_extensionlabel, extensionWhatsThis);
- QWhatsThis::add(m_extension, extensionWhatsThis);
+ TQString mimetypeWhatsThis = i18n("<p>The default mimetype for the output file (e.g. application/postscript).</p>");
+ TQWhatsThis::add(m_mimetypelabel, mimetypeWhatsThis);
+ TQWhatsThis::add(m_mimetype, mimetypeWhatsThis);
+ TQString extensionWhatsThis = i18n("<p>The default extension for the output file (e.g. ps, pdf, ps.gz).</p>");
+ TQWhatsThis::add(m_extensionlabel, extensionWhatsThis);
+ TQWhatsThis::add(m_extension, extensionWhatsThis);
// layout creation
- QVBoxLayout *l0 = new QVBoxLayout(dummy, 0, 10);
- QGridLayout *l1 = new QGridLayout(0, 3, 3, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(dummy, 0, 10);
+ QGridLayout *l1 = new TQGridLayout(0, 3, 3, 0, 5);
l0->addLayout(l1);
l1->setColStretch(2,1);
l1->addColSpacing(0,60);
@@ -138,7 +138,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
l0->addWidget(sep);
l0->addWidget(m_gb);
l0->addWidget(m_outfile_gb);
- QGridLayout *l6 = new QGridLayout(m_outfile_gb->layout(), 3, 2, 10);
+ QGridLayout *l6 = new TQGridLayout(m_outfile_gb->layout(), 3, 2, 10);
l6->addMultiCellWidget( m_usefile, 0, 0, 0, 1 );
l6->addWidget(m_mimetypelabel, 1, 0);
l6->addWidget(m_mimetype, 1, 1);
@@ -151,7 +151,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
resize(400,100);
}
-void KMSpecialPrinterDlg::slotTextChanged(const QString & )
+void KMSpecialPrinterDlg::slotTextChanged(const TQString & )
{
enableButton(Ok, !m_name->text().isEmpty());
}
diff --git a/kdeprint/management/kmspecialprinterdlg.h b/kdeprint/management/kmspecialprinterdlg.h
index 2cba217c4..2b440c567 100644
--- a/kdeprint/management/kmspecialprinterdlg.h
+++ b/kdeprint/management/kmspecialprinterdlg.h
@@ -33,7 +33,7 @@ class KMSpecialPrinterDlg : public KDialogBase
{
Q_OBJECT
public:
- KMSpecialPrinterDlg(QWidget *parent = 0, const char *name = 0);
+ KMSpecialPrinterDlg(TQWidget *parent = 0, const char *name = 0);
void setPrinter(KMPrinter*);
KMPrinter* printer();
@@ -43,7 +43,7 @@ protected:
protected slots:
void slotOk();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
private:
QLineEdit *m_name, *m_description, *m_location, *m_extension;
diff --git a/kdeprint/management/kmtimer.cpp b/kdeprint/management/kmtimer.cpp
index ae8725848..099d358f6 100644
--- a/kdeprint/management/kmtimer.cpp
+++ b/kdeprint/management/kmtimer.cpp
@@ -34,10 +34,10 @@ KMTimer* KMTimer::self()
return m_self;
}
-KMTimer::KMTimer(QObject *parent, const char *name)
-: QTimer(parent, name), m_count(0)
+KMTimer::KMTimer(TQObject *parent, const char *name)
+: TQTimer(parent, name), m_count(0)
{
- connect(this, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(this, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
}
KMTimer::~KMTimer()
diff --git a/kdeprint/management/kmtimer.h b/kdeprint/management/kmtimer.h
index b4ac49a56..cf5efb719 100644
--- a/kdeprint/management/kmtimer.h
+++ b/kdeprint/management/kmtimer.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdelibs_export.h>
/**
@@ -54,7 +54,7 @@ private slots:
private:
static KMTimer *m_self;
int m_count;
- KMTimer(QObject *parent = 0, const char *name = 0);
+ KMTimer(TQObject *parent = 0, const char *name = 0);
void releaseTimer(bool do_emit = false);
void startTimer(int delay = -1);
};
diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp
index 32f95949d..53803d383 100644
--- a/kdeprint/management/kmwbackend.cpp
+++ b/kdeprint/management/kmwbackend.cpp
@@ -21,11 +21,11 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -36,32 +36,32 @@
class KRadioButton : public QRadioButton
{
public:
- KRadioButton(const QString& txt, QWidget *parent = 0, const char *name = 0);
+ KRadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0);
};
-KRadioButton::KRadioButton(const QString& txt, QWidget *parent, const char *name)
-: QRadioButton(txt,parent,name)
+KRadioButton::KRadioButton(const TQString& txt, TQWidget *parent, const char *name)
+: TQRadioButton(txt,parent,name)
{
setCursor(KCursor::handCursor());
}
//********************************************************************************************************
-KMWBackend::KMWBackend(QWidget *parent, const char *name)
+KMWBackend::KMWBackend(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Backend;
m_title = i18n("Backend Selection");
- m_buttons = new QButtonGroup(this);
+ m_buttons = new TQButtonGroup(this);
m_buttons->hide();
- m_layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ m_layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
m_layout->addStretch(1);
m_count = 0;
}
-bool KMWBackend::isValid(QString& msg)
+bool KMWBackend::isValid(TQString& msg)
{
if (!m_buttons->selected())
{
@@ -100,9 +100,9 @@ void KMWBackend::updatePrinter(KMPrinter *p)
int ID = m_buttons->id(m_buttons->selected());
if (ID == KMWizard::Class) p->setType(KMPrinter::Class);
else p->setType(KMPrinter::Printer);
- p->setOption("kde-backend",QString::number(ID));
+ p->setOption("kde-backend",TQString::number(ID));
QString s = m_buttons->selected()->text();
- s.replace(QRegExp("&(?=\\w)"), QString::fromLatin1(""));
+ s.replace(TQRegExp("&(?=\\w)"), TQString::fromLatin1(""));
p->setOption("kde-backend-description",s);
setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error));
}
@@ -142,14 +142,14 @@ void KMWBackend::addBackend( int ID, bool on, int nextpage )
nextpage );
break;
case -1:
- addBackend( ID, QString::null, on, QString::null, nextpage );
+ addBackend( ID, TQString::null, on, TQString::null, nextpage );
break;
default:
kdError( 500 ) << "Non standard wizard page ID: " << ID << endl;
}
}
-void KMWBackend::addBackend(int ID, const QString& txt, bool on, const QString& whatsThis, int nextpage)
+void KMWBackend::addBackend(int ID, const TQString& txt, bool on, const TQString& whatsThis, int nextpage)
{
if (ID == -1)
{
@@ -161,7 +161,7 @@ void KMWBackend::addBackend(int ID, const QString& txt, bool on, const QString&
KRadioButton *btn = new KRadioButton(txt, this);
btn->setEnabled(on);
if ( !whatsThis.isEmpty() )
- QWhatsThis::add( btn, whatsThis );
+ TQWhatsThis::add( btn, whatsThis );
m_buttons->insert(btn, ID);
m_map[ID] = (nextpage == -1 ? ID : nextpage); // use nextpage if specified, default to ID
m_layout->insertWidget(m_count, btn);
diff --git a/kdeprint/management/kmwbackend.h b/kdeprint/management/kmwbackend.h
index 654ec3337..e31136851 100644
--- a/kdeprint/management/kmwbackend.h
+++ b/kdeprint/management/kmwbackend.h
@@ -22,7 +22,7 @@
#include "kmwizardpage.h"
#include <kdelibs_export.h>
-#include <qmap.h>
+#include <tqmap.h>
class QButtonGroup;
class QVBoxLayout;
@@ -30,13 +30,13 @@ class QVBoxLayout;
class KDEPRINT_EXPORT KMWBackend : public KMWizardPage
{
public:
- KMWBackend(QWidget *parent = 0, const char *name = 0);
+ KMWBackend(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
- void addBackend(int ID, const QString& txt, bool on = true, const QString& whatsThis = QString::null, int nextpage = -1);
+ void addBackend(int ID, const TQString& txt, bool on = true, const TQString& whatsThis = TQString::null, int nextpage = -1);
void addBackend(int ID = -1, bool on = true, int nextpage = -1);
void enableBackend(int ID, bool on = true);
@@ -47,7 +47,7 @@ private:
// to have different backends switching to the same page (like backends requiring
// a password). If the next page is not given when adding the backend, the ID is
// used by default.
- QMap<int,int> m_map;
+ TQMap<int,int> m_map;
int m_count;
};
diff --git a/kdeprint/management/kmwclass.cpp b/kdeprint/management/kmwclass.cpp
index 6d80a6ff3..d432af8e1 100644
--- a/kdeprint/management/kmwclass.cpp
+++ b/kdeprint/management/kmwclass.cpp
@@ -23,14 +23,14 @@
#include "kmmanager.h"
#include "kmprinter.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include <klistbox.h>
#include <klocale.h>
#include <kiconloader.h>
-KMWClass::KMWClass(QWidget *parent, const char *name)
+KMWClass::KMWClass(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Class;
@@ -38,23 +38,23 @@ KMWClass::KMWClass(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_list1 = new KListBox(this);
- m_list1->setSelectionMode(QListBox::Extended);
+ m_list1->setSelectionMode(TQListBox::Extended);
m_list2 = new KListBox(this);
- m_list2->setSelectionMode(QListBox::Extended);
+ m_list2->setSelectionMode(TQListBox::Extended);
- QToolButton *add = new QToolButton(this);
- QToolButton *remove = new QToolButton(this);
+ QToolButton *add = new TQToolButton(this);
+ QToolButton *remove = new TQToolButton(this);
add->setIconSet(BarIcon("forward"));
remove->setIconSet(BarIcon("back"));
- connect(add,SIGNAL(clicked()),SLOT(slotAdd()));
- connect(remove,SIGNAL(clicked()),SLOT(slotRemove()));
+ connect(add,TQT_SIGNAL(clicked()),TQT_SLOT(slotAdd()));
+ connect(remove,TQT_SIGNAL(clicked()),TQT_SLOT(slotRemove()));
- QLabel *l1 = new QLabel(i18n("Available printers:"), this);
- QLabel *l2 = new QLabel(i18n("Class printers:"), this);
+ QLabel *l1 = new TQLabel(i18n("Available printers:"), this);
+ QLabel *l2 = new TQLabel(i18n("Class printers:"), this);
- QHBoxLayout *lay1 = new QHBoxLayout(this, 0, 15);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 20);
- QVBoxLayout *lay3 = new QVBoxLayout(0, 0, 0), *lay4 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay1 = new TQHBoxLayout(this, 0, 15);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 20);
+ QVBoxLayout *lay3 = new TQVBoxLayout(0, 0, 0), *lay4 = new TQVBoxLayout(0, 0, 0);
lay1->addLayout(lay3, 1);
lay1->addLayout(lay2, 0);
lay1->addLayout(lay4, 1);
@@ -72,7 +72,7 @@ KMWClass::~KMWClass()
{
}
-bool KMWClass::isValid(QString& msg)
+bool KMWClass::isValid(TQString& msg)
{
if (m_list2->count() == 0)
{
@@ -88,11 +88,11 @@ void KMWClass::initPrinter(KMPrinter *p)
KMManager *mgr = KMFactory::self()->manager();
// first load available printers
- QPtrList<KMPrinter> *list = mgr->printerList(false);
+ TQPtrList<KMPrinter> *list = mgr->printerList(false);
m_list1->clear();
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
for (;it.current();++it)
if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.contains(it.current()->name()))
m_list1->insertItem(SmallIcon(it.current()->pixmap()), it.current()->name());
@@ -101,7 +101,7 @@ void KMWClass::initPrinter(KMPrinter *p)
// set class printers
m_list2->clear();
- for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
+ for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
{
KMPrinter *pr = mgr->findPrinter(*it);
if (pr) m_list2->insertItem(SmallIcon(pr->pixmap()), *it);
diff --git a/kdeprint/management/kmwclass.h b/kdeprint/management/kmwclass.h
index 4a4475b7d..1fadf45f4 100644
--- a/kdeprint/management/kmwclass.h
+++ b/kdeprint/management/kmwclass.h
@@ -28,10 +28,10 @@ class KMWClass : public KMWizardPage
{
Q_OBJECT
public:
- KMWClass(QWidget *parent = 0, const char *name = 0);
+ KMWClass(TQWidget *parent = 0, const char *name = 0);
~KMWClass();
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp
index 66ab87d20..a50454d0b 100644
--- a/kdeprint/management/kmwdriver.cpp
+++ b/kdeprint/management/kmwdriver.cpp
@@ -23,10 +23,10 @@
#include "kmdriverdbwidget.h"
#include "kmdriverdb.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMWDriver::KMWDriver(QWidget *parent, const char *name)
+KMWDriver::KMWDriver(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Driver;
@@ -35,7 +35,7 @@ KMWDriver::KMWDriver(QWidget *parent, const char *name)
m_widget = new KMDriverDbWidget(this);
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0);
lay1->addWidget(m_widget);
}
@@ -44,7 +44,7 @@ void KMWDriver::initPrinter(KMPrinter *p)
m_widget->init();
if (p)
{
- QString autoDetect = p->option( "kde-autodetect" );
+ TQString autoDetect = p->option( "kde-autodetect" );
if ( !autoDetect.isEmpty() )
{
// use auto-detection info instead: split the string
@@ -52,7 +52,7 @@ void KMWDriver::initPrinter(KMPrinter *p)
int p = autoDetect.find( ' ' );
if ( p != -1 )
{
- QString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 );
+ TQString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 );
KMDBEntryList *l = KMDriverDB::self()->findPnpEntry( manu, model );
if ( l && l->count() > 0 )
{
@@ -69,11 +69,11 @@ void KMWDriver::updatePrinter(KMPrinter *p)
{
if (p)
{
- p->setManufacturer(QString::null);
- p->setModel(QString::null);
+ p->setManufacturer(TQString::null);
+ p->setModel(TQString::null);
p->setDbEntry(0);
- p->setDriverInfo(QString::null);
- p->setOption("kde-driver",QString::null);
+ p->setDriverInfo(TQString::null);
+ p->setOption("kde-driver",TQString::null);
setNextPage(KMWizard::DriverTest);
if (m_widget->isRaw())
{
@@ -104,7 +104,7 @@ void KMWDriver::updatePrinter(KMPrinter *p)
}
}
-bool KMWDriver::isValid(QString& msg)
+bool KMWDriver::isValid(TQString& msg)
{
if (m_widget->isRaw() || m_widget->isExternal() || m_widget->drivers())
return true;
diff --git a/kdeprint/management/kmwdriver.h b/kdeprint/management/kmwdriver.h
index 0961f7a81..cb49246b6 100644
--- a/kdeprint/management/kmwdriver.h
+++ b/kdeprint/management/kmwdriver.h
@@ -27,9 +27,9 @@ class KMDriverDbWidget;
class KMWDriver : public KMWizardPage
{
public:
- KMWDriver(QWidget *parent = 0, const char *name = 0);
+ KMWDriver(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdriverselect.cpp b/kdeprint/management/kmwdriverselect.cpp
index ed97b967c..5ce70016d 100644
--- a/kdeprint/management/kmwdriverselect.cpp
+++ b/kdeprint/management/kmwdriverselect.cpp
@@ -23,14 +23,14 @@
#include "kmdbentry.h"
#include "kmdriverdb.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <klistbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-KMWDriverSelect::KMWDriverSelect(QWidget *parent, const char *name)
+KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::DriverSelect;
@@ -39,23 +39,23 @@ KMWDriverSelect::KMWDriverSelect(QWidget *parent, const char *name)
m_entries = NULL;
m_list = new KListBox(this);
- QLabel *l1 = new QLabel(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>Several drivers have been detected for this model. Select the driver "
"you want to use. You will have the opportunity to test it as well as to "
"change it if necessary.</p>"));
m_drivercomment = new KPushButton(i18n("Driver Information"), this);
- connect(m_drivercomment, SIGNAL(clicked()), SLOT(slotDriverComment()));
+ connect(m_drivercomment, TQT_SIGNAL(clicked()), TQT_SLOT(slotDriverComment()));
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(l1,0);
main_->addWidget(m_list,1);
- QHBoxLayout *lay0 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay0 = new TQHBoxLayout(0, 0, 0);
main_->addLayout(lay0,0);
lay0->addStretch(1);
lay0->addWidget(m_drivercomment);
}
-bool KMWDriverSelect::isValid(QString& msg)
+bool KMWDriverSelect::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
@@ -100,7 +100,7 @@ void KMWDriverSelect::updatePrinter(KMPrinter *p)
else
{
p->setDbEntry(0);
- p->setDriverInfo(QString::null);
+ p->setDriverInfo(TQString::null);
}
}
@@ -108,7 +108,7 @@ void KMWDriverSelect::slotDriverComment()
{
int index = m_list->currentItem();
if (m_entries && index >=0 && index < (int)(m_entries->count()) && !m_entries->at(index)->drivercomment.isEmpty())
- KMessageBox::information(this, m_entries->at(index)->drivercomment, QString::null, QString::null, KMessageBox::AllowLink);
+ KMessageBox::information(this, m_entries->at(index)->drivercomment, TQString::null, TQString::null, KMessageBox::AllowLink);
else
KMessageBox::error(this, i18n("No information about the selected driver."));
}
diff --git a/kdeprint/management/kmwdriverselect.h b/kdeprint/management/kmwdriverselect.h
index bf00f2e46..935bb56ca 100644
--- a/kdeprint/management/kmwdriverselect.h
+++ b/kdeprint/management/kmwdriverselect.h
@@ -30,9 +30,9 @@ class KMWDriverSelect : public KMWizardPage
{
Q_OBJECT
public:
- KMWDriverSelect(QWidget *parent = 0, const char *name = 0);
+ KMWDriverSelect(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdrivertest.cpp b/kdeprint/management/kmwdrivertest.cpp
index 5075e2204..4024f110d 100644
--- a/kdeprint/management/kmwdrivertest.cpp
+++ b/kdeprint/management/kmwdrivertest.cpp
@@ -25,16 +25,16 @@
#include "kmmanager.h"
#include "kmdriverdialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kguiitem.h>
#include <kio/netaccess.h>
-KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
+KMWDriverTest::KMWDriverTest(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::DriverTest;
@@ -44,26 +44,26 @@ KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
m_driver = 0;
m_printer = 0;
- m_manufacturer = new QLabel(this);
- m_model = new QLabel(this);
- m_driverinfo = new QLabel(this);
+ m_manufacturer = new TQLabel(this);
+ m_model = new TQLabel(this);
+ m_driverinfo = new TQLabel(this);
m_driverinfo->setTextFormat(Qt::RichText);
- QLabel *l1 = new QLabel(i18n("<b>Manufacturer:</b>"), this);
- QLabel *l2 = new QLabel(i18n("<b>Model:</b>"), this);
- QLabel *l3 = new QLabel(i18n("<b>Description:</b>"), this);
+ QLabel *l1 = new TQLabel(i18n("<b>Manufacturer:</b>"), this);
+ QLabel *l2 = new TQLabel(i18n("<b>Model:</b>"), this);
+ QLabel *l3 = new TQLabel(i18n("<b>Description:</b>"), this);
m_test = new KPushButton(KGuiItem(i18n("&Test"), "kdeprint_testprinter"), this);
m_settings = new KPushButton(KGuiItem(i18n("&Settings"), "configure"), this);
- QLabel *l0 = new QLabel(this);
+ QLabel *l0 = new TQLabel(this);
l0->setText(i18n("<p>Now you can test the printer before finishing installation. "
"Use the <b>Settings</b> button to configure the printer driver and "
"the <b>Test</b> button to test your configuration. Use the <b>Back</b> "
"button to change the driver (your current configuration will be discarded).</p>"));
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 15);
- QGridLayout *lay2 = new QGridLayout(0, 3, 3, 0, 0);
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15);
+ QGridLayout *lay2 = new TQGridLayout(0, 3, 3, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10);
lay1->addWidget(l0,0);
lay1->addLayout(lay2,0);
lay1->addLayout(lay3,0);
@@ -80,8 +80,8 @@ KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
lay3->addWidget(m_settings,0);
lay3->addStretch(1);
- connect(m_test,SIGNAL(clicked()),SLOT(slotTest()));
- connect(m_settings,SIGNAL(clicked()),SLOT(slotSettings()));
+ connect(m_test,TQT_SIGNAL(clicked()),TQT_SLOT(slotTest()));
+ connect(m_settings,TQT_SIGNAL(clicked()),TQT_SLOT(slotSettings()));
}
KMWDriverTest::~KMWDriverTest()
@@ -115,7 +115,7 @@ void KMWDriverTest::initPrinter(KMPrinter *p)
if (checkDriver && !m_driver)
{
KMessageBox::error(this, i18n("<qt>Unable to load the requested driver:<p>%1</p></qt>").arg(KMManager::self()->errorMsg()));
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
m_settings->setEnabled((m_driver != 0));
}
diff --git a/kdeprint/management/kmwdrivertest.h b/kdeprint/management/kmwdrivertest.h
index 8433687dd..5ab716459 100644
--- a/kdeprint/management/kmwdrivertest.h
+++ b/kdeprint/management/kmwdrivertest.h
@@ -30,7 +30,7 @@ class KMWDriverTest : public KMWizardPage
{
Q_OBJECT
public:
- KMWDriverTest(QWidget *parent = 0, const char *name = 0);
+ KMWDriverTest(TQWidget *parent = 0, const char *name = 0);
~KMWDriverTest();
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwend.cpp b/kdeprint/management/kmwend.cpp
index 7386ba7f0..5fd3c7fc0 100644
--- a/kdeprint/management/kmwend.cpp
+++ b/kdeprint/management/kmwend.cpp
@@ -22,31 +22,31 @@
#include "kmwizard.h"
#include "util.h"
-#include <qtextview.h>
+#include <tqtextview.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-KMWEnd::KMWEnd(QWidget *parent, const char *name)
+KMWEnd::KMWEnd(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::End;
m_title = i18n("Confirmation");
m_nextpage = KMWizard::Error;
- m_view = new QTextView(this);
+ m_view = new TQTextView(this);
- QVBoxLayout *lay = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0);
lay->addWidget(m_view,1);
}
void KMWEnd::initPrinter(KMPrinter *p)
{
QString txt;
- QString s(QString::fromLatin1("<li><u>%1</u>: %2</li>"));
+ QString s(TQString::fromLatin1("<li><u>%1</u>: %2</li>"));
int ID = p->option("kde-backend").toInt();
// general information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General")));
txt.append(s.arg(i18n("Type")).arg(p->option("kde-backend-description")));
txt.append(s.arg(i18n("Name")).arg(p->name()));
txt.append(s.arg(i18n("Location")).arg(p->location()));
@@ -56,17 +56,17 @@ void KMWEnd::initPrinter(KMPrinter *p)
if (ID == KMWizard::Class)
{
// class members
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members")));
QStringList m(p->members());
- QString s1(QString::fromLatin1("<li>%1</li>"));
- for (QStringList::ConstIterator it=m.begin(); it!=m.end(); ++it)
+ QString s1(TQString::fromLatin1("<li>%1</li>"));
+ for (TQStringList::ConstIterator it=m.begin(); it!=m.end(); ++it)
txt.append(s1.arg(*it));
txt.append("</ul><br>");
}
else
{
// backend information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend")));
KURL url ( p->device() );
switch (ID)
{
@@ -101,7 +101,7 @@ void KMWEnd::initPrinter(KMPrinter *p)
if (p->option("kde-driver") == "raw" || p->driver())
{
// driver information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver")));
if (p->option("kde-driver") == "raw")
txt.append(s.arg(i18n("Type")).arg(i18n("Raw printer")));
else
diff --git a/kdeprint/management/kmwend.h b/kdeprint/management/kmwend.h
index 4682d831e..d30972361 100644
--- a/kdeprint/management/kmwend.h
+++ b/kdeprint/management/kmwend.h
@@ -27,7 +27,7 @@ class QTextView;
class KMWEnd : public KMWizardPage
{
public:
- KMWEnd(QWidget *parent = 0, const char *name = 0);
+ KMWEnd(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwfile.cpp b/kdeprint/management/kmwfile.cpp
index 497b03f27..9daeee77b 100644
--- a/kdeprint/management/kmwfile.cpp
+++ b/kdeprint/management/kmwfile.cpp
@@ -21,14 +21,14 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <klocale.h>
#include <kfiledialog.h>
-KMWFile::KMWFile(QWidget *parent, const char *name)
+KMWFile::KMWFile(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::File;
@@ -37,14 +37,14 @@ KMWFile::KMWFile(QWidget *parent, const char *name)
m_url = new KURLRequester(this);
m_url->setMode((KFile::Mode)(KFile::File|KFile::LocalOnly));
- QLabel *l1 = new QLabel(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>The printing will be redirected to a file. Enter here the path "
"of the file you want to use for redirection. Use an absolute path or "
"the browse button for graphical selection.</p>"));
- QLabel *l2 = new QLabel(i18n("Print to file:"), this);
+ QLabel *l2 = new TQLabel(i18n("Print to file:"), this);
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 30);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 5);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 30);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5);
lay1->addWidget(l1);
lay1->addLayout(lay2);
lay1->addStretch(1);
@@ -52,7 +52,7 @@ KMWFile::KMWFile(QWidget *parent, const char *name)
lay2->addWidget(m_url);
}
-bool KMWFile::isValid(QString& msg)
+bool KMWFile::isValid(TQString& msg)
{
QFileInfo fi(m_url->url());
if (fi.fileName().isEmpty())
@@ -72,6 +72,6 @@ bool KMWFile::isValid(QString& msg)
void KMWFile::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("file:%1").arg(m_url->url());
+ QString dev = TQString::fromLatin1("file:%1").arg(m_url->url());
p->setDevice(dev);
}
diff --git a/kdeprint/management/kmwfile.h b/kdeprint/management/kmwfile.h
index 7bcd779ed..2e6997372 100644
--- a/kdeprint/management/kmwfile.h
+++ b/kdeprint/management/kmwfile.h
@@ -27,9 +27,9 @@ class KURLRequester;
class KMWFile : public KMWizardPage
{
public:
- KMWFile(QWidget *parent = 0, const char *name = 0);
+ KMWFile(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
private:
diff --git a/kdeprint/management/kmwinfobase.cpp b/kdeprint/management/kmwinfobase.cpp
index e58e452bb..aef26049f 100644
--- a/kdeprint/management/kmwinfobase.cpp
+++ b/kdeprint/management/kmwinfobase.cpp
@@ -19,57 +19,57 @@
#include "kmwinfobase.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
-KMWInfoBase::KMWInfoBase(int n, QWidget *parent, const char *name)
+KMWInfoBase::KMWInfoBase(int n, TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_labels.setAutoDelete(false);
m_edits.setAutoDelete(false);
m_nlines = n;
- QGridLayout *lay1 = new QGridLayout(this, m_nlines+3, 2, 0, 10);
+ QGridLayout *lay1 = new TQGridLayout(this, m_nlines+3, 2, 0, 10);
lay1->addRowSpacing(1,10);
lay1->setRowStretch(m_nlines+2,1);
lay1->setColStretch(1,1);
- m_info = new QLabel(this);
+ m_info = new TQLabel(this);
m_info->setTextFormat(Qt::RichText);
lay1->addMultiCellWidget(m_info,0,0,0,1);
for (int i=0;i<m_nlines;i++)
{
- m_labels.append(new QLabel(this));
- m_edits.append(new QLineEdit(this));
+ m_labels.append(new TQLabel(this));
+ m_edits.append(new TQLineEdit(this));
lay1->addWidget(m_labels.last(),i+2,0);
lay1->addWidget(m_edits.last(),i+2,1);
}
}
-void KMWInfoBase::setInfo(const QString& s)
+void KMWInfoBase::setInfo(const TQString& s)
{
m_info->setText(s);
}
-void KMWInfoBase::setLabel(int i, const QString& s)
+void KMWInfoBase::setLabel(int i, const TQString& s)
{
if (i >= 0 && i < m_nlines)
m_labels.at(i)->setText(s);
}
-void KMWInfoBase::setText(int i, const QString& s)
+void KMWInfoBase::setText(int i, const TQString& s)
{
if (i >= 0 && i < m_nlines)
m_edits.at(i)->setText(s);
}
-QString KMWInfoBase::text(int i)
+TQString KMWInfoBase::text(int i)
{
if (i >= 0 && i < m_nlines)
return m_edits.at(i)->text();
- return QString::null;
+ return TQString::null;
}
void KMWInfoBase::setCurrent(int i)
@@ -81,7 +81,7 @@ void KMWInfoBase::setCurrent(int i)
}
}
-QLineEdit* KMWInfoBase::lineEdit( int i )
+TQLineEdit* KMWInfoBase::lineEdit( int i )
{
if ( i >= 0 && i < m_nlines )
return m_edits.at( i );
diff --git a/kdeprint/management/kmwinfobase.h b/kdeprint/management/kmwinfobase.h
index 77f9e976a..1a6576618 100644
--- a/kdeprint/management/kmwinfobase.h
+++ b/kdeprint/management/kmwinfobase.h
@@ -21,7 +21,7 @@
#define KMWINFOBASE_H
#include "kmwizardpage.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QLabel;
class QLineEdit;
@@ -29,21 +29,21 @@ class QLineEdit;
class KDEPRINT_EXPORT KMWInfoBase : public KMWizardPage
{
public:
- KMWInfoBase(int n = 1, QWidget *parent = 0, const char *name = 0);
+ KMWInfoBase(int n = 1, TQWidget *parent = 0, const char *name = 0);
- void setInfo(const QString&);
- void setLabel(int, const QString&);
- void setText(int, const QString&);
+ void setInfo(const TQString&);
+ void setLabel(int, const TQString&);
+ void setText(int, const TQString&);
void setCurrent(int);
- QString text(int);
+ TQString text(int);
protected:
- QLineEdit* lineEdit( int );
+ TQLineEdit* lineEdit( int );
private:
- QPtrList<QLabel> m_labels;
- QPtrList<QLineEdit> m_edits;
+ TQPtrList<TQLabel> m_labels;
+ TQPtrList<TQLineEdit> m_edits;
QLabel *m_info;
int m_nlines;
};
diff --git a/kdeprint/management/kmwinfopage.cpp b/kdeprint/management/kmwinfopage.cpp
index 43e830a20..092a8669d 100644
--- a/kdeprint/management/kmwinfopage.cpp
+++ b/kdeprint/management/kmwinfopage.cpp
@@ -20,19 +20,19 @@
#include "kmwinfopage.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kactivelabel.h>
-KMWInfoPage::KMWInfoPage(QWidget *parent, const char *name)
+KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Start;
m_title = i18n("Introduction");
m_nextpage = KMWizard::Backend;
- //QLabel *m_label = new QLabel(this);
+ //QLabel *m_label = new TQLabel(this);
KActiveLabel *m_label = new KActiveLabel(this);
m_label->setText(i18n("<p>Welcome,</p><br>"
"<p>This wizard will help to install a new printer on your computer. "
@@ -43,6 +43,6 @@ KMWInfoPage::KMWInfoPage(QWidget *parent, const char *name)
"<p align=right><a href=\"http://printing.kde.org\"><i>"
"The KDE printing team</i></a>.</p>"));
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 0);
main_->addWidget(m_label);
}
diff --git a/kdeprint/management/kmwinfopage.h b/kdeprint/management/kmwinfopage.h
index 76719e0ff..aefa675fe 100644
--- a/kdeprint/management/kmwinfopage.h
+++ b/kdeprint/management/kmwinfopage.h
@@ -25,7 +25,7 @@
class KMWInfoPage : public KMWizardPage
{
public:
- KMWInfoPage(QWidget *parent = 0, const char *name = 0);
+ KMWInfoPage(TQWidget *parent = 0, const char *name = 0);
};
#endif
diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp
index d44ac87e8..6a793dd5a 100644
--- a/kdeprint/management/kmwizard.cpp
+++ b/kdeprint/management/kmwizard.cpp
@@ -24,10 +24,10 @@
#include "kmuimanager.h"
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqwidgetstack.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
#include <kseparator.h>
@@ -50,8 +50,8 @@
#include "kmwlocal.h"
#include "sidepixmap.h"
-KMWizard::KMWizard(QWidget *parent, const char *name)
-: QDialog(parent,name,true)
+KMWizard::KMWizard(TQWidget *parent, const char *name)
+: TQDialog(parent,name,true)
{
m_start = KMWizard::Start;
m_end = KMWizard::End;
@@ -60,12 +60,12 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
m_pagepool.setAutoDelete(false);
- m_stack = new QWidgetStack(this);
+ m_stack = new TQWidgetStack(this);
m_next = new KPushButton(i18n("&Next >"), this);
m_next->setDefault(true);
m_prev = new KPushButton(i18n("< &Back"), this);
QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- m_title = new QLabel(this);
+ m_title = new TQLabel(this);
QFont f(m_title->font());
f.setBold(true);
m_title->setFont(f);
@@ -74,10 +74,10 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
KSeparator* sep2 = new KSeparator( KSeparator::HLine, this);
QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this);
- connect(m_cancel,SIGNAL(clicked()),SLOT(reject()));
- connect(m_next,SIGNAL(clicked()),SLOT(slotNext()));
- connect(m_prev,SIGNAL(clicked()),SLOT(slotPrev()));
- connect(m_help, SIGNAL(clicked()), SLOT(slotHelp()));
+ connect(m_cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()));
+ connect(m_next,TQT_SIGNAL(clicked()),TQT_SLOT(slotNext()));
+ connect(m_prev,TQT_SIGNAL(clicked()),TQT_SLOT(slotPrev()));
+ connect(m_help, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()));
m_side = new SidePixmap(this);
if (!m_side->isValid())
@@ -87,10 +87,10 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
}
// layout
- QVBoxLayout *main0_ = new QVBoxLayout(this, 10, 10);
- QVBoxLayout *main_ = new QVBoxLayout(0, 0, 0);
- QHBoxLayout *main1_ = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *btn_ = new QHBoxLayout(0, 0, 10);
+ TQVBoxLayout *main0_ = new TQVBoxLayout(this, 10, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(0, 0, 0);
+ TQHBoxLayout *main1_ = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 10);
main0_->addLayout(main1_);
if (m_side)
main1_->addWidget(m_side);
@@ -244,7 +244,7 @@ void KMWizard::slotNext()
void KMWizard::slotHelp()
{
- kapp->invokeHelp(QString::null, "kdeprint");
+ kapp->invokeHelp(TQString::null, "kdeprint");
}
void KMWizard::enableWizard()
diff --git a/kdeprint/management/kmwizard.h b/kdeprint/management/kmwizard.h
index 4a52628fb..a6f3d8dfc 100644
--- a/kdeprint/management/kmwizard.h
+++ b/kdeprint/management/kmwizard.h
@@ -20,9 +20,9 @@
#ifndef KMWIZARD_H
#define KMWIZARD_H
-#include <qdialog.h>
-#include <qintdict.h>
-#include <qvaluestack.h>
+#include <tqdialog.h>
+#include <tqintdict.h>
+#include <tqvaluestack.h>
#include <kdelibs_export.h>
@@ -60,7 +60,7 @@ public:
Custom = 100
};
- KMWizard(QWidget *parent = 0, const char *name = 0);
+ KMWizard(TQWidget *parent = 0, const char *name = 0);
~KMWizard();
void configure(int start, int end, bool inclusive = true);
@@ -81,8 +81,8 @@ protected slots:
void slotHelp();
private:
- QIntDict<KMWizardPage> m_pagepool;
- QValueStack<int> m_pagestack;
+ TQIntDict<KMWizardPage> m_pagepool;
+ TQValueStack<int> m_pagestack;
QWidgetStack *m_stack;
QLabel *m_title;
diff --git a/kdeprint/management/kmwizardpage.cpp b/kdeprint/management/kmwizardpage.cpp
index fe872161e..936a30c87 100644
--- a/kdeprint/management/kmwizardpage.cpp
+++ b/kdeprint/management/kmwizardpage.cpp
@@ -20,8 +20,8 @@
#include "kmwizardpage.h"
#include "kmwizard.h"
-KMWizardPage::KMWizardPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMWizardPage::KMWizardPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_ID = KMWizard::Error;
m_title = "KMWizardPage";
@@ -33,7 +33,7 @@ KMWizardPage::~KMWizardPage()
{
}
-bool KMWizardPage::isValid(QString&)
+bool KMWizardPage::isValid(TQString&)
{
return true;
}
diff --git a/kdeprint/management/kmwizardpage.h b/kdeprint/management/kmwizardpage.h
index d0846b57f..d6756ab37 100644
--- a/kdeprint/management/kmwizardpage.h
+++ b/kdeprint/management/kmwizardpage.h
@@ -20,7 +20,7 @@
#ifndef KMWIZARDPAGE_H
#define KMWIZARDPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -30,14 +30,14 @@ class KDEPRINT_EXPORT KMWizardPage : public QWidget
{
Q_OBJECT
public:
- KMWizardPage(QWidget *parent = 0, const char *name = 0);
+ KMWizardPage(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWizardPage();
int id() const { return m_ID; }
- const QString& title() const { return m_title; }
+ const TQString& title() const { return m_title; }
int nextPage() const { return m_nextpage; }
void setNextPage(int p) { m_nextpage = p; }
- virtual bool isValid(QString&);
+ virtual bool isValid(TQString&);
virtual void initPrinter(KMPrinter*);
virtual void updatePrinter(KMPrinter*);
bool needsInitOnBack() { return m_needsinitonback; }
diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp
index 10657f246..1a89babe0 100644
--- a/kdeprint/management/kmwlocal.cpp
+++ b/kdeprint/management/kmwlocal.cpp
@@ -24,15 +24,15 @@
#include "kmmanager.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <kiconloader.h>
-KMWLocal::KMWLocal(QWidget *parent, const char *name)
+KMWLocal::KMWLocal(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("Local Port Selection");
@@ -42,28 +42,28 @@ KMWLocal::KMWLocal(QWidget *parent, const char *name)
m_block = false;
m_ports = new KListView(this);
- m_ports->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_ports->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_ports->setLineWidth(1);
m_ports->header()->hide();
m_ports->addColumn("");
m_ports->setSorting(-1);
- QListViewItem *root = new QListViewItem(m_ports, i18n("Local System"));
+ QListViewItem *root = new TQListViewItem(m_ports, i18n("Local System"));
root->setPixmap(0, SmallIcon("kdeprint_computer"));
root->setOpen(true);
- connect(m_ports, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotPortSelected(QListViewItem*)));
- QLabel *l1 = new QLabel(i18n("URI:"), this);
- m_localuri = new QLineEdit(this);
- connect( m_localuri, SIGNAL( textChanged( const QString& ) ), SLOT( slotTextChanged( const QString& ) ) );
- m_parents[0] = new QListViewItem(root, i18n("Parallel"));
- m_parents[1] = new QListViewItem(root, m_parents[0], i18n("Serial"));
- m_parents[2] = new QListViewItem(root, m_parents[1], i18n("USB"));
- m_parents[3] = new QListViewItem(root, m_parents[2], i18n("Others"));
+ connect(m_ports, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotPortSelected(TQListViewItem*)));
+ QLabel *l1 = new TQLabel(i18n("URI:"), this);
+ m_localuri = new TQLineEdit(this);
+ connect( m_localuri, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ m_parents[0] = new TQListViewItem(root, i18n("Parallel"));
+ m_parents[1] = new TQListViewItem(root, m_parents[0], i18n("Serial"));
+ m_parents[2] = new TQListViewItem(root, m_parents[1], i18n("USB"));
+ m_parents[3] = new TQListViewItem(root, m_parents[2], i18n("Others"));
for (int i=0;i<4;i++)
m_parents[i]->setPixmap(0, SmallIcon("input_devices_settings"));
- QLabel *l2 = new QLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this);
+ QLabel *l2 = new TQLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10);
lay0->addWidget(l2, 0);
lay0->addWidget(m_ports, 1);
lay0->addLayout(lay1, 0);
@@ -71,7 +71,7 @@ KMWLocal::KMWLocal(QWidget *parent, const char *name)
lay1->addWidget(m_localuri, 1);
}
-bool KMWLocal::isValid(QString& msg)
+bool KMWLocal::isValid(TQString& msg)
{
if (m_localuri->text().isEmpty())
{
@@ -89,14 +89,14 @@ bool KMWLocal::isValid(QString& msg)
return true;
}
-void KMWLocal::slotPortSelected(QListViewItem *item)
+void KMWLocal::slotPortSelected(TQListViewItem *item)
{
if ( m_block )
return;
- QString uri;
+ TQString uri;
if (!item || item->depth() <= 1 || item->depth() > 3)
- uri = QString::null;
+ uri = TQString::null;
else if (item->depth() == 3)
uri = item->parent()->text( 1 );
else
@@ -108,7 +108,7 @@ void KMWLocal::slotPortSelected(QListViewItem *item)
void KMWLocal::updatePrinter(KMPrinter *printer)
{
- QListViewItem *item = m_ports->selectedItem();
+ TQListViewItem *item = m_ports->selectedItem();
if ( item && item->depth() == 3 )
printer->setOption( "kde-autodetect", item->text( 0 ) );
printer->setDevice(m_localuri->text());
@@ -125,11 +125,11 @@ void KMWLocal::initPrinter(KMPrinter *printer)
}
}
-QListViewItem* KMWLocal::lookForItem( const QString& uri )
+TQListViewItem* KMWLocal::lookForItem( const TQString& uri )
{
for ( int i=0; i<4; i++ )
{
- QListViewItem *item = m_parents[ i ]->firstChild();
+ TQListViewItem *item = m_parents[ i ]->firstChild();
while ( item )
if ( item->text( 1 ) == uri )
if ( item->firstChild() )
@@ -142,12 +142,12 @@ QListViewItem* KMWLocal::lookForItem( const QString& uri )
return 0;
}
-void KMWLocal::slotTextChanged( const QString& txt )
+void KMWLocal::slotTextChanged( const TQString& txt )
{
if ( m_block )
return;
- QListViewItem *item = lookForItem( txt );
+ TQListViewItem *item = lookForItem( txt );
if ( item )
{
m_block = true;
@@ -167,14 +167,14 @@ void KMWLocal::initialize()
return;
}
QListViewItem *last[4] = {0, 0, 0, 0};
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it)
{
- QString cl = *it;
+ TQString cl = *it;
++it;
QString uri = *it;
int p = uri.find( ':' );
- QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : QString::null );
+ QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null );
QString printer = *(++it);
int index(-1);
if (desc.isEmpty())
@@ -189,13 +189,13 @@ void KMWLocal::initialize()
index = 3;
else
continue;
- last[index] = new QListViewItem(m_parents[index], last[index], desc, uri);
+ last[index] = new TQListViewItem(m_parents[index], last[index], desc, uri);
last[index]->setPixmap(0, SmallIcon("blockdevice"));
m_parents[index]->setOpen(true);
m_uris << uri;
if (!printer.isEmpty())
{
- QListViewItem *pItem = new QListViewItem(last[index], printer);
+ QListViewItem *pItem = new TQListViewItem(last[index], printer);
last[index]->setOpen(true);
pItem->setPixmap(0, SmallIcon("kdeprint_printer"));
}
diff --git a/kdeprint/management/kmwlocal.h b/kdeprint/management/kmwlocal.h
index 5f99c32e0..2dd770341 100644
--- a/kdeprint/management/kmwlocal.h
+++ b/kdeprint/management/kmwlocal.h
@@ -22,7 +22,7 @@
#include "kmwizardpage.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QLineEdit;
class KListView;
@@ -32,19 +32,19 @@ class KMWLocal : public KMWizardPage
{
Q_OBJECT
public:
- KMWLocal(QWidget *parent = 0, const char *name = 0);
+ KMWLocal(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
protected slots:
- void slotPortSelected(QListViewItem*);
- void slotTextChanged( const QString& );
+ void slotPortSelected(TQListViewItem*);
+ void slotTextChanged( const TQString& );
protected:
void initialize();
- QListViewItem* lookForItem( const QString& );
+ TQListViewItem* lookForItem( const TQString& );
protected:
KListView *m_ports;
diff --git a/kdeprint/management/kmwlpd.cpp b/kdeprint/management/kmwlpd.cpp
index fdb762e7d..c2686b481 100644
--- a/kdeprint/management/kmwlpd.cpp
+++ b/kdeprint/management/kmwlpd.cpp
@@ -24,9 +24,9 @@
#include <kurl.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdebug.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
#include <kextsock.h>
@@ -34,7 +34,7 @@ static bool checkLpdQueue(const char *host, const char *queue);
//********************************************************************************************************
-KMWLpd::KMWLpd(QWidget *parent, const char *name)
+KMWLpd::KMWLpd(TQWidget *parent, const char *name)
: KMWInfoBase(2,parent,name)
{
m_ID = KMWizard::LPD;
@@ -47,7 +47,7 @@ KMWLpd::KMWLpd(QWidget *parent, const char *name)
setLabel(1,i18n("Queue:"));
}
-bool KMWLpd::isValid(QString& msg)
+bool KMWLpd::isValid(TQString& msg)
{
if (text(0).isEmpty() || text(1).isEmpty())
{
@@ -66,7 +66,7 @@ bool KMWLpd::isValid(QString& msg)
void KMWLpd::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1));
+ QString dev = TQString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1));
p->setDevice(dev);
}
diff --git a/kdeprint/management/kmwlpd.h b/kdeprint/management/kmwlpd.h
index bd4b636f8..16cd70592 100644
--- a/kdeprint/management/kmwlpd.h
+++ b/kdeprint/management/kmwlpd.h
@@ -25,9 +25,9 @@
class KMWLpd : public KMWInfoBase
{
public:
- KMWLpd(QWidget *parent = 0, const char *name = 0);
+ KMWLpd(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/management/kmwname.cpp b/kdeprint/management/kmwname.cpp
index 0cfbfbea9..d46b104a7 100644
--- a/kdeprint/management/kmwname.cpp
+++ b/kdeprint/management/kmwname.cpp
@@ -21,13 +21,13 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-KMWName::KMWName(QWidget *parent, const char *name)
+KMWName::KMWName(TQWidget *parent, const char *name)
: KMWInfoBase(3,parent,name)
{
m_ID = KMWizard::Name;
@@ -41,24 +41,24 @@ KMWName::KMWName(QWidget *parent, const char *name)
setLabel(2,i18n("Description:"));
}
-bool KMWName::isValid(QString& msg)
+bool KMWName::isValid(TQString& msg)
{
if (text(0).isEmpty())
{
msg = i18n("You must supply at least a name.");
return false;
}
- else if (text(0).find(QRegExp("\\s")) != -1)
+ else if (text(0).find(TQRegExp("\\s")) != -1)
{
QString conv = text(0);
- conv.replace(QRegExp("\\s"), "");
+ conv.replace(TQRegExp("\\s"), "");
int result = KMessageBox::warningYesNoCancel(this,
i18n("It is usually not a good idea to include spaces "
"in printer name: it may prevent your printer from "
"working correctly. The wizard can strip all spaces "
"from the string you entered, resulting in %1; "
"what do you want to do?").arg(conv),
- QString::null,
+ TQString::null,
i18n("Strip"), i18n("Keep"));
switch (result)
{
diff --git a/kdeprint/management/kmwname.h b/kdeprint/management/kmwname.h
index 245b2c985..e3b74f224 100644
--- a/kdeprint/management/kmwname.h
+++ b/kdeprint/management/kmwname.h
@@ -25,9 +25,9 @@
class KMWName : public KMWInfoBase
{
public:
- KMWName(QWidget *parent = 0, const char *name = 0);
+ KMWName(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/management/kmwpassword.cpp b/kdeprint/management/kmwpassword.cpp
index 1b67ac6be..a84b8f904 100644
--- a/kdeprint/management/kmwpassword.cpp
+++ b/kdeprint/management/kmwpassword.cpp
@@ -21,17 +21,17 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kcursor.h>
#include <stdlib.h>
-KMWPassword::KMWPassword(QWidget *parent, const char *name)
+KMWPassword::KMWPassword(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("User Identification");
@@ -39,20 +39,20 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
m_nextpage = KMWizard::SMB;
// create widgets
- QLabel *infotext_ = new QLabel(this);
+ QLabel *infotext_ = new TQLabel(this);
infotext_->setText(i18n("<p>This backend may require a login/password to work properly. "
"Select the type of access to use and fill in the login and password entries if needed.</p>"));
- m_login = new QLineEdit(this);
- m_login->setText(QString::fromLocal8Bit(getenv("USER")));
- m_password = new QLineEdit(this);
- m_password->setEchoMode(QLineEdit::Password);
- QLabel *loginlabel_ = new QLabel(i18n("&Login:"),this);
- QLabel *passwdlabel_ = new QLabel(i18n("&Password:"),this);
- m_btngroup = new QVButtonGroup( this );
- m_btngroup->setFrameStyle( QFrame::NoFrame );
- QRadioButton *btn1 = new QRadioButton( i18n( "&Anonymous (no login/password)" ), m_btngroup );
- QRadioButton *btn2 = new QRadioButton( i18n( "&Guest account (login=\"guest\")" ), m_btngroup );
- QRadioButton *btn3 = new QRadioButton( i18n( "Nor&mal account" ), m_btngroup );
+ m_login = new TQLineEdit(this);
+ m_login->setText(TQString::fromLocal8Bit(getenv("USER")));
+ m_password = new TQLineEdit(this);
+ m_password->setEchoMode(TQLineEdit::Password);
+ QLabel *loginlabel_ = new TQLabel(i18n("&Login:"),this);
+ QLabel *passwdlabel_ = new TQLabel(i18n("&Password:"),this);
+ m_btngroup = new TQVButtonGroup( this );
+ m_btngroup->setFrameStyle( TQFrame::NoFrame );
+ TQRadioButton *btn1 = new TQRadioButton( i18n( "&Anonymous (no login/password)" ), m_btngroup );
+ TQRadioButton *btn2 = new TQRadioButton( i18n( "&Guest account (login=\"guest\")" ), m_btngroup );
+ TQRadioButton *btn3 = new TQRadioButton( i18n( "Nor&mal account" ), m_btngroup );
btn1->setCursor( KCursor::handCursor() );
btn2->setCursor( KCursor::handCursor() );
btn3->setCursor( KCursor::handCursor() );
@@ -63,15 +63,15 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
m_login->setEnabled(false);
m_password->setEnabled(false);
- connect(btn3,SIGNAL(toggled(bool)),m_login,SLOT(setEnabled(bool)));
- connect(btn3,SIGNAL(toggled(bool)),m_password,SLOT(setEnabled(bool)));
+ connect(btn3,TQT_SIGNAL(toggled(bool)),m_login,TQT_SLOT(setEnabled(bool)));
+ connect(btn3,TQT_SIGNAL(toggled(bool)),m_password,TQT_SLOT(setEnabled(bool)));
// layout
- QVBoxLayout *main_ = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout *main_ = new TQVBoxLayout( this, 0, 0 );
main_->addWidget( infotext_ );
main_->addSpacing( 10 );
main_->addWidget( m_btngroup );
- QGridLayout *l1 = new QGridLayout( 0, 2, 3 );
+ TQGridLayout *l1 = new TQGridLayout( 0, 2, 3 );
main_->addLayout( l1 );
main_->addStretch( 1 );
l1->setColSpacing( 0, 35 );
@@ -82,7 +82,7 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
l1->addWidget( m_password, 1, 2 );
}
-bool KMWPassword::isValid(QString& msg)
+bool KMWPassword::isValid(TQString& msg)
{
if ( !m_btngroup->selected() )
msg = i18n( "Select one option" );
@@ -117,12 +117,12 @@ void KMWPassword::updatePrinter(KMPrinter *p)
switch ( m_btngroup->selectedId() )
{
case 0:
- p->setOption( "kde-login", QString::null );
- p->setOption( "kde-password", QString::null );
+ p->setOption( "kde-login", TQString::null );
+ p->setOption( "kde-password", TQString::null );
break;
case 1:
- p->setOption( "kde-login", QString::fromLatin1( "guest" ) );
- p->setOption( "kde-password", QString::null );
+ p->setOption( "kde-login", TQString::fromLatin1( "guest" ) );
+ p->setOption( "kde-password", TQString::null );
break;
case 2:
p->setOption( "kde-login", m_login->text() );
diff --git a/kdeprint/management/kmwpassword.h b/kdeprint/management/kmwpassword.h
index 9941376f6..50fb4f42a 100644
--- a/kdeprint/management/kmwpassword.h
+++ b/kdeprint/management/kmwpassword.h
@@ -28,16 +28,16 @@ class QButtonGroup;
class KMWPassword : public KMWizardPage
{
public:
- KMWPassword(QWidget *parent = 0, const char *name = 0);
+ KMWPassword(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter( KMPrinter* );
void updatePrinter(KMPrinter*);
private:
- QLineEdit *m_login;
- QLineEdit *m_password;
- QButtonGroup *m_btngroup;
+ TQLineEdit *m_login;
+ TQLineEdit *m_password;
+ TQButtonGroup *m_btngroup;
};
#endif
diff --git a/kdeprint/management/kmwsmb.cpp b/kdeprint/management/kmwsmb.cpp
index bd1372c42..a4d82fba1 100644
--- a/kdeprint/management/kmwsmb.cpp
+++ b/kdeprint/management/kmwsmb.cpp
@@ -25,11 +25,11 @@
#include <klocale.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
-KMWSmb::KMWSmb(QWidget *parent, const char *name)
+KMWSmb::KMWSmb(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("SMB Printer Settings");
@@ -37,20 +37,20 @@ KMWSmb::KMWSmb(QWidget *parent, const char *name)
m_nextpage = KMWizard::Driver;
m_view = new SmbView(this,"SmbView");
- m_loginlabel = new QLabel( this );
+ m_loginlabel = new TQLabel( this );
QPushButton *m_scan = new KPushButton(KGuiItem(i18n("Scan"), "viewmag"), this);
QPushButton *m_abort = new KPushButton(KGuiItem(i18n("Abort"), "stop"), this);
m_abort->setEnabled(false);
- QLabel *m_worklabel = new QLabel(i18n("Workgroup:"), this);
- QLabel *m_serverlabel = new QLabel(i18n("Server:"), this);
- QLabel *m_printerlabel = new QLabel(i18n("Printer:"), this);
- m_work = new QLineEdit(this);
- m_server = new QLineEdit(this);
- m_printer = new QLineEdit(this);
+ QLabel *m_worklabel = new TQLabel(i18n("Workgroup:"), this);
+ QLabel *m_serverlabel = new TQLabel(i18n("Server:"), this);
+ QLabel *m_printerlabel = new TQLabel(i18n("Printer:"), this);
+ m_work = new TQLineEdit(this);
+ m_server = new TQLineEdit(this);
+ m_printer = new TQLineEdit(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
- QGridLayout *lay1 = new QGridLayout(0, 3, 2, 0, 10);
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
+ QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, 10);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10);
lay0->addLayout(lay1,0);
lay0->addWidget(m_view,1);
lay0->addLayout(lay3,0);
@@ -67,13 +67,13 @@ KMWSmb::KMWSmb(QWidget *parent, const char *name)
lay3->addWidget(m_scan);
lay3->addWidget(m_abort);
- connect(m_scan,SIGNAL(clicked()),SLOT(slotScan()));
- connect(m_abort,SIGNAL(clicked()),SLOT(slotAbort()));
- connect(m_view,SIGNAL(printerSelected(const QString&,const QString&,const QString&)),SLOT(slotPrinterSelected(const QString&,const QString&,const QString&)));
- connect(m_view,SIGNAL(running(bool)),m_abort,SLOT(setEnabled(bool)));
+ connect(m_scan,TQT_SIGNAL(clicked()),TQT_SLOT(slotScan()));
+ connect(m_abort,TQT_SIGNAL(clicked()),TQT_SLOT(slotAbort()));
+ connect(m_view,TQT_SIGNAL(printerSelected(const TQString&,const TQString&,const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&,const TQString&,const TQString&)));
+ connect(m_view,TQT_SIGNAL(running(bool)),m_abort,TQT_SLOT(setEnabled(bool)));
}
-bool KMWSmb::isValid(QString& msg)
+bool KMWSmb::isValid(TQString& msg)
{
if (m_server->text().isEmpty())
msg = i18n("Empty server name.");
@@ -86,7 +86,7 @@ bool KMWSmb::isValid(QString& msg)
void KMWSmb::updatePrinter(KMPrinter *printer)
{
- QString uri = buildSmbURI( m_work->text(), m_server->text(), m_printer->text(), printer->option( "kde-login" ), printer->option( "kde-password" ) );
+ TQString uri = buildSmbURI( m_work->text(), m_server->text(), m_printer->text(), printer->option( "kde-login" ), printer->option( "kde-password" ) );
printer->setDevice( uri );
}
@@ -94,7 +94,7 @@ void KMWSmb::initPrinter(KMPrinter *printer)
{
if (printer)
{
- QString login = printer->option( "kde-login" );
+ TQString login = printer->option( "kde-login" );
m_view->setLoginInfos(login,printer->option("kde-password"));
m_loginlabel->setText( i18n( "Login: %1" ).arg( login.isEmpty() ? i18n( "<anonymous>" ) : login ) );
}
@@ -110,7 +110,7 @@ void KMWSmb::slotAbort()
m_view->abort();
}
-void KMWSmb::slotPrinterSelected(const QString& work, const QString& server, const QString& printer)
+void KMWSmb::slotPrinterSelected(const TQString& work, const TQString& server, const TQString& printer)
{
m_work->setText(work);
m_server->setText(server);
diff --git a/kdeprint/management/kmwsmb.h b/kdeprint/management/kmwsmb.h
index e76668f74..8c0768287 100644
--- a/kdeprint/management/kmwsmb.h
+++ b/kdeprint/management/kmwsmb.h
@@ -30,21 +30,21 @@ class KMWSmb : public KMWizardPage
{
Q_OBJECT
public:
- KMWSmb(QWidget *parent = 0, const char *name = 0);
+ KMWSmb(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
protected slots:
void slotScan();
void slotAbort();
- void slotPrinterSelected(const QString& work, const QString& server, const QString& printer);
+ void slotPrinterSelected(const TQString& work, const TQString& server, const TQString& printer);
protected:
SmbView *m_view;
QLineEdit *m_work, *m_server, *m_printer;
- QLabel *m_loginlabel;
+ TQLabel *m_loginlabel;
};
#endif
diff --git a/kdeprint/management/kmwsocket.cpp b/kdeprint/management/kmwsocket.cpp
index aa7ebb340..749ab8ea7 100644
--- a/kdeprint/management/kmwsocket.cpp
+++ b/kdeprint/management/kmwsocket.cpp
@@ -23,16 +23,16 @@
#include "kmprinter.h"
#include <klistview.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KMWSocket::KMWSocket(QWidget *parent, const char *name)
+KMWSocket::KMWSocket(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("Network Printer Information");
@@ -42,15 +42,15 @@ KMWSocket::KMWSocket(QWidget *parent, const char *name)
m_list = new KListView(this);
m_list->addColumn("");
m_list->header()->hide();
- m_list->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_list->setLineWidth(1);
- QLabel *l1 = new QLabel(i18n("&Printer address:"),this);
- QLabel *l2 = new QLabel(i18n("P&ort:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Printer address:"),this);
+ QLabel *l2 = new TQLabel(i18n("P&ort:"),this);
- m_printer = new QLineEdit(this);
- m_port = new QLineEdit(this);
- m_port->setText(QString("9100"));
+ m_printer = new TQLineEdit(this);
+ m_port = new TQLineEdit(this);
+ m_port->setText(TQString("9100"));
l1->setBuddy(m_printer);
l2->setBuddy(m_port);
@@ -60,15 +60,15 @@ KMWSocket::KMWSocket(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(40);
- connect(m_list,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
- connect( m_scanner, SIGNAL( scanStarted() ), SLOT( slotScanStarted() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), SLOT( slotScanFinished() ) );
- connect( m_scanner, SIGNAL( scanStarted() ), parent, SLOT( disableWizard() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), parent, SLOT( enableWizard() ) );
+ connect(m_list,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), TQT_SLOT( slotScanStarted() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), TQT_SLOT( slotScanFinished() ) );
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), parent, TQT_SLOT( disableWizard() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), parent, TQT_SLOT( enableWizard() ) );
// layout
- QHBoxLayout *lay3 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0);
lay3->addWidget(m_list,1);
lay3->addLayout(lay2,1);
@@ -88,11 +88,11 @@ KMWSocket::~KMWSocket()
void KMWSocket::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text());
+ QString dev = TQString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text());
p->setDevice(dev);
}
-bool KMWSocket::isValid(QString& msg)
+bool KMWSocket::isValid(TQString& msg)
{
if (m_printer->text().isEmpty())
{
@@ -127,8 +127,8 @@ void KMWSocket::slotScanStarted()
void KMWSocket::slotScanFinished()
{
- const QPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
- QPtrListIterator<NetworkScanner::SocketInfo> it(*list);
+ const TQPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
+ TQPtrListIterator<NetworkScanner::SocketInfo> it(*list);
for (;it.current();++it)
{
QString name;
@@ -136,12 +136,12 @@ void KMWSocket::slotScanFinished()
name = i18n("Unknown host - 1 is the IP", "<Unknown> (%1)").arg(it.current()->IP);
else
name = it.current()->Name;
- QListViewItem *item = new QListViewItem(m_list,name,it.current()->IP,QString::number(it.current()->Port));
+ QListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port));
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
-void KMWSocket::slotPrinterSelected(QListViewItem *item)
+void KMWSocket::slotPrinterSelected(TQListViewItem *item)
{
if (!item) return;
m_printer->setText(item->text(1));
diff --git a/kdeprint/management/kmwsocket.h b/kdeprint/management/kmwsocket.h
index f7aeb7157..ca0b506df 100644
--- a/kdeprint/management/kmwsocket.h
+++ b/kdeprint/management/kmwsocket.h
@@ -31,14 +31,14 @@ class KMWSocket : public KMWizardPage
{
Q_OBJECT
public:
- KMWSocket(QWidget *parent = 0, const char *name = 0);
+ KMWSocket(TQWidget *parent = 0, const char *name = 0);
~KMWSocket();
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
void slotScanStarted();
void slotScanFinished();
diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp
index f0a6b3bba..d3f838ce7 100644
--- a/kdeprint/management/kmwsocketutil.cpp
+++ b/kdeprint/management/kmwsocketutil.cpp
@@ -22,14 +22,14 @@
#include "kmwsocketutil.h"
-#include <qprogressbar.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <knumvalidator.h>
#include <kapplication.h>
@@ -39,30 +39,30 @@
#include <unistd.h>
-QString localRootIP();
+TQString localRootIP();
//----------------------------------------------------------------------------------------
-SocketConfig::SocketConfig(KMWSocketUtil *util, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
KIntValidator *val = new KIntValidator( this );
- QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy);
- QLabel *portlabel = new QLabel(i18n("&Port:"),dummy);
- QLabel *toutlabel = new QLabel(i18n("&Timeout (ms):"),dummy);
- QLineEdit *mm = new QLineEdit(dummy);
- mm->setText(QString::fromLatin1(".[0-255]"));
+ QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy);
+ QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy);
+ QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy);
+ QLineEdit *mm = new TQLineEdit(dummy);
+ mm->setText(TQString::fromLatin1(".[0-255]"));
mm->setReadOnly(true);
mm->setFixedWidth(fontMetrics().width(mm->text())+10);
- mask_ = new QLineEdit(dummy);
+ mask_ = new TQLineEdit(dummy);
mask_->setAlignment(Qt::AlignRight);
- port_ = new QComboBox(true,dummy);
+ port_ = new TQComboBox(true,dummy);
if ( port_->lineEdit() )
port_->lineEdit()->setValidator( val );
- tout_ = new QLineEdit(dummy);
+ tout_ = new TQLineEdit(dummy);
tout_->setValidator( val );
masklabel->setBuddy(mask_);
@@ -74,11 +74,11 @@ SocketConfig::SocketConfig(KMWSocketUtil *util, QWidget *parent, const char *nam
port_->insertItem("9100");
port_->insertItem("9101");
port_->insertItem("9102");
- port_->setEditText(QString::number(util->port_));
- tout_->setText(QString::number(util->timeout_));
+ port_->setEditText(TQString::number(util->port_));
+ tout_->setText(TQString::number(util->timeout_));
- QGridLayout *main_ = new QGridLayout(dummy, 3, 2, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 5);
+ QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5);
main_->addWidget(masklabel, 0, 0);
main_->addWidget(portlabel, 1, 0);
main_->addWidget(toutlabel, 2, 0);
@@ -138,7 +138,7 @@ KMWSocketUtil::KMWSocketUtil()
timeout_ = 50;
}
-bool KMWSocketUtil::checkPrinter(const QString& IPstr, int port, QString* hostname)
+bool KMWSocketUtil::checkPrinter(const TQString& IPstr, int port, TQString* hostname)
{
KExtendedSocket sock(IPstr, port, KExtendedSocket::inetSocket|KExtendedSocket::streamSocket);
bool result(false);
@@ -156,7 +156,7 @@ bool KMWSocketUtil::checkPrinter(const QString& IPstr, int port, QString* hostna
return result;
}
-bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
+bool KMWSocketUtil::scanNetwork(TQProgressBar *bar)
{
printerlist_.setAutoDelete(true);
printerlist_.clear();
@@ -165,7 +165,7 @@ bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
bar->setTotalSteps(n);
for (int i=0; i<n; i++)
{
- QString IPstr = root_ + "." + QString::number(i);
+ QString IPstr = root_ + "." + TQString::number(i);
QString hostname;
if (checkPrinter(IPstr, port_, &hostname))
{ // we found a printer at this address, create SocketInfo entry in printer list
@@ -184,7 +184,7 @@ bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
return true;
}
-void KMWSocketUtil::configureScan(QWidget *parent)
+void KMWSocketUtil::configureScan(TQWidget *parent)
{
SocketConfig *dlg = new SocketConfig(this,parent);
if (dlg->exec())
@@ -198,13 +198,13 @@ void KMWSocketUtil::configureScan(QWidget *parent)
//----------------------------------------------------------------------------------------
-QString localRootIP()
+TQString localRootIP()
{
char buf[256];
buf[0] = '\0';
if (!gethostname(buf, sizeof(buf)))
buf[sizeof(buf)-1] = '\0';
- QPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, QString::null);
+ TQPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, TQString::null);
infos.setAutoDelete(true);
if (infos.count() > 0)
{
@@ -213,7 +213,7 @@ QString localRootIP()
IPstr.truncate(p);
return IPstr;
}
- return QString::null;
+ return TQString::null;
}
#include "kmwsocketutil.moc"
diff --git a/kdeprint/management/kmwsocketutil.h b/kdeprint/management/kmwsocketutil.h
index fa1942ef5..0fd96cc59 100644
--- a/kdeprint/management/kmwsocketutil.h
+++ b/kdeprint/management/kmwsocketutil.h
@@ -20,8 +20,8 @@
#ifndef KMWSOCKETUTIL_H
#define KMWSOCKETUTIL_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
struct SocketInfo
@@ -41,7 +41,7 @@ class SocketConfig : public KDialogBase
friend class KMWSocketUtil;
Q_OBJECT
public:
- SocketConfig(KMWSocketUtil *util, QWidget *parent = 0, const char *name = 0);
+ SocketConfig(KMWSocketUtil *util, TQWidget *parent = 0, const char *name = 0);
~SocketConfig();
protected slots:
@@ -59,15 +59,15 @@ class KMWSocketUtil
public:
KMWSocketUtil();
- bool checkPrinter(const QString& host, int port, QString* hostname = 0);
+ bool checkPrinter(const TQString& host, int port, TQString* hostname = 0);
- const QPtrList<SocketInfo>* printerList() { return &printerlist_; }
- bool scanNetwork(QProgressBar *bar = 0);
- void configureScan(QWidget *parent = 0);
+ const TQPtrList<SocketInfo>* printerList() { return &printerlist_; }
+ bool scanNetwork(TQProgressBar *bar = 0);
+ void configureScan(TQWidget *parent = 0);
void setDefaultPort(int p) { port_ = p; }
private:
- QPtrList<SocketInfo> printerlist_;
+ TQPtrList<SocketInfo> printerlist_;
QString root_;
int port_;
int timeout_; // in milliseconds
diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp
index b9610ad13..24e6f4adf 100644
--- a/kdeprint/management/kxmlcommanddlg.cpp
+++ b/kdeprint/management/kxmlcommanddlg.cpp
@@ -21,21 +21,21 @@
#include "driver.h"
#include "kxmlcommand.h"
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqtoolbutton.h>
#include <kpushbutton.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
#include <ktextedit.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
#include <klistview.h>
#include <klocale.h>
@@ -49,14 +49,14 @@
#include <kdebug.h>
#include <kguiitem.h>
-QString generateId(const QMap<QString, DrBase*>& map)
+TQString generateId(const TQMap<TQString, DrBase*>& map)
{
int index(-1);
- while (map.contains(QString::fromLatin1("item%1").arg(++index))) ;
- return QString::fromLatin1("item%1").arg(index);
+ while (map.contains(TQString::fromLatin1("item%1").arg(++index))) ;
+ return TQString::fromLatin1("item%1").arg(index);
}
-QListViewItem* findPrev(QListViewItem *item)
+TQListViewItem* findPrev(TQListViewItem *item)
{
QListViewItem *prev = item->itemAbove();
while (prev && prev->depth() > item->depth())
@@ -67,7 +67,7 @@ QListViewItem* findPrev(QListViewItem *item)
return 0;
}
-QListViewItem* findNext(QListViewItem *item)
+TQListViewItem* findNext(TQListViewItem *item)
{
QListViewItem *next = item->itemBelow();
while (next && next->depth() > item->depth())
@@ -78,63 +78,63 @@ QListViewItem* findNext(QListViewItem *item)
return 0;
}
-KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name)
-: QWidget(parent, name)
+KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_xmlcmd = 0;
- m_command = new QLineEdit(this);
+ m_command = new TQLineEdit(this);
m_view = new KListView(this);
m_view->addColumn("");
m_view->header()->hide();
m_view->setSorting(-1);
- m_apply = new QToolButton(this);
- m_apply->setIconSet( QApplication::reverseLayout()? SmallIconSet( "forward" ) : SmallIconSet("back"));
- m_addgrp = new QToolButton(this);
+ m_apply = new TQToolButton(this);
+ m_apply->setIconSet( TQApplication::reverseLayout()? SmallIconSet( "forward" ) : SmallIconSet("back"));
+ m_addgrp = new TQToolButton(this);
m_addgrp->setIconSet(SmallIconSet("folder"));
- m_addopt = new QToolButton(this);
+ m_addopt = new TQToolButton(this);
m_addopt->setIconSet(SmallIconSet("document"));
- m_delopt = new QToolButton(this);
+ m_delopt = new TQToolButton(this);
m_delopt->setIconSet(SmallIconSet("editdelete"));
- m_up = new QToolButton(this);
+ m_up = new TQToolButton(this);
m_up->setIconSet(SmallIconSet("up"));
- m_down = new QToolButton(this);
+ m_down = new TQToolButton(this);
m_down->setIconSet(SmallIconSet("down"));
- m_dummy = new QWidget(this);
- m_desc = new QLineEdit(m_dummy);
- m_name = new QLineEdit(m_dummy);
- m_type = new QComboBox(m_dummy);
+ m_dummy = new TQWidget(this);
+ m_desc = new TQLineEdit(m_dummy);
+ m_name = new TQLineEdit(m_dummy);
+ m_type = new TQComboBox(m_dummy);
m_type->insertItem(i18n("String"));
m_type->insertItem(i18n("Integer"));
m_type->insertItem(i18n("Float"));
m_type->insertItem(i18n("List"));
m_type->insertItem(i18n("Boolean"));
- m_format = new QLineEdit(m_dummy);
- m_default = new QLineEdit(m_dummy);
- QLabel *m_namelab = new QLabel(i18n("&Name:"), m_dummy);
- QLabel *m_desclab = new QLabel(i18n("&Description:"), m_dummy);
- QLabel *m_formatlab = new QLabel(i18n("&Format:"), m_dummy);
- QLabel *m_typelab = new QLabel(i18n("&Type:"), m_dummy);
- QLabel *m_defaultlab = new QLabel(i18n("Default &value:"), m_dummy);
- QLabel *m_commandlab = new QLabel(i18n("Co&mmand:"), this);
+ m_format = new TQLineEdit(m_dummy);
+ m_default = new TQLineEdit(m_dummy);
+ QLabel *m_namelab = new TQLabel(i18n("&Name:"), m_dummy);
+ QLabel *m_desclab = new TQLabel(i18n("&Description:"), m_dummy);
+ QLabel *m_formatlab = new TQLabel(i18n("&Format:"), m_dummy);
+ QLabel *m_typelab = new TQLabel(i18n("&Type:"), m_dummy);
+ QLabel *m_defaultlab = new TQLabel(i18n("Default &value:"), m_dummy);
+ QLabel *m_commandlab = new TQLabel(i18n("Co&mmand:"), this);
m_namelab->setBuddy(m_name);
m_desclab->setBuddy(m_desc);
m_formatlab->setBuddy(m_format);
m_typelab->setBuddy(m_type);
m_defaultlab->setBuddy(m_default);
m_commandlab->setBuddy(m_command);
- m_persistent = new QCheckBox( i18n( "&Persistent option" ), m_dummy );
+ m_persistent = new TQCheckBox( i18n( "&Persistent option" ), m_dummy );
- QGroupBox *gb = new QGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy);
- m_stack = new QWidgetStack(gb);
- QWidget *w1 = new QWidget(m_stack), *w2 = new QWidget(m_stack), *w3 = new QWidget(m_stack);
+ QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy);
+ m_stack = new TQWidgetStack(gb);
+ QWidget *w1 = new TQWidget(m_stack), *w2 = new TQWidget(m_stack), *w3 = new TQWidget(m_stack);
m_stack->addWidget(w1, 1);
m_stack->addWidget(w2, 2);
m_stack->addWidget(w3, 3);
- m_edit1 = new QLineEdit(w1);
- m_edit2 = new QLineEdit(w1);
- QLabel *m_editlab1 = new QLabel(i18n("Minimum v&alue:"), w1);
- QLabel *m_editlab2 = new QLabel(i18n("Ma&ximum value:"), w1);
+ m_edit1 = new TQLineEdit(w1);
+ m_edit2 = new TQLineEdit(w1);
+ QLabel *m_editlab1 = new TQLabel(i18n("Minimum v&alue:"), w1);
+ QLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1);
m_editlab1->setBuddy(m_edit1);
m_editlab2->setBuddy(m_edit2);
m_values = new KListView(w2);
@@ -143,46 +143,46 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
m_values->setAllColumnsShowFocus(true);
m_values->setSorting(-1);
m_values->setMaximumHeight(110);
- m_addval = new QToolButton(w2);
+ m_addval = new TQToolButton(w2);
m_addval->setIconSet(SmallIconSet("editcopy"));
- m_delval = new QToolButton(w2);
+ m_delval = new TQToolButton(w2);
m_delval->setIconSet(SmallIconSet("editdelete"));
- QToolTip::add(m_addval, i18n("Add value"));
- QToolTip::add(m_delval, i18n("Delete value"));
+ TQToolTip::add(m_addval, i18n("Add value"));
+ TQToolTip::add(m_delval, i18n("Delete value"));
- QToolTip::add(m_apply, i18n("Apply changes"));
- QToolTip::add(m_addgrp, i18n("Add group"));
- QToolTip::add(m_addopt, i18n("Add option"));
- QToolTip::add(m_delopt, i18n("Delete item"));
- QToolTip::add(m_up, i18n("Move up"));
- QToolTip::add(m_down, i18n("Move down"));
+ TQToolTip::add(m_apply, i18n("Apply changes"));
+ TQToolTip::add(m_addgrp, i18n("Add group"));
+ TQToolTip::add(m_addopt, i18n("Add option"));
+ TQToolTip::add(m_delopt, i18n("Delete item"));
+ TQToolTip::add(m_up, i18n("Move up"));
+ TQToolTip::add(m_down, i18n("Move down"));
KSeparator *sep1 = new KSeparator(KSeparator::HLine, m_dummy);
- QGroupBox *gb_input = new QGroupBox(0, Qt::Horizontal, i18n("&Input From"), this);
- QGroupBox *gb_output = new QGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this);
- QLabel *m_inputfilelab = new QLabel(i18n("File:"), gb_input);
- QLabel *m_inputpipelab = new QLabel(i18n("Pipe:"), gb_input);
- QLabel *m_outputfilelab = new QLabel(i18n("File:"), gb_output);
- QLabel *m_outputpipelab = new QLabel(i18n("Pipe:"), gb_output);
- m_inputfile = new QLineEdit(gb_input);
- m_inputpipe = new QLineEdit(gb_input);
- m_outputfile = new QLineEdit(gb_output);
- m_outputpipe = new QLineEdit(gb_output);
+ QGroupBox *gb_input = new TQGroupBox(0, Qt::Horizontal, i18n("&Input From"), this);
+ QGroupBox *gb_output = new TQGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this);
+ QLabel *m_inputfilelab = new TQLabel(i18n("File:"), gb_input);
+ QLabel *m_inputpipelab = new TQLabel(i18n("Pipe:"), gb_input);
+ QLabel *m_outputfilelab = new TQLabel(i18n("File:"), gb_output);
+ QLabel *m_outputpipelab = new TQLabel(i18n("Pipe:"), gb_output);
+ m_inputfile = new TQLineEdit(gb_input);
+ m_inputpipe = new TQLineEdit(gb_input);
+ m_outputfile = new TQLineEdit(gb_output);
+ m_outputpipe = new TQLineEdit(gb_output);
m_comment = new KTextEdit( this );
m_comment->setTextFormat(Qt::RichText );
m_comment->setReadOnly(true);
- QLabel *m_commentlab = new QLabel( i18n( "Comment:" ), this );
+ TQLabel *m_commentlab = new TQLabel( i18n( "Comment:" ), this );
- QVBoxLayout *l2 = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
- QVBoxLayout *l7 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l2 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
+ QVBoxLayout *l7 = new TQVBoxLayout(0, 0, 0);
l2->addLayout(l3, 0);
l3->addWidget(m_commandlab);
l3->addWidget(m_command);
- QHBoxLayout *l0 = new QHBoxLayout(0, 0, KDialog::spacingHint());
- QGridLayout *l10 = new QGridLayout(0, 2, 2, 0, KDialog::spacingHint());
+ QHBoxLayout *l0 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
+ QGridLayout *l10 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint());
l2->addLayout(l0, 1);
l0->addLayout(l10);
l10->addMultiCellWidget(m_view, 0, 0, 0, 1);
@@ -200,7 +200,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l7->addWidget(m_down);
l7->addStretch(1);
l0->addWidget(m_dummy, 1);
- QGridLayout *l1 = new QGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint());
+ QGridLayout *l1 = new TQGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint());
l1->addWidget(m_desclab, 0, 0, Qt::AlignRight|Qt::AlignVCenter);
l1->addWidget(m_desc, 0, 1);
l1->addMultiCellWidget(sep1, 1, 1, 0, 1);
@@ -216,23 +216,23 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l1->addMultiCellWidget(gb, 7, 7, 0, 1);
l1->setRowStretch(8, 1);
- QHBoxLayout *l4 = new QHBoxLayout(w2, 0, KDialog::spacingHint());
+ QHBoxLayout *l4 = new TQHBoxLayout(w2, 0, KDialog::spacingHint());
l4->addWidget(m_values);
- QVBoxLayout *l6 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l6 = new TQVBoxLayout(0, 0, 0);
l4->addLayout(l6);
l6->addWidget(m_addval);
l6->addWidget(m_delval);
l6->addStretch(1);
- QGridLayout *l5 = new QGridLayout(w1, 3, 2, 0, KDialog::spacingHint());
+ QGridLayout *l5 = new TQGridLayout(w1, 3, 2, 0, KDialog::spacingHint());
l5->setRowStretch(2, 1);
l5->addWidget(m_editlab1, 0, 0, Qt::AlignRight|Qt::AlignVCenter);
l5->addWidget(m_editlab2, 1, 0, Qt::AlignRight|Qt::AlignVCenter);
l5->addWidget(m_edit1, 0, 1);
l5->addWidget(m_edit2, 1, 1);
- QGridLayout *l8 = new QGridLayout(gb_input->layout(), 2, 2,
+ QGridLayout *l8 = new TQGridLayout(gb_input->layout(), 2, 2,
KDialog::spacingHint());
- QGridLayout *l9 = new QGridLayout(gb_output->layout(), 2, 2,
+ QGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2,
KDialog::spacingHint());
l8->addWidget(m_inputfilelab, 0, 0);
l8->addWidget(m_inputpipelab, 1, 0);
@@ -243,73 +243,73 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l9->addWidget(m_outputfile, 0, 1);
l9->addWidget(m_outputpipe, 1, 1);
- QVBoxLayout *l11 = new QVBoxLayout(gb->layout());
+ QVBoxLayout *l11 = new TQVBoxLayout(gb->layout());
l11->addWidget(m_stack);
- QVBoxLayout *l12 = new QVBoxLayout( 0, 0, 0 );
+ TQVBoxLayout *l12 = new TQVBoxLayout( 0, 0, 0 );
l2->addSpacing( 10 );
l2->addLayout( l12 );
l12->addWidget( m_commentlab );
l12->addWidget( m_comment );
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelectionChanged(QListViewItem*)));
- connect(m_values, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotValueSelected(QListViewItem*)));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
- connect(m_addval, SIGNAL(clicked()), SLOT(slotAddValue()));
- connect(m_delval, SIGNAL(clicked()), SLOT(slotRemoveValue()));
- connect(m_apply, SIGNAL(clicked()), SLOT(slotApplyChanges()));
- connect(m_addgrp, SIGNAL(clicked()), SLOT(slotAddGroup()));
- connect(m_addopt, SIGNAL(clicked()), SLOT(slotAddOption()));
- connect(m_delopt, SIGNAL(clicked()), SLOT(slotRemoveItem()));
- connect(m_up, SIGNAL(clicked()), SLOT(slotMoveUp()));
- connect(m_down, SIGNAL(clicked()), SLOT(slotMoveDown()));
- connect(m_command, SIGNAL(textChanged(const QString&)), SLOT(slotCommandChanged(const QString&)));
- connect(m_view, SIGNAL(itemRenamed(QListViewItem*,int)), SLOT(slotOptionRenamed(QListViewItem*,int)));
- connect(m_desc, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_name, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_format, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_default, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_edit1, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_edit2, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotChanged()));
- connect(m_addval, SIGNAL(clicked()), SLOT(slotChanged()));
- connect(m_delval, SIGNAL(clicked()), SLOT(slotChanged()));
- connect( m_persistent, SIGNAL( toggled(bool) ), SLOT( slotChanged() ) );
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
+ connect(m_values, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotValueSelected(TQListViewItem*)));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
+ connect(m_addval, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddValue()));
+ connect(m_delval, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveValue()));
+ connect(m_apply, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyChanges()));
+ connect(m_addgrp, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddGroup()));
+ connect(m_addopt, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddOption()));
+ connect(m_delopt, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveItem()));
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveUp()));
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveDown()));
+ connect(m_command, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotCommandChanged(const TQString&)));
+ connect(m_view, TQT_SIGNAL(itemRenamed(TQListViewItem*,int)), TQT_SLOT(slotOptionRenamed(TQListViewItem*,int)));
+ connect(m_desc, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_name, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_format, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_default, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_edit1, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_edit2, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged()));
+ connect(m_addval, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
+ connect(m_delval, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
+ connect( m_persistent, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotChanged() ) );
m_dummy->setEnabled(false);
viewItem(0);
/**
* Add some short help for the normal (non expert) user
*/
- QWhatsThis::add( m_name, i18n(
+ TQWhatsThis::add( m_name, i18n(
"An identification string. Use only alphanumeric characters except spaces. "
"The string <b>__root__</b> is reserved for internal use." ) );
- QWhatsThis::add( m_namelab, QWhatsThis::textFor( m_name ) );
- QWhatsThis::add( m_desc, i18n(
+ TQWhatsThis::add( m_namelab, TQWhatsThis::textFor( m_name ) );
+ TQWhatsThis::add( m_desc, i18n(
"A description string. This string is shown in the interface, and should "
"be explicit enough about the role of the corresponding option." ) );
- QWhatsThis::add( m_desclab, QWhatsThis::textFor( m_desc ) );
- QWhatsThis::add( m_type, i18n(
+ TQWhatsThis::add( m_desclab, TQWhatsThis::textFor( m_desc ) );
+ TQWhatsThis::add( m_type, i18n(
"The type of the option. This determines how the option is presented "
"graphically to the user." ) );
- QWhatsThis::add( m_typelab, QWhatsThis::textFor( m_type ) );
- QWhatsThis::add( m_format, i18n(
+ TQWhatsThis::add( m_typelab, TQWhatsThis::textFor( m_type ) );
+ TQWhatsThis::add( m_format, i18n(
"The format of the option. This determines how the option is formatted "
"for inclusion in the global command line. The tag <b>%value</b> can be used "
"to represent the user selection. This tag will be replaced at run-time by a "
"string representation of the option value." ) );
- QWhatsThis::add( m_formatlab, QWhatsThis::textFor( m_format ) );
- QWhatsThis::add( m_default, i18n(
+ TQWhatsThis::add( m_formatlab, TQWhatsThis::textFor( m_format ) );
+ TQWhatsThis::add( m_default, i18n(
"The default value of the option. For non persistent options, nothing is "
"added to the command line if the option has that default value. If this "
"value does not correspond to the actual default value of the underlying "
"utility, make the option persistent to avoid unwanted effects." ) );
- QWhatsThis::add( m_defaultlab, QWhatsThis::textFor( m_default ) );
- QWhatsThis::add( m_persistent, i18n(
+ TQWhatsThis::add( m_defaultlab, TQWhatsThis::textFor( m_default ) );
+ TQWhatsThis::add( m_persistent, i18n(
"Make the option persistent. A persistent option is always written to the "
"command line, whatever its value. This is useful when the chosen default "
"value does not match with the actual default value of the underlying utility." ) );
- QWhatsThis::add( m_command, i18n(
+ TQWhatsThis::add( m_command, i18n(
"The full command line to execute the associated underlying utility. This "
"command line is based on a mechanism of tags that are replaced at run-time. "
"The supported tags are:<ul>"
@@ -318,28 +318,28 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
"<li><b>%filteroutput</b>: output specification</li>"
"<li><b>%psu</b>: the page size in upper case</li>"
"<li><b>%psl</b>: the page size in lower case</li></ul>" ) );
- QWhatsThis::add( m_commandlab, QWhatsThis::textFor( m_command ) );
- QWhatsThis::add( m_inputfile, i18n(
+ TQWhatsThis::add( m_commandlab, TQWhatsThis::textFor( m_command ) );
+ TQWhatsThis::add( m_inputfile, i18n(
"Input specification when the underlying utility reads input data from a file. Use "
"the tag <b>%in</b> to represent the input filename." ) );
- QWhatsThis::add( m_inputfilelab, QWhatsThis::textFor( m_inputfile ) );
- QWhatsThis::add( m_outputfile, i18n(
+ TQWhatsThis::add( m_inputfilelab, TQWhatsThis::textFor( m_inputfile ) );
+ TQWhatsThis::add( m_outputfile, i18n(
"Output specification when the underlying utility writes output data to a file. Use "
"the tag <b>%out</b> to represent the output filename." ) );
- QWhatsThis::add( m_outputfilelab, QWhatsThis::textFor( m_outputfile ) );
- QWhatsThis::add( m_inputpipe, i18n(
+ TQWhatsThis::add( m_outputfilelab, TQWhatsThis::textFor( m_outputfile ) );
+ TQWhatsThis::add( m_inputpipe, i18n(
"Input specification when the underlying utility reads input data from its "
"standard input." ) );
- QWhatsThis::add( m_inputpipelab, QWhatsThis::textFor( m_inputpipe ) );
- QWhatsThis::add( m_outputpipe, i18n(
+ TQWhatsThis::add( m_inputpipelab, TQWhatsThis::textFor( m_inputpipe ) );
+ TQWhatsThis::add( m_outputpipe, i18n(
"Output specification when the underlying utility writes output data to its "
"standard output." ) );
- QWhatsThis::add( m_outputpipelab, QWhatsThis::textFor( m_outputpipe ) );
- QWhatsThis::add( m_comment, i18n(
+ TQWhatsThis::add( m_outputpipelab, TQWhatsThis::textFor( m_outputpipe ) );
+ TQWhatsThis::add( m_comment, i18n(
"A comment about the underlying utility, which can be viewed by the user "
"from the interface. This comment string supports basic HTML tags like "
"&lt;a&gt;, &lt;b&gt; or &lt;i&gt;." ) );
- QWhatsThis::add( m_commentlab, QWhatsThis::textFor( m_comment ) );
+ TQWhatsThis::add( m_commentlab, TQWhatsThis::textFor( m_comment ) );
resize(660, 200);
}
@@ -349,7 +349,7 @@ KXmlCommandAdvancedDlg::~KXmlCommandAdvancedDlg()
if (m_opts.count() > 0)
{
kdDebug() << "KXmlCommandAdvancedDlg: " << m_opts.count() << " items remaining" << endl;
- for (QMap<QString,DrBase*>::ConstIterator it=m_opts.begin(); it!=m_opts.end(); ++it)
+ for (TQMap<TQString,DrBase*>::ConstIterator it=m_opts.begin(); it!=m_opts.end(); ++it)
{
//kdDebug() << "Item: name=" << (*it)->name() << endl;
delete (*it);
@@ -367,7 +367,7 @@ void KXmlCommandAdvancedDlg::setCommand(KXmlCommand *xmlcmd)
void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd)
{
m_view->clear();
- QListViewItem *root = new QListViewItem(m_view, xmlcmd->name(), xmlcmd->name());
+ QListViewItem *root = new TQListViewItem(m_view, xmlcmd->name(), xmlcmd->name());
DrMain *driver = xmlcmd->driver();
root->setPixmap(0, SmallIcon("fileprint"));
@@ -393,11 +393,11 @@ void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd)
viewItem(0);
}
-void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
+void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, TQListViewItem *parent)
{
QListViewItem *item(0);
- QPtrListIterator<DrGroup> git(grp->groups());
+ TQPtrListIterator<DrGroup> git(grp->groups());
for (; git.current(); ++git)
{
QString namestr = git.current()->name();
@@ -406,7 +406,7 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
namestr = "group_"+kapp->randomString(4);
}
git.current()->setName(namestr);
- item = new QListViewItem(parent, item, git.current()->get("text"), git.current()->name());
+ item = new TQListViewItem(parent, item, git.current()->get("text"), git.current()->name());
item->setPixmap(0, SmallIcon("folder"));
item->setOpen(true);
item->setRenameEnabled(0, true);
@@ -414,7 +414,7 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
m_opts[namestr] = git.current();
}
- QPtrListIterator<DrBase> oit(grp->options());
+ TQPtrListIterator<DrBase> oit(grp->options());
for (; oit.current(); ++oit)
{
QString namestr = oit.current()->name().mid(m_xmlcmd->name().length()+6);
@@ -423,21 +423,21 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
namestr = "option_"+kapp->randomString(4);
}
oit.current()->setName(namestr);
- item = new QListViewItem(parent, item, oit.current()->get("text"), namestr);
+ item = new TQListViewItem(parent, item, oit.current()->get("text"), namestr);
item->setPixmap(0, SmallIcon("document"));
item->setRenameEnabled(0, true);
m_opts[namestr] = oit.current();
}
}
-void KXmlCommandAdvancedDlg::slotSelectionChanged(QListViewItem *item)
+void KXmlCommandAdvancedDlg::slotSelectionChanged(TQListViewItem *item)
{
if (item && item->depth() == 0)
item = 0;
viewItem(item);
}
-void KXmlCommandAdvancedDlg::viewItem(QListViewItem *item)
+void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item)
{
m_dummy->setEnabled((item != 0));
m_name->setText("");
@@ -480,11 +480,11 @@ void KXmlCommandAdvancedDlg::viewItem(QListViewItem *item)
case DrBase::Boolean:
case DrBase::List:
{
- QPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
QListViewItem *item(0);
for (; it.current(); ++it)
{
- item = new QListViewItem(m_values, item, it.current()->name(), it.current()->get("text"));
+ item = new TQListViewItem(m_values, item, it.current()->name(), it.current()->get("text"));
item->setRenameEnabled(0, true);
item->setRenameEnabled(1, true);
}
@@ -542,7 +542,7 @@ void KXmlCommandAdvancedDlg::slotTypeChanged(int ID)
void KXmlCommandAdvancedDlg::slotAddValue()
{
- QListViewItem *item = new QListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description"));
+ QListViewItem *item = new TQListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description"));
item->setRenameEnabled(0, true);
item->setRenameEnabled(1, true);
m_values->ensureItemVisible(item);
@@ -649,7 +649,7 @@ void KXmlCommandAdvancedDlg::slotAddGroup()
grp->set("text", i18n("New Group"));
m_opts[ID] = grp;
- QListViewItem *item = new QListViewItem(m_view->currentItem(), i18n("New Group"), ID);
+ QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Group"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("folder"));
m_view->ensureItemVisible(item);
@@ -668,7 +668,7 @@ void KXmlCommandAdvancedDlg::slotAddOption()
opt->set("text", i18n("New Option"));
m_opts[ID] = opt;
- QListViewItem *item = new QListViewItem(m_view->currentItem(), i18n("New Option"), ID);
+ QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Option"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("document"));
m_view->ensureItemVisible(item);
@@ -690,7 +690,7 @@ void KXmlCommandAdvancedDlg::slotRemoveItem()
}
}
-void KXmlCommandAdvancedDlg::removeItem(QListViewItem *item)
+void KXmlCommandAdvancedDlg::removeItem(TQListViewItem *item)
{
delete m_opts[item->text(1)];
m_opts.remove(item->text(1));
@@ -733,7 +733,7 @@ void KXmlCommandAdvancedDlg::slotMoveDown()
}
}
-void KXmlCommandAdvancedDlg::slotCommandChanged(const QString& cmd)
+void KXmlCommandAdvancedDlg::slotCommandChanged(const TQString& cmd)
{
m_inputfile->parentWidget()->setEnabled(cmd.find("%filterinput") != -1);
m_outputfile->parentWidget()->setEnabled(cmd.find("%filteroutput") != -1);
@@ -743,13 +743,13 @@ void KXmlCommandAdvancedDlg::slotCommandChanged(const QString& cmd)
m_view->setOpen(m_view->firstChild(), m_view->isEnabled());
}
-void KXmlCommandAdvancedDlg::slotValueSelected(QListViewItem *item)
+void KXmlCommandAdvancedDlg::slotValueSelected(TQListViewItem *item)
{
m_addval->setEnabled(m_type->currentItem() != 4 || m_values->childCount() < 2);
m_delval->setEnabled(item != 0);
}
-void KXmlCommandAdvancedDlg::slotOptionRenamed(QListViewItem *item, int)
+void KXmlCommandAdvancedDlg::slotOptionRenamed(TQListViewItem *item, int)
{
if (item && m_opts.contains(item->text(1)))
{
@@ -759,7 +759,7 @@ void KXmlCommandAdvancedDlg::slotOptionRenamed(QListViewItem *item, int)
}
}
-void KXmlCommandAdvancedDlg::recreateGroup(QListViewItem *item, DrGroup *grp)
+void KXmlCommandAdvancedDlg::recreateGroup(TQListViewItem *item, DrGroup *grp)
{
if (!item)
return;
@@ -787,7 +787,7 @@ void KXmlCommandAdvancedDlg::recreateGroup(QListViewItem *item, DrGroup *grp)
}
}
-bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
+bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, TQWidget *parent)
{
if (!xmlcmd)
return false;
@@ -804,7 +804,7 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
xmlcmd->setIo(xmldlg->m_inputpipe->text(), true, true);
xmlcmd->setIo(xmldlg->m_outputfile->text(), false, false);
xmlcmd->setIo(xmldlg->m_outputpipe->text(), false, true);
- xmlcmd->setComment( xmldlg->m_comment->text().replace( QRegExp( "\n" ), " " ) );
+ xmlcmd->setComment( xmldlg->m_comment->text().replace( TQRegExp( "\n" ), " " ) );
// need to recreate the driver tree structure
DrMain *driver = (xmldlg->m_opts.contains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0);
@@ -827,35 +827,35 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
//-----------------------------------------------------------------------------------------------------
-KXmlCommandDlg::KXmlCommandDlg(QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel|Details, Ok, true)
+KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel|Details, Ok, true)
{
setButtonText(Details, i18n("&Mime Type Settings"));
m_cmd = 0;
- QWidget *dummy = new QWidget(this, "TopDetail");
- QWidget *topmain = new QWidget(this, "TopMain");
+ QWidget *dummy = new TQWidget(this, "TopDetail");
+ QWidget *topmain = new TQWidget(this, "TopMain");
- QGroupBox *m_gb1 = new QGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy);
- QGroupBox *m_gb2 = new QGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain);
+ QGroupBox *m_gb1 = new TQGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy);
+ QGroupBox *m_gb2 = new TQGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain);
- m_description = new QLineEdit(topmain);
- m_idname = new QLabel(topmain);
+ m_description = new TQLineEdit(topmain);
+ m_idname = new TQLabel(topmain);
m_requirements = new KListView(m_gb2);
m_requirements->addColumn("");
m_requirements->header()->hide();
- m_addreq = new QToolButton(m_gb2);
+ m_addreq = new TQToolButton(m_gb2);
m_addreq->setIconSet(SmallIconSet("filenew"));
- m_removereq = new QToolButton(m_gb2);
+ m_removereq = new TQToolButton(m_gb2);
m_removereq->setIconSet(SmallIconSet("editdelete"));
QPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain);
- m_mimetype = new QComboBox(dummy);
+ m_mimetype = new TQComboBox(dummy);
m_availablemime = new KListBox(m_gb1);
m_selectedmime = new KListBox(m_gb1);
- m_addmime = new QToolButton(m_gb1);
- m_addmime->setIconSet(QApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back"));
- m_removemime = new QToolButton(m_gb1);
- m_removemime->setIconSet(QApplication::reverseLayout()? SmallIconSet("back" ) : SmallIconSet("forward"));
+ m_addmime = new TQToolButton(m_gb1);
+ m_addmime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back"));
+ m_removemime = new TQToolButton(m_gb1);
+ m_removemime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("back" ) : SmallIconSet("forward"));
m_gb2->setMinimumWidth(380);
m_gb1->setMinimumHeight(180);
m_requirements->setMaximumHeight(80);
@@ -863,64 +863,64 @@ KXmlCommandDlg::KXmlCommandDlg(QWidget *parent, const char *name)
m_addmime->setEnabled(false);
m_removemime->setEnabled(false);
- QLabel *m_desclab = new QLabel(i18n("&Description:"), topmain);
+ QLabel *m_desclab = new TQLabel(i18n("&Description:"), topmain);
m_desclab->setBuddy(m_description);
- QLabel *m_mimetypelab = new QLabel(i18n("Output &format:"), dummy);
+ QLabel *m_mimetypelab = new TQLabel(i18n("Output &format:"), dummy);
m_mimetypelab->setBuddy(m_mimetype);
- QLabel *m_idnamelab = new QLabel(i18n("ID name:"), topmain);
+ QLabel *m_idnamelab = new TQLabel(i18n("ID name:"), topmain);
QFont f(m_idname->font());
f.setBold(true);
m_idname->setFont(f);
- KSeparator *sep1 = new KSeparator(QFrame::HLine, dummy);
+ KSeparator *sep1 = new KSeparator(TQFrame::HLine, dummy);
- QVBoxLayout *l0 = new QVBoxLayout(topmain, 0, 10);
- QGridLayout *l5 = new QGridLayout(0, 2, 2, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(topmain, 0, 10);
+ QGridLayout *l5 = new TQGridLayout(0, 2, 2, 0, 5);
l0->addLayout(l5);
l5->addWidget(m_idnamelab, 0, 0);
l5->addWidget(m_idname, 0, 1);
l5->addWidget(m_desclab, 1, 0);
l5->addWidget(m_description, 1, 1);
l0->addWidget(m_gb2);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0);
l0->addLayout(l3);
l3->addWidget(m_edit);
l3->addStretch(1);
- QVBoxLayout *l7 = new QVBoxLayout(dummy, 0, 10);
- QHBoxLayout *l6 = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *l7 = new TQVBoxLayout(dummy, 0, 10);
+ QHBoxLayout *l6 = new TQHBoxLayout(0, 0, 5);
l7->addWidget(sep1);
l7->addLayout(l6);
l6->addWidget(m_mimetypelab, 0);
l6->addWidget(m_mimetype, 1);
l7->addWidget(m_gb1);
- QGridLayout *l2 = new QGridLayout(m_gb1->layout(), 4, 3, 10);
+ QGridLayout *l2 = new TQGridLayout(m_gb1->layout(), 4, 3, 10);
l2->addMultiCellWidget(m_availablemime, 0, 3, 2, 2);
l2->addMultiCellWidget(m_selectedmime, 0, 3, 0, 0);
l2->addWidget(m_addmime, 1, 1);
l2->addWidget(m_removemime, 2, 1);
l2->setRowStretch(0, 1);
l2->setRowStretch(3, 1);
- QHBoxLayout *l4 = new QHBoxLayout(m_gb2->layout(), 10);
+ QHBoxLayout *l4 = new TQHBoxLayout(m_gb2->layout(), 10);
l4->addWidget(m_requirements);
- QVBoxLayout *l8 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0);
l4->addLayout(l8);
l8->addWidget(m_addreq);
l8->addWidget(m_removereq);
l8->addStretch(1);
- connect(m_addmime, SIGNAL(clicked()), SLOT(slotAddMime()));
- connect(m_removemime, SIGNAL(clicked()), SLOT(slotRemoveMime()));
- connect(m_edit, SIGNAL(clicked()), SLOT(slotEditCommand()));
- connect(m_requirements, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotReqSelected(QListViewItem*)));
- connect(m_availablemime, SIGNAL(selectionChanged(QListBoxItem*)), SLOT(slotAvailableSelected(QListBoxItem*)));
- connect(m_selectedmime, SIGNAL(selectionChanged(QListBoxItem*)), SLOT(slotSelectedSelected(QListBoxItem*)));
- connect(m_addreq, SIGNAL(clicked()), SLOT(slotAddReq()));
- connect(m_removereq, SIGNAL(clicked()), SLOT(slotRemoveReq()));
+ connect(m_addmime, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddMime()));
+ connect(m_removemime, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveMime()));
+ connect(m_edit, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditCommand()));
+ connect(m_requirements, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotReqSelected(TQListViewItem*)));
+ connect(m_availablemime, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), TQT_SLOT(slotAvailableSelected(TQListBoxItem*)));
+ connect(m_selectedmime, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), TQT_SLOT(slotSelectedSelected(TQListBoxItem*)));
+ connect(m_addreq, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddReq()));
+ connect(m_removereq, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveReq()));
KMimeType::List list = KMimeType::allMimeTypes();
- for (QValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
QString mimetype = (*it)->name();
m_mimelist << mimetype;
@@ -945,9 +945,9 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
m_requirements->clear();
QStringList list = xmlCmd->requirements();
QListViewItem *item(0);
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
- item = new QListViewItem(m_requirements, item, *it);
+ item = new TQListViewItem(m_requirements, item, *it);
item->setRenameEnabled(0, true);
}
@@ -961,7 +961,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
m_selectedmime->clear();
m_availablemime->clear();
m_availablemime->insertStringList(m_mimelist);
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
m_selectedmime->insertItem(*it);
delete m_availablemime->findItem(*it, Qt::ExactMatch);
@@ -972,7 +972,7 @@ void KXmlCommandDlg::slotOk()
{
if (m_cmd)
{
- m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? QString::null : m_mimetype->currentText()));
+ m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? TQString::null : m_mimetype->currentText()));
m_cmd->setDescription(m_description->text());
QStringList l;
QListViewItem *item = m_requirements->firstChild();
@@ -990,7 +990,7 @@ void KXmlCommandDlg::slotOk()
KDialogBase::slotOk();
}
-bool KXmlCommandDlg::editCommand(KXmlCommand *xmlCmd, QWidget *parent)
+bool KXmlCommandDlg::editCommand(KXmlCommand *xmlCmd, TQWidget *parent)
{
if (!xmlCmd)
return false;
@@ -1030,7 +1030,7 @@ void KXmlCommandDlg::slotEditCommand()
void KXmlCommandDlg::slotAddReq()
{
- QListViewItem *item = new QListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/"));
+ QListViewItem *item = new TQListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/"));
item->setRenameEnabled(0, true);
m_requirements->ensureItemVisible(item);
item->startRename(0);
@@ -1041,17 +1041,17 @@ void KXmlCommandDlg::slotRemoveReq()
delete m_requirements->currentItem();
}
-void KXmlCommandDlg::slotReqSelected(QListViewItem *item)
+void KXmlCommandDlg::slotReqSelected(TQListViewItem *item)
{
m_removereq->setEnabled(item);
}
-void KXmlCommandDlg::slotAvailableSelected(QListBoxItem *item)
+void KXmlCommandDlg::slotAvailableSelected(TQListBoxItem *item)
{
m_addmime->setEnabled(item);
}
-void KXmlCommandDlg::slotSelectedSelected(QListBoxItem *item)
+void KXmlCommandDlg::slotSelectedSelected(TQListBoxItem *item)
{
m_removemime->setEnabled(item);
}
diff --git a/kdeprint/management/kxmlcommanddlg.h b/kdeprint/management/kxmlcommanddlg.h
index 54bec2dfc..05dc133c2 100644
--- a/kdeprint/management/kxmlcommanddlg.h
+++ b/kdeprint/management/kxmlcommanddlg.h
@@ -20,9 +20,9 @@
#ifndef KXMLCOMMANDDLG_H
#define KXMLCOMMANDDLG_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
class KListView;
@@ -44,21 +44,21 @@ class KXmlCommandAdvancedDlg : public QWidget
{
Q_OBJECT
public:
- KXmlCommandAdvancedDlg(QWidget *parent = 0, const char *name = 0);
+ KXmlCommandAdvancedDlg(TQWidget *parent = 0, const char *name = 0);
~KXmlCommandAdvancedDlg();
void setCommand(KXmlCommand*);
- static bool editCommand(KXmlCommand *xmlcmd, QWidget *parent = 0);
+ static bool editCommand(KXmlCommand *xmlcmd, TQWidget *parent = 0);
protected:
- void parseGroupItem(DrGroup*, QListViewItem*);
+ void parseGroupItem(DrGroup*, TQListViewItem*);
void parseXmlCommand(KXmlCommand*);
- void viewItem(QListViewItem*);
- void removeItem(QListViewItem*);
- void recreateGroup(QListViewItem*, DrGroup*);
+ void viewItem(TQListViewItem*);
+ void removeItem(TQListViewItem*);
+ void recreateGroup(TQListViewItem*, DrGroup*);
protected slots:
- void slotSelectionChanged(QListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
void slotTypeChanged(int);
void slotAddValue();
void slotRemoveValue();
@@ -68,9 +68,9 @@ protected slots:
void slotRemoveItem();
void slotMoveUp();
void slotMoveDown();
- void slotCommandChanged(const QString&);
- void slotValueSelected(QListViewItem*);
- void slotOptionRenamed(QListViewItem*, int);
+ void slotCommandChanged(const TQString&);
+ void slotValueSelected(TQListViewItem*);
+ void slotOptionRenamed(TQListViewItem*, int);
void slotChanged();
private:
@@ -84,21 +84,21 @@ private:
QToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down;
QLineEdit *m_inputfile, *m_inputpipe, *m_outputfile, *m_outputpipe;
QToolButton *m_addval, *m_delval;
- QTextEdit *m_comment;
- QCheckBox *m_persistent;
+ TQTextEdit *m_comment;
+ TQCheckBox *m_persistent;
KXmlCommand *m_xmlcmd;
- QMap<QString, DrBase*> m_opts;
+ TQMap<TQString, DrBase*> m_opts;
};
class KXmlCommandDlg : public KDialogBase
{
Q_OBJECT
public:
- KXmlCommandDlg(QWidget *parent = 0, const char *name = 0);
+ KXmlCommandDlg(TQWidget *parent = 0, const char *name = 0);
void setCommand(KXmlCommand*);
- static bool editCommand(KXmlCommand*, QWidget *parent = 0);
+ static bool editCommand(KXmlCommand*, TQWidget *parent = 0);
protected slots:
void slotAddMime();
@@ -106,9 +106,9 @@ protected slots:
void slotEditCommand();
void slotAddReq();
void slotRemoveReq();
- void slotReqSelected(QListViewItem*);
- void slotAvailableSelected(QListBoxItem*);
- void slotSelectedSelected(QListBoxItem*);
+ void slotReqSelected(TQListViewItem*);
+ void slotAvailableSelected(TQListBoxItem*);
+ void slotSelectedSelected(TQListBoxItem*);
void slotOk();
private:
diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp
index f0363e0b6..4e57b3922 100644
--- a/kdeprint/management/kxmlcommandselector.cpp
+++ b/kdeprint/management/kxmlcommandselector.cpp
@@ -22,13 +22,13 @@
#include "kxmlcommanddlg.h"
#include "kdeprintcheck.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -40,45 +40,45 @@
#include <kdatetbl.h>
#include <kdialogbase.h>
-KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const char *name, KDialogBase *dlg)
-: QWidget(parent, name)
+KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const char *name, KDialogBase *dlg)
+: TQWidget(parent, name)
{
- m_cmd = new QComboBox(this);
- connect(m_cmd, SIGNAL(activated(int)), SLOT(slotCommandSelected(int)));
+ m_cmd = new TQComboBox(this);
+ connect(m_cmd, TQT_SIGNAL(activated(int)), TQT_SLOT(slotCommandSelected(int)));
QPushButton *m_add = new KPushButton(this);
QPushButton *m_edit = new KPushButton(this);
m_add->setPixmap(SmallIcon("filenew"));
m_edit->setPixmap(SmallIcon("configure"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddCommand()));
- connect(m_edit, SIGNAL(clicked()), SLOT(slotEditCommand()));
- QToolTip::add(m_add, i18n("New command"));
- QToolTip::add(m_edit, i18n("Edit command"));
- m_shortinfo = new QLabel(this);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddCommand()));
+ connect(m_edit, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditCommand()));
+ TQToolTip::add(m_add, i18n("New command"));
+ TQToolTip::add(m_edit, i18n("Edit command"));
+ m_shortinfo = new TQLabel(this);
m_helpbtn = new KPushButton( this );
m_helpbtn->setIconSet( SmallIconSet( "help" ) );
- connect( m_helpbtn, SIGNAL( clicked() ), SLOT( slotHelpCommand() ) );
- QToolTip::add( m_helpbtn, i18n( "Information" ) );
+ connect( m_helpbtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHelpCommand() ) );
+ TQToolTip::add( m_helpbtn, i18n( "Information" ) );
m_helpbtn->setEnabled( false );
m_line = 0;
m_usefilter = 0;
QPushButton *m_browse = 0;
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
if (canBeNull)
{
- m_line = new QLineEdit(this);
+ m_line = new TQLineEdit(this);
m_browse = new KPushButton(KGuiItem(i18n("&Browse..."), "fileopen"), this);
- m_usefilter = new QCheckBox(i18n("Use co&mmand:"), this);
- connect(m_browse, SIGNAL(clicked()), SLOT(slotBrowse()));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_line, SLOT(setDisabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_browse, SLOT(setDisabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_cmd, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_add, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_edit, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_shortinfo, SLOT(setEnabled(bool)));
- connect( m_usefilter, SIGNAL( toggled( bool ) ), SLOT( slotXmlCommandToggled( bool ) ) );
+ m_usefilter = new TQCheckBox(i18n("Use co&mmand:"), this);
+ connect(m_browse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowse()));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_line, TQT_SLOT(setDisabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_browse, TQT_SLOT(setDisabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_cmd, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_add, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_edit, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_shortinfo, TQT_SLOT(setEnabled(bool)));
+ connect( m_usefilter, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotXmlCommandToggled( bool ) ) );
m_usefilter->setChecked(true);
m_usefilter->setChecked(false);
//setFocusProxy(m_line);
@@ -86,7 +86,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
setTabOrder(m_cmd, m_add);
setTabOrder(m_add, m_edit);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
l0->addLayout(l1);
l1->addWidget(m_line);
l1->addWidget(m_browse);
@@ -97,7 +97,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
else
setFocusProxy(m_cmd);
- QGridLayout *l2 = new QGridLayout(0, 2, (m_usefilter?3:2), 0, 5);
+ QGridLayout *l2 = new TQGridLayout(0, 2, (m_usefilter?3:2), 0, 5);
int c(0);
l0->addLayout(l2);
if (m_usefilter)
@@ -105,31 +105,31 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
l2->addWidget(m_usefilter, 0, c++);
}
l2->addWidget(m_cmd, 0, c);
- QHBoxLayout *l4 = new QHBoxLayout( 0, 0, 5 );
+ TQHBoxLayout *l4 = new TQHBoxLayout( 0, 0, 5 );
l2->addLayout( l4, 1, c );
l4->addWidget( m_helpbtn, 0 );
l4->addWidget( m_shortinfo, 1 );
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0);
l2->addLayout(l3, 0, c+1);
l3->addWidget(m_add);
l3->addWidget(m_edit);
if ( dlg )
- connect( this, SIGNAL( commandValid( bool ) ), dlg, SLOT( enableButtonOK( bool ) ) );
+ connect( this, TQT_SIGNAL( commandValid( bool ) ), dlg, TQT_SLOT( enableButtonOK( bool ) ) );
loadCommands();
}
void KXmlCommandSelector::loadCommands()
{
- QString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : QString::null);
+ QString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : TQString::null);
m_cmd->clear();
m_cmdlist.clear();
QStringList list = KXmlCommandManager::self()->commandListWithDescription();
QStringList desclist;
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it)
{
m_cmdlist << (*it);
++it;
@@ -144,7 +144,7 @@ void KXmlCommandSelector::loadCommands()
slotCommandSelected(m_cmd->currentItem());
}
-QString KXmlCommandSelector::command() const
+TQString KXmlCommandSelector::command() const
{
QString cmd;
if (m_line && !m_usefilter->isChecked())
@@ -154,14 +154,14 @@ QString KXmlCommandSelector::command() const
return cmd;
}
-void KXmlCommandSelector::setCommand(const QString& cmd)
+void KXmlCommandSelector::setCommand(const TQString& cmd)
{
int index = m_cmdlist.findIndex(cmd);
if (m_usefilter)
m_usefilter->setChecked(index != -1);
if (m_line)
- m_line->setText((index == -1 ? cmd : QString::null));
+ m_line->setText((index == -1 ? cmd : TQString::null));
if (index != -1)
m_cmd->setCurrentItem(index);
if (m_cmd->currentItem() != -1 && m_cmd->isEnabled())
@@ -171,7 +171,7 @@ void KXmlCommandSelector::setCommand(const QString& cmd)
void KXmlCommandSelector::slotAddCommand()
{
bool ok(false);
- QString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), QString::null, &ok, this);
+ QString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), TQString::null, &ok, this);
if (ok)
{
bool added(true);
@@ -182,7 +182,7 @@ void KXmlCommandSelector::slotAddCommand()
this,
i18n("A command named %1 already exists. Do you want "
"to continue and edit the existing one?").arg(cmdId),
- QString::null,
+ TQString::null,
KStdGuiItem::cont()) == KMessageBox::Cancel)
{
return;
@@ -222,7 +222,7 @@ void KXmlCommandSelector::slotEditCommand()
void KXmlCommandSelector::slotBrowse()
{
- QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this);
+ QString filename = KFileDialog::getOpenFileName(TQString::null, TQString::null, this);
if (!filename.isEmpty() && m_line)
m_line->setText(filename);
}
@@ -232,10 +232,10 @@ void KXmlCommandSelector::slotCommandSelected(int ID)
KXmlCommand *xmlCmd = KXmlCommandManager::self()->loadCommand(m_cmdlist[ID], true);
if (xmlCmd)
{
- QString msg;
+ TQString msg;
if ( xmlCmd->isValid() && KdeprintChecker::check( xmlCmd->requirements() ) )
{
- msg = QString::fromLocal8Bit("(ID = %1, %2 = ").arg(xmlCmd->name()).arg(i18n("output"));
+ msg = TQString::fromLocal8Bit("(ID = %1, %2 = ").arg(xmlCmd->name()).arg(i18n("output"));
if (KXmlCommandManager::self()->checkCommand(xmlCmd->name(), KXmlCommandManager::None, KXmlCommandManager::Basic))
{
if (xmlCmd->mimeType() == "all/all")
@@ -267,7 +267,7 @@ void KXmlCommandSelector::slotXmlCommandToggled( bool on )
else
{
emit commandValid( true );
- m_shortinfo->setText( QString::null );
+ m_shortinfo->setText( TQString::null );
}
}
@@ -277,7 +277,7 @@ void KXmlCommandSelector::slotHelpCommand()
KActiveLabel *lab = new KActiveLabel( m_help, pop );
lab->resize( lab->sizeHint() );
pop->setMainWidget( lab );
- pop->exec( m_helpbtn->mapToGlobal( QPoint( m_helpbtn->width(), 0 ) ) );
+ pop->exec( m_helpbtn->mapToGlobal( TQPoint( m_helpbtn->width(), 0 ) ) );
pop->close( 0 );
delete pop;
}
diff --git a/kdeprint/management/kxmlcommandselector.h b/kdeprint/management/kxmlcommandselector.h
index b0d67284e..23ded759b 100644
--- a/kdeprint/management/kxmlcommandselector.h
+++ b/kdeprint/management/kxmlcommandselector.h
@@ -20,8 +20,8 @@
#ifndef KXMLCOMMANDSELECTOR_H
#define KXMLCOMMANDSELECTOR_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -36,10 +36,10 @@ class KDEPRINT_EXPORT KXmlCommandSelector : public QWidget
{
Q_OBJECT
public:
- KXmlCommandSelector(bool canBeNull = true, QWidget *parent = 0, const char *name = 0, KDialogBase *dlg = 0);
+ KXmlCommandSelector(bool canBeNull = true, TQWidget *parent = 0, const char *name = 0, KDialogBase *dlg = 0);
- void setCommand(const QString&);
- QString command() const;
+ void setCommand(const TQString&);
+ TQString command() const;
protected:
void loadCommands();
@@ -61,8 +61,8 @@ private:
QCheckBox *m_usefilter;
QStringList m_cmdlist;
QLabel *m_shortinfo;
- QPushButton *m_helpbtn;
- QString m_help;
+ TQPushButton *m_helpbtn;
+ TQString m_help;
};
#endif
diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp
index ae99c4fa4..41b368ab0 100644
--- a/kdeprint/management/networkscanner.cpp
+++ b/kdeprint/management/networkscanner.cpp
@@ -21,15 +21,15 @@
#include "networkscanner.h"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qsocket.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqsocket.h>
#include <klocale.h>
#include <kextendedsocket.h>
#include <kmessagebox.h>
@@ -41,18 +41,18 @@ class NetworkScanner::NetworkScannerPrivate
{
public:
int port;
- QString prefixaddress;
+ TQString prefixaddress;
int currentaddress;
int timeout;
bool scanning;
- QPtrList<NetworkScanner::SocketInfo> printers;
+ TQPtrList<NetworkScanner::SocketInfo> printers;
- QProgressBar *bar;
+ TQProgressBar *bar;
KPushButton *scan, *settings;
- QLabel *subnetlab;
- QTimer *timer;
+ TQLabel *subnetlab;
+ TQTimer *timer;
#ifdef USE_QSOCKET
- QSocket *socket;
+ TQSocket *socket;
#else
KExtendedSocket *socket;
#endif
@@ -65,17 +65,17 @@ public:
scanning = false;
printers.setAutoDelete( true );
}
- QString localPrefix();
- QString scanString();
+ TQString localPrefix();
+ TQString scanString();
};
-QString NetworkScanner::NetworkScannerPrivate::localPrefix()
+TQString NetworkScanner::NetworkScannerPrivate::localPrefix()
{
char buf[256];
buf[0] = '\0';
if (!gethostname(buf, sizeof(buf)))
buf[sizeof(buf)-1] = '\0';
- QPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, QString::null);
+ TQPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, TQString::null);
infos.setAutoDelete(true);
if (infos.count() > 0)
{
@@ -84,49 +84,49 @@ QString NetworkScanner::NetworkScannerPrivate::localPrefix()
IPstr.truncate(p);
return IPstr;
}
- return QString::null;
+ return TQString::null;
}
-QString NetworkScanner::NetworkScannerPrivate::scanString()
+TQString NetworkScanner::NetworkScannerPrivate::scanString()
{
- QString s = prefixaddress + ".*";
+ TQString s = prefixaddress + ".*";
if ( port != -1 )
- s.append( ":" ).append( QString::number( port ) );
+ s.append( ":" ).append( TQString::number( port ) );
return s;
}
-NetworkScanner::NetworkScanner( int port, QWidget *parent, const char *name )
- : QWidget( parent, name )
+NetworkScanner::NetworkScanner( int port, TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new NetworkScannerPrivate( port );
- d->bar = new QProgressBar( 256, this );
+ d->bar = new TQProgressBar( 256, this );
d->settings = new KPushButton( KGuiItem( i18n( "&Settings" ), "configure" ), this );
d->scan = new KPushButton( KGuiItem( i18n( "Sc&an" ), "viewmag" ), this );
- d->timer = new QTimer( this );
+ d->timer = new TQTimer( this );
#ifdef USE_QSOCKET
- d->socket = new QSocket( this );
+ d->socket = new TQSocket( this );
#else
d->socket = new KExtendedSocket();
#endif
- QLabel *label = new QLabel( i18n( "Network scan:" ), this );
- d->subnetlab = new QLabel( i18n( "Subnet: %1" ).arg( d->scanString() ), this );
+ TQLabel *label = new TQLabel( i18n( "Network scan:" ), this );
+ d->subnetlab = new TQLabel( i18n( "Subnet: %1" ).arg( d->scanString() ), this );
- QGridLayout *l0 = new QGridLayout( this, 4, 2, 0, 10 );
+ TQGridLayout *l0 = new TQGridLayout( this, 4, 2, 0, 10 );
l0->addMultiCellWidget( label, 0, 0, 0, 1 );
l0->addMultiCellWidget( d->bar, 1, 1, 0, 1 );
l0->addMultiCellWidget( d->subnetlab, 2, 2, 0, 1 );
l0->addWidget( d->settings, 3, 0 );
l0->addWidget( d->scan, 3, 1 );
- connect( d->timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
- connect( d->settings, SIGNAL( clicked() ), SLOT( slotSettingsClicked() ) );
- connect( d->scan, SIGNAL( clicked() ), SLOT( slotScanClicked() ) );
+ connect( d->timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
+ connect( d->settings, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSettingsClicked() ) );
+ connect( d->scan, TQT_SIGNAL( clicked() ), TQT_SLOT( slotScanClicked() ) );
#ifdef USE_QSOCKET
- connect( d->socket, SIGNAL( connected() ), SLOT( slotConnectionSuccess() ) );
- connect( d->socket, SIGNAL( error( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( d->socket, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnectionSuccess() ) );
+ connect( d->socket, TQT_SIGNAL( error( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
#else
- connect( d->socket, SIGNAL( connectionSuccess() ), SLOT( slotConnectionSuccess() ) );
- connect( d->socket, SIGNAL( connectionFailed( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( d->socket, TQT_SIGNAL( connectionSuccess() ), TQT_SLOT( slotConnectionSuccess() ) );
+ connect( d->socket, TQT_SIGNAL( connectionFailed( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
#endif
}
@@ -161,7 +161,7 @@ void NetworkScanner::slotScanClicked()
i18n( "You are about to scan a subnet (%1.*) that does not "
"correspond to the current subnet of this computer (%2.*). Do you want "
"to scan the specified subnet anyway?" ).arg( d->prefixaddress ).arg( d->localPrefix() ),
- QString::null, KGuiItem( i18n( "&Scan" ), "viewmag" ), "askForScan" ) == KMessageBox::Continue )
+ TQString::null, KGuiItem( i18n( "&Scan" ), "viewmag" ), "askForScan" ) == KMessageBox::Continue )
start();
}
else
@@ -200,10 +200,10 @@ void NetworkScanner::slotNext()
d->timer->stop();
#ifdef USE_QSOCKET
- d->socket->connectToHost( d->prefixaddress + "." + QString::number( d->currentaddress ), d->port );
+ d->socket->connectToHost( d->prefixaddress + "." + TQString::number( d->currentaddress ), d->port );
kdDebug() << "Address: " << d->socket->peerName() << ", Port: " << d->socket->peerPort() << endl;
#else
- d->socket->setAddress( d->prefixaddress + "." + QString::number( d->currentaddress ), d->port );
+ d->socket->setAddress( d->prefixaddress + "." + TQString::number( d->currentaddress ), d->port );
d->socket->startAsyncLookup();
kdDebug() << "Address: " << d->socket->host() << ", Port: " << d->socket->port() << endl;
#endif
@@ -219,7 +219,7 @@ void NetworkScanner::next()
else
{
d->bar->setProgress( d->currentaddress );
- QTimer::singleShot( 0, this, SLOT( slotNext() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotNext() ) );
}
}
@@ -245,7 +245,7 @@ void NetworkScanner::slotConnectionSuccess()
#else
KSocketAddress *addr = const_cast<KSocketAddress*>( d->socket->peerAddress() );
#endif
- kdDebug() << "Connection success: " << ( addr ? addr->pretty() : QString( "ERROR" ) ) << endl;
+ kdDebug() << "Connection success: " << ( addr ? addr->pretty() : TQString( "ERROR" ) ) << endl;
kdDebug() << "Socket: " << d->socket->socket() << endl;
if ( addr )
{
@@ -256,7 +256,7 @@ void NetworkScanner::slotConnectionSuccess()
info->IP = d->socket->host();
#endif
info->Port = d->port;
- QString portname;
+ TQString portname;
KExtendedSocket::resolve( addr, info->Name, portname );
d->printers.append( info );
d->socket->close();
@@ -273,7 +273,7 @@ void NetworkScanner::slotConnectionFailed( int )
next();
}
-const QPtrList<NetworkScanner::SocketInfo>* NetworkScanner::printerList()
+const TQPtrList<NetworkScanner::SocketInfo>* NetworkScanner::printerList()
{
return &( d->printers );
}
@@ -288,12 +288,12 @@ void NetworkScanner::setTimeout( int to )
d->timeout = to;
}
-QString NetworkScanner::subnet() const
+TQString NetworkScanner::subnet() const
{
return d->prefixaddress;
}
-void NetworkScanner::setSubnet( const QString& sn )
+void NetworkScanner::setSubnet( const TQString& sn )
{
d->prefixaddress = sn;
d->subnetlab->setText( i18n( "Subnet: %1" ).arg( d->scanString() ) );
@@ -310,10 +310,10 @@ void NetworkScanner::setPort( int p )
d->subnetlab->setText( i18n( "Subnet: %1" ).arg( d->scanString() ) );
}
-bool NetworkScanner::checkPrinter( const QString& host, int port )
+bool NetworkScanner::checkPrinter( const TQString& host, int port )
{
// try first to find it in the SocketInfo list
- QPtrListIterator<NetworkScanner::SocketInfo> it( d->printers );
+ TQPtrListIterator<NetworkScanner::SocketInfo> it( d->printers );
for ( ; it.current(); ++it )
{
if ( port == it.current()->Port && ( host == it.current()->IP ||
@@ -329,26 +329,26 @@ bool NetworkScanner::checkPrinter( const QString& host, int port )
}
NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char *name)
- : KDialogBase(scanner, name, true, QString::null, Ok|Cancel, Ok, true)
+ : KDialogBase(scanner, name, true, TQString::null, Ok|Cancel, Ok, true)
{
scanner_ = scanner;
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
KIntValidator *val = new KIntValidator( this );
- QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy);
- QLabel *portlabel = new QLabel(i18n("&Port:"),dummy);
- QLabel *toutlabel = new QLabel(i18n("&Timeout (ms):"),dummy);
- QLineEdit *mm = new QLineEdit(dummy);
- mm->setText(QString::fromLatin1(".[0-255]"));
+ QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy);
+ QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy);
+ QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy);
+ QLineEdit *mm = new TQLineEdit(dummy);
+ mm->setText(TQString::fromLatin1(".[0-255]"));
mm->setReadOnly(true);
mm->setFixedWidth(fontMetrics().width(mm->text())+10);
- mask_ = new QLineEdit(dummy);
+ mask_ = new TQLineEdit(dummy);
mask_->setAlignment(Qt::AlignRight);
- port_ = new QComboBox(true,dummy);
+ port_ = new TQComboBox(true,dummy);
if ( port_->lineEdit() )
port_->lineEdit()->setValidator( val );
- tout_ = new QLineEdit(dummy);
+ tout_ = new TQLineEdit(dummy);
tout_->setValidator( val );
masklabel->setBuddy(mask_);
@@ -360,11 +360,11 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char *
port_->insertItem("9100");
port_->insertItem("9101");
port_->insertItem("9102");
- port_->setEditText(QString::number(scanner_->port()));
- tout_->setText(QString::number(scanner_->timeout()));
+ port_->setEditText(TQString::number(scanner_->port()));
+ tout_->setText(TQString::number(scanner_->timeout()));
- QGridLayout *main_ = new QGridLayout(dummy, 3, 2, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 5);
+ QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5);
main_->addWidget(masklabel, 0, 0);
main_->addWidget(portlabel, 1, 0);
main_->addWidget(toutlabel, 2, 0);
diff --git a/kdeprint/management/networkscanner.h b/kdeprint/management/networkscanner.h
index 2877a7596..5919990e4 100644
--- a/kdeprint/management/networkscanner.h
+++ b/kdeprint/management/networkscanner.h
@@ -20,9 +20,9 @@
#ifndef NETWORKSCANNER_H
#define NETWORKSCANNER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KDEPRINT_EXPORT NetworkScanner : public QWidget
@@ -30,25 +30,25 @@ class KDEPRINT_EXPORT NetworkScanner : public QWidget
Q_OBJECT
public:
- NetworkScanner( int port = 9100, QWidget *parent = 0, const char *name = 0 );
+ NetworkScanner( int port = 9100, TQWidget *parent = 0, const char *name = 0 );
~NetworkScanner();
struct SocketInfo
{
- QString IP;
- QString Name;
+ TQString IP;
+ TQString Name;
int Port;
};
- const QPtrList<NetworkScanner::SocketInfo>* printerList();
+ const TQPtrList<NetworkScanner::SocketInfo>* printerList();
int timeout() const;
void setTimeout( int to );
- QString subnet() const;
- void setSubnet( const QString& );
+ TQString subnet() const;
+ void setSubnet( const TQString& );
int port() const;
void setPort( int );
- bool checkPrinter( const QString&, int );
+ bool checkPrinter( const TQString&, int );
signals:
void scanStarted();
diff --git a/kdeprint/management/pluginaction.cpp b/kdeprint/management/pluginaction.cpp
index e03f8c4da..d876601e7 100644
--- a/kdeprint/management/pluginaction.cpp
+++ b/kdeprint/management/pluginaction.cpp
@@ -20,10 +20,10 @@
#include "pluginaction.h"
// automatically connect to "pluginActionActived(int)" in the receiver.
-PluginAction::PluginAction(int ID, const QString& txt, const QString& icon, int accel, QObject *parent, const char *name)
+PluginAction::PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent, const char *name)
: KAction(txt, icon, accel, parent, name), m_id(ID)
{
- connect(this, SIGNAL(activated()), SLOT(slotActivated()));
+ connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActivated()));
}
void PluginAction::slotActivated()
diff --git a/kdeprint/management/pluginaction.h b/kdeprint/management/pluginaction.h
index f0addad4b..c39f5f700 100644
--- a/kdeprint/management/pluginaction.h
+++ b/kdeprint/management/pluginaction.h
@@ -27,7 +27,7 @@ class KDEPRINT_EXPORT PluginAction : public KAction
Q_OBJECT
public:
- PluginAction(int ID, const QString& txt, const QString& icon, int accel, QObject *parent = 0, const char *name = 0);
+ PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent = 0, const char *name = 0);
signals:
void activated(int);
diff --git a/kdeprint/management/sidepixmap.cpp b/kdeprint/management/sidepixmap.cpp
index 6469b935d..99a1e6198 100644
--- a/kdeprint/management/sidepixmap.cpp
+++ b/kdeprint/management/sidepixmap.cpp
@@ -19,20 +19,20 @@
#include "sidepixmap.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
-SidePixmap::SidePixmap(QWidget *parent, const char *name)
-: QFrame(parent, name)
+SidePixmap::SidePixmap(TQWidget *parent, const char *name)
+: TQFrame(parent, name)
{
setLineWidth(1);
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_side.load(locate("data", "kdeprint/side.png"));
m_tileup.load(locate("data", "kdeprint/tileup.png"));
m_tiledown.load(locate("data", "kdeprint/tiledown.png"));
- setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum));
}
bool SidePixmap::isValid()
@@ -42,12 +42,12 @@ bool SidePixmap::isValid()
&& (m_side.width() == m_tiledown.width()));
}
-QSize SidePixmap::sizeHint() const
+TQSize SidePixmap::sizeHint() const
{
- return (QSize(m_side.width()+lineWidth(), 300+lineWidth()));
+ return (TQSize(m_side.width()+lineWidth(), 300+lineWidth()));
}
-void SidePixmap::drawContents(QPainter *p)
+void SidePixmap::drawContents(TQPainter *p)
{
QRect r = contentsRect();
if (r.height() <= m_side.height())
diff --git a/kdeprint/management/sidepixmap.h b/kdeprint/management/sidepixmap.h
index 48bfebf47..33db2275c 100644
--- a/kdeprint/management/sidepixmap.h
+++ b/kdeprint/management/sidepixmap.h
@@ -20,20 +20,20 @@
#ifndef SIDEPIXMAP_H
#define SIDEPIXMAP_H
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kdelibs_export.h>
class KDEPRINT_EXPORT SidePixmap : public QFrame
{
public:
- SidePixmap(QWidget *parent = 0, const char *name = 0);
- QSize sizeHint() const;
+ SidePixmap(TQWidget *parent = 0, const char *name = 0);
+ TQSize sizeHint() const;
bool isValid();
protected:
- void drawContents(QPainter*);
+ void drawContents(TQPainter*);
private:
QPixmap m_side, m_tileup, m_tiledown;
diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp
index 6cf5ee4c8..127a42e76 100644
--- a/kdeprint/management/smbview.cpp
+++ b/kdeprint/management/smbview.cpp
@@ -21,8 +21,8 @@
#include <kprocess.h>
#include <ktempfile.h>
-#include <qheader.h>
-#include <qapplication.h>
+#include <tqheader.h>
+#include <tqapplication.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -30,19 +30,19 @@
#include <kmessagebox.h>
#include <kcursor.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <cstdlib>
//*********************************************************************************************
-SmbView::SmbView(QWidget *parent, const char *name)
+SmbView::SmbView(TQWidget *parent, const char *name)
: KListView(parent,name)
{
addColumn(i18n("Printer"));
addColumn(i18n("Comment"));
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setLineWidth(1);
setAllColumnsShowFocus(true);
setRootIsDecorated(true);
@@ -52,9 +52,9 @@ SmbView::SmbView(QWidget *parent, const char *name)
m_proc = new KProcess();
m_proc->setUseShell(true);
m_passwdFile = 0;
- connect(m_proc,SIGNAL(processExited(KProcess*)),SLOT(slotProcessExited(KProcess*)));
- connect(m_proc,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(this,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(m_proc,TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
}
SmbView::~SmbView()
@@ -63,7 +63,7 @@ SmbView::~SmbView()
delete m_passwdFile;
}
-void SmbView::setLoginInfos(const QString& login, const QString& password)
+void SmbView::setLoginInfos(const TQString& login, const TQString& password)
{
m_login = login;
m_password = password;
@@ -77,7 +77,7 @@ void SmbView::setLoginInfos(const QString& login, const QString& password)
m_passwdFile = new KTempFile;
m_passwdFile->setAutoDelete(true);
- QTextStream *passwdFile = m_passwdFile->textStream();
+ TQTextStream *passwdFile = m_passwdFile->textStream();
if (!passwdFile) return; // Error
(*passwdFile) << "username = " << m_login << endl;
(*passwdFile) << "password = " << m_password << endl;
@@ -88,9 +88,9 @@ void SmbView::setLoginInfos(const QString& login, const QString& password)
void SmbView::startProcess(int state)
{
- m_buffer = QString::null;
+ m_buffer = TQString::null;
m_state = state;
- QApplication::setOverrideCursor(KCursor::waitCursor());
+ TQApplication::setOverrideCursor(KCursor::waitCursor());
m_proc->start(KProcess::NotifyOnExit,KProcess::Stdout);
emit running(true);
}
@@ -112,7 +112,7 @@ void SmbView::endProcess()
break;
}
m_state = Idle;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit running(false);
// clean up for future usage
m_proc->clearArguments();
@@ -125,24 +125,24 @@ void SmbView::slotProcessExited(KProcess*)
void SmbView::slotReceivedStdout(KProcess*, char *buf, int len)
{
- m_buffer.append(QString::fromLocal8Bit(buf,len));
+ m_buffer.append(TQString::fromLocal8Bit(buf,len));
}
void SmbView::init()
{
// Open Samba configuration file and check if a WINS server is defined
- m_wins_server = QString::null;
- QString wins_keyword("wins server");
- QFile smb_conf ("/etc/samba/smb.conf");
+ m_wins_server = TQString::null;
+ TQString wins_keyword("wins server");
+ TQFile smb_conf ("/etc/samba/smb.conf");
if (smb_conf.exists () && smb_conf.open (IO_ReadOnly))
{
- QTextStream smb_stream (&smb_conf);
+ TQTextStream smb_stream (&smb_conf);
while (!smb_stream.atEnd ())
{
- QString smb_line = smb_stream.readLine ();
+ TQString smb_line = smb_stream.readLine ();
if (smb_line.contains (wins_keyword, FALSE) > 0)
{
- QString key = smb_line.section ('=', 0, 0);
+ TQString key = smb_line.section ('=', 0, 0);
key = key.stripWhiteSpace();
if (key.lower() == wins_keyword)
{
@@ -164,13 +164,13 @@ void SmbView::init()
smb_conf.close ();
}
m_wins_server = m_wins_server.isEmpty ()? " " : " -U " + m_wins_server + " ";
- QString cmd ("nmblookup" + m_wins_server +
+ TQString cmd ("nmblookup" + m_wins_server +
"-M -- - | grep '<01>' | awk '{print $1}' | xargs nmblookup -A | grep '<1d>'");
*m_proc << cmd;
startProcess(GroupListing);
}
-void SmbView::setOpen(QListViewItem *item, bool on)
+void SmbView::setOpen(TQListViewItem *item, bool on)
{
if (on && item->childCount() == 0)
{
@@ -189,7 +189,7 @@ void SmbView::setOpen(QListViewItem *item, bool on)
*m_proc << KProcess::quote(item->text(0));
*m_proc << " -W ";
*m_proc << KProcess::quote(item->parent()->text(0));
- if (m_login != QString::null)
+ if (m_login != TQString::null)
{
*m_proc << " -A ";
*m_proc << KProcess::quote(m_passwdFile->name());
@@ -197,19 +197,19 @@ void SmbView::setOpen(QListViewItem *item, bool on)
startProcess(ShareListing);
}
}
- QListView::setOpen(item,on);
+ TQListView::setOpen(item,on);
}
void SmbView::processGroups()
{
- QStringList grps = QStringList::split('\n',m_buffer,false);
+ QStringList grps = TQStringList::split('\n',m_buffer,false);
clear();
- for (QStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it)
+ for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it)
{
int p = (*it).find("<1d>");
if (p == -1)
continue;
- QListViewItem *item = new QListViewItem(this,(*it).left(p).stripWhiteSpace());
+ QListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace());
item->setExpandable(true);
item->setPixmap(0,SmallIcon("network"));
}
@@ -217,7 +217,7 @@ void SmbView::processGroups()
void SmbView::processServers()
{
- QStringList lines = QStringList::split('\n',m_buffer,true);
+ QStringList lines = TQStringList::split('\n',m_buffer,true);
QString line;
uint index(0);
while (index < lines.count())
@@ -225,10 +225,10 @@ void SmbView::processServers()
line = lines[index++].stripWhiteSpace();
if (line.isEmpty())
break;
- QStringList words = QStringList::split(' ',line,false);
+ QStringList words = TQStringList::split(' ',line,false);
if (words[1] != "<00>" || words[3] == "<GROUP>")
continue;
- QListViewItem *item = new QListViewItem(m_current,words[0]);
+ QListViewItem *item = new TQListViewItem(m_current,words[0]);
item->setExpandable(true);
item->setPixmap(0,SmallIcon("kdeprint_computer"));
}
@@ -236,7 +236,7 @@ void SmbView::processServers()
void SmbView::processShares()
{
- QStringList lines = QStringList::split('\n',m_buffer,true);
+ QStringList lines = TQStringList::split('\n',m_buffer,true);
QString line;
uint index(0);
for (;index < lines.count();index++)
@@ -254,21 +254,21 @@ void SmbView::processShares()
break;
}
QString typestr(line.mid(15, 10).stripWhiteSpace());
- //QStringList words = QStringList::split(' ',line,false);
+ //QStringList words = TQStringList::split(' ',line,false);
//if (words[1] == "Printer")
if (typestr == "Printer")
{
QString comm(line.mid(25).stripWhiteSpace()), sharen(line.mid(0, 15).stripWhiteSpace());
//for (uint i=2; i<words.count(); i++)
// comm += (words[i]+" ");
- //QListViewItem *item = new QListViewItem(m_current,words[0],comm);
- QListViewItem *item = new QListViewItem(m_current,sharen,comm);
+ //QListViewItem *item = new TQListViewItem(m_current,words[0],comm);
+ QListViewItem *item = new TQListViewItem(m_current,sharen,comm);
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
}
-void SmbView::slotSelectionChanged(QListViewItem *item)
+void SmbView::slotSelectionChanged(TQListViewItem *item)
{
if (item && item->depth() == 2)
emit printerSelected(item->parent()->parent()->text(0),item->parent()->text(0),item->text(0));
diff --git a/kdeprint/management/smbview.h b/kdeprint/management/smbview.h
index 74932a964..e86f3d5ec 100644
--- a/kdeprint/management/smbview.h
+++ b/kdeprint/management/smbview.h
@@ -29,16 +29,16 @@ class SmbView : public KListView
{
Q_OBJECT
public:
- SmbView(QWidget *parent = 0, const char *name = 0);
+ SmbView(TQWidget *parent = 0, const char *name = 0);
~SmbView();
- void setLoginInfos(const QString& login, const QString& password);
- void setOpen(QListViewItem*, bool);
+ void setLoginInfos(const TQString& login, const TQString& password);
+ void setOpen(TQListViewItem*, bool);
void init();
void abort();
signals:
- void printerSelected(const QString& work, const QString& server, const QString& printer);
+ void printerSelected(const TQString& work, const TQString& server, const TQString& printer);
void running(bool);
protected:
@@ -51,7 +51,7 @@ protected:
protected slots:
void slotReceivedStdout(KProcess*, char*, int);
void slotProcessExited(KProcess*);
- void slotSelectionChanged(QListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
private:
enum State { GroupListing, ServerListing, ShareListing, Idle };
diff --git a/kdeprint/marginpreview.cpp b/kdeprint/marginpreview.cpp
index 2190b4958..b41a14388 100644
--- a/kdeprint/marginpreview.cpp
+++ b/kdeprint/marginpreview.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcursor.h>
#define A4_WIDTH 595
@@ -34,7 +34,7 @@
#define SCALE(d,z) ((int)(float(d)*z+0.5))
#define UNSCALE(d,z) ((int)(float(d)/z+0.5))
-static void draw3DPage(QPainter *p, QRect r)
+static void draw3DPage(TQPainter *p, TQRect r)
{
// draw white page
p->fillRect(r,Qt::white);
@@ -52,8 +52,8 @@ static void draw3DPage(QPainter *p, QRect r)
p->lineTo(r.right()-1,r.top()+1);
}
-MarginPreview::MarginPreview(QWidget *parent, const char *name)
- : QWidget(parent,name)
+MarginPreview::MarginPreview(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
width_ = A4_WIDTH;
height_ = A4_HEIGHT;
@@ -102,7 +102,7 @@ void MarginPreview::setSymetric(bool on)
symetric_ = on;
}
-void MarginPreview::resizeEvent(QResizeEvent *)
+void MarginPreview::resizeEvent(TQResizeEvent *)
{
if (width_/height_ > float(width())/height())
{
@@ -124,11 +124,11 @@ void MarginPreview::resizeEvent(QResizeEvent *)
}
}
-void MarginPreview::paintEvent(QPaintEvent *)
+void MarginPreview::paintEvent(TQPaintEvent *)
{
QPainter p(this);
- QRect pagebox(QPoint(box_.left()-1,box_.top()-1),QPoint(box_.right()+2,box_.bottom()+2));
+ QRect pagebox(TQPoint(box_.left()-1,box_.top()-1),TQPoint(box_.right()+2,box_.bottom()+2));
if (nopreview_)
{
@@ -154,7 +154,7 @@ void MarginPreview::paintEvent(QPaintEvent *)
p.drawLine(box_.left(),m,box_.right(),m);
// fill useful area
- p.fillRect(margbox_,QColor(220,220,220));
+ p.fillRect(margbox_,TQColor(220,220,220));
}
}
@@ -169,7 +169,7 @@ void MarginPreview::setNoPreview(bool on)
// 2: bottom
// 3: left
// 4: right
-int MarginPreview::locateMouse(const QPoint& p)
+int MarginPreview::locateMouse(const TQPoint& p)
{
int tol = 2;
if (p.x() <= margbox_.left()+tol && p.x() >= margbox_.left()-tol)
@@ -184,7 +184,7 @@ int MarginPreview::locateMouse(const QPoint& p)
return 0;
}
-void MarginPreview::mouseMoveEvent(QMouseEvent *e)
+void MarginPreview::mouseMoveEvent(TQMouseEvent *e)
{
if (nopreview_ || state_ == Fixed)
return;
@@ -238,7 +238,7 @@ void MarginPreview::mouseMoveEvent(QMouseEvent *e)
}
}
-void MarginPreview::drawTempLine(QPainter *p)
+void MarginPreview::drawTempLine(TQPainter *p)
{
if (state_ >= LMoving)
{
@@ -260,7 +260,7 @@ void MarginPreview::drawTempLine(QPainter *p)
}
}
-void MarginPreview::mousePressEvent(QMouseEvent *e)
+void MarginPreview::mousePressEvent(TQMouseEvent *e)
{
if (e->button() != Qt::LeftButton || state_ != None)
return;
@@ -271,7 +271,7 @@ void MarginPreview::mousePressEvent(QMouseEvent *e)
}
}
-void MarginPreview::mouseReleaseEvent(QMouseEvent *e)
+void MarginPreview::mouseReleaseEvent(TQMouseEvent *e)
{
if (state_ > None)
{
diff --git a/kdeprint/marginpreview.h b/kdeprint/marginpreview.h
index 808c1188f..8cceba7bc 100644
--- a/kdeprint/marginpreview.h
+++ b/kdeprint/marginpreview.h
@@ -20,14 +20,14 @@
#ifndef MARGINPREVIEW_H
#define MARGINPREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class MarginPreview : public QWidget
{
Q_OBJECT
public:
- MarginPreview(QWidget *parent = 0, const char *name = 0);
+ MarginPreview(TQWidget *parent = 0, const char *name = 0);
~MarginPreview();
// note : unit -> points (1/72th in)
void setPageSize(float w, float h);
@@ -43,13 +43,13 @@ signals:
void marginChanged(int type, float value);
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
- void mouseMoveEvent(QMouseEvent *);
- void mousePressEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
- int locateMouse(const QPoint& p);
- void drawTempLine(QPainter*);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mouseMoveEvent(TQMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
+ int locateMouse(const TQPoint& p);
+ void drawTempLine(TQPainter*);
private:
float width_, height_;
diff --git a/kdeprint/marginvaluewidget.cpp b/kdeprint/marginvaluewidget.cpp
index 87be3f7e3..1ef2233e1 100644
--- a/kdeprint/marginvaluewidget.cpp
+++ b/kdeprint/marginvaluewidget.cpp
@@ -21,7 +21,7 @@
#include <math.h>
-MarginValueWidget::MarginValueWidget(KNumInput *below, double value, QWidget *parent, const char *name)
+MarginValueWidget::MarginValueWidget(KNumInput *below, double value, TQWidget *parent, const char *name)
: KDoubleNumInput(below, value, parent, name)
{
m_mode = Pixels;
@@ -31,7 +31,7 @@ MarginValueWidget::MarginValueWidget(KNumInput *below, double value, QWidget *pa
m_margin = ( float )value;
setMode(m_mode);
setRange(0, 999, 1, false);
- connect(this, SIGNAL(valueChanged(double)), SLOT(slotValueChanged(double)));
+ connect(this, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(slotValueChanged(double)));
}
float MarginValueWidget::margin()
diff --git a/kdeprint/marginvaluewidget.h b/kdeprint/marginvaluewidget.h
index ea444d4a9..40f471bb2 100644
--- a/kdeprint/marginvaluewidget.h
+++ b/kdeprint/marginvaluewidget.h
@@ -27,7 +27,7 @@ class MarginValueWidget : public KDoubleNumInput
Q_OBJECT
public:
enum Mode { Pixels = 0, IN, CM, MM };
- MarginValueWidget(KNumInput *below, double value = 18.0, QWidget *parent = 0, const char *name = 0);
+ MarginValueWidget(KNumInput *below, double value = 18.0, TQWidget *parent = 0, const char *name = 0);
float margin();
int resolution() const;
diff --git a/kdeprint/marginwidget.cpp b/kdeprint/marginwidget.cpp
index ddf714ae8..6061736a6 100644
--- a/kdeprint/marginwidget.cpp
+++ b/kdeprint/marginwidget.cpp
@@ -22,19 +22,19 @@
#include "marginvaluewidget.h"
#include "kprinter.h"
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kglobal.h>
-MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUnit)
-: QWidget(parent, name), m_default(4, 0), m_pagesize( 2 )
+MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricUnit)
+: TQWidget(parent, name), m_default(4, 0), m_pagesize( 2 )
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisTopMarginWidget = i18n( " <qt> "
+ TQString whatsThisTopMarginWidget = i18n( " <qt> "
" <p><b>Top Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the top margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -54,7 +54,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </p> "
" </qt>" );
- QString whatsThisBottomMarginWidget = i18n( " <qt> "
+ TQString whatsThisBottomMarginWidget = i18n( " <qt> "
" <p><b>Bottom Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the bottom margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -73,7 +73,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisLeftMarginWidget = i18n( " <qt> "
+ TQString whatsThisLeftMarginWidget = i18n( " <qt> "
" <p><b>Left Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the left margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -92,7 +92,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisRightMarginWidget = i18n( " <qt> "
+ TQString whatsThisRightMarginWidget = i18n( " <qt> "
" <p><b>Right Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the right margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -111,14 +111,14 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisMeasurementUnitMarginWidget = i18n( " <qt> "
+ TQString whatsThisMeasurementUnitMarginWidget = i18n( " <qt> "
" <p><b>Change Measurement Unit<b></p>. "
" <p>You can change the units of measurement for the page"
" margins here. Select from Millimeter, Centimeter, Inch or Pixels (1 pixel == 1/72 inch). "
" </p> "
" </qt>" );
- QString whatsThisCheckboxMarginWidget = i18n( " <qt> "
+ TQString whatsThisCheckboxMarginWidget = i18n( " <qt> "
" <p><b>Custom Margins Checkbox</b></p>. "
" <p>Enable this checkbox if you want to modify the margins of your printouts "
" <p>You can change margin settings in 4 ways: "
@@ -135,7 +135,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" fully utilize the KDEPrint framework, such as OpenOffice.org. </p> "
" </qt>" );
- QString whatsThisDragAndPreviewMarginWidget = i18n( " <qt> "
+ TQString whatsThisDragAndPreviewMarginWidget = i18n( " <qt> "
" <p><b>\"Drag-your-Margins\" </p>. "
" <p>Use your mouse to drag and set each margin on this little preview window. </p> "
" </qt>" );
@@ -145,22 +145,22 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
m_pagesize[ 1 ] = 842;
m_landscape = false;
- m_custom = new QCheckBox(i18n("&Use custom margins"), this);
- QWhatsThis::add(m_custom, whatsThisCheckboxMarginWidget);
+ m_custom = new TQCheckBox(i18n("&Use custom margins"), this);
+ TQWhatsThis::add(m_custom, whatsThisCheckboxMarginWidget);
m_top = new MarginValueWidget(0, 0.0, this);
- QWhatsThis::add(m_top, whatsThisTopMarginWidget);
+ TQWhatsThis::add(m_top, whatsThisTopMarginWidget);
m_bottom = new MarginValueWidget(m_top, 0.0, this);
- QWhatsThis::add(m_bottom, whatsThisBottomMarginWidget);
+ TQWhatsThis::add(m_bottom, whatsThisBottomMarginWidget);
m_left = new MarginValueWidget(m_bottom, 0.0, this);
- QWhatsThis::add(m_left, whatsThisLeftMarginWidget);
+ TQWhatsThis::add(m_left, whatsThisLeftMarginWidget);
m_right = new MarginValueWidget(m_left, 0.0, this);
- QWhatsThis::add(m_right, whatsThisRightMarginWidget);
+ TQWhatsThis::add(m_right, whatsThisRightMarginWidget);
m_top->setLabel(i18n("&Top:"), Qt::AlignLeft|Qt::AlignVCenter);
m_bottom->setLabel(i18n("&Bottom:"), Qt::AlignLeft|Qt::AlignVCenter);
m_left->setLabel(i18n("Le&ft:"), Qt::AlignLeft|Qt::AlignVCenter);
m_right->setLabel(i18n("&Right:"), Qt::AlignLeft|Qt::AlignVCenter);
- m_units = new QComboBox(this);
- QWhatsThis::add(m_units, whatsThisMeasurementUnitMarginWidget);
+ m_units = new TQComboBox(this);
+ TQWhatsThis::add(m_units, whatsThisMeasurementUnitMarginWidget);
m_units->insertItem(i18n("Pixels (1/72nd in)"));
if ( allowMetricUnit )
{
@@ -169,32 +169,32 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
m_units->insertItem( i18n( "Millimeters (mm)" ) );
}
m_units->setCurrentItem(0);
- connect(m_units, SIGNAL(activated(int)), m_top, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_bottom, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_left, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_right, SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_top, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_bottom, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_left, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_right, TQT_SLOT(setMode(int)));
m_preview = new MarginPreview(this);
- QWhatsThis::add(m_preview, whatsThisDragAndPreviewMarginWidget);
+ TQWhatsThis::add(m_preview, whatsThisDragAndPreviewMarginWidget);
m_preview->setMinimumSize(60, 80);
m_preview->setPageSize(m_pagesize[ 0 ], m_pagesize[ 1 ]);
- connect(m_preview, SIGNAL(marginChanged(int,float)), SLOT(slotMarginPreviewChanged(int,float)));
- connect(m_top, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_bottom, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_left, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_right, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
+ connect(m_preview, TQT_SIGNAL(marginChanged(int,float)), TQT_SLOT(slotMarginPreviewChanged(int,float)));
+ connect(m_top, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_bottom, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_left, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_right, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
slotMarginValueChanged();
- connect(m_custom, SIGNAL(toggled(bool)), m_top, SLOT(setEnabled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), m_left, SLOT(setEnabled(bool)));
- //connect(m_custom, SIGNAL(toggled(bool)), m_units, SLOT(setEnabled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), SLOT(slotCustomMarginsToggled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), m_preview, SLOT(enableRubberBand(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_top, TQT_SLOT(setEnabled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_left, TQT_SLOT(setEnabled(bool)));
+ //connect(m_custom, TQT_SIGNAL(toggled(bool)), m_units, TQT_SLOT(setEnabled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCustomMarginsToggled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_preview, TQT_SLOT(enableRubberBand(bool)));
m_top->setEnabled(false);
m_bottom->setEnabled(false);
m_left->setEnabled(false);
m_right->setEnabled(false);
//m_units->setEnabled(false);
- QGridLayout *l3 = new QGridLayout(this, 7, 2, 0, 10);
+ QGridLayout *l3 = new TQGridLayout(this, 7, 2, 0, 10);
l3->addWidget(m_custom, 0, 0);
l3->addWidget(m_top, 1, 0);
l3->addWidget(m_bottom, 2, 0);
@@ -237,8 +237,8 @@ void MarginWidget::setSymetricMargins(bool on)
m_right->setEnabled(on && m_custom->isChecked());
if (on)
{
- connect(m_top, SIGNAL(marginChanged(float)), m_bottom, SLOT(setMargin(float)));
- connect(m_left, SIGNAL(marginChanged(float)), m_right, SLOT(setMargin(float)));
+ connect(m_top, TQT_SIGNAL(marginChanged(float)), m_bottom, TQT_SLOT(setMargin(float)));
+ connect(m_left, TQT_SIGNAL(marginChanged(float)), m_right, TQT_SLOT(setMargin(float)));
m_bottom->setMargin(m_top->margin());
m_right->setMargin(m_left->margin());
}
diff --git a/kdeprint/marginwidget.h b/kdeprint/marginwidget.h
index 885e1eb49..8e966b3f5 100644
--- a/kdeprint/marginwidget.h
+++ b/kdeprint/marginwidget.h
@@ -20,8 +20,8 @@
#ifndef MARGINWIDGET_H
#define MARGINWIDGET_H
-#include <qwidget.h>
-#include <qvaluevector.h>
+#include <tqwidget.h>
+#include <tqvaluevector.h>
#include <kdelibs_export.h>
@@ -34,7 +34,7 @@ class KDEPRINT_EXPORT MarginWidget : public QWidget
{
Q_OBJECT
public:
- MarginWidget(QWidget *parent = 0, const char *name = 0, bool allowMetricUnit = true);
+ MarginWidget(TQWidget *parent = 0, const char *name = 0, bool allowMetricUnit = true);
~MarginWidget();
void setSymetricMargins(bool on);
@@ -67,8 +67,8 @@ private:
QComboBox *m_units;
QCheckBox *m_custom;
bool m_symetric, m_block;
- QValueVector<float> m_default;
- QValueVector<float> m_pagesize;
+ TQValueVector<float> m_default;
+ TQValueVector<float> m_pagesize;
bool m_landscape;
};
diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp
index b6c30b413..d4c4ae40d 100644
--- a/kdeprint/messagewindow.cpp
+++ b/kdeprint/messagewindow.cpp
@@ -19,30 +19,30 @@
#include "messagewindow.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqhbox.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <kdebug.h>
-QPtrDict<MessageWindow> MessageWindow::m_windows;
+TQPtrDict<MessageWindow> MessageWindow::m_windows;
-MessageWindow::MessageWindow( const QString& txt, int delay, QWidget *parent, const char *name )
- : QWidget( parent, name, WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose )
+MessageWindow::MessageWindow( const TQString& txt, int delay, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose )
{
- QHBox *box = new QHBox( this );
- box->setFrameStyle( QFrame::Panel|QFrame::Raised );
+ TQHBox *box = new TQHBox( this );
+ box->setFrameStyle( TQFrame::Panel|TQFrame::Raised );
box->setLineWidth( 1 );
box->setSpacing( 10 );
box->setMargin( 5 );
- QLabel *pix = new QLabel( box );
+ TQLabel *pix = new TQLabel( box );
pix->setPixmap( DesktopIcon( "kdeprint_printer" ) );
- m_text = new QLabel( txt, box );
+ m_text = new TQLabel( txt, box );
- QHBoxLayout *l0 = new QHBoxLayout( this, 0, 0 );
+ TQHBoxLayout *l0 = new TQHBoxLayout( this, 0, 0 );
l0->addWidget( box );
m_windows.insert( parent, this );
@@ -50,7 +50,7 @@ MessageWindow::MessageWindow( const QString& txt, int delay, QWidget *parent, co
if ( delay == 0 )
slotTimer();
else
- QTimer::singleShot( delay, this, SLOT( slotTimer() ) );
+ TQTimer::singleShot( delay, this, TQT_SLOT( slotTimer() ) );
}
MessageWindow::~MessageWindow()
@@ -60,8 +60,8 @@ MessageWindow::~MessageWindow()
void MessageWindow::slotTimer()
{
- QSize psz = parentWidget()->size(), sz = sizeHint();
- move( parentWidget()->mapToGlobal( QPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) );
+ TQSize psz = parentWidget()->size(), sz = sizeHint();
+ move( parentWidget()->mapToGlobal( TQPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) );
if ( !isVisible() )
{
show();
@@ -69,17 +69,17 @@ void MessageWindow::slotTimer()
}
}
-QString MessageWindow::text() const
+TQString MessageWindow::text() const
{
return m_text->text();
}
-void MessageWindow::setText( const QString& txt )
+void MessageWindow::setText( const TQString& txt )
{
m_text->setText( txt );
}
-void MessageWindow::add( QWidget *parent, const QString& txt, int delay )
+void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay )
{
if ( !parent )
kdWarning( 500 ) << "Cannot add a message window to a null parent" << endl;
@@ -93,13 +93,13 @@ void MessageWindow::add( QWidget *parent, const QString& txt, int delay )
}
}
-void MessageWindow::remove( QWidget *parent )
+void MessageWindow::remove( TQWidget *parent )
{
if ( parent )
delete m_windows.find( parent );
}
-void MessageWindow::change( QWidget *parent, const QString& txt )
+void MessageWindow::change( TQWidget *parent, const TQString& txt )
{
if ( parent )
{
@@ -113,7 +113,7 @@ void MessageWindow::change( QWidget *parent, const QString& txt )
void MessageWindow::removeAll()
{
- QPtrDictIterator<MessageWindow> it( m_windows );
+ TQPtrDictIterator<MessageWindow> it( m_windows );
while ( it.current() )
delete it.current();
}
diff --git a/kdeprint/messagewindow.h b/kdeprint/messagewindow.h
index b364e85cf..a9a93731f 100644
--- a/kdeprint/messagewindow.h
+++ b/kdeprint/messagewindow.h
@@ -20,8 +20,8 @@
#ifndef MESSAGEWINDOW_H
#define MESSAGEWINDOW_H
-#include <qwidget.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqptrdict.h>
#include <kdelibs_export.h>
@@ -34,22 +34,22 @@ class KDEPRINT_EXPORT MessageWindow : public QWidget
public:
~MessageWindow();
- static void add( QWidget *parent, const QString& txt, int delay = 500 );
- static void change( QWidget *parent, const QString& txt );
- static void remove( QWidget *parent );
+ static void add( TQWidget *parent, const TQString& txt, int delay = 500 );
+ static void change( TQWidget *parent, const TQString& txt );
+ static void remove( TQWidget *parent );
static void removeAll();
protected slots:
void slotTimer();
protected:
- MessageWindow( const QString& txt, int delay = 500, QWidget *parent = 0, const char *name = 0 );
- void setText( const QString& txt );
- QString text() const;
+ MessageWindow( const TQString& txt, int delay = 500, TQWidget *parent = 0, const char *name = 0 );
+ void setText( const TQString& txt );
+ TQString text() const;
private:
- QLabel *m_text;
- static QPtrDict<MessageWindow> m_windows;
+ TQLabel *m_text;
+ static TQPtrDict<MessageWindow> m_windows;
};
#endif
diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp
index d029d0c41..038e9ddbd 100644
--- a/kdeprint/plugincombobox.cpp
+++ b/kdeprint/plugincombobox.cpp
@@ -21,16 +21,16 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
-:QWidget(parent, name)
+PluginComboBox::PluginComboBox(TQWidget *parent, const char *name)
+:TQWidget(parent, name)
{
- QString whatsThisCurrentPrintsystem = i18n(" <qt><b>Print Subsystem Selection</b>"
+ TQString whatsThisCurrentPrintsystem = i18n(" <qt><b>Print Subsystem Selection</b>"
" <p>This combo box shows (and lets you select)"
" a print subsystem to be used by KDEPrint. (This print"
" subsystem must, of course, be installed inside your"
@@ -40,22 +40,22 @@ PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
" UNIX Printing System</em>."
" </qt>" );
- m_combo = new QComboBox(this, "PluginCombo");
- QWhatsThis::add(m_combo, whatsThisCurrentPrintsystem);
- QLabel *m_label = new QLabel(i18n("Print s&ystem currently used:"), this);
- QWhatsThis::add(m_label, whatsThisCurrentPrintsystem);
+ m_combo = new TQComboBox(this, "PluginCombo");
+ TQWhatsThis::add(m_combo, whatsThisCurrentPrintsystem);
+ QLabel *m_label = new TQLabel(i18n("Print s&ystem currently used:"), this);
+ TQWhatsThis::add(m_label, whatsThisCurrentPrintsystem);
m_label->setAlignment(AlignVCenter|AlignRight);
m_label->setBuddy(m_combo);
- m_plugininfo = new QLabel("Plugin information", this);
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 5);
+ m_plugininfo = new TQLabel("Plugin information", this);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 5);
l0->setColStretch(0, 1);
l0->addWidget(m_label, 0, 0);
l0->addWidget(m_combo, 0, 1);
l0->addWidget(m_plugininfo, 1, 1);
- QValueList<KMFactory::PluginInfo> list = KMFactory::self()->pluginList();
+ TQValueList<KMFactory::PluginInfo> list = KMFactory::self()->pluginList();
QString currentPlugin = KMFactory::self()->printSystem();
- for (QValueList<KMFactory::PluginInfo>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMFactory::PluginInfo>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
m_combo->insertItem((*it).comment);
if ((*it).name == currentPlugin)
@@ -63,7 +63,7 @@ PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
m_pluginlist.append((*it).name);
}
- connect(m_combo, SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ connect(m_combo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
configChanged();
}
@@ -88,7 +88,7 @@ void PluginComboBox::reload()
void PluginComboBox::configChanged()
{
- QString whatsThisCurrentConnection = i18n(" <qt><b>Current Connection</b>"
+ TQString whatsThisCurrentConnection = i18n(" <qt><b>Current Connection</b>"
" <p>This line shows which CUPS server your PC is"
" currently connected to for printing and retrieving"
" printer info. To switch to a different CUPS server,"
@@ -97,7 +97,7 @@ void PluginComboBox::configChanged()
" </qt>" );
m_plugininfo->setText(KMManager::self()->stateInformation());
- QWhatsThis::add(m_plugininfo, whatsThisCurrentConnection);
+ TQWhatsThis::add(m_plugininfo, whatsThisCurrentConnection);
}
diff --git a/kdeprint/plugincombobox.h b/kdeprint/plugincombobox.h
index 22ca8b390..4f31da974 100644
--- a/kdeprint/plugincombobox.h
+++ b/kdeprint/plugincombobox.h
@@ -20,19 +20,19 @@
#ifndef PLUGINCOMBOBOX_H
#define PLUGINCOMBOBOX_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include "kpreloadobject.h"
class QComboBox;
class QLabel;
-class KDEPRINT_EXPORT PluginComboBox : public QWidget, public KPReloadObject
+class KDEPRINT_EXPORT PluginComboBox : public TQWidget, public KPReloadObject
{
Q_OBJECT
public:
- PluginComboBox(QWidget *parent = 0, const char *name = 0);
+ PluginComboBox(TQWidget *parent = 0, const char *name = 0);
protected slots:
void slotActivated(int);
diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp
index 1a89ee8f3..fbdfe5200 100644
--- a/kdeprint/posterpreview.cpp
+++ b/kdeprint/posterpreview.cpp
@@ -20,25 +20,25 @@
#include "posterpreview.h"
#include <kprocess.h>
-#include <qpainter.h>
-#include <qsimplerichtext.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqsimplerichtext.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kprinter.h>
#include <klocale.h>
#include <kcursor.h>
#include <kglobalsettings.h>
-PosterPreview::PosterPreview( QWidget *parent, const char *name )
- : QFrame( parent, name )
+PosterPreview::PosterPreview( TQWidget *parent, const char *name )
+ : TQFrame( parent, name )
{
m_postersize = m_mediasize = "A4";
m_cutmargin = 5;
init();
}
-PosterPreview::PosterPreview( const QString& postersize, const QString& mediasize, QWidget *parent, const char *name )
- : QFrame( parent, name )
+PosterPreview::PosterPreview( const TQString& postersize, const TQString& mediasize, TQWidget *parent, const char *name )
+ : TQFrame( parent, name )
{
m_postersize = postersize;
m_mediasize = mediasize;
@@ -54,8 +54,8 @@ PosterPreview::~PosterPreview()
void PosterPreview::init()
{
m_process = new KProcess;
- connect( m_process, SIGNAL( receivedStderr( KProcess*, char*, int ) ), SLOT( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( m_process, SIGNAL( processExited( KProcess* ) ), SLOT( slotProcessExited( KProcess* ) ) );
+ connect( m_process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), TQT_SLOT( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( m_process, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( slotProcessExited( KProcess* ) ) );
m_cols = m_rows = m_pw = m_ph = m_mw = m_mh = 0;
m_dirty = false;
@@ -83,7 +83,7 @@ void PosterPreview::setDirty()
if ( !m_dirty )
{
m_dirty = true;
- QTimer::singleShot( 1, this, SLOT( updatePoster() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( updatePoster() ) );
}
}
@@ -92,7 +92,7 @@ void PosterPreview::updatePoster()
m_buffer = "";
m_process->clearArguments();
*m_process << "poster" << "-F" << "-m" + m_mediasize << "-p" + m_postersize
- << "-c" + QString::number( m_cutmargin ) + "%";
+ << "-c" + TQString::number( m_cutmargin ) + "%";
if ( !m_process->start( KProcess::NotifyOnExit, KProcess::Stderr ) )
{
m_rows = m_cols = 0;
@@ -101,10 +101,10 @@ void PosterPreview::updatePoster()
}
}
-void PosterPreview::drawContents( QPainter *painter )
+void PosterPreview::drawContents( TQPainter *painter )
{
- QPixmap pix( width(), height() );
- QPainter *p = new QPainter( &pix );
+ TQPixmap pix( width(), height() );
+ TQPainter *p = new TQPainter( &pix );
p->fillRect( 0, 0, width(), height(), colorGroup().background() );
@@ -112,16 +112,16 @@ void PosterPreview::drawContents( QPainter *painter )
{
if ( m_rows <= 0 || m_cols <= 0 || m_pw <= 0 || m_ph <= 0 )
{
- QString txt = i18n( "Poster preview not available. Either the <b>poster</b> "
+ TQString txt = i18n( "Poster preview not available. Either the <b>poster</b> "
"executable is not properly installed, or you don't have "
"the required version; available at http://printing.kde.org/downloads/." );
- QSimpleRichText richtext( ( m_buffer.isEmpty() ? txt : m_buffer.prepend( "<pre>" ).append( "</pre>" ) ), p->font() );
+ TQSimpleRichText richtext( ( m_buffer.isEmpty() ? txt : m_buffer.prepend( "<pre>" ).append( "</pre>" ) ), p->font() );
richtext.adjustSize();
int x = ( width()-richtext.widthUsed() )/2, y = ( height()-richtext.height() )/2;
x = QMAX( x, 0 );
y = QMAX( y, 0 );
- richtext.draw( p, x, y, QRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() );
- m_boundingrect = QRect();
+ richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() );
+ m_boundingrect = TQRect();
}
else
{
@@ -131,7 +131,7 @@ void PosterPreview::drawContents( QPainter *painter )
p->scale( scale, -scale );
int x = ( int )( width()/scale-totalx )/2, y = ( int )( height()/scale-totaly )/2;
p->translate( x, y );
- m_boundingrect = p->xForm( QRect( 0, 0, totalx, totaly ) );
+ m_boundingrect = p->xForm( TQRect( 0, 0, totalx, totaly ) );
x = y = 0;
int px = m_posterbb.x(), py = m_posterbb.y(), pw = m_posterbb.width(), ph = m_posterbb.height();
@@ -165,7 +165,7 @@ void PosterPreview::drawContents( QPainter *painter )
painter->drawPixmap( 0, 0, pix );
}
-void PosterPreview::mouseMoveEvent( QMouseEvent *e )
+void PosterPreview::mouseMoveEvent( TQMouseEvent *e )
{
if ( m_boundingrect.isValid() )
{
@@ -176,7 +176,7 @@ void PosterPreview::mouseMoveEvent( QMouseEvent *e )
}
}
-void PosterPreview::mousePressEvent( QMouseEvent *e )
+void PosterPreview::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == Qt::LeftButton && m_boundingrect.isValid() )
{
@@ -208,7 +208,7 @@ void PosterPreview::mousePressEvent( QMouseEvent *e )
void PosterPreview::slotProcessStderr( KProcess*, char *buf, int len )
{
- m_buffer.append( QCString( buf, len ) );
+ m_buffer.append( TQCString( buf, len ) );
}
void PosterPreview::slotProcessExited( KProcess* )
@@ -227,7 +227,7 @@ void PosterPreview::setPosterSize( int s )
setPosterSize( pageSizeToPageName( KPrinter::PageSize( s ) ) );
}
-void PosterPreview::setPosterSize( const QString& s )
+void PosterPreview::setPosterSize( const TQString& s )
{
if ( m_postersize != s )
{
@@ -243,7 +243,7 @@ void PosterPreview::setMediaSize( int s )
setMediaSize( pageSizeToPageName( ( KPrinter::PageSize )s ) );
}
-void PosterPreview::setMediaSize( const QString& s )
+void PosterPreview::setMediaSize( const TQString& s )
{
if ( m_mediasize != s )
{
@@ -260,11 +260,11 @@ void PosterPreview::setCutMargin( int value )
setDirty();
}
-void PosterPreview::setSelectedPages( const QString& s )
+void PosterPreview::setSelectedPages( const TQString& s )
{
- QStringList l = QStringList::split( ",", s, false );
+ TQStringList l = TQStringList::split( ",", s, false );
m_selectedpages.clear();
- for ( QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it )
+ for ( TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it )
{
int p;
if ( ( p = ( *it ).find( '-' ) ) == -1 )
@@ -281,11 +281,11 @@ void PosterPreview::setSelectedPages( const QString& s )
void PosterPreview::emitSelectedPages()
{
- QString s;
+ TQString s;
if ( m_selectedpages.count() > 0 )
{
- for ( QValueList<int>::ConstIterator it=m_selectedpages.begin(); it!=m_selectedpages.end(); ++it )
- s.append( QString::number( *it ) + "," );
+ for ( TQValueList<int>::ConstIterator it=m_selectedpages.begin(); it!=m_selectedpages.end(); ++it )
+ s.append( TQString::number( *it ) + "," );
s.truncate( s.length()-1 );
}
emit selectionChanged( s );
diff --git a/kdeprint/posterpreview.h b/kdeprint/posterpreview.h
index 6e84d048d..25fda31eb 100644
--- a/kdeprint/posterpreview.h
+++ b/kdeprint/posterpreview.h
@@ -20,8 +20,8 @@
#ifndef POSTERPREVIEW_H
#define POSTERPREVIEW_H
-#include <qframe.h>
-#include <qvaluelist.h>
+#include <tqframe.h>
+#include <tqvaluelist.h>
class KProcess;
@@ -29,29 +29,29 @@ class PosterPreview : public QFrame
{
Q_OBJECT
public:
- PosterPreview( QWidget *parent = 0, const char *name = 0 );
- PosterPreview( const QString& postersize, const QString& mediasize, QWidget *parent = 0, const char *name = 0 );
+ PosterPreview( TQWidget *parent = 0, const char *name = 0 );
+ PosterPreview( const TQString& postersize, const TQString& mediasize, TQWidget *parent = 0, const char *name = 0 );
~PosterPreview();
public slots:
void setPosterSize( int );
- void setPosterSize( const QString& );
+ void setPosterSize( const TQString& );
void setMediaSize( int );
- void setMediaSize( const QString& );
+ void setMediaSize( const TQString& );
void setCutMargin( int );
void updatePoster();
- void setSelectedPages( const QString& );
+ void setSelectedPages( const TQString& );
signals:
- void selectionChanged( const QString& );
+ void selectionChanged( const TQString& );
protected:
void parseBuffer();
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
void init();
void setDirty();
- void mouseMoveEvent( QMouseEvent* );
- void mousePressEvent( QMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
void emitSelectedPages();
protected slots:
@@ -62,14 +62,14 @@ private:
int m_rows, m_cols;
int m_pw, m_ph; // page size
int m_mw, m_mh; // cur margins
- QRect m_posterbb; // poster bounding box (without any margin)
+ TQRect m_posterbb; // poster bounding box (without any margin)
KProcess *m_process;
- QString m_buffer;
- QString m_postersize, m_mediasize;
+ TQString m_buffer;
+ TQString m_postersize, m_mediasize;
int m_cutmargin;
bool m_dirty;
- QRect m_boundingrect;
- QValueList<int> m_selectedpages;
+ TQRect m_boundingrect;
+ TQValueList<int> m_selectedpages;
};
#endif /* POSTERPREVIEW_H */
diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp
index ca5ad2af4..9fbecc774 100644
--- a/kdeprint/ppdloader.cpp
+++ b/kdeprint/ppdloader.cpp
@@ -24,27 +24,27 @@
#include <kfilterdev.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <math.h>
-void kdeprint_ppdscanner_init( QIODevice* );
+void kdeprint_ppdscanner_init( TQIODevice* );
void kdeprint_ppdscanner_terminate( bool deleteIt = true );
int kdeprint_ppdscanner_numberoflines();
-static QString processLocaleString( const QString& s )
+static TQString processLocaleString( const TQString& s )
{
- QString res;
+ TQString res;
uint pos = 0;
while ( pos < s.length() )
{
- QChar c = s[ pos++ ];
+ TQChar c = s[ pos++ ];
if ( c == '<' )
{
bool flag = false;
uint hc = 0;
while ( pos < s.length() )
{
- QChar cc = s[ pos++ ];
+ TQChar cc = s[ pos++ ];
uint _hc = 0;
if ( cc == '>' )
break;
@@ -55,7 +55,7 @@ static QString processLocaleString( const QString& s )
if ( flag )
{
hc |= _hc;
- res.append( QChar( hc ) );
+ res.append( TQChar( hc ) );
hc = 0;
}
else
@@ -71,10 +71,10 @@ static QString processLocaleString( const QString& s )
return res;
}
-static QValueList<float> splitNumberString( const QString& _s )
+static TQValueList<float> splitNumberString( const TQString& _s )
{
- QString s = _s.simplifyWhiteSpace();
- QValueList<float> l;
+ TQString s = _s.simplifyWhiteSpace();
+ TQValueList<float> l;
int p1 = 1, p2 = 0;
while ( true )
{
@@ -96,7 +96,7 @@ static QValueList<float> splitNumberString( const QString& _s )
struct PS_private
{
- QString name;
+ TQString name;
struct
{
float width, height;
@@ -117,14 +117,14 @@ PPDLoader::~PPDLoader()
{
}
-DrMain* PPDLoader::readFromFile( const QString& filename )
+DrMain* PPDLoader::readFromFile( const TQString& filename )
{
// Initialization
m_groups.clear();
m_option = NULL;
m_fonts.clear();
// Open driver file
- QIODevice *d = KFilterDev::deviceForFile( filename );
+ TQIODevice *d = KFilterDev::deviceForFile( filename );
if ( d && d->open( IO_ReadOnly ) )
{
DrMain *driver = new DrMain;
@@ -165,7 +165,7 @@ DrMain* PPDLoader::readFromFile( const QString& filename )
return 0;
}
-DrMain* PPDLoader::loadDriver( const QString& filename, QString* msg )
+DrMain* PPDLoader::loadDriver( const TQString& filename, TQString* msg )
{
PPDLoader loader;
DrMain *driver = loader.readFromFile( filename );
@@ -174,7 +174,7 @@ DrMain* PPDLoader::loadDriver( const QString& filename, QString* msg )
return driver;
}
-bool PPDLoader::openUi( const QString& name, const QString& desc, const QString& type )
+bool PPDLoader::openUi( const TQString& name, const TQString& desc, const TQString& type )
{
if ( m_option )
{
@@ -199,7 +199,7 @@ bool PPDLoader::openUi( const QString& name, const QString& desc, const QString&
return true;
}
-bool PPDLoader::endUi( const QString& name )
+bool PPDLoader::endUi( const TQString& name )
{
if ( m_option && ( m_option->name() == name || m_option->name() == name.mid( 1 ) ) )
{
@@ -207,7 +207,7 @@ bool PPDLoader::endUi( const QString& name )
delete m_option;
else
{
- QString defval = m_option->get( "default" );
+ TQString defval = m_option->get( "default" );
DrGroup *grp = 0;
if ( !defval.isEmpty() )
m_option->setValueText( defval );
@@ -229,7 +229,7 @@ bool PPDLoader::endUi( const QString& name )
return false;
}
-bool PPDLoader::openGroup( const QString& name, const QString& desc )
+bool PPDLoader::openGroup( const TQString& name, const TQString& desc )
{
DrGroup *grp = new DrGroup;
grp->setName( name );
@@ -242,7 +242,7 @@ bool PPDLoader::openGroup( const QString& name, const QString& desc )
return true;
}
-bool PPDLoader::endGroup( const QString& name )
+bool PPDLoader::endGroup( const TQString& name )
{
if ( m_groups.size() > 1 && m_groups.top()->name() == name )
{
@@ -252,7 +252,7 @@ bool PPDLoader::endGroup( const QString& name )
return false;
}
-bool PPDLoader::putStatement( const QString& keyword, const QString& name, const QString& desc, const QStringList& values )
+bool PPDLoader::putStatement( const TQString& keyword, const TQString& name, const TQString& desc, const TQStringList& values )
{
if ( m_option )
{
@@ -270,7 +270,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
}
else
{
- QString fv = m_option->get( "fixedvals" );
+ TQString fv = m_option->get( "fixedvals" );
if ( fv.isEmpty() )
fv = name;
else
@@ -281,7 +281,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
else if ( keyword == "FoomaticRIPOption" && name == m_option->name()
&& values.size() > 1 )
{
- QString type = values[ 0 ];
+ TQString type = values[ 0 ];
if ( type == "float" || type == "int" )
{
DrBase *opt = 0;
@@ -294,8 +294,8 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
opt->set( "default", m_option->get( "default" ) );
if ( m_option->type() == DrBase::List )
{
- QStringList vals;
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( m_option )->choices() ) );
+ TQStringList vals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( m_option )->choices() ) );
for ( ; it.current(); ++it )
vals.append( it.current()->name() );
opt->set( "fixedvals", vals.join( "|" ) );
@@ -319,7 +319,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
return true;
}
-bool PPDLoader::putStatement2( const QString& keyword, const QString& value )
+bool PPDLoader::putStatement2( const TQString& keyword, const TQString& value )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -339,7 +339,7 @@ bool PPDLoader::putStatement2( const QString& keyword, const QString& value )
return true;
}
-bool PPDLoader::putDefault( const QString& keyword, const QString& value )
+bool PPDLoader::putDefault( const TQString& keyword, const TQString& value )
{
if ( keyword == "Resolution" && m_groups.size() > 0 )
{
@@ -358,7 +358,7 @@ bool PPDLoader::putDefault( const QString& keyword, const QString& value )
return false;
}
-bool PPDLoader::putConstraint( const QString& opt1, const QString& opt2, const QString& ch1, const QString& ch2 )
+bool PPDLoader::putConstraint( const TQString& opt1, const TQString& opt2, const TQString& ch1, const TQString& ch2 )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -368,7 +368,7 @@ bool PPDLoader::putConstraint( const QString& opt1, const QString& opt2, const Q
return true;
}
-bool PPDLoader::putFooData( const QString& data )
+bool PPDLoader::putFooData( const TQString& data )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -377,16 +377,16 @@ bool PPDLoader::putFooData( const QString& data )
return true;
}
-bool PPDLoader::putFooProcessedData( const QVariant& var )
+bool PPDLoader::putFooProcessedData( const TQVariant& var )
{
- QMap<QString,QVariant>::ConstIterator it = var.mapFind( "args_byname" );
+ TQMap<TQString,TQVariant>::ConstIterator it = var.mapFind( "args_byname" );
if ( it != var.mapEnd() )
{
- QVariant opts = it.data();
+ TQVariant opts = it.data();
for ( it = opts.mapBegin(); it != opts.mapEnd(); ++it )
{
- QMap<QString,QVariant> opt = it.data().toMap();
- QString type = opt[ "type" ].toString();
+ TQMap<TQString,TQVariant> opt = it.data().toMap();
+ TQString type = opt[ "type" ].toString();
if ( type == "float" || type == "int" )
{
DrBase *o;
@@ -407,8 +407,8 @@ bool PPDLoader::putFooProcessedData( const QVariant& var )
{
if ( old->type() == DrBase::List )
{
- QStringList vals;
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( old )->choices() ) );
+ TQStringList vals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( old )->choices() ) );
for ( ; it.current(); ++it )
vals.append( it.current()->name() );
o->set( "fixedvals", vals.join( "|" ) );
@@ -427,9 +427,9 @@ bool PPDLoader::putFooProcessedData( const QVariant& var )
return true;
}
-bool PPDLoader::putPaperDimension( const QString& name, const QString& s )
+bool PPDLoader::putPaperDimension( const TQString& name, const TQString& s )
{
- QValueList<float> l = splitNumberString( s );
+ TQValueList<float> l = splitNumberString( s );
PS_private *ps = m_ps.find( name );
if ( !ps )
@@ -444,9 +444,9 @@ bool PPDLoader::putPaperDimension( const QString& name, const QString& s )
return true;
}
-bool PPDLoader::putImageableArea( const QString& name, const QString& s )
+bool PPDLoader::putImageableArea( const TQString& name, const TQString& s )
{
- QValueList<float> l = splitNumberString( s );
+ TQValueList<float> l = splitNumberString( s );
PS_private *ps = m_ps.find( name );
if ( !ps )
@@ -463,9 +463,9 @@ bool PPDLoader::putImageableArea( const QString& name, const QString& s )
return true;
}
-DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
+DrGroup* PPDLoader::findOrCreateGroupForOption( const TQString& optname )
{
- QString grpname;
+ TQString grpname;
if ( optname == "PageSize" ||
optname == "InputSlot" ||
optname == "ManualFeed" ||
@@ -486,7 +486,7 @@ DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
grpname = "Others";
DrGroup *grp = 0;
- for ( QPtrListIterator<DrGroup> it( m_groups[ 0 ]->groups() ); it.current(); ++it )
+ for ( TQPtrListIterator<DrGroup> it( m_groups[ 0 ]->groups() ); it.current(); ++it )
if ( it.current()->name() == grpname )
{
grp = it.current();
@@ -504,7 +504,7 @@ DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
void PPDLoader::processPageSizes( DrMain *driver )
{
- QDictIterator<PS_private> it( m_ps );
+ TQDictIterator<PS_private> it( m_ps );
for ( ; it.current(); ++it )
{
//qDebug( "ADDING PAGESIZE: %16s, Size = ( %.2f, %.2f ), Area = ( %.2f, %.2f, %.2f, %.2f )", it.current()->name.latin1(),
@@ -520,12 +520,12 @@ void PPDLoader::processPageSizes( DrMain *driver )
m_ps.clear();
}
-void PPDLoader::setErrorMsg( const QString& msg )
+void PPDLoader::setErrorMsg( const TQString& msg )
{
m_errormsg = msg;
}
-QString PPDLoader::errorMsg() const
+TQString PPDLoader::errorMsg() const
{
return m_errormsg;
}
diff --git a/kdeprint/ppdloader.h b/kdeprint/ppdloader.h
index cd184fb35..703303fe8 100644
--- a/kdeprint/ppdloader.h
+++ b/kdeprint/ppdloader.h
@@ -20,11 +20,11 @@
#ifndef PPDLOADER_H
#define PPDLOADER_H
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qdict.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqdict.h>
#include <kdelibs_export.h>
@@ -39,35 +39,35 @@ public:
PPDLoader();
~PPDLoader();
- DrMain* readFromFile( const QString& filename );
+ DrMain* readFromFile( const TQString& filename );
- bool openUi( const QString& name, const QString& desc, const QString& type );
- bool endUi( const QString& name );
- bool openGroup( const QString& name, const QString& desc );
- bool endGroup( const QString& name );
- bool putStatement( const QString& keyword, const QString& name, const QString& desc, const QStringList& values );
- bool putStatement2( const QString& keyword, const QString& value );
- bool putDefault( const QString& keyword, const QString& value );
- bool putConstraint( const QString& opt1, const QString& opt2, const QString& ch1, const QString& ch2 );
- bool putFooData( const QString& data );
- bool putFooProcessedData( const QVariant& var );
- bool putPaperDimension( const QString& name, const QString& s );
- bool putImageableArea( const QString& name, const QString& s );
+ bool openUi( const TQString& name, const TQString& desc, const TQString& type );
+ bool endUi( const TQString& name );
+ bool openGroup( const TQString& name, const TQString& desc );
+ bool endGroup( const TQString& name );
+ bool putStatement( const TQString& keyword, const TQString& name, const TQString& desc, const TQStringList& values );
+ bool putStatement2( const TQString& keyword, const TQString& value );
+ bool putDefault( const TQString& keyword, const TQString& value );
+ bool putConstraint( const TQString& opt1, const TQString& opt2, const TQString& ch1, const TQString& ch2 );
+ bool putFooData( const TQString& data );
+ bool putFooProcessedData( const TQVariant& var );
+ bool putPaperDimension( const TQString& name, const TQString& s );
+ bool putImageableArea( const TQString& name, const TQString& s );
- void setErrorMsg( const QString& msg );
- QString errorMsg() const;
+ void setErrorMsg( const TQString& msg );
+ TQString errorMsg() const;
- static DrMain* loadDriver( const QString& filename, QString* msg = NULL );
+ static DrMain* loadDriver( const TQString& filename, TQString* msg = NULL );
private:
- QValueStack<DrGroup*> m_groups;
+ TQValueStack<DrGroup*> m_groups;
DrBase* m_option;
- QDict<PS_private> m_ps;
- QStringList m_fonts;
- QString m_errormsg;
+ TQDict<PS_private> m_ps;
+ TQStringList m_fonts;
+ TQString m_errormsg;
friend int kdeprint_ppdparse(void*);
- DrGroup* findOrCreateGroupForOption( const QString& );
+ DrGroup* findOrCreateGroupForOption( const TQString& );
void processPageSizes( DrMain* );
};
diff --git a/kdeprint/ppdparser.cpp b/kdeprint/ppdparser.cpp
index 336362f13..00710b152 100644
--- a/kdeprint/ppdparser.cpp
+++ b/kdeprint/ppdparser.cpp
@@ -125,7 +125,7 @@
#define YYDEBUG 1
#define YYERROR_VERBOSE 1
#include <stdlib.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "ppdloader.h"
@@ -1158,7 +1158,7 @@ yyreduce:
case 15:
#line 77 "./ppdparser.y"
- { builder->openUi(yyvsp[-2][0], QString::null, yyvsp[0][0]); ;}
+ { builder->openUi(yyvsp[-2][0], TQString::null, yyvsp[0][0]); ;}
break;
case 16:
@@ -1178,7 +1178,7 @@ yyreduce:
case 19:
#line 85 "./ppdparser.y"
- { builder->openGroup(yyvsp[0].join(" "), QString::null); ;}
+ { builder->openGroup(yyvsp[0].join(" "), TQString::null); ;}
break;
case 20:
@@ -1203,17 +1203,17 @@ yyreduce:
case 24:
#line 94 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], QString::null); ;}
+ { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], TQString::null); ;}
break;
case 25:
#line 95 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], QString::null, yyvsp[0][0]); ;}
+ { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], TQString::null, yyvsp[0][0]); ;}
break;
case 26:
#line 96 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], QString::null, QString::null); ;}
+ { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], TQString::null, TQString::null); ;}
break;
case 27:
@@ -1223,7 +1223,7 @@ yyreduce:
case 28:
#line 100 "./ppdparser.y"
- { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], QString::null, yyvsp[0]); ;}
+ { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], TQString::null, yyvsp[0]); ;}
break;
case 29:
@@ -1233,7 +1233,7 @@ yyreduce:
case 30:
#line 102 "./ppdparser.y"
- { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], QString::null, yyvsp[-1]); ;}
+ { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], TQString::null, yyvsp[-1]); ;}
break;
case 31:
diff --git a/kdeprint/ppdscanner.cpp b/kdeprint/ppdscanner.cpp
index 48ce2f89a..1b138a491 100644
--- a/kdeprint/ppdscanner.cpp
+++ b/kdeprint/ppdscanner.cpp
@@ -538,14 +538,14 @@ char *yytext;
* Boston, MA 02110-1301, USA.
**/
-#include <qstringlist.h>
-#include <qiodevice.h>
+#include <tqstringlist.h>
+#include <tqiodevice.h>
#define YYSTYPE QStringList
#include "ppdparser.cpp.h"
#define yylval kdeprint_ppdlval
-QIODevice *kdeprint_ppdscanner_device = NULL;
+TQIODevice *kdeprint_ppdscanner_device = NULL;
#define YY_INPUT(buf,result,max_size) \
{ \
if (kdeprint_ppdscanner_device) \
@@ -1895,7 +1895,7 @@ int main()
#line 123 "./ppdscanner.l"
-void kdeprint_ppdscanner_init(QIODevice *d)
+void kdeprint_ppdscanner_init(TQIODevice *d)
{
kdeprint_ppdscanner_device = d;
kdeprint_ppdscanner_lno = 1;
diff --git a/kdeprint/printerfilter.cpp b/kdeprint/printerfilter.cpp
index a85944dc7..a6f02f077 100644
--- a/kdeprint/printerfilter.cpp
+++ b/kdeprint/printerfilter.cpp
@@ -25,8 +25,8 @@
#include <kglobal.h>
#include <kdebug.h>
-PrinterFilter::PrinterFilter(QObject *parent, const char *name)
-: QObject(parent, name)
+PrinterFilter::PrinterFilter(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
m_locationRe.setWildcard(true);
update();
diff --git a/kdeprint/printerfilter.h b/kdeprint/printerfilter.h
index dba7c6fa7..7deb9d345 100644
--- a/kdeprint/printerfilter.h
+++ b/kdeprint/printerfilter.h
@@ -20,16 +20,16 @@
#ifndef PRINTERFILTER_H
#define PRINTERFILTER_H
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
class KMPrinter;
class PrinterFilter : QObject
{
public:
- PrinterFilter(QObject *parent = 0, const char *name = 0);
+ PrinterFilter(TQObject *parent = 0, const char *name = 0);
~PrinterFilter();
bool filter(KMPrinter*);
diff --git a/kdeprint/rlpr/kmconfigproxy.cpp b/kdeprint/rlpr/kmconfigproxy.cpp
index 4c81ba6fc..0676fc7e6 100644
--- a/kdeprint/rlpr/kmconfigproxy.cpp
+++ b/kdeprint/rlpr/kmconfigproxy.cpp
@@ -20,10 +20,10 @@
#include "kmconfigproxy.h"
#include "kmproxywidget.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMConfigProxy::KMConfigProxy(QWidget *parent)
+KMConfigProxy::KMConfigProxy(TQWidget *parent)
: KMConfigPage(parent,"Proxy")
{
setPageName(i18n("Proxy"));
@@ -31,7 +31,7 @@ KMConfigProxy::KMConfigProxy(QWidget *parent)
setPagePixmap("proxy");
m_widget = new KMProxyWidget(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 5, 0);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 5, 0);
lay0->addWidget(m_widget);
lay0->addStretch(1);
}
diff --git a/kdeprint/rlpr/kmconfigproxy.h b/kdeprint/rlpr/kmconfigproxy.h
index ea3e80118..0fcfdaf55 100644
--- a/kdeprint/rlpr/kmconfigproxy.h
+++ b/kdeprint/rlpr/kmconfigproxy.h
@@ -28,7 +28,7 @@ class KConfig;
class KMConfigProxy : public KMConfigPage
{
public:
- KMConfigProxy(QWidget *parent = 0);
+ KMConfigProxy(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/rlpr/kmproprlpr.cpp b/kdeprint/rlpr/kmproprlpr.cpp
index f13436e0b..3296949a3 100644
--- a/kdeprint/rlpr/kmproprlpr.cpp
+++ b/kdeprint/rlpr/kmproprlpr.cpp
@@ -21,21 +21,21 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropRlpr::KMPropRlpr(QWidget *parent, const char *name)
+KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_host = new QLabel("",this);
- m_queue = new QLabel("",this);
+ m_host = new TQLabel("",this);
+ m_queue = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Host:"), this);
- QLabel *l2 = new QLabel(i18n("Queue:"), this);
+ QLabel *l1 = new TQLabel(i18n("Host:"), this);
+ QLabel *l2 = new TQLabel(i18n("Queue:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
diff --git a/kdeprint/rlpr/kmproprlpr.h b/kdeprint/rlpr/kmproprlpr.h
index 587321719..2c240f3db 100644
--- a/kdeprint/rlpr/kmproprlpr.h
+++ b/kdeprint/rlpr/kmproprlpr.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropRlpr : public KMPropWidget
{
public:
- KMPropRlpr(QWidget *parent = 0, const char *name = 0);
+ KMPropRlpr(TQWidget *parent = 0, const char *name = 0);
~KMPropRlpr();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/rlpr/kmproxywidget.cpp b/kdeprint/rlpr/kmproxywidget.cpp
index 5e4256ecf..c6dd59189 100644
--- a/kdeprint/rlpr/kmproxywidget.cpp
+++ b/kdeprint/rlpr/kmproxywidget.cpp
@@ -19,34 +19,34 @@
#include "kmproxywidget.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kconfig.h>
#include <kcursor.h>
-KMProxyWidget::KMProxyWidget(QWidget *parent, const char *name)
-: QGroupBox(0, Qt::Vertical, i18n("Proxy Settings"), parent, name)
+KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name)
+: TQGroupBox(0, Qt::Vertical, i18n("Proxy Settings"), parent, name)
{
- QLabel *m_hostlabel = new QLabel(i18n("&Host:"), this);
- QLabel *m_portlabel = new QLabel(i18n("&Port:"), this);
- m_useproxy = new QCheckBox(i18n("&Use proxy server"), this);
+ QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), this);
+ QLabel *m_portlabel = new TQLabel(i18n("&Port:"), this);
+ m_useproxy = new TQCheckBox(i18n("&Use proxy server"), this);
m_useproxy->setCursor(KCursor::handCursor());
- m_proxyhost = new QLineEdit(this);
- m_proxyport = new QLineEdit(this);
- m_proxyport->setValidator(new QIntValidator(m_proxyport));
+ m_proxyhost = new TQLineEdit(this);
+ m_proxyport = new TQLineEdit(this);
+ m_proxyport->setValidator(new TQIntValidator(m_proxyport));
m_hostlabel->setBuddy(m_proxyhost);
m_portlabel->setBuddy(m_proxyport);
- connect(m_useproxy,SIGNAL(toggled(bool)),m_proxyhost,SLOT(setEnabled(bool)));
- connect(m_useproxy,SIGNAL(toggled(bool)),m_proxyport,SLOT(setEnabled(bool)));
+ connect(m_useproxy,TQT_SIGNAL(toggled(bool)),m_proxyhost,TQT_SLOT(setEnabled(bool)));
+ connect(m_useproxy,TQT_SIGNAL(toggled(bool)),m_proxyport,TQT_SLOT(setEnabled(bool)));
m_proxyhost->setEnabled(false);
m_proxyport->setEnabled(false);
- QGridLayout *lay0 = new QGridLayout(layout(), 3, 2, 10);
+ QGridLayout *lay0 = new TQGridLayout(layout(), 3, 2, 10);
lay0->setColStretch(1,1);
lay0->addMultiCellWidget(m_useproxy,0,0,0,1);
lay0->addWidget(m_hostlabel,1,0);
@@ -58,14 +58,14 @@ KMProxyWidget::KMProxyWidget(QWidget *parent, const char *name)
void KMProxyWidget::loadConfig(KConfig *conf)
{
conf->setGroup("RLPR");
- m_proxyhost->setText(conf->readEntry("ProxyHost",QString::null));
- m_proxyport->setText(conf->readEntry("ProxyPort",QString::null));
+ m_proxyhost->setText(conf->readEntry("ProxyHost",TQString::null));
+ m_proxyport->setText(conf->readEntry("ProxyPort",TQString::null));
m_useproxy->setChecked(!m_proxyhost->text().isEmpty());
}
void KMProxyWidget::saveConfig(KConfig *conf)
{
conf->setGroup("RLPR");
- conf->writeEntry("ProxyHost",(m_useproxy->isChecked() ? m_proxyhost->text() : QString::null));
- conf->writeEntry("ProxyPort",(m_useproxy->isChecked() ? m_proxyport->text() : QString::null));
+ conf->writeEntry("ProxyHost",(m_useproxy->isChecked() ? m_proxyhost->text() : TQString::null));
+ conf->writeEntry("ProxyPort",(m_useproxy->isChecked() ? m_proxyport->text() : TQString::null));
}
diff --git a/kdeprint/rlpr/kmproxywidget.h b/kdeprint/rlpr/kmproxywidget.h
index 4c9dbf7e1..91314f3d3 100644
--- a/kdeprint/rlpr/kmproxywidget.h
+++ b/kdeprint/rlpr/kmproxywidget.h
@@ -20,7 +20,7 @@
#ifndef KMPROXYWIDGET_H
#define KMPROXYWIDGET_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class KConfig;
class QLineEdit;
@@ -29,7 +29,7 @@ class QCheckBox;
class KMProxyWidget : public QGroupBox
{
public:
- KMProxyWidget(QWidget *parent = 0, const char *name = 0);
+ KMProxyWidget(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp
index eafb1a497..f455fd1ff 100644
--- a/kdeprint/rlpr/kmrlprmanager.cpp
+++ b/kdeprint/rlpr/kmrlprmanager.cpp
@@ -20,15 +20,15 @@
#include "kmrlprmanager.h"
#include "kmprinter.h"
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <kstandarddirs.h>
#include <klocale.h>
-KMRlprManager::KMRlprManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMRlprManager::KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(true);
@@ -88,7 +88,7 @@ void KMRlprManager::listPrinters()
discardAllPrinters(false);
}
-void KMRlprManager::loadPrintersConf(const QString& filename)
+void KMRlprManager::loadPrintersConf(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -100,7 +100,7 @@ void KMRlprManager::loadPrintersConf(const QString& filename)
line = t.readLine().stripWhiteSpace();
if (line.isEmpty() || line[0] == '#')
continue;
- QStringList w = QStringList::split('\t',line,true);
+ QStringList w = TQStringList::split('\t',line,true);
if (w.count() < 3)
continue;
@@ -116,7 +116,7 @@ void KMRlprManager::loadPrintersConf(const QString& filename)
if (w.count() > 4) printer->setLocation(w[4]);
}
printer->setState(KMPrinter::Idle);
- printer->setDevice(QString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2]));
+ printer->setDevice(TQString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2]));
addPrinter(printer);
}
@@ -128,14 +128,14 @@ void KMRlprManager::savePrinters()
savePrintersConf(printerFile());
}
-void KMRlprManager::savePrintersConf(const QString& filename)
+void KMRlprManager::savePrintersConf(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "# File generated by KDE print system. Don't edit by hand." << endl;
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
{
if (!it.current()->name().isEmpty() && it.current()->instanceName().isEmpty())
@@ -152,7 +152,7 @@ void KMRlprManager::savePrintersConf(const QString& filename)
}
}
-QString KMRlprManager::printerFile()
+TQString KMRlprManager::printerFile()
{
return locateLocal("data","kdeprint/printers.conf");
}
diff --git a/kdeprint/rlpr/kmrlprmanager.h b/kdeprint/rlpr/kmrlprmanager.h
index 2a2e6844d..eb47f95df 100644
--- a/kdeprint/rlpr/kmrlprmanager.h
+++ b/kdeprint/rlpr/kmrlprmanager.h
@@ -21,13 +21,13 @@
#define KMRLPRMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
class KMRlprManager : public KMManager
{
public:
- KMRlprManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMRlprManager();
bool createPrinter(KMPrinter*);
@@ -37,9 +37,9 @@ public:
protected:
void listPrinters();
void savePrinters();
- void loadPrintersConf(const QString& filename);
- void savePrintersConf(const QString& filename);
- QString printerFile();
+ void loadPrintersConf(const TQString& filename);
+ void savePrintersConf(const TQString& filename);
+ TQString printerFile();
private:
QDateTime m_checktime;
diff --git a/kdeprint/rlpr/kmrlpruimanager.cpp b/kdeprint/rlpr/kmrlpruimanager.cpp
index 5cdb03b95..5ca7a2230 100644
--- a/kdeprint/rlpr/kmrlpruimanager.cpp
+++ b/kdeprint/rlpr/kmrlpruimanager.cpp
@@ -28,7 +28,7 @@
#include <klocale.h>
-KMRlprUiManager::KMRlprUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMRlprUiManager::KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
diff --git a/kdeprint/rlpr/kmrlpruimanager.h b/kdeprint/rlpr/kmrlpruimanager.h
index 5a31f4dee..3f244eb5b 100644
--- a/kdeprint/rlpr/kmrlpruimanager.h
+++ b/kdeprint/rlpr/kmrlpruimanager.h
@@ -25,7 +25,7 @@
class KMRlprUiManager : public KMUiManager
{
public:
- KMRlprUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMRlprUiManager();
void setupPropertyPages(KMPropertyPage*);
diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp
index 50006c14c..78f483db6 100644
--- a/kdeprint/rlpr/kmwrlpr.cpp
+++ b/kdeprint/rlpr/kmwrlpr.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qheader.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
#include <klistview.h>
#include <klocale.h>
#include <kiconloader.h>
-static QListViewItem* findChild(QListViewItem *c, const QString& txt)
+static TQListViewItem* findChild(TQListViewItem *c, const TQString& txt)
{
QListViewItem *item(c);
while (item)
@@ -43,7 +43,7 @@ static QListViewItem* findChild(QListViewItem *c, const QString& txt)
//*****************************************************************************************************
-KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
+KMWRlpr::KMWRlpr(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+1;
@@ -51,22 +51,22 @@ KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_view = new KListView(this);
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
- m_view->addColumn(QString::fromLatin1(""));
+ m_view->addColumn(TQString::fromLatin1(""));
m_view->header()->hide();
m_view->setRootIsDecorated(true);
m_view->setSorting(0);
- m_host = new QLineEdit(this);
- m_queue = new QLineEdit(this);
- QLabel *m_hostlabel = new QLabel(i18n("Host:"), this);
- QLabel *m_queuelabel = new QLabel(i18n("Queue:"), this);
+ m_host = new TQLineEdit(this);
+ m_queue = new TQLineEdit(this);
+ QLabel *m_hostlabel = new TQLabel(i18n("Host:"), this);
+ QLabel *m_queuelabel = new TQLabel(i18n("Queue:"), this);
m_hostlabel->setBuddy(m_host);
m_queuelabel->setBuddy(m_queue);
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
- QHBoxLayout *lay0 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay1 = new QVBoxLayout(0, 0, 5);
+ QHBoxLayout *lay0 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay1 = new TQVBoxLayout(0, 0, 5);
lay0->addWidget(m_view,1);
lay0->addLayout(lay1,1);
lay1->addWidget(m_hostlabel);
@@ -79,7 +79,7 @@ KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
initialize();
}
-bool KMWRlpr::isValid(QString& msg)
+bool KMWRlpr::isValid(TQString& msg)
{
if (m_host->text().isEmpty())
msg = i18n("Empty host name.");
@@ -109,7 +109,7 @@ void KMWRlpr::initPrinter(KMPrinter *p)
void KMWRlpr::updatePrinter(KMPrinter *p)
{
- QString uri = QString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text());
+ QString uri = TQString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text());
p->setDevice(uri);
p->setOption("host",m_host->text());
p->setOption("queue",m_queue->text());
@@ -128,7 +128,7 @@ void KMWRlpr::updatePrinter(KMPrinter *p)
void KMWRlpr::initialize()
{
m_view->clear();
- QFile f(QDir::homeDirPath()+"/.rlprrc");
+ QFile f(TQDir::homeDirPath()+"/.rlprrc");
if (!f.exists()) f.setName("/etc/rlprrc");
if (f.exists() && f.open(IO_ReadOnly))
{
@@ -143,12 +143,12 @@ void KMWRlpr::initialize()
if ((p=line.find(':')) != -1)
{
host = line.left(p).stripWhiteSpace();
- QListViewItem *hitem = new QListViewItem(m_view,host);
+ QListViewItem *hitem = new TQListViewItem(m_view,host);
hitem->setPixmap(0,SmallIcon("kdeprint_computer"));
- QStringList prs = QStringList::split(' ',line.right(line.length()-p-1),false);
- for (QStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
+ QStringList prs = TQStringList::split(' ',line.right(line.length()-p-1),false);
+ for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
{
- QListViewItem *pitem = new QListViewItem(hitem,*it);
+ QListViewItem *pitem = new TQListViewItem(hitem,*it);
pitem->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
@@ -166,7 +166,7 @@ void KMWRlpr::initialize()
while (hitem) if (hitem->text(0) == "localhost") break; else hitem = hitem->nextSibling();
while (!t.eof())
{
- buffer = QString::null;
+ buffer = TQString::null;
while (!t.eof())
{
line = t.readLine().stripWhiteSpace();
@@ -186,20 +186,20 @@ void KMWRlpr::initialize()
QString name = buffer.left(p);
if (!hitem)
{
- hitem = new QListViewItem(m_view,"localhost");
+ hitem = new TQListViewItem(m_view,"localhost");
hitem->setPixmap(0,SmallIcon("kdeprint_computer"));
}
- QListViewItem *pitem = new QListViewItem(hitem,name);
+ QListViewItem *pitem = new TQListViewItem(hitem,name);
pitem->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
}
if (m_view->childCount() == 0)
- new QListViewItem(m_view,i18n("No Predefined Printers"));
+ new TQListViewItem(m_view,i18n("No Predefined Printers"));
}
-void KMWRlpr::slotPrinterSelected(QListViewItem *item)
+void KMWRlpr::slotPrinterSelected(TQListViewItem *item)
{
if (item && item->depth() == 1)
{
diff --git a/kdeprint/rlpr/kmwrlpr.h b/kdeprint/rlpr/kmwrlpr.h
index 5f66180ad..ec4c378b8 100644
--- a/kdeprint/rlpr/kmwrlpr.h
+++ b/kdeprint/rlpr/kmwrlpr.h
@@ -30,14 +30,14 @@ class KMWRlpr : public KMWizardPage
{
Q_OBJECT
public:
- KMWRlpr(QWidget *parent = 0, const char *name = 0);
+ KMWRlpr(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
protected:
void initialize();
diff --git a/kdeprint/rlpr/krlprprinterimpl.cpp b/kdeprint/rlpr/krlprprinterimpl.cpp
index 9c77518b6..1d4845bde 100644
--- a/kdeprint/rlpr/krlprprinterimpl.cpp
+++ b/kdeprint/rlpr/krlprprinterimpl.cpp
@@ -23,12 +23,12 @@
#include "kmmanager.h"
#include "kmprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
-KRlprPrinterImpl::KRlprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KRlprPrinterImpl::KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -37,7 +37,7 @@ KRlprPrinterImpl::~KRlprPrinterImpl()
{
}
-bool KRlprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// retrieve the KMPrinter object, to get host and queue name
KMPrinter *rpr = KMFactory::self()->manager()->findPrinter(printer->printerName());
@@ -54,12 +54,12 @@ bool KRlprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
return false;
}
- cmd = QString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies());
+ cmd = TQString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies());
// proxy settings
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("RLPR");
- QString host = conf->readEntry("ProxyHost",QString::null), port = conf->readEntry("ProxyPort",QString::null);
+ QString host = conf->readEntry("ProxyHost",TQString::null), port = conf->readEntry("ProxyPort",TQString::null);
if (!host.isEmpty())
{
cmd.append(" -X ").append(quote(host));
diff --git a/kdeprint/rlpr/krlprprinterimpl.h b/kdeprint/rlpr/krlprprinterimpl.h
index 14c054b1e..9ed5eeebb 100644
--- a/kdeprint/rlpr/krlprprinterimpl.h
+++ b/kdeprint/rlpr/krlprprinterimpl.h
@@ -27,10 +27,10 @@ class KProcess;
class KRlprPrinterImpl : public KPrinterImpl
{
public:
- KRlprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KRlprPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
};
#endif
diff --git a/kdeprint/tests/drawdemo.cpp b/kdeprint/tests/drawdemo.cpp
index f399d7d6d..443cc89e8 100644
--- a/kdeprint/tests/drawdemo.cpp
+++ b/kdeprint/tests/drawdemo.cpp
@@ -8,14 +8,14 @@
**
*****************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
#include <kprinter.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kapplication.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
@@ -24,27 +24,27 @@
// The coordinate system x=(0..500), y=(0..500) spans the paint device.
//
-void drawColorWheel( QPainter *p )
+void drawColorWheel( TQPainter *p )
{
- QFont f( "times", 18, QFont::Bold );
+ TQFont f( "times", 18, TQFont::Bold );
p->setFont( f );
p->setPen( Qt::black );
p->setWindow( 0, 0, 500, 500 ); // defines coordinate system
for ( int i=0; i<36; i++ ) { // draws 36 rotated rectangles
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate( 250.0F, 250.0F ); // move to center
matrix.shear( 0.0F, 0.3F ); // twist it
matrix.rotate( (float)i*10 ); // rotate 0,10,20,.. degrees
p->setWorldMatrix( matrix ); // use this world matrix
- QColor c;
+ TQColor c;
c.setHsv( i*10, 255, 255 ); // rainbow effect
p->setBrush( c ); // solid fill with color c
p->drawRect( 70, -10, 80, 10 ); // draw the rectangle
- QString n;
+ TQString n;
n.sprintf( "H=%d", i*10 );
p->drawText( 80+70+5, 0, n ); // draw the hue number
}
@@ -55,7 +55,7 @@ void drawColorWheel( QPainter *p )
// This function draws a few lines of text using different fonts.
//
-void drawFonts( QPainter *p )
+void drawFonts( TQPainter *p )
{
static const char *fonts[] = { "Helvetica", "Courier", "Times", 0 };
static int sizes[] = { 10, 12, 18, 24, 36, 0 };
@@ -64,9 +64,9 @@ void drawFonts( QPainter *p )
while ( fonts[f] ) {
int s = 0;
while ( sizes[s] ) {
- QFont font( fonts[f], sizes[s] );
+ TQFont font( fonts[f], sizes[s] );
p->setFont( font );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
y += fm.ascent();
p->drawText( 10, y, "Quartz Glyph Job Vex'd Cwm Finks" );
y += fm.descent();
@@ -81,12 +81,12 @@ void drawFonts( QPainter *p )
// This function draws some shapes
//
-void drawShapes( QPainter *p )
+void drawShapes( TQPainter *p )
{
- QBrush b1( Qt::blue );
- QBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
- QBrush b3( Qt::NoBrush ); // void brush
- QBrush b4( Qt::CrossPattern ); // black cross pattern
+ TQBrush b1( Qt::blue );
+ TQBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
+ TQBrush b3( Qt::NoBrush ); // void brush
+ TQBrush b4( Qt::CrossPattern ); // black cross pattern
p->setPen( Qt::red );
p->setBrush( b1 );
@@ -100,7 +100,7 @@ void drawShapes( QPainter *p )
}
-typedef void (*draw_func)(QPainter*);
+typedef void (*draw_func)(TQPainter*);
struct DrawThing {
draw_func f;
@@ -131,15 +131,15 @@ DrawView::DrawView()
setBackgroundColor( white );
// Create a button group to contain all buttons
- bgroup = new QButtonGroup( this );
+ bgroup = new TQButtonGroup( this );
bgroup->resize( 200, 200 );
- connect( bgroup, SIGNAL(clicked(int)), SLOT(updateIt(int)) );
+ connect( bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(updateIt(int)) );
// Calculate the size for the radio buttons
int maxwidth = 80;
int i;
const char *n;
- QFontMetrics fm = bgroup->fontMetrics();
+ TQFontMetrics fm = bgroup->fontMetrics();
for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
int w = fm.width( n );
maxwidth = QMAX(w,maxwidth);
@@ -147,7 +147,7 @@ DrawView::DrawView()
maxwidth = maxwidth + 20; // add 20 pixels
for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
- QRadioButton *rb = new QRadioButton( n, bgroup );
+ TQRadioButton *rb = new TQRadioButton( n, bgroup );
rb->setGeometry( 10, i*30+10, maxwidth, 30 );
if ( i == 0 )
rb->setChecked( true );
@@ -161,10 +161,10 @@ DrawView::DrawView()
printer = new KPrinter;
// Create and setup the print button
- print = new QPushButton( "Print...", bgroup );
+ print = new TQPushButton( "Print...", bgroup );
print->resize( 80, 30 );
print->move( maxwidth/2 - print->width()/2, maxindex*30+20 );
- connect( print, SIGNAL(clicked()), SLOT(printIt()) );
+ connect( print, TQT_SIGNAL(clicked()), TQT_SLOT(printIt()) );
bgroup->resize( maxwidth, print->y()+print->height()+10 );
@@ -197,7 +197,7 @@ void DrawView::updateIt( int index )
// Calls the drawing function as specified by the radio buttons.
//
-void DrawView::drawIt( QPainter *p )
+void DrawView::drawIt( TQPainter *p )
{
(*ourDrawFunctions[drawindex].f)(p);
}
@@ -210,7 +210,7 @@ void DrawView::printIt()
{
#ifndef QT_NO_PRINTER
if ( printer->setup( this ) ) {
- QPainter paint( printer );
+ TQPainter paint( printer );
drawIt( &paint );
}
#endif
@@ -220,9 +220,9 @@ void DrawView::printIt()
// Called when the widget needs to be updated.
//
-void DrawView::paintEvent( QPaintEvent * )
+void DrawView::paintEvent( TQPaintEvent * )
{
- QPainter paint( this );
+ TQPainter paint( this );
drawIt( &paint );
}
@@ -231,7 +231,7 @@ void DrawView::paintEvent( QPaintEvent * )
// Moves the button group to the upper right corner
// of the widget.
-void DrawView::resizeEvent( QResizeEvent * )
+void DrawView::resizeEvent( TQResizeEvent * )
{
bgroup->move( width()-bgroup->width(), 0 );
}
diff --git a/kdeprint/tests/drawdemo.h b/kdeprint/tests/drawdemo.h
index 81b201d54..5d2412477 100644
--- a/kdeprint/tests/drawdemo.h
+++ b/kdeprint/tests/drawdemo.h
@@ -16,12 +16,12 @@ public slots:
void updateIt( int );
void printIt();
protected:
- void drawIt( QPainter * );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
+ void drawIt( TQPainter * );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
private:
KPrinter *printer;
- QButtonGroup *bgroup;
+ TQButtonGroup *bgroup;
QPushButton *print;
int drawindex;
int maxindex;
diff --git a/kdeprint/tests/helpwindow.cpp b/kdeprint/tests/helpwindow.cpp
index 4fdc6d7a5..c2cdb1b22 100644
--- a/kdeprint/tests/helpwindow.cpp
+++ b/kdeprint/tests/helpwindow.cpp
@@ -10,99 +10,99 @@
#include "helpwindow.h"
#include "richpage.h"
-#include <qstatusbar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
+#include <tqstatusbar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
#include <kmenubar.h>
#include <ktoolbar.h>
#include <kstatusbar.h>
-#include <qtoolbutton.h>
-#include <qiconset.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstylesheet.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qdatastream.h>
+#include <tqtoolbutton.h>
+#include <tqiconset.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstylesheet.h>
+#include <tqmessagebox.h>
+#include <tqfiledialog.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
+#include <tqdatastream.h>
#include <kprinter.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <ctype.h>
-HelpWindow::HelpWindow( const QString& home_, const QString& _path,
- QWidget* parent, const char *name )
+HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
+ TQWidget* parent, const char *name )
: KMainWindow( parent, name, WDestructiveClose ),
pathCombo( 0 ), selectedURL()
{
readHistory();
readBookmarks();
- browser = new QTextBrowser( this );
+ browser = new TQTextBrowser( this );
browser->mimeSourceFactory()->setFilePath( _path );
- browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- connect( browser, SIGNAL( textChanged() ),
- this, SLOT( textChanged() ) );
+ browser->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ connect( browser, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( textChanged() ) );
setCentralWidget( browser );
if ( !home_.isEmpty() )
browser->setSource( home_ );
- connect( browser, SIGNAL( highlighted( const QString&) ),
- statusBar(), SLOT( message( const QString&)) );
+ connect( browser, TQT_SIGNAL( highlighted( const TQString&) ),
+ statusBar(), TQT_SLOT( message( const TQString&)) );
resize( 640,700 );
- QPopupMenu* file = new QPopupMenu( this );
- file->insertItem( "&New Window", this, SLOT( newWindow() ), ALT | Key_N );
- file->insertItem( "&Open File", this, SLOT( openFile() ), ALT | Key_O );
- file->insertItem( "&Print", this, SLOT( print() ), ALT | Key_P );
+ TQPopupMenu* file = new TQPopupMenu( this );
+ file->insertItem( "&New Window", this, TQT_SLOT( newWindow() ), ALT | Key_N );
+ file->insertItem( "&Open File", this, TQT_SLOT( openFile() ), ALT | Key_O );
+ file->insertItem( "&Print", this, TQT_SLOT( print() ), ALT | Key_P );
file->insertSeparator();
- file->insertItem( "&Close", this, SLOT( close() ), ALT | Key_Q );
- file->insertItem( "E&xit", qApp, SLOT( closeAllWindows() ), ALT | Key_X );
+ file->insertItem( "&Close", this, TQT_SLOT( close() ), ALT | Key_Q );
+ file->insertItem( "E&xit", qApp, TQT_SLOT( closeAllWindows() ), ALT | Key_X );
// The same three icons are used twice each.
- QIconSet icon_back( QPixmap("back.xpm") );
- QIconSet icon_forward( QPixmap("forward.xpm") );
- QIconSet icon_home( QPixmap("home.xpm") );
+ TQIconSet icon_back( TQPixmap("back.xpm") );
+ TQIconSet icon_forward( TQPixmap("forward.xpm") );
+ TQIconSet icon_home( TQPixmap("home.xpm") );
- QPopupMenu* go = new QPopupMenu( this );
+ TQPopupMenu* go = new TQPopupMenu( this );
backwardId = go->insertItem( icon_back,
- "&Backward", browser, SLOT( backward() ),
+ "&Backward", browser, TQT_SLOT( backward() ),
ALT | Key_Left );
forwardId = go->insertItem( icon_forward,
- "&Forward", browser, SLOT( forward() ),
+ "&Forward", browser, TQT_SLOT( forward() ),
ALT | Key_Right );
- go->insertItem( icon_home, "&Home", browser, SLOT( home() ) );
+ go->insertItem( icon_home, "&Home", browser, TQT_SLOT( home() ) );
- QPopupMenu* help = new QPopupMenu( this );
- help->insertItem( "&About ...", this, SLOT( about() ) );
- help->insertItem( "About &Qt ...", this, SLOT( aboutQt() ) );
+ TQPopupMenu* help = new TQPopupMenu( this );
+ help->insertItem( "&About ...", this, TQT_SLOT( about() ) );
+ help->insertItem( "About &Qt ...", this, TQT_SLOT( aboutQt() ) );
- hist = new QPopupMenu( this );
- QStringList::Iterator it = history.begin();
+ hist = new TQPopupMenu( this );
+ TQStringList::Iterator it = history.begin();
for ( ; it != history.end(); ++it )
mHistory[ hist->insertItem( *it ) ] = *it;
- connect( hist, SIGNAL( activated( int ) ),
- this, SLOT( histChosen( int ) ) );
+ connect( hist, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( histChosen( int ) ) );
- bookm = new QPopupMenu( this );
- bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
+ bookm = new TQPopupMenu( this );
+ bookm->insertItem( tr( "Add Bookmark" ), this, TQT_SLOT( addBookmark() ) );
bookm->insertSeparator();
- QStringList::Iterator it2 = bookmarks.begin();
+ TQStringList::Iterator it2 = bookmarks.begin();
for ( ; it2 != bookmarks.end(); ++it2 )
mBookmarks[ bookm->insertItem( *it2 ) ] = *it2;
- connect( bookm, SIGNAL( activated( int ) ),
- this, SLOT( bookmChosen( int ) ) );
+ connect( bookm, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( bookmChosen( int ) ) );
menuBar()->insertItem( tr("&File"), file );
menuBar()->insertItem( tr("&Go"), go );
@@ -113,29 +113,29 @@ HelpWindow::HelpWindow( const QString& home_, const QString& _path,
menuBar()->setItemEnabled( forwardId, false);
menuBar()->setItemEnabled( backwardId, false);
- connect( browser, SIGNAL( backwardAvailable( bool ) ),
- this, SLOT( setBackwardAvailable( bool ) ) );
- connect( browser, SIGNAL( forwardAvailable( bool ) ),
- this, SLOT( setForwardAvailable( bool ) ) );
+ connect( browser, TQT_SIGNAL( backwardAvailable( bool ) ),
+ this, TQT_SLOT( setBackwardAvailable( bool ) ) );
+ connect( browser, TQT_SIGNAL( forwardAvailable( bool ) ),
+ this, TQT_SLOT( setForwardAvailable( bool ) ) );
- QToolBar* toolbar = new QToolBar( this );
+ TQToolBar* toolbar = new TQToolBar( this );
addToolBar( toolbar, "Toolbar");
- QToolButton* button;
+ TQToolButton* button;
- button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar );
- connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
+ button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQT_SLOT(backward()), toolbar );
+ connect( browser, TQT_SIGNAL( backwardAvailable(bool) ), button, TQT_SLOT( setEnabled(bool) ) );
button->setEnabled( false );
- button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar );
- connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
+ button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQT_SLOT(forward()), toolbar );
+ connect( browser, TQT_SIGNAL( forwardAvailable(bool) ), button, TQT_SLOT( setEnabled(bool) ) );
button->setEnabled( false );
- button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar );
+ button = new TQToolButton( icon_home, tr("Home"), "", browser, TQT_SLOT(home()), toolbar );
toolbar->addSeparator();
- pathCombo = new QComboBox( true, toolbar );
- connect( pathCombo, SIGNAL( activated( const QString & ) ),
- this, SLOT( pathSelected( const QString & ) ) );
+ pathCombo = new TQComboBox( true, toolbar );
+ connect( pathCombo, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( pathSelected( const TQString & ) ) );
toolbar->setStretchableWidget( pathCombo );
setRightJustification( true );
setDockEnabled( DockLeft, false );
@@ -181,38 +181,38 @@ void HelpWindow::textChanged()
mHistory[ hist->insertItem( selectedURL ) ] = selectedURL;
} else
pathCombo->setCurrentItem( i );
- selectedURL = QString::null;
+ selectedURL = TQString::null;
}
}
HelpWindow::~HelpWindow()
{
history.clear();
- QMap<int, QString>::Iterator it = mHistory.begin();
+ TQMap<int, TQString>::Iterator it = mHistory.begin();
for ( ; it != mHistory.end(); ++it )
history.append( *it );
- QFile f( QDir::currentDirPath() + "/.history" );
+ TQFile f( TQDir::currentDirPath() + "/.history" );
f.open( IO_WriteOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s << history;
f.close();
bookmarks.clear();
- QMap<int, QString>::Iterator it2 = mBookmarks.begin();
+ TQMap<int, TQString>::Iterator it2 = mBookmarks.begin();
for ( ; it2 != mBookmarks.end(); ++it2 )
bookmarks.append( *it2 );
- QFile f2( QDir::currentDirPath() + "/.bookmarks" );
+ TQFile f2( TQDir::currentDirPath() + "/.bookmarks" );
f2.open( IO_WriteOnly );
- QDataStream s2( &f2 );
+ TQDataStream s2( &f2 );
s2 << bookmarks;
f2.close();
}
void HelpWindow::about()
{
- QMessageBox::about( this, "HelpViewer Example",
+ TQMessageBox::about( this, "HelpViewer Example",
"<p>This example implements a simple HTML help viewer "
"using Qt's rich text capabilities</p>"
"<p>It's just about 100 lines of C++ code, so don't expect too much :-)</p>"
@@ -222,13 +222,13 @@ void HelpWindow::about()
void HelpWindow::aboutQt()
{
- QMessageBox::aboutQt( this, "QBrowser" );
+ TQMessageBox::aboutQt( this, "QBrowser" );
}
void HelpWindow::openFile()
{
#ifndef QT_NO_FILEDIALOG
- QString fn = QFileDialog::getOpenFileName( QString::null, QString::null, this );
+ TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
if ( !fn.isEmpty() )
browser->setSource( fn );
#endif
@@ -245,7 +245,7 @@ void HelpWindow::print()
#ifdef KDE_PRINT
KPrinter printer;
#else
- QPrinter printer;
+ TQPrinter printer;
#endif
printer.setFullPage(true);
printer.setDocName("Help Viewer");
@@ -255,8 +255,8 @@ void HelpWindow::print()
printer.addStandardPage(KPrinter::FilesPage);
#endif
if ( printer.setup(this) ) {
- QPainter p( &printer );
- QPaintDeviceMetrics metrics(p.device());
+ TQPainter p( &printer );
+ TQPaintDeviceMetrics metrics(p.device());
int dpix = metrics.logicalDpiX();
int dpiy = metrics.logicalDpiY();
#ifdef KDE_PRINT
@@ -264,26 +264,26 @@ void HelpWindow::print()
#else
const int margin = 72; // pt
#endif
- QRect body(margin*dpix/72, margin*dpiy/72,
+ TQRect body(margin*dpix/72, margin*dpiy/72,
metrics.width()-margin*dpix/72*2,
metrics.height()-margin*dpiy/72*2 );
#ifdef KDE_PRINT
- QFont font(printer.option("app-rich-fontname"), printer.option("app-rich-fontsize").toInt());
+ TQFont font(printer.option("app-rich-fontname"), printer.option("app-rich-fontsize").toInt());
#else
- QFont font("times",10);
+ TQFont font("times",10);
#endif
- QSimpleRichText richText( browser->text(), font, browser->context(), browser->styleSheet(),
+ TQSimpleRichText richText( browser->text(), font, browser->context(), browser->styleSheet(),
browser->mimeSourceFactory(), body.height() );
richText.setWidth( &p, body.width() );
- QRect view( body );
+ TQRect view( body );
int page = 1;
do {
richText.draw( &p, body.left(), body.top(), view, colorGroup() );
view.moveBy( 0, body.height() );
p.translate( 0 , -body.height() );
p.setFont( font );
- p.drawText( view.right() - p.fontMetrics().width( QString::number(page) ),
- view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page) );
+ p.drawText( view.right() - p.fontMetrics().width( TQString::number(page) ),
+ view.bottom() + p.fontMetrics().ascent() + 5, TQString::number(page) );
if ( view.top() >= richText.height() )
break;
printer.newPage();
@@ -292,10 +292,10 @@ void HelpWindow::print()
}
}
-void HelpWindow::pathSelected( const QString &_path )
+void HelpWindow::pathSelected( const TQString &_path )
{
browser->setSource( _path );
- QMap<int, QString>::Iterator it = mHistory.begin();
+ TQMap<int, TQString>::Iterator it = mHistory.begin();
bool exists = false;
for ( ; it != mHistory.end(); ++it ) {
if ( *it == _path ) {
@@ -309,10 +309,10 @@ void HelpWindow::pathSelected( const QString &_path )
void HelpWindow::readHistory()
{
- if ( QFile::exists( QDir::currentDirPath() + "/.history" ) ) {
- QFile f( QDir::currentDirPath() + "/.history" );
+ if ( TQFile::exists( TQDir::currentDirPath() + "/.history" ) ) {
+ TQFile f( TQDir::currentDirPath() + "/.history" );
f.open( IO_ReadOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s >> history;
f.close();
while ( history.count() > 20 )
@@ -322,10 +322,10 @@ void HelpWindow::readHistory()
void HelpWindow::readBookmarks()
{
- if ( QFile::exists( QDir::currentDirPath() + "/.bookmarks" ) ) {
- QFile f( QDir::currentDirPath() + "/.bookmarks" );
+ if ( TQFile::exists( TQDir::currentDirPath() + "/.bookmarks" ) ) {
+ TQFile f( TQDir::currentDirPath() + "/.bookmarks" );
f.open( IO_ReadOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s >> bookmarks;
f.close();
}
diff --git a/kdeprint/tests/helpwindow.h b/kdeprint/tests/helpwindow.h
index 1de9e5e2b..93704046a 100644
--- a/kdeprint/tests/helpwindow.h
+++ b/kdeprint/tests/helpwindow.h
@@ -12,10 +12,10 @@
#define HELPWINDOW_H
#include <kmainwindow.h>
-#include <qtextbrowser.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qdir.h>
+#include <tqtextbrowser.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqdir.h>
class QComboBox;
class QPopupMenu;
@@ -24,7 +24,7 @@ class HelpWindow : public KMainWindow
{
Q_OBJECT
public:
- HelpWindow( const QString& home_, const QString& path, QWidget* parent = 0, const char *name=0 );
+ HelpWindow( const TQString& home_, const TQString& path, TQWidget* parent = 0, const char *name=0 );
~HelpWindow();
private slots:
@@ -38,7 +38,7 @@ private slots:
void newWindow();
void print();
- void pathSelected( const QString & );
+ void pathSelected( const TQString & );
void histChosen( int );
void bookmChosen( int );
void addBookmark();
@@ -47,13 +47,13 @@ private:
void readHistory();
void readBookmarks();
- QTextBrowser* browser;
- QComboBox *pathCombo;
+ TQTextBrowser* browser;
+ TQComboBox *pathCombo;
int backwardId, forwardId;
- QString selectedURL;
- QStringList history, bookmarks;
- QMap<int, QString> mHistory, mBookmarks;
- QPopupMenu *hist, *bookm;
+ TQString selectedURL;
+ TQStringList history, bookmarks;
+ TQMap<int, TQString> mHistory, mBookmarks;
+ TQPopupMenu *hist, *bookm;
};
diff --git a/kdeprint/tests/main.cpp b/kdeprint/tests/main.cpp
index 4db031532..a1dc6b5e0 100644
--- a/kdeprint/tests/main.cpp
+++ b/kdeprint/tests/main.cpp
@@ -10,8 +10,8 @@
#include "helpwindow.h"
#include <kapplication.h>
-#include <qwindowsstyle.h>
-#include <qstylesheet.h>
+#include <tqwindowsstyle.h>
+#include <tqstylesheet.h>
#include <stdlib.h>
@@ -19,23 +19,23 @@ int main( int argc, char ** argv )
{
KApplication a(argc, argv, "helpviewer");
- QString home;
+ TQString home;
if (argc > 1)
home = argv[1];
else
- home = QString(getenv("QTDIR")) + "/doc/html/index.html";
+ home = TQString(getenv("QTDIR")) + "/doc/html/index.html";
HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
- if ( QApplication::desktop()->width() > 400
- && QApplication::desktop()->height() > 500 )
+ if ( TQApplication::desktop()->width() > 400
+ && TQApplication::desktop()->height() > 500 )
help->show();
else
help->showMaximized();
- QObject::connect( &a, SIGNAL(lastWindowClosed()),
- &a, SLOT(quit()) );
+ TQObject::connect( &a, TQT_SIGNAL(lastWindowClosed()),
+ &a, TQT_SLOT(quit()) );
return a.exec();
}
diff --git a/kdeprint/tests/richpage.cpp b/kdeprint/tests/richpage.cpp
index 9b175894b..f12040b71 100644
--- a/kdeprint/tests/richpage.cpp
+++ b/kdeprint/tests/richpage.cpp
@@ -1,38 +1,38 @@
#include "richpage.h"
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qfontdatabase.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqfontdatabase.h>
+#include <tqlayout.h>
-RichPage::RichPage(QWidget *parent, const char *name)
+RichPage::RichPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
m_title = "Rich Text Options";
- margin_ = new QSpinBox(this);
+ margin_ = new TQSpinBox(this);
margin_->setRange(1,999);
margin_->setValue(72);
- fontsize_ = new QSpinBox(this);
+ fontsize_ = new TQSpinBox(this);
fontsize_->setRange(4,100);
fontsize_->setValue(10);
- fontname_ = new QComboBox(this);
+ fontname_ = new TQComboBox(this);
QFontDatabase db;
QStringList fonts = db.families();
fontname_->insertStringList(fonts);
- fontname_->setCurrentItem(fonts.findIndex(QString::fromLatin1("times")));
+ fontname_->setCurrentItem(fonts.findIndex(TQString::fromLatin1("times")));
if (fontname_->currentItem() < 0) fontname_->setCurrentItem(0);
- QLabel *l1 = new QLabel("Margin:",this);
- QLabel *l2 = new QLabel("Font name:",this);
- QLabel *l3 = new QLabel("Font size:",this);
+ QLabel *l1 = new TQLabel("Margin:",this);
+ QLabel *l2 = new TQLabel("Font name:",this);
+ QLabel *l3 = new TQLabel("Font size:",this);
- QHBoxLayout *s1 = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *s2 = new QHBoxLayout(0, 0, 10);
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 10);
+ QHBoxLayout *s1 = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *s2 = new TQHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10);
main_->addLayout(s1,0);
main_->addSpacing(20);
@@ -55,7 +55,7 @@ RichPage::~RichPage()
{
}
-void RichPage::setOptions(const QMap<QString,QString>& opts)
+void RichPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
@@ -77,7 +77,7 @@ void RichPage::setOptions(const QMap<QString,QString>& opts)
fontsize_->setValue(value.toInt());
}
-void RichPage::getOptions(QMap<QString,QString>& opts, bool)
+void RichPage::getOptions(TQMap<TQString,TQString>& opts, bool)
{
opts["app-rich-margin"] = margin_->text();
opts["app-rich-fontname"] = fontname_->currentText();
diff --git a/kdeprint/tests/richpage.h b/kdeprint/tests/richpage.h
index 579e52bf2..e41f64e0d 100644
--- a/kdeprint/tests/richpage.h
+++ b/kdeprint/tests/richpage.h
@@ -9,11 +9,11 @@ class QComboBox;
class RichPage : public KPrintDialogPage
{
public:
- RichPage(QWidget *parent = 0, const char *name = 0);
+ RichPage(TQWidget *parent = 0, const char *name = 0);
~RichPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
private:
QSpinBox *margin_;
diff --git a/kdeprint/tools/escputil/escpwidget.cpp b/kdeprint/tools/escputil/escpwidget.cpp
index 103ad111b..ef0e2390b 100644
--- a/kdeprint/tools/escputil/escpwidget.cpp
+++ b/kdeprint/tools/escputil/escpwidget.cpp
@@ -19,11 +19,11 @@
#include "escpwidget.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qaccel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqaccel.h>
#include <kdemacros.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -37,12 +37,12 @@
class EscpFactory : public KLibFactory
{
public:
- EscpFactory(QObject *parent = 0, const char *name = 0) : KLibFactory(parent, name) {}
+ EscpFactory(TQObject *parent = 0, const char *name = 0) : KLibFactory(parent, name) {}
protected:
- QObject* createObject(QObject *parent = 0, const char *name = 0, const char * className = "QObject", const QStringList& args = QStringList())
+ TQObject* createObject(TQObject *parent = 0, const char *name = 0, const char * className = "TQObject", const TQStringList& args = TQStringList())
{
Q_UNUSED(className);
- KDialogBase *dlg = new KDialogBase(static_cast<QWidget*>(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close);
+ KDialogBase *dlg = new KDialogBase(static_cast<TQWidget*>(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close);
EscpWidget *w = new EscpWidget(dlg);
if (args.count() > 0)
w->setDevice(args[0]);
@@ -62,49 +62,49 @@ extern "C"
}
}
-EscpWidget::EscpWidget(QWidget *parent, const char *name)
-: QWidget(parent, name)
+EscpWidget::EscpWidget(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_hasoutput = false;
- connect(&m_proc, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
- connect(&m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
- QPushButton *cleanbtn = new QPushButton(this, "-c");
+ QPushButton *cleanbtn = new TQPushButton(this, "-c");
cleanbtn->setPixmap(DesktopIcon("exec"));
- QPushButton *nozzlebtn = new QPushButton(this, "-n");
+ QPushButton *nozzlebtn = new TQPushButton(this, "-n");
nozzlebtn->setPixmap(DesktopIcon("exec"));
- QPushButton *alignbtn = new QPushButton(this, "-a");
+ QPushButton *alignbtn = new TQPushButton(this, "-a");
alignbtn->setPixmap(DesktopIcon("exec"));
- QPushButton *inkbtn = new QPushButton(this, "-i");
+ QPushButton *inkbtn = new TQPushButton(this, "-i");
inkbtn->setPixmap(DesktopIcon("kdeprint_inklevel"));
- QPushButton *identbtn = new QPushButton(this, "-d");
+ QPushButton *identbtn = new TQPushButton(this, "-d");
identbtn->setPixmap(DesktopIcon("exec"));
QFont f(font());
f.setBold(true);
- m_printer = new QLabel(this);
+ m_printer = new TQLabel(this);
m_printer->setFont(f);
- m_device = new QLabel(this);
+ m_device = new TQLabel(this);
m_device->setFont(f);
- m_useraw = new QCheckBox(i18n("&Use direct connection (might need root permissions)"), this);
+ m_useraw = new TQCheckBox(i18n("&Use direct connection (might need root permissions)"), this);
- connect(cleanbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(nozzlebtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(alignbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(inkbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(identbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
+ connect(cleanbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(nozzlebtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(alignbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(inkbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(identbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
- QLabel *printerlab = new QLabel(i18n("Printer:"), this);
+ QLabel *printerlab = new TQLabel(i18n("Printer:"), this);
printerlab->setAlignment(AlignRight|AlignVCenter);
- QLabel *devicelab = new QLabel(i18n("Device:"), this);
+ QLabel *devicelab = new TQLabel(i18n("Device:"), this);
devicelab->setAlignment(AlignRight|AlignVCenter);
- QLabel *cleanlab = new QLabel(i18n("Clea&n print head"), this);
- QLabel *nozzlelab = new QLabel(i18n("&Print a nozzle test pattern"), this);
- QLabel *alignlab = new QLabel(i18n("&Align print head"), this);
- QLabel *inklab = new QLabel(i18n("&Ink level"), this);
- QLabel *identlab = new QLabel(i18n("P&rinter identification"), this);
+ QLabel *cleanlab = new TQLabel(i18n("Clea&n print head"), this);
+ QLabel *nozzlelab = new TQLabel(i18n("&Print a nozzle test pattern"), this);
+ QLabel *alignlab = new TQLabel(i18n("&Align print head"), this);
+ QLabel *inklab = new TQLabel(i18n("&Ink level"), this);
+ QLabel *identlab = new TQLabel(i18n("P&rinter identification"), this);
cleanlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
nozzlelab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
@@ -112,17 +112,17 @@ EscpWidget::EscpWidget(QWidget *parent, const char *name)
inklab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
identlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
- cleanbtn->setAccel(QAccel::shortcutKey(cleanlab->text()));
- nozzlebtn->setAccel(QAccel::shortcutKey(nozzlelab->text()));
- alignbtn->setAccel(QAccel::shortcutKey(alignlab->text()));
- inkbtn->setAccel(QAccel::shortcutKey(inklab->text()));
- identbtn->setAccel(QAccel::shortcutKey(identlab->text()));
+ cleanbtn->setAccel(TQAccel::shortcutKey(cleanlab->text()));
+ nozzlebtn->setAccel(TQAccel::shortcutKey(nozzlelab->text()));
+ alignbtn->setAccel(TQAccel::shortcutKey(alignlab->text()));
+ inkbtn->setAccel(TQAccel::shortcutKey(inklab->text()));
+ identbtn->setAccel(TQAccel::shortcutKey(identlab->text()));
KSeparator *sep = new KSeparator(this);
sep->setFixedHeight(10);
- QGridLayout *l0 = new QGridLayout(this, 8, 2, 10, 10);
- QGridLayout *l1 = new QGridLayout(0, 2, 2, 0, 5);
+ QGridLayout *l0 = new TQGridLayout(this, 8, 2, 10, 10);
+ QGridLayout *l1 = new TQGridLayout(0, 2, 2, 0, 5);
l0->addMultiCellLayout(l1, 0, 0, 0, 1);
l1->addWidget(printerlab, 0, 0);
l1->addWidget(devicelab, 1, 0);
@@ -144,7 +144,7 @@ EscpWidget::EscpWidget(QWidget *parent, const char *name)
l0->setColStretch(1, 1);
}
-void EscpWidget::startCommand(const QString& arg)
+void EscpWidget::startCommand(const TQString& arg)
{
bool useUSB(false);
@@ -192,9 +192,9 @@ void EscpWidget::startCommand(const QString& arg)
m_proc << "-u";
m_proc << arg << "-q";
- m_errorbuffer = m_outbuffer = QString::null;
+ m_errorbuffer = m_outbuffer = TQString::null;
m_hasoutput = ( arg == "-i" || arg == "-d" );
- for ( QValueList<QCString>::ConstIterator it=m_proc.args().begin(); it!=m_proc.args().end(); ++it )
+ for ( TQValueList<TQCString>::ConstIterator it=m_proc.args().begin(); it!=m_proc.args().end(); ++it )
kdDebug() << "ARG: " << *it << endl;
if (m_proc.start(KProcess::NotifyOnExit, KProcess::AllOutput))
setEnabled(false);
@@ -231,13 +231,13 @@ void EscpWidget::slotProcessExited(KProcess*)
void EscpWidget::slotReceivedStdout(KProcess*, char *buf, int len)
{
- QString bufstr = QCString(buf, len);
+ QString bufstr = TQCString(buf, len);
m_outbuffer.append(bufstr);
}
void EscpWidget::slotReceivedStderr(KProcess*, char *buf, int len)
{
- QString bufstr = QCString(buf, len);
+ QString bufstr = TQCString(buf, len);
m_errorbuffer.append(bufstr);
}
@@ -247,12 +247,12 @@ void EscpWidget::slotButtonClicked()
startCommand(arg);
}
-void EscpWidget::setPrinterName(const QString& p)
+void EscpWidget::setPrinterName(const TQString& p)
{
m_printer->setText(p);
}
-void EscpWidget::setDevice(const QString& dev)
+void EscpWidget::setDevice(const TQString& dev)
{
m_deviceURL = dev;
m_device->setText(dev);
diff --git a/kdeprint/tools/escputil/escpwidget.h b/kdeprint/tools/escputil/escpwidget.h
index 6de9f2c00..ce895f260 100644
--- a/kdeprint/tools/escputil/escpwidget.h
+++ b/kdeprint/tools/escputil/escpwidget.h
@@ -20,7 +20,7 @@
#ifndef ESCPWIDGET_H
#define ESCPWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprocess.h>
#include <kurl.h>
@@ -32,9 +32,9 @@ class EscpWidget : public QWidget
Q_OBJECT
public:
- EscpWidget(QWidget *parent = 0, const char *name = 0);
- void setDevice(const QString&);
- void setPrinterName(const QString&);
+ EscpWidget(TQWidget *parent = 0, const char *name = 0);
+ void setDevice(const TQString&);
+ void setPrinterName(const TQString&);
protected slots:
void slotReceivedStdout(KProcess*, char*, int);
@@ -43,7 +43,7 @@ protected slots:
void slotButtonClicked();
protected:
- void startCommand(const QString& arg);
+ void startCommand(const TQString& arg);
private:
KProcess m_proc;
diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp
index e131d8c3c..1e4f1b694 100644
--- a/kdeprint/treecombobox.cpp
+++ b/kdeprint/treecombobox.cpp
@@ -19,15 +19,15 @@
#include "treecombobox.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString& txt, bool oneBlock)
- : QListBoxPixmap(pix, txt)
+TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock)
+ : TQListBoxPixmap(pix, txt)
{
if (oneBlock)
- m_path = QStringList(txt);
+ m_path = TQStringList(txt);
else
- m_path = QStringList::split('/', text(), false);
+ m_path = TQStringList::split('/', text(), false);
m_depth = m_path.count()-1;
m_child = m_next = m_parent = 0;
@@ -48,7 +48,7 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString
if (!parentItem)
{
// parent not found, add parent first into QListBox
- parentItem = new TreeListBoxItem(lb, QPixmap(), parentStr);
+ parentItem = new TreeListBoxItem(lb, TQPixmap(), parentStr);
}
// search last "child" of the parent item, to put the new one
// at the end
@@ -75,21 +75,21 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString
}
}
-int TreeListBoxItem::width(const QListBox *lb) const
+int TreeListBoxItem::width(const TQListBox *lb) const
{
int w = m_depth * stepSize() + 2;
if (pixmap())
w += (pixmap()->width() + 2);
if (!m_path[m_depth].isEmpty())
w += (lb->fontMetrics().width(m_path[m_depth]) + 2);
- return QMAX(w, QListBoxPixmap::width(lb));
+ return QMAX(w, TQListBoxPixmap::width(lb));
}
-void TreeListBoxItem::paint(QPainter *p)
+void TreeListBoxItem::paint(TQPainter *p)
{
if(!static_cast<TreeListBox*>(listBox())->m_painting)
{
- QListBoxPixmap::paint(p);
+ TQListBoxPixmap::paint(p);
return;
}
@@ -128,29 +128,29 @@ void TreeListBoxItem::paint(QPainter *p)
//-----------------------------------------------------------------------------------------
-TreeListBox::TreeListBox(QWidget *parent, const char *name)
- : QListBox(parent, name)
+TreeListBox::TreeListBox(TQWidget *parent, const char *name)
+ : TQListBox(parent, name)
{
m_painting = false;
}
-void TreeListBox::paintCell(QPainter *p, int row, int col)
+void TreeListBox::paintCell(TQPainter *p, int row, int col)
{
m_painting = true;
- QListBox::paintCell(p, row, col);
+ TQListBox::paintCell(p, row, col);
m_painting = false;
}
//-----------------------------------------------------------------------------------------
-TreeComboBox::TreeComboBox(QWidget *parent, const char *name)
- : QComboBox(parent, name)
+TreeComboBox::TreeComboBox(TQWidget *parent, const char *name)
+ : TQComboBox(parent, name)
{
m_listbox = new TreeListBox(this);
setListBox(m_listbox);
}
-void TreeComboBox::insertItem(const QPixmap& pix, const QString& txt, bool oneBlock)
+void TreeComboBox::insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock)
{
new TreeListBoxItem(m_listbox, pix, txt, oneBlock);
}
diff --git a/kdeprint/treecombobox.h b/kdeprint/treecombobox.h
index 78833aee7..398633752 100644
--- a/kdeprint/treecombobox.h
+++ b/kdeprint/treecombobox.h
@@ -20,9 +20,9 @@
#ifndef TREECOMBOBOX_H
#define TREECOMBOBOX_H
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qstringlist.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqstringlist.h>
/**
* Class that represents a single object in the tree
@@ -30,12 +30,12 @@
class TreeListBoxItem : public QListBoxPixmap
{
public:
- TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString& txt, bool oneBlock = false);
+ TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock = false);
- virtual int width(const QListBox *lb) const;
+ virtual int width(const TQListBox *lb) const;
protected:
- virtual void paint(QPainter *p);
+ virtual void paint(TQPainter *p);
int stepSize() const { return 16; }
private:
@@ -51,10 +51,10 @@ class TreeListBox : public QListBox
{
friend class TreeListBoxItem;
public:
- TreeListBox(QWidget *parent = 0, const char *name = 0);
+ TreeListBox(TQWidget *parent = 0, const char *name = 0);
protected:
- virtual void paintCell(QPainter *p, int row, int col);
+ virtual void paintCell(TQPainter *p, int row, int col);
private:
bool m_painting;
@@ -66,8 +66,8 @@ private:
class TreeComboBox : public QComboBox
{
public:
- TreeComboBox(QWidget *parent = 0, const char *name = 0);
- void insertItem(const QPixmap& pix, const QString& txt, bool oneBlock = false);
+ TreeComboBox(TQWidget *parent = 0, const char *name = 0);
+ void insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock = false);
private:
QListBox *m_listbox;
diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp
index 7e8be8cf8..d95ca2c0c 100644
--- a/kdeprint/util.cpp
+++ b/kdeprint/util.cpp
@@ -18,14 +18,14 @@
**/
#include "util.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer)
+void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer)
{
if (url.protocol() != "smb")
return;
QString h = url.host();
- QStringList l = QStringList::split('/', url.path(), false);
+ QStringList l = TQStringList::split('/', url.path(), false);
if (l.count() > 1)
{
work = h;
@@ -34,13 +34,13 @@ void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer)
}
else
{
- work = QString::null;
+ work = TQString::null;
server = h;
printer = l[0];
}
}
-KURL smbToUrl(const QString& s)
+KURL smbToUrl(const TQString& s)
{
// allow to handle non-encoded chars in login/password
KURL url;
@@ -76,9 +76,9 @@ int findIndex(int ID)
return 4;
}
-QString buildSmbURI( const QString& work, const QString& server, const QString& printer, const QString& user, const QString& passwd )
+TQString buildSmbURI( const TQString& work, const TQString& server, const TQString& printer, const TQString& user, const TQString& passwd )
{
- QString uri = server + "/" + printer;
+ TQString uri = server + "/" + printer;
if ( !work.isEmpty() )
uri.prepend( work + "/" );
if ( !user.isEmpty() )
@@ -92,7 +92,7 @@ QString buildSmbURI( const QString& work, const QString& server, const QString&
return uri;
}
-bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& printer, QString& user, QString& passwd )
+bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQString& printer, TQString& user, TQString& passwd )
{
int p( 0 );
if ( !uri.startsWith( "smb://" ) )
@@ -118,7 +118,7 @@ bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& p
}
else
p2 = p-1;
- QStringList l = QStringList::split( '/', uri.mid( p2+1 ), false );
+ TQStringList l = TQStringList::split( '/', uri.mid( p2+1 ), false );
switch ( l.count() )
{
case 3:
diff --git a/kdeprint/util.h b/kdeprint/util.h
index b7ccdcbd5..d51f248cf 100644
--- a/kdeprint/util.h
+++ b/kdeprint/util.h
@@ -21,19 +21,19 @@
#define UTIL_H
#include "kprinter.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
#include <klocale.h>
-KURL smbToUrl(const QString& work, const QString& server, const QString& printer);
-void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer);
+KURL smbToUrl(const TQString& work, const TQString& server, const TQString& printer);
+void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer);
// those 2 are only workarounds when the login/password may contain
// strange characters ('@', '/'). In this case, those chars are not encoded
// as other SMB tools (smbspool) doesn't seem to support encoding. This
// utilities allow to continue working KURL class (and encoding) within
// KDEPrint, but without encoding outside KDEPrint (shoudl fix bug #38733)
-KDEPRINT_EXPORT QString buildSmbURI( const QString& work, const QString& server, const QString& printer, const QString& user, const QString& passwd );
-KDEPRINT_EXPORT bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& printer, QString& user, QString& passwd );
+KDEPRINT_EXPORT TQString buildSmbURI( const TQString& work, const TQString& server, const TQString& printer, const TQString& user, const TQString& passwd );
+KDEPRINT_EXPORT bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQString& printer, TQString& user, TQString& passwd );
static const struct pagesizestruct
{
diff --git a/kdesu/client.cpp b/kdesu/client.cpp
index ae97f0af8..5261886fc 100644
--- a/kdesu/client.cpp
+++ b/kdesu/client.cpp
@@ -25,10 +25,10 @@
#include <sys/un.h>
#include <sys/stat.h>
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -39,7 +39,7 @@
class KDEsuClient::KDEsuClientPrivate {
public:
- QString daemon;
+ TQString daemon;
};
#ifndef SUN_LEN
@@ -51,7 +51,7 @@ KDEsuClient::KDEsuClient()
{
sockfd = -1;
#ifdef Q_WS_X11
- QCString display(getenv("DISPLAY"));
+ TQCString display(getenv("DISPLAY"));
if (display.isEmpty())
{
kdWarning(900) << k_lineinfo << "$DISPLAY is not set\n";
@@ -59,12 +59,12 @@ KDEsuClient::KDEsuClient()
}
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
#else
- QCString display("QWS");
+ TQCString display("QWS");
#endif
- sock = QFile::encodeName(locateLocal("socket", QString("kdesud_%1").arg(display)));
+ sock = TQFile::encodeName(locateLocal("socket", TQString("kdesud_%1").arg(display)));
d = new KDEsuClientPrivate;
connect();
}
@@ -165,9 +165,9 @@ int KDEsuClient::connect()
return 0;
}
-QCString KDEsuClient::escape(const QCString &str)
+TQCString KDEsuClient::escape(const TQCString &str)
{
- QCString copy = str;
+ TQCString copy = str;
int n = 0;
while ((n = copy.find("\\", n)) != -1)
{
@@ -185,7 +185,7 @@ QCString KDEsuClient::escape(const QCString &str)
return copy;
}
-int KDEsuClient::command(const QCString &cmd, QCString *result)
+int KDEsuClient::command(const TQCString &cmd, TQCString *result)
{
if (sockfd < 0)
return -1;
@@ -202,7 +202,7 @@ int KDEsuClient::command(const QCString &cmd, QCString *result)
}
buf[nbytes] = '\000';
- QCString reply = buf;
+ TQCString reply = buf;
if (reply.left(2) != "OK")
return -1;
@@ -213,17 +213,17 @@ int KDEsuClient::command(const QCString &cmd, QCString *result)
int KDEsuClient::setPass(const char *pass, int timeout)
{
- QCString cmd = "PASS ";
+ TQCString cmd = "PASS ";
cmd += escape(pass);
cmd += " ";
- cmd += QCString().setNum(timeout);
+ cmd += TQCString().setNum(timeout);
cmd += "\n";
return command(cmd);
}
-int KDEsuClient::exec(const QCString &prog, const QCString &user, const QCString &options, const QCStringList &env)
+int KDEsuClient::exec(const TQCString &prog, const TQCString &user, const TQCString &options, const QCStringList &env)
{
- QCString cmd;
+ TQCString cmd;
cmd = "EXEC ";
cmd += escape(prog);
cmd += " ";
@@ -243,9 +243,9 @@ int KDEsuClient::exec(const QCString &prog, const QCString &user, const QCString
return command(cmd);
}
-int KDEsuClient::setHost(const QCString &host)
+int KDEsuClient::setHost(const TQCString &host)
{
- QCString cmd = "HOST ";
+ TQCString cmd = "HOST ";
cmd += escape(host);
cmd += "\n";
return command(cmd);
@@ -253,61 +253,61 @@ int KDEsuClient::setHost(const QCString &host)
int KDEsuClient::setPriority(int prio)
{
- QCString cmd;
+ TQCString cmd;
cmd.sprintf("PRIO %d\n", prio);
return command(cmd);
}
int KDEsuClient::setScheduler(int sched)
{
- QCString cmd;
+ TQCString cmd;
cmd.sprintf("SCHD %d\n", sched);
return command(cmd);
}
-int KDEsuClient::delCommand(const QCString &key, const QCString &user)
+int KDEsuClient::delCommand(const TQCString &key, const TQCString &user)
{
- QCString cmd = "DEL ";
+ TQCString cmd = "DEL ";
cmd += escape(key);
cmd += " ";
cmd += escape(user);
cmd += "\n";
return command(cmd);
}
-int KDEsuClient::setVar(const QCString &key, const QCString &value, int timeout,
- const QCString &group)
+int KDEsuClient::setVar(const TQCString &key, const TQCString &value, int timeout,
+ const TQCString &group)
{
- QCString cmd = "SET ";
+ TQCString cmd = "SET ";
cmd += escape(key);
cmd += " ";
cmd += escape(value);
cmd += " ";
cmd += escape(group);
cmd += " ";
- cmd += QCString().setNum(timeout);
+ cmd += TQCString().setNum(timeout);
cmd += "\n";
return command(cmd);
}
-QCString KDEsuClient::getVar(const QCString &key)
+TQCString KDEsuClient::getVar(const TQCString &key)
{
- QCString cmd = "GET ";
+ TQCString cmd = "GET ";
cmd += escape(key);
cmd += "\n";
- QCString reply;
+ TQCString reply;
command(cmd, &reply);
return reply;
}
-QValueList<QCString> KDEsuClient::getKeys(const QCString &group)
+TQValueList<TQCString> KDEsuClient::getKeys(const TQCString &group)
{
- QCString cmd = "GETK ";
+ TQCString cmd = "GETK ";
cmd += escape(group);
cmd += "\n";
- QCString reply;
+ TQCString reply;
command(cmd, &reply);
int index=0, pos;
- QValueList<QCString> list;
+ TQValueList<TQCString> list;
if( !reply.isEmpty() )
{
// kdDebug(900) << "Found a matching entry: " << reply << endl;
@@ -332,9 +332,9 @@ QValueList<QCString> KDEsuClient::getKeys(const QCString &group)
return list;
}
-bool KDEsuClient::findGroup(const QCString &group)
+bool KDEsuClient::findGroup(const TQCString &group)
{
- QCString cmd = "CHKG ";
+ TQCString cmd = "CHKG ";
cmd += escape(group);
cmd += "\n";
if( command(cmd) == -1 )
@@ -342,25 +342,25 @@ bool KDEsuClient::findGroup(const QCString &group)
return true;
}
-int KDEsuClient::delVar(const QCString &key)
+int KDEsuClient::delVar(const TQCString &key)
{
- QCString cmd = "DELV ";
+ TQCString cmd = "DELV ";
cmd += escape(key);
cmd += "\n";
return command(cmd);
}
-int KDEsuClient::delGroup(const QCString &group)
+int KDEsuClient::delGroup(const TQCString &group)
{
- QCString cmd = "DELG ";
+ TQCString cmd = "DELG ";
cmd += escape(group);
cmd += "\n";
return command(cmd);
}
-int KDEsuClient::delVars(const QCString &special_key)
+int KDEsuClient::delVars(const TQCString &special_key)
{
- QCString cmd = "DELS ";
+ TQCString cmd = "DELS ";
cmd += escape(special_key);
cmd += "\n";
return command(cmd);
@@ -373,7 +373,7 @@ int KDEsuClient::ping()
int KDEsuClient::exitCode()
{
- QCString result;
+ TQCString result;
if (command("EXIT\n", &result) != 0)
return -1;
@@ -385,9 +385,9 @@ int KDEsuClient::stopServer()
return command("STOP\n");
}
-static QString findDaemon()
+static TQString findDaemon()
{
- QString daemon = locate("bin", "kdesud");
+ TQString daemon = locate("bin", "kdesud");
if (daemon.isEmpty()) // if not in KDEDIRS, rely on PATH
daemon = KStandardDirs::findExe("kdesud");
@@ -406,7 +406,7 @@ bool KDEsuClient::isServerSGID()
return false;
KDE_struct_stat sbuf;
- if (KDE_stat(QFile::encodeName(d->daemon), &sbuf) < 0)
+ if (KDE_stat(TQFile::encodeName(d->daemon), &sbuf) < 0)
{
kdWarning(900) << k_lineinfo << "stat(): " << perror << "\n";
return false;
diff --git a/kdesu/client.h b/kdesu/client.h
index 00957b1ed..c1df06ff1 100644
--- a/kdesu/client.h
+++ b/kdesu/client.h
@@ -15,7 +15,7 @@
#ifndef __KDE_su_Client_h_Included__
#define __KDE_su_Client_h_Included__
-#include <qglobal.h>
+#include <tqglobal.h>
#include <kdelibs_export.h>
#ifdef Q_OS_UNIX
@@ -24,10 +24,10 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* A client class to access kdesud, the KDE su daemon. Kdesud can assist in
@@ -62,7 +62,7 @@ public:
* @param env Extra environment variables.
* @return Zero on success, -1 on failure.
*/
- int exec(const QCString &command, const QCString &user, const QCString &options=0, const QCStringList &env=QCStringList());
+ int exec(const TQCString &command, const TQCString &user, const TQCString &options=0, const QCStringList &env=QCStringList());
/**
* Wait for the last command to exit and return the exit code.
@@ -82,7 +82,7 @@ public:
/**
* Set the target host (optional).
*/
- int setHost(const QCString &host);
+ int setHost(const TQCString &host);
/**
* Set the desired priority (optional), see StubProcess.
@@ -100,7 +100,7 @@ public:
* @param user The user.
* @return zero on success, -1 on an error
*/
- int delCommand(const QCString &command, const QCString &user);
+ int delCommand(const TQCString &command, const TQCString &user);
/**
* Set a persistent variable.
@@ -111,21 +111,21 @@ public:
* @param group Make the key part of a group. See delGroup.
* @return zero on success, -1 on failure.
*/
- int setVar(const QCString &key, const QCString &value, int timeout=0, const QCString &group=0);
+ int setVar(const TQCString &key, const TQCString &value, int timeout=0, const TQCString &group=0);
/**
* Get a persistent variable.
* @param key The name of the variable.
* @return Its value.
*/
- QCString getVar(const QCString &key);
+ TQCString getVar(const TQCString &key);
/**
* Gets all the keys that are membes of the given group.
* @param group the group name of the variables.
* @return a list of the keys in the group.
*/
- QValueList<QCString> getKeys(const QCString &group);
+ TQValueList<TQCString> getKeys(const TQCString &group);
/**
* Returns true if the specified group exists is
@@ -134,19 +134,19 @@ public:
* @param group the group key
* @return true if the group is found
*/
- bool findGroup(const QCString &group);
+ bool findGroup(const TQCString &group);
/**
* Delete a persistent variable.
* @param key The name of the variable.
* @return zero on success, -1 on failure.
*/
- int delVar(const QCString &key);
+ int delVar(const TQCString &key);
/**
* Delete all persistent variables with the given key.
*
- * A specicalized variant of delVar(QCString) that removes all
+ * A specicalized variant of delVar(TQCString) that removes all
* subsets of the cached varaibles given by @p key. In order for all
* cached variables related to this key to be deleted properly, the
* value given to the @p group argument when the setVar function
@@ -158,7 +158,7 @@ public:
* @param special_key the name of the variable.
* @return zero on success, -1 on failure.
*/
- int delVars(const QCString &special_key);
+ int delVars(const TQCString &special_key);
/**
* Delete all persistent variables in a group.
@@ -166,7 +166,7 @@ public:
* @param group the group name. See setVar.
* @return
*/
- int delGroup(const QCString &group);
+ int delGroup(const TQCString &group);
/**
* Ping kdesud. This can be used for diagnostics.
@@ -193,10 +193,10 @@ private:
int connect();
int sockfd;
- QCString sock;
+ TQCString sock;
- int command(const QCString &cmd, QCString *result=0L);
- QCString escape(const QCString &str);
+ int command(const TQCString &cmd, TQCString *result=0L);
+ TQCString escape(const TQCString &str);
class KDEsuClientPrivate;
KDEsuClientPrivate *d;
diff --git a/kdesu/kcookie.cpp b/kdesu/kcookie.cpp
index 355dad82e..f60ec7314 100644
--- a/kdesu/kcookie.cpp
+++ b/kdesu/kcookie.cpp
@@ -19,10 +19,10 @@
#include <errno.h>
#include <signal.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qglobal.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqglobal.h>
+#include <tqfile.h>
#include <dcopclient.h>
@@ -39,7 +39,7 @@ KCookie::KCookie()
setDcopTransport("local");
}
-void KCookie::setDcopTransport(const QCString &dcopTransport)
+void KCookie::setDcopTransport(const TQCString &dcopTransport)
{
m_dcopTransport = dcopTransport;
m_bHaveDCOPCookies = false;
@@ -49,7 +49,7 @@ void KCookie::setDcopTransport(const QCString &dcopTransport)
m_ICEAuth = "";
}
-QCStringList KCookie::split(const QCString &line, char ch)
+QCStringList KCookie::split(const TQCString &line, char ch)
{
QCStringList result;
@@ -96,19 +96,19 @@ void KCookie::getXCookie()
return;
}
#ifdef Q_WS_X11 // No need to mess with X Auth stuff
- QCString disp = m_Display;
+ TQCString disp = m_Display;
if (!memcmp(disp.data(), "localhost:", 10))
disp.remove(0, 9);
- QString cmd = "xauth list "+KProcess::quote(disp);
+ TQString cmd = "xauth list "+KProcess::quote(disp);
blockSigChild(); // pclose uses waitpid()
- if (!(f = popen(QFile::encodeName(cmd), "r")))
+ if (!(f = popen(TQFile::encodeName(cmd), "r")))
{
kdError(900) << k_lineinfo << "popen(): " << perror << "\n";
unblockSigChild();
return;
}
- QCString output = fgets(buf, 1024, f);
+ TQCString output = fgets(buf, 1024, f);
if (pclose(f) < 0)
{
kdError(900) << k_lineinfo << "Could not run xauth.\n";
@@ -137,10 +137,10 @@ void KCookie::getICECookie()
FILE *f;
char buf[1024];
- QCString dcopsrv = getenv("DCOPSERVER");
+ TQCString dcopsrv = getenv("DCOPSERVER");
if (dcopsrv.isEmpty())
{
- QCString dcopFile = DCOPClient::dcopServerFile();
+ TQCString dcopFile = DCOPClient::dcopServerFile();
if (!(f = fopen(dcopFile, "r")))
{
kdWarning(900) << k_lineinfo << "Cannot open " << dcopFile << ".\n";
@@ -163,7 +163,7 @@ void KCookie::getICECookie()
if (strncmp((*it).data(), m_dcopTransport.data(), m_dcopTransport.length()) != 0)
continue;
m_DCOPSrv = *it;
- QCString cmd = DCOPClient::iceauthPath()+" list netid="+QFile::encodeName(KProcess::quote(m_DCOPSrv));
+ TQCString cmd = DCOPClient::iceauthPath()+" list netid="+TQFile::encodeName(KProcess::quote(m_DCOPSrv));
blockSigChild();
if (!(f = popen(cmd, "r")))
{
@@ -203,21 +203,21 @@ void KCookie::getICECookie()
m_bHaveICECookies = true;
}
-QCString KCookie::dcopServer()
+TQCString KCookie::dcopServer()
{
if (!m_bHaveDCOPCookies)
getICECookie();
return m_DCOPSrv;
}
-QCString KCookie::dcopAuth()
+TQCString KCookie::dcopAuth()
{
if (!m_bHaveDCOPCookies)
getICECookie();
return m_DCOPAuth;
}
-QCString KCookie::iceAuth()
+TQCString KCookie::iceAuth()
{
if (!m_bHaveICECookies)
getICECookie();
diff --git a/kdesu/kcookie.h b/kdesu/kcookie.h
index ed1cbf1d2..4bd9fbf1e 100644
--- a/kdesu/kcookie.h
+++ b/kdesu/kcookie.h
@@ -13,10 +13,10 @@
#ifndef __KCookie_h_Included__
#define __KCookie_h_Included__
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
@@ -32,40 +32,40 @@ public:
/**
* Returns the X11 display.
*/
- QCString display() { return m_Display; }
+ TQCString display() { return m_Display; }
#ifdef Q_WS_X11
/**
* Returns the X11 magic cookie, if available.
*/
- QCString displayAuth() { return m_DisplayAuth; }
+ TQCString displayAuth() { return m_DisplayAuth; }
#endif
/**
* Select the DCOP transport to look for. Default: "local"
*/
- void setDcopTransport(const QCString &dcopTransport);
+ void setDcopTransport(const TQCString &dcopTransport);
/**
* Returns the netid where the dcopserver is running
*/
- QCString dcopServer();
+ TQCString dcopServer();
/**
* Returns a list of magic cookies for DCOP protocol authentication.
* The order is the same as in dcopServer().
*/
- QCString dcopAuth();
+ TQCString dcopAuth();
/**
* Returns a list of magic cookies for the ICE protocol.
*/
- QCString iceAuth();
+ TQCString iceAuth();
private:
void getXCookie();
void getICECookie();
- QCStringList split(const QCString &line, char ch);
+ QCStringList split(const TQCString &line, char ch);
void blockSigChild();
void unblockSigChild();
@@ -73,14 +73,14 @@ private:
bool m_bHaveDCOPCookies;
bool m_bHaveICECookies;
- QCString m_Display;
+ TQCString m_Display;
#ifdef Q_WS_X11
- QCString m_DisplayAuth;
+ TQCString m_DisplayAuth;
#endif
- QCString m_DCOPSrv;
- QCString m_DCOPAuth;
- QCString m_ICEAuth;
- QCString m_dcopTransport;
+ TQCString m_DCOPSrv;
+ TQCString m_DCOPAuth;
+ TQCString m_ICEAuth;
+ TQCString m_dcopTransport;
class KCookiePrivate;
KCookiePrivate *d;
diff --git a/kdesu/kdesu_pty.cpp b/kdesu/kdesu_pty.cpp
index 3b0499f58..8f48f0b88 100644
--- a/kdesu/kdesu_pty.cpp
+++ b/kdesu/kdesu_pty.cpp
@@ -37,8 +37,8 @@
#include <pty.h>
#endif
-#include <qglobal.h>
-#include <qcstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -292,7 +292,7 @@ int PTY::unlockpt()
* Return the slave side name.
*/
-QCString PTY::ptsname()
+TQCString PTY::ptsname()
{
if (ptyfd < 0)
return 0;
diff --git a/kdesu/kdesu_pty.h b/kdesu/kdesu_pty.h
index c9eadceda..1a6a12c35 100644
--- a/kdesu/kdesu_pty.h
+++ b/kdesu/kdesu_pty.h
@@ -18,7 +18,7 @@
#ifndef __PTY_h_Included__
#define __PTY_h_Included__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -57,12 +57,12 @@ public:
* Get the slave name.
* @return The slave name.
*/
- QCString ptsname();
+ TQCString ptsname();
private:
int ptyfd;
- QCString ptyname, ttyname;
+ TQCString ptyname, ttyname;
class PTYPrivate;
PTYPrivate *d;
diff --git a/kdesu/process.cpp b/kdesu/process.cpp
index bb09c309f..06558ce04 100644
--- a/kdesu/process.cpp
+++ b/kdesu/process.cpp
@@ -44,9 +44,9 @@
#include <sys/select.h> // Needed on some systems.
#endif
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -76,7 +76,7 @@ bool PtyProcess::checkPid(pid_t pid)
{
KConfig* config = KGlobal::config();
config->setGroup("super-user-command");
- QString superUserCommand = config->readEntry("super-user-command", DEFAULT_SUPER_USER_COMMAND);
+ TQString superUserCommand = config->readEntry("super-user-command", DEFAULT_SUPER_USER_COMMAND);
//sudo does not accept signals from user so we except it
if (superUserCommand == "sudo") {
return true;
@@ -172,10 +172,10 @@ const QCStringList& PtyProcess::environment() const
* one time.
*/
-QCString PtyProcess::readLine(bool block)
+TQCString PtyProcess::readLine(bool block)
{
int pos;
- QCString ret;
+ TQCString ret;
if (!m_Inbuf.isEmpty())
{
@@ -244,9 +244,9 @@ QCString PtyProcess::readLine(bool block)
return ret;
}
-QCString PtyProcess::readAll(bool block)
+TQCString PtyProcess::readAll(bool block)
{
- QCString ret;
+ TQCString ret;
if (!m_Inbuf.isEmpty())
{
@@ -299,7 +299,7 @@ QCString PtyProcess::readAll(bool block)
}
-void PtyProcess::writeLine(const QCString &line, bool addnl)
+void PtyProcess::writeLine(const TQCString &line, bool addnl)
{
if (!line.isEmpty())
write(m_Fd, line, line.length());
@@ -308,9 +308,9 @@ void PtyProcess::writeLine(const QCString &line, bool addnl)
}
-void PtyProcess::unreadLine(const QCString &line, bool addnl)
+void PtyProcess::unreadLine(const TQCString &line, bool addnl)
{
- QCString tmp = line;
+ TQCString tmp = line;
if (addnl)
tmp += '\n';
if (!tmp.isEmpty())
@@ -321,7 +321,7 @@ void PtyProcess::unreadLine(const QCString &line, bool addnl)
* Fork and execute the command. This returns in the parent.
*/
-int PtyProcess::exec(const QCString &command, const QCStringList &args)
+int PtyProcess::exec(const TQCString &command, const QCStringList &args)
{
kdDebug(900) << k_lineinfo << "Running `" << command << "'\n";
@@ -370,18 +370,18 @@ int PtyProcess::exec(const QCString &command, const QCStringList &args)
// From now on, terminal output goes through the tty.
- QCString path;
+ TQCString path;
if (command.contains('/'))
path = command;
else
{
- QString file = KStandardDirs::findExe(command);
+ TQString file = KStandardDirs::findExe(command);
if (file.isEmpty())
{
kdError(900) << k_lineinfo << command << " not found\n";
_exit(1);
}
- path = QFile::encodeName(file);
+ path = TQFile::encodeName(file);
}
const char **argp = (const char **)malloc((args.count()+2)*sizeof(char *));
@@ -506,7 +506,7 @@ int PtyProcess::waitForChild()
if (ret)
{
- QCString output = readAll(false);
+ TQCString output = readAll(false);
bool lineStart = true;
while (!output.isNull())
{
diff --git a/kdesu/process.h b/kdesu/process.h
index 8a2004d92..c45132a9c 100644
--- a/kdesu/process.h
+++ b/kdesu/process.h
@@ -15,15 +15,15 @@
#include <sys/types.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
class PTY;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* Synchronous communication with tty programs.
@@ -46,7 +46,7 @@ public:
* @param command The command to execute.
* @param args The arguments to the command.
*/
- int exec(const QCString &command, const QCStringList &args);
+ int exec(const TQCString &command, const QCStringList &args);
/**
* Reads a line from the program's standard out. Depending on the @em block
@@ -54,33 +54,33 @@ public:
* @param block Block until a full line is read?
* @return The output string.
*/
- QCString readLine(bool block=true);
+ TQCString readLine(bool block=true);
/**
* Read all available output from the program's standard out.
* @param block If no output is in the buffer, should the function block
* @return The output.
*/
- QCString readAll(bool block=true);
+ TQCString readAll(bool block=true);
/**
* Writes a line of text to the program's standard in.
* @param line The text to write.
* @param addNewline Adds a '\n' to the line.
*/
- void writeLine(const QCString &line, bool addNewline=true);
+ void writeLine(const TQCString &line, bool addNewline=true);
/**
* Puts back a line of input.
* @param line The line to put back.
* @param addNewline Adds a '\n' to the line.
*/
- void unreadLine(const QCString &line, bool addNewline=true);
+ void unreadLine(const TQCString &line, bool addNewline=true);
/**
* Sets the exit string. If a line of program output matches this,
* waitForChild() will terminate the program and return.
*/
- void setExitString(const QCString &exit) { m_Exit = exit; }
+ void setExitString(const TQCString &exit) { m_Exit = exit; }
/**
* Waits for the child to exit. See also setExitString.
@@ -168,14 +168,14 @@ protected:
bool m_bErase, m_bTerminal;
int m_Pid, m_Fd;
- QCString m_Command, m_Exit;
+ TQCString m_Command, m_Exit;
private:
int init();
int SetupTTY(int fd);
PTY *m_pPTY;
- QCString m_Inbuf, m_TTY;
+ TQCString m_Inbuf, m_TTY;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdesu/ssh.cpp b/kdesu/ssh.cpp
index a325fb62e..d39634ac5 100644
--- a/kdesu/ssh.cpp
+++ b/kdesu/ssh.cpp
@@ -28,8 +28,8 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qglobal.h>
-#include <qcstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -39,7 +39,7 @@
#include "kcookie.h"
-SshProcess::SshProcess(const QCString &host, const QCString &user, const QCString &command)
+SshProcess::SshProcess(const TQCString &host, const TQCString &user, const TQCString &command)
{
m_Host = host;
m_User = user;
@@ -54,7 +54,7 @@ SshProcess::~SshProcess()
}
-void SshProcess::setStub(const QCString &stub)
+void SshProcess::setStub(const TQCString &stub)
{
m_Stub = stub;
}
@@ -146,13 +146,13 @@ int SshProcess::exec(const char *password, int check)
* 14/SEP/2000: DCOP forwarding is not used anymore.
*/
-QCString SshProcess::dcopForward()
+TQCString SshProcess::dcopForward()
{
- QCString result;
+ TQCString result;
setDcopTransport("tcp");
- QCString srv = StubProcess::dcopServer();
+ TQCString srv = StubProcess::dcopServer();
if (srv.isEmpty())
return result;
@@ -164,7 +164,7 @@ QCString SshProcess::dcopForward()
int j = srv.find(':', ++i);
if (j == -1)
return result;
- QCString host = srv.mid(i, j-i);
+ TQCString host = srv.mid(i, j-i);
bool ok;
int port = srv.mid(++j).toInt(&ok);
if (!ok)
@@ -193,7 +193,7 @@ int SshProcess::ConverseSsh(const char *password, int check)
{
unsigned i, j, colon;
- QCString line;
+ TQCString line;
int state = 0;
while (state < 2)
@@ -257,22 +257,22 @@ int SshProcess::ConverseSsh(const char *password, int check)
// Display redirection is handled by ssh natively.
-QCString SshProcess::display()
+TQCString SshProcess::display()
{
return "no";
}
-QCString SshProcess::displayAuth()
+TQCString SshProcess::displayAuth()
{
return "no";
}
// Return the remote end of the forwarded connection.
-QCString SshProcess::dcopServer()
+TQCString SshProcess::dcopServer()
{
- return QCString().sprintf("tcp/localhost:%d", m_dcopPort);
+ return TQCString().sprintf("tcp/localhost:%d", m_dcopPort);
}
void SshProcess::virtual_hook( int id, void* data )
diff --git a/kdesu/ssh.h b/kdesu/ssh.h
index 23308fd64..66ee0fccc 100644
--- a/kdesu/ssh.h
+++ b/kdesu/ssh.h
@@ -13,7 +13,7 @@
#ifndef __SSH_h_Included__
#define __SSH_h_Included__
-#include <qcstring.h>
+#include <tqcstring.h>
#include "stub.h"
@@ -26,7 +26,7 @@
class KDESU_EXPORT SshProcess: public StubProcess
{
public:
- SshProcess(const QCString &host=0, const QCString &user=0, const QCString &command=0);
+ SshProcess(const TQCString &host=0, const TQCString &user=0, const TQCString &command=0);
~SshProcess();
enum Errors { SshNotFound=1, SshNeedsPassword, SshIncorrectPassword };
@@ -34,12 +34,12 @@ public:
/**
* Sets the target host.
*/
- void setHost(const QCString &host) { m_Host = host; }
+ void setHost(const TQCString &host) { m_Host = host; }
/**
* Sets the localtion of the remote stub.
*/
- void setStub(const QCString &stub);
+ void setStub(const TQCString &stub);
/**
* Checks if the current user\@host needs a password.
@@ -61,24 +61,24 @@ public:
*/
int exec(const char *password, int check=0);
- QCString prompt() { return m_Prompt; }
- QCString error() { return m_Error; }
+ TQCString prompt() { return m_Prompt; }
+ TQCString error() { return m_Error; }
protected:
- virtual QCString display();
- virtual QCString displayAuth();
- virtual QCString dcopServer();
+ virtual TQCString display();
+ virtual TQCString displayAuth();
+ virtual TQCString dcopServer();
private:
- QCString dcopForward();
+ TQCString dcopForward();
int ConverseSsh(const char *password, int check);
int m_dcopPort;
int m_dcopSrv;
- QCString m_Prompt;
- QCString m_Host;
- QCString m_Error;
- QCString m_Stub;
+ TQCString m_Prompt;
+ TQCString m_Host;
+ TQCString m_Error;
+ TQCString m_Stub;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdesu/stub.cpp b/kdesu/stub.cpp
index c0e968200..2af171d72 100644
--- a/kdesu/stub.cpp
+++ b/kdesu/stub.cpp
@@ -16,8 +16,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qcstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
#include <kdatastream.h>
#include <kapplication.h>
@@ -56,13 +56,13 @@ void StubProcess::setPriority(int prio)
}
-QCString StubProcess::commaSeparatedList(QCStringList lst)
+TQCString StubProcess::commaSeparatedList(QCStringList lst)
{
if (lst.count() == 0)
- return QCString("");
+ return TQCString("");
QCStringList::Iterator it = lst.begin();
- QCString str = *it;
+ TQCString str = *it;
for (it++; it!=lst.end(); it++)
{
str += ',';
@@ -79,7 +79,7 @@ QCString StubProcess::commaSeparatedList(QCStringList lst)
int StubProcess::ConverseStub(int check)
{
- QCString line, tmp;
+ TQCString line, tmp;
while (1)
{
line = readLine();
@@ -118,7 +118,7 @@ int StubProcess::ConverseStub(int check)
} else if (line == "command") {
writeLine(m_Command);
} else if (line == "path") {
- QCString path = getenv("PATH");
+ TQCString path = getenv("PATH");
if (!path.isEmpty() && path[0] == ':')
path = path.mid(1);
if (m_User == "root")
@@ -140,7 +140,7 @@ int StubProcess::ConverseStub(int check)
else writeLine("yes");
} else if (line == "app_startup_id") {
QCStringList env = environment();
- QCString tmp;
+ TQCString tmp;
for( QCStringList::ConstIterator it = env.begin();
it != env.end();
++it )
@@ -175,7 +175,7 @@ int StubProcess::ConverseStub(int check)
}
-void StubProcess::notifyTaskbar(const QString &)
+void StubProcess::notifyTaskbar(const TQString &)
{
kdWarning(900) << "Obsolete StubProcess::notifyTaskbar() called!" << endl;
}
diff --git a/kdesu/stub.h b/kdesu/stub.h
index 921db0e1c..48d2f65bb 100644
--- a/kdesu/stub.h
+++ b/kdesu/stub.h
@@ -13,15 +13,15 @@
#ifndef __Stub_h_Included__
#define __Stub_h_Included__
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "process.h"
#include "kcookie.h"
#include <kdelibs_export.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* Chat with kdesu_stub.
@@ -38,18 +38,18 @@ public:
/**
* Specify dcop transport
*/
- void setDcopTransport(const QCString &dcopTransport)
+ void setDcopTransport(const TQCString &dcopTransport)
{ m_pCookie->setDcopTransport(dcopTransport); }
/**
* Set the command.
*/
- void setCommand(const QCString &command) { m_Command = command; }
+ void setCommand(const TQCString &command) { m_Command = command; }
/**
* Set the target user.
*/
- void setUser(const QCString &user) { m_User = user; }
+ void setUser(const TQCString &user) { m_User = user; }
/**
* Set to "X only mode": Sycoca is not built and kdeinit is not launched.
@@ -91,43 +91,43 @@ protected:
* @obsolete
*/
// KDE4 remove
- void notifyTaskbar(const QString &suffix);
+ void notifyTaskbar(const TQString &suffix);
/**
* This virtual function can be overloaded when special behavior is
* desired. By default, it returns the value returned by KCookie.
*/
- virtual QCString display() { return m_pCookie->display(); }
+ virtual TQCString display() { return m_pCookie->display(); }
#ifdef Q_WS_X11
/**
* See display.
*/
- virtual QCString displayAuth() { return m_pCookie->displayAuth(); }
+ virtual TQCString displayAuth() { return m_pCookie->displayAuth(); }
#endif
/**
* See display.
*/
- virtual QCString dcopServer() { return m_pCookie->dcopServer(); }
+ virtual TQCString dcopServer() { return m_pCookie->dcopServer(); }
/**
* See display.
*/
- virtual QCString dcopAuth() { return m_pCookie->dcopAuth(); }
+ virtual TQCString dcopAuth() { return m_pCookie->dcopAuth(); }
/**
* See display.
*/
- virtual QCString iceAuth() { return m_pCookie->iceAuth(); }
+ virtual TQCString iceAuth() { return m_pCookie->iceAuth(); }
bool m_bXOnly;
bool m_bDCOPForwarding;
int m_Priority;
int m_Scheduler;
- QCString m_dcopTransport;
- QCString m_Command;
- QCString m_User;
+ TQCString m_dcopTransport;
+ TQCString m_Command;
+ TQCString m_User;
KCookie *m_pCookie;
private:
- QCString commaSeparatedList(QCStringList);
+ TQCString commaSeparatedList(QCStringList);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdesu/su.cpp b/kdesu/su.cpp
index 344c0f34c..864a3bcc0 100644
--- a/kdesu/su.cpp
+++ b/kdesu/su.cpp
@@ -29,9 +29,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@
#define __PATH_SUDO "false"
#endif
-SuProcess::SuProcess(const QCString &user, const QCString &command)
+SuProcess::SuProcess(const TQCString &user, const TQCString &command)
{
m_User = user;
m_Command = command;
@@ -112,14 +112,14 @@ int SuProcess::exec(const char *password, int check)
if (superUserCommand == "su") {
args += "-c";
}
- args += QCString(__KDE_BINDIR) + "/kdesu_stub";
+ args += TQCString(__KDE_BINDIR) + "/kdesu_stub";
#ifndef Q_OS_DARWIN
args += "-";
#endif
- /// QCString command = __PATH_SU;
+ /// TQCString command = __PATH_SU;
/// if (::access(__PATH_SU, X_OK) != 0)
- QCString command;
+ TQCString command;
if (superUserCommand == "sudo") {
command = __PATH_SUDO;
} else {
@@ -128,8 +128,8 @@ int SuProcess::exec(const char *password, int check)
if (::access(command, X_OK) != 0)
{
- /// command = QFile::encodeName(KGlobal::dirs()->findExe("su"));
- command = QFile::encodeName( KGlobal::dirs()->findExe(superUserCommand.ascii()) );
+ /// command = TQFile::encodeName(KGlobal::dirs()->findExe("su"));
+ command = TQFile::encodeName( KGlobal::dirs()->findExe(superUserCommand.ascii()) );
if (command.isEmpty())
return check ? SuNotFound : -1;
}
@@ -231,7 +231,7 @@ int SuProcess::ConverseSU(const char *password)
unsigned i, j;
// kdDebug(900) << k_lineinfo << "ConverseSU starting." << endl;
- QCString line;
+ TQCString line;
while (true)
{
line = readLine();
@@ -257,7 +257,7 @@ int SuProcess::ConverseSU(const char *password)
// couldn't have been a password prompt (the definition
// of prompt being that there's a line of output followed
// by a colon, and then the process waits).
- QCString more = readLine();
+ TQCString more = readLine();
if (more.isEmpty())
break;
@@ -302,7 +302,7 @@ int SuProcess::ConverseSU(const char *password)
//////////////////////////////////////////////////////////////////////////
case CheckStar:
{
- QCString s = line.stripWhiteSpace();
+ TQCString s = line.stripWhiteSpace();
if (s.isEmpty())
{
state=HandleStub;
diff --git a/kdesu/su.h b/kdesu/su.h
index c82e459eb..bb99e6f31 100644
--- a/kdesu/su.h
+++ b/kdesu/su.h
@@ -13,7 +13,7 @@
#ifndef __SU_h_Included__
#define __SU_h_Included__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -26,7 +26,7 @@
class KDESU_EXPORT SuProcess: public StubProcess
{
public:
- SuProcess(const QCString &user=0, const QCString &command=0);
+ SuProcess(const TQCString &user=0, const TQCString &command=0);
~SuProcess();
enum Errors { SuNotFound=1, SuNotAllowed, SuIncorrectPassword };
@@ -57,7 +57,7 @@ protected:
private:
class SuProcessPrivate;
SuProcessPrivate *d;
- QString superUserCommand;
+ TQString superUserCommand;
};
#endif
diff --git a/kdeui/kaboutapplication.cpp b/kdeui/kaboutapplication.cpp
index dff83b19f..8d5828960 100644
--- a/kdeui/kaboutapplication.cpp
+++ b/kdeui/kaboutapplication.cpp
@@ -22,7 +22,7 @@
// I (espen) prefer that header files are included alphabetically
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kaboutapplication.h>
#include <kaboutdialog_private.h>
#include <kaboutdata.h>
@@ -33,17 +33,17 @@
#include <kactivelabel.h>
#include "ktextedit.h"
-KAboutApplication::KAboutApplication( QWidget *parent, const char *name,
+KAboutApplication::KAboutApplication( TQWidget *parent, const char *name,
bool modal )
:KAboutDialog( AbtTabbed|AbtProduct,
- kapp ? kapp->caption() : QString::null,
+ kapp ? kapp->caption() : TQString::null,
Close, Close,
parent, name, modal )
{
buildDialog(KGlobal::instance()->aboutData());
}
-KAboutApplication::KAboutApplication( const KAboutData *aboutData, QWidget *parent,
+KAboutApplication::KAboutApplication( const KAboutData *aboutData, TQWidget *parent,
const char *name, bool modal )
:KAboutDialog( AbtTabbed|AbtProduct, aboutData->programName(), Close, Close,
parent, name, modal )
@@ -60,24 +60,24 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
//
//i18n "??" is displayed as (pseudo-)version when no data is known about the application
- setProduct( kapp ? kapp->caption() : QString::null, i18n("??"), QString::null, QString::null );
+ setProduct( kapp ? kapp->caption() : TQString::null, i18n("??"), TQString::null, TQString::null );
KAboutContainer *appPage = addContainerPage( i18n("&About"));
- QString appPageText =
+ TQString appPageText =
i18n("No information available.\n"
"The supplied KAboutData object does not exist.");
- QLabel *appPageLabel = new QLabel( "\n\n\n\n"+appPageText+"\n\n\n\n", 0 );
+ TQLabel *appPageLabel = new TQLabel( "\n\n\n\n"+appPageText+"\n\n\n\n", 0 );
appPage->addWidget( appPageLabel );
return;
}
setProduct( aboutData->programName(), aboutData->version(),
- QString::null, QString::null );
+ TQString::null, TQString::null );
if (!aboutData->programLogo().isNull())
setProgramLogo( aboutData->programLogo() );
- QString appPageText = aboutData->shortDescription() + "\n";
+ TQString appPageText = aboutData->shortDescription() + "\n";
if (!aboutData->otherText().isEmpty())
appPageText += "\n" + aboutData->otherText()+"\n";
@@ -87,7 +87,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
KAboutContainer *appPage = addContainerPage( i18n("&About"));
- QLabel *appPageLabel = new QLabel( appPageText, 0 );
+ TQLabel *appPageLabel = new TQLabel( appPageText, 0 );
appPage->addWidget( appPageLabel );
if (!aboutData->homepage().isEmpty())
@@ -96,20 +96,20 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
url->setText(aboutData->homepage());
url->setURL(aboutData->homepage());
appPage->addWidget( url );
- connect( url, SIGNAL(leftClickedURL(const QString &)),
- this, SLOT(openURLSlot(const QString &)));
+ connect( url, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ this, TQT_SLOT(openURLSlot(const TQString &)));
}
int authorCount = aboutData->authors().count();
if (authorCount)
{
- QString authorPageTitle = authorCount == 1 ?
+ TQString authorPageTitle = authorCount == 1 ?
i18n("A&uthor") : i18n("A&uthors");
KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle );
if (!aboutData->customAuthorTextEnabled() || !aboutData->customAuthorRichText().isEmpty ())
{
- QString text;
+ TQString text;
KActiveLabel* activeLabel = new KActiveLabel( authorPage );
if (!aboutData->customAuthorTextEnabled())
{
@@ -133,7 +133,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
authorPage->addWidget( activeLabel );
}
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for (it = aboutData->authors().begin();
it != aboutData->authors().end(); ++it)
{
@@ -147,7 +147,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
{
KAboutContainer *creditsPage =
addScrolledContainerPage( i18n("&Thanks To") );
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for (it = aboutData->credits().begin();
it != aboutData->credits().end(); ++it)
{
@@ -156,16 +156,16 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
}
}
- const QValueList<KAboutTranslator> translatorList = aboutData->translators();
+ const TQValueList<KAboutTranslator> translatorList = aboutData->translators();
if(translatorList.count() > 0)
{
- QString text = "<qt>";
+ TQString text = "<qt>";
- QValueList<KAboutTranslator>::ConstIterator it;
+ TQValueList<KAboutTranslator>::ConstIterator it;
for(it = translatorList.begin(); it != translatorList.end(); ++it)
{
- text += QString("<p>%1<br>&nbsp;&nbsp;&nbsp;"
+ text += TQString("<p>%1<br>&nbsp;&nbsp;&nbsp;"
"<a href=\"mailto:%2\">%2</a></p>")
.arg((*it).name())
.arg((*it).emailAddress())
@@ -184,5 +184,5 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
//
// Make sure the dialog has a reasonable width
//
- setInitialSize( QSize(400,1) );
+ setInitialSize( TQSize(400,1) );
}
diff --git a/kdeui/kaboutapplication.h b/kdeui/kaboutapplication.h
index b3c0ea632..d8356ce66 100644
--- a/kdeui/kaboutapplication.h
+++ b/kdeui/kaboutapplication.h
@@ -54,10 +54,10 @@ class KDEUI_EXPORT KAboutApplication : public KAboutDialog
* @param name Internal name of the widget. This name is not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec().
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec().
*/
- KAboutApplication( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( TQWidget *parent=0, const char *name=0, bool modal=true );
/**
* Constructor. Mostly does the same stuff as the previous constructor, except
@@ -73,15 +73,15 @@ class KDEUI_EXPORT KAboutApplication : public KAboutDialog
* @param name Internal name of the widget. This name is not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec().
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec().
*/
- KAboutApplication( const KAboutData *aboutData, QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( const KAboutData *aboutData, TQWidget *parent=0, const char *name=0, bool modal=true );
/*
FIXME: The two constructors should be replaced with the following after the lib freeze:
- KAboutApplication( const KAboutData *aboutData=0, QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( const KAboutData *aboutData=0, TQWidget *parent=0, const char *name=0, bool modal=true );
This will make buildDialog() obsolete as well (Frerich).
*/
diff --git a/kdeui/kaboutdialog.cpp b/kdeui/kaboutdialog.cpp
index 3e534acfd..12e610791 100644
--- a/kdeui/kaboutdialog.cpp
+++ b/kdeui/kaboutdialog.cpp
@@ -20,16 +20,16 @@
*
*/
-#include <qclipboard.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqclipboard.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <ktextedit.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -42,7 +42,7 @@
#include <kdebug.h>
//MOC_SKIP_BEGIN
-template class QPtrList<KAboutContributor>;
+template class TQPtrList<KAboutContributor>;
//MOC_SKIP_END
#define WORKTEXT_IDENTATION 16
@@ -57,35 +57,35 @@ template class QPtrList<KAboutContributor>;
class KAboutTabWidget : public QTabWidget
{
public:
- KAboutTabWidget( QWidget* parent ) : QTabWidget( parent ) {}
- QSize sizeHint() const {
- return QTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + QSize(4,4) );
+ KAboutTabWidget( TQWidget* parent ) : TQTabWidget( parent ) {}
+ TQSize sizeHint() const {
+ return TQTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + TQSize(4,4) );
}
};
-KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
- const QString &_name,const QString &_email,
- const QString &_url, const QString &_work,
+KAboutContributor::KAboutContributor( TQWidget *_parent, const char *wname,
+ const TQString &_name,const TQString &_email,
+ const TQString &_url, const TQString &_work,
bool showHeader, bool showFrame,
bool showBold )
- : QFrame( _parent, wname ), mShowHeader(showHeader), mShowBold(showBold), d(0)
+ : TQFrame( _parent, wname ), mShowHeader(showHeader), mShowBold(showBold), d(0)
{
if( showFrame )
{
- setFrameStyle(QFrame::Panel | QFrame::Raised);
+ setFrameStyle(TQFrame::Panel | TQFrame::Raised);
}
- mLabel[0] = new QLabel( this );
- mLabel[1] = new QLabel( this );
- mLabel[2] = new QLabel( this );
- mLabel[3] = new QLabel( this );
- mText[0] = new QLabel( this );
+ mLabel[0] = new TQLabel( this );
+ mLabel[1] = new TQLabel( this );
+ mLabel[2] = new TQLabel( this );
+ mLabel[3] = new TQLabel( this );
+ mText[0] = new TQLabel( this );
mText[1] = new KURLLabel( this );
mText[2] = new KURLLabel( this );
- mText[3] = new QLabel( this );
+ mText[3] = new TQLabel( this );
setName( _name, i18n("Author"), false );
setEmail( _email, i18n("Email"), false );
@@ -96,15 +96,15 @@ KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
kurl->setFloat(true);
kurl->setUnderline(true);
kurl->setMargin(0);
- connect(kurl, SIGNAL(leftClickedURL(const QString &)),
- SLOT(emailClickedSlot(const QString &)));
+ connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(emailClickedSlot(const TQString &)));
kurl = static_cast<KURLLabel *>(mText[2]);
kurl->setFloat(true);
kurl->setUnderline(true);
kurl->setMargin(0);
- connect(kurl, SIGNAL(leftClickedURL(const QString &)),
- SLOT(urlClickedSlot(const QString &)));
+ connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(urlClickedSlot(const TQString &)));
mLabel[3]->setAlignment( AlignTop );
@@ -113,7 +113,7 @@ KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
}
-void KAboutContributor::setName( const QString &_text, const QString &_header,
+void KAboutContributor::setName( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[0]->setText(_header);
@@ -122,7 +122,7 @@ void KAboutContributor::setName( const QString &_text, const QString &_header,
}
-void KAboutContributor::setEmail( const QString &_text, const QString &_header,
+void KAboutContributor::setEmail( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[1]->setText(_header);
@@ -133,7 +133,7 @@ void KAboutContributor::setEmail( const QString &_text, const QString &_header,
}
-void KAboutContributor::setURL( const QString &_text, const QString &_header,
+void KAboutContributor::setURL( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[2]->setText(_header);
@@ -144,7 +144,7 @@ void KAboutContributor::setURL( const QString &_text, const QString &_header,
}
-void KAboutContributor::setWork( const QString &_text, const QString &_header,
+void KAboutContributor::setWork( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[3]->setText(_header);
@@ -153,25 +153,25 @@ void KAboutContributor::setWork( const QString &_text, const QString &_header,
}
-QString KAboutContributor::getName( void ) const
+TQString KAboutContributor::getName( void ) const
{
return mText[0]->text();
}
-QString KAboutContributor::getEmail( void ) const
+TQString KAboutContributor::getEmail( void ) const
{
return mText[1]->text();
}
-QString KAboutContributor::getURL( void ) const
+TQString KAboutContributor::getURL( void ) const
{
return mText[2]->text();
}
-QString KAboutContributor::getWork( void ) const
+TQString KAboutContributor::getWork( void ) const
{
return mText[3]->text();
}
@@ -189,10 +189,10 @@ void KAboutContributor::updateLayout( void )
if( !mText[3]->text().isEmpty() ) { ++row; }
- QGridLayout *gbox;
+ TQGridLayout *gbox;
if( row == 0 )
{
- gbox = new QGridLayout( this, 1, 1, 0 );
+ gbox = new TQGridLayout( this, 1, 1, 0 );
for( int i=0; i<4; ++i )
{
mLabel[i]->hide();
@@ -203,11 +203,11 @@ void KAboutContributor::updateLayout( void )
{
if( mText[0]->text().isEmpty() && !mShowHeader )
{
- gbox = new QGridLayout( this, row, 1, frameWidth()+1, 2 );
+ gbox = new TQGridLayout( this, row, 1, frameWidth()+1, 2 );
}
else
{
- gbox = new QGridLayout( this, row, 2, frameWidth()+1, 2 );
+ gbox = new TQGridLayout( this, row, 2, frameWidth()+1, 2 );
if( !mShowHeader )
{
gbox->addColSpacing( 0, KDialog::spacingHint()*2 );
@@ -260,11 +260,11 @@ void KAboutContributor::updateLayout( void )
}
-void KAboutContributor::fontChange( const QFont &/*oldFont*/ )
+void KAboutContributor::fontChange( const TQFont &/*oldFont*/ )
{
if( mShowBold )
{
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
mText[0]->setFont( f );
}
@@ -272,19 +272,19 @@ void KAboutContributor::fontChange( const QFont &/*oldFont*/ )
}
-QSize KAboutContributor::sizeHint( void ) const
+TQSize KAboutContributor::sizeHint( void ) const
{
return minimumSizeHint();
}
-void KAboutContributor::urlClickedSlot( const QString &u )
+void KAboutContributor::urlClickedSlot( const TQString &u )
{
emit openURL(u);
}
-void KAboutContributor::emailClickedSlot( const QString &e )
+void KAboutContributor::emailClickedSlot( const TQString &e )
{
emit sendEmail( mText[0]->text(), e ) ;
}
@@ -293,13 +293,13 @@ void KAboutContributor::emailClickedSlot( const QString &e )
//
// Internal widget for the KAboutDialog class.
//
-KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
+KAboutContainerBase::KAboutContainerBase( int layoutType, TQWidget *_parent,
char *_name )
- : QWidget( _parent, _name ),
+ : TQWidget( _parent, _name ),
mImageLabel(0), mTitleLabel(0), mIconLabel(0),mVersionLabel(0),
mAuthorLabel(0), mImageFrame(0),mPageTab(0),mPlainSpace(0),d(0)
{
- mTopLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ mTopLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
if( !mTopLayout ) { return; }
if( layoutType & AbtImageOnly )
@@ -313,7 +313,7 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
if( layoutType & AbtTitle )
{
- mTitleLabel = new QLabel( this, "title" );
+ mTitleLabel = new TQLabel( this, "title" );
mTitleLabel->setAlignment(AlignCenter);
mTopLayout->addWidget( mTitleLabel );
mTopLayout->addSpacing( KDialog::spacingHint() );
@@ -321,21 +321,21 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
if( layoutType & AbtProduct )
{
- QWidget* const productArea = new QWidget( this, "area" );
- mTopLayout->addWidget( productArea, 0, QApplication::reverseLayout() ? AlignRight : AlignLeft );
+ TQWidget* const productArea = new TQWidget( this, "area" );
+ mTopLayout->addWidget( productArea, 0, TQApplication::reverseLayout() ? AlignRight : AlignLeft );
- QHBoxLayout* const hbox = new QHBoxLayout(productArea,0,KDialog::spacingHint());
+ TQHBoxLayout* const hbox = new TQHBoxLayout(productArea,0,KDialog::spacingHint());
if( !hbox ) { return; }
- mIconLabel = new QLabel( productArea );
+ mIconLabel = new TQLabel( productArea );
hbox->addWidget( mIconLabel, 0, AlignLeft|AlignHCenter );
- QVBoxLayout* const vbox = new QVBoxLayout();
+ TQVBoxLayout* const vbox = new TQVBoxLayout();
if( !vbox ) { return; }
hbox->addLayout( vbox );
- mVersionLabel = new QLabel( productArea, "version" );
- mAuthorLabel = new QLabel( productArea, "author" );
+ mVersionLabel = new TQLabel( productArea, "version" );
+ mAuthorLabel = new TQLabel( productArea, "author" );
vbox->addWidget( mVersionLabel );
vbox->addWidget( mAuthorLabel );
hbox->activate();
@@ -343,24 +343,24 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
mTopLayout->addSpacing( KDialog::spacingHint() );
}
- QHBoxLayout* const hbox = new QHBoxLayout();
+ TQHBoxLayout* const hbox = new TQHBoxLayout();
if( !hbox ) { return; }
mTopLayout->addLayout( hbox, 10 );
if( layoutType & AbtImageLeft )
{
- QVBoxLayout* vbox = new QVBoxLayout();
+ TQVBoxLayout* vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addSpacing(1);
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
vbox->addWidget( mImageFrame );
vbox->addSpacing(1);
- vbox = new QVBoxLayout( mImageFrame, 1 );
+ vbox = new TQVBoxLayout( mImageFrame, 1 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
vbox->addStretch(10);
vbox->addWidget( mImageLabel );
vbox->addStretch(10);
@@ -375,43 +375,43 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
}
else if( layoutType & AbtImageOnly )
{
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
hbox->addWidget( mImageFrame, 10 );
- QGridLayout* const gbox = new QGridLayout(mImageFrame, 3, 3, 1, 0 );
+ TQGridLayout* const gbox = new TQGridLayout(mImageFrame, 3, 3, 1, 0 );
gbox->setRowStretch( 0, 10 );
gbox->setRowStretch( 2, 10 );
gbox->setColStretch( 0, 10 );
gbox->setColStretch( 2, 10 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
gbox->addWidget( mImageLabel, 1, 1 );
gbox->activate();
}
else
{
- mPlainSpace = new QFrame( this );
+ mPlainSpace = new TQFrame( this );
if( !mPlainSpace ) { return; }
hbox->addWidget( mPlainSpace, 10 );
}
if( layoutType & AbtImageRight )
{
- QVBoxLayout *vbox = new QVBoxLayout();
+ TQVBoxLayout *vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addSpacing(1);
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
vbox->addWidget( mImageFrame );
vbox->addSpacing(1);
- vbox = new QVBoxLayout( mImageFrame, 1 );
+ vbox = new TQVBoxLayout( mImageFrame, 1 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
vbox->addStretch(10);
vbox->addWidget( mImageLabel );
vbox->addStretch(10);
@@ -424,30 +424,30 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
void KAboutContainerBase::show( void )
{
- QWidget::show();
+ TQWidget::show();
}
-QSize KAboutContainerBase::sizeHint( void ) const
+TQSize KAboutContainerBase::sizeHint( void ) const
{
- return minimumSize().expandedTo( QSize( QWidget::sizeHint().width(), 0 ) );
+ return minimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) );
}
-void KAboutContainerBase::fontChange( const QFont &/*oldFont*/ )
+void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ )
{
if( mTitleLabel )
{
- QFont f( KGlobalSettings::generalFont() );
+ TQFont f( KGlobalSettings::generalFont() );
f.setBold( true );
int fs = f.pointSize();
if (fs == -1)
- fs = QFontInfo(f).pointSize();
+ fs = TQFontInfo(f).pointSize();
f.setPointSize( fs+2 ); // Lets not make it too big
mTitleLabel->setFont(f);
}
if( mVersionLabel )
{
- QFont f( KGlobalSettings::generalFont() );
+ TQFont f( KGlobalSettings::generalFont() );
f.setBold( true );
mVersionLabel->setFont(f);
mAuthorLabel->setFont(f);
@@ -457,54 +457,54 @@ void KAboutContainerBase::fontChange( const QFont &/*oldFont*/ )
update();
}
-QFrame *KAboutContainerBase::addTextPage( const QString &title,
- const QString &text,
+TQFrame *KAboutContainerBase::addTextPage( const TQString &title,
+ const TQString &text,
bool richText, int numLines )
{
- QFrame* const page = addEmptyPage( title );
+ TQFrame* const page = addEmptyPage( title );
if( !page ) { return 0; }
if( numLines <= 0 ) { numLines = 10; }
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
if( richText )
{
KTextBrowser* const browser = new KTextBrowser( page, "browser" );
- browser->setHScrollBarMode( QScrollView::AlwaysOff );
+ browser->setHScrollBarMode( TQScrollView::AlwaysOff );
browser->setText( text );
browser->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
vbox->addWidget(browser);
- connect(browser, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(browser, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(browser, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(browser, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
}
else
{
KTextEdit* const textEdit = new KTextEdit( page, "text" );
textEdit->setReadOnly( true );
textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
- textEdit->setWordWrap( QTextEdit::NoWrap );
+ textEdit->setWordWrap( TQTextEdit::NoWrap );
vbox->addWidget( textEdit );
}
return page;
}
-QFrame *KAboutContainerBase::addLicensePage( const QString &title,
- const QString &text, int numLines)
+TQFrame *KAboutContainerBase::addLicensePage( const TQString &title,
+ const TQString &text, int numLines)
{
- QFrame* const page = addEmptyPage( title );
+ TQFrame* const page = addEmptyPage( title );
if( !page ) { return 0; }
if( numLines <= 0 ) { numLines = 10; }
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
KTextEdit* const textEdit = new KTextEdit( page, "license" );
textEdit->setFont( KGlobalSettings::fixedFont() );
textEdit->setReadOnly( true );
- textEdit->setWordWrap( QTextEdit::NoWrap );
+ textEdit->setWordWrap( TQTextEdit::NoWrap );
textEdit->setText( text );
textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
vbox->addWidget( textEdit );
@@ -512,7 +512,7 @@ QFrame *KAboutContainerBase::addLicensePage( const QString &title,
}
-KAboutContainer *KAboutContainerBase::addContainerPage( const QString &title,
+KAboutContainer *KAboutContainerBase::addContainerPage( const TQString &title,
int childAlignment,
int innerAlignment )
{
@@ -527,17 +527,17 @@ KAboutContainer *KAboutContainerBase::addContainerPage( const QString &title,
innerAlignment );
mPageTab->addTab( container, title );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
- const QString &title,
+ const TQString &title,
int childAlignment,
int innerAlignment )
{
@@ -547,9 +547,9 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
return 0;
}
- QFrame* const page = addEmptyPage( title );
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
- QScrollView* const scrollView = new QScrollView( page );
+ TQFrame* const page = addEmptyPage( title );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
+ TQScrollView* const scrollView = new TQScrollView( page );
scrollView->viewport()->setBackgroundMode( PaletteBackground );
vbox->addWidget( scrollView );
@@ -559,16 +559,16 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
scrollView->addChild( container );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
-QFrame *KAboutContainerBase::addEmptyPage( const QString &title )
+TQFrame *KAboutContainerBase::addEmptyPage( const TQString &title )
{
if( !mPageTab )
{
@@ -576,8 +576,8 @@ QFrame *KAboutContainerBase::addEmptyPage( const QString &title )
return 0;
}
- QFrame* const page = new QFrame( mPageTab, title.latin1() );
- page->setFrameStyle( QFrame::NoFrame );
+ TQFrame* const page = new TQFrame( mPageTab, title.latin1() );
+ page->setFrameStyle( TQFrame::NoFrame );
mPageTab->addTab( page, title );
return page;
@@ -591,17 +591,17 @@ KAboutContainer *KAboutContainerBase::addContainer( int childAlignment,
0, KDialog::spacingHint(), childAlignment, innerAlignment );
mTopLayout->addWidget( container, 0, childAlignment );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
-void KAboutContainerBase::setTitle( const QString &title )
+void KAboutContainerBase::setTitle( const TQString &title )
{
if( !mTitleLabel )
{
@@ -612,7 +612,7 @@ void KAboutContainerBase::setTitle( const QString &title )
}
-void KAboutContainerBase::setImage( const QString &fileName )
+void KAboutContainerBase::setImage( const TQString &fileName )
{
if( !mImageLabel )
{
@@ -624,25 +624,25 @@ void KAboutContainerBase::setImage( const QString &fileName )
return;
}
- const QPixmap logo( fileName );
+ const TQPixmap logo( fileName );
if( !logo.isNull() )
mImageLabel->setPixmap( logo );
mImageFrame->layout()->activate();
}
-void KAboutContainerBase::setProgramLogo( const QString &fileName )
+void KAboutContainerBase::setProgramLogo( const TQString &fileName )
{
if( fileName.isNull() )
{
return;
}
- const QPixmap logo( fileName );
+ const TQPixmap logo( fileName );
setProgramLogo( logo );
}
-void KAboutContainerBase::setProgramLogo( const QPixmap &pixmap )
+void KAboutContainerBase::setProgramLogo( const TQPixmap &pixmap )
{
if( !mIconLabel )
{
@@ -655,7 +655,7 @@ void KAboutContainerBase::setProgramLogo( const QPixmap &pixmap )
}
}
-void KAboutContainerBase::setImageBackgroundColor( const QColor &color )
+void KAboutContainerBase::setImageBackgroundColor( const TQColor &color )
{
if( mImageFrame )
{
@@ -670,22 +670,22 @@ void KAboutContainerBase::setImageFrame( bool state )
{
if( state )
{
- mImageFrame->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mImageFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
mImageFrame->setLineWidth(1);
}
else
{
- mImageFrame->setFrameStyle( QFrame::NoFrame );
+ mImageFrame->setFrameStyle( TQFrame::NoFrame );
mImageFrame->setLineWidth(0);
}
}
}
-void KAboutContainerBase::setProduct( const QString &appName,
- const QString &version,
- const QString &author,
- const QString &year )
+void KAboutContainerBase::setProduct( const TQString &appName,
+ const TQString &version,
+ const TQString &author,
+ const TQString &year )
{
if( !mIconLabel )
{
@@ -701,10 +701,10 @@ void KAboutContainerBase::setProduct( const QString &appName,
else
kdDebug(291) << "no kapp" << endl;
- const QString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName).arg(version).
- arg(QString::fromLatin1(KDE_VERSION_STRING));
- const QString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year).
- arg(author) : QString::fromLatin1("");
+ const TQString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName).arg(version).
+ arg(TQString::fromLatin1(KDE_VERSION_STRING));
+ const TQString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year).
+ arg(author) : TQString::fromLatin1("");
//if (!year.isEmpty())
// msg2 = i18n("%1 %2, %3").arg('©').arg(year).arg(author);
@@ -720,33 +720,33 @@ void KAboutContainerBase::setProduct( const QString &appName,
}
-void KAboutContainerBase::slotMouseTrack( int mode, const QMouseEvent *e )
+void KAboutContainerBase::slotMouseTrack( int mode, const TQMouseEvent *e )
{
emit mouseTrack( mode, e );
}
-void KAboutContainerBase::slotUrlClick( const QString &url )
+void KAboutContainerBase::slotUrlClick( const TQString &url )
{
emit urlClick( url );
}
-void KAboutContainerBase::slotMailClick( const QString &_name,
- const QString &_address )
+void KAboutContainerBase::slotMailClick( const TQString &_name,
+ const TQString &_address )
{
emit mailClick( _name, _address );
}
-KAboutContainer::KAboutContainer( QWidget *_parent, const char *_name,
+KAboutContainer::KAboutContainer( TQWidget *_parent, const char *_name,
int _margin, int _spacing,
int childAlignment, int innerAlignment )
- : QFrame( _parent, _name ), d(0)
+ : TQFrame( _parent, _name ), d(0)
{
mAlignment = innerAlignment;
- QGridLayout* const gbox = new QGridLayout( this, 3, 3, _margin, _spacing );
+ TQGridLayout* const gbox = new TQGridLayout( this, 3, 3, _margin, _spacing );
if( childAlignment & AlignHCenter )
{
gbox->setColStretch( 0, 10 );
@@ -775,38 +775,38 @@ KAboutContainer::KAboutContainer( QWidget *_parent, const char *_name,
gbox->setRowStretch( 2, 10 );
}
- mVbox = new QVBoxLayout( _spacing );
+ mVbox = new TQVBoxLayout( _spacing );
gbox->addLayout( mVbox, 1, 1 );
gbox->activate();
}
-void KAboutContainer::childEvent( QChildEvent *e )
+void KAboutContainer::childEvent( TQChildEvent *e )
{
if( !e->inserted() || !e->child()->isWidgetType() )
{
return;
}
- QWidget* const w = static_cast<QWidget *>(e->child());
+ TQWidget* const w = static_cast<TQWidget *>(e->child());
mVbox->addWidget( w, 0, mAlignment );
- const QSize s( sizeHint() );
+ const TQSize s( sizeHint() );
setMinimumSize( s );
- QObjectList* const l = const_cast<QObjectList *>(children()); // silence please
- QObjectListIterator itr( *l );
- QObject * o;
+ TQObjectList* const l = const_cast<TQObjectList *>(children()); // silence please
+ TQObjectListIterator itr( *l );
+ TQObject * o;
while ( (o = itr.current()) ) {
++itr;
if( o->isWidgetType() )
{
- static_cast<QWidget *>(o)->setMinimumWidth( s.width() );
+ static_cast<TQWidget *>(o)->setMinimumWidth( s.width() );
}
}
}
-QSize KAboutContainer::sizeHint( void ) const
+TQSize KAboutContainer::sizeHint( void ) const
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -814,21 +814,21 @@ QSize KAboutContainer::sizeHint( void ) const
// layout()->margin() and layout()->spacing()
//
- QSize total_size;
+ TQSize total_size;
int numChild = 0;
- QObjectList* const l = const_cast<QObjectList *>(children()); // silence please
+ TQObjectList* const l = const_cast<TQObjectList *>(children()); // silence please
- QObjectListIterator itr( *l );
- QObject * o;
+ TQObjectListIterator itr( *l );
+ TQObject * o;
while ( (o = itr.current()) ) {
++itr;
if( o->isWidgetType() )
{
++numChild;
- QWidget* const w= static_cast<QWidget *>(o);
+ TQWidget* const w= static_cast<TQWidget *>(o);
- QSize s = w->minimumSize();
+ TQSize s = w->minimumSize();
if( s.isEmpty() )
{
s = w->minimumSizeHint();
@@ -837,7 +837,7 @@ QSize KAboutContainer::sizeHint( void ) const
s = w->sizeHint();
if( s.isEmpty() )
{
- s = QSize( 100, 100 ); // Default size
+ s = TQSize( 100, 100 ); // Default size
}
}
}
@@ -854,62 +854,62 @@ QSize KAboutContainer::sizeHint( void ) const
//
total_size.setHeight( total_size.height() + layout()->spacing()*(numChild-1) );
- total_size += QSize( layout()->margin()*2, layout()->margin()*2 + 1 );
+ total_size += TQSize( layout()->margin()*2, layout()->margin()*2 + 1 );
}
else
{
- total_size = QSize( 1, 1 );
+ total_size = TQSize( 1, 1 );
}
return total_size;
}
-QSize KAboutContainer::minimumSizeHint( void ) const
+TQSize KAboutContainer::minimumSizeHint( void ) const
{
return sizeHint();
}
-void KAboutContainer::addWidget( QWidget *widget )
+void KAboutContainer::addWidget( TQWidget *widget )
{
- widget->reparent( this, 0, QPoint(0,0) );
+ widget->reparent( this, 0, TQPoint(0,0) );
}
-void KAboutContainer::addPerson( const QString &_name, const QString &_email,
- const QString &_url, const QString &_task,
+void KAboutContainer::addPerson( const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_task,
bool showHeader, bool showFrame,bool showBold)
{
KAboutContributor* const cont = new KAboutContributor( this, "pers",
_name, _email, _url, _task, showHeader, showFrame, showBold );
- connect( cont, SIGNAL( openURL(const QString&)),
- this, SIGNAL( urlClick(const QString &)));
- connect( cont, SIGNAL( sendEmail(const QString &, const QString &)),
- this, SIGNAL( mailClick(const QString &, const QString &)));
+ connect( cont, TQT_SIGNAL( openURL(const TQString&)),
+ this, TQT_SIGNAL( urlClick(const TQString &)));
+ connect( cont, TQT_SIGNAL( sendEmail(const TQString &, const TQString &)),
+ this, TQT_SIGNAL( mailClick(const TQString &, const TQString &)));
}
-void KAboutContainer::addTitle( const QString &title, int alignment,
+void KAboutContainer::addTitle( const TQString &title, int alignment,
bool showFrame, bool showBold )
{
- QLabel* const label = new QLabel( title, this, "title" );
+ TQLabel* const label = new TQLabel( title, this, "title" );
if( showBold )
{
- QFont labelFont( font() );
+ TQFont labelFont( font() );
labelFont.setBold( true );
label->setFont( labelFont );
}
if( showFrame )
{
- label->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
}
label->setAlignment( alignment );
}
-void KAboutContainer::addImage( const QString &fileName, int alignment )
+void KAboutContainer::addImage( const TQString &fileName, int alignment )
{
if( fileName.isNull() )
{
@@ -917,10 +917,10 @@ void KAboutContainer::addImage( const QString &fileName, int alignment )
}
KImageTrackLabel* const label = new KImageTrackLabel( this, "image" );
- const QImage logo( fileName );
+ const TQImage logo( fileName );
if( !logo.isNull() )
{
- QPixmap pix;
+ TQPixmap pix;
pix = logo;
label->setPixmap( pix );
}
@@ -942,64 +942,64 @@ class KAboutContributor : public QFrame
// ----------------------------------------------------------------------------
public:
/** The Qt constructor. */
- KAboutContributor(QWidget* parent=0, const char* name=0);
+ KAboutContributor(TQWidget* parent=0, const char* name=0);
/** Set the name (a literal string). */
- void setName(const QString&);
+ void setName(const TQString&);
/** Get the name. */
- QString getName();
+ TQString getName();
/** The email address (dito). */
- void setEmail(const QString&);
+ void setEmail(const TQString&);
/** Get the email address. */
- QString getEmail();
+ TQString getEmail();
/** The URL (dito). */
- void setURL(const QString&);
+ void setURL(const TQString&);
/** Get the URL. */
- QString getURL();
+ TQString getURL();
/** The tasks the person worked on (a literal string). More than one line is
* possible, but very long texts might look ugly. */
- void setWork(const QString&);
+ void setWork(const TQString&);
/** The size hint. Very important here, since KAboutWidget relies on it for
* geometry management. */
- QSize sizeHint();
- QSize minimumSizeHint(void);
+ TQSize sizeHint();
+ TQSize minimumSizeHint(void);
virtual void show( void );
// ----------------------------------------------------------------------------
protected:
// events:
/** The resize event. */
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
/** The paint event. */
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
/** The label showing the program version. */
- QLabel *name;
+ TQLabel *name;
/** The clickable URL label showing the email address. It is only visible if
* its text is not empty. */
KURLLabel *email;
/** Another interactive part that displays the homepage URL. */
KURLLabel *url;
/** The description of the contributions of the person. */
- QString work;
+ TQString work;
// ----------------------------------------------------------------------------
protected slots:
/** The homepage URL has been clicked. */
- void urlClickedSlot(const QString&);
+ void urlClickedSlot(const TQString&);
/** The email address has been clicked. */
- void emailClickedSlot(const QString& emailaddress);
+ void emailClickedSlot(const TQString& emailaddress);
// ----------------------------------------------------------------------------
signals:
/** The email address has been clicked. */
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/** The URL has been clicked. */
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// ############################################################################
};
-KAboutContributor::KAboutContributor(QWidget* parent, const char* n)
- : QFrame(parent, n),
- name(new QLabel(this)),
+KAboutContributor::KAboutContributor(TQWidget* parent, const char* n)
+ : TQFrame(parent, n),
+ name(new TQLabel(this)),
email(new KURLLabel(this)),
url(new KURLLabel(this))
{
@@ -1009,17 +1009,17 @@ KAboutContributor::KAboutContributor(QWidget* parent, const char* n)
kdDebug() << "KAboutContributor::KAboutContributor: Out of memory." << endl;
qApp->quit();
}
- setFrameStyle(QFrame::Panel | QFrame::Raised);
+ setFrameStyle(TQFrame::Panel | TQFrame::Raised);
// -----
- connect(email, SIGNAL(leftClickedURL(const QString&)),
- SLOT(emailClickedSlot(const QString&)));
- connect(url, SIGNAL(leftClickedURL(const QString&)),
- SLOT(urlClickedSlot(const QString&)));
+ connect(email, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(emailClickedSlot(const TQString&)));
+ connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(urlClickedSlot(const TQString&)));
// ############################################################
}
void
-KAboutContributor::setName(const QString& n)
+KAboutContributor::setName(const TQString& n)
{
// ############################################################
name->setText(n);
@@ -1034,7 +1034,7 @@ KAboutContributor::getName()
// ###########################################################
}
void
-KAboutContributor::setURL(const QString& u)
+KAboutContributor::setURL(const TQString& u)
{
// ###########################################################
url->setText(u);
@@ -1050,7 +1050,7 @@ KAboutContributor::getURL()
}
void
-KAboutContributor::setEmail(const QString& e)
+KAboutContributor::setEmail(const TQString& e)
{
// ###########################################################
email->setText(e);
@@ -1066,7 +1066,7 @@ KAboutContributor::getEmail()
}
void
-KAboutContributor::emailClickedSlot(const QString& e)
+KAboutContributor::emailClickedSlot(const TQString& e)
{
// ###########################################################
kdDebug() << "KAboutContributor::emailClickedSlot: called." << endl;
@@ -1075,7 +1075,7 @@ KAboutContributor::emailClickedSlot(const QString& e)
}
void
-KAboutContributor::urlClickedSlot(const QString& u)
+KAboutContributor::urlClickedSlot(const TQString& u)
{
// ###########################################################
kdDebug() << "KAboutContributor::urlClickedSlot: called." << endl;
@@ -1084,7 +1084,7 @@ KAboutContributor::urlClickedSlot(const QString& u)
}
void
-KAboutContributor::setWork(const QString& w)
+KAboutContributor::setWork(const TQString& w)
{
// ###########################################################
work=w;
@@ -1102,7 +1102,7 @@ KAboutContributor::sizeHint()
const int FrameWidth=frameWidth();
const int WorkTextWidth=200;
int maxx, maxy;
- QRect rect;
+ TQRect rect;
// ----- first calculate name and email width:
maxx=name->sizeHint().width();
maxx=QMAX(maxx, email->sizeHint().width()+WORKTEXT_IDENTATION);
@@ -1124,11 +1124,11 @@ KAboutContributor::sizeHint()
// -----
maxx+=2*FrameWidth;
maxy+=2*FrameWidth;
- return QSize(maxx, maxy);
+ return TQSize(maxx, maxy);
// ############################################################################
}
-QSize KAboutContributor::minimumSizeHint(void)
+TQSize KAboutContributor::minimumSizeHint(void)
{
return( sizeHint() );
}
@@ -1136,14 +1136,14 @@ QSize KAboutContributor::minimumSizeHint(void)
void KAboutContributor::show( void )
{
- QFrame::show();
+ TQFrame::show();
setMinimumSize( sizeHint() );
}
void
-KAboutContributor::resizeEvent(QResizeEvent*)
+KAboutContributor::resizeEvent(TQResizeEvent*)
{ // the widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint
// ############################################################################
@@ -1166,7 +1166,7 @@ KAboutContributor::resizeEvent(QResizeEvent*)
void
-KAboutContributor::paintEvent(QPaintEvent* e)
+KAboutContributor::paintEvent(TQPaintEvent* e)
{ // the widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint (the widget is only used locally by now)
// ############################################################################
@@ -1174,9 +1174,9 @@ KAboutContributor::paintEvent(QPaintEvent* e)
int h=height()-cy-frameWidth();
int w=width()-WORKTEXT_IDENTATION-2*frameWidth();
// -----
- QFrame::paintEvent(e);
+ TQFrame::paintEvent(e);
if(work.isEmpty()) return;
- QPainter paint(this); // construct painter only if there is something to draw
+ TQPainter paint(this); // construct painter only if there is something to draw
// -----
paint.drawText(WORKTEXT_IDENTATION, cy, w, h, AlignLeft | WordBreak, work);
// ############################################################################
@@ -1186,7 +1186,7 @@ KAboutContributor::paintEvent(QPaintEvent* e)
#if 0
-QSize KAboutContributor::sizeHint( void )
+TQSize KAboutContributor::sizeHint( void )
{
int s = KDialog::spacingHint();
int h = fontMetrics().lineSpacing()*3 + 2*s;
@@ -1199,7 +1199,7 @@ QSize KAboutContributor::sizeHint( void )
if( work.isEmpty() == false )
{
const int WorkTextWidth=200;
- QRect r = fontMetrics().boundingRect
+ TQRect r = fontMetrics().boundingRect
(0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work);
if( w < r.width() )
{
@@ -1207,7 +1207,7 @@ QSize KAboutContributor::sizeHint( void )
}
h += QMAX( fontMetrics().lineSpacing(), r.height() ) + s;
}
- return( QSize( w + 2*m, h + 2*m ) );
+ return( TQSize( w + 2*m, h + 2*m ) );
/*
@@ -1222,7 +1222,7 @@ QSize KAboutContributor::sizeHint( void )
{
const int WorkTextWidth=200;
- QRect r = fontMetrics().boundingRect
+ TQRect r = fontMetrics().boundingRect
(0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work);
if( w < r.width() )
{
@@ -1230,7 +1230,7 @@ QSize KAboutContributor::sizeHint( void )
}
h += r.height() + s;
}
- return( QSize( w + 2*m, h + 2*m ) );
+ return( TQSize( w + 2*m, h + 2*m ) );
*/
}
@@ -1239,7 +1239,7 @@ QSize KAboutContributor::sizeHint( void )
// The widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint
//
-void KAboutContributor::resizeEvent(QResizeEvent*)
+void KAboutContributor::resizeEvent(TQResizeEvent*)
{
int x = frameWidth();
int s = KDialog::spacingHint();
@@ -1273,9 +1273,9 @@ void KAboutContributor::resizeEvent(QResizeEvent*)
-void KAboutContributor::paintEvent( QPaintEvent *e )
+void KAboutContributor::paintEvent( TQPaintEvent *e )
{
- QFrame::paintEvent(e);
+ TQFrame::paintEvent(e);
if(work.isEmpty()) return;
int x = frameWidth() + KDialog::spacingHint();
@@ -1283,7 +1283,7 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
int y = height() - frameWidth() - fontMetrics().lineSpacing();
int w = width() - frameWidth()*2 - KDialog::spacingHint();
- QPainter paint( this );
+ TQPainter paint( this );
paint.drawText( x, y, w, h, AlignLeft | WordBreak, work );
/*
@@ -1294,7 +1294,7 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
int y = frameWidth()+KDialog::spacingHint()+(name->sizeHint().height()+s)*3;
int h = height()-y-frameWidth();
- QPainter paint( this );
+ TQPainter paint( this );
paint.drawText( x, y, w, h, AlignLeft | WordBreak, work );
*/
}
@@ -1305,11 +1305,11 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
-KAboutWidget::KAboutWidget(QWidget *_parent, const char *_name)
- : QWidget(_parent, _name),
- version(new QLabel(this)),
- cont(new QLabel(this)),
- logo(new QLabel(this)),
+KAboutWidget::KAboutWidget(TQWidget *_parent, const char *_name)
+ : TQWidget(_parent, _name),
+ version(new TQLabel(this)),
+ cont(new TQLabel(this)),
+ logo(new TQLabel(this)),
author(new KAboutContributor(this)),
maintainer(new KAboutContributor(this)),
showMaintainer(false),
@@ -1325,17 +1325,17 @@ KAboutWidget::KAboutWidget(QWidget *_parent, const char *_name)
// -----
cont->setText(i18n("Other Contributors:"));
logo->setText(i18n("(No logo available)"));
- logo->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ logo->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
version->setAlignment(AlignCenter);
// -----
- connect(author, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(author, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
- connect(maintainer, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(maintainer, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
+ connect(author, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(author, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
+ connect(maintainer, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(maintainer, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
// #################################################################
}
@@ -1346,7 +1346,7 @@ KAboutWidget::adjust()
// #################################################################
int cx, cy, tempx;
int maintWidth, maintHeight;
- QSize total_size;
+ TQSize total_size;
// -----
if(showMaintainer)
{
@@ -1371,7 +1371,7 @@ KAboutWidget::adjust()
{
cx=QMAX(cx, cont->sizeHint().width());
cy+=cont->sizeHint().height()+Grid;
- QPtrListIterator<KAboutContributor> _pos(contributors);
+ TQPtrListIterator<KAboutContributor> _pos(contributors);
KAboutContributor* currEntry;
while ( (currEntry = _pos.current()) )
{
@@ -1385,26 +1385,26 @@ KAboutWidget::adjust()
}
void
-KAboutWidget::setLogo(const QPixmap& i)
+KAboutWidget::setLogo(const TQPixmap& i)
{
// ############################################################################
logo->setPixmap(i);
// ############################################################################
}
-void KAboutWidget::sendEmailSlot(const QString &_name, const QString &_email)
+void KAboutWidget::sendEmailSlot(const TQString &_name, const TQString &_email)
{
emit(sendEmail(_name, _email));
}
-void KAboutWidget::openURLSlot(const QString& _url)
+void KAboutWidget::openURLSlot(const TQString& _url)
{
emit(openURL(_url));
}
void
-KAboutWidget::setAuthor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::setAuthor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
author->setName(_name);
@@ -1415,8 +1415,8 @@ KAboutWidget::setAuthor(const QString &_name, const QString &_email,
}
void
-KAboutWidget::setMaintainer(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::setMaintainer(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
maintainer->setName(_name);
@@ -1428,8 +1428,8 @@ KAboutWidget::setMaintainer(const QString &_name, const QString &_email,
}
void
-KAboutWidget::addContributor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::addContributor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
KAboutContributor* const c=new KAboutContributor(this);
@@ -1439,14 +1439,14 @@ KAboutWidget::addContributor(const QString &_name, const QString &_email,
c->setURL(_url);
c->setWork(_w);
contributors.append(c);
- connect(c, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(c, SIGNAL(openURL(const QString&)), SLOT(openURLSlot(const QString&)));
+ connect(c, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(c, TQT_SIGNAL(openURL(const TQString&)), TQT_SLOT(openURLSlot(const TQString&)));
// ############################################################################
}
void
-KAboutWidget::setVersion(const QString &_name)
+KAboutWidget::setVersion(const TQString &_name)
{
// ############################################################################
version->setText(_name);
@@ -1454,7 +1454,7 @@ KAboutWidget::setVersion(const QString &_name)
}
void
-KAboutWidget::resizeEvent(QResizeEvent*)
+KAboutWidget::resizeEvent(TQResizeEvent*)
{
// ############################################################################
int _x=0, _y, cx, tempx, tempy;
@@ -1484,7 +1484,7 @@ KAboutWidget::resizeEvent(QResizeEvent*)
} else {
cont->hide();
}
- QPtrListIterator<KAboutContributor> _pos(contributors);
+ TQPtrListIterator<KAboutContributor> _pos(contributors);
KAboutContributor* currEntry;
while( (currEntry = _pos.current()) )
{
@@ -1503,8 +1503,8 @@ KAboutWidget::resizeEvent(QResizeEvent*)
// ############################################################################
}
-KAboutDialog::KAboutDialog(QWidget *_parent, const char *_name, bool modal)
- : KDialogBase(_parent, _name, modal, QString::null, Ok, Ok ),
+KAboutDialog::KAboutDialog(TQWidget *_parent, const char *_name, bool modal)
+ : KDialogBase(_parent, _name, modal, TQString::null, Ok, Ok ),
about(new KAboutWidget(this)), mContainerBase(0), d(0)
{
// #################################################################
@@ -1515,20 +1515,20 @@ KAboutDialog::KAboutDialog(QWidget *_parent, const char *_name, bool modal)
qApp->quit();
}
setMainWidget(about);
- connect(about, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(about, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
+ connect(about, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(about, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
// #################################################################
}
-KAboutDialog::KAboutDialog( int layoutType, const QString &_caption,
+KAboutDialog::KAboutDialog( int layoutType, const TQString &_caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *_parent, const char *_name, bool modal,
- bool separator, const QString &user1,
- const QString &user2, const QString &user3 )
- :KDialogBase( _parent, _name, modal, QString::null, buttonMask, defaultButton,
+ TQWidget *_parent, const char *_name, bool modal,
+ bool separator, const TQString &user1,
+ const TQString &user2, const TQString &user3 )
+ :KDialogBase( _parent, _name, modal, TQString::null, buttonMask, defaultButton,
separator, user1, user2, user3 ),
about(0), d(0)
{
@@ -1537,12 +1537,12 @@ KAboutDialog::KAboutDialog( int layoutType, const QString &_caption,
mContainerBase = new KAboutContainerBase( layoutType, this );
setMainWidget(mContainerBase);
- connect( mContainerBase, SIGNAL(urlClick(const QString &)),
- this, SLOT(openURLSlot(const QString &)));
- connect( mContainerBase, SIGNAL(mailClick(const QString &,const QString &)),
- this, SLOT(sendEmailSlot(const QString &,const QString &)));
- connect( mContainerBase, SIGNAL(mouseTrack(int, const QMouseEvent *)),
- this, SLOT(mouseTrackSlot(int, const QMouseEvent *)));
+ connect( mContainerBase, TQT_SIGNAL(urlClick(const TQString &)),
+ this, TQT_SLOT(openURLSlot(const TQString &)));
+ connect( mContainerBase, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ this, TQT_SLOT(sendEmailSlot(const TQString &,const TQString &)));
+ connect( mContainerBase, TQT_SIGNAL(mouseTrack(int, const TQMouseEvent *)),
+ this, TQT_SLOT(mouseTrackSlot(int, const TQMouseEvent *)));
}
@@ -1550,15 +1550,15 @@ void KAboutDialog::show( void )
{
adjust();
if( mContainerBase ) { mContainerBase->show(); }
- QDialog::show();
+ TQDialog::show();
}
-void KAboutDialog::show( QWidget * /*centerParent*/ )
+void KAboutDialog::show( TQWidget * /*centerParent*/ )
{
adjust();
if( mContainerBase ) { mContainerBase->show(); }
- QDialog::show();
+ TQDialog::show();
}
@@ -1571,15 +1571,15 @@ void KAboutDialog::adjust()
}
-void KAboutDialog::setLogo(const QPixmap& i)
+void KAboutDialog::setLogo(const TQPixmap& i)
{
if( !about ) { return; }
about->setLogo(i);
}
-void KAboutDialog::setMaintainer(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+void KAboutDialog::setMaintainer(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// #################################################################
if( !about ) { return; }
@@ -1587,8 +1587,8 @@ void KAboutDialog::setMaintainer(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::setAuthor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_work)
+void KAboutDialog::setAuthor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_work)
{
// #################################################################
if( !about ) { return; }
@@ -1596,8 +1596,8 @@ void KAboutDialog::setAuthor(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::addContributor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+void KAboutDialog::addContributor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// #################################################################
if( !about ) { return; }
@@ -1605,7 +1605,7 @@ void KAboutDialog::addContributor(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::setVersion(const QString &_name)
+void KAboutDialog::setVersion(const TQString &_name)
{
// #################################################################
if( !about ) { return; }
@@ -1613,10 +1613,10 @@ void KAboutDialog::setVersion(const QString &_name)
// #################################################################
}
-void KAboutDialog::sendEmailSlot(const QString& /*name*/, const QString& email)
+void KAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& email)
{
if ( kapp )
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
/*
kdDebug() << "KAboutDialog::sendEmailSlot: request to send an email to "
<< name << ", " << email << endl;
@@ -1624,7 +1624,7 @@ void KAboutDialog::sendEmailSlot(const QString& /*name*/, const QString& email)
*/
}
-void KAboutDialog::openURLSlot(const QString& url)
+void KAboutDialog::openURLSlot(const TQString& url)
{
if ( kapp )
kapp->invokeBrowser( url );
@@ -1633,20 +1633,20 @@ void KAboutDialog::openURLSlot(const QString& url)
}
-void KAboutDialog::mouseTrackSlot( int /*mode*/, const QMouseEvent * /*e*/ )
+void KAboutDialog::mouseTrackSlot( int /*mode*/, const TQMouseEvent * /*e*/ )
{
// By default we do nothing. This method must be reimplemented.
}
-QFrame *KAboutDialog::addTextPage( const QString &title, const QString &text,
+TQFrame *KAboutDialog::addTextPage( const TQString &title, const TQString &text,
bool richText, int numLines )
{
if( !mContainerBase ) { return 0; }
return mContainerBase->addTextPage( title, text, richText, numLines );
}
-QFrame *KAboutDialog::addLicensePage( const QString &title, const QString &text,
+TQFrame *KAboutDialog::addLicensePage( const TQString &title, const TQString &text,
int numLines )
{
if( !mContainerBase ) { return 0; }
@@ -1654,7 +1654,7 @@ QFrame *KAboutDialog::addLicensePage( const QString &title, const QString &text,
}
-KAboutContainer *KAboutDialog::addContainerPage( const QString &title,
+KAboutContainer *KAboutDialog::addContainerPage( const TQString &title,
int childAlignment, int innerAlignment )
{
if( !mContainerBase ) { return 0; }
@@ -1663,7 +1663,7 @@ KAboutContainer *KAboutDialog::addContainerPage( const QString &title,
}
-KAboutContainer *KAboutDialog::addScrolledContainerPage( const QString &title,
+KAboutContainer *KAboutDialog::addScrolledContainerPage( const TQString &title,
int childAlignment, int innerAlignment )
{
if( !mContainerBase ) { return 0; }
@@ -1673,7 +1673,7 @@ KAboutContainer *KAboutDialog::addScrolledContainerPage( const QString &title,
-QFrame *KAboutDialog::addPage( const QString &title )
+TQFrame *KAboutDialog::addPage( const TQString &title )
{
if( !mContainerBase ) { return 0; }
return mContainerBase->addEmptyPage( title );
@@ -1688,39 +1688,39 @@ KAboutContainer *KAboutDialog::addContainer( int childAlignment,
}
-void KAboutDialog::setTitle( const QString &title )
+void KAboutDialog::setTitle( const TQString &title )
{
if( !mContainerBase ) { return; }
mContainerBase->setTitle( title );
}
-void KAboutDialog::setImage( const QString &fileName )
+void KAboutDialog::setImage( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setImage( fileName );
}
// KDE4: remove
-void KAboutDialog::setIcon( const QString &fileName )
+void KAboutDialog::setIcon( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( fileName );
}
-void KAboutDialog::setProgramLogo( const QString &fileName )
+void KAboutDialog::setProgramLogo( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( fileName );
}
-void KAboutDialog::setProgramLogo( const QPixmap &pixmap )
+void KAboutDialog::setProgramLogo( const TQPixmap &pixmap )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( pixmap );
}
-void KAboutDialog::setImageBackgroundColor( const QColor &color )
+void KAboutDialog::setImageBackgroundColor( const TQColor &color )
{
if( !mContainerBase ) { return; }
mContainerBase->setImageBackgroundColor( color );
@@ -1734,8 +1734,8 @@ void KAboutDialog::setImageFrame( bool state )
}
-void KAboutDialog::setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year )
+void KAboutDialog::setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year )
{
if( !mContainerBase ) { return; }
mContainerBase->setProduct( appName, version, author, year );
@@ -1743,11 +1743,11 @@ void KAboutDialog::setProduct( const QString &appName, const QString &version,
-void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
- const QString &_path, const QColor &_imageColor,
- const QString &_url )
+void KAboutDialog::imageURL( TQWidget *_parent, const TQString &_caption,
+ const TQString &_path, const TQColor &_imageColor,
+ const TQString &_url )
{
- KAboutDialog a( AbtImageOnly, QString::null, Close, Close, _parent, "image", true );
+ KAboutDialog a( AbtImageOnly, TQString::null, Close, Close, _parent, "image", true );
a.setPlainCaption( _caption );
a.setImage( _path );
a.setImageBackgroundColor( _imageColor );
@@ -1755,7 +1755,7 @@ void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
KAboutContainer* const c = a.addContainer( AlignCenter, AlignCenter );
if( c )
{
- c->addPerson( QString::null, QString::null, _url, QString::null );
+ c->addPerson( TQString::null, TQString::null, _url, TQString::null );
}
a.exec();
}
@@ -1766,28 +1766,28 @@ void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
//
// A class that can can monitor mouse movements on the image
//
-KImageTrackLabel::KImageTrackLabel( QWidget *_parent, const char *_name, WFlags f )
- : QLabel( _parent, _name, f )
+KImageTrackLabel::KImageTrackLabel( TQWidget *_parent, const char *_name, WFlags f )
+ : TQLabel( _parent, _name, f )
{
setText( i18n("Image missing"));
}
-void KImageTrackLabel::mousePressEvent( QMouseEvent *e )
+void KImageTrackLabel::mousePressEvent( TQMouseEvent *e )
{
emit mouseTrack( MousePress, e );
}
-void KImageTrackLabel::mouseReleaseEvent( QMouseEvent *e )
+void KImageTrackLabel::mouseReleaseEvent( TQMouseEvent *e )
{
emit mouseTrack( MouseRelease, e );
}
-void KImageTrackLabel::mouseDoubleClickEvent( QMouseEvent *e )
+void KImageTrackLabel::mouseDoubleClickEvent( TQMouseEvent *e )
{
emit mouseTrack( MouseDoubleClick, e );
}
-void KImageTrackLabel::mouseMoveEvent ( QMouseEvent *e )
+void KImageTrackLabel::mouseMoveEvent ( TQMouseEvent *e )
{
emit mouseTrack( MouseDoubleClick, e );
}
diff --git a/kdeui/kaboutdialog.h b/kdeui/kaboutdialog.h
index 25afc0a3b..21f648eb0 100644
--- a/kdeui/kaboutdialog.h
+++ b/kdeui/kaboutdialog.h
@@ -31,7 +31,7 @@
#define _KABOUTDIALOG_H_
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
class QFrame;
class QLabel;
@@ -52,33 +52,33 @@ class KDEUI_EXPORT KAboutContainer : public QFrame
Q_OBJECT
public:
- KAboutContainer( QWidget *parent=0, const char *name=0,
+ KAboutContainer( TQWidget *parent=0, const char *name=0,
int margin=0, int spacing=0,
int childAlignment = AlignCenter,
int innerAlignment = AlignCenter );
- void addWidget( QWidget *widget );
- void addPerson( const QString &name, const QString &email,
- const QString &url, const QString &task,
+ void addWidget( TQWidget *widget );
+ void addPerson( const TQString &name, const TQString &email,
+ const TQString &url, const TQString &task,
bool showHeader = false, bool showframe = false,
bool showBold = false );
- void addTitle( const QString &title, int alignment=AlignLeft,
+ void addTitle( const TQString &title, int alignment=AlignLeft,
bool showframe = false, bool showBold = false );
- void addImage( const QString &fileName, int alignment=AlignLeft );
+ void addImage( const TQString &fileName, int alignment=AlignLeft );
- virtual QSize sizeHint( void ) const;
- virtual QSize minimumSizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
+ virtual TQSize minimumSizeHint( void ) const;
protected:
- virtual void childEvent( QChildEvent *e );
+ virtual void childEvent( TQChildEvent *e );
signals:
- void urlClick( const QString &url );
- void mailClick( const QString &name, const QString &address );
+ void urlClick( const TQString &url );
+ void mailClick( const TQString &name, const TQString &address );
private:
- QVBoxLayout *mVbox;
+ TQVBoxLayout *mVbox;
int mAlignment;
KAboutContainerPrivate* const d;
};
@@ -94,52 +94,52 @@ class KDEUI_EXPORT KAboutContributor : public QFrame
Q_OBJECT
public:
- KAboutContributor( QWidget *parent=0, const char *name=0,
- const QString &username=QString::null,
- const QString &email=QString::null,
- const QString &url=QString::null,
- const QString &work=QString::null,
+ KAboutContributor( TQWidget *parent=0, const char *name=0,
+ const TQString &username=TQString::null,
+ const TQString &email=TQString::null,
+ const TQString &url=TQString::null,
+ const TQString &work=TQString::null,
bool showHeader=false, bool showFrame=true,
bool showBold=false );
- void setName( const QString &text, const QString &header=QString::null,
+ void setName( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setEmail( const QString &text, const QString &header=QString::null,
+ void setEmail( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setURL( const QString &text, const QString &header=QString::null,
+ void setURL( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setWork( const QString &text, const QString &header=QString::null,
+ void setWork( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- QString getName( void ) const;
- QString getEmail( void ) const;
- QString getURL( void ) const;
- QString getWork( void ) const;
+ TQString getName( void ) const;
+ TQString getEmail( void ) const;
+ TQString getURL( void ) const;
+ TQString getWork( void ) const;
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
protected:
- virtual void fontChange( const QFont &oldFont );
+ virtual void fontChange( const TQFont &oldFont );
protected slots:
- void urlClickedSlot( const QString& );
- void emailClickedSlot( const QString& emailaddress );
+ void urlClickedSlot( const TQString& );
+ void emailClickedSlot( const TQString& emailaddress );
private:
void updateLayout( void );
signals:
- void sendEmail(const QString& name, const QString& email);
- void openURL(const QString& url);
+ void sendEmail(const TQString& name, const TQString& email);
+ void openURL(const TQString& url);
private:
- QLabel *mLabel[4];
- QLabel *mText[4];
+ TQLabel *mLabel[4];
+ TQLabel *mText[4];
bool mShowHeader;
bool mShowBold;
KAboutContributorPrivate* const d;
- virtual void setName(const char *_name) { QFrame::setName(_name); }
+ virtual void setName(const char *_name) { TQFrame::setName(_name); }
};
/**
@@ -156,7 +156,7 @@ public:
/**
* The Qt constructor.
*/
- KAboutWidget(QWidget* parent=0, const char* name=0 );
+ KAboutWidget(TQWidget* parent=0, const char* name=0 );
/**
* Adjust the minimum size (after setting the properties of the image and
@@ -167,65 +167,65 @@ public:
/**
* Sets the image as the application logo.
*/
- void setLogo(const QPixmap&);
+ void setLogo(const TQPixmap&);
/**
* Sets the author's name and email address.
*/
- void setAuthor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setAuthor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Sets the maintainers name and email address.
*/
- void setMaintainer(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setMaintainer(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Shows this person as one of the major contributors.
*/
- void addContributor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void addContributor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Sets the text describing the version.
*/
- void setVersion(const QString& name);
+ void setVersion(const TQString& name);
// -------------------------------------------------------------------------
protected slots:
/**
* Catches the signals from the contributors elements.
*/
- void sendEmailSlot(const QString& name, const QString& email);
+ void sendEmailSlot(const TQString& name, const TQString& email);
/**
* Catches the clicked URLs.
*/
- void openURLSlot(const QString& url);
+ void openURLSlot(const TQString& url);
// -------------------------------------------------------------------------
signals:
/**
* An email address has been selected by the user.
*/
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/**
* An URL has been clicked.
*/
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// -------------------------------------------------------------------------
protected:
// events:
/**
* The resize event.
*/
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
/**
* The label showing the program version.
*/
- QLabel *version;
+ TQLabel *version;
/**
* The label showing the text "Other contributors:".
*/
- QLabel *cont;
+ TQLabel *cont;
/**
* The frame showing the logo.
*/
- QLabel *logo;
+ TQLabel *logo;
/**
* The application developer.
*/
@@ -241,7 +241,7 @@ protected:
/**
* A set of people who contributed to the application.
*/
- QPtrList<KAboutContributor> contributors;
+ TQPtrList<KAboutContributor> contributors;
// #########################################################################
//
private:
@@ -311,7 +311,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* addContributor(), or setVersion().
* The dialog will be laid out automatically.
*/
- KAboutDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
/**
* The extended constructor. (Constructor II).
@@ -338,12 +338,12 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param user3 User button3 text.
*
*/
- KAboutDialog( int dialogLayout, const QString &caption, int buttonMask,
- ButtonCode defaultButton, QWidget *parent=0,
+ KAboutDialog( int dialogLayout, const TQString &caption, int buttonMask,
+ ButtonCode defaultButton, TQWidget *parent=0,
const char *name=0, bool modal=false, bool separator = false,
- const QString &user1 = QString::null,
- const QString &user2 = QString::null,
- const QString &user3 = QString::null );
+ const TQString &user1 = TQString::null,
+ const TQString &user2 = TQString::null,
+ const TQString &user3 = TQString::null );
/**
* Adjusts the dialog.
@@ -371,7 +371,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param centerParent Center the dialog with respect to this widget.
*/
- virtual void show( QWidget *centerParent );
+ virtual void show( TQWidget *centerParent );
/**
* (Constructor II only)
@@ -379,7 +379,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param title Title string.
*/
- void setTitle( const QString &title );
+ void setTitle( const TQString &title );
/**
* (Constructor II only)
@@ -388,7 +388,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param fileName Path to image file.
*/
- void setImage( const QString &fileName );
+ void setImage( const TQString &fileName );
/**
* (Constructor II only)
@@ -398,18 +398,18 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* appletproxy logo with your own pixmap.
*
* @param fileName Path to file containing logo data in a format that
- * can be loaded by QPixmap.
+ * can be loaded by TQPixmap.
*
* @since 3.3
*/
- void setIcon( const QString &fileName ) KDE_DEPRECATED; // KDE4: remove
+ void setIcon( const TQString &fileName ) KDE_DEPRECATED; // KDE4: remove
/**
- * Overloaded version of setProgramLogo(const QPixmap& pixmap).
+ * Overloaded version of setProgramLogo(const TQPixmap& pixmap).
*
* @since 3.4
*/
- void setProgramLogo( const QString &fileName );
+ void setProgramLogo( const TQString &fileName );
/**
* (Constructor II only)
@@ -422,7 +422,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @since 3.4
*/
- void setProgramLogo( const QPixmap &pixmap );
+ void setProgramLogo( const TQPixmap &pixmap );
/**
* (Constructor II only)
@@ -432,7 +432,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param color Background color.
*/
- void setImageBackgroundColor( const QColor &color );
+ void setImageBackgroundColor( const TQColor &color );
/**
* (Constructor II only)
@@ -454,8 +454,8 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param author One or more authors.
* @param year A string telling when the application was made.
*/
- void setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year );
+ void setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year );
/**
* (Constructor II only)
@@ -469,7 +469,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* is the minimum number of lines of text that are visible.
* @return The frame that contains the page.
*/
- QFrame *addTextPage( const QString &title, const QString &text,
+ TQFrame *addTextPage( const TQString &title, const TQString &text,
bool richText=false, int numLines=10 );
/**
@@ -482,7 +482,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* is the minimum number of lines of text that are visible.
* @return The frame that contains the page.
*/
- QFrame *addLicensePage( const QString &title, const QString &text,
+ TQFrame *addLicensePage( const TQString &title, const TQString &text,
int numLines=10 );
/**
@@ -497,12 +497,12 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* respect to each other.
* @return The new container.
*/
- KAboutContainer *addContainerPage( const QString &title,
+ KAboutContainer *addContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
/**
* (Constructor II only)
- * Adds a container inside a QScrollView to a tab box. You can add text
+ * Adds a container inside a TQScrollView to a tab box. You can add text
* and images to a container.
*
* @param title Tab name.
@@ -512,7 +512,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* respect to each other.
* @return The new container.
*/
- KAboutContainer *addScrolledContainerPage( const QString &title,
+ KAboutContainer *addScrolledContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
/**
@@ -534,49 +534,49 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param title Tab name
* @return The new page.
*/
- QFrame *addPage( const QString &title );
+ TQFrame *addPage( const TQString &title );
/**
* (Constructor I only)
* Sets the image as the application logo.
*/
- void setLogo(const QPixmap&);
+ void setLogo(const TQPixmap&);
/**
* (Constructor I only)
* Sets the author's name and email address.
*/
- void setAuthor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setAuthor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Sets the maintainer's name and email address.
*/
- void setMaintainer(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setMaintainer(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Show this person as one of the major contributors.
*/
- void addContributor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void addContributor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Sets the text describing the version.
*/
- void setVersion(const QString& name);
+ void setVersion(const TQString& name);
/**
* Create a modal dialog with an image in the upper area with a
* URL link below.
*/
- static void imageURL( QWidget *parent, const QString &caption,
- const QString &path, const QColor &imageColor,
- const QString &url );
+ static void imageURL( TQWidget *parent, const TQString &caption,
+ const TQString &path, const TQColor &imageColor,
+ const TQString &url );
signals:
/**
@@ -585,12 +585,12 @@ signals:
* The application must provide the
* functionality.
*/
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/**
* Open the selected URL.
*/
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// ----------------------------------------------------------------------------
protected:
/**
@@ -609,19 +609,19 @@ protected slots:
/**
* Connected to widget->sendEmail.
*/
- void sendEmailSlot(const QString& name, const QString& email);
+ void sendEmailSlot(const TQString& name, const TQString& email);
/**
* Open this URL.
*/
- void openURLSlot(const QString& url);
+ void openURLSlot(const TQString& url);
/**
* (Constructor II only)
* Tells the position of the mouse cursor when the left mouse button
* is pressed above an image
*/
- virtual void mouseTrackSlot( int mode, const QMouseEvent *e );
+ virtual void mouseTrackSlot( int mode, const TQMouseEvent *e );
// #########################################################################
protected:
diff --git a/kdeui/kaboutdialog_private.h b/kdeui/kaboutdialog_private.h
index 9546937af..c13881864 100644
--- a/kdeui/kaboutdialog_private.h
+++ b/kdeui/kaboutdialog_private.h
@@ -23,7 +23,7 @@
#ifndef _KABOUTDIALOG_PRIVATE_H_
#define _KABOUTDIALOG_PRIVATE_H_
-#include <qlabel.h>
+#include <tqlabel.h>
class QFrame;
class QTabWidget;
class QVBoxLayout;
@@ -46,16 +46,16 @@ class KImageTrackLabel : public QLabel
};
public:
- KImageTrackLabel( QWidget * parent, const char * name=0, WFlags f=0 );
+ KImageTrackLabel( TQWidget * parent, const char * name=0, WFlags f=0 );
signals:
- void mouseTrack( int mode, const QMouseEvent *e );
+ void mouseTrack( int mode, const TQMouseEvent *e );
protected:
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mouseMoveEvent ( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent ( TQMouseEvent *e );
};
class KAboutContainer;
@@ -86,55 +86,55 @@ class KAboutContainerBase : public QWidget
};
public:
- KAboutContainerBase( int layoutType, QWidget *parent = 0, char *name = 0 );
+ KAboutContainerBase( int layoutType, TQWidget *parent = 0, char *name = 0 );
virtual void show( void );
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
- void setTitle( const QString &title );
- void setImage( const QString &fileName );
- void setImageBackgroundColor( const QColor &color );
+ void setTitle( const TQString &title );
+ void setImage( const TQString &fileName );
+ void setImageBackgroundColor( const TQColor &color );
void setImageFrame( bool state );
- void setProgramLogo( const QString &fileName );
- void setProgramLogo( const QPixmap &pixmap );
- void setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year );
+ void setProgramLogo( const TQString &fileName );
+ void setProgramLogo( const TQPixmap &pixmap );
+ void setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year );
- QFrame *addTextPage( const QString &title, const QString &text,
+ TQFrame *addTextPage( const TQString &title, const TQString &text,
bool richText=false, int numLines=10 );
- QFrame *addLicensePage( const QString &title, const QString &text,
+ TQFrame *addLicensePage( const TQString &title, const TQString &text,
int numLines=10 );
- KAboutContainer *addContainerPage( const QString &title,
+ KAboutContainer *addContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
- KAboutContainer *addScrolledContainerPage( const QString &title,
+ KAboutContainer *addScrolledContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
- QFrame *addEmptyPage( const QString &title );
+ TQFrame *addEmptyPage( const TQString &title );
KAboutContainer *addContainer( int childAlignment, int innerAlignment );
public slots:
- virtual void slotMouseTrack( int mode, const QMouseEvent *e );
- virtual void slotUrlClick( const QString &url );
- virtual void slotMailClick( const QString &name, const QString &address );
+ virtual void slotMouseTrack( int mode, const TQMouseEvent *e );
+ virtual void slotUrlClick( const TQString &url );
+ virtual void slotMailClick( const TQString &name, const TQString &address );
protected:
- virtual void fontChange( const QFont &oldFont );
+ virtual void fontChange( const TQFont &oldFont );
signals:
- void mouseTrack( int mode, const QMouseEvent *e );
- void urlClick( const QString &url );
- void mailClick( const QString &name, const QString &address );
+ void mouseTrack( int mode, const TQMouseEvent *e );
+ void urlClick( const TQString &url );
+ void mailClick( const TQString &name, const TQString &address );
private:
- QVBoxLayout *mTopLayout;
+ TQVBoxLayout *mTopLayout;
KImageTrackLabel *mImageLabel;
- QLabel *mTitleLabel;
- QLabel *mIconLabel;
- QLabel *mVersionLabel;
- QLabel *mAuthorLabel;
- QFrame *mImageFrame;
- QTabWidget *mPageTab;
- QFrame *mPlainSpace;
+ TQLabel *mTitleLabel;
+ TQLabel *mIconLabel;
+ TQLabel *mVersionLabel;
+ TQLabel *mAuthorLabel;
+ TQFrame *mImageFrame;
+ TQTabWidget *mPageTab;
+ TQFrame *mPlainSpace;
KAboutContainerBasePrivate* const d;
};
diff --git a/kdeui/kaboutkde.cpp b/kdeui/kaboutkde.cpp
index ba4e84fad..1d05e289c 100644
--- a/kdeui/kaboutkde.cpp
+++ b/kdeui/kaboutkde.cpp
@@ -26,12 +26,12 @@
#include <kstandarddirs.h>
-KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
- :KAboutDialog( KAboutDialog::AbtKDEStandard, QString::fromLatin1("KDE"),
+KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal )
+ :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::fromLatin1("KDE"),
KDialogBase::Help|KDialogBase::Close, KDialogBase::Close,
parent, name, modal )
{
- const QString text1 = i18n(""
+ const TQString text1 = i18n(""
"The <b>Trinity Desktop Environment</b> is a fork of the "
"K Desktop Environment version 3.5, which was originally written by the KDE Team, "
"a world-wide network of software engineers committed to <a "
@@ -42,7 +42,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"about Trinity, and <A HREF=\"http://www.kde.org/\">http://www.kde.org</A> "
"for more information on the KDE project. ");
- const QString text2 = i18n(""
+ const TQString text2 = i18n(""
"Software can always be improved, and the Trinity Team is ready to "
"do so. However, you - the user - must tell us when "
"something does not work as expected or could be done better.<br><br>"
@@ -53,7 +53,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"the bug tracking system to register your wish. Make sure you use the "
"severity called \"Wishlist\"." );
- const QString text3 = i18n(""
+ const TQString text3 = i18n(""
"You do not have to be a software developer to be a member of the "
"Trinity team. You can join the national teams that translate "
"program interfaces. You can provide graphics, themes, sounds, and "
@@ -66,7 +66,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"If you need more information or documentation, then a visit to "
"<A HREF=\"http://trinity.pearsoncomputing.net/docs/\">http://trinity.pearsoncomputing.net/docs/</A> "
"will provide you with what you need.");
- const QString text4 = i18n(""
+ const TQString text4 = i18n(""
"Trinity is available free of charge, but making it is not free.<br><br>"
"<br><br>"
"The Trinity team does need financial support. Most of the money is used to "
@@ -75,13 +75,13 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"donation, using one of the ways described at "
"<a href=\"http://trinity.pearsoncomputing.net/support/\">http://trinity.pearsoncomputing.net/support/</a>."
"<br><br>Thank you very much in advance for your support!");
- setHelp( QString::fromLatin1("khelpcenter/main.html"), QString::null );
+ setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null );
setTitle(i18n("Trinity Desktop Environment. Release %1").
- arg(QString::fromLatin1(KDE_VERSION_STRING)) );
+ arg(TQString::fromLatin1(KDE_VERSION_STRING)) );
addTextPage( i18n("About Trinity","&About"), text1, true );
addTextPage( i18n("&Report Bugs or Wishes"), text2, true );
addTextPage( i18n("&Join the Trinity Team"), text3, true );
addTextPage( i18n("&Support Trinity"), text4, true );
- setImage( locate( "data", QString::fromLatin1("kdeui/pics/aboutkde.png")) );
+ setImage( locate( "data", TQString::fromLatin1("kdeui/pics/aboutkde.png")) );
setImageBackgroundColor( white );
}
diff --git a/kdeui/kaboutkde.h b/kdeui/kaboutkde.h
index 357dc339a..07e325dd8 100644
--- a/kdeui/kaboutkde.h
+++ b/kdeui/kaboutkde.h
@@ -50,10 +50,10 @@ class KDEUI_EXPORT KAboutKDE : public KAboutDialog
* @param name Internal name of the widget. This name in not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec()
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec()
*/
- KAboutKDE( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutKDE( TQWidget *parent=0, const char *name=0, bool modal=true );
};
diff --git a/kdeui/kaccelgen.h b/kdeui/kaccelgen.h
index 2d5d69549..8f0c50bed 100644
--- a/kdeui/kaccelgen.h
+++ b/kdeui/kaccelgen.h
@@ -20,9 +20,9 @@
#ifndef KACCELGEN_H
#define KACCELGEN_H
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -39,7 +39,7 @@
* In the Qt library, the mechanism for adding a keyboard accelerator
* to a menu item is to insert an '&' before the letter. Since we
* usually don't want to disturb the original collection, the idiom in
- * these functions is to populate a "target" QStringList parameter
+ * these functions is to populate a "target" TQStringList parameter
* with the input collectin's QStrings, plus possibly some added '&'
* characters.
*
@@ -89,7 +89,7 @@ template <class Iter>
class Deref
{
public:
- static QString deref(Iter i) { return *i; }
+ static TQString deref(Iter i) { return *i; }
};
/**
@@ -100,7 +100,7 @@ template <class Iter>
class Deref_Key
{
public:
- static QString deref(Iter i) { return i.key(); }
+ static TQString deref(Iter i) { return i.key(); }
};
/**
@@ -111,7 +111,7 @@ public:
* @param index offset to check
*/
inline bool
-isLegalAccelerator(const QString& str, uint index)
+isLegalAccelerator(const TQString& str, uint index)
{
return index < str.length()
&& str[index].isLetterOrNumber();
@@ -119,7 +119,7 @@ isLegalAccelerator(const QString& str, uint index)
/**
* Loads all legal predefined accelerators in the (implicitly
- * specified) collection into the given QMap.
+ * specified) collection into the given TQMap.
*
* @param begin start iterator
* @param end (last+1) iterator
@@ -127,11 +127,11 @@ isLegalAccelerator(const QString& str, uint index)
*/
template <class Iter, class Deref>
inline void
-loadPredefined(Iter begin, Iter end, QMap<QChar,bool>& keys)
+loadPredefined(Iter begin, Iter end, TQMap<TQChar,bool>& keys)
{
for (Iter i = begin; i != end; ++i) {
- QString item = Deref::deref(i);
- int user_ampersand = item.find(QChar('&'));
+ TQString item = Deref::deref(i);
+ int user_ampersand = item.find(TQChar('&'));
if( user_ampersand >= 0 ) {
// Sanity check. Note that we don't try to find an
// accelerator if the user shoots him/herself in the foot
@@ -164,21 +164,21 @@ loadPredefined(Iter begin, Iter end, QMap<QChar,bool>& keys)
*/
template <class Iter, class Iter_Deref >
void
-generate(Iter begin, Iter end, QStringList& target)
+generate(Iter begin, Iter end, TQStringList& target)
{
// Will keep track of used accelerator chars
- QMap<QChar,bool> used_accels;
+ TQMap<TQChar,bool> used_accels;
// Prepass to detect manually user-coded accelerators
loadPredefined<Iter,Iter_Deref>(begin, end, used_accels);
// Main pass
for (Iter i = begin; i != end; ++i) {
- QString item = Iter_Deref::deref(i);
+ TQString item = Iter_Deref::deref(i);
// Attempt to find a good accelerator, but only if the user
// has not manually hardcoded one.
- int user_ampersand = item.find(QChar('&'));
+ int user_ampersand = item.find(TQChar('&'));
if( user_ampersand < 0 || item[user_ampersand+1] == '&') {
bool found = false;
uint found_idx;
@@ -211,7 +211,7 @@ generate(Iter begin, Iter end, QStringList& target)
// Both upper and lower case marked as used
used_accels.insert(item[j].upper(),true);
used_accels.insert(item[j].lower(),true);
- item.insert(j,QChar('&'));
+ item.insert(j,TQChar('&'));
}
}
@@ -229,7 +229,7 @@ generate(Iter begin, Iter end, QStringList& target)
*/
template <class Iter>
inline void
-generateFromKeys(Iter begin, Iter end, QStringList& target)
+generateFromKeys(Iter begin, Iter end, TQStringList& target)
{
generate< Iter, Deref_Key<Iter> >(begin, end, target);
}
@@ -237,38 +237,38 @@ generateFromKeys(Iter begin, Iter end, QStringList& target)
/**
* Convenience function; generates accelerators for all the items in
- * a QStringList.
+ * a TQStringList.
*
* @param source Strings for which to generate accelerators
* @param target Output for accelerator-added strings */
inline void
-generate(const QStringList& source, QStringList& target)
+generate(const TQStringList& source, TQStringList& target)
{
- generate<QStringList::ConstIterator, Deref<QStringList::ConstIterator> >(source.begin(), source.end(), target);
+ generate<TQStringList::ConstIterator, Deref<TQStringList::ConstIterator> >(source.begin(), source.end(), target);
}
/**
* Convenience function; generates accelerators for all the values in
- * a QMap<T,QString>.
+ * a TQMap<T,TQString>.
*
* @param source Map with input strings as VALUES.
* @param target Output for accelerator-added strings */
template <class Key>
inline void
-generateFromValues(const QMap<Key,QString>& source, QStringList& target)
+generateFromValues(const TQMap<Key,TQString>& source, TQStringList& target)
{
- generate<QMapConstIterator<Key,QString>, Deref_Key<QMapConstIterator<Key,QString> > >(source.begin(), source.end(), target);
+ generate<TQMapConstIterator<Key,TQString>, Deref_Key<TQMapConstIterator<Key,TQString> > >(source.begin(), source.end(), target);
}
/**
* Convenience function; generates an accelerator mapping from all the
- * keys in a QMap<QString,T>
+ * keys in a TQMap<TQString,T>
*
* @param source Map with input strings as KEYS.
* @param target Output for accelerator-added strings */
template <class Data>
inline void
-generateFromKeys(const QMap<QString,Data>& source, QStringList& target)
+generateFromKeys(const TQMap<TQString,Data>& source, TQStringList& target)
{
generateFromKeys(source.begin(), source.end(), target);
}
diff --git a/kdeui/kaction.cpp b/kdeui/kaction.cpp
index 2740763d9..ffc957658 100644
--- a/kdeui/kaction.cpp
+++ b/kdeui/kaction.cpp
@@ -27,8 +27,8 @@
#include <assert.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kaccel.h>
#include <kaccelbase.h>
@@ -50,7 +50,7 @@
*
* Focus Widget pointer:
* This is the widget which is the focus for action shortcuts.
-* It is set either by passing a QWidget* to the KActionCollection constructor
+* It is set either by passing a TQWidget* to the KActionCollection constructor
* or by calling setWidget() if the widget wasn't known when the object was
* initially constructed (as in KXMLGUIClient and KParts::PartBase)
*
@@ -83,10 +83,10 @@ public:
}
KAccel *m_kaccel;
- QValueList<KAccel*> m_kaccelList;
+ TQValueList<KAccel*> m_kaccelList;
- QString m_groupText;
- QString m_group;
+ TQString m_groupText;
+ TQString m_group;
KShortcut m_cut;
KShortcut m_cutDefault;
@@ -98,48 +98,48 @@ public:
Container() { m_container = 0; m_representative = 0; m_id = 0; }
Container( const Container& s ) { m_container = s.m_container;
m_id = s.m_id; m_representative = s.m_representative; }
- QWidget* m_container;
+ TQWidget* m_container;
int m_id;
- QWidget* m_representative;
+ TQWidget* m_representative;
};
- QValueList<Container> m_containers;
+ TQValueList<Container> m_containers;
};
//---------------------------------------------------------------------
// KAction
//---------------------------------------------------------------------
-KAction::KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
}
-KAction::KAction( const QString& text, const QString& sIconName, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const TQString& sIconName, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconName( sIconName );
}
-KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconSet( pix );
}
KAction::KAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( item.text(), cut, receiver, slot );
if( item.hasIcon() )
@@ -149,63 +149,63 @@ KAction::KAction( const KGuiItem& item, const KShortcut& cut,
}
#ifndef KDE_NO_COMPAT // KDE 4: remove
-KAction::KAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
}
-KAction::KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
setIconSet( pix );
}
-KAction::KAction( const QString& text, const QString& pix,
+KAction::KAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+ TQObject* parent, const char* name )
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
d->setIconName( pix );
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
setIconSet( pix );
}
-KAction::KAction( const QString& text, const QString& pix,
+KAction::KAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconName(pix);
}
-KAction::KAction( QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
- initPrivate( QString::null, KShortcut(), 0, 0 );
+ initPrivate( TQString::null, KShortcut(), 0, 0 );
}
#endif // KDE 4: remove end
@@ -221,9 +221,9 @@ KAction::~KAction()
if ( m_parentCollection ) {
m_parentCollection->take( this );
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
for (; itr != itrEnd; ++itr )
@@ -241,8 +241,8 @@ KAction::~KAction()
delete d;
}
-void KAction::initPrivate( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot )
+void KAction::initPrivate( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot )
{
d->m_cutDefault = cut;
@@ -252,7 +252,7 @@ void KAction::initPrivate( const QString& text, const KShortcut& cut,
m_parentCollection->insert( this );
if ( receiver && slot )
- connect( this, SIGNAL( activated() ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated() ), receiver, slot );
if( !cut.isNull() && !qstrcmp( name(), "unnamed" ) )
kdWarning(129) << "KAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl;
@@ -265,18 +265,18 @@ bool KAction::isPlugged() const
return (!d->m_containers.empty()) || d->m_kaccel;
}
-bool KAction::isPlugged( const QWidget *container ) const
+bool KAction::isPlugged( const TQWidget *container ) const
{
return findContainer( container ) > -1;
}
-bool KAction::isPlugged( const QWidget *container, int id ) const
+bool KAction::isPlugged( const TQWidget *container, int id ) const
{
int i = findContainer( container );
return ( i > -1 && itemId( i ) == id );
}
-bool KAction::isPlugged( const QWidget *container, const QWidget *_representative ) const
+bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const
{
int i = findContainer( container );
return ( i > -1 && representative( i ) == _representative );
@@ -388,9 +388,9 @@ void KAction::plugShortcut()
//kdDebug(129) << "KAction::plugShortcut(): this = " << this << " kaccel() = " << (m_parentCollection ? m_parentCollection->kaccel() : 0) << endl;
if( kaccel && qstrcmp( name(), "unnamed" ) ) {
// Check if already plugged into current KAccel object
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
for( ; itr != itrEnd; ++itr) {
if( (*itr) == kaccel )
@@ -410,9 +410,9 @@ bool KAction::setShortcut( const KShortcut& cut )
bool bInsertRequired = true;
// Apply new shortcut to all existing KAccel objects
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
for( ; itr != itrEnd; ++itr) {
// Check whether shortcut has already been plugged into
@@ -450,9 +450,9 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel )
if ( !kaccel->actions().actionPtr( name() ) ) {
if(!d->m_cut.isNull() ) {
kdDebug(129) << "Inserting " << name() << ", " << d->text() << ", " << d->plainText() << endl;
- b = kaccel->insert( name(), d->plainText(), QString::null,
+ b = kaccel->insert( name(), d->plainText(), TQString::null,
d->m_cut,
- this, SLOT(slotActivated()),
+ this, TQT_SLOT(slotActivated()),
isShortcutConfigurable(), isEnabled() );
}
}
@@ -468,7 +468,7 @@ void KAction::insertKAccel( KAccel* kaccel )
if ( !kaccel->actions().actionPtr( name() ) ) {
if( updateKAccelShortcut( kaccel ) ) {
d->m_kaccelList.append( kaccel );
- connect( kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ connect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
}
}
else
@@ -478,15 +478,15 @@ void KAction::insertKAccel( KAccel* kaccel )
void KAction::removeKAccel( KAccel* kaccel )
{
//kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl;
- QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::iterator itr = accelList.begin();
- const QValueList<KAccel*>::iterator itrEnd = accelList.end();
+ TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::iterator itr = accelList.begin();
+ const TQValueList<KAccel*>::iterator itrEnd = accelList.end();
for( ; itr != itrEnd; ++itr) {
if( (*itr) == kaccel ) {
kaccel->remove( name() );
accelList.remove( itr );
- disconnect( kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ disconnect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
break;
}
}
@@ -504,22 +504,22 @@ void KAction::updateShortcut( int i )
{
int id = itemId( i );
- QWidget* w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
- QPopupMenu* menu = static_cast<QPopupMenu*>(w);
+ TQWidget* w = container( i );
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>(w);
updateShortcut( menu, id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
}
-void KAction::updateShortcut( QPopupMenu* menu, int id )
+void KAction::updateShortcut( TQPopupMenu* menu, int id )
{
//kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl;
// If the action has a KAccel object,
// show the string representation of its shortcut.
if ( d->m_kaccel || d->m_kaccelList.count() ) {
- QString s = menu->text( id );
+ TQString s = menu->text( id );
int i = s.find( '\t' );
if ( i >= 0 )
s.replace( i+1, s.length()-i, d->m_cut.seq(0).toString() );
@@ -547,12 +547,12 @@ const KShortcut& KAction::shortcutDefault() const
return d->m_cutDefault;
}
-QString KAction::shortcutText() const
+TQString KAction::shortcutText() const
{
return d->m_cut.toStringInternal();
}
-void KAction::setShortcutText( const QString& s )
+void KAction::setShortcutText( const TQString& s )
{
setShortcut( KShortcut(s) );
}
@@ -564,7 +564,7 @@ int KAction::accel() const
}
#endif
-void KAction::setGroup( const QString& grp )
+void KAction::setGroup( const TQString& grp )
{
d->m_group = grp;
@@ -578,7 +578,7 @@ void KAction::updateGroup( int )
// DO SOMETHING
}
-QString KAction::group() const
+TQString KAction::group() const
{
return d->m_group;
}
@@ -593,7 +593,7 @@ bool KAction::isShortcutConfigurable() const
return d->m_configurable;
}
-void KAction::setToolTip( const QString& tt )
+void KAction::setToolTip( const TQString& tt )
{
d->setToolTip( tt );
@@ -604,18 +604,18 @@ void KAction::setToolTip( const QString& tt )
void KAction::updateToolTip( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
if ( ::qt_cast<KToolBar *>( w ) )
- QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
+ TQToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
}
-QString KAction::toolTip() const
+TQString KAction::toolTip() const
{
return d->toolTip();
}
-int KAction::plug( QWidget *w, int index )
+int KAction::plug( TQWidget *w, int index )
{
//kdDebug(129) << "KAction::plug( " << w << ", " << index << " )" << endl;
if (!w ) {
@@ -624,7 +624,7 @@ int KAction::plug( QWidget *w, int index )
}
// Ellis: print warning if there is a shortcut, but no KAccel available (often due to no widget available in the actioncollection)
- // David: Well, it doesn't matter much, things still work (e.g. Undo in koffice) via QAccel.
+ // David: Well, it doesn't matter much, things still work (e.g. Undo in koffice) via TQAccel.
// We should probably re-enable the warning for things that only KAccel can do, though - e.g. WIN key (mapped to Meta).
#if 0 //ndef NDEBUG
KAccel* kaccel = kaccelCurrent();
@@ -639,9 +639,9 @@ int KAction::plug( QWidget *w, int index )
plugShortcut();
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( w );
int id;
// Don't insert shortcut into menu if it's already in a KAccel object.
int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt();
@@ -654,12 +654,12 @@ int KAction::plug( QWidget *w, int index )
else
instance = KGlobal::instance();
id = menu->insertItem( d->iconSet( KIcon::Small, 0, instance ), d->text(), this,//dsweet
- SLOT( slotPopupActivated() ), keyQt,
+ TQT_SLOT( slotPopupActivated() ), keyQt,
-1, index );
}
else
id = menu->insertItem( d->text(), this,
- SLOT( slotPopupActivated() ),
+ TQT_SLOT( slotPopupActivated() ),
keyQt, -1, index );
// If the shortcut is already in a KAccel object, then
@@ -676,7 +676,7 @@ int KAction::plug( QWidget *w, int index )
menu->setWhatsThis( id, whatsThisWithIcon() );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( menu, this );
@@ -694,34 +694,34 @@ int KAction::plug( QWidget *w, int index )
else
instance = KGlobal::instance();
- if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using QIconSet directly
+ if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using TQIconSet directly
{
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
d->isEnabled(), d->plainText(), index );
}
else
{
- QString icon = d->iconName();
+ TQString icon = d->iconName();
if ( icon.isEmpty() )
icon = "unknown";
- bar->insertButton( icon, id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( icon, id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
d->isEnabled(), d->plainText(), index, instance );
}
KToolBarButton* ktb = bar->getButton(id_);
- ktb->setName( QCString("toolbutton_")+name() );
+ ktb->setName( TQCString("toolbutton_")+name() );
if ( !d->whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
if ( !d->toolTip().isEmpty() )
- QToolTip::add( bar->getButton(id_), d->toolTip() );
+ TQToolTip::add( bar->getButton(id_), d->toolTip() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( bar, this );
@@ -732,16 +732,16 @@ int KAction::plug( QWidget *w, int index )
return -1;
}
-void KAction::unplug( QWidget *w )
+void KAction::unplug( TQWidget *w )
{
int i = findContainer( w );
if ( i == -1 )
return;
int id = itemId( i );
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
- QPopupMenu *menu = static_cast<QPopupMenu *>( w );
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>( w );
menu->removeItem( id );
}
else if ( ::qt_cast<KToolBar *>( w ) )
@@ -749,9 +749,9 @@ void KAction::unplug( QWidget *w )
KToolBar *bar = static_cast<KToolBar *>( w );
bar->removeItemDelayed( id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( w );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( w );
bar->removeItem( id );
}
@@ -777,12 +777,12 @@ void KAction::plugAccel(KAccel *kacc, bool configurable)
if ( !kacc->actions().actionPtr(name()) )
{
d->m_kaccel = kacc;
- d->m_kaccel->insert(name(), d->plainText(), QString::null,
+ d->m_kaccel->insert(name(), d->plainText(), TQString::null,
KShortcut(d->m_cut),
- this, SLOT(slotActivated()),
+ this, TQT_SLOT(slotActivated()),
configurable, isEnabled());
- connect(d->m_kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()));
- //connect(d->m_kaccel, SIGNAL(keycodeChanged()), this, SLOT(slotKeycodeChanged()));
+ connect(d->m_kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()));
+ //connect(d->m_kaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged()));
}
else
kdWarning(129) << "KAction::plugAccel( kacc = " << kacc << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis
@@ -798,11 +798,11 @@ void KAction::unplugAccel()
}
}
-void KAction::plugMainWindowAccel( QWidget *w )
+void KAction::plugMainWindowAccel( TQWidget *w )
{
// Note: topLevelWidget() stops too early, we can't use it.
- QWidget * tl = w;
- QWidget * n;
+ TQWidget * tl = w;
+ TQWidget * n;
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n;
@@ -825,9 +825,9 @@ void KAction::setEnabled(bool enable)
d->m_kaccel->setEnabled(name(), enable);
#endif // KDE 4: remove end
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
@@ -845,12 +845,12 @@ void KAction::setEnabled(bool enable)
void KAction::updateEnabled( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) )
- static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
+ static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( ::qt_cast<KToolBar *>( w ) )
static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
}
@@ -860,7 +860,7 @@ void KAction::setShortcutConfigurable( bool b )
d->m_configurable = b;
}
-void KAction::setText( const QString& text )
+void KAction::setText( const TQString& text )
{
#ifndef KDE_NO_COMPAT
// KDE 4: remove
@@ -870,9 +870,9 @@ void KAction::setText( const QString& text )
pAction->setLabel( text );
}
#endif // KDE 4: remove end
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
@@ -891,35 +891,35 @@ void KAction::setText( const QString& text )
void KAction::updateText( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
int id = itemId( i );
- static_cast<QPopupMenu*>(w)->changeItem( id, d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( id, d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), id );
+ updateShortcut( static_cast<TQPopupMenu*>(w), id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) );
+ TQWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) );
if ( ::qt_cast<KToolBarButton *>( button ) )
static_cast<KToolBarButton *>(button)->setText( d->plainText() );
}
}
-QString KAction::text() const
+TQString KAction::text() const
{
return d->text();
}
-QString KAction::plainText() const
+TQString KAction::plainText() const
{
return d->plainText( );
}
-void KAction::setIcon( const QString &icon )
+void KAction::setIcon( const TQString &icon )
{
d->setIconName( icon );
@@ -931,26 +931,26 @@ void KAction::setIcon( const QString &icon )
void KAction::updateIcon( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
}
-QString KAction::icon() const
+TQString KAction::icon() const
{
return d->iconName( );
}
-void KAction::setIconSet( const QIconSet &iconset )
+void KAction::setIconSet( const TQIconSet &iconset )
{
d->setIconSet( iconset );
@@ -962,17 +962,17 @@ void KAction::setIconSet( const QIconSet &iconset )
void KAction::updateIconSet( int id )
{
- QWidget *w = container( id );
+ TQWidget *w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
{
if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better )
@@ -982,7 +982,7 @@ void KAction::updateIconSet( int id )
}
}
-QIconSet KAction::iconSet( KIcon::Group group, int size ) const
+TQIconSet KAction::iconSet( KIcon::Group group, int size ) const
{
return d->iconSet( group, size );
}
@@ -992,7 +992,7 @@ bool KAction::hasIcon() const
return d->hasIcon();
}
-void KAction::setWhatsThis( const QString& text )
+void KAction::setWhatsThis( const TQString& text )
{
d->setWhatsThis( text );
@@ -1003,7 +1003,7 @@ void KAction::setWhatsThis( const QString& text )
void KAction::updateWhatsThis( int i )
{
- QPopupMenu* pm = popupMenu( i );
+ TQPopupMenu* pm = popupMenu( i );
if ( pm )
{
pm->setWhatsThis( itemId( i ), d->whatsThis() );
@@ -1013,27 +1013,27 @@ void KAction::updateWhatsThis( int i )
KToolBar *tb = toolBar( i );
if ( tb )
{
- QWidget *w = tb->getButton( itemId( i ) );
- QWhatsThis::remove( w );
- QWhatsThis::add( w, d->whatsThis() );
+ TQWidget *w = tb->getButton( itemId( i ) );
+ TQWhatsThis::remove( w );
+ TQWhatsThis::add( w, d->whatsThis() );
return;
}
}
-QString KAction::whatsThis() const
+TQString KAction::whatsThis() const
{
return d->whatsThis();
}
-QString KAction::whatsThisWithIcon() const
+TQString KAction::whatsThisWithIcon() const
{
- QString text = whatsThis();
+ TQString text = whatsThis();
if (!d->iconName().isEmpty())
- return QString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text);
+ return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text);
return text;
}
-QWidget* KAction::container( int index ) const
+TQWidget* KAction::container( int index ) const
{
assert( index < containerCount() );
return d->m_containers[ index ].m_container;
@@ -1044,12 +1044,12 @@ KToolBar* KAction::toolBar( int index ) const
return dynamic_cast<KToolBar *>( d->m_containers[ index ].m_container );
}
-QPopupMenu* KAction::popupMenu( int index ) const
+TQPopupMenu* KAction::popupMenu( int index ) const
{
- return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
+ return dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container );
}
-QWidget* KAction::representative( int index ) const
+TQWidget* KAction::representative( int index ) const
{
return d->m_containers[ index ].m_representative;
}
@@ -1069,7 +1069,7 @@ uint KAction::kaccelCount() const
return d->m_kaccelList.count();
}
-void KAction::addContainer( QWidget* c, int id )
+void KAction::addContainer( TQWidget* c, int id )
{
KActionPrivate::Container p;
p.m_container = c;
@@ -1077,7 +1077,7 @@ void KAction::addContainer( QWidget* c, int id )
d->m_containers.append( p );
}
-void KAction::addContainer( QWidget* c, QWidget* w )
+void KAction::addContainer( TQWidget* c, TQWidget* w )
{
KActionPrivate::Container p;
p.m_container = c;
@@ -1093,7 +1093,7 @@ void KAction::activate()
void KAction::slotActivated()
{
- const QObject *senderObj = sender();
+ const TQObject *senderObj = sender();
if ( senderObj )
{
if ( ::qt_cast<KAccelPrivate *>( senderObj ) )
@@ -1104,17 +1104,17 @@ void KAction::slotActivated()
// This catches signals emitted by KActions inserted into QPopupMenu
// We do crude things inside it, because we need to know which
-// QPopupMenu emitted the signal. We need to be sure that it is
+// TQPopupMenu emitted the signal. We need to be sure that it is
// only called by QPopupMenus, we plugged us in.
void KAction::slotPopupActivated()
{
- if( ::qt_cast<QSignal *>(sender()))
+ if( ::qt_cast<TQSignal *>(sender()))
{
- int id = dynamic_cast<const QSignal *>(sender())->value().toInt();
+ int id = dynamic_cast<const TQSignal *>(sender())->value().toInt();
int pos = findContainer(id);
if(pos != -1)
{
- QPopupMenu* qpm = dynamic_cast<QPopupMenu *>( container(pos) );
+ TQPopupMenu* qpm = dynamic_cast<TQPopupMenu *>( container(pos) );
if(qpm)
{
KPopupMenu* kpm = dynamic_cast<KPopupMenu *>( qpm );
@@ -1151,7 +1151,7 @@ void KAction::slotButtonClicked( int, Qt::ButtonState state )
void KAction::slotDestroyed()
{
kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl;
- const QObject* const o = sender();
+ const TQObject* const o = sender();
#ifndef KDE_NO_COMPAT // KDE 4: remove
if ( o == d->m_kaccel )
@@ -1160,15 +1160,15 @@ void KAction::slotDestroyed()
return;
}
#endif // KDE 4: remove end
- QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::iterator itr = accelList.begin();
- const QValueList<KAccel*>::iterator itrEnd = accelList.end();
+ TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::iterator itr = accelList.begin();
+ const TQValueList<KAccel*>::iterator itrEnd = accelList.end();
for( ; itr != itrEnd; ++itr)
{
if ( o == *itr )
{
- disconnect( *itr, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ disconnect( *itr, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
accelList.remove(itr);
return;
}
@@ -1177,20 +1177,20 @@ void KAction::slotDestroyed()
int i;
do
{
- i = findContainer( static_cast<const QWidget*>( o ) );
+ i = findContainer( static_cast<const TQWidget*>( o ) );
if ( i != -1 )
removeContainer( i );
} while ( i != -1 );
}
-int KAction::findContainer( const QWidget* widget ) const
+int KAction::findContainer( const TQWidget* widget ) const
{
int pos = 0;
- const QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ const TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
- const QValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
+ TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
+ const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
while( it != itEnd )
{
@@ -1207,10 +1207,10 @@ int KAction::findContainer( const int id ) const
{
int pos = 0;
- const QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ const TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
- const QValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
+ TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
+ const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
while( it != itEnd )
{
@@ -1227,10 +1227,10 @@ void KAction::removeContainer( int index )
{
int i = 0;
- QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::Iterator it = containers.begin();
- const QValueList<KActionPrivate::Container>::Iterator itEnd = containers.end();
+ TQValueList<KActionPrivate::Container>::Iterator it = containers.begin();
+ const TQValueList<KActionPrivate::Container>::Iterator itEnd = containers.end();
while( it != itEnd )
{
diff --git a/kdeui/kaction.h b/kdeui/kaction.h
index 1217ce1e7..61b3d9b1d 100644
--- a/kdeui/kaction.h
+++ b/kdeui/kaction.h
@@ -26,10 +26,10 @@
#ifndef __kaction_h__
#define __kaction_h__
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -105,16 +105,16 @@ class KMainWindow;
* If you are in the situation of wanting to map the activated()
* signal of multiple action objects to one slot, with a special
* argument bound to each action, then you might consider using
- * QSignalMapper . A tiny example:
+ * TQSignalMapper . A tiny example:
*
* \code
- * QSignalMapper *desktopNumberMapper = new QSignalMapper( this );
- * connect( desktopNumberMapper, SIGNAL( mapped( int ) ),
- * this, SLOT( moveWindowToDesktop( int ) ) );
+ * TQSignalMapper *desktopNumberMapper = new TQSignalMapper( this );
+ * connect( desktopNumberMapper, TQT_SIGNAL( mapped( int ) ),
+ * this, TQT_SLOT( moveWindowToDesktop( int ) ) );
*
* for ( uint i = 0; i < numberOfDesktops; ++i ) {
* KAction *desktopAction = new KAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... );
- * connect( desktopAction, SIGNAL( activated() ), desktopNumberMapper, SLOT( map() ) );
+ * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) );
* desktopNumberMapper->setMapping( desktopAction, i );
* }
* \endcode
@@ -135,7 +135,7 @@ class KMainWindow;
* \code
* KAction *newAct = new KAction(i18n("&New"), "filenew",
* KStdAccel::shortcut(KStdAccel::New),
- * this, SLOT(fileNew()),
+ * this, TQT_SLOT(fileNew()),
* actionCollection(), "new");
* \endcode
* This line creates our action. It says that wherever this action is
@@ -144,7 +144,7 @@ class KMainWindow;
* is invoked, it will use the fileNew() slot to execute it.
*
* \code
- * QPopupMenu *file = new QPopupMenu;
+ * TQPopupMenu *file = new QPopupMenu;
* newAct->plug(file);
* \endcode
* That just inserted the action into the File menu. The point is, it's not
@@ -204,18 +204,18 @@ class KDEUI_EXPORT KAction : public QObject
friend class KActionCollection;
Q_OBJECT
Q_PROPERTY( int containerCount READ containerCount )
- Q_PROPERTY( QString plainText READ plainText )
- Q_PROPERTY( QString text READ text WRITE setText )
- Q_PROPERTY( QString shortcut READ shortcutText WRITE setShortcutText )
+ Q_PROPERTY( TQString plainText READ plainText )
+ Q_PROPERTY( TQString text READ text WRITE setText )
+ Q_PROPERTY( TQString shortcut READ shortcutText WRITE setShortcutText )
Q_PROPERTY( bool enabled READ isEnabled WRITE setEnabled )
- Q_PROPERTY( QString group READ group WRITE setGroup )
- Q_PROPERTY( QString whatsThis READ whatsThis WRITE setWhatsThis )
- Q_PROPERTY( QString toolTip READ toolTip WRITE setToolTip )
- Q_PROPERTY( QString icon READ icon WRITE setIcon )
+ Q_PROPERTY( TQString group READ group WRITE setGroup )
+ Q_PROPERTY( TQString whatsThis READ whatsThis WRITE setWhatsThis )
+ Q_PROPERTY( TQString toolTip READ toolTip WRITE setToolTip )
+ Q_PROPERTY( TQString icon READ icon WRITE setIcon )
public:
/**
* Constructs an action with text, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user.
*
* If you do not want or have a keyboard shortcut,
@@ -229,17 +229,17 @@ public:
* @param text The text that will be displayed.
* @param cut The corresponding keyboard shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* Constructs an action with text, icon, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user.
*
* If you do not want or have a keyboard shortcut, set the
@@ -252,17 +252,17 @@ public:
* @param pix The icon to display.
* @param cut The corresponding keyboard shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* Constructs an action with text, icon, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user. The icon is loaded on demand later based on where it
* is plugged in.
*
@@ -276,12 +276,12 @@ public:
* @param pix The icon to display.
* @param cut The corresponding keyboard shortcut (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
@@ -291,48 +291,48 @@ public:
* @param item The KGuiItem with the label and (optional) icon.
* @param cut The corresponding keyboard shortcut (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
KAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* @obsolete
*/
- KAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
* @obsolete
*/
- KAction( QObject* parent = 0, const char* name = 0 );
+ KAction( TQObject* parent = 0, const char* name = 0 );
/**
* Standard destructor
@@ -352,7 +352,7 @@ public:
* @param index The position into which the action is plugged. If
* this is negative, the action is inserted at the end.
*/
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* @deprecated. Shouldn't be used. No substitute available.
@@ -378,7 +378,7 @@ public:
*
* @param w Remove the action from this GUI element.
*/
- virtual void unplug( QWidget *w );
+ virtual void unplug( TQWidget *w );
/**
* @deprecated. Complement method to plugAccel().
@@ -395,23 +395,23 @@ public:
/**
* returns whether the action is plugged into the given container
*/
- bool isPlugged( const QWidget *container ) const;
+ bool isPlugged( const TQWidget *container ) const;
/**
* returns whether the action is plugged into the given container with the given, container specific, id (often
* menu or toolbar id ) .
*/
- virtual bool isPlugged( const QWidget *container, int id ) const;
+ virtual bool isPlugged( const TQWidget *container, int id ) const;
/**
* returns whether the action is plugged into the given container with the given, container specific, representative
* container widget item.
*/
- virtual bool isPlugged( const QWidget *container, const QWidget *_representative ) const;
+ virtual bool isPlugged( const TQWidget *container, const TQWidget *_representative ) const;
- QWidget* container( int index ) const;
+ TQWidget* container( int index ) const;
int itemId( int index ) const;
- QWidget* representative( int index ) const;
+ TQWidget* representative( int index ) const;
int containerCount() const;
/// @since 3.1
uint kaccelCount() const;
@@ -420,12 +420,12 @@ public:
#ifndef KDE_NO_COMPAT
bool hasIconSet() const { return hasIcon(); }
#endif
- virtual QString plainText() const;
+ virtual TQString plainText() const;
/**
* Get the text associated with this action.
*/
- virtual QString text() const;
+ virtual TQString text() const;
/**
* Get the keyboard shortcut associated with this action.
@@ -437,8 +437,8 @@ public:
virtual const KShortcut& shortcutDefault() const;
// These two methods are for Q_PROPERTY
- QString shortcutText() const;
- void setShortcutText( const QString& );
+ TQString shortcutText() const;
+ void setShortcutText( const TQString& );
/**
* Returns true if this action is enabled.
@@ -450,32 +450,32 @@ public:
*/
virtual bool isShortcutConfigurable() const;
- virtual QString group() const;
+ virtual TQString group() const;
/**
* Get the What's this text for the action.
*/
- virtual QString whatsThis() const;
+ virtual TQString whatsThis() const;
/**
* Get the tooltip text for the action.
*/
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
/**
- * Get the QIconSet from which the icons used to display this action will
+ * Get the TQIconSet from which the icons used to display this action will
* be chosen.
*
* In KDE4 set group default to KIcon::Small while removing the other
* iconSet() function.
*/
- virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const;
+ virtual TQIconSet iconSet( KIcon::Group group, int size=0 ) const;
/**
* Remove in KDE4
*/
- QIconSet iconSet() const { return iconSet( KIcon::Small ); }
+ TQIconSet iconSet() const { return iconSet( KIcon::Small ); }
- virtual QString icon() const;
+ virtual TQString icon() const;
KActionCollection *parentCollection() const;
@@ -498,14 +498,14 @@ public slots:
* Sets the text associated with this action. The text is used for menu
* and toolbar labels etc.
*/
- virtual void setText(const QString &text);
+ virtual void setText(const TQString &text);
/**
* Sets the keyboard shortcut associated with this action.
*/
virtual bool setShortcut( const KShortcut& );
- virtual void setGroup( const QString& );
+ virtual void setGroup( const TQString& );
/**
* Sets the What's this text for the action. This text will be displayed when
@@ -514,7 +514,7 @@ public slots:
*
* The What's this text can include QML markup as well as raw text.
*/
- virtual void setWhatsThis( const QString& text );
+ virtual void setWhatsThis( const TQString& text );
/**
* Sets the tooltip text for the action.
@@ -530,15 +530,15 @@ public slots:
* @see KActionCollection
*
*/
- virtual void setToolTip( const QString& );
+ virtual void setToolTip( const TQString& );
/**
- * Sets the QIconSet from which the icons used to display this action will
+ * Sets the TQIconSet from which the icons used to display this action will
* be chosen.
*/
- virtual void setIconSet( const QIconSet &iconSet );
+ virtual void setIconSet( const TQIconSet &iconSet );
- virtual void setIcon( const QString& icon );
+ virtual void setIcon( const TQString& icon );
/**
* Enables or disables this action. All uses of this action (eg. in menus
@@ -574,17 +574,17 @@ protected slots:
protected:
KToolBar* toolBar( int index ) const;
- QPopupMenu* popupMenu( int index ) const;
+ TQPopupMenu* popupMenu( int index ) const;
void removeContainer( int index );
- int findContainer( const QWidget* widget ) const;
+ int findContainer( const TQWidget* widget ) const;
int findContainer( int id ) const;
- void plugMainWindowAccel( QWidget *w );
+ void plugMainWindowAccel( TQWidget *w );
- void addContainer( QWidget* parent, int id );
- void addContainer( QWidget* parent, QWidget* representative );
+ void addContainer( TQWidget* parent, int id );
+ void addContainer( TQWidget* parent, TQWidget* representative );
virtual void updateShortcut( int i );
- virtual void updateShortcut( QPopupMenu* menu, int id );
+ virtual void updateShortcut( TQPopupMenu* menu, int id );
virtual void updateGroup( int id );
virtual void updateText(int i );
virtual void updateEnabled(int i);
@@ -594,7 +594,7 @@ protected:
virtual void updateWhatsThis( int i );
KActionCollection *m_parentCollection;
- QString whatsThisWithIcon() const;
+ TQString whatsThisWithIcon() const;
/**
* Return the underlying KGuiItem
* @since 3.3
@@ -624,8 +624,8 @@ signals:
void enabled( bool );
private:
- void initPrivate( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot );
+ void initPrivate( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot );
KAccel* kaccelCurrent();
bool initShortcut( const KShortcut& );
void plugShortcut();
@@ -642,7 +642,7 @@ public:
*/
int accel() const KDE_DEPRECATED;
- QString statusText() const
+ TQString statusText() const
{ return toolTip(); }
/**
@@ -654,7 +654,7 @@ public:
/**
* @deprecated. Use setToolTip instead (they do the same thing now).
*/
- void setStatusText( const QString &text )
+ void setStatusText( const TQString &text )
{ setToolTip( text ); }
/**
diff --git a/kdeui/kactionclasses.cpp b/kdeui/kactionclasses.cpp
index 08ec02201..1fa7223cb 100644
--- a/kdeui/kactionclasses.cpp
+++ b/kdeui/kactionclasses.cpp
@@ -28,13 +28,13 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qfontdatabase.h>
-#include <qobjectlist.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqfontdatabase.h>
+#include <tqobjectlist.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -64,63 +64,63 @@ public:
}
bool m_checked;
- QString m_exclusiveGroup;
+ TQString m_exclusiveGroup;
KGuiItem* m_checkedGuiItem;
};
-KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
- QObject* parent,
+KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent,
const char* name )
: KAction( text, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QString& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QString& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( QObject* parent, const char* name )
+KToggleAction::KToggleAction( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KToggleActionPrivate;
@@ -132,9 +132,9 @@ KToggleAction::~KToggleAction()
delete d;
}
-int KToggleAction::plug( QWidget* widget, int index )
+int KToggleAction::plug( TQWidget* widget, int index )
{
- if ( !::qt_cast<QPopupMenu *>( widget ) && !::qt_cast<KToolBar *>( widget ) )
+ if ( !::qt_cast<TQPopupMenu *>( widget ) && !::qt_cast<KToolBar *>( widget ) )
{
kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl;
return -1;
@@ -173,9 +173,9 @@ void KToggleAction::setChecked( bool c )
updateChecked( i );
if ( c && parent() && !exclusiveGroup().isEmpty() ) {
- const QObjectList *list = parent()->children();
+ const TQObjectList *list = parent()->children();
if ( list ) {
- QObjectListIt it( *list );
+ TQObjectListIt it( *list );
for( ; it.current(); ++it ) {
if ( ::qt_cast<KToggleAction *>( it.current() ) && it.current() != this &&
static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) {
@@ -192,10 +192,10 @@ void KToggleAction::setChecked( bool c )
void KToggleAction::updateChecked( int id )
{
- QWidget *w = container( id );
+ TQWidget *w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
- QPopupMenu* pm = static_cast<QPopupMenu*>(w);
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
+ TQPopupMenu* pm = static_cast<TQPopupMenu*>(w);
int itemId_ = itemId( id );
if ( !d->m_checkedGuiItem )
pm->setItemChecked( itemId_, d->m_checked );
@@ -216,11 +216,11 @@ void KToggleAction::updateChecked( int id )
updateShortcut( pm, itemId_ );
}
}
- else if ( ::qt_cast<QMenuBar *>( w ) ) // not handled in plug...
- static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
+ else if ( ::qt_cast<TQMenuBar *>( w ) ) // not handled in plug...
+ static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
else if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) );
+ TQWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) );
if ( r && ::qt_cast<KToolBarButton *>( r ) ) {
static_cast<KToolBar*>( w )->setButton( itemId( id ), d->m_checked );
if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) {
@@ -243,12 +243,12 @@ bool KToggleAction::isChecked() const
return d->m_checked;
}
-void KToggleAction::setExclusiveGroup( const QString& name )
+void KToggleAction::setExclusiveGroup( const TQString& name )
{
d->m_exclusiveGroup = name;
}
-QString KToggleAction::exclusiveGroup() const
+TQString KToggleAction::exclusiveGroup() const
{
return d->m_exclusiveGroup;
}
@@ -259,7 +259,7 @@ void KToggleAction::setCheckedState( const KGuiItem& checkedItem )
d->m_checkedGuiItem = new KGuiItem( checkedItem );
}
-QString KToggleAction::toolTip() const
+TQString KToggleAction::toolTip() const
{
if ( d->m_checkedGuiItem && d->m_checked )
return d->m_checkedGuiItem->toolTip();
@@ -267,50 +267,50 @@ QString KToggleAction::toolTip() const
return KAction::toolTip();
}
-KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QString& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QString& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( QObject* parent, const char* name )
+KRadioAction::KRadioAction( TQObject* parent, const char* name )
: KToggleAction( parent, name )
{
}
@@ -319,7 +319,7 @@ void KRadioAction::slotActivated()
{
if ( isChecked() )
{
- const QObject *senderObj = sender();
+ const TQObject *senderObj = sender();
if ( !senderObj || !::qt_cast<const KToolBarButton *>( senderObj ) )
return;
@@ -346,17 +346,17 @@ public:
}
bool m_edit;
bool m_menuAccelsEnabled;
- QPopupMenu *m_menu;
+ TQPopupMenu *m_menu;
int m_current;
int m_comboWidth;
- QStringList m_list;
+ TQStringList m_list;
int m_maxComboViewCount;
- QString makeMenuText( const QString &_text )
+ TQString makeMenuText( const TQString &_text )
{
if ( m_menuAccelsEnabled )
return _text;
- QString text = _text;
+ TQString text = _text;
uint i = 0;
while ( i < text.length() ) {
if ( text[ i ] == '&' ) {
@@ -370,58 +370,58 @@ public:
}
};
-KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KAction( text, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QString& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QString& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( QObject* parent, const char* name )
+KSelectAction::KSelectAction( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KSelectActionPrivate;
@@ -480,7 +480,7 @@ void KSelectAction::setMaxComboViewCount( int n )
d->m_maxComboViewCount = n;
}
-QPopupMenu* KSelectAction::popupMenu() const
+TQPopupMenu* KSelectAction::popupMenu() const
{
kdDebug(129) << "KAction::popupMenu()" << endl; // remove -- ellis
if ( !d->m_menu )
@@ -500,17 +500,17 @@ void KSelectAction::setupMenu() const
return;
d->m_menu->clear();
- QStringList::ConstIterator it = d->m_list.begin();
+ TQStringList::ConstIterator it = d->m_list.begin();
for( uint id = 0; it != d->m_list.end(); ++it, ++id ) {
- QString text = *it;
+ TQString text = *it;
if ( !text.isEmpty() )
- d->m_menu->insertItem( d->makeMenuText( text ), this, SLOT( slotActivated( int ) ), 0, id );
+ d->m_menu->insertItem( d->makeMenuText( text ), this, TQT_SLOT( slotActivated( int ) ), 0, id );
else
d->m_menu->insertSeparator();
}
}
-void KSelectAction::changeItem( int index, const QString& text )
+void KSelectAction::changeItem( int index, const TQString& text )
{
if ( index < 0 || index >= (int)d->m_list.count() )
{
@@ -528,24 +528,24 @@ void KSelectAction::changeItem( int index, const QString& text )
changeItem( i, index, text );
}
-void KSelectAction::changeItem( int id, int index, const QString& text)
+void KSelectAction::changeItem( int id, int index, const TQString& text)
{
if ( index < 0 )
return;
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) )
+ TQWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) )
{
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->changeItem(text, index );
}
}
}
-void KSelectAction::setItems( const QStringList &lst )
+void KSelectAction::setItems( const TQStringList &lst )
{
d->m_list = lst;
d->m_current = -1;
@@ -560,15 +560,15 @@ void KSelectAction::setItems( const QStringList &lst )
setEnabled ( lst.count() > 0 || d->m_edit );
}
-QStringList KSelectAction::items() const
+TQStringList KSelectAction::items() const
{
return d->m_list;
}
-QString KSelectAction::currentText() const
+TQString KSelectAction::currentText() const
{
if ( currentItem() < 0 )
- return QString::null;
+ return TQString::null;
return d->m_list[ currentItem() ];
}
@@ -583,11 +583,11 @@ void KSelectAction::updateCurrentItem( int id )
if ( d->m_current < 0 )
return;
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->setCurrentItem( d->m_current );
}
}
@@ -600,11 +600,11 @@ int KSelectAction::comboWidth() const
void KSelectAction::updateComboWidth( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *cb = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->setMinimumWidth( d->m_comboWidth );
cb->setMaximumWidth( d->m_comboWidth );
}
@@ -614,14 +614,14 @@ void KSelectAction::updateComboWidth( int id )
void KSelectAction::updateItems( int id )
{
kdDebug(129) << "KAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *cb = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->clear();
- QStringList lst = comboItems();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = comboItems();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
cb->insertItem( *it );
// qt caches and never recalculates the sizeHint()
@@ -633,17 +633,17 @@ void KSelectAction::updateItems( int id )
}
}
-int KSelectAction::plug( QWidget *widget, int index )
+int KSelectAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
kdDebug(129) << "KSelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( ::qt_cast<QPopupMenu *>( widget) )
+ if ( ::qt_cast<TQPopupMenu *>( widget) )
{
// Create the PopupMenu and store it in m_menu
(void)popupMenu();
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIcon() )
id = menu->insertItem( iconSet(), text(), d->m_menu, -1, index );
@@ -653,12 +653,12 @@ int KSelectAction::plug( QWidget *widget, int index )
if ( !isEnabled() )
menu->setItemEnabled( id, false );
- QString wth = whatsThis();
+ TQString wth = whatsThis();
if ( !wth.isEmpty() )
menu->setWhatsThis( id, wth );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -667,50 +667,50 @@ int KSelectAction::plug( QWidget *widget, int index )
KToolBar* bar = static_cast<KToolBar*>( widget );
int id_ = KAction::getToolButtonID();
bar->insertCombo( comboItems(), id_, isEditable(),
- SIGNAL( activated( const QString & ) ), this,
- SLOT( slotActivated( const QString & ) ), isEnabled(),
+ TQT_SIGNAL( activated( const TQString & ) ), this,
+ TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(),
toolTip(), -1, index );
- QComboBox *cb = bar->getCombo( id_ );
+ TQComboBox *cb = bar->getCombo( id_ );
if ( cb )
{
- if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus);
+ if (!isEditable()) cb->setFocusPolicy(TQWidget::NoFocus);
cb->setMinimumWidth( cb->sizeHint().width() );
if ( d->m_comboWidth > 0 )
{
cb->setMinimumWidth( d->m_comboWidth );
cb->setMaximumWidth( d->m_comboWidth );
}
- cb->setInsertionPolicy( QComboBox::NoInsertion );
- QWhatsThis::add( cb, whatsThis() );
+ cb->setInsertionPolicy( TQComboBox::NoInsertion );
+ TQWhatsThis::add( cb, whatsThis() );
if ( d->m_maxComboViewCount != -1 ) cb->setSizeLimit( d->m_maxComboViewCount );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
updateCurrentItem( containerCount() - 1 );
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
// Create the PopupMenu and store it in m_menu
(void)popupMenu();
- QMenuBar* menu = static_cast<QMenuBar*>( widget );
+ TQMenuBar* menu = static_cast<TQMenuBar*>( widget );
int id = menu->insertItem( text(), d->m_menu, -1, index );
if ( !isEnabled() )
menu->setItemEnabled( id, false );
- QString wth = whatsThis();
+ TQString wth = whatsThis();
if ( !wth.isEmpty() )
menu->setWhatsThis( id, wth );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -719,14 +719,14 @@ int KSelectAction::plug( QWidget *widget, int index )
return -1;
}
-QStringList KSelectAction::comboItems() const
+TQStringList KSelectAction::comboItems() const
{
if( d->m_menuAccelsEnabled ) {
- QStringList lst;
- QStringList::ConstIterator it = d->m_list.begin();
+ TQStringList lst;
+ TQStringList::ConstIterator it = d->m_list.begin();
for( ; it != d->m_list.end(); ++it )
{
- QString item = *it;
+ TQString item = *it;
int i = item.find( '&' );
if ( i > -1 )
item = item.remove( i, 1 );
@@ -750,11 +750,11 @@ void KSelectAction::clear()
void KSelectAction::updateClear( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->clear();
}
}
@@ -768,14 +768,14 @@ void KSelectAction::slotActivated( int id )
setCurrentItem( id );
// Delay this. Especially useful when the slot connected to activated() will re-create
// the menu, e.g. in the recent files action. This prevents a crash.
- QTimer::singleShot( 0, this, SLOT( slotActivated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) );
}
-void KSelectAction::slotActivated( const QString &text )
+void KSelectAction::slotActivated( const TQString &text )
{
if ( isEditable() )
{
- QStringList lst = d->m_list;
+ TQStringList lst = d->m_list;
if(!lst.contains(text))
{
lst.append( text );
@@ -790,7 +790,7 @@ void KSelectAction::slotActivated( const QString &text )
setCurrentItem( comboItems().findIndex( text ) );
// Delay this. Especially useful when the slot connected to activated() will re-create
// the menu, e.g. in the recent files action. This prevents a crash.
- QTimer::singleShot( 0, this, SLOT( slotActivated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) );
}
void KSelectAction::slotActivated()
@@ -841,62 +841,62 @@ public:
int m_current;
};
-KListAction::KListAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KListAction::KListAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KListAction::KListAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const QString& pix,
+KListAction::KListAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
- const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent,
+KListAction::KListAction( const TQString& text, const TQIconSet& pix,
+ const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( const QString& text, const QString& pix,
- const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent,
+KListAction::KListAction( const TQString& text, const TQString& pix,
+ const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( QObject* parent, const char* name )
+KListAction::KListAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
d = new KListActionPrivate;
@@ -917,7 +917,7 @@ void KListAction::setCurrentItem( int index )
// emit activated( currentText() );
}
-QString KListAction::currentText() const
+TQString KListAction::currentText() const
{
return KSelectAction::currentText();
}
@@ -937,13 +937,13 @@ public:
}
uint m_maxItems;
KPopupMenu *m_popup;
- QMap<QString, QString> m_shortNames;
- QMap<QString, KURL> m_urls;
+ TQMap<TQString, TQString> m_shortNames;
+ TQMap<TQString, KURL> m_urls;
};
-KRecentFilesAction::KRecentFilesAction( const QString& text,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, cut, parent, name)
{
@@ -953,11 +953,11 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, cut, parent, name)
{
@@ -967,14 +967,14 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -984,10 +984,10 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QString& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -997,12 +997,12 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -1012,16 +1012,16 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QString& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -1031,11 +1031,11 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( QObject* parent, const char* name,
+KRecentFilesAction::KRecentFilesAction( TQObject* parent, const char* name,
uint maxItems )
: KListAction( parent, name )
{
@@ -1049,10 +1049,10 @@ void KRecentFilesAction::init()
{
KRecentFilesAction *that = const_cast<KRecentFilesAction*>(this);
that->d->m_popup = new KPopupMenu;
- connect(d->m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(d->m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
- connect( this, SIGNAL( activated( const QString& ) ),
- this, SLOT( itemSelected( const QString& ) ) );
+ connect(d->m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow()));
+ connect(d->m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( itemSelected( const TQString& ) ) );
setMenuAccelsEnabled( false );
}
@@ -1070,7 +1070,7 @@ uint KRecentFilesAction::maxItems() const
void KRecentFilesAction::setMaxItems( uint maxItems )
{
- QStringList lst = KSelectAction::items();
+ TQStringList lst = KSelectAction::items();
uint oldCount = lst.count();
// set new maxItems
@@ -1080,7 +1080,7 @@ void KRecentFilesAction::setMaxItems( uint maxItems )
while( lst.count() > maxItems )
{
// remove last item
- QString lastItem = lst.last();
+ TQString lastItem = lst.last();
d->m_shortNames.erase( lastItem );
d->m_urls.erase( lastItem );
lst.remove( lastItem );
@@ -1096,18 +1096,18 @@ void KRecentFilesAction::addURL( const KURL& url )
addURL( url, url.fileName() );
}
-void KRecentFilesAction::addURL( const KURL& url, const QString& name )
+void KRecentFilesAction::addURL( const KURL& url, const TQString& name )
{
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- const QString file = url.pathOrURL();
- QStringList lst = KSelectAction::items();
+ const TQString file = url.pathOrURL();
+ TQStringList lst = KSelectAction::items();
// remove file if already in list
- const QStringList::Iterator end = lst.end();
- for ( QStringList::Iterator it = lst.begin(); it != end; ++it )
+ const TQStringList::Iterator end = lst.end();
+ for ( TQStringList::Iterator it = lst.begin(); it != end; ++it )
{
- QString title = (*it);
+ TQString title = (*it);
if ( title.endsWith( file + "]" ) )
{
lst.remove( it );
@@ -1120,14 +1120,14 @@ void KRecentFilesAction::addURL( const KURL& url, const QString& name )
if( lst.count() == d->m_maxItems )
{
// remove last item
- const QString lastItem = lst.last();
+ const TQString lastItem = lst.last();
d->m_shortNames.erase( lastItem );
d->m_urls.erase( lastItem );
lst.remove( lastItem );
}
// add file to list
- const QString title = name + " [" + file + "]";
+ const TQString title = name + " [" + file + "]";
d->m_shortNames.insert( title, name );
d->m_urls.insert( title, url );
lst.prepend( title );
@@ -1136,12 +1136,12 @@ void KRecentFilesAction::addURL( const KURL& url, const QString& name )
void KRecentFilesAction::removeURL( const KURL& url )
{
- QStringList lst = KSelectAction::items();
- QString file = url.pathOrURL();
+ TQStringList lst = KSelectAction::items();
+ TQString file = url.pathOrURL();
// remove url
- QStringList::Iterator end = lst.end();
- for ( QStringList::Iterator it = lst.begin(); it != end; ++it )
+ TQStringList::Iterator end = lst.end();
+ for ( TQStringList::Iterator it = lst.begin(); it != end; ++it )
{
if ( (*it).endsWith( file + "]" ))
{
@@ -1161,15 +1161,15 @@ void KRecentFilesAction::clearURLList()
d->m_urls.clear();
}
-void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
+void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname)
{
- QString key;
- QString value;
- QString nameKey;
- QString nameValue;
- QString title;
- QString oldGroup;
- QStringList lst;
+ TQString key;
+ TQString value;
+ TQString nameKey;
+ TQString nameValue;
+ TQString title;
+ TQString oldGroup;
+ TQStringList lst;
KURL url;
oldGroup = config->group();
@@ -1181,15 +1181,15 @@ void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
// read file list
for( unsigned int i = 1 ; i <= d->m_maxItems ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).arg( i );
value = config->readPathEntry( key );
url = KURL::fromPathOrURL( value );
// Don't restore if file doesn't exist anymore
- if (url.isLocalFile() && !QFile::exists(url.path()))
+ if (url.isLocalFile() && !TQFile::exists(url.path()))
continue;
- nameKey = QString( "Name%1" ).arg( i );
+ nameKey = TQString( "Name%1" ).arg( i );
nameValue = config->readPathEntry( nameKey, url.fileName() );
title = nameValue + " [" + value + "]";
if (!value.isNull())
@@ -1206,12 +1206,12 @@ void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
config->setGroup( oldGroup );
}
-void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
+void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname )
{
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst = KSelectAction::items();
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst = KSelectAction::items();
oldGroup = config->group();
@@ -1224,10 +1224,10 @@ void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
//kdDebug(129) << "Entry for " << lst[i-1] << d->m_urls[ lst[ i - 1 ] ] << endl;
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).arg( i );
value = d->m_urls[ lst[ i - 1 ] ].pathOrURL();
config->writePathEntry( key, value );
- key = QString( "Name%1" ).arg( i );
+ key = TQString( "Name%1" ).arg( i );
value = d->m_shortNames[ lst[ i - 1 ] ];
config->writePathEntry( key, value );
}
@@ -1235,7 +1235,7 @@ void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
config->setGroup( oldGroup );
}
-void KRecentFilesAction::itemSelected( const QString& text )
+void KRecentFilesAction::itemSelected( const TQString& text )
{
//return a copy of the URL since the slot where it is connected might call
//addURL or removeURL where the d->m_urls.erase( title ) could destroy the
@@ -1245,7 +1245,7 @@ void KRecentFilesAction::itemSelected( const QString& text )
void KRecentFilesAction::menuItemActivated( int id )
{
- QString text = d->m_popup->text(id);
+ TQString text = d->m_popup->text(id);
//return a copy of the URL since the slot where it is connected might call
//addURL or removeURL where the d->m_urls.erase( title ) could destroy the
//d->m_urls[ text ] and the emitted URL will be invalid in the rest of the slot
@@ -1256,14 +1256,14 @@ void KRecentFilesAction::menuAboutToShow()
{
KPopupMenu *menu = d->m_popup;
menu->clear();
- QStringList list = KSelectAction::items();
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = KSelectAction::items();
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
menu->insertItem(*it);
}
}
-int KRecentFilesAction::plug( QWidget *widget, int index )
+int KRecentFilesAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1281,18 +1281,18 @@ int KRecentFilesAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotClicked() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotClicked() ), isEnabled(), plainText(),
index, instance );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
bar->setDelayedPopup( id_, d->m_popup, true);
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -1305,7 +1305,7 @@ void KRecentFilesAction::slotClicked()
KAction::slotActivated();
}
-void KRecentFilesAction::slotActivated(const QString& text)
+void KRecentFilesAction::slotActivated(const TQString& text)
{
KListAction::slotActivated(text);
}
@@ -1324,10 +1324,10 @@ void KRecentFilesAction::slotActivated()
}
//KDE4: rename to urls() and return a KURL::List
-QStringList KRecentFilesAction::items() const
+TQStringList KRecentFilesAction::items() const
{
- QStringList lst = KSelectAction::items();
- QStringList result;
+ TQStringList lst = KSelectAction::items();
+ TQStringList result;
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
@@ -1338,7 +1338,7 @@ QStringList KRecentFilesAction::items() const
}
//KDE4: remove
-QStringList KRecentFilesAction::completeItems() const
+TQStringList KRecentFilesAction::completeItems() const
{
return KSelectAction::items();
}
@@ -1350,11 +1350,11 @@ public:
KFontActionPrivate()
{
}
- QStringList m_fonts;
+ TQStringList m_fonts;
};
-KFontAction::KFontAction( const QString& text,
- const KShortcut& cut, QObject* parent,
+KFontAction::KFontAction( const TQString& text,
+ const KShortcut& cut, TQObject* parent,
const char* name )
: KSelectAction( text, cut, parent, name )
{
@@ -1364,9 +1364,9 @@ KFontAction::KFontAction( const QString& text,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KFontAction::KFontAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1375,9 +1375,9 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1386,9 +1386,9 @@ KFontAction::KFontAction( const QString& text, const QIconSet& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QString& pix,
+KFontAction::KFontAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1397,10 +1397,10 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1409,10 +1409,10 @@ KFontAction::KFontAction( const QString& text, const QIconSet& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QString& pix,
+KFontAction::KFontAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1421,8 +1421,8 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
setEditable( true );
}
-KFontAction::KFontAction( uint fontListCriteria, const QString& text,
- const KShortcut& cut, QObject* parent,
+KFontAction::KFontAction( uint fontListCriteria, const TQString& text,
+ const KShortcut& cut, TQObject* parent,
const char* name )
: KSelectAction( text, cut, parent, name )
{
@@ -1432,9 +1432,9 @@ KFontAction::KFontAction( uint fontListCriteria, const QString& text,
setEditable( true );
}
-KFontAction::KFontAction( uint fontListCriteria, const QString& text, const QString& pix,
+KFontAction::KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1443,7 +1443,7 @@ KFontAction::KFontAction( uint fontListCriteria, const QString& text, const QStr
setEditable( true );
}
-KFontAction::KFontAction( QObject* parent, const char* name )
+KFontAction::KFontAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
d = new KFontActionPrivate;
@@ -1461,11 +1461,11 @@ KFontAction::~KFontAction()
/*
* Maintenance note: Keep in sync with KFontCombo::setCurrentFont()
*/
-void KFontAction::setFont( const QString &family )
+void KFontAction::setFont( const TQString &family )
{
- QString lowerName = family.lower();
+ TQString lowerName = family.lower();
int i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower() == lowerName)
{
@@ -1478,7 +1478,7 @@ void KFontAction::setFont( const QString &family )
{
lowerName = lowerName.left(i);
i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower() == lowerName)
{
@@ -1490,7 +1490,7 @@ void KFontAction::setFont( const QString &family )
lowerName += " [";
i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower().startsWith(lowerName))
{
@@ -1501,7 +1501,7 @@ void KFontAction::setFont( const QString &family )
kdDebug(129) << "Font not found " << family.lower() << endl;
}
-int KFontAction::plug( QWidget *w, int index )
+int KFontAction::plug( TQWidget *w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1510,15 +1510,15 @@ int KFontAction::plug( QWidget *w, int index )
KToolBar* bar = static_cast<KToolBar*>( w );
int id_ = KAction::getToolButtonID();
KFontCombo *cb = new KFontCombo( items(), bar );
- connect( cb, SIGNAL( activated( const QString & ) ),
- SLOT( slotActivated( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( slotActivated( const TQString & ) ) );
cb->setEnabled( isEnabled() );
bar->insertWidget( id_, comboWidth(), cb, index );
cb->setMinimumWidth( cb->sizeHint().width() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
updateCurrentItem( containerCount() - 1 );
@@ -1535,60 +1535,60 @@ public:
}
};
-KFontSizeAction::KFontSizeAction( const QString& text,
+KFontSizeAction::KFontSizeAction( const TQString& text,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text,
+KFontSizeAction::KFontSizeAction( const TQString& text,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( QObject* parent, const char* name )
+KFontSizeAction::KFontSizeAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
init();
@@ -1605,11 +1605,11 @@ void KFontSizeAction::init()
d = new KFontSizeActionPrivate;
setEditable( true );
- QFontDatabase fontDB;
- QValueList<int> sizes = fontDB.standardSizes();
- QStringList lst;
- for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
- lst.append( QString::number( *it ) );
+ TQFontDatabase fontDB;
+ TQValueList<int> sizes = fontDB.standardSizes();
+ TQStringList lst;
+ for ( TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
+ lst.append( TQString::number( *it ) );
setItems( lst );
}
@@ -1617,7 +1617,7 @@ void KFontSizeAction::init()
void KFontSizeAction::setFontSize( int size )
{
if ( size == fontSize() ) {
- setCurrentItem( items().findIndex( QString::number( size ) ) );
+ setCurrentItem( items().findIndex( TQString::number( size ) ) );
return;
}
@@ -1626,22 +1626,22 @@ void KFontSizeAction::setFontSize( int size )
return;
}
- int index = items().findIndex( QString::number( size ) );
+ int index = items().findIndex( TQString::number( size ) );
if ( index == -1 ) {
// Insert at the correct position in the list (to keep sorting)
- QValueList<int> lst;
+ TQValueList<int> lst;
// Convert to list of ints
- QStringList itemsList = items();
- for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
+ TQStringList itemsList = items();
+ for (TQStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
lst.append( (*it).toInt() );
// New size
lst.append( size );
// Sort the list
qHeapSort( lst );
// Convert back to string list
- QStringList strLst;
- for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
- strLst.append( QString::number(*it) );
+ TQStringList strLst;
+ for (TQValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
+ strLst.append( TQString::number(*it) );
KSelectAction::setItems( strLst );
// Find new current item
index = lst.findIndex( size );
@@ -1653,7 +1653,7 @@ void KFontSizeAction::setFontSize( int size )
//emit KAction::activated();
//emit activated( index );
- //emit activated( QString::number( size ) );
+ //emit activated( TQString::number( size ) );
//emit fontSizeChanged( size );
}
@@ -1669,7 +1669,7 @@ void KFontSizeAction::slotActivated( int index )
emit fontSizeChanged( items()[ index ].toInt() );
}
-void KFontSizeAction::slotActivated( const QString& size )
+void KFontSizeAction::slotActivated( const TQString& size )
{
setFontSize( size.toInt() ); // insert sorted first
KSelectAction::slotActivated( size );
@@ -1694,14 +1694,14 @@ public:
bool m_stickyMenu;
};
-KActionMenu::KActionMenu( QObject* parent, const char* name )
+KActionMenu::KActionMenu( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KActionMenuPrivate;
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, QObject* parent,
+KActionMenu::KActionMenu( const TQString& text, TQObject* parent,
const char* name )
: KAction( text, 0, parent, name )
{
@@ -1709,16 +1709,16 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent,
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, const QIconSet& icon,
- QObject* parent, const char* name )
+KActionMenu::KActionMenu( const TQString& text, const TQIconSet& icon,
+ TQObject* parent, const char* name )
: KAction( text, icon, 0, parent, name )
{
d = new KActionMenuPrivate;
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, const QString& icon,
- QObject* parent, const char* name )
+KActionMenu::KActionMenu( const TQString& text, const TQString& icon,
+ TQObject* parent, const char* name )
: KAction( text, icon, 0, parent, name )
{
d = new KActionMenuPrivate;
@@ -1732,7 +1732,7 @@ KActionMenu::~KActionMenu()
delete d; d = 0;
}
-void KActionMenu::popup( const QPoint& global )
+void KActionMenu::popup( const TQPoint& global )
{
popupMenu()->popup( global );
}
@@ -1770,14 +1770,14 @@ void KActionMenu::setStickyMenu(bool sticky) {
d->m_stickyMenu = sticky;
}
-int KActionMenu::plug( QWidget* widget, int index )
+int KActionMenu::plug( TQWidget* widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
kdDebug(129) << "KActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( ::qt_cast<QPopupMenu *>( widget ) )
+ if ( ::qt_cast<TQPopupMenu *>( widget ) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIcon() )
id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index );
@@ -1788,7 +1788,7 @@ int KActionMenu::plug( QWidget* widget, int index )
menu->setItemEnabled( id, false );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( menu, this );
@@ -1802,8 +1802,8 @@ int KActionMenu::plug( QWidget* widget, int index )
int id_ = KAction::getToolButtonID();
if ( icon().isEmpty() && !iconSet().isNull() )
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index );
else
{
@@ -1814,17 +1814,17 @@ int KActionMenu::plug( QWidget* widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
if (!whatsThis().isEmpty())
- QWhatsThis::add( bar->getButton(id_), whatsThis() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThis() );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if (delayed()) {
bar->setDelayedPopup( id_, popupMenu(), stickyMenu() );
@@ -1837,9 +1837,9 @@ int KActionMenu::plug( QWidget* widget, int index )
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( widget );
int id;
@@ -1849,7 +1849,7 @@ int KActionMenu::plug( QWidget* widget, int index )
bar->setItemEnabled( id, false );
addContainer( bar, id );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -1859,10 +1859,10 @@ int KActionMenu::plug( QWidget* widget, int index )
////////
-KToolBarPopupAction::KToolBarPopupAction( const QString& text,
- const QString& icon,
+KToolBarPopupAction::KToolBarPopupAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, icon, cut, parent, name )
{
m_popup = 0;
@@ -1870,11 +1870,11 @@ KToolBarPopupAction::KToolBarPopupAction( const QString& text,
m_stickyMenu = true;
}
-KToolBarPopupAction::KToolBarPopupAction( const QString& text,
- const QString& icon,
+KToolBarPopupAction::KToolBarPopupAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, icon, cut, receiver, slot, parent, name )
{
@@ -1885,7 +1885,7 @@ KToolBarPopupAction::KToolBarPopupAction( const QString& text,
KToolBarPopupAction::KToolBarPopupAction( const KGuiItem& item,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot, KActionCollection* parent,
const char* name )
: KAction( item, cut, receiver, slot, parent, name )
@@ -1916,7 +1916,7 @@ void KToolBarPopupAction::setStickyMenu(bool sticky) {
m_stickyMenu = sticky;
}
-int KToolBarPopupAction::plug( QWidget *widget, int index )
+int KToolBarPopupAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1929,8 +1929,8 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
int id_ = KAction::getToolButtonID();
if ( icon().isEmpty() && !iconSet().isNull() ) {
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
isEnabled(), plainText(),
index );
} else {
@@ -1940,15 +1940,15 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if (delayed()) {
bar->setDelayedPopup( id_, popupMenu(), stickyMenu() );
@@ -1957,7 +1957,7 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
}
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -1977,14 +1977,14 @@ KPopupMenu *KToolBarPopupAction::popupMenu() const
////////
KToggleToolBarAction::KToggleToolBarAction( const char* toolBarName,
- const QString& text, KActionCollection* parent, const char* name )
+ const TQString& text, KActionCollection* parent, const char* name )
: KToggleAction( text, KShortcut(), parent, name )
, m_toolBarName( toolBarName )
, m_toolBar( 0L )
{
}
-KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const QString &text,
+KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const TQString &text,
KActionCollection *parent, const char *name )
: KToggleAction( text, KShortcut(), parent, name )
, m_toolBarName( 0 ), m_toolBar( toolBar )
@@ -1995,15 +1995,15 @@ KToggleToolBarAction::~KToggleToolBarAction()
{
}
-int KToggleToolBarAction::plug( QWidget* w, int index )
+int KToggleToolBarAction::plug( TQWidget* w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
if ( !m_toolBar ) {
// Note: topLevelWidget() stops too early, we can't use it.
- QWidget * tl = w;
- QWidget * n;
+ TQWidget * tl = w;
+ TQWidget * n;
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n;
@@ -2015,9 +2015,9 @@ int KToggleToolBarAction::plug( QWidget* w, int index )
if( m_toolBar ) {
setChecked( m_toolBar->isVisible() );
- connect( m_toolBar, SIGNAL(visibilityChanged(bool)), this, SLOT(setChecked(bool)) );
+ connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(setChecked(bool)) );
// Also emit toggled when the toolbar's visibility changes (see comment in header)
- connect( m_toolBar, SIGNAL(visibilityChanged(bool)), this, SIGNAL(toggled(bool)) );
+ connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SIGNAL(toggled(bool)) );
} else {
setEnabled( false );
}
@@ -2033,7 +2033,7 @@ void KToggleToolBarAction::setChecked( bool c )
} else {
m_toolBar->hide();
}
- QMainWindow* mw = m_toolBar->mainWindow();
+ TQMainWindow* mw = m_toolBar->mainWindow();
if ( mw && ::qt_cast<KMainWindow *>( mw ) )
static_cast<KMainWindow *>( mw )->setSettingsDirty();
}
@@ -2043,10 +2043,10 @@ void KToggleToolBarAction::setChecked( bool c )
////////
KToggleFullScreenAction::KToggleFullScreenAction( const KShortcut &cut,
- const QObject* receiver, const char* slot,
- QObject* parent, QWidget* window,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, TQWidget* window,
const char* name )
- : KToggleAction( QString::null, cut, receiver, slot, parent, name ),
+ : KToggleAction( TQString::null, cut, receiver, slot, parent, name ),
window( NULL )
{
setWindow( window );
@@ -2056,7 +2056,7 @@ KToggleFullScreenAction::~KToggleFullScreenAction()
{
}
-void KToggleFullScreenAction::setWindow( QWidget* w )
+void KToggleFullScreenAction::setWindow( TQWidget* w )
{
if( window )
window->removeEventFilter( this );
@@ -2080,10 +2080,10 @@ void KToggleFullScreenAction::setChecked( bool c )
KToggleAction::setChecked( c );
}
-bool KToggleFullScreenAction::eventFilter( QObject* o, QEvent* e )
+bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e )
{
if( o == window )
- if( e->type() == QEvent::WindowStateChange )
+ if( e->type() == TQEvent::WindowStateChange )
{
if( window->isFullScreen() != isChecked())
slotActivated(); // setChecked( window->isFullScreen()) wouldn't emit signals
@@ -2093,15 +2093,15 @@ bool KToggleFullScreenAction::eventFilter( QObject* o, QEvent* e )
////////
-KWidgetAction::KWidgetAction( QWidget* widget,
- const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KWidgetAction::KWidgetAction( TQWidget* widget,
+ const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
, m_widget( widget )
, m_autoSized( false )
{
- connect( this, SIGNAL(enabled(bool)), widget, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(enabled(bool)), widget, TQT_SLOT(setEnabled(bool)) );
}
KWidgetAction::~KWidgetAction()
@@ -2127,7 +2127,7 @@ void KWidgetAction::setAutoSized( bool autoSized )
toolBar->setItemAutoSized( id, m_autoSized );
}
-int KWidgetAction::plug( QWidget* w, int index )
+int KWidgetAction::plug( TQWidget* w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -2145,20 +2145,20 @@ int KWidgetAction::plug( QWidget* w, int index )
int id = KAction::getToolButtonID();
- m_widget->reparent( toolBar, QPoint() );
+ m_widget->reparent( toolBar, TQPoint() );
toolBar->insertWidget( id, 0, m_widget, index );
toolBar->setItemAutoSized( id, m_autoSized );
- QWhatsThis::add( m_widget, whatsThis() );
+ TQWhatsThis::add( m_widget, whatsThis() );
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( toolbarDestroyed() ), this, SLOT( slotToolbarDestroyed() ) );
- connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
-void KWidgetAction::unplug( QWidget *w )
+void KWidgetAction::unplug( TQWidget *w )
{
if( !m_widget || !isPlugged() )
return;
@@ -2166,8 +2166,8 @@ void KWidgetAction::unplug( QWidget *w )
KToolBar* toolBar = (KToolBar*)m_widget->parent();
if ( toolBar == w )
{
- disconnect( toolBar, SIGNAL( toolbarDestroyed() ), this, SLOT( slotToolbarDestroyed() ) );
- m_widget->reparent( 0L, QPoint(), false /*showIt*/ );
+ disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) );
+ m_widget->reparent( 0L, TQPoint(), false /*showIt*/ );
}
KAction::unplug( w );
}
@@ -2180,12 +2180,12 @@ void KWidgetAction::slotToolbarDestroyed()
return;
// Don't let a toolbar being destroyed, delete my widget.
- m_widget->reparent( 0L, QPoint(), false /*showIt*/ );
+ m_widget->reparent( 0L, TQPoint(), false /*showIt*/ );
}
////////
-KActionSeparator::KActionSeparator( QObject *parent, const char *name )
+KActionSeparator::KActionSeparator( TQObject *parent, const char *name )
: KAction( parent, name )
{
}
@@ -2194,28 +2194,28 @@ KActionSeparator::~KActionSeparator()
{
}
-int KActionSeparator::plug( QWidget *widget, int index )
+int KActionSeparator::plug( TQWidget *widget, int index )
{
- if ( ::qt_cast<QPopupMenu *>( widget) )
+ if ( ::qt_cast<TQPopupMenu *>( widget) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id = menu->insertSeparator( index );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
- QMenuBar *menuBar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *menuBar = static_cast<TQMenuBar *>( widget );
int id = menuBar->insertSeparator( index );
addContainer( menuBar, id );
- connect( menuBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menuBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -2227,7 +2227,7 @@ int KActionSeparator::plug( QWidget *widget, int index )
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -2235,17 +2235,17 @@ int KActionSeparator::plug( QWidget *widget, int index )
return -1;
}
-KPasteTextAction::KPasteTextAction( const QString& text,
- const QString& icon,
+KPasteTextAction::KPasteTextAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name)
: KAction( text, icon, cut, receiver, slot, parent, name )
{
m_popup = new KPopupMenu;
- connect(m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
+ connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow()));
+ connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
m_popup->setCheckable(true);
m_mixedMode = true;
}
@@ -2260,7 +2260,7 @@ void KPasteTextAction::setMixedMode(bool mode)
m_mixedMode = mode;
}
-int KPasteTextAction::plug( QWidget *widget, int index )
+int KPasteTextAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -2276,18 +2276,18 @@ int KPasteTextAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
bar->setDelayedPopup( id_, m_popup, true );
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -2298,7 +2298,7 @@ int KPasteTextAction::plug( QWidget *widget, int index )
void KPasteTextAction::menuAboutToShow()
{
m_popup->clear();
- QStringList list;
+ TQStringList list;
DCOPClient *client = kapp->dcopClient();
if (client->isAttached() && client->isApplicationRegistered("klipper")) {
DCOPRef klipper("klipper","klipper");
@@ -2306,13 +2306,13 @@ void KPasteTextAction::menuAboutToShow()
if (reply.isValid())
list = reply;
}
- QString clipboardText = qApp->clipboard()->text(QClipboard::Clipboard);
+ TQString clipboardText = qApp->clipboard()->text(QClipboard::Clipboard);
if (list.isEmpty())
list << clipboardText;
bool found = false;
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
- QString text = KStringHandler::cEmSqueeze((*it).simplifyWhiteSpace(), m_popup->fontMetrics(), 20);
+ TQString text = KStringHandler::cEmSqueeze((*it).simplifyWhiteSpace(), m_popup->fontMetrics(), 20);
text.replace("&", "&&");
int id = m_popup->insertItem(text);
if (!found && *it == clipboardText)
@@ -2331,21 +2331,21 @@ void KPasteTextAction::menuItemActivated( int id)
DCOPReply reply = klipper.call("getClipboardHistoryItem(int)", m_popup->indexOf(id));
if (!reply.isValid())
return;
- QString clipboardText = reply;
- reply = klipper.call("setClipboardContents(QString)", clipboardText);
+ TQString clipboardText = reply;
+ reply = klipper.call("setClipboardContents(TQString)", clipboardText);
if (reply.isValid())
kdDebug(129) << "Clipboard: " << qApp->clipboard()->text(QClipboard::Clipboard) << endl;
}
- QTimer::singleShot(20, this, SLOT(slotActivated()));
+ TQTimer::singleShot(20, this, TQT_SLOT(slotActivated()));
}
void KPasteTextAction::slotActivated()
{
if (!m_mixedMode) {
- QWidget *w = qApp->widgetAt(QCursor::pos(), true);
- QMimeSource *data = QApplication::clipboard()->data();
+ TQWidget *w = qApp->widgetAt(TQCursor::pos(), true);
+ TQMimeSource *data = TQApplication::clipboard()->data();
if (!data->provides("text/plain") && w) {
- m_popup->popup(w->mapToGlobal(QPoint(0, w->height())));
+ m_popup->popup(w->mapToGlobal(TQPoint(0, w->height())));
} else
KAction::slotActivated();
} else
diff --git a/kdeui/kactionclasses.h b/kdeui/kactionclasses.h
index 6c6fe5ca8..7fa3a98ac 100644
--- a/kdeui/kactionclasses.h
+++ b/kdeui/kactionclasses.h
@@ -29,10 +29,10 @@
#include <kaction.h>
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -69,7 +69,7 @@ class KDEUI_EXPORT KToggleAction : public KAction
{
Q_OBJECT
Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
- Q_PROPERTY( QString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
+ Q_PROPERTY( TQString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
public:
/**
@@ -82,18 +82,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -102,8 +102,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -112,39 +112,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( QObject* parent = 0, const char* name = 0 );
+ KToggleAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -162,7 +162,7 @@ public:
* @param widget The GUI element to display this action.
* @param index The index of the item.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* Returns the actual state of the action.
@@ -173,7 +173,7 @@ public:
* @return which "exclusive group" this action is part of.
* @see setExclusiveGroup
*/
- QString exclusiveGroup() const;
+ TQString exclusiveGroup() const;
/**
* Defines which "exclusive group" this action is part of.
@@ -181,7 +181,7 @@ public:
* at a any moment. Checking an action unchecks the other actions
* of the group.
*/
- virtual void setExclusiveGroup( const QString& name );
+ virtual void setExclusiveGroup( const TQString& name );
/**
* Defines the text (and icon, tooltip, whatsthis) that should be displayed
@@ -197,7 +197,7 @@ public:
void setCheckedState( const KGuiItem& checkedItem );
/// Reimplemented for internal reasons
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
public slots:
/**
@@ -241,18 +241,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -261,8 +261,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -271,39 +271,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( QObject* parent = 0, const char* name = 0 );
+ KRadioAction( TQObject* parent = 0, const char* name = 0 );
protected:
virtual void slotActivated();
@@ -330,10 +330,10 @@ class KDEUI_EXPORT KSelectAction : public KAction
{
Q_OBJECT
Q_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
Q_PROPERTY( bool editable READ isEditable WRITE setEditable )
Q_PROPERTY( int comboWidth READ comboWidth WRITE setComboWidth )
- Q_PROPERTY( QString currentText READ currentText )
+ Q_PROPERTY( TQString currentText READ currentText )
Q_PROPERTY( bool menuAccelsEnabled READ menuAccelsEnabled WRITE setMenuAccelsEnabled )
public:
@@ -347,18 +347,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -367,8 +367,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -377,39 +377,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( QObject* parent = 0, const char* name = 0 );
+ KSelectAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -427,7 +427,7 @@ public:
* @param widget The GUI element to display this action.
* @param index The index of the item.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* When this action is plugged into a toolbar, it creates a combobox.
@@ -439,17 +439,17 @@ public:
* @return the items that can be selected with this action.
* Use setItems to set them.
*/
- virtual QStringList items() const;
+ virtual TQStringList items() const;
/**
* Changes the text of item @param index to @param text .
*/
- virtual void changeItem( int index, const QString& text );
+ virtual void changeItem( int index, const TQString& text );
/**
* Returns the text of the currently selected item.
*/
- virtual QString currentText() const;
+ virtual TQString currentText() const;
/**
* Returns the index of the current item.
@@ -474,7 +474,7 @@ public:
/**
* Returns a pointer to the popup menu used by this action.
*/
- QPopupMenu* popupMenu() const;
+ TQPopupMenu* popupMenu() const;
/**
* @deprecated See setMenuAccelsEnabled .
@@ -508,7 +508,7 @@ public slots:
* Sets the items to be displayed in this action
* You need to call this.
*/
- virtual void setItems( const QStringList &lst );
+ virtual void setItems( const TQStringList &lst );
/**
* Clears up all the items in this action
@@ -529,7 +529,7 @@ public slots:
virtual void setComboWidth( int width );
protected:
- virtual void changeItem( int id, int index, const QString& text );
+ virtual void changeItem( int id, int index, const TQString& text );
/**
* Depending on the menuAccelsEnabled property this method will return the
@@ -537,11 +537,11 @@ protected:
* character removed from all items or not.
* @since 3.1
*/
- QStringList comboItems() const;
+ TQStringList comboItems() const;
protected slots:
virtual void slotActivated( int id );
- virtual void slotActivated( const QString &text );
+ virtual void slotActivated( const TQString &text );
virtual void slotActivated();
signals:
@@ -554,7 +554,7 @@ signals:
* This signal is emitted when an item is selected; @param text indicates
* the item selected.
*/
- void activated( const QString& text );
+ void activated( const TQString& text );
protected:
virtual void updateCurrentItem( int id );
@@ -592,19 +592,19 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KListAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0 );
+ KListAction( const TQString& text, const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -613,8 +613,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -623,20 +623,20 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KListAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
@@ -644,19 +644,19 @@ public:
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KListAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( QObject* parent = 0, const char* name = 0 );
+ KListAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -664,7 +664,7 @@ public:
virtual ~KListAction();
- virtual QString currentText() const;
+ virtual TQString currentText() const;
virtual int currentItem() const;
@@ -705,23 +705,23 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -732,8 +732,8 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -744,8 +744,8 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -753,15 +753,15 @@ public:
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -769,15 +769,15 @@ public:
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -785,7 +785,7 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( QObject* parent = 0, const char* name = 0,
+ KRecentFilesAction( TQObject* parent = 0, const char* name = 0,
uint maxItems = 10 );
/**
@@ -793,7 +793,7 @@ public:
*/
virtual ~KRecentFilesAction();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* Returns the maximum of items in the recent files list.
@@ -808,14 +808,14 @@ public:
* matching the pre-3.5 behavior.
*/
- virtual QStringList items() const;
+ virtual TQStringList items() const;
/**
* @return the items that can be selected with this action.
* The returned items contain the pretty name that can be set by addURL.
* @since 3.5
*/
- QStringList completeItems() const;
+ TQStringList completeItems() const;
public slots:
/**
@@ -835,7 +835,7 @@ public slots:
*
* This method does not effect the active group of KConfig.
*/
- void loadEntries( KConfig* config, QString groupname=QString::null );
+ void loadEntries( KConfig* config, TQString groupname=TQString::null );
/**
* Saves the current recent files entries to a given KConfig object.
@@ -844,7 +844,7 @@ public slots:
*
* This method does not effect the active group of KConfig.
*/
- void saveEntries( KConfig* config, QString groupname=QString::null );
+ void saveEntries( KConfig* config, TQString groupname=TQString::null );
/**
* Add URL to recent files list.
@@ -860,7 +860,7 @@ public slots:
* @param name The user visible pretty name that appears before the URL
* @since 3.5
*/
- void addURL( const KURL& url, const QString& name ); //KDE4: Combine the above two methods
+ void addURL( const KURL& url, const TQString& name ); //KDE4: Combine the above two methods
/**
* Remove an URL from the recent files list.
@@ -884,12 +884,12 @@ signals:
void urlSelected( const KURL& url );
protected slots:
- void itemSelected( const QString& string );
+ void itemSelected( const TQString& string );
void menuAboutToShow();
void menuItemActivated( int id );
void slotClicked();
virtual void slotActivated(int);
- virtual void slotActivated(const QString& );
+ virtual void slotActivated(const TQString& );
virtual void slotActivated();
protected:
@@ -905,45 +905,45 @@ private:
class KDEUI_EXPORT KFontAction : public KSelectAction
{
Q_OBJECT
- Q_PROPERTY( QString font READ font WRITE setFont )
+ Q_PROPERTY( TQString font READ font WRITE setFont )
public:
- KFontAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
- KFontAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
// The ctors with fontListCriteria were added after 3.3-beta1.
// This define is used in koffice. Remove when koffice has a dependency on kdelibs-3.3 or more.
#define KFONTACTION_HAS_CRITERIA_ARG
- KFontAction( uint fontListCriteria, const QString& text,
- const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontAction( uint fontListCriteria, const TQString& text,
+ const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontAction( uint fontListCriteria, const QString& text, const QString& pix,
+ KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix,
const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ TQObject* parent = 0, const char* name = 0 );
- KFontAction( QObject* parent = 0, const char* name = 0 );
+ KFontAction( TQObject* parent = 0, const char* name = 0 );
~KFontAction();
- QString font() const {
+ TQString font() const {
return currentText();
}
- int plug( QWidget*widget, int index = -1 );
+ int plug( TQWidget*widget, int index = -1 );
public slots:
- void setFont( const QString &family );
+ void setFont( const TQString &family );
protected:
virtual void virtual_hook( int id, void* data );
@@ -957,21 +957,21 @@ class KDEUI_EXPORT KFontSizeAction : public KSelectAction
Q_OBJECT
Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
public:
- KFontSizeAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontSizeAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
- KFontSizeAction( QObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
+ KFontSizeAction( TQObject* parent = 0, const char* name = 0 );
virtual ~KFontSizeAction();
@@ -982,7 +982,7 @@ public slots:
protected slots:
virtual void slotActivated( int );
- virtual void slotActivated( const QString& );
+ virtual void slotActivated( const TQString& );
virtual void slotActivated() { KAction::slotActivated(); }
signals:
@@ -1017,20 +1017,20 @@ class KDEUI_EXPORT KActionMenu : public KAction
Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
public:
- KActionMenu( const QString& text, QObject* parent = 0,
+ KActionMenu( const TQString& text, TQObject* parent = 0,
const char* name = 0 );
- KActionMenu( const QString& text, const QIconSet& icon,
- QObject* parent = 0, const char* name = 0 );
- KActionMenu( const QString& text, const QString& icon,
- QObject* parent = 0, const char* name = 0 );
- KActionMenu( QObject* parent = 0, const char* name = 0 );
+ KActionMenu( const TQString& text, const TQIconSet& icon,
+ TQObject* parent = 0, const char* name = 0 );
+ KActionMenu( const TQString& text, const TQString& icon,
+ TQObject* parent = 0, const char* name = 0 );
+ KActionMenu( TQObject* parent = 0, const char* name = 0 );
virtual ~KActionMenu();
virtual void insert( KAction*, int index = -1 );
virtual void remove( KAction* );
KPopupMenu* popupMenu() const;
- void popup( const QPoint& global );
+ void popup( const TQPoint& global );
/**
* Returns true if this action creates a delayed popup menu
@@ -1067,7 +1067,7 @@ public:
*/
void setStickyMenu(bool sticky);
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
protected:
virtual void virtual_hook( int id, void* data );
@@ -1102,8 +1102,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* Create a KToolBarPopupAction, with a text, an icon, an accelerator,
@@ -1116,13 +1116,13 @@ public:
* @param icon The icon to display.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent = 0, const char* name = 0 );
+ KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent = 0, const char* name = 0 );
/**
* Create a KToolBarPopupAction, with a KGuiItem, an accelerator,
@@ -1135,17 +1135,17 @@ public:
* @param item The text and icon that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
virtual ~KToolBarPopupAction();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* The popup menu that is shown when clicking (some time) on the toolbar
@@ -1215,13 +1215,13 @@ public:
* toolbar in an xml ui file, or a toolbar programmatically
* created with that name.
*/
- KToggleToolBarAction( const char* toolBarName, const QString& text,
+ KToggleToolBarAction( const char* toolBarName, const TQString& text,
KActionCollection* parent, const char* name );
- KToggleToolBarAction( KToolBar *toolBar, const QString &text,
+ KToggleToolBarAction( KToolBar *toolBar, const TQString &text,
KActionCollection *parent, const char *name );
virtual ~KToggleToolBarAction();
- virtual int plug( QWidget * widget, int index = -1 );
+ virtual int plug( TQWidget * widget, int index = -1 );
KToolBar *toolBar() { return m_toolBar; }
@@ -1229,8 +1229,8 @@ public slots:
virtual void setChecked( bool );
private:
- QCString m_toolBarName;
- QGuardedPtr<KToolBar> m_toolBar;
+ TQCString m_toolBarName;
+ TQGuardedPtr<KToolBar> m_toolBar;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1240,13 +1240,13 @@ private:
/**
* An action for switching between to/from full screen mode. Note that
- * QWidget::isFullScreen() may reflect the new or the old state
+ * TQWidget::isFullScreen() may reflect the new or the old state
* depending on how the action was triggered (by the application or
* from the window manager). Also don't try to track the window state
* yourself. Rely on this action's state (isChecked()) instead.
*
* Important: If you need to set/change the fullscreen state manually,
- * use the relevant QWidget function (showFullScreen etc.), do not
+ * use the relevant TQWidget function (showFullScreen etc.), do not
* call directly the slot connected to the toggled() signal. The slot
* still needs to explicitly set the window state though.
* @since 3.2
@@ -1259,30 +1259,30 @@ public:
* Create a KToggleFullScreenAction
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param window the window that will switch to/from full screen mode
* @param name An internal name for this action.
*/
KToggleFullScreenAction( const KShortcut &cut,
- const QObject* receiver, const char* slot,
- QObject* parent, QWidget* window,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, TQWidget* window,
const char* name );
virtual ~KToggleFullScreenAction();
/**
* Sets the window that will be related to this action.
*/
- void setWindow( QWidget* window );
+ void setWindow( TQWidget* window );
public slots:
virtual void setChecked( bool );
protected:
/**
* @internal
*/
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
- QWidget* window;
+ TQWidget* window;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1304,16 +1304,16 @@ public:
* when plugged. This action may only be plugged into
* a toolbar.
*/
- KWidgetAction( QWidget* widget, const QString& text,
+ KWidgetAction( TQWidget* widget, const TQString& text,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
virtual ~KWidgetAction();
/**
* Returns the widget associated with this action.
*/
- QWidget* widget() { return m_widget; }
+ TQWidget* widget() { return m_widget; }
void setAutoSized( bool );
@@ -1321,16 +1321,16 @@ public:
* Plug the action. The widget passed to the constructor
* will be reparented to w, which must inherit KToolBar.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* Unplug the action. Ensures that the action is not
* destroyed. It will be hidden and reparented to 0L instead.
*/
- virtual void unplug( QWidget *w );
+ virtual void unplug( TQWidget *w );
protected slots:
void slotToolbarDestroyed();
private:
- QGuardedPtr<QWidget> m_widget;
+ TQGuardedPtr<TQWidget> m_widget;
bool m_autoSized;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1343,10 +1343,10 @@ class KDEUI_EXPORT KActionSeparator : public KAction
{
Q_OBJECT
public:
- KActionSeparator( QObject* parent = 0, const char* name = 0 );
+ KActionSeparator( TQObject* parent = 0, const char* name = 0 );
virtual ~KActionSeparator();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
protected:
virtual void virtual_hook( int id, void* data );
@@ -1380,13 +1380,13 @@ public:
* @param icon The icon to display.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KPasteTextAction( const QString& text, const QString& icon, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent = 0, const char* name = 0 );
+ KPasteTextAction( const TQString& text, const TQString& icon, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent = 0, const char* name = 0 );
virtual ~KPasteTextAction();
@@ -1402,7 +1402,7 @@ public:
*/
void setMixedMode(bool mode);
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
protected slots:
void menuAboutToShow();
diff --git a/kdeui/kactioncollection.cpp b/kdeui/kactioncollection.cpp
index 26a3de9b3..e383809c6 100644
--- a/kdeui/kactioncollection.cpp
+++ b/kdeui/kactioncollection.cpp
@@ -34,9 +34,9 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qpopupmenu.h>
-#include <qptrdict.h>
-#include <qvariant.h>
+#include <tqpopupmenu.h>
+#include <tqptrdict.h>
+#include <tqvariant.h>
class KActionCollection::KActionCollectionPrivate
{
@@ -57,28 +57,28 @@ public:
}
KInstance *m_instance;
- QString m_sXMLFile;
+ TQString m_sXMLFile;
bool m_bAutoConnectShortcuts;
//bool m_bOneKAccelOnly;
//int m_iWidgetCurrent;
- //QValueList<QWidget*> m_widgetList;
- //QValueList<KAccel*> m_kaccelList;
- QValueList<KActionCollection*> m_docList;
- QWidget *m_widget;
+ //TQValueList<TQWidget*> m_widgetList;
+ //TQValueList<KAccel*> m_kaccelList;
+ TQValueList<KActionCollection*> m_docList;
+ TQWidget *m_widget;
KAccel *m_kaccel;
KAccel *m_builderKAccel;
- QAsciiDict<KAction> m_actionDict;
- QPtrDict< QPtrList<KAction> > m_dctHighlightContainers;
+ TQAsciiDict<KAction> m_actionDict;
+ TQPtrDict< TQPtrList<KAction> > m_dctHighlightContainers;
bool m_highlight;
KAction *m_currentHighlightAction;
bool m_statusCleared;
const KXMLGUIClient *m_parentGUIClient;
};
-KActionCollection::KActionCollection( QWidget *parent, const char *name,
+KActionCollection::KActionCollection( TQWidget *parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis
d = new KActionCollectionPrivate;
@@ -89,9 +89,9 @@ KActionCollection::KActionCollection( QWidget *parent, const char *name,
}
-KActionCollection::KActionCollection( QWidget *watch, QObject* parent, const char *name,
+KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis
d = new KActionCollectionPrivate;
@@ -103,14 +103,14 @@ KActionCollection::KActionCollection( QWidget *watch, QObject* parent, const cha
#ifndef KDE_NO_COMPAT
// KDE 4: remove
-KActionCollection::KActionCollection( QObject *parent, const char *name,
+KActionCollection::KActionCollection( TQObject *parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
- kdWarning(129) << "KActionCollection::KActionCollection( QObject *parent, const char *name, KInstance *instance )" << endl; //ellis
+ kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, KInstance *instance )" << endl; //ellis
kdDebug(129) << kdBacktrace() << endl;
d = new KActionCollectionPrivate;
- QWidget* w = dynamic_cast<QWidget*>( parent );
+ TQWidget* w = dynamic_cast<TQWidget*>( parent );
if( w )
setWidget( w );
//d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0);
@@ -118,7 +118,7 @@ KActionCollection::KActionCollection( QObject *parent, const char *name,
}
KActionCollection::KActionCollection( const KActionCollection &copy )
- : QObject()
+ : TQObject()
{
kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl;
d = new KActionCollectionPrivate;
@@ -127,7 +127,7 @@ KActionCollection::KActionCollection( const KActionCollection &copy )
#endif // KDE 4: remove end
KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent )
- : QObject( 0L, name )
+ : TQObject( 0L, name )
{
d = new KActionCollectionPrivate;
d->m_parentGUIClient=parent;
@@ -138,7 +138,7 @@ KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *par
KActionCollection::~KActionCollection()
{
kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
if ( pAction->m_parentCollection == this )
pAction->m_parentCollection = 0L;
@@ -149,7 +149,7 @@ KActionCollection::~KActionCollection()
delete d; d = 0;
}
-void KActionCollection::setWidget( QWidget* w )
+void KActionCollection::setWidget( TQWidget* w )
{
//if ( d->m_actionDict.count() > 0 ) {
// kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl;
@@ -180,7 +180,7 @@ bool KActionCollection::addDocCollection( KActionCollection* pDoc )
return true;
}
-void KActionCollection::beginXMLPlug( QWidget *widget )
+void KActionCollection::beginXMLPlug( TQWidget *widget )
{
kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl;
@@ -209,7 +209,7 @@ void KActionCollection::prepareXMLUnplug()
void KActionCollection::unplugShortcuts( KAccel* kaccel )
{
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
pAction->removeKAccel( kaccel );
}
@@ -218,7 +218,7 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel )
d->m_docList[i]->unplugShortcuts( kaccel );
}
-/*void KActionCollection::addWidget( QWidget* w )
+/*void KActionCollection::addWidget( TQWidget* w )
{
if( !d->m_bOneKAccelOnly ) {
kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl;
@@ -234,7 +234,7 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel )
}
}
-void KActionCollection::removeWidget( QWidget* w )
+void KActionCollection::removeWidget( TQWidget* w )
{
if( !d->m_bOneKAccelOnly ) {
kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl;
@@ -242,7 +242,7 @@ void KActionCollection::removeWidget( QWidget* w )
if( d->m_widgetList[i] == w ) {
// Remove KAccel object from children.
KAccel* pKAccel = d->m_kaccelList[i];
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
if ( pAction->m_parentCollection == this ) {
pAction->removeKAccel( pKAccel );
@@ -357,7 +357,7 @@ KAction* KActionCollection::_take( KAction* action )
void KActionCollection::_clear()
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
while ( it.current() )
_remove( it.current() );
}
@@ -378,7 +378,7 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
pAction = d->m_actionDict[ name ];
else {
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
{
if ( ( !name || !strcmp( it.current()->name(), name ) ) &&
@@ -399,18 +399,18 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
KAction* KActionCollection::action( int index ) const
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
it += index;
return it.current();
// return d->m_actions.at( index );
}
-bool KActionCollection::readShortcutSettings( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig )
{
return KActionShortcutList(this).readSettings( sConfigGroup, pConfig );
}
-bool KActionCollection::writeShortcutSettings( const QString& sConfigGroup, KConfigBase* pConfig ) const
+bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) const
{
return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig );
}
@@ -420,11 +420,11 @@ uint KActionCollection::count() const
return d->m_actionDict.count();
}
-QStringList KActionCollection::groups() const
+TQStringList KActionCollection::groups() const
{
- QStringList lst;
+ TQStringList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) )
lst.append( it.current()->group() );
@@ -432,11 +432,11 @@ QStringList KActionCollection::groups() const
return lst;
}
-KActionPtrList KActionCollection::actions( const QString& group ) const
+KActionPtrList KActionCollection::actions( const TQString& group ) const
{
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
if ( it.current()->group() == group )
lst.append( it.current() );
@@ -450,7 +450,7 @@ KActionPtrList KActionCollection::actions() const
{
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
lst.append( it.current() );
@@ -470,12 +470,12 @@ KInstance *KActionCollection::instance() const
return d->m_instance;
}
-void KActionCollection::setXMLFile( const QString& sXMLFile )
+void KActionCollection::setXMLFile( const TQString& sXMLFile )
{
d->m_sXMLFile = sXMLFile;
}
-const QString& KActionCollection::xmlFile() const
+const TQString& KActionCollection::xmlFile() const
{
return d->m_sXMLFile;
}
@@ -490,32 +490,32 @@ bool KActionCollection::highlightingEnabled() const
return d->m_highlight;
}
-void KActionCollection::connectHighlight( QWidget *container, KAction *action )
+void KActionCollection::connectHighlight( TQWidget *container, KAction *action )
{
if ( !d->m_highlight )
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
{
- actionList = new QPtrList<KAction>;
+ actionList = new TQPtrList<KAction>;
- if ( ::qt_cast<QPopupMenu *>( container ) )
+ if ( ::qt_cast<TQPopupMenu *>( container ) )
{
- connect( container, SIGNAL( highlighted( int ) ),
- this, SLOT( slotMenuItemHighlighted( int ) ) );
- connect( container, SIGNAL( aboutToHide() ),
- this, SLOT( slotMenuAboutToHide() ) );
+ connect( container, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( slotMenuItemHighlighted( int ) ) );
+ connect( container, TQT_SIGNAL( aboutToHide() ),
+ this, TQT_SLOT( slotMenuAboutToHide() ) );
}
else if ( ::qt_cast<KToolBar *>( container ) )
{
- connect( container, SIGNAL( highlighted( int, bool ) ),
- this, SLOT( slotToolBarButtonHighlighted( int, bool ) ) );
+ connect( container, TQT_SIGNAL( highlighted( int, bool ) ),
+ this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) );
}
- connect( container, SIGNAL( destroyed() ),
- this, SLOT( slotDestroyed() ) );
+ connect( container, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotDestroyed() ) );
d->m_dctHighlightContainers.insert( container, actionList );
}
@@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
actionList->append( action );
}
-void KActionCollection::disconnectHighlight( QWidget *container, KAction *action )
+void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action )
{
if ( !d->m_highlight )
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
return;
@@ -547,7 +547,7 @@ void KActionCollection::slotMenuItemHighlighted( int id )
if ( d->m_currentHighlightAction )
emit actionHighlighted( d->m_currentHighlightAction, false );
- QWidget *container = static_cast<QWidget *>( const_cast<QObject *>( sender() ) );
+ TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() ) );
d->m_currentHighlightAction = findAction( container, id );
@@ -581,7 +581,7 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight )
if ( !d->m_highlight )
return;
- QWidget *container = static_cast<QWidget *>( const_cast<QObject *>( sender() ) );
+ TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() ) );
KAction *action = findAction( container, id );
@@ -606,17 +606,17 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight )
void KActionCollection::slotDestroyed()
{
- d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<QObject *>(sender()) ) );
+ d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject *>(sender()) ) );
}
-KAction *KActionCollection::findAction( QWidget *container, int id )
+KAction *KActionCollection::findAction( TQWidget *container, int id )
{
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
if ( !actionList )
return 0;
- QPtrListIterator<KAction> it( *actionList );
+ TQPtrListIterator<KAction> it( *actionList );
for (; it.current(); ++it )
if ( it.current()->isPlugged( container, id ) )
return it.current();
@@ -636,9 +636,9 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons
kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl;
KActionCollection ret( *this );
- QValueList<KAction *> actions = c.actions();
- QValueList<KAction *>::ConstIterator it = actions.begin();
- QValueList<KAction *>::ConstIterator end = actions.end();
+ TQValueList<KAction *> actions = c.actions();
+ TQValueList<KAction *>::ConstIterator it = actions.begin();
+ TQValueList<KAction *>::ConstIterator end = actions.end();
for (; it != end; ++it )
ret.insert( *it );
@@ -662,7 +662,7 @@ KActionCollection &KActionCollection::operator=( const KActionCollection &copy )
KActionCollection &KActionCollection::operator+=( const KActionCollection &c )
{
kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl;
- QAsciiDictIterator<KAction> it(c.d->m_actionDict);
+ TQAsciiDictIterator<KAction> it(c.d->m_actionDict);
for ( ; it.current(); ++it )
insert( it.current() );
@@ -681,11 +681,11 @@ KActionShortcutList::~KActionShortcutList()
{ }
uint KActionShortcutList::count() const
{ return m_actions.count(); }
-QString KActionShortcutList::name( uint i ) const
+TQString KActionShortcutList::name( uint i ) const
{ return m_actions.action(i)->name(); }
-QString KActionShortcutList::label( uint i ) const
+TQString KActionShortcutList::label( uint i ) const
{ return m_actions.action(i)->text(); }
-QString KActionShortcutList::whatsThis( uint i ) const
+TQString KActionShortcutList::whatsThis( uint i ) const
{ return m_actions.action(i)->whatsThis(); }
const KShortcut& KActionShortcutList::shortcut( uint i ) const
{ return m_actions.action(i)->shortcut(); }
@@ -697,9 +697,9 @@ bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions.action(i)->setShortcut( cut ); }
const KInstance* KActionShortcutList::instance() const
{ return m_actions.instance(); }
-QVariant KActionShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
-bool KActionShortcutList::setOther( Other, uint, QVariant )
+TQVariant KActionShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
+bool KActionShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
const KAction *KActionShortcutList::action( uint i) const
{ return m_actions.action(i); }
@@ -707,36 +707,36 @@ const KAction *KActionShortcutList::action( uint i) const
bool KActionShortcutList::save() const
{
const KXMLGUIClient* guiClient=m_actions.parentGUIClient();
- const QString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile();
+ const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile();
kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl;
if( m_actions.xmlFile().isEmpty() )
return writeSettings();
- QString attrShortcut = QString::fromLatin1("shortcut");
- QString attrAccel = QString::fromLatin1("accel"); // Depricated attribute
+ TQString attrShortcut = TQString::fromLatin1("shortcut");
+ TQString attrAccel = TQString::fromLatin1("accel"); // Depricated attribute
// Read XML file
- QString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) );
- QDomDocument doc;
+ TQString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) );
+ TQDomDocument doc;
doc.setContent( sXml );
// Process XML data
// Get hold of ActionProperties tag
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement( doc );
+ TQDomElement elem = KXMLGUIFactory::actionPropertiesElement( doc );
// now, iterate through our actions
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
- const QString& sName = name(i);
+ const TQString& sName = name(i);
bool bSameAsDefault = (shortcut(i) == shortcutDefault(i));
//kdDebug(129) << "name = " << sName << " shortcut = " << shortcut(i).toStringInternal() << " def = " << shortcutDefault(i).toStringInternal() << endl;
// now see if this element already exists
// and create it if necessary (unless bSameAsDefault)
- QDomElement act_elem = KXMLGUIFactory::findActionByName( elem, sName, !bSameAsDefault );
+ TQDomElement act_elem = KXMLGUIFactory::findActionByName( elem, sName, !bSameAsDefault );
if ( act_elem.isNull() )
continue;
@@ -766,11 +766,11 @@ KActionPtrShortcutList::~KActionPtrShortcutList()
{ }
uint KActionPtrShortcutList::count() const
{ return m_actions.count(); }
-QString KActionPtrShortcutList::name( uint i ) const
+TQString KActionPtrShortcutList::name( uint i ) const
{ return m_actions[i]->name(); }
-QString KActionPtrShortcutList::label( uint i ) const
+TQString KActionPtrShortcutList::label( uint i ) const
{ return m_actions[i]->text(); }
-QString KActionPtrShortcutList::whatsThis( uint i ) const
+TQString KActionPtrShortcutList::whatsThis( uint i ) const
{ return m_actions[i]->whatsThis(); }
const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const
{ return m_actions[i]->shortcut(); }
@@ -780,9 +780,9 @@ bool KActionPtrShortcutList::isConfigurable( uint i ) const
{ return m_actions[i]->isShortcutConfigurable(); }
bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions[i]->setShortcut( cut ); }
-QVariant KActionPtrShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
-bool KActionPtrShortcutList::setOther( Other, uint, QVariant )
+TQVariant KActionPtrShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
+bool KActionPtrShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool KActionPtrShortcutList::save() const
{ return false; }
diff --git a/kdeui/kactioncollection.h b/kdeui/kactioncollection.h
index cf3c88e81..5d30318fb 100644
--- a/kdeui/kactioncollection.h
+++ b/kdeui/kactioncollection.h
@@ -27,10 +27,10 @@
#include <kaction.h>
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -56,7 +56,7 @@ class KPopupMenu;
class KMainWindow;
class KXMLGUIClient;
-typedef QValueList<KAction *> KActionPtrList;
+typedef TQValueList<KAction *> KActionPtrList;
/**
* A managed set of KAction objects.
@@ -69,10 +69,10 @@ typedef QValueList<KAction *> KActionPtrList;
*
* \code
* actionCollection()->setHighlightingEnabled(true);
- * connect(actionCollection(), SIGNAL( actionStatusText( const QString & ) ),
- * statusBar(), SLOT( message( const QString & ) ) );
- * connect(actionCollection(), SIGNAL( clearStatusText() ),
- * statusBar(), SLOT( clear() ) );
+ * connect(actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ),
+ * statusBar(), TQT_SLOT( message( const TQString & ) ) );
+ * connect(actionCollection(), TQT_SIGNAL( clearStatusText() ),
+ * statusBar(), TQT_SLOT( clear() ) );
* \endcode
*/
class KDEUI_EXPORT KActionCollection : public QObject
@@ -83,13 +83,13 @@ class KDEUI_EXPORT KActionCollection : public QObject
Q_OBJECT
public:
- KActionCollection( QWidget *parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQWidget *parent, const char *name = 0, KInstance *instance = 0 );
/**
* Use this constructor if you want the collection's actions to restrict
* their accelerator keys to @p watch rather than the @p parent. If
* you don't require shortcuts, you can pass a null to the @p watch parameter.
*/
- KActionCollection( QWidget *watch, QObject* parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, KInstance *instance = 0 );
#ifndef KDE_NO_COMPAT
KActionCollection( const KActionCollection &copy );
#endif
@@ -99,7 +99,7 @@ public:
* This sets the widget to which the keyboard shortcuts should be attached.
* You only need to call this if a null pointer was passed in the constructor.
*/
- virtual void setWidget( QWidget *widget );
+ virtual void setWidget( TQWidget *widget );
/**
* This indicates whether new actions which are created in this collection
@@ -179,23 +179,23 @@ public:
* @see KAction::group()
* @see KAction::setGroup()
*/
- virtual QStringList groups() const;
+ virtual TQStringList groups() const;
/**
* Returns the list of actions in a particular group managed by this action collection.
* @param group The name of the group.
*/
- virtual KActionPtrList actions( const QString& group ) const;
+ virtual KActionPtrList actions( const TQString& group ) const;
/** Returns the list of actions managed by this action collection. */
virtual KActionPtrList actions() const;
/**
* Used for reading shortcut configuration from a non-XML rc file.
*/
- bool readShortcutSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 );
+ bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 );
/**
* Used for writing shortcut configuration to a non-XML rc file.
*/
- bool writeShortcutSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 ) const;
+ bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ) const;
void setInstance( KInstance *instance );
/** The instance with which this class is associated. */
@@ -204,11 +204,11 @@ public:
/**
* @deprecated
*/
- void setXMLFile( const QString& );
+ void setXMLFile( const TQString& );
/**
* @deprecated
*/
- const QString& xmlFile() const;
+ const TQString& xmlFile() const;
//TODO FOR KDE4 make this default true
/**
@@ -238,7 +238,7 @@ public:
* This is only needed if you do not add this action to this container.
* You will generally not need to call this function.
*
- * @param container A container in which the KAction is plugged (must inherit QPopupMenu or KToolBar)
+ * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
* @param action The action you are interested in
* @see disconnectHighlight()
* @see actionHighlighted()
@@ -246,13 +246,13 @@ public:
* @see highlightingEnabled()
* @see actionHighlighted()
*/
- void connectHighlight( QWidget *container, KAction *action );
+ void connectHighlight( TQWidget *container, KAction *action );
/**
* Disconnect highlight notifications for a particular pair of contianer and action.
* This is only needed if you do not add this action to this container.
* You will generally not need to call this function.
*
- * @param container A container in which the KAction is plugged (must inherit QPopupMenu or KToolBar)
+ * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
* @param action The action you are interested in
* @see connectHighlight()
* @see actionHighlighted()
@@ -260,7 +260,7 @@ public:
* @see highlightingEnabled()
* @see actionHighlighted()
*/
- void disconnectHighlight( QWidget *container, KAction *action );
+ void disconnectHighlight( TQWidget *container, KAction *action );
/**
* The parent KXMLGUIClient, return 0L if not available.
@@ -298,7 +298,7 @@ signals:
*
* @see setHighlightingEnabled()
*/
- void actionStatusText( const QString &text );
+ void actionStatusText( const TQString &text );
/** Emitted when an action loses highlighting.
* This is only emitted if you have setHighlightingEnabled()
*
@@ -313,7 +313,7 @@ private:
* widget it should connect widget-scope actions to, and what
* main window it should connect
*/
- void beginXMLPlug( QWidget *widget );
+ void beginXMLPlug( TQWidget *widget );
void endXMLPlug();
/** @internal. Only to be called by KXMLGUIFactory::removeClient() */
void prepareXMLUnplug();
@@ -331,11 +331,11 @@ private slots:
void slotDestroyed();
private:
- KAction *findAction( QWidget *container, int id );
+ KAction *findAction( TQWidget *container, int id );
#ifndef KDE_NO_COMPAT
public:
- KActionCollection( QObject *parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQObject *parent, const char *name = 0, KInstance *instance = 0 );
#endif
public:
diff --git a/kdeui/kactionselector.cpp b/kdeui/kactionselector.cpp
index 68d1094f4..a34582d35 100644
--- a/kdeui/kactionselector.cpp
+++ b/kdeui/kactionselector.cpp
@@ -23,37 +23,37 @@
#include <kiconloader.h>
#include <kdialog.h> // for spacingHint()
#include <kdebug.h>
-#include <qapplication.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqwhatsthis.h>
class KActionSelectorPrivate {
public:
- QListBox *availableListBox, *selectedListBox;
- QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
- QLabel *lAvailable, *lSelected;
+ TQListBox *availableListBox, *selectedListBox;
+ TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
+ TQLabel *lAvailable, *lSelected;
bool moveOnDoubleClick, keyboardEnabled;
KActionSelector::ButtonIconSize iconSize;
- QString addIcon, removeIcon, upIcon, downIcon;
+ TQString addIcon, removeIcon, upIcon, downIcon;
KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy;
bool showUpDownButtons;
};
//BEGIN Constructor/destructor
-KActionSelector::KActionSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KActionSelector::KActionSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new KActionSelectorPrivate();
d->moveOnDoubleClick = true;
d->keyboardEnabled = true;
d->iconSize = SmallIcon;
- d->addIcon = QApplication::reverseLayout()? "back" : "forward";
- d->removeIcon = QApplication::reverseLayout()? "forward" : "back";
+ d->addIcon = TQApplication::reverseLayout()? "back" : "forward";
+ d->removeIcon = TQApplication::reverseLayout()? "forward" : "back";
d->upIcon = "up";
d->downIcon = "down";
d->availableInsertionPolicy = Sorted;
@@ -62,55 +62,55 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name )
//int isz = IconSize( KIcon::Small );
- QHBoxLayout *lo = new QHBoxLayout( this );
+ TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- d->lAvailable = new QLabel( i18n("&Available:"), this );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ d->lAvailable = new TQLabel( i18n("&Available:"), this );
loAv->addWidget( d->lAvailable );
- d->availableListBox = new QListBox( this );
+ d->availableListBox = new TQListBox( this );
loAv->addWidget( d->availableListBox );
d->lAvailable->setBuddy( d->availableListBox );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- d->btnAdd = new QToolButton( this );
+ d->btnAdd = new TQToolButton( this );
loHBtns->addWidget( d->btnAdd );
- d->btnRemove = new QToolButton( this );
+ d->btnRemove = new TQToolButton( this );
loHBtns->addWidget( d->btnRemove );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- d->lSelected = new QLabel( i18n("&Selected:"), this );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ d->lSelected = new TQLabel( i18n("&Selected:"), this );
loS->addWidget( d->lSelected );
- d->selectedListBox = new QListBox( this );
+ d->selectedListBox = new TQListBox( this );
loS->addWidget( d->selectedListBox );
d->lSelected->setBuddy( d->selectedListBox );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- d->btnUp = new QToolButton( this );
+ d->btnUp = new TQToolButton( this );
d->btnUp->setAutoRepeat( true );
loVBtns->addWidget( d->btnUp );
- d->btnDown = new QToolButton( this );
+ d->btnDown = new TQToolButton( this );
d->btnDown->setAutoRepeat( true );
loVBtns->addWidget( d->btnDown );
loVBtns->addStretch( 1 );
loadIcons();
- connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) );
- connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) );
- connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) );
- connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) );
- connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
- connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
+ connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) );
+ connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) );
+ connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) );
+ connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) );
+ connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
+ connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
d->availableListBox->installEventFilter( this );
d->selectedListBox->installEventFilter( this );
@@ -125,17 +125,17 @@ KActionSelector::~KActionSelector()
//BEGIN Public Methods
-QListBox *KActionSelector::availableListBox() const
+TQListBox *KActionSelector::availableListBox() const
{
return d->availableListBox;
}
-QListBox *KActionSelector::selectedListBox() const
+TQListBox *KActionSelector::selectedListBox() const
{
return d->selectedListBox;
}
-void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
+void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{
switch ( button )
{
@@ -160,7 +160,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
}
}
-void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button )
+void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button )
{
switch ( button )
{
@@ -181,7 +181,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt
}
}
-void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
+void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button )
{
switch ( button )
{
@@ -202,21 +202,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
}
}
-void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button )
+void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button )
{
switch ( button )
{
case ButtonAdd:
- QWhatsThis::add( d->btnAdd, text );
+ TQWhatsThis::add( d->btnAdd, text );
break;
case ButtonRemove:
- QWhatsThis::add( d->btnRemove, text );
+ TQWhatsThis::add( d->btnRemove, text );
break;
case ButtonUp:
- QWhatsThis::add( d->btnUp, text );
+ TQWhatsThis::add( d->btnUp, text );
break;
case ButtonDown:
- QWhatsThis::add( d->btnDown, text );
+ TQWhatsThis::add( d->btnDown, text );
break;
default:
kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl;
@@ -256,22 +256,22 @@ void KActionSelector::setKeyboardEnabled( bool b )
d->keyboardEnabled = b;
}
-QString KActionSelector::availableLabel() const
+TQString KActionSelector::availableLabel() const
{
return d->lAvailable->text();
}
-void KActionSelector::setAvailableLabel( const QString &text )
+void KActionSelector::setAvailableLabel( const TQString &text )
{
d->lAvailable->setText( text );
}
-QString KActionSelector::selectedLabel() const
+TQString KActionSelector::selectedLabel() const
{
return d->lSelected->text();
}
-void KActionSelector::setSelectedLabel( const QString &text )
+void KActionSelector::setSelectedLabel( const TQString &text )
{
d->lSelected->setText( text );
}
@@ -340,7 +340,7 @@ void KActionSelector::polish()
//END Public Slots
//BEGIN Protected
-void KActionSelector::keyPressEvent( QKeyEvent *e )
+void KActionSelector::keyPressEvent( TQKeyEvent *e )
{
if ( ! d->keyboardEnabled ) return;
if ( (e->state() & Qt::ControlButton) )
@@ -366,13 +366,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e )
}
}
-bool KActionSelector::eventFilter( QObject *o, QEvent *e )
+bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
{
- if ( d->keyboardEnabled && e->type() == QEvent::KeyPress )
+ if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress )
{
- if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) )
+ if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Right:
buttonAddClicked();
@@ -387,18 +387,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
buttonDownClicked();
break;
default:
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
break;
}
return true;
}
- else if ( o->inherits( "QListBox" ) )
+ else if ( o->inherits( "TQListBox" ) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Return:
case Key_Enter:
- QListBox *lb = (QListBox*)o;
+ TQListBox *lb = (TQListBox*)o;
int index = lb->currentItem();
if ( index < 0 ) break;
moveItem( lb->item( index ) );
@@ -406,7 +406,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -416,7 +416,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
void KActionSelector::buttonAddClicked()
{
// move all selected items from available to selected listbox
- QListBoxItem *item = d->availableListBox->firstItem();
+ TQListBoxItem *item = d->availableListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->availableListBox->takeItem( item );
@@ -434,7 +434,7 @@ void KActionSelector::buttonAddClicked()
void KActionSelector::buttonRemoveClicked()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = d->selectedListBox->firstItem();
+ TQListBoxItem *item = d->selectedListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->selectedListBox->takeItem( item );
@@ -453,7 +453,7 @@ void KActionSelector::buttonUpClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 1 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c-1 );
d->selectedListBox->setCurrentItem( item );
@@ -464,14 +464,14 @@ void KActionSelector::buttonDownClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 || c == int( d->selectedListBox->count() ) - 1 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c+1 );
d->selectedListBox->setCurrentItem( item );
emit movedDown( item );
}
-void KActionSelector::itemDoubleClicked( QListBoxItem *item )
+void KActionSelector::itemDoubleClicked( TQListBoxItem *item )
{
if ( d->moveOnDoubleClick )
moveItem( item );
@@ -489,10 +489,10 @@ void KActionSelector::loadIcons()
d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) );
}
-void KActionSelector::moveItem( QListBoxItem *item )
+void KActionSelector::moveItem( TQListBoxItem *item )
{
- QListBox *lbFrom = item->listBox();
- QListBox *lbTo;
+ TQListBox *lbFrom = item->listBox();
+ TQListBox *lbTo;
if ( lbFrom == d->availableListBox )
lbTo = d->selectedListBox;
else if ( lbFrom == d->selectedListBox )
@@ -516,7 +516,7 @@ void KActionSelector::moveItem( QListBoxItem *item )
emit removed( item );
}
-int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy )
+int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy )
{
int index;
switch ( policy )
diff --git a/kdeui/kactionselector.h b/kdeui/kactionselector.h
index b41412266..bba4e31da 100644
--- a/kdeui/kactionselector.h
+++ b/kdeui/kactionselector.h
@@ -19,7 +19,7 @@
#ifndef _KACTION_SELECTOR_H_
#define _KACTION_SELECTOR_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -48,13 +48,13 @@ class KActionSelectorPrivate;
see keyboardEnabled.
Note that this may conflist with keyboard selection in the selected list box,
- if you set that to anything else than QListBox::Single (which is the default).
+ if you set that to anything else than TQListBox::Single (which is the default).
To use it, simply construct an instance and then add items to the two listboxes,
available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve
- the selected options using QListBox methods on lbSelected().
+ the selected options using TQListBox methods on lbSelected().
- This way, you can use your own QListBoxItem class, allowing you to easily
+ This way, you can use your own TQListBoxItem class, allowing you to easily
store object data in those.
When an item is moved to a listbox, it is placed below the current item
@@ -76,31 +76,31 @@ class KActionSelectorPrivate;
@author Anders Lund <anders@alweb.dk>
*/
-class KDEUI_EXPORT KActionSelector : public QWidget {
+class KDEUI_EXPORT KActionSelector : public TQWidget {
Q_OBJECT
Q_ENUMS( ButtonIconSize InsertionPolicy )
Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
- Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel )
- Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel )
+ Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
+ Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
public:
- KActionSelector( QWidget *parent=0, const char *name=0 );
+ KActionSelector( TQWidget *parent=0, const char *name=0 );
~KActionSelector();
/**
- @return The QListBox holding the available actions
+ @return The TQListBox holding the available actions
*/
- QListBox *availableListBox() const;
+ TQListBox *availableListBox() const;
/**
- @return The QListBox holding the selected actions
+ @return The TQListBox holding the selected actions
*/
- QListBox *selectedListBox() const;
+ TQListBox *selectedListBox() const;
/**
This enum indentifies the moving buttons
@@ -193,7 +193,7 @@ public:
/**
@return The text of the label for the available items listbox.
*/
- QString availableLabel() const;
+ TQString availableLabel() const;
/**
Sets the label for the available items listbox to @p text.
@@ -201,12 +201,12 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setAvailableLabel( const QString & text );
+ void setAvailableLabel( const TQString & text );
/**
@return the label of the selected items listbox.
*/
- QString selectedLabel() const;
+ TQString selectedLabel() const;
/**
Sets the label for the selected items listbox to @p text.
@@ -214,7 +214,7 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setSelectedLabel( const QString & text );
+ void setSelectedLabel( const TQString & text );
/**
@return the current ButtonIconSize.
@@ -268,25 +268,25 @@ public:
Sets the pixmap of the button @p button to @p icon.
It calls SmallIconSet(pm) to generate the icon set.
*/
- void setButtonIcon( const QString &icon, MoveButton button );
+ void setButtonIcon( const TQString &icon, MoveButton button );
/**
Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either
- created by QIconSet, or use the application instance of
+ created by TQIconSet, or use the application instance of
KIconLoader (recommended).
*/
- void setButtonIconSet( const QIconSet &iconset, MoveButton button );
+ void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
/**
Sets the tooltip for the button @p button to @p tip.
*/
- void setButtonTooltip( const QString &tip, MoveButton button );
+ void setButtonTooltip( const TQString &tip, MoveButton button );
/**
Sets the whatsthis help for button @p button to @p text.
*/
- void setButtonWhatsThis( const QString &text, MoveButton button );
+ void setButtonWhatsThis( const TQString &text, MoveButton button );
/**
Sets the enabled state of all moving buttons to reflect the current
@@ -301,27 +301,27 @@ signals:
/**
Emitted when an item is moved to the "selected" listbox.
*/
- void added( QListBoxItem *item );
+ void added( TQListBoxItem *item );
/**
Emitted when an item is moved out of the "selected" listbox.
*/
- void removed( QListBoxItem *item );
+ void removed( TQListBoxItem *item );
/**
Emitted when an item is moved upwards in the "selected" listbox.
*/
- void movedUp( QListBoxItem *item );
+ void movedUp( TQListBoxItem *item );
/**
Emitted when an item is moved downwards in the "selected" listbox.
*/
- void movedDown( QListBoxItem *item );
+ void movedDown( TQListBoxItem *item );
/**
Emitted when an item is moved to the "selected" listbox.
*/
-// void addedToSelection( QListBoxItem *item );
+// void addedToSelection( TQListBoxItem *item );
public slots:
/**
@@ -334,12 +334,12 @@ protected:
/**
Reimplamented for internal reasons.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
/**
Reimplemented for internal reasons.
*/
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
/**
@@ -365,19 +365,19 @@ private slots:
/**
Moves the item @p item to the other listbox if moveOnDoubleClick is enabled.
*/
- void itemDoubleClicked( QListBoxItem *item );
+ void itemDoubleClicked( TQListBoxItem *item );
/**
connected to both list boxes to set the buttons enabled
*/
- void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); }
+ void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); }
private:
/**
Move item @p item to the other listbox
*/
- void moveItem( QListBoxItem *item );
+ void moveItem( TQListBoxItem *item );
/**
loads the icons for the move buttons.
@@ -391,7 +391,7 @@ private:
Note that if policy is Sorted, this will return -1.
Sort the listbox after inserting the item in that case.
*/
- int insertionIndex( QListBox *lb, InsertionPolicy policy );
+ int insertionIndex( TQListBox *lb, InsertionPolicy policy );
/** @private
Private data storage
diff --git a/kdeui/kactionshortcutlist.h b/kdeui/kactionshortcutlist.h
index 322f507d0..a7b8d303e 100644
--- a/kdeui/kactionshortcutlist.h
+++ b/kdeui/kactionshortcutlist.h
@@ -16,9 +16,9 @@ class KDEUI_EXPORT KActionShortcutList : public KShortcutList
virtual ~KActionShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
@@ -26,8 +26,8 @@ class KDEUI_EXPORT KActionShortcutList : public KShortcutList
virtual const KInstance* instance() const;
- virtual QVariant getOther( Other, uint index ) const;
- virtual bool setOther( Other, uint index, QVariant );
+ virtual TQVariant getOther( Other, uint index ) const;
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
@@ -54,16 +54,16 @@ class KDEUI_EXPORT KActionPtrShortcutList : public KShortcutList
virtual ~KActionPtrShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
virtual bool setShortcut( uint index, const KShortcut& shortcut);
- virtual QVariant getOther( Other, uint index ) const;
- virtual bool setOther( Other, uint index, QVariant );
+ virtual TQVariant getOther( Other, uint index ) const;
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
diff --git a/kdeui/kactivelabel.cpp b/kdeui/kactivelabel.cpp
index 5efdea418..c01a91d41 100644
--- a/kdeui/kactivelabel.cpp
+++ b/kdeui/kactivelabel.cpp
@@ -20,19 +20,19 @@
#include "kactivelabel.h"
#include <kapplication.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qsimplerichtext.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqsimplerichtext.h>
#include <kdebug.h>
-KActiveLabel::KActiveLabel(QWidget * parent, const char * name)
- : QTextBrowser(parent, name)
+KActiveLabel::KActiveLabel(TQWidget * parent, const char * name)
+ : TQTextBrowser(parent, name)
{
init();
}
-KActiveLabel::KActiveLabel(const QString &text, QWidget * parent, const char * name)
- : QTextBrowser(parent, name)
+KActiveLabel::KActiveLabel(const TQString &text, TQWidget * parent, const char * name)
+ : TQTextBrowser(parent, name)
{
init();
setText(text);
@@ -41,38 +41,38 @@ KActiveLabel::KActiveLabel(const QString &text, QWidget * parent, const char * n
void KActiveLabel::init()
{
setTextFormat(Qt::RichText);
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
- setFocusPolicy( QWidget::TabFocus );
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setFrameStyle(TQFrame::NoFrame);
+ setFocusPolicy( TQWidget::TabFocus );
paletteChanged();
- connect(this, SIGNAL(linkClicked(const QString &)),
- this, SLOT(openLink(const QString &)));
+ connect(this, TQT_SIGNAL(linkClicked(const TQString &)),
+ this, TQT_SLOT(openLink(const TQString &)));
if (kapp)
{
- connect(kapp, SIGNAL(kdisplayPaletteChanged()),
- this, SLOT(paletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()),
+ this, TQT_SLOT(paletteChanged()));
}
}
void KActiveLabel::paletteChanged()
{
- QPalette p = kapp ? kapp->palette() : palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Text, p.color(QPalette::Normal, QColorGroup::Foreground));
+ TQPalette p = kapp ? kapp->palette() : palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
setPalette(p);
}
-void KActiveLabel::openLink(const QString & link)
+void KActiveLabel::openLink(const TQString & link)
{
- QRegExp whatsthis("whatsthis:/*([^/].*)");
+ TQRegExp whatsthis("whatsthis:/*([^/].*)");
if (whatsthis.exactMatch(link)) {
- QWhatsThis::display(whatsthis.cap(1));
+ TQWhatsThis::display(whatsthis.cap(1));
return;
}
- QStringList args;
+ TQStringList args;
args << "exec" << link;
kapp->kdeinitExec("kfmclient", args);
}
@@ -80,21 +80,21 @@ void KActiveLabel::openLink(const QString & link)
void KActiveLabel::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KActiveLabel::focusInEvent( QFocusEvent* fe )
+void KActiveLabel::focusInEvent( TQFocusEvent* fe )
{
- QTextBrowser::focusInEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+ TQTextBrowser::focusInEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(true);
}
-void KActiveLabel::focusOutEvent( QFocusEvent* fe )
+void KActiveLabel::focusOutEvent( TQFocusEvent* fe )
{
- QTextBrowser::focusOutEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+ TQTextBrowser::focusOutEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(false);
}
-void KActiveLabel::keyPressEvent( QKeyEvent *e )
+void KActiveLabel::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -104,16 +104,16 @@ void KActiveLabel::keyPressEvent( QKeyEvent *e )
case Key_Right:
// jump over QTextEdit's key navigation breakage.
// we're not interested in keyboard navigation within the text
- QWidget::keyPressEvent( e );
+ TQWidget::keyPressEvent( e );
break;
default:
- QTextBrowser::keyPressEvent( e );
+ TQTextBrowser::keyPressEvent( e );
}
}
-QSize KActiveLabel::minimumSizeHint() const
+TQSize KActiveLabel::minimumSizeHint() const
{
- QSize ms = minimumSize();
+ TQSize ms = minimumSize();
if ((ms.width() > 0) && (ms.height() > 0))
return ms;
@@ -121,8 +121,8 @@ QSize KActiveLabel::minimumSizeHint() const
if (ms.width() > 0)
w = ms.width();
- QString txt = text();
- QSimpleRichText rt(txt, font());
+ TQString txt = text();
+ TQSimpleRichText rt(txt, font());
rt.setWidth(w - 2*frameWidth() - 10);
w = 10 + rt.widthUsed() + 2*frameWidth();
if (w < ms.width())
@@ -131,10 +131,10 @@ QSize KActiveLabel::minimumSizeHint() const
if ( h < ms.height())
h = ms.height();
- return QSize(w, h);
+ return TQSize(w, h);
}
-QSize KActiveLabel::sizeHint() const
+TQSize KActiveLabel::sizeHint() const
{
return minimumSizeHint();
}
diff --git a/kdeui/kactivelabel.h b/kdeui/kactivelabel.h
index ad5dd12b5..8ab2bacf2 100644
--- a/kdeui/kactivelabel.h
+++ b/kdeui/kactivelabel.h
@@ -19,7 +19,7 @@
#ifndef _KACTIVELABEL_H_
#define _KACTIVELABEL_H_
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <kdelibs_export.h>
@@ -41,23 +41,23 @@ public:
/**
* Constructor.
*
- * It connects the "linkClicked(const QString &)" signal to the
- * "openLink(const QString &)" slot. You will need to disconnect
+ * It connects the "linkClicked(const TQString &)" signal to the
+ * "openLink(const TQString &)" slot. You will need to disconnect
* this if you want to process linkClicked() yourself.
*/
- KActiveLabel(QWidget * parent, const char * name = 0);
+ KActiveLabel(TQWidget * parent, const char * name = 0);
/**
* Constructor.
*
- * It connects the "linkClicked(const QString &)" signal to the
- * "openLink(const QString &)" slot. You will need to disconnect
+ * It connects the "linkClicked(const TQString &)" signal to the
+ * "openLink(const TQString &)" slot. You will need to disconnect
* this if you want to process linkClicked() yourself.
*/
- KActiveLabel(const QString & text, QWidget * parent, const char * name = 0);
+ KActiveLabel(const TQString & text, TQWidget * parent, const char * name = 0);
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
public slots:
/**
@@ -67,19 +67,19 @@ public slots:
* box will appear and then display the rest of the text. The WhatsThis
* functionality is available since KDE 3.2.
*/
- virtual void openLink(const QString & link);
+ virtual void openLink(const TQString & link);
private slots:
void paletteChanged();
- void setSource( const QString &) { }
+ void setSource( const TQString &) { }
private:
void init();
protected:
virtual void virtual_hook( int id, void* data );
- virtual void focusInEvent( QFocusEvent* fe );
- virtual void focusOutEvent( QFocusEvent* fe );
- virtual void keyPressEvent ( QKeyEvent * e );
+ virtual void focusInEvent( TQFocusEvent* fe );
+ virtual void focusOutEvent( TQFocusEvent* fe );
+ virtual void keyPressEvent ( TQKeyEvent * e );
private:
KActiveLabelPrivate *d;
};
diff --git a/kdeui/kanimwidget.cpp b/kdeui/kanimwidget.cpp
index 8d5ca6b6c..5ff1037d5 100644
--- a/kdeui/kanimwidget.cpp
+++ b/kdeui/kanimwidget.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
#include <kanimwidget.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <ktoolbar.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -34,21 +34,21 @@ public:
bool transparent : 1;
int frames;
int current_frame;
- QPixmap pixmap;
- QTimer timer;
- QString icon_name;
+ TQPixmap pixmap;
+ TQTimer timer;
+ TQString icon_name;
int size;
};
-KAnimWidget::KAnimWidget( const QString& icons, int size, QWidget *parent,
+KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent,
const char *name )
- : QFrame( parent, name ),
+ : TQFrame( parent, name ),
d( new KAnimWidgetPrivate )
{
- connect( &d->timer, SIGNAL(timeout()), this, SLOT(slotTimerUpdate()));
+ connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate()));
if (parent && parent->inherits( "KToolBar" ))
- connect(parent, SIGNAL(modechange()), this, SLOT(updateIcons()));
+ connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons()));
d->loadingCompleted = false;
d->size = size;
@@ -86,7 +86,7 @@ void KAnimWidget::setSize( int size )
updateIcons();
}
-void KAnimWidget::setIcons( const QString& icons )
+void KAnimWidget::setIcons( const TQString& icons )
{
if ( d->icon_name == icons )
return;
@@ -95,7 +95,7 @@ void KAnimWidget::setIcons( const QString& icons )
updateIcons();
}
-QString KAnimWidget::icons( ) const
+TQString KAnimWidget::icons( ) const
{
return d->icon_name;
}
@@ -106,47 +106,47 @@ int KAnimWidget::size( ) const
}
-void KAnimWidget::showEvent(QShowEvent* e)
+void KAnimWidget::showEvent(TQShowEvent* e)
{
if (!d->initDone)
{
d->initDone = true;
updateIcons();
}
- QFrame::showEvent(e);
+ TQFrame::showEvent(e);
}
-void KAnimWidget::hideEvent(QHideEvent* e)
+void KAnimWidget::hideEvent(TQHideEvent* e)
{
- QFrame::hideEvent(e);
+ TQFrame::hideEvent(e);
}
-void KAnimWidget::enterEvent( QEvent *e )
+void KAnimWidget::enterEvent( TQEvent *e )
{
setFrameStyle( Panel | Raised );
- QFrame::enterEvent( e );
+ TQFrame::enterEvent( e );
}
-void KAnimWidget::leaveEvent( QEvent *e )
+void KAnimWidget::leaveEvent( TQEvent *e )
{
setFrameStyle( StyledPanel | Sunken );
- QFrame::leaveEvent( e );
+ TQFrame::leaveEvent( e );
}
-void KAnimWidget::mousePressEvent( QMouseEvent *e )
+void KAnimWidget::mousePressEvent( TQMouseEvent *e )
{
- QFrame::mousePressEvent( e );
+ TQFrame::mousePressEvent( e );
}
-void KAnimWidget::mouseReleaseEvent( QMouseEvent *e )
+void KAnimWidget::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton &&
rect().contains( e->pos() ) )
emit clicked();
- QFrame::mouseReleaseEvent( e );
+ TQFrame::mouseReleaseEvent( e );
}
void KAnimWidget::slotTimerUpdate()
@@ -165,7 +165,7 @@ void KAnimWidget::slotTimerUpdate()
repaint(d->transparent);
}
-void KAnimWidget::drawContents( QPainter *p )
+void KAnimWidget::drawContents( TQPainter *p )
{
if ( d->pixmap.isNull() )
return;
@@ -174,7 +174,7 @@ void KAnimWidget::drawContents( QPainter *p )
int h = w;
int x = (width() - w) / 2;
int y = (height() - h) / 2;
- p->drawPixmap(QPoint(x, y), d->pixmap, QRect(0, d->current_frame*h, w, h));
+ p->drawPixmap(TQPoint(x, y), d->pixmap, TQRect(0, d->current_frame*h, w, h));
}
void KAnimWidget::updateIcons()
@@ -187,8 +187,8 @@ void KAnimWidget::updateIcons()
if (!d->size)
d->size = KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
- QString path = KGlobal::iconLoader()->iconPath(d->icon_name, -d->size);
- QImage img(path);
+ TQString path = KGlobal::iconLoader()->iconPath(d->icon_name, -d->size);
+ TQImage img(path);
if (img.isNull())
return;
diff --git a/kdeui/kanimwidget.h b/kdeui/kanimwidget.h
index 3c0d5f3e5..6261a5cb3 100644
--- a/kdeui/kanimwidget.h
+++ b/kdeui/kanimwidget.h
@@ -18,7 +18,7 @@
#ifndef _KANIMWIDGET_H
#define _KANIMWIDGET_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -56,7 +56,7 @@ class KDEUI_EXPORT KAnimWidget : public QFrame
{
Q_OBJECT
Q_PROPERTY( int size READ size WRITE setSize )
- Q_PROPERTY( QString icons READ icons WRITE setIcons )
+ Q_PROPERTY( TQString icons READ icons WRITE setIcons )
public:
/**
@@ -73,8 +73,8 @@ public:
* @param parent The standard parent
* @param name The standard internal name
*/
- KAnimWidget( const QString& icons, int size = 0,
- QWidget *parent = 0L, const char *name = 0L );
+ KAnimWidget( const TQString& icons, int size = 0,
+ TQWidget *parent = 0L, const char *name = 0L );
/**
* Destructor
@@ -98,7 +98,7 @@ public:
* Returns the current icons
* since 3.4
*/
- QString icons() const;
+ TQString icons() const;
/**
* Sets the name of the animated icons to load. This will use the
@@ -106,7 +106,7 @@ public:
*
* @param icons The name of the icons to use for the animation
*/
- void setIcons( const QString& icons );
+ void setIcons( const TQString& icons );
public slots:
/**
@@ -123,13 +123,13 @@ signals:
void clicked();
protected:
- virtual void drawContents( QPainter *p );
- virtual void leaveEvent( QEvent *e );
- virtual void enterEvent( QEvent *e );
- virtual void hideEvent( QHideEvent *e);
- virtual void showEvent( QShowEvent *e);
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void drawContents( TQPainter *p );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void enterEvent( TQEvent *e );
+ virtual void hideEvent( TQHideEvent *e);
+ virtual void showEvent( TQShowEvent *e);
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
protected slots:
void slotTimerUpdate();
diff --git a/kdeui/karrowbutton.cpp b/kdeui/karrowbutton.cpp
index c9c423697..fd9624b67 100644
--- a/kdeui/karrowbutton.cpp
+++ b/kdeui/karrowbutton.cpp
@@ -18,8 +18,8 @@
#include "karrowbutton.h"
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
class KArrowButtonPrivate
{
@@ -27,9 +27,9 @@ class KArrowButtonPrivate
Qt::ArrowType arrow;
};
-KArrowButton::KArrowButton(QWidget *parent, Qt::ArrowType arrow,
+KArrowButton::KArrowButton(TQWidget *parent, Qt::ArrowType arrow,
const char *name)
- : QPushButton(parent, name)
+ : TQPushButton(parent, name)
{
d = new KArrowButtonPrivate();
d->arrow = arrow;
@@ -40,9 +40,9 @@ KArrowButton::~KArrowButton()
delete d;
}
-QSize KArrowButton::sizeHint() const
+TQSize KArrowButton::sizeHint() const
{
- return QSize( 12, 12 );
+ return TQSize( 12, 12 );
}
void KArrowButton::setArrowType(Qt::ArrowType a)
@@ -57,16 +57,16 @@ Qt::ArrowType KArrowButton::arrowType() const
return d->arrow;
}
-void KArrowButton::drawButton(QPainter *p)
+void KArrowButton::drawButton(TQPainter *p)
{
const unsigned int arrowSize = 8;
const unsigned int margin = 2;
- p->fillRect( rect(), colorGroup().brush( QColorGroup::Background ) );
- style().drawPrimitive( QStyle::PE_Panel, p, QRect( 0, 0, width(), height() ),
+ p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) );
+ style().drawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ),
colorGroup(),
- isDown() ? QStyle::Style_Sunken : QStyle::Style_Default,
- QStyleOption( 2, 0 ) );
+ isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default,
+ TQStyleOption( 2, 0 ) );
if (static_cast<unsigned int>(width()) < arrowSize + margin ||
static_cast<unsigned int>(height()) < arrowSize + margin)
@@ -92,18 +92,18 @@ void KArrowButton::drawButton(QPainter *p)
y++;
}
- QStyle::PrimitiveElement e = QStyle::PE_ArrowLeft;
+ TQStyle::PrimitiveElement e = TQStyle::PE_ArrowLeft;
switch (d->arrow)
{
- case Qt::LeftArrow: e = QStyle::PE_ArrowLeft; break;
- case Qt::RightArrow: e = QStyle::PE_ArrowRight; break;
- case Qt::UpArrow: e = QStyle::PE_ArrowUp; break;
- case Qt::DownArrow: e = QStyle::PE_ArrowDown; break;
+ case Qt::LeftArrow: e = TQStyle::PE_ArrowLeft; break;
+ case Qt::RightArrow: e = TQStyle::PE_ArrowRight; break;
+ case Qt::UpArrow: e = TQStyle::PE_ArrowUp; break;
+ case Qt::DownArrow: e = TQStyle::PE_ArrowDown; break;
}
- int flags = QStyle::Style_Enabled;
+ int flags = TQStyle::Style_Enabled;
if ( isDown() )
- flags |= QStyle::Style_Down;
- style().drawPrimitive( e, p, QRect( QPoint( x, y ), QSize( arrowSize, arrowSize ) ),
+ flags |= TQStyle::Style_Down;
+ style().drawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ),
colorGroup(), flags );
}
diff --git a/kdeui/karrowbutton.h b/kdeui/karrowbutton.h
index 8f5410908..e20278692 100644
--- a/kdeui/karrowbutton.h
+++ b/kdeui/karrowbutton.h
@@ -19,7 +19,7 @@
#ifndef __karrowbutton_h__
#define __karrowbutton_h__
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -48,7 +48,7 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
* @param arrow The direction the arrrow should be pointing in
* @param name An internal name for this widget
*/
- KArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow,
+ KArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow,
const char *name = 0);
/**
@@ -57,9 +57,9 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
virtual ~KArrowButton();
/**
- * Reimplemented from QPushButton.
+ * Reimplemented from TQPushButton.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Returns the arrow type
@@ -81,9 +81,9 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
protected:
/**
- * Reimplemented from QPushButton.
+ * Reimplemented from TQPushButton.
*/
- virtual void drawButton(QPainter *);
+ virtual void drawButton(TQPainter *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kauthicon.cpp b/kdeui/kauthicon.cpp
index 9dd567b18..d4c18a114 100644
--- a/kdeui/kauthicon.cpp
+++ b/kdeui/kauthicon.cpp
@@ -21,9 +21,9 @@
#include <unistd.h> // For getuid
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <klocale.h>
@@ -91,21 +91,21 @@ static const char * const openlock_xpm[] = {
" ",
" "};
-KAuthIcon::KAuthIcon(QWidget *parent, const char *name)
- : QWidget(parent, name),
+KAuthIcon::KAuthIcon(TQWidget *parent, const char *name)
+ : TQWidget(parent, name),
lockPM( const_cast< const char** >( lock_xpm)),
openLockPM( const_cast< const char** >(openlock_xpm))
{
lockText = i18n("Editing disabled");
openLockText = i18n("Editing enabled");
- lockBox = new QLabel(this);
- lockBox->setFrameStyle(QFrame::WinPanel|QFrame::Raised);
+ lockBox = new TQLabel(this);
+ lockBox->setFrameStyle(TQFrame::WinPanel|TQFrame::Raised);
lockBox->setPixmap(lockPM);
lockBox->setFixedSize(lockBox->sizeHint());
- lockLabel = new QLabel(this);
- lockLabel->setFrameStyle(QFrame::NoFrame);
+ lockLabel = new TQLabel(this);
+ lockLabel->setFrameStyle(TQFrame::NoFrame);
// set fixed size of this frame to whichever phrase is longer
if (lockLabel->fontMetrics().boundingRect(lockText).width() >
@@ -117,7 +117,7 @@ KAuthIcon::KAuthIcon(QWidget *parent, const char *name)
lockLabel->setMinimumSize(lockLabel->sizeHint());
lockLabel->setText(lockText);
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
layout->addWidget(lockBox, 0, AlignLeft|AlignVCenter);
layout->addSpacing(5);
@@ -132,7 +132,7 @@ KAuthIcon::~KAuthIcon()
}
-QSize KAuthIcon::sizeHint() const
+TQSize KAuthIcon::sizeHint() const
{
return layout->minimumSize();
}
@@ -140,7 +140,7 @@ QSize KAuthIcon::sizeHint() const
/************************************************************************/
-KRootPermsIcon::KRootPermsIcon(QWidget *parent, const char *name)
+KRootPermsIcon::KRootPermsIcon(TQWidget *parent, const char *name)
: KAuthIcon(parent, name)
{
updateStatus();
@@ -165,8 +165,8 @@ void KRootPermsIcon::updateStatus()
/************************************************************************/
-KWritePermsIcon::KWritePermsIcon(const QString & fileName,
- QWidget *parent, const char *name)
+KWritePermsIcon::KWritePermsIcon(const TQString & fileName,
+ TQWidget *parent, const char *name)
: KAuthIcon(parent, name)
{
fi.setFile(fileName);
diff --git a/kdeui/kauthicon.h b/kdeui/kauthicon.h
index ddbbfe9d5..e0e381077 100644
--- a/kdeui/kauthicon.h
+++ b/kdeui/kauthicon.h
@@ -18,10 +18,10 @@
#ifndef _KAUTHICON_H
#define _KAUTHICON_H "$Id$"
-#include <qfileinfo.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -52,10 +52,10 @@ public:
/**
* Constructor.
*/
- KAuthIcon(QWidget *parent = 0, const char *name = 0);
+ KAuthIcon(TQWidget *parent = 0, const char *name = 0);
~KAuthIcon();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* return the status of whatever is being monitored.
*/
@@ -78,14 +78,14 @@ signals:
void authChanged(bool authorized);
protected:
- QHBoxLayout *layout;
+ TQHBoxLayout *layout;
- QLabel *lockBox;
- QLabel *lockLabel;
- QPixmap lockPM;
- QPixmap openLockPM;
- QString lockText;
- QString openLockText;
+ TQLabel *lockBox;
+ TQLabel *lockLabel;
+ TQPixmap lockPM;
+ TQPixmap openLockPM;
+ TQString lockText;
+ TQString openLockText;
protected:
virtual void virtual_hook( int id, void* data );
@@ -105,7 +105,7 @@ class KDEUI_EXPORT KRootPermsIcon : public KAuthIcon
Q_OBJECT
public:
- KRootPermsIcon(QWidget *parent = 0, const char *name = 0);
+ KRootPermsIcon(TQWidget *parent = 0, const char *name = 0);
~KRootPermsIcon();
/**
@@ -135,10 +135,10 @@ class KWritePermsIconPrivate;
class KDEUI_EXPORT KWritePermsIcon : public KAuthIcon
{
Q_OBJECT
- Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+ Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- KWritePermsIcon(const QString & fileName, QWidget *parent = 0, const char *name = 0);
+ KWritePermsIcon(const TQString & fileName, TQWidget *parent = 0, const char *name = 0);
~KWritePermsIcon();
/**
* @return whether or not the monitored file is writable.
@@ -149,20 +149,20 @@ public:
* make the icon watch a new filename.
* @param fileName the new file to monitor / display status for.
*/
- void setFileName(const QString & fileName) { fi.setFile(fileName); updateStatus(); }
+ void setFileName(const TQString & fileName) { fi.setFile(fileName); updateStatus(); }
/**
* return the filename of the currently watched file.
* @since 3.4
*/
- QString fileName() const { return fi.fileName(); }
+ TQString fileName() const { return fi.fileName(); }
public slots:
void updateStatus();
protected:
bool writable;
- QFileInfo fi;
+ TQFileInfo fi;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kbugreport.cpp b/kdeui/kbugreport.cpp
index ad261eebd..3d7898861 100644
--- a/kdeui/kbugreport.cpp
+++ b/kdeui/kbugreport.cpp
@@ -17,14 +17,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qhbuttongroup.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqhbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -51,21 +51,21 @@
#include <kcombobox.h>
#include <config.h>
#include <ktempfile.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
class KBugReportPrivate {
public:
KComboBox *appcombo;
- QString lastError;
- QString kde_version;
- QString appname;
- QString os;
- QPushButton *submitBugButton;
+ TQString lastError;
+ TQString kde_version;
+ TQString appname;
+ TQString os;
+ TQPushButton *submitBugButton;
KURL url;
};
-KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutData )
+KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutData )
: KDialogBase( Plain,
i18n("Submit Bug Report"),
Ok | Cancel,
@@ -85,21 +85,21 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
: ( KGlobal::_activeInstance ? KGlobal::_activeInstance->aboutData()
: KGlobal::instance()->aboutData() );
m_process = 0;
- QWidget * parent = plainPage();
+ TQWidget * parent = plainPage();
d->submitBugButton = 0;
- //if ( m_aboutData->bugAddress() == QString::fromLatin1("submit@bugs.pearsoncomputing.net") )
+ //if ( m_aboutData->bugAddress() == TQString::fromLatin1("submit@bugs.pearsoncomputing.net") )
//{
// // This is a core KDE application -> redirect to the web form
// Always redirect to the Web form for Trinity
- d->submitBugButton = new QPushButton( parent );
+ d->submitBugButton = new TQPushButton( parent );
setButtonCancel( KStdGuiItem::close() );
//}
- QLabel * tmpLabel;
- QVBoxLayout * lay = new QVBoxLayout( parent, 0, spacingHint() );
+ TQLabel * tmpLabel;
+ TQVBoxLayout * lay = new TQVBoxLayout( parent, 0, spacingHint() );
- QGridLayout *glay = new QGridLayout( lay, 4, 3 );
+ TQGridLayout *glay = new TQGridLayout( lay, 4, 3 );
glay->setColStretch( 1, 10 );
glay->setColStretch( 2, 10 );
@@ -108,30 +108,30 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
if ( !d->submitBugButton )
{
// From
- QString qwtstr = i18n( "Your email address. If incorrect, use the Configure Email button to change it" );
- tmpLabel = new QLabel( i18n("From:"), parent );
+ TQString qwtstr = i18n( "Your email address. If incorrect, use the Configure Email button to change it" );
+ tmpLabel = new TQLabel( i18n("From:"), parent );
glay->addWidget( tmpLabel, row,0 );
- QWhatsThis::add( tmpLabel, qwtstr );
- m_from = new QLabel( parent );
+ TQWhatsThis::add( tmpLabel, qwtstr );
+ m_from = new TQLabel( parent );
glay->addWidget( m_from, row, 1 );
- QWhatsThis::add( m_from, qwtstr );
+ TQWhatsThis::add( m_from, qwtstr );
// Configure email button
- m_configureEmail = new QPushButton( i18n("Configure Email..."),
+ m_configureEmail = new TQPushButton( i18n("Configure Email..."),
parent );
- connect( m_configureEmail, SIGNAL( clicked() ), this,
- SLOT( slotConfigureEmail() ) );
+ connect( m_configureEmail, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotConfigureEmail() ) );
glay->addMultiCellWidget( m_configureEmail, 0, 2, 2, 2, AlignTop|AlignRight );
// To
qwtstr = i18n( "The email address this bug report is sent to." );
- tmpLabel = new QLabel( i18n("To:"), parent );
+ tmpLabel = new TQLabel( i18n("To:"), parent );
glay->addWidget( tmpLabel, ++row,0 );
- QWhatsThis::add( tmpLabel, qwtstr );
- tmpLabel = new QLabel( m_aboutData->bugAddress(), parent );
+ TQWhatsThis::add( tmpLabel, qwtstr );
+ tmpLabel = new TQLabel( m_aboutData->bugAddress(), parent );
glay->addWidget( tmpLabel, row, 1 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
setButtonOK( KGuiItem( i18n("&Send"), "mail_send", i18n( "Send bug report." ),
i18n( "Send this bug report to %1." ).arg( m_aboutData->bugAddress() ) ) );
@@ -145,15 +145,15 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
}
// Program name
- QString qwtstr = i18n( "The application for which you wish to submit a bug report - if incorrect, please use the Report Bug menu item of the correct application" );
- tmpLabel = new QLabel( i18n("Application: "), parent );
+ TQString qwtstr = i18n( "The application for which you wish to submit a bug report - if incorrect, please use the Report Bug menu item of the correct application" );
+ tmpLabel = new TQLabel( i18n("Application: "), parent );
glay->addWidget( tmpLabel, ++row, 0 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
d->appcombo = new KComboBox( false, parent, "app");
- QWhatsThis::add( d->appcombo, qwtstr );
+ TQWhatsThis::add( d->appcombo, qwtstr );
d->appcombo->insertStrList((const char**)packages);
- connect(d->appcombo, SIGNAL(activated(int)), SLOT(appChanged(int)));
- d->appname = QString::fromLatin1( m_aboutData
+ connect(d->appcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(appChanged(int)));
+ d->appname = TQString::fromLatin1( m_aboutData
? m_aboutData->productName()
: qApp->name() );
glay->addWidget( d->appcombo, row, 1 );
@@ -168,81 +168,81 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
}
d->appcombo->setCurrentItem(index);
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
// Version
qwtstr = i18n( "The version of this application - please make sure that no newer version is available before sending a bug report" );
- tmpLabel = new QLabel( i18n("Version:"), parent );
+ tmpLabel = new TQLabel( i18n("Version:"), parent );
glay->addWidget( tmpLabel, ++row, 0 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
if (m_aboutData)
m_strVersion = m_aboutData->version();
else
m_strVersion = i18n("no version set (programmer error!)");
- d->kde_version = QString::fromLatin1( KDE_VERSION_STRING );
- d->kde_version += ", " + QString::fromLatin1( KDE_DISTRIBUTION_TEXT );
+ d->kde_version = TQString::fromLatin1( KDE_VERSION_STRING );
+ d->kde_version += ", " + TQString::fromLatin1( KDE_DISTRIBUTION_TEXT );
if ( !d->submitBugButton )
m_strVersion += " " + d->kde_version;
- m_version = new QLabel( m_strVersion, parent );
+ m_version = new TQLabel( m_strVersion, parent );
//glay->addWidget( m_version, row, 1 );
glay->addMultiCellWidget( m_version, row, row, 1, 2 );
- QWhatsThis::add( m_version, qwtstr );
+ TQWhatsThis::add( m_version, qwtstr );
- tmpLabel = new QLabel(i18n("OS:"), parent);
+ tmpLabel = new TQLabel(i18n("OS:"), parent);
glay->addWidget( tmpLabel, ++row, 0 );
struct utsname unameBuf;
uname( &unameBuf );
- d->os = QString::fromLatin1( unameBuf.sysname ) +
- " (" + QString::fromLatin1( unameBuf.machine ) + ") "
- "release " + QString::fromLatin1( unameBuf.release );
+ d->os = TQString::fromLatin1( unameBuf.sysname ) +
+ " (" + TQString::fromLatin1( unameBuf.machine ) + ") "
+ "release " + TQString::fromLatin1( unameBuf.release );
- tmpLabel = new QLabel(d->os, parent);
+ tmpLabel = new TQLabel(d->os, parent);
glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 );
- tmpLabel = new QLabel(i18n("Compiler:"), parent);
+ tmpLabel = new TQLabel(i18n("Compiler:"), parent);
glay->addWidget( tmpLabel, ++row, 0 );
- tmpLabel = new QLabel(QString::fromLatin1(KDE_COMPILER_VERSION), parent);
+ tmpLabel = new TQLabel(TQString::fromLatin1(KDE_COMPILER_VERSION), parent);
glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 );
if ( !d->submitBugButton )
{
// Severity
- m_bgSeverity = new QHButtonGroup( i18n("Se&verity"), parent );
+ m_bgSeverity = new TQHButtonGroup( i18n("Se&verity"), parent );
static const char * const sevNames[5] = { "critical", "grave", "normal", "wishlist", "i18n" };
- const QString sevTexts[5] = { i18n("Critical"), i18n("Grave"), i18n("normal severity","Normal"), i18n("Wishlist"), i18n("Translation") };
+ const TQString sevTexts[5] = { i18n("Critical"), i18n("Grave"), i18n("normal severity","Normal"), i18n("Wishlist"), i18n("Translation") };
for (int i = 0 ; i < 5 ; i++ )
{
// Store the severity string as the name
- QRadioButton *rb = new QRadioButton( sevTexts[i], m_bgSeverity, sevNames[i] );
+ TQRadioButton *rb = new TQRadioButton( sevTexts[i], m_bgSeverity, sevNames[i] );
if (i==2) rb->setChecked(true); // default : "normal"
}
lay->addWidget( m_bgSeverity );
// Subject
- QHBoxLayout * hlay = new QHBoxLayout( lay );
- tmpLabel = new QLabel( i18n("S&ubject: "), parent );
+ TQHBoxLayout * hlay = new TQHBoxLayout( lay );
+ tmpLabel = new TQLabel( i18n("S&ubject: "), parent );
hlay->addWidget( tmpLabel );
m_subject = new KLineEdit( parent );
m_subject->setFocus();
tmpLabel->setBuddy(m_subject);
hlay->addWidget( m_subject );
- QString text = i18n("Enter the text (in English if possible) that you wish to submit for the "
+ TQString text = i18n("Enter the text (in English if possible) that you wish to submit for the "
"bug report.\n"
"If you press \"Send\", a mail message will be sent to the maintainer of "
"this program.\n");
- QLabel * label = new QLabel( parent, "label" );
+ TQLabel * label = new TQLabel( parent, "label" );
label->setText( text );
lay->addWidget( label );
// The multiline-edit
- m_lineedit = new QMultiLineEdit( parent, "QMultiLineEdit" );
+ m_lineedit = new TQMultiLineEdit( parent, "TQMultiLineEdit" );
m_lineedit->setMinimumHeight( 180 ); // make it big
- m_lineedit->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_lineedit->setWordWrap(TQMultiLineEdit::WidgetWidth);
lay->addWidget( m_lineedit, 10 /*stretch*/ );
slotSetFrom();
@@ -250,21 +250,21 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
// Point to the web form
lay->addSpacing(10);
- QString text = i18n("To submit a bug report, click on the button below.\n"
+ TQString text = i18n("To submit a bug report, click on the button below.\n"
"This will open a web browser window on http://bugs.pearsoncomputing.net where you will find a form to fill in.\n"
"The information displayed above will be transferred to that server.");
- QLabel * label = new QLabel( text, parent, "label");
+ TQLabel * label = new TQLabel( text, parent, "label");
lay->addWidget( label );
lay->addSpacing(10);
updateURL();
d->submitBugButton->setText( i18n("&Launch Bug Report Wizard") );
- d->submitBugButton->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ d->submitBugButton->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed);
lay->addWidget( d->submitBugButton );
lay->addSpacing(10);
- connect( d->submitBugButton, SIGNAL(clicked()),
- this, SLOT(slotOk()));
+ connect( d->submitBugButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotOk()));
}
}
@@ -288,7 +288,7 @@ void KBugReport::updateURL()
void KBugReport::appChanged(int i)
{
- QString appName = d->appcombo->text(i);
+ TQString appName = d->appcombo->text(i);
int index = appName.find( '/' );
if ( index > 0 )
appName = appName.left( index );
@@ -311,8 +311,8 @@ void KBugReport::slotConfigureEmail()
{
if (m_process) return;
m_process = new KProcess;
- *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount");
- connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(slotSetFrom()));
+ *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount");
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotSetFrom()));
if (!m_process->start())
{
kdDebug() << "Couldn't start kcmshell.." << endl;
@@ -330,29 +330,29 @@ void KBugReport::slotSetFrom()
m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio?
- KConfig emailConf( QString::fromLatin1("emaildefaults") );
+ KConfig emailConf( TQString::fromLatin1("emaildefaults") );
// find out the default profile
- emailConf.setGroup( QString::fromLatin1("Defaults") );
- QString profile = QString::fromLatin1("PROFILE_");
- profile += emailConf.readEntry( QString::fromLatin1("Profile"),
- QString::fromLatin1("Default") );
+ emailConf.setGroup( TQString::fromLatin1("Defaults") );
+ TQString profile = TQString::fromLatin1("PROFILE_");
+ profile += emailConf.readEntry( TQString::fromLatin1("Profile"),
+ TQString::fromLatin1("Default") );
emailConf.setGroup( profile );
- QString fromaddr = emailConf.readEntry( QString::fromLatin1("EmailAddress") );
+ TQString fromaddr = emailConf.readEntry( TQString::fromLatin1("EmailAddress") );
if (fromaddr.isEmpty()) {
struct passwd *p;
p = getpwuid(getuid());
- fromaddr = QString::fromLatin1(p->pw_name);
+ fromaddr = TQString::fromLatin1(p->pw_name);
} else {
- QString name = emailConf.readEntry( QString::fromLatin1("FullName"));
+ TQString name = emailConf.readEntry( TQString::fromLatin1("FullName"));
if (!name.isEmpty())
- fromaddr = name + QString::fromLatin1(" <") + fromaddr + QString::fromLatin1(">");
+ fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
}
m_from->setText( fromaddr );
}
-void KBugReport::slotUrlClicked(const QString &urlText)
+void KBugReport::slotUrlClicked(const TQString &urlText)
{
if ( kapp )
kapp->invokeBrowser( urlText );
@@ -375,7 +375,7 @@ void KBugReport::slotOk( void )
if( m_lineedit->text().isEmpty() ||
m_subject->text().isEmpty() )
{
- QString msg = i18n("You must specify both a subject and a description "
+ TQString msg = i18n("You must specify both a subject and a description "
"before the report can be sent.");
KMessageBox::error(this,msg);
return;
@@ -391,7 +391,7 @@ void KBugReport::slotOk( void )
"<li>cause serious data loss</li>"
"<li>introduce a security hole on the system where the affected package is installed</li></ul>\n"
"<p>Does the bug you are reporting cause any of the above damage? "
- "If it does not, please select a lower severity. Thank you!</p>" ),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
+ "If it does not, please select a lower severity. Thank you!</p>" ),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
return;
break;
case 1: // grave
@@ -402,13 +402,13 @@ void KBugReport::slotOk( void )
"<li>cause data loss</li>"
"<li>introduce a security hole allowing access to the accounts of users who use the affected package</li></ul>\n"
"<p>Does the bug you are reporting cause any of the above damage? "
- "If it does not, please select a lower severity. Thank you!</p>" ),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
+ "If it does not, please select a lower severity. Thank you!</p>" ),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
return;
break;
}
if( !sendBugReport() )
{
- QString msg = i18n("Unable to send the bug report.\n"
+ TQString msg = i18n("Unable to send the bug report.\n"
"Please submit a bug report manually...\n"
"See http://bugs.pearsoncomputing.net/ for instructions.");
KMessageBox::error(this, msg + "\n\n" + d->lastError);
@@ -434,61 +434,61 @@ void KBugReport::slotCancel()
}
-QString KBugReport::text() const
+TQString KBugReport::text() const
{
kdDebug() << m_bgSeverity->selected()->name() << endl;
// Prepend the pseudo-headers to the contents of the mail
- QString severity = QString::fromLatin1(m_bgSeverity->selected()->name());
- QString appname = d->appcombo->currentText();
- QString os = QString::fromLatin1("OS: %1 (%2)\n").
+ TQString severity = TQString::fromLatin1(m_bgSeverity->selected()->name());
+ TQString appname = d->appcombo->currentText();
+ TQString os = TQString::fromLatin1("OS: %1 (%2)\n").
arg(KDE_COMPILING_OS).
arg(KDE_DISTRIBUTION_TEXT);
- QString bodyText;
+ TQString bodyText;
for(int i = 0; i < m_lineedit->numLines(); i++)
{
- QString line = m_lineedit->textLine(i);
+ TQString line = m_lineedit->textLine(i);
if (!line.endsWith("\n"))
line += '\n';
bodyText += line;
}
- if (severity == QString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) {
+ if (severity == TQString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) {
// Case 1 : i18n bug
- QString package = QString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language());
- package = package.replace(QString::fromLatin1("_"), QString::fromLatin1("-"));
- return QString::fromLatin1("Package: %1").arg(package) +
- QString::fromLatin1("\n"
+ TQString package = TQString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language());
+ package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-"));
+ return TQString::fromLatin1("Package: %1").arg(package) +
+ TQString::fromLatin1("\n"
"Application: %1\n"
// not really i18n's version, so better here IMHO
"Version: %2\n").arg(appname).arg(m_strVersion)+
- os+QString::fromLatin1("\n")+bodyText;
+ os+TQString::fromLatin1("\n")+bodyText;
} else {
- appname = appname.replace(QString::fromLatin1("_"), QString::fromLatin1("-"));
+ appname = appname.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-"));
// Case 2 : normal bug
- return QString::fromLatin1("Package: %1\n"
+ return TQString::fromLatin1("Package: %1\n"
"Version: %2\n"
"Severity: %3\n")
.arg(appname).arg(m_strVersion).arg(severity)+
- QString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+
- os+QString::fromLatin1("\n")+bodyText;
+ TQString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+
+ os+TQString::fromLatin1("\n")+bodyText;
}
}
bool KBugReport::sendBugReport()
{
- QString recipient ( m_aboutData ?
+ TQString recipient ( m_aboutData ?
m_aboutData->bugAddress() :
- QString::fromLatin1("submit@bugs.pearsoncomputing.net") );
+ TQString::fromLatin1("submit@bugs.pearsoncomputing.net") );
- QString command;
+ TQString command;
command = locate("exe", "ksendbugmail");
if (command.isEmpty())
- command = KStandardDirs::findExe( QString::fromLatin1("ksendbugmail") );
+ command = KStandardDirs::findExe( TQString::fromLatin1("ksendbugmail") );
KTempFile outputfile;
outputfile.close();
- QString subject = m_subject->text();
+ TQString subject = m_subject->text();
command += " --subject ";
command += KProcess::quote(subject);
command += " --recipient ";
@@ -499,14 +499,14 @@ bool KBugReport::sendBugReport()
fflush(stdin);
fflush(stderr);
- FILE * fd = popen(QFile::encodeName(command), "w");
+ FILE * fd = popen(TQFile::encodeName(command), "w");
if (!fd)
{
kdError() << "Unable to open a pipe to " << command << endl;
return false;
}
- QString btext = text();
+ TQString btext = text();
fwrite(btext.ascii(),btext.length(),1,fd);
fflush(fd);
@@ -514,16 +514,16 @@ bool KBugReport::sendBugReport()
kdDebug() << "exit status1 " << error << " " << (WIFEXITED(error)) << " " << WEXITSTATUS(error) << endl;
if ((WIFEXITED(error)) && WEXITSTATUS(error) == 1) {
- QFile of(outputfile.name());
+ TQFile of(outputfile.name());
if (of.open(IO_ReadOnly )) {
- QTextStream is(&of);
- is.setEncoding(QTextStream::UnicodeUTF8);
- QString line;
+ TQTextStream is(&of);
+ is.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString line;
while (!is.eof())
line = is.readLine();
d->lastError = line;
} else {
- d->lastError = QString::null;
+ d->lastError = TQString::null;
}
outputfile.unlink();
return false;
diff --git a/kdeui/kbugreport.h b/kdeui/kbugreport.h
index 3220903e0..e9a3184cb 100644
--- a/kdeui/kbugreport.h
+++ b/kdeui/kbugreport.h
@@ -49,7 +49,7 @@ public:
* since KHelpMenu takes care of the menu item
* for "Report Bug..." and of creating a KBugReport dialog.
*/
- KBugReport( QWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L );
+ KBugReport( TQWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L );
/**
* Destructor
*/
@@ -69,7 +69,7 @@ protected slots:
* The URL-Label "http://bugs.pearsoncomputing.net/" was clicked.
* @deprecated remove in KDE4.0
*/
- virtual void slotUrlClicked(const QString &);
+ virtual void slotUrlClicked(const TQString &);
/**
* OK has been clicked
*/
@@ -91,9 +91,9 @@ protected slots:
protected:
/**
* A complete copy of the bug report
- * @return QString copy of the bug report.
+ * @return TQString copy of the bug report.
*/
- QString text() const;
+ TQString text() const;
/**
* Attempt to e-mail the bug report.
* @return true on success
@@ -103,13 +103,13 @@ protected:
KProcess * m_process;
const KAboutData * m_aboutData;
- QMultiLineEdit * m_lineedit;
- QLineEdit * m_subject;
- QLabel * m_from;
- QLabel * m_version;
- QString m_strVersion;
- QHButtonGroup * m_bgSeverity;
- QPushButton * m_configureEmail;
+ TQMultiLineEdit * m_lineedit;
+ TQLineEdit * m_subject;
+ TQLabel * m_from;
+ TQLabel * m_version;
+ TQString m_strVersion;
+ TQHButtonGroup * m_bgSeverity;
+ TQPushButton * m_configureEmail;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kbuttonbox.cpp b/kdeui/kbuttonbox.cpp
index eab9fa072..eb0e27827 100644
--- a/kdeui/kbuttonbox.cpp
+++ b/kdeui/kbuttonbox.cpp
@@ -53,7 +53,7 @@
#include <kglobalsettings.h>
#include <kguiitem.h>
#include <kpushbutton.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <assert.h>
#define minButtonWidth 50
@@ -68,7 +68,7 @@ public:
Item(KPushButton* const _button) : button(_button) {}
};
-template class QPtrList<KButtonBox::Item>;
+template class TQPtrList<KButtonBox::Item>;
class KButtonBoxPrivate {
public:
@@ -76,12 +76,12 @@ public:
unsigned short autoborder;
unsigned short orientation;
bool activated;
- QPtrList<KButtonBox::Item> buttons;
+ TQPtrList<KButtonBox::Item> buttons;
};
-KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation,
+KButtonBox::KButtonBox(TQWidget *parent, Orientation _orientation,
int border, int autoborder)
- : QWidget(parent), data(new KButtonBoxPrivate)
+ : TQWidget(parent), data(new KButtonBoxPrivate)
{
assert(data);
@@ -95,7 +95,7 @@ KButtonBox::~KButtonBox() {
delete data;
}
-QPushButton *KButtonBox::addButton(const QString& text, bool noexpand) {
+TQPushButton *KButtonBox::addButton(const TQString& text, bool noexpand) {
Item* const item = new Item(new KPushButton(text, this));
item->noexpand = noexpand;
@@ -107,7 +107,7 @@ QPushButton *KButtonBox::addButton(const QString& text, bool noexpand) {
return item->button;
}
-QPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
+TQPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
Item* const item = new Item(new KPushButton(guiitem, this));
item->noexpand = noexpand;
@@ -119,34 +119,34 @@ QPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
return item->button;
}
- QPushButton *
+ TQPushButton *
KButtonBox::addButton(
- const QString & text,
- QObject * receiver,
+ const TQString & text,
+ TQObject * receiver,
const char * slot,
bool noexpand
)
{
- QPushButton * pb = addButton(text, noexpand);
+ TQPushButton * pb = addButton(text, noexpand);
if ((0 != receiver) && (0 != slot))
- QObject::connect(pb, SIGNAL(clicked()), receiver, slot);
+ TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot);
return pb;
}
- QPushButton *
+ TQPushButton *
KButtonBox::addButton(
const KGuiItem& guiitem,
- QObject * receiver,
+ TQObject * receiver,
const char * slot,
bool noexpand
)
{
- QPushButton * pb = addButton(guiitem, noexpand);
+ TQPushButton * pb = addButton(guiitem, noexpand);
if ((0 != receiver) && (0 != slot))
- QObject::connect(pb, SIGNAL(clicked()), receiver, slot);
+ TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot);
return pb;
}
@@ -162,13 +162,13 @@ void KButtonBox::addStretch(int scale) {
void KButtonBox::layout() {
// resize all buttons
- const QSize bs = bestButtonSize();
+ const TQSize bs = bestButtonSize();
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item* item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
if(item->noexpand)
b->setFixedSize(buttonSizeHint(b));
@@ -188,11 +188,11 @@ void KButtonBox::placeButtons() {
int fs = width() - 2 * data->border;
int stretch = 0;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
fs -= b->width();
@@ -210,11 +210,11 @@ void KButtonBox::placeButtons() {
// distribute buttons
int x_pos = data->border;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
b->move(x_pos, (height() - b->height()) / 2);
@@ -232,11 +232,11 @@ void KButtonBox::placeButtons() {
int fs = height() - 2 * data->border;
int stretch = 0;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b)
fs -= b->height() + data->autoborder;
else
@@ -250,11 +250,11 @@ void KButtonBox::placeButtons() {
// distribute buttons
int y_pos = data->border;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
b->move((width() - b->width()) / 2, y_pos);
@@ -269,22 +269,22 @@ void KButtonBox::placeButtons() {
}
}
-void KButtonBox::resizeEvent(QResizeEvent *) {
+void KButtonBox::resizeEvent(TQResizeEvent *) {
placeButtons();
}
-QSize KButtonBox::bestButtonSize() const {
- QSize s(0, 0);
+TQSize KButtonBox::bestButtonSize() const {
+ TQSize s(0, 0);
// calculate optimal size
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b && !item->noexpand) {
- const QSize bs = buttonSizeHint(b);
+ const TQSize bs = buttonSizeHint(b);
const int bsWidth = bs.width();
const int bsHeight = bs.height();
@@ -300,24 +300,24 @@ QSize KButtonBox::bestButtonSize() const {
return s;
}
-QSize KButtonBox::sizeHint() const {
+TQSize KButtonBox::sizeHint() const {
unsigned int dw;
if(data->buttons.isEmpty())
- return QSize(0, 0);
+ return TQSize(0, 0);
else {
dw = 2 * data->border;
- const QSize bs = bestButtonSize();
+ const TQSize bs = bestButtonSize();
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
- QSize s;
+ TQSize s;
if(item->noexpand)
s = buttonSizeHint(b);
else
@@ -336,17 +336,17 @@ QSize KButtonBox::sizeHint() const {
}
if(data->orientation == Horizontal)
- return QSize(dw, bs.height() + 2 * data->border);
+ return TQSize(dw, bs.height() + 2 * data->border);
else
- return QSize(bs.width() + 2 * data->border, dw);
+ return TQSize(bs.width() + 2 * data->border, dw);
}
}
-QSizePolicy KButtonBox::sizePolicy() const
+TQSizePolicy KButtonBox::sizePolicy() const
{
return data->orientation == Horizontal?
- QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) :
- QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) :
+ TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
}
/*
@@ -354,9 +354,9 @@ QSizePolicy KButtonBox::sizePolicy() const
* minButtonWidth pixels wide, return minButtonWidth pixels
* as minimum width
*/
-QSize KButtonBox::buttonSizeHint(QPushButton *b) const {
- QSize s = b->sizeHint();
- const QSize ms = b->minimumSize();
+TQSize KButtonBox::buttonSizeHint(TQPushButton *b) const {
+ TQSize s = b->sizeHint();
+ const TQSize ms = b->minimumSize();
if(s.width() < minButtonWidth)
s.setWidth(minButtonWidth);
diff --git a/kdeui/kbuttonbox.h b/kdeui/kbuttonbox.h
index 51ae7024c..74bab9006 100644
--- a/kdeui/kbuttonbox.h
+++ b/kdeui/kbuttonbox.h
@@ -22,7 +22,7 @@
#include <kdelibs_export.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QPushButton;
class KGuiItem;
@@ -51,7 +51,7 @@ public:
* addButton() are laid out from top to bottom, otherwise they
* are laid out from left to right.
*/
- KButtonBox(QWidget *parent, Orientation _orientation = Horizontal,
+ KButtonBox(TQWidget *parent, Orientation _orientation = Horizontal,
int border = 0, int _autoborder = 6);
/**
@@ -65,12 +65,12 @@ public:
* This size is
* calculated by the width/height of all buttons plus border/autoborder.
*/
- virtual QSize sizeHint() const;
- virtual QSizePolicy sizePolicy() const;
- virtual void resizeEvent(QResizeEvent *);
+ virtual TQSize sizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
+ virtual void resizeEvent(TQResizeEvent *);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param text the text of the button to add
* @param noexpand If @p noexpand is @p false, the width
@@ -80,10 +80,10 @@ public:
*
* @return A pointer to the new button.
*/
- QPushButton *addButton(const QString& text, bool noexpand = false);
+ TQPushButton *addButton(const TQString& text, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param text the text of the button to add.
* @param receiver An object to connect to.
@@ -95,10 +95,10 @@ public:
*
* @return A pointer to the new button.
*/
- QPushButton *addButton(const QString& text, QObject * receiver, const char * slot, bool noexpand = false);
+ TQPushButton *addButton(const TQString& text, TQObject * receiver, const char * slot, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param guiitem text and icon on the button
* @param noexpand If @p noexpand is @p false, the width
@@ -110,10 +110,10 @@ public:
*
* @since 3.3
*/
- QPushButton *addButton(const KGuiItem& guiitem, bool noexpand = false);
+ TQPushButton *addButton(const KGuiItem& guiitem, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param guiitem text and icon on the button
* @param receiver An object to connect to.
@@ -127,7 +127,7 @@ public:
*
* @since 3.3
*/
- QPushButton *addButton(const KGuiItem& guiitem, QObject * receiver, const char * slot, bool noexpand = false);
+ TQPushButton *addButton(const KGuiItem& guiitem, TQObject * receiver, const char * slot, bool noexpand = false);
/**
* Add a stretch to the buttonbox.
@@ -157,9 +157,9 @@ protected:
* @return the best size for a button. Checks all buttons and takes
* the maximum width/height.
*/
- QSize bestButtonSize() const;
+ TQSize bestButtonSize() const;
void placeButtons();
- QSize buttonSizeHint(QPushButton *) const;
+ TQSize buttonSizeHint(TQPushButton *) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcharselect.cpp b/kdeui/kcharselect.cpp
index 295b3efc9..1eb707c4d 100644
--- a/kdeui/kcharselect.cpp
+++ b/kdeui/kcharselect.cpp
@@ -21,20 +21,20 @@
#include "kcharselect.h"
#include "kcharselect.moc"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qfontdatabase.h>
-#include <qhbox.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtooltip.h>
-#include <qvalidator.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqfontdatabase.h>
+#include <tqhbox.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtooltip.h>
+#include <tqvalidator.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,10 +45,10 @@
class KCharSelect::KCharSelectPrivate
{
public:
- QLineEdit *unicodeLine;
+ TQLineEdit *unicodeLine;
};
-QFontDatabase * KCharSelect::fontDataBase = 0;
+TQFontDatabase * KCharSelect::fontDataBase = 0;
void KCharSelect::cleanupFontDatabase()
{
@@ -61,9 +61,9 @@ void KCharSelect::cleanupFontDatabase()
/******************************************************************/
//==================================================================
-KCharSelectTable::KCharSelectTable( QWidget *parent, const char *name, const QString &_font,
- const QChar &_chr, int _tableNum )
- : QGridView( parent, name ), vFont( _font ), vChr( _chr ),
+KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQString &_font,
+ const TQChar &_chr, int _tableNum )
+ : TQGridView( parent, name ), vFont( _font ), vChr( _chr ),
vTableNum( _tableNum ), vPos( 0, 0 ), focusItem( _chr ), focusPos( 0, 0 ), d(0)
{
setBackgroundColor( colorGroup().base() );
@@ -78,12 +78,12 @@ KCharSelectTable::KCharSelectTable( QWidget *parent, const char *name, const QSt
setToolTips();
- setFocusPolicy( QWidget::StrongFocus );
- setBackgroundMode( QWidget::NoBackground );
+ setFocusPolicy( TQWidget::StrongFocus );
+ setBackgroundMode( TQWidget::NoBackground );
}
//==================================================================
-void KCharSelectTable::setFont( const QString &_font )
+void KCharSelectTable::setFont( const TQString &_font )
{
vFont = _font;
repaintContents( false );
@@ -92,7 +92,7 @@ void KCharSelectTable::setFont( const QString &_font )
}
//==================================================================
-void KCharSelectTable::setChar( const QChar &_chr )
+void KCharSelectTable::setChar( const TQChar &_chr )
{
vChr = _chr;
repaintContents( false );
@@ -101,7 +101,7 @@ void KCharSelectTable::setChar( const QChar &_chr )
//==================================================================
void KCharSelectTable::setTableNum( int _tableNum )
{
- focusItem = QChar( _tableNum * 256 );
+ focusItem = TQChar( _tableNum * 256 );
vTableNum = _tableNum;
repaintContents( false );
@@ -110,7 +110,7 @@ void KCharSelectTable::setTableNum( int _tableNum )
}
//==================================================================
-QSize KCharSelectTable::sizeHint() const
+TQSize KCharSelectTable::sizeHint() const
{
int w = cellWidth();
int h = cellHeight();
@@ -118,11 +118,11 @@ QSize KCharSelectTable::sizeHint() const
w *= numCols();
h *= numRows();
- return QSize( w, h );
+ return TQSize( w, h );
}
//==================================================================
-void KCharSelectTable::resizeEvent( QResizeEvent * e )
+void KCharSelectTable::resizeEvent( TQResizeEvent * e )
{
const int new_w = (e->size().width() - 2*(margin()+frameWidth())) / numCols();
const int new_h = (e->size().height() - 2*(margin()+frameWidth())) / numRows();
@@ -136,7 +136,7 @@ void KCharSelectTable::resizeEvent( QResizeEvent * e )
}
//==================================================================
-void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
+void KCharSelectTable::paintCell( class TQPainter* p, int row, int col )
{
const int w = cellWidth();
const int h = cellHeight();
@@ -148,7 +148,7 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
// fflush( stdout );
// }
- QFont font = QFont( vFont );
+ TQFont font = TQFont( vFont );
font.setPixelSize( int(.7 * h) );
unsigned short c = vTableNum * 256;
@@ -156,31 +156,31 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
c += col;
if ( c == vChr.unicode() ) {
- p->setBrush( QBrush( colorGroup().highlight() ) );
+ p->setBrush( TQBrush( colorGroup().highlight() ) );
p->setPen( NoPen );
p->drawRect( 0, 0, w, h );
p->setPen( colorGroup().highlightedText() );
- vPos = QPoint( col, row );
+ vPos = TQPoint( col, row );
} else {
- QFontMetrics fm = QFontMetrics( font );
+ TQFontMetrics fm = TQFontMetrics( font );
if( fm.inFont( c ) )
- p->setBrush( QBrush( colorGroup().base() ) );
+ p->setBrush( TQBrush( colorGroup().base() ) );
else
- p->setBrush( QBrush( colorGroup().button() ) );
+ p->setBrush( TQBrush( colorGroup().button() ) );
p->setPen( NoPen );
p->drawRect( 0, 0, w, h );
p->setPen( colorGroup().text() );
}
if ( c == focusItem.unicode() && hasFocus() ) {
- style().drawPrimitive( QStyle::PE_FocusRect, p, QRect( 2, 2, w - 4, h - 4 ),
+ style().drawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ),
colorGroup() );
- focusPos = QPoint( col, row );
+ focusPos = TQPoint( col, row );
}
p->setFont( font );
- p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, QString( QChar( c ) ) );
+ p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString( TQChar( c ) ) );
p->setPen( colorGroup().text() );
p->drawLine( x2, 0, x2, y2 );
@@ -193,19 +193,19 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
}
//==================================================================
-void KCharSelectTable::mouseMoveEvent( QMouseEvent *e )
+void KCharSelectTable::mouseMoveEvent( TQMouseEvent *e )
{
const int row = rowAt( e->y() );
const int col = columnAt( e->x() );
if ( row >= 0 && row < numRows() && col >= 0 && col < numCols() ) {
- const QPoint oldPos = vPos;
+ const TQPoint oldPos = vPos;
vPos.setX( col );
vPos.setY( row );
- vChr = QChar( vTableNum * 256 + numCols() * vPos.y() + vPos.x() );
+ vChr = TQChar( vTableNum * 256 + numCols() * vPos.y() + vPos.x() );
- const QPoint oldFocus = focusPos;
+ const TQPoint oldFocus = focusPos;
focusPos = vPos;
focusItem = vChr;
@@ -223,7 +223,7 @@ void KCharSelectTable::mouseMoveEvent( QMouseEvent *e )
}
//==================================================================
-void KCharSelectTable::keyPressEvent( QKeyEvent *e )
+void KCharSelectTable::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() ) {
case Key_Left:
@@ -251,7 +251,7 @@ void KCharSelectTable::keyPressEvent( QKeyEvent *e )
emit highlighted();
break;
case Key_Enter: case Key_Return: {
- const QPoint oldPos = vPos;
+ const TQPoint oldPos = vPos;
vPos = focusPos;
vChr = focusItem;
@@ -271,11 +271,11 @@ void KCharSelectTable::keyPressEvent( QKeyEvent *e )
void KCharSelectTable::gotoLeft()
{
if ( focusPos.x() > 0 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setX( focusPos.x() - 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -289,11 +289,11 @@ void KCharSelectTable::gotoLeft()
void KCharSelectTable::gotoRight()
{
if ( focusPos.x() < numCols()-1 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setX( focusPos.x() + 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -307,11 +307,11 @@ void KCharSelectTable::gotoRight()
void KCharSelectTable::gotoUp()
{
if ( focusPos.y() > 0 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setY( focusPos.y() - 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -325,11 +325,11 @@ void KCharSelectTable::gotoUp()
void KCharSelectTable::gotoDown()
{
if ( focusPos.y() < numRows()-1 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setY( focusPos.y() + 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -348,12 +348,12 @@ void KCharSelectTable::setToolTips()
{
for( int j=0; j< colCount; ++j )
{
- const QRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() );
- QToolTip::remove(this,r);
+ const TQRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() );
+ TQToolTip::remove(this,r);
const ushort uni = vTableNum * 256 + numCols()*i + j;
- QString s;
+ TQString s;
s.sprintf( "%04X", uint( uni ) );
- QString character; // Character (which sometimes need to be escaped)
+ TQString character; // Character (which sometimes need to be escaped)
switch ( uni )
{
case 0x3c: character = "&lt;"; break;
@@ -361,9 +361,9 @@ void KCharSelectTable::setToolTips()
case 0x26: character = "&amp;"; break;
case 0x27: character = "&apos;"; break;
case 0x22: character = "&quot;"; break;
- default: character = QChar( uni ); break;
+ default: character = TQChar( uni ); break;
}
- QToolTip::add(this, r, i18n( "Character","<qt><font size=\"+4\" face=\"%1\">%2</font><br>Unicode code point: U+%3<br>(In decimal: %4)<br>(Character: %5)</qt>" ).arg( vFont ).arg( character ).arg( s ).arg( uni ).arg( character ) );
+ TQToolTip::add(this, r, i18n( "Character","<qt><font size=\"+4\" face=\"%1\">%2</font><br>Unicode code point: U+%3<br>(In decimal: %4)<br>(Character: %5)</qt>" ).arg( vFont ).arg( character ).arg( s ).arg( uni ).arg( character ) );
}
}
}
@@ -373,41 +373,41 @@ void KCharSelectTable::setToolTips()
/******************************************************************/
//==================================================================
-KCharSelect::KCharSelect( QWidget *parent, const char *name, const QString &_font, const QChar &_chr, int _tableNum )
- : QVBox( parent, name ), d(new KCharSelectPrivate)
+KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_font, const TQChar &_chr, int _tableNum )
+ : TQVBox( parent, name ), d(new KCharSelectPrivate)
{
setSpacing( KDialog::spacingHint() );
- QHBox* const bar = new QHBox( this );
+ TQHBox* const bar = new TQHBox( this );
bar->setSpacing( KDialog::spacingHint() );
- QLabel* const lFont = new QLabel( i18n( "Font:" ), bar );
+ TQLabel* const lFont = new TQLabel( i18n( "Font:" ), bar );
lFont->resize( lFont->sizeHint() );
lFont->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lFont->setMaximumWidth( lFont->sizeHint().width() );
- fontCombo = new QComboBox( true, bar );
+ fontCombo = new TQComboBox( true, bar );
fillFontCombo();
fontCombo->resize( fontCombo->sizeHint() );
- connect( fontCombo, SIGNAL( activated( const QString & ) ), this, SLOT( fontSelected( const QString & ) ) );
+ connect( fontCombo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( fontSelected( const TQString & ) ) );
- QLabel* const lTable = new QLabel( i18n( "Table:" ), bar );
+ TQLabel* const lTable = new TQLabel( i18n( "Table:" ), bar );
lTable->resize( lTable->sizeHint() );
lTable->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lTable->setMaximumWidth( lTable->sizeHint().width() );
- tableSpinBox = new QSpinBox( 0, 255, 1, bar );
+ tableSpinBox = new TQSpinBox( 0, 255, 1, bar );
tableSpinBox->resize( tableSpinBox->sizeHint() );
- connect( tableSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( tableChanged( int ) ) );
+ connect( tableSpinBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( tableChanged( int ) ) );
- QLabel* const lUnicode = new QLabel( i18n( "&Unicode code point:" ), bar );
+ TQLabel* const lUnicode = new TQLabel( i18n( "&Unicode code point:" ), bar );
lUnicode->resize( lUnicode->sizeHint() );
lUnicode->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lUnicode->setMaximumWidth( lUnicode->sizeHint().width() );
- const QRegExp rx( "[a-fA-F0-9]{1,4}" );
- QValidator* const validator = new QRegExpValidator( rx, this );
+ const TQRegExp rx( "[a-fA-F0-9]{1,4}" );
+ TQValidator* const validator = new TQRegExpValidator( rx, this );
d->unicodeLine = new KLineEdit( bar );
d->unicodeLine->setValidator(validator);
@@ -415,34 +415,34 @@ KCharSelect::KCharSelect( QWidget *parent, const char *name, const QString &_fon
d->unicodeLine->resize( d->unicodeLine->sizeHint() );
slotUpdateUnicode(_chr);
- connect( d->unicodeLine, SIGNAL( returnPressed() ), this, SLOT( slotUnicodeEntered() ) );
+ connect( d->unicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) );
- charTable = new KCharSelectTable( this, name, _font.isEmpty() ? QVBox::font().family() : _font, _chr, _tableNum );
- const QSize sz( charTable->contentsWidth() + 4 ,
+ charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQVBox::font().family() : _font, _chr, _tableNum );
+ const TQSize sz( charTable->contentsWidth() + 4 ,
charTable->contentsHeight() + 4 );
charTable->resize( sz );
//charTable->setMaximumSize( sz );
charTable->setMinimumSize( sz );
- charTable->setHScrollBarMode( QScrollView::AlwaysOff );
- charTable->setVScrollBarMode( QScrollView::AlwaysOff );
+ charTable->setHScrollBarMode( TQScrollView::AlwaysOff );
+ charTable->setVScrollBarMode( TQScrollView::AlwaysOff );
- setFont( _font.isEmpty() ? QVBox::font().family() : _font );
+ setFont( _font.isEmpty() ? TQVBox::font().family() : _font );
setTableNum( _tableNum );
- connect( charTable, SIGNAL( highlighted( const QChar & ) ), this, SLOT( slotUpdateUnicode( const QChar & ) ) );
- connect( charTable, SIGNAL( highlighted( const QChar & ) ), this, SLOT( charHighlighted( const QChar & ) ) );
- connect( charTable, SIGNAL( highlighted() ), this, SLOT( charHighlighted() ) );
- connect( charTable, SIGNAL( activated( const QChar & ) ), this, SLOT( charActivated( const QChar & ) ) );
- connect( charTable, SIGNAL( activated() ), this, SLOT( charActivated() ) );
- connect( charTable, SIGNAL( focusItemChanged( const QChar & ) ),
- this, SLOT( charFocusItemChanged( const QChar & ) ) );
- connect( charTable, SIGNAL( focusItemChanged() ), this, SLOT( charFocusItemChanged() ) );
- connect( charTable, SIGNAL( tableUp() ), this, SLOT( charTableUp() ) );
- connect( charTable, SIGNAL( tableDown() ), this, SLOT( charTableDown() ) );
+ connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( slotUpdateUnicode( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( charHighlighted( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( highlighted() ), this, TQT_SLOT( charHighlighted() ) );
+ connect( charTable, TQT_SIGNAL( activated( const TQChar & ) ), this, TQT_SLOT( charActivated( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( activated() ), this, TQT_SLOT( charActivated() ) );
+ connect( charTable, TQT_SIGNAL( focusItemChanged( const TQChar & ) ),
+ this, TQT_SLOT( charFocusItemChanged( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( focusItemChanged() ), this, TQT_SLOT( charFocusItemChanged() ) );
+ connect( charTable, TQT_SIGNAL( tableUp() ), this, TQT_SLOT( charTableUp() ) );
+ connect( charTable, TQT_SIGNAL( tableDown() ), this, TQT_SLOT( charTableDown() ) );
- connect( charTable, SIGNAL(doubleClicked()),this,SLOT(slotDoubleClicked()));
+ connect( charTable, TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(slotDoubleClicked()));
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setFocusProxy( charTable );
}
@@ -452,17 +452,17 @@ KCharSelect::~KCharSelect()
}
//==================================================================
-QSize KCharSelect::sizeHint() const
+TQSize KCharSelect::sizeHint() const
{
- return QVBox::sizeHint();
+ return TQVBox::sizeHint();
}
//==================================================================
-void KCharSelect::setFont( const QString &_font )
+void KCharSelect::setFont( const TQString &_font )
{
- const QValueList<QString>::Iterator it = fontList.find( _font );
+ const TQValueList<TQString>::Iterator it = fontList.find( _font );
if ( it != fontList.end() ) {
- QValueList<QString>::Iterator it2 = fontList.begin();
+ TQValueList<TQString>::Iterator it2 = fontList.begin();
int pos = 0;
for ( ; it != it2; ++it2, ++pos);
fontCombo->setCurrentItem( pos );
@@ -473,7 +473,7 @@ void KCharSelect::setFont( const QString &_font )
}
//==================================================================
-void KCharSelect::setChar( const QChar &_chr )
+void KCharSelect::setChar( const TQChar &_chr )
{
charTable->setChar( _chr );
slotUpdateUnicode( _chr );
@@ -490,7 +490,7 @@ void KCharSelect::setTableNum( int _tableNum )
void KCharSelect::fillFontCombo()
{
if ( !fontDataBase ) {
- fontDataBase = new QFontDatabase();
+ fontDataBase = new TQFontDatabase();
qAddPostRoutine( cleanupFontDatabase );
}
fontList=fontDataBase->families();
@@ -498,7 +498,7 @@ void KCharSelect::fillFontCombo()
}
//==================================================================
-void KCharSelect::fontSelected( const QString &_font )
+void KCharSelect::fontSelected( const TQString &_font )
{
charTable->setFont( _font );
emit fontChanged( _font );
@@ -513,7 +513,7 @@ void KCharSelect::tableChanged( int _value )
//==================================================================
void KCharSelect::slotUnicodeEntered( )
{
- const QString s = d->unicodeLine->text();
+ const TQString s = d->unicodeLine->text();
if (s.isEmpty())
return;
@@ -525,15 +525,15 @@ void KCharSelect::slotUnicodeEntered( )
const int table = uc / 256;
charTable->setTableNum( table );
tableSpinBox->setValue(table);
- const QChar ch(uc);
+ const TQChar ch(uc);
charTable->setChar( ch );
charActivated( ch );
}
-void KCharSelect::slotUpdateUnicode( const QChar &c )
+void KCharSelect::slotUpdateUnicode( const TQChar &c )
{
const int uc = c.unicode();
- QString s;
+ TQString s;
s.sprintf("%04X", uc);
d->unicodeLine->setText(s);
}
diff --git a/kdeui/kcharselect.h b/kdeui/kcharselect.h
index a511e5952..6acd546a1 100644
--- a/kdeui/kcharselect.h
+++ b/kdeui/kcharselect.h
@@ -21,13 +21,13 @@
#ifndef kcharselect_h
#define kcharselect_h
-#include <qgridview.h>
-#include <qvbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qpoint.h>
-#include <qstringlist.h>
+#include <tqgridview.h>
+#include <tqvbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -53,54 +53,54 @@ class KDEUI_EXPORT KCharSelectTable : public QGridView
Q_OBJECT
public:
- KCharSelectTable( QWidget *parent, const char *name, const QString &_font,
- const QChar &_chr, int _tableNum );
+ KCharSelectTable( TQWidget *parent, const char *name, const TQString &_font,
+ const TQChar &_chr, int _tableNum );
- virtual QSize sizeHint() const;
- virtual void resizeEvent( QResizeEvent * );
+ virtual TQSize sizeHint() const;
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void setFont( const QString &_font );
- virtual void setChar( const QChar &_chr );
+ virtual void setFont( const TQString &_font );
+ virtual void setChar( const TQChar &_chr );
virtual void setTableNum( int _tableNum );
- virtual QChar chr() { return vChr; }
+ virtual TQChar chr() { return vChr; }
protected:
- virtual void paintCell( class QPainter *p, int row, int col );
+ virtual void paintCell( class TQPainter *p, int row, int col );
- virtual void mousePressEvent( QMouseEvent *e ) { mouseMoveEvent( e ); }
- virtual void mouseDoubleClickEvent ( QMouseEvent *e ){ mouseMoveEvent( e ); emit doubleClicked();}
- virtual void mouseReleaseEvent( QMouseEvent *e ) { mouseMoveEvent( e ); emit activated( chr() ); emit activated(); }
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); }
+ virtual void mouseDoubleClickEvent ( TQMouseEvent *e ){ mouseMoveEvent( e ); emit doubleClicked();}
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); emit activated( chr() ); emit activated(); }
+ virtual void mouseMoveEvent( TQMouseEvent *e );
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
void gotoLeft();
void gotoRight();
void gotoUp();
void gotoDown();
- QString vFont;
- QChar vChr;
+ TQString vFont;
+ TQChar vChr;
int vTableNum;
- QPoint vPos;
- QChar focusItem;
- QPoint focusPos;
+ TQPoint vPos;
+ TQChar focusItem;
+ TQPoint focusPos;
int temp;
signals:
- void highlighted( const QChar &c );
+ void highlighted( const TQChar &c );
void highlighted();
- void activated( const QChar &c );
+ void activated( const TQChar &c );
void activated();
void focusItemChanged();
- void focusItemChanged( const QChar &c );
+ void focusItemChanged( const TQChar &c );
void tableUp();
void tableDown();
void doubleClicked();
private:
- virtual void setFont(const QFont &f) { QGridView::setFont(f); }
+ virtual void setFont(const TQFont &f) { TQGridView::setFont(f); }
void setToolTips();
protected:
virtual void virtual_hook( int id, void* data );
@@ -140,7 +140,7 @@ private:
class KDEUI_EXPORT KCharSelect : public QVBox
{
Q_OBJECT
- Q_PROPERTY( QString fontFamily READ font WRITE setFont )
+ Q_PROPERTY( TQString fontFamily READ font WRITE setFont )
Q_PROPERTY( int tableNum READ tableNum WRITE setTableNum )
Q_PROPERTY( bool fontComboEnabled READ isFontComboEnabled WRITE enableFontCombo )
Q_PROPERTY( bool tableSpinBoxEnabled READ isTableSpinBoxEnabled WRITE enableTableSpinBox )
@@ -151,23 +151,23 @@ public:
* chr which character should be selected and @p tableNum specifies
* the number of the table which should be displayed.
*/
- KCharSelect( QWidget *parent, const char *name,
- const QString &font = QString::null, const QChar &chr = ' ', int tableNum = 0 );
+ KCharSelect( TQWidget *parent, const char *name,
+ const TQString &font = TQString::null, const TQChar &chr = ' ', int tableNum = 0 );
~KCharSelect();
/**
* Reimplemented.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Sets the font which is displayed to @p font
*/
- virtual void setFont( const QString &font );
+ virtual void setFont( const TQString &font );
/**
* Sets the currently selected character to @p chr.
*/
- virtual void setChar( const QChar &chr );
+ virtual void setChar( const TQChar &chr );
/**
* Sets the currently displayed table to @p tableNum.
@@ -177,12 +177,12 @@ public:
/**
* Returns the currently selected character.
*/
- virtual QChar chr() const { return charTable->chr(); }
+ virtual TQChar chr() const { return charTable->chr(); }
/**
* Returns the currently displayed font.
*/
- virtual QString font() const { return fontCombo->currentText(); }
+ virtual TQString font() const { return fontCombo->currentText(); }
/**
* Returns the currently displayed table
@@ -224,38 +224,38 @@ protected:
virtual void fillFontCombo();
static void cleanupFontDatabase();
- QComboBox *fontCombo;
- QSpinBox *tableSpinBox;
+ TQComboBox *fontCombo;
+ TQSpinBox *tableSpinBox;
KCharSelectTable *charTable;
- QStringList fontList;
- static QFontDatabase * fontDataBase;
+ TQStringList fontList;
+ static TQFontDatabase * fontDataBase;
protected slots:
- void fontSelected( const QString &_font );
+ void fontSelected( const TQString &_font );
void tableChanged( int _value );
- void charHighlighted( const QChar &c ) { emit highlighted( c ); }
+ void charHighlighted( const TQChar &c ) { emit highlighted( c ); }
void charHighlighted() { emit highlighted(); }
- void charActivated( const QChar &c ) { emit activated( c ); }
+ void charActivated( const TQChar &c ) { emit activated( c ); }
void charActivated() { emit activated(); }
void charFocusItemChanged() { emit focusItemChanged(); }
- void charFocusItemChanged( const QChar &c ) { emit focusItemChanged( c ); }
+ void charFocusItemChanged( const TQChar &c ) { emit focusItemChanged( c ); }
void charTableUp() { if ( tableNum() < 255 ) setTableNum( tableNum() + 1 ); }
void charTableDown() { if ( tableNum() > 0 ) setTableNum( tableNum() - 1 ); }
void slotDoubleClicked() { emit doubleClicked(); }
void slotUnicodeEntered();
- void slotUpdateUnicode( const QChar &c );
+ void slotUpdateUnicode( const TQChar &c );
signals:
- void highlighted( const QChar &c );
+ void highlighted( const TQChar &c );
void highlighted();
- void activated( const QChar &c );
+ void activated( const TQChar &c );
void activated();
- void fontChanged( const QString &_font );
+ void fontChanged( const TQString &_font );
void focusItemChanged();
- void focusItemChanged( const QChar &c );
+ void focusItemChanged( const TQChar &c );
void doubleClicked();
private:
- virtual void setFont(const QFont &f) { QVBox::setFont(f); }
+ virtual void setFont(const TQFont &f) { TQVBox::setFont(f); }
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kcmenumngr.cpp b/kdeui/kcmenumngr.cpp
index 6255a764d..9cd9d6288 100644
--- a/kdeui/kcmenumngr.cpp
+++ b/kdeui/kcmenumngr.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*
*/
-#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
#include "kcmenumngr.h"
#include "kglobal.h"
#include "kconfig.h"
@@ -28,17 +28,17 @@
#undef KeyPress
#undef None
-template class QPtrDict<QPopupMenu>;
+template class TQPtrDict<TQPopupMenu>;
KContextMenuManager* KContextMenuManager::manager = 0;
-KContextMenuManager::KContextMenuManager( QObject* parent, const char* name )
- : QObject( parent, name)
+KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name )
+ : TQObject( parent, name)
{
- KConfigGroupSaver saver ( KGlobal::config(), QString::fromLatin1("Shortcuts") ) ;
- menuKey = KShortcut( saver.config()->readEntry(QString::fromLatin1("PopupContextMenu"), QString::fromLatin1("Menu") ) ).keyCodeQt();
- saver.config()->setGroup( QString::fromLatin1("ContextMenus") ) ;
- showOnPress = saver.config()->readBoolEntry(QString::fromLatin1("ShowOnPress"), true );
+ KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ;
+ menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt();
+ saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ;
+ showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true );
}
KContextMenuManager::~KContextMenuManager()
@@ -54,40 +54,40 @@ bool KContextMenuManager::showOnButtonPress( void )
}
-void KContextMenuManager::insert( QWidget* widget, QPopupMenu* popup )
+void KContextMenuManager::insert( TQWidget* widget, TQPopupMenu* popup )
{
if ( !manager )
manager = new KContextMenuManager;
- manager->connect( widget, SIGNAL( destroyed() ), manager, SLOT( widgetDestroyed() ) );
+ manager->connect( widget, TQT_SIGNAL( destroyed() ), manager, TQT_SLOT( widgetDestroyed() ) );
manager->menus.insert( widget, popup );
widget->installEventFilter( manager );
}
-bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
+bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e)
{
- QPopupMenu* popup = 0;
- QPoint pos;
+ TQPopupMenu* popup = 0;
+ TQPoint pos;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- if (((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonPress:
+ if (((TQMouseEvent*) e )->button() != RightButton )
break;
if ( !showOnPress )
return true; // eat event for safety
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::MouseButtonRelease:
- if ( showOnPress || ((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonRelease:
+ if ( showOnPress || ((TQMouseEvent*) e )->button() != RightButton )
break;
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
if ( !o->isWidgetType() )
break;
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
int key = k->key();
if ( k->state() & ShiftButton )
key |= SHIFT;
@@ -99,7 +99,7 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
break;
popup = menus[o];
if ( popup ) {
- QWidget* w = (QWidget*) o ;
+ TQWidget* w = (TQWidget*) o ;
// ### workaround
pos = w->mapToGlobal( w->rect().center() );
@@ -122,8 +122,8 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
void KContextMenuManager::widgetDestroyed()
{
- if ( menus.find( (QObject*)sender() ) )
- menus.remove( (QObject*)sender() );
+ if ( menus.find( (TQObject*)sender() ) )
+ menus.remove( (TQObject*)sender() );
}
#include "kcmenumngr.moc"
diff --git a/kdeui/kcmenumngr.h b/kdeui/kcmenumngr.h
index 36a2580ad..81d888fcb 100644
--- a/kdeui/kcmenumngr.h
+++ b/kdeui/kcmenumngr.h
@@ -24,9 +24,9 @@
class QWidget;
class QPopupMenu;
class KContextMenuManagerPrivate;
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qkeysequence.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqkeysequence.h>
#include <kdelibs_export.h>
@@ -35,8 +35,8 @@ class KContextMenuManagerPrivate;
@author Matthias Ettrich <ettrich@kde.org>
KContextMenuManager manages configurable context popup menus. Instead
-of reimplementing QWidget::mousePressEvent() or
- QWidget::mouseReleaseEvent() and/or QWidget::keyPressEvent(), simply
+of reimplementing TQWidget::mousePressEvent() or
+ TQWidget::mouseReleaseEvent() and/or TQWidget::keyPressEvent(), simply
create the popup menu and insert it into the context menu manager with
the static function insert().
@@ -70,7 +70,7 @@ The shortcut key to invoke the context menu is defined in the standard
The key can be configured with the standard keys module in the KDE control center.
If the popup menu is invoked with the keyboard shortcut, it's shown at
-the position of the micro focus hint of the widget ( QWidget::microFocusHint() ).
+the position of the micro focus hint of the widget ( TQWidget::microFocusHint() ).
*/
class KDEUI_EXPORT KContextMenuManager : public QObject
@@ -84,7 +84,7 @@ public:
Ownership of the popup menu is not transferred to the context
menu manager.
*/
- static void insert( QWidget* widget, QPopupMenu* popup );
+ static void insert( TQWidget* widget, TQPopupMenu* popup );
/**
* Use this method to get information about when a popup menu
@@ -99,12 +99,12 @@ public:
private slots:
void widgetDestroyed();
private:
- KContextMenuManager( QObject* parent = 0, const char* name = 0);
+ KContextMenuManager( TQObject* parent = 0, const char* name = 0);
~KContextMenuManager();
- bool eventFilter( QObject *, QEvent * );
- QPtrDict<QPopupMenu> menus;
+ bool eventFilter( TQObject *, TQEvent * );
+ TQPtrDict<TQPopupMenu> menus;
bool showOnPress;
- QKeySequence menuKey;
+ TQKeySequence menuKey;
static KContextMenuManager* manager;
friend class I_really_like_this_class; // avoid warning
diff --git a/kdeui/kcmodule.cpp b/kdeui/kcmodule.cpp
index 43b2cdd95..0c26d11ec 100644
--- a/kdeui/kcmodule.cpp
+++ b/kdeui/kcmodule.cpp
@@ -21,7 +21,7 @@
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kconfigskeleton.h>
@@ -46,11 +46,11 @@ public:
KInstance *_instance;
KAboutData *_about;
- QString _rootOnlyMsg;
+ TQString _rootOnlyMsg;
bool _useRootOnlyMsg;
bool _hasOwnInstance;
- QPtrList<KConfigDialogManager> managers;
- QString _quickHelp;
+ TQPtrList<KConfigDialogManager> managers;
+ TQString _quickHelp;
// this member is used to record the state on non-automatically
// managed widgets, allowing for mixed KConfigXT-drive and manual
@@ -59,8 +59,8 @@ public:
bool _unmanagedWidgetChangeState;
};
-KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
- : QWidget(parent, name)
+KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &)
+ : TQWidget(parent, name)
{
init();
if (name && strlen(name)) {
@@ -74,8 +74,8 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
}
-KCModule::KCModule(KInstance *instance, QWidget *parent, const QStringList & )
- : QWidget(parent, instance ? instance->instanceName().data() : 0)
+KCModule::KCModule(KInstance *instance, TQWidget *parent, const TQStringList & )
+ : TQWidget(parent, instance ? instance->instanceName().data() : 0)
{
init();
d->_instance = instance;
@@ -95,10 +95,10 @@ void KCModule::init()
_btn = Help|Default|Apply;
}
-KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, QWidget* widget )
+KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, TQWidget* widget )
{
KConfigDialogManager* manager = new KConfigDialogManager( widget, config, name() );
- connect( manager, SIGNAL( widgetModified() ), SLOT( widgetChanged() ));
+ connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() ));
d->managers.append( manager );
return manager;
}
@@ -167,12 +167,12 @@ void KCModule::setAboutData( KAboutData* about )
d->_about = about;
}
-void KCModule::setRootOnlyMsg(const QString& msg)
+void KCModule::setRootOnlyMsg(const TQString& msg)
{
d->_rootOnlyMsg = msg;
}
-QString KCModule::rootOnlyMsg() const
+TQString KCModule::rootOnlyMsg() const
{
return d->_rootOnlyMsg;
}
@@ -197,19 +197,19 @@ KInstance *KCModule::instance() const
return d->_instance;
}
-void KCModule::setQuickHelp( const QString& help )
+void KCModule::setQuickHelp( const TQString& help )
{
d->_quickHelp = help;
emit( quickHelpChanged() );
}
-QString KCModule::quickHelp() const
+TQString KCModule::quickHelp() const
{
return d->_quickHelp;
}
-const QPtrList<KConfigDialogManager>& KCModule::configs() const
+const TQPtrList<KConfigDialogManager>& KCModule::configs() const
{
return d->managers;
}
diff --git a/kdeui/kcmodule.h b/kdeui/kcmodule.h
index a8297c4ce..1ec52a7f2 100644
--- a/kdeui/kcmodule.h
+++ b/kdeui/kcmodule.h
@@ -23,7 +23,7 @@
#ifndef KCMODULE_H
#define KCMODULE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ class KInstance;
* \code
* #include <kgenericfactory.h>
*
- * typedef KGenericFactory<YourKCModule, QWidget> YourKCModuleFactory;
+ * typedef KGenericFactory<YourKCModule, TQWidget> YourKCModuleFactory;
* K_EXPORT_COMPONENT_FACTORY( yourLibName, YourKCModuleFactory("name_of_the_po_file") );
* \endcode
*
@@ -86,12 +86,12 @@ public:
/*
* Base class for all KControlModules.
- * Make sure you have a QStringList argument in your
+ * Make sure you have a TQStringList argument in your
* implementation.
*/
- KCModule(QWidget *parent=0, const char *name=0, const QStringList &args=QStringList() );
+ KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() );
- KCModule(KInstance *instance, QWidget *parent=0, const QStringList &args=QStringList() );
+ KCModule(KInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() );
/*
* Destroys the module.
@@ -175,7 +175,7 @@ public:
*
* @note make sure the quick help text gets translated (use i18n()).
*/
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
/**
* This is generally only called for the KBugReport.
@@ -214,7 +214,7 @@ public:
*
* @see KCModule::setRootOnlyMsg
*/
- QString rootOnlyMsg() const;
+ TQString rootOnlyMsg() const;
/**
* Tell if KControl should show a RootOnly message when run as
@@ -234,7 +234,7 @@ public:
* @return a list of @ref KConfigDialogManager's in use, if any.
* @since 3.4
*/
- const QPtrList<KConfigDialogManager>& configs() const;
+ const TQPtrList<KConfigDialogManager>& configs() const;
protected:
/**
@@ -247,14 +247,14 @@ protected:
* @param config the KConfigSkeleton to use
* @param widget the widget to watch
*/
- KConfigDialogManager* addConfig( KConfigSkeleton *config, QWidget* widget );
+ KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget );
/**
* Sets the quick help.
*
* @since 3.3
*/
- void setQuickHelp( const QString& help );
+ void setQuickHelp( const TQString& help );
signals:
@@ -317,7 +317,7 @@ protected:
*
* @see KCModule::rootOnlyMsg
*/
- void setRootOnlyMsg(const QString& msg);
+ void setRootOnlyMsg(const TQString& msg);
/**
* Change whether or not the RootOnly message should be shown.
diff --git a/kdeui/kcolorbutton.cpp b/kdeui/kcolorbutton.cpp
index a3602ed4e..3cccbe1df 100644
--- a/kdeui/kcolorbutton.cpp
+++ b/kdeui/kcolorbutton.cpp
@@ -20,11 +20,11 @@
#include <config.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqstyle.h>
#include <kglobalsettings.h>
#include <kstdaccel.h>
#include "kcolordialog.h"
@@ -35,37 +35,37 @@ class KColorButton::KColorButtonPrivate
{
public:
bool m_bdefaultColor;
- QColor m_defaultColor;
+ TQColor m_defaultColor;
};
-KColorButton::KColorButton( QWidget *parent, const char *name )
- : QPushButton( parent, name )
+KColorButton::KColorButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = false;
- d->m_defaultColor = QColor();
+ d->m_defaultColor = TQColor();
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
-KColorButton::KColorButton( const QColor &c, QWidget *parent,
+KColorButton::KColorButton( const TQColor &c, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ), col(c)
+ : TQPushButton( parent, name ), col(c)
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = false;
- d->m_defaultColor = QColor();
+ d->m_defaultColor = TQColor();
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
-KColorButton::KColorButton( const QColor &c, const QColor &defaultColor, QWidget *parent,
+KColorButton::KColorButton( const TQColor &c, const TQColor &defaultColor, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ), col(c)
+ : TQPushButton( parent, name ), col(c)
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = true;
@@ -73,7 +73,7 @@ KColorButton::KColorButton( const QColor &c, const QColor &defaultColor, QWidget
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
KColorButton::~KColorButton()
@@ -81,7 +81,7 @@ KColorButton::~KColorButton()
delete d;
}
-void KColorButton::setColor( const QColor &c )
+void KColorButton::setColor( const TQColor &c )
{
if ( col != c ) {
col = c;
@@ -90,89 +90,89 @@ void KColorButton::setColor( const QColor &c )
}
}
-QColor KColorButton::defaultColor() const
+TQColor KColorButton::defaultColor() const
{
return d->m_defaultColor;
}
-void KColorButton::setDefaultColor( const QColor &c )
+void KColorButton::setDefaultColor( const TQColor &c )
{
d->m_bdefaultColor = c.isValid();
d->m_defaultColor = c;
}
-void KColorButton::drawButtonLabel( QPainter *painter )
+void KColorButton::drawButtonLabel( TQPainter *painter )
{
int x, y, w, h;
- QRect r = style().subRect( QStyle::SR_PushButtonContents, this );
+ TQRect r = style().subRect( TQStyle::SR_PushButtonContents, this );
r.rect(&x, &y, &w, &h);
- int margin = style().pixelMetric( QStyle::PM_ButtonMargin, this );
+ int margin = style().pixelMetric( TQStyle::PM_ButtonMargin, this );
x += margin;
y += margin;
w -= 2*margin;
h -= 2*margin;
if (isOn() || isDown()) {
- x += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this );
- y += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this );
+ x += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
+ y += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
}
- QColor fillCol = isEnabled() ? col : backgroundColor();
+ TQColor fillCol = isEnabled() ? col : backgroundColor();
qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL);
if ( fillCol.isValid() )
painter->fillRect( x+1, y+1, w-2, h-2, fillCol );
if ( hasFocus() ) {
- QRect focusRect = style().subRect( QStyle::SR_PushButtonFocusRect, this );
- style().drawPrimitive( QStyle::PE_FocusRect, painter, focusRect, colorGroup() );
+ TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this );
+ style().drawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() );
}
}
-QSize KColorButton::sizeHint() const
+TQSize KColorButton::sizeHint() const
{
- return style().sizeFromContents(QStyle::CT_PushButton, this, QSize(40, 15)).
- expandedTo(QApplication::globalStrut());
+ return style().sizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)).
+ expandedTo(TQApplication::globalStrut());
}
-void KColorButton::dragEnterEvent( QDragEnterEvent *event)
+void KColorButton::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( KColorDrag::canDecode( event) && isEnabled());
}
-void KColorButton::dropEvent( QDropEvent *event)
+void KColorButton::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
setColor(c);
}
}
-void KColorButton::keyPressEvent( QKeyEvent *e )
+void KColorButton::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
if ( KStdAccel::copy().contains( key ) ) {
- QMimeSource* mime = new KColorDrag( color() );
- QApplication::clipboard()->setData( mime, QClipboard::Clipboard );
+ TQMimeSource* mime = new KColorDrag( color() );
+ TQApplication::clipboard()->setData( mime, QClipboard::Clipboard );
}
else if ( KStdAccel::paste().contains( key ) ) {
- QColor color;
- KColorDrag::decode( QApplication::clipboard()->data( QClipboard::Clipboard ), color );
+ TQColor color;
+ KColorDrag::decode( TQApplication::clipboard()->data( QClipboard::Clipboard ), color );
setColor( color );
}
else
- QPushButton::keyPressEvent( e );
+ TQPushButton::keyPressEvent( e );
}
-void KColorButton::mousePressEvent( QMouseEvent *e)
+void KColorButton::mousePressEvent( TQMouseEvent *e)
{
mPos = e->pos();
- QPushButton::mousePressEvent(e);
+ TQPushButton::mousePressEvent(e);
}
-void KColorButton::mouseMoveEvent( QMouseEvent *e)
+void KColorButton::mouseMoveEvent( TQMouseEvent *e)
{
if( (e->state() & LeftButton) &&
(e->pos()-mPos).manhattanLength() > KGlobalSettings::dndEventDelay() )
@@ -186,16 +186,16 @@ void KColorButton::mouseMoveEvent( QMouseEvent *e)
void KColorButton::chooseColor()
{
- QColor c = color();
+ TQColor c = color();
if ( d->m_bdefaultColor )
{
- if( KColorDialog::getColor( c, d->m_defaultColor, this ) != QDialog::Rejected ) {
+ if( KColorDialog::getColor( c, d->m_defaultColor, this ) != TQDialog::Rejected ) {
setColor( c );
}
}
else
{
- if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) {
+ if( KColorDialog::getColor( c, this ) != TQDialog::Rejected ) {
setColor( c );
}
}
diff --git a/kdeui/kcolorbutton.h b/kdeui/kcolorbutton.h
index cb522cdfa..cff929156 100644
--- a/kdeui/kcolorbutton.h
+++ b/kdeui/kcolorbutton.h
@@ -20,7 +20,7 @@
#ifndef __COLBTN_H__
#define __COLBTN_H__
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -37,21 +37,21 @@ class KColorButtonPrivate;
class KDEUI_EXPORT KColorButton : public QPushButton
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
- Q_PROPERTY( QColor defaultColor READ defaultColor WRITE setDefaultColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor defaultColor READ defaultColor WRITE setDefaultColor )
public:
/**
* Creates a color button.
*/
- KColorButton( QWidget *parent, const char *name = 0L );
+ KColorButton( TQWidget *parent, const char *name = 0L );
/**
* Creates a color button with an initial color @p c.
*/
- KColorButton( const QColor &c, QWidget *parent, const char *name = 0L );
+ KColorButton( const TQColor &c, TQWidget *parent, const char *name = 0L );
/// @since 3.1
- KColorButton( const QColor &c, const QColor &defaultColor, QWidget *parent,
+ KColorButton( const TQColor &c, const TQColor &defaultColor, TQWidget *parent,
const char *name=0L );
virtual ~KColorButton();
@@ -59,49 +59,49 @@ public:
/**
* Returns the currently chosen color.
*/
- QColor color() const
+ TQColor color() const
{ return col; }
/**
* Sets the current color to @p c.
*/
- void setColor( const QColor &c );
+ void setColor( const TQColor &c );
/**
* Returns the default color or an invalid color
* if no default color is set.
* @since 3.4
*/
- QColor defaultColor() const;
+ TQColor defaultColor() const;
/**
* Sets the default color to @p c.
* @since 3.4
*/
- void setDefaultColor( const QColor &c );
+ void setDefaultColor( const TQColor &c );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
signals:
/**
* Emitted when the color of the widget
* is changed, either with setColor() or via user selection.
*/
- void changed( const QColor &newColor );
+ void changed( const TQColor &newColor );
protected slots:
void chooseColor();
protected:
- virtual void drawButtonLabel( QPainter *p );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e);
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void drawButtonLabel( TQPainter *p );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e);
+ virtual void keyPressEvent( TQKeyEvent *e );
private:
- QColor col;
- QPoint mPos;
+ TQColor col;
+ TQPoint mPos;
bool dragFlag;
protected:
diff --git a/kdeui/kcolorcombo.cpp b/kdeui/kcolorcombo.cpp
index 1e39d75cb..c418b6a81 100644
--- a/kdeui/kcolorcombo.cpp
+++ b/kdeui/kcolorcombo.cpp
@@ -32,17 +32,17 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -68,14 +68,14 @@
#ifndef KDE_USE_FINAL
#define STANDARD_PAL_SIZE 17
-static QColor *standardPalette = 0;
+static TQColor *standardPalette = 0;
static void createStandardPalette()
{
if ( standardPalette )
return;
- standardPalette = new QColor [STANDARD_PAL_SIZE];
+ standardPalette = new TQColor [STANDARD_PAL_SIZE];
int i = 0;
@@ -108,8 +108,8 @@ class KColorCombo::KColorComboPrivate
bool showEmptyList;
};
-KColorCombo::KColorCombo( QWidget *parent, const char *name )
- : QComboBox( parent, name )
+KColorCombo::KColorCombo( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name )
{
d=new KColorComboPrivate();
d->showEmptyList=false;
@@ -121,8 +121,8 @@ KColorCombo::KColorCombo( QWidget *parent, const char *name )
addColors();
- connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) );
- connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) );
+ connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
+ connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) );
}
@@ -133,7 +133,7 @@ KColorCombo::~KColorCombo()
/**
Sets the current color
*/
-void KColorCombo::setColor( const QColor &col )
+void KColorCombo::setColor( const TQColor &col )
{
internalcolor = col;
d->showEmptyList=false;
@@ -144,13 +144,13 @@ void KColorCombo::setColor( const QColor &col )
/**
Returns the currently selected color
*/
-QColor KColorCombo::color() const {
+TQColor KColorCombo::color() const {
return internalcolor;
}
-void KColorCombo::resizeEvent( QResizeEvent *re )
+void KColorCombo::resizeEvent( TQResizeEvent *re )
{
- QComboBox::resizeEvent( re );
+ TQComboBox::resizeEvent( re );
addColors();
}
@@ -168,12 +168,12 @@ void KColorCombo::slotActivated( int index )
{
if ( index == 0 )
{
- if ( KColorDialog::getColor( customColor, this ) == QDialog::Accepted )
+ if ( KColorDialog::getColor( customColor, this ) == TQDialog::Accepted )
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4);
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4);
+ TQPixmap pixmap( rect.width(), rect.height() );
if ( qGray( customColor.rgb() ) < 128 )
pen.setColor( white );
@@ -181,10 +181,10 @@ void KColorCombo::slotActivated( int index )
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
changeItem( pixmap, 0 );
@@ -211,10 +211,10 @@ void KColorCombo::slotHighlighted( int index )
void KColorCombo::addColors()
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4 );
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4 );
+ TQPixmap pixmap( rect.width(), rect.height() );
int i;
clear();
@@ -234,10 +234,10 @@ void KColorCombo::addColors()
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
insertItem( pixmap );
@@ -246,7 +246,7 @@ void KColorCombo::addColors()
for ( i = 0; i < STANDARD_PAL_SIZE; i++ )
{
painter.begin( &pixmap );
- QBrush brush( standardPalette[i] );
+ TQBrush brush( standardPalette[i] );
painter.fillRect( rect, brush );
painter.end();
diff --git a/kdeui/kcolorcombo.h b/kdeui/kcolorcombo.h
index c4754c55f..8ef33f5c9 100644
--- a/kdeui/kcolorcombo.h
+++ b/kdeui/kcolorcombo.h
@@ -26,7 +26,7 @@
#ifndef _KCOLORCOMBO_H__
#define _KCOLORCOMBO_H__
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kcolordialog.h>
#include "kselect.h"
@@ -39,23 +39,23 @@ class KColorComboInternal;
class KDEUI_EXPORT KColorCombo : public QComboBox
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
public:
/**
* Constructs a color combo box.
*/
- KColorCombo( QWidget *parent, const char *name = 0L );
+ KColorCombo( TQWidget *parent, const char *name = 0L );
~KColorCombo();
/**
* Selects the color @p col.
*/
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
/**
* Returns the currently selected color.
**/
- QColor color() const;
+ TQColor color() const;
/**
@@ -67,14 +67,14 @@ signals:
/**
* Emitted when a new color box has been selected.
*/
- void activated( const QColor &col );
+ void activated( const TQColor &col );
/**
* Emitted when a new item has been highlighted.
*/
- void highlighted( const QColor &col );
+ void highlighted( const TQColor &col );
protected:
- virtual void resizeEvent( QResizeEvent *re );
+ virtual void resizeEvent( TQResizeEvent *re );
private slots:
void slotActivated( int index );
@@ -82,8 +82,8 @@ private slots:
private:
void addColors();
- QColor customColor;
- QColor internalcolor;
+ TQColor customColor;
+ TQColor internalcolor;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcolordialog.cpp b/kdeui/kcolordialog.cpp
index 6eb675977..3e158e928 100644
--- a/kdeui/kcolordialog.cpp
+++ b/kdeui/kcolordialog.cpp
@@ -31,19 +31,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -96,8 +96,8 @@ const int customColorIndex = 1;
class KColorSpinBox : public QSpinBox
{
public:
- KColorSpinBox(int minValue, int maxValue, int step, QWidget* parent)
- : QSpinBox(minValue, maxValue, step, parent, "kcolorspinbox")
+ KColorSpinBox(int minValue, int maxValue, int step, TQWidget* parent)
+ : TQSpinBox(minValue, maxValue, step, parent, "kcolorspinbox")
{ }
// Override Qt's braindead auto-selection.
@@ -114,23 +114,23 @@ public:
#define STANDARD_PAL_SIZE 17
KColor::KColor()
-: QColor()
+: TQColor()
{
r = 0; g = 0; b = 0; h = 0; s = 0; v = 0;
}
KColor::KColor( const KColor &col)
-: QColor( col )
+: TQColor( col )
{
h = col.h; s = col.s; v = col.v;
r = col.r; g = col.g; b = col.b;
}
-KColor::KColor( const QColor &col)
-: QColor( col )
+KColor::KColor( const TQColor &col)
+: TQColor( col )
{
- QColor::getRgb(&r, &g, &b);
- QColor::getHsv(&h, &s, &v);
+ TQColor::getRgb(&r, &g, &b);
+ TQColor::getHsv(&h, &s, &v);
}
bool KColor::operator==(const KColor& col) const
@@ -141,7 +141,7 @@ bool KColor::operator==(const KColor& col) const
KColor& KColor::operator=(const KColor& col)
{
- *(QColor *)this = col;
+ *(TQColor *)this = col;
h = col.h; s = col.s; v = col.v;
r = col.r; g = col.g; b = col.b;
return *this;
@@ -151,16 +151,16 @@ void
KColor::setHsv(int _h, int _s, int _v)
{
h = _h; s = _s; v = _v;
- QColor::setHsv(h, s, v);
- QColor::rgb(&r, &g, &b);
+ TQColor::setHsv(h, s, v);
+ TQColor::rgb(&r, &g, &b);
}
void
KColor::setRgb(int _r, int _g, int _b)
{
r = _r; g = _g; b = _b;
- QColor::setRgb(r, g, b);
- QColor::hsv(&h, &s, &v);
+ TQColor::setRgb(r, g, b);
+ TQColor::hsv(&h, &s, &v);
}
void
@@ -176,15 +176,15 @@ KColor::hsv(int *_h, int *_s, int *_v) const
}
-static QColor *standardPalette = 0;
-static KStaticDeleter<QColor> spd;
+static TQColor *standardPalette = 0;
+static KStaticDeleter<TQColor> spd;
static void createStandardPalette()
{
if ( standardPalette )
return;
- spd.setObject(standardPalette, new QColor [STANDARD_PAL_SIZE], true/*array*/);
+ spd.setObject(standardPalette, new TQColor [STANDARD_PAL_SIZE], true/*array*/);
int i = 0;
@@ -208,7 +208,7 @@ static void createStandardPalette()
}
-KHSSelector::KHSSelector( QWidget *parent, const char *name )
+KHSSelector::KHSSelector( TQWidget *parent, const char *name )
: KXYSelector( parent, name )
{
setRange( 0, 0, 359, 255 );
@@ -219,21 +219,21 @@ void KHSSelector::updateContents()
drawPalette(&pixmap);
}
-void KHSSelector::resizeEvent( QResizeEvent * )
+void KHSSelector::resizeEvent( TQResizeEvent * )
{
updateContents();
}
-void KHSSelector::drawContents( QPainter *painter )
+void KHSSelector::drawContents( TQPainter *painter )
{
painter->drawPixmap( contentsRect().x(), contentsRect().y(), pixmap );
}
-void KHSSelector::drawPalette( QPixmap *pixmap )
+void KHSSelector::drawPalette( TQPixmap *pixmap )
{
int xSize = contentsRect().width(), ySize = contentsRect().height();
- QImage image( xSize, ySize, 32 );
- QColor col;
+ TQImage image( xSize, ySize, 32 );
+ TQColor col;
int h, s;
uint *p;
@@ -248,7 +248,7 @@ void KHSSelector::drawPalette( QPixmap *pixmap )
}
}
- if ( QColor::numBitPlanes() <= 8 )
+ if ( TQColor::numBitPlanes() <= 8 )
{
createStandardPalette();
KImageEffect::dither( image, standardPalette, STANDARD_PAL_SIZE );
@@ -259,19 +259,19 @@ void KHSSelector::drawPalette( QPixmap *pixmap )
//-----------------------------------------------------------------------------
-KValueSelector::KValueSelector( QWidget *parent, const char *name )
+KValueSelector::KValueSelector( TQWidget *parent, const char *name )
: KSelector( KSelector::Vertical, parent, name ), _hue(0), _sat(0)
{
setRange( 0, 255 );
- pixmap.setOptimization( QPixmap::BestOptim );
+ pixmap.setOptimization( TQPixmap::BestOptim );
}
-KValueSelector::KValueSelector(Orientation o, QWidget *parent, const char *name
+KValueSelector::KValueSelector(Orientation o, TQWidget *parent, const char *name
)
: KSelector( o, parent, name), _hue(0), _sat(0)
{
setRange( 0, 255 );
- pixmap.setOptimization( QPixmap::BestOptim );
+ pixmap.setOptimization( TQPixmap::BestOptim );
}
void KValueSelector::updateContents()
@@ -279,21 +279,21 @@ void KValueSelector::updateContents()
drawPalette(&pixmap);
}
-void KValueSelector::resizeEvent( QResizeEvent * )
+void KValueSelector::resizeEvent( TQResizeEvent * )
{
updateContents();
}
-void KValueSelector::drawContents( QPainter *painter )
+void KValueSelector::drawContents( TQPainter *painter )
{
painter->drawPixmap( contentsRect().x(), contentsRect().y(), pixmap );
}
-void KValueSelector::drawPalette( QPixmap *pixmap )
+void KValueSelector::drawPalette( TQPixmap *pixmap )
{
int xSize = contentsRect().width(), ySize = contentsRect().height();
- QImage image( xSize, ySize, 32 );
- QColor col;
+ TQImage image( xSize, ySize, 32 );
+ TQColor col;
uint *p;
QRgb rgb;
@@ -324,7 +324,7 @@ void KValueSelector::drawPalette( QPixmap *pixmap )
}
}
- if ( QColor::numBitPlanes() <= 8 )
+ if ( TQColor::numBitPlanes() <= 8 )
{
createStandardPalette();
KImageEffect::dither( image, standardPalette, STANDARD_PAL_SIZE );
@@ -334,16 +334,16 @@ void KValueSelector::drawPalette( QPixmap *pixmap )
//-----------------------------------------------------------------------------
-KColorCells::KColorCells( QWidget *parent, int rows, int cols )
- : QGridView( parent )
+KColorCells::KColorCells( TQWidget *parent, int rows, int cols )
+ : TQGridView( parent )
{
shade = true;
setNumRows( rows );
setNumCols( cols );
- colors = new QColor [ rows * cols ];
+ colors = new TQColor [ rows * cols ];
for ( int i = 0; i < rows * cols; i++ )
- colors[i] = QColor();
+ colors[i] = TQColor();
selected = 0;
inMouse = false;
@@ -362,15 +362,15 @@ KColorCells::~KColorCells()
delete [] colors;
}
-void KColorCells::setColor( int colNum, const QColor &col )
+void KColorCells::setColor( int colNum, const TQColor &col )
{
colors[colNum] = col;
updateCell( colNum/numCols(), colNum%numCols() );
}
-void KColorCells::paintCell( QPainter *painter, int row, int col )
+void KColorCells::paintCell( TQPainter *painter, int row, int col )
{
- QBrush brush;
+ TQBrush brush;
int w = 1;
if (shade)
@@ -379,7 +379,7 @@ void KColorCells::paintCell( QPainter *painter, int row, int col )
cellHeight()-2, colorGroup(), true, 1, &brush );
w = 2;
}
- QColor color = colors[ row * numCols() + col ];
+ TQColor color = colors[ row * numCols() + col ];
if (!color.isValid())
{
if (!shade) return;
@@ -387,26 +387,26 @@ void KColorCells::paintCell( QPainter *painter, int row, int col )
}
painter->setPen( color );
- painter->setBrush( QBrush( color ) );
+ painter->setBrush( TQBrush( color ) );
painter->drawRect( w, w, cellWidth()-w*2, cellHeight()-w*2 );
if ( row * numCols() + col == selected )
painter->drawWinFocusRect( w, w, cellWidth()-w*2, cellHeight()-w*2 );
}
-void KColorCells::resizeEvent( QResizeEvent * )
+void KColorCells::resizeEvent( TQResizeEvent * )
{
setCellWidth( width() / numCols() );
setCellHeight( height() / numRows() );
}
-void KColorCells::mousePressEvent( QMouseEvent *e )
+void KColorCells::mousePressEvent( TQMouseEvent *e )
{
inMouse = true;
mPos = e->pos();
}
-int KColorCells::posToCell(const QPoint &pos, bool ignoreBorders)
+int KColorCells::posToCell(const TQPoint &pos, bool ignoreBorders)
{
int row = pos.y() / cellHeight();
int col = pos.x() / cellWidth();
@@ -424,7 +424,7 @@ int KColorCells::posToCell(const QPoint &pos, bool ignoreBorders)
return cell;
}
-void KColorCells::mouseMoveEvent( QMouseEvent *e )
+void KColorCells::mouseMoveEvent( TQMouseEvent *e )
{
if( !(e->state() & LeftButton)) return;
@@ -443,21 +443,21 @@ void KColorCells::mouseMoveEvent( QMouseEvent *e )
}
}
-void KColorCells::dragEnterEvent( QDragEnterEvent *event)
+void KColorCells::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( acceptDrags && KColorDrag::canDecode( event));
}
-void KColorCells::dropEvent( QDropEvent *event)
+void KColorCells::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
int cell = posToCell(event->pos(), true);
setColor(cell,c);
}
}
-void KColorCells::mouseReleaseEvent( QMouseEvent *e )
+void KColorCells::mouseReleaseEvent( TQMouseEvent *e )
{
int cell = posToCell(mPos);
int currentCell = posToCell(e->pos());
@@ -480,7 +480,7 @@ void KColorCells::mouseReleaseEvent( QMouseEvent *e )
emit colorSelected( cell );
}
-void KColorCells::mouseDoubleClickEvent( QMouseEvent * /*e*/ )
+void KColorCells::mouseDoubleClickEvent( TQMouseEvent * /*e*/ )
{
int cell = posToCell(mPos);
@@ -491,9 +491,9 @@ void KColorCells::mouseDoubleClickEvent( QMouseEvent * /*e*/ )
//-----------------------------------------------------------------------------
-KColorPatch::KColorPatch( QWidget *parent ) : QFrame( parent )
+KColorPatch::KColorPatch( TQWidget *parent ) : TQFrame( parent )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
colContext = 0;
setAcceptDrops( true);
}
@@ -501,33 +501,33 @@ KColorPatch::KColorPatch( QWidget *parent ) : QFrame( parent )
KColorPatch::~KColorPatch()
{
if ( colContext )
- QColor::destroyAllocContext( colContext );
+ TQColor::destroyAllocContext( colContext );
}
-void KColorPatch::setColor( const QColor &col )
+void KColorPatch::setColor( const TQColor &col )
{
if ( colContext )
- QColor::destroyAllocContext( colContext );
- colContext = QColor::enterAllocContext();
+ TQColor::destroyAllocContext( colContext );
+ colContext = TQColor::enterAllocContext();
color.setRgb( col.rgb() );
color.alloc();
- QColor::leaveAllocContext();
+ TQColor::leaveAllocContext();
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
drawContents( &painter );
painter.end();
}
-void KColorPatch::drawContents( QPainter *painter )
+void KColorPatch::drawContents( TQPainter *painter )
{
painter->setPen( color );
- painter->setBrush( QBrush( color ) );
+ painter->setBrush( TQBrush( color ) );
painter->drawRect( contentsRect() );
}
-void KColorPatch::mouseMoveEvent( QMouseEvent *e )
+void KColorPatch::mouseMoveEvent( TQMouseEvent *e )
{
// Drag color object
if( !(e->state() & LeftButton)) return;
@@ -535,14 +535,14 @@ void KColorPatch::mouseMoveEvent( QMouseEvent *e )
d->dragCopy();
}
-void KColorPatch::dragEnterEvent( QDragEnterEvent *event)
+void KColorPatch::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( KColorDrag::canDecode( event));
}
-void KColorPatch::dropEvent( QDropEvent *event)
+void KColorPatch::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
setColor( c);
emit colorChanged( c);
@@ -552,18 +552,18 @@ void KColorPatch::dropEvent( QDropEvent *event)
class KPaletteTable::KPaletteTablePrivate
{
public:
- QMap<QString,QColor> m_namedColorMap;
+ TQMap<TQString,TQColor> m_namedColorMap;
};
-KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
- : QWidget( parent ), cells(0), mPalette(0), mMinWidth(minWidth), mCols(cols)
+KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols)
+ : TQWidget( parent ), cells(0), mPalette(0), mMinWidth(minWidth), mCols(cols)
{
d = new KPaletteTablePrivate;
i18n_namedColors = i18n("Named Colors");
- QStringList diskPaletteList = KPalette::getPaletteList();
- QStringList paletteList;
+ TQStringList diskPaletteList = KPalette::getPaletteList();
+ TQStringList paletteList;
// We must replace the untranslated file names by translate names (of course only for KDE's standard palettes)
for ( int i = 0; colorPaletteName[i].m_fileName; ++i )
@@ -574,19 +574,19 @@ KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
paletteList += diskPaletteList;
paletteList.append( i18n_namedColors );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- combo = new QComboBox( false, this );
+ combo = new TQComboBox( false, this );
combo->insertStringList( paletteList );
layout->addWidget(combo);
- sv = new QScrollView( this );
- QSize cellSize = QSize( mMinWidth, 120);
- sv->setHScrollBarMode( QScrollView::AlwaysOff);
- sv->setVScrollBarMode( QScrollView::AlwaysOn);
- QSize minSize = QSize(sv->verticalScrollBar()->width(), 0);
- minSize += QSize(sv->frameWidth(), 0);
- minSize += QSize(cellSize);
+ sv = new TQScrollView( this );
+ TQSize cellSize = TQSize( mMinWidth, 120);
+ sv->setHScrollBarMode( TQScrollView::AlwaysOff);
+ sv->setVScrollBarMode( TQScrollView::AlwaysOn);
+ TQSize minSize = TQSize(sv->verticalScrollBar()->width(), 0);
+ minSize += TQSize(sv->frameWidth(), 0);
+ minSize += TQSize(cellSize);
sv->setFixedSize(minSize);
layout->addWidget(sv);
@@ -594,12 +594,12 @@ KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
mNamedColorList->setFixedSize(minSize);
mNamedColorList->hide();
layout->addWidget(mNamedColorList);
- connect( mNamedColorList, SIGNAL(highlighted( const QString & )),
- this, SLOT( slotColorTextSelected( const QString & )) );
+ connect( mNamedColorList, TQT_SIGNAL(highlighted( const TQString & )),
+ this, TQT_SLOT( slotColorTextSelected( const TQString & )) );
setFixedSize( sizeHint());
- connect( combo, SIGNAL(activated(const QString &)),
- this, SLOT(slotSetPalette( const QString &)));
+ connect( combo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotSetPalette( const TQString &)));
}
KPaletteTable::~KPaletteTable()
@@ -654,14 +654,14 @@ KPaletteTable::readNamedColor( void )
const char * const *path = namedColorFilePath();
for( int i=0; path[i]; ++i )
{
- QFile paletteFile( path[i] );
+ TQFile paletteFile( path[i] );
if( !paletteFile.open( IO_ReadOnly ) )
{
continue;
}
- QString line;
- QStringList list;
+ TQString line;
+ TQStringList list;
while( paletteFile.readLine( line, 100 ) != -1 )
{
int red, green, blue;
@@ -673,17 +673,17 @@ KPaletteTable::readNamedColor( void )
// Remove duplicates. Every name with a space and every name
// that start with "gray".
//
- QString name = line.mid(pos).stripWhiteSpace();
+ TQString name = line.mid(pos).stripWhiteSpace();
if( name.isNull() || name.find(' ') != -1 ||
name.find( "gray" ) != -1 || name.find( "grey" ) != -1 )
{
continue;
}
- const QColor color ( red, green, blue );
+ const TQColor color ( red, green, blue );
if ( color.isValid() )
{
- const QString colorName( i18n("color", name.latin1() ) );
+ const TQString colorName( i18n("color", name.latin1() ) );
list.append( colorName );
d->m_namedColorMap[ colorName ] = color;
}
@@ -704,7 +704,7 @@ KPaletteTable::readNamedColor( void )
// preventing the real dialog to become visible until the
// error dialog box is removed (== bad UI).
//
- QTimer::singleShot( 10, this, SLOT(slotShowNamedColorReadError()) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(slotShowNamedColorReadError()) );
}
}
@@ -714,7 +714,7 @@ KPaletteTable::slotShowNamedColorReadError( void )
{
if( mNamedColorList->count() == 0 )
{
- QString msg = i18n(""
+ TQString msg = i18n(""
"Unable to read X11 RGB color strings. The following "
"file location(s) were examined:\n");
@@ -740,7 +740,7 @@ KPaletteTable::slotShowNamedColorReadError( void )
// new color setting. It is only used by the combobox widget.
//
void
-KPaletteTable::slotSetPalette( const QString &_paletteName )
+KPaletteTable::slotSetPalette( const TQString &_paletteName )
{
setPalette( _paletteName );
if( mNamedColorList->isVisible() )
@@ -757,9 +757,9 @@ KPaletteTable::slotSetPalette( const QString &_paletteName )
void
-KPaletteTable::setPalette( const QString &_paletteName )
+KPaletteTable::setPalette( const TQString &_paletteName )
{
- QString paletteName( _paletteName);
+ TQString paletteName( _paletteName);
if (paletteName.isEmpty())
paletteName = i18n_recentColors;
@@ -825,16 +825,16 @@ KPaletteTable::setPalette( const QString &_paletteName )
cells = new KColorCells( sv->viewport(), rows, mCols);
cells->setShading(false);
cells->setAcceptDrags(false);
- QSize cellSize = QSize( mMinWidth, mMinWidth * rows / mCols);
+ TQSize cellSize = TQSize( mMinWidth, mMinWidth * rows / mCols);
cells->setFixedSize( cellSize );
for( int i = 0; i < mPalette->nrColors(); i++)
{
cells->setColor( i, mPalette->color(i) );
}
- connect( cells, SIGNAL( colorSelected( int ) ),
- SLOT( slotColorCellSelected( int ) ) );
- connect( cells, SIGNAL( colorDoubleClicked( int ) ),
- SLOT( slotColorCellDoubleClicked( int ) ) );
+ connect( cells, TQT_SIGNAL( colorSelected( int ) ),
+ TQT_SLOT( slotColorCellSelected( int ) ) );
+ connect( cells, TQT_SIGNAL( colorDoubleClicked( int ) ),
+ TQT_SLOT( slotColorCellDoubleClicked( int ) ) );
sv->addChild( cells );
cells->show();
sv->updateScrollBars();
@@ -862,14 +862,14 @@ KPaletteTable::slotColorCellDoubleClicked( int col )
void
-KPaletteTable::slotColorTextSelected( const QString &colorText )
+KPaletteTable::slotColorTextSelected( const TQString &colorText )
{
emit colorSelected( d->m_namedColorMap[ colorText ], colorText );
}
void
-KPaletteTable::addToCustomColors( const QColor &color)
+KPaletteTable::addToCustomColors( const TQColor &color)
{
setPalette(i18n( "palette name", colorPaletteName[ customColorIndex ].m_displayName ));
mPalette->addColor( color );
@@ -880,7 +880,7 @@ KPaletteTable::addToCustomColors( const QColor &color)
}
void
-KPaletteTable::addToRecentColors( const QColor &color)
+KPaletteTable::addToRecentColors( const TQColor &color)
{
//
// 2000-02-12 Espen Sand.
@@ -907,13 +907,13 @@ KPaletteTable::addToRecentColors( const QColor &color)
class KColorDialog::KColorDialogPrivate {
public:
KPaletteTable *table;
- QString originalPalette;
+ TQString originalPalette;
bool bRecursion;
bool bEditRgb;
bool bEditHsv;
bool bEditHtml;
bool bColorPicking;
- QLabel *colorName;
+ TQLabel *colorName;
KLineEdit *htmlName;
KColorSpinBox *hedit;
KColorSpinBox *sedit;
@@ -925,9 +925,9 @@ public:
KHSSelector *hsSelector;
KPalette *palette;
KValueSelector *valuePal;
- QVBoxLayout* l_right;
- QGridLayout* tl_layout;
- QCheckBox *cbDefaultColor;
+ TQVBoxLayout* l_right;
+ TQGridLayout* tl_layout;
+ TQCheckBox *cbDefaultColor;
KColor defaultColor;
KColor selColor;
#ifdef Q_WS_X11
@@ -936,7 +936,7 @@ public:
};
-KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
+KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Select Color"),
modal ? Ok|Cancel : Close,
Ok, true )
@@ -948,18 +948,18 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->oldfilter = 0;
#endif
d->cbDefaultColor = 0L;
- connect( this, SIGNAL(okClicked(void)),this,SLOT(slotWriteSettings(void)));
- connect( this, SIGNAL(closeClicked(void)),this,SLOT(slotWriteSettings(void)));
+ connect( this, TQT_SIGNAL(okClicked(void)),this,TQT_SLOT(slotWriteSettings(void)));
+ connect( this, TQT_SIGNAL(closeClicked(void)),this,TQT_SLOT(slotWriteSettings(void)));
- QLabel *label;
+ TQLabel *label;
//
// Create the top level page and its layout
//
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *tl_layout = new QGridLayout( page, 3, 3, 0, spacingHint() );
+ TQGridLayout *tl_layout = new TQGridLayout( page, 3, 3, 0, spacingHint() );
d->tl_layout = tl_layout;
tl_layout->addColSpacing( 1, spacingHint() * 2 );
@@ -967,20 +967,20 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
// the more complicated part: the left side
// add a V-box
//
- QVBoxLayout *l_left = new QVBoxLayout();
+ TQVBoxLayout *l_left = new TQVBoxLayout();
tl_layout->addLayout(l_left, 0, 0);
//
// add a H-Box for the XY-Selector and a grid for the
// entry fields
//
- QHBoxLayout *l_ltop = new QHBoxLayout();
+ TQHBoxLayout *l_ltop = new TQHBoxLayout();
l_left->addLayout(l_ltop);
// a little space between
l_left->addSpacing(10);
- QGridLayout *l_lbot = new QGridLayout(3, 6);
+ TQGridLayout *l_lbot = new TQGridLayout(3, 6);
l_left->addLayout(l_lbot);
//
@@ -989,75 +989,75 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->hsSelector = new KHSSelector( page );
d->hsSelector->setMinimumSize(140, 70);
l_ltop->addWidget(d->hsSelector, 8);
- connect( d->hsSelector, SIGNAL( valueChanged( int, int ) ),
- SLOT( slotHSChanged( int, int ) ) );
+ connect( d->hsSelector, TQT_SIGNAL( valueChanged( int, int ) ),
+ TQT_SLOT( slotHSChanged( int, int ) ) );
d->valuePal = new KValueSelector( page );
d->valuePal->setMinimumSize(26, 70);
l_ltop->addWidget(d->valuePal, 1);
- connect( d->valuePal, SIGNAL( valueChanged( int ) ),
- SLOT( slotVChanged( int ) ) );
+ connect( d->valuePal, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotVChanged( int ) ) );
//
// add the HSV fields
//
- label = new QLabel( i18n("H:"), page );
+ label = new TQLabel( i18n("H:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 0, 2);
d->hedit = new KColorSpinBox( 0, 359, 1, page );
- d->hedit->setValidator( new QIntValidator( d->hedit ) );
+ d->hedit->setValidator( new TQIntValidator( d->hedit ) );
l_lbot->addWidget(d->hedit, 0, 3);
- connect( d->hedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->hedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
- label = new QLabel( i18n("S:"), page );
+ label = new TQLabel( i18n("S:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 1, 2);
d->sedit = new KColorSpinBox( 0, 255, 1, page );
- d->sedit->setValidator( new QIntValidator( d->sedit ) );
+ d->sedit->setValidator( new TQIntValidator( d->sedit ) );
l_lbot->addWidget(d->sedit, 1, 3);
- connect( d->sedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->sedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
- label = new QLabel( i18n("V:"), page );
+ label = new TQLabel( i18n("V:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 2, 2);
d->vedit = new KColorSpinBox( 0, 255, 1, page );
- d->vedit->setValidator( new QIntValidator( d->vedit ) );
+ d->vedit->setValidator( new TQIntValidator( d->vedit ) );
l_lbot->addWidget(d->vedit, 2, 3);
- connect( d->vedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->vedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
//
// add the RGB fields
//
- label = new QLabel( i18n("R:"), page );
+ label = new TQLabel( i18n("R:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 0, 4);
d->redit = new KColorSpinBox( 0, 255, 1, page );
- d->redit->setValidator( new QIntValidator( d->redit ) );
+ d->redit->setValidator( new TQIntValidator( d->redit ) );
l_lbot->addWidget(d->redit, 0, 5);
- connect( d->redit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->redit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
- label = new QLabel( i18n("G:"), page );
+ label = new TQLabel( i18n("G:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget( label, 1, 4);
d->gedit = new KColorSpinBox( 0, 255,1, page );
- d->gedit->setValidator( new QIntValidator( d->gedit ) );
+ d->gedit->setValidator( new TQIntValidator( d->gedit ) );
l_lbot->addWidget(d->gedit, 1, 5);
- connect( d->gedit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->gedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
- label = new QLabel( i18n("B:"), page );
+ label = new TQLabel( i18n("B:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 2, 4);
d->bedit = new KColorSpinBox( 0, 255, 1, page );
- d->bedit->setValidator( new QIntValidator( d->bedit ) );
+ d->bedit->setValidator( new TQIntValidator( d->bedit ) );
l_lbot->addWidget(d->bedit, 2, 5);
- connect( d->bedit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->bedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
//
// the entry fields should be wide enough to hold 8888888
@@ -1083,13 +1083,13 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->table = new KPaletteTable( page );
d->l_right->addWidget(d->table, 10);
- connect( d->table, SIGNAL( colorSelected( const QColor &, const QString & ) ),
- SLOT( slotColorSelected( const QColor &, const QString & ) ) );
+ connect( d->table, TQT_SIGNAL( colorSelected( const TQColor &, const TQString & ) ),
+ TQT_SLOT( slotColorSelected( const TQColor &, const TQString & ) ) );
connect(
d->table,
- SIGNAL( colorDoubleClicked( const QColor &, const QString & ) ),
- SLOT( slotColorDoubleClicked( const QColor &, const QString & ) )
+ TQT_SIGNAL( colorDoubleClicked( const TQColor &, const TQString & ) ),
+ TQT_SLOT( slotColorDoubleClicked( const TQColor &, const TQString & ) )
);
// Store the default value for saving time.
d->originalPalette = d->table->palette();
@@ -1099,23 +1099,23 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
//
d->l_right->addSpacing(10);
- QHBoxLayout *l_hbox = new QHBoxLayout( d->l_right );
+ TQHBoxLayout *l_hbox = new TQHBoxLayout( d->l_right );
//
// The add to custom colors button
//
- QPushButton *button = new QPushButton( page );
+ TQPushButton *button = new TQPushButton( page );
button->setText(i18n("&Add to Custom Colors"));
l_hbox->addWidget(button, 0, AlignLeft);
- connect( button, SIGNAL( clicked()), SLOT( slotAddToCustomColors()));
+ connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotAddToCustomColors()));
//
// The color picker button
//
- button = new QPushButton( page );
+ button = new TQPushButton( page );
button->setPixmap( BarIcon("colorpicker"));
l_hbox->addWidget(button, 0, AlignHCenter );
- connect( button, SIGNAL( clicked()), SLOT( slotColorPicker()));
+ connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotColorPicker()));
//
// a little space between
@@ -1125,36 +1125,36 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
//
// and now the entry fields and the patch (=colored box)
//
- QGridLayout *l_grid = new QGridLayout( d->l_right, 2, 3);
+ TQGridLayout *l_grid = new TQGridLayout( d->l_right, 2, 3);
l_grid->setColStretch(2, 1);
- label = new QLabel( page );
+ label = new TQLabel( page );
label->setText(i18n("Name:"));
l_grid->addWidget(label, 0, 1, AlignLeft);
- d->colorName = new QLabel( page );
+ d->colorName = new TQLabel( page );
l_grid->addWidget(d->colorName, 0, 2, AlignLeft);
- label = new QLabel( page );
+ label = new TQLabel( page );
label->setText(i18n("HTML:"));
l_grid->addWidget(label, 1, 1, AlignLeft);
d->htmlName = new KLineEdit( page );
- d->htmlName->setMaxLength( 13 ); // Qt's QColor allows 12 hexa-digits
+ d->htmlName->setMaxLength( 13 ); // Qt's TQColor allows 12 hexa-digits
d->htmlName->setText("#FFFFFF"); // But HTML uses only 6, so do not worry about the size
- w = d->htmlName->fontMetrics().width(QString::fromLatin1("#DDDDDDD"));
+ w = d->htmlName->fontMetrics().width(TQString::fromLatin1("#DDDDDDD"));
d->htmlName->setFixedWidth(w);
l_grid->addWidget(d->htmlName, 1, 2, AlignLeft);
- connect( d->htmlName, SIGNAL( textChanged(const QString &) ),
- SLOT( slotHtmlChanged() ) );
+ connect( d->htmlName, TQT_SIGNAL( textChanged(const TQString &) ),
+ TQT_SLOT( slotHtmlChanged() ) );
d->patch = new KColorPatch( page );
d->patch->setFixedSize(48, 48);
l_grid->addMultiCellWidget(d->patch, 0, 1, 0, 0, AlignHCenter | AlignVCenter);
- connect( d->patch, SIGNAL( colorChanged( const QColor&)),
- SLOT( setColor( const QColor&)));
+ connect( d->patch, TQT_SIGNAL( colorChanged( const TQColor&)),
+ TQT_SLOT( setColor( const TQColor&)));
tl_layout->activate();
page->setMinimumSize( page->sizeHint() );
@@ -1185,16 +1185,16 @@ KColorDialog::~KColorDialog()
}
bool
-KColorDialog::eventFilter( QObject *obj, QEvent *ev )
+KColorDialog::eventFilter( TQObject *obj, TQEvent *ev )
{
if ((obj == d->htmlName) || (obj == d->hsSelector))
switch(ev->type())
{
- case QEvent::DragEnter:
- case QEvent::DragMove:
- case QEvent::DragLeave:
- case QEvent::Drop:
- case QEvent::DragResponse:
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
+ case TQEvent::DragLeave:
+ case TQEvent::Drop:
+ case TQEvent::DragResponse:
qApp->sendEvent(d->patch, ev);
return true;
default:
@@ -1204,7 +1204,7 @@ KColorDialog::eventFilter( QObject *obj, QEvent *ev )
}
void
-KColorDialog::setDefaultColor( const QColor& col )
+KColorDialog::setDefaultColor( const TQColor& col )
{
if ( !d->cbDefaultColor )
{
@@ -1216,7 +1216,7 @@ KColorDialog::setDefaultColor( const QColor& col )
//
// and the "default color" checkbox, under all items on the right side
//
- d->cbDefaultColor = new QCheckBox( i18n( "Default color" ), mainWidget() );
+ d->cbDefaultColor = new TQCheckBox( i18n( "Default color" ), mainWidget() );
d->cbDefaultColor->setChecked(true);
d->l_right->addWidget( d->cbDefaultColor );
@@ -1226,7 +1226,7 @@ KColorDialog::setDefaultColor( const QColor& col )
mainWidget()->setMinimumSize( mainWidget()->sizeHint() );
disableResize();
- connect( d->cbDefaultColor, SIGNAL( clicked() ), SLOT( slotDefaultColorClicked() ) );
+ connect( d->cbDefaultColor, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDefaultColorClicked() ) );
}
d->defaultColor = col;
@@ -1234,7 +1234,7 @@ KColorDialog::setDefaultColor( const QColor& col )
slotDefaultColorClicked();
}
-QColor KColorDialog::defaultColor() const
+TQColor KColorDialog::defaultColor() const
{
return d->defaultColor;
}
@@ -1247,7 +1247,7 @@ void KColorDialog::slotDefaultColorClicked()
showColor( d->selColor, i18n( "-default-" ) );
} else
{
- showColor( d->selColor, QString::null );
+ showColor( d->selColor, TQString::null );
}
}
@@ -1256,7 +1256,7 @@ KColorDialog::readSettings()
{
KConfigGroup group( KGlobal::config(), "Colors" );
- QString palette = group.readEntry("CurrentPalette");
+ TQString palette = group.readEntry("CurrentPalette");
d->table->setPalette(palette);
}
@@ -1265,7 +1265,7 @@ KColorDialog::slotWriteSettings()
{
KConfigGroup group( KGlobal::config(), "Colors" );
- QString palette = d->table->palette();
+ TQString palette = d->table->palette();
if (!group.hasDefault("CurrentPalette") &&
(d->table->palette() == d->originalPalette))
{
@@ -1281,13 +1281,13 @@ QColor
KColorDialog::color() const
{
if ( d->cbDefaultColor && d->cbDefaultColor->isChecked() )
- return QColor();
+ return TQColor();
if ( d->selColor.isValid() )
d->table->addToRecentColors( d->selColor );
return d->selColor;
}
-void KColorDialog::setColor( const QColor &col )
+void KColorDialog::setColor( const TQColor &col )
{
_setColor( col );
}
@@ -1295,7 +1295,7 @@ void KColorDialog::setColor( const QColor &col )
//
// static function to display dialog and return color
//
-int KColorDialog::getColor( QColor &theColor, QWidget *parent )
+int KColorDialog::getColor( TQColor &theColor, TQWidget *parent )
{
KColorDialog dlg( parent, "Color Selector", true );
if ( theColor.isValid() )
@@ -1313,7 +1313,7 @@ int KColorDialog::getColor( QColor &theColor, QWidget *parent )
//
// static function to display dialog and return color
//
-int KColorDialog::getColor( QColor &theColor, const QColor& defaultCol, QWidget *parent )
+int KColorDialog::getColor( TQColor &theColor, const TQColor& defaultCol, TQWidget *parent )
{
KColorDialog dlg( parent, "Color Selector", true );
dlg.setDefaultColor( defaultCol );
@@ -1348,7 +1348,7 @@ void KColorDialog::slotHtmlChanged( void )
{
if (d->bRecursion || d->htmlName->text().isEmpty()) return;
- QString strColor( d->htmlName->text() );
+ TQString strColor( d->htmlName->text() );
// Assume that a user does not want to type the # all the time
if ( strColor[0] != '#' )
@@ -1360,7 +1360,7 @@ void KColorDialog::slotHtmlChanged( void )
d->htmlName->blockSignals(signalsblocked);
}
- const QColor color( strColor );
+ const TQColor color( strColor );
if ( color.isValid() )
{
@@ -1409,7 +1409,7 @@ void KColorDialog::slotVChanged( int v )
_setColor( col );
}
-void KColorDialog::slotColorSelected( const QColor &color )
+void KColorDialog::slotColorSelected( const TQColor &color )
{
_setColor( color );
}
@@ -1419,22 +1419,22 @@ void KColorDialog::slotAddToCustomColors( )
d->table->addToCustomColors( d->selColor );
}
-void KColorDialog::slotColorSelected( const QColor &color, const QString &name )
+void KColorDialog::slotColorSelected( const TQColor &color, const TQString &name )
{
_setColor( color, name);
}
void KColorDialog::slotColorDoubleClicked
(
- const QColor & color,
- const QString & name
+ const TQColor & color,
+ const TQString & name
)
{
_setColor(color, name);
accept();
}
-void KColorDialog::_setColor(const KColor &color, const QString &name)
+void KColorDialog::_setColor(const KColor &color, const TQString &name)
{
if (color.isValid())
{
@@ -1455,7 +1455,7 @@ void KColorDialog::_setColor(const KColor &color, const QString &name)
}
// show but don't set into selColor, nor emit colorSelected
-void KColorDialog::showColor( const KColor &color, const QString &name )
+void KColorDialog::showColor( const KColor &color, const TQString &name )
{
d->bRecursion = true;
@@ -1484,16 +1484,16 @@ void KColorDialog::showColor( const KColor &color, const QString &name )
}
-static QWidget *kde_color_dlg_widget = 0;
+static TQWidget *kde_color_dlg_widget = 0;
#ifdef Q_WS_X11
static int kde_color_dlg_handler(XEvent *event)
{
if (event->type == ButtonRelease)
{
- QMouseEvent e( QEvent::MouseButtonRelease, QPoint(),
- QPoint(event->xmotion.x_root, event->xmotion.y_root) , 0, 0 );
- QApplication::sendEvent( kde_color_dlg_widget, &e );
+ TQMouseEvent e( TQEvent::MouseButtonRelease, TQPoint(),
+ TQPoint(event->xmotion.x_root, event->xmotion.y_root) , 0, 0 );
+ TQApplication::sendEvent( kde_color_dlg_widget, &e );
return true;
}
return false;
@@ -1512,7 +1512,7 @@ KColorDialog::slotColorPicker()
}
void
-KColorDialog::mouseReleaseEvent( QMouseEvent *e )
+KColorDialog::mouseReleaseEvent( TQMouseEvent *e )
{
if (d->bColorPicking)
{
@@ -1530,16 +1530,16 @@ KColorDialog::mouseReleaseEvent( QMouseEvent *e )
}
QColor
-KColorDialog::grabColor(const QPoint &p)
+KColorDialog::grabColor(const TQPoint &p)
{
- QWidget *desktop = QApplication::desktop();
- QPixmap pm = QPixmap::grabWindow( desktop->winId(), p.x(), p.y(), 1, 1);
- QImage i = pm.convertToImage();
+ TQWidget *desktop = TQApplication::desktop();
+ TQPixmap pm = TQPixmap::grabWindow( desktop->winId(), p.x(), p.y(), 1, 1);
+ TQImage i = pm.convertToImage();
return i.pixel(0,0);
}
void
-KColorDialog::keyPressEvent( QKeyEvent *e )
+KColorDialog::keyPressEvent( TQKeyEvent *e )
{
if (d->bColorPicking)
{
@@ -1575,7 +1575,7 @@ void KColorDialog::setHtmlEdit( const KColor &col )
if (d->bEditHtml) return;
int r, g, b;
col.rgb( &r, &g, &b );
- QString num;
+ TQString num;
num.sprintf("#%02X%02X%02X", r,g,b);
d->htmlName->setText( num );
diff --git a/kdeui/kcolordialog.h b/kdeui/kcolordialog.h
index 357efe038..57f77672c 100644
--- a/kdeui/kcolordialog.h
+++ b/kdeui/kcolordialog.h
@@ -27,13 +27,13 @@
#ifdef Q_WS_QWS
// FIXME(E): Do we need the KColorDialog extra functionality in Qt Embedded?
-#include <qcolordialog.h>
+#include <tqcolordialog.h>
#define KColorDialog QColorDialog
#else //UNIX, WIN32
#include <kdialogbase.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qgridview.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqgridview.h>
#include "kselect.h"
@@ -63,26 +63,26 @@ public:
/**
* Constructs a hue/saturation selection widget.
*/
- KHSSelector( QWidget *parent=0, const char *name=0 );
+ KHSSelector( TQWidget *parent=0, const char *name=0 );
protected:
/**
* Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void drawPalette( TQPixmap *pixmap );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from KXYSelector. This drawing is
* buffered in a pixmap here. As real drawing
* routine, drawPalette() is used.
*/
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
private:
void updateContents();
- QPixmap pixmap;
+ TQPixmap pixmap;
protected:
virtual void virtual_hook( int id, void* data );
@@ -107,11 +107,11 @@ public:
/**
* Constructs a widget for color selection.
*/
- KValueSelector( QWidget *parent=0, const char *name=0 );
+ KValueSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a widget for color selection with a given orientation
*/
- KValueSelector( Orientation o, QWidget *parent = 0, const char *name = 0 );
+ KValueSelector( Orientation o, TQWidget *parent = 0, const char *name = 0 );
int hue() const
{ return _hue; }
@@ -128,20 +128,20 @@ protected:
* Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void drawPalette( TQPixmap *pixmap );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from KSelector. The drawing is
* buffered in a pixmap here. As real drawing
* routine, drawPalette() is used.
*/
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
private:
int _hue;
int _sat;
- QPixmap pixmap;
+ TQPixmap pixmap;
protected:
virtual void virtual_hook( int id, void* data );
@@ -155,8 +155,8 @@ private:
* A color class that preserves both RGB and HSV values.
*
* This is
- * unlike QColor which only preserves RGB values and recalculates HSV
- * values. The QColor behavior leads to an accumulation of rounding
+ * unlike TQColor which only preserves RGB values and recalculates HSV
+ * values. The TQColor behavior leads to an accumulation of rounding
* errors when working in the HSV color space.
*
* @author Waldo Bastian <bastian@kde.org>
@@ -166,7 +166,7 @@ class KDEUI_EXPORT KColor : public QColor
public:
KColor();
KColor( const KColor &col);
- KColor( const QColor &col);
+ KColor( const TQColor &col);
KColor& operator=( const KColor& col);
@@ -199,22 +199,22 @@ class KDEUI_EXPORT KPaletteTable : public QWidget
{
Q_OBJECT
public:
- KPaletteTable( QWidget *parent, int minWidth=210, int cols = 16);
+ KPaletteTable( TQWidget *parent, int minWidth=210, int cols = 16);
~KPaletteTable();
- void addToCustomColors( const QColor &);
- void addToRecentColors( const QColor &);
- QString palette() const;
+ void addToCustomColors( const TQColor &);
+ void addToRecentColors( const TQColor &);
+ TQString palette() const;
public slots:
- void setPalette(const QString &paletteName);
+ void setPalette(const TQString &paletteName);
signals:
- void colorSelected( const QColor &, const QString & );
- void colorDoubleClicked( const QColor &, const QString & );
+ void colorSelected( const TQColor &, const TQString & );
+ void colorDoubleClicked( const TQColor &, const TQString & );
protected slots:
void slotColorCellSelected( int );
void slotColorCellDoubleClicked( int );
- void slotColorTextSelected( const QString &colorText );
- void slotSetPalette( const QString &_paletteName );
+ void slotColorTextSelected( const TQString &colorText );
+ void slotSetPalette( const TQString &_paletteName );
void slotShowNamedColorReadError( void );
protected:
@@ -222,13 +222,13 @@ protected:
protected:
/// \deprecated
- QString i18n_customColors; /// ### KDE4: remove
+ TQString i18n_customColors; /// ### KDE4: remove
/// \deprecated
- QString i18n_recentColors; /// ### KDE4: remove
- QString i18n_namedColors;
- QComboBox *combo;
+ TQString i18n_recentColors; /// ### KDE4: remove
+ TQString i18n_namedColors;
+ TQComboBox *combo;
KColorCells *cells;
- QScrollView *sv;
+ TQScrollView *sv;
KListBox *mNamedColorList;
KPalette *mPalette;
int mMinWidth;
@@ -236,7 +236,7 @@ protected:
private:
- virtual void setPalette(const QPalette& p) { QWidget::setPalette(p); }
+ virtual void setPalette(const TQPalette& p) { TQWidget::setPalette(p); }
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -254,11 +254,11 @@ class KDEUI_EXPORT KColorCells : public QGridView
{
Q_OBJECT
public:
- KColorCells( QWidget *parent, int rows, int cols );
+ KColorCells( TQWidget *parent, int rows, int cols );
~KColorCells();
- void setColor( int colNum, const QColor &col );
- QColor color( int indx ) const
+ void setColor( int colNum, const TQColor &col );
+ TQColor color( int indx ) const
{ return colors[indx]; }
int numCells() const
{ return numRows() * numCols(); }
@@ -275,20 +275,20 @@ public:
void colorDoubleClicked( int col );
protected:
- virtual void paintCell( QPainter *painter, int row, int col );
- virtual void resizeEvent( QResizeEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
- virtual void mouseDoubleClickEvent( QMouseEvent * );
-
- int posToCell(const QPoint &pos, bool ignoreBorders=false);
-
- QColor *colors;
+ virtual void paintCell( TQPainter *painter, int row, int col );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+
+ int posToCell(const TQPoint &pos, bool ignoreBorders=false);
+
+ TQColor *colors;
bool inMouse;
- QPoint mPos;
+ TQPoint mPos;
int selected;
bool shade;
bool acceptDrags;
@@ -312,22 +312,22 @@ class KDEUI_EXPORT KColorPatch : public QFrame
{
Q_OBJECT
public:
- KColorPatch( QWidget *parent );
+ KColorPatch( TQWidget *parent );
virtual ~KColorPatch();
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
signals:
- void colorChanged( const QColor&);
+ void colorChanged( const TQColor&);
protected:
- virtual void drawContents( QPainter *painter );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
+ virtual void drawContents( TQPainter *painter );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
private:
- QColor color;
+ TQColor color;
uint pixel;
int colContext;
@@ -355,7 +355,7 @@ private:
* Example:
*
* \code
- * QColor myColor;
+ * TQColor myColor;
* int result = KColorDialog::getColor( myColor );
* if ( result == KColorDialog::Accepted )
* ...
@@ -382,7 +382,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
/**
* Constructs a color selection dialog.
*/
- KColorDialog( QWidget *parent = 0L, const char *name = 0L,
+ KColorDialog( TQWidget *parent = 0L, const char *name = 0L,
bool modal = false );
/**
* Destroys the color selection dialog.
@@ -392,7 +392,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
/**
* Returns the currently selected color.
**/
- QColor color() const;
+ TQColor color() const;
/**
* Creates a modal color dialog, let the user choose a
@@ -400,9 +400,9 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
*
* The selected color is returned in the argument @p theColor.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getColor( QColor &theColor, QWidget *parent=0L );
+ static int getColor( TQColor &theColor, TQWidget *parent=0L );
/**
* Creates a modal color dialog, lets the user choose a
@@ -412,35 +412,35 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
*
* This version takes a @p defaultColor argument, which sets the color
* selected by the "default color" checkbox. When this checkbox is checked,
- * the invalid color (QColor()) is returned into @p theColor.
+ * the invalid color (TQColor()) is returned into @p theColor.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getColor( QColor &theColor, const QColor& defaultColor, QWidget *parent=0L );
+ static int getColor( TQColor &theColor, const TQColor& defaultColor, TQWidget *parent=0L );
/**
* Gets the color from the pixel at point p on the screen.
*/
- static QColor grabColor(const QPoint &p);
+ static TQColor grabColor(const TQPoint &p);
/**
* Call this to make the dialog show a "Default Color" checkbox.
- * If this checkbox is selected, the dialog will return an "invalid" color (QColor()).
+ * If this checkbox is selected, the dialog will return an "invalid" color (TQColor()).
* This can be used to mean "the default text color", for instance,
* the one with the KDE text color on screen, but black when printing.
*/
- void setDefaultColor( const QColor& defaultCol );
+ void setDefaultColor( const TQColor& defaultCol );
/**
* @return the value passed to setDefaultColor
*/
- QColor defaultColor() const;
+ TQColor defaultColor() const;
public slots:
/**
* Preselects a color.
*/
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
signals:
/**
@@ -448,7 +448,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
* Connect to this to monitor the color as it as selected if you are
* not running modal.
*/
- void colorSelected( const QColor &col );
+ void colorSelected( const TQColor &col );
private slots:
void slotRGBChanged( void );
@@ -456,9 +456,9 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
void slotHtmlChanged( void );
void slotHSChanged( int, int );
void slotVChanged( int );
- void slotColorSelected( const QColor &col );
- void slotColorSelected( const QColor &col, const QString &name );
- void slotColorDoubleClicked( const QColor &col, const QString &name );
+ void slotColorSelected( const TQColor &col );
+ void slotColorSelected( const TQColor &col, const TQString &name );
+ void slotColorDoubleClicked( const TQColor &col, const TQString &name );
void slotColorPicker();
void slotAddToCustomColors();
void slotDefaultColorClicked();
@@ -476,13 +476,13 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
void setRgbEdit( const KColor &col );
void setHsvEdit( const KColor &col );
void setHtmlEdit( const KColor &col );
- void _setColor( const KColor &col, const QString &name=QString::null );
- void showColor( const KColor &color, const QString &name );
+ void _setColor( const KColor &col, const TQString &name=TQString::null );
+ void showColor( const KColor &color, const TQString &name );
protected:
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void keyPressEvent( QKeyEvent * );
- virtual bool eventFilter( QObject *obj, QEvent *ev );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcolordrag.cpp b/kdeui/kcolordrag.cpp
index 61eb15ba1..1c56d9ccd 100644
--- a/kdeui/kcolordrag.cpp
+++ b/kdeui/kcolordrag.cpp
@@ -17,38 +17,38 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kcolordrag.h"
static const char * const color_mime_string = "application/x-color";
static const char * const text_mime_string = "text/plain";
-KColorDrag::KColorDrag( const QColor &color, QWidget *dragsource,
+KColorDrag::KColorDrag( const TQColor &color, TQWidget *dragsource,
const char *name)
- : QStoredDrag( color_mime_string, dragsource, name)
+ : TQStoredDrag( color_mime_string, dragsource, name)
{
setColor( color);
}
-KColorDrag::KColorDrag( QWidget *dragsource, const char *name)
- : QStoredDrag( color_mime_string, dragsource, name)
+KColorDrag::KColorDrag( TQWidget *dragsource, const char *name)
+ : TQStoredDrag( color_mime_string, dragsource, name)
{
setColor( white );
}
void
-KColorDrag::setColor( const QColor &color)
+KColorDrag::setColor( const TQColor &color)
{
- QColorDrag tmp(color, 0, 0);
+ TQColorDrag tmp(color, 0, 0);
setEncodedData(tmp.encodedData(color_mime_string));
- QPixmap colorpix( 25, 20);
+ TQPixmap colorpix( 25, 20);
colorpix.fill( color);
- QPainter p( &colorpix );
+ TQPainter p( &colorpix );
p.setPen( black );
p.drawRect(0,0,25,20);
p.end();
- setPixmap(colorpix, QPoint(-5,-7));
+ setPixmap(colorpix, TQPoint(-5,-7));
}
const char *KColorDrag::format(int i) const
@@ -56,43 +56,43 @@ const char *KColorDrag::format(int i) const
if (i==1)
return text_mime_string;
else
- return QStoredDrag::format(i);
+ return TQStoredDrag::format(i);
}
-QByteArray KColorDrag::encodedData ( const char * m ) const
+TQByteArray KColorDrag::encodedData ( const char * m ) const
{
if (!qstrcmp(m, text_mime_string) )
{
- QColor color;
- QColorDrag::decode(const_cast<KColorDrag *>(this), color);
- QCString result = color.name().latin1();
- ((QByteArray&)result).resize(result.length());
+ TQColor color;
+ TQColorDrag::decode(const_cast<KColorDrag *>(this), color);
+ TQCString result = color.name().latin1();
+ ((TQByteArray&)result).resize(result.length());
return result;
}
- return QStoredDrag::encodedData(m);
+ return TQStoredDrag::encodedData(m);
}
bool
-KColorDrag::canDecode( QMimeSource *e)
+KColorDrag::canDecode( TQMimeSource *e)
{
if (e->provides(color_mime_string))
return true;
if (e->provides(text_mime_string))
{
- QColor dummy;
+ TQColor dummy;
return decode(e, dummy);
}
return false;
}
bool
-KColorDrag::decode( QMimeSource *e, QColor &color)
+KColorDrag::decode( TQMimeSource *e, TQColor &color)
{
- if (QColorDrag::decode(e, color))
+ if (TQColorDrag::decode(e, color))
return true;
- QByteArray data = e->encodedData( text_mime_string);
- QString colorName = QString::fromLatin1(data.data(), data.size());
+ TQByteArray data = e->encodedData( text_mime_string);
+ TQString colorName = TQString::fromLatin1(data.data(), data.size());
if ((colorName.length() < 4) || (colorName[0] != '#'))
return false;
color.setNamedColor(colorName);
@@ -101,7 +101,7 @@ KColorDrag::decode( QMimeSource *e, QColor &color)
KColorDrag*
-KColorDrag::makeDrag( const QColor &color,QWidget *dragsource)
+KColorDrag::makeDrag( const TQColor &color,TQWidget *dragsource)
{
return new KColorDrag( color, dragsource);
}
diff --git a/kdeui/kcolordrag.h b/kdeui/kcolordrag.h
index 696d8a7ab..7f0cd1ba3 100644
--- a/kdeui/kcolordrag.h
+++ b/kdeui/kcolordrag.h
@@ -22,8 +22,8 @@
#ifndef _KCOLORDRAG_H
#define _KCOLORDRAG_H
-#include <qdragobject.h>
-#include <qcolor.h>
+#include <tqdragobject.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
class KColorDragPrivate;
@@ -33,42 +33,42 @@ class KColorDragPrivate;
*
* See the Qt drag'n'drop documentation.
*/
-class KDEUI_EXPORT KColorDrag : public QStoredDrag {
+class KDEUI_EXPORT KColorDrag : public TQStoredDrag {
Q_OBJECT
public:
/**
* Constructs a color drag with a white color.
*/
- KColorDrag( QWidget *dragsource = 0, const char *name = 0 );
+ KColorDrag( TQWidget *dragsource = 0, const char *name = 0 );
/**
* Constructs a color drag with the color @p col.
*/
- KColorDrag( const QColor &col, QWidget *dragsource = 0, const char *name = 0 );
+ KColorDrag( const TQColor &col, TQWidget *dragsource = 0, const char *name = 0 );
virtual ~KColorDrag() {}
virtual const char *format(int i) const;
- virtual QByteArray encodedData ( const char * m ) const;
+ virtual TQByteArray encodedData ( const char * m ) const;
/**
* Sets the color of the drag to @p col.
*/
- void setColor(const QColor &col);
+ void setColor(const TQColor &col);
/**
* Returns true if the MIME source @p e contains a color object.
*/
- static bool canDecode(QMimeSource *e);
+ static bool canDecode(TQMimeSource *e);
/**
* Decodes the MIME source @p e and puts the resulting color into @p col.
*/
- static bool decode(QMimeSource *e, QColor &col);
+ static bool decode(TQMimeSource *e, TQColor &col);
/**
* @deprecated This is equivalent with "new KColorDrag(color, dragsource)".
*/
- static KColorDrag* makeDrag( const QColor&,QWidget *dragsource) KDE_DEPRECATED;
+ static KColorDrag* makeDrag( const TQColor&,TQWidget *dragsource) KDE_DEPRECATED;
private:
- QColor m_color; // unused
+ TQColor m_color; // unused
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kcombobox.cpp b/kdeui/kcombobox.cpp
index 602228c48..31f14ed0f 100644
--- a/kdeui/kcombobox.cpp
+++ b/kdeui/kcombobox.cpp
@@ -20,10 +20,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
+#include <tqclipboard.h>
+#include <tqlistbox.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
#include <kcompletionbox.h>
#include <kcursor.h>
@@ -56,14 +56,14 @@ public:
KLineEdit *klineEdit;
};
-KComboBox::KComboBox( QWidget *parent, const char *name )
- : QComboBox( parent, name ), d(new KComboBoxPrivate)
+KComboBox::KComboBox( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name ), d(new KComboBoxPrivate)
{
init();
}
-KComboBox::KComboBox( bool rw, QWidget *parent, const char *name )
- : QComboBox( rw, parent, name ), d(new KComboBoxPrivate)
+KComboBox::KComboBox( bool rw, TQWidget *parent, const char *name )
+ : TQComboBox( rw, parent, name ), d(new KComboBoxPrivate)
{
init();
@@ -82,7 +82,7 @@ KComboBox::~KComboBox()
void KComboBox::init()
{
// Permanently set some parameters in the parent object.
- QComboBox::setAutoCompletion( false );
+ TQComboBox::setAutoCompletion( false );
// Enable context menu by default if widget
// is editable.
@@ -90,7 +90,7 @@ void KComboBox::init()
}
-bool KComboBox::contains( const QString& _text ) const
+bool KComboBox::contains( const TQString& _text ) const
{
if ( _text.isEmpty() )
return false;
@@ -140,19 +140,19 @@ bool KComboBox::isURLDropsEnabled() const
}
-void KComboBox::setCompletedText( const QString& text, bool marked )
+void KComboBox::setCompletedText( const TQString& text, bool marked )
{
if ( d->klineEdit )
d->klineEdit->setCompletedText( text, marked );
}
-void KComboBox::setCompletedText( const QString& text )
+void KComboBox::setCompletedText( const TQString& text )
{
if ( d->klineEdit )
d->klineEdit->setCompletedText( text );
}
-void KComboBox::makeCompletion( const QString& text )
+void KComboBox::makeCompletion( const TQString& text )
{
if( d->klineEdit )
d->klineEdit->makeCompletion( text );
@@ -175,9 +175,9 @@ void KComboBox::rotateText( KCompletionBase::KeyBindingType type )
}
// not needed anymore
-bool KComboBox::eventFilter( QObject* o, QEvent* ev )
+bool KComboBox::eventFilter( TQObject* o, TQEvent* ev )
{
- return QComboBox::eventFilter( o, ev );
+ return TQComboBox::eventFilter( o, ev );
}
void KComboBox::setTrapReturnKey( bool grab )
@@ -196,30 +196,30 @@ bool KComboBox::trapReturnKey() const
void KComboBox::setEditURL( const KURL& url )
{
- QComboBox::setEditText( url.prettyURL() );
+ TQComboBox::setEditText( url.prettyURL() );
}
void KComboBox::insertURL( const KURL& url, int index )
{
- QComboBox::insertItem( url.prettyURL(), index );
+ TQComboBox::insertItem( url.prettyURL(), index );
}
-void KComboBox::insertURL( const QPixmap& pixmap, const KURL& url, int index )
+void KComboBox::insertURL( const TQPixmap& pixmap, const KURL& url, int index )
{
- QComboBox::insertItem( pixmap, url.prettyURL(), index );
+ TQComboBox::insertItem( pixmap, url.prettyURL(), index );
}
void KComboBox::changeURL( const KURL& url, int index )
{
- QComboBox::changeItem( url.prettyURL(), index );
+ TQComboBox::changeItem( url.prettyURL(), index );
}
-void KComboBox::changeURL( const QPixmap& pixmap, const KURL& url, int index )
+void KComboBox::changeURL( const TQPixmap& pixmap, const KURL& url, int index )
{
- QComboBox::changeItem( pixmap, url.prettyURL(), index );
+ TQComboBox::changeItem( pixmap, url.prettyURL(), index );
}
-void KComboBox::setCompletedItems( const QStringList& items )
+void KComboBox::setCompletedItems( const TQStringList& items )
{
if ( d->klineEdit )
d->klineEdit->setCompletedItems( items );
@@ -232,40 +232,40 @@ KCompletionBox * KComboBox::completionBox( bool create )
return 0;
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QComboBox::create( id, initializeWindow, destroyOldWindow );
+ TQComboBox::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( lineEdit(), true, true );
}
-void KComboBox::wheelEvent( QWheelEvent *ev )
+void KComboBox::wheelEvent( TQWheelEvent *ev )
{
// Not necessary anymore
- QComboBox::wheelEvent( ev );
+ TQComboBox::wheelEvent( ev );
}
-void KComboBox::setLineEdit( QLineEdit *edit )
+void KComboBox::setLineEdit( TQLineEdit *edit )
{
if ( !editable() && edit &&
- !qstrcmp( edit->className(), "QLineEdit" ) )
+ !qstrcmp( edit->className(), "TQLineEdit" ) )
{
// uic generates code that creates a read-only KComboBox and then
- // calls combo->setEditable( true ), which causes QComboBox to set up
- // a dumb QLineEdit instead of our nice KLineEdit.
+ // calls combo->setEditable( true ), which causes TQComboBox to set up
+ // a dumb TQLineEdit instead of our nice KLineEdit.
// As some KComboBox features rely on the KLineEdit, we reject
// this order here.
delete edit;
edit = new KLineEdit( this, "combo edit" );
}
- QComboBox::setLineEdit( edit );
+ TQComboBox::setLineEdit( edit );
d->klineEdit = dynamic_cast<KLineEdit*>( edit );
setDelegate( d->klineEdit );
// Connect the returnPressed signal for both Q[K]LineEdits'
if (edit)
- connect( edit, SIGNAL( returnPressed() ), SIGNAL( returnPressed() ));
+ connect( edit, TQT_SIGNAL( returnPressed() ), TQT_SIGNAL( returnPressed() ));
if ( d->klineEdit )
{
@@ -273,36 +273,36 @@ void KComboBox::setLineEdit( QLineEdit *edit )
// lineedit without us noticing. And KCompletionBase::delegate would
// be a dangling pointer then, so prevent that. Note: only do this
// when it is a KLineEdit!
- connect( edit, SIGNAL( destroyed() ), SLOT( lineEditDeleted() ));
+ connect( edit, TQT_SIGNAL( destroyed() ), TQT_SLOT( lineEditDeleted() ));
- connect( d->klineEdit, SIGNAL( returnPressed( const QString& )),
- SIGNAL( returnPressed( const QString& ) ));
+ connect( d->klineEdit, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SIGNAL( returnPressed( const TQString& ) ));
- connect( d->klineEdit, SIGNAL( completion( const QString& )),
- SIGNAL( completion( const QString& )) );
+ connect( d->klineEdit, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SIGNAL( completion( const TQString& )) );
- connect( d->klineEdit, SIGNAL( substringCompletion( const QString& )),
- SIGNAL( substringCompletion( const QString& )) );
+ connect( d->klineEdit, TQT_SIGNAL( substringCompletion( const TQString& )),
+ TQT_SIGNAL( substringCompletion( const TQString& )) );
connect( d->klineEdit,
- SIGNAL( textRotation( KCompletionBase::KeyBindingType )),
- SIGNAL( textRotation( KCompletionBase::KeyBindingType )) );
+ TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )),
+ TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )) );
connect( d->klineEdit,
- SIGNAL( completionModeChanged( KGlobalSettings::Completion )),
- SIGNAL( completionModeChanged( KGlobalSettings::Completion)));
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion )),
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion)));
connect( d->klineEdit,
- SIGNAL( aboutToShowContextMenu( QPopupMenu * )),
- SIGNAL( aboutToShowContextMenu( QPopupMenu * )) );
+ TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )),
+ TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )) );
connect( d->klineEdit,
- SIGNAL( completionBoxActivated( const QString& )),
- SIGNAL( activated( const QString& )) );
+ TQT_SIGNAL( completionBoxActivated( const TQString& )),
+ TQT_SIGNAL( activated( const TQString& )) );
}
}
-void KComboBox::setCurrentItem( const QString& item, bool insert, int index )
+void KComboBox::setCurrentItem( const TQString& item, bool insert, int index )
{
int sel = -1;
@@ -345,7 +345,7 @@ void KComboBox::lineEditDeleted()
// we are always read-write
-KHistoryCombo::KHistoryCombo( QWidget *parent, const char *name )
+KHistoryCombo::KHistoryCombo( TQWidget *parent, const char *name )
: KComboBox( true, parent, name ), d(0)
{
init( true ); // using completion
@@ -353,7 +353,7 @@ KHistoryCombo::KHistoryCombo( QWidget *parent, const char *name )
// we are always read-write
KHistoryCombo::KHistoryCombo( bool useCompletion,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KComboBox( true, parent, name ), d(0)
{
init( useCompletion );
@@ -373,14 +373,14 @@ void KHistoryCombo::init( bool useCompletion )
myPixProvider = 0L;
// obey HISTCONTROL setting
- QCString histControl = getenv("HISTCONTROL");
+ TQCString histControl = getenv("HISTCONTROL");
if ( histControl == "ignoredups" || histControl == "ignoreboth" )
setDuplicatesEnabled( false );
- connect( this, SIGNAL(aboutToShowContextMenu(QPopupMenu*)),
- SLOT(addContextMenuItems(QPopupMenu*)) );
- connect( this, SIGNAL( activated(int) ), SLOT( slotReset() ));
- connect( this, SIGNAL( returnPressed(const QString&) ), SLOT(slotReset()));
+ connect( this, TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)),
+ TQT_SLOT(addContextMenuItems(TQPopupMenu*)) );
+ connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotReset() ));
+ connect( this, TQT_SIGNAL( returnPressed(const TQString&) ), TQT_SLOT(slotReset()));
}
KHistoryCombo::~KHistoryCombo()
@@ -388,7 +388,7 @@ KHistoryCombo::~KHistoryCombo()
delete myPixProvider;
}
-void KHistoryCombo::setHistoryItems( QStringList items,
+void KHistoryCombo::setHistoryItems( TQStringList items,
bool setCompletionList )
{
KComboBox::clear();
@@ -417,9 +417,9 @@ void KHistoryCombo::setHistoryItems( QStringList items,
clearEdit();
}
-QStringList KHistoryCombo::historyItems() const
+TQStringList KHistoryCombo::historyItems() const
{
- QStringList list;
+ TQStringList list;
const int itemCount = count();
for ( int i = 0; i < itemCount; ++i )
list.append( text( i ) );
@@ -429,25 +429,25 @@ QStringList KHistoryCombo::historyItems() const
void KHistoryCombo::clearHistory()
{
- const QString temp = currentText();
+ const TQString temp = currentText();
KComboBox::clear();
if ( useCompletion() )
completionObject()->clear();
setEditText( temp );
}
-void KHistoryCombo::addContextMenuItems( QPopupMenu* menu )
+void KHistoryCombo::addContextMenuItems( TQPopupMenu* menu )
{
if ( menu )
{
menu->insertSeparator();
- int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, SLOT( slotClear()));
+ int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, TQT_SLOT( slotClear()));
if (!count())
menu->setItemEnabled(id, false);
}
}
-void KHistoryCombo::addToHistory( const QString& item )
+void KHistoryCombo::addToHistory( const TQString& item )
{
if ( item.isEmpty() || (count() > 0 && item == text(0) )) {
return;
@@ -489,7 +489,7 @@ void KHistoryCombo::addToHistory( const QString& item )
// remove the last item, as long as we are longer than maxCount()
// remove the removed item from the completionObject if it isn't
// anymore available at all in the combobox.
- const QString rmItem = text( rmIndex );
+ const TQString rmItem = text( rmIndex );
removeItem( rmIndex );
if ( useComp && !contains( rmItem ) )
completionObject()->removeItem( rmItem );
@@ -499,13 +499,13 @@ void KHistoryCombo::addToHistory( const QString& item )
completionObject()->addItem( item );
}
-bool KHistoryCombo::removeFromHistory( const QString& item )
+bool KHistoryCombo::removeFromHistory( const TQString& item )
{
if ( item.isEmpty() )
return false;
bool removed = false;
- const QString temp = currentText();
+ const TQString temp = currentText();
int i = 0;
int itemCount = count();
while ( i < itemCount ) {
@@ -535,7 +535,7 @@ void KHistoryCombo::rotateUp()
// skip duplicates/empty items
const int last = count() - 1; // last valid index
- const QString currText = currentText();
+ const TQString currText = currentText();
while ( myIterateIndex < last &&
(currText == text( myIterateIndex ) ||
@@ -564,7 +564,7 @@ void KHistoryCombo::rotateDown()
--myIterateIndex;
- const QString currText = currentText();
+ const TQString currText = currentText();
// skip duplicates/empty items
while ( myIterateIndex >= 0 &&
(currText == text( myIterateIndex ) ||
@@ -594,11 +594,11 @@ void KHistoryCombo::rotateDown()
}
-void KHistoryCombo::keyPressEvent( QKeyEvent *e )
+void KHistoryCombo::keyPressEvent( TQKeyEvent *e )
{
KKey event_key( e );
- // going up in the history, rotating when reaching QListBox::count()
+ // going up in the history, rotating when reaching TQListBox::count()
if ( KStdAccel::rotateUp().contains(event_key) )
rotateUp();
@@ -610,13 +610,13 @@ void KHistoryCombo::keyPressEvent( QKeyEvent *e )
KComboBox::keyPressEvent( e );
}
-void KHistoryCombo::wheelEvent( QWheelEvent *ev )
+void KHistoryCombo::wheelEvent( TQWheelEvent *ev )
{
// Pass to poppable listbox if it's up
- QListBox* const lb = listBox();
+ TQListBox* const lb = listBox();
if ( lb && lb->isVisible() )
{
- QApplication::sendEvent( lb, ev );
+ TQApplication::sendEvent( lb, ev );
return;
}
// Otherwise make it change the text without emitting activated
@@ -647,19 +647,19 @@ void KHistoryCombo::setPixmapProvider( KPixmapProvider *prov )
// I would prefer to use changeItem(), but that doesn't honor the pixmap
// when using an editable combobox (what we do)
if ( count() > 0 ) {
- QStringList items( historyItems() );
+ TQStringList items( historyItems() );
clear();
insertItems( items );
}
}
-void KHistoryCombo::insertItems( const QStringList& items )
+void KHistoryCombo::insertItems( const TQStringList& items )
{
- QStringList::ConstIterator it = items.constBegin();
- const QStringList::ConstIterator itEnd = items.constEnd();
+ TQStringList::ConstIterator it = items.constBegin();
+ const TQStringList::ConstIterator itEnd = items.constEnd();
while ( it != itEnd ) {
- const QString item = *it;
+ const TQString item = *it;
if ( !item.isEmpty() ) { // only insert non-empty items
if ( myPixProvider )
insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall),
diff --git a/kdeui/kcombobox.h b/kdeui/kcombobox.h
index 47f76a59e..a03a8abff 100644
--- a/kdeui/kcombobox.h
+++ b/kdeui/kcombobox.h
@@ -22,8 +22,8 @@
#ifndef _KCOMBOBOX_H
#define _KCOMBOBOX_H
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kcompletion.h>
@@ -41,18 +41,18 @@ class KURL;
*
* \b Detail \n
*
- * This widget inherits from QComboBox and implements the following
+ * This widget inherits from TQComboBox and implements the following
* additional functionalities: a completion object that provides both automatic
* and manual text completion as well as text rotation features, configurable
* key-bindings to activate these features, and a popup-menu item that can be
* used to allow the user to change the text completion mode on the fly.
*
* To support these new features KComboBox emits a few additional signals
- * such as completion( const QString& ) and textRotation( KeyBindgingType ).
+ * such as completion( const TQString& ) and textRotation( KeyBindgingType ).
* The completion signal can be connected to a slot that will assist the user in
* filling out the remaining text while the rotation signal can be used to traverse
* through all possible matches whenever text completion results in multiple matches.
- * Additionally, a returnPressed() and a returnPressed( const QString& )
+ * Additionally, a returnPressed() and a returnPressed( const TQString& )
* signals are emitted when the user presses the Enter/Return key.
*
* KCombobox by default creates a completion object when you invoke the
@@ -67,7 +67,7 @@ class KURL;
*
* Beware: The completion object can be deleted on you, especially if a call
* such as setEditable(false) is made. Store the pointer at your own risk,
- * and consider using QGuardedPtr<KCompletion>.
+ * and consider using TQGuardedPtr<KCompletion>.
*
* The default key-bindings for completion and rotation is determined from the
* global settings in KStdAccel. These values, however, can be overridden
@@ -107,7 +107,7 @@ class KURL;
* KComboBox *combo = new KComboBox( true, this, "mywidget" );
* KCompletion *comp = combo->completionObject();
* // Connect to the return pressed signal - optional
- * connect(combo,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
*
* // Provide the to be completed strings. Note that those are separate from the combo's
* // contents.
@@ -121,7 +121,7 @@ class KURL;
* KURLCompletion *comp = new KURLCompletion();
* combo->setCompletionObject( comp );
* // Connect to the return pressed signal - optional
- * connect(combo,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* Note that you have to either delete the allocated completion object
@@ -141,7 +141,7 @@ class KURL;
*
* @author Dawit Alemayehu <adawit@kde.org>
*/
-class KDEUI_EXPORT KComboBox : public QComboBox, public KCompletionBase
+class KDEUI_EXPORT KComboBox : public TQComboBox, public KCompletionBase
{
Q_OBJECT
Q_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion )
@@ -158,7 +158,7 @@ public:
* @param parent The parent object of this widget
* @param name The name of this widget
*/
- KComboBox( QWidget *parent=0, const char *name=0 );
+ KComboBox( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a "read-write" or "read-only" combo box depending on
@@ -169,7 +169,7 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KComboBox( bool rw, QWidget *parent=0, const char *name=0 );
+ KComboBox( bool rw, TQWidget *parent=0, const char *name=0 );
/**
* Destructor.
@@ -196,7 +196,7 @@ public:
* KURL::prettyURL() is used so that the url is properly decoded
* for displaying.
*/
- void insertURL( const QPixmap& pixmap, const KURL& url, int index = -1 );
+ void insertURL( const TQPixmap& pixmap, const KURL& url, int index = -1 );
/**
* Replaces the item at position @p index with @p url.
@@ -210,7 +210,7 @@ public:
* KURL::prettyURL() is used so that the url is properly decoded
* for displaying.
*/
- void changeURL( const QPixmap& pixmap, const KURL& url, int index );
+ void changeURL( const TQPixmap& pixmap, const KURL& url, int index );
/**
* Returns the current cursor position.
@@ -223,7 +223,7 @@ public:
int cursorPosition() const { return ( lineEdit() ) ? lineEdit()->cursorPosition() : -1; }
/**
- * Re-implemented from QComboBox.
+ * Re-implemented from TQComboBox.
*
* If @p true, the completion mode will be set to automatic.
* Otherwise, it is defaulted to the global setting. This
@@ -235,7 +235,7 @@ public:
virtual void setAutoCompletion( bool autocomplete );
/**
- * Re-implemented from QComboBox.
+ * Re-implemented from TQComboBox.
*
* Returns @p true if the current completion mode is set
* to automatic. See its more comprehensive replacement
@@ -272,7 +272,7 @@ public:
/**
* Enables/Disables handling of URL drops. If enabled and the user
* drops an URL, the decoded URL will be inserted. Otherwise the default
- * behavior of QComboBox is used, which inserts the encoded URL.
+ * behavior of TQComboBox is used, which inserts the encoded URL.
*
* @param enable If @p true, insert decoded URLs
*/
@@ -292,7 +292,7 @@ public:
*
* @return @p true if an item with the string @p text is in the combobox.
*/
- bool contains( const QString& text ) const;
+ bool contains( const TQString& text ) const;
/**
* By default, KComboBox recognizes Key_Return and Key_Enter
@@ -320,7 +320,7 @@ public:
/**
* Re-implemented for internal reasons. API not affected.
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* @returns the completion-box, that is used in completion mode
@@ -339,7 +339,7 @@ public:
* any attempt to assign a line-edit to a non-editable combobox will
* simply be ignored.
*/
- virtual void setLineEdit( QLineEdit * );
+ virtual void setLineEdit( TQLineEdit * );
signals:
/**
@@ -358,7 +358,7 @@ signals:
* Note that this signal is only emitted when the
* widget is editable.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted when the completion key is pressed.
@@ -368,12 +368,12 @@ signals:
* Note that this signal is @em not available when the widget is non-editable
* or the completion mode is set to @p KGlobalSettings::CompletionNone.
*/
- void completion( const QString& );
+ void completion( const TQString& );
/**
* Emitted when the shortcut for substring completion is pressed.
*/
- void substringCompletion( const QString& );
+ void substringCompletion( const TQString& );
/**
* Emitted when the text rotation key-bindings are pressed.
@@ -398,12 +398,12 @@ signals:
* Emitted before the context menu is displayed.
*
* The signal allows you to add your own entries into the context menu.
- * Note that you MUST NOT store the pointer to the QPopupMenu since it is
+ * Note that you MUST NOT store the pointer to the TQPopupMenu since it is
* created and deleted on demand. Otherwise, you can crash your app.
*
* @param p the context menu about to be displayed
*/
- void aboutToShowContextMenu( QPopupMenu * p );
+ void aboutToShowContextMenu( TQPopupMenu * p );
public slots:
@@ -418,7 +418,7 @@ public slots:
* iteration will not work if there are no previous matches, i.e.
* no text has been completed and the *nix shell history list
* rotation is only available if the insertion policy for this
- * widget is set either @p QComobBox::AtTop or @p QComboBox::AtBottom.
+ * widget is set either @p QComobBox::AtTop or @p TQComboBox::AtBottom.
* For other insertion modes whatever has been typed by the user
* when the rotation event was initiated will be lost.
*
@@ -431,33 +431,33 @@ public slots:
*
* This function is a re-implementation of @p setCompletedText.
*/
- virtual void setCompletedText( const QString& );
+ virtual void setCompletedText( const TQString& );
/**
* Sets @p items into the completion-box if completionMode() is
* CompletionPopup. The popup will be shown immediately.
*/
- void setCompletedItems( const QStringList& items );
+ void setCompletedItems( const TQStringList& items );
/**
* Selects the first item that matches @p item. If there is no such item,
* it is inserted at position @p index if @p insert is true. Otherwise,
* no item is selected.
*/
- void setCurrentItem( const QString& item, bool insert = false, int index = -1 );
+ void setCurrentItem( const TQString& item, bool insert = false, int index = -1 );
/**
* Simply calls QComboBox' implementation. Only here to not become
* shadowed.
*/
- void setCurrentItem(int index) { QComboBox::setCurrentItem(index); }
+ void setCurrentItem(int index) { TQComboBox::setCurrentItem(index); }
protected slots:
/**
* @deprecated
*/
- virtual void itemSelected( QListBoxItem* ) {}
+ virtual void itemSelected( TQListBoxItem* ) {}
/**
* Completes text according to the completion mode.
@@ -470,7 +470,7 @@ protected slots:
* through the remaining matches. This way the rotation functionality
* is left to iterate through the list as usual.
*/
- virtual void makeCompletion( const QString& );
+ virtual void makeCompletion( const TQString& );
protected:
/*
@@ -481,7 +481,7 @@ protected:
* @param
* @param
*/
- virtual void setCompletedText( const QString& /* */, bool /*marked*/ );
+ virtual void setCompletedText( const TQString& /* */, bool /*marked*/ );
/**
* Reimplemented for internal reasons, the API is not affected.
@@ -489,7 +489,7 @@ protected:
virtual void create( WId = 0, bool initializeWindow = true,
bool destroyOldWindow = true );
- virtual void wheelEvent( QWheelEvent *ev );
+ virtual void wheelEvent( TQWheelEvent *ev );
private slots:
void lineEditDeleted();
@@ -533,7 +533,7 @@ class KPixmapProvider;
class KDEUI_EXPORT KHistoryCombo : public KComboBox
{
Q_OBJECT
- Q_PROPERTY( QStringList historyItems READ historyItems WRITE setHistoryItems )
+ Q_PROPERTY( TQStringList historyItems READ historyItems WRITE setHistoryItems )
public:
/**
@@ -546,16 +546,16 @@ public:
* use
*
* \code
- * connect( combo, SIGNAL( activated( const QString& )),
- * combo, SLOT( addToHistory( const QString& )));
+ * connect( combo, TQT_SIGNAL( activated( const TQString& )),
+ * combo, TQT_SLOT( addToHistory( const TQString& )));
* \endcode
*
- * Use QComboBox::setMaxCount() to limit the history.
+ * Use TQComboBox::setMaxCount() to limit the history.
*
* @p parent the parent object of this widget.
* @p name the name of this widget.
*/
- KHistoryCombo( QWidget *parent = 0L, const char *name = 0L );
+ KHistoryCombo( TQWidget *parent = 0L, const char *name = 0L );
// ### merge these two constructors
/**
@@ -565,7 +565,7 @@ public:
* contents of the combobox.
*/
KHistoryCombo( bool useCompletion,
- QWidget *parent = 0L, const char *name = 0L );
+ TQWidget *parent = 0L, const char *name = 0L );
/**
* Destructs the combo, the completion-object and the pixmap-provider
@@ -578,7 +578,7 @@ public:
*
* @see historyItems
*/
- inline void setHistoryItems( QStringList items ) {
+ inline void setHistoryItems( TQStringList items ) {
setHistoryItems(items, false);
}
@@ -593,7 +593,7 @@ public:
* you should do something like
* \code
* KConfig *config = kapp->config();
- * QStringList list;
+ * TQStringList list;
*
* // load the history and completion list after creating the history combo
* list = config->readListEntry( "Completion list" );
@@ -623,7 +623,7 @@ public:
* @see KCompletion::setItems
* @see KCompletion::items
*/
- void setHistoryItems( QStringList items, bool setCompletionList );
+ void setHistoryItems( TQStringList items, bool setCompletionList );
/**
* Returns the list of history items. Empty, when this is not a read-write
@@ -631,7 +631,7 @@ public:
*
* @see setHistoryItems
*/
- QStringList historyItems() const;
+ TQStringList historyItems() const;
/**
* Removes all items named @p item.
@@ -640,7 +640,7 @@ public:
*
* @see addToHistory
*/
- bool removeFromHistory( const QString& item );
+ bool removeFromHistory( const TQString& item );
/**
* Sets a pixmap provider, so that items in the combobox can have a pixmap.
@@ -687,9 +687,9 @@ public slots:
* not in the combobox, and vice versa.
*
* @see removeFromHistory
- * @see QComboBox::setDuplicatesEnabled
+ * @see TQComboBox::setDuplicatesEnabled
*/
- void addToHistory( const QString& item );
+ void addToHistory( const TQString& item );
/**
* Clears the history and the completion list.
@@ -706,12 +706,12 @@ protected:
/**
* Handling key-events, the shortcuts to rotate the items.
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Handling wheel-events, to rotate the items.
*/
- virtual void wheelEvent( QWheelEvent *ev );
+ virtual void wheelEvent( TQWheelEvent *ev );
/**
* Inserts @p items into the combo, honoring pixmapProvider()
@@ -721,7 +721,7 @@ protected:
*
* Called from setHistoryItems() and setPixmapProvider()
*/
- void insertItems( const QStringList& items );
+ void insertItems( const TQStringList& items );
/**
* @returns if we can modify the completion object or not.
@@ -743,7 +743,7 @@ private slots:
/**
* Appends our own context menu entry.
*/
- void addContextMenuItems( QPopupMenu* );
+ void addContextMenuItems( TQPopupMenu* );
private:
void init( bool useCompletion );
@@ -758,7 +758,7 @@ private:
/**
* The text typed before Up or Down was pressed.
*/
- QString myText;
+ TQString myText;
/**
* Indicates that the user at least once rotated Up through the entire list
diff --git a/kdeui/kcommand.cpp b/kdeui/kcommand.cpp
index bf133c609..2c76b21cd 100644
--- a/kdeui/kcommand.cpp
+++ b/kdeui/kcommand.cpp
@@ -30,7 +30,7 @@ KCommand::~KCommand()
{
}
-KMacroCommand::KMacroCommand( const QString & name ) : KNamedCommand(name)
+KMacroCommand::KMacroCommand( const TQString & name ) : KNamedCommand(name)
{
m_commands.setAutoDelete(true);
}
@@ -42,14 +42,14 @@ void KMacroCommand::addCommand(KCommand *command)
void KMacroCommand::execute()
{
- QPtrListIterator<KCommand> it(m_commands);
+ TQPtrListIterator<KCommand> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->execute();
}
void KMacroCommand::unexecute()
{
- QPtrListIterator<KCommand> it(m_commands);
+ TQPtrListIterator<KCommand> it(m_commands);
it.toLast();
for ( ; it.current() ; --it )
it.current()->unexecute();
@@ -84,25 +84,25 @@ KCommandHistory::KCommandHistory(KActionCollection * actionCollection, bool with
if (withMenus)
{
KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo",
- KStdAccel::shortcut(KStdAccel::Undo), this, SLOT( undo() ),
+ KStdAccel::shortcut(KStdAccel::Undo), this, TQT_SLOT( undo() ),
actionCollection, KStdAction::stdName( KStdAction::Undo ) );
- connect( undo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotUndoAboutToShow() ) );
- connect( undo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotUndoActivated( int ) ) );
+ connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) );
+ connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) );
m_undo = undo;
m_undoPopup = undo->popupMenu();
KToolBarPopupAction * redo = new KToolBarPopupAction( i18n("&Redo"), "redo",
- KStdAccel::shortcut(KStdAccel::Redo), this, SLOT( redo() ),
+ KStdAccel::shortcut(KStdAccel::Redo), this, TQT_SLOT( redo() ),
actionCollection, KStdAction::stdName( KStdAction::Redo ) );
- connect( redo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotRedoAboutToShow() ) );
- connect( redo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotRedoActivated( int ) ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) );
m_redo = redo;
m_redoPopup = redo->popupMenu();
}
else
{
- m_undo = KStdAction::undo( this, SLOT( undo() ), actionCollection );
- m_redo = KStdAction::redo( this, SLOT( redo() ), actionCollection );
+ m_undo = KStdAction::undo( this, TQT_SLOT( undo() ), actionCollection );
+ m_redo = KStdAction::redo( this, TQT_SLOT( redo() ), actionCollection );
m_undoPopup = 0L;
m_redoPopup = 0L;
}
diff --git a/kdeui/kcommand.h b/kdeui/kcommand.h
index c47838fb4..e65269137 100644
--- a/kdeui/kcommand.h
+++ b/kdeui/kcommand.h
@@ -21,9 +21,9 @@
#ifndef kcommand_h
#define kcommand_h
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
class KAction;
@@ -65,7 +65,7 @@ public:
* @return the name of this command, translated, since it will appear
* in the menus.
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -83,21 +83,21 @@ protected:
* @param name the name of this command, translated, since it will appear
* in the menus.
*/
- KNamedCommand(const QString &name) : KCommand(), m_name(name) {}
+ KNamedCommand(const TQString &name) : KCommand(), m_name(name) {}
public:
/**
* @return the name of this command
*/
- virtual QString name() const { return m_name; }
+ virtual TQString name() const { return m_name; }
/**
* Updates the name of this command.
* Rarely necessary.
*/
- void setName(const QString &name) { m_name=name; }
+ void setName(const TQString &name) { m_name=name; }
private:
- QString m_name;
+ TQString m_name;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -116,7 +116,7 @@ public:
* @param name the name of this command, translated, since it will appear
* in the menus.
*/
- KMacroCommand( const QString & name );
+ KMacroCommand( const TQString & name );
virtual ~KMacroCommand() {}
/**
@@ -137,7 +137,7 @@ public:
virtual void unexecute();
protected:
- QPtrList<KCommand> m_commands;
+ TQPtrList<KCommand> m_commands;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -153,7 +153,7 @@ protected:
* undo/redo actions in the menu and changes the text according
* to the name of the command.
*/
-class KDEUI_EXPORT KCommandHistory : public QObject {
+class KDEUI_EXPORT KCommandHistory : public TQObject {
Q_OBJECT
public:
/**
@@ -274,9 +274,9 @@ signals:
private:
void clipCommands(); // ensures that the limits are kept
- QPtrList<KCommand> m_commands;
+ TQPtrList<KCommand> m_commands;
KAction *m_undo, *m_redo;
- QPopupMenu *m_undoPopup, *m_redoPopup;
+ TQPopupMenu *m_undoPopup, *m_redoPopup;
int m_undoLimit, m_redoLimit;
bool m_first; // attention: it's the first command in the list!
protected:
diff --git a/kdeui/kcompletionbox.cpp b/kdeui/kcompletionbox.cpp
index 63791724b..68f5f6343 100644
--- a/kdeui/kcompletionbox.cpp
+++ b/kdeui/kcompletionbox.cpp
@@ -21,10 +21,10 @@
*/
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -36,15 +36,15 @@
class KCompletionBox::KCompletionBoxPrivate
{
public:
- QWidget *m_parent; // necessary to set the focus back
- QString cancelText;
+ TQWidget *m_parent; // necessary to set the focus back
+ TQString cancelText;
bool tabHandling;
bool down_workaround;
bool upwardBox;
bool emitSelected;
};
-KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
+KCompletionBox::KCompletionBox( TQWidget *parent, const char *name )
:KListBox( parent, name, WType_Popup ), d(new KCompletionBoxPrivate)
{
@@ -56,7 +56,7 @@ KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
setColumnMode( 1 );
setLineWidth( 1 );
- setFrameStyle( QFrame::Box | QFrame::Plain );
+ setFrameStyle( TQFrame::Box | TQFrame::Plain );
if ( parent )
setFocusProxy( parent );
@@ -66,14 +66,14 @@ KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
setVScrollBarMode( Auto );
setHScrollBarMode( AlwaysOff );
- connect( this, SIGNAL( doubleClicked( QListBoxItem * )),
- SLOT( slotActivated( QListBoxItem * )) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem * )),
+ TQT_SLOT( slotActivated( TQListBoxItem * )) );
- // grmbl, just QListBox workarounds :[ Thanks Volker.
- connect( this, SIGNAL( currentChanged( QListBoxItem * )),
- SLOT( slotCurrentChanged() ));
- connect( this, SIGNAL( clicked( QListBoxItem * )),
- SLOT( slotItemClicked( QListBoxItem * )) );
+ // grmbl, just TQListBox workarounds :[ Thanks Volker.
+ connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem * )),
+ TQT_SLOT( slotCurrentChanged() ));
+ connect( this, TQT_SIGNAL( clicked( TQListBoxItem * )),
+ TQT_SLOT( slotItemClicked( TQListBoxItem * )) );
}
KCompletionBox::~KCompletionBox()
@@ -82,11 +82,11 @@ KCompletionBox::~KCompletionBox()
delete d;
}
-QStringList KCompletionBox::items() const
+TQStringList KCompletionBox::items() const
{
- QStringList list;
+ TQStringList list;
- const QListBoxItem* currItem = firstItem();
+ const TQListBoxItem* currItem = firstItem();
while (currItem) {
list.append(currItem->text());
@@ -96,7 +96,7 @@ QStringList KCompletionBox::items() const
return list;
}
-void KCompletionBox::slotActivated( QListBoxItem *item )
+void KCompletionBox::slotActivated( TQListBoxItem *item )
{
if ( !item )
return;
@@ -105,14 +105,14 @@ void KCompletionBox::slotActivated( QListBoxItem *item )
emit activated( item->text() );
}
-bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
+bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e )
{
int type = e->type();
if ( o == d->m_parent ) {
if ( isVisible() ) {
- if ( type == QEvent::KeyPress ) {
- QKeyEvent *ev = static_cast<QKeyEvent *>( e );
+ if ( type == TQEvent::KeyPress ) {
+ TQKeyEvent *ev = static_cast<TQKeyEvent *>( e );
switch ( ev->key() ) {
case Key_BackTab:
if ( d->tabHandling && (ev->state() == NoButton ||
@@ -137,8 +137,8 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
// If there is no selected item and we've popped up above
// our parent, select the first item when they press up.
if ( selectedItem() ||
- mapToGlobal( QPoint( 0, 0 ) ).y() >
- d->m_parent->mapToGlobal( QPoint( 0, 0 ) ).y() )
+ mapToGlobal( TQPoint( 0, 0 ) ).y() >
+ d->m_parent->mapToGlobal( TQPoint( 0, 0 ) ).y() )
up();
else
down();
@@ -182,10 +182,10 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
break;
}
}
- else if ( type == QEvent::AccelOverride ) {
+ else if ( type == TQEvent::AccelOverride ) {
// Override any acceleartors that match
// the key sequences we use here...
- QKeyEvent *ev = static_cast<QKeyEvent *>( e );
+ TQKeyEvent *ev = static_cast<TQKeyEvent *>( e );
switch ( ev->key() ) {
case Key_Down:
case Key_Up:
@@ -220,21 +220,21 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
}
// parent loses focus or gets a click -> we hide
- else if ( type == QEvent::FocusOut || type == QEvent::Resize ||
- type == QEvent::Close || type == QEvent::Hide ||
- type == QEvent::Move ) {
+ else if ( type == TQEvent::FocusOut || type == TQEvent::Resize ||
+ type == TQEvent::Close || type == TQEvent::Hide ||
+ type == TQEvent::Move ) {
hide();
}
}
}
// any mouse-click on something else than "this" makes us hide
- else if ( type == QEvent::MouseButtonPress ) {
- QMouseEvent *ev = static_cast<QMouseEvent *>( e );
+ else if ( type == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *ev = static_cast<TQMouseEvent *>( e );
if ( !rect().contains( ev->pos() )) // this widget
hide();
- if ( !d->emitSelected && currentItem() && !::qt_cast<QScrollBar*>(o) )
+ if ( !d->emitSelected && currentItem() && !::qt_cast<TQScrollBar*>(o) )
{
emit highlighted( currentText() );
hide();
@@ -268,16 +268,16 @@ void KCompletionBox::popup()
void KCompletionBox::sizeAndPosition()
{
int currentGeom = height();
- QPoint currentPos = pos();
- QRect geom = calculateGeometry();
+ TQPoint currentPos = pos();
+ TQRect geom = calculateGeometry();
resize( geom.size() );
int x = currentPos.x(), y = currentPos.y();
if ( d->m_parent ) {
if ( !isVisible() ) {
- QRect screenSize = KGlobalSettings::desktopGeometry(d->m_parent);
+ TQRect screenSize = KGlobalSettings::desktopGeometry(d->m_parent);
- QPoint orig = d->m_parent->mapToGlobal( QPoint(0, d->m_parent->height()) );
+ TQPoint orig = d->m_parent->mapToGlobal( TQPoint(0, d->m_parent->height()) );
x = orig.x() + geom.x();
y = orig.y() + geom.y();
@@ -312,7 +312,7 @@ void KCompletionBox::show()
// Workaround for I'm not sure whose bug - if this KCompletionBox' parent
// is in a layout, that layout will detect inserting new child (posted
// ChildInserted event), and will trigger relayout (post LayoutHint event).
- // QWidget::show() sends also posted ChildInserted events for the parent,
+ // TQWidget::show() sends also posted ChildInserted events for the parent,
// and later all LayoutHint events, which causes layout updating.
// The problem is, KCompletionBox::eventFilter() detects resizing
// of the parent, and calls hide() - and this hide() happen in the middle
@@ -325,11 +325,11 @@ void KCompletionBox::hide()
{
if ( d->m_parent )
qApp->removeEventFilter( this );
- d->cancelText = QString::null;
+ d->cancelText = TQString::null;
KListBox::hide();
}
-QRect KCompletionBox::calculateGeometry() const
+TQRect KCompletionBox::calculateGeometry() const
{
int x = 0, y = 0;
int ih = itemHeight();
@@ -341,17 +341,17 @@ QRect KCompletionBox::calculateGeometry() const
//If we're inside a combox, Qt by default makes the dropdown
// as wide as the combo, and gives the style a chance
// to adjust it. Do that here as well, for consistency
- const QObject* combo;
+ const TQObject* combo;
if ( d->m_parent && (combo = d->m_parent->parent() ) &&
- combo->inherits("QComboBox") )
+ combo->inherits("TQComboBox") )
{
- const QComboBox* cb = static_cast<const QComboBox*>(combo);
+ const TQComboBox* cb = static_cast<const TQComboBox*>(combo);
//Expand to the combo width
w = QMAX( w, cb->width() );
- QPoint parentCorner = d->m_parent->mapToGlobal(QPoint(0, 0));
- QPoint comboCorner = cb->mapToGlobal(QPoint(0, 0));
+ TQPoint parentCorner = d->m_parent->mapToGlobal(TQPoint(0, 0));
+ TQPoint comboCorner = cb->mapToGlobal(TQPoint(0, 0));
//We need to adjust our horizontal position to also be WRT to the combo
x += comboCorner.x() - parentCorner.x();
@@ -361,19 +361,19 @@ QRect KCompletionBox::calculateGeometry() const
comboCorner.y() - parentCorner.y();
//Ask the style to refine this a bit
- QRect styleAdj = style().querySubControlMetrics(QStyle::CC_ComboBox,
- cb, QStyle::SC_ComboBoxListBoxPopup,
- QStyleOption(x, y, w, h));
- //QCommonStyle returns QRect() by default, so this is what we get if the
+ TQRect styleAdj = style().querySubControlMetrics(TQStyle::CC_ComboBox,
+ cb, TQStyle::SC_ComboBoxListBoxPopup,
+ TQStyleOption(x, y, w, h));
+ //TQCommonStyle returns TQRect() by default, so this is what we get if the
//style doesn't implement this
if (!styleAdj.isNull())
return styleAdj;
}
- return QRect(x, y, w, h);
+ return TQRect(x, y, w, h);
}
-QSize KCompletionBox::sizeHint() const
+TQSize KCompletionBox::sizeHint() const
{
return calculateGeometry().size();
}
@@ -433,12 +433,12 @@ bool KCompletionBox::isTabHandling() const
return d->tabHandling;
}
-void KCompletionBox::setCancelledText( const QString& text )
+void KCompletionBox::setCancelledText( const TQString& text )
{
d->cancelText = text;
}
-QString KCompletionBox::cancelledText() const
+TQString KCompletionBox::cancelledText() const
{
return d->cancelText;
}
@@ -455,7 +455,7 @@ class KCompletionBoxItem : public QListBoxItem
{
public:
//Returns true if dirty.
- bool reuse( const QString& newText )
+ bool reuse( const TQString& newText )
{
if ( text() == newText )
return false;
@@ -465,7 +465,7 @@ public:
};
-void KCompletionBox::insertItems( const QStringList& items, int index )
+void KCompletionBox::insertItems( const TQStringList& items, int index )
{
bool block = signalsBlocked();
blockSignals( true );
@@ -474,12 +474,12 @@ void KCompletionBox::insertItems( const QStringList& items, int index )
d->down_workaround = true;
}
-void KCompletionBox::setItems( const QStringList& items )
+void KCompletionBox::setItems( const TQStringList& items )
{
bool block = signalsBlocked();
blockSignals( true );
- QListBoxItem* item = firstItem();
+ TQListBoxItem* item = firstItem();
if ( !item ) {
insertStringList( items );
}
@@ -489,8 +489,8 @@ void KCompletionBox::setItems( const QStringList& items )
//to reduce flicker
bool dirty = false;
- QStringList::ConstIterator it = items.constBegin();
- const QStringList::ConstIterator itEnd = items.constEnd();
+ TQStringList::ConstIterator it = items.constBegin();
+ const TQStringList::ConstIterator itEnd = items.constEnd();
for ( ; it != itEnd; ++it) {
if ( item ) {
@@ -501,7 +501,7 @@ void KCompletionBox::setItems( const QStringList& items )
else {
dirty = true;
//Inserting an item is a way of making this dirty
- insertItem( new QListBoxText( *it ) );
+ insertItem( new TQListBoxText( *it ) );
}
}
@@ -510,7 +510,7 @@ void KCompletionBox::setItems( const QStringList& items )
dirty = true;
}
- QListBoxItem* tmp = item;
+ TQListBoxItem* tmp = item;
while ( (item = tmp ) ) {
tmp = item->next();
delete item;
@@ -532,7 +532,7 @@ void KCompletionBox::slotCurrentChanged()
d->down_workaround = false;
}
-void KCompletionBox::slotItemClicked( QListBoxItem *item )
+void KCompletionBox::slotItemClicked( TQListBoxItem *item )
{
if ( item )
{
diff --git a/kdeui/kcompletionbox.h b/kdeui/kcompletionbox.h
index f7669802d..2b536d172 100644
--- a/kdeui/kcompletionbox.h
+++ b/kdeui/kcompletionbox.h
@@ -24,7 +24,7 @@
#define KCOMPLETIONBOX_H
class QEvent;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klistbox.h>
/**
@@ -44,7 +44,7 @@ class KDEUI_EXPORT KCompletionBox : public KListBox
{
Q_OBJECT
Q_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
- Q_PROPERTY(QString cancelledText READ cancelledText WRITE setCancelledText)
+ Q_PROPERTY(TQString cancelledText READ cancelledText WRITE setCancelledText)
Q_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect )
public:
@@ -54,14 +54,14 @@ public:
* The parent widget is used to give the focus back when pressing the
* up-button on the very first item.
*/
- KCompletionBox( QWidget *parent, const char *name = 0 );
+ KCompletionBox( TQWidget *parent, const char *name = 0 );
/**
* Destroys the box
*/
~KCompletionBox();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* @returns true if selecting an item results in the emition of the selected signal.
@@ -74,19 +74,19 @@ public slots:
/**
* Returns a list of all items currently in the box.
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Inserts @p items into the box. Does not clear the items before.
* @p index determines at which position @p items will be inserted.
* (defaults to appending them at the end)
*/
- void insertItems( const QStringList& items, int index = -1 );
+ void insertItems( const TQStringList& items, int index = -1 );
/**
* Clears the box and inserts @p items.
*/
- void setItems( const QStringList& items );
+ void setItems( const TQStringList& items );
/**
* Adjusts the size of the box to fit the width of the parent given in the
@@ -129,15 +129,15 @@ public slots:
* If the canceled text is not set through this function, the
* userCancelled signal will not be emitted.
*
- * @see userCancelled( const QString& )
+ * @see userCancelled( const TQString& )
* @param txt the text to be emitted if the user cancels this box
*/
- void setCancelledText( const QString& txt);
+ void setCancelledText( const TQString& txt);
/**
- * @returns the text set via setCancelledText() or QString::null.
+ * @returns the text set via setCancelledText() or TQString::null.
*/
- QString cancelledText() const;
+ TQString cancelledText() const;
/**
* Set whether or not the selected signal should be emitted when an
@@ -194,21 +194,21 @@ signals:
* Emitted when an item was selected, contains the text of
* the selected item.
*/
- void activated( const QString& );
+ void activated( const TQString& );
/**
* Emitted whenever the user chooses to ignore the available
* selections and close the this box.
*/
- void userCancelled( const QString& );
+ void userCancelled( const TQString& );
protected:
/**
* This calculates the size of the dropdown and the relative position of the top
* left corner with respect to the parent widget. This matches the geometry and position
- * normally used by K/QComboBox when used with one.
+ * normally used by K/TQComboBox when used with one.
*/
- QRect calculateGeometry() const;
+ TQRect calculateGeometry() const;
/**
* This properly sizes and positions the listbox.
@@ -219,20 +219,20 @@ protected:
* Reimplemented from KListBox to get events from the viewport (to hide
* this widget on mouse-click, Escape-presses, etc.
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
protected slots:
/**
* Called when an item was activated. Emits
* activated() with the item.
*/
- virtual void slotActivated( QListBoxItem * );
+ virtual void slotActivated( TQListBoxItem * );
private slots:
- void slotSetCurrentItem( QListBoxItem *i ) { setCurrentItem( i ); } // grrr
+ void slotSetCurrentItem( TQListBoxItem *i ) { setCurrentItem( i ); } // grrr
void slotCurrentChanged();
void canceled();
- void slotItemClicked( QListBoxItem * );
+ void slotItemClicked( TQListBoxItem * );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kconfigdialog.cpp b/kdeui/kconfigdialog.cpp
index 9410379d9..3d5bfd697 100644
--- a/kdeui/kconfigdialog.cpp
+++ b/kdeui/kconfigdialog.cpp
@@ -27,11 +27,11 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqmap.h>
-QAsciiDict<KConfigDialog> KConfigDialog::openDialogs;
+TQAsciiDict<KConfigDialog> KConfigDialog::openDialogs;
// This class is here purly so we don't break binary compatibility down the road.
class KConfigDialog::KConfigDialogPrivate
@@ -43,10 +43,10 @@ public:
bool shown;
KDialogBase::DialogType type;
KConfigDialogManager *manager;
- QMap<QWidget *, KConfigDialogManager *> managerForPage;
+ TQMap<TQWidget *, KConfigDialogManager *> managerForPage;
};
-KConfigDialog::KConfigDialog( QWidget *parent, const char *name,
+KConfigDialog::KConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType,
int dialogButtons,
@@ -59,17 +59,17 @@ KConfigDialog::KConfigDialog( QWidget *parent, const char *name,
if ( name ) {
openDialogs.insert(name, this);
} else {
- QCString genericName;
+ TQCString genericName;
genericName.sprintf("SettingsDialog-%p", this);
openDialogs.insert(genericName, this);
setName(genericName);
}
- connect(this, SIGNAL(okClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateButtons()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateWidgetsDefault()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons()));
d->manager = new KConfigDialogManager(this, config);
setupManagerConnections(d->manager);
@@ -83,10 +83,10 @@ KConfigDialog::~KConfigDialog()
delete d;
}
-void KConfigDialog::addPage(QWidget *page,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header,
+void KConfigDialog::addPage(TQWidget *page,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header,
bool manage)
{
addPageInternal(page, itemName, pixmapName, header);
@@ -94,21 +94,21 @@ void KConfigDialog::addPage(QWidget *page,
d->manager->addWidget(page);
}
-void KConfigDialog::addPage(QWidget *page,
+void KConfigDialog::addPage(TQWidget *page,
KConfigSkeleton *config,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header)
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header)
{
addPageInternal(page, itemName, pixmapName, header);
d->managerForPage[page] = new KConfigDialogManager(page, config);
setupManagerConnections(d->managerForPage[page]);
}
-void KConfigDialog::addPageInternal(QWidget *page,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header)
+void KConfigDialog::addPageInternal(TQWidget *page,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header)
{
if(d->shown)
{
@@ -120,25 +120,25 @@ void KConfigDialog::addPageInternal(QWidget *page,
case TreeList:
case IconList:
case Tabbed: {
- QVBox *frame = addVBoxPage(itemName, header, SmallIcon(pixmapName, 32));
+ TQVBox *frame = addVBoxPage(itemName, header, SmallIcon(pixmapName, 32));
frame->setSpacing( 0 );
frame->setMargin( 0 );
- page->reparent(((QWidget*)frame), 0, QPoint());
+ page->reparent(((TQWidget*)frame), 0, TQPoint());
}
break;
case Swallow:
{
- page->reparent(this, 0, QPoint());
+ page->reparent(this, 0, TQPoint());
setMainWidget(page);
}
break;
case Plain:
{
- QFrame *main = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( main, 0, 0 );
- page->reparent(((QWidget*)main), 0, QPoint());
+ TQFrame *main = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( main, 0, 0 );
+ page->reparent(((TQWidget*)main), 0, TQPoint());
topLayout->addWidget( page );
}
break;
@@ -150,12 +150,12 @@ void KConfigDialog::addPageInternal(QWidget *page,
void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager)
{
- connect(manager, SIGNAL(settingsChanged()), this, SLOT(settingsChangedSlot()));
- connect(manager, SIGNAL(widgetModified()), this, SLOT(updateButtons()));
+ connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot()));
+ connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons()));
- connect(this, SIGNAL(okClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(defaultClicked()), manager, SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(okClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault()));
}
KConfigDialog* KConfigDialog::exists(const char* name)
@@ -177,7 +177,7 @@ void KConfigDialog::updateButtons()
if (only_once) return;
only_once = true;
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
bool has_changed = d->manager->hasChanged() || hasChanged();
for (it = d->managerForPage.begin();
@@ -213,7 +213,7 @@ void KConfigDialog::settingsChangedSlot()
void KConfigDialog::show()
{
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
updateWidgets();
d->manager->updateWidgets();
diff --git a/kdeui/kconfigdialog.h b/kdeui/kconfigdialog.h
index fa0409f29..6c2061e88 100644
--- a/kdeui/kconfigdialog.h
+++ b/kdeui/kconfigdialog.h
@@ -25,7 +25,7 @@ class KConfig;
class KConfigSkeleton;
class KConfigDialogManager;
#include <kdialogbase.h>
-#include <qasciidict.h>
+#include <tqasciidict.h>
/**
* \short Standard %KDE configuration dialog class
@@ -52,8 +52,8 @@ class KConfigDialogManager;
* KConfigDialog *dialog = new KConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList);
* dialog->addPage(new General(0, "General"), i18n("General") );
* dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") );
- * connect(dialog, SIGNAL(settingsChanged()), mainWidget, SLOT(loadSettings()));
- * connect(dialog, SIGNAL(settingsChanged()), this, SLOT(loadSettings()));
+ * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings()));
+ * connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings()));
* dialog->show();
* }
* \endcode
@@ -120,7 +120,7 @@ public:
*/
// KDE4: Add the "separator" parameter as in KDialogBase
// Make "dialogType" an int
- KConfigDialog( QWidget *parent, const char *name,
+ KConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType = IconList,
int dialogButtons = Default|Ok|Apply|Cancel|Help,
@@ -149,9 +149,9 @@ public:
* @param manage - Whether KConfigDialogManager should manage the page or not.
*/
// KDE4: Add a default value for itemName & pixmapName
- void addPage( QWidget *page, const QString &itemName,
- const QString &pixmapName,
- const QString &header=QString::null,
+ void addPage( TQWidget *page, const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header=TQString::null,
bool manage=true );
/**
@@ -171,10 +171,10 @@ public:
* mode. If empty, the itemName text is used when needed.
*/
// KDE4: Add a default value for itemName & pixmapName
- void addPage( QWidget *page, KConfigSkeleton *config,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header=QString::null );
+ void addPage( TQWidget *page, KConfigSkeleton *config,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header=TQString::null );
/**
* See if a dialog with the name 'name' already exists.
@@ -253,8 +253,8 @@ private:
/**
* Internal function with common addPage code.
*/
- void addPageInternal(QWidget *page, const QString &itemName,
- const QString &pixmapName, const QString &header);
+ void addPageInternal(TQWidget *page, const TQString &itemName,
+ const TQString &pixmapName, const TQString &header);
/**
* Sets the connections from a manager to the dialog (and the other
@@ -266,7 +266,7 @@ private:
/**
* The list of existing dialogs.
*/
- static QAsciiDict<KConfigDialog> openDialogs;
+ static TQAsciiDict<KConfigDialog> openDialogs;
class KConfigDialogPrivate;
/**
diff --git a/kdeui/kcursor.cpp b/kdeui/kcursor.cpp
index 74e37327d..02f8723f5 100644
--- a/kdeui/kcursor.cpp
+++ b/kdeui/kcursor.cpp
@@ -24,15 +24,15 @@
#include <kcursor.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kglobal.h>
#include <kconfig.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include "kcursor_private.h"
@@ -40,9 +40,9 @@ KCursor::KCursor()
{
}
-QCursor KCursor::handCursor()
+TQCursor KCursor::handCursor()
{
- static QCursor *hand_cursor = 0;
+ static TQCursor *hand_cursor = 0;
if (!hand_cursor)
{
@@ -66,16 +66,16 @@ QCursor KCursor::handCursor()
0xf8, 0xff, 0x07, 0xf8, 0xff, 0x07, 0xf8, 0xff, 0x07, 0xf8, 0xff,
0x07, 0xf8, 0xff, 0x07, 0xf0, 0xff, 0x07, 0xf0, 0xff, 0x07, 0xe0,
0xff, 0x03, 0xc0, 0xff, 0x03, 0xc0, 0xff, 0x01, 0xc0, 0xff, 0x01};
- QBitmap hand_bitmap(22, 22, HAND_BITS, true);
- QBitmap hand_mask(22, 22, HAND_MASK_BITS, true);
- hand_cursor = new QCursor(hand_bitmap, hand_mask, 7, 0);
- // Hack to force QCursor to call XCreatePixmapCursor() immediately
+ TQBitmap hand_bitmap(22, 22, HAND_BITS, true);
+ TQBitmap hand_mask(22, 22, HAND_MASK_BITS, true);
+ hand_cursor = new TQCursor(hand_bitmap, hand_mask, 7, 0);
+ // Hack to force TQCursor to call XCreatePixmapCursor() immediately
// so the bitmaps don't get pushed out of the Xcursor LRU cache.
hand_cursor->handle();
}
else
#endif //! Q_WS_WIN
- hand_cursor = new QCursor(PointingHandCursor);
+ hand_cursor = new TQCursor(PointingHandCursor);
}
Q_CHECK_PTR(hand_cursor);
@@ -122,15 +122,15 @@ static const char * const working_cursor_xpm[]={
"################################"};
-QCursor KCursor::workingCursor()
+TQCursor KCursor::workingCursor()
{
- static QCursor *working_cursor = 0;
+ static TQCursor *working_cursor = 0;
if (!working_cursor)
{
- QPixmap pm( const_cast< const char** >( working_cursor_xpm ));
- working_cursor = new QCursor( pm, 1, 1 );
- // Hack to force QCursor to call XCreatePixmapCursor() immediately
+ TQPixmap pm( const_cast< const char** >( working_cursor_xpm ));
+ working_cursor = new TQCursor( pm, 1, 1 );
+ // Hack to force TQCursor to call XCreatePixmapCursor() immediately
// so the bitmaps don't get pushed out of the Xcursor LRU cache.
working_cursor->handle();
}
@@ -143,90 +143,90 @@ QCursor KCursor::workingCursor()
* All of the follow functions will return the Qt default for now regardless
* of the style. This will change at some later date
*/
-QCursor KCursor::arrowCursor()
+TQCursor KCursor::arrowCursor()
{
return Qt::arrowCursor;
}
-QCursor KCursor::upArrowCursor()
+TQCursor KCursor::upArrowCursor()
{
return Qt::upArrowCursor;
}
-QCursor KCursor::crossCursor()
+TQCursor KCursor::crossCursor()
{
return Qt::crossCursor;
}
-QCursor KCursor::waitCursor()
+TQCursor KCursor::waitCursor()
{
return Qt::waitCursor;
}
-QCursor KCursor::ibeamCursor()
+TQCursor KCursor::ibeamCursor()
{
return Qt::ibeamCursor;
}
-QCursor KCursor::sizeVerCursor()
+TQCursor KCursor::sizeVerCursor()
{
return Qt::sizeVerCursor;
}
-QCursor KCursor::sizeHorCursor()
+TQCursor KCursor::sizeHorCursor()
{
return Qt::sizeHorCursor;
}
-QCursor KCursor::sizeBDiagCursor()
+TQCursor KCursor::sizeBDiagCursor()
{
return Qt::sizeBDiagCursor;
}
-QCursor KCursor::sizeFDiagCursor()
+TQCursor KCursor::sizeFDiagCursor()
{
return Qt::sizeFDiagCursor;
}
-QCursor KCursor::sizeAllCursor()
+TQCursor KCursor::sizeAllCursor()
{
return Qt::sizeAllCursor;
}
-QCursor KCursor::blankCursor()
+TQCursor KCursor::blankCursor()
{
return Qt::blankCursor;
}
-QCursor KCursor::whatsThisCursor()
+TQCursor KCursor::whatsThisCursor()
{
return Qt::whatsThisCursor;
}
// auto-hide cursor stuff
-void KCursor::setAutoHideCursor( QWidget *w, bool enable )
+void KCursor::setAutoHideCursor( TQWidget *w, bool enable )
{
setAutoHideCursor( w, enable, false );
}
-void KCursor::setAutoHideCursor( QWidget *w, bool enable,
+void KCursor::setAutoHideCursor( TQWidget *w, bool enable,
bool customEventFilter )
{
KCursorPrivate::self()->setAutoHideCursor( w, enable, customEventFilter );
}
-void KCursor::autoHideEventFilter( QObject *o, QEvent *e )
+void KCursor::autoHideEventFilter( TQObject *o, TQEvent *e )
{
KCursorPrivate::self()->eventFilter( o, e );
}
@@ -243,15 +243,15 @@ int KCursor::hideCursorDelay()
// **************************************************************************
-KCursorPrivateAutoHideEventFilter::KCursorPrivateAutoHideEventFilter( QWidget* widget )
+KCursorPrivateAutoHideEventFilter::KCursorPrivateAutoHideEventFilter( TQWidget* widget )
: m_widget( widget )
, m_wasMouseTracking( m_widget->hasMouseTracking() )
, m_isCursorHidden( false )
, m_isOwnCursor( false )
{
m_widget->setMouseTracking( true );
- connect( &m_autoHideTimer, SIGNAL( timeout() ),
- this, SLOT( hideCursor() ) );
+ connect( &m_autoHideTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( hideCursor() ) );
}
KCursorPrivateAutoHideEventFilter::~KCursorPrivateAutoHideEventFilter()
@@ -274,7 +274,7 @@ void KCursorPrivateAutoHideEventFilter::hideCursor()
m_isCursorHidden = true;
- QWidget* w = actualWidget();
+ TQWidget* w = actualWidget();
m_isOwnCursor = w->ownCursor();
if ( m_isOwnCursor )
@@ -292,7 +292,7 @@ void KCursorPrivateAutoHideEventFilter::unhideCursor()
m_isCursorHidden = false;
- QWidget* w = actualWidget();
+ TQWidget* w = actualWidget();
if ( w->cursor().shape() != Qt::BlankCursor ) // someone messed with the cursor already
return;
@@ -303,46 +303,46 @@ void KCursorPrivateAutoHideEventFilter::unhideCursor()
w->unsetCursor();
}
-QWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
+TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
{
- QWidget* w = m_widget;
+ TQWidget* w = m_widget;
// Is w a scrollview ? Call setCursor on the viewport in that case.
- QScrollView * sv = dynamic_cast<QScrollView *>( w );
+ TQScrollView * sv = dynamic_cast<TQScrollView *>( w );
if ( sv )
w = sv->viewport();
return w;
}
-bool KCursorPrivateAutoHideEventFilter::eventFilter( QObject *o, QEvent *e )
+bool KCursorPrivateAutoHideEventFilter::eventFilter( TQObject *o, TQEvent *e )
{
Q_ASSERT( o == m_widget );
switch ( e->type() )
{
- case QEvent::Create:
+ case TQEvent::Create:
// Qt steals mouseTracking on create()
m_widget->setMouseTracking( true );
break;
- case QEvent::Leave:
- case QEvent::FocusOut:
- case QEvent::WindowDeactivate:
+ case TQEvent::Leave:
+ case TQEvent::FocusOut:
+ case TQEvent::WindowDeactivate:
unhideCursor();
break;
- case QEvent::KeyPress:
- case QEvent::AccelOverride:
+ case TQEvent::KeyPress:
+ case TQEvent::AccelOverride:
hideCursor();
break;
- case QEvent::Enter:
- case QEvent::FocusIn:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::Show:
- case QEvent::Hide:
- case QEvent::Wheel:
+ case TQEvent::Enter:
+ case TQEvent::FocusIn:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::Show:
+ case TQEvent::Hide:
+ case TQEvent::Wheel:
unhideCursor();
if ( m_widget->hasFocus() )
m_autoHideTimer.start( KCursorPrivate::self()->hideCursorDelay, true );
@@ -370,16 +370,16 @@ KCursorPrivate::KCursorPrivate()
hideCursorDelay = 5000; // 5s default value
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("KDE") );
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") );
enabled = kc->readBoolEntry(
- QString::fromLatin1("Autohiding cursor enabled"), true );
+ TQString::fromLatin1("Autohiding cursor enabled"), true );
}
KCursorPrivate::~KCursorPrivate()
{
}
-void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEventFilter )
+void KCursorPrivate::setAutoHideCursor( TQWidget *w, bool enable, bool customEventFilter )
{
if ( !w || !enabled )
return;
@@ -392,8 +392,8 @@ void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEven
m_eventFilters.insert( w, filter );
if ( !customEventFilter )
w->installEventFilter( filter );
- connect( w, SIGNAL( destroyed(QObject*) ),
- this, SLOT( slotWidgetDestroyed(QObject*) ) );
+ connect( w, TQT_SIGNAL( destroyed(TQObject*) ),
+ this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) );
}
else
{
@@ -402,12 +402,12 @@ void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEven
return;
w->removeEventFilter( filter );
delete filter;
- disconnect( w, SIGNAL( destroyed(QObject*) ),
- this, SLOT( slotWidgetDestroyed(QObject*) ) );
+ disconnect( w, TQT_SIGNAL( destroyed(TQObject*) ),
+ this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) );
}
}
-bool KCursorPrivate::eventFilter( QObject *o, QEvent *e )
+bool KCursorPrivate::eventFilter( TQObject *o, TQEvent *e )
{
if ( !enabled )
return false;
@@ -421,7 +421,7 @@ bool KCursorPrivate::eventFilter( QObject *o, QEvent *e )
return filter->eventFilter( o, e );
}
-void KCursorPrivate::slotWidgetDestroyed( QObject* o )
+void KCursorPrivate::slotWidgetDestroyed( TQObject* o )
{
KCursorPrivateAutoHideEventFilter* filter = m_eventFilters.take( o );
diff --git a/kdeui/kcursor.h b/kdeui/kcursor.h
index 1c96c49b6..a7a75610c 100644
--- a/kdeui/kcursor.h
+++ b/kdeui/kcursor.h
@@ -23,15 +23,15 @@
#ifndef _KCURSOR_H
#define _KCURSOR_H
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdelibs_export.h>
class QWidget;
/**
- * @short A QCursor wrapper allowing "themed" cursors and auto-hiding cursors.
+ * @short A TQCursor wrapper allowing "themed" cursors and auto-hiding cursors.
*
- * A wrapper around QCursor that allows for "themed" cursors.
+ * A wrapper around TQCursor that allows for "themed" cursors.
*
* Currently, the only themed cursor is a hand shaped cursor.
*
@@ -56,83 +56,83 @@ public:
* Returns the proper hand cursor according to
* the current GUI style (static function).
*/
- static QCursor handCursor();
+ static TQCursor handCursor();
/**
* Returns the proper arrow+hourglass cursor according to
* the current GUI style (static function).
*/
- static QCursor workingCursor();
+ static TQCursor workingCursor();
/**
* Returns the proper arrow cursor according to
* the current GUI style (static function).
*/
- static QCursor arrowCursor();
+ static TQCursor arrowCursor();
/**
* Returns the proper up arrow cursor according to
* the current GUI style (static function).
*/
- static QCursor upArrowCursor();
+ static TQCursor upArrowCursor();
/**
* Returns the proper cross-hair cursor according to
* the current GUI style (static function).
*/
- static QCursor crossCursor();
+ static TQCursor crossCursor();
/**
* Returns the proper hourglass cursor according to
* the current GUI style (static function).
*/
- static QCursor waitCursor();
+ static TQCursor waitCursor();
/**
* Returns the proper text cursor according to
* the current GUI style (static function).
*/
- static QCursor ibeamCursor();
+ static TQCursor ibeamCursor();
/**
* Returns the proper vertical resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeVerCursor();
+ static TQCursor sizeVerCursor();
/**
* Returns the proper horizontal resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeHorCursor();
+ static TQCursor sizeHorCursor();
/**
* Returns the proper diagonal resize (/) cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeBDiagCursor();
+ static TQCursor sizeBDiagCursor();
/**
* Returns the proper diagonal resize (\) cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeFDiagCursor();
+ static TQCursor sizeFDiagCursor();
/**
* Returns the proper all-directions resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeAllCursor();
+ static TQCursor sizeAllCursor();
/**
* Returns a blank or invisible cursor (static function).
*/
- static QCursor blankCursor();
+ static TQCursor blankCursor();
/**
* Returns a WhatsThis cursor (static function).
*/
- static QCursor whatsThisCursor();
+ static TQCursor whatsThisCursor();
/**
* Sets auto-hiding the cursor for widget @p w. Enabling it will result in
@@ -153,10 +153,10 @@ public:
* mouseTracking.
*
* If you want to use auto-hiding for widgets that don't take focus, e.g.
- * a QCanvasView, then you have to pass all key-events that should trigger
+ * a TQCanvasView, then you have to pass all key-events that should trigger
* auto-hiding to autoHideEventFilter().
*/
- static void setAutoHideCursor( QWidget *w, bool enable );
+ static void setAutoHideCursor( TQWidget *w, bool enable );
/**
* Overloaded method for the case where you have an event-filter installed
@@ -167,7 +167,7 @@ public:
*
* @see autoHideEventFilter
*/
- static void setAutoHideCursor( QWidget *w, bool enable,
+ static void setAutoHideCursor( TQWidget *w, bool enable,
bool customEventFilter );
/**
@@ -201,7 +201,7 @@ public:
*
* [...]
*
- * bool YourClass::eventFilter( QObject *o, QEvent *e )
+ * bool YourClass::eventFilter( TQObject *o, TQEvent *e )
* {
* if ( o == edit ) // only that widget where you enabled auto-hide!
* KCursor::autoHideEventFilter( o, e );
@@ -214,10 +214,10 @@ public:
* Note that you must not call KCursor::autoHideEventFilter() when you
* didn't enable or after disabling auto-hiding.
*/
- static void autoHideEventFilter( QObject *, QEvent * );
+ static void autoHideEventFilter( TQObject *, TQEvent * );
private:
- static QCursor *s_handCursor;
+ static TQCursor *s_handCursor;
};
diff --git a/kdeui/kcursor_private.h b/kdeui/kcursor_private.h
index 0a85d0ec5..b1352bb6b 100644
--- a/kdeui/kcursor_private.h
+++ b/kdeui/kcursor_private.h
@@ -21,9 +21,9 @@
#ifndef KCURSOR_PRIVATE_H
#define KCURSOR_PRIVATE_H
-#include <qcursor.h>
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqcursor.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
class QPoint;
class QTimer;
@@ -41,10 +41,10 @@ class KCursorPrivateAutoHideEventFilter : public QObject
Q_OBJECT
public:
- KCursorPrivateAutoHideEventFilter( QWidget* widget );
+ KCursorPrivateAutoHideEventFilter( TQWidget* widget );
~KCursorPrivateAutoHideEventFilter();
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void resetWidget();
@@ -53,14 +53,14 @@ private slots:
void unhideCursor();
private:
- QWidget* actualWidget() const;
+ TQWidget* actualWidget() const;
- QTimer m_autoHideTimer;
- QWidget* m_widget;
+ TQTimer m_autoHideTimer;
+ TQWidget* m_widget;
bool m_wasMouseTracking;
bool m_isCursorHidden;
bool m_isOwnCursor;
- QCursor m_oldCursor;
+ TQCursor m_oldCursor;
};
/**
@@ -76,13 +76,13 @@ class KCursorPrivate : public QObject
public:
static KCursorPrivate *self();
- void setAutoHideCursor( QWidget *w, bool enable, bool customEventFilter );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ void setAutoHideCursor( TQWidget *w, bool enable, bool customEventFilter );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
int hideCursorDelay;
private slots:
- void slotWidgetDestroyed( QObject* );
+ void slotWidgetDestroyed( TQObject* );
private:
KCursorPrivate();
@@ -91,7 +91,7 @@ private:
bool enabled;
static KCursorPrivate *s_self;
- QPtrDict<KCursorPrivateAutoHideEventFilter> m_eventFilters;
+ TQPtrDict<KCursorPrivateAutoHideEventFilter> m_eventFilters;
};
diff --git a/kdeui/kdatepicker.cpp b/kdeui/kdatepicker.cpp
index ae9f97cb7..af9dede01 100644
--- a/kdeui/kdatepicker.cpp
+++ b/kdeui/kdatepicker.cpp
@@ -18,18 +18,18 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qframe.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qstyle.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qvalidator.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqstyle.h>
+#include <tqtoolbutton.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqvalidator.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
#include "kdatepicker.h"
#include <kglobal.h>
@@ -54,15 +54,15 @@ class KDatePicker::KDatePickerPrivate
public:
KDatePickerPrivate() : closeButton(0L), selectWeek(0L), todayButton(0), navigationLayout(0) {}
- void fillWeeksCombo(const QDate &date);
+ void fillWeeksCombo(const TQDate &date);
- QToolButton *closeButton;
- QComboBox *selectWeek;
- QToolButton *todayButton;
- QBoxLayout *navigationLayout;
+ TQToolButton *closeButton;
+ TQComboBox *selectWeek;
+ TQToolButton *todayButton;
+ TQBoxLayout *navigationLayout;
};
-void KDatePicker::fillWeeksCombo(const QDate &date)
+void KDatePicker::fillWeeksCombo(const TQDate &date)
{
// every year can have a different number of weeks
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -75,17 +75,17 @@ void KDatePicker::fillWeeksCombo(const QDate &date)
// We show all week numbers for all weeks between first day of year to last day of year
// This of course can be a list like 53,1,2..52
- QDate day;
+ TQDate day;
int year = calendar->year(date);
calendar->setYMD(day, year, 1, 1);
int lastMonth = calendar->monthsInYear(day);
- QDate lastDay, firstDayOfLastMonth;
+ TQDate lastDay, firstDayOfLastMonth;
calendar->setYMD(firstDayOfLastMonth, year, lastMonth, 1);
calendar->setYMD(lastDay, year, lastMonth, calendar->daysInMonth(firstDayOfLastMonth));
for (; day <= lastDay ; day = calendar->addDays(day, 7 /*calendar->daysOfWeek()*/) )
{
- QString week = i18n("Week %1").arg(calendar->weekNumber(day, &year));
+ TQString week = i18n("Week %1").arg(calendar->weekNumber(day, &year));
if ( year != calendar->year(day) ) week += "*"; // show that this is a week from a different year
d->selectWeek->insertItem(week);
@@ -96,53 +96,53 @@ void KDatePicker::fillWeeksCombo(const QDate &date)
}
}
-KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
- : QFrame(parent,name)
+KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name)
+ : TQFrame(parent,name)
{
init( dt );
}
-KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name, WFlags f)
- : QFrame(parent,name, f)
+KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name, WFlags f)
+ : TQFrame(parent,name, f)
{
init( dt );
}
-KDatePicker::KDatePicker( QWidget *parent, const char *name )
- : QFrame(parent,name)
+KDatePicker::KDatePicker( TQWidget *parent, const char *name )
+ : TQFrame(parent,name)
{
- init( QDate::currentDate() );
+ init( TQDate::currentDate() );
}
-void KDatePicker::init( const QDate &dt )
+void KDatePicker::init( const TQDate &dt )
{
d = new KDatePickerPrivate();
- QBoxLayout * topLayout = new QVBoxLayout(this);
+ TQBoxLayout * topLayout = new TQVBoxLayout(this);
- d->navigationLayout = new QHBoxLayout(topLayout);
+ d->navigationLayout = new TQHBoxLayout(topLayout);
d->navigationLayout->addStretch();
- yearBackward = new QToolButton(this);
+ yearBackward = new TQToolButton(this);
yearBackward->setAutoRaise(true);
d->navigationLayout->addWidget(yearBackward);
- monthBackward = new QToolButton(this);
+ monthBackward = new TQToolButton(this);
monthBackward ->setAutoRaise(true);
d->navigationLayout->addWidget(monthBackward);
d->navigationLayout->addSpacing(KDialog::spacingHint());
- selectMonth = new QToolButton(this);
+ selectMonth = new TQToolButton(this);
selectMonth ->setAutoRaise(true);
d->navigationLayout->addWidget(selectMonth);
- selectYear = new QToolButton(this);
+ selectYear = new TQToolButton(this);
selectYear->setToggleButton(true);
selectYear->setAutoRaise(true);
d->navigationLayout->addWidget(selectYear);
d->navigationLayout->addSpacing(KDialog::spacingHint());
- monthForward = new QToolButton(this);
+ monthForward = new TQToolButton(this);
monthForward ->setAutoRaise(true);
d->navigationLayout->addWidget(monthForward);
- yearForward = new QToolButton(this);
+ yearForward = new TQToolButton(this);
yearForward ->setAutoRaise(true);
d->navigationLayout->addWidget(yearForward);
d->navigationLayout->addStretch();
@@ -152,58 +152,58 @@ void KDatePicker::init( const QDate &dt )
table = new KDateTable(this);
fontsize = KGlobalSettings::generalFont().pointSize();
if (fontsize == -1)
- fontsize = QFontInfo(KGlobalSettings::generalFont()).pointSize();
+ fontsize = TQFontInfo(KGlobalSettings::generalFont()).pointSize();
fontsize++; // Make a little bigger
- d->selectWeek = new QComboBox(false, this); // read only week selection
- d->todayButton = new QToolButton(this);
+ d->selectWeek = new TQComboBox(false, this); // read only week selection
+ d->todayButton = new TQToolButton(this);
d->todayButton->setIconSet(SmallIconSet("today"));
- QToolTip::add(yearForward, i18n("Next year"));
- QToolTip::add(yearBackward, i18n("Previous year"));
- QToolTip::add(monthForward, i18n("Next month"));
- QToolTip::add(monthBackward, i18n("Previous month"));
- QToolTip::add(d->selectWeek, i18n("Select a week"));
- QToolTip::add(selectMonth, i18n("Select a month"));
- QToolTip::add(selectYear, i18n("Select a year"));
- QToolTip::add(d->todayButton, i18n("Select the current day"));
+ TQToolTip::add(yearForward, i18n("Next year"));
+ TQToolTip::add(yearBackward, i18n("Previous year"));
+ TQToolTip::add(monthForward, i18n("Next month"));
+ TQToolTip::add(monthBackward, i18n("Previous month"));
+ TQToolTip::add(d->selectWeek, i18n("Select a week"));
+ TQToolTip::add(selectMonth, i18n("Select a month"));
+ TQToolTip::add(selectYear, i18n("Select a year"));
+ TQToolTip::add(d->todayButton, i18n("Select the current day"));
// -----
setFontSize(fontsize);
line->setValidator(val);
line->installEventFilter( this );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
- yearForward->setIconSet(BarIconSet(QString::fromLatin1("2leftarrow")));
- yearBackward->setIconSet(BarIconSet(QString::fromLatin1("2rightarrow")));
- monthForward->setIconSet(BarIconSet(QString::fromLatin1("1leftarrow")));
- monthBackward->setIconSet(BarIconSet(QString::fromLatin1("1rightarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
}
else
{
- yearForward->setIconSet(BarIconSet(QString::fromLatin1("2rightarrow")));
- yearBackward->setIconSet(BarIconSet(QString::fromLatin1("2leftarrow")));
- monthForward->setIconSet(BarIconSet(QString::fromLatin1("1rightarrow")));
- monthBackward->setIconSet(BarIconSet(QString::fromLatin1("1leftarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
}
- connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate)));
- connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot()));
- connect(monthForward, SIGNAL(clicked()), SLOT(monthForwardClicked()));
- connect(monthBackward, SIGNAL(clicked()), SLOT(monthBackwardClicked()));
- connect(yearForward, SIGNAL(clicked()), SLOT(yearForwardClicked()));
- connect(yearBackward, SIGNAL(clicked()), SLOT(yearBackwardClicked()));
- connect(d->selectWeek, SIGNAL(activated(int)), SLOT(weekSelected(int)));
- connect(d->todayButton, SIGNAL(clicked()), SLOT(todayButtonClicked()));
- connect(selectMonth, SIGNAL(clicked()), SLOT(selectMonthClicked()));
- connect(selectYear, SIGNAL(toggled(bool)), SLOT(selectYearClicked()));
- connect(line, SIGNAL(returnPressed()), SLOT(lineEnterPressed()));
+ connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate)));
+ connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
+ connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked()));
+ connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked()));
+ connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked()));
+ connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked()));
+ connect(d->selectWeek, TQT_SIGNAL(activated(int)), TQT_SLOT(weekSelected(int)));
+ connect(d->todayButton, TQT_SIGNAL(clicked()), TQT_SLOT(todayButtonClicked()));
+ connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked()));
+ connect(selectYear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectYearClicked()));
+ connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed()));
table->setFocus();
topLayout->addWidget(table);
- QBoxLayout * bottomLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout * bottomLayout = new TQHBoxLayout(topLayout);
bottomLayout->addWidget(d->todayButton);
bottomLayout->addWidget(line);
bottomLayout->addWidget(d->selectWeek);
@@ -218,32 +218,32 @@ KDatePicker::~KDatePicker()
}
bool
-KDatePicker::eventFilter(QObject *o, QEvent *e )
+KDatePicker::eventFilter(TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = (QKeyEvent *)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = (TQKeyEvent *)e;
if ( (k->key() == Qt::Key_Prior) ||
(k->key() == Qt::Key_Next) ||
(k->key() == Qt::Key_Up) ||
(k->key() == Qt::Key_Down) )
{
- QApplication::sendEvent( table, e );
+ TQApplication::sendEvent( table, e );
table->setFocus();
return true; // eat event
}
}
- return QFrame::eventFilter( o, e );
+ return TQFrame::eventFilter( o, e );
}
void
-KDatePicker::resizeEvent(QResizeEvent* e)
+KDatePicker::resizeEvent(TQResizeEvent* e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
}
void
-KDatePicker::dateChangedSlot(QDate date)
+KDatePicker::dateChangedSlot(TQDate date)
{
kdDebug(298) << "KDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
@@ -254,7 +254,7 @@ KDatePicker::dateChangedSlot(QDate date)
fillWeeksCombo(date);
// calculate the item num in the week combo box; normalize selected day so as if 1.1. is the first day of the week
- QDate firstDay;
+ TQDate firstDay;
calendar->setYMD(firstDay, calendar->year(date), 1, 1);
d->selectWeek->setCurrentItem((calendar->dayOfYear(date) + calendar->dayOfWeek(firstDay) - 2) / 7/*calendar->daysInWeek()*/);
selectYear->setText(calendar->yearString(date, false));
@@ -270,20 +270,20 @@ KDatePicker::tableClickedSlot()
emit(tableClicked());
}
-const QDate&
+const TQDate&
KDatePicker::getDate() const
{
return table->getDate();
}
-const QDate &
+const TQDate &
KDatePicker::date() const
{
return table->getDate();
}
bool
-KDatePicker::setDate(const QDate& date)
+KDatePicker::setDate(const TQDate& date)
{
if(date.isValid())
{
@@ -300,7 +300,7 @@ KDatePicker::setDate(const QDate& date)
void
KDatePicker::monthForwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), 1 );
setDate( temp );
@@ -309,7 +309,7 @@ KDatePicker::monthForwardClicked()
void
KDatePicker::monthBackwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), -1 );
setDate( temp );
@@ -318,7 +318,7 @@ KDatePicker::monthBackwardClicked()
void
KDatePicker::yearForwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addYears( table->getDate(), 1 );
setDate( temp );
@@ -327,7 +327,7 @@ KDatePicker::yearForwardClicked()
void
KDatePicker::yearBackwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addYears( table->getDate(), -1 );
setDate( temp );
@@ -340,7 +340,7 @@ KDatePicker::weekSelected(int week)
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date = table->getDate();
+ TQDate date = table->getDate();
int year = calendar->year(date);
calendar->setYMD(date, year, 1, 1); // first day of selected year
@@ -356,17 +356,17 @@ KDatePicker::selectMonthClicked()
{
// every year can have different month names (in some calendar systems)
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date = table->getDate();
+ TQDate date = table->getDate();
int i, month, months = calendar->monthsInYear(date);
- QPopupMenu popup(selectMonth);
+ TQPopupMenu popup(selectMonth);
for (i = 1; i <= months; i++)
popup.insertItem(calendar->monthName(i, calendar->year(date)), i);
popup.setActiveItem(calendar->month(date) - 1);
- if ( (month = popup.exec(selectMonth->mapToGlobal(QPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
+ if ( (month = popup.exec(selectMonth->mapToGlobal(TQPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
int day = calendar->day(date);
// ----- construct a valid date in this month:
@@ -381,7 +381,7 @@ KDatePicker::selectYearClicked()
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if (selectYear->state() == QButton::Off)
+ if (selectYear->state() == TQButton::Off)
{
return;
}
@@ -394,11 +394,11 @@ KDatePicker::selectYearClicked()
picker->setYear( table->getDate().year() );
picker->selectAll();
popup->setMainWidget(picker);
- connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
+ connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
- if(popup->exec(selectYear->mapToGlobal(QPoint(0, selectMonth->height()))))
+ if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height()))))
{
- QDate date;
+ TQDate date;
int day;
// -----
year=picker->getYear();
@@ -416,7 +416,7 @@ KDatePicker::selectYearClicked()
}
delete popup;
- QTimer::singleShot(0, this, SLOT(ensureSelectYearIsUp()));
+ TQTimer::singleShot(0, this, TQT_SLOT(ensureSelectYearIsUp()));
}
void
@@ -431,7 +431,7 @@ KDatePicker::ensureSelectYearIsUp()
void
KDatePicker::setEnabled(bool enable)
{
- QWidget *widgets[]= {
+ TQWidget *widgets[]= {
yearForward, yearBackward, monthForward, monthBackward,
selectMonth, selectYear,
line, table, d->selectWeek, d->todayButton };
@@ -447,9 +447,9 @@ KDatePicker::setEnabled(bool enable)
void
KDatePicker::lineEnterPressed()
{
- QDate temp;
+ TQDate temp;
// -----
- if(val->date(line->text(), temp)==QValidator::Acceptable)
+ if(val->date(line->text(), temp)==TQValidator::Acceptable)
{
kdDebug(298) << "KDatePicker::lineEnterPressed: valid date entered." << endl;
emit(dateEntered(temp));
@@ -463,19 +463,19 @@ KDatePicker::lineEnterPressed()
void
KDatePicker::todayButtonClicked()
{
- setDate(QDate::currentDate());
+ setDate(TQDate::currentDate());
}
QSize
KDatePicker::sizeHint() const
{
- return QWidget::sizeHint();
+ return TQWidget::sizeHint();
}
void
KDatePicker::setFontSize(int s)
{
- QWidget *buttons[]= {
+ TQWidget *buttons[]= {
// yearBackward,
// monthBackward,
selectMonth,
@@ -485,8 +485,8 @@ KDatePicker::setFontSize(int s)
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
int count;
- QFont font;
- QRect r;
+ TQFont font;
+ TQRect r;
// -----
fontsize=s;
for(count=0; count<NoOfButtons; ++count)
@@ -495,11 +495,11 @@ KDatePicker::setFontSize(int s)
font.setPointSize(s);
buttons[count]->setFont(font);
}
- QFontMetrics metrics(selectMonth->fontMetrics());
+ TQFontMetrics metrics(selectMonth->fontMetrics());
for (int i = 1; ; ++i)
{
- QString str = KGlobal::locale()->calendar()->monthName(i,
+ TQString str = KGlobal::locale()->calendar()->monthName(i,
KGlobal::locale()->calendar()->year(table->getDate()), false);
if (str.isNull()) break;
r=metrics.boundingRect(str);
@@ -507,7 +507,7 @@ KDatePicker::setFontSize(int s)
maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
}
- QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton,
+ TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton,
selectMonth,
maxMonthRect);
selectMonth->setMinimumSize(metricBound);
@@ -522,14 +522,14 @@ KDatePicker::setCloseButton( bool enable )
return;
if ( enable ) {
- d->closeButton = new QToolButton( this );
+ d->closeButton = new TQToolButton( this );
d->closeButton->setAutoRaise(true);
d->navigationLayout->addSpacing(KDialog::spacingHint());
d->navigationLayout->addWidget(d->closeButton);
- QToolTip::add(d->closeButton, i18n("Close"));
+ TQToolTip::add(d->closeButton, i18n("Close"));
d->closeButton->setPixmap( SmallIcon("remove") );
- connect( d->closeButton, SIGNAL( clicked() ),
- topLevelWidget(), SLOT( close() ) );
+ connect( d->closeButton, TQT_SIGNAL( clicked() ),
+ topLevelWidget(), TQT_SLOT( close() ) );
}
else {
delete d->closeButton;
diff --git a/kdeui/kdatepicker.h b/kdeui/kdatepicker.h
index 414fb0ab9..b1f2d5225 100644
--- a/kdeui/kdatepicker.h
+++ b/kdeui/kdatepicker.h
@@ -19,8 +19,8 @@
*/
#ifndef KDATEPICKER_H
#define KDATEPICKER_H
-#include <qdatetime.h>
-#include <qframe.h>
+#include <tqdatetime.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
class QLineEdit;
@@ -51,7 +51,7 @@ class KDateTable;
class KDEUI_EXPORT KDatePicker: public QFrame
{
Q_OBJECT
- Q_PROPERTY( QDate date READ date WRITE setDate)
+ Q_PROPERTY( TQDate date READ date WRITE setDate)
Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton )
Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
@@ -59,16 +59,16 @@ public:
/** The usual constructor. The given date will be displayed
* initially.
**/
- KDatePicker(QWidget *parent=0,
- QDate=QDate::currentDate(),
+ KDatePicker(TQWidget *parent=0,
+ QDate=TQDate::currentDate(),
const char *name=0);
/** The usual constructor. The given date will be displayed
* initially.
* @since 3.1
**/
- KDatePicker(QWidget *parent,
- QDate,
+ KDatePicker(TQWidget *parent,
+ TQDate,
const char *name,
WFlags f); // ### KDE 4.0: Merge
@@ -77,7 +77,7 @@ public:
* current date.
* @since 3.1
*/
- KDatePicker( QWidget *parent, const char *name );
+ KDatePicker( TQWidget *parent, const char *name );
/**
* The destructor.
@@ -90,7 +90,7 @@ public:
* size hint, try adding 28 to each of the reported numbers of
* pixels.
**/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* Sets the date.
@@ -98,18 +98,18 @@ public:
* @returns @p false and does not change anything
* if the date given is invalid.
**/
- bool setDate(const QDate&);
+ bool setDate(const TQDate&);
/**
* Returns the selected date.
* @deprecated
**/
- const QDate& getDate() const KDE_DEPRECATED;
+ const TQDate& getDate() const KDE_DEPRECATED;
/**
* @returns the selected date.
*/
- const QDate &date() const;
+ const TQDate &date() const;
/**
* Enables or disables the widget.
@@ -152,34 +152,34 @@ public:
bool hasCloseButton() const;
protected:
- /// to catch move keyEvents when QLineEdit has keyFocus
- virtual bool eventFilter(QObject *o, QEvent *e );
+ /// to catch move keyEvents when TQLineEdit has keyFocus
+ virtual bool eventFilter(TQObject *o, TQEvent *e );
/// the resize event
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/// the year forward button
- QToolButton *yearForward;
+ TQToolButton *yearForward;
/// the year backward button
- QToolButton *yearBackward;
+ TQToolButton *yearBackward;
/// the month forward button
- QToolButton *monthForward;
+ TQToolButton *monthForward;
/// the month backward button
- QToolButton *monthBackward;
+ TQToolButton *monthBackward;
/// the button for selecting the month directly
- QToolButton *selectMonth;
+ TQToolButton *selectMonth;
/// the button for selecting the year directly
- QToolButton *selectYear;
+ TQToolButton *selectYear;
/// the line edit to enter the date directly
- QLineEdit *line;
+ TQLineEdit *line;
/// the validator for the line edit:
KDateValidator *val;
/// the date table
KDateTable *table;
/// the size calculated during resize events
- // QSize sizehint;
+ // TQSize sizehint;
/// the widest month string in pixels:
- QSize maxMonthRect;
+ TQSize maxMonthRect;
protected slots:
- void dateChangedSlot(QDate);
+ void dateChangedSlot(TQDate);
void tableClickedSlot();
void monthForwardClicked();
void monthBackwardClicked();
@@ -212,7 +212,7 @@ protected slots:
void weekSelected(int);
signals:
- // ### KDE 4.0 Make all QDate parameters const references
+ // ### KDE 4.0 Make all TQDate parameters const references
/** This signal is emitted each time the selected date is changed.
* Usually, this does not mean that the date has been entered,
@@ -220,19 +220,19 @@ signals:
* selected.
* @see dateSelected
*/
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/** This signal is emitted each time a day has been selected by
* clicking on the table (hitting a day in the current month). It
* has the same meaning as dateSelected() in older versions of
* KDatePicker.
*/
- void dateSelected(QDate);
+ void dateSelected(TQDate);
/** This signal is emitted when enter is pressed and a VALID date
* has been entered before into the line edit. Connect to both
* dateEntered() and dateSelected() to receive all events where the
* user really enters a date.
*/
- void dateEntered(QDate);
+ void dateEntered(TQDate);
/** This signal is emitted when the day has been selected by
* clicking on it in the table.
*/
@@ -248,8 +248,8 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
private:
- void init( const QDate &dt );
- void fillWeeksCombo(const QDate &date);
+ void init( const TQDate &dt );
+ void fillWeeksCombo(const TQDate &date);
class KDatePickerPrivate;
KDatePickerPrivate *d;
};
diff --git a/kdeui/kdatetbl.cpp b/kdeui/kdatetbl.cpp
index 89d73ed7a..bbf673a15 100644
--- a/kdeui/kdatetbl.cpp
+++ b/kdeui/kdatetbl.cpp
@@ -30,7 +30,7 @@
// be used as a standalone.
//
// When a date is selected by the user, it emits a signal:
-// dateSelected(QDate)
+// dateSelected(TQDate)
#include <kconfig.h>
#include <kglobal.h>
@@ -46,13 +46,13 @@
#include "kdatepicker.h"
#include "kdatetbl.h"
#include "kpopupmenu.h"
-#include <qdatetime.h>
-#include <qguardedptr.h>
-#include <qstring.h>
-#include <qpen.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqguardedptr.h>
+#include <tqstring.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqdict.h>
#include <assert.h>
@@ -74,32 +74,32 @@ public:
struct DatePaintingMode
{
- QColor fgColor;
- QColor bgColor;
+ TQColor fgColor;
+ TQColor bgColor;
BackgroundMode bgMode;
};
- QDict <DatePaintingMode> customPaintingModes;
+ TQDict <DatePaintingMode> customPaintingModes;
};
-KDateValidator::KDateValidator(QWidget* parent, const char* name)
- : QValidator(parent, name)
+KDateValidator::KDateValidator(TQWidget* parent, const char* name)
+ : TQValidator(parent, name)
{
}
-QValidator::State
-KDateValidator::validate(QString& text, int&) const
+TQValidator::State
+KDateValidator::validate(TQString& text, int&) const
{
- QDate temp;
+ TQDate temp;
// ----- everything is tested in date():
return date(text, temp);
}
-QValidator::State
-KDateValidator::date(const QString& text, QDate& d) const
+TQValidator::State
+KDateValidator::date(const TQString& text, TQDate& d) const
{
- QDate tmp = KGlobal::locale()->readDate(text);
+ TQDate tmp = KGlobal::locale()->readDate(text);
if (!tmp.isNull())
{
d = tmp;
@@ -109,22 +109,22 @@ KDateValidator::date(const QString& text, QDate& d) const
}
void
-KDateValidator::fixup( QString& ) const
+KDateValidator::fixup( TQString& ) const
{
}
-KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
- : QGridView(parent, name, (f | WNoAutoErase))
+KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags f)
+ : TQGridView(parent, name, (f | WNoAutoErase))
{
d = new KDateTablePrivate;
setFontSize(10);
if(!date_.isValid())
{
kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
- date_=QDate::currentDate();
+ date_=TQDate::currentDate();
}
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
@@ -135,18 +135,18 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
initAccels();
}
-KDateTable::KDateTable(QWidget *parent, const char* name, WFlags f)
- : QGridView(parent, name, (f | WNoAutoErase))
+KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f)
+ : TQGridView(parent, name, (f | WNoAutoErase))
{
d = new KDateTablePrivate;
setFontSize(10);
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
viewport()->setEraseColor(KGlobalSettings::baseColor());
- setDate(QDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
+ setDate(TQDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
initAccels();
}
@@ -158,16 +158,16 @@ KDateTable::~KDateTable()
void KDateTable::initAccels()
{
KAccel* accel = new KAccel(this, "date table accel");
- accel->insert(KStdAccel::Next, this, SLOT(nextMonth()));
- accel->insert(KStdAccel::Prior, this, SLOT(previousMonth()));
- accel->insert(KStdAccel::Home, this, SLOT(beginningOfMonth()));
- accel->insert(KStdAccel::End, this, SLOT(endOfMonth()));
- accel->insert(KStdAccel::BeginningOfLine, this, SLOT(beginningOfWeek()));
- accel->insert(KStdAccel::EndOfLine, this, SLOT(endOfWeek()));
+ accel->insert(KStdAccel::Next, this, TQT_SLOT(nextMonth()));
+ accel->insert(KStdAccel::Prior, this, TQT_SLOT(previousMonth()));
+ accel->insert(KStdAccel::Home, this, TQT_SLOT(beginningOfMonth()));
+ accel->insert(KStdAccel::End, this, TQT_SLOT(endOfMonth()));
+ accel->insert(KStdAccel::BeginningOfLine, this, TQT_SLOT(beginningOfWeek()));
+ accel->insert(KStdAccel::EndOfLine, this, TQT_SLOT(endOfWeek()));
accel->readSettings();
}
-int KDateTable::posFromDate( const QDate &dt )
+int KDateTable::posFromDate( const TQDate &dt )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
const int firstWeekDay = KGlobal::locale()->weekStartDay();
@@ -179,9 +179,9 @@ int KDateTable::posFromDate( const QDate &dt )
return pos + offset;
}
-QDate KDateTable::dateFromPos( int pos )
+TQDate KDateTable::dateFromPos( int pos )
{
- QDate pCellDate;
+ TQDate pCellDate;
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
calendar->setYMD(pCellDate, calendar->year(date), calendar->month(date), 1);
@@ -195,13 +195,13 @@ QDate KDateTable::dateFromPos( int pos )
}
void
-KDateTable::paintEmptyArea(QPainter *paint, int, int, int, int)
+KDateTable::paintEmptyArea(TQPainter *paint, int, int, int, int)
{
// Erase the unused areas on the right and bottom.
- QRect unusedRight = frameRect();
+ TQRect unusedRight = frameRect();
unusedRight.setLeft(gridSize().width());
- QRect unusedBottom = frameRect();
+ TQRect unusedBottom = frameRect();
unusedBottom.setTop(gridSize().height());
paint->eraseRect(unusedRight);
@@ -209,16 +209,16 @@ KDateTable::paintEmptyArea(QPainter *paint, int, int, int, int)
}
void
-KDateTable::paintCell(QPainter *painter, int row, int col)
+KDateTable::paintCell(TQPainter *painter, int row, int col)
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QRect rect;
- QString text;
- QPen pen;
+ TQRect rect;
+ TQString text;
+ TQPen pen;
int w=cellWidth();
int h=cellHeight();
- QFont font=KGlobalSettings::generalFont();
+ TQFont font=KGlobalSettings::generalFont();
// -----
if(row == 0)
@@ -233,9 +233,9 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
( daynum == 6 && calendar->calendarName() == "gregorian" ) )
normalday=false;
- QBrush brushInvertTitle(colorGroup().base());
- QColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
- QColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
+ TQBrush brushInvertTitle(colorGroup().base());
+ TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
+ TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
if (!normalday)
{
painter->setPen(textColor);
@@ -259,7 +259,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
painter->setFont(font);
int pos=7*(row-1)+col;
- QDate pCellDate = dateFromPos( pos );
+ TQDate pCellDate = dateFromPos( pos );
// First day of month
text = calendar->dayString(pCellDate, true);
if( calendar->month(pCellDate) != calendar->month(date) )
@@ -277,7 +277,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
{
if (mode->bgMode != NoBgMode)
{
- QBrush oldbrush=painter->brush();
+ TQBrush oldbrush=painter->brush();
painter->setBrush( mode->bgColor );
switch(mode->bgMode)
{
@@ -324,7 +324,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
// painter->setPen(colorGroup().base());
}
- if ( pCellDate == QDate::currentDate() )
+ if ( pCellDate == TQDate::currentDate() )
{
painter->setPen(colorGroup().text());
}
@@ -370,7 +370,7 @@ void KDateTable::endOfWeek()
}
void
-KDateTable::keyPressEvent( QKeyEvent *e )
+KDateTable::keyPressEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Up:
@@ -392,7 +392,7 @@ KDateTable::keyPressEvent( QKeyEvent *e )
setDate(date.addDays(1));
break;
case Key_N:
- setDate(QDate::currentDate());
+ setDate(TQDate::currentDate());
break;
case Key_Return:
case Key_Enter:
@@ -412,9 +412,9 @@ KDateTable::keyPressEvent( QKeyEvent *e )
}
void
-KDateTable::viewportResizeEvent(QResizeEvent * e)
+KDateTable::viewportResizeEvent(TQResizeEvent * e)
{
- QGridView::viewportResizeEvent(e);
+ TQGridView::viewportResizeEvent(e);
setCellWidth(viewport()->width()/7);
setCellHeight(viewport()->height()/7);
@@ -424,8 +424,8 @@ void
KDateTable::setFontSize(int size)
{
int count;
- QFontMetrics metrics(fontMetrics());
- QRect rect;
+ TQFontMetrics metrics(fontMetrics());
+ TQRect rect;
// ----- store rectangles:
fontsize=size;
// ----- find largest day name:
@@ -439,23 +439,23 @@ KDateTable::setFontSize(int size)
maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
}
// ----- compare with a real wide number and add some space:
- rect=metrics.boundingRect(QString::fromLatin1("88"));
+ rect=metrics.boundingRect(TQString::fromLatin1("88"));
maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
}
void
-KDateTable::wheelEvent ( QWheelEvent * e )
+KDateTable::wheelEvent ( TQWheelEvent * e )
{
setDate(date.addMonths( -(int)(e->delta()/120)) );
e->accept();
}
void
-KDateTable::contentsMousePressEvent(QMouseEvent *e)
+KDateTable::contentsMousePressEvent(TQMouseEvent *e)
{
- if(e->type()!=QEvent::MouseButtonPress)
+ if(e->type()!=TQEvent::MouseButtonPress)
{ // the KDatePicker only reacts on mouse press events:
return;
}
@@ -467,7 +467,7 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
// -----
int row, col, pos, temp;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -484,7 +484,7 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
temp = posFromDate( date );
// new position and date
pos = (7 * (row - 1)) + col;
- QDate clickedDate = dateFromPos( pos );
+ TQDate clickedDate = dateFromPos( pos );
// set the new date. If it is in the previous or next month, the month will
// automatically be changed, no need to do that manually...
@@ -507,10 +507,10 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
}
bool
-KDateTable::setDate(const QDate& date_)
+KDateTable::setDate(const TQDate& date_)
{
bool changed=false;
- QDate temp;
+ TQDate temp;
// -----
if(!date_.isValid())
{
@@ -541,23 +541,23 @@ KDateTable::setDate(const QDate& date_)
return true;
}
-const QDate&
+const TQDate&
KDateTable::getDate() const
{
return date;
}
// what are those repaintContents() good for? (pfeiffer)
-void KDateTable::focusInEvent( QFocusEvent *e )
+void KDateTable::focusInEvent( TQFocusEvent *e )
{
// repaintContents(false);
- QGridView::focusInEvent( e );
+ TQGridView::focusInEvent( e );
}
-void KDateTable::focusOutEvent( QFocusEvent *e )
+void KDateTable::focusOutEvent( TQFocusEvent *e )
{
// repaintContents(false);
- QGridView::focusOutEvent( e );
+ TQGridView::focusOutEvent( e );
}
QSize
@@ -565,11 +565,11 @@ KDateTable::sizeHint() const
{
if(maxCell.height()>0 && maxCell.width()>0)
{
- return QSize(maxCell.width()*numCols()+2*frameWidth(),
+ return TQSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
kdDebug() << "KDateTable::sizeHint: obscure failure - " << endl;
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
}
@@ -583,7 +583,7 @@ bool KDateTable::popupMenuEnabled() const
return d->popupMenuEnabled;
}
-void KDateTable::setCustomDatePainting(const QDate &date, const QColor &fgColor, BackgroundMode bgMode, const QColor &bgColor)
+void KDateTable::setCustomDatePainting(const TQDate &date, const TQColor &fgColor, BackgroundMode bgMode, const TQColor &bgColor)
{
if (!fgColor.isValid())
{
@@ -601,24 +601,24 @@ void KDateTable::setCustomDatePainting(const QDate &date, const QColor &fgColor,
update();
}
-void KDateTable::unsetCustomDatePainting( const QDate &date )
+void KDateTable::unsetCustomDatePainting( const TQDate &date )
{
d->customPaintingModes.remove( date.toString() );
}
KDateInternalWeekSelector::KDateInternalWeekSelector
-(QWidget* parent, const char* name)
- : QLineEdit(parent, name),
- val(new QIntValidator(this)),
+(TQWidget* parent, const char* name)
+ : TQLineEdit(parent, name),
+ val(new TQIntValidator(this)),
result(0)
{
- QFont font;
+ TQFont font;
// -----
font=KGlobalSettings::generalFont();
setFont(font);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
setValidator(val);
- connect(this, SIGNAL(returnPressed()), SLOT(weekEnteredSlot()));
+ connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(weekEnteredSlot()));
}
void
@@ -647,7 +647,7 @@ KDateInternalWeekSelector::getWeek()
void
KDateInternalWeekSelector::setWeek(int week)
{
- QString temp;
+ TQString temp;
// -----
temp.setNum(week);
setText(temp);
@@ -677,12 +677,12 @@ KDateInternalMonthPicker::~KDateInternalMonthPicker() {
}
KDateInternalMonthPicker::KDateInternalMonthPicker
-(const QDate & date, QWidget* parent, const char* name)
- : QGridView(parent, name),
+(const TQDate & date, TQWidget* parent, const char* name)
+ : TQGridView(parent, name),
result(0) // invalid
{
- QRect rect;
- QFont font;
+ TQRect rect;
+ TQFont font;
// -----
activeCol = -1;
activeRow = -1;
@@ -690,7 +690,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
setNumCols(3);
d = new KDateInternalMonthPrivate(date.year(), date.month(), date.day());
// For monthsInYear != 12
@@ -700,10 +700,10 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker
// ----- find the preferred size
// (this is slow, possibly, but unfortunately it is needed here):
- QFontMetrics metrics(font);
+ TQFontMetrics metrics(font);
for(int i = 1; ; ++i)
{
- QString str = KGlobal::locale()->calendar()->monthName(i,
+ TQString str = KGlobal::locale()->calendar()->monthName(i,
KGlobal::locale()->calendar()->year(date), false);
if (str.isNull()) break;
rect=metrics.boundingRect(str);
@@ -715,7 +715,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
QSize
KDateInternalMonthPicker::sizeHint() const
{
- return QSize((max.width()+6)*numCols()+2*frameWidth(),
+ return TQSize((max.width()+6)*numCols()+2*frameWidth(),
(max.height()+6)*numRows()+2*frameWidth());
}
@@ -726,27 +726,27 @@ KDateInternalMonthPicker::getResult() const
}
void
-KDateInternalMonthPicker::setupPainter(QPainter *p)
+KDateInternalMonthPicker::setupPainter(TQPainter *p)
{
p->setPen(KGlobalSettings::textColor());
}
void
-KDateInternalMonthPicker::viewportResizeEvent(QResizeEvent*)
+KDateInternalMonthPicker::viewportResizeEvent(TQResizeEvent*)
{
setCellWidth(width() / numCols());
setCellHeight(height() / numRows());
}
void
-KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
+KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
{
int index;
- QString text;
+ TQString text;
// ----- find the number of the cell:
index=3*row+col+1;
text=KGlobal::locale()->calendar()->monthName(index,
- KGlobal::locale()->calendar()->year(QDate(d->year, d->month,
+ KGlobal::locale()->calendar()->year(TQDate(d->year, d->month,
d->day)), false);
painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
if ( activeCol == col && activeRow == row )
@@ -754,7 +754,7 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
}
void
-KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e)
{
if(!isEnabled() || e->button() != LeftButton)
{
@@ -763,7 +763,7 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
}
// -----
int row, col;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -781,12 +781,12 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
}
void
-KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e)
{
if (e->state() & LeftButton)
{
int row, col;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -821,7 +821,7 @@ KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
}
void
-KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if(!isEnabled())
{
@@ -829,7 +829,7 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
}
// -----
int row, col, pos;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -848,20 +848,20 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
KDateInternalYearSelector::KDateInternalYearSelector
-(QWidget* parent, const char* name)
- : QLineEdit(parent, name),
- val(new QIntValidator(this)),
+(TQWidget* parent, const char* name)
+ : TQLineEdit(parent, name),
+ val(new TQIntValidator(this)),
result(0)
{
- QFont font;
+ TQFont font;
// -----
font=KGlobalSettings::generalFont();
setFont(font);
- setFrameStyle(QFrame::NoFrame);
- // we have to respect the limits of QDate here, I fear:
+ setFrameStyle(TQFrame::NoFrame);
+ // we have to respect the limits of TQDate here, I fear:
val->setRange(0, 8000);
setValidator(val);
- connect(this, SIGNAL(returnPressed()), SLOT(yearEnteredSlot()));
+ connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(yearEnteredSlot()));
}
void
@@ -869,7 +869,7 @@ KDateInternalYearSelector::yearEnteredSlot()
{
bool ok;
int year;
- QDate date;
+ TQDate date;
// ----- check if this is a valid year:
year=text().toInt(&ok);
if(!ok)
@@ -899,7 +899,7 @@ KDateInternalYearSelector::getYear()
void
KDateInternalYearSelector::setYear(int year)
{
- QString temp;
+ TQString temp;
// -----
temp.setNum(year);
setText(temp);
@@ -913,13 +913,13 @@ class KPopupFrame::KPopupFramePrivate
bool exec;
};
-KPopupFrame::KPopupFrame(QWidget* parent, const char* name)
- : QFrame(parent, name, WType_Popup),
+KPopupFrame::KPopupFrame(TQWidget* parent, const char* name)
+ : TQFrame(parent, name, WType_Popup),
result(0), // rejected
main(0),
d(new KPopupFramePrivate)
{
- setFrameStyle(QFrame::Box|QFrame::Raised);
+ setFrameStyle(TQFrame::Box|TQFrame::Raised);
setMidLineWidth(2);
}
@@ -929,7 +929,7 @@ KPopupFrame::~KPopupFrame()
}
void
-KPopupFrame::keyPressEvent(QKeyEvent* e)
+KPopupFrame::keyPressEvent(TQKeyEvent* e)
{
if(e->key()==Key_Escape)
{
@@ -950,7 +950,7 @@ KPopupFrame::close(int r)
void
KPopupFrame::hide()
{
- QFrame::hide();
+ TQFrame::hide();
if (d->exec)
{
d->exec = false;
@@ -959,7 +959,7 @@ KPopupFrame::hide()
}
void
-KPopupFrame::setMainWidget(QWidget* m)
+KPopupFrame::setMainWidget(TQWidget* m)
{
main=m;
if(main)
@@ -969,7 +969,7 @@ KPopupFrame::setMainWidget(QWidget* m)
}
void
-KPopupFrame::resizeEvent(QResizeEvent*)
+KPopupFrame::resizeEvent(TQResizeEvent*)
{
if(main)
{
@@ -979,10 +979,10 @@ KPopupFrame::resizeEvent(QResizeEvent*)
}
void
-KPopupFrame::popup(const QPoint &pos)
+KPopupFrame::popup(const TQPoint &pos)
{
// Make sure the whole popup is visible.
- QRect d = KGlobalSettings::desktopGeometry(pos);
+ TQRect d = KGlobalSettings::desktopGeometry(pos);
int x = pos.x();
int y = pos.y();
@@ -1003,15 +1003,15 @@ KPopupFrame::popup(const QPoint &pos)
}
int
-KPopupFrame::exec(QPoint pos)
+KPopupFrame::exec(TQPoint pos)
{
popup(pos);
repaint();
d->exec = true;
- const QGuardedPtr<QObject> that = this;
+ const TQGuardedPtr<TQObject> that = this;
qApp->enter_loop();
if ( !that )
- return QDialog::Rejected;
+ return TQDialog::Rejected;
hide();
return result;
}
@@ -1019,7 +1019,7 @@ KPopupFrame::exec(QPoint pos)
int
KPopupFrame::exec(int x, int y)
{
- return exec(QPoint(x, y));
+ return exec(TQPoint(x, y));
}
void KPopupFrame::virtual_hook( int, void* )
diff --git a/kdeui/kdatetbl.h b/kdeui/kdatetbl.h
index c29c9d3e1..8827c0a00 100644
--- a/kdeui/kdatetbl.h
+++ b/kdeui/kdatetbl.h
@@ -22,11 +22,11 @@
// KDE4: rename this file to kdatetable.h
-#include <qvalidator.h>
-#include <qgridview.h>
-#include <qlineedit.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqvalidator.h>
+#include <tqgridview.h>
+#include <tqlineedit.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KDEUI_EXPORT KDateInternalWeekSelector : public QLineEdit
{
Q_OBJECT
protected:
- QIntValidator *val;
+ TQIntValidator *val;
int result;
public slots:
void weekEnteredSlot();
@@ -49,7 +49,7 @@ public slots:
signals:
void closeMe(int);
public:
- KDateInternalWeekSelector( QWidget* parent=0, const char* name=0);
+ KDateInternalWeekSelector( TQWidget* parent=0, const char* name=0);
int getWeek();
void setWeek(int week);
@@ -80,7 +80,7 @@ protected:
/**
* Contains the largest rectangle needed by the month names.
*/
- QRect max;
+ TQRect max;
signals:
/**
* This is send from the mouse click event handler.
@@ -90,7 +90,7 @@ public:
/**
* The constructor.
*/
- KDateInternalMonthPicker(const QDate& date, QWidget* parent, const char* name=0);
+ KDateInternalMonthPicker(const TQDate& date, TQWidget* parent, const char* name=0);
/**
* The destructor.
*/
@@ -98,7 +98,7 @@ public:
/**
* The size hint.
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* Return the result. 0 means no selection (reject()), 1..12 are the
* months.
@@ -108,24 +108,24 @@ protected:
/**
* Set up the painter.
*/
- void setupPainter(QPainter *p);
+ void setupPainter(TQPainter *p);
/**
* The resize event.
*/
- virtual void viewportResizeEvent(QResizeEvent*);
+ virtual void viewportResizeEvent(TQResizeEvent*);
/**
* Paint a cell. This simply draws the month names in it.
*/
- virtual void paintCell(QPainter* painter, int row, int col);
+ virtual void paintCell(TQPainter* painter, int row, int col);
/**
* Catch mouse click and move events to paint a rectangle around the item.
*/
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void contentsMouseMoveEvent(QMouseEvent *e);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent *e);
/**
* Emit monthSelected(int) when a cell has been released.
*/
- virtual void contentsMouseReleaseEvent(QMouseEvent *e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
private:
class KDateInternalMonthPrivate;
@@ -141,14 +141,14 @@ class KDEUI_EXPORT KDateInternalYearSelector : public QLineEdit
{
Q_OBJECT
protected:
- QIntValidator *val;
+ TQIntValidator *val;
int result;
public slots:
void yearEnteredSlot();
signals:
void closeMe(int);
public:
- KDateInternalYearSelector( QWidget* parent=0, const char* name=0);
+ KDateInternalYearSelector( TQWidget* parent=0, const char* name=0);
int getYear();
void setYear(int year);
@@ -174,11 +174,11 @@ protected:
/**
* Catch key press events.
*/
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
/**
* The only subwidget that uses the whole dialog window.
*/
- QWidget *main;
+ TQWidget *main;
public slots:
/**
* Close the popup window. This is called from the main widget, usually.
@@ -194,7 +194,7 @@ public:
/**
* The contructor. Creates a dialog without buttons.
*/
- KPopupFrame(QWidget* parent=0, const char* name=0);
+ KPopupFrame(TQWidget* parent=0, const char* name=0);
/**
* The destructor.
*/
@@ -206,20 +206,20 @@ public:
* set the main widgets correct size before setting it as the main
* widget.
*/
- void setMainWidget(QWidget* m);
+ void setMainWidget(TQWidget* m);
/**
* The resize event. Simply resizes the main widget to the whole
* widgets client size.
*/
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/**
* Open the popup window at position pos.
*/
- void popup(const QPoint &pos);
+ void popup(const TQPoint &pos);
/**
* Execute the popup window.
*/
- int exec(QPoint p); // KDE4: const QPoint&
+ int exec(TQPoint p); // KDE4: const TQPoint&
/**
* Execute the popup window.
*/
@@ -227,7 +227,7 @@ public:
private:
- virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); }
+ virtual bool close(bool alsoDelete) { return TQFrame::close(alsoDelete); }
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -241,10 +241,10 @@ private:
class KDEUI_EXPORT KDateValidator : public QValidator
{
public:
- KDateValidator(QWidget* parent=0, const char* name=0);
- virtual State validate(QString&, int&) const;
- virtual void fixup ( QString & input ) const;
- State date(const QString&, QDate&) const;
+ KDateValidator(TQWidget* parent=0, const char* name=0);
+ virtual State validate(TQString&, int&) const;
+ virtual void fixup ( TQString & input ) const;
+ State date(const TQString&, TQDate&) const;
};
/**
@@ -254,7 +254,7 @@ public:
* be used as a standalone.
*
* When a date is selected by the user, it emits a signal:
- * dateSelected(QDate)
+ * dateSelected(TQDate)
*
* @internal
* @version $Id$
@@ -263,21 +263,21 @@ public:
class KDEUI_EXPORT KDateTable : public QGridView
{
Q_OBJECT
- Q_PROPERTY( QDate date READ getDate WRITE setDate )
+ Q_PROPERTY( TQDate date READ getDate WRITE setDate )
Q_PROPERTY( bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled )
public:
/**
* The constructor.
*/
- KDateTable(QWidget *parent=0, QDate date=QDate::currentDate(),
+ KDateTable(TQWidget *parent=0, TQDate date=TQDate::currentDate(),
const char* name=0, WFlags f=0);
/**
* The constructor.
* @since 3.4
*/
- KDateTable(QWidget *parent, const char* name, WFlags f=0);
+ KDateTable(TQWidget *parent, const char* name, WFlags f=0);
/**
* The destructor.
@@ -291,7 +291,7 @@ public:
* to be done there anyway. The size is stored in maxCell. The
* sizeHint() simply returns a multiple of maxCell.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Set the font size of the date table.
*/
@@ -299,9 +299,9 @@ public:
/**
* Select and display this date.
*/
- bool setDate(const QDate&);
+ bool setDate(const TQDate&);
// ### KDE 4.0 rename to date()
- const QDate& getDate() const;
+ const TQDate& getDate() const;
/**
* Enables a popup menu when right clicking on a date.
@@ -326,48 +326,48 @@ public:
*
* @since 3.2
*/
- void setCustomDatePainting( const QDate &date, const QColor &fgColor, BackgroundMode bgMode=NoBgMode, const QColor &bgColor=QColor());
+ void setCustomDatePainting( const TQDate &date, const TQColor &fgColor, BackgroundMode bgMode=NoBgMode, const TQColor &bgColor=TQColor());
/**
* Unsets the custom painting of a date so that the date is painted as usual.
*
* @since 3.2
*/
- void unsetCustomDatePainting( const QDate &date );
+ void unsetCustomDatePainting( const TQDate &date );
protected:
/**
* calculate the position of the cell in the matrix for the given date. The result is the 0-based index.
*/
- int posFromDate( const QDate &date ); // KDE4: make this virtual, so subclasses can reimplement this and use a different default for the start of the matrix
+ int posFromDate( const TQDate &date ); // KDE4: make this virtual, so subclasses can reimplement this and use a different default for the start of the matrix
/**
* calculate the date that is displayed at a given cell in the matrix. pos is the
* 0-based index in the matrix. Inverse function to posForDate().
*/
- QDate dateFromPos( int pos ); // KDE4: make this virtual
+ TQDate dateFromPos( int pos ); // KDE4: make this virtual
/**
* Paint a cell.
*/
- virtual void paintCell(QPainter*, int, int);
+ virtual void paintCell(TQPainter*, int, int);
/**
* Paint the empty area (background).
*/
- virtual void paintEmptyArea(QPainter*, int, int, int, int);
+ virtual void paintEmptyArea(TQPainter*, int, int, int, int);
/**
* Handle the resize events.
*/
- virtual void viewportResizeEvent(QResizeEvent *);
+ virtual void viewportResizeEvent(TQResizeEvent *);
/**
* React on mouse clicks that select a date.
*/
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void wheelEvent( QWheelEvent * e );
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void focusInEvent( QFocusEvent *e );
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void wheelEvent( TQWheelEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
// ### KDE 4.0 make the following private and mark as members
@@ -378,7 +378,7 @@ protected:
/**
* The currently selected date.
*/
- QDate date;
+ TQDate date;
/**
* The day of the first day in the month [1..7].
*/
@@ -399,20 +399,20 @@ protected:
/**
* Save the size of the largest used cell content.
*/
- QRect maxCell;
+ TQRect maxCell;
signals:
/**
* The selected date changed.
*/
// ### KDE 4.0 make parameter a const reference
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/**
* This function behaves essentially like the one above.
* The selected date changed.
* @param cur The current date
* @param old The date before the date was changed
*/
- void dateChanged(const QDate& cur, const QDate& old);
+ void dateChanged(const TQDate& cur, const TQDate& old);
/**
* A date has been selected by clicking on the table.
*/
@@ -425,7 +425,7 @@ signals:
*
* @since 3.2
*/
- void aboutToShowContextMenu( KPopupMenu * menu, const QDate &date);
+ void aboutToShowContextMenu( KPopupMenu * menu, const TQDate &date);
private slots:
void nextMonth();
diff --git a/kdeui/kdatetimewidget.cpp b/kdeui/kdatetimewidget.cpp
index c696a4fcb..76d92edd2 100644
--- a/kdeui/kdatetimewidget.cpp
+++ b/kdeui/kdatetimewidget.cpp
@@ -1,4 +1,4 @@
-#include <qlayout.h>
+#include <tqlayout.h>
#include "kdatewidget.h"
#include "kdebug.h"
@@ -14,15 +14,15 @@ public:
KTimeWidget * timeWidget;
};
-KDateTimeWidget::KDateTimeWidget(QWidget * parent, const char * name)
- : QWidget(parent, name)
+KDateTimeWidget::KDateTimeWidget(TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
}
-KDateTimeWidget::KDateTimeWidget(const QDateTime & datetime,
- QWidget * parent, const char * name)
- : QWidget(parent, name)
+KDateTimeWidget::KDateTimeWidget(const TQDateTime & datetime,
+ TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
@@ -38,32 +38,32 @@ void KDateTimeWidget::init()
{
d = new KDateTimeWidgetPrivate;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->dateWidget = new KDateWidget(this);
d->timeWidget = new KTimeWidget(this);
- connect(d->dateWidget, SIGNAL(changed(QDate)),
- SLOT(slotValueChanged()));
- connect(d->timeWidget, SIGNAL(valueChanged(const QTime &)),
- SLOT(slotValueChanged()));
+ connect(d->dateWidget, TQT_SIGNAL(changed(TQDate)),
+ TQT_SLOT(slotValueChanged()));
+ connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)),
+ TQT_SLOT(slotValueChanged()));
}
-void KDateTimeWidget::setDateTime(const QDateTime & datetime)
+void KDateTimeWidget::setDateTime(const TQDateTime & datetime)
{
d->dateWidget->setDate(datetime.date());
d->timeWidget->setTime(datetime.time());
}
-QDateTime KDateTimeWidget::dateTime() const
+TQDateTime KDateTimeWidget::dateTime() const
{
- return QDateTime(d->dateWidget->date(), d->timeWidget->time());
+ return TQDateTime(d->dateWidget->date(), d->timeWidget->time());
}
void KDateTimeWidget::slotValueChanged()
{
- QDateTime datetime(d->dateWidget->date(),
+ TQDateTime datetime(d->dateWidget->date(),
d->timeWidget->time());
kdDebug() << "slotValueChanged(): " << datetime << "\n";
diff --git a/kdeui/kdatetimewidget.h b/kdeui/kdatetimewidget.h
index 1a3a98ab4..5505f21af 100644
--- a/kdeui/kdatetimewidget.h
+++ b/kdeui/kdatetimewidget.h
@@ -19,8 +19,8 @@
#ifndef __KDATETIMEWIDGET__
#define __KDATETIMEWIDGET__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -40,20 +40,20 @@
class KDEUI_EXPORT KDateTimeWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QDateTime dateTime READ dateTime WRITE setDateTime )
+ Q_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
public:
/**
* Constructs a date and time selection widget.
*/
- KDateTimeWidget(QWidget * parent = 0, const char * name = 0);
+ KDateTimeWidget(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a date and time selection widget with the initial date and
* time set to @p datetime.
*/
- KDateTimeWidget(const QDateTime & datetime,
- QWidget * parent = 0, const char * name = 0 );
+ KDateTimeWidget(const TQDateTime & datetime,
+ TQWidget * parent = 0, const char * name = 0 );
/**
* Destructs the date and time selection widget.
@@ -63,20 +63,20 @@ public:
/**
* Returns the currently selected date and time.
*/
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
public slots:
/**
* Changes the selected date and time to @p datetime.
*/
- void setDateTime(const QDateTime & datetime);
+ void setDateTime(const TQDateTime & datetime);
signals:
/**
* Emitted whenever the date or time of the widget
* is changed, either with setDateTime() or via user selection.
*/
- void valueChanged(const QDateTime & datetime);
+ void valueChanged(const TQDateTime & datetime);
private:
void init();
diff --git a/kdeui/kdatewidget.cpp b/kdeui/kdatewidget.cpp
index 1db6d235b..ad6683e7f 100644
--- a/kdeui/kdatewidget.cpp
+++ b/kdeui/kdatewidget.cpp
@@ -17,10 +17,10 @@
*/
-#include <qpopupmenu.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include "knuminput.h"
#include "kglobal.h"
@@ -34,8 +34,8 @@
class KDateWidgetSpinBox : public QSpinBox
{
public:
- KDateWidgetSpinBox(int min, int max, QWidget *parent)
- : QSpinBox(min, max, 1, parent)
+ KDateWidgetSpinBox(int min, int max, TQWidget *parent)
+ : TQSpinBox(min, max, 1, parent)
{
editor()->setAlignment(AlignRight);
}
@@ -45,42 +45,42 @@ class KDateWidget::KDateWidgetPrivate
{
public:
KDateWidgetSpinBox *m_day;
- QComboBox *m_month;
+ TQComboBox *m_month;
KDateWidgetSpinBox *m_year;
- QDate m_dat;
+ TQDate m_dat;
};
-KDateWidget::KDateWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KDateWidget::KDateWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- init(QDate());
- setDate(QDate());
+ init(TQDate());
+ setDate(TQDate());
}
-// ### HPB change QDate to const QDate & in KDE 4.0
-KDateWidget::KDateWidget( QDate date, QWidget *parent,
+// ### HPB change TQDate to const TQDate & in KDE 4.0
+KDateWidget::KDateWidget( TQDate date, TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
init(date);
setDate(date);
}
-// ### CFM Repaced by init(const QDate&). Can be safely removed
+// ### CFM Repaced by init(const TQDate&). Can be safely removed
// when no risk of BIC
void KDateWidget::init()
{
d = new KDateWidgetPrivate;
KLocale *locale = KGlobal::locale();
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);
- d->m_month = new QComboBox(false, this);
+ d->m_month = new TQComboBox(false, this);
for (int i = 1; ; ++i)
{
- QString str = locale->calendar()->monthName(i,
- locale->calendar()->year(QDate()));
+ TQString str = locale->calendar()->monthName(i,
+ locale->calendar()->year(TQDate()));
if (str.isNull()) break;
d->m_month->insertItem(str);
}
@@ -88,22 +88,22 @@ void KDateWidget::init()
d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(),
locale->calendar()->maxValidYear(), this);
- connect(d->m_day, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
- connect(d->m_month, SIGNAL(activated(int)), this, SLOT(slotDateChanged()));
- connect(d->m_year, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
+ connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
}
-void KDateWidget::init(const QDate& date)
+void KDateWidget::init(const TQDate& date)
{
d = new KDateWidgetPrivate;
KLocale *locale = KGlobal::locale();
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);
- d->m_month = new QComboBox(false, this);
+ d->m_month = new TQComboBox(false, this);
for (int i = 1; ; ++i)
{
- QString str = locale->calendar()->monthName(i,
+ TQString str = locale->calendar()->monthName(i,
locale->calendar()->year(date));
if (str.isNull()) break;
d->m_month->insertItem(str);
@@ -112,9 +112,9 @@ void KDateWidget::init(const QDate& date)
d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(),
locale->calendar()->maxValidYear(), this);
- connect(d->m_day, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
- connect(d->m_month, SIGNAL(activated(int)), this, SLOT(slotDateChanged()));
- connect(d->m_year, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
+ connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
}
KDateWidget::~KDateWidget()
@@ -122,8 +122,8 @@ KDateWidget::~KDateWidget()
delete d;
}
-// ### HPB change QDate to const QDate & in KDE 4.0
-void KDateWidget::setDate( QDate date )
+// ### HPB change TQDate to const TQDate & in KDE 4.0
+void KDateWidget::setDate( TQDate date )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -144,7 +144,7 @@ void KDateWidget::setDate( QDate date )
emit changed(d->m_dat);
}
-QDate KDateWidget::date() const
+TQDate KDateWidget::date() const
{
return d->m_dat;
}
@@ -153,7 +153,7 @@ void KDateWidget::slotDateChanged( )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date;
+ TQDate date;
int y,m,day;
y = d->m_year->value();
diff --git a/kdeui/kdatewidget.h b/kdeui/kdatewidget.h
index a89bbe6d1..3a7f04d05 100644
--- a/kdeui/kdatewidget.h
+++ b/kdeui/kdatewidget.h
@@ -19,8 +19,8 @@
#ifndef __KDATECTL_H__
#define __KDATECTL_H__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -36,18 +36,18 @@
class KDEUI_EXPORT KDateWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QDate date READ date WRITE setDate )
+ Q_PROPERTY( TQDate date READ date WRITE setDate )
public:
/**
* Constructs a date selection widget.
*/
- KDateWidget( QWidget *parent=0, const char *name=0 );
+ KDateWidget( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a date selection widget with the initial date set to @p date.
*/
- KDateWidget( QDate date, QWidget *parent=0, const char *name=0 );
+ KDateWidget( TQDate date, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the date selection widget.
@@ -57,12 +57,12 @@ public:
/**
* Returns the currently selected date.
*/
- QDate date() const;
+ TQDate date() const;
/**
* Changes the selected date to @p date.
*/
- void setDate(QDate date);
+ void setDate(TQDate date);
signals:
@@ -70,11 +70,11 @@ signals:
* Emitted whenever the date of the widget
* is changed, either with setDate() or via user selection.
*/
- void changed(QDate);
+ void changed(TQDate);
protected:
void init();
- void init(const QDate&);
+ void init(const TQDate&);
protected slots:
void slotDateChanged();
diff --git a/kdeui/kdcopactionproxy.cpp b/kdeui/kdcopactionproxy.cpp
index ac1138ab1..15e431da3 100644
--- a/kdeui/kdcopactionproxy.cpp
+++ b/kdeui/kdcopactionproxy.cpp
@@ -39,7 +39,7 @@ public:
KActionCollection *m_actionCollection;
DCOPObject *m_parent;
- QCString m_prefix;
+ TQCString m_prefix;
int m_pos;
};
@@ -67,10 +67,10 @@ KDCOPActionProxy::~KDCOPActionProxy()
delete d;
}
-QValueList<KAction *>KDCOPActionProxy::actions() const
+TQValueList<KAction *>KDCOPActionProxy::actions() const
{
if ( !d->m_actionCollection )
- return QValueList<KAction *>();
+ return TQValueList<KAction *>();
return d->m_actionCollection->actions();
}
@@ -83,30 +83,30 @@ KAction *KDCOPActionProxy::action( const char *name ) const
return d->m_actionCollection->action( name );
}
-QCString KDCOPActionProxy::actionObjectId( const QCString &name ) const
+TQCString KDCOPActionProxy::actionObjectId( const TQCString &name ) const
{
return d->m_prefix + name;
}
-QMap<QCString,DCOPRef> KDCOPActionProxy::actionMap( const QCString &appId ) const
+TQMap<TQCString,DCOPRef> KDCOPActionProxy::actionMap( const TQCString &appId ) const
{
- QMap<QCString,DCOPRef> res;
+ TQMap<TQCString,DCOPRef> res;
- QCString id = appId;
+ TQCString id = appId;
if ( id.isEmpty() )
id = kapp->dcopClient()->appId();
- QValueList<KAction *> lst = actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
res.insert( (*it)->name(), DCOPRef( id, actionObjectId( (*it)->name() ) ) );
return res;
}
-bool KDCOPActionProxy::process( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData )
+bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData )
{
if ( obj.left( d->m_pos ) != d->m_prefix )
return false;
@@ -118,8 +118,8 @@ bool KDCOPActionProxy::process( const QCString &obj, const QCString &fun, const
return processAction( obj, fun, data, replyType, replyData, act );
}
-bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData, KAction *action )
+bool KDCOPActionProxy::processAction( const TQCString &, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData, KAction *action )
{
if ( fun == "activate()" )
{
@@ -131,14 +131,14 @@ bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, con
if ( fun == "isPlugged()" )
{
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8)action->isPlugged();
return true;
}
if ( fun == "functions()" )
{
- QValueList<QCString> res;
+ TQValueList<TQCString> res;
res << "QCStringList functions()";
res << "void activate()";
res << "bool isPlugged()";
@@ -146,7 +146,7 @@ bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, con
res += KDCOPPropertyProxy::functions( action );
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << res;
return true;
}
diff --git a/kdeui/kdcopactionproxy.h b/kdeui/kdcopactionproxy.h
index 48a7ea9a0..5b0ffdc1c 100644
--- a/kdeui/kdcopactionproxy.h
+++ b/kdeui/kdcopactionproxy.h
@@ -60,7 +60,7 @@ public:
* Returns a list of exportable actions. The default implementation returns a list of actions
* provided by a KActionCollection, if the first constructor has been used.
*/
- virtual QValueList<KAction *> actions() const;
+ virtual TQValueList<KAction *> actions() const;
/**
* Returns an action object with the given name. The default implementation queries the action object
* from the KActionCollection, if the first constructor has been used.
@@ -77,7 +77,7 @@ public:
*
* The action with the given name has to be available through the #action method.
*/
- virtual QCString actionObjectId( const QCString &name ) const;
+ virtual TQCString actionObjectId( const TQCString &name ) const;
/**
* Returns a map of all exported actions, with the action name as keys and a global DCOP reference
@@ -85,20 +85,20 @@ public:
* The appId argument is used to specify the appid component of the DCOP reference. By default the
* global application id is used ( kapp->dcopClient()->appId() ) .
*/
- virtual QMap<QCString,DCOPRef> actionMap( const QCString &appId = QCString() ) const;
+ virtual TQMap<TQCString,DCOPRef> actionMap( const TQCString &appId = TQCString() ) const;
/**
* Internal reimplementation of DCOPObjectProxy::process .
*/
- virtual bool process( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData );
+ virtual bool process( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData );
/**
* Called by the #process method and takes care of processing the object request for an
* action object.
*/
- virtual bool processAction( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData, KAction *action );
+ virtual bool processAction( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData, KAction *action );
private:
void init( KActionCollection *collection, DCOPObject *parent );
diff --git a/kdeui/kdetrayproxy/kdetrayproxy.cpp b/kdeui/kdetrayproxy/kdetrayproxy.cpp
index b41b337b3..e49f3a148 100644
--- a/kdeui/kdetrayproxy/kdetrayproxy.cpp
+++ b/kdeui/kdetrayproxy/kdetrayproxy.cpp
@@ -32,10 +32,10 @@
KDETrayProxy::KDETrayProxy()
: selection( makeSelectionAtom())
{
- connect( &selection, SIGNAL( newOwner( Window )), SLOT( newOwner( Window )));
- connect( &module, SIGNAL( windowAdded( WId )), SLOT( windowAdded( WId )));
+ connect( &selection, TQT_SIGNAL( newOwner( Window )), TQT_SLOT( newOwner( Window )));
+ connect( &module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( windowAdded( WId )));
selection.owner();
- for( QValueList< WId >::ConstIterator it = module.windows().begin();
+ for( TQValueList< WId >::ConstIterator it = module.windows().begin();
it != module.windows().end();
++it )
windowAdded( *it );
@@ -45,7 +45,7 @@ KDETrayProxy::KDETrayProxy()
Atom KDETrayProxy::makeSelectionAtom()
{
- return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + QCString().setNum( qt_xscreen()), False );
+ return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + TQCString().setNum( qt_xscreen()), False );
}
extern Time qt_x_time;
@@ -76,7 +76,7 @@ void KDETrayProxy::windowAdded( WId w )
void KDETrayProxy::newOwner( Window owner )
{
// kdDebug() << "New owner:" << owner << endl;
- for( QValueList< Window >::ConstIterator it = pending_windows.begin();
+ for( TQValueList< Window >::ConstIterator it = pending_windows.begin();
it != pending_windows.end();
++it )
dockWindow( *it, owner );
diff --git a/kdeui/kdetrayproxy/kdetrayproxy.h b/kdeui/kdetrayproxy/kdetrayproxy.h
index 67c9c6299..49a7164cc 100644
--- a/kdeui/kdetrayproxy/kdetrayproxy.h
+++ b/kdeui/kdetrayproxy/kdetrayproxy.h
@@ -20,10 +20,10 @@
#ifndef _KDE_TRAY_PROXY_H_
#define _KDE_TRAY_PROXY_H_
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kmanagerselection.h>
#include <kwinmodule.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KDETrayProxy
: public QWidget
@@ -42,9 +42,9 @@ class KDETrayProxy
static Atom makeSelectionAtom();
KSelectionWatcher selection;
KWinModule module;
- QValueList< Window > pending_windows;
- QValueList< Window > tray_windows;
- QMap< Window, unsigned long > docked_windows;
+ TQValueList< Window > pending_windows;
+ TQValueList< Window > tray_windows;
+ TQMap< Window, unsigned long > docked_windows;
};
#endif
diff --git a/kdeui/kdetrayproxy/module.cpp b/kdeui/kdetrayproxy/module.cpp
index c3a6a7b0c..5da30bab8 100644
--- a/kdeui/kdetrayproxy/module.cpp
+++ b/kdeui/kdetrayproxy/module.cpp
@@ -19,13 +19,13 @@
#include "module.h"
-KDETrayModule::KDETrayModule( const QCString& obj )
+KDETrayModule::KDETrayModule( const TQCString& obj )
: KDEDModule( obj )
{
}
extern "C"
-KDE_EXPORT KDEDModule *create_kdetrayproxy( const QCString& obj )
+KDE_EXPORT KDEDModule *create_kdetrayproxy( const TQCString& obj )
{
return new KDETrayModule( obj );
}
diff --git a/kdeui/kdetrayproxy/module.h b/kdeui/kdetrayproxy/module.h
index f5ef55f6d..67ed1a29d 100644
--- a/kdeui/kdetrayproxy/module.h
+++ b/kdeui/kdetrayproxy/module.h
@@ -31,7 +31,7 @@ class KDETrayModule
Q_OBJECT
K_DCOP
public:
- KDETrayModule( const QCString& obj );
+ KDETrayModule( const TQCString& obj );
private:
KDETrayProxy proxy;
};
diff --git a/kdeui/kdialog.cpp b/kdeui/kdialog.cpp
index b61ea9089..5963a415d 100644
--- a/kdeui/kdialog.cpp
+++ b/kdeui/kdialog.cpp
@@ -25,13 +25,13 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qguardedptr.h>
-#include <qlineedit.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqguardedptr.h>
+#include <tqlineedit.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
#include "config.h"
#ifdef Q_WS_X11
@@ -41,10 +41,10 @@
const int KDialog::mMarginSize = 11;
const int KDialog::mSpacingSize = 6;
-template class QPtrList<QLayoutItem>;
+template class TQPtrList<TQLayoutItem>;
-KDialog::KDialog(QWidget *parent, const char *name, bool modal, WFlags f)
- : QDialog(parent, name, modal, f), d(0)
+KDialog::KDialog(TQWidget *parent, const char *name, bool modal, WFlags f)
+ : TQDialog(parent, name, modal, f), d(0)
{
KWhatsThisManager::init ();
}
@@ -52,7 +52,7 @@ KDialog::KDialog(QWidget *parent, const char *name, bool modal, WFlags f)
//
// Grab QDialogs keypresses if non-modal.
//
-void KDialog::keyPressEvent(QKeyEvent *e)
+void KDialog::keyPressEvent(TQKeyEvent *e)
{
if ( e->state() == 0 )
{
@@ -64,7 +64,7 @@ void KDialog::keyPressEvent(QKeyEvent *e)
{
if(testWFlags(WType_Dialog | WShowModal))
{
- QDialog::keyPressEvent(e);
+ TQDialog::keyPressEvent(e);
}
else
{
@@ -108,20 +108,20 @@ int KDialog::spacingHint()
// KDE4: Remove me
void KDialog::polish()
{
- QDialog::polish();
+ TQDialog::polish();
}
-void KDialog::setCaption( const QString &_caption )
+void KDialog::setCaption( const TQString &_caption )
{
- QString caption = kapp ? kapp->makeStdCaption( _caption ) : _caption;
+ TQString caption = kapp ? kapp->makeStdCaption( _caption ) : _caption;
setPlainCaption( caption );
}
-void KDialog::setPlainCaption( const QString &caption )
+void KDialog::setPlainCaption( const TQString &caption )
{
- QDialog::setCaption( caption );
+ TQDialog::setCaption( caption );
#ifdef Q_WS_X11
NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
@@ -130,7 +130,7 @@ void KDialog::setPlainCaption( const QString &caption )
}
-void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
+void KDialog::resizeLayout( TQWidget *w, int margin, int spacing )
{
if( w->layout() )
{
@@ -139,13 +139,13 @@ void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
if( w->children() )
{
- const QObjectList * const l = w->children();
- QObjectListIterator itr(*l);
- QObject *o;
+ const TQObjectList * const l = w->children();
+ TQObjectListIterator itr(*l);
+ TQObject *o;
while ((o = itr.current()) != 0) {
if( o->isWidgetType() )
{
- resizeLayout( (QWidget*)o, margin, spacing );
+ resizeLayout( (TQWidget*)o, margin, spacing );
}
++itr;
}
@@ -153,10 +153,10 @@ void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
}
-void KDialog::resizeLayout( QLayoutItem *lay, int margin, int spacing )
+void KDialog::resizeLayout( TQLayoutItem *lay, int margin, int spacing )
{
- QLayoutIterator it = lay->iterator();
- QLayoutItem *child;
+ TQLayoutIterator it = lay->iterator();
+ TQLayoutItem *child;
while ( (child = it.current() ) )
{
resizeLayout( child, margin, spacing );
@@ -169,9 +169,9 @@ void KDialog::resizeLayout( QLayoutItem *lay, int margin, int spacing )
}
}
-static QRect screenRect( QWidget *w, int screen )
+static TQRect screenRect( TQWidget *w, int screen )
{
- QDesktopWidget *desktop = QApplication::desktop();
+ TQDesktopWidget *desktop = TQApplication::desktop();
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
if (desktop->isVirtualDesktop() &&
@@ -181,7 +181,7 @@ static QRect screenRect( QWidget *w, int screen )
if ( screen == -1 ) {
screen = desktop->primaryScreen();
} else if ( screen == -3 ) {
- screen = desktop->screenNumber( QCursor::pos() );
+ screen = desktop->screenNumber( TQCursor::pos() );
} else {
screen = desktop->screenNumber( w );
}
@@ -192,26 +192,26 @@ static QRect screenRect( QWidget *w, int screen )
}
}
-void KDialog::centerOnScreen( QWidget *w, int screen )
+void KDialog::centerOnScreen( TQWidget *w, int screen )
{
if ( !w )
return;
- QRect r = screenRect( w, screen );
+ TQRect r = screenRect( w, screen );
w->move( r.center().x() - w->width()/2,
r.center().y() - w->height()/2 );
}
-bool KDialog::avoidArea( QWidget *w, const QRect& area, int screen )
+bool KDialog::avoidArea( TQWidget *w, const TQRect& area, int screen )
{
if ( !w )
return false;
- QRect fg = w->frameGeometry();
+ TQRect fg = w->frameGeometry();
if ( !fg.intersects( area ) )
return true; // nothing to do.
- QRect scr = screenRect( w, screen );
- QRect avoid( area ); // let's add some margin
+ TQRect scr = screenRect( w, screen );
+ TQRect avoid( area ); // let's add some margin
avoid.moveBy( -5, -5 );
avoid.rRight() += 10;
avoid.rBottom() += 10;
@@ -257,7 +257,7 @@ bool KDialog::avoidArea( QWidget *w, const QRect& area, int screen )
class KDialogQueuePrivate
{
public:
- QValueList< QGuardedPtr<QDialog> > queue;
+ TQValueList< TQGuardedPtr<TQDialog> > queue;
bool busy;
};
@@ -284,18 +284,18 @@ KDialogQueue::~KDialogQueue()
}
// static
-void KDialogQueue::queueDialog(QDialog *dialog)
+void KDialogQueue::queueDialog(TQDialog *dialog)
{
KDialogQueue *_this = self();
_this->d->queue.append(dialog);
- QTimer::singleShot(0, _this, SLOT(slotShowQueuedDialog()));
+ TQTimer::singleShot(0, _this, TQT_SLOT(slotShowQueuedDialog()));
}
void KDialogQueue::slotShowQueuedDialog()
{
if (d->busy)
return;
- QDialog *dialog;
+ TQDialog *dialog;
do {
if(d->queue.isEmpty())
return;
@@ -310,7 +310,7 @@ void KDialogQueue::slotShowQueuedDialog()
delete dialog;
if (!d->queue.isEmpty())
- QTimer::singleShot(20, this, SLOT(slotShowQueuedDialog()));
+ TQTimer::singleShot(20, this, TQT_SLOT(slotShowQueuedDialog()));
else
ksdkdq.destructObject(); // Suicide.
}
diff --git a/kdeui/kdialog.h b/kdeui/kdialog.h
index 78e26187d..ae8cdb490 100644
--- a/kdeui/kdialog.h
+++ b/kdeui/kdialog.h
@@ -21,7 +21,7 @@
#ifndef _KDIALOG_H_
#define _KDIALOG_H_
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kdelibs_export.h>
class QLayoutItem;
@@ -57,9 +57,9 @@ class KDEUI_EXPORT KDialog : public QDialog
/**
* Constructor.
*
- * Takes the same arguments as QDialog.
+ * Takes the same arguments as TQDialog.
*/
- KDialog(QWidget *parent = 0, const char *name = 0,
+ KDialog(TQWidget *parent = 0, const char *name = 0,
bool modal = false, WFlags f = 0);
/**
@@ -81,7 +81,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param margin The new layout margin.
* @param spacing The new layout spacing.
*/
- static void resizeLayout( QWidget *widget, int margin, int spacing );
+ static void resizeLayout( TQWidget *widget, int margin, int spacing );
/**
* Resize every layout associated with @p lay and its children.
@@ -90,7 +90,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param margin The new layout margin
* @param spacing The new layout spacing
*/
- static void resizeLayout( QLayoutItem *lay, int margin, int spacing );
+ static void resizeLayout( TQLayoutItem *lay, int margin, int spacing );
/**
* Centers @p widget on the desktop, taking multi-head setups into
@@ -102,7 +102,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* in use, or merged display placement is not enabled in kdeglobals.
* @since 3.1
*/
- static void centerOnScreen( QWidget *widget, int screen = -1 );
+ static void centerOnScreen( TQWidget *widget, int screen = -1 );
/**
* Places @p widget so that it doesn't cover a certain @p area of the screen.
@@ -113,11 +113,11 @@ class KDEUI_EXPORT KDialog : public QDialog
* false on failure (not enough space found)
* @since 3.2
*/
- static bool avoidArea( QWidget *widget, const QRect& area, int screen = -1 );
+ static bool avoidArea( TQWidget *widget, const TQRect& area, int screen = -1 );
public slots:
/**
- * If the dialog starts with focus in a QLineEdit child,
+ * If the dialog starts with focus in a TQLineEdit child,
* then call selectAll() on the child.
*/
virtual void polish();
@@ -129,7 +129,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* in this string. It will be added automatically according to the KDE
* standard.
*/
- virtual void setCaption( const QString &caption );
+ virtual void setCaption( const TQString &caption );
/**
* Make a plain caption without any modifications.
@@ -137,14 +137,14 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param caption Your caption. This is the string that will be
* displayed in the window title.
*/
- virtual void setPlainCaption( const QString &caption );
+ virtual void setPlainCaption( const TQString &caption );
protected:
/**
* @internal
*/
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
signals:
@@ -191,7 +191,7 @@ class KDEUI_EXPORT KDialogQueue : public QObject
public:
- static void queueDialog(QDialog *);
+ static void queueDialog(TQDialog *);
~KDialogQueue();
diff --git a/kdeui/kdialogbase.cpp b/kdeui/kdialogbase.cpp
index a0ef23f32..202de5f9b 100644
--- a/kdeui/kdialogbase.cpp
+++ b/kdeui/kdialogbase.cpp
@@ -24,14 +24,14 @@
#include "kdialogbase.h"
#include <stdlib.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qfocusdata.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqfocusdata.h>
#include <kapplication.h>
#include <klocale.h>
@@ -53,7 +53,7 @@ int KDialogBaseButton::id()
return mKey;
}
-template class QPtrList<KDialogBaseButton>;
+template class TQPtrList<KDialogBaseButton>;
/**
* @internal
@@ -75,10 +75,10 @@ struct SButton : public Qt
KPushButton *button( int key );
- QWidget *box;
+ TQWidget *box;
int mask;
int style;
- QPtrList<KDialogBaseButton> list;
+ TQPtrList<KDialogBaseButton> list;
};
}// namespace
@@ -89,15 +89,15 @@ public:
bool bDetails;
bool bFixed;
bool bSettingDetails;
- QWidget *detailsWidget;
- QSize incSize;
- QSize minSize;
- QString detailsButton;
+ TQWidget *detailsWidget;
+ TQSize incSize;
+ TQSize minSize;
+ TQString detailsButton;
SButton mButton;
};
-KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
- const QString &caption, int buttonMask,
+KDialogBase::KDialogBase( TQWidget *parent, const char *name, bool modal,
+ const TQString &caption, int buttonMask,
ButtonCode defaultButton, bool separator,
const KGuiItem &user1, const KGuiItem &user2,
const KGuiItem &user3 )
@@ -109,7 +109,7 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
enableButtonSeparator( separator );
makeButtonBox( buttonMask, defaultButton, user1, user2, user3 );
@@ -118,9 +118,9 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
setupLayout();
}
-KDialogBase::KDialogBase( int dialogFace, const QString &caption,
+KDialogBase::KDialogBase( int dialogFace, const TQString &caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *parent, const char *name, bool modal,
+ TQWidget *parent, const char *name, bool modal,
bool separator, const KGuiItem &user1,
const KGuiItem &user2, const KGuiItem &user3 )
:KDialog( parent, name, modal, WStyle_DialogBorder ),
@@ -131,11 +131,11 @@ KDialogBase::KDialogBase( int dialogFace, const QString &caption,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
mJanus = new KJanusWidget( this, "janus", dialogFace );
- connect(mJanus, SIGNAL(aboutToShowPage(QWidget *)),
- this, SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)),
+ this, TQT_SIGNAL(aboutToShowPage(TQWidget *)));
if( !mJanus || !mJanus->isValid() ) { return; }
@@ -146,9 +146,9 @@ KDialogBase::KDialogBase( int dialogFace, const QString &caption,
setupLayout();
}
-KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget *parent, const char *name,
+KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, TQWidget *parent, const char *name,
bool modal,
- const QString &caption, int buttonMask,
+ const TQString &caption, int buttonMask,
ButtonCode defaultButton, bool separator,
const KGuiItem &user1, const KGuiItem &user2,
const KGuiItem &user3 )
@@ -160,11 +160,11 @@ KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
mJanus = new KJanusWidget( this, "janus", dialogFace );
- connect(mJanus, SIGNAL(aboutToShowPage(QWidget *)),
- this, SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)),
+ this, TQT_SIGNAL(aboutToShowPage(TQWidget *)));
if( !mJanus || !mJanus->isValid() ) { return; }
@@ -175,9 +175,9 @@ KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget
setupLayout();
}
-KDialogBase::KDialogBase( const QString &caption, int buttonMask,
+KDialogBase::KDialogBase( const TQString &caption, int buttonMask,
ButtonCode defaultButton, ButtonCode escapeButton,
- QWidget *parent, const char *name, bool modal,
+ TQWidget *parent, const char *name, bool modal,
bool separator, const KGuiItem &yes,
const KGuiItem &no, const KGuiItem &cancel )
:KDialog( parent, name, modal, WStyle_DialogBorder ),
@@ -189,7 +189,7 @@ KDialogBase::KDialogBase( const QString &caption, int buttonMask,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
enableButtonSeparator( separator );
@@ -230,7 +230,7 @@ void SButton::resize( bool sameWidth, int margin,
for( p = list.first(); p; p = list.next() )
{
- const QSize s( p->sizeHint() );
+ const TQSize s( p->sizeHint() );
if( s.height() > h ) { h = s.height(); }
if( s.width() > w ) { w = s.width(); }
}
@@ -239,7 +239,7 @@ void SButton::resize( bool sameWidth, int margin,
{
for( p = list.first(); p; p = list.next() )
{
- QSize s( p->sizeHint() );
+ TQSize s( p->sizeHint() );
if( sameWidth ) { s.setWidth( w ); }
p->setFixedWidth( s.width() );
t += s.width() + spacing;
@@ -253,7 +253,7 @@ void SButton::resize( bool sameWidth, int margin,
// sameWidth has no effect here
for( p = list.first(); p; p = list.next() )
{
- QSize s( p->sizeHint() );
+ TQSize s( p->sizeHint() );
s.setWidth( w );
p->setFixedSize( s );
t += s.height() + spacing;
@@ -281,7 +281,7 @@ KDialogBase::delayedDestruct()
{
if (isVisible())
hide();
- QTimer::singleShot( 0, this, SLOT(slotDelayedDestruct()));
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotDelayedDestruct()));
}
void
@@ -296,17 +296,17 @@ void KDialogBase::setupLayout()
{
delete mTopLayout;
}
- // mTopLayout = new QVBoxLayout( this, marginHint(), spacingHint() );
+ // mTopLayout = new TQVBoxLayout( this, marginHint(), spacingHint() );
if( mButtonOrientation == Horizontal )
{
- mTopLayout = new QBoxLayout( this, QBoxLayout::TopToBottom,
+ mTopLayout = new TQBoxLayout( this, TQBoxLayout::TopToBottom,
marginHint(), spacingHint() );
}
else
{
- mTopLayout = new QBoxLayout( this, QBoxLayout::LeftToRight,
+ mTopLayout = new TQBoxLayout( this, TQBoxLayout::LeftToRight,
marginHint(), spacingHint() );
}
@@ -350,7 +350,7 @@ void KDialogBase::setButtonBoxOrientation( int orientation )
if( mActionSep )
{
mActionSep->setOrientation( mButtonOrientation == Horizontal ?
- QFrame::HLine : QFrame::VLine );
+ TQFrame::HLine : TQFrame::VLine );
}
if( mButtonOrientation == Vertical )
{
@@ -373,15 +373,15 @@ void KDialogBase::makeRelay()
{
if( mTile )
{
- connect( mTile, SIGNAL(pixmapChanged()), SLOT(updateBackground()) );
+ connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) );
return;
}
mTile = new KDialogBaseTile;
if( mTile )
{
- connect( mTile, SIGNAL(pixmapChanged()), SLOT(updateBackground()) );
- connect( qApp, SIGNAL(aboutToQuit()), mTile, SLOT(cleanup()) );
+ connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), mTile, TQT_SLOT(cleanup()) );
}
}
@@ -395,9 +395,9 @@ void KDialogBase::enableButtonSeparator( bool state )
return;
}
mActionSep = new KSeparator( this );
- mActionSep->setFocusPolicy(QWidget::NoFocus);
+ mActionSep->setFocusPolicy(TQWidget::NoFocus);
mActionSep->setOrientation( mButtonOrientation == Horizontal ?
- QFrame::HLine : QFrame::VLine );
+ TQFrame::HLine : TQFrame::VLine );
mActionSep->show();
}
else
@@ -417,7 +417,7 @@ void KDialogBase::enableButtonSeparator( bool state )
-QFrame *KDialogBase::plainPage()
+TQFrame *KDialogBase::plainPage()
{
return ( mJanus ? mJanus->plainPage() : 0 );
}
@@ -434,20 +434,20 @@ void KDialogBase::adjustSize()
resize( sizeHint() );
}
-QSize KDialogBase::sizeHint() const
+TQSize KDialogBase::sizeHint() const
{
return d->minSize.expandedTo( minimumSizeHint() ) + d->incSize;
}
-QSize KDialogBase::minimumSizeHint() const
+TQSize KDialogBase::minimumSizeHint() const
{
const int m = marginHint();
const int s = spacingHint();
- const QSize zeroByS(0, s);
+ const TQSize zeroByS(0, s);
- QSize s1(0,0);
- QSize s2(0,0);
+ TQSize s1(0,0);
+ TQSize s2(0,0);
//
// Url help area
@@ -473,12 +473,12 @@ QSize KDialogBase::minimumSizeHint() const
s2 = s2.expandedTo( mMainWidget->minimumSizeHint() );
if( s2.isEmpty() )
{
- s2 = QSize( 100, 100+s );
+ s2 = TQSize( 100, 100+s );
}
}
else
{
- s2 = QSize( 100, 100+s );
+ s2 = TQSize( 100, 100+s );
}
s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() );
s1.rheight() += s2.rheight();
@@ -534,7 +534,7 @@ void KDialogBase::disableResize()
}
-void KDialogBase::setInitialSize( const QSize &s, bool noResize )
+void KDialogBase::setInitialSize( const TQSize &s, bool noResize )
{
d->minSize = s;
d->bFixed = noResize;
@@ -542,7 +542,7 @@ void KDialogBase::setInitialSize( const QSize &s, bool noResize )
}
-void KDialogBase::incInitialSize( const QSize &s, bool noResize )
+void KDialogBase::incInitialSize( const TQSize &s, bool noResize )
{
d->incSize = s;
d->bFixed = noResize;
@@ -569,42 +569,42 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton,
mEscapeButton = (buttonMask&Cancel) ? Cancel : Close;
}
- d->mButton.box = new QWidget( this );
+ d->mButton.box = new TQWidget( this );
d->mButton.mask = buttonMask;
if( d->mButton.mask & Help )
{
KPushButton *pb = d->mButton.append( Help, KStdGuiItem::help() );
- connect( pb, SIGNAL(clicked()), SLOT(slotHelp()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()) );
}
if( d->mButton.mask & Default )
{
KPushButton *pb = d->mButton.append( Default, KStdGuiItem::defaults() );
- connect( pb, SIGNAL(clicked()), SLOT(slotDefault()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefault()) );
}
if( d->mButton.mask & Details )
{
- KPushButton *pb = d->mButton.append( Details, QString::null );
- connect( pb, SIGNAL(clicked()), SLOT(slotDetails()) );
+ KPushButton *pb = d->mButton.append( Details, TQString::null );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails()) );
setDetails(false);
}
if( d->mButton.mask & User3 )
{
KPushButton *pb = d->mButton.append( User3, user3 );
- connect( pb, SIGNAL(clicked()), SLOT(slotUser3()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser3()) );
}
if( d->mButton.mask & User2 )
{
KPushButton *pb = d->mButton.append( User2, user2 );
if( mMessageBoxMode )
{
- connect( pb, SIGNAL(clicked()), SLOT(slotYes()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotYes()) );
}
else
{
- connect( pb, SIGNAL(clicked()), this, SLOT(slotUser2()) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUser2()) );
}
}
if( d->mButton.mask & User1 )
@@ -612,44 +612,44 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton,
KPushButton *pb = d->mButton.append( User1, user1 );
if( mMessageBoxMode )
{
- connect( pb, SIGNAL(clicked()), this, SLOT(slotNo()) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNo()) );
}
else
{
- connect( pb, SIGNAL(clicked()), SLOT(slotUser1()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser1()) );
}
}
if( d->mButton.mask & Ok )
{
KPushButton *pb = d->mButton.append( Ok, KStdGuiItem::ok() );
- connect( pb, SIGNAL(clicked()), SLOT(slotOk()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotOk()) );
}
if( d->mButton.mask & Apply )
{
KPushButton *pb = d->mButton.append( Apply, KStdGuiItem::apply() );
- connect( pb, SIGNAL(clicked()), SLOT(slotApply()) );
- connect( pb, SIGNAL(clicked()), SLOT(applyPressed()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotApply()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(applyPressed()) );
}
if( d->mButton.mask & Try )
{
KPushButton *pb = d->mButton.append( Try,
i18n( "&Try" ) );
- connect( pb, SIGNAL(clicked()), SLOT(slotTry()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotTry()) );
}
if( d->mButton.mask & Cancel )
{
KPushButton *pb = d->mButton.append( Cancel, KStdGuiItem::cancel() );
- connect( pb, SIGNAL(clicked()), SLOT(slotCancel()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancel()) );
}
if( d->mButton.mask & Close )
{
KPushButton *pb = d->mButton.append( Close, KStdGuiItem::close() );
- connect( pb, SIGNAL(clicked()), SLOT(slotClose()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotClose()) );
}
if( defaultButton != NoDefault )
{
- QPushButton *pb = actionButton( defaultButton );
+ TQPushButton *pb = actionButton( defaultButton );
if( pb )
{
setButtonFocus( pb, true, false );
@@ -719,21 +719,21 @@ void KDialogBase::setButtonStyle( int style )
delete d->mButton.box->layout();
}
- QBoxLayout *lay;
+ TQBoxLayout *lay;
if( mButtonOrientation == Horizontal )
{
- lay = new QBoxLayout( d->mButton.box, QBoxLayout::LeftToRight, 0,
+ lay = new TQBoxLayout( d->mButton.box, TQBoxLayout::LeftToRight, 0,
spacingHint());
}
else
{
- lay = new QBoxLayout( d->mButton.box, QBoxLayout::TopToBottom, 0,
+ lay = new TQBoxLayout( d->mButton.box, TQBoxLayout::TopToBottom, 0,
spacingHint());
}
int numButton = 0;
- QPushButton *prevButton = 0;
- QPushButton *newButton;
+ TQPushButton *prevButton = 0;
+ TQPushButton *newButton;
for( int i=0; i<layoutMax; ++i )
{
@@ -829,7 +829,7 @@ void KDialogBase::setButtonStyle( int style )
}
-QPushButton *KDialogBase::actionButton( ButtonCode id )
+TQPushButton *KDialogBase::actionButton( ButtonCode id )
{
return d->mButton.button(id);
}
@@ -837,7 +837,7 @@ QPushButton *KDialogBase::actionButton( ButtonCode id )
void KDialogBase::enableButton( ButtonCode id, bool state )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
pb->setEnabled( state );
@@ -865,7 +865,7 @@ void KDialogBase::enableButtonCancel( bool state )
void KDialogBase::showButton( ButtonCode id, bool state )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
state ? pb->show() : pb->hide();
@@ -891,25 +891,25 @@ void KDialogBase::showButtonCancel( bool state )
}
-void KDialogBase::setButtonOKText( const QString &text,
- const QString &tooltip,
- const QString &quickhelp )
+void KDialogBase::setButtonOKText( const TQString &text,
+ const TQString &tooltip,
+ const TQString &quickhelp )
{
- QPushButton *pb = actionButton( Ok );
+ TQPushButton *pb = actionButton( Ok );
if( !pb )
{
return;
}
- const QString whatsThis = i18n( ""
+ const TQString whatsThis = i18n( ""
"If you press the <b>OK</b> button, all changes\n"
"you made will be used to proceed.");
pb->setText( text.isEmpty() ? i18n("&OK") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip.isEmpty() ? i18n("Accept settings") : tooltip );
- QWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
+ TQToolTip::add( pb, tooltip.isEmpty() ? i18n("Accept settings") : tooltip );
+ TQWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
}
@@ -919,17 +919,17 @@ void KDialogBase::setButtonOK( const KGuiItem &item /* = KStdGuiItem::ok() */ )
}
-void KDialogBase::setButtonApplyText( const QString &text,
- const QString &tooltip,
- const QString &quickhelp )
+void KDialogBase::setButtonApplyText( const TQString &text,
+ const TQString &tooltip,
+ const TQString &quickhelp )
{
- QPushButton *pb = actionButton( Apply );
+ TQPushButton *pb = actionButton( Apply );
if( !pb )
{
return;
}
- const QString whatsThis = i18n( ""
+ const TQString whatsThis = i18n( ""
"When clicking <b>Apply</b>, the settings will be\n"
"handed over to the program, but the dialog\n"
"will not be closed. "
@@ -938,8 +938,8 @@ void KDialogBase::setButtonApplyText( const QString &text,
pb->setText( text.isEmpty() ? i18n("&Apply") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip.isEmpty() ? i18n("Apply settings") : tooltip );
- QWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
+ TQToolTip::add( pb, tooltip.isEmpty() ? i18n("Apply settings") : tooltip );
+ TQWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
}
@@ -949,11 +949,11 @@ void KDialogBase::setButtonApply( const KGuiItem &item /* = KStdGuiItem::apply()
}
-void KDialogBase::setButtonCancelText( const QString& text,
- const QString& tooltip,
- const QString& quickhelp )
+void KDialogBase::setButtonCancelText( const TQString& text,
+ const TQString& tooltip,
+ const TQString& quickhelp )
{
- QPushButton *pb = actionButton( Cancel );
+ TQPushButton *pb = actionButton( Cancel );
if( !pb )
{
return;
@@ -962,8 +962,8 @@ void KDialogBase::setButtonCancelText( const QString& text,
pb->setText( text.isEmpty() ? i18n("&Cancel") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip );
- QWhatsThis::add( pb, quickhelp );
+ TQToolTip::add( pb, tooltip );
+ TQWhatsThis::add( pb, quickhelp );
}
@@ -983,7 +983,7 @@ void KDialogBase::setButtonGuiItem( ButtonCode id, const KGuiItem &item )
}
-void KDialogBase::setButtonText( ButtonCode id, const QString &text )
+void KDialogBase::setButtonText( ButtonCode id, const TQString &text )
{
if (!d->bSettingDetails && (id == Details))
{
@@ -991,7 +991,7 @@ void KDialogBase::setButtonText( ButtonCode id, const QString &text )
setDetails(d->bDetails);
return;
}
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
pb->setText( text );
@@ -1000,33 +1000,33 @@ void KDialogBase::setButtonText( ButtonCode id, const QString &text )
}
-void KDialogBase::setButtonTip( ButtonCode id, const QString &text )
+void KDialogBase::setButtonTip( ButtonCode id, const TQString &text )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
if (text.isEmpty())
- QToolTip::remove( pb );
+ TQToolTip::remove( pb );
else
- QToolTip::add( pb, text );
+ TQToolTip::add( pb, text );
}
}
-void KDialogBase::setButtonWhatsThis( ButtonCode id, const QString &text )
+void KDialogBase::setButtonWhatsThis( ButtonCode id, const TQString &text )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
if (text.isEmpty())
- QWhatsThis::remove( pb );
+ TQWhatsThis::remove( pb );
else
- QWhatsThis::add( pb, text );
+ TQWhatsThis::add( pb, text );
}
}
-void KDialogBase::setButtonFocus( QPushButton *p,bool isDefault, bool isFocus )
+void KDialogBase::setButtonFocus( TQPushButton *p,bool isDefault, bool isFocus )
{
p->setDefault( isDefault );
if( isFocus )
@@ -1064,19 +1064,19 @@ void KDialogBase::unfoldTreeList( bool persist )
mJanus->unfoldTreeList( persist );
}
-void KDialogBase::addWidgetBelowList( QWidget * widget )
+void KDialogBase::addWidgetBelowList( TQWidget * widget )
{
if( mJanus )
mJanus->addWidgetBelowList( widget );
}
-void KDialogBase::addButtonBelowList( const QString & text, QObject * recv, const char * slot )
+void KDialogBase::addButtonBelowList( const TQString & text, TQObject * recv, const char * slot )
{
if( mJanus )
mJanus->addButtonBelowList( text, recv, slot );
}
-void KDialogBase::addButtonBelowList( const KGuiItem & item, QObject * recv, const char * slot )
+void KDialogBase::addButtonBelowList( const KGuiItem & item, TQObject * recv, const char * slot )
{
if( mJanus )
mJanus->addButtonBelowList( item, recv, slot );
@@ -1109,12 +1109,12 @@ void KDialogBase::slotDetails()
setDetails(!d->bDetails);
}
-void KDialogBase::setDetailsWidget(QWidget *detailsWidget)
+void KDialogBase::setDetailsWidget(TQWidget *detailsWidget)
{
delete d->detailsWidget;
d->detailsWidget = detailsWidget;
if (d->detailsWidget->parentWidget() != this)
- d->detailsWidget->reparent(this, QPoint(0,0));
+ d->detailsWidget->reparent(this, TQPoint(0,0));
d->detailsWidget->hide();
if( mIsActivated )
{
@@ -1226,7 +1226,7 @@ void KDialogBase::slotClose()
}
-void KDialogBase::helpClickedSlot( const QString & )
+void KDialogBase::helpClickedSlot( const TQString & )
{
slotHelp();
}
@@ -1256,8 +1256,8 @@ void KDialogBase::enableLinkedHelp( bool state )
mUrlHelp->setBackgroundPixmap(*mTile->get());
}
mUrlHelp->setMinimumHeight( fontMetrics().height() + marginHint() );
- connect(mUrlHelp,SIGNAL(leftClickedURL(const QString &)),
- SLOT(helpClickedSlot(const QString &)));
+ connect(mUrlHelp,TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(helpClickedSlot(const TQString &)));
mUrlHelp->show();
}
else
@@ -1276,14 +1276,14 @@ void KDialogBase::enableLinkedHelp( bool state )
}
-void KDialogBase::setHelp( const QString &anchor, const QString &appname )
+void KDialogBase::setHelp( const TQString &anchor, const TQString &appname )
{
mAnchor = anchor;
mHelpApp = appname;
}
-void KDialogBase::setHelpLinkText( const QString &text )
+void KDialogBase::setHelpLinkText( const TQString &text )
{
mHelpLinkText = text;
if( mUrlHelp )
@@ -1293,62 +1293,62 @@ void KDialogBase::setHelpLinkText( const QString &text )
}
-QFrame *KDialogBase::addPage( const QString &itemName, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KDialogBase::addPage( const TQString &itemName, const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addPage( itemName, header, pixmap ) : 0);
}
-QFrame *KDialogBase::addPage( const QStringList &items, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KDialogBase::addPage( const TQStringList &items, const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addPage( items, header, pixmap ) : 0);
}
-QVBox *KDialogBase::addVBoxPage( const QString &itemName,
- const QString &header, const QPixmap &pixmap )
+TQVBox *KDialogBase::addVBoxPage( const TQString &itemName,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addVBoxPage( itemName, header, pixmap) : 0);
}
-QVBox *KDialogBase::addVBoxPage( const QStringList &items,
- const QString &header, const QPixmap &pixmap )
+TQVBox *KDialogBase::addVBoxPage( const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addVBoxPage( items, header, pixmap) : 0);
}
-QHBox *KDialogBase::addHBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KDialogBase::addHBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addHBoxPage( itemName, header, pixmap ) : 0);
}
-QHBox *KDialogBase::addHBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KDialogBase::addHBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addHBoxPage( items, header, pixmap ) : 0);
}
-QGrid *KDialogBase::addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header, const QPixmap &pixmap )
+TQGrid *KDialogBase::addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addGridPage( n, dir, itemName, header, pixmap) : 0);
}
-QGrid *KDialogBase::addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header, const QPixmap &pixmap )
+TQGrid *KDialogBase::addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addGridPage( n, dir, items, header, pixmap) : 0);
}
-void KDialogBase::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
+void KDialogBase::setFolderIcon(const TQStringList &path, const TQPixmap &pixmap)
{
if (!mJanus)
return;
@@ -1356,7 +1356,7 @@ void KDialogBase::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
mJanus->setFolderIcon(path,pixmap);
}
-QFrame *KDialogBase::makeMainWidget()
+TQFrame *KDialogBase::makeMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1364,13 +1364,13 @@ QFrame *KDialogBase::makeMainWidget()
return 0;
}
- QFrame *mainWidget = new QFrame( this );
+ TQFrame *mainWidget = new TQFrame( this );
setMainWidget( mainWidget );
return mainWidget;
}
-QVBox *KDialogBase::makeVBoxMainWidget()
+TQVBox *KDialogBase::makeVBoxMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1378,14 +1378,14 @@ QVBox *KDialogBase::makeVBoxMainWidget()
return 0;
}
- QVBox *mainWidget = new QVBox( this );
+ TQVBox *mainWidget = new TQVBox( this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
}
-QHBox *KDialogBase::makeHBoxMainWidget()
+TQHBox *KDialogBase::makeHBoxMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1393,14 +1393,14 @@ QHBox *KDialogBase::makeHBoxMainWidget()
return 0;
}
- QHBox *mainWidget = new QHBox( this );
+ TQHBox *mainWidget = new TQHBox( this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
}
-QGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
+TQGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
{
if( mJanus || mMainWidget )
{
@@ -1408,7 +1408,7 @@ QGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
return 0;
}
- QGrid *mainWidget = new QGrid( n, dir, this );
+ TQGrid *mainWidget = new TQGrid( n, dir, this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
@@ -1428,7 +1428,7 @@ void KDialogBase::printMakeMainWidgetError()
}
-void KDialogBase::setMainWidget( QWidget *widget )
+void KDialogBase::setMainWidget( TQWidget *widget )
{
if( mJanus )
{
@@ -1447,9 +1447,9 @@ void KDialogBase::setMainWidget( QWidget *widget )
}
if( mMainWidget != NULL )
{
- QFocusData* fd = focusData();
- QWidget* prev = fd->last();
- for( QPtrListIterator<KDialogBaseButton> it( d->mButton.list );
+ TQFocusData* fd = focusData();
+ TQWidget* prev = fd->last();
+ for( TQPtrListIterator<KDialogBaseButton> it( d->mButton.list );
it != NULL;
++it )
{
@@ -1461,7 +1461,7 @@ void KDialogBase::setMainWidget( QWidget *widget )
}
-QWidget *KDialogBase::mainWidget()
+TQWidget *KDialogBase::mainWidget()
{
return mMainWidget;
}
@@ -1479,16 +1479,16 @@ int KDialogBase::activePageIndex() const
}
-int KDialogBase::pageIndex( QWidget *widget ) const
+int KDialogBase::pageIndex( TQWidget *widget ) const
{
return ( mJanus ? mJanus->pageIndex( widget) : -1);
}
// Deprecated
-QRect KDialogBase::getContentsRect() const
+TQRect KDialogBase::getContentsRect() const
{
- QRect r;
+ TQRect r;
r.setLeft( marginHint() );
r.setTop( marginHint() + (mUrlHelp ? mUrlHelp->height() : 0) );
r.setRight( width() - marginHint() );
@@ -1525,15 +1525,15 @@ void KDialogBase::getBorderWidths(int& ulx, int& uly, int& lrx, int& lry) const
}
-QSize KDialogBase::calculateSize(int w, int h) const
+TQSize KDialogBase::calculateSize(int w, int h) const
{
int ulx, uly, lrx, lry;
getBorderWidths(ulx, uly, lrx, lry);
- return QSize(ulx+w+lrx,uly+h+lry);
+ return TQSize(ulx+w+lrx,uly+h+lry);
}
-QString KDialogBase::helpLinkText() const
+TQString KDialogBase::helpLinkText() const
{
return ( mHelpLinkText.isNull() ? i18n("Get help...") : mHelpLinkText );
}
@@ -1550,7 +1550,7 @@ void KDialogBase::updateGeometry()
-void KDialogBase::keyPressEvent( QKeyEvent *e )
+void KDialogBase::keyPressEvent( TQKeyEvent *e )
{
//
// Reimplemented from KDialog to remove the default behavior
@@ -1560,7 +1560,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
{
if( e->key() == Key_F1 )
{
- QPushButton *pb = actionButton( Help );
+ TQPushButton *pb = actionButton( Help );
if( pb )
{
pb->animateClick();
@@ -1570,7 +1570,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
}
if( e->key() == Key_Escape )
{
- QPushButton *pb = actionButton( mEscapeButton );
+ TQPushButton *pb = actionButton( mEscapeButton );
if( pb )
{
pb->animateClick();
@@ -1582,7 +1582,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
}
else if( e->key() == Key_F1 && e->state() == ShiftButton )
{
- QWhatsThis::enterWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
e->accept();
return;
}
@@ -1591,7 +1591,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
else if ( e->state() == ControlButton &&
(e->key() == Key_Return || e->key() == Key_Enter) )
{
- QPushButton *pb = actionButton( Ok );
+ TQPushButton *pb = actionButton( Ok );
if ( pb )
{
pb->animateClick();
@@ -1603,12 +1603,12 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
//
// Do the default action instead. Note KDialog::keyPressEvent is bypassed
//
- QDialog::keyPressEvent(e);
+ TQDialog::keyPressEvent(e);
}
-void KDialogBase::hideEvent( QHideEvent *ev )
+void KDialogBase::hideEvent( TQHideEvent *ev )
{
emit hidden();
if (!ev->spontaneous())
@@ -1619,13 +1619,13 @@ void KDialogBase::hideEvent( QHideEvent *ev )
-void KDialogBase::closeEvent( QCloseEvent *e )
+void KDialogBase::closeEvent( TQCloseEvent *e )
{
- QPushButton *pb = actionButton( mEscapeButton );
+ TQPushButton *pb = actionButton( mEscapeButton );
if( pb && isShown() ) {
pb->animateClick();
} else {
- QDialog::closeEvent( e );
+ TQDialog::closeEvent( e );
}
}
@@ -1665,15 +1665,15 @@ bool KDialogBase::haveBackgroundTile()
}
// Deprecated. For compatibility only.
-const QPixmap *KDialogBase::getBackgroundTile() { return backgroundTile(); }
+const TQPixmap *KDialogBase::getBackgroundTile() { return backgroundTile(); }
-const QPixmap *KDialogBase::backgroundTile()
+const TQPixmap *KDialogBase::backgroundTile()
{
return ( mTile ? mTile->get() : 0);
}
-void KDialogBase::setBackgroundTile( const QPixmap *pix )
+void KDialogBase::setBackgroundTile( const TQPixmap *pix )
{
if( mTile )
{
@@ -1686,7 +1686,7 @@ void KDialogBase::updateBackground()
{
if( !mTile || !mTile->get() )
{
- QPixmap nullPixmap;
+ TQPixmap nullPixmap;
setBackgroundPixmap(nullPixmap);
if( d->mButton.box )
{
@@ -1697,7 +1697,7 @@ void KDialogBase::updateBackground()
}
else
{
- const QPixmap *pix = mTile->get();
+ const TQPixmap *pix = mTile->get();
setBackgroundPixmap(*pix);
if( d->mButton.box )
{
@@ -1725,7 +1725,7 @@ void KDialogBase::showTile( bool state )
}
else
{
- const QPixmap *pix = mTile->get();
+ const TQPixmap *pix = mTile->get();
setBackgroundPixmap(*pix);
if( d->mButton.box )
{
@@ -1738,54 +1738,54 @@ void KDialogBase::showTile( bool state )
}
}
-QSize KDialogBase::configDialogSize( const QString& groupName ) const
+TQSize KDialogBase::configDialogSize( const TQString& groupName ) const
{
return configDialogSize( *KGlobal::config(), groupName );
}
-QSize KDialogBase::configDialogSize( KConfig& config,
- const QString& groupName ) const
+TQSize KDialogBase::configDialogSize( KConfig& config,
+ const TQString& groupName ) const
{
int w, h;
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
w = sizeHint().width();
h = sizeHint().height();
KConfigGroupSaver cs(&config, groupName);
- w = config.readNumEntry( QString::fromLatin1("Width %1").arg( desk.width()), w );
- h = config.readNumEntry( QString::fromLatin1("Height %1").arg( desk.height()), h );
+ w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w );
+ h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h );
- return QSize( w, h );
+ return TQSize( w, h );
}
-void KDialogBase::saveDialogSize( const QString& groupName, bool global )
+void KDialogBase::saveDialogSize( const TQString& groupName, bool global )
{
saveDialogSize( *KGlobal::config(), groupName, global );
}
-void KDialogBase::saveDialogSize( KConfig& config, const QString& groupName,
+void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName,
bool global ) const
{
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
KConfigGroupSaver cs(&config, groupName);
- QSize sizeToSave = size();
+ TQSize sizeToSave = size();
- config.writeEntry( QString::fromLatin1("Width %1").arg( desk.width()),
- QString::number( sizeToSave.width()), true, global);
- config.writeEntry( QString::fromLatin1("Height %1").arg( desk.height()),
- QString::number( sizeToSave.height()), true, global);
+ config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()),
+ TQString::number( sizeToSave.width()), true, global);
+ config.writeEntry( TQString::fromLatin1("Height %1").arg( desk.height()),
+ TQString::number( sizeToSave.height()), true, global);
}
KDialogBaseButton::KDialogBaseButton( const KGuiItem &item, int key,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KPushButton( item, parent, name ), mKey(key)
{
}
@@ -1793,8 +1793,8 @@ KDialogBaseButton::KDialogBaseButton( const KGuiItem &item, int key,
-KDialogBaseTile::KDialogBaseTile( QObject *parent, const char *name )
- : QObject( parent, name ), mPixmap(0)
+KDialogBaseTile::KDialogBaseTile( TQObject *parent, const char *name )
+ : TQObject( parent, name ), mPixmap(0)
{
}
@@ -1805,7 +1805,7 @@ KDialogBaseTile::~KDialogBaseTile()
}
-void KDialogBaseTile::set( const QPixmap *pix )
+void KDialogBaseTile::set( const TQPixmap *pix )
{
if( !pix )
{
@@ -1815,7 +1815,7 @@ void KDialogBaseTile::set( const QPixmap *pix )
{
if( !mPixmap )
{
- mPixmap = new QPixmap(*pix);
+ mPixmap = new TQPixmap(*pix);
}
else
{
@@ -1827,7 +1827,7 @@ void KDialogBaseTile::set( const QPixmap *pix )
}
-const QPixmap *KDialogBaseTile::get() const
+const TQPixmap *KDialogBaseTile::get() const
{
return mPixmap;
}
diff --git a/kdeui/kdialogbase.h b/kdeui/kdialogbase.h
index fb46587ad..84b2a425a 100644
--- a/kdeui/kdialogbase.h
+++ b/kdeui/kdialogbase.h
@@ -27,7 +27,7 @@
#include <kjanuswidget.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QPushButton;
class KSeparator;
@@ -83,8 +83,8 @@ class KDialogBaseTile;
* to connect a signal instead of overriding the slot.
* The default implementation of slotHelp() will automatically enable
* the help system if you have provided a path to the help text.
- * slotCancel() and slotClose() will run QDialog::reject()
- * while slotOk() will run QDialog::accept(). You define a default
+ * slotCancel() and slotClose() will run TQDialog::reject()
+ * while slotOk() will run TQDialog::accept(). You define a default
* button in the constructor.
*
* If you don't want any buttons at all because your dialog is special
@@ -147,18 +147,18 @@ class KDialogBaseTile;
* Example:
*
* \code
- * UrlDlg::UrlDlg( QWidget *parent, const QString& caption,
- * const QString& urltext)
+ * UrlDlg::UrlDlg( TQWidget *parent, const TQString& caption,
+ * const TQString& urltext)
* : KDialogBase( parent, "urldialog", true, caption, Ok|Cancel, Ok, true )
* {
- * QWidget *page = new QWidget( this );
+ * TQWidget *page = new TQWidget( this );
* setMainWidget(page);
- * QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ * TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
*
- * QLabel *label = new QLabel( caption, page, "caption" );
+ * TQLabel *label = new TQLabel( caption, page, "caption" );
* topLayout->addWidget( label );
*
- * lineedit = new QLineEdit( urltext, page, "lineedit" );
+ * lineedit = new TQLineEdit( urltext, page, "lineedit" );
* lineedit->setMinimumWidth(fontMetrics().maxWidth()*20);
* topLayout->addWidget( lineedit );
*
@@ -170,14 +170,14 @@ class KDialogBaseTile;
* simpler but you lose the ability to add a stretchable area:
*
* \code
- * UrlDlg::UrlDlg( QWidget *parent, const QString& caption,
- * const QString& urltext)
+ * UrlDlg::UrlDlg( TQWidget *parent, const TQString& caption,
+ * const TQString& urltext)
* : KDialogBase( parent, "urldialog", true, caption, Ok|Cancel, Ok, true )
* {
- * QVBox *page = makeVBoxMainWidget();
- * QLabel *label = new QLabel( caption, page, "caption" );
+ * TQVBox *page = makeVBoxMainWidget();
+ * TQLabel *label = new TQLabel( caption, page, "caption" );
*
- * lineedit = new QLineEdit( urltext, page, "lineedit" );
+ * lineedit = new TQLineEdit( urltext, page, "lineedit" );
* lineedit->setMinimumWidth(fontMetrics().maxWidth()*20);
* }
* \endcode
@@ -227,7 +227,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* @li @p TreeList - A dialog with a tree on the left side and a
* representation of the contents on the right side.
- * @li @p Tabbed - A dialog using a QTabWidget.
+ * @li @p Tabbed - A dialog using a TQTabWidget.
* @li @p Plain - A normal dialog. Use plainPage() as parent for widgets.
* @li @p Swallow - Simplifes the usage of existing widgets. You specify
* the widget to be displayed by setMainWidget().
@@ -267,8 +267,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param user2 User button2 item.
* @param user3 User button3 item.
*/
- KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true,
- const QString &caption=QString::null,
+ KDialogBase( TQWidget *parent=0, const char *name=0, bool modal=true,
+ const TQString &caption=TQString::null,
int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
@@ -302,9 +302,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param user2 User button2 text item.
* @param user3 User button3 text item.
*/
- KDialogBase( int dialogFace, const QString &caption,
+ KDialogBase( int dialogFace, const TQString &caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *parent=0, const char *name=0, bool modal=true,
+ TQWidget *parent=0, const char *name=0, bool modal=true,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
const KGuiItem &user2=KGuiItem(),
@@ -339,8 +339,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*/
KDialogBase( KDialogBase::DialogType dialogFace, WFlags f,
- QWidget *parent=0, const char *name=0, bool modal=true,
- const QString &caption=QString::null,
+ TQWidget *parent=0, const char *name=0, bool modal=true,
+ const TQString &caption=TQString::null,
int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
@@ -378,9 +378,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param no Text to use for the second button (defaults to i18n("No"))
* @param cancel Text to use for the third button (defaults to i18n("Cancel"))
*/
- KDialogBase( const QString &caption, int buttonMask=Yes|No|Cancel,
+ KDialogBase( const TQString &caption, int buttonMask=Yes|No|Cancel,
ButtonCode defaultButton=Yes, ButtonCode escapeButton=Cancel,
- QWidget *parent=0, const char *name=0,
+ TQWidget *parent=0, const char *name=0,
bool modal=true, bool separator=false,
const KGuiItem &yes = KStdGuiItem::yes(), // i18n("&Yes")
const KGuiItem &no = KStdGuiItem::no(), // i18n("&No"),
@@ -420,14 +420,14 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Adjust the size of the dialog to fit the contents just before
- * QDialog::exec() or QDialog::show() is called.
+ * TQDialog::exec() or TQDialog::show() is called.
*
* This method will not be called if the dialog has been explicitly
* resized before showing it.
**/
virtual void adjustSize();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Retrieve the empty page when the predefined layout is used in @p Plain
@@ -439,7 +439,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The widget or 0 if the predefined layout mode is not @p Plain
* or if you don't use any predefined layout.
*/
- QFrame *plainPage();
+ TQFrame *plainPage();
/**
* Add a page to the dialog when the class is used in @p TreeList ,
@@ -452,9 +452,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* create a layout yourself as the example below illustrates:
*
* \code
- * QFrame *page = addPage( i18n("Layout") );
- * QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- * QLabel *label = new QLabel( i18n("Layout type"), page );
+ * TQFrame *page = addPage( i18n("Layout") );
+ * TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ * TQLabel *label = new TQLabel( i18n("Layout type"), page );
* topLayout->addWidget( label );
* ..
* \endcode
@@ -468,9 +468,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QFrame *addPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQFrame *addPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addPage() just above, with the difference that the first
@@ -483,9 +483,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QFrame *addPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQFrame *addPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -497,8 +497,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* use it as follows:
*
* \code
- * QVBox *page = addVBoxPage( i18n("Layout") );
- * QLabel *label = new QLabel( i18n("Layout type"), page );
+ * TQVBox *page = addVBoxPage( i18n("Layout") );
+ * TQLabel *label = new TQLabel( i18n("Layout type"), page );
* ..
* \endcode
*
@@ -511,9 +511,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QVBox *addVBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQVBox *addVBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addVBoxPage() just above, with the difference
@@ -526,9 +526,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QVBox *addVBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQVBox *addVBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -536,7 +536,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* The returned widget must be used as the
* toplevel widget for this particular page. The widget contains a
- * QHBoxLayout layout so the widget children are lined up horizontally.
+ * TQHBoxLayout layout so the widget children are lined up horizontally.
* You can use it as follows:
*
* @param itemName String used in the list or as tab item name.
@@ -548,9 +548,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QHBox *addHBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQHBox *addHBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addHBoxPage() just above, with the
@@ -563,9 +563,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QHBox *addHBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQHBox *addHBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -573,7 +573,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* The returned widget must be used as the
* toplevel widget for this particular page. The widget contains a
- * QGridLayout layout so the widget children are positioned in a grid.
+ * TQGridLayout layout so the widget children are positioned in a grid.
*
* @param n Specifies the number of columns if @p dir is Qt::Horizontal
* or the number of rows if @p dir is Qt::Vertical.
@@ -587,10 +587,10 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QGrid *addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQGrid *addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
@@ -604,10 +604,10 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QGrid *addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQGrid *addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
@@ -616,12 +616,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param path The path for which this icon should be shown.
* @param pixmap The icon used.
**/
- void setFolderIcon(const QStringList &path,const QPixmap &pixmap);
+ void setFolderIcon(const TQStringList &path,const TQPixmap &pixmap);
/**
* Make a main widget.
*
- * The function will make a QFrame widget
+ * The function will make a TQFrame widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget() and @em not if you have used the
@@ -631,12 +631,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QFrame *makeMainWidget();
+ TQFrame *makeMainWidget();
/**
* Make a main widget.
*
- * The function will make a QVBox widget
+ * The function will make a TQVBox widget
* and use setMainWidget() to register it. You @em can use this
* function more than once, but @em not if you have already defined a
* main widget with setMainWidget() and @em not if you have used the
@@ -646,12 +646,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QVBox *makeVBoxMainWidget();
+ TQVBox *makeVBoxMainWidget();
/**
* Make a main widget.
*
- * The function will make a QHBox widget
+ * The function will make a TQHBox widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget() and @p not if you have used the
@@ -661,12 +661,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QHBox *makeHBoxMainWidget();
+ TQHBox *makeHBoxMainWidget();
/**
* Make a main widget.
*
- * The function will make a QGrid widget
+ * The function will make a TQGrid widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget and @em not if you have used the
@@ -680,7 +680,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QGrid *makeGridMainWidget( int n, Orientation dir );
+ TQGrid *makeGridMainWidget( int n, Orientation dir );
/**
@@ -768,7 +768,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The index or -1 if the face is not Tabbed, TreeList or
* IconList
*/
- int pageIndex( QWidget *widget ) const;
+ int pageIndex( TQWidget *widget ) const;
/**
@@ -783,14 +783,14 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* is 0, then the dialog will show an empty space of 100x100 pixels
* instead.
*/
- void setMainWidget( QWidget *widget );
+ void setMainWidget( TQWidget *widget );
/**
* Returns the main widget if any.
*
* @return The current main widget. Can be 0 if no widget has been defined.
*/
- QWidget *mainWidget();
+ TQWidget *mainWidget();
/**
* Convenience method.
@@ -812,7 +812,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param s Startup size.
* @param noResize If @p true the dialog cannot be resized.
*/
- void setInitialSize( const QSize &s, bool noResize=false );
+ void setInitialSize( const TQSize &s, bool noResize=false );
/**
* Convenience method. Add a size to the default minimum size of a
@@ -824,7 +824,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param s Size added to minimum size.
* @param noResize If @p true the dialog cannot be resized.
*/
- void incInitialSize( const QSize &s, bool noResize=false );
+ void incInitialSize( const TQSize &s, bool noResize=false );
/**
* read the dialogs size from the configuration according to the screen size.
@@ -833,7 +833,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param groupName Name of the group to read from. The old group
* of KGlobal::config is preserved.
*/
- QSize configDialogSize( const QString& groupName ) const;
+ TQSize configDialogSize( const TQString& groupName ) const;
/**
* read the dialogs size from the configuration according to the screen size.
@@ -844,7 +844,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* of KGlobal::config is preserved.
* @since 3.2
*/
- QSize configDialogSize( KConfig& config, const QString& groupName ) const;
+ TQSize configDialogSize( KConfig& config, const TQString& groupName ) const;
/**
* save the dialogs size dependant on the screen dimension either to the
@@ -855,7 +855,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param global Set to true if the entry should go to the global config rather
* than to the applications config. Default is false.
*/
- void saveDialogSize( const QString& groupName, bool global=false );
+ void saveDialogSize( const TQString& groupName, bool global=false );
/**
* save the dialogs size dependant on the screen dimension.
@@ -867,7 +867,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* Default is false.
* @since 3.2
*/
- void saveDialogSize( KConfig& config, const QString& groupName,
+ void saveDialogSize( KConfig& config, const TQString& groupName,
bool global=false ) const;
/**
@@ -896,9 +896,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonOKText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonOKText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the appearance of the Apply button.
@@ -926,9 +926,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonApplyText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonApplyText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the appearance of the Cancel button.
@@ -954,9 +954,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonCancelText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonCancelText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the text of any button.
@@ -964,7 +964,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonText( ButtonCode id, const QString &text );
+ void setButtonText( ButtonCode id, const TQString &text );
/**
* Sets the tooltip text of any button.
@@ -972,7 +972,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonTip( ButtonCode id, const QString &text );
+ void setButtonTip( ButtonCode id, const TQString &text );
/**
* Sets the "What's this?" text of any button.
@@ -980,7 +980,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonWhatsThis( ButtonCode id, const QString &text );
+ void setButtonWhatsThis( ButtonCode id, const TQString &text );
/**
* Sets the KGuiItem directly for the button instead of using 3 methods to
@@ -1025,7 +1025,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* This function has only effect in TreeList mode.
*
* This tells the widgets whether the root should be decorated.
- * For details see QListView::setRootIsDecorated
+ * For details see TQListView::setRootIsDecorated
*
* @param state Root will be decorated if true.
**/
@@ -1054,7 +1054,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* KJanusWidget, too. To be on the save side just don't keep
* the pointer to this widget.
*/
- void addWidgetBelowList( QWidget * widget );
+ void addWidgetBelowList( TQWidget * widget );
/**
* Add a button at the bottom of the TreeList/IconList.
@@ -1066,7 +1066,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @since 3.2
*/
- void addButtonBelowList( const QString & text, QObject * recv, const char * slot );
+ void addButtonBelowList( const TQString & text, TQObject * recv, const char * slot );
/**
* The same as the above function, but with a KGuiItem providing the text
@@ -1079,7 +1079,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @since 3.2
*/
- void addButtonBelowList( const KGuiItem & guiitem, QObject * recv, const char * slot );
+ void addButtonBelowList( const KGuiItem & guiitem, TQObject * recv, const char * slot );
/**
* This function has only effect in IconList mode.
@@ -1108,12 +1108,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The tile pointer or 0 if no tile is defined.
*
**/
- static const QPixmap *backgroundTile();
+ static const TQPixmap *backgroundTile();
/**
* @deprecated
* Use backgroundTile() instead.
*/
- static const QPixmap *getBackgroundTile() KDE_DEPRECATED;
+ static const TQPixmap *getBackgroundTile() KDE_DEPRECATED;
/**
* Sets the background tile.
@@ -1122,7 +1122,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @param pix The background tile.
*/
- static void setBackgroundTile( const QPixmap *pix );
+ static void setBackgroundTile( const TQPixmap *pix );
/**
* Enable hiding of the background tile (if any).
@@ -1155,7 +1155,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* If you need the "overhead" the dialog needs for its elements,
* use getBorderWidths().
*/
- QRect getContentsRect() const KDE_DEPRECATED;
+ TQRect getContentsRect() const KDE_DEPRECATED;
/**
* Calculate the size hint for the dialog.
@@ -1174,7 +1174,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The minimum width and height of the dialog using @p w and @p h
* as the size of the main widget.
*/
- QSize calculateSize( int w, int h ) const;
+ TQSize calculateSize( int w, int h ) const;
/**
* Returns the help link text.
@@ -1184,7 +1184,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @return The help link text.
*/
- QString helpLinkText() const;
+ TQString helpLinkText() const;
/**
* Returns the action button that corresponds to the @p id.
@@ -1197,9 +1197,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id Integer identifier of the button.
* @return The action button or 0 if the button does not exists.
*
- * FIXME KDE 4: Return the actual KPushButton instead of QPushButton (Martijn)
+ * FIXME KDE 4: Return the actual KPushButton instead of TQPushButton (Martijn)
*/
- QPushButton *actionButton( ButtonCode id );
+ TQPushButton *actionButton( ButtonCode id );
public slots:
/**
@@ -1257,7 +1257,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @param text The link text.
*/
- void setHelpLinkText( const QString &text );
+ void setHelpLinkText( const TQString &text );
/**
* Sets the help path and topic.
@@ -1271,13 +1271,13 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* function for Dialogs of that type. See
* KCMultiDialog::slotHelp() for more information.
*/
- void setHelp( const QString &anchor,
- const QString &appname = QString::null );
+ void setHelp( const TQString &anchor,
+ const TQString &appname = TQString::null );
/**
* Connected to help link label.
*/
- void helpClickedSlot( const QString & );
+ void helpClickedSlot( const TQString & );
/**
* Sets the status of the Details button.
@@ -1290,7 +1290,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* The dialog takes over ownership of the widget.
* Any previously set widget gets deleted.
*/
- void setDetailsWidget(QWidget *detailsWidget);
+ void setDetailsWidget(TQWidget *detailsWidget);
/**
* This method is called automatically whenever the background has
@@ -1428,7 +1428,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* A page is about to be shown. This signal is only emitted for the TreeList
* and IconList faces.
*/
- void aboutToShowPage(QWidget *page);
+ void aboutToShowPage(TQWidget *page);
protected:
/**
@@ -1436,21 +1436,21 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* button if present and Escape to the Cancel or Close if present. The
* button action event is animated.
*/
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/**
* Emits the #hidden signal. You can connect to that signal to
* detect when a dialog has been closed.
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
/**
* Detects when a dialog is being closed from the window manager
* controls. If the Cancel or Close button is present then the button
- * is activated. Otherwise standard QDialog behavior
+ * is activated. Otherwise standard TQDialog behavior
* will take place.
*/
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
protected slots:
/**
@@ -1487,7 +1487,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Activated when the Ok button has been clicked. The
- * QDialog::accept() is activated.
+ * TQDialog::accept() is activated.
*/
virtual void slotOk();
@@ -1503,26 +1503,26 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Activated when the Yes button has been clicked. The
- * QDialog::done( Yes ) is activated.
+ * TQDialog::done( Yes ) is activated.
*/
virtual void slotYes();
/**
* Activated when the Yes button has been clicked. The
- * QDialog::done( No ) is activated.
+ * TQDialog::done( No ) is activated.
*/
virtual void slotNo();
/**
* Activated when the Cancel button has been clicked. The
- * QDialog::reject() is activated in regular mode and
- * QDialog::done( Cancel ) when in message box mode.
+ * TQDialog::reject() is activated in regular mode and
+ * TQDialog::done( Cancel ) when in message box mode.
*/
virtual void slotCancel();
/**
* Activated when the Close button has been clicked. The
- * QDialog::reject() is activated.
+ * TQDialog::reject() is activated.
*/
virtual void slotClose();
@@ -1540,7 +1540,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Deletes the dialog immediately. If you want to delete the dialog
- * delayed use delayedDestruct() or QObject::deleteLater().
+ * delayed use delayedDestruct() or TQObject::deleteLater().
*
* Attention: Do no use connect this slot to signals from user
* actions!
@@ -1584,7 +1584,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param isDefault If true, make the button default
* @param isFocus If true, give the button focus.
*/
- void setButtonFocus( QPushButton *p, bool isDefault, bool isFocus );
+ void setButtonFocus( TQPushButton *p, bool isDefault, bool isFocus );
/**
* Prints an error message using qDebug if makeMainWidget ,
@@ -1603,17 +1603,17 @@ class KDEUI_EXPORT KDialogBase : public KDialog
private:
- QBoxLayout *mTopLayout;
- QWidget *mMainWidget;
+ TQBoxLayout *mTopLayout;
+ TQWidget *mMainWidget;
KURLLabel *mUrlHelp;
KJanusWidget *mJanus;
KSeparator *mActionSep;
bool mIsActivated;
- QString mAnchor;
- QString mHelpApp;
- QString mHelpLinkText;
+ TQString mAnchor;
+ TQString mHelpApp;
+ TQString mHelpLinkText;
static KDialogBaseTile *mTile;
bool mShowTile;
diff --git a/kdeui/kdialogbase_priv.h b/kdeui/kdialogbase_priv.h
index 8bfc6596e..a5bbf31be 100644
--- a/kdeui/kdialogbase_priv.h
+++ b/kdeui/kdialogbase_priv.h
@@ -33,7 +33,7 @@ class KDEUI_EXPORT KDialogBaseButton : public KPushButton
Q_OBJECT
public:
- KDialogBaseButton( const KGuiItem &text, int key, QWidget *parent=0,
+ KDialogBaseButton( const KGuiItem &text, int key, TQWidget *parent=0,
const char *name=0 );
inline int id();
@@ -50,11 +50,11 @@ class KDEUI_EXPORT KDialogBaseTile : public QObject
Q_OBJECT
public:
- KDialogBaseTile( QObject *parent=0, const char *name=0 );
+ KDialogBaseTile( TQObject *parent=0, const char *name=0 );
~KDialogBaseTile();
- void set( const QPixmap *pix );
- const QPixmap *get() const;
+ void set( const TQPixmap *pix );
+ const TQPixmap *get() const;
public slots:
void cleanup();
@@ -63,7 +63,7 @@ class KDEUI_EXPORT KDialogBaseTile : public QObject
void pixmapChanged();
private:
- QPixmap *mPixmap;
+ TQPixmap *mPixmap;
class KDialogBaseTilePrivate;
KDialogBaseTilePrivate *d;
};
diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp
index eded26c55..33ba5e362 100644
--- a/kdeui/kdockwidget.cpp
+++ b/kdeui/kdockwidget.cpp
@@ -21,16 +21,16 @@
#include "kdockwidget_private.h"
#include "kdockwidget_p.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qcursor.h>
-#include <qwidgetlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqcursor.h>
+#include <tqwidgetlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#ifndef NO_KDE2
#include <kconfig.h>
@@ -49,8 +49,8 @@
#endif
#else
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#endif
#include <stdlib.h>
@@ -99,10 +99,10 @@ static const char* const not_close_xpm[]={
*
* @author Max Judin.
*/
-KDockMainWindow::KDockMainWindow( QWidget* parent, const char *name, WFlags f)
+KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f)
:KMainWindow( parent, name, f )
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -119,7 +119,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
dockManager->setMainDockWidget2(mdw);
}
-void KDockMainWindow::setView( QWidget *view )
+void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
@@ -128,11 +128,11 @@ void KDockMainWindow::setView( QWidget *view )
#ifndef NO_KDE2
KMainWindow::setCentralWidget(view);
#else
- QMainWindow::setCentralWidget(view);
+ TQMainWindow::setCentralWidget(view);
#endif
}
-KDockWidget* KDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -149,28 +149,28 @@ void KDockMainWindow::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockMainWindow::makeWidgetDockVisible( QWidget* widget )
+void KDockMainWindow::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockMainWindow::writeDockConfig(QDomElement &base)
+void KDockMainWindow::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockMainWindow::readDockConfig(QDomElement &base)
+void KDockMainWindow::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
#ifndef NO_KDE2
-void KDockMainWindow::writeDockConfig( KConfig* c, QString group )
+void KDockMainWindow::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockMainWindow::readDockConfig( KConfig* c, QString group )
+void KDockMainWindow::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -178,7 +178,7 @@ void KDockMainWindow::readDockConfig( KConfig* c, QString group )
void KDockMainWindow::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
@@ -186,7 +186,7 @@ void KDockMainWindow::slotDockWidgetUndocked()
/*************************************************************************/
KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
@@ -197,19 +197,19 @@ KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent,
{
}
-void KDockWidgetHeaderDrag::paintEvent( QPaintEvent* )
+void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
{
- QPainter paint;
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
/*************************************************************************/
KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
}
/*************************************************************************/
@@ -217,44 +217,44 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
:KDockWidgetAbstractHeader( parent, name )
{
#ifdef BORDERLESS_WINDOWS
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
d = new KDockWidgetHeaderPrivate( this );
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
drag = new KDockWidgetHeaderDrag( this, parent );
closeButton = new KDockButton_Private( this, "DockCloseButton" );
- QToolTip::add( closeButton, i18n("Close") );
- closeButton->setPixmap( style().stylePixmap (QStyle::SP_TitleBarCloseButton , this));
+ TQToolTip::add( closeButton, i18n("Close") );
+ closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
- connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
stayButton = new KDockButton_Private( this, "DockStayButton" );
- QToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
+ TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
stayButton->setToggleButton( true );
stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked()));
+ connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked()));
dockbackButton = new KDockButton_Private( this, "DockbackButton" );
- QToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
+ TQToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
- QToolTip::add( d->toDesktopButton, i18n("Detach") );
+ TQToolTip::add( d->toDesktopButton, i18n("Detach") );
d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm));
d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( d->toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop()));
+ connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
stayButton->hide();
- d->dummy = new QWidget( this );
+ d->dummy = new TQWidget( this );
d->dummy->setFixedSize( 1,closeButton->pixmap()->height() );
@@ -295,7 +295,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
@@ -318,13 +318,13 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
if ( !nd ) return;
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
delete drag;
drag = nd;
if (drag->parentWidget()!=this) {
- drag->reparent(this,QPoint(0,0));
+ drag->reparent(this,TQPoint(0,0));
}
@@ -336,7 +336,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -352,7 +352,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
if (!btn) return;
if (btn->parentWidget()!=this) {
- btn->reparent(this,QPoint(0,0));
+ btn->reparent(this,TQPoint(0,0));
}
btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
if (!d->btns.containsRef(btn)) d->btns.append(btn);
@@ -360,8 +360,8 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
btn->show();
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( drag );
layout->addWidget( dockbackButton );
@@ -371,7 +371,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -422,12 +422,12 @@ void KDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void KDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
}
void KDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
}
#endif
@@ -439,12 +439,12 @@ public:
/**
* This rectangle is used to highlight the current dockposition. It stores global screen coordinates.
*/
- QRect dragRect;
+ TQRect dragRect;
/**
* This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates.
*/
- QRect oldDragRect;
+ TQRect oldDragRect;
/**
* This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event.
@@ -454,7 +454,7 @@ public:
/**
* This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget.
*/
- QPoint dragOffset;
+ TQPoint dragOffset;
/**
* These flags store information about the splitter behavior
@@ -463,30 +463,30 @@ public:
bool splitterKeepSize;
bool splitterHighResolution;
- QGuardedPtr<KDockWidget> mainDockWidget;
+ TQGuardedPtr<KDockWidget> mainDockWidget;
- QObjectList containerDocks;
+ TQObjectList containerDocks;
- QGuardedPtr<KDockWidget> leftContainer;
- QGuardedPtr<KDockWidget> topContainer;
- QGuardedPtr<KDockWidget> rightContainer;
- QGuardedPtr<KDockWidget> bottomContainer;
+ TQGuardedPtr<KDockWidget> leftContainer;
+ TQGuardedPtr<KDockWidget> topContainer;
+ TQGuardedPtr<KDockWidget> rightContainer;
+ TQGuardedPtr<KDockWidget> bottomContainer;
int m_readDockConfigMode;
};
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
#ifdef BORDERLESS_WINDOWS
-: QWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
#else
-: QWidget( parent, name, f )
+: TQWidget( parent, name, f )
#endif
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
,formerDockPos(DockNone)
,widget(0L)
- ,pix(new QPixmap(pixmap))
+ ,pix(new TQPixmap(pixmap))
,prevSideDockPosBeforeDrag(DockNone)
,isGroup(false)
{
@@ -494,8 +494,8 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
d->_parent = parent;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
manager = dockManager;
manager->childDock->append( this );
@@ -522,18 +522,18 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
setIcon( pixmap);
widget = 0L;
- QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) );
- applyToWidget( parent, QPoint(0,0) );
+ TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
+ applyToWidget( parent, TQPoint(0,0) );
}
-void KDockWidget::setPixmap(const QPixmap& pixmap) {
+void KDockWidget::setPixmap(const TQPixmap& pixmap) {
delete pix;
- pix=new QPixmap(pixmap);
+ pix=new TQPixmap(pixmap);
setIcon(*pix);
KDockTabGroup *dtg=parentDockTabGroup();
if (dtg)
dtg->changeTab(this,pixmap,dtg->tabLabel(this));
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
if (contWid) {
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
@@ -542,7 +542,7 @@ void KDockWidget::setPixmap(const QPixmap& pixmap) {
}
}
-const QPixmap& KDockWidget::pixmap() const {
+const TQPixmap& KDockWidget::pixmap() const {
return *pix;
}
@@ -569,25 +569,25 @@ KDockWidget::~KDockWidget()
d=0;
}
-void KDockWidget::paintEvent(QPaintEvent* pe)
+void KDockWidget::paintEvent(TQPaintEvent* pe)
{
- QWidget::paintEvent(pe);
- QPainter paint;
+ TQWidget::paintEvent(pe);
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_Panel, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
-void KDockWidget::leaveEvent(QEvent *e)
+void KDockWidget::leaveEvent(TQEvent *e)
{
- QWidget::leaveEvent(e);
+ TQWidget::leaveEvent(e);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
-// setCursor(QCursor(ArrowCursor));
+// setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::mousePressEvent(QMouseEvent* mme)
+void KDockWidget::mousePressEvent(TQMouseEvent* mme)
{
#ifdef BORDERLESS_WINDOWS
if (!parent())
@@ -599,9 +599,9 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -613,52 +613,52 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
if (btop)
{
d->resizeMode=KDockWidgetPrivate::ResizeTopRight;
- d->resizePos=QPoint(width(),0)-mme->pos();
+ d->resizePos=TQPoint(width(),0)-mme->pos();
}
else
{
- d->resizePos=QPoint(width(),height())-mme->pos();
+ d->resizePos=TQPoint(width(),height())-mme->pos();
if (bbottom) d->resizeMode=KDockWidgetPrivate::ResizeBottomRight;
else d->resizeMode=KDockWidgetPrivate::ResizeRight;
}
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
if (bbottom)
{
d->resizeMode=KDockWidgetPrivate::ResizeBottom;
- d->resizePos=QPoint(0,height())-mme->pos();
+ d->resizePos=TQPoint(0,height())-mme->pos();
}
else
- if (btop) setCursor(QCursor(SizeVerCursor));
+ if (btop) setCursor(TQCursor(SizeVerCursor));
else d->resizing=false;
if (d->resizing) grabMouse(cursor());
}
#endif
- QWidget::mousePressEvent(mme);
+ TQWidget::mousePressEvent(mme);
}
-void KDockWidget::mouseReleaseEvent(QMouseEvent* ev)
+void KDockWidget::mouseReleaseEvent(TQMouseEvent* ev)
{
#ifdef BORDERLESS_WINDOWS
d->resizing=false;
releaseMouse();
#endif
- QWidget::mouseReleaseEvent(ev);
+ TQWidget::mouseReleaseEvent(ev);
}
-void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
+void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
{
- QWidget::mouseMoveEvent(mme);
+ TQWidget::mouseMoveEvent(mme);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
@@ -687,9 +687,9 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -697,25 +697,25 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
kdDebug(282)<<"mousemovevent"<<endl;
if (bright)
{
- if (btop) setCursor(QCursor(SizeBDiagCursor));
+ if (btop) setCursor(TQCursor(SizeBDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeFDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeFDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
- if (bbottom || btop) setCursor(QCursor(SizeVerCursor));
- else setCursor(QCursor(ArrowCursor));
+ if (bbottom || btop) setCursor(TQCursor(SizeVerCursor));
+ else setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::setLatestKDockContainer(QWidget* container)
+void KDockWidget::setLatestKDockContainer(TQWidget* container)
{
if (container)
{
@@ -726,7 +726,7 @@ void KDockWidget::setLatestKDockContainer(QWidget* container)
}
}
-QWidget* KDockWidget::latestKDockContainer()
+TQWidget* KDockWidget::latestKDockContainer()
{
if (!(d->container)) return 0;
if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container;
@@ -747,8 +747,8 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h )
delete header;
delete layout;
header = h;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( header );
setWidget( widget );
} else {
@@ -775,7 +775,7 @@ void KDockWidget::updateHeader()
#ifdef BORDERLESS_WINDOWS
layout->setMargin(0);
setMouseTracking(false);
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
@@ -791,18 +791,18 @@ void KDockWidget::updateHeader()
header->setTopLevel( true );
header->show();
#ifdef BORDERLESS_WINDOWS
- layout->setMargin(2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this));
+ layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this));
setMouseTracking(true);
#endif
}
}
-void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
+void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( parent() != s )
{
hide();
- reparent(s, 0, QPoint(0,0), false);
+ reparent(s, 0, TQPoint(0,0), false);
}
if ( s && s->inherits("KDockMainWindow") ){
@@ -810,7 +810,7 @@ void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
}
if ( manager && s == manager->main ){
- setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) );
+ setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
}
if ( !s )
@@ -846,10 +846,10 @@ void KDockWidget::show()
if ( parent() ){
makeDockVisible();
} else {
- QWidget::show();
+ TQWidget::show();
}
} else {
- QWidget::show();
+ TQWidget::show();
}
}
@@ -858,46 +858,46 @@ void KDockWidget::show()
void KDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
#endif
-void KDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled)
+void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
{
d->_parent = parent;
d->transient = transientEnabled;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
-QWidget *KDockWidget::transientTo() {
+TQWidget *KDockWidget::transientTo() {
if (d->transient && d->_parent) return d->_parent; else return 0;
}
-bool KDockWidget::event( QEvent *event )
+bool KDockWidget::event( TQEvent *event )
{
switch ( event->type() )
{
#undef FocusIn
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if (widget && !d->pendingFocusInEvent) {
d->pendingFocusInEvent = true;
widget->setFocus();
}
d->pendingFocusInEvent = false;
break;
- case QEvent::ChildRemoved:
- if ( widget == ((QChildEvent*)event)->child() ) widget = 0L;
+ case TQEvent::ChildRemoved:
+ if ( widget == ((TQChildEvent*)event)->child() ) widget = 0L;
break;
- case QEvent::Show:
+ case TQEvent::Show:
if ( widget ) widget->show();
emit manager->change();
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if ( widget ) widget->hide();
emit manager->change();
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
if ( parentWidget() ){
if ( parent()->inherits("KDockSplitter") ){
((KDockSplitter*)(parent()))->updateName();
@@ -908,13 +908,13 @@ bool KDockWidget::event( QEvent *event )
}
}
break;
- case QEvent::Close:
+ case TQEvent::Close:
emit iMBeingClosed();
break;
default:
break;
}
- return QWidget::event( event );
+ return TQWidget::event( event );
}
KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
@@ -944,7 +944,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
}
-KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex )
+KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex )
{
if (this == target)
return 0L; // docking to itself not possible
@@ -1043,10 +1043,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( parentTab ){
// add to existing TabGroup
applyToWidget( parentTab );
- parentTab->insertTab( this, icon() ? *icon() : QPixmap(),
+ parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
setDockTabName( parentTab );
@@ -1060,7 +1060,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
else
{
// kdDebug(282)<<"Looking for KDockContainer"<<endl;
- QWidget *contWid=target->parentDockContainer();
+ TQWidget *contWid=target->parentDockContainer();
if (!contWid) contWid=target->widget;
if (contWid)
{
@@ -1075,7 +1075,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// kdDebug(282)<<"KDockContainerFound"<<endl;
applyToWidget( contWid );
- cont->insertWidget( this, icon() ? *icon() : QPixmap(),
+ cont->insertWidget( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setLatestKDockContainer(contWid);
// setDockTabName( parentTab );
@@ -1091,8 +1091,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// create a new dockwidget that will contain the target and this
- QWidget* parentDock = target->parentWidget();
- KDockWidget* newDock = new KDockWidget( manager, "tempName", QPixmap(""), parentDock );
+ TQWidget* parentDock = target->parentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == KDockWidget::DockCenter ){
@@ -1124,14 +1124,14 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( dockPos == KDockWidget::DockCenter )
{
KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab");
- QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*)));
+ TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*)));
newDock->setWidget( tab );
target->applyToWidget( tab );
applyToWidget( tab );
- tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(),
+ tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(),
target->tabPageLabel() );
@@ -1139,11 +1139,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if( !target->toolTipString().isEmpty())
tab->setTabToolTip( target, target->toolTipString());
- tab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QRect geom=newDock->geometry();
- QWidget *wantTransient=tab->transientTo();
+ TQRect geom=newDock->geometry();
+ TQWidget *wantTransient=tab->transientTo();
newDock->setDockWindowTransient(wantTransient,wantTransient);
newDock->setGeometry(geom);
@@ -1218,15 +1218,15 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
KDockTabGroup* KDockWidget::parentDockTabGroup() const
{
if ( !parent() ) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
}
-QWidget *KDockWidget::parentDockContainer() const
+TQWidget *KDockWidget::parentDockContainer() const
{
if (!parent()) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
}
@@ -1275,7 +1275,7 @@ void KDockWidget::restoreFromForcedFixedSize()
void KDockWidget::toDesktop()
{
- QPoint p = mapToGlobal( QPoint( -30, -30 ) );
+ TQPoint p = mapToGlobal( TQPoint( -30, -30 ) );
if( p.x( ) < 0 )
p.setX( 0 );
if( p.y( ) < 0 )
@@ -1292,10 +1292,10 @@ void KDockWidget::undock()
{
// kdDebug(282)<<"KDockWidget::undock()"<<endl;
- manager->d->dragRect = QRect ();
+ manager->d->dragRect = TQRect ();
manager->drawDragRectangle ();
- QWidget* parentW = parentWidget();
+ TQWidget* parentW = parentWidget();
if ( !parentW ){
hide();
if (!d->blockHasUndockedSignal)
@@ -1317,7 +1317,7 @@ void KDockWidget::undock()
d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
parentTab->removePage( this );
/*
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
*/
setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
@@ -1327,7 +1327,7 @@ void KDockWidget::undock()
// last subdock widget in the tab control
KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
parentTab->removePage( lastTab );
-/* QWidget *wantTransient=parentTab->transientTo();
+/* TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);*/
lastTab->applyToWidget( 0L );
@@ -1337,7 +1337,7 @@ void KDockWidget::undock()
KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
delete parentTab; // KDockTabGroup
- QWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
if ( !parentOfDockWidget ){
if ( isV ) lastTab->show();
} else {
@@ -1376,7 +1376,7 @@ void KDockWidget::undock()
}
} else {
/*********************************************************************************************/
- //QWidget* containerWidget = (QWidget*)parent();
+ //TQWidget* containerWidget = (TQWidget*)parent();
bool undockedFromContainer=false;
if (d->container)
{
@@ -1405,7 +1405,7 @@ void KDockWidget::undock()
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- QWidget* obj = group->parentWidget();
+ TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("KDockSplitter") ){
KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
@@ -1445,22 +1445,22 @@ void KDockWidget::undock()
emit hasUndocked();
}
-void KDockWidget::setWidget( QWidget* mw )
+void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( mw->parent() != this ){
- mw->reparent(this, 0, QPoint(0,0), false);
+ mw->reparent(this, 0, TQPoint(0,0), false);
}
#ifdef BORDERLESS_WINDOWS
- if (!mw->ownCursor()) mw->setCursor(QCursor(ArrowCursor));
+ if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor));
#endif
widget = mw;
delete layout;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
if (dc)
@@ -1484,10 +1484,10 @@ void KDockWidget::setWidget( QWidget* mw )
void KDockWidget::setDockTabName( KDockTabGroup* tab )
{
- QString listOfName;
- QString listOfCaption;
+ TQString listOfName;
+ TQString listOfCaption;
for ( int i = 0; i < tab->count(); ++i ) {
- QWidget *w = tab->page( i );
+ TQWidget *w = tab->page( i );
listOfCaption.append( w->caption() ).append(",");
listOfName.append( w->name() ).append(",");
}
@@ -1537,7 +1537,7 @@ void KDockWidget::makeDockVisible()
parentDockTabGroup()->showPage( this );
}
if (parentDockContainer()) {
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
x->showWidget(this);
@@ -1545,7 +1545,7 @@ void KDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- QWidget* p = parentWidget();
+ TQWidget* p = parentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
@@ -1560,15 +1560,15 @@ void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget)
{
formerBrotherDockWidget = dockWidget;
if( formerBrotherDockWidget )
- QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
}
void KDockWidget::loseFormerBrotherDockWidget()
{
if( formerBrotherDockWidget )
- QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L;
repaint();
}
@@ -1578,12 +1578,12 @@ void KDockWidget::dockBack()
if( formerBrotherDockWidget) {
// search all children if it tries to dock back to a child
bool found = false;
- QObjectList* cl = queryList("KDockWidget");
- QObjectListIt it( *cl );
- QObject * obj;
+ TQObjectList* cl = queryList("KDockWidget");
+ TQObjectListIt it( *cl );
+ TQObject * obj;
while ( !found && (obj=it.current()) != 0 ) {
++it;
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
if( widg == formerBrotherDockWidget)
found = true;
}
@@ -1591,7 +1591,7 @@ void KDockWidget::dockBack()
if( !found) {
// can dock back to the former brother dockwidget
- manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
makeDockVisible();
return;
@@ -1599,7 +1599,7 @@ void KDockWidget::dockBack()
}
// else dockback to the dockmainwindow (default behavior)
- manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
if (parent())
makeDockVisible();
@@ -1616,8 +1616,8 @@ bool KDockWidget::isDockBackPossible() const
/**************************************************************************************/
-KDockManager::KDockManager( QWidget* mainWindow , const char* name )
-:QObject( mainWindow, name )
+KDockManager::KDockManager( TQWidget* mainWindow , const char* name )
+:TQObject( mainWindow, name )
,main(mainWindow)
,currentDragWidget(0L)
,currentMoveWidget(0L)
@@ -1648,20 +1648,20 @@ KDockManager::KDockManager( QWidget* mainWindow , const char* name )
undockProcess = false;
- menuData = new QPtrList<MenuDockData>;
+ menuData = new TQPtrList<MenuDockData>;
menuData->setAutoDelete( true );
menuData->setAutoDelete( true );
#ifndef NO_KDE2
menu = new KPopupMenu();
#else
- menu = new QPopupMenu();
+ menu = new TQPopupMenu();
#endif
- connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
- connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) );
+ connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) );
+ connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) );
- childDock = new QObjectList();
+ childDock = new TQObjectList();
childDock->setAutoDelete( false );
}
@@ -1676,7 +1676,7 @@ KDockManager::~KDockManager()
delete menuData;
delete menu;
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1689,7 +1689,7 @@ KDockManager::~KDockManager()
void KDockManager::activate()
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1699,17 +1699,17 @@ void KDockManager::activate()
obj->show();
}
}
- if ( !main->inherits("QDialog") ) main->show();
+ if ( !main->inherits("TQDialog") ) main->show();
}
-bool KDockManager::eventFilter( QObject *obj, QEvent *event )
+bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
{
if ( obj->inherits("KDockWidgetAbstractHeaderDrag") ){
KDockWidget* pDockWdgAtCursor = 0L;
KDockWidget* curdw = ((KDockWidgetAbstractHeaderDrag*)obj)->dockWidget();
switch ( event->type() ){
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (curdw->currentDockPos == KDockWidget::DockDesktop) curdw->dockBack();
else
{
@@ -1718,8 +1718,8 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
break;
- case QEvent::MouseButtonPress:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonPress:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( curdw->eDocking != (int)KDockWidget::DockNone ){
dropCancel = true;
curdw->setFocus();
@@ -1727,24 +1727,24 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
currentDragWidget = curdw;
currentMoveWidget = 0L;
- childDockWidgetList = new QWidgetList();
+ childDockWidgetList = new TQWidgetList();
childDockWidgetList->append( curdw );
findChildDockWidget( curdw, childDockWidgetList );
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
d->readyToDrag = true;
- d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0));
+ d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0));
}
}
break;
- case QEvent::MouseButtonRelease:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonRelease:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( dragging ){
if ( !dropCancel )
drop();
@@ -1753,9 +1753,9 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
if (d->readyToDrag) {
d->readyToDrag = false;
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
currentDragWidget = 0L;
@@ -1766,7 +1766,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
dropCancel = true;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( dragging ) {
#ifdef BORDERLESS_WINDOWS
@@ -1774,31 +1774,31 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
KDockWidget *oldMoveWidget;
if (!curdw->parent())
{
- curdw->move(QCursor::pos()-d->dragOffset);
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos()-QPoint(0,d->dragOffset.y()+3) );
+ curdw->move(TQCursor::pos()-d->dragOffset);
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) );
oldMoveWidget = currentMoveWidget;
}
else
{
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
oldMoveWidget = currentMoveWidget;
}
//END TEST
#else
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
KDockWidget* oldMoveWidget = currentMoveWidget;
#endif
if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move
- dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) );
+ dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) );
break;
} else {
if (dropCancel && curdw) {
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
}else
- d->dragRect = QRect();
+ d->dragRect = TQRect();
drawDragRectangle();
}
@@ -1822,7 +1822,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
}
- if ( (((QMouseEvent*)event)->state() == LeftButton) &&
+ if ( (((TQMouseEvent*)event)->state() == LeftButton) &&
(curdw->eDocking != (int)KDockWidget::DockNone) ) {
startDrag( curdw);
}
@@ -1832,10 +1832,10 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
break;
}
}
- return QObject::eventFilter( obj, event );
+ return TQObject::eventFilter( obj, event );
}
-KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
+KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
{
dropCancel = true;
@@ -1844,7 +1844,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
if (currentDragWidget->eDocking == (int)KDockWidget::DockNone ) return 0L;
- QWidget* p = QApplication::widgetAt( pos );
+ TQWidget* p = TQApplication::widgetAt( pos );
if ( !p ) {
dropCancel = false;
return 0L;
@@ -1852,7 +1852,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
p = p->topLevelWidget();
#endif
- QWidget* w = 0L;
+ TQWidget* w = 0L;
findChildDockWidget( w, p, p->mapFromGlobal(pos) );
if ( !w ){
if ( !p->inherits("KDockWidget") ) {
@@ -1874,7 +1874,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return 0L;
KDockWidget::DockPosition curPos = KDockWidget::DockDesktop;
- QPoint cpos = www->mapFromGlobal( pos );
+ TQPoint cpos = www->mapFromGlobal( pos );
int ww = www->widget->width() / 3;
int hh = www->widget->height() / 3;
@@ -1901,15 +1901,15 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return www;
}
-void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos )
+void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() && w->geometry().contains(pos) ) {
if ( w->inherits("KDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) );
@@ -1922,15 +1922,15 @@ void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QP
return;
}
-void KDockManager::findChildDockWidget( const QWidget* p, QWidgetList*& list )
+void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() ) {
if ( w->inherits("KDockWidget") ) list->append( w );
findChildDockWidget( w, list );
@@ -1957,15 +1957,15 @@ void KDockManager::startDrag( KDockWidget* w )
curPos = KDockWidget::DockDesktop;
dragging = true;
- QApplication::setOverrideCursor(QCursor(sizeAllCursor));
+ TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
}
-void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
+void KDockManager::dragMove( KDockWidget* dw, TQPoint pos )
{
- QPoint p = dw->mapToGlobal( dw->widget->pos() );
+ TQPoint p = dw->mapToGlobal( dw->widget->pos() );
KDockWidget::DockPosition oldPos = curPos;
- QSize r = dw->widget->size();
+ TQSize r = dw->widget->size();
if ( dw->parentDockTabGroup() ){
curPos = KDockWidget::DockCenter;
if ( oldPos != curPos ) {
@@ -2010,34 +2010,34 @@ void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
void KDockManager::cancelDrop()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
}
void KDockManager::drop()
{
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
if ( dropCancel ) return;
if ( !currentMoveWidget && (!(currentDragWidget->eDocking & (int)KDockWidget::DockDesktop)) ) {
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
return;
}
if ( !currentMoveWidget && !currentDragWidget->parent() ) {
- currentDragWidget->move( QCursor::pos() - d->dragOffset );
+ currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
// curPos is the current target DockPosition.
@@ -2088,63 +2088,63 @@ void KDockManager::drop()
}
// set new prevSideDockPosBeforeDrag
currentDragWidget->prevSideDockPosBeforeDrag = curPos;
- currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset );
+ currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset );
currentDragWidget->makeDockVisible();
}
}
-static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str)
+static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
el.appendChild(doc.createTextNode(str));
return el;
}
-static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b)
+static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b)
{
- return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false"));
+ return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false"));
}
-static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n)
+static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n)
{
- return createStringEntry(doc, tagName, QString::number(n));
+ return createStringEntry(doc, tagName, TQString::number(n));
}
-static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect)
+static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QDomElement xel = doc.createElement("x");
- xel.appendChild(doc.createTextNode(QString::number(rect.x())));
+ TQDomElement xel = doc.createElement("x");
+ xel.appendChild(doc.createTextNode(TQString::number(rect.x())));
el.appendChild(xel);
- QDomElement yel = doc.createElement("y");
- yel.appendChild(doc.createTextNode(QString::number(rect.y())));
+ TQDomElement yel = doc.createElement("y");
+ yel.appendChild(doc.createTextNode(TQString::number(rect.y())));
el.appendChild(yel);
- QDomElement wel = doc.createElement("width");
- wel.appendChild(doc.createTextNode(QString::number(rect.width())));
+ TQDomElement wel = doc.createElement("width");
+ wel.appendChild(doc.createTextNode(TQString::number(rect.width())));
el.appendChild(wel);
- QDomElement hel = doc.createElement("height");
- hel.appendChild(doc.createTextNode(QString::number(rect.height())));
+ TQDomElement hel = doc.createElement("height");
+ hel.appendChild(doc.createTextNode(TQString::number(rect.height())));
el.appendChild(hel);
return el;
}
-static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
- const QString &subTagName, const QStrList &list)
+static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName,
+ const TQString &subTagName, const TQStrList &list)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QStrListIterator it(list);
+ TQStrListIterator it(list);
for (; it.current(); ++it) {
- QDomElement subel = doc.createElement(subTagName);
- subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current())));
+ TQDomElement subel = doc.createElement(subTagName);
+ subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current())));
el.appendChild(subel);
}
@@ -2152,44 +2152,44 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
}
-static QString stringEntry(QDomElement &base, const QString &tagName)
+static TQString stringEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data();
}
-static bool boolEntry(QDomElement &base, const QString &tagName)
+static bool boolEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data() == "true";
}
-static int numberEntry(QDomElement &base, const QString &tagName)
+static int numberEntry(TQDomElement &base, const TQString &tagName)
{
return stringEntry(base, tagName).toInt();
}
-static QRect rectEntry(QDomElement &base, const QString &tagName)
+static TQRect rectEntry(TQDomElement &base, const TQString &tagName)
{
- QDomElement el = base.namedItem(tagName).toElement();
+ TQDomElement el = base.namedItem(tagName).toElement();
int x = numberEntry(el, "x");
int y = numberEntry(el, "y");
int width = numberEntry(el, "width");
int height = numberEntry(el, "height");
- return QRect(x, y, width, height);
+ return TQRect(x, y, width, height);
}
-static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName)
+static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName)
{
- QStrList list;
+ TQStrList list;
- for( QDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement subel = n.toElement();
+ TQDomElement subel = n.toElement();
if (subel.tagName() == subTagName)
list.append(subel.firstChild().toText().data().latin1());
}
@@ -2198,28 +2198,28 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri
}
-void KDockManager::writeConfig(QDomElement &base)
+void KDockManager::writeConfig(TQDomElement &base)
{
// First of all, clear the tree under base
while (!base.firstChild().isNull())
base.removeChild(base.firstChild());
- QDomDocument doc = base.ownerDocument();
+ TQDomDocument doc = base.ownerDocument();
- QStrList nameList;
- QString mainWidgetStr;
+ TQStrList nameList;
+ TQString mainWidgetStr;
// collect widget names
- QStringList nList;
- QObjectListIt it(*childDock);
+ TQStringList nList;
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( obj1->parent() == main )
- mainWidgetStr = QString::fromLatin1(obj1->name());
+ mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name());
++it;
}
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
@@ -2227,7 +2227,7 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ) {
KDockWidget *obj = getDockWidgetFromName( *nListIt);
if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1
@@ -2239,7 +2239,7 @@ void KDockManager::writeConfig(QDomElement &base)
continue;
}
- QDomElement groupEl;
+ TQDomElement groupEl;
if (obj->d->isContainer) {
KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
if (x) {
@@ -2259,7 +2259,7 @@ void KDockManager::writeConfig(QDomElement &base)
//// Save a tab group
groupEl = doc.createElement("tabGroup");
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
@@ -2279,10 +2279,10 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name())));
+ groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name())));
groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
if ( !obj->parent() ) {
- groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
if (obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2298,19 +2298,19 @@ void KDockManager::writeConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
+ TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr));
- QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
+ TQString mainDockWidgetStr = TQString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr));
} else {
base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr));
}
- base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
}
-void KDockManager::readConfig(QDomElement &base)
+void KDockManager::readConfig(TQDomElement &base)
{
if (base.namedItem("group").isNull()
&& base.namedItem("tabgroup").isNull()
@@ -2320,13 +2320,13 @@ void KDockManager::readConfig(QDomElement &base)
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
main->hide();
- QObjectListIt it(*childDock);
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
@@ -2339,9 +2339,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// firstly, recreate all common dockwidgets
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock") continue;
// Read an ordinary dock widget
@@ -2350,12 +2350,12 @@ void KDockManager::readConfig(QDomElement &base)
obj->setToolTipString(stringEntry(childEl, "tabToolTip"));
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2365,9 +2365,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// secondly, now iterate again and create the groups and tabwidgets, apply the dockwidgets to them
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.isNull()) continue;
KDockWidget *obj = 0;
@@ -2391,9 +2391,9 @@ void KDockManager::readConfig(QDomElement &base)
else
if (childEl.tagName() == "splitGroup") {
// Read a group
- QString name = stringEntry(childEl, "name");
- QString firstName = stringEntry(childEl, "firstName");
- QString secondName = stringEntry(childEl, "secondName");
+ TQString name = stringEntry(childEl, "name");
+ TQString firstName = stringEntry(childEl, "firstName");
+ TQString secondName = stringEntry(childEl, "secondName");
int orientation = numberEntry(childEl, "orientation");
int separatorPos = numberEntry(childEl, "separatorPos");
@@ -2408,8 +2408,8 @@ void KDockManager::readConfig(QDomElement &base)
}
} else if (childEl.tagName() == "tabGroup") {
// Read a tab group
- QString name = stringEntry(childEl, "name");
- QStrList list = listEntry(childEl, "tabs", "tab");
+ TQString name = stringEntry(childEl, "name");
+ TQStrList list = listEntry(childEl, "tabs", "tab");
KDockWidget *d1 = getDockWidgetFromName( list.first() );
list.next();
@@ -2434,12 +2434,12 @@ void KDockManager::readConfig(QDomElement &base)
}
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2450,9 +2450,9 @@ void KDockManager::readConfig(QDomElement &base)
// thirdly, now that all ordinary dockwidgets are created,
// iterate them again and link them with their corresponding dockwidget for the dockback action
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock" && childEl.tagName() != "tabGroup")
continue;
@@ -2462,7 +2462,7 @@ void KDockManager::readConfig(QDomElement &base)
if (!boolEntry(childEl, "hasParent")) {
// Read a common toplevel dock widget
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
- QString name = stringEntry(childEl, "dockBackTo");
+ TQString name = stringEntry(childEl, "dockBackTo");
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName(name));
}
@@ -2474,20 +2474,20 @@ void KDockManager::readConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString mv = stringEntry(base, "centralWidget");
+ TQString mv = stringEntry(base, "centralWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv) ) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(dmain);
mvd->show();
dmain->setCentralWidget(mvd);
}
- QString md = stringEntry(base, "mainDockWidget");
+ TQString md = stringEntry(base, "mainDockWidget");
if (!md.isEmpty() && getDockWidgetFromName(md)) {
KDockWidget *mvd = getDockWidgetFromName(md);
dmain->setMainDockWidget(mvd);
}
} else {
- QString mv = stringEntry(base, "mainWidget");
+ TQString mv = stringEntry(base, "mainWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv)) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(main);
@@ -2495,7 +2495,7 @@ void KDockManager::readConfig(QDomElement &base)
}
// only resize + move non-mainwindows
- QRect mr = rectEntry(base, "geometry");
+ TQRect mr = rectEntry(base, "geometry");
main->move(mr.topLeft());
main->resize(mr.size());
}
@@ -2528,7 +2528,7 @@ void KDockManager::setReadDockConfigMode(int mode)
}
#ifndef NO_KDE2
-void KDockManager::writeConfig( KConfig* c, QString group )
+void KDockManager::writeConfig( KConfig* c, TQString group )
{
//debug("BEGIN Write Config");
if ( !c ) c = KGlobal::config();
@@ -2537,13 +2537,13 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->setGroup( group );
c->writeEntry( "Version", DOCK_CONFIG_VERSION );
- QStringList nameList;
- QStringList findList;
- QObjectListIt it( *childDock );
+ TQStringList nameList;
+ TQStringList findList;
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
// collect KDockWidget's name
- QStringList nList;
+ TQStringList nList;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
//debug(" +Add subdock %s", obj->name());
@@ -2552,21 +2552,21 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( "Main:view", obj->name() );
}
-// kdDebug(282)<<QString("list size: %1").arg(nList.count())<<endl;
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
dc->prepareSave(nList);
}
}
-// kdDebug(282)<<QString("new list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("new list size: %1").arg(nList.count())<<endl;
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ){
//debug(" -Try to save %s", nList.current());
obj = getDockWidgetFromName( *nListIt );
- QString cname = obj->name();
+ TQString cname = obj->name();
if ( obj->header ){
obj->header->saveConfig( c );
}
@@ -2583,7 +2583,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":parent", "yes");
@@ -2615,14 +2615,14 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "TAB_GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
} else {
c->writeEntry( cname+":parent", "yes");
}
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
c->writeEntry( cname+":tabNames", list );
@@ -2639,7 +2639,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":tabToolTip", obj->toolTipString());
if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
@@ -2656,7 +2656,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
}
c->writeEntry( "NameList", nameList );
- c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) );
+ c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) );
c->writeEntry( "Main:visible", main->isVisible()); // curently nou use
if ( main->inherits("KDockMainWindow") ){
@@ -2669,31 +2669,31 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->sync();
//debug("END Write Config");
}
-#include <qmessagebox.h>
-void KDockManager::readConfig( KConfig* c, QString group )
+#include <tqmessagebox.h>
+void KDockManager::readConfig( KConfig* c, TQString group )
{
if ( !c ) c = KGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group );
- QStrList nameList;
+ TQStrList nameList;
c->readListEntry( "NameList", nameList );
- QString ver = c->readEntry( "Version", "0.0.1" );
+ TQString ver = c->readEntry( "Version", "0.0.1" );
nameList.first();
if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
activate();
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
// if (isMainVisible) // CCC
- //QMessageBox::information(0,"","hallo");
+ //TQMessageBox::information(0,"","hallo");
//COMMENTED4TESTING main->hide();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ){
@@ -2708,13 +2708,13 @@ void KDockManager::readConfig( KConfig* c, QString group )
// they must be restored before e.g. tabgroups are restored
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
- QRect r = c->readRectEntry( oname + ":geometry" );
+ TQRect r = c->readRectEntry( oname + ":geometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
obj->setGeometry(r);
@@ -2723,7 +2723,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" ));
obj->setToolTipString(c->readEntry( oname + ":tabToolTip" ));
if ( c->readBoolEntry( oname + ":visible" ) ){
- obj->QWidget::show();
+ obj->TQWidget::show();
}
}
@@ -2746,9 +2746,9 @@ void KDockManager::readConfig( KConfig* c, QString group )
// secondly, after the common dockwidgets, restore the groups and tabgroups
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "GROUP" ){
@@ -2766,7 +2766,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
}
if ( type == "TAB_GROUP" ){
- QStrList list;
+ TQStrList list;
KDockWidget* tabDockGroup = 0L;
c->readListEntry( oname+":tabNames", list );
KDockWidget* d1 = getDockWidgetFromName( list.first() );
@@ -2802,15 +2802,15 @@ void KDockManager::readConfig( KConfig* c, QString group )
// iterate them again and link the toplevel ones of them with their corresponding dockwidget for the dockback action
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
obj = getDockWidgetFromName( oname );
c->setGroup( group );
- QString name = c->readEntry( oname + ":dockBackTo" );
+ TQString name = c->readEntry( oname + ":dockBackTo" );
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName( name ));
}
@@ -2824,7 +2824,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
KDockMainWindow* dmain = (KDockMainWindow*)main;
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( dmain );
@@ -2832,14 +2832,14 @@ void KDockManager::readConfig( KConfig* c, QString group )
dmain->setView( mvd );
}
c->setGroup( group );
- QString md = c->readEntry( "Main:dock" );
+ TQString md = c->readEntry( "Main:dock" );
if ( !md.isEmpty() && getDockWidgetFromName( md ) ){
KDockWidget* mvd = getDockWidgetFromName( md );
dmain->setMainDockWidget( mvd );
}
} else {
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( main );
@@ -2855,7 +2855,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
c->setGroup( group );
- QRect mr = c->readRectEntry("Main:Geometry");
+ TQRect mr = c->readRectEntry("Main:Geometry");
if (!main->inherits("KDockMainWindow"))
main->move(mr.topLeft());
@@ -2868,7 +2868,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
void KDockManager::dumpDockWidgets() {
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
@@ -2877,19 +2877,19 @@ void KDockManager::dumpDockWidgets() {
}
-KDockWidget* KDockManager::getDockWidgetFromName( const QString& dockName )
+KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName )
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
- if ( QString(obj->name()) == dockName ) return obj;
+ if ( TQString(obj->name()) == dockName ) return obj;
}
KDockWidget* autoCreate = 0L;
if ( autoCreateDock ){
kdDebug(282)<<"Autocreating dock: "<<dockName<<endl;
- autoCreate = new KDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap("") );
autoCreateDock->append( autoCreate );
}
return autoCreate;
@@ -2929,20 +2929,20 @@ void KDockManager::slotMenuPopup()
menu->clear();
menuData->clear();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
int numerator = 0;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
if ( obj->mayBeHide() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, true ) );
}
if ( obj->mayBeShow() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, false ) );
}
}
@@ -2954,9 +2954,9 @@ void KDockManager::slotMenuActivated( int id )
data->dock->changeHideShowState();
}
-KDockWidget* KDockManager::findWidgetParentDock( QWidget* w ) const
+KDockWidget* KDockManager::findWidgetParentDock( TQWidget* w ) const
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * dock;
KDockWidget * found = 0L;
@@ -2976,7 +2976,7 @@ void KDockManager::drawDragRectangle()
return;
int i;
- QRect oldAndNewDragRect[2];
+ TQRect oldAndNewDragRect[2];
oldAndNewDragRect[0] = d->oldDragRect;
oldAndNewDragRect[1] = d->dragRect;
@@ -2985,7 +2985,7 @@ void KDockManager::drawDragRectangle()
if (oldAndNewDragRect[i].isEmpty())
continue;
- KDockWidget* pDockWdgAtRect = (KDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
+ KDockWidget* pDockWdgAtRect = (KDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
if (!pDockWdgAtRect)
continue;
@@ -2993,7 +2993,7 @@ void KDockManager::drawDragRectangle()
bool unclipped;
KDockMainWindow* pMain = 0L;
KDockWidget* pTLDockWdg = 0L;
- QWidget* topWdg;
+ TQWidget* topWdg;
if (pDockWdgAtRect->topLevelWidget() == main) {
isOverMainWdg = true;
topWdg = pMain = (KDockMainWindow*) main;
@@ -3007,7 +3007,7 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle unclipped over the main dock window
- QPainter p;
+ TQPainter p;
p.begin( topWdg );
if ( !unclipped ) {
if (isOverMainWdg)
@@ -3017,8 +3017,8 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle
p.setRasterOp(Qt::NotXorROP);
- QRect r = oldAndNewDragRect[i];
- r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) );
+ TQRect r = oldAndNewDragRect[i];
+ r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) );
p.drawRect(r.x(), r.y(), r.width(), r.height());
p.end();
}
@@ -3045,10 +3045,10 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
}
-KDockArea::KDockArea( QWidget* parent, const char *name)
-:QWidget( parent, name)
+KDockArea::KDockArea( TQWidget* parent, const char *name)
+:TQWidget( parent, name)
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -3058,7 +3058,7 @@ KDockArea::~KDockArea()
delete dockManager;
}
-KDockWidget* KDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -3075,44 +3075,44 @@ void KDockArea::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockArea::makeWidgetDockVisible( QWidget* widget )
+void KDockArea::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockArea::writeDockConfig(QDomElement &base)
+void KDockArea::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockArea::readDockConfig(QDomElement &base)
+void KDockArea::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
void KDockArea::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
}
-void KDockArea::resizeEvent(QResizeEvent *rsize)
+void KDockArea::resizeEvent(TQResizeEvent *rsize)
{
- QWidget::resizeEvent(rsize);
+ TQWidget::resizeEvent(rsize);
if (children()){
#ifndef NO_KDE2
// kdDebug(282)<<"KDockArea::resize"<<endl;
#endif
- QObjectList *list=queryList("QWidget",0,false);
+ TQObjectList *list=queryList("TQWidget",0,false);
- QObjectListIt it( *list ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size()));
+ ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size()));
break;
}
delete list;
@@ -3120,12 +3120,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
KDockSplitter *split;
// for (unsigned int i=0;i<children()->count();i++)
{
-// QPtrList<QObject> list(children());
-// QObject *obj=((QPtrList<QObject*>)children())->at(i);
- QObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(children());
+// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
+ TQObject *obj=children()->getFirst();
if (split = dynamic_cast<KDockSplitter*>(obj))
{
- split->setGeometry( QRect(QPoint(0,0), size() ));
+ split->setGeometry( TQRect(TQPoint(0,0), size() ));
// break;
}
}
@@ -3134,12 +3134,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
}
#ifndef NO_KDE2
-void KDockArea::writeDockConfig( KConfig* c, QString group )
+void KDockArea::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockArea::readDockConfig( KConfig* c, QString group )
+void KDockArea::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -3203,17 +3203,17 @@ bool KDockContainer::isOverlapMode() {
}
-bool KDockContainer::dockDragEnter(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragMove(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragLeave(KDockWidget*, QMouseEvent *) { return false;}
+bool KDockContainer::dockDragEnter(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;}
KDockWidget *KDockContainer::parentDockWidget(){return 0;}
-QStringList KDockContainer::containedWidgets() const {
- QStringList tmp;
+TQStringList KDockContainer::containedWidgets() const {
+ TQStringList tmp;
for (struct ListItem *it=m_childrenListBegin;it;it=it->next) {
- tmp<<QString(it->data);
+ tmp<<TQString(it->data);
}
return tmp;
@@ -3222,7 +3222,7 @@ QStringList KDockContainer::containedWidgets() const {
void KDockContainer::showWidget(KDockWidget *) {
}
-void KDockContainer::insertWidget (KDockWidget *dw, QPixmap, const QString &, int &)
+void KDockContainer::insertWidget (KDockWidget *dw, TQPixmap, const TQString &, int &)
{
struct ListItem *it=new struct ListItem;
it->data=strdup(dw->name());
@@ -3259,13 +3259,13 @@ void KDockContainer::removeWidget (KDockWidget *dw){
//m_children.remove(dw->name());}
void KDockContainer::undockWidget (KDockWidget *){;}
-void KDockContainer::setToolTip(KDockWidget *, QString &){;}
-void KDockContainer::setPixmap(KDockWidget*,const QPixmap&){;}
-void KDockContainer::load (KConfig*, const QString&){;}
-void KDockContainer::save (KConfig*, const QString&){;}
-void KDockContainer::load (QDomElement&){;}
-void KDockContainer::save (QDomElement&){;}
-void KDockContainer::prepareSave(QStringList &names)
+void KDockContainer::setToolTip(KDockWidget *, TQString &){;}
+void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;}
+void KDockContainer::load (KConfig*, const TQString&){;}
+void KDockContainer::save (KConfig*, const TQString&){;}
+void KDockContainer::load (TQDomElement&){;}
+void KDockContainer::save (TQDomElement&){;}
+void KDockContainer::prepareSave(TQStringList &names)
{
for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next)
@@ -3277,11 +3277,11 @@ void KDockContainer::prepareSave(QStringList &names)
}
-QWidget *KDockTabGroup::transientTo() {
- QWidget *tT=0;
+TQWidget *KDockTabGroup::transientTo() {
+ TQWidget *tT=0;
for (int i=0;i<count();i++) {
KDockWidget *dw=static_cast<KDockWidget*>(page(i)->qt_cast("KDockWidget"));
- QWidget *tmp;
+ TQWidget *tmp;
if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp;
else {
diff --git a/kdeui/kdockwidget.h b/kdeui/kdockwidget.h
index b43d9b88a..ad0e28a89 100644
--- a/kdeui/kdockwidget.h
+++ b/kdeui/kdockwidget.h
@@ -48,18 +48,18 @@
#define _KDOCKWIDGET_2_2_
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qframe.h>
-#include <qdom.h>
-#include <qtabwidget.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqframe.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
#ifndef NO_KDE2
#include <kmainwindow.h>
#include <netwm_def.h>
#else
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include "exportdockclass.h"
#include "dummykmainwindow.h"
#endif
@@ -219,7 +219,7 @@ protected:
/**
* Draws the drag panel (a double line)
*/
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
virtual void virtual_hook( int id, void* data );
@@ -324,7 +324,7 @@ protected:
/**
* A layout manager for placing the embedded buttons (close and stay)
*/
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
/**
* a little button for closing (undocking and hiding) the dockwidget
@@ -355,7 +355,7 @@ private:
/**
* It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set).
* An abstraction what it is currently.
- * In general it is like QTabWidget but is more useful for the dockwidget class set.
+ * In general it is like TQTabWidget but is more useful for the dockwidget class set.
* More or less a minor helper class for the dockwidget class set.
*
* @author Max Judin (documentation: Falk Brettschneider).
@@ -367,15 +367,15 @@ public:
/**
* Constructs this. It just calls the method of the base class.
*/
- KDockTabGroup( QWidget *parent = 0, const char *name = 0 )
- :QTabWidget( parent, name ){}
+ KDockTabGroup( TQWidget *parent = 0, const char *name = 0 )
+ :TQTabWidget( parent, name ){}
/**
* Destructs a KDockTabGroup.
*/
virtual ~KDockTabGroup(){}
- QWidget *transientTo();
+ TQWidget *transientTo();
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -409,7 +409,7 @@ private:
* ...
* KDockWidget* dock = 0L;
* dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
- * QWidget* actualWidget = new QWidget( dock);
+ * TQWidget* actualWidget = new TQWidget( dock);
* dock->setWidget( actualWidget); // embed it
* dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
* ...
@@ -445,8 +445,8 @@ public:
* @param f Qt::WidgetFlags widget flags
*/
KDockWidget( KDockManager* dockManager, const char* name,
- const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = QString::null,
- const QString& strTabPageLabel = QString::fromLatin1( " " ), WFlags f = 0);
+ const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null,
+ const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0);
/**
* Destructs a dockwidget.
@@ -495,7 +495,7 @@ public:
* 0 and 100. Example: If the value was 4000, it will be fixed to 40. In short: The old and
* the new behavior both work, so it is compatible with older KDE-versions.
*/
- KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1);
+ KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1);
/**
* Specify where it is either possible or impossible for this to dock to another dockwidget.
@@ -524,23 +524,23 @@ public:
/**
* Sets the embedded widget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
*
* @param w The pointer to the dockwidget's child widget.
*/
- void setWidget( QWidget* w);
+ void setWidget( TQWidget* w);
/**
* Get the embedded widget.
*
* @return The pointer to the dockwidget's child widget, 0L if there's no such child.
*/
- QWidget* getWidget() const { return widget; }
+ TQWidget* getWidget() const { return widget; }
/**
* Sets the header of this dockwidget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
* The header contains the drag panel, the close button and the stay button.
*
* @param ah A base class pointer to the dockwidget header
@@ -594,12 +594,12 @@ public:
*
* @param ttStr A string for the tooltip on the tab.
*/
- void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; }
+ void setToolTipString(const TQString& ttStr) { toolTipStr = ttStr; }
/**
* @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
*/
- const QString& toolTipString() const { return toolTipStr; }
+ const TQString& toolTipString() const { return toolTipStr; }
/**
* @return result @p true, if a dockback is possible, otherwise @p false.
@@ -610,20 +610,20 @@ public:
* Sets a string that is used for the label of the tab page when in tab page mode
* @param label The new tab page label.
*/
- void setTabPageLabel( const QString& label) { tabPageTitle = label; }
+ void setTabPageLabel( const TQString& label) { tabPageTitle = label; }
/**
* @return A string that is used for the label of the tab page when in tab page mode.
*/
- const QString& tabPageLabel() const { return tabPageTitle; }
+ const TQString& tabPageLabel() const { return tabPageTitle; }
/**
- * Catches and processes some QWidget events that are interesting for dockwidgets.
+ * Catches and processes some TQWidget events that are interesting for dockwidgets.
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
- * Add dockwidget management actions to QWidget::show.
+ * Add dockwidget management actions to TQWidget::show.
*/
virtual void show();
/**
@@ -632,7 +632,7 @@ public:
KDockTabGroup* parentDockTabGroup() const;
/// @since 3.1
- QWidget *parentDockContainer() const;
+ TQWidget *parentDockContainer() const;
#ifndef NO_KDE2
@@ -645,13 +645,13 @@ public:
#endif
- void setDockWindowTransient (QWidget *parent, bool transientEnabled);
+ void setDockWindowTransient (TQWidget *parent, bool transientEnabled);
/**
* Returns the widget this dockwidget is set transient to, otherwise 0
* @since 3.2
*/
- QWidget *transientTo();
+ TQWidget *transientTo();
/**
* Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0
@@ -667,14 +667,14 @@ public:
* @param pixmap is the pixmap to set
* @since 3.2
*/
- void setPixmap(const QPixmap& pixmap=QPixmap());
+ void setPixmap(const TQPixmap& pixmap=TQPixmap());
/**
* Returns the dockwidget's associated caption/dock tab pixmap
*
* @since 3.2
*/
- const QPixmap& pixmap() const;
+ const TQPixmap& pixmap() const;
/**
* @return the current dock position.
@@ -742,9 +742,9 @@ protected:
void updateHeader();
/// @since 3.1
- void setLatestKDockContainer(QWidget *);
+ void setLatestKDockContainer(TQWidget *);
/// @since 3.1
- QWidget *latestKDockContainer();
+ TQWidget *latestKDockContainer();
/// @since 3.2
void setFormerBrotherDockWidget(KDockWidget *);
@@ -754,7 +754,7 @@ signals:
*@since 3.2
*is emitted after the setWidget method has finished
*/
- void widgetSet(QWidget*);
+ void widgetSet(TQWidget*);
/**
* Emitted when another dock widget is docking to this.
@@ -796,12 +796,12 @@ protected slots:
*/
void loseFormerBrotherDockWidget();
- virtual void paintEvent(QPaintEvent*);
+ virtual void paintEvent(TQPaintEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void leaveEvent(QEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void leaveEvent(TQEvent*);
protected:
friend class KDockWidgetHeader;
/**
@@ -819,11 +819,11 @@ protected:
/**
* a string used as tooltip for the tab page header when in dock-centered mode.
*/
- QString toolTipStr;
+ TQString toolTipStr;
/**
* a string used as title of the tab page when in tab page mode
*/
- QString tabPageTitle;
+ TQString tabPageTitle;
private:
/**
@@ -840,7 +840,7 @@ private:
* @param s the target widget to reparent to
* @param p the point to move to (if it doesn't reparent)
*/
- void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) );
+ void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) );
/**
* A base class pointer to the header of this dockwidget
@@ -850,12 +850,12 @@ private:
/**
* the embedded widget
*/
- QWidget* widget;
+ TQWidget* widget;
/**
* the layout manager that takes care about proper resizing and moving the embedded widget and the header
*/
- QVBoxLayout* layout;
+ TQVBoxLayout* layout;
/**
* the responsible dockmanager
@@ -865,7 +865,7 @@ private:
/**
* an icon for the tab widget header
*/
- QPixmap* pix;
+ TQPixmap* pix;
/**
* Information about the ability for docking to another dockwidget.
@@ -883,8 +883,8 @@ private:
KDockWidget::DockPosition prevSideDockPosBeforeDrag;
// GROUP data
- QString firstName;
- QString lastName;
+ TQString firstName;
+ TQString lastName;
Orientation splitterOrientation;
bool isGroup;
bool isTabGroup;
@@ -930,7 +930,7 @@ public:
* @param mainWindow the main window controlled by this
* @param name the internal QOject name
*/
- KDockManager( QWidget* mainWindow, const char* name = 0L );
+ KDockManager( TQWidget* mainWindow, const char* name = 0L );
/**
* Destructs a dockmanager.
@@ -949,14 +949,14 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void writeConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* Like writeConfig but reads the whole stuff in.
*
* In order to restore a window configuration
* from a config file, it looks up widgets by name
- * (QObject::name) in the childDock variable of
+ * (TQObject::name) in the childDock variable of
* KDockManager. This list in turn contains all
* KDockWidgets (according to the KDockWidget constructor).
* So in principle, in order to restore a window layout,
@@ -967,7 +967,7 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void readConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/// @since 3.1
@@ -976,11 +976,11 @@ public:
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeConfig(QDomElement &base);
+ void writeConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readConfig(QDomElement &base);
+ void readConfig(TQDomElement &base);
/**
* Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
@@ -996,7 +996,7 @@ public:
* @param event the event
* @return the return value of the method call of the base class method
*/
- virtual bool eventFilter( QObject * object, QEvent * event );
+ virtual bool eventFilter( TQObject * object, TQEvent * event );
/**
* This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
@@ -1005,25 +1005,25 @@ public:
* @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
* @return the dockwidget that encapsulates that widget, otherwise 0
*/
- KDockWidget* findWidgetParentDock( QWidget* w) const;
+ KDockWidget* findWidgetParentDock( TQWidget* w) const;
/**
* Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
*
* @param w the widget that is encapsulated by a dockwidget that turns to visible.
*/
- void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
+ void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
/**
* @return the popupmenu for showing/hiding dockwidgets
*/
- QPopupMenu* dockHideShowMenu() const { return menu; }
+ TQPopupMenu* dockHideShowMenu() const { return menu; }
/**
- * @param dockName an internal QObject name
- * @return the dockwidget that has got that internal QObject name
+ * @param dockName an internal TQObject name
+ * @return the dockwidget that has got that internal TQObject name
*/
- KDockWidget* getDockWidgetFromName( const QString& dockName );
+ KDockWidget* getDockWidgetFromName( const TQString& dockName );
/**
* Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize().
@@ -1038,7 +1038,7 @@ public:
/**
* Try to preserve the widget's size. Works like KeepSize resize mode
- * of QSplitter. Off by default.
+ * of TQSplitter. Off by default.
* Call this method before you create any dock widgets!
*/
void setSplitterKeepSize(bool b=true);
@@ -1136,16 +1136,16 @@ private:
* @param pos global (desktop) position of the wanted dockwidget
* @return the dockwidget at that position
*/
- KDockWidget* findDockWidgetAt( const QPoint& pos );
+ KDockWidget* findDockWidgetAt( const TQPoint& pos );
/**
- * Finds the QWidget recursively at the position given as parameter
+ * Finds the TQWidget recursively at the position given as parameter
*
- * @param w a variable where the method puts the QWidget at that position (instead of a return value)
+ * @param w a variable where the method puts the TQWidget at that position (instead of a return value)
* @param p the parent widget where the recursive search should start from
* @param pos global (desktop) position of the wanted dockwidget
*/
- void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos );
+ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos );
/**
* Finds all dockwidgets which are child, grandchild and so on of p.
@@ -1153,7 +1153,7 @@ private:
* @param p the parent widget where the recursive search starts from
* @param l the widget list that contains the search result after the return of this method
*/
- void findChildDockWidget( const QWidget* p, QWidgetList*& l);
+ void findChildDockWidget( const TQWidget* p, TQWidgetList*& l);
/**
* Sets a dockwidget in drag mode.
@@ -1166,7 +1166,7 @@ private:
* @param d the dockwidget which is dragged
* @param pos the new position of the dragged dockwidget
*/
- void dragMove( KDockWidget* d, QPoint pos );
+ void dragMove( KDockWidget* d, TQPoint pos );
/**
* Aborts the drag mode. Restores the cursor and hides the drag indicator.
@@ -1184,7 +1184,7 @@ private:
/**
* Usually the KDockMainWindow but not necessarily.
*/
- QWidget* main;
+ TQWidget* main;
/**
* The dockwidget that is being dragged at the moment
@@ -1199,7 +1199,7 @@ private:
/**
* It is of interest during the dock process. Then it contains all child dockwidgets.
*/
- QWidgetList* childDockWidgetList;
+ TQWidgetList* childDockWidgetList;
/**
* The dockposition where the dockwidget would be docked to, if we dropped it here.
@@ -1210,12 +1210,12 @@ private:
* A QList of all objects that are important for docking.
* Some serve as group widgets of dockwidgets, others encapsulate normal widgets.
*/
- QObjectList* childDock;
+ TQObjectList* childDock;
/**
* Contains dockwidgets that are created automatically by the dockmanager. For internal use.
*/
- QObjectList* autoCreateDock;
+ TQObjectList* autoCreateDock;
/**
* For storing the width during the dragging of a dockwidget.
@@ -1247,12 +1247,12 @@ private:
* A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and
* to show or hide the appropriate dockwidget.
*/
- QPopupMenu* menu;
+ TQPopupMenu* menu;
/**
* An internal list containing data for the menuitems for the visibility popup menu.
*/
- QPtrList<MenuDockData> *menuData;
+ TQPtrList<MenuDockData> *menuData;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1324,7 +1324,7 @@ public:
* @param name internal object name
* @param f Qt::WidgetFlags widget flags
*/
- KDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ KDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructs a dockmainwindow.
@@ -1357,24 +1357,24 @@ public:
* The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
* The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.
*
- * @param name QObject name (default dockwidget caption)
+ * @param name TQObject name (default dockwidget caption)
* @param pixmap window icon (for instance shown when docked as tabwidget entry)
* @param parent parent widget for the new dockwidget
* @param strCaption window title (shown when toplevel)
* @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption
* @return a pointer to the new created dockwidget
*/
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readDockConfig(QDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
/**
@@ -1383,7 +1383,7 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to write to
*/
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* It reads the current dock state from the given section of KConfig.
@@ -1391,13 +1391,13 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to read from
*/
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/**
* It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
* encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
- * Additionally, if the main dockwidget is not a QDialog, it will be shown.
+ * Additionally, if the main dockwidget is not a TQDialog, it will be shown.
*/
void activateDock(){ dockManager->activate(); }
@@ -1407,7 +1407,7 @@ public:
*
* @return the wanted popup menu
*/
- QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
/**
* This method shows the given dockwidget.
@@ -1429,7 +1429,7 @@ public:
* This is an overloaded member function, provided for convenience.
* It differs from the above function only in what argument(s) it accepts.
*/
- void makeWidgetDockVisible( QWidget* widget );
+ void makeWidgetDockVisible( TQWidget* widget );
/**
* This method calls the base class method.
@@ -1437,7 +1437,7 @@ public:
*
* @param widget any widget that should become the main view
*/
- void setView( QWidget * widget );
+ void setView( TQWidget * widget );
signals:
/**
@@ -1479,7 +1479,7 @@ friend class KDockManager;
public:
- KDockArea( QWidget* parent = 0L, const char *name = 0L);
+ KDockArea( TQWidget* parent = 0L, const char *name = 0L);
virtual ~KDockArea();
@@ -1489,25 +1489,25 @@ public:
void setMainDockWidget( KDockWidget* );
KDockWidget* getMainDockWidget(){ return mainDockWidget; }
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
- void writeDockConfig(QDomElement &base);
- void readDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
void activateDock(){ dockManager->activate(); }
- QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
void makeDockVisible( KDockWidget* dock );
void makeDockInvisible( KDockWidget* dock );
- void makeWidgetDockVisible( QWidget* widget );
- //void setView( QWidget* );
+ void makeWidgetDockVisible( TQWidget* widget );
+ //void setView( TQWidget* );
signals:
/**
@@ -1524,7 +1524,7 @@ protected slots:
void slotDockWidgetUndocked();
public:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kdockwidget_p.h b/kdeui/kdockwidget_p.h
index 7c14394eb..98af140ff 100644
--- a/kdeui/kdockwidget_p.h
+++ b/kdeui/kdockwidget_p.h
@@ -37,7 +37,7 @@ COMPATIBLE. THIS HEADER IS ONLY INSTALLED, BECAUSE IT IS NEEDED IN
#define KDOCKWIDGET_P_H
#include <kdockwidget.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
// Add some describing comment !!
class KDEUI_EXPORT KDockContainer
@@ -46,24 +46,24 @@ public:
KDockContainer();
virtual ~KDockContainer();
virtual KDockWidget *parentDockWidget();
- virtual void insertWidget (KDockWidget *, QPixmap, const QString &, int &);
+ virtual void insertWidget (KDockWidget *, TQPixmap, const TQString &, int &);
virtual void showWidget(KDockWidget *);
virtual void removeWidget(KDockWidget*);
virtual void undockWidget(KDockWidget*);
- virtual void save(KConfig *cfg,const QString& group_or_prefix);
- virtual void save(QDomElement& dockElement);
- virtual void load(KConfig *cfg,const QString& group_or_prefix);
- virtual void load(QDomElement& dockElement);
- virtual void setToolTip (KDockWidget *, QString &);
- virtual void setPixmap(KDockWidget*,const QPixmap&);
- QStringList containedWidgets() const;
- virtual bool dockDragEnter(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragMove(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragLeave(KDockWidget* dockWidget, QMouseEvent *event);
+ virtual void save(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void save(TQDomElement& dockElement);
+ virtual void load(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void load(TQDomElement& dockElement);
+ virtual void setToolTip (KDockWidget *, TQString &);
+ virtual void setPixmap(KDockWidget*,const TQPixmap&);
+ TQStringList containedWidgets() const;
+ virtual bool dockDragEnter(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragMove(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragLeave(KDockWidget* dockWidget, TQMouseEvent *event);
protected:
friend class KDockManager;
friend class KDockSplitter;
- void prepareSave(QStringList &names);
+ void prepareSave(TQStringList &names);
void activateOverlapMode(int nonOverlapSize);
void deactivateOverlapMode();
bool isOverlapMode();
diff --git a/kdeui/kdockwidget_private.cpp b/kdeui/kdockwidget_private.cpp
index 58bc954bc..9c98ae69a 100644
--- a/kdeui/kdockwidget_private.cpp
+++ b/kdeui/kdockwidget_private.cpp
@@ -21,16 +21,16 @@
#include "kdockwidget_p.h"
#include "kdockwidget_private.h"
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <math.h> // need ceil
-KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos)
-: QWidget(parent, name)
+KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos)
+: TQWidget(parent, name)
{
m_dontRecalc=false;
divider = 0L;
@@ -48,7 +48,7 @@ KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orie
initialised = false;
}
-void KDockSplitter::activate(QWidget *c0, QWidget *c1)
+void KDockSplitter::activate(TQWidget *c0, TQWidget *c1)
{
if ( c0 ) child0 = c0;
if ( c1 ) child1 = c1;
@@ -56,15 +56,15 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1)
setupMinMaxSize();
if (divider) delete divider;
- divider = new QFrame(this, "pannerdivider");
- divider->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ divider = new TQFrame(this, "pannerdivider");
+ divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
divider->setLineWidth(1);
divider->raise();
if (m_orientation == Horizontal)
- divider->setCursor(QCursor(sizeVerCursor));
+ divider->setCursor(TQCursor(sizeVerCursor));
else
- divider->setCursor(QCursor(sizeHorCursor));
+ divider->setCursor(TQCursor(sizeHorCursor));
divider->installEventFilter(this);
initialised= true;
@@ -236,7 +236,7 @@ int KDockSplitter::separatorPos() const
return xpos;
}
-void KDockSplitter::resizeEvent(QResizeEvent *ev)
+void KDockSplitter::resizeEvent(TQResizeEvent *ev)
{
//
// As already stated in the .h file we always have to differentiate
@@ -439,7 +439,7 @@ void KDockSplitter::resizeEvent(QResizeEvent *ev)
}
}
-int KDockSplitter::checkValueOverlapped(int position, QWidget *overlappingWidget) const
+int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const
{
if (initialised) {
if (m_orientation == Vertical) {
@@ -489,14 +489,14 @@ int KDockSplitter::checkValue( int position ) const
return position;
}
-bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
+bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
{
- QMouseEvent *mev;
+ TQMouseEvent *mev;
bool handled = false;
switch (e->type()) {
- case QEvent::MouseMove:
- mev= (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize);
if (m_orientation == Horizontal) {
@@ -522,7 +522,7 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
handled=true; break;
}
if (!mOpaqueResize) {
- int position = checkValue( mapFromGlobal(QCursor::pos()).x() );
+ int position = checkValue( mapFromGlobal(TQCursor::pos()).x() );
divider->move( position, 0 );
} else {
int tmp_xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
@@ -535,10 +535,10 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
}
handled= true;
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true);
- mev= (QMouseEvent*)e;
+ mev= (TQMouseEvent*)e;
if (m_orientation == Horizontal){
if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{
@@ -561,21 +561,21 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
default:
break;
}
- return (handled) ? true : QWidget::eventFilter( o, e );
+ return (handled) ? true : TQWidget::eventFilter( o, e );
}
-bool KDockSplitter::event( QEvent* e )
+bool KDockSplitter::event( TQEvent* e )
{
- if ( e->type() == QEvent::LayoutHint ){
+ if ( e->type() == TQEvent::LayoutHint ){
// change children min/max size. This is needed, otherwise
// it is possible the divider get's out of bounds.
setupMinMaxSize();
resizeEvent(0);
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QWidget* KDockSplitter::getAnother( QWidget* w ) const
+TQWidget* KDockSplitter::getAnother( TQWidget* w ) const
{
return ( w == child0 ) ? child1 : child0;
}
@@ -584,7 +584,7 @@ void KDockSplitter::updateName()
{
if ( !initialised ) return;
- QString new_name = QString( child0->name() ) + "," + child1->name();
+ TQString new_name = TQString( child0->name() ) + "," + child1->name();
parentWidget()->setName( new_name.latin1() );
parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
parentWidget()->repaint( false );
@@ -593,7 +593,7 @@ void KDockSplitter::updateName()
((KDockWidget*)parentWidget())->lastName = child1->name();
((KDockWidget*)parentWidget())->splitterOrientation = m_orientation;
- QWidget* p = parentWidget()->parentWidget();
+ TQWidget* p = parentWidget()->parentWidget();
if ( p && p->inherits("KDockSplitter" ) )
((KDockSplitter*)p)->updateName();
}
@@ -621,8 +621,8 @@ bool KDockSplitter::keepSize() const
/*************************************************************************/
-KDockButton_Private::KDockButton_Private( QWidget *parent, const char * name )
-:QPushButton( parent, name )
+KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name )
+:TQPushButton( parent, name )
{
moveMouse = false;
setFocusPolicy( NoFocus );
@@ -632,9 +632,9 @@ KDockButton_Private::~KDockButton_Private()
{
}
-void KDockButton_Private::drawButton( QPainter* p )
+void KDockButton_Private::drawButton( TQPainter* p )
{
- p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) );
+ p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) );
p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() );
if ( moveMouse && !isDown() ){
p->setPen( white );
@@ -658,13 +658,13 @@ void KDockButton_Private::drawButton( QPainter* p )
}
}
-void KDockButton_Private::enterEvent( QEvent * )
+void KDockButton_Private::enterEvent( TQEvent * )
{
moveMouse = true;
repaint();
}
-void KDockButton_Private::leaveEvent( QEvent * )
+void KDockButton_Private::leaveEvent( TQEvent * )
{
moveMouse = false;
repaint();
@@ -672,7 +672,7 @@ void KDockButton_Private::leaveEvent( QEvent * )
/*************************************************************************/
KDockWidgetPrivate::KDockWidgetPrivate()
- : QObject()
+ : TQObject()
,index(-1)
,splitPosInPercent(50)
,pendingFocusInEvent(false)
@@ -697,11 +697,11 @@ KDockWidgetPrivate::~KDockWidgetPrivate()
{
}
-void KDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w)
+void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{
if (w) {
- QWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
- if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) {
+ TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus();
}
}
diff --git a/kdeui/kdockwidget_private.h b/kdeui/kdockwidget_private.h
index 2c6ae8896..312b7b193 100644
--- a/kdeui/kdockwidget_private.h
+++ b/kdeui/kdockwidget_private.h
@@ -24,8 +24,8 @@
#ifndef KDOCKWIDGET_PRIVATE_H
#define KDOCKWIDGET_PRIVATE_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#ifndef NO_KDE2
#include <netwm_def.h>
@@ -36,7 +36,7 @@ class KDockContainer;
/**
- * Like QSplitter but specially designed for dockwidgets stuff.
+ * Like TQSplitter but specially designed for dockwidgets stuff.
* @internal
*
* @author Max Judin.
@@ -56,7 +56,7 @@ public:
* @param orient orientation. Either @p Vertical or @p Horizontal
* @param pos procentual position of the splitter. Must be int [0...100].
*/
- KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50);
+ KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50);
virtual ~KDockSplitter(){}
/**
@@ -67,7 +67,7 @@ public:
* @param c0 the widget on top/left
* @param c1 the widget on borrom/right
*/
- void activate(QWidget *c0, QWidget *c1 = 0L);
+ void activate(TQWidget *c0, TQWidget *c1 = 0L);
/**
* Disables the splitter.
*/
@@ -115,22 +115,22 @@ public:
* The eventfilter installed on the @p divider processes
* all splitter resizing events.
*/
- virtual bool eventFilter(QObject *, QEvent *);
- virtual bool event( QEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+ virtual bool event( TQEvent * );
/**
* @return the top/left child widget.
*/
- QWidget* getFirst() const { return child0; }
+ TQWidget* getFirst() const { return child0; }
/**
* @return the bottom/right child widget.
*/
- QWidget* getLast() const { return child1; }
+ TQWidget* getLast() const { return child1; }
/**
* If @p w is child0, return child1, otherwise child0.
* @return the other child widget
*/
- QWidget* getAnother( QWidget* w ) const;
+ TQWidget* getAnother( TQWidget* w ) const;
void updateName();
/**
@@ -173,7 +173,7 @@ protected:
* @param child the overlapping child
* @return the (new) splitter position.
*/
- int checkValueOverlapped(int position, QWidget* child) const;
+ int checkValueOverlapped(int position, TQWidget* child) const;
/**
* The resize event resizes @p child0, @p child1 and the @p divider.
@@ -189,7 +189,7 @@ protected:
* @param ev the resize Event. If @p ev=0L the user changed
* the mode (for example from overlap to nonoverlap mode).
*/
- virtual void resizeEvent(QResizeEvent *ev);
+ virtual void resizeEvent(TQResizeEvent *ev);
/*
protected slots:
@@ -207,7 +207,7 @@ private:
* so no need to make pointer checks.
* child[01]->getWidget() may be KDockContainer.
*/
- QWidget *child0, *child1;
+ TQWidget *child0, *child1;
Orientation m_orientation;
/**
* If initialised is true, the divider!=0L. If false, the divider==0L!
@@ -217,7 +217,7 @@ private:
* The splitter controller which is between child0 and child1.
* Its size is 4 pixel.
*/
- QFrame* divider;
+ TQFrame* divider;
/**
* @p xpos and @p savedXPos represent the current divider position.
* If the orientation is Horizontal @p xpos actually is "ypos". So
@@ -249,13 +249,13 @@ class KDEUI_EXPORT KDockButton_Private : public QPushButton
{
Q_OBJECT
public:
- KDockButton_Private( QWidget *parent=0, const char *name=0 );
+ KDockButton_Private( TQWidget *parent=0, const char *name=0 );
~KDockButton_Private();
protected:
- virtual void drawButton( QPainter * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void drawButton( TQPainter * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
private:
bool moveMouse;
@@ -281,7 +281,7 @@ public slots:
/**
* Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget.
*/
- void slotFocusEmbeddedWidget(QWidget* w = 0L);
+ void slotFocusEmbeddedWidget(TQWidget* w = 0L);
public:
enum KDockWidgetResize
@@ -300,12 +300,12 @@ public:
NET::WindowType windowType;
#endif
- QWidget *_parent;
+ TQWidget *_parent;
bool transient;
- QGuardedPtr<QWidget> container;
+ TQGuardedPtr<TQWidget> container;
- QPoint resizePos;
+ TQPoint resizePos;
bool resizing;
KDockWidgetResize resizeMode;
};
@@ -314,8 +314,8 @@ class KDockWidgetHeaderPrivate
: public QObject
{
public:
- KDockWidgetHeaderPrivate( QObject* parent )
- : QObject( parent )
+ KDockWidgetHeaderPrivate( TQObject* parent )
+ : TQObject( parent )
{
forceCloseButtonHidden=false;
toDesktopButton = 0;
@@ -327,9 +327,9 @@ public:
bool showToDesktopButton;
bool topLevel;
- QPtrList<KDockButton_Private> btns;
+ TQPtrList<KDockButton_Private> btns;
bool forceCloseButtonHidden;
- QWidget *dummy;
+ TQWidget *dummy;
};
#endif
diff --git a/kdeui/kdockwindow.h b/kdeui/kdockwindow.h
index 93d550a75..4b7a34049 100644
--- a/kdeui/kdockwindow.h
+++ b/kdeui/kdockwindow.h
@@ -18,7 +18,7 @@
#ifndef KDOCKWINDOW_H
#define KDOCKWINDOW_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <ksystemtray.h>
#ifndef KDE_NO_COMPAT
@@ -33,7 +33,7 @@ class KDE_DEPRECATED KDockWindow : public KSystemTray
{
Q_OBJECT
public:
- KDockWindow( QWidget* parent = 0, const char* name = 0 )
+ KDockWindow( TQWidget* parent = 0, const char* name = 0 )
: KSystemTray( parent, name ) {}
~KDockWindow() {}
};
diff --git a/kdeui/kdualcolorbutton.cpp b/kdeui/kdualcolorbutton.cpp
index 24a4e9e0d..2b4c2ecfd 100644
--- a/kdeui/kdualcolorbutton.cpp
+++ b/kdeui/kdualcolorbutton.cpp
@@ -22,18 +22,18 @@
#include "dcolorarrow.xbm"
#include "dcolorreset.xpm"
#include <kglobalsettings.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
class KDualColorButton::KDualColorPrivate
{
public:
- QWidget* dialogParent;
+ TQWidget* dialogParent;
};
-KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* dialogParent)
- : QWidget(parent, name),
+KDualColorButton::KDualColorButton(TQWidget *parent, const char *name, TQWidget* dialogParent)
+ : TQWidget(parent, name),
d (new KDualColorPrivate)
{
if (!dialogParent && parent) {
@@ -42,12 +42,12 @@ KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* d
d->dialogParent = dialogParent;
}
- arrowBitmap = new QBitmap(dcolorarrow_width, dcolorarrow_height,
+ arrowBitmap = new TQBitmap(dcolorarrow_width, dcolorarrow_height,
(const unsigned char *)dcolorarrow_bits, true);
arrowBitmap->setMask(*arrowBitmap); // heh
- resetPixmap = new QPixmap((const char **)dcolorreset_xpm);
- fg = QBrush(Qt::black, SolidPattern);
- bg = QBrush(Qt::white, SolidPattern);
+ resetPixmap = new TQPixmap((const char **)dcolorreset_xpm);
+ fg = TQBrush(Qt::black, SolidPattern);
+ bg = TQBrush(Qt::white, SolidPattern);
curColor = Foreground;
dragFlag = false;
miniCtlFlag = false;
@@ -56,19 +56,19 @@ KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* d
setAcceptDrops(true);
}
-KDualColorButton::KDualColorButton(const QColor &fgColor, const QColor &bgColor,
- QWidget *parent, const char *name, QWidget* dialogParent)
- : QWidget(parent, name),
+KDualColorButton::KDualColorButton(const TQColor &fgColor, const TQColor &bgColor,
+ TQWidget *parent, const char *name, TQWidget* dialogParent)
+ : TQWidget(parent, name),
d (new KDualColorPrivate)
{
d->dialogParent = dialogParent;
- arrowBitmap = new QBitmap(dcolorarrow_width, dcolorarrow_height,
+ arrowBitmap = new TQBitmap(dcolorarrow_width, dcolorarrow_height,
(const unsigned char *)dcolorarrow_bits, true);
arrowBitmap->setMask(*arrowBitmap);
- resetPixmap = new QPixmap((const char **)dcolorreset_xpm);
- fg = QBrush(fgColor, SolidPattern);
- bg = QBrush(bgColor, SolidPattern);
+ resetPixmap = new TQPixmap((const char **)dcolorreset_xpm);
+ fg = TQBrush(fgColor, SolidPattern);
+ bg = TQBrush(bgColor, SolidPattern);
curColor = Foreground;
dragFlag = false;
miniCtlFlag = false;
@@ -84,12 +84,12 @@ KDualColorButton::~KDualColorButton()
delete resetPixmap;
}
-QColor KDualColorButton::foreground() const
+TQColor KDualColorButton::foreground() const
{
return fg.color();
}
-QColor KDualColorButton::background() const
+TQColor KDualColorButton::background() const
{
return bg.color();
}
@@ -99,38 +99,38 @@ KDualColorButton::DualColor KDualColorButton::current() const
return curColor;
}
-QColor KDualColorButton::currentColor() const
+TQColor KDualColorButton::currentColor() const
{
return (curColor == Background ? bg.color() : fg.color());
}
-QSize KDualColorButton::sizeHint() const
+TQSize KDualColorButton::sizeHint() const
{
- return QSize(34, 34);
+ return TQSize(34, 34);
}
-void KDualColorButton::setForeground(const QColor &c)
+void KDualColorButton::setForeground(const TQColor &c)
{
- fg = QBrush(c, SolidPattern);
+ fg = TQBrush(c, SolidPattern);
repaint(false);
emit fgChanged(fg.color());
}
-void KDualColorButton::setBackground(const QColor &c)
+void KDualColorButton::setBackground(const TQColor &c)
{
- bg = QBrush(c, SolidPattern);
+ bg = TQBrush(c, SolidPattern);
repaint(false);
emit bgChanged(bg.color());
}
-void KDualColorButton::setCurrentColor(const QColor &c)
+void KDualColorButton::setCurrentColor(const TQColor &c)
{
if(curColor == Background)
- bg = QBrush(c, SolidPattern);
+ bg = TQBrush(c, SolidPattern);
else
- fg = QBrush(c, SolidPattern);
+ fg = TQBrush(c, SolidPattern);
repaint(false);
}
@@ -140,19 +140,19 @@ void KDualColorButton::setCurrent(DualColor s)
repaint(false);
}
-void KDualColorButton::metrics(QRect &fgRect, QRect &bgRect)
+void KDualColorButton::metrics(TQRect &fgRect, TQRect &bgRect)
{
- fgRect = QRect(0, 0, width()-14, height()-14);
- bgRect = QRect(14, 14, width()-14, height()-14);
+ fgRect = TQRect(0, 0, width()-14, height()-14);
+ bgRect = TQRect(14, 14, width()-14, height()-14);
}
-void KDualColorButton::paintEvent(QPaintEvent *)
+void KDualColorButton::paintEvent(TQPaintEvent *)
{
- QRect fgRect, bgRect;
- QPainter p(this);
+ TQRect fgRect, bgRect;
+ TQPainter p(this);
metrics(fgRect, bgRect);
- QBrush defBrush = colorGroup().brush(QColorGroup::Button);
+ TQBrush defBrush = colorGroup().brush(TQColorGroup::Button);
qDrawShadeRect(&p, bgRect, colorGroup(), curColor == Background, 2, 0,
isEnabled() ? &bg : &defBrush);
@@ -164,14 +164,14 @@ void KDualColorButton::paintEvent(QPaintEvent *)
}
-void KDualColorButton::dragEnterEvent(QDragEnterEvent *ev)
+void KDualColorButton::dragEnterEvent(TQDragEnterEvent *ev)
{
ev->accept(isEnabled() && KColorDrag::canDecode(ev));
}
-void KDualColorButton::dropEvent(QDropEvent *ev)
+void KDualColorButton::dropEvent(TQDropEvent *ev)
{
- QColor c;
+ TQColor c;
if(KColorDrag::decode(ev, c)){
if(curColor == Foreground){
fg.setColor(c);
@@ -185,9 +185,9 @@ void KDualColorButton::dropEvent(QDropEvent *ev)
}
}
-void KDualColorButton::mousePressEvent(QMouseEvent *ev)
+void KDualColorButton::mousePressEvent(TQMouseEvent *ev)
{
- QRect fgRect, bgRect;
+ TQRect fgRect, bgRect;
metrics(fgRect, bgRect);
mPos = ev->pos();
tmpColor = curColor;
@@ -203,7 +203,7 @@ void KDualColorButton::mousePressEvent(QMouseEvent *ev)
else if(ev->pos().x() > fgRect.width()){
// We handle the swap and reset controls as soon as the mouse is
// is pressed and ignore further events on this click (mosfet).
- QBrush c = fg;
+ TQBrush c = fg;
fg = bg;
bg = c;
emit fgChanged(fg.color());
@@ -221,7 +221,7 @@ void KDualColorButton::mousePressEvent(QMouseEvent *ev)
}
-void KDualColorButton::mouseMoveEvent(QMouseEvent *ev)
+void KDualColorButton::mouseMoveEvent(TQMouseEvent *ev)
{
if(!miniCtlFlag){
int delay = KGlobalSettings::dndEventDelay();
@@ -236,10 +236,10 @@ void KDualColorButton::mouseMoveEvent(QMouseEvent *ev)
}
}
-void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
+void KDualColorButton::mouseReleaseEvent(TQMouseEvent *ev)
{
if(!miniCtlFlag){
- QRect fgRect, bgRect;
+ TQRect fgRect, bgRect;
metrics(fgRect, bgRect);
if(dragFlag)
@@ -250,8 +250,8 @@ void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
emit currentChanged(Foreground);
}
else{
- QColor newColor = fg.color();
- if(KColorDialog::getColor(newColor, d->dialogParent) != QDialog::Rejected){
+ TQColor newColor = fg.color();
+ if(KColorDialog::getColor(newColor, d->dialogParent) != TQDialog::Rejected){
fg.setColor(newColor);
emit fgChanged(newColor);
}
@@ -263,8 +263,8 @@ void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
emit currentChanged(Background);
}
else{
- QColor newColor = bg.color();
- if(KColorDialog::getColor(newColor, d->dialogParent) != QDialog::Rejected){
+ TQColor newColor = bg.color();
+ if(KColorDialog::getColor(newColor, d->dialogParent) != TQDialog::Rejected){
bg.setColor(newColor);
emit bgChanged(newColor);
}
diff --git a/kdeui/kdualcolorbutton.h b/kdeui/kdualcolorbutton.h
index eb4a71ab2..b2aaf4753 100644
--- a/kdeui/kdualcolorbutton.h
+++ b/kdeui/kdualcolorbutton.h
@@ -19,8 +19,8 @@
#define __KDUALCOLORBTN_H
class QBitmap;
-#include <qbrush.h>
-#include <qwidget.h>
+#include <tqbrush.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -49,9 +49,9 @@ class KDEUI_EXPORT KDualColorButton : public QWidget
{
Q_OBJECT
Q_ENUMS( DualColor )
- Q_PROPERTY( QColor foreground READ foreground WRITE setForeground )
- Q_PROPERTY( QColor background READ background WRITE setBackground )
- Q_PROPERTY( QColor currentColor READ currentColor WRITE setCurrentColor STORED false DESIGNABLE false )
+ Q_PROPERTY( TQColor foreground READ foreground WRITE setForeground )
+ Q_PROPERTY( TQColor background READ background WRITE setBackground )
+ Q_PROPERTY( TQColor currentColor READ currentColor WRITE setCurrentColor STORED false DESIGNABLE false )
Q_PROPERTY( DualColor current READ current WRITE setCurrent )
public:
@@ -64,24 +64,24 @@ public:
* As of KDE 3.5.1, sets the dialog parent to the same as "parent" if that
* argument is non-null and the dialogParent argument is null.
*/
- KDualColorButton(QWidget *parent=0, const char *name=0, QWidget* dialogParent=0);
+ KDualColorButton(TQWidget *parent=0, const char *name=0, TQWidget* dialogParent=0);
/**
* Constructs a new KDualColorButton with the supplied foreground and
* background colors.
*/
- KDualColorButton(const QColor &fgColor, const QColor &bgColor,
- QWidget *parent=0, const char *name=0, QWidget* dialogParent=0);
+ KDualColorButton(const TQColor &fgColor, const TQColor &bgColor,
+ TQWidget *parent=0, const char *name=0, TQWidget* dialogParent=0);
~KDualColorButton();
/**
* Returns the current foreground color.
*/
- QColor foreground() const;
+ TQColor foreground() const;
/**
* Returns the current background color.
*/
- QColor background() const;
+ TQColor background() const;
/**
* Returns the current color item selected by the user.
*/
@@ -89,21 +89,21 @@ public:
/**
* Returns the color of the selected item.
*/
- QColor currentColor() const;
+ TQColor currentColor() const;
/**
* Returns the minimum size needed to display the widget and all its
* controls.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
/**
* Sets the foreground color.
*/
- void setForeground(const QColor &c);
+ void setForeground(const TQColor &c);
/**
* Sets the background color.
*/
- void setBackground(const QColor &c);
+ void setBackground(const TQColor &c);
/**
* Sets the current selected color item.
*/
@@ -111,16 +111,16 @@ public slots:
/**
* Sets the color of the selected item.
*/
- void setCurrentColor(const QColor &c);
+ void setCurrentColor(const TQColor &c);
signals:
/**
* Emitted when the foreground color is changed.
*/
- void fgChanged(const QColor &c);
+ void fgChanged(const TQColor &c);
/**
* Emitted when the background color is changed.
*/
- void bgChanged(const QColor &c);
+ void bgChanged(const TQColor &c);
/**
* Emitted when the user changes the current color selection.
*/
@@ -133,19 +133,19 @@ protected:
* be at the top right, the reset control will always be at the bottom
* left, and you must leave at least a 14x14 space in those corners.
*/
- virtual void metrics(QRect &fgRect, QRect &bgRect);
- virtual void paintEvent(QPaintEvent *ev);
- virtual void mousePressEvent(QMouseEvent *ev);
- virtual void mouseMoveEvent(QMouseEvent *ev);
- virtual void mouseReleaseEvent(QMouseEvent *ev);
+ virtual void metrics(TQRect &fgRect, TQRect &bgRect);
+ virtual void paintEvent(TQPaintEvent *ev);
+ virtual void mousePressEvent(TQMouseEvent *ev);
+ virtual void mouseMoveEvent(TQMouseEvent *ev);
+ virtual void mouseReleaseEvent(TQMouseEvent *ev);
// Dnd
- virtual void dragEnterEvent(QDragEnterEvent *ev);
- virtual void dropEvent(QDropEvent *ev);
+ virtual void dragEnterEvent(TQDragEnterEvent *ev);
+ virtual void dropEvent(TQDropEvent *ev);
private:
- QBitmap *arrowBitmap;
- QPixmap *resetPixmap;
- QBrush fg, bg;
- QPoint mPos;
+ TQBitmap *arrowBitmap;
+ TQPixmap *resetPixmap;
+ TQBrush fg, bg;
+ TQPoint mPos;
bool dragFlag, miniCtlFlag;
DualColor curColor, tmpColor;
diff --git a/kdeui/keditcl.h b/kdeui/keditcl.h
index b05148fb0..6867cdf46 100644
--- a/kdeui/keditcl.h
+++ b/kdeui/keditcl.h
@@ -21,8 +21,8 @@
#ifndef __KEDITCL_H__
#define __KEDITCL_H__
-#include <qmultilineedit.h>
-#include <qstring.h>
+#include <tqmultilineedit.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QDropEvent;
@@ -39,7 +39,7 @@ class KDEUI_EXPORT KEdGotoLine : public KDialogBase
Q_OBJECT
public:
- KEdGotoLine( QWidget *parent=0, const char *name=0, bool modal=true );
+ KEdGotoLine( TQWidget *parent=0, const char *name=0, bool modal=true );
int getLineNumber();
public slots:
@@ -59,16 +59,16 @@ private:
class KDEUI_EXPORT KEdFind : public KDialogBase
{
Q_OBJECT
- Q_PROPERTY( QString text READ getText WRITE setText )
+ Q_PROPERTY( TQString text READ getText WRITE setText )
Q_PROPERTY( bool caseSensitivity READ case_sensitive WRITE setCaseSensitive )
Q_PROPERTY( bool direction READ get_direction WRITE setDirection )
public:
- KEdFind( QWidget *parent = 0, const char *name=0, bool modal=true);
+ KEdFind( TQWidget *parent = 0, const char *name=0, bool modal=true);
~KEdFind();
- QString getText() const;
- void setText(QString string);
+ TQString getText() const;
+ void setText(TQString string);
void setCaseSensitive( bool b );
bool case_sensitive() const;
void setDirection( bool b );
@@ -83,14 +83,14 @@ public:
protected slots:
void slotCancel( void );
void slotUser1( void );
- void textSearchChanged ( const QString & );
+ void textSearchChanged ( const TQString & );
protected:
- QVButtonGroup* group;
+ TQVButtonGroup* group;
private:
- QCheckBox *sensitive;
- QCheckBox *direction;
+ TQCheckBox *sensitive;
+ TQCheckBox *direction;
virtual void done(int i ) { KDialogBase::done(i); }
@@ -112,12 +112,12 @@ class KDEUI_EXPORT KEdReplace : public KDialogBase
public:
- KEdReplace ( QWidget *parent = 0, const char *name=0, bool modal=true );
+ KEdReplace ( TQWidget *parent = 0, const char *name=0, bool modal=true );
~KEdReplace();
- QString getText();
- QString getReplaceText();
- void setText(QString);
+ TQString getText();
+ TQString getReplaceText();
+ void setText(TQString);
/**
* @returns the combobox containing the history of searches. Can be used
@@ -140,11 +140,11 @@ protected slots:
void slotUser1( void );
void slotUser2( void );
void slotUser3( void );
- void textSearchChanged ( const QString & );
+ void textSearchChanged ( const TQString & );
private:
- QCheckBox *sensitive;
- QCheckBox *direction;
+ TQCheckBox *sensitive;
+ TQCheckBox *direction;
virtual void done(int i ) { KDialogBase::done(i); }
@@ -176,7 +176,7 @@ public:
/**
* The usual constructor.
**/
- KEdit (QWidget *_parent=NULL, const char *name=NULL);
+ KEdit (TQWidget *_parent=NULL, const char *name=NULL);
~KEdit();
@@ -190,7 +190,7 @@ public:
/**
* Insert text from the text stream into the edit widget.
**/
- void insertText(QTextStream *);
+ void insertText(TQTextStream *);
/**
* Save text from the edit widget to a text stream.
@@ -198,8 +198,8 @@ public:
* If @p softWrap is true soft line wrappings are ignored.
* @since 3.1
**/
- void saveText(QTextStream *, bool softWrap);
- void saveText(QTextStream *); // KDE 4.0: remove
+ void saveText(TQTextStream *, bool softWrap);
+ void saveText(TQTextStream *); // KDE 4.0: remove
/**
* Let the user select a font and set the font of the textwidget to that
@@ -242,7 +242,7 @@ public:
*
* The Popup Menu will be activated on a right mouse button press event.
*/
- void installRBPopup( QPopupMenu* );
+ void installRBPopup( TQPopupMenu* );
/**
* Retrieve the current line number.
@@ -255,7 +255,7 @@ public:
* Retrieve the actual column number the cursor is on.
*
* This call differs
- * from QMultiLineEdit::getCursorPosition() in that it returns the actual cursor
+ * from TQMultiLineEdit::getCursorPosition() in that it returns the actual cursor
* position and not the character position. Use currentLine() and currentColumn()
* if you want to display the current line or column in the status bar for
* example.
@@ -281,21 +281,21 @@ public:
*/
void setOverwriteEnabled(bool b);
- QString selectWordUnderCursor();
+ TQString selectWordUnderCursor();
/// @since 3.3
- QPopupMenu *createPopupMenu( const QPoint& pos );
+ TQPopupMenu *createPopupMenu( const TQPoint& pos );
void setAutoUpdate(bool b);
signals:
/** This signal is emitted if the user dropped a URL over the text editor
- * QMultiLineEdit widget.
+ * TQMultiLineEdit widget.
*
* Note that the user can drop also Text on it, but
- * this is already handled internally by QMultiLineEdit.
+ * this is already handled internally by TQMultiLineEdit.
*/
- void gotUrlDrop(QDropEvent* e);
+ void gotUrlDrop(TQDropEvent* e);
/** This signal is emitted whenever the cursor position changes.
*
@@ -319,11 +319,11 @@ public slots:
/**
* @internal
**/
- void corrected (const QString &originalword, const QString &newword, unsigned int pos);
+ void corrected (const TQString &originalword, const TQString &newword, unsigned int pos);
/**
* @internal
**/
- void misspelling (const QString &word, const QStringList &, unsigned int pos);
+ void misspelling (const TQString &word, const TQStringList &, unsigned int pos);
private slots:
/**
@@ -364,10 +364,10 @@ private slots:
protected:
void computePosition();
- int doSearch(QString s_pattern, bool case_sensitive,
+ int doSearch(TQString s_pattern, bool case_sensitive,
bool regex, bool forward,int line, int col);
- int doReplace(QString s_pattern, bool case_sensitive,
+ int doReplace(TQString s_pattern, bool case_sensitive,
bool regex, bool forward,int line, int col,bool replace);
/**
@@ -385,31 +385,31 @@ protected:
* Reimplemented for internal reasons, the API is not affected.
*/
virtual void ensureCursorVisible();
- virtual void setCursor( const QCursor & );
- virtual void viewportPaintEvent( QPaintEvent* );
+ virtual void setCursor( const TQCursor & );
+ virtual void viewportPaintEvent( TQPaintEvent* );
protected:
- void keyPressEvent ( QKeyEvent * );
+ void keyPressEvent ( TQKeyEvent * );
// DnD interface
- void dragMoveEvent(QDragMoveEvent* e);
- void dragEnterEvent(QDragEnterEvent* e);
- void dropEvent(QDropEvent* e);
- void contentsDragMoveEvent(QDragMoveEvent* e);
- void contentsDragEnterEvent(QDragEnterEvent* e);
- void contentsDropEvent(QDropEvent* e);
+ void dragMoveEvent(TQDragMoveEvent* e);
+ void dragEnterEvent(TQDragEnterEvent* e);
+ void dropEvent(TQDropEvent* e);
+ void contentsDragMoveEvent(TQDragMoveEvent* e);
+ void contentsDragEnterEvent(TQDragEnterEvent* e);
+ void contentsDropEvent(TQDropEvent* e);
private:
- QTimer* repaintTimer;
+ TQTimer* repaintTimer;
QString killbufferstring;
- QWidget *parent;
+ TQWidget *parent;
KEdFind *srchdialog;
KEdReplace *replace_dialog;
KEdGotoLine *gotodialog;
- QString pattern;
+ TQString pattern;
bool can_replace;
bool killing;
diff --git a/kdeui/keditcl1.cpp b/kdeui/keditcl1.cpp
index 56ab68c60..a77e1c523 100644
--- a/kdeui/keditcl1.cpp
+++ b/kdeui/keditcl1.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kcursor.h>
@@ -46,8 +46,8 @@ public:
};
-KEdit::KEdit(QWidget *_parent, const char *name)
- : QMultiLineEdit(_parent, name)
+KEdit::KEdit(TQWidget *_parent, const char *name)
+ : TQMultiLineEdit(_parent, name)
{
d = new KEditPrivate;
d->overwriteEnabled = false;
@@ -67,8 +67,8 @@ KEdit::KEdit(QWidget *_parent, const char *name)
setAcceptDrops(true);
KCursor::setAutoHideCursor( this, true );
- connect(this, SIGNAL(cursorPositionChanged(int,int)),
- this, SLOT(slotCursorPositionChanged()));
+ connect(this, TQT_SIGNAL(cursorPositionChanged(int,int)),
+ this, TQT_SLOT(slotCursorPositionChanged()));
}
@@ -84,17 +84,17 @@ KEdit::setAutoUpdate(bool b)
}
void
-KEdit::insertText(QTextStream *stream)
+KEdit::insertText(TQTextStream *stream)
{
// setAutoUpdate(false);
int line, col;
getCursorPosition(&line, &col);
int saveline = line;
int savecol = col;
- QString textLine;
+ TQString textLine;
// MS: Patch by Martin Schenk <martin@schenk.com>
- // MS: disable UNDO, or QMultiLineEdit remembers every textLine !!!
+ // MS: disable UNDO, or TQMultiLineEdit remembers every textLine !!!
// memory usage is:
// textLine: 2*size rounded up to nearest power of 2 (520Kb -> 1024Kb)
// widget: about (2*size + 60bytes*lines)
@@ -104,13 +104,13 @@ KEdit::insertText(QTextStream *stream)
// MS: read everything at once if file <= 1MB,
// else read in 5000-line chunks to keep memory usage acceptable.
- QIODevice *dev=stream->device();
+ TQIODevice *dev=stream->device();
if (dev && dev->size()>(1024*1024)) {
while(1) {
int i;
textLine="";
for (i=0; i<5000; i++) {
- QString line=stream->readLine();
+ TQString line=stream->readLine();
if (line.isNull()) break; // EOF
textLine+=line+'\n';
}
@@ -138,7 +138,7 @@ KEdit::insertText(QTextStream *stream)
// kedit used to be really really fast using memmap etc .....
// oh well ....
- // QString str = text();
+ // TQString str = text();
// for (int i = 0; i < (int) str.length(); i++)
// printf("KEdit: U+%04X\n", str[i].unicode());
@@ -150,21 +150,21 @@ KEdit::cleanWhiteSpace()
d->autoUpdate = false;
if (!hasMarkedText())
selectAll();
- QString oldText = markedText();
- QString newText;
- QStringList lines = QStringList::split('\n', oldText, true);
+ TQString oldText = markedText();
+ TQString newText;
+ TQStringList lines = TQStringList::split('\n', oldText, true);
bool addSpace = false;
bool firstLine = true;
- QChar lastChar = oldText[oldText.length()-1];
- QChar firstChar = oldText[0];
- for(QStringList::Iterator it = lines.begin();
+ TQChar lastChar = oldText[oldText.length()-1];
+ TQChar firstChar = oldText[0];
+ for(TQStringList::Iterator it = lines.begin();
it != lines.end();)
{
- QString line = (*it).simplifyWhiteSpace();
+ TQString line = (*it).simplifyWhiteSpace();
if (line.isEmpty())
{
if (addSpace)
- newText += QString::fromLatin1("\n\n");
+ newText += TQString::fromLatin1("\n\n");
if (firstLine)
{
if (firstChar.isSpace())
@@ -206,16 +206,16 @@ KEdit::cleanWhiteSpace()
if (wordWrap() == NoWrap)
{
// If wordwrap is off, we have to do some line-wrapping ourselves now
- // We use another QMultiLineEdit for this, so that we get nice undo
+ // We use another TQMultiLineEdit for this, so that we get nice undo
// behavior.
- QMultiLineEdit *we = new QMultiLineEdit();
+ TQMultiLineEdit *we = new TQMultiLineEdit();
we->setWordWrap(FixedColumnWidth);
we->setWrapColumnOrWidth(78);
we->setText(newText);
- newText = QString::null;
+ newText = TQString::null;
for(int i = 0; i < we->numLines(); i++)
{
- QString line = we->textLine(i);
+ TQString line = we->textLine(i);
if (line.right(1) != "\n")
line += '\n';
newText += line;
@@ -233,13 +233,13 @@ KEdit::cleanWhiteSpace()
void
-KEdit::saveText(QTextStream *stream)
+KEdit::saveText(TQTextStream *stream)
{
saveText(stream, false);
}
void
-KEdit::saveText(QTextStream *stream, bool softWrap)
+KEdit::saveText(TQTextStream *stream, bool softWrap)
{
int line_count = numLines()-1;
if (line_count < 0)
@@ -264,7 +264,7 @@ KEdit::saveText(QTextStream *stream, bool softWrap)
}
else
{
- QString parag_text = textLine(i);
+ TQString parag_text = textLine(i);
int pos = 0;
int first_pos = 0;
int current_line = 0;
@@ -331,7 +331,7 @@ void KEdit::computePosition()
line_pos += line_offset;
// We now calculate where the current line starts in the paragraph.
- QString linetext = textLine(line);
+ TQString linetext = textLine(line);
int start_of_line = 0;
if (line_offset > 0)
{
@@ -380,7 +380,7 @@ void KEdit::computePosition()
}
-void KEdit::keyPressEvent ( QKeyEvent *e)
+void KEdit::keyPressEvent ( TQKeyEvent *e)
{
// ignore Ctrl-Return so that KDialogBase can catch them
if ( e->key() == Key_Return && e->state() == ControlButton ) {
@@ -395,7 +395,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
int line = 0;
int col = 0;
- QString killstring;
+ TQString killstring;
if(!killing){
killbufferstring = "";
@@ -442,7 +442,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
killing = true;
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
setModified(true);
return;
}
@@ -453,7 +453,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
getCursorPosition(&line,&col);
- QString tmpstring = killbufferstring;
+ TQString tmpstring = killbufferstring;
if(!killtrue)
tmpstring += '\n';
@@ -469,10 +469,10 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
if ( KStdAccel::copy().contains( key ) )
copy();
else if ( isReadOnly() )
- QMultiLineEdit::keyPressEvent( e );
- // If this is an unmodified printable key, send it directly to QMultiLineEdit.
+ TQMultiLineEdit::keyPressEvent( e );
+ // If this is an unmodified printable key, send it directly to TQMultiLineEdit.
else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && e->text().unicode()->isPrint() )
- QMultiLineEdit::keyPressEvent( e );
+ TQMultiLineEdit::keyPressEvent( e );
else if ( KStdAccel::paste().contains( key ) ) {
paste();
setModified(true);
@@ -557,16 +557,16 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
}
}
else
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
}
-void KEdit::installRBPopup(QPopupMenu *p) {
+void KEdit::installRBPopup(TQPopupMenu *p) {
KContextMenuManager::insert( this, p );
}
void KEdit::selectFont(){
- QFont font = this->font();
+ TQFont font = this->font();
KFontDialog::getFont(font);
this->setFont(font);
@@ -616,55 +616,55 @@ void KEdit::doGotoLine() {
}
-void KEdit::dragMoveEvent(QDragMoveEvent* e) {
+void KEdit::dragMoveEvent(TQDragMoveEvent* e) {
if(KURLDrag::canDecode(e))
e->accept();
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::dragMoveEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::dragMoveEvent(e);
}
-void KEdit::contentsDragMoveEvent(QDragMoveEvent* e) {
+void KEdit::contentsDragMoveEvent(TQDragMoveEvent* e) {
if(KURLDrag::canDecode(e))
e->accept();
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::contentsDragMoveEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::contentsDragMoveEvent(e);
}
-void KEdit::dragEnterEvent(QDragEnterEvent* e) {
+void KEdit::dragEnterEvent(TQDragEnterEvent* e) {
kdDebug() << "KEdit::dragEnterEvent()" << endl;
- e->accept(KURLDrag::canDecode(e) || QTextDrag::canDecode(e));
+ e->accept(KURLDrag::canDecode(e) || TQTextDrag::canDecode(e));
}
-void KEdit::contentsDragEnterEvent(QDragEnterEvent* e) {
+void KEdit::contentsDragEnterEvent(TQDragEnterEvent* e) {
kdDebug() << "KEdit::contentsDragEnterEvent()" << endl;
- e->accept(KURLDrag::canDecode(e) || QTextDrag::canDecode(e));
+ e->accept(KURLDrag::canDecode(e) || TQTextDrag::canDecode(e));
}
-void KEdit::dropEvent(QDropEvent* e) {
+void KEdit::dropEvent(TQDropEvent* e) {
kdDebug() << "KEdit::dropEvent()" << endl;
if(KURLDrag::canDecode(e)) {
emit gotUrlDrop(e);
}
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::dropEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::dropEvent(e);
}
-void KEdit::contentsDropEvent(QDropEvent* e) {
+void KEdit::contentsDropEvent(TQDropEvent* e) {
kdDebug() << "KEdit::contentsDropEvent()" << endl;
if(KURLDrag::canDecode(e)) {
emit gotUrlDrop(e);
}
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::contentsDropEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::contentsDropEvent(e);
}
void KEdit::setOverwriteEnabled(bool b)
@@ -672,10 +672,10 @@ void KEdit::setOverwriteEnabled(bool b)
d->overwriteEnabled = b;
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KEdit::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QMultiLineEdit::create( id, initializeWindow, destroyOldWindow );
+ TQMultiLineEdit::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( this, true );
}
@@ -684,23 +684,23 @@ void KEdit::ensureCursorVisible()
if (!d->autoUpdate)
return;
- QMultiLineEdit::ensureCursorVisible();
+ TQMultiLineEdit::ensureCursorVisible();
}
-void KEdit::setCursor( const QCursor &c )
+void KEdit::setCursor( const TQCursor &c )
{
if (!d->autoUpdate)
return;
- QMultiLineEdit::setCursor(c);
+ TQMultiLineEdit::setCursor(c);
}
-void KEdit::viewportPaintEvent( QPaintEvent*pe )
+void KEdit::viewportPaintEvent( TQPaintEvent*pe )
{
if (!d->autoUpdate)
return;
- QMultiLineEdit::viewportPaintEvent(pe);
+ TQMultiLineEdit::viewportPaintEvent(pe);
}
diff --git a/kdeui/keditcl2.cpp b/kdeui/keditcl2.cpp
index 8a20eaad6..36d1b8f3b 100644
--- a/kdeui/keditcl2.cpp
+++ b/kdeui/keditcl2.cpp
@@ -21,15 +21,15 @@
#include <limits.h> // INT_MAX
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qpopupmenu.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -58,14 +58,14 @@ void KEdit::search(){
if( !srchdialog )
{
srchdialog = new KEdFind( this, "searchdialog", false);
- connect(srchdialog,SIGNAL(search()),this,SLOT(search_slot()));
- connect(srchdialog,SIGNAL(done()),this,SLOT(searchdone_slot()));
+ connect(srchdialog,TQT_SIGNAL(search()),this,TQT_SLOT(search_slot()));
+ connect(srchdialog,TQT_SIGNAL(done()),this,TQT_SLOT(searchdone_slot()));
}
// If we already searched / replaced something before make sure it shows
// up in the find dialog line-edit.
- QString string;
+ TQString string;
string = srchdialog->getText();
srchdialog->setText(string.isEmpty() ? pattern : string);
@@ -84,7 +84,7 @@ void KEdit::search_slot(){
if (!srchdialog)
return;
- QString to_find_string = srchdialog->getText();
+ TQString to_find_string = srchdialog->getText();
getCursorPosition(&line,&col);
// srchdialog->get_direction() is true if searching backward
@@ -119,7 +119,7 @@ again:
"Continue from the end?"),
i18n("Find"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
line = numLines() - 1;
col = string.length();
last_search = BACKWARD;
@@ -144,8 +144,8 @@ void KEdit::searchdone_slot(){
last_search = NONE;
}
-/* antlarr: KDE 4: make it const QString & */
-int KEdit::doSearch(QString s_pattern, bool case_sensitive,
+/* antlarr: KDE 4: make it const TQString & */
+int KEdit::doSearch(TQString s_pattern, bool case_sensitive,
bool wildcard, bool forward, int line, int col){
(void) wildcard; // reserved for possible extension to regex
@@ -156,7 +156,7 @@ int KEdit::doSearch(QString s_pattern, bool case_sensitive,
if(forward){
- QString string;
+ TQString string;
for(i = line; i < numLines(); i++) {
@@ -184,7 +184,7 @@ int KEdit::doSearch(QString s_pattern, bool case_sensitive,
}
else{ // searching backwards
- QString string;
+ TQString string;
for(i = line; i >= 0; i--) {
@@ -254,13 +254,13 @@ void KEdit::replace()
if( !replace_dialog )
{
replace_dialog = new KEdReplace( this, "replace_dialog", false );
- connect(replace_dialog,SIGNAL(find()),this,SLOT(replace_search_slot()));
- connect(replace_dialog,SIGNAL(replace()),this,SLOT(replace_slot()));
- connect(replace_dialog,SIGNAL(replaceAll()),this,SLOT(replace_all_slot()));
- connect(replace_dialog,SIGNAL(done()),this,SLOT(replacedone_slot()));
+ connect(replace_dialog,TQT_SIGNAL(find()),this,TQT_SLOT(replace_search_slot()));
+ connect(replace_dialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replace_slot()));
+ connect(replace_dialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replace_all_slot()));
+ connect(replace_dialog,TQT_SIGNAL(done()),this,TQT_SLOT(replacedone_slot()));
}
- QString string = replace_dialog->getText();
+ TQString string = replace_dialog->getText();
replace_dialog->setText(string.isEmpty() ? pattern : string);
@@ -284,7 +284,7 @@ void KEdit::replace_slot(){
int line,col, length;
- QString string = replace_dialog->getReplaceText();
+ TQString string = replace_dialog->getReplaceText();
length = string.length();
this->cut();
@@ -318,7 +318,7 @@ void KEdit::replace_all_slot(){
if (!replace_dialog)
return;
- QString to_find_string = replace_dialog->getText();
+ TQString to_find_string = replace_dialog->getText();
int lineFrom, lineTo, colFrom, colTo;
getSelection(&lineFrom, &colFrom, &lineTo, &colTo);
@@ -389,7 +389,7 @@ again:
"Continue from the end?"),
i18n("Find"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
replace_all_line = numLines() - 1;
replace_all_col = string.length();
last_replace = BACKWARD;
@@ -409,7 +409,7 @@ void KEdit::replace_search_slot(){
if (!replace_dialog)
return;
- QString to_find_string = replace_dialog->getText();
+ TQString to_find_string = replace_dialog->getText();
int lineFrom, lineTo, colFrom, colTo;
getSelection(&lineFrom, &colFrom, &lineTo, &colTo);
@@ -468,7 +468,7 @@ again:
"Continue from the end?"),
i18n("Replace"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
line = numLines() - 1;
col = string.length();
last_replace = BACKWARD;
@@ -501,8 +501,8 @@ void KEdit::replacedone_slot(){
-/* antlarr: KDE 4: make it const QString & */
-int KEdit::doReplace(QString s_pattern, bool case_sensitive,
+/* antlarr: KDE 4: make it const TQString & */
+int KEdit::doReplace(TQString s_pattern, bool case_sensitive,
bool wildcard, bool forward, int line, int col, bool replace_all){
@@ -511,9 +511,9 @@ int KEdit::doReplace(QString s_pattern, bool case_sensitive,
int line_counter, length;
int pos = -1;
- QString string;
- QString stringnew;
- QString replacement;
+ TQString string;
+ TQString stringnew;
+ TQString replacement;
replacement = replace_dialog->getReplaceText();
line_counter = line;
@@ -684,7 +684,7 @@ int KEdit::doReplace(QString s_pattern, bool case_sensitive,
class KEdFind::KEdFindPrivate
{
public:
- KEdFindPrivate( QWidget *parent ) {
+ KEdFindPrivate( TQWidget *parent ) {
combo = new KHistoryCombo( parent, "value" );
combo->setMaxCount( 20 ); // just some default
}
@@ -696,45 +696,45 @@ public:
};
-KEdFind::KEdFind( QWidget *parent, const char *name, bool modal )
+KEdFind::KEdFind( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Find"),
modal ? User1|Cancel : User1|Close, User1, false, KGuiItem( i18n("&Find"), "find") )
{
setWFlags( WType_TopLevel );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
d = new KEdFindPrivate( page );
- QString text = i18n("Find:");
- QLabel *label = new QLabel( text, page , "find" );
+ TQString text = i18n("Find:");
+ TQLabel *label = new TQLabel( text, page , "find" );
topLayout->addWidget( label );
d->combo->setMinimumWidth(fontMetrics().maxWidth()*20);
d->combo->setFocus();
- connect(d->combo, SIGNAL(textChanged ( const QString & )),
- this,SLOT(textSearchChanged ( const QString & )));
+ connect(d->combo, TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textSearchChanged ( const TQString & )));
topLayout->addWidget(d->combo);
- group = new QVButtonGroup( i18n("Options"), page );
+ group = new TQVButtonGroup( i18n("Options"), page );
topLayout->addWidget( group );
- QHBox* row1 = new QHBox( group );
+ TQHBox* row1 = new TQHBox( group );
text = i18n("Case &sensitive");
- sensitive = new QCheckBox( text, row1, "case");
+ sensitive = new TQCheckBox( text, row1, "case");
text = i18n("Find &backwards");
- direction = new QCheckBox( text, row1, "direction" );
+ direction = new TQCheckBox( text, row1, "direction" );
enableButton( KDialogBase::User1, !d->combo->currentText().isEmpty() );
if ( !modal )
- connect( this, SIGNAL( closeClicked() ), this, SLOT( slotCancel() ) );
+ connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCancel() ) );
}
KEdFind::~KEdFind()
@@ -742,7 +742,7 @@ KEdFind::~KEdFind()
delete d;
}
-void KEdFind::textSearchChanged ( const QString &text )
+void KEdFind::textSearchChanged ( const TQString &text )
{
enableButton( KDialogBase::User1, !text.isEmpty() );
}
@@ -763,14 +763,14 @@ void KEdFind::slotUser1( void )
}
-QString KEdFind::getText() const
+TQString KEdFind::getText() const
{
return d->combo->currentText();
}
-/* antlarr: KDE 4: make it const QString & */
-void KEdFind::setText(QString string)
+/* antlarr: KDE 4: make it const TQString & */
+void KEdFind::setText(TQString string)
{
d->combo->setEditText(string);
d->combo->lineEdit()->selectAll();
@@ -811,7 +811,7 @@ KHistoryCombo * KEdFind::searchCombo() const
class KEdReplace::KEdReplacePrivate
{
public:
- KEdReplacePrivate( QWidget *parent ) {
+ KEdReplacePrivate( TQWidget *parent ) {
searchCombo = new KHistoryCombo( parent, "value" );
replaceCombo = new KHistoryCombo( parent, "replace_value" );
@@ -826,7 +826,7 @@ public:
KHistoryCombo *searchCombo, *replaceCombo;
};
-KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
+KEdReplace::KEdReplace( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Replace"),
modal ? User3|User2|User1|Cancel : User3|User2|User1|Close,
User3, false,
@@ -836,13 +836,13 @@ KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
setButtonBoxOrientation( Vertical );
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
d = new KEdReplacePrivate( page );
- QString text = i18n("Find:");
- QLabel *label = new QLabel( text, page, "find" );
+ TQString text = i18n("Find:");
+ TQLabel *label = new TQLabel( text, page, "find" );
topLayout->addWidget( label );
d->searchCombo->setMinimumWidth(fontMetrics().maxWidth()*20);
@@ -850,25 +850,25 @@ KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
topLayout->addWidget(d->searchCombo);
text = i18n("Replace with:");
- label = new QLabel( text, page, "replace" );
+ label = new TQLabel( text, page, "replace" );
topLayout->addWidget( label );
d->replaceCombo->setMinimumWidth(fontMetrics().maxWidth()*20);
topLayout->addWidget(d->replaceCombo);
- connect(d->searchCombo, SIGNAL(textChanged ( const QString & )),
- this,SLOT(textSearchChanged ( const QString & )));
+ connect(d->searchCombo, TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textSearchChanged ( const TQString & )));
- QButtonGroup *group = new QButtonGroup( i18n("Options"), page );
+ TQButtonGroup *group = new TQButtonGroup( i18n("Options"), page );
topLayout->addWidget( group );
- QGridLayout *gbox = new QGridLayout( group, 3, 2, spacingHint() );
+ TQGridLayout *gbox = new TQGridLayout( group, 3, 2, spacingHint() );
gbox->addRowSpacing( 0, fontMetrics().lineSpacing() );
text = i18n("Case &sensitive");
- sensitive = new QCheckBox( text, group, "case");
+ sensitive = new TQCheckBox( text, group, "case");
text = i18n("Find &backwards");
- direction = new QCheckBox( text, group, "direction" );
+ direction = new TQCheckBox( text, group, "direction" );
gbox->addWidget( sensitive, 1, 0 );
gbox->addWidget( direction, 1, 1 );
gbox->setRowStretch( 2, 10 );
@@ -880,7 +880,7 @@ KEdReplace::~KEdReplace()
delete d;
}
-void KEdReplace::textSearchChanged ( const QString &text )
+void KEdReplace::textSearchChanged ( const TQString &text )
{
bool state=text.isEmpty();
enableButton( KDialogBase::User1, !state );
@@ -930,20 +930,20 @@ void KEdReplace::slotUser3( void )
}
-QString KEdReplace::getText()
+TQString KEdReplace::getText()
{
return d->searchCombo->currentText();
}
-QString KEdReplace::getReplaceText()
+TQString KEdReplace::getReplaceText()
{
return d->replaceCombo->currentText();
}
-/* antlarr: KDE 4: make it const QString & */
-void KEdReplace::setText(QString string)
+/* antlarr: KDE 4: make it const TQString & */
+void KEdReplace::setText(TQString string)
{
d->searchCombo->setEditText(string);
d->searchCombo->lineEdit()->selectAll();
@@ -972,12 +972,12 @@ KHistoryCombo * KEdReplace::replaceCombo() const
}
-KEdGotoLine::KEdGotoLine( QWidget *parent, const char *name, bool modal )
+KEdGotoLine::KEdGotoLine( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Go to Line"), modal ? Ok|Cancel : Ok|Close, Ok, false )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
lineNum = new KIntNumInput( 1, page);
lineNum->setRange(1, 1000000, 1, false);
@@ -1013,7 +1013,7 @@ void KEdit::spellcheck_start()
setReadOnly(true);
}
-void KEdit::misspelling (const QString &word, const QStringList &, unsigned int pos)
+void KEdit::misspelling (const TQString &word, const TQStringList &, unsigned int pos)
{
unsigned int l = 0;
@@ -1031,7 +1031,7 @@ void KEdit::misspelling (const QString &word, const QStringList &, unsigned int
}
//need to use pos for insert, not cur, so forget cur altogether
-void KEdit::corrected (const QString &originalword, const QString &newword, unsigned int pos)
+void KEdit::corrected (const TQString &originalword, const TQString &newword, unsigned int pos)
{
//we'll reselect the original word in case the user has played with
//the selection in eframe or the word was auto-replaced
@@ -1072,20 +1072,20 @@ void KEdit::spellcheck_stop()
setReadOnly ( saved_readonlystate);
}
-QString KEdit::selectWordUnderCursor( )
+TQString KEdit::selectWordUnderCursor( )
{
int parag;
int pos;
getCursorPosition(&parag, &pos);
- QString txt = text(parag);
+ TQString txt = text(parag);
// Find start
int start = pos;
while( start > 0 )
{
- const QChar &ch = txt[start-1];
+ const TQChar &ch = txt[start-1];
if (ch.isSpace() || ch.isPunct())
break;
start--;
@@ -1096,7 +1096,7 @@ QString KEdit::selectWordUnderCursor( )
int len = txt.length();
while( end < len )
{
- const QChar &ch = txt[end];
+ const TQChar &ch = txt[end];
if (ch.isSpace() || ch.isPunct())
break;
end++;
@@ -1105,11 +1105,11 @@ QString KEdit::selectWordUnderCursor( )
return txt.mid(start, end-start);
}
-QPopupMenu *KEdit::createPopupMenu( const QPoint& pos )
+TQPopupMenu *KEdit::createPopupMenu( const TQPoint& pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *menu = QMultiLineEdit::createPopupMenu( pos );
+ TQPopupMenu *menu = TQMultiLineEdit::createPopupMenu( pos );
if ( isReadOnly() )
menu->changeItem( menu->idAt(0), SmallIconSet("editcopy"), menu->text( menu->idAt(0) ) );
diff --git a/kdeui/keditlistbox.cpp b/kdeui/keditlistbox.cpp
index 88942ebc7..b58244e93 100644
--- a/kdeui/keditlistbox.cpp
+++ b/kdeui/keditlistbox.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -45,24 +45,24 @@ public:
uint buttons;
};
-KEditListBox::KEditListBox(QWidget *parent, const char *name,
+KEditListBox::KEditListBox(TQWidget *parent, const char *name,
bool checkAtEntering, int buttons )
- :QGroupBox(parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(parent, name ), d(new KEditListBoxPrivate)
{
init( checkAtEntering, buttons );
}
-KEditListBox::KEditListBox(const QString& title, QWidget *parent,
+KEditListBox::KEditListBox(const TQString& title, TQWidget *parent,
const char *name, bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
{
init( checkAtEntering, buttons );
}
-KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom,
- QWidget *parent, const char *name,
+KEditListBox::KEditListBox(const TQString& title, const CustomEditor& custom,
+ TQWidget *parent, const char *name,
bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
{
m_lineEdit = custom.lineEdit();
init( checkAtEntering, buttons, custom.representationWidget() );
@@ -74,15 +74,15 @@ KEditListBox::~KEditListBox()
}
void KEditListBox::init( bool checkAtEntering, int buttons,
- QWidget *representationWidget )
+ TQWidget *representationWidget )
{
d->m_checkAtEntering = checkAtEntering;
servNewButton = servRemoveButton = servUpButton = servDownButton = 0L;
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::MinimumExpanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::MinimumExpanding));
- QGridLayout * grid = new QGridLayout(this, 7, 2,
+ TQGridLayout * grid = new TQGridLayout(this, 7, 2,
KDialog::marginHint(),
KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing());
@@ -91,13 +91,13 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
grid->setMargin(15);
if ( representationWidget )
- representationWidget->reparent( this, QPoint(0,0) );
+ representationWidget->reparent( this, TQPoint(0,0) );
else
m_lineEdit=new KLineEdit(this);
- m_listBox = new QListBox(this);
+ m_listBox = new TQListBox(this);
- QWidget *editingWidget = representationWidget ?
+ TQWidget *editingWidget = representationWidget ?
representationWidget : m_lineEdit;
grid->addMultiCellWidget(editingWidget,1,1,0,1);
grid->addMultiCellWidget(m_listBox, 2, 6, 0, 0);
@@ -105,10 +105,10 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
d->buttons = 0;
setButtons( buttons );
- connect(m_lineEdit,SIGNAL(textChanged(const QString&)),this,SLOT(typedSomething(const QString&)));
+ connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&)));
m_lineEdit->setTrapReturnKey(true);
- connect(m_lineEdit,SIGNAL(returnPressed()),this,SLOT(addItem()));
- connect(m_listBox, SIGNAL(highlighted(int)), SLOT(enableMoveButtons(int)));
+ connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem()));
+ connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int)));
// maybe supplied lineedit has some text already
typedSomething( m_lineEdit->text() );
@@ -119,12 +119,12 @@ void KEditListBox::setButtons( uint buttons )
if ( d->buttons == buttons )
return;
- QGridLayout* grid = static_cast<QGridLayout *>( layout() );
+ TQGridLayout* grid = static_cast<TQGridLayout *>( layout() );
if ( ( buttons & Add ) && !servNewButton ) {
- servNewButton = new QPushButton(i18n("&Add"), this);
+ servNewButton = new TQPushButton(i18n("&Add"), this);
servNewButton->setEnabled(false);
servNewButton->show();
- connect(servNewButton, SIGNAL(clicked()), SLOT(addItem()));
+ connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem()));
grid->addWidget(servNewButton, 2, 1);
} else if ( ( buttons & Add ) == 0 && servNewButton ) {
@@ -133,10 +133,10 @@ void KEditListBox::setButtons( uint buttons )
}
if ( ( buttons & Remove ) && !servRemoveButton ) {
- servRemoveButton = new QPushButton(i18n("&Remove"), this);
+ servRemoveButton = new TQPushButton(i18n("&Remove"), this);
servRemoveButton->setEnabled(false);
servRemoveButton->show();
- connect(servRemoveButton, SIGNAL(clicked()), SLOT(removeItem()));
+ connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem()));
grid->addWidget(servRemoveButton, 3, 1);
} else if ( ( buttons & Remove ) == 0 && servRemoveButton ) {
@@ -145,15 +145,15 @@ void KEditListBox::setButtons( uint buttons )
}
if ( ( buttons & UpDown ) && !servUpButton ) {
- servUpButton = new QPushButton(i18n("Move &Up"), this);
+ servUpButton = new TQPushButton(i18n("Move &Up"), this);
servUpButton->setEnabled(false);
servUpButton->show();
- connect(servUpButton, SIGNAL(clicked()), SLOT(moveItemUp()));
+ connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp()));
- servDownButton = new QPushButton(i18n("Move &Down"), this);
+ servDownButton = new TQPushButton(i18n("Move &Down"), this);
servDownButton->setEnabled(false);
servDownButton->show();
- connect(servDownButton, SIGNAL(clicked()), SLOT(moveItemDown()));
+ connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown()));
grid->addWidget(servUpButton, 4, 1);
grid->addWidget(servDownButton, 5, 1);
@@ -165,7 +165,7 @@ void KEditListBox::setButtons( uint buttons )
d->buttons = buttons;
}
-void KEditListBox::typedSomething(const QString& text)
+void KEditListBox::typedSomething(const TQString& text)
{
if(currentItem() >= 0) {
if(currentText() != m_lineEdit->text())
@@ -216,7 +216,7 @@ void KEditListBox::moveItemUp()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex-1);
m_listBox->setCurrentItem(selIndex - 1);
@@ -239,7 +239,7 @@ void KEditListBox::moveItemDown()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex+1);
m_listBox->setCurrentItem(selIndex + 1);
@@ -255,7 +255,7 @@ void KEditListBox::addItem()
if ( !servNewButton || !servNewButton->isEnabled() )
return;
- const QString& currentTextLE=m_lineEdit->text();
+ const TQString& currentTextLE=m_lineEdit->text();
bool alreadyInList(false);
//if we didn't check for dupes at the inserting we have to do it now
if (!d->m_checkAtEntering)
@@ -304,7 +304,7 @@ void KEditListBox::removeItem()
if ( selected >= 0 )
{
- QString removedText = m_listBox->currentText();
+ TQString removedText = m_listBox->currentText();
m_listBox->removeItem( selected );
if ( count() > 0 )
@@ -361,17 +361,17 @@ void KEditListBox::clear()
emit changed();
}
-void KEditListBox::insertStringList(const QStringList& list, int index)
+void KEditListBox::insertStringList(const TQStringList& list, int index)
{
m_listBox->insertStringList(list,index);
}
-void KEditListBox::insertStrList(const QStrList* list, int index)
+void KEditListBox::insertStrList(const TQStrList* list, int index)
{
m_listBox->insertStrList(list,index);
}
-void KEditListBox::insertStrList(const QStrList& list, int index)
+void KEditListBox::insertStrList(const TQStrList& list, int index)
{
m_listBox->insertStrList(list,index);
}
@@ -381,16 +381,16 @@ void KEditListBox::insertStrList(const char ** list, int numStrings, int index)
m_listBox->insertStrList(list,numStrings,index);
}
-QStringList KEditListBox::items() const
+TQStringList KEditListBox::items() const
{
- QStringList list;
- for (QListBoxItem const * i = m_listBox->firstItem(); i != 0; i = i->next() )
+ TQStringList list;
+ for (TQListBoxItem const * i = m_listBox->firstItem(); i != 0; i = i->next() )
list.append( i->text());
return list;
}
-void KEditListBox::setItems(const QStringList& items)
+void KEditListBox::setItems(const TQStringList& items)
{
m_listBox->clear();
m_listBox->insertStringList(items, 0);
diff --git a/kdeui/keditlistbox.h b/kdeui/keditlistbox.h
index bb27d89f7..e5b828caf 100644
--- a/kdeui/keditlistbox.h
+++ b/kdeui/keditlistbox.h
@@ -20,8 +20,8 @@
#ifndef KEDITLISTBOX_H
#define KEDITLISTBOX_H
-#include <qgroupbox.h>
-#include <qlistbox.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
#include <kdelibs_export.h>
@@ -47,7 +47,7 @@ class KDEUI_EXPORT KEditListBox : public QGroupBox
Q_SETS( Button )
Q_PROPERTY( Button buttons READ buttons WRITE setButtons )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
public:
/**
@@ -62,19 +62,19 @@ public:
KDEUI_EXPORT CustomEditor()
: m_representationWidget( 0L ),
m_lineEdit( 0L ) {}
- KDEUI_EXPORT CustomEditor( QWidget *repWidget, KLineEdit *edit )
+ KDEUI_EXPORT CustomEditor( TQWidget *repWidget, KLineEdit *edit )
: m_representationWidget( repWidget ),
m_lineEdit( edit ) {}
KDEUI_EXPORT CustomEditor( KComboBox *combo );
- KDEUI_EXPORT void setRepresentationWidget( QWidget *repWidget ) {
+ KDEUI_EXPORT void setRepresentationWidget( TQWidget *repWidget ) {
m_representationWidget = repWidget;
}
KDEUI_EXPORT void setLineEdit( KLineEdit *edit ) {
m_lineEdit = edit;
}
- KDEUI_EXPORT virtual QWidget *representationWidget() const {
+ KDEUI_EXPORT virtual TQWidget *representationWidget() const {
return m_representationWidget;
}
KDEUI_EXPORT virtual KLineEdit *lineEdit() const {
@@ -82,7 +82,7 @@ public:
}
protected:
- QWidget *m_representationWidget;
+ TQWidget *m_representationWidget;
KLineEdit *m_lineEdit;
};
@@ -107,7 +107,7 @@ public:
* it will be checked if you press the Add-button. It is not
* possible to enter items twice into the listbox.
*/
- KEditListBox(QWidget *parent = 0, const char *name = 0,
+ KEditListBox(TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering=false, int buttons = All );
/**
* Create an editable listbox.
@@ -115,7 +115,7 @@ public:
* The same as the other constructor, additionally it takes
* @p title, which will be the title of the frame around the listbox.
*/
- KEditListBox(const QString& title, QWidget *parent = 0,
+ KEditListBox(const TQString& title, TQWidget *parent = 0,
const char *name = 0, bool checkAtEntering=false,
int buttons = All );
@@ -131,90 +131,90 @@ public:
* @see KURLRequester::customEditor()
* @since 3.1
*/
- KEditListBox( const QString& title,
+ KEditListBox( const TQString& title,
const CustomEditor &customEditor,
- QWidget *parent = 0, const char *name = 0,
+ TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering = false, int buttons = All );
virtual ~KEditListBox();
/**
- * Return a pointer to the embedded QListBox.
+ * Return a pointer to the embedded TQListBox.
*/
- QListBox* listBox() const { return m_listBox; }
+ TQListBox* listBox() const { return m_listBox; }
/**
- * Return a pointer to the embedded QLineEdit.
+ * Return a pointer to the embedded TQLineEdit.
*/
KLineEdit* lineEdit() const { return m_lineEdit; }
/**
* Return a pointer to the Add button
*/
- QPushButton* addButton() const { return servNewButton; }
+ TQPushButton* addButton() const { return servNewButton; }
/**
* Return a pointer to the Remove button
*/
- QPushButton* removeButton() const { return servRemoveButton; }
+ TQPushButton* removeButton() const { return servRemoveButton; }
/**
* Return a pointer to the Up button
*/
- QPushButton* upButton() const { return servUpButton; }
+ TQPushButton* upButton() const { return servUpButton; }
/**
* Return a pointer to the Down button
*/
- QPushButton* downButton() const { return servDownButton; }
+ TQPushButton* downButton() const { return servDownButton; }
/**
- * See QListBox::count()
+ * See TQListBox::count()
*/
int count() const { return int(m_listBox->count()); }
/**
- * See QListBox::insertStringList()
+ * See TQListBox::insertStringList()
*/
- void insertStringList(const QStringList& list, int index=-1);
+ void insertStringList(const TQStringList& list, int index=-1);
/**
- * See QListBox::insertStringList()
+ * See TQListBox::insertStringList()
*/
- void insertStrList(const QStrList* list, int index=-1);
+ void insertStrList(const TQStrList* list, int index=-1);
/**
- * See QListBox::insertStrList()
+ * See TQListBox::insertStrList()
*/
- void insertStrList(const QStrList& list, int index=-1);
+ void insertStrList(const TQStrList& list, int index=-1);
/**
- * See QListBox::insertStrList()
+ * See TQListBox::insertStrList()
*/
void insertStrList(const char ** list, int numStrings=-1, int index=-1);
/**
- * See QListBox::insertItem()
+ * See TQListBox::insertItem()
*/
- void insertItem(const QString& text, int index=-1) {m_listBox->insertItem(text,index);}
+ void insertItem(const TQString& text, int index=-1) {m_listBox->insertItem(text,index);}
/**
* Clears both the listbox and the line edit.
*/
void clear();
/**
- * See QListBox::text()
+ * See TQListBox::text()
*/
- QString text(int index) const { return m_listBox->text(index); }
+ TQString text(int index) const { return m_listBox->text(index); }
/**
- * See QListBox::currentItem()
+ * See TQListBox::currentItem()
*/
int currentItem() const;
/**
- * See QListBox::currentText()
+ * See TQListBox::currentText()
*/
- QString currentText() const { return m_listBox->currentText(); }
+ TQString currentText() const { return m_listBox->currentText(); }
/**
* @returns a stringlist of all items in the listbox
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Clears the listbox and sets the contents to @p items
*
* @since 3.4
*/
- void setItems(const QStringList& items);
+ void setItems(const TQStringList& items);
/**
* Returns which buttons are visible
@@ -234,14 +234,14 @@ public:
* the parameter is the added string.
* @since 3.2
*/
- void added( const QString & text );
+ void added( const TQString & text );
/**
* This signal is emitted when the user removes a string from the list,
* the parameter is the removed string.
* @since 3.2
*/
- void removed( const QString & text );
+ void removed( const TQString & text );
protected slots:
//the names should be self-explaining
@@ -250,17 +250,17 @@ public:
void addItem();
void removeItem();
void enableMoveButtons(int index);
- void typedSomething(const QString& text);
+ void typedSomething(const TQString& text);
private:
- QListBox *m_listBox;
- QPushButton *servUpButton, *servDownButton;
- QPushButton *servNewButton, *servRemoveButton;
+ TQListBox *m_listBox;
+ TQPushButton *servUpButton, *servDownButton;
+ TQPushButton *servNewButton, *servRemoveButton;
KLineEdit *m_lineEdit;
//this is called in both ctors, to avoid code duplication
void init( bool checkAtEntering, int buttons,
- QWidget *representationWidget = 0L );
+ TQWidget *representationWidget = 0L );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kedittoolbar.cpp b/kdeui/kedittoolbar.cpp
index 09fa3dee0..2d01dc469 100644
--- a/kdeui/kedittoolbar.cpp
+++ b/kdeui/kedittoolbar.cpp
@@ -18,18 +18,18 @@
*/
#include <kedittoolbar.h>
-#include <qdom.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qcombobox.h>
-#include <qdragobject.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
-#include <qapplication.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqcombobox.h>
+#include <tqdragobject.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
+#include <tqapplication.h>
+#include <tqtextstream.h>
#include <kaction.h>
#include <kstandarddirs.h>
@@ -52,15 +52,15 @@ static const char * const separatorstring = I18N_NOOP("--- separator ---");
#define LINESEPARATORSTRING i18n(lineseparatorstring)
#define SEPARATORSTRING i18n(separatorstring)
-static void dump_xml(const QDomDocument& doc)
+static void dump_xml(const TQDomDocument& doc)
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
ts << doc;
kdDebug() << str << endl;
}
-typedef QValueList<QDomElement> ToolbarList;
+typedef TQValueList<TQDomElement> ToolbarList;
namespace
{
@@ -74,8 +74,8 @@ public:
m_actionCollection = 0;
}
- QString m_xmlFile;
- QDomDocument m_document;
+ TQString m_xmlFile;
+ TQDomDocument m_document;
XmlType m_type;
bool m_isModified;
KActionCollection* m_actionCollection;
@@ -83,30 +83,30 @@ public:
ToolbarList m_barList;
};
-typedef QValueList<XmlData> XmlDataList;
+typedef TQValueList<XmlData> XmlDataList;
class ToolbarItem : public QListViewItem
{
public:
- ToolbarItem(KListView *parent, const QString& tag = QString::null, const QString& name = QString::null, const QString& statusText = QString::null)
- : QListViewItem(parent),
+ ToolbarItem(KListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null)
+ : TQListViewItem(parent),
m_tag(tag),
m_name(name),
m_statusText(statusText)
{
}
- ToolbarItem(KListView *parent, QListViewItem *item, const QString &tag = QString::null, const QString& name = QString::null, const QString& statusText = QString::null)
- : QListViewItem(parent, item),
+ ToolbarItem(KListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null)
+ : TQListViewItem(parent, item),
m_tag(tag),
m_name(name),
m_statusText(statusText)
{
}
- virtual QString key(int column, bool) const
+ virtual TQString key(int column, bool) const
{
- QString s = text( column );
+ TQString s = text( column );
if ( s == LINESEPARATORSTRING )
return "0";
if ( s == SEPARATORSTRING )
@@ -114,16 +114,16 @@ public:
return "2" + s;
}
- void setInternalTag(const QString &tag) { m_tag = tag; }
- void setInternalName(const QString &name) { m_name = name; }
- void setStatusText(const QString &text) { m_statusText = text; }
- QString internalTag() const { return m_tag; }
- QString internalName() const { return m_name; }
- QString statusText() const { return m_statusText; }
+ void setInternalTag(const TQString &tag) { m_tag = tag; }
+ void setInternalName(const TQString &name) { m_name = name; }
+ void setStatusText(const TQString &text) { m_statusText = text; }
+ TQString internalTag() const { return m_tag; }
+ TQString internalName() const { return m_name; }
+ TQString statusText() const { return m_statusText; }
private:
- QString m_tag;
- QString m_name;
- QString m_statusText;
+ TQString m_tag;
+ TQString m_name;
+ TQString m_statusText;
};
#define TOOLBARITEMMIMETYPE "data/x-kde.toolbar.item"
@@ -131,12 +131,12 @@ class ToolbarItemDrag : public QStoredDrag
{
public:
ToolbarItemDrag(ToolbarItem *toolbarItem,
- QWidget *dragSource = 0, const char *name = 0)
- : QStoredDrag( TOOLBARITEMMIMETYPE, dragSource, name )
+ TQWidget *dragSource = 0, const char *name = 0)
+ : TQStoredDrag( TOOLBARITEMMIMETYPE, dragSource, name )
{
if (toolbarItem) {
- QByteArray data;
- QDataStream out(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream out(data, IO_WriteOnly);
out << toolbarItem->internalTag();
out << toolbarItem->internalName();
out << toolbarItem->statusText();
@@ -145,22 +145,22 @@ public:
}
}
- static bool canDecode(QMimeSource* e)
+ static bool canDecode(TQMimeSource* e)
{
return e->provides(TOOLBARITEMMIMETYPE);
}
- static bool decode( const QMimeSource* e, ToolbarItem& item )
+ static bool decode( const TQMimeSource* e, ToolbarItem& item )
{
if (!e)
return false;
- QByteArray data = e->encodedData(TOOLBARITEMMIMETYPE);
+ TQByteArray data = e->encodedData(TOOLBARITEMMIMETYPE);
if ( data.isEmpty() )
return false;
- QString internalTag, internalName, statusText, text;
- QDataStream in(data, IO_ReadOnly);
+ TQString internalTag, internalName, statusText, text;
+ TQDataStream in(data, IO_ReadOnly);
in >> internalTag;
in >> internalName;
in >> statusText;
@@ -178,18 +178,18 @@ public:
class ToolbarListView : public KListView
{
public:
- ToolbarListView(QWidget *parent=0, const char *name=0)
+ ToolbarListView(TQWidget *parent=0, const char *name=0)
: KListView(parent, name)
{
}
protected:
- virtual QDragObject *dragObject()
+ virtual TQDragObject *dragObject()
{
ToolbarItem *item = dynamic_cast<ToolbarItem*>(selectedItem());
if ( item ) {
ToolbarItemDrag *obj = new ToolbarItemDrag(item,
this, "ToolbarAction drag item");
- const QPixmap *pm = item->pixmap(0);
+ const TQPixmap *pm = item->pixmap(0);
if( pm )
obj->setPixmap( *pm );
return obj;
@@ -197,7 +197,7 @@ protected:
return 0;
}
- virtual bool acceptDrag(QDropEvent *event) const
+ virtual bool acceptDrag(TQDropEvent *event) const
{
return ToolbarItemDrag::canDecode( event );
}
@@ -226,22 +226,22 @@ public:
{
}
- QString xmlFile(const QString& xml_file)
+ TQString xmlFile(const TQString& xml_file)
{
- return xml_file.isNull() ? QString(m_instance->instanceName()) + "ui.rc" :
+ return xml_file.isNull() ? TQString(m_instance->instanceName()) + "ui.rc" :
xml_file;
}
/**
* Load in the specified XML file and dump the raw xml
*/
- QString loadXMLFile(const QString& _xml_file)
+ TQString loadXMLFile(const TQString& _xml_file)
{
- QString raw_xml;
- QString xml_file = xmlFile(_xml_file);
+ TQString raw_xml;
+ TQString xml_file = xmlFile(_xml_file);
//kdDebug() << "loadXMLFile xml_file=" << xml_file << endl;
- if ( !QDir::isRelativePath(xml_file) )
+ if ( !TQDir::isRelativePath(xml_file) )
raw_xml = KXMLGUIFactory::readConfigFile(xml_file);
else
raw_xml = KXMLGUIFactory::readConfigFile(xml_file, m_instance);
@@ -252,15 +252,15 @@ public:
/**
* Return a list of toolbar elements given a toplevel element
*/
- ToolbarList findToolbars(QDomNode n)
+ ToolbarList findToolbars(TQDomNode n)
{
- static const QString &tagToolbar = KGlobal::staticQString( "ToolBar" );
- static const QString &attrNoEdit = KGlobal::staticQString( "noEdit" );
+ static const TQString &tagToolbar = KGlobal::staticQString( "ToolBar" );
+ static const TQString &attrNoEdit = KGlobal::staticQString( "noEdit" );
ToolbarList list;
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if (elem.isNull())
continue;
@@ -276,14 +276,14 @@ public:
/**
* Return the name of a given toolbar
*/
- QString toolbarName( const XmlData& xmlData, const QDomElement& it ) const
+ TQString toolbarName( const XmlData& xmlData, const TQDomElement& it ) const
{
- static const QString &tagText = KGlobal::staticQString( "text" );
- static const QString &tagText2 = KGlobal::staticQString( "Text" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagText = KGlobal::staticQString( "text" );
+ static const TQString &tagText2 = KGlobal::staticQString( "Text" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QString name;
- QCString txt( it.namedItem( tagText ).toElement().text().utf8() );
+ TQString name;
+ TQCString txt( it.namedItem( tagText ).toElement().text().utf8() );
if ( txt.isEmpty() )
txt = it.namedItem( tagText2 ).toElement().text().utf8();
if ( txt.isEmpty() )
@@ -296,7 +296,7 @@ public:
if ( ( xmlData.m_type == XmlData::Shell ) ||
( xmlData.m_type == XmlData::Part ) )
{
- QString doc_name(xmlData.m_document.documentElement().attribute( attrName ));
+ TQString doc_name(xmlData.m_document.documentElement().attribute( attrName ));
name += " <" + doc_name + ">";
}
return name;
@@ -304,17 +304,17 @@ public:
/**
* Look for a given item in the current toolbar
*/
- QDomElement findElementForToolbarItem( const ToolbarItem* item ) const
+ TQDomElement findElementForToolbarItem( const ToolbarItem* item ) const
{
- static const QString &attrName = KGlobal::staticQString( "name" );
- for(QDomNode n = m_currentToolbarElem.firstChild(); !n.isNull(); n = n.nextSibling())
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ for(TQDomNode n = m_currentToolbarElem.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if ((elem.attribute(attrName) == item->internalName()) &&
(elem.tagName() == item->internalTag()))
return elem;
}
- return QDomElement();
+ return TQDomElement();
}
#ifndef NDEBUG
@@ -325,7 +325,7 @@ public:
for ( ; xit != m_xmlFiles.end(); ++xit )
{
kdDebug(240) << "XmlData type " << s_XmlTypeToString[(*xit).m_type] << " xmlFile: " << (*xit).m_xmlFile << endl;
- for( QValueList<QDomElement>::Iterator it = (*xit).m_barList.begin();
+ for( TQValueList<TQDomElement>::Iterator it = (*xit).m_barList.begin();
it != (*xit).m_barList.end(); ++it ) {
kdDebug(240) << " Toolbar: " << toolbarName( *xit, *it ) << endl;
}
@@ -337,26 +337,26 @@ public:
}
#endif
- //QValueList<KAction*> m_actionList;
+ //TQValueList<KAction*> m_actionList;
KActionCollection* m_collection;
KInstance *m_instance;
XmlData* m_currentXmlData;
- QDomElement m_currentToolbarElem;
+ TQDomElement m_currentToolbarElem;
- QString m_xmlFile;
- QString m_globalFile;
- QString m_rcFile;
- QDomDocument m_localDoc;
+ TQString m_xmlFile;
+ TQString m_globalFile;
+ TQString m_rcFile;
+ TQDomDocument m_localDoc;
bool m_isPart;
ToolbarList m_barList;
XmlDataList m_xmlFiles;
- QLabel *m_comboLabel;
+ TQLabel *m_comboLabel;
KSeparator *m_comboSeparator;
- QLabel * m_helpArea;
+ TQLabel * m_helpArea;
KPushButton* m_changeIcon;
KProcIO* m_kdialogProcess;
bool m_hasKDialog;
@@ -369,16 +369,16 @@ public:
// Save parameters for recreating widget after resetting toolbar
bool m_global;
KActionCollection* m_collection;
- QString m_file;
+ TQString m_file;
KXMLGUIFactory* m_factory;
};
const char *KEditToolbar::s_defaultToolbar = 0L;
-KEditToolbar::KEditToolbar(KActionCollection *collection, const QString& file,
- bool global, QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file,
+ bool global, TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
- m_widget(new KEditToolbarWidget(QString::fromLatin1(s_defaultToolbar), collection, file, global, this))
+ m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this))
{
init();
d->m_global = global;
@@ -386,9 +386,9 @@ KEditToolbar::KEditToolbar(KActionCollection *collection, const QString& file,
d->m_file = file;
}
-KEditToolbar::KEditToolbar(const QString& defaultToolbar, KActionCollection *collection,
- const QString& file, bool global,
- QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection,
+ const TQString& file, bool global,
+ TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
m_widget(new KEditToolbarWidget(defaultToolbar, collection, file, global, this))
{
@@ -398,16 +398,16 @@ KEditToolbar::KEditToolbar(const QString& defaultToolbar, KActionCollection *col
d->m_file = file;
}
-KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
- m_widget(new KEditToolbarWidget(QString::fromLatin1(s_defaultToolbar), factory, this))
+ m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), factory, this))
{
init();
d->m_factory = factory;
}
-KEditToolbar::KEditToolbar(const QString& defaultToolbar,KXMLGUIFactory* factory,
- QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(const TQString& defaultToolbar,KXMLGUIFactory* factory,
+ TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
m_widget(new KEditToolbarWidget(defaultToolbar, factory, this))
{
@@ -423,8 +423,8 @@ void KEditToolbar::init()
setMainWidget(m_widget);
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(acceptOK(bool)));
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(enableButtonApply(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool)));
enableButtonApply(false);
setMinimumSize(sizeHint());
@@ -452,22 +452,22 @@ void KEditToolbar::slotDefault()
if ( d->m_factory )
{
- const QString localPrefix = locateLocal("data", "");
- QPtrList<KXMLGUIClient> clients(d->m_factory->clients());
- QPtrListIterator<KXMLGUIClient> it( clients );
+ const TQString localPrefix = locateLocal("data", "");
+ TQPtrList<KXMLGUIClient> clients(d->m_factory->clients());
+ TQPtrListIterator<KXMLGUIClient> it( clients );
for( ; it.current(); ++it)
{
KXMLGUIClient *client = it.current();
- QString file = client->xmlFile();
+ TQString file = client->xmlFile();
if (file.isNull())
continue;
- if (QDir::isRelativePath(file))
+ if (TQDir::isRelativePath(file))
{
const KInstance *instance = client->instance() ? client->instance() : KGlobal::instance();
- file = locateLocal("data", QString::fromLatin1( instance->instanceName() + '/' ) + file);
+ file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + file);
}
else
{
@@ -475,12 +475,12 @@ void KEditToolbar::slotDefault()
continue;
}
- if ( QFile::exists( file ) )
- if ( !QFile::remove( file ) )
+ if ( TQFile::exists( file ) )
+ if ( !TQFile::remove( file ) )
kdWarning() << "Could not delete " << file << endl;
}
- m_widget = new KEditToolbarWidget(QString::null, d->m_factory, this);
+ m_widget = new KEditToolbarWidget(TQString::null, d->m_factory, this);
m_widget->rebuildKXMLGUIClients();
}
else
@@ -488,20 +488,20 @@ void KEditToolbar::slotDefault()
int slash = d->m_file.findRev('/')+1;
if (slash)
d->m_file = d->m_file.mid(slash);
- QString xml_file = locateLocal("data", QString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file);
+ TQString xml_file = locateLocal("data", TQString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file);
- if ( QFile::exists( xml_file ) )
- if ( !QFile::remove( xml_file ) )
+ if ( TQFile::exists( xml_file ) )
+ if ( !TQFile::remove( xml_file ) )
kdWarning() << "Could not delete " << xml_file << endl;
- m_widget = new KEditToolbarWidget(QString::null, d->m_collection, d->m_file, d->m_global, this);
+ m_widget = new KEditToolbarWidget(TQString::null, d->m_collection, d->m_file, d->m_global, this);
}
setMainWidget(m_widget);
m_widget->show();
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(acceptOK(bool)));
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(enableButtonApply(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool)));
enableButtonApply(false);
emit newToolbarConfig();
@@ -538,9 +538,9 @@ void KEditToolbar::setDefaultToolbar(const char *toolbarName)
}
KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection,
- const QString& file,
- bool global, QWidget *parent)
- : QWidget(parent),
+ const TQString& file,
+ bool global, TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), collection))
{
initNonKPart(collection, file, global);
@@ -550,11 +550,11 @@ KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection,
setMinimumSize(sizeHint());
}
-KEditToolbarWidget::KEditToolbarWidget(const QString& defaultToolbar,
+KEditToolbarWidget::KEditToolbarWidget(const TQString& defaultToolbar,
KActionCollection *collection,
- const QString& file, bool global,
- QWidget *parent)
- : QWidget(parent),
+ const TQString& file, bool global,
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), collection))
{
initNonKPart(collection, file, global);
@@ -565,8 +565,8 @@ KEditToolbarWidget::KEditToolbarWidget(const QString& defaultToolbar,
}
KEditToolbarWidget::KEditToolbarWidget( KXMLGUIFactory* factory,
- QWidget *parent)
- : QWidget(parent),
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), KXMLGUIClient::actionCollection() /*create new one*/))
{
initKPart(factory);
@@ -576,10 +576,10 @@ KEditToolbarWidget::KEditToolbarWidget( KXMLGUIFactory* factory,
setMinimumSize(sizeHint());
}
-KEditToolbarWidget::KEditToolbarWidget( const QString& defaultToolbar,
+KEditToolbarWidget::KEditToolbarWidget( const TQString& defaultToolbar,
KXMLGUIFactory* factory,
- QWidget *parent)
- : QWidget(parent),
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), KXMLGUIClient::actionCollection() /*create new one*/))
{
initKPart(factory);
@@ -595,18 +595,18 @@ KEditToolbarWidget::~KEditToolbarWidget()
}
void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
- const QString& file, bool global)
+ const TQString& file, bool global)
{
//d->m_actionList = collection->actions();
// handle the merging
if (global)
setXMLFile(locate("config", "ui/ui_standards.rc"));
- QString localXML = d->loadXMLFile(file);
+ TQString localXML = d->loadXMLFile(file);
setXML(localXML, true);
// reusable vars
- QDomElement elem;
+ TQDomElement elem;
// first, get all of the necessary info for our local xml
XmlData local;
@@ -620,7 +620,7 @@ void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
// then, the merged one (ui_standards + local xml)
XmlData merge;
- merge.m_xmlFile = QString::null;
+ merge.m_xmlFile = TQString::null;
merge.m_type = XmlData::Merged;
merge.m_document = domDocument();
elem = merge.m_document.documentElement().toElement();
@@ -639,14 +639,14 @@ void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
void KEditToolbarWidget::initKPart(KXMLGUIFactory* factory)
{
// reusable vars
- QDomElement elem;
+ TQDomElement elem;
setFactory( factory );
actionCollection()->setWidget( this );
// add all of the client data
- QPtrList<KXMLGUIClient> clients(factory->clients());
- QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients(factory->clients());
+ TQPtrListIterator<KXMLGUIClient> it( clients );
for( ; it.current(); ++it)
{
KXMLGUIClient *client = it.current();
@@ -711,7 +711,7 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
if ( !factory() )
return;
- QPtrList<KXMLGUIClient> clients(factory()->clients());
+ TQPtrList<KXMLGUIClient> clients(factory()->clients());
//kdDebug(240) << "factory: " << clients.count() << " clients" << endl;
// remove the elements starting from the last going to the first
@@ -727,16 +727,16 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
// now, rebuild the gui from the first to the last
//kdDebug(240) << "rebuilding the gui" << endl;
- QPtrListIterator<KXMLGUIClient> cit( clients );
+ TQPtrListIterator<KXMLGUIClient> cit( clients );
for( ; cit.current(); ++cit)
{
KXMLGUIClient* client = cit.current();
//kdDebug(240) << "updating client " << client << " " << client->instance()->instanceName() << " xmlFile=" << client->xmlFile() << endl;
- QString file( client->xmlFile() ); // before setting ui_standards!
+ TQString file( client->xmlFile() ); // before setting ui_standards!
if ( !file.isEmpty() )
{
// passing an empty stream forces the clients to reread the XML
- client->setXMLGUIBuildDocument( QDomDocument() );
+ client->setXMLGUIBuildDocument( TQDomDocument() );
// for the shell, merge in ui_standards.rc
if ( client == firstClient ) // same assumption as in the ctor: first==shell
@@ -758,23 +758,23 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
void KEditToolbarWidget::setupLayout()
{
// the toolbar name combo
- d->m_comboLabel = new QLabel(i18n("&Toolbar:"), this);
- m_toolbarCombo = new QComboBox(this);
+ d->m_comboLabel = new TQLabel(i18n("&Toolbar:"), this);
+ m_toolbarCombo = new TQComboBox(this);
m_toolbarCombo->setEnabled(false);
d->m_comboLabel->setBuddy(m_toolbarCombo);
d->m_comboSeparator = new KSeparator(this);
- connect(m_toolbarCombo, SIGNAL(activated(const QString&)),
- this, SLOT(slotToolbarSelected(const QString&)));
+ connect(m_toolbarCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotToolbarSelected(const TQString&)));
-// QPushButton *new_toolbar = new QPushButton(i18n("&New"), this);
+// TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this);
// new_toolbar->setPixmap(BarIcon("filenew", KIcon::SizeSmall));
// new_toolbar->setEnabled(false); // disabled until implemented
-// QPushButton *del_toolbar = new QPushButton(i18n("&Delete"), this);
+// TQPushButton *del_toolbar = new TQPushButton(i18n("&Delete"), this);
// del_toolbar->setPixmap(BarIcon("editdelete", KIcon::SizeSmall));
// del_toolbar->setEnabled(false); // disabled until implemented
// our list of inactive actions
- QLabel *inactive_label = new QLabel(i18n("A&vailable actions:"), this);
+ TQLabel *inactive_label = new TQLabel(i18n("A&vailable actions:"), this);
m_inactiveList = new ToolbarListView(this);
m_inactiveList->setDragEnabled(true);
m_inactiveList->setAcceptDrops(true);
@@ -786,13 +786,13 @@ void KEditToolbarWidget::setupLayout()
int column2 = m_inactiveList->addColumn(""); // text
m_inactiveList->setSorting( column2 );
inactive_label->setBuddy(m_inactiveList);
- connect(m_inactiveList, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotInactiveSelected(QListViewItem *)));
- connect(m_inactiveList, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int )),
- this, SLOT(slotInsertButton()));
+ connect(m_inactiveList, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotInactiveSelected(TQListViewItem *)));
+ connect(m_inactiveList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(slotInsertButton()));
// our list of active actions
- QLabel *active_label = new QLabel(i18n("Curr&ent actions:"), this);
+ TQLabel *active_label = new TQLabel(i18n("Curr&ent actions:"), this);
m_activeList = new ToolbarListView(this);
m_activeList->setDragEnabled(true);
m_activeList->setAcceptDrops(true);
@@ -805,67 +805,67 @@ void KEditToolbarWidget::setupLayout()
m_activeList->setSorting(-1);
active_label->setBuddy(m_activeList);
- connect(m_inactiveList, SIGNAL(dropped(KListView*,QDropEvent*,QListViewItem*)),
- this, SLOT(slotDropped(KListView*,QDropEvent*,QListViewItem*)));
- connect(m_activeList, SIGNAL(dropped(KListView*,QDropEvent*,QListViewItem*)),
- this, SLOT(slotDropped(KListView*,QDropEvent*,QListViewItem*)));
- connect(m_activeList, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotActiveSelected(QListViewItem *)));
- connect(m_activeList, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int )),
- this, SLOT(slotRemoveButton()));
+ connect(m_inactiveList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)),
+ this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*)));
+ connect(m_activeList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)),
+ this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*)));
+ connect(m_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotActiveSelected(TQListViewItem *)));
+ connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(slotRemoveButton()));
// "change icon" button
d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this );
- QString kdialogExe = KStandardDirs::findExe(QString::fromLatin1("kdialog"));
+ TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog"));
d->m_hasKDialog = !kdialogExe.isEmpty();
d->m_changeIcon->setEnabled( d->m_hasKDialog );
- connect( d->m_changeIcon, SIGNAL( clicked() ),
- this, SLOT( slotChangeIcon() ) );
+ connect( d->m_changeIcon, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotChangeIcon() ) );
// The buttons in the middle
- QIconSet iconSet;
+ TQIconSet iconSet;
- m_upAction = new QToolButton(this);
+ m_upAction = new TQToolButton(this);
iconSet = SmallIconSet( "up" );
m_upAction->setIconSet( iconSet );
m_upAction->setEnabled(false);
m_upAction->setAutoRepeat(true);
- connect(m_upAction, SIGNAL(clicked()), SLOT(slotUpButton()));
+ connect(m_upAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton()));
- m_insertAction = new QToolButton(this);
- iconSet = QApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" );
+ m_insertAction = new TQToolButton(this);
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" );
m_insertAction->setIconSet( iconSet );
m_insertAction->setEnabled(false);
- connect(m_insertAction, SIGNAL(clicked()), SLOT(slotInsertButton()));
+ connect(m_insertAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotInsertButton()));
- m_removeAction = new QToolButton(this);
- iconSet = QApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" );
+ m_removeAction = new TQToolButton(this);
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" );
m_removeAction->setIconSet( iconSet );
m_removeAction->setEnabled(false);
- connect(m_removeAction, SIGNAL(clicked()), SLOT(slotRemoveButton()));
+ connect(m_removeAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton()));
- m_downAction = new QToolButton(this);
+ m_downAction = new TQToolButton(this);
iconSet = SmallIconSet( "down" );
m_downAction->setIconSet( iconSet );
m_downAction->setEnabled(false);
m_downAction->setAutoRepeat(true);
- connect(m_downAction, SIGNAL(clicked()), SLOT(slotDownButton()));
+ connect(m_downAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton()));
- d->m_helpArea = new QLabel(this);
+ d->m_helpArea = new TQLabel(this);
d->m_helpArea->setAlignment( Qt::WordBreak );
// now start with our layouts
- QVBoxLayout *top_layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QVBoxLayout *name_layout = new QVBoxLayout(KDialog::spacingHint());
- QHBoxLayout *list_layout = new QHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *name_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout *list_layout = new TQHBoxLayout(KDialog::spacingHint());
- QVBoxLayout *inactive_layout = new QVBoxLayout(KDialog::spacingHint());
- QVBoxLayout *active_layout = new QVBoxLayout(KDialog::spacingHint());
- QHBoxLayout *changeIcon_layout = new QHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *inactive_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *active_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout *changeIcon_layout = new TQHBoxLayout(KDialog::spacingHint());
- QGridLayout *button_layout = new QGridLayout(5, 3, 0);
+ TQGridLayout *button_layout = new TQGridLayout(5, 3, 0);
name_layout->addWidget(d->m_comboLabel);
name_layout->addWidget(m_toolbarCombo);
@@ -901,9 +901,9 @@ void KEditToolbarWidget::setupLayout()
top_layout->addWidget(new KSeparator(this));
}
-void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
+void KEditToolbarWidget::loadToolbarCombo(const TQString& defaultToolbar)
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
// just in case, we clear our combo
m_toolbarCombo->clear();
@@ -921,7 +921,7 @@ void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name = d->toolbarName( *xit, *it );
+ TQString name = d->toolbarName( *xit, *it );
m_toolbarCombo->setEnabled( true );
m_toolbarCombo->insertItem( name );
if (defaultToolbarId == -1 && (name == defaultToolbar || defaultToolbar == (*it).attribute( attrName )))
@@ -940,16 +940,16 @@ void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
slotToolbarSelected(m_toolbarCombo->currentText());
}
-void KEditToolbarWidget::loadActionList(QDomElement& elem)
+void KEditToolbarWidget::loadActionList(TQDomElement& elem)
{
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &tagMerge = KGlobal::staticQString( "Merge" );
- static const QString &tagActionList= KGlobal::staticQString( "ActionList" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &tagMerge = KGlobal::staticQString( "Merge" );
+ static const TQString &tagActionList= KGlobal::staticQString( "ActionList" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
int sep_num = 0;
- QString sep_name("separator_%1");
+ TQString sep_name("separator_%1");
// clear our lists
m_inactiveList->clear();
@@ -963,19 +963,19 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
KActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection;
// store the names of our active actions
- QMap<QString, bool> active_list;
+ TQMap<TQString, bool> active_list;
// see if our current action is in this toolbar
KIconLoader *loader = KGlobal::instance()->iconLoader();
- QDomNode n = elem.lastChild();
+ TQDomNode n = elem.lastChild();
for( ; !n.isNull(); n = n.previousSibling() )
{
- QDomElement it = n.toElement();
+ TQDomElement it = n.toElement();
if (it.isNull()) continue;
if (it.tagName() == tagSeparator)
{
- ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), QString::null);
- bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == QString::fromLatin1("true") );
+ ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
+ bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::fromLatin1("true") );
if(isLineSep)
act->setText(1, LINESEPARATORSTRING);
else
@@ -987,7 +987,7 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
if (it.tagName() == tagMerge)
{
// Merge can be named or not - use the name if there is one
- QString name = it.attribute( attrName );
+ TQString name = it.attribute( attrName );
ToolbarItem *act = new ToolbarItem(m_activeList, tagMerge, name, i18n("This element will be replaced with all the elements of an embedded component."));
if ( name.isEmpty() )
act->setText(1, i18n("<Merge>"));
@@ -1047,9 +1047,9 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
}
// finally, add default separators to the inactive list
- ToolbarItem *act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), QString::null);
+ ToolbarItem *act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
act->setText(1, LINESEPARATORSTRING);
- act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), QString::null);
+ act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
act->setText(1, SEPARATORSTRING);
}
@@ -1058,7 +1058,7 @@ KActionCollection *KEditToolbarWidget::actionCollection() const
return d->m_collection;
}
-void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
+void KEditToolbarWidget::slotToolbarSelected(const TQString& _text)
{
// iterate through everything
XmlDataList::Iterator xit = d->m_xmlFiles.begin();
@@ -1068,7 +1068,7 @@ void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name = d->toolbarName( *xit, *it );
+ TQString name = d->toolbarName( *xit, *it );
// is this our toolbar?
if ( name == _text )
{
@@ -1087,28 +1087,28 @@ void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
}
}
-void KEditToolbarWidget::slotInactiveSelected(QListViewItem *item)
+void KEditToolbarWidget::slotInactiveSelected(TQListViewItem *item)
{
ToolbarItem* toolitem = static_cast<ToolbarItem *>(item);
if (item)
{
m_insertAction->setEnabled(true);
- QString statusText = toolitem->statusText();
+ TQString statusText = toolitem->statusText();
d->m_helpArea->setText( statusText );
}
else
{
m_insertAction->setEnabled(false);
- d->m_helpArea->setText( QString::null );
+ d->m_helpArea->setText( TQString::null );
}
}
-void KEditToolbarWidget::slotActiveSelected(QListViewItem *item)
+void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item)
{
ToolbarItem* toolitem = static_cast<ToolbarItem *>(item);
m_removeAction->setEnabled( item );
- static const QString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
d->m_changeIcon->setEnabled( item &&
d->m_hasKDialog &&
toolitem->internalTag() == tagAction );
@@ -1124,18 +1124,18 @@ void KEditToolbarWidget::slotActiveSelected(QListViewItem *item)
m_downAction->setEnabled(true);
else
m_downAction->setEnabled(false);
- QString statusText = toolitem->statusText();
+ TQString statusText = toolitem->statusText();
d->m_helpArea->setText( statusText );
}
else
{
m_upAction->setEnabled(false);
m_downAction->setEnabled(false);
- d->m_helpArea->setText( QString::null );
+ d->m_helpArea->setText( TQString::null );
}
}
-void KEditToolbarWidget::slotDropped(KListView *list, QDropEvent *e, QListViewItem *after)
+void KEditToolbarWidget::slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after)
{
ToolbarItem *item = new ToolbarItem(m_inactiveList); // needs parent, use inactiveList temporarily
if(!ToolbarItemDrag::decode(e, *item)) {
@@ -1186,18 +1186,18 @@ void KEditToolbarWidget::slotRemoveButton()
slotToolbarSelected( m_toolbarCombo->currentText() );
}
-void KEditToolbarWidget::insertActive(ToolbarItem *item, QListViewItem *before, bool prepend)
+void KEditToolbarWidget::insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend)
{
if (!item)
return;
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
- QDomElement new_item;
+ TQDomElement new_item;
// let's handle the separator specially
if (item->text(1) == LINESEPARATORSTRING) {
new_item = domDocument().createElement(tagSeparator);
@@ -1213,7 +1213,7 @@ void KEditToolbarWidget::insertActive(ToolbarItem *item, QListViewItem *before,
// we have the item in the active list which is before the new
// item.. so let's try our best to add our new item right after it
ToolbarItem *act_item = (ToolbarItem*)before;
- QDomElement elem = d->findElementForToolbarItem( act_item );
+ TQDomElement elem = d->findElementForToolbarItem( act_item );
Q_ASSERT( !elem.isNull() );
d->m_currentToolbarElem.insertAfter(new_item, elem);
}
@@ -1238,13 +1238,13 @@ void KEditToolbarWidget::removeActive(ToolbarItem *item)
if (!item)
return;
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
// we're modified, so let this change
emit enableOk(true);
// now iterate through to find the child to nuke
- QDomElement elem = d->findElementForToolbarItem( item );
+ TQDomElement elem = d->findElementForToolbarItem( item );
if ( !elem.isNull() )
{
// nuke myself!
@@ -1273,9 +1273,9 @@ void KEditToolbarWidget::slotUpButton()
delete item;
}
-void KEditToolbarWidget::moveActive( ToolbarItem* item, QListViewItem* before )
+void KEditToolbarWidget::moveActive( ToolbarItem* item, TQListViewItem* before )
{
- QDomElement e = d->findElementForToolbarItem( item );
+ TQDomElement e = d->findElementForToolbarItem( item );
if ( e.isNull() )
return;
@@ -1306,7 +1306,7 @@ void KEditToolbarWidget::moveActive( ToolbarItem* item, QListViewItem* before )
d->m_currentToolbarElem.insertAfter(e, d->findElementForToolbarItem( (ToolbarItem*)before ));
// and set this container as a noMerge
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
d->m_currentToolbarElem.setAttribute( attrNoMerge, "1");
// update the local doc
@@ -1328,9 +1328,9 @@ void KEditToolbarWidget::slotDownButton()
delete item;
}
-void KEditToolbarWidget::updateLocal(QDomElement& elem)
+void KEditToolbarWidget::updateLocal(TQDomElement& elem)
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
XmlDataList::Iterator xit = d->m_xmlFiles.begin();
for ( ; xit != d->m_xmlFiles.end(); ++xit)
@@ -1355,18 +1355,18 @@ void KEditToolbarWidget::updateLocal(QDomElement& elem)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name( (*it).attribute( attrName ) );
- QString tag( (*it).tagName() );
+ TQString name( (*it).attribute( attrName ) );
+ TQString tag( (*it).tagName() );
if ( (tag != elem.tagName()) || (name != elem.attribute(attrName)) )
continue;
- QDomElement toolbar = (*xit).m_document.documentElement().toElement();
+ TQDomElement toolbar = (*xit).m_document.documentElement().toElement();
toolbar.replaceChild(elem, (*it));
return;
}
// just append it
- QDomElement toolbar = (*xit).m_document.documentElement().toElement();
+ TQDomElement toolbar = (*xit).m_document.documentElement().toElement();
toolbar.appendChild(elem);
}
}
@@ -1382,10 +1382,10 @@ void KEditToolbarWidget::slotChangeIcon()
return;
d->m_kdialogProcess = new KProcIO;
- QString kdialogExe = KStandardDirs::findExe(QString::fromLatin1("kdialog"));
+ TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog"));
(*d->m_kdialogProcess) << kdialogExe;
(*d->m_kdialogProcess) << "--embed";
- (*d->m_kdialogProcess) << QString::number( (ulong)topLevelWidget()->winId() );
+ (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() );
(*d->m_kdialogProcess) << "--geticon";
(*d->m_kdialogProcess) << "Toolbar";
(*d->m_kdialogProcess) << "Actions";
@@ -1399,8 +1399,8 @@ void KEditToolbarWidget::slotChangeIcon()
m_activeList->setEnabled( false ); // don't change the current item
m_toolbarCombo->setEnabled( false ); // don't change the current toolbar
- connect( d->m_kdialogProcess, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( d->m_kdialogProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
}
void KEditToolbarWidget::slotProcessExited( KProcess* )
@@ -1408,7 +1408,7 @@ void KEditToolbarWidget::slotProcessExited( KProcess* )
m_activeList->setEnabled( true );
m_toolbarCombo->setEnabled( true );
- QString icon;
+ TQString icon;
if (!d->m_kdialogProcess) {
kdError(240) << "Something is wrong here! m_kdialogProcess is zero!" << endl;
@@ -1432,9 +1432,9 @@ void KEditToolbarWidget::slotProcessExited( KProcess* )
d->m_currentXmlData->m_isModified = true;
// Get hold of ActionProperties tag
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement( d->m_currentXmlData->m_document );
+ TQDomElement elem = KXMLGUIFactory::actionPropertiesElement( d->m_currentXmlData->m_document );
// Find or create an element for this action
- QDomElement act_elem = KXMLGUIFactory::findActionByName( elem, item->internalName(), true /*create*/ );
+ TQDomElement act_elem = KXMLGUIFactory::findActionByName( elem, item->internalName(), true /*create*/ );
Q_ASSERT( !act_elem.isNull() );
act_elem.setAttribute( "icon", icon );
diff --git a/kdeui/kedittoolbar.h b/kdeui/kedittoolbar.h
index fe41775f0..56f3c11d5 100644
--- a/kdeui/kedittoolbar.h
+++ b/kdeui/kedittoolbar.h
@@ -19,7 +19,7 @@
#ifndef _KEDITTOOLBAR_H
#define _KEDITTOOLBAR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kxmlguiclient.h>
#include <kdialogbase.h>
@@ -68,7 +68,7 @@ namespace
* {
* saveMainWindowSettings( KGlobal::config(), "MainWindow" );
* KEditToolbar dlg(actionCollection());
- * connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
* dlg.exec();
* }
*
@@ -93,7 +93,7 @@ namespace
* \code
* saveMainWindowSettings( KGlobal::config(), "MainWindow" );
* KEditToolbar dlg(factory());
- * connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
* dlg.exec();
*
* void MyClass::slotNewToolbarConfig() // This is called when OK, Apply or Defaults is clicked
@@ -142,8 +142,8 @@ public:
* @param name An internal name.
*/
KEditToolbar(KActionCollection *collection,
- const QString& xmlfile = QString::null, bool global = true,
- QWidget* parent = 0, const char* name = 0);
+ const TQString& xmlfile = TQString::null, bool global = true,
+ TQWidget* parent = 0, const char* name = 0);
//KDE 4.0: merge the two constructors
/* Constructor for apps that do not use components, which has an extra argument
@@ -157,9 +157,9 @@ public:
* @param name An internal name.
* @since 3.2
*/
- KEditToolbar(const QString& defaultToolbar, KActionCollection *collection,
- const QString& xmlfile = QString::null, bool global = true,
- QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection,
+ const TQString& xmlfile = TQString::null, bool global = true,
+ TQWidget* parent = 0, const char* name = 0);
/**
* Constructor for KParts based apps.
*
@@ -183,7 +183,7 @@ public:
* This works, but only _if_ setting conserveMemory to false when calling
* KMainWindow::createGUI()! If not, use the other KEditToolbar constructor.
*/
- KEditToolbar(KXMLGUIFactory* factory, QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent = 0, const char* name = 0);
//KDE 4.0: merge the two constructors
/** Constructor for KParts based apps, which has an extra argument
@@ -195,8 +195,8 @@ public:
* @param name An internal name.
* @since 3.2
*/
- KEditToolbar(const QString& defaultToolbar, KXMLGUIFactory* factory,
- QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(const TQString& defaultToolbar, KXMLGUIFactory* factory,
+ TQWidget* parent = 0, const char* name = 0);
/// destructor
~KEditToolbar();
@@ -267,7 +267,7 @@ private:
* @author Kurt Granroth <granroth@kde.org>
* @version $Id$
*/
-class KDEUI_EXPORT KEditToolbarWidget : public QWidget, virtual public KXMLGUIClient
+class KDEUI_EXPORT KEditToolbarWidget : public TQWidget, virtual public KXMLGUIClient
{
Q_OBJECT
public:
@@ -301,8 +301,8 @@ public:
* @param parent This widget's parent
*/
KEditToolbarWidget(KActionCollection *collection,
- const QString& xmlfile = QString::null,
- bool global = true, QWidget *parent = 0L);
+ const TQString& xmlfile = TQString::null,
+ bool global = true, TQWidget *parent = 0L);
//KDE 4.0: merge the two constructors
/* Same as above, with an extra agrument specifying the toolbar to be shown.
@@ -315,11 +315,11 @@ public:
* @param parent This widget's parent
* @since 3.2
*/
- KEditToolbarWidget(const QString& defaultToolbar,
+ KEditToolbarWidget(const TQString& defaultToolbar,
KActionCollection *collection,
- const QString& file = QString::null,
+ const TQString& file = TQString::null,
bool global = true,
- QWidget *parent = 0L);
+ TQWidget *parent = 0L);
/**
* Constructor for KParts based apps.
@@ -341,7 +341,7 @@ public:
* @param factory Your application's factory object
* @param parent This widget's parent
*/
- KEditToolbarWidget(KXMLGUIFactory* factory, QWidget *parent = 0L);
+ KEditToolbarWidget(KXMLGUIFactory* factory, TQWidget *parent = 0L);
//KDE 4.0: merge the two constructors
/* Same as above, with an extra agrument specifying the toolbar to be shown.
@@ -352,9 +352,9 @@ public:
* @param parent This widget's parent
* @since 3.2
*/
- KEditToolbarWidget(const QString& defaultToolbar,
+ KEditToolbarWidget(const TQString& defaultToolbar,
KXMLGUIFactory* factory,
- QWidget *parent = 0L);
+ TQWidget *parent = 0L);
/**
* Destructor. Note that any changes done in this widget will
@@ -391,12 +391,12 @@ signals:
void enableOk(bool);
protected slots:
- void slotToolbarSelected(const QString& text);
+ void slotToolbarSelected(const TQString& text);
- void slotInactiveSelected(QListViewItem *item);
- void slotActiveSelected(QListViewItem *item);
+ void slotInactiveSelected(TQListViewItem *item);
+ void slotActiveSelected(TQListViewItem *item);
- void slotDropped(KListView *list, QDropEvent *e, QListViewItem *after);
+ void slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after);
void slotInsertButton();
void slotRemoveButton();
@@ -411,24 +411,24 @@ private slots:
protected: // KDE4: make private
void setupLayout();
- void insertActive(ToolbarItem *item, QListViewItem *before, bool prepend = false);
+ void insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend = false);
void removeActive(ToolbarItem *item);
- void moveActive(ToolbarItem *item, QListViewItem *before);
- void initNonKPart(KActionCollection *collection, const QString& file, bool global);
+ void moveActive(ToolbarItem *item, TQListViewItem *before);
+ void initNonKPart(KActionCollection *collection, const TQString& file, bool global);
void initKPart(KXMLGUIFactory* factory);
- void loadToolbarCombo(const QString& defaultToolbar = QString::null);
- void loadActionList(QDomElement& elem);
- void updateLocal(QDomElement& elem);
+ void loadToolbarCombo(const TQString& defaultToolbar = TQString::null);
+ void loadActionList(TQDomElement& elem);
+ void updateLocal(TQDomElement& elem);
private:
ToolbarListView *m_inactiveList;
ToolbarListView *m_activeList;
- QComboBox *m_toolbarCombo;
+ TQComboBox *m_toolbarCombo;
- QToolButton *m_upAction;
- QToolButton *m_removeAction;
- QToolButton *m_insertAction;
- QToolButton *m_downAction;
+ TQToolButton *m_upAction;
+ TQToolButton *m_removeAction;
+ TQToolButton *m_insertAction;
+ TQToolButton *m_downAction;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kfontcombo.cpp b/kdeui/kfontcombo.cpp
index d4f04812f..4752a0bd1 100644
--- a/kdeui/kfontcombo.cpp
+++ b/kdeui/kfontcombo.cpp
@@ -17,9 +17,9 @@
*/
-#include <qfontdatabase.h>
-#include <qlistbox.h>
-#include <qpainter.h>
+#include <tqfontdatabase.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
#include <kcharsets.h>
#include <kconfig.h>
@@ -50,35 +50,35 @@ struct KFontComboPrivate
bool modified : 1;
int size;
int lineSpacing;
- QString defaultFamily;
+ TQString defaultFamily;
};
class KFontListItem : public QListBoxItem
{
public:
- KFontListItem(const QString &fontName, KFontCombo *combo);
+ KFontListItem(const TQString &fontName, KFontCombo *combo);
virtual ~KFontListItem();
- virtual int width(const QListBox *) const;
- virtual int height(const QListBox *) const;
+ virtual int width(const TQListBox *) const;
+ virtual int height(const TQListBox *) const;
void updateFont();
protected:
- virtual void paint(QPainter *p);
+ virtual void paint(TQPainter *p);
private:
void createFont();
private:
KFontCombo *m_combo;
- QString m_fontName;
- QFont *m_font;
+ TQString m_fontName;
+ TQFont *m_font;
bool m_canPaintName;
};
-KFontListItem::KFontListItem(const QString &fontName, KFontCombo *combo)
- : QListBoxItem(combo->listBox()),
+KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo)
+ : TQListBoxItem(combo->listBox()),
m_combo(combo),
m_fontName(fontName),
m_font(0),
@@ -92,42 +92,42 @@ KFontListItem::~KFontListItem()
delete m_font;
}
-int KFontListItem::width(const QListBox *lb) const
+int KFontListItem::width(const TQListBox *lb) const
{
if (m_font)
- return QFontMetrics(*m_font).width(text()) + 6;
+ return TQFontMetrics(*m_font).width(text()) + 6;
return lb->fontMetrics().width(text()) + 6;
}
-int KFontListItem::height(const QListBox *lb) const
+int KFontListItem::height(const TQListBox *lb) const
{
if (m_combo->d->displayFonts)
return m_combo->d->lineSpacing + 2;
- QFontMetrics fm(lb->fontMetrics());
+ TQFontMetrics fm(lb->fontMetrics());
return fm.lineSpacing() + 2;
}
-void KFontListItem::paint(QPainter *p)
+void KFontListItem::paint(TQPainter *p)
{
if (m_combo->d->displayFonts)
{
if (!m_font)
createFont();
- QString t = m_fontName;
+ TQString t = m_fontName;
if (p->device() != m_combo)
{
if (m_canPaintName)
p->setFont(*m_font);
else
- t = QString::fromLatin1("(%1)").arg(m_fontName);
+ t = TQString::fromLatin1("(%1)").arg(m_fontName);
}
- QFontMetrics fm(p->fontMetrics());
+ TQFontMetrics fm(p->fontMetrics());
p->drawText(3, (m_combo->d->lineSpacing + fm.ascent() + fm.leading() / 2) / 2, t);
}
else
{
- QFontMetrics fm(p->fontMetrics());
+ TQFontMetrics fm(p->fontMetrics());
p->drawText(3, fm.ascent() + fm.leading() / 2, m_fontName);
}
}
@@ -149,8 +149,8 @@ void KFontListItem::createFont()
if (m_font)
return;
- m_font = new QFont(m_fontName);
- QFontMetrics fm(*m_font);
+ m_font = new TQFont(m_fontName);
+ TQFontMetrics fm(*m_font);
for (unsigned int i = 0; i < m_fontName.length(); ++i)
if (!fm.inFont(m_fontName[i]))
{
@@ -160,35 +160,35 @@ void KFontListItem::createFont()
updateFont();
}
-KFontCombo::KFontCombo(QWidget *parent, const char *name)
+KFontCombo::KFontCombo(TQWidget *parent, const char *name)
: KComboBox(true, parent, name)
{
init();
- QStringList families;
+ TQStringList families;
KFontChooser::getFontList(families, 0);
setFonts(families);
}
-KFontCombo::KFontCombo(const QStringList &fonts, QWidget *parent, const char *name)
+KFontCombo::KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name)
: KComboBox(true, parent, name)
{
init();
setFonts(fonts);
}
-void KFontCombo::setFonts(const QStringList &fonts)
+void KFontCombo::setFonts(const TQStringList &fonts)
{
clear();
- for (QStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it)
+ for (TQStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it)
new KFontListItem(*it, this);
}
/*
* Maintenance note: Keep in sync with KFontAction::setFont()
*/
-void KFontCombo::setCurrentFont(const QString &family)
+void KFontCombo::setCurrentFont(const TQString &family)
{
- QString lowerName = family.lower();
+ TQString lowerName = family.lower();
int c = count();
for(int i = 0; i < c; i++)
{
@@ -234,7 +234,7 @@ void KFontCombo::slotModified( int )
d->modified = 1;
}
-QString KFontCombo::currentFont() const
+TQString KFontCombo::currentFont() const
{
if (d->modified)
return currentText();
@@ -244,7 +244,7 @@ QString KFontCombo::currentFont() const
void KFontCombo::setCurrentItem(int i)
{
d->modified = true;
- QComboBox::setCurrentItem(i);
+ TQComboBox::setCurrentItem(i);
}
void KFontCombo::init()
@@ -254,7 +254,7 @@ void KFontCombo::init()
setInsertionPolicy(NoInsertion);
setAutoCompletion(true);
setSize(12);
- connect( this, SIGNAL(highlighted(int)), SLOT(slotModified(int)));
+ connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int)));
}
KFontCombo::~KFontCombo()
@@ -319,9 +319,9 @@ void KFontCombo::setSize(int size)
if (d->size == size)
return;
d->size = size;
- QFont f;
+ TQFont f;
f.setPointSize(size);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
d->lineSpacing = fm.lineSpacing();
updateFonts();
}
diff --git a/kdeui/kfontcombo.h b/kdeui/kfontcombo.h
index f3c5d1169..8a2a5f07c 100644
--- a/kdeui/kfontcombo.h
+++ b/kdeui/kfontcombo.h
@@ -35,7 +35,7 @@
class KDEUI_EXPORT KFontCombo : public KComboBox
{
Q_OBJECT
- Q_PROPERTY(QString family READ currentFont WRITE setCurrentFont)
+ Q_PROPERTY(TQString family READ currentFont WRITE setCurrentFont)
Q_PROPERTY(bool bold READ bold WRITE setBold DESIGNABLE true)
Q_PROPERTY(bool italic READ italic WRITE setItalic DESIGNABLE true)
Q_PROPERTY(bool underline READ underline WRITE setUnderline DESIGNABLE true)
@@ -48,7 +48,7 @@ public:
* @param parent The parent widget
* @param name The object name for the widget
*/
- KFontCombo(QWidget *parent, const char *name = 0);
+ KFontCombo(TQWidget *parent, const char *name = 0);
/**
* Constructor that takes an already initialzed font list
*
@@ -56,7 +56,7 @@ public:
* @param parent The parent widget
* @param name The object name for the widget
*/
- KFontCombo(const QStringList &fonts, QWidget *parent, const char *name = 0);
+ KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0);
/**
* Destructor
*/
@@ -67,17 +67,17 @@ public:
*
* @param fonts Font list to show
*/
- void setFonts(const QStringList &fonts);
+ void setFonts(const TQStringList &fonts);
/**
* Sets the currently selected font.
*
* @param family Font to select.
*/
- void setCurrentFont(const QString &family);
+ void setCurrentFont(const TQString &family);
/**
* @return the currently selected font.
*/
- QString currentFont() const;
+ TQString currentFont() const;
/**
* Sets the listed fonts to bold or normal.
diff --git a/kdeui/kfontdialog.cpp b/kdeui/kfontdialog.cpp
index 64de6e4c6..4044c7b68 100644
--- a/kdeui/kfontdialog.cpp
+++ b/kdeui/kfontdialog.cpp
@@ -28,18 +28,18 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollbar.h>
-#include <qstringlist.h>
-#include <qfontdatabase.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollbar.h>
+#include <tqstringlist.h>
+#include <tqfontdatabase.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kcharsets.h>
@@ -47,7 +47,7 @@
#include <kdialog.h>
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <klistbox.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -56,7 +56,7 @@
#include "kfontdialog.moc"
-static int minimumListWidth( const QListBox *list )
+static int minimumListWidth( const TQListBox *list )
{
int w=0;
for( uint i=0; i<list->count(); i++ )
@@ -70,7 +70,7 @@ static int minimumListWidth( const QListBox *list )
return w;
}
-static int minimumListHeight( const QListBox *list, int numVisibleEntry )
+static int minimumListHeight( const TQListBox *list, int numVisibleEntry )
{
int w = list->count() > 0 ? list->item(0)->height(list) :
list->fontMetrics().lineSpacing();
@@ -84,103 +84,103 @@ class KFontChooser::KFontChooserPrivate
{
public:
KFontChooserPrivate()
- { m_palette.setColor(QPalette::Active, QColorGroup::Text, Qt::black);
- m_palette.setColor(QPalette::Active, QColorGroup::Base, Qt::white); }
- QPalette m_palette;
+ { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black);
+ m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); }
+ TQPalette m_palette;
};
-KFontChooser::KFontChooser(QWidget *parent, const char *name,
- bool onlyFixed, const QStringList &fontList,
+KFontChooser::KFontChooser(TQWidget *parent, const char *name,
+ bool onlyFixed, const TQStringList &fontList,
bool makeFrame, int visibleListSize, bool diff,
- QButton::ToggleState *sizeIsRelativeState )
- : QWidget(parent, name), usingFixed(onlyFixed)
+ TQButton::ToggleState *sizeIsRelativeState )
+ : TQWidget(parent, name), usingFixed(onlyFixed)
{
charsetsCombo = 0;
- QString mainWhatsThisText =
+ TQString mainWhatsThisText =
i18n( "Here you can choose the font to be used." );
- QWhatsThis::add( this, mainWhatsThisText );
+ TQWhatsThis::add( this, mainWhatsThisText );
d = new KFontChooserPrivate;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
int checkBoxGap = KDialog::spacingHint() / 2;
- QWidget *page;
- QGridLayout *gridLayout;
+ TQWidget *page;
+ TQGridLayout *gridLayout;
int row = 0;
if( makeFrame )
{
- page = new QGroupBox( i18n("Requested Font"), this );
+ page = new TQGroupBox( i18n("Requested Font"), this );
topLayout->addWidget(page);
- gridLayout = new QGridLayout( page, 5, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( page, 5, 3, KDialog::marginHint(), KDialog::spacingHint() );
gridLayout->addRowSpacing( 0, fontMetrics().lineSpacing() );
row = 1;
}
else
{
- page = new QWidget( this );
+ page = new TQWidget( this );
topLayout->addWidget(page);
- gridLayout = new QGridLayout( page, 4, 3, 0, KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( page, 4, 3, 0, KDialog::spacingHint() );
}
//
// first, create the labels across the top
//
- QHBoxLayout *familyLayout = new QHBoxLayout();
+ TQHBoxLayout *familyLayout = new TQHBoxLayout();
familyLayout->addSpacing( checkBoxGap );
if (diff) {
- familyCheckbox = new QCheckBox(i18n("Font"), page);
- connect(familyCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ familyCheckbox = new TQCheckBox(i18n("Font"), page);
+ connect(familyCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
familyLayout->addWidget(familyCheckbox, 0, Qt::AlignLeft);
- QString familyCBToolTipText =
+ TQString familyCBToolTipText =
i18n("Change font family?");
- QString familyCBWhatsThisText =
+ TQString familyCBWhatsThisText =
i18n("Enable this checkbox to change the font family settings.");
- QWhatsThis::add( familyCheckbox, familyCBWhatsThisText );
- QToolTip::add( familyCheckbox, familyCBToolTipText );
+ TQWhatsThis::add( familyCheckbox, familyCBWhatsThisText );
+ TQToolTip::add( familyCheckbox, familyCBToolTipText );
familyLabel = 0;
} else {
familyCheckbox = 0;
- familyLabel = new QLabel( i18n("Font:"), page, "familyLabel" );
+ familyLabel = new TQLabel( i18n("Font:"), page, "familyLabel" );
familyLayout->addWidget(familyLabel, 1, Qt::AlignLeft);
}
gridLayout->addLayout(familyLayout, row, 0 );
- QHBoxLayout *styleLayout = new QHBoxLayout();
+ TQHBoxLayout *styleLayout = new TQHBoxLayout();
if (diff) {
- styleCheckbox = new QCheckBox(i18n("Font style"), page);
- connect(styleCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ styleCheckbox = new TQCheckBox(i18n("Font style"), page);
+ connect(styleCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
styleLayout->addWidget(styleCheckbox, 0, Qt::AlignLeft);
- QString styleCBToolTipText =
+ TQString styleCBToolTipText =
i18n("Change font style?");
- QString styleCBWhatsThisText =
+ TQString styleCBWhatsThisText =
i18n("Enable this checkbox to change the font style settings.");
- QWhatsThis::add( styleCheckbox, styleCBWhatsThisText );
- QToolTip::add( styleCheckbox, styleCBToolTipText );
+ TQWhatsThis::add( styleCheckbox, styleCBWhatsThisText );
+ TQToolTip::add( styleCheckbox, styleCBToolTipText );
styleLabel = 0;
} else {
styleCheckbox = 0;
- styleLabel = new QLabel( i18n("Font style:"), page, "styleLabel");
+ styleLabel = new TQLabel( i18n("Font style:"), page, "styleLabel");
styleLayout->addWidget(styleLabel, 1, Qt::AlignLeft);
}
styleLayout->addSpacing( checkBoxGap );
gridLayout->addLayout(styleLayout, row, 1 );
- QHBoxLayout *sizeLayout = new QHBoxLayout();
+ TQHBoxLayout *sizeLayout = new TQHBoxLayout();
if (diff) {
- sizeCheckbox = new QCheckBox(i18n("Size"),page);
- connect(sizeCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ sizeCheckbox = new TQCheckBox(i18n("Size"),page);
+ connect(sizeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
sizeLayout->addWidget(sizeCheckbox, 0, Qt::AlignLeft);
- QString sizeCBToolTipText =
+ TQString sizeCBToolTipText =
i18n("Change font size?");
- QString sizeCBWhatsThisText =
+ TQString sizeCBWhatsThisText =
i18n("Enable this checkbox to change the font size settings.");
- QWhatsThis::add( sizeCheckbox, sizeCBWhatsThisText );
- QToolTip::add( sizeCheckbox, sizeCBToolTipText );
+ TQWhatsThis::add( sizeCheckbox, sizeCBWhatsThisText );
+ TQToolTip::add( sizeCheckbox, sizeCBToolTipText );
sizeLabel = 0;
} else {
sizeCheckbox = 0;
- sizeLabel = new QLabel( i18n("Size:"), page, "sizeLabel");
+ sizeLabel = new TQLabel( i18n("Size:"), page, "sizeLabel");
sizeLayout->addWidget(sizeLabel, 1, Qt::AlignLeft);
}
sizeLayout->addSpacing( checkBoxGap );
@@ -195,12 +195,12 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
familyListBox = new KListBox( page, "familyListBox");
familyListBox->setEnabled( !diff );
gridLayout->addWidget( familyListBox, row, 0 );
- QString fontFamilyWhatsThisText =
+ TQString fontFamilyWhatsThisText =
i18n("Here you can choose the font family to be used." );
- QWhatsThis::add( familyListBox, fontFamilyWhatsThisText );
- QWhatsThis::add(diff?(QWidget *) familyCheckbox:(QWidget *) familyLabel, fontFamilyWhatsThisText );
- connect(familyListBox, SIGNAL(highlighted(const QString &)),
- SLOT(family_chosen_slot(const QString &)));
+ TQWhatsThis::add( familyListBox, fontFamilyWhatsThisText );
+ TQWhatsThis::add(diff?(TQWidget *) familyCheckbox:(TQWidget *) familyLabel, fontFamilyWhatsThisText );
+ connect(familyListBox, TQT_SIGNAL(highlighted(const TQString &)),
+ TQT_SLOT(family_chosen_slot(const TQString &)));
if(!fontList.isEmpty())
{
familyListBox->insertStringList(fontList);
@@ -217,10 +217,10 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
styleListBox = new KListBox( page, "styleListBox");
styleListBox->setEnabled( !diff );
gridLayout->addWidget(styleListBox, row, 1);
- QString fontStyleWhatsThisText =
+ TQString fontStyleWhatsThisText =
i18n("Here you can choose the font style to be used." );
- QWhatsThis::add( styleListBox, fontStyleWhatsThisText );
- QWhatsThis::add(diff?(QWidget *)styleCheckbox:(QWidget *)styleLabel, fontFamilyWhatsThisText );
+ TQWhatsThis::add( styleListBox, fontStyleWhatsThisText );
+ TQWhatsThis::add(diff?(TQWidget *)styleCheckbox:(TQWidget *)styleLabel, fontFamilyWhatsThisText );
styleListBox->insertItem(i18n("Regular"));
styleListBox->insertItem(i18n("Italic"));
styleListBox->insertItem(i18n("Bold"));
@@ -229,8 +229,8 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
styleListBox->setMinimumHeight(
minimumListHeight( styleListBox, visibleListSize ) );
- connect(styleListBox, SIGNAL(highlighted(const QString &)),
- SLOT(style_chosen_slot(const QString &)));
+ connect(styleListBox, TQT_SIGNAL(highlighted(const TQString &)),
+ TQT_SLOT(style_chosen_slot(const TQString &)));
sizeListBox = new KListBox( page, "sizeListBox");
@@ -240,38 +240,38 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
sizeListBox->setEnabled( !diff );
sizeOfFont->setEnabled( !diff );
if( sizeIsRelativeState ) {
- QString sizeIsRelativeCBText =
+ TQString sizeIsRelativeCBText =
i18n("Relative");
- QString sizeIsRelativeCBToolTipText =
+ TQString sizeIsRelativeCBToolTipText =
i18n("Font size<br><i>fixed</i> or <i>relative</i><br>to environment");
- QString sizeIsRelativeCBWhatsThisText =
+ TQString sizeIsRelativeCBWhatsThisText =
i18n("Here you can switch between fixed font size and font size "
"to be calculated dynamically and adjusted to changing "
"environment (e.g. widget dimensions, paper size)." );
- sizeIsRelativeCheckBox = new QCheckBox( sizeIsRelativeCBText,
+ sizeIsRelativeCheckBox = new TQCheckBox( sizeIsRelativeCBText,
page,
"sizeIsRelativeCheckBox" );
sizeIsRelativeCheckBox->setTristate( diff );
- QGridLayout *sizeLayout2 = new QGridLayout( 3,2, KDialog::spacingHint()/2, "sizeLayout2" );
+ TQGridLayout *sizeLayout2 = new TQGridLayout( 3,2, KDialog::spacingHint()/2, "sizeLayout2" );
gridLayout->addLayout(sizeLayout2, row, 2);
sizeLayout2->setColStretch( 1, 1 ); // to prevent text from eating the right border
sizeLayout2->addMultiCellWidget( sizeOfFont, 0, 0, 0, 1);
sizeLayout2->addMultiCellWidget(sizeListBox, 1,1, 0,1);
sizeLayout2->addWidget(sizeIsRelativeCheckBox, 2, 0, Qt::AlignLeft);
- QWhatsThis::add( sizeIsRelativeCheckBox, sizeIsRelativeCBWhatsThisText );
- QToolTip::add( sizeIsRelativeCheckBox, sizeIsRelativeCBToolTipText );
+ TQWhatsThis::add( sizeIsRelativeCheckBox, sizeIsRelativeCBWhatsThisText );
+ TQToolTip::add( sizeIsRelativeCheckBox, sizeIsRelativeCBToolTipText );
}
else {
sizeIsRelativeCheckBox = 0L;
- QGridLayout *sizeLayout2 = new QGridLayout( 2,1, KDialog::spacingHint()/2, "sizeLayout2" );
+ TQGridLayout *sizeLayout2 = new TQGridLayout( 2,1, KDialog::spacingHint()/2, "sizeLayout2" );
gridLayout->addLayout(sizeLayout2, row, 2);
sizeLayout2->addWidget( sizeOfFont, 0, 0);
sizeLayout2->addMultiCellWidget(sizeListBox, 1,1, 0,0);
}
- QString fontSizeWhatsThisText =
+ TQString fontSizeWhatsThisText =
i18n("Here you can choose the font size to be used." );
- QWhatsThis::add( sizeListBox, fontSizeWhatsThisText );
- QWhatsThis::add( diff?(QWidget *)sizeCheckbox:(QWidget *)sizeLabel, fontSizeWhatsThisText );
+ TQWhatsThis::add( sizeListBox, fontSizeWhatsThisText );
+ TQWhatsThis::add( diff?(TQWidget *)sizeCheckbox:(TQWidget *)sizeLabel, fontSizeWhatsThisText );
fillSizeList();
sizeListBox->setMinimumWidth( minimumListWidth(sizeListBox) +
@@ -279,49 +279,49 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
sizeListBox->setMinimumHeight(
minimumListHeight( sizeListBox, visibleListSize ) );
- connect( sizeOfFont, SIGNAL( valueChanged(int) ),
- SLOT(size_value_slot(int)));
+ connect( sizeOfFont, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT(size_value_slot(int)));
- connect( sizeListBox, SIGNAL(highlighted(const QString&)),
- SLOT(size_chosen_slot(const QString&)) );
- sizeListBox->setSelected(sizeListBox->findItem(QString::number(10)), true); // default to 10pt.
+ connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)),
+ TQT_SLOT(size_chosen_slot(const TQString&)) );
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt.
row ++;
row ++;
- sampleEdit = new QLineEdit( page, "sampleEdit");
- QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black );
+ sampleEdit = new TQLineEdit( page, "sampleEdit");
+ TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black );
sampleEdit->setFont(tmpFont);
//i18n: This is a classical test phrase. (It contains all letters from A to Z.)
sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() );
sampleEdit->setAlignment(Qt::AlignCenter);
gridLayout->addMultiCellWidget(sampleEdit, 4, 4, 0, 2);
- QString sampleEditWhatsThisText =
+ TQString sampleEditWhatsThisText =
i18n("This sample text illustrates the current settings. "
"You may edit it to test special characters." );
- QWhatsThis::add( sampleEdit, sampleEditWhatsThisText );
- connect(this, SIGNAL(fontSelected(const QFont &)),
- SLOT(displaySample(const QFont &)));
+ TQWhatsThis::add( sampleEdit, sampleEditWhatsThisText );
+ connect(this, TQT_SIGNAL(fontSelected(const TQFont &)),
+ TQT_SLOT(displaySample(const TQFont &)));
- QVBoxLayout *vbox;
+ TQVBoxLayout *vbox;
if( makeFrame )
{
- page = new QGroupBox( i18n("Actual Font"), this );
+ page = new TQGroupBox( i18n("Actual Font"), this );
topLayout->addWidget(page);
- vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
vbox->addSpacing( fontMetrics().lineSpacing() );
}
else
{
- page = new QWidget( this );
+ page = new TQWidget( this );
topLayout->addWidget(page);
- vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("Actual Font"), page );
+ vbox = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQLabel *label = new TQLabel( i18n("Actual Font"), page );
vbox->addWidget( label );
}
- xlfdEdit = new QLineEdit( page, "xlfdEdit" );
+ xlfdEdit = new TQLineEdit( page, "xlfdEdit" );
vbox->addWidget( xlfdEdit );
// lets initialize the display if possible
@@ -331,8 +331,8 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
setSizeIsRelative( *sizeIsRelativeState );
KConfig *config = KGlobal::config();
- KConfigGroupSaver saver(config, QString::fromLatin1("General"));
- showXLFDArea(config->readBoolEntry(QString::fromLatin1("fontSelectorShowXLFD"), false));
+ KConfigGroupSaver saver(config, TQString::fromLatin1("General"));
+ showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false));
}
KFontChooser::~KFontChooser()
@@ -355,55 +355,55 @@ void KFontChooser::fillSizeList() {
};
for(int i = 0; c[i]; ++i)
{
- sizeListBox->insertItem(QString::number(c[i]));
+ sizeListBox->insertItem(TQString::number(c[i]));
}
}
-void KFontChooser::setColor( const QColor & col )
+void KFontChooser::setColor( const TQColor & col )
{
- d->m_palette.setColor( QPalette::Active, QColorGroup::Text, col );
- QPalette pal = sampleEdit->palette();
- pal.setColor( QPalette::Active, QColorGroup::Text, col );
+ d->m_palette.setColor( TQPalette::Active, TQColorGroup::Text, col );
+ TQPalette pal = sampleEdit->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Text, col );
sampleEdit->setPalette( pal );
}
-QColor KFontChooser::color() const
+TQColor KFontChooser::color() const
{
- return d->m_palette.color( QPalette::Active, QColorGroup::Text );
+ return d->m_palette.color( TQPalette::Active, TQColorGroup::Text );
}
-void KFontChooser::setBackgroundColor( const QColor & col )
+void KFontChooser::setBackgroundColor( const TQColor & col )
{
- d->m_palette.setColor( QPalette::Active, QColorGroup::Base, col );
- QPalette pal = sampleEdit->palette();
- pal.setColor( QPalette::Active, QColorGroup::Base, col );
+ d->m_palette.setColor( TQPalette::Active, TQColorGroup::Base, col );
+ TQPalette pal = sampleEdit->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Base, col );
sampleEdit->setPalette( pal );
}
-QColor KFontChooser::backgroundColor() const
+TQColor KFontChooser::backgroundColor() const
{
- return d->m_palette.color( QPalette::Active, QColorGroup::Base );
+ return d->m_palette.color( TQPalette::Active, TQColorGroup::Base );
}
-void KFontChooser::setSizeIsRelative( QButton::ToggleState relative )
+void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative )
{
// check or uncheck or gray out the "relative" checkbox
if( sizeIsRelativeCheckBox ) {
- if( QButton::NoChange == relative )
+ if( TQButton::NoChange == relative )
sizeIsRelativeCheckBox->setNoChange();
else
- sizeIsRelativeCheckBox->setChecked( QButton::On == relative );
+ sizeIsRelativeCheckBox->setChecked( TQButton::On == relative );
}
}
-QButton::ToggleState KFontChooser::sizeIsRelative() const
+TQButton::ToggleState KFontChooser::sizeIsRelative() const
{
return sizeIsRelativeCheckBox
? sizeIsRelativeCheckBox->state()
- : QButton::NoChange;
+ : TQButton::NoChange;
}
-QSize KFontChooser::sizeHint( void ) const
+TQSize KFontChooser::sizeHint( void ) const
{
return minimumSizeHint();
}
@@ -426,12 +426,12 @@ void KFontChooser::enableColumn( int column, bool state )
}
-void KFontChooser::setFont( const QFont& aFont, bool onlyFixed )
+void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed )
{
selFont = aFont;
selectedSize=aFont.pointSize();
if (selectedSize == -1)
- selectedSize = QFontInfo(aFont).pointSize();
+ selectedSize = TQFontInfo(aFont).pointSize();
if( onlyFixed != usingFixed)
{
@@ -461,14 +461,14 @@ void KFontChooser::toggled_checkbox()
sizeOfFont->setEnabled( sizeCheckbox->isChecked() );
}
-void KFontChooser::family_chosen_slot(const QString& family)
+void KFontChooser::family_chosen_slot(const TQString& family)
{
- QFontDatabase dbase;
- QStringList styles = QStringList(dbase.styles(family));
+ TQFontDatabase dbase;
+ TQStringList styles = TQStringList(dbase.styles(family));
styleListBox->clear();
currentStyles.clear();
- for ( QStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
- QString style = *it;
+ for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
+ TQString style = *it;
int pos = style.find("Plain");
if(pos >=0) style = style.replace(pos,5,i18n("Regular"));
pos = style.find("Normal");
@@ -486,17 +486,17 @@ void KFontChooser::family_chosen_slot(const QString& family)
}
styleListBox->blockSignals(true);
- QListBoxItem *item = styleListBox->findItem(selectedStyle);
+ TQListBoxItem *item = styleListBox->findItem(selectedStyle);
if (item)
styleListBox->setSelected(styleListBox->findItem(selectedStyle), true);
else
styleListBox->setSelected(0, true);
styleListBox->blockSignals(false);
- style_chosen_slot(QString::null);
+ style_chosen_slot(TQString::null);
}
-void KFontChooser::size_chosen_slot(const QString& size){
+void KFontChooser::size_chosen_slot(const TQString& size){
selectedSize=size.toInt();
sizeOfFont->setValue(selectedSize);
@@ -509,9 +509,9 @@ void KFontChooser::size_value_slot(int val) {
emit fontSelected(selFont);
}
-void KFontChooser::style_chosen_slot(const QString& style)
+void KFontChooser::style_chosen_slot(const TQString& style)
{
- QString currentStyle;
+ TQString currentStyle;
if (style.isEmpty())
currentStyle = styleListBox->currentText();
else
@@ -520,25 +520,25 @@ void KFontChooser::style_chosen_slot(const QString& style)
int diff=0; // the difference between the font size requested and what we can show.
sizeListBox->clear();
- QFontDatabase dbase;
+ TQFontDatabase dbase;
if(dbase.isSmoothlyScalable(familyListBox->currentText(), currentStyles[currentStyle])) { // is vector font
//sampleEdit->setPaletteBackgroundPixmap( VectorPixmap ); // TODO
fillSizeList();
} else { // is bitmap font.
//sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO
- QValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
+ TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
if(sizes.count() > 0) {
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
diff=1000;
for ( it = sizes.begin(); it != sizes.end(); ++it ) {
if(*it <= selectedSize || diff > *it - selectedSize) diff = selectedSize - *it;
- sizeListBox->insertItem(QString::number(*it));
+ sizeListBox->insertItem(TQString::number(*it));
}
} else // there are times QT does not provide the list..
fillSizeList();
}
sizeListBox->blockSignals(true);
- sizeListBox->setSelected(sizeListBox->findItem(QString::number(selectedSize)), true);
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true);
sizeListBox->blockSignals(false);
sizeListBox->ensureCurrentVisible();
@@ -549,14 +549,14 @@ void KFontChooser::style_chosen_slot(const QString& style)
selectedStyle = style;
}
-void KFontChooser::displaySample(const QFont& font)
+void KFontChooser::displaySample(const TQFont& font)
{
sampleEdit->setFont(font);
sampleEdit->setCursorPosition(0);
xlfdEdit->setText(font.rawName());
xlfdEdit->setCursorPosition(0);
- //QFontInfo a = QFontInfo(font);
+ //TQFontInfo a = TQFontInfo(font);
//kdDebug() << "font: " << a.family () << ", " << a.pointSize () << endl;
//kdDebug() << " (" << font.toString() << ")\n";
}
@@ -565,12 +565,12 @@ void KFontChooser::setupDisplay()
{
// Calling familyListBox->setCurrentItem() causes the value of selFont
// to change, so we save the family, style and size beforehand.
- QString family = selFont.family().lower();
+ TQString family = selFont.family().lower();
int style = (selFont.bold() ? 2 : 0) + (selFont.italic() ? 1 : 0);
int size = selFont.pointSize();
if (size == -1)
- size = QFontInfo(selFont).pointSize();
- QString sizeStr = QString::number(size);
+ size = TQFontInfo(selFont).pointSize();
+ TQString sizeStr = TQString::number(size);
int numEntries, i;
@@ -600,7 +600,7 @@ void KFontChooser::setupDisplay()
// 2nd Fallback
if ( (i == numEntries) )
{
- QString fallback = family+" [";
+ TQString fallback = family+" [";
for (i = 0; i < numEntries; i++) {
if (familyListBox->text(i).lower().startsWith(fallback)) {
familyListBox->setCurrentItem(i);
@@ -638,16 +638,16 @@ void KFontChooser::setupDisplay()
}
-void KFontChooser::getFontList( QStringList &list, uint fontListCriteria)
+void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria)
{
- QFontDatabase dbase;
- QStringList lstSys(dbase.families());
+ TQFontDatabase dbase;
+ TQStringList lstSys(dbase.families());
// if we have criteria; then check fonts before adding
if (fontListCriteria)
{
- QStringList lstFonts;
- for (QStringList::Iterator it = lstSys.begin(); it != lstSys.end(); ++it)
+ TQStringList lstFonts;
+ for (TQStringList::Iterator it = lstSys.begin(); it != lstSys.end(); ++it)
{
if ((fontListCriteria & FixedWidthFonts) > 0 && !dbase.isFixedPitch(*it)) continue;
if (((fontListCriteria & (SmoothScalableFonts | ScalableFonts)) == ScalableFonts) &&
@@ -671,7 +671,7 @@ void KFontChooser::getFontList( QStringList &list, uint fontListCriteria)
list = lstSys;
}
-void KFontChooser::addFont( QStringList &list, const char *xfont )
+void KFontChooser::addFont( TQStringList &list, const char *xfont )
{
const char *ptr = strchr( xfont, '-' );
if ( !ptr )
@@ -681,16 +681,16 @@ void KFontChooser::addFont( QStringList &list, const char *xfont )
if ( !ptr )
return;
- QString font = QString::fromLatin1(ptr + 1);
+ TQString font = TQString::fromLatin1(ptr + 1);
int pos;
if ( ( pos = font.find( '-' ) ) > 0 ) {
font.truncate( pos );
- if ( font.find( QString::fromLatin1("open look"), 0, false ) >= 0 )
+ if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 )
return;
- QStringList::Iterator it = list.begin();
+ TQStringList::Iterator it = list.begin();
for ( ; it != list.end(); ++it )
if ( *it == font )
@@ -701,7 +701,7 @@ void KFontChooser::addFont( QStringList &list, const char *xfont )
void KFontChooser::fillFamilyListBox(bool onlyFixedFonts)
{
- QStringList fontList;
+ TQStringList fontList;
getFontList(fontList, onlyFixedFonts?FixedWidthFonts:0);
familyListBox->clear();
familyListBox->insertStringList(fontList);
@@ -721,10 +721,10 @@ void KFontChooser::showXLFDArea(bool show)
///////////////////////////////////////////////////////////////////////////////
-KFontDialog::KFontDialog( QWidget *parent, const char* name,
+KFontDialog::KFontDialog( TQWidget *parent, const char* name,
bool onlyFixed, bool modal,
- const QStringList &fontList, bool makeFrame, bool diff,
- QButton::ToggleState *sizeIsRelativeState )
+ const TQStringList &fontList, bool makeFrame, bool diff,
+ TQButton::ToggleState *sizeIsRelativeState )
: KDialogBase( parent, name, modal, i18n("Select Font"), Ok|Cancel, Ok )
{
chooser = new KFontChooser( this, "fontChooser",
@@ -734,11 +734,11 @@ KFontDialog::KFontDialog( QWidget *parent, const char* name,
}
-int KFontDialog::getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed,
- QWidget *parent, bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed,
+ TQWidget *parent, bool makeFrame,
+ TQButton::ToggleState *sizeIsRelativeState )
{
- KFontDialog dlg( parent, "Font Selector", onlyFixed, true, QStringList(),
+ KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(),
makeFrame, true, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
@@ -753,11 +753,11 @@ int KFontDialog::getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed,
return result;
}
-int KFontDialog::getFont( QFont &theFont, bool onlyFixed,
- QWidget *parent, bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+int KFontDialog::getFont( TQFont &theFont, bool onlyFixed,
+ TQWidget *parent, bool makeFrame,
+ TQButton::ToggleState *sizeIsRelativeState )
{
- KFontDialog dlg( parent, "Font Selector", onlyFixed, true, QStringList(),
+ KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(),
makeFrame, false, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
@@ -772,13 +772,13 @@ int KFontDialog::getFont( QFont &theFont, bool onlyFixed,
}
-int KFontDialog::getFontAndText( QFont &theFont, QString &theString,
- bool onlyFixed, QWidget *parent,
+int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString,
+ bool onlyFixed, TQWidget *parent,
bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+ TQButton::ToggleState *sizeIsRelativeState )
{
KFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true,
- QStringList(), makeFrame, false, sizeIsRelativeState );
+ TQStringList(), makeFrame, false, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
int result = dlg.exec();
diff --git a/kdeui/kfontdialog.h b/kdeui/kfontdialog.h
index 3452d4869..25c7f32bf 100644
--- a/kdeui/kfontdialog.h
+++ b/kdeui/kfontdialog.h
@@ -26,8 +26,8 @@
#ifndef _K_FONT_DIALOG_H_
#define _K_FONT_DIALOG_H_
-#include <qlineedit.h>
-#include <qbutton.h>
+#include <tqlineedit.h>
+#include <tqbutton.h>
#include <kdialogbase.h>
class QComboBox;
@@ -54,7 +54,7 @@ class KIntNumInput;
class KDEUI_EXPORT KFontChooser : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QFont font READ font WRITE setFont )
+ Q_PROPERTY( TQFont font READ font WRITE setFont )
public:
/**
@@ -78,7 +78,7 @@ public:
* that will be displayed in the dialog.
* <p>Consider the following code snippet;
* \code
- * QStringList list;
+ * TQStringList list;
* KFontChooser::getFontList(list,SmoothScalableFonts);
* KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list);
* \endcode
@@ -105,11 +105,11 @@ public:
* *sizeIsRelativeState, user choice may be retrieved by
* calling sizeIsRelative().
*/
- KFontChooser(QWidget *parent = 0L, const char *name = 0L,
+ KFontChooser(TQWidget *parent = 0L, const char *name = 0L,
bool onlyFixed = false,
- const QStringList &fontList = QStringList(),
+ const TQStringList &fontList = TQStringList(),
bool makeFrame = true, int visibleListSize=8,
- bool diff = false, QButton::ToggleState *sizeIsRelativeState = 0L );
+ bool diff = false, TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Destructs the font chooser.
@@ -136,7 +136,7 @@ public:
* @param onlyFixed Readjust the font list to display only fixed
* width fonts if @p true, or vice-versa.
*/
- void setFont( const QFont &font, bool onlyFixed = false );
+ void setFont( const TQFont &font, bool onlyFixed = false );
/**
* @return The bitmask corresponding to the attributes the user
@@ -147,29 +147,29 @@ public:
/**
* @return The currently selected font in the chooser.
*/
- QFont font() const { return selFont; }
+ TQFont font() const { return selFont; }
/**
* Sets the color to use in the preview.
*/
- void setColor( const QColor & col );
+ void setColor( const TQColor & col );
/**
* @return The color currently used in the preview (default: the text
* color of the active color group)
*/
- QColor color() const;
+ TQColor color() const;
/**
* Sets the background color to use in the preview.
*/
- void setBackgroundColor( const QColor & col );
+ void setBackgroundColor( const TQColor & col );
/**
* @return The background color currently used in the preview (default:
* the base color of the active colorgroup)
*/
- QColor backgroundColor() const;
+ TQColor backgroundColor() const;
/**
* Sets the state of the checkbox indicating whether the font size
@@ -177,19 +177,19 @@ public:
* NOTE: If parameter sizeIsRelative was not set in the constructor
* of the widget this setting will be ignored.
*/
- void setSizeIsRelative( QButton::ToggleState relative );
+ void setSizeIsRelative( TQButton::ToggleState relative );
/**
* @return Whether the font size is to be interpreted as relative size
- * (default: QButton:Off)
+ * (default: TQButton:Off)
*/
- QButton::ToggleState sizeIsRelative() const;
+ TQButton::ToggleState sizeIsRelative() const;
/**
* @return The current text in the sample text input area.
*/
- QString sampleText() const { return sampleEdit->text(); }
+ TQString sampleText() const { return sampleEdit->text(); }
/**
* Sets the sample text.
@@ -201,7 +201,7 @@ public:
*
* @param text The new sample text. The current will be removed.
*/
- void setSampleText( const QString &text )
+ void setSampleText( const TQString &text )
{
sampleEdit->setText( text );
}
@@ -218,13 +218,13 @@ public:
}
/**
- * Converts a QFont into the corresponding X Logical Font
+ * Converts a TQFont into the corresponding X Logical Font
* Description (XLFD).
*
* @param theFont The font to convert.
* @return A string representing the given font in XLFD format.
*/
- static QString getXLFD( const QFont &theFont )
+ static TQString getXLFD( const TQFont &theFont )
{ return theFont.rawName(); }
/**
@@ -247,61 +247,61 @@ public:
* @param fontListCriteria should contain all the restrictions for font selection as OR-ed values
* @see KFontChooser::FontListCriteria for the individual values
*/
- static void getFontList( QStringList &list, uint fontListCriteria);
+ static void getFontList( TQStringList &list, uint fontListCriteria);
/**
* Reimplemented for internal reasons.
*/
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
signals:
/**
* Emitted whenever the selected font changes.
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
private slots:
void toggled_checkbox();
- void family_chosen_slot(const QString&);
- void size_chosen_slot(const QString&);
- void style_chosen_slot(const QString&);
- void displaySample(const QFont &font);
+ void family_chosen_slot(const TQString&);
+ void size_chosen_slot(const TQString&);
+ void style_chosen_slot(const TQString&);
+ void displaySample(const TQFont &font);
void showXLFDArea(bool);
void size_value_slot(int);
private:
void fillFamilyListBox(bool onlyFixedFonts = false);
void fillSizeList();
- // This one must be static since getFontList( QStringList, char*) is so
- static void addFont( QStringList &list, const char *xfont );
+ // This one must be static since getFontList( TQStringList, char*) is so
+ static void addFont( TQStringList &list, const char *xfont );
void setupDisplay();
// pointer to an optinally supplied list of fonts to
// inserted into the fontdialog font-family combo-box
- QStringList fontList;
+ TQStringList fontList;
KIntNumInput *sizeOfFont;
- QLineEdit *sampleEdit;
- QLineEdit *xlfdEdit;
+ TQLineEdit *sampleEdit;
+ TQLineEdit *xlfdEdit;
- QLabel *familyLabel;
- QLabel *styleLabel;
- QCheckBox *familyCheckbox;
- QCheckBox *styleCheckbox;
- QCheckBox *sizeCheckbox;
- QLabel *sizeLabel;
+ TQLabel *familyLabel;
+ TQLabel *styleLabel;
+ TQCheckBox *familyCheckbox;
+ TQCheckBox *styleCheckbox;
+ TQCheckBox *sizeCheckbox;
+ TQLabel *sizeLabel;
KListBox *familyListBox;
KListBox *styleListBox;
KListBox *sizeListBox;
- QComboBox *charsetsCombo; // BIC: remove in KDE4
- QCheckBox *sizeIsRelativeCheckBox;
+ TQComboBox *charsetsCombo; // BIC: remove in KDE4
+ TQCheckBox *sizeIsRelativeCheckBox;
- QFont selFont;
+ TQFont selFont;
- QString selectedStyle;
+ TQString selectedStyle;
int selectedSize;
- QMap<QString, QString> currentStyles;
+ TQMap<TQString, TQString> currentStyles;
bool usingFixed;
@@ -325,7 +325,7 @@ private:
* Example:
*
* \code
- * QFont myFont;
+ * TQFont myFont;
* int result = KFontDialog::getFont( myFont );
* if ( result == KFontDialog::Accepted )
* ...
@@ -362,11 +362,11 @@ public:
* calling sizeIsRelative().
*
*/
- KFontDialog( QWidget *parent = 0L, const char *name = 0,
+ KFontDialog( TQWidget *parent = 0L, const char *name = 0,
bool onlyFixed = false, bool modal = false,
- const QStringList &fontlist = QStringList(),
+ const TQStringList &fontlist = TQStringList(),
bool makeFrame = true, bool diff = false,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Sets the currently selected font in the dialog.
@@ -375,13 +375,13 @@ public:
* @param onlyFixed readjust the font list to display only fixed
* width fonts if true, or vice-versa
*/
- void setFont( const QFont &font, bool onlyFixed = false )
+ void setFont( const TQFont &font, bool onlyFixed = false )
{ chooser->setFont(font, onlyFixed); }
/**
* @return The currently selected font in the dialog.
*/
- QFont font() const { return chooser->font(); }
+ TQFont font() const { return chooser->font(); }
/**
* Sets the state of the checkbox indicating whether the font size
@@ -389,14 +389,14 @@ public:
* NOTE: If parameter sizeIsRelative was not set in the constructor
* of the dialog this setting will be ignored.
*/
- void setSizeIsRelative( QButton::ToggleState relative )
+ void setSizeIsRelative( TQButton::ToggleState relative )
{ chooser->setSizeIsRelative( relative ); }
/**
* @return Whether the font size is to be interpreted as relative size
* (default: false)
*/
- QButton::ToggleState sizeIsRelative() const
+ TQButton::ToggleState sizeIsRelative() const
{ return chooser->sizeIsRelative(); }
/**
@@ -416,11 +416,11 @@ public:
* *sizeIsRelativeState and user choice will be returned
* therein.
*
- * @return QDialog::result().
+ * @return TQDialog::result().
*/
- static int getFont( QFont &theFont, bool onlyFixed = false,
- QWidget *parent = 0L, bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ static int getFont( TQFont &theFont, bool onlyFixed = false,
+ TQWidget *parent = 0L, bool makeFrame = true,
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Creates a modal font difference dialog, lets the user choose a selection
@@ -452,11 +452,11 @@ public:
* *sizeIsRelativeState and user choice will be returned
* therein.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed = false,
- QWidget *parent = 0L, bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ static int getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed = false,
+ TQWidget *parent = 0L, bool makeFrame = true,
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* When you are not only interested in the font selected, but also
@@ -477,10 +477,10 @@ public:
* therein.
* @return The result of the dialog.
*/
- static int getFontAndText( QFont &theFont, QString &theString,
- bool onlyFixed = false, QWidget *parent = 0L,
+ static int getFontAndText( TQFont &theFont, TQString &theString,
+ bool onlyFixed = false, TQWidget *parent = 0L,
bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
signals:
/**
@@ -488,7 +488,7 @@ signals:
* Connect to this to monitor the font as it is selected if you are
* not running modal.
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
protected:
KFontChooser *chooser;
diff --git a/kdeui/kfontrequester.cpp b/kdeui/kfontrequester.cpp
index d32b9d9d7..293f9d546 100644
--- a/kdeui/kfontrequester.cpp
+++ b/kdeui/kfontrequester.cpp
@@ -19,37 +19,37 @@
#include "kfontrequester.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kfontdialog.h>
#include <klocale.h>
-KFontRequester::KFontRequester( QWidget *parent, const char *name,
- bool onlyFixed ) : QWidget( parent, name ),
+KFontRequester::KFontRequester( TQWidget *parent, const char *name,
+ bool onlyFixed ) : TQWidget( parent, name ),
m_onlyFixed( onlyFixed )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
- m_sampleLabel = new QLabel( this, "m_sampleLabel" );
- m_button = new QPushButton( i18n( "Choose..." ), this, "m_button" );
+ m_sampleLabel = new TQLabel( this, "m_sampleLabel" );
+ m_button = new TQPushButton( i18n( "Choose..." ), this, "m_button" );
- m_sampleLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ m_sampleLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
setFocusProxy( m_button );
layout->addWidget( m_sampleLabel, 1 );
layout->addWidget( m_button );
- connect( m_button, SIGNAL( clicked() ), SLOT( buttonClicked() ) );
+ connect( m_button, TQT_SIGNAL( clicked() ), TQT_SLOT( buttonClicked() ) );
displaySampleText();
setToolTip();
}
-void KFontRequester::setFont( const QFont &font, bool onlyFixed )
+void KFontRequester::setFont( const TQFont &font, bool onlyFixed )
{
m_selFont = font;
m_onlyFixed = onlyFixed;
@@ -58,13 +58,13 @@ void KFontRequester::setFont( const QFont &font, bool onlyFixed )
emit fontSelected( m_selFont );
}
-void KFontRequester::setSampleText( const QString &text )
+void KFontRequester::setSampleText( const TQString &text )
{
m_sampleText = text;
displaySampleText();
}
-void KFontRequester::setTitle( const QString &title )
+void KFontRequester::setTitle( const TQString &title )
{
m_title = title;
setToolTip();
@@ -90,7 +90,7 @@ void KFontRequester::displaySampleText()
size = m_selFont.pixelSize();
if ( m_sampleText.isEmpty() )
- m_sampleLabel->setText( QString( "%1 %2" ).arg( m_selFont.family() )
+ m_sampleLabel->setText( TQString( "%1 %2" ).arg( m_selFont.family() )
.arg( size ) );
else
m_sampleLabel->setText( m_sampleText );
@@ -98,24 +98,24 @@ void KFontRequester::displaySampleText()
void KFontRequester::setToolTip()
{
- QToolTip::remove( m_button );
- QToolTip::add( m_button, i18n( "Click to select a font" ) );
+ TQToolTip::remove( m_button );
+ TQToolTip::add( m_button, i18n( "Click to select a font" ) );
- QToolTip::remove( m_sampleLabel );
- QWhatsThis::remove( m_sampleLabel );
+ TQToolTip::remove( m_sampleLabel );
+ TQWhatsThis::remove( m_sampleLabel );
if ( m_title.isNull() )
{
- QToolTip::add( m_sampleLabel, i18n( "Preview of the selected font" ) );
- QWhatsThis::add( m_sampleLabel,
+ TQToolTip::add( m_sampleLabel, i18n( "Preview of the selected font" ) );
+ TQWhatsThis::add( m_sampleLabel,
i18n( "This is a preview of the selected font. You can change it"
" by clicking the \"Choose...\" button." ) );
}
else
{
- QToolTip::add( m_sampleLabel,
+ TQToolTip::add( m_sampleLabel,
i18n( "Preview of the \"%1\" font" ).arg( m_title ) );
- QWhatsThis::add( m_sampleLabel,
+ TQWhatsThis::add( m_sampleLabel,
i18n( "This is a preview of the \"%1\" font. You can change it"
" by clicking the \"Choose...\" button." ).arg( m_title ) );
}
diff --git a/kdeui/kfontrequester.h b/kdeui/kfontrequester.h
index 8435355c5..3773a9bc1 100644
--- a/kdeui/kfontrequester.h
+++ b/kdeui/kfontrequester.h
@@ -20,9 +20,9 @@
#ifndef KFONTREQUESTER_H
#define KFONTREQUESTER_H
-#include <qwidget.h>
-#include <qfont.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqfont.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -45,9 +45,9 @@ class KDEUI_EXPORT KFontRequester : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString title READ title WRITE setTitle )
- Q_PROPERTY( QString sampleText READ sampleText WRITE setSampleText )
- Q_PROPERTY( QFont font READ font WRITE setFont )
+ Q_PROPERTY( TQString title READ title WRITE setTitle )
+ Q_PROPERTY( TQString sampleText READ sampleText WRITE setSampleText )
+ Q_PROPERTY( TQFont font READ font WRITE setFont )
public:
@@ -59,13 +59,13 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* @param onlyFixed Only display fonts which have fixed-width character
* sizes.
*/
- KFontRequester( QWidget *parent=0L, const char *name=0L,
+ KFontRequester( TQWidget *parent=0L, const char *name=0L,
bool onlyFixed=false );
/**
* @return The currently selected font in the requester.
*/
- QFont font() const { return m_selFont; }
+ TQFont font() const { return m_selFont; }
/**
* @return Returns true if only fixed fonts are displayed.
@@ -75,22 +75,22 @@ class KDEUI_EXPORT KFontRequester : public QWidget
/**
* @return The current text in the sample text input area.
*/
- QString sampleText() const { return m_sampleText; }
+ TQString sampleText() const { return m_sampleText; }
/**
* @return The current title of the widget.
*/
- QString title() const { return m_title; }
+ TQString title() const { return m_title; }
/**
* @return Pointer to the label used for preview.
*/
- QLabel *label() const { return m_sampleLabel; }
+ TQLabel *label() const { return m_sampleLabel; }
/**
* @return Pointer to the pushbutton in the widget.
*/
- QPushButton *button() const { return m_button; }
+ TQPushButton *button() const { return m_button; }
/**
* Sets the currently selected font in the requester.
@@ -99,7 +99,7 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* @param onlyFixed Display only fixed-width fonts in the font dialog
* if @p true, or vice-versa.
*/
- virtual void setFont( const QFont &font, bool onlyFixed=false );
+ virtual void setFont( const TQFont &font, bool onlyFixed=false );
/**
* Sets the sample text.
@@ -108,11 +108,11 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* text, but it can be better to do this if the default text is
* too large for the edit area when using the default font of your
* application. Default text is current font name and size. Setting
- * the text to QString::null will restore the default.
+ * the text to TQString::null will restore the default.
*
* @param text The new sample text. The current will be removed.
*/
- virtual void setSampleText( const QString &text );
+ virtual void setSampleText( const TQString &text );
/**
* Set the title for the widget that will be used in the tooltip and
@@ -120,13 +120,13 @@ class KDEUI_EXPORT KFontRequester : public QWidget
*
* @param title The title to be set.
*/
- virtual void setTitle( const QString & title );
+ virtual void setTitle( const TQString & title );
signals:
/**
* Emitted when a new @p font has been selected in the underlying dialog
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
protected:
@@ -140,10 +140,10 @@ class KDEUI_EXPORT KFontRequester : public QWidget
protected:
bool m_onlyFixed;
- QString m_sampleText, m_title;
- QLabel *m_sampleLabel;
- QPushButton *m_button;
- QFont m_selFont;
+ TQString m_sampleText, m_title;
+ TQLabel *m_sampleLabel;
+ TQPushButton *m_button;
+ TQFont m_selFont;
private:
diff --git a/kdeui/kguiitem.cpp b/kdeui/kguiitem.cpp
index 35093019e..7b73c7401 100644
--- a/kdeui/kguiitem.cpp
+++ b/kdeui/kguiitem.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <assert.h>
#include <kiconloader.h>
@@ -57,12 +57,12 @@ public:
return *this;
}
- QString m_text;
- QString m_toolTip;
- QString m_whatsThis;
- QString m_statusText;
- QString m_iconName;
- QIconSet m_iconSet;
+ TQString m_text;
+ TQString m_toolTip;
+ TQString m_whatsThis;
+ TQString m_statusText;
+ TQString m_iconName;
+ TQIconSet m_iconSet;
bool m_hasIcon : 1;
bool m_enabled : 1;
};
@@ -72,8 +72,8 @@ KGuiItem::KGuiItem() {
d = new KGuiItemPrivate;
}
-KGuiItem::KGuiItem( const QString &text, const QString &iconName,
- const QString &toolTip, const QString &whatsThis )
+KGuiItem::KGuiItem( const TQString &text, const TQString &iconName,
+ const TQString &toolTip, const TQString &whatsThis )
{
d = new KGuiItemPrivate;
d->m_text = text;
@@ -82,8 +82,8 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName,
setIconName( iconName );
}
-KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet,
- const QString &toolTip, const QString &whatsThis )
+KGuiItem::KGuiItem( const TQString &text, const TQIconSet &iconSet,
+ const TQString &toolTip, const TQString &whatsThis )
{
d = new KGuiItemPrivate;
d->m_text = text;
@@ -116,13 +116,13 @@ KGuiItem::~KGuiItem()
delete d;
}
-QString KGuiItem::text() const
+TQString KGuiItem::text() const
{
return d->m_text;
}
-QString KGuiItem::plainText() const
+TQString KGuiItem::plainText() const
{
const int len = d->m_text.length();
@@ -130,12 +130,12 @@ QString KGuiItem::plainText() const
return d->m_text;
//Can assume len >= 1 from now on.
- QString stripped;
+ TQString stripped;
int resultLength = 0;
stripped.setLength(len);
- const QChar* data = d->m_text.unicode();
+ const TQChar* data = d->m_text.unicode();
for ( int pos = 0; pos < len; ++pos )
{
if ( data[ pos ] != '&' )
@@ -149,7 +149,7 @@ QString KGuiItem::plainText() const
return stripped;
}
-QIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance ) const
+TQIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance ) const
{
if( d->m_hasIcon )
{
@@ -164,20 +164,20 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance )
}
}
else
- return QIconSet();
+ return TQIconSet();
}
-QString KGuiItem::iconName() const
+TQString KGuiItem::iconName() const
{
return d->m_iconName;
}
-QString KGuiItem::toolTip() const
+TQString KGuiItem::toolTip() const
{
return d->m_toolTip;
}
-QString KGuiItem::whatsThis() const
+TQString KGuiItem::whatsThis() const
{
return d->m_whatsThis;
}
@@ -192,30 +192,30 @@ bool KGuiItem::hasIcon() const
return d->m_hasIcon;
}
-void KGuiItem::setText( const QString &text ) {
+void KGuiItem::setText( const TQString &text ) {
d->m_text=text;
}
-void KGuiItem::setIconSet( const QIconSet &iconset )
+void KGuiItem::setIconSet( const TQIconSet &iconset )
{
d->m_iconSet = iconset;
- d->m_iconName = QString::null;
+ d->m_iconName = TQString::null;
d->m_hasIcon = !iconset.isNull();
}
-void KGuiItem::setIconName( const QString &iconName )
+void KGuiItem::setIconName( const TQString &iconName )
{
d->m_iconName = iconName;
- d->m_iconSet = QIconSet();
+ d->m_iconSet = TQIconSet();
d->m_hasIcon = !iconName.isEmpty();
}
-void KGuiItem::setToolTip( const QString &toolTip )
+void KGuiItem::setToolTip( const TQString &toolTip )
{
d->m_toolTip = toolTip;
}
-void KGuiItem::setWhatsThis( const QString &whatsThis )
+void KGuiItem::setWhatsThis( const TQString &whatsThis )
{
d->m_whatsThis = whatsThis;
}
diff --git a/kdeui/kguiitem.h b/kdeui/kguiitem.h
index b1c9c1674..d5946b0d3 100644
--- a/kdeui/kguiitem.h
+++ b/kdeui/kguiitem.h
@@ -22,10 +22,10 @@
#ifndef __kguiitem_h__
#define __kguiitem_h__
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include <kicontheme.h>
#include <kglobal.h>
@@ -44,32 +44,32 @@ public:
// subtle bugs otherwise - the icon name, tooltip and whatsthis text
// get changed behind your back if you do 'setButtonFoo( "Bar" );'
// It gives the wrong impression that you just change the text.
- KGuiItem( const QString &text,
- const QString &iconName = QString::null,
- const QString &toolTip = QString::null,
- const QString &whatsThis = QString::null );
+ KGuiItem( const TQString &text,
+ const TQString &iconName = TQString::null,
+ const TQString &toolTip = TQString::null,
+ const TQString &whatsThis = TQString::null );
- KGuiItem( const QString &text, const QIconSet &iconSet,
- const QString &toolTip = QString::null,
- const QString &whatsThis = QString::null );
+ KGuiItem( const TQString &text, const TQIconSet &iconSet,
+ const TQString &toolTip = TQString::null,
+ const TQString &whatsThis = TQString::null );
KGuiItem( const KGuiItem &rhs );
KGuiItem &operator=( const KGuiItem &rhs );
~KGuiItem();
- QString text() const;
- QString plainText() const;
+ TQString text() const;
+ TQString plainText() const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const;
- QIconSet iconSet() const { return iconSet( KIcon::Small ); }
+ TQIconSet iconSet( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const;
+ TQIconSet iconSet() const { return iconSet( KIcon::Small ); }
#else
- QIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::instance()) const;
+ TQIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::instance()) const;
#endif
- QString iconName() const;
- QString toolTip() const;
- QString whatsThis() const;
+ TQString iconName() const;
+ TQString toolTip() const;
+ TQString whatsThis() const;
bool isEnabled() const;
/**
* returns whether an icon is defined, doesn't tell if it really exists
@@ -79,11 +79,11 @@ public:
bool hasIconSet() const { return hasIcon(); }
#endif
- void setText( const QString &text );
- void setIconSet( const QIconSet &iconset );
- void setIconName( const QString &iconName );
- void setToolTip( const QString &tooltip );
- void setWhatsThis( const QString &whatsThis );
+ void setText( const TQString &text );
+ void setIconSet( const TQIconSet &iconset );
+ void setIconName( const TQString &iconName );
+ void setToolTip( const TQString &tooltip );
+ void setWhatsThis( const TQString &whatsThis );
void setEnabled( bool enable );
private:
diff --git a/kdeui/khelpmenu.cpp b/kdeui/khelpmenu.cpp
index 15ee9f58e..c6557f044 100644
--- a/kdeui/khelpmenu.cpp
+++ b/kdeui/khelpmenu.cpp
@@ -20,12 +20,12 @@
*/
// I (espen) prefer that header files are included alphabetically
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
#include <kaboutapplication.h>
#include <kaboutdata.h>
@@ -62,9 +62,9 @@ public:
KSwitchLanguageDialog *mSwitchApplicationLanguage;
};
-KHelpMenu::KHelpMenu( QWidget *parent, const QString &aboutAppText,
+KHelpMenu::KHelpMenu( TQWidget *parent, const TQString &aboutAppText,
bool showWhatsThis )
- : QObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
+ : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
d(new KHelpMenuPrivate)
{
mParent = parent;
@@ -73,9 +73,9 @@ KHelpMenu::KHelpMenu( QWidget *parent, const QString &aboutAppText,
d->mAboutData = 0;
}
-KHelpMenu::KHelpMenu( QWidget *parent, const KAboutData *aboutData,
+KHelpMenu::KHelpMenu( TQWidget *parent, const KAboutData *aboutData,
bool showWhatsThis, KActionCollection *actions )
- : QObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
+ : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
d(new KHelpMenuPrivate)
{
mParent = parent;
@@ -84,17 +84,17 @@ KHelpMenu::KHelpMenu( QWidget *parent, const KAboutData *aboutData,
d->mAboutData = aboutData;
if (!aboutData)
- mAboutAppText = QString::null;
+ mAboutAppText = TQString::null;
if (actions)
{
- KStdAction::helpContents(this, SLOT(appHelpActivated()), actions);
+ KStdAction::helpContents(this, TQT_SLOT(appHelpActivated()), actions);
if (showWhatsThis)
- KStdAction::whatsThis(this, SLOT(contextHelpActivated()), actions);
- KStdAction::reportBug(this, SLOT(reportBug()), actions);
- KStdAction::aboutApp(this, SLOT(aboutApplication()), actions);
- KStdAction::aboutKDE(this, SLOT(aboutKDE()), actions);
- KStdAction::switchApplicationLanguage(this, SLOT(switchApplicationLanguage()), actions);
+ KStdAction::whatsThis(this, TQT_SLOT(contextHelpActivated()), actions);
+ KStdAction::reportBug(this, TQT_SLOT(reportBug()), actions);
+ KStdAction::aboutApp(this, TQT_SLOT(aboutApplication()), actions);
+ KStdAction::aboutKDE(this, TQT_SLOT(aboutKDE()), actions);
+ KStdAction::switchApplicationLanguage(this, TQT_SLOT(switchApplicationLanguage()), actions);
}
}
@@ -118,26 +118,26 @@ KPopupMenu* KHelpMenu::menu()
// compatible.
//
const KAboutData *aboutData = d->mAboutData ? d->mAboutData : KGlobal::instance()->aboutData();
- QString appName = (aboutData)? aboutData->programName() : QString::fromLatin1(qApp->name());
+ TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(qApp->name());
mMenu = new KPopupMenu();
- connect( mMenu, SIGNAL(destroyed()), this, SLOT(menuDestroyed()));
+ connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed()));
bool need_separator = false;
if (kapp->authorizeKAction("help_contents"))
{
mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall),
i18n( "%1 &Handbook" ).arg( appName) ,menuHelpContents );
- mMenu->connectItem( menuHelpContents, this, SLOT(appHelpActivated()) );
+ mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) );
mMenu->setAccel( KStdAccel::shortcut(KStdAccel::Help), menuHelpContents );
need_separator = true;
}
if( mShowWhatsThis && kapp->authorizeKAction("help_whats_this") )
{
- QToolButton* wtb = QWhatsThis::whatsThisButton(0);
+ TQToolButton* wtb = TQWhatsThis::whatsThisButton(0);
mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis);
- mMenu->connectItem( menuWhatsThis, this, SLOT(contextHelpActivated()) );
+ mMenu->connectItem( menuWhatsThis, this, TQT_SLOT(contextHelpActivated()) );
delete wtb;
mMenu->setAccel( SHIFT + Key_F1, menuWhatsThis );
need_separator = true;
@@ -148,7 +148,7 @@ KPopupMenu* KHelpMenu::menu()
if (need_separator)
mMenu->insertSeparator();
mMenu->insertItem( i18n( "&Report Bug..." ), menuReportBug );
- mMenu->connectItem( menuReportBug, this, SLOT(reportBug()) );
+ mMenu->connectItem( menuReportBug, this, TQT_SLOT(reportBug()) );
need_separator = true;
}
@@ -157,7 +157,7 @@ KPopupMenu* KHelpMenu::menu()
if (need_separator)
mMenu->insertSeparator();
mMenu->insertItem( i18n( "Switch application &language..." ), menuSwitchLanguage );
- mMenu->connectItem( menuSwitchLanguage, this, SLOT(switchApplicationLanguage()) );
+ mMenu->connectItem( menuSwitchLanguage, this, TQT_SLOT(switchApplicationLanguage()) );
need_separator = true;
}
@@ -168,13 +168,13 @@ KPopupMenu* KHelpMenu::menu()
{
mMenu->insertItem( kapp->miniIcon(),
i18n( "&About %1" ).arg(appName), menuAboutApp );
- mMenu->connectItem( menuAboutApp, this, SLOT( aboutApplication() ) );
+ mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) );
}
if (kapp->authorizeKAction("help_about_kde"))
{
mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE );
- mMenu->connectItem( menuAboutKDE, this, SLOT( aboutKDE() ) );
+ mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) );
}
}
@@ -196,7 +196,7 @@ void KHelpMenu::aboutApplication()
if( !mAboutApp )
{
mAboutApp = new KAboutApplication( d->mAboutData, mParent, "about", false );
- connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
mAboutApp->show();
}
@@ -208,20 +208,20 @@ void KHelpMenu::aboutApplication()
{
if( !mAboutApp )
{
- mAboutApp = new KDialogBase( QString::null, // Caption is defined below
+ mAboutApp = new KDialogBase( TQString::null, // Caption is defined below
KDialogBase::Yes, KDialogBase::Yes,
KDialogBase::Yes, mParent, "about",
false, true, KStdGuiItem::ok() );
- connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
- QHBox *hbox = new QHBox( mAboutApp );
+ TQHBox *hbox = new TQHBox( mAboutApp );
mAboutApp->setMainWidget( hbox );
hbox->setSpacing(KDialog::spacingHint()*3);
hbox->setMargin(KDialog::marginHint()*1);
- QLabel *label1 = new QLabel(hbox);
+ TQLabel *label1 = new TQLabel(hbox);
label1->setPixmap( kapp->icon() );
- QLabel *label2 = new QLabel(hbox);
+ TQLabel *label2 = new TQLabel(hbox);
label2->setText( mAboutAppText );
mAboutApp->setPlainCaption( i18n("About %1").arg(kapp->caption()) );
@@ -238,7 +238,7 @@ void KHelpMenu::aboutKDE()
if( !mAboutKDE )
{
mAboutKDE = new KAboutKDE( mParent, "aboutkde", false );
- connect( mAboutKDE, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutKDE, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
mAboutKDE->show();
}
@@ -249,7 +249,7 @@ void KHelpMenu::reportBug()
if( !mBugReport )
{
mBugReport = new KBugReport( mParent, false, d->mAboutData );
- connect( mBugReport, SIGNAL(finished()),this,SLOT( dialogFinished()) );
+ connect( mBugReport, TQT_SIGNAL(finished()),this,TQT_SLOT( dialogFinished()) );
}
mBugReport->show();
}
@@ -259,7 +259,7 @@ void KHelpMenu::switchApplicationLanguage()
if ( !d->mSwitchApplicationLanguage )
{
d->mSwitchApplicationLanguage = new KSwitchLanguageDialog( mParent, "switchlanguagedialog", false );
- connect( d->mSwitchApplicationLanguage, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( d->mSwitchApplicationLanguage, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
d->mSwitchApplicationLanguage->show();
}
@@ -267,7 +267,7 @@ void KHelpMenu::switchApplicationLanguage()
void KHelpMenu::dialogFinished()
{
- QTimer::singleShot( 0, this, SLOT(timerExpired()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(timerExpired()) );
}
@@ -303,8 +303,8 @@ void KHelpMenu::menuDestroyed()
void KHelpMenu::contextHelpActivated()
{
- QWhatsThis::enterWhatsThisMode();
- QWidget* w = QApplication::widgetAt( QCursor::pos(), true );
+ TQWhatsThis::enterWhatsThisMode();
+ TQWidget* w = TQApplication::widgetAt( TQCursor::pos(), true );
while ( w && !w->isTopLevel() && !w->inherits("QXEmbed") )
w = w->parentWidget();
#ifdef Q_WS_X11
diff --git a/kdeui/khelpmenu.h b/kdeui/khelpmenu.h
index 052f7e394..397ac129c 100644
--- a/kdeui/khelpmenu.h
+++ b/kdeui/khelpmenu.h
@@ -22,8 +22,8 @@
#ifndef _KHELPMENU_H_
#define _KHELPMENU_H_
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -60,7 +60,7 @@ class KHelpMenuPrivate;
*
* \code
* mHelpMenu = new KHelpMenu( this, <someText> );
- * connect( this, SIGNAL(someSignal()), mHelpMenu,SLOT(mHelpMenu->aboutKDE()));
+ * connect( this, TQT_SIGNAL(someSignal()), mHelpMenu,TQT_SLOT(mHelpMenu->aboutKDE()));
* \endcode
*
* IMPORTANT:
@@ -97,8 +97,8 @@ class KHelpMenuPrivate;
* {
* ..
* KHelpMenu *helpMenu = new KHelpMenu( this );
- * connect( helpMenu, SIGNAL(showAboutApplication()),
- * this, SLOT(myDialogSlot()));
+ * connect( helpMenu, TQT_SIGNAL(showAboutApplication()),
+ * this, TQT_SLOT(myDialogSlot()));
* ..
* }
*
@@ -116,7 +116,7 @@ class KHelpMenuPrivate;
* {
* KHelpMenu *helpMenu = new KHelpMenu( this );
* KPopupMenu *help = mHelpMenu->menu();
- * help->connectItem( KHelpMenu::menuAboutApp, this, SLOT(myDialogSlot()) );
+ * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) );
* }
*
* void MyClass::myDialogSlot()
@@ -156,7 +156,7 @@ class KDEUI_EXPORT KHelpMenu : public QObject
* added to the dialog.
*
*/
- KHelpMenu( QWidget *parent=0, const QString &aboutAppText=QString::null,
+ KHelpMenu( TQWidget *parent=0, const TQString &aboutAppText=TQString::null,
bool showWhatsThis=true );
/**
@@ -175,7 +175,7 @@ class KDEUI_EXPORT KHelpMenu : public QObject
* standard actions.
*
*/
- KHelpMenu( QWidget *parent, const KAboutData *aboutData,
+ KHelpMenu( TQWidget *parent, const KAboutData *aboutData,
bool showWhatsThis=true, KActionCollection *actions = 0 );
/**
@@ -266,8 +266,8 @@ class KDEUI_EXPORT KHelpMenu : public QObject
KAboutKDE *mAboutKDE;
KBugReport *mBugReport;
- QString mAboutAppText;
- QWidget *mParent;
+ TQString mAboutAppText;
+ TQWidget *mParent;
bool mShowWhatsThis;
diff --git a/kdeui/kiconview.cpp b/kdeui/kiconview.cpp
index 77756030b..98d608fba 100644
--- a/kdeui/kiconview.cpp
+++ b/kdeui/kiconview.cpp
@@ -18,10 +18,10 @@
#include "config.h"
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpixmapcache.h>
-#include <qcleanuphandler.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpixmapcache.h>
+#include <tqcleanuphandler.h>
#include "kiconview.h"
#include "kwordwrap.h"
@@ -48,36 +48,36 @@ public:
}
KIconView::Mode mode;
bool doAutoSelect;
- QFontMetrics *fm;
- QPixmapCache maskCache;
+ TQFontMetrics *fm;
+ TQPixmapCache maskCache;
int textHeight;
- QIconViewItem *dragHoldItem;
- QTimer dragHoldTimer;
- QTimer doubleClickIgnoreTimer;
+ TQIconViewItem *dragHoldItem;
+ TQTimer dragHoldTimer;
+ TQTimer doubleClickIgnoreTimer;
};
-KIconView::KIconView( QWidget *parent, const char *name, WFlags f )
- : QIconView( parent, name, f )
+KIconView::KIconView( TQWidget *parent, const char *name, WFlags f )
+ : TQIconView( parent, name, f )
{
d = new KIconViewPrivate;
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- this, SLOT( slotOnItem( QIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQIconViewItem * ) ) );
slotSettingsChanged( KApplication::SETTINGS_MOUSE );
if ( kapp ) { // maybe null when used inside designer
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
m_pCurrentItem = 0L;
- m_pAutoSelect = new QTimer( this );
- connect( m_pAutoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
+ m_pAutoSelect = new TQTimer( this );
+ connect( m_pAutoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
- connect( &d->dragHoldTimer, SIGNAL(timeout()), this, SLOT(slotDragHoldTimeout()) );
+ connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) );
}
KIconView::~KIconView()
@@ -97,7 +97,7 @@ KIconView::Mode KIconView::mode() const
return d->mode;
}
-void KIconView::slotOnItem( QIconViewItem *item )
+void KIconView::slotOnItem( TQIconViewItem *item )
{
if ( item ) {
if ( m_bUseSingle ) {
@@ -128,26 +128,26 @@ void KIconView::slotSettingsChanged(int category)
m_bUseSingle = KGlobalSettings::singleClick();
//kdDebug() << "KIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl;
- disconnect( this, SIGNAL( mouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ) );
-// disconnect( this, SIGNAL( doubleClicked( QIconViewItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QIconViewItem *,
-// const QPoint & ) ) );
+ disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ) );
+// disconnect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQIconViewItem *,
+// const TQPoint & ) ) );
if( m_bUseSingle ) {
- connect( this, SIGNAL( mouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ) );
}
else {
-// connect( this, SIGNAL( doubleClicked( QIconViewItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QIconViewItem *,
-// const QPoint & ) ) );
+// connect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQIconViewItem *,
+// const TQPoint & ) ) );
}
m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
@@ -168,13 +168,13 @@ void KIconView::slotAutoSelect()
setFocus();
ButtonState keybstate = KApplication::keyboardMouseState();
- QIconViewItem* previousItem = currentItem();
+ TQIconViewItem* previousItem = currentItem();
setCurrentItem( m_pCurrentItem );
if( m_pCurrentItem ) {
//Shift pressed?
if( (keybstate & ShiftButton) ) {
- //Temporary implementation of the selection until QIconView supports it
+ //Temporary implementation of the selection until TQIconView supports it
bool block = signalsBlocked();
blockSignals( true );
@@ -188,14 +188,14 @@ void KIconView::slotAutoSelect()
//Calculate the smallest rectangle that contains the current Item
//and the one that got the autoselect event
- QRect r;
- QRect redraw;
+ TQRect r;
+ TQRect redraw;
if ( previousItem )
- r = QRect( QMIN( previousItem->x(), m_pCurrentItem->x() ),
+ r = TQRect( QMIN( previousItem->x(), m_pCurrentItem->x() ),
QMIN( previousItem->y(), m_pCurrentItem->y() ),
0, 0 );
else
- r = QRect( 0, 0, 0, 0 );
+ r = TQRect( 0, 0, 0, 0 );
if ( previousItem->x() < m_pCurrentItem->x() )
r.setWidth( m_pCurrentItem->x() - previousItem->x() + m_pCurrentItem->width() );
else
@@ -208,7 +208,7 @@ void KIconView::slotAutoSelect()
//Check for each item whether it is within the rectangle.
//If yes, select it
- for( QIconViewItem* i = firstItem(); i; i = i->nextItem() ) {
+ for( TQIconViewItem* i = firstItem(); i; i = i->nextItem() ) {
if( i->intersects( r ) ) {
redraw = redraw.unite( i->rect() );
setSelected( i, select, true );
@@ -221,7 +221,7 @@ void KIconView::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QIconView::Single )
+ if( selectionMode() == TQIconView::Single )
emit selectionChanged( m_pCurrentItem );
//setSelected( m_pCurrentItem, true, (keybstate & ControlButton), (keybstate & ShiftButton) );
@@ -235,7 +235,7 @@ void KIconView::slotAutoSelect()
kdDebug() << "KIconView: That's not supposed to happen!!!!" << endl;
}
-void KIconView::emitExecute( QIconViewItem *item, const QPoint &pos )
+void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos )
{
if ( d->mode != Execute )
{
@@ -256,9 +256,9 @@ void KIconView::emitExecute( QIconViewItem *item, const QPoint &pos )
}
}
-void KIconView::updateDragHoldItem( QDropEvent *e )
+void KIconView::updateDragHoldItem( TQDropEvent *e )
{
- QIconViewItem *item = findItem( e->pos() );
+ TQIconViewItem *item = findItem( e->pos() );
if ( d->dragHoldItem != item)
{
@@ -274,21 +274,21 @@ void KIconView::updateDragHoldItem( QDropEvent *e )
}
}
-void KIconView::focusOutEvent( QFocusEvent *fe )
+void KIconView::focusOutEvent( TQFocusEvent *fe )
{
m_pAutoSelect->stop();
- QIconView::focusOutEvent( fe );
+ TQIconView::focusOutEvent( fe );
}
-void KIconView::leaveEvent( QEvent *e )
+void KIconView::leaveEvent( TQEvent *e )
{
m_pAutoSelect->stop();
- QIconView::leaveEvent( e );
+ TQIconView::leaveEvent( e );
}
-void KIconView::contentsMousePressEvent( QMouseEvent *e )
+void KIconView::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
bool block = signalsBlocked();
@@ -299,15 +299,15 @@ void KIconView::contentsMousePressEvent( QMouseEvent *e )
blockSignals( block );
}
- QIconView::contentsMousePressEvent( e );
+ TQIconView::contentsMousePressEvent( e );
d->doAutoSelect = false;
}
-void KIconView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QIconView::contentsMouseDoubleClickEvent( e );
+ TQIconView::contentsMouseDoubleClickEvent( e );
- QIconViewItem* item = findItem( e->pos() );
+ TQIconViewItem* item = findItem( e->pos() );
if( item ) {
if( (e->button() == LeftButton) && !m_bUseSingle )
@@ -318,7 +318,7 @@ void KIconView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
d->doubleClickIgnoreTimer.start(0, true);
}
-void KIconView::slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoint &pos )
+void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos )
{
//kdDebug() << " KIconView::slotMouseButtonClicked() item=" << item << endl;
if( d->doubleClickIgnoreTimer.isActive() )
@@ -328,47 +328,47 @@ void KIconView::slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoi
emitExecute( item, pos );
}
-void KIconView::contentsMouseReleaseEvent( QMouseEvent *e )
+void KIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
d->doAutoSelect = true;
- QIconView::contentsMouseReleaseEvent( e );
+ TQIconView::contentsMouseReleaseEvent( e );
}
-void KIconView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
updateDragHoldItem( e );
- QIconView::contentsDragEnterEvent( e );
+ TQIconView::contentsDragEnterEvent( e );
}
-void KIconView::contentsDragLeaveEvent( QDragLeaveEvent *e )
+void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e )
{
d->dragHoldTimer.stop();
d->dragHoldItem = 0L;
- QIconView::contentsDragLeaveEvent( e );
+ TQIconView::contentsDragLeaveEvent( e );
}
-void KIconView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
updateDragHoldItem( e );
- QIconView::contentsDragMoveEvent( e );
+ TQIconView::contentsDragMoveEvent( e );
}
-void KIconView::contentsDropEvent( QDropEvent* e )
+void KIconView::contentsDropEvent( TQDropEvent* e )
{
d->dragHoldTimer.stop();
- QIconView::contentsDropEvent( e );
+ TQIconView::contentsDropEvent( e );
}
void KIconView::slotDragHoldTimeout()
{
- QIconViewItem *tmp = d->dragHoldItem;
+ TQIconViewItem *tmp = d->dragHoldItem;
d->dragHoldItem = 0L;
emit held( tmp );
}
-void KIconView::takeItem( QIconViewItem * item )
+void KIconView::takeItem( TQIconViewItem * item )
{
if ( item == d->dragHoldItem )
{
@@ -376,7 +376,7 @@ void KIconView::takeItem( QIconViewItem * item )
d->dragHoldItem = 0L;
}
- QIconView::takeItem( item );
+ TQIconView::takeItem( item );
}
void KIconView::cancelPendingHeldSignal()
@@ -385,42 +385,42 @@ void KIconView::cancelPendingHeldSignal()
d->dragHoldItem = 0L;
}
-void KIconView::wheelEvent( QWheelEvent *e )
+void KIconView::wheelEvent( TQWheelEvent *e )
{
- if (horizontalScrollBar() && (arrangement() == QIconView::TopToBottom)) {
- QWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal);
- QApplication::sendEvent( horizontalScrollBar(), &ce);
+ if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) {
+ TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal);
+ TQApplication::sendEvent( horizontalScrollBar(), &ce);
if (ce.isAccepted()) {
e->accept();
return;
}
}
- QIconView::wheelEvent(e);
+ TQIconView::wheelEvent(e);
}
-void KIconView::setFont( const QFont &font )
+void KIconView::setFont( const TQFont &font )
{
delete d->fm;
d->fm = 0L;
- QIconView::setFont( font );
+ TQIconView::setFont( font );
}
-QFontMetrics *KIconView::itemFontMetrics() const
+TQFontMetrics *KIconView::itemFontMetrics() const
{
if (!d->fm) {
- // QIconView creates one too, but we can't access it
- d->fm = new QFontMetrics( font() );
+ // TQIconView creates one too, but we can't access it
+ d->fm = new TQFontMetrics( font() );
}
return d->fm;
}
-QPixmap KIconView::selectedIconPixmap( QPixmap *pix, const QColor &col ) const
+TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const
{
- QPixmap m;
- if ( d->maskCache.find( QString::number( pix->serialNumber() ), m ) )
+ TQPixmap m;
+ if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) )
return m;
m = KPixmapEffect::selectedPixmap( KPixmap(*pix), col );
- d->maskCache.insert( QString::number( pix->serialNumber() ), m );
+ d->maskCache.insert( TQString::number( pix->serialNumber() ), m );
return m;
}
@@ -449,7 +449,7 @@ void KIconView::setIconTextHeight( int n )
struct KIconViewItem::KIconViewItemPrivate
{
- QSize m_pixmapSize;
+ TQSize m_pixmapSize;
};
void KIconViewItem::init()
@@ -465,7 +465,7 @@ KIconViewItem::~KIconViewItem()
delete d;
}
-void KIconViewItem::calcRect( const QString& text_ )
+void KIconViewItem::calcRect( const TQString& text_ )
{
Q_ASSERT( iconView() );
if ( !iconView() )
@@ -481,16 +481,16 @@ void KIconViewItem::calcRect( const QString& text_ )
#endif
//kdDebug() << "KIconViewItem::calcRect - " << text() << endl;
KIconView *view = static_cast<KIconView *>(iconView());
- QRect itemIconRect = pixmapRect();
- QRect itemTextRect = textRect();
- QRect itemRect = rect();
+ TQRect itemIconRect = pixmapRect();
+ TQRect itemTextRect = textRect();
+ TQRect itemRect = rect();
int pw = 0;
int ph = 0;
#ifndef QT_NO_PICTURE
if ( picture() ) {
- QRect br = picture()->boundingRect();
+ TQRect br = picture()->boundingRect();
pw = br.width() + 2;
ph = br.height() + 2;
} else
@@ -516,15 +516,15 @@ void KIconViewItem::calcRect( const QString& text_ )
int tw = 0;
if ( d && !d->m_pixmapSize.isNull() )
- tw = view->maxItemWidth() - ( view->itemTextPos() == QIconView::Bottom ? 0 :
+ tw = view->maxItemWidth() - ( view->itemTextPos() == TQIconView::Bottom ? 0 :
d->m_pixmapSize.width() + 2 );
else
- tw = view->maxItemWidth() - ( view->itemTextPos() == QIconView::Bottom ? 0 :
+ tw = view->maxItemWidth() - ( view->itemTextPos() == TQIconView::Bottom ? 0 :
itemIconRect.width() );
- QFontMetrics *fm = view->itemFontMetrics();
- QString t;
- QRect r;
+ TQFontMetrics *fm = view->itemFontMetrics();
+ TQString t;
+ TQRect r;
// When is text_ set ? Doesn't look like it's ever set.
t = text_.isEmpty() ? text() : text_;
@@ -534,7 +534,7 @@ void KIconViewItem::calcRect( const QString& text_ )
int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF;
// Should not be higher than pixmap if text is alongside icons
- if ( view->itemTextPos() != QIconView::Bottom ) {
+ if ( view->itemTextPos() != TQIconView::Bottom ) {
if ( d && !d->m_pixmapSize.isNull() )
height = QMIN( d->m_pixmapSize.height() + 2, height );
else
@@ -543,7 +543,7 @@ void KIconViewItem::calcRect( const QString& text_ )
}
// Calculate the word-wrap
- QRect outerRect( 0, 0, tw - 6, height );
+ TQRect outerRect( 0, 0, tw - 6, height );
m_wordWrap = KWordWrap::formatText( *fm, outerRect, 0, t );
r = m_wordWrap->boundingRect();
@@ -552,7 +552,7 @@ void KIconViewItem::calcRect( const QString& text_ )
itemTextRect.setHeight( r.height() );
int w = 0; int h = 0; int y = 0;
- if ( view->itemTextPos() == QIconView::Bottom ) {
+ if ( view->itemTextPos() == TQIconView::Bottom ) {
// If the pixmap size has been specified, use it
if ( d && !d->m_pixmapSize.isNull() )
{
@@ -571,11 +571,11 @@ void KIconViewItem::calcRect( const QString& text_ )
itemRect.setWidth( w );
itemRect.setHeight( h );
- int width = QMAX( w, QApplication::globalStrut().width() ); // see QIconViewItem::width()
- int height = QMAX( h, QApplication::globalStrut().height() ); // see QIconViewItem::height()
- itemTextRect = QRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(),
+ int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width()
+ int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height()
+ itemTextRect = TQRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(),
itemTextRect.width(), itemTextRect.height() );
- itemIconRect = QRect( ( width - itemIconRect.width() ) / 2, y,
+ itemIconRect = TQRect( ( width - itemIconRect.width() ) / 2, y,
itemIconRect.width(), itemIconRect.height() );
} else {
// If the pixmap size has been specified, use it
@@ -594,16 +594,16 @@ void KIconViewItem::calcRect( const QString& text_ )
itemRect.setWidth( w );
itemRect.setHeight( h );
- int width = QMAX( w, QApplication::globalStrut().width() ); // see QIconViewItem::width()
- int height = QMAX( h, QApplication::globalStrut().height() ); // see QIconViewItem::height()
+ int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width()
+ int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height()
- itemTextRect = QRect( width - itemTextRect.width(), ( height - itemTextRect.height() ) / 2,
+ itemTextRect = TQRect( width - itemTextRect.width(), ( height - itemTextRect.height() ) / 2,
itemTextRect.width(), itemTextRect.height() );
if ( itemIconRect.height() > itemTextRect.height() ) // icon bigger than text -> center vertically
- itemIconRect = QRect( 0, ( height - itemIconRect.height() ) / 2,
+ itemIconRect = TQRect( 0, ( height - itemIconRect.height() ) / 2,
itemIconRect.width(), itemIconRect.height() );
else // icon smaller than text -> place in top or center with first line
- itemIconRect = QRect( 0, QMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0),
+ itemIconRect = TQRect( 0, QMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0),
itemIconRect.width(), itemIconRect.height() );
if ( ( itemIconRect.height() <= 20 ) && ( itemTextRect.height() < itemIconRect.height() ) )
{
@@ -624,9 +624,9 @@ void KIconViewItem::calcRect( const QString& text_ )
}
-void KIconViewItem::paintItem( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
{
- QIconView* view = iconView();
+ TQIconView* view = iconView();
Q_ASSERT( view );
if ( !view )
return;
@@ -651,16 +651,16 @@ KWordWrap * KIconViewItem::wordWrap()
return m_wordWrap;
}
-void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg )
{
KIconView *kview = static_cast<KIconView *>(iconView());
#ifndef QT_NO_PICTURE
if ( picture() ) {
- QPicture *pic = picture();
+ TQPicture *pic = picture();
if ( isSelected() ) {
// TODO something as nice as selectedIconPixmap if possible ;)
- p->fillRect( pixmapRect( false ), QBrush( cg.highlight(), QBrush::Dense4Pattern) );
+ p->fillRect( pixmapRect( false ), TQBrush( cg.highlight(), TQBrush::Dense4Pattern) );
}
p->drawPicture( x()-pic->boundingRect().x(), y()-pic->boundingRect().y(), *pic );
} else
@@ -669,7 +669,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
int iconX = pixmapRect( false ).x();
int iconY = pixmapRect( false ).y();
- QPixmap *pix = pixmap();
+ TQPixmap *pix = pixmap();
if ( !pix || pix->isNull() )
return;
@@ -680,7 +680,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
if ( d && !d->m_pixmapSize.isNull() )
{
int offset = 0;
- if ( kview->itemTextPos() == QIconView::Bottom )
+ if ( kview->itemTextPos() == TQIconView::Bottom )
offset = d->m_pixmapSize.height() - pix->height();
else
offset = ( d->m_pixmapSize.height() - pix->height() ) / 2;
@@ -689,7 +689,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
}
#endif
if ( isSelected() ) {
- QPixmap selectedPix = kview->selectedIconPixmap( pix, cg.highlight() );
+ TQPixmap selectedPix = kview->selectedIconPixmap( pix, cg.highlight() );
p->drawPixmap( iconX, iconY, selectedPix );
} else {
p->drawPixmap( iconX, iconY, *pix );
@@ -697,32 +697,32 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
}
}
-void KIconViewItem::paintText( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg )
{
int textX = textRect( false ).x() + 4;
int textY = textRect( false ).y();
if ( isSelected() ) {
- p->setBrush(QBrush(cg.highlight()));
- p->setPen(QPen(cg.highlight()));
+ p->setBrush(TQBrush(cg.highlight()));
+ p->setPen(TQPen(cg.highlight()));
p->drawRoundRect( textRect( false ) ,1000/textRect(false).width(),1000/textRect(false).height() );
- p->setPen( QPen( cg.highlightedText() ) );
+ p->setPen( TQPen( cg.highlightedText() ) );
} else {
if ( iconView()->itemTextBackground() != NoBrush )
p->fillRect( textRect( false ), iconView()->itemTextBackground() );
p->setPen( cg.text() );
}
- int align = iconView()->itemTextPos() == QIconView::Bottom ? AlignHCenter : AlignAuto;
+ int align = iconView()->itemTextPos() == TQIconView::Bottom ? AlignHCenter : AlignAuto;
m_wordWrap->drawText( p, textX, textY, align | KWordWrap::Truncate );
}
-QSize KIconViewItem::pixmapSize() const
+TQSize KIconViewItem::pixmapSize() const
{
- return d ? d->m_pixmapSize : QSize( 0, 0 );
+ return d ? d->m_pixmapSize : TQSize( 0, 0 );
}
-void KIconViewItem::setPixmapSize( const QSize& size )
+void KIconViewItem::setPixmapSize( const TQSize& size )
{
if ( !d )
d = new KIconViewItemPrivate;
diff --git a/kdeui/kiconview.h b/kdeui/kiconview.h
index 9228b89d7..0b0c49515 100644
--- a/kdeui/kiconview.h
+++ b/kdeui/kiconview.h
@@ -18,25 +18,25 @@
#ifndef KICONVIEW_H
#define KICONVIEW_H
-#include <qcursor.h>
-#include <qiconview.h>
+#include <tqcursor.h>
+#include <tqiconview.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QIconView that honors KDE's system-wide settings.
+ * @short A variant of TQIconView that honors KDE's system-wide settings.
*
- * This Widget extends the functionality of QIconView to honor the system
+ * This Widget extends the functionality of TQIconView to honor the system
* wide settings for Single Click/Double Click mode, Auto Selection and
* Change Cursor over Link.
*
* There is a new signal executed(). It gets connected to either
- * QIconView::clicked() or QIconView::doubleClicked() depending on the KDE
+ * TQIconView::clicked() or TQIconView::doubleClicked() depending on the KDE
* wide Single Click/Double Click settings. It is strongly recommended that
* you use this signal instead of the above mentioned. This way you don´t
* need to care about the current settings.
* If you want to get informed when the user selects something connect to the
- * QIconView::selectionChanged() signal.
+ * TQIconView::selectionChanged() signal.
*
**/
class KDEUI_EXPORT KIconView : public QIconView
@@ -47,7 +47,7 @@ class KDEUI_EXPORT KIconView : public QIconView
Q_PROPERTY( Mode mode READ mode WRITE setMode )
public:
- KIconView( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~KIconView();
@@ -66,7 +66,7 @@ public:
* @li In Execute mode, the signal executed()
* will be emitted when the user clicks/double-clicks an item.
* @li Select mode is
- * the normal QIconView mode.
+ * the normal TQIconView mode.
*
* Default is Execute.
*/
@@ -80,7 +80,7 @@ public:
/**
* Reimplemented for internal purposes
*/
- virtual void setFont( const QFont & );
+ virtual void setFont( const TQFont & );
/**
* Set the maximum number of lines that will be used to display icon text.
@@ -100,7 +100,7 @@ public:
/**
* Reimplemented for held() signal behavior internal purposes
*/
- virtual void takeItem( QIconViewItem * item );
+ virtual void takeItem( TQIconViewItem * item );
signals:
@@ -110,10 +110,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed iconview item.
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void executed( QIconViewItem *item );
+ void executed( TQIconViewItem *item );
/**
* This signal is emitted whenever the user executes an iconview item.
@@ -122,20 +122,20 @@ signals:
* @param item is the pointer to the executed iconview item.
* @param pos is the position where the user has clicked
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void executed( QIconViewItem *item, const QPoint &pos );
+ void executed( TQIconViewItem *item, const TQPoint &pos );
/**
* This signal is emitted whenever the user hold something on an iconview
* during a drag'n'drop.
* @param item is the pointer to the iconview item the hold event occur.
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void held( QIconViewItem *item );
+ void held( TQIconViewItem *item );
/**
* This signal gets emitted whenever the user double clicks into the
@@ -143,17 +143,17 @@ signals:
* @param item is the pointer to the clicked iconview item.
* @param pos is the position where the user has clicked, and
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*
* This signal is more or less here for the sake of completeness.
* You should normally not need to use this. In most cases it's better
* to use executed() instead.
*/
- void doubleClicked( QIconViewItem *item, const QPoint &pos );
+ void doubleClicked( TQIconViewItem *item, const TQPoint &pos );
protected slots:
- void slotOnItem( QIconViewItem *item );
+ void slotOnItem( TQIconViewItem *item );
void slotOnViewport();
void slotSettingsChanged(int);
@@ -163,48 +163,48 @@ protected slots:
void slotAutoSelect();
protected:
- void emitExecute( QIconViewItem *item, const QPoint &pos );
- void updateDragHoldItem( QDropEvent *e );
-
- virtual void focusOutEvent( QFocusEvent *fe );
- virtual void leaveEvent( QEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e );
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDropEvent( QDropEvent* e );
- virtual void wheelEvent( QWheelEvent *e );
+ void emitExecute( TQIconViewItem *item, const TQPoint &pos );
+ void updateDragHoldItem( TQDropEvent *e );
+
+ virtual void focusOutEvent( TQFocusEvent *fe );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent* e );
+ virtual void wheelEvent( TQWheelEvent *e );
/**
* This method allows to handle correctly cases where a subclass
* needs the held() signal to not be triggered without calling
* a KIconView::contentsDrag*Event() method (which have side effects
- * because they forward to QIconView).
+ * because they forward to TQIconView).
*/
void cancelPendingHeldSignal();
private slots:
- void slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos );
void slotDragHoldTimeout();
private:
/**
* @internal. For use by KIconViewItem.
*/
- QFontMetrics *itemFontMetrics() const;
+ TQFontMetrics *itemFontMetrics() const;
/**
* @internal. For use by KIconViewItem.
*/
- QPixmap selectedIconPixmap( QPixmap *pix, const QColor &col ) const;
+ TQPixmap selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const;
bool m_bUseSingle;
bool m_bChangeCursorOverItem;
- QIconViewItem* m_pCurrentItem;
+ TQIconViewItem* m_pCurrentItem;
- QTimer* m_pAutoSelect;
+ TQTimer* m_pAutoSelect;
int m_autoSelectDelay;
protected:
@@ -216,10 +216,10 @@ private:
class KWordWrap;
/**
- * @short A variant of QIconViewItem that wraps words better.
+ * @short A variant of TQIconViewItem that wraps words better.
*
* KIconViewItem exists to improve the word-wrap functionality of QIconViewItem
- * Use KIconViewItem instead of QIconViewItem for any iconview item you might have :)
+ * Use KIconViewItem instead of TQIconViewItem for any iconview item you might have :)
*
* @author David Faure <david@mandrakesoft.com>
*/
@@ -227,22 +227,22 @@ class KDEUI_EXPORT KIconViewItem : public QIconViewItem
{
public:
// Need to redefine all the constructors - I want Java !
- KIconViewItem( QIconView *parent )
- : QIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :(((
- KIconViewItem( QIconView *parent, QIconViewItem *after )
- : QIconViewItem( parent, after ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text )
- : QIconViewItem( parent, text ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text )
- : QIconViewItem( parent, after, text ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text, const QPixmap &icon )
- : QIconViewItem( parent, text, icon ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon )
- : QIconViewItem( parent, after, text, icon ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text, const QPicture &picture )
- : QIconViewItem( parent, text, picture ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture )
- : QIconViewItem( parent, after, text, picture ) { init(); }
+ KIconViewItem( TQIconView *parent )
+ : TQIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :(((
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after )
+ : TQIconViewItem( parent, after ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text )
+ : TQIconViewItem( parent, text ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text )
+ : TQIconViewItem( parent, after, text ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon )
+ : TQIconViewItem( parent, text, icon ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon )
+ : TQIconViewItem( parent, after, text, icon ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture )
+ : TQIconViewItem( parent, text, picture ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture )
+ : TQIconViewItem( parent, after, text, picture ) { init(); }
virtual ~KIconViewItem();
/**
@@ -256,21 +256,21 @@ public:
*
* @param size The size to use
*/
- void setPixmapSize( const QSize& size );
+ void setPixmapSize( const TQSize& size );
/**
- * @return The size set by setPixmapSize() or QSize( 0, 0 )
+ * @return The size set by setPixmapSize() or TQSize( 0, 0 )
* @since 3.3
*/
- QSize pixmapSize() const;
+ TQSize pixmapSize() const;
protected:
void init();
- virtual void calcRect( const QString& text_ = QString::null );
- virtual void paintItem( QPainter *p, const QColorGroup &c );
+ virtual void calcRect( const TQString& text_ = TQString::null );
+ virtual void paintItem( TQPainter *p, const TQColorGroup &c );
KWordWrap *wordWrap();
- void paintPixmap( QPainter *p, const QColorGroup &c );
- void paintText( QPainter *p, const QColorGroup &c );
+ void paintPixmap( TQPainter *p, const TQColorGroup &c );
+ void paintText( TQPainter *p, const TQColorGroup &c );
private:
KWordWrap* m_wordWrap;
diff --git a/kdeui/kiconviewsearchline.cpp b/kdeui/kiconviewsearchline.cpp
index 3ab31a4d5..701e15428 100644
--- a/kdeui/kiconviewsearchline.cpp
+++ b/kdeui/kiconviewsearchline.cpp
@@ -26,14 +26,14 @@
#include "kiconviewsearchline.h"
-#include <qiconview.h>
+#include <tqiconview.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#define DEFAULT_CASESENSITIVE false
-typedef QValueList <QIconViewItem *> QIconViewItemList;
+typedef TQValueList <TQIconViewItem *> QIconViewItemList;
class KIconViewSearchLine::KIconViewSearchLinePrivate
{
@@ -45,10 +45,10 @@ public:
hiddenListChanged( 0 ),
queuedSearches( 0 ) {}
- QIconView *iconView;
+ TQIconView *iconView;
bool caseSensitive;
bool activeSearch;
- QString search;
+ TQString search;
int queuedSearches;
int hiddenListChanged;
QIconViewItemList hiddenItems;
@@ -57,8 +57,8 @@ public:
/******************************************************************************
* Public Methods *
*****************************************************************************/
-KIconViewSearchLine::KIconViewSearchLine( QWidget *parent,
- QIconView *iconView,
+KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent,
+ TQIconView *iconView,
const char *name ) :
KLineEdit( parent, name )
{
@@ -66,7 +66,7 @@ KIconViewSearchLine::KIconViewSearchLine( QWidget *parent,
init( iconView );
}
-KIconViewSearchLine::KIconViewSearchLine( QWidget *parent, const char *name ) :
+KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, const char *name ) :
KLineEdit( parent, name )
{
d = NULL;
@@ -84,7 +84,7 @@ bool KIconViewSearchLine::caseSensitive() const
return d->caseSensitive;
}
-QIconView *KIconViewSearchLine::iconView() const
+TQIconView *KIconViewSearchLine::iconView() const
{
return d->iconView;
}
@@ -92,7 +92,7 @@ QIconView *KIconViewSearchLine::iconView() const
/******************************************************************************
* Public Slots *
*****************************************************************************/
-void KIconViewSearchLine::updateSearch( const QString &s )
+void KIconViewSearchLine::updateSearch( const TQString &s )
{
long original_count;
int original_hiddenListChanged;
@@ -100,13 +100,13 @@ void KIconViewSearchLine::updateSearch( const QString &s )
if( ! d->iconView )
return; // disabled
- QString search = d->search = s.isNull() ? text() : s;
- QIconViewItem *currentItem = d->iconView->currentItem();
+ TQString search = d->search = s.isNull() ? text() : s;
+ TQIconViewItem *currentItem = d->iconView->currentItem();
- QIconViewItem *item = NULL;
+ TQIconViewItem *item = NULL;
// Remove Non-Matching items, add them them to hidden list
- QIconViewItem *i = d->iconView->firstItem();
+ TQIconViewItem *i = d->iconView->firstItem();
while ( i != NULL ) {
item = i;
i = i->nextItem(); // Point to next, otherwise will loose it.
@@ -143,8 +143,8 @@ void KIconViewSearchLine::updateSearch( const QString &s )
void KIconViewSearchLine::clear()
{
- // Clear hidden list, give items back to QIconView, if it still exists
- QIconViewItem *item = NULL;
+ // Clear hidden list, give items back to TQIconView, if it still exists
+ TQIconViewItem *item = NULL;
QIconViewItemList::iterator it = d->hiddenItems.begin();
while ( it != d->hiddenItems.end() )
{
@@ -168,9 +168,9 @@ void KIconViewSearchLine::clear()
KLineEdit::clear();
}
-void KIconViewSearchLine::iconDeleted(const QString &filename) {
- // Clear hidden list, give items back to QIconView, if it still exists
- QIconViewItem *item = NULL;
+void KIconViewSearchLine::iconDeleted(const TQString &filename) {
+ // Clear hidden list, give items back to TQIconView, if it still exists
+ TQIconViewItem *item = NULL;
QIconViewItemList::iterator it = d->hiddenItems.begin();
while ( it != d->hiddenItems.end() )
{
@@ -193,18 +193,18 @@ void KIconViewSearchLine::setCaseSensitive( bool cs )
d->caseSensitive = cs;
}
-void KIconViewSearchLine::setIconView( QIconView *iv )
+void KIconViewSearchLine::setIconView( TQIconView *iv )
{
if ( d->iconView != NULL )
- disconnect( d->iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ disconnect( d->iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
d->iconView = iv;
if ( iv != NULL )
{
- connect( d->iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ connect( d->iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
setEnabled( true );
}
else
@@ -214,8 +214,8 @@ void KIconViewSearchLine::setIconView( QIconView *iv )
/******************************************************************************
* Protected Methods *
*****************************************************************************/
-bool KIconViewSearchLine::itemMatches( const QIconViewItem *item,
- const QString &s ) const
+bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item,
+ const TQString &s ) const
{
if ( s.isEmpty() )
return true;
@@ -223,31 +223,31 @@ bool KIconViewSearchLine::itemMatches( const QIconViewItem *item,
if ( item == NULL )
return false;
- QString itemtext = item->text();
+ TQString itemtext = item->text();
return ( itemtext.find( s, 0, caseSensitive() ) >= 0 );
}
-void KIconViewSearchLine::init( QIconView *iconView )
+void KIconViewSearchLine::init( TQIconView *iconView )
{
delete d;
d = new KIconViewSearchLinePrivate;
d->iconView = iconView;
- connect( this, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( queueSearch( const QString & ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( queueSearch( const TQString & ) ) );
if ( iconView != NULL )
{
- connect( iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ connect( iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
setEnabled( true );
}
else
setEnabled( false );
}
-void KIconViewSearchLine::hideItem( QIconViewItem *item )
+void KIconViewSearchLine::hideItem( TQIconViewItem *item )
{
if ( ( item == NULL ) || ( d->iconView == NULL ) )
return;
@@ -257,7 +257,7 @@ void KIconViewSearchLine::hideItem( QIconViewItem *item )
d->iconView->takeItem( item );
}
-void KIconViewSearchLine::showItem( QIconViewItem *item )
+void KIconViewSearchLine::showItem( TQIconViewItem *item )
{
if ( d->iconView == NULL )
{
@@ -275,11 +275,11 @@ void KIconViewSearchLine::showItem( QIconViewItem *item )
/******************************************************************************
* Protected Slots *
*****************************************************************************/
-void KIconViewSearchLine::queueSearch( const QString &s )
+void KIconViewSearchLine::queueSearch( const TQString &s )
{
d->queuedSearches++;
d->search = s;
- QTimer::singleShot( 200, this, SLOT( activateSearch() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) );
}
void KIconViewSearchLine::activateSearch()
@@ -292,7 +292,7 @@ void KIconViewSearchLine::activateSearch()
d->queuedSearches = 0;
}
else {
- QTimer::singleShot( 200, this, SLOT( activateSearch() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) );
}
}
diff --git a/kdeui/kiconviewsearchline.h b/kdeui/kiconviewsearchline.h
index 06517f4d4..76df56ee2 100644
--- a/kdeui/kiconviewsearchline.h
+++ b/kdeui/kiconviewsearchline.h
@@ -21,7 +21,7 @@
#define KICONVIEWSEARCHLINE_H
#include <klineedit.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QIconView;
class QIconViewItem;
@@ -31,7 +31,7 @@ class QIconViewItem;
* iconview based on a simple text search.
*
* No changes to the application other than instantiating this class with an
- * appropriate QIconView should be needed.
+ * appropriate TQIconView should be needed.
*
* @since 3.3
*/
@@ -42,21 +42,21 @@ class KDEUI_EXPORT KIconViewSearchLine : public KLineEdit
public:
/**
- * Constructs a KIconViewSearchLine with \a iconView being the QIconView to
+ * Constructs a KIconViewSearchLine with \a iconView being the TQIconView to
* be filtered.
*
* If \a iconView is null then the widget will be disabled until a iconview
* is set with setIconView().
*/
- KIconViewSearchLine( QWidget *parent = 0,
- QIconView *iconView = 0,
+ KIconViewSearchLine( TQWidget *parent = 0,
+ TQIconView *iconView = 0,
const char *name = 0 );
/**
- * Constructs a KIconViewSearchLine without any QIconView to filter. The
- * QIconView object has to be set later with setIconView().
+ * Constructs a KIconViewSearchLine without any TQIconView to filter. The
+ * TQIconView object has to be set later with setIconView().
*/
- KIconViewSearchLine( QWidget *parent, const char *name );
+ KIconViewSearchLine( TQWidget *parent, const char *name );
/**
* Destroys the KIconViewSearchLine.
@@ -75,7 +75,7 @@ public:
*
* @see setIconView()
*/
- QIconView *iconView() const;
+ TQIconView *iconView() const;
public slots:
@@ -83,7 +83,7 @@ public slots:
* Updates search to only make visible the items that match \a s. If
* \a s is null then the line edit's text will be used.
*/
- virtual void updateSearch( const QString &s = QString::null );
+ virtual void updateSearch( const TQString &s = TQString::null );
/**
* Make the search case sensitive or case insensitive.
@@ -93,12 +93,12 @@ public slots:
void setCaseSensitive( bool cs );
/**
- * Sets the QIconView that is filtered by this search line. If \a lv is null
+ * Sets the TQIconView that is filtered by this search line. If \a lv is null
* then the widget will be disabled.
*
* @see iconView()
*/
- void setIconView( QIconView *iv );
+ void setIconView( TQIconView *iv );
/**
@@ -109,7 +109,7 @@ public slots:
/**
* Must be called before updateSearch() whenever an icon is deleted.
*/
- void iconDeleted(const QString &filename);
+ void iconDeleted(const TQString &filename);
protected:
@@ -118,19 +118,19 @@ protected:
* based on the value of caseSensitive(). This can be overridden in
* subclasses to implement more complicated matching schemes.
*/
- virtual bool itemMatches( const QIconViewItem *item,
- const QString &s ) const;
+ virtual bool itemMatches( const TQIconViewItem *item,
+ const TQString &s ) const;
/**
* Do initialization common to both constructors.
*/
- void init( QIconView *iconView = 0 );
+ void init( TQIconView *iconView = 0 );
/**
* Hide item.
*/
- void hideItem( QIconViewItem *item );
+ void hideItem( TQIconViewItem *item );
/**
* Show item.
@@ -138,7 +138,7 @@ protected:
* Just unhide it, doesn't necessary show it on screen, for that use
* iconView->ensureItemVisible()
*/
- void showItem( QIconViewItem *item );
+ void showItem( TQIconViewItem *item );
protected slots:
@@ -155,7 +155,7 @@ protected slots:
*
* @see activateSearch()
*/
- void queueSearch( const QString &s );
+ void queueSearch( const TQString &s );
/**
* When the timer started with queueSearch() expires this slot is called.
diff --git a/kdeui/kinputdialog.cpp b/kdeui/kinputdialog.cpp
index d2d5e56a3..37f94e89e 100644
--- a/kdeui/kinputdialog.cpp
+++ b/kdeui/kinputdialog.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <knuminput.h>
@@ -35,7 +35,7 @@ class KInputDialogPrivate
public:
KInputDialogPrivate();
- QLabel *m_label;
+ TQLabel *m_label;
KLineEdit *m_lineEdit;
KIntSpinBox *m_intSpinBox;
KDoubleSpinBox *m_doubleSpinBox;
@@ -50,17 +50,17 @@ KInputDialogPrivate::KInputDialogPrivate()
{
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, true,
KStdGuiItem::clear() ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_lineEdit = new KLineEdit( value, frame );
@@ -77,24 +77,24 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
if ( !mask.isEmpty() )
d->m_lineEdit->setInputMask( mask );
- connect( d->m_lineEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotEditTextChanged( const QString & ) ) );
- connect( this, SIGNAL( user1Clicked() ), d->m_lineEdit, SLOT( clear() ) );
+ connect( d->m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotEditTextChanged( const TQString & ) ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), d->m_lineEdit, TQT_SLOT( clear() ) );
slotEditTextChanged( value );
setMinimumWidth( 350 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, false,
KStdGuiItem::clear() ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_textEdit = new KTextEdit( frame );
@@ -105,21 +105,21 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_textEdit->setFocus();
d->m_label->setBuddy( d->m_textEdit );
- connect( this, SIGNAL( user1Clicked() ), d->m_textEdit, SLOT( clear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), d->m_textEdit, TQT_SLOT( clear() ) );
setMinimumWidth( 400 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, int base,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_intSpinBox = new KIntSpinBox( minValue, maxValue, step, value,
@@ -132,16 +132,16 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 300 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, double step, int decimals,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_doubleSpinBox = new KDoubleSpinBox( minValue, maxValue, step, value,
@@ -154,8 +154,8 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 300 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, QWidget *parent,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, TQWidget *parent,
const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, true,
KStdGuiItem::clear() ),
@@ -163,10 +163,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
{
showButton( User1, editable );
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
if ( editable )
@@ -176,10 +176,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_comboBox->setCurrentItem( current );
layout->addWidget( d->m_comboBox );
- connect( d->m_comboBox, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotUpdateButtons( const QString & ) ) );
- connect( this, SIGNAL( user1Clicked() ),
- d->m_comboBox, SLOT( clearEdit() ) );
+ connect( d->m_comboBox, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotUpdateButtons( const TQString & ) ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ),
+ d->m_comboBox, TQT_SLOT( clearEdit() ) );
slotUpdateButtons( d->m_comboBox->currentText() );
d->m_comboBox->setFocus();
} else {
@@ -188,10 +188,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_listBox->setSelected( current, true );
d->m_listBox->ensureCurrentVisible();
layout->addWidget( d->m_listBox, 10 );
- connect( d->m_listBox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- SLOT( slotOk() ) );
- connect( d->m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
d->m_listBox->setFocus();
}
@@ -201,29 +201,29 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 320 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, const QStringList &select, bool multiple,
- QWidget *parent, const char *name )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, const TQStringList &select, bool multiple,
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_listBox = new KListBox( frame );
d->m_listBox->insertStringList( list );
layout->addWidget( d->m_listBox );
- QListBoxItem *item;
+ TQListBoxItem *item;
if ( multiple )
{
- d->m_listBox->setSelectionMode( QListBox::Extended );
+ d->m_listBox->setSelectionMode( TQListBox::Extended );
- for ( QStringList::ConstIterator it=select.begin(); it!=select.end(); ++it )
+ for ( TQStringList::ConstIterator it=select.begin(); it!=select.end(); ++it )
{
item = d->m_listBox->findItem( *it, CaseSensitive|ExactMatch );
if ( item )
@@ -232,12 +232,12 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
}
else
{
- connect( d->m_listBox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- SLOT( slotOk() ) );
- connect( d->m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
- QString text = select.first();
+ TQString text = select.first();
item = d->m_listBox->findItem( text, CaseSensitive|ExactMatch );
if ( item )
d->m_listBox->setSelected( item, true );
@@ -256,30 +256,30 @@ KInputDialog::~KInputDialog()
delete d;
}
-QString KInputDialog::getText( const QString &caption, const QString &label,
- const QString &value, bool *ok, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask )
+TQString KInputDialog::getText( const TQString &caption, const TQString &label,
+ const TQString &value, bool *ok, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask )
{
return text( caption, label, value, ok, parent, name, validator, mask,
- QString::null );
+ TQString::null );
}
-QString KInputDialog::text( const QString &caption,
- const QString &label, const QString &value, bool *ok, QWidget *parent,
- const char *name, QValidator *validator, const QString &mask,
- const QString &whatsThis )
+TQString KInputDialog::text( const TQString &caption,
+ const TQString &label, const TQString &value, bool *ok, TQWidget *parent,
+ const char *name, TQValidator *validator, const TQString &mask,
+ const TQString &whatsThis )
{
KInputDialog dlg( caption, label, value, parent, name, validator, mask );
if( !whatsThis.isEmpty() )
- QWhatsThis::add( dlg.lineEdit(), whatsThis );
+ TQWhatsThis::add( dlg.lineEdit(), whatsThis );
bool _ok = ( dlg.exec() == Accepted );
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
result = dlg.lineEdit()->text();
@@ -290,9 +290,9 @@ QString KInputDialog::text( const QString &caption,
return result;
}
-QString KInputDialog::getMultiLineText( const QString &caption,
- const QString &label, const QString &value, bool *ok,
- QWidget *parent, const char *name )
+TQString KInputDialog::getMultiLineText( const TQString &caption,
+ const TQString &label, const TQString &value, bool *ok,
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, parent, name );
@@ -301,16 +301,16 @@ QString KInputDialog::getMultiLineText( const QString &caption,
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
result = dlg.textEdit()->text();
return result;
}
-int KInputDialog::getInteger( const QString &caption, const QString &label,
+int KInputDialog::getInteger( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, int base, bool *ok,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, minValue,
maxValue, step, base, parent, name );
@@ -327,17 +327,17 @@ int KInputDialog::getInteger( const QString &caption, const QString &label,
return result;
}
-int KInputDialog::getInteger( const QString &caption, const QString &label,
+int KInputDialog::getInteger( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, bool *ok,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
{
return getInteger( caption, label, value, minValue, maxValue, step,
10, ok, parent, name );
}
-double KInputDialog::getDouble( const QString &caption, const QString &label,
+double KInputDialog::getDouble( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, double step, int decimals,
- bool *ok, QWidget *parent, const char *name )
+ bool *ok, TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, minValue,
maxValue, step, decimals, parent, name );
@@ -354,30 +354,30 @@ double KInputDialog::getDouble( const QString &caption, const QString &label,
return result;
}
-double KInputDialog::getDouble( const QString &caption, const QString &label,
+double KInputDialog::getDouble( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, int decimals,
- bool *ok, QWidget *parent, const char *name )
+ bool *ok, TQWidget *parent, const char *name )
{
return getDouble( caption, label, value, minValue, maxValue, 0.1, decimals,
ok, parent, name );
}
-QString KInputDialog::getItem( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, bool *ok,
- QWidget *parent, const char *name )
+TQString KInputDialog::getItem( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, bool *ok,
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, list, current,
editable, parent, name );
if ( !editable)
{
- connect( dlg.listBox(), SIGNAL(doubleClicked ( QListBoxItem *)), &dlg, SLOT( slotOk()));
+ connect( dlg.listBox(), TQT_SIGNAL(doubleClicked ( TQListBoxItem *)), &dlg, TQT_SLOT( slotOk()));
}
bool _ok = ( dlg.exec() == Accepted );
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
if ( editable )
result = dlg.comboBox()->currentText();
@@ -387,9 +387,9 @@ QString KInputDialog::getItem( const QString &caption, const QString &label,
return result;
}
-QStringList KInputDialog::getItemList( const QString &caption,
- const QString &label, const QStringList &list, const QStringList &select,
- bool multiple, bool *ok, QWidget *parent, const char *name )
+TQStringList KInputDialog::getItemList( const TQString &caption,
+ const TQString &label, const TQStringList &list, const TQStringList &select,
+ bool multiple, bool *ok, TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, list, select,
multiple, parent, name );
@@ -399,10 +399,10 @@ QStringList KInputDialog::getItemList( const QString &caption,
if ( ok )
*ok = _ok;
- QStringList result;
+ TQStringList result;
if ( _ok )
{
- for (const QListBoxItem* i = dlg.listBox()->firstItem(); i != 0; i = i->next() )
+ for (const TQListBoxItem* i = dlg.listBox()->firstItem(); i != 0; i = i->next() )
if ( i->isSelected() )
result.append( i->text() );
}
@@ -410,14 +410,14 @@ QStringList KInputDialog::getItemList( const QString &caption,
return result;
}
-void KInputDialog::slotEditTextChanged( const QString &text )
+void KInputDialog::slotEditTextChanged( const TQString &text )
{
bool on;
if ( lineEdit()->validator() ) {
- QString str = lineEdit()->text();
+ TQString str = lineEdit()->text();
int index = lineEdit()->cursorPosition();
on = ( lineEdit()->validator()->validate( str, index )
- == QValidator::Acceptable );
+ == TQValidator::Acceptable );
} else {
on = !text.stripWhiteSpace().isEmpty();
}
@@ -426,7 +426,7 @@ void KInputDialog::slotEditTextChanged( const QString &text )
enableButton( User1, !text.isEmpty() );
}
-void KInputDialog::slotUpdateButtons( const QString &text )
+void KInputDialog::slotUpdateButtons( const TQString &text )
{
enableButton( Ok, !text.isEmpty() );
enableButton( User1, !text.isEmpty() );
diff --git a/kdeui/kinputdialog.h b/kdeui/kinputdialog.h
index c6cd22d87..c59100ef0 100644
--- a/kdeui/kinputdialog.h
+++ b/kdeui/kinputdialog.h
@@ -53,23 +53,23 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* Constructor. This class is not designed to be instantiated except
* from the static member functions.
*/
- KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask );
- KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name );
- KInputDialog( const QString &caption, const QString &label, int value,
- int minValue, int maxValue, int step, int base, QWidget *parent,
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label, int value,
+ int minValue, int maxValue, int step, int base, TQWidget *parent,
const char *name );
- KInputDialog( const QString &caption, const QString &label, double value,
+ KInputDialog( const TQString &caption, const TQString &label, double value,
double minValue, double maxValue, double step, int decimals,
- QWidget *parent, const char *name );
- KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, QWidget *parent,
+ TQWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, TQWidget *parent,
const char *name );
- KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, const QStringList &select, bool editable,
- QWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, const TQStringList &select, bool editable,
+ TQWidget *parent, const char *name );
~KInputDialog();
@@ -82,8 +82,8 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
private slots:
- void slotEditTextChanged( const QString& );
- void slotUpdateButtons( const QString& );
+ void slotEditTextChanged( const TQString& );
+ void slotUpdateButtons( const TQString& );
public:
@@ -98,8 +98,8 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* If you provide a validator, the Ok button is disabled as long as
* the validator doesn't return Acceptable. If there is no validator,
* the Ok button is enabled whenever the line edit isn't empty. If you
- * want to accept empty input, create a trivial QValidator that
- * always returns acceptable, e.g. QRegExpValidator with a regexp
+ * want to accept empty input, create a trivial TQValidator that
+ * always returns acceptable, e.g. TQRegExpValidator with a regexp
* of ".*".
*
* @param caption Caption of the dialog
@@ -108,30 +108,30 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @param ok This bool would be set to true if user pressed Ok
* @param parent Parent of the dialog widget
* @param name Name of the dialog widget
- * @param validator A @ref QValidator to be associated with the line edit
+ * @param validator A @ref TQValidator to be associated with the line edit
* @param mask Mask associated with the line edit. See the
- * documentation for @ref QLineEdit about masks.
+ * documentation for @ref TQLineEdit about masks.
*
* @return String user entered if Ok was pressed, else a null string
*/
- static QString getText( const QString &caption, const QString &label,
- const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
- const char *name=0, QValidator *validator=0,
- const QString &mask=QString::null );
+ static TQString getText( const TQString &caption, const TQString &label,
+ const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
+ const char *name=0, TQValidator *validator=0,
+ const TQString &mask=TQString::null );
/**
* Same as @ref getText except it provides an extra parameter to specify
- * a QWhatsThis text for the input widget.
+ * a TQWhatsThis text for the input widget.
*
* ### KDE4: Merge with getText.
*
* @since KDE 3.3
**/
- static QString text( const QString &caption, const QString &label,
- const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
- const char *name=0, QValidator *validator=0,
- const QString &mask=QString::null,
- const QString& whatsThis=QString::null );
+ static TQString text( const TQString &caption, const TQString &label,
+ const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
+ const char *name=0, TQValidator *validator=0,
+ const TQString &mask=TQString::null,
+ const TQString& whatsThis=TQString::null );
/**
* Static convenience function to get a multiline string from the user.
@@ -151,9 +151,9 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return String user entered if Ok was pressed, else a null string
* @since 3.3
*/
- static QString getMultiLineText( const QString &caption,
- const QString &label, const QString &value=QString::null,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQString getMultiLineText( const TQString &caption,
+ const TQString &label, const TQString &value=TQString::null,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to get an integer from the user.
@@ -179,18 +179,18 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return Number user entered if Ok was pressed, else 0
*/
- static int getInteger( const QString &caption, const QString &label,
+ static int getInteger( const TQString &caption, const TQString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
- int step=1, int base=10, bool *ok=0, QWidget *parent=0,
+ int step=1, int base=10, bool *ok=0, TQWidget *parent=0,
const char *name=0 );
/**
* This is an overloaded convenience function. It behaves exactly same as
* above except it assumes base to be 10, i.e. accepts decimal numbers.
*/
- static int getInteger( const QString &caption, const QString &label,
+ static int getInteger( const TQString &caption, const TQString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
- int step=1, bool *ok=0, QWidget *parent=0, const char *name=0 );
+ int step=1, bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to get a floating point number from the user.
@@ -215,19 +215,19 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
*
* @return Number user entered if Ok was pressed, else 0
*/
- static double getDouble( const QString &caption, const QString &label,
+ static double getDouble( const TQString &caption, const TQString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, double step=0.1, int decimals=1,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* This is an overloaded convenience function. It behaves exctly like
* the above function.
*/
- static double getDouble( const QString &caption, const QString &label,
+ static double getDouble( const TQString &caption, const TQString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, int decimals=1, bool *ok=0,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to let the user select an item from a
@@ -249,9 +249,9 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return Text of the selected item. If @p editable is true this can be
* a text entered by the user.
*/
- static QString getItem( const QString &caption, const QString &label,
- const QStringList &list, int current=0, bool editable=false,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQString getItem( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current=0, bool editable=false,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to let the user select one or more
@@ -273,10 +273,10 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return List of selected items if multiple is true, else currently
* selected item as a QStringList
*/
- static QStringList getItemList( const QString &caption,
- const QString &label, const QStringList &list=QStringList(),
- const QStringList &select=QStringList(), bool multiple=false,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQStringList getItemList( const TQString &caption,
+ const TQString &label, const TQStringList &list=TQStringList(),
+ const TQStringList &select=TQStringList(), bool multiple=false,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
private:
diff --git a/kdeui/kjanuswidget.cpp b/kdeui/kjanuswidget.cpp
index 4a38a7b28..f8647fb26 100644
--- a/kdeui/kjanuswidget.cpp
+++ b/kdeui/kjanuswidget.cpp
@@ -18,20 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qsplitter.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqbitmap.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqsplitter.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kapplication.h>
#include <kdialog.h> // Access to some static members
@@ -48,18 +48,18 @@
class KJanusWidget::IconListItem : public QListBoxItem
{
public:
- IconListItem( QListBox *listbox, const QPixmap &pixmap,
- const QString &text );
- virtual int height( const QListBox *lb ) const;
- virtual int width( const QListBox *lb ) const;
+ IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
+ const TQString &text );
+ virtual int height( const TQListBox *lb ) const;
+ virtual int width( const TQListBox *lb ) const;
int expandMinimumWidth( int width );
protected:
- const QPixmap &defaultPixmap();
- void paint( QPainter *painter );
+ const TQPixmap &defaultPixmap();
+ void paint( TQPainter *painter );
private:
- QPixmap mPixmap;
+ TQPixmap mPixmap;
int mMinimumWidth;
};
@@ -71,78 +71,78 @@ public:
int mNextPageIndex; // The next page index.
// Dictionary for multipage modes.
- QMap<int,QWidget*> mIntToPage;
+ TQMap<int,TQWidget*> mIntToPage;
// Reverse dictionary. Used because showPage() may be performance critical.
- QMap<QWidget*,int> mPageToInt;
+ TQMap<TQWidget*,int> mPageToInt;
// Dictionary of title string associated with page.
- QMap<int, QString> mIntToTitle;
+ TQMap<int, TQString> mIntToTitle;
- QWidget * mListFrame;
- QSplitter * mSplitter;
+ TQWidget * mListFrame;
+ TQSplitter * mSplitter;
};
-template class QPtrList<QListViewItem>;
+template class TQPtrList<TQListViewItem>;
-KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
- : QWidget( parent, name, 0 ),
+KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face )
+ : TQWidget( parent, name, 0 ),
mValid(false), mPageList(0),
mTitleList(0), mFace(face), mTitleLabel(0), mActivePageWidget(0),
mShowIconsInTreeList(false), d(0)
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
if( mFace == TreeList || mFace == IconList )
{
d = new KJanusWidgetPrivate;
d->mSplitter = 0;
- QFrame *page;
+ TQFrame *page;
if( mFace == TreeList )
{
- d->mSplitter = new QSplitter( this );
+ d->mSplitter = new TQSplitter( this );
topLayout->addWidget( d->mSplitter, 10 );
- mTreeListResizeMode = QSplitter::KeepSize;
+ mTreeListResizeMode = TQSplitter::KeepSize;
- d->mListFrame = new QWidget( d->mSplitter );
- QVBoxLayout *dummy = new QVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() );
+ d->mListFrame = new TQWidget( d->mSplitter );
+ TQVBoxLayout *dummy = new TQVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() );
dummy->setAutoAdd( true );
mTreeList = new KListView( d->mListFrame );
- mTreeList->addColumn( QString::null );
+ mTreeList->addColumn( TQString::null );
mTreeList->header()->hide();
mTreeList->setRootIsDecorated(true);
mTreeList->setSorting( -1 );
- connect( mTreeList, SIGNAL(selectionChanged()), SLOT(slotShowPage()) );
- connect( mTreeList, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *)));
+ connect( mTreeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()) );
+ connect( mTreeList, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotItemClicked(TQListViewItem *)));
//
// Page area. Title at top with a separator below and a pagestack using
// all available space at bottom.
//
- QFrame *p = new QFrame( d->mSplitter );
+ TQFrame *p = new TQFrame( d->mSplitter );
- QHBoxLayout *hbox = new QHBoxLayout( p, 0, 0 );
+ TQHBoxLayout *hbox = new TQHBoxLayout( p, 0, 0 );
- page = new QFrame( p );
+ page = new TQFrame( p );
hbox->addWidget( page, 10 );
}
else
{
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
- d->mListFrame = new QWidget( this );
+ TQHBoxLayout *hbox = new TQHBoxLayout( topLayout );
+ d->mListFrame = new TQWidget( this );
hbox->addWidget( d->mListFrame );
- ( new QVBoxLayout( d->mListFrame, 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( d->mListFrame, 0, 0 ) )->setAutoAdd( true );
mIconList = new IconListBox( d->mListFrame );
- QFont listFont( mIconList->font() );
+ TQFont listFont( mIconList->font() );
listFont.setBold( true );
mIconList->setFont( listFont );
mIconList->verticalScrollBar()->installEventFilter( this );
- connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
+ connect( mIconList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()));
hbox->addSpacing( KDialog::marginHint() );
- page = new QFrame( this );
+ page = new TQFrame( this );
hbox->addWidget( page, 10 );
}
@@ -151,48 +151,48 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
// pagestack using all available space at bottom.
//
- QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout *vbox = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- mTitleLabel = new QLabel( i18n("Empty Page"), page, "KJanusWidgetTitleLabel" );
- vbox->addWidget( mTitleLabel, 0, QApplication::reverseLayout() ? AlignRight : AlignLeft );
+ mTitleLabel = new TQLabel( i18n("Empty Page"), page, "KJanusWidgetTitleLabel" );
+ vbox->addWidget( mTitleLabel, 0, TQApplication::reverseLayout() ? AlignRight : AlignLeft );
- QFont titleFont( mTitleLabel->font() );
+ TQFont titleFont( mTitleLabel->font() );
titleFont.setBold( true );
mTitleLabel->setFont( titleFont );
mTitleSep = new KSeparator( page );
- mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain );
+ mTitleSep->setFrameStyle( TQFrame::HLine|TQFrame::Plain );
vbox->addWidget( mTitleSep );
- mPageStack = new QWidgetStack( page );
- connect(mPageStack, SIGNAL(aboutToShow(QWidget *)),
- SIGNAL(aboutToShowPage(QWidget *)));
+ mPageStack = new TQWidgetStack( page );
+ connect(mPageStack, TQT_SIGNAL(aboutToShow(TQWidget *)),
+ TQT_SIGNAL(aboutToShowPage(TQWidget *)));
vbox->addWidget( mPageStack, 10 );
}
else if( mFace == Tabbed )
{
d = new KJanusWidgetPrivate;
- mTabControl = new QTabWidget( this );
+ mTabControl = new TQTabWidget( this );
mTabControl->setMargin (KDialog::marginHint());
- connect(mTabControl, SIGNAL(currentChanged(QWidget *)),
- SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mTabControl, TQT_SIGNAL(currentChanged(TQWidget *)),
+ TQT_SIGNAL(aboutToShowPage(TQWidget *)));
topLayout->addWidget( mTabControl, 10 );
}
else if( mFace == Swallow )
{
- mSwallowPage = new QWidget( this );
+ mSwallowPage = new TQWidget( this );
topLayout->addWidget( mSwallowPage, 10 );
}
else
{
mFace = Plain;
- mPlainPage = new QFrame( this );
+ mPlainPage = new TQFrame( this );
topLayout->addWidget( mPlainPage, 10 );
}
if ( kapp )
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
mValid = true;
setSwallowedWidget(0); // Set default size if 'mFace' is Swallow.
@@ -211,7 +211,7 @@ bool KJanusWidget::isValid() const
}
-QFrame *KJanusWidget::plainPage()
+TQFrame *KJanusWidget::plainPage()
{
return mPlainPage;
}
@@ -222,7 +222,7 @@ int KJanusWidget::face() const
return mFace;
}
-QWidget *KJanusWidget::FindParent()
+TQWidget *KJanusWidget::FindParent()
{
if( mFace == Tabbed ) {
return mTabControl;
@@ -232,8 +232,8 @@ QWidget *KJanusWidget::FindParent()
}
}
-QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KJanusWidget::addPage( const TQStringList &items, const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -241,36 +241,36 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
return 0;
}
- QFrame *page = new QFrame( FindParent(), "page" );
+ TQFrame *page = new TQFrame( FindParent(), "page" );
addPageWidget( page, items, header, pixmap );
return page;
}
-void KJanusWidget::pageGone( QObject *obj )
+void KJanusWidget::pageGone( TQObject *obj )
{
- removePage( static_cast<QWidget*>( obj ) );
+ removePage( static_cast<TQWidget*>( obj ) );
}
-void KJanusWidget::slotReopen( QListViewItem * item )
+void KJanusWidget::slotReopen( TQListViewItem * item )
{
if( item )
item->setOpen( true );
}
-QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KJanusWidget::addPage( const TQString &itemName, const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addPage(items, header, pixmap);
}
-QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQVBox *KJanusWidget::addVBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -278,51 +278,51 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
return 0;
}
- QVBox *page = new QVBox(FindParent() , "page" );
+ TQVBox *page = new TQVBox(FindParent() , "page" );
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
return page;
}
-QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQVBox *KJanusWidget::addVBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addVBoxPage(items, header, pixmap);
}
-QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KJanusWidget::addHBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid ) {
kdDebug() << "addPage: Invalid object" << endl;
return 0;
}
- QHBox *page = new QHBox(FindParent(), "page");
+ TQHBox *page = new TQHBox(FindParent(), "page");
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
return page;
}
-QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KJanusWidget::addHBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addHBoxPage(items, header, pixmap);
}
-QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQGrid *KJanusWidget::addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -330,7 +330,7 @@ QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
return 0;
}
- QGrid *page = new QGrid( n, dir, FindParent(), "page" );
+ TQGrid *page = new TQGrid( n, dir, FindParent(), "page" );
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
@@ -338,25 +338,25 @@ QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
}
-QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQGrid *KJanusWidget::addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addGridPage(n, dir, items, header, pixmap);
}
-void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page)
+void KJanusWidget::InsertTreeListItem(const TQStringList &items, const TQPixmap &pixmap, TQFrame *page)
{
bool isTop = true;
- QListViewItem *curTop = 0, *child, *last, *newChild;
+ TQListViewItem *curTop = 0, *child, *last, *newChild;
unsigned int index = 1;
- QStringList curPath;
+ TQStringList curPath;
- for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it, index++ ) {
- QString name = (*it);
+ for ( TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it, index++ ) {
+ TQString name = (*it);
bool isPath = ( index != items.count() );
// Find the first child.
@@ -375,9 +375,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
// This node didn't have any children at all, lets just insert the
// new child.
if (isTop)
- newChild = new QListViewItem(mTreeList, name);
+ newChild = new TQListViewItem(mTreeList, name);
else
- newChild = new QListViewItem(curTop, name);
+ newChild = new TQListViewItem(curTop, name);
}
else if (child) {
@@ -394,9 +394,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
else {
// the node had some children, but we didn't find the given name
if (isTop)
- newChild = new QListViewItem(mTreeList, last, name);
+ newChild = new TQListViewItem(mTreeList, last, name);
else
- newChild = new QListViewItem(curTop, last, name);
+ newChild = new TQListViewItem(curTop, last, name);
}
// Now make the element expandable if it is a path component, and make
@@ -407,9 +407,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
isTop = false;
curPath << name;
- QString key = curPath.join("_/_");
+ TQString key = curPath.join("_/_");
if (mFolderIconMap.contains(key)) {
- QPixmap p = mFolderIconMap[key];
+ TQPixmap p = mFolderIconMap[key];
newChild->setPixmap(0,p);
}
}
@@ -422,26 +422,26 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
}
}
-void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
- const QString &header,const QPixmap &pixmap )
+void KJanusWidget::addPageWidget( TQFrame *page, const TQStringList &items,
+ const TQString &header,const TQPixmap &pixmap )
{
- connect(page, SIGNAL(destroyed(QObject*)), SLOT(pageGone(QObject*)));
+ connect(page, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(pageGone(TQObject*)));
if( mFace == Tabbed )
{
mTabControl->addTab (page, items.last());
- d->mIntToPage[d->mNextPageIndex] = static_cast<QWidget*>(page);
- d->mPageToInt[static_cast<QWidget*>(page)] = d->mNextPageIndex;
+ d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
+ d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
d->mNextPageIndex++;
}
else if( mFace == TreeList || mFace == IconList )
{
- d->mIntToPage[d->mNextPageIndex] = static_cast<QWidget*>(page);
- d->mPageToInt[static_cast<QWidget*>(page)] = d->mNextPageIndex;
+ d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
+ d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
mPageStack->addWidget( page, 0 );
if (items.isEmpty()) {
- kdDebug() << "Invalid QStringList, with zero items" << endl;
+ kdDebug() << "Invalid TQStringList, with zero items" << endl;
return;
}
@@ -451,7 +451,7 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
}
else // mFace == IconList
{
- QString itemName = items.last();
+ TQString itemName = items.last();
IconListItem *item = new IconListItem( mIconList, pixmap, itemName );
mIconListToPageStack.insert(item, page);
mIconList->invalidateHeight();
@@ -464,9 +464,9 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
//
// Make sure the title label is sufficiently wide
//
- QString lastName = items.last();
- const QString &title = (!header.isNull() ? header : lastName);
- QRect r = mTitleLabel->fontMetrics().boundingRect( title );
+ TQString lastName = items.last();
+ const TQString &title = (!header.isNull() ? header : lastName);
+ TQRect r = mTitleLabel->fontMetrics().boundingRect( title );
if( mTitleLabel->minimumWidth() < r.width() )
{
mTitleLabel->setMinimumWidth( r.width() );
@@ -485,15 +485,15 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
}
-void KJanusWidget::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
+void KJanusWidget::setFolderIcon(const TQStringList &path, const TQPixmap &pixmap)
{
- QString key = path.join("_/_");
+ TQString key = path.join("_/_");
mFolderIconMap.insert(key,pixmap);
}
-bool KJanusWidget::setSwallowedWidget( QWidget *widget )
+bool KJanusWidget::setSwallowedWidget( TQWidget *widget )
{
if( mFace != Swallow || !mValid )
{
@@ -505,18 +505,18 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
//
delete mSwallowPage->layout();
- QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 );
+ TQGridLayout *gbox = new TQGridLayout( mSwallowPage, 1, 1, 0 );
//
// Hide old children
//
- QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please
+ TQObjectList *l = (TQObjectList*)mSwallowPage->children(); // silence please
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
- ((QWidget*)o)->hide();
+ ((TQWidget*)o)->hide();
}
}
@@ -533,7 +533,7 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
{
if( widget->parent() != mSwallowPage )
{
- widget->reparent( mSwallowPage, 0, QPoint(0,0) );
+ widget->reparent( mSwallowPage, 0, TQPoint(0,0) );
}
gbox->addWidget(widget, 0, 0 );
gbox->activate();
@@ -552,18 +552,18 @@ bool KJanusWidget::slotShowPage()
if( mFace == TreeList )
{
- QListViewItem *node = mTreeList->selectedItem();
+ TQListViewItem *node = mTreeList->selectedItem();
if( !node ) { return false; }
- QWidget *stackItem = mTreeListToPageStack[node];
+ TQWidget *stackItem = mTreeListToPageStack[node];
// Make sure to call through the virtual function showPage(int)
return showPage(d->mPageToInt[stackItem]);
}
else if( mFace == IconList )
{
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ TQListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( !node ) { return false; }
- QWidget *stackItem = mIconListToPageStack[node];
+ TQWidget *stackItem = mIconListToPageStack[node];
// Make sure to call through the virtual function showPage(int)
return showPage(d->mPageToInt[stackItem]);
}
@@ -585,7 +585,7 @@ bool KJanusWidget::showPage( int index )
}
-bool KJanusWidget::showPage( QWidget *w )
+bool KJanusWidget::showPage( TQWidget *w )
{
if( !w || !mValid )
{
@@ -601,10 +601,10 @@ bool KJanusWidget::showPage( QWidget *w )
mTitleLabel->setText( d->mIntToTitle[index] );
if( mFace == TreeList )
{
- QMap<QListViewItem *, QWidget *>::Iterator it;
+ TQMap<TQListViewItem *, TQWidget *>::Iterator it;
for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){
- QListViewItem *key = it.key();
- QWidget *val = it.data();
+ TQListViewItem *key = it.key();
+ TQWidget *val = it.data();
if (val == w) {
mTreeList->setSelected(key, true );
break;
@@ -613,10 +613,10 @@ bool KJanusWidget::showPage( QWidget *w )
}
else
{
- QMap<QListBoxItem *, QWidget *>::Iterator it;
+ TQMap<TQListBoxItem *, TQWidget *>::Iterator it;
for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){
- QListBoxItem *key = it.key();
- QWidget *val = it.data();
+ TQListBoxItem *key = it.key();
+ TQWidget *val = it.data();
if (val == w) {
mIconList->setSelected( key, true );
break;
@@ -641,19 +641,19 @@ bool KJanusWidget::showPage( QWidget *w )
int KJanusWidget::activePageIndex() const
{
if( mFace == TreeList) {
- QListViewItem *node = mTreeList->selectedItem();
+ TQListViewItem *node = mTreeList->selectedItem();
if( !node ) { return -1; }
- QWidget *stackItem = mTreeListToPageStack[node];
+ TQWidget *stackItem = mTreeListToPageStack[node];
return d->mPageToInt[stackItem];
}
else if (mFace == IconList) {
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ TQListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( !node ) { return false; }
- QWidget *stackItem = mIconListToPageStack[node];
+ TQWidget *stackItem = mIconListToPageStack[node];
return d->mPageToInt[stackItem];
}
else if( mFace == Tabbed ) {
- QWidget *widget = mTabControl->currentPage();
+ TQWidget *widget = mTabControl->currentPage();
return ( !widget ? -1 : d->mPageToInt[widget] );
}
else {
@@ -662,7 +662,7 @@ int KJanusWidget::activePageIndex() const
}
-int KJanusWidget::pageIndex( QWidget *widget ) const
+int KJanusWidget::pageIndex( TQWidget *widget ) const
{
if( !widget )
{
@@ -677,9 +677,9 @@ int KJanusWidget::pageIndex( QWidget *widget ) const
//
// The user gets the real page widget with addVBoxPage(), addHBoxPage()
// and addGridPage() but not with addPage() which returns a child of
- // the toplevel page. addPage() returns a QFrame so I check for that.
+ // the toplevel page. addPage() returns a TQFrame so I check for that.
//
- if( widget->isA("QFrame") )
+ if( widget->isA("TQFrame") )
{
return d->mPageToInt[widget->parentWidget()];
}
@@ -699,14 +699,14 @@ void KJanusWidget::slotFontChanged()
if( mTitleLabel )
{
mTitleLabel->setFont( KGlobalSettings::generalFont() );
- QFont titleFont( mTitleLabel->font() );
+ TQFont titleFont( mTitleLabel->font() );
titleFont.setBold( true );
mTitleLabel->setFont( titleFont );
}
if( mFace == IconList )
{
- QFont listFont( mIconList->font() );
+ TQFont listFont( mIconList->font() );
listFont.setBold( true );
mIconList->setFont( listFont );
mIconList->invalidateHeight();
@@ -715,7 +715,7 @@ void KJanusWidget::slotFontChanged()
}
// makes the treelist behave like the list of kcontrol
-void KJanusWidget::slotItemClicked(QListViewItem *it)
+void KJanusWidget::slotItemClicked(TQListViewItem *it)
{
if(it && (it->childCount()>0))
it->setOpen(!it->isOpen());
@@ -747,18 +747,18 @@ void KJanusWidget::setFocus()
}
-QSize KJanusWidget::minimumSizeHint() const
+TQSize KJanusWidget::minimumSizeHint() const
{
if( mFace == TreeList || mFace == IconList )
{
- QSize s1( KDialog::spacingHint(), KDialog::spacingHint()*2 );
- QSize s2(0,0);
- QSize s3(0,0);
- QSize s4( mPageStack->sizeHint() );
+ TQSize s1( KDialog::spacingHint(), KDialog::spacingHint()*2 );
+ TQSize s2(0,0);
+ TQSize s3(0,0);
+ TQSize s4( mPageStack->sizeHint() );
if( mFace == TreeList )
{
- s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth );
+ s1.rwidth() += style().pixelMetric( TQStyle::PM_SplitterWidth );
s2 = mTreeList->minimumSize();
}
else
@@ -780,7 +780,7 @@ QSize KJanusWidget::minimumSizeHint() const
int h1 = s1.rheight() + s3.rheight() + s4.height();
int h2 = QMAX( h1, s2.rheight() );
- return QSize( s1.width()+s2.width()+QMAX(s3.width(),s4.width()), h2 );
+ return TQSize( s1.width()+s2.width()+QMAX(s3.width(),s4.width()), h2 );
}
else if( mFace == Tabbed )
{
@@ -796,13 +796,13 @@ QSize KJanusWidget::minimumSizeHint() const
}
else
{
- return QSize( 100, 100 ); // Should never happen though.
+ return TQSize( 100, 100 ); // Should never happen though.
}
}
-QSize KJanusWidget::sizeHint() const
+TQSize KJanusWidget::sizeHint() const
{
return minimumSizeHint();
}
@@ -813,7 +813,7 @@ void KJanusWidget::setTreeListAutoResize( bool state )
if( mFace == TreeList )
{
mTreeListResizeMode = !state ?
- QSplitter::KeepSize : QSplitter::Stretch;
+ TQSplitter::KeepSize : TQSplitter::Stretch;
if( d->mSplitter )
d->mSplitter->setResizeMode( d->mListFrame, mTreeListResizeMode );
}
@@ -845,42 +845,42 @@ void KJanusWidget::unfoldTreeList( bool persist )
if( mFace == TreeList )
{
if( persist )
- connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ connect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
else
- disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ disconnect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
- for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
+ for( TQListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
item->setOpen( true );
}
}
-void KJanusWidget::addWidgetBelowList( QWidget * widget )
+void KJanusWidget::addWidgetBelowList( TQWidget * widget )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
- widget->reparent( d->mListFrame, QPoint() );
+ widget->reparent( d->mListFrame, TQPoint() );
}
}
-void KJanusWidget::addButtonBelowList( const QString & text, QObject * recv, const char * slot )
+void KJanusWidget::addButtonBelowList( const TQString & text, TQObject * recv, const char * slot )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
- QPushButton * button = new QPushButton( text, d->mListFrame, "KJanusWidget::buttonBelowList" );
- connect( button, SIGNAL( clicked() ), recv, slot );
+ TQPushButton * button = new TQPushButton( text, d->mListFrame, "KJanusWidget::buttonBelowList" );
+ connect( button, TQT_SIGNAL( clicked() ), recv, slot );
}
}
-void KJanusWidget::addButtonBelowList( const KGuiItem & item, QObject * recv, const char * slot )
+void KJanusWidget::addButtonBelowList( const KGuiItem & item, TQObject * recv, const char * slot )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
KPushButton * button = new KPushButton( item, d->mListFrame, "KJanusWidget::buttonBelowList" );
- connect( button, SIGNAL( clicked() ), recv, slot );
+ connect( button, TQT_SIGNAL( clicked() ), recv, slot );
}
}
-void KJanusWidget::showEvent( QShowEvent * )
+void KJanusWidget::showEvent( TQShowEvent * )
{
if( mFace == TreeList )
{
@@ -895,9 +895,9 @@ void KJanusWidget::showEvent( QShowEvent * )
// It should be obvious that this eventfilter must only be
// be installed on the vertical scrollbar of the mIconList.
//
-bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
+bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if( e->type() == QEvent::Show )
+ if( e->type() == TQEvent::Show )
{
IconListItem *item = (IconListItem*)mIconList->item(0);
if( item )
@@ -907,7 +907,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
mIconList->setFixedWidth( lw+sw+mIconList->frameWidth()*2 );
}
}
- else if( e->type() == QEvent::Hide )
+ else if( e->type() == TQEvent::Hide )
{
IconListItem *item = (IconListItem*)mIconList->item(0);
if( item )
@@ -916,7 +916,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
mIconList->setFixedWidth( lw+mIconList->frameWidth()*2 );
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
@@ -926,7 +926,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
//
-KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
+KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name,
WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
mWidthValid(false)
@@ -939,7 +939,7 @@ void KJanusWidget::IconListBox::updateMinimumHeight()
if( mShowAll && !mHeightValid )
{
int h = frameWidth()*2;
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
h += i->height( this );
}
@@ -954,13 +954,13 @@ void KJanusWidget::IconListBox::updateWidth()
if( !mWidthValid )
{
int maxWidth = 10;
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
int w = ((IconListItem *)i)->width(this);
maxWidth = QMAX( w, maxWidth );
}
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
((IconListItem *)i)->expandMinimumWidth( maxWidth );
}
@@ -996,9 +996,9 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
-KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
- const QString &text )
- : QListBoxItem( listbox )
+KJanusWidget::IconListItem::IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
+ const TQString &text )
+ : TQListBoxItem( listbox )
{
mPixmap = pixmap;
if( mPixmap.isNull() )
@@ -1017,19 +1017,19 @@ int KJanusWidget::IconListItem::expandMinimumWidth( int width )
}
-const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
+const TQPixmap &KJanusWidget::IconListItem::defaultPixmap()
{
- static QPixmap *pix=0;
+ static TQPixmap *pix=0;
if( !pix )
{
- pix = new QPixmap( 32, 32 );
- QPainter p( pix );
+ pix = new TQPixmap( 32, 32 );
+ TQPainter p( pix );
p.eraseRect( 0, 0, pix->width(), pix->height() );
p.setPen( Qt::red );
p.drawRect ( 0, 0, pix->width(), pix->height() );
p.end();
- QBitmap mask( pix->width(), pix->height(), true );
+ TQBitmap mask( pix->width(), pix->height(), true );
mask.fill( Qt::black );
p.begin( &mask );
p.setPen( Qt::white );
@@ -1042,9 +1042,9 @@ const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
}
-void KJanusWidget::IconListItem::paint( QPainter *painter )
+void KJanusWidget::IconListItem::paint( TQPainter *painter )
{
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
int wp = mPixmap.width();
int hp = mPixmap.height();
@@ -1056,7 +1056,7 @@ void KJanusWidget::IconListItem::paint( QPainter *painter )
}
}
-int KJanusWidget::IconListItem::height( const QListBox *lb ) const
+int KJanusWidget::IconListItem::height( const TQListBox *lb ) const
{
if( text().isEmpty() )
{
@@ -1070,7 +1070,7 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const
}
-int KJanusWidget::IconListItem::width( const QListBox *lb ) const
+int KJanusWidget::IconListItem::width( const TQListBox *lb ) const
{
int wt = lb->fontMetrics().boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).width() + 10;
int wp = mPixmap.width() + 10;
@@ -1084,7 +1084,7 @@ void KJanusWidget::virtual_hook( int, void* )
// TODO: In TreeList, if the last child of a node is removed, and there is no corrsponding widget for that node, allow the caller to
// delete the node.
-void KJanusWidget::removePage( QWidget *page )
+void KJanusWidget::removePage( TQWidget *page )
{
if (!d || !d->mPageToInt.contains(page))
return;
@@ -1093,7 +1093,7 @@ void KJanusWidget::removePage( QWidget *page )
if ( mFace == TreeList )
{
- QMap<QListViewItem*, QWidget *>::Iterator i;
+ TQMap<TQListViewItem*, TQWidget *>::Iterator i;
for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i )
if (i.data()==page)
{
@@ -1108,7 +1108,7 @@ void KJanusWidget::removePage( QWidget *page )
}
else if ( mFace == IconList )
{
- QMap<QListBoxItem*, QWidget *>::Iterator i;
+ TQMap<TQListBoxItem*, TQWidget *>::Iterator i;
for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i )
if (i.data()==page)
{
@@ -1129,15 +1129,15 @@ void KJanusWidget::removePage( QWidget *page )
}
}
-QString KJanusWidget::pageTitle(int index) const
+TQString KJanusWidget::pageTitle(int index) const
{
if (!d || !d->mIntToTitle.contains(index))
- return QString::null;
+ return TQString::null;
else
return d->mIntToTitle[index];
}
-QWidget *KJanusWidget::pageWidget(int index) const
+TQWidget *KJanusWidget::pageWidget(int index) const
{
if (!d || !d->mIntToPage.contains(index))
return 0;
diff --git a/kdeui/kjanuswidget.h b/kdeui/kjanuswidget.h
index 6fbd294fe..0eb578a4b 100644
--- a/kdeui/kjanuswidget.h
+++ b/kdeui/kjanuswidget.h
@@ -20,13 +20,13 @@
#ifndef _KJANUS_WIDGET_H_
#define _KJANUS_WIDGET_H_
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qsplitter.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqsplitter.h>
#include <klistbox.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KListView;
@@ -50,7 +50,7 @@ class KGuiItem;
* This class provides KJanusWidget::TreeList, KJanusWidget::IconList,
* KJanusWidget::Tabbed, KJanusWidget::Plain and KJanusWidget::Swallow layouts.
*
- * For all modes it is important that you specify the QWidget::minimumSize()
+ * For all modes it is important that you specify the TQWidget::minimumSize()
* on the page, plain widget or the swallowed widget. If you use a QLayout
* on the page, plain widget or the swallowed widget this will be taken care
* of automatically. The size is used when the KJanusWidget determines its
@@ -59,7 +59,7 @@ class KGuiItem;
*
* Pages that have been added in TreeList, IconList or Tabbed mode can be
* removed by simply deleting the page. However, it would be preferable to use
- * the QObject::deleteLater() function on the page as the main event loop
+ * the TQObject::deleteLater() function on the page as the main event loop
* may have optimized UI update events of the page by scheduling them for later.
*
* @author Espen Sand (espen@kde.org)
@@ -72,7 +72,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
class IconListBox : public KListBox
{
public:
- IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ IconListBox( TQWidget *parent=0, const char *name=0, WFlags f=0 );
void updateMinimumHeight();
void updateWidth();
void invalidateHeight();
@@ -103,7 +103,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*/
Tabbed,
/**
- * The Plain face provides an empty widget (QFrame) where you can place your
+ * The Plain face provides an empty widget (TQFrame) where you can place your
* widgets. The KJanusWidget makes no assumptions regarding the contents so
* you are free to add whatever you want.
*/
@@ -136,7 +136,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param face The kind of dialog, Use TreeList, Tabbed, Plain or
* Swallow.
*/
- KJanusWidget( QWidget *parent=0, const char *name=0, int face=Plain );
+ KJanusWidget( TQWidget *parent=0, const char *name=0, int face=Plain );
/**
* Destructor.
@@ -179,7 +179,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The minimum size.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Returns the recommended size for the widget in order to be displayed
@@ -187,14 +187,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The recommended size.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Returns the empty widget that is available in Plain mode.
*
* @return The widget or 0 if the face in not Plain.
*/
- virtual QFrame *plainPage();
+ virtual TQFrame *plainPage();
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
@@ -215,8 +215,8 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QFrame *addPage(const QString &item,const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQFrame *addPage(const TQString &item,const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addPage just above, with the difference that the first
@@ -232,14 +232,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQFrame *addPage(const TQStringList &items, const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QVBox
- * so it contains a QVBoxLayout layout that lines up the child widgets
+ * so it contains a TQVBoxLayout layout that lines up the child widgets
* are vertically.
*
* Deleting the returned frame will cause the listitem or tab to be
@@ -254,9 +254,9 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed. */
- virtual QVBox *addVBoxPage( const QString &item,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQVBox *addVBoxPage( const TQString &item,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addVBoxPage just above, with the difference that the first
@@ -270,15 +270,15 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QVBox *addVBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQVBox *addVBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QHBox
- * so it contains a QHBoxLayout layout that lines up the child widgets
+ * so it contains a TQHBoxLayout layout that lines up the child widgets
* are horizontally.
*
* Deleting the returned frame will cause the listitem or tab to be
@@ -294,9 +294,9 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QHBox *addHBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQHBox *addHBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addHBoxPage just above, with the difference that the first
@@ -310,23 +310,23 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QHBox *addHBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQHBox *addHBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in either TreeList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QGrid
- * so it contains a QGridLayout layout that places up the child widgets
+ * so it contains a TQGridLayout layout that places up the child widgets
* in a grid.
*
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
*
- * @param n Specifies the number of columns if 'dir' is QGrid::Horizontal
- * or the number of rows if 'dir' is QGrid::Vertical.
- * @param dir Can be QGrid::Horizontal or QGrid::Vertical.
+ * @param n Specifies the number of columns if 'dir' is TQGrid::Horizontal
+ * or the number of rows if 'dir' is TQGrid::Vertical.
+ * @param dir Can be TQGrid::Horizontal or TQGrid::Vertical.
* @param itemName String used in the list or Tab item.
* @param header A longer string used in TreeList and IconList mode to
* describe the contents of a page. If empty, the item string
@@ -337,10 +337,10 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QGrid *addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQGrid *addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addGridPage just above, with the difference that the first
@@ -354,10 +354,10 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QGrid *addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQGrid *addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* @short Removes a page created with addPage, addVBoxPage,
@@ -368,7 +368,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param page The widget returned by addPage , addVBoxPage ,
* addHBoxPage or addGridPage .
*/
- void removePage( QWidget *page );
+ void removePage( TQWidget *page );
/**
@@ -387,7 +387,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The index or -1 if the face is not Tabbed, TreeList or
* IconList
*/
- virtual int pageIndex( QWidget *widget ) const;
+ virtual int pageIndex( TQWidget *widget ) const;
/**
* Defines the widget to be swallowed.
@@ -398,7 +398,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param widget The widget to be swallowed. If 0, then an empty rectangle
* is displayed.
*/
- virtual bool setSwallowedWidget( QWidget *widget );
+ virtual bool setSwallowedWidget( TQWidget *widget );
/**
* This function has only effect in TreeList mode.
@@ -430,7 +430,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* This function has only effect in TreeList mode.
*
* This tells the widgets whether the root should be decorated.
- * For details see QListView::setRootIsDecorated
+ * For details see TQListView::setRootIsDecorated
*
* @param state Root will be decorated if true.
**/
@@ -459,7 +459,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* KJanusWidget, too. To be on the save side just don't keep
* the pointer to this widget.
*/
- /*virtual*/ void addWidgetBelowList( QWidget * widget ); // ### KDE4
+ /*virtual*/ void addWidgetBelowList( TQWidget * widget ); // ### KDE4
/**
* Add a button at the bottom of the TreeList/IconList.
@@ -471,7 +471,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @since 3.2
*/
- /*virtual*/ void addButtonBelowList( const QString & text, QObject * recv,
+ /*virtual*/ void addButtonBelowList( const TQString & text, TQObject * recv,
const char * slot ); //### KDE4
/**
@@ -485,7 +485,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @since 3.2
*/
- /*virtual*/ void addButtonBelowList( const KGuiItem & guiitem, QObject *
+ /*virtual*/ void addButtonBelowList( const KGuiItem & guiitem, TQObject *
recv, const char * slot ); //### KDE4
/**
@@ -507,14 +507,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param path The path for which this icon should be shown.
* @param pixmap The icon used.
**/
- virtual void setFolderIcon(const QStringList &path, const QPixmap &pixmap);
+ virtual void setFolderIcon(const TQStringList &path, const TQPixmap &pixmap);
/**
* Returns the title string associated with a page index in TreeList or IconList mode.
* @param index The index of the page or null if there is no such page.
* @see pageIndex()
* @since 3.2
*/
- /*virtual*/ QString pageTitle(int index) const;
+ /*virtual*/ TQString pageTitle(int index) const;
/**
* Returns the page widget associated with a page index or null if there is
* no such page.
@@ -522,7 +522,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @see pageIndex()
* @since 3.2
*/
- /*virtual*/ QWidget *pageWidget(int index) const;
+ /*virtual*/ TQWidget *pageWidget(int index) const;
signals:
/**
@@ -530,7 +530,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param page the new page.
* @since 3.4
*/
- void aboutToShowPage(QWidget *page);
+ void aboutToShowPage(TQWidget *page);
public slots:
/**
@@ -543,7 +543,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Reimplemented to handle the splitter width when the the face
* is TreeList
*/
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
/**
* This function is used internally when in IconList mode. If you
@@ -553,46 +553,46 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param o Object that has received an event.
* @param e The event.
*/
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
private slots:
bool slotShowPage();
void slotFontChanged();
- void slotItemClicked(QListViewItem *it);
- void pageGone(QObject *obj); // signal from the added page's "destroyed" signal
- void slotReopen(QListViewItem *item);
+ void slotItemClicked(TQListViewItem *it);
+ void pageGone(TQObject *obj); // signal from the added page's "destroyed" signal
+ void slotReopen(TQListViewItem *item);
protected:
- bool showPage( QWidget *w );
- void addPageWidget( QFrame *page, const QStringList &items,
- const QString &header, const QPixmap &pixmap );
- void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page);
- QWidget *FindParent();
+ bool showPage( TQWidget *w );
+ void addPageWidget( TQFrame *page, const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap );
+ void InsertTreeListItem(const TQStringList &items, const TQPixmap &pixmap, TQFrame *page);
+ TQWidget *FindParent();
private:
bool mValid;
// Obsolete members. Remove in KDE 4.
- QPtrList<QWidget> *mPageList;
- QStringList *mTitleList;
+ TQPtrList<TQWidget> *mPageList;
+ TQStringList *mTitleList;
int mFace;
KListView *mTreeList;
IconListBox *mIconList;
- QWidgetStack *mPageStack;
- QLabel *mTitleLabel;
- QTabWidget *mTabControl;
- QFrame *mPlainPage;
- QWidget *mSwallowPage;
- QWidget *mActivePageWidget;
+ TQWidgetStack *mPageStack;
+ TQLabel *mTitleLabel;
+ TQTabWidget *mTabControl;
+ TQFrame *mPlainPage;
+ TQWidget *mSwallowPage;
+ TQWidget *mActivePageWidget;
KSeparator *mTitleSep;
- QSplitter::ResizeMode mTreeListResizeMode;
+ TQSplitter::ResizeMode mTreeListResizeMode;
bool mShowIconsInTreeList;
- QMap<QListViewItem *, QWidget *> mTreeListToPageStack;
- QMap<QListBoxItem *, QWidget *> mIconListToPageStack;
- QMap<QString, QPixmap> mFolderIconMap;
- QMap<QString, QStringList> mChildrenNames;
- QMap<QString, QWidget *> mChildPages;
+ TQMap<TQListViewItem *, TQWidget *> mTreeListToPageStack;
+ TQMap<TQListBoxItem *, TQWidget *> mIconListToPageStack;
+ TQMap<TQString, TQPixmap> mFolderIconMap;
+ TQMap<TQString, TQStringList> mChildrenNames;
+ TQMap<TQString, TQWidget *> mChildPages;
public:
class IconListItem;
diff --git a/kdeui/kkeybutton.cpp b/kdeui/kkeybutton.cpp
index 0472ab495..581d7bf40 100644
--- a/kdeui/kkeybutton.cpp
+++ b/kdeui/kkeybutton.cpp
@@ -21,9 +21,9 @@
#include "kkeybutton.h"
#include "kshortcutdialog.h"
-#include <qcursor.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqcursor.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kglobalaccel.h>
@@ -65,13 +65,13 @@ class KKeyButtonPrivate
/* */
/***********************************************************************/
-KKeyButton::KKeyButton(QWidget *parent, const char *name)
-: QPushButton( parent, name )
+KKeyButton::KKeyButton(TQWidget *parent, const char *name)
+: TQPushButton( parent, name )
{
d = new KKeyButtonPrivate;
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
m_bEditing = false;
- connect( this, SIGNAL(clicked()), this, SLOT(captureShortcut()) );
+ connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) );
setShortcut( KShortcut(), true );
}
@@ -84,8 +84,8 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut )
{
d->bQtShortcut = bQtShortcut;
m_cut = cut;
- QString keyStr = m_cut.toString();
- keyStr.replace('&', QString::fromLatin1("&&"));
+ TQString keyStr = m_cut.toString();
+ keyStr.replace('&', TQString::fromLatin1("&&"));
setText( keyStr.isEmpty() ? i18n("None") : keyStr );
}
@@ -95,9 +95,9 @@ void KKeyButton::setShortcut( const KShortcut& cut )
setShortcut( cut, false );
}
-void KKeyButton::setText( const QString& text )
+void KKeyButton::setText( const TQString& text )
{
- QPushButton::setText( text );
+ TQPushButton::setText( text );
setFixedSize( sizeHint().width()+12, sizeHint().height()+8 );
}
@@ -120,15 +120,15 @@ void KKeyButton::captureShortcut()
repaint();
}
-void KKeyButton::drawButton( QPainter *painter )
+void KKeyButton::drawButton( TQPainter *painter )
{
- QPointArray a( 4 );
+ TQPointArray a( 4 );
a.setPoint( 0, 0, 0) ;
a.setPoint( 1, width(), 0 );
a.setPoint( 2, 0, height() );
a.setPoint( 3, 0, 0 );
- QRegion r1( a );
+ TQRegion r1( a );
painter->setClipRegion( r1 );
painter->setBrush( backgroundColor().light() );
painter->drawRoundRect( 0, 0, width(), height(), 20, 20);
@@ -138,7 +138,7 @@ void KKeyButton::drawButton( QPainter *painter )
a.setPoint( 2, 0, height() );
a.setPoint( 3, width(), height() );
- QRegion r2( a );
+ TQRegion r2( a );
painter->setClipRegion( r2 );
painter->setBrush( backgroundColor().dark() );
painter->drawRoundRect( 0, 0, width(), height(), 20, 20 );
diff --git a/kdeui/kkeybutton.h b/kdeui/kkeybutton.h
index ebebfdb90..9e9b6265c 100644
--- a/kdeui/kkeybutton.h
+++ b/kdeui/kkeybutton.h
@@ -20,7 +20,7 @@
#ifndef _KKEYBUTTON_H_
#define _KKEYBUTTON_H_
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kshortcut.h>
/**
@@ -45,7 +45,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Constructs key button widget.
*/
- KKeyButton( QWidget *parent = 0, const char *name = 0 );
+ KKeyButton( TQWidget *parent = 0, const char *name = 0 );
/**
* Destructs the key button widget.
*/
@@ -61,7 +61,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Reimplemented for internal purposes.
*/
- void setText( const QString& text );
+ void setText( const TQString& text );
signals:
void capturedShortcut( const KShortcut& );
@@ -80,7 +80,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Reimplemented for internal reasons.
*/
- void drawButton( QPainter* _painter );
+ void drawButton( TQPainter* _painter );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kkeydialog.cpp b/kdeui/kkeydialog.cpp
index 5f831767a..13835b650 100644
--- a/kdeui/kkeydialog.cpp
+++ b/kdeui/kkeydialog.cpp
@@ -25,15 +25,15 @@
#include <string.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <kaccel.h>
#include <kaction.h>
@@ -59,7 +59,7 @@
#define XK_MISCELLANY
#include <X11/Xlib.h> // For x11Event()
#include <X11/keysymdef.h> // For XK_...
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#ifdef KeyPress
const int XFocusOut = FocusOut;
@@ -80,23 +80,23 @@ const int XKeyRelease = KeyRelease;
class KKeyChooserItem : public KListViewItem
{
public:
- KKeyChooserItem( KListView* parent, QListViewItem* after, KShortcutList* pList, uint iAction );
- KKeyChooserItem( QListViewItem* parent, QListViewItem* after, KShortcutList* pList, uint iAction );
+ KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction );
+ KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction );
- QString actionName() const;
+ TQString actionName() const;
const KShortcut& shortcut() const;
bool isConfigurable() const
{ return m_pList->isConfigurable( m_iAction ); }
const KShortcut& shortcutDefault() const
{ return m_pList->shortcutDefault( m_iAction ); }
- QString whatsThis() const
+ TQString whatsThis() const
{ return m_pList->whatsThis( m_iAction ); }
void setShortcut( const KShortcut& cut );
void commitChanges();
- virtual QString text( int iCol ) const;
- virtual int compare( QListViewItem*, int iCol, bool bAscending ) const;
+ virtual TQString text( int iCol ) const;
+ virtual int compare( TQListViewItem*, int iCol, bool bAscending ) const;
protected:
KShortcutList* m_pList;
@@ -109,14 +109,14 @@ class KKeyChooserItem : public KListViewItem
class KKeyChooserWhatsThis : public QWhatsThis
{
public:
- KKeyChooserWhatsThis( QListView* listview )
- : QWhatsThis( listview->viewport() ), m_listView( listview ) {}
+ KKeyChooserWhatsThis( TQListView* listview )
+ : TQWhatsThis( listview->viewport() ), m_listView( listview ) {}
protected:
- virtual QString text( const QPoint& p );
+ virtual TQString text( const TQPoint& p );
private:
- QListView* m_listView;
+ TQListView* m_listView;
};
//---------------------------------------------------------------------
@@ -126,16 +126,16 @@ private:
class KKeyChooserPrivate
{
public:
- QValueList<KShortcutList*> rgpLists;
- QValueList<KShortcutList*> rgpListsAllocated;
+ TQValueList<KShortcutList*> rgpLists;
+ TQValueList<KShortcutList*> rgpListsAllocated;
KListView *pList;
- QLabel *lInfo;
+ TQLabel *lInfo;
KKeyButton *pbtnShortcut;
- QGroupBox *fCArea;
- QButtonGroup *kbGroup;
+ TQGroupBox *fCArea;
+ TQButtonGroup *kbGroup;
- QMap<QString, KShortcut> mapGlobals;
+ TQMap<TQString, KShortcut> mapGlobals;
// If this is set, then shortcuts require a modifier:
// so 'A' would not be valid, whereas 'Ctrl+A' would be.
@@ -151,45 +151,45 @@ class KKeyChooserPrivate
// KKeyChooser
//---------------------------------------------------------------------
-KKeyChooser::KKeyChooser( QWidget* parent, ActionType type, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( TQWidget* parent, ActionType type, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( type, bAllowLetterShortcuts );
}
-KKeyChooser::KKeyChooser( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( Application, bAllowLetterShortcuts );
insert( coll );
}
-KKeyChooser::KKeyChooser( KAccel* pAccel, QWidget* parent, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( Application, bAllowLetterShortcuts );
insert( pAccel );
}
-KKeyChooser::KKeyChooser( KGlobalAccel* pAccel, QWidget* parent )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KGlobalAccel* pAccel, TQWidget* parent )
+: TQWidget( parent )
{
initGUI( ApplicationGlobal, false );
insert( pAccel );
}
-KKeyChooser::KKeyChooser( KShortcutList* pList, QWidget* parent, ActionType type, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( type, bAllowLetterShortcuts );
insert( pList );
}
-KKeyChooser::KKeyChooser( KAccel* actions, QWidget* parent,
+KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey )
-: QWidget( parent )
+: TQWidget( parent )
{
ActionType type;
if( bAllowWinKey )
@@ -201,11 +201,11 @@ KKeyChooser::KKeyChooser( KAccel* actions, QWidget* parent,
insert( actions );
}
-KKeyChooser::KKeyChooser( KGlobalAccel* actions, QWidget* parent,
+KKeyChooser::KKeyChooser( KGlobalAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool /*bAllowWinKey*/ )
-: QWidget( parent )
+: TQWidget( parent )
{
ActionType type = (bCheckAgainstStdKeys) ? ApplicationGlobal : Global;
@@ -218,8 +218,8 @@ KKeyChooser::KKeyChooser( KGlobalAccel* actions, QWidget* parent,
// (just checking against kdeglobals isn't enough, the shortcuts
// might have changed in KKeyChooser and not being saved yet).
// Also used when reassigning a shortcut from one chooser to another.
-static QValueList< KKeyChooser* >* allChoosers = NULL;
-static KStaticDeleter< QValueList< KKeyChooser* > > allChoosersDeleter;
+static TQValueList< KKeyChooser* >* allChoosers = NULL;
+static KStaticDeleter< TQValueList< KKeyChooser* > > allChoosersDeleter;
KKeyChooser::~KKeyChooser()
{
@@ -232,12 +232,12 @@ KKeyChooser::~KKeyChooser()
bool KKeyChooser::insert( KActionCollection *pColl)
{
- return insert(pColl, QString::null);
+ return insert(pColl, TQString::null);
}
-bool KKeyChooser::insert( KActionCollection* pColl, const QString &title )
+bool KKeyChooser::insert( KActionCollection* pColl, const TQString &title )
{
- QString str = title;
+ TQString str = title;
if ( title.isEmpty() && pColl->instance()
&& pColl->instance()->aboutData() )
str = pColl->instance()->aboutData()->programName();
@@ -266,7 +266,7 @@ bool KKeyChooser::insert( KGlobalAccel* pAccel )
bool KKeyChooser::insert( KShortcutList* pList )
{
d->rgpLists.append( pList );
- buildListView( d->rgpLists.count() - 1, QString::null );
+ buildListView( d->rgpLists.count() - 1, TQString::null );
return true;
}
@@ -274,7 +274,7 @@ void KKeyChooser::commitChanges()
{
kdDebug(125) << "KKeyChooser::commitChanges()" << endl;
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem )
@@ -309,43 +309,43 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
// Items are added to topLayout as they are created.
//
- QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
//
// ADD SEARCHLINE
//
- QHBoxLayout* searchLayout = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ TQHBoxLayout* searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint());
topLayout->addLayout(searchLayout, 10);
- QToolButton *clearSearch = new QToolButton(this);
+ TQToolButton *clearSearch = new TQToolButton(this);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
searchLayout->addWidget(clearSearch);
- QLabel* slbl = new QLabel(i18n("&Search:"), this);
+ TQLabel* slbl = new TQLabel(i18n("&Search:"), this);
searchLayout->addWidget(slbl);
KListViewSearchLine* listViewSearch = new KListViewSearchLine(this);
searchLayout->addWidget(listViewSearch);
slbl->setBuddy(listViewSearch);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
- QString wtstr = i18n("Search interactively for shortcut names (e.g. Copy) "
+ TQString wtstr = i18n("Search interactively for shortcut names (e.g. Copy) "
"or combination of keys (e.g. Ctrl+C) by typing them here.");
- QWhatsThis::add(slbl, wtstr);
- QWhatsThis::add(listViewSearch, wtstr);
+ TQWhatsThis::add(slbl, wtstr);
+ TQWhatsThis::add(listViewSearch, wtstr);
//
// CREATE SPLIT LIST BOX
//
// fill up the split list box with the action/key pairs.
//
- QGridLayout *stackLayout = new QGridLayout(2, 2, 2);
+ TQGridLayout *stackLayout = new TQGridLayout(2, 2, 2);
topLayout->addLayout( stackLayout, 10 );
stackLayout->setRowStretch( 1, 10 ); // Only list will stretch
d->pList = new KListView( this );
listViewSearch->setListView(d->pList); // Plug into search line
- QValueList<int> columns;
+ TQValueList<int> columns;
columns.append(0);
listViewSearch->setSearchColumns(columns);
@@ -356,7 +356,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
"shown in the left column and keys or combination "
"of keys (e.g. Ctrl+V) shown in the right column.");
- QWhatsThis::add( d->pList, wtstr );
+ TQWhatsThis::add( d->pList, wtstr );
new KKeyChooserWhatsThis( d->pList );
d->pList->setAllColumnsShowFocus( true );
@@ -364,71 +364,71 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
d->pList->addColumn(i18n("Shortcut"));
d->pList->addColumn(i18n("Alternate"));
- connect( d->pList, SIGNAL(currentChanged(QListViewItem*)),
- SLOT(slotListItemSelected(QListViewItem*)) );
+ connect( d->pList, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ TQT_SLOT(slotListItemSelected(TQListViewItem*)) );
// handle double clicking an item
- connect ( d->pList, SIGNAL ( doubleClicked ( QListViewItem *, const QPoint &, int ) ),
- SLOT ( captureCurrentItem()) );
- connect ( d->pList, SIGNAL ( spacePressed( QListViewItem* )), SLOT( captureCurrentItem()));
+ connect ( d->pList, TQT_SIGNAL ( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT ( captureCurrentItem()) );
+ connect ( d->pList, TQT_SIGNAL ( spacePressed( TQListViewItem* )), TQT_SLOT( captureCurrentItem()));
//
// CREATE CHOOSE KEY GROUP
//
- d->fCArea = new QGroupBox( this );
+ d->fCArea = new TQGroupBox( this );
topLayout->addWidget( d->fCArea, 1 );
d->fCArea->setTitle( i18n("Shortcut for Selected Action") );
- d->fCArea->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
+ d->fCArea->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
//
// CHOOSE KEY GROUP LAYOUT MANAGER
//
- QGridLayout *grid = new QGridLayout( d->fCArea, 3, 4, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( d->fCArea, 3, 4, KDialog::spacingHint() );
grid->addRowSpacing( 0, fontMetrics().lineSpacing() );
- d->kbGroup = new QButtonGroup( d->fCArea );
+ d->kbGroup = new TQButtonGroup( d->fCArea );
d->kbGroup->hide();
d->kbGroup->setExclusive( true );
- m_prbNone = new QRadioButton( i18n("no key", "&None"), d->fCArea );
+ m_prbNone = new TQRadioButton( i18n("no key", "&None"), d->fCArea );
d->kbGroup->insert( m_prbNone, NoKey );
m_prbNone->setEnabled( false );
//grid->addMultiCellWidget( rb, 1, 1, 1, 2 );
grid->addWidget( m_prbNone, 1, 0 );
- QWhatsThis::add( m_prbNone, i18n("The selected action will not be associated with any key.") );
- connect( m_prbNone, SIGNAL(clicked()), SLOT(slotNoKey()) );
+ TQWhatsThis::add( m_prbNone, i18n("The selected action will not be associated with any key.") );
+ connect( m_prbNone, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()) );
- m_prbDef = new QRadioButton( i18n("default key", "De&fault"), d->fCArea );
+ m_prbDef = new TQRadioButton( i18n("default key", "De&fault"), d->fCArea );
d->kbGroup->insert( m_prbDef, DefaultKey );
m_prbDef->setEnabled( false );
//grid->addMultiCellWidget( rb, 2, 2, 1, 2 );
grid->addWidget( m_prbDef, 1, 1 );
- QWhatsThis::add( m_prbDef, i18n("This will bind the default key to the selected action. Usually a reasonable choice.") );
- connect( m_prbDef, SIGNAL(clicked()), SLOT(slotDefaultKey()) );
+ TQWhatsThis::add( m_prbDef, i18n("This will bind the default key to the selected action. Usually a reasonable choice.") );
+ connect( m_prbDef, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultKey()) );
- m_prbCustom = new QRadioButton( i18n("C&ustom"), d->fCArea );
+ m_prbCustom = new TQRadioButton( i18n("C&ustom"), d->fCArea );
d->kbGroup->insert( m_prbCustom, CustomKey );
m_prbCustom->setEnabled( false );
//grid->addMultiCellWidget( rb, 3, 3, 1, 2 );
grid->addWidget( m_prbCustom, 1, 2 );
- QWhatsThis::add( m_prbCustom, i18n("If this option is selected you can create a customized key binding for the"
+ TQWhatsThis::add( m_prbCustom, i18n("If this option is selected you can create a customized key binding for the"
" selected action using the buttons below.") );
- connect( m_prbCustom, SIGNAL(clicked()), SLOT(slotCustomKey()) );
+ connect( m_prbCustom, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey()) );
- //connect( d->kbGroup, SIGNAL( clicked( int ) ), SLOT( keyMode( int ) ) );
+ //connect( d->kbGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( keyMode( int ) ) );
- QBoxLayout *pushLayout = new QHBoxLayout( KDialog::spacingHint() );
+ TQBoxLayout *pushLayout = new TQHBoxLayout( KDialog::spacingHint() );
grid->addLayout( pushLayout, 1, 3 );
d->pbtnShortcut = new KKeyButton(d->fCArea, "key");
d->pbtnShortcut->setEnabled( false );
- connect( d->pbtnShortcut, SIGNAL(capturedShortcut(const KShortcut&)), SLOT(capturedShortcut(const KShortcut&)) );
+ connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)) );
grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 );
wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, "
"you can press the key-combination which you would like to be assigned "
"to the currently selected action.");
- QWhatsThis::add( d->pbtnShortcut, wtstr );
+ TQWhatsThis::add( d->pbtnShortcut, wtstr );
//
// Add widgets to the geometry manager
@@ -437,28 +437,28 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
pushLayout->addWidget( d->pbtnShortcut );
pushLayout->addStretch( 10 );
- d->lInfo = new QLabel(d->fCArea);
+ d->lInfo = new TQLabel(d->fCArea);
//resize(0,0);
//d->lInfo->setAlignment( AlignCenter );
//d->lInfo->setEnabled( false );
//d->lInfo->hide();
grid->addMultiCellWidget( d->lInfo, 2, 2, 0, 3 );
- //d->globalDict = new QDict<int> ( 100, false );
+ //d->globalDict = new TQDict<int> ( 100, false );
//d->globalDict->setAutoDelete( true );
readGlobalKeys();
- //d->stdDict = new QDict<int> ( 100, false );
+ //d->stdDict = new TQDict<int> ( 100, false );
//d->stdDict->setAutoDelete( true );
//if (type == Application || type == ApplicationGlobal)
// readStdKeys();
- connect( kapp, SIGNAL( settingsChanged( int )), SLOT( slotSettingsChanged( int )));
+ connect( kapp, TQT_SIGNAL( settingsChanged( int )), TQT_SLOT( slotSettingsChanged( int )));
if( allChoosers == NULL )
- allChoosers = allChoosersDeleter.setObject( allChoosers, new QValueList< KKeyChooser* > );
+ allChoosers = allChoosersDeleter.setObject( allChoosers, new TQValueList< KKeyChooser* > );
allChoosers->append( this );
}
// Add all shortcuts to the list
-void KKeyChooser::buildListView( uint iList, const QString &title )
+void KKeyChooser::buildListView( uint iList, const TQString &title )
{
KShortcutList* pList = d->rgpLists[iList];
KActionShortcutList *pAList = dynamic_cast<KActionShortcutList*>(pList);
@@ -467,14 +467,14 @@ void KKeyChooser::buildListView( uint iList, const QString &title )
d->pList->setSorting( -1 );
KListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem;
- QString str = (title.isEmpty() ? i18n("Shortcuts") : title);
+ TQString str = (title.isEmpty() ? i18n("Shortcuts") : title);
pParentItem = pProgramItem = pItem = new KListViewItem( d->pList, str );
pParentItem->setExpandable( true );
pParentItem->setOpen( true );
pParentItem->setSelectable( false );
uint nSize = pList->count();
for( uint iAction = 0; iAction < nSize; iAction++ ) {
- QString sName = pList->name(iAction);
+ TQString sName = pList->name(iAction);
kdDebug(125) << "Key: " << sName << endl;
if( sName.startsWith( "Program:" ) ) {
pItem = new KListViewItem( d->pList, pProgramItem, pList->label(iAction) );
@@ -495,7 +495,7 @@ void KKeyChooser::buildListView( uint iList, const QString &title )
} else if( !sName.isEmpty() && sName != "unnamed" && pList->isConfigurable(iAction) ) {
pItem = new KKeyChooserItem( pParentItem, pItem, pList, iAction );
if(pAList)
- pItem->setPixmap(0,pAList->action(iAction)->iconSet().pixmap(QIconSet::Small,QIconSet::Normal));
+ pItem->setPixmap(0,pAList->action(iAction)->iconSet().pixmap(TQIconSet::Small,TQIconSet::Normal));
}
}
if( !pProgramItem->firstChild() )
@@ -527,13 +527,13 @@ void KKeyChooser::updateButtons()
const KShortcut& cutDef = pItem->shortcutDefault();
// Set key strings
- QString keyStrCfg = pItem->shortcut().toString();
- QString keyStrDef = cutDef.toString();
+ TQString keyStrCfg = pItem->shortcut().toString();
+ TQString keyStrDef = cutDef.toString();
d->pbtnShortcut->setShortcut( pItem->shortcut(), bQtShortcut );
//item->setText( 1, keyStrCfg );
pItem->repaint();
- d->lInfo->setText( i18n("Default key:") + QString(" %1").arg(keyStrDef.isEmpty() ? i18n("None") : keyStrDef) );
+ d->lInfo->setText( i18n("Default key:") + TQString(" %1").arg(keyStrDef.isEmpty() ? i18n("None") : keyStrDef) );
// Select the appropriate radio button.
int index = (pItem->shortcut().isNull()) ? NoKey
@@ -585,10 +585,10 @@ void KKeyChooser::readGlobalKeys()
readGlobalKeys( d->mapGlobals );
}
-void KKeyChooser::readGlobalKeys( QMap< QString, KShortcut >& map )
+void KKeyChooser::readGlobalKeys( TQMap< TQString, KShortcut >& map )
{
- QMap<QString, QString> mapEntry = KGlobal::config()->entryMap( "Global Shortcuts" );
- QMap<QString, QString>::Iterator it( mapEntry.begin() );
+ TQMap<TQString, TQString> mapEntry = KGlobal::config()->entryMap( "Global Shortcuts" );
+ TQMap<TQString, TQString>::Iterator it( mapEntry.begin() );
for( uint i = 0; it != mapEntry.end(); ++it, i++ )
map[it.key()] = KShortcut(*it);
}
@@ -599,7 +599,7 @@ void KKeyChooser::slotSettingsChanged( int category )
readGlobalKeys(); // reread
}
-void KKeyChooser::fontChange( const QFont & )
+void KKeyChooser::fontChange( const TQFont & )
{
d->fCArea->setMinimumHeight( 4*d->pbtnShortcut->sizeHint().height() );
@@ -616,7 +616,7 @@ void KKeyChooser::allDefault()
{
kdDebug(125) << "KKeyChooser::allDefault()" << endl;
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem )
@@ -627,12 +627,12 @@ void KKeyChooser::allDefault()
emit keyChange();
}
-void KKeyChooser::slotListItemSelected( QListViewItem* )
+void KKeyChooser::slotListItemSelected( TQListViewItem* )
{
updateButtons();
}
-void KKeyChooser::slotListItemDoubleClicked ( QListViewItem *, const QPoint & , int )
+void KKeyChooser::slotListItemDoubleClicked ( TQListViewItem *, const TQPoint & , int )
{ // KDE4 dump this
captureCurrentItem();
}
@@ -675,21 +675,21 @@ void KKeyChooser::listSync()
}*/
}
-void KKeyChooser::syncToConfig( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset )
+void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset )
{
kdDebug(125) << "KKeyChooser::syncToConfig( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
if( !pConfig )
pConfig = KGlobal::config();
KConfigGroupSaver cgs( pConfig, sConfigGroup );
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem ) {
- QString sEntry = pConfig->readEntry( pItem->actionName() );
+ TQString sEntry = pConfig->readEntry( pItem->actionName() );
if( !sEntry.isNull() || bClearUnset ) {
if( sEntry == "none" )
- sEntry = QString::null;
+ sEntry = TQString::null;
pItem->setShortcut( sEntry );
}
kdDebug(125) << pItem->actionName() << " = " << pItem->shortcut().toStringInternal() << endl;
@@ -711,10 +711,10 @@ void KKeyChooser::setShortcut( const KShortcut& cut )
const KKey& key = seq.key(0);
if( !d->bAllowLetterShortcuts && key.modFlags() == 0
- && key.sym() < 0x3000 && QChar(key.sym()).isLetterOrNumber() ) {
- QString s = i18n( "In order to use the '%1' key as a shortcut, "
+ && key.sym() < 0x3000 && TQChar(key.sym()).isLetterOrNumber() ) {
+ TQString s = i18n( "In order to use the '%1' key as a shortcut, "
"it must be combined with the "
- "Win, Alt, Ctrl, and/or Shift keys." ).arg(QChar(key.sym()));
+ "Win, Alt, Ctrl, and/or Shift keys." ).arg(TQChar(key.sym()));
KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") );
return;
}
@@ -760,7 +760,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
bool has_global_chooser = false;
bool has_standard_chooser = false;
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
has_global_chooser |= ((*it)->m_type == Global);
@@ -778,7 +778,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
// only check the global keys if one of the keychoosers isn't global
if( !has_global_chooser ) {
if( checkGlobalShortcutsConflict( cut, bWarnUser, this, d->mapGlobals,
- m_type == Global ? pItem->actionName() : QString::null ))
+ m_type == Global ? pItem->actionName() : TQString::null ))
return true;
}
@@ -786,7 +786,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
return true;
// check also other KKeyChooser's
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != this && (*it)->isKeyPresentLocally( cut, NULL, bWarnUser ))
@@ -796,7 +796,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
}
// KDE4 remove
-bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const QString& warnText )
+bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText )
{
return isKeyPresentLocally( cut, ignoreItem, !warnText.isNull());
}
@@ -807,7 +807,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig
return false;
// Search for shortcut conflicts with other actions in the
// lists we're configuring.
- for( QListViewItemIterator it( d->pList ); it.current(); ++it ) {
+ for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) {
KKeyChooserItem* pItem2 = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem2 && pItem2 != ignoreItem ) {
int iSeq = keyConflict( cut, pItem2->shortcut() );
@@ -828,7 +828,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig
return false;
}
-bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent )
+bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent )
{
// For each key sequence in the shortcut,
for( uint i = 0; i < cut.count(); i++ ) {
@@ -846,17 +846,17 @@ bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWa
return false;
}
-bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent )
+bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent )
{
- QMap< QString, KShortcut > map;
+ TQMap< TQString, KShortcut > map;
readGlobalKeys( map );
- return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, QString::null );
+ return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, TQString::null );
}
-bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent,
- const QMap< QString, KShortcut >& map, const QString& ignoreAction )
+bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent,
+ const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction )
{
- QMap<QString, KShortcut>::ConstIterator it;
+ TQMap<TQString, KShortcut>::ConstIterator it;
for( it = map.begin(); it != map.end(); ++it ) {
int iSeq = keyConflict( cut, (*it) );
if( iSeq > -1 ) {
@@ -872,11 +872,11 @@ bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarn
return false;
}
-void KKeyChooser::removeStandardShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
+void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
{
bool was_in_choosers = false;
if( allChoosers != NULL ) {
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != chooser && (*it)->m_type == Standard ) {
@@ -896,11 +896,11 @@ void KKeyChooser::removeStandardShortcut( const QString& name, KKeyChooser* choo
}
}
-void KKeyChooser::removeGlobalShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
+void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
{
bool was_in_choosers = false;
if( allChoosers != NULL ) {
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != chooser && (*it)->m_type == Global ) {
@@ -917,9 +917,9 @@ void KKeyChooser::removeGlobalShortcut( const QString& name, KKeyChooser* choose
}
}
-bool KKeyChooser::removeShortcut( const QString& name, const KShortcut &cut )
+bool KKeyChooser::removeShortcut( const TQString& name, const KShortcut &cut )
{
- for( QListViewItemIterator it( d->pList ); it.current(); ++it ) {
+ for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) {
KKeyChooserItem* pItem2 = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem2 && pItem2->actionName() == name ) {
// remove the shortcut from it
@@ -935,11 +935,11 @@ bool KKeyChooser::removeShortcut( const QString& name, const KShortcut &cut )
}
// KDE4 remove this
-void KKeyChooser::_warning( const KKeySequence& cut, QString sAction, QString sTitle )
+void KKeyChooser::_warning( const KKeySequence& cut, TQString sAction, TQString sTitle )
{
sAction = sAction.stripWhiteSpace();
- QString s =
+ TQString s =
i18n("The '%1' key combination has already been allocated "
"to the \"%2\" action.\n"
"Please choose a unique key combination.").
@@ -948,12 +948,12 @@ void KKeyChooser::_warning( const KKeySequence& cut, QString sAction, QString sT
KMessageBox::sorry( this, s, sTitle );
}
-bool KKeyChooser::promptForReassign( const KKeySequence& cut, const QString& sAction, ActionType type, QWidget* parent )
+bool KKeyChooser::promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType type, TQWidget* parent )
{
if(cut.isNull())
return true;
- QString sTitle;
- QString s;
+ TQString sTitle;
+ TQString s;
if( type == Standard ) {
sTitle = i18n("Conflict with Standard Application Shortcut");
s = i18n("The '%1' key combination has already been allocated "
@@ -978,7 +978,7 @@ bool KKeyChooser::promptForReassign( const KKeySequence& cut, const QString& sAc
}
//---------------------------------------------------
-KKeyChooserItem::KKeyChooserItem( KListView* parent, QListViewItem* after, KShortcutList* pList, uint iAction )
+KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction )
: KListViewItem( parent, after )
{
m_pList = pList;
@@ -987,7 +987,7 @@ KKeyChooserItem::KKeyChooserItem( KListView* parent, QListViewItem* after, KShor
m_cut = m_pList->shortcut(m_iAction);
}
-KKeyChooserItem::KKeyChooserItem( QListViewItem* parent, QListViewItem* after, KShortcutList* pList, uint iAction )
+KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction )
: KListViewItem( parent, after )
{
m_pList = pList;
@@ -996,7 +996,7 @@ KKeyChooserItem::KKeyChooserItem( QListViewItem* parent, QListViewItem* after, K
m_cut = m_pList->shortcut(m_iAction);
}
-QString KKeyChooserItem::actionName() const
+TQString KKeyChooserItem::actionName() const
{
return m_pList->name(m_iAction);
}
@@ -1019,12 +1019,12 @@ void KKeyChooserItem::commitChanges()
m_pList->setShortcut( m_iAction, m_cut );
}
-QString KKeyChooserItem::text( int iCol ) const
+TQString KKeyChooserItem::text( int iCol ) const
{
if( iCol == 0 ) {
// Quick HACK to get rid of '&'s.
- QString s = m_pList->label(m_iAction);
- QString s2;
+ TQString s = m_pList->label(m_iAction);
+ TQString s2;
for( uint i = 0; i < s.length(); i++ )
if( s[i] != '&' || ( i+1<s.length() && s[i+1] == '&' ) )
s2 += s[i];
@@ -1033,17 +1033,17 @@ QString KKeyChooserItem::text( int iCol ) const
else if( iCol <= (int) m_cut.count() )
return m_cut.seq(iCol-1).toString();
else
- return QString::null;
+ return TQString::null;
}
-int KKeyChooserItem::compare( QListViewItem* item, int iCol, bool bAscending ) const
+int KKeyChooserItem::compare( TQListViewItem* item, int iCol, bool bAscending ) const
{
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>( item );
if( iCol == 0 && pItem ) {
- QString psName1 = m_pList->name(m_iAction);
- QString psName2 = pItem->m_pList->name(pItem->m_iAction);
- QRegExp rxNumber1( " (\\d+)$" );
- QRegExp rxNumber2( " (\\d+)$" );
+ TQString psName1 = m_pList->name(m_iAction);
+ TQString psName2 = pItem->m_pList->name(pItem->m_iAction);
+ TQRegExp rxNumber1( " (\\d+)$" );
+ TQRegExp rxNumber2( " (\\d+)$" );
int iNumber1 = rxNumber1.search( psName1 );
int iNumber2 = rxNumber2.search( psName2 );
@@ -1055,23 +1055,23 @@ int KKeyChooserItem::compare( QListViewItem* item, int iCol, bool bAscending ) c
}
}
- return QListViewItem::compare( item, iCol, bAscending );
+ return TQListViewItem::compare( item, iCol, bAscending );
}
////
-QString KKeyChooserWhatsThis::text( const QPoint& p ) {
+TQString KKeyChooserWhatsThis::text( const TQPoint& p ) {
if ( !m_listView )
- return QString::null;
+ return TQString::null;
- const QListViewItem* item = m_listView->itemAt( p );
+ const TQListViewItem* item = m_listView->itemAt( p );
const KKeyChooserItem* pItem = dynamic_cast<const KKeyChooserItem*>(item);
if ( !pItem )
- return QWhatsThis::textFor( m_listView );
+ return TQWhatsThis::textFor( m_listView );
- const QString itemWhatsThis = pItem->whatsThis();
+ const TQString itemWhatsThis = pItem->whatsThis();
if ( itemWhatsThis.isEmpty() )
- return QWhatsThis::textFor( m_listView );
+ return TQWhatsThis::textFor( m_listView );
return itemWhatsThis;
}
@@ -1087,27 +1087,27 @@ QString KKeyChooserWhatsThis::text( const QPoint& p ) {
/* (by using KDialogBase there is almost no code left ;) */
/* */
/************************************************************************/
-KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts, QWidget *parent, const char* name )
+KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts, TQWidget *parent, const char* name )
: KDialogBase( parent, name ? name : "kkeydialog", true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_pKeyChooser = new KKeyChooser( this, type, bAllowLetterShortcuts );
setMainWidget( m_pKeyChooser );
- connect( this, SIGNAL(defaultClicked()), m_pKeyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) );
KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" );
- QSize sz = size();
+ TQSize sz = size();
resize( group.readSizeEntry( "Dialog Size", &sz ) );
}
-KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, QWidget *parent, const char* name )
+KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char* name )
: KDialogBase( parent, name ? name : "kkeydialog", true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_pKeyChooser = new KKeyChooser( this, KKeyChooser::Application, bAllowLetterShortcuts );
setMainWidget( m_pKeyChooser );
- connect( this, SIGNAL(defaultClicked()), m_pKeyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) );
KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" );
- QSize sz = size();
+ TQSize sz = size();
resize( group.readSizeEntry( "Dialog Size", &sz ) );
}
@@ -1122,7 +1122,7 @@ bool KKeyDialog::insert( KActionCollection* pColl )
return m_pKeyChooser->insert( pColl );
}
-bool KKeyDialog::insert(KActionCollection *pColl, const QString &title)
+bool KKeyDialog::insert(KActionCollection *pColl, const TQString &title)
{
return m_pKeyChooser->insert(pColl, title);
}
@@ -1144,22 +1144,22 @@ void KKeyDialog::commitChanges()
m_pKeyChooser->commitChanges();
}
-int KKeyDialog::configure( KActionCollection* coll, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KActionCollection* coll, TQWidget* parent, bool bSaveSettings )
{
return configure( coll, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KAccel* keys, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KAccel* keys, TQWidget* parent, bool bSaveSettings )
{
return configure( keys, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KGlobalAccel* keys, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KGlobalAccel* keys, TQWidget* parent, bool bSaveSettings )
{
return configure( keys, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
KKeyDialog dlg( bAllowLetterShortcuts, parent );
dlg.m_pKeyChooser->insert( keys );
@@ -1169,7 +1169,7 @@ int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, QWidget *pa
return b;
}
-int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
KKeyDialog dlg( KKeyChooser::ApplicationGlobal, bAllowLetterShortcuts, parent );
dlg.m_pKeyChooser->insert( keys );
@@ -1179,7 +1179,7 @@ int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidg
return b;
}
-int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << bSaveSettings << " )" << endl;
KKeyDialog dlg( bAllowLetterShortcuts, parent );
@@ -1187,7 +1187,7 @@ int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts,
return dlg.configure( bSaveSettings );
}
-/*int KKeyDialog::configure( KActionPtrList* coll, const QString& file, QWidget *parent, bool bSaveSettings )
+/*int KKeyDialog::configure( KActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings )
{
kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << file << ", " << bSaveSettings << " )" << endl;
KAccelActions actions;
diff --git a/kdeui/kkeydialog.h b/kdeui/kkeydialog.h
index c7bfc36dc..a67676e50 100644
--- a/kdeui/kkeydialog.h
+++ b/kdeui/kkeydialog.h
@@ -21,7 +21,7 @@
#ifndef __KKEYDIALOG_H__
#define __KKEYDIALOG_H__
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klistview.h>
@@ -69,7 +69,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
**/
- KKeyChooser( QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
+ KKeyChooser( TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
/**
* \overload
* @param parent parent widget
@@ -77,11 +77,11 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
*/
- KKeyChooser( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true );
- KKeyChooser( KAccel* actions, QWidget* parent, bool bAllowLetterShortcuts = true );
- KKeyChooser( KGlobalAccel* actions, QWidget* parent );
- KKeyChooser( KShortcutList*, QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KGlobalAccel* actions, TQWidget* parent );
+ KKeyChooser( KShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
virtual ~KKeyChooser();
@@ -96,9 +96,9 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param title subtree title of this collection of shortcut.
* @since 3.1
*/
- bool insert( KActionCollection *, const QString &title);
+ bool insert( KActionCollection *, const TQString &title);
- void syncToConfig( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset );
+ void syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset );
/**
* This function writes any shortcut changes back to the original
@@ -127,7 +127,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
*
* @since 3.2
*/
- static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, QWidget* parent );
+ static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent );
/**
* Checks whether the given shortcut conflicts with standard keyboard shortcuts.
@@ -142,7 +142,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
*
* @since 3.2
*/
- static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, QWidget* parent );
+ static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent );
signals:
/**
@@ -172,25 +172,25 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
bool insert( KGlobalAccel* );
bool insert( KShortcutList* );
/// @since 3.1
- void buildListView( uint iList, const QString &title = QString::null );
+ void buildListView( uint iList, const TQString &title = TQString::null );
void readGlobalKeys();
void updateButtons();
- void fontChange( const QFont& _font );
+ void fontChange( const TQFont& _font );
void setShortcut( const KShortcut& cut );
bool isKeyPresent( const KShortcut& cut, bool warnuser = true );
- bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const QString& warnText );
- void _warning( const KKeySequence& seq, QString sAction, QString sTitle );
+ bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText );
+ void _warning( const KKeySequence& seq, TQString sAction, TQString sTitle );
protected slots:
void slotNoKey();
void slotDefaultKey();
void slotCustomKey();
- void slotListItemSelected( QListViewItem *item );
+ void slotListItemSelected( TQListViewItem *item );
void capturedShortcut( const KShortcut& cut );
void slotSettingsChanged( int );
- void slotListItemDoubleClicked ( QListViewItem * ipoQListViewItem, const QPoint & ipoQPoint, int c );
+ void slotListItemDoubleClicked ( TQListViewItem * ipoQListViewItem, const TQPoint & ipoQPoint, int c );
protected:
ActionType m_type;
@@ -200,24 +200,24 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
// otherwise aDefaultKeycode.
bool m_bPreferFourModifierKeys;
- QRadioButton* m_prbNone;
- QRadioButton* m_prbDef;
- QRadioButton* m_prbCustom;
+ TQRadioButton* m_prbNone;
+ TQRadioButton* m_prbDef;
+ TQRadioButton* m_prbCustom;
private:
bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser );
- static bool promptForReassign( const KKeySequence& cut, const QString& sAction, ActionType action, QWidget* parent );
+ static bool promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType action, TQWidget* parent );
// Remove the key sequences contained in cut from the standard shortcut @p name
// which currently has @p origCut as shortcut.
- static void removeStandardShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
+ static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
// Remove the key sequences contained in cut from the global shortcut @p name
// which currently has @p origCut as shortcut.
- static void removeGlobalShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
- static void readGlobalKeys( QMap< QString, KShortcut >& map );
- static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent,
- const QMap< QString, KShortcut >& map, const QString& ignoreAction );
+ static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
+ static void readGlobalKeys( TQMap< TQString, KShortcut >& map );
+ static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent,
+ const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction );
// Remove the key sequences contained in cut from this item
- bool removeShortcut( const QString& name, const KShortcut &cut );
+ bool removeShortcut( const TQString& name, const KShortcut &cut );
private slots:
void captureCurrentItem();
@@ -227,14 +227,14 @@ private slots:
/**
* @obsolete
*/
- KKeyChooser( KAccel* actions, QWidget* parent,
+ KKeyChooser( KAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey = false );
/**
* @obsolete
*/
- KKeyChooser( KGlobalAccel* actions, QWidget* parent,
+ KKeyChooser( KGlobalAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey = false );
@@ -281,7 +281,7 @@ public:
* Set @p bAllowLetterShortcuts to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
*/
- KKeyDialog( bool bAllowLetterShortcuts = true, QWidget* parent = 0, const char* name = 0 );
+ KKeyDialog( bool bAllowLetterShortcuts = true, TQWidget* parent = 0, const char* name = 0 );
/**
* Destructor. Deletes all resources used by a KKeyDialog object.
@@ -310,7 +310,7 @@ public:
* @return true :)
* @since 3.1
*/
- bool insert(KActionCollection *, const QString &title);
+ bool insert(KActionCollection *, const TQString &title);
/**
* Run the dialog and call commitChanges() if @p bSaveSettings
@@ -332,20 +332,20 @@ public:
* the *uirc file which they were intially read from.
* @return Accept if the dialog was closed with OK, Reject otherwise.
*/
- static int configure( KActionCollection* coll, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true );
/**
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function, except that settings
* are saved to a *.rc file using KConfig.
*/
- static int configure( KAccel* keys, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true );
/**
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
*/
- static int configure( KGlobalAccel* keys, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KGlobalAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true );
/**
@@ -359,42 +359,42 @@ public:
* @param bSaveSettings if true, the settings will also be saved back to
* the *uirc file which they were intially read from.
*/
- static int configure( KActionCollection* coll, bool bAllowLetterShortcuts, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
/**
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
**/
- static int configure( KAccel* keys, bool bAllowLetterShortcuts, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
/**
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
**/
- static int configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, TQWidget* parent = 0 )
{ return configure( keys, parent, save_settings ); }
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KGlobalAccel* keys, bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KGlobalAccel* keys, bool save_settings = true, TQWidget* parent = 0 )
{ return configure( keys, parent, save_settings ); }
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const QString& /*xmlfile*/,
- bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const TQString& /*xmlfile*/,
+ bool save_settings = true, TQWidget* parent = 0 )
{ return configure( coll, parent, save_settings ); }
private:
- KKeyDialog( KKeyChooser::ActionType, bool bAllowLetterShortcuts = true, QWidget* parent = 0, const char* name = 0 );
+ KKeyDialog( KKeyChooser::ActionType, bool bAllowLetterShortcuts = true, TQWidget* parent = 0, const char* name = 0 );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/klanguagebutton.cpp b/kdeui/klanguagebutton.cpp
index ed70b5ea0..7bb7a87ba 100644
--- a/kdeui/klanguagebutton.cpp
+++ b/kdeui/klanguagebutton.cpp
@@ -22,16 +22,16 @@
*/
#define INCLUDE_MENUITEM_DEF
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "klanguagebutton.h"
#include "klanguagebutton.moc"
#include <kdebug.h>
-static void checkInsertPos( QPopupMenu *popup, const QString & str,
+static void checkInsertPos( TQPopupMenu *popup, const TQString & str,
int &index )
{
if ( index == -1 )
@@ -57,15 +57,15 @@ static void checkInsertPos( QPopupMenu *popup, const QString & str,
Q_ASSERT( a == b );
}
-static QPopupMenu * checkInsertIndex( QPopupMenu *popup,
- const QStringList *tags, const QString &submenu )
+static TQPopupMenu * checkInsertIndex( TQPopupMenu *popup,
+ const TQStringList *tags, const TQString &submenu )
{
int pos = tags->findIndex( submenu );
- QPopupMenu *pi = 0;
+ TQPopupMenu *pi = 0;
if ( pos != -1 )
{
- QMenuItem *p = popup->findItem( pos );
+ TQMenuItem *p = popup->findItem( pos );
pi = p ? p->popup() : 0;
}
if ( !pi )
@@ -77,29 +77,29 @@ static QPopupMenu * checkInsertIndex( QPopupMenu *popup,
class KLanguageButtonPrivate
{
public:
- QPushButton * button;
+ TQPushButton * button;
bool staticText;
};
-KLanguageButton::KLanguageButton( QWidget * parent, const char *name )
- : QWidget( parent, name )
+KLanguageButton::KLanguageButton( TQWidget * parent, const char *name )
+ : TQWidget( parent, name )
{
init(name);
}
-KLanguageButton::KLanguageButton( const QString & text, QWidget * parent, const char *name )
- : QWidget( parent, name )
+KLanguageButton::KLanguageButton( const TQString & text, TQWidget * parent, const char *name )
+ : TQWidget( parent, name )
{
init(name);
setText(text);
}
-void KLanguageButton::setText(const QString & text)
+void KLanguageButton::setText(const TQString & text)
{
d->staticText = true;
d->button->setText(text);
- d->button->setIconSet(QIconSet()); // remove the icon
+ d->button->setIconSet(TQIconSet()); // remove the icon
}
void KLanguageButton::init(const char * name)
@@ -112,9 +112,9 @@ void KLanguageButton::init(const char * name)
d->staticText = false;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, 0);
layout->setAutoAdd(true);
- d->button = new QPushButton( this, name ); // HPB don't touch this!!
+ d->button = new TQPushButton( this, name ); // HPB don't touch this!!
clear();
}
@@ -128,60 +128,60 @@ KLanguageButton::~KLanguageButton()
}
-void KLanguageButton::insertLanguage( const QString& path, const QString& name,
- const QString&, const QString &submenu, int index )
+void KLanguageButton::insertLanguage( const TQString& path, const TQString& name,
+ const TQString&, const TQString &submenu, int index )
{
- QString output = name + QString::fromLatin1( " (" ) + path +
- QString::fromLatin1( ")" );
+ TQString output = name + TQString::fromLatin1( " (" ) + path +
+ TQString::fromLatin1( ")" );
#if 0
// Nooooo ! Country != language
- QPixmap flag( locate( "locale", sub + path +
- QString::fromLatin1( "/flag.png" ) ) );
+ TQPixmap flag( locate( "locale", sub + path +
+ TQString::fromLatin1( "/flag.png" ) ) );
#endif
insertItem( output, path, submenu, index );
}
-void KLanguageButton::insertItem( const QIconSet& icon, const QString &text,
- const QString & id, const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString & id, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
checkInsertPos( pi, text, index );
pi->insertItem( icon, text, count(), index );
m_ids->append( id );
}
-void KLanguageButton::insertItem( const QString &text, const QString & id,
- const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQString &text, const TQString & id,
+ const TQString &submenu, int index )
{
- insertItem( QIconSet(), text, id, submenu, index );
+ insertItem( TQIconSet(), text, id, submenu, index );
}
-void KLanguageButton::insertSeparator( const QString &submenu, int index )
+void KLanguageButton::insertSeparator( const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
pi->insertSeparator( index );
- m_ids->append( QString::null );
+ m_ids->append( TQString::null );
}
-void KLanguageButton::insertSubmenu( const QIconSet & icon,
- const QString &text, const QString &id,
- const QString &submenu, int index )
+void KLanguageButton::insertSubmenu( const TQIconSet & icon,
+ const TQString &text, const TQString &id,
+ const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
- QPopupMenu *p = new QPopupMenu( pi );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *p = new TQPopupMenu( pi );
checkInsertPos( pi, text, index );
pi->insertItem( icon, text, p, count(), index );
m_ids->append( id );
- connect( p, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( p, SIGNAL( highlighted( int ) ), this,
- SLOT( slotHighlighted( int ) ) );
+ connect( p, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( p, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotHighlighted( int ) ) );
}
-void KLanguageButton::insertSubmenu( const QString &text, const QString &id,
- const QString &submenu, int index )
+void KLanguageButton::insertSubmenu( const TQString &text, const TQString &id,
+ const TQString &submenu, int index )
{
- insertSubmenu(QIconSet(), text, id, submenu, index);
+ insertSubmenu(TQIconSet(), text, id, submenu, index);
}
void KLanguageButton::slotActivated( int index )
@@ -191,7 +191,7 @@ void KLanguageButton::slotActivated( int index )
setCurrentItem( index );
// Forward event from popup menu as if it was emitted from this widget:
- QString id = *m_ids->at( index );
+ TQString id = *m_ids->at( index );
emit activated( id );
}
@@ -199,7 +199,7 @@ void KLanguageButton::slotHighlighted( int index )
{
//kdDebug() << "slotHighlighted" << index << endl;
- QString id = *m_ids->at( index );
+ TQString id = *m_ids->at( index );
emit ( highlighted(id) );
}
@@ -214,39 +214,39 @@ void KLanguageButton::clear()
delete m_oldPopup;
m_oldPopup = m_popup;
- m_popup = new QPopupMenu( this );
+ m_popup = new TQPopupMenu( this );
d->button->setPopup( m_popup );
- connect( m_popup, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( m_popup, SIGNAL( highlighted( int ) ),
- SLOT( slotHighlighted( int ) ) );
+ connect( m_popup, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( m_popup, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotHighlighted( int ) ) );
if ( !d->staticText )
{
- d->button->setText( QString::null );
- d->button->setIconSet( QIconSet() );
+ d->button->setText( TQString::null );
+ d->button->setIconSet( TQIconSet() );
}
}
-bool KLanguageButton::contains( const QString & id ) const
+bool KLanguageButton::contains( const TQString & id ) const
{
return m_ids->contains( id ) > 0;
}
-QString KLanguageButton::current() const
+TQString KLanguageButton::current() const
{
return *m_ids->at( currentItem() );
}
-QString KLanguageButton::id( int i ) const
+TQString KLanguageButton::id( int i ) const
{
if ( i < 0 || i >= count() )
{
kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl;
- return QString::null;
+ return TQString::null;
}
return *m_ids->at( i );
}
@@ -266,15 +266,15 @@ void KLanguageButton::setCurrentItem( int i )
if ( !d->staticText )
{
d->button->setText( m_popup->text( m_current ) );
- QIconSet *icon = m_popup->iconSet( m_current );
+ TQIconSet *icon = m_popup->iconSet( m_current );
if ( icon )
d->button->setIconSet( *icon );
else
- d->button->setIconSet( QIconSet() );
+ d->button->setIconSet( TQIconSet() );
}
}
-void KLanguageButton::setCurrentItem( const QString & id )
+void KLanguageButton::setCurrentItem( const TQString & id )
{
int i = m_ids->findIndex( id );
if ( id.isNull() )
diff --git a/kdeui/klanguagebutton.h b/kdeui/klanguagebutton.h
index d354b4b77..b7f0c9a8f 100644
--- a/kdeui/klanguagebutton.h
+++ b/kdeui/klanguagebutton.h
@@ -27,7 +27,7 @@
#ifndef __KLANGBUTTON_H__
#define __KLANGBUTTON_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -55,7 +55,7 @@ public:
* @param parent The parent of the combo box
* @param name The name of the combo box
*/
- KLanguageButton(QWidget * parent = 0, const char * name = 0);
+ KLanguageButton(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a version with static text. The parent parent is called name.
@@ -64,7 +64,7 @@ public:
* @param parent The parent of the button
* @param name The name of the button
*/
- KLanguageButton(const QString & text, QWidget * parent = 0, const char * name = 0);
+ KLanguageButton(const TQString & text, TQWidget * parent = 0, const char * name = 0);
/**
* Deconstructor
@@ -80,8 +80,8 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertItem( const QIconSet& icon, const QString &text,
- const QString & id, const QString &submenu = QString::null,
+ void insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString & id, const TQString &submenu = TQString::null,
int index = -1 );
/**
* Inserts an item into the combo box. A negative index will append the item.
@@ -91,15 +91,15 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertItem( const QString &text, const QString & id,
- const QString &submenu = QString::null, int index = -1 );
+ void insertItem( const TQString &text, const TQString & id,
+ const TQString &submenu = TQString::null, int index = -1 );
/**
* Inserts a seperator item into the combo box. A negative index will append the item.
*
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSeparator( const QString &submenu = QString::null,
+ void insertSeparator( const TQString &submenu = TQString::null,
int index = -1 );
/**
* Inserts a submenu into the combo box. A negative index will append the item.
@@ -110,8 +110,8 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSubmenu( const QIconSet & icon, const QString &text,
- const QString & id, const QString &submenu = QString::null,
+ void insertSubmenu( const TQIconSet & icon, const TQString &text,
+ const TQString & id, const TQString &submenu = TQString::null,
int index = -1);
/**
* Inserts a submenu into the combo box. A negative index will append the item.
@@ -121,13 +121,13 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSubmenu( const QString &text, const QString & id,
- const QString &submenu = QString::null, int index = -1);
+ void insertSubmenu( const TQString &text, const TQString & id,
+ const TQString &submenu = TQString::null, int index = -1);
- void insertLanguage( const QString& path, const QString& name,
- const QString& sub = QString::null,
- const QString &submenu = QString::null, int index = -1);
+ void insertLanguage( const TQString& path, const TQString& name,
+ const TQString& sub = TQString::null,
+ const TQString &submenu = TQString::null, int index = -1);
int count() const;
@@ -138,29 +138,29 @@ public:
/**
* Changes the current text item of the combobox, and makes the text static.
*/
- void setText(const QString & text);
+ void setText(const TQString & text);
/**
* Returns the id of the combobox's current item.
*/
- QString current() const;
+ TQString current() const;
/**
* Returns TRUE if the combobox contains id.
*/
- bool contains( const QString & id ) const;
+ bool contains( const TQString & id ) const;
/**
* Sets id as current item.
*/
- void setCurrentItem( const QString & id );
+ void setCurrentItem( const TQString & id );
- QString id( int i ) const;
+ TQString id( int i ) const;
signals:
/**
* This signal is emitted when a new item is activated. The id is
* the identificator of the selected item.
*/
- void activated( const QString & id );
- void highlighted( const QString & id );
+ void activated( const TQString & id );
+ void highlighted( const TQString & id );
private slots:
void slotActivated( int );
@@ -172,8 +172,8 @@ private:
void init(const char * name);
// work space for the new class
- QStringList *m_ids;
- QPopupMenu *m_popup, *m_oldPopup;
+ TQStringList *m_ids;
+ TQPopupMenu *m_popup, *m_oldPopup;
int m_current;
KLanguageButtonPrivate * d;
diff --git a/kdeui/kled.cpp b/kdeui/kled.cpp
index 6a8d7c5e0..b7980203b 100644
--- a/kdeui/kled.cpp
+++ b/kdeui/kled.cpp
@@ -22,14 +22,14 @@
#undef PAINT_BENCH
#ifdef PAINT_BENCH
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#endif
-#include <qpainter.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kapplication.h>
#include <kpixmapeffect.h>
#include "kled.h"
@@ -40,20 +40,20 @@ class KLed::KLedPrivate
friend class KLed;
int dark_factor;
- QColor offcolor;
- QPixmap *off_map;
- QPixmap *on_map;
+ TQColor offcolor;
+ TQPixmap *off_map;
+ TQPixmap *on_map;
};
-KLed::KLed(QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
{
- QColor col(green);
+ TQColor col(green);
d = new KLed::KLedPrivate;
d->dark_factor = 300;
d->offcolor = col.dark(300);
@@ -64,8 +64,8 @@ KLed::KLed(QWidget *parent, const char *name)
}
-KLed::KLed(const QColor& col, QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
@@ -80,9 +80,9 @@ KLed::KLed(const QColor& col, QWidget *parent, const char *name)
//setShape(Circular);
}
-KLed::KLed(const QColor& col, KLed::State state,
- KLed::Look look, KLed::Shape shape, QWidget *parent, const char *name )
- : QWidget(parent, name),
+KLed::KLed(const TQColor& col, KLed::State state,
+ KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name )
+ : TQWidget(parent, name),
led_state(state),
led_look(look),
led_shape(shape)
@@ -106,11 +106,11 @@ KLed::~KLed()
}
void
-KLed::paintEvent(QPaintEvent *)
+KLed::paintEvent(TQPaintEvent *)
{
#ifdef PAINT_BENCH
const int rounds = 1000;
- QTime t;
+ TQTime t;
t.start();
for (int i=0; i<rounds; i++) {
#endif
@@ -180,13 +180,13 @@ KLed::paintCachedPixmap()
{
if (led_state) {
if (d->on_map) {
- QPainter paint(this);
+ TQPainter paint(this);
paint.drawPixmap(0, 0, *d->on_map);
return true;
}
} else {
if (d->off_map) {
- QPainter paint(this);
+ TQPainter paint(this);
paint.drawPixmap(0, 0, *d->off_map);
return true;
}
@@ -200,20 +200,20 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width + 6, width + 6);
+ tmpMap = new TQPixmap(width + 6, width + 6);
tmpMap->fill(paletteBackgroundColor());
// start painting widget
@@ -225,7 +225,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn with a thin gray "border" (pen)
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
pen.setWidth( scale );
@@ -241,12 +241,12 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
paint.end();
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -258,20 +258,20 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// Initialize coordinates, width, and height of the LED
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width + 6, width + 6);
+ tmpMap = new TQPixmap(width + 6, width + 6);
tmpMap->fill(paletteBackgroundColor());
paint.begin(tmpMap);
@@ -280,7 +280,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -328,7 +328,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
color = colorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 2, 2, width, width );
@@ -336,12 +336,12 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
paint.end();
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -353,21 +353,21 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// First of all we want to know what area should be updated
// Initialize coordinates, width, and height of the LED
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width, width);
+ tmpMap = new TQPixmap(width, width);
tmpMap->fill(paletteBackgroundColor());
paint.begin(tmpMap);
@@ -376,7 +376,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -421,7 +421,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// from the upper left.
pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs?
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
// Set the initial color value to colorGroup().light() (bright) and start
@@ -443,12 +443,12 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -458,10 +458,10 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
void
KLed::paintRect()
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
- QPen pen(led_color.dark(300));
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
+ TQPen pen(led_color.dark(300));
int w=width();
int h=height();
// -----
@@ -489,13 +489,13 @@ KLed::paintRect()
void
KLed::paintRectFrame(bool raised)
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
int w=width();
int h=height();
- QColor black=Qt::black;
- QColor white=Qt::white;
+ TQColor black=Qt::black;
+ TQColor white=Qt::white;
// -----
if(raised)
{
@@ -569,7 +569,7 @@ KLed::setShape(KLed::Shape s)
}
void
-KLed::setColor(const QColor& col)
+KLed::setColor(const TQColor& col)
{
if(led_color!=col) {
if(d->on_map) { delete d->on_map; d->on_map = 0; }
@@ -629,13 +629,13 @@ KLed::off()
QSize
KLed::sizeHint() const
{
- return QSize(16, 16);
+ return TQSize(16, 16);
}
QSize
KLed::minimumSizeHint() const
{
- return QSize(16, 16 );
+ return TQSize(16, 16 );
}
void KLed::virtual_hook( int, void* )
diff --git a/kdeui/kled.h b/kdeui/kled.h
index 3e417feb9..723c4b6da 100644
--- a/kdeui/kled.h
+++ b/kdeui/kled.h
@@ -23,7 +23,7 @@
#ifndef _KLED_H_
#define _KLED_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
class QColor;
@@ -49,7 +49,7 @@ class KDEUI_EXPORT KLed : public QWidget
Q_PROPERTY( State state READ state WRITE setState )
Q_PROPERTY( Shape shape READ shape WRITE setShape )
Q_PROPERTY( Look look READ look WRITE setLook )
- Q_PROPERTY( QColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
Q_PROPERTY( int darkFactor READ darkFactor WRITE setDarkFactor )
public:
@@ -92,18 +92,18 @@ public:
* Constructs a green, round LED widget which will initially
* be turned on.
*/
- KLed(QWidget *parent=0, const char *name=0);
+ KLed(TQWidget *parent=0, const char *name=0);
/**
* Constructor with the ledcolor, the parent widget, and the name.
*
* The State will be defaulted On and the Look round.
*
* @param col Initial color of the LED.
- * @param parent Will be handed over to QWidget.
- * @param name Will be handed over to QWidget.
+ * @param parent Will be handed over to TQWidget.
+ * @param name Will be handed over to TQWidget.
* @short Constructor
*/
- KLed(const QColor &col, QWidget *parent=0, const char *name=0);
+ KLed(const TQColor &col, TQWidget *parent=0, const char *name=0);
/**
* Constructor with the ledcolor, ledstate, ledlook,
@@ -115,12 +115,12 @@ public:
* @param state Sets the State.
* @param look Sets the Look.
* @param shape Sets the Shape (rectangular or circular)
- * @param parent Will be handed over to QWidget.
- * @param name Will be handed over to QWidget.
+ * @param parent Will be handed over to TQWidget.
+ * @param name Will be handed over to TQWidget.
* @short Constructor
*/
- KLed(const QColor& col, KLed::State state, KLed::Look look, KLed::Shape shape,
- QWidget *parent=0, const char *name=0);
+ KLed(const TQColor& col, KLed::State state, KLed::Look look, KLed::Shape shape,
+ TQWidget *parent=0, const char *name=0);
/**
@@ -145,7 +145,7 @@ public:
* @see Color
* @short Returns LED color.
*/
- QColor color() const;
+ TQColor color() const;
/**
* Returns the look of the widget.
@@ -191,7 +191,7 @@ public:
/**
* Set the color of the widget.
* The Color is shown with the KLed::On state.
- * The KLed::Off state is shown with QColor.dark() method
+ * The KLed::Off state is shown with TQColor.dark() method
*
* The widget calls the update() method, so it will
* be updated when entering the main event loop.
@@ -201,11 +201,11 @@ public:
* @param color New color of the LED.
* @short Sets the LED color.
*/
- void setColor(const QColor& color);
+ void setColor(const TQColor& color);
/**
* Sets the factor to darken the LED in OFF state.
- * Same as QColor::dark().
+ * Same as TQColor::dark().
* "darkfactor should be greater than 100, else the LED gets lighter
* in OFF state.
* Defaults to 300.
@@ -221,7 +221,7 @@ public:
* Sets the color of the widget.
* The Color is shown with the KLed::On state.
* darkcolor is explicidly used for the off state of the LED.
- * Normally you don't have to use this method, the setColor(const QColor& color) is sufficient for the task.
+ * Normally you don't have to use this method, the setColor(const TQColor& color) is sufficient for the task.
*
* The widget calls the update() method, so it will
* be updated when entering the main event loop.
@@ -232,7 +232,7 @@ public:
* @param darkcolor Dark color of the LED used for off state.
* @short Sets the light and dark LED color.
*
- void setColor(const QColor& color, const QColor& darkcolor);
+ void setColor(const TQColor& color, const TQColor& darkcolor);
*/
/**
@@ -249,8 +249,8 @@ public:
*/
void setLook( Look look );
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
@@ -300,7 +300,7 @@ protected:
*/
virtual void paintRectFrame(bool raised);
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
/**
* Compute LED width
@@ -315,7 +315,7 @@ protected:
private:
State led_state;
- QColor led_color;
+ TQColor led_color;
Look led_look;
Shape led_shape;
diff --git a/kdeui/klineedit.cpp b/kdeui/klineedit.cpp
index 309bd4283..f89f4cf25 100644
--- a/kdeui/klineedit.cpp
+++ b/kdeui/klineedit.cpp
@@ -25,12 +25,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kconfig.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kcursor.h>
#include <klocale.h>
#include <kstdaccel.h>
@@ -79,8 +79,8 @@ public:
static bool initialized;
static bool backspacePerformsCompletion; // Configuration option
- QColor previousHighlightColor;
- QColor previousHighlightedTextColor;
+ TQColor previousHighlightColor;
+ TQColor previousHighlightedTextColor;
bool userSelection: 1;
bool autoSuggest : 1;
@@ -92,10 +92,10 @@ public:
int squeezedEnd;
int squeezedStart;
BackgroundMode bgMode;
- QString squeezedText;
+ TQString squeezedText;
KCompletionBox *completionBox;
- QString clickMessage;
+ TQString clickMessage;
bool drawClickMsg:1;
};
@@ -103,14 +103,14 @@ bool KLineEdit::KLineEditPrivate::backspacePerformsCompletion = false;
bool KLineEdit::KLineEditPrivate::initialized = false;
-KLineEdit::KLineEdit( const QString &string, QWidget *parent, const char *name )
- :QLineEdit( string, parent, name )
+KLineEdit::KLineEdit( const TQString &string, TQWidget *parent, const char *name )
+ :TQLineEdit( string, parent, name )
{
init();
}
-KLineEdit::KLineEdit( QWidget *parent, const char *name )
- :QLineEdit( parent, name )
+KLineEdit::KLineEdit( TQWidget *parent, const char *name )
+ :TQLineEdit( parent, name )
{
init();
}
@@ -136,13 +136,13 @@ void KLineEdit::init()
d->autoSuggest = (mode == KGlobalSettings::CompletionMan ||
mode == KGlobalSettings::CompletionPopupAuto ||
mode == KGlobalSettings::CompletionAuto);
- connect( this, SIGNAL(selectionChanged()), this, SLOT(slotRestoreSelectionColors()));
+ connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotRestoreSelectionColors()));
- QPalette p = palette();
+ TQPalette p = palette();
if ( !d->previousHighlightedTextColor.isValid() )
- d->previousHighlightedTextColor=p.color(QPalette::Normal,QColorGroup::HighlightedText);
+ d->previousHighlightedTextColor=p.color(TQPalette::Normal,TQColorGroup::HighlightedText);
if ( !d->previousHighlightColor.isValid() )
- d->previousHighlightColor=p.color(QPalette::Normal,QColorGroup::Highlight);
+ d->previousHighlightColor=p.color(TQPalette::Normal,TQColorGroup::Highlight);
d->drawClickMsg = false;
}
@@ -158,7 +158,7 @@ void KLineEdit::setCompletionMode( KGlobalSettings::Completion mode )
// If the widgets echo mode is not Normal, no completion
// feature will be enabled even if one is requested.
- if ( echoMode() != QLineEdit::Normal )
+ if ( echoMode() != TQLineEdit::Normal )
mode = KGlobalSettings::CompletionNone; // Override the request.
if ( kapp && !kapp->authorize("lineedit_text_completion") )
@@ -174,12 +174,12 @@ void KLineEdit::setCompletionMode( KGlobalSettings::Completion mode )
KCompletionBase::setCompletionMode( mode );
}
-void KLineEdit::setCompletedText( const QString& t, bool marked )
+void KLineEdit::setCompletedText( const TQString& t, bool marked )
{
if ( !d->autoSuggest )
return;
- QString txt = text();
+ TQString txt = text();
if ( t != txt )
{
@@ -192,7 +192,7 @@ void KLineEdit::setCompletedText( const QString& t, bool marked )
}
-void KLineEdit::setCompletedText( const QString& text )
+void KLineEdit::setCompletedText( const TQString& text )
{
KGlobalSettings::Completion mode = completionMode();
bool marked = ( mode == KGlobalSettings::CompletionAuto ||
@@ -209,7 +209,7 @@ void KLineEdit::rotateText( KCompletionBase::KeyBindingType type )
(type == KCompletionBase::PrevCompletionMatch ||
type == KCompletionBase::NextCompletionMatch ) )
{
- QString input;
+ TQString input;
if (type == KCompletionBase::PrevCompletionMatch)
comp->previousMatch();
@@ -223,7 +223,7 @@ void KLineEdit::rotateText( KCompletionBase::KeyBindingType type )
}
}
-void KLineEdit::makeCompletion( const QString& text )
+void KLineEdit::makeCompletion( const TQString& text )
{
KCompletion *comp = compObj();
KGlobalSettings::Completion mode = completionMode();
@@ -231,7 +231,7 @@ void KLineEdit::makeCompletion( const QString& text )
if ( !comp || mode == KGlobalSettings::CompletionNone )
return; // No completion object...
- QString match = comp->makeCompletion( text );
+ TQString match = comp->makeCompletion( text );
if ( mode == KGlobalSettings::CompletionPopup ||
mode == KGlobalSettings::CompletionPopupAuto )
@@ -268,7 +268,7 @@ void KLineEdit::setReadOnly(bool readOnly)
if (readOnly == isReadOnly ())
return;
- QLineEdit::setReadOnly (readOnly);
+ TQLineEdit::setReadOnly (readOnly);
if (readOnly)
{
@@ -285,13 +285,13 @@ void KLineEdit::setReadOnly(bool readOnly)
if (!d->squeezedText.isEmpty())
{
setText(d->squeezedText);
- d->squeezedText = QString::null;
+ d->squeezedText = TQString::null;
}
setBackgroundMode (d->bgMode);
}
}
-void KLineEdit::setSqueezedText( const QString &text)
+void KLineEdit::setSqueezedText( const TQString &text)
{
setEnableSqueezedText(true);
setText(text);
@@ -307,7 +307,7 @@ bool KLineEdit::isSqueezedTextEnabled() const
return d->enableSqueezedText;
}
-void KLineEdit::setText( const QString& text )
+void KLineEdit::setText( const TQString& text )
{
d->drawClickMsg = text.isEmpty() && !d->clickMessage.isEmpty();
update();
@@ -319,22 +319,22 @@ void KLineEdit::setText( const QString& text )
return;
}
- QLineEdit::setText( text );
+ TQLineEdit::setText( text );
}
void KLineEdit::setSqueezedText()
{
d->squeezedStart = 0;
d->squeezedEnd = 0;
- QString fullText = d->squeezedText;
- QFontMetrics fm(fontMetrics());
+ TQString fullText = d->squeezedText;
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width() - 2*frameWidth() - 2;
int textWidth = fm.width(fullText);
if (textWidth > labelWidth)
{
// start with the dots only
- QString squeezedText = "...";
+ TQString squeezedText = "...";
int squeezedWidth = fm.width(squeezedText);
// estimate how many letters we can add to the dots on both sides
@@ -370,25 +370,25 @@ void KLineEdit::setSqueezedText()
if (letters < 5)
{
// too few letters added -> we give up squeezing
- QLineEdit::setText(fullText);
+ TQLineEdit::setText(fullText);
}
else
{
- QLineEdit::setText(squeezedText);
+ TQLineEdit::setText(squeezedText);
d->squeezedStart = letters;
d->squeezedEnd = fullText.length() - letters;
}
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
}
else
{
- QLineEdit::setText(fullText);
+ TQLineEdit::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
setCursorPosition(0);
@@ -397,7 +397,7 @@ void KLineEdit::setSqueezedText()
void KLineEdit::copy() const
{
if( !copySqueezedText(true))
- QLineEdit::copy();
+ TQLineEdit::copy();
}
bool KLineEdit::copySqueezedText(bool clipboard) const
@@ -418,26 +418,26 @@ bool KLineEdit::copySqueezedText(bool clipboard) const
end = d->squeezedEnd;
if (start == end)
return false;
- QString t = d->squeezedText;
+ TQString t = d->squeezedText;
t = t.mid(start, end - start);
- disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
- QApplication::clipboard()->setText( t, clipboard ? QClipboard::Clipboard : QClipboard::Selection );
- connect( QApplication::clipboard(), SIGNAL(selectionChanged()), this,
- SLOT(clipboardChanged()) );
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
+ TQApplication::clipboard()->setText( t, clipboard ? QClipboard::Clipboard : QClipboard::Selection );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this,
+ TQT_SLOT(clipboardChanged()) );
return true;
}
return false;
}
-void KLineEdit::resizeEvent( QResizeEvent * ev )
+void KLineEdit::resizeEvent( TQResizeEvent * ev )
{
if (!d->squeezedText.isEmpty())
setSqueezedText();
- QLineEdit::resizeEvent(ev);
+ TQLineEdit::resizeEvent(ev);
}
-void KLineEdit::keyPressEvent( QKeyEvent *e )
+void KLineEdit::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
@@ -453,7 +453,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
}
else if ( KStdAccel::pasteSelection().contains( key ) )
{
- QString text = QApplication::clipboard()->text( QClipboard::Selection);
+ TQString text = TQApplication::clipboard()->text( QClipboard::Selection);
insert( text );
deselect();
return;
@@ -521,7 +521,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
// Filter key-events if EchoMode is normal and
// completion mode is not set to CompletionNone
- if ( echoMode() == QLineEdit::Normal &&
+ if ( echoMode() == TQLineEdit::Normal &&
completionMode() != KGlobalSettings::CompletionNone )
{
KeyBindingMap keys = getKeyBindings();
@@ -538,13 +538,13 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
( e->key() == Key_Right || e->key() == Key_Left ) &&
e->state()==NoButton )
{
- QString old_txt = text();
+ TQString old_txt = text();
d->disableRestoreSelection = true;
int start,end;
getSelection(&start, &end);
deselect();
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
int cPosition=cursorPosition();
if (e->key() ==Key_Right && cPosition > start )
validateAndSet(old_txt, cPosition, cPosition, old_txt.length());
@@ -574,7 +574,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
if ( (mode == KGlobalSettings::CompletionAuto ||
mode == KGlobalSettings::CompletionMan) && noModifier )
{
- QString keycode = e->text();
+ TQString keycode = e->text();
if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() ||
e->key() == Key_Backspace || e->key() == Key_Delete ) )
{
@@ -599,10 +599,10 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
}
d->disableRestoreSelection = true;
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
d->disableRestoreSelection = false;
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( !hasSelectedText() && len /*&& cursorPosition() == len */)
{
@@ -643,7 +643,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
mode == KGlobalSettings::CompletionPopupAuto ) &&
noModifier && !e->text().isEmpty() )
{
- QString old_txt = text();
+ TQString old_txt = text();
bool hasUserSelection=d->userSelection;
bool hadSelection=hasSelectedText();
bool cursorNotAtEnd=false;
@@ -651,7 +651,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
int start,end;
getSelection(&start, &end);
int cPos = cursorPosition();
- QString keycode = e->text();
+ TQString keycode = e->text();
// When moving the cursor, we want to keep the autocompletion as an
// autocompletion, so we want to process events at the cursor position
@@ -669,13 +669,13 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
uint selectedLength=selectedText().length();
d->disableRestoreSelection = true;
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
d->disableRestoreSelection = false;
if (( selectedLength != selectedText().length() ) && !hasUserSelection )
slotRestoreSelectionColors(); // and set userSelection to true
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( txt != old_txt && len/* && ( cursorPosition() == len || force )*/ &&
@@ -733,7 +733,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
{
// Emit completion if the completion mode is CompletionShell
// and the cursor is at the end of the string.
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( cursorPosition() == len && len != 0 )
{
@@ -808,25 +808,25 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
uint selectedLength = selectedText().length();
- // Let QLineEdit handle any other keys events.
- QLineEdit::keyPressEvent ( e );
+ // Let TQLineEdit handle any other keys events.
+ TQLineEdit::keyPressEvent ( e );
if ( selectedLength != selectedText().length() )
slotRestoreSelectionColors(); // and set userSelection to true
}
-void KLineEdit::mouseDoubleClickEvent( QMouseEvent* e )
+void KLineEdit::mouseDoubleClickEvent( TQMouseEvent* e )
{
if ( e->button() == Qt::LeftButton )
{
possibleTripleClick=true;
- QTimer::singleShot( QApplication::doubleClickInterval(),this,
- SLOT(tripleClickTimeout()) );
+ TQTimer::singleShot( TQApplication::doubleClickInterval(),this,
+ TQT_SLOT(tripleClickTimeout()) );
}
- QLineEdit::mouseDoubleClickEvent( e );
+ TQLineEdit::mouseDoubleClickEvent( e );
}
-void KLineEdit::mousePressEvent( QMouseEvent* e )
+void KLineEdit::mousePressEvent( TQMouseEvent* e )
{
if ( possibleTripleClick && e->button() == Qt::LeftButton )
{
@@ -834,13 +834,13 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
e->accept();
return;
}
- QLineEdit::mousePressEvent( e );
+ TQLineEdit::mousePressEvent( e );
}
-void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
+void KLineEdit::mouseReleaseEvent( TQMouseEvent* e )
{
- QLineEdit::mouseReleaseEvent( e );
- if (QApplication::clipboard()->supportsSelection() ) {
+ TQLineEdit::mouseReleaseEvent( e );
+ if (TQApplication::clipboard()->supportsSelection() ) {
if ( e->button() == LeftButton ) {
// Fix copying of squeezed text if needed
copySqueezedText( false );
@@ -853,17 +853,17 @@ void KLineEdit::tripleClickTimeout()
possibleTripleClick=false;
}
-void KLineEdit::contextMenuEvent( QContextMenuEvent * e )
+void KLineEdit::contextMenuEvent( TQContextMenuEvent * e )
{
if ( m_bEnableMenu )
- QLineEdit::contextMenuEvent( e );
+ TQLineEdit::contextMenuEvent( e );
}
-QPopupMenu *KLineEdit::createPopupMenu()
+TQPopupMenu *KLineEdit::createPopupMenu()
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *popup = QLineEdit::createPopupMenu();
+ TQPopupMenu *popup = TQLineEdit::createPopupMenu();
int id = popup->idAt(0);
popup->changeItem( id - IdUndo, SmallIconSet("undo"), popup->text( id - IdUndo) );
@@ -878,9 +878,9 @@ QPopupMenu *KLineEdit::createPopupMenu()
// menu item.
if ( compObj() && !isReadOnly() && kapp->authorize("lineedit_text_completion") )
{
- QPopupMenu *subMenu = new QPopupMenu( popup );
- connect( subMenu, SIGNAL( activated( int ) ),
- this, SLOT( completionMenuActivated( int ) ) );
+ TQPopupMenu *subMenu = new TQPopupMenu( popup );
+ connect( subMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( completionMenuActivated( int ) ) );
popup->insertSeparator();
popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"),
@@ -964,14 +964,14 @@ void KLineEdit::completionMenuActivated( int id )
}
}
-void KLineEdit::drawContents( QPainter *p )
+void KLineEdit::drawContents( TQPainter *p )
{
- QLineEdit::drawContents( p );
+ TQLineEdit::drawContents( p );
if ( d->drawClickMsg && !hasFocus() ) {
- QPen tmp = p->pen();
- p->setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) );
- QRect cr = contentsRect();
+ TQPen tmp = p->pen();
+ p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
+ TQRect cr = contentsRect();
// Add two pixel margin on the left side
cr.rLeft() += 3;
@@ -980,13 +980,13 @@ void KLineEdit::drawContents( QPainter *p )
}
}
-void KLineEdit::dropEvent(QDropEvent *e)
+void KLineEdit::dropEvent(TQDropEvent *e)
{
d->drawClickMsg = false;
KURL::List urlList;
if( d->handleURLDrops && KURLDrag::decode( e, urlList ) )
{
- QString dropText = text();
+ TQString dropText = text();
KURL::List::ConstIterator it;
for( it = urlList.begin() ; it != urlList.end() ; ++it )
{
@@ -1001,26 +1001,26 @@ void KLineEdit::dropEvent(QDropEvent *e)
e->accept();
}
else
- QLineEdit::dropEvent(e);
+ TQLineEdit::dropEvent(e);
}
-bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
+bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev )
{
if( o == this )
{
KCursor::autoHideEventFilter( this, ev );
- if ( ev->type() == QEvent::AccelOverride )
+ if ( ev->type() == TQEvent::AccelOverride )
{
- QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( ev );
if (overrideAccel (e))
{
e->accept();
return true;
}
}
- else if( ev->type() == QEvent::KeyPress )
+ else if( ev->type() == TQEvent::KeyPress )
{
- QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( ev );
if( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
{
@@ -1033,7 +1033,7 @@ bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
// Qt will emit returnPressed() itself if we return false
if ( stopEvent )
{
- emit QLineEdit::returnPressed();
+ emit TQLineEdit::returnPressed();
e->accept ();
}
@@ -1051,7 +1051,7 @@ bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
}
}
}
- return QLineEdit::eventFilter( o, ev );
+ return TQLineEdit::eventFilter( o, ev );
}
@@ -1088,18 +1088,18 @@ void KLineEdit::setCompletionBox( KCompletionBox *box )
d->completionBox = box;
if ( handleSignals() )
{
- connect( d->completionBox, SIGNAL(highlighted( const QString& )),
- SLOT(setTextWorkaround( const QString& )) );
- connect( d->completionBox, SIGNAL(userCancelled( const QString& )),
- SLOT(userCancelled( const QString& )) );
+ connect( d->completionBox, TQT_SIGNAL(highlighted( const TQString& )),
+ TQT_SLOT(setTextWorkaround( const TQString& )) );
+ connect( d->completionBox, TQT_SIGNAL(userCancelled( const TQString& )),
+ TQT_SLOT(userCancelled( const TQString& )) );
// TODO: we need our own slot, and to call setModified(true) if Qt4 has that.
- connect( d->completionBox, SIGNAL( activated( const QString& )),
- SIGNAL(completionBoxActivated( const QString& )) );
+ connect( d->completionBox, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SIGNAL(completionBoxActivated( const TQString& )) );
}
}
-void KLineEdit::userCancelled(const QString & cancelText)
+void KLineEdit::userCancelled(const TQString & cancelText)
{
if ( completionMode() != KGlobalSettings::CompletionPopupAuto )
{
@@ -1115,14 +1115,14 @@ void KLineEdit::userCancelled(const QString & cancelText)
d->autoSuggest=false;
int start,end;
getSelection(&start, &end);
- QString s=text().remove(start, end-start+1);
+ TQString s=text().remove(start, end-start+1);
validateAndSet(s,start,s.length(),s.length());
d->autoSuggest=true;
}
}
}
-bool KLineEdit::overrideAccel (const QKeyEvent* e)
+bool KLineEdit::overrideAccel (const TQKeyEvent* e)
{
KShortcut scKey;
@@ -1192,14 +1192,14 @@ bool KLineEdit::overrideAccel (const QKeyEvent* e)
return false;
}
-void KLineEdit::setCompletedItems( const QStringList& items )
+void KLineEdit::setCompletedItems( const TQStringList& items )
{
setCompletedItems( items, true );
}
-void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
+void KLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest )
{
- QString txt;
+ TQString txt;
if ( d->completionBox && d->completionBox->isVisible() ) {
// The popup is visible already - do the matching on the initial string,
// not on the currently selected one.
@@ -1217,9 +1217,9 @@ void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
if ( d->completionBox->isVisible() )
{
bool wasSelected = d->completionBox->isSelected( d->completionBox->currentItem() );
- const QString currentSelection = d->completionBox->currentText();
+ const TQString currentSelection = d->completionBox->currentText();
d->completionBox->setItems( items );
- QListBoxItem* item = d->completionBox->findItem( currentSelection, Qt::ExactMatch );
+ TQListBoxItem* item = d->completionBox->findItem( currentSelection, Qt::ExactMatch );
// If no item is selected, that means the listbox hasn't been manipulated by the user yet,
// because it's not possible otherwise to have no selected item. In such case make
// always the first item current and unselected, so that the current item doesn't jump.
@@ -1247,7 +1247,7 @@ void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
if ( d->autoSuggest && autoSuggest )
{
int index = items.first().find( txt );
- QString newText = items.first().mid( index );
+ TQString newText = items.first().mid( index );
setUserSelection(false);
setCompletedText(newText,true);
}
@@ -1273,38 +1273,38 @@ void KLineEdit::setCompletionObject( KCompletion* comp, bool hsig )
{
KCompletion *oldComp = compObj();
if ( oldComp && handleSignals() )
- disconnect( oldComp, SIGNAL( matches( const QStringList& )),
- this, SLOT( setCompletedItems( const QStringList& )));
+ disconnect( oldComp, TQT_SIGNAL( matches( const TQStringList& )),
+ this, TQT_SLOT( setCompletedItems( const TQStringList& )));
if ( comp && hsig )
- connect( comp, SIGNAL( matches( const QStringList& )),
- this, SLOT( setCompletedItems( const QStringList& )));
+ connect( comp, TQT_SIGNAL( matches( const TQStringList& )),
+ this, TQT_SLOT( setCompletedItems( const TQStringList& )));
KCompletionBase::setCompletionObject( comp, hsig );
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KLineEdit::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QLineEdit::create( id, initializeWindow, destroyOldWindow );
+ TQLineEdit::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( this, true, true );
}
void KLineEdit::setUserSelection(bool userSelection)
{
- QPalette p = palette();
+ TQPalette p = palette();
if (userSelection)
{
- p.setColor(QColorGroup::Highlight, d->previousHighlightColor);
- p.setColor(QColorGroup::HighlightedText, d->previousHighlightedTextColor);
+ p.setColor(TQColorGroup::Highlight, d->previousHighlightColor);
+ p.setColor(TQColorGroup::HighlightedText, d->previousHighlightedTextColor);
}
else
{
- QColor color=p.color(QPalette::Disabled, QColorGroup::Text);
- p.setColor(QColorGroup::HighlightedText, color);
- color=p.color(QPalette::Active, QColorGroup::Base);
- p.setColor(QColorGroup::Highlight, color);
+ TQColor color=p.color(TQPalette::Disabled, TQColorGroup::Text);
+ p.setColor(TQColorGroup::HighlightedText, color);
+ color=p.color(TQPalette::Active, TQColorGroup::Base);
+ p.setColor(TQColorGroup::Highlight, color);
}
d->userSelection=userSelection;
@@ -1321,16 +1321,16 @@ void KLineEdit::slotRestoreSelectionColors()
void KLineEdit::clear()
{
- setText( QString::null );
+ setText( TQString::null );
}
-void KLineEdit::setTextWorkaround( const QString& text )
+void KLineEdit::setTextWorkaround( const TQString& text )
{
setText( text );
end( false ); // force cursor at end
}
-QString KLineEdit::originalText() const
+TQString KLineEdit::originalText() const
{
if ( d->enableSqueezedText && isReadOnly() )
return d->squeezedText;
@@ -1338,27 +1338,27 @@ QString KLineEdit::originalText() const
return text();
}
-void KLineEdit::focusInEvent( QFocusEvent* ev)
+void KLineEdit::focusInEvent( TQFocusEvent* ev)
{
if ( d->drawClickMsg ) {
d->drawClickMsg = false;
update();
}
- // Don't selectAll() in QLineEdit::focusInEvent if selection exists
- if ( ev->reason() == QFocusEvent::Tab && inputMask().isNull() && hasSelectedText() )
+ // Don't selectAll() in TQLineEdit::focusInEvent if selection exists
+ if ( ev->reason() == TQFocusEvent::Tab && inputMask().isNull() && hasSelectedText() )
return;
- QLineEdit::focusInEvent(ev);
+ TQLineEdit::focusInEvent(ev);
}
-void KLineEdit::focusOutEvent( QFocusEvent* ev)
+void KLineEdit::focusOutEvent( TQFocusEvent* ev)
{
if ( text().isEmpty() && !d->clickMessage.isEmpty() ) {
d->drawClickMsg = true;
update();
}
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
bool KLineEdit::autoSuggest() const
@@ -1366,13 +1366,13 @@ bool KLineEdit::autoSuggest() const
return d->autoSuggest;
}
-void KLineEdit::setClickMessage( const QString &msg )
+void KLineEdit::setClickMessage( const TQString &msg )
{
d->clickMessage = msg;
update();
}
-QString KLineEdit::clickMessage() const
+TQString KLineEdit::clickMessage() const
{
return d->clickMessage;
}
diff --git a/kdeui/klineedit.h b/kdeui/klineedit.h
index bd3cb6faf..2be05aa57 100644
--- a/kdeui/klineedit.h
+++ b/kdeui/klineedit.h
@@ -30,7 +30,7 @@
#ifndef _KLINEEDIT_H
#define _KLINEEDIT_H
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kcompletion.h>
class QPopupMenu;
@@ -39,11 +39,11 @@ class KCompletionBox;
class KURL;
/**
- * An enhanced QLineEdit widget for inputting text.
+ * An enhanced TQLineEdit widget for inputting text.
*
* \b Detail \n
*
- * This widget inherits from QLineEdit and implements the following
+ * This widget inherits from TQLineEdit and implements the following
* additional functionalities: a completion object that provides both
* automatic and manual text completion as well as multiple match iteration
* features, configurable key-bindings to activate these features and a
@@ -51,13 +51,13 @@ class KURL;
* modes on the fly based on their preference.
*
* To support these new features KLineEdit also emits a few more
- * additional signals. These are: completion( const QString& ),
- * textRotation( KeyBindingType ), and returnPressed( const QString& ).
+ * additional signals. These are: completion( const TQString& ),
+ * textRotation( KeyBindingType ), and returnPressed( const TQString& ).
* The completion signal can be connected to a slot that will assist the
* user in filling out the remaining text. The text rotation signal is
* intended to be used to iterate through the list of all possible matches
* whenever there is more than one match for the entered text. The
- * @p returnPressed( const QString& ) signals are the same as QLineEdit's
+ * @p returnPressed( const TQString& ) signals are the same as QLineEdit's
* except it provides the current text in the widget as its argument whenever
* appropriate.
*
@@ -79,10 +79,10 @@ class KURL;
* individual key-bindings by using setKeyBinding() with the default
* second argument.
*
- * If @p EchoMode for this widget is set to something other than @p QLineEdit::Normal,
+ * If @p EchoMode for this widget is set to something other than @p TQLineEdit::Normal,
* the completion mode will always be defaulted to KGlobalSettings::CompletionNone.
* This is done purposefully to guard against protected entries such as passwords being
- * cached in KCompletion's list. Hence, if the @p EchoMode is not QLineEdit::Normal, the
+ * cached in KCompletion's list. Hence, if the @p EchoMode is not TQLineEdit::Normal, the
* completion mode is automatically disabled.
*
* A read-only KLineEdit will have the same background color as a
@@ -99,7 +99,7 @@ class KURL;
* KLineEdit *edit = new KLineEdit( this, "mywidget" );
* KCompletion *comp = edit->completionObject();
* // Connect to the return pressed signal - optional
- * connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* To use a customized completion objects or your
@@ -110,7 +110,7 @@ class KURL;
* KURLCompletion *comp = new KURLCompletion();
* edit->setCompletionObject( comp );
* // Connect to the return pressed signal - optional
- * connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* Note if you specify your own completion object you have to either delete
@@ -142,7 +142,7 @@ class KURL;
* @author Dawit Alemayehu <adawit@kde.org>
*/
-class KDEUI_EXPORT KLineEdit : public QLineEdit, public KCompletionBase
+class KDEUI_EXPORT KLineEdit : public TQLineEdit, public KCompletionBase
{
friend class KComboBox;
@@ -152,7 +152,7 @@ class KDEUI_EXPORT KLineEdit : public QLineEdit, public KCompletionBase
Q_PROPERTY( bool trapEnterKeyEvent READ trapReturnKey WRITE setTrapReturnKey )
Q_PROPERTY( bool enableSqueezedText READ isSqueezedTextEnabled WRITE setEnableSqueezedText )
// @since 3.5.4
- Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
+ Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
@@ -164,7 +164,7 @@ public:
* @param parent The parent object of this widget.
* @param name the name of this widget
*/
- KLineEdit( const QString &string, QWidget *parent, const char *name = 0 );
+ KLineEdit( const TQString &string, TQWidget *parent, const char *name = 0 );
/**
* Constructs a KLineEdit object with a parent and a name.
@@ -172,7 +172,7 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KLineEdit ( QWidget *parent=0, const char *name=0 );
+ KLineEdit ( TQWidget *parent=0, const char *name=0 );
/**
* Destructor.
@@ -188,11 +188,11 @@ public:
/**
* Puts the text cursor at the end of the string.
*
- * This method is deprecated. Use QLineEdit::end()
+ * This method is deprecated. Use TQLineEdit::end()
* instead.
*
* @deprecated
- * QLineEdit::end()
+ * TQLineEdit::end()
*/
void cursorAtEnd() { end( false ); }
@@ -230,7 +230,7 @@ public:
/**
* Enables/Disables handling of URL drops. If enabled and the user
* drops an URL, the decoded URL will be inserted. Otherwise the default
- * behavior of QLineEdit is used, which inserts the encoded URL.
+ * behavior of TQLineEdit is used, which inserts the encoded URL.
*
* @param enable If @p true, insert decoded URLs
*/
@@ -265,7 +265,7 @@ public:
* Re-implemented for internal reasons. API not affected.
*
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* @returns the completion-box, that is used in completion mode
@@ -291,8 +291,8 @@ public:
* Enable text squeezing whenever the supplied text is too long.
* Only works for "read-only" mode.
*
- * Note that once text squeezing is enabled, QLineEdit::text()
- * and QLineEdit::displayText() return the squeezed text. If
+ * Note that once text squeezing is enabled, TQLineEdit::text()
+ * and TQLineEdit::displayText() return the squeezed text. If
* you want the original text, use @ref originalText.
*
* @see QLineEdit
@@ -311,12 +311,12 @@ public:
/**
* Returns the original text if text squeezing is enabled.
* If the widget is not in "read-only" mode, this function
- * returns the same thing as QLineEdit::text().
+ * returns the same thing as TQLineEdit::text().
*
* @see QLineEdit
* @since 3.2
*/
- QString originalText() const;
+ TQString originalText() const;
/**
* Set the completion-box to be used in completion mode
@@ -334,13 +334,13 @@ public:
* the purpose of the line edit.
* @since 3.5.4
*/
- void setClickMessage( const QString &msg );
+ void setClickMessage( const TQString &msg );
/**
* @return the message set with setClickMessage
* @since 3.5.4
*/
- QString clickMessage() const;
+ TQString clickMessage() const;
signals:
@@ -348,16 +348,16 @@ signals:
* Emitted whenever the completion box is activated.
* @since 3.1
*/
- void completionBoxActivated (const QString &);
+ void completionBoxActivated (const TQString &);
/**
* Emitted when the user presses the return key.
*
* The argument is the current text. Note that this
* signal is @em not emitted if the widget's @p EchoMode is set to
- * QLineEdit::EchoMode.
+ * TQLineEdit::EchoMode.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted when the completion key is pressed.
@@ -366,12 +366,12 @@ signals:
* completion mode is set to @p CompletionNone or @p EchoMode is
* @em normal.
*/
- void completion( const QString& );
+ void completion( const TQString& );
/**
* Emitted when the shortcut for substring completion is pressed.
*/
- void substringCompletion( const QString& );
+ void substringCompletion( const TQString& );
/**
* Emitted when the text rotation key-bindings are pressed.
@@ -405,7 +405,7 @@ signals:
*
* @param p the context menu about to be displayed
*/
- void aboutToShowContextMenu( QPopupMenu * p );
+ void aboutToShowContextMenu( TQPopupMenu * p );
public slots:
@@ -429,7 +429,7 @@ public slots:
/**
* See KCompletionBase::setCompletedText.
*/
- virtual void setCompletedText( const QString& );
+ virtual void setCompletedText( const TQString& );
/**
* Sets @p items into the completion-box if completionMode() is
@@ -437,7 +437,7 @@ public slots:
*
* @param items list of completion matches to be shown in the completion box.
*/
- void setCompletedItems( const QStringList& items );
+ void setCompletedItems( const TQStringList& items );
/**
* Same as the above function except it allows you to temporarily
@@ -449,10 +449,10 @@ public slots:
* @param items list of completion matches to be shown in the completion box.
* @param autoSuggest true if you want automatic text completion (suggestion) enabled.
*/
- void setCompletedItems( const QStringList& items, bool autoSuggest );
+ void setCompletedItems( const TQStringList& items, bool autoSuggest );
/**
- * Reimplemented to workaround a buggy QLineEdit::clear()
+ * Reimplemented to workaround a buggy TQLineEdit::clear()
* (changing the clipboard to the text we just had in the lineedit)
*/
virtual void clear();
@@ -462,12 +462,12 @@ public slots:
* This can only be used with read-only line-edits.
* @since 3.1
*/
- void setSqueezedText( const QString &text);
+ void setSqueezedText( const TQString &text);
/**
* Re-implemented to enable text squeezing. API is not affected.
*/
- virtual void setText ( const QString& );
+ virtual void setText ( const TQString& );
protected slots:
@@ -476,7 +476,7 @@ protected slots:
* Completes the remaining text with a matching one from
* a given list.
*/
- virtual void makeCompletion( const QString& );
+ virtual void makeCompletion( const TQString& );
/**
* @deprecated. Will be removed in the next major release!
@@ -493,72 +493,72 @@ protected slots:
* Call this function to revert a text completion if the user
* cancels the request. Mostly applies to popup completions.
*/
- void userCancelled(const QString & cancelText);
+ void userCancelled(const TQString & cancelText);
protected:
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::resizeEvent().
+ * See TQLineEdit::resizeEvent().
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::keyPressEvent().
+ * See TQLineEdit::keyPressEvent().
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mousePressEvent().
+ * See TQLineEdit::mousePressEvent().
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QWidget::mouseDoubleClickEvent().
+ * See TQWidget::mouseDoubleClickEvent().
*/
- virtual void mouseDoubleClickEvent( QMouseEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mouseReleaseEvent().
+ * See TQLineEdit::mouseReleaseEvent().
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::contextMenuEvent().
+ * See TQLineEdit::contextMenuEvent().
*/
- virtual void contextMenuEvent( QContextMenuEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::createPopupMenu().
+ * See TQLineEdit::createPopupMenu().
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QFrame::drawContents().
+ * See TQFrame::drawContents().
*/
- virtual void drawContents( QPainter *p );
+ virtual void drawContents( TQPainter *p );
/**
* Re-implemented to handle URI drops.
*
- * See QLineEdit::dropEvent().
+ * See TQLineEdit::dropEvent().
*/
- virtual void dropEvent( QDropEvent * );
+ virtual void dropEvent( TQDropEvent * );
/*
* This function simply sets the lineedit text and
@@ -568,7 +568,7 @@ protected:
* @param text
* @param marked
*/
- virtual void setCompletedText( const QString& /*text*/, bool /*marked*/ );
+ virtual void setCompletedText( const TQString& /*text*/, bool /*marked*/ );
/**
@@ -586,16 +586,16 @@ protected:
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::focusInEvent().
+ * See TQLineEdit::focusInEvent().
*/
- virtual void focusInEvent( QFocusEvent* );
+ virtual void focusInEvent( TQFocusEvent* );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::focusOutEvent().
+ * See TQLineEdit::focusOutEvent().
*/
- virtual void focusOutEvent( QFocusEvent* );
+ virtual void focusOutEvent( TQFocusEvent* );
/**
* Whether in current state text should be auto-suggested
@@ -607,7 +607,7 @@ private slots:
void completionMenuActivated( int id );
void tripleClickTimeout(); // resets possibleTripleClick
void slotRestoreSelectionColors();
- void setTextWorkaround( const QString& text );
+ void setTextWorkaround( const TQString& text );
private:
@@ -634,7 +634,7 @@ private:
* Checks whether we should/should not consume a key used as
* an accelerator.
*/
- bool overrideAccel (const QKeyEvent* e);
+ bool overrideAccel (const TQKeyEvent* e);
/**
* Properly sets the squeezed text whenever the widget is
diff --git a/kdeui/klineeditdlg.cpp b/kdeui/klineeditdlg.cpp
index 3d299dad2..9551fc1f6 100644
--- a/kdeui/klineeditdlg.cpp
+++ b/kdeui/klineeditdlg.cpp
@@ -18,13 +18,13 @@
*/
#include <config.h>
-#include <qvalidator.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#undef Unsorted // Required for --enable-final (qdir.h)
-#include <qfiledialog.h>
+#include <tqvalidator.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#undef Unsorted // Required for --enable-final (tqdir.h)
+#include <tqfiledialog.h>
#include <kbuttonbox.h>
#include <klocale.h>
@@ -34,24 +34,24 @@
#include "klineeditdlg.h"
-KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
- QWidget *parent )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
+KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value,
+ TQWidget *parent )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
true, KStdGuiItem::clear() )
{
- QVBoxLayout *topLayout = new QVBoxLayout( plainPage(), 0, spacingHint() );
- QLabel *label = new QLabel(_text, plainPage() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
+ TQLabel *label = new TQLabel(_text, plainPage() );
topLayout->addWidget( label, 1 );
edit = new KLineEdit( plainPage(), 0L );
edit->setMinimumWidth(edit->sizeHint().width() * 3);
label->setBuddy(edit); // please "scheck" style
- // connect( edit, SIGNAL(returnPressed()), SLOT(accept()) );
- connect( edit, SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ // connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) );
+ connect( edit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
topLayout->addWidget( edit, 1 );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotClear()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotClear()) );
edit->setText( _value );
if ( _value.isEmpty() )
{
@@ -65,18 +65,18 @@ KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
#if 0
-KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
- QWidget *parent, bool _file_mode )
- : QDialog( parent, 0L, true )
+KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value,
+ TQWidget *parent, bool _file_mode )
+ : TQDialog( parent, 0L, true )
{
- QGridLayout *layout = new QGridLayout(this, 4, 3, 10);
+ TQGridLayout *layout = new TQGridLayout(this, 4, 3, 10);
- QLabel *label = new QLabel(_text, this);
+ TQLabel *label = new TQLabel(_text, this);
layout->addWidget(label, 0, 0, AlignLeft);
edit = new KLineEdit( this, 0L );
edit->setMinimumWidth(edit->sizeHint().width() * 3);
- connect( edit, SIGNAL(returnPressed()), SLOT(accept()) );
+ connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) );
if ( _file_mode ) {
completion = new KURLCompletion();
@@ -89,32 +89,32 @@ KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
layout->setColStretch(1, 1);
if (_file_mode) {
- QPushButton *browse = new QPushButton(i18n("&Browse..."), this);
+ TQPushButton *browse = new TQPushButton(i18n("&Browse..."), this);
layout->addWidget(browse, 1, 2, AlignCenter);
- connect(browse, SIGNAL(clicked()),
- SLOT(slotBrowse()));
+ connect(browse, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotBrowse()));
}
- QFrame *hLine = new QFrame(this);
- hLine->setFrameStyle(QFrame::Sunken|QFrame::HLine);
+ TQFrame *hLine = new TQFrame(this);
+ hLine->setFrameStyle(TQFrame::Sunken|TQFrame::HLine);
layout->addMultiCellWidget(hLine, 2, 2, 0, 2);
KButtonBox *bBox = new KButtonBox(this);
layout->addMultiCellWidget(bBox, 3, 3, 0, 2);
- QPushButton *ok = bBox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bBox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- connect( ok, SIGNAL(clicked()), SLOT(accept()));
+ connect( ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
bBox->addStretch(1);
- QPushButton *clear = bBox->addButton(KStdGuiItem::clear());
- connect( clear, SIGNAL(clicked()), SLOT(slotClear()));
+ TQPushButton *clear = bBox->addButton(KStdGuiItem::clear());
+ connect( clear, TQT_SIGNAL(clicked()), TQT_SLOT(slotClear()));
bBox->addStretch(1);
- QPushButton *cancel = bBox->addButton(KStdGuiItem::cancel());
- connect( cancel, SIGNAL(clicked()), SLOT(reject()));
+ TQPushButton *cancel = bBox->addButton(KStdGuiItem::cancel());
+ connect( cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
bBox->layout();
@@ -133,17 +133,17 @@ KLineEditDlg::~KLineEditDlg()
void KLineEditDlg::slotClear()
{
- edit->setText(QString::null);
+ edit->setText(TQString::null);
}
-void KLineEditDlg::slotTextChanged(const QString &text)
+void KLineEditDlg::slotTextChanged(const TQString &text)
{
bool on;
if ( edit->validator() ) {
- QString str = edit->text();
+ TQString str = edit->text();
int index = edit->cursorPosition();
on = ( edit->validator()->validate( str, index )
- == QValidator::Acceptable );
+ == TQValidator::Acceptable );
} else {
on = !text.isEmpty();
}
@@ -151,41 +151,41 @@ void KLineEditDlg::slotTextChanged(const QString &text)
enableButton(KDialogBase::User1, text.length());
}
-QString KLineEditDlg::text() const
+TQString KLineEditDlg::text() const
{
return edit->text();
}
-QString KLineEditDlg::getText(const QString &_text, const QString& _value,
- bool *ok, QWidget *parent, QValidator *_validator )
+TQString KLineEditDlg::getText(const TQString &_text, const TQString& _value,
+ bool *ok, TQWidget *parent, TQValidator *_validator )
{
KLineEditDlg dlg(_text, _value, parent );
dlg.lineEdit()->setValidator( _validator );
dlg.slotTextChanged( _value ); // trigger validation
- bool ok_ = dlg.exec() == QDialog::Accepted;
+ bool ok_ = dlg.exec() == TQDialog::Accepted;
if ( ok )
*ok = ok_;
if ( ok_ )
return dlg.text();
- return QString::null;
+ return TQString::null;
}
-QString KLineEditDlg::getText(const QString &_caption, const QString &_text,
- const QString& _value,
- bool *ok, QWidget *parent, QValidator *_validator )
+TQString KLineEditDlg::getText(const TQString &_caption, const TQString &_text,
+ const TQString& _value,
+ bool *ok, TQWidget *parent, TQValidator *_validator )
{
KLineEditDlg dlg( _text, _value, parent );
dlg.setCaption( _caption );
dlg.lineEdit()->setValidator( _validator );
dlg.slotTextChanged( _value ); // trigger validation
- bool ok_ = dlg.exec() == QDialog::Accepted;
+ bool ok_ = dlg.exec() == TQDialog::Accepted;
if ( ok )
*ok = ok_;
if ( ok_ )
return dlg.text();
- return QString::null;
+ return TQString::null;
}
void KLineEditDlg::virtual_hook( int id, void* data )
diff --git a/kdeui/klineeditdlg.h b/kdeui/klineeditdlg.h
index e5d0d3302..1c0ab6b31 100644
--- a/kdeui/klineeditdlg.h
+++ b/kdeui/klineeditdlg.h
@@ -43,25 +43,25 @@ public:
* Create a dialog that asks for a single line of text. _value is
* the initial value of the line. _text appears as label on top of
* the entry box. If the internal line edit has an associated
- * QValidator set, the OK button is disabled as long as the
+ * TQValidator set, the OK button is disabled as long as the
* validator doesn't return Acceptable. If there's no validator, the
* OK button is enabled whenever the line edit isn't empty.
*
- * If you want to accept empty input, make a trivial QValidator that
- * always returns Acceptable, e.g. QRegExpValidator with a
+ * If you want to accept empty input, make a trivial TQValidator that
+ * always returns Acceptable, e.g. TQRegExpValidator with a
* regexp of ".*".
*
* @param _text Text of the label
* @param _value Initial value of the inputline
* @param parent Parent widget for the line edit dialog
*/
- KLineEditDlg( const QString& _text, const QString& _value, QWidget *parent ) KDE_DEPRECATED;
+ KLineEditDlg( const TQString& _text, const TQString& _value, TQWidget *parent ) KDE_DEPRECATED;
virtual ~KLineEditDlg();
/**
* @return the value the user entered
*/
- QString text() const;
+ TQString text() const;
/**
* @return the line edit widget
@@ -77,8 +77,8 @@ public:
* @param validator Validator to be stuffed into the line edit.
* @param parent The parent widget
*/
- static QString getText(const QString &text, const QString& value,
- bool *ok, QWidget *parent, QValidator *validator=0 ) KDE_DEPRECATED;
+ static TQString getText(const TQString &text, const TQString& value,
+ bool *ok, TQWidget *parent, TQValidator *validator=0 ) KDE_DEPRECATED;
/**
* Static convenience function to get a textual input from the user.
@@ -92,10 +92,10 @@ public:
* @param parent The parent widget for this text input dialog
* @param validator Validator to be stuffed into the line edit.
*/
- static QString getText(const QString &caption, const QString &text,
- const QString& value=QString::null,
- bool *ok=0, QWidget *parent=0,
- QValidator *validator=0) KDE_DEPRECATED;
+ static TQString getText(const TQString &caption, const TQString &text,
+ const TQString& value=TQString::null,
+ bool *ok=0, TQWidget *parent=0,
+ TQValidator *validator=0) KDE_DEPRECATED;
public slots:
/**
@@ -106,9 +106,9 @@ public slots:
protected slots:
/**
* Enables and disables the OK button depending on the state
- * returned by the lineedit's QValidator.
+ * returned by the lineedit's TQValidator.
*/
- void slotTextChanged( const QString& );
+ void slotTextChanged( const TQString& );
protected:
/**
diff --git a/kdeui/klistbox.cpp b/kdeui/klistbox.cpp
index e32418149..73a08b89a 100644
--- a/kdeui/klistbox.cpp
+++ b/kdeui/klistbox.cpp
@@ -17,7 +17,7 @@
*/
#include "config.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kglobalsettings.h>
#include <kcursor.h>
@@ -27,28 +27,28 @@
#include "klistbox.h"
-KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
- : QListBox( parent, name, f ), d(0)
+KListBox::KListBox( TQWidget *parent, const char *name, WFlags f )
+ : TQListBox( parent, name, f ), d(0)
{
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- this, SLOT( slotOnItem( QListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListBoxItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQListBoxItem * ) ) );
slotSettingsChanged(KApplication::SETTINGS_MOUSE);
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
m_pCurrentItem = 0L;
- m_pAutoSelect = new QTimer( this );
- connect( m_pAutoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
+ m_pAutoSelect = new TQTimer( this );
+ connect( m_pAutoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
}
-void KListBox::slotOnItem( QListBoxItem *item )
+void KListBox::slotOnItem( TQListBoxItem *item )
{
if ( item && m_bChangeCursorOverItem && m_bUseSingle )
viewport()->setCursor( KCursor().handCursor() );
@@ -75,28 +75,28 @@ void KListBox::slotSettingsChanged(int category)
return;
m_bUseSingle = KGlobalSettings::singleClick();
- disconnect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ) );
-// disconnect( this, SIGNAL( doubleClicked( QListBoxItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QListBoxItem *,
-// const QPoint & ) ) );
+ disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ) );
+// disconnect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQListBoxItem *,
+// const TQPoint & ) ) );
if( m_bUseSingle )
{
- connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ) );
}
else
{
-// connect( this, SIGNAL( doubleClicked( QListBoxItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QListBoxItem *,
-// const QPoint & ) ) );
+// connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQListBoxItem *,
+// const TQPoint & ) ) );
}
m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
@@ -118,7 +118,7 @@ void KListBox::slotAutoSelect()
ButtonState keybstate = KApplication::keyboardMouseState();
- QListBoxItem* previousItem = item( currentItem() );
+ TQListBoxItem* previousItem = item( currentItem() );
setCurrentItem( m_pCurrentItem );
if( m_pCurrentItem ) {
@@ -136,7 +136,7 @@ void KListBox::slotAutoSelect()
viewport()->setUpdatesEnabled( false );
bool down = index( previousItem ) < index( m_pCurrentItem );
- QListBoxItem* it = down ? previousItem : m_pCurrentItem;
+ TQListBoxItem* it = down ? previousItem : m_pCurrentItem;
for (;it ; it = it->next() ) {
if ( down && it == m_pCurrentItem ) {
setSelected( m_pCurrentItem, select );
@@ -155,7 +155,7 @@ void KListBox::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListBox::Single )
+ if( selectionMode() == TQListBox::Single )
emit selectionChanged( m_pCurrentItem );
}
else if( (keybstate & ControlButton) )
@@ -176,7 +176,7 @@ void KListBox::slotAutoSelect()
kdDebug() << "That´s not supposed to happen!!!!" << endl;
}
-void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
+void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos )
{
ButtonState keybstate = KApplication::keyboardMouseState();
@@ -194,9 +194,9 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
// This widget is used in dialogs. It should ignore
// F1 (and combinations) and Escape since these are used
// to start help or close the dialog. This functionality
-// should be done in QListView but it is not (at least now)
+// should be done in TQListView but it is not (at least now)
//
-void KListBox::keyPressEvent(QKeyEvent *e)
+void KListBox::keyPressEvent(TQKeyEvent *e)
{
if( e->key() == Key_Escape )
{
@@ -208,25 +208,25 @@ void KListBox::keyPressEvent(QKeyEvent *e)
}
else
{
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
}
-void KListBox::focusOutEvent( QFocusEvent *fe )
+void KListBox::focusOutEvent( TQFocusEvent *fe )
{
m_pAutoSelect->stop();
- QListBox::focusOutEvent( fe );
+ TQListBox::focusOutEvent( fe );
}
-void KListBox::leaveEvent( QEvent *e )
+void KListBox::leaveEvent( TQEvent *e )
{
m_pAutoSelect->stop();
- QListBox::leaveEvent( e );
+ TQListBox::leaveEvent( e );
}
-void KListBox::contentsMousePressEvent( QMouseEvent *e )
+void KListBox::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
bool block = signalsBlocked();
@@ -237,14 +237,14 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
blockSignals( block );
}
- QListBox::contentsMousePressEvent( e );
+ TQListBox::contentsMousePressEvent( e );
}
-void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
+ TQListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem* item = itemAt( contentsToViewport( e->pos() ) );
+ TQListBoxItem* item = itemAt( contentsToViewport( e->pos() ) );
if( item ) {
emit doubleClicked( item, e->globalPos() );
@@ -254,7 +254,7 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
}
}
-void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos )
+void KListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos )
{
if( (btn == LeftButton) && item )
emitExecute( item, pos );
diff --git a/kdeui/klistbox.h b/kdeui/klistbox.h
index ec1afc29f..b19819c79 100644
--- a/kdeui/klistbox.h
+++ b/kdeui/klistbox.h
@@ -18,31 +18,31 @@
#ifndef KLISTBOX_H
#define KLISTBOX_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QListBox that honors KDE's system-wide settings.
+ * @short A variant of TQListBox that honors KDE's system-wide settings.
*
- * Extends the functionality of QListBox to honor the system
+ * Extends the functionality of TQListBox to honor the system
* wide settings for Single Click/Double Click mode, Auto Selection and
* Change Cursor over Link.
*
* There is a new signal executed(). It gets connected to either
- * QListBox::clicked() or QListBox::doubleClicked()
+ * TQListBox::clicked() or TQListBox::doubleClicked()
* depending on the KDE wide Single Click/Double Click settings. It is
* strongly recommended that you use this signal instead of the above
* mentioned. This way you don't need to care about the current
* settings. If you want to get informed when the user selects
- * something connect to the QListBox::selectionChanged() signal.
+ * something connect to the TQListBox::selectionChanged() signal.
**/
class KDEUI_EXPORT KListBox : public QListBox
{
Q_OBJECT
public:
- KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
signals:
@@ -53,10 +53,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed listbox item.
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*/
- void executed( QListBoxItem *item );
+ void executed( TQListBoxItem *item );
/**
* Emitted whenever the user executes an listbox item.
@@ -66,10 +66,10 @@ signals:
* @param item is the pointer to the executed listbox item.
* @param pos is the position where the user has clicked
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*/
- void executed( QListBoxItem *item, const QPoint &pos );
+ void executed( TQListBoxItem *item, const TQPoint &pos );
/**
* This signal gets emitted whenever the user double clicks into the
@@ -78,17 +78,17 @@ signals:
* @param item The pointer to the clicked listbox item.
* @param pos The position where the user has clicked.
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*
* This signal is more or less here for the sake of completeness.
* You should normally not need to use this. In most cases it's better
* to use executed() instead.
*/
- void doubleClicked( QListBoxItem *item, const QPoint &pos );
+ void doubleClicked( TQListBoxItem *item, const TQPoint &pos );
protected slots:
- void slotOnItem( QListBoxItem *item );
+ void slotOnItem( TQListBoxItem *item );
void slotOnViewport();
void slotSettingsChanged(int);
@@ -99,24 +99,24 @@ protected slots:
void slotAutoSelect();
protected:
- void emitExecute( QListBoxItem *item, const QPoint &pos );
+ void emitExecute( TQListBoxItem *item, const TQPoint &pos );
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void focusOutEvent( QFocusEvent *fe );
- virtual void leaveEvent( QEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e );
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void focusOutEvent( TQFocusEvent *fe );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
bool m_bUseSingle;
bool m_bChangeCursorOverItem;
- QListBoxItem* m_pCurrentItem;
+ TQListBoxItem* m_pCurrentItem;
- QTimer* m_pAutoSelect;
+ TQTimer* m_pAutoSelect;
int m_autoSelectDelay;
private slots:
- void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/klistview.cpp b/kdeui/klistview.cpp
index 9aeedfb2c..332bc4e8c 100644
--- a/kdeui/klistview.cpp
+++ b/kdeui/klistview.cpp
@@ -19,13 +19,13 @@
*/
#include "config.h"
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qheader.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include <kglobalsettings.h>
#include <kconfig.h>
@@ -40,26 +40,26 @@
class KListView::Tooltip : public QToolTip
{
public:
- Tooltip (KListView* parent, QToolTipGroup* group = 0L);
+ Tooltip (KListView* parent, TQToolTipGroup* group = 0L);
virtual ~Tooltip () {}
protected:
/**
- * Reimplemented from QToolTip for internal reasons.
+ * Reimplemented from TQToolTip for internal reasons.
*/
- virtual void maybeTip (const QPoint&);
+ virtual void maybeTip (const TQPoint&);
private:
KListView* mParent;
};
-KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group)
- : QToolTip (parent, group),
+KListView::Tooltip::Tooltip (KListView* parent, TQToolTipGroup* group)
+ : TQToolTip (parent, group),
mParent (parent)
{
}
-void KListView::Tooltip::maybeTip (const QPoint&)
+void KListView::Tooltip::maybeTip (const TQPoint&)
{
// FIXME
}
@@ -104,7 +104,7 @@ public:
shadeSortColumn(KGlobalSettings::shadeSortColumn())
{
renameable.append(0);
- connect(editor, SIGNAL(done(QListViewItem*,int)), listview, SLOT(doneEditing(QListViewItem*,int)));
+ connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int)));
}
~KListViewPrivate ()
@@ -112,20 +112,20 @@ public:
delete editor;
}
- QListViewItem* pCurrentItem;
+ TQListViewItem* pCurrentItem;
- QTimer autoSelect;
+ TQTimer autoSelect;
int autoSelectDelay;
- QTimer dragExpand;
- QListViewItem* dragOverItem;
- QPoint dragOverPoint;
+ TQTimer dragExpand;
+ TQListViewItem* dragOverItem;
+ TQPoint dragOverPoint;
- QPoint startDragPos;
+ TQPoint startDragPos;
int dragDelay;
KListViewLineEdit *editor;
- QValueList<int> renameable;
+ TQValueList<int> renameable;
bool cursorInExecuteArea:1;
bool bUseSingle:1;
@@ -157,19 +157,19 @@ public:
int contextMenuKey;
bool showContextMenusOnPress;
- QRect mOldDropVisualizer;
+ TQRect mOldDropVisualizer;
int mDropVisualizerWidth;
- QRect mOldDropHighlighter;
- QListViewItem *afterItemDrop;
- QListViewItem *parentItemDrop;
+ TQRect mOldDropHighlighter;
+ TQListViewItem *afterItemDrop;
+ TQListViewItem *parentItemDrop;
- QListViewItem *paintAbove;
- QListViewItem *paintCurrent;
- QListViewItem *paintBelow;
+ TQListViewItem *paintAbove;
+ TQListViewItem *paintCurrent;
+ TQListViewItem *paintBelow;
bool painting:1;
bool shadeSortColumn:1;
- QColor alternateBackground;
+ TQColor alternateBackground;
};
@@ -178,33 +178,33 @@ KListViewLineEdit::KListViewLineEdit(KListView *parent)
{
setFrame( false );
hide();
- connect( parent, SIGNAL( selectionChanged() ), SLOT( slotSelectionChanged() ));
- connect( parent, SIGNAL( itemRemoved( QListViewItem * ) ),
- SLOT( slotItemRemoved( QListViewItem * ) ));
+ connect( parent, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotSelectionChanged() ));
+ connect( parent, TQT_SIGNAL( itemRemoved( TQListViewItem * ) ),
+ TQT_SLOT( slotItemRemoved( TQListViewItem * ) ));
}
KListViewLineEdit::~KListViewLineEdit()
{
}
-QListViewItem *KListViewLineEdit::currentItem() const
+TQListViewItem *KListViewLineEdit::currentItem() const
{
return item;
}
-void KListViewLineEdit::load(QListViewItem *i, int c)
+void KListViewLineEdit::load(TQListViewItem *i, int c)
{
item=i;
col=c;
- QRect rect(p->itemRect(i));
+ TQRect rect(p->itemRect(i));
setText(item->text(c));
home( true );
int fieldX = rect.x() - 1;
int fieldW = p->columnWidth(col) + 2;
- QHeader* const pHeader = p->header();
+ TQHeader* const pHeader = p->header();
const int pos = pHeader->mapToIndex(col);
for ( int index = 0; index < pos; ++index )
@@ -232,7 +232,7 @@ void KListViewLineEdit::load(QListViewItem *i, int c)
* tabOrderedRename functionality.
*/
-static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
+static int nextCol (KListView *pl, TQListViewItem *pi, int start, int dir)
{
if (pi)
{
@@ -245,11 +245,11 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
return -1;
}
-static QListViewItem *prevItem (QListViewItem *pi)
+static TQListViewItem *prevItem (TQListViewItem *pi)
{
- QListViewItem *pa = pi->itemAbove();
+ TQListViewItem *pa = pi->itemAbove();
- /* Does what the QListViewItem::previousSibling()
+ /* Does what the TQListViewItem::previousSibling()
* of my dreams would do.
*/
if (pa && pa->parent() == pi->parent())
@@ -258,30 +258,30 @@ static QListViewItem *prevItem (QListViewItem *pi)
return 0;
}
-static QListViewItem *lastQChild (QListViewItem *pi)
+static TQListViewItem *lastQChild (TQListViewItem *pi)
{
if (pi)
{
- /* Since there's no QListViewItem::lastChild().
+ /* Since there's no TQListViewItem::lastChild().
* This finds the last sibling for the given
* item.
*/
- for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
+ for (TQListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
pi = pt;
}
return pi;
}
-void KListViewLineEdit::selectNextCell (QListViewItem *pitem, int column, bool forward)
+void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward)
{
const int ncols = p->columns();
const int dir = forward ? +1 : -1;
const int restart = forward ? 0 : (ncols - 1);
- QListViewItem *top = (pitem && pitem->parent())
+ TQListViewItem *top = (pitem && pitem->parent())
? pitem->parent()->firstChild()
: p->firstChild();
- QListViewItem *pi = pitem;
+ TQListViewItem *pi = pitem;
terminate(); // Save current changes
@@ -321,11 +321,11 @@ void KListViewLineEdit::selectNextCell (QListViewItem *pitem, int column, bool f
#undef KeyPress
#endif
-bool KListViewLineEdit::event (QEvent *pe)
+bool KListViewLineEdit::event (TQEvent *pe)
{
- if (pe->type() == QEvent::KeyPress)
+ if (pe->type() == TQEvent::KeyPress)
{
- QKeyEvent *k = (QKeyEvent *) pe;
+ TQKeyEvent *k = (TQKeyEvent *) pe;
if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) &&
p->tabOrderedRenaming() && p->itemsRenameable() &&
@@ -340,7 +340,7 @@ bool KListViewLineEdit::event (QEvent *pe)
return KLineEdit::event(pe);
}
-void KListViewLineEdit::keyPressEvent(QKeyEvent *e)
+void KListViewLineEdit::keyPressEvent(TQKeyEvent *e)
{
if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
terminate(true);
@@ -368,7 +368,7 @@ void KListViewLineEdit::terminate(bool commit)
if (commit)
item->setText(col, text());
int c=col;
- QListViewItem *i=item;
+ TQListViewItem *i=item;
col=0;
item=0;
p->setFocus();// will call focusOutEvent, that's why we set item=0 before
@@ -378,22 +378,22 @@ void KListViewLineEdit::terminate(bool commit)
}
}
-void KListViewLineEdit::focusOutEvent(QFocusEvent *ev)
+void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev)
{
- QFocusEvent * focusEv = static_cast<QFocusEvent*>(ev);
+ TQFocusEvent * focusEv = static_cast<TQFocusEvent*>(ev);
// Don't let a RMB close the editor
- if (focusEv->reason() != QFocusEvent::Popup && focusEv->reason() != QFocusEvent::ActiveWindow)
+ if (focusEv->reason() != TQFocusEvent::Popup && focusEv->reason() != TQFocusEvent::ActiveWindow)
terminate(true);
else
KLineEdit::focusOutEvent(ev);
}
-void KListViewLineEdit::paintEvent( QPaintEvent *e )
+void KListViewLineEdit::paintEvent( TQPaintEvent *e )
{
KLineEdit::paintEvent( e );
if ( !frame() ) {
- QPainter p( this );
+ TQPainter p( this );
p.setClipRegion( e->region() );
p.drawRect( rect() );
}
@@ -411,7 +411,7 @@ void KListViewLineEdit::slotSelectionChanged()
// if the current item was removed -> terminate. Can't call terminate(false)
// due to same reason as slotSelectionChanged().
-void KListViewLineEdit::slotItemRemoved(QListViewItem *i)
+void KListViewLineEdit::slotItemRemoved(TQListViewItem *i)
{
if (currentItem() != i)
return;
@@ -422,48 +422,48 @@ void KListViewLineEdit::slotItemRemoved(QListViewItem *i)
}
-KListView::KListView( QWidget *parent, const char *name )
- : QListView( parent, name ),
+KListView::KListView( TQWidget *parent, const char *name )
+ : TQListView( parent, name ),
d (new KListViewPrivate (this))
{
setDragAutoScroll(true);
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListViewItem * ) ),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) );
- connect (this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(cleanDropVisualizer()));
- connect (this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(cleanItemHighlighter()));
+ connect (this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(cleanDropVisualizer()));
+ connect (this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(cleanItemHighlighter()));
slotSettingsChanged(KApplication::SETTINGS_MOUSE);
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
- connect(&d->autoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
- connect(&d->dragExpand, SIGNAL( timeout() ),
- this, SLOT( slotDragExpand() ) );
+ connect(&d->autoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
+ connect(&d->dragExpand, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotDragExpand() ) );
// context menu handling
if (d->showContextMenusOnPress)
{
- connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
else
{
- connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
- connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
- this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
+ connect (this, TQT_SIGNAL (menuShortCutPressed (KListView*, TQListViewItem*)),
+ this, TQT_SLOT (emitContextMenu (KListView*, TQListViewItem*)));
d->alternateBackground = KGlobalSettings::alternateBackgroundColor();
}
@@ -472,9 +472,9 @@ KListView::~KListView()
delete d;
}
-bool KListView::isExecuteArea( const QPoint& point )
+bool KListView::isExecuteArea( const TQPoint& point )
{
- QListViewItem* item = itemAt( point );
+ TQListViewItem* item = itemAt( point );
if ( item ) {
return isExecuteArea( point.x(), item );
}
@@ -487,7 +487,7 @@ bool KListView::isExecuteArea( int x )
return isExecuteArea( x, 0 );
}
-bool KListView::isExecuteArea( int x, QListViewItem* item )
+bool KListView::isExecuteArea( int x, TQListViewItem* item )
{
if( allColumnsShowFocus() )
return true;
@@ -497,7 +497,7 @@ bool KListView::isExecuteArea( int x, QListViewItem* item )
int width = columnWidth( 0 );
- QHeader* const thisHeader = header();
+ TQHeader* const thisHeader = header();
const int pos = thisHeader->mapToIndex( 0 );
for ( int index = 0; index < pos; ++index )
@@ -521,9 +521,9 @@ bool KListView::isExecuteArea( int x, QListViewItem* item )
}
}
-void KListView::slotOnItem( QListViewItem *item )
+void KListView::slotOnItem( TQListViewItem *item )
{
- QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
+ TQPoint vp = viewport()->mapFromGlobal( TQCursor::pos() );
if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) {
d->autoSelect.start( d->autoSelectDelay, true );
d->pCurrentItem = item;
@@ -547,12 +547,12 @@ void KListView::slotSettingsChanged(int category)
d->dragDelay = KGlobalSettings::dndEventDelay();
d->bUseSingle = KGlobalSettings::singleClick();
- disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int)));
+ disconnect(this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT (slotMouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)));
if( d->bUseSingle )
- connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int)));
+ connect (this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT (slotMouseButtonClicked( int, TQListViewItem*, const TQPoint &, int)));
d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
if ( !d->disableAutoSelection )
@@ -569,17 +569,17 @@ void KListView::slotSettingsChanged(int category)
if (d->showContextMenusOnPress)
{
- disconnect (0L, 0L, this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
- connect(this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
else
{
- disconnect (0L, 0L, this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
- connect(this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
break;
@@ -606,7 +606,7 @@ void KListView::slotAutoSelect()
ButtonState keybstate = KApplication::keyboardMouseState();
- QListViewItem* previousItem = currentItem();
+ TQListViewItem* previousItem = currentItem();
setCurrentItem( d->pCurrentItem );
if( d->pCurrentItem ) {
@@ -624,7 +624,7 @@ void KListView::slotAutoSelect()
viewport()->setUpdatesEnabled( false );
bool down = previousItem->itemPos() < d->pCurrentItem->itemPos();
- QListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
+ TQListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
for ( ; lit.current(); ++lit ) {
if ( down && lit.current() == d->pCurrentItem ) {
d->pCurrentItem->setSelected( select );
@@ -643,7 +643,7 @@ void KListView::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListView::Single )
+ if( selectionMode() == TQListView::Single )
emit selectionChanged( d->pCurrentItem );
}
else if( (keybstate & KApplication::ControlModifier) )
@@ -677,7 +677,7 @@ void KListView::slotHeaderChanged()
}
}
-void KListView::emitExecute( QListViewItem *item, const QPoint &pos, int c )
+void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c )
{
if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) {
d->validDrag=false;
@@ -705,14 +705,14 @@ void KListView::emitExecute( QListViewItem *item, const QPoint &pos, int c )
}
}
-void KListView::focusInEvent( QFocusEvent *fe )
+void KListView::focusInEvent( TQFocusEvent *fe )
{
// kdDebug()<<"KListView::focusInEvent()"<<endl;
- QListView::focusInEvent( fe );
+ TQListView::focusInEvent( fe );
if ((d->selectedBySimpleMove)
&& (d->selectionMode == FileManager)
- && (fe->reason()!=QFocusEvent::Popup)
- && (fe->reason()!=QFocusEvent::ActiveWindow)
+ && (fe->reason()!=TQFocusEvent::Popup)
+ && (fe->reason()!=TQFocusEvent::ActiveWindow)
&& (currentItem()))
{
currentItem()->setSelected(true);
@@ -721,7 +721,7 @@ void KListView::focusInEvent( QFocusEvent *fe )
};
}
-void KListView::focusOutEvent( QFocusEvent *fe )
+void KListView::focusOutEvent( TQFocusEvent *fe )
{
cleanDropVisualizer();
cleanItemHighlighter();
@@ -730,8 +730,8 @@ void KListView::focusOutEvent( QFocusEvent *fe )
if ((d->selectedBySimpleMove)
&& (d->selectionMode == FileManager)
- && (fe->reason()!=QFocusEvent::Popup)
- && (fe->reason()!=QFocusEvent::ActiveWindow)
+ && (fe->reason()!=TQFocusEvent::Popup)
+ && (fe->reason()!=TQFocusEvent::ActiveWindow)
&& (currentItem())
&& (!d->editor->isVisible()))
{
@@ -740,25 +740,25 @@ void KListView::focusOutEvent( QFocusEvent *fe )
emit selectionChanged();
};
- QListView::focusOutEvent( fe );
+ TQListView::focusOutEvent( fe );
}
-void KListView::leaveEvent( QEvent *e )
+void KListView::leaveEvent( TQEvent *e )
{
d->autoSelect.stop();
- QListView::leaveEvent( e );
+ TQListView::leaveEvent( e );
}
-bool KListView::event( QEvent *e )
+bool KListView::event( TQEvent *e )
{
- if (e->type() == QEvent::ApplicationPaletteChange)
+ if (e->type() == TQEvent::ApplicationPaletteChange)
d->alternateBackground=KGlobalSettings::alternateBackgroundColor();
- return QListView::event(e);
+ return TQListView::event(e);
}
-void KListView::contentsMousePressEvent( QMouseEvent *e )
+void KListView::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) )
{
@@ -781,8 +781,8 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
}
}
- QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ TQPoint p( contentsToViewport( e->pos() ) );
+ TQListViewItem *at = itemAt (p);
// true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
bool rootDecoClicked = at
@@ -802,16 +802,16 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
}
}
- QListView::contentsMousePressEvent( e );
+ TQListView::contentsMousePressEvent( e );
}
-void KListView::contentsMouseMoveEvent( QMouseEvent *e )
+void KListView::contentsMouseMoveEvent( TQMouseEvent *e )
{
if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag)
- QListView::contentsMouseMoveEvent (e);
+ TQListView::contentsMouseMoveEvent (e);
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *item = itemAt( vp );
//do we process cursor changes at all?
if ( item && d->bChangeCursorOverItem && d->bUseSingle )
@@ -830,30 +830,30 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
}
bool dragOn = dragEnabled();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if (dragOn && d->validDrag &&
(newPos.x() > d->startDragPos.x()+d->dragDelay ||
newPos.x() < d->startDragPos.x()-d->dragDelay ||
newPos.y() > d->startDragPos.y()+d->dragDelay ||
newPos.y() < d->startDragPos.y()-d->dragDelay))
- //(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
+ //(d->startDragPos - e->pos()).manhattanLength() > TQApplication::startDragDistance())
{
- QListView::contentsMouseReleaseEvent( 0 );
+ TQListView::contentsMouseReleaseEvent( 0 );
startDrag();
- d->startDragPos = QPoint();
+ d->startDragPos = TQPoint();
d->validDrag = false;
}
}
-void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
+void KListView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
if (e->button() == LeftButton)
{
// If the row was already selected, maybe we want to start an in-place editing
if ( d->pressedOnSelected && itemsRenameable() )
{
- QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ TQPoint p( contentsToViewport( e->pos() ) );
+ TQListViewItem *at = itemAt (p);
if ( at )
{
// true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
@@ -873,22 +873,22 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
d->pressedOnSelected = false;
d->validDrag = false;
- d->startDragPos = QPoint();
+ d->startDragPos = TQPoint();
}
- QListView::contentsMouseReleaseEvent( e );
+ TQListView::contentsMouseReleaseEvent( e );
}
-void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
+void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e )
{
// We don't want to call the parent method because it does setOpen,
// whereas we don't do it in single click mode... (David)
- //QListView::contentsMouseDoubleClickEvent( e );
+ //TQListView::contentsMouseDoubleClickEvent( e );
if ( !e || e->button() != LeftButton )
return;
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
- emit QListView::doubleClicked( item ); // we do it now
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *item = itemAt( vp );
+ emit TQListView::doubleClicked( item ); // we do it now
int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1;
@@ -900,13 +900,13 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
}
}
-void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c )
+void KListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c )
{
if( (btn == LeftButton) && item )
emitExecute(item, pos, c);
}
-void KListView::contentsDropEvent(QDropEvent* e)
+void KListView::contentsDropEvent(TQDropEvent* e)
{
cleanDropVisualizer();
cleanItemHighlighter();
@@ -915,8 +915,8 @@ void KListView::contentsDropEvent(QDropEvent* e)
if (acceptDrag (e))
{
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop(e->pos(), parent, afterme);
@@ -932,12 +932,12 @@ void KListView::contentsDropEvent(QDropEvent* e)
}
}
-void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
+void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme)
{
- QPtrList<QListViewItem> items, afterFirsts, afterNows;
- QListViewItem *current=currentItem();
+ TQPtrList<TQListViewItem> items, afterFirsts, afterNows;
+ TQListViewItem *current=currentItem();
bool hasMoved=false;
- for (QListViewItem *i = firstChild(), *iNext=0; i; i = iNext)
+ for (TQListViewItem *i = firstChild(), *iNext=0; i; i = iNext)
{
iNext=i->itemBelow();
if (!i->isSelected())
@@ -950,7 +950,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
i->setSelected(false);
- QListViewItem *afterFirst = i->itemAbove();
+ TQListViewItem *afterFirst = i->itemAbove();
if (!hasMoved)
{
@@ -971,7 +971,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
afterme = i;
}
clearSelection();
- for (QListViewItem *i=items.first(); i; i=items.next() )
+ for (TQListViewItem *i=items.first(); i; i=items.next() )
i->setSelected(true);
if (current)
setCurrentItem(current);
@@ -982,7 +982,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
emit moved();
}
-void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
+void KListView::contentsDragMoveEvent(TQDragMoveEvent *event)
{
if (acceptDrag(event))
{
@@ -990,8 +990,8 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
//Clean up the view
findDrop(event->pos(), d->parentItemDrop, d->afterItemDrop);
- QPoint vp = contentsToViewport( event->pos() );
- QListViewItem *item = isExecuteArea( vp ) ? itemAt( vp ) : 0L;
+ TQPoint vp = contentsToViewport( event->pos() );
+ TQListViewItem *item = isExecuteArea( vp ) ? itemAt( vp ) : 0L;
if ( item != d->dragOverItem )
{
@@ -999,11 +999,11 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
d->dragOverItem = item;
d->dragOverPoint = vp;
if ( d->dragOverItem && d->dragOverItem->isExpandable() && !d->dragOverItem->isOpen() )
- d->dragExpand.start( QApplication::startDragTime(), true );
+ d->dragExpand.start( TQApplication::startDragTime(), true );
}
if (dropVisualizer())
{
- QRect tmpRect = drawDropVisualizer(0, d->parentItemDrop, d->afterItemDrop);
+ TQRect tmpRect = drawDropVisualizer(0, d->parentItemDrop, d->afterItemDrop);
if (tmpRect != d->mOldDropVisualizer)
{
cleanDropVisualizer();
@@ -1013,7 +1013,7 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
}
if (dropHighlighter())
{
- QRect tmpRect = drawItemHighlighter(0, itemAt( vp ));
+ TQRect tmpRect = drawItemHighlighter(0, itemAt( vp ));
if (tmpRect != d->mOldDropHighlighter)
{
cleanItemHighlighter();
@@ -1032,7 +1032,7 @@ void KListView::slotDragExpand()
d->dragOverItem->setOpen( true );
}
-void KListView::contentsDragLeaveEvent (QDragLeaveEvent*)
+void KListView::contentsDragLeaveEvent (TQDragLeaveEvent*)
{
d->dragExpand.stop();
cleanDropVisualizer();
@@ -1043,8 +1043,8 @@ void KListView::cleanDropVisualizer()
{
if (d->mOldDropVisualizer.isValid())
{
- QRect rect=d->mOldDropVisualizer;
- d->mOldDropVisualizer = QRect();
+ TQRect rect=d->mOldDropVisualizer;
+ d->mOldDropVisualizer = TQRect();
viewport()->repaint(rect, true);
}
}
@@ -1054,14 +1054,14 @@ int KListView::depthToPixels( int depth )
return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin();
}
-void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
+ TQPoint p (contentsToViewport(pos));
// Get the position to put it in
- QListViewItem *atpos = itemAt(p);
+ TQListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ TQListViewItem *above;
if (!atpos) // put it at the end
above = lastItem();
else
@@ -1100,8 +1100,8 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
// Ok, there's one more level of complexity. We may want to become a new
// sibling, but of an upper-level group, rather than the "above" item
- QListViewItem * betterAbove = above->parent();
- QListViewItem * last = above;
+ TQListViewItem * betterAbove = above->parent();
+ TQListViewItem * last = above;
while ( betterAbove )
{
// We are allowed to become a sibling of "betterAbove" only if we are
@@ -1123,9 +1123,9 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
parent = after ? after->parent() : 0L ;
}
-QListViewItem* KListView::lastChild () const
+TQListViewItem* KListView::lastChild () const
{
- QListViewItem* lastchild = firstChild();
+ TQListViewItem* lastchild = firstChild();
if (lastchild)
for (; lastchild->nextSibling(); lastchild = lastchild->nextSibling());
@@ -1133,11 +1133,11 @@ QListViewItem* KListView::lastChild () const
return lastchild;
}
-QListViewItem *KListView::lastItem() const
+TQListViewItem *KListView::lastItem() const
{
- QListViewItem* last = lastChild();
+ TQListViewItem* last = lastChild();
- for (QListViewItemIterator it (last); it.current(); ++it)
+ for (TQListViewItemIterator it (last); it.current(); ++it)
last = it.current();
return last;
@@ -1150,7 +1150,7 @@ KLineEdit *KListView::renameLineEdit() const
void KListView::startDrag()
{
- QDragObject *drag = dragObject();
+ TQDragObject *drag = dragObject();
if (!drag)
return;
@@ -1159,13 +1159,13 @@ void KListView::startDrag()
emit moved();
}
-QDragObject *KListView::dragObject()
+TQDragObject *KListView::dragObject()
{
if (!currentItem())
return 0;
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new TQStoredDrag("application/x-qlistviewitem", viewport());
}
void KListView::setItemsMovable(bool b)
@@ -1219,14 +1219,14 @@ void KListView::setDropVisualizer(bool b)
d->dropVisualizer=b;
}
-QPtrList<QListViewItem> KListView::selectedItems() const
+TQPtrList<TQListViewItem> KListView::selectedItems() const
{
return selectedItems(true);
}
-QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
+TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) const
{
- QPtrList<QListViewItem> list;
+ TQPtrList<TQListViewItem> list;
// Using selectionMode() instead of selectionModeExt() since for the cases that
// we're interested in selectionMode() should work for either variety of the
@@ -1242,13 +1242,13 @@ QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
break;
default:
{
- int flags = QListViewItemIterator::Selected;
+ int flags = TQListViewItemIterator::Selected;
if (!includeHiddenItems)
{
- flags |= QListViewItemIterator::Visible;
+ flags |= TQListViewItemIterator::Visible;
}
- QListViewItemIterator it(const_cast<KListView *>(this), flags);
+ TQListViewItemIterator it(const_cast<KListView *>(this), flags);
for(; it.current(); ++it)
list.append(it.current());
@@ -1261,10 +1261,10 @@ QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
}
-void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after)
+void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after)
{
// sanity check - don't move a item into its own child structure
- QListViewItem *i = parent;
+ TQListViewItem *i = parent;
while(i)
{
if(i == item)
@@ -1278,7 +1278,7 @@ void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewIt
return;
}
- // Basically reimplementing the QListViewItem(QListViewItem*, QListViewItem*) constructor
+ // Basically reimplementing the TQListViewItem(TQListViewItem*, TQListViewItem*) constructor
// in here, without ever deleting the item.
if (item->parent())
item->parent()->takeItem(item);
@@ -1291,7 +1291,7 @@ void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewIt
insertItem(item);
}
-void KListView::contentsDragEnterEvent(QDragEnterEvent *event)
+void KListView::contentsDragEnterEvent(TQDragEnterEvent *event)
{
if (acceptDrag (event))
event->accept();
@@ -1302,19 +1302,19 @@ void KListView::setDropVisualizerWidth (int w)
d->mDropVisualizerWidth = w > 0 ? w : 1;
}
-QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
- QListViewItem *after)
+TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent,
+ TQListViewItem *after)
{
- QRect insertmarker;
+ TQRect insertmarker;
if (!after && !parent)
- insertmarker = QRect (0, 0, viewport()->width(), d->mDropVisualizerWidth/2);
+ insertmarker = TQRect (0, 0, viewport()->width(), d->mDropVisualizerWidth/2);
else
{
int level = 0;
if (after)
{
- QListViewItem* it = 0L;
+ TQListViewItem* it = 0L;
if (after->isOpen())
{
// Look for the last child (recursively)
@@ -1349,17 +1349,17 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
return insertmarker;
}
-QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item)
{
- QRect r;
+ TQRect r;
if (item)
{
r = itemRect(item);
r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize());
if (painter)
- style().drawPrimitive(QStyle::PE_FocusRect, painter, r, colorGroup(),
- QStyle::Style_FocusAtBorder, colorGroup().highlight());
+ style().drawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(),
+ TQStyle::Style_FocusAtBorder, colorGroup().highlight());
}
return r;
@@ -1369,13 +1369,13 @@ void KListView::cleanItemHighlighter ()
{
if (d->mOldDropHighlighter.isValid())
{
- QRect rect=d->mOldDropHighlighter;
- d->mOldDropHighlighter = QRect();
+ TQRect rect=d->mOldDropHighlighter;
+ d->mOldDropHighlighter = TQRect();
viewport()->repaint(rect, true);
}
}
-void KListView::rename(QListViewItem *item, int c)
+void KListView::rename(TQListViewItem *item, int c)
{
if (d->renameable.contains(c))
{
@@ -1398,13 +1398,13 @@ void KListView::setRenameable (int col, bool renameable)
d->renameable+=col;
}
-void KListView::doneEditing(QListViewItem *item, int row)
+void KListView::doneEditing(TQListViewItem *item, int row)
{
emit itemRenamed(item, item->text(row), row);
emit itemRenamed(item);
}
-bool KListView::acceptDrag(QDropEvent* e) const
+bool KListView::acceptDrag(TQDropEvent* e) const
{
return acceptDrops() && itemsMovable() && (e->source()==viewport());
}
@@ -1440,12 +1440,12 @@ bool KListView::dropHighlighter() const
return d->dropHighlighter;
}
-bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const
+bool KListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const
{
return ((column==tooltipColumn()) && !tooltip(item, column).isEmpty());
}
-QString KListView::tooltip(QListViewItem *item, int column) const
+TQString KListView::tooltip(TQListViewItem *item, int column) const
{
return item->text(column);
}
@@ -1460,7 +1460,7 @@ bool KListView::tabOrderedRenaming() const
return d->tabRename;
}
-void KListView::keyPressEvent (QKeyEvent* e)
+void KListView::keyPressEvent (TQKeyEvent* e)
{
//don't we need a contextMenuModifier too ? (aleXXX)
if (e->key() == d->contextMenuKey)
@@ -1470,7 +1470,7 @@ void KListView::keyPressEvent (QKeyEvent* e)
}
if (d->selectionMode != FileManager)
- QListView::keyPressEvent (e);
+ TQListView::keyPressEvent (e);
else
fileManagerKeyPressEvent (e);
}
@@ -1497,7 +1497,7 @@ bool KListView::automaticSelection() const
return d->selectedBySimpleMove;
}
-void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
+void KListView::fileManagerKeyPressEvent (TQKeyEvent* e)
{
//don't care whether it's on the keypad or not
int e_state=(e->state() & ~Keypad);
@@ -1516,19 +1516,19 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
//d->wasShiftEvent = (e_state == ShiftButton);
- QListViewItem* item = currentItem();
+ TQListViewItem* item = currentItem();
if (!item) return;
- QListViewItem* repaintItem1 = item;
- QListViewItem* repaintItem2 = 0L;
- QListViewItem* visItem = 0L;
+ TQListViewItem* repaintItem1 = item;
+ TQListViewItem* repaintItem2 = 0L;
+ TQListViewItem* visItem = 0L;
- QListViewItem* nextItem = 0L;
+ TQListViewItem* nextItem = 0L;
int items = 0;
bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton));
int selectedItems(0);
- for (QListViewItem *tmpItem=firstChild(); tmpItem; tmpItem=tmpItem->nextSibling())
+ for (TQListViewItem *tmpItem=firstChild(); tmpItem; tmpItem=tmpItem->nextSibling())
if (tmpItem->isSelected()) selectedItems++;
if (((!selectedItems) || ((selectedItems==1) && (d->selectedUsingMouse)))
@@ -1788,9 +1788,9 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (realKey && selectCurrentItem)
item->setSelected(false);
//this is mainly for the "goto filename beginning with pressed char" feature (aleXXX)
- QListView::SelectionMode oldSelectionMode = selectionMode();
- setSelectionMode (QListView::Multi);
- QListView::keyPressEvent (e);
+ TQListView::SelectionMode oldSelectionMode = selectionMode();
+ setSelectionMode (TQListView::Multi);
+ TQListView::keyPressEvent (e);
setSelectionMode (oldSelectionMode);
if (realKey && selectCurrentItem)
{
@@ -1806,7 +1806,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (visItem)
ensureItemVisible(visItem);
- QRect ir;
+ TQRect ir;
if (repaintItem1)
ir = ir.unite( itemRect(repaintItem1) );
if (repaintItem2)
@@ -1837,11 +1837,11 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
case Multi:
case Extended:
case NoSelection:
- setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode)));
+ setSelectionMode (static_cast<TQListView::SelectionMode>(static_cast<int>(mode)));
break;
case FileManager:
- setSelectionMode (QListView::Extended);
+ setSelectionMode (TQListView::Extended);
break;
default:
@@ -1855,7 +1855,7 @@ KListView::SelectionModeExt KListView::selectionModeExt () const
return d->selectionMode;
}
-int KListView::itemIndex( const QListViewItem *item ) const
+int KListView::itemIndex( const TQListViewItem *item ) const
{
if ( !item )
return -1;
@@ -1863,7 +1863,7 @@ int KListView::itemIndex( const QListViewItem *item ) const
if ( item == firstChild() )
return 0;
else {
- QListViewItemIterator it(firstChild());
+ TQListViewItemIterator it(firstChild());
uint j = 0;
for (; it.current() && it.current() != item; ++it, ++j );
@@ -1874,13 +1874,13 @@ int KListView::itemIndex( const QListViewItem *item ) const
}
}
-QListViewItem* KListView::itemAtIndex(int index)
+TQListViewItem* KListView::itemAtIndex(int index)
{
if (index<0)
return 0;
int j(0);
- for (QListViewItemIterator it=firstChild(); it.current(); ++it)
+ for (TQListViewItemIterator it=firstChild(); it.current(); ++it)
{
if (j==index)
return it.current();
@@ -1890,9 +1890,9 @@ QListViewItem* KListView::itemAtIndex(int index)
}
-void KListView::emitContextMenu (KListView*, QListViewItem* i)
+void KListView::emitContextMenu (KListView*, TQListViewItem* i)
{
- QPoint p;
+ TQPoint p;
if (i)
p = viewport()->mapToGlobal(itemRect(i).center());
@@ -1902,14 +1902,14 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i)
emit contextMenu (this, i, p);
}
-void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int)
+void KListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int)
{
emit contextMenu (this, i, p);
}
void KListView::setAcceptDrops (bool val)
{
- QListView::setAcceptDrops (val);
+ TQListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
}
@@ -1919,29 +1919,29 @@ int KListView::dropVisualizerWidth () const
}
-void KListView::viewportPaintEvent(QPaintEvent *e)
+void KListView::viewportPaintEvent(TQPaintEvent *e)
{
d->paintAbove = 0;
d->paintCurrent = 0;
d->paintBelow = 0;
d->painting = true;
- QListView::viewportPaintEvent(e);
+ TQListView::viewportPaintEvent(e);
if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
{
- QPainter painter(viewport());
+ TQPainter painter(viewport());
// This is where we actually draw the drop-visualizer
painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
}
if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
{
- QPainter painter(viewport());
+ TQPainter painter(viewport());
// This is where we actually draw the drop-highlighter
- style().drawPrimitive(QStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
- QStyle::Style_FocusAtBorder);
+ style().drawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
+ TQStyle::Style_FocusAtBorder);
}
d->painting = false;
}
@@ -1962,9 +1962,9 @@ bool KListView::fullWidth() const
return d->fullWidth;
}
-int KListView::addColumn(const QString& label, int width)
+int KListView::addColumn(const TQString& label, int width)
{
- int result = QListView::addColumn(label, width);
+ int result = TQListView::addColumn(label, width);
if (d->fullWidth) {
header()->setStretchEnabled(false, columns()-2);
header()->setStretchEnabled(true, columns()-1);
@@ -1972,9 +1972,9 @@ int KListView::addColumn(const QString& label, int width)
return result;
}
-int KListView::addColumn(const QIconSet& iconset, const QString& label, int width)
+int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int width)
{
- int result = QListView::addColumn(iconset, label, width);
+ int result = TQListView::addColumn(iconset, label, width);
if (d->fullWidth) {
header()->setStretchEnabled(false, columns()-2);
header()->setStretchEnabled(true, columns()-1);
@@ -1984,21 +1984,21 @@ int KListView::addColumn(const QIconSet& iconset, const QString& label, int widt
void KListView::removeColumn(int index)
{
- QListView::removeColumn(index);
+ TQListView::removeColumn(index);
if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
}
-void KListView::viewportResizeEvent(QResizeEvent* e)
+void KListView::viewportResizeEvent(TQResizeEvent* e)
{
- QListView::viewportResizeEvent(e);
+ TQListView::viewportResizeEvent(e);
}
-const QColor &KListView::alternateBackground() const
+const TQColor &KListView::alternateBackground() const
{
return d->alternateBackground;
}
-void KListView::setAlternateBackground(const QColor &c)
+void KListView::setAlternateBackground(const TQColor &c)
{
d->alternateBackground = c;
repaint();
@@ -2015,17 +2015,17 @@ bool KListView::shadeSortColumn() const
return d->shadeSortColumn;
}
-void KListView::saveLayout(KConfig *config, const QString &group) const
+void KListView::saveLayout(KConfig *config, const TQString &group) const
{
KConfigGroupSaver saver(config, group);
- QStringList widths, order;
+ TQStringList widths, order;
const int colCount = columns();
- QHeader* const thisHeader = header();
+ TQHeader* const thisHeader = header();
for (int i = 0; i < colCount; ++i)
{
- widths << QString::number(columnWidth(i));
- order << QString::number(thisHeader->mapToIndex(i));
+ widths << TQString::number(columnWidth(i));
+ order << TQString::number(thisHeader->mapToIndex(i));
}
config->writeEntry("ColumnWidths", widths);
config->writeEntry("ColumnOrder", order);
@@ -2033,14 +2033,14 @@ void KListView::saveLayout(KConfig *config, const QString &group) const
config->writeEntry("SortAscending", d->sortAscending);
}
-void KListView::restoreLayout(KConfig *config, const QString &group)
+void KListView::restoreLayout(KConfig *config, const TQString &group)
{
KConfigGroupSaver saver(config, group);
- QStringList cols = config->readListEntry("ColumnWidths");
+ TQStringList cols = config->readListEntry("ColumnWidths");
int i = 0;
{ // scope the iterators
- QStringList::ConstIterator it = cols.constBegin();
- const QStringList::ConstIterator itEnd = cols.constEnd();
+ TQStringList::ConstIterator it = cols.constBegin();
+ const TQStringList::ConstIterator itEnd = cols.constEnd();
for (; it != itEnd; ++it)
setColumnWidth(i++, (*it).toInt());
}
@@ -2052,8 +2052,8 @@ void KListView::restoreLayout(KConfig *config, const QString &group)
const int colCount = columns();
for (i = 0; i < colCount; ++i) // final index positions from lowest to highest
{
- QStringList::ConstIterator it = cols.constBegin();
- const QStringList::ConstIterator itEnd = cols.constEnd();
+ TQStringList::ConstIterator it = cols.constBegin();
+ const TQStringList::ConstIterator itEnd = cols.constEnd();
int section = 0;
for (; (it != itEnd) && ((*it).toInt() != i); ++it, ++section) ;
@@ -2070,15 +2070,15 @@ void KListView::restoreLayout(KConfig *config, const QString &group)
void KListView::setSorting(int column, bool ascending)
{
- QListViewItem *selected = 0;
+ TQListViewItem *selected = 0;
- if (selectionMode() == QListView::Single) {
+ if (selectionMode() == TQListView::Single) {
selected = selectedItem();
if (selected && !selected->isVisible())
selected = 0;
}
- else if (selectionMode() != QListView::NoSelection) {
- QListViewItem *item = firstChild();
+ else if (selectionMode() != TQListView::NoSelection) {
+ TQListViewItem *item = firstChild();
while (item && !selected) {
if (item->isSelected() && item->isVisible())
selected = item;
@@ -2088,12 +2088,12 @@ void KListView::setSorting(int column, bool ascending)
d->sortColumn = column;
d->sortAscending = ascending;
- QListView::setSorting(column, ascending);
+ TQListView::setSorting(column, ascending);
if (selected)
ensureItemVisible(selected);
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
while ( item ) {
KListViewItem *kItem = dynamic_cast<KListViewItem*>(item);
if (kItem) kItem->m_known = false;
@@ -2111,12 +2111,12 @@ bool KListView::ascendingSort(void) const
return d->sortAscending;
}
-void KListView::takeItem(QListViewItem *item)
+void KListView::takeItem(TQListViewItem *item)
{
if(item && item == d->editor->currentItem())
d->editor->terminate();
- QListView::takeItem(item);
+ TQListView::takeItem(item);
}
void KListView::disableAutoSelection()
@@ -2138,63 +2138,63 @@ void KListView::resetAutoSelection()
d->autoSelectDelay = KGlobalSettings::autoSelectDelay();
}
-void KListView::doubleClicked( QListViewItem *item, const QPoint &pos, int c )
+void KListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c )
{
- emit QListView::doubleClicked( item, pos, c );
+ emit TQListView::doubleClicked( item, pos, c );
}
-KListViewItem::KListViewItem(QListView *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(TQListView *parent)
+ : TQListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(TQListViewItem *parent)
+ : TQListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after)
+ : TQListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after)
+ : TQListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(TQListView *parent,
+ TQString label1, TQString label2, TQString label3, TQString label4,
+ TQString label5, TQString label6, TQString label7, TQString label8)
+ : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(TQListViewItem *parent,
+ TQString label1, TQString label2, TQString label3, TQString label4,
+ TQString label5, TQString label6, TQString label7, TQString label8)
+ : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after,
+ TQString label1, TQString label2, TQString label3, TQString label4,
+ TQString label5, TQString label6, TQString label7, TQString label8)
+ : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after,
+ TQString label1, TQString label2, TQString label3, TQString label4,
+ TQString label5, TQString label6, TQString label7, TQString label8)
+ : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
@@ -2213,31 +2213,31 @@ void KListViewItem::init()
emit lv->itemAdded(this);
}
-void KListViewItem::insertItem(QListViewItem *item)
+void KListViewItem::insertItem(TQListViewItem *item)
{
- QListViewItem::insertItem(item);
+ TQListViewItem::insertItem(item);
if(listView())
emit static_cast<KListView *>(listView())->itemAdded(item);
}
-void KListViewItem::takeItem(QListViewItem *item)
+void KListViewItem::takeItem(TQListViewItem *item)
{
- QListViewItem::takeItem(item);
+ TQListViewItem::takeItem(item);
if(listView())
emit static_cast<KListView *>(listView())->itemRemoved(item);
}
-const QColor &KListViewItem::backgroundColor()
+const TQColor &KListViewItem::backgroundColor()
{
if (isAlternate())
return static_cast< KListView* >(listView())->alternateBackground();
return listView()->viewport()->colorGroup().base();
}
-QColor KListViewItem::backgroundColor(int column)
+TQColor KListViewItem::backgroundColor(int column)
{
KListView* view = static_cast< KListView* >(listView());
- QColor color = isAlternate() ?
+ TQColor color = isAlternate() ?
view->alternateBackground() :
view->viewport()->colorGroup().base();
@@ -2245,7 +2245,7 @@ QColor KListViewItem::backgroundColor(int column)
if ( (view->columns() > 1) && view->shadeSortColumn() && (column == view->columnSorted()) )
{
if ( color == Qt::black )
- color = QColor(55, 55, 55); // dark gray
+ color = TQColor(55, 55, 55); // dark gray
else
{
int h,s,v;
@@ -2335,25 +2335,25 @@ bool KListViewItem::isAlternate()
return false;
}
-void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
- QListView* lv = listView();
- const QPixmap *pm = lv->viewport()->backgroundPixmap();
+ TQColorGroup _cg = cg;
+ TQListView* lv = listView();
+ const TQPixmap *pm = lv->viewport()->backgroundPixmap();
if (pm && !pm->isNull())
{
- _cg.setBrush(QColorGroup::Base, QBrush(backgroundColor(column), *pm));
- QPoint o = p->brushOrigin();
+ _cg.setBrush(TQColorGroup::Base, TQBrush(backgroundColor(column), *pm));
+ TQPoint o = p->brushOrigin();
p->setBrushOrigin( o.x()-lv->contentsX(), o.y()-lv->contentsY() );
}
else
{
_cg.setColor((lv->viewport()->backgroundMode() == Qt::FixedColor) ?
- QColorGroup::Background : QColorGroup::Base,
+ TQColorGroup::Background : TQColorGroup::Base,
backgroundColor(column));
}
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ TQListViewItem::paintCell(p, _cg, column, width, alignment);
}
void KListView::virtual_hook( int, void* )
diff --git a/kdeui/klistview.h b/kdeui/klistview.h
index a2300f02e..fa785dbc8 100644
--- a/kdeui/klistview.h
+++ b/kdeui/klistview.h
@@ -20,31 +20,31 @@
#ifndef KLISTVIEW_H
#define KLISTVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
class QDragObject;
class KConfig;
class KLineEdit;
/**
- * This Widget extends the functionality of QListView to honor the system
+ * This Widget extends the functionality of TQListView to honor the system
* wide settings for Single Click/Double Click mode, AutoSelection and
* ChangeCursorOverLink (TM).
*
* There is a new signal executed(). It gets connected to either
- * QListView::clicked() or QListView::doubleClicked() depending on the KDE
+ * TQListView::clicked() or TQListView::doubleClicked() depending on the KDE
* wide Single Click/Double Click settings. It is strongly recommended that
* you use this signal instead of the above mentioned. This way you don´t
* need to care about the current settings.
* If you want to get informed when the user selects something connect to the
- * QListView::selectionChanged() signal.
+ * TQListView::selectionChanged() signal.
*
* Drag-and-Drop is supported with the signal dropped(), just setAcceptDrops(true)
* and connect it to a suitable slot.
* To see where you are dropping, setDropVisualizer(true).
- * And also you'll need acceptDrag(QDropEvent*)
+ * And also you'll need acceptDrag(TQDropEvent*)
*
* KListView is drag-enabled, too: to benefit from that you have to derive from it.
* Reimplement dragObject() and (possibly) startDrag(),
@@ -64,7 +64,7 @@ class KDEUI_EXPORT KListView : public QListView
Q_PROPERTY( bool dropVisualizer READ dropVisualizer WRITE setDropVisualizer )
Q_PROPERTY( int tooltipColumn READ tooltipColumn WRITE setTooltipColumn )
Q_PROPERTY( int dropVisualizerWidth READ dropVisualizerWidth WRITE setDropVisualizerWidth )
- Q_PROPERTY( QColor alternateBackground READ alternateBackground WRITE setAlternateBackground )
+ Q_PROPERTY( TQColor alternateBackground READ alternateBackground WRITE setAlternateBackground )
Q_PROPERTY( bool shadeSortColumn READ shadeSortColumn WRITE setShadeSortColumn )
Q_OVERRIDE( SelectionModeExt selectionMode READ selectionModeExt WRITE setSelectionModeExt )
@@ -73,7 +73,7 @@ public:
/**
* Possible selection modes.
*
- * The first four correspond directly to QListView::SelectionMode, while
+ * The first four correspond directly to TQListView::SelectionMode, while
* the FileManager selection mode is defined as follows:
* @li home: move to the first
* @li end: move to the last
@@ -102,10 +102,10 @@ public:
* This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected
*/
enum SelectionModeExt {
- Single = QListView::Single,
- Multi = QListView::Multi,
- Extended = QListView::Extended,
- NoSelection = QListView::NoSelection,
+ Single = TQListView::Single,
+ Multi = TQListView::Multi,
+ Extended = TQListView::Extended,
+ NoSelection = TQListView::NoSelection,
FileManager
};
@@ -113,9 +113,9 @@ public:
* Constructor.
*
* The parameters @p parent and @p name are handled by
- * QListView, as usual.
+ * TQListView, as usual.
*/
- KListView (QWidget *parent = 0, const char *name = 0);
+ KListView (TQWidget *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -133,14 +133,14 @@ public:
/**
* This function determines whether the given coordinates are within the
- * execute area. The execute area is the part of a QListViewItem where mouse
+ * execute area. The execute area is the part of a TQListViewItem where mouse
* clicks or double clicks respectively generate a executed() signal.
- * Depending on QListView::allColumnsShowFocus() this is either the
+ * Depending on TQListView::allColumnsShowFocus() this is either the
* whole item or only the first column.
* @return true if point is inside execute area of an item, false in all
* other cases including the case that it is over the viewport.
*/
- virtual bool isExecuteArea( const QPoint& point );
+ virtual bool isExecuteArea( const TQPoint& point );
/**
* Same thing, but from an x coordinate only. This only checks if x is in
@@ -154,7 +154,7 @@ public:
*
* @deprecated
*/
- QPtrList<QListViewItem> selectedItems() const;
+ TQPtrList<TQListViewItem> selectedItems() const;
/**
* @return a list containing the currently selected items.
@@ -166,7 +166,7 @@ public:
*
* @since 3.4
*/
- QPtrList<QListViewItem> selectedItems(bool includeHiddenItems) const; // ### BIC: KDE 4: use an implicitly shared class! (QValutList?) and merge with above, default to true
+ TQPtrList<TQListViewItem> selectedItems(bool includeHiddenItems) const; // ### BIC: KDE 4: use an implicitly shared class! (QValutList?) and merge with above, default to true
/**
* Arbitrarily move @p item to @p parent, positioned immediately after item @p after.
@@ -174,25 +174,25 @@ public:
*
* (Un-deprecated in kde-3.4)
*/
- void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after);
+ void moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after);
/**
* @return the last item (not child!) of this listview.
*
* @see lastChild()
*/
- QListViewItem *lastItem() const;
+ TQListViewItem *lastItem() const;
/**
* @return the last child of this listview.
*
* @see lastItem()
*/
- QListViewItem* lastChild () const;
+ TQListViewItem* lastChild () const;
/**
* @return the lineedit used for inline renaming.
- * Use that to setup a KCompletion or QValidator for the lineedit
+ * Use that to setup a KCompletion or TQValidator for the lineedit
*
* @since 3.2
*/
@@ -284,14 +284,14 @@ public:
* @p item doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- int itemIndex( const QListViewItem *item ) const;
+ int itemIndex( const TQListViewItem *item ) const;
/**
* Returns the item of @p index within the item tree or 0 if
* @p index doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- QListViewItem* itemAtIndex(int index);
+ TQListViewItem* itemAtIndex(int index);
/**
* @deprecated
@@ -318,11 +318,11 @@ public:
*
* @see removeColumn()
*/
- virtual int addColumn(const QString& label, int width = -1);
+ virtual int addColumn(const TQString& label, int width = -1);
/**
* Reimplemented for full width support
*/
- virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1);
+ virtual int addColumn(const TQIconSet& iconset, const TQString& label, int width = -1);
/**
* Reimplemented for full width support
*
@@ -339,13 +339,13 @@ public:
*
* @see alternateBackground()
**/
- void setAlternateBackground(const QColor &c);
+ void setAlternateBackground(const TQColor &c);
/**
* @return the alternate background color
*
* @see setAlternateBackground()
*/
- const QColor &alternateBackground() const;
+ const TQColor &alternateBackground() const;
/**
* Saves the list view's layout (column widtsh, column order, sort column)
@@ -354,7 +354,7 @@ public:
* @param config the KConfig object to write to
* @param group the config group to use
*/
- void saveLayout(KConfig *config, const QString &group) const;
+ void saveLayout(KConfig *config, const TQString &group) const;
/**
* Reads the list view's layout from a KConfig group as stored with
* saveLayout
@@ -362,7 +362,7 @@ public:
* @param config the KConfig object to read from
* @param group the config group to use
*/
- void restoreLayout(KConfig *config, const QString &group);
+ void restoreLayout(KConfig *config, const TQString &group);
/**
* Reimplemented to remember the current sort column and order.
* @param column is the column to be sorted, or -1 to sort in order of
@@ -384,7 +384,7 @@ public:
/**
* Reimplemented for internal reasons.
*/
- virtual void takeItem(QListViewItem *i);
+ virtual void takeItem(TQListViewItem *i);
/**
* Set to true if the currently sorted column should be drawn shaded. Defaults to true
@@ -409,10 +409,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed listview item.
*
- * Note that you may not delete any QListViewItem objects in slots
+ * Note that you may not delete any TQListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item );
+ void executed( TQListViewItem *item );
/**
* This signal is emitted whenever the user executes an listview item.
@@ -422,10 +422,10 @@ signals:
* @param pos is the position where the user has clicked
* @param c is the column into which the user clicked.
*
- * Note that you may not delete any QListViewItem objects in slots
+ * Note that you may not delete any TQListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item, const QPoint &pos, int c );
+ void executed( TQListViewItem *item, const TQPoint &pos, int c );
/**
* This signal gets emitted whenever something acceptable is
@@ -437,7 +437,7 @@ signals:
*
* @see acceptDrop()
*/
- void dropped (QDropEvent * e, QListViewItem *after);
+ void dropped (TQDropEvent * e, TQListViewItem *after);
/**
* This signal gets emitted whenever something acceptable is
@@ -451,7 +451,7 @@ signals:
* @param after is the item after which the drop occurred (or 0L, if
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* after);
+ void dropped (KListView* list, TQDropEvent* e, TQListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
@@ -465,7 +465,7 @@ signals:
* @param after is the item after which the drop occurred (or 0L, if
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (KListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
@@ -478,7 +478,7 @@ signals:
* @param after is the item after which the drop occurred (or 0L, if
* the drop was above all items
*/
- void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
/**
* This signal is emitted when ever the user moves an item in the list via
@@ -509,7 +509,7 @@ signals:
* @param afterFirst the item that parameter item was in before the move, in the list
* @param afterNow the item it's currently after.
*/
- void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void moved (TQListViewItem *item, TQListViewItem *afterFirst, TQListViewItem *afterNow);
/**
@@ -517,7 +517,7 @@ signals:
* each and every item moved, in order. The first element in @p items associates
* with the first of afterFirst and afterNow.
*/
- void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow);
+ void moved(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &afterFirst, TQPtrList<TQListViewItem> &afterNow);
/**
* This signal gets emitted when an item is renamed via in-place renaming.
@@ -526,24 +526,24 @@ signals:
* @param str is the new value of column @p col.
* @param col is the renamed column.
*/
- void itemRenamed(QListViewItem* item, const QString &str, int col);
+ void itemRenamed(TQListViewItem* item, const TQString &str, int col);
/**
* Same as above, but without the extra information.
*/
- void itemRenamed(QListViewItem* item);
+ void itemRenamed(TQListViewItem* item);
/**
* This signal is emitted when the shortcut key for popup-menus is pressed.
*
* Normally you should not use this, just connect a slot to signal
- * contextMenu (KListView*, QListViewItem*, const QPoint&) to correctly
+ * contextMenu (KListView*, TQListViewItem*, const TQPoint&) to correctly
* handle showing context menus regardless of settings.
*
* @param list is this listview.
* @param item is the currentItem() at the time the key was pressed. May be 0L.
*/
- void menuShortCutPressed (KListView* list, QListViewItem* item);
+ void menuShortCutPressed (KListView* list, TQListViewItem* item);
/**
* This signal is emitted whenever a context-menu should be shown for item @p i.
@@ -553,16 +553,16 @@ signals:
* @param i is the item for which the menu should be shown. May be 0L.
* @param p is the point at which the menu should be shown.
*/
- void contextMenu (KListView* l, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p);
- void itemAdded(QListViewItem *item);
- void itemRemoved(QListViewItem *item);
+ void itemAdded(TQListViewItem *item);
+ void itemRemoved(TQListViewItem *item);
public slots:
/**
* Rename column @p c of @p item.
*/
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(TQListViewItem *item, int c);
/**
* By default, if you called setItemsRenameable(true),
@@ -643,7 +643,7 @@ public slots:
/**
* Set the selection mode.
*
- * A different name was chosen to avoid API-clashes with QListView::setSelectionMode().
+ * A different name was chosen to avoid API-clashes with TQListView::setSelectionMode().
*/
void setSelectionModeExt (SelectionModeExt mode);
@@ -662,19 +662,19 @@ public slots:
protected:
/**
* Determine whether a drop on position @p p would count as
- * being above or below the QRect @p rect.
+ * being above or below the TQRect @p rect.
*
* @param rect is the rectangle we examine.
* @param p is the point located in the rectangle, p is assumed to be in
* viewport coordinates.
*/
- inline bool below (const QRect& rect, const QPoint& p)
+ inline bool below (const TQRect& rect, const TQPoint& p)
{
return (p.y() > (rect.top() + (rect.bottom() - rect.top())/2));
}
/**
- * An overloaded version of below(const QRect&, const QPoint&).
+ * An overloaded version of below(const TQRect&, const TQPoint&).
*
* It differs from the above only in what arguments it takes.
*
@@ -682,7 +682,7 @@ protected:
* @param p is translated from contents coordinates to viewport coordinates
* before being passed to the above function.
*/
- inline bool below (QListViewItem* i, const QPoint& p)
+ inline bool below (TQListViewItem* i, const TQPoint& p)
{
return below (itemRect(i), contentsToViewport(p));
}
@@ -691,13 +691,13 @@ protected:
* Reimplemented to reload the alternate background in palette changes.
* @internal
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
* Emit signal executed.
* @internal
*/
- void emitExecute( QListViewItem *item, const QPoint &pos, int c );
+ void emitExecute( TQListViewItem *item, const TQPoint &pos, int c );
/**
* Reimplemented for internal reasons.
@@ -706,7 +706,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void focusInEvent(QFocusEvent* fe);
+ virtual void focusInEvent(TQFocusEvent* fe);
/**
* Reimplemented for internal reasons.
@@ -715,7 +715,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void focusOutEvent( QFocusEvent *fe );
+ virtual void focusOutEvent( TQFocusEvent *fe );
/**
* Reimplemented for internal reasons.
@@ -724,17 +724,17 @@ protected:
*
* The API is unaffected.
*/
- virtual void leaveEvent( QEvent *e );
+ virtual void leaveEvent( TQEvent *e );
/**
* @return the tooltip for @p column of @p item.
*/
- virtual QString tooltip(QListViewItem* item, int column) const;
+ virtual TQString tooltip(TQListViewItem* item, int column) const;
/**
* @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
*/
- virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
+ virtual bool showTooltip(TQListViewItem *item, const TQPoint &pos, int column) const;
/**
* Reimplemented for internal reasons.
@@ -743,7 +743,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragMoveEvent (QDragMoveEvent *event);
+ virtual void contentsDragMoveEvent (TQDragMoveEvent *event);
/**
* Reimplemented for internal reasons.
@@ -752,7 +752,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMousePressEvent( QMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -761,7 +761,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -770,7 +770,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -779,7 +779,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragLeaveEvent (QDragLeaveEvent *event);
+ virtual void contentsDragLeaveEvent (TQDragLeaveEvent *event);
/**
* Reimplemented for internal reasons.
@@ -788,7 +788,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseReleaseEvent (QMouseEvent*);
+ virtual void contentsMouseReleaseEvent (TQMouseEvent*);
/**
* Reimplemented for internal reasons.
@@ -797,7 +797,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDropEvent (QDropEvent*);
+ virtual void contentsDropEvent (TQDropEvent*);
/**
* Reimplemented for internal reasons.
@@ -806,21 +806,21 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragEnterEvent (QDragEnterEvent *);
+ virtual void contentsDragEnterEvent (TQDragEnterEvent *);
/**
* @return a dragobject encoding the current selection.
*
* @see setDragEnabled()
*/
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
/**
* @return true if the @p event provides some acceptable
* format.
* A common mistake is to forget the "const" in your reimplementation
*/
- virtual bool acceptDrag (QDropEvent* event) const;
+ virtual bool acceptDrag (TQDropEvent* event) const;
/**
* Paint the drag line. If painter is null, don't try to :)
@@ -829,7 +829,7 @@ protected:
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after);
+ virtual TQRect drawDropVisualizer (TQPainter *p, TQListViewItem *parent, TQListViewItem *after);
/**
* Paint the drag rectangle. If painter is null, don't try to :)
@@ -837,7 +837,7 @@ protected:
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual TQRect drawItemHighlighter(TQPainter *painter, TQListViewItem *item);
/**
* This method calls dragObject() and starts the drag.
@@ -854,7 +854,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void keyPressEvent (QKeyEvent*);
+ virtual void keyPressEvent (TQKeyEvent*);
/**
* Reimplemented for internal reasons.
@@ -863,7 +863,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void viewportPaintEvent(QPaintEvent*);
+ virtual void viewportPaintEvent(TQPaintEvent*);
/**
* In FileManager selection mode: explicitly activate the mode
@@ -885,7 +885,7 @@ protected:
/**
* Reimplemented for setFullWidth()
*/
- virtual void viewportResizeEvent(QResizeEvent* e);
+ virtual void viewportResizeEvent(TQResizeEvent* e);
/**
* Disable AutoSelection. This overrides the system wide setting for
@@ -905,10 +905,10 @@ protected:
/**
* @deprecated This is just here for binary compatibility. Use the signal
- * in QListView instead.
+ * in TQListView instead.
*/
// KDE 4: remove
- void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
+ void doubleClicked( TQListViewItem *item, const TQPoint &pos, int c );
protected slots:
/**
@@ -917,8 +917,8 @@ protected slots:
*/
void slotSettingsChanged(int);
- void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c );
- void doneEditing(QListViewItem *item, int row);
+ void slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c );
+ void doneEditing(TQListViewItem *item, int row);
/**
* Repaint the rect where I was drawing the drop line.
@@ -933,18 +933,18 @@ protected slots:
/**
* Emit the contextMenu signal. This slot is for mouse actions.
*/
- void emitContextMenu (QListViewItem*, const QPoint&, int);
+ void emitContextMenu (TQListViewItem*, const TQPoint&, int);
/**
* Emit the contextMenu signal. This slot is for key presses.
*/
- void emitContextMenu (KListView*, QListViewItem*);
+ void emitContextMenu (KListView*, TQListViewItem*);
/**
* Accessory slot for AutoSelect
* @internal
*/
- void slotOnItem( QListViewItem *item );
+ void slotOnItem( TQListViewItem *item );
/**
* Accessory slot for AutoSelect/ChangeCursorOverItem
@@ -970,20 +970,20 @@ protected:
/**
* Handle dropEvent when itemsMovable() is set to true.
*/
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
+ virtual void movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme);
/**
- * Where is the nearest QListViewItem that I'm going to drop?
+ * Where is the nearest TQListViewItem that I'm going to drop?
*
* FIXME KDE 4.0: Make this method const so it can be called from an
* acceptDrag method without ugly casts
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
* A special keyPressEvent (for FileManager selection mode).
*/
- void fileManagerKeyPressEvent (QKeyEvent*);
+ void fileManagerKeyPressEvent (TQKeyEvent*);
/**
* Convert the depth of an item into its indentation in pixels
@@ -997,7 +997,7 @@ protected:
private:
class KListViewPrivate;
KListViewPrivate* const d;
- bool isExecuteArea( int x, QListViewItem* item );
+ bool isExecuteArea( int x, TQListViewItem* item );
};
/**
@@ -1011,44 +1011,44 @@ class KDEUI_EXPORT KListViewItem : public QListViewItem
friend class KListView;
public:
/**
- * constructors. The semantics remain as in QListViewItem.
- * Although they accept a QListViewItem as parent, please
+ * constructors. The semantics remain as in TQListViewItem.
+ * Although they accept a TQListViewItem as parent, please
* don't mix KListViewItem (or subclasses) with QListViewItem
* (or subclasses).
*/
- KListViewItem(QListView *parent);
- KListViewItem(QListViewItem *parent);
- KListViewItem(QListView *parent, QListViewItem *after);
- KListViewItem(QListViewItem *parent, QListViewItem *after);
-
- KListViewItem(QListView *parent,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListViewItem *parent,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListView *parent, QListViewItem *after,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListViewItem *parent, QListViewItem *after,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
+ KListViewItem(TQListView *parent);
+ KListViewItem(TQListViewItem *parent);
+ KListViewItem(TQListView *parent, TQListViewItem *after);
+ KListViewItem(TQListViewItem *parent, TQListViewItem *after);
+
+ KListViewItem(TQListView *parent,
+ TQString, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null);
+
+ KListViewItem(TQListViewItem *parent,
+ TQString, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null);
+
+ KListViewItem(TQListView *parent, TQListViewItem *after,
+ TQString, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null);
+
+ KListViewItem(TQListViewItem *parent, TQListViewItem *after,
+ TQString, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null,
+ TQString = TQString::null, TQString = TQString::null);
virtual ~KListViewItem();
- virtual void insertItem(QListViewItem *item);
- virtual void takeItem(QListViewItem *item);
+ virtual void insertItem(TQListViewItem *item);
+ virtual void takeItem(TQListViewItem *item);
/**
* returns true if this item is to be drawn with the alternate background
*/
@@ -1056,7 +1056,7 @@ public:
/**
* returns the background color for this item
*/
- const QColor &backgroundColor() KDE_DEPRECATED; // #### should be removed in 4.0; use below instead
+ const TQColor &backgroundColor() KDE_DEPRECATED; // #### should be removed in 4.0; use below instead
/**
* returns the background color for this item at given column
@@ -1066,9 +1066,9 @@ public:
* ### only 1 column
* @since 3.4
*/
- QColor backgroundColor(int column);
+ TQColor backgroundColor(int column);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment);
private:
diff --git a/kdeui/klistviewlineedit.h b/kdeui/klistviewlineedit.h
index 1fe56e202..72f2555ed 100644
--- a/kdeui/klistviewlineedit.h
+++ b/kdeui/klistviewlineedit.h
@@ -32,25 +32,25 @@ public:
KListViewLineEdit(KListView *parent);
~KListViewLineEdit();
- QListViewItem *currentItem() const;
+ TQListViewItem *currentItem() const;
signals:
- void done(QListViewItem*, int);
+ void done(TQListViewItem*, int);
public slots:
void terminate();
- void load(QListViewItem *i, int c);
+ void load(TQListViewItem *i, int c);
protected:
- virtual void focusOutEvent(QFocusEvent *);
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void paintEvent(QPaintEvent *e);
- virtual bool event (QEvent *pe);
+ virtual void focusOutEvent(TQFocusEvent *);
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
+ virtual bool event (TQEvent *pe);
/// @since 3.1
- void selectNextCell (QListViewItem *pi, int column, bool forward);
+ void selectNextCell (TQListViewItem *pi, int column, bool forward);
void terminate(bool commit);
- QListViewItem *item;
+ TQListViewItem *item;
int col;
KListView* const p;
@@ -58,7 +58,7 @@ protected slots:
void slotSelectionChanged();
/// @since 3.5.4
- void slotItemRemoved(QListViewItem *i);
+ void slotItemRemoved(TQListViewItem *i);
};
diff --git a/kdeui/klistviewsearchline.cpp b/kdeui/klistviewsearchline.cpp
index e3f9271eb..7bd26afc1 100644
--- a/kdeui/klistviewsearchline.cpp
+++ b/kdeui/klistviewsearchline.cpp
@@ -25,11 +25,11 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004
@@ -47,45 +47,45 @@ public:
bool caseSensitive;
bool activeSearch;
bool keepParentsVisible;
- QString search;
+ TQString search;
int queuedSearches;
- QValueList<int> searchColumns;
+ TQValueList<int> searchColumns;
};
////////////////////////////////////////////////////////////////////////////////
// public methods
////////////////////////////////////////////////////////////////////////////////
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, KListView *listView, const char *name) :
+KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, const char *name) :
KLineEdit(parent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = listView;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
if(listView) {
- connect(listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- connect(listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
else
setEnabled(false);
}
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, const char *name) :
+KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) :
KLineEdit(parent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = 0;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
setEnabled(false);
}
@@ -100,7 +100,7 @@ bool KListViewSearchLine::caseSensitive() const
return d->caseSensitive;
}
-QValueList<int> KListViewSearchLine::searchColumns() const
+TQValueList<int> KListViewSearchLine::searchColumns() const
{
return d->searchColumns;
}
@@ -119,7 +119,7 @@ KListView *KListViewSearchLine::listView() const
// public slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::updateSearch(const QString &s)
+void KListViewSearchLine::updateSearch(const TQString &s)
{
if(!d->listView)
return;
@@ -129,7 +129,7 @@ void KListViewSearchLine::updateSearch(const QString &s)
// If there's a selected item that is visible, make sure that it's visible
// when the search changes too (assuming that it still matches).
- QListViewItem *currentItem = 0;
+ TQListViewItem *currentItem = 0;
switch(d->listView->selectionMode())
{
@@ -140,8 +140,8 @@ void KListViewSearchLine::updateSearch(const QString &s)
break;
default:
{
- int flags = QListViewItemIterator::Selected | QListViewItemIterator::Visible;
- for(QListViewItemIterator it(d->listView, flags);
+ int flags = TQListViewItemIterator::Selected | TQListViewItemIterator::Visible;
+ for(TQListViewItemIterator it(d->listView, flags);
it.current() && !currentItem;
++it)
{
@@ -170,7 +170,7 @@ void KListViewSearchLine::setKeepParentsVisible(bool v)
d->keepParentsVisible = v;
}
-void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
+void KListViewSearchLine::setSearchColumns(const TQValueList<int> &columns)
{
d->searchColumns = columns;
}
@@ -178,21 +178,21 @@ void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
void KListViewSearchLine::setListView(KListView *lv)
{
if(d->listView) {
- disconnect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ disconnect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- disconnect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ disconnect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
d->listView = lv;
if(lv) {
- connect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- connect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
setEnabled(bool(lv));
@@ -202,7 +202,7 @@ void KListViewSearchLine::setListView(KListView *lv)
// protected members
////////////////////////////////////////////////////////////////////////////////
-bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &s) const
+bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const
{
if(s.isEmpty())
return true;
@@ -211,7 +211,7 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
// specifified. If it is empty default to searching all of the columns.
if(!d->searchColumns.isEmpty()) {
- QValueList<int>::ConstIterator it = d->searchColumns.begin();
+ TQValueList<int>::ConstIterator it = d->searchColumns.begin();
for(; it != d->searchColumns.end(); ++it) {
if(*it < item->listView()->columns() &&
item->text(*it).find(s, 0, d->caseSensitive) >= 0)
@@ -231,13 +231,13 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
return false;
}
-QPopupMenu *KListViewSearchLine::createPopupMenu()
+TQPopupMenu *KListViewSearchLine::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
if (d->listView->columns()>1) {
- QPopupMenu *subMenu = new QPopupMenu(popup);
- connect(subMenu, SIGNAL(activated(int)), this, SLOT(searchColumnsMenuActivated(int)));
+ TQPopupMenu *subMenu = new TQPopupMenu(popup);
+ connect(subMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(searchColumnsMenuActivated(int)));
popup->insertSeparator();
popup->insertItem(i18n("Search Columns"), subMenu);
@@ -247,11 +247,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
bool allColumnsAreSearchColumns = true;
// TODO Make the entry order match the actual column order
- QHeader* const header = d->listView->header();
+ TQHeader* const header = d->listView->header();
int visibleColumns = 0;
for(int i = 0; i < d->listView->columns(); i++) {
if(d->listView->columnWidth(i)>0) {
- QString columnText = d->listView->columnText(i);
+ TQString columnText = d->listView->columnText(i);
if(columnText.isEmpty()) {
int visiblePosition=1;
for(int j = 0; j < header->mapToIndex(i); j++)
@@ -281,11 +281,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
// protected slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::queueSearch(const QString &search)
+void KListViewSearchLine::queueSearch(const TQString &search)
{
d->queuedSearches++;
d->search = search;
- QTimer::singleShot(200, this, SLOT(activateSearch()));
+ TQTimer::singleShot(200, this, TQT_SLOT(activateSearch()));
}
void KListViewSearchLine::activateSearch()
@@ -300,7 +300,7 @@ void KListViewSearchLine::activateSearch()
// private slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::itemAdded(QListViewItem *item) const
+void KListViewSearchLine::itemAdded(TQListViewItem *item) const
{
item->setVisible(itemMatches(item, text()));
}
@@ -342,10 +342,10 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id)
void KListViewSearchLine::checkItemParentsNotVisible()
{
- QListViewItemIterator it(d->listView);
+ TQListViewItemIterator it(d->listView);
for(; it.current(); ++it)
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if(itemMatches(item, d->search))
item->setVisible(true);
else
@@ -364,14 +364,14 @@ void KListViewSearchLine::checkItemParentsNotVisible()
* \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function
* returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown.
*/
-bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent)
+bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent)
{
bool visible = false;
- QListViewItem * first = item;
+ TQListViewItem * first = item;
for(; item; item = item->nextSibling())
{
//What we pass to our children as highestHiddenParent:
- QListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
+ TQListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
bool childMatch = false;
if(item->firstChild() && checkItemParentsVisible(item->firstChild(), hhp))
childMatch = true;
@@ -384,13 +384,13 @@ bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListView
highestHiddenParent->setVisible(true);
// Calling setVisible on our ancestor will unhide all its descendents. Hide the ones
// before us that should not be shown.
- for(QListViewItem *hide = first; hide != item; hide = hide->nextSibling())
+ for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling())
hide->setVisible(false);
highestHiddenParent = 0;
// If we matched, than none of our children matched, yet the setVisible() call on our
// ancestor unhid them, undo the damage:
if(!childMatch)
- for(QListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
+ for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
hide->setVisible(false);
}
else
@@ -412,20 +412,20 @@ public:
KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {}
KListView *listView;
KListViewSearchLine *searchLine;
- QToolButton *clearButton;
+ TQToolButton *clearButton;
};
KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
- QHBox(parent, name)
+ TQHBox(parent, name)
{
d = new KListViewSearchLineWidgetPrivate;
d->listView = listView;
setSpacing(5);
- QTimer::singleShot(0, this, SLOT(createWidgets()));
+ TQTimer::singleShot(0, this, TQT_SLOT(createWidgets()));
}
KListViewSearchLineWidget::~KListViewSearchLineWidget()
@@ -445,14 +445,14 @@ void KListViewSearchLineWidget::createWidgets()
positionInToolBar();
if(!d->clearButton) {
- d->clearButton = new QToolButton(this);
- QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
+ d->clearButton = new TQToolButton(this);
+ TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
d->clearButton->setIconSet(icon);
}
d->clearButton->show();
- QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget");
d->searchLine = createSearchLine(d->listView);
d->searchLine->show();
@@ -460,7 +460,7 @@ void KListViewSearchLineWidget::createWidgets()
label->setBuddy(d->searchLine);
label->show();
- connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
}
KListViewSearchLine *KListViewSearchLineWidget::searchLine() const
@@ -485,7 +485,7 @@ void KListViewSearchLineWidget::positionInToolBar()
if(toolBar->getWidget(id) == this) {
toolBar->setItemAutoSized(id);
if(!d->clearButton) {
- QString icon = QApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
+ TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
d->clearButton = new KToolBarButton(icon, 2005, toolBar);
}
toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index);
diff --git a/kdeui/klistviewsearchline.h b/kdeui/klistviewsearchline.h
index e8f5e9e2a..d05cca406 100644
--- a/kdeui/klistviewsearchline.h
+++ b/kdeui/klistviewsearchline.h
@@ -20,7 +20,7 @@
#define KLISTVIEWSEARCHLINE_H
#include <klineedit.h>
-#include <qhbox.h>
+#include <tqhbox.h>
class KListView;
class QListViewItem;
@@ -38,7 +38,7 @@ class QToolButton;
*
* @note { When iterating over items in the KListView, make sure that
* the iterator only includes visible items (for example, by adding
- * QListViewItemIterator::Visible to the iterator flags). Otherwise,
+ * TQListViewItemIterator::Visible to the iterator flags). Otherwise,
* actions (such as deletion) may be taken on items that have been
* hidden by the search function. }
* @since 3.3
@@ -57,13 +57,13 @@ public:
* If \a listView is null then the widget will be disabled until a listview
* is set with setListView().
*/
- KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0);
+ KListViewSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0);
/**
* Constructs a KListViewSearchLine without any KListView to filter. The
* KListView object has to be set later with setListView().
*/
- KListViewSearchLine(QWidget *parent, const char *name);
+ KListViewSearchLine(TQWidget *parent, const char *name);
/**
* Destroys the KListViewSearchLine.
@@ -83,7 +83,7 @@ public:
*
* @see setSearchColumns
*/
- QValueList<int> searchColumns() const;
+ TQValueList<int> searchColumns() const;
/**
* If this is true (the default) then the parents of matched items will also
@@ -105,7 +105,7 @@ public slots:
* Updates search to only make visible the items that match \a s. If
* \a s is null then the line edit's text will be used.
*/
- virtual void updateSearch(const QString &s = QString::null);
+ virtual void updateSearch(const TQString &s = TQString::null);
/**
* Make the search case sensitive or case insensitive.
@@ -133,7 +133,7 @@ public slots:
*
* @see searchColumns
*/
- void setSearchColumns(const QValueList<int> &columns);
+ void setSearchColumns(const TQValueList<int> &columns);
/**
* Sets the KListView that is filtered by this search line. If \a lv is null
@@ -150,14 +150,14 @@ protected:
* based on the value of caseSensitive(). This can be overridden in
* subclasses to implement more complicated matching schemes.
*/
- virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
+ virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const;
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mousePressEvent().
+ * See TQLineEdit::mousePressEvent().
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
protected slots:
/**
@@ -173,7 +173,7 @@ protected slots:
*
* @see activateSearch()
*/
- void queueSearch(const QString &search);
+ void queueSearch(const TQString &search);
/**
* When the timer started with queueSearch() expires this slot is called.
@@ -198,10 +198,10 @@ private:
* It makes a recursive call to all children. It returns true if at least
* one item in the subtree with the given root item is visible.
*/
- bool checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent = 0);
+ bool checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent = 0);
private slots:
- void itemAdded(QListViewItem *item) const;
+ void itemAdded(TQListViewItem *item) const;
void listViewDeleted();
void searchColumnsMenuActivated(int);
@@ -225,7 +225,7 @@ public:
* Creates a KListViewSearchLineWidget for \a listView with \a parent as the
* parent with and \a name.
*/
- KListViewSearchLineWidget(KListView *listView = 0, QWidget *parent = 0,
+ KListViewSearchLineWidget(KListView *listView = 0, TQWidget *parent = 0,
const char *name = 0);
/**
diff --git a/kdeui/kmainwindow.cpp b/kdeui/kmainwindow.cpp
index 119ff4a7e..94baa34e7 100644
--- a/kdeui/kmainwindow.cpp
+++ b/kdeui/kmainwindow.cpp
@@ -27,12 +27,12 @@
#include "kmainwindowiface.h"
#include "ktoolbarhandler.h"
#include "kwhatsthismanager_p.h"
-#include <qsessionmanager.h>
-#include <qobjectlist.h>
-#include <qstyle.h>
-#include <qlayout.h>
-#include <qwidgetlist.h>
-#include <qtimer.h>
+#include <tqsessionmanager.h>
+#include <tqobjectlist.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
+#include <tqwidgetlist.h>
+#include <tqtimer.h>
#include <kaccel.h>
#include <kaction.h>
@@ -66,17 +66,17 @@ public:
bool autoSaveWindowSize:1;
bool care_about_geometry:1;
bool shuttingDown:1;
- QString autoSaveGroup;
+ TQString autoSaveGroup;
KAccel * kaccel;
KMainWindowInterface *m_interface;
KDEPrivate::ToolBarHandler *toolBarHandler;
- QTimer* settingsTimer;
+ TQTimer* settingsTimer;
KToggleAction *showStatusBarAction;
- QRect defaultWindowSize;
- QPtrList<QDockWindow> hiddenDockWindows;
+ TQRect defaultWindowSize;
+ TQPtrList<TQDockWindow> hiddenDockWindows;
};
-QPtrList<KMainWindow>* KMainWindow::memberList = 0L;
+TQPtrList<KMainWindow>* KMainWindow::memberList = 0L;
static bool no_query_exit = false;
static KMWSessionManaged* ksm = 0;
static KStaticDeleter<KMWSessionManaged> ksmd;
@@ -99,14 +99,14 @@ public:
KMainWindow::memberList->first()->saveGlobalProperties(config);
}
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
int n = 0;
for (it.toFirst(); it.current(); ++it){
n++;
it.current()->savePropertiesInternal(config, n);
}
- config->setGroup(QString::fromLatin1("Number"));
- config->writeEntry(QString::fromLatin1("NumberOfWindows"), n );
+ config->setGroup(TQString::fromLatin1("Number"));
+ config->writeEntry(TQString::fromLatin1("NumberOfWindows"), n );
return true;
}
@@ -115,14 +115,14 @@ public:
// not really a fast method but the only compatible one
if ( sm.allowsInteraction() ) {
bool canceled = false;
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
::no_query_exit = true;
for (it.toFirst(); it.current() && !canceled;){
KMainWindow *window = *it;
++it; // Update now, the current window might get deleted
if ( !window->testWState( Qt::WState_ForceHide ) ) {
- QCloseEvent e;
- QApplication::sendEvent( window, &e );
+ TQCloseEvent e;
+ TQApplication::sendEvent( window, &e );
canceled = !e.isAccepted();
/* Don't even think_about deleting widgets with
Qt::WDestructiveClose flag set at this point. We
@@ -133,7 +133,7 @@ public:
(possibly showing a message box "do you want to
save this or that?"). It is possible that the
session manager quits the application later
- (emitting QApplication::aboutToQuit() when this
+ (emitting TQApplication::aboutToQuit() when this
happens), but it is also possible that the user
cancels the shutdown, so the application will
continue to run.
@@ -164,14 +164,14 @@ public:
static bool being_first = true;
-KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f )
- : QMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
+KMainWindow::KMainWindow( TQWidget* parent, const char *name, WFlags f )
+ : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
{
initKMainWindow(name, 0);
}
-KMainWindow::KMainWindow( int cflags, QWidget* parent, const char *name, WFlags f )
- : QMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
+KMainWindow::KMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f )
+ : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
{
initKMainWindow(name, cflags);
}
@@ -183,15 +183,15 @@ void KMainWindow::initKMainWindow(const char *name, int cflags)
mHelpMenu = 0;
kapp->setTopWidget( this );
actionCollection()->setWidget( this );
- connect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
+ connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown()));
if( !memberList )
- memberList = new QPtrList<KMainWindow>;
+ memberList = new TQPtrList<KMainWindow>;
if ( !ksm )
ksm = ksmd.setObject(ksm, new KMWSessionManaged());
// set a unique object name. Required by session management.
- QCString objname;
- QCString s;
+ TQCString objname;
+ TQCString s;
int unusedNumber;
if ( !name )
{ // no name given
@@ -212,10 +212,10 @@ void KMainWindow::initKMainWindow(const char *name, int cflags)
unusedNumber = 0; // add numbers only when needed
}
for(;;) {
- QWidgetList* list = kapp->topLevelWidgets();
- QWidgetListIt it( *list );
+ TQWidgetList* list = kapp->topLevelWidgets();
+ TQWidgetListIt it( *list );
bool found = false;
- for( QWidget* w = it.current();
+ for( TQWidget* w = it.current();
w != NULL;
++it, w = it.current())
if( w != this && w->name() == s )
@@ -286,8 +286,8 @@ void KMainWindow::parseGeometry(bool parsewidth)
int w, h;
int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
if (parsewidth) {
- QSize minSize = minimumSize();
- QSize maxSize = maximumSize();
+ TQSize minSize = minimumSize();
+ TQSize maxSize = maximumSize();
if ( !(m & WidthValue) )
w = width();
if ( !(m & HeightValue) )
@@ -314,14 +314,14 @@ void KMainWindow::parseGeometry(bool parsewidth)
KMainWindow::~KMainWindow()
{
delete d->settingsTimer;
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
delete mb;
delete d->m_interface;
delete d;
memberList->remove( this );
}
-KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsThis )
+KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis )
{
if( !mHelpMenu ) {
if ( aboutAppText.isEmpty() )
@@ -331,8 +331,8 @@ KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsTh
if ( !mHelpMenu )
return 0;
- connect( mHelpMenu, SIGNAL( showAboutApplication() ),
- this, SLOT( showAboutApplication() ) );
+ connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ),
+ this, TQT_SLOT( showAboutApplication() ) );
}
return mHelpMenu->menu();
@@ -341,9 +341,9 @@ KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsTh
KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis )
{
if( !mHelpMenu ) {
- mHelpMenu = new KHelpMenu( this, QString::null, showWhatsThis );
- connect( mHelpMenu, SIGNAL( showAboutApplication() ),
- this, SLOT( showAboutApplication() ) );
+ mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis );
+ connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ),
+ this, TQT_SLOT( showAboutApplication() ) );
}
return mHelpMenu->menu();
@@ -356,33 +356,33 @@ bool KMainWindow::canBeRestored( int number )
KConfig *config = kapp->sessionConfig();
if ( !config )
return false;
- config->setGroup( QString::fromLatin1("Number") );
- int n = config->readNumEntry( QString::fromLatin1("NumberOfWindows") , 1 );
+ config->setGroup( TQString::fromLatin1("Number") );
+ int n = config->readNumEntry( TQString::fromLatin1("NumberOfWindows") , 1 );
return number >= 1 && number <= n;
}
-const QString KMainWindow::classNameOfToplevel( int number )
+const TQString KMainWindow::classNameOfToplevel( int number )
{
if ( !kapp->isRestored() )
- return QString::null;
+ return TQString::null;
KConfig *config = kapp->sessionConfig();
if ( !config )
- return QString::null;
- QString s;
+ return TQString::null;
+ TQString s;
s.setNum( number );
- s.prepend( QString::fromLatin1("WindowProperties") );
+ s.prepend( TQString::fromLatin1("WindowProperties") );
config->setGroup( s );
- if ( !config->hasKey( QString::fromLatin1("ClassName") ) )
- return QString::null;
+ if ( !config->hasKey( TQString::fromLatin1("ClassName") ) )
+ return TQString::null;
else
- return config->readEntry( QString::fromLatin1("ClassName") );
+ return config->readEntry( TQString::fromLatin1("ClassName") );
}
void KMainWindow::show()
{
- QMainWindow::show();
+ TQMainWindow::show();
- for ( QPtrListIterator<QDockWindow> it( d->hiddenDockWindows ); it.current(); ++it )
+ for ( TQPtrListIterator<TQDockWindow> it( d->hiddenDockWindows ); it.current(); ++it )
it.current()->show();
d->hiddenDockWindows.clear();
@@ -394,9 +394,9 @@ void KMainWindow::hide()
d->hiddenDockWindows.clear();
- QObjectList *list = queryList( "QDockWindow" );
- for( QObjectListIt it( *list ); it.current(); ++it ) {
- QDockWindow *dw = (QDockWindow*)it.current();
+ TQObjectList *list = queryList( "TQDockWindow" );
+ for( TQObjectListIt it( *list ); it.current(); ++it ) {
+ TQDockWindow *dw = (TQDockWindow*)it.current();
if ( dw->isTopLevel() && dw->isVisible() ) {
d->hiddenDockWindows.append( dw );
dw->hide();
@@ -405,7 +405,7 @@ void KMainWindow::hide()
delete list;
}
- QWidget::hide();
+ TQWidget::hide();
}
bool KMainWindow::restore( int number, bool show )
@@ -432,7 +432,7 @@ int KMainWindow::configureToolbars()
{
saveMainWindowSettings(KGlobal::config());
KEditToolbar dlg(actionCollection(), xmlFile(), true, this);
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(saveNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(saveNewToolbarConfig()));
return dlg.exec();
}
@@ -442,14 +442,14 @@ void KMainWindow::saveNewToolbarConfig()
applyMainWindowSettings( KGlobal::config() );
}
-void KMainWindow::setupGUI( int options, const QString & xmlfile ) {
- setupGUI(QSize(), options, xmlfile);
+void KMainWindow::setupGUI( int options, const TQString & xmlfile ) {
+ setupGUI(TQSize(), options, xmlfile);
}
-void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlfile ) {
+void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) {
if( options & Keys ){
KStdAction::keyBindings(guiFactory(),
- SLOT(configureShortcuts()), actionCollection());
+ TQT_SLOT(configureShortcuts()), actionCollection());
}
if( (options & StatusBar) && internalStatusBar() ){
@@ -459,7 +459,7 @@ void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlf
if( options & ToolBar ){
setStandardToolBarMenuEnabled( true );
KStdAction::configureToolbars(this,
- SLOT(configureToolbars() ), actionCollection());
+ TQT_SLOT(configureToolbars() ), actionCollection());
}
if( options & Create ){
@@ -488,7 +488,7 @@ void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlf
}
-void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
+void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory )
{
// disabling the updates prevents unnecessary redraws
setUpdatesEnabled( false );
@@ -497,7 +497,7 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
guiFactory()->removeClient( this );
// make sure to have an empty GUI
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if ( mb )
mb->clear();
@@ -522,12 +522,12 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
if ( !xmlfile.isNull() ) {
setXMLFile( xmlfile, true );
} else {
- QString auto_file(instance()->instanceName() + "ui.rc");
+ TQString auto_file(instance()->instanceName() + "ui.rc");
setXMLFile( auto_file, true );
}
// make sure we don't have any state saved already
- setXMLGUIBuildDocument( QDomDocument() );
+ setXMLGUIBuildDocument( TQDomDocument() );
// do the actual GUI building
guiFactory()->addClient( this );
@@ -548,12 +548,12 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
// there's just one problem: I'm bad in finding names ;-) , so
// I skipped this ;-)
- QDomDocument doc = domDocument();
+ TQDomDocument doc = domDocument();
- for( QDomNode n = doc.documentElement().firstChild();
+ for( TQDomNode n = doc.documentElement().firstChild();
!n.isNull(); n = n.nextSibling())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() == "toolbar" )
factory_->resetContainer( e.attribute( "name" ) );
@@ -578,19 +578,19 @@ bool KMainWindow::isHelpMenuEnabled()
return d->showHelpMenu;
}
-void KMainWindow::setCaption( const QString &caption )
+void KMainWindow::setCaption( const TQString &caption )
{
setPlainCaption( kapp->makeStdCaption(caption) );
}
-void KMainWindow::setCaption( const QString &caption, bool modified )
+void KMainWindow::setCaption( const TQString &caption, bool modified )
{
setPlainCaption( kapp->makeStdCaption(caption, true, modified) );
}
-void KMainWindow::setPlainCaption( const QString &caption )
+void KMainWindow::setPlainCaption( const TQString &caption )
{
- QMainWindow::setCaption( caption );
+ TQMainWindow::setCaption( caption );
#if defined Q_WS_X11
NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
info.setName( caption.utf8().data() );
@@ -607,7 +607,7 @@ void KMainWindow::appHelpActivated( void )
mHelpMenu->appHelpActivated();
}
-void KMainWindow::slotStateChanged(const QString &newstate)
+void KMainWindow::slotStateChanged(const TQString &newstate)
{
stateChanged(newstate, KXMLGUIClient::StateNoReverse);
}
@@ -615,7 +615,7 @@ void KMainWindow::slotStateChanged(const QString &newstate)
/*
* Get rid of this for KDE 4.0
*/
-void KMainWindow::slotStateChanged(const QString &newstate,
+void KMainWindow::slotStateChanged(const TQString &newstate,
KXMLGUIClient::ReverseStateChange reverse)
{
stateChanged(newstate, reverse);
@@ -624,14 +624,14 @@ void KMainWindow::slotStateChanged(const QString &newstate,
/*
* Enable this for KDE 4.0
*/
-// void KMainWindow::slotStateChanged(const QString &newstate,
+// void KMainWindow::slotStateChanged(const TQString &newstate,
// bool reverse)
// {
// stateChanged(newstate,
// reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
// }
-void KMainWindow::closeEvent ( QCloseEvent *e )
+void KMainWindow::closeEvent ( TQCloseEvent *e )
{
// Save settings if auto-save is enabled, and settings have changed
if (d->settingsDirty && d->autoSaveSettings)
@@ -641,7 +641,7 @@ void KMainWindow::closeEvent ( QCloseEvent *e )
e->accept();
int not_withdrawn = 0;
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
for (it.toFirst(); it.current(); ++it){
if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this )
not_withdrawn++;
@@ -650,7 +650,7 @@ void KMainWindow::closeEvent ( QCloseEvent *e )
if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
if ( queryExit() && !kapp->sessionSaving() && !d->shuttingDown ) { // Yes, Quit app?
// don't call queryExit() twice
- disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
+ disconnect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown()));
d->shuttingDown = true;
kapp->deref(); // ...and quit application.
} else {
@@ -694,15 +694,15 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number )
bool oldASWS = d->autoSaveWindowSize;
d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size
- QString s;
+ TQString s;
s.setNum(number);
- s.prepend(QString::fromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// store objectName, className, Width and Height for later restoring
// (Only useful for session management)
- config->writeEntry(QString::fromLatin1("ObjectName"), name());
- config->writeEntry(QString::fromLatin1("ClassName"), className());
+ config->writeEntry(TQString::fromLatin1("ObjectName"), name());
+ config->writeEntry(TQString::fromLatin1("ClassName"), className());
saveMainWindowSettings(config); // Menubar, statusbar and Toolbar settings.
@@ -713,10 +713,10 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number )
d->autoSaveWindowSize = oldASWS;
}
-void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configGroup)
+void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &configGroup)
{
kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl;
- QString oldGroup;
+ TQString oldGroup;
if (!configGroup.isEmpty())
{
@@ -728,7 +728,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
if ( d->autoSaveWindowSize )
saveWindowSize( config );
- QStatusBar* sb = internalStatusBar();
+ TQStatusBar* sb = internalStatusBar();
if (sb) {
if(!config->hasDefault("StatusBar") && !sb->isHidden() )
config->revertToDefault("StatusBar");
@@ -736,9 +736,9 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
config->writeEntry("StatusBar", sb->isHidden() ? "Disabled" : "Enabled");
}
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if (mb) {
- QString MenuBar = QString::fromLatin1("MenuBar");
+ TQString MenuBar = TQString::fromLatin1("MenuBar");
if(!config->hasDefault("MenuBar") && !mb->isHidden() )
config->revertToDefault("MenuBar");
else
@@ -747,15 +747,15 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar = 0;
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ TQPtrListIterator<KToolBar> it( toolBarIterator() );
while ( ( toolbar = it.current() ) ) {
++it;
- QString group;
+ TQString group;
if (!configGroup.isEmpty())
{
// Give a number to the toolbar, but prefer a name if there is one,
// because there's no real guarantee on the ordering of toolbars
- group = (!::qstrcmp(toolbar->name(), "unnamed") ? QString::number(n) : QString(" ")+toolbar->name());
+ group = (!::qstrcmp(toolbar->name(), "unnamed") ? TQString::number(n) : TQString(" ")+toolbar->name());
group.prepend(" Toolbar");
group.prepend(configGroup);
}
@@ -795,9 +795,9 @@ bool KMainWindow::isStandardToolBarMenuEnabled() const
void KMainWindow::createStandardStatusBarAction(){
if(!d->showStatusBarAction){
- d->showStatusBarAction = KStdAction::showStatusbar(this, SLOT(setSettingsDirty()), actionCollection());
+ d->showStatusBarAction = KStdAction::showStatusbar(this, TQT_SLOT(setSettingsDirty()), actionCollection());
KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already.
- connect(d->showStatusBarAction, SIGNAL(toggled(bool)), sb, SLOT(setShown(bool)));
+ connect(d->showStatusBarAction, TQT_SIGNAL(toggled(bool)), sb, TQT_SLOT(setShown(bool)));
d->showStatusBarAction->setChecked(sb->isHidden());
}
}
@@ -808,15 +808,15 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
readGlobalProperties( config );
// in order they are in toolbar list
- QString s;
+ TQString s;
s.setNum(number);
- s.prepend(QString::fromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// restore the object name (window role)
- if ( config->hasKey(QString::fromLatin1("ObjectName" )) )
- setName( config->readEntry(QString::fromLatin1("ObjectName")).latin1()); // latin1 is right here
+ if ( config->hasKey(TQString::fromLatin1("ObjectName" )) )
+ setName( config->readEntry(TQString::fromLatin1("ObjectName")).latin1()); // latin1 is right here
applyMainWindowSettings(config); // Menubar, statusbar and toolbar settings.
@@ -826,12 +826,12 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
return true;
}
-void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &configGroup)
+void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup)
{
return applyMainWindowSettings(config,configGroup,false);
}
-void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &configGroup,bool force)
+void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup,bool force)
{
kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl;
@@ -839,9 +839,9 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
restoreWindowSize(config);
- QStatusBar* sb = internalStatusBar();
+ TQStatusBar* sb = internalStatusBar();
if (sb) {
- QString entry = config->readEntry("StatusBar", "Enabled");
+ TQString entry = config->readEntry("StatusBar", "Enabled");
if ( entry == "Disabled" )
sb->hide();
else
@@ -850,9 +850,9 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
d->showStatusBarAction->setChecked(!sb->isHidden());
}
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if (mb) {
- QString entry = config->readEntry ("MenuBar", "Enabled");
+ TQString entry = config->readEntry ("MenuBar", "Enabled");
if ( entry == "Disabled" )
mb->hide();
else
@@ -861,16 +861,16 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar;
- QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
+ TQPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
for ( ; it.current(); ++it) {
toolbar= it.current();
- QString group;
+ TQString group;
if (!configGroup.isEmpty())
{
// Give a number to the toolbar, but prefer a name if there is one,
// because there's no real guarantee on the ordering of toolbars
- group = (!::qstrcmp(toolbar->name(), "unnamed") ? QString::number(n) : QString(" ")+toolbar->name());
+ group = (!::qstrcmp(toolbar->name(), "unnamed") ? TQString::number(n) : TQString(" ")+toolbar->name());
group.prepend(" Toolbar");
group.prepend(configGroup);
}
@@ -891,7 +891,7 @@ void KMainWindow::finalizeGUI( bool force )
// we call positionYourself again for each of them, but this time
// the toolbariterator should give them in the proper order.
// Both the XMLGUI and applySettings call this, hence "force" for the latter.
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ TQPtrListIterator<KToolBar> it( toolBarIterator() );
for ( ; it.current() ; ++it ) {
it.current()->positionYourself( force );
}
@@ -901,8 +901,8 @@ void KMainWindow::finalizeGUI( bool force )
void KMainWindow::saveWindowSize( KConfig * config ) const
{
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
int w, h;
#if defined Q_WS_X11
// save maximalization as desktop size + 1 in that direction
@@ -916,10 +916,10 @@ void KMainWindow::saveWindowSize( KConfig * config ) const
}
//TODO: add "Maximized" property instead "+1" hack
#endif
- QRect size( desk.width(), w, desk.height(), h );
+ TQRect size( desk.width(), w, desk.height(), h );
bool defaultSize = (size == d->defaultWindowSize);
- QString widthString = QString::fromLatin1("Width %1").arg(desk.width());
- QString heightString = QString::fromLatin1("Height %1").arg(desk.height());
+ TQString widthString = TQString::fromLatin1("Width %1").arg(desk.width());
+ TQString heightString = TQString::fromLatin1("Height %1").arg(desk.height());
if (!config->hasDefault(widthString) && defaultSize)
config->revertToDefault(widthString);
else
@@ -937,20 +937,20 @@ void KMainWindow::restoreWindowSize( KConfig * config )
parseGeometry(true);
} else {
// restore the size
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
if ( d->defaultWindowSize.isNull() ) // only once
- d->defaultWindowSize = QRect(desk.width(), width(), desk.height(), height()); // store default values
- QSize size( config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 ),
- config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 ) );
+ d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height()); // store default values
+ TQSize size( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 ) );
if (size.isEmpty()) {
// try the KDE 2.0 way
- size = QSize( config->readNumEntry( QString::fromLatin1("Width"), 0 ),
- config->readNumEntry( QString::fromLatin1("Height"), 0 ) );
+ size = TQSize( config->readNumEntry( TQString::fromLatin1("Width"), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height"), 0 ) );
if (!size.isEmpty()) {
// make sure the other resolutions don't get old settings
- config->writeEntry( QString::fromLatin1("Width"), 0 );
- config->writeEntry( QString::fromLatin1("Height"), 0 );
+ config->writeEntry( TQString::fromLatin1("Width"), 0 );
+ config->writeEntry( TQString::fromLatin1("Height"), 0 );
}
}
if ( !size.isEmpty() ) {
@@ -965,7 +965,7 @@ void KMainWindow::restoreWindowSize( KConfig * config )
resize( size.width(), height());
else
resize( size );
- // QWidget::showMaximized() is both insufficient and broken
+ // TQWidget::showMaximized() is both insufficient and broken
KWin::setState( winId(), state );
#else
if (size.width() > desk.width() || size.height() > desk.height())
@@ -997,8 +997,8 @@ void KMainWindow::setSettingsDirty()
// (to compress calls and save only once, in case of multiple changes)
if ( !d->settingsTimer )
{
- d->settingsTimer = new QTimer( this );
- connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) );
+ d->settingsTimer = new TQTimer( this );
+ connect( d->settingsTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( saveAutoSaveSettings() ) );
}
d->settingsTimer->start( 500, true );
}
@@ -1009,21 +1009,21 @@ bool KMainWindow::settingsDirty() const
return d->settingsDirty;
}
-QString KMainWindow::settingsGroup() const
+TQString KMainWindow::settingsGroup() const
{
return d->autoSaveGroup;
}
-void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindowSize )
+void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize )
{
d->autoSaveSettings = true;
d->autoSaveGroup = groupName;
d->autoSaveWindowSize = saveWindowSize;
// Get notified when the user moves a toolbar around
- disconnect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
- this, SLOT( setSettingsDirty() ) );
- connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
- this, SLOT( setSettingsDirty() ) );
+ disconnect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
+ this, TQT_SLOT( setSettingsDirty() ) );
+ connect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
+ this, TQT_SLOT( setSettingsDirty() ) );
// Now read the previously saved settings
applyMainWindowSettings( KGlobal::config(), groupName );
@@ -1041,7 +1041,7 @@ bool KMainWindow::autoSaveSettings() const
return d->autoSaveSettings;
}
-QString KMainWindow::autoSaveGroup() const
+TQString KMainWindow::autoSaveGroup() const
{
return d->autoSaveGroup;
}
@@ -1057,7 +1057,7 @@ void KMainWindow::saveAutoSaveSettings()
d->settingsTimer->stop();
}
-void KMainWindow::resizeEvent( QResizeEvent * )
+void KMainWindow::resizeEvent( TQResizeEvent * )
{
if ( d->autoSaveWindowSize )
setSettingsDirty();
@@ -1075,7 +1075,7 @@ KMenuBar *KMainWindow::menuBar()
mb = new KMenuBar( this );
// trigger a re-layout and trigger a call to the private
// setMenuBar method.
- QMainWindow::menuBar();
+ TQMainWindow::menuBar();
}
return mb;
}
@@ -1087,7 +1087,7 @@ KStatusBar *KMainWindow::statusBar()
sb = new KStatusBar( this );
// trigger a re-layout and trigger a call to the private
// setStatusBar method.
- QMainWindow::statusBar();
+ TQMainWindow::statusBar();
}
return sb;
}
@@ -1109,7 +1109,7 @@ void KMainWindow::shuttingDown()
KMenuBar *KMainWindow::internalMenuBar()
{
- QObjectList *l = queryList( "KMenuBar", 0, false, false );
+ TQObjectList *l = queryList( "KMenuBar", 0, false, false );
if ( !l || !l->first() ) {
delete l;
return 0;
@@ -1122,7 +1122,7 @@ KMenuBar *KMainWindow::internalMenuBar()
KStatusBar *KMainWindow::internalStatusBar()
{
- QObjectList *l = queryList( "KStatusBar", 0, false, false );
+ TQObjectList *l = queryList( "KStatusBar", 0, false, false );
if ( !l || !l->first() ) {
delete l;
return 0;
@@ -1133,9 +1133,9 @@ KStatusBar *KMainWindow::internalStatusBar()
return s;
}
-void KMainWindow::childEvent( QChildEvent* e)
+void KMainWindow::childEvent( TQChildEvent* e)
{
- QMainWindow::childEvent( e );
+ TQMainWindow::childEvent( e );
}
KToolBar *KMainWindow::toolBar( const char * name )
@@ -1153,19 +1153,19 @@ KToolBar *KMainWindow::toolBar( const char * name )
return new KToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI
}
-QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
+TQPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
{
toolbarList.clear();
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
+ TQPtrList<TQToolBar> lst;
+ for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
lst = toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) {
if ( !tb->inherits( "KToolBar" ) )
continue;
toolbarList.append( (KToolBar*)tb );
}
}
- return QPtrListIterator<KToolBar>( toolbarList );
+ return TQPtrListIterator<KToolBar>( toolbarList );
}
KAccel * KMainWindow::accel()
@@ -1175,12 +1175,12 @@ KAccel * KMainWindow::accel()
return d->kaccel;
}
-void KMainWindow::paintEvent( QPaintEvent * pe )
+void KMainWindow::paintEvent( TQPaintEvent * pe )
{
- QMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering
+ TQMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering
}
-QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
+TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
{
KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" );
if (tb && !tb->isHidden()) {
@@ -1188,16 +1188,16 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
{
case KToolBar::Top:
case KToolBar::Bottom:
- size += QSize(0, tb->sizeHint().height());
+ size += TQSize(0, tb->sizeHint().height());
break;
case KToolBar::Left:
case KToolBar::Right:
- size += QSize(toolBar()->sizeHint().width(), 0);
+ size += TQSize(toolBar()->sizeHint().width(), 0);
break;
case KToolBar::Flat:
- size += QSize(0, 3+kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent ));
+ size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
break;
default:
@@ -1206,13 +1206,13 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
}
KMenuBar *mb = internalMenuBar();
if (mb && !mb->isHidden()) {
- size += QSize(0,mb->heightForWidth(size.width()));
- if (style().styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, this))
- size += QSize( 0, dockWindowsMovable() ? 1 : 2);
+ size += TQSize(0,mb->heightForWidth(size.width()));
+ if (style().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this))
+ size += TQSize( 0, dockWindowsMovable() ? 1 : 2);
}
- QStatusBar *sb = internalStatusBar();
+ TQStatusBar *sb = internalStatusBar();
if( sb && !sb->isHidden() )
- size += QSize(0, sb->sizeHint().height());
+ size += TQSize(0, sb->sizeHint().height());
return size;
}
@@ -1222,17 +1222,17 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
#warning Remove, should be in Qt
#endif
#endif
-void KMainWindow::setIcon( const QPixmap& p )
+void KMainWindow::setIcon( const TQPixmap& p )
{
- QMainWindow::setIcon( p );
+ TQMainWindow::setIcon( p );
#ifdef Q_WS_X11
// Qt3 doesn't support _NET_WM_ICON, but KApplication::setTopWidget(), which
// is used by KMainWindow, sets it
- KWin::setIcons( winId(), p, QPixmap());
+ KWin::setIcons( winId(), p, TQPixmap());
#endif
}
-QPtrList<KMainWindow>* KMainWindow::getMemberList() { return memberList; }
+TQPtrList<KMainWindow>* KMainWindow::getMemberList() { return memberList; }
// why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI;
// DF: because they compile KDE much faster :)
diff --git a/kdeui/kmainwindow.h b/kdeui/kmainwindow.h
index 00d3aaee6..6c22d84eb 100644
--- a/kdeui/kmainwindow.h
+++ b/kdeui/kmainwindow.h
@@ -24,8 +24,8 @@
#include "kxmlguifactory.h"
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
-#include <qmainwindow.h>
-#include <qmetaobject.h>
+#include <tqmainwindow.h>
+#include <tqmetaobject.h>
#include <ktoolbar.h>
class KPopupMenu;
@@ -95,7 +95,7 @@ class DCOPObject;
*/
-class KDEUI_EXPORT KMainWindow : public QMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
+class KDEUI_EXPORT KMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
{
friend class KMWSessionManaged;
Q_OBJECT
@@ -126,14 +126,14 @@ public:
* automatically destroyed when its window is closed. Pass 0 if
* you do not want this behavior.
*
- * @see http://doc.trolltech.com/3.2/qt.html#WidgetFlags-enum
+ * @see http://doc.trolltech.com/3.2/tqt.html#WidgetFlags-enum
*
* KMainWindows must be created on the heap with 'new', like:
* \code
* KMainWindow *kmw = new KMainWindow (...);
* \endcode
**/
- KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Flags that can be passed in an argument to the constructor to
@@ -155,7 +155,7 @@ public:
*
* @since 3.2
*/
- KMainWindow( int cflags, QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* \brief Destructor.
@@ -189,7 +189,7 @@ public:
*
* @return A standard help menu.
*/
- KPopupMenu* helpMenu( const QString &aboutAppText = QString::null,
+ KPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null,
bool showWhatsThis = true );
/**
@@ -236,7 +236,7 @@ public:
* // create default application as usual
* }
* \endcode
- * Note that QWidget::show() is called implicitly in restore.
+ * Note that TQWidget::show() is called implicitly in restore.
*
* With this you can easily restore all toplevel windows of your
* application.
@@ -291,17 +291,17 @@ public:
* This is only useful if your application uses
* different kinds of toplevel windows.
*/
- // KDE 4 return QCString - QObject::className() returns const char*
- static const QString classNameOfToplevel( int number );
+ // KDE 4 return TQCString - TQObject::className() returns const char*
+ static const TQString classNameOfToplevel( int number );
/**
- * Reimplementation of QMainWindow::show()
+ * Reimplementation of TQMainWindow::show()
*/
// KDE4 remove this method if this has been fixed in Qt
virtual void show();
/**
- * Reimplementation of QMainWindow::hide()
+ * Reimplementation of TQMainWindow::hide()
*/
// KDE4 remove this method if this has been fixed in Qt
virtual void hide();
@@ -335,9 +335,9 @@ public:
* @param xmlfile The local xmlfile (relative or absolute)
* @param _conserveMemory Specify whether createGUI() should call
* KXMLGUIClient::conserveMemory() to free all memory
- * allocated by the QDomDocument and by the KXMLGUIFactory.
+ * allocated by the TQDomDocument and by the KXMLGUIFactory.
*/
- void createGUI( const QString &xmlfile = QString::null, bool _conserveMemory = true );
+ void createGUI( const TQString &xmlfile = TQString::null, bool _conserveMemory = true );
/**
* Enables the build of a standard help menu when calling createGUI().
@@ -382,14 +382,14 @@ public:
/**
* List of members of KMainWindow class.
*/
- static QPtrList<KMainWindow>* memberList;
+ static TQPtrList<KMainWindow>* memberList;
//KDE4: replace with memberList() and make memberList member private
/**
* List of members of KMainWindow class.
* @since 3.4
*/
- static QPtrList<KMainWindow>* getMemberList();
+ static TQPtrList<KMainWindow>* getMemberList();
/**
* Returns a pointer to the toolbar with the specified name.
@@ -406,7 +406,7 @@ public:
/**
* @return An iterator over the list of all toolbars for this window.
*/
- QPtrListIterator<KToolBar> toolBarIterator();
+ TQPtrListIterator<KToolBar> toolBarIterator();
/**
* @return A KAccel instance bound to this mainwindow. Used automatically
@@ -443,11 +443,11 @@ public:
* - Put the setAutoSaveSettings ( or setupGUI() ) call after all widgets
* have been created and placed inside the main window (i.e. for 99% of
* apps setCentralWidget())
- * - Widgets that inherit from QWidget (like game boards) should overload
- * "virtual QSize sizeHint() const;" to specify a default size rather
- * than letting QWidget::adjust use the default size of 0x0.
+ * - Widgets that inherit from TQWidget (like game boards) should overload
+ * "virtual TQSize sizeHint() const;" to specify a default size rather
+ * than letting TQWidget::adjust use the default size of 0x0.
*/
- void setAutoSaveSettings( const QString & groupName = QString::fromLatin1("MainWindow"),
+ void setAutoSaveSettings( const TQString & groupName = TQString::fromLatin1("MainWindow"),
bool saveWindowSize = true );
/**
@@ -470,7 +470,7 @@ public:
* using KEditToolbar.
* @since 3.1
*/
- QString autoSaveGroup() const;
+ TQString autoSaveGroup() const;
/**
* Read settings for statusbar, menubar and toolbar from their respective
@@ -481,9 +481,9 @@ public:
* group name is used.
* @param force if set, even default settings are re-applied
*/
- void applyMainWindowSettings(KConfig *config, const QString &groupName, bool force);
+ void applyMainWindowSettings(KConfig *config, const TQString &groupName, bool force);
// KDE4 merge with force=false
- void applyMainWindowSettings(KConfig *config, const QString &groupName = QString::null);
+ void applyMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null);
/**
* Save settings for statusbar, menubar and toolbar to their respective
@@ -493,7 +493,7 @@ public:
* @param groupName Group name to use. If not specified, the last used
* group name is used
*/
- void saveMainWindowSettings(KConfig *config, const QString &groupName = QString::null);
+ void saveMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null);
/**
* Sets whether KMainWindow should provide a menu that allows showing/hiding
@@ -532,8 +532,8 @@ public:
* this function) a connection needs to be made to let KMainWindow
* know when that status (hidden/shown) of the statusbar has changed.
* For example:
- * connect(action, SIGNAL(activated()),
- * kmainwindow, SLOT(setSettingsDirty()));
+ * connect(action, TQT_SIGNAL(activated()),
+ * kmainwindow, TQT_SLOT(setSettingsDirty()));
* Otherwise the status (hidden/show) of the statusbar might not be saved
* by KMainWindow.
* @since 3.2
@@ -593,7 +593,7 @@ public:
*
* @since 3.3
*/
- void setupGUI( int options = ToolBar | Keys | StatusBar | Save | Create, const QString& xmlfile = QString::null );
+ void setupGUI( int options = ToolBar | Keys | StatusBar | Save | Create, const TQString& xmlfile = TQString::null );
/**
* Configures the current windows and its actions in the typical KDE
@@ -608,7 +608,7 @@ public:
*
* @since 3.5
*/
- void setupGUI( QSize defaultSize, int options = ToolBar | Keys | StatusBar | Save | Create, const QString& xmlfile = QString::null );
+ void setupGUI( TQSize defaultSize, int options = ToolBar | Keys | StatusBar | Save | Create, const TQString& xmlfile = TQString::null );
/**
* Returns a pointer to the mainwindows action responsible for the toolbars menu
@@ -659,13 +659,13 @@ public:
*
*/
// KDE4 to be removed
- QSize sizeForCentralWidgetSize(QSize size) KDE_DEPRECATED;
+ TQSize sizeForCentralWidgetSize(TQSize size) KDE_DEPRECATED;
/**
* @internal
*/
// KDE4 remove
- virtual void setIcon( const QPixmap & );
+ virtual void setIcon( const TQPixmap & );
public slots:
/**
@@ -674,7 +674,7 @@ public slots:
* This slot can be connected dirrectly to the action to configure shortcuts.
* This is very simple to do that by adding a single line
* \code
- * KStdAction::configureToolbars( guiFactory(), SLOT( configureToolbars() ),
+ * KStdAction::configureToolbars( guiFactory(), TQT_SLOT( configureToolbars() ),
* actionCollection() );
* \endcode
*
@@ -689,7 +689,7 @@ public slots:
* in this string. It will be added automatically according to the KDE
* standard.
*/
- virtual void setCaption( const QString &caption );
+ virtual void setCaption( const TQString &caption );
/**
* Makes a KDE compliant caption.
*
@@ -699,7 +699,7 @@ public slots:
* @param modified Specify whether the document is modified. This displays
* an additional sign in the title bar, usually "**".
*/
- virtual void setCaption( const QString &caption, bool modified );
+ virtual void setCaption( const TQString &caption, bool modified );
/**
* Make a plain caption without any modifications.
@@ -707,7 +707,7 @@ public slots:
* @param caption Your caption. This is the string that will be
* displayed in the window title.
*/
- virtual void setPlainCaption( const QString &caption );
+ virtual void setPlainCaption( const TQString &caption );
/**
* Open the help page for the application.
@@ -724,9 +724,9 @@ public slots:
*
* \code
* KIconLoader &loader = *KGlobal::iconLoader();
- * QPixmap pixmap = loader.loadIcon( "help" );
- * toolBar(0)->insertButton( pixmap, 0, SIGNAL(clicked()),
- * this, SLOT(appHelpActivated()), true, i18n("Help") );
+ * TQPixmap pixmap = loader.loadIcon( "help" );
+ * toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()),
+ * this, TQT_SLOT(appHelpActivated()), true, i18n("Help") );
* \endcode
*
*/
@@ -738,7 +738,7 @@ public slots:
* Enable and disable actions as defined in the XML rc file
* @since 3.1
*/
- virtual void slotStateChanged(const QString &newstate);
+ virtual void slotStateChanged(const TQString &newstate);
/**
* Apply a state change
@@ -748,7 +748,7 @@ public slots:
* enabled, and vice-versa) if specified.
* @since 3.1
*/
- void slotStateChanged(const QString &newstate,
+ void slotStateChanged(const TQString &newstate,
KXMLGUIClient::ReverseStateChange); // KDE 4.0: remove this
@@ -759,7 +759,7 @@ public slots:
* can "reverse" the state (disable the actions which should be
* enabled, and vice-versa) if specified.
*/
-// void slotStateChanged(const QString &newstate,
+// void slotStateChanged(const TQString &newstate,
// bool reverse); // KDE 4.0: enable this
/**
@@ -772,9 +772,9 @@ public slots:
void setSettingsDirty();
protected:
- void paintEvent( QPaintEvent* e );
- void childEvent( QChildEvent* e);
- void resizeEvent( QResizeEvent* e);
+ void paintEvent( TQPaintEvent* e );
+ void childEvent( TQChildEvent* e);
+ void resizeEvent( TQResizeEvent* e);
/**
* Reimplemented to call the queryClose() and queryExit() handlers.
*
@@ -782,7 +782,7 @@ protected:
* If you do it anyway, ensure to call the base implementation to keep
* queryExit() running.
*/
- virtual void closeEvent ( QCloseEvent *);
+ virtual void closeEvent ( TQCloseEvent *);
// KDE4 This seems to be flawed to me. Either the app has only one
// mainwindow, so queryClose() is enough, or if it can have more of them,
@@ -914,7 +914,7 @@ protected:
/**
* For inherited classes
*/
- QString settingsGroup() const;
+ TQString settingsGroup() const;
/**
* For inherited classes
* Note that the group must be set before calling
@@ -977,7 +977,7 @@ protected slots:
* Example:
* \code
*
- * void MyMainWindow::closeEvent( QCloseEvent *e )
+ * void MyMainWindow::closeEvent( TQCloseEvent *e )
* {
* // Save settings if auto-save is enabled, and settings have changed
* if ( settingsDirty() && autoSaveSettings() )
@@ -999,7 +999,7 @@ private:
KStatusBar *internalStatusBar();
KHelpMenu *mHelpMenu, *helpMenu2;
KXMLGUIFactory *factory_;
- QPtrList<KToolBar> toolbarList;
+ TQPtrList<KToolBar> toolbarList;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1027,8 +1027,8 @@ private:
template <typename T>
inline void kRestoreMainWindows() {
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( T::staticMetaObject()->className() ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) )
(new T)->restore( n );
}
}
@@ -1039,10 +1039,10 @@ inline void kRestoreMainWindows() {
classNames[0] = T0::staticMetaObject()->className();
classNames[1] = T1::staticMetaObject()->className();
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( classNames[0] ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( classNames[0] ) )
(new T0)->restore( n );
- else if ( className == QString::fromLatin1( classNames[1] ) )
+ else if ( className == TQString::fromLatin1( classNames[1] ) )
(new T1)->restore( n );
}
}
@@ -1054,12 +1054,12 @@ inline void kRestoreMainWindows() {
classNames[1] = T1::staticMetaObject()->className();
classNames[2] = T2::staticMetaObject()->className();
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( classNames[0] ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( classNames[0] ) )
(new T0)->restore( n );
- else if ( className == QString::fromLatin1( classNames[1] ) )
+ else if ( className == TQString::fromLatin1( classNames[1] ) )
(new T1)->restore( n );
- else if ( className == QString::fromLatin1( classNames[2] ) )
+ else if ( className == TQString::fromLatin1( classNames[2] ) )
(new T2)->restore( n );
}
}
diff --git a/kdeui/kmainwindowiface.cpp b/kdeui/kmainwindowiface.cpp
index ce653bb6d..d3117f0ec 100644
--- a/kdeui/kmainwindowiface.cpp
+++ b/kdeui/kmainwindowiface.cpp
@@ -25,7 +25,7 @@
#include <kdcoppropertyproxy.h>
#include <kmainwindow.h>
#include <kaction.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow)
@@ -47,15 +47,15 @@ QCStringList KMainWindowInterface::actions()
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
QCStringList tmp_actions;
- QValueList<KAction *> lst = m_dcopActionProxy->actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = m_dcopActionProxy->actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
if ((*it)->isPlugged())
- tmp_actions.append( (QCString)(*it)->name() );
+ tmp_actions.append( (TQCString)(*it)->name() );
return tmp_actions;
}
-bool KMainWindowInterface::activateAction( QCString action)
+bool KMainWindowInterface::activateAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -68,7 +68,7 @@ bool KMainWindowInterface::activateAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::disableAction( QCString action)
+bool KMainWindowInterface::disableAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -81,7 +81,7 @@ bool KMainWindowInterface::disableAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::enableAction( QCString action)
+bool KMainWindowInterface::enableAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -94,7 +94,7 @@ bool KMainWindowInterface::enableAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::actionIsEnabled( QCString action)
+bool KMainWindowInterface::actionIsEnabled( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -106,7 +106,7 @@ bool KMainWindowInterface::actionIsEnabled( QCString action)
else
return false;
}
-QCString KMainWindowInterface::actionToolTip( QCString action)
+TQCString KMainWindowInterface::actionToolTip( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -119,12 +119,12 @@ QCString KMainWindowInterface::actionToolTip( QCString action)
return "Error no such object!";
}
-DCOPRef KMainWindowInterface::action( const QCString &name )
+DCOPRef KMainWindowInterface::action( const TQCString &name )
{
return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) );
}
-QMap<QCString,DCOPRef> KMainWindowInterface::actionMap()
+TQMap<TQCString,DCOPRef> KMainWindowInterface::actionMap()
{
return m_dcopActionProxy->actionMap();
}
@@ -135,8 +135,8 @@ int KMainWindowInterface::getWinID()
}
void KMainWindowInterface::grabWindowToClipBoard()
{
- QClipboard *clipboard = QApplication::clipboard();
- clipboard->setPixmap(QPixmap::grabWidget(m_MainWindow));
+ QClipboard *clipboard = TQApplication::clipboard();
+ clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow));
}
void KMainWindowInterface::hide()
{
@@ -186,7 +186,7 @@ QCStringList KMainWindowInterface::functionsDynamic()
{
return m_dcopPropertyProxy->functions();
}
-bool KMainWindowInterface::processDynamic(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
+bool KMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
return m_dcopPropertyProxy->processPropertyRequest( fun, data, replyType, replyData);
diff --git a/kdeui/kmainwindowiface.h b/kdeui/kmainwindowiface.h
index eaee8d1d9..f7f7a0bb8 100644
--- a/kdeui/kmainwindowiface.h
+++ b/kdeui/kmainwindowiface.h
@@ -21,8 +21,8 @@
#define KWINDOW_INTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <dcopref.h>
class KDCOPActionProxy;
@@ -55,7 +55,7 @@ public:
~KMainWindowInterface();
QCStringList functionsDynamic();
- bool processDynamic(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData);
+ bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData);
k_dcop:
@@ -71,7 +71,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool activateAction( QCString action);
+ bool activateAction( TQCString action);
/**
Disables the requested action.
@@ -79,7 +79,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool disableAction( QCString action);
+ bool disableAction( TQCString action);
/**
Enables the requested action.
@@ -87,7 +87,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool enableAction( QCString action);
+ bool enableAction( TQCString action);
/**
Returns the status of the requested action.
@@ -95,15 +95,15 @@ k_dcop:
actions can be found by calling actions().
@returns The state of the action, true - enabled, false - disabled.
*/
- bool actionIsEnabled( QCString action);
+ bool actionIsEnabled( TQCString action);
/**
Returns the tool tip text of the requested action.
@param action The name of the action to activate. The names of valid
actions can be found by calling actions().
- @return A QCString containing the text of the action's tool tip.
+ @return A TQCString containing the text of the action's tool tip.
*/
- QCString actionToolTip( QCString action);
+ TQCString actionToolTip( TQCString action);
/**
Returns a dcop reference to the selected KAction
@@ -111,12 +111,12 @@ k_dcop:
actions can be found by calling actions().
@return A DCOPRef for the kaction.
**/
- DCOPRef action( const QCString &name );
+ DCOPRef action( const TQCString &name );
/**
Returns and action map
**/
- QMap<QCString,DCOPRef> actionMap();
+ TQMap<TQCString,DCOPRef> actionMap();
/**
Returns the ID of the current main window.
This is useful for automated screen captures or other evil
diff --git a/kdeui/kmenubar.cpp b/kdeui/kmenubar.cpp
index 3de441a17..d2accb61d 100644
--- a/kdeui/kmenubar.cpp
+++ b/kdeui/kmenubar.cpp
@@ -25,12 +25,12 @@
#endif
#include "config.h"
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qaccel.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqaccel.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -92,8 +92,8 @@ public:
#ifdef Q_WS_X11
KSelectionWatcher* selection;
#endif
- QTimer selection_timer;
- QSize min_size;
+ TQTimer selection_timer;
+ TQSize min_size;
static Atom makeSelectionAtom();
};
@@ -126,22 +126,22 @@ Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
#endif
}
-KMenuBar::KMenuBar(QWidget *parent, const char *name)
- : QMenuBar(parent, name)
+KMenuBar::KMenuBar(TQWidget *parent, const char *name)
+ : TQMenuBar(parent, name)
{
#ifdef Q_WS_X11
QXEmbed::initialize();
#endif
d = new KMenuBarPrivate;
- connect( &d->selection_timer, SIGNAL( timeout()),
- this, SLOT( selectionTimeout()));
+ connect( &d->selection_timer, TQT_SIGNAL( timeout()),
+ this, TQT_SLOT( selectionTimeout()));
- connect( qApp->desktop(), SIGNAL( resized( int )), SLOT( updateFallbackSize()));
+ connect( qApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize()));
if ( kapp )
// toolbarAppearanceChanged(int) is sent when changing macstyle
- connect( kapp, SIGNAL(toolbarAppearanceChanged(int)),
- this, SLOT(slotReadConfig()));
+ connect( kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)),
+ this, TQT_SLOT(slotReadConfig()));
slotReadConfig();
}
@@ -175,27 +175,27 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
#ifdef Q_WS_X11
d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(),
DefaultScreen( qt_xdisplay()));
- connect( d->selection, SIGNAL( newOwner( Window )),
- this, SLOT( updateFallbackSize()));
- connect( d->selection, SIGNAL( lostOwner()),
- this, SLOT( updateFallbackSize()));
+ connect( d->selection, TQT_SIGNAL( newOwner( Window )),
+ this, TQT_SLOT( updateFallbackSize()));
+ connect( d->selection, TQT_SIGNAL( lostOwner()),
+ this, TQT_SLOT( updateFallbackSize()));
#endif
d->frameStyle = frameStyle();
d->lineWidth = lineWidth();
d->margin = margin();
d->fallback_mode = false;
bool wasShown = !isHidden();
- reparent( parentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, QPoint(0,0), false );
+ reparent( parentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, TQPoint(0,0), false );
#ifdef Q_WS_X11
KWin::setType( winId(), NET::TopMenu );
if( parentWidget())
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#endif
- QMenuBar::setFrameStyle( NoFrame );
- QMenuBar::setLineWidth( 0 );
- QMenuBar::setMargin( 0 );
+ TQMenuBar::setFrameStyle( NoFrame );
+ TQMenuBar::setLineWidth( 0 );
+ TQMenuBar::setMargin( 0 );
updateFallbackSize();
- d->min_size = QSize( 0, 0 );
+ d->min_size = TQSize( 0, 0 );
if( parentWidget() && !parentWidget()->isTopLevel())
setShown( parentWidget()->isVisible());
else if ( wasShown )
@@ -214,7 +214,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
updateMenuBarSize();
if ( parentWidget() )
- reparent( parentWidget(), QPoint(0,0), !isHidden());
+ reparent( parentWidget(), TQPoint(0,0), !isHidden());
}
}
@@ -226,7 +226,7 @@ bool KMenuBar::isTopLevelMenu() const
// KDE4 remove
void KMenuBar::show()
{
- QMenuBar::show();
+ TQMenuBar::show();
}
void KMenuBar::slotReadConfig()
@@ -236,24 +236,24 @@ void KMenuBar::slotReadConfig()
setTopLevelMenuInternal( config->readBoolEntry( "macStyle", false ) );
}
-bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
+bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
{
if ( d->topLevel )
{
if ( parentWidget() && obj == parentWidget()->topLevelWidget() )
{
- if( ev->type() == QEvent::Resize )
- return false; // ignore resizing of parent, QMenuBar would try to adjust size
- if ( ev->type() == QEvent::Accel || ev->type() == QEvent::AccelAvailable )
+ if( ev->type() == TQEvent::Resize )
+ return false; // ignore resizing of parent, TQMenuBar would try to adjust size
+ if ( ev->type() == TQEvent::Accel || ev->type() == TQEvent::AccelAvailable )
{
- if ( QApplication::sendEvent( topLevelWidget(), ev ) )
+ if ( TQApplication::sendEvent( topLevelWidget(), ev ) )
return true;
}
- if(ev->type() == QEvent::ShowFullScreen )
+ if(ev->type() == TQEvent::ShowFullScreen )
// will update the state properly
setTopLevelMenuInternal( d->topLevel );
}
- if( parentWidget() && obj == parentWidget() && ev->type() == QEvent::Reparent )
+ if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent )
{
#ifdef Q_WS_X11
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@@ -264,7 +264,7 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
}
if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget())
{ // if the parent is not toplevel, KMenuBar needs to match its visibility status
- if( ev->type() == QEvent::Show )
+ if( ev->type() == TQEvent::Show )
{
#ifdef Q_WS_X11
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@@ -273,7 +273,7 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
#endif
show();
}
- if( ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::Hide )
hide();
}
}
@@ -281,18 +281,18 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
{
if( parentWidget() && obj == parentWidget()->topLevelWidget())
{
- if( ev->type() == QEvent::WindowStateChange
+ if( ev->type() == TQEvent::WindowStateChange
&& !parentWidget()->topLevelWidget()->isFullScreen() )
setTopLevelMenuInternal( d->wasTopLevel );
}
}
- return QMenuBar::eventFilter( obj, ev );
+ return TQMenuBar::eventFilter( obj, ev );
}
// KDE4 remove
-void KMenuBar::showEvent( QShowEvent *e )
+void KMenuBar::showEvent( TQShowEvent *e )
{
- QMenuBar::showEvent(e);
+ TQMenuBar::showEvent(e);
}
void KMenuBar::updateFallbackSize()
@@ -327,8 +327,8 @@ void KMenuBar::selectionTimeout()
d->fallback_mode = true; // KMenuBar is handling its position itself
KConfigGroup xineramaConfig(KGlobal::config(),"Xinerama");
int screen = xineramaConfig.readNumEntry("MenubarScreen",
- QApplication::desktop()->screenNumber(QPoint(0,0)) );
- QRect area;
+ TQApplication::desktop()->screenNumber(TQPoint(0,0)) );
+ TQRect area;
if (kapp->desktop()->numScreens() < 2)
area = kapp->desktop()->geometry();
else
@@ -347,19 +347,19 @@ void KMenuBar::selectionTimeout()
int KMenuBar::block_resize = 0;
-void KMenuBar::resizeEvent( QResizeEvent *e )
+void KMenuBar::resizeEvent( TQResizeEvent *e )
{
if( e->spontaneous() && d->topLevel && !d->fallback_mode )
{
++block_resize; // do not respond with configure request to ConfigureNotify event
- QMenuBar::resizeEvent(e); // to avoid possible infinite loop
+ TQMenuBar::resizeEvent(e); // to avoid possible infinite loop
--block_resize;
}
else
- QMenuBar::resizeEvent(e);
+ TQMenuBar::resizeEvent(e);
}
-void KMenuBar::setGeometry( const QRect& r )
+void KMenuBar::setGeometry( const TQRect& r )
{
setGeometry( r.x(), r.y(), r.width(), r.height() );
}
@@ -372,8 +372,8 @@ void KMenuBar::setGeometry( int x, int y, int w, int h )
return;
}
checkSize( w, h );
- if( geometry() != QRect( x, y, w, h ))
- QMenuBar::setGeometry( x, y, w, h );
+ if( geometry() != TQRect( x, y, w, h ))
+ TQMenuBar::setGeometry( x, y, w, h );
}
void KMenuBar::resize( int w, int h )
@@ -381,8 +381,8 @@ void KMenuBar::resize( int w, int h )
if( block_resize > 0 )
return;
checkSize( w, h );
- if( size() != QSize( w, h ))
- QMenuBar::resize( w, h );
+ if( size() != TQSize( w, h ))
+ TQMenuBar::resize( w, h );
// kdDebug() << "RS:" << w << ":" << h << ":" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl;
}
@@ -390,7 +390,7 @@ void KMenuBar::checkSize( int& w, int& h )
{
if( !d->topLevel || d->fallback_mode )
return;
- QSize s = sizeHint();
+ TQSize s = sizeHint();
w = s.width();
h = s.height();
// This is not done as setMinimumSize(), because that would set the minimum
@@ -401,16 +401,16 @@ void KMenuBar::checkSize( int& w, int& h )
}
// QMenuBar's sizeHint() gives wrong size (insufficient width), which causes wrapping in the kicker applet
-QSize KMenuBar::sizeHint() const
+TQSize KMenuBar::sizeHint() const
{
if( !d->topLevel || block_resize > 0 )
- return QMenuBar::sizeHint();
- // Since QMenuBar::sizeHint() may indirectly call resize(),
+ return TQMenuBar::sizeHint();
+ // Since TQMenuBar::sizeHint() may indirectly call resize(),
// avoid infinite recursion.
++block_resize;
// find the minimum useful height, and enlarge the width until the menu fits in that height (one row)
int h = heightForWidth( 1000000 );
- int w = QMenuBar::sizeHint().width();
+ int w = TQMenuBar::sizeHint().width();
// optimization - don't call heightForWidth() too many times
while( heightForWidth( w + 12 ) > h )
w += 12;
@@ -419,7 +419,7 @@ QSize KMenuBar::sizeHint() const
while( heightForWidth( w ) > h )
++w;
--block_resize;
- return QSize( w, h );
+ return TQSize( w, h );
}
#ifdef Q_WS_X11
@@ -428,16 +428,16 @@ bool KMenuBar::x11Event( XEvent* ev )
if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom
&& ev->xclient.window == winId())
{
- // QMenuBar is trying really hard to keep the size it deems right.
+ // TQMenuBar is trying really hard to keep the size it deems right.
// Forcing minimum size and blocking resizing to match parent size
// in checkResizingToParent() seem to be the only way to make
// KMenuBar keep the size it wants
- d->min_size = QSize( ev->xclient.data.l[ 1 ], ev->xclient.data.l[ 2 ] );
+ d->min_size = TQSize( ev->xclient.data.l[ 1 ], ev->xclient.data.l[ 2 ] );
// kdDebug() << "MINSIZE:" << d->min_size << endl;
updateMenuBarSize();
return true;
}
- return QMenuBar::x11Event( ev );
+ return TQMenuBar::x11Event( ev );
}
#endif
@@ -452,7 +452,7 @@ void KMenuBar::setFrameStyle( int style )
if( d->topLevel )
d->frameStyle = style;
else
- QMenuBar::setFrameStyle( style );
+ TQMenuBar::setFrameStyle( style );
}
void KMenuBar::setLineWidth( int width )
@@ -460,7 +460,7 @@ void KMenuBar::setLineWidth( int width )
if( d->topLevel )
d->lineWidth = width;
else
- QMenuBar::setLineWidth( width );
+ TQMenuBar::setLineWidth( width );
}
void KMenuBar::setMargin( int margin )
@@ -468,18 +468,18 @@ void KMenuBar::setMargin( int margin )
if( d->topLevel )
d->margin = margin;
else
- QMenuBar::setMargin( margin );
+ TQMenuBar::setMargin( margin );
}
-void KMenuBar::closeEvent( QCloseEvent* e )
+void KMenuBar::closeEvent( TQCloseEvent* e )
{
if( d->topLevel )
e->ignore(); // mainly for the fallback mode
else
- QMenuBar::closeEvent( e );
+ TQMenuBar::closeEvent( e );
}
-void KMenuBar::drawContents( QPainter* p )
+void KMenuBar::drawContents( TQPainter* p )
{
// Closes the BR77113
// We need to overload this method to paint only the menu items
@@ -494,7 +494,7 @@ void KMenuBar::drawContents( QPainter* p )
if( !d->topLevel )
{
- QMenuBar::drawContents(p);
+ TQMenuBar::drawContents(p);
}
else
{
@@ -509,16 +509,16 @@ void KMenuBar::drawContents( QPainter* p )
p->eraseRect( rect() );
erase();
- QColorGroup g = colorGroup();
+ TQColorGroup g = colorGroup();
bool e;
for ( int i=0; i<(int)count(); i++ )
{
- QMenuItem *mi = findItem( idAt( i ) );
+ TQMenuItem *mi = findItem( idAt( i ) );
if ( !mi->text().isNull() || mi->pixmap() )
{
- QRect r = itemRect(i);
+ TQRect r = itemRect(i);
if(r.isEmpty() || !mi->isVisible())
continue;
@@ -535,17 +535,17 @@ void KMenuBar::drawContents( QPainter* p )
if( item_active )
{
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled() && e)
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( item_active )
- flags |= QStyle::Style_Active;
+ flags |= TQStyle::Style_Active;
if ( item_active && actItemDown )
- flags |= QStyle::Style_Down;
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_Down;
+ flags |= TQStyle::Style_HasFocus;
- style().drawControl(QStyle::CE_MenuBarItem, p, this,
- r, g, flags, QStyleOption(mi));
+ style().drawControl(TQStyle::CE_MenuBarItem, p, this,
+ r, g, flags, TQStyleOption(mi));
}
else
{
diff --git a/kdeui/kmenubar.h b/kdeui/kmenubar.h
index 91309a2a8..548a0c12f 100644
--- a/kdeui/kmenubar.h
+++ b/kdeui/kmenubar.h
@@ -25,15 +25,15 @@
#ifndef _KMENUBAR_H
#define _KMENUBAR_H
-#include <qmenubar.h>
+#include <tqmenubar.h>
#include <kdelibs_export.h>
/**
* %KDE Style-able menubar.
*
- * This is required since QMenuBar is currently not handled by
- * QStyle.
+ * This is required since TQMenuBar is currently not handled by
+ * TQStyle.
*
* @author Daniel "Mosfet" Duley.
* @version $Id$
@@ -45,7 +45,7 @@ class KDEUI_EXPORT KMenuBar : public QMenuBar
public:
- KMenuBar (QWidget *parent=0, const char *name=0);
+ KMenuBar (TQWidget *parent=0, const char *name=0);
~KMenuBar ();
/**
@@ -75,27 +75,27 @@ public:
bool isTopLevelMenu() const;
// TT are overloading virtuals :(
- virtual void setGeometry( const QRect &r );
+ virtual void setGeometry( const TQRect &r );
virtual void setGeometry( int x, int y, int w, int h );
virtual void resize( int w, int h );
- void resize( const QSize& s ) { QMenuBar::resize( s ); }
+ void resize( const TQSize& s ) { TQMenuBar::resize( s ); }
virtual void show();
virtual void setFrameStyle( int );
virtual void setLineWidth( int );
virtual void setMargin( int );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected slots:
void slotReadConfig();
protected:
- virtual void showEvent( QShowEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual void showEvent( TQShowEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual bool eventFilter(TQObject *, TQEvent *);
#ifdef Q_WS_X11
virtual bool x11Event( XEvent* );
#endif
- virtual void closeEvent( QCloseEvent* );
- virtual void drawContents( QPainter* );
+ virtual void closeEvent( TQCloseEvent* );
+ virtual void drawContents( TQPainter* );
private slots:
void updateFallbackSize();
void selectionTimeout();
diff --git a/kdeui/kmessagebox.cpp b/kdeui/kmessagebox.cpp
index 46336e9c6..8e9256677 100644
--- a/kdeui/kmessagebox.cpp
+++ b/kdeui/kmessagebox.cpp
@@ -17,19 +17,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qguardedptr.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqguardedptr.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -60,52 +60,52 @@
static bool KMessageBox_queue = false;
-static QPixmap themedMessageBoxIcon(QMessageBox::Icon icon)
+static TQPixmap themedMessageBoxIcon(TQMessageBox::Icon icon)
{
- QString icon_name;
+ TQString icon_name;
switch(icon)
{
- case QMessageBox::NoIcon:
- return QPixmap();
+ case TQMessageBox::NoIcon:
+ return TQPixmap();
break;
- case QMessageBox::Information:
+ case TQMessageBox::Information:
icon_name = "messagebox_info";
break;
- case QMessageBox::Warning:
+ case TQMessageBox::Warning:
icon_name = "messagebox_warning";
break;
- case QMessageBox::Critical:
+ case TQMessageBox::Critical:
icon_name = "messagebox_critical";
break;
default:
break;
}
- QPixmap ret = KGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true);
+ TQPixmap ret = KGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true);
if (ret.isNull())
- return QMessageBox::standardIcon(icon);
+ return TQMessageBox::standardIcon(icon);
else
return ret;
}
-static void sendNotification( QString message,
- const QStringList& strlist,
- QMessageBox::Icon icon,
+static void sendNotification( TQString message,
+ const TQStringList& strlist,
+ TQMessageBox::Icon icon,
WId parent_id )
{
// create the message for KNotify
- QString messageType;
+ TQString messageType;
switch ( icon )
{
- case QMessageBox::Warning:
+ case TQMessageBox::Warning:
messageType = "messageWarning";
break;
- case QMessageBox::Critical:
+ case TQMessageBox::Critical:
messageType = "messageCritical";
break;
- case QMessageBox::Question:
+ case TQMessageBox::Question:
messageType = "messageQuestion";
break;
default:
@@ -115,7 +115,7 @@ static void sendNotification( QString message,
if ( !strlist.isEmpty() )
{
- for ( QStringList::ConstIterator it = strlist.begin(); it != strlist.end(); ++it )
+ for ( TQStringList::ConstIterator it = strlist.begin(); it != strlist.end(); ++it )
message += "\n" + *it;
}
@@ -123,43 +123,43 @@ static void sendNotification( QString message,
KNotifyClient::event( (int)parent_id, messageType, message );
}
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-int KMessageBox::createKMessageBox(KDialogBase *dialog, QMessageBox::Icon icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details)
+int KMessageBox::createKMessageBox(KDialogBase *dialog, TQMessageBox::Icon icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details)
{
return createKMessageBox(dialog, themedMessageBoxIcon(icon), text, strlist,
ask, checkboxReturn, options, details, icon);
}
-int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn, int options,
- const QString &details, QMessageBox::Icon notifyType)
+int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn, int options,
+ const TQString &details, TQMessageBox::Icon notifyType)
{
- QVBox *topcontents = new QVBox (dialog);
+ TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
topcontents->setMargin(KDialog::marginHint());
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout * lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout * lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint());
- QLabel *label1 = new QLabel( contents);
+ TQLabel *label1 = new TQLabel( contents);
if (!icon.isNull())
label1->setPixmap(icon);
@@ -167,14 +167,14 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
lay->addWidget( label1, 0, Qt::AlignCenter );
lay->addSpacing(KDialog::spacingHint());
// Enforce <p>text</p> otherwise the word-wrap doesn't work well
- QString qt_text = qrichtextify( text );
+ TQString qt_text = qrichtextify( text );
int pref_width = 0;
int pref_height = 0;
// Calculate a proper size for the text.
{
- QSimpleRichText rt(qt_text, dialog->font());
- QRect d = KGlobalSettings::desktopGeometry(dialog);
+ TQSimpleRichText rt(qt_text, dialog->font());
+ TQRect d = KGlobalSettings::desktopGeometry(dialog);
pref_width = d.width() / 3;
rt.setWidth(pref_width);
@@ -214,13 +214,13 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
KActiveLabel *label2 = new KActiveLabel( qt_text, contents );
if (!(options & KMessageBox::AllowLink))
{
- QObject::disconnect(label2, SIGNAL(linkClicked(const QString &)),
- label2, SLOT(openLink(const QString &)));
+ TQObject::disconnect(label2, TQT_SIGNAL(linkClicked(const TQString &)),
+ label2, TQT_SLOT(openLink(const TQString &)));
}
// We add 10 pixels extra to compensate for some KActiveLabel margins.
// TODO: find out why this is 10.
- label2->setFixedSize(QSize(pref_width+10, pref_height));
+ label2->setFixedSize(TQSize(pref_width+10, pref_height));
lay->addWidget( label2 );
lay->addStretch();
@@ -229,32 +229,32 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
{
listbox=new KListBox( topcontents );
listbox->insertStringList( strlist );
- listbox->setSelectionMode( QListBox::NoSelection );
+ listbox->setSelectionMode( TQListBox::NoSelection );
topcontents->setStretchFactor(listbox, 1);
}
- QGuardedPtr<QCheckBox> checkbox = 0;
+ TQGuardedPtr<TQCheckBox> checkbox = 0;
if (!ask.isEmpty())
{
- checkbox = new QCheckBox(ask, topcontents);
+ checkbox = new TQCheckBox(ask, topcontents);
if (checkboxReturn)
checkbox->setChecked(*checkboxReturn);
}
if (!details.isEmpty())
{
- QVGroupBox *detailsGroup = new QVGroupBox( i18n("Details"), dialog);
+ TQVGroupBox *detailsGroup = new TQVGroupBox( i18n("Details"), dialog);
if ( details.length() < 512 ) {
KActiveLabel *label3 = new KActiveLabel(qrichtextify(details),
detailsGroup);
label3->setMinimumSize(label3->sizeHint());
if (!(options & KMessageBox::AllowLink))
{
- QObject::disconnect(label3, SIGNAL(linkClicked(const QString &)),
- label3, SLOT(openLink(const QString &)));
+ TQObject::disconnect(label3, TQT_SIGNAL(linkClicked(const TQString &)),
+ label3, TQT_SLOT(openLink(const TQString &)));
}
} else {
- QTextEdit* te = new QTextEdit(details, QString::null, detailsGroup);
+ TQTextEdit* te = new TQTextEdit(details, TQString::null, detailsGroup);
te->setReadOnly( true );
te->setMinimumHeight( te->fontMetrics().lineSpacing() * 11 );
}
@@ -283,7 +283,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
for( unsigned int i = 0;
i < sizeof( buttons )/sizeof( buttons[ 0 ] );
++i )
- if( QPushButton* btn = dialog->actionButton( buttons[ i ] ))
+ if( TQPushButton* btn = dialog->actionButton( buttons[ i ] ))
if( btn->isDefault())
btn->setFocus();
@@ -301,10 +301,10 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
return KMessageBox::Cancel; // We have to return something.
}
- // We use a QGuardedPtr because the dialog may get deleted
+ // We use a TQGuardedPtr because the dialog may get deleted
// during exec() if the parent of the dialog gets deleted.
// In that case the guarded ptr will reset to 0.
- QGuardedPtr<KDialogBase> guardedDialog = dialog;
+ TQGuardedPtr<KDialogBase> guardedDialog = dialog;
int result = guardedDialog->exec();
if (checkbox && checkboxReturn)
@@ -314,38 +314,38 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
}
int
-KMessageBox::questionYesNo(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::questionYesNo(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return questionYesNoList(parent, text, QStringList(), caption,
+ return questionYesNoList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::questionYesNoWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::questionYesNoWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return questionYesNoListWId(parent_id, text, QStringList(), caption,
+ return questionYesNoListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
bool
-KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
+KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName,
ButtonCode &result)
{
if ( dontShowAgainName.isEmpty() ) return true;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
- QString dontAsk = config->readEntry(dontShowAgainName).lower();
+ TQString dontAsk = config->readEntry(dontShowAgainName).lower();
if (dontAsk == "yes") {
result = Yes;
return false;
@@ -358,21 +358,21 @@ KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
}
bool
-KMessageBox::shouldBeShownContinue(const QString &dontShowAgainName)
+KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName)
{
if ( dontShowAgainName.isEmpty() ) return true;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
return config->readBoolEntry(dontShowAgainName, true);
}
void
-KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
+KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName,
ButtonCode result)
{
if ( dontShowAgainName.isEmpty() ) return;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':'));
@@ -380,10 +380,10 @@ KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
}
void
-KMessageBox::saveDontShowAgainContinue(const QString &dontShowAgainName)
+KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName)
{
if ( dontShowAgainName.isEmpty() ) return;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':'));
@@ -398,12 +398,12 @@ KMessageBox::setDontShowAskAgainConfig(KConfig* cfg)
}
int
-KMessageBox::questionYesNoList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::questionYesNoList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{ // in order to avoid code duplication, convert to WId, it will be converted back
return questionYesNoListWId( parent ? parent->winId() : 0, text, strlist,
@@ -411,19 +411,19 @@ KMessageBox::questionYesNoList(QWidget *parent, const QString &text,
}
int
-KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Question") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -438,8 +438,8 @@ KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Information, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Information, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
res = (result==KDialogBase::Yes ? Yes : No);
@@ -449,12 +449,12 @@ KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::questionYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption,
+KMessageBox::questionYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return questionYesNoCancelWId( parent ? parent->winId() : 0, text, caption, buttonYes, buttonNo,
@@ -463,18 +463,18 @@ KMessageBox::questionYesNoCancel(QWidget *parent,
int
KMessageBox::questionYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Question") : caption,
KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
@@ -489,9 +489,9 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Information,
- text, QStringList(),
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Information,
+ text, TQStringList(),
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::Cancel ) return Cancel;
res = (result==KDialogBase::Yes ? Yes : No);
@@ -502,36 +502,36 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
}
int
-KMessageBox::warningYesNo(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNo(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoList(parent, text, QStringList(), caption,
+ return warningYesNoList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoListWId(parent_id, text, QStringList(), caption,
+ return warningYesNoListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningYesNoListWId( parent ? parent->winId() : 0, text, strlist, caption,
@@ -539,12 +539,12 @@ KMessageBox::warningYesNoList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
// warningYesNo and warningYesNoList are always "dangerous"
@@ -556,7 +556,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -571,8 +571,8 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
res = (result==KDialogBase::Yes ? Yes : No);
@@ -582,35 +582,35 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::warningContinueCancel(QWidget *parent,
- const QString &text,
- const QString &caption,
+KMessageBox::warningContinueCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningContinueCancelList(parent, text, QStringList(), caption,
+ return warningContinueCancelList(parent, text, TQStringList(), caption,
buttonContinue, dontAskAgainName, options);
}
int
KMessageBox::warningContinueCancelWId(WId parent_id,
- const QString &text,
- const QString &caption,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningContinueCancelListWId(parent_id, text, QStringList(), caption,
+ return warningContinueCancelListWId(parent_id, text, TQStringList(), caption,
buttonContinue, dontAskAgainName, options);
}
int
-KMessageBox::warningContinueCancelList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningContinueCancelList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningContinueCancelListWId( parent ? parent->winId() : 0, text, strlist,
@@ -618,17 +618,17 @@ KMessageBox::warningContinueCancelList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
if ( !shouldBeShownContinue(dontAskAgainName) )
return Continue;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -643,8 +643,8 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::No )
@@ -655,36 +655,36 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::warningYesNoCancel(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoCancel(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoCancelList(parent, text, QStringList(), caption,
+ return warningYesNoCancelList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoCancelWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoCancelWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoCancelListWId(parent_id, text, QStringList(), caption,
+ return warningYesNoCancelListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoCancelList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoCancelList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningYesNoCancelListWId( parent ? parent->winId() : 0, text, strlist,
@@ -692,19 +692,19 @@ KMessageBox::warningYesNoCancelList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
@@ -719,8 +719,8 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::Cancel ) return Cancel;
res = (result==KDialogBase::Yes ? Yes : No);
@@ -731,31 +731,31 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
}
void
-KMessageBox::error(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::error(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
- return errorListWId( parent ? parent->winId() : 0, text, QStringList(), caption, options );
+ return errorListWId( parent ? parent->winId() : 0, text, TQStringList(), caption, options );
}
void
-KMessageBox::errorWId(WId parent_id, const QString &text,
- const QString &caption, int options)
+KMessageBox::errorWId(WId parent_id, const TQString &text,
+ const TQString &caption, int options)
{
- errorListWId( parent_id, text, QStringList(), caption, options );
+ errorListWId( parent_id, text, TQStringList(), caption, options );
}
void
-KMessageBox::errorList(QWidget *parent, const QString &text, const QStringList &strlist,
- const QString &caption, int options)
+KMessageBox::errorList(TQWidget *parent, const TQString &text, const TQStringList &strlist,
+ const TQString &caption, int options)
{
return errorListWId( parent ? parent->winId() : 0, text, strlist, caption, options );
}
void
-KMessageBox::errorListWId(WId parent_id, const QString &text, const QStringList &strlist,
- const QString &caption, int options)
+KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringList &strlist,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Error") : caption,
KDialogBase::Yes,
@@ -769,23 +769,23 @@ KMessageBox::errorListWId(WId parent_id, const QString &text, const QStringList
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Critical, text, strlist, QString::null, 0, options);
+ createKMessageBox(dialog, TQMessageBox::Critical, text, strlist, TQString::null, 0, options);
}
void
-KMessageBox::detailedError(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedError(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
return detailedErrorWId( parent ? parent->winId() : 0, text, details, caption, options );
}
void
-KMessageBox::detailedErrorWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedErrorWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Error") : caption,
KDialogBase::Yes | KDialogBase::Details,
@@ -799,21 +799,21 @@ KMessageBox::detailedErrorWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Critical, text, QStringList(), QString::null, 0, options, details);
+ createKMessageBox(dialog, TQMessageBox::Critical, text, TQStringList(), TQString::null, 0, options, details);
}
void
-KMessageBox::queuedDetailedError(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption)
+KMessageBox::queuedDetailedError(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption)
{
return queuedDetailedErrorWId( parent ? parent->winId() : 0, text, details, caption );
}
void
-KMessageBox::queuedDetailedErrorWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption)
+KMessageBox::queuedDetailedErrorWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption)
{
KMessageBox_queue = true;
(void) detailedErrorWId(parent_id, text, details, caption);
@@ -822,17 +822,17 @@ KMessageBox::queuedDetailedErrorWId(WId parent_id, const QString &text,
void
-KMessageBox::sorry(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::sorry(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
return sorryWId( parent ? parent->winId() : 0, text, caption, options );
}
void
-KMessageBox::sorryWId(WId parent_id, const QString &text,
- const QString &caption, int options)
+KMessageBox::sorryWId(WId parent_id, const TQString &text,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Sorry") : caption,
KDialogBase::Yes,
@@ -846,23 +846,23 @@ KMessageBox::sorryWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString::null, 0, options);
+ createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options);
}
void
-KMessageBox::detailedSorry(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedSorry(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
return detailedSorryWId( parent ? parent->winId() : 0, text, details, caption, options );
}
void
-KMessageBox::detailedSorryWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedSorryWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Sorry") : caption,
KDialogBase::Yes | KDialogBase::Details,
@@ -876,39 +876,39 @@ KMessageBox::detailedSorryWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString::null, 0, options, details);
+ createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options, details);
}
void
-KMessageBox::information(QWidget *parent,const QString &text,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::information(TQWidget *parent,const TQString &text,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
- informationList(parent, text, QStringList(), caption, dontShowAgainName, options);
+ informationList(parent, text, TQStringList(), caption, dontShowAgainName, options);
}
void
-KMessageBox::informationWId(WId parent_id,const QString &text,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationWId(WId parent_id,const TQString &text,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
- informationListWId(parent_id, text, QStringList(), caption, dontShowAgainName, options);
+ informationListWId(parent_id, text, TQStringList(), caption, dontShowAgainName, options);
}
void
-KMessageBox::informationList(QWidget *parent,const QString &text, const QStringList & strlist,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationList(TQWidget *parent,const TQString &text, const TQStringList & strlist,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
return informationListWId( parent ? parent->winId() : 0, text, strlist, caption,
dontShowAgainName, options );
}
void
-KMessageBox::informationListWId(WId parent_id,const QString &text, const QStringList & strlist,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStringList & strlist,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
if ( !shouldBeShownContinue(dontShowAgainName) )
return;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Information") : caption,
KDialogBase::Yes,
@@ -924,8 +924,8 @@ KMessageBox::informationListWId(WId parent_id,const QString &text, const QString
bool checkboxResult = false;
- createKMessageBox(dialog, QMessageBox::Information, text, strlist,
- dontShowAgainName.isEmpty() ? QString::null : i18n("Do not show this message again"),
+ createKMessageBox(dialog, TQMessageBox::Information, text, strlist,
+ dontShowAgainName.isEmpty() ? TQString::null : i18n("Do not show this message again"),
&checkboxResult, options);
if (checkboxResult)
@@ -936,13 +936,13 @@ void
KMessageBox::enableAllMessages()
{
KConfig *config = againConfig ? againConfig : KGlobal::config();
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
if (!config->hasGroup(grpNotifMsgs))
return;
KConfigGroupSaver saver( config, grpNotifMsgs );
- typedef QMap<QString, QString> configMap;
+ typedef TQMap<TQString, TQString> configMap;
configMap map = config->entryMap(grpNotifMsgs);
@@ -953,10 +953,10 @@ KMessageBox::enableAllMessages()
}
void
-KMessageBox::enableMessage(const QString &dontShowAgainName)
+KMessageBox::enableMessage(const TQString &dontShowAgainName)
{
KConfig *config = againConfig ? againConfig : KGlobal::config();
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
if (!config->hasGroup(grpNotifMsgs))
return;
@@ -967,10 +967,10 @@ KMessageBox::enableMessage(const QString &dontShowAgainName)
}
void
-KMessageBox::about(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::about(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
- QString _caption = caption;
+ TQString _caption = caption;
if (_caption.isEmpty())
_caption = i18n("About %1").arg(kapp->caption());
@@ -981,36 +981,36 @@ KMessageBox::about(QWidget *parent, const QString &text,
parent, "about", true, true,
KStdGuiItem::ok() );
- QPixmap ret = KApplication::kApplication()->icon();
+ TQPixmap ret = KApplication::kApplication()->icon();
if (ret.isNull())
- ret = QMessageBox::standardIcon(QMessageBox::Information);
+ ret = TQMessageBox::standardIcon(TQMessageBox::Information);
dialog->setIcon(ret);
- createKMessageBox(dialog, ret, text, QStringList(), QString::null, 0, options);
+ createKMessageBox(dialog, ret, text, TQStringList(), TQString::null, 0, options);
return;
}
-int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
- const KGuiItem &buttonNo, const QString &dontShowAskAgainName,
+int KMessageBox::messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
+ const KGuiItem &buttonNo, const TQString &dontShowAskAgainName,
int options )
{
return messageBoxWId( parent ? parent->winId() : 0, type, text, caption,
buttonYes, buttonNo, dontShowAskAgainName, options );
}
-int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
+int KMessageBox::messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
const KGuiItem &buttonNo, int options )
{
return messageBoxWId( parent ? parent->winId() : 0, type, text, caption,
- buttonYes, buttonNo, QString::null, options );
+ buttonYes, buttonNo, TQString::null, options );
}
-int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
- const KGuiItem &buttonNo, const QString &dontShow,
+int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
+ const KGuiItem &buttonNo, const TQString &dontShow,
int options )
{
switch (type) {
@@ -1045,25 +1045,25 @@ int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const QString &t
return KMessageBox::Cancel;
}
-void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, int options )
+void KMessageBox::queuedMessageBox( TQWidget *parent, DialogType type, const TQString &text, const TQString &caption, int options )
{
return queuedMessageBoxWId( parent ? parent->winId() : 0, type, text, caption, options );
}
-void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption, int options )
+void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const TQString &text, const TQString &caption, int options )
{
KMessageBox_queue = true;
(void) messageBoxWId(parent_id, type, text, caption, KStdGuiItem::yes(),
- KStdGuiItem::no(), QString::null, options);
+ KStdGuiItem::no(), TQString::null, options);
KMessageBox_queue = false;
}
-void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption )
+void KMessageBox::queuedMessageBox( TQWidget *parent, DialogType type, const TQString &text, const TQString &caption )
{
return queuedMessageBoxWId( parent ? parent->winId() : 0, type, text, caption );
}
-void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption )
+void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const TQString &text, const TQString &caption )
{
KMessageBox_queue = true;
(void) messageBoxWId(parent_id, type, text, caption);
diff --git a/kdeui/kmessagebox.h b/kdeui/kmessagebox.h
index 850fb7a5b..39dbdb10b 100644
--- a/kdeui/kmessagebox.h
+++ b/kdeui/kmessagebox.h
@@ -19,8 +19,8 @@
#ifndef _KMESSAGEBOX_H_
#define _KMESSAGEBOX_H_
-#include <qstring.h>
-#include <qmessagebox.h>
+#include <tqstring.h>
+#include <tqmessagebox.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
@@ -112,24 +112,24 @@ public:
* The default button is "Yes". Pressing "Esc" selects "No".
*/
- static int questionYesNo(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int questionYesNo(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* Display a simple "question" dialog.
@@ -163,25 +163,25 @@ public:
* NOTE: The cancel button will always have the i18n'ed text '&Cancel'.
*/
- static int questionYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int questionYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -218,27 +218,27 @@ public:
* The default button is "Yes". Pressing "Esc" selects "No".
*/
- static int questionYesNoList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int questionYesNoList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -271,25 +271,25 @@ public:
*
* The default button is "No". Pressing "Esc" selects "No".
*/
- static int warningYesNo(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningYesNo(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
@@ -326,27 +326,27 @@ public:
* The default button is "No". Pressing "Esc" selects "No".
*/
- static int warningYesNoList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningYesNoList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
@@ -378,23 +378,23 @@ public:
*
* The default button is buttonContinue. Pressing "Esc" selects "Cancel".
*/
- static int warningContinueCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningContinueCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningContinueCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -430,25 +430,25 @@ public:
*
* The default button is buttonContinue. Pressing "Esc" selects "Cancel".
*/
- static int warningContinueCancelList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningContinueCancelList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningContinueCancelListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -487,25 +487,25 @@ public:
* NOTE: The cancel button will always have the i18n'ed text '&Cancel'.
*/
- static int warningYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -549,27 +549,27 @@ public:
*
* @since 3.2
*/
- static int warningYesNoCancelList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningYesNoCancelList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoCancelListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -595,20 +595,20 @@ public:
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void error(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static void error(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
*
* @since 3.2
*/
static void errorWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -639,22 +639,22 @@ public:
* @since 3.4
*/
- static void errorList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static void errorList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.4
*/
static void errorListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -683,21 +683,21 @@ public:
*
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void detailedError(QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ static void detailedError(TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void detailedErrorWId(WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -710,20 +710,20 @@ public:
* Note that if the parent gets deleted, the messagebox will not be
* shown.
*/
- static void queuedDetailedError( QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null);
+ static void queuedDetailedError( TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedDetailedErrorWId( WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null);
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null);
/**
* Display an "Sorry" dialog.
@@ -747,19 +747,19 @@ public:
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void sorry(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static void sorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void sorryWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -790,21 +790,21 @@ public:
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void detailedSorry(QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ static void detailedSorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void detailedSorryWId(WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -833,21 +833,21 @@ public:
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void information(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ static void information(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void informationWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
@@ -880,23 +880,23 @@ public:
* @since 3.1
*/
- static void informationList(QWidget *parent,
- const QString &text,
- const QStringList & strlist,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ static void informationList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList & strlist,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void informationListWId(WId parent_id,
- const QString &text,
- const QStringList & strlist,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ const TQString &text,
+ const TQStringList & strlist,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
@@ -912,7 +912,7 @@ public:
* @see saveDontShowAgainContinue()
* @since 3.2
*/
- static void enableMessage(const QString &dontShowAgainName);
+ static void enableMessage(const TQString &dontShowAgainName);
/**
* Display an "About" dialog.
@@ -933,9 +933,9 @@ public:
*
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void about(QWidget *parent,
- const QString& text,
- const QString& caption = QString::null,
+ static void about(TQWidget *parent,
+ const TQString& text,
+ const TQString& caption = TQString::null,
int options = Notify);
/**
@@ -962,11 +962,11 @@ public:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox.
*/
- static int messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption,
+ static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options = Notify);
/**
@@ -988,22 +988,22 @@ public:
* @return a button code, as defined in KMessageBox.
*/
// KDE4 - merge with above?
- static int messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption = QString::null,
+ static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
- static int messageBoxWId( WId parent_id, DialogType type, const QString &text,
- const QString &caption = QString::null,
+ static int messageBoxWId( WId parent_id, DialogType type, const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString::null,
int options = Notify);
/**
@@ -1018,19 +1018,19 @@ public:
* Note that if the parent gets deleted, the messagebox will not be
* shown.
*/
- static void queuedMessageBox( QWidget *parent,
- DialogType type, const QString &text,
- const QString &caption,
+ static void queuedMessageBox( TQWidget *parent,
+ DialogType type, const TQString &text,
+ const TQString &caption,
int options );
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedMessageBoxWId( WId parent_id,
- DialogType type, const QString &text,
- const QString &caption,
+ DialogType type, const TQString &text,
+ const TQString &caption,
int options );
/**
@@ -1039,18 +1039,18 @@ public:
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
*/
- static void queuedMessageBox( QWidget *parent,
- DialogType type, const QString &text,
- const QString &caption = QString::null );
+ static void queuedMessageBox( TQWidget *parent,
+ DialogType type, const TQString &text,
+ const TQString &caption = TQString::null );
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedMessageBoxWId( WId parent_id,
- DialogType type, const QString &text,
- const QString &caption = QString::null );
+ DialogType type, const TQString &text,
+ const TQString &caption = TQString::null );
/**
* @return true if the corresponding yes/no message box should be shown.
@@ -1061,7 +1061,7 @@ public:
* should not be shown.
* @since 3.2
*/
- static bool shouldBeShownYesNo(const QString &dontShowAgainName,
+ static bool shouldBeShownYesNo(const TQString &dontShowAgainName,
ButtonCode &result);
/**
* @return true if the corresponding continue/cancel message box should be
@@ -1070,7 +1070,7 @@ public:
* empty, true is always returned.
* @since 3.2
*/
- static bool shouldBeShownContinue(const QString &dontShowAgainName);
+ static bool shouldBeShownContinue(const TQString &dontShowAgainName);
/**
* Save the fact that the yes/no message box should not be shown again.
@@ -1080,7 +1080,7 @@ public:
* for the message box.
* @since 3.2
*/
- static void saveDontShowAgainYesNo(const QString &dontShowAgainName,
+ static void saveDontShowAgainYesNo(const TQString &dontShowAgainName,
ButtonCode result);
/**
@@ -1090,7 +1090,7 @@ public:
* empty, this method does nothing.
* @since 3.2
*/
- static void saveDontShowAgainContinue(const QString &dontShowAgainName);
+ static void saveDontShowAgainContinue(const TQString &dontShowAgainName);
/**
* Use @p cfg for all settings related to the dontShowAgainName feature.
@@ -1122,16 +1122,16 @@ public:
* @note The @p dialog that is passed in is deleted by this
* function. Do not delete it yourself.
*/
- static int createKMessageBox(KDialogBase *dialog, QMessageBox::Icon icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details=QString::null);
+ static int createKMessageBox(KDialogBase *dialog, TQMessageBox::Icon icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details=TQString::null);
/**
* Create content and layout of a standard dialog
*
* @param dialog The parent dialog base
- * @param icon A QPixmap containing the icon to be displayed in the
+ * @param icon A TQPixmap containing the icon to be displayed in the
* dialog next to the text.
* @param text Message string.
* @param strlist List of strings to be written in the listbox.
@@ -1153,11 +1153,11 @@ public:
* @note The @p dialog that is passed in is deleted by this
* function. Do not delete it yourself.
*/
- static int createKMessageBox(KDialogBase *dialog, QPixmap icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details=QString::null,
- QMessageBox::Icon notifyType=QMessageBox::Information);
+ static int createKMessageBox(KDialogBase *dialog, TQPixmap icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details=TQString::null,
+ TQMessageBox::Icon notifyType=TQMessageBox::Information);
private:
static KConfig* againConfig;
diff --git a/kdeui/knuminput.cpp b/kdeui/knuminput.cpp
index 68587dcb4..4d3075bb2 100644
--- a/kdeui/knuminput.cpp
+++ b/kdeui/knuminput.cpp
@@ -36,13 +36,13 @@
#include <math.h>
#include <algorithm>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qsize.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqsize.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -59,14 +59,14 @@ static inline int calcDiffByTen( int x, int y ) {
// ----------------------------------------------------------------------------
-KNumInput::KNumInput(QWidget* parent, const char* name)
- : QWidget(parent, name)
+KNumInput::KNumInput(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
init();
}
-KNumInput::KNumInput(KNumInput* below, QWidget* parent, const char* name)
- : QWidget(parent, name)
+KNumInput::KNumInput(KNumInput* below, TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
init();
@@ -98,7 +98,7 @@ KNumInput::~KNumInput()
m_next->m_prev = m_prev;
}
-void KNumInput::setLabel(const QString & label, int a)
+void KNumInput::setLabel(const TQString & label, int a)
{
if(label.isEmpty()) {
delete m_label;
@@ -107,7 +107,7 @@ void KNumInput::setLabel(const QString & label, int a)
}
else {
if (m_label) m_label->setText(label);
- else m_label = new QLabel(label, this, "KNumInput::QLabel");
+ else m_label = new TQLabel(label, this, "KNumInput::TQLabel");
m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter)))
| AlignVCenter);
// if no vertical alignment set, use Top alignment
@@ -119,10 +119,10 @@ void KNumInput::setLabel(const QString & label, int a)
layout(true);
}
-QString KNumInput::label() const
+TQString KNumInput::label() const
{
if (m_label) return m_label->text();
- return QString::null;
+ return TQString::null;
}
void KNumInput::layout(bool deep)
@@ -131,7 +131,7 @@ void KNumInput::layout(bool deep)
int w2 = m_colw2;
// label sizeHint
- m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0));
+ m_sizeLabel = (m_label ? m_label->sizeHint() : TQSize(0,0));
if(m_label && (m_alignment & AlignVCenter))
m_colw1 = m_sizeLabel.width() + 4;
@@ -139,7 +139,7 @@ void KNumInput::layout(bool deep)
m_colw1 = 0;
// slider sizeHint
- m_sizeSlider = (m_slider ? m_slider->sizeHint() : QSize(0, 0));
+ m_sizeSlider = (m_slider ? m_slider->sizeHint() : TQSize(0, 0));
doLayout();
@@ -182,12 +182,12 @@ void KNumInput::layout(bool deep)
// kdDebug() << "w1 " << w1 << " w2 " << w2 << endl;
}
-QSizePolicy KNumInput::sizePolicy() const
+TQSizePolicy KNumInput::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+ return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
}
-QSize KNumInput::sizeHint() const
+TQSize KNumInput::sizeHint() const
{
return minimumSizeHint();
}
@@ -201,8 +201,8 @@ void KNumInput::setSteps(int minor, int major)
// ----------------------------------------------------------------------------
-KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name)
- : QSpinBox(0, 99, 1, parent, name)
+KIntSpinBox::KIntSpinBox(TQWidget *parent, const char *name)
+ : TQSpinBox(0, 99, 1, parent, name)
{
editor()->setAlignment(AlignRight);
val_base = 10;
@@ -214,8 +214,8 @@ KIntSpinBox::~KIntSpinBox()
}
KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
- QWidget* parent, const char* name)
- : QSpinBox(lower, upper, step, parent, name)
+ TQWidget* parent, const char* name)
+ : TQSpinBox(lower, upper, step, parent, name)
{
editor()->setAlignment(AlignRight);
val_base = base;
@@ -233,9 +233,9 @@ int KIntSpinBox::base() const
return val_base;
}
-QString KIntSpinBox::mapValueToText(int v)
+TQString KIntSpinBox::mapValueToText(int v)
{
- return QString::number(v, val_base);
+ return TQString::number(v, val_base);
}
int KIntSpinBox::mapTextToValue(bool* ok)
@@ -263,20 +263,20 @@ public:
};
-KIntNumInput::KIntNumInput(KNumInput* below, int val, QWidget* parent,
+KIntNumInput::KIntNumInput(KNumInput* below, int val, TQWidget* parent,
int _base, const char* name)
: KNumInput(below, parent, name)
{
init(val, _base);
}
-KIntNumInput::KIntNumInput(QWidget *parent, const char *name)
+KIntNumInput::KIntNumInput(TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(0, 10);
}
-KIntNumInput::KIntNumInput(int val, QWidget *parent, int _base, const char *name)
+KIntNumInput::KIntNumInput(int val, TQWidget *parent, int _base, const char *name)
: KNumInput(parent, name)
{
init(val, _base);
@@ -293,9 +293,9 @@ void KIntNumInput::init(int val, int _base)
if (_base != 10)
m_spin->setValidator(new KIntValidator(this, _base, "KNumInput::KIntValidtr"));
- connect(m_spin, SIGNAL(valueChanged(int)), SLOT(spinValueChanged(int)));
- connect(this, SIGNAL(valueChanged(int)),
- SLOT(slotEmitRelativeValueChanged(int)));
+ connect(m_spin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinValueChanged(int)));
+ connect(this, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotEmitRelativeValueChanged(int)));
setFocusProxy(m_spin);
layout(true);
@@ -332,17 +332,17 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
m_spin->setMaxValue(upper);
m_spin->setLineStep(step);
- step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep?
+ step = m_spin->lineStep(); // maybe TQRangeControl didn't like out lineStep?
if(slider) {
if (m_slider)
m_slider->setRange(lower, upper);
else {
- m_slider = new QSlider(lower, upper, step, m_spin->value(),
- QSlider::Horizontal, this);
- m_slider->setTickmarks(QSlider::Below);
- connect(m_slider, SIGNAL(valueChanged(int)),
- m_spin, SLOT(setValue(int)));
+ m_slider = new TQSlider(lower, upper, step, m_spin->value(),
+ TQSlider::Horizontal, this);
+ m_slider->setTickmarks(TQSlider::Below);
+ connect(m_slider, TQT_SIGNAL(valueChanged(int)),
+ m_spin, TQT_SLOT(setValue(int)));
}
// calculate (upper-lower)/10 without overflowing int's:
@@ -383,26 +383,26 @@ int KIntNumInput::maxValue() const
return m_spin->maxValue();
}
-void KIntNumInput::setSuffix(const QString &suffix)
+void KIntNumInput::setSuffix(const TQString &suffix)
{
m_spin->setSuffix(suffix);
layout(true);
}
-QString KIntNumInput::suffix() const
+TQString KIntNumInput::suffix() const
{
return m_spin->suffix();
}
-void KIntNumInput::setPrefix(const QString &prefix)
+void KIntNumInput::setPrefix(const TQString &prefix)
{
m_spin->setPrefix(prefix);
layout(true);
}
-QString KIntNumInput::prefix() const
+TQString KIntNumInput::prefix() const
{
return m_spin->prefix();
}
@@ -412,7 +412,7 @@ void KIntNumInput::setEditFocus(bool mark)
m_spin->setEditFocus(mark);
}
-QSize KIntNumInput::minimumSizeHint() const
+TQSize KIntNumInput::minimumSizeHint() const
{
constPolish();
@@ -434,7 +434,7 @@ QSize KIntNumInput::minimumSizeHint() const
if(m_alignment & (AlignTop|AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
- return QSize(w, h);
+ return TQSize(w, h);
}
void KIntNumInput::doLayout()
@@ -446,7 +446,7 @@ void KIntNumInput::doLayout()
m_label->setBuddy(m_spin);
}
-void KIntNumInput::resizeEvent(QResizeEvent* e)
+void KIntNumInput::resizeEvent(TQResizeEvent* e)
{
int w = m_colw1;
int h = 0;
@@ -509,18 +509,18 @@ int KIntNumInput::value() const
return m_spin->value();
}
-void KIntNumInput::setSpecialValueText(const QString& text)
+void KIntNumInput::setSpecialValueText(const TQString& text)
{
m_spin->setSpecialValueText(text);
layout(true);
}
-QString KIntNumInput::specialValueText() const
+TQString KIntNumInput::specialValueText() const
{
return m_spin->specialValueText();
}
-void KIntNumInput::setLabel(const QString & label, int a)
+void KIntNumInput::setLabel(const TQString & label, int a)
{
KNumInput::setLabel(label, a);
@@ -541,14 +541,14 @@ public:
short blockRelative;
};
-KDoubleNumInput::KDoubleNumInput(QWidget *parent, const char *name)
+KDoubleNumInput::KDoubleNumInput(TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(0.0, 0.0, 9999.0, 0.01, 2);
}
KDoubleNumInput::KDoubleNumInput(double lower, double upper, double value,
- double step, int precision, QWidget* parent,
+ double step, int precision, TQWidget* parent,
const char *name)
: KNumInput(parent, name)
{
@@ -557,20 +557,20 @@ KDoubleNumInput::KDoubleNumInput(double lower, double upper, double value,
KDoubleNumInput::KDoubleNumInput(KNumInput *below,
double lower, double upper, double value,
- double step, int precision, QWidget* parent,
+ double step, int precision, TQWidget* parent,
const char *name)
: KNumInput(below, parent, name)
{
init(value, lower, upper, step, precision);
}
-KDoubleNumInput::KDoubleNumInput(double value, QWidget *parent, const char *name)
+KDoubleNumInput::KDoubleNumInput(double value, TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(value, kMin(0.0, value), kMax(0.0, value), 0.01, 2 );
}
-KDoubleNumInput::KDoubleNumInput(KNumInput* below, double value, QWidget* parent,
+KDoubleNumInput::KDoubleNumInput(KNumInput* below, double value, TQWidget* parent,
const char* name)
: KNumInput(below, parent, name)
{
@@ -584,7 +584,7 @@ KDoubleNumInput::~KDoubleNumInput()
// ### remove when BIC changes are allowed again:
-bool KDoubleNumInput::eventFilter( QObject * o, QEvent * e ) {
+bool KDoubleNumInput::eventFilter( TQObject * o, TQEvent * e ) {
return KNumInput::eventFilter( o, e );
}
@@ -611,10 +611,10 @@ void KDoubleNumInput::init(double value, double lower, double upper,
d->spin = new KDoubleSpinBox( lower, upper, step, value, precision,
this, "KDoubleNumInput::d->spin" );
setFocusProxy(d->spin);
- connect( d->spin, SIGNAL(valueChanged(double)),
- this, SIGNAL(valueChanged(double)) );
- connect( this, SIGNAL(valueChanged(double)),
- this, SLOT(slotEmitRelativeValueChanged(double)) );
+ connect( d->spin, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SIGNAL(valueChanged(double)) );
+ connect( this, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotEmitRelativeValueChanged(double)) );
updateLegacyMembers();
@@ -653,7 +653,7 @@ void KDoubleNumInput::slotEmitRelativeValueChanged( double value )
emit relativeValueChanged( value / d->referencePoint );
}
-QSize KDoubleNumInput::minimumSizeHint() const
+TQSize KDoubleNumInput::minimumSizeHint() const
{
constPolish();
@@ -675,10 +675,10 @@ QSize KDoubleNumInput::minimumSizeHint() const
if(m_alignment & (AlignTop|AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
- return QSize(w, h);
+ return TQSize(w, h);
}
-void KDoubleNumInput::resizeEvent(QResizeEvent* e)
+void KDoubleNumInput::resizeEvent(TQResizeEvent* e)
{
int w = m_colw1;
int h = 0;
@@ -748,15 +748,15 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
{
if( m_slider ) {
// don't update the slider to avoid an endless recursion
- QSpinBox * spin = d->spin;
- disconnect(spin, SIGNAL(valueChanged(int)),
- m_slider, SLOT(setValue(int)) );
+ TQSpinBox * spin = d->spin;
+ disconnect(spin, TQT_SIGNAL(valueChanged(int)),
+ m_slider, TQT_SLOT(setValue(int)) );
}
d->spin->setRange( lower, upper, step, d->spin->precision() );
if(slider) {
// upcast to base type to get the min/maxValue in int form:
- QSpinBox * spin = d->spin;
+ TQSpinBox * spin = d->spin;
int slmax = spin->maxValue();
int slmin = spin->minValue();
int slvalue = spin->value();
@@ -766,15 +766,15 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
m_slider->setLineStep(slstep);
m_slider->setValue(slvalue);
} else {
- m_slider = new QSlider(slmin, slmax, slstep, slvalue,
- QSlider::Horizontal, this);
- m_slider->setTickmarks(QSlider::Below);
+ m_slider = new TQSlider(slmin, slmax, slstep, slvalue,
+ TQSlider::Horizontal, this);
+ m_slider->setTickmarks(TQSlider::Below);
// feedback line: when one moves, the other moves, too:
- connect(m_slider, SIGNAL(valueChanged(int)),
- SLOT(sliderMoved(int)) );
+ connect(m_slider, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(sliderMoved(int)) );
}
- connect(spin, SIGNAL(valueChanged(int)),
- m_slider, SLOT(setValue(int)) );
+ connect(spin, TQT_SIGNAL(valueChanged(int)),
+ m_slider, TQT_SLOT(setValue(int)) );
// calculate ( slmax - slmin ) / 10 without overflowing ints:
int major = calcDiffByTen( slmax, slmin );
if ( !major ) major = slstep; // ### needed?
@@ -826,24 +826,24 @@ double KDoubleNumInput::referencePoint() const
return d->referencePoint;
}
-QString KDoubleNumInput::suffix() const
+TQString KDoubleNumInput::suffix() const
{
return d->spin->suffix();
}
-QString KDoubleNumInput::prefix() const
+TQString KDoubleNumInput::prefix() const
{
return d->spin->prefix();
}
-void KDoubleNumInput::setSuffix(const QString &suffix)
+void KDoubleNumInput::setSuffix(const TQString &suffix)
{
d->spin->setSuffix( suffix );
layout(true);
}
-void KDoubleNumInput::setPrefix(const QString &prefix)
+void KDoubleNumInput::setPrefix(const TQString &prefix)
{
d->spin->setPrefix( prefix );
@@ -862,7 +862,7 @@ int KDoubleNumInput::precision() const
return d->spin->precision();
}
-void KDoubleNumInput::setSpecialValueText(const QString& text)
+void KDoubleNumInput::setSpecialValueText(const TQString& text)
{
d->spin->setSpecialValueText( text );
@@ -870,7 +870,7 @@ void KDoubleNumInput::setSpecialValueText(const QString& text)
updateLegacyMembers();
}
-void KDoubleNumInput::setLabel(const QString & label, int a)
+void KDoubleNumInput::setLabel(const TQString & label, int a)
{
KNumInput::setLabel(label, a);
@@ -888,17 +888,17 @@ public:
KDoubleSpinBoxValidator( double bottom, double top, int decimals, KDoubleSpinBox* sb, const char *name )
: KDoubleValidator( bottom, top, decimals, sb, name ), spinBox( sb ) { }
- virtual State validate( QString& str, int& pos ) const;
+ virtual State validate( TQString& str, int& pos ) const;
private:
KDoubleSpinBox *spinBox;
};
-QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) const
+TQValidator::State KDoubleSpinBoxValidator::validate( TQString& str, int& pos ) const
{
- QString pref = spinBox->prefix();
- QString suff = spinBox->suffix();
- QString suffStriped = suff.stripWhiteSpace();
+ TQString pref = spinBox->prefix();
+ TQString suff = spinBox->suffix();
+ TQString suffStriped = suff.stripWhiteSpace();
uint overhead = pref.length() + suff.length();
State state = Invalid;
@@ -911,7 +911,7 @@ QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) co
|| (stripedVersion = str.endsWith(suffStriped))) ) {
if ( stripedVersion )
overhead = pref.length() + suffStriped.length();
- QString core = str.mid( pref.length(), str.length() - overhead );
+ TQString core = str.mid( pref.length(), str.length() - overhead );
int corePos = pos - pref.length();
state = KDoubleValidator::validate( core, corePos );
pos = corePos + pref.length();
@@ -919,9 +919,9 @@ QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) co
} else {
state = KDoubleValidator::validate( str, pos );
if ( state == Invalid ) {
- // stripWhiteSpace(), cf. QSpinBox::interpretText()
- QString special = spinBox->specialValueText().stripWhiteSpace();
- QString candidate = str.stripWhiteSpace();
+ // stripWhiteSpace(), cf. TQSpinBox::interpretText()
+ TQString special = spinBox->specialValueText().stripWhiteSpace();
+ TQString candidate = str.stripWhiteSpace();
if ( special.startsWith(candidate) ) {
if ( candidate.length() == special.length() ) {
@@ -993,25 +993,25 @@ public:
KDoubleSpinBoxValidator * mValidator;
};
-KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name )
- : QSpinBox( parent, name )
+KDoubleSpinBox::KDoubleSpinBox( TQWidget * parent, const char * name )
+ : TQSpinBox( parent, name )
{
editor()->setAlignment( Qt::AlignRight );
d = new Private();
updateValidator();
- connect( this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)) );
+ connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) );
}
KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step,
double value, int precision,
- QWidget * parent, const char * name )
- : QSpinBox( parent, name )
+ TQWidget * parent, const char * name )
+ : TQSpinBox( parent, name )
{
editor()->setAlignment( Qt::AlignRight );
d = new Private();
setRange( lower, upper, step, precision );
setValue( value );
- connect( this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)) );
+ connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) );
}
KDoubleSpinBox::~KDoubleSpinBox() {
@@ -1123,12 +1123,12 @@ void KDoubleSpinBox::setLineStep( double step ) {
base::setLineStep( kMax( d->mapToInt( step, &ok ), 1 ) );
}
-QString KDoubleSpinBox::mapValueToText( int value ) {
+TQString KDoubleSpinBox::mapValueToText( int value ) {
if ( acceptLocalizedNumbers() )
return KGlobal::locale()
->formatNumber( d->mapToDouble( value ), d->mPrecision );
else
- return QString().setNum( d->mapToDouble( value ), 'f', d->mPrecision );
+ return TQString().setNum( d->mapToDouble( value ), 'f', d->mPrecision );
}
int KDoubleSpinBox::mapTextToValue( bool * ok ) {
@@ -1145,7 +1145,7 @@ int KDoubleSpinBox::mapTextToValue( bool * ok ) {
return d->mapToInt( value, ok );
}
-void KDoubleSpinBox::setValidator( const QValidator * ) {
+void KDoubleSpinBox::setValidator( const TQValidator * ) {
// silently discard the new validator. We don't want another one ;-)
}
diff --git a/kdeui/knuminput.h b/kdeui/knuminput.h
index 212e0e3cf..67263f900 100644
--- a/kdeui/knuminput.h
+++ b/kdeui/knuminput.h
@@ -27,8 +27,8 @@
#ifndef K_NUMINPUT_H
#define K_NUMINPUT_H
-#include <qwidget.h>
-#include <qspinbox.h>
+#include <tqwidget.h>
+#include <tqspinbox.h>
#include <kdelibs_export.h>
class QLabel;
@@ -49,28 +49,28 @@ class KIntSpinBox;
class KDEUI_EXPORT KNumInput : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString label READ label WRITE setLabel )
+ Q_PROPERTY( TQString label READ label WRITE setLabel )
public:
/**
* Default constructor
* @param parent If parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.
- * @param name The name is sent to the QObject constructor.
+ * @param name The name is sent to the TQObject constructor.
*/
- KNumInput(QWidget* parent=0, const char* name=0);
+ KNumInput(TQWidget* parent=0, const char* name=0);
/**
* @param below A pointer to another KNumInput.
* @param parent parent widget
* @param name name of the widget
*/
- KNumInput(KNumInput* below, QWidget* parent=0, const char* name=0);
+ KNumInput(KNumInput* below, TQWidget* parent=0, const char* name=0);
~KNumInput();
/**
* Sets the text and alignment of the main description label.
*
* @param label The text of the label.
- * Use QString::null to remove an existing one.
+ * Use TQString::null to remove an existing one.
*
* @param a one of @p AlignLeft, @p AlignHCenter, YAlignRight and
* @p AlignTop, @p AlignVCenter, @p AlignBottom.
@@ -84,12 +84,12 @@ public:
* @li @p AlignBottom The label is placed below the edit/slider
*
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
/**
* @return the text of the label.
*/
- QString label() const;
+ TQString label() const;
/**
* @return if the num input has a slider.
@@ -107,16 +107,16 @@ public:
/**
* Specifies that this widget may stretch horizontally, but is
- * fixed vertically (like QSpinBox itself).
+ * fixed vertically (like TQSpinBox itself).
*/
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
/**
* Returns a size which fits the contents of the control.
*
* @return the preferred size necessary to show the control
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
/**
@@ -139,9 +139,9 @@ protected:
KNumInput* m_prev, *m_next;
int m_colw1, m_colw2;
- QLabel* m_label;
- QSlider* m_slider;
- QSize m_sizeSlider, m_sizeLabel;
+ TQLabel* m_label;
+ TQSlider* m_slider;
+ TQSize m_sizeSlider, m_sizeLabel;
int m_alignment;
@@ -160,7 +160,7 @@ private:
/**
* @short An input widget for integer numbers, consisting of a spinbox and a slider.
*
- * KIntNumInput combines a QSpinBox and optionally a QSlider
+ * KIntNumInput combines a TQSpinBox and optionally a QSlider
* with a label to make an easy to use control for setting some integer
* parameter. This is especially nice for configuration dialogs,
* which can have many such combinated controls.
@@ -172,7 +172,7 @@ private:
* A special feature of KIntNumInput, designed specifically for
* the situation when there are several KIntNumInputs in a column,
* is that you can specify what portion of the control is taken by the
- * QSpinBox (the remaining portion is used by the slider). This makes
+ * TQSpinBox (the remaining portion is used by the slider). This makes
* it very simple to have all the sliders in a column be the same size.
*
* It uses KIntValidator validator class. KIntNumInput enforces the
@@ -192,19 +192,19 @@ class KDEUI_EXPORT KIntNumInput : public KNumInput
Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
Q_PROPERTY( int referencePoint READ referencePoint WRITE setReferencePoint )
Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue )
- Q_PROPERTY( QString suffix READ suffix WRITE setSuffix )
- Q_PROPERTY( QString prefix READ prefix WRITE setPrefix )
- Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText )
+ Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
+ Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
+ Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
public:
/**
* Constructs an input control for integer values
* with base 10 and initial value 0.
*/
- KIntNumInput(QWidget *parent=0, const char *name=0);
+ KIntNumInput(TQWidget *parent=0, const char *name=0);
/**
* Constructor
- * It constructs a QSpinBox that allows the input of integer numbers
+ * It constructs a TQSpinBox that allows the input of integer numbers
* in the range of -INT_MAX to +INT_MAX. To set a descriptive label,
* use setLabel(). To enforce the value being in a range and optionally to
* attach a slider to it, use setRange().
@@ -214,7 +214,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KIntNumInput(int value, QWidget* parent=0, int base = 10, const char *name=0);
+ KIntNumInput(int value, TQWidget* parent=0, int base = 10, const char *name=0);
/**
* Constructor
@@ -233,7 +233,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KIntNumInput(KNumInput* below, int value, QWidget* parent=0, int base = 10, const char *name=0);
+ KIntNumInput(KNumInput* below, int value, TQWidget* parent=0, int base = 10, const char *name=0);
/**
* Destructor
@@ -263,17 +263,17 @@ public:
* @return the suffix displayed behind the value.
* @see setSuffix()
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* @return the prefix displayed in front of the value.
* @see setPrefix()
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* @return the string displayed for a special value.
* @see setSpecialValueText()
*/
- QString specialValueText() const;
+ TQString specialValueText() const;
/**
* @param min minimum value
@@ -305,9 +305,9 @@ public:
* value is equal to minVal(). Typically this is used for indicating
* that the choice has a special (default) meaning.
*/
- void setSpecialValueText(const QString& text);
+ void setSpecialValueText(const TQString& text);
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
/**
* This method returns the minimum size necessary to display the
@@ -316,7 +316,7 @@ public:
*
* @return the minimum size necessary to show the control
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
/**
@@ -338,23 +338,23 @@ public slots:
/**
* Sets the suffix to @p suffix.
- * Use QString::null to disable this feature.
+ * Use TQString::null to disable this feature.
* Formatting has to be provided (e.g. a space separator between the
* prepended @p value and the suffix's text has to be provided
* as the first character in the suffix).
*
- * @see QSpinBox::setSuffix(), #setPrefix()
+ * @see TQSpinBox::setSuffix(), #setPrefix()
*/
- void setSuffix(const QString &suffix);
+ void setSuffix(const TQString &suffix);
/**
* Sets the prefix to @p prefix.
- * Use QString::null to disable this feature.
+ * Use TQString::null to disable this feature.
* Formatting has to be provided (see above).
*
- * @see QSpinBox::setPrefix(), #setSuffix()
+ * @see TQSpinBox::setPrefix(), #setSuffix()
*/
- void setPrefix(const QString &prefix);
+ void setPrefix(const TQString &prefix);
/**
* sets focus to the edit widget and marks all text in if mark == true
@@ -382,10 +382,10 @@ private slots:
protected:
virtual void doLayout();
- void resizeEvent ( QResizeEvent * );
+ void resizeEvent ( TQResizeEvent * );
KIntSpinBox* m_spin;
- QSize m_sizeSpin;
+ TQSize m_sizeSpin;
private:
void init(int value, int _base);
@@ -405,7 +405,7 @@ class KDoubleLine;
/**
* @short An input control for real numbers, consisting of a spinbox and a slider.
*
- * KDoubleNumInput combines a QSpinBox and optionally a QSlider
+ * KDoubleNumInput combines a TQSpinBox and optionally a QSlider
* with a label to make an easy to use control for setting some float
* parameter. This is especially nice for configuration dialogs,
* which can have many such combinated controls.
@@ -417,7 +417,7 @@ class KDoubleLine;
* A special feature of KDoubleNumInput, designed specifically for
* the situation when there are several instances in a column,
* is that you can specify what portion of the control is taken by the
- * QSpinBox (the remaining portion is used by the slider). This makes
+ * TQSpinBox (the remaining portion is used by the slider). This makes
* it very simple to have all the sliders in a column be the same size.
*
* It uses the KDoubleValidator validator class. KDoubleNumInput
@@ -435,9 +435,9 @@ class KDEUI_EXPORT KDoubleNumInput : public KNumInput
Q_PROPERTY( double value READ value WRITE setValue )
Q_PROPERTY( double minValue READ minValue WRITE setMinValue )
Q_PROPERTY( double maxValue READ maxValue WRITE setMaxValue )
- Q_PROPERTY( QString suffix READ suffix WRITE setSuffix )
- Q_PROPERTY( QString prefix READ prefix WRITE setPrefix )
- Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText )
+ Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
+ Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
+ Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
Q_PROPERTY( int precision READ precision WRITE setPrecision )
Q_PROPERTY( double referencePoint READ referencePoint WRITE setReferencePoint )
Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue )
@@ -447,7 +447,7 @@ public:
* Constructs an input control for double values
* with initial value 0.00.
*/
- KDoubleNumInput(QWidget *parent=0, const char *name=0);
+ KDoubleNumInput(TQWidget *parent=0, const char *name=0);
/**
* @deprecated (value is rounded to a multiple of 1/100)
@@ -457,7 +457,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KDoubleNumInput(double value, QWidget *parent=0, const char *name=0) KDE_DEPRECATED;
+ KDoubleNumInput(double value, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED;
/**
* Constructor
@@ -472,7 +472,7 @@ public:
* @since 3.1
*/
KDoubleNumInput(double lower, double upper, double value, double step=0.01,
- int precision=2, QWidget *parent=0, const char *name=0);
+ int precision=2, TQWidget *parent=0, const char *name=0);
/**
* destructor
@@ -490,7 +490,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
**/
- KDoubleNumInput(KNumInput* below, double value, QWidget* parent=0, const char* name=0) KDE_DEPRECATED;
+ KDoubleNumInput(KNumInput* below, double value, TQWidget* parent=0, const char* name=0) KDE_DEPRECATED;
/**
* Constructor
@@ -515,7 +515,7 @@ public:
*/
KDoubleNumInput(KNumInput* below,
double lower, double upper, double value, double step=0.02,
- int precision=2, QWidget *parent=0, const char *name=0);
+ int precision=2, TQWidget *parent=0, const char *name=0);
/**
* @return the current value.
@@ -526,13 +526,13 @@ public:
* @return the suffix.
* @see setSuffix()
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* @return the prefix.
* @see setPrefix()
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* @return the precision.
@@ -544,7 +544,7 @@ public:
* @return the string displayed for a special value.
* @see setSpecialValueText()
*/
- QString specialValueText() const { return m_specialvalue; }
+ TQString specialValueText() const { return m_specialvalue; }
/**
* @param min minimum value
@@ -593,11 +593,11 @@ public:
* value is equal to minVal(). Typically this is used for indicating
* that the choice has a special (default) meaning.
*/
- void setSpecialValueText(const QString& text);
+ void setSpecialValueText(const TQString& text);
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
- virtual QSize minimumSizeHint() const;
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
+ virtual TQSize minimumSizeHint() const;
+ virtual bool eventFilter(TQObject*, TQEvent*);
public slots:
/**
@@ -620,21 +620,21 @@ public slots:
void setReferencePoint(double ref);
/**
- * Sets the suffix to be displayed to @p suffix. Use QString::null to disable
+ * Sets the suffix to be displayed to @p suffix. Use TQString::null to disable
* this feature. Note that the suffix is attached to the value without any
* spacing. So if you prefer to display a space separator, set suffix
* to something like " cm".
* @see setSuffix()
*/
- void setSuffix(const QString &suffix);
+ void setSuffix(const TQString &suffix);
/**
- * Sets the prefix to be displayed to @p prefix. Use QString::null to disable
+ * Sets the prefix to be displayed to @p prefix. Use TQString::null to disable
* this feature. Note that the prefix is attached to the value without any
* spacing.
* @see setPrefix()
*/
- void setPrefix(const QString &prefix);
+ void setPrefix(const TQString &prefix);
signals:
/**
@@ -657,7 +657,7 @@ private slots:
protected:
virtual void doLayout();
- void resizeEvent ( QResizeEvent * );
+ void resizeEvent ( TQResizeEvent * );
virtual void resetEditBox();
@@ -668,7 +668,7 @@ protected:
double m_lower, m_upper, m_step;
// ### end no longer used
- QSize m_sizeEdit;
+ TQSize m_sizeEdit;
friend class KDoubleLine;
private:
@@ -677,7 +677,7 @@ private:
double mapSliderToSpin(int) const;
void updateLegacyMembers();
// ### no longer used, remove when BIC allowed:
- QString m_specialvalue, m_prefix, m_suffix;
+ TQString m_specialvalue, m_prefix, m_suffix;
double m_value;
short m_precision;
// ### end remove when BIC allowed
@@ -693,9 +693,9 @@ private:
/* ------------------------------------------------------------------------ */
/**
- * @short A QSpinBox with support for arbitrary base numbers.
+ * @short A TQSpinBox with support for arbitrary base numbers.
*
- * A QSpinBox with support for arbitrary base numbers
+ * A TQSpinBox with support for arbitrary base numbers
* (e.g. hexadecimal).
*
* The class provides an easy interface to use other
@@ -715,7 +715,7 @@ public:
* and a slider, with minimal value 0, maximal value 99, step 1, base 10
* and initial value 0.
*/
- KIntSpinBox( QWidget *parent=0, const char *name=0);
+ KIntSpinBox( TQWidget *parent=0, const char *name=0);
/**
* Constructor.
@@ -732,7 +732,7 @@ public:
* @param name The Name of the widget.
*/
KIntSpinBox(int lower, int upper, int step, int value, int base = 10,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/**
* Destructor.
@@ -759,7 +759,7 @@ protected:
* Overloaded the method in QSpinBox
* to make use of the base given in the constructor.
*/
- virtual QString mapValueToText(int);
+ virtual TQString mapValueToText(int);
/**
* Overloaded the method in QSpinBox
@@ -831,7 +831,7 @@ private:
@since 3.1
**/
-class KDEUI_EXPORT KDoubleSpinBox : public QSpinBox {
+class KDEUI_EXPORT KDoubleSpinBox : public TQSpinBox {
Q_OBJECT
Q_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
Q_OVERRIDE( double maxValue READ maxValue WRITE setMaxValue )
@@ -844,13 +844,13 @@ public:
/** Constructs a KDoubleSpinBox with parent @p parent and
default values for range and value (whatever QRangeControl
uses) and precision (2). */
- KDoubleSpinBox( QWidget * parent=0, const char * name=0 );
+ KDoubleSpinBox( TQWidget * parent=0, const char * name=0 );
/** Constructs a KDoubleSpinBox with parent @p parent, range
[ @p lower, @p upper ], lineStep @p step, precision @p
precision and initial value @p value. */
KDoubleSpinBox( double lower, double upper, double step, double value,
- int precision=2, QWidget * parent=0, const char * name=0 );
+ int precision=2, TQWidget * parent=0, const char * name=0 );
virtual ~KDoubleSpinBox();
@@ -924,10 +924,10 @@ public:
void setLineStep( double step );
/** Overridden to ignore any setValidator() calls. */
- void setValidator( const QValidator * );
+ void setValidator( const TQValidator * );
signals:
- /** Emitted whenever QSpinBox::valueChanged( int ) is emitted. */
+ /** Emitted whenever TQSpinBox::valueChanged( int ) is emitted. */
void valueChanged( double value );
public slots:
@@ -937,7 +937,7 @@ public slots:
virtual void setValue( double value );
protected:
- virtual QString mapValueToText(int);
+ virtual TQString mapValueToText(int);
virtual int mapTextToValue(bool*);
protected slots:
@@ -946,7 +946,7 @@ protected slots:
protected:
virtual void virtual_hook( int id, void* data );
private:
- typedef QSpinBox base;
+ typedef TQSpinBox base;
void updateValidator();
int maxPrecision() const;
diff --git a/kdeui/knumvalidator.cpp b/kdeui/knumvalidator.cpp
index 890fb76a0..436f95431 100644
--- a/kdeui/knumvalidator.cpp
+++ b/kdeui/knumvalidator.cpp
@@ -22,8 +22,8 @@
**
*****************************************************************************/
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include "knumvalidator.h"
#include <klocale.h>
@@ -34,8 +34,8 @@
// Implementation of KIntValidator
//
-KIntValidator::KIntValidator ( QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+KIntValidator::KIntValidator ( TQWidget * parent, int base, const char * name )
+ : TQValidator(parent, name)
{
_base = base;
if (_base < 2) _base = 2;
@@ -44,8 +44,8 @@ KIntValidator::KIntValidator ( QWidget * parent, int base, const char * name )
_min = _max = 0;
}
-KIntValidator::KIntValidator ( int bottom, int top, QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+KIntValidator::KIntValidator ( int bottom, int top, TQWidget * parent, int base, const char * name )
+ : TQValidator(parent, name)
{
_base = base;
if (_base > 36) _base = 36;
@@ -57,21 +57,21 @@ KIntValidator::KIntValidator ( int bottom, int top, QWidget * parent, int base,
KIntValidator::~KIntValidator ()
{}
-QValidator::State KIntValidator::validate ( QString &str, int & ) const
+TQValidator::State KIntValidator::validate ( TQString &str, int & ) const
{
bool ok;
int val = 0;
- QString newStr;
+ TQString newStr;
newStr = str.stripWhiteSpace();
if (_base > 10)
newStr = newStr.upper();
- if (newStr == QString::fromLatin1("-")) // a special case
+ if (newStr == TQString::fromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
else if (newStr.length())
val = newStr.toInt(&ok, _base);
else {
@@ -80,26 +80,26 @@ QValidator::State KIntValidator::validate ( QString &str, int & ) const
}
if (! ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if ((! _min && ! _max) || (val >= _min && val <= _max))
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
if (_max && _min >= 0 && val < 0)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
- return QValidator::Valid;
+ return TQValidator::Valid;
}
-void KIntValidator::fixup ( QString &str ) const
+void KIntValidator::fixup ( TQString &str ) const
{
int dummy;
int val;
- QValidator::State state;
+ TQValidator::State state;
state = validate(str, dummy);
- if (state == QValidator::Invalid || state == QValidator::Acceptable)
+ if (state == TQValidator::Invalid || state == TQValidator::Acceptable)
return;
if (! _min && ! _max)
@@ -161,16 +161,16 @@ public:
};
-KFloatValidator::KFloatValidator ( QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers=false;
_min = _max = 0;
}
-KFloatValidator::KFloatValidator ( double bottom, double top, QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers=false;
@@ -178,8 +178,8 @@ KFloatValidator::KFloatValidator ( double bottom, double top, QWidget * parent,
_max = top;
}
-KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers = localeAware;
@@ -202,20 +202,20 @@ bool KFloatValidator::acceptLocalizedNumbers() const
return d->acceptLocalizedNumbers;
}
-QValidator::State KFloatValidator::validate ( QString &str, int & ) const
+TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const
{
bool ok;
double val = 0;
- QString newStr;
+ TQString newStr;
newStr = str.stripWhiteSpace();
- if (newStr == QString::fromLatin1("-")) // a special case
+ if (newStr == TQString::fromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
- return QValidator::Acceptable;
- else if (newStr == QString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
+ else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
+ return TQValidator::Acceptable;
else if (newStr.length())
{
val = newStr.toDouble(&ok);
@@ -228,29 +228,29 @@ QValidator::State KFloatValidator::validate ( QString &str, int & ) const
}
if (! ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if (( !_min && !_max) || (val >= _min && val <= _max))
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
if (_max && _min >= 0 && val < 0)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if ( (_min || _max) && (val < _min || val > _max))
- return QValidator::Invalid;
+ return TQValidator::Invalid;
- return QValidator::Valid;
+ return TQValidator::Valid;
}
-void KFloatValidator::fixup ( QString &str ) const
+void KFloatValidator::fixup ( TQString &str ) const
{
int dummy;
double val;
- QValidator::State state;
+ TQValidator::State state;
state = validate(str, dummy);
- if (state == QValidator::Invalid || state == QValidator::Acceptable)
+ if (state == TQValidator::Invalid || state == TQValidator::Acceptable)
return;
if (! _min && ! _max)
@@ -297,15 +297,15 @@ public:
bool acceptLocalizedNumbers;
};
-KDoubleValidator::KDoubleValidator( QObject * parent, const char * name )
- : QDoubleValidator( parent, name ), d( 0 )
+KDoubleValidator::KDoubleValidator( TQObject * parent, const char * name )
+ : TQDoubleValidator( parent, name ), d( 0 )
{
d = new Private();
}
KDoubleValidator::KDoubleValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name )
- : QDoubleValidator( bottom, top, decimals, parent, name ), d( 0 )
+ TQObject * parent, const char * name )
+ : TQDoubleValidator( bottom, top, decimals, parent, name ), d( 0 )
{
d = new Private();
}
@@ -323,8 +323,8 @@ void KDoubleValidator::setAcceptLocalizedNumbers( bool accept ) {
d->acceptLocalizedNumbers = accept;
}
-QValidator::State KDoubleValidator::validate( QString & input, int & p ) const {
- QString s = input;
+TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const {
+ TQString s = input;
if ( acceptLocalizedNumbers() ) {
KLocale * l = KGlobal::locale();
// ok, we have to re-format the number to have:
@@ -333,7 +333,7 @@ QValidator::State KDoubleValidator::validate( QString & input, int & p ) const {
// 3. positiveSign == <empty>
// 4. thousandsSeparator() == <empty> (we don't check that there
// are exactly three decimals between each separator):
- QString d = l->decimalSymbol(),
+ TQString d = l->decimalSymbol(),
n = l->negativeSign(),
p = l->positiveSign(),
t = l->thousandsSeparator();
diff --git a/kdeui/knumvalidator.h b/kdeui/knumvalidator.h
index 114a82d57..55711fadb 100644
--- a/kdeui/knumvalidator.h
+++ b/kdeui/knumvalidator.h
@@ -24,7 +24,7 @@
#ifndef __KNUMVALIDATOR_H
#define __KNUMVALIDATOR_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kdelibs_export.h>
@@ -32,26 +32,26 @@ class QWidget;
class QString;
/**
- * QValidator for integers.
+ * TQValidator for integers.
- This can be used by QLineEdit or subclass to provide validated
+ This can be used by TQLineEdit or subclass to provide validated
text entry. Can be provided with a base value (default is 10), to allow
the proper entry of hexadecimal, octal, or any other base numeric data.
@author Glen Parker <glenebob@nwlink.com>
@version 0.0.1
*/
-class KDEUI_EXPORT KIntValidator : public QValidator {
+class KDEUI_EXPORT KIntValidator : public TQValidator {
public:
/**
Constuctor. Also sets the base value.
*/
- KIntValidator ( QWidget * parent, int base = 10, const char * name = 0 );
+ KIntValidator ( TQWidget * parent, int base = 10, const char * name = 0 );
/**
* Constructor. Also sets the minimum, maximum, and numeric base values.
*/
- KIntValidator ( int bottom, int top, QWidget * parent, int base = 10, const char * name = 0 );
+ KIntValidator ( int bottom, int top, TQWidget * parent, int base = 10, const char * name = 0 );
/**
* Destructs the validator.
*/
@@ -59,11 +59,11 @@ class KDEUI_EXPORT KIntValidator : public QValidator {
/**
* Validates the text, and return the result. Does not modify the parameters.
*/
- virtual State validate ( QString &, int & ) const;
+ virtual State validate ( TQString &, int & ) const;
/**
* Fixes the text if possible, providing a valid string. The parameter may be modified.
*/
- virtual void fixup ( QString & ) const;
+ virtual void fixup ( TQString & ) const;
/**
* Sets the minimum and maximum values allowed.
*/
@@ -95,32 +95,32 @@ class KDEUI_EXPORT KIntValidator : public QValidator {
class KFloatValidatorPrivate;
/**
- \brief QValidator for floating point entry (Obsolete)
+ \brief TQValidator for floating point entry (Obsolete)
@obsolete Use KDoubleValidator
- Extends the QValidator class to properly validate double numeric data.
- This can be used by QLineEdit or subclass to provide validated
+ Extends the TQValidator class to properly validate double numeric data.
+ This can be used by TQLineEdit or subclass to provide validated
text entry.
@author Glen Parker <glenebob@nwlink.com>
@version 0.0.1
*/
-class KDEUI_EXPORT KFloatValidator : public QValidator {
+class KDEUI_EXPORT KFloatValidator : public TQValidator {
public:
/**
* Constructor.
*/
- KFloatValidator ( QWidget * parent, const char * name = 0 );
+ KFloatValidator ( TQWidget * parent, const char * name = 0 );
/**
* Constructor. Also sets the minimum and maximum values.
*/
- KFloatValidator ( double bottom, double top, QWidget * parent, const char * name = 0 );
+ KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name = 0 );
/**
* Constructor. Sets the validator to be locale aware if @p localeAware is true.
*/
- KFloatValidator ( double bottom, double top, bool localeAware, QWidget * parent, const char * name = 0 );
+ KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name = 0 );
/**
* Destructs the validator.
*/
@@ -128,11 +128,11 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
/**
* Validates the text, and return the result. Does not modify the parameters.
*/
- virtual State validate ( QString &, int & ) const;
+ virtual State validate ( TQString &, int & ) const;
/**
* Fixes the text if possible, providing a valid string. The parameter may be modified.
*/
- virtual void fixup ( QString & ) const;
+ virtual void fixup ( TQString & ) const;
/**
* Sets the minimum and maximum value allowed.
*/
@@ -167,7 +167,7 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
/**
@short A locale-aware QDoubleValidator
- KDoubleValidator extends QDoubleValidator to be
+ KDoubleValidator extends TQDoubleValidator to be
locale-aware. That means that - subject to not being disabled -
KLocale::decimalSymbol(), KLocale::thousandsSeparator()
and KLocale::positiveSign() and KLocale::negativeSign()
@@ -178,25 +178,25 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
@since 3.1
**/
-class KDEUI_EXPORT KDoubleValidator : public QDoubleValidator {
+class KDEUI_EXPORT KDoubleValidator : public TQDoubleValidator {
Q_OBJECT
Q_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
public:
/** Constuct a locale-aware KDoubleValidator with default range
- (whatever QDoubleValidator uses for that) and parent @p
+ (whatever TQDoubleValidator uses for that) and parent @p
parent */
- KDoubleValidator( QObject * parent, const char * name=0 );
+ KDoubleValidator( TQObject * parent, const char * name=0 );
/** Constuct a locale-aware KDoubleValidator for range [@p bottom,@p
top] and a precision of @p decimals decimals after the decimal
point. */
KDoubleValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name=0 );
+ TQObject * parent, const char * name=0 );
/** Destructs the validator.
*/
virtual ~KDoubleValidator();
/** Overloaded for internal reasons. The API is not affected. */
- virtual QValidator::State validate( QString & input, int & pos ) const;
+ virtual TQValidator::State validate( TQString & input, int & pos ) const;
/** @return whether localized numbers are accepted (default: true) */
bool acceptLocalizedNumbers() const;
@@ -204,7 +204,7 @@ public:
void setAcceptLocalizedNumbers( bool accept );
private:
- typedef QDoubleValidator base;
+ typedef TQDoubleValidator base;
class Private;
Private * d;
};
diff --git a/kdeui/kpanelapplet.cpp b/kdeui/kpanelapplet.cpp
index 1536e974d..817d9de60 100644
--- a/kdeui/kpanelapplet.cpp
+++ b/kdeui/kpanelapplet.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kpanelapplet.h"
#include "kpanelapplet.moc"
@@ -36,15 +36,15 @@ public:
hasFocus(false)
{}
- const QPopupMenu* customMenu;
+ const TQPopupMenu* customMenu;
KSharedConfig::Ptr sharedConfig;
- QPtrList<QObject> watchedForFocus;
+ TQPtrList<TQObject> watchedForFocus;
bool hasFocus;
};
-KPanelApplet::KPanelApplet(const QString& configFile, Type type,
- int actions, QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f)
+KPanelApplet::KPanelApplet(const TQString& configFile, Type type,
+ int actions, TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f)
, _type(type)
, _position( pBottom )
, _alignment( LeftTop )
@@ -53,7 +53,7 @@ KPanelApplet::KPanelApplet(const QString& configFile, Type type,
, d(new KPanelApplet::KPanelAppletPrivate())
{
setFrameStyle(NoFrame);
- QPalette pal(palette());
+ TQPalette pal(palette());
if(pal.active().mid() != pal.inactive().mid()){
pal.setInactive(pal.active());
setPalette(pal);
@@ -89,7 +89,7 @@ void KPanelApplet::setAlignment( Alignment a )
void KPanelApplet::positionChange( Position )
{
orientationChange( orientation() );
- QResizeEvent e( size(), size() );
+ TQResizeEvent e( size(), size() );
resizeEvent( &e );
popupDirectionChange( popupDirection() );
}
@@ -127,17 +127,17 @@ void KPanelApplet::action( Action a )
reportBug();
}
-const QPopupMenu* KPanelApplet::customMenu() const
+const TQPopupMenu* KPanelApplet::customMenu() const
{
return d->customMenu;
}
-void KPanelApplet::setCustomMenu(const QPopupMenu* menu)
+void KPanelApplet::setCustomMenu(const TQPopupMenu* menu)
{
d->customMenu = menu;
}
-void KPanelApplet::watchForFocus(QWidget* widget, bool watch)
+void KPanelApplet::watchForFocus(TQWidget* widget, bool watch)
{
if (!widget)
{
@@ -170,22 +170,22 @@ void KPanelApplet::needsFocus(bool focus)
emit requestFocus(focus);
}
-bool KPanelApplet::eventFilter(QObject *o, QEvent * e)
+bool KPanelApplet::eventFilter(TQObject *o, TQEvent * e)
{
if (d->watchedForFocus.find(o) != -1)
{
- if (e->type() == QEvent::MouseButtonRelease ||
- e->type() == QEvent::FocusIn)
+ if (e->type() == TQEvent::MouseButtonRelease ||
+ e->type() == TQEvent::FocusIn)
{
needsFocus(true);
}
- else if (e->type() == QEvent::FocusOut)
+ else if (e->type() == TQEvent::FocusOut)
{
needsFocus(false);
}
}
- return QFrame::eventFilter(o, e);
+ return TQFrame::eventFilter(o, e);
}
KSharedConfig::Ptr KPanelApplet::sharedConfig() const
diff --git a/kdeui/kpanelapplet.h b/kdeui/kpanelapplet.h
index a43e598f2..54fdef89b 100644
--- a/kdeui/kpanelapplet.h
+++ b/kdeui/kpanelapplet.h
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __kpanelapplet_h__
#define __kpanelapplet_h__
-#include <qframe.h>
+#include <tqframe.h>
#include <kconfig.h>
class KConfig;
@@ -78,7 +78,7 @@ class QPopupMenu;
*
* extern "C"
* {
- * KPanelApplet* init(QWidget *parent, const QString& configFile)
+ * KPanelApplet* init(TQWidget *parent, const TQString& configFile)
* {
* KGlobal::locale()->insertCatalogue("exampleapplet");
* return new ExampleApplet(configFile, KPanelApplet::Normal,
@@ -124,8 +124,8 @@ public:
* @param name A Qt object name for your applet.
* @param f Window control flags
**/
- KPanelApplet(const QString& configFile, Type t = Normal,
- int actions = 0, QWidget *parent = 0, const char *name = 0,
+ KPanelApplet(const TQString& configFile, Type t = Normal,
+ int actions = 0, TQWidget *parent = 0, const char *name = 0,
WFlags f = 0);
/**
@@ -213,9 +213,9 @@ public:
/**
* @return the applet's custom menu, usually the same as the context menu, or 0 if none
- * see setCustomMenu(QPopupMenu*)
+ * see setCustomMenu(TQPopupMenu*)
*/
- const QPopupMenu* customMenu() const;
+ const TQPopupMenu* customMenu() const;
/**
* @internal
@@ -335,7 +335,7 @@ protected:
* If the menu is deleted during the life of the applet, be sure to call this method again
* with the new menu (or 0) to avoid crashes
*/
- void setCustomMenu(const QPopupMenu*);
+ void setCustomMenu(const TQPopupMenu*);
/**
* Register widgets that can receive keyboard focus with this this method
@@ -344,7 +344,7 @@ protected:
* @param watch whether to start watching the widget, or to stop doing so
* @since 3.4
*/
- void watchForFocus(QWidget* widget, bool watch = true);
+ void watchForFocus(TQWidget* widget, bool watch = true);
/**
* Call this whenever focus is needed or not needed. You do not have to call this method
@@ -378,7 +378,7 @@ protected:
// FIXME: Remove for KDE 4
virtual KDE_DEPRECATED void popupDirectionChange( Direction /*direction*/ ) {}
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
private:
Type _type;
diff --git a/kdeui/kpanelappmenu.cpp b/kdeui/kpanelappmenu.cpp
index dd9f01120..68783a339 100644
--- a/kdeui/kpanelappmenu.cpp
+++ b/kdeui/kpanelappmenu.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "kpanelappmenu.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopclient.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -35,111 +35,111 @@ static int panelmenu_get_seq_id()
}
-KPanelAppMenu::KPanelAppMenu(const QString &title, QObject *parent,
+KPanelAppMenu::KPanelAppMenu(const TQString &title, TQObject *parent,
const char *name)
- : QObject(parent, name), DCOPObject()
+ : TQObject(parent, name), DCOPObject()
{
- init(QString::null, title);
+ init(TQString::null, title);
}
-KPanelAppMenu::KPanelAppMenu(const QPixmap &icon, const QString &title,
- QObject *parent, const char *name)
-: QObject(parent, name), DCOPObject()
+KPanelAppMenu::KPanelAppMenu(const TQPixmap &icon, const TQString &title,
+ TQObject *parent, const char *name)
+: TQObject(parent, name), DCOPObject()
{
init(icon, title);
}
-KPanelAppMenu::KPanelAppMenu(QObject *parent, const char *name)
- : QObject(parent, name), DCOPObject(name)
+KPanelAppMenu::KPanelAppMenu(TQObject *parent, const char *name)
+ : TQObject(parent, name), DCOPObject(name)
{
realObjId = name;
}
-void KPanelAppMenu::init(const QPixmap &icon, const QString &title)
+void KPanelAppMenu::init(const TQPixmap &icon, const TQString &title)
{
DCOPClient *client = kapp->dcopClient();
if(!client->isAttached())
client->attach();
- QByteArray sendData, replyData;
- QCString replyType;
+ TQByteArray sendData, replyData;
+ TQCString replyType;
{
- QDataStream stream(sendData, IO_WriteOnly);
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << title;
- if ( client->call("kicker", "kickerMenuManager", "createMenu(QPixmap,QString)", sendData, replyType, replyData ) ) {
- if (replyType != "QCString")
+ if ( client->call("kicker", "kickerMenuManager", "createMenu(TQPixmap,TQString)", sendData, replyType, replyData ) ) {
+ if (replyType != "TQCString")
kdDebug() << "error! replyType for createMenu should be QCstring in KPanelAppMenu::init" << endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> realObjId;
}
}
}
{
- QDataStream stream(sendData, IO_WriteOnly);
- stream << QCString("activated(int)") << client->appId() << objId();
- client->send("kicker", realObjId, "connectDCOPSignal(QCString,QCString,QCString)", sendData);
+ TQDataStream stream(sendData, IO_WriteOnly);
+ stream << TQCString("activated(int)") << client->appId() << objId();
+ client->send("kicker", realObjId, "connectDCOPSignal(TQCString,TQCString,TQCString)", sendData);
}
}
KPanelAppMenu::~KPanelAppMenu()
{
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << realObjId;
client->send("kicker", "kickerMenuManager", "removeMenu", sendData );
}
-int KPanelAppMenu::insertItem(const QPixmap &icon, const QString &text, int id )
+int KPanelAppMenu::insertItem(const TQPixmap &icon, const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << text << id;
- client->send("kicker", realObjId, "insertItem(QPixmap,QString,int)", sendData );
+ client->send("kicker", realObjId, "insertItem(TQPixmap,TQString,int)", sendData );
return id;
}
-KPanelAppMenu *KPanelAppMenu::insertMenu(const QPixmap &icon, const QString &text, int id )
+KPanelAppMenu *KPanelAppMenu::insertMenu(const TQPixmap &icon, const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData, replyData;
- QCString replyType;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData, replyData;
+ TQCString replyType;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << text << id;
- client->call("kicker", realObjId, "insertMenu(QPixmap,QString,int)", sendData, replyType, replyData );
- if ( replyType != "QCString")
+ client->call("kicker", realObjId, "insertMenu(TQPixmap,TQString,int)", sendData, replyType, replyData );
+ if ( replyType != "TQCString")
return 0;
- QDataStream ret(replyData, IO_ReadOnly);
- QCString subid;
+ TQDataStream ret(replyData, IO_ReadOnly);
+ TQCString subid;
ret >> subid;
- QByteArray sendData2;
- QDataStream stream2(sendData2, IO_WriteOnly);
- stream2 << QCString("activated(int)") << client->appId() << subid;
- client->send("kicker", subid, "connectDCOPSignal(QCString,QCString,QCString)", sendData2);
+ TQByteArray sendData2;
+ TQDataStream stream2(sendData2, IO_WriteOnly);
+ stream2 << TQCString("activated(int)") << client->appId() << subid;
+ client->send("kicker", subid, "connectDCOPSignal(TQCString,TQCString,TQCString)", sendData2);
return new KPanelAppMenu(this, subid);
}
-int KPanelAppMenu::insertItem(const QString &text, int id )
+int KPanelAppMenu::insertItem(const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << text << id;
- client->send("kicker", realObjId, "insertItem(QString,int)", sendData );
+ client->send("kicker", realObjId, "insertItem(TQString,int)", sendData );
return id;
}
@@ -147,16 +147,16 @@ int KPanelAppMenu::insertItem(const QString &text, int id )
void KPanelAppMenu::clear()
{
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
+ TQByteArray sendData;
client->send("kicker", realObjId, "clear()", sendData);
}
-bool KPanelAppMenu::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &)
+bool KPanelAppMenu::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &)
{
if ( fun == "activated(int)" ) {
- QDataStream dataStream( data, IO_ReadOnly );
+ TQDataStream dataStream( data, IO_ReadOnly );
int id;
dataStream >> id;
emit activated( id );
diff --git a/kdeui/kpanelappmenu.h b/kdeui/kpanelappmenu.h
index 2cb9adc1f..8df6c613b 100644
--- a/kdeui/kpanelappmenu.h
+++ b/kdeui/kpanelappmenu.h
@@ -34,23 +34,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author Daniel M. Duley <mosfet@kde.org>
*/
-class KDEUI_EXPORT KPanelAppMenu : public QObject, public DCOPObject
+class KDEUI_EXPORT KPanelAppMenu : public TQObject, public DCOPObject
{
Q_OBJECT
public:
/**
* Constructs a new menu with the given title.
*/
- KPanelAppMenu(const QString &title, QObject *parent = 0, const char *name = 0 );
+ KPanelAppMenu(const TQString &title, TQObject *parent = 0, const char *name = 0 );
/**
* Same as above, but with an icon for the submenu item.
*/
- KPanelAppMenu(const QPixmap &icon, const QString &title, QObject *parent,
+ KPanelAppMenu(const TQPixmap &icon, const TQString &title, TQObject *parent,
const char *name);
/**
* Constructs a new (sub)menu with a given id.
*/
- KPanelAppMenu(QObject *parent, const char *name);
+ KPanelAppMenu(TQObject *parent, const char *name);
/**
* Make sure you actually destroy this thing or the menu will never go
@@ -61,15 +61,15 @@ public:
/**
* Inserts an item into the menu.
*/
- int insertItem(const QString &text, int id = -1);
+ int insertItem(const TQString &text, int id = -1);
/**
* Inserts an item with a icon. The icon name must be a full path.
*/
- int insertItem(const QPixmap &icon, const QString &text, int id = -1 );
+ int insertItem(const TQPixmap &icon, const TQString &text, int id = -1 );
/**
* Inserts a sub menu with a icon. The icon name must be a full path.
*/
- KPanelAppMenu *insertMenu(const QPixmap &icon, const QString &text, int id=-1);
+ KPanelAppMenu *insertMenu(const TQPixmap &icon, const TQString &text, int id=-1);
/**
* Clears the menu.
@@ -79,8 +79,8 @@ public:
/**
* @internal
*/
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
signals:
/**
@@ -89,10 +89,10 @@ signals:
void activated(int id);
protected:
- void init(const QPixmap &icon, const QString &title);
+ void init(const TQPixmap &icon, const TQString &title);
private:
- QCString realObjId;
+ TQCString realObjId;
};
diff --git a/kdeui/kpanelextension.cpp b/kdeui/kpanelextension.cpp
index 190540f70..bcb50cc57 100644
--- a/kdeui/kpanelextension.cpp
+++ b/kdeui/kpanelextension.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kconfig.h>
@@ -39,14 +39,14 @@ public:
{}
KPanelExtension::Size _size;
- QPopupMenu* _customMenu;
+ TQPopupMenu* _customMenu;
int _customSize;
bool _reserveStrut;
};
-KPanelExtension::KPanelExtension(const QString& configFile, Type type,
- int actions, QWidget *parent, const char *name)
- : QFrame(parent, name)
+KPanelExtension::KPanelExtension(const TQString& configFile, Type type,
+ int actions, TQWidget *parent, const char *name)
+ : TQFrame(parent, name)
, _type(type)
, _position( Top )
, _alignment( LeftTop )
@@ -138,12 +138,12 @@ int KPanelExtension::sizeInPixels() const
return d->_customSize;
}
-QPopupMenu* KPanelExtension::customMenu() const
+TQPopupMenu* KPanelExtension::customMenu() const
{
return d->_customMenu;
}
-void KPanelExtension::setCustomMenu(QPopupMenu* menu)
+void KPanelExtension::setCustomMenu(TQPopupMenu* menu)
{
d->_customMenu = menu;
}
diff --git a/kdeui/kpanelextension.h b/kdeui/kpanelextension.h
index 59a9e0aef..2e33f4408 100644
--- a/kdeui/kpanelextension.h
+++ b/kdeui/kpanelextension.h
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __kpanelextension_h__
#define __kpanelextension_h__
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
class QPopupMenu;
@@ -78,7 +78,7 @@ class KPanelExtensionPrivate;
*
* extern "C"
* {
- * KPanelExtension* init(QWidget *parent, const QString& configFile)
+ * KPanelExtension* init(TQWidget *parent, const TQString& configFile)
* {
* KGlobal::locale()->insertCatalogue("exampleextension");
* return new ExampleExtension(configFile, KPanelExtension::Normal,
@@ -119,8 +119,8 @@ public:
* @param parent The pointer to the parent widget handed over in the factory function.
* @param name A Qt object name for your extension.
**/
- KPanelExtension(const QString& configFile, Type t = Normal,
- int actions = 0, QWidget *parent = 0, const char *name = 0);
+ KPanelExtension(const TQString& configFile, Type t = Normal,
+ int actions = 0, TQWidget *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -136,7 +136,7 @@ public:
* location in the Window Manager Dock. Please note that the size can not be larger than the
* maxsize given by the handler.
**/
- virtual QSize sizeHint(Position /*p*/, QSize maxsize) const { return maxsize; }
+ virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; }
/**
* Always use this KConfig object to save/load your extensions configuration.
@@ -210,10 +210,10 @@ public:
/**
* @return the extension's custom menu, usually the same as the context menu, or 0 if none
- * @see setCustomMenu(QPopupMenu*)
+ * @see setCustomMenu(TQPopupMenu*)
* @since 3.4
*/
- QPopupMenu* customMenu() const;
+ TQPopupMenu* customMenu() const;
/**
* @return whether or not to set a desktop geometry claiming strut for this panel
@@ -321,7 +321,7 @@ protected:
* with the new menu (or 0) to avoid crashes
* @since 3.4
*/
- void setCustomMenu(QPopupMenu*);
+ void setCustomMenu(TQPopupMenu*);
/**
* Use this method to set the return value for reserveStrut
diff --git a/kdeui/kpanelmenu.cpp b/kdeui/kpanelmenu.cpp
index ab1ed3d35..c1431a22e 100644
--- a/kdeui/kpanelmenu.cpp
+++ b/kdeui/kpanelmenu.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kglobal.h>
#include <kconfig.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kpanelmenu.h"
#include "kpanelmenu.moc"
@@ -36,31 +36,31 @@ class KPanelMenuPrivate
public:
bool init;
int clearDelay;
- QString startPath;
- QTimer t;
+ TQString startPath;
+ TQTimer t;
};
-KPanelMenu::KPanelMenu(const QString &startDir, QWidget *parent, const char *name)
+KPanelMenu::KPanelMenu(const TQString &startDir, TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
init(startDir);
}
-KPanelMenu::KPanelMenu(QWidget *parent, const char *name)
+KPanelMenu::KPanelMenu(TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
init();
}
-void KPanelMenu::init(const QString& path)
+void KPanelMenu::init(const TQString& path)
{
d = new KPanelMenuPrivate;
setInitialized( false );
d->startPath = path;
- connect(this, SIGNAL(activated(int)), SLOT(slotExec(int)));
- connect(this, SIGNAL(aboutToShow()), SLOT(slotAboutToShow()));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int)));
+ connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow()));
// setup cache timer
KConfig *config = KGlobal::config();
@@ -95,15 +95,15 @@ void KPanelMenu::slotClear()
clear();
}
-void KPanelMenu::hideEvent(QHideEvent *ev)
+void KPanelMenu::hideEvent(TQHideEvent *ev)
{
// start the cache timer
if(d->clearDelay) {
- disconnect(&(d->t), SIGNAL(timeout()), this, SLOT(slotClear()));
- connect(&(d->t), SIGNAL(timeout()), this, SLOT(slotClear()));
+ disconnect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear()));
+ connect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear()));
d->t.start(d->clearDelay, true);
}
- QPopupMenu::hideEvent(ev);
+ TQPopupMenu::hideEvent(ev);
}
void KPanelMenu::disableAutoClear()
@@ -111,12 +111,12 @@ void KPanelMenu::disableAutoClear()
d->clearDelay = 0;
}
-const QString& KPanelMenu::path() const
+const TQString& KPanelMenu::path() const
{
return d->startPath;
}
-void KPanelMenu::setPath(const QString& p)
+void KPanelMenu::setPath(const TQString& p)
{
d->startPath = p;
}
diff --git a/kdeui/kpanelmenu.h b/kdeui/kpanelmenu.h
index 61ec7f13b..de0b065eb 100644
--- a/kdeui/kpanelmenu.h
+++ b/kdeui/kpanelmenu.h
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __KPANELMENU_H__
#define __KPANELMENU_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kpopupmenu.h>
#include <kgenericfactory.h>
@@ -59,7 +59,7 @@ public:
* Construct a KPanelMenu object. This is the normal constructor to use when
* building extrernal menu entries.
*/
- KPanelMenu(QWidget *parent=0, const char *name=0);
+ KPanelMenu(TQWidget *parent=0, const char *name=0);
/**
* Constructor used internally by Kicker. You don't really want to use it.
* @param startDir a directory to associate with this menu
@@ -67,25 +67,25 @@ public:
* @param name name of the object
* @see path(), setPath()
*/
- KPanelMenu(const QString &startDir, QWidget *parent=0, const char *name=0);
+ KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
/**
* Destructor.
*/
virtual ~KPanelMenu();
/**
- * Get the directory path associated with this menu, or QString::null if
+ * Get the directory path associated with this menu, or TQString::null if
* there's no such associated path.
* @return the associated directory path
* @see setPath()
*/
- const QString& path() const;
+ const TQString& path() const;
/**
* Set a directory path to be associated with this menu.
* @param p the directory path
* @see path()
*/
- void setPath(const QString &p);
+ void setPath(const TQString &p);
/**
* Tell if the menu has been initialized, that is it already contains items.
* This is useful when you need to know if you have to clear the menu, or to
@@ -161,11 +161,11 @@ protected:
/**
* Re-implemented for internal reasons.
*/
- virtual void hideEvent(QHideEvent *ev);
+ virtual void hideEvent(TQHideEvent *ev);
/**
* For internal use only. Used by constructors.
*/
- void init(const QString& path = QString::null);
+ void init(const TQString& path = TQString::null);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kpassdlg.cpp b/kdeui/kpassdlg.cpp
index 6ca6cc6ea..8a2d54989 100644
--- a/kdeui/kpassdlg.cpp
+++ b/kdeui/kpassdlg.cpp
@@ -20,18 +20,18 @@
*/
#include <unistd.h>
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsize.h>
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsize.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqptrdict.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -55,7 +55,7 @@
// BCI: Add a real d-pointer and put the int into that
-static QPtrDict<int>* d_ptr = 0;
+static TQPtrDict<int>* d_ptr = 0;
static void cleanup_d_ptr() {
delete d_ptr;
@@ -63,7 +63,7 @@ static void cleanup_d_ptr() {
static int * ourMaxLength( const KPasswordEdit* const e ) {
if ( !d_ptr ) {
- d_ptr = new QPtrDict<int>;
+ d_ptr = new TQPtrDict<int>;
d_ptr->setAutoDelete(true);
qAddPostRoutine( cleanup_d_ptr );
}
@@ -91,8 +91,8 @@ class KPasswordDialog::KPasswordDialogPrivate
passwordStrengthWarningLevel(1), m_strengthBar(0),
reasonablePasswordLength(8)
{}
- QLabel *m_MatchLabel;
- QString iconName;
+ TQLabel *m_MatchLabel;
+ TQString iconName;
bool allowEmptyPasswords;
int minimumPasswordLength;
int maximumPasswordLength;
@@ -102,15 +102,15 @@ class KPasswordDialog::KPasswordDialogPrivate
};
-KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name)
- : QLineEdit(parent, name)
+KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name)
{
init();
KConfig* const cfg = KGlobal::config();
KConfigGroupSaver saver(cfg, "Passwords");
- const QString val = cfg->readEntry("EchoMode", "OneStar");
+ const TQString val = cfg->readEntry("EchoMode", "OneStar");
if (val == "ThreeStars")
m_EchoMode = ThreeStars;
else if (val == "NoEcho")
@@ -121,28 +121,28 @@ KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name)
setInputMethodEnabled( true );
}
-KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name, int echoMode)
- : QLineEdit(parent, name), m_EchoMode(echoMode)
+KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name, int echoMode)
+ : TQLineEdit(parent, name), m_EchoMode(echoMode)
{
init();
}
-KPasswordEdit::KPasswordEdit(EchoModes echoMode, QWidget *parent, const char *name)
- : QLineEdit(parent, name), m_EchoMode(echoMode)
+KPasswordEdit::KPasswordEdit(EchoModes echoMode, TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name), m_EchoMode(echoMode)
{
init();
}
-KPasswordEdit::KPasswordEdit(EchoMode echoMode, QWidget *parent, const char *name)
- : QLineEdit(parent, name)
- , m_EchoMode( echoMode == QLineEdit::NoEcho ? NoEcho : OneStar )
+KPasswordEdit::KPasswordEdit(EchoMode echoMode, TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name)
+ , m_EchoMode( echoMode == TQLineEdit::NoEcho ? NoEcho : OneStar )
{
init();
}
void KPasswordEdit::init()
{
- setEchoMode(QLineEdit::Password); // Just in case
+ setEchoMode(TQLineEdit::Password); // Just in case
setAcceptDrops(false);
int* t = ourMaxLength(this);
*t = (PassLen - 1); // the internal max length
@@ -158,9 +158,9 @@ KPasswordEdit::~KPasswordEdit()
delete_d(this);
}
-void KPasswordEdit::insert(const QString &txt)
+void KPasswordEdit::insert(const TQString &txt)
{
- const QCString localTxt = txt.local8Bit();
+ const TQCString localTxt = txt.local8Bit();
const unsigned int lim = localTxt.length();
const int m_MaxLength = maxPasswordLength();
for(unsigned int i=0; i < lim; ++i)
@@ -182,17 +182,17 @@ void KPasswordEdit::erase()
setText("");
}
-void KPasswordEdit::focusInEvent(QFocusEvent *e)
+void KPasswordEdit::focusInEvent(TQFocusEvent *e)
{
- const QString txt = text();
+ const TQString txt = text();
setUpdatesEnabled(false);
- QLineEdit::focusInEvent(e);
+ TQLineEdit::focusInEvent(e);
setUpdatesEnabled(true);
setText(txt);
}
-void KPasswordEdit::keyPressEvent(QKeyEvent *e)
+void KPasswordEdit::keyPressEvent(TQKeyEvent *e)
{
switch (e->key()) {
case Key_Return:
@@ -220,28 +220,28 @@ void KPasswordEdit::keyPressEvent(QKeyEvent *e)
}
}
-bool KPasswordEdit::event(QEvent *e) {
+bool KPasswordEdit::event(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::IMStart:
- case QEvent::IMCompose:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::IMStart:
+ case TQEvent::IMCompose:
return true; //Ignore
- case QEvent::IMEnd:
+ case TQEvent::IMEnd:
{
- QIMEvent* const ie = (QIMEvent*) e;
+ TQIMEvent* const ie = (TQIMEvent*) e;
if (!ie->text().isEmpty())
insert( ie->text() );
return true;
}
- case QEvent::AccelOverride:
+ case TQEvent::AccelOverride:
{
- QKeyEvent* const k = (QKeyEvent*) e;
+ TQKeyEvent* const k = (TQKeyEvent*) e;
switch (k->key()) {
case Key_U:
if (k->state() & ControlButton) {
@@ -257,12 +257,12 @@ bool KPasswordEdit::event(QEvent *e) {
// Do nothing
break;
}
- return QLineEdit::event(e);
+ return TQLineEdit::event(e);
}
void KPasswordEdit::showPass()
{
- QString tmp;
+ TQString tmp;
switch (m_EchoMode) {
case OneStar:
@@ -274,7 +274,7 @@ void KPasswordEdit::showPass()
setText(tmp);
break;
case NoEcho: default:
- emit textChanged(QString::null); //To update the password comparison if need be.
+ emit textChanged(TQString::null); //To update the password comparison if need be.
break;
}
}
@@ -301,7 +301,7 @@ int KPasswordEdit::maxPasswordLength() const
*/
KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
{
@@ -309,8 +309,8 @@ KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn,
init();
}
-KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, const QString& icon,
- QWidget *parent, const char *name )
+KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, const TQString& icon,
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
{
@@ -321,7 +321,7 @@ KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, con
init();
}
-KPasswordDialog::KPasswordDialog(int type, QString prompt, bool enableKeep,
+KPasswordDialog::KPasswordDialog(int type, TQString prompt, bool enableKeep,
int extraBttn)
: KDialogBase(0L, "Password Dialog", true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
@@ -340,23 +340,23 @@ void KPasswordDialog::init()
if (m_Keep && cfg->readBoolEntry("Keep", false))
++m_Keep;
- m_pMain = new QWidget(this);
+ m_pMain = new TQWidget(this);
setMainWidget(m_pMain);
- m_pGrid = new QGridLayout(m_pMain, 10, 3, 0, 0);
+ m_pGrid = new TQGridLayout(m_pMain, 10, 3, 0, 0);
m_pGrid->addColSpacing(1, 10);
// Row 1: pixmap + prompt
- QLabel *lbl;
- const QPixmap pix( KGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
+ TQLabel *lbl;
+ const TQPixmap pix( KGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
if (!pix.isNull()) {
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setPixmap(pix);
lbl->setAlignment(AlignHCenter|AlignVCenter);
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 0, 0, AlignCenter);
}
- m_pHelpLbl = new QLabel(m_pMain);
+ m_pHelpLbl = new TQLabel(m_pMain);
m_pHelpLbl->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_pGrid->addWidget(m_pHelpLbl, 0, 2, AlignLeft);
m_pGrid->addRowSpacing(1, 10);
@@ -367,18 +367,18 @@ void KPasswordDialog::init()
m_pGrid->setRowStretch(6, 12);
// Row 3: Password editor #1
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setAlignment(AlignLeft|AlignVCenter);
lbl->setText(i18n("&Password:"));
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 7, 0, AlignLeft);
- QHBoxLayout *h_lay = new QHBoxLayout();
+ TQHBoxLayout *h_lay = new TQHBoxLayout();
m_pGrid->addLayout(h_lay, 7, 2);
m_pEdit = new KPasswordEdit(m_pMain);
m_pEdit2 = 0;
lbl->setBuddy(m_pEdit);
- QSize size = m_pEdit->sizeHint();
+ TQSize size = m_pEdit->sizeHint();
m_pEdit->setFixedHeight(size.height());
m_pEdit->setMinimumWidth(size.width());
h_lay->addWidget(m_pEdit);
@@ -388,23 +388,23 @@ void KPasswordDialog::init()
if ((m_Type == Password) && m_Keep) {
m_pGrid->addRowSpacing(8, 10);
m_pGrid->setRowStretch(8, 12);
- QCheckBox* const cb = new QCheckBox(i18n("&Keep password"), m_pMain);
+ TQCheckBox* const cb = new TQCheckBox(i18n("&Keep password"), m_pMain);
cb->setFixedSize(cb->sizeHint());
if (m_Keep > 1)
cb->setChecked(true);
else
m_Keep = 0;
- connect(cb, SIGNAL(toggled(bool)), SLOT(slotKeep(bool)));
+ connect(cb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotKeep(bool)));
m_pGrid->addWidget(cb, 9, 2, AlignLeft|AlignVCenter);
} else if (m_Type == NewPassword) {
m_pGrid->addRowSpacing(8, 10);
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setAlignment(AlignLeft|AlignVCenter);
lbl->setText(i18n("&Verify:"));
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 9, 0, AlignLeft);
- h_lay = new QHBoxLayout();
+ h_lay = new TQHBoxLayout();
m_pGrid->addLayout(h_lay, 9, 2);
m_pEdit2 = new KPasswordEdit(m_pMain);
lbl->setBuddy(m_pEdit2);
@@ -417,36 +417,36 @@ void KPasswordDialog::init()
m_pGrid->addRowSpacing(10, 10);
m_pGrid->setRowStretch(10, 12);
- QHBox* const strengthBox = new QHBox(m_pMain);
+ TQHBox* const strengthBox = new TQHBox(m_pMain);
strengthBox->setSpacing(10);
m_pGrid->addMultiCellWidget(strengthBox, 11, 11, 0, 2);
- QLabel* const passStrengthLabel = new QLabel(strengthBox);
+ TQLabel* const passStrengthLabel = new TQLabel(strengthBox);
passStrengthLabel->setAlignment(AlignLeft|AlignVCenter);
passStrengthLabel->setText(i18n("Password strength meter:"));
d->m_strengthBar = new KProgress(100, strengthBox, "PasswordStrengthMeter");
d->m_strengthBar->setPercentageVisible(false);
- const QString strengthBarWhatsThis(i18n("The password strength meter gives an indication of the security "
+ const TQString strengthBarWhatsThis(i18n("The password strength meter gives an indication of the security "
"of the password you have entered. To improve the strength of "
"the password, try:\n"
" - using a longer password;\n"
" - using a mixture of upper- and lower-case letters;\n"
" - using numbers or symbols, such as #, as well as letters."));
- QWhatsThis::add(passStrengthLabel, strengthBarWhatsThis);
- QWhatsThis::add(d->m_strengthBar, strengthBarWhatsThis);
+ TQWhatsThis::add(passStrengthLabel, strengthBarWhatsThis);
+ TQWhatsThis::add(d->m_strengthBar, strengthBarWhatsThis);
// Row 6: Label saying whether the passwords match
m_pGrid->addRowSpacing(12, 10);
m_pGrid->setRowStretch(12, 12);
- d->m_MatchLabel = new QLabel(m_pMain);
+ d->m_MatchLabel = new TQLabel(m_pMain);
d->m_MatchLabel->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_pGrid->addMultiCellWidget(d->m_MatchLabel, 13, 13, 0, 2);
d->m_MatchLabel->setText(i18n("Passwords do not match"));
- connect( m_pEdit, SIGNAL(textChanged(const QString&)), SLOT(enableOkBtn()) );
- connect( m_pEdit2, SIGNAL(textChanged(const QString&)), SLOT(enableOkBtn()) );
+ connect( m_pEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) );
+ connect( m_pEdit2, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) );
enableOkBtn();
}
@@ -465,33 +465,33 @@ void KPasswordDialog::clearPassword()
m_pEdit->erase();
}
-/* KDE 4: Make it const QString & */
-void KPasswordDialog::setPrompt(QString prompt)
+/* KDE 4: Make it const TQString & */
+void KPasswordDialog::setPrompt(TQString prompt)
{
m_pHelpLbl->setText(prompt);
m_pHelpLbl->setFixedSize(275, m_pHelpLbl->heightForWidth(275));
}
-QString KPasswordDialog::prompt() const
+TQString KPasswordDialog::prompt() const
{
return m_pHelpLbl->text();
}
-/* KDE 4: Make them const QString & */
-void KPasswordDialog::addLine(QString key, QString value)
+/* KDE 4: Make them const TQString & */
+void KPasswordDialog::addLine(TQString key, TQString value)
{
if (m_Row > 3)
return;
- QLabel *lbl = new QLabel(key, m_pMain);
+ TQLabel *lbl = new TQLabel(key, m_pMain);
lbl->setAlignment(AlignLeft|AlignTop);
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, m_Row+2, 0, AlignLeft);
- lbl = new QLabel(value, m_pMain);
+ lbl = new TQLabel(value, m_pMain);
lbl->setAlignment(AlignTop|WordBreak);
lbl->setFixedSize(275, lbl->heightForWidth(275));
m_pGrid->addWidget(lbl, m_Row+2, 2, AlignLeft);
@@ -551,8 +551,8 @@ void KPasswordDialog::slotKeep(bool keep)
}
-// static . antlarr: KDE 4: Make it const QString & prompt
-int KPasswordDialog::getPassword(QCString &password, QString prompt,
+// static . antlarr: KDE 4: Make it const TQString & prompt
+int KPasswordDialog::getPassword(TQCString &password, TQString prompt,
int *keep)
{
const bool enableKeep = (keep && *keep);
@@ -568,8 +568,8 @@ int KPasswordDialog::getPassword(QCString &password, QString prompt,
}
-// static . antlarr: KDE 4: Make it const QString & prompt
-int KPasswordDialog::getNewPassword(QCString &password, QString prompt)
+// static . antlarr: KDE 4: Make it const TQString & prompt
+int KPasswordDialog::getNewPassword(TQCString &password, TQString prompt)
{
KPasswordDialog* const dlg = new KPasswordDialog(NewPassword, prompt);
const int ret = dlg->exec();
@@ -597,7 +597,7 @@ void KPasswordDialog::enableOkBtn()
const bool match = strcmp(m_pEdit->password(), m_pEdit2->password()) == 0
&& (d->allowEmptyPasswords || m_pEdit->password()[0]);
- const QString pass(m_pEdit->password());
+ const TQString pass(m_pEdit->password());
const int minPasswordLength = minimumPasswordLength();
@@ -630,15 +630,15 @@ void KPasswordDialog::enableOkBtn()
int pwlength = (int) (pass.length() / lengthFactor);
if (pwlength > 5) pwlength = 5;
- const QRegExp numRxp("[0-9]", true, false);
+ const TQRegExp numRxp("[0-9]", true, false);
int numeric = (int) (pass.contains(numRxp) / lengthFactor);
if (numeric > 3) numeric = 3;
- const QRegExp symbRxp("\\W", false, false);
+ const TQRegExp symbRxp("\\W", false, false);
int numsymbols = (int) (pass.contains(symbRxp) / lengthFactor);
if (numsymbols > 3) numsymbols = 3;
- const QRegExp upperRxp("[A-Z]", true, false);
+ const TQRegExp upperRxp("[A-Z]", true, false);
int upper = (int) (pass.contains(upperRxp) / lengthFactor);
if (upper > 3) upper = 3;
diff --git a/kdeui/kpassdlg.h b/kdeui/kpassdlg.h
index b3bc80677..c1dc65757 100644
--- a/kdeui/kpassdlg.h
+++ b/kdeui/kpassdlg.h
@@ -21,8 +21,8 @@
#ifndef __KPassDlg_h_included__
#define __KPassDlg_h_included__
-#include <qstring.h>
-#include <qlineedit.h>
+#include <tqstring.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
class QLabel;
@@ -47,28 +47,28 @@ public:
/**
* Constructs a password input widget using the user's global "echo mode" setting.
*/
- KPasswordEdit(QWidget *parent=0, const char *name=0);
+ KPasswordEdit(TQWidget *parent=0, const char *name=0);
// KDE4: either of the two must go! add default values for parameters
/**
* Constructs a password input widget using echoMode as "echo mode".
- * Note that echoMode is a QLineEdit::EchoMode.
+ * Note that echoMode is a TQLineEdit::EchoMode.
* @since 3.0
*/
- KPasswordEdit(EchoMode echoMode, QWidget *parent, const char *name);
+ KPasswordEdit(EchoMode echoMode, TQWidget *parent, const char *name);
/**
* Constructs a password input widget using echoMode as "echo mode".
* Note that echoMode is a KPasswordEdit::EchoModes.
* @since 3.2
*/
- KPasswordEdit(EchoModes echoMode, QWidget *parent, const char *name);
+ KPasswordEdit(EchoModes echoMode, TQWidget *parent, const char *name);
/**
* @deprecated, will be removed in KDE 4.0
* Creates a password input widget using echoMode as "echo mode".
*/
- KPasswordEdit(QWidget *parent, const char *name, int echoMode) KDE_DEPRECATED;
+ KPasswordEdit(TQWidget *parent, const char *name, int echoMode) KDE_DEPRECATED;
/**
* Destructs the widget.
@@ -109,12 +109,12 @@ public slots:
/**
* Reimplementation
*/
- virtual void insert( const QString &);
+ virtual void insert( const TQString &);
protected:
- virtual void keyPressEvent(QKeyEvent *);
- virtual void focusInEvent(QFocusEvent *e);
- virtual bool event(QEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *);
+ virtual void focusInEvent(TQFocusEvent *e);
+ virtual bool event(TQEvent *e);
private:
void init();
@@ -135,7 +135,7 @@ private:
* <b>Usage example</b>\n
*
* \code
- * QCString password;
+ * TQCString password;
* int result = KPasswordDialog::getPassword(password, i18n("Prompt message"));
* if (result == KPasswordDialog::Accepted)
* use(password);
@@ -154,9 +154,9 @@ private:
*
* @li You should delete passwords as soon as they are not needed anymore.
* The functions getPassword() and getNewPassword() return the
- * password as a QCString. I believe this is safer than a QString. A QString
+ * password as a TQCString. I believe this is safer than a TQString. A QString
* stores its characters internally as 16-bit wide values, so conversions are
- * needed, both for creating the QString and by using it. The temporary
+ * needed, both for creating the TQString and by using it. The temporary
* memory used for these conversion is probably not erased. This could lead
* to stray passwords in memory, even if you think you erased all of them.
*
@@ -201,13 +201,13 @@ public:
* @since 3.0
*/
KPasswordDialog(Types type, bool enableKeep, int extraBttn,
- QWidget *parent=0, const char *name=0);
+ TQWidget *parent=0, const char *name=0);
/**
* @deprecated Variant of the previous constructor without the
* possibility to specify a parent. Will be removed in KDE 4.0
*/
- KPasswordDialog(int type, QString prompt, bool enableKeep=false,
+ KPasswordDialog(int type, TQString prompt, bool enableKeep=false,
int extraBttn=0) KDE_DEPRECATED;
// note that this implicitly deprecates the 'prompt' variants of
// getPassword() below. i guess the above constructor needs to be extended.
@@ -227,8 +227,8 @@ public:
* @param name Passed to lower level constructor
* @since 3.3
*/
- KPasswordDialog(Types type, bool enableKeep, int extraBttn, const QString& iconName,
- QWidget *parent = 0, const char *name = 0);
+ KPasswordDialog(Types type, bool enableKeep, int extraBttn, const TQString& iconName,
+ TQWidget *parent = 0, const char *name = 0);
/**
* Destructs the password dialog.
@@ -238,17 +238,17 @@ public:
/**
* Sets the password prompt.
*/
- void setPrompt(QString prompt);
+ void setPrompt(TQString prompt);
/**
* Returns the password prompt.
*/
- QString prompt() const;
+ TQString prompt() const;
/**
* Adds a line of information to the dialog.
*/
- void addLine(QString key, QString value);
+ void addLine(TQString key, TQString value);
/**
* Allow empty passwords? - Default: false
@@ -357,7 +357,7 @@ public:
* is shown and the result is stored in *keep.
* @return Result code: Accepted or Rejected.
*/
- static int getPassword(QCString &password, QString prompt, int *keep=0L);
+ static int getPassword(TQCString &password, TQString prompt, int *keep=0L);
/**
* Pops up the dialog, asks the user for a password and returns it. The
@@ -369,7 +369,7 @@ public:
* information. The text is word broken to fit nicely in the dialog.
* @return Result code: Accepted or Rejected.
*/
- static int getNewPassword(QCString &password, QString prompt);
+ static int getNewPassword(TQCString &password, TQString prompt);
/**
* Static helper function that disables core dumps.
@@ -398,9 +398,9 @@ private:
void erase();
int m_Keep, m_Type, m_Row;
- QLabel *m_pHelpLbl;
- QGridLayout *m_pGrid;
- QWidget *m_pMain;
+ TQLabel *m_pHelpLbl;
+ TQGridLayout *m_pGrid;
+ TQWidget *m_pMain;
KPasswordEdit *m_pEdit, *m_pEdit2;
protected:
diff --git a/kdeui/kpassivepopup.cpp b/kdeui/kpassivepopup.cpp
index 9da71013b..4b870c794 100644
--- a/kdeui/kpassivepopup.cpp
+++ b/kdeui/kpassivepopup.cpp
@@ -8,15 +8,15 @@
#include <kconfig.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qbitmap.h>
-#include <qpointarray.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqbitmap.h>
+#include <tqpointarray.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -36,9 +36,9 @@ class KPassivePopup::Private
{
public:
int popupStyle;
- QPointArray surround;
- QPoint anchor;
- QPoint fixedPosition;
+ TQPointArray surround;
+ TQPoint anchor;
+ TQPoint fixedPosition;
};
static const int DEFAULT_POPUP_TYPE = KPassivePopup::Boxed;
@@ -46,37 +46,37 @@ static const int DEFAULT_POPUP_TIME = 6*1000;
static const int POPUP_FLAGS = Qt::WStyle_Customize | Qt::WDestructiveClose | Qt::WX11BypassWM
| Qt::WStyle_StaysOnTop | Qt::WStyle_Tool | Qt::WStyle_NoBorder;
-KPassivePopup::KPassivePopup( QWidget *parent, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+KPassivePopup::KPassivePopup( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( parent ? parent->winId() : 0L ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( DEFAULT_POPUP_TYPE );
}
KPassivePopup::KPassivePopup( WId win, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( win ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( DEFAULT_POPUP_TYPE );
}
-KPassivePopup::KPassivePopup( int popupStyle, QWidget *parent, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+KPassivePopup::KPassivePopup( int popupStyle, TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( parent ? parent->winId() : 0L ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( popupStyle );
}
KPassivePopup::KPassivePopup( int popupStyle, WId win, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( win ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( popupStyle );
@@ -88,16 +88,16 @@ void KPassivePopup::init( int popupStyle )
d->popupStyle = popupStyle;
if( popupStyle == Boxed )
{
- setFrameStyle( QFrame::Box| QFrame::Plain );
+ setFrameStyle( TQFrame::Box| TQFrame::Plain );
setLineWidth( 2 );
}
else if( popupStyle == Balloon )
{
- setPalette(QToolTip::palette());
+ setPalette(TQToolTip::palette());
setAutoMask(TRUE);
}
- connect( hideTimer, SIGNAL( timeout() ), SLOT( hide() ) );
- connect( this, SIGNAL( clicked() ), SLOT( hide() ) );
+ connect( hideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) );
+ connect( this, TQT_SIGNAL( clicked() ), TQT_SLOT( hide() ) );
}
KPassivePopup::~KPassivePopup()
@@ -105,45 +105,45 @@ KPassivePopup::~KPassivePopup()
delete d;
}
-void KPassivePopup::setView( QWidget *child )
+void KPassivePopup::setView( TQWidget *child )
{
delete msgView;
msgView = child;
delete topLayout;
- topLayout = new QVBoxLayout( this, d->popupStyle == Balloon ? 22 : KDialog::marginHint(), KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( this, d->popupStyle == Balloon ? 22 : KDialog::marginHint(), KDialog::spacingHint() );
topLayout->addWidget( msgView );
topLayout->activate();
}
-void KPassivePopup::setView( const QString &caption, const QString &text,
- const QPixmap &icon )
+void KPassivePopup::setView( const TQString &caption, const TQString &text,
+ const TQPixmap &icon )
{
// kdDebug() << "KPassivePopup::setView " << caption << ", " << text << endl;
setView( standardView( caption, text, icon, this ) );
}
-QVBox * KPassivePopup::standardView( const QString& caption,
- const QString& text,
- const QPixmap& icon,
- QWidget *parent )
+TQVBox * KPassivePopup::standardView( const TQString& caption,
+ const TQString& text,
+ const TQPixmap& icon,
+ TQWidget *parent )
{
- QVBox *vb = new QVBox( parent ? parent : this );
+ TQVBox *vb = new TQVBox( parent ? parent : this );
vb->setSpacing( KDialog::spacingHint() );
- QHBox *hb=0;
+ TQHBox *hb=0;
if ( !icon.isNull() ) {
- hb = new QHBox( vb );
+ hb = new TQHBox( vb );
hb->setMargin( 0 );
hb->setSpacing( KDialog::spacingHint() );
- ttlIcon = new QLabel( hb, "title_icon" );
+ ttlIcon = new TQLabel( hb, "title_icon" );
ttlIcon->setPixmap( icon );
ttlIcon->setAlignment( AlignLeft );
}
if ( !caption.isEmpty() ) {
- ttl = new QLabel( caption, hb ? hb : vb, "title_label" );
- QFont fnt = ttl->font();
+ ttl = new TQLabel( caption, hb ? hb : vb, "title_label" );
+ TQFont fnt = ttl->font();
fnt.setBold( true );
ttl->setFont( fnt );
ttl->setAlignment( Qt::AlignHCenter );
@@ -152,16 +152,16 @@ QVBox * KPassivePopup::standardView( const QString& caption,
}
if ( !text.isEmpty() ) {
- msg = new QLabel( text, vb, "msg_label" );
+ msg = new TQLabel( text, vb, "msg_label" );
msg->setAlignment( AlignLeft );
}
return vb;
}
-void KPassivePopup::setView( const QString &caption, const QString &text )
+void KPassivePopup::setView( const TQString &caption, const TQString &text )
{
- setView( caption, text, QPixmap() );
+ setView( caption, text, TQPixmap() );
}
void KPassivePopup::setTimeout( int delay )
@@ -182,7 +182,7 @@ void KPassivePopup::setAutoDelete( bool autoDelete )
m_autoDelete = autoDelete;
}
-void KPassivePopup::mouseReleaseEvent( QMouseEvent *e )
+void KPassivePopup::mouseReleaseEvent( TQMouseEvent *e )
{
emit clicked();
emit clicked( e->pos() );
@@ -205,7 +205,7 @@ void KPassivePopup::show()
else
move( d->fixedPosition );
}
- QFrame::show();
+ TQFrame::show();
int delay = hideDelay;
if ( delay < 0 ) {
@@ -217,20 +217,20 @@ void KPassivePopup::show()
}
}
-void KPassivePopup::show(const QPoint &p)
+void KPassivePopup::show(const TQPoint &p)
{
d->fixedPosition = p;
show();
}
-void KPassivePopup::hideEvent( QHideEvent * )
+void KPassivePopup::hideEvent( TQHideEvent * )
{
hideTimer->stop();
if ( m_autoDelete )
deleteLater();
}
-QRect KPassivePopup::defaultArea() const
+TQRect KPassivePopup::defaultArea() const
{
#ifdef Q_WS_X11
NETRootInfo info( qt_xdisplay(),
@@ -240,11 +240,11 @@ QRect KPassivePopup::defaultArea() const
-1, false );
info.activate();
NETRect workArea = info.workArea( info.currentDesktop() );
- QRect r;
+ TQRect r;
r.setRect( workArea.pos.x, workArea.pos.y, 0, 0 ); // top left
#else
// FIX IT
- QRect r;
+ TQRect r;
r.setRect( 100, 100, 200, 200 ); // top left
#endif
return r;
@@ -252,7 +252,7 @@ QRect KPassivePopup::defaultArea() const
void KPassivePopup::positionSelf()
{
- QRect target;
+ TQRect target;
#ifdef Q_WS_X11
if ( !window ) {
@@ -291,15 +291,15 @@ void KPassivePopup::positionSelf()
moveNear( target );
}
-void KPassivePopup::moveNear( QRect target )
+void KPassivePopup::moveNear( TQRect target )
{
- QPoint pos = target.topLeft();
+ TQPoint pos = target.topLeft();
int x = pos.x();
int y = pos.y();
int w = width();
int h = height();
- QRect r = KGlobalSettings::desktopGeometry(QPoint(x+w/2,y+h/2));
+ TQRect r = KGlobalSettings::desktopGeometry(TQPoint(x+w/2,y+h/2));
if( d->popupStyle == Balloon )
{
@@ -332,33 +332,33 @@ void KPassivePopup::moveNear( QRect target )
x = r.left();
if( d->popupStyle == Balloon )
- setAnchor( QPoint( x, y ) );
+ setAnchor( TQPoint( x, y ) );
else
move( x, y );
}
-void KPassivePopup::setAnchor(const QPoint &anchor)
+void KPassivePopup::setAnchor(const TQPoint &anchor)
{
d->anchor = anchor;
updateMask();
}
-void KPassivePopup::paintEvent( QPaintEvent* pe )
+void KPassivePopup::paintEvent( TQPaintEvent* pe )
{
if( d->popupStyle == Balloon )
{
- QPainter p;
+ TQPainter p;
p.begin( this );
p.drawPolygon( d->surround );
} else
- QFrame::paintEvent( pe );
+ TQFrame::paintEvent( pe );
}
void KPassivePopup::updateMask()
{
// get screen-geometry for screen our anchor is on
// (geometry can differ from screen to screen!
- QRect deskRect = KGlobalSettings::desktopGeometry(d->anchor);
+ TQRect deskRect = KGlobalSettings::desktopGeometry(d->anchor);
int xh = 70, xl = 40;
if( width() < 80 )
@@ -369,21 +369,21 @@ void KPassivePopup::updateMask()
bool bottom = (d->anchor.y() + height()) > ((deskRect.y() + deskRect.height()-48));
bool right = (d->anchor.x() + width()) > ((deskRect.x() + deskRect.width()-48));
- QPoint corners[4] = {
- QPoint( width() - 50, 10 ),
- QPoint( 10, 10 ),
- QPoint( 10, height() - 50 ),
- QPoint( width() - 50, height() - 50 )
+ TQPoint corners[4] = {
+ TQPoint( width() - 50, 10 ),
+ TQPoint( 10, 10 ),
+ TQPoint( 10, height() - 50 ),
+ TQPoint( width() - 50, height() - 50 )
};
- QBitmap mask( width(), height(), true );
- QPainter p( &mask );
- QBrush brush( Qt::white, Qt::SolidPattern );
+ TQBitmap mask( width(), height(), true );
+ TQPainter p( &mask );
+ TQBrush brush( Qt::white, Qt::SolidPattern );
p.setBrush( brush );
int i = 0, z = 0;
for (; i < 4; ++i) {
- QPointArray corner;
+ TQPointArray corner;
corner.makeArc(corners[i].x(), corners[i].y(), 40, 40, i * 16 * 90, 16 * 90);
d->surround.resize( z + corner.count() );
@@ -394,26 +394,26 @@ void KPassivePopup::updateMask()
if (bottom && i == 2) {
if (right) {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( width() - xh, height() - 11 ) );
- d->surround.setPoint( z++, QPoint( width() - 20, height() ) );
- d->surround.setPoint( z++, QPoint( width() - xl, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xh, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( width() - 20, height() ) );
+ d->surround.setPoint( z++, TQPoint( width() - xl, height() - 11 ) );
} else {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( xl, height() - 11 ) );
- d->surround.setPoint( z++, QPoint( 20, height() ) );
- d->surround.setPoint( z++, QPoint( xh, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( xl, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( 20, height() ) );
+ d->surround.setPoint( z++, TQPoint( xh, height() - 11 ) );
}
} else if (!bottom && i == 0) {
if (right) {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( width() - xl, 10 ) );
- d->surround.setPoint( z++, QPoint( width() - 20, 0 ) );
- d->surround.setPoint( z++, QPoint( width() - xh, 10 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xl, 10 ) );
+ d->surround.setPoint( z++, TQPoint( width() - 20, 0 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xh, 10 ) );
} else {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( xh, 10 ) );
- d->surround.setPoint( z++, QPoint( 20, 0 ) );
- d->surround.setPoint( z++, QPoint( xl, 10 ) );
+ d->surround.setPoint( z++, TQPoint( xh, 10 ) );
+ d->surround.setPoint( z++, TQPoint( 20, 0 ) );
+ d->surround.setPoint( z++, TQPoint( xl, 10 ) );
}
}
}
@@ -433,33 +433,33 @@ void KPassivePopup::updateMask()
// Convenience Methods
//
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name, int timeout )
{
return message( DEFAULT_POPUP_TYPE, caption, text, icon, parent, name, timeout );
}
-KPassivePopup *KPassivePopup::message( const QString &text, QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( const TQString &text, TQWidget *parent, const char *name )
{
- return message( DEFAULT_POPUP_TYPE, QString::null, text, QPixmap(), parent, name );
+ return message( DEFAULT_POPUP_TYPE, TQString::null, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name )
{
- return message( DEFAULT_POPUP_TYPE, caption, text, QPixmap(), parent, name );
+ return message( DEFAULT_POPUP_TYPE, caption, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- const QPixmap &icon, WId parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon, WId parent, const char *name, int timeout )
{
return message( DEFAULT_POPUP_TYPE, caption, text, icon, parent, name, timeout );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name, int timeout )
{
KPassivePopup *pop = new KPassivePopup( popupStyle, parent, name );
pop->setAutoDelete( true );
@@ -470,19 +470,19 @@ KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, c
return pop;
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &text, QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &text, TQWidget *parent, const char *name )
{
- return message( popupStyle, QString::null, text, QPixmap(), parent, name );
+ return message( popupStyle, TQString::null, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name )
{
- return message( popupStyle, caption, text, QPixmap(), parent, name );
+ return message( popupStyle, caption, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon, WId parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon, WId parent, const char *name, int timeout )
{
KPassivePopup *pop = new KPassivePopup( popupStyle, parent, name );
pop->setAutoDelete( true );
diff --git a/kdeui/kpassivepopup.h b/kdeui/kpassivepopup.h
index 40c1e789b..7b935a5bb 100644
--- a/kdeui/kpassivepopup.h
+++ b/kdeui/kpassivepopup.h
@@ -11,7 +11,7 @@
#ifndef KPASSIVEPOPUP_H
#define KPASSIVEPOPUP_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -31,7 +31,7 @@ class QVBox;
* @li Skip Taskbar Windows: The popup is placed adjact to the window
* itself if it is visible, and at the edge of the desktop otherwise.
*
- * You also have the option of calling show with a QPoint as a parameter that
+ * You also have the option of calling show with a TQPoint as a parameter that
* removes the automatic placing of KPassivePopup and shows it in the point you want.
*
* The most basic use of KPassivePopup displays a popup containing a piece of text:
@@ -40,21 +40,21 @@ class QVBox;
* \endcode
* We can create popups with titles and icons too, as this example shows:
* \code
- * QPixmap px;
+ * TQPixmap px;
* px.load( "hi32-app-logtracker.png" );
* KPassivePopup::message( "Some title", "This is the main text", px, this );
* \endcode
- * For more control over the popup, you can use the setView(QWidget *) method
+ * For more control over the popup, you can use the setView(TQWidget *) method
* to create a custom popup.
* \code
* KPassivePopup *pop = new KPassivePopup( parent );
*
- * QVBox *vb = new QVBox( pop );
- * (void) new QLabel( vb, "<b>Isn't this great?</b>" );
+ * TQVBox *vb = new TQVBox( pop );
+ * (void) new TQLabel( vb, "<b>Isn't this great?</b>" );
*
- * QHBox *box = new QHBox( vb );
- * (void) new QPushButton( box, "Yes" );
- * (void) new QPushButton( box, "No" );
+ * TQHBox *box = new TQHBox( vb );
+ * (void) new TQPushButton( box, "Yes" );
+ * (void) new TQPushButton( box, "No" );
*
* pop->setView( vb );
* pop->show();
@@ -86,7 +86,7 @@ public:
/**
* Creates a popup for the specified widget.
*/
- KPassivePopup( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ KPassivePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 );
/**
* Creates a popup for the specified window.
@@ -97,7 +97,7 @@ public:
* Creates a popup for the specified widget.
* @since 3.5
*/
- KPassivePopup( int popupStyle, QWidget *parent=0, const char *name=0, WFlags f=0 );
+ KPassivePopup( int popupStyle, TQWidget *parent=0, const char *name=0, WFlags f=0 );
/**
* Creates a popup for the specified window.
@@ -113,45 +113,45 @@ public:
/**
* Sets the main view to be the specified widget (which must be a child of the popup).
*/
- void setView( QWidget *child );
+ void setView( TQWidget *child );
/**
- * Creates a standard view then calls setView(QWidget*) .
+ * Creates a standard view then calls setView(TQWidget*) .
*/
- void setView( const QString &caption, const QString &text = QString::null );
+ void setView( const TQString &caption, const TQString &text = TQString::null );
/**
- * Creates a standard view then calls setView(QWidget*) .
+ * Creates a standard view then calls setView(TQWidget*) .
*/
- virtual void setView( const QString &caption, const QString &text, const QPixmap &icon );
+ virtual void setView( const TQString &caption, const TQString &text, const TQPixmap &icon );
/**
* Returns a widget that is used as standard view if one of the
- * setView() methods taking the QString arguments is used.
+ * setView() methods taking the TQString arguments is used.
* You can use the returned widget to customize the passivepopup while
* keeping the look similar to the "standard" passivepopups.
*
- * After customizing the widget, pass it to setView( QWidget* )
+ * After customizing the widget, pass it to setView( TQWidget* )
*
* @param caption The window caption (title) on the popup
* @param text The text for the popup
* @param icon The icon to use for the popup
- * @param parent The parent widget used for the returned QVBox. If left 0L,
+ * @param parent The parent widget used for the returned TQVBox. If left 0L,
* then "this", i.e. the passive popup object will be used.
*
- * @return a QVBox containing the given arguments, looking like the
+ * @return a TQVBox containing the given arguments, looking like the
* standard passivepopups.
- * @see setView( QWidget * )
- * @see setView( const QString&, const QString& )
- * @see setView( const QString&, const QString&, const QPixmap& )
+ * @see setView( TQWidget * )
+ * @see setView( const TQString&, const TQString& )
+ * @see setView( const TQString&, const TQString&, const TQPixmap& )
*/
- QVBox * standardView( const QString& caption, const QString& text,
- const QPixmap& icon, QWidget *parent = 0L );
+ TQVBox * standardView( const TQString& caption, const TQString& text,
+ const TQPixmap& icon, TQWidget *parent = 0L );
/**
* Returns the main view.
*/
- QWidget *view() const { return msgView; }
+ TQWidget *view() const { return msgView; }
/**
* Returns the delay before the popup is removed automatically.
@@ -177,10 +177,10 @@ public:
* itself somehow around the point.
* @since 3.5
*/
- void setAnchor( const QPoint& anchor );
+ void setAnchor( const TQPoint& anchor );
- // TODO KDE4: give all the statics method a const QPoint p = QPoint() that in
- // case the point is not null calls the show(cosnt QPoint &p) method instead
+ // TODO KDE4: give all the statics method a const TQPoint p = TQPoint() that in
+ // case the point is not null calls the show(cosnt TQPoint &p) method instead
// the show() one.
/**
* Convenience method that displays popup with the specified message beside the
@@ -188,7 +188,7 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &text, QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( const TQString &text, TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified caption and message
@@ -196,8 +196,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified icon, caption and
@@ -205,9 +205,9 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name=0, int timeout = -1 );
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name=0, int timeout = -1 );
/**
* Convenience method that displays popup with the specified icon, caption and
@@ -215,8 +215,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- const QPixmap &icon,
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
WId parent, const char *name=0, int timeout = -1 );
/**
@@ -225,7 +225,7 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &text, QWidget *parent,
+ static KPassivePopup *message( int popupStyle, const TQString &text, TQWidget *parent,
const char *name=0 );
/**
@@ -234,8 +234,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified popup-style, icon, caption and
@@ -243,9 +243,9 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name=0, int timeout = -1 );
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name=0, int timeout = -1 );
/**
* Convenience method that displays popup with the specified popup-style, icon, caption and
@@ -253,8 +253,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
WId parent, const char *name=0, int timeout = -1 );
@@ -278,7 +278,7 @@ public slots:
* Shows the popup in the given point
* @since 3.5
*/
- void show(const QPoint &p);
+ void show(const TQPoint &p);
signals:
/**
@@ -289,7 +289,7 @@ signals:
/**
* Emitted when the popup is clicked.
*/
- void clicked( QPoint pos );
+ void clicked( TQPoint pos );
protected:
/**
@@ -301,27 +301,27 @@ protected:
* Reimplemented to destroy the object when autoDelete() is
* enabled.
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
/**
* Moves the popup to be adjacent to the icon of the specified rectangle.
*/
- void moveNear( QRect target );
+ void moveNear( TQRect target );
/**
* Reimplemented to detect mouse clicks.
*/
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
/**
* If no relative window (eg taskbar button, system tray window) is
* available, use this rectangle (pass it to moveNear()).
* Basically KWinModule::workArea() with width and height set to 0
* so that moveNear uses the upper-left position.
- * @return The QRect to be passed to moveNear() if no other is
+ * @return The TQRect to be passed to moveNear() if no other is
* available.
*/
- QRect defaultArea() const;
+ TQRect defaultArea() const;
/**
* Updates the transparency mask. Unused if PopupStyle == Boxed
@@ -333,20 +333,20 @@ protected:
* Overwrite to paint the border when PopupStyle == Balloon.
* Unused if PopupStyle == Boxed
*/
- virtual void paintEvent( QPaintEvent* pe );
+ virtual void paintEvent( TQPaintEvent* pe );
private:
void init( int popupStyle );
WId window;
- QWidget *msgView;
- QBoxLayout *topLayout;
+ TQWidget *msgView;
+ TQBoxLayout *topLayout;
int hideDelay;
- QTimer *hideTimer;
+ TQTimer *hideTimer;
- QLabel *ttlIcon;
- QLabel *ttl;
- QLabel *msg;
+ TQLabel *ttlIcon;
+ TQLabel *ttl;
+ TQLabel *msg;
bool m_autoDelete;
diff --git a/kdeui/kpixmapio.cpp b/kdeui/kpixmapio.cpp
index fd2854fb0..74c68b82e 100644
--- a/kdeui/kpixmapio.cpp
+++ b/kdeui/kpixmapio.cpp
@@ -13,10 +13,10 @@
#include "kpixmapio.h"
#include "config.h"
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qglobal.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqglobal.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -108,8 +108,8 @@ KPixmapIO::KPixmapIO()
// Sort out bit format. Create a temporary XImage for this.
d->shminfo = new XShmSegmentInfo;
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) QPaintDevice::x11AppVisual(),
- QPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, 10, 10);
+ d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, 10, 10);
d->bpp = d->ximage->bits_per_pixel;
d->first_try = true;
int bpp = d->bpp;
@@ -184,17 +184,17 @@ KPixmapIO::~KPixmapIO()
}
-QPixmap KPixmapIO::convertToPixmap(const QImage &img)
+TQPixmap KPixmapIO::convertToPixmap(const TQImage &img)
{
int size = img.width() * img.height();
if (m_bShm && (img.depth() > 1) && (d->bpp > 8) && (size > d->threshold))
{
- QPixmap dst(img.width(), img.height());
+ TQPixmap dst(img.width(), img.height());
putImage(&dst, 0, 0, &img);
return dst;
} else
{
- QPixmap dst;
+ TQPixmap dst;
dst.convertFromImage(img);
return dst;
}
@@ -202,9 +202,9 @@ QPixmap KPixmapIO::convertToPixmap(const QImage &img)
}
-QImage KPixmapIO::convertToImage(const QPixmap &pm)
+TQImage KPixmapIO::convertToImage(const TQPixmap &pm)
{
- QImage image;
+ TQImage image;
int size = pm.width() * pm.height();
if (m_bShm && (d->bpp >= 8) && (size > d->threshold))
image = getImage(&pm, 0, 0, pm.width(), pm.height());
@@ -214,14 +214,14 @@ QImage KPixmapIO::convertToImage(const QPixmap &pm)
}
-void KPixmapIO::putImage(QPixmap *dst, const QPoint &offset,
- const QImage *src)
+void KPixmapIO::putImage(TQPixmap *dst, const TQPoint &offset,
+ const TQImage *src)
{
putImage(dst, offset.x(), offset.y(), src);
}
-void KPixmapIO::putImage(QPixmap *dst, int dx, int dy, const QImage *src)
+void KPixmapIO::putImage(TQPixmap *dst, int dx, int dy, const TQImage *src)
{
int size = src->width() * src->height();
bool fallback = true;
@@ -242,22 +242,22 @@ void KPixmapIO::putImage(QPixmap *dst, int dx, int dy, const QImage *src)
}
if( fallback )
{
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(*src);
bitBlt(dst, dx, dy, &pix, 0, 0, pix.width(), pix.height());
}
}
-QImage KPixmapIO::getImage(const QPixmap *src, const QRect &rect)
+TQImage KPixmapIO::getImage(const TQPixmap *src, const TQRect &rect)
{
return getImage(src, rect.x(), rect.y(), rect.width(), rect.height());
}
-QImage KPixmapIO::getImage(const QPixmap *src, int sx, int sy, int sw, int sh)
+TQImage KPixmapIO::getImage(const TQPixmap *src, int sx, int sy, int sw, int sh)
{
- QImage image;
+ TQImage image;
int size = src->width() * src->height();
bool fallback = true;
if ((m_bShm) && (d->bpp >= 8) && (size > d->threshold))
@@ -274,7 +274,7 @@ QImage KPixmapIO::getImage(const QPixmap *src, int sx, int sy, int sw, int sh)
}
if( fallback )
{
- QPixmap pix(sw, sh);
+ TQPixmap pix(sw, sh);
bitBlt(&pix, 0, 0, src, sx, sy, sw, sh);
image = pix.convertToImage();
}
@@ -353,8 +353,8 @@ void KPixmapIO::destroyXImage()
bool KPixmapIO::createXImage(int w, int h)
{
destroyXImage();
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) QPaintDevice::x11AppVisual(),
- QPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, w, h);
+ d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, w, h);
return d->ximage != None;
}
@@ -446,14 +446,14 @@ bool KPixmapIO::createShmSegment(int size)
* loop as possible.
*/
-QImage KPixmapIO::convertFromXImage()
+TQImage KPixmapIO::convertFromXImage()
{
int x, y;
int width = d->ximage->width, height = d->ximage->height;
int bpl = d->ximage->bytes_per_line;
char *data = d->ximage->data;
- QImage image;
+ TQImage image;
if (d->bpp == 8)
{
image.create(width, height, 8);
@@ -464,7 +464,7 @@ QImage KPixmapIO::convertFromXImage()
XColor *cmap = new XColor[ncells];
for (i=0; i<ncells; i++)
cmap[i].pixel = i;
- XQueryColors(qt_xdisplay(), QPaintDevice::x11AppColormap(),
+ XQueryColors(qt_xdisplay(), TQPaintDevice::x11AppColormap(),
cmap, ncells);
image.setNumColors(ncells);
for (i=0; i<ncells; i++)
@@ -622,7 +622,7 @@ QImage KPixmapIO::convertFromXImage()
}
-void KPixmapIO::convertToXImage(const QImage &img)
+void KPixmapIO::convertToXImage(const TQImage &img)
{
int x, y;
int width = d->ximage->width, height = d->ximage->height;
@@ -902,7 +902,7 @@ bool KPixmapIO::createXImage(int, int) { return false; }
void KPixmapIO::destroyXImage() {}
bool KPixmapIO::createShmSegment(int) { return false; }
void KPixmapIO::destroyShmSegment() {}
-QImage KPixmapIO::convertFromXImage() { return QImage(); }
-void KPixmapIO::convertToXImage(const QImage &) {}
+TQImage KPixmapIO::convertFromXImage() { return TQImage(); }
+void KPixmapIO::convertToXImage(const TQImage &) {}
#endif // HAVE_MITSHM
diff --git a/kdeui/kpixmapio.h b/kdeui/kpixmapio.h
index 26d84d39c..62549e6e1 100644
--- a/kdeui/kpixmapio.h
+++ b/kdeui/kpixmapio.h
@@ -19,11 +19,11 @@ class QPoint;
class QRect;
struct KPixmapIOPrivate;
/**
- * @short Fast QImage to/from QPixmap conversion.
+ * @short Fast TQImage to/from TQPixmap conversion.
* @author Geert Jansen <jansen@kde.org>
* @version $Id$
*
- * KPixmapIO implements a fast path for QPixmap to/from QImage conversions.
+ * KPixmapIO implements a fast path for TQPixmap to/from TQImage conversions.
* It uses the MIT-SHM shared memory extension for this. If this extension is
* not available, it will fall back to standard Qt methods.
*
@@ -95,14 +95,14 @@ public:
* @param image The image to convert.
* @return The pixmap containing the image.
*/
- QPixmap convertToPixmap(const QImage &image);
+ TQPixmap convertToPixmap(const TQImage &image);
/**
* Convert a pixmap to an image.
* @param pixmap The pixmap to convert.
* @return The image.
*/
- QImage convertToImage(const QPixmap &pixmap);
+ TQImage convertToImage(const TQPixmap &pixmap);
/**
* Bitblt an image onto a pixmap.
@@ -111,13 +111,13 @@ public:
* @param dy Destination y offset.
* @param src The image to load.
*/
- void putImage(QPixmap *dst, int dx, int dy, const QImage *src);
+ void putImage(TQPixmap *dst, int dx, int dy, const TQImage *src);
/**
* This function is identical to the one above. It only differs in the
* arguments it accepts.
*/
- void putImage(QPixmap *dst, const QPoint &offset, const QImage *src);
+ void putImage(TQPixmap *dst, const TQPoint &offset, const TQImage *src);
/**
* Transfer (a part of) a pixmap to an image.
@@ -128,13 +128,13 @@ public:
* @param sh Source height.
* @return The image.
*/
- QImage getImage(const QPixmap *src, int sx, int sy, int sw, int sh);
+ TQImage getImage(const TQPixmap *src, int sx, int sy, int sw, int sh);
/**
* This function is identical to the one above. It only differs in the
* arguments it accepts.
*/
- QImage getImage(const QPixmap *src, const QRect &rect);
+ TQImage getImage(const TQPixmap *src, const TQRect &rect);
/**
* Shared memory allocation policies.
@@ -176,8 +176,8 @@ private:
void destroyXImage();
bool createShmSegment(int size);
void destroyShmSegment();
- void convertToXImage(const QImage &);
- QImage convertFromXImage();
+ void convertToXImage(const TQImage &);
+ TQImage convertFromXImage();
private:
KPixmapIOPrivate* d;
};
diff --git a/kdeui/kpixmapregionselectordialog.cpp b/kdeui/kpixmapregionselectordialog.cpp
index ee9d185ea..c394af0f3 100644
--- a/kdeui/kpixmapregionselectordialog.cpp
+++ b/kdeui/kpixmapregionselectordialog.cpp
@@ -19,16 +19,16 @@
#include "kpixmapregionselectordialog.h"
#include <kdialogbase.h>
-#include <qdialog.h>
-#include <qdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqdesktopwidget.h>
#include <klocale.h>
#include <kdialog.h>
-KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent,
+KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent,
const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true )
{
- QVBox *vbox=new QVBox(this);
- new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
+ TQVBox *vbox=new TQVBox(this);
+ new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox);
vbox->setSpacing( KDialog::spacingHint() );
@@ -40,86 +40,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog()
{
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
diff --git a/kdeui/kpixmapregionselectordialog.h b/kdeui/kpixmapregionselectordialog.h
index 88c315fe9..5828ecdc1 100644
--- a/kdeui/kpixmapregionselectordialog.h
+++ b/kdeui/kpixmapregionselectordialog.h
@@ -20,7 +20,7 @@
#ifndef __KPIXMAPREGIONSELECTORDIALOG_H__
#define __KPIXMAPREGIONSELECTORDIALOG_H__
-#include <qimage.h>
+#include <tqimage.h>
#include <kdialogbase.h>
#include <kpixmapregionselectorwidget.h>
@@ -47,7 +47,7 @@ public:
* later the setPixmap method of the KPixmapRegionSelectorWidget widget of
* the new object.
*/
- KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L,
+ KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L,
bool modal = false );
/**
* The destructor of the dialog
@@ -68,7 +68,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -78,7 +78,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -87,7 +87,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -97,7 +97,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
protected:
KPixmapRegionSelectorWidget *m_pixmapSelectorWidget;
diff --git a/kdeui/kpixmapregionselectorwidget.cpp b/kdeui/kpixmapregionselectorwidget.cpp
index da2be5f92..ada867bba 100644
--- a/kdeui/kpixmapregionselectorwidget.cpp
+++ b/kdeui/kpixmapregionselectorwidget.cpp
@@ -24,29 +24,29 @@
*/
#include "kpixmapregionselectorwidget.h"
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqlayout.h>
#include <kimageeffect.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kaction.h>
#include <stdlib.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
-KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent,
- const char *name) : QWidget( parent, name)
+KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent,
+ const char *name) : TQWidget( parent, name)
{
- QHBoxLayout * hboxLayout=new QHBoxLayout( this );
+ TQHBoxLayout * hboxLayout=new TQHBoxLayout( this );
hboxLayout->addStretch();
- QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout );
+ TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout );
vboxLayout->addStretch();
- m_label = new QLabel(this, "pixmapHolder");
+ m_label = new TQLabel(this, "pixmapHolder");
m_label->setBackgroundMode( Qt::NoBackground );
m_label->installEventFilter( this );
@@ -64,7 +64,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget()
{
}
-void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap )
+void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap )
{
Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps.
m_originalPixmap = pixmap;
@@ -79,12 +79,12 @@ void KPixmapRegionSelectorWidget::resetSelection()
updatePixmap();
}
-QRect KPixmapRegionSelectorWidget::selectedRegion() const
+TQRect KPixmapRegionSelectorWidget::selectedRegion() const
{
return m_selectedRegion;
}
-void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
+void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect)
{
if (!rect.isValid()) resetSelection();
else
@@ -92,7 +92,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
m_selectedRegion=rect;
updatePixmap();
- QRect r=unzoomedSelectedRegion();
+ TQRect r=unzoomedSelectedRegion();
}
}
@@ -102,7 +102,7 @@ void KPixmapRegionSelectorWidget::updatePixmap()
if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() );
if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() );
- QPainter painter;
+ TQPainter painter;
if (m_linedPixmap.isNull())
{
m_linedPixmap = m_originalPixmap;
@@ -110,21 +110,21 @@ void KPixmapRegionSelectorWidget::updatePixmap()
painter.begin(&m_linedPixmap);
painter.setRasterOp( Qt::XorROP );
painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(),
- QBrush( QColor(255,255,255), Qt::BDiagPattern) );
+ TQBrush( TQColor(255,255,255), Qt::BDiagPattern) );
painter.end();
- QImage image=m_linedPixmap.convertToImage();
- image=KImageEffect::fade(image, (float)0.4, QColor(0,0,0));
+ TQImage image=m_linedPixmap.convertToImage();
+ image=KImageEffect::fade(image, (float)0.4, TQColor(0,0,0));
m_linedPixmap.convertFromImage(image);
}
- QPixmap pixmap = m_linedPixmap;
+ TQPixmap pixmap = m_linedPixmap;
painter.begin(&pixmap);
painter.drawPixmap( m_selectedRegion.topLeft(),
m_originalPixmap, m_selectedRegion );
- painter.setPen( QColor(255,255,255) );
+ painter.setPen( TQColor(255,255,255) );
painter.setRasterOp( Qt::XorROP );
painter.drawRect( m_selectedRegion );
@@ -141,12 +141,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu()
popup->insertTitle(i18n("Image Operations"));
KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw",
- 0, this, SLOT(rotateClockwise()),
+ 0, this, TQT_SLOT(rotateClockwise()),
popup, "rotateclockwise");
action->plug(popup);
action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw",
- 0, this, SLOT(rotateCounterclockwise()),
+ 0, this, TQT_SLOT(rotateCounterclockwise()),
popup, "rotatecounterclockwise");
action->plug(popup);
@@ -161,7 +161,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
{
int w=m_originalPixmap.width();
int h=m_originalPixmap.height();
- QImage img=m_unzoomedPixmap.convertToImage();
+ TQImage img=m_unzoomedPixmap.convertToImage();
img= KImageEffect::rotate(img, direction);
m_unzoomedPixmap.convertFromImage(img);
@@ -169,7 +169,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
img= KImageEffect::rotate(img, direction);
m_originalPixmap.convertFromImage(img);
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1)
resetSelection();
@@ -206,12 +206,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise()
rotate(KImageEffect::Rotate270);
}
-bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
+bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev)
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
- //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
+ //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( mev->button() == RightButton )
{
@@ -221,7 +221,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
};
- QCursor cursor;
+ TQCursor cursor;
if ( m_selectedRegion.contains( mev->pos() )
&& m_selectedRegion!=m_originalPixmap.rect() )
@@ -234,7 +234,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
m_state=Resizing;
cursor.setShape( Qt::CrossCursor );
}
- QApplication::setOverrideCursor(cursor);
+ TQApplication::setOverrideCursor(cursor);
m_tempFirstClick=mev->pos();
@@ -242,11 +242,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
}
- if ( ev->type() == QEvent::MouseMove )
+ if ( ev->type() == TQEvent::MouseMove )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
- //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( m_state == Resizing )
{
@@ -300,26 +300,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
}
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
if ( m_state == Resizing && mev->pos() == m_tempFirstClick)
resetSelection();
m_state=None;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return TRUE;
}
- QWidget::eventFilter(obj, ev);
+ TQWidget::eventFilter(obj, ev);
return FALSE;
}
-QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint )
+TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint )
{
- QPoint endPoint = _endPoint;
+ TQPoint endPoint = _endPoint;
if ( endPoint.x() < 0 ) endPoint.setX(0);
else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width());
if ( endPoint.y() < 0 ) endPoint.setY(0);
@@ -382,20 +382,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP
x=startPoint.x()-w;
}
- return QRect(x,y,w,h);
+ return TQRect(x,y,w,h);
}
-QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
+TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
{
- return QRect((int)(m_selectedRegion.x()/m_zoomFactor),
+ return TQRect((int)(m_selectedRegion.x()/m_zoomFactor),
(int)(m_selectedRegion.y()/m_zoomFactor),
(int)(m_selectedRegion.width()/m_zoomFactor),
(int)(m_selectedRegion.height()/m_zoomFactor));
}
-QImage KPixmapRegionSelectorWidget::selectedImage() const
+TQImage KPixmapRegionSelectorWidget::selectedImage() const
{
- QImage origImage=m_unzoomedPixmap.convertToImage();
+ TQImage origImage=m_unzoomedPixmap.convertToImage();
return origImage.copy(unzoomedSelectedRegion());
}
@@ -415,25 +415,25 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
m_maxHeight=height;
m_originalPixmap=m_unzoomedPixmap;
- if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect();
+ if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect();
-// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl;
-// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
+// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl;
+// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
if ( !m_originalPixmap.isNull() &&
( m_originalPixmap.width() > m_maxWidth ||
m_originalPixmap.height() > m_maxHeight ) )
{
/* We have to resize the pixmap to get it complete on the screen */
- QImage image=m_originalPixmap.convertToImage();
- m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) );
+ TQImage image=m_originalPixmap.convertToImage();
+ m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) );
double oldZoomFactor = m_zoomFactor;
m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width();
if (m_selectedRegion.isValid())
{
m_selectedRegion=
- QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
+ TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) );
@@ -442,7 +442,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect();
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
updatePixmap();
resize(m_label->width(), m_label->height());
}
diff --git a/kdeui/kpixmapregionselectorwidget.h b/kdeui/kpixmapregionselectorwidget.h
index c865aa2a8..f88119755 100644
--- a/kdeui/kpixmapregionselectorwidget.h
+++ b/kdeui/kpixmapregionselectorwidget.h
@@ -19,10 +19,10 @@
#ifndef __KPIXMAPREGIONSELECTORWIDGET_H__
#define __KPIXMAPREGIONSELECTORWIDGET_H__
-#include <qvbox.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqlabel.h>
#include <kimageeffect.h>
class KPopupMenu;
@@ -48,7 +48,7 @@ public:
/**
* Constructor for a KPixmapRegionSelectorWidget.
*/
- KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L);
+ KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L);
/**
* Destructor for a KPixmapRegionSelectorWidget
@@ -60,28 +60,28 @@ public:
* @param pixmap The pixmap. Must be non-null.
*
*/
- void setPixmap( const QPixmap &pixmap );
+ void setPixmap( const TQPixmap &pixmap );
/**
* @return the original whole pixmap that we're using in this widget as the
* pixmap the user is selecting a region from.
*/
- QPixmap pixmap() const { return m_unzoomedPixmap; }
+ TQPixmap pixmap() const { return m_unzoomedPixmap; }
/**
* Sets the selected region to be @p rect (in zoomed pixmap coordinates)
*/
- void setSelectedRegion(const QRect &rect);
+ void setSelectedRegion(const TQRect &rect);
/**
* Returns the selected region ( in zoomed pixmap coordinates )
*/
- QRect selectedRegion() const;
+ TQRect selectedRegion() const;
/**
* Returns the selected region ( in unzoomed, original pixmap coordinates )
*/
- QRect unzoomedSelectedRegion() const;
+ TQRect unzoomedSelectedRegion() const;
/**
* Resets the selection to use the whole image
@@ -89,10 +89,10 @@ public:
void resetSelection();
/**
- * @returns a QImage object with just the region the user selected from the
+ * @returns a TQImage object with just the region the user selected from the
* image
*/
- QImage selectedImage() const;
+ TQImage selectedImage() const;
/**
* Sets the aspect ration that the selected subimage should have. The way to
@@ -140,7 +140,7 @@ protected:
virtual KPopupMenu *createPopupMenu();
private:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
/**
* Recalculates the pixmap that is shown based on the current selected area,
@@ -148,18 +148,18 @@ private:
*/
void updatePixmap();
- QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint );
+ TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint );
enum CursorState { None=0, Resizing, Moving };
CursorState m_state;
- QPixmap m_unzoomedPixmap;
- QPixmap m_originalPixmap;
- QPixmap m_linedPixmap;
- QRect m_selectedRegion;
- QLabel *m_label;
+ TQPixmap m_unzoomedPixmap;
+ TQPixmap m_originalPixmap;
+ TQPixmap m_linedPixmap;
+ TQRect m_selectedRegion;
+ TQLabel *m_label;
- QPoint m_tempFirstClick;
+ TQPoint m_tempFirstClick;
double m_forcedAspectRatio;
int m_maxWidth, m_maxHeight;
diff --git a/kdeui/kpopupmenu.cpp b/kdeui/kpopupmenu.cpp
index 6f7fbf374..6765216b4 100644
--- a/kdeui/kpopupmenu.cpp
+++ b/kdeui/kpopupmenu.cpp
@@ -16,40 +16,40 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include "kpopupmenu.h"
#include <kdebug.h>
#include <kapplication.h>
-KPopupTitle::KPopupTitle(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KPopupTitle::KPopupTitle(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setMinimumSize(16, fontMetrics().height()+8);
}
KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */,
- const QColor &/* color */, const QColor &/* textColor */,
- QWidget *parent, const char *name)
- : QWidget(parent, name)
+ const TQColor &/* color */, const TQColor &/* textColor */,
+ TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
calcSize();
}
-KPopupTitle::KPopupTitle(const KPixmap & /* background */, const QColor &/* color */,
- const QColor &/* textColor */, QWidget *parent,
+KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* color */,
+ const TQColor &/* textColor */, TQWidget *parent,
const char *name)
- : QWidget(parent, name)
+ : TQWidget(parent, name)
{
calcSize();
}
-void KPopupTitle::setTitle(const QString &text, const QPixmap *icon)
+void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon)
{
titleStr = text;
if (icon)
@@ -60,13 +60,13 @@ void KPopupTitle::setTitle(const QString &text, const QPixmap *icon)
calcSize();
}
-void KPopupTitle::setText( const QString &text )
+void KPopupTitle::setText( const TQString &text )
{
titleStr = text;
calcSize();
}
-void KPopupTitle::setIcon( const QPixmap &pix )
+void KPopupTitle::setIcon( const TQPixmap &pix )
{
miniicon = pix;
calcSize();
@@ -74,18 +74,18 @@ void KPopupTitle::setIcon( const QPixmap &pix )
void KPopupTitle::calcSize()
{
- QFont f = font();
+ TQFont f = font();
f.setBold(true);
- int w = miniicon.width()+QFontMetrics(f).width(titleStr);
+ int w = miniicon.width()+TQFontMetrics(f).width(titleStr);
int h = QMAX( fontMetrics().height(), miniicon.height() );
setMinimumSize( w+16, h+8 );
}
-void KPopupTitle::paintEvent(QPaintEvent *)
+void KPopupTitle::paintEvent(TQPaintEvent *)
{
- QRect r(rect());
- QPainter p(this);
- kapp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active());
+ TQRect r(rect());
+ TQPainter p(this);
+ kapp->style().drawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active());
if (!miniicon.isNull())
p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon);
@@ -93,7 +93,7 @@ void KPopupTitle::paintEvent(QPaintEvent *)
if (!titleStr.isNull())
{
p.setPen(palette().active().text());
- QFont f = p.font();
+ TQFont f = p.font();
f.setBold(true);
p.setFont(f);
if(!miniicon.isNull())
@@ -110,7 +110,7 @@ void KPopupTitle::paintEvent(QPaintEvent *)
}
}
-QSize KPopupTitle::sizeHint() const
+TQSize KPopupTitle::sizeHint() const
{
return minimumSize();
}
@@ -132,23 +132,23 @@ public:
delete m_ctxMenu;
}
- QString m_lastTitle;
+ TQString m_lastTitle;
// variables for keyboard navigation
- QTimer clearTimer;
+ TQTimer clearTimer;
bool noMatches : 1;
bool shortcuts : 1;
bool autoExec : 1;
- QString keySeq;
- QString originalText;
+ TQString keySeq;
+ TQString originalText;
int lastHitIndex;
Qt::ButtonState state;
// support for RMB menus on menus
- QPopupMenu* m_ctxMenu;
+ TQPopupMenu* m_ctxMenu;
static bool s_continueCtxMenuShow;
static int s_highlightedItem;
static KPopupMenu* s_contextedMenu;
@@ -158,12 +158,12 @@ int KPopupMenu::KPopupMenuPrivate::s_highlightedItem(-1);
KPopupMenu* KPopupMenu::KPopupMenuPrivate::s_contextedMenu(0);
bool KPopupMenu::KPopupMenuPrivate::s_continueCtxMenuShow(true);
-KPopupMenu::KPopupMenu(QWidget *parent, const char *name)
- : QPopupMenu(parent, name)
+KPopupMenu::KPopupMenu(TQWidget *parent, const char *name)
+ : TQPopupMenu(parent, name)
{
d = new KPopupMenuPrivate;
resetKeyboardVars();
- connect(&(d->clearTimer), SIGNAL(timeout()), SLOT(resetKeyboardVars()));
+ connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars()));
}
KPopupMenu::~KPopupMenu()
@@ -177,7 +177,7 @@ KPopupMenu::~KPopupMenu()
delete d;
}
-int KPopupMenu::insertTitle(const QString &text, int id, int index)
+int KPopupMenu::insertTitle(const TQString &text, int id, int index)
{
KPopupTitle *titleItem = new KPopupTitle();
titleItem->setTitle(text);
@@ -186,7 +186,7 @@ int KPopupMenu::insertTitle(const QString &text, int id, int index)
return ret;
}
-int KPopupMenu::insertTitle(const QPixmap &icon, const QString &text, int id,
+int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id,
int index)
{
KPopupTitle *titleItem = new KPopupTitle();
@@ -196,9 +196,9 @@ int KPopupMenu::insertTitle(const QPixmap &icon, const QString &text, int id,
return ret;
}
-void KPopupMenu::changeTitle(int id, const QString &text)
+void KPopupMenu::changeTitle(int id, const TQString &text)
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
((KPopupTitle *)item->widget())->setTitle(text);
@@ -213,9 +213,9 @@ void KPopupMenu::changeTitle(int id, const QString &text)
#endif
}
-void KPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text)
+void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text)
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
((KPopupTitle *)item->widget())->setTitle(text, &icon);
@@ -230,11 +230,11 @@ void KPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text)
#endif
}
-QString KPopupMenu::title(int id) const
+TQString KPopupMenu::title(int id) const
{
if(id == -1) // obsolete
return d->m_lastTitle;
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
return ((KPopupTitle *)item->widget())->title();
@@ -243,12 +243,12 @@ QString KPopupMenu::title(int id) const
}
else
qWarning("KPopupMenu: title() called with invalid id %d.", id);
- return QString::null;
+ return TQString::null;
}
-QPixmap KPopupMenu::titlePixmap(int id) const
+TQPixmap KPopupMenu::titlePixmap(int id) const
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
return ((KPopupTitle *)item->widget())->icon();
@@ -257,24 +257,24 @@ QPixmap KPopupMenu::titlePixmap(int id) const
}
else
qWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id);
- QPixmap tmp;
+ TQPixmap tmp;
return tmp;
}
/**
* This is re-implemented for keyboard navigation.
*/
-void KPopupMenu::closeEvent(QCloseEvent*e)
+void KPopupMenu::closeEvent(TQCloseEvent*e)
{
if (d->shortcuts)
resetKeyboardVars();
- QPopupMenu::closeEvent(e);
+ TQPopupMenu::closeEvent(e);
}
void KPopupMenu::activateItemAt(int index)
{
d->state = Qt::NoButton;
- QPopupMenu::activateItemAt(index);
+ TQPopupMenu::activateItemAt(index);
}
Qt::ButtonState KPopupMenu::state() const
@@ -282,20 +282,20 @@ Qt::ButtonState KPopupMenu::state() const
return d->state;
}
-void KPopupMenu::keyPressEvent(QKeyEvent* e)
+void KPopupMenu::keyPressEvent(TQKeyEvent* e)
{
d->state = Qt::NoButton;
if (!d->shortcuts) {
// continue event processing by Qpopup
//e->ignore();
d->state = e->state();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
return;
}
int i = 0;
bool firstpass = true;
- QString keyString = e->text();
+ TQString keyString = e->text();
// check for common commands dealt with by QPopup
int key = e->key();
@@ -307,10 +307,10 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// continue event processing by Qpopup
//e->ignore();
d->state = e->state();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
return;
} else if ( key == Key_Shift || key == Key_Control || key == Key_Alt || key == Key_Meta )
- return QPopupMenu::keyPressEvent(e);
+ return TQPopupMenu::keyPressEvent(e);
// check to see if the user wants to remove a key from the sequence (backspace)
// or clear the sequence (delete)
@@ -366,7 +366,7 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
if (!isItemEnabled(j))
continue;
- QString thisText;
+ TQString thisText;
// retrieve the right text
// (the last selected item one may have additional ampersands)
@@ -377,7 +377,7 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// if there is an accelerator present, remove it
if ((int)accel(j) != 0)
- thisText = thisText.replace("&", QString::null);
+ thisText = thisText.replace("&", TQString::null);
// chop text to the search length
thisText = thisText.left(seqLen);
@@ -437,18 +437,18 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// no matches whatsoever, clean up
resetKeyboardVars(true);
//e->ignore();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
}
bool KPopupMenu::focusNextPrevChild( bool next )
{
resetKeyboardVars();
- return QPopupMenu::focusNextPrevChild( next );
+ return TQPopupMenu::focusNextPrevChild( next );
}
-QString KPopupMenu::underlineText(const QString& text, uint length)
+TQString KPopupMenu::underlineText(const TQString& text, uint length)
{
- QString ret = text;
+ TQString ret = text;
for (uint i = 0; i < length; i++) {
if (ret[2*i] != '&')
ret.insert(2*i, "&");
@@ -465,7 +465,7 @@ void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */)
}
if (!noMatches) {
- d->keySeq = QString::null;
+ d->keySeq = TQString::null;
}
d->noMatches = noMatches;
@@ -488,7 +488,7 @@ void KPopupMenu::setKeyboardShortcutsExecute(bool enable)
* RMB menus on menus
*/
-void KPopupMenu::mousePressEvent(QMouseEvent* e)
+void KPopupMenu::mousePressEvent(TQMouseEvent* e)
{
if (d->m_ctxMenu && d->m_ctxMenu->isVisible())
{
@@ -496,30 +496,30 @@ void KPopupMenu::mousePressEvent(QMouseEvent* e)
d->m_ctxMenu->hide();
}
- QPopupMenu::mousePressEvent(e);
+ TQPopupMenu::mousePressEvent(e);
}
-void KPopupMenu::mouseReleaseEvent(QMouseEvent* e)
+void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e)
{
// Save the button, and the modifiers from state()
d->state = Qt::ButtonState(e->button() | (e->state() & KeyButtonMask));
if ( !d->m_ctxMenu || !d->m_ctxMenu->isVisible() )
- QPopupMenu::mouseReleaseEvent(e);
+ TQPopupMenu::mouseReleaseEvent(e);
}
-QPopupMenu* KPopupMenu::contextMenu()
+TQPopupMenu* KPopupMenu::contextMenu()
{
if (!d->m_ctxMenu)
{
- d->m_ctxMenu = new QPopupMenu(this);
- connect(d->m_ctxMenu, SIGNAL(aboutToHide()), this, SLOT(ctxMenuHiding()));
+ d->m_ctxMenu = new TQPopupMenu(this);
+ connect(d->m_ctxMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(ctxMenuHiding()));
}
return d->m_ctxMenu;
}
-const QPopupMenu* KPopupMenu::contextMenu() const
+const TQPopupMenu* KPopupMenu::contextMenu() const
{
return const_cast< KPopupMenu* >( this )->contextMenu();
}
@@ -547,18 +547,18 @@ void KPopupMenu::itemHighlighted(int /* whichItem */)
}
d->m_ctxMenu->hide();
- showCtxMenu(mapFromGlobal(QCursor::pos()));
+ showCtxMenu(mapFromGlobal(TQCursor::pos()));
}
-void KPopupMenu::showCtxMenu(QPoint pos)
+void KPopupMenu::showCtxMenu(TQPoint pos)
{
- QMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
+ TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
if (item)
{
- QPopupMenu* subMenu = item->popup();
+ TQPopupMenu* subMenu = item->popup();
if (subMenu)
{
- disconnect(subMenu, SIGNAL(aboutToShow()), this, SLOT(ctxMenuHideShowingMenu()));
+ disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu()));
}
}
@@ -572,11 +572,11 @@ void KPopupMenu::showCtxMenu(QPoint pos)
emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu);
- QPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
+ TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
if (subMenu)
{
- connect(subMenu, SIGNAL(aboutToShow()), SLOT(ctxMenuHideShowingMenu()));
- QTimer::singleShot(100, subMenu, SLOT(hide()));
+ connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu()));
+ TQTimer::singleShot(100, subMenu, TQT_SLOT(hide()));
}
if (!KPopupMenuPrivate::s_continueCtxMenuShow)
@@ -587,7 +587,7 @@ void KPopupMenu::showCtxMenu(QPoint pos)
KPopupMenuPrivate::s_contextedMenu = this;
d->m_ctxMenu->popup(this->mapToGlobal(pos));
- connect(this, SIGNAL(highlighted(int)), this, SLOT(itemHighlighted(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int)));
}
/*
@@ -596,13 +596,13 @@ void KPopupMenu::showCtxMenu(QPoint pos)
*/
void KPopupMenu::ctxMenuHideShowingMenu()
{
- QMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
+ TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
if (item)
{
- QPopupMenu* subMenu = item->popup();
+ TQPopupMenu* subMenu = item->popup();
if (subMenu)
{
- QTimer::singleShot(0, subMenu, SLOT(hide()));
+ TQTimer::singleShot(0, subMenu, TQT_SLOT(hide()));
}
}
}
@@ -611,22 +611,22 @@ void KPopupMenu::ctxMenuHiding()
{
if (KPopupMenuPrivate::s_highlightedItem)
{
- QPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
+ TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
if (subMenu)
{
- disconnect(subMenu, SIGNAL(aboutToShow()), this, SLOT(ctxMenuHideShowingMenu()));
+ disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu()));
}
}
- disconnect(this, SIGNAL(highlighted(int)), this, SLOT(itemHighlighted(int)));
+ disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int)));
KPopupMenuPrivate::s_continueCtxMenuShow = true;
}
-void KPopupMenu::contextMenuEvent(QContextMenuEvent* e)
+void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e)
{
if (d->m_ctxMenu)
{
- if (e->reason() == QContextMenuEvent::Mouse)
+ if (e->reason() == TQContextMenuEvent::Mouse)
{
showCtxMenu(e->pos());
}
@@ -639,19 +639,19 @@ void KPopupMenu::contextMenuEvent(QContextMenuEvent* e)
return;
}
- QPopupMenu::contextMenuEvent(e);
+ TQPopupMenu::contextMenuEvent(e);
}
-void KPopupMenu::hideEvent(QHideEvent*)
+void KPopupMenu::hideEvent(TQHideEvent*)
{
if (d->m_ctxMenu && d->m_ctxMenu->isVisible())
{
// we need to block signals here when the ctxMenu is showing
- // to prevent the QPopupMenu::activated(int) signal from emitting
+ // to prevent the TQPopupMenu::activated(int) signal from emitting
// when hiding with a context menu, the user doesn't expect the
// menu to actually do anything.
// since hideEvent gets called very late in the process of hiding
- // (deep within QWidget::hide) the activated(int) signal is the
+ // (deep within TQWidget::hide) the activated(int) signal is the
// last signal to be emitted, even after things like aboutToHide()
// AJS
blockSignals(true);
@@ -664,15 +664,15 @@ void KPopupMenu::hideEvent(QHideEvent*)
*/
// Obsolete
-KPopupMenu::KPopupMenu(const QString& title, QWidget *parent, const char *name)
- : QPopupMenu(parent, name)
+KPopupMenu::KPopupMenu(const TQString& title, TQWidget *parent, const char *name)
+ : TQPopupMenu(parent, name)
{
d = new KPopupMenuPrivate;
insertTitle(title);
}
// Obsolete
-void KPopupMenu::setTitle(const QString &title)
+void KPopupMenu::setTitle(const TQString &title)
{
KPopupTitle *titleItem = new KPopupTitle();
titleItem->setTitle(title);
diff --git a/kdeui/kpopupmenu.h b/kdeui/kpopupmenu.h
index 7c392b61e..55ebbad8d 100644
--- a/kdeui/kpopupmenu.h
+++ b/kdeui/kpopupmenu.h
@@ -20,7 +20,7 @@
#define INCLUDE_MENUITEM_DEF
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kpixmapeffect.h>
#include <kpixmap.h>
#include <kdelibs_export.h>
@@ -44,55 +44,55 @@ public:
* Constructs a title widget with the user specified gradient, pixmap,
* and colors.
*/
- KPopupTitle(QWidget *parent=0, const char *name=0);
+ KPopupTitle(TQWidget *parent=0, const char *name=0);
/**
* @deprecated
* Constructs a title widget with the specified gradient and colors.
*/
- KPopupTitle(KPixmapEffect::GradientType gradient, const QColor &color,
- const QColor &textColor, QWidget *parent=0,
+ KPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color,
+ const TQColor &textColor, TQWidget *parent=0,
const char *name=0) KDE_DEPRECATED;
/**
* @deprecated
* Constructs a title widget with the specified pixmap and colors.
*/
- KPopupTitle(const KPixmap &background, const QColor &color,
- const QColor &textColor, QWidget *parent=0,
+ KPopupTitle(const KPixmap &background, const TQColor &color,
+ const TQColor &textColor, TQWidget *parent=0,
const char *name=0) KDE_DEPRECATED;
/**
* Sets the title string and optional icon for the title widget.
*
* You will want to call this before inserting into a menu.
*/
- void setTitle(const QString &text, const QPixmap *icon=0);
+ void setTitle(const TQString &text, const TQPixmap *icon=0);
/**
* Returns the current title.
*/
- QString title() const { return titleStr; }
+ TQString title() const { return titleStr; }
/**
* Returns the current icon.
*/
- QPixmap icon() const { return miniicon; }
+ TQPixmap icon() const { return miniicon; }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
public slots:
/// @since 3.1
- void setText( const QString &text );
+ void setText( const TQString &text );
/// @since 3.1
- void setIcon( const QPixmap &pix );
+ void setIcon( const TQPixmap &pix );
protected:
void calcSize();
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
// Remove in KDE4
KPixmapEffect::GradientType grType;
- QString titleStr;
+ TQString titleStr;
// Remove in KDE4
KPixmap fill;
- QPixmap miniicon;
- QColor fgColor, bgColor, grHigh, grLow;
+ TQPixmap miniicon;
+ TQColor fgColor, bgColor, grHigh, grLow;
bool useGradient;
protected:
@@ -107,7 +107,7 @@ private:
*
* KPopupMenu is a class for menus with standard title items and keyboard
* accessibility for popups with many options and/or varying options. It acts
- * identically to QPopupMenu, with the addition of insertTitle(),
+ * identically to TQPopupMenu, with the addition of insertTitle(),
* changeTitle(), setKeyboardShortcutsEnabled() and
* setKeyboardShortcutsExecute() methods.
*
@@ -120,13 +120,13 @@ private:
* @author Daniel M. Duley <mosfet@kde.org>
* @author Hamish Rodda <rodda@kde.org>
*/
-class KDEUI_EXPORT KPopupMenu : public QPopupMenu {
+class KDEUI_EXPORT KPopupMenu : public TQPopupMenu {
Q_OBJECT
public:
/**
* Constructs a KPopupMenu.
*/
- KPopupMenu(QWidget *parent=0, const char *name=0);
+ KPopupMenu(TQWidget *parent=0, const char *name=0);
/**
* Destructs the object
@@ -136,31 +136,31 @@ public:
/**
* Inserts a title item with no icon.
*/
- int insertTitle(const QString &text, int id=-1, int index=-1);
+ int insertTitle(const TQString &text, int id=-1, int index=-1);
/**
* Inserts a title item with the given icon and title.
*/
- int insertTitle(const QPixmap &icon, const QString &text, int id=-1,
+ int insertTitle(const TQPixmap &icon, const TQString &text, int id=-1,
int index=-1);
/**
* Changes the title of the item at the specified id. If a icon was
* previously set it is cleared.
*/
- void changeTitle(int id, const QString &text);
+ void changeTitle(int id, const TQString &text);
/**
* Changes the title and icon of the title item at the specified id.
*/
- void changeTitle(int id, const QPixmap &icon, const QString &text);
+ void changeTitle(int id, const TQPixmap &icon, const TQString &text);
/**
* Returns the title of the title item at the specified id. The default
* id of -1 is for backwards compatibility only, you should always specify
* the id.
*/
- QString title(int id=-1) const;
+ TQString title(int id=-1) const;
/**
* Returns the icon of the title item at the specified id.
*/
- QPixmap titlePixmap(int id) const;
+ TQPixmap titlePixmap(int id) const;
/**
* Enables keyboard navigation by searching for the entered key sequence.
@@ -190,26 +190,26 @@ public:
* Obsolete method provided for backwards compatibility only. Use the
* normal constructor and insertTitle instead.
*/
- KPopupMenu(const QString &title, QWidget *parent=0, const char *name=0) KDE_DEPRECATED;
+ KPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete method provided for backwards compatibility only. Use
* insertTitle and changeTitle instead.
*/
- void setTitle(const QString &title) KDE_DEPRECATED;
+ void setTitle(const TQString &title) KDE_DEPRECATED;
/**
* Returns the context menu associated with this menu
* @since 3.2
*/
- QPopupMenu* contextMenu();
+ TQPopupMenu* contextMenu();
/**
* Returns the context menu associated with this menu
* @since 3.2
*/
- const QPopupMenu* contextMenu() const;
+ const TQPopupMenu* contextMenu() const;
/**
* Hides the context menu if shown
@@ -249,27 +249,27 @@ signals:
* @param ctxMenu The context menu itself
* @since 3.2
*/
- void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu);
+ void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu);
protected:
- virtual void closeEvent(QCloseEvent *);
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void closeEvent(TQCloseEvent *);
+ virtual void keyPressEvent(TQKeyEvent* e);
/// @since 3.4
- virtual void mouseReleaseEvent(QMouseEvent* e);
- virtual void mousePressEvent(QMouseEvent* e);
+ virtual void mouseReleaseEvent(TQMouseEvent* e);
+ virtual void mousePressEvent(TQMouseEvent* e);
virtual bool focusNextPrevChild( bool next );
- virtual void contextMenuEvent(QContextMenuEvent *e);
- virtual void hideEvent(QHideEvent*);
+ virtual void contextMenuEvent(TQContextMenuEvent *e);
+ virtual void hideEvent(TQHideEvent*);
virtual void virtual_hook( int id, void* data );
protected slots:
/// @since 3.1
- QString underlineText(const QString& text, uint length);
+ TQString underlineText(const TQString& text, uint length);
/// @since 3.1
void resetKeyboardVars(bool noMatches = false);
void itemHighlighted(int whichItem);
- void showCtxMenu(QPoint pos);
+ void showCtxMenu(TQPoint pos);
void ctxMenuHiding();
void ctxMenuHideShowingMenu();
diff --git a/kdeui/kprogress.cpp b/kdeui/kprogress.cpp
index 89d41205d..17994eb88 100644
--- a/kdeui/kprogress.cpp
+++ b/kdeui/kprogress.cpp
@@ -22,15 +22,15 @@
#include <stdlib.h>
#include <limits.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "kprogress.h"
@@ -38,15 +38,15 @@
#include <klocale.h>
#include <kwin.h>
-KProgress::KProgress(QWidget *parent, const char *name, WFlags f)
- : QProgressBar(parent, name, f),
+KProgress::KProgress(TQWidget *parent, const char *name, WFlags f)
+ : TQProgressBar(parent, name, f),
mFormat("%p%")
{
setProgress(0);
}
-KProgress::KProgress(int totalSteps, QWidget *parent, const char *name, WFlags f)
- : QProgressBar(totalSteps, parent, name, f),
+KProgress::KProgress(int totalSteps, TQWidget *parent, const char *name, WFlags f)
+ : TQProgressBar(totalSteps, parent, name, f),
mFormat("%p%")
{
setProgress(0);
@@ -63,7 +63,7 @@ void KProgress::advance(int offset)
void KProgress::setTotalSteps(int totalSteps)
{
- QProgressBar::setTotalSteps(totalSteps);
+ TQProgressBar::setTotalSteps(totalSteps);
if (totalSteps)
{
@@ -73,7 +73,7 @@ void KProgress::setTotalSteps(int totalSteps)
void KProgress::setProgress(int progress)
{
- QProgressBar::setProgress(progress);
+ TQProgressBar::setProgress(progress);
if (totalSteps())
{
@@ -109,14 +109,14 @@ bool KProgress::textEnabled() const
return percentageVisible();
}
-void KProgress::setFormat(const QString & format)
+void KProgress::setFormat(const TQString & format)
{
mFormat = format;
if (mFormat != "%p%")
setCenterIndicator(true);
}
-QString KProgress::format() const
+TQString KProgress::format() const
{
return mFormat;
}
@@ -127,23 +127,23 @@ int KProgress::value() const
return progress();
}
-bool KProgress::setIndicator(QString &indicator, int progress, int totalSteps)
+bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps)
{
if (!totalSteps)
return false;
- QString newString(mFormat);
- newString.replace(QString::fromLatin1("%v"),
- QString::number(progress));
- newString.replace(QString::fromLatin1("%m"),
- QString::number(totalSteps));
+ TQString newString(mFormat);
+ newString.replace(TQString::fromLatin1("%v"),
+ TQString::number(progress));
+ newString.replace(TQString::fromLatin1("%m"),
+ TQString::number(totalSteps));
if (totalSteps > INT_MAX / 1000) {
progress /= 1000;
totalSteps /= 1000;
}
- newString.replace(QString::fromLatin1("%p"),
- QString::number((progress * 100) / totalSteps));
+ newString.replace(TQString::fromLatin1("%p"),
+ TQString::number((progress * 100) / totalSteps));
if (newString != indicator)
{
@@ -166,8 +166,8 @@ struct KProgressDialog::KProgressDialogPrivate
/*
* KProgressDialog implementation
*/
-KProgressDialog::KProgressDialog(QWidget* parent, const char* name,
- const QString& caption, const QString& text,
+KProgressDialog::KProgressDialog(TQWidget* parent, const char* name,
+ const TQString& caption, const TQString& text,
bool modal)
: KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel,
KDialogBase::Cancel, parent, name, modal),
@@ -182,23 +182,23 @@ KProgressDialog::KProgressDialog(QWidget* parent, const char* name,
#ifdef Q_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif
- mShowTimer = new QTimer(this);
+ mShowTimer = new TQTimer(this);
showButton(KDialogBase::Close, false);
mCancelText = actionButton(KDialogBase::Cancel)->text();
- QFrame* mainWidget = plainPage();
- QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);
+ TQFrame* mainWidget = plainPage();
+ TQVBoxLayout* layout = new TQVBoxLayout(mainWidget, 10);
- mLabel = new QLabel(text, mainWidget);
+ mLabel = new TQLabel(text, mainWidget);
layout->addWidget(mLabel);
mProgressBar = new KProgress(mainWidget);
layout->addWidget(mProgressBar);
- connect(mProgressBar, SIGNAL(percentageChanged(int)),
- this, SLOT(slotAutoActions(int)));
- connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow()));
+ connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)),
+ this, TQT_SLOT(slotAutoActions(int)));
+ connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow()));
mShowTimer->start(mMinDuration, true);
}
@@ -290,18 +290,18 @@ const KProgress* KProgressDialog::progressBar() const
return mProgressBar;
}
-void KProgressDialog::setLabel(const QString& text)
+void KProgressDialog::setLabel(const TQString& text)
{
mLabel->setText(text);
}
// ### KDE 4 remove
-QString KProgressDialog::labelText()
+TQString KProgressDialog::labelText()
{
return mLabel->text();
}
-QString KProgressDialog::labelText() const
+TQString KProgressDialog::labelText() const
{
return mLabel->text();
}
@@ -343,19 +343,19 @@ void KProgressDialog::setAutoReset(bool autoReset)
mAutoReset = autoReset;
}
-void KProgressDialog::setButtonText(const QString& text)
+void KProgressDialog::setButtonText(const TQString& text)
{
mCancelText = text;
setButtonCancel(text);
}
// ### KDE 4 remove
-QString KProgressDialog::buttonText()
+TQString KProgressDialog::buttonText()
{
return mCancelText;
}
-QString KProgressDialog::buttonText() const
+TQString KProgressDialog::buttonText() const
{
return mCancelText;
}
diff --git a/kdeui/kprogress.h b/kdeui/kprogress.h
index 28ed989c7..b86e28598 100644
--- a/kdeui/kprogress.h
+++ b/kdeui/kprogress.h
@@ -19,20 +19,20 @@
* *
* KProgress -- progress indicator widget for KDE *
* Original QRangeControl-based version written by Martynas Kunigelis *
-* Current QProgressBar based version by Aaron Seigo *
+* Current TQProgressBar based version by Aaron Seigo *
* *
*****************************************************************************/
#ifndef _KPROGRESS_H
#define _KPROGRESS_H "$Id$"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kdialogbase.h>
/**
* @short A progress indicator widget.
*
- * KProgress is derived from QProgressBar, so
+ * KProgress is derived from TQProgressBar, so
* you can use all the methods from that class. The only real difference
* is that a signal is emitted on changes to the value and you do not need
* to subclass KProgress just to change the format of the indicator text.
@@ -51,7 +51,7 @@ public:
/**
* Construct a progress bar.
*/
- KProgress(QWidget *parent=0, const char *name=0, WFlags f = 0);
+ KProgress(TQWidget *parent=0, const char *name=0, WFlags f = 0);
/**
* Construct a progress bar with a total number of steps.
@@ -59,7 +59,7 @@ public:
* bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining
* the first file, call setProgress(0); call setProgress(50) after examining the last file.
*/
- KProgress(int totalSteps, QWidget *parent=0, const char *name=0, WFlags f = 0);
+ KProgress(int totalSteps, TQWidget *parent=0, const char *name=0, WFlags f = 0);
/**
* Destruct the progress bar.
@@ -92,7 +92,7 @@ public:
* Retrieve the current format for printing status text.
* @see setFormat()
*/
- QString format() const;
+ TQString format() const;
/**
* @deprecated but kept for source compatibility with KDE2's KProgress.
@@ -121,7 +121,7 @@ public slots:
* @param format "%p" is replaced by percentage done, "%v" is replaced by actual
* value, "%m" is replaced by the maximum value.
*/
- void setFormat(const QString & format);
+ void setFormat(const TQString & format);
/**
* Set the current total number of steps in the action that the progress bar
@@ -156,10 +156,10 @@ signals:
void percentageChanged(int);
protected:
- virtual bool setIndicator(QString & indicator, int progress, int totalSteps);
+ virtual bool setIndicator(TQString & indicator, int progress, int totalSteps);
private:
- QString mFormat;
+ TQString mFormat;
protected:
virtual void virtual_hook( int id, void* data );
@@ -198,9 +198,9 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
* @param text Text to display in the dialog
* @param modal Set to true to make the dialog modal
*/
- KProgressDialog(QWidget* parent = 0, const char* name = 0,
- const QString& caption = QString::null,
- const QString& text = QString::null,
+ KProgressDialog(TQWidget* parent = 0, const char* name = 0,
+ const TQString& caption = TQString::null,
+ const TQString& text = TQString::null,
bool modal = false);
/**
@@ -227,19 +227,19 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
*
* @param text the text to display
*/
- void setLabel(const QString & text);
+ void setLabel(const TQString & text);
/**
* Returns the current dialog text
* @deprecated
*/
// ### Remove this KDE 4.0
- QString labelText() KDE_DEPRECATED;
+ TQString labelText() KDE_DEPRECATED;
/**
* Returns the current dialog text
*/
- QString labelText() const;
+ TQString labelText() const;
/**
* Sets whether or not the user can cancel the process.
@@ -337,19 +337,19 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
/**
* Sets the text to appear on the cancel button.
*/
- void setButtonText(const QString&);
+ void setButtonText(const TQString&);
/**
* Returns the text on the cancel button
* @deprecated
*/
// ### Remove this KDE 4.0
- QString buttonText() KDE_DEPRECATED;
+ TQString buttonText() KDE_DEPRECATED;
/**
* Returns the text on the cancel button
*/
- QString buttonText() const;
+ TQString buttonText() const;
/**
* Set the minimum number of milliseconds to wait before
@@ -386,10 +386,10 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
bool mCancelled;
bool mAllowCancel;
bool mShown;
- QString mCancelText;
- QLabel* mLabel;
+ TQString mCancelText;
+ TQLabel* mLabel;
KProgress* mProgressBar;
- QTimer* mShowTimer;
+ TQTimer* mShowTimer;
int mMinDuration;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kprogressbox.cpp b/kdeui/kprogressbox.cpp
index 965d8179b..472d36fba 100644
--- a/kdeui/kprogressbox.cpp
+++ b/kdeui/kprogressbox.cpp
@@ -23,15 +23,15 @@
#include <stdlib.h>
#include <limits.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "kprogress.h"
#include "ktextedit.h"
@@ -53,8 +53,8 @@ struct KProgressBoxDialog::KProgressBoxDialogPrivate
/*
* KProgressBoxDialog implementation
*/
-KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
- const QString& caption, const QString& text,
+KProgressBoxDialog::KProgressBoxDialog(TQWidget* parent, const char* name,
+ const TQString& caption, const TQString& text,
bool modal)
: KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel,
KDialogBase::Cancel, parent, name, modal),
@@ -70,15 +70,15 @@ KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
#ifdef Q_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif
- mShowTimer = new QTimer(this);
+ mShowTimer = new TQTimer(this);
showButton(KDialogBase::Close, false);
mCancelText = actionButton(KDialogBase::Cancel)->text();
- QFrame* mainWidget = plainPage();
- QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);
+ TQFrame* mainWidget = plainPage();
+ TQVBoxLayout* layout = new TQVBoxLayout(mainWidget, 10);
- mLabel = new QLabel(text, mainWidget);
+ mLabel = new TQLabel(text, mainWidget);
layout->addWidget(mLabel);
mProgressBar = new KProgress(mainWidget);
@@ -86,9 +86,9 @@ KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
mTextBox = new KTextEdit(mainWidget);
layout->addWidget(mTextBox);
- connect(mProgressBar, SIGNAL(percentageChanged(int)),
- this, SLOT(slotAutoActions(int)));
- connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow()));
+ connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)),
+ this, TQT_SLOT(slotAutoActions(int)));
+ connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow()));
mShowTimer->start(mMinDuration, true);
}
@@ -196,18 +196,18 @@ const KTextEdit* KProgressBoxDialog::textEdit() const
return mTextBox;
}
-void KProgressBoxDialog::setLabel(const QString& text)
+void KProgressBoxDialog::setLabel(const TQString& text)
{
mLabel->setText(text);
}
// ### KDE 4 remove
-QString KProgressBoxDialog::labelText()
+TQString KProgressBoxDialog::labelText()
{
return mLabel->text();
}
-QString KProgressBoxDialog::labelText() const
+TQString KProgressBoxDialog::labelText() const
{
return mLabel->text();
}
@@ -249,19 +249,19 @@ void KProgressBoxDialog::setAutoReset(bool autoReset)
mAutoReset = autoReset;
}
-void KProgressBoxDialog::setButtonText(const QString& text)
+void KProgressBoxDialog::setButtonText(const TQString& text)
{
mCancelText = text;
setButtonCancel(text);
}
// ### KDE 4 remove
-QString KProgressBoxDialog::buttonText()
+TQString KProgressBoxDialog::buttonText()
{
return mCancelText;
}
-QString KProgressBoxDialog::buttonText() const
+TQString KProgressBoxDialog::buttonText() const
{
return mCancelText;
}
diff --git a/kdeui/kprogressbox.h b/kdeui/kprogressbox.h
index 25fbee4dc..08db1be8a 100644
--- a/kdeui/kprogressbox.h
+++ b/kdeui/kprogressbox.h
@@ -20,7 +20,7 @@
* *
* KProgressBox -- progress indicator widget for KDE *
* Original QRangeControl-based version written by Martynas Kunigelis *
-* Current QProgressBar based version by Aaron Seigo *
+* Current TQProgressBar based version by Aaron Seigo *
* Textbox extension by Timothy Pearson *
* *
*****************************************************************************/
@@ -28,7 +28,7 @@
#ifndef _KProgressBox_H
#define _KProgressBox_H "$Id: KProgressBox.h 589356 2006-09-28 00:58:09Z tpearson $"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kdialogbase.h>
#include <kprogress.h>
#include <ktextedit.h>
@@ -65,9 +65,9 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
* @param text Text to display in the dialog
* @param modal Set to true to make the dialog modal
*/
- KProgressBoxDialog(QWidget* parent = 0, const char* name = 0,
- const QString& caption = QString::null,
- const QString& text = QString::null,
+ KProgressBoxDialog(TQWidget* parent = 0, const char* name = 0,
+ const TQString& caption = TQString::null,
+ const TQString& text = TQString::null,
bool modal = false);
/**
@@ -108,19 +108,19 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
*
* @param text the text to display
*/
- void setLabel(const QString & text);
+ void setLabel(const TQString & text);
/**
* Returns the current dialog text
* @deprecated
*/
// ### Remove this KDE 4.0
- QString labelText() KDE_DEPRECATED;
+ TQString labelText() KDE_DEPRECATED;
/**
* Returns the current dialog text
*/
- QString labelText() const;
+ TQString labelText() const;
/**
* Sets whether or not the user can cancel the process.
@@ -225,19 +225,19 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
/**
* Sets the text to appear on the cancel button.
*/
- void setButtonText(const QString&);
+ void setButtonText(const TQString&);
/**
* Returns the text on the cancel button
* @deprecated
*/
// ### Remove this KDE 4.0
- QString buttonText() KDE_DEPRECATED;
+ TQString buttonText() KDE_DEPRECATED;
/**
* Returns the text on the cancel button
*/
- QString buttonText() const;
+ TQString buttonText() const;
/**
* Set the minimum number of milliseconds to wait before
@@ -275,11 +275,11 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
bool mAllowCancel;
bool mAllowTextEdit;
bool mShown;
- QString mCancelText;
- QLabel* mLabel;
+ TQString mCancelText;
+ TQLabel* mLabel;
KProgress* mProgressBar;
KTextEdit* mTextBox;
- QTimer* mShowTimer;
+ TQTimer* mShowTimer;
int mMinDuration;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kpushbutton.cpp b/kdeui/kpushbutton.cpp
index a755fe3b3..52679c0e5 100644
--- a/kdeui/kpushbutton.cpp
+++ b/kdeui/kpushbutton.cpp
@@ -19,9 +19,9 @@
#include "kpushbutton.h"
-#include <qdragobject.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqdragobject.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include "config.h"
@@ -40,32 +40,32 @@ public:
bool KPushButton::s_useIcons = false;
-KPushButton::KPushButton( QWidget *parent, const char *name )
- : QPushButton( parent, name ),
+KPushButton::KPushButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( "" ) );
}
-KPushButton::KPushButton( const QString &text, QWidget *parent,
+KPushButton::KPushButton( const TQString &text, TQWidget *parent,
const char *name)
- : QPushButton( parent, name ),
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( text ) );
}
-KPushButton::KPushButton( const QIconSet &icon, const QString &text,
- QWidget *parent, const char *name )
- : QPushButton( text, parent, name ),
+KPushButton::KPushButton( const TQIconSet &icon, const TQString &text,
+ TQWidget *parent, const char *name )
+ : TQPushButton( text, parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( text, icon ) );
}
-KPushButton::KPushButton( const KGuiItem &item, QWidget *parent,
+KPushButton::KPushButton( const KGuiItem &item, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ),
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( item );
@@ -88,7 +88,7 @@ void KPushButton::init( const KGuiItem &item )
// call QPushButton's implementation since we don't need to
// set the GUI items text or check the state of the icon set
- QPushButton::setText( d->item.text() );
+ TQPushButton::setText( d->item.text() );
static bool initialized = false;
if ( !initialized ) {
@@ -98,16 +98,16 @@ void KPushButton::init( const KGuiItem &item )
setIconSet( d->item.iconSet() );
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
- QToolTip::add( this, item.toolTip() );
+ TQToolTip::add( this, item.toolTip() );
- QWhatsThis::add( this, item.whatsThis() );
+ TQWhatsThis::add( this, item.whatsThis() );
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ),
- SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ),
+ TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
}
@@ -123,15 +123,15 @@ void KPushButton::setGuiItem( const KGuiItem& item )
// call QPushButton's implementation since we don't need to
// set the GUI items text or check the state of the icon set
- QPushButton::setText( d->item.text() );
+ TQPushButton::setText( d->item.text() );
setIconSet( d->item.iconSet() );
- QWhatsThis::add( this, d->item.whatsThis() );
+ TQWhatsThis::add( this, d->item.whatsThis() );
// Do not add a tooltip to the button automatically as 99% of the time the
// tooltip is redundant to the button text and it results in QTipManager
- // invoking an eventHandler on the QApplication which breaks certain apps
+ // invoking an eventHandler on the TQApplication which breaks certain apps
// like KDesktop which are sensitive to such things
-// QToolTip::add( this, d->item.toolTip() );
+// TQToolTip::add( this, d->item.toolTip() );
}
void KPushButton::setGuiItem( KStdGuiItem::StdItem item )
@@ -145,9 +145,9 @@ KStdGuiItem::StdItem KPushButton::guiItem() const
return d->itemType;
}
-void KPushButton::setText( const QString &text )
+void KPushButton::setText( const TQString &text )
{
- QPushButton::setText(text);
+ TQPushButton::setText(text);
// we need to re-evaluate the icon set when the text
// is removed, or when it is supplied
@@ -157,14 +157,14 @@ void KPushButton::setText( const QString &text )
d->item.setText(text);
}
-void KPushButton::setIconSet( const QIconSet &iconSet )
+void KPushButton::setIconSet( const TQIconSet &iconSet )
{
d->item.setIconSet(iconSet);
if ( s_useIcons || text().isEmpty() )
- QPushButton::setIconSet( iconSet );
+ TQPushButton::setIconSet( iconSet );
else
- QPushButton::setIconSet( QIconSet() );
+ TQPushButton::setIconSet( TQIconSet() );
}
void KPushButton::slotSettingsChanged( int /* category */ )
@@ -178,18 +178,18 @@ void KPushButton::setDragEnabled( bool enable )
m_dragEnabled = enable;
}
-void KPushButton::mousePressEvent( QMouseEvent *e )
+void KPushButton::mousePressEvent( TQMouseEvent *e )
{
if ( m_dragEnabled )
startPos = e->pos();
- QPushButton::mousePressEvent( e );
+ TQPushButton::mousePressEvent( e );
}
-void KPushButton::mouseMoveEvent( QMouseEvent *e )
+void KPushButton::mouseMoveEvent( TQMouseEvent *e )
{
if ( !m_dragEnabled )
{
- QPushButton::mouseMoveEvent( e );
+ TQPushButton::mouseMoveEvent( e );
return;
}
@@ -202,14 +202,14 @@ void KPushButton::mouseMoveEvent( QMouseEvent *e )
}
}
-QDragObject * KPushButton::dragObject()
+TQDragObject * KPushButton::dragObject()
{
return 0L;
}
void KPushButton::startDrag()
{
- QDragObject *d = dragObject();
+ TQDragObject *d = dragObject();
if ( d )
d->dragCopy();
}
diff --git a/kdeui/kpushbutton.h b/kdeui/kpushbutton.h
index 637cfceb3..0b60d1b4c 100644
--- a/kdeui/kpushbutton.h
+++ b/kdeui/kpushbutton.h
@@ -20,18 +20,18 @@
#ifndef KPUSHBUTTON_H
#define KPUSHBUTTON_H
-#include <qpoint.h>
-#include <qpushbutton.h>
+#include <tqpoint.h>
+#include <tqpushbutton.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
class QDragObject;
/**
- * This is nothing but a QPushButton with drag-support and KGuiItem support. You have to call
+ * This is nothing but a TQPushButton with drag-support and KGuiItem support. You have to call
* setDragEnabled( true ) and override the virtual method
- * dragObject() to specify the QDragObject to be used.
+ * dragObject() to specify the TQDragObject to be used.
*
- * @short A QPushButton with drag-support and KGuiItem support
+ * @short A TQPushButton with drag-support and KGuiItem support
* @author Carsten Pfeiffer <pfeiffer@kde.org>
*/
class KDEUI_EXPORT KPushButton : public QPushButton
@@ -45,24 +45,24 @@ public:
/**
* Default constructor.
*/
- KPushButton( QWidget *parent, const char *name=0 );
+ KPushButton( TQWidget *parent, const char *name=0 );
/**
* Constructor, that sets the button-text to @p text
*/
- KPushButton( const QString &text, QWidget *parent, const char *name=0);
+ KPushButton( const TQString &text, TQWidget *parent, const char *name=0);
/**
* Constructor, that sets an icon and the button-text to @p text
*/
- KPushButton( const QIconSet &icon, const QString &text,
- QWidget *parent, const char *name=0 );
+ KPushButton( const TQIconSet &icon, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Constructor that takes a KGuiItem for the text, the icon, the tooltip
* and the what's this help
*/
- KPushButton( const KGuiItem &item, QWidget *parent, const char *name = 0 );
+ KPushButton( const KGuiItem &item, TQWidget *parent, const char *name = 0 );
/**
* Destructs the button.
@@ -104,29 +104,29 @@ public:
* Sets the Icon Set for this button. It also takes into account hte
* KGlobalSettings::showIconsOnPushButtons() setting.
*/
- void setIconSet( const QIconSet &iconSet );
+ void setIconSet( const TQIconSet &iconSet );
/**
* Sets the text of the button
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
protected:
/**
- * Reimplement this and return the QDragObject that should be used
+ * Reimplement this and return the TQDragObject that should be used
* for the drag.
* Default implementation returns 0L, so that no drag is initiated.
*/
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
/**
* Reimplemented to add drag-support
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Reimplemented to add drag-support
*/
- virtual void mouseMoveEvent( QMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
/**
* Starts a drag (dragCopy() by default) using dragObject()
@@ -135,7 +135,7 @@ protected:
private:
bool m_dragEnabled;
- QPoint startPos;
+ TQPoint startPos;
private slots:
void slotSettingsChanged( int category );
diff --git a/kdeui/krestrictedline.cpp b/kdeui/krestrictedline.cpp
index 1847017d5..85c52d54c 100644
--- a/kdeui/krestrictedline.cpp
+++ b/kdeui/krestrictedline.cpp
@@ -21,13 +21,13 @@
*
*/
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include "krestrictedline.h"
-KRestrictedLine::KRestrictedLine( QWidget *parent,
+KRestrictedLine::KRestrictedLine( TQWidget *parent,
const char *name,
- const QString& valid )
+ const TQString& valid )
: KLineEdit( parent, name )
{
qsValidChars = valid;
@@ -39,13 +39,13 @@ KRestrictedLine::~KRestrictedLine()
}
-void KRestrictedLine::keyPressEvent( QKeyEvent *e )
+void KRestrictedLine::keyPressEvent( TQKeyEvent *e )
{
- // let QLineEdit process "special" keys and return/enter
+ // let TQLineEdit process "special" keys and return/enter
// so that we still can use the default key binding
if (e->key() == Key_Enter || e->key() == Key_Return || e->key() == Key_Delete || e->ascii() < 32)
{
- QLineEdit::keyPressEvent(e);
+ TQLineEdit::keyPressEvent(e);
return;
}
@@ -58,19 +58,19 @@ void KRestrictedLine::keyPressEvent( QKeyEvent *e )
return;
}
else
- // valid char: let QLineEdit process this key as usual
- QLineEdit::keyPressEvent(e);
+ // valid char: let TQLineEdit process this key as usual
+ TQLineEdit::keyPressEvent(e);
return;
}
-void KRestrictedLine::setValidChars( const QString& valid)
+void KRestrictedLine::setValidChars( const TQString& valid)
{
qsValidChars = valid;
}
-QString KRestrictedLine::validChars() const
+TQString KRestrictedLine::validChars() const
{
return qsValidChars;
}
diff --git a/kdeui/krestrictedline.h b/kdeui/krestrictedline.h
index 884b25782..7d13f40ca 100644
--- a/kdeui/krestrictedline.h
+++ b/kdeui/krestrictedline.h
@@ -30,33 +30,33 @@
/**
* @short A line editor for restricted character sets.
*
- * The KRestrictedLine widget is a variant of QLineEdit which
+ * The KRestrictedLine widget is a variant of TQLineEdit which
* accepts only a restricted set of characters as input.
* All other characters will be discarded and the signal invalidChar()
* will be emitted for each of them.
*
- * Valid characters can be passed as a QString to the constructor
+ * Valid characters can be passed as a TQString to the constructor
* or set afterwards via setValidChars().
- * The default key bindings of QLineEdit are still in effect.
+ * The default key bindings of TQLineEdit are still in effect.
*
* @author Michael Wiedmann <mw@miwie.in-berlin.de>
*/
class KDEUI_EXPORT KRestrictedLine : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( QString validChars READ validChars WRITE setValidChars )
+ Q_PROPERTY( TQString validChars READ validChars WRITE setValidChars )
public:
/**
* Constructor: This contructor takes three - optional - arguments.
- * The first two parameters are simply passed on to QLineEdit.
+ * The first two parameters are simply passed on to TQLineEdit.
* @param parent pointer to the parent widget
* @param name pointer to the name of this widget
* @param valid pointer to set of valid characters
*/
- KRestrictedLine( QWidget *parent=0, const char *name=0,
- const QString& valid = QString::null);
+ KRestrictedLine( TQWidget *parent=0, const char *name=0,
+ const TQString& valid = TQString::null);
/**
* Destructs the restricted line editor.
@@ -67,11 +67,11 @@ public:
* All characters in the string valid are treated as
* acceptable characters.
*/
- void setValidChars(const QString& valid);
+ void setValidChars(const TQString& valid);
/**
* @return the string of acceptable characters.
*/
- QString validChars() const;
+ TQString validChars() const;
signals:
@@ -81,10 +81,10 @@ signals:
void invalidChar(int);
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
private:
- /// QString of valid characters for this line
+ /// TQString of valid characters for this line
QString qsValidChars;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/krootpixmap.cpp b/kdeui/krootpixmap.cpp
index 5f9591b5b..cf6af3fdf 100644
--- a/kdeui/krootpixmap.cpp
+++ b/kdeui/krootpixmap.cpp
@@ -9,10 +9,10 @@
* licensing terms.
*/
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qrect.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqrect.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kimageeffect.h>
@@ -28,7 +28,7 @@
#include <krootpixmap.h>
-static QString wallpaperForDesktop(int desktop)
+static TQString wallpaperForDesktop(int desktop)
{
return DCOPRef("kdesktop", "KBackgroundIface").call("currentWallpaper", desktop);
}
@@ -36,21 +36,21 @@ static QString wallpaperForDesktop(int desktop)
class KRootPixmapData
{
public:
- QWidget *toplevel;
+ TQWidget *toplevel;
#ifdef Q_WS_X11
KWinModule *kwin;
#endif
};
-KRootPixmap::KRootPixmap( QWidget *widget, const char *name )
- : QObject(widget, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
+KRootPixmap::KRootPixmap( TQWidget *widget, const char *name )
+ : TQObject(widget, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
{
init();
}
-KRootPixmap::KRootPixmap( QWidget *widget, QObject *parent, const char *name )
- : QObject( parent, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
+KRootPixmap::KRootPixmap( TQWidget *widget, TQObject *parent, const char *name )
+ : TQObject( parent, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
{
init();
}
@@ -60,19 +60,19 @@ void KRootPixmap::init()
d = new KRootPixmapData;
m_Fade = 0;
m_pPixmap = new KSharedPixmap; //ordinary KPixmap on win32
- m_pTimer = new QTimer( this );
+ m_pTimer = new TQTimer( this );
m_bInit = false;
m_bActive = false;
m_bCustomPaint = false;
- connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)));
- connect(m_pTimer, SIGNAL(timeout()), SLOT(repaint()));
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
+ connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(repaint()));
#ifdef Q_WS_X11
- connect(m_pPixmap, SIGNAL(done(bool)), SLOT(slotDone(bool)));
+ connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
d->kwin = new KWinModule( this );
- connect(d->kwin, SIGNAL(windowChanged(WId, unsigned int)), SLOT(desktopChanged(WId, unsigned int)));
- connect(d->kwin, SIGNAL(currentDesktopChanged(int)), SLOT(desktopChanged(int)));
+ connect(d->kwin, TQT_SIGNAL(windowChanged(WId, unsigned int)), TQT_SLOT(desktopChanged(WId, unsigned int)));
+ connect(d->kwin, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(desktopChanged(int)));
#endif
d->toplevel = m_pWidget->topLevelWidget();
@@ -95,7 +95,7 @@ int KRootPixmap::currentDesktop() const
return rinfo.currentDesktop();
#else
//OK?
- return QApplication::desktop()->screenNumber(m_pWidget);
+ return TQApplication::desktop()->screenNumber(m_pWidget);
#endif
}
@@ -124,7 +124,7 @@ void KRootPixmap::stop()
}
-void KRootPixmap::setFadeEffect(double fade, const QColor &color)
+void KRootPixmap::setFadeEffect(double fade, const TQColor &color)
{
if (fade < 0)
m_Fade = 0;
@@ -138,10 +138,10 @@ void KRootPixmap::setFadeEffect(double fade, const QColor &color)
}
-bool KRootPixmap::eventFilter(QObject *, QEvent *event)
+bool KRootPixmap::eventFilter(TQObject *, TQEvent *event)
{
// Initialise after the first show or paint event on the managed widget.
- if (!m_bInit && ((event->type() == QEvent::Show) || (event->type() == QEvent::Paint)))
+ if (!m_bInit && ((event->type() == TQEvent::Show) || (event->type() == TQEvent::Paint)))
{
m_bInit = true;
m_Desk = currentDesktop();
@@ -152,16 +152,16 @@ bool KRootPixmap::eventFilter(QObject *, QEvent *event)
switch (event->type())
{
- case QEvent::Resize:
- case QEvent::Move:
+ case TQEvent::Resize:
+ case TQEvent::Move:
m_pTimer->start(100, true);
break;
- case QEvent::Paint:
+ case TQEvent::Paint:
m_pTimer->start(0, true);
break;
- case QEvent::Reparent:
+ case TQEvent::Reparent:
d->toplevel->removeEventFilter(this);
d->toplevel = m_pWidget->topLevelWidget();
d->toplevel->installEventFilter(this);
@@ -207,9 +207,9 @@ void KRootPixmap::repaint()
void KRootPixmap::repaint(bool force)
{
- QPoint p1 = m_pWidget->mapToGlobal(m_pWidget->rect().topLeft());
- QPoint p2 = m_pWidget->mapToGlobal(m_pWidget->rect().bottomRight());
- if (!force && (m_Rect == QRect(p1, p2)))
+ TQPoint p1 = m_pWidget->mapToGlobal(m_pWidget->rect().topLeft());
+ TQPoint p2 = m_pWidget->mapToGlobal(m_pWidget->rect().bottomRight());
+ if (!force && (m_Rect == TQRect(p1, p2)))
return;
// Due to northwest bit gravity, we don't need to do anything if the
@@ -220,11 +220,11 @@ void KRootPixmap::repaint(bool force)
(m_pWidget->height() < m_Rect.height())
)
{
- m_Rect = QRect(p1, p2);
+ m_Rect = TQRect(p1, p2);
updateBackground( m_pPixmap );
return;
}
- m_Rect = QRect(p1, p2);
+ m_Rect = TQRect(p1, p2);
#ifdef Q_WS_X11
m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop();
if (m_Desk == NET::OnAllDesktops)
@@ -253,12 +253,12 @@ bool KRootPixmap::isAvailable() const
#endif
}
-QString KRootPixmap::pixmapName(int desk) {
- QString pattern = QString("DESKTOP%1");
+TQString KRootPixmap::pixmapName(int desk) {
+ TQString pattern = TQString("DESKTOP%1");
#ifdef Q_WS_X11
int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number) {
- pattern = QString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
+ pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
}
#endif
return pattern.arg( desk );
@@ -272,11 +272,11 @@ void KRootPixmap::enableExports()
DCOPClient *client = kapp->dcopClient();
if (!client->isAttached())
client->attach();
- QByteArray data;
- QDataStream args( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream args( data, IO_WriteOnly );
args << 1;
- QCString appname( "kdesktop" );
+ TQCString appname( "kdesktop" );
int screen_number = DefaultScreen(qt_xdisplay());
if ( screen_number )
appname.sprintf("kdesktop-screen-%d", screen_number );
@@ -302,12 +302,12 @@ void KRootPixmap::slotDone(bool success)
void KRootPixmap::updateBackground( KSharedPixmap *spm )
{
- QPixmap pm = *spm;
+ TQPixmap pm = *spm;
if (m_Fade > 1e-6)
{
KPixmapIO io;
- QImage img = io.convertToImage(pm);
+ TQImage img = io.convertToImage(pm);
img = KImageEffect::fade(img, m_Fade, m_FadeColor);
pm = io.convertToPixmap(img);
}
diff --git a/kdeui/krootpixmap.h b/kdeui/krootpixmap.h
index 3eef65f51..cf675c16b 100644
--- a/kdeui/krootpixmap.h
+++ b/kdeui/krootpixmap.h
@@ -11,8 +11,8 @@
#ifndef __KRootPixmap_h_Included__
#define __KRootPixmap_h_Included__
-#include <qobject.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
#ifndef Q_WS_QWS //FIXME
@@ -35,7 +35,7 @@ class KRootPixmapData;
* are handled automatically.
*
* Instead of using the default behavior, you can ask KRootPixmap
- * to emit a backgroundUpdated(const QPixmap &) signal whenever
+ * to emit a backgroundUpdated(const TQPixmap &) signal whenever
* the background needs updating by using setCustomPainting(bool).
* Alternatively by reimplementing updateBackground(KSharedPixmap*)
* you can take complete control of the behavior.
@@ -57,13 +57,13 @@ public:
* transparent.
* @param name The internal name of the pixmap
*/
- KRootPixmap( QWidget *target, const char *name=0 );
+ KRootPixmap( TQWidget *target, const char *name=0 );
/**
- * Constructs a KRootPixmap where the parent QObject and target QWidget are
+ * Constructs a KRootPixmap where the parent TQObject and target TQWidget are
* different.
*/
- KRootPixmap( QWidget *target, QObject *parent, const char *name=0 );
+ KRootPixmap( TQWidget *target, TQObject *parent, const char *name=0 );
/**
* Destructs the object.
@@ -103,7 +103,7 @@ public:
/** @since 3.2
* @return the fade color.
*/
- const QColor &color() const { return m_FadeColor; }
+ const TQColor &color() const { return m_FadeColor; }
/** @since 3.2
* @return the color opacity.
@@ -131,7 +131,7 @@ public slots:
* will use the fade color unchanged.
* @param color The color to fade to.
*/
- void setFadeEffect(double opacity, const QColor &color);
+ void setFadeEffect(double opacity, const TQColor &color);
/**
* Repaints the widget background. Normally, you shouldn't need this
@@ -165,7 +165,7 @@ public slots:
/**
* Returns the name of the shared pixmap (only needed for low level access)
*/
- static QString pixmapName(int desk);
+ static TQString pixmapName(int desk);
signals:
/**
* Emitted when the background needs updating and custom painting
@@ -173,19 +173,19 @@ signals:
*
* @param pm A pixmap containing the new background.
*/
- void backgroundUpdated( const QPixmap &pm );
+ void backgroundUpdated( const TQPixmap &pm );
protected:
/**
* Reimplemented to filter the events from the target widget and
* track its movements.
*/
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
/**
* Called when the pixmap has been updated. The default implementation
* applies the fade effect, then sets the target's background, or emits
- * backgroundUpdated(const QPixmap &) depending on the painting mode.
+ * backgroundUpdated(const TQPixmap &) depending on the painting mode.
*/
virtual void updateBackground( KSharedPixmap * );
@@ -200,11 +200,11 @@ private:
int m_Desk;
double m_Fade;
- QColor m_FadeColor;
+ TQColor m_FadeColor;
- QRect m_Rect;
- QWidget *m_pWidget;
- QTimer *m_pTimer;
+ TQRect m_Rect;
+ TQWidget *m_pWidget;
+ TQTimer *m_pTimer;
KSharedPixmap *m_pPixmap;
KRootPixmapData *d;
diff --git a/kdeui/kruler.cpp b/kdeui/kruler.cpp
index 08cea5515..c50cf9620 100644
--- a/kdeui/kruler.cpp
+++ b/kdeui/kruler.cpp
@@ -20,8 +20,8 @@
#include "kruler.h"
-#include <qpainter.h>
-#include <qfont.h>
+#include <tqpainter.h>
+#include <tqfont.h>
#define INIT_VALUE 0
#define INIT_MIN_VALUE 0
@@ -68,7 +68,7 @@
#undef PROFILING
#ifdef PROFILING
-# include <qdatetime.h>
+# include <tqdatetime.h>
#endif
class KRuler::KRulerPrivate
@@ -91,8 +91,8 @@ public:
-KRuler::KRuler(QWidget *parent, const char *name)
- : QFrame(parent, name),
+KRuler::KRuler(TQWidget *parent, const char *name)
+ : TQFrame(parent, name),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(Horizontal)
{
@@ -102,8 +102,8 @@ KRuler::KRuler(QWidget *parent, const char *name)
KRuler::KRuler(Orientation orient,
- QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f),
+ TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(orient)
{
@@ -116,8 +116,8 @@ KRuler::KRuler(Orientation orient,
KRuler::KRuler(Orientation orient, int widgetWidth,
- QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f),
+ TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(orient)
{
@@ -357,21 +357,21 @@ KRuler::showEndLabel() const
void
-KRuler::setEndLabel(const QString& label)
+KRuler::setEndLabel(const TQString& label)
{
endlabel = label;
// premeasure the fontwidth and save it
if (dir == Vertical) {
- QFont font = this->font();
+ TQFont font = this->font();
font.setPointSize(LABEL_SIZE);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
d->fontWidth = fm.width(endlabel);
}
update(contentsRect());
}
-QString KRuler::endLabel() const
+TQString KRuler::endLabel() const
{
return endlabel;
}
@@ -432,19 +432,19 @@ KRuler::setRulerMetricStyle(KRuler::MetricStyle style)
}
switch (style) {
case Pixel:
- setEndLabel(QString::fromLatin1("pixel"));
+ setEndLabel(TQString::fromLatin1("pixel"));
break;
case Inch:
- setEndLabel(QString::fromLatin1("inch"));
+ setEndLabel(TQString::fromLatin1("inch"));
break;
case Millimetres:
- setEndLabel(QString::fromLatin1("mm"));
+ setEndLabel(TQString::fromLatin1("mm"));
break;
case Centimetres:
- setEndLabel(QString::fromLatin1("cm"));
+ setEndLabel(TQString::fromLatin1("cm"));
break;
case Metres:
- setEndLabel(QString::fromLatin1("m"));
+ setEndLabel(TQString::fromLatin1("m"));
default: /* never reached, see above switch */
/* empty command */;
}
@@ -552,13 +552,13 @@ KRuler::slotNewValue(int _value)
// get the rectangular of the old and the new ruler pointer
// and repaint only him
if (dir == Horizontal) {
- QRect oldrec(-5+oldvalue,10, 11,6);
- QRect newrec(-5+_value,10, 11,6);
+ TQRect oldrec(-5+oldvalue,10, 11,6);
+ TQRect newrec(-5+_value,10, 11,6);
repaint( oldrec.unite(newrec) );
}
else {
- QRect oldrec(10,-5+oldvalue, 6,11);
- QRect newrec(10,-5+_value, 6,11);
+ TQRect oldrec(10,-5+oldvalue, 6,11);
+ TQRect newrec(10,-5+_value, 6,11);
repaint( oldrec.unite(newrec) );
}
}
@@ -591,12 +591,12 @@ KRuler::slotEndOffset(int offset)
}
void
-KRuler::drawContents(QPainter *p)
+KRuler::drawContents(TQPainter *p)
{
// debug ("KRuler::drawContents, %s",(horizontal==dir)?"horizontal":"vertical");
#ifdef PROFILING
- QTime time;
+ TQTime time;
time.start();
for (int profile=0; profile<10; profile++) {
#endif
@@ -625,7 +625,7 @@ KRuler::drawContents(QPainter *p)
fontOffset = (((double)minval)>offsetmin)?(double)minval:offsetmin;
// draw labels
- QFont font = p->font();
+ TQFont font = p->font();
font.setPointSize(LABEL_SIZE);
p->setFont( font );
// draw littlemarklabel
@@ -641,7 +641,7 @@ KRuler::drawContents(QPainter *p)
p->drawText( END_LABEL_X, END_LABEL_Y, endlabel );
}
else { // rotate text +pi/2 and move down a bit
- //QFontMetrics fm(font);
+ //TQFontMetrics fm(font);
#ifdef KRULER_ROTATE_TEST
p->rotate( -90.0 + rotate );
p->translate( -8.0 - fontOffset - d->fontWidth + xtrans,
@@ -717,7 +717,7 @@ KRuler::drawContents(QPainter *p)
// draw pointer
if (d->showpointer) {
- QPointArray pa(4);
+ TQPointArray pa(4);
if (dir == Horizontal) {
pa.setPoints(3, value-5, 10, value+5, 10, value/*+0*/,15);
}
diff --git a/kdeui/kruler.h b/kdeui/kruler.h
index 8d1ae3cc7..997eb5c36 100644
--- a/kdeui/kruler.h
+++ b/kdeui/kruler.h
@@ -21,8 +21,8 @@
#ifndef KRULER_H
#define KRULER_H
-#include <qframe.h>
-#include <qrangecontrol.h>
+#include <tqframe.h>
+#include <tqrangecontrol.h>
#include <kdelibs_export.h>
/**
@@ -55,12 +55,12 @@
* To receive mouse clicks or mouse moves,
* the class has to be overloaded.
*
- * For performance reasons, the public methods don't call QWidget::repaint().
+ * For performance reasons, the public methods don't call TQWidget::repaint().
* (Slots do, see documentation below.)
* All the changed settings will be painted once after leaving
* to the main event loop.
* For performance painting the slot methods should be used,
- * they do a fast QWidget::repaint() call after changing the values.
+ * they do a fast TQWidget::repaint() call after changing the values.
* For setting multiple values like minValue(), maxValue(), offset() etc.
* using the public methods is recommended
* so the widget will be painted only once when entering the main event loop.
@@ -111,21 +111,21 @@ public:
/**
* Constructs a horizontal ruler.
*/
- KRuler(QWidget *parent=0, const char *name=0);
+ KRuler(TQWidget *parent=0, const char *name=0);
/**
* Constructs a ruler with orientation @p orient.
*
- * @p parent, @p name and @p f are passed to QFrame.
+ * @p parent, @p name and @p f are passed to TQFrame.
* The default look is a raised widget
- * but may be changed with the inherited QFrame methods.
+ * but may be changed with the inherited TQFrame methods.
*
* @param orient Orientation of the ruler.
- * @param parent Will be handed over to QFrame.
- * @param name Will be handed over to QFrame.
- * @param f Will be handed over to QFrame.
+ * @param parent Will be handed over to TQFrame.
+ * @param name Will be handed over to TQFrame.
+ * @param f Will be handed over to TQFrame.
*
**/
- KRuler(Orientation orient, QWidget *parent=0, const char *name=0,
+ KRuler(Orientation orient, TQWidget *parent=0, const char *name=0,
WFlags f=0);
/**
@@ -134,16 +134,16 @@ public:
* The width sets the fixed width of the widget. This is useful if you
* want to draw the ruler bigger or smaller than the default size.
* Note: The size of the marks doesn't change.
- * @p parent, @p name and @p f are passed to QFrame.
+ * @p parent, @p name and @p f are passed to TQFrame.
*
* @param orient Orientation of the ruler.
* @param widgetWidth Fixed width of the widget.
- * @param parent Will be handed over to QFrame.
- * @param name Will be handed over to QFrame.
- * @param f Will be handed over to QFrame.
+ * @param parent Will be handed over to TQFrame.
+ * @param name Will be handed over to TQFrame.
+ * @param f Will be handed over to TQFrame.
*
*/
- KRuler(Orientation orient, int widgetWidth, QWidget *parent=0,
+ KRuler(Orientation orient, int widgetWidth, TQWidget *parent=0,
const char *name=0, WFlags f=0);
/**
@@ -323,8 +323,8 @@ public:
* Sets the label this is drawn at the beginning of the visible part
* of the ruler to @p label
**/
- void setEndLabel(const QString&);
- QString endLabel() const;
+ void setEndLabel(const TQString&);
+ TQString endLabel() const;
/**
* Sets up the necessary tasks for the provided styles.
@@ -428,7 +428,7 @@ public slots:
* Sets the pointer to a new position.
*
* The offset is NOT updated.
- * QWidget::repaint() is called afterwards.
+ * TQWidget::repaint() is called afterwards.
**/
void slotNewValue(int);
@@ -436,19 +436,19 @@ public slots:
* Sets the ruler marks to a new position.
*
* The pointer is NOT updated.
- * QWidget::repaint() is called afterwards.
+ * TQWidget::repaint() is called afterwards.
**/
void slotNewOffset(int);
void slotEndOffset(int);
protected:
- virtual void drawContents(QPainter *);
+ virtual void drawContents(TQPainter *);
private:
void init();
- QRangeControl range;
+ TQRangeControl range;
Orientation dir;
int tmDist;
int lmDist;
@@ -472,7 +472,7 @@ private:
double ppm; /* pixel per mark */
- QString endlabel;
+ TQString endlabel;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/ksconfig.cpp b/kdeui/ksconfig.cpp
index f17bd0dcc..ec5460ed7 100644
--- a/kdeui/ksconfig.cpp
+++ b/kdeui/ksconfig.cpp
@@ -19,11 +19,11 @@
#include <config.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,12 +41,12 @@
class KSpellConfigPrivate
{
public:
- QStringList replacelist;
+ TQStringList replacelist;
};
KSpellConfig::KSpellConfig (const KSpellConfig &_ksc)
- : QWidget(0, 0), nodialog(true)
+ : TQWidget(0, 0), nodialog(true)
, kc(0)
, cb1(0)
, cb2(0)
@@ -68,9 +68,9 @@ KSpellConfig::KSpellConfig (const KSpellConfig &_ksc)
}
-KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
+KSpellConfig::KSpellConfig( TQWidget *parent, const char *name,
KSpellConfig *_ksc, bool addHelpButton )
- : QWidget (parent, name), nodialog(false)
+ : TQWidget (parent, name), nodialog(false)
, kc(0)
, cb1(0)
, cb2(0)
@@ -98,27 +98,27 @@ KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
setClient( _ksc->client() );
}
- QGridLayout *glay = new QGridLayout( this, 6, 3, 0, KDialog::spacingHint() );
- cb1 = new QCheckBox( i18n("Create &root/affix combinations"
+ TQGridLayout *glay = new TQGridLayout( this, 6, 3, 0, KDialog::spacingHint() );
+ cb1 = new TQCheckBox( i18n("Create &root/affix combinations"
" not in dictionary"), this, "NoRootAffix" );
- connect( cb1, SIGNAL(toggled(bool)), SLOT(sNoAff(bool)) );
+ connect( cb1, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sNoAff(bool)) );
glay->addMultiCellWidget( cb1, 0, 0, 0, 2 );
- cb2 = new QCheckBox( i18n("Consider run-together &words"
+ cb2 = new TQCheckBox( i18n("Consider run-together &words"
" as spelling errors"), this, "RunTogether" );
- connect( cb2, SIGNAL(toggled(bool)), SLOT(sRunTogether(bool)) );
+ connect( cb2, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sRunTogether(bool)) );
glay->addMultiCellWidget( cb2, 1, 1, 0, 2 );
- dictcombo = new QComboBox( this, "DictFromList" );
- dictcombo->setInsertionPolicy( QComboBox::NoInsertion );
- connect( dictcombo, SIGNAL (activated(int)),
- this, SLOT (sSetDictionary(int)) );
+ dictcombo = new TQComboBox( this, "DictFromList" );
+ dictcombo->setInsertionPolicy( TQComboBox::NoInsertion );
+ connect( dictcombo, TQT_SIGNAL (activated(int)),
+ this, TQT_SLOT (sSetDictionary(int)) );
glay->addMultiCellWidget( dictcombo, 2, 2, 1, 2 );
- dictlist = new QLabel( dictcombo, i18n("&Dictionary:"), this );
+ dictlist = new TQLabel( dictcombo, i18n("&Dictionary:"), this );
glay->addWidget( dictlist, 2 ,0 );
- encodingcombo = new QComboBox( this, "Encoding" );
+ encodingcombo = new TQComboBox( this, "Encoding" );
encodingcombo->insertItem( "US-ASCII" );
encodingcombo->insertItem( "ISO 8859-1" );
encodingcombo->insertItem( "ISO 8859-2" );
@@ -136,30 +136,30 @@ KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
encodingcombo->insertItem( "CP1251" );
encodingcombo->insertItem( "CP1255" );
- connect( encodingcombo, SIGNAL(activated(int)), this,
- SLOT(sChangeEncoding(int)) );
+ connect( encodingcombo, TQT_SIGNAL(activated(int)), this,
+ TQT_SLOT(sChangeEncoding(int)) );
glay->addMultiCellWidget( encodingcombo, 3, 3, 1, 2 );
- QLabel *tmpQLabel = new QLabel( encodingcombo, i18n("&Encoding:"), this);
+ TQLabel *tmpQLabel = new TQLabel( encodingcombo, i18n("&Encoding:"), this);
glay->addWidget( tmpQLabel, 3, 0 );
- clientcombo = new QComboBox( this, "Client" );
+ clientcombo = new TQComboBox( this, "Client" );
clientcombo->insertItem( i18n("International Ispell") );
clientcombo->insertItem( i18n("Aspell") );
clientcombo->insertItem( i18n("Hspell") );
clientcombo->insertItem( i18n("Zemberek") );
- connect( clientcombo, SIGNAL (activated(int)), this,
- SLOT (sChangeClient(int)) );
+ connect( clientcombo, TQT_SIGNAL (activated(int)), this,
+ TQT_SLOT (sChangeClient(int)) );
glay->addMultiCellWidget( clientcombo, 4, 4, 1, 2 );
- tmpQLabel = new QLabel( clientcombo, i18n("&Client:"), this );
+ tmpQLabel = new TQLabel( clientcombo, i18n("&Client:"), this );
glay->addWidget( tmpQLabel, 4, 0 );
if( addHelpButton )
{
- QPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this );
- connect( pushButton, SIGNAL(clicked()), this, SLOT(sHelp()) );
+ TQPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this );
+ connect( pushButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(sHelp()) );
glay->addWidget(pushButton, 5, 2);
}
@@ -246,16 +246,16 @@ KSpellConfig::sChangeClient( int i )
emit configChanged();
}
-// KDE 4: Make it const QString & fname (only fname)
+// KDE 4: Make it const TQString & fname (only fname)
bool
-KSpellConfig::interpret( QString &fname, QString &lname,
- QString &hname )
+KSpellConfig::interpret( TQString &fname, TQString &lname,
+ TQString &hname )
{
kdDebug(750) << "KSpellConfig::interpret [" << fname << "]" << endl;
- QString dname( fname );
+ TQString dname( fname );
if( dname.endsWith( "+" ) )
dname.remove( dname.length()-1, 1 );
@@ -264,7 +264,7 @@ KSpellConfig::interpret( QString &fname, QString &lname,
dname.endsWith("xlg"))
dname.remove(dname.length()-3,3);
- QString extension;
+ TQString extension;
int i = dname.find('-');
if ( i != -1 )
@@ -282,7 +282,7 @@ KSpellConfig::interpret( QString &fname, QString &lname,
else if ( (dname.length() == 5) && (dname[2] == '_') ) {
lname = dname.left(2);
hname = KGlobal::locale()->twoAlphaToLanguageName(lname);
- QString country = KGlobal::locale()->twoAlphaToCountryName( dname.right(2) );
+ TQString country = KGlobal::locale()->twoAlphaToCountryName( dname.right(2) );
if ( extension.isEmpty() )
extension = country;
else
@@ -363,8 +363,8 @@ KSpellConfig::interpret( QString &fname, QString &lname,
}
//We have explicitly chosen English as the default here.
- if ( ( KGlobal::locale()->language() == QString::fromLatin1("C") &&
- lname==QString::fromLatin1("en") ) ||
+ if ( ( KGlobal::locale()->language() == TQString::fromLatin1("C") &&
+ lname==TQString::fromLatin1("en") ) ||
KGlobal::locale()->language() == lname )
return true;
@@ -440,7 +440,7 @@ void KSpellConfig::getAvailDictsIspell () {
dictcombo->insertItem( i18n("ISpell Default") );
// dictionary path
- QFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
+ TQFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/local/lib" KDELIBSUFF "/ispell");
if (!dir.exists() || !dir.isDir())
@@ -459,19 +459,19 @@ void KSpellConfig::getAvailDictsIspell () {
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*.hash");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*.hash");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// remove .hash
@@ -509,7 +509,7 @@ void KSpellConfig::getAvailDictsAspell () {
// Aspell now have /usr/lib/aspell as
// ASPELL_DATADIR default.
- QFileInfo dir ( ASPELL_DATADIR );
+ TQFileInfo dir ( ASPELL_DATADIR );
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
if (!dir.exists() || !dir.isDir())
@@ -525,19 +525,19 @@ void KSpellConfig::getAvailDictsAspell () {
kdDebug(750) << "KSpellConfig::getAvailDictsAspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// consider only simple dicts without '-' in the name
@@ -584,7 +584,7 @@ void KSpellConfig::getAvailDictsAspell () {
}
void
-KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
+KSpellConfig::fillDicts( TQComboBox* box, TQStringList* dictionaries )
{
langfnames.clear();
if ( box ) {
@@ -594,7 +594,7 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
box->insertItem( i18n("ISpell Default") );
// dictionary path
- QFileInfo dir ("/usr/lib/ispell");
+ TQFileInfo dir ("/usr/lib/ispell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/local/lib/ispell");
if (!dir.exists() || !dir.isDir())
@@ -613,19 +613,19 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*.hash");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*.hash");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// remove .hash
@@ -669,7 +669,7 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
// dictionary path
// FIXME: use "aspell dump config" to find out the dict-dir
- QFileInfo dir ("/usr/lib" KDELIBSUFF "/aspell");
+ TQFileInfo dir ("/usr/lib" KDELIBSUFF "/aspell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
if (!dir.exists() || !dir.isDir())
@@ -685,19 +685,19 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
kdDebug(750) << "KSpellConfig::getAvailDictsAspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// consider only simple dicts without '-' in the name
@@ -783,7 +783,7 @@ KSpellConfig::setRunTogether(bool b)
}
void
-KSpellConfig::setDictionary (const QString s)
+KSpellConfig::setDictionary (const TQString s)
{
qsdict=s; //.copy();
@@ -855,13 +855,13 @@ KSpellConfig::runTogether() const
}
const
-QString KSpellConfig::dictionary () const
+TQString KSpellConfig::dictionary () const
{
return qsdict;
}
/*
-const QString KSpellConfig::personalDict () const
+const TQString KSpellConfig::personalDict () const
{
return qspdict;
}
@@ -893,7 +893,7 @@ KSpellConfig::sBrowseDict()
{
return;
- QString qs( KFileDialog::getOpenFileName ("/usr/local/lib","*.hash") );
+ TQString qs( KFileDialog::getOpenFileName ("/usr/local/lib","*.hash") );
if ( !qs.isNull() )
kle1->setText (qs);
@@ -904,7 +904,7 @@ KSpellConfig::sBrowseDict()
void KSpellConfig::sBrowsePDict()
{
//how do I find home directory path??
- QString qs( KFileDialog::getOpenFileName ("",".ispell_*") );
+ TQString qs( KFileDialog::getOpenFileName ("",".ispell_*") );
if ( !qs.isNull() )
kle2->setText (qs);
@@ -917,7 +917,7 @@ KSpellConfig::sSetDictionary (int i)
{
setDictionary (langfnames[i]);
setDictFromList (true);
- QTimer::singleShot( 0, this, SIGNAL( configChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SIGNAL( configChanged() ) );
}
void
@@ -996,9 +996,9 @@ KSpellConfig::operator= (const KSpellConfig &ksc)
fillInDialog();
}
-// KDE 4: Make it const QStringList &
+// KDE 4: Make it const TQStringList &
void
-KSpellConfig::setIgnoreList (QStringList _ignorelist)
+KSpellConfig::setIgnoreList (TQStringList _ignorelist)
{
ignorelist=_ignorelist;
}
@@ -1009,9 +1009,9 @@ KSpellConfig::ignoreList () const
return ignorelist;
}
-// KDE 4: Make it const QStringList &
+// KDE 4: Make it const TQStringList &
void
-KSpellConfig::setReplaceAllList (QStringList _replacelist)
+KSpellConfig::setReplaceAllList (TQStringList _replacelist)
{
d->replacelist=_replacelist;
}
diff --git a/kdeui/ksconfig.h b/kdeui/ksconfig.h
index 548fbfc84..c50789df9 100644
--- a/kdeui/ksconfig.h
+++ b/kdeui/ksconfig.h
@@ -18,9 +18,9 @@
#ifndef KDELIBS_KSCONFIG_H
#define KDELIBS_KSCONFIG_H
-#include <qwidget.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -100,7 +100,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* activateHelp for more information.
*
*/
- KSpellConfig( QWidget *parent=0, const char *name=0,
+ KSpellConfig( TQWidget *parent=0, const char *name=0,
KSpellConfig *spellConfig=0, bool addHelpButton = true );
KSpellConfig( const KSpellConfig & );
@@ -131,7 +131,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* @since 3.2
*
*/
- void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
+ void fillDicts( TQComboBox* box, TQStringList* dictionaries = 0 );
/**
* @sect Options setting routines.
@@ -147,14 +147,14 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* It may be useful to save this list with the document being
* edited to facilitate quicker future spellchecking.
*/
- void setIgnoreList( QStringList _ignorelist );
+ void setIgnoreList( TQStringList _ignorelist );
/**
* The @p _replaceAllList contains word you like that replace
* word. Be careful that this list contains word which is replaced
* and new word.
*/
- void setReplaceAllList( QStringList _replaceAllList );
+ void setReplaceAllList( TQStringList _replaceAllList );
/**
* Set an ISpell option.
@@ -173,7 +173,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
/**
* Set the name of the dictionary to use.
*/
- void setDictionary( const QString qs );
+ void setDictionary( const TQString qs );
void setDictFromList( bool dfl );
//void setPersonalDict (const char *s);
@@ -188,12 +188,12 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
*/
bool noRootAffix() const;
bool runTogether() const;
- const QString dictionary() const;
+ const TQString dictionary() const;
bool dictFromList() const;
- //QString personalDict () const;
+ //TQString personalDict () const;
int encoding() const;
- QStringList ignoreList() const;
- QStringList replaceAllList() const;
+ TQStringList ignoreList() const;
+ TQStringList replaceAllList() const;
int client() const; ///< Spell checker client, see KSpellClients
@@ -221,7 +221,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
*
* @return true if <pre>lname.data()==$LANG</pre>
*/
- bool interpret( QString &fname, QString &lname, QString &hname );
+ bool interpret( TQString &fname, TQString &lname, TQString &hname );
public slots:
@@ -260,21 +260,21 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
bool bruntogether; // -B
bool dictfromlist;
bool nodialog;
- QString qsdict; // -d [dict]
- QString qspdict; // -p [dict]
- QStringList ignorelist;
+ TQString qsdict; // -d [dict]
+ TQString qspdict; // -p [dict]
+ TQStringList ignorelist;
enum {rdictlist=3, rencoding=4, rhelp=6};
KConfig *kc;
int iclient; // defaults to ispell, may be aspell, too
- QCheckBox *cb1, *cb2;
+ TQCheckBox *cb1, *cb2;
//KLineEdit *kle1, *kle2;
- //QButtonGroup *dictgroup;
- //QRadioButton *dictlistbutton, *dicteditbutton;
- QLabel *dictlist;
- QComboBox *dictcombo, *encodingcombo, *clientcombo;
- //QPushButton *browsebutton1;
- QStringList langfnames;
+ //TQButtonGroup *dictgroup;
+ //TQRadioButton *dictlistbutton, *dicteditbutton;
+ TQLabel *dictlist;
+ TQComboBox *dictcombo, *encodingcombo, *clientcombo;
+ //TQPushButton *browsebutton1;
+ TQStringList langfnames;
signals:
void configChanged();
diff --git a/kdeui/kscrollview.cpp b/kdeui/kscrollview.cpp
index 779f6a62b..1d37d03d3 100644
--- a/kdeui/kscrollview.cpp
+++ b/kdeui/kscrollview.cpp
@@ -18,9 +18,9 @@
#include "config.h"
-#include <qtimer.h>
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include "kscrollview.h"
#include <kdebug.h>
@@ -29,7 +29,7 @@
struct KScrollView::KScrollViewPrivate {
KScrollViewPrivate() : dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) {}
- QTimer timer;
+ TQTimer timer;
int dx;
int dy;
// Step size * 16 and residual to avoid huge difference between 1px/step and 2px/step
@@ -40,11 +40,11 @@ struct KScrollView::KScrollViewPrivate {
bool scrolling;
};
-KScrollView::KScrollView( QWidget *parent, const char *name, Qt::WFlags f )
- : QScrollView( parent, name, f )
+KScrollView::KScrollView( TQWidget *parent, const char *name, Qt::WFlags f )
+ : TQScrollView( parent, name, f )
{
d = new KScrollViewPrivate;
- connect(&d->timer, SIGNAL(timeout()), this, SLOT(scrollTick()));
+ connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scrollTick()));
}
KScrollView::~KScrollView()
@@ -56,7 +56,7 @@ void KScrollView::scrollBy(int dx, int dy)
{
KConfigGroup cfg( KGlobal::config(), "KDE" );
if( !cfg.readBoolEntry( "SmoothScrolling", true )) {
- QScrollView::scrollBy( dx, dy );
+ TQScrollView::scrollBy( dx, dy );
return;
}
// scrolling destination
@@ -106,7 +106,7 @@ void KScrollView::setContentsPos(int x, int y)
int dy = y - contentsY();
// to large to smooth out
-// if (dx > 1000 || dy > 1000) return QScrollView::setContentsPos(x,y);
+// if (dx > 1000 || dy > 1000) return TQScrollView::setContentsPos(x,y);
// scrolling speed
int ddx = 0;
@@ -155,8 +155,8 @@ void KScrollView::scrollTick() {
d->dx -= ddx;
d->dy -= ddy;
-// QScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
- QScrollView::scrollBy(ddx, ddy);
+// TQScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
+ TQScrollView::scrollBy(ddx, ddy);
}
void KScrollView::startScrolling()
@@ -172,12 +172,12 @@ void KScrollView::stopScrolling()
d->scrolling = false;
}
-// Overloaded from QScrollView and QScrollBar
-void KScrollView::wheelEvent( QWheelEvent *e )
+// Overloaded from TQScrollView and QScrollBar
+void KScrollView::wheelEvent( TQWheelEvent *e )
{
int pageStep = verticalScrollBar()->pageStep();
int lineStep = verticalScrollBar()->lineStep();
- int step = QMIN( QApplication::wheelScrollLines()*lineStep, pageStep );
+ int step = QMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
step = pageStep;
diff --git a/kdeui/kscrollview.h b/kdeui/kscrollview.h
index 9326876af..cca289e75 100644
--- a/kdeui/kscrollview.h
+++ b/kdeui/kscrollview.h
@@ -18,12 +18,12 @@
#ifndef KSCROLLVIEW_H
#define KSCROLLVIEW_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QScrollView that supports smooth scrolling.
+ * @short A variant of TQScrollView that supports smooth scrolling.
*
*
**/
@@ -32,7 +32,7 @@ class KDEUI_EXPORT KScrollView : public QScrollView
Q_OBJECT
public:
- KScrollView( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
+ KScrollView( TQWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
~KScrollView();
@@ -41,7 +41,7 @@ public slots:
// virtual void setContentsPos(int x, int y);
protected:
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
void startScrolling();
void stopScrolling();
diff --git a/kdeui/kselect.cpp b/kdeui/kselect.cpp
index 3795056e6..a5fd0f613 100644
--- a/kdeui/kselect.cpp
+++ b/kdeui/kselect.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qstyle.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqstyle.h>
#include <kimageeffect.h>
#include "kselect.h"
@@ -33,8 +33,8 @@
* The contents of the selector are drawn by derived class.
*/
-KXYSelector::KXYSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KXYSelector::KXYSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
xPos = 0;
yPos = 0;
@@ -42,7 +42,7 @@ KXYSelector::KXYSelector( QWidget *parent, const char *name )
minY = 0;
maxX = 100;
maxY = 100;
- store.setOptimization( QPixmap::BestOptim );
+ store.setOptimization( TQPixmap::BestOptim );
store.resize( STORE_W2, STORE_W2 );
}
@@ -53,7 +53,7 @@ KXYSelector::~KXYSelector()
void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
px = w;
py = w;
minX = _minX;
@@ -74,7 +74,7 @@ void KXYSelector::setYValue( int _yPos )
void KXYSelector::setValues( int _xPos, int _yPos )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
xPos = _xPos;
@@ -96,35 +96,35 @@ void KXYSelector::setValues( int _xPos, int _yPos )
setPosition( xp, yp );
}
-QRect KXYSelector::contentsRect() const
+TQRect KXYSelector::contentsRect() const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) {
w = 5;
}
- QRect contents(rect());
+ TQRect contents(rect());
contents.addCoords(w, w, -w, -w);
return contents;
}
-void KXYSelector::paintEvent( QPaintEvent *ev )
+void KXYSelector::paintEvent( TQPaintEvent *ev )
{
- QRect cursorRect( px - STORE_W, py - STORE_W, STORE_W2, STORE_W2);
- QRect paintRect = ev->rect();
- QRect borderRect = rect();
+ TQRect cursorRect( px - STORE_W, py - STORE_W, STORE_W2, STORE_W2);
+ TQRect paintRect = ev->rect();
+ TQRect borderRect = rect();
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) {
w = 5 - w;
}
borderRect.addCoords(w, w, -w, -w);
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
- style().drawPrimitive(QStyle::PE_Panel, &painter,
+ style().drawPrimitive(TQStyle::PE_Panel, &painter,
borderRect, colorGroup(),
- QStyle::Style_Sunken);
+ TQStyle::Style_Sunken);
drawContents( &painter );
if (paintRect.contains(cursorRect))
@@ -141,16 +141,16 @@ void KXYSelector::paintEvent( QPaintEvent *ev )
painter.end();
}
-void KXYSelector::mousePressEvent( QMouseEvent *e )
+void KXYSelector::mousePressEvent( TQMouseEvent *e )
{
mouseMoveEvent(e);
}
-void KXYSelector::mouseMoveEvent( QMouseEvent *e )
+void KXYSelector::mouseMoveEvent( TQMouseEvent *e )
{
int xVal, yVal;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal );
setValues( xVal, yVal );
@@ -158,7 +158,7 @@ void KXYSelector::mouseMoveEvent( QMouseEvent *e )
emit valueChanged( xPos, yPos );
}
-void KXYSelector::wheelEvent( QWheelEvent *e )
+void KXYSelector::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Qt::Horizontal )
setValues( xValue() + e->delta()/120, yValue() );
@@ -170,7 +170,7 @@ void KXYSelector::wheelEvent( QWheelEvent *e )
void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
xVal = ( (maxX-minX) * (x-w) ) / ( width()-2*w );
yVal = maxY - ( ( (maxY-minY) * (y-w) ) / ( height()-2*w ) );
@@ -188,7 +188,7 @@ void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
void KXYSelector::setPosition( int xp, int yp )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
if ( xp < w )
xp = w;
@@ -200,7 +200,7 @@ void KXYSelector::setPosition( int xp, int yp )
else if ( yp > height() - w )
yp = height() - w;
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
bitBlt( this, px - STORE_W, py - STORE_W, &store, 0, 0,
@@ -214,13 +214,13 @@ void KXYSelector::setPosition( int xp, int yp )
painter.end();
}
-void KXYSelector::drawContents( QPainter * )
+void KXYSelector::drawContents( TQPainter * )
{}
-void KXYSelector::drawCursor( QPainter *p, int xp, int yp )
+void KXYSelector::drawCursor( TQPainter *p, int xp, int yp )
{
- p->setPen( QPen( white ) );
+ p->setPen( TQPen( white ) );
p->drawLine( xp - 6, yp - 6, xp - 2, yp - 2 );
p->drawLine( xp - 6, yp + 6, xp - 2, yp + 2 );
@@ -235,15 +235,15 @@ void KXYSelector::drawCursor( QPainter *p, int xp, int yp )
*/
-KSelector::KSelector( QWidget *parent, const char *name )
- : QWidget( parent, name ), QRangeControl()
+KSelector::KSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), TQRangeControl()
{
_orientation = Horizontal;
_indent = true;
}
-KSelector::KSelector( Orientation o, QWidget *parent, const char *name )
- : QWidget( parent, name ), QRangeControl()
+KSelector::KSelector( Orientation o, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), TQRangeControl()
{
_orientation = o;
_indent = true;
@@ -254,20 +254,20 @@ KSelector::~KSelector()
{}
-QRect KSelector::contentsRect() const
+TQRect KSelector::contentsRect() const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
- return QRect( w, iw, width() - w * 2 - 5, height() - 2 * iw );
+ return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw );
else
- return QRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 );
+ return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 );
}
-void KSelector::paintEvent( QPaintEvent * )
+void KSelector::paintEvent( TQPaintEvent * )
{
- QPainter painter;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ TQPainter painter;
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
painter.begin( this );
@@ -276,33 +276,33 @@ void KSelector::paintEvent( QPaintEvent * )
if ( indent() )
{
- QRect r = rect();
+ TQRect r = rect();
if ( orientation() == Vertical )
r.addCoords(0, iw - w, -iw, w - iw);
else
r.addCoords(iw - w, 0, w - iw, -iw);
- style().drawPrimitive(QStyle::PE_Panel, &painter,
+ style().drawPrimitive(TQStyle::PE_Panel, &painter,
r, colorGroup(),
- QStyle::Style_Sunken);
+ TQStyle::Style_Sunken);
}
- QPoint pos = calcArrowPos( value() );
+ TQPoint pos = calcArrowPos( value() );
drawArrow( &painter, true, pos );
painter.end();
}
-void KSelector::mousePressEvent( QMouseEvent *e )
+void KSelector::mousePressEvent( TQMouseEvent *e )
{
moveArrow( e->pos() );
}
-void KSelector::mouseMoveEvent( QMouseEvent *e )
+void KSelector::mouseMoveEvent( TQMouseEvent *e )
{
moveArrow( e->pos() );
}
-void KSelector::wheelEvent( QWheelEvent *e )
+void KSelector::wheelEvent( TQWheelEvent *e )
{
int val = value() + e->delta()/120;
setValue( val );
@@ -310,8 +310,8 @@ void KSelector::wheelEvent( QWheelEvent *e )
void KSelector::valueChange()
{
- QPainter painter;
- QPoint pos;
+ TQPainter painter;
+ TQPoint pos;
painter.begin( this );
@@ -326,10 +326,10 @@ void KSelector::valueChange()
emit valueChanged( value() );
}
-void KSelector::moveArrow( const QPoint &pos )
+void KSelector::moveArrow( const TQPoint &pos )
{
int val;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
@@ -342,11 +342,11 @@ void KSelector::moveArrow( const QPoint &pos )
setValue( val );
}
-QPoint KSelector::calcArrowPos( int val )
+TQPoint KSelector::calcArrowPos( int val )
{
- QPoint p;
+ TQPoint p;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
{
@@ -364,17 +364,17 @@ QPoint KSelector::calcArrowPos( int val )
return p;
}
-void KSelector::drawContents( QPainter * )
+void KSelector::drawContents( TQPainter * )
{}
-void KSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
+void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos )
{
if ( show )
{
- QPointArray array(3);
+ TQPointArray array(3);
- painter->setPen( QPen() );
- painter->setBrush( QBrush( colorGroup().buttonText() ) );
+ painter->setPen( TQPen() );
+ painter->setBrush( TQBrush( colorGroup().buttonText() ) );
array.setPoint( 0, pos.x()+0, pos.y()+0 );
array.setPoint( 1, pos.x()+5, pos.y()+5 );
if ( orientation() == Vertical )
@@ -403,14 +403,14 @@ void KSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
//----------------------------------------------------------------------------
-KGradientSelector::KGradientSelector( QWidget *parent, const char *name )
+KGradientSelector::KGradientSelector( TQWidget *parent, const char *name )
: KSelector( parent, name )
{
init();
}
-KGradientSelector::KGradientSelector( Orientation o, QWidget *parent,
+KGradientSelector::KGradientSelector( Orientation o, TQWidget *parent,
const char *name )
: KSelector( o, parent, name )
{
@@ -431,11 +431,11 @@ void KGradientSelector::init()
}
-void KGradientSelector::drawContents( QPainter *painter )
+void KGradientSelector::drawContents( TQPainter *painter )
{
- QImage image( contentsRect().width(), contentsRect().height(), 32 );
+ TQImage image( contentsRect().width(), contentsRect().height(), 32 );
- QColor col;
+ TQColor col;
float scale;
int redDiff = color2.red() - color1.red();
@@ -474,7 +474,7 @@ void KGradientSelector::drawContents( QPainter *painter )
sizeof( unsigned int ) * image.width() );
}
- QColor ditherPalette[8];
+ TQColor ditherPalette[8];
for ( int s = 0; s < 8; s++ )
ditherPalette[s].setRgb( color1.red() + redDiff * s / 8,
@@ -483,7 +483,7 @@ void KGradientSelector::drawContents( QPainter *painter )
KImageEffect::dither( image, ditherPalette, 8 );
- QPixmap p;
+ TQPixmap p;
p.convertFromImage( image );
painter->drawPixmap( contentsRect().x(), contentsRect().y(), p );
@@ -493,7 +493,7 @@ void KGradientSelector::drawContents( QPainter *painter )
int yPos = contentsRect().top() + painter->fontMetrics().ascent() + 2;
int xPos = contentsRect().left() + (contentsRect().width() -
painter->fontMetrics().width( text2 )) / 2;
- QPen pen( color2 );
+ TQPen pen( color2 );
painter->setPen( pen );
painter->drawText( xPos, yPos, text2 );
@@ -508,7 +508,7 @@ void KGradientSelector::drawContents( QPainter *painter )
{
int yPos = contentsRect().bottom()-painter->fontMetrics().descent()-2;
- QPen pen( color2 );
+ TQPen pen( color2 );
painter->setPen( pen );
painter->drawText( contentsRect().left() + 2, yPos, text1 );
diff --git a/kdeui/kselect.h b/kdeui/kselect.h
index bc281341d..cc9d57d48 100644
--- a/kdeui/kselect.h
+++ b/kdeui/kselect.h
@@ -23,9 +23,9 @@
#ifndef __KSELECT_H__
#define __KSELECT_H__
-#include <qwidget.h>
-#include <qrangecontrol.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqrangecontrol.h>
+#include <tqpixmap.h>
#include <kdelibs_export.h>
@@ -51,7 +51,7 @@ public:
* Constructs a two-dimensional selector widget which
* has a value range of [0..100] in both directions.
*/
- KXYSelector( QWidget *parent=0, const char *name=0 );
+ KXYSelector( TQWidget *parent=0, const char *name=0 );
/**
* Destructs the widget.
*/
@@ -94,7 +94,7 @@ public:
/**
* @return the rectangle on which subclasses should draw.
*/
- QRect contentsRect() const;
+ TQRect contentsRect() const;
signals:
/**
@@ -110,17 +110,17 @@ protected:
*
* Draw within contentsRect() only.
*/
- virtual void drawContents( QPainter * );
+ virtual void drawContents( TQPainter * );
/**
* Override this function to draw the cursor which
* indicates the currently selected value pair.
*/
- virtual void drawCursor( QPainter *p, int xp, int yp );
+ virtual void drawCursor( TQPainter *p, int xp, int yp );
- virtual void paintEvent( QPaintEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void paintEvent( TQPaintEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
/**
* Converts a pixel position to its corresponding values.
@@ -137,7 +137,7 @@ private:
int maxX;
int minY;
int maxY;
- QPixmap store;
+ TQPixmap store;
protected:
virtual void virtual_hook( int id, void* data );
@@ -156,7 +156,7 @@ private:
* A custom drawing routine for the widget surface has
* to be provided by the subclass.
*/
-class KDEUI_EXPORT KSelector : public QWidget, public QRangeControl
+class KDEUI_EXPORT KSelector : public TQWidget, public QRangeControl
{
Q_OBJECT
Q_PROPERTY( int value READ value WRITE setValue )
@@ -167,12 +167,12 @@ public:
/**
* Constructs a horizontal one-dimensional selection widget.
*/
- KSelector( QWidget *parent=0, const char *name=0 );
+ KSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a one-dimensional selection widget with
* a given orientation.
*/
- KSelector( Orientation o, QWidget *parent = 0L, const char *name = 0L );
+ KSelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L );
/*
* Destructs the widget.
*/
@@ -187,7 +187,7 @@ public:
/**
* @return the rectangle on which subclasses should draw.
*/
- QRect contentsRect() const;
+ TQRect contentsRect() const;
/**
* Sets the indent option of the widget to i.
@@ -205,37 +205,37 @@ public:
* Sets the value.
*/
void setValue(int value)
- { QRangeControl::setValue(value); }
+ { TQRangeControl::setValue(value); }
/**
* @returns the value.
*/
int value() const
- { return QRangeControl::value(); }
+ { return TQRangeControl::value(); }
/**
* Sets the min value.
*/
void setMinValue(int value)
- { QRangeControl::setMinValue(value); }
+ { TQRangeControl::setMinValue(value); }
/**
* @return the min value.
*/
int minValue() const
- { return QRangeControl::minValue(); }
+ { return TQRangeControl::minValue(); }
/**
* Sets the max value.
*/
void setMaxValue(int value)
- { QRangeControl::setMaxValue(value); }
+ { TQRangeControl::setMaxValue(value); }
/**
* @return the max value.
*/
int maxValue() const
- { return QRangeControl::maxValue(); }
+ { return TQRangeControl::maxValue(); }
signals:
/**
@@ -251,7 +251,7 @@ protected:
*
* Draw only within contentsRect().
*/
- virtual void drawContents( QPainter * );
+ virtual void drawContents( TQPainter * );
/**
* Override this function to draw the cursor which
* indicates the current value. This function is
@@ -259,17 +259,17 @@ protected:
* to clear the old cursor, once with argument show=true
* to draw the new one.
*/
- virtual void drawArrow( QPainter *painter, bool show, const QPoint &pos );
+ virtual void drawArrow( TQPainter *painter, bool show, const TQPoint &pos );
virtual void valueChange();
- virtual void paintEvent( QPaintEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
private:
- QPoint calcArrowPos( int val );
- void moveArrow( const QPoint &pos );
+ TQPoint calcArrowPos( int val );
+ void moveArrow( const TQPoint &pos );
Orientation _orientation;
bool _indent;
@@ -294,22 +294,22 @@ class KDEUI_EXPORT KGradientSelector : public KSelector
{
Q_OBJECT
- Q_PROPERTY( QColor firstColor READ firstColor WRITE setFirstColor )
- Q_PROPERTY( QColor secondColor READ secondColor WRITE setSecondColor )
- Q_PROPERTY( QString firstText READ firstText WRITE setFirstText )
- Q_PROPERTY( QString secondText READ secondText WRITE setSecondText )
+ Q_PROPERTY( TQColor firstColor READ firstColor WRITE setFirstColor )
+ Q_PROPERTY( TQColor secondColor READ secondColor WRITE setSecondColor )
+ Q_PROPERTY( TQString firstText READ firstText WRITE setFirstText )
+ Q_PROPERTY( TQString secondText READ secondText WRITE setSecondText )
public:
/**
* Constructs a horizontal color selector which
* contains a gradient between white and black.
*/
- KGradientSelector( QWidget *parent=0, const char *name=0 );
+ KGradientSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a colors selector with orientation o which
* contains a gradient between white and black.
*/
- KGradientSelector( Orientation o, QWidget *parent=0, const char *name=0 );
+ KGradientSelector( Orientation o, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the widget.
*/
@@ -317,49 +317,49 @@ public:
/**
* Sets the two colors which span the gradient.
*/
- void setColors( const QColor &col1, const QColor &col2 )
+ void setColors( const TQColor &col1, const TQColor &col2 )
{ color1 = col1; color2 = col2; update();}
- void setText( const QString &t1, const QString &t2 )
+ void setText( const TQString &t1, const TQString &t2 )
{ text1 = t1; text2 = t2; update(); }
/**
* Set each color on its own.
*/
- void setFirstColor( const QColor &col )
+ void setFirstColor( const TQColor &col )
{ color1 = col; update(); }
- void setSecondColor( const QColor &col )
+ void setSecondColor( const TQColor &col )
{ color2 = col; update(); }
/**
* Set each description on its own
*/
- void setFirstText( const QString &t )
+ void setFirstText( const TQString &t )
{ text1 = t; update(); }
- void setSecondText( const QString &t )
+ void setSecondText( const TQString &t )
{ text2 = t; update(); }
- const QColor firstColor() const
+ const TQColor firstColor() const
{ return color1; }
- const QColor secondColor() const
+ const TQColor secondColor() const
{ return color2; }
- const QString firstText() const
+ const TQString firstText() const
{ return text1; }
- const QString secondText() const
+ const TQString secondText() const
{ return text2; }
protected:
- virtual void drawContents( QPainter * );
- virtual QSize minimumSize() const
+ virtual void drawContents( TQPainter * );
+ virtual TQSize minimumSize() const
{ return sizeHint(); }
private:
void init();
- QColor color1;
- QColor color2;
- QString text1;
- QString text2;
+ TQColor color1;
+ TQColor color2;
+ TQString text1;
+ TQString text2;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kseparator.cpp b/kdeui/kseparator.cpp
index a0c636f4c..3b6523917 100644
--- a/kdeui/kseparator.cpp
+++ b/kdeui/kseparator.cpp
@@ -17,7 +17,7 @@
*
*/
-#include <qstyle.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -25,8 +25,8 @@
#include "kseparator.moc"
-KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(TQWidget* parent, const char* name, WFlags f)
+ : TQFrame(parent, name, f)
{
setLineWidth(1);
setMidLineWidth(0);
@@ -35,8 +35,8 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
-KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(int orientation, TQWidget* parent, const char* name, WFlags f)
+ : TQFrame(parent, name, f)
{
setLineWidth(1);
setMidLineWidth(0);
@@ -51,7 +51,7 @@ void KSeparator::setOrientation(int orientation)
{
case Vertical:
case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
setMinimumSize(2, 0);
break;
@@ -60,7 +60,7 @@ void KSeparator::setOrientation(int orientation)
case Horizontal:
case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
setMinimumSize(0, 2);
break;
}
@@ -79,36 +79,36 @@ int KSeparator::orientation() const
return 0;
}
-void KSeparator::drawFrame(QPainter *p)
+void KSeparator::drawFrame(TQPainter *p)
{
QPoint p1, p2;
QRect r = frameRect();
- const QColorGroup & g = colorGroup();
+ const TQColorGroup & g = colorGroup();
if ( frameStyle() & HLine ) {
- p1 = QPoint( r.x(), r.height()/2 );
- p2 = QPoint( r.x()+r.width(), p1.y() );
+ p1 = TQPoint( r.x(), r.height()/2 );
+ p2 = TQPoint( r.x()+r.width(), p1.y() );
}
else {
- p1 = QPoint( r.x()+r.width()/2, 0 );
- p2 = QPoint( p1.x(), r.height() );
+ p1 = TQPoint( r.x()+r.width()/2, 0 );
+ p2 = TQPoint( p1.x(), r.height() );
}
- QStyleOption opt( lineWidth(), midLineWidth() );
- style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g,
- QStyle::Style_Sunken, opt );
+ TQStyleOption opt( lineWidth(), midLineWidth() );
+ style().drawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g,
+ TQStyle::Style_Sunken, opt );
}
-QSize KSeparator::sizeHint() const
+TQSize KSeparator::sizeHint() const
{
if ( frameStyle() & VLine )
- return QSize(2, 0);
+ return TQSize(2, 0);
if ( frameStyle() & HLine )
- return QSize(0, 2);
+ return TQSize(0, 2);
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
void KSeparator::virtual_hook( int, void* )
diff --git a/kdeui/kseparator.h b/kdeui/kseparator.h
index 56def3eda..008403a15 100644
--- a/kdeui/kseparator.h
+++ b/kdeui/kseparator.h
@@ -20,7 +20,7 @@
#ifndef __KSEPARATOR_H__
#define __KSEPARATOR_H__
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -39,9 +39,9 @@ class KDEUI_EXPORT KSeparator : public QFrame
* Constructor.
* @param parent parent object.
* @param name name of the new object.
- * @param f extra QWidget flags.
+ * @param f extra TQWidget flags.
**/
- KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0);
+ KSeparator(TQWidget* parent=0, const char* name=0, WFlags f=0);
/**
* Constructor.
@@ -49,9 +49,9 @@ class KDEUI_EXPORT KSeparator : public QFrame
* Possible values are HLine or Horizontal and VLine or Vertical.
* @param parent parent object.
* @param name name of the new object.
- * @param f extra QWidget flags.
+ * @param f extra TQWidget flags.
**/
- KSeparator(int orientation, QWidget* parent=0, const char* name=0,
+ KSeparator(int orientation, TQWidget* parent=0, const char* name=0,
WFlags f=0);
/**
@@ -70,13 +70,13 @@ class KDEUI_EXPORT KSeparator : public QFrame
/**
* The recommended height (width) for a horizontal (vertical) separator.
**/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
/**
* @param p pointer to painter
*/
- virtual void drawFrame( QPainter *p );
+ virtual void drawFrame( TQPainter *p );
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/ksharedpixmap.cpp b/kdeui/ksharedpixmap.cpp
index 8af8d7277..002b4290f 100644
--- a/kdeui/ksharedpixmap.cpp
+++ b/kdeui/ksharedpixmap.cpp
@@ -13,12 +13,12 @@
*/
#include "config.h"
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qwindowdefs.h>
-#include <qwidget.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqwindowdefs.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
@@ -58,11 +58,11 @@ public:
Atom pixmap;
Atom target;
Atom selection;
- QRect rect;
+ TQRect rect;
};
KSharedPixmap::KSharedPixmap()
- : QWidget(0L, "shpixmap comm window")
+ : TQWidget(0L, "shpixmap comm window")
{
d = new KSharedPixmapPrivate;
init();
@@ -78,16 +78,16 @@ KSharedPixmap::~KSharedPixmap()
void KSharedPixmap::init()
{
d->pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false);
- QCString atom;
+ TQCString atom;
atom.sprintf("target prop for window %lx", static_cast<unsigned long int>(winId()));
d->target = XInternAtom(qt_xdisplay(), atom.data(), false);
d->selection = None;
}
-bool KSharedPixmap::isAvailable(const QString & name) const
+bool KSharedPixmap::isAvailable(const TQString & name) const
{
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (sel == None)
return false;
@@ -95,16 +95,16 @@ bool KSharedPixmap::isAvailable(const QString & name) const
}
-bool KSharedPixmap::loadFromShared(const QString & name, const QRect & rect)
+bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
{
d->rect = rect;
if (d->selection != None)
// already active
return false;
- QPixmap::resize(0, 0); // invalidate
+ TQPixmap::resize(0, 0); // invalidate
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
d->selection = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (d->selection == None)
return false;
@@ -167,7 +167,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
if (d->rect.isEmpty())
{
- QPixmap::resize(width, height);
+ TQPixmap::resize(width, height);
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
0, 0, width, height, 0, 0);
@@ -182,11 +182,11 @@ bool KSharedPixmap::x11Event(XEvent *event)
// background tile for the rectangle "rect".
//Check for origin off screen
- QPoint origin(0, 0);
+ TQPoint origin(0, 0);
if( d->rect.topLeft().x() < 0 || d->rect.topLeft().y() < 0 ) {
//Save the offset and relocate the rect corners
- QPoint tl = d->rect.topLeft();
- QPoint br = d->rect.bottomRight();
+ TQPoint tl = d->rect.topLeft();
+ TQPoint br = d->rect.bottomRight();
if( tl.x() < 0 ) {
origin.setX( abs( tl.x() ) );
tl.setX( 0 );
@@ -195,7 +195,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
origin.setY( abs( tl.y() ) );
tl.setY( 0 );
}
- QRect adjustedRect( tl, br );
+ TQRect adjustedRect( tl, br );
d->rect = adjustedRect;
}
@@ -204,7 +204,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
unsigned xa = d->rect.x() % width, ya = d->rect.y() % height;
unsigned t1w = QMIN(width-xa,tw), t1h = QMIN(height-ya,th);
- QPixmap::resize( tw+origin.x(), th+origin.y() );
+ TQPixmap::resize( tw+origin.x(), th+origin.y() );
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
xa, ya, t1w+origin.x(), t1h+origin.y(), origin.x(), origin.y() );
diff --git a/kdeui/ksharedpixmap.h b/kdeui/ksharedpixmap.h
index 49e5da667..a4f4eb88c 100644
--- a/kdeui/ksharedpixmap.h
+++ b/kdeui/ksharedpixmap.h
@@ -18,9 +18,9 @@
#ifdef Q_WS_X11
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
class KSharedPixmapPrivate;
@@ -41,7 +41,7 @@ class KSharedPixmapPrivate;
* An example: copy from a shared pixmap:
* \code
* KSharedPixmap *pm = new KSharedPixmap;
- * connect(pm, SIGNAL(done(bool)), SLOT(slotDone(bool)));
+ * connect(pm, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
* pm->loadFromShared("My Pixmap");
* \endcode
*
@@ -50,7 +50,7 @@ class KSharedPixmapPrivate;
*
*/
class KDEUI_EXPORT KSharedPixmap:
- public QWidget,
+ public TQWidget,
public KPixmap
{
Q_OBJECT
@@ -80,7 +80,7 @@ public:
* @return True if the shared pixmap exists and loading has started
* successfully, false otherwise.
*/
- bool loadFromShared(const QString & name, const QRect & rect=QRect());
+ bool loadFromShared(const TQString & name, const TQRect & rect=TQRect());
/**
* Check whether a shared pixmap is available.
@@ -88,7 +88,7 @@ public:
* @param name The shared pixmap name.
* @return True if the shared pixmap is available, false otherwise.
*/
- bool isAvailable(const QString & name) const;
+ bool isAvailable(const TQString & name) const;
signals:
/**
@@ -102,7 +102,7 @@ protected:
bool x11Event(XEvent *);
private:
- bool copy(const QString & id, const QRect & rect);
+ bool copy(const TQString & id, const TQRect & rect);
void init();
KSharedPixmapPrivate *d;
diff --git a/kdeui/kshortcutdialog.cpp b/kdeui/kshortcutdialog.cpp
index 05a6c705f..27d721626 100644
--- a/kdeui/kshortcutdialog.cpp
+++ b/kdeui/kshortcutdialog.cpp
@@ -19,7 +19,7 @@
#include "kshortcutdialog.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#ifdef Q_WS_X11
#define XK_XKB_KEYS
@@ -44,13 +44,13 @@
#include <kshortcutdialog_simple.h>
#include <kshortcutdialog_advanced.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -64,12 +64,12 @@
bool KShortcutDialog::s_showMore = false;
-KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, QWidget* parent, const char* name )
+KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n("Configure Shortcut"),
KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true )
{
setButtonText(Details, i18n("Advanced"));
- m_stack = new QVBox(this);
+ m_stack = new TQVBox(this);
m_stack->setMinimumWidth(360);
m_stack->setSpacing(0);
m_stack->setMargin(0);
@@ -92,21 +92,21 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, Q
m_simple->m_btnClearShortcut->setPixmap( SmallIcon( "locationbar_erase" ) );
m_adv->m_btnClearPrimary->setPixmap( SmallIcon( "locationbar_erase" ) );
m_adv->m_btnClearAlternate->setPixmap( SmallIcon( "locationbar_erase" ) );
- connect(m_simple->m_btnClearShortcut, SIGNAL(clicked()),
- this, SLOT(slotClearShortcut()));
- connect(m_adv->m_btnClearPrimary, SIGNAL(clicked()),
- this, SLOT(slotClearPrimary()));
- connect(m_adv->m_btnClearAlternate, SIGNAL(clicked()),
- this, SLOT(slotClearAlternate()));
-
- connect(m_adv->m_txtPrimary, SIGNAL(clicked()),
- m_adv->m_btnPrimary, SLOT(animateClick()));
- connect(m_adv->m_txtAlternate, SIGNAL(clicked()),
- m_adv->m_btnAlternate, SLOT(animateClick()));
- connect(m_adv->m_btnPrimary, SIGNAL(clicked()),
- this, SLOT(slotSelectPrimary()));
- connect(m_adv->m_btnAlternate, SIGNAL(clicked()),
- this, SLOT(slotSelectAlternate()));
+ connect(m_simple->m_btnClearShortcut, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearShortcut()));
+ connect(m_adv->m_btnClearPrimary, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearPrimary()));
+ connect(m_adv->m_btnClearAlternate, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearAlternate()));
+
+ connect(m_adv->m_txtPrimary, TQT_SIGNAL(clicked()),
+ m_adv->m_btnPrimary, TQT_SLOT(animateClick()));
+ connect(m_adv->m_txtAlternate, TQT_SIGNAL(clicked()),
+ m_adv->m_btnAlternate, TQT_SLOT(animateClick()));
+ connect(m_adv->m_btnPrimary, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectPrimary()));
+ connect(m_adv->m_btnAlternate, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectAlternate()));
KGuiItem ok = KStdGuiItem::ok();
ok.setText( i18n( "OK" ) );
@@ -141,7 +141,7 @@ void KShortcutDialog::setShortcut( const KShortcut & shortcut )
void KShortcutDialog::updateShortcutDisplay()
{
- QString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() };
+ TQString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() };
if( m_bRecording ) {
m_ptxtCurrent->setDefault( true );
@@ -150,7 +150,7 @@ void KShortcutDialog::updateShortcutDisplay()
// Display modifiers for the first key in the KKeySequence
if( m_iKey == 0 ) {
if( m_mod ) {
- QString keyModStr;
+ TQString keyModStr;
if( m_mod & KKey::WIN ) keyModStr += KKey::modFlagLabel(KKey::WIN) + "+";
if( m_mod & KKey::ALT ) keyModStr += KKey::modFlagLabel(KKey::ALT) + "+";
if( m_mod & KKey::CTRL ) keyModStr += KKey::modFlagLabel(KKey::CTRL) + "+";
@@ -169,8 +169,8 @@ void KShortcutDialog::updateShortcutDisplay()
this->setFocus();
}
- s[0].replace('&', QString::fromLatin1("&&"));
- s[1].replace('&', QString::fromLatin1("&&"));
+ s[0].replace('&', TQString::fromLatin1("&&"));
+ s[1].replace('&', TQString::fromLatin1("&&"));
m_simple->m_txtShortcut->setText( s[0] );
m_adv->m_txtPrimary->setText( s[0] );
@@ -391,12 +391,12 @@ void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent )
}
}
#elif defined(Q_WS_WIN)
-void KShortcutDialog::keyPressEvent( QKeyEvent * e )
+void KShortcutDialog::keyPressEvent( TQKeyEvent * e )
{
kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl;
//if key is a letter, it must be stored as lowercase
- int keyQt = QChar( e->key() & 0xff ).isLetter() ?
- (QChar( e->key() & 0xff ).lower().latin1() | (e->key() & 0xffff00) )
+ int keyQt = TQChar( e->key() & 0xff ).isLetter() ?
+ (TQChar( e->key() & 0xff ).lower().latin1() | (e->key() & 0xffff00) )
: e->key();
int modQt = KKeyServer::qtButtonStateToMod( e->state() );
KKeyNative keyNative( KKey(keyQt, modQt) );
@@ -445,7 +445,7 @@ void KShortcutDialog::keyPressEvent( QKeyEvent * e )
updateShortcutDisplay();
if( !m_adv->m_btnMultiKey->isChecked() )
- QTimer::singleShot(500, this, SLOT(accept()));
+ TQTimer::singleShot(500, this, TQT_SLOT(accept()));
}
return;
}
@@ -457,11 +457,11 @@ void KShortcutDialog::keyPressEvent( QKeyEvent * e )
}
}
-bool KShortcutDialog::event ( QEvent * e )
+bool KShortcutDialog::event ( TQEvent * e )
{
- if (e->type()==QEvent::KeyRelease) {
- int modQt = KKeyServer::qtButtonStateToMod( static_cast<QKeyEvent*>(e)->state() );
- KKeyNative keyNative( KKey(static_cast<QKeyEvent*>(e)->key(), modQt) );
+ if (e->type()==TQEvent::KeyRelease) {
+ int modQt = KKeyServer::qtButtonStateToMod( static_cast<TQKeyEvent*>(e)->state() );
+ KKeyNative keyNative( KKey(static_cast<TQKeyEvent*>(e)->key(), modQt) );
uint keySym = keyNative.sym();
bool change = true;
@@ -523,7 +523,7 @@ void KShortcutDialog::keyPressed( KKey key )
updateShortcutDisplay();
if( !m_adv->m_btnMultiKey->isChecked() )
- QTimer::singleShot(500, this, SLOT(accept()));
+ TQTimer::singleShot(500, this, TQT_SLOT(accept()));
}
#include "kshortcutdialog.moc"
diff --git a/kdeui/kshortcutdialog.h b/kdeui/kshortcutdialog.h
index e054e356b..a9fd97d95 100644
--- a/kdeui/kshortcutdialog.h
+++ b/kdeui/kshortcutdialog.h
@@ -42,7 +42,7 @@ class KDEUI_EXPORT KShortcutDialog : public KDialogBase
{
Q_OBJECT
public:
- KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, QWidget* parent = 0, const char* name = 0 );
+ KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 );
~KShortcutDialog();
void setShortcut( const KShortcut & shortcut );
@@ -61,7 +61,7 @@ private:
uint m_mod;
KShortcutDialogSimple *m_simple;
KShortcutDialogAdvanced *m_adv;
- QVBox *m_stack;
+ TQVBox *m_stack;
void updateShortcutDisplay();
//void displayMods();
@@ -75,8 +75,8 @@ private:
void x11KeyReleaseEvent( XEvent* pEvent );
#endif
#ifdef Q_WS_WIN
- virtual void keyPressEvent( QKeyEvent * e );
- virtual bool event(QEvent * e);
+ virtual void keyPressEvent( TQKeyEvent * e );
+ virtual bool event(TQEvent * e);
#endif
protected slots:
diff --git a/kdeui/kspell.cpp b/kdeui/kspell.cpp
index e34b819e8..c4ea85ec6 100644
--- a/kdeui/kspell.cpp
+++ b/kdeui/kspell.cpp
@@ -33,9 +33,9 @@
#include <strings.h>
#endif
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -61,7 +61,7 @@ enum checkMethod { Method1 = 0, Method2 };
struct BufferedWord
{
checkMethod method;
- QString word;
+ TQString word;
bool useDialog;
bool suggest;
};
@@ -76,8 +76,8 @@ public:
SpellerType type;
KSpell* suggestSpell;
bool checking;
- QValueList<BufferedWord> unchecked;
- QTimer *checkNextTimer;
+ TQValueList<BufferedWord> unchecked;
+ TQTimer *checkNextTimer;
bool aspellV6;
};
@@ -97,23 +97,23 @@ public:
// Connects a slot to KProcIO's output signal
-#define OUTPUT(x) (connect (proc, SIGNAL (readReady(KProcIO *)), this, SLOT (x(KProcIO *))))
+#define OUTPUT(x) (connect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *))))
// Disconnect a slot from...
-#define NOOUTPUT(x) (disconnect (proc, SIGNAL (readReady(KProcIO *)), this, SLOT (x(KProcIO *))))
+#define NOOUTPUT(x) (disconnect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *))))
-KSpell::KSpell( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+KSpell::KSpell( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal )
{
initialize( _parent, _caption, obj, slot, _ksc,
_progressbar, _modal, Text );
}
-KSpell::KSpell( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+KSpell::KSpell( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type )
{
initialize( _parent, _caption, obj, slot, _ksc,
@@ -128,19 +128,19 @@ int KSpell::widthDlg() const { return ksdlg->width(); }
// Check if aspell is at least version 0.6
static bool determineASpellV6()
{
- QString result;
+ TQString result;
FILE *fs = popen("aspell -v", "r");
if (fs)
{
// Close textstream before we close fs
{
- QTextStream ts(fs, IO_ReadOnly);
+ TQTextStream ts(fs, IO_ReadOnly);
result = ts.read().stripWhiteSpace();
}
pclose(fs);
}
- QRegExp rx("Aspell (\\d.\\d)");
+ TQRegExp rx("Aspell (\\d.\\d)");
if (rx.search(result) != -1)
{
float version = rx.cap(1).toFloat();
@@ -296,11 +296,11 @@ KSpell::startIspell()
if (trystart == 0) //don't connect these multiple times
{
- connect( proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(ispellErrors(KProcess *, char *, int)) );
+ connect( proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(ispellErrors(KProcess *, char *, int)) );
- connect( proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(ispellExit (KProcess *)) );
+ connect( proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(ispellExit (KProcess *)) );
OUTPUT(KSpell2);
}
@@ -308,7 +308,7 @@ KSpell::startIspell()
if ( !proc->start() )
{
m_status = Error;
- QTimer::singleShot( 0, this, SLOT(emitDeath()));
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()));
}
}
@@ -322,7 +322,7 @@ KSpell::ispellErrors( KProcess *, char *buffer, int buflen )
void KSpell::KSpell2( KProcIO * )
{
- QString line;
+ TQString line;
kdDebug(750) << "KSpell::KSpell2" << endl;
@@ -331,14 +331,14 @@ void KSpell::KSpell2( KProcIO * )
if ( proc->readln( line, true ) == -1 )
{
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
if ( line[0] != '@' ) //@ indicates that ispell is working fine
{
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -346,7 +346,7 @@ void KSpell::KSpell2( KProcIO * )
if ( !ignore("kde") )
{
kdDebug(750) << "@KDE was false" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -354,7 +354,7 @@ void KSpell::KSpell2( KProcIO * )
if ( !ignore("linux") )
{
kdDebug(750) << "@Linux was false" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -375,10 +375,10 @@ KSpell::setUpDialog( bool reallyuseprogressbar )
progressbar && reallyuseprogressbar, modaldlg );
ksdlg->setCaption( caption );
- connect( ksdlg, SIGNAL(command(int)),
- this, SLOT(slotStopCancel(int)) );
- connect( this, SIGNAL(progress(unsigned int)),
- ksdlg, SLOT(slotProgress(unsigned int)) );
+ connect( ksdlg, TQT_SIGNAL(command(int)),
+ this, TQT_SLOT(slotStopCancel(int)) );
+ connect( this, TQT_SIGNAL(progress(unsigned int)),
+ ksdlg, TQT_SLOT(slotProgress(unsigned int)) );
#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded
KWin::setIcons( ksdlg->winId(), kapp->icon(), kapp->miniIcon() );
@@ -388,9 +388,9 @@ KSpell::setUpDialog( bool reallyuseprogressbar )
dialogsetup = true;
}
-bool KSpell::addPersonal( const QString & word )
+bool KSpell::addPersonal( const TQString & word )
{
- QString qs = word.simplifyWhiteSpace();
+ TQString qs = word.simplifyWhiteSpace();
//we'll let ispell do the work here b/c we can
if ( qs.find(' ') != -1 || qs.isEmpty() ) // make sure it's a _word_
@@ -407,9 +407,9 @@ bool KSpell::writePersonalDictionary()
return proc->writeStdin("#");
}
-bool KSpell::ignore( const QString & word )
+bool KSpell::ignore( const TQString & word )
{
- QString qs = word.simplifyWhiteSpace();
+ TQString qs = word.simplifyWhiteSpace();
//we'll let ispell do the work here b/c we can
if ( qs.find (' ') != -1 || qs.isEmpty() ) // make sure it's a _word_
@@ -421,9 +421,9 @@ bool KSpell::ignore( const QString & word )
}
bool
-KSpell::cleanFputsWord( const QString & s, bool appendCR )
+KSpell::cleanFputsWord( const TQString & s, bool appendCR )
{
- QString qs(s);
+ TQString qs(s);
bool empty = true;
for( unsigned int i = 0; i < qs.length(); i++ )
@@ -448,9 +448,9 @@ KSpell::cleanFputsWord( const QString & s, bool appendCR )
}
bool
-KSpell::cleanFputs( const QString & s, bool appendCR )
+KSpell::cleanFputs( const TQString & s, bool appendCR )
{
- QString qs(s);
+ TQString qs(s);
unsigned l = qs.length();
// some uses of '$' (e.g. "$0") cause ispell to skip all following text
@@ -467,10 +467,10 @@ KSpell::cleanFputs( const QString & s, bool appendCR )
return proc->writeStdin( "^"+qs, appendCR );
}
else
- return proc->writeStdin( QString::fromAscii( "^\n" ),appendCR );
+ return proc->writeStdin( TQString::fromAscii( "^\n" ),appendCR );
}
-bool KSpell::checkWord( const QString & buffer, bool _usedialog )
+bool KSpell::checkWord( const TQString & buffer, bool _usedialog )
{
if (d->checking) { // don't check multiple words simultaneously
BufferedWord bufferedWord;
@@ -481,14 +481,14 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
return true;
}
d->checking = true;
- QString qs = buffer.simplifyWhiteSpace();
+ TQString qs = buffer.simplifyWhiteSpace();
if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_
d->checkNextTimer->start( 0, true );
return false;
}
///set the dialog signal handler
- dialog3slot = SLOT(checkWord3());
+ dialog3slot = TQT_SLOT(checkWord3());
usedialog = _usedialog;
setUpDialog( false );
@@ -499,11 +499,11 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
else
ksdlg->hide();
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat spurious blanks
OUTPUT(checkWord2);
- // connect (this, SIGNAL (dialog3()), this, SLOT (checkWord3()));
+ // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3()));
proc->writeStdin( "%" ); // turn off terse mode
proc->writeStdin( buffer ); // send the word to ispell
@@ -511,7 +511,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
return true;
}
-bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
+bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest )
{
if (d->checking) { // don't check multiple words simultaneously
BufferedWord bufferedWord;
@@ -523,7 +523,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
return true;
}
d->checking = true;
- QString qs = buffer.simplifyWhiteSpace();
+ TQString qs = buffer.simplifyWhiteSpace();
if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_
d->checkNextTimer->start( 0, true );
@@ -532,7 +532,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
///set the dialog signal handler
if ( !suggest ) {
- dialog3slot = SLOT(checkWord3());
+ dialog3slot = TQT_SLOT(checkWord3());
usedialog = _usedialog;
setUpDialog( false );
if ( _usedialog )
@@ -543,11 +543,11 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
ksdlg->hide();
}
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat spurious blanks
OUTPUT(checkWord2);
- // connect (this, SIGNAL (dialog3()), this, SLOT (checkWord3()));
+ // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3()));
proc->writeStdin( "%" ); // turn off terse mode
proc->writeStdin( buffer ); // send the word to ispell
@@ -557,8 +557,8 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
void KSpell::checkWord2( KProcIO* )
{
- QString word;
- QString line;
+ TQString word;
+ TQString line;
proc->readln( line, true ); //get ispell's response
/* ispell man page: "Each sentence of text input is terminated with an
@@ -570,7 +570,7 @@ void KSpell::checkWord2( KProcIO* )
can get out of sync.
</sanders>
*/
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat the blank line
NOOUTPUT(checkWord2);
@@ -578,7 +578,7 @@ void KSpell::checkWord2( KProcIO* )
if ( mistake && usedialog )
{
cwword = word;
- dialog( word, sugg, SLOT(checkWord3()) );
+ dialog( word, sugg, TQT_SLOT(checkWord3()) );
d->checkNextTimer->start( 0, true );
return;
}
@@ -610,14 +610,14 @@ void KSpell::checkNext()
void KSpell::suggestWord( KProcIO * )
{
- QString word;
- QString line;
+ TQString word;
+ TQString line;
proc->readln( line, true ); //get ispell's response
/* ispell man page: "Each sentence of text input is terminated with an
additional blank line, indicating that ispell has completed processing
the input line." */
- QString blank_line;
+ TQString blank_line;
proc->readln( blank_line, true ); // eat the blank line
NOOUTPUT(checkWord2);
@@ -626,23 +626,23 @@ void KSpell::suggestWord( KProcIO * )
if ( mistake && usedialog )
{
cwword=word;
- dialog( word, sugg, SLOT(checkWord3()) );
+ dialog( word, sugg, TQT_SLOT(checkWord3()) );
return;
}
}
void KSpell::checkWord3()
{
- disconnect( this, SIGNAL(dialog3()), this, SLOT(checkWord3()) );
+ disconnect( this, TQT_SIGNAL(dialog3()), this, TQT_SLOT(checkWord3()) );
emit corrected( cwword, replacement(), 0L );
}
-QString KSpell::funnyWord( const QString & word )
+TQString KSpell::funnyWord( const TQString & word )
// composes a guess from ispell to a readable word
// e.g. "re+fry-y+ies" -> "refries"
{
- QString qs;
+ TQString qs;
unsigned int i=0;
for( i=0; word [i]!='\0';i++ )
@@ -651,7 +651,7 @@ QString KSpell::funnyWord( const QString & word )
continue;
if (word [i]=='-')
{
- QString shorty;
+ TQString shorty;
unsigned int j;
int k;
@@ -676,7 +676,7 @@ QString KSpell::funnyWord( const QString & word )
}
-int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList & sugg )
+int KSpell::parseOneResponse( const TQString &buffer, TQString &word, TQStringList & sugg )
// buffer is checked, word and sugg are filled in
// returns
// GOOD if word is fine
@@ -708,7 +708,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
if( d->m_bIgnoreUpperWords && word[0] == word[0].upper() )
{
- QString text = word[0] + word.right( word.length()-1 ).lower();
+ TQString text = word[0] + word.right( word.length()-1 ).lower();
if( text == word )
return IGNORE;
}
@@ -721,7 +721,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
return IGNORE;
//// Position in line ///
- QString qs2;
+ TQString qs2;
if ( buffer.find( ':' ) != -1 )
qs2 = buffer.left( buffer.find(':') );
@@ -731,7 +731,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
posinline = qs2.right( qs2.length()-qs2.findRev(' ') ).toInt()-1;
///// Replace-list stuff ////
- QStringList::Iterator it = replacelist.begin();
+ TQStringList::Iterator it = replacelist.begin();
for( ;it != replacelist.end(); ++it, ++it ) // Skip two entries at a time.
{
if ( word == *it ) // Word matches
@@ -745,14 +745,14 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
/////// Suggestions //////
if ( buffer[0] != '#' )
{
- QString qs = buffer.mid( buffer.find(':')+2, buffer.length() );
+ TQString qs = buffer.mid( buffer.find(':')+2, buffer.length() );
qs += ',';
sugg.clear();
i = j = 0;
while( (unsigned int)i < qs.length() )
{
- QString temp = qs.mid( i, (j=qs.find (',',i)) - i );
+ TQString temp = qs.mid( i, (j=qs.find (',',i)) - i );
sugg.append( funnyWord(temp) );
i=j+2;
@@ -779,7 +779,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
return MISTAKE;
}
-bool KSpell::checkList (QStringList *_wordlist, bool _usedialog)
+bool KSpell::checkList (TQStringList *_wordlist, bool _usedialog)
// prepare check of string list
{
wordlist=_wordlist;
@@ -792,7 +792,7 @@ bool KSpell::checkList (QStringList *_wordlist, bool _usedialog)
setUpDialog();
//set the dialog signal handler
- dialog3slot = SLOT (checkList4 ());
+ dialog3slot = TQT_SLOT (checkList4 ());
proc->writeStdin ("%"); // turn off terse mode & check one word at a time
@@ -851,8 +851,8 @@ void KSpell::checkList3a (KProcIO *)
int e, tempe;
- QString word;
- QString line;
+ TQString word;
+ TQString line;
do
{
@@ -872,7 +872,7 @@ void KSpell::checkList3a (KProcIO *)
if ( e == REPLACE )
{
- QString old = *(--wlIt); ++wlIt;
+ TQString old = *(--wlIt); ++wlIt;
dlgreplacement = word;
checkListReplaceCurrent();
// inform application
@@ -883,7 +883,7 @@ void KSpell::checkList3a (KProcIO *)
cwword = word;
dlgon = true;
// show the dialog
- dialog( word, sugg, SLOT(checkList4()) );
+ dialog( word, sugg, TQT_SLOT(checkList4()) );
return;
}
else
@@ -915,7 +915,7 @@ void KSpell::checkListReplaceCurrent()
// go back to misspelled word
wlIt--;
- QString s = *wlIt;
+ TQString s = *wlIt;
s.replace(posinline+offset,orig.length(),replacement());
offset += replacement().length()-orig.length();
wordlist->insert (wlIt, s);
@@ -928,9 +928,9 @@ void KSpell::checkList4 ()
// evaluate dialog return, when a button was pressed there
{
dlgon=false;
- QString old;
+ TQString old;
- disconnect (this, SIGNAL (dialog3()), this, SLOT (checkList4()));
+ disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkList4()));
//others should have been processed by dialog() already
switch (dlgresult)
@@ -973,14 +973,14 @@ void KSpell::checkList4 ()
}
}
-bool KSpell::check( const QString &_buffer, bool _usedialog )
+bool KSpell::check( const TQString &_buffer, bool _usedialog )
{
- QString qs;
+ TQString qs;
usedialog = _usedialog;
setUpDialog();
//set the dialog signal handler
- dialog3slot = SLOT(check3());
+ dialog3slot = TQT_SLOT(check3());
kdDebug(750) << "KS: check" << endl;
origbuffer = _buffer;
@@ -1037,8 +1037,8 @@ void KSpell::check2( KProcIO * )
// invoked by KProcIO when read from ispell
{
int e, tempe;
- QString word;
- QString line;
+ TQString word;
+ TQString line;
static bool recursive = false;
if (recursive &&
!ksdlg )
@@ -1067,7 +1067,7 @@ void KSpell::check2( KProcIO * )
// convert line to UTF-8, cut at pos, convert back to UCS-2
// and get string length
- posinline = (QString::fromUtf8(
+ posinline = (TQString::fromUtf8(
origbuffer.mid(lastlastline,lastline-lastlastline).utf8(),
posinline)).length();
// kdDebug(750) << "posinline corr: " << posinline << endl;
@@ -1090,7 +1090,7 @@ void KSpell::check2( KProcIO * )
//kdDebug(750) << "(Before dialog) word=[" << word << "] cwword =[" << cwword << "]\n" << endl;
if ( usedialog ) {
// show the word in the dialog
- dialog( word, sugg, SLOT(check3()) );
+ dialog( word, sugg, TQT_SLOT(check3()) );
} else {
// No dialog, just emit misspelling and continue
d->m_bNoMisspellingsEncountered = false;
@@ -1125,7 +1125,7 @@ void KSpell::check2( KProcIO * )
if ( (unsigned int)lastline < origbuffer.length() )
{
int i;
- QString qs;
+ TQString qs;
//kdDebug(750) << "[EOL](" << tempe << ")[" << temp << "]" << endl;
@@ -1152,7 +1152,7 @@ void KSpell::check2( KProcIO * )
void KSpell::check3 ()
// evaluates the return value of the dialog
{
- disconnect (this, SIGNAL (dialog3()), this, SLOT (check3()));
+ disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (check3()));
kdDebug(750) << "check3 [" << cwword << "] [" << replacement() << "] " << dlgresult << endl;
//others should have been processed by dialog() already
@@ -1199,31 +1199,31 @@ KSpell::slotStopCancel (int result)
if (!dialog3slot.isEmpty())
{
dlgresult=result;
- connect (this, SIGNAL (dialog3()), this, dialog3slot.ascii());
+ connect (this, TQT_SIGNAL (dialog3()), this, dialog3slot.ascii());
emit dialog3();
}
}
-void KSpell::dialog( const QString & word, QStringList & sugg, const char *_slot )
+void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_slot )
{
dlgorigword = word;
dialog3slot = _slot;
dialogwillprocess = true;
- connect( ksdlg, SIGNAL(command(int)), this, SLOT(dialog2(int)) );
- QString tmpBuf = newbuffer;
+ connect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) );
+ TQString tmpBuf = newbuffer;
kdDebug(750)<<" position = "<<lastpos<<endl;
// extract a context string, replace all characters which might confuse
// the RichText display and highlight the possibly wrong word
- QString marker( "_MARKER_" );
+ TQString marker( "_MARKER_" );
tmpBuf.replace( lastpos, word.length(), marker );
- QString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length());
- context.replace( '\n',QString::fromLatin1(" "));
- context.replace( '<', QString::fromLatin1("&lt;") );
- context.replace( '>', QString::fromLatin1("&gt;") );
- context.replace( marker, QString::fromLatin1("<b>%1</b>").arg( word ) );
+ TQString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length());
+ context.replace( '\n',TQString::fromLatin1(" "));
+ context.replace( '<', TQString::fromLatin1("&lt;") );
+ context.replace( '>', TQString::fromLatin1("&gt;") );
+ context.replace( marker, TQString::fromLatin1("<b>%1</b>").arg( word ) );
context = "<qt>" + context + "</qt>";
ksdlg->init( word, &sugg, context );
@@ -1236,9 +1236,9 @@ void KSpell::dialog( const QString & word, QStringList & sugg, const char *_slot
void KSpell::dialog2( int result )
{
- QString qs;
+ TQString qs;
- disconnect( ksdlg, SIGNAL(command(int)), this, SLOT(dialog2(int)) );
+ disconnect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) );
dialogwillprocess = false;
dlgresult = result;
ksdlg->standby();
@@ -1266,7 +1266,7 @@ void KSpell::dialog2( int result )
case KS_REPLACEALL:
{
replacelist.append( dlgorigword );
- QString _replacement = replacement();
+ TQString _replacement = replacement();
replacelist.append( _replacement );
emit replaceall( dlgorigword , _replacement );
}
@@ -1277,7 +1277,7 @@ void KSpell::dialog2( int result )
break;
}
- connect( this, SIGNAL(dialog3()), this, dialog3slot.ascii() );
+ connect( this, TQT_SIGNAL(dialog3()), this, dialog3slot.ascii() );
emit dialog3();
}
@@ -1334,7 +1334,7 @@ void KSpell::ispellExit( KProcess* )
return; // Dead already
kdDebug(750) << "Death" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
}
// This is always called from the event loop to make
@@ -1366,7 +1366,7 @@ void KSpell::emitProgress ()
void KSpell::moveDlg( int x, int y )
{
- QPoint pt( x,y ), pt2;
+ TQPoint pt( x,y ), pt2;
pt2 = parent->mapToGlobal( pt );
ksdlg->move( pt2.x(),pt2.y() );
}
@@ -1388,13 +1388,13 @@ void KSpell::setIgnoreTitleCase(bool _ignore)
// --------------------------------------------------
int
-KSpell::modalCheck( QString& text )
+KSpell::modalCheck( TQString& text )
{
return modalCheck( text,0 );
}
int
-KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
+KSpell::modalCheck( TQString& text, KSpellConfig* _kcs )
{
modalreturn = 0;
modaltext = text;
@@ -1411,7 +1411,7 @@ KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
return modalreturn;
}
-void KSpell::slotSpellCheckerCorrected( const QString & oldText, const QString & newText, unsigned int pos )
+void KSpell::slotSpellCheckerCorrected( const TQString & oldText, const TQString & newText, unsigned int pos )
{
modaltext=modaltext.replace(pos,oldText.length(),newText);
}
@@ -1423,16 +1423,16 @@ void KSpell::slotModalReady()
//kdDebug(750) << "MODAL READY------------------" << endl;
Q_ASSERT( m_status == Running );
- connect( this, SIGNAL( done( const QString & ) ),
- this, SLOT( slotModalDone( const QString & ) ) );
- QObject::connect( this, SIGNAL( corrected( const QString&, const QString&, unsigned int ) ),
- this, SLOT( slotSpellCheckerCorrected( const QString&, const QString &, unsigned int ) ) );
- QObject::connect( this, SIGNAL( death() ),
- this, SLOT( slotModalSpellCheckerFinished( ) ) );
+ connect( this, TQT_SIGNAL( done( const TQString & ) ),
+ this, TQT_SLOT( slotModalDone( const TQString & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( corrected( const TQString&, const TQString&, unsigned int ) ),
+ this, TQT_SLOT( slotSpellCheckerCorrected( const TQString&, const TQString &, unsigned int ) ) );
+ TQObject::connect( this, TQT_SIGNAL( death() ),
+ this, TQT_SLOT( slotModalSpellCheckerFinished( ) ) );
check( modaltext );
}
-void KSpell::slotModalDone( const QString &/*_buffer*/ )
+void KSpell::slotModalDone( const TQString &/*_buffer*/ )
{
//kdDebug(750) << "MODAL DONE " << _buffer << endl;
//modaltext = _buffer;
@@ -1450,8 +1450,8 @@ void KSpell::slotModalSpellCheckerFinished( )
modalreturn=(int)this->status();
}
-void KSpell::initialize( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+void KSpell::initialize( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type )
{
d = new KSpellPrivate;
@@ -1462,9 +1462,9 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
d->type = type;
d->checking = false;
d->aspellV6 = false;
- d->checkNextTimer = new QTimer( this );
- connect( d->checkNextTimer, SIGNAL( timeout() ),
- this, SLOT( checkNext() ));
+ d->checkNextTimer = new TQTimer( this );
+ connect( d->checkNextTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( checkNext() ));
autoDelete = false;
modaldlg = _modal;
progressbar = _progressbar;
@@ -1484,49 +1484,49 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
switch ( ksconfig->encoding() )
{
case KS_E_LATIN1:
- codec = QTextCodec::codecForName("ISO 8859-1");
+ codec = TQTextCodec::codecForName("ISO 8859-1");
break;
case KS_E_LATIN2:
- codec = QTextCodec::codecForName("ISO 8859-2");
+ codec = TQTextCodec::codecForName("ISO 8859-2");
break;
case KS_E_LATIN3:
- codec = QTextCodec::codecForName("ISO 8859-3");
+ codec = TQTextCodec::codecForName("ISO 8859-3");
break;
case KS_E_LATIN4:
- codec = QTextCodec::codecForName("ISO 8859-4");
+ codec = TQTextCodec::codecForName("ISO 8859-4");
break;
case KS_E_LATIN5:
- codec = QTextCodec::codecForName("ISO 8859-5");
+ codec = TQTextCodec::codecForName("ISO 8859-5");
break;
case KS_E_LATIN7:
- codec = QTextCodec::codecForName("ISO 8859-7");
+ codec = TQTextCodec::codecForName("ISO 8859-7");
break;
case KS_E_LATIN8:
- codec = QTextCodec::codecForName("ISO 8859-8-i");
+ codec = TQTextCodec::codecForName("ISO 8859-8-i");
break;
case KS_E_LATIN9:
- codec = QTextCodec::codecForName("ISO 8859-9");
+ codec = TQTextCodec::codecForName("ISO 8859-9");
break;
case KS_E_LATIN13:
- codec = QTextCodec::codecForName("ISO 8859-13");
+ codec = TQTextCodec::codecForName("ISO 8859-13");
break;
case KS_E_LATIN15:
- codec = QTextCodec::codecForName("ISO 8859-15");
+ codec = TQTextCodec::codecForName("ISO 8859-15");
break;
case KS_E_UTF8:
- codec = QTextCodec::codecForName("UTF-8");
+ codec = TQTextCodec::codecForName("UTF-8");
break;
case KS_E_KOI8R:
- codec = QTextCodec::codecForName("KOI8-R");
+ codec = TQTextCodec::codecForName("KOI8-R");
break;
case KS_E_KOI8U:
- codec = QTextCodec::codecForName("KOI8-U");
+ codec = TQTextCodec::codecForName("KOI8-U");
break;
case KS_E_CP1251:
- codec = QTextCodec::codecForName("CP1251");
+ codec = TQTextCodec::codecForName("CP1251");
break;
case KS_E_CP1255:
- codec = QTextCodec::codecForName("CP1255");
+ codec = TQTextCodec::codecForName("CP1255");
break;
default:
break;
@@ -1545,7 +1545,7 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
curprog=0;
dialogwillprocess = false;
- dialog3slot = QString::null;
+ dialog3slot = TQString::null;
personaldict = false;
dlgresult = -1;
@@ -1559,19 +1559,19 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
if ( obj && slot )
// caller wants to know when kspell is ready
- connect( this, SIGNAL(ready(KSpell *)), obj, slot);
+ connect( this, TQT_SIGNAL(ready(KSpell *)), obj, slot);
else
// Hack for modal spell checking
- connect( this, SIGNAL(ready(KSpell *)), this, SLOT(slotModalReady()) );
+ connect( this, TQT_SIGNAL(ready(KSpell *)), this, TQT_SLOT(slotModalReady()) );
proc = new KProcIO( codec );
startIspell();
}
-QString KSpell::modaltext;
+TQString KSpell::modaltext;
int KSpell::modalreturn = 0;
-QWidget* KSpell::modalWidgetHack = 0;
+TQWidget* KSpell::modalWidgetHack = 0;
#include "kspell.moc"
diff --git a/kdeui/kspell.h b/kdeui/kspell.h
index 17ad038e1..aee8ed822 100644
--- a/kdeui/kspell.h
+++ b/kdeui/kspell.h
@@ -21,9 +21,9 @@
#include "ksconfig.h"
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QTextCodec;
@@ -96,8 +96,8 @@ public:
* @param progressbar Indicates if progress bar should be shown.
* @param modal Indicates modal or non-modal dialog.
*/
- KSpell(QWidget *parent, const QString &caption,
- QObject *receiver, const char *slot, KSpellConfig *kcs=0,
+ KSpell(TQWidget *parent, const TQString &caption,
+ TQObject *receiver, const char *slot, KSpellConfig *kcs=0,
bool progressbar = true, bool modal = false);
/**
@@ -118,8 +118,8 @@ public:
* @param modal Indicates modal or non-modal dialog.
* @param type Type of the document to check
*/
- KSpell(QWidget *parent, const QString &caption,
- QObject *receiver, const char *slot, KSpellConfig *kcs,
+ KSpell(TQWidget *parent, const TQString &caption,
+ TQObject *receiver, const char *slot, KSpellConfig *kcs,
bool progressbar, bool modal, SpellerType type);
/**
@@ -157,7 +157,7 @@ public:
* in @p _buffer check() reached before stopping.
*/
- virtual bool check (const QString &_buffer, bool usedialog = true);
+ virtual bool check (const TQString &_buffer, bool usedialog = true);
/**
* Returns the position (when using check()) or word
@@ -177,7 +177,7 @@ public:
* to check() would result in the mark-up tags being
* spell checked.
*/
- virtual bool checkList (QStringList *_wordlist, bool usedialog = true);
+ virtual bool checkList (TQStringList *_wordlist, bool usedialog = true);
/**
* Spellchecks a single word.
@@ -201,8 +201,8 @@ public:
* complete. You can look at suggestions() to see what the
* suggested replacements were.
*/
- virtual bool checkWord (const QString &_buffer, bool usedialog = false);
- bool checkWord( const QString & buffer, bool _usedialog, bool suggest );
+ virtual bool checkWord (const TQString &_buffer, bool usedialog = false);
+ bool checkWord( const TQString & buffer, bool _usedialog, bool suggest );
/**
* Hides the dialog box.
@@ -219,7 +219,7 @@ public:
* use this to get the list of
* suggestions (if any were available).
*/
- QStringList suggestions () const { return sugg; }
+ TQStringList suggestions () const { return sugg; }
/**
* Gets the result code of the dialog box.
@@ -264,7 +264,7 @@ public:
*
* You might want the full buffer in its partially-checked state.
*/
- QString intermediateBuffer () const {return newbuffer;}
+ TQString intermediateBuffer () const {return newbuffer;}
/**
* Tells ISpell/ASpell to ignore this word for the life of this KSpell instance.
@@ -272,7 +272,7 @@ public:
* @return false if @p word is not a word or there was an error
* communicating with ISpell/ASpell.
*/
- virtual bool ignore (const QString & word);
+ virtual bool ignore (const TQString & word);
/**
* Adds a word to the user's personal dictionary.
@@ -280,7 +280,7 @@ public:
* @return false if @p word
* is not a word or there was an error communicating with ISpell/ASpell.
*/
- virtual bool addPersonal (const QString & word);
+ virtual bool addPersonal (const TQString & word);
/**
* @return the KSpellConfig object being used by this KSpell instance.
@@ -310,7 +310,7 @@ public:
* Your application's GUI will still be updated, however.
*
*/
- static int modalCheck( QString& text ) KDE_DEPRECATED;
+ static int modalCheck( TQString& text ) KDE_DEPRECATED;
/**
* Performs a synchronous spellcheck.
@@ -320,7 +320,7 @@ public:
*
* This overloaded method uses the spell-check configuration passed as parameter.
*/
- static int modalCheck( QString& text, KSpellConfig * kcs );
+ static int modalCheck( TQString& text, KSpellConfig * kcs );
/**
* Call setIgnoreUpperWords(true) to tell the spell-checker to ignore
@@ -346,7 +346,7 @@ signals:
* (The first position is zero.)
* If it is emitted by checkList(), @p pos is the index to
* the misspelled
- * word in the QStringList passed to checkList().
+ * word in the TQStringList passed to checkList().
* Note, that @p originalword can be only a word part, if it's
* word with hyphens.
*
@@ -354,7 +354,7 @@ signals:
* calling program's GUI may be updated. (e.g. the misspelled word may
* be highlighted).
*/
- void misspelling (const QString & originalword, const QStringList & suggestions,
+ void misspelling (const TQString & originalword, const TQStringList & suggestions,
unsigned int pos);
/**
@@ -372,7 +372,7 @@ signals:
*
* @see check()
*/
- void corrected (const QString & originalword, const QString & newword, unsigned int pos);
+ void corrected (const TQString & originalword, const TQString & newword, unsigned int pos);
/**
* Emitted when the user pressed "Ignore All" in the dialog.
@@ -380,14 +380,14 @@ signals:
* user dictionary.
*
*/
- void ignoreall (const QString & originalword);
+ void ignoreall (const TQString & originalword);
/**
* Emitted when the user pressed "Ignore" in the dialog.
* Don't know if this could be useful.
*
*/
- void ignoreword (const QString & originalword);
+ void ignoreword (const TQString & originalword);
/**
* Emitted when the user pressed "Add" in the dialog.
@@ -395,12 +395,12 @@ signals:
* independent of the ISpell personal dictionary.
*
*/
- void addword (const QString & originalword);
+ void addword (const TQString & originalword);
/**
* Emitted when the user pressed "ReplaceAll" in the dialog.
*/
- void replaceall( const QString & origword , const QString &replacement );
+ void replaceall( const TQString & origword , const TQString &replacement );
/**
* Emitted after KSpell has verified that ISpell/ASpell is running
@@ -422,7 +422,7 @@ signals:
* on the contents of buffer for the life of the slot which was signaled
* by done().
*/
- void done (const QString &buffer);
+ void done (const TQString &buffer);
/**
* Emitted when checkList() is done.
@@ -475,12 +475,12 @@ private slots:
/**
* Used for modalCheck().
*/
- void slotModalDone( const QString & );
+ void slotModalDone( const TQString & );
/**
* Used for modalCheck().
*/
- void slotSpellCheckerCorrected( const QString & oldText, const QString & newText, unsigned int );
+ void slotSpellCheckerCorrected( const TQString & oldText, const TQString & newText, unsigned int );
/**
* Used for modalCheck().
@@ -493,15 +493,15 @@ signals:
protected:
KProcIO *proc;
- QWidget *parent;
+ TQWidget *parent;
KSpellConfig *ksconfig;
KSpellDlg *ksdlg;
- QStringList *wordlist;
- QStringList::Iterator wlIt;
- QStringList ignorelist;
- QStringList replacelist;
- QStringList sugg;
- QTextCodec* codec;
+ TQStringList *wordlist;
+ TQStringList::Iterator wlIt;
+ TQStringList ignorelist;
+ TQStringList replacelist;
+ TQStringList sugg;
+ TQTextCodec* codec;
spellStatus m_status;
@@ -514,14 +514,14 @@ protected:
bool dialogsetup;
bool autoDelete;
- QString caption;
- QString orig;
- QString origbuffer;
- QString newbuffer;
- QString cwword;
- QString dlgorigword;
- QString dlgreplacement;
- QString dialog3slot;
+ TQString caption;
+ TQString orig;
+ TQString origbuffer;
+ TQString newbuffer;
+ TQString cwword;
+ TQString dlgorigword;
+ TQString dlgreplacement;
+ TQString dialog3slot;
int dlgresult;
int trystart;
@@ -539,25 +539,25 @@ protected:
* Used for modalCheck.
*/
bool modaldlg;
- static QString modaltext;
+ static TQString modaltext;
static int modalreturn;
- static QWidget* modalWidgetHack;
+ static TQWidget* modalWidgetHack;
- int parseOneResponse (const QString &_buffer, QString &word, QStringList &sugg);
- QString funnyWord (const QString & word);
- void dialog (const QString & word, QStringList & sugg, const char* _slot);
- QString replacement () const
+ int parseOneResponse (const TQString &_buffer, TQString &word, TQStringList &sugg);
+ TQString funnyWord (const TQString & word);
+ void dialog (const TQString & word, TQStringList & sugg, const char* _slot);
+ TQString replacement () const
{ return dlgreplacement; }
void setUpDialog ( bool reallyusedialogbox = true);
void emitProgress ();
- bool cleanFputs (const QString & s, bool appendCR=true);
- bool cleanFputsWord (const QString & s, bool appendCR=true);
+ bool cleanFputs (const TQString & s, bool appendCR=true);
+ bool cleanFputsWord (const TQString & s, bool appendCR=true);
void startIspell();
bool writePersonalDictionary();
- void initialize( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+ void initialize( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type );
private:
diff --git a/kdeui/kspelldlg.cpp b/kdeui/kspelldlg.cpp
index 60607dd75..d21b6975e 100644
--- a/kdeui/kspelldlg.cpp
+++ b/kdeui/kspelldlg.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <klocale.h>
@@ -48,7 +48,7 @@ public:
KSpellConfig* spellConfig;
};
-KSpellDlg::KSpellDlg( QWidget * parent, const char * name, bool _progressbar, bool _modal )
+KSpellDlg::KSpellDlg( TQWidget * parent, const char * name, bool _progressbar, bool _modal )
: KDialogBase(
parent, name, _modal, i18n("Check Spelling"), Help|Cancel|User1,
Cancel, true, i18n("&Finished")
@@ -60,44 +60,44 @@ KSpellDlg::KSpellDlg( QWidget * parent, const char * name, bool _progressbar, bo
d->ui = new KSpellUI( this );
setMainWidget( d->ui );
- connect( d->ui->m_replaceBtn, SIGNAL(clicked()),
- this, SLOT(replace()));
- connect( this, SIGNAL(ready(bool)),
- d->ui->m_replaceBtn, SLOT(setEnabled(bool)) );
+ connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(replace()));
+ connect( this, TQT_SIGNAL(ready(bool)),
+ d->ui->m_replaceBtn, TQT_SLOT(setEnabled(bool)) );
- connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()), this, SLOT(replaceAll()));
- connect(this, SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(replaceAll()));
+ connect(this, TQT_SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_skipBtn, SIGNAL(clicked()), this, SLOT(ignore()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_skipBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignore()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_skipAllBtn, SIGNAL(clicked()), this, SLOT(ignoreAll()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_skipAllBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignoreAll()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipAllBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_addBtn, SIGNAL(clicked()), this, SLOT(add()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_addBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(add()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_addBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_suggestBtn, SIGNAL(clicked()), this, SLOT(suggest()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_suggestBtn, SLOT(setEnabled(bool)) );
+ connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(suggest()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_suggestBtn, TQT_SLOT(setEnabled(bool)) );
d->ui->m_suggestBtn->hide();
- connect(this, SIGNAL(user1Clicked()), this, SLOT(stop()));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(stop()));
- connect( d->ui->m_replacement, SIGNAL(textChanged(const QString &)),
- SLOT(textChanged(const QString &)) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(textChanged(const TQString &)) );
- connect( d->ui->m_replacement, SIGNAL(returnPressed()), SLOT(replace()) );
- connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), TQT_SLOT(replace()) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
- connect( d->ui->m_suggestions, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ),
- SLOT( replace() ) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( replace() ) );
d->spellConfig = new KSpellConfig( 0, 0 ,0, false );
d->spellConfig->fillDicts( d->ui->m_language );
- connect( d->ui->m_language, SIGNAL(activated(int)),
- d->spellConfig, SLOT(sSetDictionary(int)) );
- connect( d->spellConfig, SIGNAL(configChanged()),
- SLOT(slotConfigChanged()) );
+ connect( d->ui->m_language, TQT_SIGNAL(activated(int)),
+ d->spellConfig, TQT_SLOT(sSetDictionary(int)) );
+ connect( d->spellConfig, TQT_SIGNAL(configChanged()),
+ TQT_SLOT(slotConfigChanged()) );
setHelp( "spelldlg", "kspell" );
setMinimumSize( sizeHint() );
@@ -111,15 +111,15 @@ KSpellDlg::~KSpellDlg()
}
void
-KSpellDlg::init( const QString & _word, QStringList * _sugg )
+KSpellDlg::init( const TQString & _word, TQStringList * _sugg )
{
sugg = _sugg;
word = _word;
d->ui->m_suggestions->clear();
d->ui->m_suggestions->setSorting( NONSORTINGCOLUMN );
- for ( QStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
- QListViewItem *item = new QListViewItem( d->ui->m_suggestions,
+ for ( TQStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
+ TQListViewItem *item = new TQListViewItem( d->ui->m_suggestions,
d->ui->m_suggestions->lastItem() );
item->setText( 0, *it );
}
@@ -144,16 +144,16 @@ KSpellDlg::init( const QString & _word, QStringList * _sugg )
}
void
-KSpellDlg::init( const QString& _word, QStringList* _sugg,
- const QString& context )
+KSpellDlg::init( const TQString& _word, TQStringList* _sugg,
+ const TQString& context )
{
sugg = _sugg;
word = _word;
d->ui->m_suggestions->clear();
d->ui->m_suggestions->setSorting( NONSORTINGCOLUMN );
- for ( QStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
- QListViewItem *item = new QListViewItem( d->ui->m_suggestions,
+ for ( TQStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
+ TQListViewItem *item = new TQListViewItem( d->ui->m_suggestions,
d->ui->m_suggestions->lastItem() );
item->setText( 0, *it );
}
@@ -189,7 +189,7 @@ KSpellDlg::slotProgress( unsigned int p )
}
void
-KSpellDlg::textChanged( const QString & )
+KSpellDlg::textChanged( const TQString & )
{
d->ui->m_replaceBtn->setEnabled( true );
d->ui->m_replaceAllBtn->setEnabled( true );
@@ -197,7 +197,7 @@ KSpellDlg::textChanged( const QString & )
}
void
-KSpellDlg::slotSelectionChanged( QListViewItem* item )
+KSpellDlg::slotSelectionChanged( TQListViewItem* item )
{
if ( item )
d->ui->m_replacement->setText( item->text( 0 ) );
@@ -208,7 +208,7 @@ KSpellDlg::slotSelectionChanged( QListViewItem* item )
*/
void
-KSpellDlg::closeEvent( QCloseEvent * )
+KSpellDlg::closeEvent( TQCloseEvent * )
{
cancel();
}
diff --git a/kdeui/kspelldlg.h b/kdeui/kspelldlg.h
index 532471cf3..7d4be785b 100644
--- a/kdeui/kspelldlg.h
+++ b/kdeui/kspelldlg.h
@@ -52,18 +52,18 @@ class KDEUI_EXPORT KSpellDlg : public KDialogBase
KLineEdit *editbox;
KProgress *progbar;
KListBox *listbox;
- QStringList *sugg;
- QPushButton *qpbrep, *qpbrepa;
- QLabel *wordlabel;
- QString word, newword;
+ TQStringList *sugg;
+ TQPushButton *qpbrep, *qpbrepa;
+ TQLabel *wordlabel;
+ TQString word, newword;
bool progressbar;
public:
- KSpellDlg( QWidget *parent, const char *name,
+ KSpellDlg( TQWidget *parent, const char *name,
bool _progressbar = false, bool _modal = false );
~KSpellDlg();
- QString replacement() const
+ TQString replacement() const
{ return newword; }
/**
@@ -71,9 +71,9 @@ public:
* and enable the disabled buttons on the dialog box.
* (Buttons are disabled by standby().)
**/
- void init( const QString& _word, QStringList* _sugg );
- void init( const QString& _word, QStringList* _sugg,
- const QString& context );
+ void init( const TQString& _word, TQStringList* _sugg );
+ void init( const TQString& _word, TQStringList* _sugg,
+ const TQString& context );
void standby() { emit ready( false ); }
@@ -84,7 +84,7 @@ public:
void slotProgress( unsigned int p );
protected:
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
void done( int i );
signals:
@@ -106,9 +106,9 @@ protected slots:
void stop();
void slotConfigChanged();
- void textChanged( const QString & );
+ void textChanged( const TQString & );
- void slotSelectionChanged( QListViewItem* item );
+ void slotSelectionChanged( TQListViewItem* item );
};
#endif
diff --git a/kdeui/ksplashscreen.cpp b/kdeui/ksplashscreen.cpp
index 219af2595..6d605dcd7 100644
--- a/kdeui/ksplashscreen.cpp
+++ b/kdeui/ksplashscreen.cpp
@@ -21,13 +21,13 @@
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "ksplashscreen.h"
-KSplashScreen::KSplashScreen(const QPixmap &pixmap, WFlags f): QSplashScreen(pixmap, f)
+KSplashScreen::KSplashScreen(const TQPixmap &pixmap, WFlags f): TQSplashScreen(pixmap, f)
{
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
resize(pixmap.width(), pixmap.height());
setGeometry( ( desk.width() / 2 ) - ( width() / 2 ) + desk.left(),
( desk.height() / 2 ) - ( height() / 2 ) + desk.top(),
diff --git a/kdeui/ksplashscreen.h b/kdeui/ksplashscreen.h
index d88ad478c..bf822a232 100644
--- a/kdeui/ksplashscreen.h
+++ b/kdeui/ksplashscreen.h
@@ -20,7 +20,7 @@
#ifndef KSPLASHSCREEN_H
#define KSPLASHSCREEN_H
-#include <qsplashscreen.h>
+#include <tqsplashscreen.h>
#include <kdelibs_export.h>
@@ -29,11 +29,11 @@ class QPixmap;
/**
* @short %KDE splash screen
*
- * This class is based on QSplashScreen and exists solely to make
+ * This class is based on TQSplashScreen and exists solely to make
* splash screens obey KDE's Xinerama settings.
*
* For documentation on how to use the class, see the documentation
- * for QSplashScreen.
+ * for TQSplashScreen.
*
* @author Chris Howells (howells@kde.org)
* @since 3.2
@@ -47,7 +47,7 @@ public:
/**
* Constructs a splash screen.
*/
- KSplashScreen(const QPixmap &pixmap, WFlags f = 0);
+ KSplashScreen(const TQPixmap &pixmap, WFlags f = 0);
/**
* Destructor.
diff --git a/kdeui/ksqueezedtextlabel.cpp b/kdeui/ksqueezedtextlabel.cpp
index 2f12d26ba..f44b38916 100644
--- a/kdeui/ksqueezedtextlabel.cpp
+++ b/kdeui/ksqueezedtextlabel.cpp
@@ -18,57 +18,57 @@
#include "ksqueezedtextlabel.h"
#include "kstringhandler.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KSqueezedTextLabel::KSqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
fullText = text;
squeezeTextToLabel();
}
-KSqueezedTextLabel::KSqueezedTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KSqueezedTextLabel::KSqueezedTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
}
-void KSqueezedTextLabel::resizeEvent( QResizeEvent * ) {
+void KSqueezedTextLabel::resizeEvent( TQResizeEvent * ) {
squeezeTextToLabel();
}
-QSize KSqueezedTextLabel::minimumSizeHint() const
+TQSize KSqueezedTextLabel::minimumSizeHint() const
{
- QSize sh = QLabel::minimumSizeHint();
+ TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
-QSize KSqueezedTextLabel::sizeHint() const
+TQSize KSqueezedTextLabel::sizeHint() const
{
- return QSize(contentsRect().width(), QLabel::sizeHint().height());
+ return TQSize(contentsRect().width(), TQLabel::sizeHint().height());
}
-void KSqueezedTextLabel::setText( const QString &text ) {
+void KSqueezedTextLabel::setText( const TQString &text ) {
fullText = text;
squeezeTextToLabel();
}
void KSqueezedTextLabel::squeezeTextToLabel() {
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(fullText);
if (textWidth > labelWidth) {
- QString squeezedText = KStringHandler::cPixelSqueeze(fullText, fm, labelWidth);
- QLabel::setText(squeezedText);
+ TQString squeezedText = KStringHandler::cPixelSqueeze(fullText, fm, labelWidth);
+ TQLabel::setText(squeezedText);
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
} else {
- QLabel::setText(fullText);
+ TQLabel::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
}
@@ -76,8 +76,8 @@ void KSqueezedTextLabel::squeezeTextToLabel() {
void KSqueezedTextLabel::setAlignment( int alignment )
{
// save fullText and restore it
- QString tmpFull(fullText);
- QLabel::setAlignment(alignment);
+ TQString tmpFull(fullText);
+ TQLabel::setAlignment(alignment);
fullText = tmpFull;
}
diff --git a/kdeui/ksqueezedtextlabel.h b/kdeui/ksqueezedtextlabel.h
index 5410d56c1..9ad81d9dd 100644
--- a/kdeui/ksqueezedtextlabel.h
+++ b/kdeui/ksqueezedtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KSQUEEZEDTEXTLABEL_H
#define KSQUEEZEDTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that squeezes its text
+ * @short A replacement for TQLabel that squeezes its text
*
* A label class that squeezes its text into the label
*
@@ -43,36 +43,36 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KSqueezedTextLabel : public QLabel {
+class KDEUI_EXPORT KSqueezedTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KSqueezedTextLabel( QWidget *parent, const char *name = 0 );
- KSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
+ KSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Overridden for internal reasons; the API remains unaffected.
*/
virtual void setAlignment( int );
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
/**
* used when widget is resized
*/
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
/**
* does the dirty work
*/
void squeezeTextToLabel();
- QString fullText;
+ TQString fullText;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kstatusbar.cpp b/kdeui/kstatusbar.cpp
index 8a2a964b5..b70c8ae9c 100644
--- a/kdeui/kstatusbar.cpp
+++ b/kdeui/kstatusbar.cpp
@@ -24,9 +24,9 @@
#include <kglobal.h>
-KStatusBarLabel::KStatusBarLabel( const QString& text, int _id,
+KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id,
KStatusBar *parent, const char *name) :
- QLabel( parent, name)
+ TQLabel( parent, name)
{
id = _id;
@@ -34,39 +34,39 @@ KStatusBarLabel::KStatusBarLabel( const QString& text, int _id,
// umm... Mosfet? Can you help here?
- // Warning: QStatusBar draws shaded rectangle around every item - which
+ // Warning: TQStatusBar draws shaded rectangle around every item - which
// IMHO is stupid.
// So NoFrame|Plain is the best you get. the problem is that only in case of
- // StyledPanel|Something you get QFrame to call QStyle::drawPanel().
+ // StyledPanel|Something you get TQFrame to call TQStyle::drawPanel().
setLineWidth (0);
- setFrameStyle (QFrame::NoFrame);
+ setFrameStyle (TQFrame::NoFrame);
setAlignment( AlignHCenter | AlignVCenter | SingleLine );
- connect (this, SIGNAL(itemPressed(int)), parent, SIGNAL(pressed(int)));
- connect (this, SIGNAL(itemReleased(int)), parent, SIGNAL(released(int)));
+ connect (this, TQT_SIGNAL(itemPressed(int)), parent, TQT_SIGNAL(pressed(int)));
+ connect (this, TQT_SIGNAL(itemReleased(int)), parent, TQT_SIGNAL(released(int)));
}
-void KStatusBarLabel::mousePressEvent (QMouseEvent *)
+void KStatusBarLabel::mousePressEvent (TQMouseEvent *)
{
emit itemPressed (id);
}
-void KStatusBarLabel::mouseReleaseEvent (QMouseEvent *)
+void KStatusBarLabel::mouseReleaseEvent (TQMouseEvent *)
{
emit itemReleased (id);
}
-KStatusBar::KStatusBar( QWidget *parent, const char *name )
- : QStatusBar( parent, name )
+KStatusBar::KStatusBar( TQWidget *parent, const char *name )
+ : TQStatusBar( parent, name )
{
// make the size grip stuff configurable
// ...but off by default (sven)
KConfig *config = KGlobal::config();
- QString group(config->group());
- config->setGroup(QString::fromLatin1("StatusBar style"));
- bool grip_enabled = config->readBoolEntry(QString::fromLatin1("SizeGripEnabled"), false);
+ TQString group(config->group());
+ config->setGroup(TQString::fromLatin1("StatusBar style"));
+ bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false);
setSizeGripEnabled(grip_enabled);
config->setGroup(group);
}
@@ -75,7 +75,7 @@ KStatusBar::~KStatusBar ()
{
}
-void KStatusBar::insertItem( const QString& text, int id, int stretch, bool permanent)
+void KStatusBar::insertItem( const TQString& text, int id, int stretch, bool permanent)
{
if (items[id])
kdDebug() << "KStatusBar::insertItem: item id " << id << " already exists." << endl;
@@ -109,7 +109,7 @@ bool KStatusBar::hasItem( int id ) const
return false;
}
-void KStatusBar::changeItem( const QString& text, int id )
+void KStatusBar::changeItem( const TQString& text, int id )
{
KStatusBarLabel *l = items[id];
if (l)
diff --git a/kdeui/kstatusbar.h b/kdeui/kstatusbar.h
index 9ba05dc5b..97ec7881d 100644
--- a/kdeui/kstatusbar.h
+++ b/kdeui/kstatusbar.h
@@ -21,9 +21,9 @@
#ifndef __KSTATUSBAR_H__
#define __KSTATUSBAR_H__
-#include <qstatusbar.h>
-#include <qintdict.h>
-#include <qlabel.h>
+#include <tqstatusbar.h>
+#include <tqintdict.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
class KStatusBar;
@@ -39,13 +39,13 @@ class KDEUI_EXPORT KStatusBarLabel : public QLabel
public:
- KStatusBarLabel( const QString& text, int _id, KStatusBar* parent = 0L, const char *name=0L );
+ KStatusBarLabel( const TQString& text, int _id, KStatusBar* parent = 0L, const char *name=0L );
~KStatusBarLabel () {}
protected:
- void mousePressEvent (QMouseEvent* _event);
- void mouseReleaseEvent (QMouseEvent* _event);
+ void mousePressEvent (TQMouseEvent* _event);
+ void mouseReleaseEvent (TQMouseEvent* _event);
private:
@@ -68,13 +68,13 @@ signals:
*
* A special type of item is a message which is a temporary text-message
* displayed on top of other items in full-width. Messages are visible for
- * specified time, or until you call the slot QStatusBar::clear(). See
- * QStatusBar::message for details.
+ * specified time, or until you call the slot TQStatusBar::clear(). See
+ * TQStatusBar::message for details.
*
* It is useful to connect the KActionCollection signals to the
- * QStatusBar::message slots.
+ * TQStatusBar::message slots.
*
- * KStatusBar inherits QStatusBar, you can freely use all QStatusBar
+ * KStatusBar inherits TQStatusBar, you can freely use all QStatusBar
* methods.
*
* Empty text items are not visible. They will become visible when you change
@@ -99,7 +99,7 @@ public:
/**
* Constructs a status bar. @p parent is usually KMainWindow.
*/
- KStatusBar( QWidget* parent = 0L, const char* name = 0L );
+ KStatusBar( TQWidget* parent = 0L, const char* name = 0L );
/**
* Destructor.
@@ -111,20 +111,20 @@ public:
/**
* Inserts a text label into the status bar.
* Parameters @p stretch and @p permanent are passed to
- * QStatusBar::addWidget .
+ * TQStatusBar::addWidget .
*
* If @p permanent is true, then item will be placed on the far right of
- * the statusbar and will never be hidden by QStatusBar::message.
+ * the statusbar and will never be hidden by TQStatusBar::message.
*
* @param text The label's text string.
* @param id id of item
- * @param stretch stretch passed to QStatusBar::addWidget
- * @param permanent is item permanent or not (passed to QStatusBar::addWidget )
+ * @param stretch stretch passed to TQStatusBar::addWidget
+ * @param permanent is item permanent or not (passed to TQStatusBar::addWidget )
*
* @see QStatusbar::addWidget
*
*/
- void insertItem(const QString& text, int id, int stretch=0, bool permanent=false );
+ void insertItem(const TQString& text, int id, int stretch=0, bool permanent=false );
/**
* Inserts a fixed width text label into status bar. The width will be set
@@ -133,9 +133,9 @@ public:
*
* @param text The label's text string
* @param id id of item
- * @param permanent permanent flag passed to QStatusBar::addWidget
+ * @param permanent permanent flag passed to TQStatusBar::addWidget
*/
- inline void insertFixedItem(const QString& text, int id, bool permanent=false)
+ inline void insertFixedItem(const TQString& text, int id, bool permanent=false)
{ insertItem(text, id, 0, permanent); setItemFixed(id); }
/**
@@ -164,11 +164,11 @@ public:
* @param text The label's text string
* @param id The id of item.
*/
- void changeItem( const QString& text, int id );
+ void changeItem( const TQString& text, int id );
/**
* Sets the alignment of item @p id. By default all fields are aligned
- * @p AlignHCenter | @p AlignVCenter. See QLabel::setAlignment for details.
+ * @p AlignHCenter | @p AlignVCenter. See TQLabel::setAlignment for details.
*
*/
void setItemAlignment(int id, int align);
@@ -200,7 +200,7 @@ signals:
void released( int );
private:
- QIntDict<KStatusBarLabel> items;
+ TQIntDict<KStatusBarLabel> items;
class KStatusBarPrivate* d;
};
diff --git a/kdeui/kstdaction.cpp b/kdeui/kstdaction.cpp
index ae22c01c3..3dae8f281 100644
--- a/kdeui/kstdaction.cpp
+++ b/kdeui/kstdaction.cpp
@@ -18,8 +18,8 @@
#include "kstdaction.h"
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kaction.h>
@@ -35,26 +35,26 @@
namespace KStdAction
{
-QStringList stdNames()
+TQStringList stdNames()
{
return internal_stdNames();
}
-KAction* create( StdAction id, const char *name, const QObject *recvr, const char *slot, KActionCollection* parent )
+KAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection* parent )
{
KAction* pAction = 0;
const KStdActionInfo* pInfo = infoPtr( id );
kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis
if( pInfo ) {
- QString sLabel, iconName = pInfo->psIconName;
+ TQString sLabel, iconName = pInfo->psIconName;
switch( id ) {
case Back: sLabel = i18n("go back", "&Back");
- if (QApplication::reverseLayout() )
+ if (TQApplication::reverseLayout() )
iconName = "forward";
break;
case Forward: sLabel = i18n("go forward", "&Forward");
- if (QApplication::reverseLayout() )
+ if (TQApplication::reverseLayout() )
iconName = "back";
break;
@@ -72,14 +72,14 @@ KAction* create( StdAction id, const char *name, const QObject *recvr, const cha
else
aboutData = KGlobal::instance()->aboutData();
*/
- QString appName = (aboutData) ? aboutData->programName() : QString::fromLatin1(qApp->name());
+ TQString appName = (aboutData) ? aboutData->programName() : TQString::fromLatin1(qApp->name());
sLabel = i18n(pInfo->psLabel).arg(appName);
}
break;
default: sLabel = i18n(pInfo->psLabel);
}
- if (QApplication::reverseLayout()){
+ if (TQApplication::reverseLayout()){
if (id == Prior) iconName = "forward";
if (id == Next ) iconName = "back";
if (id == FirstPage) iconName = "finish";
@@ -139,107 +139,107 @@ const char* name( StdAction id )
return (pInfo) ? pInfo->psName : 0;
}
-KAction *openNew( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *openNew( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( New, name, recvr, slot, parent ); }
-KAction *open( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *open( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Open, name, recvr, slot, parent ); }
-KRecentFilesAction *openRecent( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KRecentFilesAction *openRecent( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return (KRecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); }
-KAction *save( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *save( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Save, name, recvr, slot, parent ); }
-KAction *saveAs( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *saveAs( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SaveAs, name, recvr, slot, parent ); }
-KAction *revert( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *revert( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Revert, name, recvr, slot, parent ); }
-KAction *print( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *print( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Print, name, recvr, slot, parent ); }
-KAction *printPreview( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *printPreview( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( PrintPreview, name, recvr, slot, parent ); }
-KAction *close( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *close( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Close, name, recvr, slot, parent ); }
-KAction *mail( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *mail( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Mail, name, recvr, slot, parent ); }
-KAction *quit( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *quit( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Quit, name, recvr, slot, parent ); }
-KAction *undo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *undo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Undo, name, recvr, slot, parent ); }
-KAction *redo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *redo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Redo, name, recvr, slot, parent ); }
-KAction *cut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *cut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Cut, name, recvr, slot, parent ); }
-KAction *copy( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *copy( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Copy, name, recvr, slot, parent ); }
-KAction *paste( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *paste( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Paste, name, recvr, slot, parent ); }
-KAction *pasteText( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *pasteText( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( PasteText, name, recvr, slot, parent ); }
-KAction *clear( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *clear( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Clear, name, recvr, slot, parent ); }
-KAction *selectAll( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *selectAll( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SelectAll, name, recvr, slot, parent ); }
-KAction *deselect( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *deselect( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Deselect, name, recvr, slot, parent ); }
-KAction *find( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *find( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Find, name, recvr, slot, parent ); }
-KAction *findNext( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *findNext( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FindNext, name, recvr, slot, parent ); }
-KAction *findPrev( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *findPrev( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FindPrev, name, recvr, slot, parent ); }
-KAction *replace( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *replace( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Replace, name, recvr, slot, parent ); }
-KAction *actualSize( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *actualSize( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ActualSize, name, recvr, slot, parent ); }
-KAction *fitToPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToPage, name, recvr, slot, parent ); }
-KAction *fitToWidth( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToWidth( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToWidth, name, recvr, slot, parent ); }
-KAction *fitToHeight( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToHeight( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToHeight, name, recvr, slot, parent ); }
-KAction *zoomIn( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoomIn( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ZoomIn, name, recvr, slot, parent ); }
-KAction *zoomOut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoomOut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ZoomOut, name, recvr, slot, parent ); }
-KAction *zoom( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoom( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Zoom, name, recvr, slot, parent ); }
-KAction *redisplay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *redisplay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Redisplay, name, recvr, slot, parent ); }
-KAction *up( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *up( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Up, name, recvr, slot, parent ); }
-KAction *back( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *back( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Back, name, recvr, slot, parent ); }
-KAction *forward( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *forward( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Forward, name, recvr, slot, parent ); }
-KAction *home( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *home( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Home, name, recvr, slot, parent ); }
-KAction *prior( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *prior( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Prior, name, recvr, slot, parent ); }
-KAction *next( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *next( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Next, name, recvr, slot, parent ); }
-KAction *goTo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *goTo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Goto, name, recvr, slot, parent ); }
-KAction *gotoPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *gotoPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( GotoPage, name, recvr, slot, parent ); }
-KAction *gotoLine( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *gotoLine( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( GotoLine, name, recvr, slot, parent ); }
-KAction *firstPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *firstPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FirstPage, name, recvr, slot, parent ); }
-KAction *lastPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *lastPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( LastPage, name, recvr, slot, parent ); }
-KAction *addBookmark( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *addBookmark( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AddBookmark, name, recvr, slot, parent ); }
-KAction *editBookmarks( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *editBookmarks( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); }
-KAction *spelling( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *spelling( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Spelling, name, recvr, slot, parent ); }
-KToggleAction *showMenubar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
+KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", KStdAccel::shortcut(KStdAccel::ShowMenubar), recvr, slot,
parent, _name ? _name : name(ShowMenubar));
ret->setWhatsThis( i18n( "Show Menubar<p>"
"Shows the menubar again after it has been hidden" ) );
- KGuiItem guiItem( i18n("Hide &Menubar"), 0 /*same icon*/, QString::null,
+ KGuiItem guiItem( i18n("Hide &Menubar"), 0 /*same icon*/, TQString::null,
i18n( "Hide Menubar<p>"
"Hide the menubar. You can usually get it back using the right mouse button inside the window itself." ) );
ret->setCheckedState( guiItem );
@@ -248,7 +248,7 @@ KToggleAction *showMenubar( const QObject *recvr, const char *slot, KActionColle
}
// obsolete
-KToggleAction *showToolbar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
+KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent,
@@ -267,7 +267,7 @@ KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* p
return ret;
}
-KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
+KToggleAction *showStatusbar( const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
@@ -275,7 +275,7 @@ KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
_name ? _name : name(ShowStatusbar));
ret->setWhatsThis( i18n( "Show Statusbar<p>"
"Shows the statusbar, which is the bar at the bottom of the window used for status information." ) );
- KGuiItem guiItem( i18n("Hide St&atusbar"), QString::null, QString::null,
+ KGuiItem guiItem( i18n("Hide St&atusbar"), TQString::null, TQString::null,
i18n( "Hide Statusbar<p>"
"Hides the statusbar, which is the bar at the bottom of the window used for status information." ) );
ret->setCheckedState( guiItem );
@@ -284,8 +284,8 @@ KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
return ret;
}
-KToggleFullScreenAction *fullScreen( const QObject *recvr, const char *slot, KActionCollection* parent,
- QWidget* window, const char *name )
+KToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, KActionCollection* parent,
+ TQWidget* window, const char *name )
{
KToggleFullScreenAction *ret;
ret = static_cast< KToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent ));
@@ -293,31 +293,31 @@ KToggleFullScreenAction *fullScreen( const QObject *recvr, const char *slot, KAc
return ret;
}
-KAction *saveOptions( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *saveOptions( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SaveOptions, name, recvr, slot, parent ); }
-KAction *keyBindings( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *keyBindings( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( KeyBindings, name, recvr, slot, parent ); }
-KAction *preferences( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *preferences( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Preferences, name, recvr, slot, parent ); }
-KAction *configureToolbars( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *configureToolbars( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); }
-KAction *configureNotifications( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *configureNotifications( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); }
-KAction *help( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *help( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Help, name, recvr, slot, parent ); }
-KAction *helpContents( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *helpContents( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( HelpContents, name, recvr, slot, parent ); }
-KAction *whatsThis( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *whatsThis( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( WhatsThis, name, recvr, slot, parent ); }
-KAction *tipOfDay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *tipOfDay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( TipofDay, name, recvr, slot, parent ); }
-KAction *reportBug( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *reportBug( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ReportBug, name, recvr, slot, parent ); }
-KAction *switchApplicationLanguage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SwitchApplicationLanguage, name, recvr, slot, parent ); }
-KAction *aboutApp( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *aboutApp( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AboutApp, name, recvr, slot, parent ); }
-KAction *aboutKDE( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *aboutKDE( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AboutKDE, name, recvr, slot, parent ); }
}
diff --git a/kdeui/kstdaction.h b/kdeui/kstdaction.h
index d45f76b99..eb19404eb 100644
--- a/kdeui/kstdaction.h
+++ b/kdeui/kstdaction.h
@@ -28,7 +28,7 @@ class KToggleAction;
class KToggleToolBarAction;
class KToggleFullScreenAction;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -50,15 +50,15 @@ class KToggleFullScreenAction;
* for regular actions. For example, if you previously had:
*
* \code
- * KAction *newAct = new KAction(i18n("&New"), QIconSet(BarIcon("filenew")),
+ * KAction *newAct = new KAction(i18n("&New"), TQIconSet(BarIcon("filenew")),
* KStdAccel::shortcut(KStdAccel::New), this,
- * SLOT(fileNew()), actionCollection());
+ * TQT_SLOT(fileNew()), actionCollection());
* \endcode
*
* You could drop that and replace it with:
*
* \code
- * KAction *newAct = KStdAction::openNew(this, SLOT(fileNew()),
+ * KAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()),
* actionCollection());
* \endcode
*
@@ -84,7 +84,7 @@ class KToggleFullScreenAction;
* do something like:
*
* \code
- * (void)KStdAction::cut(this, SLOT(editCut()), actionCollection(), "my_cut");
+ * (void)KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection(), "my_cut");
* \endcode
*
* Now, in your local XML resource file (e.g., yourappui.rc), simply
@@ -108,8 +108,8 @@ class KToggleFullScreenAction;
* here's how:
*
* \code
- * (void)KStdAction::action(KStdAction::New, this, SLOT(fileNew()), actionCollection());
- * (void)KStdAction::action(KStdAction::Cut, this, SLOT(editCut()), actionCollection());
+ * (void)KStdAction::action(KStdAction::New, this, TQT_SLOT(fileNew()), actionCollection());
+ * (void)KStdAction::action(KStdAction::Cut, this, TQT_SLOT(editCut()), actionCollection());
* \endcode
*
* @author Kurt Granroth <granroth@kde.org>
@@ -166,11 +166,11 @@ namespace KStdAction
* KStdAction::StdAction enum.
*/
KDEUI_EXPORT KAction* create( StdAction id, const char *name,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection* parent );
inline KAction* create( StdAction id,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection* parent )
{ return KStdAction::create( id, 0, recvr, slot, parent ); }
@@ -179,7 +179,7 @@ namespace KStdAction
* KStdAction::StdAction enum.
*/
inline KAction *action(StdAction act_enum,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name = 0L )
{ return KStdAction::create( act_enum, name, recvr, slot, parent ); }
@@ -196,107 +196,107 @@ namespace KStdAction
* to give those heigher weight.
* @since 3.1
*/
- KDEUI_EXPORT QStringList stdNames();
+ KDEUI_EXPORT TQStringList stdNames();
/**
* Create a new document or window.
*/
- KDEUI_EXPORT KAction *openNew(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Open an existing file.
*/
- KDEUI_EXPORT KAction *open(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Open a recently used document. The signature of the slot being called
* is of the form slotURLSelected( const KURL & ).
* @param recvr object to receive slot
- * @param slot The SLOT to invoke when a URL is selected. The slot's
+ * @param slot The TQT_SLOT to invoke when a URL is selected. The slot's
* signature is slotURLSelected( const KURL & ).
* @param parent parent widget
* @param name name of widget
*/
- KDEUI_EXPORT KRecentFilesAction *openRecent(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Save the current document.
*/
- KDEUI_EXPORT KAction *save(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Save the current document under a different name.
*/
- KDEUI_EXPORT KAction *saveAs(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Revert the current document to the last saved version
* (essentially will undo all changes).
*/
- KDEUI_EXPORT KAction *revert(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Close the current document.
*/
- KDEUI_EXPORT KAction *close(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Print the current document.
*/
- KDEUI_EXPORT KAction *print(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Show a print preview of the current document.
*/
- KDEUI_EXPORT KAction *printPreview(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Mail this document.
*/
- KDEUI_EXPORT KAction *mail(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Quit the program.
*/
- KDEUI_EXPORT KAction *quit(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Undo the last operation.
*/
- KDEUI_EXPORT KAction *undo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Redo the last operation.
*/
- KDEUI_EXPORT KAction *redo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Cut selected area and store it in the clipboard.
*/
- KDEUI_EXPORT KAction *cut(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Copy the selected area into the clipboard.
*/
- KDEUI_EXPORT KAction *copy(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Paste the contents of clipboard at the current mouse or cursor
* position.
*/
- KDEUI_EXPORT KAction *paste(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
@@ -305,190 +305,190 @@ namespace KStdAction
* menu if Klipper is running.
* @since 3.2
*/
- KDEUI_EXPORT KAction *pasteText(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Clear the content of the focus widget
* @since 3.2
*/
- KDEUI_EXPORT KAction *clear(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Select all elements in the current document.
*/
- KDEUI_EXPORT KAction *selectAll(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Deselect any selected elements in the current document.
*/
- KDEUI_EXPORT KAction *deselect(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Initiate a 'find' request in the current document.
*/
- KDEUI_EXPORT KAction *find(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find the next instance of a stored 'find'.
*/
- KDEUI_EXPORT KAction *findNext(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find a previous instance of a stored 'find'.
*/
- KDEUI_EXPORT KAction *findPrev(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find and replace matches.
*/
- KDEUI_EXPORT KAction *replace(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* View the document at its actual size.
*/
- KDEUI_EXPORT KAction *actualSize(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the size of the current window.
*/
- KDEUI_EXPORT KAction *fitToPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the width of the current window.
*/
- KDEUI_EXPORT KAction *fitToWidth(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the height of the current window.
*/
- KDEUI_EXPORT KAction *fitToHeight(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Zoom in.
*/
- KDEUI_EXPORT KAction *zoomIn(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Zoom out.
*/
- KDEUI_EXPORT KAction *zoomOut(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Popup a zoom dialog.
*/
- KDEUI_EXPORT KAction *zoom(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Redisplay or redraw the document.
*/
- KDEUI_EXPORT KAction *redisplay(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move up (web style menu).
*/
- KDEUI_EXPORT KAction *up(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move back (web style menu).
*/
- KDEUI_EXPORT KAction *back(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move forward (web style menu).
*/
- KDEUI_EXPORT KAction *forward(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to the "Home" position or document.
*/
- KDEUI_EXPORT KAction *home(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Scroll up one page.
*/
- KDEUI_EXPORT KAction *prior(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Scroll down one page.
*/
- KDEUI_EXPORT KAction *next(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to somewhere in general.
*/
- KDEUI_EXPORT KAction *goTo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to a specific page (dialog).
*/
- KDEUI_EXPORT KAction *gotoPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to a specific line (dialog).
*/
- KDEUI_EXPORT KAction *gotoLine(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Jump to the first page.
*/
- KDEUI_EXPORT KAction *firstPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Jump to the last page.
*/
- KDEUI_EXPORT KAction *lastPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Add the current page to the bookmarks tree.
*/
- KDEUI_EXPORT KAction *addBookmark(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Edit the application bookmarks.
*/
- KDEUI_EXPORT KAction *editBookmarks(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Pop up the spell checker.
*/
- KDEUI_EXPORT KAction *spelling(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Show/Hide the menubar.
*/
- KDEUI_EXPORT KToggleAction *showMenubar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
@@ -498,7 +498,7 @@ namespace KStdAction
* Show/Hide the primary toolbar.
* @since 3.1
*/
- KDEUI_EXPORT KToggleAction *showToolbar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED;
/**
* @obsolete. toolbar actions are created automatically now in the
@@ -512,41 +512,41 @@ namespace KStdAction
/**
* Show/Hide the statusbar.
*/
- KDEUI_EXPORT KToggleAction *showStatusbar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Switch to/from full screen mode
* @since 3.2
*/
- KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const QObject *recvr, const char *slot,
- KActionCollection* parent, QWidget* window, const char *name = 0 );
+ KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot,
+ KActionCollection* parent, TQWidget* window, const char *name = 0 );
/**
* Display the save options dialog.
*/
- KDEUI_EXPORT KAction *saveOptions(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the configure key bindings dialog.
*
* Note that you might be able to use the pre-built KXMLGUIFactory's fuction:
- * KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
+ * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
*/
- KDEUI_EXPORT KAction *keyBindings(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the preferences/options dialog.
*/
- KDEUI_EXPORT KAction *preferences(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* The Customize Toolbar dialog.
*/
- KDEUI_EXPORT KAction *configureToolbars(const QObject *recvr,
+ KDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr,
const char *slot,
KActionCollection* parent,
const char *name = 0 );
@@ -555,7 +555,7 @@ namespace KStdAction
* The Configure Notifications dialog.
* @since 3.1
*/
- KDEUI_EXPORT KAction *configureNotifications(const QObject *recvr,
+ KDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr,
const char *slot,
KActionCollection *parent,
const char *name = 0);
@@ -563,51 +563,51 @@ namespace KStdAction
/**
* Display the help.
*/
- KDEUI_EXPORT KAction *help(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the help contents.
*/
- KDEUI_EXPORT KAction *helpContents(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Trigger the What's This cursor.
*/
- KDEUI_EXPORT KAction *whatsThis(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display "Tip of the Day"
* @since 3.1
*/
- KDEUI_EXPORT KAction *tipOfDay(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Open up the Report Bug dialog.
*/
- KDEUI_EXPORT KAction *reportBug(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the application's About box.
*/
- KDEUI_EXPORT KAction *aboutApp(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the About KDE dialog.
*/
- KDEUI_EXPORT KAction *aboutKDE(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display "Switch application language" dialog.
* @since 3.5.8
*/
- KDEUI_EXPORT KAction *switchApplicationLanguage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
}
diff --git a/kdeui/kstdaction_p.h b/kdeui/kstdaction_p.h
index f8f91868d..bc60115b1 100644
--- a/kdeui/kstdaction_p.h
+++ b/kdeui/kstdaction_p.h
@@ -124,9 +124,9 @@ inline const KStdActionInfo* infoPtr( StdAction id )
return 0;
}
-static inline QStringList internal_stdNames()
+static inline TQStringList internal_stdNames()
{
- QStringList result;
+ TQStringList result;
for( uint i = 0; g_rgActionInfo[i].id != ActionNone; i++ )
if (g_rgActionInfo[i].psLabel)
diff --git a/kdeui/kstdguiitem.cpp b/kdeui/kstdguiitem.cpp
index ce9466091..8391819ed 100644
--- a/kdeui/kstdguiitem.cpp
+++ b/kdeui/kstdguiitem.cpp
@@ -59,38 +59,38 @@ KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum )
};
}
-QString KStdGuiItem::stdItem( StdItem ui_enum )
+TQString KStdGuiItem::stdItem( StdItem ui_enum )
{
switch (ui_enum ) {
- case Ok : return QString::fromLatin1("ok");
- case Cancel : return QString::fromLatin1("cancel");
- case Yes : return QString::fromLatin1("yes");
- case No : return QString::fromLatin1("no");
- case Discard : return QString::fromLatin1("discard");
- case Save : return QString::fromLatin1("save");
- case DontSave : return QString::fromLatin1("dontSave");
- case SaveAs : return QString::fromLatin1("saveAs");
- case Apply : return QString::fromLatin1("apply");
- case Help : return QString::fromLatin1("help");
- case Close : return QString::fromLatin1("close");
- case Defaults : return QString::fromLatin1("defaults");
- case Back : return QString::fromLatin1("back");
- case Forward : return QString::fromLatin1("forward");
- case Print : return QString::fromLatin1("print");
- case Continue : return QString::fromLatin1("continue");
- case Open : return QString::fromLatin1("open");
- case Quit : return QString::fromLatin1("quit");
- case AdminMode: return QString::fromLatin1("adminMode");
- case Delete : return QString::fromLatin1("delete");
- case Insert : return QString::fromLatin1("insert");
- case Find : return QString::fromLatin1("find");
- case Stop : return QString::fromLatin1("stop");
- case Add : return QString::fromLatin1("add");
- case Remove : return QString::fromLatin1("remove");
- case Test : return QString::fromLatin1("test");
- case Properties : return QString::fromLatin1("properties");
- case Overwrite : return QString::fromLatin1("overwrite");
- default : return QString::null;
+ case Ok : return TQString::fromLatin1("ok");
+ case Cancel : return TQString::fromLatin1("cancel");
+ case Yes : return TQString::fromLatin1("yes");
+ case No : return TQString::fromLatin1("no");
+ case Discard : return TQString::fromLatin1("discard");
+ case Save : return TQString::fromLatin1("save");
+ case DontSave : return TQString::fromLatin1("dontSave");
+ case SaveAs : return TQString::fromLatin1("saveAs");
+ case Apply : return TQString::fromLatin1("apply");
+ case Help : return TQString::fromLatin1("help");
+ case Close : return TQString::fromLatin1("close");
+ case Defaults : return TQString::fromLatin1("defaults");
+ case Back : return TQString::fromLatin1("back");
+ case Forward : return TQString::fromLatin1("forward");
+ case Print : return TQString::fromLatin1("print");
+ case Continue : return TQString::fromLatin1("continue");
+ case Open : return TQString::fromLatin1("open");
+ case Quit : return TQString::fromLatin1("quit");
+ case AdminMode: return TQString::fromLatin1("adminMode");
+ case Delete : return TQString::fromLatin1("delete");
+ case Insert : return TQString::fromLatin1("insert");
+ case Find : return TQString::fromLatin1("find");
+ case Stop : return TQString::fromLatin1("stop");
+ case Add : return TQString::fromLatin1("add");
+ case Remove : return TQString::fromLatin1("remove");
+ case Test : return TQString::fromLatin1("test");
+ case Properties : return TQString::fromLatin1("properties");
+ case Overwrite : return TQString::fromLatin1("overwrite");
+ default : return TQString::null;
};
}
@@ -183,7 +183,7 @@ KGuiItem KStdGuiItem::defaults()
KGuiItem KStdGuiItem::back( BidiMode useBidi )
{
- QString icon = ( useBidi == UseRTL && QApplication::reverseLayout() )
+ TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
? "forward" : "back";
return KGuiItem( i18n( "go back", "&Back" ), icon,
i18n( "Go back one step" ) );
@@ -191,7 +191,7 @@ KGuiItem KStdGuiItem::back( BidiMode useBidi )
KGuiItem KStdGuiItem::forward( BidiMode useBidi )
{
- QString icon = ( useBidi == UseRTL && QApplication::reverseLayout() )
+ TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
? "back" : "forward";
return KGuiItem( i18n( "go forward", "&Forward" ), icon,
i18n( "Go forward one step" ) );
@@ -211,7 +211,7 @@ KGuiItem KStdGuiItem::print()
KGuiItem KStdGuiItem::cont()
{
- return KGuiItem( i18n( "C&ontinue" ), QString::null,
+ return KGuiItem( i18n( "C&ontinue" ), TQString::null,
i18n( "Continue operation" ) );
}
diff --git a/kdeui/kstdguiitem.h b/kdeui/kstdguiitem.h
index 413a47296..bf2182191 100644
--- a/kdeui/kstdguiitem.h
+++ b/kdeui/kstdguiitem.h
@@ -22,8 +22,8 @@
// Needed for the template below
#include <kguiitem.h>
-#include <qstring.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqpair.h>
/**
* @short Provides a set of standardized KGuiItems.
@@ -59,7 +59,7 @@ public:
Overwrite ///< @since 3.5
};
static KGuiItem guiItem ( StdItem ui_enum );
- static QString stdItem ( StdItem ui_enum );
+ static TQString stdItem ( StdItem ui_enum );
static KGuiItem ok();
static KGuiItem cancel();
static KGuiItem yes();
diff --git a/kdeui/kstringvalidator.cpp b/kdeui/kstringvalidator.cpp
index e45e0dcbe..f783a4b9f 100644
--- a/kdeui/kstringvalidator.cpp
+++ b/kdeui/kstringvalidator.cpp
@@ -26,7 +26,7 @@
// KStringListValidator
//
-QValidator::State KStringListValidator::validate( QString & input, int& ) const {
+TQValidator::State KStringListValidator::validate( TQString & input, int& ) const {
if ( input.isEmpty() ) return Intermediate;
if ( isRejecting() ) // anything not in mStringList is acceptable:
@@ -38,7 +38,7 @@ QValidator::State KStringListValidator::validate( QString & input, int& ) const
if ( mStringList.find( input ) != mStringList.end() )
return Acceptable;
else
- for ( QStringList::ConstIterator it = mStringList.begin() ;
+ for ( TQStringList::ConstIterator it = mStringList.begin() ;
it != mStringList.end() ; ++it )
if ( (*it).startsWith( input ) || input.startsWith( *it ) )
return Intermediate;
@@ -46,7 +46,7 @@ QValidator::State KStringListValidator::validate( QString & input, int& ) const
return Invalid;
}
-void KStringListValidator::fixup( QString & /* input */ ) const {
+void KStringListValidator::fixup( TQString & /* input */ ) const {
if ( !isFixupEnabled() ) return;
// warn (but only once!) about non-implemented fixup():
static bool warn = true;
@@ -63,17 +63,17 @@ void KStringListValidator::fixup( QString & /* input */ ) const {
#define ALLOWED_CHARS "!#-'*+.0-9^-~+-"
-QValidator::State KMimeTypeValidator::validate( QString & input, int& ) const
+TQValidator::State KMimeTypeValidator::validate( TQString & input, int& ) const
{
if ( input.isEmpty() )
return Intermediate;
- QRegExp acceptable( "[" ALLOWED_CHARS "]+/[" ALLOWED_CHARS "]+",
+ TQRegExp acceptable( "[" ALLOWED_CHARS "]+/[" ALLOWED_CHARS "]+",
false /*case-insens.*/);
if ( acceptable.exactMatch( input ) )
return Acceptable;
- QRegExp intermediate( "[" ALLOWED_CHARS "]*/?[" ALLOWED_CHARS "]*",
+ TQRegExp intermediate( "[" ALLOWED_CHARS "]*/?[" ALLOWED_CHARS "]*",
false /*case-insensitive*/);
if ( intermediate.exactMatch( input ) )
return Intermediate;
@@ -81,10 +81,10 @@ QValidator::State KMimeTypeValidator::validate( QString & input, int& ) const
return Invalid;
}
-void KMimeTypeValidator::fixup( QString & input ) const
+void KMimeTypeValidator::fixup( TQString & input ) const
{
- QRegExp invalidChars("[^/" ALLOWED_CHARS "]+");
- input.replace( invalidChars, QString::null);
+ TQRegExp invalidChars("[^/" ALLOWED_CHARS "]+");
+ input.replace( invalidChars, TQString::null);
}
#include "kstringvalidator.moc"
diff --git a/kdeui/kstringvalidator.h b/kdeui/kstringvalidator.h
index 42e1c7b3b..77b26d6db 100644
--- a/kdeui/kstringvalidator.h
+++ b/kdeui/kstringvalidator.h
@@ -22,13 +22,13 @@
#ifndef __KSTRINGVALIDATOR_H__
#define __KSTRINGVALIDATOR_H__
-#include <qvalidator.h>
-#include <qstringlist.h>
+#include <tqvalidator.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
/**
- * @short A QValidator to (dis)allow certain strings
+ * @short A TQValidator to (dis)allow certain strings
*
* This validator allows you to accept only certain or to accept all
* but certain strings.
@@ -57,9 +57,9 @@
*
* @author Marc Mutz <mutz@kde.org>
**/
-class KDEUI_EXPORT KStringListValidator : public QValidator {
+class KDEUI_EXPORT KStringListValidator : public TQValidator {
Q_OBJECT
- Q_PROPERTY( QStringList stringList READ stringList WRITE setStringList )
+ Q_PROPERTY( TQStringList stringList READ stringList WRITE setStringList )
Q_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting )
Q_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled )
public:
@@ -73,14 +73,14 @@ public:
* @param name Passed to lower level constructor
*
**/
- KStringListValidator( const QStringList & list=QStringList(),
+ KStringListValidator( const TQStringList & list=TQStringList(),
bool rejecting=true, bool fixupEnabled=false,
- QObject * parent=0, const char * name=0 )
- : QValidator( parent, name ), mStringList( list ),
+ TQObject * parent=0, const char * name=0 )
+ : TQValidator( parent, name ), mStringList( list ),
mRejecting( rejecting ), mFixupEnabled( fixupEnabled ) {}
- virtual State validate( QString & input, int & pos ) const;
- virtual void fixup( QString & input ) const;
+ virtual State validate( TQString & input, int & pos ) const;
+ virtual void fixup( TQString & input ) const;
void setRejecting( bool rejecting ) { mRejecting = rejecting; }
bool isRejecting() const { return mRejecting; }
@@ -88,11 +88,11 @@ public:
void setFixupEnabled( bool fixupEnabled ) { mFixupEnabled = fixupEnabled; }
bool isFixupEnabled() const { return mFixupEnabled; }
- void setStringList( const QStringList & list ) { mStringList = list; }
- QStringList stringList() const { return mStringList; }
+ void setStringList( const TQStringList & list ) { mStringList = list; }
+ TQStringList stringList() const { return mStringList; }
protected:
- QStringList mStringList;
+ TQStringList mStringList;
bool mRejecting;
bool mFixupEnabled;
private:
@@ -100,7 +100,7 @@ private:
};
/**
- * @short A QValidator for mime types.
+ * @short A TQValidator for mime types.
*
* This validator allows you to validate mimetype names
* (e.g. text/plain, image/jpeg). Note that the validation is only
@@ -120,8 +120,8 @@ class KDEUI_EXPORT KMimeTypeValidator : public QValidator
{
Q_OBJECT
public:
- KMimeTypeValidator( QObject* parent, const char* name=0)
- : QValidator( parent, name ) {}
+ KMimeTypeValidator( TQObject* parent, const char* name=0)
+ : TQValidator( parent, name ) {}
/**
* Checks for well-formed mimetype. Returns
@@ -129,11 +129,11 @@ public:
* @li Intermediate iff input ~= /^[:allowed chars:]*\/?[:allowed chars:]*$/
* @li Invalid else
*/
- virtual State validate( QString & input, int & pos ) const;
+ virtual State validate( TQString & input, int & pos ) const;
/**
* Removes all characters that are forbidden in mimetypes.
*/
- virtual void fixup( QString & input ) const;
+ virtual void fixup( TQString & input ) const;
private:
class KMimeTypeValidator* d;
};
diff --git a/kdeui/kswitchlanguagedialog.cpp b/kdeui/kswitchlanguagedialog.cpp
index 9b390a7de..3cfcc011b 100644
--- a/kdeui/kswitchlanguagedialog.cpp
+++ b/kdeui/kswitchlanguagedialog.cpp
@@ -21,10 +21,10 @@
#include "kswitchlanguagedialog.h"
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqmap.h>
#include <klanguagebutton.h>
#include <kconfig.h>
@@ -35,12 +35,12 @@
struct LanguageRowData
{
- QLabel *label;
+ TQLabel *label;
KLanguageButton *languageButton;
KPushButton *removeButton;
void setRowWidgets(
- QLabel *label,
+ TQLabel *label,
KLanguageButton *languageButton,
KPushButton *removeButton
)
@@ -67,47 +67,47 @@ public:
/**
Adds one button with language to widget.
*/
- void addLanguageButton(const QString & languageCode, bool primaryLanguage);
+ void addLanguageButton(const TQString & languageCode, bool primaryLanguage);
/**
Returns list of languages chosen for application or default languages is they are not set.
*/
- QStringList applicationLanguageList();
+ TQStringList applicationLanguageList();
- QMap<KPushButton*, LanguageRowData> languageRows;
- QPtrList<KLanguageButton> languageButtons;
- QGridLayout *languagesLayout;
- QWidget *page;
+ TQMap<KPushButton*, LanguageRowData> languageRows;
+ TQPtrList<KLanguageButton> languageButtons;
+ TQGridLayout *languagesLayout;
+ TQWidget *page;
};
/*************************** KSwitchLanguageDialog **************************/
KSwitchLanguageDialog::KSwitchLanguageDialog(
- QWidget *parent,
+ TQWidget *parent,
const char *name,
bool modal
):
KDialogBase(parent, name, modal, i18n("Switch application language"), Ok|Cancel, Ok, true ),
d(new KSwitchLanguageDialogPrivate(this))
{
- d->page = new QWidget( this );
+ d->page = new TQWidget( this );
setMainWidget(d->page);
- QVBoxLayout *topLayout = new QVBoxLayout( d->page, 0, spacingHint() );
- QLabel *label = new QLabel( i18n("Please choose language which should be used for this application"), d->page, "label1" );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( d->page, 0, spacingHint() );
+ TQLabel *label = new TQLabel( i18n("Please choose language which should be used for this application"), d->page, "label1" );
topLayout->addWidget( label );
- QHBoxLayout *languageHorizontalLayout = new QHBoxLayout();
+ TQHBoxLayout *languageHorizontalLayout = new TQHBoxLayout();
topLayout->addLayout(languageHorizontalLayout);
- d->languagesLayout = new QGridLayout(0 , 2);
+ d->languagesLayout = new TQGridLayout(0 , 2);
languageHorizontalLayout->addLayout(d->languagesLayout);
languageHorizontalLayout->addStretch();
- QStringList defaultLanguages = d->applicationLanguageList();
+ TQStringList defaultLanguages = d->applicationLanguageList();
- for ( QStringList::ConstIterator it = defaultLanguages.begin(); it != defaultLanguages.end(); ++it )
+ for ( TQStringList::ConstIterator it = defaultLanguages.begin(); it != defaultLanguages.end(); ++it )
{
- QString language = *it;
+ TQString language = *it;
bool primaryLanguage = (it == defaultLanguages.begin());
d->addLanguageButton(language, primaryLanguage);
}
@@ -117,12 +117,12 @@ KSwitchLanguageDialog::KSwitchLanguageDialog(
d->addLanguageButton(KGlobal::locale()->defaultLanguage(), true);
}
- QHBoxLayout *addButtonHorizontalLayout = new QHBoxLayout();
+ TQHBoxLayout *addButtonHorizontalLayout = new TQHBoxLayout();
topLayout->addLayout(addButtonHorizontalLayout);
KPushButton *addLangButton = new KPushButton(i18n("Add fallback language"), d->page, "addLangButton");
- QToolTip::add(addLangButton, i18n("Adds one more language which will be used if other translations do not contain proper translation"));
- connect(addLangButton, SIGNAL(clicked()), this, SLOT(slotAddLanguageButton()));
+ TQToolTip::add(addLangButton, i18n("Adds one more language which will be used if other translations do not contain proper translation"));
+ connect(addLangButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddLanguageButton()));
addButtonHorizontalLayout->addWidget(addLangButton);
addButtonHorizontalLayout->addStretch();
@@ -142,7 +142,7 @@ void KSwitchLanguageDialog::slotAddLanguageButton()
void KSwitchLanguageDialog::removeButtonClicked()
{
- QObject const *signalSender = sender();
+ TQObject const *signalSender = sender();
if (signalSender == NULL)
{
@@ -158,7 +158,7 @@ void KSwitchLanguageDialog::removeButtonClicked()
return;
}
- QMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton);
+ TQMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton);
if (it == d->languageRows.end())
{
@@ -176,9 +176,9 @@ void KSwitchLanguageDialog::removeButtonClicked()
d->languageRows.erase(it);
}
-void KSwitchLanguageDialog::languageOnButtonChanged(const QString & languageCode)
+void KSwitchLanguageDialog::languageOnButtonChanged(const TQString & languageCode)
{
- for ( QPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
+ for ( TQPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
{
KLanguageButton *languageButton = *it;
if (languageButton->current() == languageCode)
@@ -192,10 +192,10 @@ void KSwitchLanguageDialog::languageOnButtonChanged(const QString & languageCode
void KSwitchLanguageDialog::slotOk()
{
- QString languageString;
+ TQString languageString;
bool first = true;
- for ( QPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
+ for ( TQPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
{
KLanguageButton *languageButton = *it;
@@ -242,10 +242,10 @@ KSwitchLanguageDialogPrivate::KSwitchLanguageDialogPrivate(
void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button)
{
KLocale *locale = KGlobal::locale();
- QStringList allLanguages = locale->allLanguagesTwoAlpha();
- for ( QStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it )
+ TQStringList allLanguages = locale->allLanguagesTwoAlpha();
+ for ( TQStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it )
{
- QString languageCode = *it;
+ TQString languageCode = *it;
if (locale->isApplicationTranslatedInto(languageCode))
{
button->insertItem(
@@ -256,10 +256,10 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but
}
}
-QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
+TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
{
KConfig *config = KGlobal::config();
- QStringList languagesList;
+ TQStringList languagesList;
if (config->hasGroup("Locale"))
{
@@ -277,9 +277,9 @@ QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
return languagesList;
}
-void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCode, bool primaryLanguage)
+void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCode, bool primaryLanguage)
{
- QString labelText = primaryLanguage ? i18n("Primary language:") : i18n("Fallback language:");
+ TQString labelText = primaryLanguage ? i18n("Primary language:") : i18n("Fallback language:");
KLanguageButton *languageButton = new KLanguageButton(page);
@@ -289,11 +289,11 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCod
languageButton->setCurrentItem(languageCode);
- QObject::connect(
+ TQObject::connect(
languageButton,
- SIGNAL(activated( const QString &)),
+ TQT_SIGNAL(activated( const TQString &)),
p,
- SLOT(languageOnButtonChanged(const QString &))
+ TQT_SLOT(languageOnButtonChanged(const TQString &))
);
LanguageRowData languageRowData;
@@ -303,26 +303,26 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCod
{
removeButton = new KPushButton(i18n("Remove"), page);
- QObject::connect(
+ TQObject::connect(
removeButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
p,
- SLOT(removeButtonClicked())
+ TQT_SLOT(removeButtonClicked())
);
}
if (primaryLanguage)
{
- QToolTip::add(languageButton, i18n("This is main application language which will be used first before any other languages"));
+ TQToolTip::add(languageButton, i18n("This is main application language which will be used first before any other languages"));
}
else
{
- QToolTip::add(languageButton, i18n("This is language which will be used if any previous languages does not contain proper translation"));
+ TQToolTip::add(languageButton, i18n("This is language which will be used if any previous languages does not contain proper translation"));
}
int numRows = languagesLayout->numRows();
- QLabel *languageLabel = new QLabel(labelText, page);
+ TQLabel *languageLabel = new TQLabel(labelText, page);
languagesLayout->addWidget( languageLabel, numRows + 1, 1, Qt::AlignAuto );
languagesLayout->addWidget( languageButton, numRows + 1, 2, Qt::AlignAuto );
diff --git a/kdeui/kswitchlanguagedialog.h b/kdeui/kswitchlanguagedialog.h
index 0161453c5..185941b57 100644
--- a/kdeui/kswitchlanguagedialog.h
+++ b/kdeui/kswitchlanguagedialog.h
@@ -50,10 +50,10 @@ class KDEUI_EXPORT KSwitchLanguageDialog : public KDialogBase
* @param name Internal name of the widget. This name in not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec()
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec()
*/
- KSwitchLanguageDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ KSwitchLanguageDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
virtual ~KSwitchLanguageDialog();
@@ -66,7 +66,7 @@ class KDEUI_EXPORT KSwitchLanguageDialog : public KDialogBase
/**
Called when one of language buttons changes state.
*/
- virtual void languageOnButtonChanged(const QString & );
+ virtual void languageOnButtonChanged(const TQString & );
/**
Called to add one language button to dialog.
diff --git a/kdeui/ksyntaxhighlighter.cpp b/kdeui/ksyntaxhighlighter.cpp
index b60940bb4..c70cd672e 100644
--- a/kdeui/ksyntaxhighlighter.cpp
+++ b/kdeui/ksyntaxhighlighter.cpp
@@ -21,10 +21,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qsyntaxhighlighter.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kconfig.h>
@@ -45,7 +45,7 @@ static const int tenSeconds = 10*1000;
class KSyntaxHighlighter::KSyntaxHighlighterPrivate
{
public:
- QColor col1, col2, col3, col4, col5;
+ TQColor col1, col2, col3, col4, col5;
SyntaxMode mode;
bool enabled;
};
@@ -58,10 +58,10 @@ public:
alwaysEndsWithSpace( true ),
intraWordEditing( false ) {}
- QString currentWord;
+ TQString currentWord;
int currentPos;
bool alwaysEndsWithSpace;
- QColor color;
+ TQColor color;
bool intraWordEditing;
};
@@ -84,21 +84,21 @@ public:
delete spell;
}
- static QDict<int>* sDict()
+ static TQDict<int>* sDict()
{
if (!statDict)
- statDict = new QDict<int>(50021);
+ statDict = new TQDict<int>(50021);
return statDict;
}
- QDict<int>* mDict;
- QDict<int> autoDict;
- QDict<int> autoIgnoreDict;
- static QObject *sDictionaryMonitor;
+ TQDict<int>* mDict;
+ TQDict<int> autoDict;
+ TQDict<int> autoIgnoreDict;
+ static TQObject *sDictionaryMonitor;
KSpell *spell;
KSpellConfig *mSpellConfig;
- QTimer *rehighlightRequest, *spellTimeout;
- QString spellKey;
+ TQTimer *rehighlightRequest, *spellTimeout;
+ TQString spellKey;
int wordCount, errorCount;
int checksRequested, checksDone;
int disablePercentage;
@@ -107,21 +107,21 @@ public:
bool active, automatic, autoReady;
bool globalConfig, spellReady;
private:
- static QDict<int>* statDict;
+ static TQDict<int>* statDict;
};
-QDict<int>* KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::statDict = 0;
+TQDict<int>* KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::statDict = 0;
-KSyntaxHighlighter::KSyntaxHighlighter( QTextEdit *textEdit,
+KSyntaxHighlighter::KSyntaxHighlighter( TQTextEdit *textEdit,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3,
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3,
SyntaxMode mode )
- : QSyntaxHighlighter( textEdit )
+ : TQSyntaxHighlighter( textEdit )
{
d = new KSyntaxHighlighterPrivate();
@@ -140,35 +140,35 @@ KSyntaxHighlighter::~KSyntaxHighlighter()
delete d;
}
-int KSyntaxHighlighter::highlightParagraph( const QString &text, int )
+int KSyntaxHighlighter::highlightParagraph( const TQString &text, int )
{
if (!d->enabled) {
setFormat( 0, text.length(), textEdit()->viewport()->paletteForegroundColor() );
return 0;
}
- QString simplified = text;
- simplified = simplified.replace( QRegExp( "\\s" ), QString::null ).replace( '|', QString::fromLatin1(">") );
- while ( simplified.startsWith( QString::fromLatin1(">>>>") ) )
+ TQString simplified = text;
+ simplified = simplified.replace( TQRegExp( "\\s" ), TQString::null ).replace( '|', TQString::fromLatin1(">") );
+ while ( simplified.startsWith( TQString::fromLatin1(">>>>") ) )
simplified = simplified.mid(3);
- if ( simplified.startsWith( QString::fromLatin1(">>>") ) || simplified.startsWith( QString::fromLatin1("> > >") ) )
+ if ( simplified.startsWith( TQString::fromLatin1(">>>") ) || simplified.startsWith( TQString::fromLatin1("> > >") ) )
setFormat( 0, text.length(), d->col2 );
- else if ( simplified.startsWith( QString::fromLatin1(">>") ) || simplified.startsWith( QString::fromLatin1("> >") ) )
+ else if ( simplified.startsWith( TQString::fromLatin1(">>") ) || simplified.startsWith( TQString::fromLatin1("> >") ) )
setFormat( 0, text.length(), d->col3 );
- else if ( simplified.startsWith( QString::fromLatin1(">") ) )
+ else if ( simplified.startsWith( TQString::fromLatin1(">") ) )
setFormat( 0, text.length(), d->col4 );
else
setFormat( 0, text.length(), d->col5 );
return 0;
}
-KSpellingHighlighter::KSpellingHighlighter( QTextEdit *textEdit,
- const QColor& spellColor,
+KSpellingHighlighter::KSpellingHighlighter( TQTextEdit *textEdit,
+ const TQColor& spellColor,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3 )
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3 )
: KSyntaxHighlighter( textEdit, colorQuoting, depth0, depth1, depth2, depth3 )
{
d = new KSpellingHighlighterPrivate();
@@ -181,13 +181,13 @@ KSpellingHighlighter::~KSpellingHighlighter()
delete d;
}
-int KSpellingHighlighter::highlightParagraph( const QString &text,
+int KSpellingHighlighter::highlightParagraph( const TQString &text,
int paraNo )
{
if ( paraNo == -2 )
paraNo = 0;
// leave #includes, diffs, and quoted replies alone
- QString diffAndCo( ">|" );
+ TQString diffAndCo( ">|" );
bool isCode = diffAndCo.find(text[0]) != -1;
@@ -228,9 +228,9 @@ int KSpellingHighlighter::highlightParagraph( const QString &text,
return ++paraNo;
}
-QStringList KSpellingHighlighter::personalWords()
+TQStringList KSpellingHighlighter::personalWords()
{
- QStringList l;
+ TQStringList l;
l.append( "KMail" );
l.append( "KOrganizer" );
l.append( "KAddressBook" );
@@ -251,7 +251,7 @@ void KSpellingHighlighter::flushCurrentWord()
d->currentPos++;
}
- QChar ch;
+ TQChar ch;
while ( ( ch = d->currentWord[(int) d->currentWord.length() - 1] ).isPunct() &&
ch != '(' && ch != '@' )
d->currentWord.truncate( d->currentWord.length() - 1 );
@@ -265,17 +265,17 @@ void KSpellingHighlighter::flushCurrentWord()
d->currentWord = "";
}
-QObject *KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::sDictionaryMonitor = 0;
+TQObject *KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::sDictionaryMonitor = 0;
-KDictSpellingHighlighter::KDictSpellingHighlighter( QTextEdit *textEdit,
+KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit,
bool spellCheckingActive ,
bool autoEnable,
- const QColor& spellColor,
+ const TQColor& spellColor,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3,
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3,
KSpellConfig *spellConfig )
: KSpellingHighlighter( textEdit, spellColor,
colorQuoting, depth0, depth1, depth2, depth3 )
@@ -299,23 +299,23 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( QTextEdit *textEdit,
textEdit->installEventFilter( this );
textEdit->viewport()->installEventFilter( this );
- d->rehighlightRequest = new QTimer(this);
- connect( d->rehighlightRequest, SIGNAL( timeout() ),
- this, SLOT( slotRehighlight() ));
- d->spellTimeout = new QTimer(this);
- connect( d->spellTimeout, SIGNAL( timeout() ),
- this, SLOT( slotKSpellNotResponding() ));
+ d->rehighlightRequest = new TQTimer(this);
+ connect( d->rehighlightRequest, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotRehighlight() ));
+ d->spellTimeout = new TQTimer(this);
+ connect( d->spellTimeout, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotKSpellNotResponding() ));
if ( d->globalConfig ) {
d->spellKey = spellKey();
if ( !d->sDictionaryMonitor )
- d->sDictionaryMonitor = new QObject();
+ d->sDictionaryMonitor = new TQObject();
}
else {
- d->mDict = new QDict<int>(4001);
- connect( d->mSpellConfig, SIGNAL( configChanged() ),
- this, SLOT( slotLocalSpellConfigChanged() ) );
+ d->mDict = new TQDict<int>(4001);
+ connect( d->mSpellConfig, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( slotLocalSpellConfigChanged() ) );
}
slotDictionaryChanged();
@@ -339,8 +339,8 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
if ( cg.readEntry("KSpell_DoSpellChecking") != "0" )
{
if ( d->globalConfig ) {
- connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
- this, SLOT( slotDictionaryChanged() ));
+ connect( d->sDictionaryMonitor, TQT_SIGNAL( destroyed()),
+ this, TQT_SLOT( slotDictionaryChanged() ));
}
if ( spell != d->spell )
{
@@ -348,14 +348,14 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
d->spell = spell;
}
d->spellReady = true;
- const QStringList l = KSpellingHighlighter::personalWords();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ const TQStringList l = KSpellingHighlighter::personalWords();
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
d->spell->addPersonal( *it );
}
- connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
- this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
- connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
- this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
+ connect( spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int )),
+ this, TQT_SLOT( slotMisspelling( const TQString &, const TQStringList &, unsigned int )));
+ connect( spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int )),
+ this, TQT_SLOT( slotCorrected( const TQString &, const TQString &, unsigned int )));
d->checksRequested = 0;
d->checksDone = 0;
d->completeRehighlightRequired = true;
@@ -363,7 +363,7 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
}
}
-bool KDictSpellingHighlighter::isMisspelled( const QString &word )
+bool KDictSpellingHighlighter::isMisspelled( const TQString &word )
{
if (!d->spellReady)
return false;
@@ -378,7 +378,7 @@ bool KDictSpellingHighlighter::isMisspelled( const QString &word )
d->autoIgnoreDict.replace( word, Ignore );
// "dict" is used as a cache to store the results of KSpell
- QDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
+ TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
if ( !dict->isEmpty() && (*dict)[word] == NotOkay ) {
if ( d->autoReady && ( d->autoDict[word] != NotOkay )) {
if ( !d->autoIgnoreDict[word] )
@@ -419,7 +419,7 @@ void KSpellingHighlighter::setIntraWordEditing( bool editing )
d->intraWordEditing = editing;
}
-void KDictSpellingHighlighter::slotMisspelling (const QString &originalWord, const QStringList &suggestions,
+void KDictSpellingHighlighter::slotMisspelling (const TQString &originalWord, const TQStringList &suggestions,
unsigned int pos)
{
Q_UNUSED( suggestions );
@@ -434,12 +434,12 @@ void KDictSpellingHighlighter::slotMisspelling (const QString &originalWord, con
emit newSuggestions( originalWord, suggestions, pos );
}
-void KDictSpellingHighlighter::slotCorrected(const QString &word,
- const QString &,
+void KDictSpellingHighlighter::slotCorrected(const TQString &word,
+ const TQString &,
unsigned int)
{
- QDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
+ TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
if ( !dict->isEmpty() && (*dict)[word] == Unknown ) {
dict->replace( word, Okay );
}
@@ -454,8 +454,8 @@ void KDictSpellingHighlighter::slotCorrected(const QString &word,
void KDictSpellingHighlighter::dictionaryChanged()
{
- QObject *oldMonitor = KDictSpellingHighlighterPrivate::sDictionaryMonitor;
- KDictSpellingHighlighterPrivate::sDictionaryMonitor = new QObject();
+ TQObject *oldMonitor = KDictSpellingHighlighterPrivate::sDictionaryMonitor;
+ KDictSpellingHighlighterPrivate::sDictionaryMonitor = new TQObject();
KDictSpellingHighlighterPrivate::sDict()->clear();
delete oldMonitor;
}
@@ -514,7 +514,7 @@ void KDictSpellingHighlighter::slotRehighlight()
}
if (d->checksDone == d->checksRequested)
d->completeRehighlightRequired = false;
- QTimer::singleShot( 0, this, SLOT( slotAutoDetection() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() ));
}
void KDictSpellingHighlighter::slotDictionaryChanged()
@@ -526,7 +526,7 @@ void KDictSpellingHighlighter::slotDictionaryChanged()
d->autoDict.clear();
d->spell = new KSpell( 0, i18n( "Incremental Spellcheck" ), this,
- SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig );
+ TQT_SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig );
}
void KDictSpellingHighlighter::slotLocalSpellConfigChanged()
@@ -537,23 +537,23 @@ void KDictSpellingHighlighter::slotLocalSpellConfigChanged()
slotDictionaryChanged();
}
-QString KDictSpellingHighlighter::spellKey()
+TQString KDictSpellingHighlighter::spellKey()
{
KConfig *config = KGlobal::config();
KConfigGroupSaver cs( config, "KSpell" );
config->reparseConfiguration();
- QString key;
- key += QString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 ));
+ TQString key;
+ key += TQString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_RunTogether", 0 ));
+ key += TQString::number( config->readNumEntry( "KSpell_RunTogether", 0 ));
key += '/';
key += config->readEntry( "KSpell_Dictionary", "" );
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_DictFromList", false ));
+ key += TQString::number( config->readNumEntry( "KSpell_DictFromList", false ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
+ key += TQString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
+ key += TQString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
return key;
}
@@ -607,11 +607,11 @@ void KDictSpellingHighlighter::slotKSpellNotResponding()
++retries;
}
-bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
+bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
{
- if (o == textEdit() && (e->type() == QEvent::FocusIn)) {
+ if (o == textEdit() && (e->type() == TQEvent::FocusIn)) {
if ( d->globalConfig ) {
- QString skey = spellKey();
+ TQString skey = spellKey();
if ( d->spell && d->spellKey != skey ) {
d->spellKey = skey;
KDictSpellingHighlighter::dictionaryChanged();
@@ -619,8 +619,8 @@ bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
}
}
- if (o == textEdit() && (e->type() == QEvent::KeyPress)) {
- QKeyEvent *k = static_cast<QKeyEvent *>(e);
+ if (o == textEdit() && (e->type() == TQEvent::KeyPress)) {
+ TQKeyEvent *k = static_cast<TQKeyEvent *>(e);
d->autoReady = true;
if (d->rehighlightRequest->isActive()) // try to stay out of the users way
d->rehighlightRequest->changeInterval( 500 );
@@ -657,12 +657,12 @@ bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
if ( k->key() == Key_Space ||
k->key() == Key_Enter ||
k->key() == Key_Return ) {
- QTimer::singleShot( 0, this, SLOT( slotAutoDetection() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() ));
}
}
else if ( o == textEdit()->viewport() &&
- ( e->type() == QEvent::MouseButtonPress )) {
+ ( e->type() == TQEvent::MouseButtonPress )) {
d->autoReady = true;
if ( intraWordEditing() ) {
setIntraWordEditing( false );
diff --git a/kdeui/ksyntaxhighlighter.h b/kdeui/ksyntaxhighlighter.h
index ea020afa9..3ed561236 100644
--- a/kdeui/ksyntaxhighlighter.h
+++ b/kdeui/ksyntaxhighlighter.h
@@ -24,10 +24,10 @@
#ifndef KSYNTAXHIGHLIGHTER_H
#define KSYNTAXHIGHLIGHTER_H
-#include <qtextedit.h>
-#include <qsyntaxhighlighter.h>
-#include <qcolor.h>
-#include <qstringlist.h>
+#include <tqtextedit.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -46,16 +46,16 @@ public:
PlainTextMode,
RichTextMode
};
- KSyntaxHighlighter( QTextEdit *textEdit,
+ KSyntaxHighlighter( TQTextEdit *textEdit,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ),
SyntaxMode mode = PlainTextMode );
~KSyntaxHighlighter();
- int highlightParagraph( const QString& text, int endStateOfLastPara );
+ int highlightParagraph( const TQString& text, int endStateOfLastPara );
private:
class KSyntaxHighlighterPrivate;
@@ -65,21 +65,21 @@ private:
class KDEUI_EXPORT KSpellingHighlighter : public KSyntaxHighlighter
{
public:
- KSpellingHighlighter( QTextEdit *textEdit,
- const QColor& spellColor = red,
+ KSpellingHighlighter( TQTextEdit *textEdit,
+ const TQColor& spellColor = red,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ) );
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ) );
~KSpellingHighlighter();
- virtual int highlightParagraph( const QString &text,
+ virtual int highlightParagraph( const TQString &text,
int endStateOfLastPara );
- virtual bool isMisspelled( const QString& word ) = 0;
+ virtual bool isMisspelled( const TQString& word ) = 0;
bool intraWordEditing() const;
void setIntraWordEditing( bool editing );
- static QStringList personalWords();
+ static TQStringList personalWords();
private:
void flushCurrentWord();
@@ -91,24 +91,24 @@ private:
/**
* \brief Dictionary sensitive text highlighter
*/
-class KDEUI_EXPORT KDictSpellingHighlighter : public QObject, public KSpellingHighlighter
+class KDEUI_EXPORT KDictSpellingHighlighter : public TQObject, public KSpellingHighlighter
{
Q_OBJECT
public:
- KDictSpellingHighlighter( QTextEdit *textEdit,
+ KDictSpellingHighlighter( TQTextEdit *textEdit,
bool spellCheckingActive = true,
bool autoEnable = true,
- const QColor& spellColor = red,
+ const TQColor& spellColor = red,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x70, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x60, 0x00 ),
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x70, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x60, 0x00 ),
KSpellConfig *spellConfig = 0 );
~KDictSpellingHighlighter();
- virtual bool isMisspelled( const QString &word );
+ virtual bool isMisspelled( const TQString &word );
static void dictionaryChanged();
void restartBackgroundSpellCheck();
@@ -158,17 +158,17 @@ public:
bool automatic() const;
signals:
- void activeChanged(const QString &);
- void newSuggestions(const QString& originalword, const QStringList& suggestions,
+ void activeChanged(const TQString &);
+ void newSuggestions(const TQString& originalword, const TQStringList& suggestions,
unsigned int pos);
protected:
- QString spellKey();
- bool eventFilter(QObject *o, QEvent *e);
+ TQString spellKey();
+ bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
- void slotMisspelling( const QString &originalWord, const QStringList &suggestions, unsigned int pos );
- void slotCorrected( const QString &originalWord, const QString &, unsigned int );
+ void slotMisspelling( const TQString &originalWord, const TQStringList &suggestions, unsigned int pos );
+ void slotCorrected( const TQString &originalWord, const TQString &, unsigned int );
void slotRehighlight();
void slotDictionaryChanged();
void slotSpellReady( KSpell *spell );
diff --git a/kdeui/ksystemtray.cpp b/kdeui/ksystemtray.cpp
index 33d7f3506..5742eb174 100644
--- a/kdeui/ksystemtray.cpp
+++ b/kdeui/ksystemtray.cpp
@@ -37,7 +37,7 @@
#include <kiconloader.h>
#include <kconfig.h>
-#include <qapplication.h>
+#include <tqapplication.h>
class KSystemTrayPrivate
{
@@ -56,8 +56,8 @@ public:
bool on_all_desktops; // valid only when the parent widget was hidden
};
-KSystemTray::KSystemTray( QWidget* parent, const char* name )
- : QLabel( parent, name, WType_TopLevel )
+KSystemTray::KSystemTray( TQWidget* parent, const char* name )
+ : TQLabel( parent, name, WType_TopLevel )
{
#ifdef Q_WS_X11
QXEmbed::initialize();
@@ -75,12 +75,12 @@ KSystemTray::KSystemTray( QWidget* parent, const char* name )
menu = new KPopupMenu( this );
menu->insertTitle( kapp->miniIcon(), kapp->caption() );
move( -1000, -1000 );
- KStdAction::quit(this, SLOT(maybeQuit()), d->actionCollection);
+ KStdAction::quit(this, TQT_SLOT(maybeQuit()), d->actionCollection);
if (parentWidget())
{
new KAction(i18n("Minimize"), KShortcut(),
- this, SLOT( minimizeRestoreAction() ),
+ this, TQT_SLOT( minimizeRestoreAction() ),
d->actionCollection, "minimizeRestore");
#ifdef Q_WS_X11
KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId());
@@ -106,7 +106,7 @@ KSystemTray::~KSystemTray()
}
-void KSystemTray::showEvent( QShowEvent * )
+void KSystemTray::showEvent( TQShowEvent * )
{
if ( !hasQuit ) {
menu->insertSeparator();
@@ -129,9 +129,9 @@ void KSystemTray::showEvent( QShowEvent * )
}
// KDE4 remove
-void KSystemTray::enterEvent( QEvent* e )
+void KSystemTray::enterEvent( TQEvent* e )
{
- QLabel::enterEvent( e );
+ TQLabel::enterEvent( e );
}
KPopupMenu* KSystemTray::contextMenu() const
@@ -140,7 +140,7 @@ KPopupMenu* KSystemTray::contextMenu() const
}
-void KSystemTray::mousePressEvent( QMouseEvent *e )
+void KSystemTray::mousePressEvent( TQMouseEvent *e )
{
if ( !rect().contains( e->pos() ) )
return;
@@ -168,7 +168,7 @@ void KSystemTray::mousePressEvent( QMouseEvent *e )
}
}
-void KSystemTray::mouseReleaseEvent( QMouseEvent * )
+void KSystemTray::mouseReleaseEvent( TQMouseEvent * )
{
}
@@ -190,12 +190,12 @@ void KSystemTray::minimizeRestoreAction()
void KSystemTray::maybeQuit()
{
- QString query = i18n("<qt>Are you sure you want to quit <b>%1</b>?</qt>")
+ TQString query = i18n("<qt>Are you sure you want to quit <b>%1</b>?</qt>")
.arg(kapp->caption());
if (KMessageBox::warningContinueCancel(this, query,
i18n("Confirm Quit From System Tray"),
KStdGuiItem::quit(),
- QString("systemtrayquit%1")
+ TQString("systemtrayquit%1")
.arg(kapp->caption())) !=
KMessageBox::Continue)
{
@@ -237,7 +237,7 @@ void KSystemTray::setInactive()
// (just like taskbar); otherwise hide it
void KSystemTray::activateOrHide()
{
- QWidget *pw = parentWidget();
+ TQWidget *pw = parentWidget();
if ( !pw )
return;
@@ -255,7 +255,7 @@ void KSystemTray::activateOrHide()
else
{
KWinModule module;
- for( QValueList< WId >::ConstIterator it = module.stackingOrder().fromLast();
+ for( TQValueList< WId >::ConstIterator it = module.stackingOrder().fromLast();
it != module.stackingOrder().end() && (*it) != pw->winId();
--it )
{
@@ -283,7 +283,7 @@ void KSystemTray::activateOrHide()
void KSystemTray::minimizeRestore( bool restore )
{
- QWidget* pw = parentWidget();
+ TQWidget* pw = parentWidget();
if( !pw )
return;
#ifdef Q_WS_X11
@@ -310,7 +310,7 @@ KActionCollection* KSystemTray::actionCollection()
return d->actionCollection;
}
-QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
+TQPixmap KSystemTray::loadIcon( const TQString &icon, KInstance *instance )
{
KConfig *appCfg = kapp->config();
KConfigGroupSaver configSaver(appCfg, "System Tray");
@@ -318,22 +318,22 @@ QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
}
-QPixmap KSystemTray::loadSizedIcon( const QString &icon, int iconWidth, KInstance *instance )
+TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance )
{
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
}
-void KSystemTray::setPixmap( const QPixmap& p )
+void KSystemTray::setPixmap( const TQPixmap& p )
{
- QLabel::setPixmap( p );
+ TQLabel::setPixmap( p );
#ifdef Q_WS_X11
- KWin::setIcons( winId(), p, QPixmap());
+ KWin::setIcons( winId(), p, TQPixmap());
#endif
}
-void KSystemTray::setCaption( const QString& s )
+void KSystemTray::setCaption( const TQString& s )
{
- QLabel::setCaption( s );
+ TQLabel::setCaption( s );
}
void KSystemTray::virtual_hook( int, void* )
diff --git a/kdeui/ksystemtray.h b/kdeui/ksystemtray.h
index b0dab69b6..861de3f3b 100644
--- a/kdeui/ksystemtray.h
+++ b/kdeui/ksystemtray.h
@@ -19,7 +19,7 @@
#define KSYSTEMTRAY_H
#include <kglobal.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class KActionCollection;
class KPopupMenu;
@@ -78,7 +78,7 @@ public:
* when the user clicks on the trray window with the left mouse
* button.
**/
- KSystemTray( QWidget* parent = 0, const char* name = 0 );
+ KSystemTray( TQWidget* parent = 0, const char* name = 0 );
/*
Destructor
@@ -101,13 +101,13 @@ public:
/**
* Changes the tray's icon.
*/
- virtual void setPixmap( const QPixmap& icon );
+ virtual void setPixmap( const TQPixmap& icon );
/**
* Changes the tray's text description (which can be seen e.g. in the systray
* configuration dialog). The default value is KAboutData::programName().
*/
- virtual void setCaption( const QString& title );
+ virtual void setCaption( const TQString& title );
/**
* Loads an icon @p icon using the icon loader class of the given instance @p instance.
@@ -117,7 +117,7 @@ public:
*
* @since 3.2
*/
- static QPixmap loadIcon( const QString &icon, KInstance *instance=KGlobal::instance() );
+ static TQPixmap loadIcon( const TQString &icon, KInstance *instance=KGlobal::instance() );
/**
* Loads an icon @p icon using the icon loader class of the given instance @p instance.
@@ -128,7 +128,7 @@ public:
*
* @since 3.5.12
*/
- static QPixmap loadSizedIcon( const QString &icon, int iconWidth, KInstance *instance=KGlobal::instance() );
+ static TQPixmap loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance=KGlobal::instance() );
signals:
/**
@@ -167,7 +167,7 @@ protected:
Feel free to reimplement this if you need something special.
*/
- void mousePressEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
/**
Reimplemented to provide the standard show/raise behavior
@@ -175,7 +175,7 @@ protected:
Feel free to reimplement this if you need something special.
*/
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
@@ -188,12 +188,12 @@ protected:
/**
Reimplemented for internal reasons.
*/
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
/**
Reimplemented for internal reasons.
*/
- void enterEvent( QEvent* );
+ void enterEvent( TQEvent* );
private slots:
void minimizeRestoreAction();
diff --git a/kdeui/ktabbar.cpp b/kdeui/ktabbar.cpp
index fcac5a975..e95eb54ca 100644
--- a/kdeui/ktabbar.cpp
+++ b/kdeui/ktabbar.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
@@ -33,8 +33,8 @@
#include "ktabbar.h"
#include "ktabwidget.h"
-KTabBar::KTabBar( QWidget *parent, const char *name )
- : QTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
+KTabBar::KTabBar( TQWidget *parent, const char *name )
+ : TQTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
mHoverCloseButtonTab( 0 ), mDragSwitchTab( 0 ), mHoverCloseButton( 0 ),
mHoverCloseButtonEnabled( false ), mHoverCloseButtonDelayed( true ),
mTabReorderingEnabled( false ), mTabCloseActivatePrevious( false )
@@ -42,13 +42,13 @@ KTabBar::KTabBar( QWidget *parent, const char *name )
setAcceptDrops( true );
setMouseTracking( true );
- mEnableCloseButtonTimer = new QTimer( this );
- connect( mEnableCloseButtonTimer, SIGNAL( timeout() ), SLOT( enableCloseButton() ) );
+ mEnableCloseButtonTimer = new TQTimer( this );
+ connect( mEnableCloseButtonTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( enableCloseButton() ) );
- mActivateDragSwitchTabTimer = new QTimer( this );
- connect( mActivateDragSwitchTabTimer, SIGNAL( timeout() ), SLOT( activateDragSwitchTab() ) );
+ mActivateDragSwitchTabTimer = new TQTimer( this );
+ connect( mActivateDragSwitchTabTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( activateDragSwitchTab() ) );
- connect(this, SIGNAL(layoutChanged()), SLOT(onLayoutChange()));
+ connect(this, TQT_SIGNAL(layoutChanged()), TQT_SLOT(onLayoutChange()));
}
KTabBar::~KTabBar()
@@ -59,13 +59,13 @@ KTabBar::~KTabBar()
void KTabBar::setTabEnabled( int id, bool enabled )
{
- QTab * t = tab( id );
+ TQTab * t = tab( id );
if ( t ) {
if ( t->isEnabled() != enabled ) {
t->setEnabled( enabled );
- QRect r( t->rect() );
+ TQRect r( t->rect() );
if ( !enabled && id == currentTab() && count()>1 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
if ( mTabCloseActivatePrevious )
t = tablist->at( count()-2 );
else {
@@ -85,46 +85,46 @@ void KTabBar::setTabEnabled( int id, bool enabled )
}
}
-void KTabBar::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseDoubleClick( indexOf( tab->identifier() ) ) );
return;
}
- QTabBar::mouseDoubleClickEvent( e );
+ TQTabBar::mouseDoubleClickEvent( e );
}
-void KTabBar::mousePressEvent( QMouseEvent *e )
+void KTabBar::mousePressEvent( TQMouseEvent *e )
{
if( e->button() == LeftButton ) {
mEnableCloseButtonTimer->stop();
mDragStart = e->pos();
}
else if( e->button() == RightButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) );
return;
}
}
- QTabBar::mousePressEvent( e );
+ TQTabBar::mousePressEvent( e );
}
-void KTabBar::mouseMoveEvent( QMouseEvent *e )
+void KTabBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( e->state() == LeftButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if ( mDragSwitchTab && tab != mDragSwitchTab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
}
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
@@ -137,11 +137,11 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
else if ( e->state() == MidButton ) {
if (mReorderStartTab==-1) {
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab && mTabReorderingEnabled ) {
mReorderStartTab = indexOf( tab->identifier() );
grabMouse( sizeAllCursor );
@@ -150,7 +150,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
else {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
int reorderStopTab = indexOf( tab->identifier() );
if ( mReorderStartTab!=reorderStopTab && mReorderPreviousTab!=reorderStopTab ) {
@@ -164,16 +164,16 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
if ( mHoverCloseButtonEnabled && mReorderStartTab==-1) {
- QTab *t = selectTab( e->pos() );
+ TQTab *t = selectTab( e->pos() );
if( t && t->iconSet() && t->isEnabled() ) {
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
- QRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
+ TQRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
int xoff = 0, yoff = 0;
// The additional offsets were found by try and error, TODO: find the rational behind them
if ( t == tab( currentTab() ) ) {
- xoff = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
- yoff = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this ) - 4;
+ xoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
+ yoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4;
}
else {
xoff = 7;
@@ -190,18 +190,18 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
mHoverCloseButton = 0;
}
- mHoverCloseButton = new QPushButton( this );
+ mHoverCloseButton = new TQPushButton( this );
mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) );
mHoverCloseButton->setGeometry( rect );
- QToolTip::add(mHoverCloseButton,i18n("Close this tab"));
+ TQToolTip::add(mHoverCloseButton,i18n("Close this tab"));
mHoverCloseButton->setFlat(true);
mHoverCloseButton->show();
if ( mHoverCloseButtonDelayed ) {
mHoverCloseButton->setEnabled(false);
- mEnableCloseButtonTimer->start( QApplication::doubleClickInterval(), true );
+ mEnableCloseButtonTimer->start( TQApplication::doubleClickInterval(), true );
}
mHoverCloseButtonTab = t;
- connect( mHoverCloseButton, SIGNAL( clicked() ), SLOT( closeButtonClicked() ) );
+ connect( mHoverCloseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( closeButtonClicked() ) );
return;
}
}
@@ -212,7 +212,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
- QTabBar::mouseMoveEvent( e );
+ TQTabBar::mouseMoveEvent( e );
}
void KTabBar::enableCloseButton()
@@ -222,17 +222,17 @@ void KTabBar::enableCloseButton()
void KTabBar::activateDragSwitchTab()
{
- QTab *tab = selectTab( mapFromGlobal( QCursor::pos() ) );
+ TQTab *tab = selectTab( mapFromGlobal( TQCursor::pos() ) );
if ( tab && mDragSwitchTab == tab )
setCurrentTab( mDragSwitchTab );
mDragSwitchTab = 0;
}
-void KTabBar::mouseReleaseEvent( QMouseEvent *e )
+void KTabBar::mouseReleaseEvent( TQMouseEvent *e )
{
if( e->button() == MidButton ) {
if ( mReorderStartTab==-1 ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseMiddleClick( indexOf( tab->identifier() ) ) );
return;
@@ -245,42 +245,42 @@ void KTabBar::mouseReleaseEvent( QMouseEvent *e )
mReorderPreviousTab=-1;
}
}
- QTabBar::mouseReleaseEvent( e );
+ TQTabBar::mouseReleaseEvent( e );
}
-void KTabBar::dragMoveEvent( QDragMoveEvent *e )
+void KTabBar::dragMoveEvent( TQDragMoveEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
bool accept = false;
// The receivers of the testCanDecode() signal has to adjust
// 'accept' accordingly.
emit testCanDecode( e, accept);
- if ( accept && tab != QTabBar::tab( currentTab() ) ) {
+ if ( accept && tab != TQTabBar::tab( currentTab() ) ) {
mDragSwitchTab = tab;
- mActivateDragSwitchTabTimer->start( QApplication::doubleClickInterval()*2, true );
+ mActivateDragSwitchTabTimer->start( TQApplication::doubleClickInterval()*2, true );
}
e->accept( accept );
return;
}
e->accept( false );
- QTabBar::dragMoveEvent( e );
+ TQTabBar::dragMoveEvent( e );
}
-void KTabBar::dropEvent( QDropEvent *e )
+void KTabBar::dropEvent( TQDropEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
emit( receivedDropEvent( indexOf( tab->identifier() ) , e ) );
return;
}
- QTabBar::dropEvent( e );
+ TQTabBar::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabBar::wheelEvent( QWheelEvent *e )
+void KTabBar::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -289,16 +289,16 @@ void KTabBar::wheelEvent( QWheelEvent *e )
}
#endif
-void KTabBar::setTabColor( int id, const QColor& color )
+void KTabBar::setTabColor( int id, const TQColor& color )
{
- QTab *t = tab( id );
+ TQTab *t = tab( id );
if ( t ) {
mTabColors.insert( id, color );
repaint( t->rect(), false );
}
}
-const QColor &KTabBar::tabColor( int id ) const
+const TQColor &KTabBar::tabColor( int id ) const
{
if ( mTabColors.contains( id ) )
return mTabColors[id];
@@ -306,43 +306,43 @@ const QColor &KTabBar::tabColor( int id ) const
return colorGroup().foreground();
}
-int KTabBar::insertTab( QTab *t, int index )
+int KTabBar::insertTab( TQTab *t, int index )
{
- int res = QTabBar::insertTab( t, index );
+ int res = TQTabBar::insertTab( t, index );
if ( mTabCloseActivatePrevious && count() > 2 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) );
}
return res;
}
-void KTabBar::removeTab( QTab *t )
+void KTabBar::removeTab( TQTab *t )
{
mTabColors.remove( t->identifier() );
- QTabBar::removeTab( t );
+ TQTabBar::removeTab( t );
}
-void KTabBar::paintLabel( QPainter *p, const QRect& br,
- QTab *t, bool has_focus ) const
+void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
+ TQTab *t, bool has_focus ) const
{
- QRect r = br;
+ TQRect r = br;
bool selected = currentTab() == t->identifier();
if ( t->iconSet() ) {
// the tab has an iconset, draw it in the right mode
- QIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
- ? QIconSet::Normal : QIconSet::Disabled;
- if ( mode == QIconSet::Normal && has_focus )
- mode = QIconSet::Active;
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
+ TQIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
+ ? TQIconSet::Normal : TQIconSet::Disabled;
+ if ( mode == TQIconSet::Normal && has_focus )
+ mode = TQIconSet::Active;
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
r.setLeft( r.left() + pixw + 4 );
r.setRight( r.right() + 2 );
- int inactiveXShift = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this );
- int inactiveYShift = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this );
+ int inactiveXShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this );
+ int inactiveYShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this );
int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2;
@@ -351,20 +351,20 @@ void KTabBar::paintLabel( QPainter *p, const QRect& br,
pixmap );
}
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() && t->isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( has_focus )
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
- QColorGroup cg( colorGroup() );
+ TQColorGroup cg( colorGroup() );
if ( mTabColors.contains( t->identifier() ) )
- cg.setColor( QColorGroup::Foreground, mTabColors[t->identifier()] );
+ cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] );
- style().drawControl( QStyle::CE_TabBarLabel, p, this, r,
+ style().drawControl( TQStyle::CE_TabBarLabel, p, this, r,
t->isEnabled() ? cg : palette().disabled(),
- flags, QStyleOption(t) );
+ flags, TQStyleOption(t) );
}
bool KTabBar::isTabReorderingEnabled() const
diff --git a/kdeui/ktabbar.h b/kdeui/ktabbar.h
index 2ea300db6..c8f81169e 100644
--- a/kdeui/ktabbar.h
+++ b/kdeui/ktabbar.h
@@ -21,7 +21,7 @@
#ifndef KTABBAR_H
#define KTABBAR_H
-#include <qtabbar.h>
+#include <tqtabbar.h>
#include <kdelibs_export.h>
@@ -37,16 +37,16 @@ class KDEUI_EXPORT KTabBar: public QTabBar
Q_OBJECT
public:
- KTabBar( QWidget* parent=0, const char* name=0 );
+ KTabBar( TQWidget* parent=0, const char* name=0 );
virtual ~KTabBar();
virtual void setTabEnabled( int, bool );
- const QColor &tabColor( int ) const;
- void setTabColor( int, const QColor& );
+ const TQColor &tabColor( int ) const;
+ void setTabColor( int, const TQColor& );
- virtual int insertTab( QTab *, int index = -1 );
- virtual void removeTab( QTab * );
+ virtual int insertTab( TQTab *, int index = -1 );
+ virtual void removeTab( TQTab * );
void setTabReorderingEnabled( bool enable );
bool isTabReorderingEnabled() const;
@@ -61,12 +61,12 @@ public:
bool tabCloseActivatePrevious() const;
signals:
- void contextMenu( int, const QPoint & );
+ void contextMenu( int, const TQPoint & );
void mouseDoubleClick( int );
void mouseMiddleClick( int );
void initiateDrag( int );
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
- void receivedDropEvent( int, QDropEvent * );
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
+ void receivedDropEvent( int, TQDropEvent * );
void moveTab( int, int );
void closeRequest( int );
#ifndef QT_NO_WHEELEVENT
@@ -74,18 +74,18 @@ signals:
#endif
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void dragMoveEvent( QDragMoveEvent *e );
- virtual void dropEvent( QDropEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
- virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
+ virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const;
protected slots:
virtual void closeButtonClicked();
@@ -94,13 +94,13 @@ protected slots:
virtual void activateDragSwitchTab();
private:
- QPoint mDragStart;
+ TQPoint mDragStart;
int mReorderStartTab;
int mReorderPreviousTab;
- QMap<int, QColor> mTabColors;
- QTab *mHoverCloseButtonTab, *mDragSwitchTab;
- QPushButton *mHoverCloseButton;
- QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
+ TQMap<int, TQColor> mTabColors;
+ TQTab *mHoverCloseButtonTab, *mDragSwitchTab;
+ TQPushButton *mHoverCloseButton;
+ TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
bool mHoverCloseButtonEnabled;
bool mHoverCloseButtonDelayed;
diff --git a/kdeui/ktabctl.cpp b/kdeui/ktabctl.cpp
index 190dc077e..a4b3c8ac8 100644
--- a/kdeui/ktabctl.cpp
+++ b/kdeui/ktabctl.cpp
@@ -21,21 +21,21 @@
* KTabCtl provides a universal tab control. It is in no ways limited to dialogs and
* can be used for whatever you want. It has no buttons or any other stuff.
*
- * However, this is based on the original QTabDialog.
+ * However, this is based on the original TQTabDialog.
*/
-#include <qtabbar.h>
-#include <qpushbutton.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqtabbar.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "ktabctl.h"
-KTabCtl::KTabCtl(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KTabCtl::KTabCtl(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- tabs = new QTabBar(this, "_tabbar");
- connect(tabs, SIGNAL(selected(int)), this, SLOT(showTab(int)));
+ tabs = new TQTabBar(this, "_tabbar");
+ connect(tabs, TQT_SIGNAL(selected(int)), this, TQT_SLOT(showTab(int)));
tabs->move(2, 1);
blBorder = true;
@@ -47,35 +47,35 @@ KTabCtl::~KTabCtl()
delete tabs;
}
-void KTabCtl::resizeEvent(QResizeEvent *)
+void KTabCtl::resizeEvent(TQResizeEvent *)
{
int i;
- QRect r = getChildRect();
+ TQRect r = getChildRect();
if (tabs) {
for (i=0; i<(int)pages.size(); i++) {
pages[i]->setGeometry(r);
}
- if( ( tabs->shape() == QTabBar::RoundedBelow ) ||
- ( tabs->shape() == QTabBar::TriangularBelow ) ) {
+ if( ( tabs->shape() == TQTabBar::RoundedBelow ) ||
+ ( tabs->shape() == TQTabBar::TriangularBelow ) ) {
tabs->move( 0, height()-tabs->height()-4 );
}
}
}
-void KTabCtl::setFont(const QFont & font)
+void KTabCtl::setFont(const TQFont & font)
{
- QFont f(font);
- f.setWeight(QFont::Light);
- QWidget::setFont(f);
+ TQFont f(font);
+ f.setWeight(TQFont::Light);
+ TQWidget::setFont(f);
setSizes();
}
-void KTabCtl::setTabFont(const QFont & font)
+void KTabCtl::setTabFont(const TQFont & font)
{
- QFont f(font);
-// f.setWeight(QFont::Light);
+ TQFont f(font);
+// f.setWeight(TQFont::Light);
tabs->setFont(f);
setSizes();
@@ -93,23 +93,23 @@ void KTabCtl::show()
for(i = 0; i < pages.size(); i++)
pages[i]->hide();
- QResizeEvent r(size(), size());
+ TQResizeEvent r(size(), size());
resizeEvent(&r);
- QWidget::show();
+ TQWidget::show();
}
-bool KTabCtl::isTabEnabled(const QString& name)
+bool KTabCtl::isTabEnabled(const TQString& name)
{
unsigned int i;
for(i = 0; i < pages.size(); i++)
- if (QString::fromLatin1(pages[i]->name()) == name)
+ if (TQString::fromLatin1(pages[i]->name()) == name)
return tabs->isTabEnabled(i); /* return the enabled status */
return false; /* tab does not exist */
}
-void KTabCtl::setTabEnabled(const QString& name, bool state)
+void KTabCtl::setTabEnabled(const TQString& name, bool state)
{
unsigned i;
@@ -117,7 +117,7 @@ void KTabCtl::setTabEnabled(const QString& name, bool state)
return;
for (i = 0; i < pages.size(); i++)
- if (QString::fromLatin1(pages[i]->name()) == name)
+ if (TQString::fromLatin1(pages[i]->name()) == name)
tabs->setTabEnabled(i, state);
}
@@ -125,11 +125,11 @@ void KTabCtl::setSizes()
{
unsigned i;
- QSize min(tabs->sizeHint()); /* the minimum required size for the tabbar */
+ TQSize min(tabs->sizeHint()); /* the minimum required size for the tabbar */
tabs->resize(min); /* make sure that the tabbar does not require more space than actually needed. */
- QSize max(QCOORD_MAX,QCOORD_MAX);
+ TQSize max(QCOORD_MAX,QCOORD_MAX);
//int th = min.height(); /* the height of the tabbar itself (without pages and stuff) */
for (i = 0; i < pages.size(); i++) {
@@ -174,7 +174,7 @@ void KTabCtl::setSizes()
*/
if(isVisible()) {
- QResizeEvent r(size(), size());
+ TQResizeEvent r(size(), size());
resizeEvent(&r);
}
}
@@ -184,7 +184,7 @@ void KTabCtl::setBorder( bool state )
blBorder = state;
}
-void KTabCtl::setShape( QTabBar::Shape shape )
+void KTabCtl::setShape( TQTabBar::Shape shape )
{
tabs->setShape( shape );
}
@@ -193,13 +193,13 @@ QSize
KTabCtl::sizeHint() const
{
/* desired size of the tabbar */
- QSize hint(tabs->sizeHint());
+ TQSize hint(tabs->sizeHint());
/* overall desired size of all pages */
- QSize pageHint;
+ TQSize pageHint;
for (unsigned int i = 0; i < pages.size(); i++)
{
- QSize sizeI(pages[i]->sizeHint());
+ TQSize sizeI(pages[i]->sizeHint());
if (sizeI.isValid())
{
@@ -225,7 +225,7 @@ KTabCtl::sizeHint() const
I cannot get the size to be correct unless the total
border size is included: ie 2*2 pixels.
*/
- return (hint + QSize(4,4));
+ return (hint + TQSize(4,4));
}
/*
@@ -235,7 +235,7 @@ KTabCtl::sizeHint() const
return (pageHint);
}
-void KTabCtl::paintEvent(QPaintEvent *)
+void KTabCtl::paintEvent(TQPaintEvent *)
{
if (!tabs)
return;
@@ -243,7 +243,7 @@ void KTabCtl::paintEvent(QPaintEvent *)
if( !blBorder )
return;
- QPainter p;
+ TQPainter p;
p.begin(this);
int y0 = getChildRect().top() - 1;
@@ -271,14 +271,14 @@ void KTabCtl::paintEvent(QPaintEvent *)
* widget (page).
*/
-QRect KTabCtl::getChildRect() const
+TQRect KTabCtl::getChildRect() const
{
- if( ( tabs->shape() == QTabBar::RoundedBelow ) ||
- ( tabs->shape() == QTabBar::TriangularBelow ) ) {
- return QRect(2, 1, width() - 4,
+ if( ( tabs->shape() == TQTabBar::RoundedBelow ) ||
+ ( tabs->shape() == TQTabBar::TriangularBelow ) ) {
+ return TQRect(2, 1, width() - 4,
height() - tabs->height() - 4);
} else {
- return QRect(2, tabs->height() + 1, width() - 4,
+ return TQRect(2, tabs->height() + 1, width() - 4,
height() - tabs->height() - 4);
}
}
@@ -310,15 +310,15 @@ void KTabCtl::showTab(int i)
/*
* add a tab to the control. This tab will manage the given Widget w.
- * in most cases, w will be a QWidget and will only act as parent for the
+ * in most cases, w will be a TQWidget and will only act as parent for the
* actual widgets on this page
- * NOTE: w is not required to be of class QWidget, but expect strange results with
+ * NOTE: w is not required to be of class TQWidget, but expect strange results with
* other types of widgets
*/
-void KTabCtl::addTab(QWidget *w, const QString& name)
+void KTabCtl::addTab(TQWidget *w, const TQString& name)
{
- QTab *t = new QTab();
+ TQTab *t = new TQTab();
t->setText( name );
t->setEnabled( true );
int id = tabs->addTab(t); /* add the tab itself to the tabbar */
diff --git a/kdeui/ktabctl.h b/kdeui/ktabctl.h
index c8cb3cf1b..9c390351f 100644
--- a/kdeui/ktabctl.h
+++ b/kdeui/ktabctl.h
@@ -23,17 +23,17 @@
#ifndef KTABCTL_H
#define KTABCTL_H
-#include <qwidget.h>
-#include <qtabbar.h>
-#include <qmemarray.h>
+#include <tqwidget.h>
+#include <tqtabbar.h>
+#include <tqmemarray.h>
#include <kdelibs_export.h>
/**
* Tabbed dialog with extended features.
- * KTabCtl is very similar to QTabDialog, with the following differences:
+ * KTabCtl is very similar to TQTabDialog, with the following differences:
*
- * @li To avoid confusion, the API is almost identical with QTabDialog.
+ * @li To avoid confusion, the API is almost identical with TQTabDialog.
* @li Does not create any buttons, therefore KTabCtl is not limited
* to dialog boxes. You can use it whereever you want.
* @li emits the signal tabSelected(int pagenumber) when the user
@@ -50,23 +50,23 @@ class KDEUI_EXPORT KTabCtl : public QWidget
Q_OBJECT
public:
- KTabCtl(QWidget *parent = 0, const char *name = 0);
+ KTabCtl(TQWidget *parent = 0, const char *name = 0);
~KTabCtl();
void show();
- void setFont(const QFont & font);
- void setTabFont( const QFont &font );
+ void setFont(const TQFont & font);
+ void setTabFont( const TQFont &font );
- void addTab(QWidget *, const QString&);
- bool isTabEnabled(const QString& );
- void setTabEnabled(const QString&, bool);
+ void addTab(TQWidget *, const TQString&);
+ bool isTabEnabled(const TQString& );
+ void setTabEnabled(const TQString&, bool);
void setBorder(bool);
- void setShape( QTabBar::Shape shape );
- virtual QSize sizeHint() const;
+ void setShape( TQTabBar::Shape shape );
+ virtual TQSize sizeHint() const;
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
signals:
void tabSelected(int);
@@ -76,10 +76,10 @@ protected slots:
protected:
void setSizes();
- QRect getChildRect() const;
+ TQRect getChildRect() const;
- QTabBar * tabs;
- QMemArray<QWidget *> pages;
+ TQTabBar * tabs;
+ TQMemArray<TQWidget *> pages;
int bh;
bool blBorder;
protected:
diff --git a/kdeui/ktabwidget.cpp b/kdeui/ktabwidget.cpp
index a012ea96e..5a431ecd2 100644
--- a/kdeui/ktabwidget.cpp
+++ b/kdeui/ktabwidget.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qstyle.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
+#include <tqstylesheet.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -38,7 +38,7 @@ public:
//holds the full names of the tab, otherwise all we
//know about is the shortened name
- QStringList m_tabNames;
+ TQStringList m_tabNames;
KTabWidgetPrivate() {
m_automaticResizeTabs = false;
@@ -49,8 +49,8 @@ public:
}
};
-KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
- : QTabWidget( parent, name, f )
+KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQTabWidget( parent, name, f )
{
d = new KTabWidgetPrivate;
setTabBar( new KTabBar(this, "tabbar") );
@@ -58,16 +58,16 @@ KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
setHoverCloseButtonDelayed(false);
- connect(tabBar(), SIGNAL(contextMenu( int, const QPoint & )), SLOT(contextMenu( int, const QPoint & )));
- connect(tabBar(), SIGNAL(mouseDoubleClick( int )), SLOT(mouseDoubleClick( int )));
- connect(tabBar(), SIGNAL(mouseMiddleClick( int )), SLOT(mouseMiddleClick( int )));
- connect(tabBar(), SIGNAL(initiateDrag( int )), SLOT(initiateDrag( int )));
- connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )));
- connect(tabBar(), SIGNAL(receivedDropEvent( int, QDropEvent * )), SLOT(receivedDropEvent( int, QDropEvent * )));
- connect(tabBar(), SIGNAL(moveTab( int, int )), SLOT(moveTab( int, int )));
- connect(tabBar(), SIGNAL(closeRequest( int )), SLOT(closeRequest( int )));
+ connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & )));
+ connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int )));
+ connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * )));
+ connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int )));
+ connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int )));
#ifndef QT_NO_WHEELEVENT
- connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int )));
+ connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int )));
#endif
}
@@ -76,19 +76,19 @@ KTabWidget::~KTabWidget()
delete d;
}
-void KTabWidget::insertTab( QWidget *child, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQString &label, int index )
{
- QTabWidget::insertTab( child, label, index );
+ TQTabWidget::insertTab( child, label, index );
}
-void KTabWidget::insertTab( QWidget *child, const QIconSet& iconset, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index )
{
- QTabWidget::insertTab( child, iconset, label, index );
+ TQTabWidget::insertTab( child, iconset, label, index );
}
-void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
+void KTabWidget::insertTab( TQWidget *child, TQTab *tab, int index )
{
- QTabWidget::insertTab( child, tab, index);
+ TQTabWidget::insertTab( child, tab, index);
if ( d->m_automaticResizeTabs ) {
if ( index < 0 || index >= count() ) {
d->m_tabNames.append( tab->text() );
@@ -103,8 +103,8 @@ void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
void KTabWidget::setTabBarHidden( bool hide )
{
- QWidget *rightcorner = this->cornerWidget( TopRight );
- QWidget *leftcorner = this->cornerWidget( TopLeft );
+ TQWidget *rightcorner = this->cornerWidget( TopRight );
+ TQWidget *leftcorner = this->cornerWidget( TopLeft );
if ( hide ) {
if ( leftcorner ) leftcorner->hide();
@@ -122,21 +122,21 @@ bool KTabWidget::isTabBarHidden() const
return !( tabBar()->isVisible() );
}
-void KTabWidget::setTabColor( QWidget *w, const QColor& color )
+void KTabWidget::setTabColor( TQWidget *w, const TQColor& color )
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
static_cast<KTabBar*>(tabBar())->setTabColor( t->identifier(), color );
}
}
-QColor KTabWidget::tabColor( QWidget *w ) const
+TQColor KTabWidget::tabColor( TQWidget *w ) const
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
return static_cast<KTabBar*>(tabBar())->tabColor( t->identifier() );
} else {
- return QColor();
+ return TQColor();
}
}
@@ -163,30 +163,30 @@ bool KTabWidget::tabCloseActivatePrevious() const
unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
{
int hframe, overlap;
- hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, tabBar() );
- overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, tabBar() );
+ hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
+ overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
- QFontMetrics fm = tabBar()->fontMetrics();
+ TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0;
for( int i=0; i < count(); ++i ) {
- QString newTitle = d->m_tabNames[ i ];
+ TQString newTitle = d->m_tabNames[ i ];
newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustify( d->m_minLength, ' ' );
- QTab* tab = tabBar()->tabAt( i );
+ TQTab* tab = tabBar()->tabAt( i );
int lw = fm.width( newTitle );
int iw = 0;
if ( tab->iconSet() )
- iw = tab->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this,
- QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ),
- QStyleOption( tab ) ) ).width();
+ iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this,
+ TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
+ TQStyleOption( tab ) ) ).width();
}
return x;
}
-void KTabWidget::changeTab( QWidget *w, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQString &label )
{
- QTabWidget::changeTab( w, label );
+ TQTabWidget::changeTab( w, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -196,9 +196,9 @@ void KTabWidget::changeTab( QWidget *w, const QString &label )
}
}
-void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQIconSet &iconset, const TQString &label )
{
- QTabWidget::changeTab( w, iconset, label );
+ TQTabWidget::changeTab( w, iconset, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -208,34 +208,34 @@ void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &
}
}
-QString KTabWidget::label( int index ) const
+TQString KTabWidget::label( int index ) const
{
if ( d->m_automaticResizeTabs ) {
if ( index >= 0 && index < count() )
return d->m_tabNames[ index ];
else
- return QString::null;
+ return TQString::null;
}
else
- return QTabWidget::label( index );
+ return TQTabWidget::label( index );
}
-QString KTabWidget::tabLabel( QWidget * w ) const
+TQString KTabWidget::tabLabel( TQWidget * w ) const
{
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index == -1 )
- return QString::null;
+ return TQString::null;
else
return d->m_tabNames[ index ];
}
else
- return QTabWidget::tabLabel( w );
+ return TQTabWidget::tabLabel( w );
}
-void KTabWidget::setTabLabel( QWidget *w, const QString &l )
+void KTabWidget::setTabLabel( TQWidget *w, const TQString &l )
{
- QTabWidget::setTabLabel( w, l );
+ TQTabWidget::setTabLabel( w, l );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -281,11 +281,11 @@ void KTabWidget::resizeTabs( int changeTabIndex )
void KTabWidget::updateTab( int index )
{
- QString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : QTabWidget::label( index );
+ TQString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : TQTabWidget::label( index );
removeTabToolTip( page( index ) );
if ( title.length() > d->m_CurrentMaxLength ) {
- if ( QStyleSheet::mightBeRichText( title ) )
- setTabToolTip( page( index ), QStyleSheet::escape(title) );
+ if ( TQStyleSheet::mightBeRichText( title ) )
+ setTabToolTip( page( index ), TQStyleSheet::escape(title) );
else
setTabToolTip( page( index ), title );
}
@@ -293,11 +293,11 @@ void KTabWidget::updateTab( int index )
title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' );
title.replace( '&', "&&" );
- if ( QTabWidget::label( index ) != title )
- QTabWidget::setTabLabel( page( index ), title );
+ if ( TQTabWidget::label( index ) != title )
+ TQTabWidget::setTabLabel( page( index ), title );
}
-void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
+void KTabWidget::dragMoveEvent( TQDragMoveEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
bool accept = false;
@@ -308,20 +308,20 @@ void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
return;
}
e->accept( false );
- QTabWidget::dragMoveEvent( e );
+ TQTabWidget::dragMoveEvent( e );
}
-void KTabWidget::dropEvent( QDropEvent *e )
+void KTabWidget::dropEvent( TQDropEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit ( receivedDropEvent( e ) );
return;
}
- QTabWidget::dropEvent( e );
+ TQTabWidget::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabWidget::wheelEvent( QWheelEvent *e )
+void KTabWidget::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -349,7 +349,7 @@ void KTabWidget::wheelDelta( int delta )
}
#endif
-void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
@@ -358,10 +358,10 @@ void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
emit( mouseDoubleClick() );
return;
}
- QTabWidget::mouseDoubleClickEvent( e );
+ TQTabWidget::mouseDoubleClickEvent( e );
}
-void KTabWidget::mousePressEvent( QMouseEvent *e )
+void KTabWidget::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
@@ -374,10 +374,10 @@ void KTabWidget::mousePressEvent( QMouseEvent *e )
return;
}
}
- QTabWidget::mousePressEvent( e );
+ TQTabWidget::mousePressEvent( e );
}
-void KTabWidget::receivedDropEvent( int index, QDropEvent *e )
+void KTabWidget::receivedDropEvent( int index, TQDropEvent *e )
{
emit( receivedDropEvent( page( index ), e ) );
}
@@ -387,7 +387,7 @@ void KTabWidget::initiateDrag( int index )
emit( initiateDrag( page( index ) ) );
}
-void KTabWidget::contextMenu( int index, const QPoint &p )
+void KTabWidget::contextMenu( int index, const TQPoint &p )
{
emit( contextMenu( page( index ), p ) );
}
@@ -404,25 +404,25 @@ void KTabWidget::mouseMiddleClick( int index )
void KTabWidget::moveTab( int from, int to )
{
- QString tablabel = label( from );
- QWidget *w = page( from );
- QColor color = tabColor( w );
- QIconSet tabiconset = tabIconSet( w );
- QString tabtooltip = tabToolTip( w );
+ TQString tablabel = label( from );
+ TQWidget *w = page( from );
+ TQColor color = tabColor( w );
+ TQIconSet tabiconset = tabIconSet( w );
+ TQString tabtooltip = tabToolTip( w );
bool current = ( w == currentPage() );
bool enabled = isTabEnabled( w );
blockSignals(true);
removePage( w );
// Work-around kmdi brain damage which calls showPage() in insertTab()
- QTab * t = new QTab();
+ TQTab * t = new TQTab();
t->setText(tablabel);
- QTabWidget::insertTab( w, t, to );
+ TQTabWidget::insertTab( w, t, to );
if ( d->m_automaticResizeTabs ) {
if ( to < 0 || to >= count() )
- d->m_tabNames.append( QString::null );
+ d->m_tabNames.append( TQString::null );
else
- d->m_tabNames.insert( d->m_tabNames.at( to ), QString::null );
+ d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null );
}
w = page( to );
@@ -437,33 +437,33 @@ void KTabWidget::moveTab( int from, int to )
emit ( movedTab( from, to ) );
}
-void KTabWidget::removePage( QWidget * w ) {
+void KTabWidget::removePage( TQWidget * w ) {
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 )
d->m_tabNames.remove( d->m_tabNames.at( index ) );
}
- QTabWidget::removePage( w );
+ TQTabWidget::removePage( w );
if ( d->m_automaticResizeTabs )
resizeTabs();
}
-bool KTabWidget::isEmptyTabbarSpace( const QPoint &point ) const
+bool KTabWidget::isEmptyTabbarSpace( const TQPoint &point ) const
{
- QSize size( tabBar()->sizeHint() );
+ TQSize size( tabBar()->sizeHint() );
if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) {
- QWidget *rightcorner = cornerWidget( TopRight );
+ TQWidget *rightcorner = cornerWidget( TopRight );
if ( rightcorner ) {
if ( point.x()>=width()-rightcorner->width() )
return false;
}
- QWidget *leftcorner = cornerWidget( TopLeft );
+ TQWidget *leftcorner = cornerWidget( TopLeft );
if ( leftcorner ) {
if ( point.x()<=leftcorner->width() )
return false;
}
- QTab *tab = tabBar()->selectTab( tabBar()->mapFromParent( point ) );
+ TQTab *tab = tabBar()->selectTab( tabBar()->mapFromParent( point ) );
if( !tab )
return true;
}
@@ -517,9 +517,9 @@ void KTabWidget::closeRequest( int index )
emit( closeRequest( page( index ) ) );
}
-void KTabWidget::resizeEvent( QResizeEvent *e )
+void KTabWidget::resizeEvent( TQResizeEvent *e )
{
- QTabWidget::resizeEvent( e );
+ TQTabWidget::resizeEvent( e );
resizeTabs();
}
diff --git a/kdeui/ktabwidget.h b/kdeui/ktabwidget.h
index 971c4af1d..2ce850744 100644
--- a/kdeui/ktabwidget.h
+++ b/kdeui/ktabwidget.h
@@ -21,8 +21,8 @@
#ifndef KTABWIDGET_H
#define KTABWIDGET_H
-#include <qtabwidget.h>
-#include <qstringlist.h>
+#include <tqtabwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget
Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
public:
- KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destructor.
*/
@@ -51,11 +51,11 @@ public:
/*!
Set the tab of the given widget to \a color.
*/
- void setTabColor( QWidget *, const QColor& color );
+ void setTabColor( TQWidget *, const TQColor& color );
/*!
Returns the tab color for the given widget.
*/
- QColor tabColor( QWidget * ) const;
+ TQColor tabColor( TQWidget * ) const;
/*!
Returns true if tab ordering with the middle mouse button
@@ -105,42 +105,42 @@ public:
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, const QString &, int index = -1 );
+ virtual void insertTab( TQWidget *, const TQString &, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *child, const QIconSet& iconset,
- const QString &label, int index = -1 );
+ virtual void insertTab( TQWidget *child, const TQIconSet& iconset,
+ const TQString &label, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, QTab *, int index = -1 );
+ virtual void insertTab( TQWidget *, TQTab *, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *, const QString & );
+ void changeTab( TQWidget *, const TQString & );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *child, const QIconSet& iconset, const QString &label );
+ void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label );
/*!
Reimplemented for internal reasons.
*/
- QString label( int ) const;
+ TQString label( int ) const;
/*!
Reimplemented for internal reasons.
*/
- QString tabLabel( QWidget * ) const;
+ TQString tabLabel( TQWidget * ) const;
/*!
Reimplemented for internal reasons.
*/
- void setTabLabel( QWidget *, const QString & );
+ void setTabLabel( TQWidget *, const TQString & );
public slots:
/*!
@@ -153,13 +153,13 @@ public slots:
Removes the widget, reimplemented for
internal reasons (keeping labels in sync).
*/
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
/*!
If \a enable is true, tab reordering with middle button will be enabled.
Note that once enabled you shouldn't rely on previously queried
- currentPageIndex() or indexOf( QWidget * ) values anymore.
+ currentPageIndex() or indexOf( TQWidget * ) values anymore.
You can connect to signal movedTab(int, int) which will notify
you from which index to which index a tab has been moved.
@@ -168,7 +168,7 @@ public slots:
/*!
If \a enable is true, a close button will be shown on mouse hover
- over tab icons which will emit signal closeRequest( QWidget * )
+ over tab icons which will emit signal closeRequest( TQWidget * )
when pressed.
*/
void setHoverCloseButton( bool enable );
@@ -189,7 +189,7 @@ public slots:
/*!
If \a enable is true, tabs will be resized to the width of the tab bar.
- Does not work reliable with "QTabWidget* foo=new KTabWidget()" and if
+ Does not work reliable with "TQTabWidget* foo=new KTabWidget()" and if
you change tabs via the tabbar or by accessing tabs directly.
@since 3.4
*/
@@ -199,34 +199,34 @@ signals:
/*!
Connect to this and set accept to true if you can and want to decode the event.
*/
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
/*!
Received an event in the empty space beside tabbar. Usually creates a new tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QDropEvent * );
+ void receivedDropEvent( TQDropEvent * );
/*!
Received an drop event on given widget's tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QWidget *, QDropEvent * );
+ void receivedDropEvent( TQWidget *, TQDropEvent * );
/*!
Request to start a drag operation on the given tab.
*/
- void initiateDrag( QWidget * );
+ void initiateDrag( TQWidget * );
/*!
The right mouse button was pressed over empty space besides tabbar.
*/
- void contextMenu( const QPoint & );
+ void contextMenu( const TQPoint & );
/*!
The right mouse button was pressed over a widget.
*/
- void contextMenu( QWidget *, const QPoint & );
+ void contextMenu( TQWidget *, const TQPoint & );
/*!
A tab was moved from first to second index. This signal is only
@@ -243,7 +243,7 @@ signals:
/*!
A double left mouse button click was performed over the widget.
*/
- void mouseDoubleClick( QWidget * );
+ void mouseDoubleClick( TQWidget * );
/*!
A middle mouse button click was performed over empty space besides tabbar.
@@ -253,29 +253,29 @@ signals:
/*!
A middle mouse button click was performed over the widget.
*/
- void mouseMiddleClick( QWidget * );
+ void mouseMiddleClick( TQWidget * );
/*!
The close button of a widget's tab was clicked. This signal is
only possible after you have called setHoverCloseButton( true ).
*/
- void closeRequest( QWidget * );
+ void closeRequest( TQWidget * );
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dropEvent( QDropEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void dragMoveEvent( TQDragMoveEvent * );
+ virtual void dropEvent( TQDropEvent * );
unsigned int tabBarWidthForMaxChars( uint maxLength );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
protected slots:
- virtual void receivedDropEvent( int, QDropEvent * );
+ virtual void receivedDropEvent( int, TQDropEvent * );
virtual void initiateDrag( int );
- virtual void contextMenu( int, const QPoint & );
+ virtual void contextMenu( int, const TQPoint & );
virtual void mouseDoubleClick( int );
virtual void mouseMiddleClick( int );
virtual void closeRequest( int );
@@ -284,7 +284,7 @@ protected slots:
#endif
private:
- bool isEmptyTabbarSpace( const QPoint & ) const;
+ bool isEmptyTabbarSpace( const TQPoint & ) const;
void resizeTabs( int changedTabIndex = -1 );
void updateTab( int index );
diff --git a/kdeui/ktextbrowser.cpp b/kdeui/ktextbrowser.cpp
index 4abc268d2..6b3685a81 100644
--- a/kdeui/ktextbrowser.cpp
+++ b/kdeui/ktextbrowser.cpp
@@ -18,7 +18,7 @@
*/
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kglobalsettings.h>
#include <ktextbrowser.h>
@@ -26,14 +26,14 @@
#include <kurl.h>
#include <kiconloader.h>
-KTextBrowser::KTextBrowser( QWidget *parent, const char *name,
+KTextBrowser::KTextBrowser( TQWidget *parent, const char *name,
bool notifyClick )
- : QTextBrowser( parent, name ), mNotifyClick(notifyClick)
+ : TQTextBrowser( parent, name ), mNotifyClick(notifyClick)
{
//
//1999-10-04 Espen Sand: Not required anymore ?
- //connect( this, SIGNAL(highlighted(const QString &)),
- // this, SLOT(refChanged(const QString &)));
+ //connect( this, TQT_SIGNAL(highlighted(const TQString &)),
+ // this, TQT_SLOT(refChanged(const TQString &)));
}
KTextBrowser::~KTextBrowser( void )
@@ -53,7 +53,7 @@ bool KTextBrowser::isNotifyClick() const
}
-void KTextBrowser::setSource( const QString& name )
+void KTextBrowser::setSource( const TQString& name )
{
if( name.isNull() )
{
@@ -68,7 +68,7 @@ void KTextBrowser::setSource( const QString& name )
}
else
{
- emit mailClick( QString::null, name );
+ emit mailClick( TQString::null, name );
}
}
else
@@ -85,7 +85,7 @@ void KTextBrowser::setSource( const QString& name )
}
-void KTextBrowser::keyPressEvent(QKeyEvent *e)
+void KTextBrowser::keyPressEvent(TQKeyEvent *e)
{
if( e->key() == Key_Escape )
{
@@ -97,32 +97,32 @@ void KTextBrowser::keyPressEvent(QKeyEvent *e)
}
else
{
- QTextBrowser::keyPressEvent(e);
+ TQTextBrowser::keyPressEvent(e);
}
}
-void KTextBrowser::viewportMouseMoveEvent( QMouseEvent* e)
+void KTextBrowser::viewportMouseMoveEvent( TQMouseEvent* e)
{
// do this first so we get the right type of cursor
- QTextBrowser::viewportMouseMoveEvent(e);
+ TQTextBrowser::viewportMouseMoveEvent(e);
if ( viewport()->cursor().shape() == PointingHandCursor )
viewport()->setCursor( KCursor::handCursor() );
}
-void KTextBrowser::contentsWheelEvent( QWheelEvent *e )
+void KTextBrowser::contentsWheelEvent( TQWheelEvent *e )
{
if ( KGlobalSettings::wheelMouseZooms() )
- QTextBrowser::contentsWheelEvent( e );
+ TQTextBrowser::contentsWheelEvent( e );
else // thanks, we don't want to zoom, so skip QTextEdit's impl.
- QScrollView::contentsWheelEvent( e );
+ TQScrollView::contentsWheelEvent( e );
}
-QPopupMenu *KTextBrowser::createPopupMenu( const QPoint & pos )
+TQPopupMenu *KTextBrowser::createPopupMenu( const TQPoint & pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *popup = QTextBrowser::createPopupMenu( pos );
+ TQPopupMenu *popup = TQTextBrowser::createPopupMenu( pos );
if ( isReadOnly() )
popup->changeItem( popup->idAt(0), SmallIconSet("editcopy"), popup->text( popup->idAt(0) ) );
diff --git a/kdeui/ktextbrowser.h b/kdeui/ktextbrowser.h
index 68fa7f18e..fd20d9cef 100644
--- a/kdeui/ktextbrowser.h
+++ b/kdeui/ktextbrowser.h
@@ -20,14 +20,14 @@
#ifndef _KTEXT_BROWSER_H_
#define _KTEXT_BROWSER_H_
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <kdelibs_export.h>
/**
- * @short Extended QTextBrowser.
+ * @short Extended TQTextBrowser.
*
- * An extended QTextBrowser.
+ * An extended TQTextBrowser.
*
* By default it will
* invoke the system mailer or the system browser when a link is
@@ -52,7 +52,7 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
* @param name Widget name.
* @param notifyClick @p true causes signals to be emitted.
*/
- KTextBrowser( QWidget *parent=0, const char *name=0,
+ KTextBrowser( TQWidget *parent=0, const char *name=0,
bool notifyClick=false );
/**
@@ -78,39 +78,39 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
Reimplemented to NOT set the source but to do the special handling.
Do not call.
*/
- void setSource(const QString& name);
+ void setSource(const TQString& name);
/**
* Makes sure Key_Escape is ignored
*/
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
/**
* Make sure we use our own hand cursor
*/
- virtual void viewportMouseMoveEvent( QMouseEvent* e);
+ virtual void viewportMouseMoveEvent( TQMouseEvent* e);
/**
* Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll)
*/
- virtual void contentsWheelEvent( QWheelEvent *e );
+ virtual void contentsWheelEvent( TQWheelEvent *e );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::createPopupMenu().
+ * See TQLineEdit::createPopupMenu().
*/
- virtual QPopupMenu *createPopupMenu( const QPoint &pos );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos );
signals:
/**
* Emitted when a mail link has been activated and the widget has
* been configured to emit the signal.
*
- * @param name The destination name. It is QString::null at the moment.
+ * @param name The destination name. It is TQString::null at the moment.
* @param address The destination address.
*/
- void mailClick( const QString &name, const QString &address );
+ void mailClick( const TQString &name, const TQString &address );
/**
* Emitted if mailClick() is not emitted and the widget has been
@@ -118,7 +118,7 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
*
* @param url The destination address.
*/
- void urlClick( const QString &url );
+ void urlClick( const TQString &url );
private:
bool mNotifyClick;
diff --git a/kdeui/ktextedit.cpp b/kdeui/ktextedit.cpp
index a368a56d0..0951fe066 100644
--- a/kdeui/ktextedit.cpp
+++ b/kdeui/ktextedit.cpp
@@ -19,9 +19,9 @@
#include "ktextedit.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
#include <ksyntaxhighlighter.h>
#include <kspell.h>
@@ -51,16 +51,16 @@ public:
KSpell *spell;
};
-KTextEdit::KTextEdit( const QString& text, const QString& context,
- QWidget *parent, const char *name )
- : QTextEdit ( text, context, parent, name )
+KTextEdit::KTextEdit( const TQString& text, const TQString& context,
+ TQWidget *parent, const char *name )
+ : TQTextEdit ( text, context, parent, name )
{
d = new KTextEditPrivate();
KCursor::setAutoHideCursor( this, true, false );
}
-KTextEdit::KTextEdit( QWidget *parent, const char *name )
- : QTextEdit ( parent, name )
+KTextEdit::KTextEdit( TQWidget *parent, const char *name )
+ : TQTextEdit ( parent, name )
{
d = new KTextEditPrivate();
KCursor::setAutoHideCursor( this, true, false );
@@ -71,7 +71,7 @@ KTextEdit::~KTextEdit()
delete d;
}
-void KTextEdit::keyPressEvent( QKeyEvent *e )
+void KTextEdit::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
@@ -172,7 +172,7 @@ void KTextEdit::keyPressEvent( QKeyEvent *e )
}
else if ( KStdAccel::pasteSelection().contains( key ) )
{
- QString text = QApplication::clipboard()->text( QClipboard::Selection);
+ TQString text = TQApplication::clipboard()->text( QClipboard::Selection);
if ( !text.isEmpty() )
insert( text );
e->accept();
@@ -188,7 +188,7 @@ void KTextEdit::keyPressEvent( QKeyEvent *e )
return;
}
- QTextEdit::keyPressEvent( e );
+ TQTextEdit::keyPressEvent( e );
}
void KTextEdit::deleteWordBack()
@@ -210,11 +210,11 @@ void KTextEdit::slotAllowTab()
setTabChangesFocus(!tabChangesFocus());
}
-QPopupMenu *KTextEdit::createPopupMenu( const QPoint &pos )
+TQPopupMenu *KTextEdit::createPopupMenu( const TQPoint &pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *menu = QTextEdit::createPopupMenu( pos );
+ TQPopupMenu *menu = TQTextEdit::createPopupMenu( pos );
if ( isReadOnly() )
menu->changeItem( menu->idAt(0), SmallIconSet("editcopy"), menu->text( menu->idAt(0) ) );
@@ -229,38 +229,38 @@ QPopupMenu *KTextEdit::createPopupMenu( const QPoint &pos )
menu->insertSeparator();
id = menu->insertItem( SmallIconSet( "spellcheck" ), i18n( "Check Spelling..." ),
- this, SLOT( checkSpelling() ) );
+ this, TQT_SLOT( checkSpelling() ) );
if( text().isEmpty() )
menu->setItemEnabled( id, false );
id = menu->insertItem( i18n( "Auto Spell Check" ),
- this, SLOT( toggleAutoSpellCheck() ) );
+ this, TQT_SLOT( toggleAutoSpellCheck() ) );
menu->setItemChecked(id, d->checkSpellingEnabled);
menu->insertSeparator();
- id=menu->insertItem(i18n("Allow Tabulations"),this,SLOT(slotAllowTab()));
+ id=menu->insertItem(i18n("Allow Tabulations"),this,TQT_SLOT(slotAllowTab()));
menu->setItemChecked(id, !tabChangesFocus());
}
return menu;
}
-QPopupMenu *KTextEdit::createPopupMenu()
+TQPopupMenu *KTextEdit::createPopupMenu()
{
- return QTextEdit::createPopupMenu();
+ return TQTextEdit::createPopupMenu();
}
-void KTextEdit::contentsWheelEvent( QWheelEvent *e )
+void KTextEdit::contentsWheelEvent( TQWheelEvent *e )
{
if ( KGlobalSettings::wheelMouseZooms() )
- QTextEdit::contentsWheelEvent( e );
+ TQTextEdit::contentsWheelEvent( e );
else // thanks, we don't want to zoom, so skip QTextEdit's impl.
- QScrollView::contentsWheelEvent( e );
+ TQScrollView::contentsWheelEvent( e );
}
-void KTextEdit::setPalette( const QPalette& palette )
+void KTextEdit::setPalette( const TQPalette& palette )
{
- QTextEdit::setPalette( palette );
+ TQTextEdit::setPalette( palette );
// unsetPalette() is not virtual and calls setPalette() as well
// so we can use ownPalette() to find out about unsetting
d->customPalette = ownPalette();
@@ -293,12 +293,12 @@ void KTextEdit::setCheckSpellingEnabled( bool check )
}
}
-void KTextEdit::focusInEvent( QFocusEvent *e )
+void KTextEdit::focusInEvent( TQFocusEvent *e )
{
if ( d->checkSpellingEnabled && !isReadOnly() && !d->highlighter )
d->highlighter = new KDictSpellingHighlighter( this );
- QTextEdit::focusInEvent( e );
+ TQTextEdit::focusInEvent( e );
}
bool KTextEdit::checkSpellingEnabled() const
@@ -320,10 +320,10 @@ void KTextEdit::setReadOnly(bool readOnly)
d->highlighter = 0;
bool custom = ownPalette();
- QPalette p = palette();
- QColor color = p.color(QPalette::Disabled, QColorGroup::Background);
- p.setColor(QColorGroup::Base, color);
- p.setColor(QColorGroup::Background, color);
+ TQPalette p = palette();
+ TQColor color = p.color(TQPalette::Disabled, TQColorGroup::Background);
+ p.setColor(TQColorGroup::Base, color);
+ p.setColor(TQColorGroup::Background, color);
setPalette(p);
d->customPalette = custom;
}
@@ -331,17 +331,17 @@ void KTextEdit::setReadOnly(bool readOnly)
{
if ( d->customPalette )
{
- QPalette p = palette();
- QColor color = p.color(QPalette::Normal, QColorGroup::Base);
- p.setColor(QColorGroup::Base, color);
- p.setColor(QColorGroup::Background, color);
+ TQPalette p = palette();
+ TQColor color = p.color(TQPalette::Normal, TQColorGroup::Base);
+ p.setColor(TQColorGroup::Base, color);
+ p.setColor(TQColorGroup::Background, color);
setPalette( p );
}
else
unsetPalette();
}
- QTextEdit::setReadOnly (readOnly);
+ TQTextEdit::setReadOnly (readOnly);
}
void KTextEdit::virtual_hook( int, void* )
@@ -351,24 +351,24 @@ void KTextEdit::checkSpelling()
{
delete d->spell;
d->spell = new KSpell( this, i18n( "Spell Checking" ),
- this, SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
- connect( d->spell, SIGNAL( death() ),
- this, SLOT( spellCheckerFinished() ) );
+ connect( d->spell, TQT_SIGNAL( death() ),
+ this, TQT_SLOT( spellCheckerFinished() ) );
- connect( d->spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int ) ),
- this, SLOT( spellCheckerMisspelling( const QString &, const QStringList &, unsigned int ) ) );
+ connect( d->spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),
+ this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
- connect( d->spell, SIGNAL( corrected( const QString &, const QString &, unsigned int ) ),
- this, SLOT( spellCheckerCorrected( const QString &, const QString &, unsigned int ) ) );
+ connect( d->spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),
+ this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) );
}
-void KTextEdit::spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos )
+void KTextEdit::spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos )
{
highLightWord( text.length(), pos );
}
-void KTextEdit::spellCheckerCorrected( const QString &oldWord, const QString &newWord, unsigned int pos )
+void KTextEdit::spellCheckerCorrected( const TQString &oldWord, const TQString &newWord, unsigned int pos )
{
unsigned int l = 0;
unsigned int cnt = 0;
@@ -398,10 +398,10 @@ void KTextEdit::spellCheckerFinished()
void KTextEdit::slotSpellCheckReady( KSpell *s )
{
s->check( text() );
- connect( s, SIGNAL( done( const QString & ) ), this, SLOT( slotSpellCheckDone( const QString & ) ) );
+ connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) );
}
-void KTextEdit::slotSpellCheckDone( const QString &s )
+void KTextEdit::slotSpellCheckDone( const TQString &s )
{
if ( s != text() )
setText( s );
diff --git a/kdeui/ktextedit.h b/kdeui/ktextedit.h
index df08ddc9a..7735beb34 100644
--- a/kdeui/ktextedit.h
+++ b/kdeui/ktextedit.h
@@ -20,7 +20,7 @@
#ifndef KTEXTEDIT_H
#define KTEXTEDIT_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <kdelibs_export.h>
@@ -29,12 +29,12 @@ class KSpell;
/**
* @short A KDE'ified QTextEdit
*
- * This is just a little subclass of QTextEdit, implementing
+ * This is just a little subclass of TQTextEdit, implementing
* some standard KDE features, like Cursor auto-hiding, configurable
* wheelscrolling (fast-scroll or zoom) and deleting of entire
* words with Ctrl-Backspace or Ctrl-Delete.
*
- * Basic rule: whenever you want to use QTextEdit, use KTextEdit!
+ * Basic rule: whenever you want to use TQTextEdit, use KTextEdit!
*
* @see QTextEdit
* @author Carsten Pfeiffer <pfeiffer@kde.org>
@@ -46,18 +46,18 @@ class KDEUI_EXPORT KTextEdit : public QTextEdit
public:
/**
- * Constructs a KTextEdit object. See QTextEdit::QTextEdit
+ * Constructs a KTextEdit object. See TQTextEdit::QTextEdit
* for details.
*/
- KTextEdit( const QString& text,
- const QString& context = QString::null,
- QWidget * parent = 0, const char *name = 0 );
+ KTextEdit( const TQString& text,
+ const TQString& context = TQString::null,
+ TQWidget * parent = 0, const char *name = 0 );
/**
- * Constructs a KTextEdit object. See QTextEdit::QTextEdit
+ * Constructs a KTextEdit object. See TQTextEdit::QTextEdit
* for details.
*/
- KTextEdit( QWidget *parent = 0L, const char *name = 0 );
+ KTextEdit( TQWidget *parent = 0L, const char *name = 0 );
/**
* Destroys the KTextEdit object.
*/
@@ -71,7 +71,7 @@ public:
/**
* Reimplemented for tracking custom palettes.
*/
- virtual void setPalette( const QPalette& palette );
+ virtual void setPalette( const TQPalette& palette );
/**
* Turns spell checking for this text edit on or off. Note that spell
@@ -110,19 +110,19 @@ protected:
/**
* Reimplemented to catch "delete word" key events.
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Reimplemented to instantiate a KDictSpellingHighlighter, if
* spellchecking is enabled.
*/
- virtual void focusInEvent( QFocusEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
/**
* Reimplemented to allow fast-wheelscrolling with Ctrl-Wheel
* or zoom.
*/
- virtual void contentsWheelEvent( QWheelEvent * );
+ virtual void contentsWheelEvent( TQWheelEvent * );
/**
* Deletes a word backwards from the current cursor position,
@@ -137,29 +137,29 @@ protected:
virtual void deleteWordForward();
/**
- * Reimplemented from QTextEdit to add spelling related items
+ * Reimplemented from TQTextEdit to add spelling related items
* when appropriate.
*/
- virtual QPopupMenu *createPopupMenu( const QPoint &pos );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos );
/**
- * This is just a reimplementation of a deprecated method from QTextEdit and
+ * This is just a reimplementation of a deprecated method from TQTextEdit and
* is just here to keep source compatibility. This should not be used in
* new code. Specifically reimplementing this method will probably not do
* what you expect. See the method above.
*
* @deprecated
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
protected:
virtual void virtual_hook( int id, void* data );
private slots:
void slotSpellCheckReady( KSpell *s );
- void slotSpellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &, const QString &, unsigned int );
+ void slotSpellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
void toggleAutoSpellCheck();
void slotAllowTab();
diff --git a/kdeui/ktimewidget.cpp b/kdeui/ktimewidget.cpp
index 6a3ec4bb3..3a5ec3936 100644
--- a/kdeui/ktimewidget.cpp
+++ b/kdeui/ktimewidget.cpp
@@ -1,5 +1,5 @@
-#include <qdatetimeedit.h>
-#include <qlayout.h>
+#include <tqdatetimeedit.h>
+#include <tqlayout.h>
#include "kdebug.h"
#include "kdialog.h"
@@ -12,15 +12,15 @@ public:
QTimeEdit * timeWidget;
};
-KTimeWidget::KTimeWidget(QWidget * parent, const char * name)
- : QWidget(parent, name)
+KTimeWidget::KTimeWidget(TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
}
-KTimeWidget::KTimeWidget(const QTime & time,
- QWidget * parent, const char * name)
- : QWidget(parent, name)
+KTimeWidget::KTimeWidget(const TQTime & time,
+ TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
@@ -36,21 +36,21 @@ void KTimeWidget::init()
{
d = new KTimeWidgetPrivate;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->timeWidget = new QTimeEdit(this);
- connect(d->timeWidget, SIGNAL(valueChanged(const QTime &)),
- SIGNAL(valueChanged(const QTime &)));
+ connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)),
+ TQT_SIGNAL(valueChanged(const TQTime &)));
}
-void KTimeWidget::setTime(const QTime & time)
+void KTimeWidget::setTime(const TQTime & time)
{
d->timeWidget->setTime(time);
}
-QTime KTimeWidget::time() const
+TQTime KTimeWidget::time() const
{
return d->timeWidget->time();
}
diff --git a/kdeui/ktimewidget.h b/kdeui/ktimewidget.h
index 1e263dafd..b9808f0e8 100644
--- a/kdeui/ktimewidget.h
+++ b/kdeui/ktimewidget.h
@@ -19,8 +19,8 @@
#ifndef __KTIMEWIDGET__
#define __KTIMEWIDGET__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -37,20 +37,20 @@
class KDEUI_EXPORT KTimeWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QTime time READ time WRITE setTime )
+ Q_PROPERTY( TQTime time READ time WRITE setTime )
public:
/**
* Constructs a time selection widget.
*/
- KTimeWidget(QWidget * parent = 0, const char * name = 0);
+ KTimeWidget(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a time selection widget with the initial time set to
* @p time.
*/
- KTimeWidget(const QTime & time,
- QWidget * parent = 0, const char * name = 0 );
+ KTimeWidget(const TQTime & time,
+ TQWidget * parent = 0, const char * name = 0 );
/**
* Destructs the time selection widget.
@@ -60,20 +60,20 @@ public:
/**
* Returns the currently selected time.
*/
- QTime time() const;
+ TQTime time() const;
public slots:
/**
* Changes the selected time to @p time.
*/
- void setTime(const QTime & time);
+ void setTime(const TQTime & time);
signals:
/**
* Emitted whenever the time of the widget
* is changed, either with setTime() or via user selection.
*/
- void valueChanged(const QTime & time);
+ void valueChanged(const TQTime & time);
private:
void init();
diff --git a/kdeui/ktimezonewidget.cpp b/kdeui/ktimezonewidget.cpp
index 879b26176..a9a73a4f5 100644
--- a/kdeui/ktimezonewidget.cpp
+++ b/kdeui/ktimezonewidget.cpp
@@ -25,7 +25,7 @@
#include <kstandarddirs.h>
#include <ktimezones.h>
#include <ktimezonewidget.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <time.h>
#define COLUMN_CITY 0
@@ -33,7 +33,7 @@
#define COLUMN_COMMENT 2
#define COLUMN_ZONE 3
-KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *db) :
+KTimezoneWidget::KTimezoneWidget(TQWidget *parent, const char *name, KTimezones *db) :
KListView(parent, name),
d(0)
{
@@ -50,8 +50,8 @@ KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *
for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it)
{
const KTimezone *zone = it.data();
- QString tzName = zone->name();
- QString comment = zone->comment();
+ TQString tzName = zone->name();
+ TQString comment = zone->comment();
if (!comment.isEmpty())
comment = i18n(comment.utf8());
@@ -59,17 +59,17 @@ KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *
//
// "Europe/London", "GB" -> "London", "Europe/GB".
// "UTC", "" -> "UTC", "".
- QStringList continentCity = QStringList::split("/", displayName(zone));
- QListViewItem *listItem = new QListViewItem(this, continentCity[continentCity.count() - 1]);
+ TQStringList continentCity = TQStringList::split("/", displayName(zone));
+ TQListViewItem *listItem = new TQListViewItem(this, continentCity[continentCity.count() - 1]);
continentCity[continentCity.count() - 1] = zone->countryCode();
listItem->setText(COLUMN_REGION, continentCity.join("/"));
listItem->setText(COLUMN_COMMENT, comment);
listItem->setText(COLUMN_ZONE, tzName); /* store complete path in ListView */
// Locate the flag from /l10n/%1/flag.png.
- QString flag = locate("locale", QString("l10n/%1/flag.png").arg(zone->countryCode().lower()));
- if (QFile::exists(flag))
- listItem->setPixmap(COLUMN_REGION, QPixmap(flag));
+ TQString flag = locate("locale", TQString("l10n/%1/flag.png").arg(zone->countryCode().lower()));
+ if (TQFile::exists(flag))
+ listItem->setPixmap(COLUMN_REGION, TQPixmap(flag));
}
if (!userDb)
@@ -83,17 +83,17 @@ KTimezoneWidget::~KTimezoneWidget()
// delete d;
}
-QString KTimezoneWidget::displayName(const KTimezone *zone)
+TQString KTimezoneWidget::displayName(const KTimezone *zone)
{
return i18n(zone->name().utf8()).replace("_", " ");
}
-QStringList KTimezoneWidget::selection() const
+TQStringList KTimezoneWidget::selection() const
{
- QStringList selection;
+ TQStringList selection;
// Loop through all entries.
- QListViewItem *listItem = firstChild();
+ TQListViewItem *listItem = firstChild();
while (listItem)
{
if (listItem->isSelected())
@@ -105,12 +105,12 @@ QStringList KTimezoneWidget::selection() const
return selection;
}
-void KTimezoneWidget::setSelected(const QString &zone, bool selected)
+void KTimezoneWidget::setSelected(const TQString &zone, bool selected)
{
bool found = false;
// Loop through all entries.
- QListViewItem *listItem = firstChild();
+ TQListViewItem *listItem = firstChild();
while (listItem)
{
if (listItem->text(COLUMN_ZONE) == zone)
diff --git a/kdeui/ktimezonewidget.h b/kdeui/ktimezonewidget.h
index 9241b14a3..a09b1dd56 100644
--- a/kdeui/ktimezonewidget.h
+++ b/kdeui/ktimezonewidget.h
@@ -22,7 +22,7 @@
#include <kdelibs_export.h>
#include <klistview.h>
-#include <qstring.h>
+#include <tqstring.h>
class KTimezone;
class KTimezones;
@@ -70,7 +70,7 @@ public:
* @param db The timezone database to use. If 0, the system timezone
* database is used.
*/
- KTimezoneWidget(QWidget *parent = 0, const char *name = 0, KTimezones *db = 0);
+ KTimezoneWidget(TQWidget *parent = 0, const char *name = 0, KTimezones *db = 0);
/**
* Destroys the timezone selection widget.
@@ -78,12 +78,12 @@ public:
virtual ~KTimezoneWidget();
/**
- * Returns the currently selected timezones. See QListView::selectionChanged().
+ * Returns the currently selected timezones. See TQListView::selectionChanged().
*
* @return a list of timezone names, in the format used by the database
* supplied to the {@link KTimezoneWidget() } constructor.
*/
- QStringList selection() const;
+ TQStringList selection() const;
/**
* Select/deselect the named timezone.
@@ -91,7 +91,7 @@ public:
* @param zone The timezone name to be selected. Ignored if not recognised!
* @param selected The new selection state.
*/
- void setSelected(const QString &zone, bool selected);
+ void setSelected(const TQString &zone, bool selected);
/**
* Format a timezone name in a standardised manner. The returned value is
@@ -103,7 +103,7 @@ public:
*
* @return formatted timezone name.
*/
- static QString displayName(const KTimezone *zone);
+ static TQString displayName(const KTimezone *zone);
private:
KTimezoneWidgetPrivate *d;
diff --git a/kdeui/ktip.cpp b/kdeui/ktip.cpp
index b74862ced..778d5e33b 100644
--- a/kdeui/ktip.cpp
+++ b/kdeui/ktip.cpp
@@ -23,15 +23,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qimage.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,11 +55,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "ktip.h"
-KTipDatabase::KTipDatabase(const QString &_tipFile)
+KTipDatabase::KTipDatabase(const TQString &_tipFile)
{
- QString tipFile = _tipFile;
+ TQString tipFile = _tipFile;
if (tipFile.isEmpty())
- tipFile = QString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips";
+ tipFile = TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips";
loadTips(tipFile);
@@ -68,15 +68,15 @@ KTipDatabase::KTipDatabase(const QString &_tipFile)
}
-KTipDatabase::KTipDatabase( const QStringList& tipsFiles )
+KTipDatabase::KTipDatabase( const TQStringList& tipsFiles )
{
if ( tipsFiles.isEmpty() || ( ( tipsFiles.count() == 1 ) && tipsFiles.first().isEmpty() ) )
{
- addTips(QString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips");
+ addTips(TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips");
}
else
{
- for (QStringList::ConstIterator it = tipsFiles.begin(); it != tipsFiles.end(); ++it)
+ for (TQStringList::ConstIterator it = tipsFiles.begin(); it != tipsFiles.end(); ++it)
addTips( *it );
}
if (!mTips.isEmpty())
@@ -84,7 +84,7 @@ KTipDatabase::KTipDatabase( const QStringList& tipsFiles )
}
-void KTipDatabase::loadTips(const QString &tipFile)
+void KTipDatabase::loadTips(const TQString &tipFile)
{
mTips.clear();
addTips(tipFile);
@@ -93,9 +93,9 @@ void KTipDatabase::loadTips(const QString &tipFile)
// if you change something here, please update the script
// preparetips, which depends on extracting exactly the same
// text as done here.
-void KTipDatabase::addTips(const QString& tipFile )
+void KTipDatabase::addTips(const TQString& tipFile )
{
- QString fileName = locate("data", tipFile);
+ TQString fileName = locate("data", tipFile);
if (fileName.isEmpty())
{
@@ -103,23 +103,23 @@ void KTipDatabase::addTips(const QString& tipFile )
return;
}
- QFile file(fileName);
+ TQFile file(fileName);
if (!file.open(IO_ReadOnly))
{
kdDebug() << "KTipDatabase::addTips: can't open '" << fileName << "' for reading" << endl;
return;
}
- QByteArray data = file.readAll();
- QString content = QString::fromUtf8(data.data(), data.size());
- const QRegExp rx("\\n+");
+ TQByteArray data = file.readAll();
+ TQString content = TQString::fromUtf8(data.data(), data.size());
+ const TQRegExp rx("\\n+");
int pos = -1;
while ((pos = content.find("<html>", pos + 1, false)) != -1)
{
// to make translations work, tip extraction here must exactly
// match what is done by the preparetips script
- QString tip = content
+ TQString tip = content
.mid(pos + 6, content.find("</html>", pos, false) - pos - 6)
.replace(rx, "\n");
if (!tip.endsWith("\n"))
@@ -158,17 +158,17 @@ void KTipDatabase::prevTip()
}
-QString KTipDatabase::tip() const
+TQString KTipDatabase::tip() const
{
if (mTips.isEmpty())
- return QString::null;
+ return TQString::null;
return mTips[mCurrent];
}
KTipDialog *KTipDialog::mInstance = 0;
-KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
+KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name)
: KDialog(parent, name)
{
/**
@@ -177,7 +177,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
*/
bool isTipDialog = (parent);
- QImage img;
+ TQImage img;
int h,s,v;
mBlendedColor = KGlobalSettings::activeTitleColor();
@@ -186,12 +186,12 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
if (!isTipDialog)
{
- img = QImage(locate("data", "kdewizard/pics/wizard_small.png"));
+ img = TQImage(locate("data", "kdewizard/pics/wizard_small.png"));
// colorize and check to figure the correct color
KIconEffect::colorize(img, mBlendedColor, 1.0);
QRgb colPixel( img.pixel(0,0) );
- mBlendedColor = QColor(qRed(colPixel),qGreen(colPixel),qBlue(colPixel));
+ mBlendedColor = TQColor(qRed(colPixel),qGreen(colPixel),qBlue(colPixel));
}
mBaseColor = KGlobalSettings::alternateBackgroundColor();
@@ -209,71 +209,71 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 32 ),
KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 16 ) );
#endif
- QVBoxLayout *vbox = new QVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, marginHint(), spacingHint());
if (isTipDialog)
{
- QHBoxLayout *pl = new QHBoxLayout(vbox, 0, 0);
+ TQHBoxLayout *pl = new TQHBoxLayout(vbox, 0, 0);
- QLabel *bulb = new QLabel(this);
+ TQLabel *bulb = new TQLabel(this);
bulb->setPixmap(locate("data", "kdeui/pics/ktip-bulb.png"));
pl->addWidget(bulb);
- QLabel *titlePane = new QLabel(this);
+ TQLabel *titlePane = new TQLabel(this);
titlePane->setBackgroundPixmap(locate("data", "kdeui/pics/ktip-background.png"));
titlePane->setText(i18n("Did you know...?\n"));
- titlePane->setFont(QFont(KGlobalSettings::generalFont().family(), 20, QFont::Bold));
- titlePane->setAlignment(QLabel::AlignCenter);
+ titlePane->setFont(TQFont(KGlobalSettings::generalFont().family(), 20, TQFont::Bold));
+ titlePane->setAlignment(TQLabel::AlignCenter);
pl->addWidget(titlePane, 100);
}
- QHBox *hbox = new QHBox(this);
+ TQHBox *hbox = new TQHBox(this);
hbox->setSpacing(0);
- hbox->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ hbox->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
vbox->addWidget(hbox);
- QHBox *tl = new QHBox(hbox);
+ TQHBox *tl = new TQHBox(hbox);
tl->setMargin(7);
tl->setBackgroundColor(mBlendedColor);
- QHBox *topLeft = new QHBox(tl);
+ TQHBox *topLeft = new TQHBox(tl);
topLeft->setMargin(15);
topLeft->setBackgroundColor(mBaseColor);
mTipText = new KTextBrowser(topLeft);
- mTipText->setWrapPolicy( QTextEdit::AtWordOrDocumentBoundary );
+ mTipText->setWrapPolicy( TQTextEdit::AtWordOrDocumentBoundary );
mTipText->mimeSourceFactory()->addFilePath(
KGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/");
- mTipText->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- mTipText->setHScrollBarMode(QScrollView::AlwaysOff);
+ mTipText->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ mTipText->setHScrollBarMode(TQScrollView::AlwaysOff);
mTipText->setLinkUnderline(false);
- QStyleSheet *sheet = mTipText->styleSheet();
- QStyleSheetItem *item = sheet->item("a");
- item->setFontWeight(QFont::Bold);
+ TQStyleSheet *sheet = mTipText->styleSheet();
+ TQStyleSheetItem *item = sheet->item("a");
+ item->setFontWeight(TQFont::Bold);
mTipText->setStyleSheet(sheet);
- QPalette pal = mTipText->palette();
- pal.setColor( QPalette::Active, QColorGroup::Link, mBlendedColor );
- pal.setColor( QPalette::Inactive, QColorGroup::Link, mBlendedColor );
+ TQPalette pal = mTipText->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Link, mBlendedColor );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Link, mBlendedColor );
mTipText->setPalette(pal);
- QStringList icons = KGlobal::dirs()->resourceDirs("icon");
- QStringList::Iterator it;
+ TQStringList icons = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::Iterator it;
for (it = icons.begin(); it != icons.end(); ++it)
mTipText->mimeSourceFactory()->addFilePath(*it);
if (!isTipDialog)
{
- QLabel *l = new QLabel(hbox);
+ TQLabel *l = new TQLabel(hbox);
l->setPixmap(img);
l->setBackgroundColor(mBlendedColor);
l->setAlignment(Qt::AlignRight | Qt::AlignBottom);
resize(550, 230);
- QSize sh = size();
+ TQSize sh = size();
- QRect rect = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect rect = KGlobalSettings::splashScreenDesktopGeometry();
move(rect.x() + (rect.width() - sh.width())/2,
rect.y() + (rect.height() - sh.height())/2);
@@ -282,9 +282,9 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
vbox->addWidget(sep);
- QHBoxLayout *hbox2 = new QHBoxLayout(vbox, 4);
+ TQHBoxLayout *hbox2 = new TQHBoxLayout(vbox, 4);
- mTipOnStart = new QCheckBox(i18n("&Show tips on startup"), this);
+ mTipOnStart = new TQCheckBox(i18n("&Show tips on startup"), this);
hbox2->addWidget(mTipOnStart, 1);
KPushButton *prev = new KPushButton( KStdGuiItem::back(
@@ -304,10 +304,10 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KConfigGroup config(kapp->config(), "TipOfDay");
mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true));
- connect(next, SIGNAL(clicked()), this, SLOT(nextTip()));
- connect(prev, SIGNAL(clicked()), this, SLOT(prevTip()));
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
- connect(mTipOnStart, SIGNAL(toggled(bool)), this, SLOT(showOnStart(bool)));
+ connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip()));
+ connect(prev, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevTip()));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(mTipOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showOnStart(bool)));
ok->setFocus();
@@ -320,17 +320,17 @@ KTipDialog::~KTipDialog()
mInstance = 0L;
}
-void KTipDialog::showTip(const QString &tipFile, bool force)
+void KTipDialog::showTip(const TQString &tipFile, bool force)
{
showTip(kapp->mainWidget(), tipFile, force);
}
-void KTipDialog::showTip(QWidget *parent, const QString &tipFile, bool force)
+void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force)
{
- showMultiTip( parent, QStringList(tipFile), force );
+ showMultiTip( parent, TQStringList(tipFile), force );
}
-void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force)
+void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force)
{
KConfigGroup configGroup(kapp->config(), "TipOfDay");
@@ -345,12 +345,12 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
if (hasLastShown)
{
const int oneDay = 24*60*60;
- QDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown");
+ TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown");
// Show tip roughly once a week
- if (lastShown.secsTo(QDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay))))
+ if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay))))
return;
}
- configGroup.writeEntry("TipLastShown", QDateTime::currentDateTime());
+ configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime());
kapp->config()->sync();
if (!hasLastShown)
return; // Don't show tip on first start
@@ -370,7 +370,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
void KTipDialog::prevTip()
{
mDatabase->prevTip();
- mTipText->setText(QString::fromLatin1(
+ mTipText->setText(TQString::fromLatin1(
"<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
.arg(mTextColor.name())
.arg(mBaseColor.name())
@@ -381,7 +381,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
void KTipDialog::nextTip()
{
mDatabase->nextTip();
- mTipText->setText(QString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
+ mTipText->setText(TQString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
.arg(mTextColor.name())
.arg(mBaseColor.name())
.arg(i18n(mDatabase->tip().utf8())));
@@ -400,11 +400,11 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
config.sync();
}
- bool KTipDialog::eventFilter(QObject *o, QEvent *e)
+ bool KTipDialog::eventFilter(TQObject *o, TQEvent *e)
{
- if (o == mTipText && e->type()== QEvent::KeyPress &&
- (((QKeyEvent *)e)->key() == Key_Return ||
- ((QKeyEvent *)e)->key() == Key_Space ))
+ if (o == mTipText && e->type()== TQEvent::KeyPress &&
+ (((TQKeyEvent *)e)->key() == Key_Return ||
+ ((TQKeyEvent *)e)->key() == Key_Space ))
accept();
// If the user presses Return or Space, we close the dialog as if the
@@ -413,7 +413,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
// keyboard to open urls in the KTextBrowser, so we just let it handle
// the key event _additionally_. (Antonio)
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
void KTipDialog::virtual_hook( int id, void* data )
diff --git a/kdeui/ktip.h b/kdeui/ktip.h
index f11978343..bdbfdc4d2 100644
--- a/kdeui/ktip.h
+++ b/kdeui/ktip.h
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __K_TIP_H__
#define __K_TIP_H__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialog.h>
@@ -61,7 +61,7 @@ public:
*
* @param tipFile The absolute path to the tips file.
*/
- KTipDatabase(const QString &tipFile = QString::null);
+ KTipDatabase(const TQString &tipFile = TQString::null);
/**
* This constructor takes a list of files that will be merged. This constructor
@@ -69,12 +69,12 @@ public:
*
* @param tipFiles A list of absolute paths to the tips file
*/
- KTipDatabase(const QStringList &tipFiles);
+ KTipDatabase(const TQStringList &tipFiles);
/**
* Returns the current tip.
*/
- QString tip() const;
+ TQString tip() const;
/**
* The next tip will become the current one.
@@ -87,11 +87,11 @@ public:
void prevTip();
private:
- void loadTips(const QString &tipFile);
+ void loadTips(const TQString &tipFile);
- void addTips(const QString &tipFile);
+ void addTips(const TQString &tipFile);
- QStringList mTips;
+ TQStringList mTips;
int mCurrent;
class KTipDatabasePrivate;
@@ -116,7 +116,7 @@ public:
* @param parent Parent widget of TipDialog.
* @param name The object name.
*/
- KTipDialog(KTipDatabase *db, QWidget *parent = 0, const char *name = 0);
+ KTipDialog(KTipDatabase *db, TQWidget *parent = 0, const char *name = 0);
~KTipDialog();
/**
@@ -135,7 +135,7 @@ public:
* @param force If true, the dialog is show, even when the users
* disabled it.
*/
- static void showTip(QWidget *parent, const QString &tipFile = QString::null, bool force=false);
+ static void showTip(TQWidget *parent, const TQString &tipFile = TQString::null, bool force=false);
/**
* Shows a tip
@@ -148,7 +148,7 @@ public:
* @param force If true, the dialog is show, even when the users
* disabled it.
*/
- static void showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force=false);
+ static void showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force=false);
/**
* Shows a tip.
@@ -156,7 +156,7 @@ public:
* This methods calls showTip() with the applications main window as parent.
*
*/
- static void showTip(const QString &tipFile = QString::null, bool force = false);
+ static void showTip(const TQString &tipFile = TQString::null, bool force = false);
/**
* Toggles the start behavior.
@@ -167,7 +167,7 @@ public:
static void setShowOnStart(bool show);
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
virtual void virtual_hook( int id, void* data );
private slots:
@@ -178,7 +178,7 @@ private slots:
private:
KTipDatabase *mDatabase;
- QCheckBox *mTipOnStart;
+ TQCheckBox *mTipOnStart;
KTextBrowser *mTipText;
class KTipDialogPrivate;
@@ -186,7 +186,7 @@ private:
static KTipDialog *mInstance;
- QColor mBaseColor, mBlendedColor, mTextColor;
+ TQColor mBaseColor, mBlendedColor, mTextColor;
};
#endif
diff --git a/kdeui/ktoolbar.cpp b/kdeui/ktoolbar.cpp
index 4d7acd5b1..6f3eddba2 100644
--- a/kdeui/ktoolbar.cpp
+++ b/kdeui/ktoolbar.cpp
@@ -27,20 +27,20 @@
#ifdef KDE_USE_FINAL
#undef Always
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
#endif
#include <string.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qdrawutil.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqdrawutil.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
@@ -114,9 +114,9 @@ public:
bool modified : 1;
bool positioned : 1;
- QWidget *m_parent;
+ TQWidget *m_parent;
- QMainWindow::ToolBarDock oldPos;
+ TQMainWindow::ToolBarDock oldPos;
KXMLGUIClient *m_xmlguiClient;
@@ -130,26 +130,26 @@ public:
};
ToolBarInfo toolBarInfo;
- QValueList<int> iconSizes;
- QTimer repaintTimer;
+ TQValueList<int> iconSizes;
+ TQTimer repaintTimer;
// Default Values.
bool HiddenDefault;
int IconSizeDefault;
- QString IconTextDefault;
+ TQString IconTextDefault;
bool NewLineDefault;
int OffsetDefault;
- QString PositionDefault;
+ TQString PositionDefault;
- QPtrList<QWidget> idleButtons;
+ TQPtrList<TQWidget> idleButtons;
};
-KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
+KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent,
const char* name )
- :QFrame( parent, name ), line( l )
+ :TQFrame( parent, name ), line( l )
{
- connect( parent, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(setOrientation(Orientation)) );
+ connect( parent, TQT_SIGNAL(orientationChanged(Orientation)),
+ this, TQT_SLOT(setOrientation(Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
@@ -161,56 +161,56 @@ void KToolBarSeparator::setOrientation( Orientation o )
setFrameStyle( NoFrame );
}
-void KToolBarSeparator::drawContents( QPainter* p )
+void KToolBarSeparator::drawContents( TQPainter* p )
{
if ( line ) {
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( orientation() == Horizontal )
- flags = flags | QStyle::Style_Horizontal;
+ flags = flags | TQStyle::Style_Horizontal;
- style().drawPrimitive(QStyle::PE_DockWindowSeparator, p,
+ style().drawPrimitive(TQStyle::PE_DockWindowSeparator, p,
contentsRect(), colorGroup(), flags);
} else {
- QFrame::drawContents(p);
+ TQFrame::drawContents(p);
}
}
-void KToolBarSeparator::styleChange( QStyle& )
+void KToolBarSeparator::styleChange( TQStyle& )
{
setOrientation( orient );
}
-QSize KToolBarSeparator::sizeHint() const
+TQSize KToolBarSeparator::sizeHint() const
{
- int dim = style().pixelMetric( QStyle::PM_DockWindowSeparatorExtent, this );
- return orientation() == Vertical ? QSize( 0, dim ) : QSize( dim, 0 );
+ int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this );
+ return orientation() == Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 );
}
-QSizePolicy KToolBarSeparator::sizePolicy() const
+TQSizePolicy KToolBarSeparator::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
}
-KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
- dynamic_cast<QMainWindow*>(parent),
+KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
+ dynamic_cast<TQMainWindow*>(parent),
parent, false,
name ? name : "mainToolBar")
{
init( readConfig, honorStyle );
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
+KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
{
init( readConfig, honorStyle );
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
+KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
{
@@ -229,17 +229,17 @@ void KToolBar::init( bool readConfig, bool honorStyle )
setFullSize( true );
d->m_honorStyle = honorStyle;
context = 0;
- layoutTimer = new QTimer( this );
- connect( layoutTimer, SIGNAL( timeout() ),
- this, SLOT( rebuildLayout() ) );
- connect( &(d->repaintTimer), SIGNAL( timeout() ),
- this, SLOT( slotRepaint() ) );
+ layoutTimer = new TQTimer( this );
+ connect( layoutTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( rebuildLayout() ) );
+ connect( &(d->repaintTimer), TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotRepaint() ) );
if ( kapp ) { // may be null when started inside designer
- connect(kapp, SIGNAL(toolbarAppearanceChanged(int)), this, SLOT(slotAppearanceChanged()));
+ connect(kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)), this, TQT_SLOT(slotAppearanceChanged()));
// request notification of changes in icon style
kapp->addKipcEventMask(KIPC::IconChanged);
- connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(slotIconChanged(int)));
+ connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged(int)));
}
// finally, read in our configurable settings
@@ -247,15 +247,15 @@ void KToolBar::init( bool readConfig, bool honorStyle )
slotReadConfig();
if ( mainWindow() )
- connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ),
- this, SLOT( toolBarPosChanged( QToolBar * ) ) );
+ connect( mainWindow(), TQT_SIGNAL( toolBarPositionChanged( TQToolBar * ) ),
+ this, TQT_SLOT( toolBarPosChanged( TQToolBar * ) ) );
// Hack to make sure we recalculate our size when we dock.
- connect( this, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(rebuildLayout()) );
+ connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) );
}
-int KToolBar::insertButton(const QString& icon, int id, bool enabled,
- const QString& text, int index, KInstance *_instance )
+int KToolBar::insertButton(const TQString& icon, int id, bool enabled,
+ const TQString& text, int index, KInstance *_instance )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance );
@@ -266,9 +266,9 @@ int KToolBar::insertButton(const QString& icon, int id, bool enabled,
}
-int KToolBar::insertButton(const QString& icon, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled, const QString& text, int index, KInstance *_instance )
+int KToolBar::insertButton(const TQString& icon, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled, const TQString& text, int index, KInstance *_instance )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance);
insertWidgetInternal( button, index, id );
@@ -279,8 +279,8 @@ int KToolBar::insertButton(const QString& icon, int id, const char *signal,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, bool enabled,
- const QString& text, int index )
+int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled,
+ const TQString& text, int index )
{
KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text);
insertWidgetInternal( button, index, id );
@@ -290,9 +290,9 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, bool enabled,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled, const QString& text,
+int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled, const TQString& text,
int index )
{
KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text);
@@ -304,8 +304,8 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
}
-int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
- bool enabled, const QString &text, int index )
+int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup,
+ bool enabled, const TQString &text, int index )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text );
insertWidgetInternal( button, index, id );
@@ -316,8 +316,8 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
- bool enabled, const QString &text, int index )
+int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup,
+ bool enabled, const TQString &text, int index )
{
KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text );
insertWidgetInternal( button, index, id );
@@ -328,16 +328,16 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
}
-int KToolBar::insertLined (const QString& text, int id,
+int KToolBar::insertLined (const TQString& text, int id,
const char *signal,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
bool enabled ,
- const QString& toolTipText,
+ const TQString& toolTipText,
int size, int index )
{
KLineEdit *lined = new KLineEdit ( this, 0 );
if ( !toolTipText.isEmpty() )
- QToolTip::add( lined, toolTipText );
+ TQToolTip::add( lined, toolTipText );
if ( size > 0 )
lined->setMinimumWidth( size );
insertWidgetInternal( lined, index, id );
@@ -347,12 +347,12 @@ int KToolBar::insertLined (const QString& text, int id,
return index;
}
-int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
- const char *signal, const QObject *receiver,
+int KToolBar::insertCombo (const TQStringList &list, int id, bool writable,
+ const char *signal, const TQObject *receiver,
const char *slot, bool enabled,
- const QString& tooltiptext,
+ const TQString& tooltiptext,
int size, int index,
- QComboBox::Policy policy )
+ TQComboBox::Policy policy )
{
KComboBox *combo = new KComboBox ( writable, this );
@@ -363,7 +363,7 @@ int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
if ( size > 0 )
combo->setMinimumWidth( size );
if (!tooltiptext.isNull())
- QToolTip::add( combo, tooltiptext );
+ TQToolTip::add( combo, tooltiptext );
if ( signal && receiver && slot )
connect ( combo, signal, receiver, slot );
@@ -371,12 +371,12 @@ int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
}
-int KToolBar::insertCombo (const QString& text, int id, bool writable,
- const char *signal, QObject *receiver,
+int KToolBar::insertCombo (const TQString& text, int id, bool writable,
+ const char *signal, TQObject *receiver,
const char *slot, bool enabled,
- const QString& tooltiptext,
+ const TQString& tooltiptext,
int size, int index,
- QComboBox::Policy policy )
+ TQComboBox::Policy policy )
{
KComboBox *combo = new KComboBox ( writable, this );
insertWidgetInternal( combo, index, id );
@@ -386,41 +386,41 @@ int KToolBar::insertCombo (const QString& text, int id, bool writable,
if ( size > 0 )
combo->setMinimumWidth( size );
if (!tooltiptext.isNull())
- QToolTip::add( combo, tooltiptext );
+ TQToolTip::add( combo, tooltiptext );
connect (combo, signal, receiver, slot);
return index;
}
int KToolBar::insertSeparator(int index, int id)
{
- QWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" );
+ TQWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" );
insertWidgetInternal( w, index, id );
return index;
}
int KToolBar::insertLineSeparator(int index, int id)
{
- QWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" );
+ TQWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" );
insertWidgetInternal( w, index, id );
return index;
}
-int KToolBar::insertWidget(int id, int /*width*/, QWidget *widget, int index)
+int KToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index)
{
removeWidgetInternal( widget ); // in case we already have it ?
insertWidgetInternal( widget, index, id );
return index;
}
-int KToolBar::insertAnimatedWidget(int id, QObject *receiver, const char *slot,
- const QString& icons, int index )
+int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot,
+ const TQString& icons, int index )
{
KAnimWidget *anim = new KAnimWidget( icons, d->m_iconSize, this );
insertWidgetInternal( anim, index, id );
if ( receiver )
- connect( anim, SIGNAL(clicked()), receiver, slot);
+ connect( anim, TQT_SIGNAL(clicked()), receiver, slot);
return index;
}
@@ -433,13 +433,13 @@ KAnimWidget *KToolBar::animatedWidget( int id )
KAnimWidget *aw = dynamic_cast<KAnimWidget *>(*it);
if ( aw )
return aw;
- QObjectList *l = queryList( "KAnimWidget" );
+ TQObjectList *l = queryList( "KAnimWidget" );
if ( !l || !l->first() ) {
delete l;
return 0;
}
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
KAnimWidget *aw = dynamic_cast<KAnimWidget *>(o);
if ( aw )
{
@@ -454,22 +454,22 @@ KAnimWidget *KToolBar::animatedWidget( int id )
void KToolBar::addConnection (int id, const char *signal,
- const QObject *receiver, const char *slot)
+ const TQObject *receiver, const char *slot)
{
- QWidget* w = getWidget( id );
+ TQWidget* w = getWidget( id );
if ( w )
connect( w, signal, receiver, slot );
}
void KToolBar::setItemEnabled( int id, bool enabled )
{
- QWidget* w = getWidget( id );
+ TQWidget* w = getWidget( id );
if ( w )
w->setEnabled( enabled );
}
-void KToolBar::setButtonPixmap( int id, const QPixmap& _pixmap )
+void KToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -477,14 +477,14 @@ void KToolBar::setButtonPixmap( int id, const QPixmap& _pixmap )
}
-void KToolBar::setButtonIcon( int id, const QString& _icon )
+void KToolBar::setButtonIcon( int id, const TQString& _icon )
{
KToolBarButton * button = getButton( id );
if ( button )
button->setIcon( _icon );
}
-void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
+void KToolBar::setButtonIconSet( int id, const TQIconSet& iconset )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -492,7 +492,7 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
}
-void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle )
+void KToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -539,7 +539,7 @@ bool KToolBar::isButtonOn (int id) const
}
-void KToolBar::setLinedText (int id, const QString& text)
+void KToolBar::setLinedText (int id, const TQString& text)
{
KLineEdit * lineEdit = getLined( id );
if ( lineEdit )
@@ -547,21 +547,21 @@ void KToolBar::setLinedText (int id, const QString& text)
}
-QString KToolBar::getLinedText (int id) const
+TQString KToolBar::getLinedText (int id) const
{
KLineEdit * lineEdit = const_cast<KToolBar*>( this )->getLined( id );
- return lineEdit ? lineEdit->text() : QString::null;
+ return lineEdit ? lineEdit->text() : TQString::null;
}
-void KToolBar::insertComboItem (int id, const QString& text, int index)
+void KToolBar::insertComboItem (int id, const TQString& text, int index)
{
KComboBox * comboBox = getCombo( id );
if (comboBox)
comboBox->insertItem( text, index );
}
-void KToolBar::insertComboList (int id, const QStringList &list, int index)
+void KToolBar::insertComboList (int id, const TQStringList &list, int index)
{
KComboBox * comboBox = getCombo( id );
if (comboBox)
@@ -585,7 +585,7 @@ void KToolBar::setCurrentComboItem (int id, int index)
}
-void KToolBar::changeComboItem (int id, const QString& text, int index)
+void KToolBar::changeComboItem (int id, const TQString& text, int index)
{
KComboBox * comboBox = getCombo( id );
if (comboBox)
@@ -601,10 +601,10 @@ void KToolBar::clearCombo (int id)
}
-QString KToolBar::getComboItem (int id, int index) const
+TQString KToolBar::getComboItem (int id, int index) const
{
KComboBox * comboBox = const_cast<KToolBar*>( this )->getCombo( id );
- return comboBox ? comboBox->text( index ) : QString::null;
+ return comboBox ? comboBox->text( index ) : TQString::null;
}
@@ -647,7 +647,7 @@ void KToolBar::alignItemRight (int id, bool right )
}
-QWidget *KToolBar::getWidget (int id)
+TQWidget *KToolBar::getWidget (int id)
{
Id2WidgetMap::Iterator it = id2widget.find( id );
return ( it == id2widget.end() ) ? 0 : (*it);
@@ -656,7 +656,7 @@ QWidget *KToolBar::getWidget (int id)
void KToolBar::setItemAutoSized (int id, bool yes )
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w && yes )
setStretchableWidget( w );
}
@@ -664,12 +664,12 @@ void KToolBar::setItemAutoSized (int id, bool yes )
void KToolBar::clear ()
{
- /* Delete any idle buttons, so QToolBar doesn't delete them itself, making a mess */
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ /* Delete any idle buttons, so TQToolBar doesn't delete them itself, making a mess */
+ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
w->blockSignals(false);
d->idleButtons.clear();
- QToolBar::clear();
+ TQToolBar::clear();
widget2id.clear();
id2widget.clear();
}
@@ -683,7 +683,7 @@ void KToolBar::removeItem(int id)
kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl;
return;
}
- QWidget * w = (*it);
+ TQWidget * w = (*it);
id2widget.remove( id );
widget2id.remove( w );
widgets.removeRef( w );
@@ -699,7 +699,7 @@ void KToolBar::removeItemDelayed(int id)
kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl;
return;
}
- QWidget * w = (*it);
+ TQWidget * w = (*it);
id2widget.remove( id );
widget2id.remove( w );
widgets.removeRef( w );
@@ -712,7 +712,7 @@ void KToolBar::removeItemDelayed(int id)
void KToolBar::hideItem (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w )
w->hide();
}
@@ -720,7 +720,7 @@ void KToolBar::hideItem (int id)
void KToolBar::showItem (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w )
w->show();
}
@@ -728,13 +728,13 @@ void KToolBar::showItem (int id)
int KToolBar::itemIndex (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
return w ? widgets.findRef(w) : -1;
}
int KToolBar::idAt (int index)
{
- QWidget *w = widgets.at(index);
+ TQWidget *w = widgets.at(index);
return widget2id[w];
}
@@ -769,11 +769,11 @@ void KToolBar::setBarPos (BarPosition bpos)
KToolBar::BarPosition KToolBar::barPos() const
{
if ( !this->mainWindow() )
- return place() == QDockWindow::InDock ? KToolBar::Top : KToolBar::Floating;
+ return place() == TQDockWindow::InDock ? KToolBar::Top : KToolBar::Floating;
Dock dock;
int dm1, dm2;
bool dm3;
- this->mainWindow()->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
+ this->mainWindow()->getLocation( (TQToolBar*)this, dock, dm1, dm3, dm2 );
if ( dock == DockUnmanaged ) {
return (KToolBar::BarPosition)DockTop;
}
@@ -817,7 +817,7 @@ int KToolBar::maxWidth()
}
-void KToolBar::setTitle (const QString& _title)
+void KToolBar::setTitle (const TQString& _title)
{
setLabel( _title );
}
@@ -853,8 +853,8 @@ void KToolBar::setIconText(IconText icontext, bool update)
if (doUpdate)
doModeChange(); // tell buttons what happened
- // ugly hack to force a QMainWindow::triggerLayout( true )
- QMainWindow *mw = mainWindow();
+ // ugly hack to force a TQMainWindow::triggerLayout( true )
+ TQMainWindow *mw = mainWindow();
if ( mw ) {
mw->setUpdatesEnabled( false );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -890,9 +890,9 @@ void KToolBar::setIconSize(int size, bool update)
if (doUpdate)
doModeChange(); // tell buttons what happened
- // ugly hack to force a QMainWindow::triggerLayout( true )
+ // ugly hack to force a TQMainWindow::triggerLayout( true )
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
mw->setUpdatesEnabled( false );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -911,7 +911,7 @@ int KToolBar::iconSize() const
int KToolBar::iconSizeDefault() const
{
- if (!::qstrcmp(QObject::name(), "mainToolBar"))
+ if (!::qstrcmp(TQObject::name(), "mainToolBar"))
return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
return KGlobal::iconLoader()->currentSize(KIcon::Toolbar);
@@ -963,19 +963,19 @@ void KToolBar::saveState()
// first, try to save to the xml file
if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() ) {
//kdDebug(220) << name() << " saveState: saving to " << d->m_xmlguiClient->xmlFile() << endl;
- QString barname(!::qstrcmp(name(), "unnamed") ? "mainToolBar" : name());
+ TQString barname(!::qstrcmp(name(), "unnamed") ? "mainToolBar" : name());
// try to find our toolbar
d->modified = false;
// go down one level to get to the right tags
- QDomElement current;
- for( QDomNode n = d->m_xmlguiClient->domDocument().documentElement().firstChild();
+ TQDomElement current;
+ for( TQDomNode n = d->m_xmlguiClient->domDocument().documentElement().firstChild();
!n.isNull(); n = n.nextSibling()) {
current = n.toElement();
if ( current.tagName().lower() != "toolbar" )
continue;
- QString curname(current.attribute( "name" ));
+ TQString curname(current.attribute( "name" ));
if ( curname == barname ) {
saveState( current );
@@ -987,21 +987,21 @@ void KToolBar::saveState()
return;
// now we load in the (non-merged) local file
- QString local_xml(KXMLGUIFactory::readConfigFile(d->m_xmlguiClient->xmlFile(), true, d->m_xmlguiClient->instance()));
- QDomDocument local;
+ TQString local_xml(KXMLGUIFactory::readConfigFile(d->m_xmlguiClient->xmlFile(), true, d->m_xmlguiClient->instance()));
+ TQDomDocument local;
local.setContent(local_xml);
// make sure we don't append if this toolbar already exists locally
bool just_append = true;
- for( QDomNode n = local.documentElement().firstChild();
+ for( TQDomNode n = local.documentElement().firstChild();
!n.isNull(); n = n.nextSibling()) {
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if ( elem.tagName().lower() != "toolbar" )
continue;
- QString curname(elem.attribute( "name" ));
+ TQString curname(elem.attribute( "name" ));
if ( curname == barname ) {
just_append = false;
@@ -1020,17 +1020,17 @@ void KToolBar::saveState()
// if that didn't work, we save to the config file
KConfig *config = KGlobal::config();
- saveSettings(config, QString::null);
+ saveSettings(config, TQString::null);
config->sync();
}
-QString KToolBar::settingsGroup() const
+TQString KToolBar::settingsGroup() const
{
- QString configGroup;
+ TQString configGroup;
if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar"))
configGroup = "Toolbar style";
else
- configGroup = QString(name()) + " Toolbar style";
+ configGroup = TQString(name()) + " Toolbar style";
if ( this->mainWindow() )
{
configGroup.prepend(" ");
@@ -1039,14 +1039,14 @@ QString KToolBar::settingsGroup() const
return configGroup;
}
-void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
+void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup)
{
- QString configGroup = _configGroup;
+ TQString configGroup = _configGroup;
if (configGroup.isEmpty())
configGroup = settingsGroup();
//kdDebug(220) << name() << " saveSettings() group=" << _configGroup << " -> " << configGroup << endl;
- QString position, icontext;
+ TQString position, icontext;
int index;
getAttributes( position, icontext, index );
@@ -1097,17 +1097,17 @@ void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
// Don't use kmw->toolBarIterator() because you might
// mess up someone else's iterator. Make the list on your own
- QPtrList<KToolBar> toolbarList;
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
+ TQPtrList<KToolBar> toolbarList;
+ TQPtrList<TQToolBar> lst;
+ for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
lst = kmw->toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) {
if ( !tb->inherits( "KToolBar" ) )
continue;
toolbarList.append( (KToolBar*)tb );
}
}
- QPtrListIterator<KToolBar> toolbarIterator( toolbarList );
+ TQPtrListIterator<KToolBar> toolbarIterator( toolbarList );
if ( !kmw || toolbarIterator.count() > 1 )
config->writeEntry("Index", index);
else
@@ -1130,13 +1130,13 @@ void KToolBar::setXMLGUIClient( KXMLGUIClient *client )
d->m_xmlguiClient = client;
}
-void KToolBar::setText( const QString & txt )
+void KToolBar::setText( const TQString & txt )
{
setLabel( txt + " (" + kapp->caption() + ") " );
}
-QString KToolBar::text() const
+TQString KToolBar::text() const
{
return label();
}
@@ -1144,22 +1144,22 @@ QString KToolBar::text() const
void KToolBar::doConnections( KToolBarButton *button )
{
- connect(button, SIGNAL(clicked(int)), this, SIGNAL( clicked( int ) ) );
- connect(button, SIGNAL(doubleClicked(int)), this, SIGNAL( doubleClicked( int ) ) );
- connect(button, SIGNAL(released(int)), this, SIGNAL( released( int ) ) );
- connect(button, SIGNAL(pressed(int)), this, SIGNAL( pressed( int ) ) );
- connect(button, SIGNAL(toggled(int)), this, SIGNAL( toggled( int ) ) );
- connect(button, SIGNAL(highlighted(int, bool)), this, SIGNAL( highlighted( int, bool ) ) );
+ connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) );
+ connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) );
+ connect(button, TQT_SIGNAL(released(int)), this, TQT_SIGNAL( released( int ) ) );
+ connect(button, TQT_SIGNAL(pressed(int)), this, TQT_SIGNAL( pressed( int ) ) );
+ connect(button, TQT_SIGNAL(toggled(int)), this, TQT_SIGNAL( toggled( int ) ) );
+ connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) );
}
-void KToolBar::mousePressEvent ( QMouseEvent *m )
+void KToolBar::mousePressEvent ( TQMouseEvent *m )
{
if ( !mainWindow() )
return;
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
if ( mw->toolBarsMovable() && d->m_enableContext ) {
if ( m->button() == RightButton ) {
- QGuardedPtr<KToolBar> guard( this );
+ TQGuardedPtr<KToolBar> guard( this );
int i = contextMenu()->exec( m->globalPos(), 0 );
// "Configure Toolbars" recreates toolbars, so we might not exist anymore.
if ( guard )
@@ -1212,7 +1212,7 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
void KToolBar::doModeChange()
{
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
w->blockSignals(false);
d->idleButtons.clear();
@@ -1221,20 +1221,20 @@ void KToolBar::doModeChange()
void KToolBar::rebuildLayout()
{
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
w->blockSignals(false);
d->idleButtons.clear();
layoutTimer->stop();
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
- QBoxLayout *l = boxLayout();
+ TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
+ TQBoxLayout *l = boxLayout();
// clear the old layout
- QLayoutIterator it = l->iterator();
+ TQLayoutIterator it = l->iterator();
while ( it.current() )
it.deleteCurrent();
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( w == rightAligned )
continue;
KToolBarSeparator *ktbs = dynamic_cast<KToolBarSeparator *>(w);
@@ -1243,11 +1243,11 @@ void KToolBar::rebuildLayout()
w->hide();
continue;
}
- if ( dynamic_cast<QPopupMenu *>(w) ) // w is a QPopupMenu?
+ if ( dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu?
continue;
l->addWidget( w );
w->show();
- if ((orientation() == Horizontal) && dynamic_cast<QLineEdit *>(w)) // w is QLineEdit ?
+ if ((orientation() == Horizontal) && dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ?
l->addSpacing(2); // A little bit extra spacing behind it.
}
if ( rightAligned ) {
@@ -1263,20 +1263,20 @@ void KToolBar::rebuildLayout()
l->setStretchFactor( stretchableWidget, 10 );
}
l->invalidate();
- QApplication::postEvent( this, new QEvent( QEvent::LayoutHint ) );
+ TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) );
}
-void KToolBar::childEvent( QChildEvent *e )
+void KToolBar::childEvent( TQChildEvent *e )
{
if ( e->child()->isWidgetType() ) {
- QWidget * w = dynamic_cast<QWidget *>(e->child());
+ TQWidget * w = dynamic_cast<TQWidget *>(e->child());
if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name())))
{
- QToolBar::childEvent( e );
+ TQToolBar::childEvent( e );
return;
}
- if ( e->type() == QEvent::ChildInserted ) {
- if ( !dynamic_cast<QPopupMenu *>(w)) { // e->child() is not a QPopupMenu
+ if ( e->type() == TQEvent::ChildInserted ) {
+ if ( !dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu
// prevent items that have been explicitly inserted by insert*() from
// being inserted again
if ( !widget2id.contains( w ) )
@@ -1291,25 +1291,25 @@ void KToolBar::childEvent( QChildEvent *e )
if ( isVisibleTo( 0 ) )
{
layoutTimer->start( 50, true );
- QBoxLayout *l = boxLayout();
+ TQBoxLayout *l = boxLayout();
// clear the old layout so that we don't get unnecassery layout
// changes till we have rebuild the thing
- QLayoutIterator it = l->iterator();
+ TQLayoutIterator it = l->iterator();
while ( it.current() )
it.deleteCurrent();
}
}
- QToolBar::childEvent( e );
+ TQToolBar::childEvent( e );
}
-void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
+void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id )
{
// we can't have it in widgets, or something is really wrong
//widgets.removeRef( w );
- connect( w, SIGNAL( destroyed() ),
- this, SLOT( widgetDestroyed() ) );
+ connect( w, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( widgetDestroyed() ) );
if ( index == -1 || index > (int)widgets.count() ) {
index = (int)widgets.count();
widgets.append( w );
@@ -1322,90 +1322,90 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
widget2id.insert( w, id );
}
-void KToolBar::showEvent( QShowEvent *e )
+void KToolBar::showEvent( TQShowEvent *e )
{
- QToolBar::showEvent( e );
+ TQToolBar::showEvent( e );
rebuildLayout();
}
-void KToolBar::setStretchableWidget( QWidget *w )
+void KToolBar::setStretchableWidget( TQWidget *w )
{
- QToolBar::setStretchableWidget( w );
+ TQToolBar::setStretchableWidget( w );
stretchableWidget = w;
}
-QSizePolicy KToolBar::sizePolicy() const
+TQSizePolicy KToolBar::sizePolicy() const
{
if ( orientation() == Horizontal )
- return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
else
- return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
+ return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding );
}
-QSize KToolBar::sizeHint() const
+TQSize KToolBar::sizeHint() const
{
- QSize minSize(0,0);
+ TQSize minSize(0,0);
KToolBar *ncThis = const_cast<KToolBar *>(this);
ncThis->polish();
- int margin = static_cast<QWidget*>(ncThis)->layout()->margin() + frameWidth();
+ int margin = static_cast<TQWidget*>(ncThis)->layout()->margin() + frameWidth();
switch( barPos() )
{
case KToolBar::Top:
case KToolBar::Bottom:
- for ( QWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
+ for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
{
- QSize sh = w->sizeHint();
- if ( w->sizePolicy().horData() == QSizePolicy::Ignored )
+ TQSize sh = w->sizeHint();
+ if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
sh.setWidth( 1 );
- if ( w->sizePolicy().verData() == QSizePolicy::Ignored )
+ if ( w->sizePolicy().verData() == TQSizePolicy::Ignored )
sh.setHeight( 1 );
sh = sh.boundedTo( w->maximumSize() )
- .expandedTo( w->minimumSize() ).expandedTo( QSize(1, 1) );
+ .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) );
- minSize = minSize.expandedTo(QSize(0, sh.height()));
- minSize += QSize(sh.width()+1, 0);
- if (dynamic_cast<QLineEdit *>(w)) // w is a QLineEdit ?
- minSize += QSize(2, 0); // A little bit extra spacing behind it.
+ minSize = minSize.expandedTo(TQSize(0, sh.height()));
+ minSize += TQSize(sh.width()+1, 0);
+ if (dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ?
+ minSize += TQSize(2, 0); // A little bit extra spacing behind it.
}
- minSize += QSize(QApplication::style().pixelMetric( QStyle::PM_DockWindowHandleExtent ), 0);
- minSize += QSize(margin*2, margin*2);
+ minSize += TQSize(TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0);
+ minSize += TQSize(margin*2, margin*2);
break;
case KToolBar::Left:
case KToolBar::Right:
- for ( QWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
+ for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
{
- QSize sh = w->sizeHint();
- if ( w->sizePolicy().horData() == QSizePolicy::Ignored )
+ TQSize sh = w->sizeHint();
+ if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
sh.setWidth( 1 );
- if ( w->sizePolicy().verData() == QSizePolicy::Ignored )
+ if ( w->sizePolicy().verData() == TQSizePolicy::Ignored )
sh.setHeight( 1 );
sh = sh.boundedTo( w->maximumSize() )
- .expandedTo( w->minimumSize() ).expandedTo( QSize(1, 1) );
+ .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) );
- minSize = minSize.expandedTo(QSize(sh.width(), 0));
- minSize += QSize(0, sh.height()+1);
+ minSize = minSize.expandedTo(TQSize(sh.width(), 0));
+ minSize += TQSize(0, sh.height()+1);
}
- minSize += QSize(0, QApplication::style().pixelMetric( QStyle::PM_DockWindowHandleExtent ));
- minSize += QSize(margin*2, margin*2);
+ minSize += TQSize(0, TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
+ minSize += TQSize(margin*2, margin*2);
break;
default:
- minSize = QToolBar::sizeHint();
+ minSize = TQToolBar::sizeHint();
break;
}
return minSize;
}
-QSize KToolBar::minimumSize() const
+TQSize KToolBar::minimumSize() const
{
return minimumSizeHint();
}
-QSize KToolBar::minimumSizeHint() const
+TQSize KToolBar::minimumSizeHint() const
{
return sizeHint();
}
@@ -1417,19 +1417,19 @@ bool KToolBar::highlight() const
void KToolBar::hide()
{
- QToolBar::hide();
+ TQToolBar::hide();
}
void KToolBar::show()
{
- QToolBar::show();
+ TQToolBar::show();
}
-void KToolBar::resizeEvent( QResizeEvent *e )
+void KToolBar::resizeEvent( TQResizeEvent *e )
{
bool b = isUpdatesEnabled();
setUpdatesEnabled( false );
- QToolBar::resizeEvent( e );
+ TQToolBar::resizeEvent( e );
if (b)
{
if (layoutTimer->isActive())
@@ -1464,13 +1464,13 @@ void KToolBar::slotReadConfig()
// Read appearance settings (hmm, we used to do both here,
// but a well behaved application will call applyMainWindowSettings
// anyway, right ?)
- applyAppearanceSettings(KGlobal::config(), QString::null );
+ applyAppearanceSettings(KGlobal::config(), TQString::null );
}
void KToolBar::slotAppearanceChanged()
{
// Read appearance settings from global file.
- applyAppearanceSettings(KGlobal::config(), QString::null, true /* lose local settings */ );
+ applyAppearanceSettings(KGlobal::config(), TQString::null, true /* lose local settings */ );
// And remember to save the new look later
KMainWindow *kmw = dynamic_cast<KMainWindow *>(mainWindow());
@@ -1481,25 +1481,25 @@ void KToolBar::slotAppearanceChanged()
//static
bool KToolBar::highlightSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- return KGlobal::config()->readBoolEntry(QString::fromLatin1("Highlighting"),true);
+ return KGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true);
}
//static
bool KToolBar::transparentSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- return KGlobal::config()->readBoolEntry(QString::fromLatin1("TransparentMoving"),true);
+ return KGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true);
}
//static
KToolBar::IconText KToolBar::iconTextSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- QString icontext = KGlobal::config()->readEntry(QString::fromLatin1("IconText"),QString::fromLatin1("IconOnly"));
+ TQString icontext = KGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly"));
if ( icontext == "IconTextRight" )
return IconTextRight;
else if ( icontext == "IconTextBottom" )
@@ -1510,9 +1510,9 @@ KToolBar::IconText KToolBar::iconTextSetting()
return IconOnly;
}
-void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal)
+void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal)
{
- QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
+ TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
//kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl;
// If we have application-specific settings in the XML file,
@@ -1524,10 +1524,10 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
KConfig *gconfig = KGlobal::config();
- static const QString &attrIconText = KGlobal::staticQString("IconText");
- static const QString &attrHighlight = KGlobal::staticQString("Highlighting");
- static const QString &attrTrans = KGlobal::staticQString("TransparentMoving");
- static const QString &attrIconSize = KGlobal::staticQString("IconSize");
+ static const TQString &attrIconText = KGlobal::staticQString("IconText");
+ static const TQString &attrHighlight = KGlobal::staticQString("Highlighting");
+ static const TQString &attrTrans = KGlobal::staticQString("TransparentMoving");
+ static const TQString &attrIconSize = KGlobal::staticQString("IconSize");
// we actually do this in two steps.
// First, we read in the global styles [Toolbar style] (from the KControl module).
@@ -1538,10 +1538,10 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
bool applyIconSize = !xmlgui;
int iconSize = d->IconSizeDefault;
- QString iconText = d->IconTextDefault;
+ TQString iconText = d->IconTextDefault;
// this is the first iteration
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
{ // start block for KConfigGroupSaver
KConfigGroupSaver saver(gconfig, grpToolbar);
@@ -1612,7 +1612,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
doUpdate = true;
}
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
// ...and if we should highlight
if ( highlight != d->m_highlight ) {
@@ -1632,16 +1632,16 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
updateGeometry();
}
-void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
+void KToolBar::applySettings(KConfig *config, const TQString &_configGroup)
{
return applySettings(config,_configGroup,false);
}
-void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool force)
+void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool force)
{
//kdDebug(220) << name() << " applySettings group=" << _configGroup << endl;
- QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
+ TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
/*
Let's explain this a bit more in details.
@@ -1665,13 +1665,13 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool
{
KConfigGroupSaver cgs(config, configGroup);
- static const QString &attrPosition = KGlobal::staticQString("Position");
- static const QString &attrIndex = KGlobal::staticQString("Index");
- static const QString &attrOffset = KGlobal::staticQString("Offset");
- static const QString &attrNewLine = KGlobal::staticQString("NewLine");
- static const QString &attrHidden = KGlobal::staticQString("Hidden");
+ static const TQString &attrPosition = KGlobal::staticQString("Position");
+ static const TQString &attrIndex = KGlobal::staticQString("Index");
+ static const TQString &attrOffset = KGlobal::staticQString("Offset");
+ static const TQString &attrNewLine = KGlobal::staticQString("NewLine");
+ static const TQString &attrHidden = KGlobal::staticQString("Hidden");
- QString position = config->readEntry(attrPosition, d->PositionDefault);
+ TQString position = config->readEntry(attrPosition, d->PositionDefault);
int index = config->readNumEntry(attrIndex, -1);
int offset = config->readNumEntry(attrOffset, d->OffsetDefault);
bool newLine = config->readBoolEntry(attrNewLine, d->NewLineDefault);
@@ -1708,21 +1708,21 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool
}
}
-bool KToolBar::event( QEvent *e )
+bool KToolBar::event( TQEvent *e )
{
- if ( (e->type() == QEvent::LayoutHint) && isUpdatesEnabled() )
+ if ( (e->type() == TQEvent::LayoutHint) && isUpdatesEnabled() )
d->repaintTimer.start( 100, true );
- if (e->type() == QEvent::ChildInserted )
+ if (e->type() == TQEvent::ChildInserted )
{
- // Bypass QToolBar::event,
+ // Bypass TQToolBar::event,
// it will show() the inserted child and we don't want to
// do that until we have rebuilt the layout.
- childEvent((QChildEvent *)e);
+ childEvent((TQChildEvent *)e);
return true;
}
- return QToolBar::event( e );
+ return TQToolBar::event( e );
}
void KToolBar::slotRepaint()
@@ -1731,26 +1731,26 @@ void KToolBar::slotRepaint()
// Send a resizeEvent to update the "toolbar extension arrow"
// (The button you get when your toolbar-items don't fit in
// the available space)
- QResizeEvent ev(size(), size());
+ TQResizeEvent ev(size(), size());
resizeEvent(&ev);
- QApplication::sendPostedEvents( this, QEvent::LayoutHint );
+ TQApplication::sendPostedEvents( this, TQEvent::LayoutHint );
setUpdatesEnabled( true );
repaint( true );
}
-void KToolBar::toolBarPosChanged( QToolBar *tb )
+void KToolBar::toolBarPosChanged( TQToolBar *tb )
{
if ( tb != this )
return;
if ( d->oldPos == DockMinimized )
rebuildLayout();
- d->oldPos = (QMainWindow::ToolBarDock)barPos();
+ d->oldPos = (TQMainWindow::ToolBarDock)barPos();
KMainWindow *kmw = dynamic_cast<KMainWindow *>(mainWindow());
if ( kmw )
kmw->setSettingsDirty();
}
-static KToolBar::Dock stringToDock( const QString& attrPosition )
+static KToolBar::Dock stringToDock( const TQString& attrPosition )
{
KToolBar::Dock dock = KToolBar::DockTop;
if ( !attrPosition.isEmpty() ) {
@@ -1771,15 +1771,15 @@ static KToolBar::Dock stringToDock( const QString& attrPosition )
}
-void KToolBar::loadState( const QDomElement &element )
+void KToolBar::loadState( const TQDomElement &element )
{
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
if ( !mw )
return;
{
- QCString text = element.namedItem( "text" ).toElement().text().utf8();
+ TQCString text = element.namedItem( "text" ).toElement().text().utf8();
if ( text.isEmpty() )
text = element.namedItem( "Text" ).toElement().text().utf8();
if ( !text.isEmpty() )
@@ -1787,7 +1787,7 @@ void KToolBar::loadState( const QDomElement &element )
}
{
- QCString attrFullWidth = element.attribute( "fullWidth" ).lower().latin1();
+ TQCString attrFullWidth = element.attribute( "fullWidth" ).lower().latin1();
if ( !attrFullWidth.isEmpty() )
setFullSize( attrFullWidth == "true" );
}
@@ -1825,7 +1825,7 @@ void KToolBar::loadState( const QDomElement &element )
Dock dock = stringToDock( element.attribute( "position" ).lower() );
{
- QCString attrIconText = element.attribute( "iconText" ).lower().latin1();
+ TQCString attrIconText = element.attribute( "iconText" ).lower().latin1();
if ( !attrIconText.isEmpty() ) {
//kdDebug(220) << name() << " loadState attrIconText=" << attrIconText << endl;
if ( attrIconText == "icontextright" )
@@ -1847,7 +1847,7 @@ void KToolBar::loadState( const QDomElement &element )
}
}
- QString attrIconSize = element.attribute( "iconSize" ).lower();
+ TQString attrIconSize = element.attribute( "iconSize" ).lower();
int iconSize = d->IconSizeDefault;
if ( !attrIconSize.isEmpty() )
iconSize = attrIconSize.toInt();
@@ -1856,7 +1856,7 @@ void KToolBar::loadState( const QDomElement &element )
int index = -1; // append by default. This is very important, otherwise
// with all 0 indexes, we keep reversing the toolbars.
{
- QString attrIndex = element.attribute( "index" ).lower();
+ TQString attrIndex = element.attribute( "index" ).lower();
if ( !attrIndex.isEmpty() )
index = attrIndex.toInt();
}
@@ -1866,19 +1866,19 @@ void KToolBar::loadState( const QDomElement &element )
bool hidden = d->HiddenDefault;
{
- QString attrOffset = element.attribute( "offset" );
+ TQString attrOffset = element.attribute( "offset" );
if ( !attrOffset.isEmpty() )
offset = attrOffset.toInt();
}
{
- QString attrNewLine = element.attribute( "newline" ).lower();
+ TQString attrNewLine = element.attribute( "newline" ).lower();
if ( !attrNewLine.isEmpty() )
newLine = attrNewLine == "true";
}
{
- QString attrHidden = element.attribute( "hidden" ).lower();
+ TQString attrHidden = element.attribute( "hidden" ).lower();
if ( !attrHidden.isEmpty() ) {
hidden = attrHidden == "true";
}
@@ -1919,7 +1919,7 @@ int KToolBar::dockWindowIndex()
int index = 0;
Q_ASSERT( mainWindow() );
if ( mainWindow() ) {
- QMainWindow::ToolBarDock dock;
+ TQMainWindow::ToolBarDock dock;
bool newLine;
int offset;
mainWindow()->getLocation( this, dock, index, newLine, offset );
@@ -1927,7 +1927,7 @@ int KToolBar::dockWindowIndex()
return index;
}
-void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
+void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index )
{
// get all of the stuff to save
switch ( barPos() ) {
@@ -1972,10 +1972,10 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
//kdDebug(220) << name() << " getAttributes: icontext=" << icontext << endl;
}
-void KToolBar::saveState( QDomElement &current )
+void KToolBar::saveState( TQDomElement &current )
{
Q_ASSERT( !current.isNull() );
- QString position, icontext;
+ TQString position, icontext;
int index = -1;
getAttributes( position, icontext, index );
@@ -2035,7 +2035,7 @@ KPopupMenu *KToolBar::contextMenu()
if ( context )
return context;
// Construct our context popup menu. Name it qt_dockwidget_internal so it
- // won't be deleted by QToolBar::clear().
+ // won't be deleted by TQToolBar::clear().
context = new KPopupMenu( this, "qt_dockwidget_internal" );
context->insertTitle(i18n("Toolbar Menu"));
@@ -2058,10 +2058,10 @@ KPopupMenu *KToolBar::contextMenu()
size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
// Query the current theme for available sizes
KIconTheme *theme = KGlobal::instance()->iconLoader()->theme();
- QValueList<int> avSizes;
+ TQValueList<int> avSizes;
if (theme)
{
- if (!::qstrcmp(QObject::name(), "mainToolBar"))
+ if (!::qstrcmp(TQObject::name(), "mainToolBar"))
avSizes = theme->querySizes( KIcon::MainToolbar);
else
avSizes = theme->querySizes( KIcon::Toolbar);
@@ -2070,12 +2070,12 @@ KPopupMenu *KToolBar::contextMenu()
d->iconSizes = avSizes;
qHeapSort(avSizes);
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
if (avSizes.count() < 10) {
// Fixed or threshold type icons
- QValueList<int>::Iterator end(avSizes.end());
+ TQValueList<int>::Iterator end(avSizes.end());
for (it=avSizes.begin(); it!=end; ++it) {
- QString text;
+ TQString text;
if ( *it < 19 )
text = i18n("Small (%1x%2)").arg(*it).arg(*it);
else if (*it < 25)
@@ -2096,7 +2096,7 @@ KPopupMenu *KToolBar::contextMenu()
for (uint i = 0; i < 9; i++) {
while (it++ != avSizes.end()) {
if (*it >= progression[i]) {
- QString text;
+ TQString text;
if ( *it < 19 )
text = i18n("Small (%1x%2)").arg(*it).arg(*it);
else if (*it < 25)
@@ -2119,10 +2119,10 @@ KPopupMenu *KToolBar::contextMenu()
context->setItemChecked(CONTEXT_ICONS, true);
context->insertItem( i18n("Icon Size"), size );
- connect( context, SIGNAL( aboutToShow() ), this, SLOT( slotContextAboutToShow() ) );
+ connect( context, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotContextAboutToShow() ) );
// Unplugging a submenu from abouttohide leads to the popupmenu floating around
// So better simply call that code from after exec() returns (DF)
- //connect( context, SIGNAL( aboutToHide() ), this, SLOT( slotContextAboutToHide() ) );
+ //connect( context, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotContextAboutToHide() ) );
return context;
}
@@ -2151,7 +2151,7 @@ void KToolBar::slotContextAboutToShow()
configureAction = kmw->actionCollection()->action(actionName);
if ( configureAction )
configureAction->plug(context);
- KEditToolbar::setDefaultToolbar(QObject::name());
+ KEditToolbar::setDefaultToolbar(TQObject::name());
for(int i = CONTEXT_ICONS; i <= CONTEXT_TEXTUNDER; ++i)
context->setItemChecked(i, false);
@@ -2173,8 +2173,8 @@ void KToolBar::slotContextAboutToShow()
break;
}
- QValueList<int>::ConstIterator iIt = d->iconSizes.begin();
- QValueList<int>::ConstIterator iEnd = d->iconSizes.end();
+ TQValueList<int>::ConstIterator iIt = d->iconSizes.begin();
+ TQValueList<int>::ConstIterator iEnd = d->iconSizes.end();
for (; iIt != iEnd; ++iIt )
context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false );
@@ -2228,24 +2228,24 @@ void KToolBar::slotContextAboutToHide()
if ( configureAction )
configureAction->unplug(context);
- QPtrListIterator<QWidget> it( widgets );
- QWidget *wdg;
+ TQPtrListIterator<TQWidget> it( widgets );
+ TQWidget *wdg;
while ( ( wdg = it.current() ) != 0 ) {
- if ( wdg->inherits( "QToolButton" ) )
- static_cast<QToolButton*>( wdg )->setDown( false );
+ if ( wdg->inherits( "TQToolButton" ) )
+ static_cast<TQToolButton*>( wdg )->setDown( false );
++it;
}
}
void KToolBar::widgetDestroyed()
{
- removeWidgetInternal( (QWidget*)sender() );
+ removeWidgetInternal( (TQWidget*)sender() );
}
-void KToolBar::removeWidgetInternal( QWidget * w )
+void KToolBar::removeWidgetInternal( TQWidget * w )
{
widgets.removeRef( w );
- QMap< QWidget*, int >::Iterator it = widget2id.find( w );
+ TQMap< TQWidget*, int >::Iterator it = widget2id.find( w );
if ( it == widget2id.end() )
return;
id2widget.remove( *it );
diff --git a/kdeui/ktoolbar.h b/kdeui/ktoolbar.h
index 3deab0f73..0eb974f24 100644
--- a/kdeui/ktoolbar.h
+++ b/kdeui/ktoolbar.h
@@ -24,14 +24,14 @@
#ifndef KTOOLBAR_H
#define KTOOLBAR_H
-#include <qtoolbar.h>
-#include <qmainwindow.h>
-#include <qcombobox.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qguardedptr.h>
-#include <qframe.h>
-#include <qiconset.h>
+#include <tqtoolbar.h>
+#include <tqmainwindow.h>
+#include <tqcombobox.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqframe.h>
+#include <tqiconset.h>
#include <kglobal.h>
@@ -59,17 +59,17 @@ class KDEUI_EXPORT KToolBarSeparator : public QFrame
{
Q_OBJECT
public:
- KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 );
+ KToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
Orientation orientation() const { return orient; }
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
bool showLine() const { return line; }
public slots:
void setOrientation( Orientation );
protected:
- void styleChange( QStyle& );
- void drawContents( QPainter* );
+ void styleChange( TQStyle& );
+ void drawContents( TQPainter* );
private:
Orientation orient;
bool line;
@@ -108,7 +108,7 @@ class KDEUI_EXPORT KToolBar : public QToolBar
Q_PROPERTY( BarPosition barPos READ barPos WRITE setBarPos )
Q_PROPERTY( bool fullSize READ fullSize WRITE setFullSize )
Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize )
- Q_PROPERTY( QString text READ text WRITE setText )
+ Q_PROPERTY( TQString text READ text WRITE setText )
public:
enum IconText{IconOnly = 0, IconTextRight, TextOnly, IconTextBottom};
@@ -125,7 +125,7 @@ public:
/**
* Normal constructor.
* This constructor is used by the XML-GUI. If you use it, you need
- * to call QMainWindow::addToolBar to specify the position of the toolbar.
+ * to call TQMainWindow::addToolBar to specify the position of the toolbar.
* So it's simpler to use the other constructor.
*
* The toolbar will read in various global config settings for
@@ -139,7 +139,7 @@ public:
* @param honorStyle If true, then global settings for IconSize and IconText will be honored
* @param readConfig whether to apply the configuration (global and application-specific)
*/
- KToolBar( QWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true );
+ KToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
* Constructor for non-XML-GUI applications.
@@ -150,13 +150,13 @@ public:
* true. All other toolbars will be IconOnly and use Medium icons.
*
* @param parentWindow The window that should be the parent of this toolbar
- * @param dock The position of the toolbar. Usually QMainWindow::Top.
+ * @param dock The position of the toolbar. Usually TQMainWindow::Top.
* @param newLine If true, start a new line in the dock for this toolbar.
* @param name The standard internal name
* @param honorStyle If true, then global settings for IconSize and IconText will be honored
* @param readConfig whether to apply the configuration (global and application-specific)
*/
- KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
+ KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false,
const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
@@ -174,7 +174,7 @@ public:
* @param honorStyle If true, then global settings for IconSize and IconText will be honored
* @param readConfig whether to apply the configuration (global and application-specific)
*/
- KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine = false,
+ KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false,
const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
@@ -203,8 +203,8 @@ public:
*
* @return The item index.
*/
- int insertButton(const QString& icon, int id, bool enabled = true,
- const QString& text = QString::null, int index=-1,
+ int insertButton(const TQString& icon, int id, bool enabled = true,
+ const TQString& text = TQString::null, int index=-1,
KInstance *_instance = KGlobal::instance());
/**
@@ -225,9 +225,9 @@ public:
*
* @return The item index.
*/
- int insertButton(const QString& icon, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled = true, const QString& text = QString::null,
+ int insertButton(const TQString& icon, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled = true, const TQString& text = TQString::null,
int index=-1, KInstance *_instance = KGlobal::instance() );
/**
@@ -254,8 +254,8 @@ public:
*
* @return The item index.
*/
- int insertButton(const QPixmap& pixmap, int id, bool enabled = true,
- const QString& text = QString::null, int index=-1 );
+ int insertButton(const TQPixmap& pixmap, int id, bool enabled = true,
+ const TQString& text = TQString::null, int index=-1 );
/**
* This is the same as above, but with specified signals and
@@ -274,9 +274,9 @@ public:
*
* @return The item index.
*/
- int insertButton(const QPixmap& pixmap, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled = true, const QString& text = QString::null,
+ int insertButton(const TQPixmap& pixmap, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled = true, const TQString& text = TQString::null,
int index=-1 );
/**
@@ -288,11 +288,11 @@ public:
* KButton::clicked() or KButton::doubleClicked() are @p not
* emmited by
* this button (see setDelayedPopup() for that).
- * You can add custom popups which inherit QPopupMenu to get popups
+ * You can add custom popups which inherit TQPopupMenu to get popups
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QString& icon, int id, QPopupMenu *popup,
- bool enabled, const QString&_text, int index=-1);
+ int insertButton(const TQString& icon, int id, TQPopupMenu *popup,
+ bool enabled, const TQString&_text, int index=-1);
/**
* Inserts a button with popupmenu.
@@ -303,11 +303,11 @@ public:
* KButton::clicked() or KButton::doubleClicked() are @p not
* emmited by
* this button (see setDelayedPopup() for that).
- * You can add custom popups which inherit QPopupMenu to get popups
+ * You can add custom popups which inherit TQPopupMenu to get popups
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
- bool enabled, const QString&_text, int index=-1);
+ int insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup,
+ bool enabled, const TQString&_text, int index=-1);
/**
* Inserts a KLineEdit. You have to specify signals and slots to
@@ -321,11 +321,11 @@ public:
* @see KLineEdit
* @return Item index.
*/
- int insertLined (const QString& text, int id,
+ int insertLined (const TQString& text, int id,
const char *signal,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
bool enabled = true,
- const QString& toolTipText = QString::null,
+ const TQString& toolTipText = TQString::null,
int size = 70, int index =-1);
/**
@@ -342,12 +342,12 @@ public:
* @see KComboBox
* @return Item index.
*/
- int insertCombo (const QStringList &list, int id, bool writable,
- const char *signal, const QObject *receiver,
+ int insertCombo (const TQStringList &list, int id, bool writable,
+ const char *signal, const TQObject *receiver,
const char *slot, bool enabled=true,
- const QString& tooltiptext=QString::null,
+ const TQString& tooltiptext=TQString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ TQComboBox::Policy policy = TQComboBox::AtBottom);
/**
* Insert a KComboBox with text.
@@ -358,12 +358,12 @@ public:
* @see KComboBox
* @return Item index.
*/
- int insertCombo (const QString& text, int id, bool writable,
- const char *signal, QObject *receiver,
+ int insertCombo (const TQString& text, int id, bool writable,
+ const char *signal, TQObject *receiver,
const char *slot, bool enabled=true,
- const QString& tooltiptext=QString::null,
+ const TQString& tooltiptext=TQString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ TQComboBox::Policy policy = TQComboBox::AtBottom);
/**
* Inserts a separator into the toolbar with the given @p id.
@@ -381,13 +381,13 @@ public:
* Inserts a user-defined widget. The widget @p must have this
* toolbar as its parent.
*
- * Widget must have a QWidget for base class. Widget can be
+ * Widget must have a TQWidget for base class. Widget can be
* autosized to full width. If you forget about it, you can get a
* pointer to this widget with getWidget().
* @see setItemAutoSized()
* @return Item index.
*/
- int insertWidget(int id, int width, QWidget *_widget, int index=-1);
+ int insertWidget(int id, int width, TQWidget *_widget, int index=-1);
/**
* Inserts an animated widget. A KAnimWidget will be created
@@ -405,8 +405,8 @@ public:
*
* @return The item index
*/
- int insertAnimatedWidget(int id, QObject *receiver, const char *slot,
- const QString& icons, int index = -1);
+ int insertAnimatedWidget(int id, TQObject *receiver, const char *slot,
+ const TQString& icons, int index = -1);
/**
* This will return a pointer to the animated widget with the
@@ -425,7 +425,7 @@ public:
* know the @p id of particular item. Nothing happens if you forget @p id.
*/
void addConnection (int id, const char *signal,
- const QObject *receiver, const char *slot);
+ const TQObject *receiver, const char *slot);
/**
* Enables/disables item.
*/
@@ -436,21 +436,21 @@ public:
*
* Can be used while button is visible.
*/
- void setButtonIcon( int id, const QString& _icon );
+ void setButtonIcon( int id, const TQString& _icon );
/**
* Sets button pixmap.
*
* Can be used while button is visible.
*/
- void setButtonPixmap( int id, const QPixmap& _pixmap );
+ void setButtonPixmap( int id, const TQPixmap& _pixmap );
/**
- * Sets a button icon from a QIconSet.
+ * Sets a button icon from a TQIconSet.
*
* Can be used while button is visible.
*/
- void setButtonIconSet( int id, const QIconSet& iconset );
+ void setButtonIconSet( int id, const TQIconSet& iconset );
/**
* Sets a delayed popup for a button.
@@ -464,8 +464,8 @@ public:
* You will insert a normal button with connection (or use signals from
* toolbar):
* \code
- * bar->insertButton(icon, id, SIGNAL(clicked ()), this,
- * SLOT (slotClick()), true, "click or wait for popup");
+ * bar->insertButton(icon, id, TQT_SIGNAL(clicked ()), this,
+ * TQT_SLOT (slotClick()), true, "click or wait for popup");
* \endcode
* And then add a delayed popup:
* \code
@@ -474,11 +474,11 @@ public:
*
* Don't add delayed popups to buttons which have normal popups.
*
- * You may add popups which are derived from QPopupMenu. You may
+ * You may add popups which are derived from TQPopupMenu. You may
* add popups that are already in the menu bar or are submenus of
* other popups.
*/
- void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false);
+ void setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle = false);
/**
* Turns a button into an autorepeat button.
@@ -490,7 +490,7 @@ public:
* When the user presses this button, you will receive the signal clicked(),
* and if the button is still pressed after some time,
* you will receive more clicked() signals separated by regular
- * intervals. Since this uses QButton::setAutoRepeat() ,
+ * intervals. Since this uses TQButton::setAutoRepeat() ,
* I can't quantify 'some'.
*/
void setAutoRepeat (int id, bool flag=true);
@@ -535,23 +535,23 @@ public:
*
* Cursor is set at end of text.
*/
- void setLinedText (int id, const QString& text);
+ void setLinedText (int id, const TQString& text);
/**
* Returns the line editor text.
* @return the line editor text.
*/
- QString getLinedText (int id) const;
+ TQString getLinedText (int id) const;
/**
* Inserts @p text in combobox @p id at position @p index.
*/
- void insertComboItem (int id, const QString& text, int index);
+ void insertComboItem (int id, const TQString& text, int index);
/**
* Inserts @p list in combobox @p id at position @p index.
*/
- void insertComboList (int id, const QStringList &list, int index);
+ void insertComboList (int id, const TQStringList &list, int index);
/**
* Removes item @p index from combobox @p id.
@@ -568,7 +568,7 @@ public:
*
* @p index = -1 refers current item (one displayed in the button).
*/
- void changeComboItem (int id, const QString& text, int index=-1);
+ void changeComboItem (int id, const TQString& text, int index=-1);
/**
* Clears the combobox @p id.
@@ -584,7 +584,7 @@ public:
* @p index = -1 refers to current item.
*/
- QString getComboItem (int id, int index=-1) const;
+ TQString getComboItem (int id, int index=-1) const;
/**
* Returns a pointer to the combobox with @p id.
@@ -609,7 +609,7 @@ public:
* \endcode
* That way you can get access to other public methods
* that KLineEdit provides. KLineEdit is the same thing
- * as QLineEdit plus completion signals.
+ * as TQLineEdit plus completion signals.
*/
KLineEdit * getLined (int id);
@@ -642,11 +642,11 @@ public:
* Wrong ids are not tested.
* You can do with this whatever you want,
* except change its height (hardcoded). If you change its width
- * you will probably have to call QToolBar::updateRects(true)
+ * you will probably have to call TQToolBar::updateRects(true)
* @see QWidget
* @see updateRects()
*/
- QWidget *getWidget (int id); // ### KDE4: make this const!
+ TQWidget *getWidget (int id); // ### KDE4: make this const!
/**
* Set item autosized.
@@ -790,7 +790,7 @@ public:
* Titles are however not (yet)
* visible. You can't change toolbar's title while it's floating.
*/
- void setTitle (const QString& _title);
+ void setTitle (const TQString& _title);
/**
* Use setMovingEnabled(bool) instead.
@@ -903,15 +903,15 @@ public:
/**
* Save the toolbar settings to group @p configGroup in @p config.
*/
- void saveSettings(KConfig *config, const QString &configGroup);
+ void saveSettings(KConfig *config, const TQString &configGroup);
/**
* Read the toolbar settings from group @p configGroup in @p config
* and apply them. Even default settings are re-applied if @p force is set.
*/
- void applySettings(KConfig *config, const QString &configGroup,bool force);
+ void applySettings(KConfig *config, const TQString &configGroup,bool force);
// KDE4 merge with force=false
- void applySettings(KConfig *config, const QString &configGroup);
+ void applySettings(KConfig *config, const TQString &configGroup);
/*
* Tell the toolbar what XML-GUI resource file it should use to save
@@ -924,7 +924,7 @@ public:
* @param xml The DOM document for the XML-GUI building
* @internal
*/
- // void setXML(const QString& xmlfile, const QDomDocument& xml);
+ // void setXML(const TQString& xmlfile, const TQDomDocument& xml);
void setXMLGUIClient( KXMLGUIClient *client );
@@ -932,20 +932,20 @@ public:
* Assign a (translated) text to this toolbar. This is used
* for the tooltip on the handle, and when listing the toolbars.
*/
- void setText( const QString & txt );
+ void setText( const TQString & txt );
/**
* Returns the toolbar's text.
* @return the toolbar's text.
*/
- QString text() const;
+ TQString text() const;
- void setStretchableWidget( QWidget *w );
- QSizePolicy sizePolicy() const;
+ void setStretchableWidget( TQWidget *w );
+ TQSizePolicy sizePolicy() const;
bool highlight() const;
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSize minimumSize() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize minimumSize() const;
void hide();
void show();
@@ -955,11 +955,11 @@ public:
/**
* Load state from an XML element, called by KXMLGUIBuilder
*/
- void loadState( const QDomElement &e );
+ void loadState( const TQDomElement &e );
/*
* Save state into an XML element, called by KXMLGUIBuilder
*/
- void saveState( QDomElement &e );
+ void saveState( TQDomElement &e );
/**
* @internal
@@ -979,7 +979,7 @@ signals:
* recive two clicked() , pressed() and released() signals.
* There is no way to avoid it - at least no easy way.
* If you need to resolve this all you can do is set up timers
- * which wait for QApplication::doubleClickInterval() to expire.
+ * which wait for TQApplication::doubleClickInterval() to expire.
* If in that time you don't get this signal, you may belive that
* button was only clicked and not double-clicked.
* And please note that butons with popup menus do not emit this signal,
@@ -1079,17 +1079,17 @@ public:
static IconText iconTextSetting();
public slots:
- virtual void setIconText( const QString &txt )
- { QToolBar::setIconText( txt ); }
+ virtual void setIconText( const TQString &txt )
+ { TQToolBar::setIconText( txt ); }
protected:
- void mousePressEvent( QMouseEvent * );
- void childEvent( QChildEvent *e );
- void showEvent( QShowEvent *e );
- void resizeEvent( QResizeEvent *e );
- bool event( QEvent *e );
- void applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal = false);
- QString settingsGroup() const;
+ void mousePressEvent( TQMouseEvent * );
+ void childEvent( TQChildEvent *e );
+ void showEvent( TQShowEvent *e );
+ void resizeEvent( TQResizeEvent *e );
+ bool event( TQEvent *e );
+ void applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal = false);
+ TQString settingsGroup() const;
private slots:
void rebuildLayout();
@@ -1097,7 +1097,7 @@ private slots:
void slotAppearanceChanged();
void slotIconChanged(int);
void slotRepaint();
- void toolBarPosChanged( QToolBar *tb );
+ void toolBarPosChanged( TQToolBar *tb );
void slotContextAboutToShow();
void slotContextAboutToHide();
void widgetDestroyed();
@@ -1105,20 +1105,20 @@ private slots:
private:
void init( bool readConfig = true, bool honorStyle = false );
void doConnections( KToolBarButton *button );
- void insertWidgetInternal( QWidget *w, int &index, int id );
- void removeWidgetInternal( QWidget *w );
- void getAttributes( QString &position, QString &icontext, int &index );
+ void insertWidgetInternal( TQWidget *w, int &index, int id );
+ void removeWidgetInternal( TQWidget *w );
+ void getAttributes( TQString &position, TQString &icontext, int &index );
int dockWindowIndex();
KPopupMenu *contextMenu();
void doModeChange();
- QMap<QWidget*, int > widget2id;
- typedef QMap<int, QWidget* > Id2WidgetMap;
+ TQMap<TQWidget*, int > widget2id;
+ typedef TQMap<int, TQWidget* > Id2WidgetMap;
Id2WidgetMap id2widget;
KPopupMenu *context;
- QPtrList<QWidget> widgets;
- QTimer *layoutTimer;
- QGuardedPtr<QWidget> stretchableWidget, rightAligned;
+ TQPtrList<TQWidget> widgets;
+ TQTimer *layoutTimer;
+ TQGuardedPtr<TQWidget> stretchableWidget, rightAligned;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/ktoolbarbutton.cpp b/kdeui/ktoolbarbutton.cpp
index 919bfbe70..765b2e433 100644
--- a/kdeui/ktoolbarbutton.cpp
+++ b/kdeui/ktoolbarbutton.cpp
@@ -27,16 +27,16 @@
#include "ktoolbarbutton.h"
#include "ktoolbar.h"
-#include <qstyle.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qdrawutil.h>
-#include <qtooltip.h>
-#include <qbitmap.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qlayout.h>
+#include <tqstyle.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqdrawutil.h>
+#include <tqtooltip.h>
+#include <tqbitmap.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@
// needed to get our instance
#include <kmainwindow.h>
-template class QIntDict<KToolBarButton>;
+template class TQIntDict<KToolBarButton>;
class KToolBarButtonPrivate
{
@@ -64,7 +64,7 @@ public:
m_isRaised = false;
m_isActive = false;
- m_iconName = QString::null;
+ m_iconName = TQString::null;
m_iconText = KToolBar::IconOnly;
m_iconSize = 0;
@@ -84,21 +84,21 @@ public:
bool m_isRaised: 1;
bool m_isActive: 1;
- QString m_iconName;
+ TQString m_iconName;
KToolBar *m_parent;
KToolBar::IconText m_iconText;
int m_iconSize;
- QSize size;
+ TQSize size;
- QPoint m_mousePressPos;
+ TQPoint m_mousePressPos;
KInstance *m_instance;
};
// This will construct a separator
-KToolBarButton::KToolBarButton( QWidget *_parent, const char *_name )
- : QToolButton( _parent , _name)
+KToolBarButton::KToolBarButton( TQWidget *_parent, const char *_name )
+ : TQToolButton( _parent , _name)
{
d = new KToolBarButtonPrivate;
@@ -107,32 +107,32 @@ KToolBarButton::KToolBarButton( QWidget *_parent, const char *_name )
d->m_isSeparator = true;
}
-KToolBarButton::KToolBarButton( const QString& _icon, int _id,
- QWidget *_parent, const char *_name,
- const QString &_txt, KInstance *_instance )
- : QToolButton( _parent, _name ), d( 0 )
+KToolBarButton::KToolBarButton( const TQString& _icon, int _id,
+ TQWidget *_parent, const char *_name,
+ const TQString &_txt, KInstance *_instance )
+ : TQToolButton( _parent, _name ), d( 0 )
{
d = new KToolBarButtonPrivate;
d->m_id = _id;
- QToolButton::setTextLabel(_txt);
+ TQToolButton::setTextLabel(_txt);
d->m_instance = _instance;
d->m_parent = dynamic_cast<KToolBar*>(_parent);
if (d->m_parent) {
- connect(d->m_parent, SIGNAL( modechange() ),
- this, SLOT( modeChange() ));
+ connect(d->m_parent, TQT_SIGNAL( modechange() ),
+ this, TQT_SLOT( modeChange() ));
}
setFocusPolicy( NoFocus );
// connect all of our slots and start trapping events
- connect(this, SIGNAL( clicked() ),
- this, SLOT( slotClicked() ) );
- connect(this, SIGNAL( pressed() ),
- this, SLOT( slotPressed() ) );
- connect(this, SIGNAL( released() ),
- this, SLOT( slotReleased() ) );
+ connect(this, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClicked() ) );
+ connect(this, TQT_SIGNAL( pressed() ),
+ this, TQT_SLOT( slotPressed() ) );
+ connect(this, TQT_SIGNAL( released() ),
+ this, TQT_SLOT( slotReleased() ) );
installEventFilter(this);
d->m_iconName = _icon;
@@ -141,35 +141,35 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id,
modeChange();
}
-KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
- QWidget *_parent, const char *name,
- const QString& txt)
- : QToolButton( _parent, name ), d( 0 )
+KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id,
+ TQWidget *_parent, const char *name,
+ const TQString& txt)
+ : TQToolButton( _parent, name ), d( 0 )
{
d = new KToolBarButtonPrivate;
d->m_id = _id;
- QToolButton::setTextLabel(txt);
+ TQToolButton::setTextLabel(txt);
d->m_parent = dynamic_cast<KToolBar*>(_parent);
if (d->m_parent) {
- connect(d->m_parent, SIGNAL( modechange() ),
- this, SLOT( modeChange() ));
+ connect(d->m_parent, TQT_SIGNAL( modechange() ),
+ this, TQT_SLOT( modeChange() ));
}
setFocusPolicy( NoFocus );
// connect all of our slots and start trapping events
- connect(this, SIGNAL( clicked() ),
- this, SLOT( slotClicked() ));
- connect(this, SIGNAL( pressed() ),
- this, SLOT( slotPressed() ));
- connect(this, SIGNAL( released() ),
- this, SLOT( slotReleased() ));
+ connect(this, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClicked() ));
+ connect(this, TQT_SIGNAL( pressed() ),
+ this, TQT_SLOT( slotPressed() ));
+ connect(this, TQT_SIGNAL( released() ),
+ this, TQT_SLOT( slotReleased() ));
installEventFilter(this);
// set our pixmap and do our initial setup
- setIconSet( QIconSet( pixmap ));
+ setIconSet( TQIconSet( pixmap ));
modeChange();
}
@@ -180,7 +180,7 @@ KToolBarButton::~KToolBarButton()
void KToolBarButton::modeChange()
{
- QSize mysize;
+ TQSize mysize;
// grab a few global variables for use in this function and others
if (d->m_parent) {
@@ -205,14 +205,14 @@ void KToolBarButton::modeChange()
int text_height = 0;
int text_width = 0;
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if (d->m_iconText != KToolBar::IconOnly)
{
// okay, we have to deal with fonts. let's get our information now
- QFont tmp_font = KGlobalSettings::toolBarFont();
+ TQFont tmp_font = KGlobalSettings::toolBarFont();
// now parse out our font sizes from our chosen font
- QFontMetrics fm(tmp_font);
+ TQFontMetrics fm(tmp_font);
text_height = fm.lineSpacing();
text_width = fm.width(textLabel());
@@ -221,33 +221,33 @@ void KToolBarButton::modeChange()
}
else
{
- QToolTip::add(this, textLabel());
+ TQToolTip::add(this, textLabel());
}
switch (d->m_iconText)
{
case KToolBar::IconOnly:
- mysize = QSize(pix_width, pix_height);
+ mysize = TQSize(pix_width, pix_height);
break;
case KToolBar::IconTextRight:
- mysize = QSize(pix_width + text_width + 4, pix_height);
+ mysize = TQSize(pix_width + text_width + 4, pix_height);
break;
case KToolBar::TextOnly:
- mysize = QSize(text_width + 4, text_height);
+ mysize = TQSize(text_width + 4, text_height);
break;
case KToolBar::IconTextBottom:
- mysize = QSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height);
+ mysize = TQSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height);
break;
default:
break;
}
- mysize = style().sizeFromContents(QStyle::CT_ToolButton, this, mysize).
- expandedTo(QApplication::globalStrut());
+ mysize = style().sizeFromContents(TQStyle::CT_ToolButton, this, mysize).
+ expandedTo(TQApplication::globalStrut());
// make sure that this isn't taller then it is wide
if (mysize.height() > mysize.width())
@@ -257,120 +257,120 @@ void KToolBarButton::modeChange()
updateGeometry();
}
-void KToolBarButton::setTextLabel( const QString& text, bool tipToo)
+void KToolBarButton::setTextLabel( const TQString& text, bool tipToo)
{
if (text.isNull())
return;
- QString txt(text);
- if (txt.endsWith(QString::fromLatin1("...")))
+ TQString txt(text);
+ if (txt.endsWith(TQString::fromLatin1("...")))
txt.truncate(txt.length() - 3);
- QToolButton::setTextLabel(txt, tipToo);
+ TQToolButton::setTextLabel(txt, tipToo);
update();
}
-void KToolBarButton::setText( const QString& text)
+void KToolBarButton::setText( const TQString& text)
{
setTextLabel(text, true);
modeChange();
}
-void KToolBarButton::setIcon( const QString &icon )
+void KToolBarButton::setIcon( const TQString &icon )
{
d->m_iconName = icon;
if (d->m_parent)
d->m_iconSize = d->m_parent->iconSize();
- // QObject::name() return "const char *" instead of QString.
+ // TQObject::name() return "const char *" instead of TQString.
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
- QToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
+ TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::MainToolbar, d->m_iconSize ));
else
- QToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
+ TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::Toolbar, d->m_iconSize ));
}
-void KToolBarButton::setIconSet( const QIconSet &iconset )
+void KToolBarButton::setIconSet( const TQIconSet &iconset )
{
- QToolButton::setIconSet( iconset );
+ TQToolButton::setIconSet( iconset );
}
// remove?
-void KToolBarButton::setPixmap( const QPixmap &pixmap )
+void KToolBarButton::setPixmap( const TQPixmap &pixmap )
{
if( pixmap.isNull()) // called by QToolButton
{
- QToolButton::setPixmap( pixmap );
+ TQToolButton::setPixmap( pixmap );
return;
}
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Active );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
+void KToolBarButton::setDefaultPixmap( const TQPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Normal );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
+void KToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Disabled );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDefaultIcon( const QString& icon )
+void KToolBarButton::setDefaultIcon( const TQString& icon )
{
- QIconSet set = iconSet();
- QPixmap pm;
+ TQIconSet set = iconSet();
+ TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar,
d->m_iconSize );
else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal );
- QToolButton::setIconSet( set );
+ set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Normal );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDisabledIcon( const QString& icon )
+void KToolBarButton::setDisabledIcon( const TQString& icon )
{
- QIconSet set = iconSet();
- QPixmap pm;
+ TQIconSet set = iconSet();
+ TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar,
d->m_iconSize );
else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled );
- QToolButton::setIconSet( set );
+ set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Disabled );
+ TQToolButton::setIconSet( set );
}
-QPopupMenu *KToolBarButton::popup()
+TQPopupMenu *KToolBarButton::popup()
{
// obsolete
// KDE4: remove me
- return QToolButton::popup();
+ return TQToolButton::popup();
}
-void KToolBarButton::setPopup(QPopupMenu *p, bool)
+void KToolBarButton::setPopup(TQPopupMenu *p, bool)
{
- QToolButton::setPopup(p);
- QToolButton::setPopupDelay(-1);
+ TQToolButton::setPopup(p);
+ TQToolButton::setPopupDelay(-1);
}
-void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool)
+void KToolBarButton::setDelayedPopup (TQPopupMenu *p, bool)
{
- QToolButton::setPopup(p);
- QToolButton::setPopupDelay(QApplication::startDragTime());
+ TQToolButton::setPopup(p);
+ TQToolButton::setPopupDelay(TQApplication::startDragTime());
}
-void KToolBarButton::leaveEvent(QEvent *)
+void KToolBarButton::leaveEvent(TQEvent *)
{
if( d->m_isRaised || d->m_isActive )
{
@@ -382,7 +382,7 @@ void KToolBarButton::leaveEvent(QEvent *)
emit highlighted(d->m_id, false);
}
-void KToolBarButton::enterEvent(QEvent *)
+void KToolBarButton::enterEvent(TQEvent *)
{
if (d->m_highlight)
{
@@ -403,23 +403,23 @@ void KToolBarButton::enterEvent(QEvent *)
emit highlighted(d->m_id, true);
}
-bool KToolBarButton::eventFilter(QObject *o, QEvent *ev)
+bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{
if ((KToolBarButton *)o == this)
{
// Popup the menu when the left mousebutton is pressed and the mouse
// is moved by a small distance.
- if (QToolButton::popup())
+ if (TQToolButton::popup())
{
- if (ev->type() == QEvent::MouseButtonPress)
+ if (ev->type() == TQEvent::MouseButtonPress)
{
- QMouseEvent* mev = static_cast<QMouseEvent*>(ev);
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
d->m_mousePressPos = mev->pos();
}
- else if (ev->type() == QEvent::MouseMove)
+ else if (ev->type() == TQEvent::MouseMove)
{
- QMouseEvent* mev = static_cast<QMouseEvent*>(ev);
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
if ((mev->pos() - d->m_mousePressPos).manhattanLength()
> KGlobalSettings::dndEventDelay())
{
@@ -430,46 +430,46 @@ bool KToolBarButton::eventFilter(QObject *o, QEvent *ev)
}
if (d->m_isRadio &&
- (ev->type() == QEvent::MouseButtonPress ||
- ev->type() == QEvent::MouseButtonRelease ||
- ev->type() == QEvent::MouseButtonDblClick) && isOn())
+ (ev->type() == TQEvent::MouseButtonPress ||
+ ev->type() == TQEvent::MouseButtonRelease ||
+ ev->type() == TQEvent::MouseButtonDblClick) && isOn())
return true;
// From Kai-Uwe Sattler <kus@iti.CS.Uni-Magdeburg.De>
- if (ev->type() == QEvent::MouseButtonDblClick)
+ if (ev->type() == TQEvent::MouseButtonDblClick)
{
emit doubleClicked(d->m_id);
return false;
}
}
- return QToolButton::eventFilter(o, ev);
+ return TQToolButton::eventFilter(o, ev);
}
-void KToolBarButton::mousePressEvent( QMouseEvent * e )
+void KToolBarButton::mousePressEvent( TQMouseEvent * e )
{
d->m_buttonDown = true;
if ( e->button() == MidButton )
{
- // Get QToolButton to show the button being down while pressed
- QMouseEvent ev( QEvent::MouseButtonPress, e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mousePressEvent(&ev);
+ // Get TQToolButton to show the button being down while pressed
+ TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mousePressEvent(&ev);
return;
}
- QToolButton::mousePressEvent(e);
+ TQToolButton::mousePressEvent(e);
}
-void KToolBarButton::mouseReleaseEvent( QMouseEvent * e )
+void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e )
{
Qt::ButtonState state = Qt::ButtonState(e->button() | (e->state() & KeyButtonMask));
if ( e->button() == MidButton )
{
- QMouseEvent ev( QEvent::MouseButtonRelease, e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mouseReleaseEvent(&ev);
+ TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mouseReleaseEvent(&ev);
}
else
- QToolButton::mouseReleaseEvent(e);
+ TQToolButton::mouseReleaseEvent(e);
if ( !d->m_buttonDown )
return;
@@ -479,41 +479,41 @@ void KToolBarButton::mouseReleaseEvent( QMouseEvent * e )
emit buttonClicked( d->m_id, state );
}
-void KToolBarButton::drawButton( QPainter *_painter )
+void KToolBarButton::drawButton( TQPainter *_painter )
{
- QStyle::SFlags flags = QStyle::Style_Default;
- QStyle::SCFlags active = QStyle::SC_None;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
+ TQStyle::SCFlags active = TQStyle::SC_None;
if (isDown()) {
- flags |= QStyle::Style_Down;
- active |= QStyle::SC_ToolButton;
+ flags |= TQStyle::Style_Down;
+ active |= TQStyle::SC_ToolButton;
}
- if (isEnabled()) flags |= QStyle::Style_Enabled;
- if (isOn()) flags |= QStyle::Style_On;
- if (isEnabled() && hasMouse()) flags |= QStyle::Style_Raised;
- if (hasFocus()) flags |= QStyle::Style_HasFocus;
+ if (isEnabled()) flags |= TQStyle::Style_Enabled;
+ if (isOn()) flags |= TQStyle::Style_On;
+ if (isEnabled() && hasMouse()) flags |= TQStyle::Style_Raised;
+ if (hasFocus()) flags |= TQStyle::Style_HasFocus;
// Draw a styled toolbutton
- style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(),
- colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
+ style().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(),
+ colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption());
int dx, dy;
- QFont tmp_font(KGlobalSettings::toolBarFont());
- QFontMetrics fm(tmp_font);
- QRect textRect;
+ TQFont tmp_font(KGlobalSettings::toolBarFont());
+ TQFontMetrics fm(tmp_font);
+ TQRect textRect;
int textFlags = 0;
if (d->m_iconText == KToolBar::IconOnly) // icon only
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = ( width() - pixmap.width() ) / 2;
dy = ( height() - pixmap.height() ) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -523,15 +523,15 @@ void KToolBarButton::drawButton( QPainter *_painter )
}
else if (d->m_iconText == KToolBar::IconTextRight) // icon and text (if any)
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = 4;
dy = ( height() - pixmap.height() ) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -547,12 +547,12 @@ void KToolBarButton::drawButton( QPainter *_painter )
else
dx = 4;
dy = 0;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect(dx, dy, width()-dx, height());
+ textRect = TQRect(dx, dy, width()-dx, height());
}
}
else if (d->m_iconText == KToolBar::TextOnly)
@@ -562,25 +562,25 @@ void KToolBarButton::drawButton( QPainter *_painter )
textFlags = AlignVCenter|AlignLeft;
dx = (width() - fm.width(textLabel())) / 2;
dy = (height() - fm.lineSpacing()) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
}
}
else if (d->m_iconText == KToolBar::IconTextBottom)
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = (width() - pixmap.width()) / 2;
dy = (height() - fm.lineSpacing() - pixmap.height()) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -594,12 +594,12 @@ void KToolBarButton::drawButton( QPainter *_painter )
dx = (width() - fm.width(textLabel())) / 2;
dy = height() - fm.lineSpacing() - 4;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
}
}
@@ -616,20 +616,20 @@ void KToolBarButton::drawButton( QPainter *_painter )
_painter->drawText(textRect, textFlags, textLabel());
}
- if (QToolButton::popup())
+ if (TQToolButton::popup())
{
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ TQStyle::SFlags arrowFlags = TQStyle::Style_Default;
- if (isDown()) arrowFlags |= QStyle::Style_Down;
- if (isEnabled()) arrowFlags |= QStyle::Style_Enabled;
+ if (isDown()) arrowFlags |= TQStyle::Style_Down;
+ if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled;
- style().drawPrimitive(QStyle::PE_ArrowDown, _painter,
- QRect(width()-7, height()-7, 7, 7), colorGroup(),
- arrowFlags, QStyleOption() );
+ style().drawPrimitive(TQStyle::PE_ArrowDown, _painter,
+ TQRect(width()-7, height()-7, 7, 7), colorGroup(),
+ arrowFlags, TQStyleOption() );
}
}
-void KToolBarButton::paletteChange(const QPalette &)
+void KToolBarButton::paletteChange(const TQPalette &)
{
if(!d->m_isSeparator)
{
@@ -638,9 +638,9 @@ void KToolBarButton::paletteChange(const QPalette &)
}
}
-bool KToolBarButton::event(QEvent *e)
+bool KToolBarButton::event(TQEvent *e)
{
- if (e->type() == QEvent::ParentFontChange || e->type() == QEvent::ApplicationFontChange)
+ if (e->type() == TQEvent::ParentFontChange || e->type() == TQEvent::ApplicationFontChange)
{
//If we use toolbar text, apply the settings again, to relayout...
if (d->m_iconText != KToolBar::IconOnly)
@@ -648,7 +648,7 @@ bool KToolBarButton::event(QEvent *e)
return true;
}
- return QToolButton::event(e);
+ return TQToolButton::event(e);
}
@@ -714,7 +714,7 @@ void KToolBarButton::on(bool flag)
else
{
setDown(flag);
- leaveEvent((QEvent *) 0);
+ leaveEvent((TQEvent *) 0);
}
repaint();
}
@@ -729,22 +729,22 @@ void KToolBarButton::setToggle(bool flag)
{
setToggleButton(flag);
if (flag)
- connect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
else
- disconnect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
}
-QSize KToolBarButton::sizeHint() const
+TQSize KToolBarButton::sizeHint() const
{
return d->size;
}
-QSize KToolBarButton::minimumSizeHint() const
+TQSize KToolBarButton::minimumSizeHint() const
{
return d->size;
}
-QSize KToolBarButton::minimumSize() const
+TQSize KToolBarButton::minimumSize() const
{
return d->size;
}
diff --git a/kdeui/ktoolbarbutton.h b/kdeui/ktoolbarbutton.h
index 20ab5024d..2b723cce8 100644
--- a/kdeui/ktoolbarbutton.h
+++ b/kdeui/ktoolbarbutton.h
@@ -23,10 +23,10 @@
#ifndef _KTOOLBARBUTTON_H
#define _KTOOLBARBUTTON_H
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qintdict.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqintdict.h>
+#include <tqstring.h>
#include <kglobal.h>
class KToolBar;
@@ -58,8 +58,8 @@ public:
* @param txt This button's text (in a tooltip or otherwise)
* @param _instance the instance to use for this button
*/
- KToolBarButton(const QString& icon, int id, QWidget *parent,
- const char *name=0L, const QString &txt=QString::null,
+ KToolBarButton(const TQString& icon, int id, TQWidget *parent,
+ const char *name=0L, const TQString &txt=TQString::null,
KInstance *_instance = KGlobal::instance());
/**
@@ -73,8 +73,8 @@ public:
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KToolBarButton(const QPixmap& pixmap, int id, QWidget *parent,
- const char *name=0L, const QString &txt=QString::null);
+ KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
+ const char *name=0L, const TQString &txt=TQString::null);
/**
* Construct a separator button
@@ -82,7 +82,7 @@ public:
* @param parent This button's parent
* @param name This button's internal name
*/
- KToolBarButton(QWidget *parent=0L, const char *name=0L);
+ KToolBarButton(TQWidget *parent=0L, const char *name=0L);
/**
* Standard destructor
@@ -99,8 +99,8 @@ public:
*
* @param pixmap The active pixmap
*/
- // this one is from QButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const QPixmap &pixmap) KDE_DEPRECATED;
+ // this one is from TQButton, so #ifdef-ing it out doesn't break BC
+ virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
/**
* @deprecated
@@ -109,7 +109,7 @@ public:
*
* @param pixmap The pixmap to use as the default (normal) one
*/
- void setDefaultPixmap(const QPixmap& pixmap) KDE_DEPRECATED;
+ void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
/**
* @deprecated
@@ -118,7 +118,7 @@ public:
*
* @param pixmap The pixmap to use when disabled
*/
- void setDisabledPixmap(const QPixmap& pixmap) KDE_DEPRECATED;
+ void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
#endif
/**
@@ -127,7 +127,7 @@ public:
*
* @param text The button (or tooltip) text
*/
- virtual void setText(const QString &text);
+ virtual void setText(const TQString &text);
/**
* Set the icon for this button. The icon will be loaded internally
@@ -135,19 +135,19 @@ public:
*
* @param icon The name of the icon
*/
- virtual void setIcon(const QString &icon);
+ virtual void setIcon(const TQString &icon);
/// @since 3.1
- virtual void setIcon( const QPixmap &pixmap )
- { QToolButton::setIcon( pixmap ); }
+ virtual void setIcon( const TQPixmap &pixmap )
+ { TQToolButton::setIcon( pixmap ); }
/**
- * Set the pixmaps for this toolbar button from a QIconSet.
+ * Set the pixmaps for this toolbar button from a TQIconSet.
* If you call this you don't need to call any of the other methods
* that set icons or pixmaps.
* @param iconset The iconset to use
*/
- virtual void setIconSet( const QIconSet &iconset );
+ virtual void setIconSet( const TQIconSet &iconset );
#ifndef KDE_NO_COMPAT
/**
@@ -161,7 +161,7 @@ public:
* @param generate If true, then the other icons are automagically
* generated from this one
*/
- KDE_DEPRECATED void setIcon(const QString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
+ KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
/**
* @deprecated
@@ -170,7 +170,7 @@ public:
*
* @param icon The icon to use as the default (normal) one
*/
- void setDefaultIcon(const QString& icon) KDE_DEPRECATED;
+ void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
/**
* @deprecated
@@ -179,7 +179,7 @@ public:
*
* @param icon The icon to use when disabled
*/
- void setDisabledIcon(const QString& icon) KDE_DEPRECATED;
+ void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
#endif
/**
@@ -206,7 +206,7 @@ public:
/**
* Return a pointer to this button's popup menu (if it exists)
*/
- QPopupMenu *popup();
+ TQPopupMenu *popup();
/**
* Returns the button's id.
@@ -222,7 +222,7 @@ public:
* @param p The new popup menu
* @param unused Has no effect - ignore it.
*/
- void setPopup (QPopupMenu *p, bool unused = false);
+ void setPopup (TQPopupMenu *p, bool unused = false);
/**
* Gives this button a delayed popup menu.
@@ -234,7 +234,7 @@ public:
* @param p the new popup menu
* @param unused Has no effect - ignore it.
*/
- void setDelayedPopup(QPopupMenu *p, bool unused = false);
+ void setDelayedPopup(TQPopupMenu *p, bool unused = false);
/**
* Turn this button into a radio button
@@ -277,23 +277,23 @@ public slots:
* orientation changing, etc.
*/
void modeChange();
- virtual void setTextLabel(const QString&, bool tipToo);
+ virtual void setTextLabel(const TQString&, bool tipToo);
protected:
- bool event(QEvent *e);
- void paletteChange(const QPalette &);
- void leaveEvent(QEvent *e);
- void enterEvent(QEvent *e);
- void drawButton(QPainter *p);
- bool eventFilter (QObject *o, QEvent *e);
+ bool event(TQEvent *e);
+ void paletteChange(const TQPalette &);
+ void leaveEvent(TQEvent *e);
+ void enterEvent(TQEvent *e);
+ void drawButton(TQPainter *p);
+ bool eventFilter (TQObject *o, TQEvent *e);
/// @since 3.4
- void mousePressEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
/// @since 3.4
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
void showMenu();
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSize minimumSize() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize minimumSize() const;
/// @since 3.1
bool isRaised() const;
@@ -320,7 +320,7 @@ private:
* @internal
* @version $Id$
*/
-class KDEUI_EXPORT KToolBarButtonList : public QIntDict<KToolBarButton>
+class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
{
public:
KToolBarButtonList();
diff --git a/kdeui/ktoolbarhandler.cpp b/kdeui/ktoolbarhandler.cpp
index 91a35d0c4..5d8a49d8f 100644
--- a/kdeui/ktoolbarhandler.cpp
+++ b/kdeui/ktoolbarhandler.cpp
@@ -18,7 +18,7 @@
#include "ktoolbarhandler.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
@@ -44,11 +44,11 @@ namespace
class BarActionBuilder
{
public:
- BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList )
+ BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList<KToolBar> &oldToolBarList )
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
{
- QPtrList<QDockWindow> dockWindows = m_mainWindow->dockWindows();
- QPtrListIterator<QDockWindow> dockWindowIt( dockWindows );
+ TQPtrList<TQDockWindow> dockWindows = m_mainWindow->dockWindows();
+ TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows );
for ( ; dockWindowIt.current(); ++dockWindowIt ) {
KToolBar *toolBar = dynamic_cast<KToolBar *>( dockWindowIt.current() );
@@ -67,16 +67,16 @@ namespace
bool needsRebuild() const { return m_needsRebuild; }
- QPtrList<KAction> create()
+ TQPtrList<KAction> create()
{
if ( !m_needsRebuild )
- return QPtrList<KAction>();
+ return TQPtrList<KAction>();
- QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
for ( ; toolBarIt.current(); ++toolBarIt )
handleToolBar( toolBarIt.current() );
- QPtrList<KAction> actions;
+ TQPtrList<KAction> actions;
if ( m_toolBarActions.count() == 0 )
return actions;
@@ -90,7 +90,7 @@ namespace
KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" );
- QPtrListIterator<KAction> actionIt( m_toolBarActions );
+ TQPtrListIterator<KAction> actionIt( m_toolBarActions );
for ( ; actionIt.current(); ++actionIt )
menuAction->insert( actionIt.current() );
@@ -98,7 +98,7 @@ namespace
return actions;
}
- const QPtrList<KToolBar> &toolBars() const { return m_toolBars; }
+ const TQPtrList<KToolBar> &toolBars() const { return m_toolBars; }
private:
void handleToolBar( KToolBar *toolBar )
@@ -115,8 +115,8 @@ namespace
KActionCollection *m_actionCollection;
KMainWindow *m_mainWindow;
- QPtrList<KToolBar> m_toolBars;
- QPtrList<KAction> m_toolBarActions;
+ TQPtrList<KToolBar> m_toolBars;
+ TQPtrList<KAction> m_toolBarActions;
bool m_needsRebuild : 1;
};
@@ -125,13 +125,13 @@ namespace
using namespace KDEPrivate;
ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name )
- : QObject( mainWindow, name ), KXMLGUIClient( mainWindow )
+ : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow )
{
init( mainWindow );
}
-ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, QObject *parent, const char *name )
- : QObject( parent, name ), KXMLGUIClient( mainWindow )
+ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name )
+ : TQObject( parent, name ), KXMLGUIClient( mainWindow )
{
init( mainWindow );
}
@@ -167,7 +167,7 @@ void ToolBarHandler::setupActions()
m_actions = builder.create();
/*
- for ( QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
toolBarIt.current(); ++toolBarIt )
toolBarIt.current()->disconnect( this );
*/
@@ -175,10 +175,10 @@ void ToolBarHandler::setupActions()
m_toolBars = builder.toolBars();
/*
- for ( QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
toolBarIt.current(); ++toolBarIt )
- connect( toolBarIt.current(), SIGNAL( destroyed() ),
- this, SLOT( setupActions() ) );
+ connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( setupActions() ) );
*/
if (kapp && kapp->authorizeKAction("options_show_toolbar"))
@@ -198,8 +198,8 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
d = 0;
m_mainWindow = mainWindow;
- connect( m_mainWindow->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( m_mainWindow->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -209,7 +209,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
if ( domDocument().documentElement().isNull() ) {
- QString completeDescription = QString::fromLatin1( guiDescription )
+ TQString completeDescription = TQString::fromLatin1( guiDescription )
.arg( actionListName );
setXML( completeDescription, false /*merge*/ );
@@ -218,7 +218,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
void ToolBarHandler::connectToActionContainers()
{
- QPtrListIterator<KAction> actionIt( m_actions );
+ TQPtrListIterator<KAction> actionIt( m_actions );
for ( ; actionIt.current(); ++actionIt )
connectToActionContainer( actionIt.current() );
}
@@ -230,14 +230,14 @@ void ToolBarHandler::connectToActionContainer( KAction *action )
connectToActionContainer( action->container( i ) );
}
-void ToolBarHandler::connectToActionContainer( QWidget *container )
+void ToolBarHandler::connectToActionContainer( TQWidget *container )
{
- QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
+ TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu *>( container );
if ( !popupMenu )
return;
- connect( popupMenu, SIGNAL( aboutToShow() ),
- this, SLOT( setupActions() ) );
+ connect( popupMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( setupActions() ) );
}
#include "ktoolbarhandler.moc"
diff --git a/kdeui/ktoolbarhandler.h b/kdeui/ktoolbarhandler.h
index c0cc332cc..e6336967f 100644
--- a/kdeui/ktoolbarhandler.h
+++ b/kdeui/ktoolbarhandler.h
@@ -19,8 +19,8 @@
#ifndef KBARHANDLER_H
#define KBARHANDLER_H
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
class KMainWindow;
@@ -30,13 +30,13 @@ namespace KDEPrivate
{
/// @since 3.1
-class ToolBarHandler : public QObject,
+class ToolBarHandler : public TQObject,
public KXMLGUIClient
{
Q_OBJECT
public:
ToolBarHandler( KMainWindow *mainWindow, const char *name = 0 );
- ToolBarHandler( KMainWindow *mainWindow, QObject *parent, const char *name = 0 );
+ ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name = 0 );
virtual ~ToolBarHandler();
KAction *toolBarMenuAction();
@@ -51,14 +51,14 @@ private:
void init( KMainWindow *mainWindow );
void connectToActionContainers();
void connectToActionContainer( KAction *action );
- void connectToActionContainer( QWidget *container );
+ void connectToActionContainer( TQWidget *container );
struct Data;
Data *d;
- QGuardedPtr<KMainWindow> m_mainWindow;
- QPtrList<KAction> m_actions;
- QPtrList<KToolBar> m_toolBars;
+ TQGuardedPtr<KMainWindow> m_mainWindow;
+ TQPtrList<KAction> m_actions;
+ TQPtrList<KToolBar> m_toolBars;
};
} // namespace KDEPrivate
diff --git a/kdeui/ktoolbarlabelaction.cpp b/kdeui/ktoolbarlabelaction.cpp
index 9eac6a1bc..aab7717b8 100644
--- a/kdeui/ktoolbarlabelaction.cpp
+++ b/kdeui/ktoolbarlabelaction.cpp
@@ -18,8 +18,8 @@
#include "ktoolbarlabelaction.h"
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
class KToolBarLabelAction::KToolBarLabelActionPrivate
{
@@ -28,47 +28,47 @@ public:
: m_label(0)
{
}
- QLabel* m_label;
+ TQLabel* m_label;
};
-KToolBarLabelAction::KToolBarLabelAction(const QString &text,
+KToolBarLabelAction::KToolBarLabelAction(const TQString &text,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name)
- : KWidgetAction(new QLabel(text, 0, "kde toolbar widget"), text, cut,
+ : KWidgetAction(new TQLabel(text, 0, "kde toolbar widget"), text, cut,
receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
init();
}
-KToolBarLabelAction::KToolBarLabelAction(QWidget* buddy,
- const QString &text,
+KToolBarLabelAction::KToolBarLabelAction(TQWidget* buddy,
+ const TQString &text,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name)
- : KWidgetAction(new QLabel(buddy, text, 0, "kde toolbar widget"), text,
+ : KWidgetAction(new TQLabel(buddy, text, 0, "kde toolbar widget"), text,
cut, receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
init();
}
-KToolBarLabelAction::KToolBarLabelAction(QLabel* label,
+KToolBarLabelAction::KToolBarLabelAction(TQLabel* label,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection* parent,
const char *name)
: KWidgetAction(label, label->text(), cut, receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
- Q_ASSERT(QString::fromLatin1("kde toolbar widget") == label->name());
+ Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name());
init();
}
@@ -80,33 +80,33 @@ KToolBarLabelAction::~KToolBarLabelAction()
void KToolBarLabelAction::init()
{
- d->m_label = static_cast<QLabel*>(widget());
+ d->m_label = static_cast<TQLabel*>(widget());
/* these lines were copied from Konqueror's KonqDraggableLabel class in
konq_misc.cc */
d->m_label->setBackgroundMode(Qt::PaletteButton);
- d->m_label->setAlignment((QApplication::reverseLayout()
+ d->m_label->setAlignment((TQApplication::reverseLayout()
? Qt::AlignRight : Qt::AlignLeft) |
Qt::AlignVCenter | Qt::ShowPrefix );
d->m_label->adjustSize();
}
-void KToolBarLabelAction::setText(const QString& text)
+void KToolBarLabelAction::setText(const TQString& text)
{
KWidgetAction::setText(text);
d->m_label->setText(text);
}
-void KToolBarLabelAction::setBuddy(QWidget* buddy)
+void KToolBarLabelAction::setBuddy(TQWidget* buddy)
{
d->m_label->setBuddy(buddy);
}
-QWidget* KToolBarLabelAction::buddy() const
+TQWidget* KToolBarLabelAction::buddy() const
{
return d->m_label->buddy();
}
-QLabel* KToolBarLabelAction::label() const
+TQLabel* KToolBarLabelAction::label() const
{
return d->m_label;
}
diff --git a/kdeui/ktoolbarlabelaction.h b/kdeui/ktoolbarlabelaction.h
index 926d75c7d..099227981 100644
--- a/kdeui/ktoolbarlabelaction.h
+++ b/kdeui/ktoolbarlabelaction.h
@@ -28,7 +28,7 @@ class QLabel;
* KToolBarLabelAction is a convenience class for displaying a label in a
* toolbar.
*
- * It provides easy access to the label's #setBuddy(QWidget*) and #buddy()
+ * It provides easy access to the label's #setBuddy(TQWidget*) and #buddy()
* methods and can be used as follows:
*
* \code
@@ -36,10 +36,10 @@ class QLabel;
* KHistoryCombo* findCombo = new KHistoryCombo(true, this);
* KWidgetAction* action
* = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this,
- * SLOT(slotFocus()), actionCollection(), "find_combo");
+ * TQT_SLOT(slotFocus()), actionCollection(), "find_combo");
*
* new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this,
- * SLOT(slotFocus()), actionCollection(),
+ * TQT_SLOT(slotFocus()), actionCollection(),
* "find_label");
*
* \endcode
@@ -55,13 +55,13 @@ public:
* @param text The label's and the action's text.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(const QString &text,
+ KToolBarLabelAction(const TQString &text,
const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name);
/**
* Constructs a toolbar label setting a buddy for the label.
@@ -71,19 +71,19 @@ public:
* @param text The label's and the action's text.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(QWidget* buddy, const QString &text,
+ KToolBarLabelAction(TQWidget* buddy, const TQString &text,
const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name);
/**
* Constructs a toolbar label for a label.
*
* You can use this constructor if you want to display a class which is
- * derived from QLabel in the toolbar. Note that ownership of the label is
+ * derived from TQLabel in the toolbar. Note that ownership of the label is
* transferred to the action and the label is deleted when the action is
* deleted. So you shouldn't hold any pointers to the label.
*
@@ -94,35 +94,35 @@ public:
* @param label the label which is displayed in the toolbar.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(QLabel* label, const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ KToolBarLabelAction(TQLabel* label, const KShortcut &cut,
+ const TQObject *receiver, const char *slot,
KActionCollection* parent, const char *name);
virtual ~KToolBarLabelAction();
/**
* Reimplemented to update both the action's text and the label's text.
*/
- virtual void setText(const QString& text);
+ virtual void setText(const TQString& text);
/**
* Sets the label's buddy to buddy.
*
* See QLabel#setBuddy() for details.
*/
- virtual void setBuddy(QWidget* buddy);
+ virtual void setBuddy(TQWidget* buddy);
/**
* Returns the label's buddy or 0 if no buddy is currently set.
*
* See QLabel#buddy() and QLabel#setBuddy() for more information.
*/
- QWidget* buddy() const;
+ TQWidget* buddy() const;
/**
* Returns the label which is used internally.
*/
- QLabel* label() const;
+ TQLabel* label() const;
protected:
virtual void virtual_hook(int id, void* data);
diff --git a/kdeui/ktoolbarradiogroup.cpp b/kdeui/ktoolbarradiogroup.cpp
index ca78db630..ab8e50e08 100644
--- a/kdeui/ktoolbarradiogroup.cpp
+++ b/kdeui/ktoolbarradiogroup.cpp
@@ -32,11 +32,11 @@
KToolBarRadioGroup::KToolBarRadioGroup (KToolBar *_parent, const char *_name)
-: QObject(_parent, _name)
+: TQObject(_parent, _name)
{
buttons = new KToolBarButtonList();
tb = _parent;
- connect (tb, SIGNAL(toggled(int)), this, SLOT(slotToggled(int)));
+ connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int)));
}
KToolBarRadioGroup::~KToolBarRadioGroup()
@@ -63,7 +63,7 @@ void KToolBarRadioGroup::slotToggled(int id)
{
if (buttons->find(id) && buttons->find(id)->isOn())
{
- QIntDictIterator<KToolBarButton> it(*buttons);
+ TQIntDictIterator<KToolBarButton> it(*buttons);
while (it.current())
{
if (it.currentKey() != id)
diff --git a/kdeui/ktoolbarradiogroup.h b/kdeui/ktoolbarradiogroup.h
index 2cdc1c8e9..2fbf08174 100644
--- a/kdeui/ktoolbarradiogroup.h
+++ b/kdeui/ktoolbarradiogroup.h
@@ -22,7 +22,7 @@
#ifndef _KTOOLBARRADIOGROUP_H
#define _KTOOLBARRADIOGROUP_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
diff --git a/kdeui/kurllabel.cpp b/kdeui/kurllabel.cpp
index f45fce3a7..d4d4ff7c0 100644
--- a/kdeui/kurllabel.cpp
+++ b/kdeui/kurllabel.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kglobalsettings.h>
@@ -34,7 +34,7 @@
class KURLLabel::Private
{
public:
- Private (const QString& url, KURLLabel* label)
+ Private (const TQString& url, KURLLabel* label)
: URL (url),
LinkColor (KGlobalSettings::linkColor()),
HighlightedLinkColor (Qt::red),
@@ -48,9 +48,9 @@ public:
MousePressed(false),
WasInsideRect(false),
MarginAltered(false),
- Timer (new QTimer (label))
+ Timer (new TQTimer (label))
{
- connect (Timer, SIGNAL (timeout ()), label, SLOT (updateColor ()));
+ connect (Timer, TQT_SIGNAL (timeout ()), label, TQT_SLOT (updateColor ()));
}
~Private ()
@@ -58,14 +58,14 @@ public:
delete Cursor;
}
- QString URL;
- QPixmap AltPixmap;
+ TQString URL;
+ TQPixmap AltPixmap;
- QColor LinkColor;
- QColor HighlightedLinkColor;
+ TQColor LinkColor;
+ TQColor HighlightedLinkColor;
- QString Tip;
- QCursor* Cursor;
+ TQString Tip;
+ TQCursor* Cursor;
bool Underline:1;
bool UseTips:1;
bool Glow:1;
@@ -74,31 +74,31 @@ public:
bool MousePressed:1;
bool WasInsideRect:1;
bool MarginAltered:1;
- QPixmap RealPixmap;
+ TQPixmap RealPixmap;
- QTimer* Timer;
+ TQTimer* Timer;
};
-KURLLabel::KURLLabel (const QString& url, const QString& text,
- QWidget* parent, const char* name)
- : QLabel (!text.isNull() ? text : url, parent, name),
+KURLLabel::KURLLabel (const TQString& url, const TQString& text,
+ TQWidget* parent, const char* name)
+ : TQLabel (!text.isNull() ? text : url, parent, name),
d (new Private (url, this))
{
setFont (font());
setUseCursor (true);
setLinkColor (d->LinkColor);
- setFocusPolicy( QWidget::StrongFocus ); //better accessibility
+ setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true);
}
-KURLLabel::KURLLabel (QWidget* parent, const char* name)
- : QLabel (parent, name),
- d (new Private (QString::null, this))
+KURLLabel::KURLLabel (TQWidget* parent, const char* name)
+ : TQLabel (parent, name),
+ d (new Private (TQString::null, this))
{
setFont (font());
setUseCursor (true);
setLinkColor (d->LinkColor);
- setFocusPolicy( QWidget::StrongFocus ); //better accessibility
+ setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true);
}
@@ -107,13 +107,13 @@ KURLLabel::~KURLLabel ()
delete d;
}
-void KURLLabel::mouseReleaseEvent (QMouseEvent* e)
+void KURLLabel::mouseReleaseEvent (TQMouseEvent* e)
{
- QLabel::mouseReleaseEvent (e);
+ TQLabel::mouseReleaseEvent (e);
if (!d->MousePressed)
return;
d->MousePressed = false;
- QRect r( activeRect() );
+ TQRect r( activeRect() );
if (!r.contains(e->pos()))
return;
@@ -142,12 +142,12 @@ void KURLLabel::mouseReleaseEvent (QMouseEvent* e)
}
}
-void KURLLabel::setFont (const QFont& f)
+void KURLLabel::setFont (const TQFont& f)
{
- QFont newFont = f;
+ TQFont newFont = f;
newFont.setUnderline (d->Underline);
- QLabel::setFont (newFont);
+ TQLabel::setFont (newFont);
}
void KURLLabel::setUnderline (bool on)
@@ -161,21 +161,21 @@ void KURLLabel::updateColor ()
{
d->Timer->stop();
- QRect r( activeRect() );
- if (!(d->Glow || d->Float) || !r.contains (mapFromGlobal(QCursor::pos())))
+ TQRect r( activeRect() );
+ if (!(d->Glow || d->Float) || !r.contains (mapFromGlobal(TQCursor::pos())))
setLinkColor (d->LinkColor);
}
-void KURLLabel::setLinkColor (const QColor& col)
+void KURLLabel::setLinkColor (const TQColor& col)
{
- QPalette p = palette();
- p.setColor (QColorGroup::Foreground, col);
+ TQPalette p = palette();
+ p.setColor (TQColorGroup::Foreground, col);
setPalette (p);
update();
}
-void KURLLabel::setURL (const QString& url)
+void KURLLabel::setURL (const TQString& url)
{
if ( d->Tip == d->URL ) { // update the tip as well
d->Tip = url;
@@ -185,7 +185,7 @@ void KURLLabel::setURL (const QString& url)
d->URL = url;
}
-const QString& KURLLabel::url () const
+const TQString& KURLLabel::url () const
{
return d->URL;
}
@@ -196,13 +196,13 @@ void KURLLabel::unsetCursor ()
d->Cursor = 0;
}
-void KURLLabel::setCursor ( const QCursor& cursor )
+void KURLLabel::setCursor ( const TQCursor& cursor )
{
delete d->Cursor;
- d->Cursor = new QCursor( cursor );
+ d->Cursor = new TQCursor( cursor );
}
-void KURLLabel::setUseCursor (bool on, QCursor* cursor)
+void KURLLabel::setUseCursor (bool on, TQCursor* cursor)
{
if (on)
{
@@ -225,12 +225,12 @@ void KURLLabel::setUseTips (bool on)
d->UseTips = on;
if (on) {
- QToolTip::add (this, activeRect(), d->Tip);
+ TQToolTip::add (this, activeRect(), d->Tip);
} else
- QToolTip::remove (this);
+ TQToolTip::remove (this);
}
-void KURLLabel::setTipText (const QString& tip)
+void KURLLabel::setTipText (const TQString& tip)
{
d->Tip = tip;
@@ -242,12 +242,12 @@ bool KURLLabel::useTips () const
return d->UseTips;
}
-const QString& KURLLabel::tipText () const
+const TQString& KURLLabel::tipText () const
{
return d->Tip;
}
-void KURLLabel::setHighlightedColor (const QColor& highcolor)
+void KURLLabel::setHighlightedColor (const TQColor& highcolor)
{
d->LinkColor = highcolor;
@@ -255,12 +255,12 @@ void KURLLabel::setHighlightedColor (const QColor& highcolor)
setLinkColor (highcolor);
}
-void KURLLabel::setHighlightedColor (const QString& highcolor)
+void KURLLabel::setHighlightedColor (const TQString& highcolor)
{
- setHighlightedColor (QColor (highcolor));
+ setHighlightedColor (TQColor (highcolor));
}
-void KURLLabel::setSelectedColor (const QColor& selcolor)
+void KURLLabel::setSelectedColor (const TQColor& selcolor)
{
d->HighlightedLinkColor = selcolor;
@@ -268,9 +268,9 @@ void KURLLabel::setSelectedColor (const QColor& selcolor)
setLinkColor (selcolor);
}
-void KURLLabel::setSelectedColor (const QString& selcolor)
+void KURLLabel::setSelectedColor (const TQString& selcolor)
{
- setSelectedColor (QColor (selcolor));
+ setSelectedColor (TQColor (selcolor));
}
void KURLLabel::setGlow (bool glow)
@@ -293,22 +293,22 @@ bool KURLLabel::isFloatEnabled () const
return d->Float;
}
-void KURLLabel::setAltPixmap (const QPixmap& altPix)
+void KURLLabel::setAltPixmap (const TQPixmap& altPix)
{
d->AltPixmap = altPix;
}
-const QPixmap* KURLLabel::altPixmap () const
+const TQPixmap* KURLLabel::altPixmap () const
{
return &d->AltPixmap;
}
-void KURLLabel::enterEvent (QEvent* e)
+void KURLLabel::enterEvent (TQEvent* e)
{
- QLabel::enterEvent (e);
+ TQLabel::enterEvent (e);
- QRect r( activeRect() );
- if (!r.contains( static_cast<QMouseEvent*>(e)->pos() ))
+ TQRect r( activeRect() );
+ if (!r.contains( static_cast<TQMouseEvent*>(e)->pos() ))
return;
if (!d->AltPixmap.isNull() && pixmap())
@@ -333,9 +333,9 @@ void KURLLabel::enterEvent (QEvent* e)
emit enteredURL (d->URL);
}
-void KURLLabel::leaveEvent (QEvent* e)
+void KURLLabel::leaveEvent (TQEvent* e)
{
- QLabel::leaveEvent (e);
+ TQLabel::leaveEvent (e);
if (!d->AltPixmap.isNull() && pixmap())
setPixmap (d->RealPixmap);
@@ -349,30 +349,30 @@ void KURLLabel::leaveEvent (QEvent* e)
emit leftURL (d->URL);
}
-bool KURLLabel::event (QEvent *e)
+bool KURLLabel::event (TQEvent *e)
{
- if (e && e->type() == QEvent::ParentPaletteChange)
+ if (e && e->type() == TQEvent::ParentPaletteChange)
{
// use parentWidget() unless you are a toplevel widget, then try qAapp
- QPalette p = parentWidget() ? parentWidget()->palette() : qApp->palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Foreground, palette().active().foreground());
+ TQPalette p = parentWidget() ? parentWidget()->palette() : qApp->palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Foreground, palette().active().foreground());
setPalette(p);
d->LinkColor = KGlobalSettings::linkColor();
setLinkColor(d->LinkColor);
return true;
}
- else if (e->type() == QEvent::Paint) {
- const bool result = QLabel::event(e);
+ else if (e->type() == TQEvent::Paint) {
+ const bool result = TQLabel::event(e);
if (result && hasFocus()) {
- QPainter p(this);
- QRect r( activeRect() );
- style().drawPrimitive( QStyle::PE_FocusRect, &p, r, colorGroup() );
+ TQPainter p(this);
+ TQRect r( activeRect() );
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() );
}
return result;
}
- else if (e->type() == QEvent::KeyPress) {
- QKeyEvent* ke = static_cast<QKeyEvent*>(e);
+ else if (e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) {
setLinkColor (d->HighlightedLinkColor);
d->Timer->start (300);
@@ -382,34 +382,34 @@ bool KURLLabel::event (QEvent *e)
return true;
}
}
- else if (e->type() == QEvent::MouseButtonPress) {
- QRect r( activeRect() );
- d->MousePressed = r.contains(static_cast<QMouseEvent*>(e)->pos());
+ else if (e->type() == TQEvent::MouseButtonPress) {
+ TQRect r( activeRect() );
+ d->MousePressed = r.contains(static_cast<TQMouseEvent*>(e)->pos());
}
- else if (e->type() == QEvent::MouseMove) {
+ else if (e->type() == TQEvent::MouseMove) {
if (d->Cursor) {
- QRect r( activeRect() );
- bool inside = r.contains(static_cast<QMouseEvent*>(e)->pos());
+ TQRect r( activeRect() );
+ bool inside = r.contains(static_cast<TQMouseEvent*>(e)->pos());
if (d->WasInsideRect != inside) {
if (inside)
- QLabel::setCursor(*d->Cursor);
+ TQLabel::setCursor(*d->Cursor);
else
- QLabel::unsetCursor();
+ TQLabel::unsetCursor();
d->WasInsideRect = inside;
}
}
}
- return QLabel::event(e);
+ return TQLabel::event(e);
}
-QRect KURLLabel::activeRect() const
+TQRect KURLLabel::activeRect() const
{
- QRect r( contentsRect() );
- if (text().isEmpty() || (!d->MarginAltered && sizePolicy() == QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)))
+ TQRect r( contentsRect() );
+ if (text().isEmpty() || (!d->MarginAltered && sizePolicy() == TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)))
return r; //fixed size is sometimes used with pixmap
- int hAlign = QApplication::horizontalAlignment( alignment() );
+ int hAlign = TQApplication::horizontalAlignment( alignment() );
int indentX = (hAlign && indent()>0) ? indent() : 0;
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
r.setWidth( QMIN(fm.width(text()), r.width()));
if ( hAlign & AlignLeft )
r.moveLeft(r.left() + indentX);
@@ -418,29 +418,29 @@ QRect KURLLabel::activeRect() const
if ( hAlign & AlignRight )
r.moveLeft(contentsRect().width()-r.width()-indentX+margin());
int add = QMIN(3, margin());
- r = QRect(r.left()-add, r.top()-add, r.width()+2*add, r.height()+2*add);
+ r = TQRect(r.left()-add, r.top()-add, r.width()+2*add, r.height()+2*add);
return r;
}
void KURLLabel::setMargin( int margin )
{
- QLabel::setMargin(margin);
+ TQLabel::setMargin(margin);
d->MarginAltered = true;
}
void KURLLabel::setFocusPolicy( FocusPolicy policy )
{
- QLabel::setFocusPolicy(policy);
+ TQLabel::setFocusPolicy(policy);
if (!d->MarginAltered) {
- QLabel::setMargin(policy == NoFocus ? 0 : 3); //better default : better look when focused
+ TQLabel::setMargin(policy == NoFocus ? 0 : 3); //better default : better look when focused
}
}
-void KURLLabel::setSizePolicy ( QSizePolicy policy )
+void KURLLabel::setSizePolicy ( TQSizePolicy policy )
{
- QLabel::setSizePolicy(policy);
- if (!d->MarginAltered && policy.horData()==QSizePolicy::Fixed && policy.verData()==QSizePolicy::Fixed) {
- QLabel::setMargin(0); //better default : better look when fixed size
+ TQLabel::setSizePolicy(policy);
+ if (!d->MarginAltered && policy.horData()==TQSizePolicy::Fixed && policy.verData()==TQSizePolicy::Fixed) {
+ TQLabel::setMargin(0); //better default : better look when fixed size
}
}
diff --git a/kdeui/kurllabel.h b/kdeui/kurllabel.h
index 81f2d97ab..0d3853da4 100644
--- a/kdeui/kurllabel.h
+++ b/kdeui/kurllabel.h
@@ -21,7 +21,7 @@
#ifndef KURLLABEL_H
#define KURLLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
@@ -30,9 +30,9 @@ class QCursor;
class QPixmap;
/**
- * @short A drop-in replacement for QLabel that displays hyperlinks.
+ * @short A drop-in replacement for TQLabel that displays hyperlinks.
*
- * KURLLabel is a drop-in replacement for QLabel that handles text
+ * KURLLabel is a drop-in replacement for TQLabel that handles text
* in a fashion similar to how an HTML widget handles hyperlinks. The
* text can be underlined (or not) and set to different colors. It
* can also "glow" (cycle colors) when the mouse passes over it.
@@ -51,8 +51,8 @@ class QPixmap;
* KURLLabel *address = new KURLLabel(this);
* address->setText("My homepage");
* address->setURL("http://www.home.com/~me");
- * connect(address, SIGNAL(leftClickedURL(const QString&)),
- * SLOT(processMyURL(const QString&)));
+ * connect(address, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ * TQT_SLOT(processMyURL(const TQString&)));
* \endcode
*
* In this example, the text "My homepage" would be displayed
@@ -71,9 +71,9 @@ class QPixmap;
class KDEUI_EXPORT KURLLabel : public QLabel
{
Q_OBJECT
- Q_PROPERTY (QString url READ url WRITE setURL)
- Q_PROPERTY (QString tipText READ tipText WRITE setTipText )
- Q_PROPERTY (QPixmap altPixmap READ altPixmap WRITE setAltPixmap)
+ Q_PROPERTY (TQString url READ url WRITE setURL)
+ Q_PROPERTY (TQString tipText READ tipText WRITE setTipText )
+ Q_PROPERTY (TQPixmap altPixmap READ altPixmap WRITE setAltPixmap)
Q_PROPERTY (bool glowEnabled READ isGlowEnabled WRITE setGlow )
Q_PROPERTY (bool floatEnabled READ isFloatEnabled WRITE setFloat )
Q_PROPERTY (bool useTips READ useTips WRITE setUseTips )
@@ -83,25 +83,25 @@ public:
/**
* Default constructor.
*
- * Use setURL() and setText() or QListView::setPixmap()
+ * Use setURL() and setText() or TQListView::setPixmap()
* to set the resp. properties.
*/
- KURLLabel (QWidget* parent = 0L, const char* name = 0L);
+ KURLLabel (TQWidget* parent = 0L, const char* name = 0L);
/**
* Convenience constructor.
*
* @param url is the URL emitted when the label is clicked.
- * @param text is the displayed string. If it's equal to QString::null
+ * @param text is the displayed string. If it's equal to TQString::null
* the @p url will be used instead.
* @param parent Passed to lower level constructor
* @param name Passed to lower level constructor
*
- * @p parent and @p name are passed to QLabel, which in turn passes
+ * @p parent and @p name are passed to TQLabel, which in turn passes
* them further down
*/
- KURLLabel (const QString& url, const QString& text = QString::null,
- QWidget* parent = 0L, const char* name = 0L);
+ KURLLabel (const TQString& url, const TQString& text = TQString::null,
+ TQWidget* parent = 0L, const char* name = 0L);
/**
* Destructs the label.
@@ -111,12 +111,12 @@ public:
/**
* Returns the URL.
*/
- const QString& url () const;
+ const TQString& url () const;
/**
* Returns the current tooltip text.
*/
- const QString& tipText () const;
+ const TQString& tipText () const;
/**
* @return true if a tooltip will be displayed.
@@ -151,7 +151,7 @@ public:
/**
* @return the alternate pixmap (may be 0L if none was set).
*/
- const QPixmap* altPixmap () const;
+ const TQPixmap* altPixmap () const;
/**
* Reimplemented for internal reasons, the API is not affected.
@@ -166,7 +166,7 @@ public:
/**
* Reimplemented for internal reasons, the API is not affected.
*/
- virtual void setSizePolicy ( QSizePolicy );
+ virtual void setSizePolicy ( TQSizePolicy );
public slots:
/**
@@ -182,12 +182,12 @@ public slots:
*
* @see url
*/
- void setURL (const QString& url);
+ void setURL (const TQString& url);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void setFont (const QFont&);
+ virtual void setFont (const TQFont&);
/**
* Turns on or off the tool tip feature.
@@ -205,7 +205,7 @@ public slots:
*
* @see setUseTips()
*/
- void setTipText (const QString& tip);
+ void setTipText (const TQString& tip);
/**
* Sets the highlight color.
@@ -213,14 +213,14 @@ public slots:
* This is the default foreground
* color (non-selected). By default, it is @p blue.
*/
- void setHighlightedColor(const QColor& highcolor);
+ void setHighlightedColor(const TQColor& highcolor);
/**
* This is an overloaded version for convenience.
*
* @see setHighlightedColor()
*/
- void setHighlightedColor(const QString& highcolor);
+ void setHighlightedColor(const TQString& highcolor);
/**
* Sets the selected color.
@@ -229,19 +229,19 @@ public slots:
* to when either a mouse passes over it and "glow" mode is on or
* when it is selected (clicked). By default, it is @p red.
*/
- void setSelectedColor(const QColor& selcolor);
+ void setSelectedColor(const TQColor& selcolor);
/**
* This is an overloaded version for convenience.
*
* @see setSelectedColor()
*/
- void setSelectedColor(const QString& selcolor);
+ void setSelectedColor(const TQString& selcolor);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void setCursor ( const QCursor& cursor );
+ virtual void setCursor ( const TQCursor& cursor );
/**
* Overridden for internal reasons; the API remains unaffected.
@@ -258,7 +258,7 @@ public slots:
* @param on whether a custom cursor should be displayed.
* @param cursor is the custom cursor. @p 0L indicates the default "hand cursor".
*/
- void setUseCursor (bool on, QCursor* cursor = 0L);
+ void setUseCursor (bool on, TQCursor* cursor = 0L);
/**
* Turns on or off the "glow" feature.
@@ -291,7 +291,7 @@ public slots:
*
* @see altPixmap()
*/
- void setAltPixmap (const QPixmap& altPix);
+ void setAltPixmap (const TQPixmap& altPix);
signals:
@@ -300,7 +300,7 @@ signals:
*
* @param url The URL for this label.
*/
- void enteredURL (const QString& url);
+ void enteredURL (const TQString& url);
/**
* Emitted when the mouse has passed over the label.
@@ -312,7 +312,7 @@ signals:
*
* @param url The URL for this label.
*/
- void leftURL (const QString& url);
+ void leftURL (const TQString& url);
/**
* Emitted when the mouse is no longer over the label.
@@ -324,7 +324,7 @@ signals:
*
* @param url The URL for this label.
*/
- void leftClickedURL(const QString& url);
+ void leftClickedURL(const TQString& url);
/**
* Emitted when the user clicked the left mouse button on this label.
@@ -336,7 +336,7 @@ signals:
*
* @param url The URL for this label.
*/
- void rightClickedURL(const QString& url);
+ void rightClickedURL(const TQString& url);
/**
* Emitted when the user clicked the right mouse button on this label.
@@ -348,7 +348,7 @@ signals:
*
* @param url The URL for this label.
*/
- void middleClickedURL(const QString& url);
+ void middleClickedURL(const TQString& url);
/**
* Emitted when the user clicked the left mouse button on this label.
@@ -360,27 +360,27 @@ protected:
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void mouseReleaseEvent ( QMouseEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void enterEvent (QEvent*);
+ virtual void enterEvent (TQEvent*);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void leaveEvent (QEvent*);
+ virtual void leaveEvent (TQEvent*);
/**
* Catch parent palette changes
*/
- virtual bool event (QEvent *e);
+ virtual bool event (TQEvent *e);
/**
*
*/
- QRect activeRect() const;
+ TQRect activeRect() const;
private slots:
@@ -395,7 +395,7 @@ private:
* @internal
* A private helper function to set the link-color to @p col.
*/
- void setLinkColor (const QColor& col);
+ void setLinkColor (const TQColor& col);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kwhatsthismanager.cpp b/kdeui/kwhatsthismanager.cpp
index 77c957a62..a2f3cf0f6 100644
--- a/kdeui/kwhatsthismanager.cpp
+++ b/kdeui/kwhatsthismanager.cpp
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
#include "kwhatsthismanager_p.h"
-#include "qwhatsthis.h"
-#include <qvariant.h>
+#include "tqwhatsthis.h"
+#include <tqvariant.h>
#include <kdebug.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <klocale.h>
#include <kapplication.h>
@@ -29,57 +29,57 @@ KWhatsThisManager *KWhatsThisManager::s_instance = 0;
class KWhatsThisUndefined : public QWhatsThis
{
public:
- KWhatsThisUndefined (QWidget *);
- QString text (const QPoint &);
+ KWhatsThisUndefined (TQWidget *);
+ TQString text (const TQPoint &);
public slots:
- bool clicked (const QString &);
+ bool clicked (const TQString &);
protected:
- QWidget *m_widget;
+ TQWidget *m_widget;
};
-KWhatsThisUndefined::KWhatsThisUndefined (QWidget *w)
- : QWhatsThis (w)
+KWhatsThisUndefined::KWhatsThisUndefined (TQWidget *w)
+ : TQWhatsThis (w)
{
m_widget = w;
}
-QString KWhatsThisUndefined::text (const QPoint &)
+TQString KWhatsThisUndefined::text (const TQPoint &)
{
if (!m_widget)
return "";
- QString txt = i18n ("<b>Not Defined</b><br>There is no \"What's This?\""
+ TQString txt = i18n ("<b>Not Defined</b><br>There is no \"What's This?\""
" help assigned to this widget. If you want to help us to "
" describe the widget, you are welcome to <a href=\"submit"
"-whatsthis\">send us your own \"What's This?\" help</a> for it.");
- QString parent;
+ TQString parent;
if (m_widget -> parentWidget ())
- parent = QWhatsThis::textFor (m_widget -> parentWidget ());
+ parent = TQWhatsThis::textFor (m_widget -> parentWidget ());
if (parent != txt)
if (! parent . isEmpty ())
return parent;
return txt;
}
-bool KWhatsThisUndefined::clicked (const QString& href)
+bool KWhatsThisUndefined::clicked (const TQString& href)
{
if (href == "submit-whatsthis") {
- QWidget *w = m_widget;
- QString body;
+ TQWidget *w = m_widget;
+ TQString body;
body . append ("Widget text: '" + (m_widget -> property ("text") . toString ()) + "'\n");
- QString dsc = QString ("current --> ") + m_widget -> name ();
- dsc . append (QString (" (") + m_widget -> className () + ")\n");
+ TQString dsc = TQString ("current --> ") + m_widget -> name ();
+ dsc . append (TQString (" (") + m_widget -> className () + ")\n");
for (w = m_widget; w && w != m_widget -> topLevelWidget (); w = w -> parentWidget ()) {
dsc . append (w -> name ());
- dsc . append (QString (" (") + w -> className () + ")\n");
+ dsc . append (TQString (" (") + w -> className () + ")\n");
}
w = m_widget -> topLevelWidget ();
if (w) {
dsc . append ("toplevel --> ");
dsc . append (w -> name ());
- dsc . append (QString (" (") + w -> className () + ")\n");
+ dsc . append (TQString (" (") + w -> className () + ")\n");
}
body . append (dsc);
- QString subj ("What's This submission: ");
+ TQString subj ("What's This submission: ");
subj . append (qApp -> argv () [0]);
body . append ("\nPlease type in your what's this help between these lines: "
"\n--%-----------------------------------------------------------------------\n"
@@ -102,15 +102,15 @@ KWhatsThisManager::KWhatsThisManager ()
// qApp -> installEventFilter (this);
}
-bool KWhatsThisManager::eventFilter (QObject * /*o*/, QEvent *e)
+bool KWhatsThisManager::eventFilter (TQObject * /*o*/, TQEvent *e)
{
- if (e -> type () == QEvent::ChildInserted) {
- QChildEvent *ce = (QChildEvent *)e;
+ if (e -> type () == TQEvent::ChildInserted) {
+ TQChildEvent *ce = (TQChildEvent *)e;
// kdDebug () << "new qobject:" << ce -> child () << endl;
if (ce -> child () -> isWidgetType ()) {
- QWidget *w = (QWidget *) (ce -> child ());
+ TQWidget *w = (TQWidget *) (ce -> child ());
// kdDebug () << "new qwidget:" << w << endl;
- if (QWhatsThis::textFor (w) . isEmpty ())
+ if (TQWhatsThis::textFor (w) . isEmpty ())
new KWhatsThisUndefined (w);
}
}
diff --git a/kdeui/kwhatsthismanager_p.h b/kdeui/kwhatsthismanager_p.h
index 6dd420be5..3c32c7d18 100644
--- a/kdeui/kwhatsthismanager_p.h
+++ b/kdeui/kwhatsthismanager_p.h
@@ -19,8 +19,8 @@
#ifndef KWHATSTHISMANAGER_P_H
#define KWHATSTHISMANAGER_P_H
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
#include <kdialogbase.h>
@@ -48,7 +48,7 @@ class KDEUI_EXPORT KWhatsThisManager : public QObject
Q_OBJECT
public:
static void init ();
- bool eventFilter (QObject *o, QEvent *e);
+ bool eventFilter (TQObject *o, TQEvent *e);
protected:
static KWhatsThisManager *s_instance;
private:
diff --git a/kdeui/kwindowinfo.cpp b/kdeui/kwindowinfo.cpp
index 263deae84..362cc5b79 100644
--- a/kdeui/kwindowinfo.cpp
+++ b/kdeui/kwindowinfo.cpp
@@ -4,10 +4,10 @@
* email : rich@kde.org
*/
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <ksystemtray.h>
#include <kwin.h>
@@ -17,8 +17,8 @@
static const int UNSPECIFIED_TIMEOUT = -1;
static const int DEFAULT_MESSAGE_TIMEOUT = 3000;
-KWindowInfo::KWindowInfo( QWidget *parent, const char *name )
- : QObject( parent, name ), win( parent ), autoDel( false )
+KWindowInfo::KWindowInfo( TQWidget *parent, const char *name )
+ : TQObject( parent, name ), win( parent ), autoDel( false )
{
}
@@ -26,7 +26,7 @@ KWindowInfo::~KWindowInfo()
{
}
-void KWindowInfo::showMessage( QWidget *window, const QString &text, int timeout )
+void KWindowInfo::showMessage( TQWidget *window, const TQString &text, int timeout )
{
KWindowInfo *info = new KWindowInfo( window );
info->autoDel = true;
@@ -35,29 +35,29 @@ void KWindowInfo::showMessage( QWidget *window, const QString &text, int timeout
delete info;
}
-void KWindowInfo::showMessage( QWidget *window, const QString &text, const QPixmap &pix, int timeout )
+void KWindowInfo::showMessage( TQWidget *window, const TQString &text, const TQPixmap &pix, int timeout )
{
KWindowInfo *info = new KWindowInfo( window );
info->autoDel = true;
info->message( text, pix, timeout );
}
-void KWindowInfo::message( const QString &text )
+void KWindowInfo::message( const TQString &text )
{
- message( text, QPixmap(), UNSPECIFIED_TIMEOUT );
+ message( text, TQPixmap(), UNSPECIFIED_TIMEOUT );
}
-void KWindowInfo::message( const QString &text, const QPixmap &pix )
+void KWindowInfo::message( const TQString &text, const TQPixmap &pix )
{
message( text, pix, UNSPECIFIED_TIMEOUT );
}
-void KWindowInfo::message( const QString &text, int timeout )
+void KWindowInfo::message( const TQString &text, int timeout )
{
- message( text, QPixmap(), timeout );
+ message( text, TQPixmap(), timeout );
}
-void KWindowInfo::message( const QString &text, const QPixmap &pix, int timeout )
+void KWindowInfo::message( const TQString &text, const TQPixmap &pix, int timeout )
{
if ( timeout != 0 )
save();
@@ -67,10 +67,10 @@ void KWindowInfo::message( const QString &text, const QPixmap &pix, int timeout
if ( timeout < 0 )
timeout = DEFAULT_MESSAGE_TIMEOUT;
if ( timeout != 0 )
- QTimer::singleShot( timeout, this, SLOT( restore() ) );
+ TQTimer::singleShot( timeout, this, TQT_SLOT( restore() ) );
}
-void KWindowInfo::permanent( const QString &text )
+void KWindowInfo::permanent( const TQString &text )
{
#ifdef Q_WS_X11
oldMiniIcon = KWin::icon( win->winId(), 16, 16, true );
@@ -82,12 +82,12 @@ void KWindowInfo::permanent( const QString &text )
permanent( text, oldIcon );
}
-void KWindowInfo::permanent( const QString &text, const QPixmap &pix )
+void KWindowInfo::permanent( const TQString &text, const TQPixmap &pix )
{
if ( !oldText.isNull() ) {
- QObjectList *l = queryList( "QTimer" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList( "TQTimer" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
@@ -96,13 +96,13 @@ void KWindowInfo::permanent( const QString &text, const QPixmap &pix )
delete l;
}
- oldText = QString::null;
+ oldText = TQString::null;
display( text, pix );
}
-void KWindowInfo::display( const QString &text, const QPixmap &pix )
+void KWindowInfo::display( const TQString &text, const TQPixmap &pix )
{
- QPixmap icon;
+ TQPixmap icon;
if ( pix.isNull() )
icon.load( "bell.png" );
else
@@ -111,7 +111,7 @@ void KWindowInfo::display( const QString &text, const QPixmap &pix )
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
tray->setPixmap( icon );
- QToolTip::add( tray, text );
+ TQToolTip::add( tray, text );
return;
}
@@ -130,7 +130,7 @@ void KWindowInfo::save()
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
oldIcon = *(tray->pixmap());
- oldText = QToolTip::textFor( tray );
+ oldText = TQToolTip::textFor( tray );
return;
}
@@ -143,7 +143,7 @@ void KWindowInfo::save()
#endif
if ( oldIcon.isNull() ) {
- const QPixmap *px = win->icon();
+ const TQPixmap *px = win->icon();
if ( px )
oldIcon = *px;
else
@@ -156,8 +156,8 @@ void KWindowInfo::restore()
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
tray->setPixmap( oldIcon );
- QToolTip::add( tray, oldText );
- oldText = QString::null;
+ TQToolTip::add( tray, oldText );
+ oldText = TQString::null;
return;
}
@@ -166,7 +166,7 @@ void KWindowInfo::restore()
KWin::setIcons( win->winId(), oldIcon, oldMiniIcon );
#endif
win->setCaption( oldText );
- oldText = QString::null;
+ oldText = TQString::null;
if ( autoDel )
delete this;
diff --git a/kdeui/kwindowinfo.h b/kdeui/kwindowinfo.h
index c419a41d3..efd797c91 100644
--- a/kdeui/kwindowinfo.h
+++ b/kdeui/kwindowinfo.h
@@ -9,9 +9,9 @@
#ifndef KWINDOWINFO_H
#define KWINDOWINFO_H
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -28,7 +28,7 @@
* default timeout to ensure the message is only displayed for 1
* second.
* \code
- * QPixmap px;
+ * TQPixmap px;
* px.load( "lo16-app-logtracker.png" );
* KWindowInfo::showMessage( this, i18n("Message Body"), px, 1000 );
* \endcode
@@ -46,7 +46,7 @@ public:
/**
* Creates a KWindowInfo with the specified parent.
*/
- KWindowInfo( QWidget *parent, const char *name=0 );
+ KWindowInfo( TQWidget *parent, const char *name=0 );
/**
* Cleans up.
@@ -68,30 +68,30 @@ public:
* Utility method to display a title bar message for the specified
* window.
*/
- static void showMessage( QWidget *window, const QString &text, int timeout = -1 );
+ static void showMessage( TQWidget *window, const TQString &text, int timeout = -1 );
/**
* Utility method to display a title bar message and icon for the
* specified window.
*/
- static void showMessage( QWidget *window, const QString &text,
- const QPixmap &pix, int timeout = -1 );
+ static void showMessage( TQWidget *window, const TQString &text,
+ const TQPixmap &pix, int timeout = -1 );
public slots:
/**
* Shows the specified text in the window title.
*/
- void message( const QString &text );
+ void message( const TQString &text );
/**
* Shows the specified text in the window title, and sets the window icon.
*/
- void message( const QString &text, const QPixmap &pix );
+ void message( const TQString &text, const TQPixmap &pix );
/**
* Shows the specified text in the window title for the specified time.
*/
- void message( const QString &text, int timeout );
+ void message( const TQString &text, int timeout );
/**
* Shows the specified icon and text in the window title and WM
@@ -100,23 +100,23 @@ public slots:
* values are -1 which means the default timeout should be used,
* and 0 which means the message is permanent.
*/
- void message( const QString &text, const QPixmap &pix, int timeout );
+ void message( const TQString &text, const TQPixmap &pix, int timeout );
/**
* Shows the specified text in the window title with no timeout.
*/
- void permanent( const QString &text );
+ void permanent( const TQString &text );
/**
* Shows the specified text and icon in the window title with no timeout.
*/
- void permanent( const QString &text, const QPixmap &pix );
+ void permanent( const TQString &text, const TQPixmap &pix );
protected:
/**
* Displays the message in the titlebar/icon.
*/
- virtual void display( const QString &text, const QPixmap &pix );
+ virtual void display( const TQString &text, const TQPixmap &pix );
protected slots:
/**
@@ -131,10 +131,10 @@ protected slots:
virtual void restore();
private:
- QWidget *win;
- QPixmap oldIcon;
- QPixmap oldMiniIcon;
- QString oldText;
+ TQWidget *win;
+ TQPixmap oldIcon;
+ TQPixmap oldMiniIcon;
+ TQString oldText;
bool autoDel;
/* @internal */
diff --git a/kdeui/kwindowlistmenu.cpp b/kdeui/kwindowlistmenu.cpp
index 8167bcdae..de9cd0c08 100644
--- a/kdeui/kwindowlistmenu.cpp
+++ b/kdeui/kwindowlistmenu.cpp
@@ -22,13 +22,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_X11
#include "config.h"
-#include <qpainter.h>
-#include <qvaluelist.h>
+#include <tqpainter.h>
+#include <tqvaluelist.h>
#include <kwin.h>
#include <kwinmodule.h>
@@ -45,8 +45,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "kwindowlistmenu.h"
#include "kwindowlistmenu.moc"
-static QCString kwinName() {
- QCString appname;
+static TQCString kwinName() {
+ TQCString appname;
int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number == 0)
appname = "kwin";
@@ -58,21 +58,21 @@ static QCString kwinName() {
// helper class
namespace
{
-class NameSortedInfoList : public QPtrList<KWin::WindowInfo>
+class NameSortedInfoList : public TQPtrList<KWin::WindowInfo>
{
public:
NameSortedInfoList() { setAutoDelete(true); }
~NameSortedInfoList() {}
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
-int NameSortedInfoList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
KWin::WindowInfo *i1 = static_cast<KWin::WindowInfo *>(s1);
KWin::WindowInfo *i2 = static_cast<KWin::WindowInfo *>(s2);
- QString title1, title2;
+ TQString title1, title2;
if (i1)
title1 = i1->visibleNameWithState().lower();
if (i2)
@@ -82,12 +82,12 @@ int NameSortedInfoList::compareItems( QPtrCollection::Item s1, QPtrCollection::I
} // namespace
-KWindowListMenu::KWindowListMenu(QWidget *parent, const char *name)
+KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
kwin_module = new KWinModule(this);
- connect(this, SIGNAL(activated(int)), SLOT(slotExec(int)));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int)));
}
KWindowListMenu::~KWindowListMenu()
@@ -102,7 +102,7 @@ static bool standaloneDialog( const KWin::WindowInfo* info, const NameSortedInfo
{
return info->transientFor() == qt_xrootwin();
}
- for( QPtrListIterator< KWin::WindowInfo > it( list );
+ for( TQPtrListIterator< KWin::WindowInfo > it( list );
it.current() != NULL;
++it )
if( (*it)->groupLeader() == group )
@@ -127,9 +127,9 @@ void KWindowListMenu::init()
map.clear();
int unclutter = insertItem( i18n("Unclutter Windows"),
- this, SLOT( slotUnclutterWindows() ) );
+ this, TQT_SLOT( slotUnclutterWindows() ) );
int cascade = insertItem( i18n("Cascade Windows"),
- this, SLOT( slotCascadeWindows() ) );
+ this, TQT_SLOT( slotCascadeWindows() ) );
// if we only have one desktop we won't be showing titles, so put a separator in
if (nd == 1)
@@ -138,8 +138,8 @@ void KWindowListMenu::init()
}
- QValueList<KWin::WindowInfo> windows;
- for (QValueList<WId>::ConstIterator it = kwin_module->windows().begin();
+ TQValueList<KWin::WindowInfo> windows;
+ for (TQValueList<WId>::ConstIterator it = kwin_module->windows().begin();
it != kwin_module->windows().end(); ++it) {
windows.append( KWin::windowInfo( *it, NET::WMDesktop ));
}
@@ -154,7 +154,7 @@ void KWindowListMenu::init()
NameSortedInfoList list;
list.setAutoDelete(true);
- for (QValueList<KWin::WindowInfo>::ConstIterator it = windows.begin();
+ for (TQValueList<KWin::WindowInfo>::ConstIterator it = windows.begin();
it != windows.end(); ++it) {
if (((*it).desktop() == d) || (on_all_desktops && (*it).onAllDesktops())
|| (!show_all_desktops_group && (*it).onAllDesktops())) {
@@ -166,14 +166,14 @@ void KWindowListMenu::init()
for (KWin::WindowInfo* info = list.first(); info; info = list.next(), ++i)
{
- QString itemText = KStringHandler::cPixelSqueeze(info->visibleNameWithState(), fontMetrics(), maxwidth);
+ TQString itemText = KStringHandler::cPixelSqueeze(info->visibleNameWithState(), fontMetrics(), maxwidth);
NET::WindowType windowType = info->windowType( NET::NormalMask | NET::DesktopMask
| NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask
| NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask );
if ( (windowType == NET::Normal || windowType == NET::Unknown
|| (windowType == NET::Dialog && standaloneDialog( info, list )))
&& !(info->state() & NET::SkipTaskbar) ) {
- QPixmap pm = KWin::icon(info->win(), 16, 16, true );
+ TQPixmap pm = KWin::icon(info->win(), 16, 16, true );
items++;
// ok, we have items on this desktop, let's show the title
@@ -186,7 +186,7 @@ void KWindowListMenu::init()
}
// Avoid creating unwanted accelerators.
- itemText.replace('&', QString::fromLatin1("&&"));
+ itemText.replace('&', TQString::fromLatin1("&&"));
insertItem( pm, itemText, i);
map.insert(i, info->win());
if (info->win() == active_window)
@@ -225,8 +225,8 @@ void KWindowListMenu::slotExec(int id)
}
// This popup is much more useful from keyboard if it has the active
-// window active by default - however, QPopupMenu tries hard to resist.
-// QPopupMenu::popup() resets the active item, so this needs to be
+// window active by default - however, TQPopupMenu tries hard to resist.
+// TQPopupMenu::popup() resets the active item, so this needs to be
// called after popup().
void KWindowListMenu::selectActiveWindow()
{
diff --git a/kdeui/kwindowlistmenu.h b/kdeui/kwindowlistmenu.h
index 8e63ed59e..4b69799d2 100644
--- a/kdeui/kwindowlistmenu.h
+++ b/kdeui/kwindowlistmenu.h
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define __kwindowlistmenu_h__
#include <kpopupmenu.h>
-#include <qmap.h>
+#include <tqmap.h>
#ifdef Q_WS_X11 // not yet available for non-X11
@@ -38,7 +38,7 @@ class KDEUI_EXPORT KWindowListMenu : public KPopupMenu
Q_OBJECT
public:
- KWindowListMenu( QWidget *parent = 0, const char *name = 0 );
+ KWindowListMenu( TQWidget *parent = 0, const char *name = 0 );
virtual ~KWindowListMenu();
void init();
@@ -58,7 +58,7 @@ protected slots:
private:
KWinModule* kwin_module;
- QMap<int,WId> map;
+ TQMap<int,WId> map;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kwizard.cpp b/kdeui/kwizard.cpp
index 80443fead..21462faad 100644
--- a/kdeui/kwizard.cpp
+++ b/kdeui/kwizard.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -28,8 +28,8 @@
#include "kwizard.h"
-KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
- : QWizard( parent, name, modal, f )
+KWizard::KWizard( TQWidget *parent, const char *name, bool modal, WFlags f )
+ : TQWizard( parent, name, modal, f )
{
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
@@ -49,7 +49,7 @@ KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
nextButton()->setText( i18n( "Opposite to Back","&Next" ) );
}
- QFont font = titleFont();
+ TQFont font = titleFont();
font.setBold( true );
setTitleFont( font );
}
diff --git a/kdeui/kwizard.h b/kdeui/kwizard.h
index d9d1e05a1..81a2c2d65 100644
--- a/kdeui/kwizard.h
+++ b/kdeui/kwizard.h
@@ -23,7 +23,7 @@
#ifndef __KWIZARD_H
#define __KWIZARD_H
-#include <qwizard.h>
+#include <tqwizard.h>
#include <kdelibs_export.h>
@@ -35,8 +35,8 @@
* "Cancel" and "Help" buttons. A wizard comes in handy for tutorials or
* configuration dialogs with sequential steps.
*
-* KWizard is just a wrapper for Qt's QWizard class. See the
-* QWizard documentation for a detailed description of available
+* KWizard is just a wrapper for Qt's TQWizard class. See the
+* TQWizard documentation for a detailed description of available
* functions. The only added functionality is a KDE conformant translation
* mechanism for the built-in buttons.
*
@@ -50,7 +50,7 @@ public:
/**
* Constructor
*/
- KWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
+ KWizard(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
/**
* Destructor
*/
diff --git a/kdeui/kwordwrap.cpp b/kdeui/kwordwrap.cpp
index 4b2e801d0..9c6427eb5 100644
--- a/kdeui/kwordwrap.cpp
+++ b/kdeui/kwordwrap.cpp
@@ -19,19 +19,19 @@
#include "kwordwrap.h"
#include <kdebug.h>
#include <kstringhandler.h>
-#include <qpainter.h>
+#include <tqpainter.h>
class KWordWrapPrivate {
public:
- QRect m_constrainingRect;
+ TQRect m_constrainingRect;
};
-KWordWrap::KWordWrap(const QRect & r) {
+KWordWrap::KWordWrap(const TQRect & r) {
d = new KWordWrapPrivate;
d->m_constrainingRect = r;
}
-KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags*/, const QString & str, int len )
+KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*flags*/, const TQString & str, int len )
{
KWordWrap* kw = new KWordWrap( r );
// The wordwrap algorithm
@@ -58,7 +58,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
for ( int i = 0 ; i < len; ++i )
{
- QChar c = str[i];
+ TQChar c = str[i];
int ww = fm.charWidth( str, i );
isParens = ( c == '(' || c == '[' || c == '{' );
@@ -67,7 +67,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
// Special case for '(', '[' and '{': we want to break before them
if ( !isBreakable && i < len-1 ) {
- QChar nextc = str[i+1]; // look at next char
+ TQChar nextc = str[i+1]; // look at next char
isBreakable = ( nextc == '(' || nextc == '[' || nextc == '{' );
}
// Special case for '/': after normal chars it's breakable (e.g. inside a path),
@@ -76,7 +76,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
if ( c == '/' && (wasBreakable || wasParens) )
isBreakable = false;
- /*kdDebug() << "c='" << QString(c) << "' i=" << i << "/" << len
+ /*kdDebug() << "c='" << TQString(c) << "' i=" << i << "/" << len
<< " x=" << x << " ww=" << ww << " w=" << w
<< " lastBreak=" << lastBreak << " isBreakable=" << isBreakable << endl;*/
int breakAt = -1;
@@ -145,12 +145,12 @@ KWordWrap::~KWordWrap() {
delete d;
}
-QString KWordWrap::wrappedString() const
+TQString KWordWrap::wrappedString() const
{
// We use the calculated break positions to insert '\n' into the string
- QString ws;
+ TQString ws;
int start = 0;
- QValueList<int>::ConstIterator it = m_breakPositions.begin();
+ TQValueList<int>::ConstIterator it = m_breakPositions.begin();
for ( ; it != m_breakPositions.end() ; ++it )
{
int end = (*it);
@@ -161,28 +161,28 @@ QString KWordWrap::wrappedString() const
return ws;
}
-QString KWordWrap::truncatedString( bool dots ) const
+TQString KWordWrap::truncatedString( bool dots ) const
{
if ( m_breakPositions.isEmpty() )
return m_text;
- QString ts = m_text.left( m_breakPositions.first() + 1 );
+ TQString ts = m_text.left( m_breakPositions.first() + 1 );
if ( dots )
ts += "...";
return ts;
}
-static QColor mixColors(double p1, QColor c1, QColor c2) {
- return QColor(int(c1.red() * p1 + c2.red() * (1.0-p1)),
+static TQColor mixColors(double p1, TQColor c1, TQColor c2) {
+ return TQColor(int(c1.red() * p1 + c2.red() * (1.0-p1)),
int(c1.green() * p1 + c2.green() * (1.0-p1)),
int(c1.blue() * p1 + c2.blue() * (1.0-p1)));
}
-void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
- const QString &t) {
- QFontMetrics fm = p->fontMetrics();
- QColor bgColor = p->backgroundColor();
- QColor textColor = p->pen().color();
+void KWordWrap::drawFadeoutText(TQPainter *p, int x, int y, int maxW,
+ const TQString &t) {
+ TQFontMetrics fm = p->fontMetrics();
+ TQColor bgColor = p->backgroundColor();
+ TQColor textColor = p->pen().color();
if ( ( fm.boundingRect( t ).width() > maxW ) && ( t.length() > 1 ) ) {
unsigned int tl = 0;
@@ -201,7 +201,7 @@ void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
int n = QMIN( tl, 3);
for (int i = 0; i < n; i++) {
p->setPen( mixColors( 0.70 - i * 0.25, textColor, bgColor ) );
- QString s( t.at( tl - n + i ) );
+ TQString s( t.at( tl - n + i ) );
p->drawText( x, y, s );
x += fm.width( s );
}
@@ -210,24 +210,24 @@ void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
p->drawText( x, y, t );
}
-void KWordWrap::drawTruncateText(QPainter *p, int x, int y, int maxW,
- const QString &t) {
- QString tmpText = KStringHandler::rPixelSqueeze( t, p->fontMetrics(), maxW );
+void KWordWrap::drawTruncateText(TQPainter *p, int x, int y, int maxW,
+ const TQString &t) {
+ TQString tmpText = KStringHandler::rPixelSqueeze( t, p->fontMetrics(), maxW );
p->drawText( x, y, tmpText, maxW );
}
-void KWordWrap::drawText( QPainter *painter, int textX, int textY, int flags ) const
+void KWordWrap::drawText( TQPainter *painter, int textX, int textY, int flags ) const
{
//kdDebug() << "KWordWrap::drawText text=" << wrappedString() << " x=" << textX << " y=" << textY << endl;
// We use the calculated break positions to draw the text line by line using QPainter
int start = 0;
int y = 0;
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int height = fm.height(); // line height
int ascent = fm.ascent();
int maxwidth = m_boundingRect.width();
- QValueList<int>::ConstIterator it = m_breakPositions.begin();
- QValueList<int>::ConstIterator itw = m_lineWidths.begin();
+ TQValueList<int>::ConstIterator it = m_breakPositions.begin();
+ TQValueList<int>::ConstIterator itw = m_lineWidths.begin();
for ( ; it != m_breakPositions.end() ; ++it, ++itw )
{
// if this is the last line, leave the loop
diff --git a/kdeui/kwordwrap.h b/kdeui/kwordwrap.h
index 676000789..22fcf940a 100644
--- a/kdeui/kwordwrap.h
+++ b/kdeui/kwordwrap.h
@@ -19,10 +19,10 @@
#ifndef kwordwrap_h
#define kwordwrap_h
-#include <qfontmetrics.h>
-#include <qvaluelist.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqfontmetrics.h>
+#include <tqvaluelist.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -58,7 +58,7 @@ public:
/**
* Main method for wrapping text.
*
- * @param fm Font metrics, for the chosen font. Better cache it, creating a QFontMetrics is expensive.
+ * @param fm Font metrics, for the chosen font. Better cache it, creating a TQFontMetrics is expensive.
* @param r Constraining rectangle. Only the width and height matter. With
* negative height the complete text will be rendered
* @param flags currently unused
@@ -66,7 +66,7 @@ public:
* @param len Length of text to wrap (default is -1 for all).
* @return a KWordWrap instance. The caller is responsible for storing and deleting the result.
*/
- static KWordWrap* formatText( QFontMetrics &fm, const QRect & r, int flags, const QString & str, int len = -1 );
+ static KWordWrap* formatText( TQFontMetrics &fm, const TQRect & r, int flags, const TQString & str, int len = -1 );
/**
* @return the bounding rect, calculated by formatText. The width is the
@@ -74,26 +74,26 @@ public:
* the rectangle given to formatText. The height is the
* text block. X and Y are always 0.
*/
- QRect boundingRect() const { return m_boundingRect; }
+ TQRect boundingRect() const { return m_boundingRect; }
/**
* @return the original string, with '\n' inserted where
* the text is broken by the wordwrap algorithm.
*/
- QString wrappedString() const; // gift for Dirk :)
+ TQString wrappedString() const; // gift for Dirk :)
/**
* @return the original string, truncated to the first line.
* If @p dots was set, '...' is appended in case the string was truncated.
* Bug: Note that the '...' come out of the bounding rect.
*/
- QString truncatedString( bool dots = true ) const;
+ TQString truncatedString( bool dots = true ) const;
/**
* Draw the text that has been previously wrapped, at position x,y.
* Flags are for alignment, e.g. Qt::AlignHCenter. Default is
* Qt::AlignAuto.
- * @param painter the QPainter to use.
+ * @param painter the TQPainter to use.
* @param x the horizontal position of the text
* @param y the vertical position of the text
* @param flags the ORed text alignment flags from the Qt namespace,
@@ -101,7 +101,7 @@ public:
* does not fit (the @p painter's background must be set
* accordingly)
*/
- void drawText( QPainter *painter, int x, int y, int flags = Qt::AlignAuto ) const;
+ void drawText( TQPainter *painter, int x, int y, int flags = Qt::AlignAuto ) const;
/**
* Destructor.
@@ -120,8 +120,8 @@ public:
* @param t the text to draw
* @since 3.2
*/
- static void drawFadeoutText( QPainter *p, int x, int y, int maxW,
- const QString &t );
+ static void drawFadeoutText( TQPainter *p, int x, int y, int maxW,
+ const TQString &t );
/**
* Draws the string @p t at the given coordinates, if it does not
@@ -133,15 +133,15 @@ public:
* @param t the text to draw
* @since 3.3
*/
- static void drawTruncateText( QPainter *p, int x, int y, int maxW,
- const QString &t );
+ static void drawTruncateText( TQPainter *p, int x, int y, int maxW,
+ const TQString &t );
private:
- KWordWrap( const QRect & r );
- QValueList<int> m_breakPositions;
- QValueList<int> m_lineWidths;
- QRect m_boundingRect;
- QString m_text;
+ KWordWrap( const TQRect & r );
+ TQValueList<int> m_breakPositions;
+ TQValueList<int> m_lineWidths;
+ TQRect m_boundingRect;
+ TQString m_text;
private:
class KWordWrapPrivate* d;
};
diff --git a/kdeui/kxmlguibuilder.cpp b/kdeui/kxmlguibuilder.cpp
index d3a19b77b..305ce135c 100644
--- a/kdeui/kxmlguibuilder.cpp
+++ b/kdeui/kxmlguibuilder.cpp
@@ -30,7 +30,7 @@
#include <klocale.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
class KXMLGUIBuilderPrivate
{
@@ -40,54 +40,54 @@ public:
~KXMLGUIBuilderPrivate() {
}
- QWidget *m_widget;
+ TQWidget *m_widget;
- QString tagMainWindow;
- QString tagMenuBar;
- QString tagMenu;
- QString tagToolBar;
- QString tagStatusBar;
+ TQString tagMainWindow;
+ TQString tagMenuBar;
+ TQString tagMenu;
+ TQString tagToolBar;
+ TQString tagStatusBar;
- QString tagSeparator;
- QString tagTearOffHandle;
- QString tagMenuTitle;
+ TQString tagSeparator;
+ TQString tagTearOffHandle;
+ TQString tagMenuTitle;
- QString attrName;
- QString attrLineSeparator;
+ TQString attrName;
+ TQString attrLineSeparator;
- QString attrText1;
- QString attrText2;
- QString attrContext;
+ TQString attrText1;
+ TQString attrText2;
+ TQString attrContext;
- QString attrIcon;
+ TQString attrIcon;
KInstance *m_instance;
KXMLGUIClient *m_client;
};
-KXMLGUIBuilder::KXMLGUIBuilder( QWidget *widget )
+KXMLGUIBuilder::KXMLGUIBuilder( TQWidget *widget )
{
d = new KXMLGUIBuilderPrivate;
d->m_widget = widget;
- d->tagMainWindow = QString::fromLatin1( "mainwindow" );
- d->tagMenuBar = QString::fromLatin1( "menubar" );
- d->tagMenu = QString::fromLatin1( "menu" );
- d->tagToolBar = QString::fromLatin1( "toolbar" );
- d->tagStatusBar = QString::fromLatin1( "statusbar" );
+ d->tagMainWindow = TQString::fromLatin1( "mainwindow" );
+ d->tagMenuBar = TQString::fromLatin1( "menubar" );
+ d->tagMenu = TQString::fromLatin1( "menu" );
+ d->tagToolBar = TQString::fromLatin1( "toolbar" );
+ d->tagStatusBar = TQString::fromLatin1( "statusbar" );
- d->tagSeparator = QString::fromLatin1( "separator" );
- d->tagTearOffHandle = QString::fromLatin1( "tearoffhandle" );
- d->tagMenuTitle = QString::fromLatin1( "title" );
+ d->tagSeparator = TQString::fromLatin1( "separator" );
+ d->tagTearOffHandle = TQString::fromLatin1( "tearoffhandle" );
+ d->tagMenuTitle = TQString::fromLatin1( "title" );
- d->attrName = QString::fromLatin1( "name" );
- d->attrLineSeparator = QString::fromLatin1( "lineseparator" );
+ d->attrName = TQString::fromLatin1( "name" );
+ d->attrLineSeparator = TQString::fromLatin1( "lineseparator" );
- d->attrText1 = QString::fromLatin1( "text" );
- d->attrText2 = QString::fromLatin1( "Text" );
- d->attrContext = QString::fromLatin1( "context" );
+ d->attrText1 = TQString::fromLatin1( "text" );
+ d->attrText2 = TQString::fromLatin1( "Text" );
+ d->attrContext = TQString::fromLatin1( "context" );
- d->attrIcon = QString::fromLatin1( "icon" );
+ d->attrIcon = TQString::fromLatin1( "icon" );
d->m_instance = 0;
d->m_client = 0;
@@ -98,20 +98,20 @@ KXMLGUIBuilder::~KXMLGUIBuilder()
delete d;
}
-QWidget *KXMLGUIBuilder::widget()
+TQWidget *KXMLGUIBuilder::widget()
{
return d->m_widget;
}
-QStringList KXMLGUIBuilder::containerTags() const
+TQStringList KXMLGUIBuilder::containerTags() const
{
- QStringList res;
+ TQStringList res;
res << d->tagMenu << d->tagToolBar << d->tagMainWindow << d->tagMenuBar << d->tagStatusBar;
return res;
}
-QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
{
id = -1;
if ( element.tagName().lower() == d->tagMainWindow )
@@ -144,23 +144,23 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
// the popup won't be hidden if it is used as a standalone menu as well.
// And we don't want to set the parent for a standalone popupmenu,
// otherwise its shortcuts appear.
- QWidget* p = parent;
+ TQWidget* p = parent;
while ( p && !::qt_cast<KMainWindow *>( p ) )
p = p->parentWidget();
- QCString name = element.attribute( d->attrName ).utf8();
+ TQCString name = element.attribute( d->attrName ).utf8();
if (!kapp->authorizeKAction(name))
return 0;
KPopupMenu *popup = new KPopupMenu( p, name);
- QString i18nText;
- QDomElement textElem = element.namedItem( d->attrText1 ).toElement();
+ TQString i18nText;
+ TQDomElement textElem = element.namedItem( d->attrText1 ).toElement();
if ( textElem.isNull() ) // try with capital T
textElem = element.namedItem( d->attrText2 ).toElement();
- QCString text = textElem.text().utf8();
- QCString context = textElem.attribute(d->attrContext).utf8();
+ TQCString text = textElem.text().utf8();
+ TQCString context = textElem.attribute(d->attrContext).utf8();
if ( text.isEmpty() ) // still no luck
i18nText = i18n( "No text!" );
@@ -169,8 +169,8 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
else
i18nText = i18n( context, text );
- QString icon = element.attribute( d->attrIcon );
- QIconSet pix;
+ TQString icon = element.attribute( d->attrIcon );
+ TQIconSet pix;
if ( !icon.isEmpty() )
{
@@ -188,12 +188,12 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
else
id = static_cast<KMenuBar *>(parent)->insertItem( i18nText, popup, -1, index );
}
- else if ( parent && ::qt_cast<QPopupMenu *>( parent ) )
+ else if ( parent && ::qt_cast<TQPopupMenu *>( parent ) )
{
if ( !icon.isEmpty() )
- id = static_cast<QPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index );
+ id = static_cast<TQPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index );
else
- id = static_cast<QPopupMenu *>(parent)->insertItem( i18nText, popup, -1, index );
+ id = static_cast<TQPopupMenu *>(parent)->insertItem( i18nText, popup, -1, index );
}
return popup;
@@ -203,7 +203,7 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
{
bool honor = (element.attribute( d->attrName ) == "mainToolBar");
- QCString name = element.attribute( d->attrName ).utf8();
+ TQCString name = element.attribute( d->attrName ).utf8();
KToolBar *bar = static_cast<KToolBar*>(d->m_widget->child( name, "KToolBar" ));
if( !bar )
@@ -237,18 +237,18 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
return 0L;
}
-void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
{
// Warning parent can be 0L
- if ( ::qt_cast<QPopupMenu *>( container ) )
+ if ( ::qt_cast<TQPopupMenu *>( container ) )
{
if ( parent )
{
if ( ::qt_cast<KMenuBar *>( parent ) )
static_cast<KMenuBar *>(parent)->removeItem( id );
- else if ( ::qt_cast<QPopupMenu *>( parent ) )
- static_cast<QPopupMenu *>(parent)->removeItem( id );
+ else if ( ::qt_cast<TQPopupMenu *>( parent ) )
+ static_cast<TQPopupMenu *>(parent)->removeItem( id );
}
delete container;
@@ -266,7 +266,7 @@ void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomE
mb->hide();
// Don't delete menubar - it can be reused by createContainer.
// If you decide that you do need to delete the menubar, make
- // sure that QMainWindow::d->mb does not point to a deleted
+ // sure that TQMainWindow::d->mb does not point to a deleted
// menubar object.
}
else if ( ::qt_cast<KStatusBar *>( container ) )
@@ -280,21 +280,21 @@ void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomE
kdWarning() << "Unhandled container to remove : " << container->className() << endl;
}
-QStringList KXMLGUIBuilder::customTags() const
+TQStringList KXMLGUIBuilder::customTags() const
{
- QStringList res;
+ TQStringList res;
res << d->tagSeparator << d->tagTearOffHandle << d->tagMenuTitle;
return res;
}
-int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomElement &element )
+int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDomElement &element )
{
if ( element.tagName().lower() == d->tagSeparator )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) )
+ if ( ::qt_cast<TQPopupMenu *>( parent ) )
{
// Don't insert multiple separators in a row
- QPopupMenu *menu = static_cast<QPopupMenu *>(parent);
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>(parent);
int count = menu->count();
if (count)
{
@@ -317,22 +317,22 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
else
return menu->insertSeparator( index );
}
- else if ( ::qt_cast<QMenuBar *>( parent ) )
- return static_cast<QMenuBar *>(parent)->insertSeparator( index );
+ else if ( ::qt_cast<TQMenuBar *>( parent ) )
+ return static_cast<TQMenuBar *>(parent)->insertSeparator( index );
else if ( ::qt_cast<KToolBar *>( parent ) )
{
KToolBar *bar = static_cast<KToolBar *>( parent );
bool isLineSep = true;
- QDomNamedNodeMap attributes = element.attributes();
+ TQDomNamedNodeMap attributes = element.attributes();
unsigned int i = 0;
for (; i < attributes.length(); i++ )
{
- QDomAttr attr = attributes.item( i ).toAttr();
+ TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.name().lower() == d->attrLineSeparator &&
- attr.value().lower() == QString::fromLatin1("false") )
+ attr.value().lower() == TQString::fromLatin1("false") )
{
isLineSep = false;
break;
@@ -351,23 +351,23 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
}
else if ( element.tagName().lower() == d->tagTearOffHandle )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) && KGlobalSettings::insertTearOffHandle())
- return static_cast<QPopupMenu *>(parent)->insertTearOffHandle( -1, index );
+ if ( ::qt_cast<TQPopupMenu *>( parent ) && KGlobalSettings::insertTearOffHandle())
+ return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index );
}
else if ( element.tagName().lower() == d->tagMenuTitle )
{
if ( ::qt_cast<KPopupMenu *>( parent ) )
{
- QString i18nText;
- QCString text = element.text().utf8();
+ TQString i18nText;
+ TQCString text = element.text().utf8();
if ( text.isEmpty() )
i18nText = i18n( "No text!" );
else
i18nText = i18n( text );
- QString icon = element.attribute( d->attrIcon );
- QPixmap pix;
+ TQString icon = element.attribute( d->attrIcon );
+ TQPixmap pix;
if ( !icon.isEmpty() )
{
@@ -387,12 +387,12 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
return 0;
}
-void KXMLGUIBuilder::removeCustomElement( QWidget *parent, int id )
+void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) )
- static_cast<QPopupMenu *>(parent)->removeItem( id );
- else if ( ::qt_cast<QMenuBar *>( parent ) )
- static_cast<QMenuBar *>(parent)->removeItem( id );
+ if ( ::qt_cast<TQPopupMenu *>( parent ) )
+ static_cast<TQPopupMenu *>(parent)->removeItem( id );
+ else if ( ::qt_cast<TQMenuBar *>( parent ) )
+ static_cast<TQMenuBar *>(parent)->removeItem( id );
else if ( ::qt_cast<KToolBar *>( parent ) )
static_cast<KToolBar *>(parent)->removeItemDelayed( id );
}
diff --git a/kdeui/kxmlguibuilder.h b/kdeui/kxmlguibuilder.h
index 22f0cd6fd..4165c972c 100644
--- a/kdeui/kxmlguibuilder.h
+++ b/kdeui/kxmlguibuilder.h
@@ -20,8 +20,8 @@
#ifndef __kxmlguibuilder_h__
#define __kxmlguibuilder_h__
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ class KDEUI_EXPORT KXMLGUIBuilder
{
public:
- KXMLGUIBuilder( QWidget *widget );
+ KXMLGUIBuilder( TQWidget *widget );
virtual ~KXMLGUIBuilder();
/* @internal */
@@ -52,9 +52,9 @@ class KDEUI_EXPORT KXMLGUIBuilder
/* @internal */
void setBuilderInstance( KInstance *instance );
/* @internal */
- QWidget *widget();
+ TQWidget *widget();
- virtual QStringList containerTags() const;
+ virtual TQStringList containerTags() const;
/**
* Creates a container (menubar/menu/toolbar/statusbar/separator/...)
@@ -68,22 +68,22 @@ class KDEUI_EXPORT KXMLGUIBuilder
* attributes or child elements)
* @param id The id to be used for this container
*/
- virtual QWidget *createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id );
+ virtual TQWidget *createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id );
/**
* Removes the given (and previously via createContainer )
* created container.
*
*/
- virtual void removeContainer( QWidget *container, QWidget *parent,
- QDomElement &element, int id );
+ virtual void removeContainer( TQWidget *container, TQWidget *parent,
+ TQDomElement &element, int id );
- virtual QStringList customTags() const;
+ virtual TQStringList customTags() const;
- virtual int createCustomElement( QWidget *parent, int index, const QDomElement &element );
+ virtual int createCustomElement( TQWidget *parent, int index, const TQDomElement &element );
- virtual void removeCustomElement( QWidget *parent, int id );
+ virtual void removeCustomElement( TQWidget *parent, int id );
virtual void finalizeGUI( KXMLGUIClient *client );
diff --git a/kdeui/kxmlguiclient.cpp b/kdeui/kxmlguiclient.cpp
index ef14c2f49..f857f3109 100644
--- a/kdeui/kxmlguiclient.cpp
+++ b/kdeui/kxmlguiclient.cpp
@@ -21,12 +21,12 @@
#include "kxmlguifactory.h"
#include "kxmlguibuilder.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qguardedptr.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqguardedptr.h>
#include <kinstance.h>
#include <kstandarddirs.h>
@@ -52,16 +52,16 @@ public:
KInstance *m_instance;
- QDomDocument m_doc;
+ TQDomDocument m_doc;
KActionCollection *m_actionCollection;
- QDomDocument m_buildDocument;
- QGuardedPtr<KXMLGUIFactory> m_factory;
+ TQDomDocument m_buildDocument;
+ TQGuardedPtr<KXMLGUIFactory> m_factory;
KXMLGUIClient *m_parent;
- //QPtrList<KXMLGUIClient> m_supers;
- QPtrList<KXMLGUIClient> m_children;
+ //TQPtrList<KXMLGUIClient> m_supers;
+ TQPtrList<KXMLGUIClient> m_children;
KXMLGUIBuilder *m_builder;
- QString m_xmlFile;
- QString m_localXMLFile;
+ TQString m_xmlFile;
+ TQString m_localXMLFile;
};
KXMLGUIClient::KXMLGUIClient()
@@ -80,7 +80,7 @@ KXMLGUIClient::~KXMLGUIClient()
if ( d->m_parent )
d->m_parent->removeChildClient( this );
- QPtrListIterator<KXMLGUIClient> it( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> it( d->m_children );
for ( ; it.current(); ++it ) {
assert( it.current()->d->m_parent == this );
it.current()->d->m_parent = 0;
@@ -94,7 +94,7 @@ KAction *KXMLGUIClient::action( const char *name ) const
{
KAction* act = actionCollection()->action( name );
if ( !act ) {
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt ) {
act = childIt.current()->actionCollection()->action( name );
if ( act )
@@ -114,9 +114,9 @@ KActionCollection *KXMLGUIClient::actionCollection() const
return d->m_actionCollection;
}
-KAction *KXMLGUIClient::action( const QDomElement &element ) const
+KAction *KXMLGUIClient::action( const TQDomElement &element ) const
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
return actionCollection()->action( element.attribute( attrName ).latin1() );
}
@@ -125,31 +125,31 @@ KInstance *KXMLGUIClient::instance() const
return d->m_instance;
}
-QDomDocument KXMLGUIClient::domDocument() const
+TQDomDocument KXMLGUIClient::domDocument() const
{
return d->m_doc;
}
-QString KXMLGUIClient::xmlFile() const
+TQString KXMLGUIClient::xmlFile() const
{
return d->m_xmlFile;
}
-QString KXMLGUIClient::localXMLFile() const
+TQString KXMLGUIClient::localXMLFile() const
{
if ( !d->m_localXMLFile.isEmpty() )
return d->m_localXMLFile;
- if ( !QDir::isRelativePath(d->m_xmlFile) )
- return QString::null; // can't save anything here
+ if ( !TQDir::isRelativePath(d->m_xmlFile) )
+ return TQString::null; // can't save anything here
- return locateLocal( "data", QString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile );
+ return locateLocal( "data", TQString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile );
}
void KXMLGUIClient::reloadXML()
{
- QString file( xmlFile() );
+ TQString file( xmlFile() );
if ( !file.isEmpty() )
setXMLFile( file );
}
@@ -162,7 +162,7 @@ void KXMLGUIClient::setInstance( KInstance *instance )
d->m_builder->setBuilderClient( this );
}
-void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc )
+void KXMLGUIClient::setXMLFile( const TQString& _file, bool merge, bool setXMLDoc )
{
// store our xml file name
if ( !_file.isNull() ) {
@@ -173,14 +173,14 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
if ( !setXMLDoc )
return;
- QString file = _file;
- if ( QDir::isRelativePath(file) )
+ TQString file = _file;
+ if ( TQDir::isRelativePath(file) )
{
- QString doc;
+ TQString doc;
- QString filter = QString::fromLatin1( instance()->instanceName() + '/' ) + _file;
+ TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + _file;
- QStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file );
+ TQStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file );
file = findMostRecentXMLFile( allFiles, doc );
@@ -195,7 +195,7 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
if ( !_file.isEmpty() )
kdWarning() << "KXMLGUIClient::setXMLFile: cannot find .rc file " << _file << endl;
- setXML( QString::null, true );
+ setXML( TQString::null, true );
return;
}
else if ( !doc.isEmpty() )
@@ -205,29 +205,29 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
}
}
- QString xml = KXMLGUIFactory::readConfigFile( file );
+ TQString xml = KXMLGUIFactory::readConfigFile( file );
setXML( xml, merge );
}
-void KXMLGUIClient::setLocalXMLFile( const QString &file )
+void KXMLGUIClient::setLocalXMLFile( const TQString &file )
{
d->m_localXMLFile = file;
}
-void KXMLGUIClient::setXML( const QString &document, bool merge )
+void KXMLGUIClient::setXML( const TQString &document, bool merge )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( document );
setDOMDocument( doc, merge );
}
-void KXMLGUIClient::setDOMDocument( const QDomDocument &document, bool merge )
+void KXMLGUIClient::setDOMDocument( const TQDomDocument &document, bool merge )
{
if ( merge )
{
- QDomElement base = d->m_doc.documentElement();
+ TQDomElement base = d->m_doc.documentElement();
- QDomElement e = document.documentElement();
+ TQDomElement e = document.documentElement();
// merge our original (global) xml with our new one
mergeXML(base, e, actionCollection());
@@ -245,22 +245,22 @@ void KXMLGUIClient::setDOMDocument( const QDomDocument &document, bool merge )
d->m_doc = document;
}
- setXMLGUIBuildDocument( QDomDocument() );
+ setXMLGUIBuildDocument( TQDomDocument() );
}
-bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KActionCollection *actionCollection )
+bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, KActionCollection *actionCollection )
{
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagMerge = KGlobal::staticQString( "Merge" );
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrAppend = KGlobal::staticQString( "append" );
- static const QString &attrWeakSeparator = KGlobal::staticQString( "weakSeparator" );
- static const QString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
- static const QString &tagText = KGlobal::staticQString( "text" );
- static const QString &attrAlreadyVisited = KGlobal::staticQString( "alreadyVisited" );
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
- static const QString &attrOne = KGlobal::staticQString( "1" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagMerge = KGlobal::staticQString( "Merge" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrAppend = KGlobal::staticQString( "append" );
+ static const TQString &attrWeakSeparator = KGlobal::staticQString( "weakSeparator" );
+ static const TQString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
+ static const TQString &tagText = KGlobal::staticQString( "text" );
+ static const TQString &attrAlreadyVisited = KGlobal::staticQString( "alreadyVisited" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrOne = KGlobal::staticQString( "1" );
// there is a possibility that we don't want to merge in the
// additive.. rather, we might want to *replace* the base with the
@@ -273,13 +273,13 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
return true;
}
- QString tag;
+ TQString tag;
// iterate over all elements in the container (of the global DOM tree)
- QDomNode n = base.firstChild();
+ TQDomNode n = base.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -290,7 +290,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// not implemented, then we remove the element
if ( tag == tagAction )
{
- QCString name = e.attribute( attrName ).utf8(); // WABA
+ TQCString name = e.attribute( attrName ).utf8(); // WABA
if ( !actionCollection->action( name ) ||
(kapp && !kapp->authorizeKAction(name)))
{
@@ -309,7 +309,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// okay, hack time. if the last item was a weak separator OR
// this is the first item in a container, then we nuke the
// current one
- QDomElement prev = e.previousSibling().toElement();
+ TQDomElement prev = e.previousSibling().toElement();
if ( prev.isNull() ||
( prev.tagName() == tagSeparator && !prev.attribute( attrWeakSeparator ).isNull() ) ||
( prev.tagName() == tagText ) )
@@ -325,10 +325,10 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// elements we delete this element
else if ( tag == tagMergeLocal )
{
- QDomNode it = additive.firstChild();
+ TQDomNode it = additive.firstChild();
while ( !it.isNull() )
{
- QDomElement newChild = it.toElement();
+ TQDomElement newChild = it.toElement();
it = it.nextSibling();
if (newChild.isNull() )
continue;
@@ -339,8 +339,8 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
if ( newChild.attribute( attrAlreadyVisited ) == attrOne )
continue;
- QString itAppend( newChild.attribute( attrAppend ) );
- QString elemName( e.attribute( attrName ) );
+ TQString itAppend( newChild.attribute( attrAppend ) );
+ TQString elemName( e.attribute( attrName ) );
if ( ( itAppend.isNull() && elemName.isEmpty() ) ||
( itAppend == elemName ) )
@@ -348,7 +348,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// first, see if this new element matches a standard one in
// the global file. if it does, then we skip it as it will
// be merged in, later
- QDomElement matchingElement = findMatchingElement( newChild, base );
+ TQDomElement matchingElement = findMatchingElement( newChild, base );
if ( matchingElement.isNull() || newChild.tagName() == tagSeparator )
base.insertBefore( newChild, e );
}
@@ -368,7 +368,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
if ( tag == tagText )
continue;
- QDomElement matchingElement = findMatchingElement( e, additive );
+ TQDomElement matchingElement = findMatchingElement( e, additive );
if ( !matchingElement.isNull() )
{
@@ -381,12 +381,12 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
}
// Merge attributes
- const QDomNamedNodeMap attribs = matchingElement.attributes();
+ const TQDomNamedNodeMap attribs = matchingElement.attributes();
const uint attribcount = attribs.count();
for(uint i = 0; i < attribcount; ++i)
{
- const QDomNode node = attribs.item(i);
+ const TQDomNode node = attribs.item(i);
e.setAttribute(node.nodeName(), node.nodeValue());
}
@@ -399,7 +399,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// this container. However we have to call mergeXML recursively
// and make it check if there are actions implemented for this
// container. *If* none, then we can remove this container now
- if ( mergeXML( e, QDomElement(), actionCollection ) )
+ if ( mergeXML( e, TQDomElement(), actionCollection ) )
base.removeChild( e );
continue;
}
@@ -411,12 +411,12 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
n = additive.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
- QDomElement matchingElement = findMatchingElement( e, base );
+ TQDomElement matchingElement = findMatchingElement( e, base );
if ( matchingElement.isNull() )
{
@@ -426,7 +426,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// do one quick check to make sure that the last element was not
// a weak separator
- QDomElement last = base.lastChild().toElement();
+ TQDomElement last = base.lastChild().toElement();
if ( (last.tagName() == tagSeparator) && (!last.attribute( attrWeakSeparator ).isNull()) )
{
base.removeChild( last );
@@ -440,7 +440,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
n = base.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -463,7 +463,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// if we have a separator which has *not* the weak attribute
// set, then it must be owned by the "local" tree in which case
// we must not get deleted either
- QString weakAttr = e.attribute( attrWeakSeparator );
+ TQString weakAttr = e.attribute( attrWeakSeparator );
if ( weakAttr.isEmpty() || weakAttr.toInt() != 1 )
{
deleteMe = false;
@@ -499,16 +499,16 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
return deleteMe;
}
-QDomElement KXMLGUIClient::findMatchingElement( const QDomElement &base, const QDomElement &additive )
+TQDomElement KXMLGUIClient::findMatchingElement( const TQDomElement &base, const TQDomElement &additive )
{
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QDomNode n = additive.firstChild();
+ TQDomNode n = additive.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -528,21 +528,21 @@ QDomElement KXMLGUIClient::findMatchingElement( const QDomElement &base, const Q
}
// nope, return a (now) null element
- return QDomElement();
+ return TQDomElement();
}
void KXMLGUIClient::conserveMemory()
{
- d->m_doc = QDomDocument();
- d->m_buildDocument = QDomDocument();
+ d->m_doc = TQDomDocument();
+ d->m_buildDocument = TQDomDocument();
}
-void KXMLGUIClient::setXMLGUIBuildDocument( const QDomDocument &doc )
+void KXMLGUIClient::setXMLGUIBuildDocument( const TQDomDocument &doc )
{
d->m_buildDocument = doc;
}
-QDomDocument KXMLGUIClient::xmlguiBuildDocument() const
+TQDomDocument KXMLGUIClient::xmlguiBuildDocument() const
{
return d->m_buildDocument;
}
@@ -585,7 +585,7 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child )
return true;
}*/
-const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
+const TQPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
{
return &d->m_children;
}
@@ -602,7 +602,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
return d->m_builder;
}
-void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList )
+void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList<KAction> &actionList )
{
if ( !d->m_factory )
return;
@@ -610,7 +610,7 @@ void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction>
d->m_factory->plugActionList( this, name, actionList );
}
-void KXMLGUIClient::unplugActionList( const QString &name )
+void KXMLGUIClient::unplugActionList( const TQString &name )
{
if ( !d->m_factory )
return;
@@ -618,31 +618,31 @@ void KXMLGUIClient::unplugActionList( const QString &name )
d->m_factory->unplugActionList( this, name );
}
-QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString &doc )
+TQString KXMLGUIClient::findMostRecentXMLFile( const TQStringList &files, TQString &doc )
{
- QValueList<DocStruct> allDocuments;
+ TQValueList<DocStruct> allDocuments;
- QStringList::ConstIterator it = files.begin();
- QStringList::ConstIterator end = files.end();
+ TQStringList::ConstIterator it = files.begin();
+ TQStringList::ConstIterator end = files.end();
for (; it != end; ++it )
{
//kdDebug() << "KXMLGUIClient::findMostRecentXMLFile " << *it << endl;
- QString data = KXMLGUIFactory::readConfigFile( *it );
+ TQString data = KXMLGUIFactory::readConfigFile( *it );
DocStruct d;
d.file = *it;
d.data = data;
allDocuments.append( d );
}
- QValueList<DocStruct>::Iterator best = allDocuments.end();
+ TQValueList<DocStruct>::Iterator best = allDocuments.end();
uint bestVersion = 0;
- QValueList<DocStruct>::Iterator docIt = allDocuments.begin();
- QValueList<DocStruct>::Iterator docEnd = allDocuments.end();
+ TQValueList<DocStruct>::Iterator docIt = allDocuments.begin();
+ TQValueList<DocStruct>::Iterator docEnd = allDocuments.end();
for (; docIt != docEnd; ++docIt )
{
- QString versionStr = findVersionNumber( (*docIt).data );
+ TQString versionStr = findVersionNumber( (*docIt).data );
if ( versionStr.isEmpty() )
continue;
@@ -664,10 +664,10 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
{
if ( best != allDocuments.begin() )
{
- QValueList<DocStruct>::Iterator local = allDocuments.begin();
+ TQValueList<DocStruct>::Iterator local = allDocuments.begin();
// load the local document and extract the action properties
- QDomDocument document;
+ TQDomDocument document;
document.setContent( (*local).data );
ActionPropertiesMap properties = extractActionProperties( document );
@@ -688,19 +688,19 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
best = local;
// write out the new version of the local document
- QFile f( (*local).file );
+ TQFile f( (*local).file );
if ( f.open( IO_WriteOnly ) )
{
- QCString utf8data = (*local).data.utf8();
+ TQCString utf8data = (*local).data.utf8();
f.writeBlock( utf8data.data(), utf8data.length() );
f.close();
}
}
else
{
- QString f = (*local).file;
- QString backup = f + QString::fromLatin1( ".backup" );
- QDir dir;
+ TQString f = (*local).file;
+ TQString backup = f + TQString::fromLatin1( ".backup" );
+ TQDir dir;
dir.rename( f, backup );
}
}
@@ -714,12 +714,12 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
return (*allDocuments.begin()).file;
}
- return QString::null;
+ return TQString::null;
}
-QString KXMLGUIClient::findVersionNumber( const QString &xml )
+TQString KXMLGUIClient::findVersionNumber( const TQString &xml )
{
enum { ST_START, ST_AFTER_OPEN, ST_AFTER_GUI,
ST_EXPECT_VERSION, ST_VERSION_NUM} state = ST_START;
@@ -736,7 +736,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
//Jump to gui..
int guipos = xml.find("gui", pos, false /*case-insensitive*/);
if (guipos == -1)
- return QString::null; //Reject
+ return TQString::null; //Reject
pos = guipos + 2; //Position at i, so we're moved ahead to the next character by the ++;
state = ST_AFTER_GUI;
@@ -749,7 +749,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
{
int verpos = xml.find("version=\"", pos, false /*case-insensitive*/);
if (verpos == -1)
- return QString::null; //Reject
+ return TQString::null; //Reject
pos = verpos + 8; //v = 0, e = +1, r = +2, s = +3 , i = +4, o = +5, n = +6, = = +7, " = + 8
state = ST_VERSION_NUM;
@@ -772,7 +772,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
if (endpos != pos && endpos < xml.length() )
{
- QString matchCandidate = xml.mid(pos, endpos - pos); //Don't include " ".
+ TQString matchCandidate = xml.mid(pos, endpos - pos); //Don't include " ".
return matchCandidate;
}
@@ -782,22 +782,22 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
} //switch
} //for
- return QString::null;
+ return TQString::null;
}
-KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const QDomDocument &doc )
+KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const TQDomDocument &doc )
{
ActionPropertiesMap properties;
- QDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
+ TQDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
if ( actionPropElement.isNull() )
return properties;
- QDomNode n = actionPropElement.firstChild();
+ TQDomNode n = actionPropElement.firstChild();
while(!n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if ( e.isNull() )
continue;
@@ -805,26 +805,26 @@ KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const
if ( e.tagName().lower() != "action" )
continue;
- QString actionName = e.attribute( "name" );
+ TQString actionName = e.attribute( "name" );
if ( actionName.isEmpty() )
continue;
- QMap<QString, QMap<QString, QString> >::Iterator propIt = properties.find( actionName );
+ TQMap<TQString, TQMap<TQString, TQString> >::Iterator propIt = properties.find( actionName );
if ( propIt == properties.end() )
- propIt = properties.insert( actionName, QMap<QString, QString>() );
+ propIt = properties.insert( actionName, TQMap<TQString, TQString>() );
- const QDomNamedNodeMap attributes = e.attributes();
+ const TQDomNamedNodeMap attributes = e.attributes();
const uint attributeslength = attributes.length();
for ( uint i = 0; i < attributeslength; ++i )
{
- const QDomAttr attr = attributes.item( i ).toAttr();
+ const TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.isNull() )
continue;
- const QString name = attr.name();
+ const TQString name = attr.name();
if ( name == "name" || name.isEmpty() )
continue;
@@ -837,9 +837,9 @@ KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const
return properties;
}
-void KXMLGUIClient::storeActionProperties( QDomDocument &doc, const ActionPropertiesMap &properties )
+void KXMLGUIClient::storeActionProperties( TQDomDocument &doc, const ActionPropertiesMap &properties )
{
- QDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
+ TQDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
if ( actionPropElement.isNull() )
{
@@ -854,20 +854,20 @@ void KXMLGUIClient::storeActionProperties( QDomDocument &doc, const ActionProper
ActionPropertiesMap::ConstIterator end = properties.end();
for (; it != end; ++it )
{
- QDomElement action = doc.createElement( "Action" );
+ TQDomElement action = doc.createElement( "Action" );
action.setAttribute( "name", it.key() );
actionPropElement.appendChild( action );
- QMap<QString, QString> attributes = (*it);
- QMap<QString, QString>::ConstIterator attrIt = attributes.begin();
- QMap<QString, QString>::ConstIterator attrEnd = attributes.end();
+ TQMap<TQString, TQString> attributes = (*it);
+ TQMap<TQString, TQString>::ConstIterator attrIt = attributes.begin();
+ TQMap<TQString, TQString>::ConstIterator attrEnd = attributes.end();
for (; attrIt != attrEnd; ++attrIt )
action.setAttribute( attrIt.key(), attrIt.data() );
}
}
-void KXMLGUIClient::addStateActionEnabled(const QString& state,
- const QString& action)
+void KXMLGUIClient::addStateActionEnabled(const TQString& state,
+ const TQString& action)
{
StateChange stateChange = getActionsToChangeForState(state);
@@ -878,8 +878,8 @@ void KXMLGUIClient::addStateActionEnabled(const QString& state,
}
-void KXMLGUIClient::addStateActionDisabled(const QString& state,
- const QString& action)
+void KXMLGUIClient::addStateActionDisabled(const TQString& state,
+ const TQString& action)
{
StateChange stateChange = getActionsToChangeForState(state);
@@ -890,13 +890,13 @@ void KXMLGUIClient::addStateActionDisabled(const QString& state,
}
-KXMLGUIClient::StateChange KXMLGUIClient::getActionsToChangeForState(const QString& state)
+KXMLGUIClient::StateChange KXMLGUIClient::getActionsToChangeForState(const TQString& state)
{
return m_actionsStateMap[state];
}
-void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::ReverseStateChange reverse)
+void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::ReverseStateChange reverse)
{
StateChange stateChange = getActionsToChangeForState(newstate);
@@ -905,7 +905,7 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
// Enable actions which need to be enabled...
//
- for ( QStringList::Iterator it = stateChange.actionsToEnable.begin();
+ for ( TQStringList::Iterator it = stateChange.actionsToEnable.begin();
it != stateChange.actionsToEnable.end(); ++it ) {
KAction *action = actionCollection()->action((*it).latin1());
@@ -914,7 +914,7 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
// and disable actions which need to be disabled...
//
- for ( QStringList::Iterator it = stateChange.actionsToDisable.begin();
+ for ( TQStringList::Iterator it = stateChange.actionsToDisable.begin();
it != stateChange.actionsToDisable.end(); ++it ) {
KAction *action = actionCollection()->action((*it).latin1());
@@ -923,10 +923,10 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
}
-void KXMLGUIClient::beginXMLPlug( QWidget *w )
+void KXMLGUIClient::beginXMLPlug( TQWidget *w )
{
actionCollection()->beginXMLPlug( w );
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->beginXMLPlug( w );
}
@@ -934,15 +934,15 @@ void KXMLGUIClient::beginXMLPlug( QWidget *w )
void KXMLGUIClient::endXMLPlug()
{
actionCollection()->endXMLPlug();
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->endXMLPlug();
}
-void KXMLGUIClient::prepareXMLUnplug( QWidget * )
+void KXMLGUIClient::prepareXMLUnplug( TQWidget * )
{
actionCollection()->prepareXMLUnplug();
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->prepareXMLUnplug();
}
diff --git a/kdeui/kxmlguiclient.h b/kdeui/kxmlguiclient.h
index c3d377c91..4203a063c 100644
--- a/kdeui/kxmlguiclient.h
+++ b/kdeui/kxmlguiclient.h
@@ -19,10 +19,10 @@
#ifndef _KXMLGUICLIENT_H
#define _KXMLGUICLIENT_H
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -77,20 +77,20 @@ public:
KAction* action( const char* name ) const;
/**
- * Retrieves an action for a given QDomElement. The default
+ * Retrieves an action for a given TQDomElement. The default
* implementation uses the "name" attribute to query the action
* object via the other action() method.
*/
- virtual KAction *action( const QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
/**
* Retrieves the entire action collection for the GUI client. If
* you subclass KXMLGUIClient you should call
- * KActionCollection::setWidget( QWidget* ) with this object, or
+ * KActionCollection::setWidget( TQWidget* ) with this object, or
* you will encounter subtle bugs with KAction keyboard shortcuts.
* This is not necessary if your KXMLGUIClient is a KMainWindow.
*
- * @see KActionCollection::setWidget( QWidget* )
+ * @see KActionCollection::setWidget( TQWidget* )
*/
virtual KActionCollection* actionCollection() const;
@@ -100,11 +100,11 @@ public:
virtual KInstance *instance() const;
/**
- * @return The parsed XML in a QDomDocument, set by
+ * @return The parsed XML in a TQDomDocument, set by
* setXMLFile() or setXML().
* This document describes the layout of the GUI.
*/
- virtual QDomDocument domDocument() const;
+ virtual TQDomDocument domDocument() const;
/**
* This will return the name of the XML file as set by setXMLFile().
@@ -117,20 +117,20 @@ public:
* return the last XML file set. This, in almost all cases, will
* be the local XML file.
*
- * @return The name of the XML file or QString::null
+ * @return The name of the XML file or TQString::null
*/
- virtual QString xmlFile() const;
+ virtual TQString xmlFile() const;
- virtual QString localXMLFile() const;
+ virtual TQString localXMLFile() const;
/**
* @internal
*/
- void setXMLGUIBuildDocument( const QDomDocument &doc );
+ void setXMLGUIBuildDocument( const TQDomDocument &doc );
/**
* @internal
*/
- QDomDocument xmlguiBuildDocument() const;
+ TQDomDocument xmlguiBuildDocument() const;
/**
* This method is called by the KXMLGUIFactory as soon as the client
@@ -167,7 +167,7 @@ public:
/**
* Retrieves a list of all child clients.
*/
- const QPtrList<KXMLGUIClient> *childClients();
+ const TQPtrList<KXMLGUIClient> *childClients();
/**
* A client can have an own KXMLGUIBuilder.
@@ -218,7 +218,7 @@ public:
* This tag will get expanded to a list of actions. In the example
* above ( a file manager with a dynamic file menu ), you would call
* \code
- * QPtrList<KAction> file_actions;
+ * TQPtrList<KAction> file_actions;
* for( ... )
* if( ... )
* file_actions.append( cool_action );
@@ -234,34 +234,34 @@ public:
* plugActionList() would leave the previous actions in the
* menu too..
*/
- void plugActionList( const QString &name, const QPtrList<KAction> &actionList );
+ void plugActionList( const TQString &name, const TQPtrList<KAction> &actionList );
/**
* The complement of plugActionList() ...
*/
- void unplugActionList( const QString &name );
+ void unplugActionList( const TQString &name );
- static QString findMostRecentXMLFile( const QStringList &files, QString &doc );
+ static TQString findMostRecentXMLFile( const TQStringList &files, TQString &doc );
- void addStateActionEnabled(const QString& state, const QString& action);
+ void addStateActionEnabled(const TQString& state, const TQString& action);
- void addStateActionDisabled(const QString& state, const QString& action);
+ void addStateActionDisabled(const TQString& state, const TQString& action);
enum ReverseStateChange { StateNoReverse, StateReverse };
struct StateChange
{
- QStringList actionsToEnable;
- QStringList actionsToDisable;
+ TQStringList actionsToEnable;
+ TQStringList actionsToDisable;
};
- StateChange getActionsToChangeForState(const QString& state);
+ StateChange getActionsToChangeForState(const TQString& state);
/// @since 3.1
- void beginXMLPlug( QWidget * );
+ void beginXMLPlug( TQWidget * );
/// @since 3.1
void endXMLPlug();
/// @since 3.1
- void prepareXMLUnplug( QWidget * );
+ void prepareXMLUnplug( TQWidget * );
protected:
/**
@@ -291,9 +291,9 @@ protected:
* @param setXMLDoc Specify whether to call setXML. Default is true.
* and the DOM document at once.
**/
- virtual void setXMLFile( const QString& file, bool merge = false, bool setXMLDoc = true );
+ virtual void setXMLFile( const TQString& file, bool merge = false, bool setXMLDoc = true );
- virtual void setLocalXMLFile( const QString &file );
+ virtual void setLocalXMLFile( const TQString &file );
/**
* Sets the XML for the part.
@@ -301,7 +301,7 @@ protected:
* Call this in the Part-inherited class constructor if you
* don't call setXMLFile().
**/
- virtual void setXML( const QString &document, bool merge = false );
+ virtual void setXML( const TQString &document, bool merge = false );
/**
* Sets the Document for the part, describing the layout of the GUI.
@@ -309,7 +309,7 @@ protected:
* Call this in the Part-inherited class constructor if you don't call
* setXMLFile or setXML .
*/
- virtual void setDOMDocument( const QDomDocument &document, bool merge = false );
+ virtual void setDOMDocument( const TQDomDocument &document, bool merge = false );
/**
* This function will attempt to give up some memory after the GUI
@@ -329,34 +329,34 @@ protected:
* (actions to be enabled will be disabled and action to be disabled will be enabled)
* Default is reverse=false.
*/
- virtual void stateChanged(const QString &newstate, ReverseStateChange reverse = StateNoReverse);
+ virtual void stateChanged(const TQString &newstate, ReverseStateChange reverse = StateNoReverse);
// Use this one for KDE 4.0
- //virtual void stateChanged(const QString &newstate, bool reverse = false);
+ //virtual void stateChanged(const TQString &newstate, bool reverse = false);
private:
struct DocStruct
{
- QString file;
- QString data;
+ TQString file;
+ TQString data;
};
- bool mergeXML( QDomElement &base, const QDomElement &additive,
+ bool mergeXML( TQDomElement &base, const TQDomElement &additive,
KActionCollection *actionCollection );
- QDomElement findMatchingElement( const QDomElement &base,
- const QDomElement &additive );
+ TQDomElement findMatchingElement( const TQDomElement &base,
+ const TQDomElement &additive );
- typedef QMap<QString, QMap<QString, QString> > ActionPropertiesMap;
+ typedef TQMap<TQString, TQMap<TQString, TQString> > ActionPropertiesMap;
- static ActionPropertiesMap extractActionProperties( const QDomDocument &doc );
+ static ActionPropertiesMap extractActionProperties( const TQDomDocument &doc );
- static void storeActionProperties( QDomDocument &doc, const ActionPropertiesMap &properties );
+ static void storeActionProperties( TQDomDocument &doc, const ActionPropertiesMap &properties );
- static QString findVersionNumber( const QString &_xml );
+ static TQString findVersionNumber( const TQString &_xml );
// Actions to enable/disable on a state change
- QMap<QString,StateChange> m_actionsStateMap;
+ TQMap<TQString,StateChange> m_actionsStateMap;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kxmlguifactory.cpp b/kdeui/kxmlguifactory.cpp
index 1dbab4ddf..c166df861 100644
--- a/kdeui/kxmlguifactory.cpp
+++ b/kdeui/kxmlguifactory.cpp
@@ -25,12 +25,12 @@
#include <assert.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwidget.h>
-#include <qdatetime.h>
-#include <qvariant.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
+#include <tqvariant.h>
#include <kaction.h>
#include <kdebug.h>
@@ -43,7 +43,7 @@
using namespace KXMLGUI;
/*
- * TODO: - make more use of QValueList instead of QPtrList
+ * TODO: - make more use of TQValueList instead of QPtrList
*/
class KXMLGUIFactoryPrivate : public BuildState
@@ -51,11 +51,11 @@ class KXMLGUIFactoryPrivate : public BuildState
public:
KXMLGUIFactoryPrivate()
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
- static const QString &actionList = KGlobal::staticQString( "actionlist" );
- static const QString &name = KGlobal::staticQString( "name" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &actionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &name = KGlobal::staticQString( "name" );
- m_rootNode = new ContainerNode( 0L, QString::null, 0L );
+ m_rootNode = new ContainerNode( 0L, TQString::null, 0L );
m_defaultMergingName = defaultMergingName;
tagActionList = actionList;
attrName = name;
@@ -77,79 +77,79 @@ public:
ContainerNode *m_rootNode;
- QString m_defaultMergingName;
+ TQString m_defaultMergingName;
/*
* Contains the container which is searched for in ::container .
*/
- QString m_containerName;
+ TQString m_containerName;
/*
* List of all clients
*/
- QPtrList<KXMLGUIClient> m_clients;
+ TQPtrList<KXMLGUIClient> m_clients;
- QString tagActionList;
+ TQString tagActionList;
- QString attrName;
+ TQString attrName;
BuildStateStack m_stateStack;
};
-QString KXMLGUIFactory::readConfigFile( const QString &filename, const KInstance *instance )
+TQString KXMLGUIFactory::readConfigFile( const TQString &filename, const KInstance *instance )
{
return readConfigFile( filename, false, instance );
}
-QString KXMLGUIFactory::readConfigFile( const QString &filename, bool never_null, const KInstance *_instance )
+TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_null, const KInstance *_instance )
{
const KInstance *instance = _instance ? _instance : KGlobal::instance();
- QString xml_file;
+ TQString xml_file;
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
xml_file = filename;
else
{
- xml_file = locate("data", QString::fromLatin1(instance->instanceName() + '/' ) + filename);
- if ( !QFile::exists( xml_file ) )
+ xml_file = locate("data", TQString::fromLatin1(instance->instanceName() + '/' ) + filename);
+ if ( !TQFile::exists( xml_file ) )
xml_file = locate( "data", filename );
}
- QFile file( xml_file );
+ TQFile file( xml_file );
if ( !file.open( IO_ReadOnly ) )
{
kdError(240) << "No such XML file " << filename << endl;
if ( never_null )
- return QString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" );
+ return TQString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" );
else
- return QString::null;
+ return TQString::null;
}
#if QT_VERSION <= 0x030302
- // Work around bug in QString::fromUtf8 (which calls strlen).
- QByteArray buffer(file.size() + 1);
+ // Work around bug in TQString::fromUtf8 (which calls strlen).
+ TQByteArray buffer(file.size() + 1);
buffer = file.readAll();
if(!buffer.isEmpty())
buffer[ buffer.size() - 1 ] = '\0';
else
- return QString::null;
+ return TQString::null;
#else
- QByteArray buffer(file.readAll());
+ TQByteArray buffer(file.readAll());
#endif
- return QString::fromUtf8(buffer.data(), buffer.size());
+ return TQString::fromUtf8(buffer.data(), buffer.size());
}
-bool KXMLGUIFactory::saveConfigFile( const QDomDocument& doc,
- const QString& filename, const KInstance *_instance )
+bool KXMLGUIFactory::saveConfigFile( const TQDomDocument& doc,
+ const TQString& filename, const KInstance *_instance )
{
const KInstance *instance = _instance ? _instance : KGlobal::instance();
- QString xml_file(filename);
+ TQString xml_file(filename);
- if (QDir::isRelativePath(xml_file))
- xml_file = locateLocal("data", QString::fromLatin1( instance->instanceName() + '/' )
+ if (TQDir::isRelativePath(xml_file))
+ xml_file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' )
+ filename);
- QFile file( xml_file );
+ TQFile file( xml_file );
if ( !file.open( IO_WriteOnly ) )
{
kdError(240) << "Could not write to " << filename << endl;
@@ -157,54 +157,54 @@ bool KXMLGUIFactory::saveConfigFile( const QDomDocument& doc,
}
// write out our document
- QTextStream ts(&file);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts(&file);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc;
file.close();
return true;
}
-QString KXMLGUIFactory::documentToXML( const QDomDocument& doc )
+TQString KXMLGUIFactory::documentToXML( const TQDomDocument& doc )
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc;
return str;
}
-QString KXMLGUIFactory::elementToXML( const QDomElement& elem )
+TQString KXMLGUIFactory::elementToXML( const TQDomElement& elem )
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << elem;
return str;
}
-void KXMLGUIFactory::removeDOMComments( QDomNode &node )
+void KXMLGUIFactory::removeDOMComments( TQDomNode &node )
{
- QDomNode n = node.firstChild();
+ TQDomNode n = node.firstChild();
while ( !n.isNull() )
{
- if ( n.nodeType() == QDomNode::CommentNode )
+ if ( n.nodeType() == TQDomNode::CommentNode )
{
- QDomNode tmp = n;
+ TQDomNode tmp = n;
n = n.nextSibling();
node.removeChild( tmp );
}
else
{
- QDomNode tmp = n;
+ TQDomNode tmp = n;
n = n.nextSibling();
removeDOMComments( tmp );
}
}
}
-KXMLGUIFactory::KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent, const char *name )
- : QObject( parent, name )
+KXMLGUIFactory::KXMLGUIFactory( KXMLGUIBuilder *builder, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
d = new KXMLGUIFactoryPrivate;
d->builder = builder;
@@ -224,7 +224,7 @@ KXMLGUIFactory::~KXMLGUIFactory()
void KXMLGUIFactory::addClient( KXMLGUIClient *client )
{
kdDebug(1002) << "KXMLGUIFactory::addClient( " << client << " )" << endl; // ellis
- static const QString &actionPropElementName = KGlobal::staticQString( "ActionProperties" );
+ static const TQString &actionPropElementName = KGlobal::staticQString( "ActionProperties" );
if ( client->factory() ) {
if ( client->factory() == this )
@@ -235,7 +235,7 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
d->pushState();
-// QTime dt; dt.start();
+// TQTime dt; dt.start();
d->guiClient = client;
@@ -253,11 +253,11 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// try to use the build document for building the client's GUI, as the build document
// contains the correct container state information (like toolbar positions, sizes, etc.) .
// if there is non available, then use the "real" document.
- QDomDocument doc = client->xmlguiBuildDocument();
+ TQDomDocument doc = client->xmlguiBuildDocument();
if ( doc.documentElement().isNull() )
doc = client->domDocument();
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
d->m_rootNode->index = -1;
@@ -279,7 +279,7 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// process a possibly existing actionproperties section
- QDomElement actionPropElement = docElement.namedItem( actionPropElementName ).toElement();
+ TQDomElement actionPropElement = docElement.namedItem( actionPropElementName ).toElement();
if ( actionPropElement.isNull() )
actionPropElement = docElement.namedItem( actionPropElementName.lower() ).toElement();
@@ -309,8 +309,8 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// build child clients
if ( client->childClients()->count() > 0 )
{
- const QPtrList<KXMLGUIClient> *children = client->childClients();
- QPtrListIterator<KXMLGUIClient> childIt( *children );
+ const TQPtrList<KXMLGUIClient> *children = client->childClients();
+ TQPtrListIterator<KXMLGUIClient> childIt( *children );
for (; childIt.current(); ++childIt )
addClient( childIt.current() );
}
@@ -332,8 +332,8 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
// remove child clients first
if ( client->childClients()->count() > 0 )
{
- const QPtrList<KXMLGUIClient> *children = client->childClients();
- QPtrListIterator<KXMLGUIClient> childIt( *children );
+ const TQPtrList<KXMLGUIClient> *children = client->childClients();
+ TQPtrListIterator<KXMLGUIClient> childIt( *children );
childIt.toLast();
for (; childIt.current(); --childIt )
removeClient( childIt.current() );
@@ -354,7 +354,7 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
// if we don't have a build document for that client, yet, then create one by
// cloning the original document, so that saving container information in the
// DOM tree does not touch the original document.
- QDomDocument doc = client->xmlguiBuildDocument();
+ TQDomDocument doc = client->xmlguiBuildDocument();
if ( doc.documentElement().isNull() )
{
doc = client->domDocument().cloneNode( true ).toDocument();
@@ -376,29 +376,29 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
emit clientRemoved( client );
}
-QPtrList<KXMLGUIClient> KXMLGUIFactory::clients() const
+TQPtrList<KXMLGUIClient> KXMLGUIFactory::clients() const
{
return d->m_clients;
}
-QWidget *KXMLGUIFactory::container( const QString &containerName, KXMLGUIClient *client,
+TQWidget *KXMLGUIFactory::container( const TQString &containerName, KXMLGUIClient *client,
bool useTagName )
{
d->pushState();
d->m_containerName = containerName;
d->guiClient = client;
- QWidget *result = findRecursive( d->m_rootNode, useTagName );
+ TQWidget *result = findRecursive( d->m_rootNode, useTagName );
d->guiClient = 0L;
- d->m_containerName = QString::null;
+ d->m_containerName = TQString::null;
d->popState();
return result;
}
-QPtrList<QWidget> KXMLGUIFactory::containers( const QString &tagName )
+TQPtrList<TQWidget> KXMLGUIFactory::containers( const TQString &tagName )
{
return findRecursive( d->m_rootNode, tagName );
}
@@ -410,7 +410,7 @@ void KXMLGUIFactory::reset()
d->m_rootNode->clearChildren();
}
-void KXMLGUIFactory::resetContainer( const QString &containerName, bool useTagName )
+void KXMLGUIFactory::resetContainer( const TQString &containerName, bool useTagName )
{
if ( containerName.isEmpty() )
return;
@@ -429,17 +429,17 @@ void KXMLGUIFactory::resetContainer( const QString &containerName, bool useTagNa
parent->removeChild( container );
}
-QWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
+TQWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
{
if ( ( ( !tag && node->name == d->m_containerName ) ||
( tag && node->tagName == d->m_containerName ) ) &&
( !d->guiClient || node->client == d->guiClient ) )
return node->container;
- QPtrListIterator<ContainerNode> it( node->children );
+ TQPtrListIterator<ContainerNode> it( node->children );
for (; it.current(); ++it )
{
- QWidget *cont = findRecursive( it.current(), tag );
+ TQWidget *cont = findRecursive( it.current(), tag );
if ( cont )
return cont;
}
@@ -447,19 +447,19 @@ QWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
return 0L;
}
-QPtrList<QWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
- const QString &tagName )
+TQPtrList<TQWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
+ const TQString &tagName )
{
- QPtrList<QWidget> res;
+ TQPtrList<TQWidget> res;
if ( node->tagName == tagName.lower() )
res.append( node->container );
- QPtrListIterator<KXMLGUI::ContainerNode> it( node->children );
+ TQPtrListIterator<KXMLGUI::ContainerNode> it( node->children );
for (; it.current(); ++it )
{
- QPtrList<QWidget> lst = findRecursive( it.current(), tagName );
- QPtrListIterator<QWidget> wit( lst );
+ TQPtrList<TQWidget> lst = findRecursive( it.current(), tagName );
+ TQPtrListIterator<TQWidget> wit( lst );
for (; wit.current(); ++wit )
res.append( wit.current() );
}
@@ -467,8 +467,8 @@ QPtrList<QWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
return res;
}
-void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const QString &name,
- const QPtrList<KAction> &actionList )
+void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name,
+ const TQPtrList<KAction> &actionList )
{
d->pushState();
d->guiClient = client;
@@ -482,7 +482,7 @@ void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const QString &name,
d->popState();
}
-void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const QString &name )
+void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const TQString &name )
{
d->pushState();
d->guiClient = client;
@@ -495,14 +495,14 @@ void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const QString &nam
d->popState();
}
-void KXMLGUIFactory::applyActionProperties( const QDomElement &actionPropElement )
+void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElement )
{
- static const QString &tagAction = KGlobal::staticQString( "action" );
+ static const TQString &tagAction = KGlobal::staticQString( "action" );
- for (QDomNode n = actionPropElement.firstChild();
+ for (TQDomNode n = actionPropElement.firstChild();
!n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() != tagAction )
continue;
@@ -514,11 +514,11 @@ void KXMLGUIFactory::applyActionProperties( const QDomElement &actionPropElement
}
}
-void KXMLGUIFactory::configureAction( KAction *action, const QDomNamedNodeMap &attributes )
+void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap &attributes )
{
for ( uint i = 0; i < attributes.length(); i++ )
{
- QDomAttr attr = attributes.item( i ).toAttr();
+ TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.isNull() )
continue;
@@ -526,25 +526,25 @@ void KXMLGUIFactory::configureAction( KAction *action, const QDomNamedNodeMap &a
}
}
-void KXMLGUIFactory::configureAction( KAction *action, const QDomAttr &attribute )
+void KXMLGUIFactory::configureAction( KAction *action, const TQDomAttr &attribute )
{
- static const QString &attrShortcut = KGlobal::staticQString( "shortcut" );
+ static const TQString &attrShortcut = KGlobal::staticQString( "shortcut" );
- QString attrName = attribute.name();
+ TQString attrName = attribute.name();
// If the attribute is a deprecated "accel", change to "shortcut".
if ( attrName.lower() == "accel" )
attrName = attrShortcut;
- QVariant propertyValue;
+ TQVariant propertyValue;
- QVariant::Type propertyType = action->property( attrName.latin1() ).type();
+ TQVariant::Type propertyType = action->property( attrName.latin1() ).type();
- if ( propertyType == QVariant::Int )
- propertyValue = QVariant( attribute.value().toInt() );
- else if ( propertyType == QVariant::UInt )
- propertyValue = QVariant( attribute.value().toUInt() );
+ if ( propertyType == TQVariant::Int )
+ propertyValue = TQVariant( attribute.value().toInt() );
+ else if ( propertyType == TQVariant::UInt )
+ propertyValue = TQVariant( attribute.value().toUInt() );
else
- propertyValue = QVariant( attribute.value() );
+ propertyValue = TQVariant( attribute.value() );
action->setProperty( attrName.latin1(), propertyValue );
}
@@ -552,8 +552,8 @@ void KXMLGUIFactory::configureAction( KAction *action, const QDomAttr &attribute
int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings )
{
- KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<QWidget*>(parent()) );
- QPtrListIterator<KXMLGUIClient> it( d->m_clients );
+ KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<TQWidget*>(parent()) );
+ TQPtrListIterator<KXMLGUIClient> it( d->m_clients );
KXMLGUIClient *client;
while( (client=it.current()) !=0 )
{
@@ -564,14 +564,14 @@ int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSe
return dlg.configure(bSaveSettings);
}
-QDomElement KXMLGUIFactory::actionPropertiesElement( QDomDocument& doc )
+TQDomElement KXMLGUIFactory::actionPropertiesElement( TQDomDocument& doc )
{
- const QString tagActionProp = QString::fromLatin1("ActionProperties");
+ const TQString tagActionProp = TQString::fromLatin1("ActionProperties");
// first, lets see if we have existing properties
- QDomElement elem;
- QDomNode it = doc.documentElement().firstChild();
+ TQDomElement elem;
+ TQDomNode it = doc.documentElement().firstChild();
for( ; !it.isNull(); it = it.nextSibling() ) {
- QDomElement e = it.toElement();
+ TQDomElement e = it.toElement();
if( e.tagName() == tagActionProp ) {
elem = e;
break;
@@ -586,23 +586,23 @@ QDomElement KXMLGUIFactory::actionPropertiesElement( QDomDocument& doc )
return elem;
}
-QDomElement KXMLGUIFactory::findActionByName( QDomElement& elem, const QString& sName, bool create )
+TQDomElement KXMLGUIFactory::findActionByName( TQDomElement& elem, const TQString& sName, bool create )
{
- static const QString& attrName = KGlobal::staticQString( "name" );
- static const QString& tagAction = KGlobal::staticQString( "Action" );
- for( QDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling() ) {
- QDomElement e = it.toElement();
+ static const TQString& attrName = KGlobal::staticQString( "name" );
+ static const TQString& tagAction = KGlobal::staticQString( "Action" );
+ for( TQDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling() ) {
+ TQDomElement e = it.toElement();
if( e.attribute( attrName ) == sName )
return e;
}
if( create ) {
- QDomElement act_elem = elem.ownerDocument().createElement( tagAction );
+ TQDomElement act_elem = elem.ownerDocument().createElement( tagAction );
act_elem.setAttribute( attrName, sName );
elem.appendChild( act_elem );
return act_elem;
}
- return QDomElement();
+ return TQDomElement();
}
void KXMLGUIFactory::virtual_hook( int, void* )
diff --git a/kdeui/kxmlguifactory.h b/kdeui/kxmlguifactory.h
index cb4a86ef3..fa534e093 100644
--- a/kdeui/kxmlguifactory.h
+++ b/kdeui/kxmlguifactory.h
@@ -21,10 +21,10 @@
#ifndef __kxmlguifactory_h__
#define __kxmlguifactory_h__
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -51,7 +51,7 @@ class BuildHelper;
* actions. KXMLGUIFactory takes care of building (with the help of a KXMLGUIBuilder)
* and merging the GUI from an unlimited number of clients.
*
- * Each client provides XML through a QDomDocument and actions through a
+ * Each client provides XML through a TQDomDocument and actions through a
* KActionCollection . The XML document contains the rules for how to merge the
* GUI.
*
@@ -71,7 +71,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* Note that the ownership of the given KXMLGUIBuilder object won't be transferred to this
* KXMLGUIFactory, so you have to take care of deleting it properly.
*/
- KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent = 0, const char *name = 0 );
+ KXMLGUIFactory( KXMLGUIBuilder *builder, TQObject *parent = 0, const char *name = 0 );
/**
* Destructor
@@ -79,34 +79,34 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
~KXMLGUIFactory();
// XXX move to somewhere else? (Simon)
- static QString readConfigFile( const QString &filename, bool never_null, const KInstance *instance = 0 );
- static QString readConfigFile( const QString &filename, const KInstance *instance = 0 );
- static bool saveConfigFile( const QDomDocument& doc, const QString& filename,
+ static TQString readConfigFile( const TQString &filename, bool never_null, const KInstance *instance = 0 );
+ static TQString readConfigFile( const TQString &filename, const KInstance *instance = 0 );
+ static bool saveConfigFile( const TQDomDocument& doc, const TQString& filename,
const KInstance *instance = 0 );
- static QString documentToXML( const QDomDocument& doc );
- static QString elementToXML( const QDomElement& elem );
+ static TQString documentToXML( const TQDomDocument& doc );
+ static TQString elementToXML( const TQDomElement& elem );
/**
- * Removes all QDomComment objects from the specified node and all its children.
+ * Removes all TQDomComment objects from the specified node and all its children.
*/
- static void removeDOMComments( QDomNode &node );
+ static void removeDOMComments( TQDomNode &node );
/**
* @internal
* Find or create the ActionProperties element, used when saving custom action properties
*/
- static QDomElement actionPropertiesElement( QDomDocument& doc );
+ static TQDomElement actionPropertiesElement( TQDomDocument& doc );
/**
* @internal
* Find or create the element for a given action, by name.
* Used when saving custom action properties
*/
- static QDomElement findActionByName( QDomElement& elem, const QString& sName, bool create );
+ static TQDomElement findActionByName( TQDomElement& elem, const TQString& sName, bool create );
/**
- * Creates the GUI described by the QDomDocument of the client,
+ * Creates the GUI described by the TQDomDocument of the client,
* using the client's actions, and merges it with the previously
* created GUI.
* This also means that the order in which clients are added to the factory
@@ -124,13 +124,13 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
*/
void removeClient( KXMLGUIClient *client );
- void plugActionList( KXMLGUIClient *client, const QString &name, const QPtrList<KAction> &actionList );
- void unplugActionList( KXMLGUIClient *client, const QString &name );
+ void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<KAction> &actionList );
+ void unplugActionList( KXMLGUIClient *client, const TQString &name );
/**
* Returns a list of all clients currently added to this factory
*/
- QPtrList<KXMLGUIClient> clients() const;
+ TQPtrList<KXMLGUIClient> clients() const;
/**
* Use this method to get access to a container widget with the name specified with @p containerName
@@ -140,7 +140,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* This function is particularly useful for getting hold of a popupmenu defined in an XMLUI file.
* For instance:
* \code
- * QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("my_popup",this));
+ * TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("my_popup",this));
* \endcode
* where @p "my_popup" is the name of the menu in the XMLUI file, and
* @p "this" is XMLGUIClient which owns the popupmenu (e.g. the mainwindow, or the part, or the plugin...)
@@ -152,9 +152,9 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
*
* This method may return 0L if no container with the given name exists or is not owned by the client.
*/
- QWidget *container( const QString &containerName, KXMLGUIClient *client, bool useTagName = false );
+ TQWidget *container( const TQString &containerName, KXMLGUIClient *client, bool useTagName = false );
- QPtrList<QWidget> containers( const QString &tagName );
+ TQPtrList<TQWidget> containers( const TQString &tagName );
/**
* Use this method to free all memory allocated by the KXMLGUIFactory. This deletes the internal node
@@ -175,7 +175,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* (also note that this will call KXMLGUIClient::setFactory( 0L ) for all clients of the
* container)
*/
- void resetContainer( const QString &containerName, bool useTagName = false );
+ void resetContainer( const TQString &containerName, bool useTagName = false );
public slots:
/**
@@ -184,7 +184,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* This slot can be connected dirrectly to the action to configure shortcuts. This is very simple to
* do that by adding a single line
* \code
- * KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection() );
+ * KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() );
* \endcode
*
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
@@ -201,13 +201,13 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
private:
- QWidget *findRecursive( KXMLGUI::ContainerNode *node, bool tag );
+ TQWidget *findRecursive( KXMLGUI::ContainerNode *node, bool tag );
- QPtrList<QWidget> findRecursive( KXMLGUI::ContainerNode *node, const QString &tagName );
+ TQPtrList<TQWidget> findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName );
- void applyActionProperties( const QDomElement &element );
- void configureAction( KAction *action, const QDomNamedNodeMap &attributes );
- void configureAction( KAction *action, const QDomAttr &attribute );
+ void applyActionProperties( const TQDomElement &element );
+ void configureAction( KAction *action, const TQDomNamedNodeMap &attributes );
+ void configureAction( KAction *action, const TQDomAttr &attribute );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kxmlguifactory_p.cpp b/kdeui/kxmlguifactory_p.cpp
index 329b11881..4bd5ad68e 100644
--- a/kdeui/kxmlguifactory_p.cpp
+++ b/kdeui/kxmlguifactory_p.cpp
@@ -21,7 +21,7 @@
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -30,26 +30,26 @@
using namespace KXMLGUI;
-void ActionList::plug( QWidget *container, int index ) const
+void ActionList::plug( TQWidget *container, int index ) const
{
ActionListIt it( *this );
for (; it.current(); ++it )
it.current()->plug( container, index++ );
}
-void ActionList::unplug( QWidget *container ) const
+void ActionList::unplug( TQWidget *container ) const
{
ActionListIt it( *this );
for (; it.current(); ++it )
it.current()->unplug( container );
}
-ContainerNode::ContainerNode( QWidget *_container, const QString &_tagName,
- const QString &_name, ContainerNode *_parent,
+ContainerNode::ContainerNode( TQWidget *_container, const TQString &_tagName,
+ const TQString &_name, ContainerNode *_parent,
KXMLGUIClient *_client, KXMLGUIBuilder *_builder,
- int id, const QString &_mergingName,
- const QString &_groupName, const QStringList &customTags,
- const QStringList &containerTags )
+ int id, const TQString &_mergingName,
+ const TQString &_groupName, const TQStringList &customTags,
+ const TQStringList &containerTags )
: parent( _parent ), client( _client ), builder( _builder ),
builderCustomTags( customTags ), builderContainerTags( containerTags ),
container( _container ), containerId( id ), tagName( _tagName ), name( _name ),
@@ -73,7 +73,7 @@ void ContainerNode::removeChild( ContainerNode *child )
* Find a merging index with the given name. Used to find an index defined by <Merge name="blah"/>
* or by a <DefineGroup name="foo" /> tag.
*/
-MergingIndexList::Iterator ContainerNode::findIndex( const QString &name )
+MergingIndexList::Iterator ContainerNode::findIndex( const TQString &name )
{
MergingIndexList::Iterator it( mergingIndices.begin() );
MergingIndexList::Iterator end( mergingIndices.end() );
@@ -87,7 +87,7 @@ MergingIndexList::Iterator ContainerNode::findIndex( const QString &name )
* Check if the given container widget is a child of this node and return the node structure
* if fonud.
*/
-ContainerNode *ContainerNode::findContainerNode( QWidget *container )
+ContainerNode *ContainerNode::findContainerNode( TQWidget *container )
{
ContainerNodeListIt it( children );
@@ -103,7 +103,7 @@ ContainerNode *ContainerNode::findContainerNode( QWidget *container )
* container's tag name or the value of the container's name attribute. Specified by
* the tag bool .
*/
-ContainerNode *ContainerNode::findContainer( const QString &_name, bool tag )
+ContainerNode *ContainerNode::findContainer( const TQString &_name, bool tag )
{
if ( ( tag && tagName == _name ) ||
( !tag && name == _name ) )
@@ -125,8 +125,8 @@ ContainerNode *ContainerNode::findContainer( const QString &_name, bool tag )
* leaves out container widgets specified in the exludeList . Also ensures that the containers
* belongs to currClient.
*/
-ContainerNode *ContainerNode::findContainer( const QString &name, const QString &tagName,
- const QPtrList<QWidget> *excludeList,
+ContainerNode *ContainerNode::findContainer( const TQString &name, const TQString &tagName,
+ const TQPtrList<TQWidget> *excludeList,
KXMLGUIClient * /*currClient*/ )
{
ContainerNode *res = 0L;
@@ -176,7 +176,7 @@ ContainerNode *ContainerNode::findContainer( const QString &name, const QString
}
ContainerClient *ContainerNode::findChildContainerClient( KXMLGUIClient *currentGUIClient,
- const QString &groupName,
+ const TQString &groupName,
const MergingIndexList::Iterator &mergingIdx )
{
if ( !clients.isEmpty() )
@@ -213,18 +213,18 @@ void ContainerNode::plugActionList( BuildState &state )
for (; mIt != mEnd; ++mIt )
plugActionList( state, mIt );
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->plugActionList( state );
}
void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
MergingIndex mergingIdx = *mergingIdxIt;
- QString k( mergingIdx.mergingName );
+ TQString k( mergingIdx.mergingName );
if ( k.find( tagActionList ) == -1 )
return;
@@ -238,7 +238,7 @@ void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::I
return;
ContainerClient *client = findChildContainerClient( state.guiClient,
- QString::null,
+ TQString::null,
mergingIndices.end() );
client->actionLists.insert( k, state.actionList );
@@ -255,18 +255,18 @@ void ContainerNode::unplugActionList( BuildState &state )
for (; mIt != mEnd; ++mIt )
unplugActionList( state, mIt );
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->unplugActionList( state );
}
void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
MergingIndex mergingIdx = *mergingIdxIt;
- QString k = mergingIdx.mergingName;
+ TQString k = mergingIdx.mergingName;
if ( k.find( tagActionList ) == -1 )
return;
@@ -280,7 +280,7 @@ void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList:
return;
ContainerClient *client = findChildContainerClient( state.guiClient,
- QString::null,
+ TQString::null,
mergingIndices.end() );
ActionListMap::Iterator lIt( client->actionLists.find( k ) );
@@ -306,7 +306,7 @@ void ContainerNode::adjustMergingIndices( int offset,
index += offset;
}
-bool ContainerNode::destruct( QDomElement element, BuildState &state )
+bool ContainerNode::destruct( TQDomElement element, BuildState &state )
{
destructChildren( element, state );
@@ -324,7 +324,7 @@ bool ContainerNode::destruct( QDomElement element, BuildState &state )
if ( clients.count() == 0 && children.count() == 0 && container &&
client == state.guiClient )
{
- QWidget *parentContainer = 0L;
+ TQWidget *parentContainer = 0L;
if ( parent && parent->container )
parentContainer = parent->container;
@@ -345,14 +345,14 @@ bool ContainerNode::destruct( QDomElement element, BuildState &state )
}
-void ContainerNode::destructChildren( const QDomElement &element, BuildState &state )
+void ContainerNode::destructChildren( const TQDomElement &element, BuildState &state )
{
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
while ( childIt.current() )
{
ContainerNode *childNode = childIt.current();
- QDomElement childElement = findElementForChild( element, childNode );
+ TQDomElement childElement = findElementForChild( element, childNode );
// destruct returns true in case the container really got deleted
if ( childNode->destruct( childElement, state ) )
@@ -362,22 +362,22 @@ void ContainerNode::destructChildren( const QDomElement &element, BuildState &st
}
}
-QDomElement ContainerNode::findElementForChild( const QDomElement &baseElement,
+TQDomElement ContainerNode::findElementForChild( const TQDomElement &baseElement,
ContainerNode *childNode )
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
// ### slow
- for ( QDomNode n = baseElement.firstChild(); !n.isNull();
+ for ( TQDomNode n = baseElement.firstChild(); !n.isNull();
n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() == childNode->tagName &&
e.attribute( attrName ) == childNode->name )
return e;
}
- return QDomElement();
+ return TQDomElement();
}
void ContainerNode::unplugActions( BuildState &state )
@@ -412,14 +412,14 @@ void ContainerNode::unplugActions( BuildState &state )
void ContainerNode::unplugClient( ContainerClient *client )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
assert( builder );
// now quickly remove all custom elements (i.e. separators) and unplug all actions
- QValueList<int>::ConstIterator custIt = client->customElements.begin();
- QValueList<int>::ConstIterator custEnd = client->customElements.end();
+ TQValueList<int>::ConstIterator custIt = client->customElements.begin();
+ TQValueList<int>::ConstIterator custEnd = client->customElements.end();
for (; custIt != custEnd; ++custIt )
builder->removeCustomElement( container, *custIt );
@@ -443,7 +443,7 @@ void ContainerNode::unplugClient( ContainerClient *client )
// construct the merging index key (i.e. like named merging) , find the
// corresponding merging index and adjust all indices
- QString mergingKey = alIt.key();
+ TQString mergingKey = alIt.key();
mergingKey.prepend( tagActionList );
MergingIndexList::Iterator mIt = findIndex( mergingKey );
@@ -460,7 +460,7 @@ void ContainerNode::unplugClient( ContainerClient *client )
void ContainerNode::reset()
{
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->reset();
@@ -468,7 +468,7 @@ void ContainerNode::reset()
client->setFactory( 0L );
}
-int ContainerNode::calcMergingIndex( const QString &mergingName,
+int ContainerNode::calcMergingIndex( const TQString &mergingName,
MergingIndexList::Iterator &it,
BuildState &state,
bool ignoreDefaultMergingIndex )
@@ -495,9 +495,9 @@ int ContainerNode::calcMergingIndex( const QString &mergingName,
return (*it).value;
}
-int BuildHelper::calcMergingIndex( const QDomElement &element, MergingIndexList::Iterator &it, QString &group )
+int BuildHelper::calcMergingIndex( const TQDomElement &element, MergingIndexList::Iterator &it, TQString &group )
{
- static const QString &attrGroup = KGlobal::staticQString( "group" );
+ static const TQString &attrGroup = KGlobal::staticQString( "group" );
bool haveGroup = false;
group = element.attribute( attrGroup );
@@ -521,7 +521,7 @@ BuildHelper::BuildHelper( BuildState &state, ContainerNode *node )
: containerClient( 0 ), ignoreDefaultMergingIndex( false ), m_state( state ),
parentNode( node )
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
// create a list of supported container and custom tags
customTags = m_state.builderCustomTags;
@@ -539,32 +539,32 @@ BuildHelper::BuildHelper( BuildState &state, ContainerNode *node )
}
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, /*ignoreDefaultMergingIndex*/ false );
}
-void BuildHelper::build( const QDomElement &element )
+void BuildHelper::build( const TQDomElement &element )
{
- for (QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
processElement( e );
}
}
-void BuildHelper::processElement( const QDomElement &e )
+void BuildHelper::processElement( const TQDomElement &e )
{
// some often used QStrings
- static const QString &tagAction = KGlobal::staticQString( "action" );
- static const QString &tagMerge = KGlobal::staticQString( "merge" );
- static const QString &tagState = KGlobal::staticQString( "state" );
- static const QString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagAction = KGlobal::staticQString( "action" );
+ static const TQString &tagMerge = KGlobal::staticQString( "merge" );
+ static const TQString &tagState = KGlobal::staticQString( "state" );
+ static const TQString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QString tag( e.tagName().lower() );
- QString currName( e.attribute( attrName ) );
+ TQString tag( e.tagName().lower() );
+ TQString currName( e.attribute( attrName ) );
bool isActionTag = ( tag == tagAction );
@@ -578,14 +578,14 @@ void BuildHelper::processElement( const QDomElement &e )
processStateElement( e );
}
-void BuildHelper::processActionOrCustomElement( const QDomElement &e, bool isActionTag )
+void BuildHelper::processActionOrCustomElement( const TQDomElement &e, bool isActionTag )
{
if ( !parentNode->container )
return;
MergingIndexList::Iterator it( m_state.currentClientMergingIt );
- QString group;
+ TQString group;
int idx = calcMergingIndex( e, it, group );
containerClient = parentNode->findChildContainerClient( m_state.guiClient, group, it );
@@ -601,7 +601,7 @@ void BuildHelper::processActionOrCustomElement( const QDomElement &e, bool isAct
parentNode->adjustMergingIndices( 1, it );
}
-bool BuildHelper::processActionElement( const QDomElement &e, int idx )
+bool BuildHelper::processActionElement( const TQDomElement &e, int idx )
{
assert( m_state.guiClient );
@@ -620,7 +620,7 @@ bool BuildHelper::processActionElement( const QDomElement &e, int idx )
return true;
}
-bool BuildHelper::processCustomElement( const QDomElement &e, int idx )
+bool BuildHelper::processCustomElement( const TQDomElement &e, int idx )
{
assert( parentNode->builder );
@@ -632,18 +632,18 @@ bool BuildHelper::processCustomElement( const QDomElement &e, int idx )
return true;
}
-void BuildHelper::processStateElement( const QDomElement &element )
+void BuildHelper::processStateElement( const TQDomElement &element )
{
- QString stateName = element.attribute( "name" );
+ TQString stateName = element.attribute( "name" );
if ( !stateName || !stateName.length() ) return;
- for (QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
- QString tagName = e.tagName().lower();
+ TQString tagName = e.tagName().lower();
if ( tagName != "enable" && tagName != "disable" )
continue;
@@ -651,12 +651,12 @@ void BuildHelper::processStateElement( const QDomElement &element )
bool processingActionsToEnable = (tagName == "enable");
// process action names
- for (QDomNode n2 = n.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
+ for (TQDomNode n2 = n.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
{
- QDomElement actionEl = n2.toElement();
+ TQDomElement actionEl = n2.toElement();
if ( actionEl.tagName().lower() != "action" ) continue;
- QString actionName = actionEl.attribute( "name" );
+ TQString actionName = actionEl.attribute( "name" );
if ( !actionName || !actionName.length() ) return;
if ( processingActionsToEnable )
@@ -668,14 +668,14 @@ void BuildHelper::processStateElement( const QDomElement &element )
}
}
-void BuildHelper::processMergeElement( const QString &tag, const QString &name, const QDomElement &e )
+void BuildHelper::processMergeElement( const TQString &tag, const TQString &name, const TQDomElement &e )
{
- static const QString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
- static const QString &attrGroup = KGlobal::staticQString( "group" );
+ static const TQString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &attrGroup = KGlobal::staticQString( "group" );
- QString mergingName( name );
+ TQString mergingName( name );
if ( mergingName.isEmpty() )
{
if ( tag == tagDefineGroup )
@@ -702,7 +702,7 @@ void BuildHelper::processMergeElement( const QString &tag, const QString &name,
MergingIndexList::Iterator mIt( parentNode->mergingIndices.end() );
- QString group( e.attribute( attrGroup ) );
+ TQString group( e.attribute( attrGroup ) );
if ( !group.isEmpty() )
group.prepend( attrGroup );
@@ -727,14 +727,14 @@ void BuildHelper::processMergeElement( const QString &tag, const QString &name,
// re-calculate the running default and client merging indices.
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, ignoreDefaultMergingIndex );
}
-void BuildHelper::processContainerElement( const QDomElement &e, const QString &tag,
- const QString &name )
+void BuildHelper::processContainerElement( const TQDomElement &e, const TQString &tag,
+ const TQString &name )
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
ContainerNode *containerNode = parentNode->findContainer( name, tag,
&containerList,
@@ -743,7 +743,7 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
if ( !containerNode )
{
MergingIndexList::Iterator it( m_state.currentClientMergingIt );
- QString group;
+ TQString group;
int idx = calcMergingIndex( e, it, group );
@@ -751,7 +751,7 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
KXMLGUIBuilder *builder;
- QWidget *container = createContainer( parentNode->container, idx, e, id, &builder );
+ TQWidget *container = createContainer( parentNode->container, idx, e, id, &builder );
// no container? (probably some <text> tag or so ;-)
if ( !container )
@@ -763,12 +763,12 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
containerList.append( container );
- QString mergingName;
+ TQString mergingName;
if ( it != parentNode->mergingIndices.end() )
mergingName = (*it).mergingName;
- QStringList cusTags = m_state.builderCustomTags;
- QStringList conTags = m_state.builderContainerTags;
+ TQStringList cusTags = m_state.builderCustomTags;
+ TQStringList conTags = m_state.builderContainerTags;
if ( builder != m_state.builder )
{
cusTags = m_state.clientBuilderCustomTags;
@@ -784,15 +784,15 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
// and re-calculate running values, for better performance
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, ignoreDefaultMergingIndex );
}
-QWidget *BuildHelper::createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id,
+TQWidget *BuildHelper::createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id,
KXMLGUIBuilder **builder )
{
- QWidget *res = 0L;
+ TQWidget *res = 0L;
if ( m_state.clientBuilder )
{
@@ -823,8 +823,8 @@ QWidget *BuildHelper::createContainer( QWidget *parent, int index,
void BuildState::reset()
{
- clientName = QString::null;
- actionListName = QString::null;
+ clientName = TQString::null;
+ actionListName = TQString::null;
actionList.clear();
guiClient = 0;
clientBuilder = 0;
diff --git a/kdeui/kxmlguifactory_p.h b/kdeui/kxmlguifactory_p.h
index 6e7f8f15a..2561ba915 100644
--- a/kdeui/kxmlguifactory_p.h
+++ b/kdeui/kxmlguifactory_p.h
@@ -19,10 +19,10 @@
#ifndef __kxmlguifactory_p_h__
#define __kxmlguifactory_p_h__
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qdom.h>
-#include <qvaluestack.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqdom.h>
+#include <tqvaluestack.h>
#include <kaction.h>
@@ -36,22 +36,22 @@ namespace KXMLGUI
struct BuildState;
-class KDEUI_EXPORT ActionList : public QPtrList<KAction>
+class KDEUI_EXPORT ActionList : public TQPtrList<KAction>
{
public:
ActionList() {}
- ActionList( const QPtrList<KAction> &rhs )
- : QPtrList<KAction>( rhs )
+ ActionList( const TQPtrList<KAction> &rhs )
+ : TQPtrList<KAction>( rhs )
{}
- ActionList &operator=( const QPtrList<KAction> &rhs )
- { QPtrList<KAction>::operator=( rhs ); return *this; }
+ ActionList &operator=( const TQPtrList<KAction> &rhs )
+ { TQPtrList<KAction>::operator=( rhs ); return *this; }
- void plug( QWidget *container, int index ) const;
- void unplug( QWidget *container ) const;
+ void plug( TQWidget *container, int index ) const;
+ void unplug( TQWidget *container ) const;
};
-typedef QPtrListIterator<KAction> ActionListIt;
-typedef QMap< QString, ActionList > ActionListMap;
+typedef TQPtrListIterator<KAction> ActionListIt;
+typedef TQMap< TQString, ActionList > ActionListMap;
/*
* This structure is used to know to which client certain actions and custom elements
@@ -69,24 +69,24 @@ struct ContainerClient
{
KXMLGUIClient *client;
ActionList actions;
- QValueList<int> customElements;
- QString groupName; //is empty if no group client
+ TQValueList<int> customElements;
+ TQString groupName; //is empty if no group client
ActionListMap actionLists;
- QString mergingName;
+ TQString mergingName;
};
-typedef QPtrList<ContainerClient> ContainerClientList;
-typedef QPtrListIterator<ContainerClient> ContainerClientListIt;
+typedef TQPtrList<ContainerClient> ContainerClientList;
+typedef TQPtrListIterator<ContainerClient> ContainerClientListIt;
struct ContainerNode;
struct MergingIndex
{
int value; // the actual index value, used as index for plug() or createContainer() calls
- QString mergingName; // the name of the merging index (i.e. the name attribute of the
+ TQString mergingName; // the name of the merging index (i.e. the name attribute of the
// Merge or DefineGroup tag)
- QString clientName; // the name of the client that defined this index
+ TQString clientName; // the name of the client that defined this index
};
-typedef QValueList<MergingIndex> MergingIndexList;
+typedef TQValueList<MergingIndex> MergingIndexList;
/*
* Here we store detailed information about a container, its clients (client=a guiclient having actions
@@ -109,47 +109,47 @@ typedef QValueList<MergingIndex> MergingIndexList;
*/
struct KDEUI_EXPORT ContainerNode
{
- ContainerNode( QWidget *_container, const QString &_tagName, const QString &_name,
+ ContainerNode( TQWidget *_container, const TQString &_tagName, const TQString &_name,
ContainerNode *_parent = 0L, KXMLGUIClient *_client = 0L,
KXMLGUIBuilder *_builder = 0L, int id = -1,
- const QString &_mergingName = QString::null,
- const QString &groupName = QString::null,
- const QStringList &customTags = QStringList(),
- const QStringList &containerTags = QStringList() );
+ const TQString &_mergingName = TQString::null,
+ const TQString &groupName = TQString::null,
+ const TQStringList &customTags = TQStringList(),
+ const TQStringList &containerTags = TQStringList() );
ContainerNode *parent;
KXMLGUIClient *client;
KXMLGUIBuilder *builder;
- QStringList builderCustomTags;
- QStringList builderContainerTags;
- QWidget *container;
+ TQStringList builderCustomTags;
+ TQStringList builderContainerTags;
+ TQWidget *container;
int containerId;
- QString tagName;
- QString name;
+ TQString tagName;
+ TQString name;
- QString groupName; //is empty if the container is in no group
+ TQString groupName; //is empty if the container is in no group
ContainerClientList clients;
- QPtrList<ContainerNode> children;
+ TQPtrList<ContainerNode> children;
int index;
MergingIndexList mergingIndices;
- QString mergingName;
+ TQString mergingName;
void clearChildren() { children.clear(); }
void removeChild( ContainerNode *child );
- MergingIndexList::Iterator findIndex( const QString &name );
- ContainerNode *findContainerNode( QWidget *container );
- ContainerNode *findContainer( const QString &_name, bool tag );
- ContainerNode *findContainer( const QString &name, const QString &tagName,
- const QPtrList<QWidget> *excludeList,
+ MergingIndexList::Iterator findIndex( const TQString &name );
+ ContainerNode *findContainerNode( TQWidget *container );
+ ContainerNode *findContainer( const TQString &_name, bool tag );
+ ContainerNode *findContainer( const TQString &name, const TQString &tagName,
+ const TQPtrList<TQWidget> *excludeList,
KXMLGUIClient *currClient );
ContainerClient *findChildContainerClient( KXMLGUIClient *currentGUIClient,
- const QString &groupName,
+ const TQString &groupName,
const MergingIndexList::Iterator &mergingIdx );
void plugActionList( BuildState &state );
@@ -160,23 +160,23 @@ struct KDEUI_EXPORT ContainerNode
void adjustMergingIndices( int offset, const MergingIndexList::Iterator &it );
- bool destruct( QDomElement element, BuildState &state );
- void destructChildren( const QDomElement &element, BuildState &state );
- static QDomElement findElementForChild( const QDomElement &baseElement,
+ bool destruct( TQDomElement element, BuildState &state );
+ void destructChildren( const TQDomElement &element, BuildState &state );
+ static TQDomElement findElementForChild( const TQDomElement &baseElement,
ContainerNode *childNode );
void unplugActions( BuildState &state );
void unplugClient( ContainerClient *client );
void reset();
- int calcMergingIndex( const QString &mergingName,
+ int calcMergingIndex( const TQString &mergingName,
MergingIndexList::Iterator &it,
BuildState &state,
bool ignoreDefaultMergingIndex );
};
-typedef QPtrList<ContainerNode> ContainerNodeList;
-typedef QPtrListIterator<ContainerNode> ContainerNodeListIt;
+typedef TQPtrList<ContainerNode> ContainerNodeList;
+typedef TQPtrListIterator<ContainerNode> ContainerNodeListIt;
class KDEUI_EXPORT BuildHelper
{
@@ -184,32 +184,32 @@ public:
BuildHelper( BuildState &state,
ContainerNode *node );
- void build( const QDomElement &element );
+ void build( const TQDomElement &element );
private:
- void processElement( const QDomElement &element );
+ void processElement( const TQDomElement &element );
- void processActionOrCustomElement( const QDomElement &e, bool isActionTag );
- bool processActionElement( const QDomElement &e, int idx );
- bool processCustomElement( const QDomElement &e, int idx );
+ void processActionOrCustomElement( const TQDomElement &e, bool isActionTag );
+ bool processActionElement( const TQDomElement &e, int idx );
+ bool processCustomElement( const TQDomElement &e, int idx );
- void processStateElement( const QDomElement &element );
+ void processStateElement( const TQDomElement &element );
- void processMergeElement( const QString &tag, const QString &name, const QDomElement &e );
+ void processMergeElement( const TQString &tag, const TQString &name, const TQDomElement &e );
- void processContainerElement( const QDomElement &e, const QString &tag,
- const QString &name );
+ void processContainerElement( const TQDomElement &e, const TQString &tag,
+ const TQString &name );
- QWidget *createContainer( QWidget *parent, int index, const QDomElement &element,
+ TQWidget *createContainer( TQWidget *parent, int index, const TQDomElement &element,
int &id, KXMLGUIBuilder **builder );
- int calcMergingIndex( const QDomElement &element, MergingIndexList::Iterator &it, QString &group );
+ int calcMergingIndex( const TQDomElement &element, MergingIndexList::Iterator &it, TQString &group );
- QStringList customTags;
- QStringList containerTags;
+ TQStringList customTags;
+ TQStringList containerTags;
- QPtrList<QWidget> containerList;
+ TQPtrList<TQWidget> containerList;
ContainerClient *containerClient;
@@ -226,9 +226,9 @@ struct KDEUI_EXPORT BuildState
void reset();
- QString clientName;
+ TQString clientName;
- QString actionListName;
+ TQString actionListName;
ActionList actionList;
KXMLGUIClient *guiClient;
@@ -237,15 +237,15 @@ struct KDEUI_EXPORT BuildState
MergingIndexList::Iterator currentClientMergingIt;
KXMLGUIBuilder *builder;
- QStringList builderCustomTags;
- QStringList builderContainerTags;
+ TQStringList builderCustomTags;
+ TQStringList builderContainerTags;
KXMLGUIBuilder *clientBuilder;
- QStringList clientBuilderCustomTags;
- QStringList clientBuilderContainerTags;
+ TQStringList clientBuilderCustomTags;
+ TQStringList clientBuilderContainerTags;
};
-typedef QValueStack<BuildState> BuildStateStack;
+typedef TQValueStack<BuildState> BuildStateStack;
}
diff --git a/kdeui/qxembed.cpp b/kdeui/qxembed.cpp
index 19b4a3d19..6403f9d8a 100644
--- a/kdeui/qxembed.cpp
+++ b/kdeui/qxembed.cpp
@@ -46,12 +46,12 @@
//
-#include <qapplication.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
-#include <qwhatsthis.h>
-#include <qfocusdata.h>
+#include <tqapplication.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
+#include <tqwhatsthis.h>
+#include <tqfocusdata.h>
// L0001: QXEmbed works only under X windows.
#ifdef Q_WS_X11
@@ -134,7 +134,7 @@ public:
xplain = false;
xgrab = false;
mapAfterRelease = false;
- lastPos = QPoint(0,0);
+ lastPos = TQPoint(0,0);
}
~QXEmbedData(){}
@@ -142,8 +142,8 @@ public:
bool xplain; // L0102: See L1100
bool xgrab; // L0103: See L2800
bool mapAfterRelease;
- QWidget* focusProxy; // L0104: See XEmbed spec
- QPoint lastPos; // L0105: See L1390
+ TQWidget* focusProxy; // L0104: See XEmbed spec
+ TQPoint lastPos; // L0105: See L1390
};
namespace
@@ -155,18 +155,18 @@ namespace
public:
QXEmbedAppFilter() { qApp->installEventFilter( this ); }
~QXEmbedAppFilter() { }
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
};
}
// L0201: See L0200, L0740
static QXEmbedAppFilter* filter = 0;
// L0202: See L0610, L0730
-static QPtrDict<QGuardedPtr<QWidget> > *focusMap = 0;
+static TQPtrDict<TQGuardedPtr<TQWidget> > *focusMap = 0;
// L0203: See L0660, L1400, L1450
static XKeyEvent last_key_event;
-// L0300: This class gives access protected members of class QWidget.
+// L0300: This class gives access protected members of class TQWidget.
// Function focusData() is useful to reimplement tab focus management
// (L0620) Function topData() returns a structure QTLWExtra containing
// information unique to toplevel windows. This structure contains two
@@ -177,8 +177,8 @@ static XKeyEvent last_key_event;
class QPublicWidget : public QWidget
{
public:
- QTLWExtra* topData() { return QWidget::topData(); }
- QFocusData *focusData(){ return QWidget::focusData(); }
+ QTLWExtra* topData() { return TQWidget::topData(); }
+ TQFocusData *focusData(){ return TQWidget::focusData(); }
bool focusNextPrev(bool b) { return focusNextPrevChild(b); }
};
@@ -297,25 +297,25 @@ static void sendFocusMessage(Window window, int type, int mode, int detail)
// when this happens (L2060). This can be achieved without
// cooperation from the client.
-bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
+bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
{
static bool obeyFocus = false;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
// L0612: This will become clear with L0614
- if ( !((QWidget*)o)->isActiveWindow() )
+ if ( !((TQWidget*)o)->isActiveWindow() )
obeyFocus = true;
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
// L0613: FocusIn events either occur because the widget already was
// active and has just been given the Qt focus (L0614) or
// because the widget already had the Qt focus and just became
// active (L0615).
if ( qApp->focusWidget() == o &&
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
- QFocusEvent* fe = (QFocusEvent*) e;
- if ( obeyFocus || fe->reason() == QFocusEvent::Mouse ||
- fe->reason() == QFocusEvent::Shortcut ) {
+ TQFocusEvent* fe = (TQFocusEvent*) e;
+ if ( obeyFocus || fe->reason() == TQFocusEvent::Mouse ||
+ fe->reason() == TQFocusEvent::Shortcut ) {
// L0614: A widget in the embedded client was just given the Qt focus.
// Variable `obeyFocus' suggests that this is the result of mouse
// activity in the client. The XEMBED_REQUEST_FOCUS message causes
@@ -323,7 +323,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
WId window = ((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->parentWinId;
focusMap->remove( qApp->focusWidget()->topLevelWidget() );
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
- } else if ( fe->reason() == QFocusEvent::ActiveWindow ) {
+ } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) {
// L0615: Both the embedder and the embedded client became active.
// But we do not know whether the QXEmbed widget has the Qt focus.
// So we clear the Qt focus for now. If indeed the QXEmbed widget
@@ -331,7 +331,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
// tell us to restore the focus (L0680, L0683).
focusMap->remove( qApp->focusWidget()->topLevelWidget() );
focusMap->insert( qApp->focusWidget()->topLevelWidget(),
- new QGuardedPtr<QWidget>(qApp->focusWidget()->topLevelWidget()->focusWidget() ) );
+ new TQGuardedPtr<TQWidget>(qApp->focusWidget()->topLevelWidget()->focusWidget() ) );
// L0616: qApp->focusWidget() might belong to a modal dialog and not be
// equal to qApp->focusWidget()->topLevelWidget()->focusWidget() !
qApp->focusWidget()->clearFocus();
@@ -340,7 +340,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
obeyFocus = false;
}
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
if (qApp->focusWidget() == o &&
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
// L0620: The following code replaces the Qt code that
@@ -355,29 +355,29 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
// messages are sent back to the embedding application
// (L0653, L0654) which then performs tab navigation
// (L2081).
- QKeyEvent *k = (QKeyEvent *)e;
- QWidget *w = qApp->focusWidget();
- // L0621: The following tests are copied from QWidget::event().
+ TQKeyEvent *k = (TQKeyEvent *)e;
+ TQWidget *w = qApp->focusWidget();
+ // L0621: The following tests are copied from TQWidget::event().
bool res = false;
bool tabForward = true;
if ( !(k->state() & ControlButton || k->state() & AltButton) ) {
if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) {
- QFocusEvent::setReason( QFocusEvent::Backtab );
+ TQFocusEvent::setReason( TQFocusEvent::Backtab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false );
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
} else if ( k->key() == Key_Tab ) {
- QFocusEvent::setReason( QFocusEvent::Tab );
+ TQFocusEvent::setReason( TQFocusEvent::Tab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true );
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
}
if (res) {
// L0625: We changed the focus because of tab/backtab key
// Now check whether we have been looping around.
- QFocusData *fd = ((QPublicWidget*)w)->focusData();
+ TQFocusData *fd = ((QPublicWidget*)w)->focusData();
WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId;
- QWidget *cw = 0;
- QWidget *fw = fd->home();
+ TQWidget *cw = 0;
+ TQWidget *fw = fd->home();
if (tabForward && window) {
while (cw != w && cw != fw && cw != w->topLevelWidget())
cw = fd->prev();
@@ -422,7 +422,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0671: Keep Qt message time up to date
if ( msgtime > qt_x_time )
qt_x_time = msgtime;
- QWidget* w = QWidget::find( e->xclient.window );
+ TQWidget* w = TQWidget::find( e->xclient.window );
if ( !w )
break;
switch ( message) {
@@ -468,8 +468,8 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0680: Embedding application gives us the focus.
{
// L0681: Search saved focus widget.
- QWidget* focusCurrent = 0;
- QGuardedPtr<QWidget>* fw = focusMap->find( w->topLevelWidget() );
+ TQWidget* focusCurrent = 0;
+ TQGuardedPtr<TQWidget>* fw = focusMap->find( w->topLevelWidget() );
if ( fw ) {
focusCurrent = *fw;
// L0682: Remove it from the map
@@ -486,19 +486,19 @@ static int qxembed_x11_event_filter( XEvent* e)
case XEMBED_FOCUS_FIRST:
{
// L0684: Search first widget in tab chain
- QFocusEvent::setReason( QFocusEvent::Tab );
+ TQFocusEvent::setReason( TQFocusEvent::Tab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
case XEMBED_FOCUS_LAST:
{
// L0686: Search last widget in tab chain
- QFocusEvent::setReason( QFocusEvent::Backtab );
+ TQFocusEvent::setReason( TQFocusEvent::Backtab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
default:
@@ -512,7 +512,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// and clear the Qt focus.
if ( w->topLevelWidget()->focusWidget() ) {
focusMap->insert( w->topLevelWidget(),
- new QGuardedPtr<QWidget>(w->topLevelWidget()->focusWidget() ) );
+ new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) );
w->topLevelWidget()->focusWidget()->clearFocus();
}
break;
@@ -521,7 +521,7 @@ static int qxembed_x11_event_filter( XEvent* e)
}
} else if ( e->xclient.format == 32 && e->xclient.message_type ) {
if ( e->xclient.message_type == qt_wm_protocols ) {
- QWidget* w = QWidget::find( e->xclient.window );
+ TQWidget* w = TQWidget::find( e->xclient.window );
if ( !w )
break;
// L0690: This is for the embedding side!
@@ -541,8 +541,8 @@ static int qxembed_x11_event_filter( XEvent* e)
// do the job (L1310). This does not happen if the
// window is already active. So we simulate it.
if ( w->isActiveWindow() ) {
- QEvent e( QEvent::WindowActivate );
- QApplication::sendEvent( w, &e );
+ TQEvent e( TQEvent::WindowActivate );
+ TQApplication::sendEvent( w, &e );
}
}
}
@@ -576,7 +576,7 @@ void QXEmbed::initialize()
// L0720: Install low level filter for X11 events (L0650)
oldFilter = qt_set_x11_event_filter( qxembed_x11_event_filter );
// L0730: See L0610 for an explanation about focusMap.
- focusMap = new QPtrDict<QGuardedPtr<QWidget> >;
+ focusMap = new TQPtrDict<TQGuardedPtr<TQWidget> >;
focusMap->setAutoDelete( true );
// L0740: Create client side application wide event filter (L0610)
filter = new QXEmbedAppFilter;
@@ -605,8 +605,8 @@ void QXEmbed::initialize()
// L0900: Constructs a xembed widget.
-QXEmbed::QXEmbed(QWidget *parent, const char *name, WFlags f)
- : QWidget(parent, name, f)
+QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
+ : TQWidget(parent, name, f)
{
// L0901: Create private data. See L0100.
d = new QXEmbedData;
@@ -616,11 +616,11 @@ QXEmbed::QXEmbed(QWidget *parent, const char *name, WFlags f)
// whole embedding application. They compete between themselves and
// against Qt (L0690, L0914, L1040, L1310, L1510, L1580).
// This would be much simpler if implemented within Qt.
- d->focusProxy = new QWidget( topLevelWidget(), "xembed_focus" );
+ d->focusProxy = new TQWidget( topLevelWidget(), "xembed_focus" );
d->focusProxy->setGeometry( -1, -1, 1, 1 );
d->focusProxy->show();
// make sure it's shown - for XSetInputFocus
- QApplication::sendPostedEvents( d->focusProxy, 0 );
+ TQApplication::sendPostedEvents( d->focusProxy, 0 );
// L0903: Install the client side event filters
// because they also provide services for the embedder side
// See L0660, L0671, L0685.
@@ -755,14 +755,14 @@ QXEmbed::Protocol QXEmbed::protocol()
// L1200: QXEmbed widget size changes: resize embedded window.
-void QXEmbed::resizeEvent(QResizeEvent*)
+void QXEmbed::resizeEvent(TQResizeEvent*)
{
if (window)
XResizeWindow(qt_xdisplay(), window, width(), height());
}
// L1250: QXEmbed widget is shown: make sure embedded window is visible.
-void QXEmbed::showEvent(QShowEvent*)
+void QXEmbed::showEvent(TQShowEvent*)
{
if (window)
XMapRaised(qt_xdisplay(), window);
@@ -770,11 +770,11 @@ void QXEmbed::showEvent(QShowEvent*)
// L1300: This event filter sees all application events (L0913).
-bool QXEmbed::eventFilter( QObject *o, QEvent * e)
+bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
{
switch ( e->type() ) {
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
if ( o == topLevelWidget() ) {
// L1310: Qt thinks the application window has just been activated.
// Make sure the X11 focus is on the focus proxy window. See L0686.
@@ -790,7 +790,7 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
sendXEmbedMessage( window, XEMBED_WINDOW_ACTIVATE );
}
break;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
if ( o == topLevelWidget() ) {
if (d->xplain)
// L1321: Activation has changed. Grab state might change. See L2800.
@@ -800,15 +800,15 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
sendXEmbedMessage( window, XEMBED_WINDOW_DEACTIVATE );
}
break;
- case QEvent::Move:
+ case TQEvent::Move:
{
- QWidget* pos = this;
+ TQWidget* pos = this;
while( pos != o && pos != topLevelWidget())
pos = pos->parentWidget();
if( pos == o ) {
// L1390: Send fake configure notify events whenever the
// global position of the client changes. See L2900.
- QPoint globalPos = mapToGlobal(QPoint(0,0));
+ TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (globalPos != d->lastPos) {
d->lastPos = globalPos;
sendSyntheticConfigureNotifyEvent();
@@ -823,9 +823,9 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
}
// L1350: ??? [why this?]
-bool QXEmbed::event( QEvent * e)
+bool QXEmbed::event( TQEvent * e)
{
- return QWidget::event( e );
+ return TQWidget::event( e );
}
// L1400: Forward keypress event to the client
@@ -834,7 +834,7 @@ bool QXEmbed::event( QEvent * e)
// The X11 event that caused the Qt key event
// must be forwarded to the client.
// See L0660.
-void QXEmbed::keyPressEvent( QKeyEvent *)
+void QXEmbed::keyPressEvent( TQKeyEvent *)
{
if (!window)
return;
@@ -845,7 +845,7 @@ void QXEmbed::keyPressEvent( QKeyEvent *)
// L1450: Forward keyrelease event to the client.
// See comment L1400.
-void QXEmbed::keyReleaseEvent( QKeyEvent *)
+void QXEmbed::keyReleaseEvent( TQKeyEvent *)
{
if (!window)
return;
@@ -854,7 +854,7 @@ void QXEmbed::keyReleaseEvent( QKeyEvent *)
}
// L1500: Handle Qt focus in event.
-void QXEmbed::focusInEvent( QFocusEvent * e ){
+void QXEmbed::focusInEvent( TQFocusEvent * e ){
if (!window)
return;
// L1510: This is a good time to set the X11 focus on the focus proxy window.
@@ -880,16 +880,16 @@ void QXEmbed::focusInEvent( QFocusEvent * e ){
// L1531: When the focus change is caused by the tab key,
// the client must select the first (or last) widget of
// its own tab chain.
- if ( e->reason() == QFocusEvent::Tab )
+ if ( e->reason() == TQFocusEvent::Tab )
detail = XEMBED_FOCUS_FIRST;
- else if ( e->reason() == QFocusEvent::Backtab )
+ else if ( e->reason() == TQFocusEvent::Backtab )
detail = XEMBED_FOCUS_LAST;
sendXEmbedMessage( window, XEMBED_FOCUS_IN, detail);
}
}
// L1550: Handle Qt focus out event.
-void QXEmbed::focusOutEvent( QFocusEvent * ){
+void QXEmbed::focusOutEvent( TQFocusEvent * ){
if (!window)
return;
if (d->xplain) {
@@ -971,7 +971,7 @@ void QXEmbed::embed(WId w)
// no longer try to manage this window.
if ( !wstate_withdrawn(window) ) {
XWithdrawWindow(qt_xdisplay(), window, qt_xscreen());
- QApplication::flushX();
+ TQApplication::flushX();
// L1711: See L1610
for (int i=0; i < 10000; ++i) {
if (wstate_withdrawn(window)) {
@@ -988,7 +988,7 @@ void QXEmbed::embed(WId w)
// time to create the embedded application main window.
Window parent = 0;
get_parent(w, &parent);
- kdDebug() << QString("> before reparent: parent=0x%1").arg(parent,0,16) << endl;
+ kdDebug() << TQString("> before reparent: parent=0x%1").arg(parent,0,16) << endl;
for (int i = 0; i < 50; i++) {
// this is done once more when finishing embedding, but it's done also here
// just in case we crash before reaching that place
@@ -996,16 +996,16 @@ void QXEmbed::embed(WId w)
XAddToSaveSet( qt_xdisplay(), w );
XReparentWindow(qt_xdisplay(), w, winId(), 0, 0);
if (get_parent(w, &parent) && parent == winId()) {
- kdDebug() << QString("> Loop %1: ").arg(i)
- << QString("> reparent of 0x%1").arg(w,0,16)
- << QString(" into 0x%1").arg(winId(),0,16)
- << QString(" successful") << endl;
+ kdDebug() << TQString("> Loop %1: ").arg(i)
+ << TQString("> reparent of 0x%1").arg(w,0,16)
+ << TQString(" into 0x%1").arg(winId(),0,16)
+ << TQString(" successful") << endl;
break;
}
- kdDebug() << QString("> Loop %1: ").arg(i)
- << QString("> reparent of 0x%1").arg(w,0,16)
- << QString(" into 0x%1").arg(winId(),0,16)
- << QString(" failed") << endl;
+ kdDebug() << TQString("> Loop %1: ").arg(i)
+ << TQString("> reparent of 0x%1").arg(w,0,16)
+ << TQString(" into 0x%1").arg(winId(),0,16)
+ << TQString(" failed") << endl;
USLEEP(1000);
}
if( parent != winId()) // failed
@@ -1030,8 +1030,8 @@ void QXEmbed::handleEmbed()
if ( parent() ) {
// L2030: embedded window might have new size requirements.
// see L2500, L2520, L2550.
- QEvent * layoutHint = new QEvent( QEvent::LayoutHint );
- QApplication::postEvent( parent(), layoutHint );
+ TQEvent * layoutHint = new TQEvent( TQEvent::LayoutHint );
+ TQApplication::postEvent( parent(), layoutHint );
}
windowChanged( window );
if (d->xplain) {
@@ -1069,11 +1069,11 @@ bool QXEmbed::focusNextPrevChild( bool next )
// the focus and pass the TAB key events to the QXEmbed widget.
// These key events will be forwarded to the client (L1400, L1450)
// who eventually will manage the tab focus (L0620) and possible
- // instruct us to call QWidget::focusNextPrevChild (L2081).
+ // instruct us to call TQWidget::focusNextPrevChild (L2081).
return false;
else
// L1920: Default behavior otherwise.
- return QWidget::focusNextPrevChild( next );
+ return TQWidget::focusNextPrevChild( next );
}
@@ -1122,9 +1122,9 @@ bool QXEmbed::x11Event( XEvent* e)
if (d->xplain && d->xgrab) {
// L2060: The passive grab has intercepted a mouse click
// in the embedded client window. Take the focus.
- QFocusEvent::setReason( QFocusEvent::Mouse );
+ TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
// L2064: Resume X11 event processing.
XAllowEvents(qt_xdisplay(), ReplayPointer, CurrentTime);
// L2065: Qt should not know about this.
@@ -1150,13 +1150,13 @@ bool QXEmbed::x11Event( XEvent* e)
long message = e->xclient.data.l[1];
switch ( message ) {
// L2081: Tab focus management. It is very important to call the
- // focusNextPrevChild() defined by QWidget (not QXEmbed).
+ // focusNextPrevChild() defined by TQWidget (not QXEmbed).
// See L1901.
case XEMBED_FOCUS_NEXT:
- QWidget::focusNextPrevChild( true );
+ TQWidget::focusNextPrevChild( true );
break;
case XEMBED_FOCUS_PREV:
- QWidget::focusNextPrevChild( false );
+ TQWidget::focusNextPrevChild( false );
break;
// L2085: The client asks for the focus.
case XEMBED_REQUEST_FOCUS:
@@ -1164,9 +1164,9 @@ bool QXEmbed::x11Event( XEvent* e)
WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId;
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
} else {
- QFocusEvent::setReason( QFocusEvent::Mouse );
+ TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
default:
@@ -1187,7 +1187,7 @@ bool QXEmbed::x11Event( XEvent* e)
// fall through, workaround for Qt 3.0 < 3.0.3
case EnterNotify:
// L2095: See L2200.
- if ( QWhatsThis::inWhatsThisMode() )
+ if ( TQWhatsThis::inWhatsThisMode() )
enterWhatsThisMode();
break;
default:
@@ -1205,7 +1205,7 @@ void QXEmbed::enterWhatsThisMode()
// cancel what-s-this mode, and use a non stantard _NET_WM_ message
// to instruct the embedded client to enter the "what's this" mode.
// This works only one way...
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::leaveWhatsThisMode();
if ( !context_help )
context_help = XInternAtom( x11Display(), "_NET_WM_CONTEXT_HELP", false );
sendClientMessage(window , qt_wm_protocols, context_help );
@@ -1220,7 +1220,7 @@ void QXEmbed::windowChanged( WId )
// L2400: Utility function for clients that embed themselves.
// This is client side code.
-bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
+bool QXEmbed::processClientCmdline( TQWidget* client, int& argc, char ** argv )
{
int myargc = argc;
WId window = 0;
@@ -1232,9 +1232,9 @@ bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
argv[j++] = argv[i];
continue;
}
- QCString arg = argv[i];
+ TQCString arg = argv[i];
if ( !strcmp(arg,"-embed") && i < myargc-1 ) {
- QCString s = argv[++i];
+ TQCString s = argv[++i];
window = s.toInt();
} else
argv[j++] = argv[i];
@@ -1252,7 +1252,7 @@ bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
// L2450: Utility function for clients that embed themselves.
// This is client side code.
-void QXEmbed::embedClientIntoWindow(QWidget* client, WId window)
+void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window)
{
initialize();
XReparentWindow(qt_xdisplay(), client->winId(), window, 0, 0);
@@ -1268,20 +1268,20 @@ void QXEmbed::embedClientIntoWindow(QWidget* client, WId window)
// L2500: Specifies that this widget can use additional space,
// and that it can survive on less than sizeHint().
-QSizePolicy QXEmbed::sizePolicy() const
+TQSizePolicy QXEmbed::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
}
// L2520: Returns a size sufficient for the embedded window
-QSize QXEmbed::sizeHint() const
+TQSize QXEmbed::sizeHint() const
{
return minimumSizeHint();
}
// L2550: Returns the minimum size specified by the embedded window.
-QSize QXEmbed::minimumSizeHint() const
+TQSize QXEmbed::minimumSizeHint() const
{
int minw = 0;
int minh = 0;
@@ -1295,7 +1295,7 @@ QSize QXEmbed::minimumSizeHint() const
}
}
- return QSize( minw, minh );
+ return TQSize( minw, minh );
}
// L2600: Tells what shoud be done with the embedded window when
@@ -1344,7 +1344,7 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
// L2910: It seems that the x and y coordinates are global.
// But this is what ICCCM section 4.1.5 wants.
// See http://lists.kde.org/?l=kfm-devel&m=107090222032378
- QPoint globalPos = mapToGlobal(QPoint(0,0));
+ TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (window) {
#if 0
XConfigureEvent c;
@@ -1369,15 +1369,15 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
}
}
-// L3000: One should not call QWidget::reparent after embedding a window.
-void QXEmbed::reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt )
+// L3000: One should not call TQWidget::reparent after embedding a window.
+void QXEmbed::reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt )
{
- // QWidget::reparent() destroys the old X Window for the widget, and
+ // TQWidget::reparent() destroys the old X Window for the widget, and
// creates a new one, thus QXEmbed after reparenting is no longer the
// parent of the embedded window. I think reparenting of QXEmbed can be
// done only by a mistake, so just complain.
Q_ASSERT( !window );
- QWidget::reparent( parent, f, p, showIt );
+ TQWidget::reparent( parent, f, p, showIt );
}
// for KDE
diff --git a/kdeui/qxembed.h b/kdeui/qxembed.h
index 40772d801..38aabbd77 100644
--- a/kdeui/qxembed.h
+++ b/kdeui/qxembed.h
@@ -22,7 +22,7 @@
#ifndef QXEMBED_H
#define QXEMBED_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11
@@ -68,7 +68,7 @@ public:
* The parent, name and f arguments are passed to the QFrame
* constructor.
*/
- QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
+ QXEmbed( TQWidget *parent=0, const char *name=0, WFlags f = 0 );
/**
* Destructor. Cleans up the focus if necessary.
@@ -140,7 +140,7 @@ public:
*
* @short #processClientCmdline()
*/
- static void embedClientIntoWindow( QWidget* client, WId window );
+ static void embedClientIntoWindow( TQWidget* client, WId window );
/**
* A utility function for clients that embed theirselves. The widget
@@ -152,7 +152,7 @@ public:
*
* @see embedClientIntoWindow()
*/
- static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
+ static bool processClientCmdline( TQWidget* client, int& argc, char ** argv );
/**
* Sends a WM_DELETE_WINDOW message to the embedded window. This is what
@@ -183,13 +183,13 @@ public:
bool autoDelete() const;
/* Reimp */
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSizePolicy sizePolicy() const;
- bool eventFilter( QObject *, QEvent * );
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSizePolicy sizePolicy() const;
+ bool eventFilter( TQObject *, TQEvent * );
bool customWhatsThis() const;
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
- virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
+ virtual void reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = false );
signals:
/**
@@ -201,13 +201,13 @@ signals:
void embeddedWindowDestroyed();
protected:
- bool event( QEvent * );
- void keyPressEvent( QKeyEvent * );
- void keyReleaseEvent( QKeyEvent * );
- void focusInEvent( QFocusEvent * );
- void focusOutEvent( QFocusEvent * );
- void resizeEvent(QResizeEvent *);
- void showEvent( QShowEvent * );
+ bool event( TQEvent * );
+ void keyPressEvent( TQKeyEvent * );
+ void keyReleaseEvent( TQKeyEvent * );
+ void focusInEvent( TQFocusEvent * );
+ void focusOutEvent( TQFocusEvent * );
+ void resizeEvent(TQResizeEvent *);
+ void showEvent( TQShowEvent * );
bool x11Event( XEvent* );
/**
diff --git a/kdeui/tests/itemcontainertest.cpp b/kdeui/tests/itemcontainertest.cpp
index 7ad145c9e..1767bec5f 100644
--- a/kdeui/tests/itemcontainertest.cpp
+++ b/kdeui/tests/itemcontainertest.cpp
@@ -8,13 +8,13 @@
*
*/
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -56,70 +56,70 @@ static const char * item_xpm[] = {
KApplication *app;
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("Item container test application");
- QHBoxLayout* hBox = new QHBoxLayout( this );
- QVBoxLayout* vBox = new QVBoxLayout( hBox );
+ TQHBoxLayout* hBox = new TQHBoxLayout( this );
+ TQVBoxLayout* vBox = new TQVBoxLayout( hBox );
hBox->addSpacing( 5 );
//Selection mode selection
- m_pbgMode = new QButtonGroup( 1, Qt::Horizontal, "Selection Mode", this);
- m_pbgMode->insert(new QRadioButton("NoSlection", m_pbgMode), TopLevel::NoSelection );
- m_pbgMode->insert(new QRadioButton("Single", m_pbgMode), TopLevel::Single );
- m_pbgMode->insert(new QRadioButton("Multi", m_pbgMode), TopLevel::Multi );
- m_pbgMode->insert(new QRadioButton("Extended", m_pbgMode), TopLevel::Extended );
+ m_pbgMode = new TQButtonGroup( 1, Qt::Horizontal, "Selection Mode", this);
+ m_pbgMode->insert(new TQRadioButton("NoSlection", m_pbgMode), TopLevel::NoSelection );
+ m_pbgMode->insert(new TQRadioButton("Single", m_pbgMode), TopLevel::Single );
+ m_pbgMode->insert(new TQRadioButton("Multi", m_pbgMode), TopLevel::Multi );
+ m_pbgMode->insert(new TQRadioButton("Extended", m_pbgMode), TopLevel::Extended );
m_pbgMode->setExclusive( true );
vBox->addWidget( m_pbgMode );
- connect( m_pbgMode, SIGNAL( clicked( int ) ),
- this, SLOT( slotSwitchMode( int ) ) );
+ connect( m_pbgMode, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotSwitchMode( int ) ) );
//Signal labels
- QGroupBox* gbWiget = new QGroupBox( 1, Qt::Horizontal, "Widget", this);
- m_plblWidget = new QLabel( gbWiget );
+ TQGroupBox* gbWiget = new TQGroupBox( 1, Qt::Horizontal, "Widget", this);
+ m_plblWidget = new TQLabel( gbWiget );
vBox->addWidget( gbWiget );
- QGroupBox* gbSignal = new QGroupBox( 1, Qt::Horizontal, "emitted Signal", this);
- m_plblSignal = new QLabel( gbSignal );
+ TQGroupBox* gbSignal = new TQGroupBox( 1, Qt::Horizontal, "emitted Signal", this);
+ m_plblSignal = new TQLabel( gbSignal );
vBox->addWidget( gbSignal );
- QGroupBox* gbItem = new QGroupBox( 1, Qt::Horizontal, "on Item", this);
- m_plblItem = new QLabel( gbItem );
+ TQGroupBox* gbItem = new TQGroupBox( 1, Qt::Horizontal, "on Item", this);
+ m_plblItem = new TQLabel( gbItem );
vBox->addWidget( gbItem );
- QButtonGroup* bgListView = new QButtonGroup( 1, Qt::Horizontal, "KListView", this);
- QCheckBox* cbListView = new QCheckBox("Single Column", bgListView);
+ TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "KListView", this);
+ TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView);
vBox->addWidget( bgListView );
- connect( cbListView, SIGNAL( toggled( bool ) ),
- this, SLOT( slotToggleSingleColumn( bool ) ) );
+ connect( cbListView, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotToggleSingleColumn( bool ) ) );
KGlobal::config()->reparseConfiguration();
//Create IconView
- QGroupBox* gbIconView = new QGroupBox( 1, Qt::Horizontal, "KIconView", this);
+ TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "KIconView", this);
m_pIconView = new KIconView( gbIconView );
hBox->addWidget( gbIconView );
hBox->addSpacing( 5 );
- connect( m_pIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( slotIconViewExec( QIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) );
//Create ListView
- QGroupBox* gbListView = new QGroupBox( 1, Qt::Horizontal, "KListView", this);
+ TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "KListView", this);
m_pListView = new KListView( gbListView );
m_pListView->addColumn("Item");
m_pListView->addColumn("Text");
hBox->addWidget( gbListView );
hBox->addSpacing( 5 );
- connect( m_pListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( slotListViewExec( QListViewItem* ) ) );
+ connect( m_pListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) );
//Create ListBox
- QGroupBox* gbListBox = new QGroupBox( 1, Qt::Horizontal, "KListBox", this);
+ TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "KListBox", this);
m_pListBox = new KListBox( gbListBox );
hBox->addWidget( gbListBox );
- connect( m_pListBox, SIGNAL( executed( QListBoxItem* ) ),
- this, SLOT( slotListBoxExec( QListBoxItem* ) ) );
+ connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) );
//Initialize buttons
cbListView->setChecked( !m_pListView->allColumnsShowFocus() );
@@ -128,19 +128,19 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
//Fill container widgets
for( int i = 0; i < 10; i++ ) {
- new QIconViewItem( m_pIconView, QString("Item%1").arg(i), QPixmap(item_xpm) );
+ new TQIconViewItem( m_pIconView, TQString("Item%1").arg(i), TQPixmap(item_xpm) );
- QListViewItem* lv = new QListViewItem( m_pListView, QString("Item%1").arg(i), QString("Text%1").arg(i) );
- lv->setPixmap( 0, QPixmap(item_xpm));
- lv->setPixmap( 1, QPixmap(item_xpm));
+ TQListViewItem* lv = new TQListViewItem( m_pListView, TQString("Item%1").arg(i), TQString("Text%1").arg(i) );
+ lv->setPixmap( 0, TQPixmap(item_xpm));
+ lv->setPixmap( 1, TQPixmap(item_xpm));
- new QListBoxPixmap( m_pListBox, QPixmap(item_xpm), QString("Item%1").arg(i));
+ new TQListBoxPixmap( m_pListBox, TQPixmap(item_xpm), TQString("Item%1").arg(i));
}
- connect( m_pIconView, SIGNAL( clicked( QIconViewItem* ) ),
- this, SLOT( slotClicked( QIconViewItem* ) ) );
- connect( m_pIconView, SIGNAL( doubleClicked( QIconViewItem* ) ),
- this, SLOT( slotDoubleClicked( QIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( clicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotClicked( TQIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotDoubleClicked( TQIconViewItem* ) ) );
}
void TopLevel::slotSwitchMode( int id )
@@ -152,22 +152,22 @@ void TopLevel::slotSwitchMode( int id )
switch( id ) {
case TopLevel::NoSelection:
m_pIconView->setSelectionMode( KIconView::NoSelection );
- m_pListView->setSelectionMode( QListView::NoSelection );
+ m_pListView->setSelectionMode( TQListView::NoSelection );
m_pListBox->setSelectionMode( KListBox::NoSelection );
break;
case TopLevel::Single:
m_pIconView->setSelectionMode( KIconView::Single );
- m_pListView->setSelectionMode( QListView::Single );
+ m_pListView->setSelectionMode( TQListView::Single );
m_pListBox->setSelectionMode( KListBox::Single );
break;
case TopLevel::Multi:
m_pIconView->setSelectionMode( KIconView::Multi );
- m_pListView->setSelectionMode( QListView::Multi );
+ m_pListView->setSelectionMode( TQListView::Multi );
m_pListBox->setSelectionMode( KListBox::Multi );
break;
case TopLevel::Extended:
m_pIconView->setSelectionMode( KIconView::Extended );
- m_pListView->setSelectionMode( QListView::Extended );
+ m_pListView->setSelectionMode( TQListView::Extended );
m_pListBox->setSelectionMode( KListBox::Extended );
break;
default:
@@ -175,7 +175,7 @@ void TopLevel::slotSwitchMode( int id )
}
}
-void TopLevel::slotIconViewExec( QIconViewItem* item )
+void TopLevel::slotIconViewExec( TQIconViewItem* item )
{
m_plblWidget->setText("KIconView");
m_plblSignal->setText("executed");
@@ -185,7 +185,7 @@ void TopLevel::slotIconViewExec( QIconViewItem* item )
m_plblItem->setText("Viewport");
}
-void TopLevel::slotListViewExec( QListViewItem* item )
+void TopLevel::slotListViewExec( TQListViewItem* item )
{
m_plblWidget->setText("KListView");
m_plblSignal->setText("executed");
@@ -195,7 +195,7 @@ void TopLevel::slotListViewExec( QListViewItem* item )
m_plblItem->setText("Viewport");
}
-void TopLevel::slotListBoxExec( QListBoxItem* item )
+void TopLevel::slotListBoxExec( TQListBoxItem* item )
{
m_plblWidget->setText("KListBox");
m_plblSignal->setText("executed");
diff --git a/kdeui/tests/itemcontainertest.h b/kdeui/tests/itemcontainertest.h
index c6091f5e5..01f7c006c 100644
--- a/kdeui/tests/itemcontainertest.h
+++ b/kdeui/tests/itemcontainertest.h
@@ -1,7 +1,7 @@
#ifndef _ITEMCONTAINERTEST_H
#define _ITEMCONTAINERTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KIconView;
class KListView;
@@ -14,7 +14,7 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
enum ViewID { IconView, ListView, ListBox };
enum ModeID { NoSelection, Single, Multi, Extended };
@@ -23,23 +23,23 @@ public slots:
//void slotSwitchView( int id );
void slotSwitchMode( int id );
- void slotIconViewExec( QIconViewItem* item );
- void slotListViewExec( QListViewItem* item );
- void slotListBoxExec( QListBoxItem* item );
+ void slotIconViewExec( TQIconViewItem* item );
+ void slotListViewExec( TQListViewItem* item );
+ void slotListBoxExec( TQListBoxItem* item );
void slotToggleSingleColumn( bool b );
- void slotClicked( QIconViewItem* ) { qDebug("CLICK");}
- void slotDoubleClicked( QIconViewItem* ) { qDebug("DOUBLE CLICK");}
+ void slotClicked( TQIconViewItem* ) { qDebug("CLICK");}
+ void slotDoubleClicked( TQIconViewItem* ) { qDebug("DOUBLE CLICK");}
protected:
KIconView* m_pIconView;
KListView* m_pListView;
KListBox* m_pListBox;
- QButtonGroup* m_pbgView;
- QButtonGroup* m_pbgMode;
- QLabel* m_plblWidget;
- QLabel* m_plblSignal;
- QLabel* m_plblItem;
+ TQButtonGroup* m_pbgView;
+ TQButtonGroup* m_pbgMode;
+ TQLabel* m_plblWidget;
+ TQLabel* m_plblSignal;
+ TQLabel* m_plblItem;
};
#endif
diff --git a/kdeui/tests/kaboutdialogtest.cpp b/kdeui/tests/kaboutdialogtest.cpp
index 89d25d531..ea92096b0 100644
--- a/kdeui/tests/kaboutdialogtest.cpp
+++ b/kdeui/tests/kaboutdialogtest.cpp
@@ -10,16 +10,16 @@
#include "kaboutdialog.h"
// #include <kimgio.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <klocale.h>
int main(int argc, char** argv)
{
(void)new KApplication(argc, argv, "KAboutDialogTest");
- QImage logo;
- QImage bg;
- QPixmap pix;
+ TQImage logo;
+ TQImage bg;
+ TQPixmap pix;
KAboutDialog about;
// -----
// kimgioRegister();
diff --git a/kdeui/tests/kaccelgentest.cpp b/kdeui/tests/kaccelgentest.cpp
index d619bdfba..f5f95ac57 100644
--- a/kdeui/tests/kaccelgentest.cpp
+++ b/kdeui/tests/kaccelgentest.cpp
@@ -1,13 +1,13 @@
#include "kaccelgen.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <iostream>
using std::cout;
using std::endl;
-void check( const QString &what, const QStringList &expected, const QStringList &received )
+void check( const TQString &what, const TQStringList &expected, const TQStringList &received )
{
cout << "Testing " << what.latin1() << ": ";
if ( expected == received ) {
@@ -21,20 +21,20 @@ void check( const QString &what, const QStringList &expected, const QStringList
int main()
{
- QStringList input;
+ TQStringList input;
input << "foo" << "bar item" << "&baz" << "bif" << "boz" << "boz 2"
<< "yoyo && dyne";
- QStringList expected;
+ TQStringList expected;
expected << "&foo" << "bar &item" << "&baz" << "bif" << "b&oz" << "boz &2"
<< "&yoyo && dyne";
- QStringList output;
+ TQStringList output;
KAccelGen::generate( input, output );
- check( "QStringList value generation", expected, output );
+ check( "TQStringList value generation", expected, output );
- QMap<QString,QString> map;
- for (QStringList::ConstIterator it = input.begin(); it != input.end(); ++it) {
+ TQMap<TQString,TQString> map;
+ for (TQStringList::ConstIterator it = input.begin(); it != input.end(); ++it) {
map.insert(*it, *it);
}
input.sort();
diff --git a/kdeui/tests/kactiontest.cpp b/kdeui/tests/kactiontest.cpp
index 60fa334ee..ea97883c8 100644
--- a/kdeui/tests/kactiontest.cpp
+++ b/kdeui/tests/kactiontest.cpp
@@ -1,5 +1,5 @@
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kaction.h>
@@ -10,15 +10,15 @@ int main( int argc, char **argv )
{
KApplication app( argc, argv, "kactiontest" );
- KActionCollection coll( static_cast<QObject *>( 0 ) );
+ KActionCollection coll( static_cast<TQObject *>( 0 ) );
- QGuardedPtr<KAction> action1 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action2 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action3 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action4 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action5 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action6 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action7 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action1 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action2 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action3 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action4 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action5 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action6 = new KRadioAction("test",0, &coll);
+ TQGuardedPtr<KAction> action7 = new KRadioAction("test",0, &coll);
coll.clear();
assert( coll.isEmpty() );
diff --git a/kdeui/tests/kalphaicontest.h b/kdeui/tests/kalphaicontest.h
index 66d26e6f3..6143b569d 100644
--- a/kdeui/tests/kalphaicontest.h
+++ b/kdeui/tests/kalphaicontest.h
@@ -1,7 +1,7 @@
#include <kdebug.h>
-#include <qwidget.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <kimageeffect.h>
#include <kalphapainter.h>
@@ -10,11 +10,11 @@ class KAlphaTest : public QWidget
public:
KAlphaTest();
protected:
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
private:
- QImage m_image;
- QPixmap m_pixmap;
- QImage m_bg;
+ TQImage m_image;
+ TQPixmap m_pixmap;
+ TQImage m_bg;
public:
static bool m_useDblBuffer;
diff --git a/kdeui/tests/kblendtest.cpp b/kdeui/tests/kblendtest.cpp
index f12d65b2b..e2d36a575 100644
--- a/kdeui/tests/kblendtest.cpp
+++ b/kdeui/tests/kblendtest.cpp
@@ -1,33 +1,33 @@
#include "kblendtest.h"
#include <kapplication.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-KBlendWidget::KBlendWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KBlendWidget::KBlendWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
bgnd = qRgb(255, 255, 255);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
resize(image.width()*2+60, image.height()*3+80);
setBackgroundColor(bgnd);
}
-void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
+void KBlendWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::black);
// you see here use of anti_dir param (blend from down to up, here)
@@ -39,7 +39,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 20, image);
p.drawText(5 , 15, say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
// here a negative initial intensity is used (1/2 of image is unaffected)
it = time.elapsed();
@@ -49,7 +49,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(40+image.width(), 20, image);
p.drawText(15+image.width() , 15, say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0., bgnd, KImageEffect::DiagonalGradient,true);
@@ -58,7 +58,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 40+image.height(), image);
p.drawText(5 , 35+image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0.1, bgnd, KImageEffect::CrossDiagonalGradient);
@@ -67,7 +67,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(40+image.width(), 40+image.height(), image);
p.drawText(25+image.width() , 35 + image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, -0.6, bgnd, KImageEffect::RectangleGradient);
@@ -76,7 +76,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 60+2*image.height(), image);
p.drawText(5 , 55+2*image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0.2, bgnd, KImageEffect::EllipticGradient);
diff --git a/kdeui/tests/kblendtest.h b/kdeui/tests/kblendtest.h
index 800f2d562..b0f4485dd 100644
--- a/kdeui/tests/kblendtest.h
+++ b/kdeui/tests/kblendtest.h
@@ -7,18 +7,18 @@
#ifndef __KBLEND_TEST_H
#define __KBLEND_TEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
class KBlendWidget : public QWidget
{
public:
- KBlendWidget(QWidget *parent=0, const char *name=0);
+ KBlendWidget(TQWidget *parent=0, const char *name=0);
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
- QImage image, original;
- QColor bgnd;
+ TQImage image, original;
+ TQColor bgnd;
};
#endif
diff --git a/kdeui/tests/kbuttonboxtest.cpp b/kdeui/tests/kbuttonboxtest.cpp
index d9b070bc0..1773c47f9 100644
--- a/kdeui/tests/kbuttonboxtest.cpp
+++ b/kdeui/tests/kbuttonboxtest.cpp
@@ -18,20 +18,20 @@
*/
#include <kapplication.h>
#include "kbuttonbox.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
int main(int argc, char **argv) {
KApplication a(argc, argv, "dummy");
// example 1
{
- QDialog *w = new QDialog(0, "A common dialog", true);
+ TQDialog *w = new TQDialog(0, "A common dialog", true);
w->setCaption("Example 1");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A very common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A very common dialog\n\n"\
"OK and Cancel are left aligned, Help\n"\
"is right aligned. Try resizing\n"\
"the window!\n"
@@ -41,12 +41,12 @@ int main(int argc, char **argv) {
l->setMinimumSize(l->sizeHint());
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->addButton("Help");
@@ -59,10 +59,10 @@ int main(int argc, char **argv) {
// example 2
{
- QDialog *w = new QDialog(0, "Right aligned buttons", true);
+ TQDialog *w = new TQDialog(0, "Right aligned buttons", true);
w->setCaption("Example 2");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("Another common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Another common dialog\n\n"\
"OK and Cancel are right aligned\n"\
"Try resizing the window!", w);
l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak);
@@ -70,12 +70,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->layout();
tl->addWidget(bbox,0);
tl->activate();
@@ -85,10 +85,10 @@ int main(int argc, char **argv) {
// example 3
{
- QDialog *w = new QDialog(0, "Middle aligned buttons", true);
+ TQDialog *w = new TQDialog(0, "Middle aligned buttons", true);
w->setCaption("Example 3");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("Another common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Another common dialog\n\n"\
"OK and Cancel are middle aligned\n"\
"Try resizing the window!", w);
l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak);
@@ -96,12 +96,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
tl->addWidget(bbox,0);
@@ -112,10 +112,10 @@ int main(int argc, char **argv) {
// example 4
{
- QDialog *w = new QDialog(0, "Bad example", true);
+ TQDialog *w = new TQDialog(0, "Bad example", true);
w->setCaption("Example 4");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A very bad example\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A very bad example\n\n"\
"Sometimes it's a bad idea to take\n"
"the maximum width for all buttons\n"
"since it will look ugly -- "
@@ -125,12 +125,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addButton("Push me and I give you a banana");
bbox->addStretch(1);
@@ -143,10 +143,10 @@ int main(int argc, char **argv) {
// example 5
{
- QDialog *w = new QDialog(0, "Bad example", true);
+ TQDialog *w = new TQDialog(0, "Bad example", true);
w->setCaption("Example 5");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A better solution for the bad example\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A better solution for the bad example\n\n"\
"Use \"addButton(\"Push me and I give"
"you a banana\", true);\" to\n"
"prevent this strange effect as seen\n"
@@ -157,12 +157,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addButton("Push me and I give you a banana", true);
bbox->addStretch(1);
@@ -175,10 +175,10 @@ int main(int argc, char **argv) {
// example 6
{
- QDialog *w = new QDialog(0, "Vertical", true);
+ TQDialog *w = new TQDialog(0, "Vertical", true);
w->setCaption("Example 6 (last)");
- QHBoxLayout *tl = new QHBoxLayout(w, 5);
- QLabel *l = new QLabel("Did I mention that it's possible\n"
+ TQHBoxLayout *tl = new TQHBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Did I mention that it's possible\n"
"to make vertically aligned buttons\n"
"too?"
,w);
@@ -186,12 +186,12 @@ int main(int argc, char **argv) {
l->setMinimumSize(l->sizeHint());
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w, KButtonBox::Vertical);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
diff --git a/kdeui/tests/kcolordlgtest.cpp b/kdeui/tests/kcolordlgtest.cpp
index b5ba68393..a7e64928d 100644
--- a/kdeui/tests/kcolordlgtest.cpp
+++ b/kdeui/tests/kcolordlgtest.cpp
@@ -24,10 +24,10 @@
int main( int argc, char *argv[] )
{
- QColor color;
+ TQColor color;
KLocale::setMainCatalogue("kdelibs");
- QApplication::setColorMode( QApplication::CustomColors );
+ TQApplication::setColorMode( TQApplication::CustomColors );
KApplication a( argc, argv, "KColorDialogTest" );
KConfig aConfig;
aConfig.setGroup( "KColorDialog-test" );
diff --git a/kdeui/tests/kcolortest.cpp b/kdeui/tests/kcolortest.cpp
index c4dd5892b..d4a5c2625 100644
--- a/kdeui/tests/kcolortest.cpp
+++ b/kdeui/tests/kcolortest.cpp
@@ -3,25 +3,25 @@
#include <kapplication.h>
#include <kimageeffect.h>
#include <stdio.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
bool fullscreen = false, oldway = false, intvsfade = false;
int max = 20; // how many steps
-KColorWidget::KColorWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KColorWidget::KColorWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
if (fullscreen || intvsfade) {
- QPixmap shot = QPixmap::grabWindow(QApplication::desktop()->winId());
+ TQPixmap shot = TQPixmap::grabWindow(TQApplication::desktop()->winId());
original = shot.convertToImage();
}
else
- original = QImage("testimage.png");
+ original = TQImage("testimage.png");
resize(original.width(), original.height());
}
-void KColorWidget::paintEvent(QPaintEvent *)
+void KColorWidget::paintEvent(TQPaintEvent *)
{
if(!pixmap.isNull())
bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(),
@@ -33,7 +33,7 @@ void KColorWidget::doIntensityLoop()
int count;
int start, stop;
- QTime t;
+ TQTime t;
t.start();
diff --git a/kdeui/tests/kcolortest.h b/kdeui/tests/kcolortest.h
index 52cce12cc..ac8716d59 100644
--- a/kdeui/tests/kcolortest.h
+++ b/kdeui/tests/kcolortest.h
@@ -1,19 +1,19 @@
#ifndef __KCOLORTEST_H
#define __KCOLORTEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <kpixmap.h>
class KColorWidget : public QWidget
{
public:
- KColorWidget(QWidget *parent=0, const char *name=0);
+ KColorWidget(TQWidget *parent=0, const char *name=0);
void doIntensityLoop();
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
- QImage image, original;
+ TQImage image, original;
KPixmap pixmap;
};
diff --git a/kdeui/tests/kcomboboxtest.cpp b/kdeui/tests/kcomboboxtest.cpp
index 2eb1f73e0..44b849b44 100644
--- a/kdeui/tests/kcomboboxtest.cpp
+++ b/kdeui/tests/kcomboboxtest.cpp
@@ -13,18 +13,18 @@
#include <kiconloader.h>
#include <ksimpleconfig.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
-KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
- :QWidget(widget, name)
+KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name )
+ :TQWidget(widget, name)
{
- QVBoxLayout *vbox = new QVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint());
// Test for KCombo's KLineEdit destruction
KComboBox *testCombo = new KComboBox( true, this ); // rw, with KLineEdit
@@ -33,90 +33,90 @@ KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
delete testCombo; // not needed anymore
// Qt combobox
- QHBox* hbox = new QHBox(this);
+ TQHBox* hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- QLabel* lbl = new QLabel("&QCombobox:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ TQLabel* lbl = new TQLabel("&QCombobox:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
- m_qc = new QComboBox(hbox, "QtReadOnlyCombo" );
+ m_qc = new TQComboBox(hbox, "QtReadOnlyCombo" );
lbl->setBuddy (m_qc);
- QObject::connect (m_qc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_qc, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
+ TQObject::connect (m_qc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_qc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
vbox->addWidget (hbox);
// Read-only combobox
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&Read-Only Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&Read-Only Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_ro = new KComboBox(hbox, "ReadOnlyCombo" );
lbl->setBuddy (m_ro);
m_ro->setCompletionMode( KGlobalSettings::CompletionAuto );
- QObject::connect (m_ro, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_ro, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
+ TQObject::connect (m_ro, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_ro, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
vbox->addWidget (hbox);
// Read-write combobox
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&Editable Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&Editable Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_rw = new KComboBox( true, hbox, "ReadWriteCombo" );
lbl->setBuddy (m_rw);
m_rw->setDuplicatesEnabled( true );
- m_rw->setInsertionPolicy( QComboBox::NoInsertion );
+ m_rw->setInsertionPolicy( TQComboBox::NoInsertion );
m_rw->setTrapReturnKey( true );
- QObject::connect (m_rw, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_rw, SIGNAL(activated(const QString&)), SLOT(slotActivated(const QString&)));
- QObject::connect (m_rw, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
- QObject::connect (m_rw, SIGNAL(returnPressed(const QString&)), SLOT(slotReturnPressed(const QString&)));
+ TQObject::connect (m_rw, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_rw, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&)));
+ TQObject::connect (m_rw, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
+ TQObject::connect (m_rw, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(slotReturnPressed(const TQString&)));
vbox->addWidget (hbox);
// History combobox...
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&History Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&History Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_hc = new KHistoryCombo( true, hbox, "HistoryCombo" );
lbl->setBuddy (m_hc);
m_hc->setDuplicatesEnabled( true );
- m_hc->setInsertionPolicy( QComboBox::NoInsertion );
- QObject::connect (m_hc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_hc, SIGNAL(activated(const QString&)), SLOT(slotActivated(const QString&)));
- QObject::connect (m_hc, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
+ m_hc->setInsertionPolicy( TQComboBox::NoInsertion );
+ TQObject::connect (m_hc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_hc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&)));
+ TQObject::connect (m_hc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
vbox->addWidget (hbox);
m_hc->setTrapReturnKey(true);
// Read-write combobox that is a replica of code in konqueror...
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel( "&Konq's Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel( "&Konq's Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_konqc = new KComboBox( true, hbox, "KonqyCombo" );
lbl->setBuddy (m_konqc);
m_konqc->setMaxCount( 10 );
- QObject::connect (m_konqc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_konqc, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
- QObject::connect (m_konqc, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
+ TQObject::connect (m_konqc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_konqc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
+ TQObject::connect (m_konqc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
vbox->addWidget (hbox);
// Create an exit button
- hbox = new QHBox (this);
- m_btnExit = new QPushButton( "E&xit", hbox );
- QObject::connect( m_btnExit, SIGNAL(clicked()), SLOT(quitApp()) );
+ hbox = new TQHBox (this);
+ m_btnExit = new TQPushButton( "E&xit", hbox );
+ TQObject::connect( m_btnExit, TQT_SIGNAL(clicked()), TQT_SLOT(quitApp()) );
// Create a disable button...
- m_btnEnable = new QPushButton( "Disa&ble", hbox );
- QObject::connect (m_btnEnable, SIGNAL(clicked()), SLOT(slotDisable()));
+ m_btnEnable = new TQPushButton( "Disa&ble", hbox );
+ TQObject::connect (m_btnEnable, TQT_SIGNAL(clicked()), TQT_SLOT(slotDisable()));
vbox->addWidget (hbox);
// Popuplate the select-only list box
- QStringList list;
+ TQStringList list;
list << "Stone" << "Tree" << "Peables" << "Ocean" << "Sand" << "Chips"
<< "Computer" << "Mankind";
list.sort();
@@ -145,12 +145,12 @@ KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
s_pCompletion->setCompletionMode( KGlobalSettings::completionMode() );
m_konqc->setCompletionObject( s_pCompletion );
- QPixmap pix = SmallIcon("www");
+ TQPixmap pix = SmallIcon("www");
m_konqc->insertItem( pix, "http://www.kde.org" );
m_konqc->setCurrentItem( m_konqc->count()-1 );
- m_timer = new QTimer (this);
- connect (m_timer, SIGNAL (timeout()), SLOT (slotTimeout()));
+ m_timer = new TQTimer (this);
+ connect (m_timer, TQT_SIGNAL (timeout()), TQT_SLOT (slotTimeout()));
}
KComboBoxTest::~KComboBoxTest()
@@ -195,7 +195,7 @@ void KComboBoxTest::slotActivated( int index )
kdDebug() << "Activated Combo: " << sender()->name() << ", index:" << index << endl;
}
-void KComboBoxTest::slotActivated (const QString& item)
+void KComboBoxTest::slotActivated (const TQString& item)
{
kdDebug() << "Activated Combo: " << sender()->name() << ", item: " << item << endl;
}
@@ -205,7 +205,7 @@ void KComboBoxTest::slotReturnPressed ()
kdDebug() << "Return Pressed: " << sender()->name() << endl;
}
-void KComboBoxTest::slotReturnPressed(const QString& item)
+void KComboBoxTest::slotReturnPressed(const TQString& item)
{
kdDebug() << "Return Pressed, value = " << item << endl;
}
diff --git a/kdeui/tests/kcomboboxtest.h b/kdeui/tests/kcomboboxtest.h
index 8c2a463b6..3321b7f43 100644
--- a/kdeui/tests/kcomboboxtest.h
+++ b/kdeui/tests/kcomboboxtest.h
@@ -1,7 +1,7 @@
#ifndef _KCOMBOBOXTEST_H
#define _KCOMBOBOXTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QTimer;
class QComboBox;
@@ -14,7 +14,7 @@ class KComboBoxTest : public QWidget
Q_OBJECT
public:
- KComboBoxTest ( QWidget *parent=0, const char *name=0 );
+ KComboBoxTest ( TQWidget *parent=0, const char *name=0 );
~KComboBoxTest();
private slots:
@@ -22,12 +22,12 @@ private slots:
void slotTimeout();
void slotDisable();
void slotReturnPressed();
- void slotReturnPressed(const QString&);
+ void slotReturnPressed(const TQString&);
void slotActivated( int );
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
protected:
- QComboBox* m_qc;
+ TQComboBox* m_qc;
KComboBox* m_ro;
KComboBox* m_rw;
@@ -35,10 +35,10 @@ protected:
KComboBox* m_konqc;
- QPushButton* m_btnExit;
- QPushButton* m_btnEnable;
+ TQPushButton* m_btnExit;
+ TQPushButton* m_btnEnable;
- QTimer* m_timer;
+ TQTimer* m_timer;
};
#endif
diff --git a/kdeui/tests/kcompletiontest.cpp b/kdeui/tests/kcompletiontest.cpp
index e04fdfc22..a0eba1bfd 100644
--- a/kdeui/tests/kcompletiontest.cpp
+++ b/kdeui/tests/kcompletiontest.cpp
@@ -9,14 +9,14 @@
****************************************************************************/
#include "kcompletiontest.h"
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -25,23 +25,23 @@
* Constructs a Form1 which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-Form1::Form1( QWidget* parent, const char* name )
- : QWidget( parent, name, WDestructiveClose )
+Form1::Form1( TQWidget* parent, const char* name )
+ : TQWidget( parent, name, WDestructiveClose )
{
if ( !name )
setName( "Form1" );
resize( 559, 465 );
setCaption( "Form1" );
- Form1Layout = new QVBoxLayout( this );
+ Form1Layout = new TQVBoxLayout( this );
Form1Layout->setSpacing( 6 );
Form1Layout->setMargin( 11 );
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
+ GroupBox1 = new TQGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( "Completion Test" );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 0 );
GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() );
+ GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setMargin( 11 );
@@ -54,7 +54,7 @@ Form1::Form1( QWidget* parent, const char* name )
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
- TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
+ TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );
TextLabel1->setText( "Completion" );
Layout1->addWidget( TextLabel1 );
@@ -64,7 +64,7 @@ Form1::Form1( QWidget* parent, const char* name )
edit->completionObject()->setItems( defaultItems() );
edit->completionObject()->setIgnoreCase( true );
edit->setFocus();
- QToolTip::add( edit, "right-click to change completion mode" );
+ TQToolTip::add( edit, "right-click to change completion mode" );
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 6 );
@@ -74,29 +74,29 @@ Form1::Form1( QWidget* parent, const char* name )
combo->setCompletionObject( edit->completionObject() );
// combo->setMaxCount( 5 );
combo->setHistoryItems( defaultItems(), true );
- connect( combo, SIGNAL( activated( const QString& )),
- combo, SLOT( addToHistory( const QString& )));
- QToolTip::add( combo, "KHistoryCombo" );
+ connect( combo, TQT_SIGNAL( activated( const TQString& )),
+ combo, TQT_SLOT( addToHistory( const TQString& )));
+ TQToolTip::add( combo, "KHistoryCombo" );
Layout2->addWidget( combo );
LineEdit1 = new KLineEdit( GroupBox1, "LineEdit1" );
Layout2->addWidget( LineEdit1 );
- PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
+ PushButton1 = new TQPushButton( GroupBox1, "PushButton1" );
PushButton1->setText( "Add" );
- connect( PushButton1, SIGNAL( clicked() ), SLOT( slotAdd() ));
+ connect( PushButton1, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ));
Layout2->addWidget( PushButton1 );
Layout9->addLayout( Layout2 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout3->addItem( spacer );
- PushButton1_4 = new QPushButton( GroupBox1, "PushButton1_4" );
+ PushButton1_4 = new TQPushButton( GroupBox1, "PushButton1_4" );
PushButton1_4->setText( "Remove" );
- connect( PushButton1_4, SIGNAL( clicked() ), SLOT( slotRemove() ));
+ connect( PushButton1_4, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ));
Layout3->addWidget( PushButton1_4 );
Layout9->addLayout( Layout3 );
@@ -104,25 +104,25 @@ Form1::Form1( QWidget* parent, const char* name )
Layout8->setSpacing( 6 );
Layout8->setMargin( 0 );
- ListBox1 = new QListBox( GroupBox1, "ListBox1" );
+ ListBox1 = new TQListBox( GroupBox1, "ListBox1" );
Layout8->addWidget( ListBox1 );
- connect( ListBox1, SIGNAL( highlighted( const QString& )),
- SLOT( slotHighlighted( const QString& )));
- QToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
+ connect( ListBox1, TQT_SIGNAL( highlighted( const TQString& )),
+ TQT_SLOT( slotHighlighted( const TQString& )));
+ TQToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
Layout7 = new QVBoxLayout;
Layout7->setSpacing( 6 );
Layout7->setMargin( 0 );
- PushButton1_3 = new QPushButton( GroupBox1, "PushButton1_3" );
+ PushButton1_3 = new TQPushButton( GroupBox1, "PushButton1_3" );
PushButton1_3->setText( "Completion items" );
- connect( PushButton1_3, SIGNAL( clicked() ), SLOT( slotList() ));
+ connect( PushButton1_3, TQT_SIGNAL( clicked() ), TQT_SLOT( slotList() ));
Layout7->addWidget( PushButton1_3 );
- PushButton1_2 = new QPushButton( GroupBox1, "PushButton1_2" );
+ PushButton1_2 = new TQPushButton( GroupBox1, "PushButton1_2" );
PushButton1_2->setText( "Clear" );
- connect( PushButton1_2, SIGNAL( clicked() ),
- edit->completionObject(), SLOT( clear() ));
+ connect( PushButton1_2, TQT_SIGNAL( clicked() ),
+ edit->completionObject(), TQT_SLOT( clear() ));
Layout7->addWidget( PushButton1_2 );
Layout8->addLayout( Layout7 );
Layout9->addLayout( Layout8 );
@@ -145,8 +145,8 @@ void Form1::slotAdd()
qDebug("** adding: %s", LineEdit1->text().latin1() );
edit->completionObject()->addItem( LineEdit1->text() );
- QStringList matches = edit->completionObject()->allMatches("S");
- QStringList::ConstIterator it = matches.begin();
+ TQStringList matches = edit->completionObject()->allMatches("S");
+ TQStringList::ConstIterator it = matches.begin();
for ( ; it != matches.end(); ++it )
qDebug("-- %s", (*it).latin1());
}
@@ -159,11 +159,11 @@ void Form1::slotRemove()
void Form1::slotList()
{
ListBox1->clear();
- QStringList items = edit->completionObject()->items();
+ TQStringList items = edit->completionObject()->items();
ListBox1->insertStringList( items );
}
-void Form1::slotHighlighted( const QString& text )
+void Form1::slotHighlighted( const TQString& text )
{
// remove any "weighting"
int index = text.findRev( ':' );
@@ -174,9 +174,9 @@ void Form1::slotHighlighted( const QString& text )
}
-QStringList Form1::defaultItems() const
+TQStringList Form1::defaultItems() const
{
- QStringList items;
+ TQStringList items;
items << "Super" << "Sushi" << "Samson" << "Sucks" << "Sumo" << "Schumi";
items << "Slashdot" << "sUpEr" << "SUshi" << "sUshi" << "sUShi";
items << "sushI" << "SushI";
diff --git a/kdeui/tests/kcompletiontest.h b/kdeui/tests/kcompletiontest.h
index e2f5a2bee..f40a6292d 100644
--- a/kdeui/tests/kcompletiontest.h
+++ b/kdeui/tests/kcompletiontest.h
@@ -9,9 +9,9 @@
#ifndef FORM1_H
#define FORM1_H
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
@@ -30,17 +30,17 @@ class Form1 : public QWidget
Q_OBJECT
public:
- Form1( QWidget* parent = 0, const char* name = 0 );
+ Form1( TQWidget* parent = 0, const char* name = 0 );
~Form1();
- QGroupBox* GroupBox1;
- QLabel* TextLabel1;
+ TQGroupBox* GroupBox1;
+ TQLabel* TextLabel1;
KLineEdit* LineEdit1;
- QPushButton* PushButton1;
- QPushButton* PushButton1_4;
- QListBox* ListBox1;
- QPushButton* PushButton1_3;
- QPushButton* PushButton1_2;
+ TQPushButton* PushButton1;
+ TQPushButton* PushButton1_4;
+ TQListBox* ListBox1;
+ TQPushButton* PushButton1_3;
+ TQPushButton* PushButton1_2;
KLineEdit* edit;
KHistoryCombo *combo;
@@ -49,19 +49,19 @@ protected slots:
void slotList();
void slotAdd();
void slotRemove();
- void slotHighlighted( const QString& );
+ void slotHighlighted( const TQString& );
protected:
- QStringList defaultItems() const;
+ TQStringList defaultItems() const;
- QVBoxLayout* Form1Layout;
- QVBoxLayout* GroupBox1Layout;
- QVBoxLayout* Layout9;
- QHBoxLayout* Layout1;
- QHBoxLayout* Layout2;
- QHBoxLayout* Layout3;
- QHBoxLayout* Layout8;
- QVBoxLayout* Layout7;
+ TQVBoxLayout* Form1Layout;
+ TQVBoxLayout* GroupBox1Layout;
+ TQVBoxLayout* Layout9;
+ TQHBoxLayout* Layout1;
+ TQHBoxLayout* Layout2;
+ TQHBoxLayout* Layout3;
+ TQHBoxLayout* Layout8;
+ TQVBoxLayout* Layout7;
};
#endif // FORM1_H
diff --git a/kdeui/tests/kdatepicktest.cpp b/kdeui/tests/kdatepicktest.cpp
index eeef5945f..c982dbe91 100644
--- a/kdeui/tests/kdatepicktest.cpp
+++ b/kdeui/tests/kdatepicktest.cpp
@@ -1,5 +1,5 @@
#include "kdatepicker.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klocale.h>
diff --git a/kdeui/tests/kdatewidgettest.cpp b/kdeui/tests/kdatewidgettest.cpp
index d58037960..8550ab363 100644
--- a/kdeui/tests/kdatewidgettest.cpp
+++ b/kdeui/tests/kdatewidgettest.cpp
@@ -1,5 +1,5 @@
#include "kdatewidget.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klocale.h>
diff --git a/kdeui/tests/kdesattest.cpp b/kdeui/tests/kdesattest.cpp
index 803e2e0ee..28f7d4cf2 100644
--- a/kdeui/tests/kdesattest.cpp
+++ b/kdeui/tests/kdesattest.cpp
@@ -1,21 +1,21 @@
#include "kdesattest.h"
#include <kapplication.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-KDesatWidget::KDesatWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KDesatWidget::KDesatWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
slide = new KDoubleNumInput(700, this, "desat");
slide->setRange(0, 1, 0.001);
slide->setLabel("Desaturate: ", AlignVCenter | AlignLeft);
- connect(slide,SIGNAL(valueChanged(double)), this, SLOT(change(double)));
+ connect(slide,TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(change(double)));
resize(image.width()*2, image.height() + slide->height());
slide->setGeometry(0, image.height(), image.width()*2, slide->height());
@@ -26,19 +26,19 @@ void KDesatWidget::change(double) {
repaint(false);
}
-void KDesatWidget::paintEvent(QPaintEvent */*ev*/)
+void KDesatWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::black);
// original image
time.start();
it = time.elapsed();
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
p.drawImage(0, 0, image);
ft = time.elapsed();
say.setNum( ft - it); say += " ms, Vertical";
diff --git a/kdeui/tests/kdesattest.h b/kdeui/tests/kdesattest.h
index 71a51c0be..67329d578 100644
--- a/kdeui/tests/kdesattest.h
+++ b/kdeui/tests/kdesattest.h
@@ -7,24 +7,24 @@
#ifndef __KBLEND_TEST_H
#define __KBLEND_TEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <knuminput.h>
class KDesatWidget : public QWidget
{
Q_OBJECT
public:
- KDesatWidget(QWidget *parent=0, const char *name=0);
+ KDesatWidget(TQWidget *parent=0, const char *name=0);
public slots:
void change(double);
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
float desat_value;
- QImage image;
+ TQImage image;
KDoubleNumInput *slide;
};
diff --git a/kdeui/tests/kdialogbasetest.cpp b/kdeui/tests/kdialogbasetest.cpp
index 998e10d02..5e62115fa 100644
--- a/kdeui/tests/kdialogbasetest.cpp
+++ b/kdeui/tests/kdialogbasetest.cpp
@@ -1,14 +1,14 @@
#include <kapplication.h>
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qtextview.h>
+#include <tqstring.h>
+#include <tqtextview.h>
int main(int argc, char** argv)
{
KApplication app(argc, argv, "DialogBaseTest");
// -----
- QString text= // the explanation shown by the example dialog
+ TQString text= // the explanation shown by the example dialog
"<center><h1>DialogBase Example</h1></center><hr><br>"
"This example shows the usage of the <i>DialogBase</i> class. "
"<i>DialogBase</i> is the KDE user interface class used to create "
@@ -34,7 +34,7 @@ int main(int argc, char** argv)
"not have to take care about launching the help viewer, just set the "
"help file and topic and of course copy it to your documentation "
"directory during the program installation.";
- /* Create the dialog object. DialogBase is derived from QDialog, but
+ /* Create the dialog object. DialogBase is derived from TQDialog, but
you do not need to derive it to create a nice-looking dialog. Mostly,
you already have a widget class representing the core of your dialog,
and you only need to add a frame around it and the default buttons.
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
"will of course only pop up if you correctly installed kdebase. */
// I disabled it, as khcclient did not run for me.
// dialog.setHelp("kdehelp/intro.html", "", "");
- /* This QTextView is intended to be the main widget of our dialog. The
+ /* This TQTextView is intended to be the main widget of our dialog. The
main widget is placed inside the dialogs frame, with the buttons below
it. You do not have to take care about the size handling, but it is a
good idea to set the main wigdets minimum size, since the sizes Qt and
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
It is important that your main widget is created with the dialog object
as its parent! */
- QTextView view(text, QString::null, &dialog);
+ TQTextView view(text, TQString::null, &dialog);
//view.setMinimumSize(400, view.heightForWidth(400)+20);
view.setMinimumSize( 250, 300 );
dialog.setMainWidget(&view);
@@ -65,7 +65,7 @@ int main(int argc, char** argv)
help chapter may cause a need for adjustment since it modifies the height
of the upper frame. */
dialog.resize(dialog.minimumSize());
- /* The dialog object is used just as any other QDialog: */
+ /* The dialog object is used just as any other TQDialog: */
if(dialog.exec())
{
qDebug("Accepted.");
diff --git a/kdeui/tests/kdocktest.cpp b/kdeui/tests/kdocktest.cpp
index c6df63ddb..84895c414 100644
--- a/kdeui/tests/kdocktest.cpp
+++ b/kdeui/tests/kdocktest.cpp
@@ -3,10 +3,10 @@
#include <kapplication.h>
#include <kiconloader.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
-DockTest::DockTest( QWidget* parent )
+DockTest::DockTest( TQWidget* parent )
: KDockArea( parent )
{
m_blueDock = createDockWidget( "Blue Widget", SmallIcon("mail") );
@@ -17,7 +17,7 @@ DockTest::DockTest( QWidget* parent )
m_blueDock->setHeader( header );
m_blueDock->setCaption( "Blue" );
m_blueDock->setGeometry( 50, 50, 100, 100 );
- QWidget *l = new QWidget( m_blueDock );
+ TQWidget *l = new TQWidget( m_blueDock );
l->setBackgroundColor( Qt::blue );
l->setMinimumSize( 100,100 );
m_blueDock->setWidget( l );
@@ -31,7 +31,7 @@ DockTest::DockTest( QWidget* parent )
m_redDock->setHeader( header );
m_redDock->setCaption( "Red" );
m_redDock->setGeometry( 50, 50, 100, 100 );
- l = new QWidget( m_redDock );
+ l = new TQWidget( m_redDock );
l->setBackgroundColor( Qt::red );
l->setMinimumSize( 100,100 );
m_redDock->setWidget( l );
@@ -44,7 +44,7 @@ DockTest::DockTest( QWidget* parent )
// m_yellowDock->setHeader( header );
m_yellowDock->setCaption( "Yellow" );
m_yellowDock->setGeometry( 50, 50, 100, 100 );
- l = new QWidget( m_yellowDock );
+ l = new TQWidget( m_yellowDock );
l->setBackgroundColor( Qt::yellow );
l->setMinimumSize( 100,100 );
m_yellowDock->setWidget( l );
diff --git a/kdeui/tests/kdocktest.h b/kdeui/tests/kdocktest.h
index 906e3bd22..6efbeed57 100644
--- a/kdeui/tests/kdocktest.h
+++ b/kdeui/tests/kdocktest.h
@@ -8,7 +8,7 @@ class DockTest : public KDockArea
{
Q_OBJECT
public:
- DockTest( QWidget* parent=0 );
+ DockTest( TQWidget* parent=0 );
private:
KDockWidget* m_blueDock;
diff --git a/kdeui/tests/kdockwidgetdemo.cpp b/kdeui/tests/kdockwidgetdemo.cpp
index e0ff60897..15b83d14e 100644
--- a/kdeui/tests/kdockwidgetdemo.cpp
+++ b/kdeui/tests/kdockwidgetdemo.cpp
@@ -1,23 +1,23 @@
#include "kdockwidgetdemo.h"
-#include <qheader.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qtextview.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qevent.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qpoint.h>
-#include <qmessagebox.h>
-#include <qmime.h>
-#include <qstrlist.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqtextview.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqevent.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqpoint.h>
+#include <tqmessagebox.h>
+#include <tqmime.h>
+#include <tqstrlist.h>
+#include <tqpainter.h>
#include <kconfig.h>
#include <kapplication.h>
@@ -78,21 +78,21 @@ static const char *preview_xpm[] = {
"OOOOOOOOOOOOOOOO"
};
-SFileDialog::SFileDialog( QString initially, const QStringList& filter, const char* name )
-:QDialog(0L,name,true)
+SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name )
+:TQDialog(0L,name,true)
{
KConfig* config = kapp->config();
- config->setGroup( QString::fromLatin1("SFileDialogData:") + name );
+ config->setGroup( TQString::fromLatin1("SFileDialogData:") + name );
if ( initially.isNull() ){
- initially = config->readPathEntry( "InitiallyDir", QDir::currentDirPath() );
+ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() );
}
- QStringList bookmark;
+ TQStringList bookmark;
bookmark = config->readListEntry( "Bookmarks" );
dockManager = new KDockManager(this);
- d_dirView = new KDockWidget( dockManager, "Dock_DirView", QPixmap(dir_tree_xpm) );
+ d_dirView = new KDockWidget( dockManager, "Dock_DirView", TQPixmap(dir_tree_xpm) );
d_dirView->setCaption("Tree");
dirView = new DirectoryView( d_dirView, 0 );
@@ -103,21 +103,21 @@ SFileDialog::SFileDialog( QString initially, const QStringList& filter, const ch
Directory* root = new Directory( dirView, "/" );
root->setOpen(true);
- d_preview = new KDockWidget( dockManager, "Dock_Preview", QPixmap(preview_xpm) );
+ d_preview = new KDockWidget( dockManager, "Dock_Preview", TQPixmap(preview_xpm) );
d_preview->setCaption("Preview");
preview = new Preview( d_preview );
d_preview->setWidget( preview );
- d_fd = new KDockWidget( dockManager, "Dock_QFileDialog", QPixmap(), this );
+ d_fd = new KDockWidget( dockManager, "Dock_QFileDialog", TQPixmap(), this );
fd = new CustomFileDialog( d_fd );
fd->setDir( initially );
fd->setFilters( filter );
fd->setBookmark( bookmark );
- fd->reparent(d_fd, QPoint(0,0));
+ fd->reparent(d_fd, TQPoint(0,0));
d_fd->setWidget( fd );
- connect( dirView, SIGNAL( folderSelected( const QString & ) ), fd, SLOT( setDir2( const QString & ) ) );
- connect( fd, SIGNAL( dirEntered( const QString & ) ), dirView, SLOT( setDir( const QString & ) ) );
+ connect( dirView, TQT_SIGNAL( folderSelected( const TQString & ) ), fd, TQT_SLOT( setDir2( const TQString & ) ) );
+ connect( fd, TQT_SIGNAL( dirEntered( const TQString & ) ), dirView, TQT_SLOT( setDir( const TQString & ) ) );
d_fd->setDockSite( KDockWidget::DockTop|KDockWidget::DockLeft|KDockWidget::DockRight|KDockWidget::DockBottom );
d_fd->setEnableDocking(KDockWidget::DockNone);
@@ -128,30 +128,30 @@ SFileDialog::SFileDialog( QString initially, const QStringList& filter, const ch
d_dirView->manualDock( d_fd, KDockWidget::DockLeft, 20 );
d_preview->manualDock( d_fd, KDockWidget::DockBottom, 70 );
- connect(fd, SIGNAL(fileHighlighted(const QString&)), preview, SLOT(showPreview(const QString&)));
- connect(fd, SIGNAL(signalDone(int)), this, SLOT(done(int)));
+ connect(fd, TQT_SIGNAL(fileHighlighted(const TQString&)), preview, TQT_SLOT(showPreview(const TQString&)));
+ connect(fd, TQT_SIGNAL(signalDone(int)), this, TQT_SLOT(done(int)));
- connect(fd, SIGNAL(dirEntered(const QString&)), this, SLOT(changeDir(const QString&)));
- connect(dirView, SIGNAL(folderSelected(const QString&)), this, SLOT(changeDir(const QString&)));
+ connect(fd, TQT_SIGNAL(dirEntered(const TQString&)), this, TQT_SLOT(changeDir(const TQString&)));
+ connect(dirView, TQT_SIGNAL(folderSelected(const TQString&)), this, TQT_SLOT(changeDir(const TQString&)));
- b_tree = new QToolButton( fd );
- QToolTip::add( b_tree, "Show/Hide Tree" );
- b_tree->setPixmap( QPixmap( dir_tree_xpm ) );
- connect( b_tree, SIGNAL(clicked()), d_dirView, SLOT(changeHideShowState()) );
+ b_tree = new TQToolButton( fd );
+ TQToolTip::add( b_tree, "Show/Hide Tree" );
+ b_tree->setPixmap( TQPixmap( dir_tree_xpm ) );
+ connect( b_tree, TQT_SIGNAL(clicked()), d_dirView, TQT_SLOT(changeHideShowState()) );
b_tree->setToggleButton(true);
b_tree->setOn(true);
fd->addToolButton( b_tree, true );
- b_preview = new QToolButton( fd );
- QToolTip::add( b_preview, "Show/Hide Preview" );
- b_preview->setPixmap( QPixmap( preview_xpm ) );
- connect( b_preview, SIGNAL(clicked()), d_preview, SLOT(changeHideShowState()) );
+ b_preview = new TQToolButton( fd );
+ TQToolTip::add( b_preview, "Show/Hide Preview" );
+ b_preview->setPixmap( TQPixmap( preview_xpm ) );
+ connect( b_preview, TQT_SIGNAL(clicked()), d_preview, TQT_SLOT(changeHideShowState()) );
b_preview->setToggleButton(true);
b_preview->setOn(true);
fd->addToolButton( b_preview );
- connect( dockManager, SIGNAL(change()), this, SLOT(dockChange()));
- connect( dockManager, SIGNAL(setDockDefaultPos(KDockWidget*)), this, SLOT(setDockDefaultPos(KDockWidget*)));
+ connect( dockManager, TQT_SIGNAL(change()), this, TQT_SLOT(dockChange()));
+ connect( dockManager, TQT_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQT_SLOT(setDockDefaultPos(KDockWidget*)));
setCaption("Open File");
resize(550,450);
qDebug("read config");
@@ -167,7 +167,7 @@ void SFileDialog::dockChange()
SFileDialog::~SFileDialog()
{
KConfig* config = kapp->config();
- config->setGroup( QString("SFileDialogData:") + name() );
+ config->setGroup( TQString("SFileDialogData:") + name() );
config->writeEntry( "Bookmarks", fd->getBookmark() );
qDebug("write config");
@@ -185,103 +185,103 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d )
}
}
-void SFileDialog::changeDir( const QString& f )
+void SFileDialog::changeDir( const TQString& f )
{
if ( !f.isEmpty() ){
KConfig* config = kapp->config();
- config->setGroup( QString("SFileDialogData:") + name() );
+ config->setGroup( TQString("SFileDialogData:") + name() );
config->writePathEntry( "InitiallyDir", f );
}
}
-QString SFileDialog::getOpenFileName( QString initially,
- const QStringList& filter,
- const QString caption, const char* name )
+TQString SFileDialog::getOpenFileName( TQString initially,
+ const TQStringList& filter,
+ const TQString caption, const char* name )
{
SFileDialog* fd = new SFileDialog( initially, filter, name );
if ( !caption.isNull() ) fd->setCaption( caption );
- QString result = ( fd->exec() == QDialog::Accepted ) ? fd->fd->selectedFile():QString::null;
+ TQString result = ( fd->exec() == TQDialog::Accepted ) ? fd->fd->selectedFile():TQString::null;
delete fd;
return result;
}
-QStringList SFileDialog::getOpenFileNames( QString initially,
- const QStringList& filter,
- const QString caption, const char* name )
+TQStringList SFileDialog::getOpenFileNames( TQString initially,
+ const TQStringList& filter,
+ const TQString caption, const char* name )
{
SFileDialog* fd = new SFileDialog( initially, filter, name );
if ( !caption.isNull() ) fd->setCaption( caption );
- fd->fd->setMode( QFileDialog::ExistingFiles );
+ fd->fd->setMode( TQFileDialog::ExistingFiles );
fd->d_preview->undock();
fd->b_preview->hide();
fd->exec();
- QStringList result = fd->fd->selectedFiles();
+ TQStringList result = fd->fd->selectedFiles();
delete fd;
return result;
}
-void SFileDialog::showEvent( QShowEvent *e )
+void SFileDialog::showEvent( TQShowEvent *e )
{
- QDialog::showEvent( e );
+ TQDialog::showEvent( e );
dirView->setDir( fd->dirPath() );
}
/******************************************************************************************************/
-PixmapView::PixmapView( QWidget *parent )
-:QScrollView( parent )
+PixmapView::PixmapView( TQWidget *parent )
+:TQScrollView( parent )
{
// kimgioRegister();
viewport()->setBackgroundMode( PaletteBase );
}
-void PixmapView::setPixmap( const QPixmap &pix )
+void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
viewport()->repaint( true );
}
-void PixmapView::drawContents( QPainter *p, int, int, int, int )
+void PixmapView::drawContents( TQPainter *p, int, int, int, int )
{
p->drawPixmap( 0, 0, pixmap );
}
-Preview::Preview( QWidget *parent )
-:QWidgetStack( parent )
+Preview::Preview( TQWidget *parent )
+:TQWidgetStack( parent )
{
- normalText = new QMultiLineEdit( this );
+ normalText = new TQMultiLineEdit( this );
normalText->setReadOnly( true );
- html = new QTextView( this );
+ html = new TQTextView( this );
pixmap = new PixmapView( this );
raiseWidget( normalText );
}
-void Preview::showPreview( const QString &str )
+void Preview::showPreview( const TQString &str )
{
- QUrl u(str);
+ TQUrl u(str);
if ( u.isLocalFile() ){
- QString path = u.path();
- QFileInfo fi( path );
+ TQString path = u.path();
+ TQFileInfo fi( path );
if ( fi.isFile() && (int)fi.size() > 400 * 1024 ) {
normalText->setText( tr( "The File\n%1\nis too large, so I don't show it!" ).arg( path ) );
raiseWidget( normalText );
return;
}
- QPixmap pix( path );
+ TQPixmap pix( path );
if ( pix.isNull() ) {
if ( fi.isFile() ) {
- QFile f( path );
+ TQFile f( path );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
- QString text = ts.read();
+ TQTextStream ts( &f );
+ TQString text = ts.read();
f.close();
if ( fi.extension().lower().contains( "htm" ) ) {
- QString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() );
+ TQString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() );
html->setText( text, url );
raiseWidget( html );
return;
@@ -292,7 +292,7 @@ void Preview::showPreview( const QString &str )
}
}
}
- normalText->setText( QString::null );
+ normalText->setText( TQString::null );
raiseWidget( normalText );
} else {
pixmap->setPixmap( pix );
@@ -394,37 +394,37 @@ static const char* globalbookmark_xpm[]={
"............",
"............"};
-CustomFileDialog::CustomFileDialog( QWidget* parent )
-: QFileDialog( parent, 0, false )
+CustomFileDialog::CustomFileDialog( TQWidget* parent )
+: TQFileDialog( parent, 0, false )
{
- QToolButton *p = new QToolButton( this );
+ TQToolButton *p = new TQToolButton( this );
- p->setPixmap( QPixmap( globalbookmark_xpm ) );
- QToolTip::add( p, tr( "Bookmarks" ) );
+ p->setPixmap( TQPixmap( globalbookmark_xpm ) );
+ TQToolTip::add( p, tr( "Bookmarks" ) );
- bookmarkMenu = new QPopupMenu( this );
- connect( bookmarkMenu, SIGNAL( activated( int ) ), this, SLOT( bookmarkChosen( int ) ) );
+ bookmarkMenu = new TQPopupMenu( this );
+ connect( bookmarkMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( bookmarkChosen( int ) ) );
addId = bookmarkMenu->insertItem( "Add bookmark" );
- clearId = bookmarkMenu->insertItem( QPixmap(folder_trash), "Clear bookmarks" );
+ clearId = bookmarkMenu->insertItem( TQPixmap(folder_trash), "Clear bookmarks" );
bookmarkMenu->insertSeparator();
p->setPopup( bookmarkMenu );
p->setPopupDelay(0);
addToolButton( p, true );
- QToolButton *b = new QToolButton( this );
- QToolTip::add( b, tr( "Go Home!" ) );
+ TQToolButton *b = new TQToolButton( this );
+ TQToolTip::add( b, tr( "Go Home!" ) );
- b->setPixmap( QPixmap( homepage_xpm ) );
- connect( b, SIGNAL( clicked() ), this, SLOT( goHome() ) );
+ b->setPixmap( TQPixmap( homepage_xpm ) );
+ connect( b, TQT_SIGNAL( clicked() ), this, TQT_SLOT( goHome() ) );
addToolButton( b );
}
-void CustomFileDialog::setBookmark( QStringList &s )
+void CustomFileDialog::setBookmark( TQStringList &s )
{
- QStringList::Iterator it = s.begin();
+ TQStringList::Iterator it = s.begin();
for ( ; it != s.end(); ++it ){
bookmarkList << (*it);
@@ -449,7 +449,7 @@ void CustomFileDialog::setBookmark( QStringList &s )
"............",
"............",
"............"};
- bookmarkMenu->insertItem( QIconSet( book_pix ), (*it) );
+ bookmarkMenu->insertItem( TQIconSet( book_pix ), (*it) );
}
}
@@ -457,7 +457,7 @@ CustomFileDialog::~CustomFileDialog()
{
}
-void CustomFileDialog::setDir2( const QString &s )
+void CustomFileDialog::setDir2( const TQString &s )
{
blockSignals( true );
setDir( s );
@@ -499,7 +499,7 @@ void CustomFileDialog::bookmarkChosen( int i )
"............",
"............",
"............"};
- bookmarkMenu->insertItem( QIconSet( book_pix ), dirPath() );
+ bookmarkMenu->insertItem( TQIconSet( book_pix ), dirPath() );
return;
}
@@ -606,37 +606,37 @@ static const char* folder_locked_xpm[] = {
"################"
};
-Directory::Directory( Directory * parent, const QString& filename )
-:QListViewItem( parent ), f(filename)
+Directory::Directory( Directory * parent, const TQString& filename )
+:TQListViewItem( parent ), f(filename)
{
p = parent;
- readable = QDir( fullName() ).isReadable();
+ readable = TQDir( fullName() ).isReadable();
if ( !readable )
- setPixmap( 0, QPixmap( folder_locked_xpm ) );
+ setPixmap( 0, TQPixmap( folder_locked_xpm ) );
else
- setPixmap( 0, QPixmap( folder_closed_xpm ) );
+ setPixmap( 0, TQPixmap( folder_closed_xpm ) );
}
-Directory::Directory( QListView * parent, const QString& filename )
-:QListViewItem( parent ), f(filename)
+Directory::Directory( TQListView * parent, const TQString& filename )
+:TQListViewItem( parent ), f(filename)
{
p = 0;
- readable = QDir( fullName() ).isReadable();
+ readable = TQDir( fullName() ).isReadable();
}
void Directory::setOpen( bool o )
{
if ( o )
- setPixmap( 0, QPixmap( folder_open_xpm ) );
+ setPixmap( 0, TQPixmap( folder_open_xpm ) );
else
- setPixmap( 0, QPixmap( folder_closed_xpm ) );
+ setPixmap( 0, TQPixmap( folder_closed_xpm ) );
if ( o && !childCount() ){
- QString s( fullName() );
- QDir thisDir( s );
+ TQString s( fullName() );
+ TQDir thisDir( s );
if ( !thisDir.isReadable() ) {
readable = false;
setExpandable( false );
@@ -647,7 +647,7 @@ void Directory::setOpen( bool o )
const QFileInfoList * files = thisDir.entryInfoList();
if ( files ){
QFileInfoListIterator it( *files );
- QFileInfo * f;
+ TQFileInfo * f;
while( (f=it.current()) != 0 ){
++it;
if ( f->fileName() != "." && f->fileName() != ".." && f->isDir() )
@@ -656,20 +656,20 @@ void Directory::setOpen( bool o )
}
listView()->setUpdatesEnabled( true );
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
void Directory::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
-QString Directory::fullName()
+TQString Directory::fullName()
{
- QString s;
+ TQString s;
if ( p ) {
s = p->fullName();
s.append( f.name() );
@@ -681,7 +681,7 @@ QString Directory::fullName()
}
-QString Directory::text( int column ) const
+TQString Directory::text( int column ) const
{
if ( column == 0 )
return f.name();
@@ -692,28 +692,28 @@ QString Directory::text( int column ) const
return "Unreadable Directory";
}
-DirectoryView::DirectoryView( QWidget *parent, const char *name )
-:QListView( parent, name )
+DirectoryView::DirectoryView( TQWidget *parent, const char *name )
+:TQListView( parent, name )
{
- connect( this, SIGNAL( clicked( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
- connect( this, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
setAcceptDrops( true );
viewport()->setAcceptDrops( true );
}
-void DirectoryView::setOpen( QListViewItem* i, bool b )
+void DirectoryView::setOpen( TQListViewItem* i, bool b )
{
- QListView::setOpen(i,b);
+ TQListView::setOpen(i,b);
setCurrentItem(i);
slotFolderSelected(i);
}
-void DirectoryView::slotFolderSelected( QListViewItem *i )
+void DirectoryView::slotFolderSelected( TQListViewItem *i )
{
if ( !i ) return;
@@ -721,9 +721,9 @@ void DirectoryView::slotFolderSelected( QListViewItem *i )
emit folderSelected( dir->fullName() );
}
-QString DirectoryView::fullPath(QListViewItem* item)
+TQString DirectoryView::fullPath(TQListViewItem* item)
{
- QString fullpath = item->text(0);
+ TQString fullpath = item->text(0);
while ( (item=item->parent()) ) {
if ( item->parent() )
fullpath = item->text(0) + "/" + fullpath;
@@ -733,17 +733,17 @@ QString DirectoryView::fullPath(QListViewItem* item)
return fullpath;
}
-void DirectoryView::setDir( const QString &s )
+void DirectoryView::setDir( const TQString &s )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
++it;
for ( ; it.current(); ++it ) {
it.current()->setOpen( false );
}
- QStringList lst( QStringList::split( "/", s ) );
- QListViewItem *item = firstChild();
- QStringList::Iterator it2 = lst.begin();
+ TQStringList lst( TQStringList::split( "/", s ) );
+ TQListViewItem *item = firstChild();
+ TQStringList::Iterator it2 = lst.begin();
for ( ; it2 != lst.end(); ++it2 ) {
while ( item ) {
if ( item->text( 0 ) == *it2 ) {
@@ -760,7 +760,7 @@ void DirectoryView::setDir( const QString &s )
}
}
-QString DirectoryView::selectedDir()
+TQString DirectoryView::selectedDir()
{
Directory *dir = (Directory*)currentItem();
return dir->fullName();
@@ -777,14 +777,14 @@ int main(int argc, char* argv[]) {
#endif
#if 0
- qDebug ( SFileDialog::getOpenFileName( QString::null, QString::fromLatin1("All (*)"),
- QString::fromLatin1("DockWidget Demo"), "dialog1" ) );
+ qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"),
+ TQString::fromLatin1("DockWidget Demo"), "dialog1" ) );
#endif
#if 1
- QStringList s = SFileDialog::getOpenFileNames( QString::null, QString::fromLatin1("All (*)"),
- QString::fromLatin1("DockWidget Demo"), "dialog1" );
- QStringList::Iterator it = s.begin();
+ TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::fromLatin1("All (*)"),
+ TQString::fromLatin1("DockWidget Demo"), "dialog1" );
+ TQStringList::Iterator it = s.begin();
for ( ; it != s.end(); ++it ){
qDebug( "%s", (*it).local8Bit().data() );
}
diff --git a/kdeui/tests/kdockwidgetdemo.h b/kdeui/tests/kdockwidgetdemo.h
index e81162eb0..37d31b137 100644
--- a/kdeui/tests/kdockwidgetdemo.h
+++ b/kdeui/tests/kdockwidgetdemo.h
@@ -3,18 +3,18 @@
#include <kdockwidget.h>
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
-#include <qscrollview.h>
-#include <qfiledialog.h>
-#include <qwidgetstack.h>
-#include <qvbox.h>
-#include <qurl.h>
-#include <qpixmap.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
+#include <tqscrollview.h>
+#include <tqfiledialog.h>
+#include <tqwidgetstack.h>
+#include <tqvbox.h>
+#include <tqurl.h>
+#include <tqpixmap.h>
class QMultiLineEdit;
class QTextView;
@@ -32,26 +32,26 @@ class SFileDialog : public QDialog
{Q_OBJECT
public:
- SFileDialog( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )", const char* name = 0 );
+ SFileDialog( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )", const char* name = 0 );
~SFileDialog();
- static QString getOpenFileName( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )",
- const QString caption = QString::null, const char* name = 0 );
+ static TQString getOpenFileName( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )",
+ const TQString caption = TQString::null, const char* name = 0 );
- static QStringList getOpenFileNames( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )",
- const QString caption = QString::null, const char* name = 0 );
+ static TQStringList getOpenFileNames( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )",
+ const TQString caption = TQString::null, const char* name = 0 );
protected:
- void showEvent( QShowEvent *e );
+ void showEvent( TQShowEvent *e );
protected slots:
void dockChange();
void setDockDefaultPos( KDockWidget* );
- void changeDir( const QString& );
+ void changeDir( const TQString& );
private:
DirectoryView* dirView;
@@ -63,25 +63,25 @@ private:
KDockWidget* d_preview;
KDockWidget* d_fd;
- QToolButton *b_tree;
- QToolButton *b_preview;
+ TQToolButton *b_tree;
+ TQToolButton *b_preview;
};
/******************************************************************************************************/
class Directory : public QListViewItem
{
public:
- Directory( QListView * parent, const QString& filename );
- Directory( Directory * parent, const QString& filename );
+ Directory( TQListView * parent, const TQString& filename );
+ Directory( Directory * parent, const TQString& filename );
- QString text( int column ) const;
+ TQString text( int column ) const;
- QString fullName();
+ TQString fullName();
void setOpen( bool );
void setup();
private:
- QFile f;
+ TQFile f;
Directory * p;
bool readable;
};
@@ -89,61 +89,61 @@ private:
class DirectoryView : public QListView
{Q_OBJECT
public:
- DirectoryView( QWidget *parent = 0, const char *name = 0 );
- virtual void setOpen ( QListViewItem *, bool );
+ DirectoryView( TQWidget *parent = 0, const char *name = 0 );
+ virtual void setOpen ( TQListViewItem *, bool );
- QString selectedDir();
+ TQString selectedDir();
public slots:
- void setDir( const QString & );
+ void setDir( const TQString & );
signals:
- void folderSelected( const QString & );
+ void folderSelected( const TQString & );
protected slots:
- void slotFolderSelected( QListViewItem * );
+ void slotFolderSelected( TQListViewItem * );
private:
- QString fullPath(QListViewItem* item);
+ TQString fullPath(TQListViewItem* item);
};
/******************************************************************************************************/
class PixmapView : public QScrollView
{Q_OBJECT
public:
- PixmapView( QWidget *parent );
- void setPixmap( const QPixmap &pix );
- void drawContents( QPainter *p, int, int, int, int );
+ PixmapView( TQWidget *parent );
+ void setPixmap( const TQPixmap &pix );
+ void drawContents( TQPainter *p, int, int, int, int );
private:
- QPixmap pixmap;
+ TQPixmap pixmap;
};
class Preview : public QWidgetStack
{Q_OBJECT
public:
- Preview( QWidget *parent );
+ Preview( TQWidget *parent );
public slots:
- void showPreview( const QString& );
+ void showPreview( const TQString& );
private:
- QMultiLineEdit *normalText;
- QTextView *html;
+ TQMultiLineEdit *normalText;
+ TQTextView *html;
PixmapView *pixmap;
};
class CustomFileDialog : public QFileDialog
{Q_OBJECT
public:
- CustomFileDialog( QWidget* parent );
+ CustomFileDialog( TQWidget* parent );
~CustomFileDialog();
- void addToolButton( QButton * b, bool separator = false ){ QFileDialog::addToolButton(b,separator); }
- void setBookmark( QStringList& );
- QStringList getBookmark(){ return bookmarkList; }
+ void addToolButton( TQButton * b, bool separator = false ){ TQFileDialog::addToolButton(b,separator); }
+ void setBookmark( TQStringList& );
+ TQStringList getBookmark(){ return bookmarkList; }
public slots:
- void setDir2( const QString & );
+ void setDir2( const TQString & );
signals:
void signalDone( int );
@@ -154,8 +154,8 @@ protected slots:
virtual void done( int );
private:
- QPopupMenu *bookmarkMenu;
- QStringList bookmarkList;
+ TQPopupMenu *bookmarkMenu;
+ TQStringList bookmarkList;
int addId, clearId;
};
diff --git a/kdeui/tests/kdockwidgettest.cpp b/kdeui/tests/kdockwidgettest.cpp
index bf1fb272d..08a7e42b3 100644
--- a/kdeui/tests/kdockwidgettest.cpp
+++ b/kdeui/tests/kdockwidgettest.cpp
@@ -14,13 +14,13 @@
#include "kdockwidgettest.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <kstatusbar.h>
#include <kmenubar.h>
#include <ktoolbar.h>
-#include <qvbox.h>
+#include <tqvbox.h>
static const char*folder[]={
"16 16 9 1",
@@ -54,7 +54,7 @@ static const char*folder[]={
DockApplication::DockApplication( const char* name )
: KDockMainWindow( 0L, name )
{
- QPixmap p(folder);
+ TQPixmap p(folder);
initMenuBar();
initToolBars();
@@ -64,7 +64,7 @@ DockApplication::DockApplication( const char* name )
dock = createDockWidget( "Green Widget", p );
dock->setCaption("Green");
dock->setGeometry(50, 50, 100, 100);
- l = new QWidget(dock);
+ l = new TQWidget(dock);
l->setBackgroundColor(green);
l->setMinimumSize(100,100);
dock->setWidget(l);
@@ -75,7 +75,7 @@ DockApplication::DockApplication( const char* name )
setView( dock1 );
setMainDockWidget( dock1 );
- mainW = new QWidget( dock1, "createdOnBlueDock" );
+ mainW = new TQWidget( dock1, "createdOnBlueDock" );
mainW->setBackgroundColor(blue);
mainW->setMinimumSize(300,150);
dock1->setWidget( mainW );
@@ -88,7 +88,7 @@ DockApplication::DockApplication( const char* name )
/* test set new header widget...*/
// dock2->setHeader( new KDockWidgetHeader(dock2) );
- QWidget* l2 = new QWidget(dock2);
+ TQWidget* l2 = new TQWidget(dock2);
l2->setBackgroundColor(yellow);
dock2->setWidget( l2 );
/*****************************************************/
@@ -117,29 +117,29 @@ DockApplication::DockApplication( const char* name )
- QPushButton* b1 = new QPushButton(mainW);
+ TQPushButton* b1 = new TQPushButton(mainW);
b1->setGeometry(10, 10, 250, 25);
b1->setText("write dock config");
- connect(b1, SIGNAL(clicked()), SLOT(wConfig()));
+ connect(b1, TQT_SIGNAL(clicked()), TQT_SLOT(wConfig()));
- QPushButton* b2 = new QPushButton(mainW);
+ TQPushButton* b2 = new TQPushButton(mainW);
b2->setGeometry(10, 35, 250, 25);
b2->setText("read dock config");
- connect(b2, SIGNAL(clicked()), SLOT(rConfig()));
+ connect(b2, TQT_SIGNAL(clicked()), TQT_SLOT(rConfig()));
- m_bname = new QPushButton(mainW);
+ m_bname = new TQPushButton(mainW);
m_bname->setGeometry(10, 60, 250, 25);
m_bname->setEnabled( false );
- QPushButton *b3 = new QPushButton(mainW);
+ TQPushButton *b3 = new TQPushButton(mainW);
b3->setGeometry(10,95,250,25);
b3->setText("change the icon of the green widget");
- connect(b3,SIGNAL(clicked()), SLOT(gSetPix1()));
+ connect(b3,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix1()));
- QPushButton *b4 = new QPushButton(mainW);
+ TQPushButton *b4 = new TQPushButton(mainW);
b4->setGeometry(10,130,250,25);
b4->setText("remove icon ");
- connect(b4,SIGNAL(clicked()), SLOT(gSetPix2()));
+ connect(b4,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix2()));
setGeometry(200, 100, 500, 300);
@@ -167,14 +167,14 @@ void DockApplication::wConfig()
void DockApplication::initMenuBar()
{
- QPixmap p(folder);
- QPopupMenu *file_menu = new QPopupMenu();
+ TQPixmap p(folder);
+ TQPopupMenu *file_menu = new TQPopupMenu();
- file_menu->insertItem(p, "Change Green Widget Caption", this, SLOT(cap()) );
+ file_menu->insertItem(p, "Change Green Widget Caption", this, TQT_SLOT(cap()) );
file_menu->insertSeparator();
- file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, SLOT(greenMain()) );
- file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, SLOT(blueMain()) );
- file_menu->insertItem(p, "Set NULL as MainDockWidget", this, SLOT(nullMain()) );
+ file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, TQT_SLOT(greenMain()) );
+ file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, TQT_SLOT(blueMain()) );
+ file_menu->insertItem(p, "Set NULL as MainDockWidget", this, TQT_SLOT(nullMain()) );
KMenuBar* menu_bar = menuBar();
menu_bar->insertItem( "&Test", file_menu );
@@ -183,7 +183,7 @@ void DockApplication::initMenuBar()
void DockApplication::initToolBars()
{
- QPixmap p(folder);
+ TQPixmap p(folder);
KToolBar* tool_bar_0 = toolBar(0);
tool_bar_0->setFullSize(false);
tool_bar_0->insertButton( p, 1 );
@@ -226,7 +226,7 @@ void DockApplication::nullMain()
void DockApplication::updateButton()
{
if ( getMainDockWidget() )
- m_bname->setText(QString("MainDockWidget is %1").arg(getMainDockWidget()->name()));
+ m_bname->setText(TQString("MainDockWidget is %1").arg(getMainDockWidget()->name()));
else
m_bname->setText("MainDockWidget is NULL");
}
diff --git a/kdeui/tests/kdockwidgettest.h b/kdeui/tests/kdockwidgettest.h
index 70d75877c..f5905262f 100644
--- a/kdeui/tests/kdockwidgettest.h
+++ b/kdeui/tests/kdockwidgettest.h
@@ -17,8 +17,8 @@
#include <kdockwidget.h>
#include <kdockwidget_p.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
class QPushButton;
class DockApplication : public KDockMainWindow
@@ -50,20 +50,20 @@ private:
KDockWidget* dock5;
KDockWidget* dock6;
- QWidget* mainW;
- QWidget* l;
- QPushButton* m_bname;
+ TQWidget* mainW;
+ TQWidget* l;
+ TQPushButton* m_bname;
};
-class CTW:public QTabWidget,public KDockContainer
+class CTW:public TQTabWidget,public KDockContainer
{
Q_OBJECT
public:
- CTW(QWidget *parent):QTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new QLabel("BLAH",this),"BLUP");}
+ CTW(TQWidget *parent):TQTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new TQLabel("BLAH",this),"BLUP");}
virtual ~CTW(){;}
KDockWidget *parentDockWidget(){return ((KDockWidget*)parent());}
- void insertWidget (KDockWidget *w, QPixmap, const QString &, int &){qDebug("widget inserted"); insertTab(w,"NO");}
- void setToolTip (KDockWidget *, QString &){qDebug("Tooltip set");}
+ void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &){qDebug("widget inserted"); insertTab(w,"NO");}
+ void setToolTip (KDockWidget *, TQString &){qDebug("Tooltip set");}
};
diff --git a/kdeui/tests/kdualcolortest.cpp b/kdeui/tests/kdualcolortest.cpp
index 9022634f1..2060a9842 100644
--- a/kdeui/tests/kdualcolortest.cpp
+++ b/kdeui/tests/kdualcolortest.cpp
@@ -2,42 +2,42 @@
#include <kdualcolorbutton.h>
#include <kapplication.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qpalette.h>
+#include <tqlayout.h>
+#include <tqpalette.h>
-KDualColorWidget::KDualColorWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- lbl = new QLabel("Testing, testing, 1, 2, 3...", this);
+ lbl = new TQLabel("Testing, testing, 1, 2, 3...", this);
KDualColorButton *colorBtn =
new KDualColorButton(lbl->colorGroup().text(),
lbl->colorGroup().background(), this);
- connect(colorBtn, SIGNAL(fgChanged(const QColor &)),
- SLOT(slotFgChanged(const QColor &)));
- connect(colorBtn, SIGNAL(bgChanged(const QColor &)),
- SLOT(slotBgChanged(const QColor &)));
- connect(colorBtn, SIGNAL(currentChanged(KDualColorButton::DualColor)),
- SLOT(slotCurrentChanged(KDualColorButton::DualColor)));
+ connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)),
+ TQT_SLOT(slotFgChanged(const TQColor &)));
+ connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)),
+ TQT_SLOT(slotBgChanged(const TQColor &)));
+ connect(colorBtn, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)),
+ TQT_SLOT(slotCurrentChanged(KDualColorButton::DualColor)));
- QHBoxLayout *layout = new QHBoxLayout(this, 5);
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 5);
layout->addWidget(colorBtn, 0);
layout->addWidget(lbl, 1);
layout->activate();
resize(sizeHint());
}
-void KDualColorWidget::slotFgChanged(const QColor &c)
+void KDualColorWidget::slotFgChanged(const TQColor &c)
{
- QPalette p = lbl->palette();
- p.setColor(QColorGroup::Text, c);
+ TQPalette p = lbl->palette();
+ p.setColor(TQColorGroup::Text, c);
lbl->setPalette(p);
}
-void KDualColorWidget::slotBgChanged(const QColor &c)
+void KDualColorWidget::slotBgChanged(const TQColor &c)
{
- QPalette p = lbl->palette();
- QBrush b(c, SolidPattern);
- p.setBrush(QColorGroup::Background, b);
+ TQPalette p = lbl->palette();
+ TQBrush b(c, SolidPattern);
+ p.setBrush(TQColorGroup::Background, b);
setPalette(p);
}
diff --git a/kdeui/tests/kdualcolortest.h b/kdeui/tests/kdualcolortest.h
index 6a0c49452..bcd9b271e 100644
--- a/kdeui/tests/kdualcolortest.h
+++ b/kdeui/tests/kdualcolortest.h
@@ -1,20 +1,20 @@
#ifndef __KDUALCOLORTEST_H
#define __KDUALCOLORTEST_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdualcolorbutton.h>
class KDualColorWidget : public QWidget
{
Q_OBJECT
public:
- KDualColorWidget(QWidget *parent=0, const char *name=0);
+ KDualColorWidget(TQWidget *parent=0, const char *name=0);
protected slots:
- void slotFgChanged(const QColor &c);
- void slotBgChanged(const QColor &c);
+ void slotFgChanged(const TQColor &c);
+ void slotBgChanged(const TQColor &c);
void slotCurrentChanged(KDualColorButton::DualColor current);
protected:
- QLabel *lbl;
+ TQLabel *lbl;
};
#endif
diff --git a/kdeui/tests/keditlistboxtest.cpp b/kdeui/tests/keditlistboxtest.cpp
index 0cbbece8a..90dbb74d0 100644
--- a/kdeui/tests/keditlistboxtest.cpp
+++ b/kdeui/tests/keditlistboxtest.cpp
@@ -7,14 +7,14 @@ int main( int argc, char **argv )
KApplication app( argc, argv, "keditlistboxtest" );
KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) );
- KEditListBox *box = new KEditListBox( QString::fromLatin1("KEditListBox"),
+ KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"),
editor );
- box->insertItem( QString::fromLatin1("Test") );
- box->insertItem( QString::fromLatin1("for") );
- box->insertItem( QString::fromLatin1("this") );
- box->insertItem( QString::fromLatin1("KEditListBox") );
- box->insertItem( QString::fromLatin1("Widget") );
+ box->insertItem( TQString::fromLatin1("Test") );
+ box->insertItem( TQString::fromLatin1("for") );
+ box->insertItem( TQString::fromLatin1("this") );
+ box->insertItem( TQString::fromLatin1("KEditListBox") );
+ box->insertItem( TQString::fromLatin1("Widget") );
box->show();
return app.exec();
diff --git a/kdeui/tests/kedittest.cpp b/kdeui/tests/kedittest.cpp
index 271923e18..17a593e74 100644
--- a/kdeui/tests/kedittest.cpp
+++ b/kdeui/tests/kedittest.cpp
@@ -1,12 +1,12 @@
#include <kapplication.h>
#include <keditcl.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
int main( int argc, char **argv )
{
KApplication app( argc, argv, "kedittest" );
KEdit *edit = new KEdit( 0L );
- QPopupMenu *pop = new QPopupMenu( 0L );
+ TQPopupMenu *pop = new TQPopupMenu( 0L );
pop->insertItem( "Popupmenu item" );
edit->installRBPopup( pop );
edit->show();
diff --git a/kdeui/tests/kfontdialogtest.cpp b/kdeui/tests/kfontdialogtest.cpp
index f1aa74804..205fd48f7 100644
--- a/kdeui/tests/kfontdialogtest.cpp
+++ b/kdeui/tests/kfontdialogtest.cpp
@@ -36,11 +36,11 @@
KConfig aConfig;
aConfig.setGroup( "KFontDialog-test" );
- app.setFont(QFont("Helvetica",12));
+ app.setFont(TQFont("Helvetica",12));
- // QFont font = QFont("Times",18,QFont::Bold);
+ // TQFont font = TQFont("Times",18,TQFont::Bold);
- QFont font = aConfig.readFontEntry( "Chosen" );
+ TQFont font = aConfig.readFontEntry( "Chosen" );
int nRet = KFontDialog::getFont(font);
int flags;
nRet = KFontDialog::getFontDiff(font, flags);
diff --git a/kdeui/tests/kgradienttest.cpp b/kdeui/tests/kgradienttest.cpp
index 9fad0bb46..6942ca55d 100644
--- a/kdeui/tests/kgradienttest.cpp
+++ b/kdeui/tests/kgradienttest.cpp
@@ -1,24 +1,24 @@
#include "kgradienttest.h"
#include <kapplication.h>
#include <kpixmapeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-void KGradientWidget::paintEvent(QPaintEvent */*ev*/)
+void KGradientWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QColor ca = Qt::black, cb = Qt::blue;
+ TQColor ca = Qt::black, cb = Qt::blue;
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
diff --git a/kdeui/tests/kgradienttest.h b/kdeui/tests/kgradienttest.h
index 09b17ffc7..a793bfa5c 100644
--- a/kdeui/tests/kgradienttest.h
+++ b/kdeui/tests/kgradienttest.h
@@ -7,16 +7,16 @@
#ifndef __KGRADIENT_TEST_H
#define __KGRADIENT_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
class KGradientWidget : public QWidget
{
public:
- KGradientWidget(QWidget *parent=0, const char *name=0)
- : QWidget(parent, name){;}
+ KGradientWidget(TQWidget *parent=0, const char *name=0)
+ : TQWidget(parent, name){;}
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
};
diff --git a/kdeui/tests/khashtest.cpp b/kdeui/tests/khashtest.cpp
index 1065bef1a..2f00c9296 100644
--- a/kdeui/tests/khashtest.cpp
+++ b/kdeui/tests/khashtest.cpp
@@ -2,25 +2,25 @@
#include <kapplication.h>
#include <kpixmapeffect.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqimage.h>
int cols = 3, rows = 3; // how many
-void KHashWidget::paintEvent(QPaintEvent * /*ev*/)
+void KHashWidget::paintEvent(TQPaintEvent * /*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QColor cb = QColor(0,70,70), ca = QColor(80,200,200);
+ TQColor cb = TQColor(0,70,70), ca = TQColor(80,200,200);
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
@@ -77,7 +77,7 @@ void KHashWidget::paintEvent(QPaintEvent * /*ev*/)
p.drawText(5+(x++)*width()/cols, 15+y*height()/rows, say);
- QImage image = QImage("testimage.png");
+ TQImage image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::hash(image, KImageEffect::WestLite, 2);
ft = time.elapsed();
diff --git a/kdeui/tests/khashtest.h b/kdeui/tests/khashtest.h
index 24a01c4f1..3d4e8a3fa 100644
--- a/kdeui/tests/khashtest.h
+++ b/kdeui/tests/khashtest.h
@@ -7,7 +7,7 @@
#ifndef __KHASH_TEST_H
#define __KHASH_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
class KHashWidget : public QWidget
@@ -15,10 +15,10 @@ class KHashWidget : public QWidget
Q_OBJECT
public:
- KHashWidget(QWidget *parent=0, const char *name=0)
- : QWidget(parent, name){;}
+ KHashWidget(TQWidget *parent=0, const char *name=0)
+ : TQWidget(parent, name){;}
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
};
diff --git a/kdeui/tests/kinputdialogtest.cpp b/kdeui/tests/kinputdialogtest.cpp
index 3f9509a40..66db4617a 100644
--- a/kdeui/tests/kinputdialogtest.cpp
+++ b/kdeui/tests/kinputdialogtest.cpp
@@ -7,15 +7,15 @@
#include <kinputdialog.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qvalidator.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
int main( int argc, char *argv[] )
{
KApplication app( argc, argv, "kinputdialogtest" );
bool ok;
- QString svalue;
+ TQString svalue;
int ivalue;
double dvalue;
@@ -23,7 +23,7 @@ int main( int argc, char *argv[] )
kdDebug() << "value1: " << svalue << ", ok: " << ok << endl;
svalue = KInputDialog::getText( "_caption", "_label:", "_value", &ok, 0L, 0L,
- &QRegExpValidator( QRegExp( "[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}" ), 0L ) );
+ &TQRegExpValidator( TQRegExp( "[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}" ), 0L ) );
kdDebug() << "value2: " << svalue << ", ok: " << ok << endl;
svalue = KInputDialog::getText( "_caption", "_label:", "_value", &ok, 0L, 0L,
@@ -45,7 +45,7 @@ int main( int argc, char *argv[] )
dvalue = KInputDialog::getDouble( "_caption", "_label:", 10, 0, 100, 2, &ok );
kdDebug() << "value6: " << dvalue << ", ok: " << ok << endl;
- QStringList list, slvalue;
+ TQStringList list, slvalue;
list << "Item 1" << "Item 2" << "Item 3" << "Item 4" << "Item 5";
svalue = KInputDialog::getItem( "_caption", "_label:", list, 1, false, &ok );
kdDebug() << "value7: " << svalue << ", ok: " << ok << endl;
@@ -53,7 +53,7 @@ int main( int argc, char *argv[] )
svalue = KInputDialog::getItem( "_caption", "_label:", list, 1, true, &ok );
kdDebug() << "value8: " << svalue << ", ok: " << ok << endl;
- QStringList select;
+ TQStringList select;
select << "Item 3";
list << "Item 6" << "Item 7" << "Item 8" << "Item 9" << "Item 10";
slvalue = KInputDialog::getItemList( "_caption", "_label:", list, select,
diff --git a/kdeui/tests/kjanuswidgettest.cpp b/kdeui/tests/kjanuswidgettest.cpp
index 5788f3638..59db252e2 100644
--- a/kdeui/tests/kjanuswidgettest.cpp
+++ b/kdeui/tests/kjanuswidgettest.cpp
@@ -1,9 +1,9 @@
#include <kapplication.h>
#include <kjanuswidget.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
int main(int argc, char** argv)
{
@@ -11,14 +11,14 @@ int main(int argc, char** argv)
// -----
KJanusWidget* janus = new KJanusWidget( 0, 0, KJanusWidget::IconList );
- QVBox* page1 = janus->addVBoxPage( QString( "Page1" ) ); // use i18n in real apps
- QCheckBox* cb1 = new QCheckBox( "a", page1 );
+ TQVBox* page1 = janus->addVBoxPage( TQString( "Page1" ) ); // use i18n in real apps
+ TQCheckBox* cb1 = new TQCheckBox( "a", page1 );
- QVBox* page2 = janus->addVBoxPage( QString( "Page2" ) );
- QCheckBox* cb2 = new QCheckBox( "a", page2 );
+ TQVBox* page2 = janus->addVBoxPage( TQString( "Page2" ) );
+ TQCheckBox* cb2 = new TQCheckBox( "a", page2 );
janus->show();
- QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
return app.exec();
}
diff --git a/kdeui/tests/kledtest.cpp b/kdeui/tests/kledtest.cpp
index 8fc082420..d68f1e366 100644
--- a/kdeui/tests/kledtest.cpp
+++ b/kdeui/tests/kledtest.cpp
@@ -1,22 +1,22 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include "kled.h"
#include "kledtest.h"
-KLedTest::KLedTest(QWidget* parent)
- : QWidget(parent, 0),
+KLedTest::KLedTest(TQWidget* parent)
+ : TQWidget(parent, 0),
LedWidth(16),
LedHeight(10),
Grid(3),
ledcolor(0),
- red(QColor("red")),
- blue(QColor("blue")),
- green(QColor("green")),
- yellow(QColor("yellow")),
+ red(TQColor("red")),
+ blue(TQColor("blue")),
+ green(TQColor("green")),
+ yellow(TQColor("yellow")),
kled_round(true) // Switch HERE between rectangle and circular leds
{
if (kled_round) {
@@ -42,9 +42,9 @@ KLedTest::KLedTest(QWidget* parent)
t_toggle.start(1000, false);
t_color.start(3500, false);
t_look.start(3500, false);
- QObject::connect(&t_toggle, SIGNAL(timeout()), l, SLOT(toggle()));
- QObject::connect(&t_color, SIGNAL(timeout()), this, SLOT(nextColor()));
- QObject::connect(&t_look, SIGNAL(timeout()), this, SLOT(nextLook()));
+ TQObject::connect(&t_toggle, TQT_SIGNAL(timeout()), l, TQT_SLOT(toggle()));
+ TQObject::connect(&t_color, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextColor()));
+ TQObject::connect(&t_look, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextLook()));
l->show();
resize(240,140);
}
@@ -66,7 +66,7 @@ KLedTest::KLedTest(QWidget* parent)
y+=Grid+LedHeight;
}
setFixedSize(x+Grid, y+Grid);
- connect(&timer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
timer.start(500);
}
}
diff --git a/kdeui/tests/kledtest.h b/kdeui/tests/kledtest.h
index ad9ad3ffb..33c70fe83 100644
--- a/kdeui/tests/kledtest.h
+++ b/kdeui/tests/kledtest.h
@@ -1,8 +1,8 @@
#ifndef kledtest_h
#define kledtest_h
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include <kled.h>
@@ -10,7 +10,7 @@ class KLedTest : public QWidget
{
Q_OBJECT
protected:
- QTimer timer;
+ TQTimer timer;
KLed *leds[/*KLed::NoOfShapes*/2* /*KLed::NoOfLooks*/3* /*KLed::NoOfStates*/2];
const int LedWidth;
const int LedHeight;
@@ -21,7 +21,7 @@ protected:
int x, y, index;
- QTimer t_toggle, t_color, t_look;
+ TQTimer t_toggle, t_color, t_look;
//KLed *l; // create lamp
//KLed *l; // create lamp
KLed *l; // create lamp
@@ -30,14 +30,14 @@ protected:
int ledcolor;
KLed::Look ledlook;
- const QColor red;
- const QColor blue;
- const QColor green;
- const QColor yellow;
+ const TQColor red;
+ const TQColor blue;
+ const TQColor green;
+ const TQColor yellow;
public:
- KLedTest(QWidget* parent=0);
+ KLedTest(TQWidget* parent=0);
~KLedTest();
bool kled_round;
diff --git a/kdeui/tests/klineeditdlgtest.cpp b/kdeui/tests/klineeditdlgtest.cpp
index 2c9dc5248..e43085c0c 100644
--- a/kdeui/tests/klineeditdlgtest.cpp
+++ b/kdeui/tests/klineeditdlgtest.cpp
@@ -1,8 +1,8 @@
#include <kapplication.h>
#include <klineeditdlg.h>
-#include <qstring.h>
-#include <qtextview.h>
+#include <tqstring.h>
+#include <tqtextview.h>
int main(int argc, char** argv)
{
diff --git a/kdeui/tests/klineedittest.cpp b/kdeui/tests/klineedittest.cpp
index 2b40163a1..3508982fa 100644
--- a/kdeui/tests/klineedittest.cpp
+++ b/kdeui/tests/klineedittest.cpp
@@ -1,8 +1,8 @@
-#include <qstring.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
@@ -16,12 +16,12 @@
#include "klineedittest.h"
-KLineEditTest::KLineEditTest (QWidget* widget, const char* name )
- :QWidget( widget, name )
+KLineEditTest::KLineEditTest (TQWidget* widget, const char* name )
+ :TQWidget( widget, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout* layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- QStringList list;
+ TQStringList list;
list << "Tree" << "Suuupa" << "Stroustrup" << "Stone" << "Slick"
<< "Slashdot" << "Send" << "Peables" << "Mankind" << "Ocean"
<< "Chips" << "Computer" << "Sandworm" << "Sandstorm" << "Chops";
@@ -31,28 +31,28 @@ KLineEditTest::KLineEditTest (QWidget* widget, const char* name )
m_lineedit->completionObject()->setItems( list );
m_lineedit->setFixedSize(500,30);
m_lineedit->setEnableSqueezedText( true );
- connect( m_lineedit, SIGNAL( returnPressed() ), SLOT( slotReturnPressed() ) );
- connect( m_lineedit, SIGNAL( returnPressed(const QString&) ),
- SLOT( slotReturnPressed(const QString&) ) );
+ connect( m_lineedit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotReturnPressed() ) );
+ connect( m_lineedit, TQT_SIGNAL( returnPressed(const TQString&) ),
+ TQT_SLOT( slotReturnPressed(const TQString&) ) );
- QHBox *hbox = new QHBox (this);
- m_btnExit = new QPushButton( "E&xit", hbox );
+ TQHBox *hbox = new TQHBox (this);
+ m_btnExit = new TQPushButton( "E&xit", hbox );
m_btnExit->setFixedSize(100,30);
- connect( m_btnExit, SIGNAL( clicked() ), SLOT( quitApp() ) );
+ connect( m_btnExit, TQT_SIGNAL( clicked() ), TQT_SLOT( quitApp() ) );
- m_btnReadOnly = new QPushButton( "&Read Only", hbox );
+ m_btnReadOnly = new TQPushButton( "&Read Only", hbox );
m_btnReadOnly->setToggleButton (true);
m_btnReadOnly->setFixedSize(100,30);
- connect( m_btnReadOnly, SIGNAL( toggled(bool) ), SLOT( slotReadOnly(bool) ) );
+ connect( m_btnReadOnly, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotReadOnly(bool) ) );
- m_btnEnable = new QPushButton( "Dis&able", hbox );
+ m_btnEnable = new TQPushButton( "Dis&able", hbox );
m_btnEnable->setToggleButton (true);
m_btnEnable->setFixedSize(100,30);
- connect( m_btnEnable, SIGNAL( toggled(bool) ), SLOT( slotEnable(bool) ) );
+ connect( m_btnEnable, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotEnable(bool) ) );
- m_btnHide = new QPushButton( "Hi&de", hbox );
+ m_btnHide = new TQPushButton( "Hi&de", hbox );
m_btnHide->setFixedSize(100,30);
- connect( m_btnHide, SIGNAL( clicked() ), SLOT( slotHide() ) );
+ connect( m_btnHide, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHide() ) );
layout->addWidget( m_lineedit );
layout->addWidget( hbox );
@@ -75,7 +75,7 @@ void KLineEditTest::show()
m_btnHide->setEnabled( true );
- QWidget::show();
+ TQWidget::show();
}
void KLineEditTest::slotReturnPressed()
@@ -83,12 +83,12 @@ void KLineEditTest::slotReturnPressed()
kdDebug() << "Return pressed" << endl;
}
-void KLineEditTest::slotReturnPressed( const QString& text )
+void KLineEditTest::slotReturnPressed( const TQString& text )
{
kdDebug() << "Return pressed: " << text << endl;
}
-void KLineEditTest::resultOutput( const QString& text )
+void KLineEditTest::resultOutput( const TQString& text )
{
kdDebug() << "KlineEditTest Debug: " << text << endl;
}
@@ -96,14 +96,14 @@ void KLineEditTest::resultOutput( const QString& text )
void KLineEditTest::slotReadOnly( bool ro )
{
m_lineedit->setReadOnly (ro);
- QString text = (ro) ? "&Read Write" : "&Read Only";
+ TQString text = (ro) ? "&Read Write" : "&Read Only";
m_btnReadOnly->setText (text);
}
void KLineEditTest::slotEnable (bool enable)
{
m_lineedit->setEnabled (!enable);
- QString text = (enable) ? "En&able":"Dis&able";
+ TQString text = (enable) ? "En&able":"Dis&able";
m_btnEnable->setText (text);
}
@@ -113,7 +113,7 @@ void KLineEditTest::slotHide()
m_btnHide->setEnabled( false );
m_lineedit->setText( "My dog ate the homework, whaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaa! I want my mommy!" );
- QTimer::singleShot( 1000, this, SLOT(show()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(show()) );
}
int main ( int argc, char **argv)
diff --git a/kdeui/tests/klineedittest.h b/kdeui/tests/klineedittest.h
index e3b87c30e..4a07dc812 100644
--- a/kdeui/tests/klineedittest.h
+++ b/kdeui/tests/klineedittest.h
@@ -1,8 +1,8 @@
#ifndef _KLINEEDITTEST_H
#define _KLINEEDITTEST_H
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class QString;
class QPushButton;
@@ -14,7 +14,7 @@ class KLineEditTest : public QWidget
Q_OBJECT
public:
- KLineEditTest( QWidget *parent=0, const char *name=0 );
+ KLineEditTest( TQWidget *parent=0, const char *name=0 );
~KLineEditTest();
KLineEdit* lineEdit() const { return m_lineedit; }
@@ -27,15 +27,15 @@ private slots:
void slotEnable( bool );
void slotReadOnly( bool );
void slotReturnPressed();
- void resultOutput( const QString& );
- void slotReturnPressed( const QString& );
+ void resultOutput( const TQString& );
+ void slotReturnPressed( const TQString& );
protected:
- QGuardedPtr<KLineEdit> m_lineedit;
- QPushButton* m_btnExit;
- QPushButton* m_btnReadOnly;
- QPushButton* m_btnEnable;
- QPushButton* m_btnHide;
+ TQGuardedPtr<KLineEdit> m_lineedit;
+ TQPushButton* m_btnExit;
+ TQPushButton* m_btnReadOnly;
+ TQPushButton* m_btnEnable;
+ TQPushButton* m_btnHide;
};
#endif
diff --git a/kdeui/tests/klistviewtest.cpp b/kdeui/tests/klistviewtest.cpp
index 75c01e439..6189c76e9 100644
--- a/kdeui/tests/klistviewtest.cpp
+++ b/kdeui/tests/klistviewtest.cpp
@@ -1,7 +1,7 @@
#include <klistview.h>
#include <kapplication.h>
#include <kdialogbase.h>
-#include <qvbox.h>
+#include <tqvbox.h>
int main( int argc, char **argv )
diff --git a/kdeui/tests/kmainwindowrestoretest.cpp b/kdeui/tests/kmainwindowrestoretest.cpp
index 35198a6c2..7415085ac 100644
--- a/kdeui/tests/kmainwindowrestoretest.cpp
+++ b/kdeui/tests/kmainwindowrestoretest.cpp
@@ -3,12 +3,12 @@
#include <kapplication.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#define MAKE_WINDOW( kind, title ) do { \
MainWin##kind * m = new MainWin##kind; \
m->setCaption( title ); \
- m->setCentralWidget( new QLabel( title, m ) ); \
+ m->setCentralWidget( new TQLabel( title, m ) ); \
m->show(); \
} while ( false )
diff --git a/kdeui/tests/kmainwindowtest.cpp b/kdeui/tests/kmainwindowtest.cpp
index 6ab8d33a0..5b7afd36f 100644
--- a/kdeui/tests/kmainwindowtest.cpp
+++ b/kdeui/tests/kmainwindowtest.cpp
@@ -1,5 +1,5 @@
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kstatusbar.h>
@@ -9,9 +9,9 @@
MainWindow::MainWindow()
{
- QTimer::singleShot( 2*1000, this, SLOT( showMessage() ) );
+ TQTimer::singleShot( 2*1000, this, TQT_SLOT( showMessage() ) );
- setCentralWidget( new QLabel( "foo", this ) );
+ setCentralWidget( new TQLabel( "foo", this ) );
menuBar()->insertItem( "hi" );
}
diff --git a/kdeui/tests/kmessageboxtest.cpp b/kdeui/tests/kmessageboxtest.cpp
index 372bef16a..1b926739f 100644
--- a/kdeui/tests/kmessageboxtest.cpp
+++ b/kdeui/tests/kmessageboxtest.cpp
@@ -1,7 +1,7 @@
#include "kmessagebox.h"
-#include <qdialog.h>
-#include <qlayout.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
#include <stdlib.h>
@@ -15,15 +15,15 @@
class ExampleWidget : public QLabel
{
public:
- ExampleWidget( QWidget *parent = 0, const char *name = 0 );
+ ExampleWidget( TQWidget *parent = 0, const char *name = 0 );
};
-ExampleWidget::ExampleWidget( QWidget *parent, const char *name )
- : QLabel(parent, name )
+ExampleWidget::ExampleWidget( TQWidget *parent, const char *name )
+ : TQLabel(parent, name )
{
// Make the top-level layout; a vertical box to contain all widgets
// and sub-layouts.
- QSize sh;
+ TQSize sh;
setText("<p>Hello.</p>");
sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height());
@@ -43,7 +43,7 @@ ExampleWidget::ExampleWidget( QWidget *parent, const char *name )
class Foo: public QDialog
{
public:
- Foo() : QDialog(0, "foo", true) { resize(200,200); new QLabel("Hello World", this); show(); }
+ Foo() : TQDialog(0, "foo", true) { resize(200,200); new TQLabel("Hello World", this); show(); }
};
void showResult(int test, int i)
@@ -69,7 +69,7 @@ int main( int argc, char *argv[] )
w->show();
w->deleteLater();
- QStringList list; list.append("Hello"); list.append("World");
+ TQStringList list; list.append("Hello"); list.append("World");
for( test = 1; true; test++)
{
@@ -79,24 +79,24 @@ case 1:
i = KMessageBox::warningContinueCancel(w,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", false);
+ "Print", TQString::fromLatin1("&Print"), "dontask", false);
i = KMessageBox::warningContinueCancel(0,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink);
+ "Print", TQString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink);
i = KMessageBox::questionYesNo(0, "<p>Do you have a printer? thisisaverylongdkldhklghklghklashgkllasghkdlsghkldfghklsabla bla bbla bla. It also has <a href=http://www.kde.org>this URL</a>.</p>",
- QString("Bla"), QString("Yes"), QString("No"), "bla", KMessageBox::AllowLink);
+ TQString("Bla"), TQString("Yes"), TQString("No"), "bla", KMessageBox::AllowLink);
break;
case 2:
i = KMessageBox::questionYesNo(0, "Do you have a printer?",
- QString("Printer setup"), QString::null);
+ TQString("Printer setup"), TQString::null);
break;
case 3:
i = KMessageBox::questionYesNo(0,
"Does your printer support color or only black and white?",
- "Printer setup", QString::fromLatin1("&Color"), QString::fromLatin1("&Black & White"));
+ "Printer setup", TQString::fromLatin1("&Color"), TQString::fromLatin1("&Black & White"));
break;
case 4:
@@ -123,13 +123,13 @@ case 6:
i = KMessageBox::warningContinueCancel(0,
"You are about to print.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"));
+ "Print", TQString::fromLatin1("&Print"));
break;
case 7:
i = KMessageBox::warningContinueCancel(0,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", false);
+ "Print", TQString::fromLatin1("&Print"), "dontask", false);
break;
case 8:
@@ -142,14 +142,14 @@ case 9:
i = KMessageBox::warningYesNoCancel(0,
"Your document contains unsaved changes.\n"
"Do you want to save your changes?\n",
- QString::fromLatin1("Close"));
+ TQString::fromLatin1("Close"));
break;
case 10:
i = KMessageBox::warningYesNoCancel(0,
"Your document contains unsaved changes.\n"
"Do you want to save or discard your changes?\n",
- "Close", QString::fromLatin1("&Save"), QString::fromLatin1("&Discard") );
+ "Close", TQString::fromLatin1("&Save"), TQString::fromLatin1("&Discard") );
break;
case 11:
@@ -186,7 +186,7 @@ case 16:
case 17:
i = KMessageBox::Ok;
- KMessageBox::information(0, "You can enable the menubar again\nwith the right mouse button menu.", QString::null, "Enable_Menubar");
+ KMessageBox::information(0, "You can enable the menubar again\nwith the right mouse button menu.", TQString::null, "Enable_Menubar");
break;
case 18:
@@ -196,11 +196,11 @@ case 18:
case 19:
i = KMessageBox::Ok;
- KMessageBox::information(0, "Return of the annoying popup message.", QString::null, "Enable_Menubar");
+ KMessageBox::information(0, "Return of the annoying popup message.", TQString::null, "Enable_Menubar");
break;
case 20:
{
- QStringList strlist;
+ TQStringList strlist;
strlist << "/dev/hda" << "/etc/inittab" << "/usr/somefile" << "/some/really/"
"long/file/name/which/is/in/a/really/deep/directory/in/a/really/large/"
"hard/disk/of/your/system" << "/and/another/one" ;
@@ -209,9 +209,9 @@ case 20:
break;
case 21:
{
- QStringList strlist;
+ TQStringList strlist;
printf("Filling StringList...\n");
- for (int j=1;j<=6000;j++) strlist.append(QString("/tmp/tmp.%1").arg(j));
+ for (int j=1;j<=6000;j++) strlist.append(TQString("/tmp/tmp.%1").arg(j));
printf("Completed...\n");
i = KMessageBox::questionYesNoList(0, "Do you want to delete the following files ?",strlist);
}
@@ -229,7 +229,7 @@ case 23:
case 24:
i = KMessageBox::Ok;
- KMessageBox::informationList(0, "The follwoing words have been found:", list, QString::null, "Search_Words");
+ KMessageBox::informationList(0, "The follwoing words have been found:", list, TQString::null, "Search_Words");
break;
default:
diff --git a/kdeui/tests/knuminputtest.cpp b/kdeui/tests/knuminputtest.cpp
index b3d8e9067..fdf8697e9 100644
--- a/kdeui/tests/knuminputtest.cpp
+++ b/kdeui/tests/knuminputtest.cpp
@@ -8,8 +8,8 @@
*
*/
-#include <qlayout.h>
-#include <qvgroupbox.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
#include <kapplication.h>
#include <knuminput.h>
@@ -26,15 +26,15 @@ void TopLevel::slotPrint( double n ) {
kdDebug() << "slotPrint( " << n << " )" << endl;
}
-#define conn(x,y) connect( x, SIGNAL(valueChanged(y)), SLOT(slotPrint(y)))
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+#define conn(x,y) connect( x, TQT_SIGNAL(valueChanged(y)), TQT_SLOT(slotPrint(y)))
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("KNumInput test application");
- QBoxLayout* l = new QHBoxLayout(this, 10);
+ TQBoxLayout* l = new TQHBoxLayout(this, 10);
- QGroupBox* b1 = new QVGroupBox("KIntNumInput", this);
+ TQGroupBox* b1 = new TQVGroupBox("KIntNumInput", this);
i1 = new KIntNumInput(42, b1, 10, "perc_no_slider");
i1->setLabel("percent of usage (no slider)");
@@ -67,10 +67,10 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
i6->setLabel("Height (should be 2xWidth):");
i6->setRange(0, 200, 1, false);
i6->setReferencePoint( 10 );
- connect( i5, SIGNAL(relativeValueChanged(double)),
- i6, SLOT(setRelativeValue(double)) );
- connect( i6, SIGNAL(relativeValueChanged(double)),
- i5, SLOT(setRelativeValue(double)) );
+ connect( i5, TQT_SIGNAL(relativeValueChanged(double)),
+ i6, TQT_SLOT(setRelativeValue(double)) );
+ connect( i6, TQT_SIGNAL(relativeValueChanged(double)),
+ i5, TQT_SLOT(setRelativeValue(double)) );
i7 = new KIntNumInput(i6, 0, b1, 10);
i7->setLabel("math test:", AlignVCenter|AlignLeft );
@@ -79,7 +79,7 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
l->addWidget(b1);
- QGroupBox* b2 = new QVGroupBox("KDoubleNumInput", this);
+ TQGroupBox* b2 = new TQVGroupBox("KDoubleNumInput", this);
d1 = new KDoubleNumInput(4.0, b2, "perc_double_no_slider");
d1->setLabel("percent of usage (no slider)", AlignTop | AlignRight);
@@ -119,10 +119,10 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
d7 = new KDoubleNumInput(d6, -30, 30, 0, 0.001, 3, b2, "d7");
d7->setReferencePoint( -3 );
- connect( d6, SIGNAL(relativeValueChanged(double)),
- d7, SLOT(setRelativeValue(double)) );
- connect( d7, SIGNAL(relativeValueChanged(double)),
- d6, SLOT(setRelativeValue(double)) );
+ connect( d6, TQT_SIGNAL(relativeValueChanged(double)),
+ d7, TQT_SLOT(setRelativeValue(double)) );
+ connect( d7, TQT_SIGNAL(relativeValueChanged(double)),
+ d6, TQT_SLOT(setRelativeValue(double)) );
l->addWidget(b2);
}
diff --git a/kdeui/tests/knuminputtest.h b/kdeui/tests/knuminputtest.h
index e4a979e48..f32e1c4b4 100644
--- a/kdeui/tests/knuminputtest.h
+++ b/kdeui/tests/knuminputtest.h
@@ -1,7 +1,7 @@
#ifndef _KNUMINPUTTEST_H
#define _KNUMINPUTTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KIntNumInput;
class KDoubleNumInput;
@@ -11,7 +11,7 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
protected:
KIntNumInput* i1, *i2, *i3, *i4, *i5, *i6, *i7;
KDoubleNumInput* d1, *d2, *d3, *d4, *d5, *d6, *d7;
diff --git a/kdeui/tests/kpalettetest.cpp b/kdeui/tests/kpalettetest.cpp
index d75563ec5..32b91ff96 100644
--- a/kdeui/tests/kpalettetest.cpp
+++ b/kdeui/tests/kpalettetest.cpp
@@ -1,21 +1,21 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include "kpalette.h"
#include "kledtest.h"
#include <stdio.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
int main( int argc, char **argv )
{
KApplication a( argc, argv, "KPalettetest" );
- QStringList palettes = KPalette::getPaletteList();
- for(QStringList::ConstIterator it = palettes.begin();
+ TQStringList palettes = KPalette::getPaletteList();
+ for(TQStringList::ConstIterator it = palettes.begin();
it != palettes.end(); it++)
{
printf("Palette = %s\n", (*it).ascii());
diff --git a/kdeui/tests/kpanelmenutest.cpp b/kdeui/tests/kpanelmenutest.cpp
index 4ff13b89c..6f2d8f2be 100644
--- a/kdeui/tests/kpanelmenutest.cpp
+++ b/kdeui/tests/kpanelmenutest.cpp
@@ -3,8 +3,8 @@
#include <kstandarddirs.h>
#include <dcopclient.h>
-TestWidget::TestWidget(QWidget *parent, const char *name)
- : QLabel(parent, name)
+TestWidget::TestWidget(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{
testMenu = new KPanelAppMenu(locate("mini", "x.png"), "Client Test", this,
"menu1");
@@ -15,8 +15,8 @@ TestWidget::TestWidget(QWidget *parent, const char *name)
KPanelAppMenu *ssub = subMenu->insertMenu(locate("mini", "x.png"), "One more");
- connect(testMenu, SIGNAL(activated(int)), SLOT(slotMenuCalled(int)));
- connect(subMenu, SIGNAL(activated(int)), SLOT(slotSubMenuCalled(int)));
+ connect(testMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuCalled(int)));
+ connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSubMenuCalled(int)));
init();
setText("We added \"Client Test\" to kicker. Click the K Menu to check.");
@@ -50,7 +50,7 @@ void TestWidget::slotMenuCalled(int id)
void TestWidget::slotSubMenuCalled(int id)
{
- QString msg("Called with id=%1");
+ TQString msg("Called with id=%1");
setText(msg.arg(id));
}
diff --git a/kdeui/tests/kpanelmenutest.h b/kdeui/tests/kpanelmenutest.h
index 0e0e4a728..ec76a4498 100644
--- a/kdeui/tests/kpanelmenutest.h
+++ b/kdeui/tests/kpanelmenutest.h
@@ -2,13 +2,13 @@
#define __KPANELMENUTEST_H
#include <kpanelappmenu.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class TestWidget : public QLabel
{
Q_OBJECT
public:
- TestWidget(QWidget *parent=0, const char *name=0);
+ TestWidget(TQWidget *parent=0, const char *name=0);
~TestWidget(){delete testMenu;}
public slots:
void slotMenuCalled(int id);
diff --git a/kdeui/tests/kpixmapregionselectordialogtest.cpp b/kdeui/tests/kpixmapregionselectordialogtest.cpp
index 7d57c4234..c698c66f2 100644
--- a/kdeui/tests/kpixmapregionselectordialogtest.cpp
+++ b/kdeui/tests/kpixmapregionselectordialogtest.cpp
@@ -1,6 +1,6 @@
#include "kpixmapregionselectordialog.h"
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <iostream>
@@ -24,8 +24,8 @@ int main(int argc, char**argv)
return 1;
}
- QImage image=
- KPixmapRegionSelectorDialog::getSelectedImage(QPixmap(args->arg(0)),100,100);
+ TQImage image=
+ KPixmapRegionSelectorDialog::getSelectedImage(TQPixmap(args->arg(0)),100,100);
image.save("output.png", "PNG");
diff --git a/kdeui/tests/kpopuptest.cpp b/kdeui/tests/kpopuptest.cpp
index 43e3c0958..96f4b3d32 100644
--- a/kdeui/tests/kpopuptest.cpp
+++ b/kdeui/tests/kpopuptest.cpp
@@ -1,30 +1,30 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qcursor.h>
+#include <tqwidget.h>
+#include <tqcursor.h>
#include "kpopupmenu.h"
-class DemoWidget : public QWidget {
+class DemoWidget : public TQWidget {
private:
KPopupMenu *menu;
-void mousePressEvent(QMouseEvent *)
+void mousePressEvent(TQMouseEvent *)
{
- menu->popup(QCursor::pos());
+ menu->popup(TQCursor::pos());
}
-void paintEvent(QPaintEvent *)
+void paintEvent(TQPaintEvent *)
{
drawText(32, 32, "Press a Mouse Button!");
}
public:
- DemoWidget() : QWidget()
+ DemoWidget() : TQWidget()
{
menu = new KPopupMenu("Popup Menu:");
menu->insertItem("Item1");
menu->insertItem("Item2");
menu->insertSeparator();
- menu->insertItem("Quit", qApp, SLOT(quit()));
+ menu->insertItem("Quit", qApp, TQT_SLOT(quit()));
}
};
@@ -33,7 +33,7 @@ int main(int argc, char **argv)
KApplication app(argc, argv, "kpopupmenutest");
DemoWidget w;
app.setMainWidget(&w);
- w.setFont(QFont("helvetica", 12, QFont::Bold), true);
+ w.setFont(TQFont("helvetica", 12, TQFont::Bold), true);
w.show();
return app.exec();
}
diff --git a/kdeui/tests/kprogresstest.cpp b/kdeui/tests/kprogresstest.cpp
index d748fcb0f..7b7024135 100644
--- a/kdeui/tests/kprogresstest.cpp
+++ b/kdeui/tests/kprogresstest.cpp
@@ -1,11 +1,11 @@
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kprogress.h"
-class MyWidget : public QWidget {
+class MyWidget : public TQWidget {
public:
- MyWidget() : QWidget()
+ MyWidget() : TQWidget()
{
setFixedSize(440, 80);
Progress = new KProgress(this);
@@ -17,10 +17,10 @@ public:
private:
KProgress *Progress;
- void timerEvent(QTimerEvent *);
+ void timerEvent(TQTimerEvent *);
};
-void MyWidget::timerEvent(QTimerEvent *)
+void MyWidget::timerEvent(TQTimerEvent *)
{
static enum { fwd, back } direction = fwd;
//static KProgress::BarStyle style = KProgress::Solid;
diff --git a/kdeui/tests/krulertest.cpp b/kdeui/tests/krulertest.cpp
index 1efe57643..ad2f5630a 100644
--- a/kdeui/tests/krulertest.cpp
+++ b/kdeui/tests/krulertest.cpp
@@ -3,26 +3,26 @@
#include "krulertest.h"
#include "kruler.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
/*
void
MyCheckBox::mouseReleaseEvent(QMouseEvent *e )
{
- QButton::mouseReleaseEvent(e);
+ TQButton::mouseReleaseEvent(e);
if ();
}
*/
-MouseWidget::MouseWidget( QWidget *parent, const char *name, WFlags f )
- : QFrame(parent, name, f)
+MouseWidget::MouseWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame(parent, name, f)
{
}
void
-MouseWidget::mousePressEvent( QMouseEvent *e )
+MouseWidget::mousePressEvent( TQMouseEvent *e )
{
mouseButtonDown = true;
emit newXPos(e->x());
@@ -30,11 +30,11 @@ MouseWidget::mousePressEvent( QMouseEvent *e )
}
void
-MouseWidget::mouseReleaseEvent( QMouseEvent * )
+MouseWidget::mouseReleaseEvent( TQMouseEvent * )
{ mouseButtonDown = false; }
void
-MouseWidget::mouseMoveEvent( QMouseEvent *e )
+MouseWidget::mouseMoveEvent( TQMouseEvent *e )
{
if (mouseButtonDown) {
emit newXPos(e->x());
@@ -43,7 +43,7 @@ MouseWidget::mouseMoveEvent( QMouseEvent *e )
}
void
-MouseWidget::resizeEvent( QResizeEvent *r )
+MouseWidget::resizeEvent( TQResizeEvent *r )
{
emit newWidth(r->size().width());
emit newHeight(r->size().height());
@@ -53,16 +53,16 @@ MouseWidget::resizeEvent( QResizeEvent *r )
KRulerTest::KRulerTest( const char *name )
: KMainWindow(0, name)
{
- mainframe = new QFrame(this);
+ mainframe = new TQFrame(this);
- layout = new QGridLayout(mainframe, 2, 2);
+ layout = new TQGridLayout(mainframe, 2, 2);
- miniwidget = new QFrame(mainframe);
- miniwidget->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ miniwidget = new TQFrame(mainframe);
+ miniwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
bigwidget = new MouseWidget(mainframe);
- bigwidget->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ bigwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- // QRect bwrect = bigwidget->frameRect();
+ // TQRect bwrect = bigwidget->frameRect();
// qDebug("big rect: top%i left%i bottom%i right%i",
// bwrect.top(), bwrect.left(), bwrect.bottom(), bwrect.right());
hruler = new KRuler(Horizontal, mainframe);
@@ -72,98 +72,98 @@ KRulerTest::KRulerTest( const char *name )
hruler->setOffset( 0 );
vruler = new KRuler(Vertical, mainframe);
- vruler->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ vruler->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
vruler->setOffset( 0 );
vruler->setRange( 0, 1000 );
- connect( bigwidget, SIGNAL(newXPos(int)),
- hruler, SLOT(slotNewValue(int)) );
- connect( bigwidget, SIGNAL(newYPos(int)),
- vruler, SLOT(slotNewValue(int)) );
- connect( bigwidget, SIGNAL(newWidth(int)),
- SLOT(slotNewWidth(int)) );
- connect( bigwidget, SIGNAL(newHeight(int)),
- SLOT(slotNewHeight(int)) );
+ connect( bigwidget, TQT_SIGNAL(newXPos(int)),
+ hruler, TQT_SLOT(slotNewValue(int)) );
+ connect( bigwidget, TQT_SIGNAL(newYPos(int)),
+ vruler, TQT_SLOT(slotNewValue(int)) );
+ connect( bigwidget, TQT_SIGNAL(newWidth(int)),
+ TQT_SLOT(slotNewWidth(int)) );
+ connect( bigwidget, TQT_SIGNAL(newHeight(int)),
+ TQT_SLOT(slotNewHeight(int)) );
layout->addWidget(miniwidget, 0, 0);
layout->addWidget(hruler, 0, 1);
layout->addWidget(vruler, 1, 0);
layout->addWidget(bigwidget, 1, 1);
- mouse_message = new QLabel("Press and hold mouse button\nfor pointer movement", bigwidget);
+ mouse_message = new TQLabel("Press and hold mouse button\nfor pointer movement", bigwidget);
mouse_message->adjustSize();
mouse_message->move(4,4);
- showMarks = new QGroupBox("Show which marks ?", bigwidget);
+ showMarks = new TQGroupBox("Show which marks ?", bigwidget);
showMarks->setFixedSize(140, 160);
showMarks->move(330,4);
- showTM = new QCheckBox("show tiny marks", showMarks);
+ showTM = new TQCheckBox("show tiny marks", showMarks);
showTM->adjustSize();
showTM->move(5,15);
showTM->setChecked(true);
- connect(showTM, SIGNAL(toggled(bool)), SLOT(slotSetTinyMarks(bool)) );
- showLM = new QCheckBox("show little marks", showMarks);
+ connect(showTM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetTinyMarks(bool)) );
+ showLM = new TQCheckBox("show little marks", showMarks);
showLM->adjustSize();
showLM->move(5,35);
showLM->setChecked(true);
- connect(showLM, SIGNAL(toggled(bool)), SLOT(slotSetLittleMarks(bool)) );
- showMM = new QCheckBox("show medium marks", showMarks);
+ connect(showLM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetLittleMarks(bool)) );
+ showMM = new TQCheckBox("show medium marks", showMarks);
showMM->adjustSize();
showMM->move(5,55);
showMM->setChecked(true);
- connect(showMM, SIGNAL(toggled(bool)), SLOT(slotSetMediumMarks(bool)) );
- showBM = new QCheckBox("show big marks", showMarks);
+ connect(showMM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetMediumMarks(bool)) );
+ showBM = new TQCheckBox("show big marks", showMarks);
showBM->adjustSize();
showBM->move(5,75);
showBM->setChecked(true);
- connect(showBM, SIGNAL(toggled(bool)), SLOT(slotSetBigMarks(bool)) );
- showEM = new QCheckBox("show end marks", showMarks);
+ connect(showBM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetBigMarks(bool)) );
+ showEM = new TQCheckBox("show end marks", showMarks);
showEM->adjustSize();
showEM->move(5,95);
showEM->setChecked(true);
- connect(showEM, SIGNAL(toggled(bool)), SLOT(slotSetEndMarks(bool)) );
- showPT = new QCheckBox("show ruler pointer", showMarks);
+ connect(showEM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetEndMarks(bool)) );
+ showPT = new TQCheckBox("show ruler pointer", showMarks);
showPT->adjustSize();
showPT->move(5,115);
showPT->setChecked(true);
- connect(showPT, SIGNAL(toggled(bool)), SLOT(slotSetRulerPointer(bool)) );
- fixLen = new QCheckBox("fix ruler length", showMarks);
+ connect(showPT, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetRulerPointer(bool)) );
+ fixLen = new TQCheckBox("fix ruler length", showMarks);
fixLen->adjustSize();
fixLen->move(5,135);
fixLen->setChecked(true);
- connect(fixLen, SIGNAL(toggled(bool)), SLOT(slotFixRulerLength(bool)) );
- connect(fixLen, SIGNAL(toggled(bool)), SLOT(slotCheckLength(bool)) );
+ connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFixRulerLength(bool)) );
+ connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckLength(bool)) );
- lineEdit = new QGroupBox("Value of begin/end", bigwidget);
+ lineEdit = new TQGroupBox("Value of begin/end", bigwidget);
lineEdit->setFixedSize(140, 80);
lineEdit->move(330,4+160);
beginMark = new KIntNumInput(0, lineEdit);
beginMark->setRange(-1000, 1000, 1, false);
beginMark->move(5, 15);
beginMark->setFixedSize(beginMark->sizeHint());
- connect(beginMark, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotNewOffset(int)) );
- connect(beginMark, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotNewOffset(int)) );
+ connect(beginMark, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotNewOffset(int)) );
+ connect(beginMark, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotNewOffset(int)) );
endMark = new KIntNumInput(0, lineEdit);
endMark->setRange(-1000, 1000, 1, false);
endMark->move(5, 35);
endMark->setFixedSize(endMark->sizeHint());
- connect(endMark, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotEndOffset(int)) );
- connect(endMark, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotEndOffset(int)) );
+ connect(endMark, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotEndOffset(int)) );
+ connect(endMark, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotEndOffset(int)) );
lengthInput = new KIntNumInput(0, lineEdit);
lengthInput->setRange(-1000, 1000, 1, false);
lengthInput->move(5, 55);
lengthInput->setFixedSize(lengthInput->sizeHint());
- connect(lengthInput, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotEndOffset(int)) );
- connect(lengthInput, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotEndOffset(int)) );
+ connect(lengthInput, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotEndOffset(int)) );
+ connect(lengthInput, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotEndOffset(int)) );
- vertrot = new QGroupBox("Value of rotate translate for Vert.", bigwidget);
+ vertrot = new TQGroupBox("Value of rotate translate for Vert.", bigwidget);
vertrot->setFixedSize(140, 80);
vertrot->move(330,4+160+80+4);
transX = new KDoubleNumInput(0.0, vertrot);
@@ -171,48 +171,48 @@ KRulerTest::KRulerTest( const char *name )
transX->move(5, 15);
transX->setFixedSize(transX->sizeHint());
//transX->setLabel("transx", AlignLeft);
- connect(transX, SIGNAL(valueChanged(double)),
- SLOT(slotSetXTrans(double)) );
+ connect(transX, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetXTrans(double)) );
transY = new KDoubleNumInput(-12.0, vertrot);
transY->setRange(-1000, 1000, 1, false);
transY->move(5, 35);
transY->setFixedSize(transY->sizeHint());
//transY->setLabel("transy", AlignLeft);
- connect(transY, SIGNAL(valueChanged(double)),
- SLOT(slotSetYTrans(double)) );
+ connect(transY, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetYTrans(double)) );
rotV = new KDoubleNumInput(90.0, vertrot);
rotV->setRange(-1000, 1000, 1, false);
rotV->move(5, 55);
rotV->setFixedSize(rotV->sizeHint());
//rotV->setLabel("rot", AlignLeft);
- connect(rotV, SIGNAL(valueChanged(double)),
- SLOT(slotSetRotate(double)) );
+ connect(rotV, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetRotate(double)) );
- metricstyle = new QButtonGroup("metric styles", bigwidget);
+ metricstyle = new TQButtonGroup("metric styles", bigwidget);
metricstyle->setFixedSize(100, 120);
metricstyle->move(330-110,4);
- pixelmetric = new QRadioButton("pixel", metricstyle);
+ pixelmetric = new TQRadioButton("pixel", metricstyle);
pixelmetric->adjustSize();
pixelmetric->move(5,15);
metricstyle->insert(pixelmetric, (int)KRuler::Pixel);
- inchmetric = new QRadioButton("inch", metricstyle);
+ inchmetric = new TQRadioButton("inch", metricstyle);
inchmetric->adjustSize();
inchmetric->move(5,35);
metricstyle->insert(inchmetric, (int)KRuler::Inch);
- mmmetric = new QRadioButton("millimeter", metricstyle);
+ mmmetric = new TQRadioButton("millimeter", metricstyle);
mmmetric->adjustSize();
mmmetric->move(5,55);
metricstyle->insert(mmmetric, (int)KRuler::Millimetres);
- cmmetric = new QRadioButton("centimeter", metricstyle);
+ cmmetric = new TQRadioButton("centimeter", metricstyle);
cmmetric->adjustSize();
cmmetric->move(5,75);
metricstyle->insert(cmmetric, (int)KRuler::Centimetres);
- mmetric = new QRadioButton("meter", metricstyle);
+ mmetric = new TQRadioButton("meter", metricstyle);
mmetric->adjustSize();
mmetric->move(5,95);
metricstyle->insert(mmetric, (int)KRuler::Metres);
- connect ( metricstyle, SIGNAL(clicked(int)), SLOT(slotSetMStyle(int)) );
+ connect ( metricstyle, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotSetMStyle(int)) );
setCentralWidget(mainframe);
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
KRulerTest *window;
testapp = new KApplication(argc, argv,"krulertest");
- testapp->setFont(QFont("Helvetica",12),true);
+ testapp->setFont(TQFont("Helvetica",12),true);
window = new KRulerTest("main");
testapp->setMainWidget(window);
diff --git a/kdeui/tests/krulertest.h b/kdeui/tests/krulertest.h
index ba9938deb..20ee8d372 100644
--- a/kdeui/tests/krulertest.h
+++ b/kdeui/tests/krulertest.h
@@ -5,10 +5,10 @@
#include <kapplication.h>
#include <kmainwindow.h>
-#include <qwidget.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <knuminput.h>
class KRuler;
@@ -23,7 +23,7 @@ class MouseWidget : public QFrame
{
Q_OBJECT
public:
-MouseWidget( QWidget *parent=0, const char *name=0, WFlags f=0 );
+MouseWidget( TQWidget *parent=0, const char *name=0, WFlags f=0 );
signals:
void newXPos(int);
@@ -32,10 +32,10 @@ signals:
void newHeight(int);
protected:
- virtual void mousePressEvent ( QMouseEvent * );
- virtual void mouseReleaseEvent ( QMouseEvent * );
- virtual void mouseMoveEvent ( QMouseEvent * );
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void mousePressEvent ( TQMouseEvent * );
+ virtual void mouseReleaseEvent ( TQMouseEvent * );
+ virtual void mouseMoveEvent ( TQMouseEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
private:
bool mouseButtonDown;
@@ -74,17 +74,17 @@ private slots:
private:
KRuler *hruler, *vruler;
- QGridLayout *layout;
- QFrame *miniwidget, *bigwidget;
- QFrame *mainframe;
+ TQGridLayout *layout;
+ TQFrame *miniwidget, *bigwidget;
+ TQFrame *mainframe;
- QLabel *mouse_message;
- QGroupBox *showMarks, *lineEdit, *vertrot;
- QCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
+ TQLabel *mouse_message;
+ TQGroupBox *showMarks, *lineEdit, *vertrot;
+ TQCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
KIntNumInput *beginMark, *endMark, *lengthInput;
KDoubleNumInput *transX, *transY, *rotV;
- QButtonGroup *metricstyle;
- QRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
+ TQButtonGroup *metricstyle;
+ TQRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
};
#endif
diff --git a/kdeui/tests/kseparatortest.cpp b/kdeui/tests/kseparatortest.cpp
index 2abd84448..17e965ca8 100644
--- a/kdeui/tests/kseparatortest.cpp
+++ b/kdeui/tests/kseparatortest.cpp
@@ -19,19 +19,19 @@
#include <kapplication.h>
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include "kseparator.h"
int main(int argc, char **argv)
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
- QWidget *toplevel = new QWidget();
+ TQWidget *toplevel = new TQWidget();
- QBoxLayout *mainbox = new QBoxLayout(toplevel, QBoxLayout::TopToBottom, 10);
+ TQBoxLayout *mainbox = new TQBoxLayout(toplevel, TQBoxLayout::TopToBottom, 10);
KSeparator *sep1 = new KSeparator( KSeparator::VLine, toplevel );
mainbox->addWidget(sep1);
diff --git a/kdeui/tests/kspelltest.cpp b/kdeui/tests/kspelltest.cpp
index 4511edd6c..9180ed376 100644
--- a/kdeui/tests/kspelltest.cpp
+++ b/kdeui/tests/kspelltest.cpp
@@ -20,26 +20,26 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqtextcodec.h>
int main(int argc, char **argv)
{
KApplication *app = new KApplication(argc, argv, "KSpellTest");
// test ASCII
- //QString text( "I have noo idee of how to wride englisch or englisch" );
+ //TQString text( "I have noo idee of how to wride englisch or englisch" );
// test Latin-3 (need dictionary "esperanto" and "Latin3" in config)
- //QCString ctext( "sed jen: e¶oþanø' æiu¼aýde; e¶uþunøo øiun fendredon - kaj dimanøon...");
- //QTextCodec *codec = QTextCodec::codecForName("ISO 8859-3");
+ //TQCString ctext( "sed jen: e¶oþanø' æiu¼aýde; e¶uþunøo øiun fendredon - kaj dimanøon...");
+ //TQTextCodec *codec = TQTextCodec::codecForName("ISO 8859-3");
// test UTF-8 (need dictionary "esperanto" and "UTF-8" in config)
- QCString ctext( "sed jen: e\304\245oÅanÄo ĉiuĵaÅ­de e\304\245uÅunÄo Äiun fendredon kaj dimanÄon");
- QTextCodec *codec = QTextCodec::codecForName("UTF-8");
+ TQCString ctext( "sed jen: e\304\245oÅanÄo ĉiuĵaÅ­de e\304\245uÅunÄo Äiun fendredon kaj dimanÄon");
+ TQTextCodec *codec = TQTextCodec::codecForName("UTF-8");
- QString text = codec->toUnicode(ctext.data());
+ TQString text = codec->toUnicode(ctext.data());
KSpell::modalCheck( text );
diff --git a/kdeui/tests/kstatusbartest.cpp b/kdeui/tests/kstatusbartest.cpp
index 80b92c446..a85689494 100644
--- a/kdeui/tests/kstatusbartest.cpp
+++ b/kdeui/tests/kstatusbartest.cpp
@@ -1,11 +1,11 @@
-#include <qpopupmenu.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qmessagebox.h>
-#include <qmultilineedit.h>
-#include <qkeycode.h>
-#include <qpixmap.h>
-#include <qcursor.h>
+#include <tqpopupmenu.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqmessagebox.h>
+#include <tqmultilineedit.h>
+#include <tqkeycode.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
#include <stdlib.h>
@@ -15,7 +15,7 @@
#include <kmenubar.h>
#include "kstatusbartest.h"
-testWindow::testWindow (QWidget *, const char *name)
+testWindow::testWindow (TQWidget *, const char *name)
: KMainWindow (0, name)
{
// Setup Menus
@@ -23,7 +23,7 @@ testWindow::testWindow (QWidget *, const char *name)
fileMenu = new QPopupMenu;
menuBar->insertItem ("&File", fileMenu);
fileMenu->insertItem ("&Exit", KApplication::kApplication(),
- SLOT( quit() ), ALT + Key_Q );
+ TQT_SLOT( quit() ), ALT + Key_Q );
statusbar = new KStatusBar (this);
statusbar->insertItem("Zoom: XXXX", 0);
statusbar->insertItem("XXX", 1);
@@ -34,10 +34,10 @@ testWindow::testWindow (QWidget *, const char *name)
insert = true;
statusbar->changeItem("Line: 13567", 2);
- connect (statusbar, SIGNAL(pressed(int)), this, SLOT(slotPress(int)));
- connect (statusbar, SIGNAL(released(int)), this, SLOT(slotClick(int)));
+ connect (statusbar, TQT_SIGNAL(pressed(int)), this, TQT_SLOT(slotPress(int)));
+ connect (statusbar, TQT_SIGNAL(released(int)), this, TQT_SLOT(slotClick(int)));
- widget = new QMultiLineEdit (this);
+ widget = new TQMultiLineEdit (this);
setCentralWidget(widget);
@@ -53,7 +53,7 @@ testWindow::testWindow (QWidget *, const char *name)
smenu->insertItem("400%");
smenu->insertItem("oo%");
- connect (smenu, SIGNAL(activated(int)), this, SLOT(slotMenu(int)));
+ connect (smenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenu(int)));
}
void testWindow::slotClick(int id)
@@ -77,7 +77,7 @@ void testWindow::slotClick(int id)
break;
case 2:
- QMessageBox::information(0, "Go to line", "Enter line number:", "where?");
+ TQMessageBox::information(0, "Go to line", "Enter line number:", "where?");
statusbar->changeItem("16543", 2);
break;
}
@@ -86,12 +86,12 @@ void testWindow::slotClick(int id)
void testWindow::slotPress(int id)
{
if (id == 0)
- smenu->popup(QCursor::pos()); // This popup should understand keys up and down
+ smenu->popup(TQCursor::pos()); // This popup should understand keys up and down
}
void testWindow::slotMenu(int id)
{
- QString s = "Zoom: ";
+ TQString s = "Zoom: ";
s.append (smenu->text(id));
statusbar->changeItem(s,0);
}
diff --git a/kdeui/tests/kstatusbartest.h b/kdeui/tests/kstatusbartest.h
index ea59073b6..aa9aded27 100644
--- a/kdeui/tests/kstatusbartest.h
+++ b/kdeui/tests/kstatusbartest.h
@@ -2,7 +2,7 @@
#define test_kstatusbar_h
#include <kmenubar.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kstatusbar.h>
#include <kmainwindow.h>
@@ -13,7 +13,7 @@ class testWindow : public KMainWindow
Q_OBJECT
public:
- testWindow (QWidget *parent=0, const char *name=0);
+ testWindow (TQWidget *parent=0, const char *name=0);
~testWindow ();
public slots:
@@ -22,12 +22,12 @@ public slots:
void slotMenu(int i);
protected:
- QPopupMenu *fileMenu;
- QPopupMenu *smenu;
+ TQPopupMenu *fileMenu;
+ TQPopupMenu *smenu;
KMenuBar *menuBar;
KStatusBar *statusbar;
bool insert;
- QMultiLineEdit *widget;
+ TQMultiLineEdit *widget;
};
#endif
diff --git a/kdeui/tests/ksystemtraytest.cpp b/kdeui/tests/ksystemtraytest.cpp
index 746246132..dcee78346 100644
--- a/kdeui/tests/ksystemtraytest.cpp
+++ b/kdeui/tests/ksystemtraytest.cpp
@@ -4,7 +4,7 @@
int main(int argc, char **argv)
{
KApplication app( argc, argv, "ksystemtraytest" );
- QLabel *l = new QLabel("System Tray Main Window", 0L);
+ TQLabel *l = new TQLabel("System Tray Main Window", 0L);
KSystemTray *tray = new KSystemTray( l );
tray->setText("Test");
l->show();
diff --git a/kdeui/tests/ktabctltest.cpp b/kdeui/tests/ktabctltest.cpp
index 20b7246c1..33e7fc5b7 100644
--- a/kdeui/tests/ktabctltest.cpp
+++ b/kdeui/tests/ktabctltest.cpp
@@ -3,22 +3,22 @@
*/
#include <kapplication.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qobject.h>
-#include <qlistbox.h>
-#include <qgroupbox.h>
-#include <qevent.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qtabdialog.h>
-#include <qtooltip.h>
-#include <qmessagebox.h>
-#include <qtabbar.h>
-#include <qpalette.h>
-#include <qmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqobject.h>
+#include <tqlistbox.h>
+#include <tqgroupbox.h>
+#include <tqevent.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqtabdialog.h>
+#include <tqtooltip.h>
+#include <tqmessagebox.h>
+#include <tqtabbar.h>
+#include <tqpalette.h>
+#include <tqmultilineedit.h>
#include <stdio.h>
#include <stdlib.h>
@@ -28,12 +28,12 @@
#include "ktabctl.h"
#include "ktabctltest.h"
-QFont default_font("Helvetica", 12);
+TQFont default_font("Helvetica", 12);
KApplication *a;
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("KTabCtl test application");
setMinimumSize(300, 200);
@@ -43,22 +43,22 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
*/
test = new KTabCtl(this, "test");
- connect(test, SIGNAL(tabSelected(int)), this, SLOT(tabChanged(int)));
- QWidget *w = new QWidget(test, "_page1");
- QPushButton *bt = new QPushButton("Click me to quit", w, "_bt1");
- connect(bt, SIGNAL(clicked()), this, SLOT(okPressed()));
+ connect(test, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(tabChanged(int)));
+ TQWidget *w = new TQWidget(test, "_page1");
+ TQPushButton *bt = new TQPushButton("Click me to quit", w, "_bt1");
+ connect(bt, TQT_SIGNAL(clicked()), this, TQT_SLOT(okPressed()));
bt->adjustSize();
bt->move(20, 20);
test->addTab(w, "Seite 1");
pages[0] = w;
- w = new QWidget(test, "_page2");
- e = new QMultiLineEdit(w, "_editor");
+ w = new TQWidget(test, "_page2");
+ e = new TQMultiLineEdit(w, "_editor");
e->setText("Write some usesless stuff here :-)");
w->resize(width(), height());
test->addTab(w, "Seite 2");
pages[1] = w;
- w = new QWidget(test, "_page3");
- bt = new QPushButton("This button does absolutely nothing", w, "_bt3");
+ w = new TQWidget(test, "_page3");
+ bt = new TQPushButton("This button does absolutely nothing", w, "_bt3");
bt->adjustSize();
bt->move(20, 20);
test->addTab(w, "Seite 3");
@@ -70,7 +70,7 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
adjustSize();
}
-void TopLevel::resizeEvent( QResizeEvent * )
+void TopLevel::resizeEvent( TQResizeEvent * )
{
test->resize(width(), height());
e->setGeometry(10, 10, pages[1]->width() - 20, pages[1]->height() - 20);
diff --git a/kdeui/tests/ktabctltest.h b/kdeui/tests/ktabctltest.h
index c010c993f..0090de1c9 100644
--- a/kdeui/tests/ktabctltest.h
+++ b/kdeui/tests/ktabctltest.h
@@ -5,7 +5,7 @@
#ifndef _KTABCTLTEST_H
#define _KTABCTLTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KTabCtl;
class QPushButton;
class QMultiLineEdit;
@@ -15,13 +15,13 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
KTabCtl *test;
- QPushButton *ok, *cancel;
- QMultiLineEdit *e;
- QWidget *pages[3];
+ TQPushButton *ok, *cancel;
+ TQMultiLineEdit *e;
+ TQWidget *pages[3];
public slots:
void okPressed();
void tabChanged(int);
diff --git a/kdeui/tests/ktabwidgettest.cpp b/kdeui/tests/ktabwidgettest.cpp
index 82db9109c..32ed5c89f 100644
--- a/kdeui/tests/ktabwidgettest.cpp
+++ b/kdeui/tests/ktabwidgettest.cpp
@@ -1,6 +1,6 @@
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qdragobject.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqdragobject.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -9,119 +9,119 @@
#include "ktabwidgettest.h"
-Test::Test( QWidget* parent, const char *name )
- :QVBox( parent, name ), mChange(0), mLeftWidget(0), mRightWidget(0),
+Test::Test( TQWidget* parent, const char *name )
+ :TQVBox( parent, name ), mChange(0), mLeftWidget(0), mRightWidget(0),
mLeftPopup( false ), mRightPopup( false ), mTabbarContextPopup( false ), mContextPopup( false )
{
resize( 600,300 );
mWidget = new KTabWidget( this );
- mWidget->addTab( new QLabel( "Testlabel 1", mWidget ), "One" );
- mWidget->addTab( new QLabel( "Testlabel 2", mWidget ), "Two" );
- mWidget->addTab( new QWidget( mWidget), SmallIcon( "konsole" ), "Three" );
- mWidget->addTab( new QWidget( mWidget), "Four" );
+ mWidget->addTab( new TQLabel( "Testlabel 1", mWidget ), "One" );
+ mWidget->addTab( new TQLabel( "Testlabel 2", mWidget ), "Two" );
+ mWidget->addTab( new TQWidget( mWidget), SmallIcon( "konsole" ), "Three" );
+ mWidget->addTab( new TQWidget( mWidget), "Four" );
mWidget->setTabColor( mWidget->page(0), Qt::red );
mWidget->setTabColor( mWidget->page(1), Qt::blue );
- connect( mWidget, SIGNAL( currentChanged( QWidget * ) ), SLOT( currentChanged( QWidget * ) ) );
- connect( mWidget, SIGNAL( contextMenu( QWidget *, const QPoint & )), SLOT(contextMenu( QWidget *, const QPoint & )));
- connect( mWidget, SIGNAL( contextMenu( const QPoint & )), SLOT(tabbarContextMenu( const QPoint & )));
- connect( mWidget, SIGNAL( mouseDoubleClick( QWidget * )), SLOT(mouseDoubleClick( QWidget * )));
- connect( mWidget, SIGNAL( mouseMiddleClick() ), SLOT(addTab() ));
- connect( mWidget, SIGNAL( mouseMiddleClick( QWidget * )), SLOT(mouseMiddleClick( QWidget * )));
- connect( mWidget, SIGNAL( closeRequest( QWidget * )), SLOT(mouseMiddleClick( QWidget * )));
- connect( mWidget, SIGNAL( testCanDecode(const QDragMoveEvent *, bool & )), SLOT(testCanDecode(const QDragMoveEvent *, bool & )));
- connect( mWidget, SIGNAL( receivedDropEvent( QDropEvent * )), SLOT(receivedDropEvent( QDropEvent * )));
- connect( mWidget, SIGNAL( receivedDropEvent( QWidget *, QDropEvent * )), SLOT(receivedDropEvent( QWidget *, QDropEvent * )));
- connect( mWidget, SIGNAL( initiateDrag( QWidget * )), SLOT(initiateDrag( QWidget * )));
- connect( mWidget, SIGNAL( movedTab( int, int )), SLOT(movedTab( int, int )));
+ connect( mWidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), TQT_SLOT( currentChanged( TQWidget * ) ) );
+ connect( mWidget, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & )), TQT_SLOT(contextMenu( TQWidget *, const TQPoint & )));
+ connect( mWidget, TQT_SIGNAL( contextMenu( const TQPoint & )), TQT_SLOT(tabbarContextMenu( const TQPoint & )));
+ connect( mWidget, TQT_SIGNAL( mouseDoubleClick( TQWidget * )), TQT_SLOT(mouseDoubleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( mouseMiddleClick() ), TQT_SLOT(addTab() ));
+ connect( mWidget, TQT_SIGNAL( mouseMiddleClick( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( closeRequest( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SLOT(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQDropEvent * )));
+ connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQWidget *, TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQWidget *, TQDropEvent * )));
+ connect( mWidget, TQT_SIGNAL( initiateDrag( TQWidget * )), TQT_SLOT(initiateDrag( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( movedTab( int, int )), TQT_SLOT(movedTab( int, int )));
mWidget->setTabReorderingEnabled( true );
- QWidget * grid = new QWidget(this);
- QGridLayout * gridlayout = new QGridLayout( grid, 5, 2 );
+ TQWidget * grid = new TQWidget(this);
+ TQGridLayout * gridlayout = new TQGridLayout( grid, 5, 2 );
- QPushButton * addTab = new QPushButton( "Add Tab", grid );
+ TQPushButton * addTab = new TQPushButton( "Add Tab", grid );
gridlayout->addWidget( addTab, 0, 0 );
- connect( addTab, SIGNAL( clicked() ), SLOT( addTab() ) );
+ connect( addTab, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) );
- QPushButton * removeTab = new QPushButton( "Remove Current Tab", grid );
+ TQPushButton * removeTab = new TQPushButton( "Remove Current Tab", grid );
gridlayout->addWidget( removeTab, 0, 1 );
- connect( removeTab, SIGNAL( clicked() ), SLOT( removeCurrentTab() ) );
+ connect( removeTab, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) );
- mLeftButton = new QCheckBox( "Show left button", grid );
+ mLeftButton = new TQCheckBox( "Show left button", grid );
gridlayout->addWidget( mLeftButton, 1, 0 );
- connect( mLeftButton, SIGNAL( toggled(bool) ), SLOT( toggleLeftButton(bool) ) );
+ connect( mLeftButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftButton(bool) ) );
mLeftButton->setChecked(true);
- QCheckBox * leftPopup = new QCheckBox( "Enable left popup", grid );
+ TQCheckBox * leftPopup = new TQCheckBox( "Enable left popup", grid );
gridlayout->addWidget( leftPopup, 2, 0 );
- connect( leftPopup, SIGNAL( toggled(bool) ), SLOT( toggleLeftPopup(bool) ) );
+ connect( leftPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftPopup(bool) ) );
leftPopup->setChecked(true);
- mRightButton = new QCheckBox( "Show right button", grid );
+ mRightButton = new TQCheckBox( "Show right button", grid );
gridlayout->addWidget( mRightButton, 1, 1 );
- connect( mRightButton, SIGNAL( toggled(bool) ), SLOT( toggleRightButton(bool) ) );
+ connect( mRightButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightButton(bool) ) );
mRightButton->setChecked(true);
- QCheckBox * rightPopup = new QCheckBox( "Enable right popup", grid );
+ TQCheckBox * rightPopup = new TQCheckBox( "Enable right popup", grid );
gridlayout->addWidget( rightPopup, 2, 1 );
- connect( rightPopup, SIGNAL( toggled(bool) ), SLOT( toggleRightPopup(bool) ) );
+ connect( rightPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightPopup(bool) ) );
rightPopup->setChecked(true);
- mTabsBottom = new QCheckBox( "Show tabs at bottom", grid );
+ mTabsBottom = new TQCheckBox( "Show tabs at bottom", grid );
gridlayout->addWidget( mTabsBottom, 3, 0 );
- connect( mTabsBottom, SIGNAL( toggled(bool) ), SLOT( toggleTabPosition(bool) ) );
+ connect( mTabsBottom, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabPosition(bool) ) );
- QCheckBox * tabshape = new QCheckBox( "Triangular tab shape", grid );
+ TQCheckBox * tabshape = new TQCheckBox( "Triangular tab shape", grid );
gridlayout->addWidget( tabshape, 3, 1 );
- connect( tabshape, SIGNAL( toggled(bool) ), SLOT( toggleTabShape(bool) ) );
+ connect( tabshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) );
- QCheckBox *tabClose = new QCheckBox( "Close button on icon hover", grid );
+ TQCheckBox *tabClose = new TQCheckBox( "Close button on icon hover", grid );
gridlayout->addWidget( tabClose, 4, 0 );
- connect( tabClose, SIGNAL( toggled(bool) ), SLOT( toggleCloseButtons(bool) ) );
+ connect( tabClose, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleCloseButtons(bool) ) );
tabClose->setChecked(true);
- QCheckBox * showlabels = new QCheckBox( "Show labels", grid );
+ TQCheckBox * showlabels = new TQCheckBox( "Show labels", grid );
gridlayout->addWidget( showlabels, 4, 1 );
- connect( showlabels, SIGNAL( toggled(bool) ), this, SLOT( toggleLabels(bool) ) );
+ connect( showlabels, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( toggleLabels(bool) ) );
}
-void Test::currentChanged(QWidget* w)
+void Test::currentChanged(TQWidget* w)
{
mWidget->setTabColor( w, Qt::black );
}
void Test::addTab()
{
- mWidget->addTab( new QWidget( mWidget ), SmallIcon( "konsole" ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ mWidget->addTab( new TQWidget( mWidget ), SmallIcon( "konsole" ), TQString("Tab %1").arg( mWidget->count()+1 ) );
}
-void Test::testCanDecode(const QDragMoveEvent *e, bool &accept /* result */)
+void Test::testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */)
{
- if ( QTextDrag::canDecode(e) ) // don't accept=false if it cannot be decoded!
+ if ( TQTextDrag::canDecode(e) ) // don't accept=false if it cannot be decoded!
accept = true;
}
-void Test::receivedDropEvent( QDropEvent *e )
+void Test::receivedDropEvent( TQDropEvent *e )
{
- QString dropText;
- if (QTextDrag::decode(e, dropText)) {
- mWidget->addTab( new QWidget( mWidget), dropText );
+ TQString dropText;
+ if (TQTextDrag::decode(e, dropText)) {
+ mWidget->addTab( new TQWidget( mWidget), dropText );
}
}
-void Test::receivedDropEvent( QWidget *w, QDropEvent *e )
+void Test::receivedDropEvent( TQWidget *w, TQDropEvent *e )
{
- QString dropText;
- if (QTextDrag::decode(e, dropText)) {
+ TQString dropText;
+ if (TQTextDrag::decode(e, dropText)) {
mWidget->changeTab( w, dropText );
}
}
-void Test::initiateDrag( QWidget *w )
+void Test::initiateDrag( TQWidget *w )
{
- QDragObject *d = new QTextDrag( mWidget->label( mWidget->indexOf( w ) ), this );
+ TQDragObject *d = new TQTextDrag( mWidget->label( mWidget->indexOf( w ) ), this );
d->dragCopy(); // do NOT delete d.
}
@@ -136,11 +136,11 @@ void Test::toggleLeftButton(bool state)
{
if (state) {
if (!mLeftWidget) {
- mLeftWidget = new QToolButton( mWidget );
- connect( mLeftWidget, SIGNAL( clicked() ), SLOT( addTab() ) );
+ mLeftWidget = new TQToolButton( mWidget );
+ connect( mLeftWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) );
mLeftWidget->setIconSet( SmallIcon( "tab_new" ) );
mLeftWidget->setTextLabel("New");
- mLeftWidget->setTextPosition(QToolButton::Right);
+ mLeftWidget->setTextPosition(TQToolButton::Right);
mLeftWidget->adjustSize();
//mLeftWidget->setGeometry( 0, 0, h, h );
mLeftWidget->setPopup(mLeftPopup);
@@ -156,13 +156,13 @@ void Test::toggleLeftPopup(bool state)
{
if (state) {
if (!mLeftPopup) {
- mLeftPopup = new QPopupMenu(this);
+ mLeftPopup = new TQPopupMenu(this);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Empty Tab", 0);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Empty Tab After First", 3);
mLeftPopup->insertSeparator();
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Button Tab", 1);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Label Tab", 2);
- connect(mLeftPopup, SIGNAL(activated(int)), SLOT(leftPopupActivated(int)));
+ connect(mLeftPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(leftPopupActivated(int)));
}
mLeftWidget->setPopup(mLeftPopup);
}
@@ -173,13 +173,13 @@ void Test::toggleLeftPopup(bool state)
void Test::leftPopupActivated(int item)
{
switch (item) {
- case 0: mWidget->addTab( new QWidget( mWidget), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 0: mWidget->addTab( new TQWidget( mWidget), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 1: mWidget->addTab( new QPushButton( "Testbutton", mWidget ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 1: mWidget->addTab( new TQPushButton( "Testbutton", mWidget ), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 2: mWidget->addTab( new QLabel( "Testlabel", mWidget ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 2: mWidget->addTab( new TQLabel( "Testlabel", mWidget ), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 3: mWidget->insertTab( new QWidget( mWidget), QString("Tab %1").arg( mWidget->count()+1 ), 1 );
+ case 3: mWidget->insertTab( new TQWidget( mWidget), TQString("Tab %1").arg( mWidget->count()+1 ), 1 );
}
}
@@ -187,11 +187,11 @@ void Test::toggleRightButton(bool state)
{
if (state) {
if ( !mRightWidget) {
- mRightWidget = new QToolButton( mWidget );
- QObject::connect( mRightWidget, SIGNAL( clicked() ), SLOT( removeCurrentTab() ) );
+ mRightWidget = new TQToolButton( mWidget );
+ TQObject::connect( mRightWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) );
mRightWidget->setIconSet( SmallIcon( "tab_remove" ) );
mRightWidget->setTextLabel("Close");
- mRightWidget->setTextPosition(QToolButton::Right);
+ mRightWidget->setTextPosition(TQToolButton::Right);
mRightWidget->adjustSize();
//mRightButton->setGeometry( 0, 0, h, h );
mRightWidget->setPopup(mRightPopup);
@@ -207,12 +207,12 @@ void Test::toggleRightPopup(bool state)
{
if (state) {
if (!mRightPopup) {
- mRightPopup = new QPopupMenu(this);
+ mRightPopup = new TQPopupMenu(this);
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Current Tab", 1);
mRightPopup->insertSeparator();
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Left Tab", 0);
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Right Tab", 2);
- connect(mRightPopup, SIGNAL(activated(int)), SLOT(rightPopupActivated(int)));
+ connect(mRightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(rightPopupActivated(int)));
}
mRightWidget->setPopup(mRightPopup);
}
@@ -238,12 +238,12 @@ void Test::rightPopupActivated(int item)
void Test::toggleTabPosition(bool state)
{
- mWidget->setTabPosition(state ? QTabWidget::Bottom : QTabWidget::Top);
+ mWidget->setTabPosition(state ? TQTabWidget::Bottom : TQTabWidget::Top);
}
void Test::toggleTabShape(bool state)
{
- mWidget->setTabShape(state ? QTabWidget::Triangular : QTabWidget::Rounded);
+ mWidget->setTabShape(state ? TQTabWidget::Triangular : TQTabWidget::Rounded);
}
void Test::toggleCloseButtons(bool state)
@@ -251,12 +251,12 @@ void Test::toggleCloseButtons(bool state)
mWidget->setHoverCloseButton( state );
}
-void Test::contextMenu(QWidget *w, const QPoint &p)
+void Test::contextMenu(TQWidget *w, const TQPoint &p)
{
if (mContextPopup)
delete mContextPopup;
- mContextPopup = new QPopupMenu(this);
+ mContextPopup = new TQPopupMenu(this);
mContextPopup->insertItem( "Activate Tab", 4);
mContextPopup->insertSeparator();
mContextPopup->insertItem(SmallIcon( "konsole" ), "Set This Icon", 0);
@@ -264,7 +264,7 @@ void Test::contextMenu(QWidget *w, const QPoint &p)
mContextPopup->insertSeparator();
mContextPopup->insertItem( mWidget->isTabEnabled(w) ? "Disable Tab" : "Enable Tab", 2);
mContextPopup->insertItem( mWidget->tabToolTip(w).isEmpty() ? "Set Tooltip" : "Remove Tooltip", 3);
- connect(mContextPopup, SIGNAL(activated(int)), SLOT(contextMenuActivated(int)));
+ connect(mContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int)));
mContextWidget = w;
mContextPopup->popup(p);
@@ -290,17 +290,17 @@ void Test::contextMenuActivated(int item)
mContextPopup = 0;
}
-void Test::tabbarContextMenu(const QPoint &p)
+void Test::tabbarContextMenu(const TQPoint &p)
{
if (mTabbarContextPopup)
delete mTabbarContextPopup;
- mTabbarContextPopup = new QPopupMenu(this);
+ mTabbarContextPopup = new TQPopupMenu(this);
mTabbarContextPopup->insertItem(SmallIcon( "tab_new" ), mLeftWidget->isVisible() ? "Hide \"Add\" Button" : "Show \"Add\" Button", 0);
mTabbarContextPopup->insertItem(SmallIcon( "tab_remove" ), mRightWidget->isVisible() ? "Hide \"Remove\" Button" : "Show \"Remove\" Button", 1);
mTabbarContextPopup->insertSeparator();
- mTabbarContextPopup->insertItem(mWidget->tabPosition()==QTabWidget::Top ? "Put Tabbar to Bottom" : "Put Tabbar to Top", 2);
- connect(mTabbarContextPopup, SIGNAL(activated(int)), SLOT(tabbarContextMenuActivated(int)));
+ mTabbarContextPopup->insertItem(mWidget->tabPosition()==TQTabWidget::Top ? "Put Tabbar to Bottom" : "Put Tabbar to Top", 2);
+ connect(mTabbarContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(tabbarContextMenuActivated(int)));
mTabbarContextPopup->popup(p);
}
@@ -318,10 +318,10 @@ void Test::tabbarContextMenuActivated(int item)
mTabbarContextPopup = 0;
}
-void Test::mouseDoubleClick(QWidget *w)
+void Test::mouseDoubleClick(TQWidget *w)
{
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
"Rename Tab", "Enter new name:",
mWidget->label( mWidget->indexOf( w ) ), &ok, this );
if ( ok && !text.isEmpty() ) {
@@ -330,7 +330,7 @@ void Test::mouseDoubleClick(QWidget *w)
}
}
-void Test::mouseMiddleClick(QWidget *w)
+void Test::mouseMiddleClick(TQWidget *w)
{
if ( mWidget->count()==1 ) return;
diff --git a/kdeui/tests/ktabwidgettest.h b/kdeui/tests/ktabwidgettest.h
index cc96a24c6..2bd056cf8 100644
--- a/kdeui/tests/ktabwidgettest.h
+++ b/kdeui/tests/ktabwidgettest.h
@@ -2,22 +2,22 @@
#define KTABWIDGETTEST_H
#include <kiconloader.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <ktabwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
#include <stdlib.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <time.h>
-#include <qcheckbox.h>
-#include <qtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtoolbutton.h>
class Test : public QVBox
{
Q_OBJECT
public:
- Test( QWidget* parent=0, const char *name =0 );
+ Test( TQWidget* parent=0, const char *name =0 );
private slots:
void addTab();
@@ -31,15 +31,15 @@ private slots:
void toggleCloseButtons(bool);
void toggleLabels(bool);
- void currentChanged(QWidget*);
- void contextMenu(QWidget*, const QPoint&);
- void tabbarContextMenu(const QPoint&);
- void testCanDecode(const QDragMoveEvent *, bool & /* result */);
- void receivedDropEvent( QDropEvent* );
- void initiateDrag( QWidget * );
- void receivedDropEvent( QWidget *, QDropEvent * );
- void mouseDoubleClick(QWidget*);
- void mouseMiddleClick(QWidget*);
+ void currentChanged(TQWidget*);
+ void contextMenu(TQWidget*, const TQPoint&);
+ void tabbarContextMenu(const TQPoint&);
+ void testCanDecode(const TQDragMoveEvent *, bool & /* result */);
+ void receivedDropEvent( TQDropEvent* );
+ void initiateDrag( TQWidget * );
+ void receivedDropEvent( TQWidget *, TQDropEvent * );
+ void mouseDoubleClick(TQWidget*);
+ void mouseMiddleClick(TQWidget*);
void movedTab( int, int );
void leftPopupActivated(int);
@@ -51,18 +51,18 @@ private:
KTabWidget* mWidget;
int mChange;
- QCheckBox * mLeftButton;
- QCheckBox * mRightButton;
- QCheckBox * mTabsBottom;
+ TQCheckBox * mLeftButton;
+ TQCheckBox * mRightButton;
+ TQCheckBox * mTabsBottom;
- QToolButton* mLeftWidget;
- QToolButton* mRightWidget;
+ TQToolButton* mLeftWidget;
+ TQToolButton* mRightWidget;
- QPopupMenu* mLeftPopup;
- QPopupMenu* mRightPopup;
- QPopupMenu* mTabbarContextPopup;
- QPopupMenu* mContextPopup;
- QWidget* mContextWidget;
+ TQPopupMenu* mLeftPopup;
+ TQPopupMenu* mRightPopup;
+ TQPopupMenu* mTabbarContextPopup;
+ TQPopupMenu* mContextPopup;
+ TQWidget* mContextWidget;
};
diff --git a/kdeui/tests/ktextedittest.cpp b/kdeui/tests/ktextedittest.cpp
index d37afab30..d43f77260 100644
--- a/kdeui/tests/ktextedittest.cpp
+++ b/kdeui/tests/ktextedittest.cpp
@@ -20,7 +20,7 @@
#include <kapplication.h>
#include <ktextedit.h>
-#include <qfile.h>
+#include <tqfile.h>
int main( int argc, char **argv )
{
@@ -29,7 +29,7 @@ int main( int argc, char **argv )
edit->setReadOnly( true );
edit->setCheckSpellingEnabled( true );
- QFile file( "ktextedittest.cpp" );
+ TQFile file( "ktextedittest.cpp" );
if ( file.open( IO_ReadOnly ) )
{
edit->setText( file.readAll() );
diff --git a/kdeui/tests/ktoolbarlabelactiontest.cpp b/kdeui/tests/ktoolbarlabelactiontest.cpp
index 8ff2ccb74..020834605 100644
--- a/kdeui/tests/ktoolbarlabelactiontest.cpp
+++ b/kdeui/tests/ktoolbarlabelactiontest.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kmainwindow.h>
@@ -26,7 +26,7 @@
#include <ktoolbarlabelaction.h>
#include <ksqueezedtextlabel.h>
#include <kdebug.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <assert.h>
@@ -35,7 +35,7 @@ class MainWindow : public KMainWindow
public:
MainWindow()
{
- QVBox* main = new QVBox(this);
+ TQVBox* main = new TQVBox(this);
setCentralWidget(main);
KSqueezedTextLabel* accel = new KSqueezedTextLabel
@@ -65,7 +65,7 @@ public:
accel->setBuddy(lineEdit);
// third constructor
- QLabel* customLabel = new KSqueezedTextLabel
+ TQLabel* customLabel = new KSqueezedTextLabel
("&Really long, long, long and boring text goes here", this,
"kde toolbar widget");
diff --git a/kdeui/tests/kunbalancedgrdtest.cpp b/kdeui/tests/kunbalancedgrdtest.cpp
index ec3ce967b..7f5b2cc78 100644
--- a/kdeui/tests/kunbalancedgrdtest.cpp
+++ b/kdeui/tests/kunbalancedgrdtest.cpp
@@ -1,31 +1,31 @@
#include "kunbalancedgrdtest.h"
#include <kapplication.h>
#include <kpixmapeffect.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqlayout.h>
int cols = 3, rows = 3; // how many
-KGradientWidget::KGradientWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KGradientWidget::KGradientWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
time.start();
setMinimumSize(250 * cols, 250 * rows);
}
-void KGradientWidget::paintEvent(QPaintEvent *)
+void KGradientWidget::paintEvent(TQPaintEvent *)
{
int it, ft;
- QString say;
+ TQString say;
- QColor ca = Qt::black, cb = Qt::cyan;
+ TQColor ca = Qt::black, cb = Qt::cyan;
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
@@ -121,25 +121,25 @@ void KGradientWidget::paintEvent(QPaintEvent *)
p.drawText(5+(x++)*width()/rows, 15+y*height()/rows, say);
}
-myTopWidget::myTopWidget (QWidget *parent, const char *name)
- :QWidget(parent, name)
+myTopWidget::myTopWidget (TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 2, 3, 0);
+ TQGridLayout *lay = new TQGridLayout (this, 2, 3, 0);
grds = new KGradientWidget(this);
lay->addMultiCellWidget(grds, 0, 0 ,0, 2);
- bLabel = new QLabel("Balance: X = 000; Y = 000", this);
+ bLabel = new TQLabel("Balance: X = 000; Y = 000", this);
lay->addWidget(bLabel, 1, 0);
- xSlider = new QSlider ( -200, 200, 1, 100, QSlider::Horizontal, this);
+ xSlider = new TQSlider ( -200, 200, 1, 100, TQSlider::Horizontal, this);
lay->addWidget(xSlider, 1, 1);
- ySlider = new QSlider ( -200, 200, 1, 100, QSlider::Horizontal, this);
+ ySlider = new TQSlider ( -200, 200, 1, 100, TQSlider::Horizontal, this);
lay->addWidget(ySlider, 1, 2);
- connect(xSlider, SIGNAL(valueChanged(int)), this, SLOT(rebalance()));
- connect(ySlider, SIGNAL(valueChanged(int)), this, SLOT(rebalance()));
+ connect(xSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance()));
+ connect(ySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance()));
rebalance();
@@ -151,7 +151,7 @@ void myTopWidget::rebalance()
{
otime = time.elapsed();
- QString val; val.sprintf("Balance: X = %3d; Y = %3d",
+ TQString val; val.sprintf("Balance: X = %3d; Y = %3d",
xSlider->value(), ySlider->value());
bLabel->setText(val);
diff --git a/kdeui/tests/kunbalancedgrdtest.h b/kdeui/tests/kunbalancedgrdtest.h
index 6af7e4e92..bc282b1ce 100644
--- a/kdeui/tests/kunbalancedgrdtest.h
+++ b/kdeui/tests/kunbalancedgrdtest.h
@@ -7,24 +7,24 @@
#ifndef __KGRADIENT_TEST_H
#define __KGRADIENT_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qdatetime.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
class KGradientWidget : public QWidget
{
public:
- KGradientWidget(QWidget *parent=0, const char *name=0);
+ KGradientWidget(TQWidget *parent=0, const char *name=0);
void setBalance(int a, int b) { xbalance = a; ybalance = b; }
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
int xbalance, ybalance;
- QTime time;
+ TQTime time;
};
@@ -32,14 +32,14 @@ class myTopWidget: public QWidget
{
Q_OBJECT
public:
- myTopWidget(QWidget *parent=0, const char *name=0);
+ myTopWidget(TQWidget *parent=0, const char *name=0);
private:
- QLabel *bLabel;
- QSlider *xSlider, *ySlider;
+ TQLabel *bLabel;
+ TQSlider *xSlider, *ySlider;
KGradientWidget *grds;
- QTime time;
+ TQTime time;
int itime, otime;
diff --git a/kdeui/tests/kwindowtest.cpp b/kdeui/tests/kwindowtest.cpp
index ae19dd7e3..288ab554f 100644
--- a/kdeui/tests/kwindowtest.cpp
+++ b/kdeui/tests/kwindowtest.cpp
@@ -1,10 +1,10 @@
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qpixmap.h>
-#include <qkeycode.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qcursor.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqpixmap.h>
+#include <tqkeycode.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqcursor.h>
#include <stdlib.h>
@@ -17,7 +17,7 @@
#include <ktoolbarradiogroup.h>
#include <kiconloader.h>
#include <kpopupmenu.h>
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include "kwindowtest.h"
#include <kglobal.h>
@@ -37,7 +37,7 @@
static int itemId = 0;
-testWindow::testWindow (QWidget *parent, const char *name)
+testWindow::testWindow (TQWidget *parent, const char *name)
: KMainWindow (parent,name)
{
ena=false;
@@ -56,13 +56,13 @@ setAutoSaveSettings();
// We insert item "Exit" with accelerator ALT-Q, and connect
// it to application's exit-slot.
fileMenu->insertItem ("&Exit", KApplication::kApplication(),
- SLOT( quit() ), ALT + Key_Q );
+ TQT_SLOT( quit() ), ALT + Key_Q );
// Another popup...
toolBarMenu = new QPopupMenu;
menuBar->insertItem ("&Toolbars", toolBarMenu);
- toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, SLOT(slotHide1()));
- toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, SLOT(slotHide2()));
+ toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, TQT_SLOT(slotHide1()));
+ toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, TQT_SLOT(slotHide2()));
itemsMenu = new QPopupMenu;
menuBar->insertItem ("&Items", itemsMenu);
@@ -71,15 +71,15 @@ setAutoSaveSettings();
lineL = true; // Lined is enabled
greenF = false; // Frame not inserted
- itemsMenu->insertItem ("delete/insert exit button", this, SLOT(slotExit()));
- itemsMenu->insertItem ("insert/delete green frame!", this, SLOT(slotFrame()));
- itemsMenu->insertItem ("enable/disable Lined", this, SLOT(slotLined()));
- itemsMenu->insertItem ("Toggle fileNew", this, SLOT(slotNew()));
- itemsMenu->insertItem ("Clear comboBox", this, SLOT(slotClearCombo()));
- itemsMenu->insertItem ("Insert List in Combo", this, SLOT(slotInsertListInCombo()));
- itemsMenu->insertItem ("Make item 3 curent", this, SLOT(slotMakeItem3Current()));
- //itemsMenu->insertItem ("Insert clock!", this, SLOT(slotInsertClock()));
- itemsMenu->insertItem ("Important!", this, SLOT(slotImportant()));
+ itemsMenu->insertItem ("delete/insert exit button", this, TQT_SLOT(slotExit()));
+ itemsMenu->insertItem ("insert/delete green frame!", this, TQT_SLOT(slotFrame()));
+ itemsMenu->insertItem ("enable/disable Lined", this, TQT_SLOT(slotLined()));
+ itemsMenu->insertItem ("Toggle fileNew", this, TQT_SLOT(slotNew()));
+ itemsMenu->insertItem ("Clear comboBox", this, TQT_SLOT(slotClearCombo()));
+ itemsMenu->insertItem ("Insert List in Combo", this, TQT_SLOT(slotInsertListInCombo()));
+ itemsMenu->insertItem ("Make item 3 curent", this, TQT_SLOT(slotMakeItem3Current()));
+ //itemsMenu->insertItem ("Insert clock!", this, TQT_SLOT(slotInsertClock()));
+ itemsMenu->insertItem ("Important!", this, TQT_SLOT(slotImportant()));
menuBar->insertSeparator();
helpMenu = new KHelpMenu(this, "KWindowTest was programmed by Sven Radej");
@@ -93,7 +93,7 @@ setAutoSaveSettings();
statusBar->insertItem("Look for tooltips to see functions", 1);
//DigitalClock *clk = new DigitalClock (statusBar);
- //clk->setFrameStyle(QFrame::NoFrame);
+ //clk->setFrameStyle(TQFrame::NoFrame);
//statusBar->insertWidget(clk, 70, 2);
/***********************/
@@ -101,7 +101,7 @@ setAutoSaveSettings();
/***********************/
// pixmap which we will use
- QPixmap pix;
+ TQPixmap pix;
// Create toolbar...
tb = toolBar();
@@ -113,30 +113,30 @@ setAutoSaveSettings();
// First four buttons
pix = BarIcon("filenew");
- itemId = tb->insertButton(pix, 0, SIGNAL(clicked()), this, SLOT(slotNew()),
+ itemId = tb->insertButton(pix, 0, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()),
true, "Create.. (toggles upper button)", 50);
pix = BarIcon("fileopen");
- tb->insertButton(pix, 1, SIGNAL(clicked()), this, SLOT(slotOpen()),
+ tb->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()),
false, "Open");
pix = BarIcon("filefloppy");
- tb->insertButton(pix, 2, SIGNAL(clicked()), this, SLOT(slotSave()),
+ tb->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()),
true, "Save (beep or delayed popup)");
tb->setDelayedPopup(2, itemsMenu);
pix = BarIcon("fileprint");
- tb->insertButton(pix, 3, SIGNAL(clicked()), this, SLOT(slotPrint()),
+ tb->insertButton(pix, 3, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrint()),
true, "Print (enables/disables open)");
// And a combobox
// arguments: text (or strList), ID, writable, signal, object, slot, enabled,
// tooltiptext, size
- tb->insertCombo (QString("one"), 4, true, SIGNAL(activated(const QString&)), this,
- SLOT(slotList(const QString&)), true, "ComboBox", 150);
+ tb->insertCombo (TQString("one"), 4, true, TQT_SIGNAL(activated(const TQString&)), this,
+ TQT_SLOT(slotList(const TQString&)), true, "ComboBox", 150);
// Then one line editor
// arguments: text, id, signal, object (this), slot, enabled, tooltiptext, size
- tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, SIGNAL(returnPressed()), this,
- SLOT(slotReturn()), true, "Location", 200);
+ tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, TQT_SIGNAL(returnPressed()), this,
+ TQT_SLOT(slotReturn()), true, "Location", 200);
// Set this Lined to auto size itself. Note that only one item (Lined or Combo)
// Can be set to autosize; If you specify more of them only last (according to
@@ -148,27 +148,27 @@ setAutoSaveSettings();
// Now add another button and align it right
pix = BarIcon("exit");
- tb->insertButton(pix, 6, SIGNAL(clicked()), KApplication::kApplication(),
- SLOT( quit() ), true, "Exit");
+ tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(),
+ TQT_SLOT( quit() ), true, "Exit");
tb->alignItemRight (6);
// Another toolbar
- tb1 = new KToolBar(this, QMainWindow::DockTop); // this one is normal and has separators
+ tb1 = new KToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators
pix = BarIcon("filenew");
tb1->insertButton(pix, 0, true, "Create new file2 (Toggle)");
tb1->setToggle(0);
- tb1->addConnection (0, SIGNAL(toggled(bool)), this, SLOT(slotToggle(bool)));
+ tb1->addConnection (0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggle(bool)));
pix = BarIcon("fileopen");
- tb1->insertButton(pix, 1, SIGNAL(clicked()), this, SLOT(slotOpen()),
+ tb1->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()),
true, "Open (starts progres in sb)");
tb1->insertSeparator ();
pix = BarIcon("filefloppy");
- tb1->insertButton(pix, 2, SIGNAL(clicked()), this, SLOT(slotSave()),
+ tb1->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()),
true, "Save file2 (autorepeat)");
tb1->setAutoRepeat(2);
@@ -201,14 +201,14 @@ setAutoSaveSettings();
rg->addButton(6);
rg->addButton(7);
- connect (tb1, SIGNAL(toggled(int)), this, SLOT(slotToggled(int)));
+ connect (tb1, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int)));
// Set caption for floating toolbars
tb->setTitle ("Toolbar 1");
tb1->setTitle ("Toolbar 2");
// Set main widget. In this example it is Qt's multiline editor.
- widget = new QMultiLineEdit (this);
+ widget = new TQMultiLineEdit (this);
// Setup is now complete
@@ -216,8 +216,8 @@ setAutoSaveSettings();
//addToolBar (tb1);
//addToolBar (tb);
- connect (tb, SIGNAL(highlighted(int,bool)), this, SLOT(slotMessage(int, bool)));
- connect (tb1, SIGNAL(highlighted(int, bool)), this, SLOT(slotMessage(int, bool)));
+ connect (tb, TQT_SIGNAL(highlighted(int,bool)), this, TQT_SLOT(slotMessage(int, bool)));
+ connect (tb1, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SLOT(slotMessage(int, bool)));
// Floating is enabled by default, so you don't need this.
// tb->enableFloating(true);
@@ -243,7 +243,7 @@ setAutoSaveSettings();
completions->insertItem("/home/");
completions->insertItem("/vmlinuz :-)");
- connect (completions, SIGNAL(activated(int)), this, SLOT(slotCompletionsMenu(int)));
+ connect (completions, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotCompletionsMenu(int)));
pr = 0;
}
/***********************************/
@@ -257,7 +257,7 @@ void testWindow::slotToggled(int)
void testWindow::slotInsertClock()
{
//DigitalClock *clock = new DigitalClock(tb1);
- //clock->setFrameStyle(QFrame::NoFrame);
+ //clock->setFrameStyle(TQFrame::NoFrame);
//tb1->insertWidget(8, 70, clock);
}
@@ -269,11 +269,11 @@ void testWindow::slotNew()
void testWindow::slotOpen()
{
if (pr == 0)
- pr = new QProgressBar (statusBar);
+ pr = new TQProgressBar (statusBar);
// statusBar->message(pr);
- timer = new QTimer (pr);
+ timer = new TQTimer (pr);
- connect (timer, SIGNAL(timeout()), this, SLOT(slotGoGoGoo()));
+ connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotGoGoGoo()));
timer->start(100);
}
@@ -303,14 +303,14 @@ void testWindow::slotPrint()
}
void testWindow::slotReturn()
{
- QString s = "You entered ";
+ TQString s = "You entered ";
s = s + tb->getLinedText(5);
statusBar->changeItem(s, 0);
}
-void testWindow::slotList(const QString &str)
+void testWindow::slotList(const TQString &str)
{
- QString s = "You chose ";
+ TQString s = "You chose ";
s = s + str;
statusBar->changeItem(s, 0);
}
@@ -319,13 +319,13 @@ void testWindow::slotCompletion()
{
// Now do a completion
// Call your completing function and set that text in klined
- // QString s = tb->getLinedText(/* ID */ 4)
- // QString completed = complete (s);
+ // TQString s = tb->getLinedText(/* ID */ 4)
+ // TQString completed = complete (s);
// tb->setLinedText(/* ID */ 4, completed.data())
// for now this:
- completions->popup(QCursor::pos()); // This popup should understunf keys up and down
+ completions->popup(TQCursor::pos()); // This popup should understunf keys up and down
/* This is just an example. KLined automatically sets cursor at end of string
when ctrl-d or ctrl-s is pressed. KToolBar will also put cursor at end of text in Lined
@@ -340,7 +340,7 @@ void testWindow::slotListCompletion()
Combo is not behaving good and it is ugly. I will see how it behaves in Qt-1.3,
and then decide should I make a new combobox.
*/
- QString s(tb->getComboItem(4)); // get text in combo
+ TQString s(tb->getComboItem(4)); // get text in combo
s+= "(completing)";
//tb->getCombo(4)->changeItem(s.data()); // setTextIncombo
@@ -349,7 +349,7 @@ void testWindow::slotListCompletion()
void testWindow::slotCompletionsMenu(int id)
{
// Now set text in lined
- QString s =completions->text(id);
+ TQString s =completions->text(id);
tb->setLinedText(5, s); // Cursor is automatically at the end of string after this
}
@@ -406,10 +406,10 @@ void testWindow::slotExit ()
}
else
{
- QPixmap pix;
+ TQPixmap pix;
pix = BarIcon("exit");
- tb->insertButton(pix, 6, SIGNAL(clicked()), KApplication::kApplication(),
- SLOT( quit() ), true, "Exit");
+ tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(),
+ TQT_SLOT( quit() ), true, "Exit");
tb->alignItemRight (6);
exitB = true;
}
@@ -437,7 +437,7 @@ void testWindow::slotFrame()
tb1->insertFrame(10, 100);
tb1->alignItemRight (10); // this is pointless 'cause tb1 is not fullwidth
- QFrame *myFrame = tb1->getFrame(10); // get frame pointer
+ TQFrame *myFrame = tb1->getFrame(10); // get frame pointer
if (myFrame == 0)
{
@@ -450,7 +450,7 @@ void testWindow::slotFrame()
// And don't move it
// If you want to have something right from your toolbar you can reduce its
// max_width with setMaxWidth()
- myFrame->setBackgroundColor (QColor("green"));
+ myFrame->setBackgroundColor (TQColor("green"));
greenF = true;
}
@@ -478,7 +478,7 @@ void testWindow::slotClearCombo()
void testWindow::slotInsertListInCombo()
{
- QStringList list;
+ TQStringList list;
list.append("ListOne");
list.append("ListTwo");
list.append("ListThree");
@@ -509,7 +509,7 @@ int main( int argc, char *argv[] )
myApp->setMainWidget(test);
- i = QMessageBox::information(0, "Select", "Select type of mainwidget",
+ i = TQMessageBox::information(0, "Select", "Select type of mainwidget",
"Fixed", "Y-fixed", "Resizable");
if (i == 0)
test->beFixed();
diff --git a/kdeui/tests/kwindowtest.h b/kdeui/tests/kwindowtest.h
index c041d7723..4441b6caa 100644
--- a/kdeui/tests/kwindowtest.h
+++ b/kdeui/tests/kwindowtest.h
@@ -1,9 +1,9 @@
#ifndef testwindow_h
#define testwindow_h
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qprogressbar.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
#include <kmenubar.h>
#include <kstatusbar.h>
#include <ktoolbar.h>
@@ -18,7 +18,7 @@ class testWindow : public KMainWindow
Q_OBJECT
public:
- testWindow (QWidget *parent=0, const char *name=0);
+ testWindow (TQWidget *parent=0, const char *name=0);
~testWindow ();
public slots:
@@ -29,7 +29,7 @@ public slots:
void slotPrint();
void slotReturn();
void slotSave();
- void slotList(const QString &str);
+ void slotList(const TQString &str);
void slotOpen();
void slotCompletion();
void slotCompletionsMenu(int id);
@@ -50,10 +50,10 @@ public slots:
void slotToggled(int);
protected:
KMenuBar *menuBar;
- QPopupMenu *fileMenu;
- QPopupMenu *itemsMenu;
- QPopupMenu *completions;
- QPopupMenu *toolBarMenu;
+ TQPopupMenu *fileMenu;
+ TQPopupMenu *itemsMenu;
+ TQPopupMenu *completions;
+ TQPopupMenu *toolBarMenu;
KStatusBar *statusBar;
KHelpMenu *helpMenu;
KToolBar *tb;
@@ -62,9 +62,9 @@ protected:
bool exitB;
bool greenF;
bool ena;
- QMultiLineEdit *widget;
- QTimer *timer;
- QProgressBar *pr;
+ TQMultiLineEdit *widget;
+ TQTimer *timer;
+ TQProgressBar *pr;
KToolBarRadioGroup *rg;
};
#endif
diff --git a/kdeui/tests/kwizardtest.cpp b/kdeui/tests/kwizardtest.cpp
index 2d5f7e288..960929f8c 100644
--- a/kdeui/tests/kwizardtest.cpp
+++ b/kdeui/tests/kwizardtest.cpp
@@ -18,8 +18,8 @@
*
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kwizard.h>
@@ -27,20 +27,20 @@ int main(int argc, char **argv)
{
KApplication a(argc,argv,"kwizardtest");
KWizard *wiz = new KWizard(0, "kwizardtest", false);
- QObject::connect((QObject*) wiz->cancelButton(), SIGNAL(clicked()),
- &a, SLOT(quit()));
- QObject::connect((QObject*) wiz->finishButton(), SIGNAL(clicked()),
- &a, SLOT(quit()));
+ TQObject::connect((TQObject*) wiz->cancelButton(), TQT_SIGNAL(clicked()),
+ &a, TQT_SLOT(quit()));
+ TQObject::connect((TQObject*) wiz->finishButton(), TQT_SIGNAL(clicked()),
+ &a, TQT_SLOT(quit()));
for(int i = 1; i < 11; i++)
{
- QWidget *p = new QWidget;
- QString msg = QString("This is page %1 out of 10").arg(i);
- QLabel *label = new QLabel(msg, p);
- QHBoxLayout *layout = new QHBoxLayout(p, 5);
+ TQWidget *p = new QWidget;
+ TQString msg = TQString("This is page %1 out of 10").arg(i);
+ TQLabel *label = new TQLabel(msg, p);
+ TQHBoxLayout *layout = new TQHBoxLayout(p, 5);
label->setAlignment(Qt::AlignCenter);
label->setFixedSize(300, 200);
layout->addWidget(label);
- QString title = QString("%1. page").arg(i);
+ TQString title = TQString("%1. page").arg(i);
wiz->addPage(p, title);
wiz->setFinishEnabled(p, (i==10));
}
diff --git a/kdeui/tests/kwordwraptest.cpp b/kdeui/tests/kwordwraptest.cpp
index 60a35b394..ad60bd897 100644
--- a/kdeui/tests/kwordwraptest.cpp
+++ b/kdeui/tests/kwordwraptest.cpp
@@ -18,17 +18,17 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kwordwrap.h"
int main(int argc, char *argv[])
{
KApplication app(argc, argv, "KWordWrapTest");
- QFont font( "helvetica", 12 ); // let's hope we all have the same...
- QFontMetrics fm( font );
- QRect r( 0, 0, 100, -1 );
- QString str = "test wadabada [/foo/bar/waba]";
+ TQFont font( "helvetica", 12 ); // let's hope we all have the same...
+ TQFontMetrics fm( font );
+ TQRect r( 0, 0, 100, -1 );
+ TQString str = "test wadabada [/foo/bar/waba]";
KWordWrap* ww = KWordWrap::formatText( fm, r, 0, str );
kdDebug() << str << " => " << ww->truncatedString() << endl;
delete ww;
diff --git a/kdeui/tests/kxmlguitest.cpp b/kdeui/tests/kxmlguitest.cpp
index 949eb03c4..a903aeb3f 100644
--- a/kdeui/tests/kxmlguitest.cpp
+++ b/kdeui/tests/kxmlguitest.cpp
@@ -8,8 +8,8 @@
#include <kdebug.h>
#include <kstdaction.h>
#include <kstandarddirs.h>
-#include <qlineedit.h>
-#include <qdir.h>
+#include <tqlineedit.h>
+#include <tqdir.h>
void Client::slotSec()
{
@@ -22,11 +22,11 @@ int main( int argc, char **argv )
// KXMLGUIClient looks in the "data" resource for the .rc files
// Let's add $PWD (ideally $srcdir instead...) to it
- KGlobal::dirs()->addResourceDir( "data", QDir::currentDirPath() );
+ KGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() );
KMainWindow *mainwindow = new KMainWindow;
- QLineEdit* line = new QLineEdit( mainwindow );
+ TQLineEdit* line = new TQLineEdit( mainwindow );
mainwindow->setCentralWidget( line );
mainwindow->show();
@@ -37,7 +37,7 @@ int main( int argc, char **argv )
Client *shell = new Client;
shell->setInstance( new KInstance( "konqueror" ) );
- shell->instance()->dirs()->addResourceDir( "data", QDir::currentDirPath() );
+ shell->instance()->dirs()->addResourceDir( "data", TQDir::currentDirPath() );
(void)new KAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" );
@@ -48,7 +48,7 @@ int main( int argc, char **argv )
Client *part = new Client;
(void)new KAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" );
- (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, SLOT( slotSec() ), part->actionCollection(), "security" );
+ (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" );
part->setXMLFile( "./kxmlguitest_part.rc" );
diff --git a/kdeui/tests/kxmlguitest.h b/kdeui/tests/kxmlguitest.h
index de651e8a9..1adb1a14b 100644
--- a/kdeui/tests/kxmlguitest.h
+++ b/kdeui/tests/kxmlguitest.h
@@ -2,15 +2,15 @@
#define KXMLGUITEST_H
#include <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
-class Client : public QObject, public KXMLGUIClient
+class Client : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
Client() {}
- void setXMLFile( const QString &f, bool merge = true ) { KXMLGUIClient::setXMLFile( f, merge ); }
+ void setXMLFile( const TQString &f, bool merge = true ) { KXMLGUIClient::setXMLFile( f, merge ); }
void setInstance( KInstance *inst ) { KXMLGUIClient::setInstance( inst ); }
public slots:
diff --git a/kdeui/tests/qxembedtest.cpp b/kdeui/tests/qxembedtest.cpp
index 513231051..5e870ba8f 100644
--- a/kdeui/tests/qxembedtest.cpp
+++ b/kdeui/tests/qxembedtest.cpp
@@ -1,11 +1,11 @@
#include <stdlib.h>
#include <stdio.h>
-#include "qapplication.h"
-#include "qpushbutton.h"
-#include "qlineedit.h"
-#include "qhbox.h"
-#include "qvbox.h"
+#include "tqapplication.h"
+#include "tqpushbutton.h"
+#include "tqlineedit.h"
+#include "tqhbox.h"
+#include "tqvbox.h"
#include "qxembed.h"
WId windowWithName(const char *);
@@ -23,13 +23,13 @@ main(int argc, char**argv)
}
- QApplication a(argc,argv);
+ TQApplication a(argc,argv);
- QWidget *main = new QVBox(NULL,"main",Qt::WDestructiveClose);
- QWidget *top = new QHBox(main);
- QPushButton *quit = new QPushButton("Quit", top);
- QObject::connect( quit, SIGNAL(clicked()), main, SLOT(close()) );
- QLineEdit *edit = new QLineEdit(top);
+ TQWidget *main = new TQVBox(NULL,"main",Qt::WDestructiveClose);
+ TQWidget *top = new TQHBox(main);
+ TQPushButton *quit = new TQPushButton("Quit", top);
+ TQObject::connect( quit, TQT_SIGNAL(clicked()), main, TQT_SLOT(close()) );
+ TQLineEdit *edit = new TQLineEdit(top);
edit->setText( "Just to see focus changes");
QXEmbed *embed = new QXEmbed(main);
embed->setProtocol(QXEmbed::XPLAIN);
@@ -57,7 +57,7 @@ main(int argc, char**argv)
#include <X11/Xlib.h>
-#include <qpaintdevice.h>
+#include <tqpaintdevice.h>
// This is lifted from X11 xprop.
diff --git a/kdewidgets/classpreviews.cpp b/kdewidgets/classpreviews.cpp
index 0c32142e1..93d495302 100644
--- a/kdewidgets/classpreviews.cpp
+++ b/kdewidgets/classpreviews.cpp
@@ -19,10 +19,10 @@
#include "classpreviews.h"
-KDialogPreview::KDialogPreview(QWidget * parent , const char * /* name , bool, WFlagsf */)
+KDialogPreview::KDialogPreview(TQWidget * parent , const char * /* name , bool, WFlagsf */)
{
if (parent)
- reparent(parent, QPoint(0,0), true);
+ reparent(parent, TQPoint(0,0), true);
else
qDebug("Error while reparenting!");
}
diff --git a/kdewidgets/classpreviews.h b/kdewidgets/classpreviews.h
index 2e5190000..c2b67f27e 100644
--- a/kdewidgets/classpreviews.h
+++ b/kdewidgets/classpreviews.h
@@ -35,7 +35,7 @@
class KDialogPreview : public KDialog
{
public:
- KDialogPreview(QWidget * parent = 0 , const char * name = 0/*, bool modal = false, WFlags f = 0*/);
+ KDialogPreview(TQWidget * parent = 0 , const char * name = 0/*, bool modal = false, WFlags f = 0*/);
};
#endif
diff --git a/kdewidgets/makekdewidgets.cpp b/kdewidgets/makekdewidgets.cpp
index 71421e856..c2339e5a1 100644
--- a/kdewidgets/makekdewidgets.cpp
+++ b/kdewidgets/makekdewidgets.cpp
@@ -6,11 +6,11 @@
#include <kmacroexpander.h>
#include <kdebug.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qbuffer.h>
-#include <qimage.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
static const char description[] = I18N_NOOP( "Builds Qt widget plugins from an ini style description file." );
static const char version[] = "0.2";
@@ -19,7 +19,7 @@ static const char classHeader[] = "/**\n"
"* The generated code in this file is licensed under the same license that the\n"
"* input file.\n"
"*/\n"
- "#include <qwidgetplugin.h>\n";
+ "#include <tqwidgetplugin.h>\n";
static const char classDef[] = "#ifndef EMBED_IMAGES\n"
"#include <kstandarddirs.h>\n"
"#endif\n"
@@ -31,76 +31,76 @@ static const char classDef[] = "#ifndef EMBED_IMAGES\n"
" \n"
" virtual ~%PluginName();\n"
" \n"
- " virtual QStringList keys() const\n"
+ " virtual TQStringList keys() const\n"
" {\n"
- " QStringList result;\n"
+ " TQStringList result;\n"
" for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it)\n"
" result << it.key();\n"
" return result;\n"
" }\n"
" \n"
- " virtual QWidget *create(const QString &key, QWidget *parent = 0, const char *name = 0);\n"
+ " virtual TQWidget *create(const TQString &key, TQWidget *parent = 0, const char *name = 0);\n"
" \n"
- " virtual QIconSet iconSet(const QString &key) const\n"
+ " virtual TQIconSet iconSet(const TQString &key) const\n"
" {\n"
"#ifdef EMBED_IMAGES\n"
- " QPixmap pix(m_widgets[key].iconSet);\n"
+ " TQPixmap pix(m_widgets[key].iconSet);\n"
"#else\n"
- " QPixmap pix(locate( \"data\", \n"
- " QString::fromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n"
+ " TQPixmap pix(locate( \"data\", \n"
+ " TQString::fromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n"
"#endif\n"
- " return QIconSet(pix);\n"
+ " return TQIconSet(pix);\n"
" }\n"
" \n"
- " virtual bool isContainer(const QString &key) const { return m_widgets[key].isContainer; }\n"
+ " virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; }\n"
" \n"
- " virtual QString group(const QString &key) const { return m_widgets[key].group; }\n"
+ " virtual TQString group(const TQString &key) const { return m_widgets[key].group; }\n"
" \n"
- " virtual QString includeFile(const QString &key) const { return m_widgets[key].includeFile; }\n"
+ " virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; }\n"
" \n"
- " virtual QString toolTip(const QString &key) const { return m_widgets[key].toolTip; }\n"
+ " virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; }\n"
" \n"
- " virtual QString whatsThis(const QString &key) const { return m_widgets[key].whatsThis; }\n"
+ " virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; }\n"
"private:\n"
" struct WidgetInfo\n"
" {\n"
- " QString group;\n"
+ " TQString group;\n"
"#ifdef EMBED_IMAGES\n"
- " QPixmap iconSet;\n"
+ " TQPixmap iconSet;\n"
"#else\n"
- " QString iconSet;\n"
+ " TQString iconSet;\n"
"#endif\n"
- " QString includeFile;\n"
- " QString toolTip;\n"
- " QString whatsThis;\n"
+ " TQString includeFile;\n"
+ " TQString toolTip;\n"
+ " TQString whatsThis;\n"
" bool isContainer;\n"
" };\n"
- " typedef QMap<QString, WidgetInfo> WidgetInfos;\n"
+ " typedef TQMap<TQString, WidgetInfo> WidgetInfos;\n"
" WidgetInfos m_widgets;\n"
"};\n"
"%PluginName::%PluginName()\n"
"{\n"
" WidgetInfo widget;\n";
-static const char widgetDef[] = " widget.group = QString::fromLatin1(\"%Group\");\n"
+static const char widgetDef[] = " widget.group = TQString::fromLatin1(\"%Group\");\n"
"#ifdef EMBED_IMAGES\n"
- " widget.iconSet = QPixmap(%Pixmap);\n"
+ " widget.iconSet = TQPixmap(%Pixmap);\n"
"#else\n"
- " widget.iconSet = QString::fromLatin1(\"%IconSet\");\n"
+ " widget.iconSet = TQString::fromLatin1(\"%IconSet\");\n"
"#endif\n"
- " widget.includeFile = QString::fromLatin1(\"%IncludeFile\");\n"
- " widget.toolTip = QString::fromLatin1(\"%ToolTip\");\n"
- " widget.whatsThis = QString::fromLatin1(\"%WhatsThis\");\n"
+ " widget.includeFile = TQString::fromLatin1(\"%IncludeFile\");\n"
+ " widget.toolTip = TQString::fromLatin1(\"%ToolTip\");\n"
+ " widget.whatsThis = TQString::fromLatin1(\"%WhatsThis\");\n"
" widget.isContainer = %IsContainer;\n"
- " m_widgets.insert(QString::fromLatin1(\"%Class\"), widget);\n";
+ " m_widgets.insert(TQString::fromLatin1(\"%Class\"), widget);\n";
static const char endCtor[] = " %Init\n"
"}\n"
"%PluginName::~%PluginName()\n"
"{\n"
" %Destroy\n"
"}\n"
- "QWidget *%PluginName::create(const QString &key, QWidget *parent, const char *name)\n"
+ "TQWidget *%PluginName::create(const TQString &key, TQWidget *parent, const char *name)\n"
"{\n";
-static const char widgetCreate[] = " if (key == QString::fromLatin1(\"%Class\"))\n"
+static const char widgetCreate[] = " if (key == TQString::fromLatin1(\"%Class\"))\n"
" return new %ImplClass%ConstructorArgs;\n";
static const char endCreate[] = " return 0;\n"
"}\n"
@@ -117,11 +117,11 @@ static KCmdLineOptions options[] =
KCmdLineLastOption
};
-static QString buildWidgetDef( const QString &name, KConfig &input, const QString &group );
-static QString buildWidgetCreate( const QString &name, KConfig &input );
-static QString buildWidgetInclude( const QString &name, KConfig &input );
-static void buildFile( QTextStream &stream, const QString& group, const QString& fileName, const QString& pluginName, const QString& iconPath );
-static QString buildPixmap( const QString &name, KConfig &input, const QString &iconPath );
+static TQString buildWidgetDef( const TQString &name, KConfig &input, const TQString &group );
+static TQString buildWidgetCreate( const TQString &name, KConfig &input );
+static TQString buildWidgetInclude( const TQString &name, KConfig &input );
+static void buildFile( TQTextStream &stream, const TQString& group, const TQString& fileName, const TQString& pluginName, const TQString& iconPath );
+static TQString buildPixmap( const TQString &name, KConfig &input, const TQString &iconPath );
int main( int argc, char **argv ) {
new KInstance( "makekdewidgets" );
@@ -136,42 +136,42 @@ int main( int argc, char **argv ) {
return ( 1 );
}
- QFileInfo fi( args->arg( args->count() - 1 ) );
+ TQFileInfo fi( args->arg( args->count() - 1 ) );
- QString outputFile = args->getOption( "o" );
- QString pluginName = args->getOption( "n" );
- QString group = args->getOption( "g" );
- QString iconPath = "";
+ TQString outputFile = args->getOption( "o" );
+ TQString pluginName = args->getOption( "n" );
+ TQString group = args->getOption( "g" );
+ TQString iconPath = "";
if ( args->isSet( "p" ) )
iconPath = args->getOption( "p" );
- QString fileName = fi.absFilePath();
+ TQString fileName = fi.absFilePath();
if ( args->isSet( "o" ) ) {
- QFile output( outputFile );
+ TQFile output( outputFile );
if ( output.open( IO_WriteOnly ) ) {
- QTextStream ts( &output );
+ TQTextStream ts( &output );
buildFile( ts, group, fileName , pluginName, iconPath );
}
output.close();
} else {
- QTextStream ts( stdout, IO_WriteOnly );
+ TQTextStream ts( stdout, IO_WriteOnly );
buildFile( ts, group, fileName , pluginName, iconPath );
}
}
-void buildFile( QTextStream &ts, const QString& group, const QString& fileName, const QString& pluginName, const QString& iconPath ) {
+void buildFile( TQTextStream &ts, const TQString& group, const TQString& fileName, const TQString& pluginName, const TQString& iconPath ) {
KConfig input( fileName, true, false );
input.setGroup( "Global" );
- QMap<QString, QString> MainMap;
+ TQMap<TQString, TQString> MainMap;
MainMap.insert( "PluginName", input.readEntry( "PluginName", pluginName ) );
MainMap.insert( "PluginNameLower", input.readEntry( "PluginName", pluginName ).lower() );
MainMap.insert( "Init", input.readEntry( "Init", "" ) );
MainMap.insert( "Destroy", input.readEntry( "Destroy", "" ) );
ts << classHeader << endl;
- QStringList includes = input.readListEntry( "Includes", ',' );
+ TQStringList includes = input.readListEntry( "Includes", ',' );
for ( uint idx = 0; idx < includes.count(); ++idx )
ts << "#include <" << includes[ idx ] << ">" << endl;
- QStringList classes = input.groupList();
+ TQStringList classes = input.groupList();
classes.remove( classes.find( "Global" ) );
// Autogenerate widget includes here
for ( uint idx = 0; idx < classes.count(); ++idx )
@@ -195,9 +195,9 @@ void buildFile( QTextStream &ts, const QString& group, const QString& fileName,
}
-QString buildWidgetDef( const QString &name, KConfig &input, const QString &group ) {
+TQString buildWidgetDef( const TQString &name, KConfig &input, const TQString &group ) {
input.setGroup( name );
- QMap<QString, QString> defMap;
+ TQMap<TQString, TQString> defMap;
defMap.insert( "Group", input.readEntry( "Group", group ).replace( "\"", "\\\"" ) );
defMap.insert( "IconSet", input.readEntry( "IconSet", name.lower() + ".png" ).replace( ":", "_" ) );
defMap.insert( "Pixmap", name.lower().replace( ":", "_" ) + "_xpm" );
@@ -209,31 +209,31 @@ QString buildWidgetDef( const QString &name, KConfig &input, const QString &grou
return KMacroExpander::expandMacros( widgetDef, defMap );
}
-QString buildWidgetCreate( const QString &name, KConfig &input ) {
+TQString buildWidgetCreate( const TQString &name, KConfig &input ) {
input.setGroup( name );
- QMap<QString, QString> createMap;
+ TQMap<TQString, TQString> createMap;
createMap.insert( "ImplClass", input.readEntry( "ImplClass", name ) );
createMap.insert( "ConstructorArgs", input.readEntry( "ConstructorArgs", "(parent, name)" ) );
createMap.insert( "Class", name );
return KMacroExpander::expandMacros( widgetCreate, createMap );
}
-QString buildWidgetInclude( const QString &name, KConfig &input ) {
+TQString buildWidgetInclude( const TQString &name, KConfig &input ) {
input.setGroup( name );
return "#include <" + input.readEntry( "IncludeFile", name.lower() + ".h" ) + ">";
}
-QString buildPixmap( const QString &name, KConfig &input, const QString &iconPath ) {
+TQString buildPixmap( const TQString &name, KConfig &input, const TQString &iconPath ) {
input.setGroup( name );
- QString cleanName = name.lower().replace( ":", "_" );
- QString iconName = input.readEntry( "IconSet", cleanName + ".png" );
+ TQString cleanName = name.lower().replace( ":", "_" );
+ TQString iconName = input.readEntry( "IconSet", cleanName + ".png" );
- QFileInfo fi( iconPath + "/" + iconName );
- QImage pix( fi.absFilePath() );
- QCString xpm;
- QBuffer buff( xpm );
+ TQFileInfo fi( iconPath + "/" + iconName );
+ TQImage pix( fi.absFilePath() );
+ TQCString xpm;
+ TQBuffer buff( xpm );
buff.open( IO_WriteOnly );
- QImageIO io( &buff, "XPM" );
+ TQImageIO io( &buff, "XPM" );
io.setFileName( cleanName + "_xpm" );
io.setImage( pix );
io.write();
diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp
index fc4548090..615b01b7e 100644
--- a/kdoctools/kio_help.cpp
+++ b/kdoctools/kio_help.cpp
@@ -16,12 +16,12 @@
# include <stdlib.h>
#endif
-#include <qvaluelist.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqvaluelist.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kurl.h>
@@ -37,20 +37,20 @@
using namespace KIO;
-QString HelpProtocol::langLookup(const QString& fname)
+TQString HelpProtocol::langLookup(const TQString& fname)
{
- QStringList search;
+ TQStringList search;
// assemble the local search paths
- const QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
+ const TQStringList localDoc = KGlobal::dirs()->resourceDirs("html");
- QStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = KGlobal::locale()->languageList();
langs.append( "en" );
langs.remove( "C" );
// this is kind of compat hack as we install our docs in en/ but the
// default language is en_US
- for (QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ for (TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if ( *it == "en_US" )
*it = "en";
@@ -58,24 +58,24 @@ QString HelpProtocol::langLookup(const QString& fname)
int ldCount = localDoc.count();
for (int id=0; id < ldCount; id++)
{
- QStringList::ConstIterator lang;
+ TQStringList::ConstIterator lang;
for (lang = langs.begin(); lang != langs.end(); ++lang)
- search.append(QString("%1%2/%3").arg(localDoc[id], *lang, fname));
+ search.append(TQString("%1%2/%3").arg(localDoc[id], *lang, fname));
}
// try to locate the file
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = search.begin(); it != search.end(); ++it)
{
kdDebug( 7119 ) << "Looking for help in: " << *it << endl;
- QFileInfo info(*it);
+ TQFileInfo info(*it);
if (info.exists() && info.isFile() && info.isReadable())
return *it;
if ( ( *it ).right( 5 ) == ".html" )
{
- QString file = (*it).left((*it).findRev('/')) + "/index.docbook";
+ TQString file = (*it).left((*it).findRev('/')) + "/index.docbook";
kdDebug( 7119 ) << "Looking for help in: " << file << endl;
info.setFile(file);
if (info.exists() && info.isFile() && info.isReadable())
@@ -84,16 +84,16 @@ QString HelpProtocol::langLookup(const QString& fname)
}
- return QString::null;
+ return TQString::null;
}
-QString HelpProtocol::lookupFile(const QString &fname,
- const QString &query, bool &redirect)
+TQString HelpProtocol::lookupFile(const TQString &fname,
+ const TQString &query, bool &redirect)
{
redirect = false;
- QString path, result;
+ TQString path, result;
path = fname;
@@ -114,7 +114,7 @@ QString HelpProtocol::lookupFile(const QString &fname,
{
unicodeError( i18n("There is no documentation available for %1." ).arg(path) );
finished();
- return QString::null;
+ return TQString::null;
}
} else
kdDebug( 7119 ) << "result " << result << endl;
@@ -123,16 +123,16 @@ QString HelpProtocol::lookupFile(const QString &fname,
}
-void HelpProtocol::unicodeError( const QString &t )
+void HelpProtocol::unicodeError( const TQString &t )
{
- data(fromUnicode( QString(
+ data(fromUnicode( TQString(
"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\"></head>\n"
- "%2</html>" ).arg( QTextCodec::codecForLocale()->name() ).arg( t ) ) );
+ "%2</html>" ).arg( TQTextCodec::codecForLocale()->name() ).arg( t ) ) );
}
HelpProtocol *slave = 0;
-HelpProtocol::HelpProtocol( bool ghelp, const QCString &pool, const QCString &app )
+HelpProtocol::HelpProtocol( bool ghelp, const TQCString &pool, const TQCString &app )
: SlaveBase( ghelp ? "ghelp" : "help", pool, app ), mGhelp( ghelp )
{
slave = this;
@@ -144,7 +144,7 @@ void HelpProtocol::get( const KURL& url )
<< " query=" << url.query() << endl;
bool redirect;
- QString doc;
+ TQString doc;
doc = url.path();
if ( !mGhelp ) {
@@ -181,7 +181,7 @@ void HelpProtocol::get( const KURL& url )
kdDebug( 7119 ) << "target " << target.url() << endl;
- QString file = target.path();
+ TQString file = target.path();
if ( mGhelp ) {
if ( file.right( 4 ) != ".xml" ) {
@@ -189,11 +189,11 @@ void HelpProtocol::get( const KURL& url )
return;
}
} else {
- QString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
+ TQString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
if (!KStandardDirs::exists(file)) {
file = docbook_file;
} else {
- QFileInfo fi(file);
+ TQFileInfo fi(file);
if (fi.isDir()) {
file = file + "/index.docbook";
} else {
@@ -209,7 +209,7 @@ void HelpProtocol::get( const KURL& url )
infoMessage(i18n("Preparing document"));
if ( mGhelp ) {
- QString xsl = "customization/kde-nochunk.xsl";
+ TQString xsl = "customization/kde-nochunk.xsl";
mParsed = transform(file, locate("dtd", xsl));
kdDebug( 7119 ) << "parsed " << mParsed.length() << endl;
@@ -238,7 +238,7 @@ void HelpProtocol::get( const KURL& url )
mParsed = transform(file, locate("dtd", "customization/kde-chunk.xsl"));
if ( !mParsed.isEmpty() ) {
infoMessage( i18n( "Saving to cache" ) );
- QString cache = file.left( file.length() - 7 );
+ TQString cache = file.left( file.length() - 7 );
saveToCache( mParsed, locateLocal( "cache",
"kio_help" + cache +
"cache.bz2" ) );
@@ -250,7 +250,7 @@ void HelpProtocol::get( const KURL& url )
if (mParsed.isEmpty()) {
unicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) );
} else {
- QString query = url.query(), anchor;
+ TQString query = url.query(), anchor;
// if we have a query, look if it contains an anchor
if (!query.isEmpty())
@@ -259,7 +259,7 @@ void HelpProtocol::get( const KURL& url )
KURL redirURL(url);
- redirURL.setQuery(QString::null);
+ redirURL.setQuery(TQString::null);
redirURL.setHTMLRef(anchor);
redirection(redirURL);
finished();
@@ -274,20 +274,20 @@ void HelpProtocol::get( const KURL& url )
{
int index = 0;
while ( true ) {
- index = mParsed.find( QRegExp( "<a name=" ), index);
+ index = mParsed.find( TQRegExp( "<a name=" ), index);
if ( index == -1 ) {
kdDebug( 7119 ) << "no anchor\n";
break; // use whatever is the target, most likely index.html
}
if ( mParsed.mid( index, 11 + anchor.length() ).lower() ==
- QString( "<a name=\"%1\">" ).arg( anchor ) )
+ TQString( "<a name=\"%1\">" ).arg( anchor ) )
{
index = mParsed.findRev( "<FILENAME filename=", index ) +
strlen( "<FILENAME filename=\"" );
- QString filename=mParsed.mid( index, 2000 );
+ TQString filename=mParsed.mid( index, 2000 );
filename = filename.left( filename.find( '\"' ) );
- QString path = target.path();
+ TQString path = target.path();
path = path.left( path.findRev( '/' ) + 1) + filename;
kdDebug( 7119 ) << "anchor found in " << path <<endl;
target.setPath( path );
@@ -307,9 +307,9 @@ void HelpProtocol::emitFile( const KURL& url )
{
infoMessage(i18n("Looking up section"));
- QString filename = url.path().mid(url.path().findRev('/') + 1);
+ TQString filename = url.path().mid(url.path().findRev('/') + 1);
- int index = mParsed.find(QString("<FILENAME filename=\"%1\"").arg(filename));
+ int index = mParsed.find(TQString("<FILENAME filename=\"%1\"").arg(filename));
if (index == -1) {
if ( filename == "index.html" ) {
data( fromUnicode( mParsed ) );
@@ -320,11 +320,11 @@ void HelpProtocol::emitFile( const KURL& url )
return;
}
- QString filedata = splitOut(mParsed, index);
+ TQString filedata = splitOut(mParsed, index);
replaceCharsetHeader( filedata );
data( fromUnicode( filedata ) );
- data( QByteArray() );
+ data( TQByteArray() );
}
void HelpProtocol::mimetype( const KURL &)
@@ -341,7 +341,7 @@ void HelpProtocol::get_file( const KURL& url )
{
kdDebug( 7119 ) << "get_file " << url.url() << endl;
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
@@ -370,7 +370,7 @@ void HelpProtocol::get_file( const KURL& url )
int processed_size = 0;
char buffer[ MAX_IPC_SIZE ];
- QByteArray array;
+ TQByteArray array;
while( 1 )
{
@@ -394,7 +394,7 @@ void HelpProtocol::get_file( const KURL& url )
processedSize( processed_size );
}
- data( QByteArray() );
+ data( TQByteArray() );
close( fd );
diff --git a/kdoctools/kio_help.h b/kdoctools/kio_help.h
index f0f34eea0..13c198af1 100644
--- a/kdoctools/kio_help.h
+++ b/kdoctools/kio_help.h
@@ -10,9 +10,9 @@
#include <unistd.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kio/global.h>
@@ -22,7 +22,7 @@ class HelpProtocol : public KIO::SlaveBase
{
public:
- HelpProtocol( bool ghelp, const QCString &pool, const QCString &app);
+ HelpProtocol( bool ghelp, const TQCString &pool, const TQCString &app);
virtual ~HelpProtocol() { }
virtual void get( const KURL& url );
@@ -31,15 +31,15 @@ public:
private:
- QString langLookup(const QString& fname);
+ TQString langLookup(const TQString& fname);
void emitFile( const KURL &url );
void get_file( const KURL& url );
- QString lookupFile(const QString &fname, const QString &query,
+ TQString lookupFile(const TQString &fname, const TQString &query,
bool &redirect);
- void unicodeError( const QString &t );
+ void unicodeError( const TQString &t );
- QString mParsed;
+ TQString mParsed;
bool mGhelp;
};
diff --git a/kdoctools/main.cpp b/kdoctools/main.cpp
index 4a08c14d1..8e096d6cf 100644
--- a/kdoctools/main.cpp
+++ b/kdoctools/main.cpp
@@ -11,7 +11,7 @@
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kinstance.h>
#include <kdebug.h>
diff --git a/kdoctools/main_ghelp.cpp b/kdoctools/main_ghelp.cpp
index 2170c738b..281b31f17 100644
--- a/kdoctools/main_ghelp.cpp
+++ b/kdoctools/main_ghelp.cpp
@@ -11,7 +11,7 @@
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kinstance.h>
#include <kdebug.h>
diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp
index c48706451..dd2e194e6 100644
--- a/kdoctools/meinproc.cpp
+++ b/kdoctools/meinproc.cpp
@@ -12,30 +12,30 @@
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kinstance.h>
#include <xslt.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kaboutdata.h>
#include <stdlib.h>
#include <kdebug.h>
-#include <qtextcodec.h>
-#include <qfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqfileinfo.h>
#include <kprocess.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
extern int xmlLoadExtDtdDefaultValue;
class MyPair {
public:
- QString word;
+ TQString word;
int base;};
-typedef QValueList<MyPair> PairList;
+typedef TQValueList<MyPair> PairList;
void parseEntry(PairList &list, xmlNodePtr cur, int base)
{
@@ -51,9 +51,9 @@ void parseEntry(PairList &list, xmlNodePtr cur, int base)
while (cur != NULL) {
if ( cur->type == XML_TEXT_NODE ) {
- QString words = QString::fromUtf8( ( char* )cur->content );
- QStringList wlist = QStringList::split( ' ', words.simplifyWhiteSpace() );
- for ( QStringList::ConstIterator it = wlist.begin();
+ TQString words = TQString::fromUtf8( ( char* )cur->content );
+ TQStringList wlist = TQStringList::split( ' ', words.simplifyWhiteSpace() );
+ for ( TQStringList::ConstIterator it = wlist.begin();
it != wlist.end(); ++it )
{
MyPair m;
@@ -110,15 +110,15 @@ int main(int argc, char **argv) {
}
// Need to set SRCDIR before calling fillInstance
- QString srcdir;
+ TQString srcdir;
if ( args->isSet( "srcdir" ) )
- srcdir = QDir( QFile::decodeName( args->getOption( "srcdir" ) ) ).absPath();
+ srcdir = TQDir( TQFile::decodeName( args->getOption( "srcdir" ) ) ).absPath();
fillInstance(ins,srcdir);
LIBXML_TEST_VERSION
- QString checkFilename = QFile::decodeName(args->arg( 0 ));
- QFileInfo checkFile(checkFilename);
+ TQString checkFilename = TQFile::decodeName(args->arg( 0 ));
+ TQFileInfo checkFile(checkFilename);
if (!checkFile.exists())
{
kdError() << "File '" << checkFilename << "' does not exist." << endl;
@@ -141,7 +141,7 @@ int main(int argc, char **argv) {
#else
char pwd_buffer[PATH_MAX];
#endif
- QFileInfo file( QFile::decodeName(args->arg( 0 )) );
+ TQFileInfo file( TQFile::decodeName(args->arg( 0 )) );
#if !defined(PATH_MAX) && defined(__GLIBC__)
if ( !(pwd_buffer = getcwd( NULL, 0 ) ) )
#else
@@ -152,28 +152,28 @@ int main(int argc, char **argv) {
return 2;
}
- QString catalogs;
+ TQString catalogs;
catalogs += locate( "dtd", "customization/catalog" );
catalogs += " ";
catalogs += locate( "dtd", "docbook/xml-dtd-4.1.2/docbook.cat" );
- setenv( "SGML_CATALOG_FILES", QFile::encodeName( catalogs ).data(), 1);
- QString exe;
+ setenv( "SGML_CATALOG_FILES", TQFile::encodeName( catalogs ).data(), 1);
+ TQString exe;
#if defined( XMLLINT )
exe = XMLLINT;
#endif
- if ( (::access( QFile::encodeName( exe ), X_OK )!=0) ) {
+ if ( (::access( TQFile::encodeName( exe ), X_OK )!=0) ) {
exe = KStandardDirs::findExe( "xmllint" );
if (exe.isEmpty())
exe = locate( "exe", "xmllint" );
}
- if ( ::access( QFile::encodeName( exe ), X_OK )==0 ) {
- chdir( QFile::encodeName( file.dirPath( true ) ) );
- QString cmd = exe;
+ if ( ::access( TQFile::encodeName( exe ), X_OK )==0 ) {
+ chdir( TQFile::encodeName( file.dirPath( true ) ) );
+ TQString cmd = exe;
cmd += " --catalogs --valid --noout ";
cmd += KProcess::quote(file.fileName());
cmd += " 2>&1";
- FILE *xmllint = popen( QFile::encodeName( cmd ), "r");
+ FILE *xmllint = popen( TQFile::encodeName( cmd ), "r");
char buf[ 512 ];
bool noout = true;
unsigned int n;
@@ -201,17 +201,17 @@ int main(int argc, char **argv) {
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
- QValueVector<const char *> params;
+ TQValueVector<const char *> params;
if (args->isSet( "output" ) ) {
params.append( qstrdup( "outputFile" ) );
- params.append( qstrdup( QFile::decodeName( args->getOption( "output" ) ).latin1() ) );
+ params.append( qstrdup( TQFile::decodeName( args->getOption( "output" ) ).latin1() ) );
}
{
const QCStringList paramList = args->getOptionList( "param" );
QCStringList::ConstIterator it = paramList.begin();
QCStringList::ConstIterator end = paramList.end();
for ( ; it != end; ++it ) {
- const QCString tuple = *it;
+ const TQCString tuple = *it;
const int ch = tuple.find( '=' );
if ( ch == -1 ) {
kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl;
@@ -224,7 +224,7 @@ int main(int argc, char **argv) {
params.append( NULL );
bool index = args->isSet( "htdig" );
- QString tss = args->getOption( "stylesheet" );
+ TQString tss = args->getOption( "stylesheet" );
if ( tss.isEmpty() )
tss = "customization/kde-chunk.xsl";
if ( index )
@@ -238,7 +238,7 @@ int main(int argc, char **argv) {
if (style_sheet != NULL) {
- xmlDocPtr doc = xmlParseFile( QFile::encodeName( args->arg( 0 ) ) );
+ xmlDocPtr doc = xmlParseFile( TQFile::encodeName( args->arg( 0 ) ) );
xmlDocPtr res = xsltApplyStylesheet(style_sheet, doc, &params[0]);
@@ -268,13 +268,13 @@ int main(int argc, char **argv) {
}
} else {
- QString output = transform(args->arg( 0 ) , tss, params);
+ TQString output = transform(args->arg( 0 ) , tss, params);
if (output.isEmpty()) {
fprintf(stderr, "unable to parse %s\n", args->arg( 0 ));
return(1);
}
- QString cache = args->getOption( "cache" );
+ TQString cache = args->getOption( "cache" );
if ( !cache.isEmpty() ) {
if ( !saveToCache( output, cache ) ) {
kdError() << i18n( "Could not write to cache file %1." ).arg( cache ) << endl;
@@ -284,19 +284,19 @@ int main(int argc, char **argv) {
if (output.find( "<FILENAME " ) == -1 || args->isSet( "stdout" ) || args->isSet("output") )
{
- QFile file;
+ TQFile file;
if (args->isSet( "stdout" ) ) {
file.open( IO_WriteOnly, stdout );
} else {
if (args->isSet( "output" ) )
- file.setName( QFile::decodeName(args->getOption( "output" )));
+ file.setName( TQFile::decodeName(args->getOption( "output" )));
else
file.setName( "index.html" );
file.open(IO_WriteOnly);
}
replaceCharsetHeader( output );
- QCString data = output.local8Bit();
+ TQCString data = output.local8Bit();
file.writeBlock(data.data(), data.length());
file.close();
} else {
@@ -307,15 +307,15 @@ int main(int argc, char **argv) {
break;
int filename_index = index + strlen("<FILENAME filename=\"");
- QString filename = output.mid(filename_index,
+ TQString filename = output.mid(filename_index,
output.find("\"", filename_index) -
filename_index);
- QString filedata = splitOut(output, index);
- QFile file(filename);
+ TQString filedata = splitOut(output, index);
+ TQFile file(filename);
file.open(IO_WriteOnly);
replaceCharsetHeader( filedata );
- QCString data = fromUnicode( filedata );
+ TQCString data = fromUnicode( filedata );
file.writeBlock(data.data(), data.length());
file.close();
diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp
index fc1fd4546..216773e7d 100644
--- a/kdoctools/xslt.cpp
+++ b/kdoctools/xslt.cpp
@@ -7,8 +7,8 @@
#include <libxml/catalog.h>
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <xslt.h>
#include <kinstance.h>
#include "kio_help.h"
@@ -16,7 +16,7 @@
#include <assert.h>
#include <kfilterbase.h>
#include <kfilterdev.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <stdlib.h>
#include <config.h>
#include <stdarg.h>
@@ -25,7 +25,7 @@
#include <gzip/kgzipfilter.h>
#include <bzip2/kbzip2filter.h>
#include <klibloader.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#if !defined( SIMPLE_XSLT )
extern HelpProtocol *slave;
@@ -36,21 +36,21 @@ extern HelpProtocol *slave;
int writeToQString(void * context, const char * buffer, int len)
{
- QString *t = (QString*)context;
- *t += QString::fromUtf8(buffer, len);
+ TQString *t = (TQString*)context;
+ *t += TQString::fromUtf8(buffer, len);
return len;
}
int closeQString(void * context) {
- QString *t = (QString*)context;
+ TQString *t = (TQString*)context;
*t += '\n';
return 0;
}
-QString transform( const QString &pat, const QString& tss,
- const QValueVector<const char *> &params )
+TQString transform( const TQString &pat, const TQString& tss,
+ const TQValueVector<const char *> &params )
{
- QString parsed;
+ TQString parsed;
INFO(i18n("Parsing stylesheet"));
@@ -76,7 +76,7 @@ QString transform( const QString &pat, const QString& tss,
return parsed;
INFO(i18n("Applying stylesheet"));
- QValueVector<const char *> p = params;
+ TQValueVector<const char *> p = params;
p.append( NULL );
xmlDocPtr res = xsltApplyStylesheet(style_sheet, doc, const_cast<const char **>(&p[0]));
xmlFreeDoc(doc);
@@ -113,9 +113,9 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID,
if (!qstrcmp(ID, "-//OASIS//DTD XML DocBook V4.1.2//EN"))
URL = "docbook/xml-dtd-4.1.2/docbookx.dtd";
- QString file;
- if (KStandardDirs::exists( QDir::currentDirPath() + "/" + URL ) )
- file = QDir::currentDirPath() + "/" + URL;
+ TQString file;
+ if (KStandardDirs::exists( TQDir::currentDirPath() + "/" + URL ) )
+ file = TQDir::currentDirPath() + "/" + URL;
else
file = locate("dtd", URL);
@@ -130,14 +130,14 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID,
}
*/
-QString splitOut(const QString &parsed, int index)
+TQString splitOut(const TQString &parsed, int index)
{
int start_index = index + 1;
while (parsed.at(start_index - 1) != '>') start_index++;
int inside = 0;
- QString filedata;
+ TQString filedata;
while (true) {
int endindex = parsed.find("</FILENAME>", index);
@@ -175,12 +175,12 @@ QString splitOut(const QString &parsed, int index)
filedata = filedata.left(index) + filedata.mid(endindex);
}
- // filedata.replace(QRegExp(">"), "\n>");
+ // filedata.replace(TQRegExp(">"), "\n>");
return filedata;
}
-void fillInstance(KInstance &ins, const QString &srcdir) {
- QString catalogs;
+void fillInstance(KInstance &ins, const TQString &srcdir) {
+ TQString catalogs;
if ( srcdir.isEmpty() ) {
catalogs += ins.dirs()->findResource("data", "ksgmltools2/customization/catalog");
@@ -197,9 +197,9 @@ void fillInstance(KInstance &ins, const QString &srcdir) {
extern "C" void *init_kbzip2filter();
-static QIODevice *getBZip2device(const QString &fileName )
+static TQIODevice *getBZip2device(const TQString &fileName )
{
- QFile * f = new QFile( fileName );
+ TQFile * f = new TQFile( fileName );
KLibFactory * factory = static_cast<KLibFactory*>(init_kbzip2filter());
KFilterBase * base = static_cast<KFilterBase*>( factory->create(0, "bzip2" ) );
@@ -211,9 +211,9 @@ static QIODevice *getBZip2device(const QString &fileName )
return 0;
}
-bool saveToCache( const QString &contents, const QString &filename )
+bool saveToCache( const TQString &contents, const TQString &filename )
{
- QIODevice *fd = ::getBZip2device(filename);
+ TQIODevice *fd = ::getBZip2device(filename);
if ( !fd )
return false;
@@ -229,8 +229,8 @@ bool saveToCache( const QString &contents, const QString &filename )
return true;
}
-static bool readCache( const QString &filename,
- const QString &cache, QString &output)
+static bool readCache( const TQString &filename,
+ const TQString &cache, TQString &output)
{
kdDebug( 7119 ) << "verifyCache " << filename << " " << cache << endl;
if ( !compareTimeStamps( filename, cache ) )
@@ -239,14 +239,14 @@ static bool readCache( const QString &filename,
return false;
kdDebug( 7119 ) << "create filter" << endl;
- QIODevice *fd = ::getBZip2device(cache);
+ TQIODevice *fd = ::getBZip2device(cache);
if ( !fd )
return false;
if (!fd->open(IO_ReadOnly))
{
delete fd;
- QFile::remove(cache);
+ TQFile::remove(cache);
return false;
}
@@ -254,7 +254,7 @@ static bool readCache( const QString &filename,
char buffer[32000];
int n;
- QCString text;
+ TQCString text;
// Also end loop in case of error, when -1 is returned
while ( ( n = fd->readBlock(buffer, 31900) ) > 0)
{
@@ -264,7 +264,7 @@ static bool readCache( const QString &filename,
kdDebug( 7119 ) << "read " << text.length() << endl;
fd->close();
- output = QString::fromUtf8( text );
+ output = TQString::fromUtf8( text );
delete fd;
if (n == -1)
@@ -275,14 +275,14 @@ static bool readCache( const QString &filename,
return true;
}
-QString lookForCache( const QString &filename )
+TQString lookForCache( const TQString &filename )
{
kdDebug() << "lookForCache " << filename << endl;
assert( filename.endsWith( ".docbook" ) );
assert( filename.at( 0 ) == '/' );
- QString cache = filename.left( filename.length() - 7 );
- QString output;
+ TQString cache = filename.left( filename.length() - 7 );
+ TQString output;
if ( readCache( filename, cache + "cache.bz2", output) )
return output;
if ( readCache( filename,
@@ -291,35 +291,35 @@ QString lookForCache( const QString &filename )
"cache.bz2" ), output ) )
return output;
- return QString::null;
+ return TQString::null;
}
-bool compareTimeStamps( const QString &older, const QString &newer )
+bool compareTimeStamps( const TQString &older, const TQString &newer )
{
- QFileInfo _older( older );
- QFileInfo _newer( newer );
+ TQFileInfo _older( older );
+ TQFileInfo _newer( newer );
assert( _older.exists() );
if ( !_newer.exists() )
return false;
return ( _newer.lastModified() > _older.lastModified() );
}
-QCString fromUnicode( const QString &data )
+TQCString fromUnicode( const TQString &data )
{
- QTextCodec *locale = QTextCodec::codecForLocale();
- QCString result;
+ TQTextCodec *locale = TQTextCodec::codecForLocale();
+ TQCString result;
char buffer[30000];
uint buffer_len = 0;
uint len = 0;
uint offset = 0;
const int part_len = 5000;
- QString part;
+ TQString part;
while ( offset < data.length() )
{
part = data.mid( offset, part_len );
- QCString test = locale->fromUnicode( part );
+ TQCString test = locale->fromUnicode( part );
if ( locale->toUnicode( test ) == part ) {
result += test;
offset += part_len;
@@ -328,14 +328,14 @@ QCString fromUnicode( const QString &data )
len = part.length();
buffer_len = 0;
for ( uint i = 0; i < len; i++ ) {
- QCString test = locale->fromUnicode( part.mid( i, 1 ) );
+ TQCString test = locale->fromUnicode( part.mid( i, 1 ) );
if ( locale->toUnicode( test ) == part.mid( i, 1 ) ) {
if (buffer_len + test.length() + 1 > sizeof(buffer))
break;
strcpy( buffer + buffer_len, test.data() );
buffer_len += test.length();
} else {
- QString res;
+ TQString res;
res.sprintf( "&#%d;", part.at( i ).unicode() );
test = locale->fromUnicode( res );
if (buffer_len + test.length() + 1 > sizeof(buffer))
@@ -344,16 +344,16 @@ QCString fromUnicode( const QString &data )
buffer_len += test.length();
}
}
- result += QCString( buffer, buffer_len + 1);
+ result += TQCString( buffer, buffer_len + 1);
offset += part_len;
}
return result;
}
-void replaceCharsetHeader( QString &output )
+void replaceCharsetHeader( TQString &output )
{
- QString name = QTextCodec::codecForLocale()->name();
- name.replace( QString( "ISO " ), "iso-" );
- output.replace( QString( "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" ),
- QString( "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\">" ).arg( name ) );
+ TQString name = TQTextCodec::codecForLocale()->name();
+ name.replace( TQString( "ISO " ), "iso-" );
+ output.replace( TQString( "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" ),
+ TQString( "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\">" ).arg( name ) );
}
diff --git a/kdoctools/xslt.h b/kdoctools/xslt.h
index 777c77573..975bd3c88 100644
--- a/kdoctools/xslt.h
+++ b/kdoctools/xslt.h
@@ -2,23 +2,23 @@
#define _MEIN_XSLT_H_
#include <libxml/parser.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
-QString transform(const QString &file, const QString& stylesheet,
- const QValueVector<const char *> &params = QValueVector<const char *>());
-QString splitOut(const QString &parsed, int index);
-void fillInstance(KInstance &ins, const QString &srcdir = QString::null );
-bool saveToCache( const QString &contents, const QString &filename );
-QString lookForCache( const QString &filename );
-QCString fromUnicode( const QString &data );
-void replaceCharsetHeader( QString &output );
+TQString transform(const TQString &file, const TQString& stylesheet,
+ const TQValueVector<const char *> &params = TQValueVector<const char *>());
+TQString splitOut(const TQString &parsed, int index);
+void fillInstance(KInstance &ins, const TQString &srcdir = TQString::null );
+bool saveToCache( const TQString &contents, const TQString &filename );
+TQString lookForCache( const TQString &filename );
+TQCString fromUnicode( const TQString &data );
+void replaceCharsetHeader( TQString &output );
extern bool warnings_exist;
-extern QString *SRCDIR;
+extern TQString *SRCDIR;
/**
* Compares two files and returns true if @param newer exists and is newer than
* @param older
**/
-bool compareTimeStamps( const QString &older, const QString &newer );
+bool compareTimeStamps( const TQString &older, const TQString &newer );
#endif
diff --git a/khtml/DESIGN.html b/khtml/DESIGN.html
index a02e85a1b..00af13045 100644
--- a/khtml/DESIGN.html
+++ b/khtml/DESIGN.html
@@ -53,7 +53,7 @@ compatible to IE.
<p>
<a href="khtml_part.h">KHTMLPart</a> creates one instance of a
-<a href="khtmlview.h">KHTMLView</a> (derived from QScrollView),
+<a href="khtmlview.h">KHTMLView</a> (derived from TQScrollView),
the widget showing the whole thing. At the same time a DOM tree
is built up from the HTML or XML found in the specified file.
<p>
diff --git a/khtml/css/css_base.cpp b/khtml/css/css_base.cpp
index 9cca21761..5af37b9b9 100644
--- a/khtml/css/css_base.cpp
+++ b/khtml/css/css_base.cpp
@@ -76,9 +76,9 @@ KURL StyleBaseImpl::baseURL()
}
void StyleBaseImpl::setParsedValue(int propId, const CSSValueImpl *parsedValue,
- bool important, bool nonCSSHint, QPtrList<CSSProperty> *propList)
+ bool important, bool nonCSSHint, TQPtrList<CSSProperty> *propList)
{
- QPtrListIterator<CSSProperty> propIt(*propList);
+ TQPtrListIterator<CSSProperty> propIt(*propList);
propIt.toLast(); // just remove the top one - not sure what should happen if we have multiple instances of the property
while (propIt.current() &&
( propIt.current()->m_id != propId || propIt.current()->nonCSSHint != nonCSSHint ||
@@ -122,7 +122,7 @@ StyleListImpl::~StyleListImpl()
void CSSSelector::print(void)
{
- kdDebug( 6080 ) << "[Selector: tag = " << QString::number(tag,16) << ", attr = \"" << attr << "\", match = \"" << match
+ kdDebug( 6080 ) << "[Selector: tag = " << TQString::number(tag,16) << ", attr = \"" << attr << "\", match = \"" << match
<< "\" value = \"" << value.string().latin1() << "\" relation = " << (int)relation
<< "]" << endl;
if ( tagHistory )
diff --git a/khtml/css/css_base.h b/khtml/css/css_base.h
index f8b520423..9a8774107 100644
--- a/khtml/css/css_base.h
+++ b/khtml/css/css_base.h
@@ -30,8 +30,8 @@
#include "xml/dom_nodeimpl.h"
#include "misc/shared.h"
#include <kdemacros.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
namespace DOM {
@@ -229,7 +229,7 @@ namespace DOM {
void setParent(StyleBaseImpl *parent) { m_parent = parent; }
static void setParsedValue(int propId, const CSSValueImpl *parsedValue,
- bool important, bool nonCSSHint, QPtrList<CSSProperty> *propList);
+ bool important, bool nonCSSHint, TQPtrList<CSSProperty> *propList);
virtual bool parseString(const DOMString &/*cssString*/, bool = false) { return false; }
@@ -261,7 +261,7 @@ namespace DOM {
void append(StyleBaseImpl *item) { m_lstChildren->append(item); }
protected:
- QPtrList<StyleBaseImpl> *m_lstChildren;
+ TQPtrList<StyleBaseImpl> *m_lstChildren;
};
KDE_NO_EXPORT int getPropertyID(const char *tagStr, int len);
diff --git a/khtml/css/css_renderstyledeclarationimpl.cpp b/khtml/css/css_renderstyledeclarationimpl.cpp
index 25de55f4a..daf607a9e 100644
--- a/khtml/css/css_renderstyledeclarationimpl.cpp
+++ b/khtml/css/css_renderstyledeclarationimpl.cpp
@@ -267,7 +267,7 @@ DOMString khtml::stringForListStyleType(EListStyleType type)
return "";
}
-static CSSPrimitiveValueImpl* valueForColor(QColor color)
+static CSSPrimitiveValueImpl* valueForColor(TQColor color)
{
if (color.isValid())
return new CSSPrimitiveValueImpl(color.rgb());//### KDE4: use rgba!
@@ -412,15 +412,15 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
DOMString string;
Length length(style->backgroundXPosition());
if (length.isPercent())
- string = QString::number(length.value()) + "%";
+ string = TQString::number(length.value()) + "%";
else
- string = QString::number(length.minWidth(renderer->contentWidth()));
+ string = TQString::number(length.minWidth(renderer->contentWidth()));
string += " ";
length = style->backgroundYPosition();
if (length.isPercent())
- string += QString::number(length.value()) + "%";
+ string += TQString::number(length.value()) + "%";
else
- string += QString::number(length.minWidth(renderer->contentWidth()));
+ string += TQString::number(length.minWidth(renderer->contentWidth()));
return new CSSPrimitiveValueImpl(string, CSSPrimitiveValue::CSS_STRING);
}
case CSS_PROP_BACKGROUND_POSITION_X:
@@ -434,9 +434,9 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
return new CSSPrimitiveValueImpl(CSS_VAL_SEPARATE);
case CSS_PROP_BORDER_SPACING:
{
- QString string(QString::number(style->borderHorizontalSpacing()) +
+ TQString string(TQString::number(style->borderHorizontalSpacing()) +
"px " +
- QString::number(style->borderVerticalSpacing()) +
+ TQString::number(style->borderVerticalSpacing()) +
"px");
return new CSSPrimitiveValueImpl(string, CSSPrimitiveValue::CSS_STRING);
}
@@ -651,7 +651,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
// FIXME: this does not reflect the full range of weights
// that can be expressed with CSS
FontDef def = style->htmlFont().getFontDef();
- if (def.weight == QFont::Bold)
+ if (def.weight == TQFont::Bold)
return new CSSPrimitiveValueImpl(CSS_VAL_BOLD);
else
return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL);
@@ -888,7 +888,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
return valueForTextAlign(style->textAlign());
case CSS_PROP_TEXT_DECORATION:
{
- QString string;
+ TQString string;
if (style->textDecoration() & khtml::UNDERLINE)
string += "underline";
if (style->textDecoration() & khtml::OVERLINE) {
diff --git a/khtml/css/css_ruleimpl.cpp b/khtml/css/css_ruleimpl.cpp
index ff927e061..0bf675484 100644
--- a/khtml/css/css_ruleimpl.cpp
+++ b/khtml/css/css_ruleimpl.cpp
@@ -148,7 +148,7 @@ void CSSImportRuleImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMS
checkLoaded();
}
-void CSSImportRuleImpl::error(int /*err*/, const QString &/*text*/)
+void CSSImportRuleImpl::error(int /*err*/, const TQString &/*text*/)
{
if ( m_styleSheet ) {
m_styleSheet->setParent(0);
diff --git a/khtml/css/css_ruleimpl.h b/khtml/css/css_ruleimpl.h
index 0db6e97ba..2753fcf83 100644
--- a/khtml/css/css_ruleimpl.h
+++ b/khtml/css/css_ruleimpl.h
@@ -113,7 +113,7 @@ public:
// from CachedObjectClient
virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet, const DOM::DOMString &charset);
- virtual void error(int err, const QString &text);
+ virtual void error(int err, const TQString &text);
bool isLoading();
virtual void init();
@@ -146,7 +146,7 @@ public:
void append( CSSRuleImpl *rule ) { m_lstCSSRules.append( rule ); }
protected:
- QPtrList<CSSRuleImpl> m_lstCSSRules;
+ TQPtrList<CSSRuleImpl> m_lstCSSRules;
};
class CSSMediaRuleImpl : public CSSRuleImpl
@@ -209,17 +209,17 @@ public:
virtual bool parseString( const DOMString &string, bool = false );
- void setSelector( QPtrList<CSSSelector> *selector) { m_selector = selector; }
+ void setSelector( TQPtrList<CSSSelector> *selector) { m_selector = selector; }
void setDeclaration( CSSStyleDeclarationImpl *style);
- QPtrList<CSSSelector> *selector() { return m_selector; }
+ TQPtrList<CSSSelector> *selector() { return m_selector; }
CSSStyleDeclarationImpl *declaration() { return m_style; }
void setNonCSSHints();
protected:
CSSStyleDeclarationImpl *m_style;
- QPtrList<CSSSelector> *m_selector;
+ TQPtrList<CSSSelector> *m_selector;
};
diff --git a/khtml/css/css_stylesheetimpl.cpp b/khtml/css/css_stylesheetimpl.cpp
index 4743cd2e4..bf85c0d59 100644
--- a/khtml/css/css_stylesheetimpl.cpp
+++ b/khtml/css/css_stylesheetimpl.cpp
@@ -110,7 +110,7 @@ void StyleSheetImpl::setDisabled( bool disabled )
CSSStyleSheetImpl::CSSStyleSheetImpl(CSSStyleSheetImpl *parentSheet, DOMString href)
: StyleSheetImpl(parentSheet, href)
{
- m_lstChildren = new QPtrList<StyleBaseImpl>;
+ m_lstChildren = new TQPtrList<StyleBaseImpl>;
m_doc = parentSheet ? parentSheet->doc() : 0;
m_implicit = false;
m_namespaces = 0;
@@ -120,7 +120,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSStyleSheetImpl *parentSheet, DOMString h
CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href, bool _implicit)
: StyleSheetImpl(parentNode, href)
{
- m_lstChildren = new QPtrList<StyleBaseImpl>;
+ m_lstChildren = new TQPtrList<StyleBaseImpl>;
m_doc = parentNode->getDocument();
m_implicit = _implicit;
m_namespaces = 0;
@@ -130,7 +130,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href,
CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, DOMString href)
: StyleSheetImpl(ownerRule, href)
{
- m_lstChildren = new QPtrList<StyleBaseImpl>;
+ m_lstChildren = new TQPtrList<StyleBaseImpl>;
m_doc = static_cast<CSSStyleSheetImpl*>(ownerRule->stylesheet())->doc();
m_implicit = false;
m_namespaces = 0;
@@ -140,7 +140,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, DOMString href)
CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, CSSStyleSheetImpl *orig)
: StyleSheetImpl(parentNode, orig->m_strHref)
{
- m_lstChildren = new QPtrList<StyleBaseImpl>;
+ m_lstChildren = new TQPtrList<StyleBaseImpl>;
StyleBaseImpl *rule;
for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() )
{
@@ -157,7 +157,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, CSSStyleSheetImpl *
: StyleSheetImpl(ownerRule, orig->m_strHref)
{
// m_lstChildren is deleted in StyleListImpl
- m_lstChildren = new QPtrList<StyleBaseImpl>;
+ m_lstChildren = new TQPtrList<StyleBaseImpl>;
StyleBaseImpl *rule;
for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() )
{
@@ -318,7 +318,7 @@ void CSSStyleSheetImpl::setNonCSSHints()
StyleSheetListImpl::~StyleSheetListImpl()
{
- for ( QPtrListIterator<StyleSheetImpl> it ( styleSheets ); it.current(); ++it )
+ for ( TQPtrListIterator<StyleSheetImpl> it ( styleSheets ); it.current(); ++it )
it.current()->deref();
}
@@ -340,7 +340,7 @@ unsigned long StyleSheetListImpl::length() const
{
// hack so implicit BODY stylesheets don't get counted here
unsigned long l = 0;
- QPtrListIterator<StyleSheetImpl> it(styleSheets);
+ TQPtrListIterator<StyleSheetImpl> it(styleSheets);
for (; it.current(); ++it) {
if (!it.current()->isCSSStyleSheet() || !static_cast<CSSStyleSheetImpl*>(it.current())->implicit())
++l;
@@ -351,7 +351,7 @@ unsigned long StyleSheetListImpl::length() const
StyleSheetImpl *StyleSheetListImpl::item ( unsigned long index )
{
unsigned long l = 0;
- QPtrListIterator<StyleSheetImpl> it(styleSheets);
+ TQPtrListIterator<StyleSheetImpl> it(styleSheets);
for (; it.current(); ++it) {
if (!it.current()->isCSSStyleSheet() || !static_cast<CSSStyleSheetImpl*>(it.current())->implicit()) {
if (l == index)
@@ -397,9 +397,9 @@ CSSRuleImpl *MediaListImpl::parentRule() const
void MediaListImpl::deleteMedium( const DOMString &oldMedium )
{
- const QValueList<DOMString>::Iterator itEnd = m_lstMedia.end();
+ const TQValueList<DOMString>::Iterator itEnd = m_lstMedia.end();
- for ( QValueList<DOMString>::Iterator it = m_lstMedia.begin(); it != itEnd; ++it ) {
+ for ( TQValueList<DOMString>::Iterator it = m_lstMedia.begin(); it != itEnd; ++it ) {
if( (*it) == oldMedium ) {
m_lstMedia.remove( it );
return;
@@ -410,9 +410,9 @@ void MediaListImpl::deleteMedium( const DOMString &oldMedium )
DOM::DOMString MediaListImpl::mediaText() const
{
DOMString text;
- const QValueList<DOMString>::ConstIterator itEnd = m_lstMedia.end();
+ const TQValueList<DOMString>::ConstIterator itEnd = m_lstMedia.end();
- for ( QValueList<DOMString>::ConstIterator it = m_lstMedia.begin(); it != itEnd; ++it ) {
+ for ( TQValueList<DOMString>::ConstIterator it = m_lstMedia.begin(); it != itEnd; ++it ) {
text += *it;
text += ", ";
}
@@ -422,12 +422,12 @@ DOM::DOMString MediaListImpl::mediaText() const
void MediaListImpl::setMediaText(const DOM::DOMString &value)
{
m_lstMedia.clear();
- const QString val = value.string();
- const QStringList list = QStringList::split( ',', val );
+ const TQString val = value.string();
+ const TQStringList list = TQStringList::split( ',', val );
- const QStringList::ConstIterator itEnd = list.end();
+ const TQStringList::ConstIterator itEnd = list.end();
- for ( QStringList::ConstIterator it = list.begin(); it != itEnd; ++it )
+ for ( TQStringList::ConstIterator it = list.begin(); it != itEnd; ++it )
{
const DOMString medium = (*it).stripWhiteSpace();
if( !medium.isEmpty() )
diff --git a/khtml/css/css_stylesheetimpl.h b/khtml/css/css_stylesheetimpl.h
index 0b35c2104..e7a551947 100644
--- a/khtml/css/css_stylesheetimpl.h
+++ b/khtml/css/css_stylesheetimpl.h
@@ -23,8 +23,8 @@
#ifndef _CSS_css_stylesheetimpl_h_
#define _CSS_css_stylesheetimpl_h_
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include "dom/dom_string.h"
#include "css/css_base.h"
@@ -143,7 +143,7 @@ public:
void add(StyleSheetImpl* s);
void remove(StyleSheetImpl* s);
- QPtrList<StyleSheetImpl> styleSheets;
+ TQPtrList<StyleSheetImpl> styleSheets;
};
// ----------------------------------------------------------------------------
@@ -182,7 +182,7 @@ public:
bool contains( const DOM::DOMString &medium ) const;
protected:
- QValueList<DOM::DOMString> m_lstMedia;
+ TQValueList<DOM::DOMString> m_lstMedia;
};
diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp
index 531cb88bf..73a53d5d2 100644
--- a/khtml/css/css_valueimpl.cpp
+++ b/khtml/css/css_valueimpl.cpp
@@ -41,9 +41,9 @@
#include "rendering/render_style.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qpaintdevice.h>
-#include <qpaintdevicemetrics.h>
+#include <tqregexp.h>
+#include <tqpaintdevice.h>
+#include <tqpaintdevicemetrics.h>
// Hack for debugging purposes
extern DOM::DOMString getPropertyName(unsigned short id);
@@ -56,7 +56,7 @@ using namespace DOM;
static DOMString quoteStringIfNeeded(const DOMString &string)
{
// FIXME: Also need to transform control characters into \ sequences.
- QString s = string.string();
+ TQString s = string.string();
s.replace('\\', "\\\\");
s.replace('\'', "\\'");
return '\'' + s + '\'';
@@ -70,7 +70,7 @@ CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent)
m_node = 0;
}
-CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent, QPtrList<CSSProperty> *lstValues)
+CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent, TQPtrList<CSSProperty> *lstValues)
: StyleBaseImpl(parent)
{
m_lstValues = lstValues;
@@ -83,10 +83,10 @@ CSSStyleDeclarationImpl& CSSStyleDeclarationImpl::operator= (const CSSStyleDecl
delete m_lstValues;
m_lstValues = 0;
if (o.m_lstValues) {
- m_lstValues = new QPtrList<CSSProperty>;
+ m_lstValues = new TQPtrList<CSSProperty>;
m_lstValues->setAutoDelete( true );
- QPtrListIterator<CSSProperty> lstValuesIt(*o.m_lstValues);
+ TQPtrListIterator<CSSProperty> lstValuesIt(*o.m_lstValues);
for (lstValuesIt.toFirst(); lstValuesIt.current(); ++lstValuesIt)
m_lstValues->append(new CSSProperty(*lstValuesIt.current()));
}
@@ -233,7 +233,7 @@ DOMString CSSStyleDeclarationImpl::getShortHandValue( const int* properties, int
{
if(!m_lstValues) return 0;
- QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
+ TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
CSSProperty *current;
for ( lstValuesIt.toLast(); (current = lstValuesIt.current()); --lstValuesIt )
if (current->m_id == propertyID && !current->nonCSSHint)
@@ -246,7 +246,7 @@ DOMString CSSStyleDeclarationImpl::removeProperty( int propertyID, bool NonCSSHi
if(!m_lstValues) return DOMString();
DOMString value;
- QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
+ TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
CSSProperty *current;
for ( lstValuesIt.toLast(); (current = lstValuesIt.current()); --lstValuesIt ) {
if (current->m_id == propertyID && NonCSSHint == current->nonCSSHint) {
@@ -289,7 +289,7 @@ void CSSStyleDeclarationImpl::removeCSSHints()
bool CSSStyleDeclarationImpl::getPropertyPriority( int propertyID ) const
{
if ( m_lstValues) {
- QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
+ TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
CSSProperty *current;
for ( lstValuesIt.toFirst(); (current = lstValuesIt.current()); ++lstValuesIt ) {
if( propertyID == current->m_id )
@@ -302,7 +302,7 @@ bool CSSStyleDeclarationImpl::getPropertyPriority( int propertyID ) const
bool CSSStyleDeclarationImpl::setProperty(int id, const DOMString &value, bool important, bool nonCSSHint)
{
if(!m_lstValues) {
- m_lstValues = new QPtrList<CSSProperty>;
+ m_lstValues = new TQPtrList<CSSProperty>;
m_lstValues->setAutoDelete(true);
}
@@ -319,7 +319,7 @@ bool CSSStyleDeclarationImpl::setProperty(int id, const DOMString &value, bool i
void CSSStyleDeclarationImpl::setProperty(int id, int value, bool important, bool nonCSSHint)
{
if(!m_lstValues) {
- m_lstValues = new QPtrList<CSSProperty>;
+ m_lstValues = new TQPtrList<CSSProperty>;
m_lstValues->setAutoDelete(true);
}
removeProperty(id, nonCSSHint );
@@ -342,7 +342,7 @@ void CSSStyleDeclarationImpl::setLengthProperty(int id, const DOM::DOMString &va
void CSSStyleDeclarationImpl::setProperty ( const DOMString &propertyString)
{
if(!m_lstValues) {
- m_lstValues = new QPtrList<CSSProperty>;
+ m_lstValues = new TQPtrList<CSSProperty>;
m_lstValues->setAutoDelete( true );
}
@@ -374,7 +374,7 @@ DOM::DOMString CSSStyleDeclarationImpl::cssText() const
DOMString result;
if ( m_lstValues) {
- QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
+ TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
CSSProperty *current;
for ( lstValuesIt.toFirst(); (current = lstValuesIt.current()); ++lstValuesIt ) {
result += current->cssText();
@@ -389,7 +389,7 @@ void CSSStyleDeclarationImpl::setCssText(DOM::DOMString text)
if (m_lstValues) {
m_lstValues->clear();
} else {
- m_lstValues = new QPtrList<CSSProperty>;
+ m_lstValues = new TQPtrList<CSSProperty>;
m_lstValues->setAutoDelete( true );
}
@@ -454,7 +454,7 @@ DOM::DOMString CSSValueListImpl::cssText() const
{
DOMString result = "";
- for (QPtrListIterator<CSSValueImpl> iterator(m_values); iterator.current(); ++iterator) {
+ for (TQPtrListIterator<CSSValueImpl> iterator(m_values); iterator.current(); ++iterator) {
result += iterator.current()->cssText();
}
@@ -549,7 +549,7 @@ void CSSPrimitiveValueImpl::cleanup()
m_type = 0;
}
-int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics )
+int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics )
{
double result = computeLengthFloat( style, devMetrics );
// This conversion is imprecise, often resulting in values of, e.g., 44.99998. We
@@ -558,7 +558,7 @@ int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDevic
return intResult;
}
-double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics )
+double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics )
{
unsigned short type = primitiveType();
@@ -576,11 +576,11 @@ double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPa
break;
case CSSPrimitiveValue::CSS_EXS:
{
- QFontMetrics fm = style->fontMetrics();
+ TQFontMetrics fm = style->fontMetrics();
#ifdef APPLE_CHANGES
factor = fm.xHeight();
#else
- QRect b = fm.boundingRect('x');
+ TQRect b = fm.boundingRect('x');
factor = b.height();
#endif
break;
@@ -671,55 +671,55 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const
// ###
break;
case CSSPrimitiveValue::CSS_NUMBER:
- text = DOMString(QString::number( (int)m_value.num ));
+ text = DOMString(TQString::number( (int)m_value.num ));
break;
case CSSPrimitiveValue::CSS_PERCENTAGE:
- text = DOMString(QString::number( m_value.num ) + "%");
+ text = DOMString(TQString::number( m_value.num ) + "%");
break;
case CSSPrimitiveValue::CSS_EMS:
- text = DOMString(QString::number( m_value.num ) + "em");
+ text = DOMString(TQString::number( m_value.num ) + "em");
break;
case CSSPrimitiveValue::CSS_EXS:
- text = DOMString(QString::number( m_value.num ) + "ex");
+ text = DOMString(TQString::number( m_value.num ) + "ex");
break;
case CSSPrimitiveValue::CSS_PX:
- text = DOMString(QString::number( m_value.num ) + "px");
+ text = DOMString(TQString::number( m_value.num ) + "px");
break;
case CSSPrimitiveValue::CSS_CM:
- text = DOMString(QString::number( m_value.num ) + "cm");
+ text = DOMString(TQString::number( m_value.num ) + "cm");
break;
case CSSPrimitiveValue::CSS_MM:
- text = DOMString(QString::number( m_value.num ) + "mm");
+ text = DOMString(TQString::number( m_value.num ) + "mm");
break;
case CSSPrimitiveValue::CSS_IN:
- text = DOMString(QString::number( m_value.num ) + "in");
+ text = DOMString(TQString::number( m_value.num ) + "in");
break;
case CSSPrimitiveValue::CSS_PT:
- text = DOMString(QString::number( m_value.num ) + "pt");
+ text = DOMString(TQString::number( m_value.num ) + "pt");
break;
case CSSPrimitiveValue::CSS_PC:
- text = DOMString(QString::number( m_value.num ) + "pc");
+ text = DOMString(TQString::number( m_value.num ) + "pc");
break;
case CSSPrimitiveValue::CSS_DEG:
- text = DOMString(QString::number( m_value.num ) + "deg");
+ text = DOMString(TQString::number( m_value.num ) + "deg");
break;
case CSSPrimitiveValue::CSS_RAD:
- text = DOMString(QString::number( m_value.num ) + "rad");
+ text = DOMString(TQString::number( m_value.num ) + "rad");
break;
case CSSPrimitiveValue::CSS_GRAD:
- text = DOMString(QString::number( m_value.num ) + "grad");
+ text = DOMString(TQString::number( m_value.num ) + "grad");
break;
case CSSPrimitiveValue::CSS_MS:
- text = DOMString(QString::number( m_value.num ) + "ms");
+ text = DOMString(TQString::number( m_value.num ) + "ms");
break;
case CSSPrimitiveValue::CSS_S:
- text = DOMString(QString::number( m_value.num ) + "s");
+ text = DOMString(TQString::number( m_value.num ) + "s");
break;
case CSSPrimitiveValue::CSS_HZ:
- text = DOMString(QString::number( m_value.num ) + "hz");
+ text = DOMString(TQString::number( m_value.num ) + "hz");
break;
case CSSPrimitiveValue::CSS_KHZ:
- text = DOMString(QString::number( m_value.num ) + "khz");
+ text = DOMString(TQString::number( m_value.num ) + "khz");
break;
case CSSPrimitiveValue::CSS_DIMENSION:
// ###
@@ -759,12 +759,12 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const
if (m_value.rgbcolor == khtml::transparentColor)
text = "transparent";
else
- text = "rgba(" + QString::number(qRed (m_value.rgbcolor)) + ","
- + QString::number(qBlue (m_value.rgbcolor)) + ","
- + QString::number(qGreen(m_value.rgbcolor)) + ","
- + QString::number(qAlpha(m_value.rgbcolor)/255.0) + ")";
+ text = "rgba(" + TQString::number(qRed (m_value.rgbcolor)) + ","
+ + TQString::number(qBlue (m_value.rgbcolor)) + ","
+ + TQString::number(qGreen(m_value.rgbcolor)) + ","
+ + TQString::number(qAlpha(m_value.rgbcolor)/255.0) + ")";
} else {
- text = QColor(m_value.rgbcolor).name();
+ text = TQColor(m_value.rgbcolor).name();
}
break;
case CSSPrimitiveValue::CSS_PAIR:
@@ -876,20 +876,20 @@ CSSImageValueImpl::~CSSImageValueImpl()
// ------------------------------------------------------------------------
-FontFamilyValueImpl::FontFamilyValueImpl( const QString &string)
+FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string)
: CSSPrimitiveValueImpl( DOMString(string), CSSPrimitiveValue::CSS_STRING)
{
- static const QRegExp parenReg(" \\(.*\\)$");
- static const QRegExp braceReg(" \\[.*\\]$");
+ static const TQRegExp parenReg(" \\(.*\\)$");
+ static const TQRegExp braceReg(" \\[.*\\]$");
parsedFontName = string;
// a language tag is often added in braces at the end. Remove it.
- parsedFontName.replace(parenReg, QString::null);
+ parsedFontName.replace(parenReg, TQString::null);
// remove [Xft] qualifiers
- parsedFontName.replace(braceReg, QString::null);
+ parsedFontName.replace(braceReg, TQString::null);
#ifndef APPLE_CHANGES
- const QString &available = KHTMLSettings::availableFamilies();
+ const TQString &available = KHTMLSettings::availableFamilies();
parsedFontName = parsedFontName.lower();
// kdDebug(0) << "searching for face '" << parsedFontName << "'" << endl;
@@ -913,7 +913,7 @@ FontFamilyValueImpl::FontFamilyValueImpl( const QString &string)
parsedFontName = available.mid( pos, p - pos);
// kdDebug(0) << "going for '" << parsedFontName << "'" << endl;
} else
- parsedFontName = QString::null;
+ parsedFontName = TQString::null;
#endif // !APPLE_CHANGES
}
@@ -987,14 +987,14 @@ DOMString QuotesValueImpl::cssText() const
return "\"" + data.join("\" \"") + "\"";
}
-void QuotesValueImpl::addLevel(const QString& open, const QString& close)
+void QuotesValueImpl::addLevel(const TQString& open, const TQString& close)
{
data.append(open);
data.append(close);
levels++;
}
-QString QuotesValueImpl::openQuote(int level) const
+TQString QuotesValueImpl::openQuote(int level) const
{
if (levels == 0) return "";
level--; // increments are calculated before openQuote is called
@@ -1005,7 +1005,7 @@ QString QuotesValueImpl::openQuote(int level) const
return data[level*2];
}
-QString QuotesValueImpl::closeQuote(int level) const
+TQString QuotesValueImpl::closeQuote(int level) const
{
if (levels == 0) return "";
// kdDebug( 6080 ) << "Close quote level:" << level << endl;
@@ -1060,7 +1060,7 @@ DOMString ShadowValueImpl::cssText() const
DOMString CounterActImpl::cssText() const
{
DOMString text(m_counter);
- text += DOMString(QString::number(m_value));
+ text += DOMString(TQString::number(m_value));
return text;
}
diff --git a/khtml/css/css_valueimpl.h b/khtml/css/css_valueimpl.h
index 5b4207149..3566c00cb 100644
--- a/khtml/css/css_valueimpl.h
+++ b/khtml/css/css_valueimpl.h
@@ -30,7 +30,7 @@
#include "misc/loader_client.h"
#include "misc/shared.h"
-#include <qintdict.h>
+#include <tqintdict.h>
namespace khtml {
class RenderStyle;
@@ -51,7 +51,7 @@ class CSSStyleDeclarationImpl : public StyleBaseImpl
{
public:
CSSStyleDeclarationImpl(CSSRuleImpl *parentRule);
- CSSStyleDeclarationImpl(CSSRuleImpl *parentRule, QPtrList<CSSProperty> *lstValues);
+ CSSStyleDeclarationImpl(CSSRuleImpl *parentRule, TQPtrList<CSSProperty> *lstValues);
virtual ~CSSStyleDeclarationImpl();
CSSStyleDeclarationImpl& operator=( const CSSStyleDeclarationImpl&);
@@ -79,7 +79,7 @@ public:
virtual DOMString getPropertyValue( int propertyID ) const;
virtual bool getPropertyPriority( int propertyID ) const;
- QPtrList<CSSProperty> *values() const { return m_lstValues; }
+ TQPtrList<CSSProperty> *values() const { return m_lstValues; }
void setNode(NodeImpl *_node) { m_node = _node; }
void setChanged();
@@ -90,7 +90,7 @@ protected:
DOMString getShortHandValue( const int* properties, int number ) const;
DOMString get4Values( const int* properties ) const;
- QPtrList<CSSProperty> *m_lstValues;
+ TQPtrList<CSSProperty> *m_lstValues;
NodeImpl *m_node;
private:
@@ -146,7 +146,7 @@ public:
virtual DOM::DOMString cssText() const;
protected:
- QPtrList<CSSValueImpl> m_values;
+ TQPtrList<CSSValueImpl> m_values;
};
@@ -182,9 +182,9 @@ public:
* this is screen/printer dependent, so we probably need a config option for this,
* and some tool to calibrate.
*/
- int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics );
+ int computeLength( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics );
- double computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics );
+ double computeLengthFloat( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics );
// use with care!!!
void setPrimitiveType(unsigned short type) { m_type = type; }
@@ -323,11 +323,11 @@ protected:
class FontFamilyValueImpl : public CSSPrimitiveValueImpl
{
public:
- FontFamilyValueImpl( const QString &string);
- const QString &fontName() const { return parsedFontName; }
+ FontFamilyValueImpl( const TQString &string);
+ const TQString &fontName() const { return parsedFontName; }
int genericFamilyType() const { return _genericFamilyType; }
protected:
- QString parsedFontName;
+ TQString parsedFontName;
private:
int _genericFamilyType;
};
@@ -362,12 +362,12 @@ public:
virtual unsigned short cssValueType() const { return CSSValue::CSS_CUSTOM; }
virtual DOM::DOMString cssText() const;
- void addLevel(const QString& open, const QString& close);
- QString openQuote(int level) const;
- QString closeQuote(int level) const;
+ void addLevel(const TQString& open, const TQString& close);
+ TQString openQuote(int level) const;
+ TQString closeQuote(int level) const;
unsigned int levels;
- QStringList data;
+ TQStringList data;
};
// Used for text-shadow and box-shadow
diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp
index 7b7a464f4..73eff588c 100644
--- a/khtml/css/csshelper.cpp
+++ b/khtml/css/csshelper.cpp
@@ -21,11 +21,11 @@
*/
#include "csshelper.h"
-#include <qfontmetrics.h>
-#include <qfontinfo.h>
-#include <qpaintdevice.h>
-#include <qpaintdevicemetrics.h>
-#include <qfontdatabase.h>
+#include <tqfontmetrics.h>
+#include <tqfontinfo.h>
+#include <tqpaintdevice.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfontdatabase.h>
#include <kcharsets.h>
#include <kglobal.h>
diff --git a/khtml/css/csshelper.h b/khtml/css/csshelper.h
index 68793421b..5a9142091 100644
--- a/khtml/css/csshelper.h
+++ b/khtml/css/csshelper.h
@@ -22,8 +22,8 @@
#ifndef css_helper_h
#define css_helper_h
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "dom/dom_string.h"
diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp
index 6ec9a4ec7..1bff45c51 100644
--- a/khtml/css/cssparser.cpp
+++ b/khtml/css/cssparser.cpp
@@ -191,7 +191,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM
for ( unsigned int i = 0; i < strlen(khtml_rule); i++ )
data[i] = khtml_rule[i];
memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) );
- // qDebug("parse string = '%s'", QConstString( (const QChar *)data, length ).string().latin1() );
+ // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
data[length-4] = '}';
runParser(length);
@@ -220,7 +220,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id,
data[i] = khtml_value[i];
memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) );
data[length-4] = '}';
- // qDebug("parse string = '%s'", QConstString( (const QChar *)data, length ).string().latin1() );
+ // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
id = _id;
important = _important;
@@ -301,7 +301,7 @@ void CSSParser::addProperty( int propId, CSSValueImpl *value, bool important )
CSSStyleDeclarationImpl *CSSParser::createStyleDeclaration( CSSStyleRuleImpl *rule )
{
- QPtrList<CSSProperty> *propList = new QPtrList<CSSProperty>;
+ TQPtrList<CSSProperty> *propList = new TQPtrList<CSSProperty>;
propList->setAutoDelete( true );
for ( int i = 0; i < numParsedProperties; i++ )
propList->append( parsedProperties[i] );
@@ -477,7 +477,7 @@ bool CSSParser::parseValue( int propId, bool important )
} else {
QuotesValueImpl *quotes = new QuotesValueImpl;
bool is_valid = true;
- QString open, close;
+ TQString open, close;
Value *val=valueList->current();
while (val) {
if (val->unit == CSSPrimitiveValue::CSS_STRING)
@@ -1338,7 +1338,7 @@ bool CSSParser::parseContent( int propId, bool important )
} else if ( val->unit == Value::Function ) {
// attr( X ) | counter( X [,Y] ) | counters( X, Y, [,Z] )
ValueList *args = val->function->args;
- QString fname = qString( val->function->name ).lower();
+ TQString fname = qString( val->function->name ).lower();
if (!args) return false;
if (fname == "attr(") {
if ( args->size() != 1)
@@ -1693,7 +1693,7 @@ bool CSSParser::parseShape( int propId, bool important )
{
Value *value = valueList->current();
ValueList *args = value->function->args;
- QString fname = qString( value->function->name ).lower();
+ TQString fname = qString( value->function->name ).lower();
//qDebug( "parseShape: fname: %d", fname.latin1() );
if ( fname != "rect(" || !args )
return false;
@@ -1750,7 +1750,7 @@ bool CSSParser::parseFont( bool important )
// optional font-style, font-variant and font-weight
while ( value ) {
// kdDebug( 6080 ) << "got value " << value->id << " / " << (value->unit == CSSPrimitiveValue::CSS_STRING ||
- // value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString::null )
+ // value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null )
// << endl;
int id = value->id;
if ( id ) {
@@ -1890,12 +1890,12 @@ CSSValueListImpl *CSSParser::parseFontFamily()
// kdDebug( 6080 ) << "CSSParser::parseFontFamily current=" << valueList->currentValue << endl;
CSSValueListImpl *list = new CSSValueListImpl;
Value *value = valueList->current();
- QString currFace;
+ TQString currFace;
while ( value ) {
// kdDebug( 6080 ) << "got value " << value->id << " / "
// << (value->unit == CSSPrimitiveValue::CSS_STRING ||
-// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString::null )
+// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null )
// << endl;
Value* nextValue = valueList->next();
bool nextValBreaksFont = !nextValue ||
@@ -1913,7 +1913,7 @@ CSSValueListImpl *CSSParser::parseFontFamily()
else if (nextValBreaksFont || !nextValIsFontName) {
if ( !currFace.isNull() ) {
list->append( new FontFamilyValueImpl( currFace ) );
- currFace = QString::null;
+ currFace = TQString::null;
}
list->append(new CSSPrimitiveValueImpl(value->id));
}
@@ -1923,7 +1923,7 @@ CSSValueListImpl *CSSParser::parseFontFamily()
}
else if (value->unit == CSSPrimitiveValue::CSS_STRING) {
// Strings never share in a family name.
- currFace = QString::null;
+ currFace = TQString::null;
list->append(new FontFamilyValueImpl(qString( value->string) ) );
}
else if (value->unit == CSSPrimitiveValue::CSS_IDENT) {
@@ -1934,7 +1934,7 @@ CSSValueListImpl *CSSParser::parseFontFamily()
else if (nextValBreaksFont || !nextValIsFontName) {
if ( !currFace.isNull() ) {
list->append( new FontFamilyValueImpl( currFace ) );
- currFace = QString::null;
+ currFace = TQString::null;
}
list->append(new FontFamilyValueImpl( qString( value->string ) ) );
}
@@ -1954,7 +1954,7 @@ CSSValueListImpl *CSSParser::parseFontFamily()
value = valueList->next();
if ( !currFace.isNull() )
list->append( new FontFamilyValueImpl( currFace ) );
- currFace = QString::null;
+ currFace = TQString::null;
}
else if (nextValIsFontName)
value = nextValue;
@@ -2037,7 +2037,7 @@ bool CSSParser::parseHSLParameters(Value* value, double* colorArray, bool parseA
return true;
}
-static bool parseColor(int unit, const QString &name, QRgb& rgb)
+static bool parseColor(int unit, const TQString &name, QRgb& rgb)
{
int len = name.length();
@@ -2067,7 +2067,7 @@ static bool parseColor(int unit, const QString &name, QRgb& rgb)
if ( unit == CSSPrimitiveValue::CSS_IDENT ) {
// try a little harder
- QColor tc;
+ TQColor tc;
tc.setNamedColor(name.lower());
if ( tc.isValid() ) {
rgb = tc.rgb();
@@ -2088,7 +2088,7 @@ CSSPrimitiveValueImpl *CSSParser::parseColorFromValue(Value* value)
QRgb c = khtml::transparentColor;
if ( !strict && value->unit == CSSPrimitiveValue::CSS_NUMBER &&
value->fValue >= 0. && value->fValue < 1000000. ) {
- QString str;
+ TQString str;
str.sprintf( "%06d", (int)(value->fValue+.5) );
if ( !::parseColor( value->unit, str, c ) )
return 0;
@@ -2357,7 +2357,7 @@ int DOM::CSSParser::lex( void *_yylval )
unsigned short *t = text( &length );
#ifdef TOKEN_DEBUG
- qDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : QString( (QChar *)t, length ).latin1() );
+ qDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : TQString( (TQChar *)t, length ).latin1() );
#endif
switch( token ) {
case '{':
@@ -2426,8 +2426,8 @@ int DOM::CSSParser::lex( void *_yylval )
length--;
case FLOAT:
case INTEGER:
- yylval->val = QString( (QChar *)t, length ).toDouble();
- //qDebug("value = %s, converted=%.2f", QString( (QChar *)t, length ).latin1(), yylval->val );
+ yylval->val = TQString( (TQChar *)t, length ).toDouble();
+ //qDebug("value = %s, converted=%.2f", TQString( (TQChar *)t, length ).latin1(), yylval->val );
break;
default:
@@ -2531,7 +2531,7 @@ unsigned short *DOM::CSSParser::text(int *length)
uc += toHex( *escape );
escape++;
}
-// qDebug(" converting escape: string='%s', value=0x%x", QString( (QChar *)e, current-e ).latin1(), uc );
+// qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc );
// can't handle chars outside ucs2
if ( uc > 0xffff )
uc = 0xfffd;
@@ -2560,7 +2560,7 @@ unsigned short *DOM::CSSParser::text(int *length)
uc += toHex( *escape );
escape++;
}
- // qDebug(" converting escape: string='%s', value=0x%x", QString( (QChar *)e, current-e ).latin1(), uc );
+ // qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc );
// can't handle chars outside ucs2
if ( uc > 0xffff )
uc = 0xfffd;
@@ -2585,7 +2585,7 @@ typedef unsigned int YY_CHAR;
*yy_cp = 0; \
yy_c_buf_p = yy_cp;
#define YY_BREAK break;
-#define ECHO qDebug( "%s", QString( (QChar *)yytext, yyleng ).latin1() )
+#define ECHO qDebug( "%s", TQString( (TQChar *)yytext, yyleng ).latin1() )
#define YY_RULE_SETUP
#define INITIAL 0
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
diff --git a/khtml/css/cssparser.h b/khtml/css/cssparser.h
index 1c055acd0..0e00ebc16 100644
--- a/khtml/css/cssparser.h
+++ b/khtml/css/cssparser.h
@@ -22,9 +22,9 @@
#ifndef _CSS_cssparser_h_
#define _CSS_cssparser_h_
-#include <qstring.h>
-#include <qcolor.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqvaluevector.h>
#include <dom/dom_string.h>
namespace DOM {
@@ -72,11 +72,11 @@ namespace DOM {
int unit;
};
- static inline QString qString( const ParseString &ps ) {
- return QString( (QChar *)ps.string, ps.length );
+ static inline TQString qString( const ParseString &ps ) {
+ return TQString( (TQChar *)ps.string, ps.length );
}
static inline DOMString domString( const ParseString &ps ) {
- return DOMString( (QChar *)ps.string, ps.length );
+ return DOMString( (TQChar *)ps.string, ps.length );
}
class ValueList {
@@ -88,7 +88,7 @@ namespace DOM {
Value* current() { return m_current < m_values.size() ? &m_values[m_current] : 0; }
Value* next() { ++m_current; return current(); }
private:
- QValueVector<Value> m_values;
+ TQValueVector<Value> m_values;
unsigned int m_current;
};
@@ -148,7 +148,7 @@ namespace DOM {
CSSPrimitiveValueImpl *parseColorFromValue(Value* val);
CSSValueImpl* parseCounterContent(ValueList *args, bool counters);
- static bool parseColor(const QString &name, QRgb& rgb);
+ static bool parseColor(const TQString &name, QRgb& rgb);
// CSS3 Parsing Routines (for properties specific to CSS3)
bool parseShadow(int propId, bool important);
diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp
index 235a2cf20..8f6cc09a6 100644
--- a/khtml/css/cssstyleselector.cpp
+++ b/khtml/css/cssstyleselector.cpp
@@ -59,14 +59,14 @@ using namespace DOM;
#include <kcharsets.h>
#include <kglobal.h>
#include <kconfig.h>
-#include <qfile.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qtooltip.h>
+#include <tqfile.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kurl.h>
#include <assert.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpaintdevicemetrics.h>
#include <stdlib.h>
#define HANDLE_INHERIT(prop, Prop) \
@@ -188,7 +188,7 @@ enum PseudoState { PseudoUnknown, PseudoNone, PseudoLink, PseudoVisited};
static PseudoState pseudoState;
-CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, StyleSheetListImpl *styleSheets,
+CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet, StyleSheetListImpl *styleSheets,
const KURL &url, bool _strictParsing )
{
KHTMLView* view = doc->view();
@@ -196,7 +196,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S
init(view ? view->part()->settings() : 0, doc);
strictParsing = _strictParsing;
- m_medium = view ? view->mediaType() : QString("all");
+ m_medium = view ? view->mediaType() : TQString("all");
selectors = 0;
selectorCache = 0;
@@ -220,7 +220,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S
authorStyle = new CSSStyleSelectorList();
- QPtrListIterator<StyleSheetImpl> it( styleSheets->styleSheets );
+ TQPtrListIterator<StyleSheetImpl> it( styleSheets->styleSheets );
for ( ; it.current(); ++it ) {
if ( it.current()->isCSSStyleSheet() && !it.current()->disabled()) {
authorStyle->append( static_cast<CSSStyleSheetImpl*>( it.current() ), m_medium );
@@ -234,8 +234,8 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S
KURL u = url;
- u.setQuery( QString::null );
- u.setRef( QString::null );
+ u.setQuery( TQString::null );
+ u.setRef( TQString::null );
encodedurl.file = u.url();
int pos = encodedurl.file.findRev('/');
encodedurl.path = encodedurl.file;
@@ -243,7 +243,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S
encodedurl.path.truncate( pos );
encodedurl.path += '/';
}
- u.setPath( QString::null );
+ u.setPath( TQString::null );
encodedurl.host = u.url();
//kdDebug() << "CSSStyleSelector::CSSStyleSelector encoded url " << encodedurl.path << endl;
@@ -298,16 +298,16 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do
if(s_defaultStyle) return;
{
- QFile f(locate( "data", "khtml/css/html4.css" ) );
+ TQFile f(locate( "data", "khtml/css/html4.css" ) );
f.open(IO_ReadOnly);
- QCString file( f.size()+1 );
+ TQCString file( f.size()+1 );
int readbytes = f.readBlock( file.data(), f.size() );
f.close();
if ( readbytes >= 0 )
file[readbytes] = '\0';
- QString style = QString::fromLatin1( file.data() );
+ TQString style = TQString::fromLatin1( file.data() );
if(s)
style += s->settingsToCSS();
DOMString str(style);
@@ -323,16 +323,16 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do
s_defaultPrintStyle->append( s_defaultSheet, "print" );
}
{
- QFile f(locate( "data", "khtml/css/quirks.css" ) );
+ TQFile f(locate( "data", "khtml/css/quirks.css" ) );
f.open(IO_ReadOnly);
- QCString file( f.size()+1 );
+ TQCString file( f.size()+1 );
int readbytes = f.readBlock( file.data(), f.size() );
f.close();
if ( readbytes >= 0 )
file[readbytes] = '\0';
- QString style = QString::fromLatin1( file.data() );
+ TQString style = TQString::fromLatin1( file.data() );
DOMString str(style);
s_quirksSheet = new DOM::CSSStyleSheetImpl(doc);
@@ -371,13 +371,13 @@ void CSSStyleSelector::reparseConfiguration()
#define MAXFONTSIZES 8
-void CSSStyleSelector::computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor)
+void CSSStyleSelector::computeFontSizes(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor)
{
computeFontSizesFor(paintDeviceMetrics, zoomFactor, m_fontSizes, false);
computeFontSizesFor(paintDeviceMetrics, zoomFactor, m_fixedFontSizes, true);
}
-void CSSStyleSelector::computeFontSizesFor(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, QValueVector<int>& fontSizes, bool isFixed)
+void CSSStyleSelector::computeFontSizesFor(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, TQValueVector<int>& fontSizes, bool isFixed)
{
#ifdef APPLE_CHANGES
// We don't want to scale the settings by the dpi.
@@ -743,8 +743,8 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e,
if (!decl && !addDecls)
return numProps;
- QPtrList<CSSProperty>* values = decl ? decl->values() : 0;
- QPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : 0;
+ TQPtrList<CSSProperty>* values = decl ? decl->values() : 0;
+ TQPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : 0;
if (!values && !addValues)
return numProps;
@@ -805,7 +805,7 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e,
}
// modified version of the one in kurl.cpp
-static void cleanpath(QString &path)
+static void cleanpath(TQString &path)
{
int pos;
while ( (pos = path.find( "/../" )) != -1 ) {
@@ -851,8 +851,8 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded
if( attr.isNull() ) {
return PseudoNone;
}
- QConstString cu(attr.unicode(), attr.length());
- QString u = cu.string();
+ TQConstString cu(attr.unicode(), attr.length());
+ TQString u = cu.string();
if ( !u.contains("://") ) {
if ( u[0] == '/' )
u = encodedurl.host + u;
@@ -870,7 +870,7 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded
}
// a helper function for parsing nth-arguments
-static bool matchNth(int count, const QString& nth)
+static bool matchNth(int count, const TQString& nth)
{
if (nth.isEmpty()) return false;
int a = 0;
@@ -1145,11 +1145,11 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
// else the value is longer and can be a list
if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false;
- QChar* sel_uc = sel->value.unicode();
- QChar* val_uc = value->unicode();
+ TQChar* sel_uc = sel->value.unicode();
+ TQChar* val_uc = value->unicode();
- QConstString sel_str(sel_uc, sel_len);
- QConstString val_str(val_uc, val_len);
+ TQConstString sel_str(sel_uc, sel_len);
+ TQConstString val_str(val_uc, val_len);
int pos = 0;
for ( ;; ) {
@@ -1167,31 +1167,31 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
case CSSSelector::Contain:
{
//kdDebug( 6080 ) << "checking for contains match" << endl;
- QConstString val_str(value->unicode(), value->length());
- QConstString sel_str(sel->value.unicode(), sel->value.length());
+ TQConstString val_str(value->unicode(), value->length());
+ TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().contains(sel_str.string(), caseSensitive);
}
case CSSSelector::Begin:
{
//kdDebug( 6080 ) << "checking for beginswith match" << endl;
- QConstString val_str(value->unicode(), value->length());
- QConstString sel_str(sel->value.unicode(), sel->value.length());
+ TQConstString val_str(value->unicode(), value->length());
+ TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().startsWith(sel_str.string(), caseSensitive);
}
case CSSSelector::End:
{
//kdDebug( 6080 ) << "checking for endswith match" << endl;
- QConstString val_str(value->unicode(), value->length());
- QConstString sel_str(sel->value.unicode(), sel->value.length());
+ TQConstString val_str(value->unicode(), value->length());
+ TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().endsWith(sel_str.string(), caseSensitive);
}
case CSSSelector::Hyphen:
{
//kdDebug( 6080 ) << "checking for hyphen match" << endl;
- QConstString val_str(value->unicode(), value->length());
- QConstString sel_str(sel->value.unicode(), sel->value.length());
- const QString& str = val_str.string();
- const QString& selStr = sel_str.string();
+ TQConstString val_str(value->unicode(), value->length());
+ TQConstString sel_str(sel->value.unicode(), sel->value.length());
+ const TQString& str = val_str.string();
+ const TQString& selStr = sel_str.string();
if(str.length() < selStr.length()) return false;
// Check if str begins with selStr:
if(str.find(selStr, 0, caseSensitive) != 0) return false;
@@ -1486,8 +1486,8 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
}
if (value.isEmpty()) return false;
- QString langAttr = value.string();
- QString langSel = sel->string_arg.string();
+ TQString langAttr = value.string();
+ TQString langSel = sel->string_arg.string();
if(langAttr.length() < langSel.length()) return false;
@@ -1536,7 +1536,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
HTMLElementImpl *elem;
elem = static_cast<HTMLElementImpl*>(e);
DOMString s = elem->innerText();
- QString selStr = sel->string_arg.string();
+ TQString selStr = sel->string_arg.string();
// kdDebug(6080) << ":contains(\"" << selStr << "\")" << " on \"" << s << "\"" << endl;
return s.string().contains(selStr);
}
@@ -1642,7 +1642,7 @@ void CSSStyleSelector::buildLists()
clearLists();
// collect all selectors and Properties in lists. Then transfer them to the array for faster lookup.
- QPtrList<CSSSelector> selectorList;
+ TQPtrList<CSSSelector> selectorList;
CSSOrderedPropertyList propertyList;
if(m_medium == "print" && defaultPrintStyle)
@@ -1733,7 +1733,7 @@ CSSOrderedRule::~CSSOrderedRule()
// -----------------------------------------------------------------
CSSStyleSelectorList::CSSStyleSelectorList()
- : QPtrList<CSSOrderedRule>()
+ : TQPtrList<CSSOrderedRule>()
{
setAutoDelete(true);
}
@@ -1759,11 +1759,11 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet,
if(item->isStyleRule())
{
CSSStyleRuleImpl *r = static_cast<CSSStyleRuleImpl *>(item);
- QPtrList<CSSSelector> *s = r->selector();
+ TQPtrList<CSSSelector> *s = r->selector();
for(int j = 0; j < (int)s->count(); j++)
{
CSSOrderedRule *rule = new CSSOrderedRule(r, s->at(j), count());
- QPtrList<CSSOrderedRule>::append(rule);
+ TQPtrList<CSSOrderedRule>::append(rule);
//kdDebug( 6080 ) << "appending StyleRule!" << endl;
}
}
@@ -1805,12 +1805,12 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet,
CSSStyleRuleImpl *styleRule =
static_cast<CSSStyleRuleImpl *>( childItem );
- QPtrList<CSSSelector> *s = styleRule->selector();
+ TQPtrList<CSSSelector> *s = styleRule->selector();
for( int j = 0; j < ( int ) s->count(); j++ )
{
CSSOrderedRule *orderedRule = new CSSOrderedRule(
styleRule, s->at( j ), count() );
- QPtrList<CSSOrderedRule>::append( orderedRule );
+ TQPtrList<CSSOrderedRule>::append( orderedRule );
}
}
else
@@ -1831,7 +1831,7 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet,
}
-void CSSStyleSelectorList::collect( QPtrList<CSSSelector> *selectorList, CSSOrderedPropertyList *propList,
+void CSSStyleSelectorList::collect( TQPtrList<CSSSelector> *selectorList, CSSOrderedPropertyList *propList,
Source regular, Source important )
{
CSSOrderedRule *r = first();
@@ -1855,7 +1855,7 @@ void CSSStyleSelectorList::collect( QPtrList<CSSSelector> *selectorList, CSSOrde
// -------------------------------------------------------------------------
-int CSSOrderedPropertyList::compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2)
+int CSSOrderedPropertyList::compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2)
{
int diff = static_cast<CSSOrderedProperty *>(i1)->priority
- static_cast<CSSOrderedProperty *>(i2)->priority;
@@ -1866,7 +1866,7 @@ int CSSOrderedPropertyList::compareItems(QPtrCollection::Item i1, QPtrCollection
void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint selector, uint specificity,
Source regular, Source important )
{
- QPtrList<CSSProperty> *values = decl->values();
+ TQPtrList<CSSProperty> *values = decl->values();
if(!values) return;
int len = values->count();
for(int i = 0; i < len; i++)
@@ -1898,7 +1898,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel
break;
}
- QPtrList<CSSOrderedProperty>::append(new CSSOrderedProperty(prop, selector,
+ TQPtrList<CSSOrderedProperty>::append(new CSSOrderedProperty(prop, selector,
first, source, specificity,
count() ));
}
@@ -1907,7 +1907,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel
// -------------------------------------------------------------------------------------
// this is mostly boring stuff on how to apply a certain rule to the renderstyle...
-static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, QPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 )
+static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, TQPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 )
{
Length l;
if ( !primitiveValue ) {
@@ -1966,8 +1966,8 @@ struct uiColors {
int css_value;
const char * configGroup;
const char * configEntry;
-QPalette::ColorGroup group;
-QColorGroup::ColorRole role;
+TQPalette::ColorGroup group;
+TQColorGroup::ColorRole role;
};
const char * const wmgroup = "WM";
@@ -1978,66 +1978,66 @@ const char * const generalgroup = "General";
*/
static const uiColors uimap[] = {
// Active window border.
- { CSS_VAL_ACTIVEBORDER, wmgroup, "background", QPalette::Active, QColorGroup::Light },
+ { CSS_VAL_ACTIVEBORDER, wmgroup, "background", TQPalette::Active, TQColorGroup::Light },
// Active window caption.
- { CSS_VAL_ACTIVECAPTION, wmgroup, "background", QPalette::Active, QColorGroup::Text },
+ { CSS_VAL_ACTIVECAPTION, wmgroup, "background", TQPalette::Active, TQColorGroup::Text },
// Text in caption, size box, and scrollbar arrow box.
- { CSS_VAL_CAPTIONTEXT, wmgroup, "activeForeground", QPalette::Active, QColorGroup::Text },
+ { CSS_VAL_CAPTIONTEXT, wmgroup, "activeForeground", TQPalette::Active, TQColorGroup::Text },
// Face color for three-dimensional display elements.
- { CSS_VAL_BUTTONFACE, wmgroup, 0, QPalette::Inactive, QColorGroup::Button },
+ { CSS_VAL_BUTTONFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button },
// Dark shadow for three-dimensional display elements (for edges facing away from the light source).
- { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, 0, QPalette::Inactive, QColorGroup::Light },
+ { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light },
// Shadow color for three-dimensional display elements.
- { CSS_VAL_BUTTONSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Shadow },
+ { CSS_VAL_BUTTONSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow },
// Text on push buttons.
- { CSS_VAL_BUTTONTEXT, wmgroup, "buttonForeground", QPalette::Inactive, QColorGroup::ButtonText },
+ { CSS_VAL_BUTTONTEXT, wmgroup, "buttonForeground", TQPalette::Inactive, TQColorGroup::ButtonText },
// Dark shadow for three-dimensional display elements.
- { CSS_VAL_THREEDDARKSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Dark },
+ { CSS_VAL_THREEDDARKSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Dark },
// Face color for three-dimensional display elements.
- { CSS_VAL_THREEDFACE, wmgroup, 0, QPalette::Inactive, QColorGroup::Button },
+ { CSS_VAL_THREEDFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button },
// Highlight color for three-dimensional display elements.
- { CSS_VAL_THREEDHIGHLIGHT, wmgroup, 0, QPalette::Inactive, QColorGroup::Light },
+ { CSS_VAL_THREEDHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light },
// Light color for three-dimensional display elements (for edges facing the light source).
- { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Midlight },
+ { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Midlight },
// Dark shadow for three-dimensional display elements.
- { CSS_VAL_THREEDSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Shadow },
+ { CSS_VAL_THREEDSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow },
// Inactive window border.
- { CSS_VAL_INACTIVEBORDER, wmgroup, "background", QPalette::Disabled, QColorGroup::Background },
+ { CSS_VAL_INACTIVEBORDER, wmgroup, "background", TQPalette::Disabled, TQColorGroup::Background },
// Inactive window caption.
- { CSS_VAL_INACTIVECAPTION, wmgroup, "inactiveBackground", QPalette::Disabled, QColorGroup::Background },
+ { CSS_VAL_INACTIVECAPTION, wmgroup, "inactiveBackground", TQPalette::Disabled, TQColorGroup::Background },
// Color of text in an inactive caption.
- { CSS_VAL_INACTIVECAPTIONTEXT, wmgroup, "inactiveForeground", QPalette::Disabled, QColorGroup::Text },
- { CSS_VAL_GRAYTEXT, wmgroup, 0, QPalette::Disabled, QColorGroup::Text },
+ { CSS_VAL_INACTIVECAPTIONTEXT, wmgroup, "inactiveForeground", TQPalette::Disabled, TQColorGroup::Text },
+ { CSS_VAL_GRAYTEXT, wmgroup, 0, TQPalette::Disabled, TQColorGroup::Text },
// Menu background
- { CSS_VAL_MENU, generalgroup, "background", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_MENU, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Background },
// Text in menus
- { CSS_VAL_MENUTEXT, generalgroup, "foreground", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_MENUTEXT, generalgroup, "foreground", TQPalette::Inactive, TQColorGroup::Background },
// Text of item(s) selected in a control.
- { CSS_VAL_HIGHLIGHT, generalgroup, "selectBackground", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_HIGHLIGHT, generalgroup, "selectBackground", TQPalette::Inactive, TQColorGroup::Background },
// Text of item(s) selected in a control.
- { CSS_VAL_HIGHLIGHTTEXT, generalgroup, "selectForeground", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_HIGHLIGHTTEXT, generalgroup, "selectForeground", TQPalette::Inactive, TQColorGroup::Background },
// Background color of multiple document interface.
- { CSS_VAL_APPWORKSPACE, generalgroup, "background", QPalette::Inactive, QColorGroup::Text },
+ { CSS_VAL_APPWORKSPACE, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Text },
// Scroll bar gray area.
- { CSS_VAL_SCROLLBAR, generalgroup, "background", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_SCROLLBAR, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Background },
// Window background.
- { CSS_VAL_WINDOW, generalgroup, "windowBackground", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_WINDOW, generalgroup, "windowBackground", TQPalette::Inactive, TQColorGroup::Background },
// Window frame.
- { CSS_VAL_WINDOWFRAME, generalgroup, "windowBackground", QPalette::Inactive, QColorGroup::Background },
+ { CSS_VAL_WINDOWFRAME, generalgroup, "windowBackground", TQPalette::Inactive, TQColorGroup::Background },
// WindowText
- { CSS_VAL_WINDOWTEXT, generalgroup, "windowForeground", QPalette::Inactive, QColorGroup::Text },
- { CSS_VAL_TEXT, generalgroup, 0, QPalette::Inactive, QColorGroup::Text },
- { 0, 0, 0, QPalette::NColorGroups, QColorGroup::NColorRoles }
+ { CSS_VAL_WINDOWTEXT, generalgroup, "windowForeground", TQPalette::Inactive, TQColorGroup::Text },
+ { CSS_VAL_TEXT, generalgroup, 0, TQPalette::Inactive, TQColorGroup::Text },
+ { 0, 0, 0, TQPalette::NColorGroups, TQColorGroup::NColorRoles }
};
-static QColor colorForCSSValue( int css_value )
+static TQColor colorForCSSValue( int css_value )
{
// try the regular ones first
const colorMap *col = cmap;
@@ -2052,21 +2052,21 @@ static QColor colorForCSSValue( int css_value )
#ifndef APPLE_CHANGES
if ( !uicol->css_value ) {
if ( css_value == CSS_VAL_INFOBACKGROUND )
- return QToolTip::palette().inactive().background();
+ return TQToolTip::palette().inactive().background();
else if ( css_value == CSS_VAL_INFOTEXT )
- return QToolTip::palette().inactive().foreground();
+ return TQToolTip::palette().inactive().foreground();
else if ( css_value == CSS_VAL_BACKGROUND ) {
KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support
bckgrConfig.setGroup("Desktop0");
// Desktop background.
return bckgrConfig.readColorEntry("Color1", &qApp->palette().disabled().background());
}
- return QColor();
+ return TQColor();
}
#endif
- const QPalette &pal = qApp->palette();
- QColor c = pal.color( uicol->group, uicol->role );
+ const TQPalette &pal = qApp->palette();
+ TQColor c = pal.color( uicol->group, uicol->role );
#ifndef APPLE_CHANGES
if ( uicol->configEntry ) {
KConfig *globalConfig = KGlobal::config();
@@ -2078,7 +2078,7 @@ static QColor colorForCSSValue( int css_value )
return c;
}
-static inline int nextFontSize(const QValueVector<int>& a, int v, bool smaller)
+static inline int nextFontSize(const TQValueVector<int>& a, int v, bool smaller)
{
// return the nearest bigger/smaller value in scale a, when v is in range.
// otherwise increase/decrease value using a 1.2 fixed ratio
@@ -2334,7 +2334,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
if (isInherit)
fontDef.weight = parentStyle->htmlFont().fontDef.weight;
else if (isInitial)
- fontDef.weight = QFont::Normal;
+ fontDef.weight = TQFont::Normal;
else {
if(!primitiveValue) return;
if(primitiveValue->getIdent())
@@ -2348,7 +2348,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
case CSS_VAL_700:
case CSS_VAL_800:
case CSS_VAL_900:
- fontDef.weight = QFont::Bold;
+ fontDef.weight = TQFont::Bold;
break;
case CSS_VAL_NORMAL:
case CSS_VAL_LIGHTER:
@@ -2357,7 +2357,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
case CSS_VAL_300:
case CSS_VAL_400:
case CSS_VAL_500:
- fontDef.weight = QFont::Normal;
+ fontDef.weight = TQFont::Normal;
break;
default:
return;
@@ -2718,7 +2718,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
case CSS_PROP_SCROLLBAR_TRACK_COLOR:
case CSS_PROP_SCROLLBAR_ARROW_COLOR:
{
- QColor col;
+ TQColor col;
if (isInherit) {
HANDLE_INHERIT_COND(CSS_PROP_BACKGROUND_COLOR, backgroundColor, BackgroundColor)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_TOP_COLOR, borderTopColor, BorderTopColor)
@@ -2747,7 +2747,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
&& id != CSS_PROP_BORDER_RIGHT_COLOR
&& id != CSS_PROP_BORDER_BOTTOM_COLOR
&& id != CSS_PROP_BORDER_LEFT_COLOR )
- col = QColor();
+ col = TQColor();
else
col = colorForCSSValue( ident );
} else if ( primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR ) {
@@ -2778,36 +2778,36 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
style->setOutlineColor(col); break;
#ifndef APPLE_CHANGES
case CSS_PROP_SCROLLBAR_FACE_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Button, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Button, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Button, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Button, col);
break;
case CSS_PROP_SCROLLBAR_SHADOW_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Shadow, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Shadow, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Shadow, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Shadow, col);
break;
case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Light, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Light, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Light, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Light, col);
break;
case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR:
break;
case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Dark, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Dark, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Dark, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Dark, col);
break;
case CSS_PROP_SCROLLBAR_TRACK_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Mid, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Mid, col);
- style->setPaletteColor(QPalette::Active, QColorGroup::Background, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Background, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Mid, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Mid, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Background, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Background, col);
// fall through
case CSS_PROP_SCROLLBAR_BASE_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::Base, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::Base, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::Base, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Base, col);
break;
case CSS_PROP_SCROLLBAR_ARROW_COLOR:
- style->setPaletteColor(QPalette::Active, QColorGroup::ButtonText, col);
- style->setPaletteColor(QPalette::Inactive, QColorGroup::ButtonText, col);
+ style->setPaletteColor(TQPalette::Active, TQColorGroup::ButtonText, col);
+ style->setPaletteColor(TQPalette::Inactive, TQColorGroup::ButtonText, col);
break;
#endif
default:
@@ -3176,10 +3176,10 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
// keywords are being used. Pick the correct default
// based off the font family.
#ifdef APPLE_CHANGES
- const QValueVector<int>& fontSizes = (fontDef.genericFamily == FontDef::eMonospace) ?
+ const TQValueVector<int>& fontSizes = (fontDef.genericFamily == FontDef::eMonospace) ?
m_fixedFontSizes : m_fontSizes;
#else
- const QValueVector<int>& fontSizes = m_fontSizes;
+ const TQValueVector<int>& fontSizes = m_fontSizes;
#endif
switch(primitiveValue->getIdent())
{
@@ -3464,7 +3464,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
#ifdef APPLE_CHANGES
fontDef.family = initialDef.firstFamily();
#else
- fontDef.family = QString::null;
+ fontDef.family = TQString::null;
#endif
if (style->setFontDef(fontDef))
fontDirty = true;
@@ -3478,7 +3478,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
CSSValueImpl *item = list->item(i);
if(!item->isPrimitiveValue()) continue;
CSSPrimitiveValueImpl *val = static_cast<CSSPrimitiveValueImpl *>(item);
- QString face;
+ TQString face;
if( val->primitiveType() == CSSPrimitiveValue::CSS_STRING )
face = static_cast<FontFamilyValueImpl *>(val)->fontName();
else if ( val->primitiveType() == CSSPrimitiveValue::CSS_IDENT ) {
@@ -3614,10 +3614,10 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
style->setBorderRightColor(parentStyle->borderRightColor());
}
else if (isInitial) {
- style->setBorderTopColor(QColor()); // Reset to invalid color so currentColor is used instead.
- style->setBorderBottomColor(QColor());
- style->setBorderLeftColor(QColor());
- style->setBorderRightColor(QColor());
+ style->setBorderTopColor(TQColor()); // Reset to invalid color so currentColor is used instead.
+ style->setBorderBottomColor(TQColor());
+ style->setBorderLeftColor(TQColor());
+ style->setBorderRightColor(TQColor());
}
}
if (id == CSS_PROP_BORDER || id == CSS_PROP_BORDER_STYLE)
@@ -3801,7 +3801,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
int x = item->x->computeLength(style, paintDeviceMetrics);
int y = item->y->computeLength(style, paintDeviceMetrics);
int blur = item->blur ? item->blur->computeLength(style, paintDeviceMetrics) : 0;
- QColor col = khtml::transparentColor;
+ TQColor col = khtml::transparentColor;
if (item->color) {
int ident = item->color->getIdent();
if (ident)
diff --git a/khtml/css/cssstyleselector.h b/khtml/css/cssstyleselector.h
index 235eb72a6..23d854bc0 100644
--- a/khtml/css/cssstyleselector.h
+++ b/khtml/css/cssstyleselector.h
@@ -23,8 +23,8 @@
#ifndef _CSS_cssstyleselector_h_
#define _CSS_cssstyleselector_h_
-#include <qptrlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
#include "rendering/render_style.h"
#include "dom/dom_string.h"
@@ -114,7 +114,7 @@ namespace khtml
* Also takes into account special cases for HTML documents,
* including the defaultStyle (which is html only)
*/
- CSSStyleSelector( DOM::DocumentImpl* doc, QString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const KURL &url,
+ CSSStyleSelector( DOM::DocumentImpl* doc, TQString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const KURL &url,
bool _strictParsing );
/**
* same as above but for a single stylesheet.
@@ -131,18 +131,18 @@ namespace khtml
RenderStyle *styleForElement(DOM::ElementImpl *e);
- QValueVector<int> fontSizes() const { return m_fontSizes; }
- QValueVector<int> fixedFontSizes() const { return m_fixedFontSizes; }
+ TQValueVector<int> fontSizes() const { return m_fontSizes; }
+ TQValueVector<int> fixedFontSizes() const { return m_fixedFontSizes; }
bool strictParsing;
struct Encodedurl {
- QString host; //also contains protocol
- QString path;
- QString file;
+ TQString host; //also contains protocol
+ TQString path;
+ TQString file;
} encodedurl;
- void computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor);
- void computeFontSizesFor(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, QValueVector<int>& fontSizes, bool isFixed);
+ void computeFontSizes(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor);
+ void computeFontSizesFor(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, TQValueVector<int>& fontSizes, bool isFixed);
static void precomputeAttributeDependencies(DOM::DocumentImpl* doc, DOM::CSSSelector* sel);
protected:
@@ -232,8 +232,8 @@ public:
SelectorCache *selectorCache;
unsigned int properties_size;
CSSOrderedProperty **properties;
- QMemArray<CSSOrderedProperty> inlineProps;
- QString m_medium;
+ TQMemArray<CSSOrderedProperty> inlineProps;
+ TQString m_medium;
CSSOrderedProperty **propsToApply;
CSSOrderedProperty **pseudoProps;
unsigned int propsToApplySize;
@@ -249,9 +249,9 @@ public:
KHTMLView *view;
KHTMLPart *part;
const KHTMLSettings *settings;
- QPaintDeviceMetrics *paintDeviceMetrics;
- QValueVector<int> m_fontSizes;
- QValueVector<int> m_fixedFontSizes;
+ TQPaintDeviceMetrics *paintDeviceMetrics;
+ TQValueVector<int> m_fontSizes;
+ TQValueVector<int> m_fixedFontSizes;
bool fontDirty;
@@ -297,10 +297,10 @@ public:
* This is the list we will collect all properties we need to apply in.
* It will get sorted once before applying.
*/
- class CSSOrderedPropertyList : public QPtrList<CSSOrderedProperty>
+ class CSSOrderedPropertyList : public TQPtrList<CSSOrderedProperty>
{
public:
- virtual int compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2);
+ virtual int compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2);
void append(DOM::CSSStyleDeclarationImpl *decl, uint selector, uint specificity,
Source regular, Source important );
};
@@ -316,7 +316,7 @@ public:
int index;
};
- class CSSStyleSelectorList : public QPtrList<CSSOrderedRule>
+ class CSSStyleSelectorList : public TQPtrList<CSSOrderedRule>
{
public:
CSSStyleSelectorList();
@@ -325,7 +325,7 @@ public:
void append( DOM::CSSStyleSheetImpl *sheet,
const DOM::DOMString &medium = "screen" );
- void collect( QPtrList<DOM::CSSSelector> *selectorList, CSSOrderedPropertyList *propList,
+ void collect( TQPtrList<DOM::CSSSelector> *selectorList, CSSOrderedPropertyList *propList,
Source regular, Source important );
};
diff --git a/khtml/css/parser.cpp b/khtml/css/parser.cpp
index 57275190c..c0e6f5869 100644
--- a/khtml/css/parser.cpp
+++ b/khtml/css/parser.cpp
@@ -264,7 +264,7 @@ static inline int getValueID(const char *tagStr, int len)
typedef union YYSTYPE {
CSSRuleImpl *rule;
CSSSelector *selector;
- QPtrList<CSSSelector> *selectorList;
+ TQPtrList<CSSSelector> *selectorList;
bool ok;
MediaListImpl *mediaList;
CSSMediaRuleImpl *mediaRule;
@@ -1862,7 +1862,7 @@ yyreduce:
{
if ( yyvsp[0].selector ) {
- yyval.selectorList = new QPtrList<CSSSelector>;
+ yyval.selectorList = new TQPtrList<CSSSelector>;
yyval.selectorList->setAutoDelete( true );
#ifdef CSS_DEBUG
kdDebug( 6080 ) << " got simple selector:" << endl;
@@ -2019,7 +2019,7 @@ yyreduce:
{
CSSParser *p = static_cast<CSSParser *>(parser);
DOM::DocumentImpl *doc = p->document();
- QString tag = qString(yyvsp[0].string);
+ TQString tag = qString(yyvsp[0].string);
if ( doc ) {
if (doc->isHTMLDocument())
tag = tag.lower();
@@ -2097,7 +2097,7 @@ yyreduce:
CSSParser *p = static_cast<CSSParser *>(parser);
DOM::DocumentImpl *doc = p->document();
- QString attr = qString(yyvsp[-1].string);
+ TQString attr = qString(yyvsp[-1].string);
if ( doc ) {
if (doc->isHTMLDocument())
attr = attr.lower();
@@ -2235,7 +2235,7 @@ yyreduce:
{
yyval.selector = new CSSSelector();
yyval.selector->match = CSSSelector::PseudoClass;
- yyval.selector->string_arg = QString::number(yyvsp[-1].val);
+ yyval.selector->string_arg = TQString::number(yyvsp[-1].val);
yyval.selector->value = domString(yyvsp[-2].string);
;}
break;
@@ -2373,7 +2373,7 @@ yyreduce:
case 117:
{
- QString str = qString(yyvsp[-1].string);
+ TQString str = qString(yyvsp[-1].string);
yyval.prop_id = getPropertyID( str.lower().latin1(), str.length() );
;}
break;
@@ -2457,7 +2457,7 @@ yyreduce:
case 129:
{
- QString str = qString( yyvsp[-1].string );
+ TQString str = qString( yyvsp[-1].string );
yyval.value.id = getValueID( str.lower().latin1(), str.length() );
yyval.value.unit = CSSPrimitiveValue::CSS_IDENT;
yyval.value.string = yyvsp[-1].string;
diff --git a/khtml/css/parser.h b/khtml/css/parser.h
index 497e3017f..e3375db66 100644
--- a/khtml/css/parser.h
+++ b/khtml/css/parser.h
@@ -133,7 +133,7 @@
typedef union YYSTYPE {
CSSRuleImpl *rule;
CSSSelector *selector;
- QPtrList<CSSSelector> *selectorList;
+ TQPtrList<CSSSelector> *selectorList;
bool ok;
MediaListImpl *mediaList;
CSSMediaRuleImpl *mediaRule;
diff --git a/khtml/dom/css_value.cpp b/khtml/dom/css_value.cpp
index 5a678768c..de450e861 100644
--- a/khtml/dom/css_value.cpp
+++ b/khtml/dom/css_value.cpp
@@ -125,7 +125,7 @@ void CSSStyleDeclaration::setProperty( const DOMString &propName, const DOMStrin
int id = getPropertyID(propName.string().lower().ascii(), propName.length());
if (!id) return;
bool important = false;
- QString str = priority.string();
+ TQString str = priority.string();
if (str.find("important", 0, false) != -1)
important = true;
diff --git a/khtml/dom/css_value.h b/khtml/dom/css_value.h
index be8239d7e..5d4a043c7 100644
--- a/khtml/dom/css_value.h
+++ b/khtml/dom/css_value.h
@@ -29,7 +29,7 @@
#include <dom/dom_string.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdemacros.h>
@@ -595,7 +595,7 @@ public:
/**
* @deprecated
*/
- RGBColor(const QColor& c) { m_color = c.rgb(); }
+ RGBColor(const TQColor& c) { m_color = c.rgb(); }
RGBColor(QRgb color);
RGBColor(const RGBColor &other);
diff --git a/khtml/dom/dom2_events.cpp b/khtml/dom/dom2_events.cpp
index 9da1d8a73..898a73bc3 100644
--- a/khtml/dom/dom2_events.cpp
+++ b/khtml/dom/dom2_events.cpp
@@ -542,9 +542,9 @@ void TextEvent::initTextEvent(const DOMString &typeArg,
if (impl->isTextInputEvent()) {
//Initialize based on the outputStringArg or virtKeyValArg.
- QString text = outputStringArg.string();
+ TQString text = outputStringArg.string();
if (outputStringArg.length() == 0 && virtKeyValArg) {
- text += QChar((unsigned short)virtKeyValArg);
+ text += TQChar((unsigned short)virtKeyValArg);
}
TextEventImpl* tImpl = static_cast<TextEventImpl*>(impl);
@@ -575,7 +575,7 @@ DOMString TextEvent::outputString() const
return static_cast<TextEventImpl*>(ke)->data();
else {
if (ke->keyVal())
- return QString(QChar((ushort)ke->keyVal()));
+ return TQString(TQChar((ushort)ke->keyVal()));
else
return DOMString();
}
diff --git a/khtml/dom/dom_doc.cpp b/khtml/dom/dom_doc.cpp
index e5ff84e3d..0ff123444 100644
--- a/khtml/dom/dom_doc.cpp
+++ b/khtml/dom/dom_doc.cpp
@@ -112,8 +112,8 @@ HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title )
r->open();
- r->write(QString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() +
- QString::fromLatin1("</TITLE></HEAD>"));
+ r->write(TQString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() +
+ TQString::fromLatin1("</TITLE></HEAD>"));
return r;
}
diff --git a/khtml/dom/dom_element.cpp b/khtml/dom/dom_element.cpp
index 77a9b9e4b..54c322e25 100644
--- a/khtml/dom/dom_element.cpp
+++ b/khtml/dom/dom_element.cpp
@@ -369,7 +369,7 @@ bool Element::khtmlValidAttrName(const DOMString &name)
// Check if name is valid
// http://www.w3.org/TR/2000/REC-xml-20001006#NT-Name
DOMStringImpl* _name = name.implementation();
- QChar ch = _name->s[0];
+ TQChar ch = _name->s[0];
if ( !ch.isLetter() && ch != '_' && ch != ':' )
return false; // first char isn't valid
for ( uint i = 0; i < _name->l; ++i )
@@ -377,7 +377,7 @@ bool Element::khtmlValidAttrName(const DOMString &name)
ch = _name->s[i];
if ( !ch.isLetter() && !ch.isDigit() && ch != '.'
&& ch != '-' && ch != '_' && ch != ':'
- && ch.category() != QChar::Mark_SpacingCombining
+ && ch.category() != TQChar::Mark_SpacingCombining
/* no idea what "extender is" */ )
return false;
}
diff --git a/khtml/dom/dom_node.cpp b/khtml/dom/dom_node.cpp
index 066a73adc..9971bdb00 100644
--- a/khtml/dom/dom_node.cpp
+++ b/khtml/dom/dom_node.cpp
@@ -27,7 +27,7 @@
#include "xml/dom_elementimpl.h"
#include "xml/dom2_eventsimpl.h"
-#include <qrect.h>
+#include <tqrect.h>
using namespace DOM;
@@ -407,9 +407,9 @@ unsigned long Node::index() const
return impl->nodeIndex();
}
-QString Node::toHTML()
+TQString Node::toHTML()
{
- if (!impl) return QString::null;
+ if (!impl) return TQString::null;
return impl->toString().string();
}
@@ -426,7 +426,7 @@ void Node::getCursor(int offset, int &_x, int &_y, int &height)
impl->getCaret(offset, false, _x, _y, dummy, height);
}
-QRect Node::getRect()
+TQRect Node::getRect()
{
if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
return impl->getRect();
diff --git a/khtml/dom/dom_node.h b/khtml/dom/dom_node.h
index 666d89d4a..abdcd8d4d 100644
--- a/khtml/dom/dom_node.h
+++ b/khtml/dom/dom_node.h
@@ -33,7 +33,7 @@
#ifndef _DOM_Node_h_
#define _DOM_Node_h_
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QRect;
@@ -900,7 +900,7 @@ public:
* @internal returns the index of a node
*/
unsigned long index() const;
- QString toHTML() KDE_DEPRECATED;
+ TQString toHTML() KDE_DEPRECATED;
void applyChanges();
/**
* @deprecated without substitution since 3.2
@@ -910,7 +910,7 @@ public:
* not part of the DOM.
* @returns the exact coordinates and size of this element.
*/
- QRect getRect();
+ TQRect getRect();
protected:
NodeImpl *impl;
diff --git a/khtml/dom/dom_string.cpp b/khtml/dom/dom_string.cpp
index 2319194e9..14bdc2613 100644
--- a/khtml/dom/dom_string.cpp
+++ b/khtml/dom/dom_string.cpp
@@ -26,13 +26,13 @@
using namespace DOM;
-DOMString::DOMString(const QChar *str, uint len)
+DOMString::DOMString(const TQChar *str, uint len)
{
impl = new DOMStringImpl( str, len );
impl->ref();
}
-DOMString::DOMString(const QString &str)
+DOMString::DOMString(const TQString &str)
{
if (str.isNull()) {
impl = 0;
@@ -127,16 +127,16 @@ void DOMString::insert(DOMString str, uint pos)
}
-const QChar &DOMString::operator [](unsigned int i) const
+const TQChar &DOMString::operator [](unsigned int i) const
{
- static const QChar nullChar = 0;
+ static const TQChar nullChar = 0;
if(!impl || i >= impl->l ) return nullChar;
return *(impl->s+i);
}
-int DOMString::find(const QChar c, int start) const
+int DOMString::find(const TQChar c, int start) const
{
unsigned int l = start;
if(!impl || l >= impl->l ) return -1;
@@ -186,22 +186,22 @@ bool DOMString::percentage(int &_percentage) const
{
if(!impl || !impl->l) return false;
- if ( *(impl->s+impl->l-1) != QChar('%'))
+ if ( *(impl->s+impl->l-1) != TQChar('%'))
return false;
- _percentage = QConstString(impl->s, impl->l-1).string().toInt();
+ _percentage = TQConstString(impl->s, impl->l-1).string().toInt();
return true;
}
-QChar *DOMString::unicode() const
+TQChar *DOMString::unicode() const
{
if(!impl) return 0;
return impl->unicode();
}
-QString DOMString::string() const
+TQString DOMString::string() const
{
- if(!impl) return QString::null;
+ if(!impl) return TQString::null;
return impl->string();
}
@@ -225,8 +225,8 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )
{
if ( as.length() != bs.length() ) return true;
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
+ const TQChar *a = as.unicode();
+ const TQChar *b = bs.unicode();
if ( a == b ) return false;
if ( !( a && b ) ) return true;
int l = as.length();
@@ -239,7 +239,7 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )
bool DOM::strcasecmp( const DOMString &as, const char* bs )
{
- const QChar *a = as.unicode();
+ const TQChar *a = as.unicode();
int l = as.length();
if ( !bs ) return ( l != 0 );
while ( l-- ) {
@@ -265,18 +265,18 @@ bool DOM::operator==( const DOMString &a, const DOMString &b )
if( l != b.length() ) return false;
- if(!memcmp(a.unicode(), b.unicode(), l*sizeof(QChar)))
+ if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar)))
return true;
return false;
}
-bool DOM::operator==( const DOMString &a, const QString &b )
+bool DOM::operator==( const DOMString &a, const TQString &b )
{
unsigned int l = a.length();
if( l != b.length() ) return false;
- if(!memcmp(a.unicode(), b.unicode(), l*sizeof(QChar)))
+ if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar)))
return true;
return false;
}
@@ -288,7 +288,7 @@ bool DOM::operator==( const DOMString &a, const char *b )
if ( aimpl ) {
int alen = aimpl->l;
- const QChar *aptr = aimpl->s;
+ const TQChar *aptr = aimpl->s;
while ( alen-- ) {
unsigned char c = *b++;
if ( !c || ( *aptr++ ).unicode() != c )
diff --git a/khtml/dom/dom_string.h b/khtml/dom/dom_string.h
index f14a2aea9..3fe725f68 100644
--- a/khtml/dom/dom_string.h
+++ b/khtml/dom/dom_string.h
@@ -23,7 +23,7 @@
#define _DOM_DOMString_h_
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -33,7 +33,7 @@ class DOMStringImpl;
/**
* This class implements the basic string we use in the DOM. We do not use
- * QString for 2 reasons: Memory overhead, and the missing explicit sharing
+ * TQString for 2 reasons: Memory overhead, and the missing explicit sharing
* of strings we need for the DOM.
*
* All DOMStrings are explicitly shared (they behave like pointers), meaning
@@ -50,8 +50,8 @@ public:
*/
DOMString() : impl(0) {}
- DOMString(const QChar *str, uint len);
- DOMString(const QString &);
+ DOMString(const TQChar *str, uint len);
+ DOMString(const TQString &);
DOMString(const char *str);
DOMString(DOMStringImpl *i);
@@ -76,9 +76,9 @@ public:
* The character at position i of the DOMString. If i >= length(), the
* character returned will be 0.
*/
- const QChar &operator [](unsigned int i) const;
+ const TQChar &operator [](unsigned int i) const;
- int find(const QChar c, int start = 0) const;
+ int find(const TQChar c, int start = 0) const;
uint length() const;
void truncate( unsigned int len );
@@ -97,8 +97,8 @@ public:
*/
DOMString upper() const;
- QChar *unicode() const;
- QString string() const;
+ TQChar *unicode() const;
+ TQString string() const;
int toInt() const;
bool percentage(int &_percentage) const;
@@ -129,10 +129,10 @@ inline kndbgstream &operator<<(kndbgstream &stream, const DOMString &) {
#endif
KHTML_EXPORT bool operator==( const DOMString &a, const DOMString &b );
-KHTML_EXPORT bool operator==( const DOMString &a, const QString &b );
+KHTML_EXPORT bool operator==( const DOMString &a, const TQString &b );
KHTML_EXPORT bool operator==( const DOMString &a, const char *b );
inline bool operator!=( const DOMString &a, const DOMString &b ) { return !(a==b); }
-inline bool operator!=( const DOMString &a, const QString &b ) { return !(a==b); }
+inline bool operator!=( const DOMString &a, const TQString &b ) { return !(a==b); }
inline bool operator!=( const DOMString &a, const char *b ) { return !(a==b); }
inline bool strcmp( const DOMString &a, const DOMString &b ) { return a != b; }
diff --git a/khtml/dom/html_block.cpp b/khtml/dom/html_block.cpp
index 2dd9abe56..9e499adb0 100644
--- a/khtml/dom/html_block.cpp
+++ b/khtml/dom/html_block.cpp
@@ -342,7 +342,7 @@ void HTMLPreElement::setWidth( long _width )
{
if(!impl) return;
- QString aStr;
+ TQString aStr;
aStr.sprintf("%ld", _width);
DOMString value(aStr);
((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
@@ -391,7 +391,7 @@ void HTMLLayerElement::setTop( long _top )
{
if(!impl) return;
- QString aStr;
+ TQString aStr;
aStr.sprintf("%ld", _top);
DOMString value(aStr);
((ElementImpl *)impl)->setAttribute(ATTR_TOP, value);
@@ -408,7 +408,7 @@ void HTMLLayerElement::setLeft( long _left )
{
if(!impl) return;
- QString aStr;
+ TQString aStr;
aStr.sprintf("%ld", _left);
DOMString value(aStr);
((ElementImpl *)impl)->setAttribute(ATTR_LEFT, value);
diff --git a/khtml/dom/html_form.cpp b/khtml/dom/html_form.cpp
index e1c94e6bf..5d9aec633 100644
--- a/khtml/dom/html_form.cpp
+++ b/khtml/dom/html_form.cpp
@@ -447,7 +447,7 @@ long HTMLInputElement::maxLength() const
void HTMLInputElement::setMaxLength( long _maxLength )
{
if(impl) {
- DOMString value(QString::number(_maxLength));
+ DOMString value(TQString::number(_maxLength));
((ElementImpl *)impl)->setAttribute(ATTR_MAXLENGTH,value);
}
}
@@ -495,7 +495,7 @@ long HTMLInputElement::getSize() const
void HTMLInputElement::setSize( long value )
{
- if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, QString::number(value));
+ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, TQString::number(value));
}
DOMString HTMLInputElement::src() const
@@ -897,7 +897,7 @@ void HTMLSelectElement::setSize( long _size )
{
if(impl) {
- DOMString value(QString::number(_size));
+ DOMString value(TQString::number(_size));
static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE,value);
}
}
@@ -1009,7 +1009,7 @@ void HTMLTextAreaElement::setCols( long _cols )
{
if(impl) {
- DOMString value(QString::number(_cols));
+ DOMString value(TQString::number(_cols));
static_cast<ElementImpl*>(impl)->setAttribute(ATTR_COLS,value);
}
}
@@ -1057,7 +1057,7 @@ void HTMLTextAreaElement::setRows( long _rows )
{
if(impl) {
- DOMString value(QString::number(_rows));
+ DOMString value(TQString::number(_rows));
static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ROWS,value);
}
}
diff --git a/khtml/dom/html_image.cpp b/khtml/dom/html_image.cpp
index 75077e54b..f7c9dac26 100644
--- a/khtml/dom/html_image.cpp
+++ b/khtml/dom/html_image.cpp
@@ -142,7 +142,7 @@ long HTMLAreaElement::tabIndex() const
void HTMLAreaElement::setTabIndex( long _tabIndex )
{
if(impl) {
- DOMString value(QString::number(_tabIndex));
+ DOMString value(TQString::number(_tabIndex));
((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
}
}
@@ -230,7 +230,7 @@ long HTMLImageElement::border() const
void HTMLImageElement::setBorder( long value )
{
- if (impl) static_cast<HTMLImageElementImpl*>(impl)->setAttribute(ATTR_BORDER, QString::number(value));
+ if (impl) static_cast<HTMLImageElementImpl*>(impl)->setAttribute(ATTR_BORDER, TQString::number(value));
}
DOMString HTMLImageElement::getBorder() const
@@ -253,7 +253,7 @@ long HTMLImageElement::height() const
void HTMLImageElement::setHeight( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, TQString::number(value));
}
long HTMLImageElement::hspace() const
@@ -265,7 +265,7 @@ long HTMLImageElement::hspace() const
void HTMLImageElement::setHspace( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, TQString::number(value));
}
bool HTMLImageElement::isMap() const
@@ -328,7 +328,7 @@ long HTMLImageElement::vspace() const
void HTMLImageElement::setVspace( long value )
{
- if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_VSPACE, QString::number(value));
+ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_VSPACE, TQString::number(value));
}
long HTMLImageElement::width() const
@@ -339,7 +339,7 @@ long HTMLImageElement::width() const
void HTMLImageElement::setWidth( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, TQString::number(value));
}
long HTMLImageElement::x() const
diff --git a/khtml/dom/html_inline.cpp b/khtml/dom/html_inline.cpp
index 1f3d0b47e..568761685 100644
--- a/khtml/dom/html_inline.cpp
+++ b/khtml/dom/html_inline.cpp
@@ -168,7 +168,7 @@ long HTMLAnchorElement::tabIndex() const
void HTMLAnchorElement::setTabIndex( long _tabIndex )
{
if(impl) {
- DOMString value(QString::number(_tabIndex));
+ DOMString value(TQString::number(_tabIndex));
((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
}
}
diff --git a/khtml/dom/html_list.cpp b/khtml/dom/html_list.cpp
index 4b6be0962..8d66fe3fc 100644
--- a/khtml/dom/html_list.cpp
+++ b/khtml/dom/html_list.cpp
@@ -169,7 +169,7 @@ long HTMLLIElement::value() const
void HTMLLIElement::setValue( long _value )
{
if(impl) {
- DOMString value(QString::number(_value));
+ DOMString value(TQString::number(_value));
((ElementImpl *)impl)->setAttribute(ATTR_VALUE,value);
}
}
@@ -278,7 +278,7 @@ void HTMLOListElement::setStart( long _start )
{
if(impl) {
- DOMString value(QString::number(_start));
+ DOMString value(TQString::number(_start));
((ElementImpl *)impl)->setAttribute(ATTR_START,value);
}
}
diff --git a/khtml/dom/html_misc.cpp b/khtml/dom/html_misc.cpp
index ff3ad9aa9..fb975b7cf 100644
--- a/khtml/dom/html_misc.cpp
+++ b/khtml/dom/html_misc.cpp
@@ -98,7 +98,7 @@ void HTMLBaseFontElement::setSize( long _value )
{
if ( impl )
{
- DOMString value( QString::number( _value ) );
+ DOMString value( TQString::number( _value ) );
((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
}
}
diff --git a/khtml/dom/html_object.cpp b/khtml/dom/html_object.cpp
index 0648f081c..65ec2f34e 100644
--- a/khtml/dom/html_object.cpp
+++ b/khtml/dom/html_object.cpp
@@ -140,7 +140,7 @@ long HTMLAppletElement::getHspace() const
void HTMLAppletElement::setHspace( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, TQString::number(value));
}
DOMString HTMLAppletElement::name() const
@@ -184,7 +184,7 @@ long HTMLAppletElement::getVspace() const
void HTMLAppletElement::setVspace( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, TQString::number(value));
}
@@ -359,7 +359,7 @@ long HTMLObjectElement::getHspace() const
void HTMLObjectElement::setHspace( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, TQString::number(value));
}
DOMString HTMLObjectElement::name() const
@@ -393,7 +393,7 @@ long HTMLObjectElement::tabIndex() const
void HTMLObjectElement::setTabIndex( long _tabIndex )
{
if(impl) {
- DOMString value(QString::number(_tabIndex));
+ DOMString value(TQString::number(_tabIndex));
((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
}
}
@@ -439,7 +439,7 @@ long HTMLObjectElement::getVspace() const
void HTMLObjectElement::setVspace( long value )
{
- if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, QString::number(value));
+ if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, TQString::number(value));
}
DOMString HTMLObjectElement::width() const
diff --git a/khtml/dom/html_table.cpp b/khtml/dom/html_table.cpp
index f89c4a899..b42c4fcd1 100644
--- a/khtml/dom/html_table.cpp
+++ b/khtml/dom/html_table.cpp
@@ -193,7 +193,7 @@ long HTMLTableCellElement::colSpan() const
void HTMLTableCellElement::setColSpan( long _colSpan )
{
if(impl) {
- DOMString value(QString::number(_colSpan));
+ DOMString value(TQString::number(_colSpan));
((ElementImpl *)impl)->setAttribute(ATTR_COLSPAN,value);
}
}
@@ -241,7 +241,7 @@ long HTMLTableCellElement::rowSpan() const
void HTMLTableCellElement::setRowSpan( long _rowSpan )
{
if(impl) {
- DOMString value(QString::number(_rowSpan));
+ DOMString value(TQString::number(_rowSpan));
((ElementImpl *)impl)->setAttribute(ATTR_ROWSPAN,value);
}
}
@@ -358,7 +358,7 @@ long HTMLTableColElement::span() const
void HTMLTableColElement::setSpan( long _span )
{
if(impl) {
- DOMString value(QString::number(_span));
+ DOMString value(TQString::number(_span));
((ElementImpl *)impl)->setAttribute(ATTR_SPAN,value);
}
}
diff --git a/khtml/domtreeview.cpp b/khtml/domtreeview.cpp
index e5516edfd..61697a9f3 100644
--- a/khtml/domtreeview.cpp
+++ b/khtml/domtreeview.cpp
@@ -19,7 +19,7 @@
#include "domtreeview.moc"
#include "xml/dom_nodeimpl.h"
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
{
setCaption(name);
setRootIsDecorated(true);
@@ -28,8 +28,8 @@ DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * n
addColumn("Renderer");
setSorting(-1);
part = currentpart;
- connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
- connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
+ connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this, TQT_SLOT(showTree(const DOM::Node &)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotItemClicked(TQListViewItem *)));
m_nodedict.setAutoDelete(true);
}
@@ -58,20 +58,20 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
{
- QListViewItem *cur_item;
+ TQListViewItem *cur_item;
if(pNode.ownerDocument() != document)
{
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
- cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), val );
+ cur_item = new TQListViewItem(static_cast<TQListView *>(this), node.nodeName().string(), val );
document = pNode.ownerDocument();
}
else {
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
- cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val);
+ cur_item = new TQListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val);
}
if(node.handle())
@@ -88,7 +88,7 @@ void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
{
DOM::Node *handle = m_nodedict[cur_item];
if(handle) {
diff --git a/khtml/domtreeview.h b/khtml/domtreeview.h
index 29a70e43d..ef3d45c44 100644
--- a/khtml/domtreeview.h
+++ b/khtml/domtreeview.h
@@ -20,15 +20,15 @@
#include <klistview.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
+#include <tqlistview.h>
+#include <tqptrdict.h>
#include "dom/dom_core.h"
class DOMTreeView : public KListView
{
Q_OBJECT
public:
- DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
+ DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0);
~DOMTreeView();
void recursive(const DOM::Node &pNode, const DOM::Node &node);
@@ -40,11 +40,11 @@ class DOMTreeView : public KListView
void showTree(const DOM::Node &pNode);
protected slots:
- void slotItemClicked(QListViewItem *);
+ void slotItemClicked(TQListViewItem *);
private:
- QPtrDict<QListViewItem> m_itemdict;
- QPtrDict<DOM::Node> m_nodedict;
+ TQPtrDict<TQListViewItem> m_itemdict;
+ TQPtrDict<DOM::Node> m_nodedict;
DOM::Node document;
KHTMLPart *part;
diff --git a/khtml/ecma/domparser.cpp b/khtml/ecma/domparser.cpp
index 63a9dce36..672754a45 100644
--- a/khtml/ecma/domparser.cpp
+++ b/khtml/ecma/domparser.cpp
@@ -88,8 +88,8 @@ Value DOMParserProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &
return Undefined();
}
- QString str = args[0].toString(exec).qstring();
- QString contentType = args[1].toString(exec).qstring().stripWhiteSpace();
+ TQString str = args[0].toString(exec).qstring();
+ TQString contentType = args[1].toString(exec).qstring().stripWhiteSpace();
if (contentType == "text/xml" || contentType == "application/xml" || contentType == "application/xhtml+xml") {
DocumentImpl *docImpl = parser->doc->implementation()->createDocument();
diff --git a/khtml/ecma/domparser.h b/khtml/ecma/domparser.h
index 233872602..746514783 100644
--- a/khtml/ecma/domparser.h
+++ b/khtml/ecma/domparser.h
@@ -21,7 +21,7 @@
#ifndef DOMPARSER_H
#define DOMPARSER_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kjs/object.h>
#include <kjs/interpreter.h>
#include <misc/shared.h>
@@ -48,7 +48,7 @@ private:
enum { ParseFromString };
private:
- QGuardedPtr<DOM::DocumentImpl> doc;
+ TQGuardedPtr<DOM::DocumentImpl> doc;
friend class DOMParserProtoFunc;
};
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index 295d8c5e9..f9dd291d7 100644
--- a/khtml/ecma/kjs_binding.cpp
+++ b/khtml/ecma/kjs_binding.cpp
@@ -53,7 +53,7 @@ Value DOMObject::get(ExecState *exec, const Identifier &p) const
// ### translate code into readable string ?
// ### oh, and s/QString/i18n or I18N_NOOP (the code in kjs uses I18N_NOOP... but where is it translated ?)
// and where does it appear to the user ?
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException( err );
result = Undefined();
}
@@ -72,7 +72,7 @@ void DOMObject::put(ExecState *exec, const Identifier &propertyName,
tryPut(exec, propertyName, value, attr);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException(err);
}
catch (...) {
@@ -120,7 +120,7 @@ Value DOMFunction::get(ExecState *exec, const Identifier &propertyName) const
return tryGet(exec, propertyName);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException(err);
return Undefined();
}
@@ -139,25 +139,25 @@ Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
// ### Look into setting prototypes of these & the use of instanceof so the exception
// type can be determined. See what other browsers do.
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::RangeException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Range Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Range Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::CSSException e) {
- Object err = Error::create(exec, GeneralError, QString("CSS Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("CSS Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::EventException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Event Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Event Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
@@ -170,7 +170,7 @@ Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
}
}
-typedef QPtrList<ScriptInterpreter> InterpreterList;
+typedef TQPtrList<ScriptInterpreter> InterpreterList;
static InterpreterList *interpreterList;
ScriptInterpreter::ScriptInterpreter( const Object &global, khtml::ChildFrame* frame )
@@ -202,7 +202,7 @@ void ScriptInterpreter::forgetDOMObject( void* objectHandle )
{
if( !interpreterList ) return;
- QPtrListIterator<ScriptInterpreter> it( *interpreterList );
+ TQPtrListIterator<ScriptInterpreter> it( *interpreterList );
while ( it.current() ) {
(*it)->deleteDOMObject( objectHandle );
++it;
@@ -215,7 +215,7 @@ void ScriptInterpreter::mark()
#ifdef KJS_VERBOSE
kdDebug(6070) << "ScriptInterpreter::mark " << this << " marking " << m_customizedDomObjects.count() << " DOM objects" << endl;
#endif
- QPtrDictIterator<void> it( m_customizedDomObjects );
+ TQPtrDictIterator<void> it( m_customizedDomObjects );
for( ; it.current(); ++it )
static_cast<DOMObject*>(it.currentKey())->mark();
}
@@ -257,7 +257,7 @@ bool ScriptInterpreter::isWindowOpenAllowed() const
}
-UString::UString(const QString &d)
+UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
@@ -283,27 +283,27 @@ UString::UString(const DOM::DOMString &d)
DOM::DOMString UString::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
-QConstString UString::qconststring() const
+TQConstString UString::qconststring() const
{
- return QConstString((QChar*) data(), size());
+ return TQConstString((TQChar*) data(), size());
}
DOM::DOMString Identifier::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString Identifier::qstring() const
+TQString Identifier::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
DOM::Node KJS::toNode(const Value& val)
@@ -324,17 +324,17 @@ Value KJS::getString(DOM::DOMString s)
return String(s);
}
-QVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
- QVariant res;
+TQVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
+ TQVariant res;
switch (val.type()) {
case BooleanType:
- res = QVariant(val.toBoolean(exec), 0);
+ res = TQVariant(val.toBoolean(exec), 0);
break;
case NumberType:
- res = QVariant(val.toNumber(exec));
+ res = TQVariant(val.toNumber(exec));
break;
case StringType:
- res = QVariant(val.toString(exec).qstring());
+ res = TQVariant(val.toString(exec).qstring());
break;
default:
// everything else will be 'invalid'
@@ -345,7 +345,7 @@ QVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
class EmbedLiveConnect : public ObjectImp
{
- friend Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id);
+ friend Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id);
EmbedLiveConnect(KParts::LiveConnectExtension *lc, UString n, KParts::LiveConnectExtension::Type t, int id);
public:
~EmbedLiveConnect();
@@ -360,13 +360,13 @@ public:
private:
EmbedLiveConnect(const EmbedLiveConnect &);
- QGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
+ TQGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
UString name;
KParts::LiveConnectExtension::Type objtype;
unsigned long objid;
};
-Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id)
+Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id)
{
KParts::LiveConnectExtension::Type t=(KParts::LiveConnectExtension::Type)type;
switch(t) {
@@ -412,7 +412,7 @@ Value EmbedLiveConnect::get(ExecState *, const Identifier & prop) const
{
if (m_liveconnect) {
KParts::LiveConnectExtension::Type rettype;
- QString retval;
+ TQString retval;
unsigned long retobjid;
if (m_liveconnect->get(objid, prop.qstring(), rettype, retobjid, retval))
return getLiveConnectValue(m_liveconnect, prop.qstring(), rettype, retval, retobjid);
@@ -436,11 +436,11 @@ KDE_NO_EXPORT
Value EmbedLiveConnect::call(ExecState *exec, Object&, const List &args)
{
if (m_liveconnect) {
- QStringList qargs;
+ TQStringList qargs;
for (ListIterator i = args.begin(); i != args.end(); ++i)
qargs.append((*i).toString(exec).qstring());
KParts::LiveConnectExtension::Type rtype;
- QString rval;
+ TQString rval;
unsigned long robjid;
if (m_liveconnect->call(objid, name.qstring(), qargs, rtype, robjid, rval))
return getLiveConnectValue(m_liveconnect, name.qstring(), rtype, rval, robjid);
@@ -460,7 +460,7 @@ Value EmbedLiveConnect::toPrimitive(ExecState *exec, Type) const {
KDE_NO_EXPORT
UString EmbedLiveConnect::toString(ExecState *) const {
- QString str;
+ TQString str;
const char *type = objtype == KParts::LiveConnectExtension::TypeFunction ? "Function" : "Object";
str.sprintf("[object %s ref=%d]", type, (int) objid);
return UString(str);
diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h
index 4b49e866b..c55da21ce 100644
--- a/khtml/ecma/kjs_binding.h
+++ b/khtml/ecma/kjs_binding.h
@@ -26,8 +26,8 @@
#include <kjs/function_object.h> /// for FunctionPrototypeImp
#include <dom/dom_node.h>
-#include <qvariant.h>
-#include <qptrdict.h>
+#include <tqvariant.h>
+#include <tqptrdict.h>
#include <kurl.h>
#include <kjs/lookup.h>
@@ -144,8 +144,8 @@ namespace KJS {
private:
khtml::ChildFrame* m_frame;
- QPtrDict<DOMObject> m_domObjects;
- QPtrDict<void> m_customizedDomObjects; //Objects which had custom properties set,
+ TQPtrDict<DOMObject> m_domObjects;
+ TQPtrDict<void> m_customizedDomObjects; //Objects which had custom properties set,
//and should not be GC'd. key is DOMObject*
DOM::Event *m_evt;
bool m_inlineCode;
@@ -182,7 +182,7 @@ namespace KJS {
/**
* Convery a KJS value into a QVariant
*/
- QVariant ValueToVariant(ExecState* exec, const Value& val);
+ TQVariant ValueToVariant(ExecState* exec, const Value& val);
/**
* We need a modified version of lookupGet because
@@ -330,7 +330,7 @@ namespace KJS {
int id; \
};
- Value getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id);
+ Value getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id);
// This is used to create pseudo-constructor objects, like Mozillaish
diff --git a/khtml/ecma/kjs_css.cpp b/khtml/ecma/kjs_css.cpp
index 167809046..b42f9dd02 100644
--- a/khtml/ecma/kjs_css.cpp
+++ b/khtml/ecma/kjs_css.cpp
@@ -33,9 +33,9 @@
namespace KJS {
-static QString cssPropertyName( const Identifier &p, bool& hadPixelPrefix )
+static TQString cssPropertyName( const Identifier &p, bool& hadPixelPrefix )
{
- QString prop = p.qstring();
+ TQString prop = p.qstring();
int i = prop.length();
while ( --i ) {
char c = prop[i].latin1();
@@ -98,7 +98,7 @@ DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration()
bool DOMCSSStyleDeclaration::hasProperty(ExecState *exec, const Identifier &p) const
{
bool hadPixelPrefix;
- QString cssprop = cssPropertyName(p, hadPixelPrefix);
+ TQString cssprop = cssPropertyName(p, hadPixelPrefix);
if (DOM::getPropertyID(cssprop.latin1(), cssprop.length()))
return true;
@@ -138,7 +138,7 @@ Value DOMCSSStyleDeclaration::tryGet(ExecState *exec, const Identifier &property
// positioned element. if it is not a positioned element, return 0
// from MSIE documentation ### IMPLEMENT THAT (Dirk)
bool asNumber;
- QString p = cssPropertyName(propertyName, asNumber);
+ TQString p = cssPropertyName(propertyName, asNumber);
#ifdef KJS_VERBOSE
kdDebug(6070) << "DOMCSSStyleDeclaration: converting to css property name: " << p << ( asNumber ? "px" : "" ) << endl;
@@ -172,8 +172,8 @@ void DOMCSSStyleDeclaration::tryPut(ExecState *exec, const Identifier &propertyN
}
else {
bool pxSuffix;
- QString prop = cssPropertyName(propertyName, pxSuffix);
- QString propvalue = value.toString(exec).qstring();
+ TQString prop = cssPropertyName(propertyName, pxSuffix);
+ TQString propvalue = value.toString(exec).qstring();
if (pxSuffix)
propvalue += "px";
@@ -360,7 +360,7 @@ Value DOMStyleSheetList::tryGet(ExecState *exec, const Identifier &p) const
DOM::NameNodeListImpl namedList( m_doc.documentElement().handle(), p.string() );
int len = namedList.length();
if ( len ) {
- QValueList<DOM::Node> styleSheets;
+ TQValueList<DOM::Node> styleSheets;
for ( int i = 0 ; i < len ; ++i ) {
DOM::HTMLStyleElement elem = DOM::Node(namedList.item(i));
if (!elem.isNull())
diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp
index 13a12ce5f..eeb126ebb 100644
--- a/khtml/ecma/kjs_debugwin.cpp
+++ b/khtml/ecma/kjs_debugwin.cpp
@@ -25,21 +25,21 @@
#include <assert.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qlistbox.h>
-#include <qmultilineedit.h>
-#include <qapplication.h>
-#include <qsplitter.h>
-#include <qcombobox.h>
-#include <qbitmap.h>
-#include <qwidgetlist.h>
-#include <qlabel.h>
-#include <qdatastream.h>
-#include <qcstring.h>
-#include <qpainter.h>
-#include <qscrollbar.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqlistbox.h>
+#include <tqmultilineedit.h>
+#include <tqapplication.h>
+#include <tqsplitter.h>
+#include <tqcombobox.h>
+#include <tqbitmap.h>
+#include <tqwidgetlist.h>
+#include <tqlabel.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
+#include <tqpainter.h>
+#include <tqscrollbar.h>
#include <klocale.h>
#include <kdebug.h>
@@ -75,11 +75,11 @@
using namespace KJS;
using namespace khtml;
-SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, QWidget *parent, const char *name)
- : QScrollView(parent,name), m_currentLine(-1), m_sourceFile(0), m_debugWin(debugWin),
+SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name)
+ : TQScrollView(parent,name), m_currentLine(-1), m_sourceFile(0), m_debugWin(debugWin),
m_font(KGlobalSettings::fixedFont())
{
- verticalScrollBar()->setLineStep(QFontMetrics(m_font).height());
+ verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height());
viewport()->setBackgroundMode(Qt::NoBackground);
m_breakpointIcon = KGlobal::iconLoader()->loadIcon("stop",KIcon::Small);
}
@@ -106,20 +106,20 @@ void SourceDisplay::setSource(SourceFile *sourceFile)
return;
}
- QString code = sourceFile->getCode();
- const QChar *chars = code.unicode();
+ TQString code = sourceFile->getCode();
+ const TQChar *chars = code.unicode();
uint len = code.length();
- QChar newLine('\n');
- QChar cr('\r');
- QChar tab('\t');
- QString tabstr(" ");
- QString line;
+ TQChar newLine('\n');
+ TQChar cr('\r');
+ TQChar tab('\t');
+ TQString tabstr(" ");
+ TQString line;
m_lines.clear();
int width = 0;
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
for (uint pos = 0; pos < len; pos++) {
- QChar c = chars[pos];
+ TQChar c = chars[pos];
if (c == cr) {
if (pos < len-1 && chars[pos+1] == newLine)
continue;
@@ -158,7 +158,7 @@ void SourceDisplay::setCurrentLine(int lineno, bool doCenter)
m_currentLine = lineno;
if (doCenter && m_currentLine >= 0) {
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
int height = metrics.height();
center(0,height*m_currentLine+height/2);
}
@@ -166,27 +166,27 @@ void SourceDisplay::setCurrentLine(int lineno, bool doCenter)
updateContents();
}
-void SourceDisplay::contentsMousePressEvent(QMouseEvent *e)
+void SourceDisplay::contentsMousePressEvent(TQMouseEvent *e)
{
- QScrollView::mouseDoubleClickEvent(e);
- QFontMetrics metrics(m_font);
+ TQScrollView::mouseDoubleClickEvent(e);
+ TQFontMetrics metrics(m_font);
int lineno = e->y()/metrics.height();
emit lineDoubleClicked(lineno+1); // line numbers start from 1
}
-void SourceDisplay::showEvent(QShowEvent *)
+void SourceDisplay::showEvent(TQShowEvent *)
{
setSource(m_sourceFile);
}
-void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
+void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph)
{
if (!m_sourceFile) {
p->fillRect(clipx,clipy,clipw,cliph,palette().active().base());
return;
}
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
int height = metrics.height();
int bottom = clipy + cliph;
@@ -204,7 +204,7 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
int linenoWidth = metrics.width("888888");
for (int lineno = firstLine; lineno <= lastLine; lineno++) {
- QString linenoStr = QString().sprintf("%d",lineno+1);
+ TQString linenoStr = TQString().sprintf("%d",lineno+1);
p->fillRect(0,height*lineno,linenoWidth,height,palette().active().mid());
@@ -212,8 +212,8 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
p->setPen(palette().active().text());
p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr);
- QColor bgColor;
- QColor textColor;
+ TQColor bgColor;
+ TQColor textColor;
if (lineno == m_currentLine) {
bgColor = palette().active().highlight();
@@ -246,16 +246,16 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
-QString SourceFile::getCode()
+TQString SourceFile::getCode()
{
if (interpreter) {
KHTMLPart *part = ::qt_cast<KHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
if (part && url == part->url().url() && KHTMLPageCache::self()->isValid(part->cacheId())) {
Decoder *decoder = part->createDecoder();
- QByteArray data;
- QDataStream stream(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data,IO_WriteOnly);
KHTMLPageCache::self()->saveData(part->cacheId(),&stream);
- QString str;
+ TQString str;
if (data.size() == 0)
str = "";
else
@@ -287,28 +287,28 @@ SourceFragment::~SourceFragment()
//-------------------------------------------------------------------------
-KJSErrorDialog::KJSErrorDialog(QWidget *parent, const QString& errorMessage, bool showDebug)
+KJSErrorDialog::KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, bool showDebug)
: KDialogBase(parent,0,true,i18n("JavaScript Error"),
showDebug ? KDialogBase::Ok|KDialogBase::User1 : KDialogBase::Ok,
KDialogBase::Ok,false,KGuiItem("&Debug","gear"))
{
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QLabel *iconLabel = new QLabel("",page);
+ TQLabel *iconLabel = new TQLabel("",page);
iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon("messagebox_critical",
KIcon::NoGroup,KIcon::SizeMedium,
KIcon::DefaultState,0,true));
- QWidget *contents = new QWidget(page);
- QLabel *label = new QLabel(errorMessage,contents);
- m_dontShowAgainCb = new QCheckBox(i18n("&Do not show this message again"),contents);
+ TQWidget *contents = new TQWidget(page);
+ TQLabel *label = new TQLabel(errorMessage,contents);
+ m_dontShowAgainCb = new TQCheckBox(i18n("&Do not show this message again"),contents);
- QVBoxLayout *vl = new QVBoxLayout(contents,0,spacingHint());
+ TQVBoxLayout *vl = new TQVBoxLayout(contents,0,spacingHint());
vl->addWidget(label);
vl->addWidget(m_dontShowAgainCb);
- QHBoxLayout *topLayout = new QHBoxLayout(page,0,spacingHint());
+ TQHBoxLayout *topLayout = new TQHBoxLayout(page,0,spacingHint());
topLayout->addWidget(iconLabel);
topLayout->addWidget(contents);
topLayout->addStretch(10);
@@ -327,11 +327,11 @@ void KJSErrorDialog::slotUser1()
}
//-------------------------------------------------------------------------
-EvalMultiLineEdit::EvalMultiLineEdit(QWidget *parent)
- : QMultiLineEdit(parent) {
+EvalMultiLineEdit::EvalMultiLineEdit(TQWidget *parent)
+ : TQMultiLineEdit(parent) {
}
-void EvalMultiLineEdit::keyPressEvent(QKeyEvent * e)
+void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e)
{
if (e->key() == Qt::Key_Return) {
if (hasSelectedText()) {
@@ -343,10 +343,10 @@ void EvalMultiLineEdit::keyPressEvent(QKeyEvent * e)
}
end();
}
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
}
//-------------------------------------------------------------------------
-KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
+KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
: KMainWindow(parent, name, WType_TopLevel), KInstance("kjs_debugger")
{
m_breakpoints = 0;
@@ -362,73 +362,73 @@ KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
m_steppingDepth = 0;
m_stopIcon = KGlobal::iconLoader()->loadIcon("stop",KIcon::Small);
- m_emptyIcon = QPixmap(m_stopIcon.width(),m_stopIcon.height());
- QBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true);
+ m_emptyIcon = TQPixmap(m_stopIcon.width(),m_stopIcon.height());
+ TQBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true);
m_emptyIcon.setMask(emptyMask);
setCaption(i18n("JavaScript Debugger"));
- QWidget *mainWidget = new QWidget(this);
+ TQWidget *mainWidget = new TQWidget(this);
setCentralWidget(mainWidget);
- QVBoxLayout *vl = new QVBoxLayout(mainWidget,5);
+ TQVBoxLayout *vl = new TQVBoxLayout(mainWidget,5);
// frame list & code
- QSplitter *hsplitter = new QSplitter(Qt::Vertical,mainWidget);
- QSplitter *vsplitter = new QSplitter(hsplitter);
- QFont font(KGlobalSettings::fixedFont());
+ TQSplitter *hsplitter = new TQSplitter(Qt::Vertical,mainWidget);
+ TQSplitter *vsplitter = new TQSplitter(hsplitter);
+ TQFont font(KGlobalSettings::fixedFont());
- QWidget *contextContainer = new QWidget(vsplitter);
+ TQWidget *contextContainer = new TQWidget(vsplitter);
- QLabel *contextLabel = new QLabel(i18n("Call stack"),contextContainer);
- QWidget *contextListContainer = new QWidget(contextContainer);
- m_contextList = new QListBox(contextListContainer);
+ TQLabel *contextLabel = new TQLabel(i18n("Call stack"),contextContainer);
+ TQWidget *contextListContainer = new TQWidget(contextContainer);
+ m_contextList = new TQListBox(contextListContainer);
m_contextList->setMinimumSize(100,200);
- connect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ connect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
- QHBoxLayout *clistLayout = new QHBoxLayout(contextListContainer);
+ TQHBoxLayout *clistLayout = new TQHBoxLayout(contextListContainer);
clistLayout->addWidget(m_contextList);
clistLayout->addSpacing(KDialog::spacingHint());
- QVBoxLayout *contextLayout = new QVBoxLayout(contextContainer);
+ TQVBoxLayout *contextLayout = new TQVBoxLayout(contextContainer);
contextLayout->addWidget(contextLabel);
contextLayout->addSpacing(KDialog::spacingHint());
contextLayout->addWidget(contextListContainer);
// source selection & display
- QWidget *sourceSelDisplay = new QWidget(vsplitter);
- QVBoxLayout *ssdvl = new QVBoxLayout(sourceSelDisplay);
+ TQWidget *sourceSelDisplay = new TQWidget(vsplitter);
+ TQVBoxLayout *ssdvl = new TQVBoxLayout(sourceSelDisplay);
- m_sourceSel = new QComboBox(toolBar());
- connect(m_sourceSel,SIGNAL(activated(int)),this,SLOT(slotSourceSelected(int)));
+ m_sourceSel = new TQComboBox(toolBar());
+ connect(m_sourceSel,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSourceSelected(int)));
m_sourceDisplay = new SourceDisplay(this,sourceSelDisplay);
ssdvl->addWidget(m_sourceDisplay);
- connect(m_sourceDisplay,SIGNAL(lineDoubleClicked(int)),SLOT(slotToggleBreakpoint(int)));
+ connect(m_sourceDisplay,TQT_SIGNAL(lineDoubleClicked(int)),TQT_SLOT(slotToggleBreakpoint(int)));
- QValueList<int> vsplitSizes;
+ TQValueList<int> vsplitSizes;
vsplitSizes.insert(vsplitSizes.end(),120);
vsplitSizes.insert(vsplitSizes.end(),480);
vsplitter->setSizes(vsplitSizes);
// evaluate
- QWidget *evalContainer = new QWidget(hsplitter);
+ TQWidget *evalContainer = new TQWidget(hsplitter);
- QLabel *evalLabel = new QLabel(i18n("JavaScript console"),evalContainer);
+ TQLabel *evalLabel = new TQLabel(i18n("JavaScript console"),evalContainer);
m_evalEdit = new EvalMultiLineEdit(evalContainer);
- m_evalEdit->setWordWrap(QMultiLineEdit::NoWrap);
+ m_evalEdit->setWordWrap(TQMultiLineEdit::NoWrap);
m_evalEdit->setFont(font);
- connect(m_evalEdit,SIGNAL(returnPressed()),SLOT(slotEval()));
+ connect(m_evalEdit,TQT_SIGNAL(returnPressed()),TQT_SLOT(slotEval()));
m_evalDepth = 0;
- QVBoxLayout *evalLayout = new QVBoxLayout(evalContainer);
+ TQVBoxLayout *evalLayout = new TQVBoxLayout(evalContainer);
evalLayout->addSpacing(KDialog::spacingHint());
evalLayout->addWidget(evalLabel);
evalLayout->addSpacing(KDialog::spacingHint());
evalLayout->addWidget(m_evalEdit);
- QValueList<int> hsplitSizes;
+ TQValueList<int> hsplitSizes;
hsplitSizes.insert(hsplitSizes.end(),400);
hsplitSizes.insert(hsplitSizes.end(),200);
hsplitter->setSizes(hsplitSizes);
@@ -445,18 +445,18 @@ KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
// Venkman use F12, KDevelop F10
KShortcut scNext = KShortcut(KKeySequence(KKey(Qt::Key_F12)));
scNext.append(KKeySequence(KKey(Qt::Key_F10)));
- m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,this,SLOT(slotNext()),
+ m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,this,TQT_SLOT(slotNext()),
m_actionCollection,"next");
- m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),this,SLOT(slotStep()),
+ m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),this,TQT_SLOT(slotStep()),
m_actionCollection,"step");
// Venkman use F5, Kdevelop F9
KShortcut scCont = KShortcut(KKeySequence(KKey(Qt::Key_F5)));
scCont.append(KKeySequence(KKey(Qt::Key_F9)));
- m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,this,SLOT(slotContinue()),
+ m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,this,TQT_SLOT(slotContinue()),
m_actionCollection,"cont");
- m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),this,SLOT(slotStop()),
+ m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),this,TQT_SLOT(slotStop()),
m_actionCollection,"stop");
- m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),this,SLOT(slotBreakNext()),
+ m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),this,TQT_SLOT(slotBreakNext()),
m_actionCollection,"breaknext");
@@ -553,7 +553,7 @@ void KJSDebugWin::slotToggleBreakpoint(int lineno)
// Find the source fragment containing the selected line (if any)
int sourceId = -1;
int highestBaseLine = -1;
- QMap<int,SourceFragment*>::Iterator it;
+ TQMap<int,SourceFragment*>::Iterator it;
for (it = m_sourceFragments.begin(); it != m_sourceFragments.end(); ++it) {
SourceFragment *sourceFragment = it.data();
@@ -627,7 +627,7 @@ void KJSDebugWin::slotEval()
// Evaluate the js code from m_evalEdit
UString code(m_evalEdit->code());
- QString msg;
+ TQString msg;
KJSCPUGuard guard;
guard.start();
@@ -657,49 +657,49 @@ void KJSDebugWin::slotEval()
updateContextList();
}
-void KJSDebugWin::closeEvent(QCloseEvent *e)
+void KJSDebugWin::closeEvent(TQCloseEvent *e)
{
while (!m_execStates.isEmpty()) // ### not sure if this will work
leaveSession();
- return QWidget::closeEvent(e);
+ return TQWidget::closeEvent(e);
}
-bool KJSDebugWin::eventFilter(QObject *o, QEvent *e)
+bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
{
switch (e->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::Destroy:
- case QEvent::Close:
- case QEvent::Quit:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::Destroy:
+ case TQEvent::Close:
+ case TQEvent::Quit:
while (o->parent())
o = o->parent();
if (o == this)
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
else
return true;
break;
default:
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
}
void KJSDebugWin::disableOtherWindows()
{
- QWidgetList *widgets = QApplication::allWidgets();
- QWidgetListIt it(*widgets);
+ TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->installEventFilter(this);
}
void KJSDebugWin::enableOtherWindows()
{
- QWidgetList *widgets = QApplication::allWidgets();
- QWidgetListIt it(*widgets);
+ TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->removeEventFilter(this);
}
@@ -717,12 +717,12 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
index = m_sourceSel->count();
if (!m_nextSourceUrl.isEmpty()) {
- QString code = source.qstring();
+ TQString code = source.qstring();
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
if (m_nextSourceUrl == part->url().url()) {
// Only store the code here if it's not from the part's html page... in that
// case we can get it from KHTMLPageCache
- code = QString::null;
+ code = TQString::null;
}
sourceFile = new SourceFile(m_nextSourceUrl,code,exec->interpreter());
@@ -735,7 +735,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
// but we still know the interpreter
sourceFile = new SourceFile("(unknown)",source.qstring(),exec->interpreter());
m_sourceSelFiles.append(sourceFile);
- m_sourceSel->insertItem(QString::number(index) += "-???");
+ m_sourceSel->insertItem(TQString::number(index) += "-???");
}
}
else {
@@ -809,9 +809,9 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (khtmlpart && !khtmlpart->settings()->isJavaScriptErrorReportingEnabled())
return true;
- QWidget *dlgParent = (m_evalDepth == 0) ? (QWidget*)part->widget() : (QWidget*)this;
+ TQWidget *dlgParent = (m_evalDepth == 0) ? (TQWidget*)part->widget() : (TQWidget*)this;
- QString exceptionMsg = value.toString(exec).qstring();
+ TQString exceptionMsg = value.toString(exec).qstring();
// Syntax errors are a special case. For these we want to display the url & lineno,
// which isn't included in the exception messeage. So we work it out from the values
@@ -834,7 +834,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
// An exception occurred and we're not currently executing any code... this can
// happen in some cases e.g. a parse error, or native code accessing funcitons like
// Object::put()
- QString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1")
+ TQString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1")
.arg(exceptionMsg);
KJSErrorDialog dlg(dlgParent,msg,false);
dlg.exec();
@@ -843,9 +843,9 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
else {
Context ctx = m_execs[m_execsCount-1]->context();
SourceFragment *sourceFragment = m_sourceFragments[ctx.sourceId()];
- QString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1 line %2:\n%3")
+ TQString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1 line %2:\n%3")
.arg(KStringHandler::rsqueeze( sourceFragment->sourceFile->url,80),
- QString::number( sourceFragment->baseLine+ctx.curStmtFirstLine()-1),
+ TQString::number( sourceFragment->baseLine+ctx.curStmtFirstLine()-1),
exceptionMsg);
KJSErrorDialog dlg(dlgParent,msg,true);
@@ -861,10 +861,10 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (dontShowAgain) {
KConfig *config = kapp->config();
- KConfigGroupSaver saver(config,QString::fromLatin1("Java/JavaScript Settings"));
- config->writeEntry("ReportJavaScriptErrors",QVariant(false,0));
+ KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings"));
+ config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0));
config->sync();
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
}
@@ -937,13 +937,13 @@ void KJSDebugWin::setSourceLine(int sourceId, int lineno)
m_sourceDisplay->setCurrentLine(source->baseLine+lineno-2);
}
-void KJSDebugWin::setNextSourceInfo(QString url, int baseLine)
+void KJSDebugWin::setNextSourceInfo(TQString url, int baseLine)
{
m_nextSourceUrl = url;
m_nextSourceBaseLine = baseLine;
}
-void KJSDebugWin::sourceChanged(Interpreter *interpreter, QString url)
+void KJSDebugWin::sourceChanged(Interpreter *interpreter, TQString url)
{
SourceFile *sourceFile = getSourceFile(interpreter,url);
if (sourceFile && m_curSourceFile == sourceFile)
@@ -952,31 +952,31 @@ void KJSDebugWin::sourceChanged(Interpreter *interpreter, QString url)
void KJSDebugWin::clearInterpreter(Interpreter *interpreter)
{
- QMap<int,SourceFragment*>::Iterator it;
+ TQMap<int,SourceFragment*>::Iterator it;
for (it = m_sourceFragments.begin(); it != m_sourceFragments.end(); ++it)
if (it.data() && it.data()->sourceFile->interpreter == interpreter)
it.data()->sourceFile->interpreter = 0;
}
-SourceFile *KJSDebugWin::getSourceFile(Interpreter *interpreter, QString url)
+SourceFile *KJSDebugWin::getSourceFile(Interpreter *interpreter, TQString url)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
return m_sourceFiles[key];
}
-void KJSDebugWin::setSourceFile(Interpreter *interpreter, QString url, SourceFile *sourceFile)
+void KJSDebugWin::setSourceFile(Interpreter *interpreter, TQString url, SourceFile *sourceFile)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
sourceFile->ref();
if (SourceFile* oldFile = m_sourceFiles[key])
oldFile->deref();
m_sourceFiles[key] = sourceFile;
}
-void KJSDebugWin::removeSourceFile(Interpreter *interpreter, QString url)
+void KJSDebugWin::removeSourceFile(Interpreter *interpreter, TQString url)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
if (SourceFile* oldFile = m_sourceFiles[key])
oldFile->deref();
m_sourceFiles.remove(key);
@@ -1048,7 +1048,7 @@ void KJSDebugWin::leaveSession()
void KJSDebugWin::updateContextList()
{
- disconnect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ disconnect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
m_contextList->clear();
for (int i = 0; i < m_execsCount; i++)
@@ -1060,28 +1060,28 @@ void KJSDebugWin::updateContextList()
setSourceLine(ctx.sourceId(),ctx.curStmtFirstLine());
}
- connect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ connect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
}
-QString KJSDebugWin::contextStr(const Context &ctx)
+TQString KJSDebugWin::contextStr(const Context &ctx)
{
- QString str = "";
+ TQString str = "";
SourceFragment *sourceFragment = m_sourceFragments[ctx.sourceId()];
- QString url = sourceFragment->sourceFile->url;
+ TQString url = sourceFragment->sourceFile->url;
int fileLineno = sourceFragment->baseLine+ctx.curStmtFirstLine()-1;
switch (ctx.codeType()) {
case GlobalCode:
- str = QString("Global code at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Global code at %1:%2").arg(url).arg(fileLineno);
break;
case EvalCode:
- str = QString("Eval code at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Eval code at %1:%2").arg(url).arg(fileLineno);
break;
case FunctionCode:
if (!ctx.functionName().isNull())
- str = QString("%1() at %2:%3").arg(ctx.functionName().qstring()).arg(url).arg(fileLineno);
+ str = TQString("%1() at %2:%3").arg(ctx.functionName().qstring()).arg(url).arg(fileLineno);
else
- str = QString("Anonymous function at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Anonymous function at %1:%2").arg(url).arg(fileLineno);
break;
}
diff --git a/khtml/ecma/kjs_debugwin.h b/khtml/ecma/kjs_debugwin.h
index 5a2ce2f1f..d48f8b040 100644
--- a/khtml/ecma/kjs_debugwin.h
+++ b/khtml/ecma/kjs_debugwin.h
@@ -21,21 +21,21 @@
#ifndef _KJS_DEBUGGER_H_
#define _KJS_DEBUGGER_H_
-#include <qglobal.h>
+#include <tqglobal.h>
#define KJS_DEBUGGER
#ifdef KJS_DEBUGGER
-#include <qwidget.h>
-#include <qmultilineedit.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqmultilineedit.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
#include <kmainwindow.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kjs/debugger.h>
@@ -55,11 +55,11 @@ namespace KJS {
class SourceFile : public DOM::DomShared
{
public:
- SourceFile(QString u, QString c, Interpreter *interp)
+ SourceFile(TQString u, TQString c, Interpreter *interp)
: url(u), code(c), interpreter(interp) {}
- QString getCode();
- QString url;
- QString code;
+ TQString getCode();
+ TQString url;
+ TQString code;
Interpreter *interpreter;
};
@@ -96,7 +96,7 @@ namespace KJS {
class KJSErrorDialog : public KDialogBase {
Q_OBJECT
public:
- KJSErrorDialog(QWidget *parent, const QString& errorMessage, bool showDebug);
+ KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, bool showDebug);
virtual ~KJSErrorDialog();
bool debugSelected() const { return m_debugSelected; }
@@ -106,25 +106,25 @@ namespace KJS {
virtual void slotUser1();
private:
- QCheckBox *m_dontShowAgainCb;
+ TQCheckBox *m_dontShowAgainCb;
bool m_debugSelected;
};
- class EvalMultiLineEdit : public QMultiLineEdit {
+ class EvalMultiLineEdit : public TQMultiLineEdit {
Q_OBJECT
public:
- EvalMultiLineEdit(QWidget *parent);
- const QString & code() const { return m_code; }
+ EvalMultiLineEdit(TQWidget *parent);
+ const TQString & code() const { return m_code; }
protected:
- void keyPressEvent(QKeyEvent * e);
+ void keyPressEvent(TQKeyEvent * e);
private:
- QString m_code;
+ TQString m_code;
};
- class SourceDisplay : public QScrollView {
+ class SourceDisplay : public TQScrollView {
Q_OBJECT
public:
- SourceDisplay(KJSDebugWin *debugWin, QWidget *parent, const char *name = 0);
+ SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name = 0);
~SourceDisplay();
void setSource(SourceFile *sourceFile);
@@ -134,18 +134,18 @@ namespace KJS {
void lineDoubleClicked(int lineno);
protected:
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void showEvent(QShowEvent *);
- virtual void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void showEvent(TQShowEvent *);
+ virtual void drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph);
- QString m_source;
+ TQString m_source;
int m_currentLine;
SourceFile *m_sourceFile;
- QStringList m_lines;
+ TQStringList m_lines;
KJSDebugWin *m_debugWin;
- QFont m_font;
- QPixmap m_breakpointIcon;
+ TQFont m_font;
+ TQPixmap m_breakpointIcon;
};
/**
@@ -162,7 +162,7 @@ namespace KJS {
Q_OBJECT
friend class SourceDisplay;
public:
- KJSDebugWin(QWidget *parent=0, const char *name=0);
+ KJSDebugWin(TQWidget *parent=0, const char *name=0);
virtual ~KJSDebugWin();
static KJSDebugWin *createInstance();
@@ -178,8 +178,8 @@ namespace KJS {
};
void setSourceLine(int sourceId, int lineno);
- void setNextSourceInfo(QString url, int baseLine);
- void sourceChanged(Interpreter *interpreter, QString url);
+ void setNextSourceInfo(TQString url, int baseLine);
+ void sourceChanged(Interpreter *interpreter, TQString url);
bool inSession() const { return !m_execStates.isEmpty(); }
void setMode(Mode m) { m_mode = m; }
void clearInterpreter(Interpreter *interpreter);
@@ -207,16 +207,16 @@ namespace KJS {
protected:
- void closeEvent(QCloseEvent *e);
- bool eventFilter(QObject *obj, QEvent *evt);
+ void closeEvent(TQCloseEvent *e);
+ bool eventFilter(TQObject *obj, TQEvent *evt);
void disableOtherWindows();
void enableOtherWindows();
private:
- SourceFile *getSourceFile(Interpreter *interpreter, QString url);
- void setSourceFile(Interpreter *interpreter, QString url, SourceFile *sourceFile);
- void removeSourceFile(Interpreter *interpreter, QString url);
+ SourceFile *getSourceFile(Interpreter *interpreter, TQString url);
+ void setSourceFile(Interpreter *interpreter, TQString url, SourceFile *sourceFile);
+ void removeSourceFile(Interpreter *interpreter, TQString url);
void checkBreak(ExecState *exec);
void enterSession(ExecState *exec);
@@ -224,7 +224,7 @@ namespace KJS {
void displaySourceFile(SourceFile *sourceFile, bool forceRefresh);
void updateContextList();
- QString contextStr(const Context &ctx);
+ TQString contextStr(const Context &ctx);
struct Breakpoint {
int sourceId;
@@ -247,23 +247,23 @@ namespace KJS {
SourceFile *m_curSourceFile;
Mode m_mode;
- QString m_nextSourceUrl;
+ TQString m_nextSourceUrl;
int m_nextSourceBaseLine;
- QPtrStack<ExecState> m_execStates;
+ TQPtrStack<ExecState> m_execStates;
ExecState **m_execs;
int m_execsCount;
int m_execsAlloc;
int m_steppingDepth;
- QMap<QString,SourceFile*> m_sourceFiles; /* maps url->SourceFile */
- QMap<int,SourceFragment*> m_sourceFragments; /* maps SourceId->SourceFragment */
- QPtrList<SourceFile> m_sourceSelFiles; /* maps combobox index->SourceFile */
+ TQMap<TQString,SourceFile*> m_sourceFiles; /* maps url->SourceFile */
+ TQMap<int,SourceFragment*> m_sourceFragments; /* maps SourceId->SourceFragment */
+ TQPtrList<SourceFile> m_sourceSelFiles; /* maps combobox index->SourceFile */
KActionCollection *m_actionCollection;
- QPixmap m_stopIcon;
- QPixmap m_emptyIcon;
+ TQPixmap m_stopIcon;
+ TQPixmap m_emptyIcon;
SourceDisplay *m_sourceDisplay;
- QListBox *m_contextList;
+ TQListBox *m_contextList;
KAction *m_stepAction;
KAction *m_nextAction;
@@ -271,7 +271,7 @@ namespace KJS {
KAction *m_stopAction;
KAction *m_breakAction;
- QComboBox *m_sourceSel;
+ TQComboBox *m_sourceSel;
EvalMultiLineEdit *m_evalEdit;
int m_evalDepth;
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index 74a90a9d2..c96e99939 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -485,7 +485,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
if (rend->style()->hidesOverflow())
rend->layer()->scrollToXOffset(value.toInt32(exec));
else if (rend->isRoot()) {
- QScrollView* sview = node.ownerDocument().view();
+ TQScrollView* sview = node.ownerDocument().view();
if (sview)
sview->setContentsPos(value.toInt32(exec), sview->contentsY());
}
@@ -496,7 +496,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
if (rend->style()->hidesOverflow())
rend->layer()->scrollToYOffset(value.toInt32(exec));
else if (rend->isRoot()) {
- QScrollView* sview = node.ownerDocument().view();
+ TQScrollView* sview = node.ownerDocument().view();
if (sview)
sview->setContentsPos(sview->contentsX(), value.toInt32(exec));
}
@@ -1091,7 +1091,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
KHTMLPart *khtmlpart = ::qt_cast<KHTMLPart *>(active->part());
if (khtmlpart) {
// Security: only allow documents to be loaded from the same host
- QString dstUrl = khtmlpart->htmlDocument().completeURL(s).string();
+ TQString dstUrl = khtmlpart->htmlDocument().completeURL(s).string();
KParts::ReadOnlyPart *part = static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part();
if (part->url().host() == KURL(dstUrl).host()) {
kdDebug(6070) << "JavaScript: access granted for document.load() of " << dstUrl << endl;
@@ -1702,7 +1702,7 @@ const ClassInfo KJS::DOMNamedNodesCollection::info = { "DOMNamedNodesCollection"
// Such a collection is usually very short-lived, it only exists
// for constructs like document.forms.<name>[1],
// so it shouldn't be a problem that it's storing all the nodes (with the same name). (David)
-DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *exec, const QValueList<DOM::Node>& nodes )
+DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *exec, const TQValueList<DOM::Node>& nodes )
: DOMObject(exec->interpreter()->builtinObjectPrototype()),
m_nodes(nodes)
{
diff --git a/khtml/ecma/kjs_dom.h b/khtml/ecma/kjs_dom.h
index e6b593fdb..b17488592 100644
--- a/khtml/ecma/kjs_dom.h
+++ b/khtml/ecma/kjs_dom.h
@@ -257,14 +257,14 @@ namespace KJS {
// when multiple nodes have the same name.
class DOMNamedNodesCollection : public DOMObject {
public:
- DOMNamedNodesCollection(ExecState *exec, const QValueList<DOM::Node>& nodes );
+ DOMNamedNodesCollection(ExecState *exec, const TQValueList<DOM::Node>& nodes );
virtual Value tryGet(ExecState *exec, const Identifier &propertyName) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- const QValueList<DOM::Node>& nodes() const { return m_nodes; }
+ const TQValueList<DOM::Node>& nodes() const { return m_nodes; }
enum { Length };
private:
- QValueList<DOM::Node> m_nodes;
+ TQValueList<DOM::Node> m_nodes;
};
class DOMCharacterData : public DOMNode {
diff --git a/khtml/ecma/kjs_events.cpp b/khtml/ecma/kjs_events.cpp
index 8ebda7193..1144e723b 100644
--- a/khtml/ecma/kjs_events.cpp
+++ b/khtml/ecma/kjs_events.cpp
@@ -102,8 +102,8 @@ void JSEventListener::handleEvent(DOM::Event &evt)
exec->clearException();
else if (html)
{
- QVariant ret = ValueToVariant(exec, retval);
- if (ret.type() == QVariant::Bool && ret.toBool() == false)
+ TQVariant ret = ValueToVariant(exec, retval);
+ if (ret.type() == TQVariant::Bool && ret.toBool() == false)
evt.preventDefault();
}
window->afterScriptExecution();
@@ -124,7 +124,7 @@ Object JSEventListener::listenerObj() const
return listener;
}
-JSLazyEventListener::JSLazyEventListener(const QString &_code, const QString &_name, const Object &_win, DOM::NodeImpl* _originalNode)
+JSLazyEventListener::JSLazyEventListener(const TQString &_code, const TQString &_name, const Object &_win, DOM::NodeImpl* _originalNode)
: JSEventListener(Object(), 0, _win, true),
code(_code), name(_name),
parsed(false)
@@ -211,7 +211,7 @@ void JSLazyEventListener::parseCode() const
}
// no more need to keep the unparsed code around
- code = QString();
+ code = TQString();
if (listener.isValid()) {
static_cast<Window*>(win.imp())->jsEventListeners.insert(listener.imp(),
diff --git a/khtml/ecma/kjs_events.h b/khtml/ecma/kjs_events.h
index 9fedfe594..e48276031 100644
--- a/khtml/ecma/kjs_events.h
+++ b/khtml/ecma/kjs_events.h
@@ -72,15 +72,15 @@ namespace KJS {
class JSLazyEventListener : public JSEventListener {
public:
- JSLazyEventListener(const QString &_code, const QString &_name, const Object &_win, DOM::NodeImpl* node);
+ JSLazyEventListener(const TQString &_code, const TQString &_name, const Object &_win, DOM::NodeImpl* node);
~JSLazyEventListener();
virtual void handleEvent(DOM::Event &evt);
Object listenerObj() const;
private:
void parseCode() const;
- mutable QString code;
- mutable QString name;
+ mutable TQString code;
+ mutable TQString name;
mutable bool parsed;
DOM::NodeImpl *originalNode;
};
diff --git a/khtml/ecma/kjs_html.cpp b/khtml/ecma/kjs_html.cpp
index 94f89079f..57762ffd3 100644
--- a/khtml/ecma/kjs_html.cpp
+++ b/khtml/ecma/kjs_html.cpp
@@ -1167,7 +1167,7 @@ Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName)
case ID_OBJECT:
case ID_EMBED: {
KParts::LiveConnectExtension *lc = getLiveConnectExtension(element);
- QString rvalue;
+ TQString rvalue;
KParts::LiveConnectExtension::Type rtype;
unsigned long robjid;
if (lc && lc->get(0, propertyName.qstring(), rtype, robjid, rvalue))
@@ -1586,13 +1586,13 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if (url.port()==0)
return String(url.host());
else
- return String(url.host() + ":" + QString::number(url.port()));
+ return String(url.host() + ":" + TQString::number(url.port()));
}
case AnchorPathName: return String(KURL(anchor.href().string()).path());
- case AnchorPort: return String(QString::number(KURL(anchor.href().string()).port()));
+ case AnchorPort: return String(TQString::number(KURL(anchor.href().string()).port()));
case AnchorProtocol: return String(KURL(anchor.href().string()).protocol()+":");
case AnchorSearch: { KURL u(anchor.href().string());
- QString q = u.query();
+ TQString q = u.query();
if (q.length() == 1)
return String();
return String(q); }
@@ -1713,7 +1713,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if ( !href.isNull() ) {
url = doc.completeURL( href ).string();
if ( href.isEmpty() )
- url.setFileName( QString::null ); // href="" clears the filename (in IE)
+ url.setFileName( TQString::null ); // href="" clears the filename (in IE)
}
switch(token) {
case AreaHref:
@@ -1724,12 +1724,12 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if (url.port()==0)
return String(url.host());
else
- return String(url.host() + ":" + QString::number(url.port()));
+ return String(url.host() + ":" + TQString::number(url.port()));
}
case AreaPathName: {
return String(url.path());
}
- case AreaPort: return String(QString::number(url.port()));
+ case AreaPort: return String(TQString::number(url.port()));
case AreaProtocol: return String(url.isEmpty() ? "" : url.protocol()+":");
case AreaSearch: return String(url.query());
}
@@ -2002,13 +2002,13 @@ UString KJS::HTMLElement::toString(ExecState *exec) const
return UString(static_cast<const DOM::HTMLAnchorElement&>(node).href());
else if (node.elementId() == ID_APPLET) {
KParts::LiveConnectExtension *lc = getLiveConnectExtension(node);
- QStringList qargs;
- QString retvalue;
+ TQStringList qargs;
+ TQString retvalue;
KParts::LiveConnectExtension::Type rettype;
unsigned long retobjid;
if (lc && lc->call(0, "hashCode", qargs, rettype, retobjid, retvalue)) {
- QString str("[object APPLET ref=");
- return UString(str + retvalue + QString("]"));
+ TQString str("[object APPLET ref=");
+ return UString(str + retvalue + TQString("]"));
}
} else if (node.elementId() == ID_IMG) {
DOM::HTMLImageElement image(node);
@@ -2134,12 +2134,12 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
block = true;
// if this is a form without a target, or a special target, don't block
- QString trg = form.target().lower().string();
+ TQString trg = form.target().lower().string();
if( trg.isEmpty() || trg == "_top" || trg == "_self" ||
trg == "_parent")
block = false;
- QString caption;
+ TQString caption;
// if there is a frame with the target name, don't block
if ( view && view->part() ) {
@@ -2831,7 +2831,7 @@ void KJS::HTMLElement::putValueProperty(ExecState *exec, int token, const Value&
case AnchorHref: { anchor.setHref(str); return; }
case AnchorHrefLang: { anchor.setHreflang(str); return; }
case AnchorSearch: { KURL href(anchor.href().string());
- QString q = str.isEmpty() ? QString() : str.string();
+ TQString q = str.isEmpty() ? TQString() : str.string();
href.setQuery(q);
anchor.setHref(href.url()); return; }
case AnchorName: { anchor.setName(str); return; }
@@ -3607,7 +3607,7 @@ Value KJS::HTMLCollection::getNamedItems(ExecState *exec, const Identifier &prop
DOM::DOMString pstr = propertyName.string();
- QValueList<DOM::NodeImpl*> matches = collection.handle()->namedItems(pstr);
+ TQValueList<DOM::NodeImpl*> matches = collection.handle()->namedItems(pstr);
if (!matches.isEmpty()) {
if (matches.size() == 1) {
@@ -3619,8 +3619,8 @@ Value KJS::HTMLCollection::getNamedItems(ExecState *exec, const Identifier &prop
}
else {
// multiple items, return a collection
- QValueList<DOM::Node> nodes;
- for (QValueList<DOM::NodeImpl*>::const_iterator i = matches.begin();
+ TQValueList<DOM::Node> nodes;
+ for (TQValueList<DOM::NodeImpl*>::const_iterator i = matches.begin();
i != matches.end(); ++i)
nodes.append(DOM::Node(*i));
#ifdef KJS_VERBOSE
@@ -3824,7 +3824,7 @@ Value KJS::HTMLSelectCollectionProtoFunc::tryCall(ExecState *exec, Object &thisO
} else {
//Find what to prepend before..
DOM::HTMLSelectElementImpl* impl = static_cast<HTMLSelectElementImpl*>(element.handle());
- QMemArray<HTMLGenericFormElementImpl*> items = impl->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = impl->listItems();
int dummy;
impl->insertBefore(option.handle(), items.at(pos), dummy);
}
diff --git a/khtml/ecma/kjs_mozilla.cpp b/khtml/ecma/kjs_mozilla.cpp
index 4b1520b9a..1a5555c42 100644
--- a/khtml/ecma/kjs_mozilla.cpp
+++ b/khtml/ecma/kjs_mozilla.cpp
@@ -73,9 +73,9 @@ Value MozillaSidebarExtensionFunc::tryCall(ExecState *exec, Object &thisObj, con
// addPanel() id == 0
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QString url, name;
+ TQString url, name;
if (args.size() == 1) { // I've seen this, don't know if it's legal.
- name = QString::null;
+ name = TQString::null;
url = args[0].toString(exec).qstring();
} else if (args.size() == 2 || args.size() == 3) {
name = args[0].toString(exec).qstring();
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index d962cac36..a5c793357 100644
--- a/khtml/ecma/kjs_navigator.cpp
+++ b/khtml/ecma/kjs_navigator.cpp
@@ -53,21 +53,21 @@ namespace KJS {
struct PluginInfo;
struct MimeClassInfo {
- QString type;
- QString desc;
- QString suffixes;
+ TQString type;
+ TQString desc;
+ TQString suffixes;
PluginInfo *plugin;
};
struct PluginInfo {
- QString name;
- QString file;
- QString desc;
- QPtrList<MimeClassInfo> mimes;
+ TQString name;
+ TQString file;
+ TQString desc;
+ TQPtrList<MimeClassInfo> mimes;
};
- static QPtrList<PluginInfo> *plugins;
- static QPtrList<MimeClassInfo> *mimes;
+ static TQPtrList<PluginInfo> *plugins;
+ static TQPtrList<MimeClassInfo> *mimes;
private:
static int m_refCount;
@@ -83,7 +83,7 @@ namespace KJS {
Value getValueProperty(ExecState *exec, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- Value pluginByName( ExecState* exec, const QString& name ) const;
+ Value pluginByName( ExecState* exec, const TQString& name ) const;
bool pluginsEnabled() const { return m_pluginsEnabled; };
private:
bool m_pluginsEnabled;
@@ -99,7 +99,7 @@ namespace KJS {
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
Value getValueProperty(ExecState *exec, int token) const;
- Value mimeTypeByName( ExecState* exec, const QString& name ) const;
+ Value mimeTypeByName( ExecState* exec, const TQString& name ) const;
bool pluginsEnabled() const { return m_pluginsEnabled; };
private:
bool m_pluginsEnabled;
@@ -114,7 +114,7 @@ namespace KJS {
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- Value mimeByName(ExecState* exec, const QString& name ) const;
+ Value mimeByName(ExecState* exec, const TQString& name ) const;
Value getValueProperty(ExecState *exec, int token) const;
PluginBase::PluginInfo *pluginInfo() const { return m_info; }
private:
@@ -138,8 +138,8 @@ namespace KJS {
}
-QPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = 0;
-QPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = 0;
+TQPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = 0;
+TQPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = 0;
int KJS::PluginBase::m_refCount = 0;
const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
@@ -179,7 +179,7 @@ Value Navigator::get(ExecState *exec, const Identifier &propertyName) const
Value Navigator::getValueProperty(ExecState *exec, int token) const
{
KURL url = m_part->url();
- QString userAgent = url.host();
+ TQString userAgent = url.host();
if (userAgent.isEmpty())
userAgent = "localhost";
userAgent = KProtocolManager::userAgentForHost(userAgent);
@@ -188,14 +188,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String("Mozilla");
case AppName:
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.find(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("compatible")) == -1)
+ if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("compatible")) == -1)
{
//kdDebug() << "appName -> Mozilla" << endl;
return String("Netscape");
}
- if (userAgent.find(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
//kdDebug() << "appName -> IE" << endl;
return String("Microsoft Internet Explorer");
@@ -207,14 +207,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String(userAgent.mid(userAgent.find('/') + 1));
case Product:
// We are pretending to be Mozilla or Safari
- if (userAgent.find(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("compatible")) == -1)
+ if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("compatible")) == -1)
{
return String("Gecko");
}
// When spoofing as IE, we use Undefined().
- if (userAgent.find(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
return Undefined();
}
@@ -223,8 +223,8 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
case ProductSub:
{
int ix = userAgent.find("Gecko");
- if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == QChar('/') &&
- userAgent.find(QRegExp("\\d{8}"), ix+6) == ix+6)
+ if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == TQChar('/') &&
+ userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6)
{
// We have Gecko/<productSub> in the UA string
return String(userAgent.mid(ix+6, 8));
@@ -245,19 +245,19 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String(userAgent);
case Platform:
// yet another evil hack, but necessary to spoof some sites...
- if ( (userAgent.find(QString::fromLatin1("Win"),0,false)>=0) )
- return String(QString::fromLatin1("Win32"));
- else if ( (userAgent.find(QString::fromLatin1("Macintosh"),0,false)>=0) ||
- (userAgent.find(QString::fromLatin1("Mac_PowerPC"),0,false)>=0) )
- return String(QString::fromLatin1("MacPPC"));
+ if ( (userAgent.find(TQString::fromLatin1("Win"),0,false)>=0) )
+ return String(TQString::fromLatin1("Win32"));
+ else if ( (userAgent.find(TQString::fromLatin1("Macintosh"),0,false)>=0) ||
+ (userAgent.find(TQString::fromLatin1("Mac_PowerPC"),0,false)>=0) )
+ return String(TQString::fromLatin1("MacPPC"));
else
{
struct utsname name;
int ret = uname(&name);
if ( ret >= 0 )
- return String(QString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
+ return String(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
else // can't happen
- return String(QString::fromLatin1("Unix X11"));
+ return String(TQString::fromLatin1("Unix X11"));
}
case CpuClass:
{
@@ -286,8 +286,8 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
: ObjectImp(exec->interpreter()->builtinObjectPrototype() )
{
if ( loadPluginInfo && !plugins ) {
- plugins = new QPtrList<PluginInfo>;
- mimes = new QPtrList<MimeClassInfo>;
+ plugins = new TQPtrList<PluginInfo>;
+ mimes = new TQPtrList<MimeClassInfo>;
plugins->setAutoDelete( true );
mimes->setAutoDelete( true );
@@ -296,11 +296,11 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
KTrader::OfferList::iterator it;
for ( it = offers.begin(); it != offers.end(); ++it ) {
- QVariant pluginsinfo = (**it).property( "X-KDE-BrowserView-PluginsInfo" );
+ TQVariant pluginsinfo = (**it).property( "X-KDE-BrowserView-PluginsInfo" );
if ( !pluginsinfo.isValid() ) {
// <backwards compatible>
- if ((**it).library() == QString("libnsplugin"))
- pluginsinfo = QVariant("nsplugins/pluginsinfo");
+ if ((**it).library() == TQString("libnsplugin"))
+ pluginsinfo = TQVariant("nsplugins/pluginsinfo");
else
// </backwards compatible>
continue;
@@ -309,7 +309,7 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
KConfig kc( locate ("data", pluginsinfo.toString()) );
unsigned num = (unsigned int) kc.readNumEntry("number");
for ( unsigned n = 0; n < num; n++ ) {
- kc.setGroup( QString::number(n) );
+ kc.setGroup( TQString::number(n) );
PluginInfo *plugin = new PluginInfo;
plugin->name = kc.readEntry("name");
@@ -319,17 +319,17 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
plugins->append( plugin );
// get mime types from string
- QStringList types = QStringList::split( ';', kc.readEntry("mime") );
- QStringList::Iterator type;
+ TQStringList types = TQStringList::split( ';', kc.readEntry("mime") );
+ TQStringList::Iterator type;
for ( type=types.begin(); type!=types.end(); ++type ) {
// get mime information
- QStringList tokens = QStringList::split(':', *type, true);
+ TQStringList tokens = TQStringList::split(':', *type, true);
if ( tokens.count() < 3 ) // we need 3 items
continue;
MimeClassInfo *mime = new MimeClassInfo;
- QStringList::Iterator token = tokens.begin();
+ TQStringList::Iterator token = tokens.begin();
mime->type = (*token).lower();
//kdDebug(6070) << "mime->type=" << mime->type << endl;
++token;
@@ -405,7 +405,7 @@ Value Plugins::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<PluginsFunc,Plugins,ObjectImp>(exec,propertyName,&PluginsTable,this);
}
-Value Plugins::pluginByName( ExecState* exec, const QString& name ) const
+Value Plugins::pluginByName( ExecState* exec, const TQString& name ) const
{
Q_ASSERT(plugins);
for ( PluginInfo *pl = plugins->first(); pl!=0; pl = plugins->next() ) {
@@ -490,7 +490,7 @@ Value MimeTypes::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<MimeTypesFunc,MimeTypes,ObjectImp>(exec,propertyName,&MimeTypesTable,this);
}
-Value MimeTypes::mimeTypeByName( ExecState* exec, const QString& name ) const
+Value MimeTypes::mimeTypeByName( ExecState* exec, const TQString& name ) const
{
//kdDebug(6070) << "MimeTypes[" << name << "]" << endl;
Q_ASSERT(mimes);
@@ -574,7 +574,7 @@ Value Plugin::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<PluginFunc,Plugin,ObjectImp>(exec, propertyName, &PluginTable, this );
}
-Value Plugin::mimeByName(ExecState* exec, const QString& name) const
+Value Plugin::mimeByName(ExecState* exec, const TQString& name) const
{
for ( PluginBase::MimeClassInfo *m = m_info->mimes.first();
m != 0; m = m_info->mimes.next() ) {
diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp
index 789f99f38..ca26c5a0b 100644
--- a/khtml/ecma/kjs_proxy.cpp
+++ b/khtml/ecma/kjs_proxy.cpp
@@ -60,10 +60,10 @@ class KJSProxyImpl : public KJSProxy {
public:
KJSProxyImpl(khtml::ChildFrame *frame);
virtual ~KJSProxyImpl();
- virtual QVariant evaluate(QString filename, int baseLine, const QString &, const DOM::Node &n,
+ virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
Completion *completion = 0);
virtual void clear();
- virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl *node);
+ virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl *node);
virtual void finishedWithEvent(const DOM::Event &event);
virtual KJS::Interpreter *interpreter();
@@ -128,8 +128,8 @@ KJSProxyImpl::~KJSProxyImpl()
#endif
}
-QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
- const QString&str, const DOM::Node &n, Completion *completion) {
+TQVariant KJSProxyImpl::evaluate(TQString filename, int baseLine,
+ const TQString&str, const DOM::Node &n, Completion *completion) {
// evaluate code. Returns the JS return value or an invalid QVariant
// if there was none, an error occurred or the type couldn't be converted.
@@ -170,7 +170,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
*completion = comp;
#ifdef KJS_DEBUGGER
- // KJSDebugWin::debugWindow()->setCode(QString::null);
+ // KJSDebugWin::debugWindow()->setCode(TQString::null);
#endif
window->afterScriptExecution();
@@ -185,7 +185,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
UString msg = comp.value().toString(m_script->globalExec());
kdDebug(6070) << "WARNING: Script threw exception: " << msg.qstring() << endl;
}
- return QVariant();
+ return TQVariant();
}
}
@@ -237,7 +237,7 @@ void KJSProxyImpl::clear() {
}
}
-DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl *node)
+DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl *node)
{
initScript();
@@ -341,10 +341,10 @@ void KJSProxyImpl::initScript()
void KJSProxyImpl::applyUserAgent()
{
assert( m_script );
- QString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host();
- QString userAgent = KProtocolManager::userAgentForHost(host);
- if (userAgent.find(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("MSIE")) >= 0)
+ TQString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host();
+ TQString userAgent = KProtocolManager::userAgentForHost(host);
+ if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
m_script->setCompatMode(Interpreter::IECompat);
#ifdef KJS_VERBOSE
@@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent()
}
else
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.find(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("compatible")) == -1 &&
- userAgent.find(QString::fromLatin1("KHTML")) == -1)
+ if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("compatible")) == -1 &&
+ userAgent.find(TQString::fromLatin1("KHTML")) == -1)
{
m_script->setCompatMode(Interpreter::NetscapeCompat);
#ifdef KJS_VERBOSE
diff --git a/khtml/ecma/kjs_proxy.h b/khtml/ecma/kjs_proxy.h
index f76543451..dde30b070 100644
--- a/khtml/ecma/kjs_proxy.h
+++ b/khtml/ecma/kjs_proxy.h
@@ -22,8 +22,8 @@
#ifndef _KJS_PROXY_H_
#define _KJS_PROXY_H_
-#include <qvariant.h>
-#include <qstring.h>
+#include <tqvariant.h>
+#include <tqstring.h>
#include <sys/time.h>
class KHTMLPart;
@@ -55,10 +55,10 @@ class KJSProxy {
public:
KJSProxy() { m_handlerLineno = 0; }
virtual ~KJSProxy() { }
- virtual QVariant evaluate(QString filename, int baseLine, const QString &, const DOM::Node &n,
+ virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
KJS::Completion *completion = 0) = 0;
virtual void clear() = 0;
- virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl* node) = 0;
+ virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl* node) = 0;
virtual void finishedWithEvent(const DOM::Event &event) = 0;
virtual KJS::Interpreter *interpreter() = 0;
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index bc5a85e19..90123aec6 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -31,10 +31,10 @@
#include "html/html_documentimpl.h"
#include "rendering/render_frames.h"
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qpaintdevicemetrics.h>
-#include <qapplication.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
@@ -52,8 +52,8 @@
#endif
#include <kglobalsettings.h>
#include <assert.h>
-#include <qstyle.h>
-#include <qobjectlist.h>
+#include <tqstyle.h>
+#include <tqobjectlist.h>
#include <kstringhandler.h>
#include "kjs_proxy.h"
@@ -85,7 +85,7 @@ namespace KJS {
static const ClassInfo info;
enum { Back, Forward, Go, Length };
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
class External : public ObjectImp {
@@ -98,7 +98,7 @@ namespace KJS {
static const ClassInfo info;
enum { AddFavorite };
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
class FrameArray : public ObjectImp {
@@ -109,7 +109,7 @@ namespace KJS {
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
virtual bool implementsCall() const { return true; }
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
#ifdef Q_WS_QWS
@@ -121,7 +121,7 @@ namespace KJS {
private:
const Konqueror* konqueror;
- QCString m_name;
+ TQCString m_name;
};
#endif
} // namespace KJS
@@ -164,8 +164,8 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
KWinModule info(0, KWinModule::INFO_DESKTOP);
#endif
- QWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
- QRect sg = KGlobalSettings::desktopGeometry(thisWidget);
+ TQWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
+ TQRect sg = KGlobalSettings::desktopGeometry(thisWidget);
switch( token ) {
case Height:
@@ -174,12 +174,12 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
return Number(sg.width());
case ColorDepth:
case PixelDepth: {
- QPaintDeviceMetrics m(QApplication::desktop());
+ TQPaintDeviceMetrics m(TQApplication::desktop());
return Number(m.depth());
}
case AvailLeft: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.x()-sg.x());
#else
return Number(10);
@@ -187,7 +187,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailTop: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.y()-sg.y());
#else
return Number(10);
@@ -195,7 +195,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailHeight: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.height());
#else
return Number(100);
@@ -203,7 +203,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailWidth: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.width());
#else
return Number(100);
@@ -520,14 +520,14 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
if (!part)
return false;
- QString q = p.qstring();
+ TQString q = p.qstring();
if (part->findFramePart(p.qstring()))
return true;
// allow window[1] or parent[1] etc. (#56983)
bool ok;
unsigned int i = p.toArrayIndex(&ok);
if (ok) {
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (i < len)
return true;
@@ -639,7 +639,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
}
} else if (!part) {
// not a KHTMLPart
- QString rvalue;
+ TQString rvalue;
KParts::LiveConnectExtension::Type rtype;
unsigned long robjid;
if (m_frame->m_liveconnect &&
@@ -882,15 +882,15 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case ScreenX: {
if (!part->view())
return Undefined();
- QRect sg = KGlobalSettings::desktopGeometry(part->view());
- return Number(part->view()->mapToGlobal(QPoint(0,0)).x() + sg.x());
+ TQRect sg = KGlobalSettings::desktopGeometry(part->view());
+ return Number(part->view()->mapToGlobal(TQPoint(0,0)).x() + sg.x());
}
case ScreenTop:
case ScreenY: {
if (!part->view())
return Undefined();
- QRect sg = KGlobalSettings::desktopGeometry(part->view());
- return Number(part->view()->mapToGlobal(QPoint(0,0)).y() + sg.y());
+ TQRect sg = KGlobalSettings::desktopGeometry(part->view());
+ return Number(part->view()->mapToGlobal(TQPoint(0,0)).y() + sg.y());
}
case ScrollX: {
if (!part->view())
@@ -1010,7 +1010,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
bool ok;
unsigned int i = p.toArrayIndex(&ok);
if (ok) {
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (i < len) {
KParts::ReadOnlyPart* frame = frames.at(i);
@@ -1232,7 +1232,7 @@ void Window::scheduleClose()
{
kdDebug(6070) << "Window::scheduleClose window.close() " << m_frame << endl;
Q_ASSERT(winq);
- QTimer::singleShot( 0, winq, SLOT( timeoutClose() ) );
+ TQTimer::singleShot( 0, winq, TQT_SLOT( timeoutClose() ) );
}
void Window::closeNow()
@@ -1256,9 +1256,9 @@ void Window::closeNow()
void Window::afterScriptExecution()
{
DOM::DocumentImpl::updateDocumentsRendering();
- QValueList<DelayedAction> delayedActions = m_delayed;
+ TQValueList<DelayedAction> delayedActions = m_delayed;
m_delayed.clear();
- QValueList<DelayedAction>::Iterator it = delayedActions.begin();
+ TQValueList<DelayedAction>::Iterator it = delayedActions.begin();
for ( ; it != delayedActions.end() ; ++it )
{
switch ((*it).actionId) {
@@ -1393,7 +1393,7 @@ JSEventListener *Window::getJSEventListener(const Value& val, bool html)
return new JSEventListener(listenerObject, listenerObjectImp, Object(this), html);
}
-JSLazyEventListener *Window::getJSLazyEventListener(const QString& code, const QString& name, DOM::NodeImpl *node)
+JSLazyEventListener *Window::getJSLazyEventListener(const TQString& code, const TQString& name, DOM::NodeImpl *node)
{
return new JSLazyEventListener(code, name, Object(this), node);
}
@@ -1406,7 +1406,7 @@ void Window::clear( ExecState *exec )
deleteAllProperties( exec );
// Break the dependency between the listeners and their object
- QPtrDictIterator<JSEventListener> it(jsEventListeners);
+ TQPtrDictIterator<JSEventListener> it(jsEventListeners);
for (; it.current(); ++it)
it.current()->clear();
// Forget about the listeners (the DOM::NodeImpls will delete them)
@@ -1430,23 +1430,23 @@ void Window::setCurrentEvent( DOM::Event *evt )
//kdDebug(6070) << "Window " << this << " (part=" << m_part << ")::setCurrentEvent m_evt=" << evt << endl;
}
-void Window::goURL(ExecState* exec, const QString& url, bool lockHistory)
+void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
{
Window* active = Window::retrieveActive(exec);
KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
KHTMLPart *active_part = ::qt_cast<KHTMLPart *>(active->part());
// Complete the URL using the "active part" (running interpreter)
if (active_part && part) {
- if (url[0] == QChar('#')) {
+ if (url[0] == TQChar('#')) {
part->gotoAnchor(url.mid(1));
} else {
- QString dstUrl = active_part->htmlDocument().completeURL(url).string();
+ TQString dstUrl = active_part->htmlDocument().completeURL(url).string();
kdDebug(6070) << "Window::goURL dstUrl=" << dstUrl << endl;
// check if we're allowed to inject javascript
// SYNC check with khtml_part.cpp::slotRedirect!
if ( isSafeScript(exec) ||
- dstUrl.find(QString::fromLatin1("javascript:"), 0, false) != 0 )
+ dstUrl.find(TQString::fromLatin1("javascript:"), 0, false) != 0 )
part->scheduleRedirection(-1,
dstUrl,
lockHistory);
@@ -1486,7 +1486,7 @@ void Window::goHistory( int steps )
//emit ext->goHistory(steps);
}
-void KJS::Window::resizeTo(QWidget* tl, int width, int height)
+void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
{
KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
if(!part)
@@ -1504,7 +1504,7 @@ void KJS::Window::resizeTo(QWidget* tl, int width, int height)
return;
}
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
if ( width > sg.width() || height > sg.height() ) {
kdDebug(6070) << "Window::resizeTo refused, window would be too big ("<<width<<","<<height<<")" << endl;
@@ -1536,7 +1536,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
return Undefined();
KHTMLView *widget = part->view();
Value v = args[0];
- QString str;
+ TQString str;
if (v.isValid() && !v.isA(UndefinedType))
str = v.toString(exec).qstring();
@@ -1556,7 +1556,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
part->settings()->windowOpenPolicy(part->url().host());
if ( policy == KHTMLSettings::KJSWindowOpenAsk ) {
emit part->browserExtension()->requestFocus(part);
- QString caption;
+ TQString caption;
if (!part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += i18n( "Confirmation: JavaScript Popup" );
@@ -1576,10 +1576,10 @@ Value Window::openWindow(ExecState *exec, const List& args)
policy = KHTMLSettings::KJSWindowOpenAllow;
}
- QString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : QString("_blank");
+ TQString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : TQString("_blank");
v = args[2];
- QString features;
+ TQString features;
if (!v.isNull() && v.type() != UndefinedType && v.toString(exec).size() > 0) {
features = v.toString(exec).qstring();
// Buggy scripts have ' at beginning and end, cut those
@@ -1600,7 +1600,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
}
}
-Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString& frameName, const QString& features)
+Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features)
{
KHTMLPart *p = ::qt_cast<KHTMLPart *>(m_frame->m_part);
KHTMLView *widget = p->view();
@@ -1613,16 +1613,16 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString&
winargs.toolBarsVisible = false;
winargs.statusBarVisible = false;
winargs.scrollBarsVisible = false;
- QStringList flist = QStringList::split(',', features);
- QStringList::ConstIterator it = flist.begin();
+ TQStringList flist = TQStringList::split(',', features);
+ TQStringList::ConstIterator it = flist.begin();
while (it != flist.end()) {
- QString s = *it++;
- QString key, val;
+ TQString s = *it++;
+ TQString key, val;
int pos = s.find('=');
if (pos >= 0) {
key = s.left(pos).stripWhiteSpace().lower();
val = s.mid(pos + 1).stripWhiteSpace().lower();
- QRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
+ TQRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
if (key == "left" || key == "screenx") {
winargs.x = (int)val.toFloat() + screen.x();
@@ -1633,13 +1633,13 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString&
if (winargs.y < screen.y() || winargs.y > screen.bottom())
winargs.y = screen.y(); // only safe choice until size is determined
} else if (key == "height") {
- winargs.height = (int)val.toFloat() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.height = (int)val.toFloat() + 2*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.height > screen.height()) // should actually check workspace
winargs.height = screen.height();
if (winargs.height < 100)
winargs.height = 100;
} else if (key == "width") {
- winargs.width = (int)val.toFloat() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.width = (int)val.toFloat() + 2*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width();
if (winargs.width < 100)
@@ -1718,9 +1718,9 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString&
khtmlpart->docImpl()->setBaseURL( p->docImpl()->baseURL() );
}
}
- uargs.serviceType = QString::null;
+ uargs.serviceType = TQString::null;
if (uargs.frameName.lower() == "_blank")
- uargs.frameName = QString::null;
+ uargs.frameName = TQString::null;
if (!url.isEmpty())
emit khtmlpart->browserExtension()->openURLRequest(url,uargs);
return Window::retrieve(khtmlpart); // global object
@@ -1739,9 +1739,9 @@ void Window::showSuppressedWindows()
KJS::Interpreter *interpreter = part->jScript()->interpreter();
ExecState *exec = interpreter->globalExec();
- QValueList<SuppressedWindowInfo> suppressedWindowInfo = m_suppressedWindowInfo;
+ TQValueList<SuppressedWindowInfo> suppressedWindowInfo = m_suppressedWindowInfo;
m_suppressedWindowInfo.clear();
- QValueList<SuppressedWindowInfo>::Iterator it = suppressedWindowInfo.begin();
+ TQValueList<SuppressedWindowInfo>::Iterator it = suppressedWindowInfo.begin();
for ( ; it != suppressedWindowInfo.end() ; ++it ) {
executeOpenWindow(exec, (*it).url, (*it).frameName, (*it).features);
}
@@ -1758,7 +1758,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
}
Window *window = static_cast<Window *>(thisObj.imp());
- QString str, str2;
+ TQString str, str2;
KHTMLPart *part = ::qt_cast<KHTMLPart *>(window->m_frame->m_part);
if (!part)
@@ -1772,7 +1772,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
str = s.qstring();
}
- QString caption;
+ TQString caption;
if (part && !part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += "JavaScript"; // TODO: i18n
@@ -1785,7 +1785,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
part->xmlDocImpl()->updateRendering();
if ( part )
emit part->browserExtension()->requestFocus(part);
- KMessageBox::error(widget, QStyleSheet::convertFromPlainText(str, QStyleSheetItem::WhiteSpaceNormal), caption);
+ KMessageBox::error(widget, TQStyleSheet::convertFromPlainText(str, TQStyleSheetItem::WhiteSpaceNormal), caption);
return Undefined();
case Window::Confirm:
if (!widget->dialogsAllowed())
@@ -1794,7 +1794,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
part->xmlDocImpl()->updateRendering();
if ( part )
emit part->browserExtension()->requestFocus(part);
- return Boolean((KMessageBox::warningYesNo(widget, QStyleSheet::convertFromPlainText(str), caption,
+ return Boolean((KMessageBox::warningYesNo(widget, TQStyleSheet::convertFromPlainText(str), caption,
KStdGuiItem::ok(), KStdGuiItem::cancel()) == KMessageBox::Yes));
case Window::Prompt:
#ifndef KONQ_EMBEDDED
@@ -1807,12 +1807,12 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
bool ok;
if (args.size() >= 2)
str2 = KInputDialog::getText(caption,
- QStyleSheet::convertFromPlainText(str),
+ TQStyleSheet::convertFromPlainText(str),
args[1].toString(exec).qstring(), &ok, widget);
else
str2 = KInputDialog::getText(caption,
- QStyleSheet::convertFromPlainText(str),
- QString::null, &ok, widget);
+ TQStyleSheet::convertFromPlainText(str),
+ TQString::null, &ok, widget);
if ( ok )
return String(str2);
else
@@ -1911,7 +1911,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
case Window::AToB: {
if (!s.is8Bit())
return Undefined();
- QByteArray in, out;
+ TQByteArray in, out;
char *binData = s.ascii();
in.setRawData( binData, s.size() );
if (id == Window::AToB)
@@ -1950,10 +1950,10 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QWidget * tl = widget->topLevelWidget();
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
- QPoint dest = tl->pos() + QPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
+ TQPoint dest = tl->pos() + TQPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
if ( dest.x() >= sg.x() && dest.y() >= sg.x() &&
dest.x()+tl->width() <= sg.width()+sg.x() &&
@@ -1970,10 +1970,10 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QWidget * tl = widget->topLevelWidget();
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
- QPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
+ TQPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
if ( dest.x() >= sg.x() && dest.y() >= sg.y() &&
dest.x()+tl->width() <= sg.width()+sg.x() &&
@@ -1989,8 +1989,8 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- QWidget * tl = widget->topLevelWidget();
- QRect geom = tl->frameGeometry();
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect geom = tl->frameGeometry();
window->resizeTo( tl,
geom.width() + args[0].toInt32(exec),
geom.height() + args[1].toInt32(exec) );
@@ -2003,7 +2003,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- QWidget * tl = widget->topLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
window->resizeTo( tl, args[0].toInt32(exec), args[1].toInt32(exec) );
}
return Undefined();
@@ -2096,8 +2096,8 @@ ScheduledAction::ScheduledAction(Object _func, List _args, DateTimeMS _nextTime,
timerId = _timerId;
}
-// KDE 4: Make it const QString &
-ScheduledAction::ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
+// KDE 4: Make it const TQString &
+ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
{
//kdDebug(6070) << "ScheduledAction::ScheduledAction(!isFunction) " << this << endl;
//func = 0;
@@ -2170,8 +2170,8 @@ WindowQObject::WindowQObject(Window *w)
if ( !parent->m_frame )
kdDebug(6070) << "WARNING: null part in " << k_funcinfo << endl;
else
- connect( parent->m_frame, SIGNAL( destroyed() ),
- this, SLOT( parentDestroyed() ) );
+ connect( parent->m_frame, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( parentDestroyed() ) );
pausedTime = 0;
lastTimerId = 0;
currentlyDispatching = false;
@@ -2187,7 +2187,7 @@ void WindowQObject::parentDestroyed()
{
killTimers();
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
delete it.current();
scheduledActions.clear();
@@ -2222,7 +2222,7 @@ int WindowQObject::installTimeout(const Value &func, List args, int t, bool sing
void WindowQObject::clearTimeout(int timerId)
{
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
if (action->timerId == timerId) {
@@ -2241,12 +2241,12 @@ bool WindowQObject::hasTimers() const
void WindowQObject::mark()
{
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
it.current()->mark();
}
-void WindowQObject::timerEvent(QTimerEvent *)
+void WindowQObject::timerEvent(TQTimerEvent *)
{
killTimers();
@@ -2261,14 +2261,14 @@ void WindowQObject::timerEvent(QTimerEvent *)
// Work out which actions are to be executed. We take a separate copy of
// this list since the main one may be modified during action execution
- QPtrList<ScheduledAction> toExecute;
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrList<ScheduledAction> toExecute;
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
if (currentAdjusted >= it.current()->nextTime)
toExecute.append(it.current());
// ### verify that the window can't be closed (and action deleted) during execution
- it = QPtrListIterator<ScheduledAction>(toExecute);
+ it = TQPtrListIterator<ScheduledAction>(toExecute);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
if (!scheduledActions.containsRef(action)) // removed by clearTimeout()
@@ -2352,11 +2352,11 @@ int DateTimeMS::msecsTo(const DateTimeMS &other) const
DateTimeMS DateTimeMS::now()
{
DateTimeMS t;
- QTime before = QTime::currentTime();
- t.mDate = QDate::currentDate();
- t.mTime = QTime::currentTime();
+ TQTime before = TQTime::currentTime();
+ t.mDate = TQDate::currentDate();
+ t.mTime = TQTime::currentTime();
if (t.mTime < before)
- t.mDate = QDate::currentDate(); // prevent race condition in hacky way :)
+ t.mDate = TQDate::currentDate(); // prevent race condition in hacky way :)
return t;
}
@@ -2368,7 +2368,7 @@ void WindowQObject::setNextTimer()
if (scheduledActions.isEmpty())
return;
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
DateTimeMS nextTime = it.current()->nextTime;
for (++it; it.current(); ++it)
if (nextTime > it.current()->nextTime)
@@ -2394,7 +2394,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const
if (part.isNull())
return Undefined();
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (p == lengthPropertyName)
return Number(len);
@@ -2521,11 +2521,11 @@ Value Location::get(ExecState *exec, const Identifier &p) const
if (entry)
switch (entry->value) {
case Hash:
- return String( url.ref().isNull() ? QString("") : "#" + url.ref() );
+ return String( url.ref().isNull() ? TQString("") : "#" + url.ref() );
case Host: {
UString str = url.host();
if (url.port())
- str += ":" + QString::number((int)url.port());
+ str += ":" + TQString::number((int)url.port());
return String(str);
// Note: this is the IE spec. The NS spec swaps the two, it says
// "The hostname property is the concatenation of the host and port properties, separated by a colon."
@@ -2543,9 +2543,9 @@ Value Location::get(ExecState *exec, const Identifier &p) const
case Pathname:
if (url.isEmpty())
return String("");
- return String( url.path().isEmpty() ? QString("/") : url.path() );
+ return String( url.path().isEmpty() ? TQString("/") : url.path() );
case Port:
- return String( url.port() ? QString::number((int)url.port()) : QString::fromLatin1("") );
+ return String( url.port() ? TQString::number((int)url.port()) : TQString::fromLatin1("") );
case Protocol:
return String( url.protocol()+":" );
case Search:
@@ -2587,7 +2587,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
if (entry->value != Href && !window->isSafeScript(exec))
return;
- QString str = v.toString(exec).qstring();
+ TQString str = v.toString(exec).qstring();
switch (entry->value) {
case Href: {
KHTMLPart* p =::qt_cast<KHTMLPart*>(Window::retrieveActive(exec)->part());
@@ -2603,8 +2603,8 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
url.setRef(str);
break;
case Host: {
- QString host = str.left(str.find(":"));
- QString port = str.mid(str.find(":")+1);
+ TQString host = str.left(str.find(":"));
+ TQString port = str.mid(str.find(":")+1);
url.setHost(host);
url.setPort(port.toUInt());
break;
@@ -2730,8 +2730,8 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if (args.size() != 1 && args.size() != 2)
return Undefined();
- QString url = args[0].toString(exec).qstring();
- QString title;
+ TQString url = args[0].toString(exec).qstring();
+ TQString title;
if (args.size() == 2)
title = args[1].toString(exec).qstring();
@@ -2739,7 +2739,7 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
// just wanted the base js handling code in cvs
return Undefined();
- QString question;
+ TQString question;
if ( title.isEmpty() )
question = i18n("Do you want a bookmark pointing to the location \"%1\" to be added to your collection?")
.arg(url);
@@ -2749,7 +2749,7 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
emit part->browserExtension()->requestFocus(part);
- QString caption;
+ TQString caption;
if (!part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += i18n("JavaScript Attempted Bookmark Insert");
@@ -2809,9 +2809,9 @@ Value History::getValueProperty(ExecState *, int token) const
if ( !iface )
return Number( 0 );
- QVariant length = iface->property( "historyLength" );
+ TQVariant length = iface->property( "historyLength" );
- if ( length.type() != QVariant::UInt )
+ if ( length.type() != TQVariant::UInt )
return Number( 0 );
return Number( length.toUInt() );
@@ -2886,13 +2886,13 @@ Value Konqueror::get(ExecState *exec, const Identifier &p) const
if ( ext ) {
KParts::BrowserInterface *iface = ext->browserInterface();
if ( iface ) {
- QVariant prop = iface->property( p.qstring().latin1() );
+ TQVariant prop = iface->property( p.qstring().latin1() );
if ( prop.isValid() ) {
switch( prop.type() ) {
- case QVariant::Int:
+ case TQVariant::Int:
return Number( prop.toInt() );
- case QVariant::String:
+ case TQVariant::String:
return String( prop.toString() );
default:
break;
@@ -2916,9 +2916,9 @@ Value KonquerorFunc::tryCall(ExecState *exec, Object &, const List &args)
if ( !iface )
return Undefined();
- QCString n = m_name.data();
+ TQCString n = m_name.data();
n += "()";
- iface->callMethod( n.data(), QVariant() );
+ iface->callMethod( n.data(), TQVariant() );
return Undefined();
}
diff --git a/khtml/ecma/kjs_window.h b/khtml/ecma/kjs_window.h
index 1444110f4..433bf86ae 100644
--- a/khtml/ecma/kjs_window.h
+++ b/khtml/ecma/kjs_window.h
@@ -22,11 +22,11 @@
#ifndef _KJS_WINDOW_H_
#define _KJS_WINDOW_H_
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include "kjs_binding.h"
#include "kjs_views.h"
@@ -70,7 +70,7 @@ namespace KJS {
};
class KDE_EXPORT Window : public ObjectImp {
- friend QGuardedPtr<KHTMLPart> getInstance();
+ friend TQGuardedPtr<KHTMLPart> getInstance();
friend class Location;
friend class WindowFunc;
friend class WindowQObject;
@@ -105,10 +105,10 @@ namespace KJS {
void closeNow();
void delayedGoHistory(int steps);
void goHistory(int steps);
- void goURL(ExecState* exec, const QString& url, bool lockHistory);
+ void goURL(ExecState* exec, const TQString& url, bool lockHistory);
Value openWindow(ExecState *exec, const List &args);
- Value executeOpenWindow(ExecState *exec, const KURL& url, const QString& frameName, const QString& features);
- void resizeTo(QWidget* tl, int width, int height);
+ Value executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features);
+ void resizeTo(TQWidget* tl, int width, int height);
void afterScriptExecution();
bool isSafeScript(ExecState *exec) const {
KParts::ReadOnlyPart *activePart = static_cast<KJS::ScriptInterpreter *>( exec->interpreter() )->part();
@@ -118,14 +118,14 @@ namespace KJS {
Location *location() const;
ObjectImp* frames( ExecState* exec ) const;
JSEventListener *getJSEventListener(const Value &val, bool html = false);
- JSLazyEventListener *getJSLazyEventListener(const QString &code, const QString &name, DOM::NodeImpl* node);
+ JSLazyEventListener *getJSLazyEventListener(const TQString &code, const TQString &name, DOM::NodeImpl* node);
void clear( ExecState *exec );
virtual UString toString(ExecState *exec) const;
// Set the current "event" object
void setCurrentEvent( DOM::Event *evt );
- QPtrDict<JSEventListener> jsEventListeners;
+ TQPtrDict<JSEventListener> jsEventListeners;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { Closed, Crypto, DefaultStatus, Status, Document, Node, EventCtor, Range,
@@ -178,7 +178,7 @@ namespace KJS {
bool checkIsSafeScript( KParts::ReadOnlyPart* activePart ) const;
- QGuardedPtr<khtml::ChildFrame> m_frame;
+ TQGuardedPtr<khtml::ChildFrame> m_frame;
Screen *screen;
History *history;
External *external;
@@ -188,29 +188,29 @@ namespace KJS {
struct DelayedAction {
DelayedAction() : actionId(NullAction) {} // for QValueList
- DelayedAction( DelayedActionId id, QVariant p = QVariant() ) : actionId(id), param(p) {}
+ DelayedAction( DelayedActionId id, TQVariant p = TQVariant() ) : actionId(id), param(p) {}
DelayedActionId actionId;
- QVariant param; // just in case
+ TQVariant param; // just in case
};
- QValueList<DelayedAction> m_delayed;
+ TQValueList<DelayedAction> m_delayed;
struct SuppressedWindowInfo {
SuppressedWindowInfo() {} // for QValueList
- SuppressedWindowInfo( KURL u, QString fr, QString fe ) : url(u), frameName(fr), features(fe) {}
+ SuppressedWindowInfo( KURL u, TQString fr, TQString fe ) : url(u), frameName(fr), features(fe) {}
KURL url;
- QString frameName;
- QString features;
+ TQString frameName;
+ TQString features;
};
- QValueList<SuppressedWindowInfo> m_suppressedWindowInfo;
+ TQValueList<SuppressedWindowInfo> m_suppressedWindowInfo;
};
/**
- * like QDateTime, but properly handles milliseconds
+ * like TQDateTime, but properly handles milliseconds
*/
class DateTimeMS
{
- QDate mDate;
- QTime mTime;
+ TQDate mDate;
+ TQTime mTime;
public:
DateTimeMS addMSecs(int s) const;
bool operator >(const DateTimeMS &other) const;
@@ -229,14 +229,14 @@ namespace KJS {
class ScheduledAction {
public:
ScheduledAction(Object _func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
- ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
+ ScheduledAction(TQString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
~ScheduledAction();
bool execute(Window *window);
void mark();
ObjectImp *func;
List args;
- QString code;
+ TQString code;
bool isFunction;
bool singleShot;
@@ -246,7 +246,7 @@ namespace KJS {
int timerId;
};
- class KDE_EXPORT WindowQObject : public QObject {
+ class KDE_EXPORT WindowQObject : public TQObject {
Q_OBJECT
public:
WindowQObject(Window *w);
@@ -261,11 +261,11 @@ namespace KJS {
protected slots:
void parentDestroyed();
protected:
- void timerEvent(QTimerEvent *e);
+ void timerEvent(TQTimerEvent *e);
void setNextTimer();
private:
Window *parent;
- QPtrList<ScheduledAction> scheduledActions;
+ TQPtrList<ScheduledAction> scheduledActions;
int pausedTime;
int lastTimerId;
bool currentlyDispatching;
@@ -286,7 +286,7 @@ namespace KJS {
private:
friend class Window;
Location(khtml::ChildFrame *f);
- QGuardedPtr<khtml::ChildFrame> m_frame;
+ TQGuardedPtr<khtml::ChildFrame> m_frame;
};
#ifdef Q_WS_QWS
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index de77f3d7e..d3ebebaec 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -35,7 +35,7 @@
#include <kio/scheduler.h>
#include <kio/job.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#ifdef APPLE_CHANGES
@@ -86,7 +86,7 @@ void XMLHttpRequestQObject::slotData( KIO::Job* job, const char *data, int size
jsObject->slotData(job, data, size);
}
#else
-void XMLHttpRequestQObject::slotData( KIO::Job* job, const QByteArray &data )
+void XMLHttpRequestQObject::slotData( KIO::Job* job, const TQByteArray &data )
{
jsObject->slotData(job, data);
}
@@ -149,14 +149,14 @@ Value XMLHttpRequest::getValueProperty(ExecState *exec, int token) const
return Null();
}
if (!createdDocument) {
- QString mimeType = "text/xml";
+ TQString mimeType = "text/xml";
if (!m_mimeTypeOverride.isEmpty()) {
mimeType = m_mimeTypeOverride;
} else {
Value header = getResponseHeader("Content-Type");
if (header.type() != UndefinedType) {
- mimeType = QStringList::split(";", header.toString(exec).qstring())[0].stripWhiteSpace();
+ mimeType = TQStringList::split(";", header.toString(exec).qstring())[0].stripWhiteSpace();
}
}
@@ -239,7 +239,7 @@ XMLHttpRequest::XMLHttpRequest(ExecState *exec, const DOM::Document &d)
qObject(new XMLHttpRequestQObject(this)),
doc(static_cast<DOM::DocumentImpl*>(d.handle())),
async(true),
- contentType(QString::null),
+ contentType(TQString::null),
job(0),
state(Uninitialized),
onReadyStateChangeListener(0),
@@ -308,15 +308,15 @@ bool XMLHttpRequest::urlMatchesDocumentDomain(const KURL& _url) const
return false;
}
-void XMLHttpRequest::open(const QString& _method, const KURL& _url, bool _async)
+void XMLHttpRequest::open(const TQString& _method, const KURL& _url, bool _async)
{
abort();
aborted = false;
// clear stuff from possible previous load
requestHeaders.clear();
- responseHeaders = QString();
- response = QString();
+ responseHeaders = TQString();
+ response = TQString();
createdDocument = false;
responseXML = DOM::Document();
@@ -338,12 +338,12 @@ void XMLHttpRequest::open(const QString& _method, const KURL& _url, bool _async)
changeState(Loading);
}
-void XMLHttpRequest::send(const QString& _body)
+void XMLHttpRequest::send(const TQString& _body)
{
aborted = false;
if (method == "post") {
- QString protocol = url.protocol().lower();
+ TQString protocol = url.protocol().lower();
// Abondon the request when the protocol is other than "http",
// instead of blindly changing it to a "get" request.
@@ -355,8 +355,8 @@ void XMLHttpRequest::send(const QString& _body)
// FIXME: determine post encoding correctly by looking in headers
// for charset.
- QByteArray buf;
- QCString str = _body.utf8();
+ TQByteArray buf;
+ TQCString str = _body.utf8();
buf.duplicate(str.data(), str.size() - 1);
job = KIO::http_post( url, buf, false );
@@ -370,12 +370,12 @@ void XMLHttpRequest::send(const QString& _body)
}
if (!requestHeaders.isEmpty()) {
- QString rh;
- QMap<QString, QString>::ConstIterator begin = requestHeaders.begin();
- QMap<QString, QString>::ConstIterator end = requestHeaders.end();
- for (QMap<QString, QString>::ConstIterator i = begin; i != end; ++i) {
- QString key = i.key();
- QString value = i.data();
+ TQString rh;
+ TQMap<TQString, TQString>::ConstIterator begin = requestHeaders.begin();
+ TQMap<TQString, TQString>::ConstIterator end = requestHeaders.end();
+ for (TQMap<TQString, TQString>::ConstIterator i = begin; i != end; ++i) {
+ TQString key = i.key();
+ TQString value = i.data();
if (key == "accept") {
// The HTTP KIO slave supports an override this way
job->addMetaData("accept", value);
@@ -397,21 +397,21 @@ void XMLHttpRequest::send(const QString& _body)
// ### does find() ever succeed? the headers are stored in lower case!
if (requestHeaders.find("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
- documentURL.setPass(QString::null);
- documentURL.setUser(QString::null);
+ documentURL.setPass(TQString::null);
+ documentURL.setUser(TQString::null);
job->addMetaData("referrer", documentURL.url());
// kdDebug() << "Adding referrer: " << documentURL << endl;
}
if (!async) {
- QByteArray data;
+ TQByteArray data;
KURL finalURL;
- QString headers;
+ TQString headers;
#ifdef APPLE_CHANGES
data = KWQServeSynchronousRequest(khtml::Cache::loader(), doc->docLoader(), job, finalURL, headers);
#else
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
if ( NetAccess::synchronousRun( job, 0, &data, &finalURL, &metaData ) ) {
headers = metaData[ "HTTP-Headers" ];
}
@@ -421,17 +421,17 @@ void XMLHttpRequest::send(const QString& _body)
return;
}
- qObject->connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ qObject->connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
#ifdef APPLE_CHANGES
- qObject->connect( job, SIGNAL( data( KIO::Job*, const char*, int ) ),
- SLOT( slotData( KIO::Job*, const char*, int ) ) );
+ qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const char*, int ) ),
+ TQT_SLOT( slotData( KIO::Job*, const char*, int ) ) );
#else
- qObject->connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
+ qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
#endif
- qObject->connect( job, SIGNAL(redirection(KIO::Job*, const KURL& ) ),
- SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
+ qObject->connect( job, TQT_SIGNAL(redirection(KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
#ifdef APPLE_CHANGES
KWQServeRequest(khtml::Cache::loader(), doc->docLoader(), job);
@@ -451,14 +451,14 @@ void XMLHttpRequest::abort()
aborted = true;
}
-void XMLHttpRequest::overrideMIMEType(const QString& override)
+void XMLHttpRequest::overrideMIMEType(const TQString& override)
{
m_mimeTypeOverride = override;
}
-void XMLHttpRequest::setRequestHeader(const QString& _name, const QString &value)
+void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &value)
{
- QString name = _name.lower().stripWhiteSpace();
+ TQString name = _name.lower().stripWhiteSpace();
// Content-type needs to be set seperately from the other headers
if(name == "content-type") {
@@ -486,8 +486,8 @@ void XMLHttpRequest::setRequestHeader(const QString& _name, const QString &value
// Reject all banned headers. See BANNED_HTTP_HEADERS above.
// kdDebug() << "Banned HTTP Headers: " << BANNED_HTTP_HEADERS << endl;
- QStringList bannedHeaders = QStringList::split(',',
- QString::fromLatin1(BANNED_HTTP_HEADERS));
+ TQStringList bannedHeaders = TQStringList::split(',',
+ TQString::fromLatin1(BANNED_HTTP_HEADERS));
if (bannedHeaders.contains(name))
return; // Denied
@@ -510,13 +510,13 @@ Value XMLHttpRequest::getAllResponseHeaders() const
return String(responseHeaders.mid(endOfLine + 1) + "\n");
}
-Value XMLHttpRequest::getResponseHeader(const QString& name) const
+Value XMLHttpRequest::getResponseHeader(const TQString& name) const
{
if (responseHeaders.isEmpty()) {
return Undefined();
}
- QRegExp headerLinePattern(name + ":", false);
+ TQRegExp headerLinePattern(name + ":", false);
int matchLength;
int headerLinePos = headerLinePattern.search(responseHeaders, 0);
@@ -540,14 +540,14 @@ Value XMLHttpRequest::getResponseHeader(const QString& name) const
return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace());
}
-static Value httpStatus(const QString& response, bool textStatus = false)
+static Value httpStatus(const TQString& response, bool textStatus = false)
{
if (response.isEmpty()) {
return Undefined();
}
int endOfLine = response.find("\n");
- QString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
+ TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
int codeStart = firstLine.find(" ");
int codeEnd = firstLine.find(" ", codeStart + 1);
@@ -556,11 +556,11 @@ static Value httpStatus(const QString& response, bool textStatus = false)
}
if (textStatus) {
- QString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
+ TQString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
return String(statusText);
}
- QString number = firstLine.mid(codeStart + 1, codeEnd - (codeStart + 1));
+ TQString number = firstLine.mid(codeStart + 1, codeEnd - (codeStart + 1));
bool ok = false;
int code = number.toInt(&ok);
@@ -581,7 +581,7 @@ Value XMLHttpRequest::getStatusText() const
return httpStatus(responseHeaders, true);
}
-void XMLHttpRequest::processSyncLoadResults(const QByteArray &data, const KURL &finalURL, const QString &headers)
+void XMLHttpRequest::processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers)
{
if (!urlMatchesDocumentDomain(finalURL)) {
abort();
@@ -635,7 +635,7 @@ void XMLHttpRequest::slotRedirection(KIO::Job*, const KURL& url)
#ifdef APPLE_CHANGES
void XMLHttpRequest::slotData( KIO::Job*, const char *data, int len )
#else
-void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
+void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
#endif
{
if (state < Loaded ) {
@@ -664,10 +664,10 @@ void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
if ( pos > -1 ) {
pos += 13;
int index = responseHeaders.find('\n', pos);
- QString type = responseHeaders.mid(pos, (index-pos));
+ TQString type = responseHeaders.mid(pos, (index-pos));
index = type.find (';');
if (index > -1)
- encoding = type.mid( index+1 ).remove(QRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
+ encoding = type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
}
decoder = new Decoder;
@@ -684,7 +684,7 @@ void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
if (len == -1)
len = strlen(data);
- QString decoded = decoder->decode(data, len);
+ TQString decoded = decoder->decode(data, len);
response += decoded;
@@ -724,7 +724,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
return Undefined();
}
- QString method = args[0].toString(exec).qstring();
+ TQString method = args[0].toString(exec).qstring();
KHTMLPart *part = ::qt_cast<KHTMLPart *>(Window::retrieveActive(exec)->part());
if (!part)
return Undefined();
@@ -757,7 +757,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
return Undefined();
}
- QString body;
+ TQString body;
if (args.size() >= 1) {
Object obj = Object::dynamicCast(args[0]);
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
diff --git a/khtml/ecma/xmlhttprequest.h b/khtml/ecma/xmlhttprequest.h
index 49582a905..2c646708e 100644
--- a/khtml/ecma/xmlhttprequest.h
+++ b/khtml/ecma/xmlhttprequest.h
@@ -77,31 +77,31 @@ namespace KJS {
#ifdef APPLE_CHANGES
void slotData( KIO::Job* job, const char *data, int size );
#else
- void slotData( KIO::Job* job, const QByteArray &data );
+ void slotData( KIO::Job* job, const TQByteArray &data );
#endif
void slotFinished( KIO::Job* );
void slotRedirection( KIO::Job*, const KURL& );
- void processSyncLoadResults(const QByteArray &data, const KURL &finalURL, const QString &headers);
+ void processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers);
- void open(const QString& _method, const KURL& _url, bool _async);
- void send(const QString& _body);
+ void open(const TQString& _method, const KURL& _url, bool _async);
+ void send(const TQString& _body);
void abort();
- void setRequestHeader(const QString& name, const QString &value);
- void overrideMIMEType(const QString& override);
+ void setRequestHeader(const TQString& name, const TQString &value);
+ void overrideMIMEType(const TQString& override);
Value getAllResponseHeaders() const;
- Value getResponseHeader(const QString& name) const;
+ Value getResponseHeader(const TQString& name) const;
void changeState(XMLHttpRequestState newState);
- QGuardedPtr<DOM::DocumentImpl> doc;
+ TQGuardedPtr<DOM::DocumentImpl> doc;
KURL url;
- QString method;
+ TQString method;
bool async;
- QMap<QString,QString> requestHeaders;
- QString m_mimeTypeOverride;
- QString contentType;
+ TQMap<TQString,TQString> requestHeaders;
+ TQString m_mimeTypeOverride;
+ TQString contentType;
KIO::TransferJob * job;
@@ -110,10 +110,10 @@ namespace KJS {
JSEventListener *onLoadListener;
khtml::Decoder *decoder;
- QString encoding;
- QString responseHeaders;
+ TQString encoding;
+ TQString responseHeaders;
- QString response;
+ TQString response;
mutable bool createdDocument;
mutable bool typeIsXML;
mutable DOM::Document responseXML;
@@ -122,14 +122,14 @@ namespace KJS {
};
- class XMLHttpRequestQObject : public QObject {
+ class XMLHttpRequestQObject : public TQObject {
Q_OBJECT
public:
XMLHttpRequestQObject(XMLHttpRequest *_jsObject);
public slots:
- void slotData( KIO::Job* job, const QByteArray &data );
+ void slotData( KIO::Job* job, const TQByteArray &data );
void slotFinished( KIO::Job* job );
void slotRedirection( KIO::Job* job, const KURL& url);
diff --git a/khtml/ecma/xmlserializer.cpp b/khtml/ecma/xmlserializer.cpp
index 6abcfe77f..856f35e1f 100644
--- a/khtml/ecma/xmlserializer.cpp
+++ b/khtml/ecma/xmlserializer.cpp
@@ -89,7 +89,7 @@ Value XMLSerializerProtoFunc::tryCall(ExecState *exec, Object &thisObj, const Li
return Undefined();
}
- QString body;
+ TQString body;
try {
body = node->toString().string();
diff --git a/khtml/html/html_baseimpl.cpp b/khtml/html/html_baseimpl.cpp
index babbac76d..9ebe26242 100644
--- a/khtml/html/html_baseimpl.cpp
+++ b/khtml/html/html_baseimpl.cpp
@@ -72,7 +72,7 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_BACKGROUND:
{
- QString url = khtml::parseURL( attr->value() ).string();
+ TQString url = khtml::parseURL( attr->value() ).string();
if (!url.isEmpty()) {
url = getDocument()->completeURL( url );
addCSSProperty(CSS_PROP_BACKGROUND_IMAGE, "url('"+url+"')" );
@@ -124,7 +124,7 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr)
m_styleSheet = new CSSStyleSheetImpl(this,DOMString(),true);
m_styleSheet->ref();
}
- QString aStr;
+ TQString aStr;
if ( attr->id() == ATTR_LINK )
aStr = "a:link";
else if ( attr->id() == ATTR_VLINK )
@@ -187,13 +187,13 @@ void HTMLBodyElementImpl::insertedIntoDocument()
KHTMLView* w = getDocument()->view();
if(w && w->marginWidth() != -1) {
- QString s;
+ TQString s;
s.sprintf( "%d", w->marginWidth() );
addCSSLength(CSS_PROP_MARGIN_LEFT, s);
addCSSLength(CSS_PROP_MARGIN_RIGHT, s);
}
if(w && w->marginHeight() != -1) {
- QString s;
+ TQString s;
s.sprintf( "%d", w->marginHeight() );
addCSSLength(CSS_PROP_MARGIN_TOP, s);
addCSSLength(CSS_PROP_MARGIN_BOTTOM, s);
@@ -244,7 +244,7 @@ HTMLFrameElementImpl::HTMLFrameElementImpl(DocumentImpl *doc)
frameBorderSet = false;
marginWidth = -1;
marginHeight = -1;
- scrolling = QScrollView::Auto;
+ scrolling = TQScrollView::Auto;
noresize = false;
url = "about:blank";
}
@@ -286,11 +286,11 @@ void HTMLFrameElementImpl::parseAttribute(AttributeImpl *attr)
break;
case ATTR_SCROLLING:
if( strcasecmp( attr->value(), "auto" ) == 0 )
- scrolling = QScrollView::Auto;
+ scrolling = TQScrollView::Auto;
else if( strcasecmp( attr->value(), "yes" ) == 0 )
- scrolling = QScrollView::AlwaysOn;
+ scrolling = TQScrollView::AlwaysOn;
else if( strcasecmp( attr->value(), "no" ) == 0 )
- scrolling = QScrollView::AlwaysOff;
+ scrolling = TQScrollView::AlwaysOff;
// when attached, has no effect
break;
case ATTR_ONLOAD:
diff --git a/khtml/html/html_baseimpl.h b/khtml/html/html_baseimpl.h
index f30dc81f6..b04afd749 100644
--- a/khtml/html/html_baseimpl.h
+++ b/khtml/html/html_baseimpl.h
@@ -31,7 +31,7 @@
#include "html/html_elementimpl.h"
#include "misc/khtmllayout.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
class KHTMLView;
class KHTMLPart;
@@ -103,7 +103,7 @@ public:
int marginWidth;
int marginHeight;
- QScrollView::ScrollBarMode scrolling;
+ TQScrollView::ScrollBarMode scrolling;
bool frameBorder : 1;
bool frameBorderSet : 1;
diff --git a/khtml/html/html_blockimpl.cpp b/khtml/html/html_blockimpl.cpp
index ac6d6436c..41cdaccea 100644
--- a/khtml/html/html_blockimpl.cpp
+++ b/khtml/html/html_blockimpl.cpp
@@ -127,10 +127,10 @@ void HTMLHRElementImpl::attach()
addCSSProperty(CSS_PROP_BORDER_TOP_WIDTH, n);
addCSSProperty(CSS_PROP_BORDER_LEFT_WIDTH, n);
addCSSProperty(CSS_PROP_BORDER_RIGHT_WIDTH, n);
- addCSSLength(CSS_PROP_HEIGHT, DOMString(QString::number(_s-2)));
+ addCSSLength(CSS_PROP_HEIGHT, DOMString(TQString::number(_s-2)));
}
else if (_s >= 0) {
- addCSSProperty(CSS_PROP_BORDER_TOP_WIDTH, DOMString(QString::number(_s)));
+ addCSSProperty(CSS_PROP_BORDER_TOP_WIDTH, DOMString(TQString::number(_s)));
addCSSProperty(CSS_PROP_BORDER_BOTTOM_WIDTH, DOMString("0"));
}
}
@@ -344,13 +344,13 @@ void HTMLLayerElementImpl::insertedIntoDocument()
HTMLDivElementImpl::insertedIntoDocument();
}
-void HTMLLayerElementImpl::removeId(const QString& id)
+void HTMLLayerElementImpl::removeId(const TQString& id)
{
getDocument()->underDocNamedCache().remove(id, this);
HTMLDivElementImpl::removeId(id);
}
-void HTMLLayerElementImpl::addId (const QString& id)
+void HTMLLayerElementImpl::addId (const TQString& id)
{
getDocument()->underDocNamedCache().add(id, this);
HTMLDivElementImpl::addId(id);
diff --git a/khtml/html/html_blockimpl.h b/khtml/html/html_blockimpl.h
index a3a1b8994..f560583db 100644
--- a/khtml/html/html_blockimpl.h
+++ b/khtml/html/html_blockimpl.h
@@ -95,8 +95,8 @@ public:
virtual void removedFromDocument();
virtual void insertedIntoDocument();
- virtual void addId(const QString& id);
- virtual void removeId(const QString& id);
+ virtual void addId(const TQString& id);
+ virtual void removeId(const TQString& id);
private:
DOMString m_name;
bool fixed;
diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp
index 59ec6859f..e2ee3ba57 100644
--- a/khtml/html/html_documentimpl.cpp
+++ b/khtml/html/html_documentimpl.cpp
@@ -55,7 +55,7 @@
#include "css/cssstyleselector.h"
#include "css/css_stylesheetimpl.h"
#include <stdlib.h>
-#include <qptrstack.h>
+#include <tqptrstack.h>
// Turn off inlining to avoid warning with newer gcc.
#undef __inline
@@ -63,7 +63,7 @@
#include "doctypes.cpp"
#undef __inline
-template class QPtrStack<DOM::NodeImpl>;
+template class TQPtrStack<DOM::NodeImpl>;
using namespace DOM;
using namespace khtml;
@@ -78,13 +78,13 @@ HTMLDocumentImpl::HTMLDocumentImpl(DOMImplementationImpl *_implementation, KHTML
m_doAutoFill = false;
/* dynamic history stuff to be fixed later (pfeiffer)
- connect( KHTMLFactory::vLinks(), SIGNAL( removed( const QString& )),
- SLOT( slotHistoryChanged() ));
+ connect( KHTMLFactory::vLinks(), TQT_SIGNAL( removed( const TQString& )),
+ TQT_SLOT( slotHistoryChanged() ));
*/
- connect( KHTMLFactory::vLinks(), SIGNAL( inserted( const QString& ) ),
- SLOT( slotHistoryChanged() ));
- connect( KHTMLFactory::vLinks(), SIGNAL( cleared()),
- SLOT( slotHistoryChanged() ));
+ connect( KHTMLFactory::vLinks(), TQT_SIGNAL( inserted( const TQString& ) ),
+ TQT_SLOT( slotHistoryChanged() ));
+ connect( KHTMLFactory::vLinks(), TQT_SIGNAL( cleared()),
+ TQT_SLOT( slotHistoryChanged() ));
}
HTMLDocumentImpl::~HTMLDocumentImpl()
@@ -113,26 +113,26 @@ DOMString HTMLDocumentImpl::cookie() const
if ( v && v->topLevelWidget() )
windowId = v->topLevelWidget()->winId();
- QCString replyType;
- QByteArray params, reply;
- QDataStream stream(params, IO_WriteOnly);
+ TQCString replyType;
+ TQByteArray params, reply;
+ TQDataStream stream(params, IO_WriteOnly);
stream << URL().url() << windowId;
if (!kapp->dcopClient()->call("kcookiejar", "kcookiejar",
- "findDOMCookies(QString,long int)", params,
+ "findDOMCookies(TQString,long int)", params,
replyType, reply))
{
kdWarning(6010) << "Can't communicate with cookiejar!" << endl;
return DOMString();
}
- QDataStream stream2(reply, IO_ReadOnly);
- if(replyType != "QString") {
+ TQDataStream stream2(reply, IO_ReadOnly);
+ if(replyType != "TQString") {
kdError(6010) << "DCOP function findDOMCookies(...) returns "
- << replyType << ", expected QString" << endl;
+ << replyType << ", expected TQString" << endl;
return DOMString();
}
- QString result;
+ TQString result;
stream2 >> result;
return DOMString(result);
}
@@ -145,19 +145,19 @@ void HTMLDocumentImpl::setCookie( const DOMString & value )
if ( v && v->topLevelWidget() )
windowId = v->topLevelWidget()->winId();
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
- QCString fake_header("Set-Cookie: ");
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
+ TQCString fake_header("Set-Cookie: ");
fake_header.append(value.string().latin1());
fake_header.append("\n");
stream << URL().url() << fake_header << windowId;
if (!kapp->dcopClient()->send("kcookiejar", "kcookiejar",
- "addCookies(QString,QCString,long int)", params))
+ "addCookies(TQString,TQCString,long int)", params))
{
// Maybe it wasn't running (e.g. we're opening local html files)
KApplication::startServiceByDesktopName( "kcookiejar");
if (!kapp->dcopClient()->send("kcookiejar", "kcookiejar",
- "addCookies(QString,QCString,long int)", params))
+ "addCookies(TQString,TQCString,long int)", params))
kdWarning(6010) << "Can't communicate with cookiejar!" << endl;
}
}
@@ -231,13 +231,13 @@ void HTMLDocumentImpl::slotHistoryChanged()
HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url)
{
- QString url = _url.string();
- QString s;
+ TQString url = _url.string();
+ TQString s;
int pos = url.find('#');
//kdDebug(0) << "map pos of #:" << pos << endl;
- s = QString(_url.unicode() + pos + 1, _url.length() - pos - 1);
+ s = TQString(_url.unicode() + pos + 1, _url.length() - pos - 1);
- QMapConstIterator<QString,HTMLMapElementImpl*> it = mapMap.find(s);
+ TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s);
if (it != mapMap.end())
return *it;
@@ -288,10 +288,10 @@ const int PARSEMODE_HAVE_PUBLIC_ID = (1<<1);
const int PARSEMODE_HAVE_SYSTEM_ID = (1<<2);
const int PARSEMODE_HAVE_INTERNAL = (1<<3);
-static int parseDocTypePart(const QString& buffer, int index)
+static int parseDocTypePart(const TQString& buffer, int index)
{
while (true) {
- QChar ch = buffer[index];
+ TQChar ch = buffer[index];
if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
++index;
else if (ch == '-') {
@@ -307,22 +307,22 @@ static int parseDocTypePart(const QString& buffer, int index)
}
}
-static bool containsString(const char* str, const QString& buffer, int offset)
+static bool containsString(const char* str, const TQString& buffer, int offset)
{
- QString startString(str);
+ TQString startString(str);
if (offset + startString.length() > buffer.length())
return false;
- QString bufferString = buffer.mid(offset, startString.length()).lower();
- QString lowerStart = startString.lower();
+ TQString bufferString = buffer.mid(offset, startString.length()).lower();
+ TQString lowerStart = startString.lower();
return bufferString.startsWith(lowerStart);
}
-static bool parseDocTypeDeclaration(const QString& buffer,
+static bool parseDocTypeDeclaration(const TQString& buffer,
int* resultFlags,
- QString& publicID,
- QString& systemID)
+ TQString& publicID,
+ TQString& systemID)
{
bool haveDocType = false;
*resultFlags = 0;
@@ -332,7 +332,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
do {
index = buffer.find('<', index);
if (index == -1) break;
- QChar nextChar = buffer[index+1];
+ TQChar nextChar = buffer[index+1];
if (nextChar == '!') {
if (containsString("doctype", buffer, index+2)) {
haveDocType = true;
@@ -364,7 +364,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
// We've read <!DOCTYPE HTML PUBLIC (not case sensitive).
// Now we find the beginning and end of the public identifers
// and system identifiers (assuming they're even present).
- QChar theChar = buffer[index];
+ TQChar theChar = buffer[index];
if (theChar != '\"' && theChar != '\'')
return false;
@@ -375,7 +375,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
if (publicIDEnd == -1)
return false;
index = parseDocTypePart(buffer, publicIDEnd+1);
- QChar next = buffer[index];
+ TQChar next = buffer[index];
if (next == '>') {
// Public identifier present, but no system identifier.
// Do nothing. Note that this is the most common
@@ -406,7 +406,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
// Doctype has a system ID but no public ID
*resultFlags |= PARSEMODE_HAVE_SYSTEM_ID;
index = parseDocTypePart(buffer, index+6);
- QChar next = buffer[index];
+ TQChar next = buffer[index];
if (next != '\"' && next != '\'')
return false;
int systemIDStart = index+1;
@@ -417,7 +417,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
index = parseDocTypePart(buffer, systemIDEnd+1);
}
- QChar nextChar = buffer[index];
+ TQChar nextChar = buffer[index];
if (nextChar == '[')
*resultFlags |= PARSEMODE_HAVE_INTERNAL;
else if (nextChar != '>')
@@ -427,7 +427,7 @@ static bool parseDocTypeDeclaration(const QString& buffer,
return true;
}
-void HTMLDocumentImpl::determineParseMode( const QString &str )
+void HTMLDocumentImpl::determineParseMode( const TQString &str )
{
//kdDebug() << "DocumentImpl::determineParseMode str=" << str<< endl;
int oldPMode = pMode;
@@ -446,7 +446,7 @@ void HTMLDocumentImpl::determineParseMode( const QString &str )
// STRICT - no quirks apply. Web pages will obey the specifications to
// the letter.
- QString systemID, publicID;
+ TQString systemID, publicID;
int resultFlags = 0;
if (parseDocTypeDeclaration(str, &resultFlags, publicID, systemID)) {
if (resultFlags & PARSEMODE_HAVE_DOCTYPE) {
@@ -469,7 +469,7 @@ void HTMLDocumentImpl::determineParseMode( const QString &str )
else {
// We have to check a list of public IDs to see what we
// should do.
- QString lowerPubID = publicID.lower();
+ TQString lowerPubID = publicID.lower();
const char* pubIDStr = lowerPubID.latin1();
// Look up the entry in our gperf-generated table.
diff --git a/khtml/html/html_documentimpl.h b/khtml/html/html_documentimpl.h
index 20f9ddb2f..b4eed345c 100644
--- a/khtml/html/html_documentimpl.h
+++ b/khtml/html/html_documentimpl.h
@@ -27,7 +27,7 @@
#include "xml/dom_docimpl.h"
#include "html/html_miscimpl.h"
-#include <qmap.h>
+#include <tqmap.h>
class KHTMLView;
class QString;
@@ -66,7 +66,7 @@ public:
HTMLMapElementImpl* getMap(const DOMString& url_);
- virtual void determineParseMode( const QString &str );
+ virtual void determineParseMode( const TQString &str );
virtual void close();
void setAutoFill() { m_doAutoFill = true; }
@@ -79,7 +79,7 @@ protected:
HTMLElementImpl *htmlElement;
friend class HTMLMapElementImpl;
friend class HTMLImageElementImpl;
- QMap<QString,HTMLMapElementImpl*> mapMap;
+ TQMap<TQString,HTMLMapElementImpl*> mapMap;
bool m_doAutoFill;
bool m_htmlRequested;
diff --git a/khtml/html/html_elementimpl.cpp b/khtml/html/html_elementimpl.cpp
index cd47ea728..e6269d8b5 100644
--- a/khtml/html/html_elementimpl.cpp
+++ b/khtml/html/html_elementimpl.cpp
@@ -176,7 +176,7 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_CLASS:
if (attr->val()) {
DOMString v = attr->value();
- const QChar* s = v.unicode();
+ const TQChar* s = v.unicode();
int l = v.length();
while( l && !s->isSpace() )
l--,s++;
@@ -305,7 +305,7 @@ void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly,
if ( value.implementation() ) {
// match \s*[+-]?\d*(\.\d*)?[%\*]?
unsigned i = 0, j = 0;
- QChar* s = value.implementation()->s;
+ TQChar* s = value.implementation()->s;
unsigned l = value.implementation()->l;
while (i < l && s[i].isSpace())
@@ -318,7 +318,7 @@ void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly,
// no digits!
if (j == 0) return;
- int v = kClamp( QConstString(s, i).string().toInt(), -8192, 8191 ) ;
+ int v = kClamp( TQConstString(s, i).string().toInt(), -8192, 8191 ) ;
const char* suffix = "px";
if (!numOnly || multiLength) {
// look if we find a % or *
@@ -336,7 +336,7 @@ void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly,
}
if (numOnly) suffix = "";
- QString ns = QString::number(v) + suffix;
+ TQString ns = TQString::number(v) + suffix;
m_styleDecls->setLengthProperty( id, DOMString( ns ), false, true, multiLength );
setChanged();
return;
@@ -346,13 +346,13 @@ void HTMLElementImpl::addCSSLength(int id, const DOMString &value, bool numOnly,
setChanged();
}
-static inline bool isHexDigit( const QChar &c ) {
+static inline bool isHexDigit( const TQChar &c ) {
return ( c >= '0' && c <= '9' ) ||
( c >= 'a' && c <= 'f' ) ||
( c >= 'A' && c <= 'F' );
}
-static inline int toHex( const QChar &c ) {
+static inline int toHex( const TQChar &c ) {
return ( (c >= '0' && c <= '9')
? (c.unicode() - '0')
: ( ( c >= 'a' && c <= 'f' )
@@ -376,7 +376,7 @@ void HTMLElementImpl::addHTMLColor( int id, const DOMString &c )
if ( m_styleDecls->setProperty(id, c, false, true) )
return;
- QString color = c.string();
+ TQString color = c.string();
// not something that fits the specs.
// we're emulating IEs color parser here. It maps transparent to black, otherwise it tries to build a rgb value
@@ -454,17 +454,17 @@ void HTMLElementImpl::removeCSSProperty(int id)
DOMString HTMLElementImpl::innerHTML() const
{
- QString result; //Use QString to accumulate since DOMString is poor for appends
+ TQString result; //Use TQString to accumulate since DOMString is poor for appends
for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
DOMString kid = child->toString();
- result += QConstString(kid.unicode(), kid.length()).string();
+ result += TQConstString(kid.unicode(), kid.length()).string();
}
return result;
}
DOMString HTMLElementImpl::innerText() const
{
- QString text = "";
+ TQString text = "";
if(!firstChild())
return text;
@@ -486,7 +486,7 @@ DOMString HTMLElementImpl::innerText() const
}
if(n->isTextNode() ) {
DOMStringImpl* data = static_cast<const TextImpl *>(n)->string();
- text += QConstString(data->s, data->l).string();
+ text += TQConstString(data->s, data->l).string();
}
}
end:
diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp
index 1abaa606a..1d581d78b 100644
--- a/khtml/html/html_formimpl.cpp
+++ b/khtml/html/html_formimpl.cpp
@@ -58,12 +58,12 @@
#endif
#include <netaccess.h>
#include <kfileitem.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextcodec.h>
// for keygen
-#include <qstring.h>
+#include <tqstring.h>
#include <ksslkeygen.h>
#include <assert.h>
@@ -93,10 +93,10 @@ HTMLFormElementImpl::~HTMLFormElementImpl()
if (getDocument() && getDocument()->view() && getDocument()->view()->part()) {
getDocument()->view()->part()->dequeueWallet(this);
}
- QPtrListIterator<HTMLGenericFormElementImpl> it(formElements);
+ TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements);
for (; it.current(); ++it)
it.current()->m_form = 0;
- QPtrListIterator<HTMLImageElementImpl> it2(imgElements);
+ TQPtrListIterator<HTMLImageElementImpl> it2(imgElements);
for (; it2.current(); ++it2)
it2.current()->m_form = 0;
}
@@ -109,7 +109,7 @@ NodeImpl::Id HTMLFormElementImpl::id() const
long HTMLFormElementImpl::length() const
{
int len = 0;
- QPtrListIterator<HTMLGenericFormElementImpl> it(formElements);
+ TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements);
for (; it.current(); ++it)
if (it.current()->isEnumeratable())
++len;
@@ -117,19 +117,19 @@ long HTMLFormElementImpl::length() const
return len;
}
-static QCString encodeCString(const QCString& e)
+static TQCString encodeCString(const TQCString& e)
{
// http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
// safe characters like NS handles them for compatibility
static const char *safe = "-._*";
- QCString encoded(( e.length()+e.contains( '\n' ) )*3
+ TQCString encoded(( e.length()+e.contains( '\n' ) )*3
+e.contains('\r') * 3 + 1);
int enclen = 0;
bool crmissing = false;
unsigned char oldc;
unsigned char c ='\0';
- //QCString orig(e.data(), e.size());
+ //TQCString orig(e.data(), e.size());
unsigned len = e.length();
for(unsigned pos = 0; pos < len; pos++) {
@@ -184,15 +184,15 @@ static QCString encodeCString(const QCString& e)
// ### This function only encodes to numeric ampersand escapes,
// ### we could use standard ampersand values as well.
-inline static QString escapeUnencodeable(const QTextCodec* codec, const QString& s) {
- QString enc_string;
+inline static TQString escapeUnencodeable(const TQTextCodec* codec, const TQString& s) {
+ TQString enc_string;
const int len = s.length();
for(int i=0; i <len; ++i) {
- const QChar c = s[i];
+ const TQChar c = s[i];
if (codec->canEncode(c))
enc_string.append(c);
else {
- QString ampersandEscape;
+ TQString ampersandEscape;
ampersandEscape.sprintf("&#%u;", c.unicode());
enc_string.append(ampersandEscape);
}
@@ -200,37 +200,37 @@ inline static QString escapeUnencodeable(const QTextCodec* codec, const QString&
return enc_string;
}
-inline static QCString fixUpfromUnicode(const QTextCodec* codec, const QString& s)
+inline static TQCString fixUpfromUnicode(const TQTextCodec* codec, const TQString& s)
{
- QCString str = codec->fromUnicode(escapeUnencodeable(codec,s));
+ TQCString str = codec->fromUnicode(escapeUnencodeable(codec,s));
str.truncate(str.length());
return str;
}
-QByteArray HTMLFormElementImpl::formData(bool& ok)
+TQByteArray HTMLFormElementImpl::formData(bool& ok)
{
#ifdef FORMS_DEBUG
kdDebug( 6030 ) << "form: formData()" << endl;
#endif
- QByteArray form_data(0);
- QCString enc_string = ""; // used for non-multipart data
+ TQByteArray form_data(0);
+ TQCString enc_string = ""; // used for non-multipart data
// find out the QTextcodec to use
- const QString str = m_acceptcharset.string();
- const QChar space(' ');
+ const TQString str = m_acceptcharset.string();
+ const TQChar space(' ');
const unsigned int strLength = str.length();
for(unsigned int i=0; i < strLength; ++i) if(str[i].latin1() == ',') str[i] = space;
- const QStringList charsets = QStringList::split(' ', str);
- QTextCodec* codec = 0;
+ const TQStringList charsets = TQStringList::split(' ', str);
+ TQTextCodec* codec = 0;
KHTMLView *view = getDocument()->view();
{
- QStringList::ConstIterator it = charsets.begin();
- const QStringList::ConstIterator itEnd = charsets.end();
+ TQStringList::ConstIterator it = charsets.begin();
+ const TQStringList::ConstIterator itEnd = charsets.end();
for ( ; it != itEnd; ++it )
{
- QString enc = (*it);
+ TQString enc = (*it);
if(enc.contains("UNKNOWN"))
{
// use standard document encoding
@@ -243,21 +243,21 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
}
}
if(!codec)
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
// we need to map visual hebrew to logical hebrew, as the web
// server alsways expects responses in logical ordering
if ( codec->mibEnum() == 11 )
- codec = QTextCodec::codecForMib( 85 );
+ codec = TQTextCodec::codecForMib( 85 );
m_encCharset = codec->name();
const unsigned int m_encCharsetLength = m_encCharset.length();
for(unsigned int i=0; i < m_encCharsetLength; ++i)
- m_encCharset[i] = m_encCharset[i].latin1() == ' ' ? QChar('-') : m_encCharset[i].lower();
+ m_encCharset[i] = m_encCharset[i].latin1() == ' ' ? TQChar('-') : m_encCharset[i].lower();
- QStringList fileUploads, fileNotUploads;
+ TQStringList fileUploads, fileNotUploads;
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
HTMLGenericFormElementImpl* const current = it.current();
khtml::encodingList lst;
@@ -288,7 +288,7 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
}
else
{
- QCString hstr("--");
+ TQCString hstr("--");
hstr += m_boundary.latin1();
hstr += "\r\n";
hstr += "Content-Disposition: form-data; name=\"";
@@ -302,10 +302,10 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
current->renderer())
{
KURL path;
- QString val = static_cast<HTMLInputElementImpl*>(current)->value().string().stripWhiteSpace();
+ TQString val = static_cast<HTMLInputElementImpl*>(current)->value().string().stripWhiteSpace();
if (!val.isEmpty() &&
- QDir::isRelativePath(val) &&
- QFile::exists(KGlobalSettings::documentPath() + val)) {
+ TQDir::isRelativePath(val) &&
+ TQFile::exists(KGlobalSettings::documentPath() + val)) {
path.setPath(KGlobalSettings::documentPath() + val);
} else {
path = KURL::fromPathOrURL(val);
@@ -359,7 +359,7 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
if (result == KMessageBox::Cancel) {
ok = false;
- return QByteArray();
+ return TQByteArray();
}
}
@@ -374,7 +374,7 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
if (result == KMessageBox::Cancel) {
ok = false;
- return QByteArray();
+ return TQByteArray();
}
}
@@ -406,27 +406,27 @@ void HTMLFormElementImpl::setEnctype( const DOMString& type )
m_enctype = "application/x-www-form-urlencoded";
m_multipart = false;
}
- m_encCharset = QString::null;
+ m_encCharset = TQString::null;
}
-static QString calculateAutoFillKey(const HTMLFormElementImpl& e)
+static TQString calculateAutoFillKey(const HTMLFormElementImpl& e)
{
KURL k(e.getDocument()->URL());
- k.setRef(QString::null);
- k.setQuery(QString::null);
+ k.setRef(TQString::null);
+ k.setQuery(TQString::null);
// ensure that we have the user / password inside the url
// otherwise we might have a potential security problem
// by saving passwords under wrong lookup key.
- const QString name = e.getAttribute(ATTR_NAME).string().stripWhiteSpace();
- const QRegExp re("[;,!]");
- const QStringList url = QStringList::split(re, k.url());
+ const TQString name = e.getAttribute(ATTR_NAME).string().stripWhiteSpace();
+ const TQRegExp re("[;,!]");
+ const TQStringList url = TQStringList::split(re, k.url());
return url[0] + '#' + name;
}
void HTMLFormElementImpl::doAutoFill()
{
#ifndef KHTML_NO_WALLET
- const QString key = calculateAutoFillKey(*this);
+ const TQString key = calculateAutoFillKey(*this);
if (KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(),
KWallet::Wallet::FormDataFolder(),
@@ -442,16 +442,16 @@ void HTMLFormElementImpl::doAutoFill()
void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) {
#ifndef KHTML_NO_WALLET
assert(w);
- const QString key = calculateAutoFillKey(*this);
+ const TQString key = calculateAutoFillKey(*this);
if (!w->hasFolder(KWallet::Wallet::FormDataFolder())) {
return; // failed
}
w->setFolder(KWallet::Wallet::FormDataFolder());
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
if (w->readMap(key, map))
return; // failed, abort
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
if (it.current()->id() == ID_INPUT) {
HTMLInputElementImpl* const current = static_cast<HTMLInputElementImpl*>(it.current());
if ((current->inputType() == HTMLInputElementImpl::PASSWORD ||
@@ -472,7 +472,7 @@ void HTMLFormElementImpl::submitFromKeyboard()
// if there is none, do a submit anyway if not more
// than one <input type=text> or <input type=password>
unsigned int inputtext = 0;
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
if (it.current()->id() == ID_BUTTON) {
HTMLButtonElementImpl* const current = static_cast<HTMLButtonElementImpl *>(it.current());
if (current->buttonType() == HTMLButtonElementImpl::SUBMIT && !current->disabled()) {
@@ -513,7 +513,7 @@ void HTMLFormElementImpl::gatherWalletData()
m_haveTextarea = false;
const KURL formUrl(getDocument()->URL());
if (view && !view->nonPasswordStorableSite(formUrl.host())) {
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
if (it.current()->id() == ID_INPUT) {
HTMLInputElementImpl* const c = static_cast<HTMLInputElementImpl*> (it.current());
if ((c->inputType() == HTMLInputElementImpl::TEXT ||
@@ -570,7 +570,7 @@ void HTMLFormElementImpl::submit( )
bool ok;
KHTMLView* const view = getDocument()->view();
- const QByteArray form_data = formData(ok);
+ const TQByteArray form_data = formData(ok);
const KURL formUrl(getDocument()->URL());
if (ok && view) {
@@ -579,7 +579,7 @@ void HTMLFormElementImpl::submit( )
}
#ifndef KHTML_NO_WALLET
if (m_havePassword && !m_haveTextarea && KWallet::Wallet::isEnabled()) {
- const QString key = calculateAutoFillKey(*this);
+ const TQString key = calculateAutoFillKey(*this);
const bool doesnotexist = KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::FormDataFolder(), key);
KWallet::Wallet* const w = view->part()->wallet();
bool login_changed = false;
@@ -589,10 +589,10 @@ void HTMLFormElementImpl::submit( )
// we had so far.
if (w->hasFolder(KWallet::Wallet::FormDataFolder())) {
w->setFolder(KWallet::Wallet::FormDataFolder());
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
if (!w->readMap(key, map)) {
- QMapConstIterator<QString, QString> it = map.begin();
- const QMapConstIterator<QString, QString> itEnd = map.end();
+ TQMapConstIterator<TQString, TQString> it = map.begin();
+ const TQMapConstIterator<TQString, TQString> itEnd = map.end();
for ( ; it != itEnd; ++it )
if ( map[it.key()] != m_walletMap[it.key()] ) {
login_changed = true;
@@ -613,9 +613,9 @@ void HTMLFormElementImpl::submit( )
i18n("Store"), KGuiItem(i18n("Ne&ver for This Site")), i18n("Do Not Store"));
bool checkboxResult = false;
- const int savePassword = KMessageBox::createKMessageBox(dialog, QMessageBox::Information,
+ const int savePassword = KMessageBox::createKMessageBox(dialog, TQMessageBox::Information,
i18n("Store passwords on this page?"),
- QStringList(), QString::null, &checkboxResult, KMessageBox::Notify);
+ TQStringList(), TQString::null, &checkboxResult, KMessageBox::Notify);
if ( savePassword == KDialogBase::Yes ) {
// ensure that we have the user / password inside the url
@@ -668,7 +668,7 @@ void HTMLFormElementImpl::reset( )
return;
}
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it)
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it)
it.current()->reset();
m_inreset = false;
@@ -732,13 +732,13 @@ void HTMLFormElementImpl::insertedIntoDocument()
HTMLElementImpl::insertedIntoDocument();
}
-void HTMLFormElementImpl::removeId(const QString& id)
+void HTMLFormElementImpl::removeId(const TQString& id)
{
getDocument()->underDocNamedCache().remove(id, this);
HTMLElementImpl::removeId(id);
}
-void HTMLFormElementImpl::addId (const QString& id)
+void HTMLFormElementImpl::addId (const TQString& id)
{
getDocument()->underDocNamedCache().add(id, this);
HTMLElementImpl::addId(id);
@@ -747,7 +747,7 @@ void HTMLFormElementImpl::addId (const QString& id)
void HTMLFormElementImpl::radioClicked( HTMLGenericFormElementImpl *caller )
{
- for (QPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
+ for (TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements); it.current(); ++it) {
HTMLGenericFormElementImpl* const current = it.current();
if (current->id() == ID_INPUT &&
static_cast<HTMLInputElementImpl*>(current)->inputType() == HTMLInputElementImpl::RADIO &&
@@ -956,16 +956,16 @@ bool HTMLGenericFormElementImpl::isFocusable() const
if (!m_render || !m_render->isWidget())
return false;
- QWidget* widget = static_cast<RenderWidget*>(m_render)->widget();
- return widget && widget->focusPolicy() >= QWidget::TabFocus;
+ TQWidget* widget = static_cast<RenderWidget*>(m_render)->widget();
+ return widget && widget->focusPolicy() >= TQWidget::TabFocus;
}
class FocusHandleWidget : public QWidget
{
public:
void focusNextPrev(bool n) {
- if (!focusNextPrevChild(n) && inherits("QTextEdit"))
- QWidget::focusNextPrevChild(n);
+ if (!focusNextPrevChild(n) && inherits("TQTextEdit"))
+ TQWidget::focusNextPrevChild(n);
}
};
@@ -994,7 +994,7 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
KHTMLView* const view = getDocument()->view();
if (view && evt->id() == EventImpl::DOMFOCUSIN_EVENT && isEditable() && m_render && m_render->isWidget()) {
KHTMLPartBrowserExtension *ext = static_cast<KHTMLPartBrowserExtension *>(view->part()->browserExtension());
- QWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
+ TQWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
if (ext)
ext->editableWidgetFocused(widget);
}
@@ -1017,14 +1017,14 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
if (!evt->defaultHandled() && m_render && m_render->isWidget()) {
// handle tabbing out, either from a single or repeated key event.
if ( evt->id() == EventImpl::KEYPRESS_EVENT && evt->isKeyRelatedEvent() ) {
- QKeyEvent* const k = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
+ TQKeyEvent* const k = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
if ( k && (k->key() == Qt::Key_Tab || k->key() == Qt::Key_BackTab) ) {
- QWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
- QFocusEvent::setReason( k->key() == Qt::Key_Tab ? QFocusEvent::Tab : QFocusEvent::Backtab );
+ TQWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
+ TQFocusEvent::setReason( k->key() == Qt::Key_Tab ? TQFocusEvent::Tab : TQFocusEvent::Backtab );
if (widget)
static_cast<FocusHandleWidget *>(widget)
->focusNextPrev(k->key() == Qt::Key_Tab);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
evt->setDefaultHandled();
}
}
@@ -1033,7 +1033,7 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
if (view && evt->id() == EventImpl::DOMFOCUSOUT_EVENT && isEditable() && m_render && m_render->isWidget()) {
KHTMLPartBrowserExtension* const ext = static_cast<KHTMLPartBrowserExtension *>(view->part()->browserExtension());
- QWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
+ TQWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
if (ext)
ext->editableWidgetBlurred(widget);
@@ -1118,7 +1118,7 @@ void HTMLButtonElementImpl::defaultEventHandler(EventImpl *evt)
if (m_type != BUTTON && !m_disabled) {
bool act = (evt->id() == EventImpl::DOMACTIVATE_EVENT);
if (!act && evt->id()==EventImpl::KEYUP_EVENT && evt->isKeyRelatedEvent()) {
- QKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
+ TQKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
if (ke && active() && (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Space))
act = true;
}
@@ -1143,17 +1143,17 @@ void HTMLButtonElementImpl::activate()
void HTMLButtonElementImpl::click()
{
- QMouseEvent me(QEvent::MouseButtonRelease, QPoint(0,0),Qt::LeftButton, 0);
+ TQMouseEvent me(TQEvent::MouseButtonRelease, TQPoint(0,0),Qt::LeftButton, 0);
dispatchMouseEvent(&me,EventImpl::CLICK_EVENT, 1);
}
-bool HTMLButtonElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoding, bool /*multipart*/)
+bool HTMLButtonElementImpl::encoding(const TQTextCodec* codec, khtml::encodingList& encoding, bool /*multipart*/)
{
if (m_type != SUBMIT || name().isEmpty() || !m_activeSubmit)
return false;
encoding += fixUpfromUnicode(codec, name().string());
- const QString enc_str = m_currValue.isNull() ? QString("") : m_currValue;
+ const TQString enc_str = m_currValue.isNull() ? TQString("") : m_currValue;
encoding += fixUpfromUnicode(codec, enc_str);
return true;
@@ -1312,14 +1312,14 @@ DOMString HTMLInputElementImpl::type() const
}
}
-QString HTMLInputElementImpl::state( )
+TQString HTMLInputElementImpl::state( )
{
switch (m_type) {
case PASSWORD:
- return QString::fromLatin1("."); // empty string, avoid restoring
+ return TQString::fromLatin1("."); // empty string, avoid restoring
case CHECKBOX:
case RADIO:
- return QString::fromLatin1(checked() ? "on" : "off");
+ return TQString::fromLatin1(checked() ? "on" : "off");
case TEXT:
if (autoComplete() && value() != getAttribute(ATTR_VALUE) && getDocument()->view())
getDocument()->view()->addFormCompletionItem(name().string(), value().string());
@@ -1329,12 +1329,12 @@ QString HTMLInputElementImpl::state( )
}
}
-void HTMLInputElementImpl::restoreState(const QString &state)
+void HTMLInputElementImpl::restoreState(const TQString &state)
{
switch (m_type) {
case CHECKBOX:
case RADIO:
- setChecked((state == QString::fromLatin1("on")));
+ setChecked((state == TQString::fromLatin1("on")));
break;
case FILE:
m_value = DOMString(state.left(state.length()-1));
@@ -1359,7 +1359,7 @@ void HTMLInputElementImpl::select( )
void HTMLInputElementImpl::click()
{
- QMouseEvent me(QEvent::MouseButtonRelease, QPoint(0,0),Qt::LeftButton, 0);
+ TQMouseEvent me(TQEvent::MouseButtonRelease, TQPoint(0,0),Qt::LeftButton, 0);
dispatchMouseEvent(&me,0, 1);
dispatchMouseEvent(&me,EventImpl::CLICK_EVENT, 1);
}
@@ -1447,9 +1447,9 @@ void HTMLInputElementImpl::attach()
// FIXME: This needs to be dynamic, doesn't it, since someone could set this
// after attachment?
if ((uint) m_type <= ISINDEX && !m_value.isEmpty()) {
- const QString value = m_value.string();
+ const TQString value = m_value.string();
// remove newline stuff..
- QString nvalue;
+ TQString nvalue;
unsigned int valueLength = value.length();
for (unsigned int i = 0; i < valueLength; ++i)
if (value[i] >= ' ')
@@ -1523,9 +1523,9 @@ DOMString HTMLInputElementImpl::altText() const
return alt;
}
-bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoding, bool multipart)
+bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingList& encoding, bool multipart)
{
- const QString nme = name().string();
+ const TQString nme = name().string();
// image generates its own name's
if (nme.isEmpty() && m_type != IMAGE) return false;
@@ -1560,12 +1560,12 @@ bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList
if(m_clicked)
{
m_clicked = false;
- QString astr(nme.isEmpty() ? QString::fromLatin1("x") : nme + ".x");
+ TQString astr(nme.isEmpty() ? TQString::fromLatin1("x") : nme + ".x");
encoding += fixUpfromUnicode(codec, astr);
astr.setNum(KMAX( clickX(), 0 ));
encoding += fixUpfromUnicode(codec, astr);
- astr = nme.isEmpty() ? QString::fromLatin1("y") : nme + ".y";
+ astr = nme.isEmpty() ? TQString::fromLatin1("y") : nme + ".y";
encoding += fixUpfromUnicode(codec, astr);
astr.setNum(KMAX( clickY(), 0 ) );
encoding += fixUpfromUnicode(codec, astr);
@@ -1583,7 +1583,7 @@ bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList
if (m_activeSubmit)
{
- QString enc_str = valueWithDefault().string();
+ TQString enc_str = valueWithDefault().string();
if(!enc_str.isEmpty())
{
encoding += fixUpfromUnicode(codec, enc_str);
@@ -1598,12 +1598,12 @@ bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList
if(!renderer() || renderer()->style()->visibility() != khtml::VISIBLE)
return false;
- QString local;
+ TQString local;
KURL fileurl;
- QString val = value().string();
+ TQString val = value().string();
if (!val.isEmpty() &&
- QDir::isRelativePath(val) &&
- QFile::exists(KGlobalSettings::documentPath() + val)) {
+ TQDir::isRelativePath(val) &&
+ TQFile::exists(KGlobalSettings::documentPath() + val)) {
fileurl.setPath(KGlobalSettings::documentPath() + val);
} else {
fileurl = KURL::fromPathOrURL(val);
@@ -1612,14 +1612,14 @@ bool HTMLInputElementImpl::encoding(const QTextCodec* codec, khtml::encodingList
KIO::UDSEntry filestat;
// can't submit file in www-url-form encoded
- QWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget();
+ TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget();
if (multipart) {
- QCString filearray( "" );
+ TQCString filearray( "" );
if ( KIO::NetAccess::stat(fileurl, filestat, toplevel)) {
const KFileItem fileitem(filestat, fileurl, true, false);
if ( fileitem.isFile() &&
KIO::NetAccess::download(fileurl, local, toplevel) ) {
- QFile file(local);
+ TQFile file(local);
filearray.resize(file.size()+1);
if ( file.open( IO_ReadOnly ) ) {
const int readbytes = file.readBlock( filearray.data(), file.size());
@@ -1800,7 +1800,7 @@ void HTMLInputElementImpl::defaultEventHandler(EventImpl *evt)
if (m_type == IMAGE || m_type == SUBMIT || m_type == RESET) {
bool act = (evt->id() == EventImpl::DOMACTIVATE_EVENT);
if (!act && evt->id() == EventImpl::KEYUP_EVENT && evt->isKeyRelatedEvent()) {
- QKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
+ TQKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
if (ke && active() && (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Space))
act = true;
}
@@ -1916,7 +1916,7 @@ void HTMLLabelElementImpl::defaultEventHandler(EventImpl *evt)
}
else if ( evt->isKeyRelatedEvent() && ( evt->id() == EventImpl::KEYUP_EVENT ||
evt->id() == EventImpl::KEYPRESS_EVENT ) ) {
- QKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
+ TQKeyEvent* const ke = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
if (ke && active() && (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Space))
act = true;
}
@@ -2008,7 +2008,7 @@ long HTMLSelectElementImpl::selectedIndex() const
{
// return the number of the first option selected
uint o = 0;
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
const unsigned int itemsSize = items.size();
for (unsigned int i = 0; i < itemsSize; ++i) {
if (items[i]->id() == ID_OPTION) {
@@ -2024,7 +2024,7 @@ long HTMLSelectElementImpl::selectedIndex() const
void HTMLSelectElementImpl::setSelectedIndex( long index )
{
// deselect all other options and select only the new one
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
int listIndex;
const int itemsSize = int(items.size());
for (listIndex = 0; listIndex < itemsSize; ++listIndex) {
@@ -2073,7 +2073,7 @@ void HTMLSelectElementImpl::remove( long index )
int exceptioncode = 0;
const int listIndex = optionToListIndex(index);
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
if(listIndex < 0 || index >= int(items.size()))
return; // ### what should we do ? remove the last item?
@@ -2150,7 +2150,7 @@ DOMString HTMLInputElementImpl::valueWithDefault() const
DOMString HTMLSelectElementImpl::value( ) const
{
uint i;
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
const uint itemsSize = items.size();
for (i = 0; i < itemsSize; ++i) {
if ( items[i]->id() == ID_OPTION
@@ -2164,7 +2164,7 @@ void HTMLSelectElementImpl::setValue(DOMStringImpl* value)
{
// find the option with value() matching the given parameter
// and make it the current selection.
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
for (unsigned i = 0; i < items.size(); i++)
if (items[i]->id() == ID_OPTION && static_cast<HTMLOptionElementImpl*>(items[i])->value() == value) {
static_cast<HTMLOptionElementImpl*>(items[i])->setSelected(true);
@@ -2172,10 +2172,10 @@ void HTMLSelectElementImpl::setValue(DOMStringImpl* value)
}
}
-QString HTMLSelectElementImpl::state( )
+TQString HTMLSelectElementImpl::state( )
{
- QString state;
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQString state;
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
const int l = items.count();
@@ -2187,17 +2187,17 @@ QString HTMLSelectElementImpl::state( )
return state;
}
-void HTMLSelectElementImpl::restoreState(const QString &_state)
+void HTMLSelectElementImpl::restoreState(const TQString &_state)
{
recalcListItems();
- QString state = _state;
+ TQString state = _state;
if(!state.isEmpty() && !state.contains('X') && !m_multiple && m_size <= 1) {
qWarning("should not happen in restoreState!");
state[0] = 'X';
}
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
const int l = items.count();
for(int i = 0; i < l; ++i) {
@@ -2291,11 +2291,11 @@ void HTMLSelectElementImpl::attach()
_style->deref();
}
-bool HTMLSelectElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoded_values, bool)
+bool HTMLSelectElementImpl::encoding(const TQTextCodec* codec, khtml::encodingList& encoded_values, bool)
{
bool successful = false;
- const QCString enc_name = fixUpfromUnicode(codec, name().string());
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ const TQCString enc_name = fixUpfromUnicode(codec, name().string());
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
uint i;
const uint itemsSize = items.size();
@@ -2329,7 +2329,7 @@ bool HTMLSelectElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
int HTMLSelectElementImpl::optionToListIndex(int optionIndex) const
{
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
const int itemsSize = int(items.size());
if (optionIndex < 0 || optionIndex >= itemsSize)
return -1;
@@ -2353,7 +2353,7 @@ int HTMLSelectElementImpl::optionToListIndex(int optionIndex) const
int HTMLSelectElementImpl::listToOptionIndex(int listIndex) const
{
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
if (listIndex < 0 || listIndex >= int(items.size()) ||
items[listIndex]->id() != ID_OPTION)
return -1;
@@ -2419,7 +2419,7 @@ void HTMLSelectElementImpl::setRecalcListItems()
void HTMLSelectElementImpl::reset()
{
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
uint i;
const uint itemsSize = items.size();
bool anySelected = false;
@@ -2450,7 +2450,7 @@ void HTMLSelectElementImpl::notifyOptionSelected(HTMLOptionElementImpl *selected
{
if (selected && !m_multiple) {
// deselect all other options
- QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = listItems();
uint i;
const uint itemsSize = items.size();
for (i = 0; i < itemsSize; ++i) {
@@ -2469,9 +2469,9 @@ void HTMLSelectElementImpl::notifyOptionSelected(HTMLOptionElementImpl *selected
HTMLKeygenElementImpl::HTMLKeygenElementImpl(DocumentImpl* doc, HTMLFormElementImpl* f)
: HTMLSelectElementImpl(doc, f)
{
- const QStringList keys = KSSLKeyGen::supportedKeySizes();
- QStringList::ConstIterator i = keys.begin();
- const QStringList::ConstIterator iEnd = keys.end();
+ const TQStringList keys = KSSLKeyGen::supportedKeySizes();
+ TQStringList::ConstIterator i = keys.begin();
+ const TQStringList::ConstIterator iEnd = keys.end();
for ( ; i != iEnd; ++i) {
HTMLOptionElementImpl* const o = new HTMLOptionElementImpl(doc, form());
addChild(o);
@@ -2496,10 +2496,10 @@ void HTMLKeygenElementImpl::parseAttribute(AttributeImpl* attr)
}
}
-bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingList& encoded_values, bool)
+bool HTMLKeygenElementImpl::encoding(const TQTextCodec* codec, khtml::encodingList& encoded_values, bool)
{
bool successful = false;
- const QCString enc_name = fixUpfromUnicode(codec, name().string());
+ const TQCString enc_name = fixUpfromUnicode(codec, name().string());
encoded_values += enc_name;
@@ -2507,7 +2507,7 @@ bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
KSSLKeyGen* const kg = new KSSLKeyGen(getDocument()->view(), "Key Generator", true);
kg->setKeySize(0);
- successful = (QDialog::Accepted == kg->exec());
+ successful = (TQDialog::Accepted == kg->exec());
delete kg;
@@ -2559,7 +2559,7 @@ long HTMLOptionElementImpl::index() const
{
// Let's do this dynamically. Might be a bit slow, but we're sure
// we won't forget to update a member variable in some cases...
- QMemArray<HTMLGenericFormElementImpl*> items = getSelect()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = getSelect()->listItems();
const int l = items.count();
int optionIndex = 0;
for(int i = 0; i < l; ++i) {
@@ -2656,12 +2656,12 @@ DOMString HTMLTextAreaElementImpl::type() const
return "textarea";
}
-QString HTMLTextAreaElementImpl::state( )
+TQString HTMLTextAreaElementImpl::state( )
{
return value().string() + (m_unsubmittedFormChange ? 'M' : '.');
}
-void HTMLTextAreaElementImpl::restoreState(const QString &state)
+void HTMLTextAreaElementImpl::restoreState(const TQString &state)
{
setDefaultValue(state.left(state.length()-1));
m_unsubmittedFormChange = state.endsWith("M");
@@ -2742,7 +2742,7 @@ void HTMLTextAreaElementImpl::attach()
}
-static QString expandLF(const QString& s)
+static TQString expandLF(const TQString& s)
{
// LF -> CRLF
unsigned crs = s.contains( '\n' );
@@ -2750,12 +2750,12 @@ static QString expandLF(const QString& s)
return s;
unsigned len = s.length();
- QString r;
+ TQString r;
r.reserve(len + crs + 1);
unsigned pos2 = 0;
for(unsigned pos = 0; pos < len; pos++)
{
- QChar c = s.at(pos);
+ TQChar c = s.at(pos);
switch(c.unicode())
{
case '\n':
@@ -2776,7 +2776,7 @@ static QString expandLF(const QString& s)
}
-bool HTMLTextAreaElementImpl::encoding(const QTextCodec* codec, encodingList& encoding, bool)
+bool HTMLTextAreaElementImpl::encoding(const TQTextCodec* codec, encodingList& encoding, bool)
{
if (name().isEmpty()) return false;
@@ -2814,7 +2814,7 @@ DOMString HTMLTextAreaElementImpl::value()
void HTMLTextAreaElementImpl::setValue(DOMString _value)
{
// \r\n -> \n, \r -> \n
- QString str = _value.string().replace( "\r\n", "\n" );
+ TQString str = _value.string().replace( "\r\n", "\n" );
m_value = str.replace( '\r', '\n' );
m_dirtyvalue = false;
m_initialized = true;
@@ -2845,12 +2845,12 @@ DOMString HTMLTextAreaElementImpl::defaultValue()
void HTMLTextAreaElementImpl::setDefaultValue(DOMString _defaultValue)
{
// there may be comments - remove all the text nodes and replace them with one
- QPtrList<NodeImpl> toRemove;
+ TQPtrList<NodeImpl> toRemove;
NodeImpl *n;
for (n = firstChild(); n; n = n->nextSibling())
if (n->isTextNode())
toRemove.append(n);
- QPtrListIterator<NodeImpl> it(toRemove);
+ TQPtrListIterator<NodeImpl> it(toRemove);
int exceptioncode = 0;
for (; it.current(); ++it) {
removeChild(it.current(), exceptioncode);
diff --git a/khtml/html/html_formimpl.h b/khtml/html/html_formimpl.h
index f12821340..5fea3e221 100644
--- a/khtml/html/html_formimpl.h
+++ b/khtml/html/html_formimpl.h
@@ -29,10 +29,10 @@
#include "html/html_imageimpl.h"
#include "dom/html_element.h"
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qmemarray.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqmemarray.h>
class KHTMLView;
class QTextCodec;
@@ -46,7 +46,7 @@ namespace khtml
class RenderRadioButton;
class RenderFileButton;
- typedef QValueList<QCString> encodingList;
+ typedef TQValueList<TQCString> encodingList;
}
namespace KWallet {
@@ -72,13 +72,13 @@ public:
virtual void insertedIntoDocument();
virtual void removedFromDocument();
- virtual void addId(const QString& id);
- virtual void removeId(const QString& id);
+ virtual void addId(const TQString& id);
+ virtual void removeId(const TQString& id);
long length() const;
- QByteArray formData(bool& ok);
+ TQByteArray formData(bool& ok);
DOMString enctype() const { return m_enctype; }
void setEnctype( const DOMString & );
@@ -109,13 +109,13 @@ public:
private:
void gatherWalletData();
- QPtrList<HTMLGenericFormElementImpl> formElements;
- QPtrList<HTMLImageElementImpl> imgElements;
+ TQPtrList<HTMLGenericFormElementImpl> formElements;
+ TQPtrList<HTMLImageElementImpl> imgElements;
DOMString m_target;
DOMString m_enctype;
- QString m_boundary;
+ TQString m_boundary;
DOMString m_acceptcharset;
- QString m_encCharset;
+ TQString m_encCharset;
bool m_post : 1;
bool m_multipart : 1;
bool m_autocomplete : 1;
@@ -126,7 +126,7 @@ private:
bool m_haveTextarea : 1; // for wallet storage
bool m_havePassword : 1; // for wallet storage
DOMString m_name; // our name
- QMap<QString, QString> m_walletMap; // for wallet storage
+ TQMap<TQString, TQString> m_walletMap; // for wallet storage
};
// -------------------------------------------------------------------------
@@ -171,7 +171,7 @@ public:
* for submitting
* return true for a successful control (see HTML4-17.13.2)
*/
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool) { return false; }
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool) { return false; }
virtual void defaultEventHandler(EventImpl *evt);
virtual bool isEditable();
@@ -206,7 +206,7 @@ public:
typeEnum buttonType() const { return m_type; }
virtual void parseAttribute(AttributeImpl *attr);
virtual void defaultEventHandler(EventImpl *evt);
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool);
void activate();
virtual void attach();
void click();
@@ -215,7 +215,7 @@ public:
protected:
DOMString m_value;
- QString m_currValue;
+ TQString m_currValue;
typeEnum m_type : 2;
bool m_dirty : 1;
bool m_clicked : 1;
@@ -288,8 +288,8 @@ public:
void focus();
virtual bool maintainsState() { return true; }
- virtual QString state();
- virtual void restoreState(const QString &state);
+ virtual TQString state();
+ virtual void restoreState(const TQString &state);
void select();
void click();
@@ -297,7 +297,7 @@ public:
virtual void parseAttribute(AttributeImpl *attr);
virtual void attach();
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool);
typeEnum inputType() const { return m_type; }
virtual void reset();
@@ -411,8 +411,8 @@ public:
void setValue(DOMStringImpl* value);
virtual bool maintainsState() { return true; }
- virtual QString state();
- virtual void restoreState(const QString &state);
+ virtual TQString state();
+ virtual void restoreState(const TQString &state);
virtual NodeImpl *insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode );
virtual void replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode );
@@ -425,7 +425,7 @@ public:
virtual void parseAttribute(AttributeImpl *attr);
virtual void attach();
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool);
// get the actual listbox index of the optionIndexth option
int optionToListIndex(int optionIndex) const;
@@ -434,7 +434,7 @@ public:
void setRecalcListItems();
- QMemArray<HTMLGenericFormElementImpl*> listItems() const
+ TQMemArray<HTMLGenericFormElementImpl*> listItems() const
{
if (m_recalcListItems) const_cast<HTMLSelectElementImpl*>(this)->recalcListItems();
return m_listItems;
@@ -446,7 +446,7 @@ private:
void recalcListItems() const;
protected:
- mutable QMemArray<HTMLGenericFormElementImpl*> m_listItems;
+ mutable TQMemArray<HTMLGenericFormElementImpl*> m_listItems;
short m_minwidth;
signed short m_size : 15;
bool m_multiple : 1;
@@ -472,7 +472,7 @@ public:
virtual bool isEnumeratable() const { return false; }
virtual void parseAttribute(AttributeImpl *attr);
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool);
};
@@ -548,14 +548,14 @@ public:
DOMString type() const;
virtual bool maintainsState() { return true; }
- virtual QString state();
- virtual void restoreState(const QString &state);
+ virtual TQString state();
+ virtual void restoreState(const TQString &state);
void select ( );
virtual void parseAttribute(AttributeImpl *attr);
virtual void attach();
- virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
+ virtual bool encoding(const TQTextCodec*, khtml::encodingList&, bool);
virtual void reset();
DOMString value();
void setValue(DOMString _value);
@@ -578,7 +578,7 @@ protected:
int m_rows;
int m_cols;
WrapMethod m_wrap;
- QString m_value;
+ TQString m_value;
bool m_changed: 1; //States whether the contents has been editted
bool m_dirtyvalue: 1; //States whether m_value is out-of-date compared to the renderer or default
bool m_unsubmittedFormChange: 1;
diff --git a/khtml/html/html_headimpl.cpp b/khtml/html/html_headimpl.cpp
index 6808f27bf..d7154e936 100644
--- a/khtml/html/html_headimpl.cpp
+++ b/khtml/html/html_headimpl.cpp
@@ -80,7 +80,7 @@ void HTMLBaseElementImpl::removedFromDocument()
// Since the document doesn't have a base element...
// (This will break in the case of multiple base elements, but that's not valid anyway (?))
getDocument()->setBaseURL( KURL() );
- getDocument()->setBaseTarget( QString::null );
+ getDocument()->setBaseTarget( TQString::null );
}
void HTMLBaseElementImpl::process()
@@ -146,8 +146,8 @@ void HTMLLinkElementImpl::parseAttribute(AttributeImpl *attr)
m_alternate = false;
} else if (!m_alternate) {
// disabling: recheck alternate status
- QString rel = getAttribute(ATTR_REL).string().lower();
- QString type = getAttribute(ATTR_TYPE).string().lower();
+ TQString rel = getAttribute(ATTR_REL).string().lower();
+ TQString type = getAttribute(ATTR_TYPE).string().lower();
m_alternate = (type.contains("text/css") || rel.contains("stylesheet")) && rel.contains("alternate");
}
if (isLoading())
@@ -172,8 +172,8 @@ void HTMLLinkElementImpl::process()
if (!inDocument())
return;
- QString type = getAttribute(ATTR_TYPE).string().lower();
- QString rel = getAttribute(ATTR_REL).string().lower();
+ TQString type = getAttribute(ATTR_TYPE).string().lower();
+ TQString rel = getAttribute(ATTR_REL).string().lower();
KHTMLPart* part = getDocument()->view() ? getDocument()->view()->part() : 0;
@@ -195,7 +195,7 @@ void HTMLLinkElementImpl::process()
if (!isAlternate())
getDocument()->addPendingSheet();
- QString chset = getAttribute( ATTR_CHARSET ).string();
+ TQString chset = getAttribute( ATTR_CHARSET ).string();
// set chset to charset of referring document when attribute CHARSET is absent.
// http://www.w3.org/TR/CSS21/syndata.html(4.4)
if (chset.isEmpty() && part) chset = part->encoding();
@@ -263,7 +263,7 @@ void HTMLLinkElementImpl::finished()
getDocument()->updateStyleSelector();
}
-void HTMLLinkElementImpl::error( int, const QString& )
+void HTMLLinkElementImpl::error( int, const TQString& )
{
finished();
}
@@ -362,9 +362,9 @@ void HTMLScriptElementImpl::insertedIntoDocument()
if (m_createdByParser)
return;
- QString url = getAttribute(ATTR_SRC).string();
+ TQString url = getAttribute(ATTR_SRC).string();
if (!url.isEmpty()) {
- QString charset = getAttribute(ATTR_CHARSET).string();
+ TQString charset = getAttribute(ATTR_CHARSET).string();
m_cachedScript = getDocument()->docLoader()->requestScript(DOMString(url), charset);
if (m_cachedScript)
m_cachedScript->ref(this);
@@ -395,7 +395,7 @@ void HTMLScriptElementImpl::notifyFinished(CachedObject* o)
assert(cs == m_cachedScript);
- QString URL = cs->url().string();
+ TQString URL = cs->url().string();
DOMString script = cs->script();
cs->deref(this);
m_cachedScript = 0;
@@ -403,7 +403,7 @@ void HTMLScriptElementImpl::notifyFinished(CachedObject* o)
evaluateScript(URL, script);
}
-void HTMLScriptElementImpl::evaluateScript(const QString &URL, const DOMString &script)
+void HTMLScriptElementImpl::evaluateScript(const TQString &URL, const DOMString &script)
{
if (m_evaluated)
return;
diff --git a/khtml/html/html_headimpl.h b/khtml/html/html_headimpl.h
index 3fa72c928..d22f64434 100644
--- a/khtml/html/html_headimpl.h
+++ b/khtml/html/html_headimpl.h
@@ -92,7 +92,7 @@ public:
// from CachedObjectClient
virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet, const DOM::DOMString &charset);
- virtual void error(int err, const QString &text);
+ virtual void error(int err, const TQString &text);
bool isLoading() const;
void sheetLoaded();
@@ -107,7 +107,7 @@ protected:
khtml::CachedCSSStyleSheet *m_cachedSheet;
CSSStyleSheetImpl *m_sheet;
DOMString m_url;
- QString m_media;
+ TQString m_media;
bool m_isDisabled : 1;
bool m_loading : 1;
bool m_alternate : 1;
@@ -151,7 +151,7 @@ public:
void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; }
- void evaluateScript(const QString &, const DOMString &);
+ void evaluateScript(const TQString &, const DOMString &);
DOMString text() const;
void setText( const DOMString& str );
@@ -205,7 +205,7 @@ public:
protected:
CSSStyleSheetImpl *m_sheet;
DOMString m_type;
- QString m_media;
+ TQString m_media;
bool m_loading;
};
diff --git a/khtml/html/html_imageimpl.cpp b/khtml/html/html_imageimpl.cpp
index 1c755920b..be13e93c2 100644
--- a/khtml/html/html_imageimpl.cpp
+++ b/khtml/html/html_imageimpl.cpp
@@ -40,12 +40,12 @@
#include "css/csshelper.h"
#include "xml/dom2_eventsimpl.h"
-#include <qstring.h>
-#include <qpoint.h>
-#include <qregion.h>
-#include <qptrstack.h>
-#include <qimage.h>
-#include <qpointarray.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqregion.h>
+#include <tqptrstack.h>
+#include <tqimage.h>
+#include <tqpointarray.h>
using namespace DOM;
using namespace khtml;
@@ -147,7 +147,7 @@ void HTMLImageElementImpl::parseAttribute(AttributeImpl *attr)
if ( attr->value()[0] == '#' )
usemap = attr->value().lower();
else {
- QString url = getDocument()->completeURL( khtml::parseURL( attr->value() ).string() );
+ TQString url = getDocument()->completeURL( khtml::parseURL( attr->value() ).string() );
// ### we remove the part before the anchor and hope
// the map is on the same html page....
usemap = url;
@@ -212,7 +212,7 @@ DOMString HTMLImageElementImpl::altText() const
alt = getAttribute( ATTR_TITLE );
#if 0
if ( alt.isNull() ) {
- QString p = KURL( getDocument()->completeURL( getAttribute(ATTR_SRC).string() ) ).prettyURL();
+ TQString p = KURL( getDocument()->completeURL( getAttribute(ATTR_SRC).string() ) ).prettyURL();
int pos;
if ( ( pos = p.findRev( '.' ) ) > 0 )
p.truncate( pos );
@@ -257,13 +257,13 @@ void HTMLImageElementImpl::insertedIntoDocument()
HTMLElementImpl::insertedIntoDocument();
}
-void HTMLImageElementImpl::removeId(const QString& id)
+void HTMLImageElementImpl::removeId(const TQString& id)
{
getDocument()->underDocNamedCache().remove(id, this);
HTMLElementImpl::removeId(id);
}
-void HTMLImageElementImpl::addId (const QString& id)
+void HTMLImageElementImpl::addId (const TQString& id)
{
getDocument()->underDocNamedCache().add(id, this);
HTMLElementImpl::addId(id);
@@ -316,24 +316,24 @@ long HTMLImageElementImpl::height() const
getAttribute(ATTR_HEIGHT).toInt();
}
-QImage HTMLImageElementImpl::currentImage() const
+TQImage HTMLImageElementImpl::currentImage() const
{
RenderImage *r = static_cast<RenderImage*>(renderer());
if(r)
return r->pixmap().convertToImage();
- return QImage();
+ return TQImage();
}
-QPixmap HTMLImageElementImpl::currentPixmap() const
+TQPixmap HTMLImageElementImpl::currentPixmap() const
{
RenderImage *r = static_cast<RenderImage*>(renderer());
if(r)
return r->pixmap();
- return QPixmap();
+ return TQPixmap();
}
bool HTMLImageElementImpl::complete() const
@@ -365,7 +365,7 @@ HTMLMapElementImpl::mapMouseEvent(int x_, int y_, int width_, int height_,
{
//cout << "map:mapMouseEvent " << endl;
//cout << x_ << " " << y_ <<" "<< width_ <<" "<< height_ << endl;
- QPtrStack<NodeImpl> nodeStack;
+ TQPtrStack<NodeImpl> nodeStack;
NodeImpl *current = firstChild();
while(1)
@@ -410,7 +410,7 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr)
}
else {
// add name with full url:
- QString url = getDocument()->completeURL( khtml::parseURL( attr->value() ).string() );
+ TQString url = getDocument()->completeURL( khtml::parseURL( attr->value() ).string() );
if(getDocument()->isHTMLDocument())
static_cast<HTMLDocumentImpl*>(getDocument())->mapMap[url] = this;
}
@@ -419,7 +419,7 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr)
{
DOMString s = attr->value();
if(*s.unicode() == '#')
- name = QString(s.unicode()+1, s.length()-1).lower();
+ name = TQString(s.unicode()+1, s.length()-1).lower();
else
name = s.string().lower();
// ### make this work for XML documents, e.g. in case of <html:map...>
@@ -497,7 +497,7 @@ bool HTMLAreaElementImpl::mapMouseEvent(int x_, int y_, int width_, int height_,
region=getRegion(width_, height_);
lastw=width_; lasth=height_;
}
- if (region.contains(QPoint(x_,y_)))
+ if (region.contains(TQPoint(x_,y_)))
{
inside = true;
info.setInnerNode(this);
@@ -507,21 +507,21 @@ bool HTMLAreaElementImpl::mapMouseEvent(int x_, int y_, int width_, int height_,
return inside;
}
-QRect HTMLAreaElementImpl::getRect() const
+TQRect HTMLAreaElementImpl::getRect() const
{
if (parentNode()->renderer()==0)
- return QRect();
+ return TQRect();
int dx, dy;
if (!parentNode()->renderer()->absolutePosition(dx, dy))
- return QRect();
- QRegion region = getRegion(lastw,lasth);
+ return TQRect();
+ TQRegion region = getRegion(lastw,lasth);
region.translate(dx, dy);
return region.boundingRect();
}
-QRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const
+TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const
{
- QRegion region;
+ TQRegion region;
if (!m_coords)
return region;
@@ -533,26 +533,26 @@ QRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const
if ((shape==Poly || shape==Unknown) && m_coordsLen > 5) {
// make sure its even
int len = m_coordsLen >> 1;
- QPointArray points(len);
+ TQPointArray points(len);
for (int i = 0; i < len; ++i)
points.setPoint(i, m_coords[(i<<1)].minWidth(width_),
m_coords[(i<<1)+1].minWidth(height_));
- region = QRegion(points);
+ region = TQRegion(points);
}
else if (shape==Circle && m_coordsLen>=3 || shape==Unknown && m_coordsLen == 3) {
int r = kMin(m_coords[2].minWidth(width_), m_coords[2].minWidth(height_));
- region = QRegion(m_coords[0].minWidth(width_)-r,
- m_coords[1].minWidth(height_)-r, 2*r, 2*r,QRegion::Ellipse);
+ region = TQRegion(m_coords[0].minWidth(width_)-r,
+ m_coords[1].minWidth(height_)-r, 2*r, 2*r,TQRegion::Ellipse);
}
else if (shape==Rect && m_coordsLen>=4 || shape==Unknown && m_coordsLen == 4) {
int x0 = m_coords[0].minWidth(width_);
int y0 = m_coords[1].minWidth(height_);
int x1 = m_coords[2].minWidth(width_);
int y1 = m_coords[3].minWidth(height_);
- region = QRegion(x0,y0,x1-x0,y1-y0);
+ region = TQRegion(x0,y0,x1-x0,y1-y0);
}
else if (shape==Default)
- region = QRegion(0,0,width_,height_);
+ region = TQRegion(0,0,width_,height_);
// else
// return null region
diff --git a/khtml/html/html_imageimpl.h b/khtml/html/html_imageimpl.h
index 8fc00b027..6f26cd2df 100644
--- a/khtml/html/html_imageimpl.h
+++ b/khtml/html/html_imageimpl.h
@@ -28,7 +28,7 @@
#include "misc/loader_client.h"
#include "rendering/render_object.h"
-#include <qregion.h>
+#include <tqregion.h>
namespace DOM {
@@ -50,8 +50,8 @@ public:
virtual void attach();
virtual void removedFromDocument();
virtual void insertedIntoDocument();
- virtual void addId(const QString& id);
- virtual void removeId(const QString& id);
+ virtual void addId(const TQString& id);
+ virtual void removeId(const TQString& id);
long width() const;
@@ -62,11 +62,11 @@ public:
* This has to convert the pixmap into an image first.
* This will return undefined results if complete() is not true.
*/
- QImage currentImage() const;
+ TQImage currentImage() const;
/** Return the pixmap for this element.
* This will return undefined results if complete() is not true.
*/
- QPixmap currentPixmap() const;
+ TQPixmap currentPixmap() const;
DOMString altText() const;
@@ -107,13 +107,13 @@ public:
bool mapMouseEvent(int x_, int y_, int width_, int height_,
khtml::RenderObject::NodeInfo& info);
- virtual QRect getRect() const;
+ virtual TQRect getRect() const;
- QRegion cachedRegion() const { return region; }
+ TQRegion cachedRegion() const { return region; }
protected:
- QRegion getRegion(int width_, int height) const;
- QRegion region;
+ TQRegion getRegion(int width_, int height) const;
+ TQRegion region;
khtml::Length* m_coords;
int m_coordsLen;
int lastw, lasth;
@@ -141,7 +141,7 @@ public:
khtml::RenderObject::NodeInfo& info);
private:
- QString name;
+ TQString name;
};
diff --git a/khtml/html/html_inlineimpl.cpp b/khtml/html/html_inlineimpl.cpp
index 08bbbb177..600c23d59 100644
--- a/khtml/html/html_inlineimpl.cpp
+++ b/khtml/html/html_inlineimpl.cpp
@@ -67,8 +67,8 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
if (keydown)
k = static_cast<KeyEventBaseImpl *>( evt );
- QString utarget;
- QString url;
+ TQString utarget;
+ TQString url;
if ( e && e->button() == 2 ) {
HTMLElementImpl::defaultEventHandler(evt);
return;
@@ -108,7 +108,7 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
y += v->contentsY();
}
r->absolutePosition(absx, absy);
- url += QString("?%1,%2").arg( x - absx ).arg( y - absy );
+ url += TQString("?%1,%2").arg( x - absx ).arg( y - absy );
}
else {
evt->setDefaultHandled();
@@ -166,7 +166,7 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
void HTMLAnchorElementImpl::click()
{
- QMouseEvent me(QEvent::MouseButtonRelease, QPoint(0,0),Qt::LeftButton, 0);
+ TQMouseEvent me(TQEvent::MouseButtonRelease, TQPoint(0,0),Qt::LeftButton, 0);
dispatchMouseEvent(&me,EventImpl::CLICK_EVENT, 1);
}
@@ -254,7 +254,7 @@ void HTMLFontElementImpl::parseAttribute(AttributeImpl *attr)
{
DOMStringImpl* v = attr->val();
if(v) {
- const QChar* s = v->s;
+ const TQChar* s = v->s;
int num = v->toInt();
int len = v->l;
while( len && s->isSpace() )
diff --git a/khtml/html/html_miscimpl.cpp b/khtml/html/html_miscimpl.cpp
index bf0c56e00..58804bff5 100644
--- a/khtml/html/html_miscimpl.cpp
+++ b/khtml/html/html_miscimpl.cpp
@@ -54,7 +54,7 @@ struct CollectionCache: public NodeListImpl::Cache
{
static Cache* make() { return new CollectionCache; }
- QDict<QValueList<NodeImpl*> > nameCache;
+ TQDict<TQValueList<NodeImpl*> > nameCache;
CollectionCache(): nameCache(127)
{
@@ -282,19 +282,19 @@ NodeImpl *HTMLCollectionImpl::nextNamedItem( const DOMString &name ) const
return 0;
}
-QValueList<NodeImpl*> HTMLCollectionImpl::namedItems( const DOMString &name ) const
+TQValueList<NodeImpl*> HTMLCollectionImpl::namedItems( const DOMString &name ) const
{
- QString key = name.string();
+ TQString key = name.string();
//We use a work-conserving design for the name cache presently -- only
//remember stuff about elements we were asked for.
m_cache->updateNodeListInfo(m_refNode->getDocument());
CollectionCache* cache = static_cast<CollectionCache*>(m_cache);
- if (QValueList<NodeImpl*>* info = cache->nameCache.find(key)) {
+ if (TQValueList<NodeImpl*>* info = cache->nameCache.find(key)) {
return *info;
}
else {
- QValueList<NodeImpl*>* newInfo = new QValueList<NodeImpl*>;
+ TQValueList<NodeImpl*>* newInfo = new TQValueList<NodeImpl*>;
NodeImpl* match = namedItem(name);
while (match) {
@@ -325,7 +325,7 @@ NodeImpl *HTMLFormCollectionImpl::item( unsigned long index ) const
strt = m_cache->current.index;
}
- QPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements;
+ TQPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements;
for (unsigned i = strt; i < l.count(); i++)
{
if (l.at( i )->isEnumeratable())
@@ -347,7 +347,7 @@ NodeImpl *HTMLFormCollectionImpl::item( unsigned long index ) const
unsigned long HTMLFormCollectionImpl::calcLength(NodeImpl *start) const
{
unsigned length = 0;
- QPtrList<HTMLGenericFormElementImpl> l = static_cast<HTMLFormElementImpl*>( start )->formElements;
+ TQPtrList<HTMLGenericFormElementImpl> l = static_cast<HTMLFormElementImpl*>( start )->formElements;
for ( unsigned i = 0; i < l.count(); i++ )
if ( l.at( i )->isEnumeratable() )
++length;
@@ -364,7 +364,7 @@ NodeImpl *HTMLFormCollectionImpl::namedItem( const DOMString &name ) const
NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
{
- QPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements;
+ TQPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements;
//Go through the list, trying to find the appropriate named form element.
for ( ; currentNamePos < l.count(); ++currentNamePos )
@@ -384,7 +384,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
//but only if no input tags were matched
if (foundInput) return 0;
- QPtrList<HTMLImageElementImpl>& il = static_cast<HTMLFormElementImpl*>( m_refNode )->imgElements;
+ TQPtrList<HTMLImageElementImpl>& il = static_cast<HTMLFormElementImpl*>( m_refNode )->imgElements;
for ( ; currentNameImgPos < il.count(); ++currentNameImgPos )
{
HTMLImageElementImpl* el = il.at(currentNameImgPos);
diff --git a/khtml/html/html_miscimpl.h b/khtml/html/html_miscimpl.h
index beff1fe7d..b28fef82a 100644
--- a/khtml/html/html_miscimpl.h
+++ b/khtml/html/html_miscimpl.h
@@ -23,7 +23,7 @@
#ifndef HTML_MISCIMPL_H
#define HTML_MISCIMPL_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "html_elementimpl.h"
#include "misc/shared.h"
@@ -87,7 +87,7 @@ public:
// In case of multiple items named the same way
virtual NodeImpl *nextNamedItem( const DOMString &name ) const;
- QValueList<NodeImpl*> namedItems( const DOMString &name ) const;
+ TQValueList<NodeImpl*> namedItems( const DOMString &name ) const;
int getType() const {
return type;
diff --git a/khtml/html/html_objectimpl.cpp b/khtml/html/html_objectimpl.cpp
index 8a60ba41f..106a862e9 100644
--- a/khtml/html/html_objectimpl.cpp
+++ b/khtml/html/html_objectimpl.cpp
@@ -26,10 +26,10 @@
#include "dom/dom_string.h"
#include "misc/htmlhashes.h"
#include "khtmlview.h"
-#include <qstring.h>
-#include <qvariant.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kimageio.h>
@@ -55,7 +55,7 @@ HTMLObjectBaseElementImpl::HTMLObjectBaseElementImpl(DocumentImpl *doc)
m_renderAlternative = false;
}
-void HTMLObjectBaseElementImpl::setServiceType(const QString & val) {
+void HTMLObjectBaseElementImpl::setServiceType(const TQString & val) {
serviceType = val.lower();
int pos = serviceType.find( ";" );
if ( pos!=-1 )
@@ -70,7 +70,7 @@ void HTMLObjectBaseElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_CODETYPE:
if (attr->val()) {
DOM::DOMStringImpl *stringImpl = attr->val();
- QString val = QConstString( stringImpl->s, stringImpl->l ).string();
+ TQString val = TQConstString( stringImpl->s, stringImpl->l ).string();
setServiceType( val );
needWidgetUpdate = true;
}
@@ -111,13 +111,13 @@ void HTMLObjectBaseElementImpl::insertedIntoDocument()
HTMLElementImpl::insertedIntoDocument();
}
-void HTMLObjectBaseElementImpl::removeId(const QString& id)
+void HTMLObjectBaseElementImpl::removeId(const TQString& id)
{
getDocument()->underDocNamedCache().remove(id, this);
HTMLElementImpl::removeId(id);
}
-void HTMLObjectBaseElementImpl::addId (const QString& id)
+void HTMLObjectBaseElementImpl::addId (const TQString& id)
{
getDocument()->underDocNamedCache().add(id, this);
HTMLElementImpl::addId(id);
@@ -136,7 +136,7 @@ void HTMLObjectBaseElementImpl::recalcStyle( StyleChange ch )
void HTMLObjectBaseElementImpl::renderAlternative()
{
if ( m_renderAlternative ) return;
- QTimer::singleShot( 0, this, SLOT( slotRenderAlternative() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRenderAlternative() ) );
}
void HTMLObjectBaseElementImpl::slotRenderAlternative()
@@ -421,7 +421,7 @@ DocumentImpl* HTMLObjectElementImpl::contentDocument() const
{
if ( !m_render ) return 0;
if ( !m_render->isWidget() ) return 0;
- QWidget* widget = static_cast<RenderWidget*>( m_render )->widget();
+ TQWidget* widget = static_cast<RenderWidget*>( m_render )->widget();
if( widget && ::qt_cast<KHTMLView*>( widget ) )
return static_cast<KHTMLView*>( widget )->part()->xmlDocImpl();
return 0;
diff --git a/khtml/html/html_objectimpl.h b/khtml/html/html_objectimpl.h
index a33786442..4204e6ef3 100644
--- a/khtml/html/html_objectimpl.h
+++ b/khtml/html/html_objectimpl.h
@@ -25,8 +25,8 @@
#include "html_elementimpl.h"
#include "xml/dom_stringimpl.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KHTMLView;
@@ -36,7 +36,7 @@ namespace DOM {
class HTMLFormElementImpl;
class DOMStringImpl;
-class HTMLObjectBaseElementImpl : public QObject, public HTMLElementImpl
+class HTMLObjectBaseElementImpl : public TQObject, public HTMLElementImpl
{
Q_OBJECT
public:
@@ -49,18 +49,18 @@ public:
void renderAlternative();
- void setServiceType(const QString &);
+ void setServiceType(const TQString &);
- QString url;
- QString classId;
- QString serviceType;
+ TQString url;
+ TQString classId;
+ TQString serviceType;
bool needWidgetUpdate;
bool m_renderAlternative;
virtual void insertedIntoDocument();
virtual void removedFromDocument();
- virtual void addId(const QString& id);
- virtual void removeId(const QString& id);
+ virtual void addId(const TQString& id);
+ virtual void removeId(const TQString& id);
protected slots:
void slotRenderAlternative();
protected:
@@ -97,7 +97,7 @@ public:
virtual void parseAttribute(AttributeImpl *attr);
virtual void attach();
- QString pluginPage;
+ TQString pluginPage;
bool hidden;
};
@@ -133,12 +133,12 @@ public:
virtual void parseAttribute(AttributeImpl *token);
- QString name() const { return m_name; }
- QString value() const { return m_value; }
+ TQString name() const { return m_name; }
+ TQString value() const { return m_value; }
protected:
- QString m_name;
- QString m_value;
+ TQString m_name;
+ TQString m_value;
};
} // namespace
diff --git a/khtml/html/html_tableimpl.cpp b/khtml/html/html_tableimpl.cpp
index 3d11c5e98..2c2e6567d 100644
--- a/khtml/html/html_tableimpl.cpp
+++ b/khtml/html/html_tableimpl.cpp
@@ -434,7 +434,7 @@ void HTMLTableElementImpl::parseAttribute(AttributeImpl *attr)
#ifdef DEBUG_DRAW_BORDER
border=1;
#endif
- DOMString v = QString::number( border );
+ DOMString v = TQString::number( border );
addCSSLength(CSS_PROP_BORDER_WIDTH, v );
// wanted by HTML4 specs
@@ -464,7 +464,7 @@ void HTMLTableElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_BACKGROUND:
{
if (!attr->value().isEmpty()) {
- QString url = khtml::parseURL( attr->value() ).string();
+ TQString url = khtml::parseURL( attr->value() ).string();
url = getDocument()->completeURL( url );
addCSSProperty(CSS_PROP_BACKGROUND_IMAGE, "url('"+url+"')" );
}
@@ -604,7 +604,7 @@ void HTMLTablePartElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_BACKGROUND:
{
if (attr->val()) {
- QString url = khtml::parseURL( attr->value() ).string();
+ TQString url = khtml::parseURL( attr->value() ).string();
url = getDocument()->completeURL( url );
addCSSProperty(CSS_PROP_BACKGROUND_IMAGE, "url('"+url+"')" );
}
diff --git a/khtml/html/htmlparser.cpp b/khtml/html/htmlparser.cpp
index 1fe79f9e0..703186689 100644
--- a/khtml/html/htmlparser.cpp
+++ b/khtml/html/htmlparser.cpp
@@ -242,7 +242,7 @@ void KHTMLParser::parseToken(Token *t)
current->id() != ID_SCRIPT &&
!t->text->containsOnlyWhitespace()) haveContent = true;
#ifdef PARSER_DEBUG
- kdDebug(6035) << "length="<< t->text->l << " text='" << QConstString(t->text->s, t->text->l).string() << "'" << endl;
+ kdDebug(6035) << "length="<< t->text->l << " text='" << TQConstString(t->text->s, t->text->l).string() << "'" << endl;
#endif
}
@@ -346,7 +346,7 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
n->attach();
if (n->maintainsState()) {
document->registerMaintainsState(n);
- QString state(document->nextState());
+ TQString state(document->nextState());
if (!state.isNull()) n->restoreState(state);
}
n->close();
@@ -1043,7 +1043,7 @@ NodeImpl *KHTMLParser::getElement(Token* t)
KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()&&
KHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled())
{
- QString url = doc()->completeURL( khtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() );
+ TQString url = doc()->completeURL( khtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() );
if (KHTMLFactory::defaultHTMLSettings()->isAdFiltered(url))
return 0;
}
@@ -1636,7 +1636,7 @@ void KHTMLParser::popOneBlock(bool delBlock)
if((Elem->node != current)) {
if (current->maintainsState() && document){
document->registerMaintainsState(current);
- QString state(document->nextState());
+ TQString state(document->nextState());
if (!state.isNull()) current->restoreState(state);
}
current->close();
diff --git a/khtml/html/htmlparser.h b/khtml/html/htmlparser.h
index e09eefbae..ea1db2ee0 100644
--- a/khtml/html/htmlparser.h
+++ b/khtml/html/htmlparser.h
@@ -35,7 +35,7 @@
#define SPEED_DEBUG 0
#ifdef SPEED_DEBUG
-#include <qdatetime.h>
+#include <tqdatetime.h>
#endif
@@ -181,7 +181,7 @@ private:
int inStrayTableContent;
#if SPEED_DEBUG > 0
- QTime qt;
+ TQTime qt;
#endif
};
diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp
index e0983582a..5da6edd14 100644
--- a/khtml/html/htmltokenizer.cpp
+++ b/khtml/html/htmltokenizer.cpp
@@ -53,7 +53,7 @@
#include <kglobal.h>
#include <ctype.h>
#include <assert.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <stdlib.h>
@@ -61,7 +61,7 @@
using namespace khtml;
-static const QChar commentStart [] = { '<','!','-','-', QChar::null };
+static const TQChar commentStart [] = { '<','!','-','-', TQChar::null };
static const char scriptEnd [] = "</script";
static const char xmpEnd [] = "</xmp";
@@ -69,8 +69,8 @@ static const char styleEnd [] = "</style";
static const char textareaEnd [] = "</textarea";
static const char titleEnd [] = "</title";
-#define KHTML_ALLOC_QCHAR_VEC( N ) (QChar*) malloc( sizeof(QChar)*( N ) )
-#define KHTML_REALLOC_QCHAR_VEC(P, N ) (QChar*) realloc(P, sizeof(QChar)*( N ))
+#define KHTML_ALLOC_QCHAR_VEC( N ) (TQChar*) malloc( sizeof(TQChar)*( N ) )
+#define KHTML_REALLOC_QCHAR_VEC(P, N ) (TQChar*) realloc(P, sizeof(TQChar)*( N ))
#define KHTML_DELETE_QCHAR_VEC( P ) free((char*)( P ))
// Full support for MS Windows extensions to Latin-1.
@@ -316,7 +316,7 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src)
while ( !src.isEmpty() ) {
checkScriptBuffer();
unsigned char ch = src->latin1();
- if ( !scriptCodeResync && !brokenComments && !textarea && !xmp && ch == '-' && scriptCodeSize >= 3 && !src.escaped() && QConstString( scriptCode+scriptCodeSize-3, 3 ).string() == "<!-" ) {
+ if ( !scriptCodeResync && !brokenComments && !textarea && !xmp && ch == '-' && scriptCodeSize >= 3 && !src.escaped() && TQConstString( scriptCode+scriptCodeSize-3, 3 ).string() == "<!-" ) {
comment = true;
scriptCode[ scriptCodeSize++ ] = ch;
++src;
@@ -347,7 +347,7 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src)
// possible end of tagname, lets check.
if ( !scriptCodeResync && !escaped && !src.escaped() && ( ch == '>' || ch == '/' || ch <= ' ' ) && ch &&
scriptCodeSize >= searchStopperLen &&
- !QConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().find( searchStopper, 0, false )) {
+ !TQConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().find( searchStopper, 0, false )) {
scriptCodeResync = scriptCodeSize-searchStopperLen+1;
tquote = NoQuote;
continue;
@@ -362,7 +362,7 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src)
}
escaped = ( !escaped && ch == '\\' );
if (!scriptCodeResync && (textarea||title) && !src.escaped() && ch == '&') {
- QChar *scriptCodeDest = scriptCode+scriptCodeSize;
+ TQChar *scriptCodeDest = scriptCode+scriptCodeSize;
++src;
parseEntity(src,scriptCodeDest,true);
scriptCodeSize = scriptCodeDest-scriptCode;
@@ -376,11 +376,11 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src)
void HTMLTokenizer::scriptHandler()
{
- QString currentScriptSrc = scriptSrc;
- scriptSrc = QString::null;
+ TQString currentScriptSrc = scriptSrc;
+ scriptSrc = TQString::null;
processListing(TokenizerString(scriptCode, scriptCodeSize));
- QString exScript( buffer, dest-buffer );
+ TQString exScript( buffer, dest-buffer );
processToken();
currToken.tid = ID_SCRIPT + ID_CLOSE_TAG;
@@ -413,7 +413,7 @@ void HTMLTokenizer::scriptHandler()
pendingQueue.push(src);
setSrc(TokenizerString());
scriptCodeSize = scriptCodeResync = 0;
- scriptExecution( exScript, QString::null, tagStartLineno /*scriptStartLineno*/ );
+ scriptExecution( exScript, TQString::null, tagStartLineno /*scriptStartLineno*/ );
} else {
// script was filtered or disallowed
effectiveScript = false;
@@ -436,13 +436,13 @@ void HTMLTokenizer::scriptHandler()
}
}
-void HTMLTokenizer::scriptExecution( const QString& str, const QString& scriptURL,
+void HTMLTokenizer::scriptExecution( const TQString& str, const TQString& scriptURL,
int baseLine)
{
bool oldscript = script;
m_executingScript++;
script = false;
- QString url;
+ TQString url;
if (scriptURL.isNull() && view)
url = static_cast<DocumentImpl*>(view->part()->document().handle())->URL().url();
else
@@ -596,7 +596,7 @@ void HTMLTokenizer::parseText(TokenizerString &src)
}
-void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
+void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start)
{
if( start )
{
@@ -642,7 +642,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
int uc = EntityChar.unicode();
int ll = kMin<uint>(src.length(), 8);
while(ll--) {
- QChar csrc(src->lower());
+ TQChar csrc(src->lower());
cc = csrc.cell();
if(csrc.row() || !((cc >= '0' && cc <= '9') || (cc >= 'a' && cc <= 'f'))) {
@@ -652,7 +652,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
cBuffer[cBufferPos++] = cc;
++src;
}
- EntityChar = QChar(uc);
+ EntityChar = TQChar(uc);
Entity = SearchSemicolon;
break;
}
@@ -672,7 +672,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
cBuffer[cBufferPos++] = cc;
++src;
}
- EntityChar = QChar(uc);
+ EntityChar = TQChar(uc);
if(cBufferPos == 9) Entity = SearchSemicolon;
break;
}
@@ -680,7 +680,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
{
int ll = kMin(src.length(), 9-cBufferPos);
while(ll--) {
- QChar csrc = *src;
+ TQChar csrc = *src;
cc = csrc.cell();
if(csrc.row() || !((cc >= 'a' && cc <= 'z') ||
@@ -729,7 +729,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
checkBuffer();
if (entityLen > 0 && entityLen < cBufferPos) {
int rem = cBufferPos - entityLen;
- src.prepend( TokenizerString(QString::fromAscii(cBuffer+entityLen, rem)) );
+ src.prepend( TokenizerString(TQString::fromAscii(cBuffer+entityLen, rem)) );
}
src.push( EntityChar );
} else {
@@ -747,7 +747,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, QChar *&dest, bool start)
}
Entity = NoEntity;
- EntityChar = QChar::null;
+ EntityChar = TQChar::null;
return;
};
}
@@ -848,7 +848,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
uint tagID = khtml::getTagID(ptr, len);
if (!tagID) {
#ifdef TOKEN_DEBUG
- QCString tmp(ptr, len+1);
+ TQCString tmp(ptr, len+1);
kdDebug( 6036 ) << "Unknown tag: \"" << tmp.data() << "\"" << endl;
#endif
dest = buffer;
@@ -856,7 +856,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
else
{
#ifdef TOKEN_DEBUG
- QCString tmp(ptr, len+1);
+ TQCString tmp(ptr, len+1);
kdDebug( 6036 ) << "found tag id=" << tagID << ": " << tmp.data() << endl;
#endif
currToken.tid = beginTag ? tagID : tagID + ID_CLOSE_TAG;
@@ -883,7 +883,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
{
tag = SearchValue;
*dest++ = 0;
- attrName = QString::null;
+ attrName = TQString::null;
}
else
tag = AttributeName;
@@ -919,16 +919,16 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
a = khtml::getAttrID(cBuffer, cBufferPos-1);
}
if (!a)
- attrName = QString::fromLatin1(QCString(cBuffer, cBufferPos+1).data());
+ attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data());
}
dest = buffer;
*dest++ = a;
#ifdef TOKEN_DEBUG
if (!a || (cBufferPos && *cBuffer == '!'))
- kdDebug( 6036 ) << "Unknown attribute: *" << QCString(cBuffer, cBufferPos+1).data() << "*" << endl;
+ kdDebug( 6036 ) << "Unknown attribute: *" << TQCString(cBuffer, cBufferPos+1).data() << "*" << endl;
else
- kdDebug( 6036 ) << "Known attribute: " << QCString(cBuffer, cBufferPos+1).data() << endl;
+ kdDebug( 6036 ) << "Known attribute: " << TQCString(cBuffer, cBufferPos+1).data() << endl;
#endif
tag = SearchEqual;
@@ -941,7 +941,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
}
if ( cBufferPos == CBUFLEN ) {
cBuffer[cBufferPos] = '\0';
- attrName = QString::fromLatin1(QCString(cBuffer, cBufferPos+1).data());
+ attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data());
dest = buffer;
*dest++ = 0;
tag = SearchEqual;
@@ -969,7 +969,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
{
tag = SearchValue;
*dest++ = 0;
- attrName = QString::null;
+ attrName = TQString::null;
}
else {
DOMString v("");
@@ -1120,7 +1120,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
else if ( !brokenScript && tagID == ID_SCRIPT ) {
DOMStringImpl* a = 0;
bool foundTypeAttribute = false;
- scriptSrc = scriptSrcCharset = QString::null;
+ scriptSrc = scriptSrcCharset = TQString::null;
if ( currToken.attrs && /* potentially have a ATTR_SRC ? */
view && /* are we a regular tokenizer or just for innerHTML ? */
parser->doc()->view()->part()->jScriptEnabled() /* jscript allowed at all? */
@@ -1148,7 +1148,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
Mozilla 1.5 and WinIE 6 both accept the empty string, but neither accept a whitespace-only string.
We want to accept all the values that either of these browsers accept, but not other values.
*/
- QString type = DOMString(a).string().stripWhiteSpace().lower();
+ TQString type = DOMString(a).string().stripWhiteSpace().lower();
if( type.compare("text/javascript") != 0 &&
type.compare("text/javascript1.0") != 0 &&
type.compare("text/javascript1.1") != 0 &&
@@ -1171,7 +1171,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
Neither Mozilla 1.5 nor WinIE 6 accept leading or trailing whitespace.
We want to accept all the values that either of these browsers accept, but not other values.
*/
- QString lang = DOMString(a).string();
+ TQString lang = DOMString(a).string();
lang = lang.lower();
if( lang.compare("") != 0 &&
lang.compare("javascript") != 0 &&
@@ -1284,7 +1284,7 @@ void HTMLTokenizer::addPending()
{
case SpacePending:
// Insert a breaking space
- *dest++ = QChar(' ');
+ *dest++ = TQChar(' ');
prePos++;
break;
@@ -1297,7 +1297,7 @@ void HTMLTokenizer::addPending()
case TabPending:
p = TAB_SIZE - ( prePos % TAB_SIZE );
for ( int x = 0; x < p; x++ )
- *dest++ = QChar(' ');
+ *dest++ = TQChar(' ');
prePos += p;
break;
@@ -1552,7 +1552,7 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData )
end(); // this actually causes us to be deleted
}
-void HTMLTokenizer::timerEvent( QTimerEvent *e )
+void HTMLTokenizer::timerEvent( TQTimerEvent *e )
{
if ( e->timerId() == m_autoCloseTimer && cachedScript.isEmpty() ) {
finish();
@@ -1610,15 +1610,15 @@ void HTMLTokenizer::finish()
scriptCode[ scriptCodeSize ] = 0;
scriptCode[ scriptCodeSize + 1 ] = 0;
int pos;
- QString food;
+ TQString food;
if (title || style || script)
food.setUnicode(scriptCode, scriptCodeSize);
else if (server) {
food = "<";
- food += QString(scriptCode, scriptCodeSize);
+ food += TQString(scriptCode, scriptCodeSize);
}
else {
- pos = QConstString(scriptCode, scriptCodeSize).string().find('>');
+ pos = TQConstString(scriptCode, scriptCodeSize).string().find('>');
food.setUnicode(scriptCode+pos+1, scriptCodeSize-pos-1); // deep copy
}
KHTML_DELETE_QCHAR_VEC(scriptCode);
@@ -1647,7 +1647,7 @@ void HTMLTokenizer::processToken()
{
#if 0
if(currToken.tid) {
- qDebug( "unexpected token id: %d, str: *%s*", currToken.tid,QConstString( buffer,dest-buffer ).string().latin1() );
+ qDebug( "unexpected token id: %d, str: *%s*", currToken.tid,TQConstString( buffer,dest-buffer ).string().latin1() );
assert(0);
}
@@ -1666,10 +1666,10 @@ void HTMLTokenizer::processToken()
dest = buffer;
#ifdef TOKEN_DEBUG
- QString name = QString( getTagName(currToken.tid) );
- QString text;
+ TQString name = TQString( getTagName(currToken.tid) );
+ TQString text;
if(currToken.text)
- text = QConstString(currToken.text->s, currToken.text->l).string();
+ text = TQConstString(currToken.text->s, currToken.text->l).string();
kdDebug( 6036 ) << "Token --> " << name << " id = " << currToken.tid << endl;
if (currToken.flat)
@@ -1749,7 +1749,7 @@ void HTMLTokenizer::notifyFinished(CachedObject* /*finishedObj*/)
// make sure we forget about the script before we execute the new one
// infinite recursion might happen otherwise
- QString cachedScriptUrl( cs->url().string() );
+ TQString cachedScriptUrl( cs->url().string() );
cs->deref(this);
scriptExecution( scriptSource.string(), cachedScriptUrl );
diff --git a/khtml/html/htmltokenizer.h b/khtml/html/htmltokenizer.h
index 5e4186d58..8e36353b0 100644
--- a/khtml/html/htmltokenizer.h
+++ b/khtml/html/htmltokenizer.h
@@ -28,9 +28,9 @@
#ifndef HTMLTOKENIZER_H
#define HTMLTOKENIZER_H
-#include <qstring.h>
-#include <qobject.h>
-#include <qptrqueue.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqptrqueue.h>
#include "misc/loader_client.h"
#include "misc/htmltags.h"
@@ -72,7 +72,7 @@ namespace khtml {
if(attrs) attrs->deref();
if(text) text->deref();
}
- void addAttribute(DocumentImpl* doc, QChar* buffer, const QString& attrName, const DOMString& v)
+ void addAttribute(DocumentImpl* doc, TQChar* buffer, const TQString& attrName, const DOMString& v)
{
DOMStringImpl *value = 0;
NodeImpl::Id tid = 0;
@@ -130,7 +130,7 @@ public:
void write( const khtml::TokenizerString &str, bool appendData );
void end();
void finish();
- void timerEvent( QTimerEvent *e );
+ void timerEvent( TQTimerEvent *e );
virtual void setOnHold(bool _onHold);
void abort() { m_abort = true; }
virtual void setAutoClose(bool b=true);
@@ -149,10 +149,10 @@ protected:
void parseListing(khtml::TokenizerString &str);
void parseSpecial(khtml::TokenizerString &str);
void parseTag(khtml::TokenizerString &str);
- void parseEntity(khtml::TokenizerString &str, QChar *&dest, bool start = false);
+ void parseEntity(khtml::TokenizerString &str, TQChar *&dest, bool start = false);
void parseProcessingInstruction(khtml::TokenizerString &str);
void scriptHandler();
- void scriptExecution(const QString& script, const QString& scriptURL = QString::null, int baseLine = 0);
+ void scriptExecution(const TQString& script, const TQString& scriptURL = TQString::null, int baseLine = 0);
void setSrc(const TokenizerString& source);
// check if we have enough space in the buffer.
@@ -177,8 +177,8 @@ protected:
protected:
// Internal buffers
///////////////////
- QChar *buffer;
- QChar *dest;
+ TQChar *buffer;
+ TQChar *dest;
khtml::Token currToken;
@@ -245,7 +245,7 @@ protected:
// are we in a <script> ... </script> block
bool script;
- QChar EntityChar;
+ TQChar EntityChar;
// Are we in a <pre> ... </pre> block
bool pre;
@@ -288,10 +288,10 @@ protected:
bool brokenScript;
// name of an unknown attribute
- QString attrName;
+ TQString attrName;
// Used to store the code of a srcipting sequence
- QChar *scriptCode;
+ TQChar *scriptCode;
// Size of the script sequenze stored in scriptCode
int scriptCodeSize;
// Maximal size that can be stored in scriptCode
@@ -300,11 +300,11 @@ protected:
int scriptCodeResync;
// Stores characters if we are scanning for a string like "</script>"
- QChar searchBuffer[ 10 ];
+ TQChar searchBuffer[ 10 ];
// Counts where we are in the string we are scanning for
int searchCount;
// The string we are searching for
- const QChar *searchFor;
+ const TQChar *searchFor;
// the stopper string
const char* searchStopper;
// the stopper len
@@ -313,15 +313,15 @@ protected:
// may be still downloading) and finish
bool noMoreData;
// URL to get source code of script from
- QString scriptSrc;
- QString scriptSrcCharset;
+ TQString scriptSrc;
+ TQString scriptSrcCharset;
bool javascript;
// the HTML code we will parse after the external script we are waiting for has loaded
TokenizerQueue pendingQueue;
// true if we are executing a script while parsing a document. This causes the parsing of
// the output of the script to be postponed until after the script has finished executing
int m_executingScript;
- QPtrQueue<khtml::CachedScript> cachedScript;
+ TQPtrQueue<khtml::CachedScript> cachedScript;
// you can pause the tokenizer if you need to display a dialog or something
bool onHold;
// you can ask the tokenizer to abort the current write() call, e.g. to redirect somewhere else
diff --git a/khtml/java/kjavaapplet.cpp b/khtml/java/kjavaapplet.cpp
index 2269bc756..879c8624e 100644
--- a/khtml/java/kjavaapplet.cpp
+++ b/khtml/java/kjavaapplet.cpp
@@ -32,13 +32,13 @@ class KJavaAppletPrivate
{
public:
bool reallyExists;
- QString className;
- QString appName;
- QString baseURL;
- QString codeBase;
- QString archives;
- QSize size;
- QString windowName;
+ TQString className;
+ TQString appName;
+ TQString baseURL;
+ TQString codeBase;
+ TQString archives;
+ TQSize size;
+ TQString windowName;
KJavaApplet::AppletState state;
bool failed;
@@ -81,67 +81,67 @@ void KJavaApplet::setAppletContext( KJavaAppletContext* _context )
context->registerApplet( this );
}
-void KJavaApplet::setAppletClass( const QString& _className )
+void KJavaApplet::setAppletClass( const TQString& _className )
{
d->className = _className;
}
-QString& KJavaApplet::appletClass()
+TQString& KJavaApplet::appletClass()
{
return d->className;
}
-QString& KJavaApplet::parameter( const QString& name )
+TQString& KJavaApplet::parameter( const TQString& name )
{
return params[ name ];
}
-void KJavaApplet::setParameter( const QString& name, const QString& value )
+void KJavaApplet::setParameter( const TQString& name, const TQString& value )
{
params.insert( name, value );
}
-QMap<QString,QString>& KJavaApplet::getParams()
+TQMap<TQString,TQString>& KJavaApplet::getParams()
{
return params;
}
-void KJavaApplet::setBaseURL( const QString& baseURL )
+void KJavaApplet::setBaseURL( const TQString& baseURL )
{
d->baseURL = baseURL;
}
-QString& KJavaApplet::baseURL()
+TQString& KJavaApplet::baseURL()
{
return d->baseURL;
}
-void KJavaApplet::setCodeBase( const QString& codeBase )
+void KJavaApplet::setCodeBase( const TQString& codeBase )
{
d->codeBase = codeBase;
}
-QString& KJavaApplet::codeBase()
+TQString& KJavaApplet::codeBase()
{
return d->codeBase;
}
-void KJavaApplet::setSize( QSize size )
+void KJavaApplet::setSize( TQSize size )
{
d->size = size;
}
-QSize KJavaApplet::size()
+TQSize KJavaApplet::size()
{
return d->size;
}
-void KJavaApplet::setArchives( const QString& _archives )
+void KJavaApplet::setArchives( const TQString& _archives )
{
d->archives = _archives;
}
-QString& KJavaApplet::archives()
+TQString& KJavaApplet::archives()
{
return d->archives;
}
@@ -150,30 +150,30 @@ void KJavaApplet::resizeAppletWidget( int width, int height )
{
kdDebug(6100) << "KJavaApplet, id = " << id << ", ::resizeAppletWidget to " << width << ", " << height << endl;
- QStringList sl;
- sl.push_back( QString::number( 0 ) ); // applet itself has id 0
- sl.push_back( QString( "eval" ) ); // evaluate next script
- sl.push_back( QString::number( KParts::LiveConnectExtension::TypeString ) );
- sl.push_back( QString( "this.setAttribute('WIDTH',%1);this.setAttribute('HEIGHT',%2)" ).arg( width ).arg( height ) );
+ TQStringList sl;
+ sl.push_back( TQString::number( 0 ) ); // applet itself has id 0
+ sl.push_back( TQString( "eval" ) ); // evaluate next script
+ sl.push_back( TQString::number( KParts::LiveConnectExtension::TypeString ) );
+ sl.push_back( TQString( "this.setAttribute('WIDTH',%1);this.setAttribute('HEIGHT',%2)" ).arg( width ).arg( height ) );
jsData( sl );
}
-void KJavaApplet::setAppletName( const QString& name )
+void KJavaApplet::setAppletName( const TQString& name )
{
d->appName = name;
}
-void KJavaApplet::setWindowName( const QString& title )
+void KJavaApplet::setWindowName( const TQString& title )
{
d->windowName = title;
}
-QString& KJavaApplet::getWindowName()
+TQString& KJavaApplet::getWindowName()
{
return d->windowName;
}
-QString& KJavaApplet::appletName()
+TQString& KJavaApplet::appletName()
{
return d->appName;
}
@@ -259,8 +259,8 @@ void KJavaApplet::stateChange( const int newStateInt ) {
}
}
-void KJavaApplet::showStatus(const QString &msg) {
- QStringList args;
+void KJavaApplet::showStatus(const TQString &msg) {
+ TQStringList args;
args << msg;
context->processCmd("showstatus", args);
}
diff --git a/khtml/java/kjavaapplet.h b/khtml/java/kjavaapplet.h
index abde99927..6fe0f7709 100644
--- a/khtml/java/kjavaapplet.h
+++ b/khtml/java/kjavaapplet.h
@@ -26,9 +26,9 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
/**
* @short A Java applet
@@ -74,90 +74,90 @@ public:
/**
* Specify the name of the class file to run. For example 'Lake.class'.
*/
- void setAppletClass( const QString& clazzName );
+ void setAppletClass( const TQString& clazzName );
/**
* Get the name of the Class file the applet should run
*/
- QString& appletClass();
+ TQString& appletClass();
/**
* Set the URL of the document embedding the applet.
*/
- void setBaseURL( const QString& base );
+ void setBaseURL( const TQString& base );
/**
* get the Base URL of the document embedding the applet
*/
- QString& baseURL();
+ TQString& baseURL();
/**
* Set the codebase of the applet classes.
*/
- void setCodeBase( const QString& codeBase );
+ void setCodeBase( const TQString& codeBase );
/**
* Get the codebase of the applet classes
*/
- QString& codeBase();
+ TQString& codeBase();
/**
* Set the list of archives at the Applet's codebase to search in for
* class files and other resources
*/
- void setArchives( const QString& _archives );
+ void setArchives( const TQString& _archives );
/**
* Get the list of Archives that should be searched for class files
* and other resources
*/
- QString& archives();
+ TQString& archives();
/**
* Set the name the applet should be called in its context
*/
- void setAppletName( const QString& name );
+ void setAppletName( const TQString& name );
/**
* Get the name the applet should be called in its context
*/
- QString& appletName();
+ TQString& appletName();
/**
* Set the size of the applet
*/
- void setSize( QSize size );
+ void setSize( TQSize size );
/**
* Get the size of the applet
*/
- QSize size();
+ TQSize size();
/**
* Specify a parameter to be passed to the applet.
*/
- void setParameter( const QString& name, const QString& value );
+ void setParameter( const TQString& name, const TQString& value );
/**
* Look up the parameter value for the given Parameter. Returns
- * QString::null if the name has not been set.
+ * TQString::null if the name has not been set.
*/
- QString& parameter( const QString& name );
+ TQString& parameter( const TQString& name );
/**
* Get a reference to the Paramaters and their values
*/
- QMap<QString,QString>& getParams();
+ TQMap<TQString,TQString>& getParams();
/**
* Set the window title for swallowing
*/
- void setWindowName( const QString& title );
+ void setWindowName( const TQString& title );
/**
* Get the window title this applet should use
*/
- QString& getWindowName();
+ TQString& getWindowName();
/**
* Interface for applets to resize themselves
@@ -206,20 +206,20 @@ public:
/**
* Get/Set the user name
*/
- void setUser(const QString & _user) { username = _user; }
- const QString & user () const { return username; }
+ void setUser(const TQString & _user) { username = _user; }
+ const TQString & user () const { return username; }
/**
* Get/Set the user password
*/
- void setPassword(const QString & _password) { userpassword = _password; }
- const QString & password () const { return userpassword; }
+ void setPassword(const TQString & _password) { userpassword = _password; }
+ const TQString & password () const { return userpassword; }
/**
* Get/Set the auth name
*/
- void setAuthName(const QString & _auth) { authname = _auth; }
- const QString & authName () const { return authname; }
+ void setAuthName(const TQString & _auth) { authname = _auth; }
+ const TQString & authName () const { return authname; }
/**
* called from the protocol engine
@@ -234,18 +234,18 @@ public:
/**
* JavaScript coming from Java
**/
- void jsData (const QStringList & args) { emit jsEvent (args); }
+ void jsData (const TQStringList & args) { emit jsEvent (args); }
signals:
- void jsEvent (const QStringList & args);
+ void jsEvent (const TQStringList & args);
private:
- void showStatus( const QString &msg);
+ void showStatus( const TQString &msg);
KJavaAppletPrivate* d;
- QMap<QString, QString> params;
+ TQMap<TQString, TQString> params;
KJavaAppletContext* context;
int id;
- QString username;
- QString userpassword;
- QString authname;
+ TQString username;
+ TQString userpassword;
+ TQString authname;
};
#endif // KJAVAAPPLET_H
diff --git a/khtml/java/kjavaappletcontext.cpp b/khtml/java/kjavaappletcontext.cpp
index 94e17ff72..76914a5dc 100644
--- a/khtml/java/kjavaappletcontext.cpp
+++ b/khtml/java/kjavaappletcontext.cpp
@@ -26,15 +26,15 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
// This file was using 6002, but kdebug.areas didn't know about that number
#define DEBUGAREA 6100
-typedef QMap< int, QGuardedPtr<KJavaApplet> > AppletMap;
+typedef TQMap< int, TQGuardedPtr<KJavaApplet> > AppletMap;
// For future expansion
class KJavaAppletContextPrivate
@@ -50,11 +50,11 @@ int KJavaAppletContext::contextCount = 0;
/* Class Implementation
*/
KJavaAppletContext::KJavaAppletContext()
- : QObject()
+ : TQObject()
{
d = new KJavaAppletContextPrivate;
server = KJavaAppletServer::allocateJavaServer();
- connect(server->javaProcess(), SIGNAL(exited(int)), this, SLOT(javaProcessExited(int)));
+ connect(server->javaProcess(), TQT_SIGNAL(exited(int)), this, TQT_SLOT(javaProcessExited(int)));
id = contextCount;
server->createContext( id, this );
@@ -128,37 +128,37 @@ void KJavaAppletContext::stop( KJavaApplet* applet )
server->stopApplet( id, applet->appletId() );
}
-void KJavaAppletContext::processCmd( QString cmd, QStringList args )
+void KJavaAppletContext::processCmd( TQString cmd, TQStringList args )
{
received( cmd, args );
}
-void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
+void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg )
{
kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl;
kdDebug(6100) << "arg count = " << arg.count() << endl;
- if ( cmd == QString::fromLatin1("showstatus")
+ if ( cmd == TQString::fromLatin1("showstatus")
&& !arg.empty() )
{
- QString tmp = arg.first();
- tmp.replace(QRegExp("[\n\r]"), "");
+ TQString tmp = arg.first();
+ tmp.replace(TQRegExp("[\n\r]"), "");
kdDebug(6100) << "status message = " << tmp << endl;
emit showStatus( tmp );
}
- else if ( cmd == QString::fromLatin1( "showurlinframe" )
+ else if ( cmd == TQString::fromLatin1( "showurlinframe" )
&& arg.count() > 1 )
{
kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl;
emit showDocument( arg[0], arg[1] );
}
- else if ( cmd == QString::fromLatin1( "showdocument" )
+ else if ( cmd == TQString::fromLatin1( "showdocument" )
&& !arg.empty() )
{
kdDebug(6100) << "url = " << arg.first() << endl;
emit showDocument( arg.first(), "_top" );
}
- else if ( cmd == QString::fromLatin1( "resizeapplet" )
+ else if ( cmd == TQString::fromLatin1( "resizeapplet" )
&& arg.count() > 2 )
{
//arg[1] should be appletID
@@ -180,10 +180,10 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
tmp->resizeAppletWidget( width, height );
}
}
- else if (cmd.startsWith(QString::fromLatin1("audioclip_"))) {
+ else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) {
kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl;
}
- else if ( cmd == QString::fromLatin1( "JS_Event" )
+ else if ( cmd == TQString::fromLatin1( "JS_Event" )
&& arg.count() > 2 )
{
bool ok;
@@ -191,14 +191,14 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
KJavaApplet * applet;
if (ok && (applet = d->applets[appletID]))
{
- QStringList js_args(arg);
+ TQStringList js_args(arg);
js_args.pop_front();
applet->jsData(js_args);
}
else
kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl;
}
- else if ( cmd == QString::fromLatin1( "AppletStateNotification" ) )
+ else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) )
{
bool ok;
const int appletID = arg.first().toInt(&ok);
@@ -222,15 +222,15 @@ void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
} else
kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl;
}
- else if ( cmd == QString::fromLatin1( "AppletFailed" ) ) {
+ else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) {
bool ok;
const int appletID = arg.first().toInt(&ok);
if (ok)
{
KJavaApplet* const applet = d->applets[appletID];
/*
- QString errorDetail(arg[1]);
- errorDetail.replace(QRegExp(":\\s*"), ":\n");
+ TQString errorDetail(arg[1]);
+ errorDetail.replace(TQRegExp(":\\s*"), ":\n");
KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail);
*/
if (applet)
@@ -251,23 +251,23 @@ void KJavaAppletContext::javaProcessExited(int) {
}
}
-bool KJavaAppletContext::getMember(QStringList & args, QStringList & ret_args) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::getMember(TQStringList & args, TQStringList & ret_args) {
+ args.push_front( TQString::number(id) );
return server->getMember( args, ret_args );
}
-bool KJavaAppletContext::putMember( QStringList & args ) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::putMember( TQStringList & args ) {
+ args.push_front( TQString::number(id) );
return server->putMember( args );
}
-bool KJavaAppletContext::callMember(QStringList & args, QStringList &ret_args) {
- args.push_front( QString::number(id) );
+bool KJavaAppletContext::callMember(TQStringList & args, TQStringList &ret_args) {
+ args.push_front( TQString::number(id) );
return server->callMember( args, ret_args );
}
-void KJavaAppletContext::derefObject( QStringList & args ) {
- args.push_front( QString::number(id) );
+void KJavaAppletContext::derefObject( TQStringList & args ) {
+ args.push_front( TQString::number(id) );
server->derefObject( args );
}
diff --git a/khtml/java/kjavaappletcontext.h b/khtml/java/kjavaappletcontext.h
index 06e5aafc7..ca851a42e 100644
--- a/khtml/java/kjavaappletcontext.h
+++ b/khtml/java/kjavaappletcontext.h
@@ -24,7 +24,7 @@
#ifndef KJAVAAPPLETCONTEXT_H
#define KJAVAAPPLETCONTEXT_H
-#include <qobject.h>
+#include <tqobject.h>
/**
* @short Provides a context for KJavaAppletWidgets
@@ -94,27 +94,27 @@ public:
* use this for applet call backs, the AppletServer
* calls this directly.
*/
- void processCmd( QString cmd, QStringList args );
+ void processCmd( TQString cmd, TQStringList args );
/**
* LiveConnect functions
*/
- bool getMember(QStringList & args, QStringList & ret_args);
- bool putMember(QStringList & args);
- bool callMember(QStringList & args, QStringList & ret_args);
- void derefObject(QStringList & args);
+ bool getMember(TQStringList & args, TQStringList & ret_args);
+ bool putMember(TQStringList & args);
+ bool callMember(TQStringList & args, TQStringList & ret_args);
+ void derefObject(TQStringList & args);
KJavaAppletServer* getServer() const { return server; }
signals:
/**
* Signals the KHMTL Part to show this as the status message.
*/
- void showStatus ( const QString& txt );
+ void showStatus ( const TQString& txt );
/**
* Signals the KHTML Part to show a url in a given target
*/
- void showDocument( const QString& url, const QString& target );
+ void showDocument( const TQString& url, const TQString& target );
/**
* Signals the KHTML Part an applet is loaded
@@ -129,7 +129,7 @@ protected:
KJavaAppletServer* server;
protected slots:
- void received( const QString& cmd, const QStringList& arg );
+ void received( const TQString& cmd, const TQStringList& arg );
void javaProcessExited(int);
private:
diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp
index e766dcb5b..59d0517a2 100644
--- a/khtml/java/kjavaappletserver.cpp
+++ b/khtml/java/kjavaappletserver.cpp
@@ -38,18 +38,18 @@
#include <ksslcertchain.h>
#include <kssl.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <assert.h>
@@ -87,12 +87,12 @@
class JSStackFrame;
-typedef QMap< int, KJavaKIOJob* > KIOJobMap;
-typedef QMap< int, JSStackFrame* > JSStack;
+typedef TQMap< int, KJavaKIOJob* > KIOJobMap;
+typedef TQMap< int, JSStackFrame* > JSStack;
class JSStackFrame {
public:
- JSStackFrame(JSStack & stack, QStringList & a)
+ JSStackFrame(JSStack & stack, TQStringList & a)
: jsstack(stack), args(a), ticket(counter++), ready(false), exit (false) {
jsstack.insert( ticket, this );
}
@@ -100,7 +100,7 @@ public:
jsstack.erase( ticket );
}
JSStack & jsstack;
- QStringList & args;
+ TQStringList & args;
int ticket;
bool ready : 1;
bool exit : 1;
@@ -118,15 +118,15 @@ private:
delete kssl;
}
int counter;
- QMap< int, QGuardedPtr<KJavaAppletContext> > contexts;
- QString appletLabel;
+ TQMap< int, TQGuardedPtr<KJavaAppletContext> > contexts;
+ TQString appletLabel;
JSStack jsstack;
KIOJobMap kiojobs;
bool javaProcessFailed;
bool useKIO;
KSSL * kssl;
//int locked_context;
- //QValueList<QByteArray> java_requests;
+ //TQValueList<TQByteArray> java_requests;
};
static KJavaAppletServer* self = 0;
@@ -136,8 +136,8 @@ KJavaAppletServer::KJavaAppletServer()
d = new KJavaAppletServerPrivate;
process = new KJavaProcess();
- connect( process, SIGNAL(received(const QByteArray&)),
- this, SLOT(slotJavaRequest(const QByteArray&)) );
+ connect( process, TQT_SIGNAL(received(const TQByteArray&)),
+ this, TQT_SLOT(slotJavaRequest(const TQByteArray&)) );
setupJava( process );
@@ -159,15 +159,15 @@ KJavaAppletServer::~KJavaAppletServer()
delete d;
}
-QString KJavaAppletServer::getAppletLabel()
+TQString KJavaAppletServer::getAppletLabel()
{
if( self )
return self->appletLabel();
else
- return QString::null;
+ return TQString::null;
}
-QString KJavaAppletServer::appletLabel()
+TQString KJavaAppletServer::appletLabel()
{
return d->appletLabel;
}
@@ -198,7 +198,7 @@ void KJavaAppletServer::freeJavaServer()
if( config.readBoolEntry( "ShutdownAppletServer", true ) )
{
const int value = config.readNumEntry( "AppletServerTimeout", 60 );
- QTimer::singleShot( value*1000, self, SLOT( checkShutdown() ) );
+ TQTimer::singleShot( value*1000, self, TQT_SLOT( checkShutdown() ) );
}
}
}
@@ -217,16 +217,16 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
KConfig config ( "konquerorrc", true );
config.setGroup( "Java/JavaScript Settings" );
- QString jvm_path = "java";
+ TQString jvm_path = "java";
- QString jPath = config.readPathEntry( "JavaPath" );
+ TQString jPath = config.readPathEntry( "JavaPath" );
if ( !jPath.isEmpty() && jPath != "java" )
{
// Cut off trailing slash if any
if( jPath[jPath.length()-1] == '/' )
jPath.remove(jPath.length()-1, 1);
- QDir dir( jPath );
+ TQDir dir( jPath );
if( dir.exists( "bin/java" ) )
{
jvm_path = jPath + "/bin/java";
@@ -235,7 +235,7 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
{
jvm_path = jPath + "/jre/bin/java";
}
- else if( QFile::exists(jPath) )
+ else if( TQFile::exists(jPath) )
{
//check here to see if they entered the whole path the java exe
jvm_path = jPath;
@@ -246,22 +246,22 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
p->setJVMPath( jvm_path );
// Prepare classpath variable
- QString kjava_class = locate("data", "kjava/kjava.jar");
+ TQString kjava_class = locate("data", "kjava/kjava.jar");
kdDebug(6100) << "kjava_class = " << kjava_class << endl;
if( kjava_class.isNull() ) // Should not happen
return;
- QDir dir( kjava_class );
+ TQDir dir( kjava_class );
dir.cdUp();
kdDebug(6100) << "dir = " << dir.absPath() << endl;
- const QStringList entries = dir.entryList( "*.jar" );
+ const TQStringList entries = dir.entryList( "*.jar" );
kdDebug(6100) << "entries = " << entries.join( ":" ) << endl;
- QString classes;
+ TQString classes;
{
- QStringList::ConstIterator it = entries.begin();
- const QStringList::ConstIterator itEnd = entries.end();
+ TQStringList::ConstIterator it = entries.begin();
+ const TQStringList::ConstIterator itEnd = entries.end();
for( ; it != itEnd; ++it )
{
if( !classes.isEmpty() )
@@ -272,12 +272,12 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
p->setClasspath( classes );
// Fix all the extra arguments
- const QString extraArgs = config.readEntry( "JavaArgs" );
+ const TQString extraArgs = config.readEntry( "JavaArgs" );
p->setExtraArgs( extraArgs );
if( config.readBoolEntry( "UseSecurityManager", true ) )
{
- QString class_file = locate( "data", "kjava/kjava.policy" );
+ TQString class_file = locate( "data", "kjava/kjava.policy" );
p->setSystemProperty( "java.security.policy", class_file );
p->setSystemProperty( "java.security.manager",
@@ -287,7 +287,7 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
d->useKIO = config.readBoolEntry( "UseKio", false);
if( d->useKIO )
{
- p->setSystemProperty( "kjas.useKio", QString::null );
+ p->setSystemProperty( "kjas.useKio", TQString::null );
}
//check for http proxies...
@@ -298,12 +298,12 @@ void KJavaAppletServer::setupJava( KJavaProcess *p )
// this is a workaround for now
// FIXME
const KURL dummyURL( "http://www.kde.org/" );
- const QString httpProxy = KProtocolManager::proxyForURL(dummyURL);
+ const TQString httpProxy = KProtocolManager::proxyForURL(dummyURL);
kdDebug(6100) << "httpProxy is " << httpProxy << endl;
const KURL url( httpProxy );
p->setSystemProperty( "http.proxyHost", url.host() );
- p->setSystemProperty( "http.proxyPort", QString::number( url.port() ) );
+ p->setSystemProperty( "http.proxyPort", TQString::number( url.port() ) );
}
//set the main class to run
@@ -317,8 +317,8 @@ void KJavaAppletServer::createContext( int contextId, KJavaAppletContext* contex
d->contexts.insert( contextId, context );
- QStringList args;
- args.append( QString::number( contextId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
process->send( KJAS_CREATE_CONTEXT, args );
}
@@ -328,18 +328,18 @@ void KJavaAppletServer::destroyContext( int contextId )
if ( d->javaProcessFailed ) return;
d->contexts.remove( contextId );
- QStringList args;
- args.append( QString::number( contextId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
process->send( KJAS_DESTROY_CONTEXT, args );
}
bool KJavaAppletServer::createApplet( int contextId, int appletId,
- const QString & name, const QString & clazzName,
- const QString & baseURL, const QString & user,
- const QString & password, const QString & authname,
- const QString & codeBase, const QString & jarFile,
- QSize size, const QMap<QString,QString>& params,
- const QString & windowTitle )
+ const TQString & name, const TQString & clazzName,
+ const TQString & baseURL, const TQString & user,
+ const TQString & password, const TQString & authname,
+ const TQString & codeBase, const TQString & jarFile,
+ TQSize size, const TQMap<TQString,TQString>& params,
+ const TQString & windowTitle )
{
// kdDebug(6100) << "createApplet: contextId = " << contextId << endl
// << " appletId = " << appletId << endl
@@ -353,9 +353,9 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
if ( d->javaProcessFailed ) return false;
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
+ args.append( TQString::number( appletId ) );
//it's ok if these are empty strings, I take care of it later...
args.append( name );
@@ -367,18 +367,18 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
args.append( codeBase );
args.append( jarFile );
- args.append( QString::number( size.width() ) );
- args.append( QString::number( size.height() ) );
+ args.append( TQString::number( size.width() ) );
+ args.append( TQString::number( size.height() ) );
args.append( windowTitle );
//add on the number of parameter pairs...
const int num = params.count();
- const QString num_params = QString("%1").arg( num, 8 );
+ const TQString num_params = TQString("%1").arg( num, 8 );
args.append( num_params );
- QMap< QString, QString >::ConstIterator it = params.begin();
- const QMap< QString, QString >::ConstIterator itEnd = params.end();
+ TQMap< TQString, TQString >::ConstIterator it = params.begin();
+ const TQMap< TQString, TQString >::ConstIterator itEnd = params.end();
for( ; it != itEnd; ++it )
{
@@ -394,9 +394,9 @@ bool KJavaAppletServer::createApplet( int contextId, int appletId,
void KJavaAppletServer::initApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
+ TQStringList args;
+ args.append( TQString::number( contextId ) );
+ args.append( TQString::number( appletId ) );
process->send( KJAS_INIT_APPLET, args );
}
@@ -404,9 +404,9 @@ void KJavaAppletServer::initApplet( int contextId, int appletId )
void KJavaAppletServer::destroyApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_DESTROY_APPLET, args );
}
@@ -414,9 +414,9 @@ void KJavaAppletServer::destroyApplet( int contextId, int appletId )
void KJavaAppletServer::startApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_START_APPLET, args );
}
@@ -424,24 +424,24 @@ void KJavaAppletServer::startApplet( int contextId, int appletId )
void KJavaAppletServer::stopApplet( int contextId, int appletId )
{
if ( d->javaProcessFailed ) return;
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
+ TQStringList args;
+ args.append( TQString::number(contextId) );
+ args.append( TQString::number(appletId) );
process->send( KJAS_STOP_APPLET, args );
}
void KJavaAppletServer::showConsole() {
if ( d->javaProcessFailed ) return;
- QStringList args;
+ TQStringList args;
process->send( KJAS_SHOW_CONSOLE, args );
}
-void KJavaAppletServer::sendURLData( int loaderID, int code, const QByteArray& data )
+void KJavaAppletServer::sendURLData( int loaderID, int code, const TQByteArray& data )
{
- QStringList args;
- args.append( QString::number(loaderID) );
- args.append( QString::number(code) );
+ TQStringList args;
+ args.append( TQString::number(loaderID) );
+ args.append( TQString::number(code) );
process->send( KJAS_URLDATA, args, data );
}
@@ -457,19 +457,19 @@ void KJavaAppletServer::removeDataJob( int loaderID )
void KJavaAppletServer::quit()
{
- const QStringList args;
+ const TQStringList args;
process->send( KJAS_SHUTDOWN_SERVER, args );
process->flushBuffers();
process->wait( 10 );
}
-void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
+void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
{
// qb should be one command only without the length string,
// we parse out the command and it's meaning here...
- QString cmd;
- QStringList args;
+ TQString cmd;
+ TQStringList args;
int index = 0;
const int qb_size = qb.size();
@@ -478,7 +478,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
++index; //skip the next sep
//get contextID
- QString contextID;
+ TQString contextID;
while( qb[index] != 0 && index < qb_size )
{
contextID += qb[ index++ ];
@@ -504,7 +504,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
if (ok) {
KIOJobMap::iterator it = d->kiojobs.find( ID_num );
if (ok && it != d->kiojobs.end()) {
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(qb.data() + index, qb.size() - index - 1);
it.data()->data(qba);
qba.resetRawData(qb.data() + index, qb.size() - index - 1);
@@ -522,8 +522,8 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
kdError(6100) << "Missing separation byte" << endl;
sep_pos = qb_size;
}
- //kdDebug(6100) << "KJavaAppletServer::slotJavaRequest: "<< QString::fromLocal8Bit( qb.data() + index, sep_pos - index ) << endl;
- args.append( QString::fromLocal8Bit( qb.data() + index, sep_pos - index ) );
+ //kdDebug(6100) << "KJavaAppletServer::slotJavaRequest: "<< TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) << endl;
+ args.append( TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) );
index = sep_pos + 1; //skip the sep
}
//here I should find the context and call the method directly
@@ -531,19 +531,19 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
switch( cmd_code )
{
case KJAS_SHOW_DOCUMENT:
- cmd = QString::fromLatin1( "showdocument" );
+ cmd = TQString::fromLatin1( "showdocument" );
break;
case KJAS_SHOW_URLINFRAME:
- cmd = QString::fromLatin1( "showurlinframe" );
+ cmd = TQString::fromLatin1( "showurlinframe" );
break;
case KJAS_SHOW_STATUS:
- cmd = QString::fromLatin1( "showstatus" );
+ cmd = TQString::fromLatin1( "showstatus" );
break;
case KJAS_RESIZE_APPLET:
- cmd = QString::fromLatin1( "resizeapplet" );
+ cmd = TQString::fromLatin1( "resizeapplet" );
break;
case KJAS_GET_URLDATA:
@@ -573,7 +573,7 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl;
return;
case KJAS_JAVASCRIPT_EVENT:
- cmd = QString::fromLatin1( "JS_Event" );
+ cmd = TQString::fromLatin1( "JS_Event" );
kdDebug(6100) << "Javascript request: "<< contextID
<< " code: " << args[0] << endl;
break;
@@ -593,37 +593,37 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
return;
}
case KJAS_AUDIOCLIP_PLAY:
- cmd = QString::fromLatin1( "audioclip_play" );
+ cmd = TQString::fromLatin1( "audioclip_play" );
kdDebug(6100) << "Audio Play: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_LOOP:
- cmd = QString::fromLatin1( "audioclip_loop" );
+ cmd = TQString::fromLatin1( "audioclip_loop" );
kdDebug(6100) << "Audio Loop: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_STOP:
- cmd = QString::fromLatin1( "audioclip_stop" );
+ cmd = TQString::fromLatin1( "audioclip_stop" );
kdDebug(6100) << "Audio Stop: url=" << args[0] << endl;
break;
case KJAS_APPLET_STATE:
kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl;
- cmd = QString::fromLatin1( "AppletStateNotification" );
+ cmd = TQString::fromLatin1( "AppletStateNotification" );
break;
case KJAS_APPLET_FAILED:
kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl;
- cmd = QString::fromLatin1( "AppletFailed" );
+ cmd = TQString::fromLatin1( "AppletFailed" );
break;
case KJAS_SECURITY_CONFIRM: {
if (KSSL::doesSSLWork() && !d->kssl)
d->kssl = new KSSL;
- QStringList sl;
- QCString answer( "invalid" );
+ TQStringList sl;
+ TQCString answer( "invalid" );
if (!d->kssl) {
answer = "nossl";
} else if (args.size() > 2) {
const int certsnr = args[1].toInt();
- QString text;
- QPtrList<KSSLCertificate> certs;
+ TQString text;
+ TQPtrList<KSSLCertificate> certs;
certs.setAutoDelete( true );
for (int i = certsnr; i >= 0; --i) {
KSSLCertificate * cert = KSSLCertificate::fromString(args[i+2].ascii());
@@ -666,12 +666,12 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
default:
text += i18n("Unknown"); break;
}
- text += QString(")\n");
- QString subject = cert->getSubject() + QChar('\n');
- QRegExp reg(QString("/[A-Z]+="));
+ text += TQString(")\n");
+ TQString subject = cert->getSubject() + TQChar('\n');
+ TQRegExp reg(TQString("/[A-Z]+="));
int pos = 0;
while ((pos = subject.find(reg, pos)) > -1)
- subject.replace(pos, 1, QString("\n "));
+ subject.replace(pos, 1, TQString("\n "));
text += subject.mid(1);
}
}
@@ -683,8 +683,8 @@ void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
answer = PermissionDialog( qApp->activeWindow() ).exec( text, args[0] );
}
}
- sl.push_front( QString(answer) );
- sl.push_front( QString::number(ID_num) );
+ sl.push_front( TQString(answer) );
+ sl.push_front( TQString::number(ID_num) );
process->send( KJAS_SECURITY_CONFIRM, sl );
return;
}
@@ -716,7 +716,7 @@ void KJavaAppletServer::endWaitForReturnData() {
it.data()->exit = true;
}
-void KJavaAppletServer::timerEvent(QTimerEvent *) {
+void KJavaAppletServer::timerEvent(TQTimerEvent *) {
endWaitForReturnData();
kdDebug(6100) << "KJavaAppletServer::timerEvent timeout" << endl;
}
@@ -726,15 +726,15 @@ void KJavaAppletServer::waitForReturnData(JSStackFrame * frame) {
killTimers();
startTimer(15000);
while (!frame->exit)
- kapp->eventLoop()->processEvents (QEventLoop::AllEvents | QEventLoop::WaitForMore);
+ kapp->eventLoop()->processEvents (TQEventLoop::AllEvents | TQEventLoop::WaitForMore);
if (d->jsstack.size() <= 1)
killTimers();
kdDebug(6100) << "<KJavaAppletServer::waitForReturnData stacksize:" << d->jsstack.size() << endl;
}
-bool KJavaAppletServer::getMember(QStringList & args, QStringList & ret_args) {
+bool KJavaAppletServer::getMember(TQStringList & args, TQStringList & ret_args) {
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_GET_MEMBER, args );
waitForReturnData( &frame );
@@ -742,10 +742,10 @@ bool KJavaAppletServer::getMember(QStringList & args, QStringList & ret_args) {
return frame.ready;
}
-bool KJavaAppletServer::putMember( QStringList & args ) {
- QStringList ret_args;
+bool KJavaAppletServer::putMember( TQStringList & args ) {
+ TQStringList ret_args;
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_PUT_MEMBER, args );
waitForReturnData( &frame );
@@ -753,9 +753,9 @@ bool KJavaAppletServer::putMember( QStringList & args ) {
return frame.ready && ret_args.count() > 0 && ret_args[0].toInt();
}
-bool KJavaAppletServer::callMember(QStringList & args, QStringList & ret_args) {
+bool KJavaAppletServer::callMember(TQStringList & args, TQStringList & ret_args) {
JSStackFrame frame( d->jsstack, ret_args );
- args.push_front( QString::number(frame.ticket) );
+ args.push_front( TQString::number(frame.ticket) );
process->send( KJAS_CALL_MEMBER, args );
waitForReturnData( &frame );
@@ -763,7 +763,7 @@ bool KJavaAppletServer::callMember(QStringList & args, QStringList & ret_args) {
return frame.ready;
}
-void KJavaAppletServer::derefObject( QStringList & args ) {
+void KJavaAppletServer::derefObject( TQStringList & args ) {
process->send( KJAS_DEREF_OBJECT, args );
}
@@ -772,48 +772,48 @@ bool KJavaAppletServer::usingKIO() {
}
-PermissionDialog::PermissionDialog( QWidget* parent )
- : QObject(parent), m_button("no")
+PermissionDialog::PermissionDialog( TQWidget* parent )
+ : TQObject(parent), m_button("no")
{}
-QCString PermissionDialog::exec( const QString & cert, const QString & perm ) {
- QGuardedPtr<QDialog> dialog = new QDialog( static_cast<QWidget*>(parent()), "PermissionDialog");
+TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) {
+ TQGuardedPtr<TQDialog> dialog = new TQDialog( static_cast<TQWidget*>(parent()), "PermissionDialog");
- dialog->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) );
+ dialog->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) );
dialog->setModal( true );
dialog->setCaption( i18n("Security Alert") );
- QVBoxLayout* const dialogLayout = new QVBoxLayout( dialog, 11, 6, "dialogLayout");
+ TQVBoxLayout* const dialogLayout = new TQVBoxLayout( dialog, 11, 6, "dialogLayout");
- dialogLayout->addWidget( new QLabel( i18n("Do you grant Java applet with certificate(s):"), dialog ) );
- dialogLayout->addWidget( new QLabel( cert, dialog, "message" ) );
- dialogLayout->addWidget( new QLabel( i18n("the following permission"), dialog, "message" ) );
- dialogLayout->addWidget( new QLabel( perm, dialog, "message" ) );
- QSpacerItem* const spacer2 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ dialogLayout->addWidget( new TQLabel( i18n("Do you grant Java applet with certificate(s):"), dialog ) );
+ dialogLayout->addWidget( new TQLabel( cert, dialog, "message" ) );
+ dialogLayout->addWidget( new TQLabel( i18n("the following permission"), dialog, "message" ) );
+ dialogLayout->addWidget( new TQLabel( perm, dialog, "message" ) );
+ TQSpacerItem* const spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
dialogLayout->addItem( spacer2 );
- QHBoxLayout* const buttonLayout = new QHBoxLayout( 0, 0, 6, "buttonLayout");
+ TQHBoxLayout* const buttonLayout = new TQHBoxLayout( 0, 0, 6, "buttonLayout");
- QPushButton* const no = new QPushButton( i18n("&No"), dialog, "no" );
+ TQPushButton* const no = new TQPushButton( i18n("&No"), dialog, "no" );
no->setDefault( true );
buttonLayout->addWidget( no );
- QPushButton* const reject = new QPushButton( i18n("&Reject All"), dialog, "reject" );
+ TQPushButton* const reject = new TQPushButton( i18n("&Reject All"), dialog, "reject" );
buttonLayout->addWidget( reject );
- QPushButton* const yes = new QPushButton( i18n("&Yes"), dialog, "yes" );
+ TQPushButton* const yes = new TQPushButton( i18n("&Yes"), dialog, "yes" );
buttonLayout->addWidget( yes );
- QPushButton* const grant = new QPushButton( i18n("&Grant All"), dialog, "grant" );
+ TQPushButton* const grant = new TQPushButton( i18n("&Grant All"), dialog, "grant" );
buttonLayout->addWidget( grant );
dialogLayout->addLayout( buttonLayout );
dialog->resize( dialog->minimumSizeHint() );
//clearWState( WState_Polished );
- connect( no, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( reject, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( yes, SIGNAL( clicked() ), this, SLOT( clicked() ) );
- connect( grant, SIGNAL( clicked() ), this, SLOT( clicked() ) );
+ connect( no, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( reject, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( yes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
+ connect( grant, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) );
dialog->exec();
delete dialog;
@@ -827,7 +827,7 @@ PermissionDialog::~PermissionDialog()
void PermissionDialog::clicked()
{
m_button = sender()->name();
- static_cast<const QWidget*>(sender())->parentWidget()->close();
+ static_cast<const TQWidget*>(sender())->parentWidget()->close();
}
#include "kjavaappletserver.moc"
diff --git a/khtml/java/kjavaappletserver.h b/khtml/java/kjavaappletserver.h
index 674afb4ad..08d0f2983 100644
--- a/khtml/java/kjavaappletserver.h
+++ b/khtml/java/kjavaappletserver.h
@@ -25,8 +25,8 @@
#define KJAVAAPPLETSERVER_H
#include "kjavaprocess.h"
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
/**
@@ -68,7 +68,7 @@ public:
* while the applet is being loaded. If the java process could not be
* started, an error message is displayed instead.
*/
- static QString getAppletLabel();
+ static TQString getAppletLabel();
/**
* Create an applet context with the specified id.
@@ -86,12 +86,12 @@ public:
* name, class etc. are specified in the same way as in the HTML APPLET tag.
*/
bool createApplet( int contextId, int appletId,
- const QString & name, const QString & clazzName,
- const QString & baseURL, const QString & user,
- const QString & password, const QString & authname,
- const QString & codeBase, const QString & jarFile,
- QSize size, const QMap<QString, QString>& params,
- const QString & windowTitle );
+ const TQString & name, const TQString & clazzName,
+ const TQString & baseURL, const TQString & user,
+ const TQString & password, const TQString & authname,
+ const TQString & codeBase, const TQString & jarFile,
+ TQSize size, const TQMap<TQString, TQString>& params,
+ const TQString & windowTitle );
/**
* This should be called by the KJavaAppletWidget
@@ -122,7 +122,7 @@ public:
* Send data we got back from a KJavaDownloader back to the appropriate
* class loader.
*/
- void sendURLData( int loaderID, int code, const QByteArray& data );
+ void sendURLData( int loaderID, int code, const TQByteArray& data );
/**
* Removes KJavaDownloader from the list (deletes it too).
*/
@@ -134,15 +134,15 @@ public:
void quit();
KJavaProcess* javaProcess() { return process; }
- QString appletLabel();
+ TQString appletLabel();
void waitForReturnData(JSStackFrame *);
void endWaitForReturnData();
- bool getMember(QStringList & args, QStringList & ret_args);
- bool putMember(QStringList & args);
- bool callMember(QStringList & args, QStringList & ret_args);
- void derefObject(QStringList & args);
+ bool getMember(TQStringList & args, TQStringList & ret_args);
+ bool putMember(TQStringList & args);
+ bool callMember(TQStringList & args, TQStringList & ret_args);
+ void derefObject(TQStringList & args);
bool usingKIO();
protected:
@@ -151,9 +151,9 @@ protected:
KJavaProcess* process;
protected slots:
- void slotJavaRequest( const QByteArray& qb );
+ void slotJavaRequest( const TQByteArray& qb );
void checkShutdown();
- void timerEvent(QTimerEvent *);
+ void timerEvent(TQTimerEvent *);
private:
KJavaAppletServerPrivate* d;
@@ -165,16 +165,16 @@ class PermissionDialog : public QObject
{
Q_OBJECT
public:
- PermissionDialog( QWidget* );
+ PermissionDialog( TQWidget* );
~PermissionDialog();
- QCString exec( const QString & cert, const QString & perm );
+ TQCString exec( const TQString & cert, const TQString & perm );
private slots:
void clicked();
private:
- QCString m_button;
+ TQCString m_button;
};
#endif // KJAVAAPPLETSERVER_H
diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp
index 53e8b4512..d4c8e266f 100644
--- a/khtml/java/kjavaappletviewer.cpp
+++ b/khtml/java/kjavaappletviewer.cpp
@@ -22,12 +22,12 @@
#ifdef KDE_USE_FINAL
#undef Always
#endif
-#include <qdir.h>
-#include <qtable.h>
-#include <qpair.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qlabel.h>
+#include <tqdir.h>
+#include <tqtable.h>
+#include <tqpair.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqlabel.h>
#include <klibloader.h>
#include <kaboutdata.h>
@@ -59,8 +59,8 @@ KJavaAppletViewerFactory::~KJavaAppletViewerFactory () {
}
KParts::Part *KJavaAppletViewerFactory::createPartObject
- (QWidget *wparent, const char *wname,
- QObject *parent, const char * name, const char *, const QStringList & args) {
+ (TQWidget *wparent, const char *wname,
+ TQObject *parent, const char * name, const char *, const TQStringList & args) {
return new KJavaAppletViewer (wparent, wname, parent, name, args);
}
@@ -74,12 +74,12 @@ public:
KJavaServerMaintainer () { }
~KJavaServerMaintainer ();
- KJavaAppletContext * getContext (QObject*, const QString &);
- void releaseContext (QObject*, const QString &);
+ KJavaAppletContext * getContext (TQObject*, const TQString &);
+ void releaseContext (TQObject*, const TQString &);
void setServer (KJavaAppletServer * s);
- QGuardedPtr <KJavaAppletServer> server;
+ TQGuardedPtr <KJavaAppletServer> server;
private:
- typedef QMap <QPair <QObject*, QString>, QPair <KJavaAppletContext*, int> >
+ typedef TQMap <QPair <TQObject*, TQString>, QPair <KJavaAppletContext*, int> >
ContextMap;
ContextMap m_contextmap;
};
@@ -88,7 +88,7 @@ KJavaServerMaintainer::~KJavaServerMaintainer () {
delete server;
}
-KJavaAppletContext * KJavaServerMaintainer::getContext (QObject * w, const QString & doc) {
+KJavaAppletContext * KJavaServerMaintainer::getContext (TQObject * w, const TQString & doc) {
ContextMap::key_type key = qMakePair (w, doc);
ContextMap::iterator it = m_contextmap.find (key);
if (it != m_contextmap.end ()) {
@@ -100,7 +100,7 @@ KJavaAppletContext * KJavaServerMaintainer::getContext (QObject * w, const QStri
return context;
}
-void KJavaServerMaintainer::releaseContext (QObject * w, const QString & doc) {
+void KJavaServerMaintainer::releaseContext (TQObject * w, const TQString & doc) {
ContextMap::iterator it = m_contextmap.find (qMakePair (w, doc));
if (it != m_contextmap.end () && --(*it).second <= 0) {
kdDebug(6100) << "KJavaServerMaintainer::releaseContext" << endl;
@@ -123,31 +123,31 @@ AppletParameterDialog::AppletParameterDialog (KJavaAppletWidget * parent)
KDialogBase::Close, KDialogBase::Close, true),
m_appletWidget (parent) {
KJavaApplet* const applet = parent->applet ();
- table = new QTable (30, 2, this);
- table->setMinimumSize (QSize (600, 400));
+ table = new TQTable (30, 2, this);
+ table->setMinimumSize (TQSize (600, 400));
table->setColumnWidth (0, 200);
table->setColumnWidth (1, 340);
- QHeader* const header = table->horizontalHeader();
+ TQHeader* const header = table->horizontalHeader();
header->setLabel (0, i18n ("Parameter"));
header->setLabel (1, i18n ("Value"));
- QTableItem * tit = new QTableItem (table, QTableItem::Never, i18n("Class"));
+ TQTableItem * tit = new TQTableItem (table, TQTableItem::Never, i18n("Class"));
table->setItem (0, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->appletClass());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->appletClass());
table->setItem (0, 1, tit);
- tit = new QTableItem (table, QTableItem::Never, i18n ("Base URL"));
+ tit = new TQTableItem (table, TQTableItem::Never, i18n ("Base URL"));
table->setItem (1, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->baseURL());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->baseURL());
table->setItem (1, 1, tit);
- tit = new QTableItem (table, QTableItem::Never, i18n ("Archives"));
+ tit = new TQTableItem (table, TQTableItem::Never, i18n ("Archives"));
table->setItem (2, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, applet->archives());
+ tit = new TQTableItem(table, TQTableItem::Always, applet->archives());
table->setItem (2, 1, tit);
- QMap<QString,QString>::const_iterator it = applet->getParams().begin();
- const QMap<QString,QString>::const_iterator itEnd = applet->getParams().end();
+ TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin();
+ const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end();
for (int count = 2; it != itEnd; ++it) {
- tit = new QTableItem (table, QTableItem::Always, it.key ());
+ tit = new TQTableItem (table, TQTableItem::Always, it.key ());
table->setItem (++count, 0, tit);
- tit = new QTableItem(table, QTableItem::Always, it.data ());
+ tit = new TQTableItem(table, TQTableItem::Always, it.data ());
table->setItem (count, 1, tit);
}
setMainWidget (table);
@@ -169,18 +169,18 @@ void AppletParameterDialog::slotClose () {
}
//-----------------------------------------------------------------------------
-class CoverWidget : public QWidget {
+class CoverWidget : public TQWidget {
KJavaAppletWidget * m_appletwidget;
public:
- CoverWidget (QWidget *);
+ CoverWidget (TQWidget *);
~CoverWidget () {}
KJavaAppletWidget * appletWidget () const;
protected:
- void resizeEvent (QResizeEvent * e);
+ void resizeEvent (TQResizeEvent * e);
};
-inline CoverWidget::CoverWidget (QWidget * parent)
- : QWidget (parent, "KJavaAppletViewer Widget")
+inline CoverWidget::CoverWidget (TQWidget * parent)
+ : TQWidget (parent, "KJavaAppletViewer Widget")
{
m_appletwidget = new KJavaAppletWidget (this);
setFocusProxy (m_appletwidget);
@@ -190,27 +190,27 @@ inline KJavaAppletWidget * CoverWidget::appletWidget () const {
return m_appletwidget;
}
-void CoverWidget::resizeEvent (QResizeEvent * e) {
+void CoverWidget::resizeEvent (TQResizeEvent * e) {
m_appletwidget->resize (e->size().width(), e->size().height());
}
//-----------------------------------------------------------------------------
-class StatusBarIcon : public QLabel {
+class StatusBarIcon : public TQLabel {
public:
- StatusBarIcon (QWidget * parent) : QLabel (parent) {
- setPixmap (SmallIcon (QString ("java"), KJavaAppletViewerFactory::instance ()));
+ StatusBarIcon (TQWidget * parent) : TQLabel (parent) {
+ setPixmap (SmallIcon (TQString ("java"), KJavaAppletViewerFactory::instance ()));
}
protected:
- void mousePressEvent (QMouseEvent *) {
+ void mousePressEvent (TQMouseEvent *) {
serverMaintainer->server->showConsole ();
}
};
//-----------------------------------------------------------------------------
-KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
- QObject * parent, const char * name, const QStringList & args)
+KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
+ TQObject * parent, const char * name, const TQStringList & args)
: KParts::ReadOnlyPart (parent, name),
m_browserextension (new KJavaAppletViewerBrowserExtension (this)),
m_liveconnect (new KJavaAppletViewerLiveConnectExtension (this)),
@@ -223,49 +223,49 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
new KJavaServerMaintainer);
}
m_view = new CoverWidget (wparent);
- QString classname, classid, codebase, khtml_codebase, src_param;
+ TQString classname, classid, codebase, khtml_codebase, src_param;
int width = -1;
int height = -1;
KJavaApplet* const applet = m_view->appletWidget()->applet ();
- QStringList::const_iterator it = args.begin();
- const QStringList::const_iterator itEnd = args.end();
+ TQStringList::const_iterator it = args.begin();
+ const TQStringList::const_iterator itEnd = args.end();
for ( ; it != itEnd; ++it) {
const int equalPos = (*it).find("=");
if (equalPos > 0) {
- const QString name = (*it).left (equalPos).upper ();
- QString value = (*it).right ((*it).length () - equalPos - 1);
+ const TQString name = (*it).left (equalPos).upper ();
+ TQString value = (*it).right ((*it).length () - equalPos - 1);
if (value.at(0)=='\"')
value = value.right (value.length () - 1);
if (value.at (value.length () - 1) == '\"')
value.truncate (value.length () - 1);
kdDebug(6100) << "name=" << name << " value=" << value << endl;
if (!name.isEmpty()) {
- const QString name_lower = name.lower ();
+ const TQString name_lower = name.lower ();
if (name == "__KHTML__PLUGINBASEURL") {
- baseurl = KURL (KURL (value), QString (".")).url ();
+ baseurl = KURL (KURL (value), TQString (".")).url ();
} else if (name == "__KHTML__CODEBASE")
khtml_codebase = value;
- else if (name_lower == QString::fromLatin1("codebase") ||
- name_lower == QString::fromLatin1("java_codebase")) {
+ else if (name_lower == TQString::fromLatin1("codebase") ||
+ name_lower == TQString::fromLatin1("java_codebase")) {
if (!value.isEmpty ())
codebase = value;
} else if (name == "__KHTML__CLASSID")
- //else if (name.lower()==QString::fromLatin1("classid"))
+ //else if (name.lower()==TQString::fromLatin1("classid"))
classid = value;
- else if (name_lower == QString::fromLatin1("code") ||
- name_lower == QString::fromLatin1("java_code"))
+ else if (name_lower == TQString::fromLatin1("code") ||
+ name_lower == TQString::fromLatin1("java_code"))
classname = value;
- else if (name_lower == QString::fromLatin1("src"))
+ else if (name_lower == TQString::fromLatin1("src"))
src_param = value;
- else if (name_lower == QString::fromLatin1("archive") ||
- name_lower == QString::fromLatin1("java_archive") ||
+ else if (name_lower == TQString::fromLatin1("archive") ||
+ name_lower == TQString::fromLatin1("java_archive") ||
name_lower.startsWith ("cache_archive"))
applet->setArchives (value);
- else if (name_lower == QString::fromLatin1("name"))
+ else if (name_lower == TQString::fromLatin1("name"))
applet->setAppletName (value);
- else if (name_lower == QString::fromLatin1("width"))
+ else if (name_lower == TQString::fromLatin1("width"))
width = value.toInt();
- else if (name_lower == QString::fromLatin1("height"))
+ else if (name_lower == TQString::fromLatin1("height"))
height = value.toInt();
if (!name.startsWith ("__KHTML__")) {
applet->setParameter (name, value);
@@ -285,19 +285,19 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
if (classname.isEmpty ())
classname = src_param;
else if (!src_param.isEmpty ())
- applet->setParameter (QString ("SRC"), src_param);
+ applet->setParameter (TQString ("SRC"), src_param);
if (codebase.isEmpty ())
codebase = khtml_codebase;
if (baseurl.isEmpty ()) {
// not embeded in khtml
- QString pwd = QDir().absPath ();
- if (!pwd.endsWith (QChar (QDir::separator ())))
- pwd += QDir::separator ();
+ TQString pwd = TQDir().absPath ();
+ if (!pwd.endsWith (TQChar (TQDir::separator ())))
+ pwd += TQDir::separator ();
baseurl = KURL (KURL (pwd), codebase).url ();
}
if (width > 0 && height > 0) {
m_view->resize (width, height);
- applet->setSize( QSize( width, height ) );
+ applet->setSize( TQSize( width, height ) );
}
applet->setBaseURL (baseurl);
// check codebase first
@@ -316,23 +316,23 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
if (!server->usingKIO ()) {
/* if this page needs authentication */
KIO::AuthInfo info;
- QString errorMsg;
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQString errorMsg;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
KIO::AuthInfo authResult;
//(void) dcopClient(); // Make sure to have a dcop client.
info.url = baseurl;
info.verifyPath = true;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << m_view->topLevelWidget()->winId();
if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) {
kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl;
} else if ( replyType == "KIO::AuthInfo" ) {
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult;
applet->setUser (authResult.username);
applet->setPassword (authResult.password);
@@ -347,18 +347,18 @@ KJavaAppletViewer::KJavaAppletViewer (QWidget * wparent, const char *,
setInstance (KJavaAppletViewerFactory::instance ());
KParts::Part::setWidget (m_view);
- connect (applet->getContext(), SIGNAL(appletLoaded()), this, SLOT(appletLoaded()));
- connect (applet->getContext(), SIGNAL(showDocument(const QString&, const QString&)), m_browserextension, SLOT(showDocument(const QString&, const QString&)));
- connect (applet->getContext(), SIGNAL(showStatus(const QString &)), this, SLOT(infoMessage(const QString &)));
- connect (applet, SIGNAL(jsEvent (const QStringList &)), m_liveconnect, SLOT(jsEvent (const QStringList &)));
+ connect (applet->getContext(), TQT_SIGNAL(appletLoaded()), this, TQT_SLOT(appletLoaded()));
+ connect (applet->getContext(), TQT_SIGNAL(showDocument(const TQString&, const TQString&)), m_browserextension, TQT_SLOT(showDocument(const TQString&, const TQString&)));
+ connect (applet->getContext(), TQT_SIGNAL(showStatus(const TQString &)), this, TQT_SLOT(infoMessage(const TQString &)));
+ connect (applet, TQT_SIGNAL(jsEvent (const TQStringList &)), m_liveconnect, TQT_SLOT(jsEvent (const TQStringList &)));
}
-bool KJavaAppletViewer::eventFilter (QObject *o, QEvent *e) {
+bool KJavaAppletViewer::eventFilter (TQObject *o, TQEvent *e) {
if (m_liveconnect->jsSessions () > 0) {
switch (e->type()) {
- case QEvent::Destroy:
- case QEvent::Close:
- case QEvent::Quit:
+ case TQEvent::Destroy:
+ case TQEvent::Close:
+ case TQEvent::Quit:
return true;
default:
break;
@@ -404,7 +404,7 @@ bool KJavaAppletViewer::openURL (const KURL & url) {
if (applet->size().width() > 0 || m_view->isVisible())
w->showApplet ();
else
- QTimer::singleShot (10, this, SLOT (delayedCreateTimeOut ()));
+ TQTimer::singleShot (10, this, TQT_SLOT (delayedCreateTimeOut ()));
if (!applet->failed ())
emit started (0L);
return url.isValid ();
@@ -443,7 +443,7 @@ void KJavaAppletViewer::appletLoaded () {
emit completed();
}
-void KJavaAppletViewer::infoMessage (const QString & msg) {
+void KJavaAppletViewer::infoMessage (const TQString & msg) {
m_browserextension->infoMessage(msg);
}
@@ -457,7 +457,7 @@ KJavaAppletViewerBrowserExtension::KJavaAppletViewerBrowserExtension (KJavaApple
: KParts::BrowserExtension (parent, "KJavaAppletViewer Browser Extension") {
}
-void KJavaAppletViewerBrowserExtension::urlChanged (const QString & url) {
+void KJavaAppletViewerBrowserExtension::urlChanged (const TQString & url) {
emit setLocationBarURL (url);
}
@@ -468,24 +468,24 @@ void KJavaAppletViewerBrowserExtension::setLoadingProgress (int percentage) {
void KJavaAppletViewerBrowserExtension::setURLArgs (const KParts::URLArgs & /*args*/) {
}
-void KJavaAppletViewerBrowserExtension::saveState (QDataStream & stream) {
+void KJavaAppletViewerBrowserExtension::saveState (TQDataStream & stream) {
KJavaApplet* const applet = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget ()->applet ();
stream << applet->appletClass();
stream << applet->baseURL();
stream << applet->archives();
stream << applet->getParams().size ();
- QMap<QString,QString>::const_iterator it = applet->getParams().begin();
- const QMap<QString,QString>::const_iterator itEnd = applet->getParams().end();
+ TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin();
+ const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end();
for ( ; it != itEnd; ++it) {
stream << it.key ();
stream << it.data ();
}
}
-void KJavaAppletViewerBrowserExtension::restoreState (QDataStream & stream) {
+void KJavaAppletViewerBrowserExtension::restoreState (TQDataStream & stream) {
KJavaAppletWidget* const w = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget();
KJavaApplet* const applet = w->applet ();
- QString key, val;
+ TQString key, val;
int paramcount;
stream >> val;
applet->setAppletClass (val);
@@ -505,8 +505,8 @@ void KJavaAppletViewerBrowserExtension::restoreState (QDataStream & stream) {
w->showApplet ();
}
-void KJavaAppletViewerBrowserExtension::showDocument (const QString & doc,
- const QString & frame) {
+void KJavaAppletViewerBrowserExtension::showDocument (const TQString & doc,
+ const TQString & frame) {
const KURL url (doc);
KParts::URLArgs args;
args.frameName = frame;
@@ -520,16 +520,16 @@ KJavaAppletViewerLiveConnectExtension::KJavaAppletViewerLiveConnectExtension(KJa
}
bool KJavaAppletViewerLiveConnectExtension::get (
- const unsigned long objid, const QString & name,
+ const unsigned long objid, const TQString & name,
KParts::LiveConnectExtension::Type & type,
- unsigned long & rid, QString & value)
+ unsigned long & rid, TQString & value)
{
if (!m_viewer->appletAlive ())
return false;
- QStringList args, ret_args;
+ TQStringList args, ret_args;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (name);
m_jssessions++;
const bool ret = applet->getContext()->getMember (args, ret_args);
@@ -545,14 +545,14 @@ bool KJavaAppletViewerLiveConnectExtension::get (
return true;
}
-bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const QString & name, const QString & value)
+bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const TQString & name, const TQString & value)
{
if (!m_viewer->appletAlive ())
return false;
- QStringList args;
+ TQStringList args;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (name);
args.append (value);
++m_jssessions;
@@ -561,19 +561,19 @@ bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const
return ret;
}
-bool KJavaAppletViewerLiveConnectExtension::call( const unsigned long objid, const QString & func, const QStringList & fargs, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value )
+bool KJavaAppletViewerLiveConnectExtension::call( const unsigned long objid, const TQString & func, const TQStringList & fargs, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value )
{
if (!m_viewer->appletAlive ())
return false;
KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet ();
- QStringList args, ret_args;
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ TQStringList args, ret_args;
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
args.append (func);
- args.append (QString::number ((int) fargs.size ()));
+ args.append (TQString::number ((int) fargs.size ()));
{
- QStringList::const_iterator it = fargs.begin();
- const QStringList::const_iterator itEnd = fargs.end();
+ TQStringList::const_iterator it = fargs.begin();
+ const TQStringList::const_iterator itEnd = fargs.end();
for ( ; it != itEnd; ++it)
args.append(*it);
}
@@ -602,27 +602,27 @@ void KJavaAppletViewerLiveConnectExtension::unregister(const unsigned long objid
// no need to send to the jvm
return;
}
- QStringList args;
- args.append (QString::number (applet->appletId ()));
- args.append (QString::number ((int) objid));
+ TQStringList args;
+ args.append (TQString::number (applet->appletId ()));
+ args.append (TQString::number ((int) objid));
applet->getContext()->derefObject (args);
}
-void KJavaAppletViewerLiveConnectExtension::jsEvent (const QStringList & args) {
+void KJavaAppletViewerLiveConnectExtension::jsEvent (const TQStringList & args) {
if (args.count () < 2 || !m_viewer->appletAlive ())
return;
bool ok;
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
const unsigned long objid = (*it).toInt(&ok);
++it;
- const QString event = (*it);
+ const TQString event = (*it);
++it;
KParts::LiveConnectExtension::ArgList arglist;
for (; it != itEnd; ++it) {
// take a deep breath here
- const QStringList::ConstIterator prev = it++;
+ const TQStringList::ConstIterator prev = it++;
arglist.push_back(KParts::LiveConnectExtension::ArgList::value_type((KParts::LiveConnectExtension::Type) (*prev).toInt(), (*it)));
}
emit partEvent (objid, event, arglist);
diff --git a/khtml/java/kjavaappletviewer.h b/khtml/java/kjavaappletviewer.h
index 4d8b676cd..16f837b45 100644
--- a/khtml/java/kjavaappletviewer.h
+++ b/khtml/java/kjavaappletviewer.h
@@ -29,9 +29,9 @@
#include <kparts/factory.h>
#include <kdialogbase.h>
#include <kurl.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include "kjavaappletwidget.h"
@@ -48,14 +48,14 @@ class KJavaAppletViewerBrowserExtension : public KParts::BrowserExtension {
Q_OBJECT
public:
KJavaAppletViewerBrowserExtension (KJavaAppletViewer *parent);
- void urlChanged (const QString & url);
+ void urlChanged (const TQString & url);
void setLoadingProgress (int percentage);
void setURLArgs (const KParts::URLArgs & args);
- void saveState (QDataStream & stream);
- void restoreState (QDataStream & stream);
+ void saveState (TQDataStream & stream);
+ void restoreState (TQDataStream & stream);
public slots:
- void showDocument (const QString & doc, const QString & frame);
+ void showDocument (const TQString & doc, const TQString & frame);
};
class KJavaAppletViewerLiveConnectExtension : public KParts::LiveConnectExtension {
@@ -63,16 +63,16 @@ class KJavaAppletViewerLiveConnectExtension : public KParts::LiveConnectExtensio
public:
KJavaAppletViewerLiveConnectExtension(KJavaAppletViewer * parent);
- bool get (const unsigned long objid, const QString & field, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value);
- bool put(const unsigned long, const QString & field, const QString & value);
- bool call (const unsigned long , const QString & func, const QStringList & args, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, QString & value);
+ bool get (const unsigned long objid, const TQString & field, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value);
+ bool put(const unsigned long, const TQString & field, const TQString & value);
+ bool call (const unsigned long , const TQString & func, const TQStringList & args, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value);
void unregister (const unsigned long objid);
int jsSessions () const { return m_jssessions; }
public slots:
- void jsEvent (const QStringList & args);
+ void jsEvent (const TQStringList & args);
signals:
- virtual void partEvent (const unsigned long objid, const QString & event, const KParts::LiveConnectExtension::ArgList & args);
+ virtual void partEvent (const unsigned long objid, const TQString & event, const KParts::LiveConnectExtension::ArgList & args);
private:
KJavaAppletViewer * m_viewer;
@@ -82,8 +82,8 @@ private:
class KJavaAppletViewer : public KParts::ReadOnlyPart {
Q_OBJECT
public:
- KJavaAppletViewer (QWidget * wparent, const char * wname,
- QObject * parent, const char * name, const QStringList &args);
+ KJavaAppletViewer (TQWidget * wparent, const char * wname,
+ TQObject * parent, const char * name, const TQStringList &args);
~KJavaAppletViewer ();
CoverWidget * view () const { return m_view; }
static KAboutData* createAboutData ();
@@ -93,27 +93,27 @@ public:
KParts::LiveConnectExtension * liveConnectExtension () const
{ return m_liveconnect; }
- bool eventFilter (QObject *o, QEvent *e);
+ bool eventFilter (TQObject *o, TQEvent *e);
bool appletAlive () const;
public slots:
virtual bool openURL (const KURL & url);
virtual bool closeURL ();
void appletLoaded ();
- void infoMessage (const QString &);
+ void infoMessage (const TQString &);
protected:
bool openFile();
private slots:
void delayedCreateTimeOut ();
private:
- QGuardedPtr <CoverWidget> m_view;
+ TQGuardedPtr <CoverWidget> m_view;
KConfig * m_config;
KJavaProcess * process;
KJavaAppletViewerBrowserExtension * m_browserextension;
KJavaAppletViewerLiveConnectExtension * m_liveconnect;
KParts::StatusBarExtension * m_statusbar;
- QGuardedPtr <QLabel> m_statusbar_icon;
- QString baseurl;
+ TQGuardedPtr <TQLabel> m_statusbar_icon;
+ TQString baseurl;
bool m_closed;
};
@@ -123,9 +123,9 @@ public:
KJavaAppletViewerFactory ();
virtual ~KJavaAppletViewerFactory ();
virtual KParts::Part *createPartObject
- (QWidget *wparent, const char *wname,
- QObject *parent, const char *name,
- const char *className, const QStringList &args);
+ (TQWidget *wparent, const char *wname,
+ TQObject *parent, const char *name,
+ const char *className, const TQStringList &args);
static KInstance * instance () { return s_instance; }
private:
static KInstance * s_instance;
@@ -139,7 +139,7 @@ protected slots:
void slotClose ();
private:
KJavaAppletWidget * m_appletWidget;
- QTable * table;
+ TQTable * table;
};
#endif
diff --git a/khtml/java/kjavaappletwidget.cpp b/khtml/java/kjavaappletwidget.cpp
index 31ce8b5e6..1299ce7e8 100644
--- a/khtml/java/kjavaappletwidget.cpp
+++ b/khtml/java/kjavaappletwidget.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
// For future expansion
@@ -34,12 +34,12 @@ class KJavaAppletWidgetPrivate
{
friend class KJavaAppletWidget;
private:
- QLabel* tmplabel;
+ TQLabel* tmplabel;
};
int KJavaAppletWidget::appletCount = 0;
-KJavaAppletWidget::KJavaAppletWidget( QWidget* parent, const char* name )
+KJavaAppletWidget::KJavaAppletWidget( TQWidget* parent, const char* name )
: QXEmbed ( parent, name)
{
setProtocol(QXEmbed::XPLAIN);
@@ -48,10 +48,10 @@ KJavaAppletWidget::KJavaAppletWidget( QWidget* parent, const char* name )
d = new KJavaAppletWidgetPrivate;
m_kwm = new KWinModule( this );
- d->tmplabel = new QLabel( this );
+ d->tmplabel = new TQLabel( this );
d->tmplabel->setText( KJavaAppletServer::getAppletLabel() );
d->tmplabel->setAlignment( Qt::AlignCenter | Qt::WordBreak );
- d->tmplabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ d->tmplabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
d->tmplabel->show();
m_swallowTitle.sprintf( "KJAS Applet - Ticket number %u", appletCount++ );
@@ -66,8 +66,8 @@ KJavaAppletWidget::~KJavaAppletWidget()
void KJavaAppletWidget::showApplet()
{
- connect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
+ connect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ),
+ this, TQT_SLOT( setWindow( WId ) ) );
m_kwm->doNotManage( m_swallowTitle );
@@ -89,8 +89,8 @@ void KJavaAppletWidget::setWindow( WId w )
d->tmplabel = 0;
// disconnect from KWM events
- disconnect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
+ disconnect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ),
+ this, TQT_SLOT( setWindow( WId ) ) );
embed( w );
@@ -98,16 +98,16 @@ void KJavaAppletWidget::setWindow( WId w )
}
}
-QSize KJavaAppletWidget::sizeHint() const
+TQSize KJavaAppletWidget::sizeHint() const
{
kdDebug(6100) << "KJavaAppletWidget::sizeHint()" << endl;
- QSize rval = QXEmbed::sizeHint();
+ TQSize rval = QXEmbed::sizeHint();
if( rval.width() == 0 || rval.height() == 0 )
{
if( width() != 0 && height() != 0 )
{
- rval = QSize( width(), height() );
+ rval = TQSize( width(), height() );
}
}
@@ -121,13 +121,13 @@ void KJavaAppletWidget::resize( int w, int h )
if( d->tmplabel )
{
d->tmplabel->resize( w, h );
- m_applet->setSize( QSize( w, h ) );
+ m_applet->setSize( TQSize( w, h ) );
}
QXEmbed::resize( w, h );
}
-void KJavaAppletWidget::showEvent (QShowEvent * e) {
+void KJavaAppletWidget::showEvent (TQShowEvent * e) {
QXEmbed::showEvent(e);
if (!applet()->isCreated() && !applet()->appletClass().isEmpty()) {
// delayed showApplet
diff --git a/khtml/java/kjavaappletwidget.h b/khtml/java/kjavaappletwidget.h
index 24973c648..18f5be341 100644
--- a/khtml/java/kjavaappletwidget.h
+++ b/khtml/java/kjavaappletwidget.h
@@ -24,7 +24,7 @@
#ifndef KJAVAAPPLETWIDGET_H
#define KJAVAAPPLETWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded
#include "java/kjavaappletcontext.h"
#include "java/kjavaapplet.h"
@@ -53,7 +53,7 @@
* This widget works by using the KJavaAppletServer, which fires off a
* Java server process with which it communicates using the
* KDE Java Applet Server (KJAS) protocol over stdin and stdout.
- * The applet windows are swallowed and attached to the QWidget, but they are
+ * The applet windows are swallowed and attached to the TQWidget, but they are
* actually running in a different process. This has the advantage of robustness
* and reusability. The details of the communication are hidden from the user
* in the KJASAppletServer class. Normally only a single server process is used for
@@ -79,7 +79,7 @@ class KJavaAppletWidget : public QXEmbed
{
Q_OBJECT
public:
- KJavaAppletWidget( QWidget* parent=0, const char* name=0 );
+ KJavaAppletWidget( TQWidget* parent=0, const char* name=0 );
~KJavaAppletWidget();
@@ -96,7 +96,7 @@ public:
*/
void showApplet();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
void resize( int, int );
protected slots:
@@ -109,14 +109,14 @@ protected slots:
protected:
//The counter to generate ID's for the applets
static int appletCount;
- void showEvent (QShowEvent *);
+ void showEvent (TQShowEvent *);
private:
KJavaAppletWidgetPrivate* d;
KJavaApplet* m_applet;
KWinModule* m_kwm;
- QString m_swallowTitle;
+ TQString m_swallowTitle;
};
diff --git a/khtml/java/kjavadownloader.cpp b/khtml/java/kjavadownloader.cpp
index 8241fdea5..60334cbf0 100644
--- a/khtml/java/kjavadownloader.cpp
+++ b/khtml/java/kjavadownloader.cpp
@@ -26,7 +26,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
static const int DATA = 0;
static const int FINISHED = 1;
@@ -43,7 +43,7 @@ static const int KJAS_RESUME = 2;
KJavaKIOJob::~KJavaKIOJob() {}
-void KJavaKIOJob::data( const QByteArray& )
+void KJavaKIOJob::data( const TQByteArray& )
{
kdError(6100) << "Job id mixup" << endl;
}
@@ -63,14 +63,14 @@ public:
private:
int loaderID;
KURL* url;
- QByteArray file;
+ TQByteArray file;
KIO::TransferJob* job;
int responseCode;
bool isfirstdata;
};
-KJavaDownloader::KJavaDownloader( int ID, const QString& url )
+KJavaDownloader::KJavaDownloader( int ID, const TQString& url )
{
kdDebug(6100) << "KJavaDownloader(" << ID << ") = " << url << endl;
@@ -81,14 +81,14 @@ KJavaDownloader::KJavaDownloader( int ID, const QString& url )
d->job = KIO::get( *d->url, false, false );
d->job->addMetaData("PropagateHttpHeader", "true");
- connect( d->job, SIGNAL(data( KIO::Job*, const QByteArray& )),
- this, SLOT(slotData( KIO::Job*, const QByteArray& )) );
- connect( d->job, SIGNAL(connected(KIO::Job*)),
- this, SLOT(slotConnected(KIO::Job*)));
- connect( d->job, SIGNAL(mimetype(KIO::Job*, const QString&)),
- this, SLOT(slotMimetype(KIO::Job*, const QString&)));
- connect( d->job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotResult(KIO::Job*)) );
+ connect( d->job, TQT_SIGNAL(data( KIO::Job*, const TQByteArray& )),
+ this, TQT_SLOT(slotData( KIO::Job*, const TQByteArray& )) );
+ connect( d->job, TQT_SIGNAL(connected(KIO::Job*)),
+ this, TQT_SLOT(slotConnected(KIO::Job*)));
+ connect( d->job, TQT_SIGNAL(mimetype(KIO::Job*, const TQString&)),
+ this, TQT_SLOT(slotMimetype(KIO::Job*, const TQString&)));
+ connect( d->job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotResult(KIO::Job*)) );
}
KJavaDownloader::~KJavaDownloader()
@@ -96,13 +96,13 @@ KJavaDownloader::~KJavaDownloader()
delete d;
}
-void KJavaDownloader::slotData( KIO::Job*, const QByteArray& qb )
+void KJavaDownloader::slotData( KIO::Job*, const TQByteArray& qb )
{
//kdDebug(6100) << "slotData(" << d->loaderID << ")" << endl;
KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
if (d->isfirstdata) {
- QString headers = d->job->queryMetaData("HTTP-Headers");
+ TQString headers = d->job->queryMetaData("HTTP-Headers");
if (!headers.isEmpty()) {
d->file.resize( headers.length() );
memcpy( d->file.data(), headers.ascii(), headers.length() );
@@ -122,7 +122,7 @@ void KJavaDownloader::slotConnected(KIO::Job*)
d->responseCode = d->job->error();
}
-void KJavaDownloader::slotMimetype(KIO::Job*, const QString & type) {
+void KJavaDownloader::slotMimetype(KIO::Job*, const TQString & type) {
kdDebug(6100) << "slave mimetype " << type << endl;
}
@@ -137,7 +137,7 @@ void KJavaDownloader::slotResult( KIO::Job* )
int code = d->job->error();
if (!code)
code = 404;
- QString codestr = QString::number(code);
+ TQString codestr = TQString::number(code);
d->file.resize(codestr.length());
memcpy( d->file.data(), codestr.ascii(), codestr.length() );
kdDebug(6100) << "slave had an error = " << code << endl;
@@ -191,12 +191,12 @@ public:
}
int loaderID;
KURL* url;
- QByteArray file;
+ TQByteArray file;
KIO::TransferJob* job;
bool finished;
};
-KJavaUploader::KJavaUploader( int ID, const QString& url )
+KJavaUploader::KJavaUploader( int ID, const TQString& url )
{
kdDebug(6100) << "KJavaUploader(" << ID << ") = " << url << endl;
@@ -215,10 +215,10 @@ void KJavaUploader::start()
// create a suspended job
d->job = KIO::put( *d->url, -1, false, false, false );
d->job->suspend();
- connect( d->job, SIGNAL(dataReq( KIO::Job*, QByteArray& )),
- this, SLOT(slotDataRequest( KIO::Job*, QByteArray& )) );
- connect( d->job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotResult(KIO::Job*)) );
+ connect( d->job, TQT_SIGNAL(dataReq( KIO::Job*, TQByteArray& )),
+ this, TQT_SLOT(slotDataRequest( KIO::Job*, TQByteArray& )) );
+ connect( d->job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotResult(KIO::Job*)) );
server->sendURLData( d->loaderID, CONNECTED, d->file );
KJavaAppletServer::freeJavaServer();
}
@@ -228,7 +228,7 @@ KJavaUploader::~KJavaUploader()
delete d;
}
-void KJavaUploader::slotDataRequest( KIO::Job*, QByteArray& qb )
+void KJavaUploader::slotDataRequest( KIO::Job*, TQByteArray& qb )
{
// send our data and suspend
kdDebug(6100) << "slotDataRequest(" << d->loaderID << ") finished:" << d->finished << endl;
@@ -248,7 +248,7 @@ void KJavaUploader::slotDataRequest( KIO::Job*, QByteArray& qb )
KJavaAppletServer::freeJavaServer();
}
-void KJavaUploader::data( const QByteArray& qb )
+void KJavaUploader::data( const TQByteArray& qb )
{
kdDebug(6100) << "KJavaUploader::data(" << d->loaderID << ")" << endl;
d->file.resize( qb.size() );
@@ -266,7 +266,7 @@ void KJavaUploader::slotResult( KIO::Job* )
if (d->job->error())
{
int code = d->job->error();
- QString codestr = QString::number(code);
+ TQString codestr = TQString::number(code);
d->file.resize(codestr.length());
memcpy( d->file.data(), codestr.ascii(), codestr.length() );
kdDebug(6100) << "slave had an error " << code << ": " << d->job->errorString() << endl;
diff --git a/khtml/java/kjavadownloader.h b/khtml/java/kjavadownloader.h
index f49d8fe0c..d3cf0de41 100644
--- a/khtml/java/kjavadownloader.h
+++ b/khtml/java/kjavadownloader.h
@@ -22,7 +22,7 @@
#ifndef KJAVADOWNLOADER_H
#define KJAVADOWNLOADER_H
-#include <qobject.h>
+#include <tqobject.h>
/**
* @short A class for handling downloads from KIO
@@ -46,7 +46,7 @@ Q_OBJECT
public:
virtual ~KJavaKIOJob();
virtual void jobCommand( int cmd ) = 0;
- virtual void data( const QByteArray& qb );
+ virtual void data( const TQByteArray& qb );
};
class KJavaDownloader : public KJavaKIOJob
@@ -54,14 +54,14 @@ class KJavaDownloader : public KJavaKIOJob
Q_OBJECT
public:
- KJavaDownloader( int ID, const QString& url );
+ KJavaDownloader( int ID, const TQString& url );
~KJavaDownloader();
virtual void jobCommand( int cmd );
protected slots:
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotConnected( KIO::Job* );
- void slotMimetype( KIO::Job*, const QString& );
+ void slotMimetype( KIO::Job*, const TQString& );
void slotResult( KIO::Job* );
private:
@@ -74,14 +74,14 @@ class KJavaUploader : public KJavaKIOJob
Q_OBJECT
public:
- KJavaUploader( int ID, const QString& url );
+ KJavaUploader( int ID, const TQString& url );
~KJavaUploader();
virtual void jobCommand( int cmd );
- virtual void data( const QByteArray& qb );
+ virtual void data( const TQByteArray& qb );
void start();
protected slots:
- void slotDataRequest( KIO::Job*, QByteArray& );
+ void slotDataRequest( KIO::Job*, TQByteArray& );
void slotResult( KIO::Job* );
private:
KJavaUploaderPrivate* d;
diff --git a/khtml/java/kjavaprocess.cpp b/khtml/java/kjavaprocess.cpp
index cdc69bcc0..1c9f1b346 100644
--- a/khtml/java/kjavaprocess.cpp
+++ b/khtml/java/kjavaprocess.cpp
@@ -24,25 +24,25 @@
#include <kdebug.h>
#include <kio/kprotocolmanager.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <config.h>
#include <unistd.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KJavaProcessPrivate
{
friend class KJavaProcess;
private:
- QString jvmPath;
- QString classPath;
- QString mainClass;
- QString extraArgs;
- QString classArgs;
- QPtrList<QByteArray> BufferList;
- QMap<QString, QString> systemProps;
+ TQString jvmPath;
+ TQString classPath;
+ TQString mainClass;
+ TQString extraArgs;
+ TQString classArgs;
+ TQPtrList<TQByteArray> BufferList;
+ TQMap<TQString, TQString> systemProps;
bool processKilled;
};
@@ -54,12 +54,12 @@ KJavaProcess::KJavaProcess() : KProcess()
javaProcess = this; //new KProcess();
- connect( javaProcess, SIGNAL( wroteStdin( KProcess * ) ),
- this, SLOT( slotWroteData() ) );
- connect( javaProcess, SIGNAL( receivedStdout( int, int& ) ),
- this, SLOT( slotReceivedData(int, int&) ) );
- connect( javaProcess, SIGNAL( processExited (KProcess *) ),
- this, SLOT( slotExited (KProcess *) ) );
+ connect( javaProcess, TQT_SIGNAL( wroteStdin( KProcess * ) ),
+ this, TQT_SLOT( slotWroteData() ) );
+ connect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ),
+ this, TQT_SLOT( slotReceivedData(int, int&) ) );
+ connect( javaProcess, TQT_SIGNAL( processExited (KProcess *) ),
+ this, TQT_SLOT( slotExited (KProcess *) ) );
d->jvmPath = "java";
d->mainClass = "-help";
@@ -92,47 +92,47 @@ void KJavaProcess::stopJava()
killJVM();
}
-void KJavaProcess::setJVMPath( const QString& path )
+void KJavaProcess::setJVMPath( const TQString& path )
{
d->jvmPath = path;
}
-void KJavaProcess::setClasspath( const QString& classpath )
+void KJavaProcess::setClasspath( const TQString& classpath )
{
d->classPath = classpath;
}
-void KJavaProcess::setSystemProperty( const QString& name,
- const QString& value )
+void KJavaProcess::setSystemProperty( const TQString& name,
+ const TQString& value )
{
d->systemProps.insert( name, value );
}
-void KJavaProcess::setMainClass( const QString& className )
+void KJavaProcess::setMainClass( const TQString& className )
{
d->mainClass = className;
}
-void KJavaProcess::setExtraArgs( const QString& args )
+void KJavaProcess::setExtraArgs( const TQString& args )
{
d->extraArgs = args;
}
-void KJavaProcess::setClassArgs( const QString& args )
+void KJavaProcess::setClassArgs( const TQString& args )
{
d->classArgs = args;
}
//Private Utility Functions used by the two send() methods
-QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
+TQByteArray* KJavaProcess::addArgs( char cmd_code, const TQStringList& args )
{
//the buffer to store stuff, etc.
- QByteArray* const buff = new QByteArray();
- QTextOStream output( *buff );
+ TQByteArray* const buff = new TQByteArray();
+ TQTextOStream output( *buff );
const char sep = 0;
//make space for the command size: 8 characters...
- const QCString space( " " );
+ const TQCString space( " " );
output << space;
//write command code
@@ -145,8 +145,8 @@ QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
}
else
{
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
for( ; it != itEnd; ++it )
{
if( !(*it).isEmpty() )
@@ -160,10 +160,10 @@ QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
return buff;
}
-void KJavaProcess::storeSize( QByteArray* buff )
+void KJavaProcess::storeSize( TQByteArray* buff )
{
const int size = buff->size() - 8; //subtract out the length of the size_str
- const QString size_str = QString("%1").arg( size, 8 );
+ const TQString size_str = TQString("%1").arg( size, 8 );
kdDebug(6100) << "KJavaProcess::storeSize, size = " << size_str << endl;
const char* size_ptr = size_str.latin1();
@@ -171,7 +171,7 @@ void KJavaProcess::storeSize( QByteArray* buff )
buff->at(i) = size_ptr[i];
}
-void KJavaProcess::sendBuffer( QByteArray* buff )
+void KJavaProcess::sendBuffer( TQByteArray* buff )
{
d->BufferList.append( buff );
if( d->BufferList.count() == 1)
@@ -180,25 +180,25 @@ void KJavaProcess::sendBuffer( QByteArray* buff )
}
}
-void KJavaProcess::send( char cmd_code, const QStringList& args )
+void KJavaProcess::send( char cmd_code, const TQStringList& args )
{
if( isRunning() )
{
- QByteArray* const buff = addArgs( cmd_code, args );
+ TQByteArray* const buff = addArgs( cmd_code, args );
storeSize( buff );
kdDebug(6100) << "<KJavaProcess::send " << (int)cmd_code << endl;
sendBuffer( buff );
}
}
-void KJavaProcess::send( char cmd_code, const QStringList& args,
- const QByteArray& data )
+void KJavaProcess::send( char cmd_code, const TQStringList& args,
+ const TQByteArray& data )
{
if( isRunning() )
{
kdDebug(6100) << "KJavaProcess::send, qbytearray is size = " << data.size() << endl;
- QByteArray* const buff = addArgs( cmd_code, args );
+ TQByteArray* const buff = addArgs( cmd_code, args );
const int cur_size = buff->size();
const int data_size = data.size();
buff->resize( cur_size + data_size );
@@ -211,7 +211,7 @@ void KJavaProcess::send( char cmd_code, const QStringList& args,
void KJavaProcess::popBuffer()
{
- QByteArray* const buf = d->BufferList.first();
+ TQByteArray* const buf = d->BufferList.first();
if( buf )
{
// DEBUG stuff...
@@ -261,12 +261,12 @@ bool KJavaProcess::invokeJVM()
}
//set the system properties, iterate through the qmap of system properties
- QMap<QString,QString>::ConstIterator it = d->systemProps.begin();
- const QMap<QString,QString>::ConstIterator itEnd = d->systemProps.end();
+ TQMap<TQString,TQString>::ConstIterator it = d->systemProps.begin();
+ const TQMap<TQString,TQString>::ConstIterator itEnd = d->systemProps.end();
for( ; it != itEnd; ++it )
{
- QString currarg;
+ TQString currarg;
if( !it.key().isEmpty() )
{
@@ -284,9 +284,9 @@ bool KJavaProcess::invokeJVM()
{
// BUG HERE: if an argument contains space (-Dname="My name")
// this parsing will fail. Need more sophisticated parsing -- use KShell?
- const QStringList args = QStringList::split( " ", d->extraArgs );
- QStringList::ConstIterator it = args.begin();
- const QStringList::ConstIterator itEnd = args.end();
+ const TQStringList args = TQStringList::split( " ", d->extraArgs );
+ TQStringList::ConstIterator it = args.begin();
+ const TQStringList::ConstIterator itEnd = args.end();
for ( ; it != itEnd; ++it )
*javaProcess << *it;
}
@@ -297,10 +297,10 @@ bool KJavaProcess::invokeJVM()
*javaProcess << d->classArgs;
kdDebug(6100) << "Invoking JVM now...with arguments = " << endl;
- QString argStr;
- QTextOStream stream( &argStr );
- const QValueList<QCString> args = javaProcess->args();
- qCopy( args.begin(), args.end(), QTextOStreamIterator<QCString>( stream, " " ) );
+ TQString argStr;
+ TQTextOStream stream( &argStr );
+ const TQValueList<TQCString> args = javaProcess->args();
+ qCopy( args.begin(), args.end(), TQTextOStreamIterator<TQCString>( stream, " " ) );
kdDebug(6100) << argStr << endl;
KProcess::Communication flags = (KProcess::Communication)
@@ -319,8 +319,8 @@ bool KJavaProcess::invokeJVM()
void KJavaProcess::killJVM()
{
d->processKilled = true;
- disconnect( javaProcess, SIGNAL( receivedStdout( int, int& ) ),
- this, SLOT( slotReceivedData(int, int&) ) );
+ disconnect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ),
+ this, TQT_SLOT( slotReceivedData(int, int&) ) );
javaProcess->kill();
}
@@ -355,7 +355,7 @@ void KJavaProcess::slotReceivedData( int fd, int& len )
return;
}
- const QString lengthstr( length );
+ const TQString lengthstr( length );
bool ok;
const int num_len = lengthstr.toInt( &ok );
if( !ok )
@@ -376,7 +376,7 @@ void KJavaProcess::slotReceivedData( int fd, int& len )
return;
}
- QByteArray qb;
+ TQByteArray qb;
emit received( qb.duplicate( msg, num_len ) );
delete[] msg;
len = num_bytes + num_bytes_msg;
diff --git a/khtml/java/kjavaprocess.h b/khtml/java/kjavaprocess.h
index 566e8fda5..3e877685a 100644
--- a/khtml/java/kjavaprocess.h
+++ b/khtml/java/kjavaprocess.h
@@ -25,7 +25,7 @@
#define KJAVAPROCESS_H
#include <kprocess.h>
-#include <qcstring.h>
+#include <tqcstring.h>
/**
* @short A class for invoking a Java VM
@@ -71,7 +71,7 @@ public:
/**
* Used to specify the path to the Java executable to be run.
*/
- void setJVMPath( const QString& path );
+ void setJVMPath( const TQString& path );
/**
* This will set the classpath the Java process will use. It's used as a the
@@ -80,42 +80,42 @@ public:
* users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory
* without having to modify the jvm configuration files.
*/
- void setClasspath( const QString& classpath );
+ void setClasspath( const TQString& classpath );
/**
- * Set a property on the java command line as -Dname=value, or -Dname if value is QString::null.
+ * Set a property on the java command line as -Dname=value, or -Dname if value is TQString::null.
* For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property.
*/
- void setSystemProperty( const QString& name, const QString& value );
+ void setSystemProperty( const TQString& name, const TQString& value );
/**
* The class to be called when startJava() is called.
*/
- void setMainClass( const QString& clazzName );
+ void setMainClass( const TQString& clazzName );
/**
* Extra flags passed to the JVM.
*/
- void setExtraArgs( const QString& args );
+ void setExtraArgs( const TQString& args );
/**
* Arguments passed to the main class. They will be very last in the java
* command line, after the main class.
*/
- void setClassArgs( const QString& classArgs );
+ void setClassArgs( const TQString& classArgs );
/**
* Sends a command to the KJAS Applet Server by building a QByteArray
* out of the data, and then writes it standard out.
*/
- void send( char cmd_code, const QStringList& args );
+ void send( char cmd_code, const TQStringList& args );
/**
* Sends a command to the KJAS Applet Server by building a QByteArray
* out of the data, and then writes it standard out. It adds each QString
* in the arg list, and then adds the data array.
*/
- void send( char cmd_code, const QStringList& args, const QByteArray& data );
+ void send( char cmd_code, const TQStringList& args, const TQByteArray& data );
/**
* Writes all pending data to JVM
@@ -145,15 +145,15 @@ protected:
virtual bool invokeJVM();
virtual void killJVM();
- QByteArray* addArgs( char cmd_code, const QStringList& args );
+ TQByteArray* addArgs( char cmd_code, const TQStringList& args );
void popBuffer();
- void sendBuffer( QByteArray* buff );
- void storeSize( QByteArray* buff );
+ void sendBuffer( TQByteArray* buff );
+ void storeSize( TQByteArray* buff );
KProcess* javaProcess;
signals:
- void received( const QByteArray& );
+ void received( const TQByteArray& );
void exited( int status );
private:
diff --git a/khtml/java/kqeventutil.cpp b/khtml/java/kqeventutil.cpp
index 588051617..ff15e97da 100644
--- a/khtml/java/kqeventutil.cpp
+++ b/khtml/java/kqeventutil.cpp
@@ -19,180 +19,180 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
+#include <tqevent.h>
#include "kqeventutil.h"
-QString KQEventUtil::getQtEventName( QEvent* e )
+TQString KQEventUtil::getQtEventName( TQEvent* e )
{
- QString s;
+ TQString s;
switch( e->type() )
{
- case QEvent::None:
+ case TQEvent::None:
s = "None";
break;
- case QEvent::Timer:
+ case TQEvent::Timer:
s = "Timer";
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
s = "MouseButtonPress";
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
s = "MouseButtonRelease";
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
s = "MouseButtonClick";
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
s = "MouseMove";
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
s = "KeyPress";
break;
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
s = "KeyRelease";
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
s = "FocusIn";
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
s = "FocusOut";
break;
- case QEvent::Enter:
+ case TQEvent::Enter:
s = "Enter";
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
s = "Leave";
break;
- case QEvent::Paint:
+ case TQEvent::Paint:
s = "Paint";
break;
- case QEvent::Move:
+ case TQEvent::Move:
s = "Move";
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
s = "Resize";
break;
- case QEvent::Create:
+ case TQEvent::Create:
s = "Create";
break;
- case QEvent::Destroy:
+ case TQEvent::Destroy:
s = "Destroy";
break;
- case QEvent::Show:
+ case TQEvent::Show:
s = "Show";
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
s = "Hide";
break;
- case QEvent::Close:
+ case TQEvent::Close:
s = "Close";
break;
- case QEvent::Quit:
+ case TQEvent::Quit:
s = "Quit";
break;
- case QEvent::Reparent:
+ case TQEvent::Reparent:
s = "Reparent";
break;
- case QEvent::ShowMinimized:
+ case TQEvent::ShowMinimized:
s = "ShowMinimized";
break;
- case QEvent::ShowNormal:
+ case TQEvent::ShowNormal:
s = "ShowNormal";
break;
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
s = "WindowActivate";
break;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
s = "WindowDeactivate";
break;
- case QEvent::ShowToParent:
+ case TQEvent::ShowToParent:
s = "ShowToParent";
break;
- case QEvent::HideToParent:
+ case TQEvent::HideToParent:
s = "HideToParent";
break;
- case QEvent::ShowMaximized:
+ case TQEvent::ShowMaximized:
s = "ShowMaximized";
break;
- case QEvent::Accel:
+ case TQEvent::Accel:
s = "Accel";
break;
- case QEvent::Wheel:
+ case TQEvent::Wheel:
s = "Wheel";
break;
- case QEvent::AccelAvailable:
+ case TQEvent::AccelAvailable:
s = "AccelAvailable";
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
s = "CaptionChange";
break;
- case QEvent::IconChange:
+ case TQEvent::IconChange:
s = "IconChange";
break;
- case QEvent::ParentFontChange:
+ case TQEvent::ParentFontChange:
s = "ParentFontChange";
break;
- case QEvent::ApplicationFontChange:
+ case TQEvent::ApplicationFontChange:
s = "ApplicationFontChange";
break;
- case QEvent::ParentPaletteChange:
+ case TQEvent::ParentPaletteChange:
s = "ParentPaletteChange";
break;
- case QEvent::ApplicationPaletteChange:
+ case TQEvent::ApplicationPaletteChange:
s = "ApplicationPaletteChange";
break;
- case QEvent::Clipboard:
+ case TQEvent::Clipboard:
s = "Clipboard";
break;
- case QEvent::Speech:
+ case TQEvent::Speech:
s = "Speech";
break;
- case QEvent::SockAct:
+ case TQEvent::SockAct:
s = "SockAct";
break;
- case QEvent::AccelOverride:
+ case TQEvent::AccelOverride:
s = "AccelOverride";
break;
- case QEvent::DragEnter:
+ case TQEvent::DragEnter:
s = "DragEnter";
break;
- case QEvent::DragMove:
+ case TQEvent::DragMove:
s = "DragMove";
break;
- case QEvent::DragLeave:
+ case TQEvent::DragLeave:
s = "DragLeave";
break;
- case QEvent::Drop:
+ case TQEvent::Drop:
s = "Drop";
break;
- case QEvent::DragResponse:
+ case TQEvent::DragResponse:
s = "DragResponse";
break;
- case QEvent::ChildInserted:
+ case TQEvent::ChildInserted:
s = "ChildInserted";
break;
- case QEvent::ChildRemoved:
+ case TQEvent::ChildRemoved:
s = "ChildRemoved";
break;
- case QEvent::LayoutHint:
+ case TQEvent::LayoutHint:
s = "LayoutHint";
break;
- case QEvent::ShowWindowRequest:
+ case TQEvent::ShowWindowRequest:
s = "ShowWindowRequest";
break;
- case QEvent::ActivateControl:
+ case TQEvent::ActivateControl:
s = "ActivateControl";
break;
- case QEvent::DeactivateControl:
+ case TQEvent::DeactivateControl:
s = "DeactivateControl";
break;
- case QEvent::User:
+ case TQEvent::User:
s = "User Event";
break;
default:
- s = "Undefined Event, value = " + QString::number( e->type() );
+ s = "Undefined Event, value = " + TQString::number( e->type() );
break;
}
diff --git a/khtml/java/kqeventutil.h b/khtml/java/kqeventutil.h
index fd199baa1..9f5194d90 100644
--- a/khtml/java/kqeventutil.h
+++ b/khtml/java/kqeventutil.h
@@ -23,12 +23,12 @@
#ifndef KQEVENTUTIL_H
#define KQEVENTUTIL_H
-#include <qstring.h>
+#include <tqstring.h>
class QEvent;
class KQEventUtil {
public:
- static QString getQtEventName(QEvent *e);
+ static TQString getQtEventName(TQEvent *e);
};
#endif
diff --git a/khtml/java/kxeventutil.cpp b/khtml/java/kxeventutil.cpp
index 0eea8a744..9afa5a5ac 100644
--- a/khtml/java/kxeventutil.cpp
+++ b/khtml/java/kxeventutil.cpp
@@ -23,14 +23,14 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kxeventutil.h"
-QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
XAnyEvent *e = &xevent->xany;
- QString winname("window");
+ TQString winname("window");
switch (e->type) {
case GraphicsExpose:
case NoExpose:
@@ -49,7 +49,7 @@ QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
default:
break;
}
- QString s("serial=%1 send_event=%2 display=0x%3 %4=%5");
+ TQString s("serial=%1 send_event=%2 display=0x%3 %4=%5");
return
s.arg(e->serial)
.arg(e->send_event)
@@ -57,10 +57,10 @@ QString KXEventUtil::getXAnyEventInfo(XEvent *xevent) {
.arg(winname)
.arg(e->window);
}
-QString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
XButtonEvent *e = &xevent->xbutton;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 button=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 button=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -74,10 +74,10 @@ QString KXEventUtil::getXButtonEventInfo(XEvent *xevent) {
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
XKeyEvent *e = &xevent->xkey;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 keycode=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 keycode=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -91,10 +91,10 @@ QString KXEventUtil::getXKeyEventInfo(XEvent *xevent) {
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
XMotionEvent *e = &xevent->xmotion;
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 is_hint=%9");
- QString t(" same_screen=%1");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 is_hint=%9");
+ TQString t(" same_screen=%1");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -107,9 +107,9 @@ QString KXEventUtil::getXMotionEventInfo(XEvent *xevent) {
.arg(e->is_hint)
+t.arg(e->same_screen);
}
-QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
XCrossingEvent *e = &xevent->xcrossing;
- QString ms, ds;
+ TQString ms, ds;
switch (e->mode) {
case NotifyNormal: ms = "NotifyNormal"; break;
case NotifyGrab: ms = "NotifyGrab"; break;
@@ -125,8 +125,8 @@ QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
default: ds="?";
}
- QString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 mode=%8=%9 ");
- QString t("detail=%1=%2 same_screen=%3 focus=%4 state=%5");
+ TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 mode=%8=%9 ");
+ TQString t("detail=%1=%2 same_screen=%3 focus=%4 state=%5");
return
s.arg(e->root)
.arg(e->subwindow)
@@ -142,16 +142,16 @@ QString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) {
.arg(e->focus)
.arg(e->state);
}
-QString KXEventUtil::getXFocusChangeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXFocusChangeEventInfo(XEvent *xevent) {
XFocusChangeEvent *e = &xevent->xfocus;
- QString s("mode=%1 detail=%2");
+ TQString s("mode=%1 detail=%2");
return
s.arg(e->mode)
.arg(e->detail);
}
-QString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
XExposeEvent *e = &xevent->xexpose;
- QString s("x=%1 y=%2 width=%3 height=%4 count=%5");
+ TQString s("x=%1 y=%2 width=%3 height=%4 count=%5");
return
s.arg(e->x)
.arg(e->y)
@@ -162,9 +162,9 @@ QString KXEventUtil::getXExposeEventInfo(XEvent *xevent) {
-QString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
XGraphicsExposeEvent *e = &xevent->xgraphicsexpose;
- QString s("x=%1 y=%2 width=%3 height=%4 count=%5 major_code=%6 minor_code=%7");
+ TQString s("x=%1 y=%2 width=%3 height=%4 count=%5 major_code=%6 minor_code=%7");
return
s.arg(e->x)
.arg(e->y)
@@ -174,18 +174,18 @@ QString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) {
.arg(e->major_code)
.arg(e->minor_code);
}
-QString KXEventUtil::getXNoExposeEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXNoExposeEventInfo(XEvent *xevent) {
XNoExposeEvent *e = &xevent->xnoexpose;
- QString s("major_code=%1 minor_code=%2");
+ TQString s("major_code=%1 minor_code=%2");
return
s.arg(e->major_code)
.arg(e->minor_code);
}
-QString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
XCreateWindowEvent *e = &xevent->xcreatewindow;
- QString s("window=%1 x=%2 y=%3 width=%4 height=%5 border_width=%6 override_redirect=%7");
+ TQString s("window=%1 x=%2 y=%3 width=%4 height=%5 border_width=%6 override_redirect=%7");
return
s.arg(e->window)
.arg(e->x)
@@ -196,47 +196,47 @@ QString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) {
.arg(e->override_redirect);
}
-QString KXEventUtil::getXDestroyWindowEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXDestroyWindowEventInfo(XEvent *xevent) {
XDestroyWindowEvent *e = &xevent->xdestroywindow;
- QString s("window=%1");
+ TQString s("window=%1");
return
s.arg(e->window);
}
-QString KXEventUtil::getXMapEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMapEventInfo(XEvent *xevent) {
XMapEvent *e = &xevent->xmap;
- QString s("window=%1 override_redirect=%2");
+ TQString s("window=%1 override_redirect=%2");
return
s.arg(e->window)
.arg(e->override_redirect);
}
-QString KXEventUtil::getXMappingEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXMappingEventInfo(XEvent *xevent) {
XMappingEvent *e = &xevent->xmapping;
- QString s("request=%1 first_keycode=%2 count=%3");
+ TQString s("request=%1 first_keycode=%2 count=%3");
return
s.arg(e->request)
.arg(e->first_keycode)
.arg(e->count);
}
-QString KXEventUtil::getXReparentEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXReparentEventInfo(XEvent *xevent) {
XReparentEvent *e = &xevent->xreparent;
- QString s("window=%1 parent=%2 x=%3 y=%4");
+ TQString s("window=%1 parent=%2 x=%3 y=%4");
return
s.arg(e->window)
.arg(e->parent)
.arg(e->x)
.arg(e->y);
}
-QString KXEventUtil::getXUnmapEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXUnmapEventInfo(XEvent *xevent) {
XUnmapEvent *e = &xevent->xunmap;
- QString s("window=%1 from_configure=%2");
+ TQString s("window=%1 from_configure=%2");
return
s.arg(e->window)
.arg(e->from_configure);
}
-QString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
XConfigureEvent *e = &xevent->xconfigure;
- QString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 override_redirect=%7");
+ TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 override_redirect=%7");
return
s.arg(e->window)
.arg(e->x).arg(e->y)
@@ -246,10 +246,10 @@ QString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) {
.arg(e->override_redirect);
}
-QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
+TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
XConfigureRequestEvent *e = &xevent->xconfigurerequest;
unsigned vm = e->value_mask;
- QStringList vml;
+ TQStringList vml;
if (vm & CWX) vml.append("CWX");
if (vm & CWY) vml.append("CWY");
if (vm & CWWidth) vml.append("CWWidth");
@@ -257,8 +257,8 @@ QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
if (vm & CWBorderWidth) vml.append("CWBorderWidth");
if (vm & CWSibling) vml.append("CWSibling");
if (vm & CWStackMode) vml.append("CWStackMode");
- QString vms = vml.join("|");
- QString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9");
+ TQString vms = vml.join("|");
+ TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9");
return
s.arg(e->window)
.arg(e->x).arg(e->y)
@@ -269,11 +269,11 @@ QString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) {
.arg(e->value_mask, 0, 16)
.arg(vms);
}
-QString KXEventUtil::getX11EventInfo( XEvent* e )
+TQString KXEventUtil::getX11EventInfo( XEvent* e )
{
- QString anyInfo = getXAnyEventInfo(e);
- QString info = "";
- QString s;
+ TQString anyInfo = getXAnyEventInfo(e);
+ TQString info = "";
+ TQString s;
switch( e->type )
{
case KeyPress:
diff --git a/khtml/java/kxeventutil.h b/khtml/java/kxeventutil.h
index ea5a49bd1..6eb0bf14b 100644
--- a/khtml/java/kxeventutil.h
+++ b/khtml/java/kxeventutil.h
@@ -23,29 +23,29 @@
#include <X11/X.h>
#include <X11/Xlib.h>
-#include <qstring.h>
+#include <tqstring.h>
class KXEventUtil {
public:
- static QString getXEventName(XEvent *e);
- static QString getXAnyEventInfo(XEvent *xevent);
- static QString getXButtonEventInfo(XEvent *xevent);
- static QString getXKeyEventInfo(XEvent *xevent);
- static QString getXMotionEventInfo(XEvent *xevent);
- static QString getXCrossingEventInfo(XEvent *xevent);
- static QString getXFocusChangeEventInfo(XEvent *xevent);
- static QString getXExposeEventInfo(XEvent *xevent);
- static QString getXGraphicsExposeEventInfo(XEvent *xevent);
- static QString getXNoExposeEventInfo(XEvent *xevent);
- static QString getXCreateWindowEventInfo(XEvent *xevent);
- static QString getXDestroyWindowEventInfo(XEvent *xevent);
- static QString getXMapEventInfo(XEvent *xevent);
- static QString getXMappingEventInfo(XEvent *xevent);
- static QString getXReparentEventInfo(XEvent *xevent);
- static QString getXUnmapEventInfo(XEvent *xevent);
- static QString getXConfigureEventInfo(XEvent *xevent);
- static QString getXConfigureRequestEventInfo(XEvent *xevent);
- static QString getX11EventInfo( XEvent* e );
+ static TQString getXEventName(XEvent *e);
+ static TQString getXAnyEventInfo(XEvent *xevent);
+ static TQString getXButtonEventInfo(XEvent *xevent);
+ static TQString getXKeyEventInfo(XEvent *xevent);
+ static TQString getXMotionEventInfo(XEvent *xevent);
+ static TQString getXCrossingEventInfo(XEvent *xevent);
+ static TQString getXFocusChangeEventInfo(XEvent *xevent);
+ static TQString getXExposeEventInfo(XEvent *xevent);
+ static TQString getXGraphicsExposeEventInfo(XEvent *xevent);
+ static TQString getXNoExposeEventInfo(XEvent *xevent);
+ static TQString getXCreateWindowEventInfo(XEvent *xevent);
+ static TQString getXDestroyWindowEventInfo(XEvent *xevent);
+ static TQString getXMapEventInfo(XEvent *xevent);
+ static TQString getXMappingEventInfo(XEvent *xevent);
+ static TQString getXReparentEventInfo(XEvent *xevent);
+ static TQString getXUnmapEventInfo(XEvent *xevent);
+ static TQString getXConfigureEventInfo(XEvent *xevent);
+ static TQString getXConfigureRequestEventInfo(XEvent *xevent);
+ static TQString getX11EventInfo( XEvent* e );
};
#endif
diff --git a/khtml/java/tests/testkjavaappletserver.cpp b/khtml/java/tests/testkjavaappletserver.cpp
index f0c5da19a..63ec3ba3e 100644
--- a/khtml/java/tests/testkjavaappletserver.cpp
+++ b/khtml/java/tests/testkjavaappletserver.cpp
@@ -1,7 +1,7 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <unistd.h>
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
KApplication app;
- QString path_to_kdelibs = "/build/wynnw/kde-src";
+ TQString path_to_kdelibs = "/build/wynnw/kde-src";
KJavaAppletWidget *a = new KJavaAppletWidget;
diff --git a/khtml/khtml_caret.cpp b/khtml/khtml_caret.cpp
index 55050beaa..9b819ee6c 100644
--- a/khtml/khtml_caret.cpp
+++ b/khtml/khtml_caret.cpp
@@ -428,7 +428,7 @@ void /*KDE_NO_EXPORT*/ mapDOMPosToRenderPos(NodeImpl *node, long offset,
// index was child count or out of bounds
bool atEnd = !child;
#if DEBUG_CARETMODE > 5
- kdDebug(6200) << "mapDTR: child " << child << "@" << (child ? child->nodeName().string() : QString::null) << " atEnd " << atEnd << endl;
+ kdDebug(6200) << "mapDTR: child " << child << "@" << (child ? child->nodeName().string() : TQString::null) << " atEnd " << atEnd << endl;
#endif
if (atEnd) child = node->lastChild();
@@ -486,7 +486,7 @@ void /*KDE_NO_EXPORT*/ mapRenderPosToDOMPos(RenderObject *r, long r_ofs,
node = r->element();
Q_ASSERT(node);
#if DEBUG_CARETMODE > 5
- kdDebug(6200) << "mapRTD: r " << r << "@" << (r ? r->renderName() : QString::null) << (r && r->element() ? QString(".node ") + QString::number((unsigned)r->element(),16) + "@" + r->element()->nodeName().string() : QString::null) << " outside " << outside << " outsideEnd " << outsideEnd << endl;
+ kdDebug(6200) << "mapRTD: r " << r << "@" << (r ? r->renderName() : TQString::null) << (r && r->element() ? TQString(".node ") + TQString::number((unsigned)r->element(),16) + "@" + r->element()->nodeName().string() : TQString::null) << " outside " << outside << " outsideEnd " << outsideEnd << endl;
#endif
if (node->nodeType() == Node::ELEMENT_NODE || node->nodeType() == Node::TEXT_NODE) {
@@ -512,7 +512,7 @@ void /*KDE_NO_EXPORT*/ mapRenderPosToDOMPos(RenderObject *r, long r_ofs,
offset = (long)node->nodeIndex() + outsideEnd;
node = parent;
#if DEBUG_CARETMODE > 5
- kdDebug(6200) << node << "@" << (node ? node->nodeName().string() : QString::null) << " offset " << offset << endl;
+ kdDebug(6200) << node << "@" << (node ? node->nodeName().string() : TQString::null) << " offset " << offset << endl;
#endif
} else { // !outside
inside:
@@ -589,7 +589,7 @@ static RenderObject* findRenderer(NodeImpl *&node, long offset,
RenderObject *r;
mapDOMPosToRenderPos(node, offset, r, r_ofs, outside, outsideEnd);
#if DEBUG_CARETMODE > 2
- kdDebug(6200) << "findRenderer: node " << node << " " << (node ? node->nodeName().string() : QString::null) << " offset " << offset << " r " << r << "[" << (r ? r->renderName() : QString::null) << "] r_ofs " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
+ kdDebug(6200) << "findRenderer: node " << node << " " << (node ? node->nodeName().string() : TQString::null) << " offset " << offset << " r " << r << "[" << (r ? r->renderName() : TQString::null) << "] r_ofs " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
#endif
if (r) return r;
NodeImpl *baseElem = base ? base->element() : 0;
@@ -636,7 +636,7 @@ static ElementImpl *determineBaseElement(NodeImpl *caretNode)
// == class CaretBox implementation
#if DEBUG_CARETMODE > 0
-void CaretBox::dump(QTextStream &ts, const QString &ind) const
+void CaretBox::dump(TQTextStream &ts, const TQString &ind) const
{
ts << ind << "b@" << _box;
@@ -688,7 +688,7 @@ kdDebug(6200) << "isinlineflowbox " << box << endl;
#endif
InlineFlowBox *flowBox = static_cast<InlineFlowBox *>(box);
bool rtl = ps->direction() == RTL;
- const QFontMetrics &pfm = ps->fontMetrics();
+ const TQFontMetrics &pfm = ps->fontMetrics();
if (flowBox->includeLeftEdge()) {
// If this box is to be coalesced with the outside end box of its
@@ -730,7 +730,7 @@ kdDebug(6200) << "== recursive invocation end" << endl;
} else if (box->isInlineTextBox()) {
#if DEBUG_ACIB
-kdDebug(6200) << "isinlinetextbox " << box << (box->object() ? QString(" contains \"%1\"").arg(QConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), kMin(box->maxOffset() - box->minOffset(), 15L)).string()) : QString::null) << endl;
+kdDebug(6200) << "isinlinetextbox " << box << (box->object() ? TQString(" contains \"%1\"").arg(TQConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), kMin(box->maxOffset() - box->minOffset(), 15L)).string()) : TQString::null) << endl;
#endif
caret_boxes.append(new CaretBox(box, false, false));
sbp.check(preEnd());
@@ -743,7 +743,7 @@ kdDebug(6200) << "some replaced or what " << box << endl;
#endif
// must be an inline-block, inline-table, or any RenderReplaced
bool rtl = ps->direction() == RTL;
- const QFontMetrics &pfm = ps->fontMetrics();
+ const TQFontMetrics &pfm = ps->fontMetrics();
if (coalesceOutsideBoxes) {
if (sbp.equalsBox(box, true, false)) {
@@ -768,7 +768,7 @@ kdDebug(6200) << "some replaced or what " << box << endl;
}
#undef DEBUG_ACIB
-void CaretBoxLine::addCreatedFlowBoxInside(InlineFlowBox *flowBox, const QFontMetrics &fm) /*KDE_NO_EXPORT*/
+void CaretBoxLine::addCreatedFlowBoxInside(InlineFlowBox *flowBox, const TQFontMetrics &fm) /*KDE_NO_EXPORT*/
{
CaretBox *caretBox = new CaretBox(flowBox, false, false);
@@ -782,7 +782,7 @@ void CaretBoxLine::addCreatedFlowBoxInside(InlineFlowBox *flowBox, const QFontMe
caretBox->_h = fm.height();
}
-void CaretBoxLine::addCreatedFlowBoxEdge(InlineFlowBox *flowBox, const QFontMetrics &fm, bool left, bool rtl) /*KDE_NO_EXPORT*/
+void CaretBoxLine::addCreatedFlowBoxEdge(InlineFlowBox *flowBox, const TQFontMetrics &fm, bool left, bool rtl) /*KDE_NO_EXPORT*/
{
CaretBox *caretBox = new CaretBox(flowBox, true, !left);
caret_boxes.append(caretBox);
@@ -795,7 +795,7 @@ void CaretBoxLine::addCreatedFlowBoxEdge(InlineFlowBox *flowBox, const QFontMetr
caretBox->_w = 1;
}
-void CaretBoxLine::addCreatedInlineBoxEdge(InlineBox *box, const QFontMetrics &fm, bool left, bool rtl) /*KDE_NO_EXPORT*/
+void CaretBoxLine::addCreatedInlineBoxEdge(InlineBox *box, const TQFontMetrics &fm, bool left, bool rtl) /*KDE_NO_EXPORT*/
{
CaretBox *caretBox = new CaretBox(box, true, !left);
caret_boxes.append(caretBox);
@@ -852,7 +852,7 @@ CaretBoxLine *CaretBoxLine::constructCaretBoxLine(CaretBoxLineDeleter *deleter,
: cb->style();
bool rtl = s->direction() == RTL;
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
height = fm.height();
if (!outsideEnd) {
@@ -875,7 +875,7 @@ CaretBoxLine *CaretBoxLine::constructCaretBoxLine(CaretBoxLineDeleter *deleter,
} else { // !outside
RenderStyle *s = cb->style();
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
height = fm.height();
_x += cb->borderLeft() + cb->paddingLeft();
@@ -908,10 +908,10 @@ CaretBoxLine *CaretBoxLine::constructCaretBoxLine(CaretBoxLineDeleter *deleter,
}
#if DEBUG_CARETMODE > 0
-void CaretBoxLine::dump(QTextStream &ts, const QString &ind) const
+void CaretBoxLine::dump(TQTextStream &ts, const TQString &ind) const
{
ts << ind << "cbl: baseFlowBox@" << basefb << endl;
- QString ind2 = ind + " ";
+ TQString ind2 = ind + " ";
for (size_t i = 0; i < caret_boxes.size(); i++) {
if (i > 0) ts << endl;
caret_boxes[i]->dump(ts, ind2);
@@ -1000,7 +1000,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
outside = false; // text boxes cannot have outside positions
InlineFlowBox *baseFlowBox = seekBaseFlowBox(b, base);
#if DEBUG_CARETMODE > 2
- kdDebug(6200) << "text-box b: " << b << " baseFlowBox: " << baseFlowBox << (b && b->object() ? QString(" contains \"%1\"").arg(QConstString(static_cast<RenderText *>(b->object())->str->s+b->minOffset(), kMin(b->maxOffset() - b->minOffset(), 15L)).string()) : QString::null) << endl;
+ kdDebug(6200) << "text-box b: " << b << " baseFlowBox: " << baseFlowBox << (b && b->object() ? TQString(" contains \"%1\"").arg(TQConstString(static_cast<RenderText *>(b->object())->str->s+b->minOffset(), kMin(b->maxOffset() - b->minOffset(), 15L)).string()) : TQString::null) << endl;
#endif
#if 0
if (t->containingBlock()->isListItem()) dumpLineBoxes(static_cast<RenderFlow *>(t->containingBlock()));
@@ -1153,7 +1153,7 @@ static bool containsEditableElement(KHTMLPart *part, RenderBlock *cb,
tempTable = findTableUpTo(r, cb);
#if DEBUG_CARETMODE > 1
- kdDebug(6201) << "cee: r " << (r ? r->renderName() : QString::null) << "@" << r << " cb " << cb << " withinCb " << withinCb << " modWithinCb " << modWithinCb << " tempTable " << tempTable << endl;
+ kdDebug(6201) << "cee: r " << (r ? r->renderName() : TQString::null) << "@" << r << " cb " << cb << " withinCb " << withinCb << " modWithinCb " << modWithinCb << " tempTable " << tempTable << endl;
#endif
if (r && modWithinCb && r->element() && !isUnsuitable(r, trav)
&& (part->isCaretMode() || part->isEditable()
@@ -1223,7 +1223,7 @@ static bool containsEditableChildElement(KHTMLPart *part, RenderBlock *cb,
tempTable = findTableUpTo(r, cb);
#if DEBUG_CARETMODE > 1
- kdDebug(6201) << "cece: r " << (r ? r->renderName() : QString::null) << "@" << r << " cb " << cb << " withinCb " << withinCb << " modWithinCb " << modWithinCb << " tempTable " << tempTable << endl;
+ kdDebug(6201) << "cece: r " << (r ? r->renderName() : TQString::null) << "@" << r << " cb " << cb << " withinCb " << withinCb << " modWithinCb " << modWithinCb << " tempTable " << tempTable << endl;
#endif
if (r && withinCb && r->element() && !isUnsuitable(r, trav)
&& (part->isCaretMode() || part->isEditable()
@@ -1357,7 +1357,7 @@ void LineIterator::nextBlock()
int state; // not used
mapRenderPosToTraversalState(cb_outside, cb_outside_end, false, trav);
#if DEBUG_CARETMODE > 1
- kdDebug(6200) << "nextBlock: before adv r" << r << " " << (r ? r->renderName() : QString::null) << (r && r->isText() ? " contains \"" + QString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : QString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
+ kdDebug(6200) << "nextBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
#endif
r = advanceSuitableObject(r, trav, false, base, state);
if (!r) {
@@ -1370,7 +1370,7 @@ void LineIterator::nextBlock()
kdDebug(6200) << "nextBlock: after r" << r << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
#endif
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "++: r " << r << "[" << (r?r->renderName():QString::null) << "]" << endl;
+ kdDebug(6200) << "++: r " << r << "[" << (r?r->renderName():TQString::null) << "]" << endl;
#endif
RenderBlock *cb;
@@ -1393,7 +1393,7 @@ void LineIterator::nextBlock()
}/*end if*/
InlineFlowBox *flowBox = cb->firstLineBox();
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "++: flowBox " << flowBox << " cb " << cb << "[" << (cb?cb->renderName()+QString(".node ")+QString::number((unsigned)cb->element(),16)+(cb->element()?"@"+cb->element()->nodeName().string():QString::null):QString::null) << "]" << endl;
+ kdDebug(6200) << "++: flowBox " << flowBox << " cb " << cb << "[" << (cb?cb->renderName()+TQString(".node ")+TQString::number((unsigned)cb->element(),16)+(cb->element()?"@"+cb->element()->nodeName().string():TQString::null):TQString::null) << "]" << endl;
#endif
Q_ASSERT(flowBox);
if (!flowBox) { // ### utter emergency (why is this possible at all?)
@@ -1426,7 +1426,7 @@ void LineIterator::prevBlock()
int state; // not used
mapRenderPosToTraversalState(cb_outside, cb_outside_end, true, trav);
#if DEBUG_CARETMODE > 1
- kdDebug(6200) << "prevBlock: before adv r" << r << " " << (r ? r->renderName() : QString::null) << (r && r->isText() ? " contains \"" + QString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : QString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
+ kdDebug(6200) << "prevBlock: before adv r" << r << " " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
#endif
r = advanceSuitableObject(r, trav, true, base, state);
if (!r) {
@@ -1439,7 +1439,7 @@ void LineIterator::prevBlock()
kdDebug(6200) << "prevBlock: after r" << r << " trav " << trav << " cb_outside " << cb_outside << " cb_outside_end " << cb_outside_end << endl;
#endif
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "--: r " << r << "[" << (r?r->renderName():QString::null) << "]" << endl;
+ kdDebug(6200) << "--: r " << r << "[" << (r?r->renderName():TQString::null) << "]" << endl;
#endif
RenderBlock *cb;
@@ -1463,7 +1463,7 @@ void LineIterator::prevBlock()
}/*end if*/
InlineFlowBox *flowBox = cb->lastLineBox();
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "--: flowBox " << flowBox << " cb " << cb << "[" << (cb?cb->renderName()+QString(".node ")+QString::number((unsigned)cb->element(),16)+(cb->element()?"@"+cb->element()->nodeName().string():QString::null):QString::null) << "]" << endl;
+ kdDebug(6200) << "--: flowBox " << flowBox << " cb " << cb << "[" << (cb?cb->renderName()+TQString(".node ")+TQString::number((unsigned)cb->element(),16)+(cb->element()?"@"+cb->element()->nodeName().string():TQString::null):TQString::null) << "]" << endl;
#endif
Q_ASSERT(flowBox);
if (!flowBox) { // ### utter emergency (why is this possible at all?)
@@ -1518,7 +1518,7 @@ void EditableCaretBoxIterator::advance(bool toBegin)
adjacent = true;
#if DEBUG_CARETMODE > 4
-// kdDebug(6200) << "ebit::advance: before: " << (**this)->object() << "@" << (**this)->object()->renderName() << ".node " << (**this)->object()->element() << "[" << ((**this)->object()->element() ? (**this)->object()->element()->nodeName().string() : QString::null) << "] inline " << (**this)->isInline() << " outside " << (**this)->isOutside() << " outsideEnd " << (**this)->isOutsideEnd() << endl;
+// kdDebug(6200) << "ebit::advance: before: " << (**this)->object() << "@" << (**this)->object()->renderName() << ".node " << (**this)->object()->element() << "[" << ((**this)->object()->element() ? (**this)->object()->element()->nodeName().string() : TQString::null) << "] inline " << (**this)->isInline() << " outside " << (**this)->isOutside() << " outsideEnd " << (**this)->isOutsideEnd() << endl;
#endif
if (toBegin) CaretBoxIterator::operator --(); else CaretBoxIterator::operator ++();
@@ -1538,7 +1538,7 @@ void EditableCaretBoxIterator::advance(bool toBegin)
if (!atEnd) iscominguseable = isEditable(*this, toBegin);
if (iscuruseable) {
#if DEBUG_CARETMODE > 3
- kdDebug(6200) << "ebit::advance: " << (*curbox)->object() << "@" << (*curbox)->object()->renderName() << ".node " << (*curbox)->object()->element() << "[" << ((*curbox)->object()->element() ? (*curbox)->object()->element()->nodeName().string() : QString::null) << "] inline " << (*curbox)->isInline() << " outside " << (*curbox)->isOutside() << " outsideEnd " << (*curbox)->isOutsideEnd() << endl;
+ kdDebug(6200) << "ebit::advance: " << (*curbox)->object() << "@" << (*curbox)->object()->renderName() << ".node " << (*curbox)->object()->element() << "[" << ((*curbox)->object()->element() ? (*curbox)->object()->element()->nodeName().string() : TQString::null) << "] inline " << (*curbox)->isInline() << " outside " << (*curbox)->isOutside() << " outsideEnd " << (*curbox)->isOutsideEnd() << endl;
#endif
CaretBox *box = *curbox;
@@ -1647,7 +1647,7 @@ bool EditableCaretBoxIterator::isEditable(const CaretBoxIterator &boxit, bool fr
RenderObject *r = b->object();
#if DEBUG_CARETMODE > 0
// if (b->isInlineFlowBox()) kdDebug(6200) << "b is inline flow box" << (outside ? " (outside)" : "") << endl;
- kdDebug(6200) << "isEditable r" << r << ": " << (r ? r->renderName() : QString::null) << (r && r->isText() ? " contains \"" + QString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : QString::null) << endl;
+ kdDebug(6200) << "isEditable r" << r << ": " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, QMIN(((RenderText *)r)->str->l,15)) + "\"" : TQString::null) << endl;
#endif
// Must check caret mode or design mode *after* r->element(), otherwise
// lines without a backing DOM node get regarded, leading to a crash.
@@ -1698,7 +1698,7 @@ void EditableLineIterator::advance(bool toBegin)
while (cbl) {
if (isEditable(*this)) {
#if DEBUG_CARETMODE > 3
- kdDebug(6200) << "advance: " << cbl->enclosingObject() << "@" << cbl->enclosingObject()->renderName() << ".node " << cbl->enclosingObject()->element() << "[" << (cbl->enclosingObject()->element() ? cbl->enclosingObject()->element()->nodeName().string() : QString::null) << "]" << endl;
+ kdDebug(6200) << "advance: " << cbl->enclosingObject() << "@" << cbl->enclosingObject()->renderName() << ".node " << cbl->enclosingObject()->element() << "[" << (cbl->enclosingObject()->element() ? cbl->enclosingObject()->element()->nodeName().string() : TQString::null) << "]" << endl;
#endif
bool hasindicated = isIndicatedFlow(cbl->enclosingObject());
@@ -1861,7 +1861,7 @@ kdDebug(6200) << "_offset: " << _offset /*<< " _peekNext: " << _peekNext*/ << "
if (!_end && ebit != (*_it)->end()) {
CaretBox *box = *ebit;
RenderObject *_r = box->object();
- kdDebug(6200) << "echit++(1): box " << box << (box && box->isInlineTextBox() ? QString(" contains \"%1\"").arg(QConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : QString::null) << " _r " << (_r ? _r->element()->nodeName().string() : QString("<nil>")) << endl;
+ kdDebug(6200) << "echit++(1): box " << box << (box && box->isInlineTextBox() ? TQString(" contains \"%1\"").arg(TQConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : TQString::null) << " _r " << (_r ? _r->element()->nodeName().string() : TQString("<nil>")) << endl;
}
#endif
return *this;
@@ -1934,7 +1934,7 @@ kdDebug(6200) << "box " << box << " b " << box->inlineBox() << " isText " << box
// if (!_it.outside) _offset = r->isBR() ? (*ebit)->minOffset() : (*ebit)->maxOffset();
_char = -1;
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "echit--(2): box " << box << " b " << box->inlineBox() << (box->isInlineTextBox() ? QString(" contains \"%1\"").arg(QConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : QString::null) << endl;
+ kdDebug(6200) << "echit--(2): box " << box << " b " << box->inlineBox() << (box->isInlineTextBox() ? TQString(" contains \"%1\"").arg(TQConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : TQString::null) << endl;
#endif
} else
_end = true;
@@ -2000,7 +2000,7 @@ kdDebug(6200) << "_offset: " << _offset << " _peekNext: " << _peekNext << endl;
#if DEBUG_CARETMODE > 0
if (!_end && ebit != (*_it)->preBegin()) {
CaretBox *box = *ebit;
- kdDebug(6200) << "echit--(1): box " << box << " b " << box->inlineBox() << (box->isInlineTextBox() ? QString(" contains \"%1\"").arg(QConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : QString::null) << endl;
+ kdDebug(6200) << "echit--(1): box " << box << " b " << box->inlineBox() << (box->isInlineTextBox() ? TQString(" contains \"%1\"").arg(TQConstString(static_cast<RenderText *>(box->object())->str->s+box->minOffset(), box->maxOffset() - box->minOffset()).string()) : TQString::null) << endl;
}
#endif
return *this;
@@ -2478,7 +2478,7 @@ static CaretBox *nearestCaretBox(LineIterator &it, CaretViewContext *cv,
#if DEBUG_CARETMODE > 0
// RenderObject *r = b->object();
// if (b->isInlineFlowBox()) kdDebug(6200) << "b is inline flow box" << endl;
-// kdDebug(6200) << "approximate r" << r << ": " << (r ? r->renderName() : QString::null) << (r && r->isText() ? " contains \"" + QString(((RenderText *)r)->str->s, ((RenderText *)r)->str->l) + "\"" : QString::null) << endl;
+// kdDebug(6200) << "approximate r" << r << ": " << (r ? r->renderName() : TQString::null) << (r && r->isText() ? " contains \"" + TQString(((RenderText *)r)->str->s, ((RenderText *)r)->str->l) + "\"" : TQString::null) << endl;
#endif
xPos = b->xPos();
diff --git a/khtml/khtml_caret_p.h b/khtml/khtml_caret_p.h
index c96ab965d..04508413a 100644
--- a/khtml/khtml_caret_p.h
+++ b/khtml/khtml_caret_p.h
@@ -23,7 +23,7 @@
#include "rendering/render_table.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#define DEBUG_CARETMODE 0
@@ -112,13 +112,13 @@ class LinearDocument;
* @since 3.3
* @internal
*/
-template<class T> class MassDeleter : public QValueVector<T *> {
+template<class T> class MassDeleter : public TQValueVector<T *> {
public:
MassDeleter(size_t reserved = 1) { this->reserve(reserved); }
~MassDeleter()
{
- typename QValueVector<T *>::Iterator nd = this->end();
- for (typename QValueVector<T *>::Iterator it = this->begin(); it != nd; ++it)
+ typename TQValueVector<T *>::Iterator nd = this->end();
+ for (typename TQValueVector<T *>::Iterator it = this->begin(); it != nd; ++it)
delete *it;
}
};
@@ -218,7 +218,7 @@ public:
long maxOffset() const { return _box && !isLineBreak() ? _box->maxOffset() : 0; }
#if DEBUG_CARETMODE > 0
- void dump(QTextStream &ts, const QString &ind) const;
+ void dump(TQTextStream &ts, const TQString &ind) const;
#endif
friend class CaretBoxLine;
@@ -398,12 +398,12 @@ public:
RenderBox *cb, bool outside, bool outsideEnd, CaretBoxIterator &iter) /*KDE_NO_EXPORT*/;
#if DEBUG_CARETMODE > 0
- void dump(QTextStream &ts, const QString &ind) const;
- QString information() const
+ void dump(TQTextStream &ts, const TQString &ind) const;
+ TQString information() const
{
- QString result;
- QTextStream ts(&result, IO_WriteOnly);
- dump(ts, QString::null);
+ TQString result;
+ TQTextStream ts(&result, IO_WriteOnly);
+ dump(ts, TQString::null);
return result;
}
#endif
@@ -464,7 +464,7 @@ protected:
* @param left true to add left edge, false to add right edge
* @param rtl true if direction is rtl
*/
- void addCreatedInlineBoxEdge(InlineBox *box, const QFontMetrics &fm,
+ void addCreatedInlineBoxEdge(InlineBox *box, const TQFontMetrics &fm,
bool left, bool rtl) /*KDE_NO_EXPORT*/;
/** creates and adds the edge of an inline flow box
* @param flowBox inline flow box
@@ -472,13 +472,13 @@ protected:
* @param left true to add left edge, false to add right edge
* @param rtl true if direction is rtl
*/
- void addCreatedFlowBoxEdge(InlineFlowBox *flowBox, const QFontMetrics &fm,
+ void addCreatedFlowBoxEdge(InlineFlowBox *flowBox, const TQFontMetrics &fm,
bool left, bool rtl) /*KDE_NO_EXPORT*/;
/** creates and adds the inside of an inline flow box
* @param flowBox inline flow box
* @param fm font metrics of inline flow box
*/
- void addCreatedFlowBoxInside(InlineFlowBox *flowBox, const QFontMetrics &fm) /*KDE_NO_EXPORT*/;
+ void addCreatedFlowBoxInside(InlineFlowBox *flowBox, const TQFontMetrics &fm) /*KDE_NO_EXPORT*/;
friend class CaretBoxIterator;
};
@@ -1037,7 +1037,7 @@ public:
/** returns the current character as a unicode symbol, substituting
* a blank for a non-text node.
*/
- QChar operator *() const { return QChar(_char >= 0 ? _char : ' '); }
+ TQChar operator *() const { return TQChar(_char >= 0 ? _char : ' '); }
/** returns true when the end of the document has been reached.
*/
diff --git a/khtml/khtml_events.cpp b/khtml/khtml_events.cpp
index c73d4a5e0..1045a018f 100644
--- a/khtml/khtml_events.cpp
+++ b/khtml/khtml_events.cpp
@@ -27,7 +27,7 @@ class khtml::MouseEvent::MouseEventPrivate
{
};
-khtml::MouseEvent::MouseEvent( const char *name, QMouseEvent *qmouseEvent, int x, int y,
+khtml::MouseEvent::MouseEvent( const char *name, TQMouseEvent *qmouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode )
: KParts::Event( name ), m_qmouseEvent( qmouseEvent ), m_x( x ), m_y( y ),
@@ -78,7 +78,7 @@ public:
}
};
-khtml::DrawContentsEvent::DrawContentsEvent( QPainter *painter, int clipx, int clipy, int clipw, int cliph )
+khtml::DrawContentsEvent::DrawContentsEvent( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
: KParts::Event( s_strDrawContentsEvent ), m_painter( painter ), m_clipx( clipx ), m_clipy( clipy ),
m_clipw( clipw ), m_cliph( cliph )
{
diff --git a/khtml/khtml_events.h b/khtml/khtml_events.h
index 446e5c6dd..223f2b47d 100644
--- a/khtml/khtml_events.h
+++ b/khtml/khtml_events.h
@@ -30,12 +30,12 @@ namespace khtml
class MouseEvent : public KParts::Event
{
public:
- MouseEvent( const char *name, QMouseEvent *qmouseEvent, int x, int y,
+ MouseEvent( const char *name, TQMouseEvent *qmouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode);
virtual ~MouseEvent();
- QMouseEvent *qmouseEvent() const { return m_qmouseEvent; }
+ TQMouseEvent *qmouseEvent() const { return m_qmouseEvent; }
int x() const { return m_x; }
int y() const { return m_y; }
int absX() const { return m_nodeAbsX; }
@@ -49,7 +49,7 @@ public:
long offset() const;
private:
- QMouseEvent *m_qmouseEvent;
+ TQMouseEvent *m_qmouseEvent;
int m_x;
int m_y;
int m_nodeAbsX, m_nodeAbsY;
@@ -63,13 +63,13 @@ private:
class MousePressEvent : public MouseEvent
{
public:
- MousePressEvent( QMouseEvent *mouseEvent, int x, int y,
+ MousePressEvent( TQMouseEvent *mouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode)
: MouseEvent( s_strMousePressEvent, mouseEvent, x, y, url, target, innerNode )
{}
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_strMousePressEvent ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_strMousePressEvent ); }
private:
@@ -80,14 +80,14 @@ class MouseDoubleClickEvent : public MouseEvent
{
public:
// clickCount is 3 for a triple-click event
- MouseDoubleClickEvent( QMouseEvent *mouseEvent, int x, int y,
+ MouseDoubleClickEvent( TQMouseEvent *mouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode, int clickCount = 2 )
: MouseEvent( s_strMouseDoubleClickEvent, mouseEvent, x, y, url, target, innerNode ),
m_clickCount( clickCount )
{}
- static bool test( const QEvent *event )
+ static bool test( const TQEvent *event )
{ return KParts::Event::test( event, s_strMouseDoubleClickEvent ); }
int clickCount() const { return m_clickCount; }
@@ -100,13 +100,13 @@ private:
class MouseMoveEvent : public MouseEvent
{
public:
- MouseMoveEvent( QMouseEvent *mouseEvent, int x, int y,
+ MouseMoveEvent( TQMouseEvent *mouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode)
: MouseEvent( s_strMouseMoveEvent, mouseEvent, x, y, url, target, innerNode )
{}
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_strMouseMoveEvent ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_strMouseMoveEvent ); }
private:
static const char *s_strMouseMoveEvent;
@@ -115,13 +115,13 @@ private:
class MouseReleaseEvent : public MouseEvent
{
public:
- MouseReleaseEvent( QMouseEvent *mouseEvent, int x, int y,
+ MouseReleaseEvent( TQMouseEvent *mouseEvent, int x, int y,
const DOM::DOMString &url, const DOM::DOMString& target,
const DOM::Node &innerNode, long = 0 )
: MouseEvent( s_strMouseReleaseEvent, mouseEvent, x, y, url, target, innerNode )
{}
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_strMouseReleaseEvent ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_strMouseReleaseEvent ); }
private:
static const char *s_strMouseReleaseEvent;
@@ -130,19 +130,19 @@ private:
class DrawContentsEvent : public KParts::Event
{
public:
- DrawContentsEvent( QPainter *painter, int clipx, int clipy, int clipw, int cliph );
+ DrawContentsEvent( TQPainter *painter, int clipx, int clipy, int clipw, int cliph );
virtual ~DrawContentsEvent();
- QPainter *painter() const { return m_painter; }
+ TQPainter *painter() const { return m_painter; }
int clipx() const { return m_clipx; }
int clipy() const { return m_clipy; }
int clipw() const { return m_clipw; }
int cliph() const { return m_cliph; }
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_strDrawContentsEvent ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_strDrawContentsEvent ); }
private:
- QPainter *m_painter;
+ TQPainter *m_painter;
int m_clipx;
int m_clipy;
int m_clipw;
diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp
index 84f7279cf..7097e0b6d 100644
--- a/khtml/khtml_ext.cpp
+++ b/khtml/khtml_ext.cpp
@@ -35,13 +35,13 @@
#include "misc/loader.h"
#include "dom/html_form.h"
#include "dom/html_image.h"
-#include <qclipboard.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qurl.h>
-#include <qmetaobject.h>
+#include <tqclipboard.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqurl.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -93,40 +93,40 @@ int KHTMLPartBrowserExtension::yOffset()
return m_part->view()->contentsY();
}
-void KHTMLPartBrowserExtension::saveState( QDataStream &stream )
+void KHTMLPartBrowserExtension::saveState( TQDataStream &stream )
{
//kdDebug( 6050 ) << "saveState!" << endl;
m_part->saveState( stream );
}
-void KHTMLPartBrowserExtension::restoreState( QDataStream &stream )
+void KHTMLPartBrowserExtension::restoreState( TQDataStream &stream )
{
//kdDebug( 6050 ) << "restoreState!" << endl;
m_part->restoreState( stream );
}
-void KHTMLPartBrowserExtension::editableWidgetFocused( QWidget *widget )
+void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget )
{
m_editableFormWidget = widget;
updateEditActions();
if ( !m_connectedToClipboard && m_editableFormWidget )
{
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( updateEditActions() ) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ this, TQT_SLOT( updateEditActions() ) );
- if ( m_editableFormWidget->inherits( "QLineEdit" ) || m_editableFormWidget->inherits( "QTextEdit" ) )
- connect( m_editableFormWidget, SIGNAL( selectionChanged() ),
- this, SLOT( updateEditActions() ) );
+ if ( m_editableFormWidget->inherits( "TQLineEdit" ) || m_editableFormWidget->inherits( "TQTextEdit" ) )
+ connect( m_editableFormWidget, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( updateEditActions() ) );
m_connectedToClipboard = true;
}
editableWidgetFocused();
}
-void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget * /*widget*/ )
+void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ )
{
- QWidget *oldWidget = m_editableFormWidget;
+ TQWidget *oldWidget = m_editableFormWidget;
m_editableFormWidget = 0;
enableAction( "cut", false );
@@ -135,14 +135,14 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget * /*widget*/ )
if ( m_connectedToClipboard )
{
- disconnect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( updateEditActions() ) );
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ this, TQT_SLOT( updateEditActions() ) );
if ( oldWidget )
{
- if ( oldWidget->inherits( "QLineEdit" ) || oldWidget->inherits( "QTextEdit" ) )
- disconnect( oldWidget, SIGNAL( selectionChanged() ),
- this, SLOT( updateEditActions() ) );
+ if ( oldWidget->inherits( "TQLineEdit" ) || oldWidget->inherits( "TQTextEdit" ) )
+ disconnect( oldWidget, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( updateEditActions() ) );
}
m_connectedToClipboard = false;
@@ -154,14 +154,14 @@ void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *pro
{
if ( m_extensionProxy )
{
- disconnect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
- this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
+ disconnect( m_extensionProxy, TQT_SIGNAL( enableAction( const char *, bool ) ),
+ this, TQT_SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
if ( m_extensionProxy->inherits( "KHTMLPartBrowserExtension" ) )
{
- disconnect( m_extensionProxy, SIGNAL( editableWidgetFocused() ),
- this, SLOT( extensionProxyEditableWidgetFocused() ) );
- disconnect( m_extensionProxy, SIGNAL( editableWidgetBlurred() ),
- this, SLOT( extensionProxyEditableWidgetBlurred() ) );
+ disconnect( m_extensionProxy, TQT_SIGNAL( editableWidgetFocused() ),
+ this, TQT_SLOT( extensionProxyEditableWidgetFocused() ) );
+ disconnect( m_extensionProxy, TQT_SIGNAL( editableWidgetBlurred() ),
+ this, TQT_SLOT( extensionProxyEditableWidgetBlurred() ) );
}
}
@@ -169,14 +169,14 @@ void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *pro
if ( m_extensionProxy )
{
- connect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
- this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
+ connect( m_extensionProxy, TQT_SIGNAL( enableAction( const char *, bool ) ),
+ this, TQT_SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
if ( m_extensionProxy->inherits( "KHTMLPartBrowserExtension" ) )
{
- connect( m_extensionProxy, SIGNAL( editableWidgetFocused() ),
- this, SLOT( extensionProxyEditableWidgetFocused() ) );
- connect( m_extensionProxy, SIGNAL( editableWidgetBlurred() ),
- this, SLOT( extensionProxyEditableWidgetBlurred() ) );
+ connect( m_extensionProxy, TQT_SIGNAL( editableWidgetFocused() ),
+ this, TQT_SLOT( extensionProxyEditableWidgetFocused() ) );
+ connect( m_extensionProxy, TQT_SIGNAL( editableWidgetBlurred() ),
+ this, TQT_SLOT( extensionProxyEditableWidgetBlurred() ) );
}
enableAction( "cut", m_extensionProxy->isActionEnabled( "cut" ) );
@@ -201,10 +201,10 @@ void KHTMLPartBrowserExtension::cut()
if ( !m_editableFormWidget )
return;
- if ( m_editableFormWidget->inherits( "QLineEdit" ) )
- static_cast<QLineEdit *>( &(*m_editableFormWidget) )->cut();
- else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
- static_cast<QTextEdit *>( &(*m_editableFormWidget) )->cut();
+ if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
+ static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->cut();
+ else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
+ static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->cut();
}
void KHTMLPartBrowserExtension::copy()
@@ -219,14 +219,14 @@ void KHTMLPartBrowserExtension::copy()
if ( !m_editableFormWidget )
{
// get selected text and paste to the clipboard
- QString text= m_part->selectedText();
- text.replace( QChar( 0xa0 ), ' ' );
+ TQString text= m_part->selectedText();
+ text.replace( TQChar( 0xa0 ), ' ' );
- QClipboard *cb = QApplication::clipboard();
- disconnect( cb, SIGNAL( selectionChanged() ), m_part, SLOT( slotClearSelection() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) );
#ifndef QT_NO_MIMECLIPBOARD
- QString htmltext;
+ TQString htmltext;
/*
* When selectionModeEnabled, that means the user has just selected
* the text, not ctrl+c to copy it. The selection clipboard
@@ -236,12 +236,12 @@ void KHTMLPartBrowserExtension::copy()
*/
//if(!cb->selectionModeEnabled())
htmltext = m_part->selectedTextAsHTML();
- QTextDrag *textdrag = new QTextDrag(text, 0L);
+ TQTextDrag *textdrag = new TQTextDrag(text, 0L);
KMultipleDrag *drag = new KMultipleDrag( m_editableFormWidget );
drag->addDragObject( textdrag );
if(!htmltext.isEmpty()) {
- htmltext.replace( QChar( 0xa0 ), ' ' );
- QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L);
+ htmltext.replace( TQChar( 0xa0 ), ' ' );
+ TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L);
htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag );
}
@@ -250,32 +250,32 @@ void KHTMLPartBrowserExtension::copy()
cb->setText(text);
#endif
- connect( cb, SIGNAL( selectionChanged() ), m_part, SLOT( slotClearSelection() ) );
+ connect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) );
}
else
{
- if ( m_editableFormWidget->inherits( "QLineEdit" ) )
- static_cast<QLineEdit *>( &(*m_editableFormWidget) )->copy();
- else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
- static_cast<QTextEdit *>( &(*m_editableFormWidget) )->copy();
+ if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
+ static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->copy();
+ else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
+ static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->copy();
}
}
void KHTMLPartBrowserExtension::searchProvider()
{
// action name is of form "previewProvider[<searchproviderprefix>:]"
- const QString searchProviderPrefix = QString( sender()->name() ).mid( 14 );
+ const TQString searchProviderPrefix = TQString( sender()->name() ).mid( 14 );
KURIFilterData data;
- QStringList list;
+ TQStringList list;
data.setData( searchProviderPrefix + m_part->selectedText() );
list << "kurisearchfilter" << "kuriikwsfilter";
if( !KURIFilter::self()->filterURI(data, list) )
{
KDesktopFile file("searchproviders/google.desktop", true, "services");
- QString encodedSearchTerm = m_part->selectedText();
- QUrl::encode(encodedSearchTerm);
+ TQString encodedSearchTerm = m_part->selectedText();
+ TQUrl::encode(encodedSearchTerm);
data.setData(file.readEntry("Query").replace("\\{@}", encodedSearchTerm));
}
@@ -304,10 +304,10 @@ void KHTMLPartBrowserExtension::paste()
if ( !m_editableFormWidget )
return;
- if ( m_editableFormWidget->inherits( "QLineEdit" ) )
- static_cast<QLineEdit *>( &(*m_editableFormWidget) )->paste();
- else if ( m_editableFormWidget->inherits( "QTextEdit" ) )
- static_cast<QTextEdit *>( &(*m_editableFormWidget) )->paste();
+ if ( m_editableFormWidget->inherits( "TQLineEdit" ) )
+ static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->paste();
+ else if ( m_editableFormWidget->inherits( "TQTextEdit" ) )
+ static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->paste();
}
void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method )
@@ -335,19 +335,19 @@ void KHTMLPartBrowserExtension::updateEditActions()
// ### duplicated from KonqMainWindow::slotClipboardDataChanged
#ifndef QT_NO_MIMECLIPBOARD // Handle minimalized versions of Qt Embedded
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
enableAction( "paste", data->provides( "text/plain" ) );
#else
- QString data=QApplication::clipboard()->text();
+ TQString data=TQApplication::clipboard()->text();
enableAction( "paste", data.contains("://"));
#endif
bool hasSelection = false;
if( m_editableFormWidget) {
- if ( ::qt_cast<QLineEdit*>(m_editableFormWidget))
- hasSelection = static_cast<QLineEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
- else if(::qt_cast<QTextEdit*>(m_editableFormWidget))
- hasSelection = static_cast<QTextEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
+ if ( ::qt_cast<TQLineEdit*>(m_editableFormWidget))
+ hasSelection = static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
+ else if(::qt_cast<TQTextEdit*>(m_editableFormWidget))
+ hasSelection = static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
}
enableAction( "copy", hasSelection );
@@ -384,10 +384,10 @@ void KHTMLPartBrowserExtension::print()
void KHTMLPartBrowserExtension::disableScrolling()
{
- QScrollView *scrollView = m_part->view();
+ TQScrollView *scrollView = m_part->view();
if (scrollView) {
- scrollView->setVScrollBarMode(QScrollView::AlwaysOff);
- scrollView->setHScrollBarMode(QScrollView::AlwaysOff);
+ scrollView->setVScrollBarMode(TQScrollView::AlwaysOff);
+ scrollView->setHScrollBarMode(TQScrollView::AlwaysOff);
}
}
@@ -397,13 +397,13 @@ public:
KHTMLPart *m_khtml;
KURL m_url;
KURL m_imageURL;
- QPixmap m_pixmap;
- QString m_suggestedFilename;
+ TQPixmap m_pixmap;
+ TQString m_suggestedFilename;
};
-KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url )
- : QObject( khtml )
+KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const TQString &doc, const KURL &url )
+ : TQObject( khtml )
{
d = new KHTMLPopupGUIClientPrivate;
d->m_khtml = khtml;
@@ -430,7 +430,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
if (hasSelection)
{
- KAction* copyAction = KStdAction::copy( d->m_khtml->browserExtension(), SLOT( copy() ), actionCollection(), "copy" );
+ KAction* copyAction = KStdAction::copy( d->m_khtml->browserExtension(), TQT_SLOT( copy() ), actionCollection(), "copy" );
copyAction->setText(i18n("&Copy Text"));
copyAction->setEnabled(d->m_khtml->browserExtension()->isActionEnabled( "copy" ));
actionCollection()->insert( khtml->actionCollection()->action( "selectAll" ) );
@@ -439,11 +439,11 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
// Fill search provider entries
KConfig config("kuriikwsfilterrc");
config.setGroup("General");
- const QString defaultEngine = config.readEntry("DefaultSearchEngine", "google");
+ const TQString defaultEngine = config.readEntry("DefaultSearchEngine", "google");
const char keywordDelimiter = config.readNumEntry("KeywordDelimiter", ':');
// search text
- QString selectedText = khtml->selectedText();
+ TQString selectedText = khtml->selectedText();
selectedText.replace("&", "&&");
if ( selectedText.length()>18 ) {
selectedText.truncate(15);
@@ -451,23 +451,23 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
}
// default search provider
- KService::Ptr service = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(defaultEngine));
+ KService::Ptr service = KService::serviceByDesktopPath(TQString("searchproviders/%1.desktop").arg(defaultEngine));
// search provider icon
- QPixmap icon;
+ TQPixmap icon;
KURIFilterData data;
- QStringList list;
- data.setData( QString("some keyword") );
+ TQStringList list;
+ data.setData( TQString("some keyword") );
list << "kurisearchfilter" << "kuriikwsfilter";
- QString name;
+ TQString name;
if ( KURIFilter::self()->filterURI(data, list) )
{
- QString iconPath = locate("cache", KMimeType::favIconForURL(data.uri()) + ".png");
+ TQString iconPath = locate("cache", KMimeType::favIconForURL(data.uri()) + ".png");
if ( iconPath.isEmpty() )
icon = SmallIcon("find");
else
- icon = QPixmap( iconPath );
+ icon = TQPixmap( iconPath );
name = service->name();
}
else
@@ -478,37 +478,37 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
// using .arg(foo, bar) instead of .arg(foo).arg(bar), as foo can contain %x
new KAction( i18n( "Search for '%1' with %2" ).arg( selectedText, name ), icon, 0, d->m_khtml->browserExtension(),
- SLOT( searchProvider() ), actionCollection(), "searchProvider" );
+ TQT_SLOT( searchProvider() ), actionCollection(), "searchProvider" );
// favorite search providers
- QStringList favoriteEngines;
+ TQStringList favoriteEngines;
favoriteEngines << "google" << "google_groups" << "google_news" << "webster" << "dmoz" << "wikipedia";
favoriteEngines = config.readListEntry("FavoriteSearchEngines", favoriteEngines);
if ( !favoriteEngines.isEmpty()) {
KActionMenu* providerList = new KActionMenu( i18n( "Search for '%1' with" ).arg( selectedText ), actionCollection(), "searchProviderList" );
- QStringList::ConstIterator it = favoriteEngines.begin();
+ TQStringList::ConstIterator it = favoriteEngines.begin();
for ( ; it != favoriteEngines.end(); ++it ) {
if (*it==defaultEngine)
continue;
- service = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(*it));
+ service = KService::serviceByDesktopPath(TQString("searchproviders/%1.desktop").arg(*it));
if (!service)
continue;
- const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter;
+ const TQString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter;
data.setData( searchProviderPrefix + "some keyword" );
if ( KURIFilter::self()->filterURI(data, list) )
{
- QString iconPath = locate("cache", KMimeType::favIconForURL(data.uri()) + ".png");
+ TQString iconPath = locate("cache", KMimeType::favIconForURL(data.uri()) + ".png");
if ( iconPath.isEmpty() )
icon = SmallIcon("find");
else
- icon = QPixmap( iconPath );
+ icon = TQPixmap( iconPath );
name = service->name();
providerList->insert( new KAction( name, icon, 0, d->m_khtml->browserExtension(),
- SLOT( searchProvider() ), actionCollection(), QString( "searchProvider" + searchProviderPrefix ).latin1() ) );
+ TQT_SLOT( searchProvider() ), actionCollection(), TQString( "searchProvider" + searchProviderPrefix ).latin1() ) );
}
}
}
@@ -516,13 +516,13 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
if ( selectedText.contains("://") && KURL(selectedText).isValid() )
new KAction( i18n( "Open '%1'" ).arg( selectedText ), "window_new", 0,
- d->m_khtml->browserExtension(), SLOT( openSelection() ), actionCollection(), "openSelection" );
+ d->m_khtml->browserExtension(), TQT_SLOT( openSelection() ), actionCollection(), "openSelection" );
}
else if ( url.isEmpty() && !isImage )
{
actionCollection()->insert( khtml->actionCollection()->action( "security" ) );
actionCollection()->insert( khtml->actionCollection()->action( "setEncoding" ) );
- new KAction( i18n( "Stop Animations" ), 0, this, SLOT( slotStopAnimations() ),
+ new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ),
actionCollection(), "stopanimations" );
}
@@ -530,14 +530,14 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
{
if (url.protocol() == "mailto")
{
- new KAction( i18n( "Copy Email Address" ), 0, this, SLOT( slotCopyLinkLocation() ),
+ new KAction( i18n( "Copy Email Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ),
actionCollection(), "copylinklocation" );
}
else
{
- new KAction( i18n( "&Save Link As..." ), 0, this, SLOT( slotSaveLinkAs() ),
+ new KAction( i18n( "&Save Link As..." ), 0, this, TQT_SLOT( slotSaveLinkAs() ),
actionCollection(), "savelinkas" );
- new KAction( i18n( "Copy &Link Address" ), 0, this, SLOT( slotCopyLinkLocation() ),
+ new KAction( i18n( "Copy &Link Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ),
actionCollection(), "copylinklocation" );
}
}
@@ -547,28 +547,28 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
{
if ( khtml->parentPart() )
{
- new KAction( i18n( "Open in New &Window" ), "window_new", 0, this, SLOT( slotFrameInWindow() ),
+ new KAction( i18n( "Open in New &Window" ), "window_new", 0, this, TQT_SLOT( slotFrameInWindow() ),
actionCollection(), "frameinwindow" );
- new KAction( i18n( "Open in &This Window" ), 0, this, SLOT( slotFrameInTop() ),
+ new KAction( i18n( "Open in &This Window" ), 0, this, TQT_SLOT( slotFrameInTop() ),
actionCollection(), "frameintop" );
- new KAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, SLOT( slotFrameInTab() ),
+ new KAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, TQT_SLOT( slotFrameInTab() ),
actionCollection(), "frameintab" );
- new KAction( i18n( "Reload Frame" ), 0, this, SLOT( slotReloadFrame() ),
+ new KAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ),
actionCollection(), "reloadframe" );
if ( KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() ) {
if ( khtml->d->m_frame->m_type == khtml::ChildFrame::IFrame )
- new KAction( i18n( "Block IFrame..." ), 0, this, SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" );
+ new KAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" );
}
- new KAction( i18n( "View Frame Source" ), 0, d->m_khtml, SLOT( slotViewDocumentSource() ),
+ new KAction( i18n( "View Frame Source" ), 0, d->m_khtml, TQT_SLOT( slotViewDocumentSource() ),
actionCollection(), "viewFrameSource" );
- new KAction( i18n( "View Frame Information" ), 0, d->m_khtml, SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" );
+ new KAction( i18n( "View Frame Information" ), 0, d->m_khtml, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" );
// This one isn't in khtml_popupmenu.rc anymore, because Print isn't either,
// and because print frame is already in the toolbar and the menu.
// But leave this here, so that it's easy to read it.
- new KAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_khtml->browserExtension(), SLOT( print() ), actionCollection(), "printFrame" );
- new KAction( i18n( "Save &Frame As..." ), 0, d->m_khtml, SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
+ new KAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_khtml->browserExtension(), TQT_SLOT( print() ), actionCollection(), "printFrame" );
+ new KAction( i18n( "Save &Frame As..." ), 0, d->m_khtml, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
actionCollection()->insert( khtml->parentPart()->actionCollection()->action( "viewDocumentSource" ) );
actionCollection()->insert( khtml->parentPart()->actionCollection()->action( "viewPageInfo" ) );
@@ -579,7 +579,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
} else if (isImage || !url.isEmpty()) {
actionCollection()->insert( khtml->actionCollection()->action( "viewDocumentSource" ) );
actionCollection()->insert( khtml->actionCollection()->action( "viewPageInfo" ) );
- new KAction( i18n( "Stop Animations" ), 0, this, SLOT( slotStopAnimations() ),
+ new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ),
actionCollection(), "stopanimations" );
}
@@ -598,44 +598,44 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc,
}
else
d->m_imageURL = KURL( static_cast<DOM::HTMLInputElement>( e ).src().string() );
- new KAction( i18n( "Save Image As..." ), 0, this, SLOT( slotSaveImageAs() ),
+ new KAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveImageAs() ),
actionCollection(), "saveimageas" );
- new KAction( i18n( "Send Image..." ), 0, this, SLOT( slotSendImage() ),
+ new KAction( i18n( "Send Image..." ), 0, this, TQT_SLOT( slotSendImage() ),
actionCollection(), "sendimage" );
#ifndef QT_NO_MIMECLIPBOARD
- (new KAction( i18n( "Copy Image" ), 0, this, SLOT( slotCopyImage() ),
+ (new KAction( i18n( "Copy Image" ), 0, this, TQT_SLOT( slotCopyImage() ),
actionCollection(), "copyimage" ))->setEnabled(!d->m_pixmap.isNull());
#endif
if(d->m_pixmap.isNull()) { //fallback to image location if still loading the image. this will always be true if ifdef QT_NO_MIMECLIPBOARD
- new KAction( i18n( "Copy Image Location" ), 0, this, SLOT( slotCopyImageLocation() ),
+ new KAction( i18n( "Copy Image Location" ), 0, this, TQT_SLOT( slotCopyImageLocation() ),
actionCollection(), "copyimagelocation" );
}
- QString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25);
- new KAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, SLOT( slotViewImage() ),
+ TQString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25);
+ new KAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ),
actionCollection(), "viewimage" );
if (KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled())
{
- new KAction( i18n( "Block Image..." ), 0, this, SLOT( slotBlockImage() ),
+ new KAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ),
actionCollection(), "blockimage" );
if (!d->m_imageURL.host().isEmpty() &&
!d->m_imageURL.protocol().isEmpty())
{
- new KAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, SLOT( slotBlockHost() ),
+ new KAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, TQT_SLOT( slotBlockHost() ),
actionCollection(), "blockhost" );
}
}
}
setXML( doc );
- setDOMDocument( QDomDocument(), true ); // ### HACK
+ setDOMDocument( TQDomDocument(), true ); // ### HACK
- QDomElement menu = domDocument().documentElement().namedItem( "Menu" ).toElement();
+ TQDomElement menu = domDocument().documentElement().namedItem( "Menu" ).toElement();
if ( actionCollection()->count() > 0 )
menu.insertBefore( domDocument().createElement( "separator" ), menu.firstChild() );
@@ -655,12 +655,12 @@ void KHTMLPopupGUIClient::slotSaveLinkAs()
void KHTMLPopupGUIClient::slotSendImage()
{
- QStringList urls;
+ TQStringList urls;
urls.append( d->m_imageURL.url());
- QString subject = d->m_imageURL.url();
- kapp->invokeMailer(QString::null, QString::null, QString::null, subject,
- QString::null, //body
- QString::null,
+ TQString subject = d->m_imageURL.url();
+ kapp->invokeMailer(TQString::null, TQString::null, TQString::null, subject,
+ TQString::null, //body
+ TQString::null,
urls); // attachments
@@ -670,12 +670,12 @@ void KHTMLPopupGUIClient::slotSaveImageAs()
{
KIO::MetaData metaData;
metaData["referrer"] = d->m_khtml->referrer();
- saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, QString::null, 0, d->m_suggestedFilename );
+ saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, TQString::null, 0, d->m_suggestedFilename );
}
void KHTMLPopupGUIClient::slotBlockHost()
{
- QString name=d->m_imageURL.protocol()+"://"+d->m_imageURL.host()+"/*";
+ TQString name=d->m_imageURL.protocol()+"://"+d->m_imageURL.host()+"/*";
KHTMLFactory::defaultHTMLSettings()->addAdFilter( name );
d->m_khtml->reparseConfiguration();
}
@@ -684,7 +684,7 @@ void KHTMLPopupGUIClient::slotBlockImage()
{
bool ok = false;
- QString url = KInputDialog::getText( i18n("Add URL to Filter"),
+ TQString url = KInputDialog::getText( i18n("Add URL to Filter"),
i18n("Enter the URL:"),
d->m_imageURL.url(),
&ok);
@@ -697,7 +697,7 @@ void KHTMLPopupGUIClient::slotBlockImage()
void KHTMLPopupGUIClient::slotBlockIFrame()
{
bool ok = false;
- QString url = KInputDialog::getText( i18n( "Add URL to Filter"),
+ TQString url = KInputDialog::getText( i18n( "Add URL to Filter"),
i18n("Enter the URL:"),
d->m_khtml->url().url(),
&ok );
@@ -710,15 +710,15 @@ void KHTMLPopupGUIClient::slotBlockIFrame()
void KHTMLPopupGUIClient::slotCopyLinkLocation()
{
KURL safeURL(d->m_url);
- safeURL.setPass(QString::null);
+ safeURL.setPass(TQString::null);
#ifndef QT_NO_MIMECLIPBOARD
// Set it in both the mouse selection and in the clipboard
KURL::List lst;
lst.append( safeURL );
- QApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
- QApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
+ TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
#else
- QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
#endif
}
@@ -731,18 +731,18 @@ void KHTMLPopupGUIClient::slotCopyImage()
{
#ifndef QT_NO_MIMECLIPBOARD
KURL safeURL(d->m_imageURL);
- safeURL.setPass(QString::null);
+ safeURL.setPass(TQString::null);
KURL::List lst;
lst.append( safeURL );
KMultipleDrag *drag = new KMultipleDrag(d->m_khtml->view(), "Image");
- drag->addDragObject( new QImageDrag(d->m_pixmap.convertToImage()) );
+ drag->addDragObject( new TQImageDrag(d->m_pixmap.convertToImage()) );
drag->addDragObject( new KURLDrag(lst, d->m_khtml->view(), "Image URL") );
// Set it in both the mouse selection and in the clipboard
- QApplication::clipboard()->setData( drag, QClipboard::Clipboard );
- QApplication::clipboard()->setData( new KURLDrag(lst), QClipboard::Selection );
+ TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( new KURLDrag(lst), QClipboard::Selection );
#else
kdDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible." << endl;
#endif
@@ -751,15 +751,15 @@ void KHTMLPopupGUIClient::slotCopyImage()
void KHTMLPopupGUIClient::slotCopyImageLocation()
{
KURL safeURL(d->m_imageURL);
- safeURL.setPass(QString::null);
+ safeURL.setPass(TQString::null);
#ifndef QT_NO_MIMECLIPBOARD
// Set it in both the mouse selection and in the clipboard
KURL::List lst;
lst.append( safeURL );
- QApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
- QApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
+ TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( new KURLDrag( lst ), QClipboard::Selection );
#else
- QApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
+ TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
#endif
}
@@ -803,13 +803,13 @@ void KHTMLPopupGUIClient::slotFrameInTab()
emit d->m_khtml->browserExtension()->createNewWindow( d->m_khtml->url(), args );
}
-void KHTMLPopupGUIClient::saveURL( QWidget *parent, const QString &caption,
+void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption,
const KURL &url,
- const QMap<QString, QString> &metadata,
- const QString &filter, long cacheId,
- const QString & suggestedFilename )
+ const TQMap<TQString, TQString> &metadata,
+ const TQString &filter, long cacheId,
+ const TQString & suggestedFilename )
{
- QString name = QString::fromLatin1( "index.html" );
+ TQString name = TQString::fromLatin1( "index.html" );
if ( !suggestedFilename.isEmpty() )
name = suggestedFilename;
else if ( !url.fileName().isEmpty() )
@@ -822,7 +822,7 @@ void KHTMLPopupGUIClient::saveURL( QWidget *parent, const QString &caption,
destURL = KFileDialog::getSaveURL( name, filter, parent, caption );
if( destURL.isLocalFile() )
{
- QFileInfo info( destURL.path() );
+ TQFileInfo info( destURL.path() );
if( info.exists() ) {
// TODO: use KIO::RenameDlg (shows more information)
query = KMessageBox::warningContinueCancel( parent, i18n( "A file named \"%1\" already exists. " "Are you sure you want to overwrite it?" ).arg( info.fileName() ), i18n( "Overwrite File?" ), i18n( "Overwrite" ) );
@@ -835,7 +835,7 @@ void KHTMLPopupGUIClient::saveURL( QWidget *parent, const QString &caption,
}
void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL,
- const QMap<QString, QString> &metadata,
+ const TQMap<TQString, TQString> &metadata,
long cacheId )
{
if ( destURL.isValid() )
@@ -878,25 +878,25 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL,
{
KConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
- QString downloadManger = cfg.readPathEntry("DownloadManager");
+ TQString downloadManger = cfg.readPathEntry("DownloadManager");
if (!downloadManger.isEmpty())
{
// then find the download manager location
kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
- QString cmd = KStandardDirs::findExe(downloadManger);
+ TQString cmd = KStandardDirs::findExe(downloadManger);
if (cmd.isEmpty())
{
- QString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
- QString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
+ TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
+ TQString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
KMessageBox::detailedSorry(0,errMsg,errMsgEx);
- cfg.writePathEntry("DownloadManager",QString::null);
+ cfg.writePathEntry("DownloadManager",TQString::null);
cfg.sync ();
}
else
{
downloadViaKIO = false;
KURL cleanDest = destURL;
- cleanDest.setPass( QString::null ); // don't put password into commandline
+ cleanDest.setPass( TQString::null ); // don't put password into commandline
cmd += " " + KProcess::quote(url.url()) + " " +
KProcess::quote(cleanDest.url());
kdDebug(1000) << "Calling command "<<cmd<<endl;
@@ -927,12 +927,12 @@ KHTMLPartBrowserHostExtension::~KHTMLPartBrowserHostExtension()
{
}
-QStringList KHTMLPartBrowserHostExtension::frameNames() const
+TQStringList KHTMLPartBrowserHostExtension::frameNames() const
{
return m_part->frameNames();
}
-const QPtrList<KParts::ReadOnlyPart> KHTMLPartBrowserHostExtension::frames() const
+const TQPtrList<KParts::ReadOnlyPart> KHTMLPartBrowserHostExtension::frames() const
{
return m_part->frames();
}
@@ -961,13 +961,13 @@ extern const int KDE_NO_EXPORT fastZoomSizes[];
extern const int KDE_NO_EXPORT fastZoomSizeCount;
// BCI: remove in KDE 4
-KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name )
+KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name )
: KAction( text, icon, 0, receiver, slot, parent, name )
{
init(part, direction);
}
-KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const KShortcut &cut, const QObject *receiver, const char *slot, QObject *parent, const char *name )
+KHTMLZoomFactorAction::KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name )
: KAction( text, icon, cut, receiver, slot, parent, name )
{
init(part, direction);
@@ -989,14 +989,14 @@ void KHTMLZoomFactorAction::init(KHTMLPart *part, bool direction)
for ( int i = m; i != m*(ofs+1); i += m )
{
int num = i * m;
- QString numStr = QString::number( num );
+ TQString numStr = TQString::number( num );
if ( num > 0 ) numStr.prepend( '+' );
// xgettext: no-c-format
m_popup->insertItem( i18n( "%1%" ).arg( fastZoomSizes[ofs + i] ) );
}
- connect( m_popup, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( m_popup, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
KHTMLZoomFactorAction::~KHTMLZoomFactorAction()
@@ -1004,7 +1004,7 @@ KHTMLZoomFactorAction::~KHTMLZoomFactorAction()
delete m_popup;
}
-int KHTMLZoomFactorAction::plug( QWidget *w, int index )
+int KHTMLZoomFactorAction::plug( TQWidget *w, int index )
{
int containerId = KAction::plug( w, index );
if ( containerId == -1 || !w->inherits( "KToolBar" ) )
diff --git a/khtml/khtml_ext.h b/khtml/khtml_ext.h
index 4d118b9c8..47ab97228 100644
--- a/khtml/khtml_ext.h
+++ b/khtml/khtml_ext.h
@@ -29,7 +29,7 @@
#include "khtml_part.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
#include <kio/global.h>
@@ -49,12 +49,12 @@ public:
virtual int xOffset();
virtual int yOffset();
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
// internal
- void editableWidgetFocused( QWidget *widget );
- void editableWidgetBlurred( QWidget *widget );
+ void editableWidgetFocused( TQWidget *widget );
+ void editableWidgetBlurred( TQWidget *widget );
void setExtensionProxy( KParts::BrowserExtension *proxyExtension );
@@ -85,8 +85,8 @@ private:
void callExtensionProxyMethod( const char *method );
KHTMLPart *m_part;
- QGuardedPtr<QWidget> m_editableFormWidget;
- QGuardedPtr<KParts::BrowserExtension> m_extensionProxy;
+ TQGuardedPtr<TQWidget> m_editableFormWidget;
+ TQGuardedPtr<KParts::BrowserExtension> m_extensionProxy;
bool m_connectedToClipboard;
};
@@ -96,9 +96,9 @@ public:
KHTMLPartBrowserHostExtension( KHTMLPart *part );
virtual ~KHTMLPartBrowserHostExtension();
- virtual QStringList frameNames() const;
+ virtual TQStringList frameNames() const;
- virtual const QPtrList<KParts::ReadOnlyPart> frames() const;
+ virtual const TQPtrList<KParts::ReadOnlyPart> frames() const;
virtual bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs );
@@ -112,20 +112,20 @@ private:
* @internal
* INTERNAL class. *NOT* part of the public API.
*/
-class KHTMLPopupGUIClient : public QObject, public KXMLGUIClient
+class KHTMLPopupGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
- KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url );
+ KHTMLPopupGUIClient( KHTMLPart *khtml, const TQString &doc, const KURL &url );
virtual ~KHTMLPopupGUIClient();
- static void saveURL( QWidget *parent, const QString &caption, const KURL &url,
- const QMap<QString, QString> &metaData = KIO::MetaData(),
- const QString &filter = QString::null, long cacheId = 0,
- const QString &suggestedFilename = QString::null );
+ static void saveURL( TQWidget *parent, const TQString &caption, const KURL &url,
+ const TQMap<TQString, TQString> &metaData = KIO::MetaData(),
+ const TQString &filter = TQString::null, long cacheId = 0,
+ const TQString &suggestedFilename = TQString::null );
static void saveURL( const KURL &url, const KURL &destination,
- const QMap<QString, QString> &metaData = KIO::MetaData(),
+ const TQMap<TQString, TQString> &metaData = KIO::MetaData(),
long cacheId = 0 );
private slots:
void slotSaveLinkAs();
@@ -154,13 +154,13 @@ class KHTMLZoomFactorAction : public KAction
Q_OBJECT
public:
//BCI: remove in KDE 4
- KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name );
- KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text,
- const QString &icon, const KShortcut& cut, const QObject *receiver,
- const char *slot, QObject *parent, const char *name );
+ KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name );
+ KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const TQString &text,
+ const TQString &icon, const KShortcut& cut, const TQObject *receiver,
+ const char *slot, TQObject *parent, const char *name );
virtual ~KHTMLZoomFactorAction();
- virtual int plug( QWidget *widget, int index );
+ virtual int plug( TQWidget *widget, int index );
private slots:
void slotActivated( int );
@@ -169,7 +169,7 @@ protected slots:
private:
void init(KHTMLPart *part, bool direction);
private:
- QPopupMenu *m_popup;
+ TQPopupMenu *m_popup;
bool m_direction;
KHTMLPart *m_part;
};
diff --git a/khtml/khtml_factory.cpp b/khtml/khtml_factory.cpp
index e265073d3..7eedc6311 100644
--- a/khtml/khtml_factory.cpp
+++ b/khtml/khtml_factory.cpp
@@ -37,7 +37,7 @@
#include <kdebug.h>
-template class QPtrList<KHTMLPart>;
+template class TQPtrList<KHTMLPart>;
extern "C" KDE_EXPORT void *init_libkhtml()
{
@@ -61,8 +61,8 @@ unsigned long int KHTMLFactory::s_refcnt = 0;
KInstance *KHTMLFactory::s_instance = 0;
KAboutData *KHTMLFactory::s_about = 0;
KHTMLSettings *KHTMLFactory::s_settings = 0;
-QPtrList<KHTMLPart> *KHTMLFactory::s_parts = 0;
-QString *KHTMLSettings::avFamilies = 0;
+TQPtrList<KHTMLPart> *KHTMLFactory::s_parts = 0;
+TQString *KHTMLSettings::avFamilies = 0;
KHTMLFactory::KHTMLFactory( bool clone )
{
@@ -103,7 +103,7 @@ KHTMLFactory::~KHTMLFactory()
deref();
}
-KParts::Part *KHTMLFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList & )
+KParts::Part *KHTMLFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList & )
{
KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI;
if ( strcmp( className, "Browser/View" ) == 0 )
@@ -118,7 +118,7 @@ void KHTMLFactory::ref()
{
// we can't use a staticdeleter here, because that would mean
// that the factory gets deleted from within a qPostRoutine, called
- // from the QApplication destructor. That however is too late, because
+ // from the TQApplication destructor. That however is too late, because
// we want to destruct a KInstance object, which involves destructing
// a KConfig object, which might call KGlobal::dirs() (in sync()) which
// probably is not going to work ;-)
@@ -144,7 +144,7 @@ void KHTMLFactory::deref()
void KHTMLFactory::registerPart( KHTMLPart *part )
{
if ( !s_parts )
- s_parts = new QPtrList<KHTMLPart>;
+ s_parts = new TQPtrList<KHTMLPart>;
if ( !s_parts->containsRef( part ) )
{
diff --git a/khtml/khtml_factory.h b/khtml/khtml_factory.h
index 1b7208c7a..e9d5c62a8 100644
--- a/khtml/khtml_factory.h
+++ b/khtml/khtml_factory.h
@@ -22,7 +22,7 @@
#include <kparts/factory.h>
#include <kparts/historyprovider.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
class KInstance;
@@ -45,12 +45,12 @@ public:
KHTMLFactory( bool clone = false );
virtual ~KHTMLFactory();
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args );
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList &args );
static void registerPart( KHTMLPart *part );
static void deregisterPart( KHTMLPart *part );
- static QPtrList<KHTMLPart> *partList() { return s_parts; }
+ static TQPtrList<KHTMLPart> *partList() { return s_parts; }
static KInstance *instance();
@@ -70,7 +70,7 @@ private:
static KInstance *s_instance;
static KAboutData *s_about;
static KHTMLSettings *s_settings;
- static QPtrList<KHTMLPart> *s_parts;
+ static TQPtrList<KHTMLPart> *s_parts;
};
#endif
diff --git a/khtml/khtml_iface.cc b/khtml/khtml_iface.cc
index 4829624b9..2746ba0d2 100644
--- a/khtml/khtml_iface.cc
+++ b/khtml/khtml_iface.cc
@@ -23,8 +23,8 @@
#include "khtmlview.h"
#include "khtml_ext.h"
#include <kio/global.h>
-#include <qapplication.h>
-#include <qvariant.h>
+#include <tqapplication.h>
+#include <tqvariant.h>
KHTMLPartIface::KHTMLPartIface( KHTMLPart *_part )
: DCOPObject( _part->dcopObjectId() ), part(_part)
@@ -115,23 +115,23 @@ bool KHTMLPartIface::onlyLocalReferences() const
return part->onlyLocalReferences();
}
-bool KHTMLPartIface::setEncoding( const QString &name )
+bool KHTMLPartIface::setEncoding( const TQString &name )
{
return part->setEncoding(name);
}
-QString KHTMLPartIface::encoding() const
+TQString KHTMLPartIface::encoding() const
{
return part->encoding();
}
-void KHTMLPartIface::setFixedFont( const QString &name )
+void KHTMLPartIface::setFixedFont( const TQString &name )
{
part->setFixedFont(name);
}
-bool KHTMLPartIface::gotoAnchor( const QString &name )
+bool KHTMLPartIface::gotoAnchor( const TQString &name )
{
return part->gotoAnchor(name);
}
@@ -150,8 +150,8 @@ void KHTMLPartIface::activateNode()
{
KParts::ReadOnlyPart* p = part->currentFrame();
if ( p && p->widget() ) {
- QKeyEvent ev( QKeyEvent::KeyPress, Qt::Key_Return, '\n', 0, "\n" );
- QApplication::sendEvent( p->widget(), &ev );
+ TQKeyEvent ev( TQKeyEvent::KeyPress, Qt::Key_Return, '\n', 0, "\n" );
+ TQApplication::sendEvent( p->widget(), &ev );
}
}
@@ -160,7 +160,7 @@ void KHTMLPartIface::selectAll()
part->selectAll();
}
-QString KHTMLPartIface::lastModified() const
+TQString KHTMLPartIface::lastModified() const
{
return part->lastModified();
}
@@ -185,7 +185,7 @@ void KHTMLPartIface::viewDocumentSource()
part->slotViewDocumentSource();
}
-void KHTMLPartIface::saveBackground(const QString &destination)
+void KHTMLPartIface::saveBackground(const TQString &destination)
{
KURL back = part->backgroundURL();
if (back.isEmpty())
@@ -196,7 +196,7 @@ void KHTMLPartIface::saveBackground(const QString &destination)
KHTMLPopupGUIClient::saveURL( back, KURL( destination ), metaData );
}
-void KHTMLPartIface::saveDocument(const QString &destination)
+void KHTMLPartIface::saveDocument(const TQString &destination)
{
KURL srcURL( part->url() );
@@ -208,12 +208,12 @@ void KHTMLPartIface::saveDocument(const QString &destination)
KHTMLPopupGUIClient::saveURL( srcURL, KURL( destination ), metaData, part->cacheId() );
}
-void KHTMLPartIface::setUserStyleSheet(const QString &styleSheet)
+void KHTMLPartIface::setUserStyleSheet(const TQString &styleSheet)
{
part->setUserStyleSheet(styleSheet);
}
-QString KHTMLPartIface::selectedText() const
+TQString KHTMLPartIface::selectedText() const
{
return part->selectedText();
}
@@ -223,7 +223,7 @@ void KHTMLPartIface::viewFrameSource()
part->slotViewFrameSource();
}
-QString KHTMLPartIface::evalJS(const QString &script)
+TQString KHTMLPartIface::evalJS(const TQString &script)
{
return part->executeScript(DOM::Node(), script).toString();
}
diff --git a/khtml/khtml_iface.h b/khtml/khtml_iface.h
index 9719eb21b..8caade850 100644
--- a/khtml/khtml_iface.h
+++ b/khtml/khtml_iface.h
@@ -141,14 +141,14 @@ k_dcop:
* This can be different from the charset. The widget will try to reload
* the current page in the new encoding, if url() is not empty.
*/
- bool setEncoding( const QString &name );
+ bool setEncoding( const TQString &name );
/**
* Returns the encoding the page currently uses.
*
* Note that the encoding might be different from the charset.
*/
- QString encoding() const;
+ TQString encoding() const;
/**
* Sets a user defined style sheet to be used on top of the HTML 4
@@ -157,7 +157,7 @@ k_dcop:
* This gives a wide range of possibilities to
* change the layout of the page.
*/
- void setUserStyleSheet(const QString &styleSheet);
+ void setUserStyleSheet(const TQString &styleSheet);
/**
* Sets the fixed font style.
@@ -165,7 +165,7 @@ k_dcop:
* @param name The font name to use for fixed text, e.g.
* the <tt>&lt;pre&gt;</tt> tag.
*/
- void setFixedFont( const QString &name );
+ void setFixedFont( const TQString &name );
/**
* Finds the anchor named @p name.
@@ -174,7 +174,7 @@ k_dcop:
* scrolls to the closest position. Returns @p true if the anchor has
* been found.
*/
- bool gotoAnchor( const QString &name );
+ bool gotoAnchor( const TQString &name );
/**
* Go to next Anchor.
@@ -199,7 +199,7 @@ k_dcop:
/**
* Returns the text the user has marked.
*/
- QString selectedText() const;
+ TQString selectedText() const;
/**
* Marks all text in the document as selected.
@@ -209,7 +209,7 @@ k_dcop:
/**
* Last-modified date (in raw string format), if received in the [HTTP] headers.
*/
- QString lastModified() const;
+ TQString lastModified() const;
/**
* Print the contents of the current html view.
@@ -221,13 +221,13 @@ k_dcop:
void debugDOMTree();
void viewDocumentSource();
void viewFrameSource();
- void saveBackground(const QString &url);
- void saveDocument(const QString &url);
+ void saveBackground(const TQString &url);
+ void saveDocument(const TQString &url);
/**
* Evaluate a given piece of Javascript code
*/
- QString evalJS(const QString &script);
+ TQString evalJS(const TQString &script);
/**
* Stops display of animated images
diff --git a/khtml/khtml_pagecache.cpp b/khtml/khtml_pagecache.cpp
index 88c523a2b..935f31cc0 100644
--- a/khtml/khtml_pagecache.cpp
+++ b/khtml/khtml_pagecache.cpp
@@ -24,8 +24,8 @@
#include <ktempfile.h>
#include <kstandarddirs.h>
-#include <qintdict.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqtimer.h>
#include <sys/types.h>
#include <unistd.h>
@@ -36,7 +36,7 @@
#define KHTML_PAGE_CACHE_SIZE 12
#endif
-template class QPtrList<KHTMLPageCacheDelivery>;
+template class TQPtrList<KHTMLPageCacheDelivery>;
class KHTMLPageCacheEntry
{
friend class KHTMLPageCache;
@@ -45,18 +45,18 @@ public:
~KHTMLPageCacheEntry();
- void addData(const QByteArray &data);
+ void addData(const TQByteArray &data);
void endData();
bool isComplete()
{ return m_complete; }
- KHTMLPageCacheDelivery *fetchData(QObject *recvObj, const char *recvSlot);
+ KHTMLPageCacheDelivery *fetchData(TQObject *recvObj, const char *recvSlot);
private:
long m_id;
bool m_complete;
- QValueList<QByteArray> m_data;
+ TQValueList<TQByteArray> m_data;
KTempFile *m_file;
};
@@ -64,15 +64,15 @@ class KHTMLPageCachePrivate
{
public:
long newId;
- QIntDict<KHTMLPageCacheEntry> dict;
- QPtrList<KHTMLPageCacheDelivery> delivery;
- QPtrList<KHTMLPageCacheEntry> expireQueue;
+ TQIntDict<KHTMLPageCacheEntry> dict;
+ TQPtrList<KHTMLPageCacheDelivery> delivery;
+ TQPtrList<KHTMLPageCacheEntry> expireQueue;
bool deliveryActive;
};
KHTMLPageCacheEntry::KHTMLPageCacheEntry(long id) : m_id(id), m_complete(false)
{
- QString path = locateLocal("tmp", "khtmlcache");
+ TQString path = locateLocal("tmp", "khtmlcache");
m_file = new KTempFile(path);
m_file->unlink();
}
@@ -84,7 +84,7 @@ KHTMLPageCacheEntry::~KHTMLPageCacheEntry()
void
-KHTMLPageCacheEntry::addData(const QByteArray &data)
+KHTMLPageCacheEntry::addData(const TQByteArray &data)
{
if (m_file->status() == 0)
m_file->dataStream()->writeRawBytes(data.data(), data.size());
@@ -102,13 +102,13 @@ KHTMLPageCacheEntry::endData()
KHTMLPageCacheDelivery *
-KHTMLPageCacheEntry::fetchData(QObject *recvObj, const char *recvSlot)
+KHTMLPageCacheEntry::fetchData(TQObject *recvObj, const char *recvSlot)
{
// Duplicate fd so that entry can be safely deleted while delivering the data.
int fd = dup(m_file->handle());
lseek(fd, 0, SEEK_SET);
KHTMLPageCacheDelivery *delivery = new KHTMLPageCacheDelivery(fd);
- recvObj->connect(delivery, SIGNAL(emitData(const QByteArray&)), recvSlot);
+ recvObj->connect(delivery, TQT_SIGNAL(emitData(const TQByteArray&)), recvSlot);
delivery->recvObj = recvObj;
return delivery;
}
@@ -155,7 +155,7 @@ KHTMLPageCache::createCacheEntry()
}
void
-KHTMLPageCache::addData(long id, const QByteArray &data)
+KHTMLPageCache::addData(long id, const TQByteArray &data)
{
KHTMLPageCacheEntry *entry = d->dict.find(id);
if (entry)
@@ -197,7 +197,7 @@ KHTMLPageCache::isComplete(long id)
}
void
-KHTMLPageCache::fetchData(long id, QObject *recvObj, const char *recvSlot)
+KHTMLPageCache::fetchData(long id, TQObject *recvObj, const char *recvSlot)
{
KHTMLPageCacheEntry *entry = d->dict.find(id);
if (!entry || !entry->isComplete()) return;
@@ -210,12 +210,12 @@ KHTMLPageCache::fetchData(long id, QObject *recvObj, const char *recvSlot)
if (!d->deliveryActive)
{
d->deliveryActive = true;
- QTimer::singleShot(20, this, SLOT(sendData()));
+ TQTimer::singleShot(20, this, TQT_SLOT(sendData()));
}
}
void
-KHTMLPageCache::cancelFetch(QObject *recvObj)
+KHTMLPageCache::cancelFetch(TQObject *recvObj)
{
KHTMLPageCacheDelivery *next;
for(KHTMLPageCacheDelivery* delivery = d->delivery.first();
@@ -243,7 +243,7 @@ KHTMLPageCache::sendData()
assert(delivery);
char buf[8192];
- QByteArray byteArray;
+ TQByteArray byteArray;
int n = read(delivery->fd, buf, 8192);
@@ -265,11 +265,11 @@ KHTMLPageCache::sendData()
byteArray.resetRawData(buf, n);
d->delivery.append( delivery );
}
- QTimer::singleShot(0, this, SLOT(sendData()));
+ TQTimer::singleShot(0, this, TQT_SLOT(sendData()));
}
void
-KHTMLPageCache::saveData(long id, QDataStream *str)
+KHTMLPageCache::saveData(long id, TQDataStream *str)
{
KHTMLPageCacheEntry *entry = d->dict.find(id);
assert(entry);
diff --git a/khtml/khtml_pagecache.h b/khtml/khtml_pagecache.h
index ae53c0520..9b41950a7 100644
--- a/khtml/khtml_pagecache.h
+++ b/khtml/khtml_pagecache.h
@@ -20,10 +20,10 @@
#ifndef __khtml_pagecache_h__
#define __khtml_pagecache_h__
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
class KHTMLPageCachePrivate;
@@ -60,7 +60,7 @@ public:
/**
* Add @p data to the cache entry with id @p id.
*/
- void addData(long id, const QByteArray &data);
+ void addData(long id, const TQByteArray &data);
/**
* Signal end of data for the cache entry with id @p id.
@@ -90,17 +90,17 @@ public:
* Fetch data for cache entry @p id and send it to slot @p recvSlot
* in the object @p recvObj
*/
- void fetchData(long id, QObject *recvObj, const char *recvSlot);
+ void fetchData(long id, TQObject *recvObj, const char *recvSlot);
/**
* Cancel sending data to @p recvObj
*/
- void cancelFetch(QObject *recvObj);
+ void cancelFetch(TQObject *recvObj);
/**
* Save the data of cache entry @p id to the datastream @p str
*/
- void saveData(long id, QDataStream *str);
+ void saveData(long id, TQDataStream *str);
private slots:
void sendData();
@@ -123,10 +123,10 @@ public:
~KHTMLPageCacheDelivery();
signals:
- void emitData(const QByteArray &data);
+ void emitData(const TQByteArray &data);
public:
- QObject *recvObj;
+ TQObject *recvObj;
int fd;
};
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index d5f776078..ddd5cd25e 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -107,10 +107,10 @@ using namespace DOM;
#include <kstatusbar.h>
#include <kurllabel.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtooltip.h>
-#include <qmetaobject.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtooltip.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
#include "khtmlpart_p.h"
@@ -128,7 +128,7 @@ namespace khtml {
PartStyleSheetLoader(KHTMLPart *part, DOM::DOMString url, DocLoader* dl)
{
m_part = part;
- m_cachedSheet = dl->requestStyleSheet(url, QString::null, "text/css",
+ m_cachedSheet = dl->requestStyleSheet(url, TQString::null, "text/css",
true /* "user sheet" */);
if (m_cachedSheet)
m_cachedSheet->ref( this );
@@ -144,21 +144,21 @@ namespace khtml {
delete this;
}
- virtual void error( int, const QString& ) {
+ virtual void error( int, const TQString& ) {
delete this;
}
- QGuardedPtr<KHTMLPart> m_part;
+ TQGuardedPtr<KHTMLPart> m_part;
khtml::CachedCSSStyleSheet *m_cachedSheet;
};
}
-void khtml::ChildFrame::liveConnectEvent(const unsigned long, const QString & event, const KParts::LiveConnectExtension::ArgList & args)
+void khtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString & event, const KParts::LiveConnectExtension::ArgList & args)
{
if (!m_part || !m_frame || !m_liveconnect)
// hmmm
return;
- QString script;
+ TQString script;
script.sprintf("%s(", event.latin1());
KParts::LiveConnectExtension::ArgList::const_iterator i = args.begin();
@@ -170,7 +170,7 @@ void khtml::ChildFrame::liveConnectEvent(const unsigned long, const QString & ev
script += ",";
if ((*i).first == KParts::LiveConnectExtension::TypeString) {
script += "\"";
- script += QString((*i).second).replace('\\', "\\\\").replace('"', "\\\"");
+ script += TQString((*i).second).replace('\\', "\\\\").replace('"', "\\\"");
script += "\"";
} else
script += (*i).second;
@@ -186,12 +186,12 @@ void khtml::ChildFrame::liveConnectEvent(const unsigned long, const QString & ev
if (m_jscript) {
// we have a jscript => a part in an iframe
KJS::Completion cmp;
- m_jscript->evaluate(QString::null, 1, script, 0L, &cmp);
+ m_jscript->evaluate(TQString::null, 1, script, 0L, &cmp);
} else
part->executeScript(m_frame->element(), script);
}
-KHTMLFrameList::Iterator KHTMLFrameList::find( const QString &name )
+KHTMLFrameList::Iterator KHTMLFrameList::find( const TQString &name )
{
Iterator it = begin();
const Iterator e = end();
@@ -203,7 +203,7 @@ KHTMLFrameList::Iterator KHTMLFrameList::find( const QString &name )
return it;
}
-KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name, GUIProfile prof )
+KHTMLPart::KHTMLPart( TQWidget *parentWidget, const char *widgetname, TQObject *parent, const char *name, GUIProfile prof )
: KParts::ReadOnlyPart( parent, name )
{
d = 0;
@@ -214,7 +214,7 @@ KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *pa
init( new KHTMLView( this, parentWidget, widgetname ), prof );
}
-KHTMLPart::KHTMLPart( KHTMLView *view, QObject *parent, const char *name, GUIProfile prof )
+KHTMLPart::KHTMLPart( KHTMLView *view, TQObject *parent, const char *name, GUIProfile prof )
: KParts::ReadOnlyPart( parent, name )
{
d = 0;
@@ -252,24 +252,24 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
d->m_bMousePressed = false;
d->m_bRightMousePressed = false;
d->m_bCleared = false;
- d->m_paViewDocument = new KAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" );
- d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" );
- d->m_paViewInfo = new KAction( i18n( "View Document Information" ), CTRL+Key_I, this, SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" );
- d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" );
- d->m_paSaveDocument = KStdAction::saveAs( this, SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" );
+ d->m_paViewDocument = new KAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" );
+ d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, TQT_SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" );
+ d->m_paViewInfo = new KAction( i18n( "View Document Information" ), CTRL+Key_I, this, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" );
+ d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, TQT_SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" );
+ d->m_paSaveDocument = KStdAction::saveAs( this, TQT_SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" );
if ( parentPart() )
d->m_paSaveDocument->setShortcut( KShortcut() ); // avoid clashes
- d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
- d->m_paSecurity = new KAction( i18n( "Security..." ), "decrypted", 0, this, SLOT( slotSecurity() ), actionCollection(), "security" );
+ d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
+ d->m_paSecurity = new KAction( i18n( "Security..." ), "decrypted", 0, this, TQT_SLOT( slotSecurity() ), actionCollection(), "security" );
d->m_paSecurity->setWhatsThis( i18n( "Security Settings<p>"
"Shows the certificate of the displayed page. Only "
"pages that have been transmitted using a secure, encrypted connection have a "
"certificate.<p> "
"Hint: If the image shows a closed lock, the page has been transmitted over a "
"secure connection.") );
- d->m_paDebugRenderTree = new KAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" );
- d->m_paDebugDOMTree = new KAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" );
- d->m_paStopAnimations = new KAction( i18n( "Stop Animated Images" ), 0, this, SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" );
+ d->m_paDebugRenderTree = new KAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, TQT_SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" );
+ d->m_paDebugDOMTree = new KAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, TQT_SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" );
+ d->m_paStopAnimations = new KAction( i18n( "Stop Animated Images" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" );
d->m_paSetEncoding = new KActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" );
d->m_paSetEncoding->setDelayed( false );
@@ -292,15 +292,15 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
//d->m_automaticDetection->insertItem( i18n( "Unicode" ), 13 );
d->m_automaticDetection->insertItem( i18n( "Western European" ), 14 );
- connect( d->m_automaticDetection, SIGNAL( activated( int ) ), this, SLOT( slotAutomaticDetectionLanguage( int ) ) );
+ connect( d->m_automaticDetection, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotAutomaticDetectionLanguage( int ) ) );
d->m_paSetEncoding->popupMenu()->insertItem( i18n( "Automatic Detection" ), d->m_automaticDetection, 0 );
d->m_paSetEncoding->insert( new KActionSeparator( actionCollection() ) );
- d->m_manualDetection = new KSelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" );
- QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
+ d->m_manualDetection = new KSelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, TQT_SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" );
+ TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
d->m_manualDetection->setItems( encodings );
d->m_manualDetection->setCurrentItem( -1 );
d->m_paSetEncoding->insert( d->m_manualDetection );
@@ -310,7 +310,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
if ( config->hasGroup( "HTML Settings" ) ) {
config->setGroup( "HTML Settings" );
khtml::Decoder::AutoDetectLanguage language;
- QCString name = QTextCodec::codecForLocale()->name();
+ TQCString name = TQTextCodec::codecForLocale()->name();
name = name.lower();
if ( name == "cp1256" || name == "iso-8859-6" ) {
@@ -354,40 +354,40 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
}
- d->m_paUseStylesheet = new KSelectAction( i18n( "Use S&tylesheet"), 0, this, SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" );
+ d->m_paUseStylesheet = new KSelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" );
if ( prof == BrowserViewGUI ) {
d->m_paIncZoomFactor = new KHTMLZoomFactorAction( this, true, i18n(
"Enlarge Font" ), "viewmag+", "CTRL++;CTRL+=", this,
- SLOT( slotIncZoomFast() ), actionCollection(), "incFontSizes" );
+ TQT_SLOT( slotIncZoomFast() ), actionCollection(), "incFontSizes" );
d->m_paIncZoomFactor->setWhatsThis( i18n( "Enlarge Font<p>"
"Make the font in this window bigger. "
"Click and hold down the mouse button for a menu with all available font sizes." ) );
d->m_paDecZoomFactor = new KHTMLZoomFactorAction( this, false, i18n(
"Shrink Font" ), "viewmag-", CTRL + Key_Minus, this,
- SLOT( slotDecZoomFast() ), actionCollection(), "decFontSizes" );
+ TQT_SLOT( slotDecZoomFast() ), actionCollection(), "decFontSizes" );
d->m_paDecZoomFactor->setWhatsThis( i18n( "Shrink Font<p>"
"Make the font in this window smaller. "
"Click and hold down the mouse button for a menu with all available font sizes." ) );
}
- d->m_paFind = KStdAction::find( this, SLOT( slotFind() ), actionCollection(), "find" );
+ d->m_paFind = KStdAction::find( this, TQT_SLOT( slotFind() ), actionCollection(), "find" );
d->m_paFind->setWhatsThis( i18n( "Find text<p>"
"Shows a dialog that allows you to find text on the displayed page." ) );
- d->m_paFindNext = KStdAction::findNext( this, SLOT( slotFindNext() ), actionCollection(), "findNext" );
+ d->m_paFindNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), actionCollection(), "findNext" );
d->m_paFindNext->setWhatsThis( i18n( "Find next<p>"
"Find the next occurrence of the text that you "
"have found using the <b>Find Text</b> function" ) );
- d->m_paFindPrev = KStdAction::findPrev( this, SLOT( slotFindPrev() ), actionCollection(), "findPrevious" );
+ d->m_paFindPrev = KStdAction::findPrev( this, TQT_SLOT( slotFindPrev() ), actionCollection(), "findPrevious" );
d->m_paFindPrev->setWhatsThis( i18n( "Find previous<p>"
"Find the previous occurrence of the text that you "
"have found using the <b>Find Text</b> function" ) );
- d->m_paFindAheadText = new KAction( i18n("Find Text as You Type"), KShortcut( '/' ), this, SLOT( slotFindAheadText()),
+ d->m_paFindAheadText = new KAction( i18n("Find Text as You Type"), KShortcut( '/' ), this, TQT_SLOT( slotFindAheadText()),
actionCollection(), "findAheadText");
- d->m_paFindAheadLinks = new KAction( i18n("Find Links as You Type"), KShortcut( '\'' ), this, SLOT( slotFindAheadLink()),
+ d->m_paFindAheadLinks = new KAction( i18n("Find Links as You Type"), KShortcut( '\'' ), this, TQT_SLOT( slotFindAheadLink()),
actionCollection(), "findAheadLink");
d->m_paFindAheadText->setEnabled( false );
d->m_paFindAheadLinks->setEnabled( false );
@@ -401,17 +401,17 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
d->m_paFindAheadLinks->setShortcut( KShortcut());
}
- d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "frameprint", 0, this, SLOT( slotPrintFrame() ), actionCollection(), "printFrame" );
+ d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "frameprint", 0, this, TQT_SLOT( slotPrintFrame() ), actionCollection(), "printFrame" );
d->m_paPrintFrame->setWhatsThis( i18n( "Print Frame<p>"
"Some pages have several frames. To print only a single frame, click "
"on it and then use this function." ) );
- d->m_paSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), actionCollection(), "selectAll" );
+ d->m_paSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ), actionCollection(), "selectAll" );
if ( parentPart() )
d->m_paSelectAll->setShortcut( KShortcut() ); // avoid clashes
d->m_paToggleCaretMode = new KToggleAction(i18n("Toggle Caret Mode"),
- Key_F7, this, SLOT(slotToggleCaretMode()),
+ Key_F7, this, TQT_SLOT(slotToggleCaretMode()),
actionCollection(), "caretMode");
d->m_paToggleCaretMode->setChecked(isCaretMode());
if (parentPart())
@@ -428,30 +428,30 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
// Set the meta-refresh flag...
d->m_metaRefreshEnabled = d->m_settings->isAutoDelayedActionsEnabled ();
- connect( view, SIGNAL( zoomView( int ) ), SLOT( slotZoomView( int ) ) );
+ connect( view, TQT_SIGNAL( zoomView( int ) ), TQT_SLOT( slotZoomView( int ) ) );
- connect( this, SIGNAL( completed() ),
- this, SLOT( updateActions() ) );
- connect( this, SIGNAL( completed( bool ) ),
- this, SLOT( updateActions() ) );
- connect( this, SIGNAL( started( KIO::Job * ) ),
- this, SLOT( updateActions() ) );
+ connect( this, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( updateActions() ) );
+ connect( this, TQT_SIGNAL( completed( bool ) ),
+ this, TQT_SLOT( updateActions() ) );
+ connect( this, TQT_SIGNAL( started( KIO::Job * ) ),
+ this, TQT_SLOT( updateActions() ) );
d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "khtml/khtml_popupmenu.rc", KHTMLFactory::instance() ) );
- connect( khtml::Cache::loader(), SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ),
- this, SLOT( slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* ) ) );
- connect( khtml::Cache::loader(), SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
- this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
- connect( khtml::Cache::loader(), SIGNAL( requestFailed( khtml::DocLoader*, khtml::CachedObject *) ),
- this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
+ connect( khtml::Cache::loader(), TQT_SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ),
+ this, TQT_SLOT( slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* ) ) );
+ connect( khtml::Cache::loader(), TQT_SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
+ this, TQT_SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
+ connect( khtml::Cache::loader(), TQT_SIGNAL( requestFailed( khtml::DocLoader*, khtml::CachedObject *) ),
+ this, TQT_SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
- connect ( &d->m_progressUpdateTimer, SIGNAL( timeout() ), this, SLOT( slotProgressUpdate() ) );
+ connect ( &d->m_progressUpdateTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotProgressUpdate() ) );
findTextBegin(); //reset find variables
- connect( &d->m_redirectionTimer, SIGNAL( timeout() ),
- this, SLOT( slotRedirect() ) );
+ connect( &d->m_redirectionTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotRedirect() ) );
d->m_dcopobject = new KHTMLPartIface(this);
@@ -496,12 +496,12 @@ KHTMLPart::~KHTMLPart()
if (!d->m_bComplete)
closeURL();
- disconnect( khtml::Cache::loader(), SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ),
- this, SLOT( slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* ) ) );
- disconnect( khtml::Cache::loader(), SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
- this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
- disconnect( khtml::Cache::loader(), SIGNAL( requestFailed( khtml::DocLoader*, khtml::CachedObject *) ),
- this, SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
+ disconnect( khtml::Cache::loader(), TQT_SIGNAL( requestStarted( khtml::DocLoader*, khtml::CachedObject* ) ),
+ this, TQT_SLOT( slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* ) ) );
+ disconnect( khtml::Cache::loader(), TQT_SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
+ this, TQT_SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
+ disconnect( khtml::Cache::loader(), TQT_SIGNAL( requestFailed( khtml::DocLoader*, khtml::CachedObject *) ),
+ this, TQT_SLOT( slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *) ) );
clear();
@@ -552,10 +552,10 @@ bool KHTMLPart::restoreURL( const KURL &url )
m_url = url;
d->m_restoreScrollPosition = true;
- disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
- connect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
+ disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
+ connect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
- KHTMLPageCache::self()->fetchData( d->m_cacheId, this, SLOT(slotRestoreData(const QByteArray &)));
+ KHTMLPageCache::self()->fetchData( d->m_cacheId, this, TQT_SLOT(slotRestoreData(const TQByteArray &)));
emit started( 0L );
@@ -576,11 +576,11 @@ bool KHTMLPart::openURL( const KURL &url )
closeURL();
if( d->m_bJScriptEnabled )
- d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = QString::null;
+ d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString::null;
/**
* The format of the error url is that two variables are passed in the query:
- * error = int kio error code, errText = QString error text from kio
+ * error = int kio error code, errText = TQString error text from kio
* and the URL where the error happened is passed as a sub URL.
*/
KURL::List urls = KURL::split( url );
@@ -591,7 +591,7 @@ bool KHTMLPart::openURL( const KURL &url )
int error = mainURL.queryItem( "error" ).toInt();
// error=0 isn't a valid error code, so 0 means it's missing from the URL
if ( error == 0 ) error = KIO::ERR_UNKNOWN;
- QString errorText = mainURL.queryItem( "errText", HINT_UTF8 );
+ TQString errorText = mainURL.queryItem( "errText", HINT_UTF8 );
urls.pop_front();
d->m_workingURL = KURL::join( urls );
//kdDebug(6050) << "Emitting fixed URL " << d->m_workingURL.prettyURL() << endl;
@@ -602,20 +602,20 @@ bool KHTMLPart::openURL( const KURL &url )
}
if (!parentPart()) { // only do it for toplevel part
- QString host = url.isLocalFile() ? "localhost" : url.host();
- QString userAgent = KProtocolManager::userAgentForHost(host);
- if (userAgent != KProtocolManager::userAgentForHost(QString::null)) {
+ TQString host = url.isLocalFile() ? "localhost" : url.host();
+ TQString userAgent = KProtocolManager::userAgentForHost(host);
+ if (userAgent != KProtocolManager::userAgentForHost(TQString::null)) {
if (!d->m_statusBarUALabel) {
d->m_statusBarUALabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarUALabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small));
- d->m_statusBarUALabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ d->m_statusBarUALabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarUALabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarUALabel, 0, false);
d->m_statusBarUALabel->setPixmap(SmallIcon("agent", instance()));
} else {
- QToolTip::remove(d->m_statusBarUALabel);
+ TQToolTip::remove(d->m_statusBarUALabel);
}
- QToolTip::add(d->m_statusBarUALabel, i18n("The fake user-agent '%1' is in use.").arg(userAgent));
+ TQToolTip::add(d->m_statusBarUALabel, i18n("The fake user-agent '%1' is in use.").arg(userAgent));
} else if (d->m_statusBarUALabel) {
d->m_statusBarExtension->removeStatusBarItem(d->m_statusBarUALabel);
delete d->m_statusBarUALabel;
@@ -673,8 +673,8 @@ bool KHTMLPart::openURL( const KURL &url )
closeURL();
d->m_restoreScrollPosition = d->m_restored;
- disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
- connect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
+ disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
+ connect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
// initializing m_url to the new url breaks relative links when opening such a link after this call and _before_ begin() is called (when the first
// data arrives) (Simon)
@@ -720,21 +720,21 @@ bool KHTMLPart::openURL( const KURL &url )
d->m_job->setWindow(widget()->topLevelWidget());
d->m_job->addMetaData(args.metaData());
- connect( d->m_job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
- connect( d->m_job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect ( d->m_job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- SLOT( slotInfoMessage(KIO::Job*, const QString& ) ) );
- connect( d->m_job, SIGNAL(redirection(KIO::Job*, const KURL& ) ),
- SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
+ connect( d->m_job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect ( d->m_job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ TQT_SLOT( slotInfoMessage(KIO::Job*, const TQString& ) ) );
+ connect( d->m_job, TQT_SIGNAL(redirection(KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
// delete old status bar msg's from kjs (if it _was_ activated on last URL)
if( d->m_bJScriptEnabled )
- d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = QString::null;
+ d->m_statusBarText[BarOverrideText] = d->m_statusBarText[BarDefaultText] = TQString::null;
// set the javascript flags according to the current url
d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
@@ -743,14 +743,14 @@ bool KHTMLPart::openURL( const KURL &url )
d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host());
- connect( d->m_job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- this, SLOT( slotJobSpeed( KIO::Job*, unsigned long ) ) );
+ connect( d->m_job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ this, TQT_SLOT( slotJobSpeed( KIO::Job*, unsigned long ) ) );
- connect( d->m_job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- this, SLOT( slotJobPercent( KIO::Job*, unsigned long ) ) );
+ connect( d->m_job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ this, TQT_SLOT( slotJobPercent( KIO::Job*, unsigned long ) ) );
- connect( d->m_job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotJobDone( KIO::Job* ) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotJobDone( KIO::Job* ) ) );
d->m_jobspeed = 0;
@@ -759,8 +759,8 @@ bool KHTMLPart::openURL( const KURL &url )
if ( args.reload && !settings()->userStyleSheet().isEmpty() ) {
KURL url( settings()->userStyleSheet() );
KIO::StatJob *job = KIO::stat( url, false /* don't show progress */ );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotUserSheetStatDone( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotUserSheetStatDone( KIO::Job * ) ) );
}
emit started( 0L );
@@ -791,7 +791,7 @@ bool KHTMLPart::closeURL()
d->m_bLoadEventEmitted = true; // don't want that one either
d->m_cachePolicy = KProtocolManager::cacheControl(); // reset cache policy
- disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
+ disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
KHTMLPageCache::self()->cancelFetch(this);
if ( d->m_doc && d->m_doc->parsing() )
@@ -862,27 +862,27 @@ DOM::Document KHTMLPart::document() const
return d->m_doc;
}
-QString KHTMLPart::documentSource() const
+TQString KHTMLPart::documentSource() const
{
- QString sourceStr;
+ TQString sourceStr;
if ( !( m_url.isLocalFile() ) && KHTMLPageCache::self()->isComplete( d->m_cacheId ) )
{
- QByteArray sourceArray;
- QDataStream dataStream( sourceArray, IO_WriteOnly );
+ TQByteArray sourceArray;
+ TQDataStream dataStream( sourceArray, IO_WriteOnly );
KHTMLPageCache::self()->saveData( d->m_cacheId, &dataStream );
- QTextStream stream( sourceArray, IO_ReadOnly );
- stream.setCodec( QTextCodec::codecForName( encoding().latin1() ) );
+ TQTextStream stream( sourceArray, IO_ReadOnly );
+ stream.setCodec( TQTextCodec::codecForName( encoding().latin1() ) );
sourceStr = stream.read();
} else
{
- QString tmpFile;
+ TQString tmpFile;
if( KIO::NetAccess::download( m_url, tmpFile, NULL ) )
{
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( f.open( IO_ReadOnly ) )
{
- QTextStream stream( &f );
- stream.setCodec( QTextCodec::codecForName( encoding().latin1() ) );
+ TQTextStream stream( &f );
+ stream.setCodec( TQTextCodec::codecForName( encoding().latin1() ) );
sourceStr = stream.read();
f.close();
}
@@ -1025,11 +1025,11 @@ KJSProxy *KHTMLPart::jScript()
return d->m_frame->m_jscript;
}
-QVariant KHTMLPart::crossFrameExecuteScript(const QString& target, const QString& script)
+TQVariant KHTMLPart::crossFrameExecuteScript(const TQString& target, const TQString& script)
{
KHTMLPart* destpart = this;
- QString trg = target.lower();
+ TQString trg = target.lower();
if (target == "_top") {
while (destpart->parentPart())
@@ -1075,13 +1075,13 @@ KJSErrorDlg *KHTMLPart::jsErrorExtension() {
if (!d->m_statusBarJSErrorLabel) {
d->m_statusBarJSErrorLabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarJSErrorLabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small));
- d->m_statusBarJSErrorLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ d->m_statusBarJSErrorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarJSErrorLabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarJSErrorLabel, 0, false);
- QToolTip::add(d->m_statusBarJSErrorLabel, i18n("This web page contains coding errors."));
+ TQToolTip::add(d->m_statusBarJSErrorLabel, i18n("This web page contains coding errors."));
d->m_statusBarJSErrorLabel->setPixmap(SmallIcon("bug", instance()));
- connect(d->m_statusBarJSErrorLabel, SIGNAL(leftClickedURL()), SLOT(launchJSErrorDialog()));
- connect(d->m_statusBarJSErrorLabel, SIGNAL(rightClickedURL()), SLOT(jsErrorDialogContextMenu()));
+ connect(d->m_statusBarJSErrorLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(launchJSErrorDialog()));
+ connect(d->m_statusBarJSErrorLabel, TQT_SIGNAL(rightClickedURL()), TQT_SLOT(jsErrorDialogContextMenu()));
}
if (!d->m_jsedlg) {
d->m_jsedlg = new KJSErrorDlg;
@@ -1115,14 +1115,14 @@ void KHTMLPart::disableJSErrorExtension() {
// right now. It makes me wonder if there should be a more clean way to
// contact all running "KHTML" instance as opposed to Konqueror instances too.
d->m_settings->setJSErrorsEnabled(false);
- DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", QByteArray());
+ DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", TQByteArray());
}
void KHTMLPart::jsErrorDialogContextMenu() {
KPopupMenu *m = new KPopupMenu(0L);
- m->insertItem(i18n("&Hide Errors"), this, SLOT(removeJSErrorExtension()));
- m->insertItem(i18n("&Disable Error Reporting"), this, SLOT(disableJSErrorExtension()));
- m->popup(QCursor::pos());
+ m->insertItem(i18n("&Hide Errors"), this, TQT_SLOT(removeJSErrorExtension()));
+ m->insertItem(i18n("&Disable Error Reporting"), this, TQT_SLOT(disableJSErrorExtension()));
+ m->popup(TQCursor::pos());
}
void KHTMLPart::launchJSErrorDialog() {
@@ -1134,12 +1134,12 @@ void KHTMLPart::launchJSErrorDialog() {
}
void KHTMLPart::launchJSConfigDialog() {
- QStringList args;
+ TQStringList args;
args << "khtml_java_js";
KApplication::kdeinitExec( "kcmshell", args );
}
-QVariant KHTMLPart::executeScript(const QString& filename, int baseLine, const DOM::Node& n, const QString& script)
+TQVariant KHTMLPart::executeScript(const TQString& filename, int baseLine, const DOM::Node& n, const TQString& script)
{
#ifdef KJS_VERBOSE
// The script is now printed by KJS's Parser::parse
@@ -1148,11 +1148,11 @@ QVariant KHTMLPart::executeScript(const QString& filename, int baseLine, const D
KJSProxy *proxy = jScript();
if (!proxy || proxy->paused())
- return QVariant();
+ return TQVariant();
KJS::Completion comp;
- QVariant ret = proxy->evaluate(filename, baseLine, script, n, &comp);
+ TQVariant ret = proxy->evaluate(filename, baseLine, script, n, &comp);
/*
* Error handling
@@ -1179,12 +1179,12 @@ QVariant KHTMLPart::executeScript(const QString& filename, int baseLine, const D
return ret;
}
-QVariant KHTMLPart::executeScript( const QString &script )
+TQVariant KHTMLPart::executeScript( const TQString &script )
{
return executeScript( DOM::Node(), script );
}
-QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
+TQVariant KHTMLPart::executeScript( const DOM::Node &n, const TQString &script )
{
#ifdef KJS_VERBOSE
kdDebug(6070) << "KHTMLPart::executeScript caller='" << name() << "' node=" << n.nodeName().string().latin1() << "(" << (n.isNull() ? 0 : n.nodeType()) << ") " /* << script */ << endl;
@@ -1192,10 +1192,10 @@ QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
KJSProxy *proxy = jScript();
if (!proxy || proxy->paused())
- return QVariant();
+ return TQVariant();
++(d->m_runningScripts);
KJS::Completion comp;
- const QVariant ret = proxy->evaluate( QString::null, 1, script, n, &comp );
+ const TQVariant ret = proxy->evaluate( TQString::null, 1, script, n, &comp );
--(d->m_runningScripts);
/*
@@ -1218,7 +1218,7 @@ QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
return ret;
}
-bool KHTMLPart::scheduleScript(const DOM::Node &n, const QString& script)
+bool KHTMLPart::scheduleScript(const DOM::Node &n, const TQString& script)
{
//kdDebug(6050) << "KHTMLPart::scheduleScript "<< script << endl;
@@ -1228,15 +1228,15 @@ bool KHTMLPart::scheduleScript(const DOM::Node &n, const QString& script)
return true;
}
-QVariant KHTMLPart::executeScheduledScript()
+TQVariant KHTMLPart::executeScheduledScript()
{
if( d->scheduledScript.isEmpty() )
- return QVariant();
+ return TQVariant();
//kdDebug(6050) << "executing delayed " << d->scheduledScript << endl;
- QVariant ret = executeScript( d->scheduledScriptNode, d->scheduledScript );
- d->scheduledScript = QString();
+ TQVariant ret = executeScript( d->scheduledScriptNode, d->scheduledScript );
+ d->scheduledScript = TQString();
d->scheduledScriptNode = DOM::Node();
return ret;
@@ -1302,7 +1302,7 @@ void KHTMLPart::slotDebugDOMTree()
for (; it != end; ++it )
if ( !( *it )->m_part.isNull() && (*it)->m_part->inherits( "KHTMLPart" ) ) {
KParts::ReadOnlyPart* const p = ( *it )->m_part;
- kdDebug(6050) << QString().leftJustify(s_DOMTreeIndentLevel*4,' ') << "FRAME " << p->name() << " " << endl;
+ kdDebug(6050) << TQString().leftJustify(s_DOMTreeIndentLevel*4,' ') << "FRAME " << p->name() << " " << endl;
static_cast<KHTMLPart*>( p )->slotDebugDOMTree();
}
s_DOMTreeIndentLevel = indentLevel;
@@ -1320,8 +1320,8 @@ void KHTMLPart::slotDebugRenderTree()
if ( d->m_doc ) {
d->m_doc->renderer()->printTree();
// dump out the contents of the rendering & DOM trees
-// QString dumps;
-// QTextStream outputStream(dumps,IO_WriteOnly);
+// TQString dumps;
+// TQTextStream outputStream(dumps,IO_WriteOnly);
// d->m_doc->renderer()->layer()->dump( outputStream );
// kdDebug() << "dump output:" << "\n" + dumps;
}
@@ -1348,10 +1348,10 @@ void KHTMLPart::setAutoloadImages( bool enable )
d->m_paLoadImages = 0;
}
else if ( !d->m_paLoadImages )
- d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, SLOT( slotLoadImages() ), actionCollection(), "loadImages" );
+ d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQT_SLOT( slotLoadImages() ), actionCollection(), "loadImages" );
if ( d->m_paLoadImages ) {
- QPtrList<KAction> lst;
+ TQPtrList<KAction> lst;
lst.append( d->m_paLoadImages );
plugActionList( "loadImages", lst );
}
@@ -1429,8 +1429,8 @@ void KHTMLPart::clear()
d->m_decoder = 0;
// We don't want to change between parts if we are going to delete all of them anyway
- disconnect( partManager(), SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+ disconnect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
if (d->m_frames.count())
{
@@ -1462,11 +1462,11 @@ void KHTMLPart::clear()
}
// Listen to part changes again
- connect( partManager(), SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+ connect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
d->m_delayRedirect = 0;
- d->m_redirectURL = QString::null;
+ d->m_redirectURL = TQString::null;
d->m_redirectionTimer.stop();
d->m_redirectLockHistory = true;
d->m_bClearing = false;
@@ -1480,13 +1480,13 @@ void KHTMLPart::clear()
d->m_startOffset = 0;
d->m_endOffset = 0;
#ifndef QT_NO_CLIPBOARD
- connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection()));
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
#endif
d->m_jobPercent = 0;
if ( !d->m_haveEncoding )
- d->m_encoding = QString::null;
+ d->m_encoding = TQString::null;
#ifdef SPEED_DEBUG
d->m_parsetime.restart();
#endif
@@ -1511,7 +1511,7 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
return 0;
}
-void KHTMLPart::slotInfoMessage(KIO::Job* kio_job, const QString& msg)
+void KHTMLPart::slotInfoMessage(KIO::Job* kio_job, const TQString& msg)
{
assert(d->m_job == kio_job);
@@ -1525,22 +1525,22 @@ void KHTMLPart::setPageSecurity( PageSecurity sec )
if ( sec != NotCrypted && !d->m_statusBarIconLabel && !parentPart() ) {
d->m_statusBarIconLabel = new KURLLabel( d->m_statusBarExtension->statusBar() );
d->m_statusBarIconLabel->setFixedHeight( instance()->iconLoader()->currentSize(KIcon::Small) );
- d->m_statusBarIconLabel->setSizePolicy(QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ));
+ d->m_statusBarIconLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
d->m_statusBarIconLabel->setUseCursor( false );
d->m_statusBarExtension->addStatusBarItem( d->m_statusBarIconLabel, 0, false );
- connect( d->m_statusBarIconLabel, SIGNAL( leftClickedURL() ), SLOT( slotSecurity() ) );
+ connect( d->m_statusBarIconLabel, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( slotSecurity() ) );
} else if (d->m_statusBarIconLabel) {
- QToolTip::remove(d->m_statusBarIconLabel);
+ TQToolTip::remove(d->m_statusBarIconLabel);
}
if (d->m_statusBarIconLabel) {
if (d->m_ssl_in_use)
- QToolTip::add(d->m_statusBarIconLabel,
+ TQToolTip::add(d->m_statusBarIconLabel,
i18n("Session is secured with %1 bit %2.").arg(d->m_ssl_cipher_used_bits).arg(d->m_ssl_cipher));
- else QToolTip::add(d->m_statusBarIconLabel, i18n("Session is not secured."));
+ else TQToolTip::add(d->m_statusBarIconLabel, i18n("Session is not secured."));
}
- QString iconName;
+ TQString iconName;
switch (sec) {
case NotCrypted:
iconName = "decrypted";
@@ -1562,7 +1562,7 @@ void KHTMLPart::setPageSecurity( PageSecurity sec )
d->m_statusBarIconLabel->setPixmap( SmallIcon( iconName, instance() ) );
}
-void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
+void KHTMLPart::slotData( KIO::Job* kio_job, const TQByteArray &data )
{
assert ( d->m_job == kio_job );
@@ -1624,16 +1624,16 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
d->m_ssl_cert_state = d->m_job->queryMetaData("ssl_cert_state");
if (d->m_statusBarIconLabel) {
- QToolTip::remove(d->m_statusBarIconLabel);
+ TQToolTip::remove(d->m_statusBarIconLabel);
if (d->m_ssl_in_use) {
- QToolTip::add(d->m_statusBarIconLabel, i18n("Session is secured with %1 bit %2.").arg(d->m_ssl_cipher_used_bits).arg(d->m_ssl_cipher));
+ TQToolTip::add(d->m_statusBarIconLabel, i18n("Session is secured with %1 bit %2.").arg(d->m_ssl_cipher_used_bits).arg(d->m_ssl_cipher));
} else {
- QToolTip::add(d->m_statusBarIconLabel, i18n("Session is not secured."));
+ TQToolTip::add(d->m_statusBarIconLabel, i18n("Session is not secured."));
}
}
// Check for charset meta-data
- QString qData = d->m_job->queryMetaData("charset");
+ TQString qData = d->m_job->queryMetaData("charset");
if ( !qData.isEmpty() && !d->m_haveEncoding ) // only use information if the user didn't override the settings
d->m_encoding = qData;
@@ -1646,13 +1646,13 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
// DISABLED: Support Content-Location per section 14.14 of RFC 2616.
// See BR# 51185,BR# 82747
/*
- QString baseURL = d->m_job->queryMetaData ("content-location");
+ TQString baseURL = d->m_job->queryMetaData ("content-location");
if (!baseURL.isEmpty())
d->m_doc->setBaseURL(KURL( d->m_doc->completeURL(baseURL) ));
*/
// Support for Content-Language
- QString language = d->m_job->queryMetaData("content-language");
+ TQString language = d->m_job->queryMetaData("content-language");
if (!language.isEmpty())
d->m_doc->setContentLanguage(language);
@@ -1660,7 +1660,7 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
// Support for http last-modified
d->m_lastModified = d->m_job->queryMetaData("modified");
} else
- d->m_lastModified = QString::null; // done on-demand by lastModified()
+ d->m_lastModified = TQString::null; // done on-demand by lastModified()
}
KHTMLPageCache::self()->addData(d->m_cacheId, data);
@@ -1669,14 +1669,14 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
d->m_frame->m_jscript->dataReceived();
}
-void KHTMLPart::slotRestoreData(const QByteArray &data )
+void KHTMLPart::slotRestoreData(const TQByteArray &data )
{
// The first data ?
if ( !d->m_workingURL.isEmpty() )
{
long saveCacheId = d->m_cacheId;
- QString savePageReferrer = d->m_pageReferrer;
- QString saveEncoding = d->m_encoding;
+ TQString savePageReferrer = d->m_pageReferrer;
+ TQString saveEncoding = d->m_encoding;
begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
d->m_encoding = saveEncoding;
d->m_pageReferrer = savePageReferrer;
@@ -1713,7 +1713,7 @@ void KHTMLPart::showError( KIO::Job* job )
}
// This is a protected method, placed here because of it's relevance to showError
-void KHTMLPart::htmlError( int errorCode, const QString& text, const KURL& reqUrl )
+void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqUrl )
{
kdDebug(6050) << "KHTMLPart::htmlError errorCode=" << errorCode << " text=" << text << endl;
// make sure we're not executing any embedded JS
@@ -1722,14 +1722,14 @@ void KHTMLPart::htmlError( int errorCode, const QString& text, const KURL& reqUr
d->m_bJScriptForce = false;
d->m_bJScriptOverride = true;
begin();
- QString errText = QString::fromLatin1( "<HTML dir=%1><HEAD><TITLE>" )
- .arg(QApplication::reverseLayout() ? "rtl" : "ltr");
+ TQString errText = TQString::fromLatin1( "<HTML dir=%1><HEAD><TITLE>" )
+ .arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
errText += i18n( "Error while loading %1" ).arg( reqUrl.htmlURL() );
- errText += QString::fromLatin1( "</TITLE></HEAD><BODY><P>" );
+ errText += TQString::fromLatin1( "</TITLE></HEAD><BODY><P>" );
errText += i18n( "An error occurred while loading <B>%1</B>:" ).arg( reqUrl.htmlURL() );
- errText += QString::fromLatin1( "</P>" );
- errText += QStyleSheet::convertFromPlainText( KIO::buildErrorString( errorCode, text ) );
- errText += QString::fromLatin1( "</BODY></HTML>" );
+ errText += TQString::fromLatin1( "</P>" );
+ errText += TQStyleSheet::convertFromPlainText( KIO::buildErrorString( errorCode, text ) );
+ errText += TQString::fromLatin1( "</BODY></HTML>" );
write(errText);
end();
@@ -1746,67 +1746,67 @@ void KHTMLPart::htmlError( int errorCode, const QString& text, const KURL& reqUr
return;
// following disabled until 3.1
- QString errorName, techName, description;
- QStringList causes, solutions;
+ TQString errorName, techName, description;
+ TQStringList causes, solutions;
- QByteArray raw = KIO::rawErrorDetail( errorCode, text, &reqUrl );
- QDataStream stream(raw, IO_ReadOnly);
+ TQByteArray raw = KIO::rawErrorDetail( errorCode, text, &reqUrl );
+ TQDataStream stream(raw, IO_ReadOnly);
stream >> errorName >> techName >> description >> causes >> solutions;
- QString url, protocol, datetime;
+ TQString url, protocol, datetime;
url = reqUrl.prettyURL();
protocol = reqUrl.protocol();
- datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
- QString doc = QString::fromLatin1( "<html><head><title>" );
+ TQString doc = TQString::fromLatin1( "<html><head><title>" );
doc += i18n( "Error: " );
doc += errorName;
- doc += QString::fromLatin1( " - %1</title></head><body><h1>" ).arg( url );
+ doc += TQString::fromLatin1( " - %1</title></head><body><h1>" ).arg( url );
doc += i18n( "The requested operation could not be completed" );
- doc += QString::fromLatin1( "</h1><h2>" );
+ doc += TQString::fromLatin1( "</h1><h2>" );
doc += errorName;
- doc += QString::fromLatin1( "</h2>" );
+ doc += TQString::fromLatin1( "</h2>" );
if ( !techName.isNull() ) {
- doc += QString::fromLatin1( "<h2>" );
+ doc += TQString::fromLatin1( "<h2>" );
doc += i18n( "Technical Reason: " );
doc += techName;
- doc += QString::fromLatin1( "</h2>" );
+ doc += TQString::fromLatin1( "</h2>" );
}
- doc += QString::fromLatin1( "<h3>" );
+ doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Details of the Request:" );
- doc += QString::fromLatin1( "</h3><ul><li>" );
+ doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += i18n( "URL: %1" ).arg( url );
- doc += QString::fromLatin1( "</li><li>" );
+ doc += TQString::fromLatin1( "</li><li>" );
if ( !protocol.isNull() ) {
// uncomment for 3.1... i18n change
// doc += i18n( "Protocol: %1" ).arg( protocol ).arg( protocol );
- doc += QString::fromLatin1( "</li><li>" );
+ doc += TQString::fromLatin1( "</li><li>" );
}
doc += i18n( "Date and Time: %1" ).arg( datetime );
- doc += QString::fromLatin1( "</li><li>" );
+ doc += TQString::fromLatin1( "</li><li>" );
doc += i18n( "Additional Information: %1" ).arg( text );
- doc += QString::fromLatin1( "</li></ul><h3>" );
+ doc += TQString::fromLatin1( "</li></ul><h3>" );
doc += i18n( "Description:" );
- doc += QString::fromLatin1( "</h3><p>" );
+ doc += TQString::fromLatin1( "</h3><p>" );
doc += description;
- doc += QString::fromLatin1( "</p>" );
+ doc += TQString::fromLatin1( "</p>" );
if ( causes.count() ) {
- doc += QString::fromLatin1( "<h3>" );
+ doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Possible Causes:" );
- doc += QString::fromLatin1( "</h3><ul><li>" );
+ doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += causes.join( "</li><li>" );
- doc += QString::fromLatin1( "</li></ul>" );
+ doc += TQString::fromLatin1( "</li></ul>" );
}
if ( solutions.count() ) {
- doc += QString::fromLatin1( "<h3>" );
+ doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Possible Solutions:" );
- doc += QString::fromLatin1( "</h3><ul><li>" );
+ doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += solutions.join( "</li><li>" );
- doc += QString::fromLatin1( "</li></ul>" );
+ doc += TQString::fromLatin1( "</li></ul>" );
}
- doc += QString::fromLatin1( "</body></html>" );
+ doc += TQString::fromLatin1( "</body></html>" );
write( doc );
end();
@@ -1876,7 +1876,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
removeJSErrorExtension();
setSuppressedPopupIndicator( false );
d->m_openableSuppressedPopups = 0;
- for ( QValueListIterator<QGuardedPtr<KHTMLPart> > i = d->m_suppressedPopupOriginParts.begin();
+ for ( TQValueListIterator<TQGuardedPtr<KHTMLPart> > i = d->m_suppressedPopupOriginParts.begin();
i != d->m_suppressedPopupOriginParts.end(); ++i ) {
if (KHTMLPart* part = *i) {
@@ -1894,9 +1894,9 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
d->m_bLoadEventEmitted = false;
if(url.isValid()) {
- QString urlString = url.url();
+ TQString urlString = url.url();
KHTMLFactory::vLinks()->insert( urlString );
- QString urlString2 = url.prettyURL();
+ TQString urlString2 = url.prettyURL();
if ( urlString != urlString2 ) {
KHTMLFactory::vLinks()->insert( urlString2 );
}
@@ -1911,7 +1911,7 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
args.yOffset = yOffset;
d->m_extension->setURLArgs( args );
- d->m_pageReferrer = QString::null;
+ d->m_pageReferrer = TQString::null;
KURL ref(url);
d->m_referrer = ref.protocol().startsWith("http") ? ref.url() : "";
@@ -1940,17 +1940,17 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
d->m_doc->docLoader()->setShowAnimations( KHTMLFactory::defaultHTMLSettings()->showAnimations() );
emit docCreated();
- d->m_paUseStylesheet->setItems(QStringList());
+ d->m_paUseStylesheet->setItems(TQStringList());
d->m_paUseStylesheet->setEnabled( false );
setAutoloadImages( KHTMLFactory::defaultHTMLSettings()->autoLoadImages() );
- QString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet();
+ TQString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet();
if ( !userStyleSheet.isEmpty() )
setUserStyleSheet( KURL( userStyleSheet ) );
d->m_doc->setRestoreState(args.docState);
d->m_doc->open();
- connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
+ connect(d->m_doc,TQT_SIGNAL(finishedParsing()),this,TQT_SLOT(slotFinishedParsing()));
emit d->m_extension->enableAction( "print", true );
@@ -1968,7 +1968,7 @@ void KHTMLPart::write( const char *str, int len )
if ( len == 0 )
return;
- QString decoded = d->m_decoder->decode( str, len );
+ TQString decoded = d->m_decoder->decode( str, len );
if(decoded.isEmpty()) return;
@@ -1989,7 +1989,7 @@ void KHTMLPart::write( const char *str, int len )
t->write( decoded, true );
}
-void KHTMLPart::write( const QString &str )
+void KHTMLPart::write( const TQString &str )
{
if ( str.isNull() )
return;
@@ -2008,7 +2008,7 @@ void KHTMLPart::end()
{
if (d->m_doc) {
if (d->m_decoder) {
- QString decoded = d->m_decoder->flush();
+ TQString decoded = d->m_decoder->flush();
if (d->m_bFirstData) {
d->m_bFirstData = false;
d->m_doc->determineParseMode(decoded);
@@ -2019,7 +2019,7 @@ void KHTMLPart::end()
}
}
-bool KHTMLPart::doOpenStream( const QString& mimeType )
+bool KHTMLPart::doOpenStream( const TQString& mimeType )
{
KMimeType::Ptr mime = KMimeType::mimeType(mimeType);
if ( mime->is( "text/html" ) || mime->is( "text/xml" ) )
@@ -2030,7 +2030,7 @@ bool KHTMLPart::doOpenStream( const QString& mimeType )
return false;
}
-bool KHTMLPart::doWriteStream( const QByteArray& data )
+bool KHTMLPart::doWriteStream( const TQByteArray& data )
{
write( data.data(), data.size() );
return true;
@@ -2043,7 +2043,7 @@ bool KHTMLPart::doCloseStream()
}
-void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
+void KHTMLPart::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more)
{
if (!d->m_view) return;
d->m_view->paint(p, rc, yOff, more);
@@ -2068,8 +2068,8 @@ void KHTMLPart::resetFromScript()
closeURL();
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
- disconnect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
- connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
+ disconnect(d->m_doc,TQT_SIGNAL(finishedParsing()),this,TQT_SLOT(slotFinishedParsing()));
+ connect(d->m_doc,TQT_SIGNAL(finishedParsing()),this,TQT_SLOT(slotFinishedParsing()));
d->m_doc->setParsing(true);
emit started( 0L );
@@ -2079,7 +2079,7 @@ void KHTMLPart::slotFinishedParsing()
{
d->m_doc->setParsing(false);
checkEmitLoadEvent();
- disconnect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
+ disconnect(d->m_doc,TQT_SIGNAL(finishedParsing()),this,TQT_SLOT(slotFinishedParsing()));
if (!d->m_view)
return; // We are probably being destructed.
@@ -2292,7 +2292,7 @@ void KHTMLPart::checkCompleted()
d->m_view->complete( pendingAction );
// find the alternate stylesheets
- QStringList sheets;
+ TQStringList sheets;
if (d->m_doc)
sheets = d->m_doc->availableStyleSheets();
sheets.prepend( i18n( "Automatic Detection" ) );
@@ -2305,7 +2305,7 @@ void KHTMLPart::checkCompleted()
slotUseStylesheet();
}
- setJSDefaultStatusBarText(QString::null);
+ setJSDefaultStatusBarText(TQString::null);
#ifdef SPEED_DEBUG
kdDebug(6050) << "DONE: " <<d->m_parsetime.elapsed() << endl;
@@ -2357,15 +2357,15 @@ KURL KHTMLPart::baseURL() const
return d->m_doc->baseURL();
}
-QString KHTMLPart::baseTarget() const
+TQString KHTMLPart::baseTarget() const
{
- if ( !d->m_doc ) return QString::null;
+ if ( !d->m_doc ) return TQString::null;
return d->m_doc->baseTarget();
}
#endif
-KURL KHTMLPart::completeURL( const QString &url )
+KURL KHTMLPart::completeURL( const TQString &url )
{
if ( !d->m_doc ) return KURL( url );
@@ -2377,7 +2377,7 @@ KURL KHTMLPart::completeURL( const QString &url )
// Called by ecma/kjs_window in case of redirections from Javascript,
// and by xml/dom_docimpl.cpp in case of http-equiv meta refresh.
-void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool doLockHistory )
+void KHTMLPart::scheduleRedirection( int delay, const TQString &url, bool doLockHistory )
{
kdDebug(6050) << "KHTMLPart::scheduleRedirection delay=" << delay << " url=" << url << endl;
kdDebug(6050) << "current redirectURL=" << d->m_redirectURL << " with delay " << d->m_delayRedirect << endl;
@@ -2397,17 +2397,17 @@ void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool doLockH
void KHTMLPart::slotRedirect()
{
kdDebug(6050) << this << " slotRedirect()" << endl;
- QString u = d->m_redirectURL;
+ TQString u = d->m_redirectURL;
d->m_delayRedirect = 0;
- d->m_redirectURL = QString::null;
+ d->m_redirectURL = TQString::null;
// SYNC check with ecma/kjs_window.cpp::goURL !
- if ( u.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
+ if ( u.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
- QString script = KURL::decode_string( u.right( u.length() - 11 ) );
+ TQString script = KURL::decode_string( u.right( u.length() - 11 ) );
kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
- QVariant res = executeScript( DOM::Node(), script );
- if ( res.type() == QVariant::String ) {
+ TQVariant res = executeScript( DOM::Node(), script );
+ if ( res.type() == TQVariant::String ) {
begin( url() );
write( res.asString() );
end();
@@ -2461,7 +2461,7 @@ void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url)
d->m_workingURL = url;
}
-bool KHTMLPart::setEncoding( const QString &name, bool override )
+bool KHTMLPart::setEncoding( const TQString &name, bool override )
{
d->m_encoding = name;
d->m_haveEncoding = override;
@@ -2479,20 +2479,20 @@ bool KHTMLPart::setEncoding( const QString &name, bool override )
return true;
}
-QString KHTMLPart::encoding() const
+TQString KHTMLPart::encoding() const
{
if(d->m_haveEncoding && !d->m_encoding.isEmpty())
return d->m_encoding;
if(d->m_decoder && d->m_decoder->encoding())
- return QString(d->m_decoder->encoding());
+ return TQString(d->m_decoder->encoding());
return defaultEncoding();
}
-QString KHTMLPart::defaultEncoding() const
+TQString KHTMLPart::defaultEncoding() const
{
- QString encoding = settings()->encoding();
+ TQString encoding = settings()->encoding();
if ( !encoding.isEmpty() )
return encoding;
// HTTP requires the default encoding to be latin1, when neither
@@ -2509,13 +2509,13 @@ void KHTMLPart::setUserStyleSheet(const KURL &url)
(void) new khtml::PartStyleSheetLoader(this, url.url(), d->m_doc->docLoader());
}
-void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
+void KHTMLPart::setUserStyleSheet(const TQString &styleSheet)
{
if ( d->m_doc )
d->m_doc->setUserStyleSheet( styleSheet );
}
-bool KHTMLPart::gotoAnchor( const QString &name )
+bool KHTMLPart::gotoAnchor( const TQString &name )
{
if (!d->m_doc)
return false;
@@ -2581,22 +2581,22 @@ bool KHTMLPart::prevAnchor()
return true;
}
-void KHTMLPart::setStandardFont( const QString &name )
+void KHTMLPart::setStandardFont( const TQString &name )
{
d->m_settings->setStdFontName(name);
}
-void KHTMLPart::setFixedFont( const QString &name )
+void KHTMLPart::setFixedFont( const TQString &name )
{
d->m_settings->setFixedFontName(name);
}
-void KHTMLPart::setURLCursor( const QCursor &c )
+void KHTMLPart::setURLCursor( const TQCursor &c )
{
d->m_linkCursor = c;
}
-QCursor KHTMLPart::urlCursor() const
+TQCursor KHTMLPart::urlCursor() const
{
return d->m_linkCursor;
}
@@ -2619,8 +2619,8 @@ void KHTMLPartPrivate::setFlagRecursively(
// descend into child frames recursively
{
- QValueList<khtml::ChildFrame*>::Iterator it = m_frames.begin();
- const QValueList<khtml::ChildFrame*>::Iterator itEnd = m_frames.end();
+ TQValueList<khtml::ChildFrame*>::Iterator it = m_frames.begin();
+ const TQValueList<khtml::ChildFrame*>::Iterator itEnd = m_frames.end();
for (; it != itEnd; ++it) {
KHTMLPart* const part = static_cast<KHTMLPart *>((KParts::ReadOnlyPart *)(*it)->m_part);
if (part->inherits("KHTMLPart"))
@@ -2629,8 +2629,8 @@ void KHTMLPartPrivate::setFlagRecursively(
}
// do the same again for objects
{
- QValueList<khtml::ChildFrame*>::Iterator it = m_objects.begin();
- const QValueList<khtml::ChildFrame*>::Iterator itEnd = m_objects.end();
+ TQValueList<khtml::ChildFrame*>::Iterator it = m_objects.begin();
+ const TQValueList<khtml::ChildFrame*>::Iterator itEnd = m_objects.end();
for (; it != itEnd; ++it) {
KHTMLPart* const part = static_cast<KHTMLPart *>((KParts::ReadOnlyPart *)(*it)->m_part);
if (part->inherits("KHTMLPart"))
@@ -2817,7 +2817,7 @@ bool KHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor )
}
// Old method (its API limits the available features - remove in KDE-4)
-bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensitive, bool isRegExp )
+bool KHTMLPart::findTextNext( const TQString &str, bool forward, bool caseSensitive, bool isRegExp )
{
if ( !initFindNode( false, !forward, d->m_findNode ) )
return false;
@@ -2827,11 +2827,11 @@ bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensiti
{
DOMString nodeText = d->m_findNode->nodeValue();
DOMStringImpl *t = nodeText.implementation();
- QConstString s(t->s, t->l);
+ TQConstString s(t->s, t->l);
int matchLen = 0;
if ( isRegExp ) {
- QRegExp matcher( str );
+ TQRegExp matcher( str );
matcher.setCaseSensitive( caseSensitive );
d->m_findPos = matcher.search(s.string(), d->m_findPos+1);
if ( d->m_findPos != -1 )
@@ -3005,7 +3005,7 @@ void KHTMLPart::findText()
// The lineedit of the dialog would make khtml lose its selection, otherwise
#ifndef QT_NO_CLIPBOARD
- disconnect( kapp->clipboard(), SIGNAL(selectionChanged()), this, SLOT(slotClearSelection()) );
+ disconnect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotClearSelection()) );
#endif
// Now show the dialog in which the user can choose options.
@@ -3023,30 +3023,30 @@ void KHTMLPart::findText()
d->m_lastFindState.last_dir = -1;
d->m_findDialog->show();
- connect( d->m_findDialog, SIGNAL(okClicked()), this, SLOT(slotFindNext()) );
- connect( d->m_findDialog, SIGNAL(finished()), this, SLOT(slotFindDialogDestroyed()) );
+ connect( d->m_findDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotFindNext()) );
+ connect( d->m_findDialog, TQT_SIGNAL(finished()), this, TQT_SLOT(slotFindDialogDestroyed()) );
findText( d->m_findDialog->pattern(), 0 /*options*/, widget(), d->m_findDialog );
}
-void KHTMLPart::findText( const QString &str, long options, QWidget *parent, KFindDialog *findDialog )
+void KHTMLPart::findText( const TQString &str, long options, TQWidget *parent, KFindDialog *findDialog )
{
// First do some init to make sure we can search in this frame
if ( !d->m_doc )
return;
#ifndef QT_NO_CLIPBOARD
- connect( kapp->clipboard(), SIGNAL(selectionChanged()), SLOT(slotClearSelection()) );
+ connect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) );
#endif
// Create the KFind object
delete d->m_find;
d->m_find = new KFind( str, options, parent, findDialog );
d->m_find->closeFindNextDialog(); // we use KFindDialog non-modal, so we don't want other dlg popping up
- connect( d->m_find, SIGNAL( highlight( const QString &, int, int ) ),
- this, SLOT( slotHighlight( const QString &, int, int ) ) );
- //connect(d->m_find, SIGNAL( findNext() ),
- // this, SLOT( slotFindNext() ) );
+ connect( d->m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
+ //connect(d->m_find, TQT_SIGNAL( findNext() ),
+ // this, TQT_SLOT( slotFindNext() ) );
if ( !findDialog )
{
@@ -3146,20 +3146,20 @@ bool KHTMLPart::findTextNext( bool reverse )
break; // we're done
}
//kdDebug(6050) << k_funcinfo << " gathering data" << endl;
- // First make up the QString for the current 'line' (i.e. up to \n)
+ // First make up the TQString for the current 'line' (i.e. up to \n)
// We also want to remember the DOMNode for every portion of the string.
// We store this in an index->node list.
d->m_stringPortions.clear();
bool newLine = false;
- QString str;
+ TQString str;
DOM::NodeImpl* lastNode = d->m_findNode;
while ( obj && !newLine )
{
// Grab text from render object
- QString s;
- bool renderAreaText = obj->parent() && (QCString(obj->parent()->renderName())== "RenderTextArea");
- bool renderLineText = (QCString(obj->renderName())== "RenderLineEdit");
+ TQString s;
+ bool renderAreaText = obj->parent() && (TQCString(obj->parent()->renderName())== "RenderTextArea");
+ bool renderLineText = (TQCString(obj->renderName())== "RenderLineEdit");
if ( renderAreaText )
{
khtml::RenderTextArea *parent= static_cast<khtml::RenderTextArea *>(obj->parent());
@@ -3170,7 +3170,7 @@ bool KHTMLPart::findTextNext( bool reverse )
else if ( renderLineText )
{
khtml::RenderLineEdit *parentLine= static_cast<khtml::RenderLineEdit *>(obj);
- if (parentLine->widget()->echoMode() == QLineEdit::Normal)
+ if (parentLine->widget()->echoMode() == TQLineEdit::Normal)
s = parentLine->widget()->text();
s = s.replace(0xa0, ' ');
}
@@ -3221,7 +3221,7 @@ bool KHTMLPart::findTextNext( bool reverse )
}
else // KFind itself can search backwards, so str must not be built backwards
{
- for( QValueList<KHTMLPartPrivate::StringPortion>::Iterator it = d->m_stringPortions.begin();
+ for( TQValueList<KHTMLPartPrivate::StringPortion>::Iterator it = d->m_stringPortions.begin();
it != d->m_stringPortions.end();
++it )
(*it).index += s.length();
@@ -3290,12 +3290,12 @@ bool KHTMLPart::findTextNext( bool reverse )
return res == KFind::Match;
}
-void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )
+void KHTMLPart::slotHighlight( const TQString& /*text*/, int index, int length )
{
//kdDebug(6050) << "slotHighlight index=" << index << " length=" << length << endl;
- QValueList<KHTMLPartPrivate::StringPortion>::Iterator it = d->m_stringPortions.begin();
- const QValueList<KHTMLPartPrivate::StringPortion>::Iterator itEnd = d->m_stringPortions.end();
- QValueList<KHTMLPartPrivate::StringPortion>::Iterator prev = it;
+ TQValueList<KHTMLPartPrivate::StringPortion>::Iterator it = d->m_stringPortions.begin();
+ const TQValueList<KHTMLPartPrivate::StringPortion>::Iterator itEnd = d->m_stringPortions.end();
+ TQValueList<KHTMLPartPrivate::StringPortion>::Iterator prev = it;
// We stop at the first portion whose index is 'greater than', and then use the previous one
while ( it != itEnd && (*it).index <= index )
{
@@ -3314,14 +3314,14 @@ void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )
khtml::RenderLineEdit *parentLine = 0L;
bool renderLineText =false;
- QRect highlightedRect;
+ TQRect highlightedRect;
bool renderAreaText =false;
Q_ASSERT( obj );
if ( obj )
{
int x = 0, y = 0;
- renderAreaText = (QCString(obj->parent()->renderName())== "RenderTextArea");
- renderLineText = (QCString(obj->renderName())== "RenderLineEdit");
+ renderAreaText = (TQCString(obj->parent()->renderName())== "RenderTextArea");
+ renderLineText = (TQCString(obj->renderName())== "RenderLineEdit");
if( renderAreaText )
@@ -3345,7 +3345,7 @@ void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )
gox = x - d->m_view->visibleWidth() - 10;
if (gox < 0) gox = 0;
d->m_view->setContentsPos(gox, y-50);
- highlightedRect.setTopLeft( d->m_view->mapToGlobal(QPoint(x, y)) );
+ highlightedRect.setTopLeft( d->m_view->mapToGlobal(TQPoint(x, y)) );
}
}
}
@@ -3416,7 +3416,7 @@ void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )
{
// if ( static_cast<khtml::RenderText *>(d->m_selectionEnd.handle()->renderer())
// ->posOfChar(d->m_endOffset-1, x, y))
- highlightedRect.setBottomRight( d->m_view->mapToGlobal( QPoint(x, y+height) ) );
+ highlightedRect.setBottomRight( d->m_view->mapToGlobal( TQPoint(x, y+height) ) );
}
}
}
@@ -3431,33 +3431,33 @@ void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )
}
}
-QString KHTMLPart::selectedTextAsHTML() const
+TQString KHTMLPart::selectedTextAsHTML() const
{
if(!hasSelection()) {
kdDebug() << "selectedTextAsHTML(): selection is not valid. Returning empty selection" << endl;
- return QString::null;
+ return TQString::null;
}
if(d->m_startOffset < 0 || d->m_endOffset <0) {
kdDebug() << "invalid values for end/startOffset " << d->m_startOffset << " " << d->m_endOffset << endl;
- return QString::null;
+ return TQString::null;
}
DOM::Range r = selection();
if(r.isNull() || r.isDetached())
- return QString::null;
+ return TQString::null;
int exceptioncode = 0; //ignore the result
return r.handle()->toHTML(exceptioncode).string();
}
-QString KHTMLPart::selectedText() const
+TQString KHTMLPart::selectedText() const
{
bool hasNewLine = true;
bool seenTDTag = false;
- QString text;
+ TQString text;
DOM::Node n = d->m_selectionStart;
while(!n.isNull()) {
if(n.nodeType() == DOM::Node::TEXT_NODE && n.handle()->renderer()) {
DOM::DOMStringImpl *dstr = static_cast<DOM::TextImpl*>(n.handle())->renderString();
- QString str(dstr->s, dstr->l);
+ TQString str(dstr->s, dstr->l);
if(!str.isEmpty()) {
if(seenTDTag) {
text += " ";
@@ -3574,7 +3574,7 @@ QString KHTMLPart::selectedText() const
}
if(text.isEmpty())
- return QString::null;
+ return TQString::null;
int start = 0;
int end = text.length();
@@ -3708,15 +3708,15 @@ void KHTMLPart::resetHoverText()
{
if( !d->m_overURL.isEmpty() ) // Only if we were showing a link
{
- d->m_overURL = d->m_overURLTarget = QString::null;
- emit onURL( QString::null );
+ d->m_overURL = d->m_overURLTarget = TQString::null;
+ emit onURL( TQString::null );
// revert to default statusbar text
- setStatusBarText(QString::null, BarHoverText);
+ setStatusBarText(TQString::null, BarHoverText);
emit d->m_extension->mouseOverInfo(0);
}
}
-void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shiftPressed*/ )
+void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shiftPressed*/ )
{
KURL u = completeURL(url);
@@ -3731,19 +3731,19 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
return;
}
- if (url.find( QString::fromLatin1( "javascript:" ),0, false ) == 0 ) {
- QString jscode = KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) );
+ if (url.find( TQString::fromLatin1( "javascript:" ),0, false ) == 0 ) {
+ TQString jscode = KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) );
jscode = KStringHandler::rsqueeze( jscode, 80 ); // truncate if too long
if (url.startsWith("javascript:window.open"))
jscode += i18n(" (In new window)");
- setStatusBarText( QStyleSheet::escape( jscode ), BarHoverText );
+ setStatusBarText( TQStyleSheet::escape( jscode ), BarHoverText );
return;
}
- KFileItem item(u, QString::null, KFileItem::Unknown);
+ KFileItem item(u, TQString::null, KFileItem::Unknown);
emit d->m_extension->mouseOverInfo(&item);
- QString com;
+ TQString com;
KMimeType::Ptr typ = KMimeType::findByURL( u );
@@ -3759,7 +3759,7 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
{
// TODO : use KIO::stat() and create a KFileItem out of its result,
// to use KFileItem::statusBarText()
- QCString path = QFile::encodeName( u.path() );
+ TQCString path = TQFile::encodeName( u.path() );
struct stat buff;
bool ok = !stat( path.data(), &buff );
@@ -3767,12 +3767,12 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
struct stat lbuff;
if (ok) ok = !lstat( path.data(), &lbuff );
- QString text = u.htmlURL();
- QString text2 = text;
+ TQString text = u.htmlURL();
+ TQString text2 = text;
if (ok && S_ISLNK( lbuff.st_mode ) )
{
- QString tmp;
+ TQString tmp;
if ( com.isNull() )
tmp = i18n( "Symbolic Link");
else
@@ -3819,7 +3819,7 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
}
else
{
- QString extra;
+ TQString extra;
if (target.lower() == "_blank")
{
extra = i18n(" (In new window)");
@@ -3838,42 +3838,42 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
extra = i18n(" (In other frame)");
}
- if (u.protocol() == QString::fromLatin1("mailto")) {
- QString mailtoMsg /* = QString::fromLatin1("<img src=%1>").arg(locate("icon", QString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/;
+ if (u.protocol() == TQString::fromLatin1("mailto")) {
+ TQString mailtoMsg /* = TQString::fromLatin1("<img src=%1>").arg(locate("icon", TQString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/;
mailtoMsg += i18n("Email to: ") + KURL::decode_string(u.path());
- QStringList queries = QStringList::split('&', u.query().mid(1));
- QStringList::Iterator it = queries.begin();
- const QStringList::Iterator itEnd = queries.end();
+ TQStringList queries = TQStringList::split('&', u.query().mid(1));
+ TQStringList::Iterator it = queries.begin();
+ const TQStringList::Iterator itEnd = queries.end();
for (; it != itEnd; ++it)
- if ((*it).startsWith(QString::fromLatin1("subject=")))
+ if ((*it).startsWith(TQString::fromLatin1("subject=")))
mailtoMsg += i18n(" - Subject: ") + KURL::decode_string((*it).mid(8));
- else if ((*it).startsWith(QString::fromLatin1("cc=")))
+ else if ((*it).startsWith(TQString::fromLatin1("cc=")))
mailtoMsg += i18n(" - CC: ") + KURL::decode_string((*it).mid(3));
- else if ((*it).startsWith(QString::fromLatin1("bcc=")))
+ else if ((*it).startsWith(TQString::fromLatin1("bcc=")))
mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4));
- mailtoMsg = QStyleSheet::escape(mailtoMsg);
- mailtoMsg.replace(QRegExp("([\n\r\t]|[ ]{10})"), QString::null);
+ mailtoMsg = TQStyleSheet::escape(mailtoMsg);
+ mailtoMsg.replace(TQRegExp("([\n\r\t]|[ ]{10})"), TQString::null);
setStatusBarText("<qt>"+mailtoMsg, BarHoverText);
return;
}
// Is this check necessary at all? (Frerich)
#if 0
- else if (u.protocol() == QString::fromLatin1("http")) {
+ else if (u.protocol() == TQString::fromLatin1("http")) {
DOM::Node hrefNode = nodeUnderMouse().parentNode();
- while (hrefNode.nodeName().string() != QString::fromLatin1("A") && !hrefNode.isNull())
+ while (hrefNode.nodeName().string() != TQString::fromLatin1("A") && !hrefNode.isNull())
hrefNode = hrefNode.parentNode();
if (!hrefNode.isNull()) {
DOM::Node hreflangNode = hrefNode.attributes().getNamedItem("HREFLANG");
if (!hreflangNode.isNull()) {
- QString countryCode = hreflangNode.nodeValue().string().lower();
+ TQString countryCode = hreflangNode.nodeValue().string().lower();
// Map the language code to an appropriate country code.
- if (countryCode == QString::fromLatin1("en"))
- countryCode = QString::fromLatin1("gb");
- QString flagImg = QString::fromLatin1("<img src=%1>").arg(
- locate("locale", QString::fromLatin1("l10n/")
+ if (countryCode == TQString::fromLatin1("en"))
+ countryCode = TQString::fromLatin1("gb");
+ TQString flagImg = TQString::fromLatin1("<img src=%1>").arg(
+ locate("locale", TQString::fromLatin1("l10n/")
+ countryCode
- + QString::fromLatin1("/flag.png")));
+ + TQString::fromLatin1("/flag.png")));
emit setStatusBarText(flagImg + u.prettyURL() + extra);
}
}
@@ -3887,7 +3887,7 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool /*shift
// This executes in the active part on a click or other url selection action in
// that active part.
//
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args )
+void KHTMLPart::urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args )
{
// The member var is so that slotRedirection still calls the virtual urlSelected
// but is able to know if is opened a url. KDE4: just make urlSelected return a bool
@@ -3896,17 +3896,17 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
}
// Return value: true if an url was opened, false if not (e.g. error, or jumping to anchor)
-bool KHTMLPart::urlSelectedIntern( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args )
+bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args )
{
bool hasTarget = false;
- QString target = _target;
+ TQString target = _target;
if ( target.isEmpty() && d->m_doc )
target = d->m_doc->baseTarget();
if ( !target.isEmpty() )
hasTarget = true;
- if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
+ if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
crossFrameExecuteScript( target, KURL::decode_string( url.mid( 11 ) ) );
return false;
@@ -4017,7 +4017,7 @@ void KHTMLPart::slotViewDocumentSource()
bool isTempFile = false;
if (!(url.isLocalFile()) && KHTMLPageCache::self()->isComplete(d->m_cacheId))
{
- KTempFile sourceFile(QString::null, defaultExtension());
+ KTempFile sourceFile(TQString::null, defaultExtension());
if (sourceFile.status() == 0)
{
KHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream());
@@ -4027,7 +4027,7 @@ void KHTMLPart::slotViewDocumentSource()
}
}
- (void) KRun::runURL( url, QString::fromLatin1("text/plain"), isTempFile );
+ (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile );
}
void KHTMLPart::slotViewPageInfo()
@@ -4043,12 +4043,12 @@ void KHTMLPart::slotViewPageInfo()
dlg->setCaption(i18n("Frame Information"));
}
- QString editStr = QString::null;
+ TQString editStr = TQString::null;
if (!d->m_pageServices.isEmpty())
editStr = i18n(" <a href=\"%1\">[Properties]</a>").arg(d->m_pageServices);
- QString squeezedURL = KStringHandler::csqueeze( url().prettyURL(), 80 );
+ TQString squeezedURL = KStringHandler::csqueeze( url().prettyURL(), 80 );
dlg->_url->setText("<a href=\"" + url().url() + "\">" + squeezedURL + "</a>" + editStr);
if (lastModified().isEmpty())
{
@@ -4058,7 +4058,7 @@ void KHTMLPart::slotViewPageInfo()
else
dlg->_lastModified->setText(lastModified());
- const QString& enc = encoding();
+ const TQString& enc = encoding();
if (enc.isEmpty()) {
dlg->_eLabel->hide();
dlg->_encoding->hide();
@@ -4066,16 +4066,16 @@ void KHTMLPart::slotViewPageInfo()
dlg->_encoding->setText(enc);
}
/* populate the list view now */
- const QStringList headers = QStringList::split("\n", d->m_httpHeaders);
+ const TQStringList headers = TQStringList::split("\n", d->m_httpHeaders);
- QStringList::ConstIterator it = headers.begin();
- const QStringList::ConstIterator itEnd = headers.end();
+ TQStringList::ConstIterator it = headers.begin();
+ const TQStringList::ConstIterator itEnd = headers.end();
for (; it != itEnd; ++it) {
- const QStringList header = QStringList::split(QRegExp(":[ ]+"), *it);
+ const TQStringList header = TQStringList::split(TQRegExp(":[ ]+"), *it);
if (header.count() != 2)
continue;
- new QListViewItem(dlg->_headers, header[0], header[1]);
+ new TQListViewItem(dlg->_headers, header[0], header[1]);
}
dlg->show();
@@ -4097,7 +4097,7 @@ void KHTMLPart::slotViewFrameSource()
if (KHTMLPageCache::self()->isComplete(cacheId))
{
- KTempFile sourceFile(QString::null, defaultExtension());
+ KTempFile sourceFile(TQString::null, defaultExtension());
if (sourceFile.status() == 0)
{
KHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream());
@@ -4108,7 +4108,7 @@ void KHTMLPart::slotViewFrameSource()
}
}
- (void) KRun::runURL( url, QString::fromLatin1("text/plain"), isTempFile );
+ (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile );
}
KURL KHTMLPart::backgroundURL() const
@@ -4117,7 +4117,7 @@ KURL KHTMLPart::backgroundURL() const
if (!d->m_doc || !d->m_doc->isHTMLDocument())
return KURL();
- QString relURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
+ TQString relURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
return KURL( m_url, relURL );
}
@@ -4170,12 +4170,12 @@ void KHTMLPart::slotSecurity()
KSSLCertificate *x = KSSLCertificate::fromString(d->m_ssl_peer_certificate.local8Bit());
if (x) {
// Set the chain back onto the certificate
- const QStringList cl = QStringList::split(QString("\n"), d->m_ssl_peer_chain);
- QPtrList<KSSLCertificate> ncl;
+ const TQStringList cl = TQStringList::split(TQString("\n"), d->m_ssl_peer_chain);
+ TQPtrList<KSSLCertificate> ncl;
ncl.setAutoDelete(true);
- QStringList::ConstIterator it = cl.begin();
- const QStringList::ConstIterator itEnd = cl.end();
+ TQStringList::ConstIterator it = cl.begin();
+ const TQStringList::ConstIterator itEnd = cl.end();
for (; it != itEnd; ++it) {
KSSLCertificate* const y = KSSLCertificate::fromString((*it).local8Bit());
if (y) ncl.append(y);
@@ -4222,7 +4222,7 @@ void KHTMLPart::slotSetEncoding()
d->m_paSetEncoding->popupMenu()->setItemChecked( 0, false );
d->m_paSetEncoding->popupMenu()->setItemChecked( d->m_paSetEncoding->popupMenu()->idAt( 2 ), true );
- QString enc = KGlobal::charsets()->encodingForName( d->m_manualDetection->currentText() );
+ TQString enc = KGlobal::charsets()->encodingForName( d->m_manualDetection->currentText() );
setEncoding( enc, true );
}
@@ -4231,7 +4231,7 @@ void KHTMLPart::slotUseStylesheet()
if (d->m_doc)
{
bool autoselect = (d->m_paUseStylesheet->currentItem() == 0);
- d->m_sheetUsed = autoselect ? QString() : d->m_paUseStylesheet->currentText();
+ d->m_sheetUsed = autoselect ? TQString() : d->m_paUseStylesheet->currentText();
d->m_doc->updateStyleSelector();
}
}
@@ -4240,8 +4240,8 @@ void KHTMLPart::updateActions()
{
bool frames = false;
- QValueList<khtml::ChildFrame*>::ConstIterator it = d->m_frames.begin();
- const QValueList<khtml::ChildFrame*>::ConstIterator end = d->m_frames.end();
+ TQValueList<khtml::ChildFrame*>::ConstIterator it = d->m_frames.begin();
+ const TQValueList<khtml::ChildFrame*>::ConstIterator end = d->m_frames.end();
for (; it != end; ++it )
if ( (*it)->m_type == khtml::ChildFrame::Frame )
{
@@ -4274,14 +4274,14 @@ void KHTMLPart::updateActions()
if ( frame )
{
- QObject *ext = KParts::BrowserExtension::childObject( frame );
+ TQObject *ext = KParts::BrowserExtension::childObject( frame );
if ( ext )
enablePrintFrame = ext->metaObject()->slotNames().contains( "print()" );
}
d->m_paPrintFrame->setEnabled( enablePrintFrame );
- QString bgURL;
+ TQString bgURL;
// ### frames
if ( d->m_doc && d->m_doc->isHTMLDocument() && static_cast<HTMLDocumentImpl*>(d->m_doc)->body() && !d->m_bClearing )
@@ -4301,8 +4301,8 @@ KParts::LiveConnectExtension *KHTMLPart::liveConnectExtension( const khtml::Rend
return 0L;
}
-bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
- const QStringList &params, bool isIFrame )
+bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, const TQString &frameName,
+ const TQStringList &params, bool isIFrame )
{
//kdDebug( 6050 ) << this << " requestFrame( ..., " << url << ", " << frameName << " )" << endl;
FrameIt it = d->m_frames.find( frameName );
@@ -4319,14 +4319,14 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
(*it)->m_params = params;
// Support for <frame src="javascript:string">
- if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
+ if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
- if ( processObjectRequest(*it, KURL("about:blank"), QString("text/html") ) ) {
+ if ( processObjectRequest(*it, KURL("about:blank"), TQString("text/html") ) ) {
KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>((*it)->m_part));
// See if we want to replace content with javascript: output..
- QVariant res = p->executeScript( DOM::Node(), KURL::decode_string( url.right( url.length() - 11) ) );
- if ( res.type() == QVariant::String ) {
+ TQVariant res = p->executeScript( DOM::Node(), KURL::decode_string( url.right( url.length() - 11) ) );
+ if ( res.type() == TQVariant::String ) {
p->begin();
p->write( res.asString() );
p->end();
@@ -4339,13 +4339,13 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
return requestObject( *it, u );
}
-QString KHTMLPart::requestFrameName()
+TQString KHTMLPart::requestFrameName()
{
- return QString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
+ return TQString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
}
-bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
- const QStringList &params )
+bool KHTMLPart::requestObject( khtml::RenderPart *frame, const TQString &url, const TQString &serviceType,
+ const TQStringList &params )
{
//kdDebug( 6005 ) << "KHTMLPart::requestObject " << this << " frame=" << frame << endl;
khtml::ChildFrame *child = new khtml::ChildFrame;
@@ -4392,7 +4392,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const
child->m_args = args;
child->m_args.reload = (d->m_cachePolicy == KIO::CC_Reload);
- child->m_serviceName = QString::null;
+ child->m_serviceName = TQString::null;
if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" ))
child->m_args.metaData()["referrer"] = d->m_referrer;
@@ -4408,7 +4408,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const
// We want a KHTMLPart if the HTML says <frame src=""> or <frame src="about:blank">
if ((url.isEmpty() || url.url() == "about:blank") && args.serviceType.isEmpty())
- args.serviceType = QString::fromLatin1( "text/html" );
+ args.serviceType = TQString::fromLatin1( "text/html" );
if ( args.serviceType.isEmpty() ) {
kdDebug(6050) << "Running new KHTMLRun for " << this << " and child=" << child << endl;
@@ -4420,7 +4420,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const
}
}
-bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url, const QString &mimetype )
+bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url, const TQString &mimetype )
{
//kdDebug( 6050 ) << "KHTMLPart::processObjectRequest trying to create part for " << mimetype << endl;
@@ -4451,7 +4451,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
// However we don't want to ask for flash and other plugin things..
if ( child->m_type != khtml::ChildFrame::Object )
{
- QString suggestedFilename;
+ TQString suggestedFilename;
if ( child->m_run )
suggestedFilename = child->m_run->suggestedFilename();
@@ -4459,7 +4459,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
url, mimetype, suggestedFilename );
switch( res ) {
case KParts::BrowserRun::Save:
- KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), QString::null, 0, suggestedFilename);
+ KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), TQString::null, 0, suggestedFilename);
// fall-through
case KParts::BrowserRun::Cancel:
child->m_bCompleted = true;
@@ -4470,7 +4470,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
}
}
- QStringList dummy; // the list of servicetypes handled by the part is now unused.
+ TQStringList dummy; // the list of servicetypes handled by the part is now unused.
KParts::ReadOnlyPart *part = createPart( d->m_view->viewport(), child->m_name.ascii(), this, child->m_name.ascii(), mimetype, child->m_serviceName, dummy, child->m_params );
if ( !part )
@@ -4491,7 +4491,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part );
delete (KParts::ReadOnlyPart *)child->m_part;
if (child->m_liveconnect) {
- disconnect(child->m_liveconnect, SIGNAL(partEvent(const unsigned long, const QString &, const KParts::LiveConnectExtension::ArgList &)), child, SLOT(liveConnectEvent(const unsigned long, const QString&, const KParts::LiveConnectExtension::ArgList &)));
+ disconnect(child->m_liveconnect, TQT_SIGNAL(partEvent(const unsigned long, const TQString &, const KParts::LiveConnectExtension::ArgList &)), child, TQT_SLOT(liveConnectEvent(const unsigned long, const TQString&, const KParts::LiveConnectExtension::ArgList &)));
child->m_liveconnect = 0L;
}
}
@@ -4512,65 +4512,65 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
} else if (child->m_frame) {
child->m_liveconnect = KParts::LiveConnectExtension::childObject(part);
if (child->m_liveconnect)
- connect(child->m_liveconnect, SIGNAL(partEvent(const unsigned long, const QString &, const KParts::LiveConnectExtension::ArgList &)), child, SLOT(liveConnectEvent(const unsigned long, const QString&, const KParts::LiveConnectExtension::ArgList &)));
+ connect(child->m_liveconnect, TQT_SIGNAL(partEvent(const unsigned long, const TQString &, const KParts::LiveConnectExtension::ArgList &)), child, TQT_SLOT(liveConnectEvent(const unsigned long, const TQString&, const KParts::LiveConnectExtension::ArgList &)));
}
KParts::StatusBarExtension *sb = KParts::StatusBarExtension::childObject(part);
if (sb)
sb->setStatusBar( d->m_statusBarExtension->statusBar() );
- connect( part, SIGNAL( started( KIO::Job *) ),
- this, SLOT( slotChildStarted( KIO::Job *) ) );
- connect( part, SIGNAL( completed() ),
- this, SLOT( slotChildCompleted() ) );
- connect( part, SIGNAL( completed(bool) ),
- this, SLOT( slotChildCompleted(bool) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SIGNAL( setStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( started( KIO::Job *) ),
+ this, TQT_SLOT( slotChildStarted( KIO::Job *) ) );
+ connect( part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotChildCompleted() ) );
+ connect( part, TQT_SIGNAL( completed(bool) ),
+ this, TQT_SLOT( slotChildCompleted(bool) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SIGNAL( setStatusBarText( const TQString & ) ) );
if ( part->inherits( "KHTMLPart" ) )
{
- connect( this, SIGNAL( completed() ),
- part, SLOT( slotParentCompleted() ) );
- connect( this, SIGNAL( completed(bool) ),
- part, SLOT( slotParentCompleted() ) );
+ connect( this, TQT_SIGNAL( completed() ),
+ part, TQT_SLOT( slotParentCompleted() ) );
+ connect( this, TQT_SIGNAL( completed(bool) ),
+ part, TQT_SLOT( slotParentCompleted() ) );
// As soon as the child's document is created, we need to set its domain
// (but we do so only once, so it can't be simply done in the child)
- connect( part, SIGNAL( docCreated() ),
- this, SLOT( slotChildDocCreated() ) );
+ connect( part, TQT_SIGNAL( docCreated() ),
+ this, TQT_SLOT( slotChildDocCreated() ) );
}
child->m_extension = KParts::BrowserExtension::childObject( part );
if ( child->m_extension )
{
- connect( child->m_extension, SIGNAL( openURLNotify() ),
- d->m_extension, SIGNAL( openURLNotify() ) );
-
- connect( child->m_extension, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( slotChildURLRequest( const KURL &, const KParts::URLArgs & ) ) );
-
- connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
- d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
- connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
- d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
-
- connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
- d->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ) );
- connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
- d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
- connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ),
- d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ) );
- connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
- d->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
- connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
- d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
- connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
- d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
-
- connect( child->m_extension, SIGNAL( infoMessage( const QString & ) ),
- d->m_extension, SIGNAL( infoMessage( const QString & ) ) );
-
- connect( child->m_extension, SIGNAL( requestFocus( KParts::ReadOnlyPart * ) ),
- this, SLOT( slotRequestFocus( KParts::ReadOnlyPart * ) ) );
+ connect( child->m_extension, TQT_SIGNAL( openURLNotify() ),
+ d->m_extension, TQT_SIGNAL( openURLNotify() ) );
+
+ connect( child->m_extension, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( slotChildURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+
+ connect( child->m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
+ d->m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
+ connect( child->m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
+ d->m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
+
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KFileItemList & ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KFileItemList & ) ) );
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList & ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList & ) ) );
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ) );
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t ) ) );
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const TQString &, mode_t ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const TQString &, mode_t ) ) );
+ connect( child->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
+ d->m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
+
+ connect( child->m_extension, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ d->m_extension, TQT_SIGNAL( infoMessage( const TQString & ) ) );
+
+ connect( child->m_extension, TQT_SIGNAL( requestFocus( KParts::ReadOnlyPart * ) ),
+ this, TQT_SLOT( slotRequestFocus( KParts::ReadOnlyPart * ) ) );
child->m_extension->setBrowserInterface( d->m_extension->browserInterface() );
}
@@ -4643,23 +4643,23 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url
}
}
-KParts::ReadOnlyPart *KHTMLPart::createPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QString &mimetype,
- QString &serviceName, QStringList &serviceTypes,
- const QStringList &params )
+KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQString &mimetype,
+ TQString &serviceName, TQStringList &serviceTypes,
+ const TQStringList &params )
{
- QString constr;
+ TQString constr;
if ( !serviceName.isEmpty() )
- constr.append( QString::fromLatin1( "Name == '%1'" ).arg( serviceName ) );
+ constr.append( TQString::fromLatin1( "Name == '%1'" ).arg( serviceName ) );
- KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, QString::null );
+ KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString::null );
if ( offers.isEmpty() ) {
int pos = mimetype.find( "-plugin" );
if (pos < 0)
return 0L;
- QString stripped_mime = mimetype.left( pos );
- offers = KTrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, QString::null );
+ TQString stripped_mime = mimetype.left( pos );
+ offers = KTrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString::null );
if ( offers.isEmpty() )
return 0L;
}
@@ -4670,7 +4670,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( QWidget *parentWidget, const char *
{
KService::Ptr service = (*it);
- KLibFactory* const factory = KLibLoader::self()->factory( QFile::encodeName(service->library()) );
+ KLibFactory* const factory = KLibLoader::self()->factory( TQFile::encodeName(service->library()) );
if ( factory ) {
KParts::ReadOnlyPart *res = 0L;
@@ -4690,7 +4690,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( QWidget *parentWidget, const char *
}
} else {
// TODO KMessageBox::error and i18n, like in KonqFactory::createView?
- kdWarning() << QString("There was an error loading the module %1.\nThe diagnostics is:\n%2")
+ kdWarning() << TQString("There was an error loading the module %1.\nThe diagnostics is:\n%2")
.arg(service->name()).arg(KLibLoader::self()->lastErrorMessage()) << endl;
}
}
@@ -4703,10 +4703,10 @@ KParts::PartManager *KHTMLPart::partManager()
{
d->m_manager = new KParts::PartManager( d->m_view->topLevelWidget(), this, "khtml part manager" );
d->m_manager->setAllowNestedParts( true );
- connect( d->m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
- connect( d->m_manager, SIGNAL( partRemoved( KParts::Part * ) ),
- this, SLOT( slotPartRemoved( KParts::Part * ) ) );
+ connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+ connect( d->m_manager, TQT_SIGNAL( partRemoved( KParts::Part * ) ),
+ this, TQT_SLOT( slotPartRemoved( KParts::Part * ) ) );
}
return d->m_manager;
@@ -4714,7 +4714,7 @@ KParts::PartManager *KHTMLPart::partManager()
void KHTMLPart::submitFormAgain()
{
- disconnect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
+ disconnect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(submitFormAgain()));
if( d->m_doc && !d->m_doc->parsing() && d->m_submitForm)
KHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary );
@@ -4722,12 +4722,12 @@ void KHTMLPart::submitFormAgain()
d->m_submitForm = 0;
}
-void KHTMLPart::submitFormProxy( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
+void KHTMLPart::submitFormProxy( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary )
{
submitForm(action, url, formData, _target, contentType, boundary);
}
-void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
+void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary )
{
kdDebug(6000) << this << ": KHTMLPart::submitForm target=" << _target << " url=" << url << endl;
if (d->m_formNotification == KHTMLPart::Only) {
@@ -4777,7 +4777,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
"WarnOnUnencryptedForm");
// Move this setting into KSSL instead
KConfig *config = kapp->config();
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfigGroupSaver saver( config, grpNotifMsgs );
if (!config->readBoolEntry("WarnOnUnencryptedForm", true)) {
@@ -4809,9 +4809,9 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
// End form security checks
//
- QString urlstring = u.url();
+ TQString urlstring = u.url();
- if ( urlstring.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
+ if ( urlstring.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
urlstring = KURL::decode_string(urlstring);
crossFrameExecuteScript( _target, urlstring.right( urlstring.length() - 11) );
return;
@@ -4842,18 +4842,18 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
// Handle mailto: forms
if (u.protocol() == "mailto") {
// 1) Check for attach= and strip it
- QString q = u.query().mid(1);
- QStringList nvps = QStringList::split("&", q);
+ TQString q = u.query().mid(1);
+ TQStringList nvps = TQStringList::split("&", q);
bool triedToAttach = false;
- QStringList::Iterator nvp = nvps.begin();
- const QStringList::Iterator nvpEnd = nvps.end();
+ TQStringList::Iterator nvp = nvps.begin();
+ const TQStringList::Iterator nvpEnd = nvps.end();
// cannot be a for loop as if something is removed we don't want to do ++nvp, as
// remove returns an iterator pointing to the next item
while (nvp != nvpEnd) {
- const QStringList pair = QStringList::split("=", *nvp);
+ const TQStringList pair = TQStringList::split("=", *nvp);
if (pair.count() >= 2) {
if (pair.first().lower() == "attach") {
nvp = nvps.remove(nvp);
@@ -4870,32 +4870,32 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
KMessageBox::information(NULL, i18n("This site attempted to attach a file from your computer in the form submission. The attachment was removed for your protection."), i18n("KDE"), "WarnTriedAttach");
// 2) Append body=
- QString bodyEnc;
+ TQString bodyEnc;
if (contentType.lower() == "multipart/form-data") {
// FIXME: is this correct? I suspect not
- bodyEnc = KURL::encode_string(QString::fromLatin1(formData.data(),
+ bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(),
formData.size()));
} else if (contentType.lower() == "text/plain") {
// Convention seems to be to decode, and s/&/\n/
- QString tmpbody = QString::fromLatin1(formData.data(),
+ TQString tmpbody = TQString::fromLatin1(formData.data(),
formData.size());
- tmpbody.replace(QRegExp("[&]"), "\n");
- tmpbody.replace(QRegExp("[+]"), " ");
+ tmpbody.replace(TQRegExp("[&]"), "\n");
+ tmpbody.replace(TQRegExp("[+]"), " ");
tmpbody = KURL::decode_string(tmpbody); // Decode the rest of it
bodyEnc = KURL::encode_string(tmpbody); // Recode for the URL
} else {
- bodyEnc = KURL::encode_string(QString::fromLatin1(formData.data(),
+ bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(),
formData.size()));
}
- nvps.append(QString("body=%1").arg(bodyEnc));
+ nvps.append(TQString("body=%1").arg(bodyEnc));
q = nvps.join("&");
u.setQuery(q);
}
if ( strcmp( action, "get" ) == 0 ) {
if (u.protocol() != "mailto")
- u.setQuery( QString::fromLatin1( formData.data(), formData.size() ) );
+ u.setQuery( TQString::fromLatin1( formData.data(), formData.size() ) );
args.setDoPost( false );
}
else {
@@ -4921,7 +4921,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
d->m_submitForm->target = _target;
d->m_submitForm->submitContentType = contentType;
d->m_submitForm->submitBoundary = boundary;
- connect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
+ connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(submitFormAgain()));
}
else
{
@@ -4929,12 +4929,12 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
}
}
-void KHTMLPart::popupMenu( const QString &linkUrl )
+void KHTMLPart::popupMenu( const TQString &linkUrl )
{
KURL popupURL;
KURL linkKURL;
KParts::URLArgs args;
- QString referrer;
+ TQString referrer;
KParts::BrowserExtension::PopupFlags itemflags=KParts::BrowserExtension::ShowBookmark | KParts::BrowserExtension::ShowReload;
if ( linkUrl.isEmpty() ) { // click on background
@@ -4973,9 +4973,9 @@ void KHTMLPart::popupMenu( const QString &linkUrl )
// Danger, Will Robinson. The Popup might stay around for a much
// longer time than KHTMLPart. Deal with it.
KHTMLPopupGUIClient* client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, linkKURL );
- QGuardedPtr<QObject> guard( client );
+ TQGuardedPtr<TQObject> guard( client );
- QString mimetype = QString::fromLatin1( "text/html" );
+ TQString mimetype = TQString::fromLatin1( "text/html" );
args.metaData()["referrer"] = referrer;
if (!linkUrl.isEmpty()) // over a link
@@ -4986,7 +4986,7 @@ void KHTMLPart::popupMenu( const QString &linkUrl )
}
else // look at "extension" of link
{
- const QString fname(popupURL.fileName(false));
+ const TQString fname(popupURL.fileName(false));
if (!fname.isEmpty() && !popupURL.hasRef() && popupURL.query().isEmpty())
{
KMimeType::Ptr pmt = KMimeType::findByPath(fname,0,true);
@@ -5009,12 +5009,12 @@ void KHTMLPart::popupMenu( const QString &linkUrl )
args.serviceType = mimetype;
- emit d->m_extension->popupMenu( client, QCursor::pos(), popupURL, args, itemflags, S_IFREG /*always a file*/);
+ emit d->m_extension->popupMenu( client, TQCursor::pos(), popupURL, args, itemflags, S_IFREG /*always a file*/);
if ( !guard.isNull() ) {
delete client;
- emit popupMenu(linkUrl, QCursor::pos());
- d->m_strSelectedURL = d->m_strSelectedURLTarget = QString::null;
+ emit popupMenu(linkUrl, TQCursor::pos());
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
}
}
@@ -5085,7 +5085,7 @@ void KHTMLPart::slotChildDocCreated()
}
}
// So it only happens once
- disconnect( htmlFrame, SIGNAL( docCreated() ), this, SLOT( slotChildDocCreated() ) );
+ disconnect( htmlFrame, TQT_SIGNAL( docCreated() ), this, TQT_SLOT( slotChildDocCreated() ) );
}
void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args )
@@ -5094,34 +5094,34 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
KHTMLPart *callingHtmlPart = const_cast<KHTMLPart *>(dynamic_cast<const KHTMLPart *>(sender()->parent()));
// TODO: handle child target correctly! currently the script are always executed fur the parent
- QString urlStr = url.url();
- if ( urlStr.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
- QString script = KURL::decode_string( urlStr.right( urlStr.length() - 11 ) );
+ TQString urlStr = url.url();
+ if ( urlStr.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
+ TQString script = KURL::decode_string( urlStr.right( urlStr.length() - 11 ) );
executeScript( DOM::Node(), script );
return;
}
- QString frameName = args.frameName.lower();
+ TQString frameName = args.frameName.lower();
if ( !frameName.isEmpty() ) {
- if ( frameName == QString::fromLatin1( "_top" ) )
+ if ( frameName == TQString::fromLatin1( "_top" ) )
{
emit d->m_extension->openURLRequest( url, args );
return;
}
- else if ( frameName == QString::fromLatin1( "_blank" ) )
+ else if ( frameName == TQString::fromLatin1( "_blank" ) )
{
emit d->m_extension->createNewWindow( url, args );
return;
}
- else if ( frameName == QString::fromLatin1( "_parent" ) )
+ else if ( frameName == TQString::fromLatin1( "_parent" ) )
{
KParts::URLArgs newArgs( args );
- newArgs.frameName = QString::null;
+ newArgs.frameName = TQString::null;
emit d->m_extension->openURLRequest( url, newArgs );
return;
}
- else if ( frameName != QString::fromLatin1( "_self" ) )
+ else if ( frameName != TQString::fromLatin1( "_self" ) )
{
khtml::ChildFrame *_frame = recursiveFrameRequest( callingHtmlPart, url, args );
@@ -5142,7 +5142,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
} else if ( frameName== "_self" ) // this is for embedded objects (via <object>) which want to replace the current document
{
KParts::URLArgs newArgs( args );
- newArgs.frameName = QString::null;
+ newArgs.frameName = TQString::null;
emit d->m_extension->openURLRequest( url, newArgs );
}
}
@@ -5152,7 +5152,7 @@ void KHTMLPart::slotRequestFocus( KParts::ReadOnlyPart * )
emit d->m_extension->requestFocus(this);
}
-khtml::ChildFrame *KHTMLPart::frame( const QObject *obj )
+khtml::ChildFrame *KHTMLPart::frame( const TQObject *obj )
{
assert( obj->inherits( "KParts::ReadOnlyPart" ) );
const KParts::ReadOnlyPart* const part = static_cast<const KParts::ReadOnlyPart *>( obj );
@@ -5209,7 +5209,7 @@ bool KHTMLPart::checkFrameAccess(KHTMLPart *callingHtmlPart)
}
KHTMLPart *
-KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame )
+KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, khtml::ChildFrame **childFrame )
{
#ifdef DEBUG_FINDFRAME
kdDebug(6050) << "KHTMLPart::findFrameParent: this = " << this << " URL = " << m_url << " name = " << name() << " findFrameParent( " << f << " )" << endl;
@@ -5221,7 +5221,7 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f,
return 0;
// match encoding used in KonqView::setViewName()
- if (!childFrame && !parentPart() && (QString::fromLocal8Bit(name()) == f))
+ if (!childFrame && !parentPart() && (TQString::fromLocal8Bit(name()) == f))
return this;
FrameIt it = d->m_frames.find( f );
@@ -5251,7 +5251,7 @@ KHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f,
}
-KHTMLPart *KHTMLPart::findFrame( const QString &f )
+KHTMLPart *KHTMLPart::findFrame( const TQString &f )
{
khtml::ChildFrame *childFrame;
KHTMLPart *parentFrame = findFrameParent(this, f, &childFrame);
@@ -5264,7 +5264,7 @@ KHTMLPart *KHTMLPart::findFrame( const QString &f )
return 0;
}
-KParts::ReadOnlyPart *KHTMLPart::findFramePart(const QString &f)
+KParts::ReadOnlyPart *KHTMLPart::findFramePart(const TQString &f)
{
khtml::ChildFrame *childFrame;
return findFrameParent(this, f, &childFrame) ? static_cast<KParts::ReadOnlyPart *>(childFrame->m_part) : 0L;
@@ -5285,7 +5285,7 @@ KParts::ReadOnlyPart *KHTMLPart::currentFrame() const
return part;
}
-bool KHTMLPart::frameExists( const QString &frameName )
+bool KHTMLPart::frameExists( const TQString &frameName )
{
ConstFrameIt it = d->m_frames.find( frameName );
if ( it == d->m_frames.end() )
@@ -5352,10 +5352,10 @@ khtml::ChildFrame *KHTMLPart::recursiveFrameRequest( KHTMLPart *callingHtmlPart,
static int s_saveStateIndentLevel = 0;
#endif
-void KHTMLPart::saveState( QDataStream &stream )
+void KHTMLPart::saveState( TQDataStream &stream )
{
#ifndef NDEBUG
- QString indent = QString().leftJustify( s_saveStateIndentLevel * 4, ' ' );
+ TQString indent = TQString().leftJustify( s_saveStateIndentLevel * 4, ' ' );
const int indentLevel = s_saveStateIndentLevel++;
kdDebug( 6050 ) << indent << "saveState this=" << this << " '" << name() << "' saving URL " << m_url.url() << endl;
#endif
@@ -5377,7 +5377,7 @@ void KHTMLPart::saveState( QDataStream &stream )
stream << d->m_cacheId;
// Save the state of the document (Most notably the state of any forms)
- QStringList docState;
+ TQStringList docState;
if (d->m_doc)
{
docState = d->m_doc->docState();
@@ -5405,9 +5405,9 @@ void KHTMLPart::saveState( QDataStream &stream )
<< d->m_ssl_parent_cert;
- QStringList frameNameLst, frameServiceTypeLst, frameServiceNameLst;
+ TQStringList frameNameLst, frameServiceTypeLst, frameServiceNameLst;
KURL::List frameURLLst;
- QValueList<QByteArray> frameStateBufferLst;
+ TQValueList<TQByteArray> frameStateBufferLst;
ConstFrameIt it = d->m_frames.begin();
const ConstFrameIt end = d->m_frames.end();
@@ -5421,8 +5421,8 @@ void KHTMLPart::saveState( QDataStream &stream )
frameServiceNameLst << (*it)->m_serviceName;
frameURLLst << (*it)->m_part->url();
- QByteArray state;
- QDataStream frameStream( state, IO_WriteOnly );
+ TQByteArray state;
+ TQDataStream frameStream( state, IO_WriteOnly );
if ( (*it)->m_extension )
(*it)->m_extension->saveState( frameStream );
@@ -5438,16 +5438,16 @@ void KHTMLPart::saveState( QDataStream &stream )
#endif
}
-void KHTMLPart::restoreState( QDataStream &stream )
+void KHTMLPart::restoreState( TQDataStream &stream )
{
KURL u;
Q_INT32 xOffset, yOffset, wContents, hContents, mWidth, mHeight;
Q_UINT32 frameCount;
- QStringList frameNames, frameServiceTypes, docState, frameServiceNames;
+ TQStringList frameNames, frameServiceTypes, docState, frameServiceNames;
KURL::List frameURLs;
- QValueList<QByteArray> frameStateBuffers;
- QValueList<int> fSizes;
- QString encoding, sheetUsed;
+ TQValueList<TQByteArray> frameStateBuffers;
+ TQValueList<int> fSizes;
+ TQString encoding, sheetUsed;
long old_cacheId = d->m_cacheId;
stream >> u >> xOffset >> yOffset >> wContents >> hContents >> mWidth >> mHeight;
@@ -5514,11 +5514,11 @@ void KHTMLPart::restoreState( QDataStream &stream )
fIt = d->m_frames.begin();
- QStringList::ConstIterator fNameIt = frameNames.begin();
- QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
- QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
+ TQStringList::ConstIterator fNameIt = frameNames.begin();
+ TQStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
+ TQStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
KURL::List::ConstIterator fURLIt = frameURLs.begin();
- QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
+ TQValueList<TQByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
for (; fIt != fEnd; ++fIt, ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
{
@@ -5538,7 +5538,7 @@ void KHTMLPart::restoreState( QDataStream &stream )
child->m_bCompleted = false;
if ( child->m_extension && !(*fBufferIt).isEmpty() )
{
- QDataStream frameStream( *fBufferIt, IO_ReadOnly );
+ TQDataStream frameStream( *fBufferIt, IO_ReadOnly );
child->m_extension->restoreState( frameStream );
}
else
@@ -5568,13 +5568,13 @@ void KHTMLPart::restoreState( QDataStream &stream )
d->m_encoding = encoding;
d->m_sheetUsed = sheetUsed;
- QStringList::ConstIterator fNameIt = frameNames.begin();
- const QStringList::ConstIterator fNameEnd = frameNames.end();
+ TQStringList::ConstIterator fNameIt = frameNames.begin();
+ const TQStringList::ConstIterator fNameEnd = frameNames.end();
- QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
- QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
+ TQStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
+ TQStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
KURL::List::ConstIterator fURLIt = frameURLs.begin();
- QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
+ TQValueList<TQByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
for (; fNameIt != fNameEnd; ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
{
@@ -5596,7 +5596,7 @@ void KHTMLPart::restoreState( QDataStream &stream )
if ( (*childFrame)->m_extension )
if ( (*childFrame)->m_extension && !(*fBufferIt).isEmpty() )
{
- QDataStream frameStream( *fBufferIt, IO_ReadOnly );
+ TQDataStream frameStream( *fBufferIt, IO_ReadOnly );
(*childFrame)->m_extension->restoreState( frameStream );
}
else
@@ -5728,11 +5728,11 @@ void KHTMLPart::setZoomFactor (int percent)
d->m_zoomFactor = percent;
if(d->m_doc) {
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
if (d->m_doc->styleSelector())
d->m_doc->styleSelector()->computeFontSizes(d->m_doc->paintDeviceMetrics(), d->m_zoomFactor);
d->m_doc->recalcStyle( NodeImpl::Force );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
ConstFrameIt it = d->m_frames.begin();
@@ -5757,7 +5757,7 @@ void KHTMLPart::slotZoomView( int delta )
slotDecZoom();
}
-void KHTMLPart::setStatusBarText( const QString& text, StatusBarPriority p)
+void KHTMLPart::setStatusBarText( const TQString& text, StatusBarPriority p)
{
if (!d->m_statusMessagesEnabled)
return;
@@ -5765,7 +5765,7 @@ void KHTMLPart::setStatusBarText( const QString& text, StatusBarPriority p)
d->m_statusBarText[p] = text;
// shift handling ?
- QString tobe = d->m_statusBarText[BarHoverText];
+ TQString tobe = d->m_statusBarText[BarHoverText];
if (tobe.isEmpty())
tobe = d->m_statusBarText[BarOverrideText];
if (tobe.isEmpty()) {
@@ -5781,59 +5781,59 @@ void KHTMLPart::setStatusBarText( const QString& text, StatusBarPriority p)
}
-void KHTMLPart::setJSStatusBarText( const QString &text )
+void KHTMLPart::setJSStatusBarText( const TQString &text )
{
setStatusBarText(text, BarOverrideText);
}
-void KHTMLPart::setJSDefaultStatusBarText( const QString &text )
+void KHTMLPart::setJSDefaultStatusBarText( const TQString &text )
{
setStatusBarText(text, BarDefaultText);
}
-QString KHTMLPart::jsStatusBarText() const
+TQString KHTMLPart::jsStatusBarText() const
{
return d->m_statusBarText[BarOverrideText];
}
-QString KHTMLPart::jsDefaultStatusBarText() const
+TQString KHTMLPart::jsDefaultStatusBarText() const
{
return d->m_statusBarText[BarDefaultText];
}
-QString KHTMLPart::referrer() const
+TQString KHTMLPart::referrer() const
{
return d->m_referrer;
}
-QString KHTMLPart::pageReferrer() const
+TQString KHTMLPart::pageReferrer() const
{
KURL referrerURL = KURL( d->m_pageReferrer );
if (referrerURL.isValid())
{
- QString protocol = referrerURL.protocol();
+ TQString protocol = referrerURL.protocol();
if ((protocol == "http") ||
((protocol == "https") && (m_url.protocol() == "https")))
{
- referrerURL.setRef(QString::null);
- referrerURL.setUser(QString::null);
- referrerURL.setPass(QString::null);
+ referrerURL.setRef(TQString::null);
+ referrerURL.setUser(TQString::null);
+ referrerURL.setPass(TQString::null);
return referrerURL.url();
}
}
- return QString::null;
+ return TQString::null;
}
-QString KHTMLPart::lastModified() const
+TQString KHTMLPart::lastModified() const
{
if ( d->m_lastModified.isEmpty() && m_url.isLocalFile() ) {
// Local file: set last-modified from the file's mtime.
// Done on demand to save time when this isn't needed - but can lead
// to slightly wrong results if updating the file on disk w/o reloading.
- QDateTime lastModif = QFileInfo( m_url.path() ).lastModified();
+ TQDateTime lastModif = TQFileInfo( m_url.path() ).lastModified();
d->m_lastModified = lastModif.toString( Qt::LocalDate );
}
//kdDebug(6050) << "KHTMLPart::lastModified: " << d->m_lastModified << endl;
@@ -5874,18 +5874,18 @@ void KHTMLPart::reparseConfiguration()
delete d->m_settings;
d->m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
khtml::CSSStyleSelector::reparseConfiguration();
if(d->m_doc) d->m_doc->updateStyleSelector();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (KHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled())
runAdFilter();
}
-QStringList KHTMLPart::frameNames() const
+TQStringList KHTMLPart::frameNames() const
{
- QStringList res;
+ TQStringList res;
ConstFrameIt it = d->m_frames.begin();
const ConstFrameIt end = d->m_frames.end();
@@ -5896,9 +5896,9 @@ QStringList KHTMLPart::frameNames() const
return res;
}
-QPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
+TQPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
{
- QPtrList<KParts::ReadOnlyPart> res;
+ TQPtrList<KParts::ReadOnlyPart> res;
ConstFrameIt it = d->m_frames.begin();
const ConstFrameIt end = d->m_frames.end();
@@ -5936,7 +5936,7 @@ bool KHTMLPart::dndEnabled() const
return d->m_bDnd;
}
-void KHTMLPart::customEvent( QCustomEvent *event )
+void KHTMLPart::customEvent( TQCustomEvent *event )
{
if ( khtml::MousePressEvent::test( event ) )
{
@@ -6044,7 +6044,7 @@ static bool lastRunAt(khtml::RenderObject *renderNode, int y, NodeImpl *&endNode
void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
{
DOM::DOMString url = event->url();
- QMouseEvent *_mouse = event->qmouseEvent();
+ TQMouseEvent *_mouse = event->qmouseEvent();
DOM::Node innerNode = event->innerNode();
d->m_mousePressNode = innerNode;
@@ -6055,7 +6055,7 @@ void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
d->m_strSelectedURLTarget = event->target().string();
}
else
- d->m_strSelectedURL = d->m_strSelectedURLTarget = QString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
if ( _mouse->button() == LeftButton ||
_mouse->button() == MidButton )
@@ -6123,7 +6123,7 @@ void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
void KHTMLPart::khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent *event )
{
- QMouseEvent *_mouse = event->qmouseEvent();
+ TQMouseEvent *_mouse = event->qmouseEvent();
if ( _mouse->button() == LeftButton )
{
d->m_bMousePressed = true;
@@ -6226,14 +6226,14 @@ void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& se
return;
}
- QString str;
+ TQString str;
int len = 0;
if ( obj->isText() ) { // can be false e.g. when double-clicking on a disabled submit button
str = static_cast<khtml::RenderText *>(obj)->data().string();
len = str.length();
}
//kdDebug() << "extendSelection right=" << right << " offset=" << offset << " len=" << len << " Starting at obj=" << obj << endl;
- QChar ch;
+ TQChar ch;
do {
// Last char was ok, point to it
if ( node ) {
@@ -6248,7 +6248,7 @@ void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& se
//kdDebug() << "obj=" << obj << endl;
if ( obj ) {
//kdDebug() << "isText=" << obj->isText() << endl;
- str = QString::null;
+ str = TQString::null;
if ( obj->isText() )
str = static_cast<khtml::RenderText *>(obj)->data().string();
else if ( obj->isBR() )
@@ -6282,7 +6282,7 @@ void KHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node& se
// Test that char
ch = str[ (int)offset ];
- //kdDebug() << " offset=" << offset << " ch=" << QString(ch) << endl;
+ //kdDebug() << " offset=" << offset << " ch=" << TQString(ch) << endl;
} while ( !ch.isSpace() && !ch.isPunct() );
// make offset point after last char
@@ -6373,12 +6373,12 @@ bool KHTMLPart::isExtendingSelection() const
void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
{
- QMouseEvent *_mouse = event->qmouseEvent();
+ TQMouseEvent *_mouse = event->qmouseEvent();
if( d->m_bRightMousePressed && parentPart() != 0 && d->m_bBackRightClick )
{
popupMenu( d->m_strSelectedURL );
- d->m_strSelectedURL = d->m_strSelectedURLTarget = QString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
d->m_bRightMousePressed = false;
}
@@ -6393,9 +6393,9 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
if ( ( d->m_dragStartPos - _mouse->pos() ).manhattanLength() <= KGlobalSettings::dndEventDelay() )
return;
- QPixmap pix;
+ TQPixmap pix;
HTMLImageElementImpl *img = 0L;
- QDragObject *drag = 0;
+ TQDragObject *drag = 0;
KURL u;
// qDebug("****************** Event URL: %s", url.string().latin1());
@@ -6415,7 +6415,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium);
}
- u.setPass(QString::null);
+ u.setPass(TQString::null);
KURLDrag* urlDrag = new KURLDrag( u, img ? 0 : d->m_view->viewport() );
if ( !d->m_referrer.isEmpty() )
@@ -6423,7 +6423,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
if( img && img->complete()) {
KMultipleDrag *mdrag = new KMultipleDrag( d->m_view->viewport() );
- mdrag->addDragObject( new QImageDrag( img->currentImage(), 0L ) );
+ mdrag->addDragObject( new TQImageDrag( img->currentImage(), 0L ) );
mdrag->addDragObject( urlDrag );
drag = mdrag;
}
@@ -6439,7 +6439,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
// when we finish our drag, we need to undo our mouse press
d->m_bMousePressed = false;
- d->m_strSelectedURL = d->m_strSelectedURLTarget = QString::null;
+ d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString::null;
return;
}
#endif
@@ -6467,7 +6467,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
int x(_mouse->x() - vx), y(_mouse->y() - vy);
- d->m_overURL = url.string() + QString("?%1,%2").arg(x).arg(y);
+ d->m_overURL = url.string() + TQString("?%1,%2").arg(x).arg(y);
d->m_overURLTarget = target.string();
overURL( d->m_overURL, target.string(), shiftPressed );
return;
@@ -6498,7 +6498,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
event->absX(), event->absY(), innerNode);
#else
if ( d->m_doc && d->m_view ) {
- QPoint diff( _mouse->globalPos() - d->m_dragLastPos );
+ TQPoint diff( _mouse->globalPos() - d->m_dragLastPos );
if ( abs( diff.x() ) > 64 || abs( diff.y() ) > 64 ) {
d->m_view->scrollBy( -diff.x(), -diff.y() );
@@ -6516,7 +6516,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
d->m_mousePressNode = DOM::Node();
if ( d->m_bMousePressed ) {
- setStatusBarText(QString::null, BarHoverText);
+ setStatusBarText(TQString::null, BarHoverText);
stopAutoScroll();
}
@@ -6524,7 +6524,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
// the mouse is pressed again.
d->m_bMousePressed = false;
- QMouseEvent *_mouse = event->qmouseEvent();
+ TQMouseEvent *_mouse = event->qmouseEvent();
if ( _mouse->button() == RightButton && parentPart() != 0 && d->m_bBackRightClick )
{
d->m_bRightMousePressed = false;
@@ -6608,11 +6608,11 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
#endif
// get selected text and paste to the clipboard
#ifndef QT_NO_CLIPBOARD
- QString text = selectedText();
- text.replace(QChar(0xa0), ' ');
- disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), this, SLOT( slotClearSelection()));
+ TQString text = selectedText();
+ text.replace(TQChar(0xa0), ' ');
+ disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection()));
kapp->clipboard()->setText(text,QClipboard::Selection);
- connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection()));
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
#endif
//kdDebug( 6000 ) << "selectedText = " << text << endl;
emitSelectionChanged();
@@ -6637,7 +6637,7 @@ void KHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event )
if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages )
{
- QPtrList<KAction> lst;
+ TQPtrList<KAction> lst;
lst.append( d->m_paLoadImages );
plugActionList( "loadImages", lst );
}
@@ -6658,7 +6658,7 @@ void KHTMLPart::slotPrintFrame()
if ( !ext )
return;
- QMetaObject *mo = ext->metaObject();
+ TQMetaObject *mo = ext->metaObject();
int idx = mo->findSlot( "print()", true );
if ( idx >= 0 ) {
@@ -6676,13 +6676,13 @@ void KHTMLPart::slotSelectAll()
void KHTMLPart::startAutoScroll()
{
- connect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
+ connect(&d->m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() ));
d->m_scrollTimer.start(100, false);
}
void KHTMLPart::stopAutoScroll()
{
- disconnect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
+ disconnect(&d->m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() ));
if (d->m_scrollTimer.isActive())
d->m_scrollTimer.stop();
}
@@ -6704,7 +6704,7 @@ void KHTMLPart::runAdFilter()
if ( !d->m_doc )
return;
- QPtrDictIterator<khtml::CachedObject> it( d->m_doc->docLoader()->m_docObjects );
+ TQPtrDictIterator<khtml::CachedObject> it( d->m_doc->docLoader()->m_docObjects );
for ( ; it.current(); ++it )
if ( it.current()->type() == khtml::CachedObject::Image ) {
khtml::CachedImage *image = static_cast<khtml::CachedImage *>(it.current());
@@ -6809,7 +6809,7 @@ void KHTMLPart::selectAll()
emitSelectionChanged();
}
-bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, const QString &button)
+bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const TQString &message, const TQString &button)
{
bool linkAllowed = true;
@@ -6871,12 +6871,12 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
return;
}
// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl;
- if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "QFrame" ) )
+ if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "TQFrame" ) )
{
- QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
- if (frame->frameStyle() != QFrame::NoFrame)
+ TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
+ if (frame->frameStyle() != TQFrame::NoFrame)
{
- frame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken);
+ frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken);
frame->repaint();
}
}
@@ -6899,12 +6899,12 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
d->m_activeFrame = part;
- if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "QFrame" ) )
+ if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "TQFrame" ) )
{
- QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
- if (frame->frameStyle() != QFrame::NoFrame)
+ TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
+ if (frame->frameStyle() != TQFrame::NoFrame)
{
- frame->setFrameStyle( QFrame::StyledPanel | QFrame::Plain);
+ frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Plain);
frame->repaint();
}
kdDebug(6050) << "new active frame " << d->m_activeFrame << endl;
@@ -6925,7 +6925,7 @@ void KHTMLPart::setActiveNode(const DOM::Node &node)
d->m_doc->setFocusNode(node.handle());
// Scroll the view if necessary to ensure that the new focus node is visible
- QRect rect = node.handle()->getRect();
+ TQRect rect = node.handle()->getRect();
d->m_view->ensureVisible(rect.right(), rect.bottom());
d->m_view->ensureVisible(rect.left(), rect.top());
}
@@ -6935,7 +6935,7 @@ DOM::Node KHTMLPart::activeNode() const
return DOM::Node(d->m_doc?d->m_doc->focusNode():0);
}
-DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code, QString name, NodeImpl* node )
+DOM::EventListener *KHTMLPart::createHTMLEventListener( TQString code, TQString name, NodeImpl* node )
{
KJSProxy *proxy = jScript();
@@ -6965,19 +6965,19 @@ void KHTMLPart::setOpenedByJS(bool _openedByJS)
d->m_openedByJS = _openedByJS;
}
-void KHTMLPart::preloadStyleSheet(const QString &url, const QString &stylesheet)
+void KHTMLPart::preloadStyleSheet(const TQString &url, const TQString &stylesheet)
{
khtml::Cache::preloadStyleSheet(url, stylesheet);
}
-void KHTMLPart::preloadScript(const QString &url, const QString &script)
+void KHTMLPart::preloadScript(const TQString &url, const TQString &script)
{
khtml::Cache::preloadScript(url, script);
}
-QCString KHTMLPart::dcopObjectId() const
+TQCString KHTMLPart::dcopObjectId() const
{
- QCString id;
+ TQCString id;
id.sprintf("html-widget%d", d->m_dcop_counter);
return id;
}
@@ -6992,7 +6992,7 @@ bool KHTMLPart::restored() const
return d->m_restored;
}
-bool KHTMLPart::pluginPageQuestionAsked(const QString& mimetype) const
+bool KHTMLPart::pluginPageQuestionAsked(const TQString& mimetype) const
{
// parentPart() should be const!
KHTMLPart* parent = const_cast<KHTMLPart *>(this)->parentPart();
@@ -7002,7 +7002,7 @@ bool KHTMLPart::pluginPageQuestionAsked(const QString& mimetype) const
return d->m_pluginPageQuestionAsked.contains(mimetype);
}
-void KHTMLPart::setPluginPageQuestionAsked(const QString& mimetype)
+void KHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype)
{
if ( parentPart() )
parentPart()->setPluginPageQuestionAsked(mimetype);
@@ -7072,7 +7072,7 @@ void KHTMLPart::slotAutomaticDetectionLanguage( int _id )
d->m_paSetEncoding->popupMenu()->setItemChecked( 0, true );
- setEncoding( QString::null, false );
+ setEncoding( TQString::null, false );
if( d->m_manualDetection )
d->m_manualDetection->setCurrentItem( -1 );
@@ -7109,7 +7109,7 @@ void KHTMLPart::restoreScrollPosition()
if ( m_url.hasRef() && !d->m_restoreScrollPosition && !args.reload) {
if ( !d->m_doc || !d->m_doc->parsing() )
- disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
+ disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
if ( !gotoAnchor(m_url.encodedHtmlRef()) )
gotoAnchor(m_url.htmlRef());
return;
@@ -7122,7 +7122,7 @@ void KHTMLPart::restoreScrollPosition()
if (d->m_view->contentsHeight() - d->m_view->visibleHeight() >= args.yOffset
|| d->m_bComplete) {
d->m_view->setContentsPos(args.xOffset, args.yOffset);
- disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()));
+ disconnect(d->m_view, TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(restoreScrollPosition()));
}
}
@@ -7160,8 +7160,8 @@ void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form)
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
d->m_wq = new KHTMLWalletQueue(this);
d->m_wq->wallet = wallet;
- connect(wallet, SIGNAL(walletOpened(bool)), d->m_wq, SLOT(walletOpened(bool)));
- connect(d->m_wq, SIGNAL(walletOpened(KWallet::Wallet*)), this, SLOT(walletOpened(KWallet::Wallet*)));
+ connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool)));
+ connect(d->m_wq, TQT_SIGNAL(walletOpened(KWallet::Wallet*)), this, TQT_SLOT(walletOpened(KWallet::Wallet*)));
}
assert(form);
d->m_wq->callers.append(KHTMLWalletQueue::Caller(form, form->getDocument()));
@@ -7169,7 +7169,7 @@ void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form)
}
-void KHTMLPart::saveToWallet(const QString& key, const QMap<QString,QString>& data)
+void KHTMLPart::saveToWallet(const TQString& key, const TQMap<TQString,TQString>& data)
{
#ifndef KHTML_NO_WALLET
KHTMLPart *p;
@@ -7202,8 +7202,8 @@ void KHTMLPart::saveToWallet(const QString& key, const QMap<QString,QString>& da
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
d->m_wq = new KHTMLWalletQueue(this);
d->m_wq->wallet = wallet;
- connect(wallet, SIGNAL(walletOpened(bool)), d->m_wq, SLOT(walletOpened(bool)));
- connect(d->m_wq, SIGNAL(walletOpened(KWallet::Wallet*)), this, SLOT(walletOpened(KWallet::Wallet*)));
+ connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool)));
+ connect(d->m_wq, TQT_SIGNAL(walletOpened(KWallet::Wallet*)), this, TQT_SLOT(walletOpened(KWallet::Wallet*)));
}
d->m_wq->savers.append(qMakePair(key, data));
#endif // KHTML_NO_WALLET
@@ -7244,21 +7244,21 @@ void KHTMLPart::walletOpened(KWallet::Wallet *wallet) {
d->m_wallet = wallet;
d->m_bWalletOpened = true;
- connect(d->m_wallet, SIGNAL(walletClosed()), SLOT(slotWalletClosed()));
+ connect(d->m_wallet, TQT_SIGNAL(walletClosed()), TQT_SLOT(slotWalletClosed()));
if (!d->m_statusBarWalletLabel) {
d->m_statusBarWalletLabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarWalletLabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small));
- d->m_statusBarWalletLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ d->m_statusBarWalletLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarWalletLabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarWalletLabel, 0, false);
d->m_statusBarWalletLabel->setPixmap(SmallIcon("wallet_open", instance()));
- connect(d->m_statusBarWalletLabel, SIGNAL(leftClickedURL()), SLOT(launchWalletManager()));
- connect(d->m_statusBarWalletLabel, SIGNAL(rightClickedURL()), SLOT(walletMenu()));
+ connect(d->m_statusBarWalletLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(launchWalletManager()));
+ connect(d->m_statusBarWalletLabel, TQT_SIGNAL(rightClickedURL()), TQT_SLOT(walletMenu()));
} else {
- QToolTip::remove(d->m_statusBarWalletLabel);
+ TQToolTip::remove(d->m_statusBarWalletLabel);
}
- QToolTip::add(d->m_statusBarWalletLabel, i18n("The wallet '%1' is open and being used for form data and passwords.").arg(KWallet::Wallet::NetworkWallet()));
+ TQToolTip::add(d->m_statusBarWalletLabel, i18n("The wallet '%1' is open and being used for form data and passwords.").arg(KWallet::Wallet::NetworkWallet()));
#endif // KHTML_NO_WALLET
}
@@ -7312,8 +7312,8 @@ void KHTMLPart::walletMenu()
{
#ifndef KHTML_NO_WALLET
KPopupMenu *m = new KPopupMenu(0L);
- m->insertItem(i18n("&Close Wallet"), this, SLOT(slotWalletClosed()));
- m->popup(QCursor::pos());
+ m->insertItem(i18n("&Close Wallet"), this, TQT_SLOT(slotWalletClosed()));
+ m->popup(TQCursor::pos());
#endif // KHTML_NO_WALLET
}
@@ -7355,10 +7355,10 @@ void KHTMLPart::setDebugScript( bool enable )
unplugActionList( "debugScriptList" );
if ( enable ) {
if (!d->m_paDebugScript) {
- d->m_paDebugScript = new KAction( i18n( "JavaScript &Debugger" ), 0, this, SLOT( slotDebugScript() ), actionCollection(), "debugScript" );
+ d->m_paDebugScript = new KAction( i18n( "JavaScript &Debugger" ), 0, this, TQT_SLOT( slotDebugScript() ), actionCollection(), "debugScript" );
}
d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L );
- QPtrList<KAction> lst;
+ TQPtrList<KAction> lst;
lst.append( d->m_paDebugScript );
plugActionList( "debugScriptList", lst );
}
@@ -7386,20 +7386,20 @@ void KHTMLPart::setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart
if ( enable && !d->m_statusBarPopupLabel ) {
d->m_statusBarPopupLabel = new KURLLabel( d->m_statusBarExtension->statusBar() );
d->m_statusBarPopupLabel->setFixedHeight( instance()->iconLoader()->currentSize( KIcon::Small) );
- d->m_statusBarPopupLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ));
+ d->m_statusBarPopupLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
d->m_statusBarPopupLabel->setUseCursor( false );
d->m_statusBarExtension->addStatusBarItem( d->m_statusBarPopupLabel, 0, false );
d->m_statusBarPopupLabel->setPixmap( SmallIcon( "window_suppressed", instance() ) );
- QToolTip::add( d->m_statusBarPopupLabel, i18n("This page was prevented from opening a new window via JavaScript." ) );
+ TQToolTip::add( d->m_statusBarPopupLabel, i18n("This page was prevented from opening a new window via JavaScript." ) );
- connect(d->m_statusBarPopupLabel, SIGNAL(leftClickedURL()), SLOT(suppressedPopupMenu()));
+ connect(d->m_statusBarPopupLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(suppressedPopupMenu()));
if (d->m_settings->jsPopupBlockerPassivePopup()) {
- QPixmap px;
+ TQPixmap px;
px = MainBarIcon( "window_suppressed" );
KPassivePopup::message(i18n("Popup Window Blocked"),i18n("This page has attempted to open a popup window but was blocked.\nYou can click on this icon in the status bar to control this behavior\nor to open the popup."),px,d->m_statusBarPopupLabel);
}
} else if ( !enable && d->m_statusBarPopupLabel ) {
- QToolTip::remove( d->m_statusBarPopupLabel );
+ TQToolTip::remove( d->m_statusBarPopupLabel );
d->m_statusBarExtension->removeStatusBarItem( d->m_statusBarPopupLabel );
delete d->m_statusBarPopupLabel;
d->m_statusBarPopupLabel = 0L;
@@ -7410,21 +7410,21 @@ void KHTMLPart::suppressedPopupMenu() {
KPopupMenu *m = new KPopupMenu(0L);
m->setCheckable(true);
if ( d->m_openableSuppressedPopups )
- m->insertItem(i18n("&Show Blocked Popup Window","Show %n Blocked Popup Windows", d->m_openableSuppressedPopups), this, SLOT(showSuppressedPopups()));
- m->insertItem(i18n("Show Blocked Window Passive Popup &Notification"), this, SLOT(togglePopupPassivePopup()),0,57);
+ m->insertItem(i18n("&Show Blocked Popup Window","Show %n Blocked Popup Windows", d->m_openableSuppressedPopups), this, TQT_SLOT(showSuppressedPopups()));
+ m->insertItem(i18n("Show Blocked Window Passive Popup &Notification"), this, TQT_SLOT(togglePopupPassivePopup()),0,57);
m->setItemChecked(57,d->m_settings->jsPopupBlockerPassivePopup());
- m->insertItem(i18n("&Configure JavaScript New Window Policies..."), this, SLOT(launchJSConfigDialog()));
- m->popup(QCursor::pos());
+ m->insertItem(i18n("&Configure JavaScript New Window Policies..."), this, TQT_SLOT(launchJSConfigDialog()));
+ m->popup(TQCursor::pos());
}
void KHTMLPart::togglePopupPassivePopup() {
// Same hack as in disableJSErrorExtension()
d->m_settings->setJSPopupBlockerPassivePopup( !d->m_settings->jsPopupBlockerPassivePopup() );
- DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", QByteArray());
+ DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", TQByteArray());
}
void KHTMLPart::showSuppressedPopups() {
- for ( QValueListIterator<QGuardedPtr<KHTMLPart> > i = d->m_suppressedPopupOriginParts.begin();
+ for ( TQValueListIterator<TQGuardedPtr<KHTMLPart> > i = d->m_suppressedPopupOriginParts.begin();
i != d->m_suppressedPopupOriginParts.end(); ++i ) {
if (KHTMLPart* part = *i) {
KJS::Window *w = KJS::Window::retrieveWindow( part );
@@ -7441,7 +7441,7 @@ void KHTMLPart::showSuppressedPopups() {
// Extension to use for "view document source", "save as" etc.
// Using the right extension can help the viewer get into the right mode (#40496)
-QString KHTMLPart::defaultExtension() const
+TQString KHTMLPart::defaultExtension() const
{
if ( !d->m_doc )
return ".html";
diff --git a/khtml/khtml_part.h b/khtml/khtml_part.h
index 194234af7..af8a1695d 100644
--- a/khtml/khtml_part.h
+++ b/khtml/khtml_part.h
@@ -34,7 +34,7 @@
#include <kdemacros.h>
#include <kfinddialog.h>
-#include <qregexp.h>
+#include <tqregexp.h>
class KHTMLPartPrivate;
class KHTMLPartBrowserExtension;
@@ -150,7 +150,7 @@ namespace KWallet
* opening an url. You can do this in the following way:
*
* \code
- * QString myHTMLCode = ...;
+ * TQString myHTMLCode = ...;
* KHTMLPart *w = new KHTMLPart();
* w->begin();
* w->write(myHTMLCode);
@@ -159,7 +159,7 @@ namespace KWallet
* \endcode
*
* You can do as many calls to write() as you wish. There are two
- * write() methods, one accepting a QString and one accepting a
+ * write() methods, one accepting a TQString and one accepting a
* @p char @p * argument. You should use one or the other
* (but not both) since the method using
* the @p char @p * argument does an additional decoding step to convert the
@@ -173,7 +173,7 @@ namespace KWallet
* \code
* KHTMLPart *doc = new KHTMLPart();
* doc->openStream( "text/html", KURL() );
- * doc->writeStream( QCString( "<html><body><p>KHTML Rocks!</p></body></html>" ) );
+ * doc->writeStream( TQCString( "<html><body><p>KHTML Rocks!</p></body></html>" ) );
* doc->closeStream();
* \endcode
*
@@ -228,7 +228,7 @@ class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart
* Don't add setOnlyLocalReferences here. It shouldn't be accessible via DCOP.
*
**/
- Q_PROPERTY( QCString dcopObjectId READ dcopObjectId )
+ Q_PROPERTY( TQCString dcopObjectId READ dcopObjectId )
Q_PROPERTY( bool modified READ isModified )
public:
@@ -239,17 +239,17 @@ public:
*
* KHTML basically consists of two objects: The KHTMLPart itself,
* holding the document data (DOM document), and the KHTMLView,
- * derived from QScrollView, in which the document content is
+ * derived from TQScrollView, in which the document content is
* rendered in. You can specify two different parent objects for a
* KHTMLPart, one parent for the KHTMLPart document and on parent
* for the KHTMLView. If the second @p parent argument is 0L, then
* @p parentWidget is used as parent for both objects, the part and
* the view.
*/
- KHTMLPart( QWidget *parentWidget = 0, const char *widgetname = 0,
- QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ KHTMLPart( TQWidget *parentWidget = 0, const char *widgetname = 0,
+ TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
- KHTMLPart( KHTMLView *view, QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ KHTMLPart( KHTMLView *view, TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
/**
* Destructor.
@@ -290,7 +290,7 @@ public:
* Returns the content of the source document.
* @since 3.4
*/
- QString documentSource() const;
+ TQString documentSource() const;
/**
* Returns the node that has the keyboard focus.
@@ -345,13 +345,13 @@ public:
/**
* Enable/disable statusbar messages.
* When this class wants to set the statusbar text, it emits
- * setStatusBarText(const QString & text)
+ * setStatusBarText(const TQString & text)
* If you want to catch this for your own statusbar, note that it returns
* back a rich text string, starting with "<qt>". This you need to
- * either pass this into your own QLabel or to strip out the tags
- * before passing it to QStatusBar::message(const QString & message)
+ * either pass this into your own TQLabel or to strip out the tags
+ * before passing it to TQStatusBar::message(const TQString & message)
*
- * @see KParts::Part::setStatusBarText( const QString & text )
+ * @see KParts::Part::setStatusBarText( const TQString & text )
*/
void setStatusMessagesEnabled( bool enable );
@@ -371,10 +371,10 @@ public:
bool metaRefreshEnabled() const;
/**
- * Same as executeScript( const QString & ) except with the Node parameter
+ * Same as executeScript( const TQString & ) except with the Node parameter
* specifying the 'this' value.
*/
- QVariant executeScript( const DOM::Node &n, const QString &script );
+ TQVariant executeScript( const DOM::Node &n, const TQString &script );
/**
* Enables or disables Drag'n'Drop support. A drag operation is started if
@@ -521,10 +521,10 @@ public:
void enablePlugins( bool e ) { setPluginsEnabled(e); }
void autoloadImages( bool e ) { setAutoloadImages(e); }
void enableMetaRefresh( bool e ) { setMetaRefreshEnabled(e); }
- bool setCharset( const QString &, bool ) { return true; }
+ bool setCharset( const TQString &, bool ) { return true; }
KURL baseURL() const;
- QString baseTarget() const;
+ TQString baseTarget() const;
#endif
/**
@@ -535,7 +535,7 @@ public:
/**
* Schedules a redirection after @p delay seconds.
*/
- void scheduleRedirection( int delay, const QString &url, bool lockHistory = true );
+ void scheduleRedirection( int delay, const TQString &url, bool lockHistory = true );
/**
* Clears the widget and prepares it for new content.
@@ -577,7 +577,7 @@ public:
* parameter.
*
* Attention: Don't mix calls to write( const char *) with calls
- * to write( const QString & ).
+ * to write( const TQString & ).
*
* The result might not be what you want.
*/
@@ -590,7 +590,7 @@ public:
* this function many times in sequence. But remember: The fewer calls
* you make, the faster the widget will be.
*/
- virtual void write( const QString &str );
+ virtual void write( const TQString &str );
/**
* Call this after your last call to write().
@@ -602,12 +602,12 @@ public:
*
* (not implemented at the moment)
*/
- // void print(QPainter *, int pageHeight, int pageWidth);
+ // void print(TQPainter *, int pageHeight, int pageWidth);
/**
- * Paints the HTML page to a QPainter. See KHTMLView::paint for details
+ * Paints the HTML page to a TQPainter. See KHTMLView::paint for details
*/
- void paint( QPainter *, const QRect &, int = 0, bool * = 0 );
+ void paint( TQPainter *, const TQRect &, int = 0, bool * = 0 );
/**
* Sets the encoding the page uses.
@@ -615,14 +615,14 @@ public:
* This can be different from the charset. The widget will try to reload the current page in the new
* encoding, if url() is not empty.
*/
- bool setEncoding( const QString &name, bool override = false );
+ bool setEncoding( const TQString &name, bool override = false );
/**
* Returns the encoding the page currently uses.
*
* Note that the encoding might be different from the charset.
*/
- QString encoding() const;
+ TQString encoding() const;
/**
* Sets a user defined style sheet to be used on top of the HTML 4
@@ -644,7 +644,7 @@ public:
*
* To have an effect this function has to be called after calling begin().
*/
- void setUserStyleSheet( const QString &styleSheet );
+ void setUserStyleSheet( const TQString &styleSheet );
public:
@@ -653,7 +653,7 @@ public:
*
* @param name The font name to use for standard text.
*/
- void setStandardFont( const QString &name );
+ void setStandardFont( const TQString &name );
/**
* Sets the fixed font style.
@@ -661,7 +661,7 @@ public:
* @param name The font name to use for fixed text, e.g.
* the <tt>&lt;pre&gt;</tt> tag.
*/
- void setFixedFont( const QString &name );
+ void setFixedFont( const TQString &name );
/**
* Finds the anchor named @p name.
@@ -670,7 +670,7 @@ public:
* scrolls to the closest position. Returns @p if the anchor has
* been found.
*/
- bool gotoAnchor( const QString &name );
+ bool gotoAnchor( const TQString &name );
/**
* Go to the next anchor
@@ -689,12 +689,12 @@ public:
/**
* Sets the cursor to use when the cursor is on a link.
*/
- void setURLCursor( const QCursor &c );
+ void setURLCursor( const TQCursor &c );
/**
* Returns the cursor which is used when the cursor is on a link.
*/
- QCursor urlCursor() const;
+ TQCursor urlCursor() const;
/**
* Extra Find options that can be used when calling the extended findText().
@@ -722,7 +722,7 @@ public:
* @param findDialog Optionally, you can supply your own dialog.
* @since 3.3
*/
- void findText( const QString &str, long options, QWidget *parent = 0,
+ void findText( const TQString &str, long options, TQWidget *parent = 0,
KFindDialog *findDialog = 0 );
/**
@@ -732,10 +732,10 @@ public:
/**
* Finds the next occurrence of the string or expression.
- * If isRegExp is true then str is converted to a QRegExp, and caseSensitive is ignored.
+ * If isRegExp is true then str is converted to a TQRegExp, and caseSensitive is ignored.
* @deprecated, use findText( str, options, parent, findDialog )
*/
- bool findTextNext( const QString &str, bool forward, bool caseSensitive, bool isRegExp );
+ bool findTextNext( const TQString &str, bool forward, bool caseSensitive, bool isRegExp );
/**
* Finds the next occurence of a string set by @ref findText()
@@ -773,7 +773,7 @@ public:
/**
* Returns the text the user has marked.
*/
- virtual QString selectedText() const;
+ virtual TQString selectedText() const;
/**
* Return the text the user has marked. This is guaranteed to be valid xml,
@@ -783,7 +783,7 @@ public:
*
* @since 3.4
*/
- QString selectedTextAsHTML() const;
+ TQString selectedTextAsHTML() const;
/**
* Returns the selected part of the HTML.
@@ -846,22 +846,22 @@ public:
/**
* Saves the KHTMLPart's complete state (including child frame
- * objects) to the provided QDataStream.
+ * objects) to the provided TQDataStream.
*
* This is called from the saveState() method of the
* browserExtension().
*/
- virtual void saveState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
/**
* Restores the KHTMLPart's previously saved state (including
- * child frame objects) from the provided QDataStream.
+ * child frame objects) from the provided TQDataStream.
*
* @see saveState()
*
* This is called from the restoreState() method of the
* browserExtension() .
**/
- virtual void restoreState( QDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
/**
* Returns the @p Node currently under the mouse.
@@ -899,14 +899,14 @@ public:
* the current document. Note that this method is not working recursively
* for sub-frames.
*/
- QStringList frameNames() const;
+ TQStringList frameNames() const;
- QPtrList<KParts::ReadOnlyPart> frames() const;
+ TQPtrList<KParts::ReadOnlyPart> frames() const;
/**
* Finds a frame by name. Returns 0L if frame can't be found.
*/
- KHTMLPart *findFrame( const QString &f );
+ KHTMLPart *findFrame( const TQString &f );
/**
* Recursively finds the part containing the frame with name @p f
@@ -916,7 +916,7 @@ public:
* frame info in @p *childFrame
* @since 3.3
*/
- KHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame=0 );
+ KHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, khtml::ChildFrame **childFrame=0 );
/**
* Return the current frame (the one that has focus)
@@ -931,7 +931,7 @@ public:
* if the frame is defined but no displaying component has been
* found/loaded, yet.
*/
- bool frameExists( const QString &frameName );
+ bool frameExists( const TQString &frameName );
/**
* Returns child frame framePart its script interpreter
@@ -941,59 +941,59 @@ public:
/**
* Finds a frame by name. Returns 0L if frame can't be found.
*/
- KParts::ReadOnlyPart *findFramePart( const QString &f );
+ KParts::ReadOnlyPart *findFramePart( const TQString &f );
/**
* Called by KJS.
* Sets the StatusBarText assigned
* via window.status
*/
- void setJSStatusBarText( const QString &text );
+ void setJSStatusBarText( const TQString &text );
/**
* Called by KJS.
* Sets the DefaultStatusBarText assigned
* via window.defaultStatus
*/
- void setJSDefaultStatusBarText( const QString &text );
+ void setJSDefaultStatusBarText( const TQString &text );
/**
* Called by KJS.
* Returns the StatusBarText assigned
* via window.status
*/
- QString jsStatusBarText() const;
+ TQString jsStatusBarText() const;
/**
* Called by KJS.
* Returns the DefaultStatusBarText assigned
* via window.defaultStatus
*/
- QString jsDefaultStatusBarText() const;
+ TQString jsDefaultStatusBarText() const;
/**
* Referrer used for links in this page.
*/
- QString referrer() const;
+ TQString referrer() const;
/**
* Referrer used to obtain this page.
*/
- QString pageReferrer() const;
+ TQString pageReferrer() const;
/**
* Last-modified date (in raw string format), if received in the [HTTP] headers.
*/
- QString lastModified() const;
+ TQString lastModified() const;
/**
* Loads a style sheet into the stylesheet cache.
*/
- void preloadStyleSheet( const QString &url, const QString &stylesheet );
+ void preloadStyleSheet( const TQString &url, const TQString &stylesheet );
/**
* Loads a script into the script cache.
*/
- void preloadScript( const QString &url, const QString &script );
+ void preloadScript( const TQString &url, const TQString &script );
/**
* @internal
@@ -1058,12 +1058,12 @@ signals:
/**
* Emitted if the cursor is moved over an URL.
*/
- void onURL( const QString &url );
+ void onURL( const TQString &url );
/**
* Emitted when the user clicks the right mouse button on the document.
*/
- void popupMenu( const QString &url, const QPoint &point );
+ void popupMenu( const TQString &url, const TQPoint &point );
/**
* This signal is emitted when the selection changes.
@@ -1103,9 +1103,9 @@ signals:
* @since 3.2
* ### KDE4 remove me
*/
- void formSubmitNotification(const char *action, const QString& url,
- const QByteArray& formData, const QString& target,
- const QString& contentType, const QString& boundary);
+ void formSubmitNotification(const char *action, const TQString& url,
+ const TQByteArray& formData, const TQString& target,
+ const TQString& contentType, const TQString& boundary);
protected:
@@ -1114,7 +1114,7 @@ protected:
* returns a KURL object for the given url. Use when
* you know what you're doing.
*/
- KURL completeURL( const QString &url );
+ KURL completeURL( const TQString &url );
/**
* presents a detailed error message to the user.
@@ -1122,9 +1122,9 @@ protected:
* @p text kio additional information text.
* @p url the url that triggered the error.
*/
- void htmlError( int errorCode, const QString& text, const KURL& reqUrl );
+ void htmlError( int errorCode, const TQString& text, const KURL& reqUrl );
- virtual void customEvent( QCustomEvent *event );
+ virtual void customEvent( TQCustomEvent *event );
/**
* Eventhandler of the khtml::MousePressEvent.
@@ -1157,8 +1157,8 @@ protected:
*/
virtual bool openFile();
- virtual void urlSelected( const QString &url, int button, int state,
- const QString &_target, KParts::URLArgs args = KParts::URLArgs());
+ virtual void urlSelected( const TQString &url, int button, int state,
+ const TQString &_target, KParts::URLArgs args = KParts::URLArgs());
/**
* This method is called when a new embedded object (include html frames) is to be created.
@@ -1168,15 +1168,15 @@ protected:
* to be a object of your derived type, in which case you should return a new instance for
* the mimetype 'text/html' .
*/
- virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QString &mimetype, QString &serviceName,
- QStringList &serviceTypes, const QStringList &params);
+ virtual KParts::ReadOnlyPart *createPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQString &mimetype, TQString &serviceName,
+ TQStringList &serviceTypes, const TQStringList &params);
// This is for RenderPartObject. We want to ask the 'download plugin?'
// question only once per mimetype
- bool pluginPageQuestionAsked( const QString& mimetype ) const;
- void setPluginPageQuestionAsked( const QString& mimetype );
+ bool pluginPageQuestionAsked( const TQString& mimetype ) const;
+ void setPluginPageQuestionAsked( const TQString& mimetype );
enum PageSecurity { NotCrypted, Encrypted, Mixed };
void setPageSecurity( PageSecurity sec );
@@ -1184,12 +1184,12 @@ protected:
/**
* Implements the streaming API of KParts::ReadOnlyPart.
*/
- virtual bool doOpenStream( const QString& mimeType );
+ virtual bool doOpenStream( const TQString& mimeType );
/**
* Implements the streaming API of KParts::ReadOnlyPart.
*/
- virtual bool doWriteStream( const QByteArray& data );
+ virtual bool doWriteStream( const TQByteArray& data );
/**
* Implements the streaming API of KParts::ReadOnlyPart.
@@ -1214,7 +1214,7 @@ public slots:
*/
void stopAnimations();
- QCString dcopObjectId() const;
+ TQCString dcopObjectId() const;
/**
* Execute the specified snippet of JavaScript code.
@@ -1223,7 +1223,7 @@ public slots:
* and the code returned true itself or @p false otherwise.
* @deprecated, use executeString( DOM::Node(), script)
*/
- QVariant executeScript( const QString &script );
+ TQVariant executeScript( const TQString &script );
/**
* Enables/disables caret mode.
@@ -1272,11 +1272,11 @@ public slots:
// Remove this and make the one below protected+virtual slot.
// Warning: this is effectively "internal". Be careful.
// @since 3.2
- void submitFormProxy( const char *action, const QString &url,
- const QByteArray &formData,
- const QString &target,
- const QString& contentType = QString::null,
- const QString& boundary = QString::null );
+ void submitFormProxy( const char *action, const TQString &url,
+ const TQByteArray &formData,
+ const TQString &target,
+ const TQString& contentType = TQString::null,
+ const TQString& boundary = TQString::null );
private slots:
@@ -1288,15 +1288,15 @@ private slots:
/**
* @internal
*/
- void slotData( KIO::Job*, const QByteArray &data );
+ void slotData( KIO::Job*, const TQByteArray &data );
/**
* @internal
*/
- void slotInfoMessage( KIO::Job*, const QString& msg );
+ void slotInfoMessage( KIO::Job*, const TQString& msg );
/**
* @internal
*/
- void slotRestoreData( const QByteArray &data );
+ void slotRestoreData( const TQByteArray &data );
/**
* @internal
*/
@@ -1481,7 +1481,7 @@ private slots:
/**
* @internal
*/
- void slotHighlight( const QString &, int index, int length );
+ void slotHighlight( const TQString &, int index, int length );
/**
* @internal
@@ -1547,7 +1547,7 @@ private:
KJSErrorDlg *jsErrorExtension();
enum StatusBarPriority { BarDefaultText, BarHoverText, BarOverrideText };
- void setStatusBarText( const QString& text, StatusBarPriority p);
+ void setStatusBarText( const TQString& text, StatusBarPriority p);
bool restoreURL( const KURL &url );
void resetFromScript();
@@ -1555,19 +1555,19 @@ private:
// Returns whether callingHtmlPart may access this part
bool checkFrameAccess(KHTMLPart *callingHtmlPart);
bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs );
- bool urlSelectedIntern( const QString &url, int button, int state,
- const QString &_target, KParts::URLArgs args = KParts::URLArgs());
+ bool urlSelectedIntern( const TQString &url, int button, int state,
+ const TQString &_target, KParts::URLArgs args = KParts::URLArgs());
void startAutoScroll();
void stopAutoScroll();
- void overURL( const QString &url, const QString &target, bool shiftPressed = false );
+ void overURL( const TQString &url, const TQString &target, bool shiftPressed = false );
void resetHoverText(); // Undo overURL and reset HoverText
- bool processObjectRequest( khtml::ChildFrame *child, const KURL &url, const QString &mimetype );
+ bool processObjectRequest( khtml::ChildFrame *child, const KURL &url, const TQString &mimetype );
KWallet::Wallet* wallet();
void openWallet(DOM::HTMLFormElementImpl*);
- void saveToWallet(const QString& key, const QMap<QString,QString>& data);
+ void saveToWallet(const TQString& key, const TQMap<TQString,TQString>& data);
void dequeueWallet(DOM::HTMLFormElementImpl*);
void enableFindAheadActions(bool);
@@ -1582,24 +1582,24 @@ private:
// and virtual, or provide a better solution.
// See the web_module for the sidebar for an example where this is
// necessary.
- void submitForm( const char *action, const QString &url, const QByteArray &formData,
- const QString &target, const QString& contentType = QString::null,
- const QString& boundary = QString::null );
+ void submitForm( const char *action, const TQString &url, const TQByteArray &formData,
+ const TQString &target, const TQString& contentType = TQString::null,
+ const TQString& boundary = TQString::null );
- void popupMenu( const QString &url );
+ void popupMenu( const TQString &url );
void init( KHTMLView *view, GUIProfile prof );
void clear();
- bool scheduleScript( const DOM::Node &n, const QString& script);
+ bool scheduleScript( const DOM::Node &n, const TQString& script);
- QVariant crossFrameExecuteScript(const QString& target, const QString& script);
- QVariant executeScheduledScript();
+ TQVariant crossFrameExecuteScript(const TQString& target, const TQString& script);
+ TQVariant executeScheduledScript();
- bool requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
- const QStringList &args = QStringList(), bool isIFrame = false );
+ bool requestFrame( khtml::RenderPart *frame, const TQString &url, const TQString &frameName,
+ const TQStringList &args = TQStringList(), bool isIFrame = false );
/**
* @internal returns a name for a frame without a name.
@@ -1608,23 +1608,23 @@ private:
* always the same.
* The sequence is reset in clear().
*/
- QString requestFrameName();
+ TQString requestFrameName();
- bool requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
- const QStringList &args = QStringList() );
+ bool requestObject( khtml::RenderPart *frame, const TQString &url, const TQString &serviceType,
+ const TQStringList &args = TQStringList() );
bool requestObject( khtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() );
- DOM::EventListener *createHTMLEventListener( QString code, QString name, DOM::NodeImpl *node );
+ DOM::EventListener *createHTMLEventListener( TQString code, TQString name, DOM::NodeImpl *node );
DOM::HTMLDocumentImpl *docImpl() const;
DOM::DocumentImpl *xmlDocImpl() const;
- khtml::ChildFrame *frame( const QObject *obj );
+ khtml::ChildFrame *frame( const TQObject *obj );
khtml::ChildFrame *recursiveFrameRequest( KHTMLPart *callingHtmlPart, const KURL &url, const KParts::URLArgs &args, bool callParent = true );
- bool checkLinkSecurity( const KURL &linkURL,const QString &message = QString::null, const QString &button = QString::null );
- QVariant executeScript( const QString& filename, int baseLine, const DOM::Node &n, const QString& script );
+ bool checkLinkSecurity( const KURL &linkURL,const TQString &message = TQString::null, const TQString &button = TQString::null );
+ TQVariant executeScript( const TQString& filename, int baseLine, const DOM::Node &n, const TQString& script );
KJSProxy *jScript();
@@ -1655,10 +1655,10 @@ private:
*/
bool isExtendingSelection() const;
khtml::Decoder *createDecoder();
- QString defaultEncoding() const;
+ TQString defaultEncoding() const;
/** .html, .xhtml or .xml */
- QString defaultExtension() const;
+ TQString defaultExtension() const;
/** @internal
* generic zoom in
diff --git a/khtml/khtml_printsettings.cpp b/khtml/khtml_printsettings.cpp
index 61d94bbb9..1b3e9c245 100644
--- a/khtml/khtml_printsettings.cpp
+++ b/khtml/khtml_printsettings.cpp
@@ -20,15 +20,15 @@
#include "khtml_printsettings.h"
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
-KHTMLPrintSettings::KHTMLPrintSettings(QWidget *parent, const char *name)
+KHTMLPrintSettings::KHTMLPrintSettings(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPrintImages = i18n( "<qt>"
+ TQString whatsThisPrintImages = i18n( "<qt>"
"<p><strong>'Print images'</strong></p>"
"<p>"
"If this checkbox is enabled, images contained in the HTML page will "
@@ -40,7 +40,7 @@ KHTMLPrintSettings::KHTMLPrintSettings(QWidget *parent, const char *name)
"less ink or toner."
"</p>"
" </qt>" );
- QString whatsThisPrintHeader = i18n( "<qt>"
+ TQString whatsThisPrintHeader = i18n( "<qt>"
"<p><strong>'Print header'</strong></p>"
"<p>"
"If this checkbox is enabled, the printout of the HTML document will "
@@ -53,7 +53,7 @@ KHTMLPrintSettings::KHTMLPrintSettings(QWidget *parent, const char *name)
"not contain such a header line."
"</p>"
" </qt>" );
- QString whatsThisPrinterFriendlyMode = i18n( "<qt>"
+ TQString whatsThisPrinterFriendlyMode = i18n( "<qt>"
"<p><strong>'Printerfriendly mode'</strong></p>"
"<p>"
"If this checkbox is enabled, the printout of the HTML document will "
@@ -70,17 +70,17 @@ KHTMLPrintSettings::KHTMLPrintSettings(QWidget *parent, const char *name)
" </qt>" );
setTitle(i18n("HTML Settings"));
- m_printfriendly = new QCheckBox(i18n("Printer friendly mode (black text, no background)"), this);
- QWhatsThis::add(m_printfriendly, whatsThisPrinterFriendlyMode);
+ m_printfriendly = new TQCheckBox(i18n("Printer friendly mode (black text, no background)"), this);
+ TQWhatsThis::add(m_printfriendly, whatsThisPrinterFriendlyMode);
m_printfriendly->setChecked(true);
- m_printimages = new QCheckBox(i18n("Print images"), this);
- QWhatsThis::add(m_printimages, whatsThisPrintImages);
+ m_printimages = new TQCheckBox(i18n("Print images"), this);
+ TQWhatsThis::add(m_printimages, whatsThisPrintImages);
m_printimages->setChecked(true);
- m_printheader = new QCheckBox(i18n("Print header"), this);
- QWhatsThis::add(m_printheader, whatsThisPrintHeader);
+ m_printheader = new TQCheckBox(i18n("Print header"), this);
+ TQWhatsThis::add(m_printheader, whatsThisPrintHeader);
m_printheader->setChecked(true);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(m_printfriendly);
l0->addWidget(m_printimages);
l0->addWidget(m_printheader);
@@ -91,14 +91,14 @@ KHTMLPrintSettings::~KHTMLPrintSettings()
{
}
-void KHTMLPrintSettings::getOptions(QMap<QString,QString>& opts, bool /*incldef*/)
+void KHTMLPrintSettings::getOptions(TQMap<TQString,TQString>& opts, bool /*incldef*/)
{
opts["app-khtml-printfriendly"] = (m_printfriendly->isChecked() ? "true" : "false");
opts["app-khtml-printimages"] = (m_printimages->isChecked() ? "true" : "false");
opts["app-khtml-printheader"] = (m_printheader->isChecked() ? "true" : "false");
}
-void KHTMLPrintSettings::setOptions(const QMap<QString,QString>& opts)
+void KHTMLPrintSettings::setOptions(const TQMap<TQString,TQString>& opts)
{
m_printfriendly->setChecked(opts["app-khtml-printfriendly"] != "false");
m_printimages->setChecked(opts["app-khtml-printimages"] != "false");
diff --git a/khtml/khtml_printsettings.h b/khtml/khtml_printsettings.h
index efdeb61e8..b6d2d897b 100644
--- a/khtml/khtml_printsettings.h
+++ b/khtml/khtml_printsettings.h
@@ -28,11 +28,11 @@ class KHTMLPrintSettings : public KPrintDialogPage
{
Q_OBJECT
public:
- KHTMLPrintSettings(QWidget *parent = 0, const char *name = 0);
+ KHTMLPrintSettings(TQWidget *parent = 0, const char *name = 0);
~KHTMLPrintSettings();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
QCheckBox *m_printfriendly;
diff --git a/khtml/khtml_run.cpp b/khtml/khtml_run.cpp
index 127873137..90770d38f 100644
--- a/khtml/khtml_run.cpp
+++ b/khtml/khtml_run.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <klocale.h>
#include "khtml_ext.h"
-#include <qwidget.h>
+#include <tqwidget.h>
KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
const KParts::URLArgs &args, bool hideErrorDialog )
@@ -44,10 +44,10 @@ KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
//KHTMLPart *KHTMLRun::htmlPart() const
//{ return static_cast<KHTMLPart *>(m_part); }
-void KHTMLRun::foundMimeType( const QString &_type )
+void KHTMLRun::foundMimeType( const TQString &_type )
{
Q_ASSERT(!m_bFinished);
- QString mimeType = _type; // this ref comes from the job, we lose it when using KIO again
+ TQString mimeType = _type; // this ref comes from the job, we lose it when using KIO again
if ( static_cast<KHTMLPart *>(m_part)->processObjectRequest( m_child, m_strURL, mimeType ) )
m_bFinished = true;
else {
@@ -78,9 +78,9 @@ void KHTMLRun::foundMimeType( const QString &_type )
static_cast<KHTMLPart *>(m_part)->checkCompleted();
}
-void KHTMLRun::save( const KURL & url, const QString & suggestedFilename )
+void KHTMLRun::save( const KURL & url, const TQString & suggestedFilename )
{
- KHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As" ), url, m_args.metaData(), QString::null, 0, suggestedFilename );
+ KHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As" ), url, m_args.metaData(), TQString::null, 0, suggestedFilename );
}
// KDE4: remove
diff --git a/khtml/khtml_run.h b/khtml/khtml_run.h
index 82006c377..e1be45fd1 100644
--- a/khtml/khtml_run.h
+++ b/khtml/khtml_run.h
@@ -42,15 +42,15 @@ public:
KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
const KParts::URLArgs &args, bool hideErrorDialog );
- virtual void foundMimeType( const QString &mimetype );
+ virtual void foundMimeType( const TQString &mimetype );
//KHTMLPart *htmlPart() const;
protected:
virtual void handleError( KIO::Job * job );
- virtual void save( const KURL & url, const QString & suggestedFilename );
- bool askSave( const KURL & url, KService::Ptr offer, const QString & mimeType, const QString & suggestedFilename );
+ virtual void save( const KURL & url, const TQString & suggestedFilename );
+ bool askSave( const KURL & url, KService::Ptr offer, const TQString & mimeType, const TQString & suggestedFilename );
private:
khtml::ChildFrame *m_child;
diff --git a/khtml/khtml_settings.cc b/khtml/khtml_settings.cc
index f2b8a27df..f5abe5ba9 100644
--- a/khtml/khtml_settings.cc
+++ b/khtml/khtml_settings.cc
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfontdatabase.h>
+#include <tqfontdatabase.h>
#include "khtml_settings.h"
#include "khtmldefaults.h"
@@ -26,8 +26,8 @@
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qvaluevector.h>
+#include <tqregexp.h>
+#include <tqvaluevector.h>
#include <kmessagebox.h>
/**
@@ -46,7 +46,7 @@ struct KPerDomainSettings {
KHTMLSettings::KJSWindowResizePolicy m_windowResizePolicy : 1;
#ifdef DEBUG_SETTINGS
- void dump(const QString &infix = QString::null) const {
+ void dump(const TQString &infix = TQString::null) const {
kdDebug() << "KPerDomainSettings " << infix << " @" << this << ":" << endl;
kdDebug() << " m_bEnableJava: " << m_bEnableJava << endl;
kdDebug() << " m_bEnableJavaScript: " << m_bEnableJavaScript << endl;
@@ -60,7 +60,7 @@ struct KPerDomainSettings {
#endif
};
-typedef QMap<QString,KPerDomainSettings> PolicyMap;
+typedef TQMap<TQString,KPerDomainSettings> PolicyMap;
class KHTMLSettingsPrivate
{
@@ -94,20 +94,20 @@ public:
int m_maxFormCompletionItems;
KHTMLSettings::KAnimationAdvice m_showAnimations;
- QString m_encoding;
- QString m_userSheet;
+ TQString m_encoding;
+ TQString m_userSheet;
- QColor m_textColor;
- QColor m_baseColor;
- QColor m_linkColor;
- QColor m_vLinkColor;
+ TQColor m_textColor;
+ TQColor m_baseColor;
+ TQColor m_linkColor;
+ TQColor m_vLinkColor;
PolicyMap domainPolicy;
- QStringList fonts;
- QStringList defaultFonts;
+ TQStringList fonts;
+ TQStringList defaultFonts;
- QValueVector<QRegExp> adFilters;
- QValueList< QPair< QString, QChar > > m_fallbackAccessKeysAssignments;
+ TQValueVector<TQRegExp> adFilters;
+ TQValueList< QPair< TQString, TQChar > > m_fallbackAccessKeysAssignments;
};
@@ -116,11 +116,11 @@ public:
*/
static KPerDomainSettings &setup_per_domain_policy(
KHTMLSettingsPrivate *d,
- const QString &domain) {
+ const TQString &domain) {
if (domain.isEmpty()) {
kdWarning() << "setup_per_domain_policy: domain is empty" << endl;
}
- const QString ldomain = domain.lower();
+ const TQString ldomain = domain.lower();
PolicyMap::iterator it = d->domainPolicy.find(ldomain);
if (it == d->domainPolicy.end()) {
// simply copy global domain settings (they should have been initialized
@@ -131,16 +131,16 @@ static KPerDomainSettings &setup_per_domain_policy(
}
-KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const QString& _str)
+KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const TQString& _str)
{
KJavaScriptAdvice ret = KJavaScriptDunno;
if (!_str)
ret = KJavaScriptDunno;
- if (_str.lower() == QString::fromLatin1("accept"))
+ if (_str.lower() == TQString::fromLatin1("accept"))
ret = KJavaScriptAccept;
- else if (_str.lower() == QString::fromLatin1("reject"))
+ else if (_str.lower() == TQString::fromLatin1("reject"))
ret = KJavaScriptReject;
return ret;
@@ -157,10 +157,10 @@ const char* KHTMLSettings::adviceToStr(KJavaScriptAdvice _advice)
}
-void KHTMLSettings::splitDomainAdvice(const QString& configStr, QString &domain,
+void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domain,
KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice)
{
- QString tmp(configStr);
+ TQString tmp(configStr);
int splitIndex = tmp.find(':');
if ( splitIndex == -1)
{
@@ -171,7 +171,7 @@ void KHTMLSettings::splitDomainAdvice(const QString& configStr, QString &domain,
else
{
domain = tmp.left(splitIndex).lower();
- QString adviceString = tmp.mid( splitIndex+1, tmp.length() );
+ TQString adviceString = tmp.mid( splitIndex+1, tmp.length() );
int splitIndex2 = adviceString.find( ':' );
if( splitIndex2 == -1 ) {
// Java advice only
@@ -188,64 +188,64 @@ void KHTMLSettings::splitDomainAdvice(const QString& configStr, QString &domain,
void KHTMLSettings::readDomainSettings(KConfig *config, bool reset,
bool global, KPerDomainSettings &pd_settings) {
- QString jsPrefix = global ? QString::null
- : QString::fromLatin1("javascript.");
- QString javaPrefix = global ? QString::null
- : QString::fromLatin1("java.");
- QString pluginsPrefix = global ? QString::null
- : QString::fromLatin1("plugins.");
+ TQString jsPrefix = global ? TQString::null
+ : TQString::fromLatin1("javascript.");
+ TQString javaPrefix = global ? TQString::null
+ : TQString::fromLatin1("java.");
+ TQString pluginsPrefix = global ? TQString::null
+ : TQString::fromLatin1("plugins.");
// The setting for Java
- QString key = javaPrefix + QString::fromLatin1("EnableJava");
+ TQString key = javaPrefix + TQString::fromLatin1("EnableJava");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnableJava = config->readBoolEntry( key, false );
else if ( !global )
pd_settings.m_bEnableJava = d->global.m_bEnableJava;
// The setting for Plugins
- key = pluginsPrefix + QString::fromLatin1("EnablePlugins");
+ key = pluginsPrefix + TQString::fromLatin1("EnablePlugins");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnablePlugins = config->readBoolEntry( key, true );
else if ( !global )
pd_settings.m_bEnablePlugins = d->global.m_bEnablePlugins;
// The setting for JavaScript
- key = jsPrefix + QString::fromLatin1("EnableJavaScript");
+ key = jsPrefix + TQString::fromLatin1("EnableJavaScript");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnableJavaScript = config->readBoolEntry( key, true );
else if ( !global )
pd_settings.m_bEnableJavaScript = d->global.m_bEnableJavaScript;
// window property policies
- key = jsPrefix + QString::fromLatin1("WindowOpenPolicy");
+ key = jsPrefix + TQString::fromLatin1("WindowOpenPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowOpenPolicy = (KJSWindowOpenPolicy)
config->readUnsignedNumEntry( key, KJSWindowOpenSmart );
else if ( !global )
pd_settings.m_windowOpenPolicy = d->global.m_windowOpenPolicy;
- key = jsPrefix + QString::fromLatin1("WindowMovePolicy");
+ key = jsPrefix + TQString::fromLatin1("WindowMovePolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowMovePolicy = (KJSWindowMovePolicy)
config->readUnsignedNumEntry( key, KJSWindowMoveAllow );
else if ( !global )
pd_settings.m_windowMovePolicy = d->global.m_windowMovePolicy;
- key = jsPrefix + QString::fromLatin1("WindowResizePolicy");
+ key = jsPrefix + TQString::fromLatin1("WindowResizePolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowResizePolicy = (KJSWindowResizePolicy)
config->readUnsignedNumEntry( key, KJSWindowResizeAllow );
else if ( !global )
pd_settings.m_windowResizePolicy = d->global.m_windowResizePolicy;
- key = jsPrefix + QString::fromLatin1("WindowStatusPolicy");
+ key = jsPrefix + TQString::fromLatin1("WindowStatusPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowStatusPolicy = (KJSWindowStatusPolicy)
config->readUnsignedNumEntry( key, KJSWindowStatusAllow );
else if ( !global )
pd_settings.m_windowStatusPolicy = d->global.m_windowStatusPolicy;
- key = jsPrefix + QString::fromLatin1("WindowFocusPolicy");
+ key = jsPrefix + TQString::fromLatin1("WindowFocusPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowFocusPolicy = (KJSWindowFocusPolicy)
config->readUnsignedNumEntry( key, KJSWindowFocusAllow );
@@ -301,7 +301,7 @@ void KHTMLSettings::init()
void KHTMLSettings::init( KConfig * config, bool reset )
{
- QString group_save = config->group();
+ TQString group_save = config->group();
if (reset || config->hasGroup("MainView Settings"))
{
config->setGroup( "MainView Settings" );
@@ -326,13 +326,13 @@ void KHTMLSettings::init( KConfig * config, bool reset )
d->adFilters.clear();
- QMap<QString,QString> entryMap = config->entryMap("Filter Settings");
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString> entryMap = config->entryMap("Filter Settings");
+ TQMap<TQString,TQString>::ConstIterator it;
d->adFilters.reserve(entryMap.count());
for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it )
{
- QString name = it.key();
- QString url = it.data();
+ TQString name = it.key();
+ TQString url = it.data();
if (url.startsWith("!"))
continue;
@@ -341,13 +341,13 @@ void KHTMLSettings::init( KConfig * config, bool reset )
{
if (url.length()>2 && url[0]=='/' && url[url.length()-1] == '/')
{
- QString inside = url.mid(1, url.length()-2);
- QRegExp rx(inside);
+ TQString inside = url.mid(1, url.length()-2);
+ TQRegExp rx(inside);
d->adFilters.append(rx);
}
else
{
- QRegExp rx;
+ TQRegExp rx;
int left,right;
for (right=url.length(); right>0 && url[right-1]=='*' ; --right);
@@ -368,14 +368,14 @@ void KHTMLSettings::init( KConfig * config, bool reset )
config->setGroup( "HTML Settings" );
// Fonts and colors
if( reset ) {
- d->defaultFonts = QStringList();
+ d->defaultFonts = TQStringList();
d->defaultFonts.append( config->readEntry( "StandardFont", KGlobalSettings::generalFont().family() ) );
d->defaultFonts.append( config->readEntry( "FixedFont", KGlobalSettings::fixedFont().family() ) );
d->defaultFonts.append( config->readEntry( "SerifFont", HTML_DEFAULT_VIEW_SERIF_FONT ) );
d->defaultFonts.append( config->readEntry( "SansSerifFont", HTML_DEFAULT_VIEW_SANSSERIF_FONT ) );
d->defaultFonts.append( config->readEntry( "CursiveFont", HTML_DEFAULT_VIEW_CURSIVE_FONT ) );
d->defaultFonts.append( config->readEntry( "FantasyFont", HTML_DEFAULT_VIEW_FANTASY_FONT ) );
- d->defaultFonts.append( QString( "0" ) ); // font size adjustment
+ d->defaultFonts.append( TQString( "0" ) ); // font size adjustment
}
if ( reset || config->hasKey( "MinimumFontSize" ) )
@@ -420,7 +420,7 @@ void KHTMLSettings::init( KConfig * config, bool reset )
if ( reset || config->hasKey( "ShowAnimations" ) )
{
- QString value = config->readEntry( "ShowAnimations").lower();
+ TQString value = config->readEntry( "ShowAnimations").lower();
if (value == "disabled")
d->m_showAnimations = KAnimationDisabled;
else if (value == "looponce")
@@ -438,9 +438,9 @@ void KHTMLSettings::init( KConfig * config, bool reset )
d->m_maxFormCompletionItems = config->readNumEntry("MaxFormCompletionItems", 10);
d->m_autoDelayedActionsEnabled = config->readBoolEntry ("AutoDelayedActions", true);
d->m_jsErrorsEnabled = config->readBoolEntry("ReportJSErrors", true);
- QStringList accesskeys = config->readListEntry("FallbackAccessKeysAssignments");
+ TQStringList accesskeys = config->readListEntry("FallbackAccessKeysAssignments");
d->m_fallbackAccessKeysAssignments.clear();
- for( QStringList::ConstIterator it = accesskeys.begin(); it != accesskeys.end(); ++it )
+ for( TQStringList::ConstIterator it = accesskeys.begin(); it != accesskeys.end(); ++it )
if( (*it).length() > 2 && (*it)[ 1 ] == ':' )
d->m_fallbackAccessKeysAssignments.append( qMakePair( (*it).mid( 2 ), (*it)[ 0 ] ));
}
@@ -497,18 +497,18 @@ void KHTMLSettings::init( KConfig * config, bool reset )
bool check_old_ecma_settings = true;
bool check_old_java_settings = true;
// merge all domains into one list
- QMap<QString,int> domainList; // why can't Qt have a QSet?
+ TQMap<TQString,int> domainList; // why can't Qt have a QSet?
for (unsigned i = 0; i < sizeof domain_keys/sizeof domain_keys[0]; ++i) {
if ( reset || config->hasKey(domain_keys[i]) ) {
if (i == 0) check_old_ecma_settings = false;
else if (i == 1) check_old_java_settings = false;
- const QStringList dl = config->readListEntry( domain_keys[i] );
- const QMap<QString,int>::Iterator notfound = domainList.end();
- QStringList::ConstIterator it = dl.begin();
- const QStringList::ConstIterator itEnd = dl.end();
+ const TQStringList dl = config->readListEntry( domain_keys[i] );
+ const TQMap<TQString,int>::Iterator notfound = domainList.end();
+ TQStringList::ConstIterator it = dl.begin();
+ const TQStringList::ConstIterator itEnd = dl.end();
for (; it != itEnd; ++it) {
- const QString domain = (*it).lower();
- QMap<QString,int>::Iterator pos = domainList.find(domain);
+ const TQString domain = (*it).lower();
+ TQMap<TQString,int>::Iterator pos = domainList.find(domain);
if (pos == notfound) domainList.insert(domain,0);
}/*next it*/
}
@@ -517,13 +517,13 @@ void KHTMLSettings::init( KConfig * config, bool reset )
if (reset)
d->domainPolicy.clear();
- QString js_group_save = config->group();
+ TQString js_group_save = config->group();
{
- QMap<QString,int>::ConstIterator it = domainList.begin();
- const QMap<QString,int>::ConstIterator itEnd = domainList.end();
+ TQMap<TQString,int>::ConstIterator it = domainList.begin();
+ const TQMap<TQString,int>::ConstIterator itEnd = domainList.end();
for ( ; it != itEnd; ++it)
{
- const QString domain = it.key();
+ const TQString domain = it.key();
config->setGroup(domain);
readDomainSettings(config,reset,false,d->domainPolicy[domain]);
#ifdef DEBUG_SETTINGS
@@ -538,12 +538,12 @@ void KHTMLSettings::init( KConfig * config, bool reset )
&& check_old_java_settings )
{
check_old_java = false;
- const QStringList domainList = config->readListEntry( "JavaDomainSettings" );
- QStringList::ConstIterator it = domainList.begin();
- const QStringList::ConstIterator itEnd = domainList.end();
+ const TQStringList domainList = config->readListEntry( "JavaDomainSettings" );
+ TQStringList::ConstIterator it = domainList.begin();
+ const TQStringList::ConstIterator itEnd = domainList.end();
for ( ; it != itEnd; ++it)
{
- QString domain;
+ TQString domain;
KJavaScriptAdvice javaAdvice;
KJavaScriptAdvice javaScriptAdvice;
splitDomainAdvice(*it, domain, javaAdvice, javaScriptAdvice);
@@ -560,12 +560,12 @@ void KHTMLSettings::init( KConfig * config, bool reset )
&& check_old_ecma_settings )
{
check_old_ecma = false;
- const QStringList domainList = config->readListEntry( "ECMADomainSettings" );
- QStringList::ConstIterator it = domainList.begin();
- const QStringList::ConstIterator itEnd = domainList.end();
+ const TQStringList domainList = config->readListEntry( "ECMADomainSettings" );
+ TQStringList::ConstIterator it = domainList.begin();
+ const TQStringList::ConstIterator itEnd = domainList.end();
for ( ; it != itEnd; ++it)
{
- QString domain;
+ TQString domain;
KJavaScriptAdvice javaAdvice;
KJavaScriptAdvice javaScriptAdvice;
splitDomainAdvice(*it, domain, javaAdvice, javaScriptAdvice);
@@ -581,12 +581,12 @@ void KHTMLSettings::init( KConfig * config, bool reset )
&& ( check_old_java || check_old_ecma )
&& ( check_old_ecma_settings || check_old_java_settings ) )
{
- const QStringList domainList = config->readListEntry( "JavaScriptDomainAdvice" );
- QStringList::ConstIterator it = domainList.begin();
- const QStringList::ConstIterator itEnd = domainList.end();
+ const TQStringList domainList = config->readListEntry( "JavaScriptDomainAdvice" );
+ TQStringList::ConstIterator it = domainList.begin();
+ const TQStringList::ConstIterator itEnd = domainList.end();
for ( ; it != itEnd; ++it)
{
- QString domain;
+ TQString domain;
KJavaScriptAdvice javaAdvice;
KJavaScriptAdvice javaScriptAdvice;
splitDomainAdvice(*it, domain, javaAdvice, javaScriptAdvice);
@@ -605,26 +605,26 @@ void KHTMLSettings::init( KConfig * config, bool reset )
#if 0
if( check_old_java )
{
- QStringList domainConfig;
+ TQStringList domainConfig;
PolicyMap::Iterator it;
for( it = d->javaDomainPolicy.begin(); it != d->javaDomainPolicy.end(); ++it )
{
- QCString javaPolicy = adviceToStr( it.data() );
- QCString javaScriptPolicy = adviceToStr( KJavaScriptDunno );
- domainConfig.append(QString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
+ TQCString javaPolicy = adviceToStr( it.data() );
+ TQCString javaScriptPolicy = adviceToStr( KJavaScriptDunno );
+ domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
}
config->writeEntry( "JavaDomainSettings", domainConfig );
}
if( check_old_ecma )
{
- QStringList domainConfig;
+ TQStringList domainConfig;
PolicyMap::Iterator it;
for( it = d->javaScriptDomainPolicy.begin(); it != d->javaScriptDomainPolicy.end(); ++it )
{
- QCString javaPolicy = adviceToStr( KJavaScriptDunno );
- QCString javaScriptPolicy = adviceToStr( it.data() );
- domainConfig.append(QString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
+ TQCString javaPolicy = adviceToStr( KJavaScriptDunno );
+ TQCString javaScriptPolicy = adviceToStr( it.data() );
+ domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
}
config->writeEntry( "ECMADomainSettings", domainConfig );
}
@@ -641,7 +641,7 @@ void KHTMLSettings::init( KConfig * config, bool reset )
*/
static const KPerDomainSettings &lookup_hostname_policy(
const KHTMLSettingsPrivate *d,
- const QString& hostname)
+ const TQString& hostname)
{
#ifdef DEBUG_SETTINGS
kdDebug() << "lookup_hostname_policy(" << hostname << ")" << endl;
@@ -668,9 +668,9 @@ static const KPerDomainSettings &lookup_hostname_policy(
// Now, check for partial match. Chop host from the left until
// there's no dots left.
- QString host_part = hostname;
+ TQString host_part = hostname;
int dot_idx = -1;
- while( (dot_idx = host_part.find(QChar('.'))) >= 0 ) {
+ while( (dot_idx = host_part.find(TQChar('.'))) >= 0 ) {
host_part.remove(0,dot_idx);
it = d->domainPolicy.find(host_part);
Q_ASSERT(notfound == d->domainPolicy.end());
@@ -681,7 +681,7 @@ static const KPerDomainSettings &lookup_hostname_policy(
#endif
return *it;
}
- // assert(host_part[0] == QChar('.'));
+ // assert(host_part[0] == TQChar('.'));
host_part.remove(0,1); // Chop off the dot.
}
@@ -718,14 +718,14 @@ bool KHTMLSettings::isHideAdsEnabled() const
return d->m_hideAdsEnabled;
}
-bool KHTMLSettings::isAdFiltered( const QString &url ) const
+bool KHTMLSettings::isAdFiltered( const TQString &url ) const
{
if (d->m_adFilterEnabled)
{
if (!url.startsWith("data:"))
{
- QValueVector<QRegExp>::const_iterator it(d->adFilters.constBegin());
- QValueVector<QRegExp>::const_iterator end(d->adFilters.constEnd());
+ TQValueVector<TQRegExp>::const_iterator it(d->adFilters.constBegin());
+ TQValueVector<TQRegExp>::const_iterator end(d->adFilters.constEnd());
for (; it != end; ++it)
{
if ((*it).search(url) != -1)
@@ -739,15 +739,15 @@ bool KHTMLSettings::isAdFiltered( const QString &url ) const
return false;
}
-void KHTMLSettings::addAdFilter( const QString &url )
+void KHTMLSettings::addAdFilter( const TQString &url )
{
KConfig config( "khtmlrc", false, false );
config.setGroup( "Filter Settings" );
- QRegExp rx;
+ TQRegExp rx;
if (url.length()>2 && url[0]=='/' && url[url.length()-1] == '/')
{
- QString inside = url.mid(1, url.length()-2);
+ TQString inside = url.mid(1, url.length()-2);
rx.setWildcard(false);
rx.setPattern(inside);
}
@@ -765,7 +765,7 @@ void KHTMLSettings::addAdFilter( const QString &url )
if (rx.isValid())
{
int last=config.readNumEntry("Count",0);
- QString key = "Filter-" + QString::number(last);
+ TQString key = "Filter-" + TQString::number(last);
config.writeEntry(key, url);
config.writeEntry("Count",last+1);
config.sync();
@@ -780,55 +780,55 @@ void KHTMLSettings::addAdFilter( const QString &url )
}
}
-bool KHTMLSettings::isJavaEnabled( const QString& hostname )
+bool KHTMLSettings::isJavaEnabled( const TQString& hostname )
{
return lookup_hostname_policy(d,hostname.lower()).m_bEnableJava;
}
-bool KHTMLSettings::isJavaScriptEnabled( const QString& hostname )
+bool KHTMLSettings::isJavaScriptEnabled( const TQString& hostname )
{
return lookup_hostname_policy(d,hostname.lower()).m_bEnableJavaScript;
}
-bool KHTMLSettings::isJavaScriptDebugEnabled( const QString& /*hostname*/ )
+bool KHTMLSettings::isJavaScriptDebugEnabled( const TQString& /*hostname*/ )
{
// debug setting is global for now, but could change in the future
return d->m_bEnableJavaScriptDebug;
}
-bool KHTMLSettings::isJavaScriptErrorReportingEnabled( const QString& /*hostname*/ ) const
+bool KHTMLSettings::isJavaScriptErrorReportingEnabled( const TQString& /*hostname*/ ) const
{
// error reporting setting is global for now, but could change in the future
return d->m_bEnableJavaScriptErrorReporting;
}
-bool KHTMLSettings::isPluginsEnabled( const QString& hostname )
+bool KHTMLSettings::isPluginsEnabled( const TQString& hostname )
{
return lookup_hostname_policy(d,hostname.lower()).m_bEnablePlugins;
}
KHTMLSettings::KJSWindowOpenPolicy KHTMLSettings::windowOpenPolicy(
- const QString& hostname) const {
+ const TQString& hostname) const {
return lookup_hostname_policy(d,hostname.lower()).m_windowOpenPolicy;
}
KHTMLSettings::KJSWindowMovePolicy KHTMLSettings::windowMovePolicy(
- const QString& hostname) const {
+ const TQString& hostname) const {
return lookup_hostname_policy(d,hostname.lower()).m_windowMovePolicy;
}
KHTMLSettings::KJSWindowResizePolicy KHTMLSettings::windowResizePolicy(
- const QString& hostname) const {
+ const TQString& hostname) const {
return lookup_hostname_policy(d,hostname.lower()).m_windowResizePolicy;
}
KHTMLSettings::KJSWindowStatusPolicy KHTMLSettings::windowStatusPolicy(
- const QString& hostname) const {
+ const TQString& hostname) const {
return lookup_hostname_policy(d,hostname.lower()).m_windowStatusPolicy;
}
KHTMLSettings::KJSWindowFocusPolicy KHTMLSettings::windowFocusPolicy(
- const QString& hostname) const {
+ const TQString& hostname) const {
return lookup_hostname_policy(d,hostname.lower()).m_windowFocusPolicy;
}
@@ -842,10 +842,10 @@ int KHTMLSettings::minFontSize() const
return d->m_minFontSize;
}
-QString KHTMLSettings::settingsToCSS() const
+TQString KHTMLSettings::settingsToCSS() const
{
// lets start with the link properties
- QString str = "a:link {\ncolor: ";
+ TQString str = "a:link {\ncolor: ";
str += d->m_linkColor.name();
str += ";";
if(d->m_underlineLink)
@@ -873,18 +873,18 @@ QString KHTMLSettings::settingsToCSS() const
return str;
}
-const QString &KHTMLSettings::availableFamilies()
+const TQString &KHTMLSettings::availableFamilies()
{
if ( !avFamilies ) {
avFamilies = new QString;
- QFontDatabase db;
- QStringList families = db.families();
- QStringList s;
- QRegExp foundryExp(" \\[.+\\]");
+ TQFontDatabase db;
+ TQStringList families = db.families();
+ TQStringList s;
+ TQRegExp foundryExp(" \\[.+\\]");
//remove foundry info
- QStringList::Iterator f = families.begin();
- const QStringList::Iterator fEnd = families.end();
+ TQStringList::Iterator f = families.begin();
+ const TQStringList::Iterator fEnd = families.end();
for ( ; f != fEnd; ++f ) {
(*f).replace( foundryExp, "");
@@ -899,9 +899,9 @@ const QString &KHTMLSettings::availableFamilies()
return *avFamilies;
}
-QString KHTMLSettings::lookupFont(int i) const
+TQString KHTMLSettings::lookupFont(int i) const
{
- QString font;
+ TQString font;
if (d->fonts.count() > (uint) i)
font = d->fonts[i];
if (font.isEmpty())
@@ -909,51 +909,51 @@ QString KHTMLSettings::lookupFont(int i) const
return font;
}
-QString KHTMLSettings::stdFontName() const
+TQString KHTMLSettings::stdFontName() const
{
return lookupFont(0);
}
-QString KHTMLSettings::fixedFontName() const
+TQString KHTMLSettings::fixedFontName() const
{
return lookupFont(1);
}
-QString KHTMLSettings::serifFontName() const
+TQString KHTMLSettings::serifFontName() const
{
return lookupFont(2);
}
-QString KHTMLSettings::sansSerifFontName() const
+TQString KHTMLSettings::sansSerifFontName() const
{
return lookupFont(3);
}
-QString KHTMLSettings::cursiveFontName() const
+TQString KHTMLSettings::cursiveFontName() const
{
return lookupFont(4);
}
-QString KHTMLSettings::fantasyFontName() const
+TQString KHTMLSettings::fantasyFontName() const
{
return lookupFont(5);
}
-void KHTMLSettings::setStdFontName(const QString &n)
+void KHTMLSettings::setStdFontName(const TQString &n)
{
while(d->fonts.count() <= 0)
- d->fonts.append(QString::null);
+ d->fonts.append(TQString::null);
d->fonts[0] = n;
}
-void KHTMLSettings::setFixedFontName(const QString &n)
+void KHTMLSettings::setFixedFontName(const TQString &n)
{
while(d->fonts.count() <= 1)
- d->fonts.append(QString::null);
+ d->fonts.append(TQString::null);
d->fonts[1] = n;
}
-QString KHTMLSettings::userStyleSheet() const
+TQString KHTMLSettings::userStyleSheet() const
{
return d->m_userSheet;
}
@@ -968,7 +968,7 @@ int KHTMLSettings::maxFormCompletionItems() const
return d->m_maxFormCompletionItems;
}
-const QString &KHTMLSettings::encoding() const
+const TQString &KHTMLSettings::encoding() const
{
return d->m_encoding;
}
@@ -978,22 +978,22 @@ bool KHTMLSettings::followSystemColors() const
return d->m_follow_system_colors;
}
-const QColor& KHTMLSettings::textColor() const
+const TQColor& KHTMLSettings::textColor() const
{
return d->m_textColor;
}
-const QColor& KHTMLSettings::baseColor() const
+const TQColor& KHTMLSettings::baseColor() const
{
return d->m_baseColor;
}
-const QColor& KHTMLSettings::linkColor() const
+const TQColor& KHTMLSettings::linkColor() const
{
return d->m_linkColor;
}
-const QColor& KHTMLSettings::vLinkColor() const
+const TQColor& KHTMLSettings::vLinkColor() const
{
return d->m_vLinkColor;
}
@@ -1043,7 +1043,7 @@ bool KHTMLSettings::autoSpellCheck() const
return d->m_autoSpellCheck;
}
-QValueList< QPair< QString, QChar > > KHTMLSettings::fallbackAccessKeysAssignments() const
+TQValueList< QPair< TQString, TQChar > > KHTMLSettings::fallbackAccessKeysAssignments() const
{
return d->m_fallbackAccessKeysAssignments;
}
diff --git a/khtml/khtml_settings.h b/khtml/khtml_settings.h
index 14684511d..d7ef32eab 100644
--- a/khtml/khtml_settings.h
+++ b/khtml/khtml_settings.h
@@ -21,11 +21,11 @@
#define __konq_htmlsettings_h__
class KConfig;
-#include <qcolor.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qmap.h>
+#include <tqcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -128,16 +128,16 @@ public:
KAnimationAdvice showAnimations() const;
// Font settings
- QString stdFontName() const;
- QString fixedFontName() const;
- QString serifFontName() const;
- QString sansSerifFontName() const;
- QString cursiveFontName() const;
- QString fantasyFontName() const;
+ TQString stdFontName() const;
+ TQString fixedFontName() const;
+ TQString serifFontName() const;
+ TQString sansSerifFontName() const;
+ TQString cursiveFontName() const;
+ TQString fantasyFontName() const;
// these two can be set. Mainly for historical reasons (the method in KHTMLPart exists...)
- void setStdFontName(const QString &n);
- void setFixedFontName(const QString &n);
+ void setStdFontName(const TQString &n);
+ void setFixedFontName(const TQString &n);
int minFontSize() const;
int mediumFontSize() const;
@@ -145,15 +145,15 @@ public:
bool jsErrorsEnabled() const;
void setJSErrorsEnabled(bool enabled);
- const QString &encoding() const;
+ const TQString &encoding() const;
bool followSystemColors() const;
// Color settings
- const QColor& textColor() const;
- const QColor& baseColor() const;
- const QColor& linkColor() const;
- const QColor& vLinkColor() const;
+ const TQColor& textColor() const;
+ const TQColor& baseColor() const;
+ const TQColor& linkColor() const;
+ const TQColor& vLinkColor() const;
// Autoload images
bool autoLoadImages() const;
@@ -164,30 +164,30 @@ public:
// Java and JavaScript
// ### BIC make these const
- bool isJavaEnabled( const QString& hostname = QString::null );
- bool isJavaScriptEnabled( const QString& hostname = QString::null );
- bool isJavaScriptDebugEnabled( const QString& hostname = QString::null );
- bool isJavaScriptErrorReportingEnabled( const QString& hostname = QString::null ) const;
- bool isPluginsEnabled( const QString& hostname = QString::null );
+ bool isJavaEnabled( const TQString& hostname = TQString::null );
+ bool isJavaScriptEnabled( const TQString& hostname = TQString::null );
+ bool isJavaScriptDebugEnabled( const TQString& hostname = TQString::null );
+ bool isJavaScriptErrorReportingEnabled( const TQString& hostname = TQString::null ) const;
+ bool isPluginsEnabled( const TQString& hostname = TQString::null );
// AdBlocK Filtering
- bool isAdFiltered( const QString &url ) const;
+ bool isAdFiltered( const TQString &url ) const;
bool isAdFilterEnabled() const;
bool isHideAdsEnabled() const;
- void addAdFilter( const QString &url );
+ void addAdFilter( const TQString &url );
// Access Keys
bool accessKeysEnabled() const;
- KJSWindowOpenPolicy windowOpenPolicy( const QString& hostname = QString::null ) const;
- KJSWindowMovePolicy windowMovePolicy( const QString& hostname = QString::null ) const;
- KJSWindowResizePolicy windowResizePolicy( const QString& hostname = QString::null ) const;
- KJSWindowStatusPolicy windowStatusPolicy( const QString& hostname = QString::null ) const;
- KJSWindowFocusPolicy windowFocusPolicy( const QString& hostname = QString::null ) const;
+ KJSWindowOpenPolicy windowOpenPolicy( const TQString& hostname = TQString::null ) const;
+ KJSWindowMovePolicy windowMovePolicy( const TQString& hostname = TQString::null ) const;
+ KJSWindowResizePolicy windowResizePolicy( const TQString& hostname = TQString::null ) const;
+ KJSWindowStatusPolicy windowStatusPolicy( const TQString& hostname = TQString::null ) const;
+ KJSWindowFocusPolicy windowFocusPolicy( const TQString& hostname = TQString::null ) const;
// helpers for parsing domain-specific configuration, used in KControl module as well
- static KJavaScriptAdvice strToAdvice(const QString& _str);
- static void splitDomainAdvice(const QString& configStr, QString &domain,
+ static KJavaScriptAdvice strToAdvice(const TQString& _str);
+ static void splitDomainAdvice(const TQString& configStr, TQString &domain,
KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice);
static const char* adviceToStr(KJavaScriptAdvice _advice);
@@ -202,10 +202,10 @@ public:
void readDomainSettings(KConfig *config, bool reset,
bool global, KPerDomainSettings &pd_settings);
- QString settingsToCSS() const;
- static const QString &availableFamilies();
+ TQString settingsToCSS() const;
+ static const TQString &availableFamilies();
- QString userStyleSheet() const;
+ TQString userStyleSheet() const;
// Form completion
bool isFormCompletionEnabled() const;
@@ -214,7 +214,7 @@ public:
// Meta refresh/redirect (http-equiv)
bool isAutoDelayedActionsEnabled () const;
- QValueList< QPair< QString, QChar > > fallbackAccessKeysAssignments() const;
+ TQValueList< QPair< TQString, TQChar > > fallbackAccessKeysAssignments() const;
// Whether to show passive popup when windows are blocked
// @since 3.5
@@ -223,10 +223,10 @@ public:
private:
friend class KHTMLFactory;
- QString lookupFont(int i) const;
+ TQString lookupFont(int i) const;
KHTMLSettingsPrivate *d;
- static QString *avFamilies;
+ static TQString *avFamilies;
};
#endif
diff --git a/khtml/khtmlimage.cpp b/khtml/khtmlimage.cpp
index 4f48c2915..03279e968 100644
--- a/khtml/khtmlimage.cpp
+++ b/khtml/khtmlimage.cpp
@@ -26,8 +26,8 @@
#include "rendering/render_image.h"
#include "misc/loader.h"
-#include <qvbox.h>
-#include <qtimer.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
#include <kio/job.h>
#include <kinstance.h>
@@ -48,9 +48,9 @@ KHTMLImageFactory::~KHTMLImageFactory()
delete s_instance;
}
-KParts::Part *KHTMLImageFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className, const QStringList & )
+KParts::Part *KHTMLImageFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className, const TQStringList & )
{
KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI;
if ( strcmp( className, "Browser/View" ) == 0 )
@@ -58,19 +58,19 @@ KParts::Part *KHTMLImageFactory::createPartObject( QWidget *parentWidget, const
return new KHTMLImage( parentWidget, widgetName, parent, name, prof );
}
-KHTMLImage::KHTMLImage( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, KHTMLPart::GUIProfile prof )
+KHTMLImage::KHTMLImage( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, KHTMLPart::GUIProfile prof )
: KParts::ReadOnlyPart( parent, name ), m_image( 0 )
{
KHTMLPart* parentPart = ::qt_cast<KHTMLPart *>( parent );
setInstance( KHTMLImageFactory::instance(), prof == KHTMLPart::BrowserViewGUI && !parentPart );
- QVBox *box = new QVBox( parentWidget, widgetName );
+ TQVBox *box = new TQVBox( parentWidget, widgetName );
m_khtml = new KHTMLPart( box, widgetName, this, "htmlimagepart", prof );
m_khtml->setAutoloadImages( true );
m_khtml->widget()->installEventFilter(this);
- connect( m_khtml->view(), SIGNAL( finishedLayout() ), this, SLOT( restoreScrollPosition() ) );
+ connect( m_khtml->view(), TQT_SIGNAL( finishedLayout() ), this, TQT_SLOT( restoreScrollPosition() ) );
setWidget( box );
@@ -105,15 +105,15 @@ KHTMLImage::KHTMLImage( QWidget *parentWidget, const char *widgetName,
// forward opening requests to parent frame (if existing)
KHTMLPart *p = ::qt_cast<KHTMLPart *>(parent);
KParts::BrowserExtension *be = p ? p->browserExtension() : m_ext;
- connect(m_khtml->browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)),
- be, SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)));
+ connect(m_khtml->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)),
+ be, TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)));
- connect( m_khtml->browserExtension(), SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &,
- const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t) ), m_ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &,
+ connect( m_khtml->browserExtension(), TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,
+ const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t) ), m_ext, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,
const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t) ) );
- connect( m_khtml->browserExtension(), SIGNAL( enableAction( const char *, bool ) ),
- m_ext, SIGNAL( enableAction( const char *, bool ) ) );
+ connect( m_khtml->browserExtension(), TQT_SIGNAL( enableAction( const char *, bool ) ),
+ m_ext, TQT_SIGNAL( enableAction( const char *, bool ) ) );
m_ext->setURLDropHandlingEnabled( true );
}
@@ -135,7 +135,7 @@ KHTMLImage::~KHTMLImage()
bool KHTMLImage::openURL( const KURL &url )
{
- static const QString &html = KGlobal::staticQString( "<html><body><img src=\"%1\"></body></html>" );
+ static const TQString &html = KGlobal::staticQString( "<html><body><img src=\"%1\"></body></html>" );
disposeImage();
@@ -169,8 +169,8 @@ bool KHTMLImage::openURL( const KURL &url )
m_khtml->end();
/*
- connect( khtml::Cache::loader(), SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
- this, SLOT( updateWindowCaption() ) );
+ connect( khtml::Cache::loader(), TQT_SIGNAL( requestDone( khtml::DocLoader*, khtml::CachedObject *) ),
+ this, TQT_SLOT( updateWindowCaption() ) );
*/
return true;
}
@@ -187,8 +187,8 @@ void KHTMLImage::notifyFinished( khtml::CachedObject *o )
if ( !m_image || o != m_image )
return;
- const QPixmap &pix = m_image->pixmap();
- QString caption;
+ const TQPixmap &pix = m_image->pixmap();
+ TQString caption;
KMimeType::Ptr mimeType;
if ( !m_mimeType.isEmpty() )
@@ -242,7 +242,7 @@ void KHTMLImage::slotImageJobFinished( KIO::Job *job )
else
{
emit completed();
- QTimer::singleShot( 0, this, SLOT( updateWindowCaption() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateWindowCaption() ) );
}
}
@@ -267,9 +267,9 @@ void KHTMLImage::updateWindowCaption()
if ( !renderImage )
return;
- QPixmap pix = renderImage->pixmap();
+ TQPixmap pix = renderImage->pixmap();
- QString caption;
+ TQString caption;
KMimeType::Ptr mimeType;
if ( !m_mimeType.isEmpty() )
@@ -296,20 +296,20 @@ void KHTMLImage::disposeImage()
m_image = 0;
}
-bool KHTMLImage::eventFilter(QObject *, QEvent *e) {
+bool KHTMLImage::eventFilter(TQObject *, TQEvent *e) {
switch (e->type()) {
- case QEvent::DragEnter:
- case QEvent::DragMove:
- case QEvent::DragLeave:
- case QEvent::Drop: {
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
+ case TQEvent::DragLeave:
+ case TQEvent::Drop: {
// find out if this part is embedded in a frame, and send the
// event to its outside widget
KHTMLPart *p = ::qt_cast<KHTMLPart *>(parent());
if (p)
- return QApplication::sendEvent(p->widget(), e);
+ return TQApplication::sendEvent(p->widget(), e);
// otherwise simply forward all dnd events to the part widget,
// konqueror will handle them properly there
- return QApplication::sendEvent(widget(), e);
+ return TQApplication::sendEvent(widget(), e);
}
default: ;
}
diff --git a/khtml/khtmlimage.h b/khtml/khtmlimage.h
index 9887c827a..dda918177 100644
--- a/khtml/khtmlimage.h
+++ b/khtml/khtmlimage.h
@@ -44,9 +44,9 @@ public:
KHTMLImageFactory();
virtual ~KHTMLImageFactory();
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className, const QStringList &args );
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className, const TQStringList &args );
static KInstance *instance() { return s_instance; }
@@ -61,8 +61,8 @@ class KHTMLImage : public KParts::ReadOnlyPart, public khtml::CachedObjectClient
{
Q_OBJECT
public:
- KHTMLImage( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, KHTMLPart::GUIProfile prof );
+ KHTMLImage( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, KHTMLPart::GUIProfile prof );
virtual ~KHTMLImage();
virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
@@ -77,7 +77,7 @@ public:
protected:
virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
- virtual bool eventFilter( QObject *filterTarget, QEvent *e );
+ virtual bool eventFilter( TQObject *filterTarget, TQEvent *e );
private slots:
void restoreScrollPosition();
@@ -88,9 +88,9 @@ private slots:
private:
void disposeImage();
- QGuardedPtr<KHTMLPart> m_khtml;
+ TQGuardedPtr<KHTMLPart> m_khtml;
KParts::BrowserExtension *m_ext;
- QString m_mimeType;
+ TQString m_mimeType;
khtml::CachedImage *m_image;
int m_xOffset, m_yOffset;
};
diff --git a/khtml/khtmlpart_p.h b/khtml/khtmlpart_p.h
index ed507de89..0047dde54 100644
--- a/khtml/khtmlpart_p.h
+++ b/khtml/khtmlpart_p.h
@@ -37,10 +37,10 @@
#include <kwallet.h>
#endif
-#include <qguardedptr.h>
-#include <qmap.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
#include "html/html_formimpl.h"
#include "khtml_run.h"
@@ -78,7 +78,7 @@ namespace khtml
public:
enum Type { Frame, IFrame, Object };
- ChildFrame() : QObject (0L, "khtml_child_frame") {
+ ChildFrame() : TQObject (0L, "khtml_child_frame") {
m_jscript = 0L;
m_kjs_lib = 0;
m_bCompleted = false; m_bPreloaded = false; m_type = Frame; m_bNotify = false;
@@ -92,33 +92,33 @@ namespace khtml
m_kjs_lib->unload();
}
- QGuardedPtr<khtml::RenderPart> m_frame;
- QGuardedPtr<KParts::ReadOnlyPart> m_part;
- QGuardedPtr<KParts::BrowserExtension> m_extension;
- QGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
- QString m_serviceName;
- QString m_serviceType;
+ TQGuardedPtr<khtml::RenderPart> m_frame;
+ TQGuardedPtr<KParts::ReadOnlyPart> m_part;
+ TQGuardedPtr<KParts::BrowserExtension> m_extension;
+ TQGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
+ TQString m_serviceName;
+ TQString m_serviceType;
KJSProxy *m_jscript;
KLibrary *m_kjs_lib;
bool m_bCompleted;
- QString m_name;
+ TQString m_name;
KParts::URLArgs m_args;
- QGuardedPtr<KHTMLRun> m_run;
+ TQGuardedPtr<KHTMLRun> m_run;
bool m_bPreloaded;
KURL m_workingURL;
Type m_type;
- QStringList m_params;
+ TQStringList m_params;
bool m_bNotify;
bool m_bPendingRedirection;
protected slots:
- void liveConnectEvent(const unsigned long, const QString&, const KParts::LiveConnectExtension::ArgList&);
+ void liveConnectEvent(const unsigned long, const TQString&, const KParts::LiveConnectExtension::ArgList&);
};
}
-struct KHTMLFrameList : public QValueList<khtml::ChildFrame*>
+struct KHTMLFrameList : public TQValueList<khtml::ChildFrame*>
{
- Iterator find( const QString &name ) KDE_NO_EXPORT;
+ Iterator find( const TQString &name ) KDE_NO_EXPORT;
};
typedef KHTMLFrameList::ConstIterator ConstFrameIt;
@@ -131,7 +131,7 @@ class KHTMLWalletQueue : public QObject
{
Q_OBJECT
public:
- KHTMLWalletQueue(QObject *parent) : QObject(parent) {
+ KHTMLWalletQueue(TQObject *parent) : TQObject(parent) {
#ifndef KHTML_NO_WALLET
wallet = 0L;
#endif // KHTML_NO_WALLET
@@ -146,10 +146,10 @@ class KHTMLWalletQueue : public QObject
#ifndef KHTML_NO_WALLET
KWallet::Wallet *wallet;
#endif // KHTML_NO_WALLET
- typedef QPair<DOM::HTMLFormElementImpl*, QGuardedPtr<DOM::DocumentImpl> > Caller;
- typedef QValueList<Caller> CallerList;
+ typedef QPair<DOM::HTMLFormElementImpl*, TQGuardedPtr<DOM::DocumentImpl> > Caller;
+ typedef TQValueList<Caller> CallerList;
CallerList callers;
- QValueList<QPair<QString, QMap<QString, QString> > > savers;
+ TQValueList<QPair<TQString, TQMap<TQString, TQString> > > savers;
signals:
void walletOpened(KWallet::Wallet*);
@@ -172,7 +172,7 @@ class KHTMLWalletQueue : public QObject
}
}
wallet->setFolder(KWallet::Wallet::FormDataFolder());
- for (QValueList<QPair<QString, QMap<QString, QString> > >::Iterator i = savers.begin(); i != savers.end(); ++i) {
+ for (TQValueList<QPair<TQString, TQMap<TQString, TQString> > >::Iterator i = savers.begin(); i != savers.end(); ++i) {
wallet->writeMap((*i).first, (*i).second);
}
}
@@ -188,7 +188,7 @@ class KHTMLPartPrivate
KHTMLPartPrivate(const KHTMLPartPrivate & other);
KHTMLPartPrivate& operator=(const KHTMLPartPrivate&);
public:
- KHTMLPartPrivate(QObject* parent)
+ KHTMLPartPrivate(TQObject* parent)
{
m_doc = 0L;
m_decoder = 0L;
@@ -303,11 +303,11 @@ public:
#endif
}
- QGuardedPtr<khtml::ChildFrame> m_frame;
+ TQGuardedPtr<khtml::ChildFrame> m_frame;
KHTMLFrameList m_frames;
KHTMLFrameList m_objects;
- QGuardedPtr<KHTMLView> m_view;
+ TQGuardedPtr<KHTMLView> m_view;
KHTMLPartBrowserExtension *m_extension;
KParts::StatusBarExtension *m_statusBarExtension;
KHTMLPartBrowserHostExtension *m_hostExtension;
@@ -316,14 +316,14 @@ public:
KURLLabel* m_statusBarUALabel;
KURLLabel* m_statusBarJSErrorLabel;
KURLLabel* m_statusBarPopupLabel;
- QValueList<QGuardedPtr<KHTMLPart> > m_suppressedPopupOriginParts;
+ TQValueList<TQGuardedPtr<KHTMLPart> > m_suppressedPopupOriginParts;
int m_openableSuppressedPopups;
DOM::DocumentImpl *m_doc;
khtml::Decoder *m_decoder;
- QString m_encoding;
- QString m_sheetUsed;
+ TQString m_encoding;
+ TQString m_sheetUsed;
long m_cacheId;
- QString scheduledScript;
+ TQString scheduledScript;
DOM::Node scheduledScriptNode;
KWallet::Wallet* m_wallet;
@@ -358,16 +358,16 @@ public:
KIO::TransferJob * m_job;
- QString m_statusBarText[3];
+ TQString m_statusBarText[3];
unsigned long m_jobspeed;
- QString m_lastModified;
- QString m_httpHeaders;
- QString m_pageServices;
+ TQString m_lastModified;
+ TQString m_httpHeaders;
+ TQString m_pageServices;
// QStrings for SSL metadata
// Note: When adding new variables don't forget to update ::saveState()/::restoreState()!
bool m_ssl_in_use;
- QString m_ssl_peer_certificate,
+ TQString m_ssl_peer_certificate,
m_ssl_peer_chain,
m_ssl_peer_ip,
m_ssl_cipher,
@@ -388,10 +388,10 @@ public:
KURL m_workingURL;
KIO::CacheControl m_cachePolicy;
- QTimer m_redirectionTimer;
- QTime m_parsetime;
+ TQTimer m_redirectionTimer;
+ TQTime m_parsetime;
int m_delayRedirect;
- QString m_redirectURL;
+ TQString m_redirectURL;
KAction *m_paViewDocument;
KAction *m_paViewFrame;
@@ -420,24 +420,24 @@ public:
KParts::PartManager *m_manager;
- QString m_popupMenuXML;
+ TQString m_popupMenuXML;
KHTMLPart::GUIProfile m_guiProfile;
int m_zoomFactor;
- QString m_strSelectedURL;
- QString m_strSelectedURLTarget;
- QString m_referrer;
- QString m_pageReferrer;
+ TQString m_strSelectedURL;
+ TQString m_strSelectedURLTarget;
+ TQString m_referrer;
+ TQString m_pageReferrer;
struct SubmitForm
{
const char *submitAction;
- QString submitUrl;
- QByteArray submitFormData;
- QString target;
- QString submitContentType;
- QString submitBoundary;
+ TQString submitUrl;
+ TQByteArray submitFormData;
+ TQString target;
+ TQString submitContentType;
+ TQString submitBoundary;
};
SubmitForm *m_submitForm;
@@ -460,8 +460,8 @@ public:
long m_endOffset;
DOM::Node m_initialNode; // (Node, Offset) pair on which the
long m_initialOffset; // selection has been initiated
- QString m_overURL;
- QString m_overURLTarget;
+ TQString m_overURL;
+ TQString m_overURLTarget;
bool m_startBeforeEnd;
bool m_extendAtEnd; // true if selection is to be extended at its end
@@ -475,25 +475,25 @@ public:
int m_focusNodeNumber;
- QPoint m_dragStartPos;
+ TQPoint m_dragStartPos;
#ifdef KHTML_NO_SELECTION
- QPoint m_dragLastPos;
+ TQPoint m_dragLastPos;
#endif
bool m_designMode;
bool m_caretMode;
- QCursor m_linkCursor;
- QTimer m_scrollTimer;
+ TQCursor m_linkCursor;
+ TQTimer m_scrollTimer;
unsigned long m_loadedObjects;
unsigned long m_totalObjectCount;
unsigned int m_jobPercent;
KHTMLPart::FormNotification m_formNotification;
- QTimer m_progressUpdateTimer;
+ TQTimer m_progressUpdateTimer;
- QStringList m_pluginPageQuestionAsked;
+ TQStringList m_pluginPageQuestionAsked;
/////////// 'Find' feature
struct StringPortion
@@ -514,7 +514,7 @@ public:
int index;
DOM::NodeImpl *node;
};
- QValueList<StringPortion> m_stringPortions;
+ TQValueList<StringPortion> m_stringPortions;
KFind *m_find;
KFindDialog *m_findDialog;
@@ -522,8 +522,8 @@ public:
struct findState
{
findState() : options( 0 ), last_dir( -1 ) {}
- QStringList history;
- QString text;
+ TQStringList history;
+ TQString text;
int options;
int last_dir; // -1=unknown,0=forward,1=backward
};
@@ -541,9 +541,9 @@ public:
int m_findPosStart; // pos in start node
/////////
- //QGuardedPtr<KParts::Part> m_activeFrame;
+ //TQGuardedPtr<KParts::Part> m_activeFrame;
KParts::Part * m_activeFrame;
- QGuardedPtr<KHTMLPart> m_opener;
+ TQGuardedPtr<KHTMLPart> m_opener;
bool m_openedByJS;
bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open
diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp
index 376b65cc3..1f6efd199 100644
--- a/khtml/khtmlview.cpp
+++ b/khtml/khtmlview.cpp
@@ -76,17 +76,17 @@
#include <kstringhandler.h>
#include <kurldrag.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qobjectlist.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qptrdict.h>
-#include <qtooltip.h>
-#include <qstring.h>
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqobjectlist.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqptrdict.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
//#define DEBUG_NO_PAINT_BUFFER
@@ -117,14 +117,14 @@ class KHTMLToolTip;
class KHTMLToolTip : public QToolTip
{
public:
- KHTMLToolTip(KHTMLView *view, KHTMLViewPrivate* vp) : QToolTip(view->viewport())
+ KHTMLToolTip(KHTMLView *view, KHTMLViewPrivate* vp) : TQToolTip(view->viewport())
{
m_view = view;
m_viewprivate = vp;
};
protected:
- virtual void maybeTip(const QPoint &);
+ virtual void maybeTip(const TQPoint &);
private:
KHTMLView *m_view;
@@ -158,8 +158,8 @@ public:
#endif // KHTML_NO_CARET
postponed_autorepeat = NULL;
reset();
- vmode = QScrollView::Auto;
- hmode = QScrollView::Auto;
+ vmode = TQScrollView::Auto;
+ hmode = TQScrollView::Auto;
tp=0;
paintBuffer=0;
vertPaintBuffer=0;
@@ -211,8 +211,8 @@ public:
//off, then chances are they want them turned
//off always - even after a reset.
#else
- vmode = QScrollView::AlwaysOff;
- hmode = QScrollView::AlwaysOff;
+ vmode = TQScrollView::AlwaysOff;
+ hmode = TQScrollView::AlwaysOff;
#endif
#ifdef DEBUG_PIXEL
timer.start();
@@ -245,7 +245,7 @@ public:
dirtyLayout = false;
layoutSchedulingEnabled = true;
painting = false;
- updateRegion = QRegion();
+ updateRegion = TQRegion();
m_dialogsAllowed = true;
#ifndef KHTML_NO_CARET
if (m_caretViewContext) {
@@ -266,7 +266,7 @@ public:
emitCompletedAfterRepaint = CSNone;
}
- void newScrollTimer(QWidget *view, int tid)
+ void newScrollTimer(TQWidget *view, int tid)
{
//kdDebug(6000) << "newScrollTimer timer " << tid << endl;
view->killTimer(scrollTimerId);
@@ -275,7 +275,7 @@ public:
}
enum ScrollDirection { ScrollLeft, ScrollRight, ScrollUp, ScrollDown };
- void adjustScroller(QWidget *view, ScrollDirection direction, ScrollDirection oppositedir)
+ void adjustScroller(TQWidget *view, ScrollDirection direction, ScrollDirection oppositedir)
{
static const struct { int msec, pixels; } timings [] = {
{320,1}, {224,1}, {160,1}, {112,1}, {80,1}, {56,1}, {40,1},
@@ -319,14 +319,14 @@ public:
#endif // KHTML_NO_CARET
#ifdef DEBUG_PIXEL
- QTime timer;
+ TQTime timer;
unsigned int pixelbooth;
unsigned int repaintbooth;
#endif
- QPainter *tp;
- QPixmap *paintBuffer;
- QPixmap *vertPaintBuffer;
+ TQPainter *tp;
+ TQPixmap *paintBuffer;
+ TQPixmap *vertPaintBuffer;
NodeImpl *underMouse;
NodeImpl *underMouseNonShared;
@@ -336,8 +336,8 @@ public:
bool scrollBarMoved:1;
bool contentsMoving:1;
- QScrollView::ScrollBarMode vmode;
- QScrollView::ScrollBarMode hmode;
+ TQScrollView::ScrollBarMode vmode;
+ TQScrollView::ScrollBarMode hmode;
bool prevScrollbarVisible:1;
bool linkPressed:1;
bool useSlowRepaints:1;
@@ -354,7 +354,7 @@ public:
int prevMouseX, prevMouseY;
bool scrollingSelf;
int layoutTimerId;
- QKeyEvent* postponed_autorepeat;
+ TQKeyEvent* postponed_autorepeat;
int repaintTimerId;
int scrollTimerId;
@@ -371,16 +371,16 @@ public:
bool possibleTripleClick :1;
bool dirtyLayout :1;
bool m_dialogsAllowed :1;
- QRegion updateRegion;
+ TQRegion updateRegion;
KHTMLToolTip *tooltip;
- QPtrDict<QWidget> visibleWidgets;
+ TQPtrDict<TQWidget> visibleWidgets;
#ifndef KHTML_NO_CARET
CaretViewContext *m_caretViewContext;
EditorContext *m_editorContext;
#endif // KHTML_NO_CARET
#ifndef KHTML_NO_TYPE_AHEAD_FIND
- QString findString;
- QTimer timer;
+ TQString findString;
+ TQTimer timer;
bool findLinksOnly;
bool typeAheadActivated;
#endif // KHTML_NO_TYPE_AHEAD_FIND
@@ -389,13 +389,13 @@ public:
bool accessKeysPreActivate;
CompletedState emitCompletedAfterRepaint;
- QWidget* cursor_icon_widget;
+ TQWidget* cursor_icon_widget;
// scrolling activated by MMB
short m_mouseScroll_byX;
short m_mouseScroll_byY;
- QTimer *m_mouseScrollTimer;
- QWidget *m_mouseScrollIndicator;
+ TQTimer *m_mouseScrollTimer;
+ TQWidget *m_mouseScrollIndicator;
};
#ifndef QT_NO_TOOLTIP
@@ -409,8 +409,8 @@ public:
* @return true if an appropriate area was found -- only in this case r and
* s are valid, false otherwise
*/
-static bool findImageMapRect(HTMLImageElementImpl *img, const QPoint &scrollOfs,
- const QPoint &p, QRect &r, QString &s)
+static bool findImageMapRect(HTMLImageElementImpl *img, const TQPoint &scrollOfs,
+ const TQPoint &p, TQRect &r, TQString &s)
{
HTMLMapElementImpl* map;
if (img && img->getDocument()->isHTMLDocument() &&
@@ -428,7 +428,7 @@ static bool findImageMapRect(HTMLImageElementImpl *img, const QPoint &scrollOfs,
HTMLAreaElementImpl *area = static_cast<HTMLAreaElementImpl *>(info.URLElement());
Q_ASSERT(area->id() == ID_AREA);
s = area->getAttribute(ATTR_TITLE).string();
- QRegion reg = area->cachedRegion();
+ TQRegion reg = area->cachedRegion();
if (!s.isEmpty() && !reg.isEmpty()) {
r = reg.boundingRect();
r.moveBy(ax, ay);
@@ -439,29 +439,29 @@ static bool findImageMapRect(HTMLImageElementImpl *img, const QPoint &scrollOfs,
return false;
}
-void KHTMLToolTip::maybeTip(const QPoint& p)
+void KHTMLToolTip::maybeTip(const TQPoint& p)
{
DOM::NodeImpl *node = m_viewprivate->underMouseNonShared;
- QRect region;
+ TQRect region;
while ( node ) {
if ( node->isElementNode() ) {
DOM::ElementImpl *e = static_cast<DOM::ElementImpl*>( node );
- QRect r;
- QString s;
+ TQRect r;
+ TQString s;
bool found = false;
// for images, check if it is part of a client-side image map,
// and query the <area>s' title attributes, too
if (e->id() == ID_IMG && !e->getAttribute( ATTR_USEMAP ).isEmpty()) {
found = findImageMapRect(static_cast<HTMLImageElementImpl *>(e),
- m_view->viewportToContents(QPoint(0, 0)), p, r, s);
+ m_view->viewportToContents(TQPoint(0, 0)), p, r, s);
}
if (!found) {
s = e->getAttribute( ATTR_TITLE ).string();
r = node->getRect();
}
- region |= QRect( m_view->contentsToViewport( r.topLeft() ), r.size() );
+ region |= TQRect( m_view->contentsToViewport( r.topLeft() ), r.size() );
if ( !s.isEmpty() ) {
- tip( region, QStyleSheet::convertFromPlainText( s, QStyleSheetItem::WhiteSpaceNormal ) );
+ tip( region, TQStyleSheet::convertFromPlainText( s, TQStyleSheetItem::WhiteSpaceNormal ) );
break;
}
}
@@ -470,22 +470,22 @@ void KHTMLToolTip::maybeTip(const QPoint& p)
}
#endif
-KHTMLView::KHTMLView( KHTMLPart *part, QWidget *parent, const char *name)
- : QScrollView( parent, name, WResizeNoErase | WRepaintNoErase )
+KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name)
+ : TQScrollView( parent, name, WResizeNoErase | WRepaintNoErase )
{
m_medium = "screen";
m_part = part;
d = new KHTMLViewPrivate;
- QScrollView::setVScrollBarMode(d->vmode);
- QScrollView::setHScrollBarMode(d->hmode);
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(slotPaletteChanged()));
- connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotScrollBarMoved()));
+ TQScrollView::setVScrollBarMode(d->vmode);
+ TQScrollView::setHScrollBarMode(d->hmode);
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(slotPaletteChanged()));
+ connect(this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotScrollBarMoved()));
// initialize QScrollView
enableClipper(true);
// hack to get unclipped painting on the viewport.
- static_cast<KHTMLView *>(static_cast<QWidget *>(viewport()))->setWFlags(WPaintUnclipped);
+ static_cast<KHTMLView *>(static_cast<TQWidget *>(viewport()))->setWFlags(WPaintUnclipped);
setResizePolicy(Manual);
viewport()->setMouseTracking(true);
@@ -498,7 +498,7 @@ KHTMLView::KHTMLView( KHTMLPart *part, QWidget *parent, const char *name)
#endif
#ifndef KHTML_NO_TYPE_AHEAD_FIND
- connect(&d->timer, SIGNAL(timeout()), this, SLOT(findTimeout()));
+ connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(findTimeout()));
#endif // KHTML_NO_TYPE_AHEAD_FIND
init();
@@ -522,12 +522,12 @@ KHTMLView::~KHTMLView()
void KHTMLView::init()
{
- if(!d->paintBuffer) d->paintBuffer = new QPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT);
+ if(!d->paintBuffer) d->paintBuffer = new TQPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT);
if(!d->vertPaintBuffer)
- d->vertPaintBuffer = new QPixmap(10, PAINT_BUFFER_HEIGHT);
- if(!d->tp) d->tp = new QPainter();
+ d->vertPaintBuffer = new TQPixmap(10, PAINT_BUFFER_HEIGHT);
+ if(!d->tp) d->tp = new TQPainter();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
viewport()->setFocusProxy(this);
_marginWidth = -1; // undefined
@@ -538,7 +538,7 @@ void KHTMLView::init()
installEventFilter(this);
setAcceptDrops(true);
- QSize s = viewportSize(4095, 4095);
+ TQSize s = viewportSize(4095, 4095);
resizeContents(s.width(), s.height());
}
@@ -563,27 +563,27 @@ void KHTMLView::clear()
killTimers();
emit cleared();
- QScrollView::setHScrollBarMode(d->hmode);
- QScrollView::setVScrollBarMode(d->vmode);
+ TQScrollView::setHScrollBarMode(d->hmode);
+ TQScrollView::setVScrollBarMode(d->vmode);
verticalScrollBar()->setEnabled( false );
horizontalScrollBar()->setEnabled( false );
}
-void KHTMLView::hideEvent(QHideEvent* e)
+void KHTMLView::hideEvent(TQHideEvent* e)
{
- QScrollView::hideEvent(e);
+ TQScrollView::hideEvent(e);
if ( m_part && m_part->xmlDocImpl() )
m_part->xmlDocImpl()->docLoader()->pauseAnimations();
}
-void KHTMLView::showEvent(QShowEvent* e)
+void KHTMLView::showEvent(TQShowEvent* e)
{
- QScrollView::showEvent(e);
+ TQScrollView::showEvent(e);
if ( m_part && m_part->xmlDocImpl() )
m_part->xmlDocImpl()->docLoader()->resumeAnimations();
}
-void KHTMLView::resizeEvent (QResizeEvent* e)
+void KHTMLView::resizeEvent (TQResizeEvent* e)
{
int dw = e->oldSize().width() - e->size().width();
int dh = e->oldSize().height() - e->size().height();
@@ -595,15 +595,15 @@ void KHTMLView::resizeEvent (QResizeEvent* e)
resizeContents(dw, dh);
- QScrollView::resizeEvent(e);
+ TQScrollView::resizeEvent(e);
if ( m_part && m_part->xmlDocImpl() )
m_part->xmlDocImpl()->dispatchWindowEvent( EventImpl::RESIZE_EVENT, false, false );
}
-void KHTMLView::viewportResizeEvent (QResizeEvent* e)
+void KHTMLView::viewportResizeEvent (TQResizeEvent* e)
{
- QScrollView::viewportResizeEvent(e);
+ TQScrollView::viewportResizeEvent(e);
//int w = visibleWidth();
//int h = visibleHeight();
@@ -618,15 +618,15 @@ void KHTMLView::viewportResizeEvent (QResizeEvent* e)
}/*end if*/
#endif
- KApplication::sendPostedEvents(viewport(), QEvent::Paint);
+ KApplication::sendPostedEvents(viewport(), TQEvent::Paint);
}
// this is to get rid of a compiler virtual overload mismatch warning. do not remove
-void KHTMLView::drawContents( QPainter*)
+void KHTMLView::drawContents( TQPainter*)
{
}
-void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
+void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
{
#ifdef DEBUG_PIXEL
@@ -643,7 +643,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
//kdDebug( 6000 ) << "drawContents this="<< this <<" x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
if(!m_part || !m_part->xmlDocImpl() || !m_part->xmlDocImpl()->renderer()) {
- p->fillRect(ex, ey, ew, eh, palette().active().brush(QColorGroup::Base));
+ p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
return;
} else if ( d->complete && static_cast<RenderCanvas*>(m_part->xmlDocImpl()->renderer())->needsLayout() ) {
// an external update request happens while we have a layout scheduled
@@ -657,12 +657,12 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
}
d->painting = true;
- QPoint pt = contentsToViewport(QPoint(ex, ey));
- QRegion cr = QRect(pt.x(), pt.y(), ew, eh);
+ TQPoint pt = contentsToViewport(TQPoint(ex, ey));
+ TQRegion cr = TQRect(pt.x(), pt.y(), ew, eh);
- // kdDebug(6000) << "clip rect: " << QRect(pt.x(), pt.y(), ew, eh) << endl;
- for (QPtrDictIterator<QWidget> it(d->visibleWidgets); it.current(); ++it) {
- QWidget *w = it.current();
+ // kdDebug(6000) << "clip rect: " << TQRect(pt.x(), pt.y(), ew, eh) << endl;
+ for (TQPtrDictIterator<TQWidget> it(d->visibleWidgets); it.current(); ++it) {
+ TQWidget *w = it.current();
RenderWidget* rw = static_cast<RenderWidget*>( it.currentKey() );
if (w && rw && !rw->isKHTMLWidget()) {
int x, y;
@@ -670,19 +670,19 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
contentsToViewport(x, y, x, y);
int pbx = rw->borderLeft()+rw->paddingLeft();
int pby = rw->borderTop()+rw->paddingTop();
- QRect g = QRect(x+pbx, y+pby,
+ TQRect g = TQRect(x+pbx, y+pby,
rw->width()-pbx-rw->borderRight()-rw->paddingRight(),
rw->height()-pby-rw->borderBottom()-rw->paddingBottom());
if ( !rw->isFrame() && ((g.top() > pt.y()+eh) || (g.bottom() <= pt.y()) ||
(g.right() <= pt.x()) || (g.left() > pt.x()+ew) ))
continue;
RenderLayer* rl = rw->needsMask() ? rw->enclosingStackingContext() : 0;
- QRegion mask = rl ? rl->getMask() : QRegion();
+ TQRegion mask = rl ? rl->getMask() : TQRegion();
if (!mask.isNull()) {
- QPoint o(0,0);
+ TQPoint o(0,0);
o = contentsToViewport(o);
mask.translate(o.x(),o.y());
- mask = mask.intersect( QRect(g.x(),g.y(),g.width(),g.height()) );
+ mask = mask.intersect( TQRect(g.x(),g.y(),g.width(),g.height()) );
cr -= mask;
} else {
cr -= g;
@@ -707,8 +707,8 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
d->vertPaintBuffer->resize(10, visibleHeight());
d->tp->begin(d->vertPaintBuffer);
d->tp->translate(-ex, -ey);
- d->tp->fillRect(ex, ey, ew, eh, palette().active().brush(QColorGroup::Base));
- m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, QRect(ex, ey, ew, eh));
+ d->tp->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
+ m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey, ew, eh));
d->tp->end();
p->drawPixmap(ex, ey, *d->vertPaintBuffer, 0, 0, ew, eh);
}
@@ -721,8 +721,8 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
d->tp->begin(d->paintBuffer);
d->tp->translate(-ex, -ey-py);
- d->tp->fillRect(ex, ey+py, ew, ph, palette().active().brush(QColorGroup::Base));
- m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, QRect(ex, ey+py, ew, ph));
+ d->tp->fillRect(ex, ey+py, ew, ph, palette().active().brush(TQColorGroup::Base));
+ m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey+py, ew, ph));
d->tp->end();
p->drawPixmap(ex, ey+py, *d->paintBuffer, 0, 0, ew, ph);
@@ -733,19 +733,19 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
static int cnt=0;
ex = contentsX(); ey = contentsY();
ew = visibleWidth(); eh = visibleHeight();
- QRect pr(ex,ey,ew,eh);
+ TQRect pr(ex,ey,ew,eh);
kdDebug() << "[" << ++cnt << "]" << " clip region: " << pr << endl;
-// p->setClipRegion(QRect(0,0,ew,eh));
+// p->setClipRegion(TQRect(0,0,ew,eh));
// p->translate(-ex, -ey);
- p->fillRect(ex, ey, ew, eh, palette().active().brush(QColorGroup::Base));
+ p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr);
#endif // DEBUG_NO_PAINT_BUFFER
#ifndef KHTML_NO_CARET
if (d->m_caretViewContext && d->m_caretViewContext->visible) {
- QRect pos(d->m_caretViewContext->x, d->m_caretViewContext->y,
+ TQRect pos(d->m_caretViewContext->x, d->m_caretViewContext->y,
d->m_caretViewContext->width, d->m_caretViewContext->height);
- if (pos.intersects(QRect(ex, ey, ew, eh))) {
+ if (pos.intersects(TQRect(ex, ey, ew, eh))) {
p->setRasterOp(XorROP);
p->setPen(white);
if (pos.width() == 1)
@@ -757,11 +757,11 @@ static int cnt=0;
}/*end if*/
#endif // KHTML_NO_CARET
-// p->setPen(QPen(magenta,0,DashDotDotLine));
+// p->setPen(TQPen(magenta,0,DashDotDotLine));
// p->drawRect(dbg_paint_rect);
khtml::DrawContentsEvent event( p, ex, ey, ew, eh );
- QApplication::sendEvent( m_part, &event );
+ TQApplication::sendEvent( m_part, &event );
d->painting = false;
}
@@ -795,8 +795,8 @@ void KHTMLView::layout()
if (document->isHTMLDocument()) {
NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
if(body && body->renderer() && body->id() == ID_FRAMESET) {
- QScrollView::setVScrollBarMode(AlwaysOff);
- QScrollView::setHScrollBarMode(AlwaysOff);
+ TQScrollView::setVScrollBarMode(AlwaysOff);
+ TQScrollView::setHScrollBarMode(AlwaysOff);
body->renderer()->setNeedsLayout(true);
// if (d->tooltip) {
// delete d->tooltip;
@@ -815,17 +815,17 @@ void KHTMLView::layout()
}
if (ref) {
if( ref->style()->overflowX() == OHIDDEN ) {
- if (d->hmode == Auto) QScrollView::setHScrollBarMode(AlwaysOff);
+ if (d->hmode == Auto) TQScrollView::setHScrollBarMode(AlwaysOff);
} else if (ref->style()->overflowX() == OSCROLL ) {
- if (d->hmode == Auto) QScrollView::setHScrollBarMode(AlwaysOn);
+ if (d->hmode == Auto) TQScrollView::setHScrollBarMode(AlwaysOn);
} else {
- if (QScrollView::hScrollBarMode() == AlwaysOff) QScrollView::setHScrollBarMode(d->hmode);
+ if (TQScrollView::hScrollBarMode() == AlwaysOff) TQScrollView::setHScrollBarMode(d->hmode);
} if ( ref->style()->overflowY() == OHIDDEN ) {
- if (d->vmode == Auto) QScrollView::setVScrollBarMode(AlwaysOff);
+ if (d->vmode == Auto) TQScrollView::setVScrollBarMode(AlwaysOff);
} else if (ref->style()->overflowY() == OSCROLL ) {
- if (d->vmode == Auto) QScrollView::setVScrollBarMode(AlwaysOn);
+ if (d->vmode == Auto) TQScrollView::setVScrollBarMode(AlwaysOn);
} else {
- if (QScrollView::vScrollBarMode() == AlwaysOff) QScrollView::setVScrollBarMode(d->vmode);
+ if (TQScrollView::vScrollBarMode() == AlwaysOff) TQScrollView::setVScrollBarMode(d->vmode);
}
}
d->needsFullRepaint = d->firstRelayout;
@@ -834,7 +834,7 @@ void KHTMLView::layout()
_height = visibleHeight();
_width = visibleWidth();
}
- //QTime qt;
+ //TQTime qt;
//qt.start();
canvas->layout();
@@ -878,22 +878,22 @@ void KHTMLView::layout()
void KHTMLView::closeChildDialogs()
{
- QObjectList *dlgs = queryList("QDialog");
- for (QObject *dlg = dlgs->first(); dlg; dlg = dlgs->next())
+ TQObjectList *dlgs = queryList("TQDialog");
+ for (TQObject *dlg = dlgs->first(); dlg; dlg = dlgs->next())
{
KDialogBase* dlgbase = dynamic_cast<KDialogBase *>( dlg );
if ( dlgbase ) {
if ( dlgbase->testWFlags( WShowModal ) ) {
kdDebug(6000) << "closeChildDialogs: closing dialog " << dlgbase << endl;
- // close() ends up calling QButton::animateClick, which isn't immediate
+ // close() ends up calling TQButton::animateClick, which isn't immediate
// we need something the exits the event loop immediately (#49068)
dlgbase->cancel();
}
}
else
{
- kdWarning() << "closeChildDialogs: not a KDialogBase! Don't use QDialogs in KDE! " << static_cast<QWidget*>(dlg) << endl;
- static_cast<QWidget*>(dlg)->hide();
+ kdWarning() << "closeChildDialogs: not a KDialogBase! Don't use QDialogs in KDE! " << static_cast<TQWidget*>(dlg) << endl;
+ static_cast<TQWidget*>(dlg)->hide();
}
}
delete dlgs;
@@ -908,10 +908,10 @@ bool KHTMLView::dialogsAllowed() {
return allowed;
}
-void KHTMLView::closeEvent( QCloseEvent* ev )
+void KHTMLView::closeEvent( TQCloseEvent* ev )
{
closeChildDialogs();
- QScrollView::closeEvent( ev );
+ TQScrollView::closeEvent( ev );
}
//
@@ -919,7 +919,7 @@ void KHTMLView::closeEvent( QCloseEvent* ev )
//
/////////////////
-void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
+void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
{
if (!m_part->xmlDocImpl()) return;
if (d->possibleTripleClick && ( _mouse->button() & MouseButtonMask ) == LeftButton)
@@ -942,20 +942,20 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
if ( (_mouse->button() == MidButton) &&
!m_part->d->m_bOpenMiddleClick && !d->m_mouseScrollTimer &&
mev.url.isNull() && (mev.innerNode.elementId() != ID_INPUT) ) {
- QPoint point = mapFromGlobal( _mouse->globalPos() );
+ TQPoint point = mapFromGlobal( _mouse->globalPos() );
d->m_mouseScroll_byX = 0;
d->m_mouseScroll_byY = 0;
- d->m_mouseScrollTimer = new QTimer( this );
- connect( d->m_mouseScrollTimer, SIGNAL(timeout()), this, SLOT(slotMouseScrollTimer()) );
+ d->m_mouseScrollTimer = new TQTimer( this );
+ connect( d->m_mouseScrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotMouseScrollTimer()) );
if ( !d->m_mouseScrollIndicator ) {
- QPixmap pixmap, icon;
+ TQPixmap pixmap, icon;
pixmap.resize( 48, 48 );
- pixmap.fill( QColor( qRgba( 127, 127, 127, 127 ) ) );
+ pixmap.fill( TQColor( qRgba( 127, 127, 127, 127 ) ) );
- QPainter p( &pixmap );
+ TQPainter p( &pixmap );
icon = KGlobal::iconLoader()->loadIcon( "1uparrow", KIcon::Small );
p.drawPixmap( 16, 0, icon );
icon = KGlobal::iconLoader()->loadIcon( "1leftarrow", KIcon::Small );
@@ -966,7 +966,7 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
p.drawPixmap( 32, 16, icon );
p.drawEllipse( 23, 23, 2, 2 );
- d->m_mouseScrollIndicator = new QWidget( this, 0 );
+ d->m_mouseScrollIndicator = new TQWidget( this, 0 );
d->m_mouseScrollIndicator->setFixedSize( 48, 48 );
d->m_mouseScrollIndicator->setPaletteBackgroundPixmap( pixmap );
}
@@ -981,16 +981,16 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
d->m_mouseScrollIndicator->show();
d->m_mouseScrollIndicator->unsetCursor();
- QBitmap mask = d->m_mouseScrollIndicator->paletteBackgroundPixmap()->createHeuristicMask( true );
+ TQBitmap mask = d->m_mouseScrollIndicator->paletteBackgroundPixmap()->createHeuristicMask( true );
if ( hasHorBar && !hasVerBar ) {
- QBitmap bm( 16, 16, true );
+ TQBitmap bm( 16, 16, true );
bitBlt( &mask, 16, 0, &bm, 0, 0, -1, -1 );
bitBlt( &mask, 16, 32, &bm, 0, 0, -1, -1 );
d->m_mouseScrollIndicator->setCursor( KCursor::SizeHorCursor );
}
else if ( !hasHorBar && hasVerBar ) {
- QBitmap bm( 16, 16, true );
+ TQBitmap bm( 16, 16, true );
bitBlt( &mask, 0, 16, &bm, 0, 0, -1, -1 );
bitBlt( &mask, 32, 16, &bm, 0, 0, -1, -1 );
d->m_mouseScrollIndicator->setCursor( KCursor::SizeVerCursor );
@@ -1034,12 +1034,12 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
emit m_part->nodeActivated(mev.innerNode);
khtml::MousePressEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
- QApplication::sendEvent( m_part, &event );
+ TQApplication::sendEvent( m_part, &event );
// we might be deleted after this
}
}
-void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
+void KHTMLView::viewportMouseDoubleClickEvent( TQMouseEvent *_mouse )
{
if(!m_part->xmlDocImpl()) return;
@@ -1056,7 +1056,7 @@ void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
// We do the same thing as viewportMousePressEvent() here, since the DOM does not treat
// single and double-click events as separate (only the detail, i.e. number of clicks differs)
if (d->clickCount > 0 &&
- QPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= QApplication::startDragDistance())
+ TQPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= TQApplication::startDragDistance())
d->clickCount++;
else { // shouldn't happen, if Qt has the same criterias for double clicks.
d->clickCount = 1;
@@ -1072,11 +1072,11 @@ void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
if (!swallowEvent) {
khtml::MouseDoubleClickEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode, d->clickCount );
- QApplication::sendEvent( m_part, &event );
+ TQApplication::sendEvent( m_part, &event );
}
d->possibleTripleClick=true;
- QTimer::singleShot(QApplication::doubleClickInterval(),this,SLOT(tripleClickTimeout()));
+ TQTimer::singleShot(TQApplication::doubleClickInterval(),this,TQT_SLOT(tripleClickTimeout()));
}
void KHTMLView::tripleClickTimeout()
@@ -1085,23 +1085,23 @@ void KHTMLView::tripleClickTimeout()
d->clickCount = 0;
}
-static inline void forwardPeripheralEvent(khtml::RenderWidget* r, QMouseEvent* me, int x, int y)
+static inline void forwardPeripheralEvent(khtml::RenderWidget* r, TQMouseEvent* me, int x, int y)
{
int absx = 0;
int absy = 0;
r->absolutePosition(absx, absy);
- QPoint p(x-absx, y-absy);
- QMouseEvent fw(me->type(), p, me->button(), me->state());
- QWidget* w = r->widget();
- QScrollView* sc = ::qt_cast<QScrollView*>(w);
- if (sc && !::qt_cast<QListBox*>(w))
+ TQPoint p(x-absx, y-absy);
+ TQMouseEvent fw(me->type(), p, me->button(), me->state());
+ TQWidget* w = r->widget();
+ TQScrollView* sc = ::qt_cast<TQScrollView*>(w);
+ if (sc && !::qt_cast<TQListBox*>(w))
static_cast<khtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(&fw);
else if(w)
static_cast<khtml::RenderWidget::EventPropagator*>(w)->sendEvent(&fw);
}
-static bool targetOpensNewWindow(KHTMLPart *part, QString target)
+static bool targetOpensNewWindow(KHTMLPart *part, TQString target)
{
if (!target.isEmpty() && (target.lower() != "_top") &&
(target.lower() != "_self") && (target.lower() != "_parent")) {
@@ -1117,10 +1117,10 @@ static bool targetOpensNewWindow(KHTMLPart *part, QString target)
return false;
}
-void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
+void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
{
if ( d->m_mouseScrollTimer ) {
- QPoint point = mapFromGlobal( _mouse->globalPos() );
+ TQPoint point = mapFromGlobal( _mouse->globalPos() );
int deltaX = point.x() - d->m_mouseScrollIndicator->x() - 24;
int deltaY = point.y() - d->m_mouseScrollIndicator->y() - 24;
@@ -1159,7 +1159,7 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
0,_mouse,true,DOM::NodeImpl::MouseMove);
if (d->clickCount > 0 &&
- QPoint(d->clickX-xm,d->clickY-ym).manhattanLength() > QApplication::startDragDistance()) {
+ TQPoint(d->clickX-xm,d->clickY-ym).manhattanLength() > TQApplication::startDragDistance()) {
d->clickCount = 0; // moving the mouse outside the threshold invalidates the click
}
@@ -1174,7 +1174,7 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
khtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : 0;
khtml::RenderStyle* style = (r && r->style()) ? r->style() : 0;
- QCursor c;
+ TQCursor c;
bool mailtoCursor = false;
bool newWindowCursor = false;
switch ( style ? style->cursor() : CURSOR_AUTO) {
@@ -1190,7 +1190,7 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
}
if (r && r->isFrameSet() && !static_cast<RenderFrameSet*>(r)->noResize())
- c = QCursor(static_cast<RenderFrameSet*>(r)->cursorShape());
+ c = TQCursor(static_cast<RenderFrameSet*>(r)->cursorShape());
break;
case CURSOR_CROSS:
@@ -1250,10 +1250,10 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) {
#ifdef Q_WS_X11
- QPixmap icon_pixmap = KGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window_new", KIcon::Small, 0, KIcon::DefaultState, 0, true );
+ TQPixmap icon_pixmap = KGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window_new", KIcon::Small, 0, KIcon::DefaultState, 0, true );
if (d->cursor_icon_widget) {
- const QPixmap *pm = d->cursor_icon_widget->backgroundPixmap();
+ const TQPixmap *pm = d->cursor_icon_widget->backgroundPixmap();
if (!pm || pm->serialNumber()!=icon_pixmap.serialNumber()) {
delete d->cursor_icon_widget;
d->cursor_icon_widget = 0;
@@ -1261,7 +1261,7 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
}
if( !d->cursor_icon_widget ) {
- d->cursor_icon_widget = new QWidget( NULL, NULL, WX11BypassWM );
+ d->cursor_icon_widget = new TQWidget( NULL, NULL, WX11BypassWM );
XSetWindowAttributes attr;
attr.save_under = True;
XChangeWindowAttributes( qt_xdisplay(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr );
@@ -1273,10 +1273,10 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
d->cursor_icon_widget->setBackgroundPixmap( icon_pixmap );
d->cursor_icon_widget->erase();
}
- QPoint c_pos = QCursor::pos();
+ TQPoint c_pos = TQCursor::pos();
d->cursor_icon_widget->move( c_pos.x() + 15, c_pos.y() + 15 );
XRaiseWindow( qt_xdisplay(), d->cursor_icon_widget->winId());
- QApplication::flushX();
+ TQApplication::flushX();
d->cursor_icon_widget->show();
#endif
}
@@ -1293,11 +1293,11 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
if (!swallowEvent) {
khtml::MouseMoveEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
- QApplication::sendEvent( m_part, &event );
+ TQApplication::sendEvent( m_part, &event );
}
}
-void KHTMLView::viewportMouseReleaseEvent( QMouseEvent * _mouse )
+void KHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse )
{
bool swallowEvent = false;
int xm, ym;
@@ -1312,8 +1312,8 @@ void KHTMLView::viewportMouseReleaseEvent( QMouseEvent * _mouse )
d->clickCount,_mouse,false,DOM::NodeImpl::MouseRelease);
if (d->clickCount > 0 &&
- QPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= QApplication::startDragDistance()) {
- QMouseEvent me(d->isDoubleClick ? QEvent::MouseButtonDblClick : QEvent::MouseButtonRelease,
+ TQPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= TQApplication::startDragDistance()) {
+ TQMouseEvent me(d->isDoubleClick ? TQEvent::MouseButtonDblClick : TQEvent::MouseButtonRelease,
_mouse->pos(), _mouse->button(), _mouse->state());
dispatchMouseEvent(EventImpl::CLICK_EVENT, mev.innerNode.handle(),mev.innerNonSharedNode.handle(),true,
d->clickCount, &me, true, DOM::NodeImpl::MouseRelease);
@@ -1333,12 +1333,12 @@ void KHTMLView::viewportMouseReleaseEvent( QMouseEvent * _mouse )
if (!swallowEvent) {
khtml::MouseReleaseEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
- QApplication::sendEvent( m_part, &event );
+ TQApplication::sendEvent( m_part, &event );
}
}
// returns true if event should be swallowed
-bool KHTMLView::dispatchKeyEvent( QKeyEvent *_ke )
+bool KHTMLView::dispatchKeyEvent( TQKeyEvent *_ke )
{
if (!m_part->xmlDocImpl())
return false;
@@ -1367,7 +1367,7 @@ bool KHTMLView::dispatchKeyEvent( QKeyEvent *_ke )
return false;
}
- if( _ke->type() == QEvent::KeyPress )
+ if( _ke->type() == TQEvent::KeyPress )
{
if( !_ke->isAutoRepeat())
{
@@ -1387,10 +1387,10 @@ bool KHTMLView::dispatchKeyEvent( QKeyEvent *_ke )
return ret;
}
}
- else // QEvent::KeyRelease
+ else // TQEvent::KeyRelease
{
// Discard postponed "autorepeat key-release" events that didn't see
- // a keypress after them (e.g. due to QAccel)
+ // a keypress after them (e.g. due to TQAccel)
if ( d->postponed_autorepeat ) {
delete d->postponed_autorepeat;
d->postponed_autorepeat = 0;
@@ -1401,7 +1401,7 @@ bool KHTMLView::dispatchKeyEvent( QKeyEvent *_ke )
}
else
{
- d->postponed_autorepeat = new QKeyEvent( _ke->type(), _ke->key(), _ke->ascii(), _ke->state(),
+ d->postponed_autorepeat = new TQKeyEvent( _ke->type(), _ke->key(), _ke->ascii(), _ke->state(),
_ke->text(), _ke->isAutoRepeat(), _ke->count());
if( _ke->isAccepted())
d->postponed_autorepeat->accept();
@@ -1413,7 +1413,7 @@ bool KHTMLView::dispatchKeyEvent( QKeyEvent *_ke )
}
// returns true if event should be swallowed
-bool KHTMLView::dispatchKeyEventHelper( QKeyEvent *_ke, bool keypress )
+bool KHTMLView::dispatchKeyEventHelper( TQKeyEvent *_ke, bool keypress )
{
DOM::NodeImpl* keyNode = m_part->xmlDocImpl()->focusNode();
if (keyNode) {
@@ -1423,7 +1423,7 @@ bool KHTMLView::dispatchKeyEventHelper( QKeyEvent *_ke, bool keypress )
}
}
-void KHTMLView::keyPressEvent( QKeyEvent *_ke )
+void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
{
#ifndef KHTML_NO_TYPE_AHEAD_FIND
if(d->typeAheadActivated)
@@ -1652,7 +1652,7 @@ void KHTMLView::startFindAhead( bool linksOnly )
void KHTMLView::findAhead(bool increase)
{
- QString status;
+ TQString status;
if(d->findLinksOnly)
{
@@ -1694,7 +1694,7 @@ void KHTMLView::updateFindAheadTimeout()
#endif // KHTML_NO_TYPE_AHEAD_FIND
-void KHTMLView::keyReleaseEvent(QKeyEvent *_ke)
+void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke)
{
#ifndef KHTML_NO_TYPE_AHEAD_FIND
if(d->typeAheadActivated) {
@@ -1743,10 +1743,10 @@ void KHTMLView::keyReleaseEvent(QKeyEvent *_ke)
return;
}
- QScrollView::keyReleaseEvent(_ke);
+ TQScrollView::keyReleaseEvent(_ke);
}
-void KHTMLView::contentsContextMenuEvent ( QContextMenuEvent * /*ce*/ )
+void KHTMLView::contentsContextMenuEvent ( TQContextMenuEvent * /*ce*/ )
{
// ### what kind of c*** is that ?
#if 0
@@ -1762,12 +1762,12 @@ void KHTMLView::contentsContextMenuEvent ( QContextMenuEvent * /*ce*/ )
int absx = 0;
int absy = 0;
targetNode->renderer()->absolutePosition(absx,absy);
- QPoint pos(xm-absx,ym-absy);
+ TQPoint pos(xm-absx,ym-absy);
- QWidget *w = static_cast<RenderWidget*>(targetNode->renderer())->widget();
- QContextMenuEvent cme(_ce->reason(),pos,_ce->globalPos(),_ce->state());
+ TQWidget *w = static_cast<RenderWidget*>(targetNode->renderer())->widget();
+ TQContextMenuEvent cme(_ce->reason(),pos,_ce->globalPos(),_ce->state());
setIgnoreEvents(true);
- QApplication::sendEvent(w,&cme);
+ TQApplication::sendEvent(w,&cme);
setIgnoreEvents(false);
}
#endif
@@ -1789,18 +1789,18 @@ bool KHTMLView::focusNextPrevChild( bool next )
if (m_part->parentPart() && m_part->parentPart()->view())
return m_part->parentPart()->view()->focusNextPrevChild(next);
- return QWidget::focusNextPrevChild(next);
+ return TQWidget::focusNextPrevChild(next);
}
void KHTMLView::doAutoScroll()
{
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
pos = viewport()->mapFromGlobal( pos );
int xm, ym;
viewportToContents(pos.x(), pos.y(), xm, ym);
- pos = QPoint(pos.x() - viewport()->x(), pos.y() - viewport()->y());
+ pos = TQPoint(pos.x() - viewport()->x(), pos.y() - viewport()->y());
if ( (pos.y() < 0) || (pos.y() > visibleHeight()) ||
(pos.x() < 0) || (pos.x() > visibleWidth()) )
{
@@ -1833,11 +1833,11 @@ class HackWidget : public QWidget
inline void setNoErase() { setWFlags(getWFlags()|WRepaintNoErase); }
};
-bool KHTMLView::eventFilter(QObject *o, QEvent *e)
+bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
{
- if ( e->type() == QEvent::AccelOverride ) {
- QKeyEvent* ke = (QKeyEvent*) e;
-//kdDebug(6200) << "QEvent::AccelOverride" << endl;
+ if ( e->type() == TQEvent::AccelOverride ) {
+ TQKeyEvent* ke = (TQKeyEvent*) e;
+//kdDebug(6200) << "TQEvent::AccelOverride" << endl;
if (m_part->isEditable() || m_part->isCaretMode()
|| (m_part->xmlDocImpl() && m_part->xmlDocImpl()->focusNode()
&& m_part->xmlDocImpl()->focusNode()->contentEditable())) {
@@ -1860,36 +1860,36 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
}
}
- if ( e->type() == QEvent::Leave ) {
+ if ( e->type() == TQEvent::Leave ) {
if ( d->cursor_icon_widget )
d->cursor_icon_widget->hide();
m_part->resetHoverText();
}
- QWidget *view = viewport();
+ TQWidget *view = viewport();
if (o == view) {
// we need to install an event filter on all children of the viewport to
// be able to get correct stacking of children within the document.
- if(e->type() == QEvent::ChildInserted) {
- QObject *c = static_cast<QChildEvent *>(e)->child();
+ if(e->type() == TQEvent::ChildInserted) {
+ TQObject *c = static_cast<TQChildEvent *>(e)->child();
if (c->isWidgetType()) {
- QWidget *w = static_cast<QWidget *>(c);
+ TQWidget *w = static_cast<TQWidget *>(c);
// don't install the event filter on toplevels
if (w->parentWidget(true) == view) {
if (!strcmp(w->name(), "__khtml")) {
w->installEventFilter(this);
w->unsetCursor();
- if (!::qt_cast<QFrame*>(w))
- w->setBackgroundMode( QWidget::NoBackground );
+ if (!::qt_cast<TQFrame*>(w))
+ w->setBackgroundMode( TQWidget::NoBackground );
static_cast<HackWidget *>(w)->setNoErase();
if (w->children()) {
- QObjectListIterator it(*w->children());
+ TQObjectListIterator it(*w->children());
for (; it.current(); ++it) {
- QWidget *widget = ::qt_cast<QWidget *>(it.current());
+ TQWidget *widget = ::qt_cast<TQWidget *>(it.current());
if (widget && !widget->isTopLevel()) {
- if (!::qt_cast<QFrame*>(w))
- widget->setBackgroundMode( QWidget::NoBackground );
+ if (!::qt_cast<TQFrame*>(w))
+ widget->setBackgroundMode( TQWidget::NoBackground );
static_cast<HackWidget *>(widget)->setNoErase();
widget->installEventFilter(this);
}
@@ -1900,8 +1900,8 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
}
}
} else if (o->isWidgetType()) {
- QWidget *v = static_cast<QWidget *>(o);
- QWidget *c = v;
+ TQWidget *v = static_cast<TQWidget *>(o);
+ TQWidget *c = v;
while (v && v != view) {
c = v;
v = v->parentWidget(true);
@@ -1909,25 +1909,25 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
if (v && !strcmp(c->name(), "__khtml")) {
bool block = false;
- QWidget *w = static_cast<QWidget *>(o);
+ TQWidget *w = static_cast<TQWidget *>(o);
switch(e->type()) {
- case QEvent::Paint:
+ case TQEvent::Paint:
if (!allowWidgetPaintEvents) {
// eat the event. Like this we can control exactly when the widget
// get's repainted.
block = true;
int x = 0, y = 0;
- QWidget *v = w;
+ TQWidget *v = w;
while (v && v != view) {
x += v->x();
y += v->y();
v = v->parentWidget();
}
viewportToContents( x, y, x, y );
- QPaintEvent *pe = static_cast<QPaintEvent *>(e);
- bool asap = !d->contentsMoving && ::qt_cast<QScrollView *>(c);
+ TQPaintEvent *pe = static_cast<TQPaintEvent *>(e);
+ bool asap = !d->contentsMoving && ::qt_cast<TQScrollView *>(c);
- // QScrollView needs fast repaints
+ // TQScrollView needs fast repaints
if ( asap && !d->painting && m_part->xmlDocImpl() && m_part->xmlDocImpl()->renderer() &&
!static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer())->needsLayout() ) {
repaintContents(x + pe->rect().x(), y + pe->rect().y(),
@@ -1938,20 +1938,20 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
}
}
break;
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick: {
- if ( (w->parentWidget() == view || ::qt_cast<QScrollView*>(c)) && !::qt_cast<QScrollBar *>(w)) {
- QMouseEvent *me = static_cast<QMouseEvent *>(e);
- QPoint pt = w->mapTo( view, me->pos());
- QMouseEvent me2(me->type(), pt, me->button(), me->state());
-
- if (e->type() == QEvent::MouseMove)
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick: {
+ if ( (w->parentWidget() == view || ::qt_cast<TQScrollView*>(c)) && !::qt_cast<TQScrollBar *>(w)) {
+ TQMouseEvent *me = static_cast<TQMouseEvent *>(e);
+ TQPoint pt = w->mapTo( view, me->pos());
+ TQMouseEvent me2(me->type(), pt, me->button(), me->state());
+
+ if (e->type() == TQEvent::MouseMove)
viewportMouseMoveEvent(&me2);
- else if(e->type() == QEvent::MouseButtonPress)
+ else if(e->type() == TQEvent::MouseButtonPress)
viewportMousePressEvent(&me2);
- else if(e->type() == QEvent::MouseButtonRelease)
+ else if(e->type() == TQEvent::MouseButtonRelease)
viewportMouseReleaseEvent(&me2);
else
viewportMouseDoubleClickEvent(&me2);
@@ -1959,11 +1959,11 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
}
break;
}
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- if (w->parentWidget() == view && !::qt_cast<QScrollBar *>(w)) {
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
- if (e->type() == QEvent::KeyPress)
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ if (w->parentWidget() == view && !::qt_cast<TQScrollBar *>(w)) {
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ if (e->type() == TQEvent::KeyPress)
keyPressEvent(ke);
else
keyReleaseEvent(ke);
@@ -1980,7 +1980,7 @@ bool KHTMLView::eventFilter(QObject *o, QEvent *e)
}
// kdDebug(6000) <<"passing event on to sv event filter object=" << o->className() << " event=" << e->type() << endl;
- return QScrollView::eventFilter(o, e);
+ return TQScrollView::eventFilter(o, e);
}
@@ -1994,7 +1994,7 @@ DOM::NodeImpl *KHTMLView::nonSharedNodeUnderMouse() const
return d->underMouseNonShared;
}
-bool KHTMLView::scrollTo(const QRect &bounds)
+bool KHTMLView::scrollTo(const TQRect &bounds)
{
d->scrollingSelf = true; // so scroll events get ignored
@@ -2106,11 +2106,11 @@ bool KHTMLView::focusNextPrevNode(bool next)
while (toFocus && toFocus != oldFocusNode)
{
- QRect focusNodeRect = toFocus->getRect();
+ TQRect focusNodeRect = toFocus->getRect();
if ((focusNodeRect.left() > contentsX()) && (focusNodeRect.right() < contentsX() + visibleWidth()) &&
(focusNodeRect.top() > contentsY()) && (focusNodeRect.bottom() < contentsY() + visibleHeight())) {
{
- QRect r = toFocus->getRect();
+ TQRect r = toFocus->getRect();
ensureVisible( r.right(), r.bottom());
ensureVisible( r.left(), r.top());
d->scrollBarMoved = false;
@@ -2173,11 +2173,11 @@ bool KHTMLView::focusNextPrevNode(bool next)
{
if ( next )
{
- targetVisible = scrollTo(QRect(contentsX()+visibleWidth()/2,contentsHeight()-d->borderY,0,0));
+ targetVisible = scrollTo(TQRect(contentsX()+visibleWidth()/2,contentsHeight()-d->borderY,0,0));
}
else
{
- targetVisible = scrollTo(QRect(contentsX()+visibleWidth()/2,d->borderY,0,0));
+ targetVisible = scrollTo(TQRect(contentsX()+visibleWidth()/2,d->borderY,0,0));
}
}
else
@@ -2228,39 +2228,39 @@ bool KHTMLView::focusNextPrevNode(bool next)
void KHTMLView::displayAccessKeys()
{
- QValueVector< QChar > taken;
+ TQValueVector< TQChar > taken;
displayAccessKeys( NULL, this, taken, false );
displayAccessKeys( NULL, this, taken, true );
}
-void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, QValueVector< QChar >& taken, bool use_fallbacks )
+void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks )
{
- QMap< ElementImpl*, QChar > fallbacks;
+ TQMap< ElementImpl*, TQChar > fallbacks;
if( use_fallbacks )
fallbacks = buildFallbackAccessKeys();
for( NodeImpl* n = m_part->xmlDocImpl(); n != NULL; n = n->traverseNextNode()) {
if( n->isElementNode()) {
ElementImpl* en = static_cast< ElementImpl* >( n );
DOMString s = en->getAttribute( ATTR_ACCESSKEY );
- QString accesskey;
+ TQString accesskey;
if( s.length() == 1 ) {
- QChar a = s.string()[ 0 ].upper();
+ TQChar a = s.string()[ 0 ].upper();
if( qFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains
accesskey = a;
}
if( accesskey.isNull() && fallbacks.contains( en )) {
- QChar a = fallbacks[ en ].upper();
+ TQChar a = fallbacks[ en ].upper();
if( qFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains
- accesskey = QString( "<qt><i>" ) + a + "</i></qt>";
+ accesskey = TQString( "<qt><i>" ) + a + "</i></qt>";
}
if( !accesskey.isNull()) {
- QRect rec=en->getRect();
- QLabel *lab=new QLabel(accesskey,viewport(),0,Qt::WDestructiveClose);
- connect( origview, SIGNAL(hideAccessKeys()), lab, SLOT(close()) );
- connect( this, SIGNAL(repaintAccessKeys()), lab, SLOT(repaint()));
- lab->setPalette(QToolTip::palette());
+ TQRect rec=en->getRect();
+ TQLabel *lab=new TQLabel(accesskey,viewport(),0,Qt::WDestructiveClose);
+ connect( origview, TQT_SIGNAL(hideAccessKeys()), lab, TQT_SLOT(close()) );
+ connect( this, TQT_SIGNAL(repaintAccessKeys()), lab, TQT_SLOT(repaint()));
+ lab->setPalette(TQToolTip::palette());
lab->setLineWidth(2);
- lab->setFrameStyle(QFrame::Box | QFrame::Plain);
+ lab->setFrameStyle(TQFrame::Box | TQFrame::Plain);
lab->setMargin(3);
lab->adjustSize();
addChild(lab,
@@ -2273,8 +2273,8 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, QValu
}
if( use_fallbacks )
return;
- QPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
- for( QPtrListIterator<KParts::ReadOnlyPart> it( frames );
+ TQPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
+ for( TQPtrListIterator<KParts::ReadOnlyPart> it( frames );
it != NULL;
++it ) {
if( !(*it)->inherits( "KHTMLPart" ))
@@ -2295,16 +2295,16 @@ void KHTMLView::accessKeysTimeout()
{
d->accessKeysActivated=false;
d->accessKeysPreActivate = false;
-m_part->setStatusBarText(QString::null, KHTMLPart::BarOverrideText);
+m_part->setStatusBarText(TQString::null, KHTMLPart::BarOverrideText);
emit hideAccessKeys();
}
// Handling of the HTML accesskey attribute.
-bool KHTMLView::handleAccessKey( const QKeyEvent* ev )
+bool KHTMLView::handleAccessKey( const TQKeyEvent* ev )
{
// Qt interprets the keyevent also with the modifiers, and ev->text() matches that,
// but this code must act as if the modifiers weren't pressed
- QChar c;
+ TQChar c;
if( ev->key() >= Key_A && ev->key() <= Key_Z )
c = 'A' + ev->key() - Key_A;
else if( ev->key() >= Key_0 && ev->key() <= Key_9 )
@@ -2320,15 +2320,15 @@ bool KHTMLView::handleAccessKey( const QKeyEvent* ev )
return focusNodeWithAccessKey( c );
}
-bool KHTMLView::focusNodeWithAccessKey( QChar c, KHTMLView* caller )
+bool KHTMLView::focusNodeWithAccessKey( TQChar c, KHTMLView* caller )
{
DocumentImpl *doc = m_part->xmlDocImpl();
if( !doc )
return false;
ElementImpl* node = doc->findAccessKeyElement( c );
if( !node ) {
- QPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
- for( QPtrListIterator<KParts::ReadOnlyPart> it( frames );
+ TQPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
+ for( TQPtrListIterator<KParts::ReadOnlyPart> it( frames );
it != NULL;
++it ) {
if( !(*it)->inherits( "KHTMLPart" ))
@@ -2344,8 +2344,8 @@ bool KHTMLView::focusNodeWithAccessKey( QChar c, KHTMLView* caller )
&& m_part->parentPart()->view()->focusNodeWithAccessKey( c, this ))
return true;
if( caller == NULL ) { // the active frame (where the accesskey was pressed)
- QMap< ElementImpl*, QChar > fallbacks = buildFallbackAccessKeys();
- for( QMap< ElementImpl*, QChar >::ConstIterator it = fallbacks.begin();
+ TQMap< ElementImpl*, TQChar > fallbacks = buildFallbackAccessKeys();
+ for( TQMap< ElementImpl*, TQChar >::ConstIterator it = fallbacks.begin();
it != fallbacks.end();
++it )
if( *it == c ) {
@@ -2369,7 +2369,7 @@ bool KHTMLView::focusNodeWithAccessKey( QChar c, KHTMLView* caller )
}
#endif // KHTML_NO_CARET
- QRect r = node->getRect();
+ TQRect r = node->getRect();
ensureVisible( r.right(), r.bottom());
ensureVisible( r.left(), r.top());
@@ -2382,9 +2382,9 @@ bool KHTMLView::focusNodeWithAccessKey( QChar c, KHTMLView* caller )
guard = node;
}
// Set focus node on the document
- QFocusEvent::setReason( QFocusEvent::Shortcut );
+ TQFocusEvent::setReason( TQFocusEvent::Shortcut );
m_part->xmlDocImpl()->setFocusNode(node);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
if( node != NULL && node->hasOneRef()) // deleted, only held by guard
return true;
emit m_part->nodeActivated(Node(node));
@@ -2414,9 +2414,9 @@ bool KHTMLView::focusNodeWithAccessKey( QChar c, KHTMLView* caller )
return true;
}
-static QString getElementText( NodeImpl* start, bool after )
+static TQString getElementText( NodeImpl* start, bool after )
{
- QString ret; // nextSibling(), to go after e.g. </select>
+ TQString ret; // nextSibling(), to go after e.g. </select>
for( NodeImpl* n = after ? start->nextSibling() : start->traversePreviousNode();
n != NULL;
n = after ? n->traverseNextNode() : n->traversePreviousNode()) {
@@ -2465,9 +2465,9 @@ static QString getElementText( NodeImpl* start, bool after )
return ret.simplifyWhiteSpace();
}
-static QMap< NodeImpl*, QString > buildLabels( NodeImpl* start )
+static TQMap< NodeImpl*, TQString > buildLabels( NodeImpl* start )
{
- QMap< NodeImpl*, QString > ret;
+ TQMap< NodeImpl*, TQString > ret;
for( NodeImpl* n = start;
n != NULL;
n = n->traverseNextNode()) {
@@ -2484,17 +2484,17 @@ static QMap< NodeImpl*, QString > buildLabels( NodeImpl* start )
namespace khtml {
struct AccessKeyData {
ElementImpl* element;
- QString text;
- QString url;
+ TQString text;
+ TQString url;
int priority; // 10(highest) - 0(lowest)
};
}
-QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
+TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
{
// build a list of all possible candidate elements that could use an accesskey
- QValueList< AccessKeyData > data;
- QMap< NodeImpl*, QString > labels = buildLabels( m_part->xmlDocImpl());
+ TQValueList< AccessKeyData > data;
+ TQMap< NodeImpl*, TQString > labels = buildLabels( m_part->xmlDocImpl());
for( NodeImpl* n = m_part->xmlDocImpl();
n != NULL;
n = n->traverseNextNode()) {
@@ -2504,8 +2504,8 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
continue; // has accesskey set, ignore
if( element->renderer() == NULL )
continue; // not visible
- QString text;
- QString url;
+ TQString text;
+ TQString url;
int priority = 0;
bool ignore = false;
bool text_after = false;
@@ -2602,9 +2602,9 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
text = getElementText( element, true );
text = text.stripWhiteSpace();
// increase priority of items which have explicitly specified accesskeys in the config
- QValueList< QPair< QString, QChar > > priorities
+ TQValueList< QPair< TQString, TQChar > > priorities
= m_part->settings()->fallbackAccessKeysAssignments();
- for( QValueList< QPair< QString, QChar > >::ConstIterator it = priorities.begin();
+ for( TQValueList< QPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
it != priorities.end();
++it ) {
if( text == (*it).first )
@@ -2615,7 +2615,7 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
}
}
- QValueList< QChar > keys;
+ TQValueList< TQChar > keys;
for( char c = 'A'; c <= 'Z'; ++c )
keys << c;
for( char c = '0'; c <= '9'; ++c )
@@ -2627,17 +2627,17 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
ElementImpl* en = static_cast< ElementImpl* >( n );
DOMString s = en->getAttribute( ATTR_ACCESSKEY );
if( s.length() == 1 ) {
- QChar c = s.string()[ 0 ].upper();
+ TQChar c = s.string()[ 0 ].upper();
keys.remove( c ); // remove manually assigned accesskeys
}
}
}
- QMap< ElementImpl*, QChar > ret;
+ TQMap< ElementImpl*, TQChar > ret;
for( int priority = 10;
priority >= 0;
--priority ) {
- for( QValueList< AccessKeyData >::Iterator it = data.begin();
+ for( TQValueList< AccessKeyData >::Iterator it = data.begin();
it != data.end();
) {
if( (*it).priority != priority ) {
@@ -2646,12 +2646,12 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
}
if( keys.isEmpty())
break;
- QString text = (*it).text;
- QChar key;
+ TQString text = (*it).text;
+ TQChar key;
if( key.isNull() && !text.isEmpty()) {
- QValueList< QPair< QString, QChar > > priorities
+ TQValueList< QPair< TQString, TQChar > > priorities
= m_part->settings()->fallbackAccessKeysAssignments();
- for( QValueList< QPair< QString, QChar > >::ConstIterator it = priorities.begin();
+ for( TQValueList< QPair< TQString, TQChar > >::ConstIterator it = priorities.begin();
it != priorities.end();
++it )
if( text == (*it).first && keys.contains( (*it).second )) {
@@ -2663,8 +2663,8 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
// then first character of the following words,
// and then simply the first free character
if( key.isNull() && !text.isEmpty()) {
- QStringList words = QStringList::split( ' ', text );
- for( QStringList::ConstIterator it = words.begin();
+ TQStringList words = TQStringList::split( ' ', text );
+ for( TQStringList::ConstIterator it = words.begin();
it != words.end();
++it ) {
if( keys.contains( (*it)[ 0 ].upper())) {
@@ -2687,11 +2687,11 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
key = keys.front();
ret[ (*it).element ] = key;
keys.remove( key );
- QString url = (*it).url;
+ TQString url = (*it).url;
it = data.remove( it );
// assign the same accesskey also to other elements pointing to the same url
if( !url.isEmpty() && !url.startsWith( "javascript:", false )) {
- for( QValueList< AccessKeyData >::Iterator it2 = data.begin();
+ for( TQValueList< AccessKeyData >::Iterator it2 = data.begin();
it2 != data.end();
) {
if( (*it2).url == url ) {
@@ -2708,12 +2708,12 @@ QMap< ElementImpl*, QChar > KHTMLView::buildFallbackAccessKeys() const
return ret;
}
-void KHTMLView::setMediaType( const QString &medium )
+void KHTMLView::setMediaType( const TQString &medium )
{
m_medium = medium;
}
-QString KHTMLView::mediaType() const
+TQString KHTMLView::mediaType() const
{
return m_medium;
}
@@ -2748,24 +2748,24 @@ void KHTMLView::print(bool quick)
khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer());
if(!root) return;
- KPrinter *printer = new KPrinter(true, QPrinter::ScreenResolution);
+ KPrinter *printer = new KPrinter(true, TQPrinter::ScreenResolution);
printer->addDialogPage(new KHTMLPrintSettings());
- QString docname = m_part->xmlDocImpl()->URL().prettyURL();
+ TQString docname = m_part->xmlDocImpl()->URL().prettyURL();
if ( !docname.isEmpty() )
docname = KStringHandler::csqueeze(docname, 80);
if(quick || printer->setup(this, i18n("Print %1").arg(docname))) {
- viewport()->setCursor( waitCursor ); // only viewport(), no QApplication::, otherwise we get the busy cursor in kdeprint's dialogs
+ viewport()->setCursor( waitCursor ); // only viewport(), no TQApplication::, otherwise we get the busy cursor in kdeprint's dialogs
// set up KPrinter
printer->setFullPage(false);
- printer->setCreator(QString("KDE %1.%2.%3 HTML Library").arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE));
+ printer->setCreator(TQString("KDE %1.%2.%3 HTML Library").arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE));
printer->setDocName(docname);
- QPainter *p = new QPainter;
+ TQPainter *p = new QPainter;
p->begin( printer );
khtml::setPrintPainter( p );
m_part->xmlDocImpl()->setPaintDevice( printer );
- QString oldMediaType = mediaType();
+ TQString oldMediaType = mediaType();
setMediaType( "print" );
// We ignore margin settings for html and body when printing
// and use the default margins from the print-system
@@ -2780,7 +2780,7 @@ void KHTMLView::print(bool quick)
"html { margin: 0px !important; }"
);
- QPaintDeviceMetrics metrics( printer );
+ TQPaintDeviceMetrics metrics( printer );
kdDebug(6000) << "printing: physical page width = " << metrics.width()
<< " height = " << metrics.height() << endl;
@@ -2806,11 +2806,11 @@ void KHTMLView::print(bool quick)
bool printHeader = (printer->option("app-khtml-printheader") == "true");
int headerHeight = 0;
- QFont headerFont("Sans Serif", 8);
+ TQFont headerFont("Sans Serif", 8);
- QString headerLeft = KGlobal::locale()->formatDate(QDate::currentDate(),true);
- QString headerMid = docname;
- QString headerRight;
+ TQString headerLeft = KGlobal::locale()->formatDate(TQDate::currentDate(),true);
+ TQString headerMid = docname;
+ TQString headerRight;
if (printHeader)
{
@@ -2875,14 +2875,14 @@ void KHTMLView::print(bool quick)
int page = 1;
while(top < root->docHeight()) {
if(top > 0) printer->newPage();
- p->setClipRect(0, 0, pageWidth, headerHeight, QPainter::CoordDevice);
+ p->setClipRect(0, 0, pageWidth, headerHeight, TQPainter::CoordDevice);
if (printHeader)
{
int dy = p->fontMetrics().lineSpacing();
p->setPen(Qt::black);
p->setFont(headerFont);
- headerRight = QString("#%1").arg(page);
+ headerRight = TQString("#%1").arg(page);
p->drawText(0, 0, metrics.width(), dy, Qt::AlignLeft, headerLeft);
p->drawText(0, 0, metrics.width(), dy, Qt::AlignHCenter, headerMid);
@@ -2895,7 +2895,7 @@ void KHTMLView::print(bool quick)
p->scale(scale, scale);
#endif
- p->setClipRect(0, headerHeight, pageWidth, pageHeight, QPainter::CoordDevice);
+ p->setClipRect(0, headerHeight, pageWidth, pageHeight, TQPainter::CoordDevice);
p->translate(0, headerHeight-top);
bottom = top+pageHeight;
@@ -2904,8 +2904,8 @@ void KHTMLView::print(bool quick)
root->setPageBottom(bottom);
root->setPageNumber(page);
- root->layer()->paint(p, QRect(0, top, pageWidth, pageHeight));
-// m_part->xmlDocImpl()->renderer()->layer()->paint(p, QRect(0, top, pageWidth, pageHeight));
+ root->layer()->paint(p, TQRect(0, top, pageWidth, pageHeight));
+// m_part->xmlDocImpl()->renderer()->layer()->paint(p, TQRect(0, top, pageWidth, pageHeight));
// root->repaint();
// p->flush();
kdDebug(6000) << "printed: page " << page <<" bottom At = " << bottom << endl;
@@ -2946,7 +2946,7 @@ void KHTMLView::slotPaletteChanged()
body->recalcStyle( NodeImpl::Force );
}
-void KHTMLView::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
+void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more)
{
if(!m_part->xmlDocImpl()) return;
khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer());
@@ -2968,7 +2968,7 @@ void KHTMLView::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
root->setPageTop(yOff);
root->setPageBottom(yOff+height);
- root->layer()->paint(p, QRect(0, yOff, root->docWidth(), height));
+ root->layer()->paint(p, TQRect(0, yOff, root->docWidth(), height));
if (more)
*more = yOff + height < root->docHeight();
p->restore();
@@ -2990,7 +2990,7 @@ void KHTMLView::setVScrollBarMode ( ScrollBarMode mode )
{
#ifndef KHTML_NO_SCROLLBARS
d->vmode = mode;
- QScrollView::setVScrollBarMode(mode);
+ TQScrollView::setVScrollBarMode(mode);
#else
Q_UNUSED( mode );
#endif
@@ -3000,7 +3000,7 @@ void KHTMLView::setHScrollBarMode ( ScrollBarMode mode )
{
#ifndef KHTML_NO_SCROLLBARS
d->hmode = mode;
- QScrollView::setHScrollBarMode(mode);
+ TQScrollView::setHScrollBarMode(mode);
#else
Q_UNUSED( mode );
#endif
@@ -3009,22 +3009,22 @@ void KHTMLView::setHScrollBarMode ( ScrollBarMode mode )
void KHTMLView::restoreScrollBar()
{
int ow = visibleWidth();
- QScrollView::setVScrollBarMode(d->vmode);
+ TQScrollView::setVScrollBarMode(d->vmode);
if (visibleWidth() != ow)
layout();
d->prevScrollbarVisible = verticalScrollBar()->isVisible();
}
-QStringList KHTMLView::formCompletionItems(const QString &name) const
+TQStringList KHTMLView::formCompletionItems(const TQString &name) const
{
if (!m_part->settings()->isFormCompletionEnabled())
- return QStringList();
+ return TQStringList();
if (!d->formCompletions)
d->formCompletions = new KSimpleConfig(locateLocal("data", "khtml/formcompletions"));
return d->formCompletions->readListEntry(name);
}
-void KHTMLView::clearCompletionHistory(const QString& name)
+void KHTMLView::clearCompletionHistory(const TQString& name)
{
if (!d->formCompletions)
{
@@ -3034,7 +3034,7 @@ void KHTMLView::clearCompletionHistory(const QString& name)
d->formCompletions->sync();
}
-void KHTMLView::addFormCompletionItem(const QString &name, const QString &value)
+void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &value)
{
if (!m_part->settings()->isFormCompletionEnabled())
return;
@@ -3044,7 +3044,7 @@ void KHTMLView::addFormCompletionItem(const QString &name, const QString &value)
bool cc_number(true);
for (unsigned int i = 0; i < value.length(); ++i)
{
- QChar c(value[i]);
+ TQChar c(value[i]);
if (!c.isNumber() && c != '-' && !c.isSpace())
{
cc_number = false;
@@ -3053,7 +3053,7 @@ void KHTMLView::addFormCompletionItem(const QString &name, const QString &value)
}
if (cc_number)
return;
- QStringList items = formCompletionItems(name);
+ TQStringList items = formCompletionItems(name);
if (!items.contains(value))
items.prepend(value);
while ((int)items.count() > m_part->settings()->maxFormCompletionItems())
@@ -3061,28 +3061,28 @@ void KHTMLView::addFormCompletionItem(const QString &name, const QString &value)
d->formCompletions->writeEntry(name, items);
}
-void KHTMLView::addNonPasswordStorableSite(const QString& host)
+void KHTMLView::addNonPasswordStorableSite(const TQString& host)
{
if (!d->formCompletions) {
d->formCompletions = new KSimpleConfig(locateLocal("data", "khtml/formcompletions"));
}
d->formCompletions->setGroup("NonPasswordStorableSites");
- QStringList sites = d->formCompletions->readListEntry("Sites");
+ TQStringList sites = d->formCompletions->readListEntry("Sites");
sites.append(host);
d->formCompletions->writeEntry("Sites", sites);
d->formCompletions->sync();
- d->formCompletions->setGroup(QString::null);//reset
+ d->formCompletions->setGroup(TQString::null);//reset
}
-bool KHTMLView::nonPasswordStorableSite(const QString& host) const
+bool KHTMLView::nonPasswordStorableSite(const TQString& host) const
{
if (!d->formCompletions) {
d->formCompletions = new KSimpleConfig(locateLocal("data", "khtml/formcompletions"));
}
d->formCompletions->setGroup("NonPasswordStorableSites");
- QStringList sites = d->formCompletions->readListEntry("Sites");
- d->formCompletions->setGroup(QString::null);//reset
+ TQStringList sites = d->formCompletions->readListEntry("Sites");
+ d->formCompletions->setGroup(TQString::null);//reset
return (sites.find(host) != sites.end());
}
@@ -3090,7 +3090,7 @@ bool KHTMLView::nonPasswordStorableSite(const QString& host) const
// returns true if event should be swallowed
bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
DOM::NodeImpl *targetNodeNonShared, bool cancelable,
- int detail,QMouseEvent *_mouse, bool setUnder,
+ int detail,TQMouseEvent *_mouse, bool setUnder,
int mouseEventType)
{
// if the target node is a text node, dispatch on the parent node - rdar://4196646 (and #76948)
@@ -3191,7 +3191,7 @@ bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
if (targetNode) {
// send the actual event
bool dblclick = ( eventId == EventImpl::CLICK_EVENT &&
- _mouse->type() == QEvent::MouseButtonDblClick );
+ _mouse->type() == TQEvent::MouseButtonDblClick );
MouseEventImpl *me = new MouseEventImpl(static_cast<EventImpl::EventId>(eventId),
true,cancelable,m_part->xmlDocImpl()->defaultView(),
detail,screenX,screenY,clientX,clientY,pageX, pageY,
@@ -3228,7 +3228,7 @@ void KHTMLView::setIgnoreWheelEvents( bool e )
#ifndef QT_NO_WHEELEVENT
-void KHTMLView::viewportWheelEvent(QWheelEvent* e)
+void KHTMLView::viewportWheelEvent(TQWheelEvent* e)
{
if (d->accessKeysEnabled && d->accessKeysPreActivate) d->accessKeysPreActivate=false;
@@ -3259,9 +3259,9 @@ void KHTMLView::viewportWheelEvent(QWheelEvent* e)
else
{
d->scrollBarMoved = true;
- QScrollView::viewportWheelEvent( e );
+ TQScrollView::viewportWheelEvent( e );
- QMouseEvent *tempEvent = new QMouseEvent( QEvent::MouseMove, QPoint(-1,-1), QPoint(-1,-1), Qt::NoButton, e->state() );
+ TQMouseEvent *tempEvent = new TQMouseEvent( TQEvent::MouseMove, TQPoint(-1,-1), TQPoint(-1,-1), Qt::NoButton, e->state() );
emit viewportMouseMoveEvent ( tempEvent );
delete tempEvent;
}
@@ -3269,40 +3269,40 @@ void KHTMLView::viewportWheelEvent(QWheelEvent* e)
}
#endif
-void KHTMLView::dragEnterEvent( QDragEnterEvent* ev )
+void KHTMLView::dragEnterEvent( TQDragEnterEvent* ev )
{
// Handle drops onto frames (#16820)
// Drops on the main html part is handled by Konqueror (and shouldn't do anything
// in e.g. kmail, so not handled here).
if ( m_part->parentPart() )
{
- QApplication::sendEvent(m_part->parentPart()->widget(), ev);
+ TQApplication::sendEvent(m_part->parentPart()->widget(), ev);
return;
}
- QScrollView::dragEnterEvent( ev );
+ TQScrollView::dragEnterEvent( ev );
}
-void KHTMLView::dropEvent( QDropEvent *ev )
+void KHTMLView::dropEvent( TQDropEvent *ev )
{
// Handle drops onto frames (#16820)
// Drops on the main html part is handled by Konqueror (and shouldn't do anything
// in e.g. kmail, so not handled here).
if ( m_part->parentPart() )
{
- QApplication::sendEvent(m_part->parentPart()->widget(), ev);
+ TQApplication::sendEvent(m_part->parentPart()->widget(), ev);
return;
}
- QScrollView::dropEvent( ev );
+ TQScrollView::dropEvent( ev );
}
-void KHTMLView::focusInEvent( QFocusEvent *e )
+void KHTMLView::focusInEvent( TQFocusEvent *e )
{
#ifndef KHTML_NO_TYPE_AHEAD_FIND
m_part->enableFindAheadActions( true );
#endif
DOM::NodeImpl* fn = m_part->xmlDocImpl() ? m_part->xmlDocImpl()->focusNode() : 0;
if (fn && fn->renderer() && fn->renderer()->isWidget() &&
- (e->reason() != QFocusEvent::Mouse) &&
+ (e->reason() != TQFocusEvent::Mouse) &&
static_cast<khtml::RenderWidget*>(fn->renderer())->widget())
static_cast<khtml::RenderWidget*>(fn->renderer())->widget()->setFocus();
#ifndef KHTML_NO_CARET
@@ -3322,10 +3322,10 @@ void KHTMLView::focusInEvent( QFocusEvent *e )
}/*end if*/
showCaret();
#endif // KHTML_NO_CARET
- QScrollView::focusInEvent( e );
+ TQScrollView::focusInEvent( e );
}
-void KHTMLView::focusOutEvent( QFocusEvent *e )
+void KHTMLView::focusOutEvent( TQFocusEvent *e )
{
if(m_part) m_part->stopAutoScroll();
@@ -3367,7 +3367,7 @@ void KHTMLView::focusOutEvent( QFocusEvent *e )
if ( d->cursor_icon_widget )
d->cursor_icon_widget->hide();
- QScrollView::focusOutEvent( e );
+ TQScrollView::focusOutEvent( e );
}
void KHTMLView::slotScrollBarMoved()
@@ -3392,7 +3392,7 @@ void KHTMLView::slotScrollBarMoved()
m_part->xmlDocImpl()->documentElement()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, true, false);
}
-void KHTMLView::timerEvent ( QTimerEvent *e )
+void KHTMLView::timerEvent ( TQTimerEvent *e )
{
// kdDebug() << "timer event " << e->timerId() << endl;
if ( e->timerId() == d->scrollTimerId ) {
@@ -3469,16 +3469,16 @@ void KHTMLView::timerEvent ( QTimerEvent *e )
killTimer(d->repaintTimerId);
d->repaintTimerId = 0;
- QRect updateRegion;
- QMemArray<QRect> rects = d->updateRegion.rects();
+ TQRect updateRegion;
+ TQMemArray<TQRect> rects = d->updateRegion.rects();
- d->updateRegion = QRegion();
+ d->updateRegion = TQRegion();
if ( rects.size() )
updateRegion = rects[0];
for ( unsigned i = 1; i < rects.size(); ++i ) {
- QRect newRegion = updateRegion.unite(rects[i]);
+ TQRect newRegion = updateRegion.unite(rects[i]);
if (2*newRegion.height() > 3*updateRegion.height() )
{
repaintContents( updateRegion );
@@ -3497,17 +3497,17 @@ void KHTMLView::timerEvent ( QTimerEvent *e )
// Thus we need to check each supposedly 'visible' widget at the end of each layout, and remove it in case it's no more in sight.
if (d->dirtyLayout && !d->visibleWidgets.isEmpty()) {
- QWidget* w;
+ TQWidget* w;
d->dirtyLayout = false;
- QRect visibleRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
- QPtrList<RenderWidget> toRemove;
- for (QPtrDictIterator<QWidget> it(d->visibleWidgets); it.current(); ++it) {
+ TQRect visibleRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
+ TQPtrList<RenderWidget> toRemove;
+ for (TQPtrDictIterator<TQWidget> it(d->visibleWidgets); it.current(); ++it) {
int xp = 0, yp = 0;
w = it.current();
RenderWidget* rw = static_cast<RenderWidget*>( it.currentKey() );
if (!rw->absolutePosition(xp, yp) ||
- !visibleRect.intersects(QRect(xp, yp, w->width(), w->height())))
+ !visibleRect.intersects(TQRect(xp, yp, w->width(), w->height())))
toRemove.append(rw);
}
for (RenderWidget* r = toRemove.first(); r; r = toRemove.next())
@@ -3563,7 +3563,7 @@ void KHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap)
int time = parsing ? 300 : (!asap ? ( !d->complete ? 100 : 20 ) : 0);
#ifdef DEBUG_FLICKER
- QPainter p;
+ TQPainter p;
p.begin( viewport() );
int vx, vy;
@@ -3572,7 +3572,7 @@ void KHTMLView::scheduleRepaint(int x, int y, int w, int h, bool asap)
p.end();
#endif
- d->updateRegion = d->updateRegion.unite(QRect(x,y,w,h));
+ d->updateRegion = d->updateRegion.unite(TQRect(x,y,w,h));
if (asap && !parsing)
unscheduleRepaint();
@@ -3703,7 +3703,7 @@ void KHTMLView::ensureNodeHasFocus(NodeImpl *node)
// Set focus node on the document
#if DEBUG_CARETMODE > 1
kdDebug(6200) << k_funcinfo << "firstAncestor " << firstAncestor << ": "
- << (firstAncestor ? firstAncestor->nodeName().string() : QString::null) << endl;
+ << (firstAncestor ? firstAncestor->nodeName().string() : TQString::null) << endl;
#endif
doc->setFocusNode(firstAncestor);
emit m_part->nodeActivated(Node(firstAncestor));
@@ -3715,7 +3715,7 @@ void KHTMLView::recalcAndStoreCaretPos(CaretBox *hintBox)
d->caretViewContext();
NodeImpl *caretNode = m_part->d->caretNode().handle();
#if DEBUG_CARETMODE > 0
- kdDebug(6200) << "recalcAndStoreCaretPos: caretNode=" << caretNode << (caretNode ? " "+caretNode->nodeName().string() : QString::null) << " r@" << caretNode->renderer() << (caretNode->renderer() && caretNode->renderer()->isText() ? " \"" + QConstString(static_cast<RenderText *>(caretNode->renderer())->str->s, kMin(static_cast<RenderText *>(caretNode->renderer())->str->l, 15u)).string() + "\"" : QString::null) << endl;
+ kdDebug(6200) << "recalcAndStoreCaretPos: caretNode=" << caretNode << (caretNode ? " "+caretNode->nodeName().string() : TQString::null) << " r@" << caretNode->renderer() << (caretNode->renderer() && caretNode->renderer()->isText() ? " \"" + TQConstString(static_cast<RenderText *>(caretNode->renderer())->str->s, kMin(static_cast<RenderText *>(caretNode->renderer())->str->l, 15u)).string() + "\"" : TQString::null) << endl;
#endif
caretNode->getCaret(m_part->d->caretOffset(), caretOverrides(),
d->m_caretViewContext->x, d->m_caretViewContext->y,
@@ -3727,7 +3727,7 @@ void KHTMLView::recalcAndStoreCaretPos(CaretBox *hintBox)
kdDebug(6200) << "using hint inline box coordinates" << endl;
#endif
RenderObject *r = caretNode->renderer();
- const QFontMetrics &fm = r->style()->fontMetrics();
+ const TQFontMetrics &fm = r->style()->fontMetrics();
int absx, absy;
r->containingBlock()->absolutePosition(absx, absy,
false); // ### what about fixed?
@@ -3990,7 +3990,7 @@ void KHTMLView::updateSelection(NodeImpl *oldStartSel, long oldStartOfs,
}/*end if*/
}
-void KHTMLView::caretKeyPressEvent(QKeyEvent *_ke)
+void KHTMLView::caretKeyPressEvent(TQKeyEvent *_ke)
{
NodeImpl *oldStartSel = m_part->d->m_selectionStart.handle();
long oldStartOfs = m_part->d->m_startOffset;
@@ -4185,7 +4185,7 @@ void KHTMLView::placeCaretOnLine(CaretBox *caretBox, int x, int absx, int absy)
kdDebug(6200) << "xPos: " << caretBox->xPos() << " yPos: " << caretBox->yPos()
<< " width: " << caretBox->width() << " height: " << caretBox->height() << endl;
InlineTextBox *tb = static_cast<InlineTextBox *>(caretBox->inlineBox());
- if (caretBox->isInlineTextBox()) { kdDebug(6200) << "contains \"" << QString(static_cast<RenderText *>(tb->object())->str->s + tb->m_start, tb->m_len) << "\"" << endl;}
+ if (caretBox->isInlineTextBox()) { kdDebug(6200) << "contains \"" << TQString(static_cast<RenderText *>(tb->object())->str->s + tb->m_start, tb->m_len) << "\"" << endl;}
#endif
// inquire height of caret
int caretHeight = caretBox->height();
@@ -4194,7 +4194,7 @@ void KHTMLView::placeCaretOnLine(CaretBox *caretBox, int x, int absx, int absy)
if (isText) {
// text boxes need extrawurst
RenderText *t = static_cast<RenderText *>(caretRender);
- const QFontMetrics &fm = t->metrics(caretBox->inlineBox()->m_firstLine);
+ const TQFontMetrics &fm = t->metrics(caretBox->inlineBox()->m_firstLine);
caretHeight = fm.height();
yOfs = caretBox->inlineBox()->baseline() - fm.ascent();
}/*end if*/
@@ -4365,7 +4365,7 @@ void KHTMLView::moveCaretBy(bool next, CaretMovement cmv, int count)
//kdDebug(6200) << "mapRTD" << endl;
caretNodeRef = node;
#if DEBUG_CARETMODE > 2
- kdDebug(6200) << "set by valid node " << node << " " << (node?node->nodeName().string():QString::null) << " offset: " << offset << endl;
+ kdDebug(6200) << "set by valid node " << node << " " << (node?node->nodeName().string():TQString::null) << " offset: " << offset << endl;
#endif
} else {
offset = next ? caretNode->maxOffset() : caretNode->minOffset();
diff --git a/khtml/khtmlview.h b/khtml/khtmlview.h
index c44dba28a..fc9d1d7d6 100644
--- a/khtml/khtmlview.h
+++ b/khtml/khtmlview.h
@@ -26,7 +26,7 @@
#define KHTMLVIEW_H
// qt includes and classes
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kdelibs_export.h>
@@ -71,7 +71,7 @@ class KHTMLPart;
class KHTMLViewPrivate;
/**
- * Renders and displays HTML in a QScrollView.
+ * Renders and displays HTML in a TQScrollView.
*
* Suitable for use as an application's main view.
**/
@@ -103,7 +103,7 @@ public:
/**
* Constructs a KHTMLView.
*/
- KHTMLView( KHTMLPart *part, QWidget *parent, const char *name=0 );
+ KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name=0 );
virtual ~KHTMLView();
/**
@@ -185,32 +185,32 @@ signals:
protected:
void clear();
- virtual void resizeEvent ( QResizeEvent * event );
- virtual void showEvent ( QShowEvent * );
- virtual void hideEvent ( QHideEvent *);
+ virtual void resizeEvent ( TQResizeEvent * event );
+ virtual void showEvent ( TQShowEvent * );
+ virtual void hideEvent ( TQHideEvent *);
virtual bool focusNextPrevChild( bool next );
- virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
- virtual void drawContents( QPainter* );
- virtual void viewportMousePressEvent( QMouseEvent * );
- virtual void focusInEvent( QFocusEvent * );
- virtual void focusOutEvent( QFocusEvent * );
- virtual void viewportMouseDoubleClickEvent( QMouseEvent * );
- virtual void viewportMouseMoveEvent(QMouseEvent *);
- virtual void viewportMouseReleaseEvent(QMouseEvent *);
- virtual void viewportResizeEvent(QResizeEvent*);
+ virtual void drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph );
+ virtual void drawContents( TQPainter* );
+ virtual void viewportMousePressEvent( TQMouseEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
+ virtual void focusOutEvent( TQFocusEvent * );
+ virtual void viewportMouseDoubleClickEvent( TQMouseEvent * );
+ virtual void viewportMouseMoveEvent(TQMouseEvent *);
+ virtual void viewportMouseReleaseEvent(TQMouseEvent *);
+ virtual void viewportResizeEvent(TQResizeEvent*);
#ifndef QT_NO_WHEELEVENT
- virtual void viewportWheelEvent(QWheelEvent*);
+ virtual void viewportWheelEvent(TQWheelEvent*);
#endif
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
- virtual void closeEvent ( QCloseEvent * );
- virtual bool eventFilter(QObject *, QEvent *);
-
- void keyPressEvent( QKeyEvent *_ke );
- void keyReleaseEvent ( QKeyEvent *_ke );
- void contentsContextMenuEvent ( QContextMenuEvent *_ce );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
+ virtual void closeEvent ( TQCloseEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+
+ void keyPressEvent( TQKeyEvent *_ke );
+ void keyReleaseEvent ( TQKeyEvent *_ke );
+ void contentsContextMenuEvent ( TQContextMenuEvent *_ce );
void doAutoScroll();
- void timerEvent ( QTimerEvent * );
+ void timerEvent ( TQTimerEvent * );
protected slots:
void slotPaletteChanged();
void slotScrollBarMoved();
@@ -241,21 +241,21 @@ private:
bool dialogsAllowed();
/**
- * Paints the HTML document to a QPainter.
+ * Paints the HTML document to a TQPainter.
* The document will be scaled to match the width of
* rc and clipped to fit in the height.
* yOff determines the vertical offset in the document to start with.
* more, if nonzero will be set to true if the documents extends
* beyond the rc or false if everything below yOff was painted.
**/
- void paint(QPainter *p, const QRect &rc, int yOff = 0, bool *more = 0);
+ void paint(TQPainter *p, const TQRect &rc, int yOff = 0, bool *more = 0);
#if 0
/**
- * Paints the HTML document to a QPainter.
+ * Paints the HTML document to a TQPainter.
* The document will be scaled to match the width.
**/
- void paint(QPainter *p, int width);
+ void paint(TQPainter *p, int width);
#endif
/**
@@ -268,18 +268,18 @@ private:
* you only need to enable the media type in the view and if necessary
* add the media type dependent changes to the renderer.
*/
- void setMediaType( const QString &medium );
- QString mediaType() const;
+ void setMediaType( const TQString &medium );
+ TQString mediaType() const;
bool pagedMode() const;
- bool scrollTo(const QRect &);
+ bool scrollTo(const TQRect &);
bool focusNextPrevNode(bool next);
- bool handleAccessKey(const QKeyEvent* ev);
- bool focusNodeWithAccessKey(QChar c, KHTMLView* caller = NULL);
- QMap< DOM::ElementImpl*, QChar > buildFallbackAccessKeys() const;
- void displayAccessKeys( KHTMLView* caller, KHTMLView* origview, QValueVector< QChar >& taken, bool use_fallbacks );
+ bool handleAccessKey(const TQKeyEvent* ev);
+ bool focusNodeWithAccessKey(TQChar c, KHTMLView* caller = NULL);
+ TQMap< DOM::ElementImpl*, TQChar > buildFallbackAccessKeys() const;
+ void displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks );
void useSlowRepaints();
@@ -292,19 +292,19 @@ private:
void restoreScrollBar();
- QStringList formCompletionItems(const QString &name) const;
- void clearCompletionHistory(const QString& name);
- void addFormCompletionItem(const QString &name, const QString &value);
+ TQStringList formCompletionItems(const TQString &name) const;
+ void clearCompletionHistory(const TQString& name);
+ void addFormCompletionItem(const TQString &name, const TQString &value);
- void addNonPasswordStorableSite( const QString& host );
- bool nonPasswordStorableSite( const QString& host ) const;
+ void addNonPasswordStorableSite( const TQString& host );
+ bool nonPasswordStorableSite( const TQString& host ) const;
bool dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
DOM::NodeImpl *targetNodeNonShared, bool cancelable,
- int detail,QMouseEvent *_mouse, bool setUnder,
+ int detail,TQMouseEvent *_mouse, bool setUnder,
int mouseEventType);
- bool dispatchKeyEvent( QKeyEvent *_ke );
- bool dispatchKeyEventHelper( QKeyEvent *_ke, bool generate_keypress );
+ bool dispatchKeyEvent( TQKeyEvent *_ke );
+ bool dispatchKeyEventHelper( TQKeyEvent *_ke, bool generate_keypress );
void complete( bool pendingAction );
@@ -460,7 +460,7 @@ private:
/**
* Evaluates key presses on editable nodes.
*/
- void caretKeyPressEvent(QKeyEvent *);
+ void caretKeyPressEvent(TQKeyEvent *);
// -- caret navigation member functions
@@ -597,7 +597,7 @@ private:
KHTMLPart *m_part;
KHTMLViewPrivate *d;
- QString m_medium; // media type
+ TQString m_medium; // media type
};
#endif
diff --git a/khtml/kjserrordlg.ui.h b/khtml/kjserrordlg.ui.h
index 2513f6308..50b73568e 100644
--- a/khtml/kjserrordlg.ui.h
+++ b/khtml/kjserrordlg.ui.h
@@ -10,17 +10,17 @@
void KJSErrorDlg::init()
{
- _errorText->setTextFormat(QTextEdit::LogText);
+ _errorText->setTextFormat(TQTextEdit::LogText);
_errorText->setMaxLogLines(2048);//Limit to about 2K errors so we don't use much CPU
}
-void KJSErrorDlg::addError( const QString & error )
+void KJSErrorDlg::addError( const TQString & error )
{
_errorText->append(error);
}
-void KJSErrorDlg::setURL( const QString & url )
+void KJSErrorDlg::setURL( const TQString & url )
{
_url->setText(url);
}
diff --git a/khtml/kmultipart/kmultipart.cpp b/khtml/kmultipart/kmultipart.cpp
index 708bfc54f..17ea9d485 100644
--- a/khtml/kmultipart/kmultipart.cpp
+++ b/khtml/kmultipart/kmultipart.cpp
@@ -19,12 +19,12 @@
#include "kmultipart.h"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kinstance.h>
#include <kmimetype.h>
#include <klocale.h>
#include <kio/job.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kmessagebox.h>
#include <kparts/componentfactory.h>
@@ -32,7 +32,7 @@
#include <khtml_part.h>
#include <unistd.h>
#include <kxmlguifactory.h>
-#include <qtimer.h>
+#include <tqtimer.h>
typedef KParts::GenericFactory<KMultiPart> KMultiPartFactory; // factory for the part
K_EXPORT_COMPONENT_FACTORY( libkmultipart /*library name*/, KMultiPartFactory )
@@ -51,7 +51,7 @@ public:
Q_ASSERT( !m_lineComplete );
if ( storeNewline || c != '\n' ) {
int sz = m_currentLine.size();
- m_currentLine.resize( sz+1, QGArray::SpeedOptim );
+ m_currentLine.resize( sz+1, TQGArray::SpeedOptim );
m_currentLine[sz] = c;
}
if ( c == '\n' )
@@ -60,7 +60,7 @@ public:
bool isLineComplete() const {
return m_lineComplete;
}
- QByteArray currentLine() const {
+ TQByteArray currentLine() const {
return m_currentLine;
}
void clearLine() {
@@ -68,11 +68,11 @@ public:
reset();
}
void reset() {
- m_currentLine.resize( 0, QGArray::SpeedOptim );
+ m_currentLine.resize( 0, TQGArray::SpeedOptim );
m_lineComplete = false;
}
private:
- QByteArray m_currentLine;
+ TQByteArray m_currentLine;
bool m_lineComplete; // true when ending with '\n'
};
@@ -93,15 +93,15 @@ Data for the second and last object.
*/
-KMultiPart::KMultiPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& )
+KMultiPart::KMultiPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& )
: KParts::ReadOnlyPart( parent, name )
{
m_filter = 0L;
setInstance( KMultiPartFactory::instance() );
- QVBox *box = new QVBox( parentWidget, widgetName );
+ TQVBox *box = new TQVBox( parentWidget, widgetName );
setWidget( box );
m_extension = new KParts::BrowserExtension( this );
@@ -114,8 +114,8 @@ KMultiPart::KMultiPart( QWidget *parentWidget, const char *widgetName,
m_lineParser = new KLineParser;
m_tempFile = 0L;
- m_timer = new QTimer( this );
- connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotProgressInfo() ) );
+ m_timer = new TQTimer( this );
+ connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotProgressInfo() ) );
}
KMultiPart::~KMultiPart()
@@ -167,10 +167,10 @@ bool KMultiPart::openURL( const KURL &url )
emit started( 0 /*m_job*/ ); // don't pass the job, it would interfer with our own infoMessage
- connect( m_job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotJobFinished( KIO::Job * ) ) );
- connect( m_job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotJobFinished( KIO::Job * ) ) );
+ connect( m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
m_numberOfFrames = 0;
m_numberOfFramesSkipped = 0;
@@ -184,17 +184,17 @@ bool KMultiPart::openURL( const KURL &url )
// Yes, libkdenetwork's has such a parser already (MultiPart),
// but it works on the complete string, expecting the whole data to be available....
// The version here is asynchronous.
-void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
+void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data )
{
if (m_boundary.isNull())
{
- QString tmp = job->queryMetaData("media-boundary");
+ TQString tmp = job->queryMetaData("media-boundary");
kdDebug() << "Got Boundary from kio-http '" << tmp << "'" << endl;
if ( !tmp.isEmpty() ) {
if (tmp.startsWith("--"))
m_boundary = tmp.latin1();
else
- m_boundary = QCString("--")+tmp.latin1();
+ m_boundary = TQCString("--")+tmp.latin1();
m_boundaryLength = m_boundary.length();
}
}
@@ -205,11 +205,11 @@ void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
m_lineParser->addChar( data[i], !m_bParsingHeader );
if ( m_lineParser->isLineComplete() )
{
- QByteArray lineData = m_lineParser->currentLine();
+ TQByteArray lineData = m_lineParser->currentLine();
#ifdef DEBUG_PARSING
kdDebug() << "lineData.size()=" << lineData.size() << endl;
#endif
- QCString line( lineData.data(), lineData.size()+1 ); // deep copy
+ TQCString line( lineData.data(), lineData.size()+1 ); // deep copy
// 0-terminate the data, but only for the line-based tests below
// We want to keep the raw data in case it ends up in sendData()
int sz = line.size();
@@ -234,7 +234,7 @@ void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
}
else if ( !qstrnicmp( line.data(), "Content-Encoding:", 17 ) )
{
- QString encoding = QString::fromLatin1(line.data()+17).stripWhiteSpace().lower();
+ TQString encoding = TQString::fromLatin1(line.data()+17).stripWhiteSpace().lower();
if (encoding == "gzip" || encoding == "x-gzip") {
m_gzip = true;
} else {
@@ -245,7 +245,7 @@ void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
else if ( !qstrnicmp( line.data(), "Content-Type:", 13 ) )
{
Q_ASSERT( m_nextMimeType.isNull() );
- m_nextMimeType = QString::fromLatin1( line.data() + 14 ).stripWhiteSpace();
+ m_nextMimeType = TQString::fromLatin1( line.data() + 14 ).stripWhiteSpace();
int semicolon = m_nextMimeType.find( ';' );
if ( semicolon != -1 )
m_nextMimeType = m_nextMimeType.left( semicolon );
@@ -305,7 +305,7 @@ void KMultiPart::slotData( KIO::Job *job, const QByteArray &data )
}
}
-void KMultiPart::setPart( const QString& mimeType )
+void KMultiPart::setPart( const TQString& mimeType )
{
KXMLGUIFactory *guiFactory = factory();
if ( guiFactory ) // seems to be 0 when restoring from SM
@@ -314,7 +314,7 @@ void KMultiPart::setPart( const QString& mimeType )
delete m_part;
// Try to find an appropriate viewer component
m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>
- ( m_mimeType, QString::null, widget(), 0L, this, 0L );
+ ( m_mimeType, TQString::null, widget(), 0L, this, 0L );
if ( !m_part ) {
// TODO launch external app
KMessageBox::error( widget(), i18n("No handler found for %1!").arg(m_mimeType) );
@@ -324,8 +324,8 @@ void KMultiPart::setPart( const QString& mimeType )
insertChildClient( m_part );
m_part->widget()->show();
- connect( m_part, SIGNAL( completed() ),
- this, SLOT( slotPartCompleted() ) );
+ connect( m_part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotPartCompleted() ) );
m_isHTMLPart = ( mimeType == "text/html" );
KParts::BrowserExtension* childExtension = KParts::BrowserExtension::childObject( m_part );
@@ -336,62 +336,62 @@ void KMultiPart::setPart( const QString& mimeType )
// Forward signals from the part's browser extension
// this is very related (but not exactly like) KHTMLPart::processObjectRequest
- connect( childExtension, SIGNAL( openURLNotify() ),
- m_extension, SIGNAL( openURLNotify() ) );
+ connect( childExtension, TQT_SIGNAL( openURLNotify() ),
+ m_extension, TQT_SIGNAL( openURLNotify() ) );
- connect( childExtension, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
- m_extension, SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect( childExtension, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+ m_extension, TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ) );
- connect( childExtension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
- m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
- connect( childExtension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
- m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
+ connect( childExtension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
+ m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
+ connect( childExtension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
+ m_extension, TQT_SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
// Keep in sync with khtml_part.cpp
- connect( childExtension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
- m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ) );
- connect( childExtension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
- m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
- connect( childExtension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ),
- m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ) );
- connect( childExtension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
- m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
- connect( childExtension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
- m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
- connect( childExtension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
- m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( const TQPoint &, const KFileItemList & ) ),
+ m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KFileItemList & ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList & ) ),
+ m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList & ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ),
+ m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KFileItemList &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t ) ),
+ m_extension, TQT_SIGNAL( popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const TQString &, mode_t ) ),
+ m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const TQString &, mode_t ) ) );
+ connect( childExtension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ),
+ m_extension, TQT_SIGNAL( popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &, const KParts::URLArgs &, KParts::BrowserExtension::PopupFlags, mode_t ) ) );
if ( m_isHTMLPart )
- connect( childExtension, SIGNAL( infoMessage( const QString & ) ),
- m_extension, SIGNAL( infoMessage( const QString & ) ) );
+ connect( childExtension, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ m_extension, TQT_SIGNAL( infoMessage( const TQString & ) ) );
// For non-HTML we prefer to show our infoMessage ourselves.
childExtension->setBrowserInterface( m_extension->browserInterface() );
- connect( childExtension, SIGNAL( enableAction( const char *, bool ) ),
- m_extension, SIGNAL( enableAction( const char *, bool ) ) );
- connect( childExtension, SIGNAL( setLocationBarURL( const QString& ) ),
- m_extension, SIGNAL( setLocationBarURL( const QString& ) ) );
- connect( childExtension, SIGNAL( setIconURL( const KURL& ) ),
- m_extension, SIGNAL( setIconURL( const KURL& ) ) );
- connect( childExtension, SIGNAL( loadingProgress( int ) ),
- m_extension, SIGNAL( loadingProgress( int ) ) );
+ connect( childExtension, TQT_SIGNAL( enableAction( const char *, bool ) ),
+ m_extension, TQT_SIGNAL( enableAction( const char *, bool ) ) );
+ connect( childExtension, TQT_SIGNAL( setLocationBarURL( const TQString& ) ),
+ m_extension, TQT_SIGNAL( setLocationBarURL( const TQString& ) ) );
+ connect( childExtension, TQT_SIGNAL( setIconURL( const KURL& ) ),
+ m_extension, TQT_SIGNAL( setIconURL( const KURL& ) ) );
+ connect( childExtension, TQT_SIGNAL( loadingProgress( int ) ),
+ m_extension, TQT_SIGNAL( loadingProgress( int ) ) );
if ( m_isHTMLPart ) // for non-HTML we have our own
- connect( childExtension, SIGNAL( speedProgress( int ) ),
- m_extension, SIGNAL( speedProgress( int ) ) );
- connect( childExtension, SIGNAL( selectionInfo( const KFileItemList& ) ),
- m_extension, SIGNAL( selectionInfo( const KFileItemList& ) ) );
- connect( childExtension, SIGNAL( selectionInfo( const QString& ) ),
- m_extension, SIGNAL( selectionInfo( const QString& ) ) );
- connect( childExtension, SIGNAL( selectionInfo( const KURL::List& ) ),
- m_extension, SIGNAL( selectionInfo( const KURL::List& ) ) );
- connect( childExtension, SIGNAL( mouseOverInfo( const KFileItem* ) ),
- m_extension, SIGNAL( mouseOverInfo( const KFileItem* ) ) );
- connect( childExtension, SIGNAL( moveTopLevelWidget( int, int ) ),
- m_extension, SIGNAL( moveTopLevelWidget( int, int ) ) );
- connect( childExtension, SIGNAL( resizeTopLevelWidget( int, int ) ),
- m_extension, SIGNAL( resizeTopLevelWidget( int, int ) ) );
+ connect( childExtension, TQT_SIGNAL( speedProgress( int ) ),
+ m_extension, TQT_SIGNAL( speedProgress( int ) ) );
+ connect( childExtension, TQT_SIGNAL( selectionInfo( const KFileItemList& ) ),
+ m_extension, TQT_SIGNAL( selectionInfo( const KFileItemList& ) ) );
+ connect( childExtension, TQT_SIGNAL( selectionInfo( const TQString& ) ),
+ m_extension, TQT_SIGNAL( selectionInfo( const TQString& ) ) );
+ connect( childExtension, TQT_SIGNAL( selectionInfo( const KURL::List& ) ),
+ m_extension, TQT_SIGNAL( selectionInfo( const KURL::List& ) ) );
+ connect( childExtension, TQT_SIGNAL( mouseOverInfo( const KFileItem* ) ),
+ m_extension, TQT_SIGNAL( mouseOverInfo( const KFileItem* ) ) );
+ connect( childExtension, TQT_SIGNAL( moveTopLevelWidget( int, int ) ),
+ m_extension, TQT_SIGNAL( moveTopLevelWidget( int, int ) ) );
+ connect( childExtension, TQT_SIGNAL( resizeTopLevelWidget( int, int ) ),
+ m_extension, TQT_SIGNAL( resizeTopLevelWidget( int, int ) ) );
}
m_partIsLoading = false;
@@ -414,7 +414,7 @@ void KMultiPart::startOfData()
if ( m_gzip )
{
m_filter = new HTTPFilterGZip;
- connect( m_filter, SIGNAL( output( const QByteArray& ) ), this, SLOT( reallySendData( const QByteArray& ) ) );
+ connect( m_filter, TQT_SIGNAL( output( const TQByteArray& ) ), this, TQT_SLOT( reallySendData( const TQByteArray& ) ) );
}
if ( m_mimeType != m_nextMimeType )
@@ -429,7 +429,7 @@ void KMultiPart::startOfData()
if ( childExtension )
childExtension->setURLArgs( m_extension->urlArgs() );
- m_nextMimeType = QString::null;
+ m_nextMimeType = TQString::null;
if ( m_tempFile ) {
m_tempFile->setAutoDelete( true );
delete m_tempFile;
@@ -442,12 +442,12 @@ void KMultiPart::startOfData()
}
else
{
- // ###### TODO use a QByteArray and a data: URL instead
+ // ###### TODO use a TQByteArray and a data: URL instead
m_tempFile = new KTempFile;
}
}
-void KMultiPart::sendData( const QByteArray& line )
+void KMultiPart::sendData( const TQByteArray& line )
{
if ( m_filter )
{
@@ -459,7 +459,7 @@ void KMultiPart::sendData( const QByteArray& line )
}
}
-void KMultiPart::reallySendData( const QByteArray& line )
+void KMultiPart::reallySendData( const TQByteArray& line )
{
if ( m_isHTMLPart )
{
@@ -511,7 +511,7 @@ void KMultiPart::slotPartCompleted()
// Delete temp file used by the part
Q_ASSERT( m_part->url().isLocalFile() );
kdDebug() << "slotPartCompleted deleting " << m_part->url().path() << endl;
- (void) unlink( QFile::encodeName( m_part->url().path() ) );
+ (void) unlink( TQFile::encodeName( m_part->url().path() ) );
m_partIsLoading = false;
++m_numberOfFrames;
// Do not emit completed from here.
@@ -551,7 +551,7 @@ void KMultiPart::slotJobFinished( KIO::Job *job )
emit completed();
- //QTimer::singleShot( 0, this, SLOT( updateWindowCaption() ) );
+ //TQTimer::singleShot( 0, this, TQT_SLOT( updateWindowCaption() ) );
}
m_job = 0L;
}
@@ -563,7 +563,7 @@ void KMultiPart::slotProgressInfo()
if ( m_totalNumberOfFrames == m_numberOfFrames + m_numberOfFramesSkipped )
return; // No change, don't overwrite statusbar messages if any
//kdDebug() << m_numberOfFrames << " in " << time << " milliseconds" << endl;
- QString str( "%1 frames per second, %2 frames skipped per second" );
+ TQString str( "%1 frames per second, %2 frames skipped per second" );
str = str.arg( 1000.0 * (double)m_numberOfFrames / (double)time );
str = str.arg( 1000.0 * (double)m_numberOfFramesSkipped / (double)time );
m_totalNumberOfFrames = m_numberOfFrames + m_numberOfFramesSkipped;
diff --git a/khtml/kmultipart/kmultipart.h b/khtml/kmultipart/kmultipart.h
index b0633a64d..f3bf95219 100644
--- a/khtml/kmultipart/kmultipart.h
+++ b/khtml/kmultipart/kmultipart.h
@@ -26,7 +26,7 @@
#include <kparts/factory.h>
#include <kparts/browserextension.h>
#include <kaboutdata.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KHTMLPart;
class KInstance;
@@ -40,8 +40,8 @@ class KMultiPart : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KMultiPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& );
+ KMultiPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& );
virtual ~KMultiPart();
virtual bool openFile() { return false; }
@@ -53,17 +53,17 @@ public:
protected:
virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
- void setPart( const QString& mimeType );
+ void setPart( const TQString& mimeType );
void startOfData();
- void sendData( const QByteArray& line );
+ void sendData( const TQByteArray& line );
void endOfData();
private slots:
- void reallySendData( const QByteArray& line );
- //void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u, const QString &mime, mode_t mode );
+ void reallySendData( const TQByteArray& line );
+ //void slotPopupMenu( KXMLGUIClient *cl, const TQPoint &pos, const KURL &u, const TQString &mime, mode_t mode );
void slotJobFinished( KIO::Job *job );
- void slotData( KIO::Job *, const QByteArray & );
+ void slotData( KIO::Job *, const TQByteArray & );
//void updateWindowCaption();
void slotPartCompleted();
@@ -74,14 +74,14 @@ private slots:
private:
KParts::BrowserExtension* m_extension;
- QGuardedPtr<KParts::ReadOnlyPart> m_part;
+ TQGuardedPtr<KParts::ReadOnlyPart> m_part;
bool m_isHTMLPart;
bool m_partIsLoading;
KIO::Job* m_job;
- QCString m_boundary;
+ TQCString m_boundary;
int m_boundaryLength;
- QString m_mimeType; // the one handled by m_part - store the kservice instead?
- QString m_nextMimeType; // while parsing headers
+ TQString m_mimeType; // the one handled by m_part - store the kservice instead?
+ TQString m_nextMimeType; // while parsing headers
KTempFile* m_tempFile;
KLineParser* m_lineParser;
bool m_bParsingHeader;
@@ -92,8 +92,8 @@ private:
long m_totalNumberOfFrames;
long m_numberOfFrames;
long m_numberOfFramesSkipped;
- QTime m_qtime;
- QTimer* m_timer;
+ TQTime m_qtime;
+ TQTimer* m_timer;
};
#if 0
diff --git a/khtml/misc/decoder.cpp b/khtml/misc/decoder.cpp
index 56f68b429..f227f4014 100644
--- a/khtml/misc/decoder.cpp
+++ b/khtml/misc/decoder.cpp
@@ -36,8 +36,8 @@ using namespace khtml;
#include "htmlhashes.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -51,7 +51,7 @@ using namespace khtml;
Decoder::Decoder()
{
// latin1
- m_codec = QTextCodec::codecForMib(4);
+ m_codec = TQTextCodec::codecForMib(4);
m_decoder = m_codec->makeDecoder();
enc = 0;
m_type = DefaultEncoding;
@@ -86,9 +86,9 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
return;
#ifdef APPLE_CHANGES
- QTextCodec *codec = (type == EncodingFromMetaTag || type == EncodingFromXMLHeader)
- ? QTextCodec::codecForNameEightBitOnly(enc)
- : QTextCodec::codecForName(enc);
+ TQTextCodec *codec = (type == EncodingFromMetaTag || type == EncodingFromXMLHeader)
+ ? TQTextCodec::codecForNameEightBitOnly(enc)
+ : TQTextCodec::codecForName(enc);
if (codec) {
enc = codec->name();
visualRTL = codec->usesVisualOrdering();
@@ -97,7 +97,7 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
if(enc == "visual") // hebrew visually ordered
enc = "iso8859-8";
bool b;
- QTextCodec *codec = KGlobal::charsets()->codecForName(enc, b);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(enc, b);
if (!b)
codec = 0;
@@ -110,8 +110,8 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
}
if (codec && codec->mibEnum() == 11) {
- //We do NOT want to use Qt's QHebrewCodec, since it tries to reorder itself.
- codec = QTextCodec::codecForName("iso8859-8-i");
+ //We do NOT want to use Qt's TQHebrewCodec, since it tries to reorder itself.
+ codec = TQTextCodec::codecForName("iso8859-8-i");
// visually ordered unless one of the following
if( !(enc == "iso-8859-8-i" || enc == "iso_8859-8-i"
@@ -166,7 +166,7 @@ static void skipComment(const char *&ptr, const char *pEnd)
}
// Returns the position of the encoding string.
-static int findXMLEncoding(const QCString &str, int &encodingLength)
+static int findXMLEncoding(const TQCString &str, int &encodingLength)
{
int len = str.length();
@@ -214,7 +214,7 @@ static int findXMLEncoding(const QCString &str, int &encodingLength)
return pos;
}
-QString Decoder::decode(const char *data, int len)
+TQString Decoder::decode(const char *data, int len)
{
// Check for UTF-16 or UTF-8 BOM mark at the beginning, which is a sure sign of a Unicode encoding.
int bufferLength = buffer.length();
@@ -257,7 +257,7 @@ QString Decoder::decode(const char *data, int len)
// If we found a BOM, use the encoding it implies.
if (autoDetectedEncoding != 0) {
m_type = AutoDetectedEncoding;
- m_codec = QTextCodec::codecForName(autoDetectedEncoding);
+ m_codec = TQTextCodec::codecForName(autoDetectedEncoding);
assert(m_codec);
enc = m_codec->name();
delete m_decoder;
@@ -295,7 +295,7 @@ QString Decoder::decode(const char *data, int len)
i--;
}
}
- buffer += QCString(data, len+1);
+ buffer += TQCString(data, len+1);
#endif
// we still don't have an encoding, and are in the head
// the following tags are allowed in <head>:
@@ -327,7 +327,7 @@ QString Decoder::decode(const char *data, int len)
while (*end != '>' && *end != '\0') end++;
if (*end == '\0')
break;
- QCString str(ptr, end - ptr + 1); //+1 as it must include the \0 terminator
+ TQCString str(ptr, end - ptr + 1); //+1 as it must include the \0 terminator
int len;
int pos = findXMLEncoding(str, len);
if (pos != -1) {
@@ -362,7 +362,7 @@ QString Decoder::decode(const char *data, int len)
const char * end = ptr;
while(*end != '>' && *end != '\0') end++;
if ( *end == '\0' ) break;
- QCString str( ptr, (end-ptr)+1);
+ TQCString str( ptr, (end-ptr)+1);
str = str.lower();
int pos = 0;
//if( (pos = str.find("http-equiv", pos)) == -1) break;
@@ -442,7 +442,7 @@ QString Decoder::decode(const char *data, int len)
body = true;
goto found;
}
- return QString::null;
+ return TQString::null;
}
}
@@ -505,16 +505,16 @@ QString Decoder::decode(const char *data, int len)
if (!m_codec)
{
if(enc.isEmpty()) enc = "iso8859-1";
- m_codec = QTextCodec::codecForName(enc);
+ m_codec = TQTextCodec::codecForName(enc);
// be sure not to crash
if(!m_codec) {
- m_codec = QTextCodec::codecForMib(4);
+ m_codec = TQTextCodec::codecForMib(4);
enc = "iso8859-1";
}
delete m_decoder;
m_decoder = m_codec->makeDecoder();
}
- QString out;
+ TQString out;
if(!buffer.isEmpty() && enc != "ISO-10646-UCS-2") {
out = m_decoder->toUnicode(buffer, buffer.length());
@@ -522,7 +522,7 @@ QString Decoder::decode(const char *data, int len)
} else {
if(m_codec->mibEnum() != 1000) // utf16
{
- // ### hack for a bug in QTextCodec. It cut's the input stream
+ // ### hack for a bug in TQTextCodec. It cut's the input stream
// in case there are \0 in it. ZDNET has them inside... :-(
char *d = const_cast<char *>(data);
int i = len - 1;
@@ -537,12 +537,12 @@ QString Decoder::decode(const char *data, int len)
return out;
}
-QString Decoder::flush() const
+TQString Decoder::flush() const
{
return m_decoder->toUnicode(buffer, buffer.length());
}
-QCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) || ptr[ i ] == 0xA1 || ptr[ i ] == 0xA2 || ptr[ i ] == 0xA3
@@ -556,7 +556,7 @@ QCString Decoder::automaticDetectionForArabic( const unsigned char* ptr, int siz
return "iso-8859-6";
}
-QCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9E ) )
@@ -569,9 +569,9 @@ QCString Decoder::automaticDetectionForBaltic( const unsigned char* ptr, int siz
return "iso-8859-13";
}
-QCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
{
- QCString charset = QCString();
+ TQCString charset = TQCString();
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) {
if ( ptr[ i ] == 0x81 || ptr[ i ] == 0x83 || ptr[ i ] == 0x90 || ptr[ i ] == 0x98 )
@@ -601,7 +601,7 @@ QCString Decoder::automaticDetectionForCentralEuropean(const unsigned char* ptr,
return charset.data();
}
-QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int size, AutoDetectLanguage _language )
+TQCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int size, AutoDetectLanguage _language )
{
int koi_st=0;
int cp1251_st=0;
@@ -680,8 +680,8 @@ QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int s
if (ibm866_small_range>cp1251_small_range+koi_small_range)
return "ibm866"; //hehe this is a rare case :)
- QCString koi_string = "koi8-u";
- QCString cp1251_string = "cp1251";
+ TQCString koi_string = "koi8-u";
+ TQCString cp1251_string = "cp1251";
if (cp1251_st==0 && koi_st>1)
return koi_string;
@@ -714,7 +714,7 @@ QCString Decoder::automaticDetectionForCyrillic( const unsigned char* ptr, int s
}
-QCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x87 ) || ptr[ i ] == 0x89 || ptr[ i ] == 0x8B
@@ -727,7 +727,7 @@ QCString Decoder::automaticDetectionForGreek( const unsigned char* ptr, int size
return "iso-8859-7";
}
-QCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x89 ) || ptr[ i ] == 0x8B
@@ -743,7 +743,7 @@ QCString Decoder::automaticDetectionForHebrew( const unsigned char* ptr, int siz
return "iso-8859-8-i";
}
-QCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int size )
{
if (!kc)
kc = new JapaneseCode();
@@ -764,7 +764,7 @@ QCString Decoder::automaticDetectionForJapanese( const unsigned char* ptr, int s
return "";
}
-QCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x8C ) || ( ptr[ i ] >= 0x91 && ptr[ i ] <= 0x9C ) || ptr[ i ] == 0x9F ) {
@@ -775,7 +775,7 @@ QCString Decoder::automaticDetectionForTurkish( const unsigned char* ptr, int si
return "iso-8859-9";
}
-QCString Decoder::automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
+TQCString Decoder::automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F )
diff --git a/khtml/misc/decoder.h b/khtml/misc/decoder.h
index 613b14043..49c3835fe 100644
--- a/khtml/misc/decoder.h
+++ b/khtml/misc/decoder.h
@@ -22,7 +22,7 @@
#ifndef KHTMLDECODER_H
#define KHTMLDECODER_H
-#include <qstring.h>
+#include <tqstring.h>
class QTextCodec;
class QTextDecoder;
@@ -51,13 +51,13 @@ public:
void setEncoding(const char *encoding, EncodingType type);
const char *encoding() const;
- QString decode(const char *data, int len);
+ TQString decode(const char *data, int len);
bool visuallyOrdered() const { return visualRTL; }
- const QTextCodec *codec() const { return m_codec; }
+ const TQTextCodec *codec() const { return m_codec; }
- QString flush() const;
+ TQString flush() const;
enum AutoDetectLanguage {
@@ -84,23 +84,23 @@ public:
private:
- QCString automaticDetectionForArabic( const unsigned char* str, int size );
- QCString automaticDetectionForBaltic( const unsigned char* str, int size );
- QCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
- QCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
- QCString automaticDetectionForGreek( const unsigned char* str, int size );
- QCString automaticDetectionForHebrew( const unsigned char* str, int size );
- QCString automaticDetectionForJapanese( const unsigned char* str, int size );
- QCString automaticDetectionForTurkish( const unsigned char* str, int size );
- QCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForArabic( const unsigned char* str, int size );
+ TQCString automaticDetectionForBaltic( const unsigned char* str, int size );
+ TQCString automaticDetectionForCentralEuropean( const unsigned char* str, int size );
+ TQCString automaticDetectionForCyrillic( const unsigned char* str, int size, AutoDetectLanguage _language );
+ TQCString automaticDetectionForGreek( const unsigned char* str, int size );
+ TQCString automaticDetectionForHebrew( const unsigned char* str, int size );
+ TQCString automaticDetectionForJapanese( const unsigned char* str, int size );
+ TQCString automaticDetectionForTurkish( const unsigned char* str, int size );
+ TQCString automaticDetectionForWesternEuropean( const unsigned char* str, int size );
// codec used for decoding. default is Latin1.
- QTextCodec *m_codec;
- QTextDecoder *m_decoder; // only used for utf16
- QCString enc;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder; // only used for utf16
+ TQCString enc;
EncodingType m_type;
- QCString buffer;
+ TQCString buffer;
bool body;
bool beginning;
diff --git a/khtml/misc/guess_ja.cpp b/khtml/misc/guess_ja.cpp
index 0846d15eb..62934445b 100644
--- a/khtml/misc/guess_ja.cpp
+++ b/khtml/misc/guess_ja.cpp
@@ -37,7 +37,7 @@
*/
/*
- * Maybe we should use QTextCodec::heuristicContentMatch()
+ * Maybe we should use TQTextCodec::heuristicContentMatch()
* But it fails detection. It's not useful.
*/
#include "decoder.h"
diff --git a/khtml/misc/helper.cpp b/khtml/misc/helper.cpp
index eebba5015..f56a4ba92 100644
--- a/khtml/misc/helper.cpp
+++ b/khtml/misc/helper.cpp
@@ -22,25 +22,25 @@
*/
#include "helper.h"
#include "khtmllayout.h"
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqmap.h>
+#include <tqpainter.h>
#include <dom/dom_string.h>
#include <xml/dom_stringimpl.h>
#include <rendering/render_object.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kstaticdeleter.h>
#include <kapplication.h>
#include <kconfig.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
using namespace DOM;
using namespace khtml;
namespace khtml {
- QPainter *printpainter;
+ TQPainter *printpainter;
}
-void khtml::setPrintPainter( QPainter *printer )
+void khtml::setPrintPainter( TQPainter *printer )
{
printpainter = printer;
}
@@ -78,9 +78,9 @@ QRgb khtml::qRgbaFromHsla(double h, double s, double l, double a)
* @param obj render object
* @return the background color. It is guaranteed that a valid color is returned.
*/
-QColor khtml::retrieveBackgroundColor(const RenderObject *obj)
+TQColor khtml::retrieveBackgroundColor(const RenderObject *obj)
{
- QColor result;
+ TQColor result;
while (!obj->isCanvas()) {
result = obj->style()->backgroundColor();
if (result.isValid()) return result;
@@ -95,7 +95,7 @@ QColor khtml::retrieveBackgroundColor(const RenderObject *obj)
/** checks whether the given colors have enough contrast
* @returns @p true if contrast is ok.
*/
-bool khtml::hasSufficientContrast(const QColor &c1, const QColor &c2)
+bool khtml::hasSufficientContrast(const TQColor &c1, const TQColor &c2)
{
// New version from Germain Garand, better suited for contrast measurement
#if 1
diff --git a/khtml/misc/helper.h b/khtml/misc/helper.h
index 984ddfc11..4e5b0d7e8 100644
--- a/khtml/misc/helper.h
+++ b/khtml/misc/helper.h
@@ -22,10 +22,10 @@
#ifndef html_helper_h
#define html_helper_h
-#include <qcolor.h>
+#include <tqcolor.h>
class QPainter;
-#include <qfontmetrics.h>
-#include <qfont.h>
+#include <tqfontmetrics.h>
+#include <tqfont.h>
@@ -35,11 +35,11 @@ namespace khtml
const QRgb transparentColor = 0x00000000;
const QRgb invertedColor = 0x00000002;
- extern QPainter *printpainter;
- void setPrintPainter( QPainter *printer );
+ extern TQPainter *printpainter;
+ void setPrintPainter( TQPainter *printer );
- bool hasSufficientContrast(const QColor &c1, const QColor &c2);
- QColor retrieveBackgroundColor(const RenderObject *obj);
+ bool hasSufficientContrast(const TQColor &c1, const TQColor &c2);
+ TQColor retrieveBackgroundColor(const RenderObject *obj);
QRgb qRgbaFromHsla(double h, double s, double l, double a);
//enumerator for findSelectionNode
diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp
index 71f86f650..1a9bf62bb 100644
--- a/khtml/misc/knsplugininstaller.cpp
+++ b/khtml/misc/knsplugininstaller.cpp
@@ -31,15 +31,15 @@
#include <ktempfile.h>
#include <netaccess.h>
-#include <qbuttongroup.h>
-#include <qdir.h>
-#include <qiodevice.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqbuttongroup.h>
+#include <tqdir.h>
+#include <tqiodevice.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <sys/utsname.h>
@@ -53,8 +53,8 @@ class PluginListItem : public QListViewItem
{
public:
- PluginListItem(KNSPluginInfo pluginInfo, QListView *parent)
- : QListViewItem(parent, pluginInfo.pluginName())
+ PluginListItem(KNSPluginInfo pluginInfo, TQListView *parent)
+ : TQListViewItem(parent, pluginInfo.pluginName())
, m_pluginInfo(pluginInfo) {}
KNSPluginInfo pluginInfo() const { return m_pluginInfo; }
@@ -66,7 +66,7 @@ private:
// public methods
-KNSPluginInstallEngine::KNSPluginInstallEngine(KMimeType::Ptr mime) : QObject()
+KNSPluginInstallEngine::KNSPluginInstallEngine(KMimeType::Ptr mime) : TQObject()
{
m_mime = mime;
@@ -101,14 +101,14 @@ bool KNSPluginInstallEngine::pluginAvailable()
bool KNSPluginInstallEngine::isActive()
{
// check if we have a configuration key in the kde registry
- QString pluginsListFile;
+ TQString pluginsListFile;
KConfig cfg("kcmnspluginrc", true);
cfg.setGroup("Misc");
pluginsListFile = cfg.readPathEntry("PluginsListFile");
return !pluginsListFile.isEmpty();
}
-const QValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
+const TQValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
{
return m_pluginList;
}
@@ -116,7 +116,7 @@ const QValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const
// private methods
bool KNSPluginInstallEngine::loadConfig()
{
- QString pluginsListFile;
+ TQString pluginsListFile;
KConfig cfg("kcmnspluginrc", true);
cfg.setGroup("Misc");
pluginsListFile = cfg.readPathEntry("PluginsListFile");
@@ -135,13 +135,13 @@ bool KNSPluginInstallEngine::loadXmlConfig()
// load the Xml configuration file
if(m_pluginsXmlConfig.isEmpty())
{
- QString tmpFile;
+ TQString tmpFile;
if(KIO::NetAccess::download(m_pluginsListFileURL, tmpFile, NULL)) {
- QFile f(tmpFile);
+ TQFile f(tmpFile);
if(!f.open(IO_ReadOnly))
return false;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
m_pluginsXmlConfig = stream.read();
f.close();
KIO::NetAccess::removeTempFile(tmpFile);
@@ -160,16 +160,16 @@ bool KNSPluginInstallEngine::findPlugin()
utsname sysinfo;
if(uname(&sysinfo))
return false;
- QString sysname(sysinfo.sysname);
- QString machine(sysinfo.machine);
- QString arch = m_archMap[machine];
+ TQString sysname(sysinfo.sysname);
+ TQString machine(sysinfo.machine);
+ TQString arch = m_archMap[machine];
// Parse the document
- QDomDocument doc("xmlConfig");
+ TQDomDocument doc("xmlConfig");
doc.setContent(m_pluginsXmlConfig);
- QDomNodeList archList = doc.elementsByTagName(QString("arch"));
- QDomNode archNode, osNode , pluginNode, node;
- QDomElement e;
+ TQDomNodeList archList = doc.elementsByTagName(TQString("arch"));
+ TQDomNode archNode, osNode , pluginNode, node;
+ TQDomElement e;
// look for the correct architecture
bool found = false;
@@ -227,15 +227,15 @@ void KNSPluginInstallEngine::startInstall(KNSPluginInfo info)
{
m_toInstallPluginInfo = info;
// create a temporary dowload file
- KTempFile tempFile(locateLocal("tmp", "plugin") , QString(".tar.gz"));
+ KTempFile tempFile(locateLocal("tmp", "plugin") , TQString(".tar.gz"));
m_tmpPluginFileName = tempFile.name();
tempFile.unlink();
tempFile.close();
// start the download job
m_downloadJob = KIO::copy(info.pluginURL(), "file://"+m_tmpPluginFileName, false );
// connect signals
- connect(m_downloadJob, SIGNAL(percent (KIO::Job *, unsigned long)), this , SLOT(slotDownLoadProgress(KIO::Job *, unsigned long)));
- connect(m_downloadJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotDownloadResult(KIO::Job *)) );
+ connect(m_downloadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotDownLoadProgress(KIO::Job *, unsigned long)));
+ connect(m_downloadJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDownloadResult(KIO::Job *)) );
kdDebug(DEBUG_NUMBER) << "download plugin " << m_tmpPluginFileName << endl;
}
@@ -257,7 +257,7 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job)
// the download succeed copy the plugins files
// test the existance of the homedir
- QDir dir(QDir::homeDirPath());
+ TQDir dir(TQDir::homeDirPath());
if(!dir.exists()) {
emit installFailed();
return;
@@ -269,19 +269,19 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job)
if(!dir.exists(".mozilla/plugins"))
dir.mkdir(".mozilla/plugins");
// destination kurl
- KURL destURL("file://"+QDir::homeDirPath()+"/.mozilla/plugins");
+ KURL destURL("file://"+TQDir::homeDirPath()+"/.mozilla/plugins");
// construct the source kurlList
KURL::List urlList;
- QStringList pluginFileList = m_toInstallPluginInfo.pluginFileList();
+ TQStringList pluginFileList = m_toInstallPluginInfo.pluginFileList();
- QStringList::iterator it;
+ TQStringList::iterator it;
for( it = pluginFileList.begin(); it != pluginFileList.end(); ++it ) {
urlList.append( KURL("tar://"+m_tmpPluginFileName+"/"+(*it)) );
}
m_installFileJob = KIO::copy(urlList , destURL, false );
- connect(m_installFileJob, SIGNAL(percent (KIO::Job *, unsigned long)), this , SLOT(slotCopyProgress(KIO::Job *, unsigned long)));
- connect(m_installFileJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *)) );
+ connect(m_installFileJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotCopyProgress(KIO::Job *, unsigned long)));
+ connect(m_installFileJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotCopyResult(KIO::Job *)) );
}
kdDebug(DEBUG_NUMBER) << "COPY FILE " << m_tmpPluginFileName << endl;
@@ -304,14 +304,14 @@ void KNSPluginInstallEngine::slotCopyResult(KIO::Job *job)
}
else {
// start the plugins scan
- m_scanProc = new QProcess( this );
+ m_scanProc = new TQProcess( this );
m_scanProc->addArgument( "nspluginscan" );
m_scanProc->addArgument( "--verbose" );
- connect( m_scanProc, SIGNAL(readyReadStdout()),
- this, SLOT(readScanProcFromStdout()) );
- connect( m_scanProc, SIGNAL(processExited()),
- this, SLOT(endScanProc()) );
+ connect( m_scanProc, TQT_SIGNAL(readyReadStdout()),
+ this, TQT_SLOT(readScanProcFromStdout()) );
+ connect( m_scanProc, TQT_SIGNAL(processExited()),
+ this, TQT_SLOT(endScanProc()) );
if ( !m_scanProc->start() ) {
emit installFailed();
}
@@ -321,7 +321,7 @@ void KNSPluginInstallEngine::slotCopyResult(KIO::Job *job)
void KNSPluginInstallEngine::readScanProcFromStdout()
{
// Monitor the scan progress
- QString progress = m_scanProc->readLineStdout();
+ TQString progress = m_scanProc->readLineStdout();
int percent;
bool ok;
percent = progress.toInt(&ok);
@@ -341,7 +341,7 @@ void KNSPluginInstallEngine::endScanProc()
emit installFailed();
}
-KNSPluginWizard::KNSPluginWizard(QWidget *parent, const char *name, KMimeType::Ptr mime)
+KNSPluginWizard::KNSPluginWizard(TQWidget *parent, const char *name, KMimeType::Ptr mime)
: KWizard(parent, name, true)
, m_installEngine(mime)
{
@@ -374,19 +374,19 @@ KNSPluginWizard::~KNSPluginWizard()
void KNSPluginWizard::initConfirmationPage()
{
- m_confirmationVBox = new QVBox(this);
- new QLabel(i18n("The following plugins are available."), m_confirmationVBox);
+ m_confirmationVBox = new TQVBox(this);
+ new TQLabel(i18n("The following plugins are available."), m_confirmationVBox);
m_pluginListView = new KListView(m_confirmationVBox);
m_pluginListView->addColumn(i18n("Name"));
- m_pluginListView->setSelectionMode(QListView::Single);
- new QLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox);
+ m_pluginListView->setSelectionMode(TQListView::Single);
+ new TQLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox);
addPage (m_confirmationVBox, i18n("Plugin installation confirmation"));
bool selected = false;
// Fill the plugin list
- QValueList<KNSPluginInfo>::iterator it;
- QValueList<KNSPluginInfo> pluginList = m_installEngine.pluginList();
+ TQValueList<KNSPluginInfo>::iterator it;
+ TQValueList<KNSPluginInfo> pluginList = m_installEngine.pluginList();
for( it = pluginList.begin(); it != pluginList.end(); ++it ) {
PluginListItem *item = new PluginListItem((*it) , m_pluginListView);
if(!selected) {
@@ -400,20 +400,20 @@ void KNSPluginWizard::initConfirmationPage()
void KNSPluginWizard::initLicencePage()
{
- m_licenceVBox = new QVBox(this);
- m_licencePageLabel = new QLabel(m_licenceVBox);
+ m_licenceVBox = new TQVBox(this);
+ m_licencePageLabel = new TQLabel(m_licenceVBox);
m_licencePageText = new KTextEdit(m_licenceVBox);
m_licencePageText->setReadOnly(true);
// invisible buttonGroup
- QButtonGroup *buttonGroup = new QButtonGroup(this);
+ TQButtonGroup *buttonGroup = new TQButtonGroup(this);
m_agreementButtonGroup = buttonGroup;
buttonGroup->hide();
buttonGroup->setExclusive(true);
- m_licencePageAgree = new QRadioButton ( i18n("I agree."), m_licenceVBox);
+ m_licencePageAgree = new TQRadioButton ( i18n("I agree."), m_licenceVBox);
- m_licencePageDisagree = new QRadioButton ( i18n("I do not agree (plugin will not be installed)."), m_licenceVBox);
+ m_licencePageDisagree = new TQRadioButton ( i18n("I do not agree (plugin will not be installed)."), m_licenceVBox);
buttonGroup->insert(m_licencePageAgree);
buttonGroup->insert(m_licencePageDisagree);
@@ -422,15 +422,15 @@ void KNSPluginWizard::initLicencePage()
addPage (m_licenceVBox, i18n("Plugin licence"));
- connect(buttonGroup, SIGNAL(clicked(int)), this, SLOT(slotAgreementClicked(int)));
+ connect(buttonGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotAgreementClicked(int)));
}
void KNSPluginWizard::initInstallationProgressPage() {
- m_installationProgressWidget = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(m_installationProgressWidget);
- layout->addWidget(new QLabel(i18n("Installation in progress."), m_installationProgressWidget));
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
+ m_installationProgressWidget = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(m_installationProgressWidget);
+ layout->addWidget(new TQLabel(i18n("Installation in progress."), m_installationProgressWidget));
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
m_installationProgressBar = new KProgress(m_installationProgressWidget);
m_installationProgressBar->setTotalSteps(100);
layout->addWidget(m_installationProgressBar);
@@ -441,12 +441,12 @@ void KNSPluginWizard::initInstallationProgressPage() {
void KNSPluginWizard::initFinishPage()
{
- m_finishWidget = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(m_finishWidget);
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
- m_finishLabel = new QLabel(m_finishWidget);
+ m_finishWidget = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(m_finishWidget);
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
+ m_finishLabel = new TQLabel(m_finishWidget);
layout->addWidget(m_finishLabel);
- layout->addItem(new QSpacerItem(40,20,QSizePolicy::Expanding,QSizePolicy::Expanding ));
+ layout->addItem(new TQSpacerItem(40,20,TQSizePolicy::Expanding,TQSizePolicy::Expanding ));
addPage(m_finishWidget, i18n("Installation status"));
@@ -482,30 +482,30 @@ void KNSPluginWizard::initPagesButtonStates()
void KNSPluginWizard::connectSignals() {
- connect(&m_installEngine, SIGNAL(installProgress(int)), m_installationProgressBar, SLOT(setProgress(int)) );
- connect(&m_installEngine, SIGNAL(installCompleted()), this, SLOT(slotInstallationCompleted()) );
- connect(&m_installEngine, SIGNAL(installFailed()), this, SLOT(slotInstallationFailed()) );
+ connect(&m_installEngine, TQT_SIGNAL(installProgress(int)), m_installationProgressBar, TQT_SLOT(setProgress(int)) );
+ connect(&m_installEngine, TQT_SIGNAL(installCompleted()), this, TQT_SLOT(slotInstallationCompleted()) );
+ connect(&m_installEngine, TQT_SIGNAL(installFailed()), this, TQT_SLOT(slotInstallationFailed()) );
}
-void KNSPluginWizard::showPage(QWidget *page)
+void KNSPluginWizard::showPage(TQWidget *page)
{
// if the licence page is shown set the label and the licence content
if(page == m_licenceVBox && m_licencePageLabel->text().isEmpty()) {
KNSPluginInfo info = static_cast<PluginListItem *>(m_pluginListView->selectedItem())->pluginInfo();
m_licencePageLabel->setText(i18n("To install ")+info.pluginName()+i18n(" you need to agree to the following"));
- QString licence;
+ TQString licence;
licence = info.licence();
- QString tmpFile;
+ TQString tmpFile;
if(info.licenceURL().isValid())
// retrieve the licence if we have an url
if(KIO::NetAccess::download(info.licenceURL(), tmpFile, NULL)) {
- QFile f(tmpFile);
+ TQFile f(tmpFile);
if(f.open(IO_ReadOnly)) {
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
licence = stream.read();
f.close();
KIO::NetAccess::removeTempFile(tmpFile);
@@ -540,7 +540,7 @@ void KNSPluginWizard::showPage(QWidget *page)
int KNSPluginWizard::exec()
{
if(!m_installEngine.pluginList().count())
- return QDialog::Rejected;
+ return TQDialog::Rejected;
return KWizard::exec();
}
@@ -584,10 +584,10 @@ KNSPluginInfo::KNSPluginInfo()
}
// KNSPlugin info constructor par an xml dom fragment
-KNSPluginInfo::KNSPluginInfo(QDomNode pluginNode)
+KNSPluginInfo::KNSPluginInfo(TQDomNode pluginNode)
{
- QDomElement e;
- QDomNode node;
+ TQDomElement e;
+ TQDomNode node;
// Read plugin informations
node = pluginNode.firstChild();
@@ -645,12 +645,12 @@ bool KNSPluginInfo::isValid() const
}
// Accesors
-QString KNSPluginInfo::pluginName() const
+TQString KNSPluginInfo::pluginName() const
{
return m_pluginName;
}
-QString KNSPluginInfo::licence() const
+TQString KNSPluginInfo::licence() const
{
return m_licence;
}
@@ -665,7 +665,7 @@ KURL KNSPluginInfo::pluginURL() const
return m_pluginURL;
}
-const QStringList& KNSPluginInfo::pluginFileList() const
+const TQStringList& KNSPluginInfo::pluginFileList() const
{
return m_pluginFileList;
}
diff --git a/khtml/misc/knsplugininstaller.h b/khtml/misc/knsplugininstaller.h
index 903a584b2..f92378f10 100644
--- a/khtml/misc/knsplugininstaller.h
+++ b/khtml/misc/knsplugininstaller.h
@@ -30,21 +30,21 @@
#include <kurl.h>
#include <kwizard.h>
-#include <qbuttongroup.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qobject.h>
-#include <qprocess.h>
-#include <qradiobutton.h>
-#include <qvaluelist.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqbuttongroup.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqobject.h>
+#include <tqprocess.h>
+#include <tqradiobutton.h>
+#include <tqvaluelist.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
class QStringList;
/*
* This class contains all the infos needed to install a given plugin
- * Takes and parse a QDomNode in its constructor
+ * Takes and parse a TQDomNode in its constructor
*/
class KNSPluginInfo
{
@@ -55,7 +55,7 @@ public:
* Construct the plugin info object
*/
KNSPluginInfo();
- KNSPluginInfo(QDomNode pluginNode);
+ KNSPluginInfo(TQDomNode pluginNode);
~KNSPluginInfo();
/*
@@ -64,20 +64,20 @@ public:
bool isValid() const;
//Accessor methods
- QString pluginName() const;
- QString licence() const;
+ TQString pluginName() const;
+ TQString licence() const;
KURL licenceURL() const;
KURL pluginURL() const;
- const QStringList& pluginFileList() const;
+ const TQStringList& pluginFileList() const;
private:
// plugin info
- QString m_pluginName;
- QString m_licence;
+ TQString m_pluginName;
+ TQString m_licence;
KURL m_licenceURL;
KURL m_pluginURL;
- QStringList m_pluginFileList;
+ TQStringList m_pluginFileList;
};
@@ -109,7 +109,7 @@ public:
/*
* Return the list of plugins Available
*/
- const QValueList<KNSPluginInfo>& pluginList() const;
+ const TQValueList<KNSPluginInfo>& pluginList() const;
void startInstall(KNSPluginInfo info);
@@ -132,16 +132,16 @@ private:
bool findPlugin();
- QMap<QString, QString> m_archMap;
- QString m_pluginsXmlConfig;
- QValueList<KNSPluginInfo> m_pluginList;
+ TQMap<TQString, TQString> m_archMap;
+ TQString m_pluginsXmlConfig;
+ TQValueList<KNSPluginInfo> m_pluginList;
KMimeType::Ptr m_mime;
KURL m_pluginsListFileURL;
- QString m_tmpPluginFileName;
+ TQString m_tmpPluginFileName;
KIO::CopyJob *m_downloadJob;
KIO::CopyJob *m_installFileJob;
KNSPluginInfo m_toInstallPluginInfo;
- QProcess *m_scanProc;
+ TQProcess *m_scanProc;
signals:
// Signals used to communicate with the wizzard
@@ -177,7 +177,7 @@ public:
/**
* Construct a KNSpluginInstaller
*/
- KNSPluginWizard(QWidget *parent, const char *name, KMimeType::Ptr mime);
+ KNSPluginWizard(TQWidget *parent, const char *name, KMimeType::Ptr mime);
~KNSPluginWizard();
@@ -209,33 +209,33 @@ private:
/*
* Overiden method called when a page is shown
*/
- void showPage(QWidget *page);
+ void showPage(TQWidget *page);
// Plugin installation engine
KNSPluginInstallEngine m_installEngine;
// pages widgets
- QVBox *m_confirmationVBox;
- QVBox *m_licenceVBox;
- QWidget *m_installationProgressWidget;
- QWidget *m_finishWidget;
+ TQVBox *m_confirmationVBox;
+ TQVBox *m_licenceVBox;
+ TQWidget *m_installationProgressWidget;
+ TQWidget *m_finishWidget;
// plugin list
KListView *m_pluginListView;
// licence stuff
- QLabel *m_licencePageLabel;
+ TQLabel *m_licencePageLabel;
KTextEdit *m_licencePageText;
- QRadioButton *m_licencePageAgree;
- QRadioButton *m_licencePageDisagree;
- QButtonGroup *m_agreementButtonGroup;
+ TQRadioButton *m_licencePageAgree;
+ TQRadioButton *m_licencePageDisagree;
+ TQButtonGroup *m_agreementButtonGroup;
// installation progress bar
KProgress *m_installationProgressBar;
// Finish Label
- QLabel *m_finishLabel;
+ TQLabel *m_finishLabel;
// installation status
bool m_installationComplete;
diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp
index 8f7ae246f..090def1c5 100644
--- a/khtml/misc/loader.cpp
+++ b/khtml/misc/loader.cpp
@@ -49,12 +49,12 @@
#define DEFCACHESIZE 2096*1024
#define MAX_JOB_COUNT 32
-#include <qasyncio.h>
-#include <qasyncimageio.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qmovie.h>
-#include <qwidget.h>
+#include <tqasyncio.h>
+#include <tqasyncimageio.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqmovie.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kio/job.h>
@@ -69,7 +69,7 @@
#include "khtml_part.h"
#ifdef IMAGE_TITLES
-#include <qfile.h>
+#include <tqfile.h>
#include <kfilemetainfo.h>
#include <ktempfile.h>
#endif
@@ -174,7 +174,7 @@ void CachedObject::setSize(int size)
Cache::insertInLRUList(this);
}
-QTextCodec* CachedObject::codecForBuffer( const QString& charset, const QByteArray& buffer ) const
+TQTextCodec* CachedObject::codecForBuffer( const TQString& charset, const TQByteArray& buffer ) const
{
// we don't use heuristicContentMatch here since it is a) far too slow and
// b) having too much functionality for our case.
@@ -185,25 +185,25 @@ QTextCodec* CachedObject::codecForBuffer( const QString& charset, const QByteArr
// BOM
if ( s >= 3 &&
d[0] == 0xef && d[1] == 0xbb && d[2] == 0xbf)
- return QTextCodec::codecForMib( 106 ); // UTF-8
+ return TQTextCodec::codecForMib( 106 ); // UTF-8
if ( s >= 2 && ((d[0] == 0xff && d[1] == 0xfe) ||
(d[0] == 0xfe && d[1] == 0xff)))
- return QTextCodec::codecForMib( 1000 ); // UCS-2
+ return TQTextCodec::codecForMib( 1000 ); // UCS-2
// Link or @charset
if(!charset.isEmpty())
{
- QTextCodec* c = KGlobal::charsets()->codecForName(charset);
+ TQTextCodec* c = KGlobal::charsets()->codecForName(charset);
if(c->mibEnum() == 11) {
// iso8859-8 (visually ordered)
- c = QTextCodec::codecForName("iso8859-8-i");
+ c = TQTextCodec::codecForName("iso8859-8-i");
}
return c;
}
// Default
- return QTextCodec::codecForMib( 4 ); // latin 1
+ return TQTextCodec::codecForMib( 4 ); // latin 1
}
// -------------------------------------------------------------------------------------------
@@ -213,7 +213,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI
: CachedObject(url, CSSStyleSheet, _cachePolicy, 0)
{
// Set the type we want (probably css or xml)
- QString ah = QString::fromLatin1( accept );
+ TQString ah = TQString::fromLatin1( accept );
if ( !ah.isEmpty() )
ah += ",";
ah += "*/*;q=0.1";
@@ -226,7 +226,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI
m_loading = true;
}
-CachedCSSStyleSheet::CachedCSSStyleSheet(const DOMString &url, const QString &stylesheet_data)
+CachedCSSStyleSheet::CachedCSSStyleSheet(const DOMString &url, const TQString &stylesheet_data)
: CachedObject(url, CSSStyleSheet, KIO::CC_Verify, stylesheet_data.length())
{
m_loading = false;
@@ -247,25 +247,25 @@ void CachedCSSStyleSheet::ref(CachedObjectClient *c)
}
}
-void CachedCSSStyleSheet::data( QBuffer &buffer, bool eof )
+void CachedCSSStyleSheet::data( TQBuffer &buffer, bool eof )
{
if(!eof) return;
buffer.close();
setSize(buffer.buffer().size());
-// QString charset = checkCharset( buffer.buffer() );
- QTextCodec* c = 0;
+// TQString charset = checkCharset( buffer.buffer() );
+ TQTextCodec* c = 0;
if (!m_charset.isEmpty()) {
c = KGlobal::charsets()->codecForName(m_charset);
- if(c->mibEnum() == 11) c = QTextCodec::codecForName("iso8859-8-i");
+ if(c->mibEnum() == 11) c = TQTextCodec::codecForName("iso8859-8-i");
}
else {
c = codecForBuffer( m_charsetHint, buffer.buffer() );
m_charset = c->name();
}
- QString data = c->toUnicode( buffer.buffer().data(), m_size );
+ TQString data = c->toUnicode( buffer.buffer().data(), m_size );
// workaround Qt bugs
- m_sheet = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ m_sheet = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
m_loading = false;
checkNotify();
@@ -279,7 +279,7 @@ void CachedCSSStyleSheet::checkNotify()
// it() first increments, then returnes the current item.
// this avoids skipping an item when setStyleSheet deletes the "current" one.
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->setStyleSheet( m_url, m_sheet, m_charset );
}
@@ -293,12 +293,12 @@ void CachedCSSStyleSheet::error( int err, const char* text )
// it() first increments, then returnes the current item.
// this avoids skipping an item when setStyleSheet deletes the "current" one.
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->error( m_err, m_errText );
}
#if 0
-QString CachedCSSStyleSheet::checkCharset(const QByteArray& buffer ) const
+TQString CachedCSSStyleSheet::checkCharset(const TQByteArray& buffer ) const
{
int s = buffer.size();
if (s <= 12) return m_charset;
@@ -312,7 +312,7 @@ QString CachedCSSStyleSheet::checkCharset(const QByteArray& buffer ) const
// the string until "; is the charset name
char *p = strchr(d+10, '"');
if (p == 0) return m_charset;
- QString charset = QString::fromAscii(d+10, p-(d+10));
+ TQString charset = TQString::fromAscii(d+10, p-(d+10));
return charset;
}
return m_charset;
@@ -327,13 +327,13 @@ CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheContro
// It's javascript we want.
// But some websites think their scripts are <some wrong mimetype here>
// and refuse to serve them if we only accept application/x-javascript.
- setAccept( QString::fromLatin1("*/*") );
+ setAccept( TQString::fromLatin1("*/*") );
// load the file
Cache::loader()->load(dl, this, false);
m_loading = true;
}
-CachedScript::CachedScript(const DOMString &url, const QString &script_data)
+CachedScript::CachedScript(const DOMString &url, const TQString &script_data)
: CachedObject(url, Script, KIO::CC_Verify, script_data.length())
{
m_loading = false;
@@ -348,15 +348,15 @@ void CachedScript::ref(CachedObjectClient *c)
if(!m_loading) c->notifyFinished(this);
}
-void CachedScript::data( QBuffer &buffer, bool eof )
+void CachedScript::data( TQBuffer &buffer, bool eof )
{
if(!eof) return;
buffer.close();
setSize(buffer.buffer().size());
- QTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
- QString data = c->toUnicode( buffer.buffer().data(), m_size );
- m_script = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ TQTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
+ TQString data = c->toUnicode( buffer.buffer().data(), m_size );
+ m_script = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
m_loading = false;
checkNotify();
}
@@ -365,7 +365,7 @@ void CachedScript::checkNotify()
{
if(m_loading) return;
- for (QPtrDictIterator<CachedObjectClient> it( m_clients); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients); it.current();)
it()->notifyFinished(this);
}
@@ -383,7 +383,7 @@ namespace khtml
class ImageSource : public QDataSource
{
public:
- ImageSource(QByteArray buf)
+ ImageSource(TQByteArray buf)
: buffer( buf ), pos( 0 ), eof( false ), rew(false ), rewable( true )
{}
@@ -395,7 +395,7 @@ public:
return buffer.size() - pos;
}
- void sendTo(QDataSink* sink, int n)
+ void sendTo(TQDataSink* sink, int n)
{
sink->receive((const uchar*)&buffer.at(pos), n);
@@ -418,13 +418,13 @@ public:
void enableRewind(bool on) { rew = on; }
/*
- Calls reset() on the QIODevice.
+ Calls reset() on the TQIODevice.
*/
void rewind()
{
pos = 0;
if (!rew) {
- QDataSource::rewind();
+ TQDataSource::rewind();
} else
ready();
}
@@ -449,7 +449,7 @@ public:
}
}
- QByteArray buffer;
+ TQByteArray buffer;
unsigned int pos;
private:
bool eof : 1;
@@ -459,7 +459,7 @@ private:
} // end namespace
-static QString buildAcceptHeader()
+static TQString buildAcceptHeader()
{
return "image/png, image/jpeg, video/x-mng, image/jp2, image/gif;q=0.5,*/*;q=0.1";
}
@@ -467,9 +467,9 @@ static QString buildAcceptHeader()
// -------------------------------------------------------------------------------------
CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, const char*)
- : QObject(), CachedObject(url, Image, _cachePolicy, 0)
+ : TQObject(), CachedObject(url, Image, _cachePolicy, 0)
{
- static const QString &acceptHeader = KGlobal::staticQString( buildAcceptHeader() );
+ static const TQString &acceptHeader = KGlobal::staticQString( buildAcceptHeader() );
m = 0;
p = 0;
@@ -524,18 +524,18 @@ void CachedImage::deref( CachedObjectClient *c )
#define BGMINWIDTH 32
#define BGMINHEIGHT 32
-const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHeight)
+const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int xHeight)
{
static QRgb bgTransparent = qRgba( 0, 0, 0, 0xFF );
- QSize s(pixmap_size());
+ TQSize s(pixmap_size());
int w = xWidth;
int h = xHeight;
if (w == -1) xWidth = w = s.width();
if (h == -1) xHeight = h = s.height();
if ( ( (bgColor != bgTransparent) && (bgColor != newc.rgb()) ) ||
- ( bgSize != QSize(xWidth, xHeight)) )
+ ( bgSize != TQSize(xWidth, xHeight)) )
{
delete bg; bg = 0;
}
@@ -543,7 +543,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
if (bg)
return *bg;
- const QPixmap &r = pixmap();
+ const TQPixmap &r = pixmap();
if (r.isNull()) return r;
@@ -552,7 +552,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
bool isvalid = newc.isValid();
- const QPixmap* src; //source for pretiling, if any
+ const TQPixmap* src; //source for pretiling, if any
//See whether we should scale
if (xWidth != s.width() || xHeight != s.height()) {
@@ -561,11 +561,11 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
src = &r;
}
- bgSize = QSize(xWidth, xHeight);
+ bgSize = TQSize(xWidth, xHeight);
//See whether we can - and should - pre-blend
if (isvalid && (r.hasAlphaChannel() || r.mask() )) {
- bg = new QPixmap(xWidth, xHeight, r.depth());
+ bg = new TQPixmap(xWidth, xHeight, r.depth());
bg->fill(newc);
bitBlt(bg, 0, 0, src);
bgColor = newc.rgb();
@@ -585,8 +585,8 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
if ( w != xWidth || h != xHeight )
{
// kdDebug() << "pre-tiling " << s.width() << "," << s.height() << " to " << w << "," << h << endl;
- QPixmap* oldbg = bg;
- bg = new QPixmap(w, h, r.depth());
+ TQPixmap* oldbg = bg;
+ bg = new TQPixmap(w, h, r.depth());
//Tile horizontally on the first stripe
for (int x = 0; x < w; x += xWidth)
@@ -606,28 +606,28 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc, int xWidth, int xHe
return *src;
}
-const QPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight )
+const TQPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight )
{
if (scaled) {
if (scaled->width() == xWidth && scaled->height() == xHeight)
return *scaled;
delete scaled;
}
- const QPixmap &r = pixmap();
+ const TQPixmap &r = pixmap();
if (r.isNull()) return r;
// kdDebug() << "scaling " << r.width() << "," << r.height() << " to " << xWidth << "," << xHeight << endl;
- QImage image = r.convertToImage().smoothScale(xWidth, xHeight);
+ TQImage image = r.convertToImage().smoothScale(xWidth, xHeight);
- scaled = new QPixmap(xWidth, xHeight, r.depth());
+ scaled = new TQPixmap(xWidth, xHeight, r.depth());
scaled->convertFromImage(image);
return *scaled;
}
-const QPixmap &CachedImage::pixmap( ) const
+const TQPixmap &CachedImage::pixmap( ) const
{
if(m_hadError)
return *Cache::brokenPixmap;
@@ -642,7 +642,7 @@ const QPixmap &CachedImage::pixmap( ) const
// pixmap is not yet completely loaded, so we
// return a clipped version. asserting here
// that the valid rect is always from 0/0 to fullwidth/ someheight
- if(!pixPart) pixPart = new QPixmap();
+ if(!pixPart) pixPart = new TQPixmap();
(*pixPart) = m->framePixmap();
if (m->getValidRect().size().isValid())
@@ -661,28 +661,28 @@ const QPixmap &CachedImage::pixmap( ) const
}
-QSize CachedImage::pixmap_size() const
+TQSize CachedImage::pixmap_size() const
{
if (m_wasBlocked) return Cache::blockedPixmap->size();
- return (m_hadError ? Cache::brokenPixmap->size() : m ? m->framePixmap().size() : ( p ? p->size() : QSize()));
+ return (m_hadError ? Cache::brokenPixmap->size() : m ? m->framePixmap().size() : ( p ? p->size() : TQSize()));
}
-QRect CachedImage::valid_rect() const
+TQRect CachedImage::valid_rect() const
{
if (m_wasBlocked) return Cache::blockedPixmap->rect();
- return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : QRect()) );
+ return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : TQRect()) );
}
-void CachedImage::do_notify(const QPixmap& p, const QRect& r)
+void CachedImage::do_notify(const TQPixmap& p, const TQRect& r)
{
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->setPixmap( p, r, this);
}
-void CachedImage::movieUpdated( const QRect& r )
+void CachedImage::movieUpdated( const TQRect& r )
{
#ifdef LOADER_DEBUG
qDebug("movie updated %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
@@ -703,10 +703,10 @@ void CachedImage::movieStatus(int status)
// which uses the same CachedImage, the one in the document is not supposed to be notified
// just another Qt 2.2.0 bug. we cannot call
- // QMovie::frameImage if we're after QMovie::EndOfMovie
- if(status == QMovie::EndOfFrame)
+ // TQMovie::frameImage if we're after TQMovie::EndOfMovie
+ if(status == TQMovie::EndOfFrame)
{
- const QImage& im = m->frameImage();
+ const TQImage& im = m->frameImage();
monochrome = ( ( im.depth() <= 8 ) && ( im.numColors() - int( im.hasAlphaBuffer() ) <= 2 ) );
for (int i = 0; monochrome && i < im.numColors(); ++i)
if (im.colorTable()[i] != qRgb(0xff, 0xff, 0xff) &&
@@ -714,7 +714,7 @@ void CachedImage::movieStatus(int status)
monochrome = false;
if( (im.width() < 5 || im.height() < 5) && im.hasAlphaBuffer()) // only evaluate for small images
{
- QImage am = im.createAlphaMask();
+ TQImage am = im.createAlphaMask();
if(am.depth() == 1)
{
bool solid = false;
@@ -734,9 +734,9 @@ void CachedImage::movieStatus(int status)
bg = 0;
}
- if((status == QMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) ||
- ((status == QMovie::EndOfLoop) && (m_showAnimations == KHTMLSettings::KAnimationLoopOnce)) ||
- ((status == QMovie::EndOfFrame) && (m_showAnimations == KHTMLSettings::KAnimationDisabled))
+ if((status == TQMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) ||
+ ((status == TQMovie::EndOfLoop) && (m_showAnimations == KHTMLSettings::KAnimationLoopOnce)) ||
+ ((status == TQMovie::EndOfFrame) && (m_showAnimations == KHTMLSettings::KAnimationDisabled))
)
{
if(imgSource)
@@ -747,7 +747,7 @@ void CachedImage::movieStatus(int status)
// faster to draw, so this is worth the hack
if (p && monochrome && p->depth() > 1)
{
- QPixmap* pix = new QPixmap;
+ TQPixmap* pix = new QPixmap;
pix->convertFromImage( p->convertToImage().convertDepth( 1 ), MonoOnly|AvoidDither );
if ( p->mask() )
pix->setMask( *p->mask() );
@@ -756,16 +756,16 @@ void CachedImage::movieStatus(int status)
monochrome = false;
}
}
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished( this );
m_status = Cached; //all done
}
#if 0
- if((status == QMovie::EndOfFrame) || (status == QMovie::EndOfMovie))
+ if((status == TQMovie::EndOfFrame) || (status == TQMovie::EndOfMovie))
{
#ifdef LOADER_DEBUG
- QRect r(valid_rect());
+ TQRect r(valid_rect());
qDebug("movie Status frame update %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
pixmap().size().width(), pixmap().size().height());
#endif
@@ -774,9 +774,9 @@ void CachedImage::movieStatus(int status)
#endif
}
-void CachedImage::movieResize(const QSize& /*s*/)
+void CachedImage::movieResize(const TQSize& /*s*/)
{
- do_notify(m->framePixmap(), QRect());
+ do_notify(m->framePixmap(), TQRect());
}
void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimations )
@@ -785,11 +785,11 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati
if ( (m_showAnimations == KHTMLSettings::KAnimationDisabled) && imgSource ) {
imgSource->cleanBuffer();
delete p;
- p = new QPixmap(m->framePixmap());
- m->disconnectUpdate( this, SLOT( movieUpdated( const QRect &) ));
- m->disconnectStatus( this, SLOT( movieStatus( int ) ));
- m->disconnectResize( this, SLOT( movieResize( const QSize& ) ) );
- QTimer::singleShot(0, this, SLOT( deleteMovie()));
+ p = new TQPixmap(m->framePixmap());
+ m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
+ m->disconnectStatus( this, TQT_SLOT( movieStatus( int ) ));
+ m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
+ TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie()));
imgSource = 0;
}
}
@@ -817,18 +817,18 @@ void CachedImage::clear()
delete bg; bg = 0;
delete scaled; scaled = 0;
bgColor = qRgba( 0, 0, 0, 0xff );
- bgSize = QSize(-1,-1);
+ bgSize = TQSize(-1,-1);
delete pixPart; pixPart = 0;
formatType = 0;
typeChecked = false;
setSize(0);
- // No need to delete imageSource - QMovie does it for us
+ // No need to delete imageSource - TQMovie does it for us
imgSource = 0;
}
-void CachedImage::data ( QBuffer &_buffer, bool eof )
+void CachedImage::data ( TQBuffer &_buffer, bool eof )
{
#ifdef LOADER_DEBUG
kdDebug( 6060 ) << this << "in CachedImage::data(buffersize " << _buffer.buffer().size() <<", eof=" << eof << endl;
@@ -838,7 +838,7 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
// don't attempt incremental loading if we have all the data already
if (!eof)
{
- formatType = QImageDecoder::formatName( (const uchar*)_buffer.buffer().data(), _buffer.size());
+ formatType = TQImageDecoder::formatName( (const uchar*)_buffer.buffer().data(), _buffer.size());
if ( formatType && strcmp( formatType, "PNG" ) == 0 )
formatType = 0; // Some png files contain multiple images, we want to show only the first one
}
@@ -848,10 +848,10 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if ( formatType ) // movie format exists
{
imgSource = new ImageSource( _buffer.buffer());
- m = new QMovie( imgSource, 8192 );
- m->connectUpdate( this, SLOT( movieUpdated( const QRect &) ));
- m->connectStatus( this, SLOT( movieStatus(int)));
- m->connectResize( this, SLOT( movieResize( const QSize& ) ) );
+ m = new TQMovie( imgSource, 8192 );
+ m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
+ m->connectStatus( this, TQT_SLOT( movieStatus(int)));
+ m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
}
}
@@ -863,8 +863,8 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if(eof)
{
- // QMovie currently doesn't support all kinds of image formats
- // so we need to use a QPixmap here when we finished loading the complete
+ // TQMovie currently doesn't support all kinds of image formats
+ // so we need to use a TQPixmap here when we finished loading the complete
// picture and display it then all at once.
if(typeChecked && !formatType)
{
@@ -873,9 +873,9 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
#endif
p = new QPixmap;
{
- QBuffer buffer(_buffer.buffer());
+ TQBuffer buffer(_buffer.buffer());
buffer.open(IO_ReadOnly);
- QImageIO io( &buffer, 0 );
+ TQImageIO io( &buffer, 0 );
io.setGamma(2.2); // hardcoded "reasonable value"
bool result = io.read();
if (result) p->convertFromImage(io.image(), 0);
@@ -888,12 +888,12 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
if(p->isNull())
{
m_hadError = true;
- do_notify(pixmap(), QRect(0, 0, 16, 16)); // load "broken image" icon
+ do_notify(pixmap(), TQRect(0, 0, 16, 16)); // load "broken image" icon
}
else
do_notify(*p, p->rect());
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished( this );
m_status = Cached; //all done
}
@@ -905,10 +905,10 @@ void CachedImage::finish()
Status oldStatus = m_status;
CachedObject::finish();
if ( oldStatus != m_status ) {
- const QPixmap &pm = pixmap();
+ const TQPixmap &pm = pixmap();
do_notify( pm, pm.rect() );
}
- QSize s = pixmap_size();
+ TQSize s = pixmap_size();
setSize( s.width() * s.height() * 2);
}
@@ -919,8 +919,8 @@ void CachedImage::error( int /*err*/, const char* /*text*/ )
typeChecked = true;
m_hadError = true;
m_loading = false;
- do_notify(pixmap(), QRect(0, 0, 16, 16));
- for (QPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
+ do_notify(pixmap(), TQRect(0, 0, 16, 16));
+ for (TQPtrDictIterator<CachedObjectClient> it( m_clients ); it.current();)
it()->notifyFinished(this);
}
@@ -988,7 +988,7 @@ void DocLoader::insertCachedObject( CachedObject* o ) const
m_docObjects.resize(khtml::nextSeed( m_docObjects.size() ) );
}
-bool DocLoader::needReload(CachedObject *existing, const QString& fullURL)
+bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL)
{
bool reload = false;
if (m_cachePolicy == KIO::CC_Verify)
@@ -1037,7 +1037,7 @@ CachedImage *DocLoader::requestImage( const DOM::DOMString &url)
return i;
}
-CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, const QString& charset,
+CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, const TQString& charset,
const char *accept, bool userSheet )
{
DOCLOADER_SECCHECK(!userSheet);
@@ -1049,7 +1049,7 @@ CachedCSSStyleSheet *DocLoader::requestStyleSheet( const DOM::DOMString &url, co
return s;
}
-CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const QString& charset)
+CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const TQString& charset)
{
DOCLOADER_SECCHECK(true);
if ( ! KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(fullURL.host()) ||
@@ -1073,7 +1073,7 @@ void DocLoader::setAutoloadImages( bool enable )
if ( !m_bautoloadImages ) return;
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current()) );
@@ -1091,7 +1091,7 @@ void DocLoader::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimation
if ( showAnimations == m_showAnimations ) return;
m_showAnimations = showAnimations;
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1102,7 +1102,7 @@ void DocLoader::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimation
void DocLoader::pauseAnimations()
{
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1113,7 +1113,7 @@ void DocLoader::pauseAnimations()
void DocLoader::resumeAnimations()
{
- for ( QPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
+ for ( TQPtrDictIterator<CachedObject> it( m_docObjects ); it.current(); ++it )
if ( it.current()->type() == CachedObject::Image )
{
CachedImage *img = const_cast<CachedImage*>( static_cast<const CachedImage *>( it.current() ) );
@@ -1124,11 +1124,11 @@ void DocLoader::resumeAnimations()
// ------------------------------------------------------------------------------------------
-Loader::Loader() : QObject()
+Loader::Loader() : TQObject()
{
m_requestsPending.setAutoDelete( true );
m_requestsLoading.setAutoDelete( true );
- connect(&m_timer, SIGNAL(timeout()), this, SLOT( servePendingRequests() ) );
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT( servePendingRequests() ) );
}
void Loader::load(DocLoader* dl, CachedObject *object, bool incremental)
@@ -1171,9 +1171,9 @@ void Loader::servePendingRequests()
}
}
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
- SLOT( slotData( KIO::Job*, const QByteArray &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
if ( req->object->schedule() )
KIO::Scheduler::scheduleJob( job );
@@ -1200,7 +1200,7 @@ void Loader::slotFinished( KIO::Job* job )
}
else
{
- QString cs = j->queryMetaData("charset");
+ TQString cs = j->queryMetaData("charset");
if (!cs.isEmpty()) r->object->setCharset(cs);
r->object->data(r->m_buffer, true);
emit requestDone( r->m_docLoader, r->object );
@@ -1211,7 +1211,7 @@ void Loader::slotFinished( KIO::Job* job )
r->object->setExpireDate( expireDate );
if ( r->object->type() == CachedObject::Image ) {
- QString fn = j->queryMetaData("content-disposition");
+ TQString fn = j->queryMetaData("content-disposition");
static_cast<CachedImage*>( r->object )->setSuggestedFilename(fn);
#ifdef IMAGE_TITLES
static_cast<CachedImage*>( r->object )->setSuggestedTitle(fn);
@@ -1247,7 +1247,7 @@ void Loader::slotFinished( KIO::Job* job )
m_timer.start(0, true);
}
-void Loader::slotData( KIO::Job*job, const QByteArray &data )
+void Loader::slotData( KIO::Job*job, const TQByteArray &data )
{
Request *r = m_requestsLoading[job];
if(!r) {
@@ -1268,12 +1268,12 @@ int Loader::numRequests( DocLoader* dl ) const
{
int res = 0;
- QPtrListIterator<Request> pIt( m_requestsPending );
+ TQPtrListIterator<Request> pIt( m_requestsPending );
for (; pIt.current(); ++pIt )
if ( pIt.current()->m_docLoader == dl )
res++;
- QPtrDictIterator<Request> lIt( m_requestsLoading );
+ TQPtrDictIterator<Request> lIt( m_requestsLoading );
for (; lIt.current(); ++lIt )
if ( lIt.current()->m_docLoader == dl )
res++;
@@ -1283,7 +1283,7 @@ int Loader::numRequests( DocLoader* dl ) const
void Loader::cancelRequests( DocLoader* dl )
{
- QPtrListIterator<Request> pIt( m_requestsPending );
+ TQPtrListIterator<Request> pIt( m_requestsPending );
while ( pIt.current() ) {
if ( pIt.current()->m_docLoader == dl )
{
@@ -1297,7 +1297,7 @@ void Loader::cancelRequests( DocLoader* dl )
//kdDebug( 6060 ) << "got " << m_requestsLoading.count() << "loading requests" << endl;
- QPtrDictIterator<Request> lIt( m_requestsLoading );
+ TQPtrDictIterator<Request> lIt( m_requestsLoading );
while ( lIt.current() )
{
if ( lIt.current()->m_docLoader == dl )
@@ -1316,7 +1316,7 @@ void Loader::cancelRequests( DocLoader* dl )
KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const
{
- QPtrDictIterator<Request> it( m_requestsLoading );
+ TQPtrDictIterator<Request> it( m_requestsLoading );
for (; it.current(); ++it )
{
@@ -1332,34 +1332,34 @@ KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const
// ----------------------------------------------------------------------------
-QDict<CachedObject> *Cache::cache = 0;
-QPtrList<DocLoader>* Cache::docloader = 0;
-QPtrList<CachedObject> *Cache::freeList = 0;
+TQDict<CachedObject> *Cache::cache = 0;
+TQPtrList<DocLoader>* Cache::docloader = 0;
+TQPtrList<CachedObject> *Cache::freeList = 0;
Loader *Cache::m_loader = 0;
int Cache::maxSize = DEFCACHESIZE;
int Cache::totalSizeOfLRU;
-QPixmap *Cache::nullPixmap = 0;
-QPixmap *Cache::brokenPixmap = 0;
-QPixmap *Cache::blockedPixmap = 0;
+TQPixmap *Cache::nullPixmap = 0;
+TQPixmap *Cache::brokenPixmap = 0;
+TQPixmap *Cache::blockedPixmap = 0;
void Cache::init()
{
if ( !cache )
- cache = new QDict<CachedObject>(401, true);
+ cache = new TQDict<CachedObject>(401, true);
if ( !docloader )
- docloader = new QPtrList<DocLoader>;
+ docloader = new TQPtrList<DocLoader>;
if ( !nullPixmap )
nullPixmap = new QPixmap;
if ( !brokenPixmap )
- brokenPixmap = new QPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
+ brokenPixmap = new TQPixmap(KHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState));
if ( !blockedPixmap ) {
- blockedPixmap = new QPixmap();
+ blockedPixmap = new TQPixmap();
blockedPixmap->loadFromData(blocked_icon_data, blocked_icon_len);
}
@@ -1367,7 +1367,7 @@ void Cache::init()
m_loader = new Loader();
if ( !freeList ) {
- freeList = new QPtrList<CachedObject>;
+ freeList = new TQPtrList<CachedObject>;
freeList->setAutoDelete(true);
}
}
@@ -1383,7 +1383,7 @@ void Cache::clear()
#ifndef NDEBUG
bool crash = false;
- for (QDictIterator<CachedObject> it(*cache); it.current(); ++it) {
+ for (TQDictIterator<CachedObject> it(*cache); it.current(); ++it) {
if (!it.current()->canDelete()) {
kdDebug( 6060 ) << " Object in cache still linked to" << endl;
kdDebug( 6060 ) << " -> URL: " << it.current()->url() << endl;
@@ -1399,7 +1399,7 @@ void Cache::clear()
kdDebug( 6060 ) << " -> #clients: " << freeList->current()->count() << endl;
crash = true;
/*
- QPtrDictIterator<CachedObjectClient> it(freeList->current()->m_clients);
+ TQPtrDictIterator<CachedObjectClient> it(freeList->current()->m_clients);
for(;it.current(); ++it) {
if (dynamic_cast<RenderObject*>(it.current())) {
kdDebug( 6060 ) << " --> RenderObject" << endl;
@@ -1426,7 +1426,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
{
KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify;
- QString url = kurl.url();
+ TQString url = kurl.url();
CachedObject* o = cache->find(url);
if ( o && o->type() != CachedType ) {
@@ -1462,7 +1462,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
return static_cast<CachedObjectType *>(o);
}
-void Cache::preloadStyleSheet( const QString &url, const QString &stylesheet_data)
+void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_data)
{
CachedObject *o = cache->find(url);
if(o)
@@ -1472,7 +1472,7 @@ void Cache::preloadStyleSheet( const QString &url, const QString &stylesheet_dat
cache->insert( url, stylesheet );
}
-void Cache::preloadScript( const QString &url, const QString &script_data)
+void Cache::preloadScript( const TQString &url, const TQString &script_data)
{
CachedObject *o = cache->find(url);
if(o)
@@ -1524,7 +1524,7 @@ void Cache::statistics()
int images = 0;
int scripts = 0;
int stylesheets = 0;
- QDictIterator<CachedObject> it(*cache);
+ TQDictIterator<CachedObject> it(*cache);
for(it.toFirst(); it.current(); ++it)
{
o = it.current();
@@ -1564,7 +1564,7 @@ void Cache::statistics()
void Cache::removeCacheEntry( CachedObject *object )
{
- QString key = object->url().string();
+ TQString key = object->url().string();
cache->remove( key );
removeFromLRUList( object );
@@ -1669,10 +1669,10 @@ void Cache::insertInLRUList(CachedObject *object)
// --------------------------------------
-void CachedObjectClient::setPixmap(const QPixmap &, const QRect&, CachedImage *) {}
+void CachedObjectClient::setPixmap(const TQPixmap &, const TQRect&, CachedImage *) {}
void CachedObjectClient::setStyleSheet(const DOM::DOMString &/*url*/, const DOM::DOMString &/*sheet*/, const DOM::DOMString &/*charset*/) {}
void CachedObjectClient::notifyFinished(CachedObject * /*finishedObj*/) {}
-void CachedObjectClient::error(int /*err*/, const QString &/*text*/) {}
+void CachedObjectClient::error(int /*err*/, const TQString &/*text*/) {}
#undef CDEBUG
diff --git a/khtml/misc/loader.h b/khtml/misc/loader.h
index 346e85f12..05c297d79 100644
--- a/khtml/misc/loader.h
+++ b/khtml/misc/loader.h
@@ -38,15 +38,15 @@
#endif
#include <stdlib.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qdict.h>
-#include <qpixmap.h>
-#include <qbuffer.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
+#include <tqbuffer.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
#include <kurl.h>
#include <kio/global.h>
@@ -115,7 +115,7 @@ namespace khtml
}
virtual ~CachedObject();
- virtual void data( QBuffer &buffer, bool eof) = 0;
+ virtual void data( TQBuffer &buffer, bool eof) = 0;
virtual void error( int err, const char *text ) = 0;
const DOM::DOMString &url() const { return m_url; }
@@ -130,9 +130,9 @@ namespace khtml
void setStatus(Status s) { m_status = s; }
Status status() const { return m_status; }
- virtual void setCharset( const QString& /*charset*/ ) {}
+ virtual void setCharset( const TQString& /*charset*/ ) {}
- QTextCodec* codecForBuffer( const QString& charset, const QByteArray& buffer ) const;
+ TQTextCodec* codecForBuffer( const TQString& charset, const TQByteArray& buffer ) const;
int size() const { return m_size; }
@@ -157,14 +157,14 @@ namespace khtml
* List of acceptable mimetypes separated by ",". A mimetype may contain a wildcard.
*/
// e.g. "text/*"
- QString accept() const { return m_accept; }
- void setAccept(const QString &_accept) { m_accept = _accept; }
+ TQString accept() const { return m_accept; }
+ void setAccept(const TQString &_accept) { m_accept = _accept; }
protected:
void setSize(int size);
- QPtrDict<CachedObjectClient> m_clients;
+ TQPtrDict<CachedObjectClient> m_clients;
DOM::DOMString m_url;
- QString m_accept;
+ TQString m_accept;
Request *m_request;
Type m_type;
Status m_status;
@@ -197,27 +197,27 @@ namespace khtml
public:
CachedCSSStyleSheet(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy,
const char *accept);
- CachedCSSStyleSheet(const DOM::DOMString &url, const QString &stylesheet_data);
+ CachedCSSStyleSheet(const DOM::DOMString &url, const TQString &stylesheet_data);
const DOM::DOMString &sheet() const { return m_sheet; }
virtual void ref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
virtual bool schedule() const { return true; }
- void setCharsetHint( const QString& charset ) { m_charsetHint = charset; }
- void setCharset( const QString& charset ) { m_charset = charset; }
+ void setCharsetHint( const TQString& charset ) { m_charsetHint = charset; }
+ void setCharset( const TQString& charset ) { m_charset = charset; }
protected:
void checkNotify();
DOM::DOMString m_sheet;
- QString m_charset;
- QString m_charsetHint;
+ TQString m_charset;
+ TQString m_charsetHint;
int m_err;
- QString m_errText;
+ TQString m_errText;
};
/**
@@ -227,13 +227,13 @@ namespace khtml
{
public:
CachedScript(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept );
- CachedScript(const DOM::DOMString &url, const QString &script_data);
+ CachedScript(const DOM::DOMString &url, const TQString &script_data);
const DOM::DOMString &script() const { return m_script; }
virtual void ref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
virtual bool schedule() const { return false; }
@@ -241,10 +241,10 @@ namespace khtml
void checkNotify();
bool isLoaded() const { return !m_loading; }
- void setCharset( const QString& charset ) { m_charset = charset; }
+ void setCharset( const TQString& charset ) { m_charset = charset; }
protected:
- QString m_charset;
+ TQString m_charset;
DOM::DOMString m_script;
};
@@ -253,37 +253,37 @@ namespace khtml
/**
* a cached image
*/
- class CachedImage : public QObject, public CachedObject
+ class CachedImage : public TQObject, public CachedObject
{
Q_OBJECT
public:
CachedImage(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept);
virtual ~CachedImage();
- const QPixmap &pixmap() const;
- const QPixmap &scaled_pixmap(int xWidth, int xHeight);
- const QPixmap &tiled_pixmap(const QColor& bg, int xWidth = -1, int xHeight = -1);
+ const TQPixmap &pixmap() const;
+ const TQPixmap &scaled_pixmap(int xWidth, int xHeight);
+ const TQPixmap &tiled_pixmap(const TQColor& bg, int xWidth = -1, int xHeight = -1);
- QSize pixmap_size() const; // returns the size of the complete (i.e. when finished) loading
- QRect valid_rect() const; // returns the rectangle of pixmap that has been loaded already
+ TQSize pixmap_size() const; // returns the size of the complete (i.e. when finished) loading
+ TQRect valid_rect() const; // returns the rectangle of pixmap that has been loaded already
bool canRender() const { return !isErrorImage() && pixmap_size().width() > 0 && pixmap_size().height() > 0; }
void ref(CachedObjectClient *consumer);
virtual void deref(CachedObjectClient *consumer);
- virtual void data( QBuffer &buffer, bool eof );
+ virtual void data( TQBuffer &buffer, bool eof );
virtual void error( int err, const char *text );
bool isTransparent() const { return isFullyTransparent; }
bool isErrorImage() const { return m_hadError; }
bool isBlockedImage() const { return m_wasBlocked; }
- const QString& suggestedFilename() const { return m_suggestedFilename; }
- void setSuggestedFilename( const QString& s ) { m_suggestedFilename = s; }
+ const TQString& suggestedFilename() const { return m_suggestedFilename; }
+ void setSuggestedFilename( const TQString& s ) { m_suggestedFilename = s; }
#ifdef IMAGE_TITLES
- const QString& suggestedTitle() const { return m_suggestedTitle; }
- void setSuggestedTitle( const QString& s ) { m_suggestedTitle = s; }
+ const TQString& suggestedTitle() const { return m_suggestedTitle; }
+ void setSuggestedTitle( const TQString& s ) { m_suggestedTitle = s; }
#else
- const QString& suggestedTitle() const { return m_suggestedFilename; }
+ const TQString& suggestedTitle() const { return m_suggestedFilename; }
#endif
void setShowAnimations( KHTMLSettings::KAnimationAdvice );
@@ -299,27 +299,27 @@ namespace khtml
private slots:
/**
- * gets called, whenever a QMovie changes frame
+ * gets called, whenever a TQMovie changes frame
*/
- void movieUpdated( const QRect &rect );
+ void movieUpdated( const TQRect &rect );
void movieStatus(int);
- void movieResize(const QSize&);
+ void movieResize(const TQSize&);
void deleteMovie();
private:
- void do_notify(const QPixmap& p, const QRect& r);
+ void do_notify(const TQPixmap& p, const TQRect& r);
- QString m_suggestedFilename;
+ TQString m_suggestedFilename;
#ifdef IMAGE_TITLES
- QString m_suggestedTitle;
+ TQString m_suggestedTitle;
#endif
- QMovie* m;
- QPixmap* p;
- QPixmap* scaled;
- QPixmap* bg;
+ TQMovie* m;
+ TQPixmap* p;
+ TQPixmap* scaled;
+ TQPixmap* bg;
QRgb bgColor;
- QSize bgSize;
- mutable QPixmap* pixPart;
+ TQSize bgSize;
+ mutable TQPixmap* pixPart;
ImageSource* imgSource;
const char* formatType; // Is the name of the movie format type
@@ -349,9 +349,9 @@ namespace khtml
~DocLoader();
CachedImage *requestImage( const DOM::DOMString &url);
- CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url, const QString& charsetHint,
+ CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url, const TQString& charsetHint,
const char *accept = "text/css", bool userSheet = false );
- CachedScript *requestScript( const DOM::DOMString &url, const QString& charset);
+ CachedScript *requestScript( const DOM::DOMString &url, const TQString& charset);
bool autoloadImages() const { return m_bautoloadImages; }
KIO::CacheControl cachePolicy() const { return m_cachePolicy; }
@@ -371,14 +371,14 @@ namespace khtml
void removeCachedObject( CachedObject* o) const { m_docObjects.remove( o ); }
private:
- bool needReload(CachedObject *existing, const QString &fullUrl);
+ bool needReload(CachedObject *existing, const TQString &fullUrl);
friend class Cache;
friend class DOM::DocumentImpl;
friend class ::KHTMLPart;
- QStringList m_reloadedURLs;
- mutable QPtrDict<CachedObject> m_docObjects;
+ TQStringList m_reloadedURLs;
+ mutable TQPtrDict<CachedObject> m_docObjects;
time_t m_expireDate;
time_t m_creationDate;
KIO::CacheControl m_cachePolicy;
@@ -397,7 +397,7 @@ namespace khtml
Request(DocLoader* dl, CachedObject *_object, bool _incremental);
~Request();
bool incremental;
- QBuffer m_buffer;
+ TQBuffer m_buffer;
CachedObject *object;
DocLoader* m_docLoader;
};
@@ -427,16 +427,16 @@ namespace khtml
protected slots:
void slotFinished( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray & );
+ void slotData( KIO::Job *, const TQByteArray & );
void servePendingRequests();
protected:
- QPtrList<Request> m_requestsPending;
- QPtrDict<Request> m_requestsLoading;
+ TQPtrList<Request> m_requestsPending;
+ TQPtrDict<Request> m_requestsLoading;
#ifdef HAVE_LIBJPEG
KJPEGFormatType m_jpegloader;
#endif
- QTimer m_timer;
+ TQTimer m_timer;
};
/**
@@ -471,12 +471,12 @@ namespace khtml
/**
* Pre-loads a stylesheet into the cache.
*/
- static void preloadStyleSheet(const QString &url, const QString &stylesheet_data);
+ static void preloadStyleSheet(const TQString &url, const TQString &stylesheet_data);
/**
* Pre-loads a script into the cache.
*/
- static void preloadScript(const QString &url, const QString &script_data);
+ static void preloadScript(const TQString &url, const TQString &script_data);
static void setSize( int bytes );
static int size() { return maxSize; };
@@ -492,9 +492,9 @@ namespace khtml
static Loader *loader() { return m_loader; }
- static QPixmap *nullPixmap;
- static QPixmap *brokenPixmap;
- static QPixmap *blockedPixmap;
+ static TQPixmap *nullPixmap;
+ static TQPixmap *brokenPixmap;
+ static TQPixmap *blockedPixmap;
static int cacheSize;
static void removeCacheEntry( CachedObject *object );
@@ -505,9 +505,9 @@ namespace khtml
friend class CachedObject;
- static QDict<CachedObject> *cache;
- static QPtrList<DocLoader>* docloader;
- static QPtrList<CachedObject> *freeList;
+ static TQDict<CachedObject> *cache;
+ static TQPtrList<DocLoader>* docloader;
+ static TQPtrList<CachedObject> *freeList;
static void insertInLRUList(CachedObject*);
static void removeFromLRUList(CachedObject*);
diff --git a/khtml/misc/loader_client.h b/khtml/misc/loader_client.h
index 023f147c6..3e28f7e56 100644
--- a/khtml/misc/loader_client.h
+++ b/khtml/misc/loader_client.h
@@ -1,7 +1,7 @@
#ifndef LOADER_CLIENT_H
#define LOADER_CLIENT_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "dom/dom_string.h"
namespace khtml {
@@ -25,10 +25,10 @@ namespace khtml {
// pointer to us
// return whether we need manual update
// don't ref() or deref() elements in setPixmap!!
- virtual void setPixmap(const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap(const TQPixmap &, const TQRect&, CachedImage *);
virtual void setStyleSheet(const DOM::DOMString &/*url*/, const DOM::DOMString &/*sheet*/, const DOM::DOMString &/*charset*/);
virtual void notifyFinished(CachedObject * /*finishedObj*/);
- virtual void error(int err, const QString &text);
+ virtual void error(int err, const TQString &text);
};
}
diff --git a/khtml/misc/loader_jpeg.cpp b/khtml/misc/loader_jpeg.cpp
index 4c9c97465..57174fe1b 100644
--- a/khtml/misc/loader_jpeg.cpp
+++ b/khtml/misc/loader_jpeg.cpp
@@ -36,7 +36,7 @@
#include <stdio.h>
#include <setjmp.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kglobal.h>
extern "C" {
@@ -82,9 +82,9 @@ struct khtml_jpeg_source_mgr : public jpeg_source_mgr {
int valid_buffer_len;
size_t skip_input_bytes;
int ateof;
- QRect change_rect;
- QRect old_change_rect;
- QTime decoder_timestamp;
+ TQRect change_rect;
+ TQRect old_change_rect;
+ TQTime decoder_timestamp;
bool final_pass;
bool decoding_done;
bool do_progressive;
@@ -193,7 +193,7 @@ public:
virtual ~KJPEGFormat();
- virtual int decode(QImage& img, QImageConsumer* consumer,
+ virtual int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
private:
@@ -241,7 +241,7 @@ KJPEGFormat::~KJPEGFormat()
* return < 0 means "fatal error in image decoding, don't call me ever again"
*/
-int KJPEGFormat::decode(QImage& image, QImageConsumer* consumer, const uchar* buffer, int length)
+int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* buffer, int length)
{
#ifdef JPEG_DEBUG
qDebug("KJPEGFormat::decode(%08lx, %08lx, %08lx, %d)",
@@ -438,7 +438,7 @@ again:
if(consumer && completed_scanlines)
{
- QRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines);
+ TQRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines);
#ifdef JPEG_DEBUG
qDebug("changing %d/%d %d/%d", r.x(), r.y(), r.width(), r.height());
#endif
@@ -447,10 +447,10 @@ again:
if ( jsrc.decoder_timestamp.elapsed() >= max_consumingtime ) {
if( !jsrc.old_change_rect.isEmpty()) {
consumer->changed(jsrc.old_change_rect);
- jsrc.old_change_rect = QRect();
+ jsrc.old_change_rect = TQRect();
}
consumer->changed(jsrc.change_rect);
- jsrc.change_rect = QRect();
+ jsrc.change_rect = TQRect();
jsrc.decoder_timestamp.restart();
}
}
@@ -463,7 +463,7 @@ again:
jsrc.decoding_done = jsrc.final_pass && cinfo.input_scan_number == cinfo.output_scan_number;
if ( !jsrc.decoding_done ) {
jsrc.old_change_rect |= jsrc.change_rect;
- jsrc.change_rect = QRect();
+ jsrc.change_rect = TQRect();
}
}
else
@@ -521,7 +521,7 @@ again:
// -----------------------------------------------------------------------------
// This is the factory that teaches Qt about progressive JPEG's
-QImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
+TQImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
{
if(length < 3) return 0;
diff --git a/khtml/misc/loader_jpeg.h b/khtml/misc/loader_jpeg.h
index f96d1f135..c97b2bcbf 100644
--- a/khtml/misc/loader_jpeg.h
+++ b/khtml/misc/loader_jpeg.h
@@ -26,7 +26,7 @@
#ifndef _khtml_loader_jpeg_h
#define _khtml_loader_jpeg_h
-#include <qasyncimageio.h>
+#include <tqasyncimageio.h>
namespace khtml
{
@@ -38,7 +38,7 @@ namespace khtml
class KJPEGFormatType : public QImageFormatType
{
public:
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
diff --git a/khtml/misc/multimap.h b/khtml/misc/multimap.h
index 08cb11879..125e8e07d 100644
--- a/khtml/misc/multimap.h
+++ b/khtml/misc/multimap.h
@@ -23,16 +23,16 @@
#ifndef _MultiMap_h_
#define _MultiMap_h_
-#include <qptrdict.h>
-#include <qptrlist.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
#include <assert.h>
#include <stdlib.h>
template<class T> class MultiMapPtrList;
// KMultiMap is an implementaition of a Map with multiple entries per key.
-// It is originally designed to work like a shell for QPtrDict<QPtrList>, but
-// QPtrList have been replaced with a much faster hash set.
+// It is originally designed to work like a shell for TQPtrDict<TQPtrList>, but
+// TQPtrList have been replaced with a much faster hash set.
template<class T>
class KMultiMap {
public:
@@ -63,7 +63,7 @@ public:
return dict.find(key);
}
private:
- QPtrDict<List> dict;
+ TQPtrDict<List> dict;
};
diff --git a/khtml/misc/stringit.cpp b/khtml/misc/stringit.cpp
index 5dbe857be..9b8fc5899 100644
--- a/khtml/misc/stringit.cpp
+++ b/khtml/misc/stringit.cpp
@@ -32,8 +32,8 @@ uint TokenizerString::length() const
++length;
}
if (m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
for (; i != e; ++i)
length += (*i).m_length;
}
@@ -83,8 +83,8 @@ void TokenizerString::append(const TokenizerString &s)
assert(!s.escaped());
append(s.m_currentString);
if (s.m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = s.m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = s.m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
for (; i != e; ++i)
append(*i);
}
@@ -96,8 +96,8 @@ void TokenizerString::prepend(const TokenizerString &s)
assert(!escaped());
assert(!s.escaped());
if (s.m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = s.m_substrings.fromLast();
- QValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = s.m_substrings.fromLast();
+ TQValueListConstIterator<TokenizerSubstring> e = s.m_substrings.end();
for (; i != e; --i)
prepend(*i);
}
@@ -117,9 +117,9 @@ void TokenizerString::advanceSubstring()
}
}
-QString TokenizerString::toString() const
+TQString TokenizerString::toString() const
{
- QString result;
+ TQString result;
if (!m_pushedChar1.isNull()) {
result.append(m_pushedChar1);
if (!m_pushedChar2.isNull())
@@ -127,8 +127,8 @@ QString TokenizerString::toString() const
}
m_currentString.appendTo(result);
if (m_composite) {
- QValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
- QValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
+ TQValueListConstIterator<TokenizerSubstring> i = m_substrings.begin();
+ TQValueListConstIterator<TokenizerSubstring> e = m_substrings.end();
for (; i != e; ++i)
(*i).appendTo(result);
}
diff --git a/khtml/misc/stringit.h b/khtml/misc/stringit.h
index 9b6c3885d..789f22af8 100644
--- a/khtml/misc/stringit.h
+++ b/khtml/misc/stringit.h
@@ -28,8 +28,8 @@
#include "dom/dom_string.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <assert.h>
@@ -43,9 +43,9 @@ class DOMStringIt
public:
DOMStringIt()
{ s = 0, l = 0; lines = 0; }
- DOMStringIt(QChar *str, uint len)
+ DOMStringIt(TQChar *str, uint len)
{ s = str, l = len; lines = 0; }
- DOMStringIt(const QString &str)
+ DOMStringIt(const TQString &str)
{ s = str.unicode(); l = str.length(); lines = 0; }
DOMStringIt *operator++()
@@ -60,20 +60,20 @@ public:
return this;
}
public:
- void push(const QChar& c) { /* assert(pushedChar.isNull());*/ pushedChar = c; }
+ void push(const TQChar& c) { /* assert(pushedChar.isNull());*/ pushedChar = c; }
- const QChar& operator*() const { return pushedChar.isNull() ? *s : pushedChar; }
- const QChar* operator->() const { return pushedChar.isNull() ? s : &pushedChar; }
+ const TQChar& operator*() const { return pushedChar.isNull() ? *s : pushedChar; }
+ const TQChar* operator->() const { return pushedChar.isNull() ? s : &pushedChar; }
bool escaped() const { return !pushedChar.isNull(); }
uint length() const { return l+(!pushedChar.isNull()); }
- const QChar *current() const { return pushedChar.isNull() ? s : &pushedChar; }
+ const TQChar *current() const { return pushedChar.isNull() ? s : &pushedChar; }
int lineCount() const { return lines; }
protected:
- QChar pushedChar;
- const QChar *s;
+ TQChar pushedChar;
+ const TQChar *s;
int l;
int lines;
};
@@ -85,12 +85,12 @@ class TokenizerSubstring
friend class TokenizerString;
public:
TokenizerSubstring() : m_length(0), m_current(0) {}
- TokenizerSubstring(const QString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
- TokenizerSubstring(const QChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
+ TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
+ TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
void clear() { m_length = 0; m_current = 0; }
- void appendTo(QString &str) const {
+ void appendTo(TQString &str) const {
if (m_string.unicode() == m_current) {
if (str.isEmpty())
str = m_string;
@@ -101,9 +101,9 @@ public:
}
}
private:
- QString m_string;
+ TQString m_string;
int m_length;
- const QChar *m_current;
+ const TQChar *m_current;
};
class TokenizerString
@@ -111,8 +111,8 @@ class TokenizerString
public:
TokenizerString() : m_currentChar(0), m_lines(0), m_composite(false) {}
- TokenizerString(const QChar *str, int length) : m_currentString(str, length), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
- TokenizerString(const QString &str) : m_currentString(str), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
+ TokenizerString(const TQChar *str, int length) : m_currentString(str, length), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
+ TokenizerString(const TQString &str) : m_currentString(str), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
TokenizerString(const TokenizerString &o) : m_pushedChar1(o.m_pushedChar1), m_pushedChar2(o.m_pushedChar2),
m_currentString(o.m_currentString), m_substrings(o.m_substrings),
m_lines(o.m_lines), m_composite(o.m_composite) {
@@ -124,7 +124,7 @@ public:
void append(const TokenizerString &);
void prepend(const TokenizerString &);
- void push(QChar c) {
+ void push(TQChar c) {
if (m_pushedChar1.isNull()) {
m_pushedChar1 = c;
m_currentChar = m_pushedChar1.isNull() ? m_currentString.m_current : &m_pushedChar1;
@@ -155,31 +155,31 @@ public:
int lineCount() const { return m_lines; }
void resetLineCount() { m_lines = 0; }
- QString toString() const;
+ TQString toString() const;
void operator++() { advance(); }
- const QChar &operator*() const { return *current(); }
- const QChar *operator->() const { return current(); }
+ const TQChar &operator*() const { return *current(); }
+ const TQChar *operator->() const { return current(); }
private:
void append(const TokenizerSubstring &);
void prepend(const TokenizerSubstring &);
void advanceSubstring();
- const QChar *current() const { return m_currentChar; }
+ const TQChar *current() const { return m_currentChar; }
- QChar m_pushedChar1;
- QChar m_pushedChar2;
+ TQChar m_pushedChar1;
+ TQChar m_pushedChar2;
TokenizerSubstring m_currentString;
- const QChar *m_currentChar;
- QValueList<TokenizerSubstring> m_substrings;
+ const TQChar *m_currentChar;
+ TQValueList<TokenizerSubstring> m_substrings;
int m_lines;
bool m_composite;
};
-class TokenizerQueue : public QValueList<TokenizerString>
+class TokenizerQueue : public TQValueList<TokenizerString>
{
public:
diff --git a/khtml/rendering/bidi.cpp b/khtml/rendering/bidi.cpp
index a220641b2..19de828a0 100644
--- a/khtml/rendering/bidi.cpp
+++ b/khtml/rendering/bidi.cpp
@@ -31,8 +31,8 @@
#include "xml/dom_docimpl.h"
#include "kdebug.h"
-#include "qdatetime.h"
-#include "qfontmetrics.h"
+#include "tqdatetime.h"
+#include "tqfontmetrics.h"
#define BIDI_DEBUG 0
//#define DEBUG_LINEBREAKS
@@ -51,8 +51,8 @@ struct BidiIterator
bool atEnd() const;
- const QChar &current() const;
- QChar::Direction direction() const;
+ const TQChar &current() const;
+ TQChar::Direction direction() const;
RenderBlock *par;
RenderObject *obj;
@@ -61,11 +61,11 @@ struct BidiIterator
struct BidiStatus {
- BidiStatus() : eor(QChar::DirON), lastStrong(QChar::DirON), last(QChar::DirON) {}
+ BidiStatus() : eor(TQChar::DirON), lastStrong(TQChar::DirON), last(TQChar::DirON) {}
- QChar::Direction eor;
- QChar::Direction lastStrong;
- QChar::Direction last;
+ TQChar::Direction eor;
+ TQChar::Direction lastStrong;
+ TQChar::Direction last;
};
struct BidiState {
@@ -91,19 +91,19 @@ static bool sBuildingCompactRuns;
// Midpoint globals. The goal is not to do any allocation when dealing with
// these midpoints, so we just keep an array around and never clear it. We track
// the number of items and position using the two other variables.
-static QMemArray<BidiIterator> *smidpoints;
+static TQMemArray<BidiIterator> *smidpoints;
static uint sNumMidpoints;
static uint sCurrMidpoint;
static bool betweenMidpoints;
static bool isLineEmpty = true;
static bool previousLineBrokeAtBR = true;
-static QChar::Direction dir;
+static TQChar::Direction dir;
static bool adjustEmbedding;
static bool emptyRun = true;
static int numSpaces;
-static void embed( QChar::Direction d, BidiState &bidi );
+static void embed( TQChar::Direction d, BidiState &bidi );
static void appendRun( BidiState &bidi );
static int getBPMWidth(int childValue, Length cssUnit)
@@ -197,7 +197,7 @@ static void deleteBidiRuns(RenderArena* arena)
Each line of text caches the embedding level at the start of the line for faster
relayouting
*/
-BidiContext::BidiContext(unsigned char l, QChar::Direction e, BidiContext *p, bool o)
+BidiContext::BidiContext(unsigned char l, TQChar::Direction e, BidiContext *p, bool o)
: level(l) , override(o), dir(e)
{
parent = p;
@@ -255,8 +255,8 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
EUnicodeBidi ub = next->style()->unicodeBidi();
if ( ub != UBNormal && !emptyRun ) {
EDirection dir = next->style()->direction();
- QChar::Direction d = ( ub == Embed ? ( dir == RTL ? QChar::DirRLE : QChar::DirLRE )
- : ( dir == RTL ? QChar::DirRLO : QChar::DirLRO ) );
+ TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE )
+ : ( dir == RTL ? TQChar::DirRLO : TQChar::DirLRO ) );
embed( d, bidi );
}
}
@@ -266,7 +266,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
next = current->nextSibling();
if (next) break;
if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) {
- embed( QChar::DirPDF, bidi );
+ embed( TQChar::DirPDF, bidi );
}
current = current->parent();
}
@@ -321,9 +321,9 @@ inline bool BidiIterator::atEnd() const
return false;
}
-const QChar &BidiIterator::current() const
+const TQChar &BidiIterator::current() const
{
- static QChar nonBreakingSpace(0xA0);
+ static TQChar nonBreakingSpace(0xA0);
if (!obj || !obj->isText())
return nonBreakingSpace;
@@ -335,13 +335,13 @@ const QChar &BidiIterator::current() const
return text->text()[pos];
}
-inline QChar::Direction BidiIterator::direction() const
+inline TQChar::Direction BidiIterator::direction() const
{
- if(!obj || !obj->isText() ) return QChar::DirON;
+ if(!obj || !obj->isText() ) return TQChar::DirON;
RenderText *renderTxt = static_cast<RenderText *>( obj );
if ( pos >= renderTxt->stringLength() )
- return QChar::DirON;
+ return TQChar::DirON;
return renderTxt->text()[pos].direction();
}
@@ -363,8 +363,8 @@ static void addRun(BidiRun* bidiRun)
RenderText* text = static_cast<RenderText*>(bidiRun->obj);
if (text->text()) {
for (int i = bidiRun->start; i < bidiRun->stop; i++) {
- const QChar c = text->text()[i];
- if (c.category() == QChar::Separator_Space || c == '\n')
+ const TQChar c = text->text()[i];
+ if (c.category() == TQChar::Separator_Space || c == '\n')
numSpaces++;
}
}
@@ -539,19 +539,19 @@ static void appendRun( BidiState &bidi )
bidi.eor.increment( bidi );
bidi.sor = bidi.eor;
- dir = QChar::DirON;
- bidi.status.eor = QChar::DirON;
+ dir = TQChar::DirON;
+ bidi.status.eor = TQChar::DirON;
adjustEmbedding = b;
}
-static void embed( QChar::Direction d, BidiState &bidi )
+static void embed( TQChar::Direction d, BidiState &bidi )
{
#if BIDI_DEBUG > 1
qDebug("*** embed dir=%d emptyrun=%d", d, emptyRun );
#endif
bool b = adjustEmbedding ;
adjustEmbedding = false;
- if ( d == QChar::DirPDF ) {
+ if ( d == TQChar::DirPDF ) {
BidiContext *c = bidi.context->parent;
if (c) {
if ( bidi.eor != bidi.last ) {
@@ -566,23 +566,23 @@ static void embed( QChar::Direction d, BidiState &bidi )
if(bidi.context->override)
dir = bidi.context->dir;
else
- dir = QChar::DirON;
+ dir = TQChar::DirON;
bidi.status.lastStrong = bidi.context->dir;
}
} else {
- QChar::Direction runDir;
- if( d == QChar::DirRLE || d == QChar::DirRLO )
- runDir = QChar::DirR;
+ TQChar::Direction runDir;
+ if( d == TQChar::DirRLE || d == TQChar::DirRLO )
+ runDir = TQChar::DirR;
else
- runDir = QChar::DirL;
+ runDir = TQChar::DirL;
bool override;
- if( d == QChar::DirLRO || d == QChar::DirRLO )
+ if( d == TQChar::DirLRO || d == TQChar::DirRLO )
override = true;
else
override = false;
unsigned char level = bidi.context->level;
- if ( runDir == QChar::DirR ) {
+ if ( runDir == TQChar::DirR ) {
if(level%2) // we have an odd level
level += 2;
else
@@ -728,7 +728,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
case TAAUTO:
numSpaces = 0;
// for right to left fall through to right aligned
- if (bidi.context->basicDir == QChar::DirL)
+ if (bidi.context->basicDir == TQChar::DirL)
break;
case RIGHT:
case KHTML_RIGHT:
@@ -750,8 +750,8 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
// get the number of spaces in the run
int spaces = 0;
for ( int i = r->start; i < r->stop; i++ ) {
- const QChar c = static_cast<RenderText *>(r->obj)->text()[i];
- if (c.category() == QChar::Separator_Space || c == '\n')
+ const TQChar c = static_cast<RenderText *>(r->obj)->text()[i];
+ if (c.category() == TQChar::Separator_Space || c == '\n')
spaces++;
}
@@ -904,7 +904,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// context->ref();
- dir = QChar::DirON;
+ dir = TQChar::DirON;
emptyRun = true;
numSpaces = 0;
@@ -914,7 +914,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
bool atEnd = false;
while( 1 ) {
- QChar::Direction dirCurrent;
+ TQChar::Direction dirCurrent;
if (atEnd) {
//kdDebug(6041) << "atEnd" << endl;
BidiContext *c = bidi.context;
@@ -935,105 +935,105 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
switch(dirCurrent) {
// embedding and overrides (X1-X9 in the Bidi specs)
- case QChar::DirRLE:
- case QChar::DirLRE:
- case QChar::DirRLO:
- case QChar::DirLRO:
- case QChar::DirPDF:
+ case TQChar::DirRLE:
+ case TQChar::DirLRE:
+ case TQChar::DirRLO:
+ case TQChar::DirLRO:
+ case TQChar::DirPDF:
embed( dirCurrent, bidi );
break;
// strong types
- case QChar::DirL:
- if(dir == QChar::DirON)
- dir = QChar::DirL;
+ case TQChar::DirL:
+ if(dir == TQChar::DirON)
+ dir = TQChar::DirL;
switch(bidi.status.last)
{
- case QChar::DirL:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirL; break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirL:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirL; break;
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
appendRun( bidi );
break;
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirCS:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if( bidi.status.eor != QChar::DirL ) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirCS:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if( bidi.status.eor != TQChar::DirL ) {
//last stuff takes embedding dir
- if(bidi.context->dir == QChar::DirL || bidi.status.lastStrong == QChar::DirL) {
- if ( bidi.status.eor != QChar::DirEN && bidi.status.eor != QChar::DirAN && bidi.status.eor != QChar::DirON )
+ if(bidi.context->dir == TQChar::DirL || bidi.status.lastStrong == TQChar::DirL) {
+ if ( bidi.status.eor != TQChar::DirEN && bidi.status.eor != TQChar::DirAN && bidi.status.eor != TQChar::DirON )
appendRun( bidi );
- dir = QChar::DirL;
+ dir = TQChar::DirL;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirL;
+ bidi.status.eor = TQChar::DirL;
} else {
- if ( bidi.status.eor == QChar::DirEN || bidi.status.eor == QChar::DirAN )
+ if ( bidi.status.eor == TQChar::DirEN || bidi.status.eor == TQChar::DirAN )
{
dir = bidi.status.eor;
appendRun( bidi );
}
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirL;
- bidi.status.eor = QChar::DirL;
+ dir = TQChar::DirL;
+ bidi.status.eor = TQChar::DirL;
}
} else {
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirL;
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirL;
}
default:
break;
}
- bidi.status.lastStrong = QChar::DirL;
+ bidi.status.lastStrong = TQChar::DirL;
break;
- case QChar::DirAL:
- case QChar::DirR:
- if(dir == QChar::DirON) dir = QChar::DirR;
+ case TQChar::DirAL:
+ case TQChar::DirR:
+ if(dir == TQChar::DirON) dir = TQChar::DirR;
switch(bidi.status.last)
{
- case QChar::DirR:
- case QChar::DirAL:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirR; break;
- case QChar::DirL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirR; break;
+ case TQChar::DirL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
appendRun( bidi );
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirR;
+ bidi.status.eor = TQChar::DirR;
break;
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirCS:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if( !(bidi.status.eor == QChar::DirR) && !(bidi.status.eor == QChar::DirAL) ) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirCS:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if( !(bidi.status.eor == TQChar::DirR) && !(bidi.status.eor == TQChar::DirAL) ) {
//last stuff takes embedding dir
- if(bidi.context->dir == QChar::DirR || bidi.status.lastStrong == QChar::DirR
- || bidi.status.lastStrong == QChar::DirAL) {
+ if(bidi.context->dir == TQChar::DirR || bidi.status.lastStrong == TQChar::DirR
+ || bidi.status.lastStrong == TQChar::DirAL) {
appendRun( bidi );
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirR;
+ bidi.status.eor = TQChar::DirR;
} else {
- dir = QChar::DirL;
+ dir = TQChar::DirL;
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirR;
- bidi.status.eor = QChar::DirR;
+ dir = TQChar::DirR;
+ bidi.status.eor = TQChar::DirR;
}
} else {
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirR;
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirR;
}
default:
break;
@@ -1043,64 +1043,64 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// weak types:
- case QChar::DirNSM:
+ case TQChar::DirNSM:
// ### if @sor, set dir to dirSor
break;
- case QChar::DirEN:
- if(!(bidi.status.lastStrong == QChar::DirAL)) {
+ case TQChar::DirEN:
+ if(!(bidi.status.lastStrong == TQChar::DirAL)) {
// if last strong was AL change EN to AN
- if(dir == QChar::DirON) {
- dir = QChar::DirL;
+ if(dir == TQChar::DirON) {
+ dir = TQChar::DirL;
}
switch(bidi.status.last)
{
- case QChar::DirET:
- if ( bidi.status.lastStrong == QChar::DirR || bidi.status.lastStrong == QChar::DirAL ) {
+ case TQChar::DirET:
+ if ( bidi.status.lastStrong == TQChar::DirR || bidi.status.lastStrong == TQChar::DirAL ) {
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
}
// fall through
- case QChar::DirEN:
- case QChar::DirL:
+ case TQChar::DirEN:
+ case TQChar::DirL:
bidi.eor = bidi.current;
bidi.status.eor = dirCurrent;
break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirAN:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirAN:
appendRun( bidi );
- bidi.status.eor = QChar::DirEN;
- dir = QChar::DirEN; break;
- case QChar::DirES:
- case QChar::DirCS:
- if(bidi.status.eor == QChar::DirEN) {
+ bidi.status.eor = TQChar::DirEN;
+ dir = TQChar::DirEN; break;
+ case TQChar::DirES:
+ case TQChar::DirCS:
+ if(bidi.status.eor == TQChar::DirEN) {
bidi.eor = bidi.current; break;
}
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if(bidi.status.eor == QChar::DirR) {
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if(bidi.status.eor == TQChar::DirR) {
// neutrals go to R
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
}
- else if( bidi.status.eor == QChar::DirL ||
- (bidi.status.eor == QChar::DirEN && bidi.status.lastStrong == QChar::DirL)) {
+ else if( bidi.status.eor == TQChar::DirL ||
+ (bidi.status.eor == TQChar::DirEN && bidi.status.lastStrong == TQChar::DirL)) {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
} else {
// numbers on both sides, neutrals get right to left direction
- if(dir != QChar::DirL) {
+ if(dir != TQChar::DirL) {
appendRun( bidi );
bidi.eor = bidi.last;
- dir = QChar::DirR;
+ dir = TQChar::DirR;
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
} else {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
}
@@ -1110,49 +1110,49 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
}
break;
}
- case QChar::DirAN:
- dirCurrent = QChar::DirAN;
- if(dir == QChar::DirON) dir = QChar::DirAN;
+ case TQChar::DirAN:
+ dirCurrent = TQChar::DirAN;
+ if(dir == TQChar::DirON) dir = TQChar::DirAN;
switch(bidi.status.last)
{
- case QChar::DirL:
- case QChar::DirAN:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirAN; break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
+ case TQChar::DirL:
+ case TQChar::DirAN:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirAN; break;
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
appendRun( bidi );
- dir = QChar::DirAN; bidi.status.eor = QChar::DirAN;
+ dir = TQChar::DirAN; bidi.status.eor = TQChar::DirAN;
break;
- case QChar::DirCS:
- if(bidi.status.eor == QChar::DirAN) {
+ case TQChar::DirCS:
+ if(bidi.status.eor == TQChar::DirAN) {
bidi.eor = bidi.current; break;
}
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if(bidi.status.eor == QChar::DirR) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if(bidi.status.eor == TQChar::DirR) {
// neutrals go to R
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirAN;
- bidi.status.eor = QChar::DirAN;
- } else if( bidi.status.eor == QChar::DirL ||
- (bidi.status.eor == QChar::DirEN && bidi.status.lastStrong == QChar::DirL)) {
+ dir = TQChar::DirAN;
+ bidi.status.eor = TQChar::DirAN;
+ } else if( bidi.status.eor == TQChar::DirL ||
+ (bidi.status.eor == TQChar::DirEN && bidi.status.lastStrong == TQChar::DirL)) {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
} else {
// numbers on both sides, neutrals get right to left direction
- if(dir != QChar::DirL) {
+ if(dir != TQChar::DirL) {
appendRun( bidi );
bidi.eor = bidi.last;
- dir = QChar::DirR;
+ dir = TQChar::DirR;
appendRun( bidi );
- dir = QChar::DirAN;
- bidi.status.eor = QChar::DirAN;
+ dir = TQChar::DirAN;
+ bidi.status.eor = TQChar::DirAN;
} else {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
}
@@ -1161,30 +1161,30 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
break;
}
break;
- case QChar::DirES:
- case QChar::DirCS:
+ case TQChar::DirES:
+ case TQChar::DirCS:
break;
- case QChar::DirET:
- if(bidi.status.last == QChar::DirEN) {
- dirCurrent = QChar::DirEN;
+ case TQChar::DirET:
+ if(bidi.status.last == TQChar::DirEN) {
+ dirCurrent = TQChar::DirEN;
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
break;
}
break;
// boundary neutrals should be ignored
- case QChar::DirBN:
+ case TQChar::DirBN:
break;
// neutrals
- case QChar::DirB:
+ case TQChar::DirB:
// ### what do we do with newline and paragraph seperators that come to here?
break;
- case QChar::DirS:
+ case TQChar::DirS:
// ### implement rule L1
break;
- case QChar::DirWS:
+ case TQChar::DirWS:
break;
- case QChar::DirON:
+ case TQChar::DirON:
break;
default:
break;
@@ -1197,31 +1197,31 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// set status.last as needed.
switch(dirCurrent)
{
- case QChar::DirET:
- case QChar::DirES:
- case QChar::DirCS:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
+ case TQChar::DirET:
+ case TQChar::DirES:
+ case TQChar::DirCS:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
switch(bidi.status.last)
{
- case QChar::DirL:
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirL:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
bidi.status.last = dirCurrent;
break;
default:
- bidi.status.last = QChar::DirON;
+ bidi.status.last = TQChar::DirON;
}
break;
- case QChar::DirNSM:
- case QChar::DirBN:
+ case TQChar::DirNSM:
+ case TQChar::DirBN:
// ignore these
break;
- case QChar::DirEN:
- if ( bidi.status.last == QChar::DirL ) {
+ case TQChar::DirEN:
+ if ( bidi.status.last == TQChar::DirL ) {
break;
}
// fall through
@@ -1285,7 +1285,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
#if BIDI_DEBUG > 0
kdDebug(6041) << "lineLow = " << (uint)levelLow << ", lineHigh = " << (uint)levelHigh << endl;
kdDebug(6041) << "logical order is:" << endl;
- QPtrListIterator<BidiRun> it2(runs);
+ TQPtrListIterator<BidiRun> it2(runs);
BidiRun *r2;
for ( ; (r2 = it2.current()); ++it2 )
kdDebug(6041) << " " << r2 << " start=" << r2->start << " stop=" << r2->stop << " level=" << (uint)r2->level << endl;
@@ -1369,7 +1369,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
invalidateVerticalPositions();
#ifdef DEBUG_LAYOUT
- QTime qt;
+ TQTime qt;
qt.start();
kdDebug( 6040 ) << renderName() << " layoutInlineChildren( " << this <<" )" << endl;
#endif
@@ -1423,16 +1423,16 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
BidiContext *startEmbed;
if( style()->direction() == LTR ) {
- startEmbed = new BidiContext( 0, QChar::DirL );
- bidi.status.eor = QChar::DirL;
+ startEmbed = new BidiContext( 0, TQChar::DirL );
+ bidi.status.eor = TQChar::DirL;
} else {
- startEmbed = new BidiContext( 1, QChar::DirR );
- bidi.status.eor = QChar::DirR;
+ startEmbed = new BidiContext( 1, TQChar::DirR );
+ bidi.status.eor = TQChar::DirR;
}
startEmbed->ref();
- bidi.status.lastStrong = QChar::DirON;
- bidi.status.last = QChar::DirON;
+ bidi.status.lastStrong = TQChar::DirON;
+ bidi.status.last = TQChar::DirON;
bidi.context = startEmbed;
adjustEmbedding = true;
@@ -1443,7 +1443,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
m_firstLine = true;
if (!smidpoints)
- smidpoints = new QMemArray<BidiIterator>;
+ smidpoints = new TQMemArray<BidiIterator>;
sNumMidpoints = 0;
sCurrMidpoint = 0;
@@ -1528,7 +1528,7 @@ redo_linebreak:
adjustEmbedding = true;
end.increment(bidi);
adjustEmbedding = false;
- } else if (end.obj && end.obj->style()->preserveLF() && end.current() == QChar('\n')) {
+ } else if (end.obj && end.obj->style()->preserveLF() && end.current() == TQChar('\n')) {
adjustEmbedding = true;
end.increment(bidi);
adjustEmbedding = false;
@@ -1836,7 +1836,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// item, then this is all moot. -dwh
RenderObject* next = Bidinext( start.par, o, bidi );
if (!style()->preserveWS() && next && next->isText() && static_cast<RenderText*>(next)->stringLength() > 0 &&
- (static_cast<RenderText*>(next)->text()[0].category() == QChar::Separator_Space ||
+ (static_cast<RenderText*>(next)->text()[0].category() == TQChar::Separator_Space ||
static_cast<RenderText*>(next)->text()[0] == '\n')) {
currentCharacterIsSpace = true;
ignoringSpaces = true;
@@ -1848,7 +1848,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
RenderText *t = static_cast<RenderText *>(o);
int strlen = t->stringLength();
int len = strlen - pos;
- QChar *str = t->text();
+ TQChar *str = t->text();
const Font *f = t->htmlFont( m_firstLine );
// proportional font, needs a bit more work.
@@ -1868,7 +1868,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
bool previousCharacterIsSpace = currentCharacterIsSpace;
bool isSoftBreakable = nextIsSoftBreakable;
nextIsSoftBreakable = false;
- const QChar c = str[pos];
+ const TQChar c = str[pos];
currentCharacterIsSpace = c == ' ';
if (preserveWS || !currentCharacterIsSpace)
@@ -1933,7 +1933,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
!t->containsOnlyWhitespace(pos+1, strlen-(pos+1)));
#endif
#ifdef DEBUG_LINEBREAKS
- kdDebug(6041) << "found space at " << pos << " in string '" << QString( str, strlen ).latin1() << "' adding " << tmpW << " new width = " << w << endl;
+ kdDebug(6041) << "found space at " << pos << " in string '" << TQString( str, strlen ).latin1() << "' adding " << tmpW << " new width = " << w << endl;
#endif
if ( autoWrap && w + tmpW > width && w == 0 ) {
int fb = nearestFloatBottom(m_height);
@@ -2039,7 +2039,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
checkForBreak = false;
RenderText* nextText = static_cast<RenderText*>(next);
if (nextText->stringLength() != 0) {
- QChar c = nextText->text()[0];
+ TQChar c = nextText->text()[0];
if (c == ' ' || c == '\t' || (c == '\n' && !next->style()->preserveLF())) {
// If the next item on the line is text, and if we did not end with
// a space, then the next text run continues our word (and so it needs to
@@ -2191,7 +2191,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if (lBreak.obj && lBreak.pos >= 2 && lBreak.obj->isText()) {
// For soft hyphens on line breaks, we have to chop out the midpoints that made us
// ignore the hyphen so that it will render at the end of the line.
- QChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1];
+ TQChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1];
if (c.unicode() == SOFT_HYPHEN)
chopMidpointsAt(lBreak.obj, lBreak.pos-2);
}
@@ -2218,8 +2218,8 @@ void RenderBlock::deleteEllipsisLineBoxes()
void RenderBlock::checkLinesForTextOverflow()
{
// Determine the width of the ellipsis using the current font.
- QChar ellipsis = 0x2026; // FIXME: CSS3 says this is configurable, also need to use 0x002E (FULL STOP) if 0x2026 not renderable
- static QString ellipsisStr(ellipsis);
+ TQChar ellipsis = 0x2026; // FIXME: CSS3 says this is configurable, also need to use 0x002E (FULL STOP) if 0x2026 not renderable
+ static TQString ellipsisStr(ellipsis);
const Font& firstLineFont = style(true)->htmlFont();
const Font& font = style()->htmlFont();
int firstLineEllipsisWidth = firstLineFont.width(&ellipsis, 1, 0);
diff --git a/khtml/rendering/bidi.h b/khtml/rendering/bidi.h
index 4d6b6aaf1..15a9ab906 100644
--- a/khtml/rendering/bidi.h
+++ b/khtml/rendering/bidi.h
@@ -23,7 +23,7 @@
#ifndef BIDI_H
#define BIDI_H
-#include <qstring.h>
+#include <tqstring.h>
namespace khtml {
class RenderArena;
@@ -33,7 +33,7 @@ namespace khtml {
class BidiContext {
public:
- BidiContext(unsigned char level, QChar::Direction embedding, BidiContext *parent = 0, bool override = false);
+ BidiContext(unsigned char level, TQChar::Direction embedding, BidiContext *parent = 0, bool override = false);
~BidiContext();
void ref() const;
@@ -41,8 +41,8 @@ namespace khtml {
unsigned char level;
bool override : 1;
- QChar::Direction dir : 5;
- QChar::Direction basicDir : 5;
+ TQChar::Direction dir : 5;
+ TQChar::Direction basicDir : 5;
BidiContext *parent;
@@ -52,21 +52,21 @@ namespace khtml {
};
struct BidiRun {
- BidiRun(int _start, int _stop, RenderObject *_obj, BidiContext *context, QChar::Direction dir)
+ BidiRun(int _start, int _stop, RenderObject *_obj, BidiContext *context, TQChar::Direction dir)
: start( _start ), stop( _stop ), obj( _obj ), box(0), nextRun(0)
{
- if(dir == QChar::DirON) dir = context->dir;
+ if(dir == TQChar::DirON) dir = context->dir;
level = context->level;
// add level of run (cases I1 & I2)
if( level % 2 ) {
- if(dir == QChar::DirL || dir == QChar::DirAN || dir == QChar::DirEN)
+ if(dir == TQChar::DirL || dir == TQChar::DirAN || dir == TQChar::DirEN)
level++;
} else {
- if( dir == QChar::DirR )
+ if( dir == TQChar::DirR )
level++;
- else if( dir == QChar::DirAN || dir == QChar::DirEN)
+ else if( dir == TQChar::DirAN || dir == TQChar::DirEN)
level += 2;
}
}
diff --git a/khtml/rendering/break_lines.cpp b/khtml/rendering/break_lines.cpp
index 483455127..a0d314cee 100644
--- a/khtml/rendering/break_lines.cpp
+++ b/khtml/rendering/break_lines.cpp
@@ -1,8 +1,8 @@
#include <break_lines.h>
#include <klibloader.h>
-#include "qcstring.h"
-#include <qtextcodec.h>
-#include <qcleanuphandler.h>
+#include "tqcstring.h"
+#include <tqtextcodec.h>
+#include <tqcleanuphandler.h>
#include <config.h>
@@ -38,7 +38,7 @@ namespace khtml {
free(isbreakable);
if (library) library->unload();
}
- const QChar *string;
+ const TQChar *string;
int *wbrpos;
int *isbreakable;
int allocated;
@@ -56,9 +56,9 @@ namespace khtml {
#endif
}
- bool isBreakableThai( const QChar *string, const int pos, const int len)
+ bool isBreakableThai( const TQChar *string, const int pos, const int len)
{
- static QTextCodec *thaiCodec = QTextCodec::codecForMib(2259);
+ static TQTextCodec *thaiCodec = TQTextCodec::codecForMib(2259);
//printf("Entering isBreakableThai with pos = %d\n", pos);
#ifndef HAVE_LIBTHAI
@@ -96,7 +96,7 @@ namespace khtml {
// build up string of thai chars
if ( string != cache->string ) {
//fprintf(stderr,"new string found (not in cache), calling libthai\n");
- QCString cstr = thaiCodec->fromUnicode( QConstString(string,len).string());
+ TQCString cstr = thaiCodec->fromUnicode( TQConstString(string,len).string());
//printf("About to call libthai::th_brk with str: %s",cstr.data());
cache->numwbrpos = th_brk((const unsigned char*) cstr.data(), cache->wbrpos, cache->allocated);
diff --git a/khtml/rendering/break_lines.h b/khtml/rendering/break_lines.h
index e33fce247..5176e5fb0 100644
--- a/khtml/rendering/break_lines.h
+++ b/khtml/rendering/break_lines.h
@@ -1,7 +1,7 @@
#ifndef BREAK_LINES_H
#define BREAK_LINES_H
-#include <qstring.h>
+#include <tqstring.h>
namespace khtml {
@@ -12,8 +12,8 @@ namespace khtml {
Korean, Chinese ones should work as well
*/
/*
- dontbreakbefore[] contains characters not covered by QChar::Punctuation_Close that shouldn't be broken before.
- chars included in QChar::Punctuation_Close are listed below.(look at UAX #14)
+ dontbreakbefore[] contains characters not covered by TQChar::Punctuation_Close that shouldn't be broken before.
+ chars included in TQChar::Punctuation_Close are listed below.(look at UAX #14)
- 3001 ideographic comma
- 3002 ideographic full stop
- FE50 small comma
@@ -88,7 +88,7 @@ namespace khtml {
0xFF70 //halfwidth katakana-hiragana prolonged sound mark
};
- // characters that aren't covered by QChar::Punctuation_Open
+ // characters that aren't covered by TQChar::Punctuation_Open
const ushort dontbreakafter[] = {
0x3012, //postal mark
0xFF03, //full width pound mark
@@ -116,12 +116,12 @@ namespace khtml {
}
}
- bool isBreakableThai( const QChar *string, const int pos, const int len);
+ bool isBreakableThai( const TQChar *string, const int pos, const int len);
void cleanup_thaibreaks();
- inline bool isBreakable( const QChar *str, const int pos, int len )
+ inline bool isBreakable( const TQChar *str, const int pos, int len )
{
- const QChar *c = str+pos;
+ const TQChar *c = str+pos;
unsigned short ch = c->unicode();
if ( ch > 0xff ) {
// not latin1, need to do more sophisticated checks for asian fonts
@@ -140,10 +140,10 @@ namespace khtml {
return false; // never break before first character
// check for simple punctuation cases
- QChar::Category cat = c->category();
- if ( cat == QChar::Punctuation_Close ||
- cat == QChar::Punctuation_Other ||
- (str+(pos-1))->category() == QChar::Punctuation_Open )
+ TQChar::Category cat = c->category();
+ if ( cat == TQChar::Punctuation_Close ||
+ cat == TQChar::Punctuation_Other ||
+ (str+(pos-1))->category() == TQChar::Punctuation_Open )
return false;
// do binary search in dontbreak[]
diff --git a/khtml/rendering/enumerate.cpp b/khtml/rendering/enumerate.cpp
index 75af71465..9cfe149ad 100644
--- a/khtml/rendering/enumerate.cpp
+++ b/khtml/rendering/enumerate.cpp
@@ -25,20 +25,20 @@
#include "rendering/enumerate.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace khtml {
namespace Enumerate {
-QString toRoman( int number, bool upper )
+TQString toRoman( int number, bool upper )
{
- if (number < 1 || number > 3999) return QString::number(number);
- QString roman;
- static const QChar ldigits[] = { 'i', 'v', 'x', 'l', 'c', 'd', 'm' };
- static const QChar udigits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' };
- const QChar *digits = upper ? udigits : ldigits;
+ if (number < 1 || number > 3999) return TQString::number(number);
+ TQString roman;
+ static const TQChar ldigits[] = { 'i', 'v', 'x', 'l', 'c', 'd', 'm' };
+ static const TQChar udigits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' };
+ const TQChar *digits = upper ? udigits : ldigits;
int i, d = 0;
do
@@ -66,20 +66,20 @@ QString toRoman( int number, bool upper )
return roman;
}
-QString toGeorgian( int number )
+TQString toGeorgian( int number )
{
- QString georgian;
- const QChar tenthousand = 0x10ef;
- static const QChar thousands[9] = {0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec,
+ TQString georgian;
+ const TQChar tenthousand = 0x10ef;
+ static const TQChar thousands[9] = {0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec,
0x10ed, 0x10ee, 0x10f4, 0x10f5 };
- static const QChar hundreds[9] = {0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10f3,
+ static const TQChar hundreds[9] = {0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10f3,
0x10e4, 0x10e5, 0x10e6, 0x10e7 };
- static const QChar tens[9] = {0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc,
+ static const TQChar tens[9] = {0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc,
0x10f2, 0x10dd, 0x10de, 0x10df };
- static const QChar units[9] = {0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4,
+ static const TQChar units[9] = {0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4,
0x10d5, 0x10d6, 0x10f1, 0x10d7 };
- if (number < 1 || number > 19999) return QString::number(number);
+ if (number < 1 || number > 19999) return TQString::number(number);
if (number >= 10000) {
georgian.append(tenthousand);
number = number - 10000;
@@ -103,54 +103,54 @@ QString toGeorgian( int number )
return georgian;
}
-QString toArmenian( int number )
+TQString toArmenian( int number )
{
- QString armenian;
+ TQString armenian;
int onethousand = 0x57c;
int hundreds = 0x572;
int tens = 0x569;
int units = 0x560;
// The standard defines values over 1999, but 7000 is very hard to render
- if (number < 1 || number > 1999) return QString::number(number);
+ if (number < 1 || number > 1999) return TQString::number(number);
if (number >= 1000) {
- armenian.append(QChar(onethousand));
+ armenian.append(TQChar(onethousand));
number = number - 1000;
}
if (number >= 100) {
- armenian.append(QChar(hundreds+number/100));
+ armenian.append(TQChar(hundreds+number/100));
number = number % 100;
}
if (number >= 10) {
- armenian.append(QChar(tens+number/10));
+ armenian.append(TQChar(tens+number/10));
number = number % 10;
}
if (number >= 1) {
- armenian.append(QChar(units+number));
+ armenian.append(TQChar(units+number));
}
return armenian;
}
-QString toHebrew( int number ) {
- static const QChar tenDigit[] = {1497, 1499, 1500, 1502, 1504, 1505, 1506, 1508, 1510};
+TQString toHebrew( int number ) {
+ static const TQChar tenDigit[] = {1497, 1499, 1500, 1502, 1504, 1505, 1506, 1508, 1510};
- QString letter;
- if (number < 1) return QString::number(number);
+ TQString letter;
+ if (number < 1) return TQString::number(number);
if (number>999) {
- letter = toHebrew(number/1000) + QString::fromLatin1("'");
+ letter = toHebrew(number/1000) + TQString::fromLatin1("'");
number = number%1000;
}
int hunderts = (number/400);
if (hunderts > 0) {
for(int i=0; i<hunderts; i++) {
- letter += QChar(1511 + 3);
+ letter += TQChar(1511 + 3);
}
}
number = number % 400;
if ((number / 100) != 0) {
- letter += QChar (1511 + (number / 100) -1);
+ letter += TQChar (1511 + (number / 100) -1);
}
number = number % 100;
int tens = number/10;
@@ -158,27 +158,27 @@ QString toHebrew( int number ) {
letter += tenDigit[tens-1];
}
if (number == 15 || number == 16) { // special because of religious
- letter += QChar(1487 + 9); // reasons
- letter += QChar(1487 + number - 9);
+ letter += TQChar(1487 + 9); // reasons
+ letter += TQChar(1487 + number - 9);
} else {
number = number % 10;
if (number != 0) {
- letter += QChar (1487 + number);
+ letter += TQChar (1487 + number);
}
}
return letter;
}
-static inline QString toLatin( int number, int base ) {
- if (number < 1) return QString::number(number);
- QValueList<QChar> letters;
+static inline TQString toLatin( int number, int base ) {
+ if (number < 1) return TQString::number(number);
+ TQValueList<TQChar> letters;
while(number > 0) {
number--; // number 0 is letter a
- QChar letter = (QChar) (base + (number % 26));
+ TQChar letter = (TQChar) (base + (number % 26));
letters.prepend(letter);
number /= 26;
}
- QString str;
+ TQString str;
str.setLength(letters.size());
int i=0;
while(!letters.isEmpty()) {
@@ -188,24 +188,24 @@ static inline QString toLatin( int number, int base ) {
return str;
}
-QString toLowerLatin( int number ) {
+TQString toLowerLatin( int number ) {
return toLatin( number, 'a' );
}
-QString toUpperLatin( int number ) {
+TQString toUpperLatin( int number ) {
return toLatin( number, 'A' );
}
-static inline QString toAlphabetic( int number, int base, const QChar alphabet[] ) {
- if (number < 1) return QString::number(number);
- QValueList<QChar> letters;
+static inline TQString toAlphabetic( int number, int base, const TQChar alphabet[] ) {
+ if (number < 1) return TQString::number(number);
+ TQValueList<TQChar> letters;
while(number > 0) {
number--; // number 0 is letter 1
- QChar letter = alphabet[number % base];
+ TQChar letter = alphabet[number % base];
letters.prepend(letter);
number /= base;
}
- QString str;
+ TQString str;
str.setLength(letters.size());
int i=0;
while(!letters.isEmpty()) {
@@ -215,8 +215,8 @@ static inline QString toAlphabetic( int number, int base, const QChar alphabet[]
return str;
}
-QString toHiragana( int number ) {
- static const QChar hiragana[48] = {0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D,
+TQString toHiragana( int number ) {
+ static const TQChar hiragana[48] = {0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D,
0x304F, 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D,
0x305F, 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B,
0x306C, 0x306D, 0x306E, 0x306F, 0x3072, 0x3075, 0x3078,
@@ -226,8 +226,8 @@ QString toHiragana( int number ) {
return toAlphabetic( number, 48, hiragana );
}
-QString toHiraganaIroha( int number ) {
- static const QChar hiragana[47] = {0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068,
+TQString toHiraganaIroha( int number ) {
+ static const TQChar hiragana[47] = {0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068,
0x3061, 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B,
0x3088, 0x305F, 0x308C, 0x305D, 0x3064, 0x306D, 0x306A,
0x3089, 0x3080, 0x3046, 0x3090, 0x306E, 0x304A, 0x304F, 0x3084,
@@ -237,8 +237,8 @@ QString toHiraganaIroha( int number ) {
return toAlphabetic( number, 47, hiragana );
}
-QString toKatakana( int number ) {
- static const QChar katakana[48] = {0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD,
+TQString toKatakana( int number ) {
+ static const TQChar katakana[48] = {0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD,
0x30AF, 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB,
0x30BD, 0x30BF, 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA,
0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF, 0x30D2, 0x30D5,
@@ -248,8 +248,8 @@ QString toKatakana( int number ) {
return toAlphabetic( number, 48, katakana );
}
-QString toKatakanaIroha( int number ) {
- static const QChar katakana[47] = {0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8,
+TQString toKatakanaIroha( int number ) {
+ static const TQChar katakana[47] = {0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8,
0x30C1, 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB,
0x30E8, 0x30BF, 0x30EC, 0x30ED, 0x30C4, 0x30CD, 0x30CA,
0x30E9, 0x30E0, 0x30A6, 0x30F0, 0x30CE, 0x30AA, 0x30AF,
@@ -259,8 +259,8 @@ QString toKatakanaIroha( int number ) {
return toAlphabetic( number, 47, katakana );
}
-QString toLowerGreek( int number ) {
- static const QChar greek[24] = { 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7,
+TQString toLowerGreek( int number ) {
+ static const TQChar greek[24] = { 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7,
0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE,
0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6,
0x3C7, 0x3C8, 0x3C0};
@@ -268,52 +268,52 @@ QString toLowerGreek( int number ) {
return toAlphabetic( number, 24, greek );
}
-QString toUpperGreek( int number ) {
+TQString toUpperGreek( int number ) {
// The standard claims to be base 24, but only lists 19 letters.
- static const QChar greek[19] = { 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398,
+ static const TQChar greek[19] = { 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398,
0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F,
0x3A0, 0x3A1, 0x3A3, 0x3A9};
return toAlphabetic( number, 19, greek );
}
-static inline QString toNumeric( int number, int base ) {
- QString letter = QString::number(number);
+static inline TQString toNumeric( int number, int base ) {
+ TQString letter = TQString::number(number);
for(unsigned int i = 0; i < letter.length(); i++) {
if (letter[i].isDigit())
- letter[i] = QChar(letter[i].digitValue()+base);
+ letter[i] = TQChar(letter[i].digitValue()+base);
}
return letter;
}
-QString toArabicIndic( int number ) {
+TQString toArabicIndic( int number ) {
return toNumeric(number, 0x660);
}
-QString toPersianUrdu( int number ) {
+TQString toPersianUrdu( int number ) {
return toNumeric(number, 0x6F0);
}
-QString toLao( int number ) {
+TQString toLao( int number ) {
return toNumeric(number, 0xED0);
}
-QString toThai( int number ) {
+TQString toThai( int number ) {
return toNumeric(number, 0xE50);
}
-QString toTibetan( int number ) {
+TQString toTibetan( int number ) {
return toNumeric(number, 0xF20);
}
-static inline QString toIdeographic(int number, const QChar digits[], const QChar digitmarkers[]) {
- if (number < 0 || number > 9999) return QString::number(number);
+static inline TQString toIdeographic(int number, const TQChar digits[], const TQChar digitmarkers[]) {
+ if (number < 0 || number > 9999) return TQString::number(number);
- QString grp = QString::number(number);
+ TQString grp = TQString::number(number);
// ### Append group markers to handle numbers > 9999
- QString str;
+ TQString str;
// special case
if (number < 20 && number >= 10) {
@@ -342,10 +342,10 @@ static inline QString toIdeographic(int number, const QChar digits[], const QCha
return str;
}
-QString toTradChineseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x4e00,
+TQString toTradChineseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x4e00,
0x4ebc, 0x4e09,
0x56db, 0x4e94,
0x516d, 0x4e03,
@@ -353,10 +353,10 @@ QString toTradChineseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toTradChineseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x4e00,
+TQString toTradChineseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x4e00,
0x4ebc, 0x4e09,
0x56db, 0x4e94,
0x516d, 0x4e03,
@@ -364,10 +364,10 @@ QString toTradChineseInformal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toSimpChineseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toSimpChineseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -375,10 +375,10 @@ QString toSimpChineseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toSimpChineseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toSimpChineseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -386,10 +386,10 @@ QString toSimpChineseInformal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toJapaneseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x62fe, 0x4f70, 0x4edf};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toJapaneseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x62fe, 0x4f70, 0x4edf};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -397,10 +397,10 @@ QString toJapaneseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toJapaneseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toJapaneseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8d30, 0x53c1,
0x8086, 0x4f0d,
0x9646, 0x67d2,
diff --git a/khtml/rendering/enumerate.h b/khtml/rendering/enumerate.h
index 518a8e9d6..583a6171c 100644
--- a/khtml/rendering/enumerate.h
+++ b/khtml/rendering/enumerate.h
@@ -31,35 +31,35 @@ namespace khtml {
namespace Enumerate {
// Numeric
- QString toArabicIndic( int number );
- QString toLao( int number );
- QString toPersianUrdu( int number );
- QString toThai( int number );
- QString toTibetan( int number );
+ TQString toArabicIndic( int number );
+ TQString toLao( int number );
+ TQString toPersianUrdu( int number );
+ TQString toThai( int number );
+ TQString toTibetan( int number );
// Alphabetic
- QString toLowerLatin( int number );
- QString toUpperLatin( int number );
- QString toLowerGreek( int number );
- QString toUpperGreek( int number );
- QString toHiragana( int number );
- QString toHiraganaIroha( int number );
- QString toKatakana( int number );
- QString toKatakanaIroha( int number );
+ TQString toLowerLatin( int number );
+ TQString toUpperLatin( int number );
+ TQString toLowerGreek( int number );
+ TQString toUpperGreek( int number );
+ TQString toHiragana( int number );
+ TQString toHiraganaIroha( int number );
+ TQString toKatakana( int number );
+ TQString toKatakanaIroha( int number );
// Algorithmic
- QString toRoman( int number, bool upper );
- QString toHebrew( int number );
- QString toGeorgian( int number );
- QString toArmenian( int number );
+ TQString toRoman( int number, bool upper );
+ TQString toHebrew( int number );
+ TQString toGeorgian( int number );
+ TQString toArmenian( int number );
// Ideographic
- QString toJapaneseFormal ( int number );
- QString toJapaneseInformal ( int number );
- QString toSimpChineseFormal ( int number );
- QString toSimpChineseInformal ( int number );
- QString toTradChineseFormal ( int number );
- QString toTradChineseInformal ( int number );
+ TQString toJapaneseFormal ( int number );
+ TQString toJapaneseInformal ( int number );
+ TQString toSimpChineseFormal ( int number );
+ TQString toSimpChineseInformal ( int number );
+ TQString toTradChineseFormal ( int number );
+ TQString toTradChineseInformal ( int number );
}} // namespaces
diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp
index cdd580596..a33f0e082 100644
--- a/khtml/rendering/font.cpp
+++ b/khtml/rendering/font.cpp
@@ -35,9 +35,9 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qpainter.h>
-#include <qfontdatabase.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqfontdatabase.h>
+#include <tqpaintdevicemetrics.h>
using namespace khtml;
@@ -51,12 +51,12 @@ using namespace khtml;
* @return the width in pixels. May be 0 if @p wordStart and @p wordEnd were
* equal.
*/
-inline int closeWordAndGetWidth(const QFontMetrics &fm, const QChar *str, int pos,
+inline int closeWordAndGetWidth(const TQFontMetrics &fm, const TQChar *str, int pos,
int wordStart, int wordEnd)
{
if (wordEnd <= wordStart) return 0;
- QConstString s(str + pos + wordStart, wordEnd - wordStart);
+ TQConstString s(str + pos + wordStart, wordEnd - wordStart);
return fm.width(s.string());
}
@@ -75,41 +75,41 @@ inline int closeWordAndGetWidth(const QFontMetrics &fm, const QChar *str, int po
* will be set to wordEnd after function
* @param wordEnd relative index pointing one position after the word ended
*/
-inline void closeAndDrawWord(QPainter *p, QPainter::TextDirection d,
- int &x, int y, const short widths[], const QChar *str, int pos,
+inline void closeAndDrawWord(TQPainter *p, TQPainter::TextDirection d,
+ int &x, int y, const short widths[], const TQChar *str, int pos,
int &wordStart, int wordEnd)
{
if (wordEnd <= wordStart) return;
int width = widths[wordStart];
- if (d == QPainter::RTL)
+ if (d == TQPainter::RTL)
x -= width;
- QConstString s(str + pos + wordStart, wordEnd - wordStart);
+ TQConstString s(str + pos + wordStart, wordEnd - wordStart);
p->drawText(x, y, s.string(), -1, d);
- if (d != QPainter::RTL)
+ if (d != TQPainter::RTL)
x += width;
wordStart = wordEnd;
}
-void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, int len,
- int toAdd, QPainter::TextDirection d, int from, int to, QColor bg, int uy, int h, int deco ) const
+void Font::drawText( TQPainter *p, int x, int y, TQChar *str, int slen, int pos, int len,
+ int toAdd, TQPainter::TextDirection d, int from, int to, TQColor bg, int uy, int h, int deco ) const
{
if (!str) return;
- QConstString cstr = QConstString(str, slen);
- QString qstr = cstr.string();
+ TQConstString cstr = TQConstString(str, slen);
+ TQString qstr = cstr.string();
// ### fixme for RTL
if ( !scFont && !letterSpacing && !wordSpacing && !toAdd && from==-1 ) {
// simply draw it
- // Due to some unfounded cause QPainter::drawText traverses the
+ // Due to some unfounded cause TQPainter::drawText traverses the
// *whole* string when painting, not only the specified
// [pos, pos + len) segment. This makes painting *extremely* slow for
// long render texts (in the order of several megabytes).
// Hence, only hand over the piece of text of the actual inline text box
- QConstString cstr = QConstString(str + pos, len);
+ TQConstString cstr = TQConstString(str + pos, len);
p->drawText( x, y, cstr.string(), 0, len, d );
} else {
if (from < 0) from = 0;
@@ -118,20 +118,20 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
int numSpaces = 0;
if ( toAdd ) {
for( int i = 0; i < len; ++i )
- if ( str[i+pos].category() == QChar::Separator_Space )
+ if ( str[i+pos].category() == TQChar::Separator_Space )
++numSpaces;
}
const int totWidth = width( str, slen, pos, len );
- if ( d == QPainter::RTL ) {
+ if ( d == TQPainter::RTL ) {
x += totWidth + toAdd;
}
- QString upper = qstr;
- QFontMetrics sc_fm = fm;
+ TQString upper = qstr;
+ TQFontMetrics sc_fm = fm;
if ( scFont ) {
// draw in small caps
upper = qstr.upper();
- sc_fm = QFontMetrics( *scFont );
+ sc_fm = TQFontMetrics( *scFont );
}
// ### sc could be optimized by only painting uppercase letters extra,
@@ -150,11 +150,11 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
if (mode == Whole) { // most likely variant is treated extra
if (to < 0) to = len;
- const QConstString cstr(str + pos, len);
- const QConstString segStr(str + pos + from, to - from);
+ const TQConstString cstr(str + pos, len);
+ const TQConstString segStr(str + pos + from, to - from);
const int preSegmentWidth = fm.width(cstr.string(), from);
const int segmentWidth = fm.width(segStr.string());
- const int eff_x = d == QPainter::RTL ? x - preSegmentWidth - segmentWidth
+ const int eff_x = d == TQPainter::RTL ? x - preSegmentWidth - segmentWidth
: x + preSegmentWidth;
// draw whole string segment, with optional background
@@ -194,9 +194,9 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
onSegment = true;
}
- const QChar ch = str[pos+i];
- bool lowercase = (ch.category() == QChar::Letter_Lowercase);
- bool is_space = (ch.category() == QChar::Separator_Space);
+ const TQChar ch = str[pos+i];
+ bool lowercase = (ch.category() == TQChar::Letter_Lowercase);
+ bool is_space = (ch.category() == TQChar::Separator_Space);
int chw = 0;
if ( letterSpacing )
chw += letterSpacing;
@@ -235,10 +235,10 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
widthList[lastWordBegin] = (short)width;
}
- if (d == QPainter::RTL) x -= preSegmentWidth;
+ if (d == TQPainter::RTL) x -= preSegmentWidth;
else x += preSegmentWidth;
- const int startx = d == QPainter::RTL ? x-segmentWidth : x;
+ const int startx = d == TQPainter::RTL ? x-segmentWidth : x;
// optionally draw background
if ( bg.isValid() )
@@ -247,9 +247,9 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
// second pass: do the actual drawing
lastWordBegin = from;
for( int i = from; i < to; ++i ) {
- const QChar ch = str[pos+i];
- bool lowercase = (ch.category() == QChar::Letter_Lowercase);
- bool is_space = ch.category() == QChar::Separator_Space;
+ const TQChar ch = str[pos+i];
+ bool lowercase = (ch.category() == TQChar::Letter_Lowercase);
+ bool is_space = ch.category() == TQChar::Separator_Space;
if ( is_space ) {
if (mode == WordWise) {
closeAndDrawWord(p, d, x, y, widthList, str, pos, lastWordBegin, i);
@@ -258,14 +258,14 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
}
if (is_space || mode == CharacterWise) {
const int chw = widthList[i];
- if (d == QPainter::RTL)
+ if (d == TQPainter::RTL)
x -= chw;
if ( scFont )
p->setFont( lowercase ? *scFont : f );
p->drawText( x, y, (lowercase ? upper : qstr), pos+i, 1, d );
- if (d != QPainter::RTL)
+ if (d != TQPainter::RTL)
x += chw;
}
@@ -285,18 +285,18 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
}
-int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAdd ) const
+int Font::width( TQChar *chs, int, int pos, int len, int start, int end, int toAdd ) const
{
- const QConstString cstr(chs+pos, len);
+ const TQConstString cstr(chs+pos, len);
int w = 0;
- const QString qstr = cstr.string();
+ const TQString qstr = cstr.string();
if ( scFont ) {
- const QString upper = qstr.upper();
- const QChar *uc = qstr.unicode();
- const QFontMetrics sc_fm( *scFont );
+ const TQString upper = qstr.upper();
+ const TQChar *uc = qstr.unicode();
+ const TQFontMetrics sc_fm( *scFont );
for ( int i = 0; i < len; ++i ) {
- if ( (uc+i)->category() == QChar::Letter_Lowercase )
+ if ( (uc+i)->category() == TQChar::Letter_Lowercase )
w += sc_fm.charWidth( upper, i );
else
w += fm.charWidth( qstr, i );
@@ -312,7 +312,7 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
if ( wordSpacing )
// add amount
for( int i = 0; i < len; ++i ) {
- if( chs[i+pos].category() == QChar::Separator_Space )
+ if( chs[i+pos].category() == TQChar::Separator_Space )
w += wordSpacing;
}
@@ -320,12 +320,12 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
// first gather count of spaces
int numSpaces = 0;
for( int i = start; i != end; ++i )
- if ( chs[i].category() == QChar::Separator_Space )
+ if ( chs[i].category() == TQChar::Separator_Space )
++numSpaces;
// distribute pixels evenly among spaces, but count only those within
// [pos, pos+len)
for ( int i = start; numSpaces && i != pos + len; i++ )
- if ( chs[i].category() == QChar::Separator_Space ) {
+ if ( chs[i].category() == TQChar::Separator_Space ) {
const int a = toAdd/numSpaces;
if ( i >= pos ) w += a;
toAdd -= a;
@@ -336,21 +336,21 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
return w;
}
-int Font::width( QChar *chs, int slen, int pos ) const
+int Font::width( TQChar *chs, int slen, int pos ) const
{
int w;
- if ( scFont && chs[pos].category() == QChar::Letter_Lowercase ) {
- QString str( chs, slen );
+ if ( scFont && chs[pos].category() == TQChar::Letter_Lowercase ) {
+ TQString str( chs, slen );
str[pos] = chs[pos].upper();
- w = QFontMetrics( *scFont ).charWidth( str, pos );
+ w = TQFontMetrics( *scFont ).charWidth( str, pos );
} else {
- const QConstString cstr( chs, slen );
+ const TQConstString cstr( chs, slen );
w = fm.charWidth( cstr.string(), pos );
}
if ( letterSpacing )
w += letterSpacing;
- if ( wordSpacing && (chs+pos)->category() == QChar::Separator_Space )
+ if ( wordSpacing && (chs+pos)->category() == TQChar::Separator_Space )
w += wordSpacing;
return w;
}
@@ -358,11 +358,11 @@ int Font::width( QChar *chs, int slen, int pos ) const
/** Querying QFontDB whether something is scalable is expensive, so we cache. */
struct Font::ScalKey
{
- QString family;
+ TQString family;
int weight;
int italic;
- ScalKey(const QFont& font) :
+ ScalKey(const TQFont& font) :
family(font.family()), weight(font.weight()), italic(font.italic())
{}
@@ -389,13 +389,13 @@ struct Font::ScalKey
}
};
-QMap<Font::ScalKey, Font::ScalInfo>* Font::scalCache;
-QMap<Font::ScalKey, QValueList<int> >* Font::scalSizesCache;
+TQMap<Font::ScalKey, Font::ScalInfo>* Font::scalCache;
+TQMap<Font::ScalKey, TQValueList<int> >* Font::scalSizesCache;
-bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
+bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font)
{
if (!scalCache)
- scalCache = new QMap<ScalKey, ScalInfo>;
+ scalCache = new TQMap<ScalKey, ScalInfo>;
ScalKey key(font);
@@ -406,7 +406,7 @@ bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
if (s == No) {
/* Cache size info */
if (!scalSizesCache)
- scalSizesCache = new QMap<ScalKey, QValueList<int> >;
+ scalSizesCache = new TQMap<ScalKey, TQValueList<int> >;
(*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font));
}
}
@@ -415,13 +415,13 @@ bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
}
-void Font::update( QPaintDeviceMetrics* devMetrics ) const
+void Font::update( TQPaintDeviceMetrics* devMetrics ) const
{
f.setFamily( fontDef.family.isEmpty() ? KHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family );
f.setItalic( fontDef.italic );
f.setWeight( fontDef.weight );
- QFontDatabase db;
+ TQFontDatabase db;
int size = fontDef.size;
const int lDpiY = kMax(devMetrics->logicalDpiY(), 96);
@@ -430,7 +430,7 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
// all other font properties should be set before this one!!!!
if( !isFontScalable(db, f) )
{
- const QValueList<int>& pointSizes = (*scalSizesCache)[ScalKey(f)];
+ const TQValueList<int>& pointSizes = (*scalSizesCache)[ScalKey(f)];
// lets see if we find a nice looking font, which is not too far away
// from the requested one.
// kdDebug(6080) << "khtml::setFontSize family = " << f.family() << " size requested=" << size << endl;
@@ -439,8 +439,8 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
float diff = 1; // ### 100% deviation
float bestSize = 0;
- QValueList<int>::ConstIterator it = pointSizes.begin();
- const QValueList<int>::ConstIterator itEnd = pointSizes.end();
+ TQValueList<int>::ConstIterator it = pointSizes.begin();
+ const TQValueList<int>::ConstIterator itEnd = pointSizes.end();
for( ; it != itEnd; ++it )
{
@@ -459,7 +459,7 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
}
// make sure we don't bust up X11
- // Also, Qt does not support sizing a QFont to zero.
+ // Also, Qt does not support sizing a TQFont to zero.
size = kMax(1, kMin(255, size));
// qDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic,
@@ -468,24 +468,24 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
f.setPixelSize( size );
- fm = QFontMetrics( f );
+ fm = TQFontMetrics( f );
// small caps
delete scFont;
scFont = 0;
if ( fontDef.smallCaps ) {
- scFont = new QFont( f );
+ scFont = new TQFont( f );
scFont->setPixelSize( kMax(1, f.pixelSize()*7/10) );
}
}
-void Font::drawDecoration(QPainter *pt, int _tx, int _ty, int baseline, int width, int height, int deco) const
+void Font::drawDecoration(TQPainter *pt, int _tx, int _ty, int baseline, int width, int height, int deco) const
{
Q_UNUSED(height);
// thick lines on small fonts look ugly
const int thickness = fm.height() > 20 ? fm.lineWidth() : 1;
- const QBrush brush = pt->pen().color();
+ const TQBrush brush = pt->pen().color();
if (deco & UNDERLINE) {
int underlineOffset = ( fm.height() + baseline ) / 2;
if (underlineOffset <= baseline) underlineOffset = baseline+1;
diff --git a/khtml/rendering/font.h b/khtml/rendering/font.h
index c35ab53aa..248c07d15 100644
--- a/khtml/rendering/font.h
+++ b/khtml/rendering/font.h
@@ -25,10 +25,10 @@
#ifndef KHTMLFONT_H
#define KHTMLFONT_H
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqmap.h>
+#include <tqpainter.h>
class QFontDatabase;
class QPaintDeviceMetrics;
@@ -51,7 +51,7 @@ public:
weight == other.weight );
}
- QString family;
+ TQString family;
short int size;
bool italic : 1;
bool smallCaps : 1;
@@ -70,7 +70,7 @@ public:
: fontDef( fd ), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 )
{}
Font(const Font& o)
- : fontDef(o.fontDef), f(o.f), fm(o.fm), scFont(o.scFont), letterSpacing(o.letterSpacing), wordSpacing(o.wordSpacing) { if (o.scFont) scFont = new QFont(*o.scFont); }
+ : fontDef(o.fontDef), f(o.f), fm(o.fm), scFont(o.scFont), letterSpacing(o.letterSpacing), wordSpacing(o.wordSpacing) { if (o.scFont) scFont = new TQFont(*o.scFont); }
~Font() { delete scFont; }
bool operator == ( const Font &other ) const {
@@ -81,7 +81,7 @@ public:
const FontDef& getFontDef() const { return fontDef; }
- void update( QPaintDeviceMetrics *devMetrics ) const;
+ void update( TQPaintDeviceMetrics *devMetrics ) const;
/**
* Draws a piece from the given piece of text.
@@ -107,8 +107,8 @@ public:
* decoration painting
* @param deco combined text decoration (see Decoration)
*/
- void drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, int len, int width,
- QPainter::TextDirection d, int from=-1, int to=-1, QColor bg=QColor(),
+ void drawText( TQPainter *p, int x, int y, TQChar *str, int slen, int pos, int len, int width,
+ TQPainter::TextDirection d, int from=-1, int to=-1, TQColor bg=TQColor(),
int uy=-1, int h=-1, int deco=0 ) const;
/** returns the width of the given string chunk in pixels.
@@ -126,7 +126,7 @@ public:
* str. Note that toAdd applies to all spaces within str, but only those
* within [pos, pos+len) are counted towards the width.
*/
- int width( QChar *str, int slen, int pos, int len, int start = 0, int end = 0, int toAdd = 0 ) const;
+ int width( TQChar *str, int slen, int pos, int len, int start = 0, int end = 0, int toAdd = 0 ) const;
/** return the width of the given char in pixels.
*
* The method also considers various styles like text-align and font-variant
@@ -134,7 +134,7 @@ public:
* @param slen total length of string
* @param pos zero-based position of char in string
*/
- int width( QChar *str, int slen, int pos) const;
+ int width( TQChar *str, int slen, int pos) const;
/** Text decoration constants.
*
@@ -154,7 +154,7 @@ public:
* @param deco decoration to be drawn (see Decoration). The enumeration
* constants may be combined.
*/
- void drawDecoration(QPainter *p, int x, int y, int baseline, int width, int height, int deco) const;
+ void drawDecoration(TQPainter *p, int x, int y, int baseline, int width, int height, int deco) const;
/** returns letter spacing
*/
@@ -165,9 +165,9 @@ public:
private:
mutable FontDef fontDef;
- mutable QFont f;
- mutable QFontMetrics fm;
- mutable QFont *scFont;
+ mutable TQFont f;
+ mutable TQFontMetrics fm;
+ mutable TQFont *scFont;
short letterSpacing;
short wordSpacing;
@@ -178,9 +178,9 @@ private:
Yes
};
- static QMap<ScalKey, ScalInfo>* scalCache;
- static QMap<ScalKey, QValueList<int> >* scalSizesCache;
- static bool isFontScalable(QFontDatabase& db, const QFont& font);
+ static TQMap<ScalKey, ScalInfo>* scalCache;
+ static TQMap<ScalKey, TQValueList<int> >* scalSizesCache;
+ static bool isFontScalable(TQFontDatabase& db, const TQFont& font);
};
} // namespace
diff --git a/khtml/rendering/render_applet.cpp b/khtml/rendering/render_applet.cpp
index f6ce1ebab..fce22f7c8 100644
--- a/khtml/rendering/render_applet.cpp
+++ b/khtml/rendering/render_applet.cpp
@@ -30,7 +30,7 @@
#include "khtmlview.h"
#include "khtml_part.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#ifndef Q_WS_QWS // We don't have Java in Qt Embedded
@@ -41,7 +41,7 @@
using namespace khtml;
using namespace DOM;
-RenderApplet::RenderApplet(HTMLElementImpl *applet, const QMap<QString, QString> &args )
+RenderApplet::RenderApplet(HTMLElementImpl *applet, const TQMap<TQString, TQString> &args )
: RenderWidget(applet)
{
// init RenderObject attributes
@@ -55,7 +55,7 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, const QMap<QString, QString>
}
if ( context ) {
- //kdDebug(6100) << "RenderApplet::RenderApplet, setting QWidget" << endl;
+ //kdDebug(6100) << "RenderApplet::RenderApplet, setting TQWidget" << endl;
setQWidget( new KJavaAppletWidget(context, _view->viewport()) );
processArguments(args);
}
@@ -117,28 +117,28 @@ void RenderApplet::layout()
setNeedsLayout(false);
}
-void RenderApplet::processArguments(const QMap<QString, QString> &args)
+void RenderApplet::processArguments(const TQMap<TQString, TQString> &args)
{
KJavaAppletWidget *w = static_cast<KJavaAppletWidget*>(m_widget);
KJavaApplet* applet = w ? w->applet() : 0;
if ( applet ) {
- applet->setBaseURL( args[QString::fromLatin1("baseURL") ] );
- applet->setAppletClass( args[QString::fromLatin1("code") ] );
+ applet->setBaseURL( args[TQString::fromLatin1("baseURL") ] );
+ applet->setAppletClass( args[TQString::fromLatin1("code") ] );
- QString str = args[QString::fromLatin1("codeBase") ];
+ TQString str = args[TQString::fromLatin1("codeBase") ];
if( !str.isEmpty() )
applet->setCodeBase( str );
- str = args[QString::fromLatin1("name") ];
+ str = args[TQString::fromLatin1("name") ];
if( !str.isNull() )
applet->setAppletName( str );
else
- applet->setAppletName( args[QString::fromLatin1("code") ] );
+ applet->setAppletName( args[TQString::fromLatin1("code") ] );
- str = args[QString::fromLatin1("archive") ];
+ str = args[TQString::fromLatin1("archive") ];
if( !str.isEmpty() )
- applet->setArchives( args[QString::fromLatin1("archive") ] );
+ applet->setArchives( args[TQString::fromLatin1("archive") ] );
}
}
diff --git a/khtml/rendering/render_applet.h b/khtml/rendering/render_applet.h
index 54af6f280..184697a7c 100644
--- a/khtml/rendering/render_applet.h
+++ b/khtml/rendering/render_applet.h
@@ -25,8 +25,8 @@
#include "rendering/render_replaced.h"
#include "html/html_objectimpl.h"
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
class KHTMLView;
@@ -39,7 +39,7 @@ namespace khtml {
class RenderApplet : public RenderWidget
{
public:
- RenderApplet(DOM::HTMLElementImpl* node, const QMap<QString, QString> &args);
+ RenderApplet(DOM::HTMLElementImpl* node, const TQMap<TQString, TQString> &args);
virtual ~RenderApplet();
virtual const char *renderName() const { return "RenderApplet"; }
@@ -53,7 +53,7 @@ public:
{ return static_cast<DOM::HTMLElementImpl*>(RenderObject::element()); }
private:
- void processArguments( const QMap<QString, QString> &args );
+ void processArguments( const TQMap<TQString, TQString> &args );
};
}
diff --git a/khtml/rendering/render_block.cpp b/khtml/rendering/render_block.cpp
index ba9645a62..d036b9d09 100644
--- a/khtml/rendering/render_block.cpp
+++ b/khtml/rendering/render_block.cpp
@@ -494,7 +494,7 @@ void RenderBlock::makePageBreakAvoidBlocks()
// recurse into positioned block children as well.
if (m_positionedObjects) {
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; it.current(); ++it ) {
if (it.current()->isRenderBlock() && !it.current()->childrenInline()) {
static_cast<RenderBlock*>(it.current())->makePageBreakAvoidBlocks();
@@ -504,7 +504,7 @@ void RenderBlock::makePageBreakAvoidBlocks()
// recurse into floating block children.
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; it.current(); ++it ) {
if (it.current()->node->isRenderBlock() && !it.current()->node->childrenInline()) {
static_cast<RenderBlock*>(it.current()->node)->makePageBreakAvoidBlocks();
@@ -618,7 +618,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
return;
}
// kdDebug( 6040 ) << renderName() << " " << this << "::layoutBlock() start" << endl;
- // QTime t;
+ // TQTime t;
// t.start();
KHTMLAssert( needsLayout() );
KHTMLAssert( minMaxKnown() );
@@ -1577,7 +1577,7 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren)
if (m_positionedObjects) {
//kdDebug( 6040 ) << renderName() << " " << this << "::layoutPositionedObjects() start" << endl;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
//kdDebug(6040) << " have a positioned object" << endl;
if (r->markedForRepaint()) {
@@ -1678,7 +1678,7 @@ void RenderBlock::paintFloats(PaintInfo& pI, int _tx, int _ty, bool paintSelecti
return;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it) {
// Only paint the object if our noPaint flag isn't set.
if (r->node->isFloating() && !r->noPaint && !r->node->layer()) {
@@ -1719,12 +1719,12 @@ void RenderBlock::insertPositionedObject(RenderObject *o)
{
// Create the list of special objects if we don't aleady have one
if (!m_positionedObjects) {
- m_positionedObjects = new QPtrList<RenderObject>;
+ m_positionedObjects = new TQPtrList<RenderObject>;
m_positionedObjects->setAutoDelete(false);
}
else {
// Don't insert the object again if it's already in the list
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
RenderObject* f;
while ( (f = it.current()) ) {
if (f == o) return;
@@ -1740,7 +1740,7 @@ void RenderBlock::insertPositionedObject(RenderObject *o)
void RenderBlock::removePositionedObject(RenderObject *o)
{
if (m_positionedObjects) {
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
while (it.current()) {
if (it.current() == o)
m_positionedObjects->removeRef(it.current());
@@ -1757,12 +1757,12 @@ void RenderBlock::insertFloatingObject(RenderObject *o)
{
// Create the list of special objects if we don't aleady have one
if (!m_floatingObjects) {
- m_floatingObjects = new QPtrList<FloatingObject>;
+ m_floatingObjects = new TQPtrList<FloatingObject>;
m_floatingObjects->setAutoDelete(true);
}
else {
// Don't insert the object again if it's already in the list
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject* f;
while ( (f = it.current()) ) {
if (f->node == o) return;
@@ -1801,7 +1801,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o)
void RenderBlock::removeFloatingObject(RenderObject *o)
{
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while (it.current()) {
if (it.current()->node == o)
m_floatingObjects->removeRef(it.current());
@@ -1986,7 +1986,7 @@ RenderBlock::leftRelOffset(int y, int fixedOffset, bool applyTextIndent, int *he
if (m_floatingObjects) {
if ( heightRemaining ) *heightRemaining = 1;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
{
//kdDebug( 6040 ) <<(void *)this << " left: sy, ey, x, w " << r->startY << "," << r->endY << "," << r->left << "," << r->width << " " << endl;
@@ -2029,7 +2029,7 @@ RenderBlock::rightRelOffset(int y, int fixedOffset, bool applyTextIndent, int *h
if (m_floatingObjects) {
if (heightRemaining) *heightRemaining = 1;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
{
//kdDebug( 6040 ) << "right: sy, ey, x, w " << r->startY << "," << r->endY << "," << r->left << "," << r->width << " " << endl;
@@ -2075,7 +2075,7 @@ RenderBlock::nearestFloatBottom(int height) const
if (!m_floatingObjects) return 0;
int bottom = 0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>height && (r->endY<bottom || bottom==0))
bottom=r->endY;
@@ -2087,7 +2087,7 @@ int RenderBlock::floatBottom() const
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom)
bottom=r->endY;
@@ -2104,7 +2104,7 @@ int RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf)
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int lp = r->startY + r->node->marginTop() + r->node->lowestPosition(false);
@@ -2131,7 +2131,7 @@ int RenderBlock::lowestAbsolutePosition() const
// part of the lowest position.
int bottom = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2151,7 +2151,7 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int rp = r->left + r->node->marginLeft() + r->node->rightmostPosition(false);
@@ -2177,7 +2177,7 @@ int RenderBlock::rightmostAbsolutePosition() const
return 0;
int right = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2198,7 +2198,7 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int lp = r->left + r->node->marginLeft() + r->node->leftmostPosition(false);
@@ -2222,7 +2222,7 @@ int RenderBlock::leftmostAbsolutePosition() const
return 0;
int left = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2243,7 +2243,7 @@ int RenderBlock::highestPosition(bool includeOverflowInterior, bool includeSelf)
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int hp = r->startY + r->node->marginTop() + r->node->highestPosition(false);
@@ -2266,7 +2266,7 @@ int RenderBlock::highestAbsolutePosition() const
return 0;
int top = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2282,7 +2282,7 @@ RenderBlock::leftBottom()
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom && r->type == FloatingObject::FloatLeft)
bottom=r->endY;
@@ -2296,7 +2296,7 @@ RenderBlock::rightBottom()
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom && r->type == FloatingObject::FloatRight)
bottom=r->endY;
@@ -2373,7 +2373,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
return;
}
- QPtrListIterator<FloatingObject> it(*flow->m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*flow->m_floatingObjects);
FloatingObject *r;
for ( ; (r = it.current()); ++it ) {
@@ -2396,7 +2396,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
FloatingObject* f = 0;
// don't insert it twice!
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while ( (f = it.current()) ) {
if (f->node == r->node) break;
++it;
@@ -2426,7 +2426,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
floatingObj->width = r->width;
floatingObj->node = r->node;
if (!m_floatingObjects) {
- m_floatingObjects = new QPtrList<FloatingObject>;
+ m_floatingObjects = new TQPtrList<FloatingObject>;
m_floatingObjects->setAutoDelete(true);
}
m_floatingObjects->append(floatingObj);
@@ -2441,7 +2441,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
bool RenderBlock::containsFloat(RenderObject* o) const
{
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while (it.current()) {
if (it.current()->node == o)
return true;
@@ -2514,7 +2514,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
return false;
if (m_layer->verticalScrollbarWidth()) {
- QRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
+ TQRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
_ty + borderTop() - borderTopExtra(),
m_layer->verticalScrollbarWidth(),
height() + borderTopExtra() + borderBottomExtra()-borderTop()-borderBottom());
@@ -2527,7 +2527,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
}
if (m_layer->horizontalScrollbarHeight()) {
- QRect horizRect(_tx + borderLeft(),
+ TQRect horizRect(_tx + borderLeft(),
_ty + height() + borderTop() + borderBottomExtra() - borderBottom() - m_layer->horizontalScrollbarHeight(),
width()-borderLeft()-borderRight(),
m_layer->horizontalScrollbarHeight());
@@ -2554,7 +2554,7 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
if (hasOverflowClip() && m_layer)
m_layer->subtractScrollOffset(stx, sty);
FloatingObject* o;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for (it.toLast(); (o = it.current()); --it)
if (!o->noPaint && !o->node->layer())
inBox |= o->node->nodeAtPoint(info, _x, _y,
@@ -2727,7 +2727,7 @@ static void stripTrailingSpace(bool preserveWS,
// Collapse away the trailing space at the end of a block.
RenderText* t = static_cast<RenderText *>(trailingSpaceChild);
const Font *f = t->htmlFont( false );
- QChar space[1]; space[0] = ' ';
+ TQChar space[1]; space[0] = ' ';
int spaceWidth = f->width(space, 1, 0);
inlineMax -= spaceWidth;
if (inlineMin > inlineMax)
@@ -3172,11 +3172,11 @@ void RenderBlock::printTree(int indent) const
if (m_floatingObjects)
{
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject *r;
for ( ; (r = it.current()); ++it )
{
- QString s;
+ TQString s;
s.fill(' ', indent);
kdDebug() << s << renderName() << ": " <<
(r->type == FloatingObject::FloatLeft ? "FloatLeft" : "FloatRight" ) <<
@@ -3186,7 +3186,7 @@ void RenderBlock::printTree(int indent) const
}
}
-void RenderBlock::dump(QTextStream &stream, const QString &ind) const
+void RenderBlock::dump(TQTextStream &stream, const TQString &ind) const
{
RenderFlow::dump(stream,ind);
@@ -3198,7 +3198,7 @@ void RenderBlock::dump(QTextStream &stream, const QString &ind) const
if (m_floatingObjects && !m_floatingObjects->isEmpty())
{
stream << " special(";
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject *r;
bool first = true;
for ( ; (r = it.current()); ++it )
diff --git a/khtml/rendering/render_block.h b/khtml/rendering/render_block.h
index 112d331ca..2b0e49398 100644
--- a/khtml/rendering/render_block.h
+++ b/khtml/rendering/render_block.h
@@ -26,7 +26,7 @@
#ifndef RENDER_BLOCK_H
#define RENDER_BLOCK_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "render_flow.h"
@@ -188,7 +188,7 @@ public:
#ifdef ENABLE_DUMP
virtual void printTree(int indent=0) const;
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
protected:
@@ -355,8 +355,8 @@ protected:
int m_overflowLeft;
private:
- QPtrList<FloatingObject>* m_floatingObjects;
- QPtrList<RenderObject>* m_positionedObjects;
+ TQPtrList<FloatingObject>* m_floatingObjects;
+ TQPtrList<RenderObject>* m_positionedObjects;
bool m_childrenInline : 1;
bool m_firstLine : 1; // used in inline layouting
diff --git a/khtml/rendering/render_body.cpp b/khtml/rendering/render_body.cpp
index e9da3c71c..930ec358c 100644
--- a/khtml/rendering/render_body.cpp
+++ b/khtml/rendering/render_body.cpp
@@ -56,7 +56,7 @@ void RenderBody::setStyle(RenderStyle* style)
void RenderBody::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
{
//kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl;
- QColor bgColor;
+ TQColor bgColor;
const BackgroundLayer *bgLayer = 0;
if( parent()->style()->hasBackground() ) {
diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp
index 56a3109d5..e6742d54e 100644
--- a/khtml/rendering/render_box.cpp
+++ b/khtml/rendering/render_box.cpp
@@ -28,7 +28,7 @@
//#define CLIP_DEBUG
-#include <qpainter.h>
+#include <tqpainter.h>
#include "misc/loader.h"
#include "rendering/render_replaced.h"
@@ -330,7 +330,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
{
//kdDebug( 6040 ) << renderName() << "::paintRootBoxDecorations()" << _tx << "/" << _ty << endl;
const BackgroundLayer* bgLayer = style()->backgroundLayers();
- QColor bgColor = style()->backgroundColor();
+ TQColor bgColor = style()->backgroundColor();
if (document()->isHTMLDocument() && !style()->hasBackground()) {
// Locate the <body> element using the DOM. This is easier than trying
// to crawl around a render tree with potential :before/:after content and
@@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
}
if( !bgColor.isValid() && canvas()->view())
- bgColor = canvas()->view()->palette().active().color(QColorGroup::Base);
+ bgColor = canvas()->view()->palette().active().color(TQColorGroup::Base);
int w = width();
int h = height();
@@ -408,14 +408,14 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
}
}
-void RenderBox::paintBackgrounds(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
+void RenderBox::paintBackgrounds(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
{
if (!bgLayer) return;
paintBackgrounds(p, c, bgLayer->next(), clipy, cliph, _tx, _ty, w, height);
paintBackground(p, c, bgLayer, clipy, cliph, _tx, _ty, w, height);
}
-void RenderBox::paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
+void RenderBox::paintBackground(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
{
paintBackgroundExtended(p, c, bgLayer, clipy, cliph, _tx, _ty, w, height,
borderLeft(), borderRight(), paddingLeft(), paddingRight());
@@ -467,7 +467,7 @@ static void calculateBackgroundSize(const BackgroundLayer* bgLayer, int& scaledW
}
}
-void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const BackgroundLayer* bgLayer, int clipy, int cliph,
+void RenderBox::paintBackgroundExtended(TQPainter *p, const TQColor &c, const BackgroundLayer* bgLayer, int clipy, int cliph,
int _tx, int _ty, int w, int h,
int bleft, int bright, int pleft, int pright)
{
@@ -482,12 +482,12 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
int width = w - bleft - bright - (includePadding ? pleft + pright : 0);
int height = h - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : 0);
p->save();
- p->setClipRect(QRect(x, y, width, height), QPainter::CoordPainter);
+ p->setClipRect(TQRect(x, y, width, height), TQPainter::CoordPainter);
}
CachedImage* bg = bgLayer->backgroundImage();
bool shouldPaintBackgroundImage = bg && bg->pixmap_size() == bg->valid_rect().size() && !bg->isTransparent() && !bg->isErrorImage();
- QColor bgColor = c;
+ TQColor bgColor = c;
// Paint the color first underneath all images.
if (!bgLayer->next() && bgColor.isValid() && qAlpha(bgColor.rgb()) > 0)
@@ -583,7 +583,7 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
else
{
//fixed
- QRect vr = viewRect();
+ TQRect vr = viewRect();
int pw = vr.width();
int ph = vr.height();
scaledImageWidth = pw;
@@ -613,9 +613,9 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
sy = scaledImageHeight - yPosition % scaledImageHeight;
}
- QRect fix(cx, cy, cw, ch);
- QRect ele(_tx, _ty, w, h);
- QRect b = fix.intersect(ele);
+ TQRect fix(cx, cy, cw, ch);
+ TQRect ele(_tx, _ty, w, h);
+ TQRect b = fix.intersect(ele);
//kdDebug() <<" ele is " << ele << " b is " << b << " fix is " << fix << endl;
sx+=b.x()-cx;
@@ -642,14 +642,14 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
}
-void RenderBox::outlineBox(QPainter *p, int _tx, int _ty, const char *color)
+void RenderBox::outlineBox(TQPainter *p, int _tx, int _ty, const char *color)
{
- p->setPen(QPen(QColor(color), 1, Qt::DotLine));
+ p->setPen(TQPen(TQColor(color), 1, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(_tx, _ty, m_width, m_height);
}
-QRect RenderBox::getOverflowClipRect(int tx, int ty)
+TQRect RenderBox::getOverflowClipRect(int tx, int ty)
{
// XXX When overflow-clip (CSS3) is implemented, we'll obtain the property
// here.
@@ -665,10 +665,10 @@ QRect RenderBox::getOverflowClipRect(int tx, int ty)
cliph -= m_layer->horizontalScrollbarHeight();
}
- return QRect(clipx,clipy,clipw,cliph);
+ return TQRect(clipx,clipy,clipw,cliph);
}
-QRect RenderBox::getClipRect(int tx, int ty)
+TQRect RenderBox::getClipRect(int tx, int ty)
{
int bl=borderLeft(),bt=borderTop(),bb=borderBottom(),br=borderRight();
// ### what about paddings?
@@ -711,7 +711,7 @@ QRect RenderBox::getClipRect(int tx, int ty)
//kdDebug( 6040 ) << "setting clip("<<clipx<<","<<clipy<<","<<clipw<<","<<cliph<<")"<<endl;
- return QRect(clipx,clipy,clipw,cliph);
+ return TQRect(clipx,clipy,clipw,cliph);
}
void RenderBox::close()
@@ -2260,7 +2260,7 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width
? element()->parent()->renderer()->style()
: cb->style();
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
height = fm.height();
bool rtl = s->direction() == RTL;
@@ -2284,7 +2284,7 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width
// Place caret inside the element
} else {
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
height = fm.height();
RenderStyle *s = style();
diff --git a/khtml/rendering/render_box.h b/khtml/rendering/render_box.h
index ad0a5b9fb..c0c618d5c 100644
--- a/khtml/rendering/render_box.h
+++ b/khtml/rendering/render_box.h
@@ -142,14 +142,14 @@ protected:
virtual void paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty);
void paintRootBoxDecorations( PaintInfo& paintInfo, int _tx, int _ty);
- void paintBackgrounds(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
- void paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
+ void paintBackgrounds(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
+ void paintBackground(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
- virtual void paintBackgroundExtended(QPainter* /*p*/, const QColor& /*c*/, const BackgroundLayer* /*bgLayer*/,
+ virtual void paintBackgroundExtended(TQPainter* /*p*/, const TQColor& /*c*/, const BackgroundLayer* /*bgLayer*/,
int /*clipy*/, int /*cliph*/, int /*_tx*/, int /*_ty*/,
int /*w*/, int /*height*/, int /*bleft*/, int /*bright*/, int /*pleft*/, int /*pright*/ );
- void outlineBox(QPainter *p, int _tx, int _ty, const char *color = "red");
+ void outlineBox(TQPainter *p, int _tx, int _ty, const char *color = "red");
void calcAbsoluteHorizontal();
void calcAbsoluteVertical();
@@ -165,8 +165,8 @@ protected:
void calcAbsoluteVerticalReplaced();
void calcAbsoluteHorizontalReplaced();
- QRect getOverflowClipRect(int tx, int ty);
- QRect getClipRect(int tx, int ty);
+ TQRect getOverflowClipRect(int tx, int ty);
+ TQRect getClipRect(int tx, int ty);
void restructureParentFlow();
diff --git a/khtml/rendering/render_br.cpp b/khtml/rendering/render_br.cpp
index 42709839a..69984b760 100644
--- a/khtml/rendering/render_br.cpp
+++ b/khtml/rendering/render_br.cpp
@@ -25,7 +25,7 @@ using namespace khtml;
RenderBR::RenderBR(DOM::NodeImpl* node)
- : RenderText(node, new DOM::DOMStringImpl(QChar('\n')))
+ : RenderText(node, new DOM::DOMStringImpl(TQChar('\n')))
{
m_hasReturn = true;
}
diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp
index 50cad914a..e8540eba6 100644
--- a/khtml/rendering/render_canvas.cpp
+++ b/khtml/rendering/render_canvas.cpp
@@ -166,7 +166,7 @@ void RenderCanvas::layout()
}
#ifdef SPEED_DEBUG
- QTime qt;
+ TQTime qt;
qt.start();
#endif
@@ -212,7 +212,7 @@ void RenderCanvas::updateDocumentSize()
bool vss = m_view->verticalScrollBar()->isShown();
bool hss = m_view->horizontalScrollBar()->isShown();
- QSize s = m_view->viewportSize(m_cachedDocWidth, m_cachedDocHeight);
+ TQSize s = m_view->viewportSize(m_cachedDocWidth, m_cachedDocHeight);
// if we are about to show a scrollbar, and the document is sized to the viewport w or h,
// then reserve the scrollbar space so that it doesn't trigger the _other_ scrollbar
@@ -329,7 +329,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /*
if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view())
return;
- paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(QColorGroup::Base));
+ paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base));
}
void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f)
@@ -345,8 +345,8 @@ void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool
y += m_view->contentsY();
}
- QRect vr = viewRect();
- QRect ur(x, y, w, h);
+ TQRect vr = viewRect();
+ TQRect ur(x, y, w, h);
if (m_view && ur.intersects(vr)) {
@@ -370,7 +370,7 @@ void RenderCanvas::deferredRepaint( RenderObject* o )
void RenderCanvas::scheduleDeferredRepaints()
{
if (!needsFullRepaint()) {
- QValueList<RenderObject*>::const_iterator it;
+ TQValueList<RenderObject*>::const_iterator it;
for ( it = m_dirtyChildren.begin(); it != m_dirtyChildren.end(); ++it )
(*it)->repaint();
}
@@ -401,10 +401,10 @@ void RenderCanvas::repaint(Priority p)
}
}
-static QRect enclosingPositionedRect (RenderObject *n)
+static TQRect enclosingPositionedRect (RenderObject *n)
{
RenderObject *enclosingParent = n->containingBlock();
- QRect rect(0,0,0,0);
+ TQRect rect(0,0,0,0);
if (enclosingParent) {
int ox, oy;
enclosingParent->absolutePosition(ox, oy);
@@ -421,13 +421,13 @@ static QRect enclosingPositionedRect (RenderObject *n)
return rect;
}
-QRect RenderCanvas::selectionRect() const
+TQRect RenderCanvas::selectionRect() const
{
RenderObject *r = m_selectionStart;
if (!r)
- return QRect();
+ return TQRect();
- QRect selectionRect = enclosingPositionedRect(r);
+ TQRect selectionRect = enclosingPositionedRect(r);
while (r && r != m_selectionEnd)
{
@@ -475,8 +475,8 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
int oldStartPos = m_selectionStartPos;
RenderObject *oldEnd = m_selectionEnd;
int oldEndPos = m_selectionEndPos;
- QPtrList<RenderObject> oldSelectedInside;
- QPtrList<RenderObject> newSelectedInside;
+ TQPtrList<RenderObject> oldSelectedInside;
+ TQPtrList<RenderObject> newSelectedInside;
RenderObject *os = oldStart;
while (os && os != oldEnd)
@@ -565,7 +565,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
newSelectedInside.removeRef(s);
newSelectedInside.removeRef(e);
- QRect updateRect;
+ TQRect updateRect;
// Don't use repaint() because it will cause all rects to
// be united (see khtmlview::scheduleRepaint()). Instead
@@ -578,7 +578,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
// If so we have to draw them.
// Could be faster by building list of non-intersecting rectangles rather
// than unioning rectangles.
- QPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
+ TQPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
bool firstRect = true;
for (; oldIterator.current(); ++oldIterator){
if (!newSelectedInside.containsRef(oldIterator.current())){
@@ -598,7 +598,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
// If so we have to draw them.
// Could be faster by building list of non-intersecting rectangles rather
// than unioning rectangles.
- QPtrListIterator<RenderObject> newIterator(newSelectedInside);
+ TQPtrListIterator<RenderObject> newIterator(newSelectedInside);
firstRect = true;
for (; newIterator.current(); ++newIterator){
if (!oldSelectedInside.containsRef(newIterator.current())){
@@ -690,24 +690,24 @@ void RenderCanvas::selectionStartEnd(int& spos, int& epos)
epos = m_selectionEndPos;
}
-QRect RenderCanvas::viewRect() const
+TQRect RenderCanvas::viewRect() const
{
if (m_pagedMode)
if (m_pageTop == m_pageBottom) {
- kdDebug(6040) << "viewRect: " << QRect(0, m_pageTop, m_width, m_height) << endl;
- return QRect(0, m_pageTop, m_width, m_height);
+ kdDebug(6040) << "viewRect: " << TQRect(0, m_pageTop, m_width, m_height) << endl;
+ return TQRect(0, m_pageTop, m_width, m_height);
}
else {
- kdDebug(6040) << "viewRect: " << QRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop) << endl;
- return QRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop);
+ kdDebug(6040) << "viewRect: " << TQRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop) << endl;
+ return TQRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop);
}
else if (m_view)
- return QRect(m_view->contentsX(),
+ return TQRect(m_view->contentsX(),
m_view->contentsY(),
m_view->visibleWidth(),
m_view->visibleHeight());
else
- return QRect(0,0,m_rootWidth,m_rootHeight);
+ return TQRect(0,0,m_rootWidth,m_rootHeight);
}
int RenderCanvas::docHeight() const
diff --git a/khtml/rendering/render_canvas.h b/khtml/rendering/render_canvas.h
index 017bd02b2..76196bd24 100644
--- a/khtml/rendering/render_canvas.h
+++ b/khtml/rendering/render_canvas.h
@@ -123,7 +123,7 @@ public:
RenderPage* page();
- QRect selectionRect() const;
+ TQRect selectionRect() const;
void setMaximalOutlineSize(int o) { m_maximalOutlineSize = o; }
int maximalOutlineSize() const { return m_maximalOutlineSize; }
@@ -143,7 +143,7 @@ protected:
virtual void selectionStartEnd(int& spos, int& epos);
- virtual QRect viewRect() const;
+ virtual TQRect viewRect() const;
KHTMLView *m_view;
@@ -181,7 +181,7 @@ protected:
RenderPage* m_page;
int m_maximalOutlineSize; // Used to apply a fudge factor to dirty-rect checks on blocks/tables.
- QValueList<RenderObject*> m_dirtyChildren;
+ TQValueList<RenderObject*> m_dirtyChildren;
};
inline RenderCanvas* RenderObject::canvas() const
diff --git a/khtml/rendering/render_flow.cpp b/khtml/rendering/render_flow.cpp
index 88e06aab9..ae579bd46 100644
--- a/khtml/rendering/render_flow.cpp
+++ b/khtml/rendering/render_flow.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <assert.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include "rendering/render_flow.h"
@@ -222,7 +222,7 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
}
if (i.phase == PaintActionOutline && i.outlineObjects) {
- QValueList<RenderFlow *>::iterator it;;
+ TQValueList<RenderFlow *>::iterator it;;
for( it = (*i.outlineObjects).begin(); it != (*i.outlineObjects).end(); ++it )
if ((*it)->isRenderInline())
static_cast<RenderInline*>(*it)->paintOutlines(i.p, _tx, _ty);
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index f8daba1e3..403295a8f 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -38,7 +38,7 @@
#include <kurlcompletion.h>
#include <kwin.h>
-#include <qstyle.h>
+#include <tqstyle.h>
#include "misc/helper.h"
#include "xml/dom2_eventsimpl.h"
@@ -52,8 +52,8 @@
#include "khtml_ext.h"
#include "xml/dom_docimpl.h"
-#include <qpopupmenu.h>
-#include <qbitmap.h>
+#include <tqpopupmenu.h>
+#include <tqbitmap.h>
using namespace khtml;
@@ -138,7 +138,7 @@ short RenderButton::baselinePosition( bool f ) const
RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QCheckBox* b = new QCheckBox(view()->viewport(), "__khtml");
+ TQCheckBox* b = new TQCheckBox(view()->viewport(), "__khtml");
b->setAutoMask(true);
b->setMouseTracking(true);
setQWidget(b);
@@ -146,7 +146,7 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
// prevent firing toggled() signals on initialization
b->setChecked(element->checked());
- connect(b,SIGNAL(stateChanged(int)),this,SLOT(slotStateChanged(int)));
+ connect(b,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(slotStateChanged(int)));
}
@@ -154,9 +154,9 @@ void RenderCheckBox::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QCheckBox *cb = static_cast<QCheckBox *>( m_widget );
- QSize s( cb->style().pixelMetric( QStyle::PM_IndicatorWidth ),
- cb->style().pixelMetric( QStyle::PM_IndicatorHeight ) );
+ TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
+ TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ),
+ cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -172,8 +172,8 @@ void RenderCheckBox::updateFromElement()
void RenderCheckBox::slotStateChanged(int state)
{
- element()->setChecked(state == QButton::On);
- element()->setIndeterminate(state == QButton::NoChange);
+ element()->setChecked(state == TQButton::On);
+ element()->setIndeterminate(state == TQButton::NoChange);
ref();
element()->onChange();
@@ -185,14 +185,14 @@ void RenderCheckBox::slotStateChanged(int state)
RenderRadioButton::RenderRadioButton(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QRadioButton* b = new QRadioButton(view()->viewport(), "__khtml");
+ TQRadioButton* b = new TQRadioButton(view()->viewport(), "__khtml");
b->setMouseTracking(true);
setQWidget(b);
// prevent firing toggled() signals on initialization
b->setChecked(element->checked());
- connect(b,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
+ connect(b,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
}
void RenderRadioButton::updateFromElement()
@@ -206,9 +206,9 @@ void RenderRadioButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QRadioButton *rb = static_cast<QRadioButton *>( m_widget );
- QSize s( rb->style().pixelMetric( QStyle::PM_ExclusiveIndicatorWidth ),
- rb->style().pixelMetric( QStyle::PM_ExclusiveIndicatorHeight ) );
+ TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget );
+ TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
+ rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -230,17 +230,17 @@ void RenderRadioButton::slotToggled(bool activated)
RenderSubmitButton::RenderSubmitButton(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QPushButton* p = new QPushButton(view()->viewport(), "__khtml");
+ TQPushButton* p = new TQPushButton(view()->viewport(), "__khtml");
setQWidget(p);
p->setAutoMask(true);
p->setMouseTracking(true);
}
-QString RenderSubmitButton::rawText()
+TQString RenderSubmitButton::rawText()
{
- QString value = element()->valueWithDefault().string();
+ TQString value = element()->valueWithDefault().string();
value = value.stripWhiteSpace();
- QString raw;
+ TQString raw;
for(unsigned int i = 0; i < value.length(); i++) {
raw += value[i];
if(value[i] == '&')
@@ -253,29 +253,29 @@ void RenderSubmitButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QString raw = rawText();
- QPushButton* pb = static_cast<QPushButton*>(m_widget);
+ TQString raw = rawText();
+ TQPushButton* pb = static_cast<TQPushButton*>(m_widget);
pb->setText(raw);
pb->setFont(style()->font());
bool empty = raw.isEmpty();
if ( empty )
- raw = QString::fromLatin1("X");
- QFontMetrics fm = pb->fontMetrics();
- QSize ts = fm.size( ShowPrefix, raw);
- QSize s(pb->style().sizeFromContents( QStyle::CT_PushButton, pb, ts )
- .expandedTo(QApplication::globalStrut()));
- int margin = pb->style().pixelMetric( QStyle::PM_ButtonMargin, pb) +
- pb->style().pixelMetric( QStyle::PM_DefaultFrameWidth, pb ) * 2;
+ raw = TQString::fromLatin1("X");
+ TQFontMetrics fm = pb->fontMetrics();
+ TQSize ts = fm.size( ShowPrefix, raw);
+ TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts )
+ .expandedTo(TQApplication::globalStrut()));
+ int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) +
+ pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int w = ts.width() + margin;
int h = s.height();
if (pb->isDefault() || pb->autoDefault()) {
- int dbw = pb->style().pixelMetric( QStyle::PM_ButtonDefaultIndicator, pb ) * 2;
+ int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw;
}
// add 30% margins to the width (heuristics to make it look similar to IE)
- s = QSize( w*13/10, h ).expandedTo(QApplication::globalStrut());
+ s = TQSize( w*13/10, h ).expandedTo(TQApplication::globalStrut());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -285,9 +285,9 @@ void RenderSubmitButton::calcMinMaxWidth()
void RenderSubmitButton::updateFromElement()
{
- QString oldText = static_cast<QPushButton*>(m_widget)->text();
- QString newText = rawText();
- static_cast<QPushButton*>(m_widget)->setText(newText);
+ TQString oldText = static_cast<TQPushButton*>(m_widget)->text();
+ TQString newText = rawText();
+ static_cast<TQPushButton*>(m_widget)->setText(newText);
if ( oldText != newText )
setNeedsLayoutAndMinMaxRecalc();
RenderFormElement::updateFromElement();
@@ -307,12 +307,12 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element)
// -------------------------------------------------------------------------------
-LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, QWidget* parent)
+LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, TQWidget* parent)
: KLineEdit(parent, "__khtml"), m_input(input), m_view(view), m_spell(0)
{
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_spellAction = KStdAction::spelling( this, SLOT( slotCheckSpelling() ), ac );
+ m_spellAction = KStdAction::spelling( this, TQT_SLOT( slotCheckSpelling() ), ac );
}
LineEditWidget::~LineEditWidget()
@@ -328,14 +328,14 @@ void LineEditWidget::slotCheckSpelling()
}
delete m_spell;
- m_spell = new KSpell( this, i18n( "Spell Checking" ), this, SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
- connect( m_spell, SIGNAL( death() ),this, SLOT( spellCheckerFinished() ) );
- connect( m_spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int ) ),this, SLOT( spellCheckerMisspelling( const QString &, const QStringList &, unsigned int ) ) );
- connect( m_spell, SIGNAL( corrected( const QString &, const QString &, unsigned int ) ),this, SLOT( spellCheckerCorrected( const QString &, const QString &, unsigned int ) ) );
+ connect( m_spell, TQT_SIGNAL( death() ),this, TQT_SLOT( spellCheckerFinished() ) );
+ connect( m_spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
+ connect( m_spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) );
}
-void LineEditWidget::spellCheckerMisspelling( const QString &_text, const QStringList &, unsigned int pos)
+void LineEditWidget::spellCheckerMisspelling( const TQString &_text, const TQStringList &, unsigned int pos)
{
highLightWord( _text.length(),pos );
}
@@ -345,7 +345,7 @@ void LineEditWidget::highLightWord( unsigned int length, unsigned int pos )
setSelection ( pos, length );
}
-void LineEditWidget::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos )
+void LineEditWidget::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos )
{
if( old!= corr )
{
@@ -362,26 +362,26 @@ void LineEditWidget::spellCheckerFinished()
void LineEditWidget::slotSpellCheckReady( KSpell *s )
{
s->check( text() );
- connect( s, SIGNAL( done( const QString & ) ), this, SLOT( slotSpellCheckDone( const QString & ) ) );
+ connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) );
}
-void LineEditWidget::slotSpellCheckDone( const QString &s )
+void LineEditWidget::slotSpellCheckDone( const TQString &s )
{
if( s != text() )
setText( s );
}
-QPopupMenu *LineEditWidget::createPopupMenu()
+TQPopupMenu *LineEditWidget::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
if ( !popup ) {
return 0L;
}
- connect( popup, SIGNAL( activated( int ) ),
- this, SLOT( extendedMenuActivated( int ) ) );
+ connect( popup, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( extendedMenuActivated( int ) ) );
if (m_input->autoComplete()) {
popup->insertSeparator();
@@ -389,7 +389,7 @@ QPopupMenu *LineEditWidget::createPopupMenu()
popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
}
- if (echoMode() == QLineEdit::Normal &&
+ if (echoMode() == TQLineEdit::Normal &&
!isReadOnly()) {
popup->insertSeparator();
@@ -414,13 +414,13 @@ void LineEditWidget::extendedMenuActivated( int id)
}
}
-bool LineEditWidget::event( QEvent *e )
+bool LineEditWidget::event( TQEvent *e )
{
if (KLineEdit::event(e))
return true;
- if ( e->type() == QEvent::AccelAvailable && isReadOnly() ) {
- QKeyEvent* ke = (QKeyEvent*) e;
+ if ( e->type() == TQEvent::AccelAvailable && isReadOnly() ) {
+ TQKeyEvent* ke = (TQKeyEvent*) e;
if ( ke->state() & ControlButton ) {
switch ( ke->key() ) {
case Key_Left:
@@ -438,7 +438,7 @@ bool LineEditWidget::event( QEvent *e )
return false;
}
-void LineEditWidget::mouseMoveEvent(QMouseEvent *e)
+void LineEditWidget::mouseMoveEvent(TQMouseEvent *e)
{
// hack to prevent Qt from calling setCursor on the widget
setDragEnabled(false);
@@ -453,14 +453,14 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
: RenderFormElement(element)
{
LineEditWidget *edit = new LineEditWidget(element, view(), view()->viewport());
- connect(edit,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
- connect(edit,SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
+ connect(edit,TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed()));
+ connect(edit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &)));
if(element->inputType() == HTMLInputElementImpl::PASSWORD)
- edit->setEchoMode( QLineEdit::Password );
+ edit->setEchoMode( TQLineEdit::Password );
if ( element->autoComplete() ) {
- QStringList completions = view()->formCompletionItems(element->name().string());
+ TQStringList completions = view()->formCompletionItems(element->name().string());
if (completions.count()) {
edit->completionObject()->setItems(completions);
edit->setContextMenuEnabled(true);
@@ -518,16 +518,16 @@ void RenderLineEdit::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- const QFontMetrics &fm = style()->fontMetrics();
- QSize s;
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQSize s;
int size = element()->size();
int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
- s = QSize(w + 2 + 2*widget()->frameWidth(),
+ s = TQSize(w + 2 + 2*widget()->frameWidth(),
kMax(h, 14) + 2 + 2*widget()->frameWidth())
- .expandedTo(QApplication::globalStrut());
+ .expandedTo(TQApplication::globalStrut());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -560,7 +560,7 @@ void RenderLineEdit::updateFromElement()
RenderFormElement::updateFromElement();
}
-void RenderLineEdit::slotTextChanged(const QString &string)
+void RenderLineEdit::slotTextChanged(const TQString &string)
{
// don't use setValue here!
element()->m_value = string;
@@ -679,12 +679,12 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty)
paintBorderMinusLegend(pI.p, _tx, _ty, w, h, style(), legend->xPos(), legend->width());
}
-void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w, int h,
+void RenderFieldset::paintBorderMinusLegend(TQPainter *p, int _tx, int _ty, int w, int h,
const RenderStyle* style, int lx, int lw)
{
- const QColor& tc = style->borderTopColor();
- const QColor& bc = style->borderBottomColor();
+ const TQColor& tc = style->borderTopColor();
+ const TQColor& bc = style->borderBottomColor();
EBorderStyle ts = style->borderTopStyle();
EBorderStyle bs = style->borderBottomStyle();
@@ -710,7 +710,7 @@ void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w
if(render_l)
{
- const QColor& lc = style->borderLeftColor();
+ const TQColor& lc = style->borderLeftColor();
bool ignore_top =
(tc == lc) &&
@@ -729,7 +729,7 @@ void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w
if(render_r)
{
- const QColor& rc = style->borderRightColor();
+ const TQColor& rc = style->borderRightColor();
bool ignore_top =
(tc == rc) &&
@@ -769,9 +769,9 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element)
w->setMode(KFile::File | KFile::ExistingOnly);
w->completionObject()->setDir(KGlobalSettings::documentPath());
- connect(w->lineEdit(), SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
- connect(w->lineEdit(), SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
- connect(w, SIGNAL(urlSelected(const QString &)),this,SLOT(slotUrlSelected(const QString &)));
+ connect(w->lineEdit(), TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed()));
+ connect(w->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &)));
+ connect(w, TQT_SIGNAL(urlSelected(const TQString &)),this,TQT_SLOT(slotUrlSelected(const TQString &)));
setQWidget(w);
m_haveFocus = false;
@@ -783,17 +783,17 @@ void RenderFileButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
int size = element()->size();
int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit();
- QSize s = edit->style().sizeFromContents(QStyle::CT_LineEdit,
+ TQSize s = edit->style().sizeFromContents(TQStyle::CT_LineEdit,
edit,
- QSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
- .expandedTo(QApplication::globalStrut());
- QSize bs = static_cast<KURLRequester*>( m_widget )->minimumSizeHint() - edit->minimumSizeHint();
+ TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
+ .expandedTo(TQApplication::globalStrut());
+ TQSize bs = static_cast<KURLRequester*>( m_widget )->minimumSizeHint() - edit->minimumSizeHint();
setIntrinsicWidth( s.width() + bs.width() );
setIntrinsicHeight( kMax(s.height(), bs.height()) );
@@ -828,12 +828,12 @@ void RenderFileButton::slotReturnPressed()
element()->form()->submitFromKeyboard();
}
-void RenderFileButton::slotTextChanged(const QString &/*string*/)
+void RenderFileButton::slotTextChanged(const TQString &/*string*/)
{
element()->m_value = KURL( widget()->url() ).prettyURL( 0, KURL::StripFileProtocol );
}
-void RenderFileButton::slotUrlSelected(const QString &)
+void RenderFileButton::slotUrlSelected(const TQString &)
{
element()->onChange();
}
@@ -860,7 +860,7 @@ RenderLegend::RenderLegend(HTMLGenericFormElementImpl *element)
// -------------------------------------------------------------------------------
-ComboBoxWidget::ComboBoxWidget(QWidget *parent)
+ComboBoxWidget::ComboBoxWidget(TQWidget *parent)
: KComboBox(false, parent, "__khtml")
{
setAutoMask(true);
@@ -868,13 +868,13 @@ ComboBoxWidget::ComboBoxWidget(QWidget *parent)
setMouseTracking(true);
}
-bool ComboBoxWidget::event(QEvent *e)
+bool ComboBoxWidget::event(TQEvent *e)
{
if (KComboBox::event(e))
return true;
- if (e->type()==QEvent::KeyPress)
+ if (e->type()==TQEvent::KeyPress)
{
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
switch(ke->key())
{
case Key_Return:
@@ -889,21 +889,21 @@ bool ComboBoxWidget::event(QEvent *e)
return false;
}
-bool ComboBoxWidget::eventFilter(QObject *dest, QEvent *e)
+bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{
- if (dest==listBox() && e->type()==QEvent::KeyPress)
+ if (dest==listBox() && e->type()==TQEvent::KeyPress)
{
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
bool forward = false;
switch(ke->key())
{
case Key_Tab:
forward=true;
case Key_BackTab:
- // ugly hack. emulate popdownlistbox() (private in QComboBox)
+ // ugly hack. emulate popdownlistbox() (private in TQComboBox)
// we re-use ke here to store the reference to the generated event.
- ke = new QKeyEvent(QEvent::KeyPress, Key_Escape, 0, 0);
- QApplication::sendEvent(dest,ke);
+ ke = new TQKeyEvent(TQEvent::KeyPress, Key_Escape, 0, 0);
+ TQApplication::sendEvent(dest,ke);
focusNextPrevChild(forward);
delete ke;
return true;
@@ -955,7 +955,7 @@ void RenderSelect::updateFromElement()
}
if (m_useListBox && oldMultiple != m_multiple) {
- static_cast<KListBox*>(m_widget)->setSelectionMode(m_multiple ? QListBox::Extended : QListBox::Single);
+ static_cast<KListBox*>(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single);
}
m_selectionChanged = true;
m_optionsChanged = true;
@@ -965,7 +965,7 @@ void RenderSelect::updateFromElement()
if ( m_optionsChanged ) {
if (element()->m_recalcListItems)
element()->recalcListItems();
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
int listIndex;
if(m_useListBox) {
@@ -982,27 +982,27 @@ void RenderSelect::updateFromElement()
text = "";
if(m_useListBox) {
- QListBoxText *item = new QListBoxText(QString(text.implementation()->s, text.implementation()->l));
+ TQListBoxText *item = new TQListBoxText(TQString(text.implementation()->s, text.implementation()->l));
static_cast<KListBox*>(m_widget)
->insertItem(item, listIndex);
item->setSelectable(false);
}
else {
static_cast<KComboBox*>(m_widget)
- ->insertItem(QString(text.implementation()->s, text.implementation()->l), listIndex);
+ ->insertItem(TQString(text.implementation()->s, text.implementation()->l), listIndex);
static_cast<KComboBox*>(m_widget)->listBox()->item(listIndex)->setSelectable(false);
}
}
else if (listItems[listIndex]->id() == ID_OPTION) {
HTMLOptionElementImpl* optElem = static_cast<HTMLOptionElementImpl*>(listItems[listIndex]);
- QString text = optElem->text().string();
+ TQString text = optElem->text().string();
if (optElem->parentNode()->id() == ID_OPTGROUP)
{
// Prefer label if set
DOMString label = optElem->getAttribute(ATTR_LABEL);
if (!label.isEmpty())
text = label.string();
- text = QString::fromLatin1(" ")+text;
+ text = TQString::fromLatin1(" ")+text;
}
if(m_useListBox) {
@@ -1020,7 +1020,7 @@ void RenderSelect::updateFromElement()
m_selectionChanged = true;
}
- // QComboBox caches the size hint unless you call setFont (ref: TT docu)
+ // TQComboBox caches the size hint unless you call setFont (ref: TT docu)
if(!m_useListBox) {
KComboBox *that = static_cast<KComboBox*>(m_widget);
that->setFont( that->font() );
@@ -1069,7 +1069,7 @@ void RenderSelect::layout( )
if(m_useListBox) {
KListBox* w = static_cast<KListBox*>(m_widget);
- QListBoxItem* p = w->firstItem();
+ TQListBoxItem* p = w->firstItem();
int width = 0;
int height = 0;
while(p) {
@@ -1098,7 +1098,7 @@ void RenderSelect::layout( )
setIntrinsicHeight( height );
}
else {
- QSize s(m_widget->sizeHint());
+ TQSize s(m_widget->sizeHint());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
}
@@ -1108,7 +1108,7 @@ void RenderSelect::layout( )
RenderFormElement::layout();
// and now disable the widget in case there is no <option> given
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
bool foundOption = false;
for (uint i = 0; i < listItems.size() && !foundOption; i++)
@@ -1123,7 +1123,7 @@ void RenderSelect::slotSelected(int index) // emitted by the combobox only
KHTMLAssert( !m_useListBox );
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
if(index >= 0 && index < int(listItems.size()))
{
bool found = ( listItems[index]->id() == ID_OPTION );
@@ -1186,7 +1186,7 @@ void RenderSelect::slotSelectionChanged() // emitted by the listbox only
// don't use listItems() here as we have to avoid recalculations - changing the
// option list will make use update options not in the way the user expects them
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->m_listItems;
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->m_listItems;
for ( unsigned i = 0; i < listItems.count(); i++ )
// don't use setSelected() here because it will cause us to be called
// again with updateSelection.
@@ -1207,11 +1207,11 @@ void RenderSelect::setOptionsChanged(bool _optionsChanged)
KListBox* RenderSelect::createListBox()
{
KListBox *lb = new KListBox(view()->viewport(), "__khtml");
- lb->setSelectionMode(m_multiple ? QListBox::Extended : QListBox::Single);
+ lb->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single);
// ### looks broken
//lb->setAutoMask(true);
- connect( lb, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
-// connect( lb, SIGNAL( clicked( QListBoxItem * ) ), this, SLOT( slotClicked() ) );
+ connect( lb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSelectionChanged() ) );
+// connect( lb, TQT_SIGNAL( clicked( TQListBoxItem * ) ), this, TQT_SLOT( slotClicked() ) );
m_ignoreSelectEvents = false;
lb->setMouseTracking(true);
@@ -1221,13 +1221,13 @@ KListBox* RenderSelect::createListBox()
ComboBoxWidget *RenderSelect::createComboBox()
{
ComboBoxWidget *cb = new ComboBoxWidget(view()->viewport());
- connect(cb, SIGNAL(activated(int)), this, SLOT(slotSelected(int)));
+ connect(cb, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelected(int)));
return cb;
}
void RenderSelect::updateSelection()
{
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
int i;
if (m_useListBox) {
// if multi-select, we select only the new selected index
@@ -1260,28 +1260,28 @@ void RenderSelect::updateSelection()
// -------------------------------------------------------------------------
-TextAreaWidget::TextAreaWidget(int wrap, QWidget* parent)
+TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
: KTextEdit(parent, "__khtml"), m_findDlg(0), m_find(0), m_repDlg(0), m_replace(0)
{
if(wrap != DOM::HTMLTextAreaElementImpl::ta_NoWrap) {
- setWordWrap(QTextEdit::WidgetWidth);
+ setWordWrap(TQTextEdit::WidgetWidth);
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
}
else {
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(TQTextEdit::NoWrap);
setHScrollBarMode( Auto );
setVScrollBarMode( Auto );
}
KCursor::setAutoHideCursor(viewport(), true);
- setTextFormat(QTextEdit::PlainText);
+ setTextFormat(TQTextEdit::PlainText);
setAutoMask(true);
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_findAction = KStdAction::find( this, SLOT( slotFind() ), ac );
- m_findNextAction = KStdAction::findNext( this, SLOT( slotFindNext() ), ac );
- m_replaceAction = KStdAction::replace( this, SLOT( slotReplace() ), ac );
+ m_findAction = KStdAction::find( this, TQT_SLOT( slotFind() ), ac );
+ m_findNextAction = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac );
+ m_replaceAction = KStdAction::replace( this, TQT_SLOT( slotReplace() ), ac );
}
@@ -1298,9 +1298,9 @@ TextAreaWidget::~TextAreaWidget()
}
-QPopupMenu *TextAreaWidget::createPopupMenu(const QPoint& pos)
+TQPopupMenu *TextAreaWidget::createPopupMenu(const TQPoint& pos)
{
- QPopupMenu *popup = KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *popup = KTextEdit::createPopupMenu(pos);
if ( !popup ) {
return 0L;
@@ -1323,7 +1323,7 @@ QPopupMenu *TextAreaWidget::createPopupMenu(const QPoint& pos)
}
-void TextAreaWidget::slotFindHighlight(const QString& text, int matchingIndex, int matchingLength)
+void TextAreaWidget::slotFindHighlight(const TQString& text, int matchingIndex, int matchingLength)
{
Q_UNUSED(text)
//kdDebug() << "Highlight: [" << text << "] mi:" << matchingIndex << " ml:" << matchingLength << endl;
@@ -1338,7 +1338,7 @@ void TextAreaWidget::slotFindHighlight(const QString& text, int matchingIndex, i
}
-void TextAreaWidget::slotReplaceText(const QString &text, int replacementIndex, int /*replacedLength*/, int matchedLength) {
+void TextAreaWidget::slotReplaceText(const TQString &text, int replacementIndex, int /*replacedLength*/, int matchedLength) {
Q_UNUSED(text)
//kdDebug() << "Replace: [" << text << "] ri:" << replacementIndex << " rl:" << replacedLength << " ml:" << matchedLength << endl;
setSelection(m_repPara, replacementIndex, m_repPara, replacementIndex + matchedLength);
@@ -1371,11 +1371,11 @@ void TextAreaWidget::slotDoReplace()
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_replace, SIGNAL(highlight(const QString &, int, int)),
- this, SLOT(slotFindHighlight(const QString &, int, int)));
- connect(m_replace, SIGNAL(findNext()), this, SLOT(slotReplaceNext()));
- connect(m_replace, SIGNAL(replace(const QString &, int, int, int)),
- this, SLOT(slotReplaceText(const QString &, int, int, int)));
+ connect(m_replace, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ this, TQT_SLOT(slotFindHighlight(const TQString &, int, int)));
+ connect(m_replace, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotReplaceNext()));
+ connect(m_replace, TQT_SIGNAL(replace(const TQString &, int, int, int)),
+ this, TQT_SLOT(slotReplaceText(const TQString &, int, int, int)));
m_repDlg->close();
slotReplaceNext();
@@ -1470,9 +1470,9 @@ void TextAreaWidget::slotDoFind()
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_find, SIGNAL(highlight(const QString &, int, int)),
- this, SLOT(slotFindHighlight(const QString &, int, int)));
- connect(m_find, SIGNAL(findNext()), this, SLOT(slotFindNext()));
+ connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ this, TQT_SLOT(slotFindHighlight(const TQString &, int, int)));
+ connect(m_find, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()));
m_findDlg->close();
m_find->closeFindNextDialog();
@@ -1546,7 +1546,7 @@ void TextAreaWidget::slotFind()
KWin::activateWindow( m_findDlg->winId() );
} else {
m_findDlg = new KFindDialog(false, this, "KHTML Text Area Find Dialog");
- connect( m_findDlg, SIGNAL(okClicked()), this, SLOT(slotDoFind()) );
+ connect( m_findDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoFind()) );
}
m_findDlg->show();
}
@@ -1561,17 +1561,17 @@ void TextAreaWidget::slotReplace()
KWin::activateWindow( m_repDlg->winId() );
} else {
m_repDlg = new KReplaceDialog(this, "KHTMLText Area Replace Dialog", 0,
- QStringList(), QStringList(), false);
- connect( m_repDlg, SIGNAL(okClicked()), this, SLOT(slotDoReplace()) );
+ TQStringList(), TQStringList(), false);
+ connect( m_repDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoReplace()) );
}
m_repDlg->show();
}
-bool TextAreaWidget::event( QEvent *e )
+bool TextAreaWidget::event( TQEvent *e )
{
- if ( e->type() == QEvent::AccelAvailable && isReadOnly() ) {
- QKeyEvent* ke = (QKeyEvent*) e;
+ if ( e->type() == TQEvent::AccelAvailable && isReadOnly() ) {
+ TQKeyEvent* ke = (TQKeyEvent*) e;
if ( ke->state() & ControlButton ) {
switch ( ke->key() ) {
case Key_Left:
@@ -1602,7 +1602,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element)
edit->setCheckSpellingEnabled( settings->autoSpellCheck() );
edit->setTabChangesFocus( ! settings->allowTabulation() );
- connect(edit,SIGNAL(textChanged()),this,SLOT(slotTextChanged()));
+ connect(edit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged()));
}
RenderTextArea::~RenderTextArea()
@@ -1632,12 +1632,12 @@ void RenderTextArea::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
- const QFontMetrics &m = style()->fontMetrics();
+ const TQFontMetrics &m = style()->fontMetrics();
w->setTabStopWidth(8 * m.width(" "));
- QSize size( kMax(element()->cols(), 1L)*m.width('x') + w->frameWidth() +
+ TQSize size( kMax(element()->cols(), 1L)*m.width('x') + w->frameWidth() +
w->verticalScrollBar()->sizeHint().width(),
kMax(element()->rows(), 1L)*m.lineSpacing() + w->frameWidth()*4 +
- (w->wordWrap() == QTextEdit::NoWrap ?
+ (w->wordWrap() == TQTextEdit::NoWrap ?
w->horizontalScrollBar()->sizeHint().height() : 0)
);
@@ -1681,7 +1681,7 @@ void RenderTextArea::updateFromElement()
{
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
w->setReadOnly(element()->readOnly());
- QString elementText = element()->value().string();
+ TQString elementText = element()->value().string();
if ( elementText != text() )
{
w->blockSignals(true);
@@ -1707,28 +1707,28 @@ void RenderTextArea::close( )
}
-QString RenderTextArea::text()
+TQString RenderTextArea::text()
{
- QString txt;
+ TQString txt;
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
if(element()->wrap() == DOM::HTMLTextAreaElementImpl::ta_Physical) {
- // yeah, QTextEdit has no accessor for getting the visually wrapped text
+ // yeah, TQTextEdit has no accessor for getting the visually wrapped text
for (int p=0; p < w->paragraphs(); ++p) {
int ll = 0;
int lindex = w->lineOfChar(p, 0);
- QString paragraphText = w->text(p);
+ TQString paragraphText = w->text(p);
int pl = w->paragraphLength(p);
paragraphText = paragraphText.left(pl); //Snip invented space.
for (int l = 0; l < pl; ++l) {
if (lindex != w->lineOfChar(p, l)) {
- paragraphText.insert(l+ll++, QString::fromLatin1("\n"));
+ paragraphText.insert(l+ll++, TQString::fromLatin1("\n"));
lindex = w->lineOfChar(p, l);
}
}
txt += paragraphText;
if (p < w->paragraphs() - 1)
- txt += QString::fromLatin1("\n");
+ txt += TQString::fromLatin1("\n");
}
}
else
@@ -1745,7 +1745,7 @@ int RenderTextArea::queryParagraphInfo(int para, Mode m, int param) {
bool physWrap = element()->wrap() == DOM::HTMLTextAreaElementImpl::ta_Physical;
- QString paragraphText = w->text(para);
+ TQString paragraphText = w->text(para);
int pl = w->paragraphLength(para);
int physicalPL = pl;
if (m == ParaPortionLength)
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index f4d35b927..e8340c93f 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -37,10 +37,10 @@ class QListboxItem;
#include <ktextedit.h>
#include <kurlrequester.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
#include <klistbox.h>
#include <kcombobox.h>
#include "dom/dom_misc.h"
@@ -97,7 +97,7 @@ protected:
virtual bool isEditable() const { return false; }
AlignmentFlags textAlignment() const;
- QPoint m_mousePos;
+ TQPoint m_mousePos;
int m_state;
};
@@ -136,7 +136,7 @@ public:
virtual bool handleEvent(const DOM::EventImpl&) { return false; }
- QCheckBox *widget() const { return static_cast<QCheckBox*>(m_widget); }
+ TQCheckBox *widget() const { return static_cast<TQCheckBox*>(m_widget); }
public slots:
virtual void slotStateChanged(int state);
@@ -157,7 +157,7 @@ public:
virtual bool handleEvent(const DOM::EventImpl&) { return false; }
- QRadioButton *widget() const { return static_cast<QRadioButton*>(m_widget); }
+ TQRadioButton *widget() const { return static_cast<TQRadioButton*>(m_widget); }
public slots:
virtual void slotToggled(bool);
@@ -176,7 +176,7 @@ public:
virtual void updateFromElement();
virtual short baselinePosition( bool ) const;
private:
- QString rawText();
+ TQString rawText();
};
// -------------------------------------------------------------------------
@@ -240,7 +240,7 @@ public:
void setSelectionRange(long start, long end);
public slots:
void slotReturnPressed();
- void slotTextChanged(const QString &string);
+ void slotTextChanged(const TQString &string);
protected:
virtual void handleFocusOut();
@@ -256,21 +256,21 @@ class LineEditWidget : public KLineEdit
Q_OBJECT
public:
LineEditWidget(DOM::HTMLInputElementImpl* input,
- KHTMLView* view, QWidget* parent);
+ KHTMLView* view, TQWidget* parent);
~LineEditWidget();
void highLightWord( unsigned int length, unsigned int pos );
protected:
- virtual bool event( QEvent *e );
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual QPopupMenu *createPopupMenu();
+ virtual bool event( TQEvent *e );
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual TQPopupMenu *createPopupMenu();
private slots:
void extendedMenuActivated( int id);
void slotCheckSpelling();
void slotSpellCheckReady( KSpell *s );
- void slotSpellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &, const QString &, unsigned int );
+ void slotSpellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
private:
@@ -296,7 +296,7 @@ public:
protected:
virtual void paintBoxDecorations(PaintInfo& pI, int _tx, int _ty);
- void paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w,
+ void paintBorderMinusLegend(TQPainter *p, int _tx, int _ty, int w,
int h, const RenderStyle *style, int lx, int lw);
RenderObject* findLegend();
};
@@ -321,8 +321,8 @@ public:
public slots:
void slotReturnPressed();
- void slotTextChanged(const QString &string);
- void slotUrlSelected(const QString &string);
+ void slotTextChanged(const TQString &string);
+ void slotUrlSelected(const TQString &string);
protected:
virtual void handleFocusOut();
@@ -365,11 +365,11 @@ public:
class ComboBoxWidget : public KComboBox
{
public:
- ComboBoxWidget(QWidget *parent);
+ ComboBoxWidget(TQWidget *parent);
protected:
- virtual bool event(QEvent *);
- virtual bool eventFilter(QObject *dest, QEvent *e);
+ virtual bool event(TQEvent *);
+ virtual bool eventFilter(TQObject *dest, TQEvent *e);
};
// -------------------------------------------------------------------------
@@ -417,13 +417,13 @@ class TextAreaWidget : public KTextEdit
{
Q_OBJECT
public:
- TextAreaWidget(int wrap, QWidget* parent);
+ TextAreaWidget(int wrap, TQWidget* parent);
virtual ~TextAreaWidget();
protected:
- virtual bool event (QEvent *e );
- virtual QPopupMenu *createPopupMenu(const QPoint& pos);
- virtual QPopupMenu* createPopupMenu() { return KTextEdit::createPopupMenu(); }
+ virtual bool event (TQEvent *e );
+ virtual TQPopupMenu *createPopupMenu(const TQPoint& pos);
+ virtual TQPopupMenu* createPopupMenu() { return KTextEdit::createPopupMenu(); }
private slots:
void slotFind();
void slotDoFind();
@@ -431,8 +431,8 @@ private slots:
void slotReplace();
void slotDoReplace();
void slotReplaceNext();
- void slotReplaceText(const QString&, int, int, int);
- void slotFindHighlight(const QString&, int, int);
+ void slotReplaceText(const TQString&, int, int, int);
+ void slotFindHighlight(const TQString&, int, int);
private:
KFindDialog *m_findDlg;
KFind *m_find;
@@ -468,7 +468,7 @@ public:
DOM::HTMLTextAreaElementImpl* element() const
{ return static_cast<DOM::HTMLTextAreaElementImpl*>(RenderObject::element()); }
- QString text();
+ TQString text();
void highLightWord( unsigned int length, unsigned int pos );
void select();
diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp
index 4ee0f96bf..8f072dda6 100644
--- a/khtml/rendering/render_frames.cpp
+++ b/khtml/rendering/render_frames.cpp
@@ -43,9 +43,9 @@
#include <kmimetype.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <assert.h>
@@ -509,7 +509,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
if(!m_resizing && evt->id() == EventImpl::MOUSEDOWN_EVENT)
{
setResizing(true);
- KApplication::setOverrideCursor(QCursor(m_cursor));
+ KApplication::setOverrideCursor(TQCursor(m_cursor));
m_vSplitPos = _x;
m_hSplitPos = _y;
m_oldpos = -1;
@@ -547,11 +547,11 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
KHTMLView *view = canvas()->view();
if ((m_resizing || evt->id() == EventImpl::MOUSEUP_EVENT) && view) {
- QPainter paint( view );
+ TQPainter paint( view );
paint.setPen( Qt::gray );
paint.setBrush( Qt::gray );
paint.setRasterOp( Qt::XorROP );
- QRect r(xPos(), yPos(), width(), height());
+ TQRect r(xPos(), yPos(), width(), height());
const int rBord = 3;
int sw = element()->border();
int p = m_resizing ? (m_vSplit > -1 ? _x : _y) : -1;
@@ -601,7 +601,7 @@ bool RenderFrameSet::canResize( int _x, int _y )
}
#ifdef ENABLE_DUMP
-void RenderFrameSet::dump(QTextStream &stream, const QString &ind) const
+void RenderFrameSet::dump(TQTextStream &stream, const TQString &ind) const
{
RenderBox::dump(stream,ind);
stream << " totalrows=" << element()->totalRows();
@@ -627,16 +627,16 @@ RenderPart::RenderPart(DOM::HTMLElementImpl* node)
setInline(false);
}
-void RenderPart::setWidget( QWidget *widget )
+void RenderPart::setWidget( TQWidget *widget )
{
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "RenderPart::setWidget()" << endl;
#endif
setQWidget( widget );
- widget->setFocusPolicy(QWidget::WheelFocus);
+ widget->setFocusPolicy(TQWidget::WheelFocus);
if(widget->inherits("KHTMLView"))
- connect( widget, SIGNAL( cleared() ), this, SLOT( slotViewCleared() ) );
+ connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) );
setNeedsLayoutAndMinMaxRecalc();
@@ -645,7 +645,7 @@ void RenderPart::setWidget( QWidget *widget )
slotViewCleared();
}
-bool RenderPart::partLoadingErrorNotify(khtml::ChildFrame *, const KURL& , const QString& )
+bool RenderPart::partLoadingErrorNotify(khtml::ChildFrame *, const KURL& , const TQString& )
{
return false;
}
@@ -674,13 +674,13 @@ RenderFrame::RenderFrame( DOM::HTMLFrameElementImpl *frame )
void RenderFrame::slotViewCleared()
{
- if(m_widget->inherits("QScrollView")) {
+ if(m_widget->inherits("TQScrollView")) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a scrollview!" << endl;
#endif
- QScrollView *view = static_cast<QScrollView *>(m_widget);
+ TQScrollView *view = static_cast<TQScrollView *>(m_widget);
if(!element()->frameBorder || !((static_cast<HTMLFrameSetElementImpl *>(element()->parentNode()))->frameBorder()))
- view->setFrameStyle(QFrame::NoFrame);
+ view->setFrameStyle(TQFrame::NoFrame);
view->setVScrollBarMode(element()->scrolling );
view->setHScrollBarMode(element()->scrolling );
if(view->inherits("KHTMLView")) {
@@ -705,7 +705,7 @@ RenderPartObject::RenderPartObject( DOM::HTMLElementImpl* element )
void RenderPartObject::updateWidget()
{
- QString url;
+ TQString url;
KHTMLPart *part = m_view->part();
setNeedsLayoutAndMinMaxRecalc();
@@ -715,11 +715,11 @@ void RenderPartObject::updateWidget()
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(element());
url = o->url.string();
if (!o->getDocument()->isURLAllowed(url)) return;
- part->requestFrame( this, url, o->name.string(), QStringList(), true );
+ part->requestFrame( this, url, o->name.string(), TQStringList(), true );
// ### this should be constant true - move iframe to somewhere else
} else {
- QStringList params;
+ TQStringList params;
HTMLObjectBaseElementImpl * objbase = static_cast<HTMLObjectBaseElementImpl *>(element());
url = objbase->url;
@@ -727,17 +727,17 @@ void RenderPartObject::updateWidget()
if ( child->id() == ID_PARAM ) {
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child );
- QString aStr = p->name();
- aStr += QString::fromLatin1("=\"");
+ TQString aStr = p->name();
+ aStr += TQString::fromLatin1("=\"");
aStr += p->value();
- aStr += QString::fromLatin1("\"");
- QString name_lower = p->name().lower();
- if (name_lower == QString::fromLatin1("type") && objbase->id() != ID_APPLET) {
+ aStr += TQString::fromLatin1("\"");
+ TQString name_lower = p->name().lower();
+ if (name_lower == TQString::fromLatin1("type") && objbase->id() != ID_APPLET) {
objbase->setServiceType(p->value());
} else if (url.isEmpty() &&
- (name_lower == QString::fromLatin1("src") ||
- name_lower == QString::fromLatin1("movie") ||
- name_lower == QString::fromLatin1("code"))) {
+ (name_lower == TQString::fromLatin1("src") ||
+ name_lower == TQString::fromLatin1("movie") ||
+ name_lower == TQString::fromLatin1("code"))) {
url = p->value();
}
params.append(aStr);
@@ -754,12 +754,12 @@ void RenderPartObject::updateWidget()
}
}
}
- params.append( QString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
- params.append( QString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
+ params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
+ params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
HTMLEmbedElementImpl *embed = 0;
- QString classId;
- QString serviceType = objbase->serviceType;
+ TQString classId;
+ TQString serviceType = objbase->serviceType;
if ( element()->id() == ID_EMBED ) {
embed = static_cast<HTMLEmbedElementImpl *>( objbase );
@@ -775,18 +775,18 @@ void RenderPartObject::updateWidget()
}
classId = objbase->classId;
- params.append( QString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
- params.append( QString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
+ params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
+ params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
if (!objbase->getAttribute(ATTR_WIDTH).isEmpty())
- params.append( QString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
+ params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) {
- params.append( QString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
+ params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
objbase->setAttribute(ATTR_WIDTH, embed->getAttribute(ATTR_WIDTH));
}
if (!objbase->getAttribute(ATTR_HEIGHT).isEmpty())
- params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
+ params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
else if (embed && !embed->getAttribute(ATTR_HEIGHT).isEmpty()) {
- params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
+ params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
objbase->setAttribute(ATTR_HEIGHT, embed->getAttribute(ATTR_HEIGHT));
}
@@ -808,7 +808,7 @@ void RenderPartObject::updateWidget()
serviceType = "application/x-activex-handler";
#endif
- if(classId.find(QString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
+ if(classId.find(TQString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
// It is ActiveX, but the nsplugin system handling
// should also work, that's why we don't override the
// serviceType with application/x-activex-handler
@@ -817,17 +817,17 @@ void RenderPartObject::updateWidget()
// with nspluginviewer (Niko)
serviceType = "application/x-shockwave-flash";
}
- else if(classId.find(QString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
+ else if(classId.find(TQString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
serviceType = "audio/x-pn-realaudio-plugin";
- else if(classId.find(QString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
- objbase->classId.find(QString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
+ else if(classId.find(TQString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
+ objbase->classId.find(TQString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
serviceType = "application/x-java-applet";
// http://www.apple.com/quicktime/tools_tips/tutorials/activex.html
- else if(classId.find(QString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
+ else if(classId.find(TQString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
serviceType = "video/quicktime";
// http://msdn.microsoft.com/library/en-us/dnwmt/html/adding_windows_media_to_web_pages__etse.asp?frame=true
- else if(objbase->classId.find(QString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
- classId.find(QString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
+ else if(objbase->classId.find(TQString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
+ classId.find(TQString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
serviceType = "video/x-msvideo";
else
@@ -855,7 +855,7 @@ void RenderPartObject::close()
}
-bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType )
+bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType )
{
KHTMLPart *part = static_cast<KHTMLView *>(m_view)->part();
kdDebug(6031) << "RenderPartObject::partLoadingErrorNotify serviceType=" << serviceType << endl;
@@ -888,7 +888,7 @@ bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, co
}
// Dissociate ourselves from the current event loop (to prevent crashes
// due to the message box staying up)
- QTimer::singleShot( 0, this, SLOT( slotPartLoadingErrorNotify() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPartLoadingErrorNotify() ) );
#if 0
Tokenizer *tokenizer = static_cast<DOM::DocumentImpl *>(part->document().handle())->tokenizer();
if (tokenizer) tokenizer->setOnHold( true );
@@ -902,7 +902,7 @@ void RenderPartObject::slotPartLoadingErrorNotify()
{
// First we need to find out the servicetype - again - this code is too duplicated !
HTMLEmbedElementImpl *embed = 0;
- QString serviceType;
+ TQString serviceType;
if( element()->id()==ID_OBJECT ) {
// check for embed child object
@@ -929,7 +929,7 @@ void RenderPartObject::slotPartLoadingErrorNotify()
KParts::BrowserExtension *ext = part->browserExtension();
if( embed && !embed->pluginPage.isEmpty() && ext ) {
// Prepare the mimetype to show in the question (comment if available, name as fallback)
- QString mimeName = serviceType;
+ TQString mimeName = serviceType;
KMimeType::Ptr mime = KMimeType::mimeType(serviceType);
if ( mime->name() != KMimeType::defaultMimeType() )
mimeName = mime->comment();
@@ -952,10 +952,10 @@ void RenderPartObject::slotPartLoadingErrorNotify()
if(!pluginAvailable) {
// Prepare the URL to show in the question (host only if http, to make it short)
KURL pluginPageURL( embed->pluginPage );
- QString shortURL = pluginPageURL.protocol() == "http" ? pluginPageURL.host() : pluginPageURL.prettyURL();
+ TQString shortURL = pluginPageURL.protocol() == "http" ? pluginPageURL.host() : pluginPageURL.prettyURL();
int res = KMessageBox::questionYesNo( m_view,
i18n("No plugin found for '%1'.\nDo you want to download one from %2?").arg(mimeName).arg(shortURL),
- i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), QString("plugin-")+serviceType);
+ i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), TQString("plugin-")+serviceType);
if ( res == KMessageBox::Yes )
{
// Display vendor download page
@@ -989,19 +989,19 @@ void RenderPartObject::layout( )
void RenderPartObject::slotViewCleared()
{
- if(m_widget->inherits("QScrollView") ) {
+ if(m_widget->inherits("TQScrollView") ) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "iframe is a scrollview!" << endl;
#endif
- QScrollView *view = static_cast<QScrollView *>(m_widget);
- int frameStyle = QFrame::NoFrame;
- QScrollView::ScrollBarMode scroll = QScrollView::Auto;
+ TQScrollView *view = static_cast<TQScrollView *>(m_widget);
+ int frameStyle = TQFrame::NoFrame;
+ TQScrollView::ScrollBarMode scroll = TQScrollView::Auto;
int marginw = -1;
int marginh = -1;
if ( element()->id() == ID_IFRAME) {
HTMLIFrameElementImpl *frame = static_cast<HTMLIFrameElementImpl *>(element());
if(frame->frameBorder)
- frameStyle = QFrame::Box;
+ frameStyle = TQFrame::Box;
scroll = frame->scrolling;
marginw = frame->marginWidth;
marginh = frame->marginHeight;
diff --git a/khtml/rendering/render_frames.h b/khtml/rendering/render_frames.h
index c6e050525..3dd7ed0d9 100644
--- a/khtml/rendering/render_frames.h
+++ b/khtml/rendering/render_frames.h
@@ -69,7 +69,7 @@ public:
{ return static_cast<DOM::HTMLFrameSetElementImpl*>(RenderObject::element()); }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
private:
@@ -99,7 +99,7 @@ public:
virtual const char *renderName() const { return "RenderPart"; }
- virtual void setWidget( QWidget *widget );
+ virtual void setWidget( TQWidget *widget );
/**
* Called by KHTMLPart to notify the frame object that loading the
@@ -112,7 +112,7 @@ public:
* Return false in the normal case, return true if a fallback was found
* and the url was successfully opened.
*/
- virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType );
+ virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType );
virtual short intrinsicWidth() const;
virtual int intrinsicHeight() const;
@@ -159,7 +159,7 @@ public:
virtual bool canHaveBorder() const { return true; }
- virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType );
+ virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType );
public slots:
void slotViewCleared();
diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp
index aeab48630..17c65fc9c 100644
--- a/khtml/rendering/render_generated.cpp
+++ b/khtml/rendering/render_generated.cpp
@@ -72,28 +72,28 @@ RenderCounter::RenderCounter(DOM::NodeImpl* node, const DOM::CounterImpl* counte
{
}
-QString RenderCounter::toListStyleType(int value, int total, EListStyleType type)
+TQString RenderCounter::toListStyleType(int value, int total, EListStyleType type)
{
- QString item;
+ TQString item;
switch(type)
{
case LNONE:
break;
// Glyphs: (these values are not really used and instead handled by RenderGlyph)
case LDISC:
- item = QChar(0x2022);
+ item = TQChar(0x2022);
break;
case LCIRCLE:
- item = QChar(0x25e6);
+ item = TQChar(0x25e6);
break;
case LSQUARE:
- item = QChar(0x25a0);
+ item = TQChar(0x25a0);
break;
case LBOX:
- item = QChar(0x25a1);
+ item = TQChar(0x25a1);
break;
case LDIAMOND:
- item = QChar(0x25c6);
+ item = TQChar(0x25c6);
break;
// Numeric:
case LDECIMAL:
@@ -107,7 +107,7 @@ QString RenderCounter::toListStyleType(int value, int total, EListStyleType type
decimals++;
}
decimals = kMax(decimals, 2);
- QString num = QString::number(value);
+ TQString num = TQString::number(value);
item.fill('0',decimals-num.length());
item.append(num);
break;
@@ -273,7 +273,7 @@ void RenderQuote::generateContent()
case NO_OPEN_QUOTE:
case NO_CLOSE_QUOTE:
case NO_QUOTE:
- m_item = QString();
+ m_item = TQString();
}
}
@@ -290,8 +290,8 @@ void RenderGlyph::setStyle(RenderStyle *_style)
{
RenderBox::setStyle(_style);
- const QFontMetrics &fm = style()->fontMetrics();
- QRect xSize= fm.boundingRect('x');
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQRect xSize= fm.boundingRect('x');
m_height = xSize.height();
m_width = xSize.width();;
@@ -342,15 +342,15 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
if((_ty > paintInfo.r.bottom()) || (_ty + m_height <= paintInfo.r.top()))
return;
- QPainter* p = paintInfo.p;
+ TQPainter* p = paintInfo.p;
- const QColor color( style()->color() );
+ const TQColor color( style()->color() );
p->setPen( color );
int xHeight = m_height;
int bulletWidth = (xHeight+1)/2;
int yoff = (xHeight - 1)/4;
- QRect marker(_tx, _ty + yoff, bulletWidth, bulletWidth);
+ TQRect marker(_tx, _ty + yoff, bulletWidth, bulletWidth);
switch(m_type) {
case LDISC:
@@ -370,14 +370,14 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( marker );
return;
case LDIAMOND: {
- static QPointArray diamond(4);
+ static TQPointArray diamond(4);
int x = marker.x();
int y = marker.y();
int s = bulletWidth/2;
- diamond[0] = QPoint(x+s, y);
- diamond[1] = QPoint(x+2*s, y+s);
- diamond[2] = QPoint(x+s, y+2*s);
- diamond[3] = QPoint(x, y+s);
+ diamond[0] = TQPoint(x+s, y);
+ diamond[1] = TQPoint(x+2*s, y+s);
+ diamond[2] = TQPoint(x+s, y+2*s);
+ diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->drawConvexPolygon( diamond, 0, 4 );
return;
diff --git a/khtml/rendering/render_generated.h b/khtml/rendering/render_generated.h
index 15b30b8c7..6fa20e7cd 100644
--- a/khtml/rendering/render_generated.h
+++ b/khtml/rendering/render_generated.h
@@ -49,7 +49,7 @@ public:
void updateContent();
protected:
- QString m_item;
+ TQString m_item;
CounterNode *m_counterNode; // Cache of the counternode
};
@@ -66,7 +66,7 @@ public:
virtual void generateContent();
protected:
- QString toListStyleType(int value, int total, EListStyleType type);
+ TQString toListStyleType(int value, int total, EListStyleType type);
const DOM::CounterImpl* m_counter;
};
diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp
index 5d33da2ab..120e75361 100644
--- a/khtml/rendering/render_image.cpp
+++ b/khtml/rendering/render_image.cpp
@@ -27,8 +27,8 @@
#include "render_image.h"
#include "render_canvas.h"
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -77,9 +77,9 @@ RenderImage::~RenderImage()
if(m_oldImage) m_oldImage->deref( this );
}
-QPixmap RenderImage::pixmap() const
+TQPixmap RenderImage::pixmap() const
{
- return m_cachedImage ? m_cachedImage->pixmap() : QPixmap();
+ return m_cachedImage ? m_cachedImage->pixmap() : TQPixmap();
}
void RenderImage::setStyle(RenderStyle* _style)
@@ -96,7 +96,7 @@ void RenderImage::setContentObject(CachedObject* co )
updateImage( static_cast<CachedImage*>( co ) );
}
-void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
+void RenderImage::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
{
if ( o == m_oldImage )
return;
@@ -114,8 +114,8 @@ void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
// we have an alt and the user meant it (its not a text we invented)
if ( element() && !alt.isEmpty() && !element()->getAttribute( ATTR_ALT ).isNull()) {
- const QFontMetrics &fm = style()->fontMetrics();
- QRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
if ( br.width() > iw )
iw = br.width();
if ( br.height() > ih )
@@ -193,7 +193,7 @@ void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
(scaledHeight / (cHeight/5) == resizeCache.height() / (cHeight/5)))
return;
- resizeCache = QPixmap(); // for resized animations
+ resizeCache = TQPixmap(); // for resized animations
if(completeRepaint)
repaintRectangle(borderLeft()+paddingLeft(), borderTop()+paddingTop(), contentWidth(), contentHeight());
@@ -241,16 +241,16 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// paint frame around image as long as it is not completely loaded from web.
if (bUnfinishedImageFrame && paintInfo.phase == PaintActionForeground && cWidth > 2 && cHeight > 2 && !complete()) {
- static QPixmap *loadingIcon;
- QColor bg = khtml::retrieveBackgroundColor(this);
- QColor fg = khtml::hasSufficientContrast(Qt::gray, bg) ? Qt::gray :
+ static TQPixmap *loadingIcon;
+ TQColor bg = khtml::retrieveBackgroundColor(this);
+ TQColor fg = khtml::hasSufficientContrast(Qt::gray, bg) ? Qt::gray :
(hasSufficientContrast(Qt::white, bg) ? Qt::white : Qt::black);
- paintInfo.p->setPen(QPen(fg, 1));
+ paintInfo.p->setPen(TQPen(fg, 1));
paintInfo.p->setBrush( Qt::NoBrush );
paintInfo.p->drawRect(_tx, _ty, m_width, m_height);
if (!(m_width <= 5 || m_height <= 5)) {
if (!loadingIcon) {
- loadingIcon = new QPixmap();
+ loadingIcon = new TQPixmap();
loadingIcon->loadFromData(loading_icon_data, loading_icon_len);
}
paintInfo.p->drawPixmap(_tx + 4, _ty + 4, *loadingIcon, 0, 0, m_width - 5, m_height - 5);
@@ -268,20 +268,20 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
KApplication::palette().inactive(), true, 1 );
}
- QPixmap const* pix = i ? &i->pixmap() : 0;
+ TQPixmap const* pix = i ? &i->pixmap() : 0;
if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )
{
- QRect r(pix->rect());
- r = r.intersect(QRect(0, 0, cWidth-4, cHeight-4));
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad+2, _ty + topBorder + topPad+2), *pix, r );
+ TQRect r(pix->rect());
+ r = r.intersect(TQRect(0, 0, cWidth-4, cHeight-4));
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad+2, _ty + topBorder + topPad+2), *pix, r );
}
if(!alt.isEmpty()) {
- QString text = alt.string();
+ TQString text = alt.string();
paintInfo.p->setFont(style()->font());
paintInfo.p->setPen( style()->color() );
int ax = _tx + leftBorder + leftPad + 2;
int ay = _ty + topBorder + topPad + 2;
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
if (cWidth>5 && cHeight>=fm.height())
paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, Qt::WordBreak, text );
}
@@ -290,18 +290,18 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
else if (i && !i->isTransparent())
{
paintInfo.p->setPen( Qt::black ); // used for bitmaps
- const QPixmap& pix = i->pixmap();
+ const TQPixmap& pix = i->pixmap();
if ( (cWidth != intrinsicWidth() || cHeight != intrinsicHeight()) &&
pix.width() > 0 && pix.height() > 0 && i->valid_rect().isValid())
{
if (resizeCache.isNull() && cWidth && cHeight && intrinsicWidth() && intrinsicHeight())
{
- QRect scaledrect(i->valid_rect());
+ TQRect scaledrect(i->valid_rect());
// kdDebug(6040) << "time elapsed: " << dt->elapsed() << endl;
// kdDebug( 6040 ) << "have to scale: " << endl;
// qDebug("cw=%d ch=%d pw=%d ph=%d rcw=%d, rch=%d",
// cWidth, cHeight, intrinsicWidth(), intrinsicHeight(), resizeCache.width(), resizeCache.height());
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.scale( (float)(cWidth)/intrinsicWidth(),
(float)(cHeight)/intrinsicHeight() );
resizeCache = pix.xForm( matrix );
@@ -315,35 +315,35 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// sometimes scaledrect.width/height are off by one because
// of rounding errors. if the i is fully loaded, we
// make sure that we don't do unnecessary resizes during painting
- QSize s(scaledrect.size());
- if(i->valid_rect().size() == QSize( intrinsicWidth(), intrinsicHeight() )) // fully loaded
- s = QSize(cWidth, cHeight);
+ TQSize s(scaledrect.size());
+ if(i->valid_rect().size() == TQSize( intrinsicWidth(), intrinsicHeight() )) // fully loaded
+ s = TQSize(cWidth, cHeight);
if(kAbs(s.width() - cWidth) < 2) // rounding errors
s.setWidth(cWidth);
if(resizeCache.size() != s)
resizeCache.resize(s);
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad),
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad),
resizeCache, scaledrect );
}
else
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad), resizeCache );
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad), resizeCache );
}
else
{
// we might be just about switching images
- QRect rect(i->valid_rect().isValid() ? i->valid_rect()
- : QRect(0, 0, intrinsicWidth(), intrinsicHeight()));
+ TQRect rect(i->valid_rect().isValid() ? i->valid_rect()
+ : TQRect(0, 0, intrinsicWidth(), intrinsicHeight()));
- QPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad);
+ TQPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad);
// qDebug("normal paint rect %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
-// rect = rect & QRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y());
+// rect = rect & TQRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y());
// qDebug("normal paint rect after %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
// qDebug("normal paint: offs.y(): %d, y: %d, diff: %d", offs.y(), y, y - offs.y());
// qDebug("");
-// p->setClipRect(QRect(x,y,w,h));
+// p->setClipRect(TQRect(x,y,w,h));
// p->drawPixmap( offs.x(), y, pix, rect.x(), rect.y(), rect.width(), rect.height() );
@@ -370,7 +370,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// don't touch it unless you know what you're doing
paintInfo.p->setBrushOrigin(_tx, _ty - paintInfo.r.y());
paintInfo.p->fillRect(_tx, _ty, width(), height(),
- QBrush(style()->palette().active().highlight(),
+ TQBrush(style()->palette().active().highlight(),
Qt::Dense4Pattern));
}
}
@@ -406,7 +406,7 @@ void RenderImage::layout()
}
if ( m_width != oldwidth || m_height != oldheight )
- resizeCache = QPixmap();
+ resizeCache = TQPixmap();
setNeedsLayout(false);
}
diff --git a/khtml/rendering/render_image.h b/khtml/rendering/render_image.h
index bd887ddf5..8c8bb9bef 100644
--- a/khtml/rendering/render_image.h
+++ b/khtml/rendering/render_image.h
@@ -28,8 +28,8 @@
#include "rendering/render_replaced.h"
#include "dom/dom_string.h"
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
namespace khtml {
@@ -47,10 +47,10 @@ public:
virtual void layout();
- virtual void setPixmap( const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap( const TQPixmap &, const TQRect&, CachedImage *);
// don't even think about making these methods virtual!
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
DOM::HTMLElementImpl* element() const
{ return static_cast<DOM::HTMLElementImpl*>(RenderObject::element()); }
@@ -86,7 +86,7 @@ private:
/*
* Cache for images that need resizing
*/
- QPixmap resizeCache;
+ TQPixmap resizeCache;
// text to display as long as the image isn't available
DOM::DOMString alt;
diff --git a/khtml/rendering/render_inline.cpp b/khtml/rendering/render_inline.cpp
index 5848db47a..c3eb08d4b 100644
--- a/khtml/rendering/render_inline.cpp
+++ b/khtml/rendering/render_inline.cpp
@@ -30,7 +30,7 @@
#include "rendering/render_block.h"
#include "xml/dom_docimpl.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
using namespace khtml;
@@ -260,7 +260,7 @@ void RenderInline::paint(PaintInfo& i, int _tx, int _ty)
* @param pnt point to append
* @return \c true if \c pnt has actually been appended
*/
-inline static bool appendIfNew(QValueVector<QPoint> &pointArray, const QPoint &pnt)
+inline static bool appendIfNew(TQValueVector<TQPoint> &pointArray, const TQPoint &pnt)
{
// if (!pointArray.isEmpty()) kdDebug(6040) << "appifnew: " << pointArray.back() << " == " << pnt << ": " << (pointArray.back() == pnt) << endl;
// else kdDebug(6040) << "appifnew: " << pnt << " (unconditional)" << endl;
@@ -297,13 +297,13 @@ inline static bool appendIfNew(QValueVector<QPoint> &pointArray, const QPoint &p
* If no spike is found, the point-array is left unchanged.
* @return \c true if an actual reduction was done
*/
-inline static bool reduceSpike(QValueVector<QPoint> &pointArray)
+inline static bool reduceSpike(TQValueVector<TQPoint> &pointArray)
{
if (pointArray.size() < 3) return false;
- QValueVector<QPoint>::Iterator it = pointArray.end();
- QPoint p0 = *--it;
- QPoint p1 = *--it;
- QPoint p2 = *--it;
+ TQValueVector<TQPoint>::Iterator it = pointArray.end();
+ TQPoint p0 = *--it;
+ TQPoint p1 = *--it;
+ TQPoint p2 = *--it;
bool elide = false;
@@ -363,13 +363,13 @@ inline static bool reduceSpike(QValueVector<QPoint> &pointArray)
* left unchanged.
* @return \c true if a segment separator was actually reduced.
*/
-inline static bool reduceSegmentSeparator(QValueVector<QPoint> &pointArray)
+inline static bool reduceSegmentSeparator(TQValueVector<TQPoint> &pointArray)
{
if (pointArray.size() < 3) return false;
- QValueVector<QPoint>::Iterator it = pointArray.end();
- QPoint p0 = *--it;
- QPoint p1 = *--it;
- QPoint p2 = *--it;
+ TQValueVector<TQPoint>::Iterator it = pointArray.end();
+ TQPoint p0 = *--it;
+ TQPoint p1 = *--it;
+ TQPoint p2 = *--it;
// kdDebug(6040) << "checking p2: " << p2 << " p1: " << p1 << " p0: " << p0 << endl;
if (p0.x() == p1.x() && p1.x() == p2.x()
@@ -391,7 +391,7 @@ inline static bool reduceSegmentSeparator(QValueVector<QPoint> &pointArray)
* Appends the given point to the point-array, doing necessary reductions to
* produce a path without spikes and segment separators.
*/
-static void appendPoint(QValueVector<QPoint> &pointArray, QPoint &pnt)
+static void appendPoint(TQValueVector<TQPoint> &pointArray, TQPoint &pnt)
{
if (!appendIfNew(pointArray, pnt)) return;
// kdDebug(6040) << "appendPoint: appended " << pnt << endl;
@@ -411,7 +411,7 @@ static void appendPoint(QValueVector<QPoint> &pointArray, QPoint &pnt)
* the lowest for !\c bottom.
*/
static void collectHorizontalBoxCoordinates(InlineBox *box,
- QValueVector<QPoint> &pointArray,
+ TQValueVector<TQPoint> &pointArray,
bool bottom, int offset, int limit = -500000)
{
// kdDebug(6000) << "collectHorizontalBoxCoordinates: " << endl;
@@ -420,11 +420,11 @@ static void collectHorizontalBoxCoordinates(InlineBox *box,
if (limit != -500000 && (bottom ? y < limit : y > limit))
y = limit;
int x = box->xPos() + bottom*box->width() + offset;
- QPoint newPnt(x, y);
+ TQPoint newPnt(x, y);
// Add intersection point if point-array not empty.
if (!pointArray.isEmpty()) {
- QPoint lastPnt = pointArray.back();
- QPoint insPnt(newPnt.x(), lastPnt.y());
+ TQPoint lastPnt = pointArray.back();
+ TQPoint insPnt(newPnt.x(), lastPnt.y());
if (offset && ((bottom && lastPnt.y() > y) || (!bottom && lastPnt.y() < y))) {
insPnt.rx() = lastPnt.x();
insPnt.ry() = y;
@@ -453,8 +453,8 @@ static void collectHorizontalBoxCoordinates(InlineBox *box,
// Add intersection point if flow box contained any children
if (flowBox->firstChild()) {
- QPoint lastPnt = pointArray.back();
- QPoint insPnt(lastPnt.x(), newPnt.y());
+ TQPoint lastPnt = pointArray.back();
+ TQPoint insPnt(lastPnt.x(), newPnt.y());
// kdDebug(6040) << "right: " << lastPnt << " == " << insPnt << ": " << (insPnt == lastPnt) << endl;
appendPoint(pointArray, insPnt);
}
@@ -491,7 +491,7 @@ inline static bool lineBoxesDisjoint(InlineRunBox *line, int offset, bool toBegi
* @param lastline if not 0, returns the pointer to the last line box traversed
*/
static void collectVerticalBoxCoordinates(InlineRunBox *line,
- QValueVector<QPoint> &pointArray,
+ TQValueVector<TQPoint> &pointArray,
bool left, int offset, InlineRunBox **lastline = 0)
{
InlineRunBox *last = 0;
@@ -504,15 +504,15 @@ static void collectVerticalBoxCoordinates(InlineRunBox *line,
if (root != line && !isLast)
while (root->parent()) root = root->parent();
- QPoint newPnt(curr->xPos() + !left*curr->width() + offset,
+ TQPoint newPnt(curr->xPos() + !left*curr->width() + offset,
(left ? root->topOverflow() : root->bottomOverflow()) + offset);
if (!pointArray.isEmpty()) {
- QPoint lastPnt = pointArray.back();
+ TQPoint lastPnt = pointArray.back();
if (newPnt.x()>lastPnt.x() && !left)
pointArray.back().setY( kMin(lastPnt.y(), root->topOverflow()-offset) );
else if (newPnt.x()<lastPnt.x() && left)
pointArray.back().setY( kMax(lastPnt.y(), root->bottomOverflow()+offset) );
- QPoint insPnt(newPnt.x(), pointArray.back().y());
+ TQPoint insPnt(newPnt.x(), pointArray.back().y());
// kdDebug(6040) << "left: " << lastPnt << " == " << insPnt << ": " << (insPnt == lastPnt) << endl;
appendPoint(pointArray, insPnt);
}
@@ -532,23 +532,23 @@ static void collectVerticalBoxCoordinates(InlineRunBox *line,
* @param pointArray point-array
* @return actual begin of point array
*/
-static QPoint *linkEndToBegin(QValueVector<QPoint> &pointArray)
+static TQPoint *linkEndToBegin(TQValueVector<TQPoint> &pointArray)
{
uint index = 0;
assert(pointArray.size() >= 3);
// if first and last points match, ignore the last one.
- bool linkup = false; QPoint linkupPnt;
+ bool linkup = false; TQPoint linkupPnt;
if (pointArray.front() == pointArray.back()) {
linkupPnt = pointArray.back();
pointArray.pop_back();
linkup = true;
}
- const QPoint *it = pointArray.begin() + index;
- QPoint pfirst = *it;
- QPoint pnext = *++it;
- QPoint plast = pointArray.back();
+ const TQPoint *it = pointArray.begin() + index;
+ TQPoint pfirst = *it;
+ TQPoint pnext = *++it;
+ TQPoint plast = pointArray.back();
// kdDebug(6040) << "linkcheck plast: " << plast << " pfirst: " << pfirst << " pnext: " << pnext << endl;
if (plast.x() == pfirst.x() && pfirst.x() == pnext.x()
@@ -562,7 +562,7 @@ static QPoint *linkEndToBegin(QValueVector<QPoint> &pointArray)
return pointArray.begin() + index;
}
-void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
+void RenderInline::paintOutlines(TQPainter *p, int _tx, int _ty)
{
if (style()->outlineWidth() == 0 || style()->outlineStyle() <= BHIDDEN)
return;
@@ -571,7 +571,7 @@ void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
// We may have to draw more than one outline path as they may be
// disjoint.
for (InlineRunBox *curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
- QValueVector<QPoint> path;
+ TQValueVector<TQPoint> path;
// collect topmost outline
collectHorizontalBoxCoordinates(curr, path, false, offset);
@@ -584,7 +584,7 @@ void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
if (path.size() < 3) continue;
- const QPoint *begin = linkEndToBegin(path);
+ const TQPoint *begin = linkEndToBegin(path);
// paint the outline
paintOutlinePath(p, _tx, _ty, begin, path.end(), BSLeft, -1, BSTop);
@@ -623,7 +623,7 @@ inline BSOrientation bsOrientation(RenderObject::BorderSide bs)
* The relative direction specifies whether the old border side meets with the
* straight given by the coordinates from below (negative), or above (positive).
*/
-inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, int direction, const QPoint &last, const QPoint &cur)
+inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, int direction, const TQPoint &last, const TQPoint &cur)
{
bool below = direction < 0;
if (last.x() == cur.x()) { // new segment is vertical
@@ -654,15 +654,15 @@ inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, in
* @param curBS border side of this segment
* @param nextBS border side of next segment
*/
-static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
- const QPoint &p1, const QPoint &p2,
+static void paintOutlineSegment(RenderObject *o, TQPainter *p, int tx, int ty,
+ const TQPoint &p1, const TQPoint &p2,
RenderObject::BorderSide prevBS,
RenderObject::BorderSide curBS,
RenderObject::BorderSide nextBS)
{
int ow = o->style()->outlineWidth();
EBorderStyle os = o->style()->outlineStyle();
- QColor oc = o->style()->outlineColor();
+ TQColor oc = o->style()->outlineColor();
int x1 = tx + p1.x();
int y1 = ty + p1.y();
@@ -683,7 +683,7 @@ static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
switch (curBS) {
case RenderObject::BSLeft:
case RenderObject::BSRight:
-/* p->setPen(QColor("#ffe4dd"));
+/* p->setPen(TQColor("#ffe4dd"));
p->drawLine(
x1 - (curBS == RenderObject::BSLeft ? ow : 0),
y1 - (prevBS == RenderObject::BSTop ? ow : 0),
@@ -720,13 +720,13 @@ static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
}
}
-void RenderInline::paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *begin, const QPoint *end, BorderSide bs, int direction, BorderSide endingBS)
+void RenderInline::paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint *begin, const TQPoint *end, BorderSide bs, int direction, BorderSide endingBS)
{
int ow = style()->outlineWidth();
if (ow == 0 || m_isContinuation) // Continuations get painted by the original inline.
return;
- QPoint last = *begin;
+ TQPoint last = *begin;
BorderSide lastBS = bs;
Q_ASSERT(begin != end);
++begin;
@@ -736,12 +736,12 @@ void RenderInline::paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *b
bs = newBorderSide(bs, direction, last, *begin);
// kdDebug(6040) << "newBorderSide: " << lastBS << " " << direction << "d " << last << " - " << *begin << " => " << bs << endl;
- for (const QPoint *it = begin; it != end; ++it) {
- QPoint cur = *it;
+ for (const TQPoint *it = begin; it != end; ++it) {
+ TQPoint cur = *it;
// kdDebug(6040) << "cur: " << cur << endl;
BorderSide nextBS;
if (it + 1 != end) {
- QPoint diff = cur - last;
+ TQPoint diff = cur - last;
direction = diff.x() + diff.y();
nextBS = newBorderSide(bs, direction, cur, *(it + 1));
// kdDebug(6040) << "newBorderSide*: " << bs << " " << direction << "d " << cur << " - " << *(it + 1) << " => " << nextBS << endl;
@@ -886,7 +886,7 @@ void RenderInline::caretPos(int offset, int flags, int &_x, int &_y, int &width,
&& element()->parent()->renderer()
? element()->parent()->renderer()->style()
: style();
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
_y = line->yPos() + line->baseline() - fm.ascent();
height = fm.height();
@@ -897,7 +897,7 @@ void RenderInline::caretPos(int offset, int flags, int &_x, int &_y, int &width,
}
} else {
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
_y = line->yPos() + line->baseline() - fm.ascent();
height = fm.height();
}
diff --git a/khtml/rendering/render_inline.h b/khtml/rendering/render_inline.h
index b87e53037..5f4bf7b29 100644
--- a/khtml/rendering/render_inline.h
+++ b/khtml/rendering/render_inline.h
@@ -77,11 +77,11 @@ public:
virtual int offsetTop() const;
virtual void caretPos(int offset, int flags, int &_x, int &_y, int &width, int &height);
- void paintOutlines(QPainter *p, int tx, int ty);
+ void paintOutlines(TQPainter *p, int tx, int ty);
protected:
static RenderInline* cloneInline(RenderFlow* src);
- void paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *begin, const QPoint *end, BorderSide startingBS, int initialDirection, BorderSide endingBS);
+ void paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint *begin, const TQPoint *end, BorderSide startingBS, int initialDirection, BorderSide endingBS);
private:
bool m_isContinuation : 1; // Whether or not we're a continuation of an inline.
diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp
index b4af3536c..2b7e93f1f 100644
--- a/khtml/rendering/render_layer.cpp
+++ b/khtml/rendering/render_layer.cpp
@@ -58,15 +58,15 @@
#include "html/html_blockimpl.h"
#include "xml/dom_restyler.h"
-#include <qscrollbar.h>
-#include <qptrvector.h>
-#include <qstyle.h>
+#include <tqscrollbar.h>
+#include <tqptrvector.h>
+#include <tqstyle.h>
using namespace DOM;
using namespace khtml;
#ifdef APPLE_CHANGES
-QScrollBar* RenderLayer::gScrollBar = 0;
+TQScrollBar* RenderLayer::gScrollBar = 0;
#endif
#ifndef NDEBUG
@@ -161,10 +161,10 @@ void RenderLayer::updateLayerPosition()
setPos(x,y);
}
-QRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
+TQRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
{
updateZOrderLists();
- QRegion r;
+ TQRegion r;
if (m_negZOrderList) {
uint count = m_negZOrderList->count();
for (uint i = 0; i < count; i++) {
@@ -176,7 +176,7 @@ QRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
if (s->visibility() == VISIBLE) {
int x = 0; int y = 0;
convertToLayerCoords(rootLayer,x,y);
- QRect cr(x,y,width(),height());
+ TQRect cr(x,y,width(),height());
if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() ||
renderer()->scrollsOverflow() || renderer()->isReplaced() ) {
r += cr;
@@ -201,7 +201,7 @@ void RenderLayer::repaint( Priority p, bool markForRepaint )
return;
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
child->repaint( p, markForRepaint );
- QRect layerBounds, damageRect, fgrect;
+ TQRect layerBounds, damageRect, fgrect;
calculateRects(renderer()->canvas()->layer(), renderer()->viewRect(), layerBounds, damageRect, fgrect);
m_visibleRect = damageRect.intersect( layerBounds );
if (m_visibleRect.isValid())
@@ -226,7 +226,7 @@ void RenderLayer::updateLayerPositions(RenderLayer* rootLayer, bool doFullRepain
int x = 0;
int y = 0;
convertToLayerCoords(rootLayer, x, y);
- QRect layerBounds = QRect(x,y,width(),height());
+ TQRect layerBounds = TQRect(x,y,width(),height());
positionScrollbars(layerBounds);
}
@@ -236,9 +236,9 @@ void RenderLayer::updateLayerPositions(RenderLayer* rootLayer, bool doFullRepain
m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
#else
if (checkForRepaint && m_markedForRepaint) {
- QRect layerBounds, damageRect, fgrect;
+ TQRect layerBounds, damageRect, fgrect;
calculateRects(rootLayer, renderer()->viewRect(), layerBounds, damageRect, fgrect);
- QRect vr = damageRect.intersect( layerBounds );
+ TQRect vr = damageRect.intersect( layerBounds );
if (vr != m_visibleRect && vr.isValid()) {
renderer()->canvas()->repaintViewRectangle( vr.x(), vr.y(), vr.width(), vr.height() );
m_visibleRect = vr;
@@ -262,8 +262,8 @@ void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer)
uint count = m_posZOrderList ? m_posZOrderList->count() : 0;
bool needUpdate = (count || !m_region.isNull());
if (count) {
- QScrollView* sv = m_object->document()->view();
- m_region = QRect(0,0,sv->contentsWidth(),sv->contentsHeight());
+ TQScrollView* sv = m_object->document()->view();
+ m_region = TQRect(0,0,sv->contentsWidth(),sv->contentsHeight());
for (uint i = 0; i < count; i++) {
RenderLayer* child = m_posZOrderList->at(i);
@@ -272,7 +272,7 @@ void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer)
m_region -= child->paintedRegion(rootLayer);
}
} else {
- m_region = QRegion();
+ m_region = TQRegion();
}
if (needUpdate)
renderer()->updateWidgetMasks();
@@ -606,17 +606,17 @@ void RenderLayer::updateScrollPositionFromScrollbars()
void
RenderLayer::showScrollbar(Qt::Orientation o, bool show)
{
- QScrollBar *sb = (o == Qt::Horizontal) ? m_hBar : m_vBar;
+ TQScrollBar *sb = (o == Qt::Horizontal) ? m_hBar : m_vBar;
if (show && !sb) {
- QScrollView* scrollView = m_object->document()->view();
- sb = new QScrollBar(o, scrollView, "__khtml");
+ TQScrollView* scrollView = m_object->document()->view();
+ sb = new TQScrollBar(o, scrollView, "__khtml");
scrollView->addChild(sb, 0, -50000);
- sb->setBackgroundMode(QWidget::NoBackground);
+ sb->setBackgroundMode(TQWidget::NoBackground);
sb->show();
if (!m_scrollMediator)
m_scrollMediator = new RenderScrollMediator(this);
- m_scrollMediator->connect(sb, SIGNAL(valueChanged(int)), SLOT(slotValueChanged()));
+ m_scrollMediator->connect(sb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged()));
}
else if (!show && sb) {
delete sb;
@@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth()
#ifdef APPLE_CHANGES
return m_vBar->width();
#else
- return m_vBar->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ return m_vBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@@ -650,12 +650,12 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES
return m_hBar->height();
#else
- return m_hBar->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ return m_hBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
-void RenderLayer::positionScrollbars(const QRect& absBounds)
+void RenderLayer::positionScrollbars(const TQRect& absBounds)
{
#ifdef APPLE_CHANGES
if (m_vBar) {
@@ -683,24 +683,24 @@ void RenderLayer::positionScrollbars(const QRect& absBounds)
if (w <= 0 || h <= 0 || (!m_vBar && !m_hBar))
return;
- QScrollView* scrollView = m_object->document()->view();
+ TQScrollView* scrollView = m_object->document()->view();
tx += bl;
ty += bt;
- QScrollBar *b = m_hBar;
+ TQScrollBar *b = m_hBar;
if (!m_hBar)
b = m_vBar;
- int sw = b->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ int sw = b->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
if (m_vBar) {
- QRect vBarRect = QRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);
+ TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);
m_vBar->resize(vBarRect.width(), vBarRect.height());
scrollView->addChild(m_vBar, vBarRect.x(), vBarRect.y());
}
if (m_hBar) {
- QRect hBarRect = QRect(tx, ty + h - sw + 1, w - (m_vBar ? sw : 0) + 1, sw);
+ TQRect hBarRect = TQRect(tx, ty + h - sw + 1, w - (m_vBar ? sw : 0) + 1, sw);
m_hBar->resize(hBarRect.width(), hBarRect.height());
scrollView->addChild(m_hBar, hBarRect.x(), hBarRect.y());
}
@@ -801,7 +801,7 @@ void RenderLayer::paintScrollbars(RenderObject::PaintInfo& pI)
if (!m_object->element())
return;
- QScrollView* scrollView = m_object->document()->view();
+ TQScrollView* scrollView = m_object->document()->view();
if (m_hBar) {
int x = m_hBar->x();
int y = m_hBar->y();
@@ -817,12 +817,12 @@ void RenderLayer::paintScrollbars(RenderObject::PaintInfo& pI)
#endif
}
-void RenderLayer::paint(QPainter *p, const QRect& damageRect, bool selectionOnly)
+void RenderLayer::paint(TQPainter *p, const TQRect& damageRect, bool selectionOnly)
{
paintLayer(this, p, damageRect, selectionOnly);
}
-static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipRect)
+static void setClip(TQPainter* p, const TQRect& paintDirtyRect, const TQRect& clipRect)
{
if (paintDirtyRect == clipRect)
return;
@@ -832,9 +832,9 @@ static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipR
p->addClip(clipRect);
#else
- QRect clippedRect = p->xForm(clipRect);
- QRegion creg(clippedRect);
- QRegion old = p->clipRegion();
+ TQRect clippedRect = p->xForm(clipRect);
+ TQRegion creg(clippedRect);
+ TQRegion old = p->clipRegion();
if (!old.isNull())
creg = old.intersect(creg);
p->setClipRegion(creg);
@@ -842,18 +842,18 @@ static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipR
}
-static void restoreClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipRect)
+static void restoreClip(TQPainter* p, const TQRect& paintDirtyRect, const TQRect& clipRect)
{
if (paintDirtyRect == clipRect)
return;
p->restore();
}
-void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
- const QRect& paintDirtyRect, bool selectionOnly)
+void RenderLayer::paintLayer(RenderLayer* rootLayer, TQPainter *p,
+ const TQRect& paintDirtyRect, bool selectionOnly)
{
// Calculate the clip rects we should use.
- QRect layerBounds, damageRect, clipRectToApply;
+ TQRect layerBounds, damageRect, clipRectToApply;
calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply);
int x = layerBounds.x();
int y = layerBounds.y();
@@ -939,7 +939,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
// Paint any child layers that have overflow.
if (m_overflowList)
- for (QValueList<RenderLayer*>::iterator it = m_overflowList->begin(); it != m_overflowList->end(); ++it)
+ for (TQValueList<RenderLayer*>::iterator it = m_overflowList->begin(); it != m_overflowList->end(); ++it)
(*it)->paintLayer(rootLayer, p, paintDirtyRect, selectionOnly);
// Now walk the sorted list of children with positive z-indices.
@@ -956,7 +956,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
int ax=0;
int ay=0;
renderer()->absolutePosition( ax, ay );
- p->setPen(QPen(QColor("yellow"), 1, Qt::DotLine));
+ p->setPen(TQPen(TQColor("yellow"), 1, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(ax, ay, width(), height());
}
@@ -987,7 +987,7 @@ bool RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
sty += static_cast<RenderCanvas*>(renderer())->view()->contentsY();
}
- QRect damageRect(stx,sty, width(), height());
+ TQRect damageRect(stx,sty, width(), height());
RenderLayer* insideLayer = nodeAtPointForLayer(this, info, x, y, damageRect);
// Now determine if the result is inside an anchor.
@@ -1007,10 +1007,10 @@ bool RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
}
RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObject::NodeInfo& info,
- int xMousePos, int yMousePos, const QRect& hitTestRect)
+ int xMousePos, int yMousePos, const TQRect& hitTestRect)
{
// Calculate the clip rects we should use.
- QRect layerBounds, bgRect, fgRect;
+ TQRect layerBounds, bgRect, fgRect;
calculateRects(rootLayer, hitTestRect, layerBounds, bgRect, fgRect);
// Ensure our lists are up-to-date.
@@ -1035,7 +1035,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
// Now check our overflow objects.
if (m_overflowList) {
- QValueList<RenderLayer*>::iterator it = m_overflowList->end();
+ TQValueList<RenderLayer*>::iterator it = m_overflowList->end();
for (--it; it != m_overflowList->end(); --it) {
insideLayer = (*it)->nodeAtPointForLayer(rootLayer, info, xMousePos, yMousePos, hitTestRect);
if (insideLayer)
@@ -1076,8 +1076,8 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
return 0;
}
-void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overflowClipRect,
- QRect& posClipRect, QRect& fixedClipRect)
+void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, TQRect& overflowClipRect,
+ TQRect& posClipRect, TQRect& fixedClipRect)
{
if (parent())
parent()->calculateClipRects(rootLayer, overflowClipRect, posClipRect, fixedClipRect);
@@ -1107,13 +1107,13 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overfl
convertToLayerCoords(rootLayer, x, y);
if (m_object->hasOverflowClip()) {
- QRect newOverflowClip = m_object->getOverflowClipRect(x,y);
+ TQRect newOverflowClip = m_object->getOverflowClipRect(x,y);
overflowClipRect = newOverflowClip.intersect(overflowClipRect);
if (m_object->isPositioned() || m_object->isRelPositioned())
posClipRect = newOverflowClip.intersect(posClipRect);
}
if (m_object->hasClip()) {
- QRect newPosClip = m_object->getClipRect(x,y);
+ TQRect newPosClip = m_object->getClipRect(x,y);
posClipRect = posClipRect.intersect(newPosClip);
overflowClipRect = overflowClipRect.intersect(newPosClip);
fixedClipRect = fixedClipRect.intersect(newPosClip);
@@ -1121,19 +1121,19 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overfl
}
}
-void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& paintDirtyRect, QRect& layerBounds,
- QRect& backgroundRect, QRect& foregroundRect)
+void RenderLayer::calculateRects(const RenderLayer* rootLayer, const TQRect& paintDirtyRect, TQRect& layerBounds,
+ TQRect& backgroundRect, TQRect& foregroundRect)
{
- QRect overflowClipRect = paintDirtyRect;
- QRect posClipRect = paintDirtyRect;
- QRect fixedClipRect = paintDirtyRect;
+ TQRect overflowClipRect = paintDirtyRect;
+ TQRect posClipRect = paintDirtyRect;
+ TQRect fixedClipRect = paintDirtyRect;
if (parent())
parent()->calculateClipRects(rootLayer, overflowClipRect, posClipRect, fixedClipRect);
int x = 0;
int y = 0;
convertToLayerCoords(rootLayer, x, y);
- layerBounds = QRect(x,y,width(),height());
+ layerBounds = TQRect(x,y,width(),height());
backgroundRect = m_object->style()->position() == FIXED ? fixedClipRect :
(m_object->isPositioned() ? posClipRect : overflowClipRect);
@@ -1147,7 +1147,7 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& pain
if (m_object->hasClip()) {
// Clip applies to *us* as well, so go ahead and update the damageRect.
- QRect newPosClip = m_object->getClipRect(x,y);
+ TQRect newPosClip = m_object->getClipRect(x,y);
backgroundRect = backgroundRect.intersect(newPosClip);
foregroundRect = foregroundRect.intersect(newPosClip);
}
@@ -1158,7 +1158,7 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& pain
}
}
-bool RenderLayer::intersectsDamageRect(const QRect& layerBounds, const QRect& damageRect) const
+bool RenderLayer::intersectsDamageRect(const TQRect& layerBounds, const TQRect& damageRect) const
{
return (renderer()->isCanvas() || renderer()->isRoot() || renderer()->isBody() ||
(renderer()->hasOverhangingFloats() && !renderer()->hasOverflowClip()) ||
@@ -1166,7 +1166,7 @@ bool RenderLayer::intersectsDamageRect(const QRect& layerBounds, const QRect& da
layerBounds.intersects(damageRect));
}
-bool RenderLayer::containsPoint(int x, int y, const QRect& damageRect) const
+bool RenderLayer::containsPoint(int x, int y, const TQRect& damageRect) const
{
return (renderer()->isCanvas() || renderer()->isRoot() || renderer()->isBody() ||
renderer()->hasOverhangingFloats() ||
@@ -1249,8 +1249,8 @@ void RenderLayer::updateHoverActiveState(RenderObject::NodeInfo& info)
// Sort the buffer from lowest z-index to highest. The common scenario will have
// most z-indices equal, so we optimize for that case (i.e., the list will be mostly
// sorted already).
-static void sortByZOrder(QPtrVector<RenderLayer>* buffer,
- QPtrVector<RenderLayer>* mergeBuffer,
+static void sortByZOrder(TQPtrVector<RenderLayer>* buffer,
+ TQPtrVector<RenderLayer>* mergeBuffer,
uint start, uint end)
{
if (start >= end)
@@ -1344,11 +1344,11 @@ void RenderLayer::updateZOrderLists()
// Sort the two lists.
if (m_posZOrderList) {
- QPtrVector<RenderLayer> mergeBuffer;
+ TQPtrVector<RenderLayer> mergeBuffer;
sortByZOrder(m_posZOrderList, &mergeBuffer, 0, m_posZOrderList->count());
}
if (m_negZOrderList) {
- QPtrVector<RenderLayer> mergeBuffer;
+ TQPtrVector<RenderLayer> mergeBuffer;
sortByZOrder(m_negZOrderList, &mergeBuffer, 0, m_negZOrderList->count());
}
@@ -1363,7 +1363,7 @@ void RenderLayer::updateOverflowList()
for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
if (child->isOverflowOnly()) {
if (!m_overflowList)
- m_overflowList = new QValueList<RenderLayer*>;
+ m_overflowList = new TQValueList<RenderLayer*>;
m_overflowList->append(child);
}
}
@@ -1371,7 +1371,7 @@ void RenderLayer::updateOverflowList()
m_overflowListDirty = false;
}
-void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<RenderLayer>*& negBuffer)
+void RenderLayer::collectLayers(TQPtrVector<RenderLayer>*& posBuffer, TQPtrVector<RenderLayer>*& negBuffer)
{
// FIXME: A child render object or layer could override visibility. Don't remove this
// optimization though until RenderObject's nodeAtPoint is patched to understand what to do
@@ -1383,11 +1383,11 @@ void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<
if (!isOverflowOnly()) {
// Determine which buffer the child should be in.
- QPtrVector<RenderLayer>*& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
+ TQPtrVector<RenderLayer>*& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
// Create the buffer if it doesn't exist yet.
if (!buffer)
- buffer = new QPtrVector<RenderLayer>();
+ buffer = new TQPtrVector<RenderLayer>();
// Resize by a power of 2 when our buffer fills up.
if (buffer->count() == buffer->size())
@@ -1407,13 +1407,13 @@ void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<
#ifdef ENABLE_DUMP
#ifndef KDE_USE_FINAL
-static QTextStream &operator<<(QTextStream &ts, const QRect &r)
+static TQTextStream &operator<<(TQTextStream &ts, const TQRect &r)
{
return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
}
#endif
-static void write(QTextStream &ts, RenderObject& o, const QString& indent )
+static void write(TQTextStream &ts, RenderObject& o, const TQString& indent )
{
o.dump(ts, indent);
@@ -1423,9 +1423,9 @@ static void write(QTextStream &ts, RenderObject& o, const QString& indent )
}
}
-static void write(QTextStream &ts, const RenderLayer &l,
- const QRect& layerBounds, const QRect& backgroundClipRect, const QRect& clipRect,
- int layerType = 0, const QString& indent = QString::null)
+static void write(TQTextStream &ts, const RenderLayer &l,
+ const TQRect& layerBounds, const TQRect& backgroundClipRect, const TQRect& clipRect,
+ int layerType = 0, const TQString& indent = TQString::null)
{
ts << indent << "layer";
@@ -1452,11 +1452,11 @@ static void write(QTextStream &ts, const RenderLayer &l,
ts << "\n";
}
-static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLayer* l,
- const QRect& paintDirtyRect, const QString& indent)
+static void writeLayers(TQTextStream &ts, const RenderLayer* rootLayer, RenderLayer* l,
+ const TQRect& paintDirtyRect, const TQString& indent)
{
// Calculate the clip rects we should use.
- QRect layerBounds, damageRect, clipRectToApply;
+ TQRect layerBounds, damageRect, clipRectToApply;
l->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply);
// Ensure our lists are up-to-date.
@@ -1464,8 +1464,8 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
l->updateOverflowList();
bool shouldPaint = l->intersectsDamageRect(layerBounds, damageRect);
- QPtrVector<RenderLayer>* negList = l->negZOrderList();
- QValueList<RenderLayer*>* ovfList = l->overflowList();
+ TQPtrVector<RenderLayer>* negList = l->negZOrderList();
+ TQValueList<RenderLayer*>* ovfList = l->overflowList();
if (shouldPaint && negList && negList->count() > 0)
write(ts, *l, layerBounds, damageRect, clipRectToApply, -1, indent);
@@ -1478,11 +1478,11 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
write(ts, *l, layerBounds, damageRect, clipRectToApply, negList && negList->count() > 0, indent);
if (ovfList) {
- for (QValueList<RenderLayer*>::iterator it = ovfList->begin(); it != ovfList->end(); ++it)
+ for (TQValueList<RenderLayer*>::iterator it = ovfList->begin(); it != ovfList->end(); ++it)
writeLayers(ts, rootLayer, *it, paintDirtyRect, indent);
}
- QPtrVector<RenderLayer>* posList = l->posZOrderList();
+ TQPtrVector<RenderLayer>* posList = l->posZOrderList();
if (posList) {
for (unsigned i = 0; i != posList->count(); ++i)
writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent);
@@ -1490,11 +1490,11 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
}
-void RenderLayer::dump(QTextStream &ts, const QString &ind)
+void RenderLayer::dump(TQTextStream &ts, const TQString &ind)
{
assert( renderer()->isCanvas() );
- writeLayers(ts, this, this, QRect(xPos(), yPos(), width(), height()), ind);
+ writeLayers(ts, this, this, TQRect(xPos(), yPos(), width(), height()), ind);
}
@@ -1757,7 +1757,7 @@ void Marquee::updateMarqueeStyle()
}
}
-void Marquee::timerEvent(QTimerEvent* /*evt*/)
+void Marquee::timerEvent(TQTimerEvent* /*evt*/)
{
if (m_layer->renderer()->needsLayout())
return;
diff --git a/khtml/rendering/render_layer.h b/khtml/rendering/render_layer.h
index c7587ae39..1f94ac95c 100644
--- a/khtml/rendering/render_layer.h
+++ b/khtml/rendering/render_layer.h
@@ -44,8 +44,8 @@
#ifndef render_layer_h
#define render_layer_h
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include <assert.h>
#include "render_object.h"
@@ -85,7 +85,7 @@ class Marquee: public QObject
public:
Marquee(RenderLayer* l);
- void timerEvent(QTimerEvent*);
+ void timerEvent(TQTimerEvent*);
int speed() const { return m_speed; }
int marqueeSpeed() const;
@@ -128,7 +128,7 @@ class RenderLayer
{
public:
#ifdef APPLE_CHANGES
- static QScrollBar* gScrollBar;
+ static TQScrollBar* gScrollBar;
#endif
RenderLayer(RenderObject* object);
@@ -194,11 +194,11 @@ public:
void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); }
void scrollToYOffset(int y) { scrollToOffset(m_scrollX, y); }
void showScrollbar(Qt::Orientation, bool);
- QScrollBar* horizontalScrollbar() { return m_hBar; }
- QScrollBar* verticalScrollbar() { return m_vBar; }
+ TQScrollBar* horizontalScrollbar() { return m_hBar; }
+ TQScrollBar* verticalScrollbar() { return m_vBar; }
int verticalScrollbarWidth();
int horizontalScrollbarHeight();
- void positionScrollbars(const QRect &damageRect);
+ void positionScrollbars(const TQRect &damageRect);
void paintScrollbars(RenderObject::PaintInfo& pI);
void checkScrollbarsAfterLayout();
void slotValueChanged(int);
@@ -215,17 +215,17 @@ public:
void dirtyZOrderLists();
void updateZOrderLists();
- QPtrVector<RenderLayer>* posZOrderList() const { return m_posZOrderList; }
- QPtrVector<RenderLayer>* negZOrderList() const { return m_negZOrderList; }
+ TQPtrVector<RenderLayer>* posZOrderList() const { return m_posZOrderList; }
+ TQPtrVector<RenderLayer>* negZOrderList() const { return m_negZOrderList; }
void dirtyOverflowList();
void updateOverflowList();
- QValueList<RenderLayer*>* overflowList() const { return m_overflowList; }
+ TQValueList<RenderLayer*>* overflowList() const { return m_overflowList; }
void setHasOverlaidWidgets(bool b=true) { m_hasOverlaidWidgets = b; }
bool hasOverlaidWidgets() const { return m_hasOverlaidWidgets; }
- QRegion getMask() const { return m_region; }
- QRegion paintedRegion(RenderLayer* rootLayer);
+ TQRegion getMask() const { return m_region; }
+ TQRegion paintedRegion(RenderLayer* rootLayer);
void updateWidgetMasks(RenderLayer* rootLayer);
// Gets the nearest enclosing positioned ancestor layer (also includes
@@ -241,26 +241,26 @@ public:
// paints the layers that intersect the damage rect from back to
// front. The nodeAtPoint method looks for mouse events by walking
// layers that intersect the point from front to back.
- KDE_EXPORT void paint(QPainter *p, const QRect& damageRect, bool selectionOnly=false);
+ KDE_EXPORT void paint(TQPainter *p, const TQRect& damageRect, bool selectionOnly=false);
bool nodeAtPoint(RenderObject::NodeInfo& info, int x, int y);
// This method figures out our layerBounds in coordinates relative to
// |rootLayer}. It also computes our background and foreground clip rects
// for painting/event handling.
- void calculateRects(const RenderLayer* rootLayer, const QRect& paintDirtyRect, QRect& layerBounds,
- QRect& backgroundRect, QRect& foregroundRect);
- void calculateClipRects(const RenderLayer* rootLayer, QRect& overflowClipRect,
- QRect& posClipRect, QRect& fixedClipRect);
+ void calculateRects(const RenderLayer* rootLayer, const TQRect& paintDirtyRect, TQRect& layerBounds,
+ TQRect& backgroundRect, TQRect& foregroundRect);
+ void calculateClipRects(const RenderLayer* rootLayer, TQRect& overflowClipRect,
+ TQRect& posClipRect, TQRect& fixedClipRect);
- bool intersectsDamageRect(const QRect& layerBounds, const QRect& damageRect) const;
- bool containsPoint(int x, int y, const QRect& damageRect) const;
+ bool intersectsDamageRect(const TQRect& layerBounds, const TQRect& damageRect) const;
+ bool containsPoint(int x, int y, const TQRect& damageRect) const;
void updateHoverActiveState(RenderObject::NodeInfo& info);
void detach(RenderArena* renderArena);
#ifdef ENABLE_DUMP
- KDE_EXPORT void dump(QTextStream &stream, const QString &ind = QString::null);
+ KDE_EXPORT void dump(TQTextStream &stream, const TQString &ind = TQString::null);
#endif
// Overloaded new operator. Derived classes must override operator new
@@ -281,11 +281,11 @@ private:
void setFirstChild(RenderLayer* first) { m_first = first; }
void setLastChild(RenderLayer* last) { m_last = last; }
- void collectLayers(QPtrVector<RenderLayer>*&, QPtrVector<RenderLayer>*&);
+ void collectLayers(TQPtrVector<RenderLayer>*&, TQPtrVector<RenderLayer>*&);
- KDE_EXPORT void paintLayer(RenderLayer* rootLayer, QPainter *p, const QRect& paintDirtyRect, bool selectionOnly=false);
+ KDE_EXPORT void paintLayer(RenderLayer* rootLayer, TQPainter *p, const TQRect& paintDirtyRect, bool selectionOnly=false);
RenderLayer* nodeAtPointForLayer(RenderLayer* rootLayer, RenderObject::NodeInfo& info,
- int x, int y, const QRect& hitTestRect);
+ int x, int y, const TQRect& hitTestRect);
bool shouldBeOverflowOnly() const;
protected:
@@ -311,19 +311,19 @@ protected:
int m_scrollHeight;
// For layers with overflow, we have a pair of scrollbars.
- QScrollBar* m_hBar;
- QScrollBar* m_vBar;
+ TQScrollBar* m_hBar;
+ TQScrollBar* m_vBar;
RenderScrollMediator* m_scrollMediator;
// For layers that establish stacking contexts, m_posZOrderList holds a sorted list of all the
// descendant layers within the stacking context that have z-indices of 0 or greater
// (auto will count as 0). m_negZOrderList holds descendants within our stacking context with negative
// z-indices.
- QPtrVector<RenderLayer>* m_posZOrderList;
- QPtrVector<RenderLayer>* m_negZOrderList;
+ TQPtrVector<RenderLayer>* m_posZOrderList;
+ TQPtrVector<RenderLayer>* m_negZOrderList;
// This list contains our overflow child layers.
- QValueList<RenderLayer*>* m_overflowList;
+ TQValueList<RenderLayer*>* m_overflowList;
bool m_zOrderListsDirty: 1;
bool m_overflowListDirty: 1;
@@ -331,9 +331,9 @@ protected:
bool m_markedForRepaint: 1;
bool m_hasOverlaidWidgets: 1;
- QRect m_visibleRect;
+ TQRect m_visibleRect;
- QRegion m_region; // used by overlaid (non z-order aware) widgets
+ TQRegion m_region; // used by overlaid (non z-order aware) widgets
Marquee* m_marquee; // Used by layers with overflow:marquee
};
diff --git a/khtml/rendering/render_line.cpp b/khtml/rendering/render_line.cpp
index 18a5f5101..f3b769e9c 100644
--- a/khtml/rendering/render_line.cpp
+++ b/khtml/rendering/render_line.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <assert.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include "rendering/render_flow.h"
@@ -102,7 +102,7 @@ void InlineBox::operator delete(void* ptr, size_t sz)
static bool needsOutlinePhaseRepaint(RenderObject* o, RenderObject::PaintInfo& i, int tx, int ty) {
if (o->style()->outlineWidth() <= 0)
return false;
- QRect r(tx+o->xPos(),ty+o->yPos(),o->width(),o->height());
+ TQRect r(tx+o->xPos(),ty+o->yPos(),o->width(),o->height());
if (r.intersects(i.r))
return false;
r.addCoords(-o->style()->outlineSize(),
@@ -184,8 +184,8 @@ bool InlineBox::canAccommodateEllipsisBox(bool ltr, int blockEdge, int ellipsisW
if (!m_object || !m_object->isReplaced())
return true;
- QRect boxRect(m_x, 0, m_width, 10);
- QRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
+ TQRect boxRect(m_x, 0, m_width, 10);
+ TQRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
return !(boxRect.intersects(ellipsisRect));
}
@@ -539,7 +539,7 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
int overflowTop = 0;
int overflowBottom = 0;
if (curr->isInlineTextBox() || curr->isInlineFlowBox()) {
- const QFontMetrics &fm = curr->object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = curr->object()->fontMetrics( m_firstLine );
#ifdef APPLE_CHANGES
newBaseline = fm.ascent();
newY += curr->baseline() - newBaseline;
@@ -580,7 +580,7 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
}
if (isRootInlineBox()) {
- const QFontMetrics &fm = object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = object()->fontMetrics( m_firstLine );
#ifdef APPLE_CHANGES
setHeight(fm.ascent()+fm.descent());
setYPos(yPos() + baseline() - fm.ascent());
@@ -635,7 +635,7 @@ bool InlineFlowBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx,
}
// Now check ourselves.
- QRect rect(tx + m_x, ty + m_y, m_width, m_height);
+ TQRect rect(tx + m_x, ty + m_y, m_width, m_height);
if (object()->style()->visibility() == VISIBLE && rect.contains(x, y)) {
object()->setInnerNode(i);
return true;
@@ -660,7 +660,7 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
if (object()->style()->visibility() == VISIBLE && object()->style()->outlineWidth() > 0 &&
!object()->isInlineContinuation() && !isRootInlineBox()) {
if (!i.outlineObjects)
- i.outlineObjects = new QValueList<RenderFlow*>;
+ i.outlineObjects = new TQValueList<RenderFlow*>;
i.outlineObjects->append(static_cast<RenderFlow*>(object()));
}
}
@@ -685,7 +685,7 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
}
-void InlineFlowBox::paintBackgrounds(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+void InlineFlowBox::paintBackgrounds(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h)
{
if (!bgLayer)
@@ -694,7 +694,7 @@ void InlineFlowBox::paintBackgrounds(QPainter* p, const QColor& c, const Backgro
paintBackground(p, c, bgLayer, my, mh, _tx, _ty, w, h);
}
-void InlineFlowBox::paintBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+void InlineFlowBox::paintBackground(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h)
{
CachedImage* bg = bgLayer->backgroundImage();
@@ -719,7 +719,7 @@ void InlineFlowBox::paintBackground(QPainter* p, const QColor& c, const Backgrou
for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
totalWidth += curr->width();
p->save();
- p->setClipRect(QRect(_tx, _ty, width(), height()), QPainter::CoordPainter);
+ p->setClipRect(TQRect(_tx, _ty, width(), height()), TQPainter::CoordPainter);
object()->paintBackgroundExtended(p, c, bgLayer, my, mh, startX, _ty,
totalWidth, h, borderLeft(), borderRight(), paddingLeft(), paddingRight());
p->restore();
@@ -750,7 +750,7 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& pI, int _t
RenderStyle* styleToUse = object()->style(m_firstLine);
if ((!parent() && m_firstLine && styleToUse != object()->style()) ||
(parent() && object()->shouldPaintBackgroundOrBorder())) {
- QColor c = styleToUse->backgroundColor();
+ TQColor c = styleToUse->backgroundColor();
paintBackgrounds(pI.p, c, styleToUse->backgroundLayers(), my, mh, _tx, _ty, w, h);
// :first-line cannot be used to put borders on a line. Always paint borders with our
@@ -797,10 +797,10 @@ void InlineFlowBox::paintDecorations(RenderObject::PaintInfo& pI, int _tx, int _
int w = m_width - (borderLeft() + paddingLeft() + borderRight() + paddingRight());
if ( !w )
return;
- const QFontMetrics &fm = object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = object()->fontMetrics( m_firstLine );
// thick lines on small fonts look ugly
int thickness = fm.height() > 20 ? fm.lineWidth() : 1;
- QColor underline, overline, linethrough;
+ TQColor underline, overline, linethrough;
underline = overline = linethrough = styleToUse->color();
if (!parent())
object()->getTextDecorationColors(deco, underline, overline, linethrough);
@@ -851,13 +851,13 @@ void InlineFlowBox::clearTruncation()
void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
{
- QPainter* p = i.p;
+ TQPainter* p = i.p;
RenderStyle* _style = m_firstLine ? m_object->style(true) : m_object->style();
if (_style->font() != p->font())
p->setFont(_style->font());
const Font* font = &_style->htmlFont();
- QColor textColor = _style->color();
+ TQColor textColor = _style->color();
if (textColor != p->pen().color())
p->setPen(textColor);
/*
@@ -874,7 +874,7 @@ void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
(str.implementation())->s,
str.length(), 0, str.length(),
0,
- QPainter::LTR, _style->visuallyOrdered());
+ TQPainter::LTR, _style->visuallyOrdered());
/*
if (setShadow)
@@ -901,7 +901,7 @@ bool EllipsisBox::nodeAtPoint(RenderObject::NodeInfo& info, int _x, int _y, int
}
}
- QRect rect(_tx + m_x, _ty + m_y, m_width, m_height);
+ TQRect rect(_tx + m_x, _ty + m_y, m_width, m_height);
if (object()->style()->visibility() == VISIBLE && rect.contains(_x, _y)) {
object()->setInnerNode(info);
return true;
diff --git a/khtml/rendering/render_line.h b/khtml/rendering/render_line.h
index 43603d362..d42f2acb8 100644
--- a/khtml/rendering/render_line.h
+++ b/khtml/rendering/render_line.h
@@ -205,9 +205,9 @@ public:
void removeFromLine(InlineBox* child);
virtual void paintBackgroundAndBorder(RenderObject::PaintInfo&, int _tx, int _ty);
- void paintBackgrounds(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+ void paintBackgrounds(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h);
- void paintBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+ void paintBackground(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h);
virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
virtual void paintDecorations(RenderObject::PaintInfo&, int _tx, int _ty, bool paintedChildren = false);
diff --git a/khtml/rendering/render_list.cpp b/khtml/rendering/render_list.cpp
index 139201e03..b08ec6eb9 100644
--- a/khtml/rendering/render_list.cpp
+++ b/khtml/rendering/render_list.cpp
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//#define BOX_DEBUG
@@ -238,12 +238,12 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if(shouldPaintBackgroundOrBorder())
paintBoxDecorations(paintInfo, _tx, _ty);
- QPainter* p = paintInfo.p;
+ TQPainter* p = paintInfo.p;
#ifdef DEBUG_LAYOUT
kdDebug( 6040 ) << nodeName().string() << "(ListMarker)::paintObject(" << _tx << ", " << _ty << ")" << endl;
#endif
p->setFont(style()->font());
- const QFontMetrics fm = p->fontMetrics();
+ const TQFontMetrics fm = p->fontMetrics();
// The marker needs to adjust its tx, for the case where it's an outside marker.
@@ -294,7 +294,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
xoff += haveImage ? cMarkerPadding : (m_width - bulletWidth);
if ( m_listImage && !m_listImage->isErrorImage()) {
- p->drawPixmap( QPoint( _tx + xoff, _ty ), m_listImage->pixmap());
+ p->drawPixmap( TQPoint( _tx + xoff, _ty ), m_listImage->pixmap());
return;
}
@@ -303,7 +303,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( _tx + xoff, _ty + yoff, offset, offset );
#endif
- const QColor color( style()->color() );
+ const TQColor color( style()->color() );
p->setPen( color );
switch(style()->listStyleType()) {
@@ -324,14 +324,14 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( _tx + xoff, _ty + (3 * yoff)/2, (offset>>1)+1, (offset>>1)+1 );
return;
case LDIAMOND: {
- static QPointArray diamond(4);
+ static TQPointArray diamond(4);
int x = _tx + xoff;
int y = _ty + (3 * yoff)/2 - 1;
int s = (offset>>2)+1;
- diamond[0] = QPoint(x+s, y);
- diamond[1] = QPoint(x+2*s, y+s);
- diamond[2] = QPoint(x+s, y+2*s);
- diamond[3] = QPoint(x, y+s);
+ diamond[0] = TQPoint(x+s, y);
+ diamond[1] = TQPoint(x+2*s, y+s);
+ diamond[2] = TQPoint(x+s, y+2*s);
+ diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->drawConvexPolygon( diamond, 0, 4 );
return;
@@ -344,21 +344,21 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if( style()->direction() == LTR) {
p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip,
- QString::fromLatin1(". "));
+ TQString::fromLatin1(". "));
}
else {
- const QString& punct(QString::fromLatin1(" ."));
+ const TQString& punct(TQString::fromLatin1(" ."));
p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
}
} else {
if (style()->direction() == LTR) {
- const QString& punct(QString::fromLatin1(". "));
+ const TQString& punct(TQString::fromLatin1(". "));
p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|Qt::DontClip, punct);
p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|Qt::DontClip, m_item);
}
else {
- const QString& punct(QString::fromLatin1(" ."));
+ const TQString& punct(TQString::fromLatin1(" ."));
p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
}
@@ -377,7 +377,7 @@ void RenderListMarker::layout()
setNeedsLayout(false);
}
-void RenderListMarker::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
+void RenderListMarker::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
{
if(o != m_listImage) {
RenderBox::setPixmap(p, r, o);
@@ -406,7 +406,7 @@ void RenderListMarker::calcMinMaxWidth()
return;
}
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
m_height = fm.ascent();
// Skip uncounted elements
@@ -452,7 +452,7 @@ void RenderListMarker::calcMinMaxWidth()
decimals++;
}
decimals = kMax(decimals, 2);
- QString num = QString::number(value);
+ TQString num = TQString::number(value);
m_item.fill('0',decimals-num.length());
m_item.append(num);
break;
@@ -543,7 +543,7 @@ void RenderListMarker::calcMinMaxWidth()
default:
KHTMLAssert(false);
}
- m_markerWidth = fm.width(m_item) + fm.width(QString::fromLatin1(". "));
+ m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". "));
}
end:
diff --git a/khtml/rendering/render_list.h b/khtml/rendering/render_list.h
index ff4e24842..b70132671 100644
--- a/khtml/rendering/render_list.h
+++ b/khtml/rendering/render_list.h
@@ -99,7 +99,7 @@ public:
virtual short lineHeight( bool firstLine ) const;
virtual short baselinePosition( bool firstLine ) const;
- virtual void setPixmap( const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap( const TQPixmap &, const TQRect&, CachedImage *);
virtual void calcWidth();
@@ -116,7 +116,7 @@ public:
protected:
friend class RenderListItem;
- QString m_item;
+ TQString m_item;
CachedImage *m_listImage;
short m_markerWidth;
RenderListItem* m_listItem;
diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp
index dfb2e06df..c1f7fd754 100644
--- a/khtml/rendering/render_object.cpp
+++ b/khtml/rendering/render_object.cpp
@@ -46,7 +46,7 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "khtmlview.h"
#include <khtml_part.h>
@@ -528,7 +528,7 @@ bool RenderObject::hasStaticY() const
return (style()->top().isVariable() && style()->bottom().isVariable());
}
-void RenderObject::setPixmap(const QPixmap&, const QRect& /*r*/, CachedImage* image)
+void RenderObject::setPixmap(const TQPixmap&, const TQRect& /*r*/, CachedImage* image)
{
//repaint bg when it finished loading
if(image && parent() && style() && style()->backgroundLayers()->containsImage(image)) {
@@ -688,7 +688,7 @@ static int brightness(int red, int green, int blue)
(luminosity * LUMINOSITY_FACTOR)) / 100;
}
-static void calc3DColor(QColor &color, bool darken)
+static void calc3DColor(TQColor &color, bool darken)
{
int rb = color.red();
int gb = color.green();
@@ -731,8 +731,8 @@ static void calc3DColor(QColor &color, bool darken)
}
}
-void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
- BorderSide s, QColor c, const QColor& textcolor, EBorderStyle style,
+void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
+ BorderSide s, TQColor c, const TQColor& textcolor, EBorderStyle style,
int adjbw1, int adjbw2, bool invalidisInvert)
{
int width = (s==BSTop||s==BSBottom?y2-y1:x2-x1);
@@ -768,7 +768,7 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
case DOTTED:
if ( width == 1 ) {
// workaround Qt brokenness
- p->setPen(QPen(c, width, Qt::SolidLine));
+ p->setPen(TQPen(c, width, Qt::SolidLine));
switch(s) {
case BSBottom:
case BSTop:
@@ -783,11 +783,11 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
break;
}
- p->setPen(QPen(c, width, Qt::DotLine));
+ p->setPen(TQPen(c, width, Qt::DotLine));
/* nobreak; */
case DASHED:
if(style == DASHED)
- p->setPen(QPen(c, width == 1 ? 0 : width, width == 1 ? Qt::DotLine : Qt::DashLine));
+ p->setPen(TQPen(c, width == 1 ? 0 : width, width == 1 ? Qt::DotLine : Qt::DashLine));
if (width > 0)
switch(s) {
@@ -924,7 +924,7 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
p->drawRect(x1,y1,x2-x1,y2-y1);
return;
}
- QPointArray quad(4);
+ TQPointArray quad(4);
switch(s) {
case BSTop:
quad.setPoints(4,
@@ -963,12 +963,12 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
p->setRasterOp(Qt::CopyROP);
}
-void RenderObject::paintBorder(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
+void RenderObject::paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
{
- const QColor& tc = style->borderTopColor();
- const QColor& bc = style->borderBottomColor();
- const QColor& lc = style->borderLeftColor();
- const QColor& rc = style->borderRightColor();
+ const TQColor& tc = style->borderTopColor();
+ const TQColor& bc = style->borderBottomColor();
+ const TQColor& lc = style->borderLeftColor();
+ const TQColor& rc = style->borderRightColor();
bool tt = style->borderTopIsTransparent();
bool bt = style->borderBottomIsTransparent();
@@ -1052,12 +1052,12 @@ void RenderObject::paintBorder(QPainter *p, int _tx, int _ty, int w, int h, cons
}
}
-void RenderObject::paintOutline(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style)
+void RenderObject::paintOutline(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style)
{
int ow = style->outlineWidth();
if(!ow) return;
- const QColor& oc = style->outlineColor();
+ const TQColor& oc = style->outlineColor();
EBorderStyle os = style->outlineStyle();
int offset = style->outlineOffset();
@@ -1077,19 +1077,19 @@ void RenderObject::paintOutline(QPainter *p, int _tx, int _ty, int w, int h, con
h += 2*offset;
drawBorder(p, _tx-ow, _ty-ow, _tx, _ty+h+ow, BSLeft,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx-ow, _ty-ow, _tx+w+ow, _ty, BSTop,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx+w, _ty-ow, _tx+w+ow, _ty+h+ow, BSRight,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx-ow, _ty+h, _tx+w+ow, _ty+h+ow, BSBottom,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
}
@@ -1105,14 +1105,14 @@ void RenderObject::repaintRectangle(int x, int y, int w, int h, Priority p, bool
#ifdef ENABLE_DUMP
-QString RenderObject::information() const
+TQString RenderObject::information() const
{
- QString str;
+ TQString str;
int x; int y;
absolutePosition(x,y);
x += inlineXPos();
y += inlineYPos();
- QTextStream ts( &str, IO_WriteOnly );
+ TQTextStream ts( &str, IO_WriteOnly );
ts << renderName()
<< "(" << (style() ? style()->refCount() : 0) << ")"
<< ": " << (void*)this << " ";
@@ -1139,7 +1139,7 @@ QString RenderObject::information() const
} else if (isPseudoAnonymous() && style() && style()->styleType() != RenderStyle::NOPSEUDO) {
ts << " <" << getTagName(node()->id());
- QString pseudo;
+ TQString pseudo;
switch (style()->styleType()) {
case RenderStyle::FIRST_LETTER:
pseudo = ":first-letter"; break;
@@ -1159,27 +1159,27 @@ QString RenderObject::information() const
<< " mB: " << marginBottom() << " qB: " << isBottomMarginQuirk()
<< "}"
<< (isTableCell() ?
- ( QString::fromLatin1(" [r=") +
- QString::number( static_cast<const RenderTableCell *>(this)->row() ) +
- QString::fromLatin1(" c=") +
- QString::number( static_cast<const RenderTableCell *>(this)->col() ) +
- QString::fromLatin1(" rs=") +
- QString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) +
- QString::fromLatin1(" cs=") +
- QString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) +
- QString::fromLatin1("]") ) : QString::null );
+ ( TQString::fromLatin1(" [r=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->row() ) +
+ TQString::fromLatin1(" c=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->col() ) +
+ TQString::fromLatin1(" rs=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) +
+ TQString::fromLatin1(" cs=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) +
+ TQString::fromLatin1("]") ) : TQString::null );
if ( layer() )
ts << " layer=" << layer();
if ( continuation() )
ts << " continuation=" << continuation();
if (isText())
- ts << " \"" << QConstString(static_cast<const RenderText *>(this)->text(), kMin(static_cast<const RenderText *>(this)->length(), 10u)).string() << "\"";
+ ts << " \"" << TQConstString(static_cast<const RenderText *>(this)->text(), kMin(static_cast<const RenderText *>(this)->length(), 10u)).string() << "\"";
return str;
}
void RenderObject::printTree(int indent) const
{
- QString ind;
+ TQString ind;
ind.fill(' ', indent);
kdDebug() << ind << information() << endl;
@@ -1192,17 +1192,17 @@ void RenderObject::printTree(int indent) const
}
}
-static QTextStream &operator<<(QTextStream &ts, const QRect &r)
+static TQTextStream &operator<<(TQTextStream &ts, const TQRect &r)
{
return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
}
//A bit like getTagName, but handles XML, too.
-static QString lookupTagName(NodeImpl* node) {
+static TQString lookupTagName(NodeImpl* node) {
return node->getDocument()->getName(NodeImpl::ElementId, node->id()).string();
}
-void RenderObject::dump(QTextStream &ts, const QString &ind) const
+void RenderObject::dump(TQTextStream &ts, const TQString &ind) const
{
if ( !layer() )
ts << endl;
@@ -1214,13 +1214,13 @@ void RenderObject::dump(QTextStream &ts, const QString &ind) const
}
if (element()) {
- QString tagName(lookupTagName(element()));
+ TQString tagName(lookupTagName(element()));
if (!tagName.isEmpty()) {
ts << " {" << tagName << "}";
}
} else if (isPseudoAnonymous() && style() && style()->styleType() != RenderStyle::NOPSEUDO) {
- QString pseudo;
- QString tagName(lookupTagName(node()));
+ TQString pseudo;
+ TQString tagName(lookupTagName(node()));
switch (style()->styleType()) {
case RenderStyle::FIRST_LETTER:
pseudo = ":first-letter"; break;
@@ -1234,7 +1234,7 @@ void RenderObject::dump(QTextStream &ts, const QString &ind) const
ts << " {" << tagName << pseudo << "}";
}
- QRect r(xPos(), yPos(), width(), height());
+ TQRect r(xPos(), yPos(), width(), height());
ts << " " << r;
if ( parent() )
@@ -1481,7 +1481,7 @@ void RenderObject::updateBackgroundImages(RenderStyle* oldStyle)
}
}
-QRect RenderObject::viewRect() const
+TQRect RenderObject::viewRect() const
{
return containingBlock()->viewRect();
}
@@ -1705,7 +1705,7 @@ FindSelectionResult RenderObject::checkSelectionPoint( int _x, int _y, int _tx,
if (child->isText() && !static_cast<RenderText *>(child)->inlineTextBoxCount())
continue;
-// kdDebug(6040) << "iterating " << (child ? child->renderName() : "") << "@" << child << (child->isText() ? " contains: \"" + QConstString(static_cast<RenderText *>(child)->text(), kMin(static_cast<RenderText *>(child)->length(), 10u)).string() + "\"" : QString::null) << endl;
+// kdDebug(6040) << "iterating " << (child ? child->renderName() : "") << "@" << child << (child->isText() ? " contains: \"" + TQConstString(static_cast<RenderText *>(child)->text(), kMin(static_cast<RenderText *>(child)->length(), 10u)).string() + "\"" : TQString::null) << endl;
// kdDebug(6040) << "---------- checkSelectionPoint recursive -----------" << endl;
khtml::FindSelectionResult pos = child->checkSelectionPoint(_x, _y, _tx+xPos(), _ty+yPos(), nod, off, state);
// kdDebug(6040) << "-------- end checkSelectionPoint recursive ---------" << endl;
@@ -1773,7 +1773,7 @@ bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
if ( !inOverflowRect ) {
int ol = overflowLeft();
int ot = overflowTop();
- QRect overflowRect( tx+ol, ty+ot, overflowWidth()-ol, overflowHeight()-ot );
+ TQRect overflowRect( tx+ol, ty+ot, overflowWidth()-ol, overflowHeight()-ot );
inOverflowRect = overflowRect.contains( _x, _y );
}
@@ -1851,7 +1851,7 @@ short RenderObject::getVerticalPosition( bool firstLine, RenderObject* ref ) con
else if ( va == LENGTH )
return vpos - style()->verticalAlignLength().width( lineHeight( firstLine ) );
- const QFont &f = ref->font( firstLine );
+ const TQFont &f = ref->font( firstLine );
int fontsize = f.pixelSize();
if ( va == SUB )
@@ -1859,12 +1859,12 @@ short RenderObject::getVerticalPosition( bool firstLine, RenderObject* ref ) con
else if ( va == SUPER )
vpos -= fontsize/3 + 1;
else if ( va == TEXT_TOP ) {
- vpos += baselinePosition( firstLine ) - (QFontMetrics(f).ascent() + QFontMetrics(f).leading()/2);
+ vpos += baselinePosition( firstLine ) - (TQFontMetrics(f).ascent() + TQFontMetrics(f).leading()/2);
} else if ( va == MIDDLE ) {
- QRect b = QFontMetrics(f).boundingRect('x');
+ TQRect b = TQFontMetrics(f).boundingRect('x');
vpos += -b.height()/2 - lineHeight( firstLine )/2 + baselinePosition( firstLine );
} else if ( va == TEXT_BOTTOM ) {
- vpos += QFontMetrics(f).descent() + QFontMetrics(f).leading()/2;
+ vpos += TQFontMetrics(f).descent() + TQFontMetrics(f).leading()/2;
if ( !isReplaced() )
vpos -= fontMetrics(firstLine).descent();
} else if ( va == BASELINE_MIDDLE )
@@ -1914,7 +1914,7 @@ short RenderObject::baselinePosition( bool firstLine ) const
if (isReplaced() && (!isInlineBlockOrInlineTable() || !needsLayout()))
return height()+marginTop()+marginBottom();
- const QFontMetrics &fm = fontMetrics( firstLine );
+ const TQFontMetrics &fm = fontMetrics( firstLine );
return fm.ascent() + ( lineHeight( firstLine) - fm.height() ) / 2;
}
@@ -1985,8 +1985,8 @@ InlineBox* RenderObject::createInlineBox(bool /*makePlaceHolderBox*/, bool /*isR
return 0;
}
-void RenderObject::getTextDecorationColors(int decorations, QColor& underline, QColor& overline,
- QColor& linethrough, bool quirksMode)
+void RenderObject::getTextDecorationColors(int decorations, TQColor& underline, TQColor& overline,
+ TQColor& linethrough, bool quirksMode)
{
RenderObject* curr = this;
do {
@@ -2031,7 +2031,7 @@ int RenderObject::maximalOutlineSize(PaintAction p) const
return static_cast<RenderCanvas*>(document()->renderer())->maximalOutlineSize();
}
-void RenderObject::collectBorders(QValueList<CollapsedBorderValue>& borderStyles)
+void RenderObject::collectBorders(TQValueList<CollapsedBorderValue>& borderStyles)
{
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
curr->collectBorders(borderStyles);
@@ -2052,7 +2052,7 @@ bool RenderObject::usesLineWidth() const
return (flowAroundFloats() && (style()->width().isVariable() || isHR() || (style()->htmlHacks() && !isTable())));
}
-bool RenderObject::hasCounter(const QString& counter) const
+bool RenderObject::hasCounter(const TQString& counter) const
{
if (style() && (!isText() || isCounter())) {
if (lookupCounter(counter)) return true;
@@ -2078,7 +2078,7 @@ bool RenderObject::hasCounter(const QString& counter) const
return false;
}
-CounterNode* RenderObject::getCounter(const QString& counter, bool view, bool counters)
+CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool counters)
{
// kdDebug( 6040 ) << renderName() << " getCounter(" << counter << ")" << endl;
@@ -2214,9 +2214,9 @@ CounterNode* RenderObject::getCounter(const QString& counter, bool view, bool co
return i;
}
-CounterNode* RenderObject::lookupCounter(const QString& counter) const
+CounterNode* RenderObject::lookupCounter(const TQString& counter) const
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (counters)
return counters->find(counter);
else
@@ -2225,10 +2225,10 @@ CounterNode* RenderObject::lookupCounter(const QString& counter) const
void RenderObject::detachCounters()
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (!counters) return;
- QDictIterator<khtml::CounterNode> i(*counters);
+ TQDictIterator<khtml::CounterNode> i(*counters);
while (i.current()) {
(*i)->remove();
@@ -2238,12 +2238,12 @@ void RenderObject::detachCounters()
document()->removeCounters(this);
}
-void RenderObject::insertCounter(const QString& counter, CounterNode* val)
+void RenderObject::insertCounter(const TQString& counter, CounterNode* val)
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (!counters) {
- counters = new QDict<khtml::CounterNode>(11);
+ counters = new TQDict<khtml::CounterNode>(11);
document()->setCounters(this, counters);
}
@@ -2253,22 +2253,22 @@ void RenderObject::insertCounter(const QString& counter, CounterNode* val)
void RenderObject::updateWidgetMasks() {
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if ( curr->isWidget() && static_cast<RenderWidget*>(curr)->needsMask() ) {
- QWidget* w = static_cast<RenderWidget*>(curr)->widget();
+ TQWidget* w = static_cast<RenderWidget*>(curr)->widget();
if (!w)
return;
RenderLayer* l = curr->enclosingStackingContext();
- QRegion r = l ? l->getMask() : QRegion();
+ TQRegion r = l ? l->getMask() : TQRegion();
int x,y;
if (!r.isNull() && curr->absolutePosition(x,y)) {
int pbx = curr->borderLeft()+curr->paddingLeft();
int pby = curr->borderTop()+curr->paddingTop();
x+= pbx;
y+= pby;
- r = r.intersect(QRect(x,y,
+ r = r.intersect(TQRect(x,y,
curr->width()-pbx-curr->borderRight()-curr->paddingRight(),
curr->height()-pby-curr->borderBottom()-curr->paddingBottom()));
#ifdef MASK_DEBUG
- QMemArray<QRect> ar = r.rects();
+ TQMemArray<TQRect> ar = r.rects();
kdDebug(6040) << "|| Setting widget mask for " << curr->information() << endl;
for (int i = 0; i < ar.size() ; ++i) {
kdDebug(6040) << " " << ar[i] << endl;
@@ -2286,16 +2286,16 @@ void RenderObject::updateWidgetMasks() {
}
}
-QRegion RenderObject::visibleFlowRegion(int x, int y) const
+TQRegion RenderObject::visibleFlowRegion(int x, int y) const
{
- QRegion r;
+ TQRegion r;
for (RenderObject* ro=firstChild();ro;ro=ro->nextSibling()) {
if( !ro->layer() && !ro->isInlineFlow() && ro->style()->visibility() == VISIBLE) {
const RenderStyle *s = ro->style();
if (ro->isRelPositioned())
static_cast<const RenderBox*>(ro)->relativePositionOffset(x,y);
if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() )
- r += QRect(x + ro->effectiveXPos(),y + ro->effectiveYPos(), ro->effectiveWidth(), ro->effectiveHeight());
+ r += TQRect(x + ro->effectiveXPos(),y + ro->effectiveYPos(), ro->effectiveWidth(), ro->effectiveHeight());
else
r += ro->visibleFlowRegion(x+ro->xPos(), y+ro->yPos());
}
diff --git a/khtml/rendering/render_object.h b/khtml/rendering/render_object.h
index 6b98a5fa4..64cb581b3 100644
--- a/khtml/rendering/render_object.h
+++ b/khtml/rendering/render_object.h
@@ -26,10 +26,10 @@
#ifndef render_object_h
#define render_object_h
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include <assert.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -169,9 +169,9 @@ public:
}
// ### rename to overflowClipRect and clipRect
- virtual QRect getOverflowClipRect(int /*tx*/, int /*ty*/)
- { return QRect(0,0,0,0); }
- virtual QRect getClipRect(int /*tx*/, int /*ty*/) { return QRect(0,0,0,0); }
+ virtual TQRect getOverflowClipRect(int /*tx*/, int /*ty*/)
+ { return TQRect(0,0,0,0); }
+ virtual TQRect getClipRect(int /*tx*/, int /*ty*/) { return TQRect(0,0,0,0); }
bool hasClip() const { return isPositioned() && style()->hasClip(); }
bool hasOverflowClip() const { return m_hasOverflowClip; }
@@ -192,17 +192,17 @@ public:
RenderObject *objectAbove() const;
// Returns if an object has counter-increment or counter-reset
- bool hasCounter(const QString& counter) const;
+ bool hasCounter(const TQString& counter) const;
// Calculates the value of the counter
- CounterNode* getCounter(const QString& counter, bool view = false, bool counters = false);
+ CounterNode* getCounter(const TQString& counter, bool view = false, bool counters = false);
// Detaches all counterNodes
void detachCounters();
protected:
// Helper functions for counter-cache
- void insertCounter(const QString& counter, CounterNode* value);
- CounterNode* lookupCounter(const QString& counter) const;
+ void insertCounter(const TQString& counter, CounterNode* value);
+ CounterNode* lookupCounter(const TQString& counter) const;
public:
//////////////////////////////////////////
@@ -226,9 +226,9 @@ public:
public:
virtual const char *renderName() const { return "RenderObject"; }
#ifdef ENABLE_DUMP
- QString information() const;
+ TQString information() const;
virtual void printTree(int indent=0) const;
- virtual void dump(QTextStream &stream, const QString &ind = QString::null) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind = TQString::null) const;
#endif
static RenderObject *createObject(DOM::NodeImpl* node, RenderStyle* style);
@@ -372,22 +372,22 @@ public:
* (tx|ty) is the calculated position of the parent
*/
struct PaintInfo {
- PaintInfo(QPainter* _p, const QRect& _r, PaintAction _phase)
+ PaintInfo(TQPainter* _p, const TQRect& _r, PaintAction _phase)
: p(_p), r(_r), phase(_phase), outlineObjects(0) {}
~PaintInfo() { delete outlineObjects; }
- QPainter* p;
- QRect r;
+ TQPainter* p;
+ TQRect r;
PaintAction phase;
- QValueList<RenderFlow *>* outlineObjects; // used to list which outlines should be painted by a block with inline children
+ TQValueList<RenderFlow *>* outlineObjects; // used to list which outlines should be painted by a block with inline children
};
virtual void paint( PaintInfo& i, int tx, int ty);
- void paintBorder(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin=true, bool end=true);
- void paintOutline(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style);
+ void paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin=true, bool end=true);
+ void paintOutline(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style);
virtual void paintBoxDecorations(PaintInfo&, int /*_tx*/, int /*_ty*/) {}
- virtual void paintBackgroundExtended(QPainter* /*p*/, const QColor& /*c*/, const BackgroundLayer */*bgLayer*/,
+ virtual void paintBackgroundExtended(TQPainter* /*p*/, const TQColor& /*c*/, const BackgroundLayer */*bgLayer*/,
int /*clipy*/, int /*cliph*/, int /*_tx*/, int /*_ty*/,
int /*w*/, int /*height*/, int /*bleft*/, int /*bright*/, int /*pleft*/, int /*pright*/ ) {}
@@ -667,18 +667,18 @@ public:
return s;
}
- void getTextDecorationColors(int decorations, QColor& underline, QColor& overline,
- QColor& linethrough, bool quirksMode=false);
+ void getTextDecorationColors(int decorations, TQColor& underline, TQColor& overline,
+ TQColor& linethrough, bool quirksMode=false);
enum BorderSide {
BSTop, BSBottom, BSLeft, BSRight
};
- void drawBorder(QPainter *p, int x1, int y1, int x2, int y2, BorderSide s,
- QColor c, const QColor& textcolor, EBorderStyle style,
+ void drawBorder(TQPainter *p, int x1, int y1, int x2, int y2, BorderSide s,
+ TQColor c, const TQColor& textcolor, EBorderStyle style,
int adjbw1, int adjbw2, bool invalidisInvert = false);
// Used by collapsed border tables.
- virtual void collectBorders(QValueList<CollapsedBorderValue>& borderStyles);
+ virtual void collectBorders(TQValueList<CollapsedBorderValue>& borderStyles);
// force a complete repaint
virtual void repaint(Priority p = NormalPriority) { if(m_parent) m_parent->repaint(p); }
@@ -758,11 +758,11 @@ public:
void setDoNotDelete(bool b) { m_doNotDelete = b; }
bool doNotDelete() const { return m_doNotDelete; }
- const QFont &font(bool firstLine) const {
+ const TQFont &font(bool firstLine) const {
return style( firstLine )->font();
}
- const QFontMetrics &fontMetrics(bool firstLine) const {
+ const TQFontMetrics &fontMetrics(bool firstLine) const {
return style( firstLine )->fontMetrics();
}
@@ -780,14 +780,14 @@ public:
*/
virtual long maxOffset() const { return 0; }
- virtual void setPixmap(const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap(const TQPixmap &, const TQRect&, CachedImage *);
- QRegion visibleFlowRegion(int x, int y) const;
+ TQRegion visibleFlowRegion(int x, int y) const;
protected:
virtual void selectionStartEnd(int& spos, int& epos);
- virtual QRect viewRect() const;
+ virtual TQRect viewRect() const;
void remove();
void invalidateVerticalPositions();
bool attemptDirectLayerTranslation();
diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp
index a74338e29..157d1b76d 100644
--- a/khtml/rendering/render_replaced.cpp
+++ b/khtml/rendering/render_replaced.cpp
@@ -30,14 +30,14 @@
#include "render_arena.h"
#include <assert.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qapplication.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqapplication.h>
+#include <tqlineedit.h>
#include <kglobalsettings.h>
-#include <qobjectlist.h>
-#include <qvaluevector.h>
+#include <tqobjectlist.h>
+#include <tqvaluevector.h>
#include "khtml_ext.h"
#include "khtmlview.h"
@@ -142,9 +142,9 @@ RenderWidget::~RenderWidget()
class QWidgetResizeEvent : public QEvent
{
public:
- enum { Type = QEvent::User + 0xbee };
+ enum { Type = TQEvent::User + 0xbee };
QWidgetResizeEvent( int _w, int _h ) :
- QEvent( ( QEvent::Type ) Type ), w( _w ), h( _h ) {}
+ TQEvent( ( TQEvent::Type ) Type ), w( _w ), h( _h ) {}
int w;
int h;
};
@@ -160,7 +160,7 @@ void RenderWidget::resizeWidget( int w, int h )
m_resizePending = isKHTMLWidget();
ref();
element()->ref();
- QApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
+ TQApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
element()->deref();
deref();
}
@@ -171,13 +171,13 @@ void RenderWidget::cancelPendingResize()
if (!m_widget)
return;
m_discardResizes = true;
- QApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
+ TQApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
m_discardResizes = false;
}
-bool RenderWidget::event( QEvent *e )
+bool RenderWidget::event( TQEvent *e )
{
- if ( m_widget && (e->type() == (QEvent::Type)QWidgetResizeEvent::Type) ) {
+ if ( m_widget && (e->type() == (TQEvent::Type)QWidgetResizeEvent::Type) ) {
m_resizePending = false;
if (m_discardResizes)
return true;
@@ -187,36 +187,36 @@ bool RenderWidget::event( QEvent *e )
}
// eat all events - except if this is a frame (in which case KHTMLView handles it all)
if ( ::qt_cast<KHTMLView *>( m_widget ) )
- return QObject::event( e );
+ return TQObject::event( e );
return true;
}
void RenderWidget::flushWidgetResizes() //static
{
- QApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
+ TQApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
}
-void RenderWidget::setQWidget(QWidget *widget)
+void RenderWidget::setQWidget(TQWidget *widget)
{
if (widget != m_widget)
{
if (m_widget) {
m_widget->removeEventFilter(this);
- disconnect( m_widget, SIGNAL( destroyed()), this, SLOT( slotWidgetDestructed()));
+ disconnect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed()));
m_widget->hide();
m_widget->deleteLater(); //Might happen due to event on the widget, so be careful
m_widget = 0;
}
m_widget = widget;
if (m_widget) {
- connect( m_widget, SIGNAL( destroyed()), this, SLOT( slotWidgetDestructed()));
+ connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed()));
m_widget->installEventFilter(this);
- if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::qt_cast<QFrame*>(m_widget))
- m_widget->setBackgroundMode( QWidget::NoBackground );
+ if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::qt_cast<TQFrame*>(m_widget))
+ m_widget->setBackgroundMode( TQWidget::NoBackground );
- if (m_widget->focusPolicy() > QWidget::StrongFocus)
- m_widget->setFocusPolicy(QWidget::StrongFocus);
+ if (m_widget->focusPolicy() > TQWidget::StrongFocus)
+ m_widget->setFocusPolicy(TQWidget::StrongFocus);
// if we've already received a layout, apply the calculated space to the
// widget immediately, but we have to have really been full constructed (with a non-null
// style pointer).
@@ -266,11 +266,11 @@ void RenderWidget::updateFromElement()
{
if (m_widget) {
// Color:
- QColor color = style()->color();
- QColor backgroundColor = style()->backgroundColor();
+ TQColor color = style()->color();
+ TQColor backgroundColor = style()->backgroundColor();
if ( color.isValid() || backgroundColor.isValid() ) {
- QPalette pal(QApplication::palette(m_widget));
+ TQPalette pal(TQApplication::palette(m_widget));
int contrast_ = KGlobalSettings::contrast();
int highlightVal = 100 + (2*contrast_+4)*16/10;
@@ -279,38 +279,38 @@ void RenderWidget::updateFromElement()
if (backgroundColor.isValid()) {
if (!isKHTMLWidget())
widget()->setEraseColor(backgroundColor );
- for ( int i = 0; i < QPalette::NColorGroups; ++i ) {
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Background, backgroundColor );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Light, backgroundColor.light(highlightVal) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Dark, backgroundColor.dark(lowlightVal) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Mid, backgroundColor.dark(120) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Midlight, backgroundColor.light(110) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Button, backgroundColor );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Base, backgroundColor );
+ for ( int i = 0; i < TQPalette::NColorGroups; ++i ) {
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Background, backgroundColor );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Light, backgroundColor.light(highlightVal) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Dark, backgroundColor.dark(lowlightVal) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Mid, backgroundColor.dark(120) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Midlight, backgroundColor.light(110) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Button, backgroundColor );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Base, backgroundColor );
}
}
if ( color.isValid() ) {
struct ColorSet {
- QPalette::ColorGroup cg;
- QColorGroup::ColorRole cr;
+ TQPalette::ColorGroup cg;
+ TQColorGroup::ColorRole cr;
};
const struct ColorSet toSet [] = {
- { QPalette::Active, QColorGroup::Foreground },
- { QPalette::Active, QColorGroup::ButtonText },
- { QPalette::Active, QColorGroup::Text },
- { QPalette::Inactive, QColorGroup::Foreground },
- { QPalette::Inactive, QColorGroup::ButtonText },
- { QPalette::Inactive, QColorGroup::Text },
- { QPalette::Disabled,QColorGroup::ButtonText },
- { QPalette::NColorGroups, QColorGroup::NColorRoles },
+ { TQPalette::Active, TQColorGroup::Foreground },
+ { TQPalette::Active, TQColorGroup::ButtonText },
+ { TQPalette::Active, TQColorGroup::Text },
+ { TQPalette::Inactive, TQColorGroup::Foreground },
+ { TQPalette::Inactive, TQColorGroup::ButtonText },
+ { TQPalette::Inactive, TQColorGroup::Text },
+ { TQPalette::Disabled,TQColorGroup::ButtonText },
+ { TQPalette::NColorGroups, TQColorGroup::NColorRoles },
};
const ColorSet *set = toSet;
- while( set->cg != QPalette::NColorGroups ) {
+ while( set->cg != TQPalette::NColorGroups ) {
pal.setColor( set->cg, set->cr, color );
++set;
}
- QColor disfg = color;
+ TQColor disfg = color;
int h, s, v;
disfg.hsv( &h, &s, &v );
if (v > 128)
@@ -322,7 +322,7 @@ void RenderWidget::updateFromElement()
else
// black fg - use darkgray disabled fg
disfg = Qt::darkGray;
- pal.setColor(QPalette::Disabled,QColorGroup::Foreground,disfg);
+ pal.setColor(TQPalette::Disabled,TQColorGroup::Foreground,disfg);
}
m_widget->setPalette(pal);
@@ -330,11 +330,11 @@ void RenderWidget::updateFromElement()
else
m_widget->unsetPalette();
// Border:
- QFrame* frame = ::qt_cast<QFrame*>(m_widget);
+ TQFrame* frame = ::qt_cast<TQFrame*>(m_widget);
if (frame) {
if (shouldPaintBackgroundOrBorder())
{
- frame->setFrameShape(QFrame::NoFrame);
+ frame->setFrameShape(TQFrame::NoFrame);
}
}
@@ -455,7 +455,7 @@ public:
static const int maxPixelBuffering = 320*200;
static const int leaseTime = 20*1000;
- static QPixmap *grab( QSize s = QSize() ) {
+ static TQPixmap *grab( TQSize s = TQSize() ) {
if (!m_inst)
m_inst = new PaintBuffer;
return m_inst->getBuf( s );
@@ -464,7 +464,7 @@ public:
protected:
PaintBuffer(): m_overflow(false), m_grabbed(false),
m_timer(0), m_resetWidth(0), m_resetHeight(0) {};
- void timerEvent(QTimerEvent* e) {
+ void timerEvent(TQTimerEvent* e) {
assert( m_timer == e->timerId() );
if (m_grabbed)
return;
@@ -474,7 +474,7 @@ protected:
m_timer = 0;
}
- QPixmap *getBuf( QSize s ) {
+ TQPixmap *getBuf( TQSize s ) {
assert( !m_grabbed );
if (s.isEmpty())
return 0;
@@ -509,7 +509,7 @@ protected:
}
private:
static PaintBuffer* m_inst;
- QPixmap m_buf;
+ TQPixmap m_buf;
bool m_overflow;
bool m_grabbed;
int m_timer;
@@ -519,21 +519,21 @@ private:
PaintBuffer *PaintBuffer::m_inst = 0;
-static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int ty)
+static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx, int ty)
{
if (r.isNull() || r.isEmpty() )
return;
- QRegion blit(r);
- QValueVector<QWidget*> cw;
- QValueVector<QRect> cr;
+ TQRegion blit(r);
+ TQValueVector<TQWidget*> cw;
+ TQValueVector<TQRect> cr;
if (widget->children()) {
// build region
- QObjectListIterator it = *widget->children();
+ TQObjectListIterator it = *widget->children();
for (; it.current(); ++it) {
- QWidget* const w = ::qt_cast<QWidget *>(it.current());
+ TQWidget* const w = ::qt_cast<TQWidget *>(it.current());
if ( w && !w->isTopLevel() && !w->isHidden()) {
- QRect r2 = w->geometry();
+ TQRect r2 = w->geometry();
blit -= r2;
r2 = r2.intersect( r );
r2.moveBy(-w->x(), -w->y());
@@ -542,11 +542,11 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
}
}
}
- QMemArray<QRect> br = blit.rects();
+ TQMemArray<TQRect> br = blit.rects();
const int cnt = br.size();
const bool external = p->device()->isExtDev();
- QPixmap* const pm = PaintBuffer::grab( widget->size() );
+ TQPixmap* const pm = PaintBuffer::grab( widget->size() );
if (!pm)
{
kdWarning(6040) << "Rendering widget [ " << widget->className() << " ] failed due to invalid size." << endl;
@@ -556,12 +556,12 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
// fill background
if ( external ) {
// even hackier!
- QPainter pt( pm );
- const QColor c = widget->colorGroup().base();
+ TQPainter pt( pm );
+ const TQColor c = widget->colorGroup().base();
for (int i = 0; i < cnt; ++i)
pt.fillRect( br[i], c );
} else {
- QRect dr;
+ TQRect dr;
for (int i = 0; i < cnt; ++i ) {
dr = br[i];
dr.moveBy( tx, ty );
@@ -571,45 +571,45 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
}
// send paint event
- QPainter::redirect(widget, pm);
- QPaintEvent e( r, false );
- QApplication::sendEvent( widget, &e );
- QPainter::redirect(widget, 0);
+ TQPainter::redirect(widget, pm);
+ TQPaintEvent e( r, false );
+ TQApplication::sendEvent( widget, &e );
+ TQPainter::redirect(widget, 0);
// transfer result
if ( external )
for ( int i = 0; i < cnt; ++i )
- p->drawPixmap(QPoint(tx+br[i].x(), ty+br[i].y()), *pm, br[i]);
+ p->drawPixmap(TQPoint(tx+br[i].x(), ty+br[i].y()), *pm, br[i]);
else
for ( int i = 0; i < cnt; ++i )
- bitBlt(p->device(), p->xForm( QPoint(tx, ty) + br[i].topLeft() ), pm, br[i]);
+ bitBlt(p->device(), p->xForm( TQPoint(tx, ty) + br[i].topLeft() ), pm, br[i]);
// cleanup and recurse
PaintBuffer::release();
- QValueVector<QWidget*>::iterator cwit = cw.begin();
- QValueVector<QWidget*>::iterator cwitEnd = cw.end();
- QValueVector<QRect>::const_iterator crit = cr.begin();
+ TQValueVector<TQWidget*>::iterator cwit = cw.begin();
+ TQValueVector<TQWidget*>::iterator cwitEnd = cw.end();
+ TQValueVector<TQRect>::const_iterator crit = cr.begin();
for (; cwit != cwitEnd; ++cwit, ++crit)
copyWidget(*crit, p, *cwit, tx+(*cwit)->x(), ty+(*cwit)->y());
}
-void RenderWidget::paintWidget(PaintInfo& pI, QWidget *widget, int tx, int ty)
+void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty)
{
- QPainter* const p = pI.p;
+ TQPainter* const p = pI.p;
allowWidgetPaintEvents = true;
const bool dsbld = QSharedDoubleBuffer::isDisabled();
QSharedDoubleBuffer::setDisabled(true);
- QRect rr = pI.r;
+ TQRect rr = pI.r;
rr.moveBy(-tx, -ty);
- const QRect r = widget->rect().intersect( rr );
+ const TQRect r = widget->rect().intersect( rr );
copyWidget(r, p, widget, tx, ty);
QSharedDoubleBuffer::setDisabled(dsbld);
allowWidgetPaintEvents = false;
}
-bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
+bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
{
// no special event processing if this is a frame (in which case KHTMLView handles it all)
if ( ::qt_cast<KHTMLView *>( m_widget ) )
@@ -631,23 +631,23 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
//kdDebug() << "RenderWidget::eventFilter type=" << e->type() << endl;
switch(e->type()) {
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
// First, forward it to the widget, so that Qt gets a precise
// state of the focus before pesky JS can try changing it..
directToWidget = true;
- QApplication::sendEvent(m_widget, e);
+ TQApplication::sendEvent(m_widget, e);
directToWidget = false;
filtered = true; //We already delivered it!
// Don't count popup as a valid reason for losing the focus
// (example: opening the options of a select combobox shouldn't emit onblur)
- if ( QFocusEvent::reason() != QFocusEvent::Popup )
+ if ( TQFocusEvent::reason() != TQFocusEvent::Popup )
handleFocusOut();
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
//As above, forward to the widget first...
directToWidget = true;
- QApplication::sendEvent(m_widget, e);
+ TQApplication::sendEvent(m_widget, e);
directToWidget = false;
filtered = true; //We already delivered it!
@@ -658,23 +658,23 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
// if ( ext ) ext->editableWidgetFocused( m_widget );
// }
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
// TODO this seems wrong - Qt events are not correctly translated to DOM ones,
// like in KHTMLView::dispatchKeyEvent()
- if (element()->dispatchKeyEvent(static_cast<QKeyEvent*>(e),false))
+ if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
filtered = true;
break;
- case QEvent::Wheel:
+ case TQEvent::Wheel:
if (widget()->parentWidget() == view()->viewport()) {
// don't allow the widget to react to wheel event unless its
// currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage.
if (qApp->focusWidget() != widget() &&
- widget()->focusPolicy() <= QWidget::StrongFocus) {
- static_cast<QWheelEvent*>(e)->ignore();
- QApplication::sendEvent(view(), e);
+ widget()->focusPolicy() <= TQWidget::StrongFocus) {
+ static_cast<TQWheelEvent*>(e)->ignore();
+ TQApplication::sendEvent(view(), e);
filtered = true;
}
}
@@ -693,50 +693,50 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
return filtered;
}
-void RenderWidget::EventPropagator::sendEvent(QEvent *e) {
+void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- mousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress:
+ mousePressEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonRelease:
- mouseReleaseEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonRelease:
+ mouseReleaseEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseMove:
- mouseMoveEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseMove:
+ mouseMoveEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::KeyPress:
- keyPressEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyPress:
+ keyPressEvent(static_cast<TQKeyEvent *>(e));
break;
- case QEvent::KeyRelease:
- keyReleaseEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyRelease:
+ keyReleaseEvent(static_cast<TQKeyEvent *>(e));
break;
default:
break;
}
}
-void RenderWidget::ScrollViewEventPropagator::sendEvent(QEvent *e) {
+void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- viewportMousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress:
+ viewportMousePressEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonRelease:
- viewportMouseReleaseEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonRelease:
+ viewportMouseReleaseEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonDblClick:
- viewportMouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick:
+ viewportMouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseMove:
- viewportMouseMoveEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseMove:
+ viewportMouseMoveEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::KeyPress:
- keyPressEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyPress:
+ keyPressEvent(static_cast<TQKeyEvent *>(e));
break;
- case QEvent::KeyRelease:
- keyReleaseEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyRelease:
+ keyReleaseEvent(static_cast<TQKeyEvent *>(e));
break;
default:
break;
@@ -752,15 +752,15 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
case EventImpl::MOUSEMOVE_EVENT: {
if (!ev.isMouseEvent()) break;
const MouseEventImpl &me = static_cast<const MouseEventImpl &>(ev);
- QMouseEvent* const qme = me.qEvent();
+ TQMouseEvent* const qme = me.qEvent();
int absx = 0;
int absy = 0;
absolutePosition(absx, absy);
- QPoint p(me.clientX() - absx + m_view->contentsX(),
+ TQPoint p(me.clientX() - absx + m_view->contentsX(),
me.clientY() - absy + m_view->contentsY());
- QMouseEvent::Type type;
+ TQMouseEvent::Type type;
int button = 0;
int state = 0;
@@ -771,14 +771,14 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
} else {
switch(me.id()) {
case EventImpl::MOUSEDOWN_EVENT:
- type = QMouseEvent::MouseButtonPress;
+ type = TQMouseEvent::MouseButtonPress;
break;
case EventImpl::MOUSEUP_EVENT:
- type = QMouseEvent::MouseButtonRelease;
+ type = TQMouseEvent::MouseButtonRelease;
break;
case EventImpl::MOUSEMOVE_EVENT:
default:
- type = QMouseEvent::MouseMove;
+ type = TQMouseEvent::MouseMove;
break;
}
switch (me.button()) {
@@ -807,9 +807,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
// kdDebug(6000) << "sending event to widget "
// << " pos=" << p << " type=" << type
// << " button=" << button << " state=" << state << endl;
- QMouseEvent e(type, p, button, state);
- QScrollView * sc = ::qt_cast<QScrollView*>(m_widget);
- if (sc && !::qt_cast<QListBox*>(m_widget))
+ TQMouseEvent e(type, p, button, state);
+ TQScrollView * sc = ::qt_cast<TQScrollView*>(m_widget);
+ if (sc && !::qt_cast<TQListBox*>(m_widget))
static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(&e);
else
static_cast<EventPropagator *>(m_widget)->sendEvent(&e);
@@ -825,7 +825,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
const KeyEventBaseImpl& domKeyEv = static_cast<const KeyEventBaseImpl &>(ev);
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
- QKeyEvent* const ke = domKeyEv.qKeyEvent();
+ TQKeyEvent* const ke = domKeyEv.qKeyEvent();
static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
ret = ke->isAccepted();
break;
@@ -849,9 +849,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
// Qt::KeyPress is sent for DOM keypress and not DOM keydown to allow
// sites to block a key with onkeypress, #99749
- QKeyEvent* const ke = domKeyEv.qKeyEvent();
+ TQKeyEvent* const ke = domKeyEv.qKeyEvent();
if (ke->isAutoRepeat()) {
- QKeyEvent releaseEv( QEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
+ TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() );
static_cast<EventPropagator *>(m_widget)->sendEvent(&releaseEv);
}
@@ -860,13 +860,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
break;
}
case EventImpl::MOUSEOUT_EVENT: {
- QEvent moe( QEvent::Leave );
- QApplication::sendEvent(m_widget, &moe);
+ TQEvent moe( TQEvent::Leave );
+ TQApplication::sendEvent(m_widget, &moe);
break;
}
case EventImpl::MOUSEOVER_EVENT: {
- QEvent moe( QEvent::Enter );
- QApplication::sendEvent(m_widget, &moe);
+ TQEvent moe( TQEvent::Enter );
+ TQApplication::sendEvent(m_widget, &moe);
view()->part()->resetHoverText();
break;
}
@@ -924,7 +924,7 @@ FindSelectionResult RenderReplaced::checkSelectionPoint(int _x, int _y, int _tx,
}
#ifdef ENABLE_DUMP
-void RenderWidget::dump(QTextStream &stream, const QString &ind) const
+void RenderWidget::dump(TQTextStream &stream, const TQString &ind) const
{
RenderReplaced::dump(stream,ind);
if ( widget() )
diff --git a/khtml/rendering/render_replaced.h b/khtml/rendering/render_replaced.h
index 97c14a0a8..cb147e3c0 100644
--- a/khtml/rendering/render_replaced.h
+++ b/khtml/rendering/render_replaced.h
@@ -23,8 +23,8 @@
#define render_replaced_h
#include "rendering/render_block.h"
-#include <qobject.h>
-#include <qscrollview.h>
+#include <tqobject.h>
+#include <tqscrollview.h>
class KHTMLView;
class QWidget;
@@ -81,7 +81,7 @@ protected:
};
-class RenderWidget : public QObject, public RenderReplaced, public khtml::Shared<RenderWidget>
+class RenderWidget : public TQObject, public RenderReplaced, public khtml::Shared<RenderWidget>
{
Q_OBJECT
public:
@@ -99,7 +99,7 @@ public:
virtual void updateFromElement();
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
KHTMLView* view() const { return m_view; }
void deref();
@@ -107,11 +107,11 @@ public:
void cancelPendingResize();
bool needsMask() const { return m_needsMask; }
- static void paintWidget(PaintInfo& pI, QWidget *widget, int tx, int ty);
+ static void paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty);
virtual bool handleEvent(const DOM::EventImpl& ev);
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
// for ECMA to flush all pending resizes
@@ -127,13 +127,13 @@ protected:
virtual bool acceptsSyntheticEvents() const { return true; }
virtual void handleFocusOut() {}
- bool event( QEvent *e );
+ bool event( TQEvent *e );
- bool eventFilter(QObject* /*o*/, QEvent* e);
- void setQWidget(QWidget *widget);
+ bool eventFilter(TQObject* /*o*/, TQEvent* e);
+ void setQWidget(TQWidget *widget);
void resizeWidget( int w, int h );
- QWidget *m_widget;
+ TQWidget *m_widget;
KHTMLView* m_view;
//Because we mess with normal detach due to ref/deref,
@@ -152,13 +152,13 @@ public:
virtual int borderLeft() const { return canHaveBorder() ? RenderReplaced::borderLeft() : 0; }
virtual int borderRight() const { return canHaveBorder() ? RenderReplaced::borderRight() : 0; }
- class EventPropagator : public QWidget {
+ class EventPropagator : public TQWidget {
public:
- void sendEvent(QEvent *e);
+ void sendEvent(TQEvent *e);
};
- class ScrollViewEventPropagator : public QScrollView {
+ class ScrollViewEventPropagator : public TQScrollView {
public:
- void sendEvent(QEvent *e);
+ void sendEvent(TQEvent *e);
};
};
diff --git a/khtml/rendering/render_style.cpp b/khtml/rendering/render_style.cpp
index 936964b98..18c520ad4 100644
--- a/khtml/rendering/render_style.cpp
+++ b/khtml/rendering/render_style.cpp
@@ -89,7 +89,7 @@ bool StyleBoxData::operator==(const StyleBoxData& o) const
StyleVisualData::StyleVisualData()
: textDecoration(RenderStyle::initialTextDecoration()),
- palette( QApplication::palette() )
+ palette( TQApplication::palette() )
{
}
@@ -879,7 +879,7 @@ void RenderStyle::cleanup()
_default = 0;
}
-void RenderStyle::setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c)
+void RenderStyle::setPaletteColor(TQPalette::ColorGroup g, TQColorGroup::ColorRole r, const TQColor& c)
{
visual.access()->palette.setColor(g,r,c);
}
@@ -912,7 +912,7 @@ void RenderStyle::setQuotes(DOM::QuotesValueImpl* q)
if (t) t->deref();
}
-QString RenderStyle::openQuote(int level) const
+TQString RenderStyle::openQuote(int level) const
{
if (inherited->quotes)
return inherited->quotes->openQuote(level);
@@ -920,7 +920,7 @@ QString RenderStyle::openQuote(int level) const
return "\""; // 0 is default quotes
}
-QString RenderStyle::closeQuote(int level) const
+TQString RenderStyle::closeQuote(int level) const
{
if (inherited->quotes)
return inherited->quotes->closeQuote(level);
@@ -1213,14 +1213,14 @@ void RenderStyle::setCounterIncrement(CSSValueListImpl *l)
#ifdef ENABLE_DUMP
-static QString describeFont( const QFont &f)
+static TQString describeFont( const TQFont &f)
{
- QString res = "'" + f.family() + "' ";
+ TQString res = "'" + f.family() + "' ";
if ( f.pointSize() > 0)
- res += QString::number( f.pointSize() ) + "pt";
+ res += TQString::number( f.pointSize() ) + "pt";
else
- res += QString::number( f.pixelSize() ) + "px";
+ res += TQString::number( f.pixelSize() ) + "px";
if ( f.bold() )
res += " bold";
@@ -1235,9 +1235,9 @@ static QString describeFont( const QFont &f)
return res;
}
-QString RenderStyle::createDiff( const RenderStyle &parent ) const
+TQString RenderStyle::createDiff( const RenderStyle &parent ) const
{
- QString res;
+ TQString res;
if ( color().isValid() && parent.color() != color() )
res += " [color=" + color().name() + "]";
if ( backgroundColor().isValid() && parent.backgroundColor() != backgroundColor() )
diff --git a/khtml/rendering/render_style.h b/khtml/rendering/render_style.h
index f8c2affd7..b1c1e5306 100644
--- a/khtml/rendering/render_style.h
+++ b/khtml/rendering/render_style.h
@@ -35,12 +35,12 @@
* and produce invaliud results.
*/
-#include <qcolor.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qptrlist.h>
-#include <qpalette.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqptrlist.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
#include "dom/dom_misc.h"
#include "dom/dom_string.h"
@@ -208,7 +208,7 @@ class BorderValue
public:
BorderValue() : width( 3 ), style( BNONE ) {}
- QColor color;
+ TQColor color;
unsigned short width : 12;
EBorderStyle style : 6;
@@ -264,7 +264,7 @@ struct CollapsedBorderValue
int width() const { return border && border->nonZero() ? border->width : 0; }
EBorderStyle style() const { return border ? border->style : BHIDDEN; }
bool exists() const { return border; }
- QColor color() const { return border ? border->color : QColor(); }
+ TQColor color() const { return border ? border->color : TQColor(); }
bool isTransparent() const { return border ? border->isTransparent() : true; }
bool operator==(const CollapsedBorderValue& o) const
@@ -428,7 +428,7 @@ public:
LengthBox clip;
unsigned textDecoration : 4; // Text decorations defined *only* by this element.
- QPalette palette; //widget styling with IE attributes
+ TQPalette palette; //widget styling with IE attributes
};
@@ -553,7 +553,7 @@ public:
}
BackgroundLayer m_background;
- QColor m_color;
+ TQColor m_color;
OutlineValue m_outline;
};
@@ -641,7 +641,7 @@ public:
// This struct holds information about shadows for the text-shadow and box-shadow properties.
struct ShadowData {
- ShadowData(int _x, int _y, int _blur, const QColor& _color)
+ ShadowData(int _x, int _y, int _blur, const TQColor& _color)
:x(_x), y(_y), blur(_blur), color(_color), next(0) {}
ShadowData(const ShadowData& o);
@@ -655,7 +655,7 @@ struct ShadowData {
int x;
int y;
int blur;
- QColor color;
+ TQColor color;
ShadowData* next;
};
@@ -761,7 +761,7 @@ public:
CachedImage *style_image;
khtml::Font font;
- QColor color;
+ TQColor color;
short border_hspacing;
short border_vspacing;
@@ -1063,19 +1063,19 @@ public:
unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
EBorderStyle borderLeftStyle() const { return surround->border.left.style; }
- const QColor& borderLeftColor() const { return surround->border.left.color; }
+ const TQColor& borderLeftColor() const { return surround->border.left.color; }
bool borderLeftIsTransparent() const { return surround->border.left.isTransparent(); }
unsigned short borderRightWidth() const { return surround->border.borderRightWidth(); }
EBorderStyle borderRightStyle() const { return surround->border.right.style; }
- const QColor& borderRightColor() const { return surround->border.right.color; }
+ const TQColor& borderRightColor() const { return surround->border.right.color; }
bool borderRightIsTransparent() const { return surround->border.right.isTransparent(); }
unsigned short borderTopWidth() const { return surround->border.borderTopWidth(); }
EBorderStyle borderTopStyle() const { return surround->border.top.style; }
- const QColor& borderTopColor() const { return surround->border.top.color; }
+ const TQColor& borderTopColor() const { return surround->border.top.color; }
bool borderTopIsTransparent() const { return surround->border.top.isTransparent(); }
unsigned short borderBottomWidth() const { return surround->border.borderBottomWidth(); }
EBorderStyle borderBottomStyle() const { return surround->border.bottom.style; }
- const QColor& borderBottomColor() const { return surround->border.bottom.color; }
+ const TQColor& borderBottomColor() const { return surround->border.bottom.color; }
bool borderBottomIsTransparent() const { return surround->border.bottom.isTransparent(); }
unsigned short outlineSize() const { return outlineWidth() + outlineOffset(); }
@@ -1084,7 +1084,7 @@ public:
else return background->m_outline.width; }
EBorderStyle outlineStyle() const { return background->m_outline.style; }
bool outlineStyleIsAuto() const { return background->m_outline._auto; }
- const QColor & outlineColor() const { return background->m_outline.color; }
+ const TQColor & outlineColor() const { return background->m_outline.color; }
EOverflow overflowX() const { return noninherited_flags.f._overflowX; }
EOverflow overflowY() const { return noninherited_flags.f._overflowY; }
@@ -1109,12 +1109,12 @@ public:
EClear clear() const { return noninherited_flags.f._clear; }
ETableLayout tableLayout() const { return noninherited_flags.f._table_layout; }
- const QFont & font() const { return inherited->font.f; }
+ const TQFont & font() const { return inherited->font.f; }
// use with care. call font->update() after modifications
const Font &htmlFont() { return inherited->font; }
- const QFontMetrics & fontMetrics() const { return inherited->font.fm; }
+ const TQFontMetrics & fontMetrics() const { return inherited->font.fm; }
- const QColor & color() const { return inherited->color; }
+ const TQColor & color() const { return inherited->color; }
Length textIndent() const { return inherited->indent; }
ETextAlign textAlign() const { return inherited_flags.f._text_align; }
ETextTransform textTransform() const { return inherited_flags.f._text_transform; }
@@ -1146,7 +1146,7 @@ public:
return false;
}
- const QColor & backgroundColor() const { return background->m_color; }
+ const TQColor & backgroundColor() const { return background->m_color; }
CachedImage *backgroundImage() const { return background->m_background.m_image; }
EBackgroundRepeat backgroundRepeat() const { return background->m_background.m_bgRepeat; }
bool backgroundAttachment() const { return background->m_background.m_bgAttachment; }
@@ -1185,8 +1185,8 @@ public:
EPageBreak pageBreakAfter() const { return noninherited_flags.f._page_break_after; }
DOM::QuotesValueImpl* quotes() const { return inherited->quotes; }
- QString openQuote(int level) const;
- QString closeQuote(int level) const;
+ TQString openQuote(int level) const;
+ TQString closeQuote(int level) const;
// CSS3 Getter Methods
EBoxSizing boxSizing() const { return box->box_sizing; }
@@ -1232,27 +1232,27 @@ public:
void resetBorderLeft() { SET_VAR(surround, border.left, BorderValue()) }
void resetOutline() { SET_VAR(background, m_outline, OutlineValue()) }
- void setBackgroundColor(const QColor& v) { SET_VAR(background, m_color, v) }
+ void setBackgroundColor(const TQColor& v) { SET_VAR(background, m_color, v) }
void setBorderLeftWidth(unsigned short v) { SET_VAR(surround,border.left.width,v) }
void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround,border.left.style,v) }
- void setBorderLeftColor(const QColor & v) { SET_VAR(surround,border.left.color,v) }
+ void setBorderLeftColor(const TQColor & v) { SET_VAR(surround,border.left.color,v) }
void setBorderRightWidth(unsigned short v) { SET_VAR(surround,border.right.width,v) }
void setBorderRightStyle(EBorderStyle v) { SET_VAR(surround,border.right.style,v) }
- void setBorderRightColor(const QColor & v) { SET_VAR(surround,border.right.color,v) }
+ void setBorderRightColor(const TQColor & v) { SET_VAR(surround,border.right.color,v) }
void setBorderTopWidth(unsigned short v) { SET_VAR(surround,border.top.width,v) }
void setBorderTopStyle(EBorderStyle v) { SET_VAR(surround,border.top.style,v) }
- void setBorderTopColor(const QColor & v) { SET_VAR(surround,border.top.color,v) }
+ void setBorderTopColor(const TQColor & v) { SET_VAR(surround,border.top.color,v) }
void setBorderBottomWidth(unsigned short v) { SET_VAR(surround,border.bottom.width,v) }
void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround,border.bottom.style,v) }
- void setBorderBottomColor(const QColor & v) { SET_VAR(surround,border.bottom.color,v) }
+ void setBorderBottomColor(const TQColor & v) { SET_VAR(surround,border.bottom.color,v) }
void setOutlineWidth(unsigned short v) { SET_VAR(background,m_outline.width,v) }
void setOutlineStyle(EBorderStyle v, bool isAuto = false)
{
SET_VAR(background,m_outline.style,v)
SET_VAR(background,m_outline._auto, isAuto)
}
- void setOutlineColor(const QColor & v) { SET_VAR(background,m_outline.color,v) }
+ void setOutlineColor(const TQColor & v) { SET_VAR(background,m_outline.color,v) }
void setOverflowX(EOverflow v) { noninherited_flags.f._overflowX = v; }
void setOverflowY(EOverflow v) { noninherited_flags.f._overflowY = v; }
@@ -1280,7 +1280,7 @@ public:
return false;
}
- void setColor(const QColor & v) { SET_VAR(inherited,color,v) }
+ void setColor(const TQColor & v) { SET_VAR(inherited,color,v) }
void setTextIndent(Length v) { SET_VAR(inherited,indent,v) }
void setTextAlign(ETextAlign v) { inherited_flags.f._text_align = v; }
void setTextTransform(ETextTransform v) { inherited_flags.f._text_transform = v; }
@@ -1358,11 +1358,11 @@ public:
void setTextOverflow(bool b) { noninherited_flags.f._textOverflow = b; }
// End CSS3 Setters
- QPalette palette() const { return visual->palette; }
- void setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c);
+ TQPalette palette() const { return visual->palette; }
+ void setPaletteColor(TQPalette::ColorGroup g, TQColorGroup::ColorRole r, const TQColor& c);
void resetPalette() // Called when the desktop color scheme changes.
{
- const_cast<StyleVisualData *>(visual.get())->palette = QApplication::palette();
+ const_cast<StyleVisualData *>(visual.get())->palette = TQApplication::palette();
}
bool useNormalContent() const { return generated->content == 0; }
@@ -1407,7 +1407,7 @@ public:
#ifdef ENABLE_DUMP
- QString createDiff( const RenderStyle &parent ) const;
+ TQString createDiff( const RenderStyle &parent ) const;
#endif
// Initial values for all the properties
@@ -1443,7 +1443,7 @@ public:
static short initialBorderHorizontalSpacing() { return 0; }
static short initialBorderVerticalSpacing() { return 0; }
static ECursor initialCursor() { return CURSOR_AUTO; }
- static QColor initialColor() { return Qt::black; }
+ static TQColor initialColor() { return Qt::black; }
static CachedImage* initialBackgroundImage() { return 0; }
static CachedImage* initialListStyleImage() { return 0; }
static unsigned short initialBorderWidth() { return 3; }
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp
index 592db9dbd..2cf1bf1f9 100644
--- a/khtml/rendering/render_table.cpp
+++ b/khtml/rendering/render_table.cpp
@@ -42,8 +42,8 @@
#include <kglobal.h>
-#include <qapplication.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <assert.h>
@@ -477,16 +477,16 @@ void RenderTable::paint( PaintInfo& pI, int _tx, int _ty)
// have all the styles sorted, we then do individual passes, painting each style of border
// from lowest precedence to highest precedence.
pI.phase = PaintActionCollapsedTableBorders;
- QValueList<CollapsedBorderValue> borderStyles;
+ TQValueList<CollapsedBorderValue> borderStyles;
collectBorders(borderStyles);
#if 0
- QString m;
+ TQString m;
for (uint i = 0; i < borderStyles.count(); i++)
- m += QString("%1 ").arg((*borderStyles.at(i)).width());
+ m += TQString("%1 ").arg((*borderStyles.at(i)).width());
kdDebug(6040) << m << endl;
#endif
- QValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
- QValueListIterator<CollapsedBorderValue> end = borderStyles.end();
+ TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
+ TQValueListIterator<CollapsedBorderValue> end = borderStyles.end();
for (; it != end; ++it) {
m_currentBorder = &*it;
for (RenderObject *child = firstChild(); child; child = child->nextSibling()) {
@@ -879,7 +879,7 @@ RenderTableCell* RenderTable::cellRight(const RenderTableCell* cell) const
}
#ifdef ENABLE_DUMP
-void RenderTable::dump(QTextStream &stream, const QString &ind) const
+void RenderTable::dump(TQTextStream &stream, const TQString &ind) const
{
RenderBlock::dump(stream, ind);
@@ -1074,7 +1074,7 @@ void RenderTableSection::addCell( RenderTableCell *cell, RenderTableRow *row )
{
int rSpan = cell->rowSpan();
int cSpan = cell->colSpan();
- QMemArray<RenderTable::ColumnStruct> &columns = table()->columns;
+ TQMemArray<RenderTable::ColumnStruct> &columns = table()->columns;
int nCols = columns.size();
// ### mozilla still seems to do the old HTML way, even for strict DTD
@@ -1161,7 +1161,7 @@ void RenderTableSection::setCellWidths()
#ifdef DEBUG_LAYOUT
kdDebug( 6040 ) << renderName() << "(Table, this=0x" << this << ")::setCellWidths()" << endl;
#endif
- QMemArray<int> &columnPos = table()->columnPos;
+ TQMemArray<int> &columnPos = table()->columnPos;
int rows = grid.size();
for ( int i = 0; i < rows; i++ ) {
@@ -1609,7 +1609,7 @@ int RenderTableSection::highestPosition(bool includeOverflowInterior, bool inclu
// Search from first_row to last_row for the row containing y
static unsigned int findRow(unsigned int first_row, unsigned int last_row,
- const QMemArray<int> &rowPos, int y)
+ const TQMemArray<int> &rowPos, int y)
{
unsigned int under = first_row;
unsigned int over = last_row;
@@ -1629,7 +1629,7 @@ static unsigned int findRow(unsigned int first_row, unsigned int last_row,
}
static void findRowCover(unsigned int &startrow, unsigned int &endrow,
- const QMemArray<int> &rowPos,
+ const TQMemArray<int> &rowPos,
int min_y, int max_y)
{
assert(max_y >= min_y);
@@ -1844,7 +1844,7 @@ void RenderTableSection::addSpaceAt(int pos, int dy)
#ifdef ENABLE_DUMP
-void RenderTableSection::dump(QTextStream &stream, const QString &ind) const
+void RenderTableSection::dump(TQTextStream &stream, const TQString &ind) const
{
RenderContainer::dump(stream,ind);
@@ -2693,11 +2693,11 @@ int RenderTableCell::borderBottom() const
}
#ifdef BOX_DEBUG
-#include <qpainter.h>
+#include <tqpainter.h>
-static void outlineBox(QPainter *p, int _tx, int _ty, int w, int h)
+static void outlineBox(TQPainter *p, int _tx, int _ty, int w, int h)
{
- p->setPen(QPen(QColor("yellow"), 3, Qt::DotLine));
+ p->setPen(TQPen(TQColor("yellow"), 3, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(_tx, _ty, w, h );
}
@@ -2798,13 +2798,13 @@ public:
int count;
};
-static void addBorderStyle(QValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
+static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
{
if (!borderValue.exists() || borderStyles.contains(borderValue))
return;
- QValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
- QValueListIterator<CollapsedBorderValue> end = borderStyles.end();
+ TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
+ TQValueListIterator<CollapsedBorderValue> end = borderStyles.end();
for (; it != end; ++it) {
CollapsedBorderValue result = compareBorders(*it, borderValue);
if (result == *it) {
@@ -2816,7 +2816,7 @@ static void addBorderStyle(QValueList<CollapsedBorderValue>& borderStyles, Colla
borderStyles.append(borderValue);
}
-void RenderTableCell::collectBorders(QValueList<CollapsedBorderValue>& borderStyles)
+void RenderTableCell::collectBorders(TQValueList<CollapsedBorderValue>& borderStyles)
{
addBorderStyle(borderStyles, collapsedLeftBorder());
addBorderStyle(borderStyles, collapsedRightBorder());
@@ -2824,7 +2824,7 @@ void RenderTableCell::collectBorders(QValueList<CollapsedBorderValue>& borderSty
addBorderStyle(borderStyles, collapsedBottomBorder());
}
-void RenderTableCell::paintCollapsedBorder(QPainter* p, int _tx, int _ty, int w, int h)
+void RenderTableCell::paintCollapsedBorder(TQPainter* p, int _tx, int _ty, int w, int h)
{
if (!table()->currentBorderStyle())
return;
@@ -2894,7 +2894,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& pI, int _tx, int _ty
int end = kMin( pI.r.y() + pI.r.height(), _ty + h );
int mh = end - my;
- QColor c = backgroundObject->style()->backgroundColor();
+ TQColor c = backgroundObject->style()->backgroundColor();
const BackgroundLayer* bgLayer = backgroundObject->style()->backgroundLayers();
if (bgLayer->hasImage() || c.isValid()) {
@@ -2903,10 +2903,10 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& pI, int _tx, int _ty
bool hasLayer = backgroundObject->layer() && (backgroundObject == this || backgroundObject == parent());
if (hasLayer && tableElt->collapseBorders()) {
pI.p->save();
- QRect clipRect(_tx + borderLeft(), _ty + borderTop(), w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
+ TQRect clipRect(_tx + borderLeft(), _ty + borderTop(), w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
clipRect = pI.p->xForm(clipRect);
- QRegion creg(clipRect);
- QRegion old = pI.p->clipRegion();
+ TQRegion creg(clipRect);
+ TQRegion old = pI.p->clipRegion();
if (!old.isNull())
creg = old.intersect(creg);
pI.p->setClipRegion(creg);
@@ -2940,7 +2940,7 @@ void RenderTableCell::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty)
#ifdef ENABLE_DUMP
-void RenderTableCell::dump(QTextStream &stream, const QString &ind) const
+void RenderTableCell::dump(TQTextStream &stream, const TQString &ind) const
{
RenderFlow::dump(stream,ind);
stream << " row=" << _row;
@@ -2972,7 +2972,7 @@ void RenderTableCol::updateFromElement()
}
#ifdef ENABLE_DUMP
-void RenderTableCol::dump(QTextStream &stream, const QString &ind) const
+void RenderTableCol::dump(TQTextStream &stream, const TQString &ind) const
{
RenderContainer::dump(stream,ind);
stream << " _span=" << m_span;
diff --git a/khtml/rendering/render_table.h b/khtml/rendering/render_table.h
index 979b92187..a6de6cfaf 100644
--- a/khtml/rendering/render_table.h
+++ b/khtml/rendering/render_table.h
@@ -27,8 +27,8 @@
#ifndef RENDER_TABLE_H
#define RENDER_TABLE_H
-#include <qcolor.h>
-#include <qptrvector.h>
+#include <tqcolor.h>
+#include <tqptrvector.h>
#include "rendering/render_box.h"
#include "rendering/render_block.h"
@@ -78,7 +78,7 @@ public:
int paddingTop() const { return collapseBorders() ? 0 : RenderBlock::paddingTop(); }
int paddingBottom() const { return collapseBorders() ? 0 : RenderBlock::paddingBottom(); }
- const QColor &bgColor() const { return style()->backgroundColor(); }
+ const TQColor &bgColor() const { return style()->backgroundColor(); }
uint cellPadding() const { return padding; }
void setCellPadding( uint p ) { padding = p; }
@@ -103,7 +103,7 @@ public:
SelPointState & );
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
struct ColumnStruct {
enum {
@@ -117,8 +117,8 @@ public:
ushort width; // the calculated position of the column
};
- QMemArray<int> columnPos;
- QMemArray<ColumnStruct> columns;
+ TQMemArray<int> columnPos;
+ TQMemArray<ColumnStruct> columns;
void splitColumn( int pos, int firstSpan );
void appendColumn( int span );
@@ -217,7 +217,7 @@ public:
SelPointState & );
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
void addCell( RenderTableCell *cell, RenderTableRow *row );
@@ -228,7 +228,7 @@ public:
RenderTable *table() const { return static_cast<RenderTable *>(parent()); }
- typedef QMemArray<RenderTableCell *> Row;
+ typedef TQMemArray<RenderTableCell *> Row;
struct RowStruct {
Row *row;
RenderTableRow* rowRenderer;
@@ -273,8 +273,8 @@ public:
// this gets a cell grid data structure. changing the number of
// columns is done by the table
- QMemArray<RowStruct> grid;
- QMemArray<int> rowPos;
+ TQMemArray<RowStruct> grid;
+ TQMemArray<int> rowPos;
signed short cRow;
ushort cCol;
@@ -375,7 +375,7 @@ public:
CollapsedBorderValue collapsedRightBorder() const;
CollapsedBorderValue collapsedTopBorder() const;
CollapsedBorderValue collapsedBottomBorder() const;
- virtual void collectBorders(QValueList<CollapsedBorderValue>& borderStyles);
+ virtual void collectBorders(TQValueList<CollapsedBorderValue>& borderStyles);
virtual void updateFromElement();
@@ -388,7 +388,7 @@ public:
virtual void paint( PaintInfo& i, int tx, int ty);
- void paintCollapsedBorder(QPainter* p, int x, int y, int w, int h);
+ void paintCollapsedBorder(TQPainter* p, int x, int y, int w, int h);
void paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty, RenderObject* backgroundObject);
virtual void close();
@@ -407,7 +407,7 @@ public:
RenderTableSection *section() const { return static_cast<RenderTableSection *>(parent()->parent()); }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
bool widthChanged() {
@@ -461,7 +461,7 @@ public:
virtual void updateFromElement();
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString& ind) const;
+ virtual void dump(TQTextStream &stream, const TQString& ind) const;
#endif
int span() const { return m_span; }
diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp
index a862c3ad5..0bded06fc 100644
--- a/khtml/rendering/render_text.cpp
+++ b/khtml/rendering/render_text.cpp
@@ -39,9 +39,9 @@
#include "misc/loader.h"
#include "misc/helper.h"
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
#include <assert.h>
@@ -173,7 +173,7 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
paintShadow(i.p, font, tx, ty, styleToUse->textShadow());
if (!haveSelection || sPos != 0 || ePos != m_len) {
font->drawText(i.p, m_x + tx, m_y + ty + m_baseline, renderText()->string()->s, renderText()->string()->l, m_start, endPoint,
- m_toAdd, m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_toAdd, m_reversed ? TQPainter::RTL : TQPainter::LTR);
}
}
@@ -206,13 +206,13 @@ inline const RenderStyle *retrieveSelectionPseudoStyle(const RenderObject *obj)
return 0;
}
-void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco)
+void InlineTextBox::paintSelection(const Font *f, RenderText *text, TQPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco)
{
if(startPos > m_len) return;
if(startPos < 0) startPos = 0;
- QColor hc;
- QColor hbg;
+ TQColor hc;
+ TQColor hbg;
const RenderStyle* pseudoStyle = retrieveSelectionPseudoStyle(text);
if (pseudoStyle) {
// ### support outline (mandated by CSS3)
@@ -221,11 +221,11 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
hbg = pseudoStyle->backgroundColor();
hc = pseudoStyle->color();
} else {
- const QColorGroup &grp = style->palette().active();
+ const TQColorGroup &grp = style->palette().active();
hc = grp.highlightedText();
hbg = grp.highlight();
// ### should be at most retrieved once per render text
- QColor bg = khtml::retrieveBackgroundColor(text);
+ TQColor bg = khtml::retrieveBackgroundColor(text);
// It may happen that the contrast is -- well -- virtually non existent.
// In this case, simply swap the colors, thus in compliance with
// NN4 (win32 only), IE, and Mozilla.
@@ -235,7 +235,7 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
p->setPen(hc);
- //kdDebug( 6040 ) << "textRun::painting(" << QConstString(text->str->s + m_start, m_len).string().left(30) << ") at(" << m_x+tx << "/" << m_y+ty << ")" << endl;
+ //kdDebug( 6040 ) << "textRun::painting(" << TQConstString(text->str->s + m_start, m_len).string().left(30) << ") at(" << m_x+tx << "/" << m_y+ty << ")" << endl;
const bool needClipping = startPos != 0 || endPos != m_len;
@@ -249,23 +249,23 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
visualSelectionStart = f->width(text->str->s, text->str->l, m_start, m_len) - visualSelectionEnd;
}
- QRect selectionRect(m_x + tx + visualSelectionStart, m_y + ty, visualSelectionWidth, height());
- QRegion r(selectionRect);
+ TQRect selectionRect(m_x + tx + visualSelectionStart, m_y + ty, visualSelectionWidth, height());
+ TQRegion r(selectionRect);
if (p->hasClipping())
- r &= p->clipRegion(QPainter::CoordPainter);
- p->setClipRegion(r, QPainter::CoordPainter);
+ r &= p->clipRegion(TQPainter::CoordPainter);
+ p->setClipRegion(r, TQPainter::CoordPainter);
}
f->drawText(p, m_x + tx, m_y + ty + m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR,
+ m_reversed ? TQPainter::RTL : TQPainter::LTR,
needClipping ? 0 : startPos, needClipping ? m_len : endPos,
hbg, m_y + ty, height(), deco);
if (needClipping) p->restore();
}
-void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _ty, int deco)
+void InlineTextBox::paintDecoration( TQPainter *pt, const Font *f, int _tx, int _ty, int deco)
{
_tx += m_x;
_ty += m_y;
@@ -280,7 +280,7 @@ void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _
RenderObject *p = object();
- QColor underline, overline, linethrough;
+ TQColor underline, overline, linethrough;
p->getTextDecorationColors(deco, underline, overline, linethrough, p->style()->htmlHacks());
if(deco & UNDERLINE){
@@ -299,18 +299,18 @@ void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _
// support it. Lars
}
-void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, const ShadowData *shadow )
+void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, const ShadowData *shadow )
{
int x = m_x + _tx + shadow->x;
int y = m_y + _ty + shadow->y;
const RenderText* text = renderText();
if (shadow->blur <= 0) {
- QColor c = pt->pen().color();
+ TQColor c = pt->pen().color();
pt->setPen(shadow->color);
f->drawText(pt, x, y+m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_reversed ? TQPainter::RTL : TQPainter::LTR);
pt->setPen(c);
}
@@ -322,19 +322,19 @@ void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, c
const int gray = qGray(color);
const bool inverse = (gray < 100);
const QRgb bgColor = (inverse) ? qRgb(255,255,255) : qRgb(0,0,0);
- QPixmap pixmap(w, h);
+ TQPixmap pixmap(w, h);
pixmap.fill(bgColor);
- QPainter p;
+ TQPainter p;
p.begin(&pixmap);
p.setPen(shadow->color);
p.setFont(pt->font());
f->drawText(&p, thickness, thickness+m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_reversed ? TQPainter::RTL : TQPainter::LTR);
p.end();
- QImage img = pixmap.convertToImage().convertDepth(32);
+ TQImage img = pixmap.convertToImage().convertDepth(32);
int md = thickness*thickness; // max-dist^2
@@ -381,7 +381,7 @@ void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, c
}
}
- QImage res(w,h,32);
+ TQImage res(w,h,32);
res.setAlphaBuffer(true);
int r = qRed(color);
int g = qGreen(color);
@@ -453,7 +453,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
if (justified) {
for( int i = 0; i < m_len; i++ )
- if ( text->str->s[m_start+i].category() == QChar::Separator_Space )
+ if ( text->str->s[m_start+i].category() == TQChar::Separator_Space )
numSpaces++;
}/*end if*/
@@ -465,7 +465,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
delta -= m_width;
while(pos < m_len) {
int w = f->width( text->str->s, text->str->l, m_start + pos);
- if (justified && text->str->s[m_start + pos].category() == QChar::Separator_Space)
+ if (justified && text->str->s[m_start + pos].category() == TQChar::Separator_Space)
w += justifyWidth(numSpaces, toAdd);
int w2 = w/2;
w -= w2;
@@ -477,7 +477,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
} else {
while(pos < m_len) {
int w = f->width( text->str->s, text->str->l, m_start + pos);
- if (justified && text->str->s[m_start + pos].category() == QChar::Separator_Space)
+ if (justified && text->str->s[m_start + pos].category() == TQChar::Separator_Space)
w += justifyWidth(numSpaces, toAdd);
int w2 = w/2;
w -= w2;
@@ -522,7 +522,7 @@ int InlineTextBox::widthFromStart(int pos) const
const RenderText *t = renderText();
Q_ASSERT(t->isText());
const Font *f = t->htmlFont(m_firstLine);
- const QFontMetrics &fm = t->fontMetrics(m_firstLine);
+ const TQFontMetrics &fm = t->fontMetrics(m_firstLine);
int numSpaces = 0;
// consider spacing for justified text
@@ -531,9 +531,9 @@ int InlineTextBox::widthFromStart(int pos) const
if (justified && m_toAdd > 0) do {
//kdDebug(6000) << "justify" << endl;
-// QConstString cstr = QConstString(t->str->s + m_start, m_len);
+// TQConstString cstr = TQConstString(t->str->s + m_start, m_len);
for( int i = 0; i < m_len; i++ )
- if ( t->str->s[m_start+i].category() == QChar::Separator_Space )
+ if ( t->str->s[m_start+i].category() == TQChar::Separator_Space )
numSpaces++;
if (numSpaces == 0) break;
@@ -543,7 +543,7 @@ int InlineTextBox::widthFromStart(int pos) const
int current = 0; // current position
while (current < pos) {
// add spacing
- while (current < pos && t->str->s[m_start + current].category() == QChar::Separator_Space) {
+ while (current < pos && t->str->s[m_start + current].category() == TQChar::Separator_Space) {
w += f->getWordSpacing();
w += f->getLetterSpacing();
w += justifyWidth(numSpaces, toAdd);
@@ -553,7 +553,7 @@ int InlineTextBox::widthFromStart(int pos) const
if (current >= pos) break;
// seek next space
- while (current < pos && t->str->s[m_start + current].category() != QChar::Separator_Space)
+ while (current < pos && t->str->s[m_start + current].category() != TQChar::Separator_Space)
current++;
// check run without spaces
@@ -661,7 +661,7 @@ int InlineTextBoxArray::findFirstMatching(Item d) const
if ( (*this)[mid] == 0 ) // null item greater
res = -1;
else
- res = ((QGVector*)this)->compareItems( d, (*this)[mid] );
+ res = ((TQGVector*)this)->compareItems( d, (*this)[mid] );
if ( res < 0 )
n2 = mid - 1;
else if ( res > 0 )
@@ -674,7 +674,7 @@ int InlineTextBoxArray::findFirstMatching(Item d) const
/* if ( !found )
return -1; */
// search to first one equal or bigger
- while ( found && (mid > 0) && !((QGVector*)this)->compareItems(d, (*this)[mid-1]) )
+ while ( found && (mid > 0) && !((TQGVector*)this)->compareItems(d, (*this)[mid-1]) )
mid--;
return mid;
}
@@ -697,7 +697,7 @@ RenderText::RenderText(DOM::NodeImpl* node, DOMStringImpl *_str)
m_hasReturn = true;
#ifdef DEBUG_LAYOUT
- QConstString cstr(str->s, str->l);
+ TQConstString cstr(str->s, str->l);
kdDebug( 6040 ) << "RenderText ctr( "<< cstr.string().length() << " ) '" << cstr.string() << "'" << endl;
#endif
}
@@ -931,7 +931,7 @@ void RenderText::caretPos(int offset, int flags, int &_x, int &_y, int &width, i
RenderText *t = s->renderText();
// kdDebug(6040) << "offset="<<offset << " pos="<<pos << endl;
- const QFontMetrics &fm = t->metrics( s->m_firstLine );
+ const TQFontMetrics &fm = t->metrics( s->m_firstLine );
height = fm.height(); // s->m_height;
_x = s->m_x + s->widthFromStart(pos);
@@ -1150,7 +1150,7 @@ int RenderText::inlineYPos() const
return m_lines.isEmpty() ? 0 : m_lines[0]->yPos();
}
-const QFont &RenderText::font()
+const TQFont &RenderText::font()
{
return style()->font();
}
@@ -1188,7 +1188,7 @@ void RenderText::setText(DOMStringImpl *text, bool force)
if (prevStr->length() == 0)
continue;
- QChar c = (*prevStr)[prevStr->length() - 1];
+ TQChar c = (*prevStr)[prevStr->length() - 1];
if (!c.isSpace())
runOnString = true;
@@ -1218,7 +1218,7 @@ void RenderText::setText(DOMStringImpl *text, bool force)
setNeedsLayoutAndMinMaxRecalc();
#ifdef BIDI_DEBUG
- QConstString cstr(str->s, str->l);
+ TQConstString cstr(str->s, str->l);
kdDebug( 6040 ) << "RenderText::setText( " << cstr.string().length() << " ) '" << cstr.string() << "'" << endl;
#endif
}
@@ -1244,7 +1244,7 @@ short RenderText::lineHeight( bool firstLine ) const
short RenderText::baselinePosition( bool firstLine ) const
{
- const QFontMetrics &fm = metrics( firstLine );
+ const TQFontMetrics &fm = metrics( firstLine );
return fm.ascent() +
( lineHeight( firstLine ) - fm.height() ) / 2;
}
@@ -1268,8 +1268,8 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse)
reverse = reverse && !style()->visuallyOrdered();
#ifdef DEBUG_LAYOUT
- QChar *ch = str->s+from;
- QConstString cstr(ch, len);
+ TQChar *ch = str->s+from;
+ TQConstString cstr(ch, len);
#endif
KHTMLAssert(box->isInlineTextBox());
@@ -1337,7 +1337,7 @@ void RenderText::repaint(Priority p)
bool RenderText::isFixedWidthFont() const
{
- return QFontInfo(style()->font()).fixedPitch();
+ return TQFontInfo(style()->font()).fixedPitch();
}
short RenderText::verticalPositionHint( bool firstLine ) const
@@ -1345,7 +1345,7 @@ short RenderText::verticalPositionHint( bool firstLine ) const
return parent()->verticalPositionHint( firstLine );
}
-const QFontMetrics &RenderText::metrics(bool firstLine) const
+const TQFontMetrics &RenderText::metrics(bool firstLine) const
{
if( firstLine && hasFirstLine() ) {
RenderStyle *pseudoStyle = style()->getPseudoStyle(RenderStyle::FIRST_LINE);
@@ -1372,7 +1372,7 @@ bool RenderText::containsOnlyWhitespace(unsigned int from, unsigned int len) con
{
unsigned int currPos;
for (currPos = from;
- currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].direction() == QChar::DirWS);
+ currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].direction() == TQChar::DirWS);
currPos++);
return currPos >= (from+len);
}
@@ -1407,9 +1407,9 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
hasBreakableChar = m_hasBreakableChar;
hasBreak = m_hasBreak;
- if (stripFrontSpaces && (str->s[0].direction() == QChar::DirWS || (!preserveLF && str->s[0] == '\n'))) {
+ if (stripFrontSpaces && (str->s[0].direction() == TQChar::DirWS || (!preserveLF && str->s[0] == '\n'))) {
const Font *f = htmlFont( false );
- QChar space[1]; space[0] = ' ';
+ TQChar space[1]; space[0] = ' ';
int spaceWidth = f->width(space, 1, 0);
maxW -= spaceWidth;
}
@@ -1459,12 +1459,12 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
#ifdef ENABLE_DUMP
-static QString quoteAndEscapeNonPrintables(const QString &s)
+static TQString quoteAndEscapeNonPrintables(const TQString &s)
{
- QString result;
+ TQString result;
result += '"';
for (uint i = 0; i != s.length(); ++i) {
- QChar c = s.at(i);
+ TQChar c = s.at(i);
if (c == '\\') {
result += "\\\\";
} else if (c == '"') {
@@ -1474,7 +1474,7 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
if (u >= 0x20 && u < 0x7F) {
result += c;
} else {
- QString hex;
+ TQString hex;
hex.sprintf("\\x{%X}", u);
result += hex;
}
@@ -1484,13 +1484,13 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
return result;
}
-static void writeTextRun(QTextStream &ts, const RenderText &o, const InlineTextBox &run)
+static void writeTextRun(TQTextStream &ts, const RenderText &o, const InlineTextBox &run)
{
ts << "text run at (" << run.m_x << "," << run.m_y << ") width " << run.m_width << ": "
<< quoteAndEscapeNonPrintables(o.data().string().mid(run.m_start, run.m_len));
}
-void RenderText::dump(QTextStream &stream, const QString &ind) const
+void RenderText::dump(TQTextStream &stream, const TQString &ind) const
{
RenderObject::dump( stream, ind );
diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h
index c65973c99..2b75043a1 100644
--- a/khtml/rendering/render_text.h
+++ b/khtml/rendering/render_text.h
@@ -30,7 +30,7 @@
#include "rendering/render_object.h"
#include "rendering/render_line.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include <assert.h>
class QPainter;
@@ -80,9 +80,9 @@ public:
virtual bool isInlineTextBox() const { return true; }
void paint(RenderObject::PaintInfo& i, int tx, int ty);
- void paintDecoration(QPainter *pt, const Font *f, int _tx, int _ty, int decoration);
- void paintShadow(QPainter *pt, const Font* f, int _tx, int _ty, const ShadowData *shadow );
- void paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco);
+ void paintDecoration(TQPainter *pt, const Font *f, int _tx, int _ty, int decoration);
+ void paintShadow(TQPainter *pt, const Font* f, int _tx, int _ty, const ShadowData *shadow );
+ void paintSelection(const Font *f, RenderText *text, TQPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco);
void selectionStartEnd(int& sPos, int& ePos);
RenderObject::SelectionState selectionState();
@@ -147,7 +147,7 @@ private:
friend class RenderText;
};
-class InlineTextBoxArray : public QPtrVector<InlineTextBox>
+class InlineTextBoxArray : public TQPtrVector<InlineTextBox>
{
public:
InlineTextBoxArray();
@@ -193,7 +193,7 @@ public:
SelPointState & );
unsigned int length() const { if (str) return str->l; else return 0; }
- QChar *text() const { if (str) return str->s; else return 0; }
+ TQChar *text() const { if (str) return str->s; else return 0; }
unsigned int stringLength() const { return str->l; } // non virtual implementation of length()
virtual void position(InlineBox* box, int from, int len, bool reverse);
@@ -231,7 +231,7 @@ public:
bool hasReturn() const { return m_hasReturn; }
- virtual const QFont &font();
+ virtual const TQFont &font();
virtual short verticalPositionHint( bool firstLine ) const;
bool isFixedWidthFont() const;
@@ -250,7 +250,7 @@ public:
virtual void repaint(Priority p=NormalPriority);
bool hasBreakableChar() const { return m_hasBreakableChar; }
- const QFontMetrics &metrics(bool firstLine) const;
+ const TQFontMetrics &metrics(bool firstLine) const;
const Font *htmlFont(bool firstLine) const;
DOM::TextImpl *element() const
@@ -274,7 +274,7 @@ public:
const InlineTextBoxArray &inlineTextBoxes() const { return m_lines; }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
/** Find the text box that includes the character at @p offset
diff --git a/khtml/rendering/table_layout.cpp b/khtml/rendering/table_layout.cpp
index bf3daad3a..7b5215d02 100644
--- a/khtml/rendering/table_layout.cpp
+++ b/khtml/rendering/table_layout.cpp
@@ -268,7 +268,7 @@ void FixedTableLayout::layout()
#endif
- QMemArray<int> calcWidth;
+ TQMemArray<int> calcWidth;
calcWidth.resize( nEffCols );
calcWidth.fill( -1 );
diff --git a/khtml/rendering/table_layout.h b/khtml/rendering/table_layout.h
index bc28a91a5..cbaf6d3a7 100644
--- a/khtml/rendering/table_layout.h
+++ b/khtml/rendering/table_layout.h
@@ -23,7 +23,7 @@
#ifndef TABLE_LAYOUT_H
#define TABLE_LAYOUT_H
-#include <qmemarray.h>
+#include <tqmemarray.h>
#include <misc/khtmllayout.h>
namespace khtml {
@@ -60,7 +60,7 @@ public:
protected:
int calcWidthArray();
- QMemArray<Length> width;
+ TQMemArray<Length> width;
};
// -------------------------------------------------------------------------
@@ -100,8 +100,8 @@ protected:
short calcWidth;
};
- QMemArray<Layout> layoutStruct;
- QMemArray<RenderTableCell *>spanCells;
+ TQMemArray<Layout> layoutStruct;
+ TQMemArray<RenderTableCell *>spanCells;
bool hasPercent : 1;
mutable bool percentagesDirty : 1;
mutable bool effWidthDirty : 1;
diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp
index 2e67b614e..9c10083c3 100644
--- a/khtml/test_regression.cpp
+++ b/khtml/test_regression.cpp
@@ -32,8 +32,8 @@
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include "test_regression.h"
#include <unistd.h>
#include <stdio.h>
@@ -67,20 +67,20 @@
#include <ksimpleconfig.h>
#include <kglobalsettings.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qscrollview.h>
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqobject.h>
+#include <tqpushbutton.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kstatusbar.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "misc/decoder.h"
#include "dom/dom2_range.h"
@@ -118,9 +118,9 @@ PartMonitor::PartMonitor(KHTMLPart *_part)
{
m_part = _part;
m_completed = false;
- connect(m_part,SIGNAL(completed()),this,SLOT(partCompleted()));
+ connect(m_part,TQT_SIGNAL(completed()),this,TQT_SLOT(partCompleted()));
m_timer_waits = 200;
- m_timeout_timer = new QTimer(this);
+ m_timeout_timer = new TQTimer(this);
}
PartMonitor::~PartMonitor()
@@ -141,12 +141,12 @@ void PartMonitor::waitForCompletion()
kapp->enter_loop();
- //connect(m_timeout_timer, SIGNAL(timeout()), this, SLOT( timeout() ) );
+ //connect(m_timeout_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT( timeout() ) );
//m_timeout_timer->stop();
//m_timeout_timer->start( visual ? 100 : 2, true );
}
- QTimer::singleShot( 0, this, SLOT( finishTimers() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( finishTimers() ) );
kapp->enter_loop();
}
@@ -161,7 +161,7 @@ void PartMonitor::finishTimers()
--m_timer_waits;
if ( m_timer_waits && (w && w->winq->hasTimers()) || m_part->inProgress()) {
// wait a bit
- QTimer::singleShot( 10, this, SLOT(finishTimers() ) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(finishTimers() ) );
return;
}
kapp->exit_loop();
@@ -172,9 +172,9 @@ void PartMonitor::partCompleted()
m_completed = true;
RenderWidget::flushWidgetResizes();
m_timeout_timer->stop();
- connect(m_timeout_timer, SIGNAL(timeout()),this, SLOT( timeout() ) );
+ connect(m_timeout_timer, TQT_SIGNAL(timeout()),this, TQT_SLOT( timeout() ) );
m_timeout_timer->start( visual ? 100 : 2, true );
- disconnect(m_part,SIGNAL(completed()),this,SLOT(partCompleted()));
+ disconnect(m_part,TQT_SIGNAL(completed()),this,TQT_SLOT(partCompleted()));
}
static void signal_handler( int )
@@ -217,15 +217,15 @@ Value RegTestFunction::call(ExecState *exec, Object &/*thisObj*/, const List &ar
UString str = args[0].toString(exec);
if ( str.qstring().lower().find( "failed!" ) >= 0 )
m_regTest->saw_failure = true;
- QString res = str.qstring().replace('\007', "");
+ TQString res = str.qstring().replace('\007', "");
m_regTest->m_currentOutput += res + "\n";
break;
}
case ReportResult: {
bool passed = args[0].toBoolean(exec);
- QString description = args[1].toString(exec).qstring();
+ TQString description = args[1].toString(exec).qstring();
if (args[1].isA(UndefinedType) || args[1].isA(NullType))
- description = QString::null;
+ description = TQString::null;
m_regTest->reportResult(passed,description);
if ( !passed )
m_regTest->saw_failure = true;
@@ -238,7 +238,7 @@ Value RegTestFunction::call(ExecState *exec, Object &/*thisObj*/, const List &ar
docimpl->updateRendering();
docimpl->view()->layout();
}
- QString filename = args[0].toString(exec).qstring();
+ TQString filename = args[0].toString(exec).qstring();
filename = RegressionTest::curr->m_currentCategory+"/"+filename;
int failures = RegressionTest::NoFailure;
if ( m_regTest->m_genOutput ) {
@@ -316,8 +316,8 @@ Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &
return Undefined();
}
- QString filename = args[0].toString(exec).qstring();
- QString fullFilename = QFileInfo(RegressionTest::curr->m_currentBase+"/"+filename).absFilePath();
+ TQString filename = args[0].toString(exec).qstring();
+ TQString fullFilename = TQFileInfo(RegressionTest::curr->m_currentBase+"/"+filename).absFilePath();
KURL url;
url.setProtocol("file");
url.setPath(fullFilename);
@@ -337,16 +337,16 @@ Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &
return Undefined();
}
- QString filename = args[0].toString(exec).qstring();
- QString url = args[1].toString(exec).qstring();
- QFile file(RegressionTest::curr->m_currentBase+"/"+filename);
+ TQString filename = args[0].toString(exec).qstring();
+ TQString url = args[1].toString(exec).qstring();
+ TQFile file(RegressionTest::curr->m_currentBase+"/"+filename);
if (!file.open(IO_ReadOnly)) {
exec->setException(Error::create(exec, GeneralError,
- QString("Error reading " + filename).latin1()));
+ TQString("Error reading " + filename).latin1()));
}
else {
- QByteArray fileData;
- QDataStream stream(fileData,IO_WriteOnly);
+ TQByteArray fileData;
+ TQDataStream stream(fileData,IO_WriteOnly);
char buf[1024];
int bytesread;
while (!file.atEnd()) {
@@ -354,7 +354,7 @@ Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &
stream.writeRawBytes(buf,bytesread);
}
file.close();
- QString contents(fileData);
+ TQString contents(fileData);
PartMonitor pm(m_part);
m_part->begin(KURL( url ));
m_part->write(contents);
@@ -365,12 +365,12 @@ Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &
break;
}
case Begin: {
- QString url = args[0].toString(exec).qstring();
+ TQString url = args[0].toString(exec).qstring();
m_part->begin(KURL( url ));
break;
}
case Write: {
- QString str = args[0].toString(exec).qstring();
+ TQString str = args[0].toString(exec).qstring();
m_part->write(str);
break;
}
@@ -380,7 +380,7 @@ Value KHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List &
break;
}
case ExecuteScript: {
- QString code = args[0].toString(exec).qstring();
+ TQString code = args[0].toString(exec).qstring();
Completion comp;
KJSProxy *proxy = m_part->jScript();
proxy->evaluate("",0,code,0,&comp);
@@ -422,7 +422,7 @@ static KCmdLineOptions options[] =
KCmdLineLastOption
};
-static bool existsDir(QCString dir)
+static bool existsDir(TQCString dir)
{
struct stat st;
@@ -438,7 +438,7 @@ int main(int argc, char *argv[])
exit(1);
}
- QString kh("/var/tmp/%1_non_existant");
+ TQString kh("/var/tmp/%1_non_existant");
kh = kh.arg( pw->pw_name );
setenv( "KDEHOME", kh.latin1(), 1 );
setenv( "LC_ALL", "C", 1 );
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
signal( SIGALRM, signal_handler );
// workaround various Qt crashes by always enforcing a TrueColor visual
- QApplication::setColorSpec( QApplication::ManyColor );
+ TQApplication::setColorSpec( TQApplication::ManyColor );
KCmdLineArgs::init(argc, argv, "testregression", "TestRegression",
"Regression tester for khtml", "1.0");
@@ -455,7 +455,7 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
- QCString baseDir = args->getOption("base");
+ TQCString baseDir = args->getOption("base");
if ( args->count() < 1 && baseDir.isEmpty() ) {
KCmdLineArgs::usage();
@@ -465,12 +465,12 @@ int main(int argc, char *argv[])
int testcase_index = 0;
if (baseDir.isEmpty()) baseDir = args->arg(testcase_index++);
- QFileInfo bdInfo(baseDir);
- baseDir = QFile::encodeName(bdInfo.absFilePath());
+ TQFileInfo bdInfo(baseDir);
+ baseDir = TQFile::encodeName(bdInfo.absFilePath());
const char *subdirs[] = {"tests", "baseline", "output", "resources"};
for ( int i = 0; i < 3; i++ ) {
- QFileInfo sourceDir(QFile::encodeName( baseDir ) + "/" + subdirs[i]);
+ TQFileInfo sourceDir(TQFile::encodeName( baseDir ) + "/" + subdirs[i]);
if ( !sourceDir.exists() || !sourceDir.isDir() ) {
fprintf(stderr,"ERROR: Source directory \"%s/%s\": no such directory.\n", (const char *)baseDir, subdirs[i]);
exit(1);
@@ -479,14 +479,14 @@ int main(int argc, char *argv[])
if (args->isSet("xvfb"))
{
- QString xvfbPath = KStandardDirs::findExe("Xvfb");
+ TQString xvfbPath = KStandardDirs::findExe("Xvfb");
if ( xvfbPath.isEmpty() ) {
fprintf( stderr, "ERROR: We need Xvfb to be installed for reliable results\n" );
exit( 1 );
}
- QCString xvfbPath8 = QFile::encodeName(xvfbPath);
- QStringList fpaths;
+ TQCString xvfbPath8 = TQFile::encodeName(xvfbPath);
+ TQStringList fpaths;
fpaths.append(baseDir+"/resources");
const char* const fontdirs[] = { "75dpi", "misc", "Type1" };
@@ -495,15 +495,15 @@ int main(int argc, char *argv[])
for (size_t fp=0; fp < sizeof(fontpaths)/sizeof(*fontpaths); ++fp)
for (size_t fd=0; fd < sizeof(fontdirs)/sizeof(*fontdirs); ++fd)
- if (existsDir(QCString(fontpaths[fp])+QCString(fontdirs[fd])))
+ if (existsDir(TQCString(fontpaths[fp])+TQCString(fontdirs[fd])))
if (strcmp(fontdirs[fd] , "Type1"))
- fpaths.append(QCString(fontpaths[fp])+QCString(fontdirs[fd])+":unscaled");
+ fpaths.append(TQCString(fontpaths[fp])+TQCString(fontdirs[fd])+":unscaled");
else
- fpaths.append(QCString(fontpaths[fp])+QCString(fontdirs[fd]));
+ fpaths.append(TQCString(fontpaths[fp])+TQCString(fontdirs[fd]));
xvfb = fork();
if ( !xvfb ) {
- QCString buffer = fpaths.join(",").latin1();
+ TQCString buffer = fpaths.join(",").latin1();
execl( xvfbPath8.data(), xvfbPath8.data(), "-once", "-dpi", "100", "-screen", "0",
"1024x768x16", "-ac", "-fp", buffer.data(), ":47", (char*)NULL );
}
@@ -531,7 +531,7 @@ int main(int argc, char *argv[])
cfg.writeEntry( "FantasyFont", HTML_DEFAULT_VIEW_FANTASY_FONT );
cfg.writeEntry( "MinimumFontSize", HTML_DEFAULT_MIN_FONT_SIZE );
cfg.writeEntry( "MediumFontSize", 10 );
- cfg.writeEntry( "Fonts", QStringList() );
+ cfg.writeEntry( "Fonts", TQStringList() );
cfg.writeEntry( "DefaultEncoding", "" );
cfg.setGroup("Java/JavaScript Settings");
cfg.writeEntry( "WindowOpenPolicy", KHTMLSettings::KJSWindowOpenAllow);
@@ -548,7 +548,7 @@ int main(int argc, char *argv[])
171, 7101, 7002, 7019, 7027, 7014,
7011, 6070, 6080, 6090, 0};
for ( int i = 0; areas[i]; ++i ) {
- dc.setGroup( QString::number( areas[i] ) );
+ dc.setGroup( TQString::number( areas[i] ) );
dc.writeEntry( "InfoOutput", 4 );
}
dc.sync();
@@ -593,10 +593,10 @@ int main(int argc, char *argv[])
args->isSet("genoutput"),
!args->isSet( "html" ),
!args->isSet( "js" ));
- QObject::connect(part->browserExtension(), SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
- regressionTest, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
- QObject::connect(part->browserExtension(), SIGNAL(resizeTopLevelWidget( int, int )),
- regressionTest, SLOT(resizeTopLevelWidget( int, int )));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),
+ regressionTest, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &)));
+ TQObject::connect(part->browserExtension(), TQT_SIGNAL(resizeTopLevelWidget( int, int )),
+ regressionTest, TQT_SLOT(resizeTopLevelWidget( int, int )));
bool result = false;
QCStringList tests = args->getOptionList("test");
@@ -604,7 +604,7 @@ int main(int argc, char *argv[])
for (; testcase_index < args->count(); testcase_index++)
tests << args->arg(testcase_index);
if (tests.count() > 0)
- for (QValueListConstIterator<QCString> it = tests.begin(); it != tests.end(); ++it) {
+ for (TQValueListConstIterator<TQCString> it = tests.begin(); it != tests.end(); ++it) {
result = regressionTest->runTests(*it,true);
if (!result) break;
}
@@ -636,10 +636,10 @@ int main(int argc, char *argv[])
if ( regressionTest->m_errors )
printf("Errors: %d\n",regressionTest->m_errors);
- QFile list( regressionTest->m_outputDir + "/links.html" );
+ TQFile list( regressionTest->m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link, cl;
- link = QString( "<hr>%1 failures. (%2 expected failures)" )
+ TQString link, cl;
+ link = TQString( "<hr>%1 failures. (%2 expected failures)" )
.arg(regressionTest->m_failures_work )
.arg( regressionTest->m_failures_fail );
list.writeBlock( link.latin1(), link.length() );
@@ -670,9 +670,9 @@ int main(int argc, char *argv[])
RegressionTest *RegressionTest::curr = 0;
-RegressionTest::RegressionTest(KHTMLPart *part, const QString &baseDir, const QString &outputDir,
+RegressionTest::RegressionTest(KHTMLPart *part, const TQString &baseDir, const TQString &outputDir,
bool _genOutput, bool runJS, bool runHTML)
- : QObject(part)
+ : TQObject(part)
{
m_part = part;
m_baseDir = baseDir;
@@ -692,9 +692,9 @@ RegressionTest::RegressionTest(KHTMLPart *part, const QString &baseDir, const QS
m_failures_work = m_failures_fail = 0;
m_errors = 0;
- ::unlink( QFile::encodeName( m_outputDir + "/links.html" ) );
- QFile f( m_outputDir + "/empty.html" );
- QString s;
+ ::unlink( TQFile::encodeName( m_outputDir + "/links.html" ) );
+ TQFile f( m_outputDir + "/empty.html" );
+ TQString s;
f.open( IO_WriteOnly | IO_Truncate );
s = "<html><body>Follow the white rabbit";
f.writeBlock( s.latin1(), s.length() );
@@ -710,22 +710,22 @@ RegressionTest::RegressionTest(KHTMLPart *part, const QString &baseDir, const QS
curr = this;
}
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-static QStringList readListFile( const QString &filename )
+static TQStringList readListFile( const TQString &filename )
{
// Read ignore file for this directory
- QString ignoreFilename = filename;
- QFileInfo ignoreInfo(ignoreFilename);
- QStringList ignoreFiles;
+ TQString ignoreFilename = filename;
+ TQFileInfo ignoreInfo(ignoreFilename);
+ TQStringList ignoreFiles;
if (ignoreInfo.exists()) {
- QFile ignoreFile(ignoreFilename);
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly)) {
fprintf(stderr,"Can't open %s\n",ignoreFilename.latin1());
exit(1);
}
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull())
ignoreFiles.append(line);
ignoreFile.close();
@@ -738,17 +738,17 @@ RegressionTest::~RegressionTest()
delete m_paintBuffer;
}
-bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure)
+bool RegressionTest::runTests(TQString relPath, bool mustExist, int known_failure)
{
- m_currentOutput = QString::null;
+ m_currentOutput = TQString::null;
- if (!QFile(m_baseDir + "/tests/"+relPath).exists()) {
+ if (!TQFile(m_baseDir + "/tests/"+relPath).exists()) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
return false;
}
- QString fullPath = m_baseDir + "/tests/"+relPath;
- QFileInfo info(fullPath);
+ TQString fullPath = m_baseDir + "/tests/"+relPath;
+ TQFileInfo info(fullPath);
if (!info.exists() && mustExist) {
fprintf(stderr,"%s: No such file or directory\n",relPath.latin1());
@@ -761,14 +761,14 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
}
if (info.isDir()) {
- QStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
- QStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
+ TQStringList ignoreFiles = readListFile( m_baseDir + "/tests/"+relPath+"/ignore" );
+ TQStringList failureFiles = readListFile( m_baseDir + "/tests/"+relPath+"/KNOWN_FAILURES" );
// Run each test in this directory, recusively
- QDir sourceDir(m_baseDir + "/tests/"+relPath);
+ TQDir sourceDir(m_baseDir + "/tests/"+relPath);
for (uint fileno = 0; fileno < sourceDir.count(); fileno++) {
- QString filename = sourceDir[fileno];
- QString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
+ TQString filename = sourceDir[fileno];
+ TQString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
if (filename == "." || filename == ".." || ignoreFiles.contains(filename) )
continue;
@@ -790,8 +790,8 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
khtml::Cache::init();
- QString relativeDir = QFileInfo(relPath).dirPath();
- QString filename = info.fileName();
+ TQString relativeDir = TQFileInfo(relPath).dirPath();
+ TQString filename = info.fileName();
m_currentBase = m_baseDir + "/tests/"+relativeDir;
m_currentCategory = relativeDir;
m_currentTest = filename;
@@ -820,7 +820,7 @@ bool RegressionTest::runTests(QString relPath, bool mustExist, int known_failure
return true;
}
-void RegressionTest::getPartDOMOutput( QTextStream &outputStream, KHTMLPart* part, uint indent )
+void RegressionTest::getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* part, uint indent )
{
Node node = part->document();
while (!node.isNull()) {
@@ -833,22 +833,22 @@ void RegressionTest::getPartDOMOutput( QTextStream &outputStream, KHTMLPart* par
switch (node.nodeType()) {
case Node::ELEMENT_NODE: {
// Sort strings to ensure consistent output
- QStringList attrNames;
+ TQStringList attrNames;
NamedNodeMap attrs = node.attributes();
for (uint a = 0; a < attrs.length(); a++)
attrNames.append(attrs.item(a).nodeName().string());
attrNames.sort();
- QStringList::iterator it;
+ TQStringList::iterator it;
Element elem(node);
for (it = attrNames.begin(); it != attrNames.end(); ++it) {
- QString name = *it;
- QString value = elem.getAttribute(*it).string();
+ TQString name = *it;
+ TQString value = elem.getAttribute(*it).string();
outputStream << " " << name << "=\"" << value << "\"";
}
if ( node.handle()->id() == ID_FRAME ) {
outputStream << endl;
- QString frameName = static_cast<DOM::HTMLFrameElementImpl *>( node.handle() )->name.string();
+ TQString frameName = static_cast<DOM::HTMLFrameElementImpl *>( node.handle() )->name.string();
KHTMLPart* frame = part->findFrame( frameName );
Q_ASSERT( frame );
if ( frame )
@@ -910,7 +910,7 @@ void RegressionTest::getPartDOMOutput( QTextStream &outputStream, KHTMLPart* par
}
}
-void RegressionTest::dumpRenderTree( QTextStream &outputStream, KHTMLPart* part )
+void RegressionTest::dumpRenderTree( TQTextStream &outputStream, KHTMLPart* part )
{
DOM::DocumentImpl* doc = static_cast<DocumentImpl*>( part->document().handle() );
if ( !doc || !doc->renderer() )
@@ -919,9 +919,9 @@ void RegressionTest::dumpRenderTree( QTextStream &outputStream, KHTMLPart* part
// Dump frames if any
// Get list of names instead of frames() to sort the list alphabetically
- QStringList names = part->frameNames();
+ TQStringList names = part->frameNames();
names.sort();
- for ( QStringList::iterator it = names.begin(); it != names.end(); ++it ) {
+ for ( TQStringList::iterator it = names.begin(); it != names.end(); ++it ) {
outputStream << "FRAME: " << (*it) << "\n";
KHTMLPart* frame = part->findFrame( (*it) );
Q_ASSERT( frame );
@@ -930,11 +930,11 @@ void RegressionTest::dumpRenderTree( QTextStream &outputStream, KHTMLPart* part
}
}
-QString RegressionTest::getPartOutput( OutputType type)
+TQString RegressionTest::getPartOutput( OutputType type)
{
// dump out the contents of the rendering & DOM trees
- QString dump;
- QTextStream outputStream(dump,IO_WriteOnly);
+ TQString dump;
+ TQTextStream outputStream(dump,IO_WriteOnly);
if ( type == RenderTree ) {
dumpRenderTree( outputStream, m_part );
@@ -943,35 +943,35 @@ QString RegressionTest::getPartOutput( OutputType type)
getPartDOMOutput( outputStream, m_part, 0 );
}
- dump.replace( m_baseDir + "/tests", QString::fromLatin1( "REGRESSION_SRCDIR" ) );
+ dump.replace( m_baseDir + "/tests", TQString::fromLatin1( "REGRESSION_SRCDIR" ) );
return dump;
}
-QImage RegressionTest::renderToImage()
+TQImage RegressionTest::renderToImage()
{
int ew = m_part->view()->contentsWidth();
int eh = m_part->view()->contentsHeight();
if (ew * eh > 4000 * 4000) // don't DoS us
- return QImage();
+ return TQImage();
- QImage img( ew, eh, 32 );
+ TQImage img( ew, eh, 32 );
img.fill( 0xff0000 );
if (!m_paintBuffer )
- m_paintBuffer = new QPixmap( 512, 128, -1, QPixmap::MemoryOptim );
+ m_paintBuffer = new TQPixmap( 512, 128, -1, TQPixmap::MemoryOptim );
for ( int py = 0; py < eh; py += 128 ) {
for ( int px = 0; px < ew; px += 512 ) {
- QPainter* tp = new QPainter;
+ TQPainter* tp = new QPainter;
tp->begin( m_paintBuffer );
tp->translate( -px, -py );
tp->fillRect(px, py, 512, 128, Qt::magenta);
- m_part->document().handle()->renderer()->layer()->paint( tp, QRect( px, py, 512, 128 ) );
+ m_part->document().handle()->renderer()->layer()->paint( tp, TQRect( px, py, 512, 128 ) );
tp->end();
delete tp;
// now fill the chunk into our image
- QImage chunk = m_paintBuffer->convertToImage();
+ TQImage chunk = m_paintBuffer->convertToImage();
assert( chunk.depth() == 32 );
for ( int y = 0; y < 128 && py + y < eh; ++y )
memcpy( img.scanLine( py+y ) + px*4, chunk.scanLine( y ), kMin( 512, ew-px )*4 );
@@ -982,7 +982,7 @@ QImage RegressionTest::renderToImage()
return img;
}
-bool RegressionTest::imageEqual( const QImage &lhsi, const QImage &rhsi )
+bool RegressionTest::imageEqual( const TQImage &lhsi, const TQImage &rhsi )
{
if ( lhsi.width() != rhsi.width() || lhsi.height() != rhsi.height() ) {
kdDebug() << "dimensions different " << lhsi.size() << " " << rhsi.size() << endl;
@@ -1004,7 +1004,7 @@ bool RegressionTest::imageEqual( const QImage &lhsi, const QImage &rhsi )
( abs( qGreen( l ) - qGreen(r ) ) < 20 ) &&
( abs( qBlue( l ) - qBlue(r ) ) < 20 ) )
continue;
- kdDebug() << "pixel (" << x << ", " << y << ") is different " << QColor( lhsi.pixel ( x, y ) ) << " " << QColor( rhsi.pixel ( x, y ) ) << endl;
+ kdDebug() << "pixel (" << x << ", " << y << ") is different " << TQColor( lhsi.pixel ( x, y ) ) << " " << TQColor( rhsi.pixel ( x, y ) ) << endl;
return false;
}
}
@@ -1013,14 +1013,14 @@ bool RegressionTest::imageEqual( const QImage &lhsi, const QImage &rhsi )
return true;
}
-void RegressionTest::createLink( const QString& test, int failures )
+void RegressionTest::createLink( const TQString& test, int failures )
{
createMissingDirs( m_outputDir + "/" + test + "-compare.html" );
- QFile list( m_outputDir + "/links.html" );
+ TQFile list( m_outputDir + "/links.html" );
list.open( IO_WriteOnly|IO_Append );
- QString link;
- link = QString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
+ TQString link;
+ link = TQString( "<a href=\"%1\" target=\"content\" title=\"%2\">" )
.arg( test + "-compare.html" )
.arg( test );
link += m_currentTest;
@@ -1036,21 +1036,21 @@ void RegressionTest::createLink( const QString& test, int failures )
list.close();
}
-void RegressionTest::doJavascriptReport( const QString &test )
+void RegressionTest::doJavascriptReport( const TQString &test )
{
- QFile compare( m_outputDir + "/" + test + "-compare.html" );
+ TQFile compare( m_outputDir + "/" + test + "-compare.html" );
if ( !compare.open( IO_WriteOnly|IO_Truncate ) )
kdDebug() << "failed to open " << m_outputDir + "/" + test + "-compare.html" << endl;
- QString cl;
- cl = QString( "<html><head><title>%1</title>" ).arg( test );
+ TQString cl;
+ cl = TQString( "<html><head><title>%1</title>" ).arg( test );
cl += "<body><tt>";
- QString text = "\n" + m_currentOutput;
+ TQString text = "\n" + m_currentOutput;
text.replace( '<', "&lt;" );
text.replace( '>', "&gt;" );
- text.replace( QRegExp( "\nFAILED" ), "\n<span style='color: red'>FAILED</span>" );
- text.replace( QRegExp( "\nFAIL" ), "\n<span style='color: red'>FAIL</span>" );
- text.replace( QRegExp( "\nPASSED" ), "\n<span style='color: green'>PASSED</span>" );
- text.replace( QRegExp( "\nPASS" ), "\n<span style='color: green'>PASS</span>" );
+ text.replace( TQRegExp( "\nFAILED" ), "\n<span style='color: red'>FAILED</span>" );
+ text.replace( TQRegExp( "\nFAIL" ), "\n<span style='color: red'>FAIL</span>" );
+ text.replace( TQRegExp( "\nPASSED" ), "\n<span style='color: green'>PASSED</span>" );
+ text.replace( TQRegExp( "\nPASS" ), "\n<span style='color: green'>PASS</span>" );
if ( text.at( 0 ) == '\n' )
text = text.mid( 1, text.length() );
text.replace( '\n', "<br>\n" );
@@ -1066,10 +1066,10 @@ void RegressionTest::doJavascriptReport( const QString &test )
* @return path with all elements replaced by .. and concerning path elements
* to be relatively reachable from base.
*/
-static QString makeRelativePath(const QString &base, const QString &path)
+static TQString makeRelativePath(const TQString &base, const TQString &path)
{
- QString absBase = QFileInfo(base).absFilePath();
- QString absPath = QFileInfo(path).absFilePath();
+ TQString absBase = TQFileInfo(base).absFilePath();
+ TQString absPath = TQFileInfo(path).absFilePath();
// kdDebug() << "absPath: \"" << absPath << "\"" << endl;
// kdDebug() << "absBase: \"" << absBase << "\"" << endl;
@@ -1079,8 +1079,8 @@ static QString makeRelativePath(const QString &base, const QString &path)
pos++;
int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length();
- QConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
- QConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
+ TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
+ TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@@ -1092,10 +1092,10 @@ static QString makeRelativePath(const QString &base, const QString &path)
// kdDebug() << "basepos " << basepos << " pathpos " << pathpos << endl;
- QString rel;
+ TQString rel;
{
- QConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
- QConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
+ TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
+ TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i)
@@ -1108,10 +1108,10 @@ static QString makeRelativePath(const QString &base, const QString &path)
return rel;
}
-void RegressionTest::doFailureReport( const QString& test, int failures )
+void RegressionTest::doFailureReport( const TQString& test, int failures )
{
if ( failures == NoFailure ) {
- ::unlink( QFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
+ ::unlink( TQFile::encodeName( m_outputDir + "/" + test + "-compare.html" ) );
return;
}
@@ -1122,27 +1122,27 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
return; // no support for both kind
}
- QFile compare( m_outputDir + "/" + test + "-compare.html" );
+ TQFile compare( m_outputDir + "/" + test + "-compare.html" );
- QString testFile = QFileInfo(test).fileName();
+ TQString testFile = TQFileInfo(test).fileName();
- QString renderDiff;
- QString domDiff;
+ TQString renderDiff;
+ TQString domDiff;
- QString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
+ TQString relOutputDir = makeRelativePath(m_baseDir, m_outputDir);
// are blocking reads possible with KProcess?
char pwd[PATH_MAX];
(void) getcwd( pwd, PATH_MAX );
- chdir( QFile::encodeName( m_baseDir ) );
+ chdir( TQFile::encodeName( m_baseDir ) );
if ( failures & RenderFailure ) {
renderDiff += "<pre>";
- FILE *pipe = popen( QString::fromLatin1( "diff -u baseline/%1-render %3/%2-render" )
+ FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-render %3/%2-render" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
- QTextIStream *is = new QTextIStream( pipe );
+ TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
- QString line = is->readLine();
+ TQString line = is->readLine();
line = line.replace( '<', "&lt;" );
line = line.replace( '>', "&gt;" );
renderDiff += line + "\n";
@@ -1154,11 +1154,11 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
if ( failures & DomFailure ) {
domDiff += "<pre>";
- FILE *pipe = popen( QString::fromLatin1( "diff -u baseline/%1-dom %3/%2-dom" )
+ FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-dom %3/%2-dom" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
- QTextIStream *is = new QTextIStream( pipe );
+ TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
- QString line = is->readLine();
+ TQString line = is->readLine();
line = line.replace( '<', "&lt;" );
line = line.replace( '>', "&gt;" );
domDiff += line + "\n";
@@ -1171,13 +1171,13 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
chdir( pwd );
// create a relative path so that it works via web as well. ugly
- QString relpath = makeRelativePath(m_outputDir + "/"
- + QFileInfo(test).dirPath(), m_baseDir);
+ TQString relpath = makeRelativePath(m_outputDir + "/"
+ + TQFileInfo(test).dirPath(), m_baseDir);
compare.open( IO_WriteOnly|IO_Truncate );
- QString cl;
- cl = QString( "<html><head><title>%1</title>" ).arg( test );
- cl += QString( "<script>\n"
+ TQString cl;
+ cl = TQString( "<html><head><title>%1</title>" ).arg( test );
+ cl += TQString( "<script>\n"
"var pics = new Array();\n"
"pics[0]=new Image();\n"
"pics[0].src = '%1';\n"
@@ -1188,7 +1188,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"var lastb=0;\n" )
.arg( relpath+"/baseline/"+test+"-dump.png" )
.arg( testFile+"-dump.png" );
- cl += QString( "function toggleVisible(visible) {\n"
+ cl += TQString( "function toggleVisible(visible) {\n"
" document.getElementById('render').style.visibility= visible == 'render' ? 'visible' : 'hidden';\n"
" document.getElementById('image').style.visibility= visible == 'image' ? 'visible' : 'hidden';\n"
" document.getElementById('dom').style.visibility= visible == 'dom' ? 'visible' : 'hidden';\n"
@@ -1197,7 +1197,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"document.getElementById('image').style.borderColor = t && !doflicker ? 'red' : 'gray';\n"
"toggleVisible('image');\n"
"}" );
- cl += QString ( "function runSlideShow(){\n"
+ cl += TQString ( "function runSlideShow(){\n"
" document.getElementById('image').src = pics[t].src;\n"
" if (doflicker)\n"
" t = 1 - t;\n"
@@ -1214,21 +1214,21 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
"}\n"
"</script>\n");
- cl += QString ("<style>\n"
+ cl += TQString ("<style>\n"
".buttondown { cursor: pointer; padding: 0px 20px; color: white; background-color: blue; border: inset blue 2px;}\n"
".button { cursor: pointer; padding: 0px 20px; color: black; background-color: white; border: outset blue 2px;}\n"
".diff { position: absolute; left: 10px; top: 100px; visibility: hidden; border: 1px black solid; background-color: white; color: black; /* width: 800; height: 600; overflow: scroll; */ }\n"
"</style>\n" );
if ( failures & PaintFailure )
- cl += QString( "<body onload=\"m(1); show(); runSlideShow();\"" );
+ cl += TQString( "<body onload=\"m(1); show(); runSlideShow();\"" );
else if ( failures & RenderFailure )
- cl += QString( "<body onload=\"m(4); toggleVisible('render');\"" );
+ cl += TQString( "<body onload=\"m(4); toggleVisible('render');\"" );
else
- cl += QString( "<body onload=\"m(5); toggleVisible('dom');\"" );
- cl += QString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
+ cl += TQString( "<body onload=\"m(5); toggleVisible('dom');\"" );
+ cl += TQString(" text=black bgcolor=gray>\n<h1>%3</h1>\n" ).arg( test );
if ( failures & PaintFailure )
- cl += QString ( "<span id='b1' class='buttondown' onclick=\"doflicker=1;show();m(1)\">FLICKER</span>&nbsp;\n"
+ cl += TQString ( "<span id='b1' class='buttondown' onclick=\"doflicker=1;show();m(1)\">FLICKER</span>&nbsp;\n"
"<span id='b2' class='button' onclick=\"doflicker=0;t=0;show();m(2)\">BASE</span>&nbsp;\n"
"<span id='b3' class='button' onclick=\"doflicker=0;t=1;show();m(3)\">OUT</span>&nbsp;\n" );
if ( renderDiff.length() )
@@ -1236,11 +1236,11 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
if ( domDiff.length() )
cl += "<span id='b5' class='button' onclick='showDom();m(5);'>D-DIFF</span>&nbsp;\n";
// The test file always exists - except for checkOutput called from *.js files
- if ( QFile::exists( m_baseDir + "/tests/"+ test ) )
- cl += QString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
+ if ( TQFile::exists( m_baseDir + "/tests/"+ test ) )
+ cl += TQString( "<a class=button href=\"%1\">HTML</a>&nbsp;" )
.arg( relpath+"/tests/"+test );
- cl += QString( "<hr>"
+ cl += TQString( "<hr>"
"<img style='border: solid 5px gray' src=\"%1\" id='image'>" )
.arg( relpath+"/baseline/"+test+"-dump.png" );
@@ -1252,7 +1252,7 @@ void RegressionTest::doFailureReport( const QString& test, int failures )
compare.close();
}
-void RegressionTest::testStaticFile(const QString & filename)
+void RegressionTest::testStaticFile(const TQString & filename)
{
qApp->mainWidget()->resize( 800, 600); // restore size
@@ -1265,14 +1265,14 @@ void RegressionTest::testStaticFile(const QString & filename)
// load page
KURL url;
url.setProtocol("file");
- url.setPath(QFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
+ url.setPath(TQFileInfo(m_baseDir + "/tests/"+filename).absFilePath());
PartMonitor pm(m_part);
m_part->openURL(url);
pm.waitForCompletion();
m_part->closeURL();
if ( filename.startsWith( "domts/" ) ) {
- QString functionname;
+ TQString functionname;
KJS::Completion comp = m_part->jScriptInterpreter()->evaluate("exposeTestFunctionNames();");
/*
@@ -1299,7 +1299,7 @@ void RegressionTest::testStaticFile(const QString & filename)
KJS::Completion comp2 = m_part->jScriptInterpreter()->evaluate("setUpPage(); " + functionname + "();" );
bool success = ( comp2.complType() == ReturnValue || comp2.complType() == Normal );
- QString description = "DOMTS";
+ TQString description = "DOMTS";
if ( comp2.complType() == Throw ) {
KJS::Value val = comp2.value();
KJS::Object obj = Object::dynamicCast(val);
@@ -1327,7 +1327,7 @@ void RegressionTest::testStaticFile(const QString & filename)
if ( m_known_failures & PaintFailure )
m_known_failures = AllFailure;
renderToImage().save(m_baseDir + "/baseline/" + filename + "-dump.png","PNG", 60);
- printf("Generated %s\n", QString( m_baseDir + "/baseline/" + filename + "-dump.png" ).latin1() );
+ printf("Generated %s\n", TQString( m_baseDir + "/baseline/" + filename + "-dump.png" ).latin1() );
reportResult( true, "PAINT" );
} else {
int failures = NoFailure;
@@ -1354,19 +1354,19 @@ void RegressionTest::testStaticFile(const QString & filename)
m_known_failures = back_known_failures;
}
-void RegressionTest::evalJS( ScriptInterpreter &interp, const QString &filename, bool report_result )
+void RegressionTest::evalJS( ScriptInterpreter &interp, const TQString &filename, bool report_result )
{
- QString fullSourceName = filename;
- QFile sourceFile(fullSourceName);
+ TQString fullSourceName = filename;
+ TQFile sourceFile(fullSourceName);
if (!sourceFile.open(IO_ReadOnly)) {
fprintf(stderr,"Error reading file %s\n",fullSourceName.latin1());
exit(1);
}
- QTextStream stream ( &sourceFile );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
- QString code = stream.read();
+ TQTextStream stream ( &sourceFile );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString code = stream.read();
sourceFile.close();
saw_failure = false;
@@ -1376,12 +1376,12 @@ void RegressionTest::evalJS( ScriptInterpreter &interp, const QString &filename,
if ( report_result && !ignore_errors) {
bool expected_failure = filename.endsWith( "-n.js" );
if (c.complType() == Throw) {
- QString errmsg = c.value().toString(interp.globalExec()).qstring();
+ TQString errmsg = c.value().toString(interp.globalExec()).qstring();
if ( !expected_failure ) {
printf( "ERROR: %s (%s)\n",filename.latin1(), errmsg.latin1());
m_errors++;
} else {
- reportResult( true, QString( "Expected Failure: %1" ).arg( errmsg ) );
+ reportResult( true, TQString( "Expected Failure: %1" ).arg( errmsg ) );
}
} else if ( saw_failure ) {
if ( !expected_failure )
@@ -1398,7 +1398,7 @@ public:
virtual UString className() const { return "global"; }
};
-void RegressionTest::testJSFile(const QString & filename )
+void RegressionTest::testJSFile(const TQString & filename )
{
qApp->mainWidget()->resize( 800, 600); // restore size
@@ -1416,34 +1416,34 @@ void RegressionTest::testJSFile(const QString & filename )
global.put(exec, "debug", Object(new RegTestFunction(exec,this,RegTestFunction::Print,1) ) );
global.put(exec, "print", Object(new RegTestFunction(exec,this,RegTestFunction::Print,1) ) );
- QStringList dirs = QStringList::split( '/', filename );
+ TQStringList dirs = TQStringList::split( '/', filename );
// NOTE: the basename is of little interest here, but the last basedir change
// isn't taken in account
- QString basedir = m_baseDir + "/tests/";
- for ( QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it )
+ TQString basedir = m_baseDir + "/tests/";
+ for ( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it )
{
- if ( ! ::access( QFile::encodeName( basedir + "shell.js" ), R_OK ) )
+ if ( ! ::access( TQFile::encodeName( basedir + "shell.js" ), R_OK ) )
evalJS( interp, basedir + "shell.js", false );
basedir += *it + "/";
}
evalJS( interp, m_baseDir + "/tests/"+ filename, true );
}
-RegressionTest::CheckResult RegressionTest::checkPaintdump(const QString &filename)
+RegressionTest::CheckResult RegressionTest::checkPaintdump(const TQString &filename)
{
- QString againstFilename( filename + "-dump.png" );
- QString absFilename = QFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
+ TQString againstFilename( filename + "-dump.png" );
+ TQString absFilename = TQFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
if ( svnIgnored( absFilename ) ) {
m_known_failures = NoFailure;
return Ignored;
}
CheckResult result = Failure;
- QImage baseline;
+ TQImage baseline;
baseline.load( absFilename, "PNG");
- QImage output = renderToImage();
+ TQImage output = renderToImage();
if ( !imageEqual( baseline, output ) ) {
- QString outputFilename = m_outputDir + "/" + againstFilename;
+ TQString outputFilename = m_outputDir + "/" + againstFilename;
createMissingDirs(outputFilename );
bool kf = false;
@@ -1457,28 +1457,28 @@ RegressionTest::CheckResult RegressionTest::checkPaintdump(const QString &filena
output.save(outputFilename, "PNG", 60);
}
else {
- ::unlink( QFile::encodeName( m_outputDir + "/" + againstFilename ) );
+ ::unlink( TQFile::encodeName( m_outputDir + "/" + againstFilename ) );
result = Success;
}
return result;
}
-RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFilename)
+RegressionTest::CheckResult RegressionTest::checkOutput(const TQString &againstFilename)
{
- QString absFilename = QFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
+ TQString absFilename = TQFileInfo(m_baseDir + "/baseline/" + againstFilename).absFilePath();
if ( svnIgnored( absFilename ) ) {
m_known_failures = NoFailure;
return Ignored;
}
bool domOut = againstFilename.endsWith( "-dom" );
- QString data = getPartOutput( domOut ? DOMTree : RenderTree );
+ TQString data = getPartOutput( domOut ? DOMTree : RenderTree );
data.remove( char( 13 ) );
CheckResult result = Success;
// compare result to existing file
- QString outputFilename = QFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
+ TQString outputFilename = TQFileInfo(m_outputDir + "/" + againstFilename).absFilePath();
bool kf = false;
if ( m_known_failures & AllFailure )
kf = true;
@@ -1492,30 +1492,30 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
if ( m_genOutput )
outputFilename = absFilename;
- QFile file(absFilename);
+ TQFile file(absFilename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream ( &file );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream ( &file );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
- QString fileData = stream.read();
+ TQString fileData = stream.read();
result = ( fileData == data ) ? Success : Failure;
if ( !m_genOutput && result == Success ) {
- ::unlink( QFile::encodeName( outputFilename ) );
+ ::unlink( TQFile::encodeName( outputFilename ) );
return Success;
}
}
// generate result file
createMissingDirs( outputFilename );
- QFile file2(outputFilename);
+ TQFile file2(outputFilename);
if (!file2.open(IO_WriteOnly)) {
fprintf(stderr,"Error writing to file %s\n",outputFilename.latin1());
exit(1);
}
- QTextStream stream2(&file2);
- stream2.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream2(&file2);
+ stream2.setEncoding( TQTextStream::UnicodeUTF8 );
stream2 << data;
if ( m_genOutput )
printf("Generated %s\n", outputFilename.latin1());
@@ -1523,7 +1523,7 @@ RegressionTest::CheckResult RegressionTest::checkOutput(const QString &againstFi
return result;
}
-bool RegressionTest::reportResult(CheckResult result, const QString & description)
+bool RegressionTest::reportResult(CheckResult result, const TQString & description)
{
if ( result == Ignored ) {
//printf("IGNORED: ");
@@ -1533,7 +1533,7 @@ bool RegressionTest::reportResult(CheckResult result, const QString & descriptio
return reportResult( result == Success, description );
}
-bool RegressionTest::reportResult(bool passed, const QString & description)
+bool RegressionTest::reportResult(bool passed, const TQString & description)
{
if (m_genOutput)
return true;
@@ -1562,7 +1562,7 @@ bool RegressionTest::reportResult(bool passed, const QString & description)
return passed;
}
-void RegressionTest::printDescription(const QString& description)
+void RegressionTest::printDescription(const TQString& description)
{
if (!m_currentCategory.isEmpty())
printf("%s/", m_currentCategory.latin1());
@@ -1570,7 +1570,7 @@ void RegressionTest::printDescription(const QString& description)
printf("%s", m_currentTest.latin1());
if (!description.isEmpty()) {
- QString desc = description;
+ TQString desc = description;
desc.replace( '\n', ' ' );
printf(" [%s]", desc.latin1());
}
@@ -1579,28 +1579,28 @@ void RegressionTest::printDescription(const QString& description)
fflush(stdout);
}
-void RegressionTest::createMissingDirs(const QString & filename)
+void RegressionTest::createMissingDirs(const TQString & filename)
{
- QFileInfo dif(filename);
- QFileInfo dirInfo( dif.dirPath() );
+ TQFileInfo dif(filename);
+ TQFileInfo dirInfo( dif.dirPath() );
if (dirInfo.exists())
return;
- QStringList pathComponents;
- QFileInfo parentDir = dirInfo;
+ TQStringList pathComponents;
+ TQFileInfo parentDir = dirInfo;
pathComponents.prepend(parentDir.absFilePath());
while (!parentDir.exists()) {
- QString parentPath = parentDir.absFilePath();
+ TQString parentPath = parentDir.absFilePath();
int slashPos = parentPath.findRev('/');
if (slashPos < 0)
break;
parentPath = parentPath.left(slashPos);
pathComponents.prepend(parentPath);
- parentDir = QFileInfo(parentPath);
+ parentDir = TQFileInfo(parentPath);
}
for (uint pathno = 1; pathno < pathComponents.count(); pathno++) {
- if (!QFileInfo(pathComponents[pathno]).exists() &&
- !QDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
+ if (!TQFileInfo(pathComponents[pathno]).exists() &&
+ !TQDir(pathComponents[pathno-1]).mkdir(pathComponents[pathno])) {
fprintf(stderr,"Error creating directory %s\n",pathComponents[pathno].latin1());
exit(1);
}
@@ -1616,16 +1616,16 @@ void RegressionTest::slotOpenURL(const KURL &url, const KParts::URLArgs &args)
pm.waitForCompletion();
}
-bool RegressionTest::svnIgnored( const QString &filename )
+bool RegressionTest::svnIgnored( const TQString &filename )
{
- QFileInfo fi( filename );
- QString ignoreFilename = fi.dirPath() + "/svnignore";
- QFile ignoreFile(ignoreFilename);
+ TQFileInfo fi( filename );
+ TQString ignoreFilename = fi.dirPath() + "/svnignore";
+ TQFile ignoreFile(ignoreFilename);
if (!ignoreFile.open(IO_ReadOnly))
return false;
- QTextStream ignoreStream(&ignoreFile);
- QString line;
+ TQTextStream ignoreStream(&ignoreFile);
+ TQString line;
while (!(line = ignoreStream.readLine()).isNull()) {
if ( line == fi.fileName() )
return true;
@@ -1637,8 +1637,8 @@ bool RegressionTest::svnIgnored( const QString &filename )
void RegressionTest::resizeTopLevelWidget( int w, int h )
{
qApp->mainWidget()->resize( w, h );
- // Since we're not visible, this doesn't have an immediate effect, QWidget posts the event
- QApplication::sendPostedEvents( 0, QEvent::Resize );
+ // Since we're not visible, this doesn't have an immediate effect, TQWidget posts the event
+ TQApplication::sendPostedEvents( 0, TQEvent::Resize );
}
#include "test_regression.moc"
diff --git a/khtml/test_regression.h b/khtml/test_regression.h
index c75328a09..5ebfaed87 100644
--- a/khtml/test_regression.h
+++ b/khtml/test_regression.h
@@ -25,7 +25,7 @@
#include <khtml_part.h>
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kjs/ustring.h>
#include <kjs/object.h>
#include <kjs/interpreter.h>
@@ -47,7 +47,7 @@ public:
bool m_completed;
KHTMLPart *m_part;
int m_timer_waits;
- QTimer *m_timeout_timer;
+ TQTimer *m_timeout_timer;
public slots:
void partCompleted();
void timeout();
@@ -127,41 +127,41 @@ class RegressionTest : public QObject
Q_OBJECT
public:
- RegressionTest(KHTMLPart *part, const QString &baseDir, const QString &outputDir,
+ RegressionTest(KHTMLPart *part, const TQString &baseDir, const TQString &outputDir,
bool _genOutput, bool runJS, bool runHTML);
~RegressionTest();
enum OutputType { DOMTree, RenderTree };
- QString getPartOutput( OutputType type );
- void getPartDOMOutput( QTextStream &outputStream, KHTMLPart* part, uint indent );
- void dumpRenderTree( QTextStream &outputStream, KHTMLPart* part );
- void testStaticFile(const QString& filename);
- void testJSFile(const QString& filename);
+ TQString getPartOutput( OutputType type );
+ void getPartDOMOutput( TQTextStream &outputStream, KHTMLPart* part, uint indent );
+ void dumpRenderTree( TQTextStream &outputStream, KHTMLPart* part );
+ void testStaticFile(const TQString& filename);
+ void testJSFile(const TQString& filename);
enum CheckResult { Failure = 0, Success = 1, Ignored = 2 };
- CheckResult checkOutput(const QString& againstFilename);
- CheckResult checkPaintdump( const QString& againstFilename);
+ CheckResult checkOutput(const TQString& againstFilename);
+ CheckResult checkPaintdump( const TQString& againstFilename);
enum FailureType { NoFailure = 0, AllFailure = 1, RenderFailure = 2, DomFailure = 4, PaintFailure = 8, JSFailure = 16};
- bool runTests(QString relPath = QString::null, bool mustExist = false, int known_failure = NoFailure);
- bool reportResult( bool passed, const QString & description = QString::null );
- bool reportResult(CheckResult result, const QString & description = QString::null );
- void createMissingDirs(const QString &path);
+ bool runTests(TQString relPath = TQString::null, bool mustExist = false, int known_failure = NoFailure);
+ bool reportResult( bool passed, const TQString & description = TQString::null );
+ bool reportResult(CheckResult result, const TQString & description = TQString::null );
+ void createMissingDirs(const TQString &path);
- QImage renderToImage();
- bool imageEqual( const QImage &lhs, const QImage &rhs );
- void createLink( const QString& test, int failures );
- void doJavascriptReport( const QString &test );
- void doFailureReport( const QString& test, int failures );
+ TQImage renderToImage();
+ bool imageEqual( const TQImage &lhs, const TQImage &rhs );
+ void createLink( const TQString& test, int failures );
+ void doJavascriptReport( const TQString &test );
+ void doFailureReport( const TQString& test, int failures );
KHTMLPart *m_part;
- QString m_baseDir;
- QString m_outputDir;
+ TQString m_baseDir;
+ TQString m_outputDir;
bool m_genOutput;
- QString m_currentBase;
+ TQString m_currentBase;
- QString m_currentOutput;
- QString m_currentCategory;
- QString m_currentTest;
- QPixmap* m_paintBuffer;
+ TQString m_currentOutput;
+ TQString m_currentCategory;
+ TQString m_currentTest;
+ TQPixmap* m_paintBuffer;
bool m_getOutput;
bool m_runJS;
@@ -178,12 +178,12 @@ public:
static RegressionTest *curr;
private:
- void printDescription(const QString& description);
+ void printDescription(const TQString& description);
- static bool svnIgnored( const QString &filename );
+ static bool svnIgnored( const TQString &filename );
private:
- void evalJS( KJS::ScriptInterpreter &interp, const QString &filename, bool report ); // used by testJS
+ void evalJS( KJS::ScriptInterpreter &interp, const TQString &filename, bool report ); // used by testJS
private slots:
void slotOpenURL(const KURL &url, const KParts::URLArgs &args);
diff --git a/khtml/test_regression_fontoverload.cpp b/khtml/test_regression_fontoverload.cpp
index 131a001be..8919f5f5a 100644
--- a/khtml/test_regression_fontoverload.cpp
+++ b/khtml/test_regression_fontoverload.cpp
@@ -24,11 +24,11 @@
#define QT_NO_XRANDR 1
#define QT_NO_XFTFREETYPE 1
#include <private/qfontengine_p.h>
-#include <qfontdatabase.h>
-#include <qfont.h>
-#include <qpainter.h>
+#include <tqfontdatabase.h>
+#include <tqfont.h>
+#include <tqpainter.h>
#include "khtml_settings.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <assert.h>
class QFakeFontEngine : public QFontEngineXLFD
@@ -47,7 +47,7 @@ public:
return QFontEngineXLFD::leading();
}
- void draw( QPainter *p, int x, int y, const QTextEngine *engine, const QScriptItem *si, int textFlags )
+ void draw( TQPainter *p, int x, int y, const QTextEngine *engine, const QScriptItem *si, int textFlags )
{
//Sometimes X misrounds stuff for larger ahem, so we have to do it ourselves.
if (!ahem || (si->analysis.bidiLevel & 1) ) //We're fine if not ahem or bidi.
@@ -81,7 +81,7 @@ public:
const advance_t *advances, const qoffset_t *offsets, int numGlyphs );
glyph_metrics_t boundingBox( glyph_t glyph );
- QFontEngine::Error stringToCMap( const QChar *, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool ) const;
+ QFontEngine::Error stringToCMap( const TQChar *, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool ) const;
int ascent() const;
int descent() const;
@@ -91,21 +91,21 @@ public:
int minRightBearing() const { return 0; }
int cmap() const;
#endif
- bool canRender( const QChar *string, int len );
+ bool canRender( const TQChar *string, int len );
};
QFakeFontEngine::QFakeFontEngine( XFontStruct *fs, const char *name, int size )
: QFontEngineXLFD( fs, name, 0)
{
pixS = size;
- ahem = QString::fromLatin1(name).contains("ahem");
+ ahem = TQString::fromLatin1(name).contains("ahem");
}
QFakeFontEngine::~QFakeFontEngine()
{
}
#if 0
-QFontEngine::Error QFakeFontEngine::stringToCMap( const QChar *str, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool mirrored) const
+QFontEngine::Error QFakeFontEngine::stringToCMap( const TQChar *str, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool mirrored) const
{
QFontEngine::Error ret = QFontEngineXLFD::stringToCMap( str, len, glyphs, advances, nglyphs, mirrored );
@@ -167,12 +167,12 @@ int QFakeFontEngine::cmap() const
}
#endif
-bool QFakeFontEngine::canRender( const QChar *, int )
+bool QFakeFontEngine::canRender( const TQChar *, int )
{
return true;
}
-static QString courier_pickxlfd( int pixelsize, bool italic, bool bold )
+static TQString courier_pickxlfd( int pixelsize, bool italic, bool bold )
{
if ( pixelsize >= 24 )
pixelsize = 24;
@@ -183,15 +183,15 @@ static QString courier_pickxlfd( int pixelsize, bool italic, bool bold )
else
pixelsize = 10;
- return QString( "-adobe-courier-%1-%2-normal--%3-*-75-75-m-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
+ return TQString( "-adobe-courier-%1-%2-normal--%3-*-75-75-m-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
}
-static QString ahem_pickxlfd( int pixelsize )
+static TQString ahem_pickxlfd( int pixelsize )
{
- return QString( "-misc-ahem-medium-r-normal--%1-*-100-100-c-*-iso10646-1" ).arg( pixelsize );
+ return TQString( "-misc-ahem-medium-r-normal--%1-*-100-100-c-*-iso10646-1" ).arg( pixelsize );
}
-static QString helv_pickxlfd( int pixelsize, bool italic, bool bold )
+static TQString helv_pickxlfd( int pixelsize, bool italic, bool bold )
{
if ( pixelsize >= 24 )
pixelsize = 24;
@@ -202,16 +202,16 @@ static QString helv_pickxlfd( int pixelsize, bool italic, bool bold )
else
pixelsize = 10;
- return QString( "-adobe-helvetica-%1-%2-normal--%3-*-75-75-p-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
+ return TQString( "-adobe-helvetica-%1-%2-normal--%3-*-75-75-p-*-iso10646-1" ).arg( bold ? "bold" : "medium" ).arg( italic ? "o" : "r" ).arg( pixelsize );
}
KDE_EXPORT QFontEngine *
-QFontDatabase::findFont( QFont::Script script, const QFontPrivate *fp,
+TQFontDatabase::findFont( TQFont::Script script, const QFontPrivate *fp,
const QFontDef &request, int )
{
- QString xlfd;
- QString family = request.family.lower();
+ TQString xlfd;
+ TQString family = request.family.lower();
if ( family == "adobe courier" || family == "courier" || family == "fixed" ) {
xlfd = courier_pickxlfd( request.pixelSize, request.italic, request.weight > 50 );
}
@@ -225,7 +225,7 @@ QFontDatabase::findFont( QFont::Script script, const QFontPrivate *fp,
QFontEngine *fe = 0;
XFontStruct *xfs;
- xfs = XLoadQueryFont(QPaintDevice::x11AppDisplay(), xlfd.latin1() );
+ xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() );
if (!xfs) // as long as you don't do screenshots, it's maybe fine
qFatal("we need some fonts. So make sure you have %s installed.", xlfd.latin1());
@@ -233,7 +233,7 @@ QFontDatabase::findFont( QFont::Script script, const QFontPrivate *fp,
if ( !XGetFontProperty( xfs, XA_FONT, &value ) )
return 0;
- char *n = XGetAtomName( QPaintDevice::x11AppDisplay(), value );
+ char *n = XGetAtomName( TQPaintDevice::x11AppDisplay(), value );
xlfd = n;
if ( n )
XFree( n );
@@ -253,19 +253,19 @@ QFontDatabase::findFont( QFont::Script script, const QFontPrivate *fp,
return fe;
}
-KDE_EXPORT bool QFontDatabase::isBitmapScalable( const QString &,
- const QString &) const
+KDE_EXPORT bool TQFontDatabase::isBitmapScalable( const TQString &,
+ const TQString &) const
{
return true;
}
-KDE_EXPORT bool QFontDatabase::isSmoothlyScalable( const QString &,
- const QString &) const
+KDE_EXPORT bool TQFontDatabase::isSmoothlyScalable( const TQString &,
+ const TQString &) const
{
return true;
}
-const QString &KHTMLSettings::availableFamilies()
+const TQString &KHTMLSettings::availableFamilies()
{
if ( !avFamilies ) {
avFamilies = new QString;
@@ -280,42 +280,42 @@ bool KHTMLSettings::unfinishedImageFrame() const
return false;
}
-KDE_EXPORT int QPaintDevice::x11AppDpiY( int )
+KDE_EXPORT int TQPaintDevice::x11AppDpiY( int )
{
return 100;
}
-KDE_EXPORT int QPaintDevice::x11AppDpiX( int )
+KDE_EXPORT int TQPaintDevice::x11AppDpiX( int )
{
return 100;
}
-KDE_EXPORT void QFont::insertSubstitution(const QString &,
- const QString &)
+KDE_EXPORT void TQFont::insertSubstitution(const TQString &,
+ const TQString &)
{
}
-KDE_EXPORT void QFont::insertSubstitutions(const QString &,
- const QStringList &)
+KDE_EXPORT void TQFont::insertSubstitutions(const TQString &,
+ const TQStringList &)
{
}
#include <kprotocolinfo.h>
-bool KProtocolInfo::isKnownProtocol( const QString& _protocol )
+bool KProtocolInfo::isKnownProtocol( const TQString& _protocol )
{
return ( _protocol == "file" );
}
#include <kprotocolinfofactory.h>
-QString KProtocolInfo::exec( const QString& _protocol )
+TQString KProtocolInfo::exec( const TQString& _protocol )
{
if ( _protocol != "file" )
- return QString::null;
+ return TQString::null;
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_exec;
}
@@ -336,32 +336,32 @@ void DCOPClient::processSocketData( int )
{
}
-#include <qapplication.h>
-#include <qpalette.h>
+#include <tqapplication.h>
+#include <tqpalette.h>
-KDE_EXPORT void QApplication::setPalette( const QPalette &, bool ,
+KDE_EXPORT void TQApplication::setPalette( const TQPalette &, bool ,
const char* )
{
static bool done = false;
if (done) return;
- QString xlfd = ahem_pickxlfd(40);
+ TQString xlfd = ahem_pickxlfd(40);
XFontStruct *xfs;
- xfs = XLoadQueryFont(QPaintDevice::x11AppDisplay(), xlfd.latin1() );
+ xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() );
if (!xfs) // as long as you don't do screenshots, it's maybe fine
qFatal("We will need some fonts. So make sure you have %s installed.", xlfd.latin1());
- XFreeFont(QPaintDevice::x11AppDisplay(), xfs);
+ XFreeFont(TQPaintDevice::x11AppDisplay(), xfs);
done = true;
}
#include <kapplication.h>
-void KApplication::dcopFailure( const QString & )
+void KApplication::dcopFailure( const TQString & )
{
qDebug( "KApplication::dcopFailure" );
}
#include <kparts/historyprovider.h>
-bool KParts::HistoryProvider::contains( const QString& t ) const
+bool KParts::HistoryProvider::contains( const TQString& t ) const
{
return ( t == "http://www.kde.org/" || t == "http://www.google.com/");
}
@@ -380,5 +380,5 @@ bool KSSLSettings::warnOnLeave() const { return false; }
#include <kparts/plugin.h>
-KParts::Plugin* KParts::Plugin::loadPlugin( QObject * parent, const char* libname ) { return 0; }
+KParts::Plugin* KParts::Plugin::loadPlugin( TQObject * parent, const char* libname ) { return 0; }
diff --git a/khtml/testkhtml.cpp b/khtml/testkhtml.cpp
index 43573b6ff..7765cee8a 100644
--- a/khtml/testkhtml.cpp
+++ b/khtml/testkhtml.cpp
@@ -14,7 +14,7 @@
#include "testkhtml.h"
#include "testkhtml.moc"
#include "misc/loader.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <dom_string.h>
#include "dom/dom2_range.h"
#include "dom/html_document.h"
@@ -56,10 +56,10 @@ int main(int argc, char *argv[])
KHTMLPart *doc = new KHTMLPart( toplevel, 0, toplevel, 0, KHTMLPart::BrowserViewGUI );
Dummy *dummy = new Dummy( doc );
- QObject::connect( doc->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- dummy, SLOT( slotOpenURL( const KURL&, const KParts::URLArgs & ) ) );
+ TQObject::connect( doc->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ dummy, TQT_SLOT( slotOpenURL( const KURL&, const KParts::URLArgs & ) ) );
- QObject::connect( doc, SIGNAL(completed()), dummy, SLOT(handleDone()) );
+ TQObject::connect( doc, TQT_SIGNAL(completed()), dummy, TQT_SLOT(handleDone()) );
if (args->url(0).url().right(4).find(".xml", 0, false) == 0) {
KParts::URLArgs ags(doc->browserExtension()->urlArgs());
@@ -77,9 +77,9 @@ int main(int argc, char *argv[])
// dtv->resize(toplevel->width()/2, toplevel->height());
- QDomDocument d = doc->domDocument();
- QDomElement viewMenu = d.documentElement().firstChild().childNodes().item( 2 ).toElement();
- QDomElement e = d.createElement( "action" );
+ TQDomDocument d = doc->domDocument();
+ TQDomElement viewMenu = d.documentElement().firstChild().childNodes().item( 2 ).toElement();
+ TQDomElement e = d.createElement( "action" );
e.setAttribute( "name", "debugRenderTree" );
viewMenu.appendChild( e );
e = d.createElement( "action" );
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
e.setAttribute( "name", "debugDoBenchmark" );
viewMenu.appendChild( e );
- QDomElement toolBar = d.documentElement().firstChild().nextSibling().toElement();
+ TQDomElement toolBar = d.documentElement().firstChild().nextSibling().toElement();
e = d.createElement( "action" );
e.setAttribute( "name", "editable" );
toolBar.insertBefore( e, toolBar.firstChild() );
@@ -105,28 +105,28 @@ int main(int argc, char *argv[])
e.setAttribute( "name", "print" );
toolBar.insertBefore( e, toolBar.firstChild() );
- (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, SLOT( reload() ), doc->actionCollection(), "reload" );
- (void)new KAction( "Benchmark...", 0, 0, dummy, SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" );
- KAction* kprint = new KAction( "Print", "print", 0, doc->browserExtension(), SLOT( print() ), doc->actionCollection(), "print" );
+ (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, TQT_SLOT( reload() ), doc->actionCollection(), "reload" );
+ (void)new KAction( "Benchmark...", 0, 0, dummy, TQT_SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" );
+ KAction* kprint = new KAction( "Print", "print", 0, doc->browserExtension(), TQT_SLOT( print() ), doc->actionCollection(), "print" );
kprint->setEnabled(true);
KToggleAction *ta = new KToggleAction( "Navigable", "editclear", 0, doc->actionCollection(), "navigable" );
ta->setChecked(doc->isCaretMode());
- QWidget::connect(ta, SIGNAL(toggled(bool)), dummy, SLOT( toggleNavigable(bool) ));
+ TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleNavigable(bool) ));
ta = new KToggleAction( "Editable", "edit", 0, doc->actionCollection(), "editable" );
ta->setChecked(doc->isEditable());
- QWidget::connect(ta, SIGNAL(toggled(bool)), dummy, SLOT( toggleEditable(bool) ));
+ TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleEditable(bool) ));
toplevel->guiFactory()->addClient( doc );
doc->setJScriptEnabled(true);
doc->setJavaEnabled(true);
doc->setPluginsEnabled( true );
- doc->setURLCursor(QCursor(Qt::PointingHandCursor));
+ doc->setURLCursor(TQCursor(Qt::PointingHandCursor));
a.setTopWidget(doc->widget());
- QWidget::connect(doc, SIGNAL(setWindowCaption(const QString &)),
- doc->widget()->topLevelWidget(), SLOT(setCaption(const QString &)));
+ TQWidget::connect(doc, TQT_SIGNAL(setWindowCaption(const TQString &)),
+ doc->widget()->topLevelWidget(), TQT_SLOT(setCaption(const TQString &)));
doc->widget()->show();
toplevel->show();
- ((QScrollView *)doc->widget())->viewport()->show();
+ ((TQScrollView *)doc->widget())->viewport()->show();
int ret = a.exec();
@@ -141,13 +141,13 @@ void Dummy::doBenchmark()
KConfigGroup settings(KGlobal::config(), "bench");
results.clear();
- QString directory = KFileDialog::getExistingDirectory(settings.readPathEntry("path"), m_part->view(),
- QString::fromLatin1("Please select directory with tests"));
+ TQString directory = KFileDialog::getExistingDirectory(settings.readPathEntry("path"), m_part->view(),
+ TQString::fromLatin1("Please select directory with tests"));
if (!directory.isEmpty()) {
settings.writePathEntry("path", directory);
- QDir dirListing(directory, "*.html");
+ TQDir dirListing(directory, "*.html");
for (int i = 0; i < dirListing.count(); ++i) {
filesToBenchmark.append(dirListing.absFilePath(dirListing[i]));
}
@@ -177,21 +177,21 @@ void Dummy::nextRun()
m_part->begin();
m_part->write("<table border=1>");
- for (QMap<QString, QValueList<int> >::iterator i = results.begin(); i != results.end(); ++i) {
+ for (TQMap<TQString, TQValueList<int> >::iterator i = results.begin(); i != results.end(); ++i) {
m_part->write("<tr><td>" + i.key() + "</td>");
- QValueList<int> timings = i.data();
+ TQValueList<int> timings = i.data();
int total = 0;
for (int pos = 0; pos < timings.size(); ++pos) {
int t = timings[pos];
if (pos < COLD_RUNS)
- m_part->write(QString::fromLatin1("<td>(Cold):") + QString::number(t) + "</td>");
+ m_part->write(TQString::fromLatin1("<td>(Cold):") + TQString::number(t) + "</td>");
else {
total += t;
- m_part->write(QString::fromLatin1("<td><i>") + QString::number(t) + "</i></td>");
+ m_part->write(TQString::fromLatin1("<td><i>") + TQString::number(t) + "</i></td>");
}
}
- m_part->write(QString::fromLatin1("<td>Average:<b>") + QString::number(double(total) / HOT_RUNS) + "</b></td>");
+ m_part->write(TQString::fromLatin1("<td>Average:<b>") + TQString::number(double(total) / HOT_RUNS) + "</b></td>");
m_part->write("</tr>");
}
diff --git a/khtml/testkhtml.h b/khtml/testkhtml.h
index 09718fdba..b945ec942 100644
--- a/khtml/testkhtml.h
+++ b/khtml/testkhtml.h
@@ -2,8 +2,8 @@
#define TESTKHTML_H
#include <kdebug.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
/**
* @internal
@@ -12,7 +12,7 @@ class Dummy : public QObject
{
Q_OBJECT
public:
- Dummy( KHTMLPart *part ) : QObject( part ) { m_part = part; };
+ Dummy( KHTMLPart *part ) : TQObject( part ) { m_part = part; };
private slots:
void slotOpenURL( const KURL &url, const KParts::URLArgs &args )
@@ -44,10 +44,10 @@ private slots:
private:
KHTMLPart *m_part;
- QValueList<QString> filesToBenchmark;
- QMap<QString, QValueList<int> > results;
+ TQValueList<TQString> filesToBenchmark;
+ TQMap<TQString, TQValueList<int> > results;
int benchmarkRun;
- QTime loadTimer;
+ TQTime loadTimer;
void nextRun();
};
diff --git a/khtml/xml/dom2_eventsimpl.cpp b/khtml/xml/dom2_eventsimpl.cpp
index db8b17b6f..bcc2fca3a 100644
--- a/khtml/xml/dom2_eventsimpl.cpp
+++ b/khtml/xml/dom2_eventsimpl.cpp
@@ -48,7 +48,7 @@ EventImpl::EventImpl()
m_currentTarget = 0;
m_eventPhase = 0;
m_target = 0;
- m_createTime = QDateTime::currentDateTime();
+ m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
}
@@ -67,7 +67,7 @@ EventImpl::EventImpl(EventId _id, bool canBubbleArg, bool cancelableArg)
m_currentTarget = 0;
m_eventPhase = 0;
m_target = 0;
- m_createTime = QDateTime::currentDateTime();
+ m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
}
@@ -90,7 +90,7 @@ void EventImpl::setTarget(NodeImpl *_target)
DOMTimeStamp EventImpl::timeStamp()
{
- QDateTime epoch(QDate(1970,1,1),QTime(0,0));
+ TQDateTime epoch(TQDate(1970,1,1),TQTime(0,0));
// ### kjs does not yet support long long (?) so the value wraps around
return epoch.secsTo(m_createTime)*1000+m_createTime.time().msec();
}
@@ -373,7 +373,7 @@ MouseEventImpl::MouseEventImpl(EventId _id,
bool metaKeyArg,
unsigned short buttonArg,
NodeImpl *relatedTargetArg,
- QMouseEvent *qe,
+ TQMouseEvent *qe,
bool isDoubleClick)
: UIEventImpl(_id,canBubbleArg,cancelableArg,viewArg,detailArg)
{
@@ -499,22 +499,22 @@ public:
}
L toLeft(R r) {
- QMapIterator<R,L> i( m_rToL.find(r) );
+ TQMapIterator<R,L> i( m_rToL.find(r) );
if (i != m_rToL.end())
return *i;
return L();
}
R toRight(L l) {
- QMapIterator<L,R> i = m_lToR.find(l);
+ TQMapIterator<L,R> i = m_lToR.find(l);
if (i != m_lToR.end())
return *i;
return R();
}
private:
- QMap<L, R> m_lToR;
- QMap<R, L> m_rToL;
+ TQMap<L, R> m_lToR;
+ TQMap<R, L> m_rToL;
};
#define MAKE_TRANSLATOR(name,L,R,MR,table) static IDTranslator<L,R,MR>* s_##name; \
@@ -578,13 +578,13 @@ IDTranslator<unsigned, unsigned, unsigned>::Info virtKeyToQtKeyTable[] =
MAKE_TRANSLATOR(virtKeyToQtKey, unsigned, unsigned, unsigned, virtKeyToQtKeyTable)
KeyEventBaseImpl::KeyEventBaseImpl(EventId id, bool canBubbleArg, bool cancelableArg, AbstractViewImpl *viewArg,
- QKeyEvent *key) :
+ TQKeyEvent *key) :
UIEventImpl(id, canBubbleArg, cancelableArg, viewArg, 0)
{
m_synthetic = false;
//Here, we need to map Qt's internal info to browser-style info.
- m_keyEvent = new QKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count() );
+ m_keyEvent = new TQKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count() );
m_detail = key->count();
m_keyVal = key->ascii();
@@ -647,27 +647,27 @@ void KeyEventBaseImpl::buildQKeyEvent() const
int key = 0;
int ascii = 0;
- QString text;
+ TQString text;
if (m_virtKeyVal)
key = virtKeyToQtKey()->toRight(m_virtKeyVal);
if (!key) {
ascii = m_keyVal; //###?
key = m_keyVal;
- text = QChar(key);
+ text = TQChar(key);
}
//Neuter F keys as well.
if (key >= Qt::Key_F1 && key <= Qt::Key_F35)
key = Qt::Key_ScrollLock;
- m_keyEvent = new QKeyEvent(id() == KEYUP_EVENT ? QEvent::KeyRelease : QEvent::KeyPress,
+ m_keyEvent = new TQKeyEvent(id() == KEYUP_EVENT ? TQEvent::KeyRelease : TQEvent::KeyPress,
key, ascii, modifiers, text);
}
//------------------------------------------------------------------------------
-static const IDTranslator<QCString, unsigned, const char*>::Info keyIdentifiersToVirtKeysTable[] = {
+static const IDTranslator<TQCString, unsigned, const char*>::Info keyIdentifiersToVirtKeysTable[] = {
{"Alt", KeyEventBaseImpl::DOM_VK_LEFT_ALT},
{"Control", KeyEventBaseImpl::DOM_VK_LEFT_CONTROL},
{"Shift", KeyEventBaseImpl::DOM_VK_LEFT_SHIFT},
@@ -719,10 +719,10 @@ static const IDTranslator<QCString, unsigned, const char*>::Info keyIdentifiersT
{0, 0}
};
-MAKE_TRANSLATOR(keyIdentifiersToVirtKeys, QCString, unsigned, const char*, keyIdentifiersToVirtKeysTable)
+MAKE_TRANSLATOR(keyIdentifiersToVirtKeys, TQCString, unsigned, const char*, keyIdentifiersToVirtKeysTable)
/** These are the modifiers we currently support */
-static const IDTranslator<QCString, unsigned, const char*>::Info keyModifiersToCodeTable[] = {
+static const IDTranslator<TQCString, unsigned, const char*>::Info keyModifiersToCodeTable[] = {
{"Alt", Qt::AltButton},
{"Control", Qt::ControlButton},
{"Shift", Qt::ShiftButton},
@@ -730,7 +730,7 @@ static const IDTranslator<QCString, unsigned, const char*>::Info keyModifiersToC
{0, 0}
};
-MAKE_TRANSLATOR(keyModifiersToCode, QCString, unsigned, const char*, keyModifiersToCodeTable)
+MAKE_TRANSLATOR(keyModifiersToCode, TQCString, unsigned, const char*, keyModifiersToCodeTable)
KeyboardEventImpl::KeyboardEventImpl() : m_keyLocation(DOM_KEY_LOCATION_STANDARD)
{}
@@ -739,10 +739,10 @@ DOMString KeyboardEventImpl::keyIdentifier() const
{
if (unsigned special = virtKeyVal())
if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special))
- return QString::fromLatin1(id);
+ return TQString::fromLatin1(id);
if (unsigned unicode = keyVal())
- return QString(QChar(unicode));
+ return TQString(TQChar(unicode));
return "Unidentified";
}
@@ -784,12 +784,12 @@ void KeyboardEventImpl::initKeyboardEvent(const DOMString &typeArg,
virtKeyVal = keyIdentifiersToVirtKeys()->toRight(keyIdentifierArg.string().latin1());
//Process modifier list.
- QStringList mods =
- QStringList::split(' ',
+ TQStringList mods =
+ TQStringList::split(' ',
modifiersList.string().stripWhiteSpace().simplifyWhiteSpace());
unsigned modifiers = 0;
- for (QStringList::Iterator i = mods.begin(); i != mods.end(); ++i)
+ for (TQStringList::Iterator i = mods.begin(); i != mods.end(); ++i)
if (unsigned mask = keyModifiersToCode()->toRight((*i).latin1()))
modifiers |= mask;
@@ -797,8 +797,8 @@ void KeyboardEventImpl::initKeyboardEvent(const DOMString &typeArg,
keyVal, virtKeyVal, modifiers);
}
-KeyboardEventImpl::KeyboardEventImpl(QKeyEvent* key, DOM::AbstractViewImpl* view) :
- KeyEventBaseImpl(key->type() == QEvent::KeyRelease ? KEYUP_EVENT : KEYDOWN_EVENT, true, true, view, key)
+KeyboardEventImpl::KeyboardEventImpl(TQKeyEvent* key, DOM::AbstractViewImpl* view) :
+ KeyEventBaseImpl(key->type() == TQEvent::KeyRelease ? KEYUP_EVENT : KEYDOWN_EVENT, true, true, view, key)
{
//Try to put something reasonable in location...
//we don't know direction, so guess left
@@ -819,7 +819,7 @@ int KeyboardEventImpl::keyCode() const
if (m_virtKeyVal != DOM_VK_UNDEFINED)
return m_virtKeyVal;
else
- return QChar((unsigned short)m_keyVal).upper().unicode();
+ return TQChar((unsigned short)m_keyVal).upper().unicode();
}
int KeyboardEventImpl::charCode() const
@@ -839,7 +839,7 @@ bool TextEventImpl::isTextInputEvent() const
return true;
}
-TextEventImpl::TextEventImpl(QKeyEvent* key, DOM::AbstractViewImpl* view) :
+TextEventImpl::TextEventImpl(TQKeyEvent* key, DOM::AbstractViewImpl* view) :
KeyEventBaseImpl(KEYPRESS_EVENT, true, true, view, key)
{
m_outputString = key->text();
diff --git a/khtml/xml/dom2_eventsimpl.h b/khtml/xml/dom2_eventsimpl.h
index 2f2034088..7318035d2 100644
--- a/khtml/xml/dom2_eventsimpl.h
+++ b/khtml/xml/dom2_eventsimpl.h
@@ -141,7 +141,7 @@ protected:
unsigned short m_eventPhase : 2;
NodeImpl *m_currentTarget; // ref > 0 maintained externally
NodeImpl *m_target;
- QDateTime m_createTime;
+ TQDateTime m_createTime;
DOMString m_message;
};
@@ -193,7 +193,7 @@ public:
bool metaKeyArg,
unsigned short buttonArg,
NodeImpl *relatedTargetArg,
- QMouseEvent *qe = 0,
+ TQMouseEvent *qe = 0,
bool isDoubleClick = false);
virtual ~MouseEventImpl();
long screenX() const { return m_screenX; }
@@ -231,7 +231,7 @@ public:
const Node &relatedTargetArg);
virtual bool isMouseEvent() const;
- QMouseEvent *qEvent() const { return m_qevent; }
+ TQMouseEvent *qEvent() const { return m_qevent; }
protected:
long m_screenX;
long m_screenY;
@@ -248,7 +248,7 @@ protected:
bool m_isDoubleClick : 1;
unsigned short m_button;
NodeImpl *m_relatedTarget;
- QMouseEvent *m_qevent;
+ TQMouseEvent *m_qevent;
};
@@ -326,7 +326,7 @@ public:
unsigned long keyVal() const { return m_keyVal; }
unsigned long virtKeyVal() const { return m_virtKeyVal; }
- QKeyEvent *qKeyEvent() const { if (!m_keyEvent) buildQKeyEvent(); return m_keyEvent; }
+ TQKeyEvent *qKeyEvent() const { if (!m_keyEvent) buildQKeyEvent(); return m_keyEvent; }
//Legacy key stuff...
virtual int keyCode() const = 0;
@@ -348,10 +348,10 @@ protected:
bool canBubbleArg,
bool cancelableArg,
AbstractViewImpl *viewArg,
- QKeyEvent *key);
+ TQKeyEvent *key);
- mutable QKeyEvent *m_keyEvent;
+ mutable TQKeyEvent *m_keyEvent;
unsigned long m_keyVal; //Unicode key value
unsigned long m_virtKeyVal; //Virtual key value for keys like arrows, Fn, etc.
@@ -367,7 +367,7 @@ class TextEventImpl : public KeyEventBaseImpl {
public:
TextEventImpl();
- TextEventImpl(QKeyEvent* key, DOM::AbstractViewImpl* view);
+ TextEventImpl(TQKeyEvent* key, DOM::AbstractViewImpl* view);
void initTextEvent(const DOMString &typeArg,
bool canBubbleArg,
@@ -389,7 +389,7 @@ private:
class KeyboardEventImpl : public KeyEventBaseImpl {
public:
KeyboardEventImpl();
- KeyboardEventImpl(QKeyEvent* key, DOM::AbstractViewImpl* view);
+ KeyboardEventImpl(TQKeyEvent* key, DOM::AbstractViewImpl* view);
virtual bool isKeyboardEvent() const;
diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp
index f6cc0fa64..36570d69a 100644
--- a/khtml/xml/dom_docimpl.cpp
+++ b/khtml/xml/dom_docimpl.cpp
@@ -43,8 +43,8 @@
#include "ecma/kjs_proxy.h"
#include "ecma/kjs_binding.h"
-#include <qptrstack.h>
-#include <qpaintdevicemetrics.h>
+#include <tqptrstack.h>
+#include <tqpaintdevicemetrics.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstaticdeleter.h>
@@ -101,7 +101,7 @@ DOMImplementationImpl::~DOMImplementationImpl()
bool DOMImplementationImpl::hasFeature ( const DOMString &feature, const DOMString &version )
{
// ### update when we (fully) support the relevant features
- QString lower = feature.string().lower();
+ TQString lower = feature.string().lower();
if ((lower == "html" || lower == "xml") &&
(version.isEmpty() || version == "1.0" || version == "2.0" || version == "null"))
return true;
@@ -228,7 +228,7 @@ ElementMappingCache::ElementMappingCache():m_dict(257)
m_dict.setAutoDelete(true);
}
-void ElementMappingCache::add(const QString& id, ElementImpl* nd)
+void ElementMappingCache::add(const TQString& id, ElementImpl* nd)
{
if (id.isEmpty()) return;
@@ -247,7 +247,7 @@ void ElementMappingCache::add(const QString& id, ElementImpl* nd)
}
}
-void ElementMappingCache::set(const QString& id, ElementImpl* nd)
+void ElementMappingCache::set(const TQString& id, ElementImpl* nd)
{
if (id.isEmpty()) return;
@@ -255,7 +255,7 @@ void ElementMappingCache::set(const QString& id, ElementImpl* nd)
info->nd = nd;
}
-void ElementMappingCache::remove(const QString& id, ElementImpl* nd)
+void ElementMappingCache::remove(const TQString& id, ElementImpl* nd)
{
if (id.isEmpty()) return;
@@ -273,20 +273,20 @@ void ElementMappingCache::remove(const QString& id, ElementImpl* nd)
}
}
-bool ElementMappingCache::contains(const QString& id)
+bool ElementMappingCache::contains(const TQString& id)
{
if (id.isEmpty()) return false;
return m_dict.find(id);
}
-ElementMappingCache::ItemInfo* ElementMappingCache::get(const QString& id)
+ElementMappingCache::ItemInfo* ElementMappingCache::get(const TQString& id)
{
if (id.isEmpty()) return 0;
return m_dict.find(id);
}
-static KStaticDeleter< QPtrList<DocumentImpl> > s_changedDocumentsDeleter;
-QPtrList<DocumentImpl> * DocumentImpl::changedDocuments;
+static KStaticDeleter< TQPtrList<DocumentImpl> > s_changedDocumentsDeleter;
+TQPtrList<DocumentImpl> * DocumentImpl::changedDocuments;
// KHTMLView might be 0
DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v)
@@ -335,7 +335,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v)
m_attrMap = new IdNameMapping(ATTR_LAST_ATTR+1);
m_elementMap = new IdNameMapping(ID_LAST_TAG+1);
m_namespaceMap = new IdNameMapping(1);
- QString xhtml(XHTML_NAMESPACE);
+ TQString xhtml(XHTML_NAMESPACE);
m_namespaceMap->names.insert(emptyNamespace, new DOMStringImpl(""));
m_namespaceMap->names.insert(xhtmlNamespace, new DOMStringImpl(xhtml.unicode(), xhtml.length()));
m_namespaceMap->names[emptyNamespace]->ref();
@@ -423,7 +423,7 @@ DocumentImpl::~DocumentImpl()
//you may also have to fix removedLastRef() above - M.O.
assert( !m_render );
- QIntDictIterator<NodeListImpl::Cache> it(m_nodeListCache);
+ TQIntDictIterator<NodeListImpl::Cache> it(m_nodeListCache);
for (; it.current(); ++it)
it.current()->deref();
@@ -674,7 +674,7 @@ AttrImpl *DocumentImpl::createAttributeNS( const DOMString &_namespaceURI,
ElementImpl *DocumentImpl::getElementById( const DOMString &elementId ) const
{
- QString stringKey = elementId.string();
+ TQString stringKey = elementId.string();
ElementMappingCache::ItemInfo* info = m_getElementByIdCache.get(stringKey);
@@ -686,7 +686,7 @@ ElementImpl *DocumentImpl::getElementById( const DOMString &elementId ) const
return info->nd;
//Now we actually have to walk.
- QPtrStack<NodeImpl> nodeStack;
+ TQPtrStack<NodeImpl> nodeStack;
NodeImpl *current = _first;
while(1)
@@ -734,7 +734,7 @@ void DocumentImpl::setTitle(const DOMString& _title)
m_title = _title;
- QString titleStr = m_title.string();
+ TQString titleStr = m_title.string();
for (unsigned int i = 0; i < titleStr.length(); ++i)
if (titleStr[i] < ' ')
titleStr[i] = ' ';
@@ -744,8 +744,8 @@ void DocumentImpl::setTitle(const DOMString& _title)
if (titleStr.isNull() || titleStr.isEmpty()) {
// empty title... set window caption as the URL
KURL url = m_url;
- url.setRef(QString::null);
- url.setQuery(QString::null);
+ url.setRef(TQString::null);
+ url.setQuery(TQString::null);
titleStr = url.prettyURL();
}
@@ -1037,9 +1037,9 @@ ElementImpl *DocumentImpl::createHTMLElement( const DOMString &name )
return n;
}
-QString DocumentImpl::nextState()
+TQString DocumentImpl::nextState()
{
- QString state;
+ TQString state;
if (!m_state.isEmpty())
{
state = m_state.first();
@@ -1048,10 +1048,10 @@ QString DocumentImpl::nextState()
return state;
}
-QStringList DocumentImpl::docState()
+TQStringList DocumentImpl::docState()
{
- QStringList s;
- for (QPtrListIterator<NodeImpl> it(m_maintainsState); it.current(); ++it)
+ TQStringList s;
+ for (TQPtrListIterator<NodeImpl> it(m_maintainsState); it.current(); ++it)
s.append(it.current()->state());
return s;
@@ -1059,7 +1059,7 @@ QStringList DocumentImpl::docState()
bool DocumentImpl::unsubmittedFormChanges()
{
- for (QPtrListIterator<NodeImpl> it(m_maintainsState); it.current(); ++it)
+ for (TQPtrListIterator<NodeImpl> it(m_maintainsState); it.current(); ++it)
if (it.current()->state().right(1)=="M")
return true;
@@ -1097,7 +1097,7 @@ TreeWalkerImpl *DocumentImpl::createTreeWalker(NodeImpl *root, unsigned long wha
void DocumentImpl::setDocumentChanged(bool b)
{
if (!changedDocuments)
- changedDocuments = s_changedDocumentsDeleter.setObject( changedDocuments, new QPtrList<DocumentImpl>() );
+ changedDocuments = s_changedDocumentsDeleter.setObject( changedDocuments, new TQPtrList<DocumentImpl>() );
if (b && !m_docChanged)
changedDocuments->append(this);
@@ -1109,7 +1109,7 @@ void DocumentImpl::setDocumentChanged(bool b)
void DocumentImpl::recalcStyle( StyleChange change )
{
// qDebug("recalcStyle(%p)", this);
-// QTime qt;
+// TQTime qt;
// qt.start();
if (m_inStyleRecalc)
return; // Guard against re-entrancy. -dwh
@@ -1127,13 +1127,13 @@ void DocumentImpl::recalcStyle( StyleChange change )
// ### make the font stuff _really_ work!!!!
khtml::FontDef fontDef;
- QFont f = KGlobalSettings::generalFont();
+ TQFont f = KGlobalSettings::generalFont();
fontDef.family = f.family();
fontDef.italic = f.italic();
fontDef.weight = f.weight();
if (m_view) {
const KHTMLSettings *settings = m_view->part()->settings();
- QString stdfont = settings->stdFontName();
+ TQString stdfont = settings->stdFontName();
if ( !stdfont.isEmpty() )
fontDef.family = stdfont;
@@ -1179,7 +1179,7 @@ void DocumentImpl::updateRendering()
{
if (!hasChangedChild()) return;
-// QTime time;
+// TQTime time;
// time.start();
// kdDebug() << "UPDATERENDERING: "<<endl;
@@ -1298,12 +1298,12 @@ khtml::Tokenizer *DocumentImpl::createTokenizer()
return new khtml::XMLTokenizer(docPtr(),m_view);
}
-void DocumentImpl::setPaintDevice( QPaintDevice *dev )
+void DocumentImpl::setPaintDevice( TQPaintDevice *dev )
{
if (m_paintDevice != dev) {
m_paintDevice = dev;
delete m_paintDeviceMetrics;
- m_paintDeviceMetrics = new QPaintDeviceMetrics( dev );
+ m_paintDeviceMetrics = new TQPaintDeviceMetrics( dev );
}
}
@@ -1334,7 +1334,7 @@ void DocumentImpl::open( bool clearEventListeners )
m_tokenizer = createTokenizer();
m_decoderMibEnum = 0;
- connect(m_tokenizer,SIGNAL(finishedParsing()),this,SIGNAL(finishedParsing()));
+ connect(m_tokenizer,TQT_SIGNAL(finishedParsing()),this,TQT_SIGNAL(finishedParsing()));
m_tokenizer->begin();
}
@@ -1380,14 +1380,14 @@ void DocumentImpl::write( const DOMString &text )
write(text.string());
}
-void DocumentImpl::write( const QString &text )
+void DocumentImpl::write( const TQString &text )
{
if (!m_tokenizer) {
open();
if (m_view)
m_view->part()->resetFromScript();
m_tokenizer->setAutoClose();
- write(QString::fromLatin1("<html>"));
+ write(TQString::fromLatin1("<html>"));
}
m_tokenizer->write(text, false);
}
@@ -1404,7 +1404,7 @@ void DocumentImpl::finishParsing ( )
m_tokenizer->finish();
}
-void DocumentImpl::setUserStyleSheet( const QString& sheet )
+void DocumentImpl::setUserStyleSheet( const TQString& sheet )
{
if ( m_usersheet != sheet ) {
m_usersheet = sheet;
@@ -1421,7 +1421,7 @@ CSSStyleSheetImpl* DocumentImpl::elementSheet()
return m_elemSheet;
}
-void DocumentImpl::determineParseMode( const QString &/*str*/ )
+void DocumentImpl::determineParseMode( const TQString &/*str*/ )
{
// For XML documents, use strict parse mode
pMode = Strict;
@@ -1622,7 +1622,7 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
}
}
-ElementImpl* DocumentImpl::findAccessKeyElement(QChar c)
+ElementImpl* DocumentImpl::findAccessKeyElement(TQChar c)
{
c = c.upper();
for( NodeImpl* n = this;
@@ -1667,10 +1667,10 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
if(strcasecmp(equiv, "refresh") == 0 && v && v->part()->metaRefreshEnabled())
{
// get delay and url
- QString str = content.string().stripWhiteSpace();
- int pos = str.find(QRegExp("[;,]"));
+ TQString str = content.string().stripWhiteSpace();
+ int pos = str.find(TQRegExp("[;,]"));
if ( pos == -1 )
- pos = str.find(QRegExp("[ \t]"));
+ pos = str.find(TQRegExp("[ \t]"));
bool ok = false;
int delay = kMax( 0, content.implementation()->toInt(&ok) );
@@ -1692,7 +1692,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
(str[str.length()-1] == ';' || str[str.length()-1] == ','))
str.setLength(str.length()-1);
str = parseURL( DOMString(str) ).string();
- QString newURL = getDocument()->completeURL( str );
+ TQString newURL = getDocument()->completeURL( str );
if ( ok )
v->part()->scheduleRedirection(delay, getDocument()->completeURL( str ), delay < 2 || newURL == URL().url());
}
@@ -1700,7 +1700,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
else if(strcasecmp(equiv, "expires") == 0)
{
bool relative = false;
- QString str = content.string().stripWhiteSpace();
+ TQString str = content.string().stripWhiteSpace();
time_t expire_date = KRFCDate::parseDate(str);
if (!expire_date)
{
@@ -1714,7 +1714,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
}
else if(v && (strcasecmp(equiv, "pragma") == 0 || strcasecmp(equiv, "cache-control") == 0))
{
- QString str = content.string().lower().stripWhiteSpace();
+ TQString str = content.string().lower().stripWhiteSpace();
KURL url = v->part()->url();
if ((str == "no-cache") && url.protocol().startsWith("http"))
{
@@ -1853,7 +1853,7 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
if (_name->l == 0) return 0;
NodeImpl::Id id, nsid = 0;
- QConstString n(_name->s, _name->l);
+ TQConstString n(_name->s, _name->l);
bool cs = true; // case sensitive
if (_type != NodeImpl::NamespaceId) {
if (_nsURI)
@@ -1878,7 +1878,7 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
// Look in the names array for the name
// compatibility mode has to lookup upper case
- QString name = cs ? n.string() : n.string().upper();
+ TQString name = cs ? n.string() : n.string().upper();
if (!_nsURI) {
id = (NodeImpl::Id)(long) map->ids.find( name );
@@ -1889,8 +1889,8 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
id = (NodeImpl::Id)(long) map->ids.find( name );
if (!readonly && id && _prefix && _prefix->l) {
// we were called in registration mode... check if the alias exists
- QConstString px( _prefix->s, _prefix->l );
- QString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name);
+ TQConstString px( _prefix->s, _prefix->l );
+ TQString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name);
if (!map->ids.find( qn )) {
map->ids.insert( qn, (void*)id );
}
@@ -2065,9 +2065,9 @@ void DocumentImpl::recalcStyleSelector()
assert(m_pendingStylesheets==0);
- QPtrList<StyleSheetImpl> oldStyleSheets = m_styleSheets->styleSheets;
+ TQPtrList<StyleSheetImpl> oldStyleSheets = m_styleSheets->styleSheets;
m_styleSheets->styleSheets.clear();
- QString sheetUsed = view() ? view()->part()->d->m_sheetUsed.replace("&&", "&") : QString();
+ TQString sheetUsed = view() ? view()->part()->d->m_sheetUsed.replace("&&", "&") : TQString();
bool autoselect = sheetUsed.isEmpty();
if (autoselect && !m_preferredStylesheetSet.isEmpty())
sheetUsed = m_preferredStylesheetSet.string();
@@ -2109,7 +2109,7 @@ void DocumentImpl::recalcStyleSelector()
}
else if (n->isHTMLElement() && ( n->id() == ID_LINK || n->id() == ID_STYLE) ) {
- QString title;
+ TQString title;
if ( n->id() == ID_LINK ) {
HTMLLinkElementImpl* l = static_cast<HTMLLinkElementImpl*>(n);
if (l->isCSSStyleSheet()) {
@@ -2177,17 +2177,17 @@ void DocumentImpl::recalcStyleSelector()
// the alternative sheet we used doesn't exist anymore
// so try from scratch again
if (view())
- view()->part()->d->m_sheetUsed = QString::null;
+ view()->part()->d->m_sheetUsed = TQString::null;
if (!m_preferredStylesheetSet.isEmpty() && !(sheetUsed == m_preferredStylesheetSet))
sheetUsed = m_preferredStylesheetSet.string();
else
- sheetUsed = QString::null;
+ sheetUsed = TQString::null;
autoselect = true;
}
// Include programmatically added style sheets
if (m_addedStyleSheets) {
- QPtrListIterator<StyleSheetImpl> it = m_addedStyleSheets->styleSheets;
+ TQPtrListIterator<StyleSheetImpl> it = m_addedStyleSheets->styleSheets;
for (; *it; ++it) {
if ((*it)->isCSSStyleSheet() && !(*it)->disabled())
m_styleSheets->add(*it);
@@ -2195,7 +2195,7 @@ void DocumentImpl::recalcStyleSelector()
}
// De-reference all the stylesheets in the old list
- QPtrListIterator<StyleSheetImpl> it(oldStyleSheets);
+ TQPtrListIterator<StyleSheetImpl> it(oldStyleSheets);
for (; it.current(); ++it)
it.current()->deref();
@@ -2206,7 +2206,7 @@ void DocumentImpl::rebuildStyleSelector()
{
// Create a new style selector
delete m_styleSelector;
- QString usersheet = m_usersheet;
+ TQString usersheet = m_usersheet;
if ( m_view && m_view->mediaType() == "print" )
usersheet += m_printSheet;
m_styleSelector = new CSSStyleSelector( this, usersheet, m_styleSheets, m_url,
@@ -2329,17 +2329,17 @@ void DocumentImpl::detachNodeIterator(NodeIteratorImpl *ni)
void DocumentImpl::notifyBeforeNodeRemoval(NodeImpl *n)
{
- QPtrListIterator<NodeIteratorImpl> it(m_nodeIterators);
+ TQPtrListIterator<NodeIteratorImpl> it(m_nodeIterators);
for (; it.current(); ++it)
it.current()->notifyBeforeNodeRemoval(n);
}
-bool DocumentImpl::isURLAllowed(const QString& url) const
+bool DocumentImpl::isURLAllowed(const TQString& url) const
{
KHTMLPart *thisPart = part();
KURL newURL(completeURL(url));
- newURL.setRef(QString::null);
+ newURL.setRef(TQString::null);
if (KHTMLFactory::defaultHTMLSettings()->isAdFiltered( newURL.url() ))
return false;
@@ -2357,7 +2357,7 @@ bool DocumentImpl::isURLAllowed(const QString& url) const
bool foundSelfReference = false;
for (KHTMLPart *part = thisPart; part; part = part->parentPart()) {
KURL partURL = part->url();
- partURL.setRef(QString::null);
+ partURL.setRef(TQString::null);
if (partURL == newURL) {
if (foundSelfReference)
return false;
@@ -2436,7 +2436,7 @@ void DocumentImpl::load(const DOMString &uri)
// of the data retrieved from the server based on the character set, as happens with
// HTML files. Need to look into a way of using the decoder in CachedCSSStyleSheet.
m_docLoading = true;
- m_loadingXMLDoc = m_docLoader->requestStyleSheet(uri.string(),QString(),"text/xml");
+ m_loadingXMLDoc = m_docLoader->requestStyleSheet(uri.string(),TQString(),"text/xml");
if (!m_loadingXMLDoc) {
m_docLoading = false;
@@ -2478,7 +2478,7 @@ void DocumentImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMString
m_loadingXMLDoc = 0;
}
-void DocumentImpl::error(int err, const QString &text)
+void DocumentImpl::error(int err, const TQString &text)
{
m_docLoading = false;
if (m_inSyncLoad) {
@@ -2509,10 +2509,10 @@ void DocumentImpl::defaultEventHandler(EventImpl *evt)
if (!m_windowEventListeners.listeners || evt->propagationStopped())
return;
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
//Grab a copy in case of clear
- QValueList<RegisteredEventListener> listeners = *m_windowEventListeners.listeners;
+ TQValueList<RegisteredEventListener> listeners = *m_windowEventListeners.listeners;
Event ev(evt);
for (it = listeners.begin(); it != listeners.end(); ++it) {
//Check to make sure it didn't get removed. KDE4: use Java-style iterators
@@ -2554,7 +2554,7 @@ bool DocumentImpl::hasWindowEventListener(int id)
return m_windowEventListeners.hasEventListener(id);
}
-EventListener *DocumentImpl::createHTMLEventListener(const QString& code, const QString& name, NodeImpl* node)
+EventListener *DocumentImpl::createHTMLEventListener(const TQString& code, const TQString& name, NodeImpl* node)
{
return part() ? part()->createHTMLEventListener(code, name, node) : 0;
}
@@ -2595,7 +2595,7 @@ void DocumentImpl::dispatchImageLoadEventsNow()
m_imageLoadEventDispatchingList = m_imageLoadEventDispatchSoonList;
m_imageLoadEventDispatchSoonList.clear();
- for (QPtrListIterator<HTMLImageElementImpl> it(m_imageLoadEventDispatchingList); it.current(); ) {
+ for (TQPtrListIterator<HTMLImageElementImpl> it(m_imageLoadEventDispatchingList); it.current(); ) {
HTMLImageElementImpl* image = it.current();
// Must advance iterator *before* dispatching call.
// Otherwise, it might be advanced automatically if dispatching the call had a side effect
@@ -2607,12 +2607,12 @@ void DocumentImpl::dispatchImageLoadEventsNow()
m_imageLoadEventDispatchingList.clear();
}
-void DocumentImpl::timerEvent(QTimerEvent *)
+void DocumentImpl::timerEvent(TQTimerEvent *)
{
dispatchImageLoadEventsNow();
}
-void DocumentImpl::setDecoderCodec(const QTextCodec *codec)
+void DocumentImpl::setDecoderCodec(const TQTextCodec *codec)
{
m_decoderMibEnum = codec->mibEnum();
}
diff --git a/khtml/xml/dom_docimpl.h b/khtml/xml/dom_docimpl.h
index 51d762325..e32a88414 100644
--- a/khtml/xml/dom_docimpl.h
+++ b/khtml/xml/dom_docimpl.h
@@ -34,13 +34,13 @@
#include "misc/loader.h"
#include "misc/seed.h"
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qintcache.h>
-#include <qintdict.h>
-#include <qdict.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqintcache.h>
+#include <tqintdict.h>
+#include <tqdict.h>
+#include <tqmap.h>
#include <kurl.h>
@@ -151,36 +151,36 @@ public:
/**
Add a pointer as just one of candidates, not neccesserily the proper one
*/
- void add(const QString& id, ElementImpl* nd);
+ void add(const TQString& id, ElementImpl* nd);
/**
Set the pointer as the definite mapping; it must have already been added
*/
- void set(const QString& id, ElementImpl* nd);
+ void set(const TQString& id, ElementImpl* nd);
/**
Remove the item; it must have already been added.
*/
- void remove(const QString& id, ElementImpl* nd);
+ void remove(const TQString& id, ElementImpl* nd);
/**
Returns true if the item exists
*/
- bool contains(const QString& id);
+ bool contains(const TQString& id);
/**
Returns the information for the given ID
*/
- ItemInfo* get(const QString& id);
+ ItemInfo* get(const TQString& id);
private:
- QDict<ItemInfo> m_dict;
+ TQDict<ItemInfo> m_dict;
};
/**
* @internal
*/
-class DocumentImpl : public QObject, private khtml::CachedObjectClient, public NodeBaseImpl
+class DocumentImpl : public TQObject, private khtml::CachedObjectClient, public NodeBaseImpl
{
Q_OBJECT
public:
@@ -197,7 +197,7 @@ public:
virtual AttrImpl *createAttribute( const DOMString &tagName, int* pExceptioncode = 0 );
DocumentFragmentImpl *createDocumentFragment ();
TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), data); }
- TextImpl *createTextNode ( const QString& data )
+ TextImpl *createTextNode ( const TQString& data )
{ return createTextNode(new DOMStringImpl(data.unicode(), data.length())); }
CommentImpl *createComment ( DOMStringImpl* data );
CDATASectionImpl *createCDATASection ( DOMStringImpl* data );
@@ -270,16 +270,16 @@ public:
void recalcStyleSelector();
void rebuildStyleSelector();
- QString nextState();
+ TQString nextState();
// Query all registered elements for their state
- QStringList docState();
+ TQStringList docState();
bool unsubmittedFormChanges();
void registerMaintainsState(NodeImpl* e) { m_maintainsState.append(e); }
void deregisterMaintainsState(NodeImpl* e) { m_maintainsState.removeRef(e); }
// Set the state the document should restore to
- void setRestoreState( const QStringList &s) { m_state = s; }
+ void setRestoreState( const TQStringList &s) { m_state = s; }
KHTMLView *view() const { return m_view; }
KHTMLPart* part() const;
@@ -293,7 +293,7 @@ public:
bool entityReferenceExpansion, int &exceptioncode);
virtual void recalcStyle( StyleChange = NoChange );
- static QPtrList<DocumentImpl> * changedDocuments;
+ static TQPtrList<DocumentImpl> * changedDocuments;
virtual void updateRendering();
void updateLayout();
static void updateDocumentsRendering();
@@ -307,7 +307,7 @@ public:
// to get visually ordered hebrew and arabic pages right
void setVisuallyOrdered();
// to get URL decoding right
- void setDecoderCodec(const QTextCodec *codec);
+ void setDecoderCodec(const TQTextCodec *codec);
void setSelection(NodeImpl* s, int sp, NodeImpl* e, int ep);
void clearSelection();
@@ -315,34 +315,34 @@ public:
void open ( bool clearEventListeners = true );
virtual void close ( );
void write ( const DOMString &text );
- void write ( const QString &text );
+ void write ( const TQString &text );
void writeln ( const DOMString &text );
void finishParsing ( );
KURL URL() const { return m_url; }
- void setURL(const QString& url) { m_url = url; }
+ void setURL(const TQString& url) { m_url = url; }
KURL baseURL() const { return m_baseURL.isEmpty() ? m_url : m_baseURL; }
void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; }
- QString baseTarget() const { return m_baseTarget; }
- void setBaseTarget(const QString& baseTarget) { m_baseTarget = baseTarget; }
+ TQString baseTarget() const { return m_baseTarget; }
+ void setBaseTarget(const TQString& baseTarget) { m_baseTarget = baseTarget; }
- QString completeURL(const QString& url) const { return KURL(baseURL(),url,m_decoderMibEnum).url(); };
+ TQString completeURL(const TQString& url) const { return KURL(baseURL(),url,m_decoderMibEnum).url(); };
DOMString canonURL(const DOMString& url) const { return url.isEmpty() ? url : completeURL(url.string()); }
- void setUserStyleSheet(const QString& sheet);
- QString userStyleSheet() const { return m_usersheet; }
- void setPrintStyleSheet(const QString& sheet) { m_printSheet = sheet; }
- QString printStyleSheet() const { return m_printSheet; }
+ void setUserStyleSheet(const TQString& sheet);
+ TQString userStyleSheet() const { return m_usersheet; }
+ void setPrintStyleSheet(const TQString& sheet) { m_printSheet = sheet; }
+ TQString printStyleSheet() const { return m_printSheet; }
CSSStyleSheetImpl* elementSheet();
virtual khtml::Tokenizer *createTokenizer();
khtml::Tokenizer *tokenizer() { return m_tokenizer; }
- QPaintDeviceMetrics *paintDeviceMetrics() { return m_paintDeviceMetrics; }
- QPaintDevice *paintDevice() const { return m_paintDevice; }
- void setPaintDevice( QPaintDevice *dev );
+ TQPaintDeviceMetrics *paintDeviceMetrics() { return m_paintDeviceMetrics; }
+ TQPaintDevice *paintDevice() const { return m_paintDevice; }
+ void setPaintDevice( TQPaintDevice *dev );
enum HTMLMode {
Html3 = 0,
@@ -356,7 +356,7 @@ public:
Transitional,
Strict
};
- virtual void determineParseMode( const QString &str );
+ virtual void determineParseMode( const TQString &str );
void setParseMode( ParseMode m ) { pMode = m; }
ParseMode parseMode() const { return pMode; }
@@ -370,8 +370,8 @@ public:
void setParsing(bool b) { m_bParsing = b; }
bool parsing() const { return m_bParsing; }
- void setTextColor( QColor color ) { m_textColor = color; }
- QColor textColor() const { return m_textColor; }
+ void setTextColor( TQColor color ) { m_textColor = color; }
+ TQColor textColor() const { return m_textColor; }
void setDesignMode(bool b);
bool designMode() const;
@@ -398,7 +398,7 @@ public:
void addStyleSheet(StyleSheetImpl *, int *exceptioncode = 0);
void removeStyleSheet(StyleSheetImpl *, int *exceptioncode = 0);
- QStringList availableStyleSheets() const { return m_availableSheets; }
+ TQStringList availableStyleSheets() const { return m_availableSheets; }
NodeImpl* hoverNode() const { return m_hoverNode; }
void setHoverNode(NodeImpl *newHoverNode);
@@ -443,21 +443,21 @@ public:
void loadXML(const DOMString &source);
// from cachedObjectClient
void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet, const DOM::DOMString &charset);
- void error(int err, const QString &text);
+ void error(int err, const TQString &text);
- typedef QMap<QString, ProcessingInstructionImpl*> LocalStyleRefs;
+ typedef TQMap<TQString, ProcessingInstructionImpl*> LocalStyleRefs;
LocalStyleRefs* localStyleRefs() { return &m_localStyleRefs; }
virtual void defaultEventHandler(EventImpl *evt);
virtual void setHTMLWindowEventListener(int id, EventListener *listener);
EventListener *getHTMLWindowEventListener(int id);
- EventListener *createHTMLEventListener(const QString& code, const QString& name, NodeImpl* node);
+ EventListener *createHTMLEventListener(const TQString& code, const TQString& name, NodeImpl* node);
void addWindowEventListener(int id, EventListener *listener, const bool useCapture);
void removeWindowEventListener(int id, EventListener *listener, bool useCapture);
bool hasWindowEventListener(int id);
- EventListener *createHTMLEventListener(QString code);
+ EventListener *createHTMLEventListener(TQString code);
/**
* Searches through the document, starting from fromNode, for the next selectable element that comes after fromNode.
@@ -485,7 +485,7 @@ public:
*/
NodeImpl *previousFocusNode(NodeImpl *fromNode);
- ElementImpl* findAccessKeyElement(QChar c);
+ ElementImpl* findAccessKeyElement(TQChar c);
int nodeAbsIndex(NodeImpl *node);
NodeImpl *nodeWithAbsIndex(int absIndex);
@@ -504,7 +504,7 @@ public:
void dispatchImageLoadEventSoon(HTMLImageElementImpl *);
void dispatchImageLoadEventsNow();
void removeImage(HTMLImageElementImpl *);
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
// Returns the owning element in the parent document.
// Returns 0 if this is the top level document.
@@ -513,7 +513,7 @@ public:
DOMString domain() const;
void setDomain( const DOMString &newDomain ); // not part of the DOM
- bool isURLAllowed(const QString& url) const;
+ bool isURLAllowed(const TQString& url) const;
HTMLElementImpl* body();
@@ -522,8 +522,8 @@ public:
void incDOMTreeVersion() { ++m_domtree_version; }
unsigned int domTreeVersion() const { return m_domtree_version; }
- QDict<khtml::CounterNode>* counters(const khtml::RenderObject* o) { return m_counterDict[(void*)o]; }
- void setCounters(const khtml::RenderObject* o, QDict<khtml::CounterNode> *dict) { m_counterDict.insert((void*)o, dict);}
+ TQDict<khtml::CounterNode>* counters(const khtml::RenderObject* o) { return m_counterDict[(void*)o]; }
+ void setCounters(const khtml::RenderObject* o, TQDict<khtml::CounterNode> *dict) { m_counterDict.insert((void*)o, dict);}
void removeCounters(const khtml::RenderObject* o) { m_counterDict.remove((void*)o); }
@@ -539,8 +539,8 @@ public:
return m_getElementByIdCache;
}
- QString contentLanguage() const { return m_contentLanguage; }
- void setContentLanguage(const QString& cl) { m_contentLanguage = cl; }
+ TQString contentLanguage() const { return m_contentLanguage; }
+ void setContentLanguage(const TQString& cl) { m_contentLanguage = cl; }
khtml::DynamicDomRestyler& dynamicDomRestyler() { return *m_dynamicDomRestyler; }
const khtml::DynamicDomRestyler& dynamicDomRestyler() const { return *m_dynamicDomRestyler; }
@@ -551,22 +551,22 @@ signals:
protected:
khtml::CSSStyleSelector *m_styleSelector;
KHTMLView *m_view;
- QStringList m_state;
+ TQStringList m_state;
khtml::DocLoader *m_docLoader;
khtml::Tokenizer *m_tokenizer;
KURL m_url;
KURL m_baseURL;
- QString m_baseTarget;
+ TQString m_baseTarget;
DocumentTypeImpl *m_doctype;
DOMImplementationImpl *m_implementation;
- QString m_usersheet;
- QString m_printSheet;
- QStringList m_availableSheets;
+ TQString m_usersheet;
+ TQString m_printSheet;
+ TQStringList m_availableSheets;
- QString m_contentLanguage;
+ TQString m_contentLanguage;
// Track the number of currently loading top-level stylesheets. Sheets
// loaded using the @import directive are not included in this count.
@@ -577,12 +577,12 @@ protected:
CSSStyleSheetImpl *m_elemSheet;
- QPaintDevice *m_paintDevice;
- QPaintDeviceMetrics *m_paintDeviceMetrics;
+ TQPaintDevice *m_paintDevice;
+ TQPaintDeviceMetrics *m_paintDeviceMetrics;
ParseMode pMode;
HTMLMode hMode;
- QColor m_textColor;
+ TQColor m_textColor;
NodeImpl *m_hoverNode;
NodeImpl *m_focusNode;
NodeImpl *m_activeNode;
@@ -594,14 +594,14 @@ protected:
IdNameMapping(unsigned short _start)
: idStart(_start), count(0) {}
~IdNameMapping() {
- QIntDictIterator<DOM::DOMStringImpl> it(names);
+ TQIntDictIterator<DOM::DOMStringImpl> it(names);
for (; it.current() ; ++it)
it.current()->deref();
}
unsigned short idStart;
unsigned short count;
- QIntDict<DOM::DOMStringImpl> names;
- QDict<void> ids;
+ TQIntDict<DOM::DOMStringImpl> names;
+ TQDict<void> ids;
void expandIfNeeded() {
if (ids.size() <= ids.count() && ids.size() != khtml_MaxSeed)
@@ -612,10 +612,10 @@ protected:
void addAlias(DOMStringImpl* _prefix, DOMStringImpl* _name, bool cs, NodeImpl::Id id) {
if(_prefix && _prefix->l) {
- QConstString n(_name->s, _name->l);
- QConstString px( _prefix->s, _prefix->l );
- QString name = cs ? n.string() : n.string().upper();
- QString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name);
+ TQConstString n(_name->s, _name->l);
+ TQConstString px( _prefix->s, _prefix->l );
+ TQString name = cs ? n.string() : n.string().upper();
+ TQString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name);
if (!ids.find( qn )) {
ids.insert( qn, (void*)id );
}
@@ -629,7 +629,7 @@ protected:
IdNameMapping *m_elementMap;
IdNameMapping *m_namespaceMap;
- QPtrList<NodeIteratorImpl> m_nodeIterators;
+ TQPtrList<NodeIteratorImpl> m_nodeIterators;
AbstractViewImpl *m_defaultView;
unsigned short m_listenerTypes;
@@ -637,10 +637,10 @@ protected:
StyleSheetListImpl *m_addedStyleSheets; // programmatically added style sheets
LocalStyleRefs m_localStyleRefs; // references to inlined style elements
RegisteredListenerList m_windowEventListeners;
- QPtrList<NodeImpl> m_maintainsState;
+ TQPtrList<NodeImpl> m_maintainsState;
// ### evaluate for placement in RenderStyle
- QPtrDict<QDict<khtml::CounterNode> > m_counterDict;
+ TQPtrDict<TQDict<khtml::CounterNode> > m_counterDict;
khtml::DynamicDomRestyler *m_dynamicDomRestyler;
@@ -664,10 +664,10 @@ protected:
ElementMappingCache m_underDocNamedCache;
//Cache for nodelists and collections.
- QIntDict<NodeListImpl::Cache> m_nodeListCache;
+ TQIntDict<NodeListImpl::Cache> m_nodeListCache;
- QPtrList<HTMLImageElementImpl> m_imageLoadEventDispatchSoonList;
- QPtrList<HTMLImageElementImpl> m_imageLoadEventDispatchingList;
+ TQPtrList<HTMLImageElementImpl> m_imageLoadEventDispatchSoonList;
+ TQPtrList<HTMLImageElementImpl> m_imageLoadEventDispatchingList;
int m_imageLoadEventTimer;
//Cache for getElementById
diff --git a/khtml/xml/dom_elementimpl.cpp b/khtml/xml/dom_elementimpl.cpp
index 5db497e7d..c41bef3dc 100644
--- a/khtml/xml/dom_elementimpl.cpp
+++ b/khtml/xml/dom_elementimpl.cpp
@@ -46,7 +46,7 @@
#include "css/cssproperties.h"
#include "xml/dom_xmlimpl.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <stdlib.h>
@@ -746,12 +746,12 @@ void ElementImpl::updateId(DOMStringImpl* oldId, DOMStringImpl* newId)
addId(DOMString(newId).string());
}
-void ElementImpl::removeId(const QString& id)
+void ElementImpl::removeId(const TQString& id)
{
getDocument()->getElementByIdCache().remove(id, this);
}
-void ElementImpl::addId(const QString& id)
+void ElementImpl::addId(const TQString& id)
{
getDocument()->getElementByIdCache().add(id, this);
}
@@ -805,7 +805,7 @@ DOMString ElementImpl::openTagStartToString(bool expandurls) const
//We need to sanitize the urls - strip out the passwords.
//FIXME: are src= and href= the only places that might have a password and need to be sanitized?
KURL safeURL(getDocument()->completeURL(attribute->value().string()));
- safeURL.setPass(QString::null);
+ safeURL.setPass(TQString::null);
result += safeURL.htmlURL();
}
else {
@@ -848,14 +848,14 @@ DOMString ElementImpl::selectionToString(NodeImpl *selectionStart, NodeImpl *sel
DOMString ElementImpl::toString() const
{
- QString result = openTagStartToString().string(); //Accumulate in QString, since DOMString can't append well.
+ TQString result = openTagStartToString().string(); //Accumulate in TQString, since DOMString can't append well.
if (hasChildNodes()) {
result += ">";
for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
DOMString kid = child->toString();
- result += QConstString(kid.unicode(), kid.length()).string();
+ result += TQConstString(kid.unicode(), kid.length()).string();
}
result += "</";
diff --git a/khtml/xml/dom_elementimpl.h b/khtml/xml/dom_elementimpl.h
index 1bc5148d5..ee1be3e4a 100644
--- a/khtml/xml/dom_elementimpl.h
+++ b/khtml/xml/dom_elementimpl.h
@@ -188,7 +188,7 @@ public:
void setAttributeMap ( NamedAttrMapImpl* list );
// State of the element.
- virtual QString state() { return QString::null; }
+ virtual TQString state() { return TQString::null; }
virtual void attach();
virtual void close();
@@ -238,9 +238,9 @@ public:
void updateId(DOMStringImpl* oldId, DOMStringImpl* newId);
//Called when mapping from id to this node in document should be removed
- virtual void removeId(const QString& id);
+ virtual void removeId(const TQString& id);
//Called when mapping from id to this node in document should be added
- virtual void addId (const QString& id);
+ virtual void addId (const TQString& id);
protected:
void createAttributeMap() const;
diff --git a/khtml/xml/dom_nodeimpl.cpp b/khtml/xml/dom_nodeimpl.cpp
index 692ba4394..137928c81 100644
--- a/khtml/xml/dom_nodeimpl.cpp
+++ b/khtml/xml/dom_nodeimpl.cpp
@@ -233,7 +233,7 @@ kdDebug(6200) << "getCaret: node " << this << " " << nodeName().string() << " of
#endif
mapDOMPosToRenderPos(this, offset, r, r_ofs, outside, outsideEnd);
#if 0
-kdDebug(6200) << "getCaret: r " << r << " " << (r?r->renderName():QString::null) << " r_ofs: " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
+kdDebug(6200) << "getCaret: r " << r << " " << (r?r->renderName():TQString::null) << " r_ofs: " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
#endif
if (r) {
r->caretPos(r_ofs, override*RenderObject::CFOverride
@@ -244,14 +244,14 @@ kdDebug(6200) << "getCaret: r " << r << " " << (r?r->renderName():QString::null)
} else _x = _y = height = -1, width = 1;
}
-QRect NodeImpl::getRect() const
+TQRect NodeImpl::getRect() const
{
int _x, _y;
if(m_render && m_render->absolutePosition(_x, _y))
- return QRect( _x + m_render->inlineXPos(), _y + m_render->inlineYPos(),
+ return TQRect( _x + m_render->inlineXPos(), _y + m_render->inlineYPos(),
m_render->width(), m_render->height() + renderer()->borderTopExtra() + renderer()->borderBottomExtra() );
- return QRect();
+ return TQRect();
}
void NodeImpl::setChanged(bool b)
@@ -353,7 +353,7 @@ void NodeImpl::dispatchGenericEvent( EventImpl *evt, int &/*exceptioncode */)
// ### check that type specified
// work out what nodes to send event to
- QPtrList<NodeImpl> nodeChain;
+ TQPtrList<NodeImpl> nodeChain;
NodeImpl *n;
for (n = this; n; n = n->parentNode()) {
n->ref();
@@ -362,7 +362,7 @@ void NodeImpl::dispatchGenericEvent( EventImpl *evt, int &/*exceptioncode */)
// trigger any capturing event handlers on our way down
evt->setEventPhase(Event::CAPTURING_PHASE);
- QPtrListIterator<NodeImpl> it(nodeChain);
+ TQPtrListIterator<NodeImpl> it(nodeChain);
for (; it.current() && it.current() != this && !evt->propagationStopped(); ++it) {
evt->setCurrentTarget(it.current());
it.current()->handleLocalEvents(evt,true);
@@ -463,7 +463,7 @@ void NodeImpl::dispatchWindowEvent(int _id, bool canBubbleArg, bool cancelableAr
evt->deref();
}
-void NodeImpl::dispatchMouseEvent(QMouseEvent *_mouse, int overrideId, int overrideDetail)
+void NodeImpl::dispatchMouseEvent(TQMouseEvent *_mouse, int overrideId, int overrideDetail)
{
bool cancelable = true;
int detail = overrideDetail; // defaults to 0
@@ -473,17 +473,17 @@ void NodeImpl::dispatchMouseEvent(QMouseEvent *_mouse, int overrideId, int overr
}
else {
switch (_mouse->type()) {
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
evtId = EventImpl::MOUSEDOWN_EVENT;
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
evtId = EventImpl::MOUSEUP_EVENT;
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
evtId = EventImpl::CLICK_EVENT;
detail = 1; // ### support for multiple double clicks
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
evtId = EventImpl::MOUSEMOVE_EVENT;
cancelable = false;
break;
@@ -565,7 +565,7 @@ void NodeImpl::dispatchSubtreeModifiedEvent()
evt->deref();
}
-bool NodeImpl::dispatchKeyEvent(QKeyEvent *key, bool keypress)
+bool NodeImpl::dispatchKeyEvent(TQKeyEvent *key, bool keypress)
{
int exceptioncode = 0;
//kdDebug(6010) << "DOM::NodeImpl: dispatching keyboard event" << endl;
@@ -590,8 +590,8 @@ void NodeImpl::handleLocalEvents(EventImpl *evt, bool useCapture)
// removeEventListener (e.g. called from a JS event listener) might
// invalidate the item after the current iterator (which "it" is pointing to).
// So we make a copy of the list.
- QValueList<RegisteredEventListener> listeners = *m_regdListeners.listeners;
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener> listeners = *m_regdListeners.listeners;
+ TQValueList<RegisteredEventListener>::iterator it;
for (it = listeners.begin(); it != listeners.end(); ++it) {
//Check whether this got removed...KDE4: use Java-style iterators
if (!m_regdListeners.stillContainsListener(*it))
@@ -860,12 +860,12 @@ bool NodeImpl::maintainsState()
return false;
}
-QString NodeImpl::state()
+TQString NodeImpl::state()
{
- return QString::null;
+ return TQString::null;
}
-void NodeImpl::restoreState(const QString &/*state*/)
+void NodeImpl::restoreState(const TQString &/*state*/)
{
}
@@ -979,13 +979,13 @@ long NodeImpl::maxOffset() const
DOMStringImpl* NodeImpl::textContent() const
{
- QString out;
+ TQString out;
for (NodeImpl *child = firstChild(); child != 0; child = child->nextSibling()) {
short type = child->nodeType();
if (type != Node::COMMENT_NODE && type != Node::PROCESSING_INSTRUCTION_NODE) {
DOMStringImpl* kidText = child->textContent();
if (kidText)
- out += QConstString(kidText->s, kidText->l).string();
+ out += TQConstString(kidText->s, kidText->l).string();
delete kidText;
}
}
@@ -1883,7 +1883,7 @@ GenericRONamedNodeMapImpl::GenericRONamedNodeMapImpl(DocumentImpl* doc)
: NamedNodeMapImpl()
{
m_doc = doc;
- m_contents = new QPtrList<NodeImpl>;
+ m_contents = new TQPtrList<NodeImpl>;
}
GenericRONamedNodeMapImpl::~GenericRONamedNodeMapImpl()
@@ -1897,7 +1897,7 @@ GenericRONamedNodeMapImpl::~GenericRONamedNodeMapImpl()
NodeImpl *GenericRONamedNodeMapImpl::getNamedItem ( NodeImpl::Id id, bool /*nsAware*/, DOMStringImpl* /*qName*/ ) const
{
// ## do we need namespace support in this class?
- QPtrListIterator<NodeImpl> it(*m_contents);
+ TQPtrListIterator<NodeImpl> it(*m_contents);
for (; it.current(); ++it)
if (it.current()->id() == id)
return it.current();
@@ -1960,12 +1960,12 @@ void RegisteredListenerList::addEventListener(int id, EventListener *listener, c
{
RegisteredEventListener rl(static_cast<EventImpl::EventId>(id),listener,useCapture);
if (!listeners)
- listeners = new QValueList<RegisteredEventListener>;
+ listeners = new TQValueList<RegisteredEventListener>;
// if this id/listener/useCapture combination is already registered, do nothing.
// the DOM2 spec says that "duplicate instances are discarded", and this keeps
// the listener order intact.
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
for (it = listeners->begin(); it != listeners->end(); ++it)
if (*it == rl)
return;
@@ -1980,7 +1980,7 @@ void RegisteredListenerList::removeEventListener(int id, EventListener *listener
RegisteredEventListener rl(static_cast<EventImpl::EventId>(id),listener,useCapture);
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
for (it = listeners->begin(); it != listeners->end(); ++it)
if (*it == rl) {
listeners->remove(it);
@@ -1996,9 +1996,9 @@ bool RegisteredListenerList::isHTMLEventListener(EventListener* listener)
void RegisteredListenerList::setHTMLEventListener(int id, EventListener *listener)
{
if (!listeners)
- listeners = new QValueList<RegisteredEventListener>;
+ listeners = new TQValueList<RegisteredEventListener>;
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
if (!listener) {
for (it = listeners->begin(); it != listeners->end(); ++it) {
if ((*it).id == id && isHTMLEventListener((*it).listener)) {
@@ -2029,7 +2029,7 @@ EventListener *RegisteredListenerList::getHTMLEventListener(int id)
if (!listeners)
return 0;
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
for (it = listeners->begin(); it != listeners->end(); ++it)
if ((*it).id == id && isHTMLEventListener((*it).listener)) {
return (*it).listener;
@@ -2042,7 +2042,7 @@ bool RegisteredListenerList::hasEventListener(int id)
if (!listeners)
return false;
- QValueList<RegisteredEventListener>::iterator it;
+ TQValueList<RegisteredEventListener>::iterator it;
for (it = listeners->begin(); it != listeners->end(); ++it)
if ((*it).id == id)
return true;
diff --git a/khtml/xml/dom_nodeimpl.h b/khtml/xml/dom_nodeimpl.h
index 1ff150f6a..31bbceda0 100644
--- a/khtml/xml/dom_nodeimpl.h
+++ b/khtml/xml/dom_nodeimpl.h
@@ -76,7 +76,7 @@ struct RegisteredListenerList {
//### KDE4: should disappear
bool stillContainsListener(const RegisteredEventListener& listener);
- QValueList<RegisteredEventListener>* listeners;//The actual listener list - may be 0
+ TQValueList<RegisteredEventListener>* listeners;//The actual listener list - may be 0
private:
bool isHTMLEventListener(EventListener* listener);
};
@@ -257,7 +257,7 @@ public:
virtual bool isInline() const;
virtual void getCaret(int offset, bool override, int &_x, int &_y, int &width, int &height);
- virtual QRect getRect() const;
+ virtual TQRect getRect() const;
enum StyleChange { NoChange, NoInherit, Inherit, Detach, Force };
virtual void recalcStyle( StyleChange = NoChange ) {}
@@ -279,12 +279,12 @@ public:
// return true if event not prevented
bool dispatchHTMLEvent(int _id, bool canBubbleArg, bool cancelableArg);
void dispatchWindowEvent(int _id, bool canBubbleArg, bool cancelableArg);
- void dispatchMouseEvent(QMouseEvent *e, int overrideId = 0, int overrideDetail = 0);
+ void dispatchMouseEvent(TQMouseEvent *e, int overrideId = 0, int overrideDetail = 0);
void dispatchUIEvent(int _id, int detail = 0);
void dispatchSubtreeModifiedEvent();
// return true if defaultPrevented (i.e. event should be swallowed)
// this matches the logic in KHTMLView.
- bool dispatchKeyEvent(QKeyEvent *key, bool keypress);
+ bool dispatchKeyEvent(TQKeyEvent *key, bool keypress);
void handleLocalEvents(EventImpl *evt, bool useCapture);
@@ -392,7 +392,7 @@ public:
*
* @return State information about the node represented as a string
*/
- virtual QString state();
+ virtual TQString state();
/**
* Sets the state of the element based on a string previosuly returned by state(). This is used to initialize form
@@ -400,7 +400,7 @@ public:
*
* @param state A string representation of the node's previously-stored state
*/
- virtual void restoreState(const QString &state);
+ virtual void restoreState(const TQString &state);
// -----------------------------------------------------------------------------
// Notification of document stucture changes
@@ -584,7 +584,7 @@ public:
{
static Cache* make() { return new Cache; }
- CacheKey key;//### We must store this in here due to QCache in Qt3 sucking
+ CacheKey key;//### We must store this in here due to TQCache in Qt3 sucking
unsigned int version;
union
@@ -729,7 +729,7 @@ public:
protected:
DocumentImpl* m_doc;
- QPtrList<NodeImpl> *m_contents;
+ TQPtrList<NodeImpl> *m_contents;
};
} //namespace
diff --git a/khtml/xml/dom_stringimpl.cpp b/khtml/xml/dom_stringimpl.cpp
index cb32f5903..bb1a728e9 100644
--- a/khtml/xml/dom_stringimpl.cpp
+++ b/khtml/xml/dom_stringimpl.cpp
@@ -28,7 +28,7 @@
#include <kdebug.h>
#include <string.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
using namespace DOM;
using namespace khtml;
@@ -41,14 +41,14 @@ DOMStringImpl::DOMStringImpl(const char *str)
l = strlen(str);
s = QT_ALLOC_QCHAR_VEC( l );
int i = l;
- QChar* ptr = s;
+ TQChar* ptr = s;
while( i-- )
*ptr++ = *str++;
}
else
{
s = QT_ALLOC_QCHAR_VEC( 1 ); // crash protection
- s[0] = 0x0; // == QChar::null;
+ s[0] = 0x0; // == TQChar::null;
l = 0;
}
}
@@ -60,12 +60,12 @@ bool DOMStringImpl::containsOnlyWhitespace() const
return true;
for (uint i = 0; i < l; i++) {
- QChar c = s[i];
+ TQChar c = s[i];
if (c.unicode() <= 0x7F) {
if (c.unicode() > ' ')
return false;
} else {
- if (c.direction() != QChar::DirWS)
+ if (c.direction() != TQChar::DirWS)
return false;
}
}
@@ -78,9 +78,9 @@ void DOMStringImpl::append(DOMStringImpl *str)
if(str && str->l != 0)
{
int newlen = l+str->l;
- QChar *c = QT_ALLOC_QCHAR_VEC(newlen);
- memcpy(c, s, l*sizeof(QChar));
- memcpy(c+l, str->s, str->l*sizeof(QChar));
+ TQChar *c = QT_ALLOC_QCHAR_VEC(newlen);
+ memcpy(c, s, l*sizeof(TQChar));
+ memcpy(c+l, str->s, str->l*sizeof(TQChar));
if(s) QT_DELETE_QCHAR_VEC(s);
s = c;
l = newlen;
@@ -97,10 +97,10 @@ void DOMStringImpl::insert(DOMStringImpl *str, unsigned int pos)
if(str && str->l != 0)
{
int newlen = l+str->l;
- QChar *c = QT_ALLOC_QCHAR_VEC(newlen);
- memcpy(c, s, pos*sizeof(QChar));
- memcpy(c+pos, str->s, str->l*sizeof(QChar));
- memcpy(c+pos+str->l, s+pos, (l-pos)*sizeof(QChar));
+ TQChar *c = QT_ALLOC_QCHAR_VEC(newlen);
+ memcpy(c, s, pos*sizeof(TQChar));
+ memcpy(c+pos, str->s, str->l*sizeof(TQChar));
+ memcpy(c+pos+str->l, s+pos, (l-pos)*sizeof(TQChar));
if(s) QT_DELETE_QCHAR_VEC(s);
s = c;
l = newlen;
@@ -112,8 +112,8 @@ void DOMStringImpl::truncate(int len)
if(len > (int)l) return;
int nl = len < 1 ? 1 : len;
- QChar *c = QT_ALLOC_QCHAR_VEC(nl);
- memcpy(c, s, nl*sizeof(QChar));
+ TQChar *c = QT_ALLOC_QCHAR_VEC(nl);
+ memcpy(c, s, nl*sizeof(TQChar));
if(s) QT_DELETE_QCHAR_VEC(s);
s = c;
l = len;
@@ -126,9 +126,9 @@ void DOMStringImpl::remove(unsigned int pos, int len)
len = l - pos;
uint newLen = l-len;
- QChar *c = QT_ALLOC_QCHAR_VEC(newLen);
- memcpy(c, s, pos*sizeof(QChar));
- memcpy(c+pos, s+pos+len, (l-len-pos)*sizeof(QChar));
+ TQChar *c = QT_ALLOC_QCHAR_VEC(newLen);
+ memcpy(c, s, pos*sizeof(TQChar));
+ memcpy(c+pos, s+pos+len, (l-len-pos)*sizeof(TQChar));
if(s) QT_DELETE_QCHAR_VEC(s);
s = c;
l = newLen;
@@ -159,14 +159,14 @@ DOMStringImpl *DOMStringImpl::collapseWhiteSpace(bool preserveLF, bool preserveW
if (preserveLF && preserveWS) return this;
// Notice we are likely allocating more space than needed (worst case)
- QChar *n = QT_ALLOC_QCHAR_VEC(l);
+ TQChar *n = QT_ALLOC_QCHAR_VEC(l);
unsigned int pos = 0;
bool collapsing = false; // collapsing white-space
bool collapsingLF = false; // collapsing around linefeed
bool changedLF = false;
for(unsigned int i=0; i<l; i++) {
- QChar ch = s[i];
+ TQChar ch = s[i];
// We act on \r as we would on \n because CSS uses it to indicate new-line
if (ch == '\r') ch = '\n';
@@ -224,7 +224,7 @@ DOMStringImpl *DOMStringImpl::collapseWhiteSpace(bool preserveLF, bool preserveW
}
}
-static Length parseLength(const QChar *s, unsigned int l)
+static Length parseLength(const TQChar *s, unsigned int l)
{
if (l == 0) {
return Length(1, Relative);
@@ -239,7 +239,7 @@ static Length parseLength(const QChar *s, unsigned int l)
++i;
bool ok;
- int r = QConstString(s, i).string().toInt(&ok);
+ int r = TQConstString(s, i).string().toInt(&ok);
/* Skip over any remaining digits, we are not that accurate (5.5% => 5%) */
while (i < l && (s[i].isDigit() || s[i] == '.'))
@@ -253,7 +253,7 @@ static Length parseLength(const QChar *s, unsigned int l)
if (i == l) {
return Length(r, Fixed);
} else {
- const QChar* next = s+i;
+ const TQChar* next = s+i;
if (*next == '%')
return Length(r, Percent);
@@ -264,7 +264,7 @@ static Length parseLength(const QChar *s, unsigned int l)
return Length(r, Fixed);
} else {
if (i < l) {
- const QChar* next = s+i;
+ const TQChar* next = s+i;
if (*next == '*')
return Length(1, Relative);
@@ -278,9 +278,9 @@ static Length parseLength(const QChar *s, unsigned int l)
khtml::Length* DOMStringImpl::toCoordsArray(int& len) const
{
- QString str(s, l);
+ TQString str(s, l);
for(unsigned int i=0; i < l; i++) {
- QChar cc = s[i];
+ TQChar cc = s[i];
if (cc > '9' || (cc < '0' && cc != '-' && cc != '*' && cc != '.'))
str[i] = ' ';
}
@@ -294,17 +294,17 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const
int pos2;
while((pos2 = str.find(' ', pos)) != -1) {
- r[i++] = parseLength((QChar *) str.unicode()+pos, pos2-pos);
+ r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos);
pos = pos2+1;
}
- r[i] = parseLength((QChar *) str.unicode()+pos, str.length()-pos);
+ r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos);
return r;
}
khtml::Length* DOMStringImpl::toLengthArray(int& len) const
{
- QString str(s, l);
+ TQString str(s, l);
str = str.simplifyWhiteSpace();
len = str.contains(',') + 1;
@@ -320,13 +320,13 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const
int pos2;
while((pos2 = str.find(',', pos)) != -1) {
- r[i++] = parseLength((QChar *) str.unicode()+pos, pos2-pos);
+ r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos);
pos = pos2+1;
}
/* IE Quirk: If the last comma is the last char skip it and reduce len by one */
if (str.length()-pos > 0)
- r[i] = parseLength((QChar *) str.unicode()+pos, str.length()-pos);
+ r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos);
else
len--;
@@ -397,9 +397,9 @@ DOMStringImpl *DOMStringImpl::capitalize(bool noFirstCap) const
return c;
}
-QString DOMStringImpl::string() const
+TQString DOMStringImpl::string() const
{
- return QString(s, l);
+ return TQString(s, l);
}
int DOMStringImpl::toInt(bool* ok) const
@@ -413,7 +413,7 @@ int DOMStringImpl::toInt(bool* ok) const
while (i < l && s[i].isDigit())
++i;
- return QConstString(s, i).string().toInt(ok);
+ return TQConstString(s, i).string().toInt(ok);
}
static const unsigned short amp[] = {'&', 'a', 'm', 'p', ';'};
diff --git a/khtml/xml/dom_stringimpl.h b/khtml/xml/dom_stringimpl.h
index b1430bc89..cd7128967 100644
--- a/khtml/xml/dom_stringimpl.h
+++ b/khtml/xml/dom_stringimpl.h
@@ -23,13 +23,13 @@
#ifndef _DOM_DOMStringImpl_h_
#define _DOM_DOMStringImpl_h_
-#include <qstring.h>
+#include <tqstring.h>
#include "dom/dom_misc.h"
#include "misc/khtmllayout.h"
#include "misc/shared.h"
-#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ]
+#define QT_ALLOC_QCHAR_VEC( N ) (TQChar*) new char[ sizeof(TQChar)*( N ) ]
#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P ))
namespace DOM {
@@ -42,11 +42,11 @@ private:
protected:
DOMStringImpl() { s = 0, l = 0; }
public:
- DOMStringImpl(const QChar *str, unsigned int len) {
+ DOMStringImpl(const TQChar *str, unsigned int len) {
bool havestr = str && len;
s = QT_ALLOC_QCHAR_VEC( havestr ? len : 1 );
if(str && len) {
- memcpy( s, str, len * sizeof(QChar) );
+ memcpy( s, str, len * sizeof(TQChar) );
l = len;
} else {
// crash protection
@@ -56,7 +56,7 @@ public:
}
explicit DOMStringImpl(const char *str);
- explicit DOMStringImpl(const QChar &ch) {
+ explicit DOMStringImpl(const TQChar &ch) {
s = QT_ALLOC_QCHAR_VEC( 1 );
s[0] = ch;
l = 1;
@@ -78,7 +78,7 @@ public:
DOMStringImpl *substring(unsigned int pos, unsigned int len);
DOMStringImpl *collapseWhiteSpace(bool preserveLF, bool preserveWS);
- const QChar &operator [] (int pos) { return s[pos]; }
+ const TQChar &operator [] (int pos) { return s[pos]; }
bool containsOnlyWhitespace() const;
// ignores trailing garbage, unlike QString
@@ -92,12 +92,12 @@ public:
DOMStringImpl *capitalize(bool noFirstCap=false) const;
DOMStringImpl *escapeHTML();
- QChar *unicode() const { return s; }
+ TQChar *unicode() const { return s; }
uint length() const { return l; }
- QString string() const;
+ TQString string() const;
unsigned int l;
- QChar *s;
+ TQChar *s;
};
}
diff --git a/khtml/xml/dom_xmlimpl.cpp b/khtml/xml/dom_xmlimpl.cpp
index 90ec2b352..121ad436a 100644
--- a/khtml/xml/dom_xmlimpl.cpp
+++ b/khtml/xml/dom_xmlimpl.cpp
@@ -391,7 +391,7 @@ void ProcessingInstructionImpl::checkStyleSheet()
// ### make sure this gets called when adding from javascript
XMLAttributeReader attrReader(DOMString(m_data).string());
bool attrsOk;
- QXmlAttributes attrs = attrReader.readAttrs(attrsOk);
+ TQXmlAttributes attrs = attrReader.readAttrs(attrsOk);
if (!attrsOk)
return;
if (attrs.value("type") != "text/css" && !attrs.value("type").isEmpty())
@@ -414,7 +414,7 @@ void ProcessingInstructionImpl::checkStyleSheet()
// ### some validation on the URL?
// ### FIXME charset
if (m_cachedSheet) m_cachedSheet->deref(this);
- m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(getDocument()->completeURL(href.string()), QString::null);
+ m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(getDocument()->completeURL(href.string()), TQString::null);
if (m_cachedSheet) {
getDocument()->addPendingSheet(); //before ref, because during the ref it might load!
m_cachedSheet->ref( this );
@@ -466,7 +466,7 @@ DOMString ProcessingInstructionImpl::toString() const
// -------------------------------------------------------------------------
-XMLAttributeReader::XMLAttributeReader(const QString& _attrString)
+XMLAttributeReader::XMLAttributeReader(const TQString& _attrString)
{
m_attrString = _attrString;
}
@@ -475,19 +475,19 @@ XMLAttributeReader::~XMLAttributeReader()
{
}
-QXmlAttributes XMLAttributeReader::readAttrs(bool &ok)
+TQXmlAttributes XMLAttributeReader::readAttrs(bool &ok)
{
// parse xml file
- QXmlInputSource source;
+ TQXmlInputSource source;
source.setData("<?xml version=\"1.0\"?><attrs "+m_attrString+" />");
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler( this );
ok = reader.parse( source );
return attrs;
}
-bool XMLAttributeReader::startElement(const QString& /*namespaceURI*/, const QString& localName,
- const QString& /*qName*/, const QXmlAttributes& atts)
+bool XMLAttributeReader::startElement(const TQString& /*namespaceURI*/, const TQString& localName,
+ const TQString& /*qName*/, const TQXmlAttributes& atts)
{
if (localName == "attrs") {
attrs = atts;
diff --git a/khtml/xml/dom_xmlimpl.h b/khtml/xml/dom_xmlimpl.h
index 6fa125af7..a394579d2 100644
--- a/khtml/xml/dom_xmlimpl.h
+++ b/khtml/xml/dom_xmlimpl.h
@@ -26,7 +26,7 @@
#include "xml/dom_nodeimpl.h"
#include "misc/loader_client.h"
-#include <qxml.h>
+#include <tqxml.h>
namespace khtml {
class CachedCSSStyleSheet;
@@ -166,14 +166,14 @@ protected:
class XMLAttributeReader : public QXmlDefaultHandler
{
public:
- XMLAttributeReader(const QString& _attrString);
+ XMLAttributeReader(const TQString& _attrString);
virtual ~XMLAttributeReader();
- QXmlAttributes readAttrs(bool &ok);
- bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts);
+ TQXmlAttributes readAttrs(bool &ok);
+ bool startElement(const TQString& namespaceURI, const TQString& localName, const TQString& qName, const TQXmlAttributes& atts);
protected:
- QXmlAttributes attrs;
- QString m_attrString;
+ TQXmlAttributes attrs;
+ TQString m_attrString;
};
} //namespace
diff --git a/khtml/xml/xml_tokenizer.cpp b/khtml/xml/xml_tokenizer.cpp
index 5489b8c21..7c043815a 100644
--- a/khtml/xml/xml_tokenizer.cpp
+++ b/khtml/xml/xml_tokenizer.cpp
@@ -34,7 +34,7 @@
#include "khtmlview.h"
#include "khtml_part.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <klocale.h>
@@ -42,7 +42,7 @@ using namespace DOM;
using namespace khtml;
XMLIncrementalSource::XMLIncrementalSource()
- : QXmlInputSource(), m_pos( 0 ), m_unicode( 0 ),
+ : TQXmlInputSource(), m_pos( 0 ), m_unicode( 0 ),
m_finished( false )
{
}
@@ -52,17 +52,17 @@ void XMLIncrementalSource::fetchData()
//just a dummy to overwrite default behavior
}
-QChar XMLIncrementalSource::next()
+TQChar XMLIncrementalSource::next()
{
if ( m_finished )
- return QXmlInputSource::EndOfDocument;
+ return TQXmlInputSource::EndOfDocument;
else if ( m_data.length() <= m_pos )
- return QXmlInputSource::EndOfData;
+ return TQXmlInputSource::EndOfData;
else
return m_unicode[m_pos++];
}
-void XMLIncrementalSource::setData( const QString& str )
+void XMLIncrementalSource::setData( const TQString& str )
{
m_data = str;
m_unicode = m_data.unicode();
@@ -70,18 +70,18 @@ void XMLIncrementalSource::setData( const QString& str )
if ( !str.isEmpty() )
m_finished = false;
}
-void XMLIncrementalSource::setData( const QByteArray& data )
+void XMLIncrementalSource::setData( const TQByteArray& data )
{
setData( fromRawData( data, true ) );
}
-void XMLIncrementalSource::appendXML( const QString& str )
+void XMLIncrementalSource::appendXML( const TQString& str )
{
m_data += str;
m_unicode = m_data.unicode();
}
-QString XMLIncrementalSource::data()
+TQString XMLIncrementalSource::data()
{
return m_data;
}
@@ -118,7 +118,7 @@ NodeImpl *XMLHandler::currentNode() const
return m_nodes.current();
}
-QString XMLHandler::errorProtocol()
+TQString XMLHandler::errorProtocol()
{
return errorProt;
}
@@ -133,28 +133,28 @@ bool XMLHandler::startDocument()
return true;
}
-bool XMLHandler::startPrefixMapping(const QString& prefix, const QString& uri)
+bool XMLHandler::startPrefixMapping(const TQString& prefix, const TQString& uri)
{
namespaceInfo[prefix].push(uri);
return true;
}
-bool XMLHandler::endPrefixMapping(const QString& prefix)
+bool XMLHandler::endPrefixMapping(const TQString& prefix)
{
- QValueStack<QString>& stack = namespaceInfo[prefix];
+ TQValueStack<TQString>& stack = namespaceInfo[prefix];
stack.pop();
if (stack.isEmpty())
namespaceInfo.remove(prefix);
return true;
}
-void XMLHandler::fixUpNSURI(QString& uri, const QString& qname)
+void XMLHandler::fixUpNSURI(TQString& uri, const TQString& qname)
{
/* QXml does not resolve the namespaces of attributes in the same
tag that preceed the xmlns declaration. This fixes up that case */
if (uri.isEmpty() && qname.find(':') != -1) {
- QXmlNamespaceSupport ns;
- QString localName, prefix;
+ TQXmlNamespaceSupport ns;
+ TQString localName, prefix;
ns.splitName(qname, prefix, localName);
if (namespaceInfo.contains(prefix)) {
uri = namespaceInfo[prefix].top();
@@ -162,8 +162,8 @@ void XMLHandler::fixUpNSURI(QString& uri, const QString& qname)
}
}
-bool XMLHandler::startElement( const QString& namespaceURI, const QString& /*localName*/,
- const QString& qName, const QXmlAttributes& atts )
+bool XMLHandler::startElement( const TQString& namespaceURI, const TQString& /*localName*/,
+ const TQString& qName, const TQXmlAttributes& atts )
{
if (currentNode()->nodeType() == Node::TEXT_NODE)
exitText();
@@ -180,8 +180,8 @@ bool XMLHandler::startElement( const QString& namespaceURI, const QString& /*loc
int i;
for (i = 0; i < atts.length(); i++) {
int exceptioncode = 0;
- QString uriString = atts.uri(i);
- QString qnString = atts.qName(i);
+ TQString uriString = atts.uri(i);
+ TQString qnString = atts.qName(i);
fixUpNSURI(uriString, qnString);
DOMString uri(uriString);
DOMString qn(qnString);
@@ -221,7 +221,7 @@ bool XMLHandler::startElement( const QString& namespaceURI, const QString& /*loc
}
-bool XMLHandler::endElement( const QString& /*namespaceURI*/, const QString& /*localName*/, const QString& /*qName*/ )
+bool XMLHandler::endElement( const TQString& /*namespaceURI*/, const TQString& /*localName*/, const TQString& /*qName*/ )
{
if (currentNode()->nodeType() == Node::TEXT_NODE)
exitText();
@@ -264,7 +264,7 @@ bool XMLHandler::endCDATA()
return currentNode();
}
-bool XMLHandler::characters( const QString& ch )
+bool XMLHandler::characters( const TQString& ch )
{
if (currentNode()->nodeType() == Node::TEXT_NODE ||
currentNode()->nodeType() == Node::CDATA_SECTION_NODE ||
@@ -284,7 +284,7 @@ bool XMLHandler::characters( const QString& ch )
}
-bool XMLHandler::comment(const QString & ch)
+bool XMLHandler::comment(const TQString & ch)
{
if (currentNode()->nodeType() == Node::TEXT_NODE)
exitText();
@@ -293,7 +293,7 @@ bool XMLHandler::comment(const QString & ch)
return true;
}
-bool XMLHandler::processingInstruction(const QString &target, const QString &data)
+bool XMLHandler::processingInstruction(const TQString &target, const TQString &data)
{
if (currentNode()->nodeType() == Node::TEXT_NODE)
exitText();
@@ -306,14 +306,14 @@ bool XMLHandler::processingInstruction(const QString &target, const QString &dat
}
-QString XMLHandler::errorString()
+TQString XMLHandler::errorString()
{
// ### Make better error-messages
return i18n("the document is not in the correct file format");
}
-bool XMLHandler::fatalError( const QXmlParseException& exception )
+bool XMLHandler::fatalError( const TQXmlParseException& exception )
{
errorProt += i18n( "fatal parsing error: %1 in line %2, column %3" )
.arg( exception.message() )
@@ -346,21 +346,21 @@ void XMLHandler::exitText()
popNode();
}
-bool XMLHandler::attributeDecl(const QString &/*eName*/, const QString &/*aName*/, const QString &/*type*/,
- const QString &/*valueDefault*/, const QString &/*value*/)
+bool XMLHandler::attributeDecl(const TQString &/*eName*/, const TQString &/*aName*/, const TQString &/*type*/,
+ const TQString &/*valueDefault*/, const TQString &/*value*/)
{
// qt's xml parser (as of 2.2.3) does not currently give us values for type, valueDefault and
// value. When it does, we can store these somewhere and have default attributes on elements
return true;
}
-bool XMLHandler::externalEntityDecl(const QString &/*name*/, const QString &/*publicId*/, const QString &/*systemId*/)
+bool XMLHandler::externalEntityDecl(const TQString &/*name*/, const TQString &/*publicId*/, const TQString &/*systemId*/)
{
// ### insert these too - is there anything special we have to do here?
return true;
}
-bool XMLHandler::internalEntityDecl(const QString &name, const QString &value)
+bool XMLHandler::internalEntityDecl(const TQString &name, const TQString &value)
{
EntityImpl *e = new EntityImpl(m_doc,name);
// ### further parse entities inside the value and add them as separate nodes (or entityreferences)?
@@ -370,7 +370,7 @@ bool XMLHandler::internalEntityDecl(const QString &name, const QString &value)
return true;
}
-bool XMLHandler::notationDecl(const QString &/*name*/, const QString &/*publicId*/, const QString &/*systemId*/)
+bool XMLHandler::notationDecl(const TQString &/*name*/, const TQString &/*publicId*/, const TQString &/*systemId*/)
{
// ### FIXME
// if (m_doc->document()->doctype()) {
@@ -380,8 +380,8 @@ bool XMLHandler::notationDecl(const QString &/*name*/, const QString &/*publicId
return true;
}
-bool XMLHandler::unparsedEntityDecl(const QString &/*name*/, const QString &/*publicId*/,
- const QString &/*systemId*/, const QString &/*notationName*/)
+bool XMLHandler::unparsedEntityDecl(const TQString &/*name*/, const TQString &/*publicId*/,
+ const TQString &/*systemId*/, const TQString &/*notationName*/)
{
// ###
return true;
@@ -456,10 +456,10 @@ void XMLTokenizer::finish()
while (m_doc->hasChildNodes())
static_cast<NodeImpl*>(m_doc)->removeChild(m_doc->firstChild(),exceptioncode);
- QString line, errorLocPtr;
+ TQString line, errorLocPtr;
if ( m_handler.errorLine ) {
- QString xmlCode = m_source.data();
- QTextIStream stream(&xmlCode);
+ TQString xmlCode = m_source.data();
+ TQTextIStream stream(&xmlCode);
for (unsigned long lineno = 0; lineno < m_handler.errorLine-1; lineno++)
stream.readLine();
line = stream.readLine();
@@ -517,7 +517,7 @@ void XMLTokenizer::finish()
// Parsing was successful. Now locate all html <script> tags in the document and execute them
// one by one
addScripts(m_doc);
- m_scriptsIt = new QPtrListIterator<HTMLScriptElementImpl>(m_scripts);
+ m_scriptsIt = new TQPtrListIterator<HTMLScriptElementImpl>(m_scripts);
executeScripts();
}
@@ -545,7 +545,7 @@ void XMLTokenizer::executeScripts()
// inside the tag
while (m_scriptsIt->current()) {
DOMString scriptSrc = m_scriptsIt->current()->getAttribute(ATTR_SRC);
- QString charset = m_scriptsIt->current()->getAttribute(ATTR_CHARSET).string();
+ TQString charset = m_scriptsIt->current()->getAttribute(ATTR_CHARSET).string();
if (!scriptSrc.isEmpty()) {
// we have a src attribute
@@ -558,12 +558,12 @@ void XMLTokenizer::executeScripts()
}
else {
// no src attribute - execute from contents of tag
- QString scriptCode = "";
+ TQString scriptCode = "";
NodeImpl *child;
for (child = m_scriptsIt->current()->firstChild(); child; child = child->nextSibling()) {
if ( ( child->nodeType() == Node::TEXT_NODE || child->nodeType() == Node::CDATA_SECTION_NODE) &&
static_cast<TextImpl*>(child)->string() )
- scriptCode += QConstString(static_cast<TextImpl*>(child)->string()->s,
+ scriptCode += TQConstString(static_cast<TextImpl*>(child)->string()->s,
static_cast<TextImpl*>(child)->string()->l).string();
}
// the script cannot do document.write until we support incremental parsing
diff --git a/khtml/xml/xml_tokenizer.h b/khtml/xml/xml_tokenizer.h
index 4042b905f..cbf5cd5dd 100644
--- a/khtml/xml/xml_tokenizer.h
+++ b/khtml/xml/xml_tokenizer.h
@@ -23,11 +23,11 @@
#ifndef _XML_Tokenizer_h_
#define _XML_Tokenizer_h_
-#include <qxml.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qvaluestack.h>
-#include <qobject.h>
+#include <tqxml.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqvaluestack.h>
+#include <tqobject.h>
#include "misc/loader_client.h"
#include "misc/stringit.h"
@@ -55,41 +55,41 @@ public:
virtual ~XMLHandler();
// return the error protocol if parsing failed
- QString errorProtocol();
+ TQString errorProtocol();
// overloaded handler functions
bool startDocument();
- bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts);
- bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName);
+ bool startElement(const TQString& namespaceURI, const TQString& localName, const TQString& qName, const TQXmlAttributes& atts);
+ bool endElement(const TQString& namespaceURI, const TQString& localName, const TQString& qName);
bool startCDATA();
bool endCDATA();
- bool characters(const QString& ch);
- bool comment(const QString & ch);
- bool processingInstruction(const QString &target, const QString &data);
+ bool characters(const TQString& ch);
+ bool comment(const TQString & ch);
+ bool processingInstruction(const TQString &target, const TQString &data);
// namespace handling, to workaround problem in QXML where some attributes
// do not get the namespace resolved properly
- bool startPrefixMapping(const QString& prefix, const QString& uri);
- bool endPrefixMapping(const QString& prefix);
- void fixUpNSURI(QString& uri, const QString& qname);
- QMap<QString, QValueStack<QString> > namespaceInfo;
+ bool startPrefixMapping(const TQString& prefix, const TQString& uri);
+ bool endPrefixMapping(const TQString& prefix);
+ void fixUpNSURI(TQString& uri, const TQString& qname);
+ TQMap<TQString, TQValueStack<TQString> > namespaceInfo;
// from QXmlDeclHandler
- bool attributeDecl(const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value);
- bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId);
- bool internalEntityDecl(const QString &name, const QString &value);
+ bool attributeDecl(const TQString &eName, const TQString &aName, const TQString &type, const TQString &valueDefault, const TQString &value);
+ bool externalEntityDecl(const TQString &name, const TQString &publicId, const TQString &systemId);
+ bool internalEntityDecl(const TQString &name, const TQString &value);
// from QXmlDTDHandler
- bool notationDecl(const QString &name, const QString &publicId, const QString &systemId);
- bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName);
+ bool notationDecl(const TQString &name, const TQString &publicId, const TQString &systemId);
+ bool unparsedEntityDecl(const TQString &name, const TQString &publicId, const TQString &systemId, const TQString &notationName);
bool enterText();
void exitText();
- QString errorString();
+ TQString errorString();
- bool fatalError( const QXmlParseException& exception );
+ bool fatalError( const TQXmlParseException& exception );
unsigned long errorLine;
unsigned long errorCol;
@@ -99,10 +99,10 @@ private:
DOM::NodeImpl *popNode();
DOM::NodeImpl *currentNode() const;
private:
- QString errorProt;
+ TQString errorProt;
DOM::DocumentImpl *m_doc;
KHTMLView *m_view;
- QPtrStack<DOM::NodeImpl> m_nodes;
+ TQPtrStack<DOM::NodeImpl> m_nodes;
DOM::NodeImpl *m_rootNode;
enum State {
@@ -144,18 +144,18 @@ class XMLIncrementalSource : public QXmlInputSource
public:
XMLIncrementalSource();
virtual void fetchData();
- virtual QChar next();
- virtual void setData( const QString& str );
- virtual void setData( const QByteArray& data );
- virtual QString data();
+ virtual TQChar next();
+ virtual void setData( const TQString& str );
+ virtual void setData( const TQByteArray& data );
+ virtual TQString data();
- void appendXML( const QString& str );
+ void appendXML( const TQString& str );
void setFinished( bool );
private:
- QString m_data;
+ TQString m_data;
uint m_pos;
- const QChar *m_unicode;
+ const TQChar *m_unicode;
bool m_finished;
};
@@ -183,12 +183,12 @@ protected:
void executeScripts();
void addScripts(DOM::NodeImpl *n);
- QPtrList<DOM::HTMLScriptElementImpl> m_scripts;
- QPtrListIterator<DOM::HTMLScriptElementImpl> *m_scriptsIt;
+ TQPtrList<DOM::HTMLScriptElementImpl> m_scripts;
+ TQPtrListIterator<DOM::HTMLScriptElementImpl> *m_scriptsIt;
khtml::CachedScript *m_cachedScript;
XMLHandler m_handler;
- QXmlSimpleReader m_reader;
+ TQXmlSimpleReader m_reader;
XMLIncrementalSource m_source;
bool m_noErrors;
};
diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp
index d08da6936..caacb2a3c 100644
--- a/kimgio/dds.cpp
+++ b/kimgio/dds.cpp
@@ -21,8 +21,8 @@
#include "dds.h"
-#include <qimage.h>
-#include <qdatastream.h>
+#include <tqimage.h>
+#include <tqdatastream.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -143,7 +143,7 @@ namespace { // Private.
uint amask;
};
- static QDataStream & operator>> ( QDataStream & s, DDSPixelFormat & pf )
+ static TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf )
{
s >> pf.size;
s >> pf.flags;
@@ -163,7 +163,7 @@ namespace { // Private.
uint caps4;
};
- static QDataStream & operator>> ( QDataStream & s, DDSCaps & caps )
+ static TQDataStream & operator>> ( TQDataStream & s, DDSCaps & caps )
{
s >> caps.caps1;
s >> caps.caps2;
@@ -186,7 +186,7 @@ namespace { // Private.
uint notused;
};
- static QDataStream & operator>> ( QDataStream & s, DDSHeader & header )
+ static TQDataStream & operator>> ( TQDataStream & s, DDSHeader & header )
{
s >> header.size;
s >> header.flags;
@@ -288,7 +288,7 @@ namespace { // Private.
}
- static bool LoadA8R8G8B8( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadA8R8G8B8( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -305,7 +305,7 @@ namespace { // Private.
return true;
}
- static bool LoadR8G8B8( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadR8G8B8( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -322,7 +322,7 @@ namespace { // Private.
return true;
}
- static bool LoadA1R5G5B5( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadA1R5G5B5( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -343,7 +343,7 @@ namespace { // Private.
return true;
}
- static bool LoadA4R4G4B4( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadA4R4G4B4( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -364,7 +364,7 @@ namespace { // Private.
return true;
}
- static bool LoadR5G6B5( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadR5G6B5( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -384,7 +384,7 @@ namespace { // Private.
return true;
}
- static QDataStream & operator>> ( QDataStream & s, Color565 & c )
+ static TQDataStream & operator>> ( TQDataStream & s, Color565 & c )
{
return s >> c.u;
}
@@ -437,7 +437,7 @@ namespace { // Private.
};
- static QDataStream & operator>> ( QDataStream & s, BlockDXT & c )
+ static TQDataStream & operator>> ( TQDataStream & s, BlockDXT & c )
{
return s >> c.col0 >> c.col1 >> c.row[0] >> c.row[1] >> c.row[2] >> c.row[3];
}
@@ -446,7 +446,7 @@ namespace { // Private.
ushort row[4];
};
- static QDataStream & operator>> ( QDataStream & s, BlockDXTAlphaExplicit & c )
+ static TQDataStream & operator>> ( TQDataStream & s, BlockDXTAlphaExplicit & c )
{
return s >> c.row[0] >> c.row[1] >> c.row[2] >> c.row[3];
}
@@ -512,13 +512,13 @@ namespace { // Private.
}
};
- static QDataStream & operator>> ( QDataStream & s, BlockDXTAlphaLinear & c )
+ static TQDataStream & operator>> ( TQDataStream & s, BlockDXTAlphaLinear & c )
{
s >> c.alpha0 >> c.alpha1;
return s >> c.bits[0] >> c.bits[1] >> c.bits[2] >> c.bits[3] >> c.bits[4] >> c.bits[5];
}
- static bool LoadDXT1( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadDXT1( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -557,7 +557,7 @@ namespace { // Private.
return true;
}
- static bool LoadDXT3( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadDXT3( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -602,14 +602,14 @@ namespace { // Private.
return true;
}
- static bool LoadDXT2( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadDXT2( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
if( !LoadDXT3(s, header, img) ) return false;
//UndoPremultiplyAlpha(img);
return true;
}
- static bool LoadDXT5( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadDXT5( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -657,14 +657,14 @@ namespace { // Private.
return true;
}
- static bool LoadDXT4( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadDXT4( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
if( !LoadDXT5(s, header, img) ) return false;
//UndoPremultiplyAlpha(img);
return true;
}
- static bool LoadRXGB( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadRXGB( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -713,7 +713,7 @@ namespace { // Private.
return true;
}
- static bool LoadATI2( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadATI2( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
const uint w = header.width;
const uint h = header.height;
@@ -769,7 +769,7 @@ namespace { // Private.
- typedef bool (* TextureLoader)( QDataStream & s, const DDSHeader & header, QImage & img );
+ typedef bool (* TextureLoader)( TQDataStream & s, const DDSHeader & header, TQImage & img );
// Get an appropiate texture loader for the given type.
static TextureLoader GetTextureLoader( DDSType type ) {
@@ -805,7 +805,7 @@ namespace { // Private.
// Load a 2d texture.
- static bool LoadTexture( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadTexture( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
// Create dst image.
if( !img.create( header.width, header.height, 32 )) {
@@ -875,7 +875,7 @@ namespace { // Private.
};
// Load unwrapped cube map.
- static bool LoadCubeMap( QDataStream & s, const DDSHeader & header, QImage & img )
+ static bool LoadCubeMap( TQDataStream & s, const DDSHeader & header, TQImage & img )
{
// Create dst image.
#if CUBE_LAYOUT == HORIZONTAL
@@ -905,7 +905,7 @@ namespace { // Private.
img.fill( 0 );
// Create face image.
- QImage face;
+ TQImage face;
if( !face.create( header.width, header.height, 32 )) {
return false;
}
@@ -953,10 +953,10 @@ namespace { // Private.
}
-KDE_EXPORT void kimgio_dds_read( QImageIO *io )
+KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
{
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::LittleEndian );
// Validate header.
uint fourcc;
@@ -989,7 +989,7 @@ KDE_EXPORT void kimgio_dds_read( QImageIO *io )
}
- QImage img;
+ TQImage img;
bool result;
if( IsCubeMap( header ) ) {
@@ -1011,7 +1011,7 @@ KDE_EXPORT void kimgio_dds_read( QImageIO *io )
}
-KDE_EXPORT void kimgio_dds_write( QImageIO * )
+KDE_EXPORT void kimgio_dds_write( TQImageIO * )
{
// TODO Stub!
}
diff --git a/kimgio/dds.h b/kimgio/dds.h
index 0f79a5ad9..6933f2b63 100644
--- a/kimgio/dds.h
+++ b/kimgio/dds.h
@@ -13,8 +13,8 @@
class QImageIO;
extern "C" {
-void kimgio_dds_read( QImageIO * );
-void kimgio_dds_write( QImageIO * );
+void kimgio_dds_read( TQImageIO * );
+void kimgio_dds_write( TQImageIO * );
}
#endif
diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp
index b1b3e28f5..5067fb8e1 100644
--- a/kimgio/eps.cpp
+++ b/kimgio/eps.cpp
@@ -1,10 +1,10 @@
// This library is distributed under the conditions of the GNU LGPL.
#include <unistd.h>
#include <stdio.h>
-#include <qimage.h>
-#include <qfile.h>
-#include <qpainter.h>
-#include <qprinter.h>
+#include <tqimage.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
#include <kapplication.h>
#include <ktempfile.h>
#include <kdebug.h>
@@ -15,7 +15,7 @@
#define BBOX "%%BoundingBox:"
#define BBOX_LEN strlen(BBOX)
-static bool seekToCodeStart( QIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps_size )
+static bool seekToCodeStart( TQIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps_size )
{
char buf[4]; // We at most need to read 4 bytes at a time
ps_offset=0L;
@@ -95,7 +95,7 @@ static bool seekToCodeStart( QIODevice * io, Q_UINT32 & ps_offset, Q_UINT32 & ps
return true;
}
-static bool bbox ( QIODevice *io, int *x1, int *y1, int *x2, int *y2)
+static bool bbox ( TQIODevice *io, int *x1, int *y1, int *x2, int *y2)
{
char buf[BUFLEN+1];
@@ -121,19 +121,19 @@ static bool bbox ( QIODevice *io, int *x1, int *y1, int *x2, int *y2)
return ret;
}
-KDE_EXPORT void kimgio_eps_read (QImageIO *image)
+KDE_EXPORT void kimgio_eps_read (TQImageIO *image)
{
kdDebug(399) << "kimgio EPS: starting..." << endl;
FILE * ghostfd;
int x1, y1, x2, y2;
- //QTime dt;
+ //TQTime dt;
//dt.start();
- QString cmdBuf;
- QString tmp;
+ TQString cmdBuf;
+ TQString tmp;
- QIODevice* io = image->ioDevice();
+ TQIODevice* io = image->ioDevice();
Q_UINT32 ps_offset, ps_size;
// find start of PostScript code
@@ -170,7 +170,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image)
if (image->parameters())
{
// Size forced by the caller
- QStringList params = QStringList::split(':', image->parameters());
+ TQStringList params = TQStringList::split(':', image->parameters());
if (params.count() >= 2 && x2 != 0.0 && y2 != 0.0)
{
wantedWidth = params[0].toInt();
@@ -203,7 +203,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image)
// run ghostview
- ghostfd = popen (QFile::encodeName(cmdBuf), "w");
+ ghostfd = popen (TQFile::encodeName(cmdBuf), "w");
if ( ghostfd == 0 ) {
kdError(399) << "kimgio EPS: no GhostScript?" << endl;
@@ -219,7 +219,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image)
io->reset(); // Go back to start of file to give all the file to GhostScript
if (ps_offset>0L) // We have an offset
io->at(ps_offset);
- QByteArray buffer ( io->readAll() );
+ TQByteArray buffer ( io->readAll() );
// If we have no MS-DOS EPS file or if the size seems wrong, then choose the buffer size
if (ps_size<=0L || ps_size>buffer.size())
@@ -231,7 +231,7 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image)
pclose ( ghostfd );
// load image
- QImage myimage;
+ TQImage myimage;
if( myimage.load (tmpFile.name()) ) {
image->setImage (myimage);
image->setStatus (0);
@@ -245,17 +245,17 @@ KDE_EXPORT void kimgio_eps_read (QImageIO *image)
}
// Sven Wiegand <SWiegand@tfh-berlin.de> -- eps output filter (from KSnapshot)
-KDE_EXPORT void kimgio_eps_write( QImageIO *imageio )
+KDE_EXPORT void kimgio_eps_write( TQImageIO *imageio )
{
- QPrinter psOut(QPrinter::PrinterResolution);
- QPainter p;
+ TQPrinter psOut(TQPrinter::PrinterResolution);
+ TQPainter p;
// making some definitions (papersize, output to file, filename):
psOut.setCreator( "KDE " KDE_VERSION_STRING );
psOut.setOutputToFile( true );
// Extension must be .eps so that Qt generates EPS file
- KTempFile tmpFile(QString::null, ".eps");
+ KTempFile tmpFile(TQString::null, ".eps");
tmpFile.setAutoDelete(true);
if ( tmpFile.status() != 0)
return;
@@ -267,20 +267,20 @@ KDE_EXPORT void kimgio_eps_write( QImageIO *imageio )
// painting the pixmap to the "printer" which is a file
p.begin( &psOut );
// Qt uses the clip rect for the bounding box
- p.setClipRect( 0, 0, imageio->image().width(), imageio->image().height(), QPainter::CoordPainter);
- p.drawImage( QPoint( 0, 0 ), imageio->image() );
+ p.setClipRect( 0, 0, imageio->image().width(), imageio->image().height(), TQPainter::CoordPainter);
+ p.drawImage( TQPoint( 0, 0 ), imageio->image() );
p.end();
// Copy file to imageio struct
- QFile inFile(tmpFile.name());
+ TQFile inFile(tmpFile.name());
inFile.open( IO_ReadOnly );
- QTextStream in( &inFile );
- in.setEncoding( QTextStream::Latin1 );
- QTextStream out( imageio->ioDevice() );
- out.setEncoding( QTextStream::Latin1 );
+ TQTextStream in( &inFile );
+ in.setEncoding( TQTextStream::Latin1 );
+ TQTextStream out( imageio->ioDevice() );
+ out.setEncoding( TQTextStream::Latin1 );
- QString szInLine = in.readLine();
+ TQString szInLine = in.readLine();
out << szInLine << '\n';
while( !in.atEnd() ){
diff --git a/kimgio/eps.h b/kimgio/eps.h
index ecdd82787..78dfdfb1e 100644
--- a/kimgio/eps.h
+++ b/kimgio/eps.h
@@ -3,8 +3,8 @@
#define _EPS_H
extern "C" {
-void kimgio_eps_read (QImageIO *image);
-void kimgio_eps_write (QImageIO *image);
+void kimgio_eps_read (TQImageIO *image);
+void kimgio_eps_write (TQImageIO *image);
}
#endif
diff --git a/kimgio/exr.cpp b/kimgio/exr.cpp
index e3efe5a6a..e45812700 100644
--- a/kimgio/exr.cpp
+++ b/kimgio/exr.cpp
@@ -39,13 +39,13 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qimage.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcolor.h>
+#include <tqimage.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcolor.h>
#include "exr.h"
@@ -116,14 +116,14 @@ QRgb RgbaToQrgba(struct Rgba imagePixel)
char (Imath::clamp ( a * 84.66f, 0.f, 255.f ) ) );
}
-KDE_EXPORT void kimgio_exr_read( QImageIO *io )
+KDE_EXPORT void kimgio_exr_read( TQImageIO *io )
{
try
{
int width, height;
- // This won't work if io is not QFile !
- RgbaInputFile file (QFile::encodeName(io->fileName()));
+ // This won't work if io is not TQFile !
+ RgbaInputFile file (TQFile::encodeName(io->fileName()));
Imath::Box2i dw = file.dataWindow();
width = dw.max.x - dw.min.x + 1;
@@ -135,7 +135,7 @@ KDE_EXPORT void kimgio_exr_read( QImageIO *io )
file.setFrameBuffer (&pixels[0][0] - dw.min.x - dw.min.y * width, 1, width);
file.readPixels (dw.min.y, dw.max.y);
- QImage image(width, height, 32, 0, QImage::BigEndian);
+ TQImage image(width, height, 32, 0, TQImage::BigEndian);
if( image.isNull())
return;
@@ -158,7 +158,7 @@ KDE_EXPORT void kimgio_exr_read( QImageIO *io )
}
-KDE_EXPORT void kimgio_exr_write(QImageIO *)
+KDE_EXPORT void kimgio_exr_write(TQImageIO *)
{
// TODO: stub
}
diff --git a/kimgio/exr.h b/kimgio/exr.h
index 9a039c6c6..04bd6d956 100644
--- a/kimgio/exr.h
+++ b/kimgio/exr.h
@@ -1,5 +1,5 @@
/**
-* QImageIO Routines to read (and perhaps in the future, write) images
+* TQImageIO Routines to read (and perhaps in the future, write) images
* in the high definition EXR format.
*
* Copyright (c) 2003, Brad Hards <bradh@frogmouth.net>
@@ -14,8 +14,8 @@
class QImageIO;
extern "C" {
- void kimgio_exr_read (QImageIO *io);
- void kimgio_exr_write (QImageIO *io);
+ void kimgio_exr_read (TQImageIO *io);
+ void kimgio_exr_write (TQImageIO *io);
}
#endif
diff --git a/kimgio/g3r.cpp b/kimgio/g3r.cpp
index d67aa2da6..1efb07434 100644
--- a/kimgio/g3r.cpp
+++ b/kimgio/g3r.cpp
@@ -6,15 +6,15 @@
#include <tiffio.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include "g3r.h"
-KDE_EXPORT void kimgio_g3_read( QImageIO *io )
+KDE_EXPORT void kimgio_g3_read( TQImageIO *io )
{
- // This won't work if io is not a QFile !
- TIFF *tiff = TIFFOpen(QFile::encodeName(io->fileName()), "r");
+ // This won't work if io is not a TQFile !
+ TIFF *tiff = TIFFOpen(TQFile::encodeName(io->fileName()), "r");
if (!tiff)
return;
@@ -26,7 +26,7 @@ KDE_EXPORT void kimgio_g3_read( QImageIO *io )
return;
scanlength = TIFFScanlineSize(tiff);
- QImage image(width, height, 1, 0, QImage::BigEndian);
+ TQImage image(width, height, 1, 0, TQImage::BigEndian);
if (image.isNull() || scanlength != image.bytesPerLine())
{
@@ -44,7 +44,7 @@ KDE_EXPORT void kimgio_g3_read( QImageIO *io )
}
-KDE_EXPORT void kimgio_g3_write(QImageIO *)
+KDE_EXPORT void kimgio_g3_write(TQImageIO *)
{
// TODO: stub
}
diff --git a/kimgio/g3r.h b/kimgio/g3r.h
index df90c5dee..f734a9e82 100644
--- a/kimgio/g3r.h
+++ b/kimgio/g3r.h
@@ -1,5 +1,5 @@
/**
-* QImageIO Routines to read/write g3 (fax) images.
+* TQImageIO Routines to read/write g3 (fax) images.
* (c) 2000, Matthias Hölzer-Klüpfel
*
* This library is distributed under the conditions of the GNU LGPL.
@@ -13,8 +13,8 @@
class QImageIO;
extern "C" {
- void kimgio_g3_read( QImageIO *io );
- void kimgio_g3_write( QImageIO *io );
+ void kimgio_g3_read( TQImageIO *io );
+ void kimgio_g3_write( TQImageIO *io );
}
#endif
diff --git a/kimgio/gimp.h b/kimgio/gimp.h
index 94a6086d4..114ffdc0f 100644
--- a/kimgio/gimp.h
+++ b/kimgio/gimp.h
@@ -46,7 +46,7 @@ const uchar OPAQUE_OPACITY = 255; //!< Opaque value for 8-bit alpha component.
// From GIMP "apptypes.h" v1.2
-//! Basic GIMP image type. QImage converter may produce a deeper image
+//! Basic GIMP image type. TQImage converter may produce a deeper image
//! than is specified here. For example, a grayscale image with an
//! alpha channel must (currently) use a 32-bit Qt image.
diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp
index edc49f91b..bf8bc5f03 100644
--- a/kimgio/hdr.cpp
+++ b/kimgio/hdr.cpp
@@ -10,8 +10,8 @@
#include "hdr.h"
-#include <qimage.h>
-#include <qdatastream.h>
+#include <tqimage.h>
+#include <tqdatastream.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -33,7 +33,7 @@ namespace { // Private.
// read an old style line from the hdr image file
// if 'first' is true the first byte is already read
- static bool Read_Old_Line (uchar * image, int width, QDataStream & s)
+ static bool Read_Old_Line (uchar * image, int width, TQDataStream & s)
{
int rshift = 0;
int i;
@@ -94,7 +94,7 @@ namespace { // Private.
}
// Load the HDR image.
- static bool LoadHDR( QDataStream & s, const int width, const int height, QImage & img )
+ static bool LoadHDR( TQDataStream & s, const int width, const int height, TQImage & img )
{
uchar val, code;
@@ -104,7 +104,7 @@ namespace { // Private.
return false;
}
- QMemArray<uchar> image( width * 4 );
+ TQMemArray<uchar> image( width * 4 );
for (int cline = 0; cline < height; cline++)
{
@@ -199,7 +199,7 @@ namespace { // Private.
} // namespace
-KDE_EXPORT void kimgio_hdr_read( QImageIO * io )
+KDE_EXPORT void kimgio_hdr_read( TQImageIO * io )
{
int len;
char line[MAXLINE];
@@ -242,9 +242,9 @@ KDE_EXPORT void kimgio_hdr_read( QImageIO * io )
return;
}
- QDataStream s( io->ioDevice() );
+ TQDataStream s( io->ioDevice() );
- QImage img;
+ TQImage img;
if( !LoadHDR(s, width, height, img) )
{
kdDebug(399) << "Error loading HDR file." << endl;
@@ -258,7 +258,7 @@ KDE_EXPORT void kimgio_hdr_read( QImageIO * io )
}
-KDE_EXPORT void kimgio_hdr_write( QImageIO * )
+KDE_EXPORT void kimgio_hdr_write( TQImageIO * )
{
// intentionally not implemented (since writing low dynamic range data to a HDR file is nonsense.)
}
diff --git a/kimgio/hdr.h b/kimgio/hdr.h
index 34c833f73..327d3d6d2 100644
--- a/kimgio/hdr.h
+++ b/kimgio/hdr.h
@@ -13,8 +13,8 @@
class QImageIO;
extern "C" {
-void kimgio_hdr_read( QImageIO * );
-void kimgio_hdr_write( QImageIO * );
+void kimgio_hdr_read( TQImageIO * );
+void kimgio_hdr_write( TQImageIO * );
}
#endif
diff --git a/kimgio/ico.cpp b/kimgio/ico.cpp
index bc1ba388d..01ee37a1b 100644
--- a/kimgio/ico.cpp
+++ b/kimgio/ico.cpp
@@ -13,11 +13,11 @@
#include <algorithm>
#include <vector>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qapplication.h>
-#include <qmemarray.h>
-#include <qpaintdevicemetrics.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqapplication.h>
+#include <tqmemarray.h>
+#include <tqpaintdevicemetrics.h>
#include <kdelibs_export.h>
@@ -34,7 +34,7 @@ namespace
Q_UINT16 count;
};
- inline QDataStream& operator >>( QDataStream& s, IcoHeader& h )
+ inline TQDataStream& operator >>( TQDataStream& s, IcoHeader& h )
{
return s >> h.reserved >> h.type >> h.count;
}
@@ -59,7 +59,7 @@ namespace
};
const Q_UINT32 BMP_INFOHDR::Size;
- QDataStream& operator >>( QDataStream &s, BMP_INFOHDR &bi )
+ TQDataStream& operator >>( TQDataStream &s, BMP_INFOHDR &bi )
{
s >> bi.biSize;
if ( bi.biSize == BMP_INFOHDR::Size )
@@ -73,7 +73,7 @@ namespace
}
#if 0
- QDataStream &operator<<( QDataStream &s, const BMP_INFOHDR &bi )
+ TQDataStream &operator<<( TQDataStream &s, const BMP_INFOHDR &bi )
{
s << bi.biSize;
s << bi.biWidth << bi.biHeight;
@@ -99,7 +99,7 @@ namespace
Q_UINT32 offset;
};
- inline QDataStream& operator >>( QDataStream& s, IconRec& r )
+ inline TQDataStream& operator >>( TQDataStream& s, IconRec& r )
{
return s >> r.width >> r.height >> r.colors
>> r.hotspotX >> r.hotspotY >> r.size >> r.offset;
@@ -137,7 +137,7 @@ namespace
unsigned colors;
};
- bool loadFromDIB( QDataStream& stream, const IconRec& rec, QImage& icon )
+ bool loadFromDIB( TQDataStream& stream, const IconRec& rec, TQImage& icon )
{
BMP_INFOHDR header;
stream >> header;
@@ -169,7 +169,7 @@ namespace
if ( icon.isNull() ) return false;
icon.setAlphaBuffer( true );
- QMemArray< QRgb > colorTable( paletteSize );
+ TQMemArray< QRgb > colorTable( paletteSize );
colorTable.fill( QRgb( 0 ) );
for ( unsigned i = 0; i < paletteEntries; ++i )
@@ -241,30 +241,30 @@ namespace
}
}
-extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io )
+extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io )
{
- QIODevice::Offset offset = io->ioDevice()->at();
+ TQIODevice::Offset offset = io->ioDevice()->at();
- QDataStream stream( io->ioDevice() );
- stream.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream stream( io->ioDevice() );
+ stream.setByteOrder( TQDataStream::LittleEndian );
IcoHeader header;
stream >> header;
if ( stream.atEnd() || !header.count ||
( header.type != IcoHeader::Icon && header.type != IcoHeader::Cursor) )
return;
- QPaintDeviceMetrics metrics( QApplication::desktop() );
+ TQPaintDeviceMetrics metrics( TQApplication::desktop() );
unsigned requestedSize = 32;
unsigned requestedColors = metrics.depth() > 8 ? 0 : metrics.depth();
int requestedIndex = -1;
if ( io->parameters() )
{
- QStringList params = QStringList::split( ';', io->parameters() );
- QMap< QString, QString > options;
- for ( QStringList::ConstIterator it = params.begin();
+ TQStringList params = TQStringList::split( ';', io->parameters() );
+ TQMap< TQString, TQString > options;
+ for ( TQStringList::ConstIterator it = params.begin();
it != params.end(); ++it )
{
- QStringList tmp = QStringList::split( '=', *it );
+ TQStringList tmp = TQStringList::split( '=', *it );
if ( tmp.count() == 2 ) options[ tmp[ 0 ] ] = tmp[ 1 ];
}
if ( options[ "index" ].toUInt() )
@@ -296,14 +296,14 @@ extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io )
return;
io->ioDevice()->at( offset + selected->offset );
- QImage icon;
+ TQImage icon;
if ( loadFromDIB( stream, *selected, icon ) )
{
- icon.setText( "X-Index", 0, QString::number( selected - icons.begin() ) );
+ icon.setText( "X-Index", 0, TQString::number( selected - icons.begin() ) );
if ( header.type == IcoHeader::Cursor )
{
- icon.setText( "X-HotspotX", 0, QString::number( selected->hotspotX ) );
- icon.setText( "X-HotspotY", 0, QString::number( selected->hotspotY ) );
+ icon.setText( "X-HotspotX", 0, TQString::number( selected->hotspotX ) );
+ icon.setText( "X-HotspotY", 0, TQString::number( selected->hotspotY ) );
}
io->setImage(icon);
io->setStatus(0);
@@ -311,17 +311,17 @@ extern "C" KDE_EXPORT void kimgio_ico_read( QImageIO* io )
}
#if 0
-void kimgio_ico_write(QImageIO *io)
+void kimgio_ico_write(TQImageIO *io)
{
if (io->image().isNull())
return;
- QByteArray dibData;
- QDataStream dib(dibData, IO_ReadWrite);
- dib.setByteOrder(QDataStream::LittleEndian);
+ TQByteArray dibData;
+ TQDataStream dib(dibData, IO_ReadWrite);
+ dib.setByteOrder(TQDataStream::LittleEndian);
- QImage pixels = io->image();
- QImage mask;
+ TQImage pixels = io->image();
+ TQImage mask;
if (io->image().hasAlphaBuffer())
mask = io->image().createAlphaMask();
else
@@ -340,8 +340,8 @@ void kimgio_ico_write(QImageIO *io)
memmove(dibData.data() + hdrPos, dibData.data() + hdrPos + BMP_WIN + 8, dibData.size() - hdrPos - BMP_WIN - 8);
dibData.resize(dibData.size() - BMP_WIN - 8);
- QDataStream ico(io->ioDevice());
- ico.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream ico(io->ioDevice());
+ ico.setByteOrder(TQDataStream::LittleEndian);
IcoHeader hdr;
hdr.reserved = 0;
hdr.type = Icon;
diff --git a/kimgio/ico.h b/kimgio/ico.h
index 4492d4d9d..335cc8237 100644
--- a/kimgio/ico.h
+++ b/kimgio/ico.h
@@ -8,7 +8,7 @@
*
*/
-// You can use QImageIO::setParameters() to request a specific
+// You can use TQImageIO::setParameters() to request a specific
// Icon out of an .ico file:
//
// Options consist of a name=value pair and are separated by a semicolon.
@@ -39,8 +39,8 @@ class QImageIO;
extern "C"
{
- void kimgio_ico_read(QImageIO *);
-// void kimgio_ico_write(QImageIO *);
+ void kimgio_ico_read(TQImageIO *);
+// void kimgio_ico_write(TQImageIO *);
}
#endif
diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp
index 3e44275d8..71b260375 100644
--- a/kimgio/jp2.cpp
+++ b/kimgio/jp2.cpp
@@ -13,10 +13,10 @@
#include <stdint.h>
#endif
#include <ktempfile.h>
-#include <qcolor.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqcolor.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqimage.h>
// dirty, but avoids a warning because jasper.h includes jas_config.h.
#undef PACKAGE
@@ -39,27 +39,27 @@ typedef struct {
jas_image_t*
-read_image( const QImageIO* io )
+read_image( const TQImageIO* io )
{
jas_stream_t* in = 0;
- // for QIODevice's other than QFile, a temp. file is used.
+ // for QIODevice's other than TQFile, a temp. file is used.
KTempFile* tempf = 0;
- QFile* qf = 0;
- if( ( qf = dynamic_cast<QFile*>( io->ioDevice() ) ) ) {
- // great, it's a QFile. Let's just take the filename.
- in = jas_stream_fopen( QFile::encodeName( qf->name() ), "rb" );
+ TQFile* qf = 0;
+ if( ( qf = dynamic_cast<TQFile*>( io->ioDevice() ) ) ) {
+ // great, it's a TQFile. Let's just take the filename.
+ in = jas_stream_fopen( TQFile::encodeName( qf->name() ), "rb" );
} else {
- // not a QFile. Copy the whole data to a temp. file.
+ // not a TQFile. Copy the whole data to a temp. file.
tempf = new KTempFile();
if( tempf->status() != 0 ) {
delete tempf;
return 0;
} // if
tempf->setAutoDelete( true );
- QFile* out = tempf->file();
+ TQFile* out = tempf->file();
// 4096 (=4k) is a common page size.
- QByteArray b( 4096 );
+ TQByteArray b( 4096 );
Q_LONG size;
// 0 or -1 is EOF / error
while( ( size = io->ioDevice()->readBlock( b.data(), 4096 ) ) > 0 ) {
@@ -69,7 +69,7 @@ read_image( const QImageIO* io )
// flush everything out to disk
out->flush();
- in = jas_stream_fopen( QFile::encodeName( tempf->name() ), "rb" );
+ in = jas_stream_fopen( TQFile::encodeName( tempf->name() ), "rb" );
} // else
if( !in ) {
delete tempf;
@@ -98,7 +98,7 @@ convert_colorspace( gs_t& gs )
} // convert_colorspace
static bool
-render_view( gs_t& gs, QImage& qti )
+render_view( gs_t& gs, TQImage& qti )
{
if((gs.cmptlut[0] = jas_image_getcmptbytype(gs.altimage,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 ||
@@ -147,7 +147,7 @@ render_view( gs_t& gs, QImage& qti )
KDE_EXPORT void
-kimgio_jp2_read( QImageIO* io )
+kimgio_jp2_read( TQImageIO* io )
{
if( jas_init() ) return;
@@ -156,7 +156,7 @@ kimgio_jp2_read( QImageIO* io )
if( !convert_colorspace( gs ) ) return;
- QImage image;
+ TQImage image;
render_view( gs, image );
if( gs.image ) jas_image_destroy( gs.image );
@@ -168,7 +168,7 @@ kimgio_jp2_read( QImageIO* io )
static jas_image_t*
-create_image( const QImage& qi )
+create_image( const TQImage& qi )
{
// prepare the component parameters
jas_image_cmptparm_t* cmptparms = new jas_image_cmptparm_t[ 3 ];
@@ -198,7 +198,7 @@ create_image( const QImage& qi )
static bool
-write_components( jas_image_t* ji, const QImage& qi )
+write_components( jas_image_t* ji, const TQImage& qi )
{
const unsigned height = qi.height();
const unsigned width = qi.width();
@@ -231,7 +231,7 @@ write_components( jas_image_t* ji, const QImage& qi )
} // write_components
KDE_EXPORT void
-kimgio_jp2_write( QImageIO* io )
+kimgio_jp2_write( TQImageIO* io )
{
if( jas_init() ) return;
@@ -239,9 +239,9 @@ kimgio_jp2_write( QImageIO* io )
// temporary file otherwise.
jas_stream_t* stream = 0;
- QFile* qf = 0;
+ TQFile* qf = 0;
KTempFile* ktempf = 0;
- if( ( qf = dynamic_cast<QFile*>( io->ioDevice() ) ) ) {
+ if( ( qf = dynamic_cast<TQFile*>( io->ioDevice() ) ) ) {
// jas_stream_fdopen works here, but not when reading...
stream = jas_stream_fdopen( dup( qf->handle() ), "w" );
} else {
@@ -272,8 +272,8 @@ kimgio_jp2_write( QImageIO* io )
// - rate=#B => the resulting file size is about # bytes
// - rate=0.0 .. 1.0 => the resulting file size is about the factor times
// the uncompressed size
- QString rate;
- QTextStream ts( &rate, IO_WriteOnly );
+ TQString rate;
+ TQTextStream ts( &rate, IO_WriteOnly );
ts << "rate="
<< ( (io->quality() < 0) ? DEFAULT_RATE : io->quality() / 100.0F );
int i = jp2_encode( ji, stream, rate.utf8().data() );
@@ -285,9 +285,9 @@ kimgio_jp2_write( QImageIO* io )
if( ktempf ) {
// We've written to a tempfile. Copy the data to the final destination.
- QFile* in = ktempf->file();
+ TQFile* in = ktempf->file();
- QByteArray b( 4096 );
+ TQByteArray b( 4096 );
Q_LONG size;
// seek to the beginning of the file.
diff --git a/kimgio/jp2.h b/kimgio/jp2.h
index d137ac0a3..c71820af5 100644
--- a/kimgio/jp2.h
+++ b/kimgio/jp2.h
@@ -5,8 +5,8 @@
class QImageIO;
extern "C" {
- void kimgio_jp2_read( QImageIO* io );
- void kimgio_jp2_write( QImageIO* io );
+ void kimgio_jp2_read( TQImageIO* io );
+ void kimgio_jp2_write( TQImageIO* io );
} // extern "C"
#endif
diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp
index 867829eb6..3d866ad0a 100644
--- a/kimgio/pcx.cpp
+++ b/kimgio/pcx.cpp
@@ -9,18 +9,18 @@
#include "pcx.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
-static QDataStream &operator>>( QDataStream &s, RGB &rgb )
+static TQDataStream &operator>>( TQDataStream &s, RGB &rgb )
{
s >> rgb.r >> rgb.g >> rgb.b;
return s;
}
-static QDataStream &operator>>( QDataStream &s, Palette &pal )
+static TQDataStream &operator>>( TQDataStream &s, Palette &pal )
{
for ( int i=0; i<16; ++i )
s >> pal.rgb[ i ];
@@ -28,7 +28,7 @@ static QDataStream &operator>>( QDataStream &s, Palette &pal )
return s;
}
-static QDataStream &operator>>( QDataStream &s, PCXHEADER &ph )
+static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph )
{
s >> ph.Manufacturer;
s >> ph.Version;
@@ -52,14 +52,14 @@ static QDataStream &operator>>( QDataStream &s, PCXHEADER &ph )
return s;
}
-static QDataStream &operator<<( QDataStream &s, const RGB &rgb )
+static TQDataStream &operator<<( TQDataStream &s, const RGB &rgb )
{
s << rgb.r << rgb.g << rgb.b;
return s;
}
-static QDataStream &operator<<( QDataStream &s, const Palette &pal )
+static TQDataStream &operator<<( TQDataStream &s, const Palette &pal )
{
for ( int i=0; i<16; ++i )
s << pal.rgb[ i ];
@@ -67,7 +67,7 @@ static QDataStream &operator<<( QDataStream &s, const Palette &pal )
return s;
}
-static QDataStream &operator<<( QDataStream &s, const PCXHEADER &ph )
+static TQDataStream &operator<<( TQDataStream &s, const PCXHEADER &ph )
{
s << ph.Manufacturer;
s << ph.Version;
@@ -93,13 +93,13 @@ static QDataStream &operator<<( QDataStream &s, const PCXHEADER &ph )
PCXHEADER::PCXHEADER()
{
// Initialize all data to zero
- QByteArray dummy( 128 );
+ TQByteArray dummy( 128 );
dummy.fill( 0 );
- QDataStream s( dummy, IO_ReadOnly );
+ TQDataStream s( dummy, IO_ReadOnly );
s >> *this;
}
-static void readLine( QDataStream &s, QByteArray &buf, const PCXHEADER &header )
+static void readLine( TQDataStream &s, TQByteArray &buf, const PCXHEADER &header )
{
Q_UINT32 i=0;
Q_UINT32 size = buf.size();
@@ -132,11 +132,11 @@ static void readLine( QDataStream &s, QByteArray &buf, const PCXHEADER &header )
}
}
-static void readImage1( QImage &img, QDataStream &s, const PCXHEADER &header )
+static void readImage1( TQImage &img, TQDataStream &s, const PCXHEADER &header )
{
- QByteArray buf( header.BytesPerLine );
+ TQByteArray buf( header.BytesPerLine );
- if(!img.create( header.width(), header.height(), 1, 2, QImage::BigEndian ))
+ if(!img.create( header.width(), header.height(), 1, 2, TQImage::BigEndian ))
return;
for ( int y=0; y<header.height(); ++y )
@@ -159,10 +159,10 @@ static void readImage1( QImage &img, QDataStream &s, const PCXHEADER &header )
img.setColor( 1, qRgb( 255, 255, 255 ) );
}
-static void readImage4( QImage &img, QDataStream &s, const PCXHEADER &header )
+static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header )
{
- QByteArray buf( header.BytesPerLine*4 );
- QByteArray pixbuf( header.width() );
+ TQByteArray buf( header.BytesPerLine*4 );
+ TQByteArray pixbuf( header.width() );
if(!img.create( header.width(), header.height(), 8, 16 ))
return;
@@ -196,9 +196,9 @@ static void readImage4( QImage &img, QDataStream &s, const PCXHEADER &header )
img.setColor( i, header.ColorMap.color( i ) );
}
-static void readImage8( QImage &img, QDataStream &s, const PCXHEADER &header )
+static void readImage8( TQImage &img, TQDataStream &s, const PCXHEADER &header )
{
- QByteArray buf( header.BytesPerLine );
+ TQByteArray buf( header.BytesPerLine );
if(!img.create( header.width(), header.height(), 8, 256 ))
return;
@@ -235,11 +235,11 @@ static void readImage8( QImage &img, QDataStream &s, const PCXHEADER &header )
}
}
-static void readImage24( QImage &img, QDataStream &s, const PCXHEADER &header )
+static void readImage24( TQImage &img, TQDataStream &s, const PCXHEADER &header )
{
- QByteArray r_buf( header.BytesPerLine );
- QByteArray g_buf( header.BytesPerLine );
- QByteArray b_buf( header.BytesPerLine );
+ TQByteArray r_buf( header.BytesPerLine );
+ TQByteArray g_buf( header.BytesPerLine );
+ TQByteArray b_buf( header.BytesPerLine );
if(!img.create( header.width(), header.height(), 32 ))
return;
@@ -262,10 +262,10 @@ static void readImage24( QImage &img, QDataStream &s, const PCXHEADER &header )
}
}
-KDE_EXPORT void kimgio_pcx_read( QImageIO *io )
+KDE_EXPORT void kimgio_pcx_read( TQImageIO *io )
{
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::LittleEndian );
if ( s.device()->size() < 128 )
{
@@ -297,7 +297,7 @@ KDE_EXPORT void kimgio_pcx_read( QImageIO *io )
kdDebug( 399 ) << "BytesPerLine: " << header.BytesPerLine << endl;
kdDebug( 399 ) << "NPlanes: " << header.NPlanes << endl;
- QImage img;
+ TQImage img;
if ( header.Bpp == 1 && header.NPlanes == 1 )
{
@@ -331,7 +331,7 @@ KDE_EXPORT void kimgio_pcx_read( QImageIO *io )
}
}
-static void writeLine( QDataStream &s, QByteArray &buf )
+static void writeLine( TQDataStream &s, TQByteArray &buf )
{
Q_UINT32 i = 0;
Q_UINT32 size = buf.size();
@@ -361,9 +361,9 @@ static void writeLine( QDataStream &s, QByteArray &buf )
}
}
-static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header )
+static void writeImage1( TQImage &img, TQDataStream &s, PCXHEADER &header )
{
- img = img.convertBitOrder( QImage::BigEndian );
+ img = img.convertBitOrder( TQImage::BigEndian );
header.Bpp = 1;
header.NPlanes = 1;
@@ -371,13 +371,13 @@ static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header )
s << header;
- QByteArray buf( header.BytesPerLine );
+ TQByteArray buf( header.BytesPerLine );
for ( int y=0; y<header.height(); ++y )
{
Q_UINT8 *p = img.scanLine( y );
- // Invert as QImage uses reverse palette for monochrome images?
+ // Invert as TQImage uses reverse palette for monochrome images?
for ( int i=0; i<header.BytesPerLine; ++i )
buf[ i ] = ~p[ i ];
@@ -385,7 +385,7 @@ static void writeImage1( QImage &img, QDataStream &s, PCXHEADER &header )
}
}
-static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header )
+static void writeImage4( TQImage &img, TQDataStream &s, PCXHEADER &header )
{
header.Bpp = 1;
header.NPlanes = 4;
@@ -396,7 +396,7 @@ static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header )
s << header;
- QByteArray buf[ 4 ];
+ TQByteArray buf[ 4 ];
for ( int i=0; i<4; ++i )
buf[ i ].resize( header.BytesPerLine );
@@ -420,7 +420,7 @@ static void writeImage4( QImage &img, QDataStream &s, PCXHEADER &header )
}
}
-static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header )
+static void writeImage8( TQImage &img, TQDataStream &s, PCXHEADER &header )
{
header.Bpp = 8;
header.NPlanes = 1;
@@ -428,7 +428,7 @@ static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header )
s << header;
- QByteArray buf( header.BytesPerLine );
+ TQByteArray buf( header.BytesPerLine );
for ( int y=0; y<header.height(); ++y )
{
@@ -449,7 +449,7 @@ static void writeImage8( QImage &img, QDataStream &s, PCXHEADER &header )
s << RGB( img.color( i ) );
}
-static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header )
+static void writeImage24( TQImage &img, TQDataStream &s, PCXHEADER &header )
{
header.Bpp = 8;
header.NPlanes = 3;
@@ -457,9 +457,9 @@ static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header )
s << header;
- QByteArray r_buf( header.width() );
- QByteArray g_buf( header.width() );
- QByteArray b_buf( header.width() );
+ TQByteArray r_buf( header.width() );
+ TQByteArray g_buf( header.width() );
+ TQByteArray b_buf( header.width() );
for ( int y=0; y<header.height(); ++y )
{
@@ -479,12 +479,12 @@ static void writeImage24( QImage &img, QDataStream &s, PCXHEADER &header )
}
}
-KDE_EXPORT void kimgio_pcx_write( QImageIO *io )
+KDE_EXPORT void kimgio_pcx_write( TQImageIO *io )
{
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::LittleEndian );
- QImage img = io->image();
+ TQImage img = io->image();
int w = img.width();
int h = img.height();
diff --git a/kimgio/pcx.h b/kimgio/pcx.h
index 991cf6acb..72753df33 100644
--- a/kimgio/pcx.h
+++ b/kimgio/pcx.h
@@ -10,16 +10,16 @@
#ifndef PCX_H
#define PCX_H
-#include <qglobal.h>
-#include <qdatastream.h>
-#include <qcolor.h>
+#include <tqglobal.h>
+#include <tqdatastream.h>
+#include <tqcolor.h>
class QImageIO;
extern "C"
{
- void kimgio_pcx_read( QImageIO * );
- void kimgio_pcx_write( QImageIO * );
+ void kimgio_pcx_read( TQImageIO * );
+ void kimgio_pcx_write( TQImageIO * );
}
class RGB
diff --git a/kimgio/psd.cpp b/kimgio/psd.cpp
index 202fbacb4..13070a0c2 100644
--- a/kimgio/psd.cpp
+++ b/kimgio/psd.cpp
@@ -19,8 +19,8 @@
#include "psd.h"
-#include <qimage.h>
-#include <qdatastream.h>
+#include <tqimage.h>
+#include <tqdatastream.h>
#include <kdebug.h>
@@ -52,7 +52,7 @@ namespace { // Private.
ushort color_mode;
};
- static QDataStream & operator>> ( QDataStream & s, PSDHeader & header )
+ static TQDataStream & operator>> ( TQDataStream & s, PSDHeader & header )
{
s >> header.signature;
s >> header.version;
@@ -66,7 +66,7 @@ namespace { // Private.
s >> header.color_mode;
return s;
}
- static bool seekBy(QDataStream& s, unsigned int bytes)
+ static bool seekBy(TQDataStream& s, unsigned int bytes)
{
char buf[4096];
while (bytes) {
@@ -108,7 +108,7 @@ namespace { // Private.
}
// Load the PSD image.
- static bool LoadPSD( QDataStream & s, const PSDHeader & header, QImage & img )
+ static bool LoadPSD( TQDataStream & s, const PSDHeader & header, TQImage & img )
{
// Create dst image.
if( !img.create( header.width, header.height, 32 )) {
@@ -238,10 +238,10 @@ namespace { // Private.
} // Private
-void kimgio_psd_read( QImageIO *io )
+void kimgio_psd_read( TQImageIO *io )
{
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::BigEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::BigEndian );
PSDHeader header;
s >> header;
@@ -262,7 +262,7 @@ void kimgio_psd_read( QImageIO *io )
return;
}
- QImage img;
+ TQImage img;
if( !LoadPSD(s, header, img) ) {
kdDebug(399) << "Error loading PSD file." << endl;
io->setImage( 0 );
@@ -275,7 +275,7 @@ void kimgio_psd_read( QImageIO *io )
}
-void kimgio_psd_write( QImageIO * )
+void kimgio_psd_write( TQImageIO * )
{
// TODO Stub!
}
diff --git a/kimgio/psd.h b/kimgio/psd.h
index 0b99ef75e..88ee3b5bc 100644
--- a/kimgio/psd.h
+++ b/kimgio/psd.h
@@ -15,8 +15,8 @@
class QImageIO;
extern "C" {
-KDE_EXPORT void kimgio_psd_read( QImageIO * );
-KDE_EXPORT void kimgio_psd_write( QImageIO * );
+KDE_EXPORT void kimgio_psd_read( TQImageIO * );
+KDE_EXPORT void kimgio_psd_write( TQImageIO * );
}
#endif
diff --git a/kimgio/rgb.cpp b/kimgio/rgb.cpp
index 2e62f4f6f..71976685a 100644
--- a/kimgio/rgb.cpp
+++ b/kimgio/rgb.cpp
@@ -24,17 +24,17 @@
#include "rgb.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
///////////////////////////////////////////////////////////////////////////////
-KDE_EXPORT void kimgio_rgb_read(QImageIO *io)
+KDE_EXPORT void kimgio_rgb_read(TQImageIO *io)
{
SGIImage sgi(io);
- QImage img;
+ TQImage img;
if (!sgi.readImage(img)) {
io->setImage(0);
@@ -47,10 +47,10 @@ KDE_EXPORT void kimgio_rgb_read(QImageIO *io)
}
-KDE_EXPORT void kimgio_rgb_write(QImageIO *io)
+KDE_EXPORT void kimgio_rgb_write(TQImageIO *io)
{
SGIImage sgi(io);
- QImage img = io->image();
+ TQImage img = io->image();
if (!sgi.writeImage(img))
io->setStatus(-1);
@@ -62,7 +62,7 @@ KDE_EXPORT void kimgio_rgb_write(QImageIO *io)
///////////////////////////////////////////////////////////////////////////////
-SGIImage::SGIImage(QImageIO *io) :
+SGIImage::SGIImage(TQImageIO *io) :
m_io(io),
m_starttab(0),
m_lengthtab(0)
@@ -118,11 +118,11 @@ bool SGIImage::getRow(uchar *dest)
}
-bool SGIImage::readData(QImage& img)
+bool SGIImage::readData(TQImage& img)
{
QRgb *c;
Q_UINT32 *start = m_starttab;
- QByteArray lguard(m_xsize);
+ TQByteArray lguard(m_xsize);
uchar *line = (uchar *)lguard.data();
unsigned x, y;
@@ -181,7 +181,7 @@ bool SGIImage::readData(QImage& img)
}
-bool SGIImage::readImage(QImage& img)
+bool SGIImage::readImage(TQImage& img)
{
Q_INT8 u8;
Q_INT16 u16;
@@ -291,16 +291,16 @@ bool SGIImage::readImage(QImage& img)
// TODO remove; for debugging purposes only
-void RLEData::print(QString desc) const
+void RLEData::print(TQString desc) const
{
- QString s = desc + ": ";
+ TQString s = desc + ": ";
for (uint i = 0; i < size(); i++)
- s += QString::number(at(i)) + ",";
+ s += TQString::number(at(i)) + ",";
kdDebug() << "--- " << s << endl;
}
-void RLEData::write(QDataStream& s)
+void RLEData::write(TQDataStream& s)
{
for (unsigned i = 0; i < size(); i++)
s << at(i);
@@ -328,13 +328,13 @@ uint RLEMap::insert(const uchar *d, uint l)
return it.data();
m_offset += l;
- return QMap<RLEData, uint>::insert(data, m_counter++).data();
+ return TQMap<RLEData, uint>::insert(data, m_counter++).data();
}
-QPtrVector<RLEData> RLEMap::vector()
+TQPtrVector<RLEData> RLEMap::vector()
{
- QPtrVector<RLEData> v(size());
+ TQPtrVector<RLEData> v(size());
for (Iterator it = begin(); it != end(); ++it)
v.insert(it.data(), &it.key());
@@ -387,11 +387,11 @@ uint SGIImage::compact(uchar *d, uchar *s)
}
-bool SGIImage::scanData(const QImage& img)
+bool SGIImage::scanData(const TQImage& img)
{
Q_UINT32 *start = m_starttab;
- QCString lineguard(m_xsize * 2);
- QCString bufguard(m_xsize);
+ TQCString lineguard(m_xsize * 2);
+ TQCString bufguard(m_xsize);
uchar *line = (uchar *)lineguard.data();
uchar *buf = (uchar *)bufguard.data();
QRgb *c;
@@ -451,7 +451,7 @@ void SGIImage::writeHeader()
m_stream << Q_UINT32(0);
uint i;
- QString desc = m_io->description();
+ TQString desc = m_io->description();
kdDebug(399) << "Description: " << desc << endl;
desc.truncate(79);
@@ -488,7 +488,7 @@ void SGIImage::writeRle()
}
-void SGIImage::writeVerbatim(const QImage& img)
+void SGIImage::writeVerbatim(const TQImage& img)
{
m_rle = 0;
kdDebug(399) << "writing verbatim data" << endl;
@@ -531,7 +531,7 @@ void SGIImage::writeVerbatim(const QImage& img)
}
-bool SGIImage::writeImage(QImage& img)
+bool SGIImage::writeImage(TQImage& img)
{
kdDebug(399) << "writing '" << m_io->fileName() << '\'' << endl;
diff --git a/kimgio/rgb.h b/kimgio/rgb.h
index 224d22cc8..cd0a897d9 100644
--- a/kimgio/rgb.h
+++ b/kimgio/rgb.h
@@ -11,37 +11,37 @@
#ifndef KIMG_RGB_H
#define KIMG_RGB_H
-#include <qmap.h>
-#include <qptrvector.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
class QImage;
class QImageIO;
extern "C" {
-void kimgio_rgb_read(QImageIO *);
-void kimgio_rgb_write(QImageIO *);
+void kimgio_rgb_read(TQImageIO *);
+void kimgio_rgb_write(TQImageIO *);
}
-class RLEData : public QMemArray<uchar> {
+class RLEData : public TQMemArray<uchar> {
public:
RLEData() {}
RLEData(const uchar *d, uint l, uint o) : m_offset(o) { duplicate(d, l); }
bool operator<(const RLEData&) const;
- void write(QDataStream& s);
- void print(QString) const; // TODO remove
+ void write(TQDataStream& s);
+ void print(TQString) const; // TODO remove
uint offset() { return m_offset; }
private:
uint m_offset;
};
-class RLEMap : public QMap<RLEData, uint> {
+class RLEMap : public TQMap<RLEData, uint> {
public:
RLEMap() : m_counter(0), m_offset(0) {}
uint insert(const uchar *d, uint l);
- QPtrVector<RLEData> vector();
+ TQPtrVector<RLEData> vector();
void setBaseOffset(uint o) { m_offset = o; }
private:
uint m_counter;
@@ -51,11 +51,11 @@ private:
class SGIImage {
public:
- SGIImage(QImageIO *);
+ SGIImage(TQImageIO *);
~SGIImage();
- bool readImage(QImage&);
- bool writeImage(QImage&);
+ bool readImage(TQImage&);
+ bool writeImage(TQImage&);
private:
enum { NORMAL, DITHERED, SCREEN, COLORMAP }; // colormap
@@ -77,18 +77,18 @@ private:
Q_UINT32 *m_starttab;
Q_UINT32 *m_lengthtab;
QByteArray m_data;
- QByteArray::Iterator m_pos;
+ TQByteArray::Iterator m_pos;
RLEMap m_rlemap;
- QPtrVector<RLEData> m_rlevector;
+ TQPtrVector<RLEData> m_rlevector;
uint m_numrows;
- bool readData(QImage&);
+ bool readData(TQImage&);
bool getRow(uchar *dest);
void writeHeader();
void writeRle();
- void writeVerbatim(const QImage&);
- bool scanData(const QImage&);
+ void writeVerbatim(const TQImage&);
+ bool scanData(const TQImage&);
uint compact(uchar *, uchar *);
uchar intensity(uchar);
};
diff --git a/kimgio/tga.cpp b/kimgio/tga.cpp
index 2a227d077..8fb5fbd7f 100644
--- a/kimgio/tga.cpp
+++ b/kimgio/tga.cpp
@@ -22,8 +22,8 @@
#include <assert.h>
-#include <qimage.h>
-#include <qdatastream.h>
+#include <tqimage.h>
+#include <tqdatastream.h>
#include <kdebug.h>
@@ -74,7 +74,7 @@ namespace { // Private.
enum { SIZE = 18 }; // const static int SIZE = 18;
};
- static QDataStream & operator>> ( QDataStream & s, TgaHeader & head )
+ static TQDataStream & operator>> ( TQDataStream & s, TgaHeader & head )
{
s >> head.id_length;
s >> head.colormap_type;
@@ -169,7 +169,7 @@ namespace { // Private.
}
};
- static bool LoadTGA( QDataStream & s, const TgaHeader & tga, QImage &img )
+ static bool LoadTGA( TQDataStream & s, const TgaHeader & tga, TQImage &img )
{
// Create image.
if( !img.create( tga.width, tga.height, 32 )) {
@@ -313,12 +313,12 @@ namespace { // Private.
} // namespace
-KDE_EXPORT void kimgio_tga_read( QImageIO *io )
+KDE_EXPORT void kimgio_tga_read( TQImageIO *io )
{
//kdDebug(399) << "Loading TGA file!" << endl;
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::LittleEndian );
// Read image header.
@@ -343,7 +343,7 @@ KDE_EXPORT void kimgio_tga_read( QImageIO *io )
}
- QImage img;
+ TQImage img;
bool result = LoadTGA(s, tga, img);
if( result == false ) {
@@ -359,12 +359,12 @@ KDE_EXPORT void kimgio_tga_read( QImageIO *io )
}
-KDE_EXPORT void kimgio_tga_write( QImageIO *io )
+KDE_EXPORT void kimgio_tga_write( TQImageIO *io )
{
- QDataStream s( io->ioDevice() );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( io->ioDevice() );
+ s.setByteOrder( TQDataStream::LittleEndian );
- const QImage img = io->image();
+ const TQImage img = io->image();
const bool hasAlpha = img.hasAlphaBuffer();
for( int i = 0; i < 12; i++ )
s << targaMagic[i];
diff --git a/kimgio/tga.h b/kimgio/tga.h
index 85ce1f69f..c9dc3902f 100644
--- a/kimgio/tga.h
+++ b/kimgio/tga.h
@@ -13,8 +13,8 @@
class QImageIO;
extern "C" {
-void kimgio_tga_read( QImageIO * );
-void kimgio_tga_write( QImageIO * );
+void kimgio_tga_read( TQImageIO * );
+void kimgio_tga_write( TQImageIO * );
}
#endif
diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp
index bda4ce354..f8022d2dd 100644
--- a/kimgio/tiffr.cpp
+++ b/kimgio/tiffr.cpp
@@ -6,8 +6,8 @@
#include <tiffio.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdelibs_export.h>
#include <assert.h>
@@ -16,7 +16,7 @@
static tsize_t tiff_read( thandle_t handle, tdata_t buf, tsize_t size )
{
- QIODevice *dev = reinterpret_cast<QIODevice *>( handle );
+ TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle );
return dev->readBlock( reinterpret_cast<char *>( buf ), size );
}
@@ -27,7 +27,7 @@ static tsize_t tiff_write( thandle_t, tdata_t, tsize_t )
static toff_t tiff_seek( thandle_t handle, toff_t off, int whence )
{
- QIODevice *dev = reinterpret_cast<QIODevice *>( handle );
+ TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle );
if ( whence == SEEK_CUR )
off += dev->at();
@@ -42,7 +42,7 @@ static toff_t tiff_seek( thandle_t handle, toff_t off, int whence )
static toff_t tiff_size( thandle_t handle )
{
- QIODevice *dev = reinterpret_cast<QIODevice *>( handle );
+ TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle );
return dev->size();
}
@@ -60,7 +60,7 @@ static void tiff_unmap( thandle_t, tdata_t, toff_t )
{
}
-KDE_EXPORT void kimgio_tiff_read( QImageIO *io )
+KDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
{
TIFF *tiff;
uint32 width, height;
@@ -69,7 +69,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io )
// FIXME: use qdatastream
// open file
- tiff = TIFFClientOpen( QFile::encodeName( io->fileName() ), "r",
+ tiff = TIFFClientOpen( TQFile::encodeName( io->fileName() ), "r",
( thandle_t )io->ioDevice(),
tiff_read, tiff_write, tiff_seek, tiff_close,
tiff_size, tiff_map, tiff_unmap );
@@ -83,7 +83,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io )
|| TIFFGetField( tiff, TIFFTAG_IMAGELENGTH, &height ) != 1 )
return;
- QImage image( width, height, 32 );
+ TQImage image( width, height, 32 );
if( image.isNull()) {
TIFFClose( tiff );
return;
@@ -143,7 +143,7 @@ KDE_EXPORT void kimgio_tiff_read( QImageIO *io )
io->setStatus ( 0 );
}
-KDE_EXPORT void kimgio_tiff_write( QImageIO * )
+KDE_EXPORT void kimgio_tiff_write( TQImageIO * )
{
// TODO: stub
}
diff --git a/kimgio/tiffr.h b/kimgio/tiffr.h
index 18d39f9bb..b7cad3558 100644
--- a/kimgio/tiffr.h
+++ b/kimgio/tiffr.h
@@ -1,5 +1,5 @@
/**
-* QImageIO Routines to read/write TIFF images.
+* TQImageIO Routines to read/write TIFF images.
* Sirtaj Singh Kang, Oct 1998.
*
* This library is distributed under the conditions of the GNU LGPL.
@@ -13,8 +13,8 @@
class QImageIO;
extern "C" {
-void kimgio_tiff_read( QImageIO *io );
-void kimgio_tiff_write( QImageIO *io );
+void kimgio_tiff_read( TQImageIO *io );
+void kimgio_tiff_write( TQImageIO *io );
}
#endif
diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp
index c7164d7ba..298d17109 100644
--- a/kimgio/xcf.cpp
+++ b/kimgio/xcf.cpp
@@ -20,10 +20,10 @@
*/
#include <stdlib.h>
-#include <qimage.h>
-#include <qiodevice.h>
-#include <qvaluestack.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqiodevice.h>
+#include <tqvaluestack.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include "xcf.h"
@@ -32,14 +32,14 @@
///////////////////////////////////////////////////////////////////////////////
-KDE_EXPORT void kimgio_xcf_read(QImageIO *io)
+KDE_EXPORT void kimgio_xcf_read(TQImageIO *io)
{
XCFImageFormat xcfif;
xcfif.readXCF(io);
}
-KDE_EXPORT void kimgio_xcf_write(QImageIO *io)
+KDE_EXPORT void kimgio_xcf_write(TQImageIO *io)
{
kdDebug(399) << "XCF: write support not implemented" << endl;
io->setStatus(-1);
@@ -119,10 +119,10 @@ int XCFImageFormat::add_lut( int a, int b ) {
return QMIN( a + b, 255 );
}
-void XCFImageFormat::readXCF(QImageIO *io)
+void XCFImageFormat::readXCF(TQImageIO *io)
{
XCFImage xcf_image;
- QDataStream xcf_io(io->ioDevice());
+ TQDataStream xcf_io(io->ioDevice());
char tag[14];
xcf_io.readRawBytes(tag, sizeof(tag));
@@ -149,7 +149,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " <<
// all the data of all layers before beginning to construct the
// merged image).
- QValueStack<Q_INT32> layer_offsets;
+ TQValueStack<Q_INT32> layer_offsets;
while (true) {
Q_INT32 layer_offset;
@@ -201,18 +201,18 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " <<
* \param xcf_image XCF image data.
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadImageProperties(QDataStream& xcf_io, XCFImage& xcf_image)
+bool XCFImageFormat::loadImageProperties(TQDataStream& xcf_io, XCFImage& xcf_image)
{
while (true) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if (!loadProperty(xcf_io, type, bytes)) {
kdDebug(399) << "XCF: error loading global image properties" << endl;
return false;
}
- QDataStream property(bytes, IO_ReadOnly);
+ TQDataStream property(bytes, IO_ReadOnly);
switch (type) {
case PROP_END:
@@ -288,7 +288,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream& xcf_io, XCFImage& xcf_imag
* \param type returns with the property type.
* \param bytes returns with the property data.
* \return true if there were no IO errors. */
-bool XCFImageFormat::loadProperty(QDataStream& xcf_io, PropType& type, QByteArray& bytes)
+bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteArray& bytes)
{
Q_UINT32 foo;
xcf_io >> foo;
@@ -375,7 +375,7 @@ bool XCFImageFormat::loadProperty(QDataStream& xcf_io, PropType& type, QByteArra
* (if the image is indexed).
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image)
+bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image)
{
Layer& layer(xcf_image.layer);
delete[] layer.name;
@@ -402,7 +402,7 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image)
if (layer.visible == 0)
return true;
- // If there are any more layers, merge them into the final QImage.
+ // If there are any more layers, merge them into the final TQImage.
xcf_io >> layer.hierarchy_offset >> layer.mask_offset;
if (xcf_io.device()->status() != IO_Ok) {
@@ -434,8 +434,8 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image)
}
// Now we should have enough information to initialize the final
- // QImage. The first visible layer determines the attributes
- // of the QImage.
+ // TQImage. The first visible layer determines the attributes
+ // of the TQImage.
if (!xcf_image.initialized) {
if( !initializeImage(xcf_image))
@@ -456,18 +456,18 @@ bool XCFImageFormat::loadLayer(QDataStream& xcf_io, XCFImage& xcf_image)
* \param layer layer to collect the properties.
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadLayerProperties(QDataStream& xcf_io, Layer& layer)
+bool XCFImageFormat::loadLayerProperties(TQDataStream& xcf_io, Layer& layer)
{
while (true) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if (!loadProperty(xcf_io, type, bytes)) {
kdDebug(399) << "XCF: error loading layer properties" << endl;
return false;
}
- QDataStream property(bytes, IO_ReadOnly);
+ TQDataStream property(bytes, IO_ReadOnly);
switch (type) {
case PROP_END:
@@ -527,7 +527,7 @@ bool XCFImageFormat::loadLayerProperties(QDataStream& xcf_io, Layer& layer)
/*!
* Compute the number of tiles in the current layer and allocate
- * QImage structures for each of them.
+ * TQImage structures for each of them.
* \param xcf_image contains the current layer.
*/
bool XCFImageFormat::composeTiles(XCFImage& xcf_image)
@@ -564,45 +564,45 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image)
uint tile_height = (j + 1) * TILE_HEIGHT <= layer.height
? TILE_HEIGHT : layer.height - j * TILE_HEIGHT;
- // Try to create the most appropriate QImage (each GIMP layer
+ // Try to create the most appropriate TQImage (each GIMP layer
// type is treated slightly differently)
switch (layer.type) {
case RGB_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height, 32, 0);
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 32, 0);
if( layer.image_tiles[j][i].isNull())
return false;
layer.image_tiles[j][i].setAlphaBuffer(false);
break;
case RGBA_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height, 32, 0);
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 32, 0);
if( layer.image_tiles[j][i].isNull())
return false;
layer.image_tiles[j][i].setAlphaBuffer(true);
break;
case GRAY_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8, 256);
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256);
if( layer.image_tiles[j][i].isNull())
return false;
setGrayPalette(layer.image_tiles[j][i]);
break;
case GRAYA_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8, 256);
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256);
if( layer.image_tiles[j][i].isNull())
return false;
setGrayPalette(layer.image_tiles[j][i]);
- layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256);
+ layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256);
if( layer.alpha_tiles[j][i].isNull())
return false;
setGrayPalette(layer.alpha_tiles[j][i]);
break;
case INDEXED_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height, 8,
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height, 8,
xcf_image.num_colors);
if( layer.image_tiles[j][i].isNull())
return false;
@@ -610,20 +610,20 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image)
break;
case INDEXEDA_GIMAGE:
- layer.image_tiles[j][i] = QImage(tile_width, tile_height,8,
+ layer.image_tiles[j][i] = TQImage(tile_width, tile_height,8,
xcf_image.num_colors);
if( layer.image_tiles[j][i].isNull())
return false;
setPalette(xcf_image, layer.image_tiles[j][i]);
- layer.alpha_tiles[j][i] = QImage(tile_width, tile_height, 8, 256);
+ layer.alpha_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256);
if( layer.alpha_tiles[j][i].isNull())
return false;
setGrayPalette(layer.alpha_tiles[j][i]);
}
if (layer.mask_offset != 0) {
- layer.mask_tiles[j][i] = QImage(tile_width, tile_height, 8, 256);
+ layer.mask_tiles[j][i] = TQImage(tile_width, tile_height, 8, 256);
if( layer.mask_tiles[j][i].isNull())
return false;
setGrayPalette(layer.mask_tiles[j][i]);
@@ -635,12 +635,12 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image)
/*!
- * Apply a grayscale palette to the QImage. Note that Qt does not distinguish
+ * Apply a grayscale palette to the TQImage. Note that Qt does not distinguish
* between grayscale and indexed images. A grayscale image is just
* an indexed image with a 256-color, grayscale palette.
* \param image image to set to a grayscale palette.
*/
-void XCFImageFormat::setGrayPalette(QImage& image)
+void XCFImageFormat::setGrayPalette(TQImage& image)
{
for (int i = 0; i < 256; i++)
image.setColor(i, qRgb(i, i, i));
@@ -648,11 +648,11 @@ void XCFImageFormat::setGrayPalette(QImage& image)
/*!
- * Copy the indexed palette from the XCF image into the QImage.
+ * Copy the indexed palette from the XCF image into the TQImage.
* \param xcf_image XCF image containing the palette read from the data stream.
* \param image image to apply the palette to.
*/
-void XCFImageFormat::setPalette(XCFImage& xcf_image, QImage& image)
+void XCFImageFormat::setPalette(XCFImage& xcf_image, TQImage& image)
{
for (int i = 0; i < xcf_image.num_colors; i++)
image.setColor(i, xcf_image.palette[i]);
@@ -660,7 +660,7 @@ void XCFImageFormat::setPalette(XCFImage& xcf_image, QImage& image)
/*!
- * Copy the bytes from the tile buffer into the image tile QImage, taking into
+ * Copy the bytes from the tile buffer into the image tile TQImage, taking into
* account all the myriad different modes.
* \param layer layer containing the tile buffer and the image tile matrix.
* \param i column index of current tile.
@@ -730,7 +730,7 @@ void XCFImageFormat::assignImageBytes(Layer& layer, uint i, uint j)
* \param layer the layer to collect the image.
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer)
+bool XCFImageFormat::loadHierarchy(TQDataStream& xcf_io, Layer& layer)
{
Q_INT32 width;
Q_INT32 height;
@@ -758,7 +758,7 @@ bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer)
}
} while (junk != 0);
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
xcf_io.device()->at(offset);
if (!loadLevel(xcf_io, layer, bpp))
@@ -777,7 +777,7 @@ bool XCFImageFormat::loadHierarchy(QDataStream& xcf_io, Layer& layer)
* \return true if there were no I/O errors.
* \sa loadTileRLE().
*/
-bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp)
+bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, Q_INT32 bpp)
{
Q_INT32 width;
Q_INT32 height;
@@ -801,7 +801,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp)
return false;
}
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
Q_UINT32 offset2;
xcf_io >> offset2;
@@ -822,7 +822,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp)
return false;
// The bytes in the layer tile are juggled differently depending on
- // the target QImage. The caller has set layer.assignBytes to the
+ // the target TQImage. The caller has set layer.assignBytes to the
// appropriate routine.
layer.assignBytes(layer, i, j);
@@ -847,7 +847,7 @@ bool XCFImageFormat::loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp)
* \param layer the layer to collect the mask image.
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadMask(QDataStream& xcf_io, Layer& layer)
+bool XCFImageFormat::loadMask(TQDataStream& xcf_io, Layer& layer)
{
Q_INT32 width;
Q_INT32 height;
@@ -906,7 +906,7 @@ bool XCFImageFormat::loadMask(QDataStream& xcf_io, Layer& layer)
* \return true if there were no I/O errors and no obvious corruption of
* the RLE data.
*/
-bool XCFImageFormat::loadTileRLE(QDataStream& xcf_io, uchar* tile, int image_size,
+bool XCFImageFormat::loadTileRLE(TQDataStream& xcf_io, uchar* tile, int image_size,
int data_length, Q_INT32 bpp)
{
uchar* data;
@@ -1012,18 +1012,18 @@ bogus_rle:
* \param layer layer containing the mask channel to collect the properties.
* \return true if there were no I/O errors.
*/
-bool XCFImageFormat::loadChannelProperties(QDataStream& xcf_io, Layer& layer)
+bool XCFImageFormat::loadChannelProperties(TQDataStream& xcf_io, Layer& layer)
{
while (true) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if (!loadProperty(xcf_io, type, bytes)) {
kdDebug(399) << "XCF: error loading channel properties" << endl;
return false;
}
- QDataStream property(bytes, IO_ReadOnly);
+ TQDataStream property(bytes, IO_ReadOnly);
switch (type) {
case PROP_END:
@@ -1059,7 +1059,7 @@ bool XCFImageFormat::loadChannelProperties(QDataStream& xcf_io, Layer& layer)
/*!
- * Copy the bytes from the tile buffer into the mask tile QImage.
+ * Copy the bytes from the tile buffer into the mask tile TQImage.
* \param layer layer containing the tile buffer and the mask tile matrix.
* \param i column index of current tile.
* \param j row index of current tile.
@@ -1078,10 +1078,10 @@ void XCFImageFormat::assignMaskBytes(Layer& layer, uint i, uint j)
/*!
- * Construct the QImage which will eventually be returned to the QImage
+ * Construct the TQImage which will eventually be returned to the QImage
* loader.
*
- * There are a couple of situations which require that the QImage is not
+ * There are a couple of situations which require that the TQImage is not
* exactly the same as The GIMP's representation. The full table is:
* \verbatim
* Grayscale opaque : 8 bpp indexed
@@ -1095,7 +1095,7 @@ void XCFImageFormat::assignMaskBytes(Layer& layer, uint i, uint j)
* \endverbatim
* Whether the image is translucent or not is determined by the bottom layer's
* alpha channel. However, even if the bottom layer lacks an alpha channel,
- * it can still have an opacity < 1. In this case, the QImage is promoted
+ * it can still have an opacity < 1. In this case, the TQImage is promoted
* to 32-bit. (Note this is different from the output from the GIMP image
* exporter, which seems to ignore this attribute.)
*
@@ -1109,7 +1109,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image)
{
// (Aliases to make the code look a little better.)
Layer& layer(xcf_image.layer);
- QImage& image(xcf_image.image);
+ TQImage& image(xcf_image.image);
switch (layer.type) {
case RGB_GIMAGE:
@@ -1165,7 +1165,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image)
if (xcf_image.num_colors <= 2) {
image.create(xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian);
+ TQImage::LittleEndian);
if( image.isNull())
return false;
image.fill(0);
@@ -1173,7 +1173,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image)
} else if (xcf_image.num_colors <= 256) {
image.create(xcf_image.width, xcf_image.height,
8, xcf_image.num_colors,
- QImage::LittleEndian);
+ TQImage::LittleEndian);
if( image.isNull())
return false;
image.fill(0);
@@ -1191,7 +1191,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image)
image.create(xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian);
+ TQImage::LittleEndian);
if( image.isNull())
return false;
image.fill(0);
@@ -1239,7 +1239,7 @@ bool XCFImageFormat::initializeImage(XCFImage& xcf_image)
void XCFImageFormat::copyLayerToImage(XCFImage& xcf_image)
{
Layer& layer(xcf_image.layer);
- QImage& image(xcf_image.image);
+ TQImage& image(xcf_image.image);
PixelCopyOperation copy = 0;
switch (layer.type) {
@@ -1318,7 +1318,7 @@ void XCFImageFormat::copyLayerToImage(XCFImage& xcf_image)
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
@@ -1348,7 +1348,7 @@ void XCFImageFormat::copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = layer.image_tiles[j][i].pixelIndex(k, l);
image.setPixel(m, n, src);
@@ -1369,7 +1369,7 @@ void XCFImageFormat::copyGrayToGray(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
@@ -1391,7 +1391,7 @@ void XCFImageFormat::copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
@@ -1419,7 +1419,7 @@ void XCFImageFormat::copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = layer.image_tiles[j][i].pixelIndex(k, l);
image.setPixel(m, n, src);
@@ -1438,7 +1438,7 @@ void XCFImageFormat::copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, i
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
uchar src = layer.image_tiles[j][i].pixelIndex(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
@@ -1472,7 +1472,7 @@ image.setPixel(m, n, src);
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
@@ -1500,7 +1500,7 @@ void XCFImageFormat::copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int
void XCFImageFormat::mergeLayerIntoImage(XCFImage& xcf_image)
{
Layer& layer(xcf_image.layer);
- QImage& image(xcf_image.image);
+ TQImage& image(xcf_image.image);
PixelMergeOperation merge = 0;
@@ -1581,7 +1581,7 @@ void XCFImageFormat::mergeLayerIntoImage(XCFImage& xcf_image)
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
QRgb dst = image.pixel(m, n);
@@ -1772,7 +1772,7 @@ void XCFImageFormat::mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = layer.image_tiles[j][i].pixelIndex(k, l);
image.setPixel(m, n, src);
@@ -1791,7 +1791,7 @@ void XCFImageFormat::mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = qGray(layer.image_tiles[j][i].pixel(k, l));
int dst = image.pixelIndex(m, n);
@@ -1870,7 +1870,7 @@ void XCFImageFormat::mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.opacity;
@@ -1892,7 +1892,7 @@ void XCFImageFormat::mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = qGray(layer.image_tiles[j][i].pixel(k, l));
int dst = qGray(image.pixel(m, n));
@@ -1981,7 +1981,7 @@ void XCFImageFormat::mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
int src = layer.image_tiles[j][i].pixelIndex(k, l);
image.setPixel(m, n, src);
@@ -2000,7 +2000,7 @@ void XCFImageFormat::mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
uchar src = layer.image_tiles[j][i].pixelIndex(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
@@ -2032,7 +2032,7 @@ void XCFImageFormat::mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n)
+ TQImage& image, int m, int n)
{
QRgb src = layer.image_tiles[j][i].pixel(k, l);
uchar src_a = layer.alpha_tiles[j][i].pixelIndex(k, l);
@@ -2060,7 +2060,7 @@ void XCFImageFormat::mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveRGBPixels ( TQImage& image, int x, int y )
{
// The apparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
@@ -2092,7 +2092,7 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveAlphaPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveAlphaPixels ( TQImage& image, int x, int y )
{
// The apparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
diff --git a/kimgio/xcf.h b/kimgio/xcf.h
index 69b434bd3..3e92f27c2 100644
--- a/kimgio/xcf.h
+++ b/kimgio/xcf.h
@@ -21,17 +21,17 @@
*
*/
-#include <qimage.h>
-#include <qiodevice.h>
-#include <qvaluestack.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqiodevice.h>
+#include <tqvaluestack.h>
+#include <tqvaluevector.h>
#include "gimp.h"
extern "C" {
-void kimgio_xcf_read(QImageIO *);
-void kimgio_xcf_write(QImageIO *);
+void kimgio_xcf_read(TQImageIO *);
+void kimgio_xcf_write(TQImageIO *);
}
const float INCHESPERMETER = (100.0 / 2.54);
@@ -43,14 +43,14 @@ const float INCHESPERMETER = (100.0 / 2.54);
* parallel processing on a tile-by-tile basis. Here, though,
* we just read them in en-masse and store them in a matrix.
*/
-typedef QValueVector<QValueVector<QImage> > Tiles;
+typedef TQValueVector<TQValueVector<TQImage> > Tiles;
class XCFImageFormat {
public:
XCFImageFormat();
- void readXCF(QImageIO* image_io);
+ void readXCF(TQImageIO* image_io);
private:
@@ -60,7 +60,7 @@ private:
* optional alpha channel, there are six possible types altogether.
*
* Note: there is only ever one instance of this structure. The
- * layer info is discarded after it is merged into the final QImage.
+ * layer info is discarded after it is merged into the final TQImage.
*/
class Layer {
public:
@@ -132,13 +132,13 @@ private:
Q_INT32 tattoo; //!< (unique identifier?)
Q_UINT32 unit; //!< Units of The GIMP (inch, mm, pica, etc...)
Q_INT32 num_colors; //!< number of colors in an indexed image
- QValueVector<QRgb> palette; //!< indexed image color palette
+ TQValueVector<QRgb> palette; //!< indexed image color palette
int num_layers; //!< number of layers
Layer layer; //!< most recently read layer
- bool initialized; //!< Is the QImage initialized?
- QImage image; //!< final QImage
+ bool initialized; //!< Is the TQImage initialized?
+ TQImage image; //!< final QImage
XCFImage(void) : initialized(false) {}
};
@@ -155,14 +155,14 @@ private:
//static int add_lut[256][256]; - this is so lame waste of 256k of memory
static int add_lut( int, int );
- //! The bottom-most layer is copied into the final QImage by this
+ //! The bottom-most layer is copied into the final TQImage by this
//! routine.
typedef void (*PixelCopyOperation)(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
- //! Higher layers are merged into the the final QImage by this routine.
+ //! Higher layers are merged into the the final TQImage by this routine.
typedef void (*PixelMergeOperation)(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
//! Layer mode static data.
typedef struct {
@@ -173,59 +173,59 @@ private:
//! LayerModeEffects.
static const LayerModes layer_modes[];
- bool loadImageProperties(QDataStream& xcf_io, XCFImage& image);
- bool loadProperty(QDataStream& xcf_io, PropType& type, QByteArray& bytes);
- bool loadLayer(QDataStream& xcf_io, XCFImage& xcf_image);
- bool loadLayerProperties(QDataStream& xcf_io, Layer& layer);
+ bool loadImageProperties(TQDataStream& xcf_io, XCFImage& image);
+ bool loadProperty(TQDataStream& xcf_io, PropType& type, TQByteArray& bytes);
+ bool loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image);
+ bool loadLayerProperties(TQDataStream& xcf_io, Layer& layer);
bool composeTiles(XCFImage& xcf_image);
- void setGrayPalette(QImage& image);
- void setPalette(XCFImage& xcf_image, QImage& image);
+ void setGrayPalette(TQImage& image);
+ void setPalette(XCFImage& xcf_image, TQImage& image);
static void assignImageBytes(Layer& layer, uint i, uint j);
- bool loadHierarchy(QDataStream& xcf_io, Layer& layer);
- bool loadLevel(QDataStream& xcf_io, Layer& layer, Q_INT32 bpp);
+ bool loadHierarchy(TQDataStream& xcf_io, Layer& layer);
+ bool loadLevel(TQDataStream& xcf_io, Layer& layer, Q_INT32 bpp);
static void assignMaskBytes(Layer& layer, uint i, uint j);
- bool loadMask(QDataStream& xcf_io, Layer& layer);
- bool loadChannelProperties(QDataStream& xcf_io, Layer& layer);
+ bool loadMask(TQDataStream& xcf_io, Layer& layer);
+ bool loadChannelProperties(TQDataStream& xcf_io, Layer& layer);
bool initializeImage(XCFImage& xcf_image);
- bool loadTileRLE(QDataStream& xcf_io, uchar* tile, int size,
+ bool loadTileRLE(TQDataStream& xcf_io, uchar* tile, int size,
int data_length, Q_INT32 bpp);
static void copyLayerToImage(XCFImage& xcf_image);
static void copyRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyGrayToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void copyIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeLayerIntoImage(XCFImage& xcf_image);
static void mergeRGBToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeGrayToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeGrayAToGray(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeGrayToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeGrayAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeIndexedToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeIndexedAToIndexed(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
static void mergeIndexedAToRGB(Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n);
+ TQImage& image, int m, int n);
- static void dissolveRGBPixels(QImage& image, int x, int y);
- static void dissolveAlphaPixels(QImage& image, int x, int y);
+ static void dissolveRGBPixels(TQImage& image, int x, int y);
+ static void dissolveAlphaPixels(TQImage& image, int x, int y);
};
#endif
diff --git a/kimgio/xview.cpp b/kimgio/xview.cpp
index d61a60fde..746ddc6bc 100644
--- a/kimgio/xview.cpp
+++ b/kimgio/xview.cpp
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kdelibs_export.h>
@@ -19,12 +19,12 @@
static const int b_255_3[]= {0,85,170,255}, // index*255/3
rg_255_7[]={0,36,72,109,145,182,218,255}; // index *255/7
-KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio )
+KDE_EXPORT void kimgio_xv_read( TQImageIO *_imageio )
{
int x=-1;
int y=-1;
int maxval=-1;
- QIODevice *iodev = _imageio->ioDevice();
+ TQIODevice *iodev = _imageio->ioDevice();
char str[ BUFSIZE ];
@@ -69,7 +69,7 @@ KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio )
}
// Create the image
- QImage image( x, y, 8, maxval + 1, QImage::BigEndian );
+ TQImage image( x, y, 8, maxval + 1, TQImage::BigEndian );
if( image.isNull()) {
free(block);
return;
@@ -100,13 +100,13 @@ KDE_EXPORT void kimgio_xv_read( QImageIO *_imageio )
return;
}
-KDE_EXPORT void kimgio_xv_write( QImageIO *imageio )
+KDE_EXPORT void kimgio_xv_write( TQImageIO *imageio )
{
- QIODevice& f = *( imageio->ioDevice() );
+ TQIODevice& f = *( imageio->ioDevice() );
// Removed "f.open(...)" and "f.close()" (tanghus)
- const QImage& image = imageio->image();
+ const TQImage& image = imageio->image();
int w = image.width(), h = image.height();
char str[ 1024 ];
diff --git a/kimgio/xview.h b/kimgio/xview.h
index 4d9aa9945..f0b518f70 100644
--- a/kimgio/xview.h
+++ b/kimgio/xview.h
@@ -5,8 +5,8 @@
class QImageIO;
extern "C" {
-void kimgio_xv_read( QImageIO * );
-void kimgio_xv_write( QImageIO * );
+void kimgio_xv_read( TQImageIO * );
+void kimgio_xv_write( TQImageIO * );
}
#endif
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 7780f793c..c4dcbb543 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -30,13 +30,13 @@
class AutoStartItem
{
public:
- QString name;
- QString service;
- QString startAfter;
+ TQString name;
+ TQString service;
+ TQString startAfter;
int phase;
};
-class AutoStartList: public QPtrList<AutoStartItem>
+class AutoStartList: public TQPtrList<AutoStartItem>
{
public:
AutoStartList() { }
@@ -48,12 +48,12 @@ AutoStart::AutoStart( bool new_startup )
m_startList = new AutoStartList;
m_startList->setAutoDelete(true);
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
- QString xdgdirs = getenv("XDG_CONFIG_DIRS");
+ TQString xdgdirs = getenv("XDG_CONFIG_DIRS");
if (xdgdirs.isEmpty())
xdgdirs = "/etc/xdg";
- QStringList xdgdirslist = QStringList::split( ':', xdgdirs );
- for ( QStringList::Iterator itr = xdgdirslist.begin(); itr != xdgdirslist.end(); ++itr ) {
+ TQStringList xdgdirslist = TQStringList::split( ':', xdgdirs );
+ for ( TQStringList::Iterator itr = xdgdirslist.begin(); itr != xdgdirslist.end(); ++itr ) {
KGlobal::dirs()->addResourceDir("autostart", (*itr) +"/autostart");
}
}
@@ -78,7 +78,7 @@ void AutoStart::setPhaseDone()
m_phasedone = true;
}
-static QString extractName(QString path)
+static TQString extractName(TQString path)
{
int i = path.findRev('/');
if (i >= 0)
@@ -89,12 +89,12 @@ static QString extractName(QString path)
return path;
}
-static bool startCondition(const QString &condition)
+static bool startCondition(const TQString &condition)
{
if (condition.isEmpty())
return true;
- QStringList list = QStringList::split(':', condition, true);
+ TQStringList list = TQStringList::split(':', condition, true);
if (list.count() < 4)
return true;
if (list[0].isEmpty() || list[2].isEmpty())
@@ -112,9 +112,9 @@ static bool startCondition(const QString &condition)
void
AutoStart::loadAutoStartList()
{
- QStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
+ TQStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
- for(QStringList::ConstIterator it = files.begin();
+ for(TQStringList::ConstIterator it = files.begin();
it != files.end();
++it)
{
@@ -167,7 +167,7 @@ AutoStart::startService()
{
// Check for items that depend on previously started items
- QString lastItem = m_started[0];
+ TQString lastItem = m_started[0];
for(AutoStartItem *item = m_startList->first();
item; item = m_startList->next())
{
@@ -175,7 +175,7 @@ AutoStart::startService()
&& item->startAfter == lastItem)
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
@@ -192,7 +192,7 @@ AutoStart::startService()
&& item->startAfter.isEmpty())
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
@@ -205,7 +205,7 @@ AutoStart::startService()
if (item->phase == m_phase)
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
diff --git a/kinit/autostart.h b/kinit/autostart.h
index a10bfa0dd..ce2efe2da 100644
--- a/kinit/autostart.h
+++ b/kinit/autostart.h
@@ -20,7 +20,7 @@
#ifndef _AUTOSTART_H_
#define _AUTOSTART_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
class AutoStartList;
@@ -31,7 +31,7 @@ public:
~AutoStart();
void loadAutoStartList();
- QString startService();
+ TQString startService();
void setPhase(int phase);
void setPhaseDone();
int phase() const { return m_phase; }
@@ -40,7 +40,7 @@ public:
private:
bool m_newStartup;
AutoStartList *m_startList;
- QStringList m_started;
+ TQStringList m_started;
int m_phase;
bool m_phasedone;
};
diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp
index a0e9ccf43..b9885453b 100644
--- a/kinit/kdostartupconfig.cpp
+++ b/kinit/kdostartupconfig.cpp
@@ -26,20 +26,20 @@ DEALINGS IN THE SOFTWARE.
// See description in kstartupconfig.cpp .
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kinstance.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <kdebug.h>
-QString get_entry( QString* ll )
+TQString get_entry( TQString* ll )
{
- QString& l = *ll;
+ TQString& l = *ll;
l = l.stripWhiteSpace();
if( l.isEmpty())
- return QString::null;
- QString ret;
+ return TQString::null;
+ TQString ret;
if( l[ 0 ] == '\'' )
{
unsigned int pos = 1;
@@ -47,8 +47,8 @@ QString get_entry( QString* ll )
ret += l[ pos++ ];
if( pos >= l.length())
{
- *ll = QString::null;
- return QString::null;
+ *ll = TQString::null;
+ return TQString::null;
}
*ll = l.mid( pos + 1 );
return ret;
@@ -64,29 +64,29 @@ int main()
{
KInstance inst( "kdostartupconfig" );
kdDebug() << "Running kdostartupconfig." << endl;
- QString keysname = locateLocal( "config", "startupconfigkeys" );
- QFile keys( keysname );
+ TQString keysname = locateLocal( "config", "startupconfigkeys" );
+ TQFile keys( keysname );
if( !keys.open( IO_ReadOnly ))
return 3;
- QFile f1( locateLocal( "config", "startupconfig" ));
+ TQFile f1( locateLocal( "config", "startupconfig" ));
if( !f1.open( IO_WriteOnly ))
return 4;
- QFile f2( locateLocal( "config", "startupconfigfiles" ));
+ TQFile f2( locateLocal( "config", "startupconfigfiles" ));
if( !f2.open( IO_WriteOnly ))
return 5;
- QTextStream startupconfig( &f1 );
- QTextStream startupconfigfiles( &f2 );
+ TQTextStream startupconfig( &f1 );
+ TQTextStream startupconfigfiles( &f2 );
startupconfig << "#! /bin/sh\n";
for(;;)
{
- QString line;
+ TQString line;
if( keys.readLine( line, 1024 ) < 0 )
break;
line = line.stripWhiteSpace();
if( line.isEmpty())
break;
- QString tmp = line;
- QString file, group, key, def;
+ TQString tmp = line;
+ TQString file, group, key, def;
file = get_entry( &tmp );
group = get_entry( &tmp );
key = get_entry( &tmp );
@@ -97,14 +97,14 @@ int main()
{ // whole config group
KConfig cfg( file );
group = group.mid( 1, group.length() - 2 );
- QMap< QString, QString > entries = cfg.entryMap( group );
+ TQMap< TQString, TQString > entries = cfg.entryMap( group );
startupconfig << "# " << line << "\n";
- for( QMap< QString, QString >::ConstIterator it = entries.begin();
+ for( TQMap< TQString, TQString >::ConstIterator it = entries.begin();
it != entries.end();
++it )
{
- QString key = it.key();
- QString value = *it;
+ TQString key = it.key();
+ TQString value = *it;
startupconfig << file.replace( ' ', '_' ).lower()
<< "_" << group.replace( ' ', '_' ).lower()
<< "_" << key.replace( ' ', '_' ).lower()
@@ -117,7 +117,7 @@ int main()
return 7;
KConfig cfg( file );
cfg.setGroup( group );
- QString value = cfg.readEntry( key, def );
+ TQString value = cfg.readEntry( key, def );
startupconfig << "# " << line << "\n";
startupconfig << file.replace( ' ', '_' ).lower()
<< "_" << group.replace( ' ', '_' ).lower()
@@ -126,12 +126,12 @@ int main()
}
startupconfigfiles << line << endl;
// use even currently non-existing paths in $KDEDIRS
- QStringList dirs = QStringList::split( KPATH_SEPARATOR, KGlobal::dirs()->kfsstnd_prefixes());
- for( QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( KPATH_SEPARATOR, KGlobal::dirs()->kfsstnd_prefixes());
+ for( TQStringList::ConstIterator it = dirs.begin();
it != dirs.end();
++it )
{
- QString cfg = *it + "share/config/" + file;
+ TQString cfg = *it + "share/config/" + file;
if( KStandardDirs::exists( cfg ))
startupconfigfiles << cfg << "\n";
else
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index 77608b94b..f34a6a219 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -45,13 +45,13 @@
#include <unistd.h>
#include <locale.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqfont.h>
#include <kinstance.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -153,7 +153,7 @@ static struct {
int (*launcher_func)(int);
bool debug_wait;
int lt_dlopen_flag;
- QCString errorMsg;
+ TQCString errorMsg;
bool launcher_ok;
bool suicide;
} d;
@@ -236,10 +236,10 @@ static void close_fds()
signal(SIGPIPE, SIG_DFL);
}
-static void exitWithErrorMsg(const QString &errorMsg)
+static void exitWithErrorMsg(const TQString &errorMsg)
{
fprintf( stderr, "%s\n", errorMsg.local8Bit().data() );
- QCString utf8ErrorMsg = errorMsg.utf8();
+ TQCString utf8ErrorMsg = errorMsg.utf8();
d.result = 3; // Error with msg
write(d.fd[1], &d.result, 1);
int l = utf8ErrorMsg.length();
@@ -355,24 +355,24 @@ static void complete_startup_info( KStartupInfoId& id, pid_t pid )
}
#endif
-QCString execpath_avoid_loops( const QCString& exec, int envc, const char* envs, bool avoid_loops )
+TQCString execpath_avoid_loops( const TQCString& exec, int envc, const char* envs, bool avoid_loops )
{
- QStringList paths;
+ TQStringList paths;
if( envc > 0 ) /* use the passed environment */
{
const char* path = get_env_var( "PATH=", envc, envs );
if( path != NULL )
- paths = QStringList::split( QRegExp( "[:\b]" ), path, true );
+ paths = TQStringList::split( TQRegExp( "[:\b]" ), path, true );
}
else
- paths = QStringList::split( QRegExp( "[:\b]" ), getenv( "PATH" ), true );
- QCString execpath = QFile::encodeName(
- s_instance->dirs()->findExe( exec, paths.join( QString( ":" ))));
+ paths = TQStringList::split( TQRegExp( "[:\b]" ), getenv( "PATH" ), true );
+ TQCString execpath = TQFile::encodeName(
+ s_instance->dirs()->findExe( exec, paths.join( TQString( ":" ))));
if( avoid_loops && !execpath.isEmpty())
{
int pos = execpath.findRev( '/' );
- QString bin_path = execpath.left( pos );
- for( QStringList::Iterator it = paths.begin();
+ TQString bin_path = execpath.left( pos );
+ for( TQStringList::Iterator it = paths.begin();
it != paths.end();
++it )
if( ( *it ) == bin_path || ( *it ) == bin_path + '/' )
@@ -380,8 +380,8 @@ QCString execpath_avoid_loops( const QCString& exec, int envc, const char* envs,
paths.remove( it );
break; // -->
}
- execpath = QFile::encodeName(
- s_instance->dirs()->findExe( exec, paths.join( QString( ":" ))));
+ execpath = TQFile::encodeName(
+ s_instance->dirs()->findExe( exec, paths.join( TQString( ":" ))));
}
return execpath;
}
@@ -425,9 +425,9 @@ static pid_t launch(int argc, const char *_name, const char *args,
const char* startup_id_str = "0" )
{
int launcher = 0;
- QCString lib;
- QCString name;
- QCString exec;
+ TQCString lib;
+ TQCString name;
+ TQCString exec;
if (strcmp(_name, "klauncher") == 0) {
/* klauncher is launched in a special way:
@@ -441,15 +441,15 @@ static pid_t launch(int argc, const char *_name, const char *args,
launcher = 1;
}
- QCString libpath;
- QCString execpath;
+ TQCString libpath;
+ TQCString execpath;
if (_name[0] != '/')
{
/* Relative name without '.la' */
name = _name;
lib = name + ".la";
exec = name;
- libpath = QFile::encodeName(KLibLoader::findLibrary( lib, s_instance ));
+ libpath = TQFile::encodeName(KLibLoader::findLibrary( lib, s_instance ));
execpath = execpath_avoid_loops( exec, envc, envs, avoid_loops );
}
else
@@ -525,16 +525,16 @@ static pid_t launch(int argc, const char *_name, const char *args,
if( reset_env ) // KWRAPPER/SHELL
{
- QStrList unset_envs;
+ TQStrList unset_envs;
for( int tmp_env_count = 0;
environ[tmp_env_count];
tmp_env_count++)
unset_envs.append( environ[ tmp_env_count ] );
- for( QStrListIterator it( unset_envs );
+ for( TQStrListIterator it( unset_envs );
it.current() != NULL ;
++it )
{
- QCString tmp( it.current());
+ TQCString tmp( it.current());
int pos = tmp.find( '=' );
if( pos >= 0 )
unsetenv( tmp.left( pos ));
@@ -557,7 +557,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
#endif
{
int r;
- QCString procTitle;
+ TQCString procTitle;
d.argv = (char **) malloc(sizeof(char *) * (argc+1));
d.argv[0] = (char *) _name;
for (int i = 1; i < argc; i++)
@@ -586,7 +586,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.handle = 0;
if (libpath.isEmpty() && execpath.isEmpty())
{
- QString errorMsg = i18n("Could not find '%1' executable.").arg(QFile::decodeName(_name));
+ TQString errorMsg = i18n("Could not find '%1' executable.").arg(TQFile::decodeName(_name));
exitWithErrorMsg(errorMsg);
}
@@ -595,15 +595,15 @@ static pid_t launch(int argc, const char *_name, const char *args,
if ( !libpath.isEmpty() )
{
- d.handle = lt_dlopen( QFile::encodeName(libpath) );
+ d.handle = lt_dlopen( TQFile::encodeName(libpath) );
if (!d.handle )
{
const char * ltdlError = lt_dlerror();
if (execpath.isEmpty())
{
// Error
- QString errorMsg = i18n("Could not open library '%1'.\n%2").arg(QFile::decodeName(libpath))
- .arg(ltdlError ? QFile::decodeName(ltdlError) : i18n("Unknown error"));
+ TQString errorMsg = i18n("Could not open library '%1'.\n%2").arg(TQFile::decodeName(libpath))
+ .arg(ltdlError ? TQFile::decodeName(ltdlError) : i18n("Unknown error"));
exitWithErrorMsg(errorMsg);
}
else
@@ -645,8 +645,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
{
const char * ltdlError = lt_dlerror();
fprintf(stderr, "Could not find kdemain: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
- QString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
- .arg(ltdlError ? QFile::decodeName(ltdlError) : i18n("Unknown error"));
+ TQString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
+ .arg(ltdlError ? TQFile::decodeName(ltdlError) : i18n("Unknown error"));
exitWithErrorMsg(errorMsg);
}
}
@@ -701,7 +701,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.n = read(d.fd[0], &l, sizeof(int));
if (d.n == sizeof(int))
{
- QCString tmp;
+ TQCString tmp;
tmp.resize(l+1);
d.n = read(d.fd[0], tmp.data(), l);
tmp[l] = 0;
@@ -837,8 +837,8 @@ static void init_kdeinit_socket()
chdir(home_dir);
{
- QCString path = home_dir;
- QCString readOnly = getenv("KDE_HOME_READONLY");
+ TQCString path = home_dir;
+ TQCString readOnly = getenv("KDE_HOME_READONLY");
if (access(path.data(), R_OK|W_OK))
{
if (errno == ENOENT)
@@ -1226,8 +1226,8 @@ static void handle_launcher_request(int sock = -1)
}
// support for the old a bit broken way of setting DISPLAY for multihead
- QCString olddisplay = getenv(DISPLAY);
- QCString kdedisplay = getenv("KDE_DISPLAY");
+ TQCString olddisplay = getenv(DISPLAY);
+ TQCString kdedisplay = getenv("KDE_DISPLAY");
bool reset_display = (! olddisplay.isEmpty() &&
! kdedisplay.isEmpty() &&
olddisplay != kdedisplay);
@@ -1465,18 +1465,18 @@ static void handle_requests(pid_t waitForPid)
static void kdeinit_library_path()
{
- QStringList ltdl_library_path =
- QStringList::split(':', QFile::decodeName(getenv("LTDL_LIBRARY_PATH")));
- QStringList ld_library_path =
- QStringList::split(':', QFile::decodeName(getenv("LD_LIBRARY_PATH")));
-
- QCString extra_path;
- QStringList candidates = s_instance->dirs()->resourceDirs("lib");
- for (QStringList::ConstIterator it = candidates.begin();
+ TQStringList ltdl_library_path =
+ TQStringList::split(':', TQFile::decodeName(getenv("LTDL_LIBRARY_PATH")));
+ TQStringList ld_library_path =
+ TQStringList::split(':', TQFile::decodeName(getenv("LD_LIBRARY_PATH")));
+
+ TQCString extra_path;
+ TQStringList candidates = s_instance->dirs()->resourceDirs("lib");
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end();
it++)
{
- QString d = *it;
+ TQString d = *it;
if (ltdl_library_path.contains(d))
continue;
if (ld_library_path.contains(d))
@@ -1492,7 +1492,7 @@ static void kdeinit_library_path()
if ((d == "/lib") || (d == "/usr/lib"))
continue;
- QCString dir = QFile::encodeName(d);
+ TQCString dir = TQFile::encodeName(d);
if (access(dir, R_OK))
continue;
@@ -1510,7 +1510,7 @@ static void kdeinit_library_path()
if (!extra_path.isEmpty())
lt_dlsetsearchpath(extra_path.data());
- QCString display = getenv(DISPLAY);
+ TQCString display = getenv(DISPLAY);
if (display.isEmpty())
{
fprintf(stderr, "kdeinit: Aborting. $"DISPLAY" is not set.\n");
@@ -1520,7 +1520,7 @@ static void kdeinit_library_path()
if((i = display.findRev('.')) > display.findRev(':') && i >= 0)
display.truncate(i);
- QCString socketName = QFile::encodeName(locateLocal("socket", QString("kdeinit-%1").arg(display), s_instance));
+ TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit-%1").arg(display), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
fprintf(stderr, "kdeinit: Aborting. Socket name will be too long:\n");
@@ -1530,7 +1530,7 @@ static void kdeinit_library_path()
strcpy(sock_file_old, socketName.data());
display.replace(":","_");
- socketName = QFile::encodeName(locateLocal("socket", QString("kdeinit_%1").arg(display), s_instance));
+ socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit_%1").arg(display), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
fprintf(stderr, "kdeinit: Aborting. Socket name will be too long:\n");
@@ -1806,9 +1806,9 @@ int main(int argc, char **argv, char **envp)
#ifndef __CYGWIN__
if (!d.suicide && !getenv("KDE_IS_PRELINKED"))
{
- QString konq = locate("lib", "libkonq.la", s_instance);
+ TQString konq = locate("lib", "libkonq.la", s_instance);
if (!konq.isEmpty())
- (void) lt_dlopen(QFile::encodeName(konq).data());
+ (void) lt_dlopen(TQFile::encodeName(konq).data());
}
#endif
if (launch_klauncher)
@@ -1836,13 +1836,13 @@ int main(int argc, char **argv, char **envp)
XftInitFtLibrary();
}
#endif
- QFont::initialize();
+ TQFont::initialize();
setlocale (LC_ALL, "");
setlocale (LC_NUMERIC, "C");
#ifdef Q_WS_X11
if (XSupportsLocale ())
{
- // Similar to QApplication::create_xim()
+ // Similar to TQApplication::create_xim()
// but we need to use our own display
XOpenIM (X11display, 0, 0, 0);
}
diff --git a/kinit/kioslave.cpp b/kinit/kioslave.cpp
index 0195f2867..215f53c67 100644
--- a/kinit/kioslave.cpp
+++ b/kinit/kioslave.cpp
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <errno.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "ltdl.h"
@@ -58,7 +58,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Usage: kioslave <slave-lib> <protocol> <klauncher-socket> <app-socket>\n\nThis program is part of KDE.\n");
exit(1);
}
- QCString libpath = argv[1];
+ TQCString libpath = argv[1];
if (libpath.isEmpty())
{
diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp
index ae4692d60..2b49a0ac8 100644
--- a/kinit/klauncher.cpp
+++ b/kinit/klauncher.cpp
@@ -27,7 +27,7 @@
#include <signal.h>
#include <sys/time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -63,13 +63,13 @@
using namespace KIO;
-template class QPtrList<KLaunchRequest>;
-template class QPtrList<IdleSlave>;
+template class TQPtrList<KLaunchRequest>;
+template class TQPtrList<IdleSlave>;
IdleSlave::IdleSlave(KSocket *socket)
{
mConn.init(socket);
- mConn.connect(this, SLOT(gotInput()));
+ mConn.connect(this, TQT_SLOT(gotInput()));
mConn.send( CMD_SLAVE_STATUS );
mPid = 0;
mBirthDate = time(0);
@@ -80,7 +80,7 @@ void
IdleSlave::gotInput()
{
int cmd;
- QByteArray data;
+ TQByteArray data;
if (mConn.read( &cmd, data) == -1)
{
// Communication problem with slave.
@@ -98,10 +98,10 @@ IdleSlave::gotInput()
}
else
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
pid_t pid;
- QCString protocol;
- QString host;
+ TQCString protocol;
+ TQString host;
Q_INT8 b;
stream >> pid >> protocol >> host >> b;
// Overload with (bool) onHold, (KURL) url.
@@ -122,10 +122,10 @@ IdleSlave::gotInput()
}
void
-IdleSlave::connect(const QString &app_socket)
+IdleSlave::connect(const TQString &app_socket)
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly);
stream << app_socket;
mConn.send( CMD_SLAVE_CONNECT, data );
// Timeout!
@@ -138,7 +138,7 @@ IdleSlave::reparseConfiguration()
}
bool
-IdleSlave::match(const QString &protocol, const QString &host, bool connected)
+IdleSlave::match(const TQString &protocol, const TQString &host, bool connected)
{
if (mOnHold) return false;
if (protocol != mProtocol) return false;
@@ -171,17 +171,17 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
#ifdef Q_WS_X11
mCached_dpy = NULL;
#endif
- connect(&mAutoTimer, SIGNAL(timeout()), this, SLOT(slotAutoStart()));
+ connect(&mAutoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoStart()));
requestList.setAutoDelete(true);
mSlaveWaitRequest.setAutoDelete(true);
dcopClient()->setNotifications( true );
- connect(dcopClient(), SIGNAL( applicationRegistered( const QCString &)),
- this, SLOT( slotAppRegistered( const QCString &)));
+ connect(dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString &)),
+ this, TQT_SLOT( slotAppRegistered( const TQCString &)));
dcopClient()->connectDCOPSignal( "DCOPServer", "", "terminateKDE()",
objId(), "terminateKDE()", false );
- QString prefix = locateLocal("socket", "klauncher");
- KTempFile domainname(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", "klauncher");
+ KTempFile domainname(prefix, TQString::fromLatin1(".slave-socket"));
if (domainname.status() != 0)
{
// Sever error!
@@ -193,15 +193,15 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
domainname.close();
domainname.unlink();
#endif
- mPoolSocket = new KServerSocket(QFile::encodeName(mPoolSocketName));
- connect(mPoolSocket, SIGNAL(accepted( KSocket *)),
- SLOT(acceptSlave(KSocket *)));
+ mPoolSocket = new KServerSocket(TQFile::encodeName(mPoolSocketName));
+ connect(mPoolSocket, TQT_SIGNAL(accepted( KSocket *)),
+ TQT_SLOT(acceptSlave(KSocket *)));
- connect(&mTimer, SIGNAL(timeout()), SLOT(idleTimeout()));
+ connect(&mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleTimeout()));
- kdeinitNotifier = new QSocketNotifier(kdeinitSocket, QSocketNotifier::Read);
- connect(kdeinitNotifier, SIGNAL( activated( int )),
- this, SLOT( slotKDEInitData( int )));
+ kdeinitNotifier = new TQSocketNotifier(kdeinitSocket, TQSocketNotifier::Read);
+ connect(kdeinitNotifier, TQT_SIGNAL( activated( int )),
+ this, TQT_SLOT( slotKDEInitData( int )));
kdeinitNotifier->setEnabled( true );
lastRequest = 0;
bProcessingQueue = false;
@@ -232,7 +232,7 @@ void KLauncher::close()
{
if (!mPoolSocketName.isEmpty())
{
- QCString filename = QFile::encodeName(mPoolSocketName);
+ TQCString filename = TQFile::encodeName(mPoolSocketName);
unlink(filename.data());
}
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
@@ -251,65 +251,65 @@ KLauncher::destruct(int exit_code)
}
bool
-KLauncher::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+KLauncher::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
- if ((fun == "exec_blind(QCString,QValueList<QCString>)")
- || (fun == "exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)"))
+ if ((fun == "exec_blind(TQCString,TQValueList<TQCString>)")
+ || (fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)"))
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
replyType = "void";
- QCString name;
- QValueList<QCString> arg_list;
- QCString startup_id = "0";
- QValueList<QCString> envs;
+ TQCString name;
+ TQValueList<TQCString> arg_list;
+ TQCString startup_id = "0";
+ TQValueList<TQCString> envs;
stream >> name >> arg_list;
- if( fun == "exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)" )
+ if( fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)" )
stream >> envs >> startup_id;
kdDebug(7016) << "KLauncher: Got exec_blind('" << name << "', ...)" << endl;
exec_blind( name, arg_list, envs, startup_id);
return true;
}
- if ((fun == "start_service_by_name(QString,QStringList)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList)")||
- (fun == "start_service_by_desktop_name(QString,QStringList)")||
- (fun == "kdeinit_exec(QString,QStringList)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList)") ||
- (fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)"))
+ if ((fun == "start_service_by_name(TQString,TQStringList)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList)")||
+ (fun == "kdeinit_exec(TQString,TQStringList)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList)") ||
+ (fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
bool bNoWait = false;
- QString serviceName;
- QStringList urls;
- QValueList<QCString> envs;
- QCString startup_id = "";
+ TQString serviceName;
+ TQStringList urls;
+ TQValueList<TQCString> envs;
+ TQCString startup_id = "";
DCOPresult.result = -1;
DCOPresult.dcopName = 0;
- DCOPresult.error = QString::null;
+ DCOPresult.error = TQString::null;
DCOPresult.pid = 0;
stream >> serviceName >> urls;
- if ((fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)"))
+ if ((fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)"))
stream >> envs >> startup_id >> bNoWait;
- else if ((fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
stream >> envs >> startup_id;
- else if ((fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)"))
stream >> envs;
- else if ((fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
stream >> envs >> startup_id;
bool finished;
if (strncmp(fun, "start_service_by_name(", 22) == 0)
@@ -327,9 +327,9 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
kdDebug(7016) << "KLauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl;
finished = start_service_by_desktop_name(serviceName, urls, envs, startup_id, bNoWait );
}
- else if ((fun == "kdeinit_exec(QString,QStringList)")
- || (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)")
- || (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList)")
+ || (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)")
+ || (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
{
kdDebug(7016) << "KLauncher: Got kdeinit_exec('" << serviceName << "', ...)" << endl;
finished = kdeinit_exec(serviceName, urls, envs, startup_id, false);
@@ -342,40 +342,40 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
if (!finished)
{
replyType = "serviceResult";
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << DCOPresult.result << DCOPresult.dcopName << DCOPresult.error << DCOPresult.pid;
}
return true;
}
- else if (fun == "requestSlave(QString,QString,QString)")
+ else if (fun == "requestSlave(TQString,TQString,TQString)")
{
- QDataStream stream(data, IO_ReadOnly);
- QString protocol;
- QString host;
- QString app_socket;
+ TQDataStream stream(data, IO_ReadOnly);
+ TQString protocol;
+ TQString host;
+ TQString app_socket;
stream >> protocol >> host >> app_socket;
- replyType = "QString";
- QString error;
+ replyType = "TQString";
+ TQString error;
pid_t pid = requestSlave(protocol, host, app_socket, error);
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << pid << error;
return true;
}
- else if (fun == "requestHoldSlave(KURL,QString)")
+ else if (fun == "requestHoldSlave(KURL,TQString)")
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
KURL url;
- QString app_socket;
+ TQString app_socket;
stream >> url >> app_socket;
replyType = "pid_t";
pid_t pid = requestHoldSlave(url, app_socket);
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << pid;
return true;
}
else if (fun == "waitForSlave(pid_t)")
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
pid_t pid;
stream >> pid;
waitForSlave(pid);
@@ -383,11 +383,11 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
return true;
}
- else if (fun == "setLaunchEnv(QCString,QCString)")
+ else if (fun == "setLaunchEnv(TQCString,TQCString)")
{
- QDataStream stream(data, IO_ReadOnly);
- QCString name;
- QCString value;
+ TQDataStream stream(data, IO_ReadOnly);
+ TQCString name;
+ TQCString value;
stream >> name >> value;
setLaunchEnv(name, value);
replyType = "void";
@@ -425,7 +425,7 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
else if (fun == "autoStart(int)")
{
kdDebug() << "KLauncher::process ---> autoStart(int)" << endl;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
int phase;
stream >> phase;
autoStart(phase);
@@ -453,25 +453,25 @@ QCStringList
KLauncher::functions()
{
QCStringList funcs = DCOPObject::functions();
- funcs << "void exec_blind(QCString,QValueList<QCString>)";
- funcs << "void exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_name(QString,QStringList)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList)";
- funcs << "serviceResult kdeinit_exec(QString,QStringList)";
- funcs << "serviceResult kdeinit_exec_wait(QString,QStringList)";
- funcs << "serviceResult start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult kdeinit_exec(QString,QStringList,QValueList<QCString>)";
- funcs << "serviceResult kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)";
- funcs << "QString requestSlave(QString,QString,QString)";
- funcs << "pid_t requestHoldSlave(KURL,QString)";
+ funcs << "void exec_blind(TQCString,TQValueList<TQCString>)";
+ funcs << "void exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList)";
+ funcs << "serviceResult kdeinit_exec(TQString,TQStringList)";
+ funcs << "serviceResult kdeinit_exec_wait(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)";
+ funcs << "serviceResult kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)";
+ funcs << "TQString requestSlave(TQString,TQString,TQString)";
+ funcs << "pid_t requestHoldSlave(KURL,TQString)";
funcs << "void waitForSlave(pid_t)";
- funcs << "void setLaunchEnv(QCString,QCString)";
+ funcs << "void setLaunchEnv(TQCString,TQCString)";
funcs << "void reparseConfiguration()";
// funcs << "void terminateKDE()";
funcs << "void autoStart()";
@@ -479,13 +479,13 @@ KLauncher::functions()
return funcs;
}
-void KLauncher::setLaunchEnv(const QCString &name, const QCString &_value)
+void KLauncher::setLaunchEnv(const TQCString &name, const TQCString &_value)
{
- QCString value(_value);
+ TQCString value(_value);
if (value.isNull())
value = "";
klauncher_header request_header;
- QByteArray requestData(name.length()+value.length()+2);
+ TQByteArray requestData(name.length()+value.length()+2);
memcpy(requestData.data(), name.data(), name.length()+1);
memcpy(requestData.data()+name.length()+1, value.data(), value.length()+1);
request_header.cmd = LAUNCHER_SETENV;
@@ -524,7 +524,7 @@ void
KLauncher::slotKDEInitData(int)
{
klauncher_header request_header;
- QByteArray requestData;
+ TQByteArray requestData;
if( dontBlockReading )
{
// in case we get a request to start an application and data arrive
@@ -600,7 +600,7 @@ KLauncher::slotKDEInitData(int)
{
lastRequest->status = KLaunchRequest::Error;
if (!requestData.isEmpty())
- lastRequest->errorMsg = QString::fromUtf8((char *) requestData.data());
+ lastRequest->errorMsg = TQString::fromUtf8((char *) requestData.data());
lastRequest = 0;
return;
}
@@ -631,7 +631,7 @@ KLauncher::processDied(pid_t pid, long /* exitStatus */)
}
void
-KLauncher::slotAppRegistered(const QCString &appId)
+KLauncher::slotAppRegistered(const TQCString &appId)
{
const char *cAppId = appId.data();
if (!cAppId) return;
@@ -694,7 +694,7 @@ KLauncher::slotAutoStart()
KService::Ptr s;
do
{
- QString service = mAutoStart.startService();
+ TQString service = mAutoStart.startService();
if (service.isEmpty())
{
// Done
@@ -704,24 +704,24 @@ KLauncher::slotAutoStart()
// Emit signal
if( newStartup )
{
- QCString autoStartSignal;
+ TQCString autoStartSignal;
autoStartSignal.sprintf( "autoStart%dDone()", mAutoStart.phase());
- emitDCOPSignal(autoStartSignal, QByteArray());
+ emitDCOPSignal(autoStartSignal, TQByteArray());
}
else
{
- QCString autoStartSignal( "autoStartDone()" );
+ TQCString autoStartSignal( "autoStartDone()" );
int phase = mAutoStart.phase();
if ( phase > 1 )
autoStartSignal.sprintf( "autoStart%dDone()", phase );
- emitDCOPSignal(autoStartSignal, QByteArray());
+ emitDCOPSignal(autoStartSignal, TQByteArray());
}
}
return;
}
s = new KService(service);
}
- while (!start_service(s, QStringList(), QValueList<QCString>(), "0", false, true));
+ while (!start_service(s, TQStringList(), TQValueList<TQCString>(), "0", false, true));
// Loop till we find a service that we can start.
}
@@ -733,7 +733,7 @@ KLauncher::requestDone(KLaunchRequest *request)
{
DCOPresult.result = 0;
DCOPresult.dcopName = request->dcop_name;
- DCOPresult.error = QString::null;
+ DCOPresult.error = TQString::null;
DCOPresult.pid = request->pid;
}
else
@@ -775,10 +775,10 @@ KLauncher::requestDone(KLaunchRequest *request)
if (request->transaction)
{
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
replyType = "serviceResult";
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << DCOPresult.result << DCOPresult.dcopName << DCOPresult.error << DCOPresult.pid;
dcopClient()->endTransaction( request->transaction,
replyType, replyData);
@@ -792,18 +792,18 @@ KLauncher::requestStart(KLaunchRequest *request)
requestList.append( request );
// Send request to kdeinit.
klauncher_header request_header;
- QByteArray requestData;
+ TQByteArray requestData;
int length = 0;
length += sizeof(long); // Nr of. Args
length += request->name.length() + 1; // Cmd
- for(QValueList<QCString>::Iterator it = request->arg_list.begin();
+ for(TQValueList<TQCString>::Iterator it = request->arg_list.begin();
it != request->arg_list.end();
it++)
{
length += (*it).length() + 1; // Args...
}
length += sizeof(long); // Nr of. envs
- for(QValueList<QCString>::ConstIterator it = request->envs.begin();
+ for(TQValueList<TQCString>::ConstIterator it = request->envs.begin();
it != request->envs.end();
it++)
{
@@ -826,7 +826,7 @@ KLauncher::requestStart(KLaunchRequest *request)
p += sizeof(long);
strcpy(p, request->name.data());
p += strlen(p) + 1;
- for(QValueList<QCString>::Iterator it = request->arg_list.begin();
+ for(TQValueList<TQCString>::Iterator it = request->arg_list.begin();
it != request->arg_list.end();
it++)
{
@@ -836,7 +836,7 @@ KLauncher::requestStart(KLaunchRequest *request)
l = request->envs.count();
memcpy(p, &l, sizeof(long));
p += sizeof(long);
- for(QValueList<QCString>::ConstIterator it = request->envs.begin();
+ for(TQValueList<TQCString>::ConstIterator it = request->envs.begin();
it != request->envs.end();
it++)
{
@@ -878,8 +878,8 @@ KLauncher::requestStart(KLaunchRequest *request)
}
void
-KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_list,
- const QValueList<QCString> &envs, const QCString& startup_id )
+KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id )
{
KLaunchRequest *request = new KLaunchRequest;
request->autoStart = false;
@@ -895,7 +895,7 @@ KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_lis
KService::Ptr service = KService::serviceByDesktopName( name.mid( name.findRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
- startup_id, QValueList< QCString >());
+ startup_id, TQValueList< TQCString >());
else // no .desktop file, no startup info
cancel_service_startup_info( request, startup_id, envs );
@@ -906,8 +906,8 @@ KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_lis
bool
-KLauncher::start_service_by_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -923,8 +923,8 @@ KLauncher::start_service_by_name(const QString &serviceName, const QStringList &
}
bool
-KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -948,8 +948,8 @@ KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStri
}
bool
-KLauncher::start_service_by_desktop_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -965,10 +965,10 @@ KLauncher::start_service_by_desktop_name(const QString &serviceName, const QStri
}
bool
-KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind, bool autoStart)
+KLauncher::start_service(KService::Ptr service, const TQStringList &_urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind, bool autoStart)
{
- QStringList urls = _urls;
+ TQStringList urls = _urls;
if (!service->isValid())
{
DCOPresult.result = ENOEXEC;
@@ -986,19 +986,19 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
// For the first file we launch the application in the
// usual way. The reported result is based on this
// application.
- QStringList::ConstIterator it = urls.begin();
+ TQStringList::ConstIterator it = urls.begin();
for(++it;
it != urls.end();
++it)
{
- QStringList singleUrl;
+ TQStringList singleUrl;
singleUrl.append(*it);
- QCString startup_id2 = startup_id;
+ TQCString startup_id2 = startup_id;
if( !startup_id2.isEmpty() && startup_id2 != "0" )
startup_id2 = "0"; // can't use the same startup_id several times
start_service( service, singleUrl, envs, startup_id2, true);
}
- QString firstURL = *(urls.begin());
+ TQString firstURL = *(urls.begin());
urls.clear();
urls.append(firstURL);
}
@@ -1022,12 +1022,12 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
if ((request->dcop_service_type == KService::DCOP_Unique) ||
(request->dcop_service_type == KService::DCOP_Multi))
{
- QVariant v = service->property("X-DCOP-ServiceName");
+ TQVariant v = service->property("X-DCOP-ServiceName");
if (v.isValid())
request->dcop_name = v.toString().utf8();
if (request->dcop_name.isEmpty())
{
- request->dcop_name = QFile::encodeName(KRun::binaryName(service->exec(), true));
+ request->dcop_name = TQFile::encodeName(KRun::binaryName(service->exec(), true));
}
}
@@ -1046,8 +1046,8 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
}
void
-KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const QCString& startup_id,
- const QValueList<QCString> &envs )
+KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet
@@ -1055,13 +1055,13 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser
if( startup_id == "0" )
return;
bool silent;
- QCString wmclass;
- if( !KRun::checkStartupNotify( QString::null, service, &silent, &wmclass ))
+ TQCString wmclass;
+ if( !KRun::checkStartupNotify( TQString::null, service, &silent, &wmclass ))
return;
KStartupInfoId id;
id.initId( startup_id );
const char* dpy_str = NULL;
- for( QValueList<QCString>::ConstIterator it = envs.begin();
+ for( TQValueList<TQCString>::ConstIterator it = envs.begin();
it != envs.end();
++it )
if( strncmp( *it, "DISPLAY=", 8 ) == 0 )
@@ -1101,8 +1101,8 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser
}
void
-KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString& startup_id,
- const QValueList<QCString> &envs )
+KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet
@@ -1111,7 +1111,7 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString&
if( !startup_id.isEmpty() && startup_id != "0" )
{
const char* dpy_str = NULL;
- for( QValueList<QCString>::ConstIterator it = envs.begin();
+ for( TQValueList<TQCString>::ConstIterator it = envs.begin();
it != envs.end();
++it )
if( strncmp( *it, "DISPLAY=", 8 ) == 0 )
@@ -1135,17 +1135,17 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString&
}
bool
-KLauncher::kdeinit_exec(const QString &app, const QStringList &args,
- const QValueList<QCString> &envs, QCString startup_id, bool wait)
+KLauncher::kdeinit_exec(const TQString &app, const TQStringList &args,
+ const TQValueList<TQCString> &envs, TQCString startup_id, bool wait)
{
KLaunchRequest *request = new KLaunchRequest;
request->autoStart = false;
- for(QStringList::ConstIterator it = args.begin();
+ for(TQStringList::ConstIterator it = args.begin();
it != args.end();
it++)
{
- QString arg = *it;
+ TQString arg = *it;
request->arg_list.append(arg.local8Bit());
}
@@ -1167,7 +1167,7 @@ KLauncher::kdeinit_exec(const QString &app, const QStringList &args,
KService::Ptr service = KService::serviceByDesktopName( app.mid( app.findRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
- startup_id, QValueList< QCString >());
+ startup_id, TQValueList< TQCString >());
else // no .desktop file, no startup info
cancel_service_startup_info( request, startup_id, envs );
}
@@ -1183,7 +1183,7 @@ KLauncher::queueRequest(KLaunchRequest *request)
if (!bProcessingQueue)
{
bProcessingQueue = true;
- QTimer::singleShot(0, this, SLOT( slotDequeue() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( slotDequeue() ));
}
}
@@ -1207,22 +1207,22 @@ KLauncher::slotDequeue()
void
KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service ,
- const QStringList &urls)
+ const TQStringList &urls)
{
- QStringList params = KRun::processDesktopExec(*service, urls, false);
+ TQStringList params = KRun::processDesktopExec(*service, urls, false);
- for(QStringList::ConstIterator it = params.begin();
+ for(TQStringList::ConstIterator it = params.begin();
it != params.end(); ++it)
{
request->arg_list.append((*it).local8Bit());
}
- request->cwd = QFile::encodeName(service->path());
+ request->cwd = TQFile::encodeName(service->path());
}
///// IO-Slave functions
pid_t
-KLauncher::requestHoldSlave(const KURL &url, const QString &app_socket)
+KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@@ -1241,10 +1241,10 @@ KLauncher::requestHoldSlave(const KURL &url, const QString &app_socket)
pid_t
-KLauncher::requestSlave(const QString &protocol,
- const QString &host,
- const QString &app_socket,
- QString &error)
+KLauncher::requestSlave(const TQString &protocol,
+ const TQString &host,
+ const TQString &app_socket,
+ TQString &error)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@@ -1264,7 +1264,7 @@ KLauncher::requestSlave(const QString &protocol,
{
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
{
- if (slave->match(protocol, QString::null, false))
+ if (slave->match(protocol, TQString::null, false))
break;
}
}
@@ -1275,18 +1275,18 @@ KLauncher::requestSlave(const QString &protocol,
return slave->pid();
}
- QString _name = KProtocolInfo::exec(protocol);
+ TQString _name = KProtocolInfo::exec(protocol);
if (_name.isEmpty())
{
error = i18n("Unknown protocol '%1'.\n").arg(protocol);
return 0;
}
- QCString name = _name.latin1(); // ex: "kio_ftp"
- QCString arg1 = protocol.latin1();
- QCString arg2 = QFile::encodeName(mPoolSocketName);
- QCString arg3 = QFile::encodeName(app_socket);
- QValueList<QCString> arg_list;
+ TQCString name = _name.latin1(); // ex: "kio_ftp"
+ TQCString arg1 = protocol.latin1();
+ TQCString arg2 = TQFile::encodeName(mPoolSocketName);
+ TQCString arg3 = TQFile::encodeName(app_socket);
+ TQValueList<TQCString> arg_list;
arg_list.append(arg1);
arg_list.append(arg2);
arg_list.append(arg3);
@@ -1301,11 +1301,11 @@ KLauncher::requestSlave(const QString &protocol,
}
if (mSlaveValgrind == arg1)
{
- arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name)));
- arg_list.prepend(QFile::encodeName(locate("exe", "kioslave")));
+ arg_list.prepend(TQFile::encodeName(KLibLoader::findLibrary(name)));
+ arg_list.prepend(TQFile::encodeName(locate("exe", "kioslave")));
name = "valgrind";
if (!mSlaveValgrindSkin.isEmpty()) {
- arg_list.prepend(QCString("--tool=") + mSlaveValgrindSkin);
+ arg_list.prepend(TQCString("--tool=") + mSlaveValgrindSkin);
} else
arg_list.prepend("--tool=memcheck");
}
@@ -1357,9 +1357,9 @@ KLauncher::acceptSlave(KSocket *slaveSocket)
IdleSlave *slave = new IdleSlave(slaveSocket);
// Send it a SLAVE_STATUS command.
mSlaveList.append(slave);
- connect(slave, SIGNAL(destroyed()), this, SLOT(slotSlaveGone()));
- connect(slave, SIGNAL(statusUpdate(IdleSlave *)),
- this, SLOT(slotSlaveStatus(IdleSlave *)));
+ connect(slave, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotSlaveGone()));
+ connect(slave, TQT_SIGNAL(statusUpdate(IdleSlave *)),
+ this, TQT_SLOT(slotSlaveStatus(IdleSlave *)));
if (!mTimer.isActive())
{
mTimer.start(1000*10);
@@ -1374,8 +1374,8 @@ KLauncher::slotSlaveStatus(IdleSlave *slave)
{
if (waitRequest->pid == slave->pid())
{
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
replyType = "void";
dcopClient()->endTransaction( waitRequest->transaction, replyType, replyData);
mSlaveWaitRequest.removeRef(waitRequest);
diff --git a/kinit/klauncher.h b/kinit/klauncher.h
index a9ed80f3b..e681939e1 100644
--- a/kinit/klauncher.h
+++ b/kinit/klauncher.h
@@ -23,11 +23,11 @@
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kio/connection.h>
@@ -44,13 +44,13 @@ class IdleSlave : public QObject
Q_OBJECT
public:
IdleSlave(KSocket *socket);
- bool match( const QString &protocol, const QString &host, bool connected);
- void connect( const QString &app_socket);
+ bool match( const TQString &protocol, const TQString &host, bool connected);
+ void connect( const TQString &app_socket);
pid_t pid() const { return mPid;}
int age(time_t now);
void reparseConfiguration();
bool onHold(const KURL &url);
- QString protocol() const {return mProtocol;}
+ TQString protocol() const {return mProtocol;}
signals:
void statusUpdate(IdleSlave *);
@@ -60,8 +60,8 @@ protected slots:
protected:
KIO::Connection mConn;
- QString mProtocol;
- QString mHost;
+ TQString mProtocol;
+ TQString mHost;
bool mConnected;
pid_t mPid;
time_t mBirthDate;
@@ -79,29 +79,29 @@ public:
class KLaunchRequest
{
public:
- QCString name;
- QValueList<QCString> arg_list;
- QCString dcop_name;
+ TQCString name;
+ TQValueList<TQCString> arg_list;
+ TQCString dcop_name;
enum status_t { Init = 0, Launching, Running, Error, Done };
pid_t pid;
status_t status;
DCOPClientTransaction *transaction;
KService::DCOPServiceType_t dcop_service_type;
bool autoStart;
- QString errorMsg;
+ TQString errorMsg;
#ifdef Q_WS_X11
- QCString startup_id; // "" is the default, "0" for none
- QCString startup_dpy; // Display to send startup notification to.
+ TQCString startup_id; // "" is the default, "0" for none
+ TQCString startup_dpy; // Display to send startup notification to.
#endif
- QValueList<QCString> envs; // env. variables to be app's environment
- QCString cwd;
+ TQValueList<TQCString> envs; // env. variables to be app's environment
+ TQCString cwd;
};
struct serviceResult
{
int result; // 0 means success. > 0 means error (-1 means pending)
- QCString dcopName; // Contains DCOP name on success
- QString error; // Contains error description on failure.
+ TQCString dcopName; // Contains DCOP name on success
+ TQString error; // Contains error description on failure.
pid_t pid;
};
@@ -118,8 +118,8 @@ public:
static void destruct(int exit_code); // exit!
// DCOP
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
virtual QCStringList functions();
virtual QCStringList interfaces();
@@ -129,68 +129,68 @@ protected:
void requestStart(KLaunchRequest *request);
void requestDone(KLaunchRequest *request);
- void setLaunchEnv(const QCString &name, const QCString &value);
- void exec_blind(const QCString &name, const QValueList<QCString> &arg_list,
- const QValueList<QCString> &envs, const QCString& startup_id = "" );
- bool start_service(KService::Ptr service, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id = "",
+ void setLaunchEnv(const TQCString &name, const TQCString &value);
+ void exec_blind(const TQCString &name, const TQValueList<TQCString> &arg_list,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id = "" );
+ bool start_service(KService::Ptr service, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id = "",
bool blind = false, bool autoStart = false );
- bool start_service_by_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool start_service_by_desktop_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool kdeinit_exec(const QString &app, const QStringList &args,
- const QValueList<QCString> &envs, QCString startup_id, bool wait);
+ bool start_service_by_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool kdeinit_exec(const TQString &app, const TQStringList &args,
+ const TQValueList<TQCString> &envs, TQCString startup_id, bool wait);
void waitForSlave(pid_t pid);
void autoStart(int phase);
void createArgs( KLaunchRequest *request, const KService::Ptr service,
- const QStringList &url);
+ const TQStringList &url);
- pid_t requestHoldSlave(const KURL &url, const QString &app_socket);
- pid_t requestSlave(const QString &protocol, const QString &host,
- const QString &app_socket, QString &error);
+ pid_t requestHoldSlave(const KURL &url, const TQString &app_socket);
+ pid_t requestSlave(const TQString &protocol, const TQString &host,
+ const TQString &app_socket, TQString &error);
void queueRequest(KLaunchRequest *);
- void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const QCString& startup_id,
- const QValueList<QCString> &envs );
- void cancel_service_startup_info( KLaunchRequest *request, const QCString& startup_id,
- const QValueList<QCString> &envs );
+ void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs );
+ void cancel_service_startup_info( KLaunchRequest *request, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs );
public slots:
void slotAutoStart();
void slotDequeue();
void slotKDEInitData(int);
- void slotAppRegistered(const QCString &appId);
+ void slotAppRegistered(const TQCString &appId);
void slotSlaveStatus(IdleSlave *);
void acceptSlave( KSocket *);
void slotSlaveGone();
void idleTimeout();
protected:
- QPtrList<KLaunchRequest> requestList; // Requests being handled
- QPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled
+ TQPtrList<KLaunchRequest> requestList; // Requests being handled
+ TQPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled
int kdeinitSocket;
- QSocketNotifier *kdeinitNotifier;
+ TQSocketNotifier *kdeinitNotifier;
serviceResult DCOPresult;
KLaunchRequest *lastRequest;
- QPtrList<SlaveWaitRequest> mSlaveWaitRequest;
- QString mPoolSocketName;
+ TQPtrList<SlaveWaitRequest> mSlaveWaitRequest;
+ TQString mPoolSocketName;
KServerSocket *mPoolSocket;
- QPtrList<IdleSlave> mSlaveList;
- QTimer mTimer;
- QTimer mAutoTimer;
+ TQPtrList<IdleSlave> mSlaveList;
+ TQTimer mTimer;
+ TQTimer mAutoTimer;
bool bProcessingQueue;
AutoStart mAutoStart;
- QCString mSlaveDebug;
- QCString mSlaveValgrind;
- QCString mSlaveValgrindSkin;
+ TQCString mSlaveDebug;
+ TQCString mSlaveValgrind;
+ TQCString mSlaveValgrindSkin;
bool dontBlockReading;
bool newStartup;
#ifdef Q_WS_X11
diff --git a/kinit/klauncher_main.cpp b/kinit/klauncher_main.cpp
index fd5ea813e..80b96980c 100644
--- a/kinit/klauncher_main.cpp
+++ b/kinit/klauncher_main.cpp
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <klocale.h>
#include "klauncher_cmds.h"
@@ -60,7 +60,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
return 1;
}
- QCString cname = KApplication::launcher();
+ TQCString cname = KApplication::launcher();
char *name = cname.data();
KCmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.",
"v1.0");
@@ -79,7 +79,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
int maxTry = 3;
while(true)
{
- QCString dcopName = KApplication::dcopClient()->registerAs(name, false);
+ TQCString dcopName = KApplication::dcopClient()->registerAs(name, false);
if (dcopName.isEmpty())
{
kdWarning() << "DCOP communication problem!" << endl;
diff --git a/kinit/tests/klaunchertest.cpp b/kinit/tests/klaunchertest.cpp
index 56cc93c24..c42fdf686 100644
--- a/kinit/tests/klaunchertest.cpp
+++ b/kinit/tests/klaunchertest.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <dcopclient.h>
#include <stdio.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
@@ -35,17 +35,17 @@ int main(int argc, char *argv[])
kapp->dcopClient()->registerAs( kapp->name()) ;
#if 0
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int pid;
int result = KApplication::startServiceByDesktopName(
- QString::fromLatin1("konsole"), QString::null, &error, &dcopService, &pid );
+ TQString::fromLatin1("konsole"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);
result = KApplication::startServiceByDesktopName(
- QString::fromLatin1("konqueror"), QString::null, &error, &dcopService, &pid );
+ TQString::fromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);
diff --git a/kinit/wrapper.c b/kinit/wrapper.c
index d1d754b7b..27d208376 100644
--- a/kinit/wrapper.c
+++ b/kinit/wrapper.c
@@ -47,9 +47,9 @@ static char *getDisplay()
char *colon;
char *i;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
diff --git a/kio/bookmarks/dptrtemplate.h b/kio/bookmarks/dptrtemplate.h
index 26fd0b3a9..2a69d6a54 100644
--- a/kio/bookmarks/dptrtemplate.h
+++ b/kio/bookmarks/dptrtemplate.h
@@ -22,7 +22,7 @@
#ifndef __dptrtemplate_h__
#define __dptrtemplate_h__
-#include <qptrdict.h>
+#include <tqptrdict.h>
template<class Instance, class PrivateData>
class dPtrTemplate {
@@ -31,7 +31,7 @@ public:
{
if ( !d_ptr ) {
cleanup_d_ptr();
- d_ptr = new QPtrDict<PrivateData>;
+ d_ptr = new TQPtrDict<PrivateData>;
qAddPostRoutine( cleanup_d_ptr );
}
PrivateData* ret = d_ptr->find( (void*) instance );
@@ -51,7 +51,7 @@ private:
{
delete d_ptr;
}
- static QPtrDict<PrivateData>* d_ptr;
+ static TQPtrDict<PrivateData>* d_ptr;
};
#endif
diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc
index 59cf10db3..44b8b496c 100644
--- a/kio/bookmarks/kbookmark.cc
+++ b/kio/bookmarks/kbookmark.cc
@@ -20,7 +20,7 @@
*/
#include "kbookmark.h"
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kstringhandler.h>
@@ -33,16 +33,16 @@
#include <kbookmarkmanager.h>
KBookmarkGroup::KBookmarkGroup()
- : KBookmark( QDomElement() )
+ : KBookmark( TQDomElement() )
{
}
-KBookmarkGroup::KBookmarkGroup( QDomElement elem )
+KBookmarkGroup::KBookmarkGroup( TQDomElement elem )
: KBookmark(elem)
{
}
-QString KBookmarkGroup::groupAddress() const
+TQString KBookmarkGroup::groupAddress() const
{
if (m_address.isEmpty())
m_address = address();
@@ -55,7 +55,7 @@ bool KBookmarkGroup::isOpen() const
}
// Returns first element node equal to or after node n
-static QDomElement firstElement(QDomNode n)
+static TQDomElement firstElement(TQDomNode n)
{
while(!n.isNull() && !n.isElement())
n = n.nextSibling();
@@ -63,7 +63,7 @@ static QDomElement firstElement(QDomNode n)
}
// Returns first element node equal to or before node n
-static QDomElement lastElement(QDomNode n)
+static TQDomElement lastElement(TQDomNode n)
{
while(!n.isNull() && !n.isElement())
n = n.previousSibling();
@@ -85,18 +85,18 @@ KBookmark KBookmarkGroup::next( const KBookmark & current ) const
return KBookmark( nextKnownTag( firstElement(current.element.nextSibling()), true ) );
}
-// KDE4: Change QDomElement to QDomNode so that we can get rid of
+// KDE4: Change TQDomElement to TQDomNode so that we can get rid of
// firstElement() and lastElement()
-QDomElement KBookmarkGroup::nextKnownTag( QDomElement start, bool goNext ) const
+TQDomElement KBookmarkGroup::nextKnownTag( TQDomElement start, bool goNext ) const
{
- static const QString & bookmark = KGlobal::staticQString("bookmark");
- static const QString & folder = KGlobal::staticQString("folder");
- static const QString & separator = KGlobal::staticQString("separator");
+ static const TQString & bookmark = KGlobal::staticQString("bookmark");
+ static const TQString & folder = KGlobal::staticQString("folder");
+ static const TQString & separator = KGlobal::staticQString("separator");
- for( QDomNode n = start; !n.isNull(); )
+ for( TQDomNode n = start; !n.isNull(); )
{
- QDomElement elem = n.toElement();
- QString tag = elem.tagName();
+ TQDomElement elem = n.toElement();
+ TQString tag = elem.tagName();
if (tag == folder || tag == bookmark || tag == separator)
return elem;
if (goNext)
@@ -104,30 +104,30 @@ QDomElement KBookmarkGroup::nextKnownTag( QDomElement start, bool goNext ) const
else
n = n.previousSibling();
}
- return QDomElement();
+ return TQDomElement();
}
-KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const QString & text, bool emitSignal )
+KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const TQString & text, bool emitSignal )
{
- QString txt( text );
+ TQString txt( text );
if ( text.isEmpty() )
{
bool ok;
- QString caption = parentGroup().fullText().isEmpty() ?
+ TQString caption = parentGroup().fullText().isEmpty() ?
i18n( "Create New Bookmark Folder" ) :
i18n( "Create New Bookmark Folder in %1" )
.arg( parentGroup().text() );
txt = KInputDialog::getText( caption, i18n( "New folder:" ),
- QString::null, &ok );
+ TQString::null, &ok );
if ( !ok )
return KBookmarkGroup();
}
Q_ASSERT(!element.isNull());
- QDomDocument doc = element.ownerDocument();
- QDomElement groupElem = doc.createElement( "folder" );
+ TQDomDocument doc = element.ownerDocument();
+ TQDomElement groupElem = doc.createElement( "folder" );
element.appendChild( groupElem );
- QDomElement textElem = doc.createElement( "title" );
+ TQDomElement textElem = doc.createElement( "title" );
groupElem.appendChild( textElem );
textElem.appendChild( doc.createTextNode( txt ) );
@@ -145,25 +145,25 @@ KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const QSt
KBookmark KBookmarkGroup::createNewSeparator()
{
Q_ASSERT(!element.isNull());
- QDomDocument doc = element.ownerDocument();
+ TQDomDocument doc = element.ownerDocument();
Q_ASSERT(!doc.isNull());
- QDomElement sepElem = doc.createElement( "separator" );
+ TQDomElement sepElem = doc.createElement( "separator" );
element.appendChild( sepElem );
return KBookmark(sepElem);
}
bool KBookmarkGroup::moveItem( const KBookmark & item, const KBookmark & after )
{
- QDomNode n;
+ TQDomNode n;
if ( !after.isNull() )
n = element.insertAfter( item.element, after.element );
else // first child
{
if ( element.firstChild().isNull() ) // Empty element -> set as real first child
- n = element.insertBefore( item.element, QDomElement() );
+ n = element.insertBefore( item.element, TQDomElement() );
// we have to skip everything up to the first valid child
- QDomElement firstChild = nextKnownTag(element.firstChild().toElement(), true);
+ TQDomElement firstChild = nextKnownTag(element.firstChild().toElement(), true);
if ( !firstChild.isNull() )
n = element.insertBefore( item.element, firstChild );
else
@@ -192,18 +192,18 @@ KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const KBookmark &b
return bm;
}
-KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const QString & text, const KURL & url, const QString & icon, bool emitSignal )
+KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon, bool emitSignal )
{
//kdDebug(7043) << "KBookmarkGroup::addBookmark " << text << " into " << m_address << endl;
- QDomDocument doc = element.ownerDocument();
- QDomElement elem = doc.createElement( "bookmark" );
+ TQDomDocument doc = element.ownerDocument();
+ TQDomElement elem = doc.createElement( "bookmark" );
elem.setAttribute( "href", url.url( 0, 106 ) ); // write utf8 URL (106 is mib enum for utf8)
- QString _icon = icon;
+ TQString _icon = icon;
if ( _icon.isEmpty() )
_icon = KMimeType::iconForURL( url );
elem.setAttribute( "icon", _icon );
- QDomElement textElem = doc.createElement( "title" );
+ TQDomElement textElem = doc.createElement( "title" );
elem.appendChild( textElem );
textElem.appendChild( doc.createTextNode( text ) );
@@ -220,13 +220,13 @@ bool KBookmarkGroup::isToolbarGroup() const
return ( element.attribute("toolbar") == "yes" );
}
-QDomElement KBookmarkGroup::findToolbar() const
+TQDomElement KBookmarkGroup::findToolbar() const
{
if ( element.attribute("toolbar") == "yes" )
return element;
- for (QDomNode n = element.firstChild(); !n.isNull() ; n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull() ; n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
// Search among the "folder" children only
if ( e.tagName() == "folder" )
{
@@ -234,18 +234,18 @@ QDomElement KBookmarkGroup::findToolbar() const
return e;
else
{
- QDomElement result = KBookmarkGroup(e).findToolbar();
+ TQDomElement result = KBookmarkGroup(e).findToolbar();
if (!result.isNull())
return result;
}
}
}
- return QDomElement();
+ return TQDomElement();
}
-QValueList<KURL> KBookmarkGroup::groupUrlList() const
+TQValueList<KURL> KBookmarkGroup::groupUrlList() const
{
- QValueList<KURL> urlList;
+ TQValueList<KURL> urlList;
for ( KBookmark bm = first(); !bm.isNull(); bm = next(bm) )
{
if ( bm.isSeparator() || bm.isGroup() )
@@ -259,7 +259,7 @@ QValueList<KURL> KBookmarkGroup::groupUrlList() const
bool KBookmark::isGroup() const
{
- QString tag = element.tagName();
+ TQString tag = element.tagName();
return ( tag == "folder"
|| tag == "xbel" ); // don't forget the toplevel group
}
@@ -271,16 +271,16 @@ bool KBookmark::isSeparator() const
bool KBookmark::hasParent() const
{
- QDomElement parent = element.parentNode().toElement();
+ TQDomElement parent = element.parentNode().toElement();
return !parent.isNull();
}
-QString KBookmark::text() const
+TQString KBookmark::text() const
{
return KStringHandler::csqueeze( fullText() );
}
-QString KBookmark::fullText() const
+TQString KBookmark::fullText() const
{
if (isSeparator())
return i18n("--- separator ---");
@@ -293,9 +293,9 @@ KURL KBookmark::url() const
return KURL(element.attribute("href"), 106); // Decode it from utf8 (106 is mib enum for utf8)
}
-QString KBookmark::icon() const
+TQString KBookmark::icon() const
{
- QString icon = element.attribute("icon");
+ TQString icon = element.attribute("icon");
if ( icon.isEmpty() )
// Default icon depends on URL for bookmarks, and is default directory
// icon for groups.
@@ -320,10 +320,10 @@ KBookmarkGroup KBookmark::toGroup() const
return KBookmarkGroup(element);
}
-QString KBookmark::address() const
+TQString KBookmark::address() const
{
if ( element.tagName() == "xbel" )
- return ""; // not QString::null !
+ return ""; // not TQString::null !
else
{
// Use keditbookmarks's DEBUG_ADDRESSES flag to debug this code :)
@@ -333,44 +333,44 @@ QString KBookmark::address() const
return "ERROR"; // Avoid an infinite loop
}
KBookmarkGroup group = parentGroup();
- QString parentAddress = group.address();
+ TQString parentAddress = group.address();
uint counter = 0;
// Implementation note: we don't use QDomNode's childNode list because we
// would have to skip "TEXT", which KBookmarkGroup already does for us.
for ( KBookmark bk = group.first() ; !bk.isNull() ; bk = group.next(bk), ++counter )
{
if ( bk.element == element )
- return parentAddress + "/" + QString::number(counter);
+ return parentAddress + "/" + TQString::number(counter);
}
kdWarning() << "KBookmark::address : this can't happen! " << parentAddress << endl;
return "ERROR";
}
}
-KBookmark KBookmark::standaloneBookmark( const QString & text, const KURL & url, const QString & icon )
+KBookmark KBookmark::standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon )
{
- QDomDocument doc("xbel");
- QDomElement elem = doc.createElement("xbel");
+ TQDomDocument doc("xbel");
+ TQDomElement elem = doc.createElement("xbel");
doc.appendChild( elem );
KBookmarkGroup grp( elem );
grp.addBookmark( 0L, text, url, icon, false );
return grp.first();
}
-// For some strange reason QString("").left(0) returns QString::null;
+// For some strange reason TQString("").left(0) returns TQString::null;
// That breaks commonParent()
-QString KBookmark::left(const QString & str, uint len)
+TQString KBookmark::left(const TQString & str, uint len)
{
- //kdDebug()<<"********"<<QString("").left(0).isNull()<<endl;
+ //kdDebug()<<"********"<<TQString("").left(0).isNull()<<endl;
if(len == 0)
- return QString("");
+ return TQString("");
else
return str.left(len);
}
-QString KBookmark::commonParent(QString A, QString B)
+TQString KBookmark::commonParent(TQString A, TQString B)
{
- QString error("ERROR");
+ TQString error("ERROR");
if(A == error || B == error)
return error;
@@ -389,9 +389,9 @@ QString KBookmark::commonParent(QString A, QString B)
return left(A, lastCommonSlash);
}
-static QDomNode cd_or_create(QDomNode node, QString name)
+static TQDomNode cd_or_create(TQDomNode node, TQString name)
{
- QDomNode subnode = node.namedItem(name);
+ TQDomNode subnode = node.namedItem(name);
if (subnode.isNull())
{
subnode = node.ownerDocument().createElement(name);
@@ -400,9 +400,9 @@ static QDomNode cd_or_create(QDomNode node, QString name)
return subnode;
}
-static QDomText get_or_create_text(QDomNode node)
+static TQDomText get_or_create_text(TQDomNode node)
{
- QDomNode subnode = node.firstChild();
+ TQDomNode subnode = node.firstChild();
if (subnode.isNull())
{
subnode = node.ownerDocument().createTextNode("");
@@ -412,14 +412,14 @@ static QDomText get_or_create_text(QDomNode node)
}
// Look for a metadata with owner="http://www.kde.org" or without any owner (for compatibility)
-static QDomNode findOrCreateMetadata( QDomNode& parent )
+static TQDomNode findOrCreateMetadata( TQDomNode& parent )
{
static const char kdeOwner[] = "http://www.kde.org";
- QDomElement metadataElement;
- for ( QDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) {
- QDomElement elem = _node.toElement();
+ TQDomElement metadataElement;
+ for ( TQDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) {
+ TQDomElement elem = _node.toElement();
if ( !elem.isNull() && elem.tagName() == "metadata" ) {
- const QString owner = elem.attribute( "owner" );
+ const TQString owner = elem.attribute( "owner" );
if ( owner == kdeOwner )
return elem;
if ( owner.isEmpty() )
@@ -439,7 +439,7 @@ bool KBookmark::hasMetaData() const
// ### NOTE: this code creates <info> and <metadata>, despite its name and the const.
// It doesn't matter much in practice since it's only called for newly-created bookmarks,
// which will get metadata soon after anyway.
- QDomNode n = cd_or_create( internalElement(), "info" );
+ TQDomNode n = cd_or_create( internalElement(), "info" );
return findOrCreateMetadata( n ).hasChildNodes();
}
@@ -447,44 +447,44 @@ void KBookmark::updateAccessMetadata()
{
kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl;
- const uint timet = QDateTime::currentDateTime().toTime_t();
- setMetaDataItem( "time_added", QString::number( timet ), DontOverwriteMetaData );
- setMetaDataItem( "time_visited", QString::number( timet ) );
+ const uint timet = TQDateTime::currentDateTime().toTime_t();
+ setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData );
+ setMetaDataItem( "time_visited", TQString::number( timet ) );
- QString countStr = metaDataItem( "visit_count" ); // TODO use spec'ed name
+ TQString countStr = metaDataItem( "visit_count" ); // TODO use spec'ed name
bool ok;
int currentCount = countStr.toInt(&ok);
if (!ok)
currentCount = 0;
currentCount++;
- setMetaDataItem( "visit_count", QString::number( currentCount ) );
+ setMetaDataItem( "visit_count", TQString::number( currentCount ) );
// TODO - for 4.0 - time_modified
}
-QString KBookmark::metaDataItem( const QString &key ) const
+TQString KBookmark::metaDataItem( const TQString &key ) const
{
- QDomNode infoNode = cd_or_create( internalElement(), "info" );
+ TQDomNode infoNode = cd_or_create( internalElement(), "info" );
infoNode = findOrCreateMetadata( infoNode );
- for ( QDomNode n = infoNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = infoNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( !n.isElement() ) {
continue;
}
- const QDomElement e = n.toElement();
+ const TQDomElement e = n.toElement();
if ( e.tagName() == key ) {
return e.text();
}
}
- return QString::null;
+ return TQString::null;
}
-void KBookmark::setMetaDataItem( const QString &key, const QString &value, MetaDataOverwriteMode mode )
+void KBookmark::setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode )
{
- QDomNode infoNode = cd_or_create( internalElement(), "info" );
+ TQDomNode infoNode = cd_or_create( internalElement(), "info" );
infoNode = findOrCreateMetadata( infoNode );
- QDomNode item = cd_or_create( infoNode, key );
- QDomText text = get_or_create_text( item );
+ TQDomNode item = cd_or_create( infoNode, key );
+ TQDomText text = get_or_create_text( item );
if ( mode == DontOverwriteMetaData && !text.data().isEmpty() ) {
return;
}
@@ -495,7 +495,7 @@ void KBookmark::setMetaDataItem( const QString &key, const QString &value, MetaD
void KBookmarkGroupTraverser::traverse(const KBookmarkGroup &root)
{
// non-recursive bookmark iterator
- QValueStack<KBookmarkGroup> stack;
+ TQValueStack<KBookmarkGroup> stack;
stack.push(root);
KBookmark bk = stack.top().first();
for (;;) {
diff --git a/kio/bookmarks/kbookmark.h b/kio/bookmarks/kbookmark.h
index 9cb9b1fdf..84f177522 100644
--- a/kio/bookmarks/kbookmark.h
+++ b/kio/bookmarks/kbookmark.h
@@ -20,9 +20,9 @@
#ifndef __kbookmark_h
#define __kbookmark_h
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
#include <kurl.h>
class KBookmarkManager;
@@ -37,9 +37,9 @@ public:
};
KBookmark( ) {}
- KBookmark( QDomElement elem ) : element(elem) {}
+ KBookmark( TQDomElement elem ) : element(elem) {}
- static KBookmark standaloneBookmark( const QString & text, const KURL & url, const QString & icon = QString::null );
+ static KBookmark standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon = TQString::null );
/**
* Whether the bookmark is a group or a normal bookmark
@@ -59,7 +59,7 @@ public:
bool isNull() const {return element.isNull();}
/**
- * @return true if bookmark is contained by a QDomDocument,
+ * @return true if bookmark is contained by a TQDomDocument,
* if not it is most likely that it has become separated and
* is thus invalid and/or has been deleted from the bookmarks.
* @since 3.2
@@ -71,12 +71,12 @@ public:
* If bigger than 40, the text is shortened by
* replacing middle characters with "..." (see KStringHandler::csqueeze)
*/
- QString text() const;
+ TQString text() const;
/**
* Text shown for the bookmark, not truncated.
* You should not use this - this is mainly for keditbookmarks.
*/
- QString fullText() const;
+ TQString fullText() const;
/**
* URL contained by the bookmark
*/
@@ -85,7 +85,7 @@ public:
* @return the pixmap file for this bookmark
* (i.e. the name of the icon)
*/
- QString icon() const;
+ TQString icon() const;
/**
* @return the group containing this bookmark
@@ -104,7 +104,7 @@ public:
* in a given bookmark. The encoding of the address is "/4/2", for
* instance, to design the 2nd child inside the 4th child of the root bk.
*/
- QString address() const;
+ TQString address() const;
// Hard to decide. Good design would imply that each bookmark
// knows about its manager, so that there can be several managers.
@@ -115,7 +115,7 @@ public:
/**
* @internal for KEditBookmarks
*/
- QDomElement internalElement() const { return element; }
+ TQDomElement internalElement() const { return element; }
/**
* Updates the bookmarks access metadata
@@ -129,47 +129,47 @@ public:
/**
* @return address of parent
*/
- static QString parentAddress( const QString & address )
+ static TQString parentAddress( const TQString & address )
{ return address.left( address.findRev('/') ); }
/**
* @return position in parent (e.g. /4/5/2 -> 2)
*/
- static uint positionInParent( const QString & address )
+ static uint positionInParent( const TQString & address )
{ return address.mid( address.findRev('/') + 1 ).toInt(); }
/**
* @return address of previous sibling (e.g. /4/5/2 -> /4/5/1)
- * Returns QString::null for a first child
+ * Returns TQString::null for a first child
*/
- static QString previousAddress( const QString & address )
+ static TQString previousAddress( const TQString & address )
{
uint pp = positionInParent(address);
- return pp>0 ? parentAddress(address) + '/' + QString::number(pp-1) : QString::null;
+ return pp>0 ? parentAddress(address) + '/' + TQString::number(pp-1) : TQString::null;
}
/**
* @return address of next sibling (e.g. /4/5/2 -> /4/5/3)
* This doesn't check whether it actually exists
*/
- static QString nextAddress( const QString & address )
- { return parentAddress(address) + '/' + QString::number(positionInParent(address)+1); }
+ static TQString nextAddress( const TQString & address )
+ { return parentAddress(address) + '/' + TQString::number(positionInParent(address)+1); }
/**
* @return the common parent of both addresses which
* has the greatest depth
* @since 3.5
*/
- static QString commonParent(QString A, QString B);
+ static TQString commonParent(TQString A, TQString B);
/**
* Get the value of a specific metadata item.
* @param key Name of the metadata item
- * @return Value of the metadata item. QString::null is returned in case
+ * @return Value of the metadata item. TQString::null is returned in case
* the specified key does not exist.
* @since 3.4
*/
- QString metaDataItem( const QString &key ) const;
+ TQString metaDataItem( const TQString &key ) const;
/**
* Change the value of a specific metadata item, or create the given item
@@ -179,18 +179,18 @@ public:
* @param mode Whether to overwrite the item's value if it exists already or not.
* @since 3.4
*/
- void setMetaDataItem( const QString &key, const QString &value, MetaDataOverwriteMode mode = OverwriteMetaData );
+ void setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode = OverwriteMetaData );
protected:
- QDomElement element;
+ TQDomElement element;
// Note: you can't add new member variables here.
// The KBookmarks are created on the fly, as wrappers
// around internal QDomElements. Any additional information
- // has to be implemented as an attribute of the QDomElement.
+ // has to be implemented as an attribute of the TQDomElement.
private:
bool hasMetaData() const;
- static QString left(const QString & str, uint len);
+ static TQString left(const TQString & str, uint len);
};
/**
@@ -200,7 +200,7 @@ class KIO_EXPORT KBookmarkGroup : public KBookmark
{
public:
/**
- * Create an invalid group. This is mostly for use in QValueList,
+ * Create an invalid group. This is mostly for use in TQValueList,
* and other places where we need a null group.
* Also used as a parent for a bookmark that doesn't have one
* (e.g. Netscape bookmarks)
@@ -210,13 +210,13 @@ public:
/**
* Create a bookmark group as specified by the given element
*/
- KBookmarkGroup( QDomElement elem );
+ KBookmarkGroup( TQDomElement elem );
/**
* Much like KBookmark::address, but caches the
* address into m_address.
*/
- QString groupAddress() const;
+ TQString groupAddress() const;
/**
* @return true if the bookmark folder is opened in the bookmark editor
@@ -244,7 +244,7 @@ public:
* @param text for the folder. If empty, the user will be queried for it.
* @param emitSignal if true emit KBookmarkNotifier signal
*/
- KBookmarkGroup createNewFolder( KBookmarkManager* mgr, const QString & text = QString::null, bool emitSignal = true );
+ KBookmarkGroup createNewFolder( KBookmarkManager* mgr, const TQString & text = TQString::null, bool emitSignal = true );
/**
* Create a new bookmark separator
* Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );
@@ -271,7 +271,7 @@ public:
* will be determined from the URL if not specified.
* @param emitSignal if true emit KBookmarkNotifier signal
*/
- KBookmark addBookmark( KBookmarkManager* mgr, const QString & text, const KURL & url, const QString & icon = QString::null, bool emitSignal = true );
+ KBookmark addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon = TQString::null, bool emitSignal = true );
/**
* Moves @p item after @p after (which should be a child of ours).
@@ -293,23 +293,23 @@ public:
/**
* @internal
*/
- QDomElement findToolbar() const;
+ TQDomElement findToolbar() const;
/**
* @return the list of urls of bookmarks at top level of the group
* @since 3.2
*/
- QValueList<KURL> groupUrlList() const;
+ TQValueList<KURL> groupUrlList() const;
protected:
- QDomElement nextKnownTag( QDomElement start, bool goNext ) const;
+ TQDomElement nextKnownTag( TQDomElement start, bool goNext ) const;
private:
- mutable QString m_address;
+ mutable TQString m_address;
// Note: you can't add other member variables here, except for caching info.
// The KBookmarks are created on the fly, as wrappers
// around internal QDomElements. Any additional information
- // has to be implemented as an attribute of the QDomElement.
+ // has to be implemented as an attribute of the TQDomElement.
};
/**
diff --git a/kio/bookmarks/kbookmarkbar.cc b/kio/bookmarks/kbookmarkbar.cc
index d71069014..ec1e3e670 100644
--- a/kio/bookmarks/kbookmarkbar.cc
+++ b/kio/bookmarks/kbookmarkbar.cc
@@ -19,8 +19,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kbookmarkbar.h>
#include <kbookmarkdrag.h>
@@ -40,19 +40,19 @@
#include "dptrtemplate.h"
-#include <qapplication.h>
+#include <tqapplication.h>
class KBookmarkBarPrivate : public dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>
{
public:
- QPtrList<KAction> m_actions;
+ TQPtrList<KAction> m_actions;
bool m_readOnly;
KBookmarkManager* m_filteredMgr;
KToolBar* m_sepToolBar;
int m_sepIndex;
bool m_atFirst;
- QString m_dropAddress;
- QString m_highlightedAddress;
+ TQString m_dropAddress;
+ TQString m_highlightedAddress;
public:
KBookmarkBarPrivate() {
m_readOnly = false;
@@ -62,7 +62,7 @@ public:
m_atFirst = false;
}
};
-template<> QPtrDict<KBookmarkBarPrivate>* dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>::d_ptr = 0;
+template<> TQPtrDict<KBookmarkBarPrivate>* dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>::d_ptr = 0;
KBookmarkBarPrivate* KBookmarkBar::dptr() const
{
@@ -87,8 +87,8 @@ private:
KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr,
KBookmarkOwner *_owner, KToolBar *_toolBar,
KActionCollection *coll,
- QObject *parent, const char *name )
- : QObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar),
m_actionCollection( coll ), m_pManager(mgr)
{
m_lstSubMenus.setAutoDelete( true );
@@ -98,16 +98,16 @@ KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr,
dptr()->m_actions.setAutoDelete( true );
- connect( mgr, SIGNAL( changed(const QString &, const QString &) ),
- SLOT( slotBookmarksChanged(const QString &) ) );
+ connect( mgr, TQT_SIGNAL( changed(const TQString &, const TQString &) ),
+ TQT_SLOT( slotBookmarksChanged(const TQString &) ) );
KBookmarkGroup toolbar = getToolbar();
fillBookmarkBar( toolbar );
}
-QString KBookmarkBar::parentAddress()
+TQString KBookmarkBar::parentAddress()
{
- return dptr()->m_filteredMgr ? QString::null : m_pManager->toolbar().address();
+ return dptr()->m_filteredMgr ? TQString::null : m_pManager->toolbar().address();
}
#define CURRENT_TOOLBAR() ( \
@@ -126,10 +126,10 @@ KBookmarkGroup KBookmarkBar::getToolbar()
dptr()->m_filteredMgr = KBookmarkManager::createTempManager();
} else {
KBookmarkGroup bkRoot = dptr()->m_filteredMgr->root();
- QValueList<KBookmark> bks;
+ TQValueList<KBookmark> bks;
for (KBookmark bm = bkRoot.first(); !bm.isNull(); bm = bkRoot.next(bm))
bks << bm;
- for ( QValueListConstIterator<KBookmark> it = bks.begin(); it != bks.end(); ++it )
+ for ( TQValueListConstIterator<KBookmark> it = bks.begin(); it != bks.end(); ++it )
bkRoot.deleteBookmark( (*it) );
}
ToolbarFilter filter;
@@ -150,7 +150,7 @@ KBookmarkBar::~KBookmarkBar()
void KBookmarkBar::clear()
{
- QPtrListIterator<KAction> it( dptr()->m_actions );
+ TQPtrListIterator<KAction> it( dptr()->m_actions );
m_toolBar->clear();
for (; it.current(); ++it ) {
(*it)->unplugAll();
@@ -159,7 +159,7 @@ void KBookmarkBar::clear()
m_lstSubMenus.clear();
}
-void KBookmarkBar::slotBookmarksChanged( const QString & group )
+void KBookmarkBar::slotBookmarksChanged( const TQString & group )
{
KBookmarkGroup tb = getToolbar(); // heavy for non cached toolbar version
kdDebug(7043) << "slotBookmarksChanged( " << group << " )" << endl;
@@ -176,7 +176,7 @@ void KBookmarkBar::slotBookmarksChanged( const QString & group )
else
{
// Iterate recursively into child menus
- QPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
+ TQPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
for (; it.current(); ++it )
{
it.current()->slotBookmarksChanged( group );
@@ -191,7 +191,7 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
for (KBookmark bm = parent.first(); !bm.isNull(); bm = parent.next(bm))
{
- QString text = bm.text();
+ TQString text = bm.text();
text.replace( '&', "&&" );
if (!bm.isGroup())
{
@@ -200,8 +200,8 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
else
{
KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 );
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- this, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", bm.url().url() );
action->setProperty( "address", bm.address() );
@@ -229,10 +229,10 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
KBookmarkMenu *menu = new KBookmarkMenu(CURRENT_MANAGER(), m_pOwner, action->popupMenu(),
m_actionCollection, false, addEntriesBookmarkBar,
bm.address());
- connect(menu, SIGNAL( aboutToShowContextMenu(const KBookmark &, QPopupMenu * ) ),
- this, SIGNAL( aboutToShowContextMenu(const KBookmark &, QPopupMenu * ) ));
- connect(menu, SIGNAL( openBookmark( const QString &, Qt::ButtonState) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState) ));
+ connect(menu, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) ),
+ this, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) ));
+ connect(menu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState) ));
menu->fillBookmarkMenu();
action->plug(m_toolBar);
m_lstSubMenus.append( menu );
@@ -259,7 +259,7 @@ void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, Q
const KAction* action = dynamic_cast<const KAction *>(sender());
if(action)
{
- const QString & url = sender()->property("url").toString();
+ const TQString & url = sender()->property("url").toString();
m_pOwner->openBookmarkURL(url);
emit openBookmark( url, state );
}
@@ -282,9 +282,9 @@ static void removeTempSep(KBookmarkBarPrivate* p)
}
}
-static KAction* findPluggedAction(QPtrList<KAction> actions, KToolBar *tb, int id)
+static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int id)
{
- QPtrListIterator<KAction> it( actions );
+ TQPtrListIterator<KAction> it( actions );
for (; (*it); ++it )
if ((*it)->isPlugged(tb, id))
return (*it);
@@ -292,17 +292,17 @@ static KAction* findPluggedAction(QPtrList<KAction> actions, KToolBar *tb, int i
}
/**
- * Handle a QDragMoveEvent event on a toolbar drop
+ * Handle a TQDragMoveEvent event on a toolbar drop
* @return the address of the bookmark to be dropped after/before
- * else a QString::null if event should be ignored
- * @param pos the current QDragMoveEvent position
+ * else a TQString::null if event should be ignored
+ * @param pos the current TQDragMoveEvent position
* @param the toolbar
* @param actions the list of actions plugged into the bar
* @param atFirst bool reference, when true the position before the
* returned action was dropped on
*/
-static QString handleToolbarDragMoveEvent(
- KBookmarkBarPrivate *p, KToolBar *tb, QPoint pos, QPtrList<KAction> actions,
+static TQString handleToolbarDragMoveEvent(
+ KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList<KAction> actions,
bool &atFirst, KBookmarkManager *mgr
) {
Q_UNUSED( mgr );
@@ -315,13 +315,13 @@ static QString handleToolbarDragMoveEvent(
b = dynamic_cast<KToolBarButton*>(tb->childAt(pos));
KAction *a = 0;
- QString address;
+ TQString address;
atFirst = false;
if (b)
{
index = tb->itemIndex(b->id());
- QRect r = b->geometry();
+ TQRect r = b->geometry();
if (pos.x() < ((r.left() + r.right())/2))
{
// if in first half of button then
@@ -356,7 +356,7 @@ static QString handleToolbarDragMoveEvent(
}
if ( !b )
- return QString::null; // TODO Make it works for that case
+ return TQString::null; // TODO Make it works for that case
a = findPluggedAction(actions, tb, b->id());
Q_ASSERT(a);
@@ -382,8 +382,8 @@ skipact:
}
// TODO - document!!!!
-static KAction* handleToolbarMouseButton(QPoint pos, QPtrList<KAction> actions,
- KBookmarkManager * /*mgr*/, QPoint & pt)
+static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions,
+ KBookmarkManager * /*mgr*/, TQPoint & pt)
{
KAction *act = actions.first();
if (!act) {
@@ -413,7 +413,7 @@ static KAction* handleToolbarMouseButton(QPoint pos, QPtrList<KAction> actions,
// don't *ever* show the rmb on press, always relase, possible???
class KBookmarkBarRMBAssoc : public dPtrTemplate<KBookmarkBar, RMB> { };
-template<> QPtrDict<RMB>* dPtrTemplate<KBookmarkBar, RMB>::d_ptr = 0;
+template<> TQPtrDict<RMB>* dPtrTemplate<KBookmarkBar, RMB>::d_ptr = 0;
static RMB* rmbSelf(KBookmarkBar *m) { return KBookmarkBarRMBAssoc::d(m); }
@@ -443,17 +443,17 @@ void KBookmarkBar::slotRMBActionRemove( int val )
void KBookmarkBar::slotRMBActionCopyLocation( int val )
{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); }
-bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
+bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e )
{
if (dptr()->m_readOnly || dptr()->m_filteredMgr) // note, we assume m_pManager in various places,
// this shouldn't really be the case
return false; // todo: make this limit the actions
- if ( (e->type() == QEvent::MouseButtonRelease) || (e->type() == QEvent::MouseButtonPress) ) // FIXME, which one?
+ if ( (e->type() == TQEvent::MouseButtonRelease) || (e->type() == TQEvent::MouseButtonPress) ) // FIXME, which one?
{
- QMouseEvent *mev = (QMouseEvent*)e;
+ TQMouseEvent *mev = (TQMouseEvent*)e;
- QPoint pt;
+ TQPoint pt;
KAction *_a;
// FIXME, see how this holds up on an empty toolbar
@@ -473,18 +473,18 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
return !!_a; // ignore the event if we didn't find the button
}
- else if ( e->type() == QEvent::DragLeave )
+ else if ( e->type() == TQEvent::DragLeave )
{
removeTempSep(dptr());
- dptr()->m_dropAddress = QString::null;
+ dptr()->m_dropAddress = TQString::null;
}
- else if ( e->type() == QEvent::Drop )
+ else if ( e->type() == TQEvent::Drop )
{
removeTempSep(dptr());
- QDropEvent *dev = (QDropEvent*)e;
+ TQDropEvent *dev = (TQDropEvent*)e;
if ( !KBookmarkDrag::canDecode( dev ) )
return false;
- QValueList<KBookmark> list = KBookmarkDrag::decode( dev );
+ TQValueList<KBookmark> list = KBookmarkDrag::decode( dev );
if (list.count() > 1)
kdWarning(7043) << "Sorry, currently you can only drop one address "
"onto the bookmark bar!" << endl;
@@ -492,7 +492,7 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
KBookmark bookmark = m_pManager->findByAddress( dptr()->m_dropAddress );
Q_ASSERT(!bookmark.isNull());
kdDebug(7043) << "inserting "
- << QString(dptr()->m_atFirst ? "before" : "after")
+ << TQString(dptr()->m_atFirst ? "before" : "after")
<< " dptr()->m_dropAddress == " << dptr()->m_dropAddress << endl;
KBookmarkGroup parentBookmark = bookmark.parentGroup();
Q_ASSERT(!parentBookmark.isNull());
@@ -503,13 +503,13 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
m_pManager->emitChanged( parentBookmark );
return true;
}
- else if ( e->type() == QEvent::DragMove )
+ else if ( e->type() == TQEvent::DragMove )
{
- QDragMoveEvent *dme = (QDragMoveEvent*)e;
+ TQDragMoveEvent *dme = (TQDragMoveEvent*)e;
if (!KBookmarkDrag::canDecode( dme ))
return false;
bool _atFirst;
- QString dropAddress;
+ TQString dropAddress;
KToolBar *tb = (KToolBar*)o;
dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager);
if (!dropAddress.isNull())
diff --git a/kio/bookmarks/kbookmarkbar.h b/kio/bookmarks/kbookmarkbar.h
index 162d045bb..f8d2f689e 100644
--- a/kio/bookmarks/kbookmarkbar.h
+++ b/kio/bookmarks/kbookmarkbar.h
@@ -21,9 +21,9 @@
#ifndef KBOOKMARKBAR_H
#define KBOOKMARKBAR_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include <kbookmark.h>
#include <kaction.h>
@@ -59,7 +59,7 @@ public:
KBookmarkBar( KBookmarkManager* manager,
KBookmarkOwner *owner, KToolBar *toolBar,
KActionCollection *,
- QObject *parent = 0L, const char *name = 0L);
+ TQObject *parent = 0L, const char *name = 0L);
virtual ~KBookmarkBar();
@@ -76,22 +76,22 @@ public:
/**
* @since 3.2
*/
- QString parentAddress();
+ TQString parentAddress();
signals:
/**
* @since 3.2
*/
- void aboutToShowContextMenu( const KBookmark &, QPopupMenu * );
+ void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
/**
* @since 3.4
*/
- void openBookmark( const QString& url, Qt::ButtonState state );
+ void openBookmark( const TQString& url, Qt::ButtonState state );
public slots:
void clear();
- void slotBookmarksChanged( const QString & );
+ void slotBookmarksChanged( const TQString & );
void slotBookmarkSelected();
/**
@@ -112,16 +112,16 @@ public slots:
protected:
void fillBookmarkBar( KBookmarkGroup & parent );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
private:
KBookmarkGroup getToolbar();
KBookmarkOwner *m_pOwner;
- QGuardedPtr<KToolBar> m_toolBar;
+ TQGuardedPtr<KToolBar> m_toolBar;
KActionCollection *m_actionCollection;
KBookmarkManager *m_pManager;
- QPtrList<KBookmarkMenu> m_lstSubMenus;
+ TQPtrList<KBookmarkMenu> m_lstSubMenus;
private:
class KBookmarkBarPrivate* dptr() const;
diff --git a/kio/bookmarks/kbookmarkdombuilder.cc b/kio/bookmarks/kbookmarkdombuilder.cc
index 7b6bad4e6..5c0882d05 100644
--- a/kio/bookmarks/kbookmarkdombuilder.cc
+++ b/kio/bookmarks/kbookmarkdombuilder.cc
@@ -35,37 +35,37 @@ KBookmarkDomBuilder::~KBookmarkDomBuilder() {
m_stack.clear();
}
-void KBookmarkDomBuilder::connectImporter(const QObject *importer) {
- connect(importer, SIGNAL( newBookmark(const QString &, const QCString &, const QString &) ),
- SLOT( newBookmark(const QString &, const QCString &, const QString &) ));
- connect(importer, SIGNAL( newFolder(const QString &, bool, const QString &) ),
- SLOT( newFolder(const QString &, bool, const QString &) ));
- connect(importer, SIGNAL( newSeparator() ),
- SLOT( newSeparator() ) );
- connect(importer, SIGNAL( endFolder() ),
- SLOT( endFolder() ) );
+void KBookmarkDomBuilder::connectImporter(const TQObject *importer) {
+ connect(importer, TQT_SIGNAL( newBookmark(const TQString &, const TQCString &, const TQString &) ),
+ TQT_SLOT( newBookmark(const TQString &, const TQCString &, const TQString &) ));
+ connect(importer, TQT_SIGNAL( newFolder(const TQString &, bool, const TQString &) ),
+ TQT_SLOT( newFolder(const TQString &, bool, const TQString &) ));
+ connect(importer, TQT_SIGNAL( newSeparator() ),
+ TQT_SLOT( newSeparator() ) );
+ connect(importer, TQT_SIGNAL( endFolder() ),
+ TQT_SLOT( endFolder() ) );
}
void KBookmarkDomBuilder::newBookmark(
- const QString &text, const QCString &url, const QString &additionalInfo
+ const TQString &text, const TQCString &url, const TQString &additionalInfo
) {
KBookmark bk = m_stack.top().addBookmark(
m_manager, text,
- KURL( QString::fromUtf8(url), 106 /*utf8*/ ),
- QString::null, false);
+ KURL( TQString::fromUtf8(url), 106 /*utf8*/ ),
+ TQString::null, false);
// store additional info
bk.internalElement().setAttribute("netscapeinfo", additionalInfo);
}
void KBookmarkDomBuilder::newFolder(
- const QString & text, bool open, const QString & additionalInfo
+ const TQString & text, bool open, const TQString & additionalInfo
) {
// we use a qvaluelist so that we keep pointers to valid objects in the stack
KBookmarkGroup gp = m_stack.top().createNewFolder(m_manager, text, false);
m_list.append(gp);
m_stack.push(m_list.last());
// store additional info
- QDomElement element = m_list.last().internalElement();
+ TQDomElement element = m_list.last().internalElement();
element.setAttribute("netscapeinfo", additionalInfo);
element.setAttribute("folded", (open?"no":"yes"));
}
diff --git a/kio/bookmarks/kbookmarkdombuilder.h b/kio/bookmarks/kbookmarkdombuilder.h
index f570525f6..f1f712531 100644
--- a/kio/bookmarks/kbookmarkdombuilder.h
+++ b/kio/bookmarks/kbookmarkdombuilder.h
@@ -20,27 +20,27 @@
#ifndef __kbookmarkdombuilder_h
#define __kbookmarkdombuilder_h
-#include <qvaluestack.h>
-#include <qobject.h>
+#include <tqvaluestack.h>
+#include <tqobject.h>
#include <kbookmark.h>
/**
* @since 3.2
*/
-class KIO_EXPORT KBookmarkDomBuilder : public QObject {
+class KIO_EXPORT KBookmarkDomBuilder : public TQObject {
Q_OBJECT
public:
KBookmarkDomBuilder(const KBookmarkGroup &group, KBookmarkManager *);
virtual ~KBookmarkDomBuilder();
- void connectImporter(const QObject *);
+ void connectImporter(const TQObject *);
protected slots:
- void newBookmark(const QString &text, const QCString &url, const QString &additionalInfo);
- void newFolder(const QString &text, bool open, const QString &additionalInfo);
+ void newBookmark(const TQString &text, const TQCString &url, const TQString &additionalInfo);
+ void newFolder(const TQString &text, bool open, const TQString &additionalInfo);
void newSeparator();
void endFolder();
private:
- QValueStack<KBookmarkGroup> m_stack;
- QValueList<KBookmarkGroup> m_list;
+ TQValueStack<KBookmarkGroup> m_stack;
+ TQValueList<KBookmarkGroup> m_list;
KBookmarkManager *m_manager;
class KBookmarkDomBuilderPrivate *p;
};
diff --git a/kio/bookmarks/kbookmarkdrag.cc b/kio/bookmarks/kbookmarkdrag.cc
index 3e1db9c15..d13893eed 100644
--- a/kio/bookmarks/kbookmarkdrag.cc
+++ b/kio/bookmarks/kbookmarkdrag.cc
@@ -22,16 +22,16 @@
#include <kurldrag.h>
#include <kdebug.h>
-KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const TQValueList<KBookmark> & bookmarks, TQWidget * dragSource, const char * name )
{
KURL::List urls;
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
urls.append( (*it).url() );
}
// See KURLDrag::newDrag
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
@@ -42,24 +42,24 @@ KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks,
return new KBookmarkDrag( bookmarks, uris, dragSource, name );
}
-KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, TQWidget * dragSource, const char * name )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
bookmarks.append( KBookmark(bookmark) );
return newDrag(bookmarks, dragSource, name);
}
-KBookmarkDrag::KBookmarkDrag( const QValueList<KBookmark> & bookmarks, const QStrList & urls,
- QWidget * dragSource, const char * name )
- : QUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
+KBookmarkDrag::KBookmarkDrag( const TQValueList<KBookmark> & bookmarks, const TQStrList & urls,
+ TQWidget * dragSource, const char * name )
+ : TQUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
{
// We need to create the XML for this drag right now and not
// in encodedData because when cutting a folder, the children
// wouldn't be part of the bookmarks anymore, when encodedData
// is requested.
- QDomElement elem = m_doc.createElement("xbel");
+ TQDomElement elem = m_doc.createElement("xbel");
m_doc.appendChild( elem );
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
elem.appendChild( (*it).internalElement().cloneNode( true /* deep */ ) );
}
//kdDebug(7043) << "KBookmarkDrag::KBookmarkDrag " << m_doc.toString() << endl;
@@ -76,12 +76,12 @@ const char* KBookmarkDrag::format( int i ) const
else return 0;
}
-QByteArray KBookmarkDrag::encodedData( const char* mime ) const
+TQByteArray KBookmarkDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::encodedData( mime );
else if ( mimetype == "application/x-xbel" )
{
a = m_doc.toCString();
@@ -92,13 +92,13 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
KURL::List m_lstDragURLs;
if ( KURLDrag::decode( this, m_lstDragURLs ) )
{
- QStringList uris;
+ TQStringList uris;
KURL::List::ConstIterator uit = m_lstDragURLs.begin();
KURL::List::ConstIterator uEnd = m_lstDragURLs.end();
for ( ; uit != uEnd ; ++uit )
uris.append( (*uit).prettyURL() );
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
@@ -106,23 +106,23 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
return a;
}
-bool KBookmarkDrag::canDecode( const QMimeSource * e )
+bool KBookmarkDrag::canDecode( const TQMimeSource * e )
{
return e->provides("text/uri-list") || e->provides("application/x-xbel") ||
e->provides("text/plain");
}
-QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
+TQValueList<KBookmark> KBookmarkDrag::decode( const TQMimeSource * e )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
if ( e->provides("application/x-xbel") )
{
- QByteArray s( e->encodedData("application/x-xbel") );
- //kdDebug(7043) << "KBookmarkDrag::decode s=" << QCString(s) << endl;
- QDomDocument doc;
+ TQByteArray s( e->encodedData("application/x-xbel") );
+ //kdDebug(7043) << "KBookmarkDrag::decode s=" << TQCString(s) << endl;
+ TQDomDocument doc;
doc.setContent( s );
- QDomElement elem = doc.documentElement();
- QDomNodeList children = elem.childNodes();
+ TQDomElement elem = doc.documentElement();
+ TQDomNodeList children = elem.childNodes();
for ( uint childno = 0; childno < children.count(); childno++)
{
bookmarks.append( KBookmark( children.item(childno).cloneNode(true).toElement() ));
@@ -149,13 +149,13 @@ QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
if( e->provides("text/plain") )
{
//kdDebug(7043) << "KBookmarkDrag::decode text/plain" << endl;
- QString s;
- if(QTextDrag::decode( e, s ))
+ TQString s;
+ if(TQTextDrag::decode( e, s ))
{
- QStringList listDragURLs = QStringList::split(QChar('\n'), s);
- QStringList::ConstIterator it = listDragURLs.begin();
- QStringList::ConstIterator end = listDragURLs.end();
+ TQStringList listDragURLs = TQStringList::split(TQChar('\n'), s);
+ TQStringList::ConstIterator it = listDragURLs.begin();
+ TQStringList::ConstIterator end = listDragURLs.end();
for( ; it!=end; ++it)
{
//kdDebug(7043)<<"KBookmarkDrag::decode string"<<(*it)<<endl;
diff --git a/kio/bookmarks/kbookmarkdrag.h b/kio/bookmarks/kbookmarkdrag.h
index fdaaf23f3..98aa3b881 100644
--- a/kio/bookmarks/kbookmarkdrag.h
+++ b/kio/bookmarks/kbookmarkdrag.h
@@ -21,36 +21,36 @@
#ifndef __kebdrag_h
#define __kebdrag_h
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kbookmark.h>
// Clipboard/dnd data : URLs + XML for bookmarks
class KIO_EXPORT KBookmarkDrag : public QUriDrag
{
public:
- static KBookmarkDrag * newDrag( const QValueList<KBookmark> & bookmarks,
- QWidget * dragSource = 0,
+ static KBookmarkDrag * newDrag( const TQValueList<KBookmark> & bookmarks,
+ TQWidget * dragSource = 0,
const char * name = 0 );
static KBookmarkDrag * newDrag( const KBookmark & bookmark,
- QWidget * dragSource = 0,
+ TQWidget * dragSource = 0,
const char * name = 0 );
protected:
- KBookmarkDrag( const QValueList<KBookmark> & bookmarks,
- const QStrList & urls,
- QWidget * dragSource,
+ KBookmarkDrag( const TQValueList<KBookmark> & bookmarks,
+ const TQStrList & urls,
+ TQWidget * dragSource,
const char * name );
public:
virtual ~KBookmarkDrag() {}
virtual const char* format( int i ) const;
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
- static bool canDecode( const QMimeSource * e );
- static QValueList<KBookmark> decode( const QMimeSource * e );
+ static bool canDecode( const TQMimeSource * e );
+ static TQValueList<KBookmark> decode( const TQMimeSource * e );
protected:
- QValueList<KBookmark> m_bookmarks;
- QDomDocument m_doc;
+ TQValueList<KBookmark> m_bookmarks;
+ TQDomDocument m_doc;
class KBookmarkDragPrivate;
KBookmarkDragPrivate * d;
};
diff --git a/kio/bookmarks/kbookmarkexporter.cc b/kio/bookmarks/kbookmarkexporter.cc
index 8ed394ad1..30c52bdb8 100644
--- a/kio/bookmarks/kbookmarkexporter.cc
+++ b/kio/bookmarks/kbookmarkexporter.cc
@@ -19,9 +19,9 @@
*/
#include <stdio.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <klocale.h>
diff --git a/kio/bookmarks/kbookmarkexporter.h b/kio/bookmarks/kbookmarkexporter.h
index 19978b3dd..0943d6cbe 100644
--- a/kio/bookmarks/kbookmarkexporter.h
+++ b/kio/bookmarks/kbookmarkexporter.h
@@ -23,7 +23,7 @@
#ifndef __kbookmarkexporter_h
#define __kbookmarkexporter_h
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kbookmark.h>
/**
@@ -32,13 +32,13 @@
class KIO_EXPORT KBookmarkExporterBase
{
public:
- KBookmarkExporterBase(KBookmarkManager* mgr, const QString & fileName)
+ KBookmarkExporterBase(KBookmarkManager* mgr, const TQString & fileName)
: m_fileName(fileName), m_pManager(mgr)
{ ; }
virtual ~KBookmarkExporterBase() {}
virtual void write(KBookmarkGroup) = 0;
protected:
- QString m_fileName;
+ TQString m_fileName;
KBookmarkManager* m_pManager;
private:
class KBookmarkExporterBasePrivate *d;
diff --git a/kio/bookmarks/kbookmarkimporter.cc b/kio/bookmarks/kbookmarkimporter.cc
index b646b0626..8a31fa3d2 100644
--- a/kio/bookmarks/kbookmarkimporter.cc
+++ b/kio/bookmarks/kbookmarkimporter.cc
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -70,19 +70,19 @@ void KXBELBookmarkImporterImpl::visitLeave(const KBookmarkGroup &)
emit endFolder();
}
-void KBookmarkImporterBase::setupSignalForwards(QObject *src, QObject *dst)
+void KBookmarkImporterBase::setupSignalForwards(TQObject *src, TQObject *dst)
{
- connect(src, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ),
- dst, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ));
- connect(src, SIGNAL( newFolder( const QString &, bool, const QString & ) ),
- dst, SIGNAL( newFolder( const QString &, bool, const QString & ) ));
- connect(src, SIGNAL( newSeparator() ),
- dst, SIGNAL( newSeparator() ) );
- connect(src, SIGNAL( endFolder() ),
- dst, SIGNAL( endFolder() ) );
+ connect(src, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ),
+ dst, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ));
+ connect(src, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ),
+ dst, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ));
+ connect(src, TQT_SIGNAL( newSeparator() ),
+ dst, TQT_SIGNAL( newSeparator() ) );
+ connect(src, TQT_SIGNAL( endFolder() ),
+ dst, TQT_SIGNAL( endFolder() ) );
}
-KBookmarkImporterBase* KBookmarkImporterBase::factory( const QString &type )
+KBookmarkImporterBase* KBookmarkImporterBase::factory( const TQString &type )
{
if (type == "netscape")
return new KNSBookmarkImporterImpl;
diff --git a/kio/bookmarks/kbookmarkimporter.h b/kio/bookmarks/kbookmarkimporter.h
index f8f53ffa2..bf8d61137 100644
--- a/kio/bookmarks/kbookmarkimporter.h
+++ b/kio/bookmarks/kbookmarkimporter.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_h
#define __kbookmarkimporter_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include "kbookmark.h"
@@ -41,27 +41,27 @@ public:
KBookmarkImporterBase() {}
virtual ~KBookmarkImporterBase() {}
- void setFilename(const QString &filename) { m_fileName = filename; }
+ void setFilename(const TQString &filename) { m_fileName = filename; }
virtual void parse() = 0;
- virtual QString findDefaultLocation(bool forSaving = false) const = 0;
+ virtual TQString findDefaultLocation(bool forSaving = false) const = 0;
// TODO - make this static?
- void setupSignalForwards(QObject *src, QObject *dst);
- static KBookmarkImporterBase *factory(const QString &type);
+ void setupSignalForwards(TQObject *src, TQObject *dst);
+ static KBookmarkImporterBase *factory(const TQString &type);
signals:
/**
* Notify about a new bookmark
* Use "html" for the icon
*/
- void newBookmark(const QString & text, const QCString & url, const QString & additionalInfo);
+ void newBookmark(const TQString & text, const TQCString & url, const TQString & additionalInfo);
/**
* Notify about a new folder
* Use "bookmark_folder" for the icon
*/
- void newFolder(const QString & text, bool open, const QString & additionalInfo);
+ void newFolder(const TQString & text, bool open, const TQString & additionalInfo);
/**
* Notify about a new separator
@@ -75,7 +75,7 @@ signals:
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
private:
class KBookmarkImporterBasePrivate *d;
@@ -90,7 +90,7 @@ class KIO_EXPORT KXBELBookmarkImporterImpl : public KBookmarkImporterBase, prote
public:
KXBELBookmarkImporterImpl() {}
virtual void parse();
- virtual QString findDefaultLocation(bool = false) const { return QString::null; }
+ virtual TQString findDefaultLocation(bool = false) const { return TQString::null; }
protected:
virtual void visit(const KBookmark &);
virtual void visitEnter(const KBookmarkGroup &);
diff --git a/kio/bookmarks/kbookmarkimporter_crash.cc b/kio/bookmarks/kbookmarkimporter_crash.cc
index b585df4c7..594dc0239 100644
--- a/kio/bookmarks/kbookmarkimporter_crash.cc
+++ b/kio/bookmarks/kbookmarkimporter_crash.cc
@@ -26,10 +26,10 @@
#include <kdebug.h>
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
#include <dcopclient.h>
#include <sys/types.h>
@@ -37,27 +37,27 @@
#include <dirent.h>
#include <sys/stat.h>
-typedef QMap<QString, QString> ViewMap;
+typedef TQMap<TQString, TQString> ViewMap;
// KDE 4.0: remove this BC keeping stub
-void KCrashBookmarkImporter::parseCrashLog( QString /*filename*/, bool /*del*/ )
+void KCrashBookmarkImporter::parseCrashLog( TQString /*filename*/, bool /*del*/ )
{
;
}
-ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filename, bool del )
+ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filename, bool del )
{
static const int g_lineLimit = 16*1024;
- QFile f( filename );
+ TQFile f( filename );
ViewMap views;
if ( !f.open( IO_ReadOnly ) )
return views;
- QCString s( g_lineLimit );
+ TQCString s( g_lineLimit );
- QTextCodec * codec = QTextCodec::codecForName( "UTF-8" );
+ TQTextCodec * codec = TQTextCodec::codecForName( "UTF-8" );
Q_ASSERT( codec );
if ( !codec )
return views;
@@ -69,8 +69,8 @@ ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filena
kdWarning() << "Crash bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QString t = codec->toUnicode( s.stripWhiteSpace() );
- QRegExp rx( "(.*)\\((.*)\\):(.*)$" );
+ TQString t = codec->toUnicode( s.stripWhiteSpace() );
+ TQRegExp rx( "(.*)\\((.*)\\):(.*)$" );
rx.setMinimal( true );
if ( !rx.exactMatch( t ) )
continue;
@@ -88,28 +88,28 @@ ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filena
return views;
}
-QStringList KCrashBookmarkImporter::getCrashLogs()
+TQStringList KCrashBookmarkImporter::getCrashLogs()
{
return KCrashBookmarkImporterImpl::getCrashLogs();
}
-QStringList KCrashBookmarkImporterImpl::getCrashLogs()
+TQStringList KCrashBookmarkImporterImpl::getCrashLogs()
{
- QMap<QString, bool> activeLogs;
+ TQMap<TQString, bool> activeLogs;
DCOPClient* dcop = kapp->dcopClient();
QCStringList apps = dcop->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- QCString &clientId = *it;
+ TQCString &clientId = *it;
if ( qstrncmp(clientId, "konqueror", 9) != 0 )
continue;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
if ( !dcop->call( clientId.data(), "KonquerorIface",
"crashLogFile()", data, replyType, replyData) )
@@ -118,25 +118,25 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
continue;
}
- if ( replyType != "QString" )
+ if ( replyType != "TQString" )
continue;
- QDataStream reply( replyData, IO_ReadOnly );
- QString ret;
+ TQDataStream reply( replyData, IO_ReadOnly );
+ TQString ret;
reply >> ret;
activeLogs[ret] = true;
}
- QDir d( KCrashBookmarkImporterImpl().findDefaultLocation() );
- d.setSorting( QDir::Time );
- d.setFilter( QDir::Files );
+ TQDir d( KCrashBookmarkImporterImpl().findDefaultLocation() );
+ d.setSorting( TQDir::Time );
+ d.setFilter( TQDir::Files );
d.setNameFilter( "konqueror-crash-*.log" );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
- QStringList crashFiles;
+ TQFileInfo *fi;
+ TQStringList crashFiles;
int count = 0;
for ( ; (( fi = it.current() ) != 0) && (count < 20); ++it, ++count )
@@ -148,7 +148,7 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
// Delete remaining ones
for ( ; ( fi = it.current() ) != 0; ++it )
{
- QFile::remove( fi->absFilePath() );
+ TQFile::remove( fi->absFilePath() );
}
return crashFiles;
@@ -156,20 +156,20 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
void KCrashBookmarkImporterImpl::parse()
{
- QDict<bool> signatureMap;
- QStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs();
+ TQDict<bool> signatureMap;
+ TQStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs();
int count = 1;
- for ( QStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it )
+ for ( TQStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it )
{
ViewMap views;
views = parseCrashLog_noemit( *it, m_shouldDelete );
- QString signature;
+ TQString signature;
for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit )
signature += "|"+vit.data();
if (signatureMap[signature])
{
// Duplicate... throw away and skip
- QFile::remove(*it);
+ TQFile::remove(*it);
continue;
}
@@ -177,15 +177,15 @@ void KCrashBookmarkImporterImpl::parse()
int outerFolder = ( crashFiles.count() > 1 ) && (views.count() > 0);
if ( outerFolder )
- emit newFolder( QString("Konqueror Window %1").arg(count++), false, "" );
+ emit newFolder( TQString("Konqueror Window %1").arg(count++), false, "" );
for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit )
- emit newBookmark( vit.data(), vit.data().latin1(), QString("") );
+ emit newBookmark( vit.data(), vit.data().latin1(), TQString("") );
if ( outerFolder )
emit endFolder();
}
}
-QString KCrashBookmarkImporter::crashBookmarksDir()
+TQString KCrashBookmarkImporter::crashBookmarksDir()
{
static KCrashBookmarkImporterImpl *p = 0;
if (!p)
@@ -207,7 +207,7 @@ void KCrashBookmarkImporter::parseCrashBookmarks( bool del )
importer.parse();
}
-QString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const
+TQString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const
{
return locateLocal( "tmp", "" );
}
diff --git a/kio/bookmarks/kbookmarkimporter_crash.h b/kio/bookmarks/kbookmarkimporter_crash.h
index 701387b4e..e22ef1b9e 100644
--- a/kio/bookmarks/kbookmarkimporter_crash.h
+++ b/kio/bookmarks/kbookmarkimporter_crash.h
@@ -21,10 +21,10 @@
#ifndef __kbookmarkimporter_crash_h
#define __kbookmarkimporter_crash_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -38,19 +38,19 @@ class KIO_EXPORT_DEPRECATED KCrashBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KCrashBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KCrashBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KCrashBookmarkImporter() {}
void parseCrashBookmarks( bool del = true );
- static QString crashBookmarksDir( );
- static QStringList getCrashLogs(); // EMPTY!
+ static TQString crashBookmarksDir( );
+ static TQStringList getCrashLogs(); // EMPTY!
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
- void parseCrashLog( QString filename, bool del ); // EMPTY!
+ TQString m_fileName;
+ void parseCrashLog( TQString filename, bool del ); // EMPTY!
};
/**
@@ -63,11 +63,11 @@ public:
KCrashBookmarkImporterImpl() : m_shouldDelete(false) { }
void setShouldDelete(bool);
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
- static QStringList getCrashLogs();
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
+ static TQStringList getCrashLogs();
private:
bool m_shouldDelete;
- QMap<QString, QString> parseCrashLog_noemit( const QString & filename, bool del );
+ TQMap<TQString, TQString> parseCrashLog_noemit( const TQString & filename, bool del );
class KCrashBookmarkImporterImplPrivate *d;
};
diff --git a/kio/bookmarks/kbookmarkimporter_ie.cc b/kio/bookmarks/kbookmarkimporter_ie.cc
index a2e863518..f37a6a4be 100644
--- a/kio/bookmarks/kbookmarkimporter_ie.cc
+++ b/kio/bookmarks/kbookmarkimporter_ie.cc
@@ -22,7 +22,7 @@
#include <kstringhandler.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -32,15 +32,15 @@
#include "kbookmarkimporter.h"
#include "kbookmarkimporter_ie.h"
-/* antlarr: KDE 4: Make them const QString & */
-void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString name ) {
+/* antlarr: KDE 4: Make them const TQString & */
+void KIEBookmarkImporter::parseIEBookmarks_url_file( TQString filename, TQString name ) {
static const int g_lineLimit = 16*1024;
- QFile f(filename);
+ TQFile f(filename);
if(f.open(IO_ReadOnly)) {
- QCString s(g_lineLimit);
+ TQCString s(g_lineLimit);
while(f.readLine(s.data(), g_lineLimit)>=0) {
if ( s[s.length()-1] != '\n' ) // Gosh, this line is longer than g_lineLimit. Skipping.
@@ -48,10 +48,10 @@ void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString n
kdWarning() << "IE bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QCString t = s.stripWhiteSpace();
- QRegExp rx( "URL=(.*)" );
+ TQCString t = s.stripWhiteSpace();
+ TQRegExp rx( "URL=(.*)" );
if (rx.exactMatch(t)) {
- emit newBookmark( name, rx.cap(1).latin1(), QString("") );
+ emit newBookmark( name, rx.cap(1).latin1(), TQString("") );
}
}
@@ -59,13 +59,13 @@ void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString n
}
}
-/* antlarr: KDE 4: Make them const QString & */
-void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldername )
+/* antlarr: KDE 4: Make them const TQString & */
+void KIEBookmarkImporter::parseIEBookmarks_dir( TQString dirname, TQString foldername )
{
- QDir dir(dirname);
- dir.setFilter( QDir::Files | QDir::Dirs );
- dir.setSorting( QDir::Name | QDir::DirsFirst );
+ TQDir dir(dirname);
+ dir.setFilter( TQDir::Files | TQDir::Dirs );
+ dir.setSorting( TQDir::Name | TQDir::DirsFirst );
dir.setNameFilter("*.url"); // AK - possibly add ";index.ini" ?
dir.setMatchAllDirs(true);
@@ -76,7 +76,7 @@ void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldern
emit newFolder( foldername, false, "" );
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
++it;
@@ -88,7 +88,7 @@ void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldern
} else if (fi->isFile()) {
if (fi->fileName().endsWith(".url")) {
- QString name = fi->fileName();
+ TQString name = fi->fileName();
name.truncate(name.length() - 4); // .url
parseIEBookmarks_url_file(fi->absFilePath(), name);
}
@@ -106,7 +106,7 @@ void KIEBookmarkImporter::parseIEBookmarks( )
parseIEBookmarks_dir( m_fileName );
}
-QString KIEBookmarkImporter::IEBookmarksDir()
+TQString KIEBookmarkImporter::IEBookmarksDir()
{
static KIEBookmarkImporterImpl* p = 0;
if (!p)
@@ -120,7 +120,7 @@ void KIEBookmarkImporterImpl::parse() {
importer.parseIEBookmarks();
}
-QString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
+TQString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
{
// notify user that they must give a new dir such
// as "Favourites" as otherwise it'll just place
@@ -135,38 +135,38 @@ QString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
class IEExporter : private KBookmarkGroupTraverser {
public:
- IEExporter( const QString & );
+ IEExporter( const TQString & );
void write( const KBookmarkGroup &grp ) { traverse(grp); };
private:
virtual void visit( const KBookmark & );
virtual void visitEnter( const KBookmarkGroup & );
virtual void visitLeave( const KBookmarkGroup & );
private:
- QDir m_currentDir;
+ TQDir m_currentDir;
};
-static QString ieStyleQuote( const QString &str ) {
- QString s(str);
- s.replace(QRegExp("[/\\:*?\"<>|]"), "_");
+static TQString ieStyleQuote( const TQString &str ) {
+ TQString s(str);
+ s.replace(TQRegExp("[/\\:*?\"<>|]"), "_");
return s;
}
-IEExporter::IEExporter( const QString & dname ) {
+IEExporter::IEExporter( const TQString & dname ) {
m_currentDir.setPath( dname );
}
void IEExporter::visit( const KBookmark &bk ) {
- QString fname = m_currentDir.path() + "/" + ieStyleQuote( bk.fullText() ) + ".url";
+ TQString fname = m_currentDir.path() + "/" + ieStyleQuote( bk.fullText() ) + ".url";
// kdDebug() << "visit(" << bk.text() << "), fname == " << fname << endl;
- QFile file( fname );
+ TQFile file( fname );
file.open( IO_WriteOnly );
- QTextStream ts( &file );
+ TQTextStream ts( &file );
ts << "[InternetShortcut]\r\n";
ts << "URL=" << bk.url().url().utf8() << "\r\n";
}
void IEExporter::visitEnter( const KBookmarkGroup &grp ) {
- QString dname = m_currentDir.path() + "/" + ieStyleQuote( grp.fullText() );
+ TQString dname = m_currentDir.path() + "/" + ieStyleQuote( grp.fullText() );
// kdDebug() << "visitEnter(" << grp.text() << "), dname == " << dname << endl;
m_currentDir.mkdir( dname );
m_currentDir.cd( dname );
diff --git a/kio/bookmarks/kbookmarkimporter_ie.h b/kio/bookmarks/kbookmarkimporter_ie.h
index 86f41a4f6..2a9ddac6d 100644
--- a/kio/bookmarks/kbookmarkimporter_ie.h
+++ b/kio/bookmarks/kbookmarkimporter_ie.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_ie_h
#define __kbookmarkimporter_ie_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -37,25 +37,25 @@ class KIO_EXPORT_DEPRECATED KIEBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KIEBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KIEBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KIEBookmarkImporter() {}
void parseIEBookmarks();
// Usual place for IE bookmarks
- static QString IEBookmarksDir();
+ static TQString IEBookmarksDir();
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- void parseIEBookmarks_dir( QString dirname, QString name = QString::null );
- void parseIEBookmarks_url_file( QString filename, QString name );
+ void parseIEBookmarks_dir( TQString dirname, TQString name = TQString::null );
+ void parseIEBookmarks_url_file( TQString filename, TQString name );
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -67,7 +67,7 @@ class KIO_EXPORT KIEBookmarkImporterImpl : public KBookmarkImporterBase
public:
KIEBookmarkImporterImpl() { }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
class KIEBookmarkImporterImplPrivate *d;
};
@@ -78,7 +78,7 @@ private:
class KIO_EXPORT KIEBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KIEBookmarkExporterImpl(KBookmarkManager* mgr, const QString & path)
+ KIEBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & path)
: KBookmarkExporterBase(mgr, path)
{ ; }
virtual ~KIEBookmarkExporterImpl() {}
diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc
index 72fe8dbb3..510787ab1 100644
--- a/kio/bookmarks/kbookmarkimporter_kde1.cc
+++ b/kio/bookmarks/kbookmarkimporter_kde1.cc
@@ -24,7 +24,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -34,19 +34,19 @@
////////////////////
-void KBookmarkImporter::import( const QString & path )
+void KBookmarkImporter::import( const TQString & path )
{
- QDomElement elem = m_pDoc->documentElement();
+ TQDomElement elem = m_pDoc->documentElement();
Q_ASSERT(!elem.isNull());
scanIntern( elem, path );
}
-void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _path )
+void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString & _path )
{
kdDebug(7043) << "KBookmarkImporter::scanIntern " << _path << endl;
// Substitute all symbolic links in the path
- QDir dir( _path );
- QString canonical = dir.canonicalPath();
+ TQDir dir( _path );
+ TQString canonical = dir.canonicalPath();
if ( m_lstParsedDirs.contains(canonical) )
{
@@ -58,7 +58,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
DIR *dp;
struct dirent *ep;
- dp = opendir( QFile::encodeName(_path) );
+ dp = opendir( TQFile::encodeName(_path) );
if ( dp == 0L )
return;
@@ -68,7 +68,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
if ( strcmp( ep->d_name, "." ) != 0 && strcmp( ep->d_name, ".." ) != 0 )
{
KURL file;
- file.setPath( QString( _path ) + '/' + QFile::decodeName(ep->d_name) );
+ file.setPath( TQString( _path ) + '/' + TQFile::decodeName(ep->d_name) );
KMimeType::Ptr res = KMimeType::findByURL( file, 0, true );
//kdDebug(7043) << " - " << file.url() << " -> " << res->name() << endl;
@@ -77,9 +77,9 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
// We could use KBookmarkGroup::createNewFolder, but then it
// would notify about the change, so we'd need a flag, etc.
- QDomElement groupElem = m_pDoc->createElement( "folder" );
+ TQDomElement groupElem = m_pDoc->createElement( "folder" );
parentElem.appendChild( groupElem );
- QDomElement textElem = m_pDoc->createElement( "title" );
+ TQDomElement textElem = m_pDoc->createElement( "title" );
groupElem.appendChild( textElem );
textElem.appendChild( m_pDoc->createTextNode( KIO::decodeFileName( ep->d_name ) ) );
if ( KIO::decodeFileName( ep->d_name ) == "Toolbar" )
@@ -90,7 +90,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
KSimpleConfig cfg( file.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
// Is it really a bookmark file ?
if ( type == "Link" )
parseBookmark( parentElem, ep->d_name, cfg, 0 /* desktop group */ );
@@ -101,12 +101,12 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
// maybe its an IE Favourite..
KSimpleConfig cfg( file.path(), true );
- QStringList grp = cfg.groupList().grep( "internetshortcut", false );
+ TQStringList grp = cfg.groupList().grep( "internetshortcut", false );
if ( grp.count() == 0 )
continue;
cfg.setGroup( *grp.begin() );
- QString url = cfg.readPathEntry("URL");
+ TQString url = cfg.readPathEntry("URL");
if (!url.isEmpty() )
parseBookmark( parentElem, ep->d_name, cfg, *grp.begin() );
} else
@@ -117,33 +117,33 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
closedir( dp );
}
-void KBookmarkImporter::parseBookmark( QDomElement & parentElem, QCString _text,
- KSimpleConfig& _cfg, const QString &_group )
+void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _text,
+ KSimpleConfig& _cfg, const TQString &_group )
{
if ( !_group.isEmpty() )
_cfg.setGroup( _group );
else
_cfg.setDesktopGroup();
- QString url = _cfg.readPathEntry( "URL" );
- QString icon = _cfg.readEntry( "Icon" );
+ TQString url = _cfg.readPathEntry( "URL" );
+ TQString icon = _cfg.readEntry( "Icon" );
if (icon.right( 4 ) == ".xpm" ) // prevent warnings
icon.truncate( icon.length() - 4 );
- QString text = KIO::decodeFileName( QString::fromLocal8Bit(_text) );
+ TQString text = KIO::decodeFileName( TQString::fromLocal8Bit(_text) );
if ( text.length() > 8 && text.right( 8 ) == ".desktop" )
text.truncate( text.length() - 8 );
if ( text.length() > 7 && text.right( 7 ) == ".kdelnk" )
text.truncate( text.length() - 7 );
- QDomElement elem = m_pDoc->createElement( "bookmark" );
+ TQDomElement elem = m_pDoc->createElement( "bookmark" );
parentElem.appendChild( elem );
elem.setAttribute( "href", url );
//if ( icon != "www" ) // No need to save the default
// Hmm, after all, it makes KBookmark::pixmapFile faster,
// and it shows a nice feature to those reading the file
elem.setAttribute( "icon", icon );
- QDomElement textElem = m_pDoc->createElement( "title" );
+ TQDomElement textElem = m_pDoc->createElement( "title" );
elem.appendChild( textElem );
textElem.appendChild( m_pDoc->createTextNode( text ) );
kdDebug(7043) << "KBookmarkImporter::parseBookmark text=" << text << endl;
diff --git a/kio/bookmarks/kbookmarkimporter_kde1.h b/kio/bookmarks/kbookmarkimporter_kde1.h
index 9811cce55..7e6ad2395 100644
--- a/kio/bookmarks/kbookmarkimporter_kde1.h
+++ b/kio/bookmarks/kbookmarkimporter_kde1.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_kde1_h
#define __kbookmarkimporter_kde1_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
/**
@@ -34,16 +34,16 @@
class KIO_EXPORT KBookmarkImporter
{
public:
- KBookmarkImporter( QDomDocument * doc ) : m_pDoc(doc) {}
+ KBookmarkImporter( TQDomDocument * doc ) : m_pDoc(doc) {}
- void import( const QString & path );
+ void import( const TQString & path );
private:
- void scanIntern( QDomElement & parentElem, const QString & _path );
- void parseBookmark( QDomElement & parentElem, QCString _text,
- KSimpleConfig& _cfg, const QString &_group );
- QDomDocument * m_pDoc;
- QStringList m_lstParsedDirs;
+ void scanIntern( TQDomElement & parentElem, const TQString & _path );
+ void parseBookmark( TQDomElement & parentElem, TQCString _text,
+ KSimpleConfig& _cfg, const TQString &_group );
+ TQDomDocument * m_pDoc;
+ TQStringList m_lstParsedDirs;
};
#endif
diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc
index 23f37e4cb..5521bee7e 100644
--- a/kio/bookmarks/kbookmarkimporter_ns.cc
+++ b/kio/bookmarks/kbookmarkimporter_ns.cc
@@ -28,8 +28,8 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <sys/types.h>
#include <stddef.h>
@@ -39,8 +39,8 @@
void KNSBookmarkImporterImpl::parse()
{
- QFile f(m_fileName);
- QTextCodec * codec = m_utf8 ? QTextCodec::codecForName("UTF-8") : QTextCodec::codecForLocale();
+ TQFile f(m_fileName);
+ TQTextCodec * codec = m_utf8 ? TQTextCodec::codecForName("UTF-8") : TQTextCodec::codecForLocale();
Q_ASSERT(codec);
if (!codec)
return;
@@ -48,7 +48,7 @@ void KNSBookmarkImporterImpl::parse()
if(f.open(IO_ReadOnly)) {
static const int g_lineLimit = 16*1024;
- QCString s(g_lineLimit);
+ TQCString s(g_lineLimit);
// skip header
while(f.readLine(s.data(), g_lineLimit) >= 0 && !s.contains("<DL>"));
@@ -58,21 +58,21 @@ void KNSBookmarkImporterImpl::parse()
kdWarning() << "Netscape bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QCString t = s.stripWhiteSpace();
+ TQCString t = s.stripWhiteSpace();
if(t.left(12).upper() == "<DT><A HREF=" ||
t.left(16).upper() == "<DT><H3><A HREF=") {
int firstQuotes = t.find('"')+1;
int secondQuotes = t.find('"', firstQuotes);
if (firstQuotes != -1 && secondQuotes != -1)
{
- QCString link = t.mid(firstQuotes, secondQuotes-firstQuotes);
+ TQCString link = t.mid(firstQuotes, secondQuotes-firstQuotes);
int endTag = t.find('>', secondQuotes+1);
- QCString name = t.mid(endTag+1);
+ TQCString name = t.mid(endTag+1);
name = name.left(name.findRev('<'));
if ( name.right(4) == "</A>" )
name = name.left( name.length() - 4 );
- QString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
- QCString additionalInfo = t.mid( secondQuotes+1, endTag-secondQuotes-1 );
+ TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
+ TQCString additionalInfo = t.mid( secondQuotes+1, endTag-secondQuotes-1 );
emit newBookmark( qname,
link, codec->toUnicode(additionalInfo) );
@@ -80,10 +80,10 @@ void KNSBookmarkImporterImpl::parse()
}
else if(t.left(7).upper() == "<DT><H3") {
int endTag = t.find('>', 7);
- QCString name = t.mid(endTag+1);
+ TQCString name = t.mid(endTag+1);
name = name.left(name.findRev('<'));
- QString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
- QCString additionalInfo = t.mid( 8, endTag-8 );
+ TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
+ TQCString additionalInfo = t.mid( 8, endTag-8 );
bool folded = (additionalInfo.left(6) == "FOLDED");
if (folded) additionalInfo.remove(0,7);
@@ -101,20 +101,20 @@ void KNSBookmarkImporterImpl::parse()
}
}
-QString KNSBookmarkImporterImpl::findDefaultLocation(bool forSaving) const
+TQString KNSBookmarkImporterImpl::findDefaultLocation(bool forSaving) const
{
if (m_utf8)
{
if ( forSaving )
- return KFileDialog::getSaveFileName( QDir::homeDirPath() + "/.mozilla",
+ return KFileDialog::getSaveFileName( TQDir::homeDirPath() + "/.mozilla",
i18n("*.html|HTML Files (*.html)") );
else
- return KFileDialog::getOpenFileName( QDir::homeDirPath() + "/.mozilla",
+ return KFileDialog::getOpenFileName( TQDir::homeDirPath() + "/.mozilla",
i18n("*.html|HTML Files (*.html)") );
}
else
{
- return QDir::homeDirPath() + "/.netscape/bookmarks.html";
+ return TQDir::homeDirPath() + "/.netscape/bookmarks.html";
}
}
@@ -130,7 +130,7 @@ void KNSBookmarkImporter::parseNSBookmarks( bool utf8 )
importer.parse();
}
-QString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
+TQString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
{
static KNSBookmarkImporterImpl *p = 0;
if (!p)
@@ -141,7 +141,7 @@ QString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
return p->findDefaultLocation(forSaving);
}
-QString KNSBookmarkImporter::mozillaBookmarksFile( bool forSaving )
+TQString KNSBookmarkImporter::mozillaBookmarksFile( bool forSaving )
{
static KNSBookmarkImporterImpl *p = 0;
if (!p)
@@ -163,7 +163,7 @@ void KNSBookmarkExporter::write(bool utf8) {
exporter.write(m_pManager->root());
}
-void KNSBookmarkExporter::writeFolder(QTextStream &/*stream*/, KBookmarkGroup /*gp*/) {
+void KNSBookmarkExporter::writeFolder(TQTextStream &/*stream*/, KBookmarkGroup /*gp*/) {
// TODO - requires a d pointer workaround hack?
}
@@ -174,24 +174,24 @@ void KNSBookmarkExporterImpl::setUtf8(bool utf8) {
}
void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) {
- if (QFile::exists(m_fileName)) {
+ if (TQFile::exists(m_fileName)) {
::rename(
- QFile::encodeName(m_fileName),
- QFile::encodeName(m_fileName + ".beforekde"));
+ TQFile::encodeName(m_fileName),
+ TQFile::encodeName(m_fileName + ".beforekde"));
}
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (!file.open(IO_WriteOnly)) {
kdError(7043) << "Can't write to file " << m_fileName << endl;
return;
}
- QTextStream fstream(&file);
- fstream.setEncoding(m_utf8 ? QTextStream::UnicodeUTF8 : QTextStream::Locale);
+ TQTextStream fstream(&file);
+ fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale);
- QString charset
- = m_utf8 ? "UTF-8" : QString::fromLatin1(QTextCodec::codecForLocale()->name()).upper();
+ TQString charset
+ = m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper();
fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl
<< i18n("<!-- This file was generated by Konqueror -->") << endl
@@ -204,9 +204,9 @@ void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) {
<< "</DL><P>" << endl;
}
-QString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
- QString str;
- QTextStream fstream(&str, IO_WriteOnly);
+TQString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
+ TQString str;
+ TQTextStream fstream(&str, IO_WriteOnly);
for (KBookmark bk = parent.first(); !bk.isNull(); bk = parent.next(bk)) {
if (bk.isSeparator()) {
@@ -214,7 +214,7 @@ QString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
continue;
}
- QString text = QStyleSheet::escape(bk.fullText());
+ TQString text = TQStyleSheet::escape(bk.fullText());
if (bk.isGroup() ) {
fstream << "<DT><H3 "
diff --git a/kio/bookmarks/kbookmarkimporter_ns.h b/kio/bookmarks/kbookmarkimporter_ns.h
index 48f6705aa..8b5c76338 100644
--- a/kio/bookmarks/kbookmarkimporter_ns.h
+++ b/kio/bookmarks/kbookmarkimporter_ns.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_ns_h
#define __kbookmarkimporter_ns_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -38,7 +38,7 @@ class KIO_EXPORT_DEPRECATED KNSBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KNSBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KNSBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KNSBookmarkImporter() {}
// for compat reasons only
@@ -46,17 +46,17 @@ public:
// go for it. Set utf8 to true for Mozilla, false for Netscape.
void parseNSBookmarks( bool utf8 );
- static QString netscapeBookmarksFile( bool forSaving=false );
- static QString mozillaBookmarksFile( bool forSaving=false );
+ static TQString netscapeBookmarksFile( bool forSaving=false );
+ static TQString mozillaBookmarksFile( bool forSaving=false );
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -70,7 +70,7 @@ public:
KNSBookmarkImporterImpl() : m_utf8(false) { }
void setUtf8(bool utf8) { m_utf8 = utf8; }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
bool m_utf8;
class KNSBookmarkImporterImplPrivate *d;
@@ -97,7 +97,7 @@ private:
class KIO_EXPORT_DEPRECATED KNSBookmarkExporter
{
public:
- KNSBookmarkExporter(KBookmarkManager* mgr, const QString & fileName)
+ KNSBookmarkExporter(KBookmarkManager* mgr, const TQString & fileName)
: m_fileName(fileName), m_pManager(mgr) { }
~KNSBookmarkExporter() {}
@@ -105,8 +105,8 @@ public:
void write( bool utf8 );
protected:
- void writeFolder(QTextStream &stream, KBookmarkGroup parent);
- QString m_fileName;
+ void writeFolder(TQTextStream &stream, KBookmarkGroup parent);
+ TQString m_fileName;
KBookmarkManager* m_pManager;
};
@@ -116,14 +116,14 @@ protected:
class KIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KNSBookmarkExporterImpl(KBookmarkManager* mgr, const QString & fileName)
+ KNSBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & fileName)
: KBookmarkExporterBase(mgr, fileName)
{ ; }
virtual ~KNSBookmarkExporterImpl() {}
virtual void write(KBookmarkGroup);
void setUtf8(bool);
protected:
- QString folderAsString(KBookmarkGroup) const;
+ TQString folderAsString(KBookmarkGroup) const;
private:
bool m_utf8;
class KNSBookmarkExporterImplPrivate *d;
diff --git a/kio/bookmarks/kbookmarkimporter_opera.cc b/kio/bookmarks/kbookmarkimporter_opera.cc
index 6e2a90570..45ac1a7ca 100644
--- a/kio/bookmarks/kbookmarkimporter_opera.cc
+++ b/kio/bookmarks/kbookmarkimporter_opera.cc
@@ -22,7 +22,7 @@
#include <kstringhandler.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -34,20 +34,20 @@
void KOperaBookmarkImporter::parseOperaBookmarks( )
{
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if(!file.open(IO_ReadOnly)) {
return;
}
- QTextCodec * codec = QTextCodec::codecForName("UTF-8");
+ TQTextCodec * codec = TQTextCodec::codecForName("UTF-8");
Q_ASSERT(codec);
if (!codec)
return;
int lineno = 0;
- QString url, name, type;
+ TQString url, name, type;
static const int g_lineLimit = 16*1024;
- QCString line(g_lineLimit);
+ TQCString line(g_lineLimit);
while ( file.readLine(line.data(), g_lineLimit) >=0 ) {
lineno++;
@@ -56,7 +56,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
if ( line[line.length()-1] != '\n' || lineno <= 2 )
continue;
- QString currentLine = codec->toUnicode(line).stripWhiteSpace();
+ TQString currentLine = codec->toUnicode(line).stripWhiteSpace();
if (currentLine.isEmpty()) {
// end of data block
@@ -67,9 +67,9 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
else if (type == "FOLDER" )
emit newFolder( name, false, "" );
- type = QString::null;
- name = QString::null;
- url = QString::null;
+ type = TQString::null;
+ name = TQString::null;
+ url = TQString::null;
} else if (currentLine == "-") {
// end of folder
@@ -77,7 +77,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
} else {
// data block line
- QString tag;
+ TQString tag;
if ( tag = "#", currentLine.startsWith( tag ) )
type = currentLine.remove( 0, tag.length() );
else if ( tag = "NAME=", currentLine.startsWith( tag ) )
@@ -89,7 +89,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
}
-QString KOperaBookmarkImporter::operaBookmarksFile()
+TQString KOperaBookmarkImporter::operaBookmarksFile()
{
static KOperaBookmarkImporterImpl *p = 0;
if (!p)
@@ -103,13 +103,13 @@ void KOperaBookmarkImporterImpl::parse() {
importer.parseOperaBookmarks();
}
-QString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
+TQString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
{
return saving ? KFileDialog::getSaveFileName(
- QDir::homeDirPath() + "/.opera",
+ TQDir::homeDirPath() + "/.opera",
i18n("*.adr|Opera Bookmark Files (*.adr)") )
: KFileDialog::getOpenFileName(
- QDir::homeDirPath() + "/.opera",
+ TQDir::homeDirPath() + "/.opera",
i18n("*.adr|Opera Bookmark Files (*.adr)") );
}
@@ -118,14 +118,14 @@ QString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
class OperaExporter : private KBookmarkGroupTraverser {
public:
OperaExporter();
- QString generate( const KBookmarkGroup &grp ) { traverse(grp); return m_string; };
+ TQString generate( const KBookmarkGroup &grp ) { traverse(grp); return m_string; };
private:
virtual void visit( const KBookmark & );
virtual void visitEnter( const KBookmarkGroup & );
virtual void visitLeave( const KBookmarkGroup & );
private:
- QString m_string;
- QTextStream m_out;
+ TQString m_string;
+ TQTextStream m_out;
};
OperaExporter::OperaExporter() : m_out(&m_string, IO_WriteOnly) {
@@ -156,14 +156,14 @@ void OperaExporter::visitLeave( const KBookmarkGroup & ) {
void KOperaBookmarkExporterImpl::write(KBookmarkGroup parent) {
OperaExporter exporter;
- QString content = exporter.generate( parent );
- QFile file(m_fileName);
+ TQString content = exporter.generate( parent );
+ TQFile file(m_fileName);
if (!file.open(IO_WriteOnly)) {
kdError(7043) << "Can't write to file " << m_fileName << endl;
return;
}
- QTextStream fstream(&file);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&file);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << content;
}
diff --git a/kio/bookmarks/kbookmarkimporter_opera.h b/kio/bookmarks/kbookmarkimporter_opera.h
index b179f2f93..e87df2efe 100644
--- a/kio/bookmarks/kbookmarkimporter_opera.h
+++ b/kio/bookmarks/kbookmarkimporter_opera.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_opera_h
#define __kbookmarkimporter_opera_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kbookmarkimporter.h>
@@ -36,22 +36,22 @@ class KIO_EXPORT_DEPRECATED KOperaBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KOperaBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KOperaBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KOperaBookmarkImporter() {}
void parseOperaBookmarks();
// Usual place for Opera bookmarks
- static QString operaBookmarksFile();
+ static TQString operaBookmarksFile();
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -63,7 +63,7 @@ class KIO_EXPORT KOperaBookmarkImporterImpl : public KBookmarkImporterBase
public:
KOperaBookmarkImporterImpl() { }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
class KOperaBookmarkImporterImplPrivate *d;
};
@@ -74,7 +74,7 @@ private:
class KIO_EXPORT KOperaBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KOperaBookmarkExporterImpl(KBookmarkManager* mgr, const QString & filename)
+ KOperaBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & filename)
: KBookmarkExporterBase(mgr, filename)
{ ; }
virtual ~KOperaBookmarkExporterImpl() {}
diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc
index d101c1f7f..1a9e5dc4e 100644
--- a/kio/bookmarks/kbookmarkmanager.cc
+++ b/kio/bookmarks/kbookmarkmanager.cc
@@ -28,17 +28,17 @@
#include <kstandarddirs.h>
#include <ksavefile.h>
#include <dcopref.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <klocale.h>
#include <kapplication.h>
#include <dcopclient.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <kstaticdeleter.h>
-#include <qptrstack.h>
+#include <tqptrstack.h>
#include "dptrtemplate.h"
@@ -46,32 +46,32 @@ class KBookmarkManagerPrivate : public dPtrTemplate<KBookmarkManager, KBookmarkM
public:
KBookmarkManagerPrivate()
{ m_browserEditor = true; }
- QString m_editorCaption;
+ TQString m_editorCaption;
bool m_browserEditor;
};
-template<> QPtrDict<KBookmarkManagerPrivate>* dPtrTemplate<KBookmarkManager, KBookmarkManagerPrivate>::d_ptr = 0;
+template<> TQPtrDict<KBookmarkManagerPrivate>* dPtrTemplate<KBookmarkManager, KBookmarkManagerPrivate>::d_ptr = 0;
KBookmarkManagerPrivate* KBookmarkManager::dptr() const {
return KBookmarkManagerPrivate::d( this );
}
// TODO - clean this stuff up by just using the above dptrtemplate?
-QPtrList<KBookmarkManager>* KBookmarkManager::s_pSelf;
-static KStaticDeleter<QPtrList<KBookmarkManager> > sdbm;
+TQPtrList<KBookmarkManager>* KBookmarkManager::s_pSelf;
+static KStaticDeleter<TQPtrList<KBookmarkManager> > sdbm;
class KBookmarkMap : private KBookmarkGroupTraverser {
public:
KBookmarkMap( KBookmarkManager * );
void update();
- QValueList<KBookmark> find( const QString &url ) const
+ TQValueList<KBookmark> find( const TQString &url ) const
{ return m_bk_map[url]; }
private:
virtual void visit(const KBookmark &);
virtual void visitEnter(const KBookmarkGroup &) { ; }
virtual void visitLeave(const KBookmarkGroup &) { ; }
private:
- typedef QValueList<KBookmark> KBookmarkList;
- QMap<QString, KBookmarkList> m_bk_map;
+ typedef TQValueList<KBookmark> KBookmarkList;
+ TQMap<TQString, KBookmarkList> m_bk_map;
KBookmarkManager *m_manager;
};
@@ -97,13 +97,13 @@ void KBookmarkMap::visit(const KBookmark &bk)
}
-KBookmarkManager* KBookmarkManager::managerForFile( const QString& bookmarksFile, bool bImportDesktopFiles )
+KBookmarkManager* KBookmarkManager::managerForFile( const TQString& bookmarksFile, bool bImportDesktopFiles )
{
if ( !s_pSelf ) {
- sdbm.setObject( s_pSelf, new QPtrList<KBookmarkManager> );
+ sdbm.setObject( s_pSelf, new TQPtrList<KBookmarkManager> );
s_pSelf->setAutoDelete( true );
}
- QPtrListIterator<KBookmarkManager> it ( *s_pSelf );
+ TQPtrListIterator<KBookmarkManager> it ( *s_pSelf );
for ( ; it.current() ; ++it )
if ( it.current()->path() == bookmarksFile )
return it.current();
@@ -117,7 +117,7 @@ KBookmarkManager* KBookmarkManager::managerForFile( const QString& bookmarksFile
KBookmarkManager* KBookmarkManager::createTempManager()
{
if ( !s_pSelf ) {
- sdbm.setObject( s_pSelf, new QPtrList<KBookmarkManager> );
+ sdbm.setObject( s_pSelf, new TQPtrList<KBookmarkManager> );
s_pSelf->setAutoDelete( true );
}
KBookmarkManager* mgr = new KBookmarkManager();
@@ -127,8 +127,8 @@ KBookmarkManager* KBookmarkManager::createTempManager()
#define PI_DATA "version=\"1.0\" encoding=\"UTF-8\""
-KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportDesktopFiles )
- : DCOPObject(QCString("KBookmarkManager-")+bookmarksFile.utf8()), m_doc("xbel"), m_docIsLoaded(false)
+KBookmarkManager::KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles )
+ : DCOPObject(TQCString("KBookmarkManager-")+bookmarksFile.utf8()), m_doc("xbel"), m_docIsLoaded(false)
{
m_toolbarDoc.clear();
@@ -138,9 +138,9 @@ KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportD
Q_ASSERT( !bookmarksFile.isEmpty() );
m_bookmarksFile = bookmarksFile;
- if ( !QFile::exists(m_bookmarksFile) )
+ if ( !TQFile::exists(m_bookmarksFile) )
{
- QDomElement topLevel = m_doc.createElement("xbel");
+ TQDomElement topLevel = m_doc.createElement("xbel");
m_doc.appendChild( topLevel );
m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel );
if ( bImportDesktopFiles )
@@ -148,27 +148,27 @@ KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportD
m_docIsLoaded = true;
}
- connectDCOPSignal(0, objId(), "bookmarksChanged(QString)", "notifyChanged(QString)", false);
+ connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false);
connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false);
}
KBookmarkManager::KBookmarkManager( )
- : DCOPObject(QCString("KBookmarkManager-generated")), m_doc("xbel"), m_docIsLoaded(true)
+ : DCOPObject(TQCString("KBookmarkManager-generated")), m_doc("xbel"), m_docIsLoaded(true)
{
m_toolbarDoc.clear(); // strange ;-)
m_update = false; // TODO - make it read/write
m_showNSBookmarks = true;
- m_bookmarksFile = QString::null; // AK - check all codepaths for this one
+ m_bookmarksFile = TQString::null; // AK - check all codepaths for this one
- QDomElement topLevel = m_doc.createElement("xbel");
+ TQDomElement topLevel = m_doc.createElement("xbel");
m_doc.appendChild( topLevel );
m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel );
// TODO - enable this via some sort of api and fix the above DCOPObject script somehow
#if 0
- connectDCOPSignal(0, objId(), "bookmarksChanged(QString)", "notifyChanged(QString)", false);
+ connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false);
connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false);
#endif
}
@@ -184,7 +184,7 @@ void KBookmarkManager::setUpdate( bool update )
m_update = update;
}
-const QDomDocument &KBookmarkManager::internalDocument() const
+const TQDomDocument &KBookmarkManager::internalDocument() const
{
if(!m_docIsLoaded)
{
@@ -199,21 +199,21 @@ void KBookmarkManager::parse() const
{
m_docIsLoaded = true;
//kdDebug(7043) << "KBookmarkManager::parse " << m_bookmarksFile << endl;
- QFile file( m_bookmarksFile );
+ TQFile file( m_bookmarksFile );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning() << "Can't open " << m_bookmarksFile << endl;
return;
}
- m_doc = QDomDocument("xbel");
+ m_doc = TQDomDocument("xbel");
m_doc.setContent( &file );
- QDomElement docElem = m_doc.documentElement();
+ TQDomElement docElem = m_doc.documentElement();
if ( docElem.isNull() )
kdWarning() << "KBookmarkManager::parse : can't parse " << m_bookmarksFile << endl;
else
{
- QString mainTag = docElem.tagName();
+ TQString mainTag = docElem.tagName();
if ( mainTag == "BOOKMARKS" )
{
kdWarning() << "Old style bookmarks found. Calling convertToXBEL." << endl;
@@ -230,14 +230,14 @@ void KBookmarkManager::parse() const
else if ( mainTag != "xbel" )
kdWarning() << "KBookmarkManager::parse : unknown main tag " << mainTag << endl;
- QDomNode n = m_doc.documentElement().previousSibling();
+ TQDomNode n = m_doc.documentElement().previousSibling();
if ( n.isProcessingInstruction() )
{
- QDomProcessingInstruction pi = n.toProcessingInstruction();
+ TQDomProcessingInstruction pi = n.toProcessingInstruction();
pi.parentNode().removeChild(pi);
}
- QDomProcessingInstruction pi;
+ TQDomProcessingInstruction pi;
pi = m_doc.createProcessingInstruction( "xml", PI_DATA );
m_doc.insertBefore( pi, docElem );
}
@@ -248,12 +248,12 @@ void KBookmarkManager::parse() const
s_bk_map->update();
}
-void KBookmarkManager::convertToXBEL( QDomElement & group )
+void KBookmarkManager::convertToXBEL( TQDomElement & group )
{
- QDomNode n = group.firstChild();
+ TQDomNode n = group.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() )
if ( e.tagName() == "TEXT" )
{
@@ -286,10 +286,10 @@ void KBookmarkManager::convertToXBEL( QDomElement & group )
convertAttribute(e, "ICON","icon"); // non standard, but we need it
convertAttribute(e, "NETSCAPEINFO","netscapeinfo"); // idem
convertAttribute(e, "URL","href");
- QString text = e.text();
+ TQString text = e.text();
while ( !e.firstChild().isNull() ) // clean up the old contained text
e.removeChild(e.firstChild());
- QDomElement titleElem = e.ownerDocument().createElement("title");
+ TQDomElement titleElem = e.ownerDocument().createElement("title");
e.appendChild( titleElem ); // should be the only child anyway
titleElem.appendChild( e.ownerDocument().createTextNode( text ) );
}
@@ -299,7 +299,7 @@ void KBookmarkManager::convertToXBEL( QDomElement & group )
}
}
-void KBookmarkManager::convertAttribute( QDomElement elem, const QString & oldName, const QString & newName )
+void KBookmarkManager::convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName )
{
if ( elem.hasAttribute( oldName ) )
{
@@ -310,8 +310,8 @@ void KBookmarkManager::convertAttribute( QDomElement elem, const QString & oldNa
void KBookmarkManager::importDesktopFiles()
{
- KBookmarkImporter importer( const_cast<QDomDocument *>(&internalDocument()) );
- QString path(KGlobal::dirs()->saveLocation("data", "kfm/bookmarks", true));
+ KBookmarkImporter importer( const_cast<TQDomDocument *>(&internalDocument()) );
+ TQString path(KGlobal::dirs()->saveLocation("data", "kfm/bookmarks", true));
importer.import( path );
//kdDebug(7043) << internalDocument().toCString() << endl;
@@ -323,36 +323,36 @@ bool KBookmarkManager::save( bool toolbarCache ) const
return saveAs( m_bookmarksFile, toolbarCache );
}
-bool KBookmarkManager::saveAs( const QString & filename, bool toolbarCache ) const
+bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) const
{
kdDebug(7043) << "KBookmarkManager::save " << filename << endl;
// Save the bookmark toolbar folder for quick loading
// but only when it will actually make things quicker
- const QString cacheFilename = filename + QString::fromLatin1(".tbcache");
+ const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache");
if(toolbarCache && !root().isToolbarGroup())
{
KSaveFile cacheFile( cacheFilename );
if ( cacheFile.status() == 0 )
{
- QString str;
- QTextStream stream(&str, IO_WriteOnly);
+ TQString str;
+ TQTextStream stream(&str, IO_WriteOnly);
stream << root().findToolbar();
- QCString cstr = str.utf8();
+ TQCString cstr = str.utf8();
cacheFile.file()->writeBlock( cstr.data(), cstr.length() );
cacheFile.close();
}
}
else // remove any (now) stale cache
{
- QFile::remove( cacheFilename );
+ TQFile::remove( cacheFilename );
}
KSaveFile file( filename );
if ( file.status() == 0 )
{
- file.backupFile( file.name(), QString::null, ".bak" );
- QCString cstr;
+ file.backupFile( file.name(), TQString::null, ".bak" );
+ TQCString cstr;
cstr = internalDocument().toCString(); // is in UTF8
file.file()->writeBlock( cstr.data(), cstr.length() );
if ( file.close() )
@@ -362,12 +362,12 @@ bool KBookmarkManager::saveAs( const QString & filename, bool toolbarCache ) con
static int hadSaveError = false;
file.abort();
if ( !hadSaveError ) {
- QString error = i18n("Unable to save bookmarks in %1. Reported error was: %2. "
+ TQString error = i18n("Unable to save bookmarks in %1. Reported error was: %2. "
"This error message will only be shown once. The cause "
"of the error needs to be fixed as quickly as possible, "
"which is most likely a full hard drive.")
- .arg(filename).arg(QString::fromLocal8Bit(strerror(file.status())));
- if (qApp->type() != QApplication::Tty)
+ .arg(filename).arg(TQString::fromLocal8Bit(strerror(file.status())));
+ if (qApp->type() != TQApplication::Tty)
KMessageBox::error( 0L, error );
else
kdError() << error << endl;
@@ -388,19 +388,19 @@ KBookmarkGroup KBookmarkManager::toolbar()
if(!m_docIsLoaded)
{
kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl;
- const QString cacheFilename = m_bookmarksFile + QString::fromLatin1(".tbcache");
- QFileInfo bmInfo(m_bookmarksFile);
- QFileInfo cacheInfo(cacheFilename);
+ const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache");
+ TQFileInfo bmInfo(m_bookmarksFile);
+ TQFileInfo cacheInfo(cacheFilename);
if (m_toolbarDoc.isNull() &&
- QFile::exists(cacheFilename) &&
+ TQFile::exists(cacheFilename) &&
bmInfo.lastModified() < cacheInfo.lastModified())
{
kdDebug(7043) << "KBookmarkManager::toolbar reading file" << endl;
- QFile file( cacheFilename );
+ TQFile file( cacheFilename );
if ( file.open( IO_ReadOnly ) )
{
- m_toolbarDoc = QDomDocument("cache");
+ m_toolbarDoc = TQDomDocument("cache");
m_toolbarDoc.setContent( &file );
kdDebug(7043) << "KBookmarkManager::toolbar opened" << endl;
}
@@ -408,28 +408,28 @@ KBookmarkGroup KBookmarkManager::toolbar()
if (!m_toolbarDoc.isNull())
{
kdDebug(7043) << "KBookmarkManager::toolbar returning element" << endl;
- QDomElement elem = m_toolbarDoc.firstChild().toElement();
+ TQDomElement elem = m_toolbarDoc.firstChild().toElement();
return KBookmarkGroup(elem);
}
}
// Fallback to the normal way if there is no cache or if the bookmark file
// is already loaded
- QDomElement elem = root().findToolbar();
+ TQDomElement elem = root().findToolbar();
if (elem.isNull())
return root(); // Root is the bookmark toolbar if none has been set.
else
return KBookmarkGroup(root().findToolbar());
}
-KBookmark KBookmarkManager::findByAddress( const QString & address, bool tolerant )
+KBookmark KBookmarkManager::findByAddress( const TQString & address, bool tolerant )
{
//kdDebug(7043) << "KBookmarkManager::findByAddress " << address << endl;
KBookmark result = root();
// The address is something like /5/10/2+
- QStringList addresses = QStringList::split(QRegExp("[/+]"),address);
+ TQStringList addresses = TQStringList::split(TQRegExp("[/+]"),address);
// kdWarning() << addresses.join(",") << endl;
- for ( QStringList::Iterator it = addresses.begin() ; it != addresses.end() ; )
+ for ( TQStringList::Iterator it = addresses.begin() ; it != addresses.end() ; )
{
bool append = ((*it) == "+");
uint number = (*it).toUInt();
@@ -459,13 +459,13 @@ KBookmark KBookmarkManager::findByAddress( const QString & address, bool toleran
return result;
}
-static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
- const QString &title, const QString &url
+static TQString pickUnusedTitle( KBookmarkGroup parentBookmark,
+ const TQString &title, const TQString &url
) {
// If this title is already used, we'll try to find something unused.
KBookmark ch = parentBookmark.first();
int count = 1;
- QString uniqueTitle = title;
+ TQString uniqueTitle = title;
do
{
while ( !ch.isNull() )
@@ -475,7 +475,7 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
// Title already used !
if ( url != ch.url().url() )
{
- uniqueTitle = title + QString(" (%1)").arg(++count);
+ uniqueTitle = title + TQString(" (%1)").arg(++count);
// New title -> restart search from the beginning
ch = parentBookmark.first();
break;
@@ -483,7 +483,7 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
else
{
// this exact URL already exists
- return QString::null;
+ return TQString::null;
}
}
ch = parentBookmark.next( ch );
@@ -494,12 +494,12 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
}
KBookmarkGroup KBookmarkManager::addBookmarkDialog(
- const QString & _url, const QString & _title,
- const QString & _parentBookmarkAddress
+ const TQString & _url, const TQString & _title,
+ const TQString & _parentBookmarkAddress
) {
- QString url = _url;
- QString title = _title;
- QString parentBookmarkAddress = _parentBookmarkAddress;
+ TQString url = _url;
+ TQString title = _title;
+ TQString parentBookmarkAddress = _parentBookmarkAddress;
if ( url.isEmpty() )
{
@@ -524,7 +524,7 @@ KBookmarkGroup KBookmarkManager::addBookmarkDialog(
parentBookmark = findByAddress( parentBookmarkAddress ).toGroup();
Q_ASSERT( !parentBookmark.isNull() );
- QString uniqueTitle = pickUnusedTitle( parentBookmark, title, url );
+ TQString uniqueTitle = pickUnusedTitle( parentBookmark, title, url );
if ( !uniqueTitle.isNull() )
parentBookmark.addBookmark( this, uniqueTitle, KURL( url ));
@@ -539,11 +539,11 @@ void KBookmarkManager::emitChanged( /*KDE4 const*/ KBookmarkGroup & group )
// Tell the other processes too
// kdDebug(7043) << "KBookmarkManager::emitChanged : broadcasting change " << group.address() << endl;
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << group.address();
- emitDCOPSignal("bookmarksChanged(QString)", data);
+ emitDCOPSignal("bookmarksChanged(TQString)", data);
// We do get our own broadcast, so no need for this anymore
//emit changed( group );
@@ -551,10 +551,10 @@ void KBookmarkManager::emitChanged( /*KDE4 const*/ KBookmarkGroup & group )
void KBookmarkManager::emitConfigChanged()
{
- emitDCOPSignal("bookmarkConfigChanged()", QByteArray());
+ emitDCOPSignal("bookmarkConfigChanged()", TQByteArray());
}
-void KBookmarkManager::notifyCompleteChange( QString caller ) // DCOP call
+void KBookmarkManager::notifyCompleteChange( TQString caller ) // DCOP call
{
if (!m_update) return;
@@ -574,7 +574,7 @@ void KBookmarkManager::notifyConfigChanged() // DCOP call
parse(); // reload, and thusly recreate the menus
}
-void KBookmarkManager::notifyChanged( QString groupAddress ) // DCOP call
+void KBookmarkManager::notifyChanged( TQString groupAddress ) // DCOP call
{
if (!m_update) return;
@@ -586,7 +586,7 @@ void KBookmarkManager::notifyChanged( QString groupAddress ) // DCOP call
//kdDebug(7043) << "KBookmarkManager::notifyChanged " << groupAddress << endl;
//KBookmarkGroup group = findByAddress( groupAddress ).toGroup();
//Q_ASSERT(!group.isNull());
- emit changed( groupAddress, QString::null );
+ emit changed( groupAddress, TQString::null );
}
bool KBookmarkManager::showNSBookmarks() const
@@ -605,7 +605,7 @@ void KBookmarkManager::setShowNSBookmarks( bool show )
KBookmarkMenu::setDynamicBookmarks("netscape", info);
}
-void KBookmarkManager::setEditorOptions( const QString& caption, bool browser )
+void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser )
{
dptr()->m_editorCaption = caption;
dptr()->m_browserEditor = browser;
@@ -614,27 +614,27 @@ void KBookmarkManager::setEditorOptions( const QString& caption, bool browser )
void KBookmarkManager::slotEditBookmarks()
{
KProcess proc;
- proc << QString::fromLatin1("keditbookmarks");
+ proc << TQString::fromLatin1("keditbookmarks");
if (!dptr()->m_editorCaption.isNull())
- proc << QString::fromLatin1("--customcaption") << dptr()->m_editorCaption;
+ proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption;
if (!dptr()->m_browserEditor)
- proc << QString::fromLatin1("--nobrowser");
+ proc << TQString::fromLatin1("--nobrowser");
proc << m_bookmarksFile;
proc.start(KProcess::DontCare);
}
-void KBookmarkManager::slotEditBookmarksAtAddress( const QString& address )
+void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address )
{
KProcess proc;
- proc << QString::fromLatin1("keditbookmarks")
- << QString::fromLatin1("--address") << address
+ proc << TQString::fromLatin1("keditbookmarks")
+ << TQString::fromLatin1("--address") << address
<< m_bookmarksFile;
proc.start(KProcess::DontCare);
}
///////
-void KBookmarkOwner::openBookmarkURL( const QString& url )
+void KBookmarkOwner::openBookmarkURL( const TQString& url )
{
(void) new KRun(KURL( url ));
}
@@ -642,18 +642,18 @@ void KBookmarkOwner::openBookmarkURL( const QString& url )
void KBookmarkOwner::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-bool KBookmarkManager::updateAccessMetadata( const QString & url, bool emitSignal )
+bool KBookmarkManager::updateAccessMetadata( const TQString & url, bool emitSignal )
{
if (!s_bk_map) {
s_bk_map = new KBookmarkMap(this);
s_bk_map->update();
}
- QValueList<KBookmark> list = s_bk_map->find(url);
+ TQValueList<KBookmark> list = s_bk_map->find(url);
if ( list.count() == 0 )
return false;
- for ( QValueList<KBookmark>::iterator it = list.begin();
+ for ( TQValueList<KBookmark>::iterator it = list.begin();
it != list.end(); ++it )
(*it).updateAccessMetadata();
@@ -663,7 +663,7 @@ bool KBookmarkManager::updateAccessMetadata( const QString & url, bool emitSigna
return true;
}
-void KBookmarkManager::updateFavicon( const QString &url, const QString &faviconurl, bool emitSignal )
+void KBookmarkManager::updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal )
{
Q_UNUSED(faviconurl);
@@ -672,8 +672,8 @@ void KBookmarkManager::updateFavicon( const QString &url, const QString &favicon
s_bk_map->update();
}
- QValueList<KBookmark> list = s_bk_map->find(url);
- for ( QValueList<KBookmark>::iterator it = list.begin();
+ TQValueList<KBookmark> list = s_bk_map->find(url);
+ for ( TQValueList<KBookmark>::iterator it = list.begin();
it != list.end(); ++it )
{
// TODO - update favicon data based on faviconurl
@@ -688,9 +688,9 @@ void KBookmarkManager::updateFavicon( const QString &url, const QString &favicon
}
}
-QString KBookmarkManager::userBookmarksFile()
+TQString KBookmarkManager::userBookmarksFile()
{
- return locateLocal("data", QString::fromLatin1("konqueror/bookmarks.xml"));
+ return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml"));
}
KBookmarkManager* KBookmarkManager::userBookmarksManager()
diff --git a/kio/bookmarks/kbookmarkmanager.h b/kio/bookmarks/kbookmarkmanager.h
index 03d0ac0c6..403a2e1b3 100644
--- a/kio/bookmarks/kbookmarkmanager.h
+++ b/kio/bookmarks/kbookmarkmanager.h
@@ -20,10 +20,10 @@
#ifndef __kbookmarkmanager_h
#define __kbookmarkmanager_h
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
#include <dcopobject.h>
#include "kbookmark.h"
#include "kbookmarknotifier.h"
@@ -50,7 +50,7 @@
* </xbel>
* \endcode
*/
-class KIO_EXPORT KBookmarkManager : public QObject, public DCOPObject
+class KIO_EXPORT KBookmarkManager : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -69,7 +69,7 @@ protected:
* @param bImportDesktopFiles if true, and if the bookmarksFile
* doesn't already exist, import bookmarks from desktop files
*/
- KBookmarkManager( const QString & bookmarksFile, bool bImportDesktopFiles = true );
+ KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles = true );
/**
* @since 3.2
@@ -103,7 +103,7 @@ public:
* @param toolbarCache iff true save a cache of the toolbar folder, too
* @return true if saving was successful
*/
- bool saveAs( const QString & filename, bool toolbarCache = true ) const;
+ bool saveAs( const TQString & filename, bool toolbarCache = true ) const;
/**
* Update access time stamps for a given url.
@@ -112,7 +112,7 @@ public:
* @since 3.2
* @return true if any metadata was modified (bookmarks file is not saved automatically)
*/
- bool updateAccessMetadata( const QString &url, bool emitSignal = true );
+ bool updateAccessMetadata( const TQString &url, bool emitSignal = true );
/*
* NB. currently *unimplemented*
@@ -123,7 +123,7 @@ public:
* @emitSignal iff true emit KBookmarkNotifier signal
* @since 3.3
*/
- void updateFavicon( const QString &url, const QString &faviconurl, bool emitSignal = true );
+ void updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal = true );
/**
* This will return the path that this manager is using to read
@@ -131,7 +131,7 @@ public:
* @internal
* @return the path containing the bookmarks
*/
- QString path() { return m_bookmarksFile; }
+ TQString path() { return m_bookmarksFile; }
/**
* This will return the root bookmark. It is used to iterate
@@ -155,7 +155,7 @@ public:
* @param tolerate when true tries to find the most tolerable bookmark position
* @see KBookmark::address
*/
- KBookmark findByAddress( const QString & address, bool tolerate = false );
+ KBookmark findByAddress( const TQString & address, bool tolerate = false );
/**
* Saves the bookmark file and notifies everyone.
@@ -188,7 +188,7 @@ public:
* menu items in keditbookmarks :: --nobrowser
* @since 3.2
*/
- void setEditorOptions( const QString& caption, bool browser );
+ void setEditorOptions( const TQString& caption, bool browser );
/**
* This static function will return an instance of the
@@ -206,7 +206,7 @@ public:
* doesn't already exist, import bookmarks from desktop files
* @return a pointer to an instance of the KBookmarkManager.
*/
- static KBookmarkManager* managerForFile( const QString& bookmarksFile,
+ static KBookmarkManager* managerForFile( const TQString& bookmarksFile,
bool bImportDesktopFiles = true );
@@ -222,12 +222,12 @@ public:
* Returns the path to the user's main bookmark collection file.
* @since 3.5.5
*/
- static QString userBookmarksFile();
+ static TQString userBookmarksFile();
/**
* @internal
*/
- const QDomDocument & internalDocument() const;
+ const TQDomDocument & internalDocument() const;
/**
* Access to bookmark notifier, for emitting signals.
@@ -239,12 +239,12 @@ public:
/**
* @since 3.2
*/
- KBookmarkGroup addBookmarkDialog( const QString & _url, const QString & _title,
- const QString & _parentBookmarkAddress = QString::null );
+ KBookmarkGroup addBookmarkDialog( const TQString & _url, const TQString & _title,
+ const TQString & _parentBookmarkAddress = TQString::null );
public slots:
void slotEditBookmarks();
- void slotEditBookmarksAtAddress( const QString& address );
+ void slotEditBookmarksAtAddress( const TQString& address );
public:
k_dcop:
@@ -252,7 +252,7 @@ k_dcop:
* Reparse the whole bookmarks file and notify about the change
* (Called by the bookmark editor)
*/
- ASYNC notifyCompleteChange( QString caller );
+ ASYNC notifyCompleteChange( TQString caller );
/**
* Emit the changed signal for the group whose address is given
@@ -260,7 +260,7 @@ k_dcop:
* Called by the instance of konqueror that saved the file after
* a small change (new bookmark or new folder).
*/
- ASYNC notifyChanged( QString groupAddress );
+ ASYNC notifyChanged( TQString groupAddress );
ASYNC notifyConfigChanged();
@@ -270,23 +270,23 @@ signals:
* @p groupAddress (e.g. "/4/5")
* has been modified by the caller @p caller.
*/
- void changed( const QString & groupAddress, const QString & caller );
+ void changed( const TQString & groupAddress, const TQString & caller );
protected:
// consts added to avoid a copy-and-paste of internalDocument
void parse() const;
void importDesktopFiles();
- static void convertToXBEL( QDomElement & group );
- static void convertAttribute( QDomElement elem, const QString & oldName, const QString & newName );
+ static void convertToXBEL( TQDomElement & group );
+ static void convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName );
private:
KBookmarkNotifier m_notifier;
- QString m_bookmarksFile;
- mutable QDomDocument m_doc;
- mutable QDomDocument m_toolbarDoc;
+ TQString m_bookmarksFile;
+ mutable TQDomDocument m_doc;
+ mutable TQDomDocument m_toolbarDoc;
mutable bool m_docIsLoaded;
bool m_update;
- static QPtrList<KBookmarkManager>* s_pSelf;
+ static TQPtrList<KBookmarkManager>* s_pSelf;
bool m_showNSBookmarks;
private:
@@ -321,7 +321,7 @@ public:
* This function is called if the user selects a bookmark. It will
* open up the bookmark in a default fashion unless you override it.
*/
- virtual void openBookmarkURL(const QString& _url);
+ virtual void openBookmarkURL(const TQString& _url);
/**
* This function is called whenever the user wants to add the
@@ -331,7 +331,7 @@ public:
*
* @return the title of the current page.
*/
- virtual QString currentTitle() const { return QString::null; }
+ virtual TQString currentTitle() const { return TQString::null; }
/**
* This function is called whenever the user wants to add the
@@ -341,7 +341,7 @@ public:
*
* @return the URL of the current page.
*/
- virtual QString currentURL() const { return QString::null; }
+ virtual TQString currentURL() const { return TQString::null; }
protected:
virtual void virtual_hook( int id, void* data );
@@ -350,11 +350,11 @@ protected:
/**
* @since 3.2
*/
-class KIO_EXPORT KExtendedBookmarkOwner : public QObject, virtual public KBookmarkOwner
+class KIO_EXPORT KExtendedBookmarkOwner : public TQObject, virtual public KBookmarkOwner
{
Q_OBJECT
public:
- typedef QValueList<QPair<QString,QString> > QStringPairList;
+ typedef TQValueList<QPair<TQString,TQString> > QStringPairList;
public slots:
void fillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list ) { emit signalFillBookmarksList( list ); };
signals:
diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc
index 0e1dfe35c..69c9debd6 100644
--- a/kio/bookmarks/kbookmarkmenu.cc
+++ b/kio/bookmarks/kbookmarkmenu.cc
@@ -39,34 +39,34 @@
#include <kstdaction.h>
#include <kstringhandler.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <dptrtemplate.h>
-template class QPtrList<KBookmarkMenu>;
+template class TQPtrList<KBookmarkMenu>;
-static QString makeTextNodeMod(KBookmark bk, const QString &m_nodename, const QString &m_newText) {
- QDomNode subnode = bk.internalElement().namedItem(m_nodename);
+static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const TQString &m_newText) {
+ TQDomNode subnode = bk.internalElement().namedItem(m_nodename);
if (subnode.isNull()) {
subnode = bk.internalElement().ownerDocument().createElement(m_nodename);
bk.internalElement().appendChild(subnode);
}
if (subnode.firstChild().isNull()) {
- QDomText domtext = subnode.ownerDocument().createTextNode("");
+ TQDomText domtext = subnode.ownerDocument().createTextNode("");
subnode.appendChild(domtext);
}
- QDomText domtext = subnode.firstChild().toText();
+ TQDomText domtext = subnode.firstChild().toText();
- QString m_oldText = domtext.data();
+ TQString m_oldText = domtext.data();
domtext.setData(m_newText);
return m_oldText;
@@ -79,8 +79,8 @@ static QString makeTextNodeMod(KBookmark bk, const QString &m_nodename, const QS
KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkOwner * _owner, KPopupMenu * _parentMenu,
KActionCollection *collec, bool _isRoot, bool _add,
- const QString & parentAddress )
- : QObject(),
+ const TQString & parentAddress )
+ : TQObject(),
m_bIsRoot(_isRoot), m_bAddBookmark(_add),
m_bAddShortcuts(true),
m_pManager(mgr), m_pOwner(_owner),
@@ -96,9 +96,9 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
if (m_actionCollection)
{
m_actionCollection->setHighlightingEnabled(true);
- disconnect( m_actionCollection, SIGNAL( actionHighlighted( KAction * ) ), 0, 0 );
- connect( m_actionCollection, SIGNAL( actionHighlighted( KAction * ) ),
- this, SLOT( slotActionHighlighted( KAction * ) ) );
+ disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 );
+ connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ),
+ this, TQT_SLOT( slotActionHighlighted( KAction * ) ) );
}
m_bNSBookmark = m_parentAddress.isNull();
@@ -106,20 +106,20 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
{
//kdDebug(7043) << "KBookmarkMenu::KBookmarkMenu " << this << " address : " << m_parentAddress << endl;
- connect( _parentMenu, SIGNAL( aboutToShow() ),
- SLOT( slotAboutToShow() ) );
+ connect( _parentMenu, TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( slotAboutToShow() ) );
if ( KBookmarkSettings::self()->m_contextmenu )
{
(void) _parentMenu->contextMenu();
- connect( _parentMenu, SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, QPopupMenu*) ),
- this, SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, QPopupMenu*) ));
+ connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ),
+ this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ));
}
if ( m_bIsRoot )
{
- connect( m_pManager, SIGNAL( changed(const QString &, const QString &) ),
- SLOT( slotBookmarksChanged(const QString &) ) );
+ connect( m_pManager, TQT_SIGNAL( changed(const TQString &, const TQString &) ),
+ TQT_SLOT( slotBookmarksChanged(const TQString &) ) );
}
}
@@ -142,7 +142,7 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkMenu::~KBookmarkMenu()
{
//kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl;
- QPtrListIterator<KAction> it( m_actions );
+ TQPtrListIterator<KAction> it( m_actions );
for (; it.current(); ++it )
it.current()->unplugAll();
@@ -165,9 +165,9 @@ void KBookmarkMenu::slotAboutToShow()
}
}
-QString KBookmarkMenu::s_highlightedAddress;
-QString KBookmarkMenu::s_highlightedImportType;
-QString KBookmarkMenu::s_highlightedImportLocation;
+TQString KBookmarkMenu::s_highlightedAddress;
+TQString KBookmarkMenu::s_highlightedImportType;
+TQString KBookmarkMenu::s_highlightedImportLocation;
void KBookmarkMenu::slotActionHighlighted( KAction* action )
{
@@ -183,9 +183,9 @@ void KBookmarkMenu::slotActionHighlighted( KAction* action )
}
else
{
- s_highlightedAddress = QString::null;
- s_highlightedImportType = QString::null;
- s_highlightedImportLocation = QString::null;
+ s_highlightedAddress = TQString::null;
+ s_highlightedImportType = TQString::null;
+ s_highlightedImportLocation = TQString::null;
}
}
@@ -194,7 +194,7 @@ void KBookmarkMenu::slotActionHighlighted( KAction* action )
/********************************************************************/
class KBookmarkMenuRMBAssoc : public dPtrTemplate<KBookmarkMenu, RMB> { };
-template<> QPtrDict<RMB>* dPtrTemplate<KBookmarkMenu, RMB>::d_ptr = 0;
+template<> TQPtrDict<RMB>* dPtrTemplate<KBookmarkMenu, RMB>::d_ptr = 0;
static RMB* rmbSelf(KBookmarkMenu *m) { return KBookmarkMenuRMBAssoc::d(m); }
@@ -224,14 +224,14 @@ bool RMB::invalid( int val )
return !valid;
}
-KBookmark RMB::atAddress(const QString & address)
+KBookmark RMB::atAddress(const TQString & address)
{
KBookmark bookmark = m_pManager->findByAddress( address );
Q_ASSERT(!bookmark.isNull());
return bookmark;
}
-void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, QPopupMenu* contextMenu )
+void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu )
{
//kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl;
if (s_highlightedAddress.isNull())
@@ -243,7 +243,7 @@ void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, QPopupMenu* co
fillContextMenu( contextMenu, s_highlightedAddress, 0 );
}
-void RMB::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val )
+void RMB::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val )
{
KBookmark bookmark = atAddress(address);
@@ -256,41 +256,41 @@ void RMB::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int
// TODO rename these, but, message freeze... umm...
// if (bookmark.isGroup()) {
- id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, SLOT(slotRMBActionInsert(int)) );
+ id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) );
contextMenu->setItemParameter( id, val );
/* }
else
{
- id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, SLOT(slotRMBActionInsert(int)) );
+ id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) );
contextMenu->setItemParameter( id, val );
}*/
}
-void RMB::fillContextMenu2( QPopupMenu* contextMenu, const QString & address, int val )
+void RMB::fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val )
{
KBookmark bookmark = atAddress(address);
int id;
if (bookmark.isGroup()) {
- id = contextMenu->insertItem( i18n( "Open Folder in Bookmark Editor" ), recv, SLOT(slotRMBActionEditAt(int)) );
+ id = contextMenu->insertItem( i18n( "Open Folder in Bookmark Editor" ), recv, TQT_SLOT(slotRMBActionEditAt(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Folder" ), recv, SLOT(slotRMBActionRemove(int)) );
+ id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Folder" ), recv, TQT_SLOT(slotRMBActionRemove(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( i18n( "Properties" ), recv, SLOT(slotRMBActionProperties(int)) );
+ id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) );
contextMenu->setItemParameter( id, val );
}
else
{
- id = contextMenu->insertItem( i18n( "Copy Link Address" ), recv, SLOT(slotRMBActionCopyLocation(int)) );
+ id = contextMenu->insertItem( i18n( "Copy Link Address" ), recv, TQT_SLOT(slotRMBActionCopyLocation(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Bookmark" ), recv, SLOT(slotRMBActionRemove(int)) );
+ id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Bookmark" ), recv, TQT_SLOT(slotRMBActionRemove(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( i18n( "Properties" ), recv, SLOT(slotRMBActionProperties(int)) );
+ id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) );
contextMenu->setItemParameter( id, val );
}
}
@@ -312,7 +312,7 @@ void RMB::slotRMBActionProperties( int val )
KBookmark bookmark = atAddress(s_highlightedAddress);
- QString folder = bookmark.isGroup() ? QString::null : bookmark.url().pathOrURL();
+ TQString folder = bookmark.isGroup() ? TQString::null : bookmark.url().pathOrURL();
KBookmarkEditDialog dlg( bookmark.fullText(), folder,
m_pManager, KBookmarkEditDialog::ModifyMode, 0,
0, 0, i18n("Bookmark Properties") );
@@ -337,13 +337,13 @@ void RMB::slotRMBActionInsert( int val )
kdDebug(7043) << "KBookmarkMenu::slotRMBActionInsert" << s_highlightedAddress << endl;
if (invalid(val)) { hidePopup(); return; }
- QString url = m_pOwner->currentURL();
+ TQString url = m_pOwner->currentURL();
if (url.isEmpty())
{
KMessageBox::error( 0L, i18n("Cannot add bookmark with empty URL."));
return;
}
- QString title = m_pOwner->currentTitle();
+ TQString title = m_pOwner->currentTitle();
if (title.isEmpty())
title = url;
@@ -418,7 +418,7 @@ void RMB::hidePopup() {
/********************************************************************/
/********************************************************************/
-void KBookmarkMenu::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val )
+void KBookmarkMenu::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val )
{
RMB::begin_rmb_action(this);
rmbSelf(this)->fillContextMenu(contextMenu, address, val);
@@ -441,7 +441,7 @@ void KBookmarkMenu::slotRMBActionRemove( int val )
void KBookmarkMenu::slotRMBActionCopyLocation( int val )
{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); }
-void KBookmarkMenu::slotBookmarksChanged( const QString & groupAddress )
+void KBookmarkMenu::slotBookmarksChanged( const TQString & groupAddress )
{
if (m_bNSBookmark)
return;
@@ -454,7 +454,7 @@ void KBookmarkMenu::slotBookmarksChanged( const QString & groupAddress )
else
{
// Iterate recursively into child menus
- QPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
+ TQPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
for (; it.current(); ++it )
{
it.current()->slotBookmarksChanged( groupAddress );
@@ -467,7 +467,7 @@ void KBookmarkMenu::refill()
//kdDebug(7043) << "KBookmarkMenu::refill()" << endl;
m_lstSubMenus.clear();
- QPtrListIterator<KAction> it( m_actions );
+ TQPtrListIterator<KAction> it( m_actions );
for (; it.current(); ++it )
it.current()->unplug( m_parentMenu );
@@ -483,13 +483,13 @@ void KBookmarkMenu::addAddBookmarksList()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "Bookmark Tabs as Folder..." );
+ TQString title = i18n( "Bookmark Tabs as Folder..." );
KAction * paAddBookmarksList = new KAction( title,
"bookmarks_list_add",
0,
this,
- SLOT( slotAddBookmarksList() ),
+ TQT_SLOT( slotAddBookmarksList() ),
m_actionCollection, m_bIsRoot ? "add_bookmarks_list" : 0 );
paAddBookmarksList->setToolTip( i18n( "Add a folder of bookmarks for all open tabs." ) );
@@ -503,13 +503,13 @@ void KBookmarkMenu::addAddBookmark()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "Add Bookmark" );
+ TQString title = i18n( "Add Bookmark" );
KAction * paAddBookmarks = new KAction( title,
"bookmark_add",
m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(),
this,
- SLOT( slotAddBookmark() ),
+ TQT_SLOT( slotAddBookmark() ),
m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 );
paAddBookmarks->setToolTip( i18n( "Add a bookmark for the current document" ) );
@@ -523,7 +523,7 @@ void KBookmarkMenu::addEditBookmarks()
if (!kapp->authorizeKAction("bookmarks"))
return;
- KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, SLOT( slotEditBookmarks() ),
+ KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ),
m_actionCollection, "edit_bookmarks" );
m_paEditBookmarks->plug( m_parentMenu );
m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) );
@@ -535,7 +535,7 @@ void KBookmarkMenu::addNewFolder()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "&New Bookmark Folder..." );
+ TQString title = i18n( "&New Bookmark Folder..." );
int p;
while ( ( p = title.find( '&' ) ) >= 0 )
title.remove( p, 1 );
@@ -544,7 +544,7 @@ void KBookmarkMenu::addNewFolder()
"folder_new", //"folder",
0,
this,
- SLOT( slotNewFolder() ),
+ TQT_SLOT( slotNewFolder() ),
m_actionCollection );
paNewFolder->setToolTip( i18n( "Create a new bookmark folder in this menu" ) );
@@ -578,14 +578,14 @@ void KBookmarkMenu::fillBookmarkMenu()
{
bool haveSep = false;
- QValueList<QString> keys = KBookmarkMenu::dynamicBookmarksList();
- QValueList<QString>::const_iterator it;
+ TQValueList<TQString> keys = KBookmarkMenu::dynamicBookmarksList();
+ TQValueList<TQString>::const_iterator it;
for ( it = keys.begin(); it != keys.end(); ++it )
{
DynMenuInfo info;
info = showDynamicBookmarks((*it));
- if ( !info.show || !QFile::exists( info.location ) )
+ if ( !info.show || !TQFile::exists( info.location ) )
continue;
if (!haveSep)
@@ -608,12 +608,12 @@ void KBookmarkMenu::fillBookmarkMenu()
KBookmarkMenu *subMenu =
new KBookmarkMenu( m_pManager, m_pOwner, actionMenu->popupMenu(),
m_actionCollection, false,
- m_bAddBookmark, QString::null );
- connect( subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ m_bAddBookmark, TQString::null );
+ connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
m_lstSubMenus.append(subMenu);
- connect(actionMenu->popupMenu(), SIGNAL(aboutToShow()), subMenu, SLOT(slotNSLoad()));
+ connect(actionMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), subMenu, TQT_SLOT(slotNSLoad()));
}
}
@@ -622,7 +622,7 @@ void KBookmarkMenu::fillBookmarkMenu()
bool separatorInserted = false;
for ( KBookmark bm = parentBookmark.first(); !bm.isNull(); bm = parentBookmark.next(bm) )
{
- QString text = KStringHandler::csqueeze(bm.fullText(), 60);
+ TQString text = KStringHandler::csqueeze(bm.fullText(), 60);
text.replace( '&', "&&" );
if ( !separatorInserted && m_bIsRoot) {
// inserted before the first konq bookmark, to avoid the separator if no konq bookmark
@@ -639,8 +639,8 @@ void KBookmarkMenu::fillBookmarkMenu()
{
//kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl;
KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 );
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- this, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", bm.url().url() );
action->setProperty( "address", bm.address() );
@@ -666,10 +666,10 @@ void KBookmarkMenu::fillBookmarkMenu()
m_bAddBookmark,
bm.address() );
- connect(subMenu, SIGNAL( aboutToShowContextMenu( const KBookmark &, QPopupMenu * ) ),
- this, SIGNAL( aboutToShowContextMenu( const KBookmark &, QPopupMenu * ) ));
- connect(subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ connect(subMenu, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) ),
+ this, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) ));
+ connect(subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
m_lstSubMenus.append( subMenu );
}
}
@@ -750,7 +750,7 @@ void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/,
const KAction* action = dynamic_cast<const KAction *>(sender());
if(action)
{
- const QString& url = sender()->property("url").toString();
+ const TQString& url = sender()->property("url").toString();
m_pOwner->openBookmarkURL( url );
emit openBookmark( url, state );
}
@@ -769,7 +769,7 @@ KExtendedBookmarkOwner* KBookmarkMenu::extOwner()
void KBookmarkMenu::slotNSLoad()
{
// only fill menu once
- m_parentMenu->disconnect(SIGNAL(aboutToShow()));
+ m_parentMenu->disconnect(TQT_SIGNAL(aboutToShow()));
// not NSImporter, but kept old name for BC reasons
KBookmarkMenuNSImporter importer( m_pManager, this, m_actionCollection );
@@ -780,21 +780,21 @@ void KBookmarkMenu::slotNSLoad()
/********************************************************************/
/********************************************************************/
-KBookmarkEditFields::KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, FieldsSet fieldsSet)
+KBookmarkEditFields::KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet fieldsSet)
{
bool isF = (fieldsSet != FolderFieldsSet);
- QGridLayout *grid = new QGridLayout( vbox, 2, isF ? 2 : 1 );
+ TQGridLayout *grid = new TQGridLayout( vbox, 2, isF ? 2 : 1 );
m_title = new KLineEdit( main );
grid->addWidget( m_title, 0, 1 );
- grid->addWidget( new QLabel( m_title, i18n( "Name:" ), main ), 0, 0 );
+ grid->addWidget( new TQLabel( m_title, i18n( "Name:" ), main ), 0, 0 );
m_title->setFocus();
if (isF)
{
m_url = new KLineEdit( main );
grid->addWidget( m_url, 1, 1 );
- grid->addWidget( new QLabel( m_url, i18n( "Location:" ), main ), 1, 0 );
+ grid->addWidget( new TQLabel( m_url, i18n( "Location:" ), main ), 1, 0 );
}
else
{
@@ -804,12 +804,12 @@ KBookmarkEditFields::KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, Fields
main->setMinimumSize( 300, 0 );
}
-void KBookmarkEditFields::setName(const QString &str)
+void KBookmarkEditFields::setName(const TQString &str)
{
m_title->setText(str);
}
-void KBookmarkEditFields::setLocation(const QString &str)
+void KBookmarkEditFields::setLocation(const TQString &str)
{
m_url->setText(str);
}
@@ -819,8 +819,8 @@ void KBookmarkEditFields::setLocation(const QString &str)
/********************************************************************/
// TODO - make the dialog use Properties as a title when in Modify mode... (dirk noticed the bug...)
-KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& url, KBookmarkManager * mgr, BookmarkEditType editType, const QString& address,
- QWidget * parent, const char * name, const QString& caption )
+KBookmarkEditDialog::KBookmarkEditDialog(const TQString& title, const TQString& url, KBookmarkManager * mgr, BookmarkEditType editType, const TQString& address,
+ TQWidget * parent, const char * name, const TQString& caption )
: KDialogBase(parent, name, true, caption,
(editType == InsertionMode) ? (User1|Ok|Cancel) : (Ok|Cancel),
Ok, false, KGuiItem()),
@@ -833,10 +833,10 @@ KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& ur
bool folder = url.isNull();
- m_main = new QWidget( this );
+ m_main = new TQWidget( this );
setMainWidget( m_main );
- QBoxLayout *vbox = new QVBoxLayout( m_main, 0, spacingHint() );
+ TQBoxLayout *vbox = new TQVBoxLayout( m_main, 0, spacingHint() );
KBookmarkEditFields::FieldsSet fs =
folder ? KBookmarkEditFields::FolderFieldsSet
: KBookmarkEditFields::BookmarkFieldsSet;
@@ -848,14 +848,14 @@ KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& ur
if ( editType == InsertionMode )
{
m_folderTree = KBookmarkFolderTree::createTree( m_mgr, m_main, name, m_address );
- connect( m_folderTree, SIGNAL( doubleClicked(QListViewItem*) ),
- this, SLOT( slotDoubleClicked(QListViewItem*) ) );
+ connect( m_folderTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ this, TQT_SLOT( slotDoubleClicked(TQListViewItem*) ) );
vbox->addWidget( m_folderTree );
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotUser1() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotUser1() ) );
}
}
-void KBookmarkEditDialog::slotDoubleClicked( QListViewItem* item )
+void KBookmarkEditDialog::slotDoubleClicked( TQListViewItem* item )
{
Q_ASSERT( m_folderTree );
m_folderTree->setCurrentItem( item );
@@ -872,20 +872,20 @@ void KBookmarkEditDialog::slotCancel()
reject();
}
-QString KBookmarkEditDialog::finalAddress() const
+TQString KBookmarkEditDialog::finalAddress() const
{
Q_ASSERT( m_folderTree );
return KBookmarkFolderTree::selectedAddress( m_folderTree );
}
-QString KBookmarkEditDialog::finalUrl() const
+TQString KBookmarkEditDialog::finalUrl() const
{
- return m_fields->m_url ? m_fields->m_url->text() : QString::null;
+ return m_fields->m_url ? m_fields->m_url->text() : TQString::null;
}
-QString KBookmarkEditDialog::finalTitle() const
+TQString KBookmarkEditDialog::finalTitle() const
{
- return m_fields->m_title ? m_fields->m_title->text() : QString::null;
+ return m_fields->m_title ? m_fields->m_title->text() : TQString::null;
}
void KBookmarkEditDialog::slotUser1()
@@ -893,7 +893,7 @@ void KBookmarkEditDialog::slotUser1()
// kdDebug(7043) << "KBookmarkEditDialog::slotUser1" << endl;
Q_ASSERT( m_folderTree );
- QString address = KBookmarkFolderTree::selectedAddress( m_folderTree );
+ TQString address = KBookmarkFolderTree::selectedAddress( m_folderTree );
if ( address.isNull() ) return;
KBookmarkGroup bm = m_mgr->findByAddress( address ).toGroup();
Q_ASSERT(!bm.isNull());
@@ -912,7 +912,7 @@ void KBookmarkEditDialog::slotUser1()
/********************************************************************/
/********************************************************************/
-static void fillGroup( QListView* listview, KBookmarkFolderTreeItem * parentItem, KBookmarkGroup group, bool expandOpenGroups = true, const QString& address = QString::null )
+static void fillGroup( TQListView* listview, KBookmarkFolderTreeItem * parentItem, KBookmarkGroup group, bool expandOpenGroups = true, const TQString& address = TQString::null )
{
bool noSubGroups = true;
KBookmarkFolderTreeItem * lastItem = 0L;
@@ -939,17 +939,17 @@ static void fillGroup( QListView* listview, KBookmarkFolderTreeItem * parentItem
}
}
-QListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, QWidget* parent, const char* name, const QString& address )
+TQListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, TQWidget* parent, const char* name, const TQString& address )
{
- QListView *listview = new QListView( parent, name );
+ TQListView *listview = new TQListView( parent, name );
listview->setRootIsDecorated( false );
listview->header()->hide();
listview->addColumn( i18n("Bookmark"), 200 );
listview->setSorting( -1, false );
- listview->setSelectionMode( QListView::Single );
+ listview->setSelectionMode( TQListView::Single );
listview->setAllColumnsShowFocus( true );
- listview->setResizeMode( QListView::AllColumns );
+ listview->setResizeMode( TQListView::AllColumns );
listview->setMinimumSize( 60, 100 );
fillTree( listview, mgr, address );
@@ -957,7 +957,7 @@ QListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, QWidget* pare
return listview;
}
-void KBookmarkFolderTree::fillTree( QListView *listview, KBookmarkManager* mgr, const QString& address )
+void KBookmarkFolderTree::fillTree( TQListView *listview, KBookmarkManager* mgr, const TQString& address )
{
listview->clear();
@@ -969,20 +969,20 @@ void KBookmarkFolderTree::fillTree( QListView *listview, KBookmarkManager* mgr,
rootItem->setOpen( true );
}
-static KBookmarkFolderTreeItem* ft_cast( QListViewItem *i )
+static KBookmarkFolderTreeItem* ft_cast( TQListViewItem *i )
{
return static_cast<KBookmarkFolderTreeItem*>( i );
}
-QString KBookmarkFolderTree::selectedAddress( QListView *listview )
+TQString KBookmarkFolderTree::selectedAddress( TQListView *listview )
{
if ( !listview)
- return QString::null;
+ return TQString::null;
KBookmarkFolderTreeItem *item = ft_cast( listview->currentItem() );
- return item ? item->m_bookmark.address() : QString::null;
+ return item ? item->m_bookmark.address() : TQString::null;
}
-void KBookmarkFolderTree::setAddress( QListView *listview, const QString & address )
+void KBookmarkFolderTree::setAddress( TQListView *listview, const TQString & address )
{
KBookmarkFolderTreeItem* it = ft_cast( listview->firstChild() );
while ( true ) {
@@ -1002,16 +1002,16 @@ void KBookmarkFolderTree::setAddress( QListView *listview, const QString & addre
/********************************************************************/
// toplevel item
-KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( QListView *parent, const KBookmark & gp )
- : QListViewItem(parent, i18n("Bookmarks")), m_bookmark(gp)
+KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( TQListView *parent, const KBookmark & gp )
+ : TQListViewItem(parent, i18n("Bookmarks")), m_bookmark(gp)
{
setPixmap(0, SmallIcon("bookmark"));
setExpandable(true);
}
// group
-KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *parent, QListViewItem *after, const KBookmarkGroup & gp )
- : QListViewItem(parent, after, gp.fullText()), m_bookmark(gp)
+KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *parent, TQListViewItem *after, const KBookmarkGroup & gp )
+ : TQListViewItem(parent, after, gp.fullText()), m_bookmark(gp)
{
setPixmap(0, SmallIcon( gp.icon() ) );
setExpandable(true);
@@ -1029,7 +1029,7 @@ void KBookmarkMenuNSImporter::openNSBookmarks()
openBookmarks( KNSBookmarkImporter::netscapeBookmarksFile(), "netscape" );
}
-void KBookmarkMenuNSImporter::openBookmarks( const QString &location, const QString &type )
+void KBookmarkMenuNSImporter::openBookmarks( const TQString &location, const TQString &type )
{
mstack.push(m_menu);
@@ -1043,41 +1043,41 @@ void KBookmarkMenuNSImporter::openBookmarks( const QString &location, const QStr
delete importer;
}
-void KBookmarkMenuNSImporter::connectToImporter(const QObject &importer)
+void KBookmarkMenuNSImporter::connectToImporter(const TQObject &importer)
{
- connect( &importer, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ),
- SLOT( newBookmark( const QString &, const QCString &, const QString & ) ) );
- connect( &importer, SIGNAL( newFolder( const QString &, bool, const QString & ) ),
- SLOT( newFolder( const QString &, bool, const QString & ) ) );
- connect( &importer, SIGNAL( newSeparator() ), SLOT( newSeparator() ) );
- connect( &importer, SIGNAL( endFolder() ), SLOT( endFolder() ) );
+ connect( &importer, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ),
+ TQT_SLOT( newBookmark( const TQString &, const TQCString &, const TQString & ) ) );
+ connect( &importer, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ),
+ TQT_SLOT( newFolder( const TQString &, bool, const TQString & ) ) );
+ connect( &importer, TQT_SIGNAL( newSeparator() ), TQT_SLOT( newSeparator() ) );
+ connect( &importer, TQT_SIGNAL( endFolder() ), TQT_SLOT( endFolder() ) );
}
-void KBookmarkMenuNSImporter::newBookmark( const QString & text, const QCString & url, const QString & )
+void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCString & url, const TQString & )
{
- QString _text = KStringHandler::csqueeze(text);
+ TQString _text = KStringHandler::csqueeze(text);
_text.replace( '&', "&&" );
KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0);
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- m_menu, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", url );
action->setToolTip( url );
action->plug( mstack.top()->m_parentMenu );
mstack.top()->m_actions.append( action );
}
-void KBookmarkMenuNSImporter::newFolder( const QString & text, bool, const QString & )
+void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQString & )
{
- QString _text = KStringHandler::csqueeze(text);
+ TQString _text = KStringHandler::csqueeze(text);
_text.replace( '&', "&&" );
KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L );
actionMenu->plug( mstack.top()->m_parentMenu );
mstack.top()->m_actions.append( actionMenu );
KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(),
m_actionCollection, false,
- m_menu->m_bAddBookmark, QString::null );
- connect( subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- m_menu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ m_menu->m_bAddBookmark, TQString::null );
+ connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ m_menu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
mstack.top()->m_lstSubMenus.append( subMenu );
mstack.push(subMenu);
@@ -1097,7 +1097,7 @@ void KBookmarkMenuNSImporter::endFolder()
/********************************************************************/
/********************************************************************/
-KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const QString &id )
+KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const TQString &id )
{
KConfig config("kbookmarkrc", false, false);
config.setGroup("Bookmarks");
@@ -1129,12 +1129,12 @@ KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const QString &i
return info;
}
-QStringList KBookmarkMenu::dynamicBookmarksList()
+TQStringList KBookmarkMenu::dynamicBookmarksList()
{
KConfig config("kbookmarkrc", false, false);
config.setGroup("Bookmarks");
- QStringList mlist;
+ TQStringList mlist;
if (config.hasKey("DynamicMenus"))
mlist = config.readListEntry("DynamicMenus");
else
@@ -1143,7 +1143,7 @@ QStringList KBookmarkMenu::dynamicBookmarksList()
return mlist;
}
-void KBookmarkMenu::setDynamicBookmarks(const QString &id, const DynMenuInfo &newMenu)
+void KBookmarkMenu::setDynamicBookmarks(const TQString &id, const DynMenuInfo &newMenu)
{
KConfig config("kbookmarkrc", false, false);
@@ -1154,7 +1154,7 @@ void KBookmarkMenu::setDynamicBookmarks(const QString &id, const DynMenuInfo &ne
config.writeEntry("Type", newMenu.type);
config.writeEntry("Name", newMenu.name);
- QStringList elist;
+ TQStringList elist;
config.setGroup("Bookmarks");
if (!config.hasKey("DynamicMenus")) {
diff --git a/kio/bookmarks/kbookmarkmenu.h b/kio/bookmarks/kbookmarkmenu.h
index 0a1ca1f24..d97271879 100644
--- a/kio/bookmarks/kbookmarkmenu.h
+++ b/kio/bookmarks/kbookmarkmenu.h
@@ -24,10 +24,10 @@
#include <sys/types.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -104,7 +104,7 @@ public:
KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkOwner * owner, KPopupMenu * parentMenu,
KActionCollection * collec, bool root, bool add = true,
- const QString & parentAddress = "" );
+ const TQString & parentAddress = "" );
~KBookmarkMenu();
@@ -129,9 +129,9 @@ public:
// TODO - transform into class
struct DynMenuInfo {
bool show;
- QString location;
- QString type;
- QString name;
+ TQString location;
+ TQString type;
+ TQString name;
class DynMenuInfoPrivate *d;
};
@@ -139,7 +139,7 @@ public:
* @return dynmenu info block for the given dynmenu name
* @since 3.2
*/
- static DynMenuInfo showDynamicBookmarks( const QString &id );
+ static DynMenuInfo showDynamicBookmarks( const TQString &id );
/**
* Shows an extra menu for the given bookmarks file and type.
@@ -149,27 +149,27 @@ public:
* @param info a DynMenuInfo struct containing the to be added/modified data
* @since 3.2
*/
- static void setDynamicBookmarks( const QString &id, const DynMenuInfo &info );
+ static void setDynamicBookmarks( const TQString &id, const DynMenuInfo &info );
/**
* @return list of dynamic menu ids
* @since 3.2
*/
- static QStringList dynamicBookmarksList();
+ static TQStringList dynamicBookmarksList();
signals:
- void aboutToShowContextMenu( const KBookmark &, QPopupMenu * );
+ void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
/**
* @since 3.4
*/
- void openBookmark( const QString& url, Qt::ButtonState state );
+ void openBookmark( const TQString& url, Qt::ButtonState state );
public slots: // public for bookmark bar
- void slotBookmarksChanged( const QString & );
+ void slotBookmarksChanged( const TQString & );
protected slots:
void slotAboutToShow();
- void slotAboutToShowContextMenu( KPopupMenu *, int, QPopupMenu * );
+ void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * );
void slotActionHighlighted( KAction * );
void slotRMBActionRemove( int );
@@ -200,7 +200,7 @@ protected:
void addEditBookmarks();
void addNewFolder();
- void fillContextMenu( QPopupMenu *, const QString &, int );
+ void fillContextMenu( TQPopupMenu *, const TQString &, int );
bool m_bIsRoot:1;
bool m_bAddBookmark:1;
@@ -218,21 +218,21 @@ protected:
/**
* List of our sub menus
*/
- QPtrList<KBookmarkMenu> m_lstSubMenus;
+ TQPtrList<KBookmarkMenu> m_lstSubMenus;
KActionCollection * m_actionCollection;
/**
* List of our actions.
*/
- QPtrList<KAction> m_actions;
+ TQPtrList<KAction> m_actions;
/**
* Parent bookmark for this menu.
*/
- QString m_parentAddress;
+ TQString m_parentAddress;
// TODO make non static!
- static QString s_highlightedAddress;
- static QString s_highlightedImportLocation;
- static QString s_highlightedImportType;
+ static TQString s_highlightedAddress;
+ static TQString s_highlightedImportLocation;
+ static TQString s_highlightedImportType;
};
/**
@@ -246,17 +246,17 @@ public:
m_menu(menu), m_actionCollection(act), m_pManager(mgr) {}
void openNSBookmarks();
- void openBookmarks( const QString &location, const QString &type );
- void connectToImporter( const QObject &importer );
+ void openBookmarks( const TQString &location, const TQString &type );
+ void connectToImporter( const TQObject &importer );
protected slots:
- void newBookmark( const QString & text, const QCString & url, const QString & );
- void newFolder( const QString & text, bool, const QString & );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & );
+ void newFolder( const TQString & text, bool, const TQString & );
void newSeparator();
void endFolder();
protected:
- QPtrStack<KBookmarkMenu> mstack;
+ TQPtrStack<KBookmarkMenu> mstack;
KBookmarkMenu * m_menu;
KActionCollection * m_actionCollection;
KBookmarkManager* m_pManager;
diff --git a/kio/bookmarks/kbookmarkmenu_p.h b/kio/bookmarks/kbookmarkmenu_p.h
index 1c3f15ba8..6409a5f3e 100644
--- a/kio/bookmarks/kbookmarkmenu_p.h
+++ b/kio/bookmarks/kbookmarkmenu_p.h
@@ -24,10 +24,10 @@
#include <sys/types.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -54,19 +54,19 @@ class KPopupMenu;
class KImportedBookmarksActionMenu : public KActionMenu {
Q_OBJECT
- Q_PROPERTY( QString type READ type WRITE setType )
- Q_PROPERTY( QString location READ location WRITE setLocation )
+ Q_PROPERTY( TQString type READ type WRITE setType )
+ Q_PROPERTY( TQString location READ location WRITE setLocation )
public:
- const QString type() const { return m_type; }
- void setType(const QString &type) { m_type = type; }
- const QString location() const { return m_location; }
- void setLocation(const QString &location) { m_location = location; }
+ const TQString type() const { return m_type; }
+ void setType(const TQString &type) { m_type = type; }
+ const TQString location() const { return m_location; }
+ void setLocation(const TQString &location) { m_location = location; }
private:
- QString m_type;
- QString m_location;
+ TQString m_type;
+ TQString m_location;
public:
KImportedBookmarksActionMenu(
- const QString &text, const QString& sIconName,
+ const TQString &text, const TQString& sIconName,
KActionCollection* parent, const char* name)
: KActionMenu(text, sIconName, parent, name) {
;
@@ -75,23 +75,23 @@ public:
class KBookmarkActionMenu : public KActionMenu {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setUrl )
- Q_PROPERTY( QString address READ address WRITE setAddress )
+ Q_PROPERTY( TQString url READ url WRITE setUrl )
+ Q_PROPERTY( TQString address READ address WRITE setAddress )
Q_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly )
public:
- const QString url() const { return m_url; }
- void setUrl(const QString &url) { m_url = url; }
- const QString address() const { return m_address; }
- void setAddress(const QString &address) { m_address = address; }
+ const TQString url() const { return m_url; }
+ void setUrl(const TQString &url) { m_url = url; }
+ const TQString address() const { return m_address; }
+ void setAddress(const TQString &address) { m_address = address; }
bool readOnly() const { return m_readOnly; }
void setReadOnly(bool readOnly) { m_readOnly = readOnly; }
private:
- QString m_url;
- QString m_address;
+ TQString m_url;
+ TQString m_address;
bool m_readOnly;
public:
KBookmarkActionMenu(
- const QString &text, const QString& sIconName,
+ const TQString &text, const TQString& sIconName,
KActionCollection* parent, const char* name)
: KActionMenu(text, sIconName, parent, name) {
;
@@ -100,26 +100,26 @@ public:
class KBookmarkAction : public KAction {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setUrl )
- Q_PROPERTY( QString address READ address WRITE setAddress )
+ Q_PROPERTY( TQString url READ url WRITE setUrl )
+ Q_PROPERTY( TQString address READ address WRITE setAddress )
public:
- const QString url() const { return m_url; }
- void setUrl(const QString &url) { m_url = url; }
- const QString address() const { return m_address; }
- void setAddress(const QString &address) { m_address = address; }
+ const TQString url() const { return m_url; }
+ void setUrl(const TQString &url) { m_url = url; }
+ const TQString address() const { return m_address; }
+ void setAddress(const TQString &address) { m_address = address; }
private:
- QString m_url;
- QString m_address;
+ TQString m_url;
+ TQString m_address;
public:
// KDE4: remove
KBookmarkAction(
- const QString& text, const QString& sIconName, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQString& text, const TQString& sIconName, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name)
: KAction(text, sIconName, cut, receiver, slot, parent, name) {
}
KBookmarkAction(
- const QString& text, const QString& sIconName, const KShortcut& cut,
+ const TQString& text, const TQString& sIconName, const KShortcut& cut,
KActionCollection* parent, const char* name)
: KAction(text, sIconName, cut, parent, name) {
}
@@ -130,9 +130,9 @@ public:
typedef enum { FolderFieldsSet, BookmarkFieldsSet } FieldsSet;
KLineEdit * m_url;
KLineEdit * m_title;
- KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, FieldsSet isFolder);
- void setName(const QString &str);
- void setLocation(const QString &str);
+ KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet isFolder);
+ void setName(const TQString &str);
+ void setLocation(const TQString &str);
};
class KBookmarkEditDialog : public KDialogBase
@@ -142,27 +142,27 @@ class KBookmarkEditDialog : public KDialogBase
public:
typedef enum { ModifyMode, InsertionMode } BookmarkEditType;
- KBookmarkEditDialog( const QString& title, const QString& url, KBookmarkManager *, BookmarkEditType editType, const QString& address = QString::null,
- QWidget * = 0, const char * = 0, const QString& caption = i18n( "Add Bookmark" ) );
+ KBookmarkEditDialog( const TQString& title, const TQString& url, KBookmarkManager *, BookmarkEditType editType, const TQString& address = TQString::null,
+ TQWidget * = 0, const char * = 0, const TQString& caption = i18n( "Add Bookmark" ) );
- QString finalUrl() const;
- QString finalTitle() const;
- QString finalAddress() const;
+ TQString finalUrl() const;
+ TQString finalTitle() const;
+ TQString finalAddress() const;
protected slots:
void slotOk();
void slotCancel();
void slotUser1();
- void slotDoubleClicked(QListViewItem* item);
+ void slotDoubleClicked(TQListViewItem* item);
private:
- QWidget * m_main;
+ TQWidget * m_main;
KBookmarkEditFields * m_fields;
- QListView * m_folderTree;
- QPushButton * m_button;
+ TQListView * m_folderTree;
+ TQPushButton * m_button;
KBookmarkManager * m_mgr;
BookmarkEditType m_editType;
- QString m_address;
+ TQString m_address;
};
class KBookmarkFolderTreeItem : public QListViewItem
@@ -170,8 +170,8 @@ class KBookmarkFolderTreeItem : public QListViewItem
// make this an accessor
friend class KBookmarkFolderTree;
public:
- KBookmarkFolderTreeItem( QListView *, const KBookmark & );
- KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *, QListViewItem *, const KBookmarkGroup & );
+ KBookmarkFolderTreeItem( TQListView *, const KBookmark & );
+ KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *, TQListViewItem *, const KBookmarkGroup & );
private:
KBookmark m_bookmark;
};
@@ -179,10 +179,10 @@ private:
class KBookmarkFolderTree
{
public:
- static QListView* createTree( KBookmarkManager *, QWidget * = 0, const char * = 0, const QString& = QString::null );
- static void fillTree( QListView*, KBookmarkManager *, const QString& = QString::null );
- static QString selectedAddress( QListView* );
- static void setAddress( QListView *, const QString & );
+ static TQListView* createTree( KBookmarkManager *, TQWidget * = 0, const char * = 0, const TQString& = TQString::null );
+ static void fillTree( TQListView*, KBookmarkManager *, const TQString& = TQString::null );
+ static TQString selectedAddress( TQListView* );
+ static void setAddress( TQListView *, const TQString & );
};
class KBookmarkSettings
@@ -203,9 +203,9 @@ public:
static void begin_rmb_action(KBookmarkMenu *);
static void begin_rmb_action(KBookmarkBar *);
bool invalid( int val );
- KBookmark atAddress(const QString & address);
- void fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val );
- void fillContextMenu2( QPopupMenu* contextMenu, const QString & address, int val );
+ KBookmark atAddress(const TQString & address);
+ void fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val );
+ void fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val );
void slotRMBActionEditAt( int val );
void slotRMBActionProperties( int val );
void slotRMBActionInsert( int val );
@@ -213,12 +213,12 @@ public:
void slotRMBActionCopyLocation( int val );
void hidePopup();
public:
- QObject *recv;
+ TQObject *recv;
KBookmarkManager *m_pManager;
- QString s_highlightedAddress;
- QString m_parentAddress;
+ TQString s_highlightedAddress;
+ TQString m_parentAddress;
KBookmarkOwner *m_pOwner;
- QWidget *m_parentMenu;
+ TQWidget *m_parentMenu;
};
#endif
diff --git a/kio/bookmarks/kbookmarknotifier.h b/kio/bookmarks/kbookmarknotifier.h
index 6a16fa052..3982f984f 100644
--- a/kio/bookmarks/kbookmarknotifier.h
+++ b/kio/bookmarks/kbookmarknotifier.h
@@ -33,12 +33,12 @@ class KIO_EXPORT KBookmarkNotifier : virtual public DCOPObject
K_DCOP
public:
- KBookmarkNotifier(QCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
+ KBookmarkNotifier(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
k_dcop_signals:
- void addedBookmark( QString filename, QString url, QString text, QString address, QString icon );
- void createdNewFolder( QString filename, QString text, QString address );
- void updatedAccessMetadata( QString filename, QString url );
+ void addedBookmark( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ void createdNewFolder( TQString filename, TQString text, TQString address );
+ void updatedAccessMetadata( TQString filename, TQString url );
};
#endif
diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc
index d828064b7..6a5a1346c 100644
--- a/kio/httpfilter/httpfilter.cc
+++ b/kio/httpfilter/httpfilter.cc
@@ -37,8 +37,8 @@ void
HTTPFilterBase::chain(HTTPFilterBase *previous)
{
last = previous;
- connect(last, SIGNAL(output(const QByteArray &)),
- this, SLOT(slotInput(const QByteArray &)));
+ connect(last, TQT_SIGNAL(output(const TQByteArray &)),
+ this, TQT_SLOT(slotInput(const TQByteArray &)));
}
HTTPFilterChain::HTTPFilterChain()
@@ -55,18 +55,18 @@ HTTPFilterChain::addFilter(HTTPFilterBase *filter)
}
else
{
- disconnect(last, SIGNAL(output(const QByteArray &)), 0, 0);
+ disconnect(last, TQT_SIGNAL(output(const TQByteArray &)), 0, 0);
filter->chain(last);
}
last = filter;
- connect(filter, SIGNAL(output(const QByteArray &)),
- this, SIGNAL(output(const QByteArray &)));
- connect(filter, SIGNAL(error(int, const QString &)),
- this, SIGNAL(error(int, const QString &)));
+ connect(filter, TQT_SIGNAL(output(const TQByteArray &)),
+ this, TQT_SIGNAL(output(const TQByteArray &)));
+ connect(filter, TQT_SIGNAL(error(int, const TQString &)),
+ this, TQT_SIGNAL(error(int, const TQString &)));
}
void
-HTTPFilterChain::slotInput(const QByteArray &d)
+HTTPFilterChain::slotInput(const TQByteArray &d)
{
if (first)
first->slotInput(d);
@@ -78,14 +78,14 @@ HTTPFilterMD5::HTTPFilterMD5()
{
}
-QString
+TQString
HTTPFilterMD5::md5()
{
- return QString::fromLatin1(context.base64Digest());
+ return TQString::fromLatin1(context.base64Digest());
}
void
-HTTPFilterMD5::slotInput(const QByteArray &d)
+HTTPFilterMD5::slotInput(const TQByteArray &d)
{
context.update(d);
emit output(d);
@@ -246,7 +246,7 @@ HTTPFilterGZip::checkHeader()
}
void
-HTTPFilterGZip::slotInput(const QByteArray &d)
+HTTPFilterGZip::slotInput(const TQByteArray &d)
{
#ifdef DO_GZIP
if (bPlainText)
@@ -262,7 +262,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
// Make sure we get the last bytes still in the pipe.
// Needed with "deflate".
- QByteArray flush(4);
+ TQByteArray flush(4);
flush.fill(0);
slotInput(flush);
if (!bHasFinished && !bHasHeader)
@@ -271,7 +271,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
emit output(headerData);
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
}
if (!bHasFinished)
@@ -288,7 +288,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
return;
}
@@ -338,7 +338,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
int bytesOut = 8192 - zstr.avail_out;
if (bytesOut)
{
- QByteArray d;
+ TQByteArray d;
d.setRawData( buf, bytesOut );
emit output(d);
d.resetRawData( buf, bytesOut );
@@ -353,7 +353,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
return;
}
diff --git a/kio/httpfilter/httpfilter.h b/kio/httpfilter/httpfilter.h
index bc69f4a87..6d74a56ea 100644
--- a/kio/httpfilter/httpfilter.h
+++ b/kio/httpfilter/httpfilter.h
@@ -30,7 +30,7 @@
#include <zlib.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kmdcodec.h>
class HTTPFilterBase : public QObject
@@ -43,11 +43,11 @@ public:
void chain(HTTPFilterBase *previous);
public slots:
- virtual void slotInput(const QByteArray &d) = 0;
+ virtual void slotInput(const TQByteArray &d) = 0;
signals:
- void output(const QByteArray &d);
- void error(int, const QString &);
+ void output(const TQByteArray &d);
+ void error(int, const TQString &);
protected:
HTTPFilterBase *last;
@@ -62,7 +62,7 @@ public:
void addFilter(HTTPFilterBase *filter);
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
private:
HTTPFilterBase *first;
@@ -74,10 +74,10 @@ class HTTPFilterMD5 : public HTTPFilterBase
public:
HTTPFilterMD5();
- QString md5();
+ TQString md5();
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
private:
KMD5 context;
@@ -92,7 +92,7 @@ public:
~HTTPFilterGZip();
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
protected:
int get_byte();
@@ -104,7 +104,7 @@ protected:
bool bHasFinished : 1;
bool bPlainText : 1;
bool bEatTrailer : 1;
- QByteArray headerData;
+ TQByteArray headerData;
int iTrailer;
#endif
};
diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h
index 3666c571b..8715ed273 100644
--- a/kio/kfile/config-kfile.h
+++ b/kio/kfile/config-kfile.h
@@ -3,7 +3,7 @@
const int kfile_area = 250;
-#define DefaultViewStyle QString::fromLatin1("SimpleView")
+#define DefaultViewStyle TQString::fromLatin1("SimpleView")
#define DefaultPannerPosition 40
#define DefaultMixDirsAndFiles false
#define DefaultShowStatusLine false
@@ -14,19 +14,19 @@ const int kfile_area = 250;
#define DefaultRecentURLsNumber 15
#define DefaultDirectoryFollowing true
#define DefaultAutoSelectExtChecked true
-#define ConfigGroup QString::fromLatin1("KFileDialog Settings")
-#define RecentURLs QString::fromLatin1("Recent URLs")
-#define RecentFiles QString::fromLatin1("Recent Files")
-#define RecentURLsNumber QString::fromLatin1("Maximum of recent URLs")
-#define RecentFilesNumber QString::fromLatin1("Maximum of recent files")
-#define DialogWidth QString::fromLatin1("Width (%1)")
-#define DialogHeight QString::fromLatin1("Height (%1)")
-#define ConfigShowStatusLine QString::fromLatin1("ShowStatusLine")
-#define AutoDirectoryFollowing QString::fromLatin1("Automatic directory following")
-#define PathComboCompletionMode QString::fromLatin1("PathCombo Completionmode")
-#define LocationComboCompletionMode QString::fromLatin1("LocationCombo Completionmode")
-#define ShowSpeedbar QString::fromLatin1("Show Speedbar")
-#define ShowBookmarks QString::fromLatin1("Show Bookmarks")
-#define AutoSelectExtChecked QString::fromLatin1("Automatically select filename extension")
+#define ConfigGroup TQString::fromLatin1("KFileDialog Settings")
+#define RecentURLs TQString::fromLatin1("Recent URLs")
+#define RecentFiles TQString::fromLatin1("Recent Files")
+#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs")
+#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files")
+#define DialogWidth TQString::fromLatin1("Width (%1)")
+#define DialogHeight TQString::fromLatin1("Height (%1)")
+#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine")
+#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following")
+#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode")
+#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode")
+#define ShowSpeedbar TQString::fromLatin1("Show Speedbar")
+#define ShowBookmarks TQString::fromLatin1("Show Bookmarks")
+#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension")
#endif
diff --git a/kio/kfile/images.h b/kio/kfile/images.h
index 0c7bd1c37..f544e2f0a 100644
--- a/kio/kfile/images.h
+++ b/kio/kfile/images.h
@@ -1,8 +1,8 @@
#ifdef USE_POSIX_ACL
#ifndef _QEMBED_1804289383
#define _QEMBED_1804289383
-#include <qimage.h>
-#include <qdict.h>
+#include <tqimage.h>
+#include <tqdict.h>
static const QRgb group_grey_data[] = {
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x42484848,0xc39b9b9b,0xeab1b1b1,0xce9d9d9d,0x5a4d4d4d,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x563b3b3b,0xfdaeaeae,0xffcfcfcf,0xffcccccc,0xffcecece,
@@ -245,20 +245,20 @@ static struct EmbedImage {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-static const QImage& qembed_findImage( const QString& name )
+static const TQImage& qembed_findImage( const TQString& name )
{
- static QDict<QImage> dict;
- QImage* img = dict.find( name );
+ static TQDict<TQImage> dict;
+ TQImage* img = dict.find( name );
if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {
- img = new QImage((uchar*)embed_image_vec[i].data,
+ img = new TQImage((uchar*)embed_image_vec[i].data,
embed_image_vec[i].width,
embed_image_vec[i].height,
embed_image_vec[i].depth,
(QRgb*)embed_image_vec[i].colorTable,
embed_image_vec[i].numColors,
- QImage::BigEndian );
+ TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
dict.insert( name, img );
@@ -266,7 +266,7 @@ static const QImage& qembed_findImage( const QString& name )
}
}
if ( !img ) {
- static QImage dummy;
+ static TQImage dummy;
return dummy;
}
}
diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp
index 41a5af7bd..7f253f8c5 100644
--- a/kio/kfile/kacleditwidget.cpp
+++ b/kio/kfile/kacleditwidget.cpp
@@ -24,19 +24,19 @@
#ifdef USE_POSIX_ACL
-#include <qpainter.h>
-#include <qptrlist.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kfileitem.h>
@@ -58,7 +58,7 @@ extern "C" {
static struct {
const char* label;
const char* pixmapName;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
} s_itemAttributes[] = {
{ I18N_NOOP( "Owner" ), "user-grey", 0 },
{ I18N_NOOP( "Owning Group" ), "group-grey", 0 },
@@ -68,24 +68,24 @@ static struct {
{ I18N_NOOP( "Named Group" ), "group", 0 },
};
-KACLEditWidget::KACLEditWidget( QWidget *parent, const char *name )
- :QWidget( parent, name )
+KACLEditWidget::KACLEditWidget( TQWidget *parent, const char *name )
+ :TQWidget( parent, name )
{
- QHBox *hbox = new QHBox( parent );
+ TQHBox *hbox = new TQHBox( parent );
hbox->setSpacing( KDialog::spacingHint() );
m_listView = new KACLListView( hbox, "acl_listview" );
- connect( m_listView, SIGNAL( selectionChanged() ),
- this, SLOT( slotUpdateButtons() ) );
- QVBox *vbox = new QVBox( hbox );
+ connect( m_listView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotUpdateButtons() ) );
+ TQVBox *vbox = new TQVBox( hbox );
vbox->setSpacing( KDialog::spacingHint() );
- m_AddBtn = new QPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
- connect( m_AddBtn, SIGNAL( clicked() ), m_listView, SLOT( slotAddEntry() ) );
- m_EditBtn = new QPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
- connect( m_EditBtn, SIGNAL( clicked() ), m_listView, SLOT( slotEditEntry() ) );
- m_DelBtn = new QPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
- connect( m_DelBtn, SIGNAL( clicked() ), m_listView, SLOT( slotRemoveEntry() ) );
- QWidget *spacer = new QWidget( vbox );
- spacer->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
+ m_AddBtn = new TQPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
+ connect( m_AddBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotAddEntry() ) );
+ m_EditBtn = new TQPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
+ connect( m_EditBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotEditEntry() ) );
+ m_DelBtn = new TQPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
+ connect( m_DelBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotRemoveEntry() ) );
+ TQWidget *spacer = new TQWidget( vbox );
+ spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding );
slotUpdateButtons();
}
@@ -94,7 +94,7 @@ void KACLEditWidget::slotUpdateButtons()
bool atLeastOneIsNotDeletable = false;
bool atLeastOneIsNotAllowedToChangeType = false;
int selectedCount = 0;
- QListViewItemIterator it( m_listView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( m_listView, TQListViewItemIterator::Selected );
while ( KACLListViewItem *item = dynamic_cast<KACLListViewItem*>( it.current() ) ) {
++it; ++selectedCount;
if ( !item->isDeletable() )
@@ -139,10 +139,10 @@ void KACLEditWidget::setReadOnly( bool on )
slotUpdateButtons();
}
-KACLListViewItem::KACLListViewItem( QListView* parent,
+KACLListViewItem::KACLListViewItem( TQListView* parent,
KACLListView::EntryType _type,
unsigned short _value, bool defaults,
- const QString& _qualifier )
+ const TQString& _qualifier )
: KListViewItem( parent, parent->lastItem() ), // we want to append
type( _type ), value( _value ), isDefault( defaults ),
qualifier( _qualifier ), isPartial( false )
@@ -157,9 +157,9 @@ KACLListViewItem::~ KACLListViewItem()
}
-QString KACLListViewItem::key( int, bool ) const
+TQString KACLListViewItem::key( int, bool ) const
{
- QString key;
+ TQString key;
if ( !isDefault )
key = "A";
else
@@ -191,17 +191,17 @@ QString KACLListViewItem::key( int, bool ) const
return key;
}
-void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
+void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup mycg = cg;
+ TQColorGroup mycg = cg;
if ( isDefault ) {
- mycg.setColor( QColorGroup::Text, QColor( 0, 0, 255 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 0, 0, 255 ) );
}
if ( isPartial ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setItalic( true );
- mycg.setColor( QColorGroup::Text, QColor( 100, 100, 100 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) );
p->setFont( font );
}
KListViewItem::paintCell( p, mycg, column, width, alignment );
@@ -213,7 +213,7 @@ void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
const bool lastNonDefault = !isDefault && below && below->isDefault;
if ( type == KACLListView::Mask || lastUser || lastNonDefault )
{
- p->setPen( QPen( Qt::gray, 0, QPen::DotLine ) );
+ p->setPen( TQPen( Qt::gray, 0, TQPen::DotLine ) );
if ( type == KACLListView::Mask )
p->drawLine( 0, 0, width - 1, 0 );
p->drawLine( 0, height() - 1, width - 1, height() - 1 );
@@ -230,21 +230,21 @@ void KACLListViewItem::updatePermPixmaps()
else if ( partialPerms & ACL_READ )
setPixmap( 2, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 2, QPixmap() );
+ setPixmap( 2, TQPixmap() );
if ( value & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 3, QPixmap() );
+ setPixmap( 3, TQPixmap() );
if ( value & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 4, QPixmap() );
+ setPixmap( 4, TQPixmap() );
}
void KACLListViewItem::repaint()
@@ -285,7 +285,7 @@ void KACLListViewItem::repaint()
void KACLListViewItem::calcEffectiveRights()
{
- QString strEffective = QString( "---" );
+ TQString strEffective = TQString( "---" );
// Do we need to worry about the mask entry? It applies to named users,
// owning group, and named groups
@@ -387,10 +387,10 @@ void KACLListViewItem::togglePerm( acl_perm_t perm )
EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes, int allowedDefaultTypes,
bool allowDefaults )
: KDialogBase( listView, "edit_entry_dialog", true,
@@ -401,54 +401,54 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
m_allowedTypes( allowedTypes ), m_allowedDefaultTypes( allowedDefaultTypes ),
m_defaultCB( 0 )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *mainLayout = new QVBoxLayout( page, 0, spacingHint(), "mainLayout" );
- m_buttonGroup = new QVButtonGroup( i18n("Entry Type"), page, "bg" );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( page, 0, spacingHint(), "mainLayout" );
+ m_buttonGroup = new TQVButtonGroup( i18n("Entry Type"), page, "bg" );
if ( allowDefaults ) {
- m_defaultCB = new QCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
+ m_defaultCB = new TQCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
mainLayout->addWidget( m_defaultCB );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedUsersAndGroups() ) );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedTypes() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedUsersAndGroups() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedTypes() ) );
}
mainLayout->addWidget( m_buttonGroup );
- QRadioButton *ownerType = new QRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
+ TQRadioButton *ownerType = new TQRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
m_buttonGroup->insert( ownerType, KACLListView::User );
- QRadioButton *owningGroupType = new QRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
+ TQRadioButton *owningGroupType = new TQRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
m_buttonGroup->insert( owningGroupType, KACLListView::Group );
- QRadioButton *othersType = new QRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
+ TQRadioButton *othersType = new TQRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
m_buttonGroup->insert( othersType, KACLListView::Others );
- QRadioButton *maskType = new QRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
+ TQRadioButton *maskType = new TQRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
m_buttonGroup->insert( maskType, KACLListView::Mask );
- QRadioButton *namedUserType = new QRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
+ TQRadioButton *namedUserType = new TQRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
m_buttonGroup->insert( namedUserType, KACLListView::NamedUser );
- QRadioButton *namedGroupType = new QRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
+ TQRadioButton *namedGroupType = new TQRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
m_buttonGroup->insert( namedGroupType, KACLListView::NamedGroup );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotSelectionChanged( int ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotSelectionChanged( int ) ) );
- m_widgetStack = new QWidgetStack( page );
+ m_widgetStack = new TQWidgetStack( page );
mainLayout->addWidget( m_widgetStack );
- QHBox *usersBox = new QHBox( m_widgetStack );
+ TQHBox *usersBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( usersBox, KACLListView::NamedUser );
- QHBox *groupsBox = new QHBox( m_widgetStack );
+ TQHBox *groupsBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( groupsBox, KACLListView::NamedGroup );
- QLabel *usersLabel = new QLabel( i18n( "User: " ), usersBox );
- m_usersCombo = new QComboBox( false, usersBox, "users" );
+ TQLabel *usersLabel = new TQLabel( i18n( "User: " ), usersBox );
+ m_usersCombo = new TQComboBox( false, usersBox, "users" );
usersLabel->setBuddy( m_usersCombo );
- QLabel *groupsLabel = new QLabel( i18n( "Group: " ), groupsBox );
- m_groupsCombo = new QComboBox( false, groupsBox, "groups" );
+ TQLabel *groupsLabel = new TQLabel( i18n( "Group: " ), groupsBox );
+ m_groupsCombo = new TQComboBox( false, groupsBox, "groups" );
groupsLabel->setBuddy( m_groupsCombo );
if ( m_item ) {
@@ -470,7 +470,7 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
slotSelectionChanged( KACLListView::NamedUser );
slotUpdateAllowedUsersAndGroups();
}
- incInitialSize( QSize( 100, 0 ) );
+ incInitialSize( TQSize( 100, 0 ) );
}
void EditACLEntryDialog::slotUpdateAllowedTypes()
@@ -489,8 +489,8 @@ void EditACLEntryDialog::slotUpdateAllowedTypes()
void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups()
{
- const QString oldUser = m_usersCombo->currentText();
- const QString oldGroup = m_groupsCombo->currentText();
+ const TQString oldUser = m_usersCombo->currentText();
+ const TQString oldGroup = m_groupsCombo->currentText();
m_usersCombo->clear();
m_groupsCombo->clear();
if ( m_defaultCB && m_defaultCB->isChecked() ) {
@@ -513,7 +513,7 @@ void EditACLEntryDialog::slotOk()
{
KACLListView::EntryType type = static_cast<KACLListView::EntryType>( m_buttonGroup->selectedId() );
- QString qualifier;
+ TQString qualifier;
if ( type == KACLListView::NamedUser )
qualifier = m_usersCombo->currentText();
if ( type == KACLListView::NamedGroup )
@@ -555,7 +555,7 @@ void EditACLEntryDialog::slotSelectionChanged( int id )
}
-KACLListView::KACLListView( QWidget* parent, const char* name )
+KACLListView::KACLListView( TQWidget* parent, const char* name )
: KListView( parent, name ),
m_hasMask( false ), m_allowDefaults( false )
{
@@ -571,25 +571,25 @@ KACLListView::KACLListView( QWidget* parent, const char* name )
// Load the avatars
for ( int i=0; i < LAST_IDX; ++i ) {
- s_itemAttributes[i].pixmap = new QPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
+ s_itemAttributes[i].pixmap = new TQPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
}
- m_yesPixmap = new QPixmap( qembed_findImage( "yes" ) );
- m_yesPartialPixmap = new QPixmap( qembed_findImage( "yespartial" ) );
+ m_yesPixmap = new TQPixmap( qembed_findImage( "yes" ) );
+ m_yesPartialPixmap = new TQPixmap( qembed_findImage( "yespartial" ) );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
// fill the lists of all legal users and groups
struct passwd *user = 0;
setpwent();
while ( ( user = getpwent() ) != 0 ) {
- m_allUsers << QString::fromLatin1( user->pw_name );
+ m_allUsers << TQString::fromLatin1( user->pw_name );
}
endpwent();
struct group *gr = 0;
setgrent();
while ( ( gr = getgrent() ) != 0 ) {
- m_allGroups << QString::fromLatin1( gr->gr_name );
+ m_allGroups << TQString::fromLatin1( gr->gr_name );
}
endgrent();
m_allUsers.sort();
@@ -606,10 +606,10 @@ KACLListView::~KACLListView()
delete m_yesPartialPixmap;
}
-QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedUsers = m_allUsers;
- QListViewItemIterator it( this );
+ TQStringList allowedUsers = m_allUsers;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -620,10 +620,10 @@ QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowed
return allowedUsers;
}
-QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedGroups = m_allGroups;
- QListViewItemIterator it( this );
+ TQStringList allowedGroups = m_allGroups;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -637,7 +637,7 @@ QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowe
void KACLListView::fillItemsFromACL( const KACL &pACL, bool defaults )
{
// clear out old entries of that ilk
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( item->isDefault == defaults )
@@ -698,8 +698,8 @@ KACL KACLListView::itemsToACL( bool defaults ) const
bool atLeastOneEntry = false;
ACLUserPermissionsList users;
ACLGroupPermissionsList groups;
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
- while ( QListViewItem* qlvi = it.current() ) {
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ while ( TQListViewItem* qlvi = it.current() ) {
++it;
const KACLListViewItem* item = static_cast<KACLListViewItem*>( qlvi );
if ( item->isDefault != defaults ) continue;
@@ -747,9 +747,9 @@ KACL KACLListView::getDefaultACL()
return itemsToACL( true );
}
-void KACLListView::contentsMousePressEvent( QMouseEvent * e )
+void KACLListView::contentsMousePressEvent( TQMouseEvent * e )
{
- QListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
if ( !clickedItem ) return;
// if the click is on an as yet unselected item, select it first
if ( !clickedItem->isSelected() )
@@ -774,7 +774,7 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
KACLListViewItem* referenceItem = static_cast<KACLListViewItem*>( clickedItem );
unsigned short referenceHadItSet = referenceItem->value & perm;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -784,11 +784,11 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
}
-void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int col )
+void KACLListView::entryClicked( TQListViewItem* pItem, const TQPoint& /*pt*/, int col )
{
if ( !pItem ) return;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -835,7 +835,7 @@ void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int
void KACLListView::calculateEffectiveRights()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
KACLListViewItem* pItem;
while ( ( pItem = dynamic_cast<KACLListViewItem*>( it.current() ) ) != 0 )
{
@@ -873,7 +873,7 @@ void KACLListView::setMaskPartialPermissions( acl_perm_t /*maskPartialPerms*/ )
bool KACLListView::hasDefaultEntries() const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -889,7 +889,7 @@ const KACLListViewItem* KACLListView::findDefaultItemByType( EntryType type ) co
const KACLListViewItem* KACLListView::findItemByType( EntryType type, bool defaults ) const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -962,7 +962,7 @@ void KACLListView::slotAddEntry()
calculateEffectiveRights();
sort();
setCurrentItem( item );
- // QListView doesn't seem to emit, in this case, and we need to update
+ // TQListView doesn't seem to emit, in this case, and we need to update
// the buttons...
if ( childCount() == 1 )
emit currentChanged( item );
@@ -970,7 +970,7 @@ void KACLListView::slotAddEntry()
void KACLListView::slotEditEntry()
{
- QListViewItem * current = currentItem();
+ TQListViewItem * current = currentItem();
if ( !current ) return;
KACLListViewItem *item = static_cast<KACLListViewItem*>( current );
int allowedTypes = item->type | NamedUser | NamedGroup;
@@ -1002,7 +1002,7 @@ void KACLListView::slotEditEntry()
void KACLListView::slotRemoveEntry()
{
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() ) {
KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() );
++it;
diff --git a/kio/kfile/kacleditwidget.h b/kio/kfile/kacleditwidget.h
index 4fec2d7c3..39cdf89a1 100644
--- a/kio/kfile/kacleditwidget.h
+++ b/kio/kfile/kacleditwidget.h
@@ -38,7 +38,7 @@ class KACLEditWidget : QWidget
{
Q_OBJECT
public:
- KACLEditWidget( QWidget *parent = 0, const char *name = 0 );
+ KACLEditWidget( TQWidget *parent = 0, const char *name = 0 );
KACL getACL() const;
KACL getDefaultACL() const;
void setACL( const KACL & );
@@ -50,9 +50,9 @@ private slots:
private:
KACLListView* m_listView;
- QPushButton *m_AddBtn;
- QPushButton *m_EditBtn;
- QPushButton *m_DelBtn;
+ TQPushButton *m_AddBtn;
+ TQPushButton *m_EditBtn;
+ TQPushButton *m_DelBtn;
};
diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h
index 6a5a7d074..3ad77930c 100644
--- a/kio/kfile/kacleditwidget_p.h
+++ b/kio/kfile/kacleditwidget_p.h
@@ -30,8 +30,8 @@
#include <kacl.h>
#include <kfileitem.h>
#include <kdialogbase.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
class KACLListViewItem;
class QPushButton;
@@ -66,7 +66,7 @@ public:
NamedGroup = 32,
AllTypes = 63 };
- KACLListView( QWidget* parent = 0, const char* name = 0 );
+ KACLListView( TQWidget* parent = 0, const char* name = 0 );
~KACLListView();
bool hasMaskEntry() const { return m_hasMask; }
@@ -87,8 +87,8 @@ public:
unsigned short calculateMaskValue( bool defaults ) const;
void calculateEffectiveRights();
- QStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
- QStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
const KACL getACL() const { return getACL(); }
KACL getACL();
@@ -96,8 +96,8 @@ public:
const KACL getDefaultACL() const { return getDefaultACL(); }
KACL getDefaultACL();
- QPixmap getYesPixmap() const { return *m_yesPixmap; }
- QPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
+ TQPixmap getYesPixmap() const { return *m_yesPixmap; }
+ TQPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
public slots:
void slotAddEntry();
@@ -107,9 +107,9 @@ public slots:
void setDefaultACL( const KACL &anACL );
protected slots:
- void entryClicked( QListViewItem* pItem, const QPoint& pt, int col );
+ void entryClicked( TQListViewItem* pItem, const TQPoint& pt, int col );
protected:
- void contentsMousePressEvent( QMouseEvent * e );
+ void contentsMousePressEvent( TQMouseEvent * e );
private:
void fillItemsFromACL( const KACL &pACL, bool defaults = false );
@@ -120,10 +120,10 @@ private:
unsigned short m_mask;
bool m_hasMask;
bool m_allowDefaults;
- QStringList m_allUsers;
- QStringList m_allGroups;
- QPixmap* m_yesPixmap;
- QPixmap* m_yesPartialPixmap;
+ TQStringList m_allUsers;
+ TQStringList m_allGroups;
+ TQPixmap* m_yesPixmap;
+ TQPixmap* m_yesPartialPixmap;
};
class EditACLEntryDialog : public KDialogBase
@@ -131,10 +131,10 @@ class EditACLEntryDialog : public KDialogBase
Q_OBJECT
public:
EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes = KACLListView::AllTypes,
int allowedDefaultTypes = KACLListView::AllTypes,
bool allowDefault = false );
@@ -148,29 +148,29 @@ private slots:
private:
KACLListView *m_listView;
KACLListViewItem *m_item;
- QStringList m_users;
- QStringList m_groups;
- QStringList m_defaultUsers;
- QStringList m_defaultGroups;
+ TQStringList m_users;
+ TQStringList m_groups;
+ TQStringList m_defaultUsers;
+ TQStringList m_defaultGroups;
int m_allowedTypes;
int m_allowedDefaultTypes;
- QVButtonGroup *m_buttonGroup;
- QComboBox *m_usersCombo;
- QComboBox *m_groupsCombo;
- QWidgetStack *m_widgetStack;
- QCheckBox *m_defaultCB;
+ TQVButtonGroup *m_buttonGroup;
+ TQComboBox *m_usersCombo;
+ TQComboBox *m_groupsCombo;
+ TQWidgetStack *m_widgetStack;
+ TQCheckBox *m_defaultCB;
};
class KACLListViewItem : public KListViewItem
{
public:
- KACLListViewItem( QListView* parent, KACLListView::EntryType type,
+ KACLListViewItem( TQListView* parent, KACLListView::EntryType type,
unsigned short value,
bool defaultEntry,
- const QString& qualifier = QString::null );
+ const TQString& qualifier = TQString::null );
virtual ~KACLListViewItem();
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
void calcEffectiveRights();
@@ -179,7 +179,7 @@ public:
void togglePerm( acl_perm_t perm );
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
void updatePermPixmaps();
@@ -188,7 +188,7 @@ public:
KACLListView::EntryType type;
unsigned short value;
bool isDefault;
- QString qualifier;
+ TQString qualifier;
bool isPartial;
private:
diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp
index fc16054f1..6baf6d36f 100644
--- a/kio/kfile/kcombiview.cpp
+++ b/kio/kfile/kcombiview.cpp
@@ -28,19 +28,19 @@
#include "kfiledetailview.h"
#include "config-kfile.h"
-#include <qevent.h>
+#include <tqevent.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
-KCombiView::KCombiView( QWidget *parent, const char *name)
- : QSplitter( parent, name),
+KCombiView::KCombiView( TQWidget *parent, const char *name)
+ : TQSplitter( parent, name),
KFileView(),
right(0),
m_lastViewForNextItem(0),
@@ -51,13 +51,13 @@ KCombiView::KCombiView( QWidget *parent, const char *name)
left->viewport()->setAcceptDrops(false);
left->setGridX( 160 );
left->KFileView::setViewMode( Directories );
- left->setArrangement( QIconView::LeftToRight );
+ left->setArrangement( TQIconView::LeftToRight );
left->setParentView( this );
left->setAcceptDrops(false);
left->installEventFilter( this );
- connect( sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- SLOT( slotSortingChanged( QDir::SortSpec ) ));
+ connect( sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ TQT_SLOT( slotSortingChanged( TQDir::SortSpec ) ));
}
KCombiView::~KCombiView()
@@ -72,10 +72,10 @@ void KCombiView::setRight(KFileView *view)
right->KFileView::setViewMode( Files );
setViewName( right->viewName() );
- QValueList<int> lst;
+ TQValueList<int> lst;
lst << left->gridX() + 2 * left->spacing();
setSizes( lst );
- setResizeMode( left, QSplitter::KeepSize );
+ setResizeMode( left, TQSplitter::KeepSize );
right->setParentView( this );
right->widget()->setAcceptDrops(acceptDrops());
@@ -98,7 +98,7 @@ void KCombiView::insertItem( KFileItem *item )
}
}
-void KCombiView::setSorting( QDir::SortSpec sort )
+void KCombiView::setSorting( TQDir::SortSpec sort )
{
if ( !right )
kdFatal() << "You need to call setRight( someview ) before!" << endl;
@@ -293,26 +293,26 @@ KFileItem * KCombiView::prevItem( const KFileItem *fileItem ) const
return item;
}
-void KCombiView::slotSortingChanged( QDir::SortSpec sorting )
+void KCombiView::slotSortingChanged( TQDir::SortSpec sorting )
{
KFileView::setSorting( sorting );
}
KFileView *KCombiView::focusView( KFileView *preferred ) const
{
- QWidget *w = focusWidget();
+ TQWidget *w = focusWidget();
KFileView *other = (right == preferred) ? left : right;
return (preferred && w == preferred->widget()) ? preferred : other;
}
-void KCombiView::readConfig( KConfig *config, const QString& group )
+void KCombiView::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
if ( right )
right->readConfig( config, group );
}
-void KCombiView::writeConfig( KConfig *config, const QString& group )
+void KCombiView::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
if ( right )
@@ -329,7 +329,7 @@ void KCombiView::setAcceptDrops(bool b)
left->setAcceptDrops(b);
if (right)
right->widget()->setAcceptDrops(b);
- QSplitter::setAcceptDrops(b);
+ TQSplitter::setAcceptDrops(b);
}
void KCombiView::setDropOptions_impl(int options)
@@ -351,12 +351,12 @@ void KCombiView::virtual_hook( int id, void* data )
}
}
-bool KCombiView::eventFilter( QObject *o, QEvent *e )
+bool KCombiView::eventFilter( TQObject *o, TQEvent *e )
{
int type = e->type();
// only the focused view may have a selection
- if ( type == QEvent::FocusIn )
+ if ( type == TQEvent::FocusIn )
{
if ( o == left )
right->clearSelection();
@@ -364,7 +364,7 @@ bool KCombiView::eventFilter( QObject *o, QEvent *e )
left->clearSelection();
}
- return QSplitter::eventFilter( o, e );
+ return TQSplitter::eventFilter( o, e );
}
#include "kcombiview.moc"
diff --git a/kio/kfile/kcombiview.h b/kio/kfile/kcombiview.h
index b38876d71..3597669ea 100644
--- a/kio/kfile/kcombiview.h
+++ b/kio/kfile/kcombiview.h
@@ -22,7 +22,7 @@
#ifndef _KCOMBIVIEW_H
#define _KCOMBIVIEW_H
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <klocale.h>
#include <kfile.h>
@@ -51,16 +51,16 @@ class QIconViewItem;
* @see KFileDetailView
* @see KDirOperator
*/
-class KIO_EXPORT KCombiView : public QSplitter,
+class KIO_EXPORT KCombiView : public TQSplitter,
public KFileView
{
Q_OBJECT
public:
- KCombiView( QWidget *parent, const char *name);
+ KCombiView( TQWidget *parent, const char *name);
virtual ~KCombiView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void updateView( bool );
@@ -91,10 +91,10 @@ public:
virtual void insertItem( KFileItem *i );
virtual void clear();
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
void ensureItemVisible( const KFileItem * );
@@ -107,7 +107,7 @@ protected:
KFileView *right;
protected slots:
- void slotSortingChanged( QDir::SortSpec );
+ void slotSortingChanged( TQDir::SortSpec );
private:
KFileView *focusView( KFileView *preferred ) const;
@@ -120,7 +120,7 @@ private:
mutable KFileView *m_lastViewForPrevItem;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void setDropOptions_impl(int options);
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp
index edbca55e3..aec3c10f1 100644
--- a/kio/kfile/kcustommenueditor.cpp
+++ b/kio/kfile/kcustommenueditor.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qhbox.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qpushbutton.h>
-#include <qdir.h>
+#include <tqhbox.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
#include <kbuttonbox.h>
#include <klocale.h>
@@ -38,15 +38,15 @@
class KCustomMenuEditor::Item : public QListViewItem
{
public:
- Item(QListView *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListView *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
}
- Item(QListViewItem *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListViewItem *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
@@ -54,18 +54,18 @@ public:
void init()
{
- QString serviceName = s->name();
+ TQString serviceName = s->name();
// item names may contain ampersands. To avoid them being converted
// to accelators, replace them with two ampersands.
serviceName.replace("&", "&&");
- QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
+ TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(16, 16);
normal.convertFromImage(tmp);
}
@@ -79,28 +79,28 @@ public:
class KCustomMenuEditor::KCustomMenuEditorPrivate
{
public:
- QPushButton * pbRemove;
- QPushButton * pbMoveUp;
- QPushButton * pbMoveDown;
+ TQPushButton * pbRemove;
+ TQPushButton * pbMoveUp;
+ TQPushButton * pbMoveDown;
};
-KCustomMenuEditor::KCustomMenuEditor(QWidget *parent)
+KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent)
: KDialogBase(parent, "custommenueditor", true, i18n("Menu Editor"), Ok|Cancel, Ok, true),
m_listView(0)
{
d = new KCustomMenuEditorPrivate;
- QHBox *page = makeHBoxMainWidget();
+ TQHBox *page = makeHBoxMainWidget();
m_listView = new KListView(page);
m_listView->addColumn(i18n("Menu"));
m_listView->setFullWidth(true);
m_listView->setSorting(-1);
KButtonBox *buttonBox = new KButtonBox(page, Vertical);
- buttonBox->addButton(i18n("New..."), this, SLOT(slotNewItem()));
- d->pbRemove=buttonBox->addButton(i18n("Remove"), this, SLOT(slotRemoveItem()));
- d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, SLOT(slotMoveUp()));
- d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, SLOT(slotMoveDown()));
+ buttonBox->addButton(i18n("New..."), this, TQT_SLOT(slotNewItem()));
+ d->pbRemove=buttonBox->addButton(i18n("Remove"), this, TQT_SLOT(slotRemoveItem()));
+ d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, TQT_SLOT(slotMoveUp()));
+ d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, TQT_SLOT(slotMoveDown()));
buttonBox->layout();
- connect( m_listView, SIGNAL( selectionChanged () ), this, SLOT( refreshButton() ) );
+ connect( m_listView, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( refreshButton() ) );
refreshButton();
}
@@ -112,7 +112,7 @@ KCustomMenuEditor::~KCustomMenuEditor()
void KCustomMenuEditor::refreshButton()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
d->pbRemove->setEnabled( item );
d->pbMoveUp->setEnabled( item && item->itemAbove() );
d->pbMoveDown->setEnabled( item && item->itemBelow() );
@@ -121,12 +121,12 @@ void KCustomMenuEditor::refreshButton()
void
KCustomMenuEditor::load(KConfigBase *cfg)
{
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
int count = cfg->readNumEntry("NrOfItems");
- QListViewItem *last = 0;
+ TQListViewItem *last = 0;
for(int i = 0; i < count; i++)
{
- QString entry = cfg->readPathEntry(QString("Item%1").arg(i+1));
+ TQString entry = cfg->readPathEntry(TQString("Item%1").arg(i+1));
if (entry.isEmpty())
continue;
@@ -140,7 +140,7 @@ KCustomMenuEditor::load(KConfigBase *cfg)
if (!menuItem->isValid())
continue;
- QListViewItem *item = new Item(m_listView, menuItem);
+ TQListViewItem *item = new Item(m_listView, menuItem);
item->moveItem(last);
last = item;
}
@@ -150,23 +150,23 @@ void
KCustomMenuEditor::save(KConfigBase *cfg)
{
// First clear the whole config file.
- QStringList groups = cfg->groupList();
- for(QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg->groupList();
+ for(TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it)
{
cfg->deleteGroup(*it);
}
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
Item * item = (Item *) m_listView->firstChild();
int i = 0;
while(item)
{
i++;
- QString path = item->s->desktopEntryPath();
- if (QDir::isRelativePath(path) || QDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
+ TQString path = item->s->desktopEntryPath();
+ if (TQDir::isRelativePath(path) || TQDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
path = item->s->desktopEntryName();
- cfg->writePathEntry(QString("Item%1").arg(i), path);
+ cfg->writePathEntry(TQString("Item%1").arg(i), path);
item = (Item *) item->nextSibling();
}
cfg->writeEntry("NrOfItems", i);
@@ -175,7 +175,7 @@ KCustomMenuEditor::save(KConfigBase *cfg)
void
KCustomMenuEditor::slotNewItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
KOpenWithDlg dlg(this);
dlg.setSaveNewApplications(true);
@@ -195,7 +195,7 @@ KCustomMenuEditor::slotNewItem()
void
KCustomMenuEditor::slotRemoveItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
@@ -206,14 +206,14 @@ KCustomMenuEditor::slotRemoveItem()
void
KCustomMenuEditor::slotMoveUp()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *searchItem = m_listView->firstChild();
+ TQListViewItem *searchItem = m_listView->firstChild();
while(searchItem)
{
- QListViewItem *next = searchItem->nextSibling();
+ TQListViewItem *next = searchItem->nextSibling();
if (next == item)
{
searchItem->moveItem(item);
@@ -227,11 +227,11 @@ KCustomMenuEditor::slotMoveUp()
void
KCustomMenuEditor::slotMoveDown()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *after = item->nextSibling();
+ TQListViewItem *after = item->nextSibling();
if (!after)
return;
diff --git a/kio/kfile/kcustommenueditor.h b/kio/kfile/kcustommenueditor.h
index 88151f5d4..cc20c6204 100644
--- a/kio/kfile/kcustommenueditor.h
+++ b/kio/kfile/kcustommenueditor.h
@@ -37,7 +37,7 @@ public:
/**
* Create a dialog for editing a custom menu
*/
- KCustomMenuEditor(QWidget *parent);
+ KCustomMenuEditor(TQWidget *parent);
~KCustomMenuEditor();
/**
* load the custom menu
diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp
index b12e45153..6013b7c57 100644
--- a/kio/kfile/kdiroperator.cpp
+++ b/kio/kfile/kdiroperator.cpp
@@ -20,16 +20,16 @@
#include <unistd.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
@@ -64,8 +64,8 @@
#include "kfilemetapreview.h"
-template class QPtrStack<KURL>;
-template class QDict<KFileItem>;
+template class TQPtrStack<KURL>;
+template class TQDict<KFileItem>;
class KDirOperator::KDirOperatorPrivate
@@ -84,19 +84,19 @@ public:
}
bool dirHighlighting;
- QString lastURL; // used for highlighting a directory on cdUp
+ TQString lastURL; // used for highlighting a directory on cdUp
bool onlyDoubleClickSelectsFiles;
- QTimer *progressDelayTimer;
+ TQTimer *progressDelayTimer;
KActionSeparator *viewActionSeparator;
int dropOptions;
KConfig *config;
- QString configGroup;
+ TQString configGroup;
};
KDirOperator::KDirOperator(const KURL& _url,
- QWidget *parent, const char* _name)
- : QWidget(parent, _name),
+ TQWidget *parent, const char* _name)
+ : TQWidget(parent, _name),
dir(0),
m_fileView(0),
progress(0)
@@ -104,36 +104,36 @@ KDirOperator::KDirOperator(const KURL& _url,
myPreview = 0L;
myMode = KFile::File;
m_viewKind = KFile::Simple;
- mySorting = static_cast<QDir::SortSpec>(QDir::Name | QDir::DirsFirst);
+ mySorting = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::DirsFirst);
d = new KDirOperatorPrivate;
if (_url.isEmpty()) { // no dir specified -> current dir
- QString strPath = QDir::currentDirPath();
+ TQString strPath = TQDir::currentDirPath();
strPath.append('/');
currUrl = KURL();
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.setPath(strPath);
}
else {
currUrl = _url;
if ( currUrl.protocol().isEmpty() )
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.addPath("/"); // make sure we have a trailing slash!
}
setDirLister( new KDirLister( true ) );
- connect(&myCompletion, SIGNAL(match(const QString&)),
- SLOT(slotCompletionMatch(const QString&)));
+ connect(&myCompletion, TQT_SIGNAL(match(const TQString&)),
+ TQT_SLOT(slotCompletionMatch(const TQString&)));
progress = new KProgress(this, "progress");
progress->adjustSize();
progress->move(2, height() - progress->height() -2);
- d->progressDelayTimer = new QTimer( this, "progress delay timer" );
- connect( d->progressDelayTimer, SIGNAL( timeout() ),
- SLOT( slotShowProgress() ));
+ d->progressDelayTimer = new TQTimer( this, "progress delay timer" );
+ connect( d->progressDelayTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotShowProgress() ));
myCompleteListDirty = false;
@@ -144,7 +144,7 @@ KDirOperator::KDirOperator(const KURL& _url,
setupActions();
setupMenu();
- setFocusPolicy(QWidget::WheelFocus);
+ setFocusPolicy(TQWidget::WheelFocus);
}
KDirOperator::~KDirOperator()
@@ -165,7 +165,7 @@ KDirOperator::~KDirOperator()
}
-void KDirOperator::setSorting( QDir::SortSpec spec )
+void KDirOperator::setSorting( TQDir::SortSpec spec )
{
if ( m_fileView )
m_fileView->setSorting( spec );
@@ -175,7 +175,7 @@ void KDirOperator::setSorting( QDir::SortSpec spec )
void KDirOperator::resetCursor()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
progress->hide();
}
@@ -192,10 +192,10 @@ void KDirOperator::insertViewDependentActions()
{
if (viewActionCollection)
{
- disconnect( viewActionCollection, SIGNAL( inserted( KAction * )),
- this, SLOT( slotViewActionAdded( KAction * )));
- disconnect( viewActionCollection, SIGNAL( removed( KAction * )),
- this, SLOT( slotViewActionRemoved( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ this, TQT_SLOT( slotViewActionAdded( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ this, TQT_SLOT( slotViewActionRemoved( KAction * )));
}
viewActionMenu->popupMenu()->clear();
@@ -220,9 +220,9 @@ void KDirOperator::insertViewDependentActions()
viewActionMenu->insert( d->viewActionSeparator );
// first insert the normal actions, then the grouped ones
- QStringList groups = viewActionCollection->groups();
- groups.prepend( QString::null ); // actions without group
- QStringList::ConstIterator git = groups.begin();
+ TQStringList groups = viewActionCollection->groups();
+ groups.prepend( TQString::null ); // actions without group
+ TQStringList::ConstIterator git = groups.begin();
KActionPtrList list;
KAction *sep = actionCollection()->action("separator");
for ( ; git != groups.end(); ++git )
@@ -237,14 +237,14 @@ void KDirOperator::insertViewDependentActions()
}
}
- connect( viewActionCollection, SIGNAL( inserted( KAction * )),
- SLOT( slotViewActionAdded( KAction * )));
- connect( viewActionCollection, SIGNAL( removed( KAction * )),
- SLOT( slotViewActionRemoved( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ TQT_SLOT( slotViewActionAdded( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ TQT_SLOT( slotViewActionRemoved( KAction * )));
}
}
-void KDirOperator::activatedMenu( const KFileItem *, const QPoint& pos )
+void KDirOperator::activatedMenu( const KFileItem *, const TQPoint& pos )
{
setupMenu();
updateSelectionDependentActions();
@@ -261,7 +261,7 @@ void KDirOperator::updateSelectionDependentActions()
myActionCollection->action( "properties" )->setEnabled( hasSelection );
}
-void KDirOperator::setPreviewWidget(const QWidget *w)
+void KDirOperator::setPreviewWidget(const TQWidget *w)
{
if(w != 0L)
m_viewKind = (m_viewKind | KFile::PreviewContents);
@@ -334,24 +334,24 @@ void KDirOperator::slotDefaultPreview()
void KDirOperator::slotSortByName()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Name ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Name ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( true );
}
void KDirOperator::slotSortBySize()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Size ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Size ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
void KDirOperator::slotSortByDate()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Time ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Time ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
@@ -364,40 +364,40 @@ void KDirOperator::slotSortReversed()
void KDirOperator::slotToggleDirsFirst()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortDirsFirst( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::DirsFirst ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::DirsFirst ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::DirsFirst));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::DirsFirst));
mySorting = m_fileView->sorting();
}
void KDirOperator::slotToggleIgnoreCase()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortCaseInsensitive( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::IgnoreCase ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::IgnoreCase ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::IgnoreCase));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::IgnoreCase));
mySorting = m_fileView->sorting();
}
void KDirOperator::mkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString dir = KInputDialog::getText( i18n( "New Folder" ),
+ TQString dir = KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this);
if (ok)
mkdir( KIO::encodeFileName( dir ), true );
}
-bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
+bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory )
{
// Creates "directory", relative to the current directory (currUrl).
// The given path may contain any number directories, existant or not.
@@ -407,8 +407,8 @@ bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
bool exists = false;
KURL url( currUrl );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -440,7 +440,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -451,7 +451,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -503,7 +503,7 @@ void KDirOperator::deleteSelected()
}
KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -514,7 +514,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -580,11 +580,11 @@ void KDirOperator::close()
dir->stop();
}
-void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
+void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT
{
#if 0
// copy the argument in a temporary string
- QString text = _txt;
+ TQString text = _txt;
// it's unlikely to happen, that at the beginning are spaces, but
// for the end, it happens quite often, I guess.
text = text.stripWhiteSpace();
@@ -598,9 +598,9 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
if (!selection.isNull()) {
int position = text.findRev('/');
ASSERT(position >= 0); // we already inserted the current dir in case
- QString filename = text.mid(position + 1, text.length());
+ TQString filename = text.mid(position + 1, text.length());
if (filename != selection)
- selection = QString::null;
+ selection = TQString::null;
}
KURL u(text); // I have to take care of entered URLs
@@ -625,7 +625,7 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
filename_ = u.url();
emit fileSelected(filename_);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
accept();
}
@@ -638,11 +638,11 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
KURL newurl;
if ( !_newurl.isValid() )
- newurl.setPath( QDir::homeDirPath() );
+ newurl.setPath( TQDir::homeDirPath() );
else
newurl = _newurl;
- QString pathstr = newurl.path(+1);
+ TQString pathstr = newurl.path(+1);
newurl.setPath(pathstr);
// already set
@@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
if ( !isReadable( newurl ) ) {
// maybe newurl is a file? check its parent directory
- newurl.cd(QString::fromLatin1(".."));
+ newurl.cd(TQString::fromLatin1(".."));
if ( !isReadable( newurl ) ) {
resetCursor();
KMessageBox::error(viewWidget(),
@@ -716,10 +716,10 @@ void KDirOperator::pathChanged()
myDirCompletion.clear();
// it may be, that we weren't ready at this time
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// when KIO::Job emits finished, the slot will restore the cursor
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
if ( !isReadable( currUrl )) {
KMessageBox::error(viewWidget(),
@@ -777,31 +777,31 @@ KURL KDirOperator::url() const
void KDirOperator::cdUp()
{
KURL tmp(currUrl);
- tmp.cd(QString::fromLatin1(".."));
+ tmp.cd(TQString::fromLatin1(".."));
setURL(tmp, true);
}
void KDirOperator::home()
{
KURL u;
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
setURL(u, true);
}
void KDirOperator::clearFilter()
{
- dir->setNameFilter( QString::null );
+ dir->setNameFilter( TQString::null );
dir->clearMimeFilter();
checkPreviewSupport();
}
-void KDirOperator::setNameFilter(const QString& filter)
+void KDirOperator::setNameFilter(const TQString& filter)
{
dir->setNameFilter(filter);
checkPreviewSupport();
}
-void KDirOperator::setMimeFilter( const QStringList& mimetypes )
+void KDirOperator::setMimeFilter( const TQStringList& mimetypes )
{
dir->setMimeFilter( mimetypes );
checkPreviewSupport();
@@ -823,27 +823,27 @@ bool KDirOperator::checkPreviewSupport()
bool KDirOperator::checkPreviewInternal() const
{
- QStringList supported = KIO::PreviewJob::supportedMimeTypes();
+ TQStringList supported = KIO::PreviewJob::supportedMimeTypes();
// no preview support for directories?
if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 )
return false;
- QStringList mimeTypes = dir->mimeFilters();
- QStringList nameFilter = QStringList::split( " ", dir->nameFilter() );
+ TQStringList mimeTypes = dir->mimeFilters();
+ TQStringList nameFilter = TQStringList::split( " ", dir->nameFilter() );
if ( mimeTypes.isEmpty() && nameFilter.isEmpty() && !supported.isEmpty() )
return true;
else {
- QRegExp r;
+ TQRegExp r;
r.setWildcard( true ); // the "mimetype" can be "image/*"
if ( !mimeTypes.isEmpty() ) {
- QStringList::Iterator it = supported.begin();
+ TQStringList::Iterator it = supported.begin();
for ( ; it != supported.end(); ++it ) {
r.setPattern( *it );
- QStringList result = mimeTypes.grep( r );
+ TQStringList result = mimeTypes.grep( r );
if ( !result.isEmpty() ) { // matches! -> we want previews
return true;
}
@@ -853,7 +853,7 @@ bool KDirOperator::checkPreviewInternal() const
if ( !nameFilter.isEmpty() ) {
// find the mimetypes of all the filter-patterns and
KServiceTypeFactory *fac = KServiceTypeFactory::self();
- QStringList::Iterator it1 = nameFilter.begin();
+ TQStringList::Iterator it1 = nameFilter.begin();
for ( ; it1 != nameFilter.end(); ++it1 ) {
if ( (*it1) == "*" ) {
return true;
@@ -862,12 +862,12 @@ bool KDirOperator::checkPreviewInternal() const
KMimeType *mt = fac->findFromPattern( *it1 );
if ( !mt )
continue;
- QString mime = mt->name();
+ TQString mime = mt->name();
delete mt;
// the "mimetypes" we get from the PreviewJob can be "image/*"
// so we need to check in wildcard mode
- QStringList::Iterator it2 = supported.begin();
+ TQStringList::Iterator it2 = supported.begin();
for ( ; it2 != supported.end(); ++it2 ) {
r.setPattern( *it2 );
if ( r.search( mime ) != -1 ) {
@@ -881,7 +881,7 @@ bool KDirOperator::checkPreviewInternal() const
return false;
}
-KFileView* KDirOperator::createView( QWidget* parent, KFile::FileView view )
+KFileView* KDirOperator::createView( TQWidget* parent, KFile::FileView view )
{
KFileView* new_view = 0L;
bool separateDirs = KFile::isSeparateDirs( view );
@@ -933,7 +933,7 @@ void KDirOperator::setAcceptDrops(bool b)
{
if (m_fileView)
m_fileView->widget()->setAcceptDrops(b);
- QWidget::setAcceptDrops(b);
+ TQWidget::setAcceptDrops(b);
}
void KDirOperator::setDropOptions(int options)
@@ -1050,18 +1050,18 @@ void KDirOperator::connectView(KFileView *view)
viewActionCollection = 0L;
KFileViewSignaler *sig = view->signaler();
- connect(sig, SIGNAL( activatedMenu(const KFileItem *, const QPoint& ) ),
- this, SLOT( activatedMenu(const KFileItem *, const QPoint& )));
- connect(sig, SIGNAL( dirActivated(const KFileItem *) ),
- this, SLOT( selectDir(const KFileItem*) ) );
- connect(sig, SIGNAL( fileSelected(const KFileItem *) ),
- this, SLOT( selectFile(const KFileItem*) ) );
- connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- this, SLOT( highlightFile(const KFileItem*) ));
- connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- this, SLOT( slotViewSortingChanged( QDir::SortSpec )));
- connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- this, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&)) );
+ connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *, const TQPoint& ) ),
+ this, TQT_SLOT( activatedMenu(const KFileItem *, const TQPoint& )));
+ connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *) ),
+ this, TQT_SLOT( selectDir(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *) ),
+ this, TQT_SLOT( selectFile(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ this, TQT_SLOT( highlightFile(const KFileItem*) ));
+ connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ this, TQT_SLOT( slotViewSortingChanged( TQDir::SortSpec )));
+ connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ this, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&)) );
if ( reverseAction->isChecked() != m_fileView->isReversed() )
slotSortReversed();
@@ -1071,7 +1071,7 @@ void KDirOperator::connectView(KFileView *view)
m_fileView->widget()->show();
if ( listDir ) {
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
openURL( currUrl );
}
else
@@ -1120,24 +1120,24 @@ void KDirOperator::setDirLister( KDirLister *lister )
dir->setAutoUpdate( true );
- QWidget* mainWidget = topLevelWidget();
+ TQWidget* mainWidget = topLevelWidget();
dir->setMainWindow (mainWidget);
kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl;
- connect( dir, SIGNAL( percent( int )),
- SLOT( slotProgress( int ) ));
- connect( dir, SIGNAL(started( const KURL& )), SLOT(slotStarted()));
- connect( dir, SIGNAL(newItems(const KFileItemList &)),
- SLOT(insertNewFiles(const KFileItemList &)));
- connect( dir, SIGNAL(completed()), SLOT(slotIOFinished()));
- connect( dir, SIGNAL(canceled()), SLOT(slotCanceled()));
- connect( dir, SIGNAL(deleteItem(KFileItem *)),
- SLOT(itemDeleted(KFileItem *)));
- connect( dir, SIGNAL(redirection( const KURL& )),
- SLOT( slotRedirected( const KURL& )));
- connect( dir, SIGNAL( clear() ), SLOT( slotClearView() ));
- connect( dir, SIGNAL( refreshItems( const KFileItemList& ) ),
- SLOT( slotRefreshItems( const KFileItemList& ) ) );
+ connect( dir, TQT_SIGNAL( percent( int )),
+ TQT_SLOT( slotProgress( int ) ));
+ connect( dir, TQT_SIGNAL(started( const KURL& )), TQT_SLOT(slotStarted()));
+ connect( dir, TQT_SIGNAL(newItems(const KFileItemList &)),
+ TQT_SLOT(insertNewFiles(const KFileItemList &)));
+ connect( dir, TQT_SIGNAL(completed()), TQT_SLOT(slotIOFinished()));
+ connect( dir, TQT_SIGNAL(canceled()), TQT_SLOT(slotCanceled()));
+ connect( dir, TQT_SIGNAL(deleteItem(KFileItem *)),
+ TQT_SLOT(itemDeleted(KFileItem *)));
+ connect( dir, TQT_SIGNAL(redirection( const KURL& )),
+ TQT_SLOT( slotRedirected( const KURL& )));
+ connect( dir, TQT_SIGNAL( clear() ), TQT_SLOT( slotClearView() ));
+ connect( dir, TQT_SIGNAL( refreshItems( const KFileItemList& ) ),
+ TQT_SLOT( slotRefreshItems( const KFileItemList& ) ) );
}
void KDirOperator::insertNewFiles(const KFileItemList &newone)
@@ -1163,7 +1163,7 @@ void KDirOperator::insertNewFiles(const KFileItemList &newone)
++it;
}
- QTimer::singleShot(200, this, SLOT(resetCursor()));
+ TQTimer::singleShot(200, this, TQT_SLOT(resetCursor()));
}
void KDirOperator::selectDir(const KFileItem *item)
@@ -1183,12 +1183,12 @@ void KDirOperator::itemDeleted(KFileItem *item)
void KDirOperator::selectFile(const KFileItem *item)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit fileSelected( item );
}
-void KDirOperator::setCurrentItem( const QString& filename )
+void KDirOperator::setCurrentItem( const TQString& filename )
{
if ( m_fileView ) {
const KFileItem *item = 0L;
@@ -1205,22 +1205,22 @@ void KDirOperator::setCurrentItem( const QString& filename )
}
}
-QString KDirOperator::makeCompletion(const QString& string)
+TQString KDirOperator::makeCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
return myCompletion.makeCompletion( string );
}
-QString KDirOperator::makeDirCompletion(const QString& string)
+TQString KDirOperator::makeDirCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
@@ -1245,7 +1245,7 @@ void KDirOperator::prepareCompletionObjects()
}
}
-void KDirOperator::slotCompletionMatch(const QString& match)
+void KDirOperator::slotCompletionMatch(const TQString& match)
{
setCurrentItem( match );
emit completion( match );
@@ -1256,24 +1256,24 @@ void KDirOperator::setupActions()
myActionCollection = new KActionCollection( topLevelWidget(), this, "KDirOperator::myActionCollection" );
actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" );
- upAction = KStdAction::up( this, SLOT( cdUp() ), myActionCollection, "up" );
+ upAction = KStdAction::up( this, TQT_SLOT( cdUp() ), myActionCollection, "up" );
upAction->setText( i18n("Parent Folder") );
- backAction = KStdAction::back( this, SLOT( back() ), myActionCollection, "back" );
- forwardAction = KStdAction::forward( this, SLOT(forward()), myActionCollection, "forward" );
- homeAction = KStdAction::home( this, SLOT( home() ), myActionCollection, "home" );
+ backAction = KStdAction::back( this, TQT_SLOT( back() ), myActionCollection, "back" );
+ forwardAction = KStdAction::forward( this, TQT_SLOT(forward()), myActionCollection, "forward" );
+ homeAction = KStdAction::home( this, TQT_SLOT( home() ), myActionCollection, "home" );
homeAction->setText(i18n("Home Folder"));
- reloadAction = KStdAction::redisplay( this, SLOT(rereadDir()), myActionCollection, "reload" );
+ reloadAction = KStdAction::redisplay( this, TQT_SLOT(rereadDir()), myActionCollection, "reload" );
actionSeparator = new KActionSeparator( myActionCollection, "separator" );
d->viewActionSeparator = new KActionSeparator( myActionCollection,
"viewActionSeparator" );
mkdirAction = new KAction( i18n("New Folder..."), 0,
- this, SLOT( mkdir() ), myActionCollection, "mkdir" );
+ this, TQT_SLOT( mkdir() ), myActionCollection, "mkdir" );
KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" );
- connect( trash, SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
- this, SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
+ connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
+ this, TQT_SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, this,
- SLOT( deleteSelected() ), myActionCollection, "delete" );
- mkdirAction->setIcon( QString::fromLatin1("folder_new") );
+ TQT_SLOT( deleteSelected() ), myActionCollection, "delete" );
+ mkdirAction->setIcon( TQString::fromLatin1("folder_new") );
reloadAction->setText( i18n("Reload") );
reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload ));
@@ -1281,19 +1281,19 @@ void KDirOperator::setupActions()
// the sort menu actions
sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu");
byNameAction = new KRadioAction( i18n("By Name"), 0,
- this, SLOT( slotSortByName() ),
+ this, TQT_SLOT( slotSortByName() ),
myActionCollection, "by name" );
byDateAction = new KRadioAction( i18n("By Date"), 0,
- this, SLOT( slotSortByDate() ),
+ this, TQT_SLOT( slotSortByDate() ),
myActionCollection, "by date" );
bySizeAction = new KRadioAction( i18n("By Size"), 0,
- this, SLOT( slotSortBySize() ),
+ this, TQT_SLOT( slotSortBySize() ),
myActionCollection, "by size" );
reverseAction = new KToggleAction( i18n("Reverse"), 0,
- this, SLOT( slotSortReversed() ),
+ this, TQT_SLOT( slotSortReversed() ),
myActionCollection, "reversed" );
- QString sortGroup = QString::fromLatin1("sort");
+ TQString sortGroup = TQString::fromLatin1("sort");
byNameAction->setExclusiveGroup( sortGroup );
byDateAction->setExclusiveGroup( sortGroup );
bySizeAction->setExclusiveGroup( sortGroup );
@@ -1304,17 +1304,17 @@ void KDirOperator::setupActions()
caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0,
myActionCollection, "case insensitive" );
- connect( dirsFirstAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleDirsFirst() ));
- connect( caseInsensitiveAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleIgnoreCase() ));
+ connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleDirsFirst() ));
+ connect( caseInsensitiveAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleIgnoreCase() ));
// the view menu actions
viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" );
- connect( viewActionMenu->popupMenu(), SIGNAL( aboutToShow() ),
- SLOT( insertViewDependentActions() ));
+ connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( insertViewDependentActions() ));
shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn",
KShortcut(), myActionCollection, "short view" );
@@ -1326,30 +1326,30 @@ void KDirOperator::setupActions()
// showHiddenAction->setCheckedState( i18n("Hide Hidden Files") );
separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(),
this,
- SLOT(slotSeparateDirs()),
+ TQT_SLOT(slotSeparateDirs()),
myActionCollection, "separate dirs" );
KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"),
"thumbnail", KShortcut(),
myActionCollection,
"preview" );
previewAction->setCheckedState(i18n("Hide Preview"));
- connect( previewAction, SIGNAL( toggled( bool )),
- SLOT( togglePreview( bool )));
+ connect( previewAction, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( togglePreview( bool )));
- QString viewGroup = QString::fromLatin1("view");
+ TQString viewGroup = TQString::fromLatin1("view");
shortAction->setExclusiveGroup( viewGroup );
detailedAction->setExclusiveGroup( viewGroup );
- connect( shortAction, SIGNAL( activated() ),
- SLOT( slotSimpleView() ));
- connect( detailedAction, SIGNAL( activated() ),
- SLOT( slotDetailedView() ));
- connect( showHiddenAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleHidden( bool ) ));
+ connect( shortAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotSimpleView() ));
+ connect( detailedAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotDetailedView() ));
+ connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleHidden( bool ) ));
new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), this,
- SLOT(slotProperties()), myActionCollection, "properties" );
+ TQT_SLOT(slotProperties()), myActionCollection, "properties" );
}
void KDirOperator::setupMenu()
@@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions)
if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & Qt::ShiftButton))
actionMenu->insert( myActionCollection->action( "trash" ) );
KConfig *globalconfig = KGlobal::config();
- KConfigGroupSaver cs( globalconfig, QString::fromLatin1("KDE") );
+ KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") );
if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & Qt::ShiftButton) ||
globalconfig->readBoolEntry("ShowDeleteCommand", false))
actionMenu->insert( myActionCollection->action( "delete" ) );
@@ -1439,123 +1439,123 @@ void KDirOperator::updateViewActions()
detailedAction->setChecked( KFile::isDetailView( fv ));
}
-void KDirOperator::readConfig( KConfig *kc, const QString& group )
+void KDirOperator::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
defaultView = 0;
int sorting = 0;
- QString viewStyle = kc->readEntry( QString::fromLatin1("View Style"),
- QString::fromLatin1("Simple") );
- if ( viewStyle == QString::fromLatin1("Detail") )
+ TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"),
+ TQString::fromLatin1("Simple") );
+ if ( viewStyle == TQString::fromLatin1("Detail") )
defaultView |= KFile::Detail;
else
defaultView |= KFile::Simple;
- if ( kc->readBoolEntry( QString::fromLatin1("Separate Directories"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"),
DefaultMixDirsAndFiles ) )
defaultView |= KFile::SeparateDirs;
- if ( kc->readBoolEntry(QString::fromLatin1("Show Preview"), false))
+ if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false))
defaultView |= KFile::PreviewContents;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort case insensitively"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"),
DefaultCaseInsensitive ) )
- sorting |= QDir::IgnoreCase;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort directories first"),
+ sorting |= TQDir::IgnoreCase;
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"),
DefaultDirsFirst ) )
- sorting |= QDir::DirsFirst;
+ sorting |= TQDir::DirsFirst;
- QString name = QString::fromLatin1("Name");
- QString sortBy = kc->readEntry( QString::fromLatin1("Sort by"), name );
+ TQString name = TQString::fromLatin1("Name");
+ TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name );
if ( sortBy == name )
- sorting |= QDir::Name;
- else if ( sortBy == QString::fromLatin1("Size") )
- sorting |= QDir::Size;
- else if ( sortBy == QString::fromLatin1("Date") )
- sorting |= QDir::Time;
+ sorting |= TQDir::Name;
+ else if ( sortBy == TQString::fromLatin1("Size") )
+ sorting |= TQDir::Size;
+ else if ( sortBy == TQString::fromLatin1("Date") )
+ sorting |= TQDir::Time;
- mySorting = static_cast<QDir::SortSpec>( sorting );
+ mySorting = static_cast<TQDir::SortSpec>( sorting );
setSorting( mySorting );
- if ( kc->readBoolEntry( QString::fromLatin1("Show hidden files"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) {
showHiddenAction->setChecked( true );
dir->setShowingDotFiles( true );
}
- if ( kc->readBoolEntry( QString::fromLatin1("Sort reversed"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) )
reverseAction->setChecked( true );
kc->setGroup( oldGroup );
}
-void KDirOperator::writeConfig( KConfig *kc, const QString& group )
+void KDirOperator::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- const QString oldGroup = kc->group();
+ const TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
- QString sortBy = QString::fromLatin1("Name");
+ TQString sortBy = TQString::fromLatin1("Name");
if ( KFile::isSortBySize( mySorting ) )
- sortBy = QString::fromLatin1("Size");
+ sortBy = TQString::fromLatin1("Size");
else if ( KFile::isSortByDate( mySorting ) )
- sortBy = QString::fromLatin1("Date");
- kc->writeEntry( QString::fromLatin1("Sort by"), sortBy );
+ sortBy = TQString::fromLatin1("Date");
+ kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy );
- kc->writeEntry( QString::fromLatin1("Sort reversed"),
+ kc->writeEntry( TQString::fromLatin1("Sort reversed"),
reverseAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort case insensitively"),
+ kc->writeEntry( TQString::fromLatin1("Sort case insensitively"),
caseInsensitiveAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort directories first"),
+ kc->writeEntry( TQString::fromLatin1("Sort directories first"),
dirsFirstAction->isChecked() );
// don't save the separate dirs or preview when an application specific
// preview is in use.
bool appSpecificPreview = false;
if ( myPreview ) {
- QWidget *preview = const_cast<QWidget*>( myPreview ); // grmbl
+ TQWidget *preview = const_cast<TQWidget*>( myPreview ); // grmbl
KFileMetaPreview *tmp = dynamic_cast<KFileMetaPreview*>( preview );
appSpecificPreview = (tmp == 0L);
}
if ( !appSpecificPreview ) {
if ( separateDirsAction->isEnabled() )
- kc->writeEntry( QString::fromLatin1("Separate Directories"),
+ kc->writeEntry( TQString::fromLatin1("Separate Directories"),
separateDirsAction->isChecked() );
KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview"));
if ( previewAction->isEnabled() ) {
bool hasPreview = previewAction->isChecked();
- kc->writeEntry( QString::fromLatin1("Show Preview"), hasPreview );
+ kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview );
}
}
- kc->writeEntry( QString::fromLatin1("Show hidden files"),
+ kc->writeEntry( TQString::fromLatin1("Show hidden files"),
showHiddenAction->isChecked() );
KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind );
- QString style;
+ TQString style;
if ( KFile::isDetailView( fv ) )
- style = QString::fromLatin1("Detail");
+ style = TQString::fromLatin1("Detail");
else if ( KFile::isSimpleView( fv ) )
- style = QString::fromLatin1("Simple");
- kc->writeEntry( QString::fromLatin1("View Style"), style );
+ style = TQString::fromLatin1("Simple");
+ kc->writeEntry( TQString::fromLatin1("View Style"), style );
kc->setGroup( oldGroup );
}
-void KDirOperator::resizeEvent( QResizeEvent * )
+void KDirOperator::resizeEvent( TQResizeEvent * )
{
if (m_fileView)
m_fileView->widget()->resize( size() );
@@ -1587,7 +1587,7 @@ void KDirOperator::slotShowProgress()
{
progress->raise();
progress->show();
- QApplication::flushX();
+ TQApplication::flushX();
}
void KDirOperator::slotProgress( int percent )
@@ -1595,7 +1595,7 @@ void KDirOperator::slotProgress( int percent )
progress->setProgress( percent );
// we have to redraw this as fast as possible
if ( progress->isVisible() )
- QApplication::flushX();
+ TQApplication::flushX();
}
@@ -1649,7 +1649,7 @@ void KDirOperator::slotViewActionRemoved( KAction *action )
viewActionMenu->remove( d->viewActionSeparator );
}
-void KDirOperator::slotViewSortingChanged( QDir::SortSpec sort )
+void KDirOperator::slotViewSortingChanged( TQDir::SortSpec sort )
{
mySorting = sort;
updateSortActions();
@@ -1688,11 +1688,11 @@ bool KDirOperator::isReadable( const KURL& url )
return true; // what else can we say?
KDE_struct_stat buf;
- QString ts = url.path(+1);
- bool readable = ( KDE_stat( QFile::encodeName( ts ), &buf) == 0 );
+ TQString ts = url.path(+1);
+ bool readable = ( KDE_stat( TQFile::encodeName( ts ), &buf) == 0 );
if (readable) { // further checks
DIR *test;
- test = opendir( QFile::encodeName( ts )); // we do it just to test here
+ test = opendir( TQFile::encodeName( ts )); // we do it just to test here
readable = (test != 0);
if (test)
closedir(test);
@@ -1718,7 +1718,7 @@ void KDirOperator::slotRefreshItems( const KFileItemList& items )
m_fileView->updateView( it.current() );
}
-void KDirOperator::setViewConfig( KConfig *config, const QString& group )
+void KDirOperator::setViewConfig( KConfig *config, const TQString& group )
{
d->config = config;
d->configGroup = group;
@@ -1729,7 +1729,7 @@ KConfig * KDirOperator::viewConfig()
return d->config;
}
-QString KDirOperator::viewConfigGroup() const
+TQString KDirOperator::viewConfigGroup() const
{
return d->configGroup;
}
diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h
index a91c7ff1a..bcce49f67 100644
--- a/kio/kfile/kdiroperator.h
+++ b/kio/kfile/kdiroperator.h
@@ -21,8 +21,8 @@
#ifndef KDIROPERATOR_H_
#define KDIROPERATOR_H_
-#include <qwidget.h>
-#include <qptrstack.h>
+#include <tqwidget.h>
+#include <tqptrstack.h>
#include <kaction.h>
#include <kcompletion.h>
@@ -73,14 +73,14 @@ namespace KIO {
* \code
* KDirOperator *op = new KDirOperator( KURL( "file:/home/gis" ), this );
* // some signals you might be interested in
- * connect(op, SIGNAL(urlEntered(const KURL&)),
- * SLOT(urlEntered(const KURL&)));
- * connect(op, SIGNAL(fileHighlighted(const KFileItem *)),
- * SLOT(fileHighlighted(const KFileItem *)));
- * connect(op, SIGNAL(fileSelected(const KFileItem *)),
- * SLOT(fileSelected(const KFileItem *)));
- * connect(op, SIGNAL(finishedLoading()),
- * SLOT(slotLoadingFinished()));
+ * connect(op, TQT_SIGNAL(urlEntered(const KURL&)),
+ * TQT_SLOT(urlEntered(const KURL&)));
+ * connect(op, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ * TQT_SLOT(fileHighlighted(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ * TQT_SLOT(fileSelected(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(finishedLoading()),
+ * TQT_SLOT(slotLoadingFinished()));
*
* op->readConfig( KGlobal::config(), "Your KDiroperator ConfigGroup" );
* op->setView(KFile::Default);
@@ -116,7 +116,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* This constructor doesn't start loading the url, setView will do it.
*/
KDirOperator(const KURL& urlName = KURL(),
- QWidget *parent = 0, const char* name = 0);
+ TQWidget *parent = 0, const char* name = 0);
/**
* Destroys the KDirOperator.
*/
@@ -138,7 +138,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*/
void close();
/// Reimplemented to avoid "hidden virtual" warnings
- virtual bool close( bool alsoDelete ) { return QWidget::close( alsoDelete ); }
+ virtual bool close( bool alsoDelete ) { return TQWidget::close( alsoDelete ); }
/**
* Sets a filter like "*.cpp *.h *.o". Only files matching that filter
@@ -147,13 +147,13 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setNameFilter
* @see nameFilter
*/
- void setNameFilter(const QString& filter);
+ void setNameFilter(const TQString& filter);
/**
* @returns the current namefilter.
* @see setNameFilter
*/
- const QString& nameFilter() const { return dir->nameFilter(); }
+ const TQString& nameFilter() const { return dir->nameFilter(); }
/**
* Sets a list of mimetypes as filter. Only files of those mimetypes
@@ -161,7 +161,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*
* Example:
* \code
- * QStringList filter;
+ * TQStringList filter;
* filter << "text/html" << "image/png" << "inode/directory";
* dirOperator->setMimefilter( filter );
* \endcode
@@ -172,12 +172,12 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setMimeFilter
* @see mimeFilter
*/
- void setMimeFilter( const QStringList& mimetypes );
+ void setMimeFilter( const TQStringList& mimetypes );
/**
* @returns the current mime filter.
*/
- QStringList mimeFilter() const { return dir->mimeFilters(); }
+ TQStringList mimeFilter() const { return dir->mimeFilters(); }
/**
* Clears both the namefilter and mimetype filter, so that all files and
@@ -205,7 +205,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Clears the current selection and attempts to set @p filename
* the current file. filename is just the name, no path or url.
*/
- void setCurrentItem( const QString& filename );
+ void setCurrentItem( const TQString& filename );
/**
* Sets a new KFileView to be used for showing and browsing files.
@@ -230,7 +230,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Returns the widget of the current view. 0L if there is no view/widget.
* (KFileView itself is not a widget.)
*/
- QWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
+ TQWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
/**
* Sets one of the predefined fileviews
@@ -242,17 +242,17 @@ class KIO_EXPORT KDirOperator : public QWidget
/**
* Sets the way to sort files and directories.
*/
- void setSorting( QDir::SortSpec );
+ void setSorting( TQDir::SortSpec );
/**
* @returns the current way of sorting files and directories
*/
- QDir::SortSpec sorting() const { return mySorting; }
+ TQDir::SortSpec sorting() const { return mySorting; }
/**
* @returns true if we are displaying the root directory of the current url
*/
- bool isRoot() const { return url().path() == QChar('/'); }
+ bool isRoot() const { return url().path() == TQChar('/'); }
/**
* @returns the object listing the directory
@@ -289,7 +289,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* delete it yourself!
*/
// ### KDE4: make virtual
- void setPreviewWidget(const QWidget *w);
+ void setPreviewWidget(const TQWidget *w);
/**
* @returns a list of all currently selected items. If there is no view,
@@ -407,7 +407,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- void setViewConfig( KConfig *config, const QString& group );
+ void setViewConfig( KConfig *config, const TQString& group );
/**
* Returns the KConfig object used for saving and restoring view's
@@ -425,7 +425,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* configuration.
* @since 3.1
*/
- QString viewConfigGroup() const;
+ TQString viewConfigGroup() const;
/**
* Reads the default settings for a view, i.e. the default KFile::FileView.
@@ -440,7 +440,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see setViewConfig
* @see writeConfig
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current settings like sorting, simple or detailed view.
@@ -448,7 +448,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see readConfig
* @see setViewConfig
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
@@ -478,8 +478,8 @@ class KIO_EXPORT KDirOperator : public QWidget
* to the user.
* @returns true if the directory could be created.
*/
- // ### KDE4: make virtual and turn QString into KURL
- bool mkdir( const QString& directory, bool enterDirectory = true );
+ // ### KDE4: make virtual and turn TQString into KURL
+ bool mkdir( const TQString& directory, bool enterDirectory = true );
/**
* Starts and returns a KIO::DeleteJob to delete the given @p items.
@@ -502,7 +502,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- KIO::DeleteJob * del( const KFileItemList& items, QWidget *parent,
+ KIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
/**
@@ -572,14 +572,14 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.4
*/
// ### KDE4: make virtual
- KIO::CopyJob * trash( const KFileItemList& items, QWidget *parent,
+ KIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
protected:
/**
* A view factory for creating predefined fileviews. Called internally by setView
* , but you can also call it directly. Reimplement this if you depend on self defined fileviews.
- * @param parent is the QWidget to be set as parent
+ * @param parent is the TQWidget to be set as parent
* @param view is the predefined view to be set, note: this can be several ones OR:ed together.
* @returns the created KFileView
* @see KFileView
@@ -590,14 +590,14 @@ protected:
* @see KFile::FileView
* @see setView
*/
- virtual KFileView* createView( QWidget* parent, KFile::FileView view );
+ virtual KFileView* createView( TQWidget* parent, KFile::FileView view );
/**
* Sets a custom KDirLister to list directories.
*/
// ### KDE4: make virtual
void setDirLister( KDirLister *lister );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Sets up all the actions. Called from the constructor, you usually
@@ -698,12 +698,12 @@ public slots:
/**
* Tries to complete the given string (only completes files).
*/
- QString makeCompletion(const QString&);
+ TQString makeCompletion(const TQString&);
/**
* Tries to complete the given string (only completes directores).
*/
- QString makeDirCompletion(const QString&);
+ TQString makeDirCompletion(const TQString&);
/**
* Trashes the currently selected files/directories.
@@ -756,7 +756,7 @@ protected slots:
/**
* Called upon right-click to activate the popupmenu.
*/
- virtual void activatedMenu( const KFileItem *, const QPoint& pos );
+ virtual void activatedMenu( const KFileItem *, const TQPoint& pos );
/**
* Changes sorting to sort by name
@@ -792,12 +792,12 @@ protected slots:
* Tries to make the given @p match as current item in the view and emits
* completion( match )
*/
- void slotCompletionMatch(const QString& match);
+ void slotCompletionMatch(const TQString& match);
signals:
void urlEntered(const KURL& );
void updateInformation(int files, int dirs);
- void completion(const QString&);
+ void completion(const TQString&);
void finishedLoading();
/**
@@ -823,17 +823,17 @@ signals:
* @param urls the urls that where dropped.
* @since 3.2
*/
- void dropped(const KFileItem *item, QDropEvent*event, const KURL::List&urls);
+ void dropped(const KFileItem *item, TQDropEvent*event, const KURL::List&urls);
private:
/**
* Contains all URLs you can reach with the back button.
*/
- QPtrStack<KURL> backStack;
+ TQPtrStack<KURL> backStack;
/**
* Contains all URLs you can reach with the forward button.
*/
- QPtrStack<KURL> forwardStack;
+ TQPtrStack<KURL> forwardStack;
KDirLister *dir;
KURL currUrl;
@@ -841,7 +841,7 @@ private:
KCompletion myCompletion;
KCompletion myDirCompletion;
bool myCompleteListDirty;
- QDir::SortSpec mySorting;
+ TQDir::SortSpec mySorting;
/**
* Checks whether we preview support is available for the current
@@ -853,7 +853,7 @@ private:
* takes action on the new location. If it's a directory, change
* into it, if it's a file, correct the name, etc.
*/
- void checkPath(const QString& txt, bool takeFiles = false);
+ void checkPath(const TQString& txt, bool takeFiles = false);
void connectView(KFileView *);
@@ -869,7 +869,7 @@ private:
KFile::Mode myMode;
KProgress *progress;
- const QWidget *myPreview; // temporary pointer for the preview widget
+ const TQWidget *myPreview; // temporary pointer for the preview widget
// actions for the popupmenus
// ### clean up all those -- we have them all in the actionMenu!
@@ -928,7 +928,7 @@ private slots:
void slotViewActionAdded( KAction * );
void slotViewActionRemoved( KAction * );
- void slotViewSortingChanged( QDir::SortSpec );
+ void slotViewSortingChanged( TQDir::SortSpec );
void slotClearView();
void slotRefreshItems( const KFileItemList& items );
diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp
index b8ea409e9..a361a8bde 100644
--- a/kio/kfile/kdirselectdialog.cpp
+++ b/kio/kfile/kdirselectdialog.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qvaluestack.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqvaluestack.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -61,9 +61,9 @@ public:
KFileSpeedBar *speedBar;
KHistoryCombo *urlCombo;
KFileTreeBranch *branch;
- QString recentDirClass;
+ TQString recentDirClass;
KURL startURL;
- QValueStack<KURL> dirsToList;
+ TQValueStack<KURL> dirsToList;
bool comboLocked : 1;
};
@@ -75,7 +75,7 @@ static KURL rootUrl(const KURL &url)
if (!kapp->authorizeURLAction("list", KURL(), root))
{
- root = KURL::fromPathOrURL( QDir::homeDirPath() );
+ root = KURL::fromPathOrURL( TQDir::homeDirPath() );
if (!kapp->authorizeURLAction("list", KURL(), root))
{
root = url;
@@ -84,8 +84,8 @@ static KURL rootUrl(const KURL &url)
return root;
}
-KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
- QWidget *parent, const char *name,
+KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly,
+ TQWidget *parent, const char *name,
bool modal)
: KDialogBase( parent, name, modal, i18n("Select Folder"),
Ok|Cancel|User1, Ok, false,
@@ -95,20 +95,20 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d = new KDirSelectDialogPrivate;
d->branch = 0L;
- QFrame *page = makeMainWidget();
- QHBoxLayout *hlay = new QHBoxLayout( page, 0, spacingHint() );
- m_mainLayout = new QVBoxLayout();
+ TQFrame *page = makeMainWidget();
+ TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() );
+ m_mainLayout = new TQVBoxLayout();
d->speedBar = new KFileSpeedBar( page, "speedbar" );
- connect( d->speedBar, SIGNAL( activated( const KURL& )),
- SLOT( setCurrentURL( const KURL& )) );
+ connect( d->speedBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( setCurrentURL( const KURL& )) );
hlay->addWidget( d->speedBar, 0 );
hlay->addLayout( m_mainLayout, 1 );
// Create dir list
m_treeView = new KFileTreeView( page );
m_treeView->addColumn( i18n("Folders") );
- m_treeView->setColumnWidthMode( 0, QListView::Maximum );
- m_treeView->setResizeMode( QListView::AllColumns );
+ m_treeView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_treeView->setResizeMode( TQListView::AllColumns );
d->urlCombo = new KHistoryCombo( page, "url combo" );
d->urlCombo->setTrapReturnKey( true );
@@ -118,26 +118,26 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d->urlCombo->setCompletionObject( comp, true );
d->urlCombo->setAutoDeleteCompletionObject( true );
d->urlCombo->setDuplicatesEnabled( false );
- connect( d->urlCombo, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotComboTextChanged( const QString& ) ));
+ connect( d->urlCombo, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotComboTextChanged( const TQString& ) ));
- m_contextMenu = new QPopupMenu( this );
- KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, SLOT( slotMkdir() ), this);
+ m_contextMenu = new TQPopupMenu( this );
+ KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, TQT_SLOT( slotMkdir() ), this);
newFolder->plug(m_contextMenu);
m_contextMenu->insertSeparator();
m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, this,
- SLOT( slotShowHiddenFoldersToggled() ), this);
+ TQT_SLOT( slotShowHiddenFoldersToggled() ), this);
m_showHiddenFolders->plug(m_contextMenu);
d->startURL = KFileDialog::getStartURL( startDir, d->recentDirClass );
if ( localOnly && !d->startURL.isLocalFile() )
{
d->startURL = KURL();
- QString docPath = KGlobalSettings::documentPath();
- if (QDir(docPath).exists())
+ TQString docPath = KGlobalSettings::documentPath();
+ if (TQDir(docPath).exists())
d->startURL.setPath( docPath );
else
- d->startURL.setPath( QDir::homeDirPath() );
+ d->startURL.setPath( TQDir::homeDirPath() );
}
KURL root = rootUrl(d->startURL);
@@ -151,15 +151,15 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
m_mainLayout->addWidget( m_treeView, 1 );
m_mainLayout->addWidget( d->urlCombo, 0 );
- connect( m_treeView, SIGNAL( currentChanged( QListViewItem * )),
- SLOT( slotCurrentChanged() ));
- connect( m_treeView, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & )),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & )));
+ connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )),
+ TQT_SLOT( slotCurrentChanged() ));
+ connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & )));
- connect( d->urlCombo, SIGNAL( activated( const QString& )),
- SLOT( slotURLActivated( const QString& )));
- connect( d->urlCombo, SIGNAL( returnPressed( const QString& )),
- SLOT( slotURLActivated( const QString& )));
+ connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
+ connect( d->urlCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
setCurrentURL( d->startURL );
}
@@ -194,14 +194,14 @@ void KDirSelectDialog::setCurrentURL( const KURL& url )
d->branch = createBranch( root );
}
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
- connect( d->branch, SIGNAL( populateFinished( KFileTreeViewItem * )),
- SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ connect( d->branch, TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ TQT_SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
KURL dirToList = root;
d->dirsToList.clear();
- QString path = url.path(+1);
+ TQString path = url.path(+1);
int pos = path.length();
if ( path.isEmpty() ) // e.g. ftp://host.com/ -> just list the root dir
@@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
{
// scroll to make item the topmost item
view()->ensureItemVisible( item );
- QRect r = view()->itemRect( item );
+ TQRect r = view()->itemRect( item );
if ( r.isValid() )
{
int x, y;
@@ -260,25 +260,25 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
openNextDir( item );
else
{
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
view()->setCurrentItem( item );
item->setSelected( true );
}
}
-void KDirSelectDialog::readConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::readConfig( KConfig *config, const TQString& group )
{
d->urlCombo->clear();
KConfigGroup conf( config, group );
d->urlCombo->setHistoryItems( conf.readPathListEntry( "History Items" ));
- QSize defaultSize( 400, 450 );
+ TQSize defaultSize( 400, 450 );
resize( conf.readSizeEntry( "DirSelectDialog Size", &defaultSize ));
}
-void KDirSelectDialog::saveConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::saveConfig( KConfig *config, const TQString& group )
{
KConfigGroup conf( config, group );
conf.writePathEntry( "History Items", d->urlCombo->historyItems(), ',',
@@ -340,10 +340,10 @@ void KDirSelectDialog::slotCurrentChanged()
d->urlCombo->setEditText( u.prettyURL() );
}
else
- d->urlCombo->setEditText( QString::null );
+ d->urlCombo->setEditText( TQString::null );
}
-void KDirSelectDialog::slotURLActivated( const QString& text )
+void KDirSelectDialog::slotURLActivated( const TQString& text )
{
if ( text.isEmpty() )
return;
@@ -363,7 +363,7 @@ void KDirSelectDialog::slotURLActivated( const QString& text )
KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
{
- QString title = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString title = url.isLocalFile() ? url.path() : url.prettyURL();
KFileTreeBranch *branch = view()->addBranch( url, title, m_showHiddenFolders->isChecked() );
branch->setChildRecurse( false );
view()->setDirOnlyMode( branch, true );
@@ -371,7 +371,7 @@ KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
return branch;
}
-void KDirSelectDialog::slotComboTextChanged( const QString& text )
+void KDirSelectDialog::slotComboTextChanged( const TQString& text )
{
if ( d->branch )
{
@@ -386,7 +386,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
- QListViewItem *item = view()->currentItem();
+ TQListViewItem *item = view()->currentItem();
if ( item )
{
item->setSelected( false );
@@ -395,7 +395,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
-void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoint& pos )
+void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos )
{
m_contextMenu->popup( pos );
}
@@ -403,12 +403,12 @@ void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoi
void KDirSelectDialog::slotMkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
+ TQString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this));
if (!ok)
@@ -419,8 +419,8 @@ void KDirSelectDialog::slotMkdir()
bool exists = false;
KURL folderurl( url() );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -431,7 +431,7 @@ void KDirSelectDialog::slotMkdir()
if ( exists ) // url was already existant
{
- QString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
+ TQString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
KMessageBox::sorry(this, i18n("A file or folder named %1 already exists.").arg(which));
selectDirectory = false;
}
@@ -458,10 +458,10 @@ void KDirSelectDialog::slotShowHiddenFoldersToggled()
}
// static
-KURL KDirSelectDialog::selectDirectory( const QString& startDir,
+KURL KDirSelectDialog::selectDirectory( const TQString& startDir,
bool localOnly,
- QWidget *parent,
- const QString& caption)
+ TQWidget *parent,
+ const TQString& caption)
{
KDirSelectDialog myDialog( startDir, localOnly, parent,
"kdirselect dialog", true );
@@ -469,7 +469,7 @@ KURL KDirSelectDialog::selectDirectory( const QString& startDir,
if ( !caption.isNull() )
myDialog.setCaption( caption );
- if ( myDialog.exec() == QDialog::Accepted )
+ if ( myDialog.exec() == TQDialog::Accepted )
return KIO::NetAccess::mostLocalURL(myDialog.url(),parent);
else
return KURL();
diff --git a/kio/kfile/kdirselectdialog.h b/kio/kfile/kdirselectdialog.h
index 7f2bb13c5..4687d1b75 100644
--- a/kio/kfile/kdirselectdialog.h
+++ b/kio/kfile/kdirselectdialog.h
@@ -47,12 +47,12 @@ public:
* @param startDir the directory, initially shown
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent for the dialog, usually 0L
- * @param name the QObject::name
+ * @param name the TQObject::name
* @param modal if the dialog is modal or not
*/
- KDirSelectDialog(const QString& startDir = QString::null,
+ KDirSelectDialog(const TQString& startDir = TQString::null,
bool localOnly = false,
- QWidget *parent = 0L,
+ TQWidget *parent = 0L,
const char *name = 0, bool modal = false);
/**
@@ -75,18 +75,18 @@ public:
* The tree will display this directory and subdirectories of it.
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent widget to use for the dialog, or NULL to create a parent-less dialog
- * @param caption the caption to use for the dialog, or QString::null for the default caption
+ * @param caption the caption to use for the dialog, or TQString::null for the default caption
* @return The URL selected, or an empty URL if the user canceled
* or no URL was selected.
*/
- static KURL selectDirectory( const QString& startDir = QString::null,
- bool localOnly = false, QWidget *parent = 0L,
- const QString& caption = QString::null);
+ static KURL selectDirectory( const TQString& startDir = TQString::null,
+ bool localOnly = false, TQWidget *parent = 0L,
+ const TQString& caption = TQString::null);
/**
* @return The path for the root node
*/
- QString startDir() const { return m_startDir; }
+ TQString startDir() const { return m_startDir; }
public slots:
void setCurrentURL( const KURL& url );
@@ -98,26 +98,26 @@ protected:
virtual void accept();
// Layouts protected so that subclassing is easy
- QVBoxLayout *m_mainLayout;
- QString m_startDir;
+ TQVBoxLayout *m_mainLayout;
+ TQString m_startDir;
private slots:
void slotCurrentChanged();
- void slotURLActivated( const QString& );
+ void slotURLActivated( const TQString& );
void slotNextDirToList( KFileTreeViewItem *dirItem );
- void slotComboTextChanged( const QString& text );
- void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
+ void slotComboTextChanged( const TQString& text );
+ void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & );
void slotShowHiddenFoldersToggled();
void slotMkdir();
private:
- void readConfig( KConfig *config, const QString& group );
- void saveConfig( KConfig *config, const QString& group );
+ void readConfig( KConfig *config, const TQString& group );
+ void saveConfig( KConfig *config, const TQString& group );
void openNextDir( KFileTreeViewItem *parent );
KFileTreeBranch * createBranch( const KURL& url );
KFileTreeView *m_treeView;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
KToggleAction *m_showHiddenFolders;
bool m_localOnly;
diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp
index cebe42cbc..3c9bfbb8c 100644
--- a/kio/kfile/kdirsize.cpp
+++ b/kio/kfile/kdirsize.cpp
@@ -20,8 +20,8 @@
#include "kdirsize.h"
#include <kdebug.h>
#include <kglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <config-kfile.h>
using namespace KIO;
@@ -35,7 +35,7 @@ KDirSize::KDirSize( const KURL & directory )
KDirSize::KDirSize( const KFileItemList & lstItems )
: KIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems)
{
- QTimer::singleShot( 0, this, SLOT(processList()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(processList()) );
}
void KDirSize::processList()
@@ -70,17 +70,17 @@ void KDirSize::processList()
void KDirSize::startNextJob( const KURL & url )
{
KIO::ListJob * listJob = KIO::listRecursive( url, false /* no GUI */ );
- connect( listJob, SIGNAL(entries( KIO::Job *,
+ connect( listJob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( listJob );
}
void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
{
- static const QString& dot = KGlobal::staticQString( "." );
- static const QString& dotdot = KGlobal::staticQString( ".." );
+ static const TQString& dot = KGlobal::staticQString( "." );
+ static const TQString& dotdot = KGlobal::staticQString( ".." );
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) {
@@ -88,7 +88,7 @@ void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
KIO::filesize_t size = 0;
bool isLink = false;
bool isDir = false;
- QString name;
+ TQString name;
for( ; it2 != (*it).end(); it2++ ) {
switch( (*it2).m_uds ) {
case KIO::UDS_NAME:
diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp
index f748b2a66..179b69f72 100644
--- a/kio/kfile/kdiskfreesp.cpp
+++ b/kio/kfile/kdiskfreesp.cpp
@@ -23,8 +23,8 @@
*/
#include "kdiskfreesp.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -43,15 +43,15 @@
/***************************************************************************
* constructor
**/
-KDiskFreeSp::KDiskFreeSp(QObject *parent, const char *name)
- : QObject(parent,name)
+KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name)
+ : TQObject(parent,name)
{
dfProc = new KProcess(); Q_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
- connect( dfProc, SIGNAL(receivedStdout(KProcess *, char *, int) ),
- this, SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
- connect(dfProc,SIGNAL(processExited(KProcess *) ),
- this, SLOT(dfDone() ) );
+ connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
+ connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
+ this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
}
@@ -70,21 +70,21 @@ KDiskFreeSp::~KDiskFreeSp()
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
{
- QCString tmp(data,len+1); // adds a zero-byte
+ TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
}
/***************************************************************************
* reads the df-commands results
**/
-int KDiskFreeSp::readDF( const QString & mountPoint )
+int KDiskFreeSp::readDF( const TQString & mountPoint )
{
if (readingDFStdErrOut || dfProc->isRunning())
return -1;
m_mountPoint = mountPoint;
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
- (*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS);
+ (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS);
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
@@ -98,12 +98,12 @@ void KDiskFreeSp::dfDone()
{
readingDFStdErrOut=true;
- QTextStream t (dfStringErrOut, IO_ReadOnly);
- QString s=t.readLine();
- if ( (s.isEmpty()) || ( s.left(10) != QString::fromLatin1("Filesystem") ) )
+ TQTextStream t (dfStringErrOut, IO_ReadOnly);
+ TQString s=t.readLine();
+ if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
- QString u,v;
+ TQString u,v;
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( !s.isEmpty() ) {
@@ -119,7 +119,7 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
- //QString deviceName = s.left(s.find(BLANK));
+ //TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
@@ -143,7 +143,7 @@ void KDiskFreeSp::dfDone()
s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
- QString mountPoint = s.stripWhiteSpace();
+ TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;
if ( mountPoint == m_mountPoint )
@@ -160,10 +160,10 @@ void KDiskFreeSp::dfDone()
delete this;
}
-KDiskFreeSp * KDiskFreeSp::findUsageInfo( const QString & path )
+KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
- QString mountPoint = KIO::findPathMountPoint( path );
+ TQString mountPoint = KIO::findPathMountPoint( path );
job->readDF( mountPoint );
return job;
}
diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h
index 53b83ba40..6a0591d6f 100644
--- a/kio/kfile/kdiskfreesp.h
+++ b/kio/kfile/kdiskfreesp.h
@@ -26,8 +26,8 @@
#ifndef __KDISKFREESP_H__
#define __KDISKFREESP_H__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ class KProcess;
class KIO_EXPORT KDiskFreeSp : public QObject
{ Q_OBJECT
public:
- KDiskFreeSp( QObject *parent=0, const char *name=0 );
+ KDiskFreeSp( TQObject *parent=0, const char *name=0 );
/**
* Destructor - this object autodeletes itself when it's done
*/
@@ -51,7 +51,7 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- int readDF( const QString & mountPoint );
+ int readDF( const TQString & mountPoint );
/**
* Call this to fire a search on the disk usage information
@@ -60,15 +60,15 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- static KDiskFreeSp * findUsageInfo( const QString & path );
+ static KDiskFreeSp * findUsageInfo( const TQString & path );
signals:
- void foundMountPoint( const QString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
+ void foundMountPoint( const TQString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
// This one is a hack around a weird (compiler?) bug. In the former signal,
// the slot in KPropsDlg would get 0L, 0L as the last two parameters.
// When using const ulong& instead, all is ok.
- void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const QString& );
+ void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const TQString& );
void done();
private slots:
@@ -77,8 +77,8 @@ private slots:
private:
KProcess *dfProc;
- QCString dfStringErrOut;
- QString m_mountPoint;
+ TQCString dfStringErrOut;
+ TQString m_mountPoint;
bool readingDFStdErrOut;
class KDiskFreeSpPrivate;
KDiskFreeSpPrivate * d;
diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp
index 63ce8a5dc..396006504 100644
--- a/kio/kfile/kencodingfiledialog.cpp
+++ b/kio/kfile/kencodingfiledialog.cpp
@@ -27,7 +27,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdiroperator.h>
#include <krecentdocument.h>
@@ -36,8 +36,8 @@ struct KEncodingFileDialogPrivate
KComboBox *encoding;
};
-KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString& encoding , const QString& filter,
- const QString& caption, KFileDialog::OperationMode type, QWidget *parent, const char* name, bool modal)
+KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQString& encoding , const TQString& filter,
+ const TQString& caption, KFileDialog::OperationMode type, TQWidget *parent, const char* name, bool modal)
: KFileDialog(startDir,filter,parent,name,modal), d(new KEncodingFileDialogPrivate)
{
setCaption(caption);
@@ -46,22 +46,22 @@ KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString&
KToolBar *tb = toolBar();
tb->insertSeparator();
- int index = tb->insertCombo(QStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
+ int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
d->encoding = tb->getCombo( tb->idAt( index ) );
if ( !d->encoding )
return;
d->encoding->clear ();
- QString sEncoding = encoding;
+ TQString sEncoding = encoding;
if (sEncoding.isEmpty())
- sEncoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding());
- QStringList encodings (KGlobal::charsets()->availableEncodingNames());
+ TQStringList encodings (KGlobal::charsets()->availableEncodingNames());
int insert = 0;
for (uint i=0; i < encodings.count(); i++)
{
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
if (found)
{
@@ -84,19 +84,19 @@ KEncodingFileDialog::~KEncodingFileDialog()
}
-QString KEncodingFileDialog::selectedEncoding() const
+TQString KEncodingFileDialog::selectedEncoding() const
{
if (d->encoding)
return d->encoding->currentText();
else
- return QString::null;
+ return TQString::null;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -111,11 +111,11 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(cons
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -129,8 +129,8 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(con
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter, QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter, TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -145,10 +145,10 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QSt
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -164,21 +164,21 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QS
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const QString& encoding,
- const QString& dir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const TQString& encoding,
+ const TQString& dir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
Saving,parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
@@ -189,12 +189,12 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const QString& encoding,
- const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQString& encoding,
+ const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
caption, Saving,parent, "filedialog", true);
if ( !specialDir )
diff --git a/kio/kfile/kencodingfiledialog.h b/kio/kfile/kencodingfiledialog.h
index fbf3b34e6..15b44f9c3 100644
--- a/kio/kfile/kencodingfiledialog.h
+++ b/kio/kfile/kencodingfiledialog.h
@@ -43,9 +43,9 @@ class KIO_EXPORT KEncodingFileDialog : public KFileDialog
public:
class Result {
public:
- QStringList fileNames;
+ TQStringList fileNames;
KURL::List URLs;
- QString encoding;
+ TQString encoding;
};
/**
@@ -53,7 +53,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -64,7 +64,7 @@ public:
* same keyword.
*
* @param encoding The encoding shown in the encoding combo. If it's
- * QString::null, the global default encoding will be shown.
+ * TQString::null, the global default encoding will be shown.
*
* @param filter This is a space separated list of shell globs.
* You can set the text to be displayed for the glob, and
@@ -82,11 +82,11 @@ public:
*
* @since 3.2
*/
- KEncodingFileDialog (const QString& startDir = QString::null,
- const QString& encoding = QString::null,
- const QString& filter = QString::null,
- const QString& caption = QString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
- QWidget *parent= 0, const char *name="", bool modal = true);
+ KEncodingFileDialog (const TQString& startDir = TQString::null,
+ const TQString& encoding = TQString::null,
+ const TQString& filter = TQString::null,
+ const TQString& caption = TQString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
+ TQWidget *parent= 0, const char *name="", bool modal = true);
/**
* Destructs the file dialog.
*/
@@ -94,9 +94,9 @@ public:
/**
- * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise QString::null.
+ * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null.
*/
- QString selectedEncoding() const;
+ TQString selectedEncoding() const;
/**
@@ -109,7 +109,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -126,11 +126,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and the selected
@@ -141,7 +141,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -158,11 +158,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNamesAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenFileNamesAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and
@@ -173,7 +173,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -190,11 +190,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -208,7 +208,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -225,11 +225,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLsAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenURLsAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -244,7 +244,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -261,11 +261,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir=QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir=TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -279,7 +279,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -296,11 +296,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
diff --git a/kio/kfile/kfile.h b/kio/kfile/kfile.h
index 70253f9d8..91f4f4599 100644
--- a/kio/kfile/kfile.h
+++ b/kio/kfile/kfile.h
@@ -18,7 +18,7 @@
#ifndef KFILE_H
#define KFILE_H
-#include <qdir.h>
+#include <tqdir.h>
#include "kdelibs_export.h"
@@ -73,26 +73,26 @@ public:
// sorting specific
- // grr, who had the idea to set QDir::Name to 0x0?
- static bool isSortByName( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) != QDir::Time &&
- (sort & QDir::Size) != QDir::Size;
+ // grr, who had the idea to set TQDir::Name to 0x0?
+ static bool isSortByName( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) != TQDir::Time &&
+ (sort & TQDir::Size) != TQDir::Size;
}
- static bool isSortBySize( const QDir::SortSpec& sort ) {
- return (sort & QDir::Size) == QDir::Size;
+ static bool isSortBySize( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Size) == TQDir::Size;
}
- static bool isSortByDate( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) == QDir::Time;
+ static bool isSortByDate( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) == TQDir::Time;
}
- static bool isSortDirsFirst( const QDir::SortSpec& sort ) {
- return (sort & QDir::DirsFirst) == QDir::DirsFirst;
+ static bool isSortDirsFirst( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::DirsFirst) == TQDir::DirsFirst;
}
- static bool isSortCaseInsensitive( const QDir::SortSpec& sort ) {
- return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
+ static bool isSortCaseInsensitive( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::IgnoreCase) == TQDir::IgnoreCase;
}
diff --git a/kio/kfile/kfilebookmarkhandler.cpp b/kio/kfile/kfilebookmarkhandler.cpp
index f69ae07a2..f78fe2547 100644
--- a/kio/kfile/kfilebookmarkhandler.cpp
+++ b/kio/kfile/kfilebookmarkhandler.cpp
@@ -28,13 +28,13 @@
#include "kfilebookmarkhandler.h"
KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
- : QObject( dialog, "KFileBookmarkHandler" ),
+ : TQObject( dialog, "KFileBookmarkHandler" ),
KBookmarkOwner(),
m_dialog( dialog )
{
m_menu = new KPopupMenu( dialog, "bookmark menu" );
- QString file = locate( "data", "kfile/bookmarks.xml" );
+ TQString file = locate( "data", "kfile/bookmarks.xml" );
if ( file.isEmpty() )
file = locateLocal( "data", "kfile/bookmarks.xml" );
@@ -42,7 +42,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
// import old bookmarks
if ( !KStandardDirs::exists( file ) ) {
- QString oldFile = locate( "data", "kfile/bookmarks.html" );
+ TQString oldFile = locate( "data", "kfile/bookmarks.html" );
if ( !oldFile.isEmpty() )
importOldBookmarks( oldFile, manager );
}
@@ -59,12 +59,12 @@ KFileBookmarkHandler::~KFileBookmarkHandler()
delete m_bookmarkMenu;
}
-QString KFileBookmarkHandler::currentURL() const
+TQString KFileBookmarkHandler::currentURL() const
{
return m_dialog->baseURL().url();
}
-void KFileBookmarkHandler::importOldBookmarks( const QString& path,
+void KFileBookmarkHandler::importOldBookmarks( const TQString& path,
KBookmarkManager *manager )
{
KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( manager->root(), manager );
diff --git a/kio/kfile/kfilebookmarkhandler.h b/kio/kfile/kfilebookmarkhandler.h
index a6ad4fa2a..d03cb1da8 100644
--- a/kio/kfile/kfilebookmarkhandler.h
+++ b/kio/kfile/kfilebookmarkhandler.h
@@ -26,7 +26,7 @@ class QTextStream;
class KPopupMenu;
-class KIO_EXPORT KFileBookmarkHandler : public QObject, public KBookmarkOwner
+class KIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner
{
Q_OBJECT
@@ -34,19 +34,19 @@ public:
KFileBookmarkHandler( KFileDialog *dialog );
~KFileBookmarkHandler();
- QPopupMenu * popupMenu();
+ TQPopupMenu * popupMenu();
// KBookmarkOwner interface:
- virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); }
- virtual QString currentURL() const;
+ virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); }
+ virtual TQString currentURL() const;
KPopupMenu *menu() const { return m_menu; }
signals:
- void openURL( const QString& url );
+ void openURL( const TQString& url );
private:
- void importOldBookmarks( const QString& path, KBookmarkManager *manager );
+ void importOldBookmarks( const TQString& path, KBookmarkManager *manager );
KFileDialog *m_dialog;
KPopupMenu *m_menu;
diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp
index 78aef5fb0..823714396 100644
--- a/kio/kfile/kfiledetailview.cpp
+++ b/kio/kfile/kfiledetailview.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kfileitem.h>
@@ -52,10 +52,10 @@ public:
{ }
KFileListViewItem *dropItem;
- QTimer autoOpenTimer;
+ TQTimer autoOpenTimer;
};
-KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
+KFileDetailView::KFileDetailView(TQWidget *parent, const char *name)
: KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate())
{
// this is always the static section, not the index depending on column order
@@ -73,50 +73,50 @@ KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
setAllColumnsShowFocus( true );
setDragEnabled(true);
- connect( header(), SIGNAL( clicked(int)),
- SLOT(slotSortingChanged(int) ));
+ connect( header(), TQT_SIGNAL( clicked(int)),
+ TQT_SLOT(slotSortingChanged(int) ));
- connect( this, SIGNAL( returnPressed(QListViewItem *) ),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQListViewItem *) ),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint&, int)),
- SLOT( selected( QListViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QListViewItem *, const QPoint&, int)),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( selected( TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL(contextMenuRequested( QListViewItem *,
- const QPoint &, int )),
- this, SLOT( slotActivateMenu( QListViewItem *, const QPoint& )));
+ connect( this, TQT_SIGNAL(contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int )),
+ this, TQT_SLOT( slotActivateMenu( TQListViewItem *, const TQPoint& )));
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
// for highlighting
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( highlighted( QListViewItem * ) ));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( highlighted( TQListViewItem * ) ));
// DND
- connect( &(d->autoOpenTimer), SIGNAL( timeout() ),
- this, SLOT( slotAutoOpen() ));
+ connect( &(d->autoOpenTimer), TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpen() ));
setSorting( sorting() );
@@ -130,12 +130,12 @@ KFileDetailView::~KFileDetailView()
delete d;
}
-void KFileDetailView::readConfig( KConfig *config, const QString& group )
+void KFileDetailView::readConfig( KConfig *config, const TQString& group )
{
restoreLayout( config, group );
}
-void KFileDetailView::writeConfig( KConfig *config, const QString& group )
+void KFileDetailView::writeConfig( KConfig *config, const TQString& group )
{
saveLayout( config, group );
}
@@ -189,7 +189,7 @@ void KFileDetailView::invertSelection()
KListView::invertSelection();
}
-void KFileDetailView::slotActivateMenu (QListViewItem *item,const QPoint& pos )
+void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -209,7 +209,7 @@ void KFileDetailView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- KFileListViewItem *item = new KFileListViewItem( (QListView*) this, i );
+ KFileListViewItem *item = new KFileListViewItem( (TQListView*) this, i );
setSortingKey( item, i );
@@ -219,7 +219,7 @@ void KFileDetailView::insertItem( KFileItem *i )
m_resolver->m_lstPendingMimeIconItems.append( item );
}
-void KFileDetailView::slotActivate( QListViewItem *item )
+void KFileDetailView::slotActivate( TQListViewItem *item )
{
if ( !item )
return;
@@ -229,7 +229,7 @@ void KFileDetailView::slotActivate( QListViewItem *item )
sig->activate( fi );
}
-void KFileDetailView::selected( QListViewItem *item )
+void KFileDetailView::selected( TQListViewItem *item )
{
if ( !item )
return;
@@ -241,7 +241,7 @@ void KFileDetailView::selected( QListViewItem *item )
}
}
-void KFileDetailView::highlighted( QListViewItem *item )
+void KFileDetailView::highlighted( TQListViewItem *item )
{
if ( !item )
return;
@@ -254,33 +254,33 @@ void KFileDetailView::highlighted( QListViewItem *item )
void KFileDetailView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( this, SIGNAL( selectionChanged() ));
- disconnect( this, SIGNAL( selectionChanged( QListViewItem * ) ));
+ disconnect( this, TQT_SIGNAL( selectionChanged() ));
+ disconnect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ));
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * )),
- SLOT( highlighted( QListViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * )),
+ TQT_SLOT( highlighted( TQListViewItem * )));
}
bool KFileDetailView::isSelected( const KFileItem *i ) const
@@ -298,7 +298,7 @@ void KFileDetailView::updateView( bool b )
if ( !b )
return;
- QListViewItemIterator it( (QListView*)this );
+ TQListViewItemIterator it( (TQListView*)this );
for ( ; it.current(); ++it ) {
KFileListViewItem *item=static_cast<KFileListViewItem *>(it.current());
item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) );
@@ -324,12 +324,12 @@ void KFileDetailView::setSortingKey( KFileListViewItem *item,
const KFileItem *i )
{
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
item->setKey( sortingKey( i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -353,56 +353,56 @@ void KFileDetailView::slotSortingChanged( int col )
{
// col is the section here, not the index!
- QDir::SortSpec sort = sorting();
+ TQDir::SortSpec sort = sorting();
int sortSpec = -1;
- bool reversed = (col == m_sortingCol) && (sort & QDir::Reversed) == 0;
+ bool reversed = (col == m_sortingCol) && (sort & TQDir::Reversed) == 0;
m_sortingCol = col;
switch( col ) {
case COL_NAME:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Name);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name);
break;
case COL_SIZE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Size);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size);
break;
case COL_DATE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Time);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time);
break;
- // the following columns have no equivalent in QDir, so we set it
- // to QDir::Unsorted and remember the column (m_sortingCol)
+ // the following columns have no equivalent in TQDir, so we set it
+ // to TQDir::Unsorted and remember the column (m_sortingCol)
case COL_OWNER:
case COL_GROUP:
case COL_PERM:
- // grmbl, QDir::Unsorted == SortByMask.
- sortSpec = (sort & ~QDir::SortByMask);// | QDir::Unsorted;
+ // grmbl, TQDir::Unsorted == SortByMask.
+ sortSpec = (sort & ~TQDir::SortByMask);// | TQDir::Unsorted;
break;
default:
break;
}
if ( reversed )
- sortSpec |= QDir::Reversed;
+ sortSpec |= TQDir::Reversed;
else
- sortSpec &= ~QDir::Reversed;
+ sortSpec &= ~TQDir::Reversed;
- if ( sort & QDir::IgnoreCase )
- sortSpec |= QDir::IgnoreCase;
+ if ( sort & TQDir::IgnoreCase )
+ sortSpec |= TQDir::IgnoreCase;
else
- sortSpec &= ~QDir::IgnoreCase;
+ sortSpec &= ~TQDir::IgnoreCase;
- KFileView::setSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ KFileView::setSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
KFileItem *item;
KFileItemListIterator it( *items() );
- if ( sortSpec & QDir::Time ) {
+ if ( sortSpec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec ));
}
- else if ( sortSpec & QDir::Size ) {
+ else if ( sortSpec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
sortSpec ));
@@ -419,30 +419,30 @@ void KFileDetailView::slotSortingChanged( int col )
KListView::sort();
if ( !m_blockSortingSignal )
- sig->changeSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
}
-void KFileDetailView::setSorting( QDir::SortSpec spec )
+void KFileDetailView::setSorting( TQDir::SortSpec spec )
{
int col = 0;
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
col = COL_DATE;
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
col = COL_SIZE;
- else if ( spec & QDir::Unsorted )
+ else if ( spec & TQDir::Unsorted )
col = m_sortingCol;
else
col = COL_NAME;
// inversed, because slotSortingChanged will reverse it
- if ( spec & QDir::Reversed )
- spec = (QDir::SortSpec) (spec & ~QDir::Reversed);
+ if ( spec & TQDir::Reversed )
+ spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed);
else
- spec = (QDir::SortSpec) (spec | QDir::Reversed);
+ spec = (TQDir::SortSpec) (spec | TQDir::Reversed);
m_sortingCol = col;
- KFileView::setSorting( (QDir::SortSpec) spec );
+ KFileView::setSorting( (TQDir::SortSpec) spec );
// don't emit sortingChanged() when called via setSorting()
@@ -502,7 +502,7 @@ KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const
return firstFileItem();
}
-void KFileDetailView::keyPressEvent( QKeyEvent *e )
+void KFileDetailView::keyPressEvent( TQKeyEvent *e )
{
KListView::keyPressEvent( e );
@@ -533,7 +533,7 @@ void KFileDetailView::listingCompleted()
m_resolver->start();
}
-QDragObject *KFileDetailView::dragObject()
+TQDragObject *KFileDetailView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -541,16 +541,16 @@ QDragObject *KFileDetailView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", KIcon::SizeSmall );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( KIcon::SizeSmall );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -572,16 +572,16 @@ void KFileDetailView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileDetailView::acceptDrag(QDropEvent* e) const
+bool KFileDetailView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!= const_cast<KFileDetailView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileDetailView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -604,7 +604,7 @@ void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileDetailView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -630,13 +630,13 @@ void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileDetailView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileDetailView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileDetailView::contentsDropEvent( QDropEvent *e )
+void KFileDetailView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h
index 174a2483d..61e2156f4 100644
--- a/kio/kfile/kfiledetailview.h
+++ b/kio/kfile/kfiledetailview.h
@@ -37,8 +37,8 @@ class QKeyEvent;
class KIO_EXPORT KFileListViewItem : public KListViewItem
{
public:
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi )
: KListViewItem( parent, text ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -47,14 +47,14 @@ public:
/**
* @since 3.1
*/
- KFileListViewItem( QListView *parent, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, KFileItem *fi )
: KListViewItem( parent ), inf( fi ) {
init();
}
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi,
- QListViewItem *after)
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi,
+ TQListViewItem *after)
: KListViewItem( parent, after ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -70,17 +70,17 @@ public:
return inf;
}
- virtual QString key( int /*column*/, bool /*ascending*/ ) const {
+ virtual TQString key( int /*column*/, bool /*ascending*/ ) const {
return m_key;
}
- void setKey( const QString& key ) { m_key = key; }
+ void setKey( const TQString& key ) { m_key = key; }
- QRect rect() const
+ TQRect rect() const
{
- QRect r = listView()->itemRect(this);
- return QRect( listView()->viewportToContents( r.topLeft() ),
- QSize( r.width(), r.height() ) );
+ TQRect r = listView()->itemRect(this);
+ return TQRect( listView()->viewportToContents( r.topLeft() ),
+ TQSize( r.width(), r.height() ) );
}
/**
@@ -90,7 +90,7 @@ public:
private:
KFileItem *inf;
- QString m_key;
+ TQString m_key;
private:
class KFileListViewItemPrivate;
@@ -111,10 +111,10 @@ class KIO_EXPORT KFileDetailView : public KListView, public KFileView
Q_OBJECT
public:
- KFileDetailView(QWidget *parent, const char *name);
+ KFileDetailView(TQWidget *parent, const char *name);
virtual ~KFileDetailView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -140,17 +140,17 @@ public:
virtual void insertItem( KFileItem *i );
// implemented to get noticed about sorting changes (for sortingIndicator)
- virtual void setSorting( QDir::SortSpec );
+ virtual void setSorting( TQDir::SortSpec );
void ensureItemVisible( const KFileItem * );
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileListViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
signals:
/**
@@ -159,25 +159,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
protected:
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
- virtual bool acceptDrag(QDropEvent* e ) const;
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
+ virtual bool acceptDrag(TQDropEvent* e ) const;
int m_sortingCol;
@@ -186,16 +186,16 @@ protected slots:
private slots:
void slotSortingChanged( int );
- void selected( QListViewItem *item );
- void slotActivate( QListViewItem *item );
- void highlighted( QListViewItem *item );
- void slotActivateMenu ( QListViewItem *item, const QPoint& pos );
+ void selected( TQListViewItem *item );
+ void slotActivate( TQListViewItem *item );
+ void highlighted( TQListViewItem *item );
+ void slotActivateMenu ( TQListViewItem *item, const TQPoint& pos );
void slotAutoOpen();
private:
- virtual void insertItem(QListViewItem *i) { KListView::insertItem(i); }
+ virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); }
virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); }
- virtual void setSelected(QListViewItem *i, bool b) { KListView::setSelected(i, b); }
+ virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); }
inline KFileListViewItem * viewItem( const KFileItem *item ) const {
if ( item )
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp
index 5668ec616..f206a4887 100644
--- a/kio/kfile/kfiledialog.cpp
+++ b/kio/kfile/kfiledialog.cpp
@@ -28,19 +28,19 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qptrcollection.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qfiledialog.h>
+#include <tqptrcollection.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqfiledialog.h>
#include <kaccel.h>
#include <kaction.h>
@@ -97,7 +97,7 @@
enum Buttons { HOTLIST_BUTTON,
PATH_COMBO, CONFIGURE_BUTTON };
-template class QPtrList<KIO::StatJob>;
+template class TQPtrList<KIO::StatJob>;
namespace {
static void silenceQToolBar(QtMsgType, const char *)
@@ -111,36 +111,36 @@ struct KFileDialogPrivate
KURL url;
// the selected filenames in multiselection mode -- FIXME
- QString filenames;
+ TQString filenames;
// the name of the filename set by setSelection
- QString selection;
+ TQString selection;
// now following all kind of widgets, that I need to rebuild
// the geometry management
- QBoxLayout *boxLayout;
- QWidget *mainWidget;
+ TQBoxLayout *boxLayout;
+ TQWidget *mainWidget;
- QLabel *locationLabel;
+ TQLabel *locationLabel;
// @deprecated remove in KDE4
- QLabel *filterLabel;
+ TQLabel *filterLabel;
KURLComboBox *pathCombo;
KPushButton *okButton, *cancelButton;
KFileSpeedBar *urlBar;
- QHBoxLayout *urlBarLayout;
- QWidget *customWidget;
+ TQHBoxLayout *urlBarLayout;
+ TQWidget *customWidget;
// Automatically Select Extension stuff
- QCheckBox *autoSelectExtCheckBox;
+ TQCheckBox *autoSelectExtCheckBox;
bool autoSelectExtChecked; // whether or not the _user_ has checked the above box
- QString extension; // current extension for this filter
+ TQString extension; // current extension for this filter
- QPtrList<KIO::StatJob> statJobs;
+ TQPtrList<KIO::StatJob> statJobs;
KURL::List urlList; //the list of selected urls
- QStringList mimetypes; //the list of possible mimetypes to save as
+ TQStringList mimetypes; //the list of possible mimetypes to save as
// indicates if the location edit should be kept or cleared when changing
// directories
@@ -154,7 +154,7 @@ struct KFileDialogPrivate
KFileDialog::OperationMode operationMode;
// The file class used for KRecentDirs
- QString fileClass;
+ TQString fileClass;
KFileBookmarkHandler *bookmarkHandler;
@@ -166,16 +166,16 @@ KURL *KFileDialog::lastDirectory; // to set the start path
static KStaticDeleter<KURL> ldd;
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, 0 );
}
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal, QWidget* widget)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal, TQWidget* widget)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, widget );
}
@@ -197,12 +197,12 @@ KFileDialog::~KFileDialog()
delete d;
}
-void KFileDialog::setLocationLabel(const QString& text)
+void KFileDialog::setLocationLabel(const TQString& text)
{
d->locationLabel->setText(text);
}
-void KFileDialog::setFilter(const QString& filter)
+void KFileDialog::setFilter(const TQString& filter)
{
int pos = filter.find('/');
@@ -210,7 +210,7 @@ void KFileDialog::setFilter(const QString& filter)
// interpret as a MIME filter.
if (pos > 0 && filter[pos - 1] != '\\') {
- QStringList filters = QStringList::split( " ", filter );
+ TQStringList filters = TQStringList::split( " ", filter );
setMimeFilter( filters );
return;
}
@@ -218,7 +218,7 @@ void KFileDialog::setFilter(const QString& filter)
// Strip the escape characters from
// escaped '/' characters.
- QString copy (filter);
+ TQString copy (filter);
for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos)
copy.remove(pos, 1);
@@ -231,13 +231,13 @@ void KFileDialog::setFilter(const QString& filter)
updateAutoSelectExtension ();
}
-QString KFileDialog::currentFilter() const
+TQString KFileDialog::currentFilter() const
{
return filterWidget->currentFilter();
}
// deprecated
-void KFileDialog::setFilterMimeType(const QString &label,
+void KFileDialog::setFilterMimeType(const TQString &label,
const KMimeType::List &types,
const KMimeType::Ptr &defaultType)
{
@@ -251,14 +251,14 @@ void KFileDialog::setFilterMimeType(const QString &label,
setMimeFilter( d->mimetypes, defaultType->name() );
}
-void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
- const QString& defaultType )
+void KFileDialog::setMimeFilter( const TQStringList& mimeTypes,
+ const TQString& defaultType )
{
d->mimetypes = mimeTypes;
filterWidget->setMimeFilter( mimeTypes, defaultType );
- QStringList types = QStringList::split(" ", filterWidget->currentFilter());
- types.append( QString::fromLatin1( "inode/directory" ));
+ TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
+ types.append( TQString::fromLatin1( "inode/directory" ));
ops->clearFilter();
ops->setMimeFilter( types );
d->hasDefaultFilter = !defaultType.isEmpty();
@@ -271,7 +271,7 @@ void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
void KFileDialog::clearFilter()
{
d->mimetypes.clear();
- filterWidget->setFilter( QString::null );
+ filterWidget->setFilter( TQString::null );
ops->clearFilter();
d->hasDefaultFilter = false;
filterWidget->setEditable( true );
@@ -279,7 +279,7 @@ void KFileDialog::clearFilter()
updateAutoSelectExtension ();
}
-QString KFileDialog::currentMimeFilter() const
+TQString KFileDialog::currentMimeFilter() const
{
int i = filterWidget->currentItem();
if (filterWidget->showsAllTypes())
@@ -287,7 +287,7 @@ QString KFileDialog::currentMimeFilter() const
if ((i >= 0) && (i < (int) d->mimetypes.count()))
return d->mimetypes[i];
- return QString::null; // The "all types" item has no mimetype
+ return TQString::null; // The "all types" item has no mimetype
}
KMimeType::Ptr KFileDialog::currentFilterMimeType()
@@ -295,7 +295,7 @@ KMimeType::Ptr KFileDialog::currentFilterMimeType()
return KMimeType::mimeType( currentMimeFilter() );
}
-void KFileDialog::setPreviewWidget(const QWidget *w) {
+void KFileDialog::setPreviewWidget(const TQWidget *w) {
ops->setPreviewWidget(w);
ops->clearHistory();
d->hasView = true;
@@ -307,14 +307,14 @@ void KFileDialog::setPreviewWidget(const KPreviewWidgetBase *w) {
d->hasView = true;
}
-KURL KFileDialog::getCompleteURL(const QString &_url)
+KURL KFileDialog::getCompleteURL(const TQString &_url)
{
- QString url = KShell::tildeExpand(_url);
+ TQString url = KShell::tildeExpand(_url);
KURL u;
if ( KURL::isRelativeURL(url) ) // only a full URL isn't relative. Even /path is.
{
- if (!url.isEmpty() && !QDir::isRelativePath(url) ) // absolute path
+ if (!url.isEmpty() && !TQDir::isRelativePath(url) ) // absolute path
u.setPath( url );
else
{
@@ -342,7 +342,7 @@ void KFileDialog::slotOk()
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
if ( !items || items->isEmpty() )
{
- QString msg;
+ TQString msg;
if ( d->operationMode == Saving )
msg = i18n("Please specify the filename to save to.");
else
@@ -357,8 +357,8 @@ void KFileDialog::slotOk()
bool multi = (mode() & KFile::Files) != 0;
KFileItemListIterator it( *items );
- QString endQuote = QString::fromLatin1("\" ");
- QString name, files;
+ TQString endQuote = TQString::fromLatin1("\" ");
+ TQString name, files;
while ( it.current() ) {
name = (*it)->name();
if ( multi ) {
@@ -382,7 +382,7 @@ void KFileDialog::slotOk()
!(items->isEmpty() && !dirOnly) ) {
d->urlList.clear();
- d->filenames = QString::null;
+ d->filenames = TQString::null;
if ( dirOnly ) {
d->url = ops->url();
@@ -421,7 +421,7 @@ void KFileDialog::slotOk()
KURL selectedURL;
if ( (mode() & KFile::Files) == KFile::Files ) {// multiselection mode
- QString locationText = locationEdit->currentText();
+ TQString locationText = locationEdit->currentText();
if ( locationText.contains( '/' )) {
// relative path? -> prepend the current directory
KURL u( ops->url(), KShell::tildeExpand(locationText));
@@ -464,9 +464,9 @@ void KFileDialog::slotOk()
bool done = true;
if ( d->url.isLocalFile() ) {
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
- QFileInfo info( d->url.path() );
+ TQFileInfo info( d->url.path() );
if ( info.isDir() ) {
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
accept();
@@ -492,10 +492,10 @@ void KFileDialog::slotOk()
if ( ops->dirOnlyMode() )
{
KURL fullURL(d->url, locationEdit->currentText());
- if ( QFile::exists( fullURL.path() ) )
+ if ( TQFile::exists( fullURL.path() ) )
{
d->url = fullURL;
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
return;
@@ -512,7 +512,7 @@ void KFileDialog::slotOk()
}
else { // FIXME: remote directory, should we allow that?
// qDebug( "**** Selected remote directory: %s", d->url.url().latin1());
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
@@ -528,7 +528,7 @@ void KFileDialog::slotOk()
if (!kapp->authorizeURLAction("open", KURL(), d->url))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -546,7 +546,7 @@ void KFileDialog::slotOk()
{
if (!kapp->authorizeURLAction("open", KURL(), *it))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -558,8 +558,8 @@ void KFileDialog::slotOk()
job->setWindow (topLevelWidget());
KIO::Scheduler::scheduleJob( job );
d->statJobs.append( job );
- connect( job, SIGNAL( result(KIO::Job *) ),
- SLOT( slotStatResult( KIO::Job *) ));
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ TQT_SLOT( slotStatResult( KIO::Job *) ));
}
return;
}
@@ -567,7 +567,7 @@ void KFileDialog::slotOk()
job = KIO::stat(d->url,!d->url.isLocalFile());
job->setWindow (topLevelWidget());
d->statJobs.append( job );
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotStatResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*)));
}
@@ -616,7 +616,7 @@ void KFileDialog::slotStatResult(KIO::Job* job)
{
if ( ops->dirOnlyMode() )
{
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
}
@@ -644,23 +644,23 @@ void KFileDialog::slotStatResult(KIO::Job* job)
void KFileDialog::accept()
{
- setResult( QDialog::Accepted ); // parseSelectedURLs() checks that
+ setResult( TQDialog::Accepted ); // parseSelectedURLs() checks that
*lastDirectory = ops->url();
if (!d->fileClass.isEmpty())
KRecentDirs::add(d->fileClass, ops->url().url());
// clear the topmost item, we insert it as full path later on as item 1
- locationEdit->changeItem( QString::null, 0 );
+ locationEdit->changeItem( TQString::null, 0 );
KURL::List list = selectedURLs();
- QValueListConstIterator<KURL> it = list.begin();
+ TQValueListConstIterator<KURL> it = list.begin();
for ( ; it != list.end(); ++it ) {
const KURL& url = *it;
// we strip the last slash (-1) because KURLComboBox does that as well
// when operating in file-mode. If we wouldn't , dupe-finding wouldn't
// work.
- QString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
+ TQString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
// remove dupes
for ( int i = 1; i < locationEdit->count(); i++ ) {
@@ -751,9 +751,9 @@ void KFileDialog::multiSelectionChanged()
return;
}
- static const QString &begin = KGlobal::staticQString(" \"");
+ static const TQString &begin = KGlobal::staticQString(" \"");
KFileItemListIterator it ( *list );
- QString text;
+ TQString text;
while ( (item = it.current()) ) {
text.append( begin ).append( item->name() ).append( '\"' );
++it;
@@ -762,16 +762,16 @@ void KFileDialog::multiSelectionChanged()
setLocationText( text.stripWhiteSpace() );
}
-void KFileDialog::setLocationText( const QString& text )
+void KFileDialog::setLocationText( const TQString& text )
{
// setCurrentItem() will cause textChanged() being emitted,
// so slotLocationChanged() will be called. Make sure we don't clear
// the KDirOperator's view-selection in there
- disconnect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotLocationChanged( const QString& ) ) );
+ disconnect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotLocationChanged( const TQString& ) ) );
locationEdit->setCurrentItem( 0 );
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
locationEdit->setEditText( text );
// don't change selection when user has clicked on an item
@@ -785,7 +785,7 @@ static const char autocompletionWhatsThisText[] = I18N_NOOP("<p>While typing in
"and selecting a preferred mode from the <b>Text Completion</b> menu.") "</qt>";
void KFileDialog::updateLocationWhatsThis (void)
{
- QString whatsThisText;
+ TQString whatsThisText;
if (d->operationMode == KFileDialog::Saving)
{
whatsThisText = "<qt>" + i18n("This is the name to save the file as.") +
@@ -804,11 +804,11 @@ void KFileDialog::updateLocationWhatsThis (void)
i18n (autocompletionWhatsThisText);
}
- QWhatsThis::add(d->locationLabel, whatsThisText);
- QWhatsThis::add(locationEdit, whatsThisText);
+ TQWhatsThis::add(d->locationLabel, whatsThisText);
+ TQWhatsThis::add(locationEdit, whatsThisText);
}
-void KFileDialog::init(const QString& startDir, const QString& filter, QWidget* widget)
+void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidget* widget)
{
initStatic();
d = new KFileDialogPrivate();
@@ -819,13 +819,13 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->bookmarkHandler = 0;
d->hasDefaultFilter = false;
d->hasView = false;
- d->mainWidget = new QWidget( this, "KFileDialog::mainWidget");
+ d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget");
setMainWidget( d->mainWidget );
d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget );
d->okButton->setDefault( true );
d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget);
- connect( d->okButton, SIGNAL( clicked() ), SLOT( slotOk() ));
- connect( d->cancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ));
+ connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() ));
+ connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() ));
d->customWidget = widget;
d->autoSelectExtCheckBox = 0; // delayed loading
d->autoSelectExtChecked = false;
@@ -838,20 +838,20 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true,
toolbar, "path combo" );
- QToolTip::add( d->pathCombo, i18n("Current location") );
- QWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
+ TQToolTip::add( d->pathCombo, i18n("Current location") );
+ TQWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
"The drop-down list also lists commonly used locations. "
"This includes standard locations, such as your home folder, as well as "
"locations that have been visited recently.") + i18n (autocompletionWhatsThisText));
KURL u;
- u.setPath( QDir::rootDirPath() );
- QString text = i18n("Root Folder: %1").arg( u.path() );
+ u.setPath( TQDir::rootDirPath() );
+ TQString text = i18n("Root Folder: %1").arg( u.path() );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
text = i18n("Home Folder: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
@@ -859,7 +859,7 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() );
if ( (u.path(+1) != docPath.path(+1)) &&
- QDir(docPath.path(+1)).exists() )
+ TQDir(docPath.path(+1)).exists() )
{
text = i18n("Documents: %1").arg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( docPath,
@@ -879,10 +879,10 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
// If local, check it exists. If not, go up until it exists.
if ( d->url.isLocalFile() )
{
- if ( !QFile::exists( d->url.path() ) )
+ if ( !TQFile::exists( d->url.path() ) )
{
d->url = d->url.upURL();
- QDir dir( d->url.path() );
+ TQDir dir( d->url.path() );
while ( !dir.exists() )
{
d->url = d->url.upURL();
@@ -893,14 +893,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops");
ops->setOnlyDoubleClickSelectsFiles( true );
- connect(ops, SIGNAL(urlEntered(const KURL&)),
- SLOT(urlEntered(const KURL&)));
- connect(ops, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(ops, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
- connect(ops, SIGNAL(finishedLoading()),
- SLOT(slotLoadingFinished()));
+ connect(ops, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT(urlEntered(const KURL&)));
+ connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(finishedLoading()),
+ TQT_SLOT(slotLoadingFinished()));
ops->setupMenu(KDirOperator::SortActions |
KDirOperator::FileActions |
@@ -925,14 +925,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KToggleAction *showSidebarAction =
new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar");
showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel"));
- connect( showSidebarAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleSpeedbar( bool )) );
+ connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleSpeedbar( bool )) );
KToggleAction *showBookmarksAction =
new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks");
showBookmarksAction->setCheckedState(i18n("Hide Bookmarks"));
- connect( showBookmarksAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleBookmarks( bool )) );
+ connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleBookmarks( bool )) );
KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" );
menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. "
@@ -960,8 +960,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
menu->insert( coll->action( "separate dirs" ));
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ),
- ops, SLOT( updateSelectionDependentActions() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ ops, TQT_SLOT( updateSelectionDependentActions() ));
menu->plug( toolbar );
//Insert a separator.
@@ -981,37 +981,37 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo->setCompletionObject( pathCompletionObj );
d->pathCombo->setAutoDeleteCompletionObject( true );
- connect( d->pathCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( enterURL( const KURL& ) ));
- connect( d->pathCombo, SIGNAL( returnPressed( const QString& )),
- this, SLOT( enterURL( const QString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( enterURL( const KURL& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( enterURL( const TQString& ) ));
- QString whatsThisText;
+ TQString whatsThisText;
// the Location label/edit
- d->locationLabel = new QLabel(i18n("&Location:"), d->mainWidget);
+ d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget);
locationEdit = new KURLComboBox(KURLComboBox::Files, true,
d->mainWidget, "LocationEdit");
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
updateLocationWhatsThis ();
d->locationLabel->setBuddy(locationEdit);
locationEdit->setFocus();
KURLCompletion *fileCompletionObj = new KURLCompletion( KURLCompletion::FileCompletion );
- QString dir = d->url.url(+1);
+ TQString dir = d->url.url(+1);
pathCompletionObj->setDir( dir );
fileCompletionObj->setDir( dir );
locationEdit->setCompletionObject( fileCompletionObj );
locationEdit->setAutoDeleteCompletionObject( true );
- connect( fileCompletionObj, SIGNAL( match( const QString& ) ),
- SLOT( fileCompletion( const QString& )) );
+ connect( fileCompletionObj, TQT_SIGNAL( match( const TQString& ) ),
+ TQT_SLOT( fileCompletion( const TQString& )) );
- connect( locationEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotOk()));
- connect(locationEdit, SIGNAL( activated( const QString& )),
- this, SLOT( locationActivated( const QString& ) ));
+ connect( locationEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotOk()));
+ connect(locationEdit, TQT_SIGNAL( activated( const TQString& )),
+ this, TQT_SLOT( locationActivated( const TQString& ) ));
// the Filter label/edit
whatsThisText = i18n("<qt>This is the filter to apply to the file list. "
@@ -1020,19 +1020,19 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
"drop down menu, or you may enter a custom filter "
"directly into the text area.<p>"
"Wildcards such as * and ? are allowed.</qt>");
- d->filterLabel = new QLabel(i18n("&Filter:"), d->mainWidget);
- QWhatsThis::add(d->filterLabel, whatsThisText);
+ d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget);
+ TQWhatsThis::add(d->filterLabel, whatsThisText);
filterWidget = new KFileFilterCombo(d->mainWidget,
"KFileDialog::filterwidget");
- QWhatsThis::add(filterWidget, whatsThisText);
+ TQWhatsThis::add(filterWidget, whatsThisText);
setFilter(filter);
d->filterLabel->setBuddy(filterWidget);
- connect(filterWidget, SIGNAL(filterChanged()), SLOT(slotFilterChanged()));
+ connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged()));
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
- d->autoSelectExtCheckBox = new QCheckBox (d->mainWidget);
- connect(d->autoSelectExtCheckBox, SIGNAL(clicked()), SLOT(slotAutoSelectExtClicked()));
+ d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget);
+ connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked()));
initGUI(); // activate GM
@@ -1049,8 +1049,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
void KFileDialog::initSpeedbar()
{
d->urlBar = new KFileSpeedBar( d->mainWidget, "url bar" );
- connect( d->urlBar, SIGNAL( activated( const KURL& )),
- SLOT( enterURL( const KURL& )) );
+ connect( d->urlBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( enterURL( const KURL& )) );
// need to set the current url of the urlbar manually (not via urlEntered()
// here, because the initial url of KDirOperator might be the same as the
@@ -1065,16 +1065,16 @@ void KFileDialog::initGUI()
{
delete d->boxLayout; // deletes all sub layouts
- d->boxLayout = new QVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
+ d->boxLayout = new TQVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
d->boxLayout->addWidget(toolbar, AlignTop);
- d->urlBarLayout = new QHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
- QVBoxLayout *vbox = new QVBoxLayout( d->urlBarLayout );
+ d->urlBarLayout = new TQHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
+ TQVBoxLayout *vbox = new TQVBoxLayout( d->urlBarLayout );
vbox->addWidget(ops, 4);
vbox->addSpacing(3);
- QGridLayout* lafBox= new QGridLayout(2, 3, KDialog::spacingHint());
+ TQGridLayout* lafBox= new TQGridLayout(2, 3, KDialog::spacingHint());
lafBox->addWidget(d->locationLabel, 0, 0, AlignVCenter);
lafBox->addWidget(locationEdit, 0, 1, AlignVCenter);
@@ -1107,7 +1107,7 @@ void KFileDialog::initGUI()
// ...add it to the dialog, below the filter list box.
// Change the parent so that this widget is a child of the main widget
- d->customWidget->reparent( d->mainWidget, QPoint() );
+ d->customWidget->reparent( d->mainWidget, TQPoint() );
vbox->addWidget( d->customWidget );
vbox->addSpacing(3);
@@ -1130,11 +1130,11 @@ void KFileDialog::initGUI()
void KFileDialog::slotFilterChanged()
{
- QString filter = filterWidget->currentFilter();
+ TQString filter = filterWidget->currentFilter();
ops->clearFilter();
if ( filter.find( '/' ) > -1 ) {
- QStringList types = QStringList::split( " ", filter );
+ TQStringList types = TQStringList::split( " ", filter );
types.prepend( "inode/directory" );
ops->setMimeFilter( types );
}
@@ -1151,15 +1151,15 @@ void KFileDialog::slotFilterChanged()
void KFileDialog::setURL(const KURL& url, bool clearforward)
{
- d->selection = QString::null;
+ d->selection = TQString::null;
ops->setURL( url, clearforward);
}
// Protected
void KFileDialog::urlEntered(const KURL& url)
{
- QString filename = locationEdit->currentText();
- d->selection = QString::null;
+ TQString filename = locationEdit->currentText();
+ d->selection = TQString::null;
if ( d->pathCombo->count() != 0 ) { // little hack
d->pathCombo->setURL( url );
@@ -1172,7 +1172,7 @@ void KFileDialog::urlEntered(const KURL& url)
locationEdit->blockSignals( false );
- QString dir = url.url(+1);
+ TQString dir = url.url(+1);
static_cast<KURLCompletion*>( d->pathCombo->completionObject() )->setDir( dir );
static_cast<KURLCompletion*>( locationEdit->completionObject() )->setDir( dir );
@@ -1180,7 +1180,7 @@ void KFileDialog::urlEntered(const KURL& url)
d->urlBar->setCurrentItem( url );
}
-void KFileDialog::locationActivated( const QString& url )
+void KFileDialog::locationActivated( const TQString& url )
{
// This guard prevents any URL _typed_ by the user from being interpreted
// twice (by returnPressed/slotOk and here, activated/locationActivated)
@@ -1196,7 +1196,7 @@ void KFileDialog::enterURL( const KURL& url)
setURL( url );
}
-void KFileDialog::enterURL( const QString& url )
+void KFileDialog::enterURL( const TQString& url )
{
setURL( KURL::fromPathOrURL( KURLCompletion::replacedPath( url, true, true )) );
}
@@ -1210,12 +1210,12 @@ void KFileDialog::toolbarCallback(int) // SLOT
}
-void KFileDialog::setSelection(const QString& url)
+void KFileDialog::setSelection(const TQString& url)
{
kdDebug(kfile_area) << "setSelection " << url << endl;
if (url.isEmpty()) {
- d->selection = QString::null;
+ d->selection = TQString::null;
return;
}
@@ -1235,7 +1235,7 @@ void KFileDialog::setSelection(const QString& url)
*/
KFileItem i(KFileItem::Unknown, KFileItem::Unknown, u, true );
// KFileItem i(u.path());
- if ( i.isDir() && u.isLocalFile() && QFile::exists( u.path() ) ) {
+ if ( i.isDir() && u.isLocalFile() && TQFile::exists( u.path() ) ) {
// trust isDir() only if the file is
// local (we cannot stat non-local urls) and if it exists!
// (as KFileItem does not check if the file exists or not
@@ -1243,13 +1243,13 @@ void KFileDialog::setSelection(const QString& url)
setURL(u, true);
}
else {
- QString filename = u.url();
+ TQString filename = u.url();
int sep = filename.findRev('/');
if (sep >= 0) { // there is a / in it
if ( KProtocolInfo::supportsListing( u )) {
KURL dir(u);
- dir.setQuery( QString::null );
- dir.setFileName( QString::null );
+ dir.setQuery( TQString::null );
+ dir.setFileName( TQString::null );
setURL(dir, true );
}
@@ -1282,13 +1282,13 @@ void KFileDialog::slotLoadingFinished()
}
// ### remove in KDE4
-void KFileDialog::pathComboChanged( const QString& )
+void KFileDialog::pathComboChanged( const TQString& )
{
}
-void KFileDialog::dirCompletion( const QString& ) // SLOT
+void KFileDialog::dirCompletion( const TQString& ) // SLOT
{
}
-void KFileDialog::fileCompletion( const QString& match )
+void KFileDialog::fileCompletion( const TQString& match )
{
if ( match.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1296,7 +1296,7 @@ void KFileDialog::fileCompletion( const QString& match )
ops->setCurrentItem( match );
}
-void KFileDialog::slotLocationChanged( const QString& text )
+void KFileDialog::slotLocationChanged( const TQString& text )
{
if ( text.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1309,9 +1309,9 @@ void KFileDialog::updateStatusLine(int /* dirs */, int /* files */)
kdWarning() << "KFileDialog::updateStatusLine is deprecated! The status line no longer exists. Do not try and use it!" << endl;
}
-QString KFileDialog::getOpenFileName(const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+TQString KFileDialog::getOpenFileName(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1325,11 +1325,11 @@ QString KFileDialog::getOpenFileName(const QString& startDir,
return dlg.selectedFile();
}
-QString KFileDialog::getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption)
+TQString KFileDialog::getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
@@ -1349,10 +1349,10 @@ QString KFileDialog::getOpenFileNameWId(const QString& startDir,
return dlg.selectedFile();
}
-QStringList KFileDialog::getOpenFileNames(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQStringList KFileDialog::getOpenFileNames(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1365,8 +1365,8 @@ QStringList KFileDialog::getOpenFileNames(const QString& startDir,
return dlg.selectedFiles();
}
-KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getOpenURL(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1379,10 +1379,10 @@ KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
return dlg.selectedURL();
}
-KURL::List KFileDialog::getOpenURLs(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KURL::List KFileDialog::getOpenURLs(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1395,19 +1395,19 @@ KURL::List KFileDialog::getOpenURLs(const QString& startDir,
return dlg.selectedURLs();
}
-KURL KFileDialog::getExistingURL(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getExistingURL(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
return KDirSelectDialog::selectDirectory(startDir, false, parent, caption);
}
-QString KFileDialog::getExistingDirectory(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getExistingDirectory(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
#ifdef Q_WS_WIN
- return QFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
+ return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
caption, true, true);
#else
KURL url = KDirSelectDialog::selectDirectory(startDir, true, parent,
@@ -1415,14 +1415,14 @@ QString KFileDialog::getExistingDirectory(const QString& startDir,
if ( url.isValid() )
return url.path();
- return QString::null;
+ return TQString::null;
#endif
}
-KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getImageOpenURL( const TQString& startDir, TQWidget *parent,
+ const TQString& caption)
{
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
KFileDialog dlg(startDir,
mimetypes.join(" "),
parent, "filedialog", true);
@@ -1439,7 +1439,7 @@ KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
KURL KFileDialog::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return d->url;
else
return KURL();
@@ -1448,7 +1448,7 @@ KURL KFileDialog::selectedURL() const
KURL::List KFileDialog::selectedURLs() const
{
KURL::List list;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files )
list = parseSelectedURLs();
else
@@ -1466,7 +1466,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const
d->urlList.clear();
if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename
- static const QString &prot = KGlobal::staticQString(":/");
+ static const TQString &prot = KGlobal::staticQString(":/");
KURL u;
if ( d->filenames.find( prot ) != -1 )
u = d->filenames;
@@ -1485,18 +1485,18 @@ KURL::List& KFileDialog::parseSelectedURLs() const
else
d->urlList = tokenize( d->filenames );
- d->filenames = QString::null; // indicate that we parsed that one
+ d->filenames = TQString::null; // indicate that we parsed that one
return d->urlList;
}
// FIXME: current implementation drawback: a filename can't contain quotes
-KURL::List KFileDialog::tokenize( const QString& line ) const
+KURL::List KFileDialog::tokenize( const TQString& line ) const
{
KURL::List urls;
KURL u( ops->url() );
- QString name;
+ TQString name;
int count = line.contains( '"' );
if ( count == 0 ) { // no " " -> assume one single file
@@ -1508,7 +1508,7 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
if ( (count % 2) == 1 ) { // odd number of " -> error
- QWidget *that = const_cast<KFileDialog *>(this);
+ TQWidget *that = const_cast<KFileDialog *>(this);
KMessageBox::sorry(that, i18n("The requested filenames\n"
"%1\n"
"do not appear to be valid;\n"
@@ -1538,9 +1538,9 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
-QString KFileDialog::selectedFile() const
+TQString KFileDialog::selectedFile() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
{
KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget());
if (url.isLocalFile())
@@ -1551,18 +1551,18 @@ QString KFileDialog::selectedFile() const
i18n("Remote Files Not Accepted") );
}
}
- return QString::null;
+ return TQString::null;
}
-QStringList KFileDialog::selectedFiles() const
+TQStringList KFileDialog::selectedFiles() const
{
- QStringList list;
+ TQStringList list;
KURL url;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files ) {
KURL::List urls = parseSelectedURLs();
- QValueListConstIterator<KURL> it = urls.begin();
+ TQValueListConstIterator<KURL> it = urls.begin();
while ( it != urls.end() ) {
url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget());
if ( url.isLocalFile() )
@@ -1585,12 +1585,12 @@ KURL KFileDialog::baseURL() const
return ops->url();
}
-QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1599,20 +1599,20 @@ QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filter,
+TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption)
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- QWidget* parent = QWidget::find( parent_id );
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ TQWidget* parent = TQWidget::find( parent_id );
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
XSetTransientForHint(qt_xdisplay(), dlg.winId(), parent_id);
@@ -1628,18 +1628,18 @@ QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filte
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-KURL KFileDialog::getSaveURL(const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg(specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1690,12 +1690,12 @@ KFile::Mode KFileDialog::mode() const
}
-void KFileDialog::readConfig( KConfig *kc, const QString& group )
+void KFileDialog::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1736,17 +1736,17 @@ void KFileDialog::readConfig( KConfig *kc, const QString& group )
if (w1 < w2)
setMinimumWidth(w2);
- QSize size = configDialogSize( group );
+ TQSize size = configDialogSize( group );
resize( size );
kc->setGroup( oldGroup );
}
-void KFileDialog::writeConfig( KConfig *kc, const QString& group )
+void KFileDialog::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1765,14 +1765,14 @@ void KFileDialog::writeConfig( KConfig *kc, const QString& group )
void KFileDialog::readRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
locationEdit->setMaxItems( kc->readNumEntry( RecentFilesNumber,
DefaultRecentURLsNumber ) );
locationEdit->setURLs( kc->readPathListEntry( RecentFiles ),
KURLComboBox::RemoveBottom );
- locationEdit->insertItem( QString::null, 0 ); // dummy item without pixmap
+ locationEdit->insertItem( TQString::null, 0 ); // dummy item without pixmap
locationEdit->setCurrentItem( 0 );
kc->setGroup( oldGroup );
@@ -1780,7 +1780,7 @@ void KFileDialog::readRecentFiles( KConfig *kc )
void KFileDialog::saveRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
kc->writePathEntry( RecentFiles, locationEdit->urls() );
@@ -1858,13 +1858,13 @@ void KFileDialog::slotAutoSelectExtClicked()
updateLocationEditExtension (d->extension /* extension hasn't changed */);
}
-static QString getExtensionFromPatternList (const QStringList &patternList)
+static TQString getExtensionFromPatternList (const TQStringList &patternList)
{
- QString ret;
+ TQString ret;
kdDebug (kfile_area) << "\tgetExtension " << patternList << endl;
- QStringList::ConstIterator patternListEnd = patternList.end ();
- for (QStringList::ConstIterator it = patternList.begin ();
+ TQStringList::ConstIterator patternListEnd = patternList.end ();
+ for (TQStringList::ConstIterator it = patternList.begin ();
it != patternListEnd;
it++)
{
@@ -1889,9 +1889,9 @@ static QString getExtensionFromPatternList (const QStringList &patternList)
return ret;
}
-static QString stripUndisplayable (const QString &string)
+static TQString stripUndisplayable (const TQString &string)
{
- QString ret = string;
+ TQString ret = string;
ret.remove (':');
ret.remove ('&');
@@ -1900,7 +1900,7 @@ static QString stripUndisplayable (const QString &string)
}
-QString KFileDialog::currentFilterExtension (void)
+TQString KFileDialog::currentFilterExtension (void)
{
return d->extension;
}
@@ -1917,8 +1917,8 @@ void KFileDialog::updateAutoSelectExtension (void)
//
kdDebug (kfile_area) << "Figure out an extension: " << endl;
- QString lastExtension = d->extension;
- d->extension = QString::null;
+ TQString lastExtension = d->extension;
+ d->extension = TQString::null;
// Automatically Select Extension is only valid if the user is _saving_ a _file_
if ((operationMode () == Saving) && (mode () & KFile::File))
@@ -1927,13 +1927,13 @@ void KFileDialog::updateAutoSelectExtension (void)
// Get an extension from the filter
//
- QString filter = currentFilter ();
+ TQString filter = currentFilter ();
if (!filter.isEmpty ())
{
// e.g. "*.cpp"
if (filter.find ('/') < 0)
{
- d->extension = getExtensionFromPatternList (QStringList::split (" ", filter)).lower ();
+ d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower ();
kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'"
<< d->extension << "\'" << endl;
}
@@ -1943,7 +1943,7 @@ void KFileDialog::updateAutoSelectExtension (void)
KMimeType::Ptr mime = KMimeType::mimeType (filter);
// first try X-KDE-NativeExtension
- QString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
+ TQString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
if (nativeExtension.at (0) == '.')
{
d->extension = nativeExtension.lower ();
@@ -1966,7 +1966,7 @@ void KFileDialog::updateAutoSelectExtension (void)
// GUI: checkbox
//
- QString whatsThisExtension;
+ TQString whatsThisExtension;
if (!d->extension.isEmpty ())
{
// remember: sync any changes to the string with below
@@ -1986,9 +1986,9 @@ void KFileDialog::updateAutoSelectExtension (void)
d->autoSelectExtCheckBox->setEnabled (false);
}
- const QString locationLabelText = stripUndisplayable (d->locationLabel->text ());
- const QString filterLabelText = stripUndisplayable (d->filterLabel->text ());
- QWhatsThis::add (d->autoSelectExtCheckBox,
+ const TQString locationLabelText = stripUndisplayable (d->locationLabel->text ());
+ const TQString filterLabelText = stripUndisplayable (d->filterLabel->text ());
+ TQWhatsThis::add (d->autoSelectExtCheckBox,
"<qt>" +
i18n (
"This option enables some convenient features for "
@@ -2038,12 +2038,12 @@ void KFileDialog::updateAutoSelectExtension (void)
// Updates the extension of the filename specified in locationEdit if the
// Automatically Select Extension feature is enabled.
// (this prevents you from accidently saving "file.kwd" as RTF, for example)
-void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
+void KFileDialog::updateLocationEditExtension (const TQString &lastExtension)
{
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString urlStr = locationEdit->currentText ();
+ TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2051,7 +2051,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl;
const int fileNameOffset = urlStr.findRev ('/') + 1;
- QString fileName = urlStr.mid (fileNameOffset);
+ TQString fileName = urlStr.mid (fileNameOffset);
const int dot = fileName.findRev ('.');
const int len = fileName.length ();
@@ -2088,7 +2088,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
fileName.truncate (dot);
// add extension
- const QString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
+ const TQString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
if ( newText != locationEdit->currentText() )
{
locationEdit->setCurrentText (urlStr.left (fileNameOffset) + fileName + d->extension);
@@ -2102,7 +2102,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
void KFileDialog::updateFilter ()
{
if ((operationMode() == Saving) && (mode() & KFile::File) ) {
- const QString urlStr = locationEdit->currentText ();
+ const TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2122,7 +2122,7 @@ void KFileDialog::appendExtension (KURL &url)
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString fileName = url.fileName ();
+ TQString fileName = url.fileName ();
if (fileName.isEmpty ())
return;
@@ -2178,8 +2178,8 @@ void KFileDialog::addToRecentDocuments()
int m = ops->mode();
if ( m & KFile::LocalOnly ) {
- QStringList files = selectedFiles();
- QStringList::ConstIterator it = files.begin();
+ TQStringList files = selectedFiles();
+ TQStringList::ConstIterator it = files.begin();
for ( ; it != files.end(); ++it )
KRecentDocument::add( *it );
}
@@ -2199,7 +2199,7 @@ KActionCollection * KFileDialog::actionCollection() const
return ops->actionCollection();
}
-void KFileDialog::keyPressEvent( QKeyEvent *e )
+void KFileDialog::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape )
{
@@ -2222,7 +2222,7 @@ void KFileDialog::toggleSpeedbar( bool show )
// check to see if they have a home item defined, if not show the home button
KURLBarItem *urlItem = static_cast<KURLBarItem*>( d->urlBar->listBox()->firstItem() );
KURL homeURL;
- homeURL.setPath( QDir::homeDirPath() );
+ homeURL.setPath( TQDir::homeDirPath() );
while ( urlItem )
{
if ( homeURL.equals( urlItem->url(), true ) )
@@ -2256,15 +2256,15 @@ void KFileDialog::toggleBookmarks(bool show)
}
d->bookmarkHandler = new KFileBookmarkHandler( this );
- connect( d->bookmarkHandler, SIGNAL( openURL( const QString& )),
- SLOT( enterURL( const QString& )));
+ connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ TQT_SLOT( enterURL( const TQString& )));
- toolbar->insertButton(QString::fromLatin1("bookmark"),
+ toolbar->insertButton(TQString::fromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"), 5);
toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(),
true);
- QWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
+ TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
i18n("<qt>This button allows you to bookmark specific locations. "
"Click on this button to open the bookmark menu where you may add, "
"edit or select a bookmark.<p>"
@@ -2296,12 +2296,12 @@ void KFileDialog::initStatic()
}
// static
-KURL KFileDialog::getStartURL( const QString& startDir,
- QString& recentDirClass )
+KURL KFileDialog::getStartURL( const TQString& startDir,
+ TQString& recentDirClass )
{
initStatic();
- recentDirClass = QString::null;
+ recentDirClass = TQString::null;
KURL ret;
bool useDefaultStartDir = startDir.isEmpty();
@@ -2314,7 +2314,7 @@ KURL KFileDialog::getStartURL( const QString& startDir,
}
else
{
- ret = KCmdLineArgs::makeURL( QFile::encodeName(startDir) );
+ ret = KCmdLineArgs::makeURL( TQFile::encodeName(startDir) );
// If we won't be able to list it (e.g. http), then use default
if ( !KProtocolInfo::supportsListing( ret ) )
useDefaultStartDir = true;
@@ -2326,15 +2326,15 @@ KURL KFileDialog::getStartURL( const QString& startDir,
if (lastDirectory->isEmpty()) {
lastDirectory->setPath(KGlobalSettings::documentPath());
KURL home;
- home.setPath( QDir::homeDirPath() );
+ home.setPath( TQDir::homeDirPath() );
// if there is no docpath set (== home dir), we prefer the current
// directory over it. We also prefer the homedir when our CWD is
// different from our homedirectory or when the document dir
// does not exist
if ( lastDirectory->path(+1) == home.path(+1) ||
- QDir::currentDirPath() != QDir::homeDirPath() ||
- !QDir(lastDirectory->path(+1)).exists() )
- lastDirectory->setPath(QDir::currentDirPath());
+ TQDir::currentDirPath() != TQDir::homeDirPath() ||
+ !TQDir(lastDirectory->path(+1)).exists() )
+ lastDirectory->setPath(TQDir::currentDirPath());
}
ret = *lastDirectory;
}
@@ -2352,7 +2352,7 @@ void KFileDialog::setStartDir( const KURL& directory )
void KFileDialog::setNonExtSelection()
{
// Enhanced rename: Don't highlight the file extension.
- QString pattern, filename = locationEdit->currentText().stripWhiteSpace();
+ TQString pattern, filename = locationEdit->currentText().stripWhiteSpace();
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 )
diff --git a/kio/kfile/kfiledialog.h b/kio/kfile/kfiledialog.h
index e90338608..b2db9183a 100644
--- a/kio/kfile/kfiledialog.h
+++ b/kio/kfile/kfiledialog.h
@@ -25,7 +25,7 @@
#ifndef __KFILEDIALOG_H__
#define __KFILEDIALOG_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
#include <kfile.h>
@@ -58,7 +58,7 @@ struct KFileDialogPrivate;
* select files and directories.
*
* The widget can be used as a drop in replacement for the
- * QFileDialog widget, but has greater functionality and a nicer GUI.
+ * TQFileDialog widget, but has greater functionality and a nicer GUI.
*
* You will usually want to use one of the static methods
* getOpenFileName(), getSaveFileName(), getOpenURL()
@@ -98,7 +98,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -116,15 +116,15 @@ public:
* See setFilter() for details on how to use this argument.
*
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
bool modal);
/**
* Constructs a file dialog.
*
* The parameters here are identical to the first constructor except
- * for the addition of a QWidget parameter.
+ * for the addition of a TQWidget parameter.
*
* Historical note: The original version of KFileDialog did not have this extra
* parameter. It was added later, and, in order to maintain binary compatibility,
@@ -132,7 +132,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -156,9 +156,9 @@ public:
* @param modal Whether to create a modal dialog or not
* @since 3.1
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
- bool modal, QWidget* widget);
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
+ bool modal, TQWidget* widget);
/**
@@ -185,12 +185,12 @@ public:
* Returns the full path of the selected file in the local filesystem.
* (Local files only)
*/
- QString selectedFile() const;
+ TQString selectedFile() const;
/**
* Returns a list of all selected local files.
*/
- QStringList selectedFiles() const;
+ TQStringList selectedFiles() const;
/**
* Sets the directory to view.
@@ -206,7 +206,7 @@ public:
*
* This takes absolute URLs and relative file names.
*/
- void setSelection(const QString& name);
+ void setSelection(const TQString& name);
/**
* Sets the operational mode of the filedialog to @p Saving, @p Opening
@@ -289,7 +289,7 @@ public:
* @see filterChanged
* @see setMimeFilter
*/
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* Returns the current filter as entered by the user or one of the
@@ -298,7 +298,7 @@ public:
* @see setFilter()
* @see filterChanged()
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the filter up to specify the output type.
@@ -310,7 +310,7 @@ public:
* Do not use in conjunction with setFilter()
* @deprecated
*/
- void setFilterMimeType(const QString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
+ void setFilterMimeType(const TQString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
/**
* Returns the mimetype for the desired output format.
@@ -333,8 +333,8 @@ public:
*
* Do not use in conjunction with setFilter()
*/
- void setMimeFilter( const QStringList& types,
- const QString& defaultType = QString::null );
+ void setMimeFilter( const TQStringList& types,
+ const TQString& defaultType = TQString::null );
/**
* The mimetype for the desired output format.
@@ -344,7 +344,7 @@ public:
*
* @see setMimeFilter()
*/
- QString currentMimeFilter() const;
+ TQString currentMimeFilter() const;
/**
* Clears any mime- or namefilter. Does not reload the directory.
@@ -357,7 +357,7 @@ public:
*
* In this mode
* the dialog is split and the right part contains your widget.
- * This widget has to inherit QWidget and it has to implement
+ * This widget has to inherit TQWidget and it has to implement
* a slot showPreview(const KURL &); which is called
* every time the file changes. You may want to look at
* koffice/lib/kofficecore/koFilterManager.cc for some hints :)
@@ -365,7 +365,7 @@ public:
* Ownership is transferred to KFileDialog. You need to create the
* preview-widget with "new", i.e. on the heap.
*/
- void setPreviewWidget(const QWidget *w) KDE_DEPRECATED;
+ void setPreviewWidget(const TQWidget *w) KDE_DEPRECATED;
/**
* Adds a preview widget and enters the preview mode.
@@ -389,7 +389,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -405,23 +405,23 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getOpenFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getOpenFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
- * Use this version only if you have no QWidget available as
+ * Use this version only if you have no TQWidget available as
* parent widget. This can be the case if the parent widget is
* a widget in another process or if the parent widget is a
* non-Qt widget. For example, in a GTK program.
*
* @since 3.4
*/
- static QString getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption);
+ static TQString getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -432,7 +432,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -448,10 +448,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QStringList getOpenFileNames(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static TQStringList getOpenFileNames(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -464,7 +464,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -480,10 +480,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getOpenURL(const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getOpenURL(const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -496,7 +496,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -512,10 +512,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL::List getOpenURLs(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static KURL::List getOpenURLs(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -530,7 +530,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -546,20 +546,20 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getSaveFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getSaveFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.4
*/
- static QString getSaveFileNameWId(const QString& dir, const QString& filter,
+ static TQString getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption);
+ const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -572,7 +572,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -588,10 +588,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getSaveURL(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getSaveURL(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -600,7 +600,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -612,9 +612,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getExistingDirectory(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static TQString getExistingDirectory(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected
@@ -625,7 +625,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -638,16 +638,16 @@ public:
* @param caption The name of the dialog widget.
* @since 3.1
*/
- static KURL getExistingURL(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static KURL getExistingURL(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog with an image previewer and returns the
* selected url or an empty string if none was chosen.
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -659,9 +659,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getImageOpenURL( const QString& startDir = QString::null,
- QWidget *parent = 0,
- const QString& caption = QString::null );
+ static KURL getImageOpenURL( const TQString& startDir = TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption = TQString::null );
virtual void show();
/**
@@ -705,7 +705,7 @@ public:
* Most useful if you want to make clear what
* the location is used for.
*/
- void setLocationLabel(const QString& text);
+ void setLocationLabel(const TQString& text);
/**
* Returns a pointer to the toolbar.
@@ -714,7 +714,7 @@ public:
* items into it, e.g.:
* \code
* yourAction = new KAction( i18n("Your Action"), 0,
- * this, SLOT( yourSlot() ),
+ * this, TQT_SLOT( yourSlot() ),
* this, "action name" );
* yourAction->plug( kfileDialog->toolBar() );
* \endcode
@@ -774,7 +774,7 @@ public:
* KDirSelectDialog).
* @since 3.1
*/
- static KURL getStartURL( const QString& startDir, QString& recentDirClass );
+ static KURL getStartURL( const TQString& startDir, TQString& recentDirClass );
/**
* @internal
@@ -790,12 +790,12 @@ signals:
* and call selectedFile(), selectedFiles(),
* selectedURL() or selectedURLs().
*/
- void fileSelected(const QString&);
+ void fileSelected(const TQString&);
/**
* Emitted when the user highlights a file.
*/
- void fileHighlighted(const QString&);
+ void fileHighlighted(const TQString&);
/**
* Emitted when the user hilights one or more files in multiselection mode.
@@ -817,7 +817,7 @@ signals:
* @see setFilter()
* @see currentFilter()
*/
- void filterChanged( const QString& filter );
+ void filterChanged( const TQString& filter );
protected:
KToolBar *toolbar;
@@ -831,13 +831,13 @@ protected:
/**
* Reimplemented to animate the cancel button.
*/
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/**
* Perform basic initialization tasks. Called by constructors.
* @since 3.1
*/
- void init(const QString& startDir, const QString& filter, QWidget* widget);
+ void init(const TQString& startDir, const TQString& filter, TQWidget* widget);
/**
* rebuild geometry management.
@@ -854,12 +854,12 @@ protected:
/**
* Reads configuration and applies it (size, recent directories, ...)
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current configuration
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
* Reads the recent used files and inserts them into the location combobox
@@ -877,21 +877,21 @@ protected:
* an empty list will be returned. Otherwise, all items enclosed in " "
* will be returned as correct urls.
*/
- KURL::List tokenize(const QString& line) const;
+ KURL::List tokenize(const TQString& line) const;
/**
* Returns the absolute version of the URL specified in locationEdit.
* @since 3.2
*/
- KURL getCompleteURL(const QString&);
+ KURL getCompleteURL(const TQString&);
/**
* Returns the filename extension associated with the currentFilter().
- * QString::null is returned if an extension is not available or if
+ * TQString::null is returned if an extension is not available or if
* operationMode() != Saving.
* @since 3.2
*/
- QString currentFilterExtension();
+ TQString currentFilterExtension();
/**
* Updates the currentFilterExtension and the availability of the
@@ -907,8 +907,8 @@ protected:
protected slots:
void urlEntered( const KURL& );
void enterURL( const KURL& url );
- void enterURL( const QString& url );
- void locationActivated( const QString& url );
+ void enterURL( const TQString& url );
+ void locationActivated( const TQString& url );
/**
* @deprecated,
@@ -919,12 +919,12 @@ protected slots:
* @deprecated
*/
// ### remove in KDE4
- void pathComboChanged( const QString& );
+ void pathComboChanged( const TQString& );
/**
* @deprecated
*/
// ### remove in KDE4
- void dirCompletion( const QString& );
+ void dirCompletion( const TQString& );
void slotFilterChanged();
void fileHighlighted(const KFileItem *i);
@@ -932,7 +932,7 @@ protected slots:
void slotStatResult(KIO::Job* job);
void slotLoadingFinished();
- void fileCompletion( const QString& );
+ void fileCompletion( const TQString& );
/**
* @since 3.1
*/
@@ -957,17 +957,17 @@ protected slots:
void initSpeedbar();
private slots:
- void slotLocationChanged( const QString& text );
+ void slotLocationChanged( const TQString& text );
private:
KFileDialog(const KFileDialog&);
KFileDialog operator=(const KFileDialog&);
- void setLocationText( const QString& text );
+ void setLocationText( const TQString& text );
void updateLocationWhatsThis();
void appendExtension(KURL &url);
- void updateLocationEditExtension(const QString &);
+ void updateLocationEditExtension(const TQString &);
void updateFilter();
static void initStatic();
diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp
index 747a738fe..c865cc0e1 100644
--- a/kio/kfile/kfilefiltercombo.cpp
+++ b/kio/kfile/kfilefiltercombo.cpp
@@ -40,18 +40,18 @@ public:
bool hasAllSupportedFiles;
// true when setMimeFilter was called
bool isMimeFilter;
- QString lastFilter;
- QString defaultFilter;
+ TQString lastFilter;
+ TQString defaultFilter;
};
-KFileFilterCombo::KFileFilterCombo( QWidget *parent, const char *name)
+KFileFilterCombo::KFileFilterCombo( TQWidget *parent, const char *name)
: KComboBox(true, parent, name), d( new KFileFilterComboPrivate )
{
setTrapReturnKey( true );
setInsertionPolicy(NoInsertion);
- connect( this, SIGNAL( activated( int )), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( returnPressed() ), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( filterChanged() ), SLOT( slotFilterChanged() ));
+ connect( this, TQT_SIGNAL( activated( int )), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( returnPressed() ), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( filterChanged() ), TQT_SLOT( slotFilterChanged() ));
m_allTypes = false;
}
@@ -60,14 +60,14 @@ KFileFilterCombo::~KFileFilterCombo()
delete d;
}
-void KFileFilterCombo::setFilter(const QString& filter)
+void KFileFilterCombo::setFilter(const TQString& filter)
{
clear();
filters.clear();
d->hasAllSupportedFiles = false;
if (!filter.isEmpty()) {
- QString tmp = filter;
+ TQString tmp = filter;
int index = tmp.find('\n');
while (index > 0) {
filters.append(tmp.left(index));
@@ -79,8 +79,8 @@ void KFileFilterCombo::setFilter(const QString& filter)
else
filters.append( d->defaultFilter );
- QStringList::ConstIterator it;
- QStringList::ConstIterator end(filters.end());
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator end(filters.end());
for (it = filters.begin(); it != end; ++it) {
int tab = (*it).find('|');
insertItem((tab < 0) ? *it :
@@ -91,9 +91,9 @@ void KFileFilterCombo::setFilter(const QString& filter)
d->isMimeFilter = false;
}
-QString KFileFilterCombo::currentFilter() const
+TQString KFileFilterCombo::currentFilter() const
{
- QString f = currentText();
+ TQString f = currentText();
if (f == text(currentItem())) { // user didn't edit the text
f = *filters.at(currentItem());
if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) {
@@ -108,10 +108,10 @@ QString KFileFilterCombo::currentFilter() const
return f.left(tab);
}
-void KFileFilterCombo::setCurrentFilter( const QString& filter )
+void KFileFilterCombo::setCurrentFilter( const TQString& filter )
{
int pos = 0;
- for( QStringList::ConstIterator it = filters.begin();
+ for( TQStringList::ConstIterator it = filters.begin();
it != filters.end();
++it, ++pos ) {
if( *it == filter ) {
@@ -124,19 +124,19 @@ void KFileFilterCombo::setCurrentFilter( const QString& filter )
filterChanged();
}
-void KFileFilterCombo::setMimeFilter( const QStringList& types,
- const QString& defaultType )
+void KFileFilterCombo::setMimeFilter( const TQStringList& types,
+ const TQString& defaultType )
{
clear();
filters.clear();
- QString delim = QString::fromLatin1(", ");
+ TQString delim = TQString::fromLatin1(", ");
d->hasAllSupportedFiles = false;
m_allTypes = defaultType.isEmpty() && (types.count() > 1);
- QString allComments, allTypes;
+ TQString allComments, allTypes;
int i = 0;
- for(QStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
+ for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
{
if ( m_allTypes && it != types.begin() ) {
allComments += delim;
@@ -177,9 +177,9 @@ void KFileFilterCombo::slotFilterChanged()
d->lastFilter = currentText();
}
-bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
+bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == lineEdit() && e->type() == QEvent::FocusOut ) {
+ if ( o == lineEdit() && e->type() == TQEvent::FocusOut ) {
if ( currentText() != d->lastFilter )
emit filterChanged();
}
@@ -187,12 +187,12 @@ bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
return KComboBox::eventFilter( o, e );
}
-void KFileFilterCombo::setDefaultFilter( const QString& filter )
+void KFileFilterCombo::setDefaultFilter( const TQString& filter )
{
d->defaultFilter = filter;
}
-QString KFileFilterCombo::defaultFilter() const
+TQString KFileFilterCombo::defaultFilter() const
{
return d->defaultFilter;
}
diff --git a/kio/kfile/kfilefiltercombo.h b/kio/kfile/kfilefiltercombo.h
index 9b7c103bf..d1f9cbf62 100644
--- a/kio/kfile/kfilefiltercombo.h
+++ b/kio/kfile/kfilefiltercombo.h
@@ -20,8 +20,8 @@
#ifndef KFILEFILTERCOMBO_H
#define KFILEFILTERCOMBO_H
-#include <qstringlist.h>
-#include <qptrdict.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
#include <kcombobox.h>
#include <kmimetype.h>
@@ -33,31 +33,31 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
Q_OBJECT
public:
- KFileFilterCombo(QWidget *parent= 0, const char *name= 0);
+ KFileFilterCombo(TQWidget *parent= 0, const char *name= 0);
~KFileFilterCombo();
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* @returns the current filter, either something like "*.cpp *.h"
* or the current mimetype, like "text/html", or a list of those, like
" "text/html text/plain image/png", all separated with one space.
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the current filter. Filter must match one of the filter items
* passed before to this widget.
* @since 3.4
*/
- void setCurrentFilter( const QString& filter );
+ void setCurrentFilter( const TQString& filter );
/**
* Sets a list of mimetypes.
* If @p defaultType is set, it will be set as the current item.
* Otherwise, a first item showing all the mimetypes will be created.
*/
- void setMimeFilter( const QStringList& types, const QString& defaultType );
+ void setMimeFilter( const TQStringList& types, const TQString& defaultType );
/**
* @return true if the filter's first item is the list of all mimetypes
@@ -72,19 +72,19 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
* By default, this is set to i18n("*|All Files")
* @see defaultFilter
*/
- void setDefaultFilter( const QString& filter );
+ void setDefaultFilter( const TQString& filter );
/**
* @return the default filter, used when an empty filter is set.
* @see setDefaultFilter
*/
- QString defaultFilter() const;
+ TQString defaultFilter() const;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// KDE4: those variables are private. filters() was added
- QStringList filters;
+ TQStringList filters;
bool m_allTypes;
signals:
diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp
index 0668e91e2..4f0dbf9e1 100644
--- a/kio/kfile/kfileiconview.cpp
+++ b/kio/kfile/kfileiconview.cpp
@@ -19,14 +19,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h>
#include <kapplication.h>
@@ -60,37 +60,37 @@ public:
noArrangement = false;
ignoreMaximumSize = false;
smallColumns = new KRadioAction( i18n("Small Icons"), 0, parent,
- SLOT( slotSmallColumns() ),
+ TQT_SLOT( slotSmallColumns() ),
parent->actionCollection(),
"small columns" );
largeRows = new KRadioAction( i18n("Large Icons"), 0, parent,
- SLOT( slotLargeRows() ),
+ TQT_SLOT( slotLargeRows() ),
parent->actionCollection(),
"large rows" );
- smallColumns->setExclusiveGroup(QString::fromLatin1("IconView mode"));
- largeRows->setExclusiveGroup(QString::fromLatin1("IconView mode"));
+ smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
+ largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
previews = new KToggleAction( i18n("Thumbnail Previews"), 0,
parent->actionCollection(),
"show previews" );
- zoomIn = KStdAction::zoomIn( parent, SLOT( zoomIn() ),
+ zoomIn = KStdAction::zoomIn( parent, TQT_SLOT( zoomIn() ),
parent->actionCollection(), "zoomIn" );
- zoomOut = KStdAction::zoomOut( parent, SLOT( zoomOut() ),
+ zoomOut = KStdAction::zoomOut( parent, TQT_SLOT( zoomOut() ),
parent->actionCollection(), "zoomOut" );
previews->setGroup("previews");
zoomIn->setGroup("previews");
zoomOut->setGroup("previews");
- connect( previews, SIGNAL( toggled( bool )),
- parent, SLOT( slotPreviewsToggled( bool )));
+ connect( previews, TQT_SIGNAL( toggled( bool )),
+ parent, TQT_SLOT( slotPreviewsToggled( bool )));
- connect( &previewTimer, SIGNAL( timeout() ),
- parent, SLOT( showPreviews() ));
- connect( &autoOpenTimer, SIGNAL( timeout() ),
- parent, SLOT( slotAutoOpen() ));
+ connect( &previewTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( showPreviews() ));
+ connect( &autoOpenTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( slotAutoOpen() ));
}
~KFileIconViewPrivate() {
@@ -103,15 +103,15 @@ public:
KToggleAction *previews;
KIO::PreviewJob *job;
KFileIconViewItem *dropItem;
- QTimer previewTimer;
- QTimer autoOpenTimer;
- QStringList previewMimeTypes;
+ TQTimer previewTimer;
+ TQTimer autoOpenTimer;
+ TQStringList previewMimeTypes;
int previewIconSize;
bool noArrangement :1;
bool ignoreMaximumSize :1;
};
-KFileIconView::KFileIconView(QWidget *parent, const char *name)
+KFileIconView::KFileIconView(TQWidget *parent, const char *name)
: KIconView(parent, name), KFileView()
{
d = new KFileIconViewPrivate( this );
@@ -127,51 +127,51 @@ KFileIconView::KFileIconView(QWidget *parent, const char *name)
setItemsMovable( false );
setMode( KIconView::Select );
KIconView::setSorting( true );
- // as long as QIconView only shows tooltips when the cursor is over the
+ // as long as TQIconView only shows tooltips when the cursor is over the
// icon (and not the text), we have to create our own tooltips
setShowToolTips( false );
slotSmallColumns();
d->smallColumns->setChecked( true );
- connect( this, SIGNAL( returnPressed(QIconViewItem *) ),
- SLOT( slotActivate( QIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQIconViewItem *) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
// we want single click _and_ double click (as convenience)
- connect( this, SIGNAL( clicked(QIconViewItem *, const QPoint&) ),
- SLOT( selected( QIconViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QIconViewItem *, const QPoint&) ),
- SLOT( slotActivate( QIconViewItem *) ) );
-
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- SLOT( showToolTip( QIconViewItem * ) ) );
- connect( this, SIGNAL( onViewport() ),
- SLOT( removeToolTip() ) );
- connect( this, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&)),
- SLOT( slotActivateMenu( QIconViewItem*, const QPoint& ) ) );
+ connect( this, TQT_SIGNAL( clicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( selected( TQIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
+
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ TQT_SLOT( showToolTip( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ TQT_SLOT( removeToolTip() ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*,const TQPoint&)),
+ TQT_SLOT( slotActivateMenu( TQIconViewItem*, const TQPoint& ) ) );
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
viewport()->installEventFilter( this );
@@ -186,11 +186,11 @@ KFileIconView::~KFileIconView()
delete d;
}
-void KFileIconView::readConfig( KConfig *kc, const QString& group )
+void KFileIconView::readConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString small = QString::fromLatin1("SmallColumns");
+ TQString small = TQString::fromLatin1("SmallColumns");
d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE );
d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) );
@@ -207,14 +207,14 @@ void KFileIconView::readConfig( KConfig *kc, const QString& group )
showPreviews();
}
-void KFileIconView::writeConfig( KConfig *kc, const QString& group )
+void KFileIconView::writeConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString viewMode = d->smallColumns->isChecked() ?
- QString::fromLatin1("SmallColumns") :
- QString::fromLatin1("LargeRows");
+ TQString viewMode = d->smallColumns->isChecked() ?
+ TQString::fromLatin1("SmallColumns") :
+ TQString::fromLatin1("LargeRows");
if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE )
kc->revertToDefault( "ViewMode" );
else
@@ -239,7 +239,7 @@ void KFileIconView::removeToolTip()
toolTip = 0;
}
-void KFileIconView::showToolTip( QIconViewItem *item )
+void KFileIconView::showToolTip( TQIconViewItem *item )
{
delete toolTip;
toolTip = 0;
@@ -247,32 +247,32 @@ void KFileIconView::showToolTip( QIconViewItem *item )
if ( !item )
return;
- int w = maxItemWidth() - ( itemTextPos() == QIconView::Bottom ? 0 :
+ int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 :
item->pixmapRect().width() ) - 4;
if ( fontMetrics().width( item->text() ) >= w ) {
- toolTip = new QLabel( QString::fromLatin1(" %1 ").arg(item->text()), 0,
+ toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0,
"myToolTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
- toolTip->setFrameStyle( QFrame::Plain | QFrame::Box );
+ toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
toolTip->setLineWidth( 1 );
toolTip->setAlignment( AlignLeft | AlignTop );
- toolTip->move( QCursor::pos() + QPoint( 14, 14 ) );
+ toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) );
toolTip->adjustSize();
- QRect screen = QApplication::desktop()->screenGeometry(
- QApplication::desktop()->screenNumber(QCursor::pos()));
+ TQRect screen = TQApplication::desktop()->screenGeometry(
+ TQApplication::desktop()->screenNumber(TQCursor::pos()));
if (toolTip->x()+toolTip->width() > screen.right()) {
toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y());
}
if (toolTip->y()+toolTip->height() > screen.bottom()) {
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
}
- toolTip->setFont( QToolTip::font() );
- toolTip->setPalette( QToolTip::palette(), true );
+ toolTip->setFont( TQToolTip::font() );
+ toolTip->setPalette( TQToolTip::palette(), true );
toolTip->show();
}
}
-void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
+void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -282,13 +282,13 @@ void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
sig->activateMenu( i->fileInfo(), pos );
}
-void KFileIconView::hideEvent( QHideEvent *e )
+void KFileIconView::hideEvent( TQHideEvent *e )
{
removeToolTip();
KIconView::hideEvent( e );
}
-void KFileIconView::keyPressEvent( QKeyEvent *e )
+void KFileIconView::keyPressEvent( TQKeyEvent *e )
{
KIconView::keyPressEvent( e );
@@ -336,7 +336,7 @@ void KFileIconView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- QIconView* qview = static_cast<QIconView*>( this );
+ TQIconView* qview = static_cast<TQIconView*>( this );
// Since creating and initializing an item leads to a repaint,
// we disable updates on the IconView for a while.
qview->setUpdatesEnabled( false );
@@ -350,7 +350,7 @@ void KFileIconView::insertItem( KFileItem *i )
i->setExtraData( this, item );
}
-void KFileIconView::slotActivate( QIconViewItem *item )
+void KFileIconView::slotActivate( TQIconViewItem *item )
{
if ( !item )
return;
@@ -359,7 +359,7 @@ void KFileIconView::slotActivate( QIconViewItem *item )
sig->activate( fi );
}
-void KFileIconView::selected( QIconViewItem *item )
+void KFileIconView::selected( TQIconViewItem *item )
{
if ( !item || (KApplication::keyboardMouseState() & (ShiftButton | ControlButton)) != 0 )
return;
@@ -387,7 +387,7 @@ KFileItem * KFileIconView::currentFileItem() const
return 0L;
}
-void KFileIconView::highlighted( QIconViewItem *item )
+void KFileIconView::highlighted( TQIconViewItem *item )
{
if ( !item )
return;
@@ -398,32 +398,32 @@ void KFileIconView::highlighted( QIconViewItem *item )
void KFileIconView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( SIGNAL( selectionChanged() ), this );
- disconnect( SIGNAL( selectionChanged( QIconViewItem * )), this );
+ disconnect( TQT_SIGNAL( selectionChanged() ), this );
+ disconnect( TQT_SIGNAL( selectionChanged( TQIconViewItem * )), this );
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
}
bool KFileIconView::isSelected( const KFileItem *i ) const
@@ -437,17 +437,17 @@ void KFileIconView::updateView( bool b )
if ( !b )
return; // eh?
- KFileIconViewItem *item = static_cast<KFileIconViewItem*>(QIconView::firstItem());
+ KFileIconViewItem *item = static_cast<KFileIconViewItem*>(TQIconView::firstItem());
if ( item ) {
do {
if ( d->previews->isChecked() ) {
if ( canPreview( item->fileInfo() ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
}
else {
// unset pixmap size (used for previews)
if ( !item->pixmapSize().isNull() )
- item->setPixmapSize( QSize( 0, 0 ) );
+ item->setPixmapSize( TQSize( 0, 0 ) );
}
// recalculate item parameters but avoid an in-place repaint
item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false );
@@ -593,12 +593,12 @@ void KFileIconView::showPreviews()
d->job = KIO::filePreview(*items(), d->previewIconSize,d->previewIconSize);
d->job->setIgnoreMaximumSize(d->ignoreMaximumSize);
- connect( d->job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotPreviewResult( KIO::Job * )));
- connect( d->job, SIGNAL( gotPreview( const KFileItem*, const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-// connect( d->job, SIGNAL( failed( const KFileItem* )),
-// this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( d->job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotPreviewResult( KIO::Job * )));
+ connect( d->job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+// connect( d->job, TQT_SIGNAL( failed( const KFileItem* )),
+// this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
void KFileIconView::slotPreviewResult( KIO::Job *job )
@@ -607,13 +607,13 @@ void KFileIconView::slotPreviewResult( KIO::Job *job )
d->job = 0L;
}
-void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
+void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix )
{
KFileIconViewItem *it = viewItem( item );
if ( it )
if( item->overlays() & KIcon::HiddenOverlay )
{
- QPixmap p( pix );
+ TQPixmap p( pix );
KIconEffect::semiTransparent( p );
it->setPixmap( p );
@@ -624,12 +624,12 @@ void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
bool KFileIconView::canPreview( const KFileItem *item ) const
{
- QStringList::Iterator it = d->previewMimeTypes.begin();
- QRegExp r;
+ TQStringList::Iterator it = d->previewMimeTypes.begin();
+ TQRegExp r;
r.setWildcard( true );
for ( ; it != d->previewMimeTypes.end(); ++it ) {
- QString type = *it;
+ TQString type = *it;
// the "mimetype" can be "image/*"
if ( type.at( type.length() - 1 ) == '*' ) {
r.setPattern( type );
@@ -672,20 +672,20 @@ KFileItem * KFileIconView::prevItem( const KFileItem *fileItem ) const
return 0L;
}
-void KFileIconView::setSorting( QDir::SortSpec spec )
+void KFileIconView::setSorting( TQDir::SortSpec spec )
{
KFileView::setSorting( spec );
KFileItemListIterator it( *items() );
KFileItem *item;
- if ( spec & QDir::Time ) {
+ if ( spec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
// warning, time_t is often signed -> cast it
viewItem(item)->setKey( sortingKey( (unsigned long)item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), spec ));
}
- else if ( spec & QDir::Size ) {
+ else if ( spec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
spec ));
@@ -718,12 +718,12 @@ void KFileIconView::listingCompleted()
{
arrangeItemsInGrid();
- // QIconView doesn't set the current item automatically, so we have to do
+ // TQIconView doesn't set the current item automatically, so we have to do
// that. We don't want to emit selectionChanged() tho.
if ( !currentItem() ) {
bool block = signalsBlocked();
blockSignals( true );
- QIconViewItem *item = viewItem( firstFileItem() );
+ TQIconViewItem *item = viewItem( firstFileItem() );
KIconView::setCurrentItem( item );
KIconView::setSelected( item, false );
blockSignals( block );
@@ -733,12 +733,12 @@ void KFileIconView::listingCompleted()
}
// need to remove our tooltip, eventually
-bool KFileIconView::eventFilter( QObject *o, QEvent *e )
+bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
{
if ( o == viewport() || o == this ) {
int type = e->type();
- if ( type == QEvent::Leave ||
- type == QEvent::FocusOut )
+ if ( type == TQEvent::Leave ||
+ type == TQEvent::FocusOut )
removeToolTip();
}
@@ -748,7 +748,7 @@ bool KFileIconView::eventFilter( QObject *o, QEvent *e )
/////////////////////////////////////////////////////////////////
// ### workaround for Qt3 Bug
-void KFileIconView::showEvent( QShowEvent *e )
+void KFileIconView::showEvent( TQShowEvent *e )
{
KIconView::showEvent( e );
}
@@ -758,7 +758,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
bool updateTextAndPixmap )
{
if ( d->previews->isChecked() && canPreview( i ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
if ( updateTextAndPixmap )
{
@@ -770,13 +770,13 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
}
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
// warning, time_t is often signed -> cast it
item->setKey( sortingKey( (unsigned long) i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -806,7 +806,7 @@ void KFileIconView::zoomOut()
setPreviewSize( d->previewIconSize - 30 );
}
-QDragObject *KFileIconView::dragObject()
+TQDragObject *KFileIconView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -814,16 +814,16 @@ QDragObject *KFileIconView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", iconSize() );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( iconSize() );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -845,16 +845,16 @@ void KFileIconView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileIconView::acceptDrag(QDropEvent* e) const
+bool KFileIconView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!=const_cast<KFileIconView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -877,7 +877,7 @@ void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -903,13 +903,13 @@ void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileIconView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileIconView::contentsDropEvent( QDropEvent *e )
+void KFileIconView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfileiconview.h b/kio/kfile/kfileiconview.h
index 63a841a8e..ea8fe7d89 100644
--- a/kio/kfile/kfileiconview.h
+++ b/kio/kfile/kfileiconview.h
@@ -38,14 +38,14 @@ class QLabel;
class KIO_EXPORT KFileIconViewItem : public KIconViewItem
{
public:
- KFileIconViewItem( QIconView *parent, const QString &text,
- const QPixmap &pixmap,
+ KFileIconViewItem( TQIconView *parent, const TQString &text,
+ const TQPixmap &pixmap,
KFileItem *fi )
: KIconViewItem( parent, text, pixmap ), inf( fi ) {}
/**
* @since 3.1
*/
- KFileIconViewItem( QIconView *parent, KFileItem *fi )
+ KFileIconViewItem( TQIconView *parent, KFileItem *fi )
: KIconViewItem( parent ), inf( fi ) {}
virtual ~KFileIconViewItem();
@@ -83,10 +83,10 @@ class KIO_EXPORT KFileIconView : public KIconView, public KFileView
Q_OBJECT
public:
- KFileIconView(QWidget *parent, const char *name);
+ KFileIconView(TQWidget *parent, const char *name);
virtual ~KFileIconView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -137,15 +137,15 @@ public:
void ensureItemVisible( const KFileItem * );
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileIconViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
void setAcceptDrops(bool b)
{
KIconView::setAcceptDrops(b);
@@ -173,37 +173,37 @@ public slots:
protected:
/**
- * Reimplemented to not let QIconView eat return-key events
+ * Reimplemented to not let TQIconView eat return-key events
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Reimplemented to remove an eventual tooltip
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
// ### workaround for Qt3 bug (see #35080)
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
// KDE4: Make virtual
- bool acceptDrag(QDropEvent* e ) const;
+ bool acceptDrag(TQDropEvent* e ) const;
private slots:
- void selected( QIconViewItem *item );
- void slotActivate( QIconViewItem * );
- void highlighted( QIconViewItem *item );
- void showToolTip( QIconViewItem *item );
+ void selected( TQIconViewItem *item );
+ void slotActivate( TQIconViewItem * );
+ void highlighted( TQIconViewItem *item );
+ void showToolTip( TQIconViewItem *item );
void removeToolTip();
- void slotActivateMenu( QIconViewItem *, const QPoint& );
+ void slotActivateMenu( TQIconViewItem *, const TQPoint& );
void slotSelectionChanged();
void slotSmallColumns();
@@ -211,7 +211,7 @@ private slots:
void slotPreviewsToggled( bool );
void slotPreviewResult( KIO::Job * );
- void gotPreview( const KFileItem *item, const QPixmap& pix );
+ void gotPreview( const KFileItem *item, const TQPixmap& pix );
void slotAutoOpen();
signals:
@@ -221,25 +221,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
private:
KMimeTypeResolver<KFileIconViewItem,KFileIconView> *m_resolver;
- QLabel *toolTip;
+ TQLabel *toolTip;
int th;
int myIconSize;
- virtual void insertItem(QIconViewItem *a, QIconViewItem *b) { KIconView::insertItem(a, b); }
- virtual void setSelectionMode(QIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
- virtual void setSelected(QIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
+ virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); }
+ virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
+ virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
bool canPreview( const KFileItem * ) const;
void stopPreview();
diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp
index ee76c82e2..5d54af8b9 100644
--- a/kio/kfile/kfilemetainfowidget.cpp
+++ b/kio/kfile/kfilemetainfowidget.cpp
@@ -28,29 +28,29 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qdatetimeedit.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqdatetimeedit.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
/*
Widgets used for different types:
bool : QCheckBox
int : QSpinBox
- QString : KComboBox if the validator is a KStringListValidator, else lineedit
- QDateTime : QDateTimeEdit
+ TQString : KComboBox if the validator is a KStringListValidator, else lineedit
+ TQDateTime : QDateTimeEdit
*/
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -60,9 +60,9 @@ KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
Mode mode,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -80,88 +80,88 @@ void KFileMetaInfoWidget::init(KFileMetaInfoItem item, Mode mode)
else
switch (m_value.type())
{
- case QVariant::Image :
- m_widget = new QLabel(this, "info image");
- static_cast<QLabel*>(m_widget)->setPixmap(QPixmap(m_value.toImage()));
+ case TQVariant::Image :
+ m_widget = new TQLabel(this, "info image");
+ static_cast<TQLabel*>(m_widget)->setPixmap(TQPixmap(m_value.toImage()));
break;
- case QVariant::Pixmap :
- m_widget = new QLabel(this, "info pixmap");
- static_cast<QLabel*>(m_widget)->setPixmap(m_value.toPixmap());
+ case TQVariant::Pixmap :
+ m_widget = new TQLabel(this, "info pixmap");
+ static_cast<TQLabel*>(m_widget)->setPixmap(m_value.toPixmap());
break;
default:
- m_widget = new QLabel(item.string(true), this, "info label");
+ m_widget = new TQLabel(item.string(true), this, "info label");
}
- (new QHBoxLayout(this))->addWidget(m_widget);
+ (new TQHBoxLayout(this))->addWidget(m_widget);
}
KFileMetaInfoWidget::~KFileMetaInfoWidget()
{
}
-QWidget* KFileMetaInfoWidget::makeWidget()
+TQWidget* KFileMetaInfoWidget::makeWidget()
{
- QString valClass;
- QWidget* w;
+ TQString valClass;
+ TQWidget* w;
switch (m_value.type())
{
- case QVariant::Invalid: // no type
+ case TQVariant::Invalid: // no type
// just make a label
- w = new QLabel(i18n("<Error>"), this, "label");
+ w = new TQLabel(i18n("<Error>"), this, "label");
break;
- case QVariant::Int: // an int
- case QVariant::UInt: // an unsigned int
+ case TQVariant::Int: // an int
+ case TQVariant::UInt: // an unsigned int
w = makeIntWidget();
break;
- case QVariant::Bool: // a bool
+ case TQVariant::Bool: // a bool
w = makeBoolWidget();
break;
- case QVariant::Double: // a double
+ case TQVariant::Double: // a double
w = makeDoubleWidget();
break;
- case QVariant::Date: // a QDate
+ case TQVariant::Date: // a QDate
w = makeDateWidget();
break;
- case QVariant::Time: // a QTime
+ case TQVariant::Time: // a QTime
w = makeTimeWidget();
break;
- case QVariant::DateTime: // a QDateTime
+ case TQVariant::DateTime: // a QDateTime
w = makeDateTimeWidget();
break;
#if 0
- case QVariant::Size: // a QSize
- case QVariant::String: // a QString
- case QVariant::List: // a QValueList
- case QVariant::Map: // a QMap
- case QVariant::StringList: // a QStringList
- case QVariant::Font: // a QFont
- case QVariant::Pixmap: // a QPixmap
- case QVariant::Brush: // a QBrush
- case QVariant::Rect: // a QRect
- case QVariant::Color: // a QColor
- case QVariant::Palette: // a QPalette
- case QVariant::ColorGroup: // a QColorGroup
- case QVariant::IconSet: // a QIconSet
- case QVariant::Point: // a QPoint
- case QVariant::Image: // a QImage
- case QVariant::CString: // a QCString
- case QVariant::PointArray: // a QPointArray
- case QVariant::Region: // a QRegion
- case QVariant::Bitmap: // a QBitmap
- case QVariant::Cursor: // a QCursor
- case QVariant::ByteArray: // a QByteArray
- case QVariant::BitArray: // a QBitArray
- case QVariant::SizePolicy: // a QSizePolicy
- case QVariant::KeySequence: // a QKeySequence
+ case TQVariant::Size: // a QSize
+ case TQVariant::String: // a QString
+ case TQVariant::List: // a QValueList
+ case TQVariant::Map: // a QMap
+ case TQVariant::StringList: // a QStringList
+ case TQVariant::Font: // a QFont
+ case TQVariant::Pixmap: // a QPixmap
+ case TQVariant::Brush: // a QBrush
+ case TQVariant::Rect: // a QRect
+ case TQVariant::Color: // a QColor
+ case TQVariant::Palette: // a QPalette
+ case TQVariant::ColorGroup: // a QColorGroup
+ case TQVariant::IconSet: // a QIconSet
+ case TQVariant::Point: // a QPoint
+ case TQVariant::Image: // a QImage
+ case TQVariant::CString: // a QCString
+ case TQVariant::PointArray: // a QPointArray
+ case TQVariant::Region: // a QRegion
+ case TQVariant::Bitmap: // a QBitmap
+ case TQVariant::Cursor: // a QCursor
+ case TQVariant::ByteArray: // a QByteArray
+ case TQVariant::BitArray: // a QBitArray
+ case TQVariant::SizePolicy: // a QSizePolicy
+ case TQVariant::KeySequence: // a QKeySequence
#endif
default:
w = makeStringWidget();
@@ -181,39 +181,39 @@ QWidget* KFileMetaInfoWidget::makeWidget()
// now the different methods to make the widgets for specific types
// ****************************************************************
-QWidget* KFileMetaInfoWidget::makeBoolWidget()
+TQWidget* KFileMetaInfoWidget::makeBoolWidget()
{
- QCheckBox* cb = new QCheckBox(this, "metainfo bool widget");
+ TQCheckBox* cb = new TQCheckBox(this, "metainfo bool widget");
cb->setChecked(m_item.value().toBool());
- connect(cb, SIGNAL(toggled(bool)), this, SLOT(slotChanged(bool)));
+ connect(cb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged(bool)));
return cb;
}
-QWidget* KFileMetaInfoWidget::makeIntWidget()
+TQWidget* KFileMetaInfoWidget::makeIntWidget()
{
- QSpinBox* sb = new QSpinBox(this, "metainfo integer widget");
+ TQSpinBox* sb = new TQSpinBox(this, "metainfo integer widget");
sb->setValue(m_item.value().toInt());
if (m_validator)
{
- if (m_validator->inherits("QIntValidator"))
+ if (m_validator->inherits("TQIntValidator"))
{
- sb->setMinValue(static_cast<QIntValidator*>(m_validator)->bottom());
- sb->setMaxValue(static_cast<QIntValidator*>(m_validator)->top());
+ sb->setMinValue(static_cast<TQIntValidator*>(m_validator)->bottom());
+ sb->setMaxValue(static_cast<TQIntValidator*>(m_validator)->top());
}
reparentValidator(sb, m_validator);
sb->setValidator(m_validator);
}
// make sure that an uint cannot be set to a value < 0
- if (m_item.type() == QVariant::UInt)
+ if (m_item.type() == TQVariant::UInt)
sb->setMinValue(QMAX(sb->minValue(), 0));
- connect(sb, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(sb, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
return sb;
}
-QWidget* KFileMetaInfoWidget::makeDoubleWidget()
+TQWidget* KFileMetaInfoWidget::makeDoubleWidget()
{
KDoubleNumInput* dni = new KDoubleNumInput(m_item.value().toDouble(),
this, "metainfo double widget");
@@ -221,19 +221,19 @@ QWidget* KFileMetaInfoWidget::makeDoubleWidget()
if (m_validator)
{
- if (m_validator->inherits("QDoubleValidator"))
+ if (m_validator->inherits("TQDoubleValidator"))
{
- dni->setMinValue(static_cast<QDoubleValidator*>(m_validator)->bottom());
- dni->setMaxValue(static_cast<QDoubleValidator*>(m_validator)->top());
+ dni->setMinValue(static_cast<TQDoubleValidator*>(m_validator)->bottom());
+ dni->setMaxValue(static_cast<TQDoubleValidator*>(m_validator)->top());
}
reparentValidator(dni, m_validator);
}
- connect(dni, SIGNAL(valueChanged(double)), this, SLOT(slotChanged(double)));
+ connect(dni, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotChanged(double)));
return dni;
}
-QWidget* KFileMetaInfoWidget::makeStringWidget()
+TQWidget* KFileMetaInfoWidget::makeStringWidget()
{
if (m_validator && m_validator->inherits("KStringListValidator"))
{
@@ -242,7 +242,7 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
(m_validator);
b->insertStringList(val->stringList());
b->setCurrentText(m_item.value().toString());
- connect(b, SIGNAL(activated(const QString &)), this, SLOT(slotComboChanged(const QString &)));
+ connect(b, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotComboChanged(const TQString &)));
b->setValidator(val);
reparentValidator(b, val);
return b;
@@ -251,9 +251,9 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
if ( m_item.attributes() & KFileMimeTypeInfo::MultiLine ) {
KEdit *edit = new KEdit( this );
edit->setText( m_item.value().toString() );
- connect( edit, SIGNAL( textChanged() ),
- this, SLOT( slotMultiLineEditChanged() ));
- // can't use a validator with a QTextEdit, but we may need to delete it
+ connect( edit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotMultiLineEditChanged() ));
+ // can't use a validator with a TQTextEdit, but we may need to delete it
if ( m_validator )
reparentValidator( edit, m_validator );
return edit;
@@ -265,31 +265,31 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
e->setValidator(m_validator);
reparentValidator(e, m_validator);
}
- connect(e, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotLineEditChanged(const QString&)));
+ connect(e, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotLineEditChanged(const TQString&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeDateWidget()
+TQWidget* KFileMetaInfoWidget::makeDateWidget()
{
- QWidget *e = new QDateEdit(m_item.value().toDate(), this);
- connect(e, SIGNAL(valueChanged(const QDate&)),
- this, SLOT(slotDateChanged(const QDate&)));
+ TQWidget *e = new QDateEdit(m_item.value().toDate(), this);
+ connect(e, TQT_SIGNAL(valueChanged(const TQDate&)),
+ this, TQT_SLOT(slotDateChanged(const TQDate&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeTimeWidget()
{
return new QTimeEdit(m_item.value().toTime(), this);
}
-QWidget* KFileMetaInfoWidget::makeDateTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeDateTimeWidget()
{
return new QDateTimeEdit(m_item.value().toDateTime(), this);
}
-void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
- QValidator *validator )
+void KFileMetaInfoWidget::reparentValidator( TQWidget *widget,
+ TQValidator *validator )
{
if ( !validator->parent() )
widget->insertChild( validator );
@@ -301,16 +301,16 @@ void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
void KFileMetaInfoWidget::slotChanged(bool value)
{
- Q_ASSERT(m_widget->inherits("QComboBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQComboBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
void KFileMetaInfoWidget::slotChanged(int value)
{
- Q_ASSERT(m_widget->inherits("QSpinBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQSpinBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -318,23 +318,23 @@ void KFileMetaInfoWidget::slotChanged(int value)
void KFileMetaInfoWidget::slotChanged(double value)
{
Q_ASSERT(m_widget->inherits("KDoubleNumInput"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotComboChanged(const QString &value)
+void KFileMetaInfoWidget::slotComboChanged(const TQString &value)
{
Q_ASSERT(m_widget->inherits("KComboBox"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
+void KFileMetaInfoWidget::slotLineEditChanged(const TQString& value)
{
Q_ASSERT(m_widget->inherits("KLineEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -342,32 +342,32 @@ void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
// that may be a little expensive for long texts, but what can we do?
void KFileMetaInfoWidget::slotMultiLineEditChanged()
{
- Q_ASSERT(m_widget->inherits("QTextEdit"));
- m_value = QVariant( static_cast<const QTextEdit*>( sender() )->text() );
+ Q_ASSERT(m_widget->inherits("TQTextEdit"));
+ m_value = TQVariant( static_cast<const TQTextEdit*>( sender() )->text() );
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateChanged(const QDate& value)
+void KFileMetaInfoWidget::slotDateChanged(const TQDate& value)
{
Q_ASSERT(m_widget->inherits("QDateEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotTimeChanged(const QTime& value)
+void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value)
{
Q_ASSERT(m_widget->inherits("QTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateTimeChanged(const QDateTime& value)
+void KFileMetaInfoWidget::slotDateTimeChanged(const TQDateTime& value)
{
Q_ASSERT(m_widget->inherits("QDateTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
diff --git a/kio/kfile/kfilemetainfowidget.h b/kio/kfile/kfilemetainfowidget.h
index 4d0070949..c22936b5e 100644
--- a/kio/kfile/kfilemetainfowidget.h
+++ b/kio/kfile/kfilemetainfowidget.h
@@ -20,8 +20,8 @@
#ifndef __KFILEMETAINFOWIDGET_H__
#define __KFILEMETAINFOWIDGET_H__
-#include <qwidget.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
#include <kfilemetainfo.h>
/*!
@@ -38,11 +38,11 @@ public:
Reserve = 0xff
};
- KFileMetaInfoWidget(KFileMetaInfoItem item, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
- KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
virtual ~KFileMetaInfoWidget();
@@ -51,44 +51,44 @@ public:
return m_item.isEditable() && m_item.setValue(m_value);
}
- void setValue(const QVariant& value) { m_value = value; }
- QVariant value()const { return m_value; }
- QValidator* validator() const { return m_validator; }
+ void setValue(const TQVariant& value) { m_value = value; }
+ TQVariant value()const { return m_value; }
+ TQValidator* validator() const { return m_validator; }
KFileMetaInfoItem item()const { return m_item; }
signals:
- void valueChanged(const QVariant& value);
+ void valueChanged(const TQVariant& value);
protected:
- void reparentValidator(QWidget *widget, QValidator *validator);
- virtual QWidget* makeWidget();
+ void reparentValidator(TQWidget *widget, TQValidator *validator);
+ virtual TQWidget* makeWidget();
- QWidget* makeBoolWidget();
- QWidget* makeIntWidget();
- QWidget* makeDoubleWidget();
- QWidget* makeStringWidget();
- QWidget* makeDateWidget();
- QWidget* makeTimeWidget();
- QWidget* makeDateTimeWidget();
+ TQWidget* makeBoolWidget();
+ TQWidget* makeIntWidget();
+ TQWidget* makeDoubleWidget();
+ TQWidget* makeStringWidget();
+ TQWidget* makeDateWidget();
+ TQWidget* makeTimeWidget();
+ TQWidget* makeDateTimeWidget();
private slots:
void slotChanged(bool value);
void slotChanged(int value);
void slotChanged(double value);
- void slotComboChanged(const QString &value);
- void slotLineEditChanged(const QString& value);
+ void slotComboChanged(const TQString &value);
+ void slotLineEditChanged(const TQString& value);
void slotMultiLineEditChanged();
- void slotDateChanged(const QDate& value);
- void slotTimeChanged(const QTime& value);
- void slotDateTimeChanged(const QDateTime& value);
+ void slotDateChanged(const TQDate& value);
+ void slotTimeChanged(const TQTime& value);
+ void slotDateTimeChanged(const TQDateTime& value);
private:
void init(KFileMetaInfoItem item, Mode mode);
- QVariant m_value; // the value will be saved here until apply() is called
+ TQVariant m_value; // the value will be saved here until apply() is called
KFileMetaInfoItem m_item;
- QWidget* m_widget;
- QValidator* m_validator;
+ TQWidget* m_widget;
+ TQValidator* m_validator;
bool m_dirty : 1;
};
diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp
index 4d5ec339b..1be7743a1 100644
--- a/kio/kfile/kfilemetapreview.cpp
+++ b/kio/kfile/kfilemetapreview.cpp
@@ -8,7 +8,7 @@
#include "kfilemetapreview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kio/previewjob.h>
#include <klibloader.h>
@@ -17,12 +17,12 @@
bool KFileMetaPreview::s_tryAudioPreview = true;
-KFileMetaPreview::KFileMetaPreview( QWidget *parent, const char *name )
+KFileMetaPreview::KFileMetaPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name ),
haveAudioPreview( false )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
- m_stack = new QWidgetStack( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, 0 );
+ m_stack = new TQWidgetStack( this );
layout->addWidget( m_stack );
// ###
@@ -45,8 +45,8 @@ void KFileMetaPreview::initPreviewProviders()
m_stack->raiseWidget( imagePreview );
resize( imagePreview->sizeHint() );
- QStringList mimeTypes = imagePreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = imagePreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
{
// qDebug(".... %s", (*it).latin1());
@@ -54,7 +54,7 @@ void KFileMetaPreview::initPreviewProviders()
}
}
-KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeType )
+KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType )
{
// qDebug("### looking for: %s", mimeType.latin1());
// often the first highlighted item, where we can be sure, there is no plugin
@@ -78,8 +78,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
{
haveAudioPreview = true;
(void) m_stack->addWidget( audioPreview );
- QStringList mimeTypes = audioPreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = audioPreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
m_previewProviders.insert( *it, audioPreview );
}
@@ -104,7 +104,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
if ( mimeInfo )
{
// check mime type inheritance
- QString parentMimeType = mimeInfo->parentMimeType();
+ TQString parentMimeType = mimeInfo->parentMimeType();
while ( !parentMimeType.isEmpty() )
{
provider = m_previewProviders.find( parentMimeType );
@@ -118,8 +118,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
}
// check X-KDE-Text property
- QVariant textProperty = mimeInfo->property( "X-KDE-text" );
- if ( textProperty.isValid() && textProperty.type() == QVariant::Bool )
+ TQVariant textProperty = mimeInfo->property( "X-KDE-text" );
+ if ( textProperty.isValid() && textProperty.type() == TQVariant::Bool )
{
if ( textProperty.toBool() )
{
@@ -163,7 +163,7 @@ void KFileMetaPreview::clearPreview()
static_cast<KPreviewWidgetBase*>( m_stack->visibleWidget() )->clearPreview();
}
-void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
+void KFileMetaPreview::addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider )
{
m_previewProviders.insert( mimeType, provider );
@@ -171,7 +171,7 @@ void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
void KFileMetaPreview::clearPreviewProviders()
{
- QDictIterator<KPreviewWidgetBase> it( m_previewProviders );
+ TQDictIterator<KPreviewWidgetBase> it( m_previewProviders );
for ( ; it.current(); ++it )
m_stack->removeWidget( it.current() );
@@ -179,7 +179,7 @@ void KFileMetaPreview::clearPreviewProviders()
}
// static
-KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( QWidget *parent )
+KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( TQWidget *parent )
{
KLibFactory *factory = KLibLoader::self()->factory( "kfileaudiopreview" );
if ( !factory )
diff --git a/kio/kfile/kfilemetapreview.h b/kio/kfile/kfilemetapreview.h
index ae0650ea1..19b7901a1 100644
--- a/kio/kfile/kfilemetapreview.h
+++ b/kio/kfile/kfilemetapreview.h
@@ -9,8 +9,8 @@
#ifndef KFILEMETAPREVIEW_H
#define KFILEMETAPREVIEW_H
-#include <qdict.h>
-#include <qwidgetstack.h>
+#include <tqdict.h>
+#include <tqwidgetstack.h>
#include <kpreviewwidgetbase.h>
#include <kurl.h>
@@ -20,10 +20,10 @@ class KIO_EXPORT KFileMetaPreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KFileMetaPreview(QWidget *parent, const char *name = 0);
+ KFileMetaPreview(TQWidget *parent, const char *name = 0);
~KFileMetaPreview();
- virtual void addPreviewProvider( const QString& mimeType,
+ virtual void addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider );
virtual void clearPreviewProviders();
@@ -32,7 +32,7 @@ public slots:
virtual void clearPreview();
protected:
- virtual KPreviewWidgetBase *previewProviderFor( const QString& mimeType );
+ virtual KPreviewWidgetBase *previewProviderFor( const TQString& mimeType );
protected:
virtual void virtual_hook( int id, void* data );
@@ -40,12 +40,12 @@ protected:
private:
void initPreviewProviders();
- QWidgetStack *m_stack;
- QDict<KPreviewWidgetBase> m_previewProviders;
+ TQWidgetStack *m_stack;
+ TQDict<KPreviewWidgetBase> m_previewProviders;
bool haveAudioPreview;
// may return 0L
- static KPreviewWidgetBase * createAudioPreview( QWidget *parent );
+ static KPreviewWidgetBase * createAudioPreview( TQWidget *parent );
static bool s_tryAudioPreview;
private:
diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp
index 14065c3cb..b221a1ebb 100644
--- a/kio/kfile/kfilepreview.cpp
+++ b/kio/kfile/kfilepreview.cpp
@@ -24,24 +24,24 @@
#include <kfilepreview.moc>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "config-kfile.h"
-KFilePreview::KFilePreview(KFileView *view, QWidget *parent, const char *name)
- : QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(KFileView *view, TQWidget *parent, const char *name)
+ : TQSplitter(parent, name), KFileView()
{
if ( view )
init( view );
else
- init( new KFileIconView( (QSplitter*) this, "left" ));
+ init( new KFileIconView( (TQSplitter*) this, "left" ));
}
-KFilePreview::KFilePreview(QWidget *parent, const char *name) :
- QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(TQWidget *parent, const char *name) :
+ TQSplitter(parent, name), KFileView()
{
- init( new KFileIconView((QSplitter*)this, "left") );
+ init( new KFileIconView((TQSplitter*)this, "left") );
}
KFilePreview::~KFilePreview()
@@ -54,7 +54,7 @@ KFilePreview::~KFilePreview()
// don't delete the preview, we can reuse it
// (it will get deleted by ~KDirOperator)
if ( preview && preview->parentWidget() == this ) {
- preview->reparent(0L, 0, QPoint(0, 0), false);
+ preview->reparent(0L, 0, TQPoint(0, 0), false);
}
}
@@ -65,13 +65,13 @@ void KFilePreview::init( KFileView *view )
left = 0L;
setFileView( view );
- preview = new QWidget((QSplitter*)this, "preview");
- QString tmp = i18n("No preview available.");
- QLabel *l = new QLabel(tmp, preview);
+ preview = new TQWidget((TQSplitter*)this, "preview");
+ TQString tmp = i18n("No preview available.");
+ TQLabel *l = new TQLabel(tmp, preview);
l->setMinimumSize(l->sizeHint());
l->move(10, 5);
preview->setMinimumWidth(l->sizeHint().width()+20);
- setResizeMode(preview, QSplitter::KeepSize);
+ setResizeMode(preview, TQSplitter::KeepSize);
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -89,14 +89,14 @@ void KFilePreview::setFileView( KFileView *view )
//}
delete left;
- view->widget()->reparent( this, QPoint(0,0) );
+ view->widget()->reparent( this, TQPoint(0,0) );
view->KFileView::setViewMode(All);
view->setParentView(this);
view->setSorting( sorting() );
left = view;
- connect( left->signaler(), SIGNAL( fileHighlighted(const KFileItem*) ),
- SLOT( slotHighlighted( const KFileItem * )));
+ connect( left->signaler(), TQT_SIGNAL( fileHighlighted(const KFileItem*) ),
+ TQT_SLOT( slotHighlighted( const KFileItem * )));
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -105,15 +105,15 @@ void KFilePreview::setFileView( KFileView *view )
// this url parameter is useless... it's the url of the current directory.
// what for?
-void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
+void KFilePreview::setPreviewWidget(const TQWidget *w, const KURL &)
{
left->setOnlyDoubleClickSelectsFiles( onlyDoubleClickSelectsFiles() );
if (w) {
- connect(this, SIGNAL( showPreview(const KURL &) ),
- w, SLOT( showPreview(const KURL &) ));
- connect( this, SIGNAL( clearPreview() ),
- w, SLOT( clearPreview() ));
+ connect(this, TQT_SIGNAL( showPreview(const KURL &) ),
+ w, TQT_SLOT( showPreview(const KURL &) ));
+ connect( this, TQT_SIGNAL( clearPreview() ),
+ w, TQT_SLOT( clearPreview() ));
}
else {
preview->hide();
@@ -121,8 +121,8 @@ void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
}
delete preview;
- preview = const_cast<QWidget*>(w);
- preview->reparent((QSplitter*)this, 0, QPoint(0, 0), true);
+ preview = const_cast<TQWidget*>(w);
+ preview->reparent((TQSplitter*)this, 0, TQPoint(0, 0), true);
preview->resize(preview->sizeHint());
preview->show();
}
@@ -133,7 +133,7 @@ void KFilePreview::insertItem(KFileItem *item)
left->insertItem(item);
}
-void KFilePreview::setSorting( QDir::SortSpec sort )
+void KFilePreview::setSorting( TQDir::SortSpec sort )
{
left->setSorting( sort );
KFileView::setSorting( left->sorting() );
@@ -264,12 +264,12 @@ KActionCollection * KFilePreview::actionCollection() const
}
}
-void KFilePreview::readConfig( KConfig *config, const QString& group )
+void KFilePreview::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
}
-void KFilePreview::writeConfig( KConfig *config, const QString& group )
+void KFilePreview::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
}
diff --git a/kio/kfile/kfilepreview.h b/kio/kfile/kfilepreview.h
index d6ee487f7..123d221f1 100644
--- a/kio/kfile/kfilepreview.h
+++ b/kio/kfile/kfilepreview.h
@@ -23,9 +23,9 @@
#ifndef _KFILEPREVIEW_H
#define _KFILEPREVIEW_H
-#include <qsplitter.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqsplitter.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kfileitem.h>
@@ -36,16 +36,16 @@
/*!
* This KFileView is an empbedded preview for some file types.
*/
-class KIO_EXPORT KFilePreview : public QSplitter, public KFileView
+class KIO_EXPORT KFilePreview : public TQSplitter, public KFileView
{
Q_OBJECT
public:
- KFilePreview(QWidget *parent, const char *name);
- KFilePreview(KFileView *view, QWidget *parent, const char *name);
+ KFilePreview(TQWidget *parent, const char *name);
+ KFilePreview(KFileView *view, TQWidget *parent, const char *name);
virtual ~KFilePreview();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
/**
@@ -81,10 +81,10 @@ public:
virtual KFileItem * nextItem( const KFileItem * ) const;
virtual KFileItem * prevItem( const KFileItem * ) const;
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* This overrides KFileView::actionCollection() by returning
@@ -96,7 +96,7 @@ public:
void ensureItemVisible(const KFileItem *);
- void setPreviewWidget(const QWidget *w, const KURL &u);
+ void setPreviewWidget(const TQWidget *w, const KURL &u);
protected slots:
virtual void slotHighlighted( const KFileItem * );
@@ -109,8 +109,8 @@ private:
void init( KFileView *view );
KFileView *left;
- QWidget *preview;
- QString viewname;
+ TQWidget *preview;
+ TQString viewname;
protected:
/** \internal */
diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp
index 9be183728..788edee51 100644
--- a/kio/kfile/kfilesharedlg.cpp
+++ b/kio/kfile/kfilesharedlg.cpp
@@ -18,12 +18,12 @@
*/
#include "kfilesharedlg.h"
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
#include <kprocess.h>
#include <kprocio.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include <errno.h>
#include <kio/kfileshare.h>
#include <kseparator.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
@@ -43,7 +43,7 @@
class KFileSharePropsPlugin::Private
{
public:
- QVBox *m_vBox;
+ TQVBox *m_vBox;
KProcess *m_configProc;
bool m_bAllShared;
bool m_bAllUnshared;
@@ -98,14 +98,14 @@ void KFileSharePropsPlugin::init()
delete m_widget;
m_rbShare = 0L;
m_rbUnShare = 0L;
- m_widget = new QWidget( d->m_vBox );
- QVBoxLayout * vbox = new QVBoxLayout( m_widget );
+ m_widget = new TQWidget( d->m_vBox );
+ TQVBoxLayout * vbox = new TQVBoxLayout( m_widget );
switch ( KFileShare::authorization() ) {
case KFileShare::Authorized:
{
// Check if all selected dirs are in $HOME
- QString home = QDir::homeDirPath();
+ TQString home = TQDir::homeDirPath();
if ( home[home.length()-1] != '/' )
home += '/';
bool ok = true;
@@ -115,7 +115,7 @@ void KFileSharePropsPlugin::init()
d->m_bAllUnshared = true;
KFileItemListIterator it( items );
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
if ( !path.startsWith( home ) )
ok = false;
if ( KFileShare::isDirectoryShared( path ) )
@@ -125,7 +125,7 @@ void KFileSharePropsPlugin::init()
}
if ( !ok )
{
- vbox->addWidget( new QLabel( i18n( "Only folders in your home folder can be shared."),
+ vbox->addWidget( new TQLabel( i18n( "Only folders in your home folder can be shared."),
m_widget ), 0 );
}
else
@@ -134,15 +134,15 @@ void KFileSharePropsPlugin::init()
vbox->setSpacing( KDialog::spacingHint() );
vbox->setMargin( KDialog::marginHint() );
- QButtonGroup *rbGroup = new QButtonGroup( m_widget );
+ TQButtonGroup *rbGroup = new TQButtonGroup( m_widget );
rbGroup->hide();
- m_rbUnShare = new QRadioButton( i18n("Not shared"), m_widget );
- connect( m_rbUnShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbUnShare = new TQRadioButton( i18n("Not shared"), m_widget );
+ connect( m_rbUnShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbUnShare, 0 );
rbGroup->insert( m_rbUnShare );
- m_rbShare = new QRadioButton( i18n("Shared"), m_widget );
- connect( m_rbShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbShare = new TQRadioButton( i18n("Shared"), m_widget );
+ connect( m_rbShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbShare, 0 );
rbGroup->insert( m_rbShare );
@@ -153,17 +153,17 @@ void KFileSharePropsPlugin::init()
m_rbUnShare->setChecked(true);
// Some help text
- QLabel *label = new QLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
+ TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
KSeparator* sep=new KSeparator(m_widget);
vbox->addWidget( sep, 0 );
- label = new QLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
+ label = new TQLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 );
@@ -171,23 +171,23 @@ void KFileSharePropsPlugin::init()
}
break;
case KFileShare::ErrorNotFound:
- vbox->addWidget( new QLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
+ vbox->addWidget( new TQLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
m_widget ), 0 );
break;
case KFileShare::UserNotAllowed:
{
vbox->setSpacing( 10 );
if (KFileShare::sharingEnabled()) {
- vbox->addWidget( new QLabel( i18n("You need to be authorized to share folders."),
+ vbox->addWidget( new TQLabel( i18n("You need to be authorized to share folders."),
m_widget ), 0 );
} else {
- vbox->addWidget( new QLabel( i18n("File sharing is disabled."),
+ vbox->addWidget( new TQLabel( i18n("File sharing is disabled."),
m_widget ), 0 );
}
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
vbox->addLayout( hBox, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
hBox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 ); // align items on top
break;
@@ -211,8 +211,8 @@ void KFileSharePropsPlugin::slotConfigureFileSharing()
d->m_configProc = 0;
return;
}
- connect(d->m_configProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotConfigureFileSharingDone()));
+ connect(d->m_configProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotConfigureFileSharingDone()));
m_pbConfig->setEnabled(false);
}
@@ -241,7 +241,7 @@ void KFileSharePropsPlugin::applyChanges()
KFileItemListIterator it( items );
bool ok = true;
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
ok = setShared( path, share );
if (!ok) {
if (share)
@@ -267,13 +267,13 @@ void KFileSharePropsPlugin::applyChanges()
}
}
-bool KFileSharePropsPlugin::setShared( const QString& path, bool shared )
+bool KFileSharePropsPlugin::setShared( const TQString& path, bool shared )
{
kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," << shared << endl;
return KFileShare::setShared( path, shared );
}
-QWidget* KFileSharePropsPlugin::page() const
+TQWidget* KFileSharePropsPlugin::page() const
{
return d->m_vBox;
}
diff --git a/kio/kfile/kfilesharedlg.h b/kio/kfile/kfilesharedlg.h
index c95de779b..a314d0d06 100644
--- a/kio/kfile/kfilesharedlg.h
+++ b/kio/kfile/kfilesharedlg.h
@@ -46,7 +46,7 @@ public:
static bool supports( const KFileItemList& items );
- QWidget* page() const;
+ TQWidget* page() const;
protected slots:
void slotConfigureFileSharing();
@@ -54,12 +54,12 @@ protected slots:
private:
void init();
- bool setShared( const QString&path, bool shared );
+ bool setShared( const TQString&path, bool shared );
- QWidget *m_widget;
- QRadioButton *m_rbShare;
- QRadioButton *m_rbUnShare;
- QPushButton *m_pbConfig;
+ TQWidget *m_widget;
+ TQRadioButton *m_rbShare;
+ TQRadioButton *m_rbUnShare;
+ TQPushButton *m_pbConfig;
class Private;
Private *d;
};
diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp
index 350423d35..154009625 100644
--- a/kio/kfile/kfilespeedbar.cpp
+++ b/kio/kfile/kfilespeedbar.cpp
@@ -19,10 +19,10 @@
#include "kfilespeedbar.h"
#include "config-kfile.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -32,7 +32,7 @@
#include <kstandarddirs.h>
#include <kurl.h>
-KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
+KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name )
: KURLBar( true, parent, name )
{
KConfig *config = KGlobal::config();
@@ -49,14 +49,14 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Desktop"), false );
//TODO: win32
- if ((KGlobalSettings::documentPath() != (QDir::homeDirPath()+"/")) &&
- QDir(KGlobalSettings::documentPath()).exists())
+ if ((KGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) &&
+ TQDir(KGlobalSettings::documentPath()).exists())
{
u.setPath( KGlobalSettings::documentPath() );
insertItem( u, i18n("Documents"), false, "folder_txt" );
}
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
insertItem( u, i18n("Home Folder"), false,
"folder_home" );
@@ -65,33 +65,33 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Storage Media"), false,
KProtocolInfo::icon( "media" ) );
- if ( QFile::exists( QDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
+ if ( TQFile::exists( TQDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
{
- QString download, music, pictures, videos, templates, publicShares;
+ TQString download, music, pictures, videos, templates, publicShares;
- QFile f( QDir::homeDirPath()+"/.config/user-dirs.dirs" );
+ TQFile f( TQDir::homeDirPath()+"/.config/user-dirs.dirs" );
if (!f.open(IO_ReadOnly))
return;
- QTextStream s( &f );
- s.setCodec( QTextCodec::codecForLocale() );
+ TQTextStream s( &f );
+ s.setCodec( TQTextCodec::codecForLocale() );
// read the xdg user dirs
- QString line = s.readLine();
+ TQString line = s.readLine();
while (!line.isNull())
{
if (line.startsWith("XDG_DOWNLOAD_DIR="))
- download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_MUSIC_DIR="))
- music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PICTURES_DIR="))
- pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_VIDEOS_DIR="))
- videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_TEMPLATES_DIR="))
- templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PUBLICSHARES_DIR="))
- publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
line = s.readLine();
}
@@ -133,9 +133,9 @@ void KFileSpeedBar::save( KConfig *config )
writeConfig( config, "KFileDialog Speedbar" );
}
-QSize KFileSpeedBar::sizeHint() const
+TQSize KFileSpeedBar::sizeHint() const
{
- QSize sizeHint = KURLBar::sizeHint();
+ TQSize sizeHint = KURLBar::sizeHint();
int ems = fontMetrics().width("mmmmmmmmmmmm");
if (sizeHint.width() < ems)
{
diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h
index c941a2398..28c621651 100644
--- a/kio/kfile/kfilespeedbar.h
+++ b/kio/kfile/kfilespeedbar.h
@@ -27,11 +27,11 @@ class KIO_EXPORT KFileSpeedBar : public KURLBar
{
Q_OBJECT
public:
- KFileSpeedBar( QWidget *parent = 0, const char *name = 0 );
+ KFileSpeedBar( TQWidget *parent = 0, const char *name = 0 );
~KFileSpeedBar();
virtual void save( KConfig *config );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
private:
bool m_initializeSpeedbar : 1;
diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp
index b37662f89..352bd875e 100644
--- a/kio/kfile/kfiletreebranch.cpp
+++ b/kio/kfile/kfiletreebranch.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfileitem.h>
#include <kdebug.h>
@@ -34,8 +34,8 @@
/* --- KFileTreeViewToplevelItem --- */
KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
- const QString& name,
- const QPixmap& pix, bool showHidden,
+ const TQString& name,
+ const TQPixmap& pix, bool showHidden,
KFileTreeViewItem *branchRoot )
: KDirLister( false ),
@@ -64,37 +64,37 @@ KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
setShowingDotFiles( showHidden );
- connect( this, SIGNAL( refreshItems(const KFileItemList&)),
- this, SLOT ( slotRefreshItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)),
+ this, TQT_SLOT ( slotRefreshItems( const KFileItemList& )));
- connect( this, SIGNAL( newItems(const KFileItemList&)),
- this, SLOT ( addItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( newItems(const KFileItemList&)),
+ this, TQT_SLOT ( addItems( const KFileItemList& )));
- connect( this, SIGNAL( completed(const KURL& )),
- this, SLOT(slCompleted(const KURL&)));
+ connect( this, TQT_SIGNAL( completed(const KURL& )),
+ this, TQT_SLOT(slCompleted(const KURL&)));
- connect( this, SIGNAL( started( const KURL& )),
- this, SLOT( slotListerStarted( const KURL& )));
+ connect( this, TQT_SIGNAL( started( const KURL& )),
+ this, TQT_SLOT( slotListerStarted( const KURL& )));
- connect( this, SIGNAL( deleteItem( KFileItem* )),
- this, SLOT( slotDeleteItem( KFileItem* )));
+ connect( this, TQT_SIGNAL( deleteItem( KFileItem* )),
+ this, TQT_SLOT( slotDeleteItem( KFileItem* )));
- connect( this, SIGNAL( canceled(const KURL&) ),
- this, SLOT( slotCanceled(const KURL&) ));
+ connect( this, TQT_SIGNAL( canceled(const KURL&) ),
+ this, TQT_SLOT( slotCanceled(const KURL&) ));
- connect( this, SIGNAL( clear()),
- this, SLOT( slotDirlisterClear()));
+ connect( this, TQT_SIGNAL( clear()),
+ this, TQT_SLOT( slotDirlisterClear()));
- connect( this, SIGNAL( clear(const KURL&)),
- this, SLOT( slotDirlisterClearURL(const KURL&)));
+ connect( this, TQT_SIGNAL( clear(const KURL&)),
+ this, TQT_SLOT( slotDirlisterClearURL(const KURL&)));
- connect( this, SIGNAL( redirection( const KURL& , const KURL& ) ),
- this, SLOT( slotRedirect( const KURL&, const KURL& )));
+ connect( this, TQT_SIGNAL( redirection( const KURL& , const KURL& ) ),
+ this, TQT_SLOT( slotRedirect( const KURL&, const KURL& )));
m_openChildrenURLs.append( url );
}
-void KFileTreeBranch::setOpenPixmap( const QPixmap& pix )
+void KFileTreeBranch::setOpenPixmap( const TQPixmap& pix )
{
m_openRootIcon = pix;
@@ -123,7 +123,7 @@ KFileTreeViewItem *KFileTreeBranch::parentKFTVItem( KFileItem *item )
KURL url = item->url();
// kdDebug(250) << "Item's url is " << url.prettyURL() << endl;
KURL dirUrl( url );
- dirUrl.setFileName( QString::null );
+ dirUrl.setFileName( TQString::null );
// kdDebug(250) << "Directory url is " << dirUrl.prettyURL() << endl;
parent = findTVIByURL( dirUrl );
@@ -181,7 +181,7 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
/* Cut off the file extension in case it is not a directory */
if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */
{
- QString name = currItem->text();
+ TQString name = currItem->text();
int mPoint = name.findRev( '.' );
if( mPoint > 0 )
name = name.left( mPoint );
@@ -195,13 +195,13 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
if( dirOnlyMode() && !m_recurseChildren && currItem->isLocalFile( ) && currItem->isDir() )
{
KURL url = currItem->url();
- QString filename = url.directory( false, true ) + url.fileName();
+ TQString filename = url.directory( false, true ) + url.fileName();
/* do the stat trick of Carsten. The problem is, that the hardlink
* count only contains directory links. Thus, this method only seem
* to work in dir-only mode */
kdDebug(250) << "Doing stat on " << filename << endl;
KDE_struct_stat statBuf;
- if( KDE_stat( QFile::encodeName( filename ), &statBuf ) == 0 )
+ if( KDE_stat( TQFile::encodeName( filename ), &statBuf ) == 0 )
{
int hardLinks = statBuf.st_nlink; /* Count of dirs */
kdDebug(250) << "stat succeeded, hardlinks: " << hardLinks << endl;
@@ -346,7 +346,7 @@ void KFileTreeBranch::slotDirlisterClearURL( const KURL& url )
}
}
-void KFileTreeBranch::deleteChildrenOf( QListViewItem *parent )
+void KFileTreeBranch::deleteChildrenOf( TQListViewItem *parent )
{
// for some strange reason, slotDirlisterClearURL() sometimes calls us
// with a 0L parent.
@@ -446,7 +446,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
/* This is the starting point. The visible folder has finished,
processing the children has not yet started */
nextChild = static_cast<KFileTreeViewItem*>
- (static_cast<QListViewItem*>(currParent)->firstChild());
+ (static_cast<TQListViewItem*>(currParent)->firstChild());
if( ! nextChild )
{
@@ -480,7 +480,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
openURL( recurseUrl, true );
}
}
- nextChild = static_cast<KFileTreeViewItem*>(static_cast<QListViewItem*>(nextChild->nextSibling()));
+ nextChild = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(nextChild->nextSibling()));
// kdDebug(250) << "Next child " << m_nextChild << endl;
}
}
diff --git a/kio/kfile/kfiletreebranch.h b/kio/kfile/kfiletreebranch.h
index 97d41d9c3..30f5cf47c 100644
--- a/kio/kfile/kfiletreebranch.h
+++ b/kio/kfile/kfiletreebranch.h
@@ -22,8 +22,8 @@
#ifndef kfile_tree_branch_h
#define kfile_tree_branch_h
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
#include <kfileitem.h>
#include <kio/global.h>
@@ -59,8 +59,8 @@ public:
* branch, with the default 0 meaning to let KFileTreeBranch create
* it for you.
*/
- KFileTreeBranch( KFileTreeView*, const KURL& url, const QString& name,
- const QPixmap& pix, bool showHidden = false,
+ KFileTreeBranch( KFileTreeView*, const KURL& url, const TQString& name,
+ const TQPixmap& pix, bool showHidden = false,
KFileTreeViewItem *branchRoot = 0 );
/**
@@ -84,19 +84,19 @@ public:
/**
* @returns the name of the branch.
*/
- QString name() const { return( m_name ); }
+ TQString name() const { return( m_name ); }
/**
* sets the name of the branch.
*/
- virtual void setName( const QString n ) { m_name = n; };
+ virtual void setName( const TQString n ) { m_name = n; };
/*
* returns the current root item pixmap set in the constructor. The root
* item pixmap defaults to the icon for directories.
* @see openPixmap()
*/
- const QPixmap& pixmap(){ return(m_rootIcon); }
+ const TQPixmap& pixmap(){ return(m_rootIcon); }
/*
* returns the current root item pixmap set by setOpenPixmap()
@@ -106,7 +106,7 @@ public:
* Note that it depends on KFileTreeView::showFolderOpenPximap weather
* open pixmap are displayed or not.
*/
- const QPixmap& openPixmap() { return(m_openRootIcon); }
+ const TQPixmap& openPixmap() { return(m_openRootIcon); }
/**
* @returns whether the items in the branch show their file extensions in the
@@ -154,7 +154,7 @@ public slots:
*/
virtual void setShowExtensions( bool visible = true );
- void setOpenPixmap( const QPixmap& pix );
+ void setOpenPixmap( const TQPixmap& pix );
protected:
/**
@@ -201,13 +201,13 @@ private slots:
private:
KFileTreeViewItem *parentKFTVItem( KFileItem *item );
- static void deleteChildrenOf( QListViewItem *parent );
+ static void deleteChildrenOf( TQListViewItem *parent );
KFileTreeViewItem *m_root;
KURL m_startURL;
- QString m_name;
- QPixmap m_rootIcon;
- QPixmap m_openRootIcon;
+ TQString m_name;
+ TQPixmap m_rootIcon;
+ TQPixmap m_openRootIcon;
/* this list holds the url's which children are opened. */
KURL::List m_openChildrenURLs;
@@ -231,12 +231,12 @@ private:
/**
* List of KFileTreeBranches
*/
-typedef QPtrList<KFileTreeBranch> KFileTreeBranchList;
+typedef TQPtrList<KFileTreeBranch> KFileTreeBranchList;
/**
* Iterator for KFileTreeBranchLists
*/
-typedef QPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
+typedef TQPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
#endif
diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp
index 542e80d5b..e8451077d 100644
--- a/kio/kfile/kfiletreeview.cpp
+++ b/kio/kfile/kfiletreeview.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kdirnotify_stub.h>
#include <kglobalsettings.h>
@@ -39,7 +39,7 @@
#include "kfiletreebranch.h"
#include "kfiletreeviewitem.h"
-KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
+KFileTreeView::KFileTreeView( TQWidget *parent, const char *name )
: KListView( parent, name ),
m_wantOpenFolderPixmaps( true ),
m_toolTip( this )
@@ -47,33 +47,33 @@ KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
setDragEnabled(true);
setSelectionModeExt( KListView::Single );
- m_animationTimer = new QTimer( this );
- connect( m_animationTimer, SIGNAL( timeout() ),
- this, SLOT( slotAnimation() ) );
+ m_animationTimer = new TQTimer( this );
+ connect( m_animationTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAnimation() ) );
m_currentBeforeDropItem = 0;
m_dropItem = 0;
- m_autoOpenTimer = new QTimer( this );
- connect( m_autoOpenTimer, SIGNAL( timeout() ),
- this, SLOT( slotAutoOpenFolder() ) );
+ m_autoOpenTimer = new TQTimer( this );
+ connect( m_autoOpenTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpenFolder() ) );
/* The executed-Slot only opens a path, while the expanded-Slot populates it */
- connect( this, SIGNAL( executed( QListViewItem * ) ),
- this, SLOT( slotExecuted( QListViewItem * ) ) );
- connect( this, SIGNAL( expanded ( QListViewItem *) ),
- this, SLOT( slotExpanded( QListViewItem *) ));
- connect( this, SIGNAL( collapsed( QListViewItem *) ),
- this, SLOT( slotCollapsed( QListViewItem* )));
+ connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotExecuted( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded ( TQListViewItem *) ),
+ this, TQT_SLOT( slotExpanded( TQListViewItem *) ));
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem *) ),
+ this, TQT_SLOT( slotCollapsed( TQListViewItem* )));
/* connections from the konqtree widget */
- connect( this, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
- connect( this, SIGNAL( onItem( QListViewItem * )),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
- connect( this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)),
- this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int)));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem * )),
+ this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)),
+ this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int)));
m_bDrag = false;
@@ -93,12 +93,12 @@ KFileTreeView::~KFileTreeView()
}
-bool KFileTreeView::isValidItem( QListViewItem *item)
+bool KFileTreeView::isValidItem( TQListViewItem *item)
{
if (!item)
return false;
- QPtrList<QListViewItem> lst;
- QListViewItemIterator it( this );
+ TQPtrList<TQListViewItem> lst;
+ TQListViewItemIterator it( this );
while ( it.current() )
{
if ( it.current() == item )
@@ -108,7 +108,7 @@ bool KFileTreeView::isValidItem( QListViewItem *item)
return false;
}
-void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
+void KFileTreeView::contentsDragEnterEvent( TQDragEnterEvent *ev )
{
if ( ! acceptDrag( ev ) )
{
@@ -118,7 +118,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
ev->acceptAction();
m_currentBeforeDropItem = selectedItem();
- QListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
+ TQListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
if( item )
{
m_dropItem = item;
@@ -130,7 +130,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
}
}
-void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileTreeView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if( ! acceptDrag( e ) )
{
@@ -140,13 +140,13 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop( e->pos(), parent, afterme );
// "afterme" is 0 when aiming at a directory itself
- QListViewItem *item = afterme ? afterme : parent;
+ TQListViewItem *item = afterme ? afterme : parent;
if( item && item->isSelectable() )
{
@@ -164,7 +164,7 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileTreeView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
// Restore the current item to what it was before the dragging (#17070)
if ( isValidItem(m_currentBeforeDropItem) )
@@ -179,7 +179,7 @@ void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
}
-void KFileTreeView::contentsDropEvent( QDropEvent *e )
+void KFileTreeView::contentsDropEvent( TQDropEvent *e )
{
m_autoOpenTimer->stop();
@@ -192,12 +192,12 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop(e->pos(), parent, afterme);
- //kdDebug(250) << " parent=" << (parent?parent->text(0):QString::null)
- // << " afterme=" << (afterme?afterme->text(0):QString::null) << endl;
+ //kdDebug(250) << " parent=" << (parent?parent->text(0):TQString::null)
+ // << " afterme=" << (afterme?afterme->text(0):TQString::null) << endl;
if (e->source() == viewport() && itemsMovable())
movableDropEvent(parent, afterme);
@@ -225,7 +225,7 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
}
-bool KFileTreeView::acceptDrag(QDropEvent* e ) const
+bool KFileTreeView::acceptDrag(TQDropEvent* e ) const
{
bool ancestOK= acceptDrops();
@@ -242,25 +242,25 @@ bool KFileTreeView::acceptDrag(QDropEvent* e ) const
*/
return ancestOK && KURLDrag::canDecode( e ) &&
// Why this test? All DnDs are one of those AFAIK (DF)
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-QDragObject * KFileTreeView::dragObject()
+TQDragObject * KFileTreeView::dragObject()
{
KURL::List urls;
- const QPtrList<QListViewItem> fileList = selectedItems();
- QPtrListIterator<QListViewItem> it( fileList );
+ const TQPtrList<TQListViewItem> fileList = selectedItems();
+ TQPtrListIterator<TQListViewItem> it( fileList );
for ( ; it.current(); ++it )
{
urls.append( static_cast<KFileTreeViewItem*>(it.current())->url() );
}
- QPoint hotspot;
- QPixmap pixmap;
+ TQPoint hotspot;
+ TQPixmap pixmap;
if( urls.count() > 1 ){
pixmap = DesktopIcon( "kmultiple", 16 );
}
@@ -268,7 +268,7 @@ QDragObject * KFileTreeView::dragObject()
pixmap = currentKFileTreeViewItem()->fileItem()->pixmap( 16 );
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* dragObject = new KURLDrag( urls, this );
+ TQDragObject* dragObject = new KURLDrag( urls, this );
if( dragObject )
dragObject->setPixmap( pixmap, hotspot );
return dragObject;
@@ -276,7 +276,7 @@ QDragObject * KFileTreeView::dragObject()
-void KFileTreeView::slotCollapsed( QListViewItem *item )
+void KFileTreeView::slotCollapsed( TQListViewItem *item )
{
KFileTreeViewItem *kftvi = static_cast<KFileTreeViewItem*>(item);
kdDebug(250) << "hit slotCollapsed" << endl;
@@ -286,7 +286,7 @@ void KFileTreeView::slotCollapsed( QListViewItem *item )
}
}
-void KFileTreeView::slotExpanded( QListViewItem *item )
+void KFileTreeView::slotExpanded( TQListViewItem *item )
{
kdDebug(250) << "slotExpanded here !" << endl;
@@ -320,7 +320,7 @@ void KFileTreeView::slotExpanded( QListViewItem *item )
-void KFileTreeView::slotExecuted( QListViewItem *item )
+void KFileTreeView::slotExecuted( TQListViewItem *item )
{
if ( !item )
return;
@@ -354,16 +354,16 @@ void KFileTreeView::slotSelectionChanged()
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
bool showHidden )
{
- const QPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
+ const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
return addBranch( path, name, folderPix, showHidden);
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
- const QPixmap& pix, bool showHidden )
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
+ const TQPixmap& pix, bool showHidden )
{
kdDebug(250) << "adding another root " << path.prettyURL() << endl;
@@ -375,26 +375,26 @@ KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name
KFileTreeBranch *KFileTreeView::addBranch(KFileTreeBranch *newBranch)
{
- connect( newBranch, SIGNAL(populateFinished( KFileTreeViewItem* )),
- this, SLOT( slotPopulateFinished( KFileTreeViewItem* )));
+ connect( newBranch, TQT_SIGNAL(populateFinished( KFileTreeViewItem* )),
+ this, TQT_SLOT( slotPopulateFinished( KFileTreeViewItem* )));
- connect( newBranch, SIGNAL( newTreeViewItems( KFileTreeBranch*,
+ connect( newBranch, TQT_SIGNAL( newTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )),
- this, SLOT( slotNewTreeViewItems( KFileTreeBranch*,
+ this, TQT_SLOT( slotNewTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )));
m_branches.append( newBranch );
return( newBranch );
}
-KFileTreeBranch *KFileTreeView::branch( const QString& searchName )
+KFileTreeBranch *KFileTreeView::branch( const TQString& searchName )
{
KFileTreeBranch *branch = 0;
- QPtrListIterator<KFileTreeBranch> it( m_branches );
+ TQPtrListIterator<KFileTreeBranch> it( m_branches );
while ( (branch = it.current()) != 0 ) {
++it;
- QString bname = branch->name();
+ TQString bname = branch->name();
kdDebug(250) << "This is the branches name: " << bname << endl;
if( bname == searchName )
{
@@ -463,7 +463,7 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
if( m_nextUrlToSelect.equals(url, true )) // ignore trailing / on dirs
{
- setCurrentItem( static_cast<QListViewItem*>(*it) );
+ setCurrentItem( static_cast<TQListViewItem*>(*it) );
m_nextUrlToSelect = KURL();
end = true;
}
@@ -471,9 +471,9 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
}
}
-QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
+TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
{
- QPixmap pix;
+ TQPixmap pix;
kdDebug(250) << "Setting icon for column " << gap << endl;
if( item )
@@ -497,7 +497,7 @@ QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
* change the fileitem's pixmap to the open folder pixmap. */
if( item->isDir() && m_wantOpenFolderPixmaps )
{
- if( isOpen( static_cast<QListViewItem*>(item)))
+ if( isOpen( static_cast<TQListViewItem*>(item)))
pix = m_openFolderPixmap;
}
}
@@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation()
}
uint & iconNumber = it.data().iconNumber;
- QString icon = QString::fromLatin1( it.data().iconBaseName ).append( QString::number( iconNumber ) );
+ TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
// kdDebug(250) << "Loading icon " << icon << endl;
item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) );
@@ -597,7 +597,7 @@ KURL KFileTreeView::currentURL() const
return KURL();
}
-void KFileTreeView::slotOnItem( QListViewItem *item )
+void KFileTreeView::slotOnItem( TQListViewItem *item )
{
KFileTreeViewItem *i = static_cast<KFileTreeViewItem *>( item );
if( i )
@@ -610,28 +610,28 @@ void KFileTreeView::slotOnItem( QListViewItem *item )
}
}
-void KFileTreeView::slotItemRenamed(QListViewItem* item, const QString &name, int col)
+void KFileTreeView::slotItemRenamed(TQListViewItem* item, const TQString &name, int col)
{
(void) item;
kdDebug(250) << "Do not bother: " << name << col << endl;
}
-KFileTreeViewItem *KFileTreeView::findItem( const QString& branchName, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( const TQString& branchName, const TQString& relUrl )
{
KFileTreeBranch *br = branch( branchName );
return( findItem( br, relUrl ));
}
-KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const TQString& relUrl )
{
KFileTreeViewItem *ret = 0;
if( brnch )
{
KURL url = brnch->rootUrl();
- if( ! relUrl.isEmpty() && QDir::isRelativePath(relUrl) )
+ if( ! relUrl.isEmpty() && TQDir::isRelativePath(relUrl) )
{
- QString partUrl( relUrl );
+ TQString partUrl( relUrl );
if( partUrl.endsWith("/"))
partUrl.truncate( relUrl.length()-1 );
@@ -659,12 +659,12 @@ KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QStrin
///////////////////////////////////////////////////////////////////
-void KFileTreeViewToolTip::maybeTip( const QPoint & )
+void KFileTreeViewToolTip::maybeTip( const TQPoint & )
{
#if 0
- QListViewItem *item = m_view->itemAt( point );
+ TQListViewItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KFileViewItem*>( item )->toolTipText();
+ TQString text = static_cast<KFileViewItem*>( item )->toolTipText();
if ( !text.isEmpty() )
tip ( m_view->itemRect( item ), text );
}
diff --git a/kio/kfile/kfiletreeview.h b/kio/kfile/kfiletreeview.h
index 93af623a6..d534fb4fb 100644
--- a/kio/kfile/kfiletreeview.h
+++ b/kio/kfile/kfiletreeview.h
@@ -21,11 +21,11 @@
#ifndef kfile_tree_view_h
#define kfile_tree_view_h
-#include <qmap.h>
-#include <qpoint.h>
-#include <qpixmap.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
#include <klistview.h>
#include <kdirnotify.h>
@@ -40,13 +40,13 @@ class QTimer;
class KIO_EXPORT KFileTreeViewToolTip : public QToolTip
{
public:
- KFileTreeViewToolTip( QListView *view ) : QToolTip( view ), m_view( view ) {}
+ KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint & );
+ virtual void maybeTip( const TQPoint & );
private:
- QListView *m_view;
+ TQListView *m_view;
};
@@ -67,7 +67,7 @@ class KIO_EXPORT KFileTreeView : public KListView
{
Q_OBJECT
public:
- KFileTreeView( QWidget *parent, const char *name = 0 );
+ KFileTreeView( TQWidget *parent, const char *name = 0 );
virtual ~KFileTreeView();
/**
@@ -93,13 +93,13 @@ public:
* @param name is the name of the branch, which will be the text for column 0
* @param showHidden says if hidden files and directories should be visible
*/
- KFileTreeBranch* addBranch( const KURL &path, const QString& name, bool showHidden = false );
+ KFileTreeBranch* addBranch( const KURL &path, const TQString& name, bool showHidden = false );
/**
* same as the function above but with a pixmap to set for the branch.
*/
- virtual KFileTreeBranch* addBranch( const KURL &path, const QString& name ,
- const QPixmap& pix, bool showHidden = false );
+ virtual KFileTreeBranch* addBranch( const KURL &path, const TQString& name ,
+ const TQPixmap& pix, bool showHidden = false );
/**
* same as the function above but letting the user create the branch.
@@ -117,7 +117,7 @@ public:
* @returns a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.
* @param searchName is the name of a branch
*/
- KFileTreeBranch *branch( const QString& searchName );
+ KFileTreeBranch *branch( const TQString& searchName );
/**
@@ -139,12 +139,12 @@ public:
* @param brnch is a pointer to the branch to search in
* @param relUrl is the branch relativ url
*/
- KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const QString& relUrl );
+ KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const TQString& relUrl );
/**
* see method above, differs only in the first parameter. Finds the branch by its name.
*/
- KFileTreeViewItem *findItem( const QString& branchName, const QString& relUrl );
+ KFileTreeViewItem *findItem( const TQString& branchName, const TQString& relUrl );
/**
* @returns a flag indicating if extended folder pixmaps are displayed or not.
@@ -168,15 +168,15 @@ protected:
* @returns true if we can decode the drag and support the action
*/
- virtual bool acceptDrag(QDropEvent* event) const;
- virtual QDragObject * dragObject();
+ virtual bool acceptDrag(TQDropEvent* event) const;
+ virtual TQDragObject * dragObject();
virtual void startAnimation( KFileTreeViewItem* item, const char * iconBaseName = "kde", uint iconCount = 6 );
virtual void stopAnimation( KFileTreeViewItem* item );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
protected slots:
virtual void slotNewTreeViewItems( KFileTreeBranch*,
@@ -185,12 +185,12 @@ protected slots:
virtual void slotSetNextUrlToSelect( const KURL &url )
{ m_nextUrlToSelect = url; }
- virtual QPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
+ virtual TQPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
private slots:
- void slotExecuted( QListViewItem * );
- void slotExpanded( QListViewItem * );
- void slotCollapsed( QListViewItem *item );
+ void slotExecuted( TQListViewItem * );
+ void slotExpanded( TQListViewItem * );
+ void slotCollapsed( TQListViewItem *item );
void slotSelectionChanged();
@@ -198,26 +198,26 @@ private slots:
void slotAutoOpenFolder();
- void slotOnItem( QListViewItem * );
- void slotItemRenamed(QListViewItem*, const QString &, int);
+ void slotOnItem( TQListViewItem * );
+ void slotItemRenamed(TQListViewItem*, const TQString &, int);
void slotPopulateFinished( KFileTreeViewItem* );
signals:
- void onItem( const QString& );
+ void onItem( const TQString& );
/* New signals if you like it ? */
- void dropped( QWidget*, QDropEvent* );
- void dropped( QWidget*, QDropEvent*, KURL::List& );
+ void dropped( TQWidget*, TQDropEvent* );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List& );
void dropped( KURL::List&, KURL& );
// The drop event allows to differentiate between move and copy
- void dropped( QWidget*, QDropEvent*, KURL::List&, KURL& );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& );
- void dropped( QDropEvent *e, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *);
- void dropped(QDropEvent *e, QListViewItem * parent, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *, QListViewItem *);
+ void dropped( TQDropEvent *e, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *);
+ void dropped(TQDropEvent *e, TQListViewItem * parent, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *);
protected:
KURL m_nextUrlToSelect;
@@ -225,7 +225,7 @@ protected:
private:
// Returns whether item is still a valid item in the tree
- bool isValidItem( QListViewItem *item);
+ bool isValidItem( TQListViewItem *item);
void clearTree();
@@ -235,30 +235,30 @@ private:
struct AnimationInfo
{
- AnimationInfo( const char * _iconBaseName, uint _iconCount, const QPixmap & _originalPixmap )
+ AnimationInfo( const char * _iconBaseName, uint _iconCount, const TQPixmap & _originalPixmap )
: iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {}
AnimationInfo() : iconCount(0) {}
- QCString iconBaseName;
+ TQCString iconBaseName;
uint iconCount;
uint iconNumber;
- QPixmap originalPixmap;
+ TQPixmap originalPixmap;
};
- typedef QMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
+ typedef TQMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
MapCurrentOpeningFolders m_mapCurrentOpeningFolders;
- QTimer *m_animationTimer;
+ TQTimer *m_animationTimer;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
bool m_bDrag;
bool m_wantOpenFolderPixmaps; // Flag weather the folder should have open-folder pixmaps
- QListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
- QListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
- QStrList m_lstDropFormats;
- QPixmap m_openFolderPixmap;
- QTimer *m_autoOpenTimer;
+ TQListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
+ TQListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
+ TQStrList m_lstDropFormats;
+ TQPixmap m_openFolderPixmap;
+ TQTimer *m_autoOpenTimer;
KFileTreeViewToolTip m_toolTip;
diff --git a/kio/kfile/kfiletreeviewitem.cpp b/kio/kfile/kfiletreeviewitem.cpp
index 96c100521..17e2d9abe 100644
--- a/kio/kfile/kfiletreeviewitem.cpp
+++ b/kio/kfile/kfiletreeviewitem.cpp
@@ -42,7 +42,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
KFileItem* item,
KFileTreeBranch *brnch )
- :KListViewItem( (QListView*)parent ),
+ :KListViewItem( (TQListView*)parent ),
m_kfileitem(item ),
m_branch( brnch ),
m_wasListed(false)
@@ -72,9 +72,9 @@ KURL KFileTreeViewItem::url() const
return m_kfileitem ? m_kfileitem->url() : KURL();
}
-QString KFileTreeViewItem::path() const
+TQString KFileTreeViewItem::path() const
{
- return m_kfileitem ? m_kfileitem->url().path() : QString::null;
+ return m_kfileitem ? m_kfileitem->url().path() : TQString::null;
}
bool KFileTreeViewItem::isDir() const
diff --git a/kio/kfile/kfiletreeviewitem.h b/kio/kfile/kfiletreeviewitem.h
index 69e4a2d90..fe338df3b 100644
--- a/kio/kfile/kfiletreeviewitem.h
+++ b/kio/kfile/kfiletreeviewitem.h
@@ -20,7 +20,7 @@
#ifndef kfile_tree_view_item_h
#define kfile_tree_view_item_h
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kfileitem.h>
@@ -57,7 +57,7 @@ public:
/**
* @return the path of the item.
*/
- QString path() const;
+ TQString path() const;
/**
* @return the items KURL
@@ -94,12 +94,12 @@ private:
/**
* List of KFileTreeViewItems
*/
-typedef QPtrList<KFileTreeViewItem> KFileTreeViewItemList;
+typedef TQPtrList<KFileTreeViewItem> KFileTreeViewItemList;
/**
* Iterator for KFileTreeViewItemList
*/
-typedef QPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
+typedef TQPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
#endif
diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp
index 976d3b815..165801652 100644
--- a/kio/kfile/kfileview.cpp
+++ b/kio/kfile/kfileview.cpp
@@ -36,7 +36,7 @@
#undef Unsorted
#endif
-QDir::SortSpec KFileView::defaultSortSpec = static_cast<QDir::SortSpec>(QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
+TQDir::SortSpec KFileView::defaultSortSpec = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst);
class KFileView::KFileViewPrivate
{
@@ -55,7 +55,7 @@ public:
}
}
- QGuardedPtr<KActionCollection> actions;
+ TQGuardedPtr<KActionCollection> actions;
int dropOptions;
};
@@ -90,20 +90,20 @@ KFileView::~KFileView()
void KFileView::setParentView(KFileView *parent)
{
if ( parent ) { // pass all signals right to our parent
- QObject::connect(sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& ) ),
- parent->sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& )));
- QObject::connect(sig, SIGNAL( dirActivated(const KFileItem *)),
- parent->sig, SIGNAL( dirActivated(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileSelected(const KFileItem *)),
- parent->sig, SIGNAL( fileSelected(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- parent->sig,SIGNAL(fileHighlighted(const KFileItem*)));
- QObject::connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- parent->sig, SIGNAL(sortingChanged( QDir::SortSpec)));
- QObject::connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- parent->sig, SIGNAL(dropped(const KFileItem *, QDropEvent*, const KURL::List&)));
+ TQObject::connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& ) ),
+ parent->sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& )));
+ TQObject::connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( dirActivated(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( fileSelected(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ parent->sig,TQT_SIGNAL(fileHighlighted(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ parent->sig, TQT_SIGNAL(sortingChanged( TQDir::SortSpec)));
+ TQObject::connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ parent->sig, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&)));
}
}
@@ -148,7 +148,7 @@ void KFileView::insertItem( KFileItem * )
{
}
-void KFileView::setSorting(QDir::SortSpec new_sort)
+void KFileView::setSorting(TQDir::SortSpec new_sort)
{
m_sorting = new_sort;
}
@@ -165,16 +165,16 @@ void KFileView::sortReversed()
{
int spec = sorting();
- setSorting( static_cast<QDir::SortSpec>( spec ^ QDir::Reversed ) );
+ setSorting( static_cast<TQDir::SortSpec>( spec ^ TQDir::Reversed ) );
}
#if 0
int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
{
- static const QString &dirup = KGlobal::staticQString("..");
+ static const TQString &dirup = KGlobal::staticQString("..");
bool bigger = true;
bool keepFirst = false;
- bool dirsFirst = ((m_sorting & QDir::DirsFirst) == QDir::DirsFirst);
+ bool dirsFirst = ((m_sorting & TQDir::DirsFirst) == TQDir::DirsFirst);
if (fi1 == fi2)
return 0;
@@ -196,21 +196,21 @@ int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
}
else {
- QDir::SortSpec sort = static_cast<QDir::SortSpec>(m_sorting & QDir::SortByMask);
+ TQDir::SortSpec sort = static_cast<TQDir::SortSpec>(m_sorting & TQDir::SortByMask);
//if (fi1->isDir() || fi2->isDir())
- // sort = static_cast<QDir::SortSpec>(KFileView::defaultSortSpec & QDir::SortByMask);
+ // sort = static_cast<TQDir::SortSpec>(KFileView::defaultSortSpec & TQDir::SortByMask);
switch (sort) {
- case QDir::Name:
+ case TQDir::Name:
default:
sort_by_name:
- if ( (m_sorting & QDir::IgnoreCase) == QDir::IgnoreCase )
+ if ( (m_sorting & TQDir::IgnoreCase) == TQDir::IgnoreCase )
bigger = (fi1->name( true ) > fi2->name( true ));
else
bigger = (fi1->name() > fi2->name());
break;
- case QDir::Time:
+ case TQDir::Time:
{
time_t t1 = fi1->time( KIO::UDS_MODIFICATION_TIME );
time_t t2 = fi2->time( KIO::UDS_MODIFICATION_TIME );
@@ -226,7 +226,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Size:
+ case TQDir::Size:
{
KIO::filesize_t s1 = fi1->size();
KIO::filesize_t s2 = fi2->size();
@@ -242,7 +242,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Unsorted:
+ case TQDir::Unsorted:
bigger = true; // nothing
break;
}
@@ -265,7 +265,7 @@ void KFileView::updateView(const KFileItem *)
{
}
-void KFileView::setCurrentItem(const QString &filename )
+void KFileView::setCurrentItem(const TQString &filename )
{
if (!filename.isNull()) {
KFileItem *item;
@@ -369,27 +369,27 @@ KActionCollection * KFileView::actionCollection() const
return d->actions;
}
-void KFileView::readConfig( KConfig *, const QString& )
+void KFileView::readConfig( KConfig *, const TQString& )
{
}
-void KFileView::writeConfig( KConfig *, const QString& )
+void KFileView::writeConfig( KConfig *, const TQString& )
{
}
-QString KFileView::sortingKey( const QString& value, bool isDir, int sortSpec )
+TQString KFileView::sortingKey( const TQString& value, bool isDir, int sortSpec )
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
- QString result = (sortSpec & QDir::IgnoreCase) ? value.lower() : value;
+ TQString result = (sortSpec & TQDir::IgnoreCase) ? value.lower() : value;
return result.prepend( start );
}
-QString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
+TQString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
return KIO::number( value ).rightJustify( 24, '0' ).prepend( start );
}
@@ -411,7 +411,7 @@ int KFileView::dropOptions()
int KFileView::autoOpenDelay()
{
- return (QApplication::startDragTime() * 3) / 2;
+ return (TQApplication::startDragTime() * 3) / 2;
}
void KFileView::virtual_hook( int id, void* data)
diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h
index 0b2002e3b..a42927f1b 100644
--- a/kio/kfile/kfileview.h
+++ b/kio/kfile/kfileview.h
@@ -25,7 +25,7 @@
class QPoint;
class KActionCollection;
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kfileitem.h"
#include "kfile.h"
@@ -55,22 +55,22 @@ public:
*/
void highlightFile(const KFileItem *i) { emit fileHighlighted(i); }
- void activateMenu( const KFileItem *i, const QPoint& pos ) {
+ void activateMenu( const KFileItem *i, const TQPoint& pos ) {
emit activatedMenu( i, pos );
}
- void changeSorting( QDir::SortSpec sorting ) {
+ void changeSorting( TQDir::SortSpec sorting ) {
emit sortingChanged( sorting );
}
- void dropURLs(const KFileItem *i, QDropEvent*e, const KURL::List&urls) {
+ void dropURLs(const KFileItem *i, TQDropEvent*e, const KURL::List&urls) {
emit dropped(i, e, urls);
}
signals:
void dirActivated(const KFileItem*);
- void sortingChanged( QDir::SortSpec );
+ void sortingChanged( TQDir::SortSpec );
/**
* the item maybe be 0L, indicating that we're in multiselection mode and
@@ -78,8 +78,8 @@ signals:
*/
void fileHighlighted(const KFileItem*);
void fileSelected(const KFileItem*);
- void activatedMenu( const KFileItem *i, const QPoint& );
- void dropped(const KFileItem *, QDropEvent*, const KURL::List&);
+ void activatedMenu( const KFileItem *i, const TQPoint& );
+ void dropped(const KFileItem *, TQDropEvent*, const KURL::List&);
};
/**
@@ -111,21 +111,21 @@ public:
void addItemList(const KFileItemList &list);
/**
- * a pure virtual function to get a QWidget, that can be added to
+ * a pure virtual function to get a TQWidget, that can be added to
* other widgets. This function is needed to make it possible for
* derived classes to derive from other widgets.
**/
- virtual QWidget *widget() = 0;
+ virtual TQWidget *widget() = 0;
/**
* ### As const-method, to be fixed in 3.0
*/
- QWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
+ TQWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
/**
* Sets @p filename the current item in the view, if available.
*/
- void setCurrentItem( const QString &filename );
+ void setCurrentItem( const TQString &filename );
/**
* Reimplement this to set @p item the current item in the view, e.g.
@@ -174,29 +174,29 @@ public:
* Returns the sorting order of the internal list. Newly added files
* are added through this sorting.
*/
- QDir::SortSpec sorting() const { return m_sorting; }
+ TQDir::SortSpec sorting() const { return m_sorting; }
/**
* Sets the sorting order of the view.
*
- * Default is QDir::Name | QDir::IgnoreCase | QDir::DirsFirst
+ * Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst
* Override this in your subclass and sort accordingly (usually by
* setting the sorting-key for every item and telling QIconView
- * or QListView to sort.
+ * or TQListView to sort.
*
- * A view may choose to use a different sorting than QDir::Name, Time
+ * A view may choose to use a different sorting than TQDir::Name, Time
* or Size. E.g. to sort by mimetype or any possible string. Set the
- * sorting to QDir::Unsorted for that and do the rest internally.
+ * sorting to TQDir::Unsorted for that and do the rest internally.
*
* @see sortingKey
*/
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
/**
* Tells whether the current items are in reversed order (shortcut to
- * sorting() & QDir::Reversed).
+ * sorting() & TQDir::Reversed).
*/
- bool isReversed() const { return (m_sorting & QDir::Reversed); }
+ bool isReversed() const { return (m_sorting & TQDir::Reversed); }
void sortReversed();
@@ -231,13 +231,13 @@ public:
* somewhere, e.g. in a menu, where the user can choose between views.
* @see setViewName
*/
- QString viewName() const { return m_viewName; }
+ TQString viewName() const { return m_viewName; }
/**
* Sets the name of the view, which could be displayed somewhere.
* E.g. "Image Preview".
*/
- void setViewName( const QString& name ) { m_viewName = name; }
+ void setViewName( const TQString& name ) { m_viewName = name; }
virtual void setParentView(KFileView *parent);
@@ -346,8 +346,8 @@ public:
KFileViewSignaler * signaler() const { return sig; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* Various options for drag and drop support.
@@ -375,27 +375,27 @@ public:
int dropOptions();
/**
- * This method calculates a QString from the given parameters, that is
- * suitable for sorting with e.g. QIconView or QListView. Their
- * Item-classes usually have a setKey( const QString& ) method or a virtual
- * method QString key() that is used for sorting.
+ * This method calculates a TQString from the given parameters, that is
+ * suitable for sorting with e.g. TQIconView or TQListView. Their
+ * Item-classes usually have a setKey( const TQString& ) method or a virtual
+ * method TQString key() that is used for sorting.
*
* @param value Any string that should be used as sort criterion
* @param isDir Tells whether the key is computed for an item representing
* a directory (directories are usually sorted before files)
- * @param sortSpec An ORed combination of QDir::SortSpec flags.
+ * @param sortSpec An ORed combination of TQDir::SortSpec flags.
* Currently, the values IgnoreCase, Reversed and
* DirsFirst are taken into account.
*/
- static QString sortingKey( const QString& value, bool isDir, int sortSpec);
+ static TQString sortingKey( const TQString& value, bool isDir, int sortSpec);
/**
- * An overloaded method that takes not a QString, but a number as sort
+ * An overloaded method that takes not a TQString, but a number as sort
* criterion. You can use this for file-sizes or dates/times for example.
* If you use a time_t, you need to cast that to KIO::filesize_t because
* of ambiguity problems.
*/
- static QString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
+ static TQString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
/**
* @internal
@@ -411,9 +411,9 @@ protected:
KFileViewSignaler *sig;
private:
- static QDir::SortSpec defaultSortSpec;
- QDir::SortSpec m_sorting;
- QString m_viewName;
+ static TQDir::SortSpec defaultSortSpec;
+ TQDir::SortSpec m_sorting;
+ TQString m_viewName;
/**
* counters
diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp
index 21a6ff6cd..164abd35a 100644
--- a/kio/kfile/kicondialog.cpp
+++ b/kio/kfile/kicondialog.cpp
@@ -29,20 +29,20 @@
#include <kfiledialog.h>
#include <kimagefilepreview.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qsortedlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qtimer.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qfileinfo.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqsortedlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqtimer.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqfileinfo.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#ifdef HAVE_LIBART
#include <svgicons/ksvgiconengine.h>
@@ -63,17 +63,17 @@ class KIconCanvas::KIconCanvasPrivate
class IconPath : public QString
{
protected:
- QString m_iconName;
+ TQString m_iconName;
public:
- IconPath(const QString &ip) : QString (ip)
+ IconPath(const TQString &ip) : TQString (ip)
{
int n = findRev('/');
- m_iconName = (n==-1) ? static_cast<QString>(*this) : mid(n+1);
+ m_iconName = (n==-1) ? static_cast<TQString>(*this) : mid(n+1);
}
- IconPath() : QString ()
+ IconPath() : TQString ()
{ }
bool operator== (const IconPath &ip) const
@@ -88,14 +88,14 @@ public:
* KIconCanvas: Iconview for the iconloader dialog.
*/
-KIconCanvas::KIconCanvas(QWidget *parent, const char *name)
+KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
: KIconView(parent, name)
{
d = new KIconCanvasPrivate;
- mpTimer = new QTimer(this);
- connect(mpTimer, SIGNAL(timeout()), SLOT(slotLoadFiles()));
- connect(this, SIGNAL(currentChanged(QIconViewItem *)),
- SLOT(slotCurrentChanged(QIconViewItem *)));
+ mpTimer = new TQTimer(this);
+ connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
+ connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)),
+ TQT_SLOT(slotCurrentChanged(TQIconViewItem *)));
setGridX(80);
setWordWrapIconText(false);
setShowToolTips(true);
@@ -107,7 +107,7 @@ KIconCanvas::~KIconCanvas()
delete d;
}
-void KIconCanvas::loadFiles(const QStringList& files)
+void KIconCanvas::loadFiles(const TQStringList& files)
{
clear();
mFiles = files;
@@ -119,7 +119,7 @@ void KIconCanvas::loadFiles(const QStringList& files)
void KIconCanvas::slotLoadFiles()
{
setResizeMode(Fixed);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
// disable updates to not trigger paint events when adding child items
setUpdatesEnabled( false );
@@ -130,9 +130,9 @@ void KIconCanvas::slotLoadFiles()
d->m_bLoading = true;
int i;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
uint emitProgress = 10; // so we will emit it once in the beginning
- QStringList::ConstIterator end(mFiles.end());
+ TQStringList::ConstIterator end(mFiles.end());
for (it=mFiles.begin(), i=0; it!=end; ++it, i++)
{
// Calling kapp->processEvents() makes the iconview flicker like hell
@@ -149,11 +149,11 @@ void KIconCanvas::slotLoadFiles()
// kapp->processEvents();
if ( !d->m_bLoading ) // user clicked on a button that will load another set of icons
break;
- QImage img;
+ TQImage img;
// Use the extension as the format. Works for XPM and PNG, but not for SVG
- QString path= *it;
- QString ext = path.right(3).upper();
+ TQString path= *it;
+ TQString ext = path.right(3).upper();
if (ext != "SVG" && ext != "VGZ")
img.load(*it);
@@ -177,10 +177,10 @@ void KIconCanvas::slotLoadFiles()
img = img.smoothScale(width, 60);
}
}
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage(img);
- QFileInfo fi(*it);
- QIconViewItem *item = new QIconViewItem(this, fi.baseName(), pm);
+ TQFileInfo fi(*it);
+ TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(), pm);
item->setKey(*it);
item->setDragEnabled(false);
item->setDropEnabled(false);
@@ -193,16 +193,16 @@ void KIconCanvas::slotLoadFiles()
// enable updates since we have to draw the whole view now
setUpdatesEnabled( true );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
d->m_bLoading = false;
emit finished();
setResizeMode(Adjust);
}
-QString KIconCanvas::getCurrent() const
+TQString KIconCanvas::getCurrent() const
{
if (!currentItem())
- return QString::null;
+ return TQString::null;
return currentItem()->key();
}
@@ -211,9 +211,9 @@ void KIconCanvas::stopLoading()
d->m_bLoading = false;
}
-void KIconCanvas::slotCurrentChanged(QIconViewItem *item)
+void KIconCanvas::slotCurrentChanged(TQIconViewItem *item)
{
- emit nameChanged((item != 0L) ? item->text() : QString::null);
+ emit nameChanged((item != 0L) ? item->text() : TQString::null);
}
class KIconDialog::KIconDialogPrivate
@@ -227,8 +227,8 @@ class KIconDialog::KIconDialogPrivate
}
~KIconDialogPrivate() {}
bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir;
- QString custom;
- QString customLocation;
+ TQString custom;
+ TQString customLocation;
KIconViewSearchLine *searchLine;
};
@@ -237,7 +237,7 @@ class KIconDialog::KIconDialogPrivate
* specified icons can be chosen.
*/
-KIconDialog::KIconDialog(QWidget *parent, const char *name)
+KIconDialog::KIconDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
d = new KIconDialogPrivate;
@@ -245,7 +245,7 @@ KIconDialog::KIconDialog(QWidget *parent, const char *name)
init();
}
-KIconDialog::KIconDialog(KIconLoader *loader, QWidget *parent,
+KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent,
const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
@@ -259,42 +259,42 @@ void KIconDialog::init()
mGroupOrSize = KIcon::Desktop;
mContext = KIcon::Any;
mType = 0;
- mFileList = KGlobal::dirs()->findAllResources("appicon", QString::fromLatin1("*.png"));
+ mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
- QWidget *main = new QWidget( this );
+ TQWidget *main = new TQWidget( this );
setMainWidget(main);
- QVBoxLayout *top = new QVBoxLayout(main);
+ TQVBoxLayout *top = new TQVBoxLayout(main);
top->setSpacing( spacingHint() );
- QButtonGroup *bgroup = new QButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
+ TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
bgroup->layout()->setSpacing(KDialog::spacingHint());
bgroup->layout()->setMargin(KDialog::marginHint());
top->addWidget(bgroup);
- connect(bgroup, SIGNAL(clicked(int)), SLOT(slotButtonClicked(int)));
- QGridLayout *grid = new QGridLayout(bgroup->layout(), 3, 2);
- mpRb1 = new QRadioButton(i18n("S&ystem icons:"), bgroup);
+ connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int)));
+ TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2);
+ mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup);
grid->addWidget(mpRb1, 1, 0);
- mpCombo = new QComboBox(bgroup);
- connect(mpCombo, SIGNAL(activated(int)), SLOT(slotContext(int)));
+ mpCombo = new TQComboBox(bgroup);
+ connect(mpCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotContext(int)));
grid->addWidget(mpCombo, 1, 1);
- mpRb2 = new QRadioButton(i18n("O&ther icons:"), bgroup);
+ mpRb2 = new TQRadioButton(i18n("O&ther icons:"), bgroup);
grid->addWidget(mpRb2, 2, 0);
- mpBrowseBut = new QPushButton(i18n("&Browse..."), bgroup);
+ mpBrowseBut = new TQPushButton(i18n("&Browse..."), bgroup);
grid->addWidget(mpBrowseBut, 2, 1);
//
// ADD SEARCHLINE
//
- QHBoxLayout *searchLayout = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ TQHBoxLayout *searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint());
top->addLayout(searchLayout);
- QToolButton *clearSearch = new QToolButton(main);
+ TQToolButton *clearSearch = new TQToolButton(main);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
searchLayout->addWidget(clearSearch);
- QLabel *searchLabel = new QLabel(i18n("&Search:"), main);
+ TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main);
searchLayout->addWidget(searchLabel);
d->searchLine = new KIconViewSearchLine(main, "searchLine");
@@ -303,28 +303,28 @@ void KIconDialog::init()
// signals and slots connections
- connect(clearSearch, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
- QString wtstr = i18n("Search interactively for icon names (e.g. folder).");
- QWhatsThis::add(searchLabel, wtstr);
- QWhatsThis::add(d->searchLine, wtstr);
+ TQString wtstr = i18n("Search interactively for icon names (e.g. folder).");
+ TQWhatsThis::add(searchLabel, wtstr);
+ TQWhatsThis::add(d->searchLine, wtstr);
mpCanvas = new KIconCanvas(main);
- connect(mpCanvas, SIGNAL(executed(QIconViewItem *)), SLOT(slotAcceptIcons()));
- connect(mpCanvas, SIGNAL(returnPressed(QIconViewItem *)), SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
mpCanvas->setMinimumSize(400, 125);
top->addWidget(mpCanvas);
d->searchLine->setIconView(mpCanvas);
mpProgress = new KProgress(main);
top->addWidget(mpProgress);
- connect(mpCanvas, SIGNAL(startLoading(int)), SLOT(slotStartLoading(int)));
- connect(mpCanvas, SIGNAL(progress(int)), SLOT(slotProgress(int)));
- connect(mpCanvas, SIGNAL(finished()), SLOT(slotFinished()));
+ connect(mpCanvas, TQT_SIGNAL(startLoading(int)), TQT_SLOT(slotStartLoading(int)));
+ connect(mpCanvas, TQT_SIGNAL(progress(int)), TQT_SLOT(slotProgress(int)));
+ connect(mpCanvas, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished()));
// When pressing Ok or Cancel, stop loading icons
- connect(this, SIGNAL(hidden()), mpCanvas, SLOT(stopLoading()));
+ connect(this, TQT_SIGNAL(hidden()), mpCanvas, TQT_SLOT(stopLoading()));
static const char* const context_text[] = {
I18N_NOOP( "Actions" ),
@@ -372,7 +372,7 @@ void KIconDialog::init()
mpBrowseBut->setFixedWidth(mpCombo->width());
// Make the dialog a little taller
- incInitialSize(QSize(0,100));
+ incInitialSize(TQSize(0,100));
}
@@ -383,14 +383,14 @@ KIconDialog::~KIconDialog()
void KIconDialog::slotAcceptIcons()
{
- d->custom=QString::null;
+ d->custom=TQString::null;
slotOk();
}
void KIconDialog::showIcons()
{
mpCanvas->clear();
- QStringList filelist;
+ TQStringList filelist;
if (mType == 0)
if (d->m_bStrictIconSize)
filelist=mpLoader->queryIcons(mGroupOrSize, mContext);
@@ -401,9 +401,9 @@ void KIconDialog::showIcons()
else
filelist=mFileList;
- QSortedList <IconPath>iconlist;
+ TQSortedList <IconPath>iconlist;
iconlist.setAutoDelete(true);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = filelist.begin(); it != filelist.end(); ++it )
iconlist.append(new IconPath(*it));
@@ -443,7 +443,7 @@ int KIconDialog::iconSize() const
}
#ifndef KDE_NO_COMPAT
-QString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
+TQString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
{
setup( group, context, false, 0, user );
return openDialog();
@@ -494,12 +494,12 @@ void KIconDialog::setContext( KIcon::Context context )
}
}
-void KIconDialog::setCustomLocation( const QString& location )
+void KIconDialog::setCustomLocation( const TQString& location )
{
d->customLocation = location;
}
-QString KIconDialog::openDialog()
+TQString KIconDialog::openDialog()
{
showIcons();
@@ -507,13 +507,13 @@ QString KIconDialog::openDialog()
{
if (!d->custom.isNull())
return d->custom;
- QString name = mpCanvas->getCurrent();
+ TQString name = mpCanvas->getCurrent();
if (name.isEmpty() || (mType == 1))
return name;
- QFileInfo fi(name);
+ TQFileInfo fi(name);
return fi.baseName();
}
- return QString::null;
+ return TQString::null;
}
void KIconDialog::showDialog()
@@ -525,7 +525,7 @@ void KIconDialog::showDialog()
void KIconDialog::slotOk()
{
- QString name;
+ TQString name;
if (!d->custom.isNull())
{
name = d->custom;
@@ -535,7 +535,7 @@ void KIconDialog::slotOk()
name = mpCanvas->getCurrent();
if (!name.isEmpty() && (mType != 1))
{
- QFileInfo fi(name);
+ TQFileInfo fi(name);
name = fi.baseName();
}
}
@@ -544,9 +544,9 @@ void KIconDialog::slotOk()
KDialogBase::slotOk();
}
-QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
+TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
bool strictIconSize, int iconSize, bool user,
- QWidget *parent, const QString &caption)
+ TQWidget *parent, const TQString &caption)
{
KIconDialog dlg(parent, "icon dialog");
dlg.setup( group, context, strictIconSize, iconSize, user );
@@ -558,7 +558,7 @@ QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
void KIconDialog::slotButtonClicked(int id)
{
- QString file;
+ TQString file;
switch (id)
{
@@ -586,7 +586,7 @@ void KIconDialog::slotButtonClicked(int id)
// Create a file dialog to select a PNG, XPM or SVG file,
// with the image previewer shown.
// KFileDialog::getImageOpenURL doesn't allow svg.
- KFileDialog dlg(QString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
+ KFileDialog dlg(TQString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
this, "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption( i18n("Open") );
@@ -601,7 +601,7 @@ void KIconDialog::slotButtonClicked(int id)
{
d->custom = file;
if ( mType == 1 )
- d->customLocation = QFileInfo( file ).dirPath( true );
+ d->customLocation = TQFileInfo( file ).dirPath( true );
slotOk();
}
}
@@ -657,15 +657,15 @@ class KIconButton::KIconButtonPrivate
* KIconButton: A "choose icon" pushbutton.
*/
-KIconButton::KIconButton(QWidget *parent, const char *name)
- : QPushButton(parent, name)
+KIconButton::KIconButton(TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( KGlobal::iconLoader() );
}
KIconButton::KIconButton(KIconLoader *loader,
- QWidget *parent, const char *name)
- : QPushButton(parent, name)
+ TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( loader );
}
@@ -679,7 +679,7 @@ void KIconButton::init( KIconLoader *loader )
mpLoader = loader;
mpDialog = 0L;
- connect(this, SIGNAL(clicked()), SLOT(slotChangeIcon()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon()));
}
KIconButton::~KIconButton()
@@ -715,7 +715,7 @@ void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool u
mbUser = user;
}
-void KIconButton::setIcon(const QString& icon)
+void KIconButton::setIcon(const TQString& icon)
{
mIcon = icon;
setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize));
@@ -723,17 +723,17 @@ void KIconButton::setIcon(const QString& icon)
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
}
void KIconButton::resetIcon()
{
- mIcon = QString::null;
- setIconSet(QIconSet());
+ mIcon = TQString::null;
+ setIconSet(TQIconSet());
}
void KIconButton::slotChangeIcon()
@@ -741,24 +741,24 @@ void KIconButton::slotChangeIcon()
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
mpDialog->setup( mGroup, mContext, d->m_bStrictIconSize, d->iconSize, mbUser );
mpDialog->showDialog();
}
-void KIconButton::newIconName(const QString& name)
+void KIconButton::newIconName(const TQString& name)
{
if (name.isEmpty())
return;
- QIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
+ TQIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
setIconSet(iconset);
mIcon = name;
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
emit iconChanged(name);
}
diff --git a/kio/kfile/kicondialog.h b/kio/kfile/kicondialog.h
index e6cf4e2fe..de447bc34 100644
--- a/kio/kfile/kicondialog.h
+++ b/kio/kfile/kicondialog.h
@@ -14,9 +14,9 @@
#ifndef __KIconDialog_h__
#define __KIconDialog_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
#include <kicontheme.h>
#include <kdialogbase.h>
@@ -37,18 +37,18 @@ class KIO_EXPORT KIconCanvas: public KIconView
Q_OBJECT
public:
- KIconCanvas(QWidget *parent=0L, const char *name=0L);
+ KIconCanvas(TQWidget *parent=0L, const char *name=0L);
~KIconCanvas();
/**
* Load icons into the canvas.
*/
- void loadFiles(const QStringList& files);
+ void loadFiles(const TQStringList& files);
/**
* Returns the current icon.
*/
- QString getCurrent() const;
+ TQString getCurrent() const;
public slots:
void stopLoading();
@@ -57,8 +57,8 @@ signals:
/**
* Emitted when the current icon has changed.
*/
- void nameChanged(QString);
- /* KDE 4: Make it const QString & */
+ void nameChanged(TQString);
+ /* KDE 4: Make it const TQString & */
void startLoading(int);
void progress(int);
@@ -66,11 +66,11 @@ signals:
private slots:
void slotLoadFiles();
- void slotCurrentChanged(QIconViewItem *item);
+ void slotCurrentChanged(TQIconViewItem *item);
private:
- QStringList mFiles;
- QTimer *mpTimer;
+ TQStringList mFiles;
+ TQTimer *mpTimer;
KIconLoader *mpLoader; // unused
protected:
@@ -96,11 +96,11 @@ public:
/**
* Constructs an icon selection dialog using the global iconloader.
*/
- KIconDialog(QWidget *parent=0L, const char *name=0L);
+ KIconDialog(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs an icon selection dialog using a specific iconloader.
*/
- KIconDialog(KIconLoader *loader, QWidget *parent=0,
+ KIconDialog(KIconLoader *loader, TQWidget *parent=0,
const char *name=0);
/**
* Destructs the dialog.
@@ -122,7 +122,7 @@ public:
* sets a custom icon directory
* @since 3.1
*/
- void setCustomLocation( const QString& location );
+ void setCustomLocation( const TQString& location );
/**
* Sets the size of the icons to be shown / selected.
@@ -141,7 +141,7 @@ public:
/**
* @deprecated in KDE 3.0, use the static method getIcon instead.
*/
- QString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
+ TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
context=KIcon::Application, bool user=false);
#endif
@@ -169,15 +169,15 @@ public:
/**
* exec()utes this modal dialog and returns the name of the selected icon,
- * or QString::null if the dialog was aborted.
+ * or TQString::null if the dialog was aborted.
* @returns the name of the icon, suitable for loading with KIconLoader.
* @see getIcon
*/
- QString openDialog();
+ TQString openDialog();
/**
- * show()es this dialog and emits a newIcon(const QString&) signal when
- * successful. QString::null will be emitted if the dialog was aborted.
+ * show()es this dialog and emits a newIcon(const TQString&) signal when
+ * successful. TQString::null will be emitted if the dialog was aborted.
*/
void showDialog();
@@ -200,14 +200,14 @@ public:
* @return The name of the icon, suitable for loading with KIconLoader.
* @version New in 3.0
*/
- static QString getIcon(KIcon::Group group=KIcon::Desktop,
+ static TQString getIcon(KIcon::Group group=KIcon::Desktop,
KIcon::Context context=KIcon::Application,
bool strictIconSize=false, int iconSize = 0,
- bool user=false, QWidget *parent=0,
- const QString &caption=QString::null);
+ bool user=false, TQWidget *parent=0,
+ const TQString &caption=TQString::null);
signals:
- void newIconName(const QString&);
+ void newIconName(const TQString&);
protected slots:
void slotOk();
@@ -228,10 +228,10 @@ private:
KIcon::Context mContext;
int mType;
- QStringList mFileList;
- QComboBox *mpCombo;
- QPushButton *mpBrowseBut;
- QRadioButton *mpRb1, *mpRb2;
+ TQStringList mFileList;
+ TQComboBox *mpCombo;
+ TQPushButton *mpBrowseBut;
+ TQRadioButton *mpRb1, *mpRb2;
KProgress *mpProgress;
KIconLoader *mpLoader;
KIconCanvas *mpCanvas;
@@ -257,7 +257,7 @@ private:
class KIO_EXPORT KIconButton: public QPushButton
{
Q_OBJECT
- Q_PROPERTY( QString icon READ icon WRITE setIcon RESET resetIcon )
+ Q_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
@@ -265,12 +265,12 @@ public:
/**
* Constructs a KIconButton using the global iconloader.
*/
- KIconButton(QWidget *parent=0L, const char *name=0L);
+ KIconButton(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs a KIconButton using a specific KIconLoader.
*/
- KIconButton(KIconLoader *loader, QWidget *parent, const char *name=0L);
+ KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L);
/**
* Destructs the button.
*/
@@ -296,7 +296,7 @@ public:
/**
* Sets the button's initial icon.
*/
- void setIcon(const QString& icon);
+ void setIcon(const TQString& icon);
/**
* Resets the icon (reverts to an empty button).
@@ -306,7 +306,7 @@ public:
/**
* Returns the name of the selected icon.
*/
- QString icon() const { return mIcon; }
+ TQString icon() const { return mIcon; }
/**
* Sets the size of the icon to be shown / selected.
@@ -325,12 +325,12 @@ signals:
/**
* Emitted when the icon has changed.
*/
- void iconChanged(QString icon);
- /* KDE 4: Make it const QString & */
+ void iconChanged(TQString icon);
+ /* KDE 4: Make it const TQString & */
private slots:
void slotChangeIcon();
- void newIconName(const QString& name);
+ void newIconName(const TQString& name);
private:
void init( KIconLoader *loader );
@@ -339,7 +339,7 @@ private:
KIcon::Group mGroup;
KIcon::Context mContext;
- QString mIcon;
+ TQString mIcon;
KIconDialog *mpDialog;
KIconLoader *mpLoader;
class KIconButtonPrivate;
diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp
index d973c6e1b..2d9f7881a 100644
--- a/kio/kfile/kimagefilepreview.cpp
+++ b/kio/kfile/kimagefilepreview.cpp
@@ -7,12 +7,12 @@
* License. See the file "COPYING" for the exact licensing terms.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -31,7 +31,7 @@
/**** KImageFilePreview ****/
-KImageFilePreview::KImageFilePreview( QWidget *parent )
+KImageFilePreview::KImageFilePreview( TQWidget *parent )
: KPreviewWidgetBase( parent ),
m_job( 0L )
{
@@ -39,28 +39,28 @@ KImageFilePreview::KImageFilePreview( QWidget *parent )
KConfigGroupSaver cs( config, ConfigGroup );
autoMode = config->readBoolEntry( "Automatic Preview", true );
- QVBoxLayout *vb = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- imageLabel = new QLabel( this );
- imageLabel->setFrameStyle( QFrame::NoFrame );
+ imageLabel = new TQLabel( this );
+ imageLabel->setFrameStyle( TQFrame::NoFrame );
imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
+ imageLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
vb->addWidget( imageLabel );
- QHBoxLayout *hb = new QHBoxLayout( 0 );
+ TQHBoxLayout *hb = new TQHBoxLayout( 0 );
vb->addLayout( hb );
- autoPreview = new QCheckBox( i18n("&Automatic preview"), this );
+ autoPreview = new TQCheckBox( i18n("&Automatic preview"), this );
autoPreview->setChecked( autoMode );
hb->addWidget( autoPreview );
- connect( autoPreview, SIGNAL(toggled(bool)), SLOT(toggleAuto(bool)) );
+ connect( autoPreview, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
previewButton = new KPushButton( SmallIconSet("thumbnail"), i18n("&Preview"), this );
hb->addWidget( previewButton );
- connect( previewButton, SIGNAL(clicked()), SLOT(showPreview()) );
+ connect( previewButton, TQT_SIGNAL(clicked()), TQT_SLOT(showPreview()) );
- timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()), SLOT(showPreview()) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(showPreview()) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
}
@@ -109,14 +109,14 @@ void KImageFilePreview::showPreview( const KURL &url, bool force )
if ( force ) // explicitly requested previews shall always be generated!
m_job->setIgnoreMaximumSize( true );
- connect( m_job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotResult( KIO::Job * )));
- connect( m_job, SIGNAL( gotPreview( const KFileItem*,
- const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-
- connect( m_job, SIGNAL( failed( const KFileItem* )),
- this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotResult( KIO::Job * )));
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*,
+ const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+
+ connect( m_job, TQT_SIGNAL( failed( const KFileItem* )),
+ this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
}
}
@@ -132,14 +132,14 @@ void KImageFilePreview::toggleAuto( bool a )
}
}
-void KImageFilePreview::resizeEvent( QResizeEvent * )
+void KImageFilePreview::resizeEvent( TQResizeEvent * )
{
timer->start( 100, true ); // forces a new preview
}
-QSize KImageFilePreview::sizeHint() const
+TQSize KImageFilePreview::sizeHint() const
{
- return QSize( 20, 200 ); // otherwise it ends up huge???
+ return TQSize( 20, 200 ); // otherwise it ends up huge???
}
KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
@@ -149,7 +149,7 @@ KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
return KIO::filePreview( urls, w, h, 0, 0, true, false );
}
-void KImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm )
+void KImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm )
{
if ( item->url() == currentURL ) // should always be the case
imageLabel->setPixmap( pm );
diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h
index cb034265a..849585428 100644
--- a/kio/kfile/kimagefilepreview.h
+++ b/kio/kfile/kimagefilepreview.h
@@ -11,7 +11,7 @@
#ifndef KIMAGEFILEPREVIEW_H
#define KIMAGEFILEPREVIEW_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kurl.h>
#include <kpreviewwidgetbase.h>
@@ -33,10 +33,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KImageFilePreview(QWidget *parent);
+ KImageFilePreview(TQWidget *parent);
~KImageFilePreview();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
virtual void showPreview(const KURL &url);
@@ -47,10 +47,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
void showPreview( const KURL& url, bool force );
void toggleAuto(bool);
- virtual void gotPreview( const KFileItem*, const QPixmap& );
+ virtual void gotPreview( const KFileItem*, const TQPixmap& );
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
virtual KIO::PreviewJob * createJob( const KURL& url,
int w, int h );
@@ -61,11 +61,11 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
private:
bool autoMode;
KURL currentURL;
- QTimer *timer;
- QLabel *imageLabel;
- QLabel *infoLabel;
- QCheckBox *autoPreview;
- QPushButton *previewButton;
+ TQTimer *timer;
+ TQLabel *imageLabel;
+ TQLabel *infoLabel;
+ TQCheckBox *autoPreview;
+ TQPushButton *previewButton;
KIO::PreviewJob *m_job;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp
index b3ff504fc..281fbc622 100644
--- a/kio/kfile/kmetaprops.cpp
+++ b/kio/kfile/kmetaprops.cpp
@@ -28,40 +28,40 @@
#include <klocale.h>
#include <kprotocolinfo.h>
-#include <qvalidator.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qvgroupbox.h>
+#include <tqvalidator.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqvgroupbox.h>
#undef Bool
class MetaPropsScrollView : public QScrollView
{
public:
- MetaPropsScrollView(QWidget* parent = 0, const char* name = 0)
- : QScrollView(parent, name)
+ MetaPropsScrollView(TQWidget* parent = 0, const char* name = 0)
+ : TQScrollView(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- m_frame = new QFrame(viewport(), "MetaPropsScrollView::m_frame");
- m_frame->setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
+ m_frame = new TQFrame(viewport(), "MetaPropsScrollView::m_frame");
+ m_frame->setFrameStyle(TQFrame::NoFrame);
addChild(m_frame, 0, 0);
};
- QFrame* frame() {return m_frame;};
+ TQFrame* frame() {return m_frame;};
protected:
- virtual void viewportResizeEvent(QResizeEvent* ev)
+ virtual void viewportResizeEvent(TQResizeEvent* ev)
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()),
kMax(m_frame->sizeHint().height(), ev->size().height()));
};
private:
- QFrame* m_frame;
+ TQFrame* m_frame;
};
class KFileMetaPropsPlugin::KFileMetaPropsPluginPrivate
@@ -70,11 +70,11 @@ public:
KFileMetaPropsPluginPrivate() {}
~KFileMetaPropsPluginPrivate() {}
- QFrame* m_frame;
- QGridLayout* m_framelayout;
+ TQFrame* m_frame;
+ TQGridLayout* m_framelayout;
KFileMetaInfo m_info;
-// QPushButton* m_add;
- QPtrList<KFileMetaInfoWidget> m_editWidgets;
+// TQPushButton* m_add;
+ TQPtrList<KFileMetaInfoWidget> m_editWidgets;
};
KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
@@ -107,7 +107,7 @@ KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
void KFileMetaPropsPlugin::createLayout()
{
- QFileInfo file_info(properties->item()->url().path());
+ TQFileInfo file_info(properties->item()->url().path());
kdDebug(250) << "KFileMetaPropsPlugin::createLayout" << endl;
@@ -117,7 +117,7 @@ void KFileMetaPropsPlugin::createLayout()
// now get a list of groups
KFileMetaInfoProvider* prov = KFileMetaInfoProvider::self();
- QStringList groupList = d->m_info.preferredGroups();
+ TQStringList groupList = d->m_info.preferredGroups();
const KFileMimeTypeInfo* mtinfo = prov->mimeTypeInfo(d->m_info.mimeType());
if (!mtinfo)
@@ -127,9 +127,9 @@ void KFileMetaPropsPlugin::createLayout()
}
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("&Meta Info"));
- topframe->setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe);
+ TQFrame* topframe = properties->addPage(i18n("&Meta Info"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe);
// create a scroll view in the page
MetaPropsScrollView* view = new MetaPropsScrollView(topframe);
@@ -138,28 +138,28 @@ void KFileMetaPropsPlugin::createLayout()
d->m_frame = view->frame();
- QVBoxLayout *toplayout = new QVBoxLayout(d->m_frame);
+ TQVBoxLayout *toplayout = new TQVBoxLayout(d->m_frame);
toplayout->setSpacing(KDialog::spacingHint());
- for (QStringList::Iterator git=groupList.begin();
+ for (TQStringList::Iterator git=groupList.begin();
git!=groupList.end(); ++git)
{
kdDebug(7033) << *git << endl;
- QStringList itemList = d->m_info.group(*git).preferredKeys();
+ TQStringList itemList = d->m_info.group(*git).preferredKeys();
if (itemList.isEmpty())
continue;
- QGroupBox *groupBox = new QGroupBox(2, Qt::Horizontal,
- QStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
+ TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal,
+ TQStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
d->m_frame);
toplayout->addWidget(groupBox);
- QValueList<KFileMetaInfoItem> readItems;
- QValueList<KFileMetaInfoItem> editItems;
+ TQValueList<KFileMetaInfoItem> readItems;
+ TQValueList<KFileMetaInfoItem> editItems;
- for (QStringList::Iterator iit = itemList.begin();
+ for (TQStringList::Iterator iit = itemList.begin();
iit!=itemList.end(); ++iit)
{
KFileMetaInfoItem item = d->m_info[*git][*iit];
@@ -175,23 +175,23 @@ void KFileMetaPropsPlugin::createLayout()
KFileMetaInfoWidget* w = 0L;
// then first add the editable items to the layout
- for (QValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
iit!=editItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
- QValidator* val = mtinfo->createValidator(*git, (*iit).key());
+ TQValidator* val = mtinfo->createValidator(*git, (*iit).key());
if (!val) kdDebug(7033) << "didn't get a validator for " << *git << "/" << (*iit).key() << endl;
w = new KFileMetaInfoWidget(*iit, val, groupBox);
d->m_editWidgets.append( w );
- connect(w, SIGNAL(valueChanged(const QVariant&)), this, SIGNAL(changed()));
+ connect(w, TQT_SIGNAL(valueChanged(const TQVariant&)), this, TQT_SIGNAL(changed()));
}
// and then the read only items
- for (QValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
iit!=readItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
(new KFileMetaInfoWidget(*iit, KFileMetaInfoWidget::ReadOnly, 0L, groupBox));
}
@@ -200,10 +200,10 @@ void KFileMetaPropsPlugin::createLayout()
toplayout->addStretch(1);
// the add key (disabled until fully implemented)
-/* d->m_add = new QPushButton(i18n("&Add"), topframe);
- d->m_add->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
- connect(d->m_add, SIGNAL(clicked()), this, SLOT(slotAdd()));
+/* d->m_add = new TQPushButton(i18n("&Add"), topframe);
+ d->m_add->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
+ connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd()));
tmp->addWidget(d->m_add);
// if nothing can be added, deactivate it
@@ -212,9 +212,9 @@ void KFileMetaPropsPlugin::createLayout()
// if supportedKeys() does contain anything not in preferredKeys,
// we have something addable
- QStringList sk = d->m_info.supportedKeys();
+ TQStringList sk = d->m_info.supportedKeys();
d->m_add->setEnabled(false);
- for (QStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
+ for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
{
if ( l.find(*it)==l.end() )
{
@@ -259,7 +259,7 @@ void KFileMetaPropsPlugin::applyChanges()
kdDebug(250) << "applying changes" << endl;
// insert the fields that changed into the info object
- QPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
+ TQPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
KFileMetaInfoWidget* w;
for (; (w = it.current()); ++it) w->apply();
d->m_info.applyChanges(properties->kurl().path());
diff --git a/kio/kfile/kmetaprops.h b/kio/kfile/kmetaprops.h
index dfa9b6e33..8bd83a3b3 100644
--- a/kio/kfile/kmetaprops.h
+++ b/kio/kfile/kmetaprops.h
@@ -48,13 +48,13 @@ public:
private:
void createLayout();
- QWidget* makeBoolWidget(const KFileMetaInfoItem& item, QWidget* parent);
- QWidget* makeIntWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeStringWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
+ TQWidget* makeBoolWidget(const KFileMetaInfoItem& item, TQWidget* parent);
+ TQWidget* makeIntWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeStringWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
private slots:
// Code disabled until the "Add" button is implemented
diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp
index 6543344e2..9e370643f 100644
--- a/kio/kfile/knotifydialog.cpp
+++ b/kio/kfile/knotifydialog.cpp
@@ -37,19 +37,19 @@
#include <kurlrequester.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
using namespace KNotify;
@@ -115,8 +115,8 @@ namespace KNotify
class KNotifyToolTip : public QToolTip
{
public:
- KNotifyToolTip( QHeader *header )
- : QToolTip( header )
+ KNotifyToolTip( TQHeader *header )
+ : TQToolTip( header )
{
m_tips[COL_EXECUTE] = i18n("Execute a program");
m_tips[COL_STDERR] = i18n("Print to Standard error output");
@@ -128,9 +128,9 @@ namespace KNotify
virtual ~KNotifyToolTip() {}
protected:
- virtual void maybeTip ( const QPoint& p )
+ virtual void maybeTip ( const TQPoint& p )
{
- QHeader *header = static_cast<QHeader*>( parentWidget() );
+ TQHeader *header = static_cast<TQHeader*>( parentWidget() );
int section = 0;
if ( header->orientation() == Horizontal )
@@ -138,40 +138,40 @@ namespace KNotify
else
section= header->sectionAt( p.y() );
- if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(QString)) ) )
+ if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(TQString)) ) )
return;
tip( header->sectionRect( section ), m_tips[section] );
}
private:
- QString m_tips[6];
+ TQString m_tips[6];
};
}
-int KNotifyDialog::configure( QWidget *parent, const char *name,
+int KNotifyDialog::configure( TQWidget *parent, const char *name,
const KAboutData *aboutData )
{
KNotifyDialog dialog( parent, name, true, aboutData );
return dialog.exec();
}
-KNotifyDialog::KNotifyDialog( QWidget *parent, const char *name, bool modal,
+KNotifyDialog::KNotifyDialog( TQWidget *parent, const char *name, bool modal,
const KAboutData *aboutData )
: KDialogBase(parent, name, modal, i18n("Notification Settings"),
Ok | Apply | Cancel | Default, Ok, true )
{
- QVBox *box = makeVBoxMainWidget();
+ TQVBox *box = makeVBoxMainWidget();
m_notifyWidget = new KNotifyWidget( box, "knotify widget" );
if ( aboutData )
addApplicationEvents( aboutData->appName() );
- connect( this, SIGNAL( okClicked() ), m_notifyWidget, SLOT( save() ));
- connect( this, SIGNAL( applyClicked() ), m_notifyWidget, SLOT( save() ));
+ connect( this, TQT_SIGNAL( okClicked() ), m_notifyWidget, TQT_SLOT( save() ));
+ connect( this, TQT_SIGNAL( applyClicked() ), m_notifyWidget, TQT_SLOT( save() ));
}
KNotifyDialog::~KNotifyDialog()
@@ -180,11 +180,11 @@ KNotifyDialog::~KNotifyDialog()
void KNotifyDialog::addApplicationEvents( const char *appName )
{
- addApplicationEvents( QString::fromUtf8( appName ) +
- QString::fromLatin1( "/eventsrc" ) );
+ addApplicationEvents( TQString::fromUtf8( appName ) +
+ TQString::fromLatin1( "/eventsrc" ) );
}
-void KNotifyDialog::addApplicationEvents( const QString& path )
+void KNotifyDialog::addApplicationEvents( const TQString& path )
{
Application *app = m_notifyWidget->addApplicationEvents( path );
if ( app )
@@ -212,12 +212,12 @@ void KNotifyDialog::slotDefault()
class KNotifyWidget::Private
{
public:
- QPixmap pixmaps[6];
+ TQPixmap pixmaps[6];
KNotifyToolTip *toolTip;
};
// simple access to all knotify-handled applications
-KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
+KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name,
bool handleAllApps )
: KNotifyWidgetBase( parent, name ? name : "KNotifyWidget" )
{
@@ -237,12 +237,12 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
m_listview->setFullWidth( true );
m_listview->setAllColumnsShowFocus( true );
- QPixmap pexec = SmallIcon("exec");
- QPixmap pstderr = SmallIcon("terminal");
- QPixmap pmessage = SmallIcon("info");
- QPixmap plogfile = SmallIcon("log");
- QPixmap psound = SmallIcon("sound");
- QPixmap ptaskbar = SmallIcon("kicker");
+ TQPixmap pexec = SmallIcon("exec");
+ TQPixmap pstderr = SmallIcon("terminal");
+ TQPixmap pmessage = SmallIcon("info");
+ TQPixmap plogfile = SmallIcon("log");
+ TQPixmap psound = SmallIcon("sound");
+ TQPixmap ptaskbar = SmallIcon("kicker");
d->pixmaps[COL_EXECUTE] = pexec;
d->pixmaps[COL_STDERR] = pstderr;
@@ -253,68 +253,68 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
int w = KIcon::SizeSmall + 6;
- QHeader *header = m_listview->header();
- header->setLabel( COL_EXECUTE, pexec, QString::null, w );
- header->setLabel( COL_STDERR, pstderr, QString::null, w );
- header->setLabel( COL_MESSAGE, pmessage, QString::null, w );
- header->setLabel( COL_LOGFILE, plogfile, QString::null, w );
- header->setLabel( COL_SOUND, psound, QString::null, w );
- header->setLabel( COL_TASKBAR, ptaskbar, QString::null, w );
+ TQHeader *header = m_listview->header();
+ header->setLabel( COL_EXECUTE, pexec, TQString::null, w );
+ header->setLabel( COL_STDERR, pstderr, TQString::null, w );
+ header->setLabel( COL_MESSAGE, pmessage, TQString::null, w );
+ header->setLabel( COL_LOGFILE, plogfile, TQString::null, w );
+ header->setLabel( COL_SOUND, psound, TQString::null, w );
+ header->setLabel( COL_TASKBAR, ptaskbar, TQString::null, w );
d->toolTip = new KNotifyToolTip( header );
m_playButton->setIconSet( SmallIconSet( "player_play" ) );
- connect( m_playButton, SIGNAL( clicked() ), SLOT( playSound() ));
-
- connect( m_listview, SIGNAL( currentChanged( QListViewItem * ) ),
- SLOT( slotEventChanged( QListViewItem * ) ));
- connect( m_listview, SIGNAL(clicked( QListViewItem *, const QPoint&, int)),
- SLOT( slotItemClicked( QListViewItem *, const QPoint&, int )));
-
- connect( m_playSound, SIGNAL( toggled( bool )),
- SLOT( soundToggled( bool )) );
- connect( m_logToFile, SIGNAL( toggled( bool )),
- SLOT( loggingToggled( bool )) );
- connect( m_execute, SIGNAL( toggled( bool )),
- SLOT( executeToggled( bool )) );
- connect( m_messageBox, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_passivePopup, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_stderr, SIGNAL( toggled( bool )),
- SLOT( stderrToggled( bool ) ) );
- connect( m_taskbar, SIGNAL( toggled( bool )),
- SLOT( taskbarToggled( bool ) ) );
-
- connect( m_soundPath, SIGNAL( textChanged( const QString& )),
- SLOT( soundFileChanged( const QString& )));
- connect( m_logfilePath, SIGNAL( textChanged( const QString& )),
- SLOT( logfileChanged( const QString& ) ));
- connect( m_executePath, SIGNAL( textChanged( const QString& )),
- SLOT( commandlineChanged( const QString& ) ));
-
- connect( m_soundPath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openSoundDialog( KURLRequester * )));
- connect( m_logfilePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openLogDialog( KURLRequester * )));
- connect( m_executePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openExecDialog( KURLRequester * )));
-
- connect( m_extension, SIGNAL( clicked() ),
- SLOT( toggleAdvanced()) );
-
- connect( m_buttonEnable, SIGNAL( clicked() ), SLOT( enableAll() ));
- connect( m_buttonDisable, SIGNAL( clicked() ), SLOT( enableAll() ));
-
- QString whatsThis = i18n("<qt>You may use the following macros<br>"
+ connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() ));
+
+ connect( m_listview, TQT_SIGNAL( currentChanged( TQListViewItem * ) ),
+ TQT_SLOT( slotEventChanged( TQListViewItem * ) ));
+ connect( m_listview, TQT_SIGNAL(clicked( TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotItemClicked( TQListViewItem *, const TQPoint&, int )));
+
+ connect( m_playSound, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( soundToggled( bool )) );
+ connect( m_logToFile, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( loggingToggled( bool )) );
+ connect( m_execute, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( executeToggled( bool )) );
+ connect( m_messageBox, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_passivePopup, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_stderr, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( stderrToggled( bool ) ) );
+ connect( m_taskbar, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( taskbarToggled( bool ) ) );
+
+ connect( m_soundPath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( soundFileChanged( const TQString& )));
+ connect( m_logfilePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( logfileChanged( const TQString& ) ));
+ connect( m_executePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( commandlineChanged( const TQString& ) ));
+
+ connect( m_soundPath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openSoundDialog( KURLRequester * )));
+ connect( m_logfilePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openLogDialog( KURLRequester * )));
+ connect( m_executePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openExecDialog( KURLRequester * )));
+
+ connect( m_extension, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( toggleAdvanced()) );
+
+ connect( m_buttonEnable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+ connect( m_buttonDisable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+
+ TQString whatsThis = i18n("<qt>You may use the following macros<br>"
"in the commandline:<br>"
"<b>%e</b>: for the event name,<br>"
"<b>%a</b>: for the name of the application that sent the event,<br>"
"<b>%s</b>: for the notification message,<br>"
"<b>%w</b>: for the numeric window ID where the event originated,<br>"
"<b>%i</b>: for the numeric event ID.");
- QWhatsThis::add( m_execute, whatsThis );
- QWhatsThis::add( m_executePath, whatsThis );
+ TQWhatsThis::add( m_execute, whatsThis );
+ TQWhatsThis::add( m_executePath, whatsThis );
showAdvanced( false );
@@ -337,7 +337,7 @@ void KNotifyWidget::showAdvanced( bool show )
if ( show )
{
m_extension->setText( i18n("Advanced <<") );
- QToolTip::add( m_extension, i18n("Hide advanced options") );
+ TQToolTip::add( m_extension, i18n("Hide advanced options") );
m_logToFile->show();
m_logfilePath->show();
@@ -354,7 +354,7 @@ void KNotifyWidget::showAdvanced( bool show )
else
{
m_extension->setText( i18n("Advanced >>") );
- QToolTip::add( m_extension, i18n("Show advanced options") );
+ TQToolTip::add( m_extension, i18n("Show advanced options") );
m_logToFile->hide();
m_logfilePath->hide();
@@ -369,10 +369,10 @@ void KNotifyWidget::showAdvanced( bool show )
}
}
-Application * KNotifyWidget::addApplicationEvents( const QString& path )
+Application * KNotifyWidget::addApplicationEvents( const TQString& path )
{
kdDebug() << "**** knotify: adding path: " << path << endl;
- QString relativePath = path;
+ TQString relativePath = path;
if ( path.at(0) == '/' && KStandardDirs::exists( path ) )
relativePath = makeRelative( path );
@@ -400,13 +400,13 @@ void KNotifyWidget::clearVisible()
slotEventChanged( 0L ); // disable widgets
}
-void KNotifyWidget::showEvent( QShowEvent *e )
+void KNotifyWidget::showEvent( TQShowEvent *e )
{
selectItem( m_listview->firstChild() );
KNotifyWidgetBase::showEvent( e );
}
-void KNotifyWidget::slotEventChanged( QListViewItem *item )
+void KNotifyWidget::slotEventChanged( TQListViewItem *item )
{
bool on = (item != 0L);
@@ -484,7 +484,7 @@ void KNotifyWidget::updateWidgets( ListViewItem *item )
void KNotifyWidget::updatePixmaps( ListViewItem *item )
{
- QPixmap emptyPix;
+ TQPixmap emptyPix;
Event &event = item->event();
bool doIt = (event.presentation & KNotifyClient::Execute) &&
@@ -520,7 +520,7 @@ void KNotifyWidget::addVisibleApp( Application *app )
m_visibleApps.append( app );
addToView( app->eventList() );
- QListViewItem *item = m_listview->selectedItem();
+ TQListViewItem *item = m_listview->selectedItem();
if ( !item )
item = m_listview->firstChild();
@@ -556,8 +556,8 @@ void KNotifyWidget::addToView( const EventList& events )
}
}
-void KNotifyWidget::widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy )
+void KNotifyWidget::widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy )
{
if ( signalsBlocked() )
return;
@@ -580,31 +580,31 @@ void KNotifyWidget::widgetChanged( QListViewItem *item,
void KNotifyWidget::soundToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_soundPath->url().isEmpty();
- item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : TQPixmap() );
widgetChanged( item, KNotifyClient::Sound, on, m_soundPath );
}
void KNotifyWidget::loggingToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_logfilePath->url().isEmpty();
- item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : QPixmap());
+ item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : TQPixmap());
widgetChanged( item, KNotifyClient::Logfile, on, m_logfilePath );
}
void KNotifyWidget::executeToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_executePath->url().isEmpty();
- item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : QPixmap());
+ item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : TQPixmap());
widgetChanged( item, KNotifyClient::Execute, on, m_executePath );
}
@@ -615,12 +615,12 @@ void KNotifyWidget::messageBoxChanged()
m_passivePopup->setEnabled( m_messageBox->isChecked() );
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool on = m_passivePopup->isEnabled();
- item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : QPixmap() );
+ item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : TQPixmap() );
Event &e = static_cast<ListViewItem*>( item )->event();
@@ -644,28 +644,28 @@ void KNotifyWidget::messageBoxChanged()
void KNotifyWidget::stderrToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : QPixmap() );
+ item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Stderr, on );
}
void KNotifyWidget::taskbarToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : QPixmap() );
+ item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Taskbar, on );
}
-void KNotifyWidget::soundFileChanged( const QString& text )
+void KNotifyWidget::soundFileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
@@ -673,44 +673,44 @@ void KNotifyWidget::soundFileChanged( const QString& text )
currentEvent()->soundfile = text;
bool ok = !text.isEmpty() && m_playSound->isChecked();
- item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::logfileChanged( const QString& text )
+void KNotifyWidget::logfileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->logfile = text;
bool ok = !text.isEmpty() && m_logToFile->isChecked();
- item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : QPixmap() );
+ item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::commandlineChanged( const QString& text )
+void KNotifyWidget::commandlineChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->commandline = text;
bool ok = !text.isEmpty() && m_execute->isChecked();
- item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : QPixmap() );
+ item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::slotItemClicked( QListViewItem *item, const QPoint&,
+void KNotifyWidget::slotItemClicked( TQListViewItem *item, const TQPoint&,
int col )
{
if ( !item || !item->isSelected() )
@@ -764,7 +764,7 @@ void KNotifyWidget::sort( bool ascending )
m_listview->sort();
}
-void KNotifyWidget::selectItem( QListViewItem *item )
+void KNotifyWidget::selectItem( TQListViewItem *item )
{
if ( item )
{
@@ -828,20 +828,20 @@ void KNotifyWidget::save()
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
-QString KNotifyWidget::makeRelative( const QString& fullPath )
+TQString KNotifyWidget::makeRelative( const TQString& fullPath )
{
int slash = fullPath.findRev( '/' ) - 1;
slash = fullPath.findRev( '/', slash );
if ( slash < 0 )
- return QString::null;
+ return TQString::null;
return fullPath.mid( slash+1 );
}
Event * KNotifyWidget::currentEvent()
{
- QListViewItem *current = m_listview->currentItem();
+ TQListViewItem *current = m_listview->currentItem();
if ( !current )
return 0L;
@@ -851,27 +851,27 @@ Event * KNotifyWidget::currentEvent()
void KNotifyWidget::openSoundDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openSoundDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openSoundDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select Sound File") );
- QStringList filters;
+ TQStringList filters;
filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg"
<< "audio/x-adpcm";
fileDialog->setMimeFilter( filters );
// find the first "sound"-resource that contains files
const Application *app = currentEvent()->application();
- QStringList soundDirs =
+ TQStringList soundDirs =
KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL soundURL;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -887,12 +887,12 @@ void KNotifyWidget::openSoundDialog( KURLRequester *requester )
void KNotifyWidget::openLogDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openLogDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openLogDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select Log File") );
- QStringList filters;
+ TQStringList filters;
filters << "text/x-log" << "text/plain";
fileDialog->setMimeFilter( filters );
}
@@ -900,13 +900,13 @@ void KNotifyWidget::openLogDialog( KURLRequester *requester )
void KNotifyWidget::openExecDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openExecDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openExecDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select File to Execute") );
- QStringList filters;
+ TQStringList filters;
filters << "application/x-executable" << "application/x-shellscript"
<< "application/x-perl" << "application/x-python";
fileDialog->setMimeFilter( filters );
@@ -914,19 +914,19 @@ void KNotifyWidget::openExecDialog( KURLRequester *requester )
void KNotifyWidget::playSound()
{
- QString soundPath = m_soundPath->url();
+ TQString soundPath = m_soundPath->url();
if (!KIO::NetAccess::exists( m_soundPath->url(), true, 0 )) {
bool foundSound=false;
// find the first "sound"-resource that contains files
const Application *app = currentEvent()->application();
- QStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
+ TQStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 &&
@@ -975,14 +975,14 @@ void KNotifyWidget::enableAll( int what, bool enable )
}
// now make the listview reflect the changes
- QListViewItemIterator it( m_listview->firstChild() );
+ TQListViewItemIterator it( m_listview->firstChild() );
for ( ; it.current(); ++it )
{
ListViewItem *item = static_cast<ListViewItem*>( it.current() );
updatePixmaps( item );
}
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
item = m_listview->firstChild();
selectItem( item );
@@ -998,17 +998,17 @@ void KNotifyWidget::enableAll( int what, bool enable )
//
// path must be "appname/eventsrc", i.e. a relative path
//
-Application::Application( const QString &path )
+Application::Application( const TQString &path )
{
- QString config_file = path;
+ TQString config_file = path;
config_file[config_file.find('/')] = '.';
m_events = 0L;
config = new KConfig(config_file, false, false);
kc = new KConfig(path, true, false, "data");
- kc->setGroup( QString::fromLatin1("!Global!") );
- m_icon = kc->readEntry(QString::fromLatin1("IconName"),
- QString::fromLatin1("misc"));
- m_description = kc->readEntry( QString::fromLatin1("Comment"),
+ kc->setGroup( TQString::fromLatin1("!Global!") );
+ m_icon = kc->readEntry(TQString::fromLatin1("IconName"),
+ TQString::fromLatin1("misc"));
+ m_description = kc->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
int index = path.find( '/' );
@@ -1070,13 +1070,13 @@ void Application::reloadEvents( bool revertToDefaults )
Event *e = 0L;
- QString global = QString::fromLatin1("!Global!");
- QString default_group = QString::fromLatin1("<default>");
- QString name = QString::fromLatin1("Name");
- QString comment = QString::fromLatin1("Comment");
+ TQString global = TQString::fromLatin1("!Global!");
+ TQString default_group = TQString::fromLatin1("<default>");
+ TQString name = TQString::fromLatin1("Name");
+ TQString comment = TQString::fromLatin1("Comment");
- QStringList conflist = kc->groupList();
- QStringList::ConstIterator it = conflist.begin();
+ TQStringList conflist = kc->groupList();
+ TQStringList::ConstIterator it = conflist.begin();
while ( it != conflist.end() ) {
if ( (*it) != global && (*it) != default_group ) { // event group
@@ -1095,9 +1095,9 @@ void Application::reloadEvents( bool revertToDefaults )
// default to passive popups over plain messageboxes
int default_rep = kc->readNumEntry("default_presentation",
0 | KNotifyClient::PassivePopup);
- QString default_logfile = kc->readPathEntry("default_logfile");
- QString default_soundfile = kc->readPathEntry("default_sound");
- QString default_commandline = kc->readPathEntry("default_commandline");
+ TQString default_logfile = kc->readPathEntry("default_logfile");
+ TQString default_soundfile = kc->readPathEntry("default_sound");
+ TQString default_commandline = kc->readPathEntry("default_commandline");
config->setGroup(*it);
@@ -1134,14 +1134,14 @@ void Application::reloadEvents( bool revertToDefaults )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-ListViewItem::ListViewItem( QListView *view, Event *event )
- : QListViewItem( view ),
+ListViewItem::ListViewItem( TQListView *view, Event *event )
+ : TQListViewItem( view ),
m_event( event )
{
setText( COL_EVENT, event->text() );
}
-int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
+int ListViewItem::compare ( TQListViewItem * i, int col, bool ascending ) const
{
ListViewItem *item = static_cast<ListViewItem*>( i );
int myPres = m_event->presentation;
@@ -1152,7 +1152,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
switch ( col )
{
case COL_EVENT: // use default sorting
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
case COL_EXECUTE:
action = KNotifyClient::Execute;
@@ -1177,7 +1177,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
if ( (myPres & action) == (otherPres & action) )
{
// default sorting by event
- return QListViewItem::compare( i, COL_EVENT, true );
+ return TQListViewItem::compare( i, COL_EVENT, true );
}
if ( myPres & action )
diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h
index 3d4074fd0..a1c4ef52f 100644
--- a/kio/kfile/knotifydialog.h
+++ b/kio/kfile/knotifydialog.h
@@ -68,7 +68,7 @@ public:
* Set this to 0L if you want to add all events yourself with
* addApplicationEvents().
*/
- KNotifyDialog( QWidget *parent = 0, const char *name = 0,
+ KNotifyDialog( TQWidget *parent = 0, const char *name = 0,
bool modal = true,
const KAboutData *aboutData =
KGlobal::instance()->aboutData() );
@@ -85,9 +85,9 @@ public:
* @param aboutData A pointer to a KAboutData object. KAboutData::appName()
* will be used to find the KNotify events (in the eventsrc file).
* @see exec for the return values.
- * @return The value of QDialog::exec()
+ * @return The value of TQDialog::exec()
*/
- static int configure( QWidget *parent = 0, const char *name = 0,
+ static int configure( TQWidget *parent = 0, const char *name = 0,
const KAboutData *aboutData = KGlobal::instance()->aboutData() );
/**
@@ -110,7 +110,7 @@ public:
* A relative path would be e.g. "kwin/eventsrc".
* @see clearApplicationEvents()
*/
- virtual void addApplicationEvents( const QString& path );
+ virtual void addApplicationEvents( const TQString& path );
/**
* Removes all the events added with addApplicationEvents()
@@ -141,9 +141,9 @@ namespace KNotify
class Application;
class Event;
class ListViewItem;
- typedef QPtrList<Event> EventList;
- typedef QPtrListIterator<Application> ApplicationListIterator;
- typedef QPtrListIterator<Event> EventListIterator;
+ typedef TQPtrList<Event> EventList;
+ typedef TQPtrListIterator<Application> ApplicationListIterator;
+ typedef TQPtrListIterator<Event> EventListIterator;
/**
* @internal
@@ -151,21 +151,21 @@ namespace KNotify
class KIO_EXPORT Application
{
public:
- Application( const QString &path );
+ Application( const TQString &path );
~Application();
- QString text() const { return m_description; }
- QString icon() const { return m_icon; }
+ TQString text() const { return m_description; }
+ TQString icon() const { return m_icon; }
const EventList& eventList();
void reloadEvents( bool revertToDefaults = false );
void save();
- QString appName() const { return m_appname; }
+ TQString appName() const { return m_appname; }
private:
- QString m_icon;
- QString m_description;
- QString m_appname;
+ TQString m_icon;
+ TQString m_description;
+ TQString m_appname;
EventList *m_events;
KConfig *kc; // The file that defines the events.
@@ -173,10 +173,10 @@ namespace KNotify
};
- class KIO_EXPORT ApplicationList : public QPtrList<Application>
+ class KIO_EXPORT ApplicationList : public TQPtrList<Application>
{
- virtual int compareItems ( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+ virtual int compareItems ( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
return (static_cast<Application*>( item1 )->text() >=
static_cast<Application*>( item2 )->text()) ? 1 : -1;
@@ -191,7 +191,7 @@ namespace KNotify
Q_OBJECT
public:
- KNotifyWidget( QWidget* parent = 0, const char* name = 0,
+ KNotifyWidget( TQWidget* parent = 0, const char* name = 0,
bool handleAllApps = false );
~KNotifyWidget();
@@ -208,7 +208,7 @@ namespace KNotify
* The returned pointer must be freed by the caller (easiest done
* by putting it into an ApplicationList with setAutoDelete( true )).
*/
- Application * addApplicationEvents( const QString& path );
+ Application * addApplicationEvents( const TQString& path );
void resetDefaults( bool ask );
void sort( bool ascending = true );
@@ -237,7 +237,7 @@ namespace KNotify
* May return 0L, if there is no current event selected.
*/
Event * currentEvent();
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
virtual void enableAll( int what, bool enable );
void reload( bool revertToDefaults = false );
@@ -246,9 +246,9 @@ namespace KNotify
void playSound();
private slots:
- void slotItemClicked( QListViewItem *item, const QPoint& point,
+ void slotItemClicked( TQListViewItem *item, const TQPoint& point,
int col );
- void slotEventChanged( QListViewItem * );
+ void slotEventChanged( TQListViewItem * );
void soundToggled( bool on );
void loggingToggled( bool on );
void executeToggled( bool on );
@@ -256,9 +256,9 @@ namespace KNotify
void stderrToggled( bool on );
void taskbarToggled( bool on );
- void soundFileChanged( const QString& text );
- void logfileChanged( const QString& text );
- void commandlineChanged( const QString& text );
+ void soundFileChanged( const TQString& text );
+ void logfileChanged( const TQString& text );
+ void commandlineChanged( const TQString& text );
void openSoundDialog( KURLRequester * );
void openLogDialog( KURLRequester * );
@@ -270,11 +270,11 @@ namespace KNotify
void updateWidgets( ListViewItem *item );
void updatePixmaps( ListViewItem *item );
- static QString makeRelative( const QString& );
+ static TQString makeRelative( const TQString& );
void addToView( const EventList& events );
- void widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy = 0L );
- void selectItem( QListViewItem *item );
+ void widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy = 0L );
+ void selectItem( TQListViewItem *item );
ApplicationList m_visibleApps;
ApplicationList m_allApps;
@@ -297,13 +297,13 @@ namespace KNotify
friend class Application;
public:
- QString text() const { return description; }
+ TQString text() const { return description; }
int presentation;
int dontShow;
- QString logfile;
- QString soundfile;
- QString commandline;
+ TQString logfile;
+ TQString soundfile;
+ TQString commandline;
const Application *application() const { return m_app; }
@@ -313,9 +313,9 @@ namespace KNotify
dontShow = 0;
m_app = app;
}
- QString name;
- QString description;
- QString configGroup;
+ TQString name;
+ TQString description;
+ TQString configGroup;
const Application *m_app;
};
@@ -326,10 +326,10 @@ namespace KNotify
class ListViewItem : public QListViewItem
{
public:
- ListViewItem( QListView *view, Event *event );
+ ListViewItem( TQListView *view, Event *event );
Event& event() { return *m_event; }
- virtual int compare (QListViewItem * i, int col, bool ascending) const;
+ virtual int compare (TQListViewItem * i, int col, bool ascending) const;
private:
Event * m_event;
diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp
index f1a71341b..2a3e7e690 100644
--- a/kio/kfile/kopenwith.cpp
+++ b/kio/kfile/kopenwith.cpp
@@ -20,19 +20,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
-#include <qdialog.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdialog.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -64,14 +64,14 @@
#include <assert.h>
#include <stdlib.h>
-#define SORT_SPEC (QDir::DirsFirst | QDir::Name | QDir::IgnoreCase)
+#define SORT_SPEC (TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase)
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -79,9 +79,9 @@ KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( TQListViewItem* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -89,7 +89,7 @@ KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
// ----------------------------------------------------------------------
-void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &_exec)
+void KAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &_exec)
{
setPixmap(0, pixmap);
parsed = parse;
@@ -100,7 +100,7 @@ void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const Q
/* Ensures that directories sort before non-directories */
-int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
+int KAppTreeListItem::compare(TQListViewItem *i, int col, bool ascending) const
{
KAppTreeListItem *other = dynamic_cast<KAppTreeListItem *>(i);
@@ -112,12 +112,12 @@ int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
return 1;
else // both directories or both not
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
// ----------------------------------------------------------------------
// Ensure that case is ignored
-QString KAppTreeListItem::key(int column, bool /*ascending*/) const
+TQString KAppTreeListItem::key(int column, bool /*ascending*/) const
{
return text(column).upper();
}
@@ -134,7 +134,7 @@ void KAppTreeListItem::setOpen( bool o )
((KApplicationTree *) parent())->addDesktopGroup( path, this );
parsed = true;
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
bool KAppTreeListItem::isDirectory()
@@ -144,19 +144,19 @@ bool KAppTreeListItem::isDirectory()
// ----------------------------------------------------------------------
-KApplicationTree::KApplicationTree( QWidget *parent )
+KApplicationTree::KApplicationTree( TQWidget *parent )
: KListView( parent ), currentitem(0)
{
addColumn( i18n("Known Applications") );
setRootIsDecorated( true );
- addDesktopGroup( QString::null );
+ addDesktopGroup( TQString::null );
cleanupTree();
- connect( this, SIGNAL( currentChanged(QListViewItem*) ),
- SLOT( slotItemHighlighted(QListViewItem*) ) );
- connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( slotSelectionChanged(QListViewItem*) ) );
+ connect( this, TQT_SIGNAL( currentChanged(TQListViewItem*) ),
+ TQT_SLOT( slotItemHighlighted(TQListViewItem*) ) );
+ connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( slotSelectionChanged(TQListViewItem*) ) );
}
// ----------------------------------------------------------------------
@@ -169,20 +169,20 @@ bool KApplicationTree::isDirSel()
// ----------------------------------------------------------------------
-static QPixmap appIcon(const QString &iconName)
+static TQPixmap appIcon(const TQString &iconName)
{
- QPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
+ TQPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 20x20
if (normal.width() > 20 || normal.height() > 20)
{
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(20, 20);
normal.convertFromImage(tmp);
}
return normal;
}
-void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem *item)
+void KApplicationTree::addDesktopGroup( const TQString &relPath, KAppTreeListItem *item)
{
KServiceGroup::Ptr root = KServiceGroup::group(relPath);
if (!root || !root->isValid()) return;
@@ -193,10 +193,10 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
- QString icon;
- QString text;
- QString relPath;
- QString exec;
+ TQString icon;
+ TQString text;
+ TQString relPath;
+ TQString exec;
bool isDir = false;
KSycocaEntry *p = (*it);
if (p->isType(KST_KService))
@@ -228,7 +228,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
continue;
}
- QPixmap pixmap = appIcon( icon );
+ TQPixmap pixmap = appIcon( icon );
if (item)
newItem = new KAppTreeListItem( item, text, pixmap, false, isDir,
@@ -244,7 +244,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
// ----------------------------------------------------------------------
-void KApplicationTree::slotItemHighlighted(QListViewItem* i)
+void KApplicationTree::slotItemHighlighted(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -261,7 +261,7 @@ void KApplicationTree::slotItemHighlighted(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::slotSelectionChanged(QListViewItem* i)
+void KApplicationTree::slotSelectionChanged(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -277,22 +277,22 @@ void KApplicationTree::slotSelectionChanged(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::resizeEvent( QResizeEvent * e)
+void KApplicationTree::resizeEvent( TQResizeEvent * e)
{
- setColumnWidth(0, width()-QApplication::style().pixelMetric(QStyle::PM_ScrollBarExtent)
- -2*QApplication::style().pixelMetric(QStyle::PM_DefaultFrameWidth));
+ setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)
+ -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
KListView::resizeEvent(e);
}
// Prune empty directories from the tree
void KApplicationTree::cleanupTree()
{
- QListViewItem *item=firstChild();
+ TQListViewItem *item=firstChild();
while(item!=0)
{
if(item->isExpandable())
{
- QListViewItem *temp=item->itemBelow();
+ TQListViewItem *temp=item->itemBelow();
if(item->text(0)!=i18n("Applications"))
item->setOpen(false);
item=temp;
@@ -311,16 +311,16 @@ class KOpenWithDlgPrivate
{
public:
KOpenWithDlgPrivate() : saveNewApps(false) { };
- QPushButton* ok;
+ TQPushButton* ok;
bool saveNewApps;
KService::Ptr curService;
};
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, TQWidget* parent )
+ :TQDialog( parent, "openwith", true )
{
setCaption( i18n( "Open With" ) );
- QString text;
+ TQString text;
if( _urls.count() == 1 )
{
text = i18n("<qt>Select the program that should be used to open <b>%1</b>. "
@@ -331,27 +331,27 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
// Should never happen ??
text = i18n( "Choose the name of the program with which to open the selected files." );
setServiceType( _urls );
- init( text, QString() );
+ init( text, TQString() );
}
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const QString&_text,
- const QString& _value, QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text,
+ const TQString& _value, TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
- QString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
+ TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
if (_urls.count() > 1)
- caption += QString::fromLatin1("...");
+ caption += TQString::fromLatin1("...");
setCaption(caption);
setServiceType( _urls );
init( _text, _value );
}
-KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
- QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const TQString &serviceType, const TQString& value,
+ TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application for %1").arg(serviceType));
- QString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
+ TQString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>").arg(serviceType);
qServiceType = serviceType;
@@ -360,15 +360,15 @@ KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
remember->hide();
}
-KOpenWithDlg::KOpenWithDlg( QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application"));
- QString text = i18n("<qt>Select a program. "
+ TQString text = i18n("<qt>Select a program. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>");
- qServiceType = QString::null;
- init( text, QString::null );
+ qServiceType = TQString::null;
+ init( text, TQString::null );
}
void KOpenWithDlg::setServiceType( const KURL::List& _urls )
@@ -376,14 +376,14 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls )
if ( _urls.count() == 1 )
{
qServiceType = KMimeType::findByURL( _urls.first())->name();
- if (qServiceType == QString::fromLatin1("application/octet-stream"))
- qServiceType = QString::null;
+ if (qServiceType == TQString::fromLatin1("application/octet-stream"))
+ qServiceType = TQString::null;
}
else
- qServiceType = QString::null;
+ qServiceType = TQString::null;
}
-void KOpenWithDlg::init( const QString& _text, const QString& _value )
+void KOpenWithDlg::init( const TQString& _text, const TQString& _value )
{
d = new KOpenWithDlgPrivate;
bool bReadOnly = kapp && !kapp->authorize("shell_access");
@@ -392,18 +392,18 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
m_pService = 0L;
d->curService = 0L;
- QBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- label = new QLabel( _text, this );
+ label = new TQLabel( _text, this );
topLayout->addWidget(label);
- QHBoxLayout* hbox = new QHBoxLayout(topLayout);
+ TQHBoxLayout* hbox = new TQHBoxLayout(topLayout);
- QToolButton *clearButton = new QToolButton( this );
+ TQToolButton *clearButton = new TQToolButton( this );
clearButton->setIconSet( BarIcon( "locationbar_erase" ) );
clearButton->setFixedSize( clearButton->sizeHint() );
- connect( clearButton, SIGNAL( clicked() ), SLOT( slotClear() ) );
- QToolTip::add( clearButton, i18n( "Clear input field" ) );
+ connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) );
+ TQToolTip::add( clearButton, i18n( "Clear input field" ) );
hbox->addWidget( clearButton );
@@ -413,13 +413,13 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
KHistoryCombo *combo = new KHistoryCombo();
combo->setDuplicatesEnabled( false );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- int max = kc->readNumEntry( QString::fromLatin1("Maximum history"), 15 );
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 );
combo->setMaxCount( max );
- int mode = kc->readNumEntry(QString::fromLatin1("CompletionMode"),
+ int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"),
KGlobalSettings::completionMode());
combo->setCompletionMode((KGlobalSettings::Completion)mode);
- QStringList list = kc->readListEntry( QString::fromLatin1("History") );
+ TQStringList list = kc->readListEntry( TQString::fromLatin1("History") );
combo->setHistoryItems( list, true );
edit = new KURLRequester( combo, this );
}
@@ -432,7 +432,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
}
edit->setURL( _value );
- QWhatsThis::add(edit,i18n(
+ TQWhatsThis::add(edit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -453,38 +453,38 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
edit->comboBox()->setAutoDeleteCompletionObject( true );
}
- connect ( edit, SIGNAL(returnPressed()), SLOT(slotOK()) );
- connect ( edit, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged()) );
+ connect ( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOK()) );
+ connect ( edit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged()) );
m_pTree = new KApplicationTree( this );
topLayout->addWidget(m_pTree);
- connect( m_pTree, SIGNAL( selected( const QString&, const QString& ) ),
- SLOT( slotSelected( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( highlighted( const QString&, const QString& ) ),
- SLOT( slotHighlighted( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( doubleClicked(QListViewItem*) ),
- SLOT( slotDbClick() ) );
+ connect( m_pTree, TQT_SIGNAL( selected( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotSelected( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( highlighted( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotHighlighted( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ TQT_SLOT( slotDbClick() ) );
- terminal = new QCheckBox( i18n("Run in &terminal"), this );
+ terminal = new TQCheckBox( i18n("Run in &terminal"), this );
if (bReadOnly)
terminal->hide();
- connect(terminal, SIGNAL(toggled(bool)), SLOT(slotTerminalToggled(bool)));
+ connect(terminal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTerminalToggled(bool)));
topLayout->addWidget(terminal);
- QBoxLayout* nocloseonexitLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint() );
- QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQBoxLayout* nocloseonexitLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint() );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
nocloseonexitLayout->addItem( spacer );
- nocloseonexit = new QCheckBox( i18n("&Do not close when command exits"), this );
+ nocloseonexit = new TQCheckBox( i18n("&Do not close when command exits"), this );
nocloseonexit->setChecked( false );
nocloseonexit->setDisabled( true );
// check to see if we use konsole if not disable the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
if (bReadOnly || preferredTerminal != "konsole")
nocloseonexit->hide();
@@ -494,7 +494,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
if (!qServiceType.isNull())
{
- remember = new QCheckBox(i18n("&Remember application association for this type of file"), this);
+ remember = new TQCheckBox(i18n("&Remember application association for this type of file"), this);
// remember->setChecked(true);
topLayout->addWidget(remember);
}
@@ -507,10 +507,10 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
d->ok = b->addButton( KStdGuiItem::ok() );
d->ok->setDefault( true );
- connect( d->ok, SIGNAL( clicked() ), SLOT( slotOK() ) );
+ connect( d->ok, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOK() ) );
- QPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
- connect( cancel, SIGNAL( clicked() ), SLOT( reject() ) );
+ TQPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
+ connect( cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
b->layout();
topLayout->addWidget( b );
@@ -536,14 +536,14 @@ KOpenWithDlg::~KOpenWithDlg()
void KOpenWithDlg::slotClear()
{
- edit->setURL(QString::null);
+ edit->setURL(TQString::null);
edit->setFocus();
}
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec )
+void KOpenWithDlg::slotSelected( const TQString& /*_name*/, const TQString& _exec )
{
kdDebug(250)<<"KOpenWithDlg::slotSelected"<<endl;
KService::Ptr pService = d->curService;
@@ -554,7 +554,7 @@ void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
+void KOpenWithDlg::slotHighlighted( const TQString& _name, const TQString& )
{
kdDebug(250)<<"KOpenWithDlg::slotHighlighted"<<endl;
qName = _name;
@@ -563,7 +563,7 @@ void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
{
// ### indicate that default value was restored
terminal->setChecked(d->curService->terminal());
- QString terminalOptions = d->curService->terminalOptions();
+ TQString terminalOptions = d->curService->terminalOptions();
nocloseonexit->setChecked( (terminalOptions.contains( "--noclose" ) > 0) );
m_terminaldirty = false; // slotTerminalToggled changed it
}
@@ -603,12 +603,12 @@ void KOpenWithDlg::setSaveNewApplications(bool b)
void KOpenWithDlg::slotOK()
{
- QString typedExec(edit->url());
- QString fullExec(typedExec);
+ TQString typedExec(edit->url());
+ TQString fullExec(typedExec);
- QString serviceName;
- QString initialServiceName;
- QString preferredTerminal;
+ TQString serviceName;
+ TQString initialServiceName;
+ TQString preferredTerminal;
m_pService = d->curService;
if (!m_pService) {
// No service selected - check the command line
@@ -632,7 +632,7 @@ void KOpenWithDlg::slotOK()
// also ok if we find the exact same service (well, "kwrite" == "kwrite %U"
if ( serv && serv->type() == "Application")
{
- QString exec = serv->exec();
+ TQString exec = serv->exec();
fullExec = exec;
exec.replace("%u", "", false);
exec.replace("%f", "", false);
@@ -651,7 +651,7 @@ void KOpenWithDlg::slotOK()
if (!ok) // service was found, but it was different -> keep looking
{
++i;
- serviceName = initialServiceName + "-" + QString::number(i);
+ serviceName = initialServiceName + "-" + TQString::number(i);
}
}
while (!ok);
@@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK()
if (terminal->isChecked())
{
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
m_command = preferredTerminal;
// only add --noclose when we are sure it is konsole we're using
if (preferredTerminal == "konsole" && nocloseonexit->isChecked())
- m_command += QString::fromLatin1(" --noclose");
- m_command += QString::fromLatin1(" -e ");
+ m_command += TQString::fromLatin1(" --noclose");
+ m_command += TQString::fromLatin1(" -e ");
m_command += edit->url();
kdDebug(250) << "Setting m_command to " << m_command << endl;
}
@@ -690,7 +690,7 @@ void KOpenWithDlg::slotOK()
if (!bRemember && !d->saveNewApps)
{
// Create temp service
- m_pService = new KService(initialServiceName, fullExec, QString::null);
+ m_pService = new KService(initialServiceName, fullExec, TQString::null);
if (terminal->isChecked())
{
m_pService->setTerminal(true);
@@ -706,9 +706,9 @@ void KOpenWithDlg::slotOK()
// wanted. The other possibility is that they have asked for the
// association to be remembered. Create/update service.
- QString newPath;
- QString oldPath;
- QString menuId;
+ TQString newPath;
+ TQString oldPath;
+ TQString menuId;
if (m_pService)
{
oldPath = m_pService->desktopEntryPath();
@@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK()
{
desktop = new KDesktopFile(newPath);
}
- desktop->writeEntry("Type", QString::fromLatin1("Application"));
+ desktop->writeEntry("Type", TQString::fromLatin1("Application"));
desktop->writeEntry("Name", initialServiceName);
desktop->writePathEntry("Exec", fullExec);
if (terminal->isChecked())
@@ -759,7 +759,7 @@ void KOpenWithDlg::slotOK()
if (bRemember || d->saveNewApps)
{
- QStringList mimeList = desktop->readListEntry("MimeType", ';');
+ TQStringList mimeList = desktop->readListEntry("MimeType", ';');
if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType))
mimeList.append(qServiceType);
desktop->writeEntry("MimeType", mimeList, ';');
@@ -786,7 +786,7 @@ void KOpenWithDlg::slotOK()
accept();
}
-QString KOpenWithDlg::text() const
+TQString KOpenWithDlg::text() const
{
if (!m_command.isEmpty())
return m_command;
@@ -814,16 +814,16 @@ void KOpenWithDlg::accept()
combo->addToHistory( edit->url() );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- kc->writeEntry( QString::fromLatin1("History"), combo->historyItems() );
- kc->writeEntry(QString::fromLatin1("CompletionMode"),
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() );
+ kc->writeEntry(TQString::fromLatin1("CompletionMode"),
combo->completionMode());
// don't store the completion-list, as it contains all of KURLCompletion's
// executables
kc->sync();
}
- QDialog::accept();
+ TQDialog::accept();
}
@@ -832,7 +832,7 @@ void KOpenWithDlg::accept()
#ifndef KDE_NO_COMPAT
bool KFileOpenWithHandler::displayOpenWithDialog( const KURL::List& urls )
{
- KOpenWithDlg l( urls, i18n("Open with:"), QString::null, 0L );
+ KOpenWithDlg l( urls, i18n("Open with:"), TQString::null, 0L );
if ( l.exec() )
{
KService::Ptr service = l.service();
diff --git a/kio/kfile/kopenwith.h b/kio/kfile/kopenwith.h
index c343816aa..8d34e22b7 100644
--- a/kio/kfile/kopenwith.h
+++ b/kio/kfile/kopenwith.h
@@ -20,7 +20,7 @@
#ifndef __open_with_h__
#define __open_with_h__
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kurl.h>
#include <krun.h>
@@ -43,7 +43,7 @@ class KOpenWithDlgPrivate;
*
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT KOpenWithDlg : public QDialog //#TODO: Use KDialogBase for KDE4
+class KIO_EXPORT KOpenWithDlg : public TQDialog //#TODO: Use KDialogBase for KDE4
{
Q_OBJECT
public:
@@ -56,7 +56,7 @@ public:
* if the dialog is used to choose an application but not for some particular URLs.
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, TQWidget *parent = 0L );
/**
* Create a dialog that asks for a application to open a given
@@ -67,8 +67,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, const TQString& text, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select a service for a given service type.
@@ -78,8 +78,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const QString& serviceType, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const TQString& serviceType, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select an application
@@ -88,7 +88,7 @@ public:
* @param parent parent widget
* @since 3.1
*/
- KOpenWithDlg( QWidget *parent = 0L );
+ KOpenWithDlg( TQWidget *parent = 0L );
/**
* Destructor
@@ -98,7 +98,7 @@ public:
/**
* @return the text the user entered
*/
- QString text() const;
+ TQString text() const;
/**
* Hide the "Do not &close when command exits" Checkbox
*/
@@ -129,8 +129,8 @@ public slots:
* The slot for clearing the edit widget
*/
void slotClear();
- void slotSelected( const QString&_name, const QString& _exec );
- void slotHighlighted( const QString& _name, const QString& _exec );
+ void slotSelected( const TQString&_name, const TQString& _exec );
+ void slotHighlighted( const TQString& _name, const TQString& _exec );
void slotTextChanged();
void slotTerminalToggled(bool);
void slotDbClick();
@@ -138,7 +138,7 @@ public slots:
protected slots:
/**
- * Reimplemented from QDialog::accept() to save history of the combobox
+ * Reimplemented from TQDialog::accept() to save history of the combobox
*/
virtual void accept();
@@ -156,19 +156,19 @@ protected:
* @param text appears as a label on top of the entry box.
* @param value is the initial value of the line
*/
- void init( const QString& text, const QString& value );
+ void init( const TQString& text, const TQString& value );
KURLRequester * edit;
- QString m_command;
+ TQString m_command;
KApplicationTree* m_pTree;
- QLabel *label;
+ TQLabel *label;
- QString qName, qServiceType;
+ TQString qName, qServiceType;
bool m_terminaldirty;
- QCheckBox *terminal, *remember, *nocloseonexit;
- QPushButton *UNUSED;
- QPushButton *UNUSED2;
+ TQCheckBox *terminal, *remember, *nocloseonexit;
+ TQPushButton *UNUSED;
+ TQPushButton *UNUSED2;
KService::Ptr m_pService;
diff --git a/kio/kfile/kopenwith_p.h b/kio/kfile/kopenwith_p.h
index ccee6bd22..1b73cdaa0 100644
--- a/kio/kfile/kopenwith_p.h
+++ b/kio/kfile/kopenwith_p.h
@@ -41,20 +41,20 @@ class KAppTreeListItem : public QListViewItem
{
bool parsed;
bool directory;
- QString path;
- QString exec;
+ TQString path;
+ TQString exec;
protected:
- int compare(QListViewItem *i, int col, bool ascending ) const;
- QString key(int column, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending ) const;
+ TQString key(int column, bool ascending) const;
- void init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &exec);
+ void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec);
public:
- KAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
- KAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
+ KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
+ KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
bool isDirectory();
protected:
@@ -73,27 +73,27 @@ class KApplicationTree : public KListView
{
Q_OBJECT
public:
- KApplicationTree( QWidget *parent );
+ KApplicationTree( TQWidget *parent );
/**
* Add a group of .desktop/.kdelnk entries
*/
- void addDesktopGroup( const QString &relPath, KAppTreeListItem *item = 0 );
+ void addDesktopGroup( const TQString &relPath, KAppTreeListItem *item = 0 );
bool isDirSel();
protected:
- void resizeEvent( QResizeEvent *_ev );
+ void resizeEvent( TQResizeEvent *_ev );
KAppTreeListItem* currentitem;
void cleanupTree();
public slots:
- void slotItemHighlighted(QListViewItem* i);
- void slotSelectionChanged(QListViewItem* i);
+ void slotItemHighlighted(TQListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
signals:
- void selected( const QString& _name, const QString& _exec );
- void highlighted( const QString& _name, const QString& _exec );
+ void selected( const TQString& _name, const TQString& _exec );
+ void highlighted( const TQString& _name, const TQString& _exec );
};
/* ------------------------------------------------------------------------- */
diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp
index 986e46597..7458fb244 100644
--- a/kio/kfile/kpreviewprops.cpp
+++ b/kio/kfile/kpreviewprops.cpp
@@ -19,7 +19,7 @@
#include "kpreviewprops.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kfilemetapreview.h>
#include <kglobalsettings.h>
@@ -46,15 +46,15 @@ KPreviewPropsPlugin::KPreviewPropsPlugin(KPropertiesDialog* props)
void KPreviewPropsPlugin::createLayout()
{
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("P&review"));
- topframe->setFrameStyle(QFrame::NoFrame);
+ TQFrame* topframe = properties->addPage(i18n("P&review"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe, 0, 0);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe, 0, 0);
preview = new KFileMetaPreview(topframe);
tmp->addWidget(preview) ;
- connect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), SLOT( aboutToShowPage( QWidget* ) ) );
+ connect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
}
KPreviewPropsPlugin::~KPreviewPropsPlugin()
@@ -77,12 +77,12 @@ bool KPreviewPropsPlugin::supports( KFileItemList _items )
return true;
}
-void KPreviewPropsPlugin::aboutToShowPage( QWidget* widget )
+void KPreviewPropsPlugin::aboutToShowPage( TQWidget* widget )
{
if ( widget != preview->parent() )
return;
- disconnect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), this, SLOT( aboutToShowPage( QWidget* ) ) );
+ disconnect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), this, TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
preview->showPreview(properties->item()->url());
}
diff --git a/kio/kfile/kpreviewprops.h b/kio/kfile/kpreviewprops.h
index be3019083..c34e70763 100644
--- a/kio/kfile/kpreviewprops.h
+++ b/kio/kfile/kpreviewprops.h
@@ -44,7 +44,7 @@ public:
static bool supports( KFileItemList _items );
private slots:
- void aboutToShowPage( QWidget* );
+ void aboutToShowPage( TQWidget* );
private:
KFileMetaPreview* preview;
diff --git a/kio/kfile/kpreviewwidgetbase.cpp b/kio/kfile/kpreviewwidgetbase.cpp
index 43b2b5fdc..979da919e 100644
--- a/kio/kfile/kpreviewwidgetbase.cpp
+++ b/kio/kfile/kpreviewwidgetbase.cpp
@@ -7,21 +7,21 @@
*/
#include "kpreviewwidgetbase.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPreviewWidgetBase::KPreviewWidgetBasePrivate
{
public:
- QStringList supportedMimeTypes;
+ TQStringList supportedMimeTypes;
};
-QPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
+TQPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
-KPreviewWidgetBase::KPreviewWidgetBase( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
if ( !s_private )
- s_private = new QPtrDict<KPreviewWidgetBasePrivate>();
+ s_private = new TQPtrDict<KPreviewWidgetBasePrivate>();
s_private->insert( this, new KPreviewWidgetBasePrivate() );
}
@@ -36,12 +36,12 @@ KPreviewWidgetBase::~KPreviewWidgetBase()
}
}
-void KPreviewWidgetBase::setSupportedMimeTypes( const QStringList& mimeTypes )
+void KPreviewWidgetBase::setSupportedMimeTypes( const TQStringList& mimeTypes )
{
d()->supportedMimeTypes = mimeTypes;
}
-QStringList KPreviewWidgetBase::supportedMimeTypes() const
+TQStringList KPreviewWidgetBase::supportedMimeTypes() const
{
return d()->supportedMimeTypes;
}
diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h
index 80f3f4ff4..3a2a49b31 100644
--- a/kio/kfile/kpreviewwidgetbase.h
+++ b/kio/kfile/kpreviewwidgetbase.h
@@ -21,8 +21,8 @@
#ifndef __KPREVIEWWIDGETBASE_H__
#define __KPREVIEWWIDGETBASE_H__
-#include <qptrdict.h>
-#include <qwidget.h>
+#include <tqptrdict.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ public:
* @param parent The KFileDialog this preview widget is going to be used in
* @param name The internal name of this object
*/
- KPreviewWidgetBase(QWidget *parent, const char *name=0);
+ KPreviewWidgetBase(TQWidget *parent, const char *name=0);
~KPreviewWidgetBase();
public slots:
@@ -73,10 +73,10 @@ public slots:
*/
virtual void clearPreview() = 0;
- QStringList supportedMimeTypes() const;
+ TQStringList supportedMimeTypes() const;
protected:
- void setSupportedMimeTypes( const QStringList& mimeTypes );
+ void setSupportedMimeTypes( const TQStringList& mimeTypes );
protected:
virtual void virtual_hook( int, void* ) {};
@@ -86,7 +86,7 @@ private:
KPreviewWidgetBasePrivate * d() const {
return s_private->find( const_cast<KPreviewWidgetBase*>( this ) );
}
- static QPtrDict<KPreviewWidgetBasePrivate> * s_private;
+ static TQPtrDict<KPreviewWidgetBasePrivate> * s_private;
};
#endif
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index f02e80eaf..9e26f12bb 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -54,24 +54,24 @@ extern "C" {
#include <algorithm>
#include <functional>
-#include <qfile.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qprogressbar.h>
-#include <qvbox.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqprogressbar.h>
+#include <tqvbox.h>
+#include <tqvaluevector.h>
#ifdef USE_POSIX_ACL
extern "C" {
@@ -139,7 +139,7 @@ extern "C" {
# include <win32_utils.h>
#endif
-static QString nameFromFileName(QString nameStr)
+static TQString nameFromFileName(TQString nameStr)
{
if ( nameStr.endsWith(".desktop") )
nameStr.truncate( nameStr.length() - 8 );
@@ -168,11 +168,11 @@ public:
{
}
bool m_aborted:1;
- QWidget* fileSharePage;
+ TQWidget* fileSharePage;
};
KPropertiesDialog::KPropertiesDialog (KFileItem* item,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(KIO::decodeFileName(item->url().fileName())),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
@@ -188,8 +188,8 @@ KPropertiesDialog::KPropertiesDialog (KFileItem* item,
init (modal, autoShow);
}
-KPropertiesDialog::KPropertiesDialog (const QString& title,
- QWidget* parent, const char* name, bool modal)
+KPropertiesDialog::KPropertiesDialog (const TQString& title,
+ TQWidget* parent, const char* name, bool modal)
: KDialogBase (KDialogBase::Tabbed, i18n ("Properties for %1").arg(title),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
parent, name, modal)
@@ -200,7 +200,7 @@ KPropertiesDialog::KPropertiesDialog (const QString& title,
}
KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
// TODO: replace <never used> with "Properties for 1 item". It's very confusing how it has to be translated otherwise
@@ -226,7 +226,7 @@ KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
#ifndef KDE_NO_COMPAT
KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now unused */,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -246,7 +246,7 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now u
#endif
KPropertiesDialog::KPropertiesDialog (const KURL& _url,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -265,8 +265,8 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url,
}
KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent, const char* name,
+ const TQString& _defaultName,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_tempUrl.fileName())),
@@ -286,11 +286,11 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _current
init (modal, autoShow);
}
-bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
+bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
- QString localPath = item->localPath();
+ TQString localPath = item->localPath();
if (!localPath.isEmpty())
return showWin32FilePropertyDialog(localPath);
#endif
@@ -298,7 +298,7 @@ bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
@@ -309,7 +309,7 @@ bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KFileItemList& _items, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KFileItemList& _items, TQWidget* parent,
const char* name, bool modal)
{
if (_items.count()==1)
@@ -341,7 +341,7 @@ void KPropertiesDialog::showFileSharingPage()
}
}
-void KPropertiesDialog::setFileSharingPage(QWidget* page) {
+void KPropertiesDialog::setFileSharingPage(TQWidget* page) {
d->fileSharePage = page;
}
@@ -372,8 +372,8 @@ KPropertiesDialog::~KPropertiesDialog()
void KPropertiesDialog::insertPlugin (KPropsDlgPlugin* plugin)
{
- connect (plugin, SIGNAL (changed ()),
- plugin, SLOT (setDirty ()));
+ connect (plugin, TQT_SIGNAL (changed ()),
+ plugin, TQT_SLOT (setDirty ()));
m_pageList.append (plugin);
}
@@ -511,12 +511,12 @@ void KPropertiesDialog::insertPages()
return;
KFileItem *item = m_items.first();
- QString mimetype = item->mimetype();
+ TQString mimetype = item->mimetype();
if ( mimetype.isEmpty() )
return;
- QString query = QString::fromLatin1(
+ TQString query = TQString::fromLatin1(
"('KPropsDlg/Plugin' in ServiceTypes) and "
"((not exist [X-KDE-Protocol]) or "
" ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol());
@@ -551,7 +551,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
assert(!m_singleUrl.isEmpty());
// If we have an Desktop page, set it dirty, so that a full file is saved locally
// Same for a URL page (because of the Name= hack)
- for ( QPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
+ for ( TQPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
if ( it.current()->isA("KExecPropsPlugin") || // KDE4 remove me
it.current()->isA("KURLPropsPlugin") ||
it.current()->isA("KDesktopPropsPlugin"))
@@ -562,7 +562,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
}
}
-void KPropertiesDialog::rename( const QString& _name )
+void KPropertiesDialog::rename( const TQString& _name )
{
Q_ASSERT( m_items.count() == 1 );
kdDebug(250) << "KPropertiesDialog::rename " << _name << endl;
@@ -575,7 +575,7 @@ void KPropertiesDialog::rename( const QString& _name )
}
else
{
- QString tmpurl = m_singleUrl.url();
+ TQString tmpurl = m_singleUrl.url();
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -604,7 +604,7 @@ public:
};
KPropsDlgPlugin::KPropsDlgPlugin( KPropertiesDialog *_props )
-: QObject( _props, 0L )
+: TQObject( _props, 0L )
{
d = new KPropsDlgPluginPrivate;
properties = _props;
@@ -629,10 +629,10 @@ bool KPropsDlgPlugin::isDesktopFile( KFileItem * _item )
if ( !S_ISREG( _item->mode() ) )
return false;
- QString t( url.path() );
+ TQString t( url.path() );
// only if readable
- FILE *f = fopen( QFile::encodeName(t), "r" );
+ FILE *f = fopen( TQFile::encodeName(t), "r" );
if ( f == 0L )
return false;
fclose(f);
@@ -680,15 +680,15 @@ public:
}
KDirSize * dirSizeJob;
- QTimer *dirSizeUpdateTimer;
- QFrame *m_frame;
+ TQTimer *dirSizeUpdateTimer;
+ TQFrame *m_frame;
bool bMultiple;
bool bIconChanged;
bool bKDesktopMode;
bool bDesktopFile;
- QLabel *m_freeSpaceLabel;
- QString mimeType;
- QString oldFileName;
+ TQLabel *m_freeSpaceLabel;
+ TQString mimeType;
+ TQString oldFileName;
KLineEdit* m_lined;
};
@@ -698,7 +698,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d = new KFilePropsPluginPrivate;
d->bMultiple = (properties->items().count() > 1);
d->bIconChanged = false;
- d->bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ d->bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items());
kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple << endl;
@@ -712,15 +712,15 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl;
mode_t mode = item->mode();
bool hasDirs = item->isDir() && !item->isLink();
- bool hasRoot = url.path() == QString::fromLatin1("/");
- QString iconStr = KMimeType::iconForURL(url, mode);
- QString directory = properties->kurl().directory();
- QString protocol = properties->kurl().protocol();
- QString mimeComment = item->mimeComment();
+ bool hasRoot = url.path() == TQString::fromLatin1("/");
+ TQString iconStr = KMimeType::iconForURL(url, mode);
+ TQString directory = properties->kurl().directory();
+ TQString protocol = properties->kurl().protocol();
+ TQString mimeComment = item->mimeComment();
d->mimeType = item->mimetype();
bool hasTotalSize;
KIO::filesize_t totalSize = item->size(hasTotalSize);
- QString magicMimeComment;
+ TQString magicMimeComment;
if ( isLocal ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->name() != KMimeType::defaultMimeType() )
@@ -728,7 +728,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
// Those things only apply to 'single file' mode
- QString filename = QString::null;
+ TQString filename = TQString::null;
bool isTrash = false;
bool isDevice = false;
m_bFromTemplate = false;
@@ -739,9 +739,9 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_frame = properties->addPage (i18n("&General"));
- QVBoxLayout *vbl = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout *vbl = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint(), "vbl");
- QGridLayout *grid = new QGridLayout(0, 3); // unknown rows
+ TQGridLayout *grid = new TQGridLayout(0, 3); // unknown rows
grid->setColStretch(0, 0);
grid->setColStretch(1, 0);
grid->setColStretch(2, 1);
@@ -751,7 +751,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !d->bMultiple )
{
- QString path;
+ TQString path;
if ( !m_bFromTemplate ) {
isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 );
if ( properties->kurl().protocol().find("device", 0, false)==0)
@@ -814,18 +814,18 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( KMimeType::iconForURL(url, mode) != iconStr )
iconStr = "kmultiple";
if ( url.directory() != directory )
- directory = QString::null;
+ directory = TQString::null;
if ( url.protocol() != protocol )
- protocol = QString::null;
+ protocol = TQString::null;
if ( !mimeComment.isNull() && (*it)->mimeComment() != mimeComment )
- mimeComment = QString::null;
+ mimeComment = TQString::null;
if ( isLocal && !magicMimeComment.isNull() ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->comment() != magicMimeComment )
- magicMimeComment = QString::null;
+ magicMimeComment = TQString::null;
}
- if ( url.path() == QString::fromLatin1("/") )
+ if ( url.path() == TQString::fromLatin1("/") )
hasRoot = true;
if ( (*it)->isDir() && !(*it)->isLink() )
{
@@ -853,13 +853,13 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{
KIconButton *iconButton = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * iconButton->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48);
iconButton->setStrictIconSize(false);
// This works for everything except Device icons on unmounted devices
// So we have to really open .desktop files
- QString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
+ TQString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
if ( bDesktopFile && isLocal )
{
KDesktopFile config( url.path(), true );
@@ -873,11 +873,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
iconButton->setIconType( KIcon::Desktop, KIcon::FileSystem );
iconButton->setIcon(iconStr);
iconArea = iconButton;
- connect( iconButton, SIGNAL( iconChanged(QString) ),
- this, SLOT( slotIconChanged() ) );
+ connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ),
+ this, TQT_SLOT( slotIconChanged() ) );
} else {
- QLabel *iconLabel = new QLabel( d->m_frame );
- int bsize = 66 + 2 * iconLabel->style().pixelMetric(QStyle::PM_ButtonMargin);
+ TQLabel *iconLabel = new TQLabel( d->m_frame );
+ int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) );
iconArea = iconLabel;
@@ -886,7 +886,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (d->bMultiple || isTrash || isDevice || hasRoot)
{
- QLabel *lab = new QLabel(d->m_frame );
+ TQLabel *lab = new TQLabel(d->m_frame );
if ( d->bMultiple )
lab->setText( KIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) );
else
@@ -900,7 +900,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setFocus();
// Enhanced rename: Don't highlight the file extension.
- QString pattern;
+ TQString pattern;
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1)
d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1);
@@ -911,8 +911,8 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setSelection(0, lastDot);
}
- connect( d->m_lined, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( nameFileChanged(const QString & ) ) );
+ connect( d->m_lined, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( nameFileChanged(const TQString & ) ) );
}
grid->addWidget(nameArea, curRow++, 2);
@@ -921,31 +921,31 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QLabel *l;
+ TQLabel *l;
if ( !mimeComment.isEmpty() && !isDevice && !isTrash)
{
- l = new QLabel(i18n("Type:"), d->m_frame );
+ l = new TQLabel(i18n("Type:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- QHBox *box = new QHBox(d->m_frame);
+ TQHBox *box = new TQHBox(d->m_frame);
box->setSpacing(20);
- l = new QLabel(mimeComment, box );
+ l = new TQLabel(mimeComment, box );
#ifdef Q_WS_X11
//TODO: wrap for win32 or mac?
- QPushButton *button = new QPushButton(box);
+ TQPushButton *button = new TQPushButton(box);
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("configure"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
button->setIconSet( iconSet );
button->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
if ( d->mimeType == KMimeType::defaultMimeType() )
- QToolTip::add(button, i18n("Create new file type"));
+ TQToolTip::add(button, i18n("Create new file type"));
else
- QToolTip::add(button, i18n("Edit file type"));
+ TQToolTip::add(button, i18n("Edit file type"));
- connect( button, SIGNAL( clicked() ), SLOT( slotEditFileType() ));
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() ));
if (!kapp->authorizeKAction("editfiletype"))
button->hide();
@@ -956,16 +956,16 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !magicMimeComment.isEmpty() && magicMimeComment != mimeComment )
{
- l = new QLabel(i18n("Contents:"), d->m_frame );
+ l = new TQLabel(i18n("Contents:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- l = new QLabel(magicMimeComment, d->m_frame );
+ l = new TQLabel(magicMimeComment, d->m_frame );
grid->addWidget(l, curRow++, 2);
}
if ( !directory.isEmpty() )
{
- l = new QLabel( i18n("Location:"), d->m_frame );
+ l = new TQLabel( i18n("Location:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( d->m_frame );
@@ -974,10 +974,10 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if( hasDirs || hasTotalSize ) {
- l = new QLabel(i18n("Size:"), d->m_frame );
+ l = new TQLabel(i18n("Size:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- m_sizeLabel = new QLabel( d->m_frame );
+ m_sizeLabel = new TQLabel( d->m_frame );
grid->addWidget( m_sizeLabel, curRow++, 2 );
} else {
m_sizeLabel = 0;
@@ -994,14 +994,14 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
else // Directory
{
- QHBoxLayout * sizelay = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * sizelay = new TQHBoxLayout(KDialog::spacingHint());
grid->addLayout( sizelay, curRow++, 2 );
// buttons
- m_sizeDetermineButton = new QPushButton( i18n("Calculate"), d->m_frame );
- m_sizeStopButton = new QPushButton( i18n("Stop"), d->m_frame );
- connect( m_sizeDetermineButton, SIGNAL( clicked() ), this, SLOT( slotSizeDetermine() ) );
- connect( m_sizeStopButton, SIGNAL( clicked() ), this, SLOT( slotSizeStop() ) );
+ m_sizeDetermineButton = new TQPushButton( i18n("Calculate"), d->m_frame );
+ m_sizeStopButton = new TQPushButton( i18n("Stop"), d->m_frame );
+ connect( m_sizeDetermineButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeDetermine() ) );
+ connect( m_sizeStopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeStop() ) );
sizelay->addWidget(m_sizeDetermineButton, 0);
sizelay->addWidget(m_sizeStopButton, 0);
sizelay->addStretch(10); // so that the buttons don't grow horizontally
@@ -1017,7 +1017,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if (!d->bMultiple && item->isLink()) {
- l = new QLabel(i18n("Points to:"), d->m_frame );
+ l = new TQLabel(i18n("Points to:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel(item->linkDest(), d->m_frame );
@@ -1026,38 +1026,38 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (!d->bMultiple) // Dates for multiple don't make much sense...
{
- QDateTime dt;
+ TQDateTime dt;
bool hasTime;
time_t tim = item->time(KIO::UDS_CREATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Created:"), d->m_frame );
+ l = new TQLabel(i18n("Created:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_MODIFICATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Modified:"), d->m_frame );
+ l = new TQLabel(i18n("Modified:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_ACCESS_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Accessed:"), d->m_frame );
+ l = new TQLabel(i18n("Accessed:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
}
@@ -1068,35 +1068,35 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
if (mountPoint != "/")
{
- l = new QLabel(i18n("Mounted on:"), d->m_frame );
+ l = new TQLabel(i18n("Mounted on:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( mountPoint, d->m_frame );
grid->addWidget( l, curRow++, 2 );
}
- l = new QLabel(i18n("Free disk space:"), d->m_frame );
+ l = new TQLabel(i18n("Free disk space:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
grid->addWidget( d->m_freeSpaceLabel, curRow++, 2 );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
vbl->addStretch(1);
}
-// QString KFilePropsPlugin::tabName () const
+// TQString KFilePropsPlugin::tabName () const
// {
// return i18n ("&General");
// }
@@ -1109,7 +1109,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
if (ro)
{
// Don't put the initial focus on the line edit when it is ro
- QPushButton *button = properties->actionButton(KDialogBase::Ok);
+ TQPushButton *button = properties->actionButton(KDialogBase::Ok);
if (button)
button->setFocus();
}
@@ -1119,7 +1119,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
void KFilePropsPlugin::slotEditFileType()
{
#ifdef Q_WS_X11
- QString mime;
+ TQString mime;
if ( d->mimeType == KMimeType::defaultMimeType() ) {
int pos = d->oldFileName.findRev( '.' );
if ( pos != -1 )
@@ -1130,9 +1130,9 @@ void KFilePropsPlugin::slotEditFileType()
else
mime = d->mimeType;
//TODO: wrap for win32 or mac?
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + QString::number( (ulong)properties->topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId())
+ " " + KProcess::quote(mime),
keditfiletype, keditfiletype /*unused*/);
#endif
@@ -1144,21 +1144,21 @@ void KFilePropsPlugin::slotIconChanged()
emit changed();
}
-void KFilePropsPlugin::nameFileChanged(const QString &text )
+void KFilePropsPlugin::nameFileChanged(const TQString &text )
{
properties->enableButtonOK(!text.isEmpty());
emit changed();
}
-void KFilePropsPlugin::determineRelativePath( const QString & path )
+void KFilePropsPlugin::determineRelativePath( const TQString & path )
{
// now let's make it relative
- QStringList dirs;
+ TQStringList dirs;
if (KBindingPropsPlugin::supports(properties->items()))
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("mime", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
}
else
{
@@ -1167,7 +1167,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
else
m_sRelativePath = path;
}
@@ -1179,7 +1179,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
}
}
-void KFilePropsPlugin::slotFoundMountPoint( const QString&,
+void KFilePropsPlugin::slotFoundMountPoint( const TQString&,
unsigned long kBSize,
unsigned long /*kBUsed*/,
unsigned long kBAvail )
@@ -1197,7 +1197,7 @@ void KFilePropsPlugin::slotFoundMountPoint( const QString&,
void KFilePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceLabel->setText(
// xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part.
@@ -1228,7 +1228,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job )
KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize();
KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles();
KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs();
- m_sizeLabel->setText( QString::fromLatin1("%1 (%2)\n%3, %4")
+ m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4")
.arg(KIO::convertSize(totalSize))
.arg(KGlobal::locale()->formatNumber(totalSize, 0))
.arg(i18n("1 file","%n files",totalFiles))
@@ -1249,12 +1249,12 @@ void KFilePropsPlugin::slotSizeDetermine()
kdDebug(250) << " KFilePropsPlugin::slotSizeDetermine() properties->item()=" << properties->item() << endl;
kdDebug(250) << " URL=" << properties->item()->url().url() << endl;
d->dirSizeJob = KDirSize::dirSizeJob( properties->items() );
- d->dirSizeUpdateTimer = new QTimer(this);
- connect( d->dirSizeUpdateTimer, SIGNAL( timeout() ),
- SLOT( slotDirSizeUpdate() ) );
+ d->dirSizeUpdateTimer = new TQTimer(this);
+ connect( d->dirSizeUpdateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotDirSizeUpdate() ) );
d->dirSizeUpdateTimer->start(500);
- connect( d->dirSizeJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDirSizeFinished( KIO::Job * ) ) );
+ connect( d->dirSizeJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDirSizeFinished( KIO::Job * ) ) );
m_sizeStopButton->setEnabled(true);
m_sizeDetermineButton->setEnabled(false);
@@ -1264,13 +1264,13 @@ void KFilePropsPlugin::slotSizeDetermine()
bool isLocal;
KFileItem * item = properties->item();
KURL url = item->mostLocalURL( isLocal );
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
}
@@ -1301,8 +1301,8 @@ bool KFilePropsPlugin::supports( KFileItemList /*_items*/ )
}
// Don't do this at home
-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 KFilePropsPlugin::applyChanges()
{
@@ -1311,9 +1311,9 @@ void KFilePropsPlugin::applyChanges()
kdDebug(250) << "KFilePropsPlugin::applyChanges" << endl;
- if (nameArea->inherits("QLineEdit"))
+ if (nameArea->inherits("TQLineEdit"))
{
- QString n = ((QLineEdit *) nameArea)->text();
+ TQString n = ((TQLineEdit *) nameArea)->text();
// Remove trailing spaces (#4345)
while ( n[n.length()-1].isSpace() )
n.truncate( n.length() - 1 );
@@ -1331,7 +1331,7 @@ void KFilePropsPlugin::applyChanges()
KIO::Job * job = 0L;
KURL oldurl = properties->kurl();
- QString newFileName = KIO::encodeFileName(n);
+ TQString newFileName = KIO::encodeFileName(n);
if (d->bDesktopFile && !newFileName.endsWith(".desktop") && !newFileName.endsWith(".kdelnk"))
newFileName += ".desktop";
@@ -1351,12 +1351,12 @@ void KFilePropsPlugin::applyChanges()
else // Copying a template
job = KIO::copy( oldurl, properties->kurl() );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotCopyFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
- SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotCopyFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
+ TQT_SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
// wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -1412,7 +1412,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job )
// Renamed? Update Name field
if ( d->oldFileName != properties->kurl().fileName() || m_bFromTemplate ) {
KDesktopFile config( properties->kurl().path() );
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -1429,11 +1429,11 @@ void KFilePropsPlugin::applyIconChanges()
KURL url = properties->kurl();
url = KIO::NetAccess::mostLocalURL( url, properties );
if (url.isLocalFile()) {
- QString path;
+ TQString path;
if (S_ISDIR(properties->item()->mode()))
{
- path = url.path(1) + QString::fromLatin1(".directory");
+ path = url.path(1) + TQString::fromLatin1(".directory");
// don't call updateUrl because the other tabs (i.e. permissions)
// apply to the directory, not the .directory file.
}
@@ -1441,17 +1441,17 @@ void KFilePropsPlugin::applyIconChanges()
path = url.path();
// Get the default image
- QString str = KMimeType::findByURL( url,
+ TQString str = KMimeType::findByURL( url,
properties->item()->mode(),
true )->KServiceType::icon();
// Is it another one than the default ?
- QString sIcon;
+ TQString sIcon;
if ( str != iconButton->icon() )
sIcon = iconButton->icon();
// (otherwise write empty value)
kdDebug(250) << "**" << path << "**" << endl;
- QFile f( path );
+ TQFile f( path );
// If default icon and no .directory file -> don't create one
if ( !sIcon.isEmpty() || f.exists() )
@@ -1502,11 +1502,11 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *cbRecursive;
- QLabel *explanationLabel;
- QComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
- QCheckBox *extraCheckbox;
+ TQFrame *m_frame;
+ TQCheckBox *cbRecursive;
+ TQLabel *explanationLabel;
+ TQComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
+ TQCheckBox *extraCheckbox;
mode_t partialPermissions;
KFilePermissionsPropsPlugin::PermissionsMode pmode;
bool canChangePermissions;
@@ -1554,8 +1554,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->cbRecursive = 0L;
grpCombo = 0L; grpEdit = 0;
usrEdit = 0L;
- QString path = properties->kurl().path(-1);
- QString fname = properties->kurl().fileName();
+ TQString path = properties->kurl().path(-1);
+ TQString fname = properties->kurl().fileName();
bool isLocal = properties->kurl().isLocalFile();
bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 );
bool IamRoot = (geteuid() == 0);
@@ -1597,9 +1597,9 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->partialPermissions |= (*it)->permissions();
}
if ( (*it)->user() != strOwner )
- strOwner = QString::null;
+ strOwner = TQString::null;
if ( (*it)->group() != strGroup )
- strGroup = QString::null;
+ strGroup = TQString::null;
}
}
@@ -1621,7 +1621,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct passwd *myself = getpwuid( geteuid() );
if ( myself != 0L )
{
- isMyFile = (strOwner == QString::fromLocal8Bit(myself->pw_name));
+ isMyFile = (strOwner == TQString::fromLocal8Bit(myself->pw_name));
} else
kdWarning() << "I don't exist ?! geteuid=" << geteuid() << endl;
} else {
@@ -1638,24 +1638,24 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->m_frame = properties->addPage(i18n("&Permissions"));
- QBoxLayout *box = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
+ TQBoxLayout *box = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
- QWidget *l;
- QLabel *lbl;
- QGroupBox *gb;
- QGridLayout *gl;
- QPushButton* pbAdvancedPerm = 0;
+ TQWidget *l;
+ TQLabel *lbl;
+ TQGroupBox *gb;
+ TQGridLayout *gl;
+ TQPushButton* pbAdvancedPerm = 0;
/* Group: Access Permissions */
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 7, 2);
+ gl = new TQGridLayout (gb->layout(), 7, 2);
gl->setColStretch(1, 1);
- l = d->explanationLabel = new QLabel( "", gb );
+ l = d->explanationLabel = new TQLabel( "", gb );
if (isLink)
d->explanationLabel->setText(i18n("This file is a link and does not have permissions.",
"All files are links and do not have permissions.",
@@ -1664,39 +1664,39 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->explanationLabel->setText(i18n("Only the owner can change permissions."));
gl->addMultiCellWidget(l, 0, 0, 0, 1);
- lbl = new QLabel( i18n("O&wner:"), gb);
+ lbl = new TQLabel( i18n("O&wner:"), gb);
gl->addWidget(lbl, 1, 0);
- l = d->ownerPermCombo = new QComboBox(gb);
+ l = d->ownerPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 1, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
- lbl = new QLabel( i18n("Gro&up:"), gb);
+ lbl = new TQLabel( i18n("Gro&up:"), gb);
gl->addWidget(lbl, 2, 0);
- l = d->groupPermCombo = new QComboBox(gb);
+ l = d->groupPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 2, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
- lbl = new QLabel( i18n("O&thers:"), gb);
+ lbl = new TQLabel( i18n("O&thers:"), gb);
gl->addWidget(lbl, 3, 0);
- l = d->othersPermCombo = new QComboBox(gb);
+ l = d->othersPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 3, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
"owner nor in the group, are allowed to do."));
if (!isLink) {
- l = d->extraCheckbox = new QCheckBox(hasDir ?
+ l = d->extraCheckbox = new TQCheckBox(hasDir ?
i18n("Only own&er can rename and delete folder content") :
i18n("Is &executable"),
gb );
- connect( d->extraCheckbox, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ connect( d->extraCheckbox, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
gl->addWidget(l, 4, 1);
- QWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
+ TQWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
"delete or rename the contained files and folders. Other "
"users can only add new files, which requires the 'Modify "
"Content' permission.")
@@ -1704,28 +1704,28 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
"sense for programs and scripts. It is required when you want to "
"execute them."));
- QLayoutItem *spacer = new QSpacerItem(0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQLayoutItem *spacer = new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
gl->addMultiCell(spacer, 5, 5, 0, 1);
- pbAdvancedPerm = new QPushButton(i18n("A&dvanced Permissions"), gb);
+ pbAdvancedPerm = new TQPushButton(i18n("A&dvanced Permissions"), gb);
gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, AlignRight);
- connect(pbAdvancedPerm, SIGNAL( clicked() ), this, SLOT( slotShowAdvancedPermissions() ));
+ connect(pbAdvancedPerm, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowAdvancedPermissions() ));
}
else
d->extraCheckbox = 0;
/**** Group: Ownership ****/
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 4, 3);
+ gl = new TQGridLayout (gb->layout(), 4, 3);
gl->addRowSpacing(0, 10);
/*** Set Owner ***/
- l = new QLabel( i18n("User:"), gb );
+ l = new TQLabel( i18n("User:"), gb );
gl->addWidget (l, 1, 0);
/* GJ: Don't autocomplete more than 1000 users. This is a kind of random
@@ -1738,7 +1738,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct group *ge;
/* File owner: For root, offer a KLineEdit with autocompletion.
- * For a user, who can never chown() a file, offer a QLabel.
+ * For a user, who can never chown() a file, offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1747,25 +1747,25 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
kcom->setOrder(KCompletion::Sorted);
setpwent();
for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(user->pw_name));
+ kcom->addItem(TQString::fromLatin1(user->pw_name));
endpwent();
usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto :
KGlobalSettings::CompletionNone);
usrEdit->setText(strOwner);
gl->addWidget(usrEdit, 1, 1);
- connect( usrEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( usrEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strOwner, gb);
+ l = new TQLabel(strOwner, gb);
gl->addWidget(l, 1, 1);
}
/*** Set Group ***/
- QStringList groupList;
- QCString strUser;
+ TQStringList groupList;
+ TQCString strUser;
user = getpwuid(geteuid());
if (user != 0L)
strUser = user->pw_name;
@@ -1775,7 +1775,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++)
{
if (IamRoot)
- groupList += QString::fromLatin1(ge->gr_name);
+ groupList += TQString::fromLatin1(ge->gr_name);
else
{
/* pick the groups to which the user belongs */
@@ -1783,7 +1783,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
char * member;
while ((member = *members) != 0L) {
if (strUser == member) {
- groupList += QString::fromLocal8Bit(ge->gr_name);
+ groupList += TQString::fromLocal8Bit(ge->gr_name);
break;
}
++members;
@@ -1796,7 +1796,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/* add the effective Group to the list .. */
ge = getgrgid (getegid());
if (ge) {
- QString name = QString::fromLatin1(ge->gr_name);
+ TQString name = TQString::fromLatin1(ge->gr_name);
if (name.isEmpty())
name.setNum(ge->gr_gid);
if (groupList.find(name) == groupList.end())
@@ -1811,14 +1811,14 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
if (!isMyGroup)
groupList += strGroup;
- l = new QLabel( i18n("Group:"), gb );
+ l = new TQLabel( i18n("Group:"), gb );
gl->addWidget (l, 2, 0);
/* Set group: if possible to change:
* - Offer a KLineEdit for root, since he can change to any group.
- * - Offer a QComboBox for a normal user, since he can change to a fixed
+ * - Offer a TQComboBox for a normal user, since he can change to a fixed
* (small) set of groups only.
- * If not changeable: offer a QLabel.
+ * If not changeable: offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1830,21 +1830,21 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
grpEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
grpEdit->setText(strGroup);
gl->addWidget(grpEdit, 2, 1);
- connect( grpEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( grpEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else if ((groupList.count() > 1) && isMyFile && isLocal)
{
- grpCombo = new QComboBox(gb, "combogrouplist");
+ grpCombo = new TQComboBox(gb, "combogrouplist");
grpCombo->insertStringList(groupList);
grpCombo->setCurrentItem(groupList.findIndex(strGroup));
gl->addWidget(grpCombo, 2, 1);
- connect( grpCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
+ connect( grpCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strGroup, gb);
+ l = new TQLabel(strGroup, gb);
gl->addWidget(l, 2, 1);
}
@@ -1853,8 +1853,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
// "Apply recursive" checkbox
if ( hasDir && !isLink && !isTrash )
{
- d->cbRecursive = new QCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
- connect( d->cbRecursive, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ d->cbRecursive = new TQCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
+ connect( d->cbRecursive, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
box->addWidget( d->cbRecursive );
}
@@ -1873,7 +1873,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
}
#ifdef USE_POSIX_ACL
-static bool fileSystemSupportsACL( const QCString& pathCString )
+static bool fileSystemSupportsACL( const TQCString& pathCString )
{
bool fileSystemSupportsACLs = false;
#ifdef Q_OS_FREEBSD
@@ -1901,118 +1901,118 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
KDialogBase dlg(properties, 0, true, i18n("Advanced Permissions"),
KDialogBase::Ok|KDialogBase::Cancel);
- QLabel *l, *cl[3];
- QGroupBox *gb;
- QGridLayout *gl;
+ TQLabel *l, *cl[3];
+ TQGroupBox *gb;
+ TQGridLayout *gl;
- QVBox *mainVBox = dlg.makeVBoxMainWidget();
+ TQVBox *mainVBox = dlg.makeVBoxMainWidget();
// Group: Access Permissions
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
- gl = new QGridLayout (gb->layout(), 6, 6);
+ gl = new TQGridLayout (gb->layout(), 6, 6);
gl->addRowSpacing(0, 10);
- QValueVector<QWidget*> theNotSpecials;
+ TQValueVector<TQWidget*> theNotSpecials;
- l = new QLabel(i18n("Class"), gb );
+ l = new TQLabel(i18n("Class"), gb );
gl->addWidget(l, 1, 0);
theNotSpecials.append( l );
if (isDir)
- l = new QLabel( i18n("Show\nEntries"), gb );
+ l = new TQLabel( i18n("Show\nEntries"), gb );
else
- l = new QLabel( i18n("Read"), gb );
+ l = new TQLabel( i18n("Read"), gb );
gl->addWidget (l, 1, 1);
theNotSpecials.append( l );
- QString readWhatsThis;
+ TQString readWhatsThis;
if (isDir)
readWhatsThis = i18n("This flag allows viewing the content of the folder.");
else
readWhatsThis = i18n("The Read flag allows viewing the content of the file.");
- QWhatsThis::add(l, readWhatsThis);
+ TQWhatsThis::add(l, readWhatsThis);
if (isDir)
- l = new QLabel( i18n("Write\nEntries"), gb );
+ l = new TQLabel( i18n("Write\nEntries"), gb );
else
- l = new QLabel( i18n("Write"), gb );
+ l = new TQLabel( i18n("Write"), gb );
gl->addWidget (l, 1, 2);
theNotSpecials.append( l );
- QString writeWhatsThis;
+ TQString writeWhatsThis;
if (isDir)
writeWhatsThis = i18n("This flag allows adding, renaming and deleting of files. "
"Note that deleting and renaming can be limited using the Sticky flag.");
else
writeWhatsThis = i18n("The Write flag allows modifying the content of the file.");
- QWhatsThis::add(l, writeWhatsThis);
+ TQWhatsThis::add(l, writeWhatsThis);
- QString execWhatsThis;
+ TQString execWhatsThis;
if (isDir) {
- l = new QLabel( i18n("Enter folder", "Enter"), gb );
+ l = new TQLabel( i18n("Enter folder", "Enter"), gb );
execWhatsThis = i18n("Enable this flag to allow entering the folder.");
}
else {
- l = new QLabel( i18n("Exec"), gb );
+ l = new TQLabel( i18n("Exec"), gb );
execWhatsThis = i18n("Enable this flag to allow executing the file as a program.");
}
- QWhatsThis::add(l, execWhatsThis);
+ TQWhatsThis::add(l, execWhatsThis);
theNotSpecials.append( l );
// GJ: Add space between normal and special modes
- QSize size = l->sizeHint();
+ TQSize size = l->sizeHint();
size.setWidth(size.width() + 15);
l->setFixedSize(size);
gl->addWidget (l, 1, 3);
- l = new QLabel( i18n("Special"), gb );
+ l = new TQLabel( i18n("Special"), gb );
gl->addMultiCellWidget(l, 1, 1, 4, 5);
- QString specialWhatsThis;
+ TQString specialWhatsThis;
if (isDir)
specialWhatsThis = i18n("Special flag. Valid for the whole folder, the exact "
"meaning of the flag can be seen in the right hand column.");
else
specialWhatsThis = i18n("Special flag. The exact meaning of the flag can be seen "
"in the right hand column.");
- QWhatsThis::add(l, specialWhatsThis);
+ TQWhatsThis::add(l, specialWhatsThis);
- cl[0] = new QLabel( i18n("User"), gb );
+ cl[0] = new TQLabel( i18n("User"), gb );
gl->addWidget (cl[0], 2, 0);
theNotSpecials.append( cl[0] );
- cl[1] = new QLabel( i18n("Group"), gb );
+ cl[1] = new TQLabel( i18n("Group"), gb );
gl->addWidget (cl[1], 3, 0);
theNotSpecials.append( cl[1] );
- cl[2] = new QLabel( i18n("Others"), gb );
+ cl[2] = new TQLabel( i18n("Others"), gb );
gl->addWidget (cl[2], 4, 0);
theNotSpecials.append( cl[2] );
- l = new QLabel(i18n("Set UID"), gb);
+ l = new TQLabel(i18n("Set UID"), gb);
gl->addWidget(l, 2, 5);
- QString setUidWhatsThis;
+ TQString setUidWhatsThis;
if (isDir)
setUidWhatsThis = i18n("If this flag is set, the owner of this folder will be "
"the owner of all new files.");
else
setUidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the owner.");
- QWhatsThis::add(l, setUidWhatsThis);
+ TQWhatsThis::add(l, setUidWhatsThis);
- l = new QLabel(i18n("Set GID"), gb);
+ l = new TQLabel(i18n("Set GID"), gb);
gl->addWidget(l, 3, 5);
- QString setGidWhatsThis;
+ TQString setGidWhatsThis;
if (isDir)
setGidWhatsThis = i18n("If this flag is set, the group of this folder will be "
"set for all new files.");
else
setGidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the group.");
- QWhatsThis::add(l, setGidWhatsThis);
+ TQWhatsThis::add(l, setGidWhatsThis);
- l = new QLabel(i18n("File permission", "Sticky"), gb);
+ l = new TQLabel(i18n("File permission", "Sticky"), gb);
gl->addWidget(l, 4, 5);
- QString stickyWhatsThis;
+ TQString stickyWhatsThis;
if (isDir)
stickyWhatsThis = i18n("If the Sticky flag is set on a folder, only the owner "
"and root can delete or rename files. Otherwise everybody "
@@ -2020,7 +2020,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
else
stickyWhatsThis = i18n("The Sticky flag on a file is ignored on Linux, but may "
"be used on some systems");
- QWhatsThis::add(l, stickyWhatsThis);
+ TQWhatsThis::add(l, stickyWhatsThis);
mode_t aPermissions, aPartialPermissions;
mode_t dummy1, dummy2;
@@ -2052,10 +2052,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
}
// Draw Checkboxes
- QCheckBox *cba[3][4];
+ TQCheckBox *cba[3][4];
for (int row = 0; row < 3 ; ++row) {
for (int col = 0; col < 4; ++col) {
- QCheckBox *cb = new QCheckBox( gb );
+ TQCheckBox *cb = new TQCheckBox( gb );
if ( col != 3 ) theNotSpecials.append( cb );
cba[row][col] = cb;
cb->setChecked(aPermissions & fperm[row][col]);
@@ -2071,24 +2071,24 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
gl->addWidget (cb, row+2, col+1);
switch(col) {
case 0:
- QWhatsThis::add(cb, readWhatsThis);
+ TQWhatsThis::add(cb, readWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, writeWhatsThis);
+ TQWhatsThis::add(cb, writeWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, execWhatsThis);
+ TQWhatsThis::add(cb, execWhatsThis);
break;
case 3:
switch(row) {
case 0:
- QWhatsThis::add(cb, setUidWhatsThis);
+ TQWhatsThis::add(cb, setUidWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, setGidWhatsThis);
+ TQWhatsThis::add(cb, setGidWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, stickyWhatsThis);
+ TQWhatsThis::add(cb, stickyWhatsThis);
break;
}
break;
@@ -2102,11 +2102,11 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
// FIXME make it work with partial entries
if ( properties->items().count() == 1 ) {
- QCString pathCString = QFile::encodeName( properties->item()->url().path() );
+ TQCString pathCString = TQFile::encodeName( properties->item()->url().path() );
d->fileSystemSupportsACLs = fileSystemSupportsACL( pathCString );
}
if ( d->fileSystemSupportsACLs ) {
- std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &QWidget::hide ) );
+ std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &TQWidget::hide ) );
extendedACLs = new KACLEditWidget( mainVBox );
if ( d->extendedACL.isValid() && d->extendedACL.isExtended() )
extendedACLs->setACL( d->extendedACL );
@@ -2132,10 +2132,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
for (int col = 0; col < 4; ++col) {
switch (cba[row][col]->state())
{
- case QCheckBox::On:
+ case TQCheckBox::On:
orPermissions |= fperm[row][col];
//fall through
- case QCheckBox::Off:
+ case TQCheckBox::Off:
andPermissions &= ~fperm[row][col];
break;
default: // NoChange
@@ -2171,7 +2171,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
emit changed();
}
-// QString KFilePermissionsPropsPlugin::tabName () const
+// TQString KFilePermissionsPropsPlugin::tabName () const
// {
// return i18n ("&Permissions");
// }
@@ -2193,7 +2193,7 @@ bool KFilePermissionsPropsPlugin::supports( KFileItemList _items )
}
// sets a combo box in the Access Control frame
-void KFilePermissionsPropsPlugin::setComboContent(QComboBox *combo, PermissionsTarget target,
+void KFilePermissionsPropsPlugin::setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial) {
combo->clear();
if (d->pmode == PermissionsOnlyLinks) {
@@ -2379,11 +2379,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOwner;
if ((m & UniOwner) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRUSR | S_IWUSR);
else {
andFilePermissions &= ~(S_IRUSR | S_IWUSR | S_IXUSR);
- if ((m & S_IRUSR) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRUSR) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXUSR;
}
@@ -2398,11 +2398,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniGroup;
if ((m & UniGroup) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRGRP | S_IWGRP);
else {
andFilePermissions &= ~(S_IRGRP | S_IWGRP | S_IXGRP);
- if ((m & S_IRGRP) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRGRP) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXGRP;
}
@@ -2417,11 +2417,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOthers;
if ((m & UniOthers) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IROTH | S_IWOTH);
else {
andFilePermissions &= ~(S_IROTH | S_IWOTH | S_IXOTH);
- if ((m & S_IROTH) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IROTH) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXOTH;
}
@@ -2432,9 +2432,9 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
}
if (((d->pmode == PermissionsMixed) || (d->pmode == PermissionsOnlyDirs)) &&
- (d->extraCheckbox->state() != QButton::NoChange)) {
+ (d->extraCheckbox->state() != TQButton::NoChange)) {
andDirPermissions &= ~S_ISVTX;
- if (d->extraCheckbox->state() == QButton::On)
+ if (d->extraCheckbox->state() == TQButton::On)
orDirPermissions |= S_ISVTX;
}
}
@@ -2461,7 +2461,7 @@ void KFilePermissionsPropsPlugin::applyChanges()
andDirPermissions = d->partialPermissions;
}
- QString owner, group;
+ TQString owner, group;
if (usrEdit)
owner = usrEdit->text();
if (grpEdit)
@@ -2470,10 +2470,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
group = grpCombo->currentText();
if (owner == strOwner)
- owner = QString::null; // no change
+ owner = TQString::null; // no change
if (group == strGroup)
- group = QString::null;
+ group = TQString::null;
bool recursive = d->cbRecursive && d->cbRecursive->isChecked();
bool permissionChange = false;
@@ -2509,10 +2509,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2525,10 +2525,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2557,7 +2557,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
@@ -2565,19 +2565,19 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
{
d = new KURLPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("U&RL"));
- QVBoxLayout *layout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel *l;
- l = new QLabel( d->m_frame, "Label_1" );
+ TQLabel *l;
+ l = new TQLabel( d->m_frame, "Label_1" );
l->setText( i18n("URL:") );
layout->addWidget(l);
URLEdit = new KURLRequester( d->m_frame, "URL Requester" );
layout->addWidget(URLEdit);
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -2589,8 +2589,8 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
if ( !URLStr.isNull() )
URLEdit->setURL( URLStr );
- connect( URLEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( URLEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
layout->addStretch (1);
}
@@ -2600,7 +2600,7 @@ KURLPropsPlugin::~KURLPropsPlugin()
delete d;
}
-// QString KURLPropsPlugin::tabName () const
+// TQString KURLPropsPlugin::tabName () const
// {
// return i18n ("U&RL");
// }
@@ -2621,9 +2621,9 @@ bool KURLPropsPlugin::supports( KFileItemList _items )
void KURLPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
"sufficient access to write to <b>%1</b>.</qt>").arg(path));
@@ -2633,13 +2633,13 @@ void KURLPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Link"));
+ config.writeEntry( "Type", TQString::fromLatin1("Link"));
config.writePathEntry( "URL", URLEdit->url() );
// Users can't create a Link .desktop file with a Name field,
// but distributions can. Update the Name field in that case.
if ( config.hasKey("Name") )
{
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
@@ -2663,7 +2663,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2674,10 +2674,10 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
mimeEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
- QBoxLayout *mainlayout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel* tmpQLabel;
+ TQBoxLayout *mainlayout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQLabel* tmpQLabel;
- tmpQLabel = new QLabel( d->m_frame, "Label_1" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_1" );
tmpQLabel->setText( i18n("Pattern ( example: *.html;*.htm )") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2689,7 +2689,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
patternEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(patternEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_2" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_2" );
tmpQLabel->setText( i18n("Mime Type") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2700,7 +2700,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
mimeEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(mimeEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_3" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_3" );
tmpQLabel->setText( i18n("Comment") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2711,22 +2711,22 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(commentEdit, 1);
- cbAutoEmbed = new QCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
+ cbAutoEmbed = new TQCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
mainlayout->addWidget(cbAutoEmbed, 1);
mainlayout->addStretch (10);
mainlayout->activate();
- QFile f( _props->kurl().path() );
+ TQFile f( _props->kurl().path() );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( _props->kurl().path() );
config.setDesktopGroup();
- QString patternStr = config.readEntry( "Patterns" );
- QString iconStr = config.readEntry( "Icon" );
- QString commentStr = config.readEntry( "Comment" );
+ TQString patternStr = config.readEntry( "Patterns" );
+ TQString iconStr = config.readEntry( "Icon" );
+ TQString commentStr = config.readEntry( "Comment" );
m_sMimeStr = config.readEntry( "MimeType" );
if ( !patternStr.isEmpty() )
@@ -2741,14 +2741,14 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
else
cbAutoEmbed->setNoChange();
- connect( patternEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( mimeEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( cbAutoEmbed, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
+ connect( patternEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( mimeEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( cbAutoEmbed, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KBindingPropsPlugin::~KBindingPropsPlugin()
@@ -2756,7 +2756,7 @@ KBindingPropsPlugin::~KBindingPropsPlugin()
delete d;
}
-// QString KBindingPropsPlugin::tabName () const
+// TQString KBindingPropsPlugin::tabName () const
// {
// return i18n ("A&ssociation");
// }
@@ -2777,8 +2777,8 @@ bool KBindingPropsPlugin::supports( KFileItemList _items )
void KBindingPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
@@ -2790,14 +2790,14 @@ void KBindingPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("MimeType") );
+ config.writeEntry( "Type", TQString::fromLatin1("MimeType") );
config.writeEntry( "Patterns", patternEdit->text() );
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment",
commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "MimeType", mimeEdit->text() );
- if ( cbAutoEmbed->state() == QButton::NoChange )
+ if ( cbAutoEmbed->state() == TQButton::NoChange )
config.deleteEntry( "X-KDE-AutoEmbed", false );
else
config.writeEntry( "X-KDE-AutoEmbed", cbAutoEmbed->isChecked() );
@@ -2820,11 +2820,11 @@ public:
{
}
- QFrame *m_frame;
- QStringList mountpointlist;
- QLabel *m_freeSpaceText;
- QLabel *m_freeSpaceLabel;
- QProgressBar *m_freeSpaceBar;
+ TQFrame *m_frame;
+ TQStringList mountpointlist;
+ TQLabel *m_freeSpaceText;
+ TQLabel *m_freeSpaceLabel;
+ TQProgressBar *m_freeSpaceBar;
};
KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2832,73 +2832,73 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
d = new KDevicePropsPluginPrivate;
d->m_frame = properties->addPage(i18n("De&vice"));
- QStringList devices;
+ TQStringList devices;
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
for(KMountPoint::List::ConstIterator it = mountPoints.begin();
it != mountPoints.end(); ++it)
{
KMountPoint *mp = *it;
- QString mountPoint = mp->mountPoint();
- QString device = mp->mountedFrom();
+ TQString mountPoint = mp->mountPoint();
+ TQString device = mp->mountedFrom();
kdDebug()<<"mountPoint :"<<mountPoint<<" device :"<<device<<" mp->mountType() :"<<mp->mountType()<<endl;
if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty()
&& device != "none")
{
- devices.append( device + QString::fromLatin1(" (")
- + mountPoint + QString::fromLatin1(")") );
+ devices.append( device + TQString::fromLatin1(" (")
+ + mountPoint + TQString::fromLatin1(")") );
m_devicelist.append(device);
d->mountpointlist.append(mountPoint);
}
}
- QGridLayout *layout = new QGridLayout( d->m_frame, 0, 2, 0,
+ TQGridLayout *layout = new TQGridLayout( d->m_frame, 0, 2, 0,
KDialog::spacingHint());
layout->setColStretch(1, 1);
- QLabel* label;
- label = new QLabel( d->m_frame );
+ TQLabel* label;
+ label = new TQLabel( d->m_frame );
label->setText( devices.count() == 0 ?
i18n("Device (/dev/fd0):") : // old style
i18n("Device:") ); // new style (combobox)
layout->addWidget(label, 0, 0);
- device = new QComboBox( true, d->m_frame, "ComboBox_device" );
+ device = new TQComboBox( true, d->m_frame, "ComboBox_device" );
device->insertStringList( devices );
layout->addWidget(device, 0, 1);
- connect( device, SIGNAL( activated( int ) ),
- this, SLOT( slotActivated( int ) ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotActivated( int ) ) );
- readonly = new QCheckBox( d->m_frame, "CheckBox_readonly" );
+ readonly = new TQCheckBox( d->m_frame, "CheckBox_readonly" );
readonly->setText( i18n("Read only") );
layout->addWidget(readonly, 1, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( i18n("File system:") );
layout->addWidget(label, 2, 0);
- QLabel *fileSystem = new QLabel( d->m_frame );
+ TQLabel *fileSystem = new TQLabel( d->m_frame );
layout->addWidget(fileSystem, 2, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( devices.count()==0 ?
i18n("Mount point (/mnt/floppy):") : // old style
i18n("Mount point:")); // new style (combobox)
layout->addWidget(label, 3, 0);
- mountpoint = new QLabel( d->m_frame, "LineEdit_mountpoint" );
+ mountpoint = new TQLabel( d->m_frame, "LineEdit_mountpoint" );
layout->addWidget(mountpoint, 3, 1);
// show disk free
- d->m_freeSpaceText = new QLabel(i18n("Free disk space:"), d->m_frame );
+ d->m_freeSpaceText = new TQLabel(i18n("Free disk space:"), d->m_frame );
layout->addWidget(d->m_freeSpaceText, 4, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
layout->addWidget( d->m_freeSpaceLabel, 4, 1 );
- d->m_freeSpaceBar = new QProgressBar( d->m_frame, "freeSpaceBar" );
+ d->m_freeSpaceBar = new TQProgressBar( d->m_frame, "freeSpaceBar" );
layout->addMultiCellWidget(d->m_freeSpaceBar, 5, 5, 0, 1);
// we show it in the slot when we know the values
@@ -2910,29 +2910,29 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * unmounted->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device);
layout->addWidget(unmounted, 7, 0);
- label = new QLabel( i18n("Unmounted Icon"), d->m_frame );
+ label = new TQLabel( i18n("Unmounted Icon"), d->m_frame );
layout->addWidget(label, 7, 1);
layout->setRowStretch(8, 1);
- QString path( _props->kurl().path() );
+ TQString path( _props->kurl().path() );
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( path );
config.setDesktopGroup();
- QString deviceStr = config.readEntry( "Dev" );
- QString mountPointStr = config.readEntry( "MountPoint" );
+ TQString deviceStr = config.readEntry( "Dev" );
+ TQString mountPointStr = config.readEntry( "MountPoint" );
bool ro = config.readBoolEntry( "ReadOnly", false );
- QString unmountedStr = config.readEntry( "UnmountIcon" );
+ TQString unmountedStr = config.readEntry( "UnmountIcon" );
fileSystem->setText( i18n(config.readEntry("FSType").local8Bit()) );
@@ -2960,17 +2960,17 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
unmounted->setIcon( unmountedStr );
- connect( device, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( readonly, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( unmounted, SIGNAL( iconChanged( QString ) ),
- this, SIGNAL( changed() ) );
-
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotDeviceChanged() ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( readonly, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( unmounted, TQT_SIGNAL( iconChanged( TQString ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotDeviceChanged() ) );
}
KDevicePropsPlugin::~KDevicePropsPlugin()
@@ -2978,7 +2978,7 @@ KDevicePropsPlugin::~KDevicePropsPlugin()
delete d;
}
-// QString KDevicePropsPlugin::tabName () const
+// TQString KDevicePropsPlugin::tabName () const
// {
// return i18n ("De&vice");
// }
@@ -2993,10 +2993,10 @@ void KDevicePropsPlugin::updateInfo()
if ( !mountpoint->text().isEmpty() )
{
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountpoint->text() );
}
@@ -3018,7 +3018,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
if ( index != -1 )
mountpoint->setText( d->mountpointlist[index] );
else
- mountpoint->setText( QString::null );
+ mountpoint->setText( TQString::null );
updateInfo();
}
@@ -3026,7 +3026,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
void KDevicePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceText->show();
d->m_freeSpaceLabel->show();
@@ -3059,8 +3059,8 @@ bool KDevicePropsPlugin::supports( KFileItemList _items )
void KDevicePropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have sufficient "
@@ -3071,7 +3071,7 @@ void KDevicePropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("FSDevice") );
+ config.writeEntry( "Type", TQString::fromLatin1("FSDevice") );
config.writeEntry( "Dev", device->currentText() );
config.writeEntry( "MountPoint", mountpoint->text() );
@@ -3095,13 +3095,13 @@ void KDevicePropsPlugin::applyChanges()
KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
: KPropsDlgPlugin( _props )
{
- QFrame *frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *mainlayout = new QVBoxLayout( frame, 0, KDialog::spacingHint() );
+ TQFrame *frame = properties->addPage(i18n("&Application"));
+ TQVBoxLayout *mainlayout = new TQVBoxLayout( frame, 0, KDialog::spacingHint() );
w = new KPropertiesDesktopBase(frame);
mainlayout->addWidget(w);
- bool bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ bool bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
if (bKDesktopMode)
{
@@ -3113,29 +3113,29 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->pathEdit->setMode(KFile::Directory | KFile::LocalOnly);
w->pathEdit->lineEdit()->setAcceptDrops(false);
- connect( w->nameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->genNameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commentEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commandEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->pathEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
+ connect( w->nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commandEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->pathEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
- connect( w->browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( w->addFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotAddFiletype() ) );
- connect( w->delFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotDelFiletype() ) );
- connect( w->advancedButton, SIGNAL( clicked() ), this, SLOT( slotAdvanced() ) );
+ connect( w->browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( w->addFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddFiletype() ) );
+ connect( w->delFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDelFiletype() ) );
+ connect( w->advancedButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdvanced() ) );
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString nameStr = config.readName();
- QString genNameStr = config.readGenericName();
- QString commentStr = config.readComment();
- QString commandStr = config.readPathEntry( "Exec" );
+ TQString nameStr = config.readName();
+ TQString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString commandStr = config.readPathEntry( "Exec" );
if (commandStr.left(12) == "ksystraycmd ")
{
commandStr.remove(0, 12);
@@ -3145,7 +3145,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_systrayBool = false;
m_origCommandStr = commandStr;
- QString pathStr = config.readPathEntry( "Path" );
+ TQString pathStr = config.readPathEntry( "Path" );
m_terminalBool = config.readBoolEntry( "Terminal" );
m_terminalOptionStr = config.readEntry( "TerminalOptions" );
m_suidBool = config.readBoolEntry( "X-KDE-SubstituteUID" );
@@ -3156,7 +3156,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_startupBool = config.readBoolEntry( "X-KDE-StartupNotify", true );
m_dcopServiceType = config.readEntry("X-DCOP-ServiceType").lower();
- QStringList mimeTypes = config.readListEntry( "MimeType", ';' );
+ TQStringList mimeTypes = config.readListEntry( "MimeType", ';' );
if ( nameStr.isEmpty() || bKDesktopMode ) {
// We'll use the file name if no name is specified
@@ -3174,12 +3174,12 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->filetypeList->setAllColumnsShowFocus(true);
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- for(QStringList::ConstIterator it = mimeTypes.begin();
+ for(TQStringList::ConstIterator it = mimeTypes.begin();
it != mimeTypes.end(); )
{
KMimeType::Ptr p = KMimeType::mimeType(*it);
++it;
- QString preference;
+ TQString preference;
if (it != mimeTypes.end())
{
bool numeric;
@@ -3192,7 +3192,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
}
if (p && (p != defaultMimetype))
{
- new QListViewItem(w->filetypeList, p->name(), p->comment(), preference);
+ new TQListViewItem(w->filetypeList, p->name(), p->comment(), preference);
}
}
@@ -3204,8 +3204,8 @@ KDesktopPropsPlugin::~KDesktopPropsPlugin()
void KDesktopPropsPlugin::slotSelectMimetype()
{
- QListView *w = (QListView*)sender();
- QListViewItem *item = w->firstChild();
+ TQListView *w = (TQListView*)sender();
+ TQListViewItem *item = w->firstChild();
while(item)
{
if (item->isSelected())
@@ -3220,7 +3220,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
i18n("Add File Type for %1").arg(properties->kurl().fileName()),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok);
- KGuiItem okItem(i18n("&Add"), QString::null /* no icon */,
+ KGuiItem okItem(i18n("&Add"), TQString::null /* no icon */,
i18n("Add the selected file types to\nthe list of supported file types."),
i18n("Add the selected file types to\nthe list of supported file types."));
dlg.setButtonOK(okItem);
@@ -3231,31 +3231,31 @@ void KDesktopPropsPlugin::slotAddFiletype()
{
mw->listView->setRootIsDecorated(true);
- mw->listView->setSelectionMode(QListView::Extended);
+ mw->listView->setSelectionMode(TQListView::Extended);
mw->listView->setAllColumnsShowFocus(true);
mw->listView->setFullWidth(true);
mw->listView->setMinimumSize(500,400);
- connect(mw->listView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectMimetype()));
- connect(mw->listView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )),
- &dlg, SLOT( slotOk()));
+ connect(mw->listView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectMimetype()));
+ connect(mw->listView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ &dlg, TQT_SLOT( slotOk()));
- QMap<QString,QListViewItem*> majorMap;
- QListViewItem *majorGroup;
+ TQMap<TQString,TQListViewItem*> majorMap;
+ TQListViewItem *majorGroup;
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
for (; it != mimetypes.end(); ++it) {
- QString mimetype = (*it)->name();
+ TQString mimetype = (*it)->name();
if (mimetype == KMimeType::defaultMimeType())
continue;
int index = mimetype.find("/");
- QString maj = mimetype.left(index);
- QString min = mimetype.mid(index+1);
+ TQString maj = mimetype.left(index);
+ TQString min = mimetype.mid(index+1);
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( maj );
if ( mit == majorMap.end() ) {
- majorGroup = new QListViewItem( mw->listView, maj );
+ majorGroup = new TQListViewItem( mw->listView, maj );
majorGroup->setExpandable(true);
mw->listView->setOpen(majorGroup, true);
majorMap.insert( maj, majorGroup );
@@ -3265,10 +3265,10 @@ void KDesktopPropsPlugin::slotAddFiletype()
majorGroup = mit.data();
}
- QListViewItem *item = new QListViewItem(majorGroup, min, (*it)->comment());
+ TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment());
item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small)));
}
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( "all" );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" );
if ( mit != majorMap.end())
{
mw->listView->setCurrentItem(mit.data());
@@ -3279,23 +3279,23 @@ void KDesktopPropsPlugin::slotAddFiletype()
if (dlg.exec() == KDialogBase::Accepted)
{
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- QListViewItem *majorItem = mw->listView->firstChild();
+ TQListViewItem *majorItem = mw->listView->firstChild();
while(majorItem)
{
- QString major = majorItem->text(0);
+ TQString major = majorItem->text(0);
- QListViewItem *minorItem = majorItem->firstChild();
+ TQListViewItem *minorItem = majorItem->firstChild();
while(minorItem)
{
if (minorItem->isSelected())
{
- QString mimetype = major + "/" + minorItem->text(0);
+ TQString mimetype = major + "/" + minorItem->text(0);
KMimeType::Ptr p = KMimeType::mimeType(mimetype);
if (p && (p != defaultMimetype))
{
mimetype = p->name();
bool found = false;
- QListViewItem *item = w->filetypeList->firstChild();
+ TQListViewItem *item = w->filetypeList->firstChild();
while (item)
{
if (mimetype == item->text(0))
@@ -3306,7 +3306,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
item = item->nextSibling();
}
if (!found) {
- new QListViewItem(w->filetypeList, p->name(), p->comment());
+ new TQListViewItem(w->filetypeList, p->name(), p->comment());
emit changed();
}
}
@@ -3331,17 +3331,17 @@ void KDesktopPropsPlugin::checkCommandChanged()
if (KRun::binaryName(w->commandEdit->text(), true) !=
KRun::binaryName(m_origCommandStr, true))
{
- QString m_origCommandStr = w->commandEdit->text();
- m_dcopServiceType= QString::null; // Reset
+ TQString m_origCommandStr = w->commandEdit->text();
+ m_dcopServiceType= TQString::null; // Reset
}
}
void KDesktopPropsPlugin::applyChanges()
{
kdDebug(250) << "KDesktopPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3356,7 +3356,7 @@ void KDesktopPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", w->commentEdit->text() );
config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", w->genNameEdit->text() );
@@ -3369,11 +3369,11 @@ void KDesktopPropsPlugin::applyChanges()
config.writePathEntry( "Path", w->pathEdit->lineEdit()->text() );
// Write mimeTypes
- QStringList mimeTypes;
- for( QListViewItem *item = w->filetypeList->firstChild();
+ TQStringList mimeTypes;
+ for( TQListViewItem *item = w->filetypeList->firstChild();
item; item = item->nextSibling() )
{
- QString preference = item->text(2);
+ TQString preference = item->text(2);
mimeTypes.append(item->text(0));
if (!preference.isEmpty())
mimeTypes.append(preference);
@@ -3382,7 +3382,7 @@ void KDesktopPropsPlugin::applyChanges()
config.writeEntry( "MimeType", mimeTypes, ';' );
if ( !w->nameEdit->isHidden() ) {
- QString nameStr = w->nameEdit->text();
+ TQString nameStr = w->nameEdit->text();
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -3396,7 +3396,7 @@ void KDesktopPropsPlugin::applyChanges()
config.sync();
// KSycoca update needed?
- QString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
+ TQString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
bool updateNeeded = !sycocaPath.startsWith("/");
if (!updateNeeded)
{
@@ -3410,8 +3410,8 @@ void KDesktopPropsPlugin::applyChanges()
void KDesktopPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, w );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, w );
if ( f.isEmpty() )
return;
@@ -3420,7 +3420,7 @@ void KDesktopPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
w->commandEdit->setText( path );
}
@@ -3440,9 +3440,9 @@ void KDesktopPropsPlugin::slotAdvanced()
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
bool terminalCloseBool = false;
@@ -3487,7 +3487,7 @@ void KDesktopPropsPlugin::slotAdvanced()
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3500,24 +3500,24 @@ void KDesktopPropsPlugin::slotAdvanced()
delete kcom;
}
- connect( w->terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCloseCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->startupInfoCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->systrayCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->dcopCombo, SIGNAL( highlighted( int ) ),
- this, SIGNAL( changed() ) );
-
- if ( dlg.exec() == QDialog::Accepted )
+ connect( w->terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCloseCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->startupInfoCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->systrayCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->dcopCombo, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ if ( dlg.exec() == TQDialog::Accepted )
{
m_terminalOptionStr = w->terminalEdit->text().stripWhiteSpace();
m_terminalBool = w->terminalCheck->isChecked();
@@ -3579,8 +3579,8 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *nocloseonexitCheck;
+ TQFrame *m_frame;
+ TQCheckBox *nocloseonexitCheck;
};
KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
@@ -3588,21 +3588,21 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
{
d = new KExecPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("E&xecute"));
- QVBoxLayout * mainlayout = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout * mainlayout = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint());
// Now the widgets in the top layout
- QLabel* l;
- l = new QLabel( i18n( "Comman&d:" ), d->m_frame );
+ TQLabel* l;
+ l = new TQLabel( i18n( "Comman&d:" ), d->m_frame );
mainlayout->addWidget(l);
- QHBoxLayout * hlayout;
- hlayout = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * hlayout;
+ hlayout = new TQHBoxLayout(KDialog::spacingHint());
mainlayout->addLayout(hlayout);
execEdit = new KLineEdit( d->m_frame );
- QWhatsThis::add(execEdit,i18n(
+ TQWhatsThis::add(execEdit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -3618,22 +3618,22 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( execEdit );
- execBrowse = new QPushButton( d->m_frame );
+ execBrowse = new TQPushButton( d->m_frame );
execBrowse->setText( i18n("&Browse...") );
hlayout->addWidget(execBrowse);
// The groupbox about swallowing
- QGroupBox* tmpQGroupBox;
- tmpQGroupBox = new QGroupBox( i18n("Panel Embedding"), d->m_frame );
+ TQGroupBox* tmpQGroupBox;
+ tmpQGroupBox = new TQGroupBox( i18n("Panel Embedding"), d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- QGridLayout *grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- l = new QLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
grid->addWidget(l, 0, 0);
swallowExecEdit = new KLineEdit( tmpQGroupBox );
@@ -3641,7 +3641,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( swallowExecEdit );
- l = new QLabel( i18n( "&Window title:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Window title:" ), tmpQGroupBox );
grid->addWidget(l, 1, 0);
swallowTitleEdit = new KLineEdit( tmpQGroupBox );
@@ -3651,36 +3651,36 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run in terminal
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 3, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- terminalCheck = new QCheckBox( tmpQGroupBox );
+ terminalCheck = new TQCheckBox( tmpQGroupBox );
terminalCheck->setText( i18n("&Run in terminal") );
grid->addMultiCellWidget(terminalCheck, 0, 0, 0, 1);
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
int posOptions = 1;
d->nocloseonexitCheck = 0L;
if (preferredTerminal == "konsole")
{
posOptions = 2;
- d->nocloseonexitCheck = new QCheckBox( tmpQGroupBox );
+ d->nocloseonexitCheck = new TQCheckBox( tmpQGroupBox );
d->nocloseonexitCheck->setText( i18n("Do not &close when command exits") );
grid->addMultiCellWidget(d->nocloseonexitCheck, 1, 1, 0, 1);
}
- terminalLabel = new QLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
+ terminalLabel = new TQLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
grid->addWidget(terminalLabel, posOptions, 0);
terminalEdit = new KLineEdit( tmpQGroupBox );
@@ -3690,20 +3690,20 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run with substituted uid.
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing(KDialog::spacingHint());
grid->setColStretch(1, 1);
- suidCheck = new QCheckBox(tmpQGroupBox);
+ suidCheck = new TQCheckBox(tmpQGroupBox);
suidCheck->setText(i18n("Ru&n as a different user"));
grid->addMultiCellWidget(suidCheck, 0, 0, 0, 1);
- suidLabel = new QLabel(i18n( "&Username:" ), tmpQGroupBox);
+ suidLabel = new TQLabel(i18n( "&Username:" ), tmpQGroupBox);
grid->addWidget(suidLabel, 1, 0);
suidEdit = new KLineEdit(tmpQGroupBox);
@@ -3714,8 +3714,8 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addStretch(1);
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -3761,7 +3761,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3774,27 +3774,27 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
delete kcom;
}
- connect( swallowExecEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( swallowTitleEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( execEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( swallowExecEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( swallowTitleEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( execEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
if (d->nocloseonexitCheck)
- connect( d->nocloseonexitCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
-
- connect( execBrowse, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( terminalCheck, SIGNAL( clicked() ), this, SLOT( enableCheckedEdit() ) );
- connect( suidCheck, SIGNAL( clicked() ), this, SLOT( enableSuidEdit() ) );
+ connect( d->nocloseonexitCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( execBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( terminalCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableCheckedEdit() ) );
+ connect( suidCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableSuidEdit() ) );
}
@@ -3835,9 +3835,9 @@ bool KExecPropsPlugin::supports( KFileItemList _items )
void KExecPropsPlugin::applyChanges()
{
kdDebug(250) << "KExecPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3848,15 +3848,15 @@ void KExecPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writePathEntry( "Exec", execEdit->text() );
config.writePathEntry( "SwallowExec", swallowExecEdit->text() );
config.writeEntry( "SwallowTitle", swallowTitleEdit->text() );
config.writeEntry( "Terminal", terminalCheck->isChecked() );
- QString temp = terminalEdit->text();
+ TQString temp = terminalEdit->text();
if (d->nocloseonexitCheck )
if ( d->nocloseonexitCheck->isChecked() )
- temp += QString::fromLatin1("--noclose ");
+ temp += TQString::fromLatin1("--noclose ");
temp = temp.stripWhiteSpace();
config.writeEntry( "TerminalOptions", temp );
config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() );
@@ -3866,8 +3866,8 @@ void KExecPropsPlugin::applyChanges()
void KExecPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, d->m_frame );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, d->m_frame );
if ( f.isEmpty() )
return;
@@ -3876,7 +3876,7 @@ void KExecPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
execEdit->setText( path );
}
@@ -3886,13 +3886,13 @@ class KApplicationPropsPlugin::KApplicationPropsPluginPrivate
public:
KApplicationPropsPluginPrivate()
{
- m_kdesktopMode = QCString(qApp->name()) == "kdesktop"; // nasty heh?
+ m_kdesktopMode = TQCString(qApp->name()) == "kdesktop"; // nasty heh?
}
~KApplicationPropsPluginPrivate()
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
bool m_kdesktopMode;
};
@@ -3901,29 +3901,29 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
{
d = new KApplicationPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *toplayout = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *toplayout = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
- QIconSet iconSet;
- QPixmap pixMap;
+ TQIconSet iconSet;
+ TQPixmap pixMap;
- addExtensionButton = new QPushButton( QString::null, d->m_frame );
+ addExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "back" );
addExtensionButton->setIconSet( iconSet );
- pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
addExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( addExtensionButton, SIGNAL( clicked() ),
- SLOT( slotAddExtension() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddExtension() ) );
- delExtensionButton = new QPushButton( QString::null, d->m_frame );
+ delExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "forward" );
delExtensionButton->setIconSet( iconSet );
delExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( delExtensionButton, SIGNAL( clicked() ),
- SLOT( slotDelExtension() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotDelExtension() ) );
- QLabel *l;
+ TQLabel *l;
- QGridLayout *grid = new QGridLayout(2, 2);
+ TQGridLayout *grid = new TQGridLayout(2, 2);
grid->setColStretch(1, 1);
toplayout->addLayout(grid);
@@ -3934,61 +3934,61 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
}
else
{
- l = new QLabel(i18n("Name:"), d->m_frame, "Label_4" );
+ l = new TQLabel(i18n("Name:"), d->m_frame, "Label_4" );
grid->addWidget(l, 0, 0);
nameEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
grid->addWidget(nameEdit, 0, 1);
}
- l = new QLabel(i18n("Description:"), d->m_frame, "Label_5" );
+ l = new TQLabel(i18n("Description:"), d->m_frame, "Label_5" );
grid->addWidget(l, 1, 0);
genNameEdit = new KLineEdit( d->m_frame, "LineEdit_4" );
grid->addWidget(genNameEdit, 1, 1);
- l = new QLabel(i18n("Comment:"), d->m_frame, "Label_3" );
+ l = new TQLabel(i18n("Comment:"), d->m_frame, "Label_3" );
grid->addWidget(l, 2, 0);
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
grid->addWidget(commentEdit, 2, 1);
- l = new QLabel(i18n("File types:"), d->m_frame);
+ l = new TQLabel(i18n("File types:"), d->m_frame);
toplayout->addWidget(l, 0, AlignLeft);
- grid = new QGridLayout(4, 3);
+ grid = new TQGridLayout(4, 3);
grid->setColStretch(0, 1);
grid->setColStretch(2, 1);
grid->setRowStretch( 0, 1 );
grid->setRowStretch( 3, 1 );
toplayout->addLayout(grid, 2);
- extensionsList = new QListBox( d->m_frame );
- extensionsList->setSelectionMode( QListBox::Extended );
+ extensionsList = new TQListBox( d->m_frame );
+ extensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(extensionsList, 0, 3, 0, 0);
grid->addWidget(addExtensionButton, 1, 1);
grid->addWidget(delExtensionButton, 2, 1);
- availableExtensionsList = new QListBox( d->m_frame );
- availableExtensionsList->setSelectionMode( QListBox::Extended );
+ availableExtensionsList = new TQListBox( d->m_frame );
+ availableExtensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(availableExtensionsList, 0, 3, 2, 2);
- QString path = properties->kurl().path() ;
- QFile f( path );
+ TQString path = properties->kurl().path() ;
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString commentStr = config.readComment();
- QString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString genNameStr = config.readGenericName();
- QStringList selectedTypes = config.readListEntry( "ServiceTypes" );
+ TQStringList selectedTypes = config.readListEntry( "ServiceTypes" );
// For compatibility with KDE 1.x
selectedTypes += config.readListEntry( "MimeType", ';' );
- QString nameStr = config.readName();
+ TQString nameStr = config.readName();
if ( nameStr.isEmpty() || d->m_kdesktopMode ) {
// We'll use the file name if no name is specified
// because we _need_ a Name for a valid file.
@@ -4002,39 +4002,39 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
nameEdit->setText( nameStr );
selectedTypes.sort();
- QStringList::Iterator sit = selectedTypes.begin();
+ TQStringList::Iterator sit = selectedTypes.begin();
for( ; sit != selectedTypes.end(); ++sit ) {
if ( !((*sit).isEmpty()) )
extensionsList->insertItem( *sit );
}
KMimeType::List mimeTypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
+ TQValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
addMimeType ( (*it2)->name() );
updateButton();
- connect( extensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
- connect( availableExtensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
+ connect( extensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
- connect( addExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
- connect( delExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
if ( nameEdit )
- connect( nameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( genNameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( availableExtensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
- connect( extensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
+ connect( nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( extensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KApplicationPropsPlugin::~KApplicationPropsPlugin()
@@ -4042,7 +4042,7 @@ KApplicationPropsPlugin::~KApplicationPropsPlugin()
delete d;
}
-// QString KApplicationPropsPlugin::tabName () const
+// TQString KApplicationPropsPlugin::tabName () const
// {
// return i18n ("&Application");
// }
@@ -4053,7 +4053,7 @@ void KApplicationPropsPlugin::updateButton()
delExtensionButton->setEnabled(extensionsList->currentItem()>-1);
}
-void KApplicationPropsPlugin::addMimeType( const QString & name )
+void KApplicationPropsPlugin::addMimeType( const TQString & name )
{
// Add a mimetype to the list of available mime types if not in the extensionsList
@@ -4078,9 +4078,9 @@ bool KApplicationPropsPlugin::supports( KFileItemList _items )
void KApplicationPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not "
@@ -4091,13 +4091,13 @@ void KApplicationPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", genNameEdit->text() );
config.writeEntry( "GenericName", genNameEdit->text(), true, false, true ); // for compat
- QStringList selectedTypes;
+ TQStringList selectedTypes;
for ( uint i = 0; i < extensionsList->count(); i++ )
selectedTypes.append( extensionsList->text( i ) );
@@ -4105,7 +4105,7 @@ void KApplicationPropsPlugin::applyChanges()
config.writeEntry( "ServiceTypes", "" );
// hmm, actually it should probably be the contrary (but see also typeslistitem.cpp)
- QString nameStr = nameEdit ? nameEdit->text() : QString::null;
+ TQString nameStr = nameEdit ? nameEdit->text() : TQString::null;
if ( nameStr.isEmpty() ) // nothing entered, or widget not existing at all (kdesktop mode)
nameStr = nameFromFileName(properties->kurl().fileName());
@@ -4117,8 +4117,8 @@ void KApplicationPropsPlugin::applyChanges()
void KApplicationPropsPlugin::slotAddExtension()
{
- QListBoxItem *item = availableExtensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = availableExtensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
@@ -4139,8 +4139,8 @@ void KApplicationPropsPlugin::slotAddExtension()
void KApplicationPropsPlugin::slotDelExtension()
{
- QListBoxItem *item = extensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = extensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h
index b71ad7948..a83480c1c 100644
--- a/kio/kfile/kpropertiesdialog.h
+++ b/kio/kfile/kpropertiesdialog.h
@@ -28,8 +28,8 @@
#ifndef __propsdlg_h
#define __propsdlg_h
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
#include <kurl.h>
@@ -95,7 +95,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItem * item,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -113,7 +113,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItemList _items,
- QWidget *parent = 0L, const char* name = 0L,
+ TQWidget *parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
#ifndef KDE_NO_COMPAT
@@ -128,7 +128,7 @@ public:
* @param modal tells the dialog whether it should be modal.
* @param autoShow tells the dialog whether it should show itself automatically. */
KPropertiesDialog( const KURL& _url, mode_t _mode,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true) KDE_DEPRECATED;
#endif
@@ -150,7 +150,7 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _url,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -168,8 +168,8 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent = 0L, const char* name = 0L,
+ const TQString& _defaultName,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -181,8 +181,8 @@ public:
* @param name is the internal name.
* @param modal tells the dialog whether it should be modal.
*/
- KPropertiesDialog (const QString& title,
- QWidget* parent = 0L, const char* name = 0L, bool modal = false);
+ KPropertiesDialog (const TQString& title,
+ TQWidget* parent = 0L, const char* name = 0L, bool modal = false);
/**
* Cleans up the properties dialog and frees any associated resources,
@@ -200,7 +200,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(KFileItem* item, QWidget* parent = 0,
+ static bool showDialog(KFileItem* item, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -212,7 +212,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KURL& _url, QWidget* parent = 0,
+ static bool showDialog(const KURL& _url, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -225,7 +225,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KFileItemList& _items, QWidget* parent = 0,
+ static bool showDialog(const KFileItemList& _items, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -279,20 +279,20 @@ public:
/**
* If the dialog is being built from a template, this method
- * returns the current directory. If no template, it returns QString::null.
+ * returns the current directory. If no template, it returns TQString::null.
* See the template form of the constructor.
*
- * @return the current directory or QString::null
+ * @return the current directory or TQString::null
*/
const KURL& currentDir() const { return m_currentDir; }
/**
* If the dialog is being built from a template, this method
- * returns the default name. If no template, it returns QString::null.
+ * returns the default name. If no template, it returns TQString::null.
* See the template form of the constructor.
- * @return the default name or QString::null
+ * @return the default name or TQString::null
*/
- const QString& defaultName() const { return m_defaultName; }
+ const TQString& defaultName() const { return m_defaultName; }
/**
* Updates the item URL (either called by rename or because
@@ -308,7 +308,7 @@ public:
* @param _name new filename, encoded.
* \see FilePropsDlgPlugin::applyChanges
*/
- void rename( const QString& _name );
+ void rename( const TQString& _name );
/**
* To abort applying changes.
@@ -332,7 +332,7 @@ public:
* \see showFileSharingPage
* @since 3.3
*/
- void setFileSharingPage(QWidget* page);
+ void setFileSharingPage(TQWidget* page);
/**
* Call this to make the filename lineedit readonly, to prevent the user
@@ -403,13 +403,13 @@ private:
/**
* For templates
*/
- QString m_defaultName;
+ TQString m_defaultName;
KURL m_currentDir;
/**
* List of all plugins inserted ( first one first )
*/
- QPtrList<KPropsDlgPlugin> m_pageList;
+ TQPtrList<KPropsDlgPlugin> m_pageList;
private slots:
void slotStatResult( KIO::Job * ); // No longer used
@@ -527,7 +527,7 @@ protected slots:
void slotFileRenamed( KIO::Job *, const KURL &, const KURL & );
void slotDirSizeUpdate();
void slotDirSizeFinished( KIO::Job * );
- void slotFoundMountPoint( const QString& mp, unsigned long kBSize,
+ void slotFoundMountPoint( const TQString& mp, unsigned long kBSize,
unsigned long kBUsed, unsigned long kBAvail );
void slotSizeStop();
void slotSizeDetermine();
@@ -535,28 +535,28 @@ protected slots:
private slots:
// workaround for compiler bug
void slotFoundMountPoint( const unsigned long& kBSize, const unsigned long&
- kBUsed, const unsigned long& kBAvail, const QString& mp );
- void nameFileChanged(const QString &text );
+ kBUsed, const unsigned long& kBAvail, const TQString& mp );
+ void nameFileChanged(const TQString &text );
void slotIconChanged();
private:
- void determineRelativePath( const QString & path );
+ void determineRelativePath( const TQString & path );
void applyIconChanges();
- QWidget *iconArea;
- QWidget *nameArea;
+ TQWidget *iconArea;
+ TQWidget *nameArea;
- QLabel *m_sizeLabel;
- QPushButton *m_sizeDetermineButton;
- QPushButton *m_sizeStopButton;
+ TQLabel *m_sizeLabel;
+ TQPushButton *m_sizeDetermineButton;
+ TQPushButton *m_sizeStopButton;
- QString m_sRelativePath;
+ TQString m_sRelativePath;
bool m_bFromTemplate;
/**
* The initial filename
*/
- QString oldName;
+ TQString oldName;
class KFilePropsPluginPrivate;
KFilePropsPluginPrivate *d;
@@ -604,7 +604,7 @@ private slots:
void slotShowAdvancedPermissions();
private:
- void setComboContent(QComboBox *combo, PermissionsTarget target,
+ void setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial);
bool isIrregular(mode_t permissions, bool isDir, bool isLink);
void enableAccessControls(bool enable);
@@ -619,9 +619,9 @@ private:
static const char *permissionsTexts[4][4];
// unused, for binary compatibility!
- QCheckBox *permBox[3][4];
+ TQCheckBox *permBox[3][4];
- QComboBox *grpCombo;
+ TQComboBox *grpCombo;
KLineEdit *usrEdit, *grpEdit;
@@ -632,11 +632,11 @@ private:
/**
* Old group
*/
- QString strGroup;
+ TQString strGroup;
/**
* Old owner
*/
- QString strOwner;
+ TQString strOwner;
// unused, for compatibility
static mode_t fperm[3][4];
@@ -672,11 +672,11 @@ private:
KURLRequester *URLEdit;
KIconButton *iconBox;
- QString URLStr;
- QString iconStr;
+ TQString URLStr;
+ TQString iconStr;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
private:
class KURLPropsPluginPrivate;
KURLPropsPluginPrivate *d;
@@ -704,12 +704,12 @@ public:
private:
- QLineEdit *commentEdit;
- QLineEdit *patternEdit;
- QLineEdit *mimeEdit;
- QString m_sMimeStr;
+ TQLineEdit *commentEdit;
+ TQLineEdit *patternEdit;
+ TQLineEdit *mimeEdit;
+ TQString m_sMimeStr;
- QCheckBox * cbAutoEmbed;
+ TQCheckBox * cbAutoEmbed;
class KBindingPropsPluginPrivate;
KBindingPropsPluginPrivate *d;
@@ -736,26 +736,26 @@ private slots:
void slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& );
+ const TQString& );
private:
void updateInfo();
private:
- QComboBox* device;
- QLabel* mountpoint;
- QCheckBox* readonly;
+ TQComboBox* device;
+ TQLabel* mountpoint;
+ TQCheckBox* readonly;
void* unused;
//KIconButton* mounted;
KIconButton* unmounted;
- QStringList m_devicelist;
+ TQStringList m_devicelist;
int indexDevice;
int indexMountPoint;
int indexFSType;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
class KDevicePropsPluginPrivate;
KDevicePropsPluginPrivate *d;
@@ -798,10 +798,10 @@ private:
private:
KPropertiesDesktopBase* w;
- QString m_origCommandStr;
- QString m_terminalOptionStr;
- QString m_suidUserStr;
- QString m_dcopServiceType;
+ TQString m_origCommandStr;
+ TQString m_terminalOptionStr;
+ TQString m_suidUserStr;
+ TQString m_dcopServiceType;
bool m_terminalBool;
bool m_terminalCloseBool;
bool m_suidBool;
@@ -845,24 +845,24 @@ private slots:
private:
- QLabel *terminalLabel;
- QLabel *suidLabel;
+ TQLabel *terminalLabel;
+ TQLabel *suidLabel;
KLineEdit *execEdit;
- QCheckBox *terminalCheck;
- QCheckBox *suidCheck;
+ TQCheckBox *terminalCheck;
+ TQCheckBox *suidCheck;
KLineEdit *terminalEdit;
KLineEdit *suidEdit;
KLineEdit *swallowExecEdit;
KLineEdit *swallowTitleEdit;
- QButton *execBrowse;
+ TQButton *execBrowse;
- QString execStr;
- QString swallowExecStr;
- QString swallowTitleStr;
- QString termOptionsStr;
+ TQString execStr;
+ TQString swallowExecStr;
+ TQString swallowTitleStr;
+ TQString termOptionsStr;
bool termBool;
bool suidBool;
- QString suidUserStr;
+ TQString suidUserStr;
class KExecPropsPluginPrivate;
KExecPropsPluginPrivate *d;
@@ -900,15 +900,15 @@ private slots:
void updateButton();
private:
- void addMimeType( const QString & name );
-
- QLineEdit *commentEdit;
- QLineEdit *genNameEdit;
- QLineEdit *nameEdit;
- QListBox *extensionsList;
- QListBox *availableExtensionsList;
- QPushButton *addExtensionButton;
- QPushButton *delExtensionButton;
+ void addMimeType( const TQString & name );
+
+ TQLineEdit *commentEdit;
+ TQLineEdit *genNameEdit;
+ TQLineEdit *nameEdit;
+ TQListBox *extensionsList;
+ TQListBox *availableExtensionsList;
+ TQPushButton *addExtensionButton;
+ TQPushButton *delExtensionButton;
class KApplicationPropsPluginPrivate;
KApplicationPropsPluginPrivate *d;
diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp
index b32dd0481..22b4cd477 100644
--- a/kio/kfile/krecentdirs.cpp
+++ b/kio/kfile/krecentdirs.cpp
@@ -44,7 +44,7 @@ static void recentdirs_done(KConfig *config)
}
}
-static KConfig *recentdirs_readList(QString &key, QStringList &result, bool readOnly)
+static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly)
{
KConfig *config;
if ((key.length() < 2) || (key[0] != ':'))
@@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
if (key[1] == ':')
{
key = key.mid(2);
- config = new KSimpleConfig(QString::fromLatin1("krecentdirsrc"), readOnly);
+ config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly);
}
else
{
key = key.mid(1);
config = KGlobal::config();
- config->setGroup(QString::fromLatin1("Recent Dirs"));
+ config->setGroup(TQString::fromLatin1("Recent Dirs"));
}
result=config->readPathListEntry(key);
@@ -69,24 +69,24 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
return config;
}
-QStringList KRecentDirs::list(const QString &fileClass)
+TQStringList KRecentDirs::list(const TQString &fileClass)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
recentdirs_done(recentdirs_readList(key, result, true));
return result;
}
-QString KRecentDirs::dir(const QString &fileClass)
+TQString KRecentDirs::dir(const TQString &fileClass)
{
- QStringList result = list(fileClass);
+ TQStringList result = list(fileClass);
return result[0];
}
-void KRecentDirs::add(const QString &fileClass, const QString &directory)
+void KRecentDirs::add(const TQString &fileClass, const TQString &directory)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
KConfig *config = recentdirs_readList(key, result, false);
// make sure the dir is first in history
result.remove(directory);
diff --git a/kio/kfile/krecentdirs.h b/kio/kfile/krecentdirs.h
index 078efcc50..439fb6fe0 100644
--- a/kio/kfile/krecentdirs.h
+++ b/kio/kfile/krecentdirs.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDIRS_H
#define __KRECENTDIRS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -54,17 +54,17 @@ public:
* Returns a list of directories associated with this file-class.
* The most recently used directory is at the front of the list.
*/
- static QStringList list(const QString &fileClass);
+ static TQStringList list(const TQString &fileClass);
/**
* Returns the most recently used directory accociated with this file-class.
*/
- static QString dir(const QString &fileClass);
+ static TQString dir(const TQString &fileClass);
/**
* Associates @p directory with @p fileClass
*/
- static void add(const QString &fileClass, const QString &directory);
+ static void add(const TQString &fileClass, const TQString &directory);
};
#endif
diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp
index 9b3d4f75f..69fd63df5 100644
--- a/kio/kfile/krecentdocument.cpp
+++ b/kio/kfile/krecentdocument.cpp
@@ -33,37 +33,37 @@
#include <kdebug.h>
#include <kmimetype.h>
#include <kdesktopfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <sys/types.h>
#include <utime.h>
-QString KRecentDocument::recentDocumentDirectory()
+TQString KRecentDocument::recentDocumentDirectory()
{
// need to change this path, not sure where
- return locateLocal("data", QString::fromLatin1("RecentDocuments/"));
+ return locateLocal("data", TQString::fromLatin1("RecentDocuments/"));
}
-QStringList KRecentDocument::recentDocuments()
+TQStringList KRecentDocument::recentDocuments()
{
- QDir d(recentDocumentDirectory(), "*.desktop", QDir::Time,
- QDir::Files | QDir::Readable | QDir::Hidden);
+ TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time,
+ TQDir::Files | TQDir::Readable | TQDir::Hidden);
if (!d.exists())
d.mkdir(recentDocumentDirectory());
- QStringList list = d.entryList();
- QStringList fullList;
+ TQStringList list = d.entryList();
+ TQStringList fullList;
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QString pathDesktop = d.absFilePath( *it );
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQString pathDesktop = d.absFilePath( *it );
KDesktopFile tmpDesktopFile( pathDesktop, false);
KURL urlDesktopFile(tmpDesktopFile.readURL());
- if( urlDesktopFile.isLocalFile() && !QFile(urlDesktopFile.path()).exists())
+ if( urlDesktopFile.isLocalFile() && !TQFile(urlDesktopFile.path()).exists())
d.remove(pathDesktop);
else
fullList.append( pathDesktop );
@@ -77,59 +77,59 @@ void KRecentDocument::add(const KURL& url)
KRecentDocument::add(url, qApp->argv()[0]); // ### argv[0] might not match the service filename!
}
-void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
+void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
{
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- QString openStr = url.url();
- openStr.replace( QRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
+ TQString openStr = url.url();
+ openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
kdDebug(250) << "KRecentDocument::add for " << openStr << endl;
KConfig *config = KGlobal::config();
- QString oldGrp = config->group();
- config->setGroup(QString::fromLatin1("RecentDocuments"));
- bool useRecent = config->readBoolEntry(QString::fromLatin1("UseRecent"), true);
- int maxEntries = config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ TQString oldGrp = config->group();
+ config->setGroup(TQString::fromLatin1("RecentDocuments"));
+ bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true);
+ int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
config->setGroup(oldGrp);
if(!useRecent)
return;
- QString path = recentDocumentDirectory();
+ TQString path = recentDocumentDirectory();
- QString dStr = path + url.fileName();
+ TQString dStr = path + url.fileName();
- QString ddesktop = dStr + QString::fromLatin1(".desktop");
+ TQString ddesktop = dStr + TQString::fromLatin1(".desktop");
int i=1;
// check for duplicates
- while(QFile::exists(ddesktop)){
+ while(TQFile::exists(ddesktop)){
// see if it points to the same file and application
KSimpleConfig tmp(ddesktop);
tmp.setDesktopGroup();
- if(tmp.readEntry(QString::fromLatin1("X-KDE-LastOpenedWith"))
+ if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith"))
== desktopEntryName)
{
- utime(QFile::encodeName(ddesktop), NULL);
+ utime(TQFile::encodeName(ddesktop), NULL);
return;
}
// if not append a (num) to it
++i;
if ( i > maxEntries )
break;
- ddesktop = dStr + QString::fromLatin1("[%1].desktop").arg(i);
+ ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i);
}
- QDir dir(path);
+ TQDir dir(path);
// check for max entries, delete oldest files if exceeded
- QStringList list = dir.entryList(QDir::Files | QDir::Hidden, QDir::Time | QDir::Reversed);
+ TQStringList list = dir.entryList(TQDir::Files | TQDir::Hidden, TQDir::Time | TQDir::Reversed);
i = list.count();
if(i > maxEntries-1){
- QStringList::Iterator it;
+ TQStringList::Iterator it;
it = list.begin();
while(i > maxEntries-1){
- QFile::remove(dir.absPath() + QString::fromLatin1("/") + (*it));
+ TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it));
--i, ++it;
}
}
@@ -137,18 +137,18 @@ void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
// create the applnk
KSimpleConfig conf(ddesktop);
conf.setDesktopGroup();
- conf.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
- conf.writePathEntry( QString::fromLatin1("URL"), openStr );
+ conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ conf.writePathEntry( TQString::fromLatin1("URL"), openStr );
// If you change the line below, change the test in the above loop
- conf.writeEntry( QString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
- QString name = url.fileName();
+ conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
+ TQString name = url.fileName();
if (name.isEmpty())
name = openStr;
- conf.writeEntry( QString::fromLatin1("Name"), name );
- conf.writeEntry( QString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
+ conf.writeEntry( TQString::fromLatin1("Name"), name );
+ conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
}
-void KRecentDocument::add(const QString &openStr, bool isUrl)
+void KRecentDocument::add(const TQString &openStr, bool isUrl)
{
if( isUrl ) {
add( KURL( openStr ) );
@@ -161,17 +161,17 @@ void KRecentDocument::add(const QString &openStr, bool isUrl)
void KRecentDocument::clear()
{
- QStringList list = recentDocuments();
- QDir dir;
- for(QStringList::Iterator it = list.begin(); it != list.end() ; ++it)
+ TQStringList list = recentDocuments();
+ TQDir dir;
+ for(TQStringList::Iterator it = list.begin(); it != list.end() ; ++it)
dir.remove(*it);
}
int KRecentDocument::maximumItems()
{
KConfig *config = KGlobal::config();
- KConfigGroupSaver sa(config, QString::fromLatin1("RecentDocuments"));
- return config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments"));
+ return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
}
diff --git a/kio/kfile/krecentdocument.h b/kio/kfile/krecentdocument.h
index 5ec06c162..6bbd3f654 100644
--- a/kio/kfile/krecentdocument.h
+++ b/kio/kfile/krecentdocument.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDOCUMENT_H
#define __KRECENTDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
/**
@@ -57,7 +57,7 @@ public:
* sorted by date.
*
*/
- static QStringList recentDocuments();
+ static TQStringList recentDocuments();
/**
* Add a new item to the Recent Document menu.
@@ -74,7 +74,7 @@ public:
* @param url The url to add.
* @param desktopEntryName The desktopEntryName of the service to use for opening this document.
*/
- static void add(const KURL& url, const QString& desktopEntryName);
+ static void add(const KURL& url, const TQString& desktopEntryName);
/**
*
@@ -83,7 +83,7 @@ public:
* @param documentStr The full path to the document or URL to add.
* @param isURL Set to @p true if @p documentStr is an URL and not a local file path.
*/
- static void add(const QString &documentStr, bool isURL = false);
+ static void add(const TQString &documentStr, bool isURL = false);
/**
* Clear the recent document menu of all entries.
@@ -99,7 +99,7 @@ public:
* Returns the path to the directory where recent document .desktop files
* are stored.
*/
- static QString recentDocumentDirectory();
+ static TQString recentDocumentDirectory();
};
#endif
diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp
index 446087522..5c2b167c0 100644
--- a/kio/kfile/kurlbar.cpp
+++ b/kio/kfile/kurlbar.cpp
@@ -18,17 +18,17 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qdrawutil.h>
-#include <qfontmetrics.h>
-#include <qlabel.h>
-#include <qgrid.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqdrawutil.h>
+#include <tqfontmetrics.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kconfig.h>
@@ -54,20 +54,20 @@
class KURLBarToolTip : public QToolTip
{
public:
- KURLBarToolTip( QListBox *view ) : QToolTip( view ), m_view( view ) {}
+ KURLBarToolTip( TQListBox *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint& point ) {
- QListBoxItem *item = m_view->itemAt( point );
+ virtual void maybeTip( const TQPoint& point ) {
+ TQListBoxItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KURLBarItem*>( item )->toolTip();
+ TQString text = static_cast<KURLBarItem*>( item )->toolTip();
if ( !text.isEmpty() )
tip( m_view->itemRect( item ), text );
}
}
private:
- QListBox *m_view;
+ TQListBox *m_view;
};
@@ -86,9 +86,9 @@ public:
};
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, bool persistent, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, bool persistent, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -98,9 +98,9 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
}
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -109,8 +109,8 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
init( icon, group, description, true /*persistent*/ );
}
-void KURLBarItem::init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent )
+void KURLBarItem::init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent )
{
d = new KURLBarItemPrivate;
d->isPersistent = persistent;
@@ -132,7 +132,7 @@ void KURLBarItem::setURL( const KURL& url )
setText( url.fileName() );
}
-void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
+void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group )
{
m_icon = icon;
m_group = group;
@@ -144,7 +144,7 @@ void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
KIcon::DefaultState );
}
-void KURLBarItem::setDescription( const QString& desc )
+void KURLBarItem::setDescription( const TQString& desc )
{
m_description = desc;
setText( desc.isEmpty() ? m_url.fileName() : desc );
@@ -161,12 +161,12 @@ void KURLBarItem::setApplicationLocal( bool local )
m_appLocal = local;
}
-void KURLBarItem::setToolTip( const QString& tip )
+void KURLBarItem::setToolTip( const TQString& tip )
{
m_toolTip = tip;
}
-QString KURLBarItem::toolTip() const
+TQString KURLBarItem::toolTip() const
{
return m_toolTip.isEmpty() ? m_url.prettyURL() : m_toolTip;
}
@@ -176,9 +176,9 @@ int KURLBarItem::iconSize() const
return m_parent->iconSize();
}
-void KURLBarItem::paint( QPainter *p )
+void KURLBarItem::paint( TQPainter *p )
{
- QListBox *box = listBox();
+ TQListBox *box = listBox();
int w = width( box );
static const int margin = KDialog::spacingHint();
@@ -186,10 +186,10 @@ void KURLBarItem::paint( QPainter *p )
if ( isCurrent() || isSelected() ) {
int h = height( box );
- QBrush brush = box->colorGroup().brush( QColorGroup::Highlight );
+ TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight );
p->fillRect( 0, 0, w, h, brush );
- QPen pen = p->pen();
- QPen oldPen = pen;
+ TQPen pen = p->pen();
+ TQPen oldPen = pen;
pen.setColor( box->colorGroup().mid() );
p->setPen( pen );
@@ -204,14 +204,14 @@ void KURLBarItem::paint( QPainter *p )
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
// small icon -> draw icon next to text
- // ### mostly cut & paste of QListBoxPixmap::paint() until Qt 3.1
+ // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1
// (where it will properly use pixmap() instead of the internal pixmap)
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
int yPos = QMAX( 0, (height(box) - pm->height())/2 );
p->drawPixmap( margin, yPos, *pm );
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
if ( pm->height() < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
else
@@ -219,12 +219,12 @@ void KURLBarItem::paint( QPainter *p )
yPos += margin;
int stringWidth = box->width() - pm->width() - 2 - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int xPos = pm->width() + margin + 2;
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( xPos + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1),
yPos + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -237,7 +237,7 @@ void KURLBarItem::paint( QPainter *p )
else {
// big icons -> draw text below icon
int y = margin;
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
if ( !pm->isNull() ) {
int x = (w - pm->width()) / 2;
@@ -246,17 +246,17 @@ void KURLBarItem::paint( QPainter *p )
}
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
y += pm->height() + fm.height() - fm.descent();
int stringWidth = box->width() - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int x = (w - fm.width( visibleText )) / 2;
x = QMAX( x, margin );
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( x + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1),
y + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -266,15 +266,15 @@ void KURLBarItem::paint( QPainter *p )
}
}
-QSize KURLBarItem::sizeHint() const
+TQSize KURLBarItem::sizeHint() const
{
int wmin = 0;
int hmin = 0;
const KURLBarListBox *lb =static_cast<const KURLBarListBox*>(listBox());
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
- wmin = QListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
- hmin = QListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
+ wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
+ hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
}
else {
wmin = QMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2;
@@ -286,10 +286,10 @@ QSize KURLBarItem::sizeHint() const
else
hmin = QMIN( hmin, lb->viewport()->sizeHint().height() );
- return QSize( wmin, hmin );
+ return TQSize( wmin, hmin );
}
-int KURLBarItem::width( const QListBox *lb ) const
+int KURLBarItem::width( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return QMAX( sizeHint().width(), lb->viewport()->width() );
@@ -297,7 +297,7 @@ int KURLBarItem::width( const QListBox *lb ) const
return sizeHint().width();
}
-int KURLBarItem::height( const QListBox *lb ) const
+int KURLBarItem::height( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return sizeHint().height();
@@ -318,7 +318,7 @@ class KURLBar::KURLBarPrivate
public:
KURLBarPrivate()
{
- currentURL.setPath( QDir::homeDirPath() );
+ currentURL.setPath( TQDir::homeDirPath() );
defaultIconSize = 0;
}
@@ -327,8 +327,8 @@ public:
};
-KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f ),
+KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f ),
m_activeItem( 0L ),
m_useGlobal( useGlobalItems ),
m_isModified( false ),
@@ -339,13 +339,13 @@ KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags
d = new KURLBarPrivate();
setListBox( 0L );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
- QWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
+ TQWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
"Clicking on one of the shortcut entries will take you to that location.<p>"
"By right clicking on an entry you can add, edit and remove shortcuts.</qt>"));
}
@@ -355,9 +355,9 @@ KURLBar::~KURLBar()
delete d;
}
-KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
+KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description,
bool applicationLocal,
- const QString& icon, KIcon::Group group )
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, description, icon, group);
item->setApplicationLocal( applicationLocal );
@@ -365,8 +365,8 @@ KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
return item;
}
-KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
+KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group);
m_listBox->insertItem( item );
@@ -376,12 +376,12 @@ KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& descrip
void KURLBar::setOrientation( Qt::Orientation orient )
{
m_listBox->setOrientation( orient );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
}
Qt::Orientation KURLBar::orientation() const
@@ -400,7 +400,7 @@ void KURLBar::setListBox( KURLBarListBox *view )
else {
m_listBox = view;
if ( m_listBox->parentWidget() != this )
- m_listBox->reparent( this, QPoint(0,0) );
+ m_listBox->reparent( this, TQPoint(0,0) );
m_listBox->resize( width(), height() );
}
@@ -408,15 +408,15 @@ void KURLBar::setListBox( KURLBarListBox *view )
paletteChange( palette() );
m_listBox->setFocusPolicy( TabFocus );
- connect( m_listBox, SIGNAL( mouseButtonClicked( int, QListBoxItem *, const QPoint & ) ),
- SLOT( slotSelected( int, QListBoxItem * )));
- connect( m_listBox, SIGNAL( dropped( QDropEvent * )),
- this, SLOT( slotDropped( QDropEvent * )));
- connect( m_listBox, SIGNAL( contextMenuRequested( QListBoxItem *,
- const QPoint& )),
- SLOT( slotContextMenuRequested( QListBoxItem *, const QPoint& )));
- connect( m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotSelected( QListBoxItem * ) ));
+ connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ),
+ TQT_SLOT( slotSelected( int, TQListBoxItem * )));
+ connect( m_listBox, TQT_SIGNAL( dropped( TQDropEvent * )),
+ this, TQT_SLOT( slotDropped( TQDropEvent * )));
+ connect( m_listBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *,
+ const TQPoint& )),
+ TQT_SLOT( slotContextMenuRequested( TQListBoxItem *, const TQPoint& )));
+ connect( m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotSelected( TQListBoxItem * ) ));
}
void KURLBar::setIconSize( int size )
@@ -442,29 +442,29 @@ void KURLBar::clear()
m_listBox->clear();
}
-void KURLBar::resizeEvent( QResizeEvent *e )
+void KURLBar::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
m_listBox->resize( width(), height() );
}
-void KURLBar::paletteChange( const QPalette & )
+void KURLBar::paletteChange( const TQPalette & )
{
- QPalette pal = palette();
- QColor gray = pal.color( QPalette::Normal, QColorGroup::Background );
- QColor selectedTextColor = pal.color( QPalette::Normal, QColorGroup::BrightText );
- QColor foreground = pal.color( QPalette::Normal, QColorGroup::Foreground );
- pal.setColor( QPalette::Normal, QColorGroup::Base, gray );
- pal.setColor( QPalette::Normal, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Normal, QColorGroup::Text, foreground );
- pal.setColor( QPalette::Inactive, QColorGroup::Base, gray );
- pal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Inactive, QColorGroup::Text, foreground );
+ TQPalette pal = palette();
+ TQColor gray = pal.color( TQPalette::Normal, TQColorGroup::Background );
+ TQColor selectedTextColor = pal.color( TQPalette::Normal, TQColorGroup::BrightText );
+ TQColor foreground = pal.color( TQPalette::Normal, TQColorGroup::Foreground );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Text, foreground );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Text, foreground );
setPalette( pal );
}
-QSize KURLBar::sizeHint() const
+TQSize KURLBar::sizeHint() const
{
return m_listBox->sizeHint();
@@ -482,7 +482,7 @@ QSize KURLBar::sizeHint() const
item;
item = static_cast<KURLBarItem*>( item->next() ) ) {
- QSize sh = item->sizeHint();
+ TQSize sh = item->sizeHint();
if ( vertical ) {
w = QMAX( w, sh.width() );
@@ -500,21 +500,21 @@ QSize KURLBar::sizeHint() const
// h += m_listBox->horizontalScrollBar()->height();
if ( w == 0 && h == 0 )
- return QSize( 100, 200 );
+ return TQSize( 100, 200 );
else
- return QSize( 6 + w, h );
+ return TQSize( 6 + w, h );
#endif
}
-QSize KURLBar::minimumSizeHint() const
+TQSize KURLBar::minimumSizeHint() const
{
- QSize s = sizeHint(); // ###
+ TQSize s = sizeHint(); // ###
int w = s.width() + m_listBox->verticalScrollBar()->width();
int h = s.height() + m_listBox->horizontalScrollBar()->height();
- return QSize( w, h );
+ return TQSize( w, h );
}
-void KURLBar::slotSelected( int button, QListBoxItem *item )
+void KURLBar::slotSelected( int button, TQListBoxItem *item )
{
if ( button != Qt::LeftButton )
return;
@@ -522,7 +522,7 @@ void KURLBar::slotSelected( int button, QListBoxItem *item )
slotSelected( item );
}
-void KURLBar::slotSelected( QListBoxItem *item )
+void KURLBar::slotSelected( TQListBoxItem *item )
{
if ( item && item != m_activeItem )
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -537,13 +537,13 @@ void KURLBar::setCurrentItem( const KURL& url )
{
d->currentURL = url;
- QString u = url.url(-1);
+ TQString u = url.url(-1);
if ( m_activeItem && m_activeItem->url().url(-1) == u )
return;
bool hasURL = false;
- QListBoxItem *item = m_listBox->firstItem();
+ TQListBoxItem *item = m_listBox->firstItem();
while ( item ) {
if ( static_cast<KURLBarItem*>( item )->url().url(-1) == u ) {
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -563,7 +563,7 @@ void KURLBar::setCurrentItem( const KURL& url )
KURLBarItem * KURLBar::currentItem() const
{
- QListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
+ TQListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
if ( item )
return static_cast<KURLBarItem *>( item );
return 0L;
@@ -575,7 +575,7 @@ KURL KURLBar::currentURL() const
return item ? item->url() : KURL();
}
-void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
+void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup )
{
m_isImmutable = appConfig->groupIsImmutable( itemGroup );
KConfigGroupSaver cs( appConfig, itemGroup );
@@ -584,7 +584,7 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
if ( m_useGlobal ) { // read global items
KConfig *globalConfig = KGlobal::config();
- KConfigGroupSaver cs( globalConfig, (QString)(itemGroup +" (Global)"));
+ KConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)"));
int num = globalConfig->readNumEntry( "Number of Entries" );
for ( int i = 0; i < num; i++ ) {
readItem( i, globalConfig, false );
@@ -600,20 +600,20 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
void KURLBar::readItem( int i, KConfig *config, bool applicationLocal )
{
- QString number = QString::number( i );
- KURL url = KURL::fromPathOrURL( config->readPathEntry( QString("URL_") + number ));
+ TQString number = TQString::number( i );
+ KURL url = KURL::fromPathOrURL( config->readPathEntry( TQString("URL_") + number ));
if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url ))
return; // nothing we could do.
insertItem( url,
- config->readEntry( QString("Description_") + number ),
+ config->readEntry( TQString("Description_") + number ),
applicationLocal,
- config->readEntry( QString("Icon_") + number ),
+ config->readEntry( TQString("Icon_") + number ),
static_cast<KIcon::Group>(
- config->readNumEntry( QString("IconGroup_") + number )) );
+ config->readNumEntry( TQString("IconGroup_") + number )) );
}
-void KURLBar::writeConfig( KConfig *config, const QString& itemGroup )
+void KURLBar::writeConfig( KConfig *config, const TQString& itemGroup )
{
KConfigGroupSaver cs1( config, itemGroup );
if(!config->hasDefault("Speedbar IconSize") && m_iconSize == d->defaultIconSize )
@@ -678,12 +678,12 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
if ( !item->isPersistent() )
return;
- QString Description = "Description_";
- QString URL = "URL_";
- QString Icon = "Icon_";
- QString IconGroup = "IconGroup_";
+ TQString Description = "Description_";
+ TQString URL = "URL_";
+ TQString Icon = "Icon_";
+ TQString IconGroup = "IconGroup_";
- QString number = QString::number( i );
+ TQString number = TQString::number( i );
config->writePathEntry( URL + number, item->url().prettyURL(), true, global );
config->writeEntry( Description + number, item->description(),true,global);
@@ -692,13 +692,13 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
}
-void KURLBar::slotDropped( QDropEvent *e )
+void KURLBar::slotDropped( TQDropEvent *e )
{
KURL::List urls;
if ( KURLDrag::decode( e, urls ) ) {
KURL url;
- QString description;
- QString icon;
+ TQString description;
+ TQString icon;
bool appLocal = false;
KURL::List::Iterator it = urls.begin();
@@ -710,7 +710,7 @@ void KURLBar::slotDropped( QDropEvent *e )
}
}
-void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
+void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos )
{
if (m_isImmutable)
return;
@@ -725,7 +725,7 @@ void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
KURL lastURL = m_activeItem ? m_activeItem->url() : KURL();
bool smallIcons = m_iconSize < KIcon::SizeMedium;
- QPopupMenu *popup = new QPopupMenu();
+ TQPopupMenu *popup = new TQPopupMenu();
popup->insertItem( smallIcons ?
i18n("&Large Icons") : i18n("&Small Icons"),
IconSize );
@@ -789,8 +789,8 @@ bool KURLBar::editItem( KURLBarItem *item )
return false;
KURL url = item->url();
- QString description = item->description();
- QString icon = item->icon();
+ TQString description = item->description();
+ TQString icon = item->icon();
bool appLocal = item->applicationLocal();
if ( KURLBarItemDialog::getInformation( m_useGlobal,
@@ -815,7 +815,7 @@ bool KURLBar::editItem( KURLBarItem *item )
///////////////////////////////////////////////////////////////////
-KURLBarListBox::KURLBarListBox( QWidget *parent, const char *name )
+KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name )
: KListBox( parent, name )
{
m_toolTip = new KURLBarToolTip( this );
@@ -828,14 +828,14 @@ KURLBarListBox::~KURLBarListBox()
delete m_toolTip;
}
-void KURLBarListBox::paintEvent( QPaintEvent* )
+void KURLBarListBox::paintEvent( TQPaintEvent* )
{
- QPainter p(this);
+ TQPainter p(this);
p.setPen( colorGroup().mid() );
p.drawRect( 0, 0, width(), height() );
}
-QDragObject * KURLBarListBox::dragObject()
+TQDragObject * KURLBarListBox::dragObject()
{
KURL::List urls;
KURLBarItem *item = static_cast<KURLBarItem*>( firstItem() );
@@ -852,17 +852,17 @@ QDragObject * KURLBarListBox::dragObject()
return 0L;
}
-void KURLBarListBox::contentsDragEnterEvent( QDragEnterEvent *e )
+void KURLBarListBox::contentsDragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KURLDrag::canDecode( e ));
}
-void KURLBarListBox::contentsDropEvent( QDropEvent *e )
+void KURLBarListBox::contentsDropEvent( TQDropEvent *e )
{
emit dropped( e );
}
-void KURLBarListBox::contextMenuEvent( QContextMenuEvent *e )
+void KURLBarListBox::contextMenuEvent( TQContextMenuEvent *e )
{
if (e)
{
@@ -890,15 +890,15 @@ void KURLBarListBox::setOrientation( Qt::Orientation orient )
bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent )
+ TQWidget *parent )
{
KURLBarItemDialog *dialog = new KURLBarItemDialog( allowGlobal, url,
description, icon,
appLocal,
iconSize, parent );
- if ( dialog->exec() == QDialog::Accepted ) {
+ if ( dialog->exec() == TQDialog::Accepted ) {
// set the return parameters
url = dialog->url();
description = dialog->description();
@@ -914,63 +914,63 @@ bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
}
KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description,
- QString icon, bool appLocal,
+ const TQString& description,
+ TQString icon, bool appLocal,
int iconSize,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n("Edit Quick Access Entry"), Ok | Cancel, Ok, true )
{
- QVBox *box = new QVBox( this );
- QString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
- QLabel *label = new QLabel( text, box );
+ TQVBox *box = new TQVBox( this );
+ TQString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
+ TQLabel *label = new TQLabel( text, box );
box->setSpacing( spacingHint() );
- QGrid *grid = new QGrid( 2, box );
+ TQGrid *grid = new TQGrid( 2, box );
grid->setSpacing( spacingHint() );
- QString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
+ TQString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
"The description should consist of one or two words "
"that will help you remember what this entry refers to.</qt>");
- label = new QLabel( i18n("&Description:"), grid );
+ label = new TQLabel( i18n("&Description:"), grid );
m_edit = new KLineEdit( grid, "description edit" );
m_edit->setText( description.isEmpty() ? url.fileName() : description );
label->setBuddy( m_edit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_edit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_edit, whatsThisText );
whatsThisText = i18n("<qt>This is the location associated with the entry. Any valid URL may be used. For example:<p>"
"%1<br>http://www.kde.org<br>ftp://ftp.kde.org/pub/kde/stable<p>"
"By clicking on the button next to the text edit box you can browse to an "
- "appropriate URL.</qt>").arg(QDir::homeDirPath());
- label = new QLabel( i18n("&URL:"), grid );
+ "appropriate URL.</qt>").arg(TQDir::homeDirPath());
+ label = new TQLabel( i18n("&URL:"), grid );
m_urlEdit = new KURLRequester( url.prettyURL(), grid );
m_urlEdit->setMode( KFile::Directory );
label->setBuddy( m_urlEdit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_urlEdit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_urlEdit, whatsThisText );
whatsThisText = i18n("<qt>This is the icon that will appear in the Quick Access panel.<p>"
"Click on the button to select a different icon.</qt>");
- label = new QLabel( i18n("Choose an &icon:"), grid );
+ label = new TQLabel( i18n("Choose an &icon:"), grid );
m_iconButton = new KIconButton( grid, "icon button" );
m_iconButton->setIconSize( iconSize );
if ( icon.isEmpty() )
icon = KMimeType::iconForURL( url );
m_iconButton->setIcon( icon );
label->setBuddy( m_iconButton );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_iconButton, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_iconButton, whatsThisText );
if ( allowGlobal ) {
- QString appName;
+ TQString appName;
if ( KGlobal::instance()->aboutData() )
appName = KGlobal::instance()->aboutData()->programName();
if ( appName.isEmpty() )
- appName = QString::fromLatin1( KGlobal::instance()->instanceName() );
- m_appLocal = new QCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
+ appName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
+ m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
m_appLocal->setChecked( appLocal );
- QWhatsThis::add( m_appLocal,
+ TQWhatsThis::add( m_appLocal,
i18n("<qt>Select this setting if you want this "
"entry to show only when using the current application (%1).<p>"
"If this setting is not selected, the entry will be available in all "
@@ -979,7 +979,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
}
else
m_appLocal = 0L;
- connect(m_urlEdit->lineEdit(),SIGNAL(textChanged ( const QString & )),this,SLOT(urlChanged(const QString & )));
+ connect(m_urlEdit->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(urlChanged(const TQString & )));
m_edit->setFocus();
setMainWidget( box );
}
@@ -988,14 +988,14 @@ KURLBarItemDialog::~KURLBarItemDialog()
{
}
-void KURLBarItemDialog::urlChanged(const QString & text )
+void KURLBarItemDialog::urlChanged(const TQString & text )
{
enableButtonOK( !text.isEmpty() );
}
KURL KURLBarItemDialog::url() const
{
- QString text = m_urlEdit->url();
+ TQString text = m_urlEdit->url();
KURL u;
if ( text.at(0) == '/' )
u.setPath( text );
@@ -1005,12 +1005,12 @@ KURL KURLBarItemDialog::url() const
return u;
}
-QString KURLBarItemDialog::description() const
+TQString KURLBarItemDialog::description() const
{
return m_edit->text();
}
-QString KURLBarItemDialog::icon() const
+TQString KURLBarItemDialog::icon() const
{
return m_iconButton->icon();
}
diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h
index 6bc5de6d5..fc29d4fd2 100644
--- a/kio/kfile/kurlbar.h
+++ b/kio/kfile/kurlbar.h
@@ -19,9 +19,9 @@
#ifndef KURLBAR_H
#define KURLBAR_H
-#include <qevent.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
#include <kdialogbase.h>
#include <kicontheme.h>
@@ -56,8 +56,8 @@ public:
* @since 3.2
*/
KURLBarItem( KURLBar *parent, const KURL& url, bool persistent,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -73,8 +73,8 @@ public:
* dynamic item, that is not saved with KURLBar::writeConfig().
*/
KURLBarItem( KURLBar *parent, const KURL& url,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -93,32 +93,32 @@ public:
* of the icon groups.
* @see icon
*/
- void setIcon( const QString& icon, KIcon::Group group = KIcon::Panel );
+ void setIcon( const TQString& icon, KIcon::Group group = KIcon::Panel );
/**
* Sets the description of this item that will be shown as item-text.
* @see description
*/
- void setDescription( const QString& desc );
+ void setDescription( const TQString& desc );
/**
* Sets a tooltip to be used for this item.
* @see toolTip
*/
- void setToolTip( const QString& tip );
+ void setToolTip( const TQString& tip );
/**
* returns the preferred size of this item
* @since 3.1
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* returns the width of this item.
*/
- virtual int width( const QListBox * ) const;
+ virtual int width( const TQListBox * ) const;
/**
* returns the height of this item.
*/
- virtual int height( const QListBox * ) const;
+ virtual int height( const TQListBox * ) const;
/**
* returns the url of this item.
@@ -129,17 +129,17 @@ public:
* returns the description of this item.
* @see setDescription
*/
- const QString& description() const { return m_description; }
+ const TQString& description() const { return m_description; }
/**
* returns the icon of this item.
* @see setIcon
*/
- const QString& icon() const { return m_icon; }
+ const TQString& icon() const { return m_icon; }
/**
* returns the tooltip of this item.
* @see setToolTip
*/
- QString toolTip() const;
+ TQString toolTip() const;
/**
* returns the icon-group of this item (determines icon-effects).
* @see setIcon
@@ -148,7 +148,7 @@ public:
/**
* returns the pixmap of this item.
*/
- virtual const QPixmap * pixmap() const { return &m_pixmap; }
+ virtual const TQPixmap * pixmap() const { return &m_pixmap; }
/**
* Makes this item a local or global one. This has only an effect
@@ -174,18 +174,18 @@ public:
bool isPersistent() const;
protected:
- virtual void paint( QPainter *p );
+ virtual void paint( TQPainter *p );
private:
int iconSize() const;
- void init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent );
+ void init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent );
KURL m_url;
- QString m_description;
- QString m_icon;
- QString m_toolTip;
- QPixmap m_pixmap;
+ TQString m_description;
+ TQString m_icon;
+ TQString m_toolTip;
+ TQPixmap m_pixmap;
KIcon::Group m_group;
KURLBar *m_parent;
bool m_appLocal :1;
@@ -237,7 +237,7 @@ public:
* allow global/local item separation.
*/
KURLBar( bool useGlobalItems,
- QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destroys the KURLBar.
*/
@@ -254,9 +254,9 @@ public:
* @p group the icon-group for using icon-effects
*/
virtual KURLBarItem * insertItem( const KURL& url,
- const QString& description,
+ const TQString& description,
bool applicationLocal = true,
- const QString& icon = QString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* Inserts a new dynamic item into the KURLBar and returns the created
@@ -269,8 +269,8 @@ public:
* @since 3.2
*/
virtual KURLBarItem * insertDynamicItem( const KURL& url,
- const QString& description,
- const QString& icon = QString::null,
+ const TQString& description,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* The items can be arranged either vertically in one column or
@@ -319,25 +319,25 @@ public:
* @returns a proper sizehint, depending on the orientation and the number
* of items available.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* @returns a proper minimum size (reimplemented)
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Call this method to read a saved configuration from @p config,
* inside the group @p itemGroup. All items in there will be restored.
* The reading of every item is delegated to the readItem() method.
*/
- virtual void readConfig( KConfig *config, const QString& itemGroup );
+ virtual void readConfig( KConfig *config, const TQString& itemGroup );
/**
* Call this method to save the current configuration into @p config,
* inside the group @p iconGroup. The writeItem() method is used
* to save each item.
*/
- virtual void writeConfig( KConfig *config, const QString& itemGroup );
+ virtual void writeConfig( KConfig *config, const TQString& itemGroup );
/**
* Called from readConfig() to read the i'th from @p config.
@@ -416,9 +416,9 @@ protected:
*/
virtual bool editItem( KURLBarItem *item );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void paletteChange( const QPalette & );
+ virtual void paletteChange( const TQPalette & );
/**
* The currently active item.
@@ -446,21 +446,21 @@ protected slots:
* Reimplemented to show a contextmenu, allowing the user to add, edit
* or remove items, or change the iconsize.
*/
- virtual void slotContextMenuRequested( QListBoxItem *, const QPoint& pos );
+ virtual void slotContextMenuRequested( TQListBoxItem *, const TQPoint& pos );
/**
* Called when an item has been selected. Emits the activated()
* signal.
*/
- virtual void slotSelected( QListBoxItem * );
+ virtual void slotSelected( TQListBoxItem * );
/**
* Called when a url was dropped onto the bar to show a
* KURLBarItemDialog.
*/
- virtual void slotDropped( QDropEvent * );
+ virtual void slotDropped( TQDropEvent * );
private slots:
- void slotSelected( int button, QListBoxItem * );
+ void slotSelected( int button, TQListBoxItem * );
private:
KURLBarListBox *m_listBox;
@@ -498,7 +498,7 @@ public:
/**
* Constructs a KURLBarListBox.
*/
- KURLBarListBox( QWidget *parent = 0, const char *name = 0 );
+ KURLBarListBox( TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the box.
*/
@@ -523,18 +523,18 @@ signals:
/**
* Emitted when a drop-event happened.
*/
- void dropped( QDropEvent *e );
+ void dropped( TQDropEvent *e );
protected:
/**
- * @returns a suitable QDragObject when an item is dragged.
+ * @returns a suitable TQDragObject when an item is dragged.
*/
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent * );
- virtual void contentsDropEvent( QDropEvent * );
- virtual void contextMenuEvent( QContextMenuEvent * );
- virtual void paintEvent( QPaintEvent* );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent * );
+ virtual void contentsDropEvent( TQDropEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
+ virtual void paintEvent( TQPaintEvent* );
private:
Qt::Orientation m_orientation;
@@ -577,9 +577,9 @@ public:
* See the KURLBarItem constructor for the parameter description.
*/
static bool getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent = 0 );
+ TQWidget *parent = 0 );
/**
* Constructs a KURLBarItemDialog.
@@ -599,10 +599,10 @@ public:
* used (KMimeType::pixmapForURL()).
*/
KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description, QString icon,
+ const TQString& description, TQString icon,
bool appLocal = true,
int iconSize = KIcon::SizeMedium,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the dialog.
*/
@@ -616,12 +616,12 @@ public:
/**
* @returns the configured description
*/
- QString description() const;
+ TQString description() const;
/**
* @returns the configured icon
*/
- QString icon() const;
+ TQString icon() const;
/**
* @returns whether the item should be local to the application or global.
@@ -644,12 +644,12 @@ protected:
*/
KIconButton * m_iconButton;
/**
- * The QCheckBox to modify the local/global setting
+ * The TQCheckBox to modify the local/global setting
*/
- QCheckBox * m_appLocal;
+ TQCheckBox * m_appLocal;
public slots:
- void urlChanged(const QString & );
+ void urlChanged(const TQString & );
private:
class KURLBarItemDialogPrivate;
diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp
index 128e8a22c..72c7cbd07 100644
--- a/kio/kfile/kurlcombobox.cpp
+++ b/kio/kfile/kurlcombobox.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlistbox.h>
+#include <tqdir.h>
+#include <tqlistbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -31,21 +31,21 @@ class KURLComboBox::KURLComboBoxPrivate
{
public:
KURLComboBoxPrivate() {
- dirpix = SmallIcon(QString::fromLatin1("folder"));
+ dirpix = SmallIcon(TQString::fromLatin1("folder"));
}
- QPixmap dirpix;
+ TQPixmap dirpix;
};
-KURLComboBox::KURLComboBox( Mode mode, QWidget *parent, const char *name )
+KURLComboBox::KURLComboBox( Mode mode, TQWidget *parent, const char *name )
: KComboBox( parent, name )
{
init( mode );
}
-KURLComboBox::KURLComboBox( Mode mode, bool rw, QWidget *parent,
+KURLComboBox::KURLComboBox( Mode mode, bool rw, TQWidget *parent,
const char *name )
: KComboBox( rw, parent, name )
{
@@ -70,20 +70,20 @@ void KURLComboBox::init( Mode mode )
defaultList.setAutoDelete( true );
setInsertionPolicy( NoInsertion );
setTrapReturnKey( true );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
- opendirPix = SmallIcon(QString::fromLatin1("folder_open"));
+ opendirPix = SmallIcon(TQString::fromLatin1("folder_open"));
- connect( this, SIGNAL( activated( int )), SLOT( slotActivated( int )));
+ connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int )));
}
-QStringList KURLComboBox::urls() const
+TQStringList KURLComboBox::urls() const
{
kdDebug(250) << "::urls()" << endl;
- //static const QString &fileProt = KGlobal::staticQString("file:");
- QStringList list;
- QString url;
+ //static const TQString &fileProt = KGlobal::staticQString("file:");
+ TQStringList list;
+ TQString url;
for ( int i = defaultList.count(); i < count(); i++ ) {
url = text( i );
if ( !url.isEmpty() ) {
@@ -98,14 +98,14 @@ QStringList KURLComboBox::urls() const
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQString& text )
{
addDefaultURL( url, getPixmap( url ), text );
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text )
{
KURLComboItem *item = new KURLComboItem;
item->url = url;
@@ -134,12 +134,12 @@ void KURLComboBox::setDefaults()
}
}
-void KURLComboBox::setURLs( QStringList urls )
+void KURLComboBox::setURLs( TQStringList urls )
{
setURLs( urls, RemoveBottom );
}
-void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
+void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove )
{
setDefaults();
itemList.clear();
@@ -147,10 +147,10 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
if ( urls.isEmpty() )
return;
- QStringList::Iterator it = urls.begin();
+ TQStringList::Iterator it = urls.begin();
// kill duplicates
- QString text;
+ TQString text;
while ( it != urls.end() ) {
while ( urls.contains( *it ) > 1 ) {
it = urls.remove( it );
@@ -181,7 +181,7 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
u = KURL::fromPathOrURL( *it );
// Don't restore if file doesn't exist anymore
- if (u.isLocalFile() && !QFile::exists(u.path())) {
+ if (u.isLocalFile() && !TQFile::exists(u.path())) {
++it;
continue;
}
@@ -210,8 +210,8 @@ void KURLComboBox::setURL( const KURL& url )
blockSignals( true );
// check for duplicates
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
- QString urlToInsert = url.url(-1);
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQString urlToInsert = url.url(-1);
while ( mit != itemMapper.end() ) {
if ( urlToInsert == mit.data()->url.url(-1) ) {
setCurrentItem( mit.key() );
@@ -235,7 +235,7 @@ void KURLComboBox::setURL( const KURL& url )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
for( ; it.current(); ++it )
insertURLItem( it.current() );
@@ -249,7 +249,7 @@ void KURLComboBox::setURL( const KURL& url )
kdDebug(250) << "setURL: text=" << item->text << endl;
int id = count();
- QString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
+ TQString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
if ( myMode == Directories )
KComboBox::insertItem( opendirPix, text, id );
@@ -293,7 +293,7 @@ void KURLComboBox::setMaxItems( int max )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
int Overload = itemList.count() - myMaximum + defaultList.count();
for ( int i = 0; i <= Overload; i++ )
++it;
@@ -312,7 +312,7 @@ void KURLComboBox::setMaxItems( int max )
void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
{
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
while ( mit != itemMapper.end() ) {
if ( url.url(-1) == mit.data()->url.url(-1) ) {
if ( !itemList.remove( mit.data() ) && checkDefaultURLs )
@@ -323,7 +323,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
blockSignals( true );
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
while ( it.current() ) {
insertURLItem( *it );
++it;
@@ -332,7 +332,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
}
-QPixmap KURLComboBox::getPixmap( const KURL& url ) const
+TQPixmap KURLComboBox::getPixmap( const KURL& url ) const
{
if ( myMode == Directories )
return d->dirpix;
@@ -344,9 +344,9 @@ QPixmap KURLComboBox::getPixmap( const KURL& url ) const
// updates "item" with pixmap "pixmap" and sets the URL instead of text
// works around a Qt bug.
void KURLComboBox::updateItem( const KURLComboItem *item,
- int index, const QPixmap& pixmap )
+ int index, const TQPixmap& pixmap )
{
- // QComboBox::changeItem() doesn't honor the pixmap when
+ // TQComboBox::changeItem() doesn't honor the pixmap when
// using an editable combobox, so we just remove and insert
if ( editable() ) {
removeItem( index );
diff --git a/kio/kfile/kurlcombobox.h b/kio/kfile/kurlcombobox.h
index 7485bfed9..d65cd91f5 100644
--- a/kio/kfile/kurlcombobox.h
+++ b/kio/kfile/kurlcombobox.h
@@ -19,11 +19,11 @@
#ifndef KURLCOMBOBOX_H
#define KURLCOMBOBOX_H
-#include <qevent.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include <kcombobox.h>
#include <kurl.h>
@@ -41,7 +41,7 @@
class KIO_EXPORT KURLComboBox : public KComboBox
{
Q_OBJECT
- Q_PROPERTY(QStringList urls READ urls WRITE setURLs DESIGNABLE true)
+ Q_PROPERTY(TQStringList urls READ urls WRITE setURLs DESIGNABLE true)
Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true)
public:
@@ -73,8 +73,8 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KURLComboBox( Mode mode, QWidget *parent=0, const char *name=0 );
- KURLComboBox( Mode mode, bool rw, QWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, TQWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, bool rw, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the combo box.
*/
@@ -101,7 +101,7 @@ public:
* If the list of urls contains more items than maxItems, the first items
* will be stripped.
*/
- void setURLs( QStringList urls );
+ void setURLs( TQStringList urls );
/**
* Inserts @p urls into the combobox below the "default urls" (see
@@ -110,7 +110,7 @@ public:
* If the list of urls contains more items than maxItems, the @p remove
* parameter determines whether the first or last items will be stripped.
*/
- void setURLs( QStringList urls, OverLoadResolving remove );
+ void setURLs( TQStringList urls, OverLoadResolving remove );
/**
* @returns a list of all urls currently handled. The list contains at most
@@ -122,7 +122,7 @@ public:
* You will always get fully qualified urls, i.e. with protocol like
* file:/
*/
- QStringList urls() const;
+ TQStringList urls() const;
/**
* Sets how many items should be handled and displayed by the combobox.
@@ -144,7 +144,7 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQString& text = TQString::null );
/**
* Adds a url that will always be shown in the combobox, it can't be
@@ -154,8 +154,8 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text = TQString::null );
/**
* Clears all items and inserts the default urls into the combo. Will be
@@ -185,14 +185,14 @@ protected slots:
protected:
struct _KURLComboItem {
- QString text;
+ TQString text;
KURL url;
- QPixmap pixmap;
+ TQPixmap pixmap;
};
typedef _KURLComboItem KURLComboItem;
- QPtrList<KURLComboItem> itemList;
- QPtrList<KURLComboItem> defaultList;
- QMap<int,const KURLComboItem*> itemMapper;
+ TQPtrList<KURLComboItem> itemList;
+ TQPtrList<KURLComboItem> defaultList;
+ TQMap<int,const KURLComboItem*> itemMapper;
void init( Mode mode );
void insertURLItem( const KURLComboItem * );
@@ -201,16 +201,16 @@ protected:
* Uses KMimeType::pixmapForURL() to return a proper pixmap for @p url.
* In directory mode, a folder icon is always returned.
*/
- QPixmap getPixmap( const KURL& url ) const;
+ TQPixmap getPixmap( const KURL& url ) const;
/**
* Updates @p item with @p pixmap and sets the url instead of the text
* of the KURLComboItem.
* Also works around a Qt bug.
*/
- void updateItem( const KURLComboItem *item, int index, const QPixmap& pix);
+ void updateItem( const KURLComboItem *item, int index, const TQPixmap& pix);
- QPixmap opendirPix;
+ TQPixmap opendirPix;
int firstItemIndex;
diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp
index 0f4619fd8..ae8f5b623 100644
--- a/kio/kfile/kurlrequester.cpp
+++ b/kio/kfile/kurlrequester.cpp
@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
#include <kaccel.h>
#include <kcombobox.h>
@@ -44,7 +44,7 @@
class KURLDragPushButton : public KPushButton
{
public:
- KURLDragPushButton( QWidget *parent, const char *name=0 )
+ KURLDragPushButton( TQWidget *parent, const char *name=0 )
: KPushButton( parent, name ) {
setDragEnabled( true );
}
@@ -63,11 +63,11 @@ public:
*/
protected:
- virtual QDragObject *dragObject() {
+ virtual TQDragObject *dragObject() {
if ( m_urls.isEmpty() )
return 0L;
- QDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
+ TQDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
return drag;
}
@@ -90,7 +90,7 @@ public:
fileDialogMode = KFile::File | KFile::ExistingOnly | KFile::LocalOnly;
}
- void setText( const QString& text ) {
+ void setText( const TQString& text ) {
if ( combo )
{
if (combo->editable())
@@ -109,19 +109,19 @@ public:
}
}
- void connectSignals( QObject *receiver ) {
- QObject *sender;
+ void connectSignals( TQObject *receiver ) {
+ TQObject *sender;
if ( combo )
sender = combo;
else
sender = edit;
- connect( sender, SIGNAL( textChanged( const QString& )),
- receiver, SIGNAL( textChanged( const QString& )));
- connect( sender, SIGNAL( returnPressed() ),
- receiver, SIGNAL( returnPressed() ));
- connect( sender, SIGNAL( returnPressed( const QString& ) ),
- receiver, SIGNAL( returnPressed( const QString& ) ));
+ connect( sender, TQT_SIGNAL( textChanged( const TQString& )),
+ receiver, TQT_SIGNAL( textChanged( const TQString& )));
+ connect( sender, TQT_SIGNAL( returnPressed() ),
+ receiver, TQT_SIGNAL( returnPressed() ));
+ connect( sender, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ receiver, TQT_SIGNAL( returnPressed( const TQString& ) ));
}
void setCompletionObject( KCompletion *comp ) {
@@ -134,8 +134,8 @@ public:
/**
* replaces ~user or $FOO, if necessary
*/
- QString url() {
- QString txt = combo ? combo->currentText() : edit->text();
+ TQString url() {
+ TQString txt = combo ? combo->currentText() : edit->text();
KURLCompletion *comp;
if ( combo )
comp = dynamic_cast<KURLCompletion*>(combo->completionObject());
@@ -151,19 +151,19 @@ public:
KLineEdit *edit;
KComboBox *combo;
int fileDialogMode;
- QString fileDialogFilter;
+ TQString fileDialogFilter;
};
-KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
+KURLRequester::KURLRequester( TQWidget *editWidget, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
// must have this as parent
- editWidget->reparent( this, 0, QPoint(0,0) );
+ editWidget->reparent( this, 0, TQPoint(0,0) );
d->edit = dynamic_cast<KLineEdit*>( editWidget );
d->combo = dynamic_cast<KComboBox*>( editWidget );
@@ -171,17 +171,17 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
}
-KURLRequester::KURLRequester( QWidget *parent, const char *name )
- : QHBox( parent, name )
+KURLRequester::KURLRequester( TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
}
-KURLRequester::KURLRequester( const QString& url, QWidget *parent,
+KURLRequester::KURLRequester( const TQString& url, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
@@ -206,33 +206,33 @@ void KURLRequester::init()
d->edit = new KLineEdit( this, "line edit" );
myButton = new KURLDragPushButton( this, "kfile button");
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("fileopen"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- QToolTip::add(myButton, i18n("Open file dialog"));
+ TQToolTip::add(myButton, i18n("Open file dialog"));
- connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() ));
+ connect( myButton, TQT_SIGNAL( pressed() ), TQT_SLOT( slotUpdateURL() ));
setSpacing( KDialog::spacingHint() );
- QWidget *widget = d->combo ? (QWidget*) d->combo : (QWidget*) d->edit;
+ TQWidget *widget = d->combo ? (TQWidget*) d->combo : (TQWidget*) d->edit;
widget->installEventFilter( this );
setFocusProxy( widget );
d->connectSignals( this );
- connect( myButton, SIGNAL( clicked() ), this, SLOT( slotOpenDialog() ));
+ connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenDialog() ));
myCompletion = new KURLCompletion();
d->setCompletionObject( myCompletion );
KAccel *accel = new KAccel( this );
- accel->insert( KStdAccel::Open, this, SLOT( slotOpenDialog() ));
+ accel->insert( KStdAccel::Open, this, TQT_SLOT( slotOpenDialog() ));
accel->readSettings();
}
-void KURLRequester::setURL( const QString& url )
+void KURLRequester::setURL( const TQString& url )
{
if ( myShowLocalProt )
{
@@ -258,14 +258,14 @@ void KURLRequester::setKURL( const KURL& url )
d->setText( url.pathOrURL() );
}
-void KURLRequester::setCaption( const QString& caption )
+void KURLRequester::setCaption( const TQString& caption )
{
- QWidget::setCaption( caption );
+ TQWidget::setCaption( caption );
if (myFileDialog)
myFileDialog->setCaption( caption );
}
-QString KURLRequester::url() const
+TQString KURLRequester::url() const
{
return d->url();
}
@@ -296,7 +296,7 @@ void KURLRequester::slotOpenDialog()
dlg->setSelection( u.url() );
}
- if ( dlg->exec() != QDialog::Accepted )
+ if ( dlg->exec() != TQDialog::Accepted )
{
return;
}
@@ -324,14 +324,14 @@ unsigned int KURLRequester::mode() const
return d->fileDialogMode;
}
-void KURLRequester::setFilter(const QString &filter)
+void KURLRequester::setFilter(const TQString &filter)
{
d->fileDialogFilter = filter;
if (myFileDialog)
myFileDialog->setFilter( d->fileDialogFilter );
}
-QString KURLRequester::filter( ) const
+TQString KURLRequester::filter( ) const
{
return d->fileDialogFilter;
}
@@ -340,8 +340,8 @@ QString KURLRequester::filter( ) const
KFileDialog * KURLRequester::fileDialog() const
{
if ( !myFileDialog ) {
- QWidget *p = parentWidget();
- myFileDialog = new KFileDialog( QString::null, d->fileDialogFilter, p,
+ TQWidget *p = parentWidget();
+ myFileDialog = new KFileDialog( TQString::null, d->fileDialogFilter, p,
"file dialog", true );
myFileDialog->setMode( d->fileDialogMode );
@@ -363,7 +363,7 @@ void KURLRequester::setShowLocalProtocol( bool b )
void KURLRequester::clear()
{
- d->setText( QString::null );
+ d->setText( TQString::null );
}
KLineEdit * KURLRequester::lineEdit() const
@@ -380,19 +380,19 @@ void KURLRequester::slotUpdateURL()
{
// bin compat, myButton is declared as QPushButton
KURL u;
- u = KURL( KURL( QDir::currentDirPath() + '/' ), url() );
+ u = KURL( KURL( TQDir::currentDirPath() + '/' ), url() );
(static_cast<KURLDragPushButton *>( myButton ))->setURL( u );
}
-bool KURLRequester::eventFilter( QObject *obj, QEvent *ev )
+bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev )
{
if ( ( d->edit == obj ) || ( d->combo == obj ) )
{
- if (( ev->type() == QEvent::FocusIn ) || ( ev->type() == QEvent::FocusOut ))
+ if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut ))
// Forward focusin/focusout events to the urlrequester; needed by file form element in khtml
- QApplication::sendEvent( this, ev );
+ TQApplication::sendEvent( this, ev );
}
- return QWidget::eventFilter( obj, ev );
+ return TQWidget::eventFilter( obj, ev );
}
KPushButton * KURLRequester::button() const
@@ -402,8 +402,8 @@ KPushButton * KURLRequester::button() const
KEditListBox::CustomEditor KURLRequester::customEditor()
{
- setSizePolicy(QSizePolicy( QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
KLineEdit *edit = d->edit;
if ( !edit && d->combo )
@@ -421,7 +421,7 @@ KEditListBox::CustomEditor KURLRequester::customEditor()
void KURLRequester::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-KURLComboRequester::KURLComboRequester( QWidget *parent,
+KURLComboRequester::KURLComboRequester( TQWidget *parent,
const char *name )
: KURLRequester( new KComboBox(false), parent, name)
{
diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h
index 1a7016b24..b22e353dd 100644
--- a/kio/kfile/kurlrequester.h
+++ b/kio/kfile/kurlrequester.h
@@ -20,7 +20,7 @@
#ifndef KURLREQUESTER_H
#define KURLREQUESTER_H
-#include <qhbox.h>
+#include <tqhbox.h>
#include <keditlistbox.h>
#include <kfile.h>
@@ -56,22 +56,22 @@ class QTimer;
class KIO_EXPORT KURLRequester : public QHBox
{
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
Q_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol )
- Q_PROPERTY( QString filter READ filter WRITE setFilter )
+ Q_PROPERTY( TQString filter READ filter WRITE setFilter )
Q_PROPERTY( uint mode READ mode WRITE setMode )
public:
/**
* Constructs a KURLRequester widget.
*/
- KURLRequester( QWidget *parent=0, const char *name=0 );
+ KURLRequester( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a KURLRequester widget with the initial URL @p url.
* // TODO KDE4: Use KURL instead
*/
- KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
+ KURLRequester( const TQString& url, TQWidget *parent=0, const char *name=0 );
/**
* Special constructor, which creates a KURLRequester widget with a custom
@@ -79,7 +79,7 @@ public:
* (or inherited thereof). Note: for geometry management reasons, the
* edit-widget is reparented to have the KURLRequester as parent.
*/
- KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
+ KURLRequester( TQWidget *editWidget, TQWidget *parent, const char *name=0 );
/**
* Destructs the KURLRequester.
*/
@@ -91,7 +91,7 @@ public:
* for local files.
* // TODO KDE4: Use KURL so that the result is properly defined
*/
- QString url() const;
+ TQString url() const;
/**
* Enables/disables showing file:/ in the lineedit, when a local file has
@@ -121,14 +121,14 @@ public:
* Sets the filter for the file dialog.
* @see KFileDialog::setFilter()
*/
- void setFilter( const QString& filter );
+ void setFilter( const TQString& filter );
/**
* Returns the current filter for the file dialog.
* @see KFileDialog::filter()
* @since 3.3
*/
- QString filter() const;
+ TQString filter() const;
/**
* @returns whether local files will be prefixed with file:/ in the
@@ -194,7 +194,7 @@ public slots:
* @since 3.1
* // TODO KDE4: Use KURL instead
*/
- void setURL( const QString& url );
+ void setURL( const TQString& url );
/**
* Sets the url in the lineedit to @p url.
@@ -207,7 +207,7 @@ public slots:
* Sets the caption of the file dialog.
* @since 3.1
*/
- virtual void setCaption( const QString& caption );
+ virtual void setCaption( const TQString& caption );
/**
* Clears the lineedit/combobox.
@@ -221,7 +221,7 @@ signals:
* The parameter contains the contents of the lineedit.
* @since 3.1
*/
- void textChanged( const QString& );
+ void textChanged( const TQString& );
/**
* Emitted when return or enter was pressed in the lineedit.
@@ -232,7 +232,7 @@ signals:
* Emitted when return or enter was pressed in the lineedit.
* The parameter contains the contents of the lineedit.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted before the filedialog is going to open. Connect
@@ -252,7 +252,7 @@ signals:
* The parameter contains the contents of the lineedit.
* // TODO KDE4: Use KURL instead
*/
- void urlSelected( const QString& );
+ void urlSelected( const TQString& );
protected:
void init();
@@ -278,7 +278,7 @@ private slots:
protected:
virtual void virtual_hook( int id, void* data );
- bool eventFilter( QObject *obj, QEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
private:
class KURLRequesterPrivate;
KURLRequesterPrivate *d;
@@ -294,7 +294,7 @@ public:
/**
* Constructs a KURLRequester widget with a combobox.
*/
- KURLComboRequester( QWidget *parent=0, const char *name=0 );
+ KURLComboRequester( TQWidget *parent=0, const char *name=0 );
};
diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp
index ed89f599b..19409afdc 100644
--- a/kio/kfile/kurlrequesterdlg.cpp
+++ b/kio/kfile/kurlrequesterdlg.cpp
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
#include <kaccel.h>
#include <kfiledialog.h>
@@ -39,16 +39,16 @@
#include "kurlrequesterdlg.h"
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, QWidget *parent,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, TQWidget *parent,
const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(i18n( "Location:" ), urlName);
}
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, const QString& _text, QWidget *parent, const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, const TQString& _text, TQWidget *parent, const char *name, bool modal )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(_text, urlName);
@@ -58,20 +58,20 @@ KURLRequesterDlg::~KURLRequesterDlg()
{
}
-void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
+void KURLRequesterDlg::initDialog(const TQString &text,const TQString &urlName)
{
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0,
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0,
spacingHint() );
- QLabel * label = new QLabel( text , plainPage() );
+ TQLabel * label = new TQLabel( text , plainPage() );
topLayout->addWidget( label );
urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" );
urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 );
topLayout->addWidget( urlRequester_ );
urlRequester_->setFocus();
- connect( urlRequester_->lineEdit(), SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
bool state = !urlName.isEmpty();
enableButtonOK( state );
enableButton( KDialogBase::User1, state );
@@ -80,10 +80,10 @@ void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
KFile::ExistingOnly );
urlRequester_->setMode( mode );
*/
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotClear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotClear() ) );
}
-void KURLRequesterDlg::slotTextChanged(const QString & text)
+void KURLRequesterDlg::slotTextChanged(const TQString & text)
{
bool state = !text.stripWhiteSpace().isEmpty();
enableButtonOK( state );
@@ -97,15 +97,15 @@ void KURLRequesterDlg::slotClear()
KURL KURLRequesterDlg::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return KURL::fromPathOrURL( urlRequester_->url() );
else
return KURL();
}
-KURL KURLRequesterDlg::getURL(const QString& dir, QWidget *parent,
- const QString& caption)
+KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent,
+ const TQString& caption)
{
KURLRequesterDlg dlg(dir, parent, "filedialog", true);
diff --git a/kio/kfile/kurlrequesterdlg.h b/kio/kfile/kurlrequesterdlg.h
index a4f2cf0f3..3f13a844d 100644
--- a/kio/kfile/kurlrequesterdlg.h
+++ b/kio/kfile/kurlrequesterdlg.h
@@ -43,7 +43,7 @@ public:
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param parent The parent object of this widget.
@@ -51,13 +51,13 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, QWidget *parent,
+ KURLRequesterDlg( const TQString& url, TQWidget *parent,
const char *name, bool modal = true );
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param text Text of the label
@@ -66,8 +66,8 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, const QString& text,
- QWidget *parent, const char *name, bool modal=true );
+ KURLRequesterDlg( const TQString& url, const TQString& text,
+ TQWidget *parent, const char *name, bool modal=true );
/**
* Destructs the dialog.
*/
@@ -85,8 +85,8 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The caption to use for the dialog.
*/
- static KURL getURL(const QString& url = QString::null,
- QWidget *parent= 0, const QString& caption = QString::null);
+ static KURL getURL(const TQString& url = TQString::null,
+ TQWidget *parent= 0, const TQString& caption = TQString::null);
/**
* Returns a pointer to the file dialog used by the KURLRequester.
@@ -99,9 +99,9 @@ public:
private slots:
void slotClear();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
private:
- void initDialog(const QString &text, const QString &url);
+ void initDialog(const TQString &text, const TQString &url);
KURLRequester *urlRequester_;
class KURLRequesterDlgPrivate;
diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp
index e2eb52f1b..47fcd02ca 100644
--- a/kio/kfile/tests/kdirselectdialogtest.cpp
+++ b/kio/kfile/tests/kdirselectdialogtest.cpp
@@ -7,10 +7,10 @@ int main( int argc, char **argv )
{
KApplication app(argc, argv, "kdirselectdialogtest");
- KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : QString::null );
+ KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
if ( u.isValid() )
KMessageBox::information( 0L,
- QString::fromLatin1("You selected the url: %1")
+ TQString::fromLatin1("You selected the url: %1")
.arg( u.prettyURL() ), "Selected URL" );
return 0;
diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp
index d9341a7ae..25e2da949 100644
--- a/kio/kfile/tests/kfdtest.cpp
+++ b/kio/kfile/tests/kfdtest.cpp
@@ -1,31 +1,31 @@
#include "kfdtest.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <kapplication.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KFDTest::KFDTest( const QString& startDir, QObject *parent, const char *name )
- : QObject( parent, name ),
+KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_startDir( startDir )
{
- QTimer::singleShot( 1000, this, SLOT( doit() ));
+ TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
}
void KFDTest::doit()
{
- KFileDialog *dlg = new KFileDialog( m_startDir, QString::null, 0L,
+ KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
if ( dlg->exec() == KDialog::Accepted )
{
- KMessageBox::information(0, QString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
}
// qApp->quit();
diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h
index 0743bb96c..3f980bc94 100644
--- a/kio/kfile/tests/kfdtest.h
+++ b/kio/kfile/tests/kfdtest.h
@@ -8,20 +8,20 @@
#ifndef KFDTEST_H
#define KFDTEST_H
-#include <qobject.h>
+#include <tqobject.h>
class KFDTest : public QObject
{
Q_OBJECT
public:
- KFDTest( const QString& startDir, QObject *parent = 0, const char *name = 0);
+ KFDTest( const TQString& startDir, TQObject *parent = 0, const char *name = 0);
public slots:
void doit();
private:
- QString m_startDir;
+ TQString m_startDir;
};
diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp
index 6a4ea719f..5c520dd5d 100644
--- a/kio/kfile/tests/kfiletreeviewtest.cpp
+++ b/kio/kfile/tests/kfiletreeviewtest.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -45,30 +45,30 @@ testFrame::testFrame():KMainWindow(0,"Test FileTreeView"),
/* Connect to see the status bar */
KStatusBar* sta = statusBar();
- connect( treeView, SIGNAL( onItem( const QString& )),
- sta, SLOT( message( const QString& )));
+ connect( treeView, TQT_SIGNAL( onItem( const TQString& )),
+ sta, TQT_SLOT( message( const TQString& )));
- connect( treeView, SIGNAL( dropped( QWidget*, QDropEvent*, KURL::List& )),
- this, SLOT( urlsDropped( QWidget*, QDropEvent*, KURL::List& )));
+ connect( treeView, TQT_SIGNAL( dropped( TQWidget*, TQDropEvent*, KURL::List& )),
+ this, TQT_SLOT( urlsDropped( TQWidget*, TQDropEvent*, KURL::List& )));
- connect( treeView, SIGNAL( dropped( KURL::List&, KURL& )), this,
- SLOT( copyURLs( KURL::List&, KURL& )));
+ connect( treeView, TQT_SIGNAL( dropped( KURL::List&, KURL& )), this,
+ TQT_SLOT( copyURLs( KURL::List&, KURL& )));
treeView->addColumn( "File" );
treeView->addColumn( "ChildCount" );
setCentralWidget( treeView );
resize( 600, 400 );
- showPath( KURL::fromPathOrURL( QDir::homeDirPath() ));
+ showPath( KURL::fromPathOrURL( TQDir::homeDirPath() ));
}
void testFrame::showPath( const KURL &url )
{
- QString fname = "TestBranch"; // url.fileName ();
+ TQString fname = "TestBranch"; // url.fileName ();
/* try a user icon */
KIconLoader *loader = KGlobal::iconLoader();
- QPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
- QPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
+ TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
+ TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
KFileTreeBranch *nb = treeView->addBranch( url, fname, pix );
@@ -77,10 +77,10 @@ void testFrame::showPath( const KURL &url )
if( dirOnlyMode ) treeView->setDirOnlyMode( nb, true );
nb->setOpenPixmap( pixOpen );
- connect( nb, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
- connect( nb, SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
- this, SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
+ connect( nb, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect( nb, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
+ this, TQT_SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
// nb->setChildRecurse(false );
nb->setOpen(true);
@@ -89,7 +89,7 @@ void testFrame::showPath( const KURL &url )
}
-void testFrame::urlsDropped( QWidget* , QDropEvent* , KURL::List& list )
+void testFrame::urlsDropped( TQWidget* , TQDropEvent* , KURL::List& list )
{
KURL::List::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) {
@@ -117,7 +117,7 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
kdDebug() << "setting column 2 of treeview with count " << cc << endl;
- item->setText( 1, QString::number( cc ));
+ item->setText( 1, TQString::number( cc ));
#endif
}
else
@@ -129,16 +129,16 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c )
{
if( item )
- item->setText(1, QString::number( c ));
+ item->setText(1, TQString::number( c ));
}
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfiletreeviewtest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
+ TQString argv1;
testFrame *tf;
tf = new testFrame();
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
for( int i = 1; i < argc; i++ )
{
- argv1 = QString::fromLatin1(argv[i]);
+ argv1 = TQString::fromLatin1(argv[i]);
kdDebug() << "Opening " << argv1 << endl;
if( argv1 == "-d" )
tf->setDirOnly();
diff --git a/kio/kfile/tests/kfiletreeviewtest.h b/kio/kfile/tests/kfiletreeviewtest.h
index 1286e1be2..4ae791ce5 100644
--- a/kio/kfile/tests/kfiletreeviewtest.h
+++ b/kio/kfile/tests/kfiletreeviewtest.h
@@ -31,7 +31,7 @@ public slots:
void slotPopulateFinished(KFileTreeViewItem *);
void slotSetChildCount( KFileTreeViewItem *item, int c );
- void urlsDropped( QWidget*, QDropEvent*, KURL::List& );
+ void urlsDropped( TQWidget*, TQDropEvent*, KURL::List& );
void copyURLs( KURL::List& list, KURL& to );
private:
KFileTreeView *treeView;
diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp
index 16d74cb0c..b84cbc967 100644
--- a/kio/kfile/tests/kfstest.cpp
+++ b/kio/kfile/tests/kfstest.cpp
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kfiledialog.h>
#include <kfileiconview.h>
@@ -45,17 +45,17 @@
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfstest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
- QString startDir;
+ TQString argv1;
+ TQString startDir;
if (argc > 1)
- argv1 = QString::fromLatin1(argv[1]);
+ argv1 = TQString::fromLatin1(argv[1]);
if ( argc > 2 )
- startDir = QString::fromLatin1( argv[2]);
+ startDir = TQString::fromLatin1( argv[2]);
- if (argv1 == QString::fromLatin1("diroperator")) {
+ if (argv1 == TQString::fromLatin1("diroperator")) {
KDirOperator *op = new KDirOperator(startDir, 0, "operator");
op->setViewConfig( KGlobal::config(), "TestGroup" );
op->setView(KFile::Simple);
@@ -64,73 +64,73 @@ int main(int argc, char **argv)
a.exec();
}
- else if (argv1 == QString::fromLatin1("justone")) {
- QString name = KFileDialog::getOpenFileName(startDir);
+ else if (argv1 == TQString::fromLatin1("justone")) {
+ TQString name = KFileDialog::getOpenFileName(startDir);
qDebug("filename=%s",name.latin1());
}
- else if (argv1 == QString::fromLatin1("existingURL")) {
+ else if (argv1 == TQString::fromLatin1("existingURL")) {
KURL url = KFileDialog::getExistingURL();
qDebug("URL=%s",url.url().latin1());
name1 = url.url();
}
- else if (argv1 == QString::fromLatin1("preview")) {
+ else if (argv1 == TQString::fromLatin1("preview")) {
KURL u = KFileDialog::getImageOpenURL();
qDebug("filename=%s", u.url().latin1());
}
- else if (argv1 == QString::fromLatin1("preselect")) {
- names = KFileDialog::getOpenFileNames(QString::fromLatin1("/etc/passwd"));
- QStringList::Iterator it = names.begin();
+ else if (argv1 == TQString::fromLatin1("preselect")) {
+ names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
+ TQStringList::Iterator it = names.begin();
while ( it != names.end() ) {
qDebug("selected file: %s", (*it).latin1());
++it;
}
}
- else if (argv1 == QString::fromLatin1("dirs"))
+ else if (argv1 == TQString::fromLatin1("dirs"))
name1 = KFileDialog::getExistingDirectory();
- else if (argv1 == QString::fromLatin1("heap")) {
- KFileDialog *dlg = new KFileDialog( startDir, QString::null, 0L,
+ else if (argv1 == TQString::fromLatin1("heap")) {
+ KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
KURLBar *urlBar = dlg->speedBar();
if ( urlBar )
{
urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"),
- QString::fromLatin1("KDE FTP Server") );
+ TQString::fromLatin1("KDE FTP Server") );
}
if ( dlg->exec() == KDialog::Accepted )
name1 = dlg->selectedURL().url();
}
- else if ( argv1 == QString::fromLatin1("eventloop") )
+ else if ( argv1 == TQString::fromLatin1("eventloop") )
{
KFDTest *test = new KFDTest( startDir );
return a.exec();
}
- else if (argv1 == QString::fromLatin1("save")) {
+ else if (argv1 == TQString::fromLatin1("save")) {
KURL u = KFileDialog::getSaveURL();
-// QString(QDir::homeDirPath() + QString::fromLatin1("/testfile")),
-// QString::null, 0L);
+// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")),
+// TQString::null, 0L);
name1 = u.url();
}
- else if (argv1 == QString::fromLatin1("icon")) {
+ else if (argv1 == TQString::fromLatin1("icon")) {
KIconDialog dlg;
- QString icon = dlg.selectIcon();
+ TQString icon = dlg.selectIcon();
kdDebug() << icon << endl;
}
-// else if ( argv1 == QString::fromLatin1("dirselect") ) {
+// else if ( argv1 == TQString::fromLatin1("dirselect") ) {
// KURL url;
// url.setPath( "/" );
// KURL selected = KDirSelectDialog::selectDirectory( url );
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
else {
KFileDialog dlg(startDir,
- QString::fromLatin1("*|All Files\n"
+ TQString::fromLatin1("*|All Files\n"
"*.lo *.o *.la|All libtool Files"),
0, 0, true);
// dlg.setFilter( "*.kdevelop" );
@@ -148,14 +148,14 @@ int main(int argc, char **argv)
KFile::Directory |
KFile::ExistingOnly |
KFile::LocalOnly) );
-// QStringList filter;
+// TQStringList filter;
// filter << "text/plain" << "text/html" << "image/png";
// dlg.setMimeFilter( filter );
// KMimeType::List types;
// types.append( KMimeType::mimeType( "text/plain" ) );
// types.append( KMimeType::mimeType( "text/html" ) );
// dlg.setFilterMimeType( "Filetypes:", types, types.first() );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
KURL::List list = dlg.selectedURLs();
KURL::List::ConstIterator it = list.begin();
qDebug("*** selectedURLs(): ");
@@ -167,8 +167,8 @@ int main(int argc, char **argv)
qDebug("*** selectedFile: %s", dlg.selectedFile().latin1());
qDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1());
qDebug("*** selectedFiles: ");
- QStringList l = dlg.selectedFiles();
- QStringList::Iterator it2 = l.begin();
+ TQStringList l = dlg.selectedFiles();
+ TQStringList::Iterator it2 = l.begin();
while ( it2 != l.end() ) {
qDebug(" -> %s", (*it2).latin1());
++it2;
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
}
if (!(name1.isNull()))
- KMessageBox::information(0, QString::fromLatin1("You selected the file " ) + name1,
- QString::fromLatin1("Your Choice"));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1,
+ TQString::fromLatin1("Your Choice"));
return 0;
}
diff --git a/kio/kfile/tests/kopenwithtest.cpp b/kio/kfile/tests/kopenwithtest.cpp
index 96e18bcc2..ea348a94c 100644
--- a/kio/kfile/tests/kopenwithtest.cpp
+++ b/kio/kfile/tests/kopenwithtest.cpp
@@ -19,9 +19,9 @@
*/
#include <kapplication.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <kopenwith.h>
#include <kurl.h>
#include <kdebug.h>
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
delete dlg;
// Test with a mimetype
- QString mimetype = "text/plain";
+ TQString mimetype = "text/plain";
dlg = new KOpenWithDlg( mimetype, "kedit", 0);
if(dlg->exec()) {
kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp
index 5601f4922..9248eec5d 100644
--- a/kio/kfile/tests/kurlrequestertest.cpp
+++ b/kio/kfile/tests/kurlrequestertest.cpp
@@ -10,7 +10,7 @@ int main( int argc, char **argv )
qDebug( "Selected url: %s", url.url().latin1());
KURLRequester *req = new KURLRequester();
- KEditListBox *el = new KEditListBox( QString::fromLatin1("Test"), req->customEditor() );
+ KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );
el->show();
return app.exec();
}
diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp
index 1415c14ae..d4aa27353 100644
--- a/kio/kio/authinfo.cpp
+++ b/kio/kio/authinfo.cpp
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -72,7 +72,7 @@ AuthInfo& AuthInfo::operator= ( const AuthInfo& info )
return *this;
}
-QDataStream& KIO::operator<< (QDataStream& s, const AuthInfo& a)
+TQDataStream& KIO::operator<< (TQDataStream& s, const AuthInfo& a)
{
s << a.url << a.username << a.password << a.prompt << a.caption
<< a.comment << a.commentLabel << a.realmValue << a.digestInfo
@@ -81,7 +81,7 @@ QDataStream& KIO::operator<< (QDataStream& s, const AuthInfo& a)
return s;
}
-QDataStream& KIO::operator>> (QDataStream& s, AuthInfo& a)
+TQDataStream& KIO::operator>> (TQDataStream& s, AuthInfo& a)
{
Q_UINT8 verify = 0;
Q_UINT8 ro = 0;
@@ -120,7 +120,7 @@ NetRC* NetRC::self()
}
bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
- QString type, int mode )
+ TQString type, int mode )
{
// kdDebug() << "AutoLogin lookup for: " << url.host() << endl;
if ( !url.isValid() )
@@ -133,12 +133,12 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
{
loginMap.clear();
- QString filename = locateLocal("config", "kionetrc");
+ TQString filename = locateLocal("config", "kionetrc");
bool status = parse (openf (filename));
if ( userealnetrc )
{
- filename = QDir::homeDirPath()+ QDir::separator() + ".netrc";
+ filename = TQDir::homeDirPath()+ TQDir::separator() + ".netrc";
status |= parse (openf(filename));
}
@@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
AutoLogin &log = *it;
if ( (mode & defaultOnly) == defaultOnly &&
- log.machine == QString::fromLatin1("default") &&
+ log.machine == TQString::fromLatin1("default") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -169,7 +169,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
}
if ( (mode & presetOnly) == presetOnly &&
- log.machine == QString::fromLatin1("preset") &&
+ log.machine == TQString::fromLatin1("preset") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -195,10 +195,10 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
return true;
}
-int NetRC::openf( const QString& f )
+int NetRC::openf( const TQString& f )
{
KDE_struct_stat sbuff;
- QCString ef = QFile::encodeName(f);
+ TQCString ef = TQFile::encodeName(f);
if ( KDE_stat(ef, &sbuff) != 0 )
return -1;
@@ -210,7 +210,7 @@ int NetRC::openf( const QString& f )
return KDE_open( ef, O_RDONLY );
}
-QString NetRC::extract( const char* buf, const char* key, int& pos )
+TQString NetRC::extract( const char* buf, const char* key, int& pos )
{
int idx = pos;
int m_len = strlen(key);
@@ -237,12 +237,12 @@ QString NetRC::extract( const char* buf, const char* key, int& pos )
if ( idx > start )
{
pos = idx;
- return QString::fromLatin1( buf+start, idx-start);
+ return TQString::fromLatin1( buf+start, idx-start);
}
}
}
- return QString::null;
+ return TQString::null;
}
bool NetRC::parse( int fd )
@@ -250,8 +250,8 @@ bool NetRC::parse( int fd )
if (fd == -1)
return false;
- QString type;
- QString macro;
+ TQString type;
+ TQString macro;
uint index = 0;
bool isMacro = false;
@@ -280,7 +280,7 @@ bool NetRC::parse( int fd )
while( buf[tail-1] == '\n' || buf[tail-1] =='\r' )
tail--;
- QString mac = QString::fromLatin1(buf, tail).stripWhiteSpace();
+ TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace();
if ( !mac.isEmpty() )
loginMap[type][index].macdef[macro].append( mac );
@@ -294,12 +294,12 @@ bool NetRC::parse( int fd )
if (strncasecmp(buf+pos, "default", 7) == 0 )
{
pos += 7;
- l.machine = QString::fromLatin1("default");
+ l.machine = TQString::fromLatin1("default");
}
else if (strncasecmp(buf+pos, "preset", 6) == 0 )
{
pos += 6;
- l.machine = QString::fromLatin1("preset");
+ l.machine = TQString::fromLatin1("preset");
}
}
// kdDebug() << "Machine: " << l.machine << endl;
@@ -314,7 +314,7 @@ bool NetRC::parse( int fd )
type = l.type = extract( buf, "type", pos );
if ( l.type.isEmpty() && !l.machine.isEmpty() )
- type = l.type = QString::fromLatin1("ftp");
+ type = l.type = TQString::fromLatin1("ftp");
// kdDebug() << "Type: " << l.type << endl;
macro = extract( buf, "macdef", pos );
diff --git a/kio/kio/authinfo.h b/kio/kio/authinfo.h
index 2beb4f7bf..3f92e58d1 100644
--- a/kio/kio/authinfo.h
+++ b/kio/kio/authinfo.h
@@ -21,8 +21,8 @@
#ifndef __KIO_AUTHINFO_H
#define __KIO_AUTHINFO_H
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kurl.h>
@@ -50,8 +50,8 @@ namespace KIO {
*/
class KIO_EXPORT AuthInfo
{
- KIO_EXPORT friend QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
- KIO_EXPORT friend QDataStream& operator>> (QDataStream& s, AuthInfo& a);
+ KIO_EXPORT friend TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
+ KIO_EXPORT friend TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
public:
/**
@@ -96,12 +96,12 @@ public:
/**
* This is @em required for caching.
*/
- QString username;
+ TQString username;
/**
* This is @em required for caching.
*/
- QString password;
+ TQString password;
/**
* Information to be displayed when prompting
@@ -112,7 +112,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString prompt;
+ TQString prompt;
/**
* The text to displayed in the title bar of
@@ -123,7 +123,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString caption;
+ TQString caption;
/**
* Additional comment to be displayed when prompting
@@ -147,7 +147,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString comment;
+ TQString comment;
/**
* Descriptive label to be displayed in front of the
@@ -156,7 +156,7 @@ public:
* This setting is @em optional and only applicable when
* the comment field is also set.
*/
- QString commentLabel;
+ TQString commentLabel;
/**
* A unique identifier that allows caching of multiple
@@ -174,7 +174,7 @@ public:
*
* This setting is @em optional and not set by default.
*/
- QString realmValue;
+ TQString realmValue;
/**
* Field to store any extra authentication information for
@@ -184,7 +184,7 @@ public:
* protocol. However, any protocol can make use of it to
* store extra info.
*/
- QString digestInfo;
+ TQString digestInfo;
/**
* Flag that, if set, indicates whether a path match should be
@@ -225,8 +225,8 @@ private:
class AuthInfoPrivate* d;
};
-KIO_EXPORT QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
-KIO_EXPORT QDataStream& operator>> (QDataStream& s, AuthInfo& a);
+KIO_EXPORT TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
+KIO_EXPORT TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
/**
* A Singleton class that provides access to passwords
@@ -264,11 +264,11 @@ public:
*/
struct AutoLogin
{
- QString type;
- QString machine;
- QString login;
- QString password;
- QMap<QString, QStringList> macdef;
+ TQString type;
+ TQString machine;
+ TQString login;
+ TQString password;
+ TQMap<TQString, TQStringList> macdef;
};
/**
@@ -289,7 +289,7 @@ public:
*/
bool lookup( const KURL& url, AutoLogin& login,
bool userealnetrc = false,
- QString type = QString::null,
+ TQString type = TQString::null,
int mode = (exactOnly|defaultOnly) );
/**
* Reloads the auto login information.
@@ -297,8 +297,8 @@ public:
void reload() { isDirty = true; }
protected:
- QString extract( const char*, const char*, int& );
- int openf( const QString& );
+ TQString extract( const char*, const char*, int& );
+ int openf( const TQString& );
bool parse( int );
private:
@@ -308,8 +308,8 @@ private:
private:
bool isDirty;
- typedef QValueList<AutoLogin> LoginList;
- typedef QMap<QString, LoginList> LoginMap;
+ typedef TQValueList<AutoLogin> LoginList;
+ typedef TQMap<TQString, LoginList> LoginMap;
LoginMap loginMap;
static NetRC* instance;
diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp
index 5f00aa30c..e1d343c10 100644
--- a/kio/kio/chmodjob.cpp
+++ b/kio/kio/chmodjob.cpp
@@ -27,8 +27,8 @@
#include <unistd.h>
#include <assert.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -48,7 +48,7 @@ ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int mask,
m_newOwner( newOwner ), m_newGroup( newGroup ),
m_recursive( recursive ), m_lstItems( lstItems )
{
- QTimer::singleShot( 0, this, SLOT(processList()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(processList()) );
}
void ChmodJob::processList()
@@ -63,12 +63,12 @@ void ChmodJob::processList()
info.url = item->url();
// This is a toplevel file, we apply changes directly (no +X emulation here)
info.permissions = ( m_permissions & m_mask ) | ( item->permissions() & ~m_mask );
- /*kdDebug(7007) << "\n current permissions=" << QString::number(item->permissions(),8)
- << "\n wanted permission=" << QString::number(m_permissions,8)
- << "\n with mask=" << QString::number(m_mask,8)
- << "\n with ~mask (mask bits we keep) =" << QString::number((uint)~m_mask,8)
- << "\n bits we keep =" << QString::number(item->permissions() & ~m_mask,8)
- << "\n new permissions = " << QString::number(info.permissions,8)
+ /*kdDebug(7007) << "\n current permissions=" << TQString::number(item->permissions(),8)
+ << "\n wanted permission=" << TQString::number(m_permissions,8)
+ << "\n with mask=" << TQString::number(m_mask,8)
+ << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~m_mask,8)
+ << "\n bits we keep =" << TQString::number(item->permissions() & ~m_mask,8)
+ << "\n new permissions = " << TQString::number(info.permissions,8)
<< endl;*/
m_infos.prepend( info );
//kdDebug(7007) << "processList : Adding info for " << info.url.prettyURL() << endl;
@@ -77,9 +77,9 @@ void ChmodJob::processList()
{
//kdDebug(7007) << "ChmodJob::processList dir -> listing" << endl;
KIO::ListJob * listJob = KIO::listRecursive( item->url(), false /* no GUI */ );
- connect( listJob, SIGNAL(entries( KIO::Job *,
+ connect( listJob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( listJob );
return; // we'll come back later, when this one's finished
@@ -102,7 +102,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
mode_t permissions = 0;
bool isDir = false;
bool isLink = false;
- QString relativePath;
+ TQString relativePath;
for( ; it2 != (*it).end(); it2++ ) {
switch( (*it2).m_uds ) {
case KIO::UDS_NAME:
@@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
break;
}
}
- if ( !isLink && relativePath != QString::fromLatin1("..") )
+ if ( !isLink && relativePath != TQString::fromLatin1("..") )
{
ChmodInfo info;
info.url = m_lstItems.first()->url(); // base directory
@@ -143,12 +143,12 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
}
}
info.permissions = ( m_permissions & mask ) | ( permissions & ~mask );
- /*kdDebug(7007) << "\n current permissions=" << QString::number(permissions,8)
- << "\n wanted permission=" << QString::number(m_permissions,8)
- << "\n with mask=" << QString::number(mask,8)
- << "\n with ~mask (mask bits we keep) =" << QString::number((uint)~mask,8)
- << "\n bits we keep =" << QString::number(permissions & ~mask,8)
- << "\n new permissions = " << QString::number(info.permissions,8)
+ /*kdDebug(7007) << "\n current permissions=" << TQString::number(permissions,8)
+ << "\n wanted permission=" << TQString::number(m_permissions,8)
+ << "\n with mask=" << TQString::number(mask,8)
+ << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~mask,8)
+ << "\n bits we keep =" << TQString::number(permissions & ~mask,8)
+ << "\n new permissions = " << TQString::number(info.permissions,8)
<< endl;*/
// Prepend this info in our todo list.
// This way, the toplevel dirs are done last.
@@ -167,10 +167,10 @@ void ChmodJob::chmodNextFile()
// (permissions have to set after, in case of suid and sgid)
if ( info.url.isLocalFile() && ( m_newOwner != -1 || m_newGroup != -1 ) )
{
- QString path = info.url.path();
- if ( chown( QFile::encodeName(path), m_newOwner, m_newGroup ) != 0 )
+ TQString path = info.url.path();
+ if ( chown( TQFile::encodeName(path), m_newOwner, m_newGroup ) != 0 )
{
- int answer = KMessageBox::warningContinueCancel( 0, i18n( "<qt>Could not modify the ownership of file <b>%1</b>. You have insufficient access to the file to perform the change.</qt>" ).arg(path), QString::null, i18n("&Skip File") );
+ int answer = KMessageBox::warningContinueCancel( 0, i18n( "<qt>Could not modify the ownership of file <b>%1</b>. You have insufficient access to the file to perform the change.</qt>" ).arg(path), TQString::null, i18n("&Skip File") );
if (answer == KMessageBox::Cancel)
{
m_error = ERR_USER_CANCELED;
@@ -181,11 +181,11 @@ void ChmodJob::chmodNextFile()
}
kdDebug(7007) << "ChmodJob::chmodNextFile chmod'ing " << info.url.prettyURL()
- << " to " << QString::number(info.permissions,8) << endl;
+ << " to " << TQString::number(info.permissions,8) << endl;
KIO::SimpleJob * job = KIO::chmod( info.url, info.permissions );
// copy the metadata for acl and default acl
- const QString aclString = queryMetaData( "ACL_STRING" );
- const QString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" );
+ const TQString aclString = queryMetaData( "ACL_STRING" );
+ const TQString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" );
if ( !aclString.isEmpty() )
job->addMetaData( "ACL_STRING", aclString );
if ( !defaultAclString.isEmpty() )
@@ -226,15 +226,15 @@ void ChmodJob::slotResult( KIO::Job * job )
}
}
-// antlarr: KDE 4: Make owner and group be const QString &
+// antlarr: KDE 4: Make owner and group be const TQString &
KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, int mask,
- QString owner, QString group,
+ TQString owner, TQString group,
bool recursive, bool showProgressInfo )
{
uid_t newOwnerID = (uid_t)-1; // chown(2) : -1 means no change
if ( !owner.isEmpty() )
{
- struct passwd* pw = getpwnam(QFile::encodeName(owner));
+ struct passwd* pw = getpwnam(TQFile::encodeName(owner));
if ( pw == 0L )
kdError(250) << " ERROR: No user " << owner << endl;
else
@@ -243,7 +243,7 @@ KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions,
gid_t newGroupID = (gid_t)-1; // chown(2) : -1 means no change
if ( !group.isEmpty() )
{
- struct group* g = getgrnam(QFile::encodeName(group));
+ struct group* g = getgrnam(TQFile::encodeName(group));
if ( g == 0L )
kdError(250) << " ERROR: No group " << group << endl;
else
diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h
index 4b5d6f85e..fdb873b17 100644
--- a/kio/kio/chmodjob.h
+++ b/kio/kio/chmodjob.h
@@ -22,7 +22,7 @@
#define __kio_chmodjob_h__
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -68,7 +68,7 @@ namespace KIO {
int m_newGroup;
bool m_recursive;
KFileItemList m_lstItems;
- QValueList<ChmodInfo> m_infos;
+ TQValueList<ChmodInfo> m_infos;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -101,7 +101,7 @@ namespace KIO {
* @return The job handling the operation.
*/
KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask,
- QString newOwner, QString newGroup,
+ TQString newOwner, TQString newGroup,
bool recursive, bool showProgressInfo = true );
}
diff --git a/kio/kio/connection.cpp b/kio/kio/connection.cpp
index f8b2e69ed..b2a84a798 100644
--- a/kio/kio/connection.cpp
+++ b/kio/kio/connection.cpp
@@ -24,7 +24,7 @@
#include <kde_file.h>
#include <ksock.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <sys/types.h>
#include <sys/signal.h>
@@ -41,7 +41,7 @@
#include "kio/connection.h"
#include <kdebug.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
using namespace KIO;
@@ -95,7 +95,7 @@ void Connection::close()
tasks.clear();
}
-void Connection::send(int cmd, const QByteArray& data)
+void Connection::send(int cmd, const TQByteArray& data)
{
if (!inited() || tasks.count() > 0) {
Task *task = new Task();
@@ -132,11 +132,11 @@ void Connection::init(KSocket *sock)
f_out = KDE_fdopen( socket->socket(), "wb" );
#endif
if (receiver && ( fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended ) {
suspend();
}
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
dequeue();
}
@@ -148,31 +148,31 @@ void Connection::init(int _fd_in, int fd_out)
fd_in = _fd_in;
f_out = KDE_fdopen( fd_out, "wb" );
if (receiver && ( fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended ) {
suspend();
}
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
dequeue();
}
-void Connection::connect(QObject *_receiver, const char *_member)
+void Connection::connect(TQObject *_receiver, const char *_member)
{
receiver = _receiver;
member = _member;
delete notifier;
notifier = 0;
if (receiver && (fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended )
suspend();
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
}
-bool Connection::sendnow( int _cmd, const QByteArray &data )
+bool Connection::sendnow( int _cmd, const TQByteArray &data )
{
if (f_out == 0) {
return false;
@@ -206,7 +206,7 @@ bool Connection::sendnow( int _cmd, const QByteArray &data )
return true;
}
-int Connection::read( int* _cmd, QByteArray &data )
+int Connection::read( int* _cmd, TQByteArray &data )
{
if (fd_in == -1 ) {
kdError(7017) << "read: not yet inited" << endl;
diff --git a/kio/kio/connection.h b/kio/kio/connection.h
index 140a7cc28..2adc6e018 100644
--- a/kio/kio/connection.h
+++ b/kio/kio/connection.h
@@ -27,8 +27,8 @@
#include <sys/types.h>
#include <stdio.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
class KSocket;
class QSocketNotifier;
@@ -37,7 +37,7 @@ namespace KIO {
struct KIO_EXPORT Task {
int cmd;
- QByteArray data;
+ TQByteArray data;
};
/**
@@ -71,7 +71,7 @@ namespace KIO {
* @see inited()
*/
void init(int fd_in, int fd_out); // Used by KDENOX
- void connect(QObject *receiver = 0, const char *member = 0);
+ void connect(TQObject *receiver = 0, const char *member = 0);
/// Closes the connection.
void close();
@@ -98,7 +98,7 @@ namespace KIO {
* @param cmd the command to set
* @param arr the bytes to send
*/
- void send(int cmd, const QByteArray &arr = QByteArray());
+ void send(int cmd, const TQByteArray &arr = TQByteArray());
/**
* Sends the given command immediately.
@@ -106,7 +106,7 @@ namespace KIO {
* @param data the bytes to send
* @return true if successful, false otherwise
*/
- bool sendnow( int _cmd, const QByteArray &data );
+ bool sendnow( int _cmd, const TQByteArray &data );
/**
* Receive data.
@@ -116,7 +116,7 @@ namespace KIO {
* @return >=0 indicates the received data size upon success
* -1 indicates error
*/
- int read( int* _cmd, QByteArray &data );
+ int read( int* _cmd, TQByteArray &data );
/**
* Don't handle incoming data until resumed.
@@ -144,10 +144,10 @@ namespace KIO {
int fd_in;
FILE *f_out;
KSocket *socket;
- QSocketNotifier *notifier;
- QObject *receiver;
+ TQSocketNotifier *notifier;
+ TQObject *receiver;
const char *member;
- QPtrList<Task> tasks;
+ TQPtrList<Task> tasks;
bool m_suspended;
private:
class ConnectionPrivate* d;
diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp
index 86ebe23cf..161c82296 100644
--- a/kio/kio/dataprotocol.cpp
+++ b/kio/kio/dataprotocol.cpp
@@ -23,10 +23,10 @@
#include <kurl.h>
#include <kio/global.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#ifdef DATAKIOSLAVE
# include <kinstance.h>
@@ -67,22 +67,22 @@ extern "C" {
/** structure containing header information */
struct DataHeader {
- QString mime_type; // mime type of content (lowercase)
+ TQString mime_type; // mime type of content (lowercase)
MetaData attributes; // attribute/value pairs (attribute lowercase,
// value unchanged)
bool is_base64; // true if data is base64 encoded
- QString url; // reference to decoded url
+ TQString url; // reference to decoded url
int data_offset; // zero-indexed position within url
// where the real data begins. May point beyond
// the end to indicate that there is no data
- QString *charset; // shortcut to charset (it always exists)
+ TQString *charset; // shortcut to charset (it always exists)
};
// constant string data
-const QChar text_plain_str[] = { 't','e','x','t','/','p','l','a','i','n' };
-const QChar charset_str[] = { 'c','h','a','r','s','e','t' };
-const QChar us_ascii_str[] = { 'u','s','-','a','s','c','i','i' };
-const QChar base64_str[] = { 'b','a','s','e','6','4' };
+const TQChar text_plain_str[] = { 't','e','x','t','/','p','l','a','i','n' };
+const TQChar charset_str[] = { 'c','h','a','r','s','e','t' };
+const TQChar us_ascii_str[] = { 'u','s','-','a','s','c','i','i' };
+const TQChar base64_str[] = { 'b','a','s','e','6','4' };
/** returns the position of the first occurrence of any of the given characters
* @p c1 to @p c3 or buf.length() if none is contained.
@@ -92,12 +92,12 @@ const QChar base64_str[] = { 'b','a','s','e','6','4' };
* @param c2 alternative character to find or '\0' to ignore
* @param c3 alternative character to find or '\0' to ignore
*/
-static int find(const QString &buf, int begin, QChar c1, QChar c2 = '\0',
- QChar c3 = '\0') {
+static int find(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0',
+ TQChar c3 = '\0') {
int pos = begin;
int size = (int)buf.length();
while (pos < size) {
- QChar ch = buf[pos];
+ TQChar ch = buf[pos];
if (ch == c1
|| (c2 != '\0' && ch == c2)
|| (c3 != '\0' && ch == c3))
@@ -117,11 +117,11 @@ static int find(const QString &buf, int begin, QChar c1, QChar c2 = '\0',
* @param c2 alternative character to find or 0 to ignore
* @param c3 alternative character to find or 0 to ignore
*/
-inline QString extract(const QString &buf, int &pos, QChar c1,
- QChar c2 = '\0', QChar c3 = '\0') {
+inline TQString extract(const TQString &buf, int &pos, TQChar c1,
+ TQChar c2 = '\0', TQChar c3 = '\0') {
int oldpos = pos;
pos = find(buf,oldpos,c1,c2,c3);
- return QString(buf.unicode() + oldpos, pos - oldpos);
+ return TQString(buf.unicode() + oldpos, pos - oldpos);
}
/** ignores all whitespaces
@@ -130,9 +130,9 @@ inline QString extract(const QString &buf, int &pos, QChar c1,
* Upon return @p pos will either point to the first non-whitespace
* character or to the end of the buffer.
*/
-inline void ignoreWS(const QString &buf, int &pos) {
+inline void ignoreWS(const TQString &buf, int &pos) {
int size = (int)buf.length();
- QChar ch = buf[pos];
+ TQChar ch = buf[pos];
while (pos < size && (ch == ' ' || ch == '\t' || ch == '\n'
|| ch == '\r'))
ch = buf[++pos];
@@ -146,14 +146,14 @@ inline void ignoreWS(const QString &buf, int &pos) {
* @return the extracted string. @p pos will be updated to point to the
* character following the trailing quote.
*/
-static QString parseQuotedString(const QString &buf, int &pos) {
+static TQString parseQuotedString(const TQString &buf, int &pos) {
int size = (int)buf.length();
- QString res;
+ TQString res;
pos++; // jump over leading quote
bool escaped = false; // if true means next character is literal
bool parsing = true; // true as long as end quote not found
while (parsing && pos < size) {
- QChar ch = buf[pos++];
+ TQChar ch = buf[pos++];
if (escaped) {
res += ch;
escaped = false;
@@ -174,10 +174,10 @@ static QString parseQuotedString(const QString &buf, int &pos) {
* information
*/
static void parseDataHeader(const KURL &url, DataHeader &header_info) {
- QConstString text_plain(text_plain_str,sizeof text_plain_str/sizeof text_plain_str[0]);
- QConstString charset(charset_str,sizeof charset_str/sizeof charset_str[0]);
- QConstString us_ascii(us_ascii_str,sizeof us_ascii_str/sizeof us_ascii_str[0]);
- QConstString base64(base64_str,sizeof base64_str/sizeof base64_str[0]);
+ TQConstString text_plain(text_plain_str,sizeof text_plain_str/sizeof text_plain_str[0]);
+ TQConstString charset(charset_str,sizeof charset_str/sizeof charset_str[0]);
+ TQConstString us_ascii(us_ascii_str,sizeof us_ascii_str/sizeof us_ascii_str[0]);
+ TQConstString base64(base64_str,sizeof base64_str/sizeof base64_str[0]);
// initialize header info members
header_info.mime_type = text_plain.string();
header_info.charset = &header_info.attributes.insert(
@@ -186,7 +186,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
header_info.is_base64 = false;
// decode url and save it
- QString &raw_url = header_info.url = QString::fromLatin1("data:") + url.path();
+ TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path();
int raw_url_len = (int)raw_url.length();
// jump over scheme part (must be "data:", we don't even check that)
@@ -195,7 +195,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
// read mime type
if (header_info.data_offset >= raw_url_len) return;
- QString mime_type = extract(raw_url,header_info.data_offset,';',',')
+ TQString mime_type = extract(raw_url,header_info.data_offset,';',',')
.stripWhiteSpace();
if (!mime_type.isEmpty()) header_info.mime_type = mime_type;
@@ -207,7 +207,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
bool data_begin_reached = false;
while (!data_begin_reached && header_info.data_offset < raw_url_len) {
// read attribute
- QString attribute = extract(raw_url,header_info.data_offset,'=',';',',')
+ TQString attribute = extract(raw_url,header_info.data_offset,'=',';',',')
.stripWhiteSpace();
if (header_info.data_offset >= raw_url_len
|| raw_url[header_info.data_offset] != '=') {
@@ -221,7 +221,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
ignoreWS(raw_url,header_info.data_offset);
if (header_info.data_offset >= raw_url_len) return;
- QString value;
+ TQString value;
if (raw_url[header_info.data_offset] == '"') {
value = parseQuotedString(raw_url,header_info.data_offset);
ignoreWS(raw_url,header_info.data_offset);
@@ -241,7 +241,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
}
#ifdef DATAKIOSLAVE
-DataProtocol::DataProtocol(const QCString &pool_socket, const QCString &app_socket)
+DataProtocol::DataProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("kio_data", pool_socket, app_socket) {
#else
DataProtocol::DataProtocol() {
@@ -268,8 +268,8 @@ void DataProtocol::get(const KURL& url) {
int size = (int)hdr.url.length();
int data_ofs = QMIN(hdr.data_offset,size);
// FIXME: string is copied, would be nice if we could have a reference only
- QString url_data = hdr.url.mid(data_ofs);
- QCString outData;
+ TQString url_data = hdr.url.mid(data_ofs);
+ TQCString outData;
#ifdef TESTKIO
// cout << "current charset: \"" << *hdr.charset << "\"" << endl;
@@ -281,7 +281,7 @@ void DataProtocol::get(const KURL& url) {
} else {
// FIXME: This is all flawed, must be reworked thoroughly
// non encoded data must be converted to the given charset
- QTextCodec *codec = QTextCodec::codecForName(hdr.charset->latin1());
+ TQTextCodec *codec = TQTextCodec::codecForName(hdr.charset->latin1());
if (codec != 0) {
outData = codec->fromUnicode(url_data);
} else {
@@ -317,7 +317,7 @@ void DataProtocol::get(const KURL& url) {
// empiric studies have shown that this shouldn't be queued & dispatched
/*DISPATCH*/(data(outData));
// kdDebug() << "(2) queue size " << dispatchQueue.size() << endl;
- DISPATCH(data(QByteArray()));
+ DISPATCH(data(TQByteArray()));
// kdDebug() << "(3) queue size " << dispatchQueue.size() << endl;
DISPATCH(finished());
// kdDebug() << "(4) queue size " << dispatchQueue.size() << endl;
diff --git a/kio/kio/dataprotocol.h b/kio/kio/dataprotocol.h
index b59e36c5b..d33a86a32 100644
--- a/kio/kio/dataprotocol.h
+++ b/kio/kio/dataprotocol.h
@@ -53,7 +53,7 @@ class DataProtocol : public DataSlave {
public:
#if defined(DATAKIOSLAVE)
- DataProtocol(const QCString &pool_socket, const QCString &app_socket);
+ DataProtocol(const TQCString &pool_socket, const TQCString &app_socket);
#else
DataProtocol();
#endif
diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp
index 5b81d3d2f..d16ecc0d4 100644
--- a/kio/kio/dataslave.cpp
+++ b/kio/kio/dataslave.cpp
@@ -26,7 +26,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIO;
@@ -57,12 +57,12 @@ using namespace KIO;
DataSlave::DataSlave() :
- Slave(true, 0, "data", QString::null)
+ Slave(true, 0, "data", TQString::null)
{
//kdDebug() << this << k_funcinfo << endl;
_suspended = false;
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(dispatchNext()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(dispatchNext()));
}
DataSlave::~DataSlave() {
@@ -115,8 +115,8 @@ void DataSlave::dispatchNext() {
dispatchQueue.pop_front();
}
-void DataSlave::send(int cmd, const QByteArray &arr) {
- QDataStream stream(arr, IO_ReadOnly);
+void DataSlave::send(int cmd, const TQByteArray &arr) {
+ TQDataStream stream(arr, IO_ReadOnly);
KURL url;
@@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const QByteArray &arr) {
break;
default:
error(ERR_UNSUPPORTED_ACTION,
- unsupportedActionErrorString(QString::fromLatin1("data"),cmd));
+ unsupportedActionErrorString(TQString::fromLatin1("data"),cmd));
}/*end switch*/
}
@@ -145,16 +145,16 @@ bool DataSlave::suspended() {
return _suspended;
}
-void DataSlave::setHost(const QString &/*host*/, int /*port*/,
- const QString &/*user*/, const QString &/*passwd*/) {
+void DataSlave::setHost(const TQString &/*host*/, int /*port*/,
+ const TQString &/*user*/, const TQString &/*passwd*/) {
// irrelevant -> will be ignored
}
void DataSlave::setConfig(const MetaData &/*config*/) {
// FIXME: decide to handle this directly or not at all
#if 0
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << config;
slaveconn.send( CMD_CONFIG, data );
#endif
@@ -202,10 +202,10 @@ void DataSlave::virtual_hook( int id, void* data ) {
}
}
-DISPATCH_IMPL1(mimeType, const QString &, s)
+DISPATCH_IMPL1(mimeType, const TQString &, s)
DISPATCH_IMPL1(totalSize, KIO::filesize_t, size)
DISPATCH_IMPL(sendMetaData)
-DISPATCH_IMPL1(data, const QByteArray &, ba)
+DISPATCH_IMPL1(data, const TQByteArray &, ba)
#undef DISPATCH_IMPL
#undef DISPATCH_IMPL1
diff --git a/kio/kio/dataslave.h b/kio/kio/dataslave.h
index 7ca24610c..1c6ebfad5 100644
--- a/kio/kio/dataslave.h
+++ b/kio/kio/dataslave.h
@@ -53,14 +53,14 @@ namespace KIO {
virtual ~DataSlave();
- virtual void setHost(const QString &host, int port,
- const QString &user, const QString &passwd);
+ virtual void setHost(const TQString &host, int port,
+ const TQString &user, const TQString &passwd);
virtual void setConfig(const MetaData &config);
virtual void suspend();
virtual void resume();
virtual bool suspended();
- virtual void send(int cmd, const QByteArray &data = QByteArray());
+ virtual void send(int cmd, const TQByteArray &data = TQByteArray());
virtual void hold(const KURL &url);
@@ -89,20 +89,20 @@ namespace KIO {
*/
struct QueueStruct {
QueueType type;
- QString s;
+ TQString s;
KIO::filesize_t size;
- QByteArray ba;
+ TQByteArray ba;
QueueStruct() {}
QueueStruct(QueueType type) : type(type) {}
};
- typedef QValueList<QueueStruct> DispatchQueue;
+ typedef TQValueList<QueueStruct> DispatchQueue;
DispatchQueue dispatchQueue;
- DISPATCH_DECL1(mimeType, const QString &, s)
+ DISPATCH_DECL1(mimeType, const TQString &, s)
DISPATCH_DECL1(totalSize, KIO::filesize_t, size)
DISPATCH_DECL(sendMetaData)
- DISPATCH_DECL1(data, const QByteArray &, ba)
+ DISPATCH_DECL1(data, const TQByteArray &, ba)
DISPATCH_DECL(finished)
protected slots:
@@ -115,7 +115,7 @@ namespace KIO {
private:
MetaData meta_data;
bool _suspended;
- QTimer *timer;
+ TQTimer *timer;
};
}
diff --git a/kio/kio/davjob.cpp b/kio/kio/davjob.cpp
index 57f00045c..1f3b208a6 100644
--- a/kio/kio/davjob.cpp
+++ b/kio/kio/davjob.cpp
@@ -20,12 +20,12 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdom.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -38,24 +38,24 @@
#include <kio/job.h>
#include <kio/slaveinterface.h>
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
using namespace KIO;
class DavJob::DavJobPrivate
{
public:
- QByteArray savedStaticData;
- QByteArray str_response; // replaces the QString previously used in DavJob itself
+ TQByteArray savedStaticData;
+ TQByteArray str_response; // replaces the TQString previously used in DavJob itself
};
-DavJob::DavJob( const KURL& url, int method, const QString& request, bool showProgressInfo )
- : TransferJob( url, KIO::CMD_SPECIAL, QByteArray(), QByteArray(), showProgressInfo )
+DavJob::DavJob( const KURL& url, int method, const TQString& request, bool showProgressInfo )
+ : TransferJob( url, KIO::CMD_SPECIAL, TQByteArray(), TQByteArray(), showProgressInfo )
{
d = new DavJobPrivate;
// We couldn't set the args when calling the parent constructor,
// so do it now.
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << (int) 7 << url << method;
// Same for static data
if ( ! request.isEmpty() && ! request.isNull() ) {
@@ -65,7 +65,7 @@ DavJob::DavJob( const KURL& url, int method, const QString& request, bool showPr
}
}
-void DavJob::slotData( const QByteArray& data )
+void DavJob::slotData( const TQByteArray& data )
{
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error) {
unsigned int oldSize = d->str_response.size();
@@ -79,7 +79,7 @@ void DavJob::slotFinished()
// kdDebug(7113) << "DavJob::slotFinished()" << endl;
// kdDebug(7113) << d->str_response << endl;
if (!m_redirectionURL.isEmpty() && m_redirectionURL.isValid() && (m_command == CMD_SPECIAL)) {
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
int s_cmd, s_method;
KURL s_url;
istream >> s_cmd;
@@ -88,16 +88,16 @@ void DavJob::slotFinished()
// PROPFIND
if ( (s_cmd == 7) && (s_method == (int)KIO::DAV_PROPFIND) ) {
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << (int)7 << m_redirectionURL << (int)KIO::DAV_PROPFIND;
}
} else if ( ! m_response.setContent( d->str_response, true ) ) {
// An error occurred parsing the XML response
- QDomElement root = m_response.createElementNS( "DAV:", "error-report" );
+ TQDomElement root = m_response.createElementNS( "DAV:", "error-report" );
m_response.appendChild( root );
- QDomElement el = m_response.createElementNS( "DAV:", "offending-response" );
- QDomText textnode = m_response.createTextNode( d->str_response );
+ TQDomElement el = m_response.createElementNS( "DAV:", "offending-response" );
+ TQDomText textnode = m_response.createTextNode( d->str_response );
el.appendChild( textnode );
root.appendChild( el );
delete d; // Should be in virtual destructor
@@ -113,8 +113,8 @@ void DavJob::slotFinished()
/* Convenience methods */
-// KDE 4: Make it const QString &
-DavJob* KIO::davPropFind( const KURL& url, const QDomDocument& properties, QString depth, bool showProgressInfo )
+// KDE 4: Make it const TQString &
+DavJob* KIO::davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo )
{
DavJob *job = new DavJob( url, (int) KIO::DAV_PROPFIND, properties.toString(), showProgressInfo );
job->addMetaData( "davDepth", depth );
@@ -122,17 +122,17 @@ DavJob* KIO::davPropFind( const KURL& url, const QDomDocument& properties, QStri
}
-DavJob* KIO::davPropPatch( const KURL& url, const QDomDocument& properties, bool showProgressInfo )
+DavJob* KIO::davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo )
{
return new DavJob( url, (int) KIO::DAV_PROPPATCH, properties.toString(), showProgressInfo );
}
-DavJob* KIO::davSearch( const KURL& url, const QString& nsURI, const QString& qName, const QString& query, bool showProgressInfo )
+DavJob* KIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo )
{
- QDomDocument doc;
- QDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" );
- QDomElement searchelement = doc.createElementNS( nsURI, qName );
- QDomText text = doc.createTextNode( query );
+ TQDomDocument doc;
+ TQDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" );
+ TQDomElement searchelement = doc.createElementNS( nsURI, qName );
+ TQDomText text = doc.createTextNode( query );
searchelement.appendChild( text );
searchrequest.appendChild( searchelement );
doc.appendChild( searchrequest );
diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h
index 400ca9f8e..b6a951190 100644
--- a/kio/kio/davjob.h
+++ b/kio/kio/davjob.h
@@ -23,12 +23,12 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdom.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -63,16 +63,16 @@ namespace KIO {
* KIO::davSearch() to create a new DavJob.
*/
DavJob(const KURL& url, int method,
- const QString& request, bool showProgressInfo);
+ const TQString& request, bool showProgressInfo);
/**
- * Returns the response as a QDomDocument.
+ * Returns the response as a TQDomDocument.
* @return the response document
*/
- QDomDocument& response() { return m_response; }
+ TQDomDocument& response() { return m_response; }
protected slots:
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
+ virtual void slotData( const TQByteArray &data);
protected:
bool m_suspended;
@@ -80,8 +80,8 @@ namespace KIO {
private:
class DavJobPrivate;
DavJobPrivate *d;
- QString dummy; // kept around for BC reasons
- QDomDocument m_response;
+ TQString dummy; // kept around for BC reasons
+ TQDomDocument m_response;
};
/**
@@ -95,7 +95,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropFind( const KURL& url, const QDomDocument& properties, QString depth, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo=true );
/**
* Creates a new DavJob that issues a PROPPATCH command. PROPPATCH sets
@@ -107,7 +107,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropPatch( const KURL& url, const QDomDocument& properties, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo=true );
/**
* Creates a new DavJob that issues a SEARCH command.
@@ -119,7 +119,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davSearch( const KURL &url, const QString& nsURI, const QString& qName, const QString& query, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davSearch( const KURL &url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo=true );
}
diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp
index 7073da04f..8293901ae 100644
--- a/kio/kio/defaultprogress.cpp
+++ b/kio/kio/defaultprogress.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -52,9 +52,9 @@ public:
KPushButton *cancelClose;
KPushButton *openFile;
KPushButton *openLocation;
- QCheckBox *keepOpen;
+ TQCheckBox *keepOpen;
KURL location;
- QTime startTime;
+ TQTime startTime;
};
DefaultProgress::DefaultProgress( bool showNow )
@@ -69,7 +69,7 @@ DefaultProgress::DefaultProgress( bool showNow )
}
}
-DefaultProgress::DefaultProgress( QWidget* parent, const char* /*name*/ )
+DefaultProgress::DefaultProgress( TQWidget* parent, const char* /*name*/ )
: ProgressBase( parent ),
m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0),
m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0)
@@ -93,22 +93,22 @@ void DefaultProgress::init()
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) );
#endif
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
topLayout->addStrut( 360 ); // makes dlg at least that wide
- QGridLayout *grid = new QGridLayout( 2, 3 );
+ TQGridLayout *grid = new TQGridLayout( 2, 3 );
topLayout->addLayout(grid);
grid->addColSpacing(1, KDialog::spacingHint());
// filenames or action name
- grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0);
+ grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0);
sourceEdit = new KLineEdit(this);
sourceEdit->setReadOnly(true);
sourceEdit->setEnableSqueezedText(true);
grid->addWidget(sourceEdit, 0, 2);
- destInvite = new QLabel(i18n("Destination:"), this);
+ destInvite = new TQLabel(i18n("Destination:"), this);
grid->addWidget(destInvite, 1, 0);
destEdit = new KLineEdit(this);
@@ -120,55 +120,55 @@ void DefaultProgress::init()
topLayout->addWidget( m_pProgressBar );
// processed info
- QHBoxLayout *hBox = new QHBoxLayout();
+ TQHBoxLayout *hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- sizeLabel = new QLabel(this);
+ sizeLabel = new TQLabel(this);
hBox->addWidget(sizeLabel);
- resumeLabel = new QLabel(this);
+ resumeLabel = new TQLabel(this);
hBox->addWidget(resumeLabel);
- progressLabel = new QLabel( this );
-/* progressLabel->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Preferred ) );*/
- progressLabel->setAlignment( QLabel::AlignRight );
+ progressLabel = new TQLabel( this );
+/* progressLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Preferred ) );*/
+ progressLabel->setAlignment( TQLabel::AlignRight );
hBox->addWidget( progressLabel );
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- speedLabel = new QLabel(this);
+ speedLabel = new TQLabel(this);
hBox->addWidget(speedLabel, 1);
- QFrame *line = new QFrame( this );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame *line = new TQFrame( this );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
topLayout->addWidget( line );
- d->keepOpen = new QCheckBox( i18n("&Keep this window open after transfer is complete"), this);
- connect( d->keepOpen, SIGNAL( toggled(bool) ), SLOT( slotKeepOpenToggled(bool) ) );
+ d->keepOpen = new TQCheckBox( i18n("&Keep this window open after transfer is complete"), this);
+ connect( d->keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) );
topLayout->addWidget(d->keepOpen);
d->keepOpen->hide();
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
d->openFile = new KPushButton( i18n("Open &File"), this );
- connect( d->openFile, SIGNAL( clicked() ), SLOT( slotOpenFile() ) );
+ connect( d->openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) );
hBox->addWidget( d->openFile );
d->openFile->setEnabled(false);
d->openFile->hide();
d->openLocation = new KPushButton( i18n("Open &Destination"), this );
- connect( d->openLocation, SIGNAL( clicked() ), SLOT( slotOpenLocation() ) );
+ connect( d->openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) );
hBox->addWidget( d->openLocation );
d->openLocation->hide();
hBox->addStretch(1);
d->cancelClose = new KPushButton( KStdGuiItem::cancel(), this );
- connect( d->cancelClose, SIGNAL( clicked() ), SLOT( slotStop() ) );
+ connect( d->cancelClose, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStop() ) );
hBox->addWidget( d->cancelClose );
resize( sizeHint() );
@@ -219,7 +219,7 @@ void DefaultProgress::showTotals()
// of CopyJob takes a long time (e.g. over networks).
if ( m_iProcessedFiles == 0 && m_iProcessedDirs == 0 )
{
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 )
// that we have a singular to translate looks weired but is only logical
// xgettext: no-c-format
@@ -231,12 +231,12 @@ void DefaultProgress::showTotals()
}
//static
-QString DefaultProgress::makePercentString( unsigned long percent,
+TQString DefaultProgress::makePercentString( unsigned long percent,
KIO::filesize_t totalSize,
unsigned long totalFiles )
{
if ( totalSize )
- return i18n( "%1 % of %2 " ).arg( QString::number(percent) , KIO::convertSize( totalSize ) );
+ return i18n( "%1 % of %2 " ).arg( TQString::number(percent) , KIO::convertSize( totalSize ) );
else if ( totalFiles )
return i18n( "%1 % of 1 file", "%1 % of %n files", totalFiles ).arg( percent );
else
@@ -245,7 +245,7 @@ QString DefaultProgress::makePercentString( unsigned long percent,
void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
{
- QString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles );
+ TQString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles );
m_pProgressBar->setValue( percent );
switch(mode) {
case Copy:
@@ -270,7 +270,7 @@ void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
}
-void DefaultProgress::slotInfoMessage( KIO::Job*, const QString & msg )
+void DefaultProgress::slotInfoMessage( KIO::Job*, const TQString & msg )
{
speedLabel->setText( msg );
speedLabel->setAlignment( speedLabel->alignment() & ~Qt::WordBreak );
@@ -282,7 +282,7 @@ void DefaultProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) {
return;
m_iProcessedSize = bytes;
- QString tmp = i18n( "%1 of %2 complete")
+ TQString tmp = i18n( "%1 of %2 complete")
.arg( KIO::convertSize(bytes) )
.arg( KIO::convertSize(m_iTotalSize));
sizeLabel->setText( tmp );
@@ -295,7 +295,7 @@ void DefaultProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs )
return;
m_iProcessedDirs = dirs;
- QString tmps;
+ TQString tmps;
tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs );
tmps += " ";
tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles );
@@ -309,7 +309,7 @@ void DefaultProgress::slotProcessedFiles( KIO::Job*, unsigned long files )
return;
m_iProcessedFiles = files;
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 ) {
tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs );
tmps += " ";
@@ -398,14 +398,14 @@ void DefaultProgress::slotStating( KIO::Job*, const KURL& url )
setDestVisible( false );
}
-void DefaultProgress::slotMounting( KIO::Job*, const QString & dev, const QString & point )
+void DefaultProgress::slotMounting( KIO::Job*, const TQString & dev, const TQString & point )
{
setCaption(i18n("Mounting %1").arg(dev));
sourceEdit->setText(point);
setDestVisible( false );
}
-void DefaultProgress::slotUnmounting( KIO::Job*, const QString & point )
+void DefaultProgress::slotUnmounting( KIO::Job*, const TQString & point )
{
setCaption(i18n("Unmounting"));
sourceEdit->setText(point);
@@ -424,7 +424,7 @@ void DefaultProgress::slotCanResume( KIO::Job*, KIO::filesize_t resume )
void DefaultProgress::setDestVisible( bool visible )
{
// We can't hide the destInvite/destEdit labels,
- // because it screws up the QGridLayout.
+ // because it screws up the TQGridLayout.
if (visible)
{
destInvite->show();
@@ -436,8 +436,8 @@ void DefaultProgress::setDestVisible( bool visible )
{
destInvite->hide();
destEdit->hide();
- destInvite->setText( QString::null );
- destEdit->setText( QString::null );
+ destInvite->setText( TQString::null );
+ destEdit->setText( TQString::null );
}
}
@@ -469,9 +469,9 @@ void DefaultProgress::slotKeepOpenToggled(bool keepopen)
void DefaultProgress::checkDestination(const KURL& dest) {
bool ok = true;
if ( dest.isLocalFile() ) {
- QString path = dest.path( -1 );
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
- for ( QStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
+ TQString path = dest.path( -1 );
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
if ( path.contains( *it ) )
ok = false; // it's in the tmp resource
}
diff --git a/kio/kio/defaultprogress.h b/kio/kio/defaultprogress.h
index 9f57622d7..8dca499bd 100644
--- a/kio/kio/defaultprogress.h
+++ b/kio/kio/defaultprogress.h
@@ -18,7 +18,7 @@
#ifndef __defaultprogress_h__
#define __defaultprogress_h__
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kio/global.h>
@@ -51,13 +51,13 @@ public:
* @param name the name of the dialog, can be 0
* @since 3.1
*/
- DefaultProgress( QWidget* parent, const char* name = 0 );
+ DefaultProgress( TQWidget* parent, const char* name = 0 );
~DefaultProgress();
bool keepOpen() const;
/// Shared with uiserver.cpp
- static QString makePercentString( unsigned long percent,
+ static TQString makePercentString( unsigned long percent,
KIO::filesize_t totalSize,
unsigned long totalFiles );
@@ -77,7 +77,7 @@ public slots:
* @param job the KIO::Job
* @param msg the message to set
*/
- virtual void slotInfoMessage( KIO::Job *job, const QString & msg );
+ virtual void slotInfoMessage( KIO::Job *job, const TQString & msg );
virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest );
virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest );
@@ -103,13 +103,13 @@ public slots:
* @param dev the device to mount
* @param point the mount point
*/
- virtual void slotMounting( KIO::Job* job, const QString & dev, const QString & point );
+ virtual void slotMounting( KIO::Job* job, const TQString & dev, const TQString & point );
/**
* Called when the job is unmounting.
* @param job the KIO::Job
* @param point the mount point
*/
- virtual void slotUnmounting( KIO::Job* job, const QString & point );
+ virtual void slotUnmounting( KIO::Job* job, const TQString & point );
virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from);
/**
@@ -128,11 +128,11 @@ protected:
KLineEdit* sourceEdit;
KLineEdit* destEdit;
- QLabel* progressLabel;
- QLabel* destInvite;
- QLabel* speedLabel;
- QLabel* sizeLabel;
- QLabel* resumeLabel;
+ TQLabel* progressLabel;
+ TQLabel* destInvite;
+ TQLabel* speedLabel;
+ TQLabel* sizeLabel;
+ TQLabel* resumeLabel;
KProgress* m_pProgressBar;
diff --git a/kio/kio/forwardingslavebase.cpp b/kio/kio/forwardingslavebase.cpp
index a1e505a87..5caa08465 100644
--- a/kio/kio/forwardingslavebase.cpp
+++ b/kio/kio/forwardingslavebase.cpp
@@ -22,8 +22,8 @@
#include <kmimetype.h>
#include <kprotocolinfo.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include "forwardingslavebase.h"
@@ -34,10 +34,10 @@ class ForwardingSlaveBasePrivate
{
};
-ForwardingSlaveBase::ForwardingSlaveBase(const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket)
- : QObject(), SlaveBase(protocol, poolSocket, appSocket)
+ForwardingSlaveBase::ForwardingSlaveBase(const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket)
+ : TQObject(), SlaveBase(protocol, poolSocket, appSocket)
{
}
@@ -70,7 +70,7 @@ void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry,
<< listing << endl;
bool url_found = false;
- QString name;
+ TQString name;
KURL url;
KIO::UDSEntry::iterator it = entry.begin();
@@ -217,7 +217,7 @@ void ForwardingSlaveBase::rename(const KURL &src, const KURL &dest,
}
}
-void ForwardingSlaveBase::symlink(const QString &target, const KURL &dest,
+void ForwardingSlaveBase::symlink(const TQString &target, const KURL &dest,
bool overwrite)
{
kdDebug() << "ForwardingSlaveBase::symlink: " << target << ", " << dest << endl;
@@ -302,45 +302,45 @@ void ForwardingSlaveBase::connectJob(KIO::Job *job)
kdDebug() << it.key() << " = " << it.data() << endl;
#endif
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotResult(KIO::Job *) ) );
- connect( job, SIGNAL( warning(KIO::Job *, const QString &) ),
- this, SLOT( slotWarning(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( infoMessage(KIO::Job *, const QString &) ),
- this, SLOT( slotInfoMessage(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( totalSize(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotTotalSize(KIO::Job *, KIO::filesize_t) ) );
- connect( job, SIGNAL( processedSize(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotProcessedSize(KIO::Job *, KIO::filesize_t) ) );
- connect( job, SIGNAL( speed(KIO::Job *, unsigned long) ),
- this, SLOT( slotSpeed(KIO::Job *, unsigned long) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( warning(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotWarning(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( infoMessage(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotInfoMessage(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( totalSize(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotTotalSize(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( processedSize(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotProcessedSize(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( speed(KIO::Job *, unsigned long) ),
+ this, TQT_SLOT( slotSpeed(KIO::Job *, unsigned long) ) );
}
void ForwardingSlaveBase::connectSimpleJob(KIO::SimpleJob *job)
{
connectJob(job);
- connect( job, SIGNAL( redirection(KIO::Job *, const KURL &) ),
- this, SLOT( slotRedirection(KIO::Job *, const KURL &) ) );
+ connect( job, TQT_SIGNAL( redirection(KIO::Job *, const KURL &) ),
+ this, TQT_SLOT( slotRedirection(KIO::Job *, const KURL &) ) );
}
void ForwardingSlaveBase::connectListJob(KIO::ListJob *job)
{
connectSimpleJob(job);
- connect( job, SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList &) ),
- this, SLOT( slotEntries(KIO::Job *, const KIO::UDSEntryList &) ) );
+ connect( job, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList &) ),
+ this, TQT_SLOT( slotEntries(KIO::Job *, const KIO::UDSEntryList &) ) );
}
void ForwardingSlaveBase::connectTransferJob(KIO::TransferJob *job)
{
connectSimpleJob(job);
- connect( job, SIGNAL( data(KIO::Job *, const QByteArray &) ),
- this, SLOT( slotData(KIO::Job *, const QByteArray &) ) );
- connect( job, SIGNAL( dataReq(KIO::Job *, QByteArray &) ),
- this, SLOT( slotDataReq(KIO::Job *, QByteArray &) ) );
- connect( job, SIGNAL( mimetype(KIO::Job *, const QString &) ),
- this, SLOT( slotMimetype(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( canResume(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotCanResume(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( data(KIO::Job *, const TQByteArray &) ),
+ this, TQT_SLOT( slotData(KIO::Job *, const TQByteArray &) ) );
+ connect( job, TQT_SIGNAL( dataReq(KIO::Job *, TQByteArray &) ),
+ this, TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray &) ) );
+ connect( job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( canResume(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t) ) );
}
//////////////////////////////////////////////////////////////////////////////
@@ -366,12 +366,12 @@ void ForwardingSlaveBase::slotResult(KIO::Job *job)
qApp->eventLoop()->exitLoop();
}
-void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const QString &msg)
+void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const TQString &msg)
{
warning(msg);
}
-void ForwardingSlaveBase::slotInfoMessage(KIO::Job* /*job*/, const QString &msg)
+void ForwardingSlaveBase::slotInfoMessage(KIO::Job* /*job*/, const TQString &msg)
{
infoMessage(msg);
}
@@ -418,18 +418,18 @@ void ForwardingSlaveBase::slotEntries(KIO::Job* /*job*/,
listEntries( final_entries );
}
-void ForwardingSlaveBase::slotData(KIO::Job* /*job*/, const QByteArray &d)
+void ForwardingSlaveBase::slotData(KIO::Job* /*job*/, const TQByteArray &d)
{
data(d);
}
-void ForwardingSlaveBase::slotDataReq(KIO::Job* /*job*/, QByteArray &data)
+void ForwardingSlaveBase::slotDataReq(KIO::Job* /*job*/, TQByteArray &data)
{
dataReq();
readData(data);
}
-void ForwardingSlaveBase::slotMimetype (KIO::Job* /*job*/, const QString &type)
+void ForwardingSlaveBase::slotMimetype (KIO::Job* /*job*/, const TQString &type)
{
mimeType(type);
}
diff --git a/kio/kio/forwardingslavebase.h b/kio/kio/forwardingslavebase.h
index ff7003463..a536a9f02 100644
--- a/kio/kio/forwardingslavebase.h
+++ b/kio/kio/forwardingslavebase.h
@@ -23,7 +23,7 @@
#include <kio/slavebase.h>
#include <kio/jobclasses.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -85,13 +85,13 @@ class ForwardingSlaveBasePrivate;
* @since 3.4
* @author Kevin Ottens <ervin@ipsquad.net>
*/
-class KIO_EXPORT ForwardingSlaveBase : public QObject, public SlaveBase
+class KIO_EXPORT ForwardingSlaveBase : public TQObject, public SlaveBase
{
Q_OBJECT
public:
- ForwardingSlaveBase(const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket);
+ ForwardingSlaveBase(const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket);
virtual ~ForwardingSlaveBase();
virtual void get(const KURL &url);
@@ -109,7 +109,7 @@ public:
virtual void rename(const KURL &src, const KURL &dest, bool overwrite);
- virtual void symlink(const QString &target, const KURL &dest,
+ virtual void symlink(const TQString &target, const KURL &dest,
bool overwrite);
virtual void chmod(const KURL &url, int permissions);
@@ -174,8 +174,8 @@ private:
private slots:
// KIO::Job
void slotResult(KIO::Job *job);
- void slotWarning(KIO::Job *job, const QString &msg);
- void slotInfoMessage(KIO::Job *job, const QString &msg);
+ void slotWarning(KIO::Job *job, const TQString &msg);
+ void slotInfoMessage(KIO::Job *job, const TQString &msg);
void slotTotalSize(KIO::Job *job, KIO::filesize_t size);
void slotProcessedSize(KIO::Job *job, KIO::filesize_t size);
void slotSpeed(KIO::Job *job, unsigned long bytesPerSecond);
@@ -187,9 +187,9 @@ private slots:
void slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries);
// KIO::TransferJob
- void slotData(KIO::Job *job, const QByteArray &data);
- void slotDataReq(KIO::Job *job, QByteArray &data);
- void slotMimetype (KIO::Job *job, const QString &type);
+ void slotData(KIO::Job *job, const TQByteArray &data);
+ void slotDataReq(KIO::Job *job, TQByteArray &data);
+ void slotMimetype (KIO::Job *job, const TQString &type);
void slotCanResume (KIO::Job *job, KIO::filesize_t offset);
};
diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp
index e36368dad..f67c09ed9 100644
--- a/kio/kio/global.cpp
+++ b/kio/kio/global.cpp
@@ -42,7 +42,7 @@
#include <volmgt.h>
#endif
-KIO_EXPORT QString KIO::convertSizeWithBytes( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::convertSizeWithBytes( KIO::filesize_t size )
{
if ( size >= 1024 )
return convertSize( size ) + " (" + i18n( "%1 B" ).arg( KGlobal::locale()->formatNumber(size, 0) ) + ")";
@@ -50,10 +50,10 @@ KIO_EXPORT QString KIO::convertSizeWithBytes( KIO::filesize_t size )
return convertSize( size );
}
-KIO_EXPORT QString KIO::convertSize( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::convertSize( KIO::filesize_t size )
{
double fsize = size;
- QString s;
+ TQString s;
// Giga-byte
if ( size >= 1073741824 )
{
@@ -88,16 +88,16 @@ KIO_EXPORT QString KIO::convertSize( KIO::filesize_t size )
return s;
}
-KIO_EXPORT QString KIO::convertSizeFromKB( KIO::filesize_t kbSize )
+KIO_EXPORT TQString KIO::convertSizeFromKB( KIO::filesize_t kbSize )
{
return convertSize(kbSize * 1024);
}
-KIO_EXPORT QString KIO::number( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::number( KIO::filesize_t size )
{
char charbuf[256];
sprintf(charbuf, "%lld", size);
- return QString::fromLatin1(charbuf);
+ return TQString::fromLatin1(charbuf);
}
KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize,
@@ -109,24 +109,24 @@ KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSiz
return 0;
}
-KIO_EXPORT QString KIO::convertSeconds( unsigned int seconds )
+KIO_EXPORT TQString KIO::convertSeconds( unsigned int seconds )
{
unsigned int days = seconds / 86400;
unsigned int hours = (seconds - (days * 86400)) / 3600;
unsigned int mins = (seconds - (days * 86400) - (hours * 3600)) / 60;
seconds = (seconds - (days * 86400) - (hours * 3600) - (mins * 60));
- const QTime time(hours, mins, seconds);
- const QString timeStr( KGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) );
+ const TQTime time(hours, mins, seconds);
+ const TQString timeStr( KGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) );
if ( days > 0 )
return i18n("1 day %1", "%n days %1", days).arg(timeStr);
else
return timeStr;
}
-KIO_EXPORT QTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed )
+KIO_EXPORT TQTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed )
{
- QTime remainingTime;
+ TQTime remainingTime;
if ( speed != 0 ) {
KIO::filesize_t secs;
@@ -147,9 +147,9 @@ KIO_EXPORT QTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesi
return remainingTime;
}
-KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
+KIO_EXPORT TQString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
{
- QString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items );
+ TQString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items );
text += " - ";
text += files == 0 ? i18n( "No Files" ) : i18n( "One File", "%n Files", files );
if ( showSize && files > 0 )
@@ -162,9 +162,9 @@ KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, KI
return text;
}
-KIO_EXPORT QString KIO::encodeFileName( const QString & _str )
+KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str )
{
- QString str( _str );
+ TQString str( _str );
int i = 0;
while ( ( i = str.find( "%", i ) ) != -1 )
@@ -177,9 +177,9 @@ KIO_EXPORT QString KIO::encodeFileName( const QString & _str )
return str;
}
-KIO_EXPORT QString KIO::decodeFileName( const QString & _str )
+KIO_EXPORT TQString KIO::decodeFileName( const TQString & _str )
{
- QString str;
+ TQString str;
unsigned int i = 0;
for ( ; i < _str.length() ; ++i )
@@ -205,14 +205,14 @@ KIO_EXPORT QString KIO::decodeFileName( const QString & _str )
return str;
}
-KIO_EXPORT QString KIO::Job::errorString() const
+KIO_EXPORT TQString KIO::Job::errorString() const
{
return KIO::buildErrorString(m_error, m_errorText);
}
-KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText)
+KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorText)
{
- QString result;
+ TQString result;
switch( errorCode )
{
@@ -284,7 +284,7 @@ KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText
result = i18n( "Could not create socket for accessing %1." ).arg( errorText );
break;
case KIO::ERR_COULD_NOT_CONNECT:
- result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? QString::fromLatin1("localhost") : errorText );
+ result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText );
break;
case KIO::ERR_CONNECTION_BROKEN:
result = i18n( "Connection to host %1 is broken." ).arg( errorText );
@@ -416,7 +416,7 @@ KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText
return result;
}
-KIO_EXPORT QString KIO::unsupportedActionErrorString(const QString &protocol, int cmd) {
+KIO_EXPORT TQString KIO::unsupportedActionErrorString(const TQString &protocol, int cmd) {
switch (cmd) {
case CMD_CONNECT:
return i18n("Opening connections is not supported with the protocol %1." ).arg(protocol);
@@ -455,18 +455,18 @@ KIO_EXPORT QString KIO::unsupportedActionErrorString(const QString &protocol, in
}/*end switch*/
}
-KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/,
+KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/,
int method /*= -1*/ ) const
{
- QString errorName, techName, description, ret2;
- QStringList causes, solutions, ret;
+ TQString errorName, techName, description, ret2;
+ TQStringList causes, solutions, ret;
- QByteArray raw = rawErrorDetail( m_error, m_errorText, reqUrl, method );
- QDataStream stream(raw, IO_ReadOnly);
+ TQByteArray raw = rawErrorDetail( m_error, m_errorText, reqUrl, method );
+ TQDataStream stream(raw, IO_ReadOnly);
stream >> errorName >> techName >> description >> causes >> solutions;
- QString url, protocol, datetime;
+ TQString url, protocol, datetime;
if ( reqUrl ) {
url = reqUrl->htmlURL();
protocol = reqUrl->protocol();
@@ -474,16 +474,16 @@ KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L
url = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
ret << errorName;
- ret << QString::fromLatin1( "<qt><p><b>" ) + errorName +
- QString::fromLatin1( "</b></p><p>" ) + description +
- QString::fromLatin1( "</p>" );
- ret2 = QString::fromLatin1( "<qt><p>" );
+ ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName +
+ TQString::fromLatin1( "</b></p><p>" ) + description +
+ TQString::fromLatin1( "</p>" );
+ ret2 = TQString::fromLatin1( "<qt><p>" );
if ( !techName.isEmpty() )
- ret2 += i18n( "<b>Technical reason</b>: " ) + techName + QString::fromLatin1( "</p>" );
+ ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</p>" );
ret2 += i18n( "</p><p><b>Details of the request</b>:" );
ret2 += i18n( "</p><ul><li>URL: %1</li>" ).arg( url );
if ( !protocol.isEmpty() ) {
@@ -494,21 +494,21 @@ KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L
if ( !causes.isEmpty() ) {
ret2 += i18n( "<p><b>Possible causes</b>:</p><ul><li>" );
ret2 += causes.join( "</li><li>" );
- ret2 += QString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::fromLatin1( "</li></ul>" );
}
if ( !solutions.isEmpty() ) {
ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" );
ret2 += solutions.join( "</li><li>" );
- ret2 += QString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::fromLatin1( "</li></ul>" );
}
ret << ret2;
return ret;
}
-KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorText,
+KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorText,
const KURL *reqUrl /*= 0L*/, int /*method = -1*/ )
{
- QString url, host, protocol, datetime, domain, path, dir, filename;
+ TQString url, host, protocol, datetime, domain, path, dir, filename;
bool isSlaveNetwork = false;
if ( reqUrl ) {
url = reqUrl->prettyURL();
@@ -556,34 +556,34 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
protocol = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
- QString errorName, techName, description;
- QStringList causes, solutions;
+ TQString errorName, techName, description;
+ TQStringList causes, solutions;
// c == cause, s == solution
- QString sSysadmin = i18n( "Contact your appropriate computer support system, "
+ TQString sSysadmin = i18n( "Contact your appropriate computer support system, "
"whether the system administrator, or technical support group for further "
"assistance." );
- QString sServeradmin = i18n( "Contact the administrator of the server "
+ TQString sServeradmin = i18n( "Contact the administrator of the server "
"for further assistance." );
// FIXME active link to permissions dialog
- QString sAccess = i18n( "Check your access permissions on this resource." );
- QString cAccess = i18n( "Your access permissions may be inadequate to "
+ TQString sAccess = i18n( "Check your access permissions on this resource." );
+ TQString cAccess = i18n( "Your access permissions may be inadequate to "
"perform the requested operation on this resource." );
- QString cLocked = i18n( "The file may be in use (and thus locked) by "
+ TQString cLocked = i18n( "The file may be in use (and thus locked) by "
"another user or application." );
- QString sQuerylock = i18n( "Check to make sure that no other "
+ TQString sQuerylock = i18n( "Check to make sure that no other "
"application or user is using the file or has locked the file." );
- QString cHardware = i18n( "Although unlikely, a hardware error may have "
+ TQString cHardware = i18n( "Although unlikely, a hardware error may have "
"occurred." );
- QString cBug = i18n( "You may have encountered a bug in the program." );
- QString cBuglikely = i18n( "This is most likely to be caused by a bug in the "
+ TQString cBug = i18n( "You may have encountered a bug in the program." );
+ TQString cBuglikely = i18n( "This is most likely to be caused by a bug in the "
"program. Please consider submitting a full bug report as detailed below." );
- QString sUpdate = i18n( "Update your software to the latest version. "
+ TQString sUpdate = i18n( "Update your software to the latest version. "
"Your distribution should provide tools to update your software." );
- QString sBugreport = i18n( "When all else fails, please consider helping the "
+ TQString sBugreport = i18n( "When all else fails, please consider helping the "
"KDE team or the third party maintainer of this software by submitting a "
"high quality bug report. If the software is provided by a third party, "
"please contact them directly. Otherwise, first look to see if "
@@ -591,22 +591,22 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
"<a href=\"http://bugs.kde.org/\">KDE bug reporting website</a>. If not, take "
"note of the details given above, and include them in your bug report, along "
"with as many other details as you think might help." );
- QString cNetwork = i18n( "There may have been a problem with your network "
+ TQString cNetwork = i18n( "There may have been a problem with your network "
"connection." );
// FIXME netconf kcontrol link
- QString cNetconf = i18n( "There may have been a problem with your network "
+ TQString cNetconf = i18n( "There may have been a problem with your network "
"configuration. If you have been accessing the Internet with no problems "
"recently, this is unlikely." );
- QString cNetpath = i18n( "There may have been a problem at some point along "
+ TQString cNetpath = i18n( "There may have been a problem at some point along "
"the network path between the server and this computer." );
- QString sTryagain = i18n( "Try again, either now or at a later time." );
- QString cProtocol = i18n( "A protocol error or incompatibility may have occurred." );
- QString sExists = i18n( "Ensure that the resource exists, and try again." );
- QString cExists = i18n( "The specified resource may not exist." );
- QString cTypo = i18n( "You may have incorrectly typed the location." );
- QString sTypo = i18n( "Double-check that you have entered the correct location "
+ TQString sTryagain = i18n( "Try again, either now or at a later time." );
+ TQString cProtocol = i18n( "A protocol error or incompatibility may have occurred." );
+ TQString sExists = i18n( "Ensure that the resource exists, and try again." );
+ TQString cExists = i18n( "The specified resource may not exist." );
+ TQString cTypo = i18n( "You may have incorrectly typed the location." );
+ TQString sTypo = i18n( "Double-check that you have entered the correct location "
"and try again." );
- QString sNetwork = i18n( "Check your network connection status." );
+ TQString sNetwork = i18n( "Check your network connection status." );
switch( errorCode ) {
case KIO::ERR_CANNOT_OPEN_FOR_READING:
@@ -869,7 +869,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
"<strong>L</strong>ocator (URL) that you entered did not refer to "
"a valid mechanism of accessing the specific resource, "
"<strong>%1%2</strong>." )
- .arg( !host.isNull() ? host + '/' : QString::null ).arg( dir );
+ .arg( !host.isNull() ? host + '/' : TQString::null ).arg( dir );
causes << i18n( "KDE is able to communicate through a protocol within a "
"protocol. This request specified a protocol be used as such, however "
"this protocol is not capable of such an action. This is a rare event, "
@@ -1231,7 +1231,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
// We assume that the slave has all the details
case KIO::ERR_SLAVE_DEFINED:
- errorName = QString::null;
+ errorName = TQString::null;
description = errorText;
break;
@@ -1241,8 +1241,8 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
description = buildErrorString( errorCode, errorText );
}
- QByteArray ret;
- QDataStream stream(ret, IO_WriteOnly);
+ TQByteArray ret;
+ TQDataStream stream(ret, IO_WriteOnly);
stream << errorName << techName << description << causes << solutions;
return ret;
}
@@ -1252,7 +1252,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <config.h>
@@ -1365,9 +1365,9 @@ extern "C" void endvfsent( );
#endif /* HAVE_GETMNTINFO */
-QString KIO::findDeviceMountPoint( const QString& filename )
+TQString KIO::findDeviceMountPoint( const TQString& filename )
{
- QString result;
+ TQString result;
#ifdef HAVE_VOLMGT
/*
@@ -1377,22 +1377,22 @@ QString KIO::findDeviceMountPoint( const QString& filename )
FILE *mnttab;
struct mnttab mnt;
int len;
- QCString devname;
+ TQCString devname;
if( (volpath = volmgt_root()) == NULL ) {
kdDebug( 7007 ) << "findDeviceMountPoint: "
<< "VOLMGT: can't find volmgt root dir" << endl;
- return QString::null;
+ return TQString::null;
}
if( (mnttab = fopen( MNTTAB, "r" )) == NULL ) {
kdDebug( 7007 ) << "findDeviceMountPoint: "
<< "VOLMGT: can't open mnttab" << endl;
- return QString::null;
+ return TQString::null;
}
devname = volpath;
- devname += QFile::encodeName( filename );
+ devname += TQFile::encodeName( filename );
devname += '/';
len = devname.length();
// kdDebug( 7007 ) << "findDeviceMountPoint: "
@@ -1407,7 +1407,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
* /dev/dsk/cXtYdZs2 => <volpath>/dev/dsk/cXtYdZ (without slice#)
*/
rewind( mnttab );
- result = QString::null;
+ result = TQString::null;
while( getmntent( mnttab, &mnt ) == 0 ) {
/*
* either match the exact device name (floppies),
@@ -1416,7 +1416,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
if( strncmp( devname.data(), mnt.mnt_special, len ) == 0
|| (strncmp( devname.data(), mnt.mnt_special, len - 3 ) == 0
&& mnt.mnt_special[len - 3] == '/' )
- || (strcmp(QFile::encodeName(filename).data()
+ || (strcmp(TQFile::encodeName(filename).data()
, mnt.mnt_special)==0)) {
result = mnt.mnt_mountp;
break;
@@ -1426,9 +1426,9 @@ QString KIO::findDeviceMountPoint( const QString& filename )
#else
char realpath_buffer[MAXPATHLEN];
- QCString realname;
+ TQCString realname;
- realname = QFile::encodeName(filename);
+ realname = TQFile::encodeName(filename);
/* If the path contains symlinks, get the real name */
if (realpath(realname, realpath_buffer) != 0)
// succes, use result from realpath
@@ -1448,7 +1448,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
for (int i=0;i<num_fs;i++) {
- QCString device_name = mounted[i].f_mntfromname;
+ TQCString device_name = mounted[i].f_mntfromname;
// If the path contains symlinks, get
// the real name
@@ -1509,7 +1509,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
mountedfrom[fsname_len] = '\0';
strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len);
- QCString device_name = mountedfrom;
+ TQCString device_name = mountedfrom;
if (realpath(device_name, realpath_buffer) != 0)
// success, use result from realpath
@@ -1540,7 +1540,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) {
perror("setmntent");
- return QString::null;
+ return TQString::null;
}
/* Loop over all file systems and see if we can find our
@@ -1559,7 +1559,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
{
// There may be symbolic links into the /etc/mnttab
// So we have to find the real device name here as well!
- QCString device_name = FSNAME(me);
+ TQCString device_name = FSNAME(me);
if (device_name.isEmpty() || (device_name == "none"))
continue;
@@ -1630,9 +1630,9 @@ static void check_mount_point(const char *mounttype,
// returns the mount point, checks the mount state.
// if ismanual == Wrong this function does not check the manual mount state
-static QString get_mount_info(const QString& filename,
+static TQString get_mount_info(const TQString& filename,
MountState& isautofs, MountState& isslow, MountState& ismanual,
- QString& fstype)
+ TQString& fstype)
{
static bool gotRoot = false;
static dev_t rootDevice;
@@ -1640,11 +1640,11 @@ static QString get_mount_info(const QString& filename,
struct cachedDevice_t
{
dev_t device;
- QString mountPoint;
+ TQString mountPoint;
MountState isautofs;
MountState isslow;
MountState ismanual;
- QString fstype;
+ TQString fstype;
};
static struct cachedDevice_t *cachedDevice = 0;
@@ -1658,16 +1658,16 @@ static QString get_mount_info(const QString& filename,
bool gotDevice = false;
KDE_struct_stat stat_buf;
- if (KDE_stat(QFile::encodeName(filename), &stat_buf) == 0)
+ if (KDE_stat(TQFile::encodeName(filename), &stat_buf) == 0)
{
gotDevice = true;
if (stat_buf.st_dev == rootDevice)
{
- static const QString &root = KGlobal::staticQString("/");
+ static const TQString &root = KGlobal::staticQString("/");
isautofs = Wrong;
isslow = Wrong;
ismanual = Wrong;
- fstype = QString::null; // ### do we need it?
+ fstype = TQString::null; // ### do we need it?
return root;
}
if (cachedDevice && (stat_buf.st_dev == cachedDevice->device))
@@ -1688,13 +1688,13 @@ static QString get_mount_info(const QString& filename,
memset(realname, 0, MAXPATHLEN);
/* If the path contains symlinks, get the real name */
- if (realpath(QFile::encodeName(filename), realname) == 0) {
- if( strlcpy(realname, QFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN)
- return QString::null;
+ if (realpath(TQFile::encodeName(filename), realname) == 0) {
+ if( strlcpy(realname, TQFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN)
+ return TQString::null;
}
int max = 0;
- QString mountPoint;
+ TQString mountPoint;
/* Loop over all file systems and see if we can find our
* mount point.
@@ -1720,7 +1720,7 @@ static QString get_mount_info(const QString& filename,
for (int i=0;i<num_fs;i++) {
- QCString device_name = mounted[i].f_mntfromname;
+ TQCString device_name = mounted[i].f_mntfromname;
// If the path contains symlinks, get
// the real name
@@ -1734,8 +1734,8 @@ static QString get_mount_info(const QString& filename,
#endif
if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) )
{
- mountPoint = QFile::decodeName(mounted[i].f_mntonname);
- fstype = QString::fromLatin1(mounttype);
+ mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
+ fstype = TQString::fromLatin1(mounttype);
check_mount_point( mounttype, mounted[i].f_mntfromname,
isautofs, isslow );
// keep going, looking for a potentially better one
@@ -1787,7 +1787,7 @@ static QString get_mount_info(const QString& filename,
strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len);
/* get the mount-from information: */
- QCString device_name = mountedfrom;
+ TQCString device_name = mountedfrom;
if (realpath(device_name, realpath_buffer) != 0)
// success, use result from realpath
@@ -1801,8 +1801,8 @@ static QString get_mount_info(const QString& filename,
if ( is_my_mountpoint( mountedto, realname, max ) )
{
- mountPoint = QFile::decodeName(mountedto);
- fstype = QString::fromLatin1(ent->vfsent_name);
+ mountPoint = TQFile::decodeName(mountedto);
+ fstype = TQString::fromLatin1(ent->vfsent_name);
check_mount_point(ent->vfsent_name, device_name, isautofs, isslow);
if (ismanual == Unseen)
@@ -1832,7 +1832,7 @@ static QString get_mount_info(const QString& filename,
if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) {
perror("setmntent");
- return QString::null;
+ return TQString::null;
}
STRUCT_MNTENT me;
@@ -1843,7 +1843,7 @@ static QString get_mount_info(const QString& filename,
if ( is_my_mountpoint( MOUNTPOINT(me), realname, max ) )
{
- mountPoint = QFile::decodeName( MOUNTPOINT(me) );
+ mountPoint = TQFile::decodeName( MOUNTPOINT(me) );
fstype = MOUNTTYPE(me);
check_mount_point(MOUNTTYPE(me), FSNAME(me), isautofs, isslow);
// we don't check if ismanual is Right, if /a/b is manually
@@ -1852,8 +1852,8 @@ static QString get_mount_info(const QString& filename,
{
// The next GETMNTENT call may destroy 'me'
// Copy out the info that we need
- QCString fsname_me = FSNAME(me);
- QCString mounttype_me = MOUNTTYPE(me);
+ TQCString fsname_me = FSNAME(me);
+ TQCString mounttype_me = MOUNTTYPE(me);
STRUCT_SETMNTENT fstab;
if ((fstab = SETMNTENT(FSTAB, "r")) == 0) {
@@ -1906,53 +1906,53 @@ static QString get_mount_info(const QString& filename,
#else //!Q_OS_UNIX
//dummy
-QString KIO::findDeviceMountPoint( const QString& filename )
+TQString KIO::findDeviceMountPoint( const TQString& filename )
{
- return QString::null;
+ return TQString::null;
}
#endif
-QString KIO::findPathMountPoint(const QString& filename)
+TQString KIO::findPathMountPoint(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
+ TQString fstype;
return get_mount_info(filename, isautofs, isslow, ismanual, fstype);
#else //!Q_OS_UNIX
- return QString::null;
+ return TQString::null;
#endif
}
-bool KIO::manually_mounted(const QString& filename)
+bool KIO::manually_mounted(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Unseen;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
return !mountPoint.isNull() && (ismanual == Right);
#else //!Q_OS_UNIX
return false;
#endif
}
-bool KIO::probably_slow_mounted(const QString& filename)
+bool KIO::probably_slow_mounted(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
return !mountPoint.isNull() && (isslow == Right);
#else //!Q_OS_UNIX
return false;
#endif
}
-bool KIO::testFileSystemFlag(const QString& filename, FileSystemFlag flag)
+bool KIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
kdDebug() << "testFileSystemFlag: fstype=" << fstype << endl;
if (mountPoint.isNull())
return false;
@@ -1970,9 +1970,9 @@ bool KIO::testFileSystemFlag(const QString& filename, FileSystemFlag flag)
return false;
}
-KIO::CacheControl KIO::parseCacheControl(const QString &cacheControl)
+KIO::CacheControl KIO::parseCacheControl(const TQString &cacheControl)
{
- QString tmp = cacheControl.lower();
+ TQString tmp = cacheControl.lower();
if (tmp == "cacheonly")
return KIO::CC_CacheOnly;
@@ -1989,7 +1989,7 @@ KIO::CacheControl KIO::parseCacheControl(const QString &cacheControl)
return KIO::CC_Verify;
}
-QString KIO::getCacheControlString(KIO::CacheControl cacheControl)
+TQString KIO::getCacheControlString(KIO::CacheControl cacheControl)
{
if (cacheControl == KIO::CC_CacheOnly)
return "CacheOnly";
@@ -2002,5 +2002,5 @@ QString KIO::getCacheControlString(KIO::CacheControl cacheControl)
if (cacheControl == KIO::CC_Reload)
return "Reload";
kdDebug() << "unrecognized Cache control enum value:"<<cacheControl<<endl;
- return QString::null;
+ return TQString::null;
}
diff --git a/kio/kio/global.h b/kio/kio/global.h
index 4ff622d6e..cea9dc5f4 100644
--- a/kio/kio/global.h
+++ b/kio/kio/global.h
@@ -18,12 +18,12 @@
#ifndef __kio_global_h__
#define __kio_global_h__
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kurl.h>
@@ -44,7 +44,7 @@ namespace KIO
* @param size size in bytes
* @return converted size as a string - e.g. 123.4 kB , 12.0 MB
*/
- KIO_EXPORT QString convertSize( KIO::filesize_t size );
+ KIO_EXPORT TQString convertSize( KIO::filesize_t size );
/**
* Converts @p size from bytes to a string representation with includes
@@ -53,15 +53,15 @@ namespace KIO
* @param size size in bytes
* @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B
*/
- KIO_EXPORT QString convertSizeWithBytes( KIO::filesize_t size );
+ KIO_EXPORT TQString convertSizeWithBytes( KIO::filesize_t size );
/**
* Converts a size to a string representation
- * Not unlike QString::number(...)
+ * Not unlike TQString::number(...)
*
* @param size size in bytes
* @return converted size as a string - e.g. 123456789
*/
- KIO_EXPORT QString number( KIO::filesize_t size );
+ KIO_EXPORT TQString number( KIO::filesize_t size );
/**
* Converts size from kilo-bytes to the string representation.
@@ -69,7 +69,7 @@ namespace KIO
* @param kbSize size in kilo-bytes
* @return converted size as a string - e.g. 123.4 kB , 12.0 MB
*/
- KIO_EXPORT QString convertSizeFromKB( KIO::filesize_t kbSize );
+ KIO_EXPORT TQString convertSizeFromKB( KIO::filesize_t kbSize );
/**
* Calculates remaining time in seconds from total size, processed size and speed.
@@ -92,18 +92,18 @@ namespace KIO
*
* @since 3.4
*/
- KIO_EXPORT QString convertSeconds( unsigned int seconds );
+ KIO_EXPORT TQString convertSeconds( unsigned int seconds );
/**
* Calculates remaining time from total size, processed size and speed.
- * Warning: As QTime is limited to 23:59:59, use calculateRemainingSeconds() instead
+ * Warning: As TQTime is limited to 23:59:59, use calculateRemainingSeconds() instead
*
* @param totalSize total size in bytes
* @param processedSize processed size in bytes
* @param speed speed in bytes per second
* @return calculated remaining time
*/
- KIO_EXPORT QTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED;
+ KIO_EXPORT TQTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED;
/**
* Helper for showing information about a set of files and directories
@@ -114,7 +114,7 @@ namespace KIO
* @param showSize whether to show the size in the result
* @return the summary string
*/
- KIO_EXPORT QString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
+ KIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
/**
* Encodes (from the text displayed to the real filename)
@@ -123,14 +123,14 @@ namespace KIO
* @param str the file name to encode
* @return the encoded file name
*/
- KIO_EXPORT QString encodeFileName( const QString & str );
+ KIO_EXPORT TQString encodeFileName( const TQString & str );
/**
* Decodes (from the filename to the text displayed)
* This translates %2[fF] into / and %% into %
* @param str the file name to decode
* @return the decoded file name
*/
- KIO_EXPORT QString decodeFileName( const QString & str );
+ KIO_EXPORT TQString decodeFileName( const TQString & str );
/**
* Commands that can be invoked by a job.
@@ -255,7 +255,7 @@ namespace KIO
* @param errorText the additional error text
* @return the created error string
*/
- KIO_EXPORT QString buildErrorString(int errorCode, const QString &errorText);
+ KIO_EXPORT TQString buildErrorString(int errorCode, const TQString &errorText);
/**
* Returns a translated html error message for @p errorCode using the
@@ -267,7 +267,7 @@ namespace KIO
* @param method the ioslave method
* @return the created error string
*/
- KIO_EXPORT QString buildHTMLErrorString(int errorCode, const QString &errorText,
+ KIO_EXPORT TQString buildHTMLErrorString(int errorCode, const TQString &errorText,
const KURL *reqUrl = 0L, int method = -1 );
/**
@@ -280,13 +280,13 @@ namespace KIO
* @param reqUrl the request URL
* @param method the ioslave method
* @return the following data:
- * @li QString errorName - the name of the error
- * @li QString techName - if not null, the more technical name of the error
- * @li QString description - a description of the error
- * @li QStringList causes - a list of possible causes of the error
- * @li QStringList solutions - a liso of solutions for the error
+ * @li TQString errorName - the name of the error
+ * @li TQString techName - if not null, the more technical name of the error
+ * @li TQString description - a description of the error
+ * @li TQStringList causes - a list of possible causes of the error
+ * @li TQStringList solutions - a liso of solutions for the error
*/
- KIO_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText,
+ KIO_EXPORT TQByteArray rawErrorDetail(int errorCode, const TQString &errorText,
const KURL *reqUrl = 0L, int method = -1 );
/**
@@ -297,7 +297,7 @@ namespace KIO
* @see enum Command
* @since 3.2
*/
- KIO_EXPORT QString unsupportedActionErrorString(const QString &protocol, int cmd);
+ KIO_EXPORT TQString unsupportedActionErrorString(const TQString &protocol, int cmd);
/**
* Constants used to specify the type of a KUDSAtom.
@@ -398,7 +398,7 @@ namespace KIO
* @return the cache control value
* @see getCacheControlString()
*/
- KIO_EXPORT KIO::CacheControl parseCacheControl(const QString &cacheControl);
+ KIO_EXPORT KIO::CacheControl parseCacheControl(const TQString &cacheControl);
/**
* Returns a string representation of the given cache control method.
@@ -407,14 +407,14 @@ namespace KIO
* @return the string representation
* @see parseCacheControl()
*/
- KIO_EXPORT QString getCacheControlString(KIO::CacheControl cacheControl);
+ KIO_EXPORT TQString getCacheControlString(KIO::CacheControl cacheControl);
/**
* Returns the mount point where @p device is mounted
* right now. This means, it has to be mounted, not just
* defined in fstab.
*/
- KIO_EXPORT QString findDeviceMountPoint( const QString& device );
+ KIO_EXPORT TQString findDeviceMountPoint( const TQString& device );
/**
* Returns the mount point on which resides @p filename.
@@ -423,7 +423,7 @@ namespace KIO
* @param filename the file name to check
* @return the mount point of the given @p filename
*/
- KIO_EXPORT QString findPathMountPoint( const QString & filename );
+ KIO_EXPORT TQString findPathMountPoint( const TQString & filename );
/**
* Checks if the path belongs to a filesystem that is probably
@@ -432,7 +432,7 @@ namespace KIO
* @param filename the file name to check
* @return true if the filesystem is probably slow
*/
- KIO_EXPORT bool probably_slow_mounted(const QString& filename);
+ KIO_EXPORT bool probably_slow_mounted(const TQString& filename);
/**
* Checks if the path belongs to a filesystem that is manually
@@ -440,7 +440,7 @@ namespace KIO
* @param filename the file name to check
* @return true if the filesystem is manually mounted
*/
- KIO_EXPORT bool manually_mounted(const QString& filename);
+ KIO_EXPORT bool manually_mounted(const TQString& filename);
enum FileSystemFlag { SupportsChmod, SupportsChown, SupportsUTime,
SupportsSymlinks, CaseInsensitive };
@@ -464,7 +464,7 @@ namespace KIO
* "foo" and "FOO" as being the same file (true for msdos systems)
*
*/
- KIO_EXPORT bool testFileSystemFlag(const QString& filename, FileSystemFlag flag);
+ KIO_EXPORT bool testFileSystemFlag(const TQString& filename, FileSystemFlag flag);
/************
@@ -486,7 +486,7 @@ public:
/**
* Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
*/
- QString m_str;
+ TQString m_str;
/**
* Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
*/
@@ -501,35 +501,35 @@ public:
/**
* An entry is the list of atoms containing all the informations for a file or URL
*/
-typedef QValueList<UDSAtom> UDSEntry;
-typedef QValueList<UDSEntry> UDSEntryList;
-typedef QValueListIterator<UDSEntry> UDSEntryListIterator;
-typedef QValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
+typedef TQValueList<UDSAtom> UDSEntry;
+typedef TQValueList<UDSEntry> UDSEntryList;
+typedef TQValueListIterator<UDSEntry> UDSEntryListIterator;
+typedef TQValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
/**
* MetaData is a simple map of key/value strings.
*/
-class KIO_EXPORT MetaData : public QMap<QString, QString>
+class KIO_EXPORT MetaData : public TQMap<TQString, TQString>
{
public:
/**
* Creates an empty meta data map.
*/
- MetaData() : QMap<QString, QString>() { };
+ MetaData() : TQMap<TQString, TQString>() { };
/**
* Copy constructor.
*/
- MetaData(const QMap<QString, QString>&metaData) :
- QMap<QString, QString>(metaData) { };
+ MetaData(const TQMap<TQString, TQString>&metaData) :
+ TQMap<TQString, TQString>(metaData) { };
/**
* Adds the given meta data map to this map.
* @param metaData the map to add
* @return this map
*/
- MetaData & operator+= ( const QMap<QString,QString> &metaData )
+ MetaData & operator+= ( const TQMap<TQString,TQString> &metaData )
{
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = metaData.begin();
it != metaData.end();
++it)
diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp
index 96e2e1647..b20c09c10 100644
--- a/kio/kio/job.cpp
+++ b/kio/kio/job.cpp
@@ -38,8 +38,8 @@ extern "C" {
#include <pwd.h>
#include <grp.h>
}
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -79,12 +79,12 @@ extern "C" {
#endif
using namespace KIO;
-template class QPtrList<KIO::Job>;
+template class TQPtrList<KIO::Job>;
//this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX
#define REPORT_TIMEOUT 200
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
class Job::JobPrivate
{
@@ -97,8 +97,8 @@ public:
bool m_autoErrorHandling;
bool m_autoWarningHandling;
bool m_interactive;
- QGuardedPtr<QWidget> m_errorParentWidget;
- // Maybe we could use the QObject parent/child mechanism instead
+ TQGuardedPtr<TQWidget> m_errorParentWidget;
+ // Maybe we could use the TQObject parent/child mechanism instead
// (requires a new ctor, and moving the ctor code to some init()).
Job* m_parentJob;
int m_extraFlags;
@@ -106,7 +106,7 @@ public:
unsigned long m_userTimestamp;
};
-Job::Job(bool showProgressInfo) : QObject(0, "job"), m_error(0), m_percent(0)
+Job::Job(bool showProgressInfo) : TQObject(0, "job"), m_error(0), m_percent(0)
, m_progressId(0), m_speedTimer(0), d( new JobPrivate )
{
// All jobs delete themselves after emiting 'result'.
@@ -115,19 +115,19 @@ Job::Job(bool showProgressInfo) : QObject(0, "job"), m_error(0), m_percent(0)
if ( showProgressInfo )
{
m_progressId = Observer::self()->newJob( this, true );
- addMetaData("progress-id", QString::number(m_progressId));
+ addMetaData("progress-id", TQString::number(m_progressId));
//kdDebug(7007) << "Created job " << this << " with progress info -- m_progressId=" << m_progressId << endl;
// Connect global progress info signals
- connect( this, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString & ) ),
- Observer::self(), SLOT( slotInfoMessage( KIO::Job*, const QString & ) ) );
- connect( this, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- Observer::self(), SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( this, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- Observer::self(), SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( this, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
+ Observer::self(), TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) );
+ connect( this, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ Observer::self(), TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( this, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ Observer::self(), TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( this, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
}
// Don't exit while this job is running
if (kapp)
@@ -164,15 +164,15 @@ void Job::addSubjob(Job *job, bool inheritMetaData)
//kdDebug(7007) << "addSubjob(" << job << ") this = " << this << endl;
subjobs.append(job);
- connect( job, SIGNAL(result(KIO::Job*)),
- SLOT(slotResult(KIO::Job*)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotResult(KIO::Job*)) );
// Forward information from that subjob.
- connect( job, SIGNAL(speed( KIO::Job*, unsigned long )),
- SLOT(slotSpeed(KIO::Job*, unsigned long)) );
+ connect( job, TQT_SIGNAL(speed( KIO::Job*, unsigned long )),
+ TQT_SLOT(slotSpeed(KIO::Job*, unsigned long)) );
- connect( job, SIGNAL(infoMessage( KIO::Job*, const QString & )),
- SLOT(slotInfoMessage(KIO::Job*, const QString &)) );
+ connect( job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )),
+ TQT_SLOT(slotInfoMessage(KIO::Job*, const TQString &)) );
if (inheritMetaData)
job->mergeMetaData(m_outgoingMetaData);
@@ -218,8 +218,8 @@ void Job::emitSpeed( unsigned long bytes_per_second )
//kdDebug(7007) << "Job " << this << " emitSpeed " << bytes_per_second << endl;
if ( !m_speedTimer )
{
- m_speedTimer = new QTimer();
- connect( m_speedTimer, SIGNAL( timeout() ), SLOT( slotSpeedTimeout() ) );
+ m_speedTimer = new TQTimer();
+ connect( m_speedTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSpeedTimeout() ) );
}
emit speed( this, bytes_per_second );
m_speedTimer->start( 5000 ); // 5 seconds interval should be enough
@@ -240,7 +240,7 @@ void Job::kill( bool quietly )
{
kdDebug(7007) << "Job::kill this=" << this << " " << className() << " m_progressId=" << m_progressId << " quietly=" << quietly << endl;
// kill all subjobs, without triggering their result slot
- QPtrListIterator<Job> it( subjobs );
+ TQPtrListIterator<Job> it( subjobs );
for ( ; it.current() ; ++it )
(*it)->kill( true );
subjobs.clear();
@@ -275,7 +275,7 @@ void Job::slotSpeed( KIO::Job*, unsigned long speed )
emitSpeed( speed );
}
-void Job::slotInfoMessage( KIO::Job*, const QString & msg )
+void Job::slotInfoMessage( KIO::Job*, const TQString & msg )
{
emit infoMessage( this, msg );
}
@@ -291,7 +291,7 @@ void Job::slotSpeedTimeout()
//Job::errorString is implemented in global.cpp
-void Job::showErrorDialog( QWidget * parent )
+void Job::showErrorDialog( TQWidget * parent )
{
//kdDebug(7007) << "Job::showErrorDialog parent=" << parent << endl;
kapp->enableStyles();
@@ -303,9 +303,9 @@ void Job::showErrorDialog( QWidget * parent )
KMessageBox::queuedMessageBox( parent, KMessageBox::Error, errorString() );
#if 0
} else {
- QStringList errors = detailedErrorStrings();
- QString caption, err, detail;
- QStringList::const_iterator it = errors.begin();
+ TQStringList errors = detailedErrorStrings();
+ TQString caption, err, detail;
+ TQStringList::const_iterator it = errors.begin();
if ( it != errors.end() )
caption = *(it++);
if ( it != errors.end() )
@@ -318,7 +318,7 @@ void Job::showErrorDialog( QWidget * parent )
}
}
-void Job::setAutoErrorHandlingEnabled( bool enable, QWidget *parentWidget )
+void Job::setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget )
{
d->m_autoErrorHandling = enable;
d->m_errorParentWidget = parentWidget;
@@ -349,13 +349,13 @@ bool Job::isInteractive() const
return d->m_interactive;
}
-void Job::setWindow(QWidget *window)
+void Job::setWindow(TQWidget *window)
{
m_window = window;
KIO::Scheduler::registerWindow(window);
}
-QWidget *Job::window() const
+TQWidget *Job::window() const
{
return m_window;
}
@@ -390,10 +390,10 @@ MetaData Job::metaData() const
return m_incomingMetaData;
}
-QString Job::queryMetaData(const QString &key)
+TQString Job::queryMetaData(const TQString &key)
{
if (!m_incomingMetaData.contains(key))
- return QString::null;
+ return TQString::null;
return m_incomingMetaData[key];
}
@@ -402,21 +402,21 @@ void Job::setMetaData( const KIO::MetaData &_metaData)
m_outgoingMetaData = _metaData;
}
-void Job::addMetaData( const QString &key, const QString &value)
+void Job::addMetaData( const TQString &key, const TQString &value)
{
m_outgoingMetaData.insert(key, value);
}
-void Job::addMetaData( const QMap<QString,QString> &values)
+void Job::addMetaData( const TQMap<TQString,TQString> &values)
{
- QMapConstIterator<QString,QString> it = values.begin();
+ TQMapConstIterator<TQString,TQString> it = values.begin();
for(;it != values.end(); ++it)
m_outgoingMetaData.insert(it.key(), it.data());
}
-void Job::mergeMetaData( const QMap<QString,QString> &values)
+void Job::mergeMetaData( const TQMap<TQString,TQString> &values)
{
- QMapConstIterator<QString,QString> it = values.begin();
+ TQMapConstIterator<TQString,TQString> it = values.begin();
for(;it != values.end(); ++it)
m_outgoingMetaData.insert(it.key(), it.data(), false);
}
@@ -427,7 +427,7 @@ MetaData Job::outgoingMetaData() const
}
-SimpleJob::SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
+SimpleJob::SimpleJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo )
: Job(showProgressInfo), m_slave(0), m_packedArgs(packedArgs),
m_url(url), m_command(command), m_totalSize(0)
@@ -449,7 +449,7 @@ SimpleJob::SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
kdDebug() << "ERR_MALFORMED_URL" << endl;
m_error = ERR_MALFORMED_URL;
m_errorText = m_url.url();
- QTimer::singleShot(0, this, SLOT(slotFinished()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(slotFinished()) );
return;
}
}
@@ -495,51 +495,51 @@ void SimpleJob::start(Slave *slave)
{
m_slave = slave;
- connect( m_slave, SIGNAL( error( int , const QString & ) ),
- SLOT( slotError( int , const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( error( int , const TQString & ) ),
+ TQT_SLOT( slotError( int , const TQString & ) ) );
- connect( m_slave, SIGNAL( warning( const QString & ) ),
- SLOT( slotWarning( const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( warning( const TQString & ) ),
+ TQT_SLOT( slotWarning( const TQString & ) ) );
- connect( m_slave, SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotInfoMessage( const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotInfoMessage( const TQString & ) ) );
- connect( m_slave, SIGNAL( connected() ),
- SLOT( slotConnected() ) );
+ connect( m_slave, TQT_SIGNAL( connected() ),
+ TQT_SLOT( slotConnected() ) );
- connect( m_slave, SIGNAL( finished() ),
- SLOT( slotFinished() ) );
+ connect( m_slave, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotFinished() ) );
if ((extraFlags() & EF_TransferJobDataSent) == 0)
{
- connect( m_slave, SIGNAL( totalSize( KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::filesize_t ) ) );
+ connect( m_slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) );
- connect( m_slave, SIGNAL( processedSize( KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::filesize_t ) ) );
+ connect( m_slave, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) );
- connect( m_slave, SIGNAL( speed( unsigned long ) ),
- SLOT( slotSpeed( unsigned long ) ) );
+ connect( m_slave, TQT_SIGNAL( speed( unsigned long ) ),
+ TQT_SLOT( slotSpeed( unsigned long ) ) );
}
- connect( slave, SIGNAL( needProgressId() ),
- SLOT( slotNeedProgressId() ) );
+ connect( slave, TQT_SIGNAL( needProgressId() ),
+ TQT_SLOT( slotNeedProgressId() ) );
- connect( slave, SIGNAL(metaData( const KIO::MetaData& ) ),
- SLOT( slotMetaData( const KIO::MetaData& ) ) );
+ connect( slave, TQT_SIGNAL(metaData( const KIO::MetaData& ) ),
+ TQT_SLOT( slotMetaData( const KIO::MetaData& ) ) );
if (m_window)
{
- QString id;
+ TQString id;
addMetaData("window-id", id.setNum((ulong)m_window->winId()));
}
if (userTimestamp())
{
- QString id;
+ TQString id;
addMetaData("user-timestamp", id.setNum(userTimestamp()));
}
- QString sslSession = KSSLCSessionCache::getSessionForURL(m_url);
+ TQString sslSession = KSSLCSessionCache::getSessionForURL(m_url);
if ( !sslSession.isNull() )
{
addMetaData("ssl_session_id", sslSession);
@@ -592,7 +592,7 @@ void SimpleJob::slotFinished( )
else /*if ( m_command == CMD_RENAME )*/
{
KURL src, dst;
- QDataStream str( m_packedArgs, IO_ReadOnly );
+ TQDataStream str( m_packedArgs, IO_ReadOnly );
str >> src >> dst;
if ( src.directory() == dst.directory() ) // For the user, moving isn't renaming. Only renaming is.
allDirNotify.FileRenamed( src, dst );
@@ -602,19 +602,19 @@ void SimpleJob::slotFinished( )
}
}
-void SimpleJob::slotError( int error, const QString & errorText )
+void SimpleJob::slotError( int error, const TQString & errorText )
{
m_error = error;
m_errorText = errorText;
if ((m_error == ERR_UNKNOWN_HOST) && m_url.host().isEmpty())
- m_errorText = QString::null;
+ m_errorText = TQString::null;
// error terminates the job
slotFinished();
}
-void SimpleJob::slotWarning( const QString & errorText )
+void SimpleJob::slotWarning( const TQString & errorText )
{
- QGuardedPtr<SimpleJob> guard( this );
+ TQGuardedPtr<SimpleJob> guard( this );
if (isInteractive() && isAutoWarningHandlingEnabled())
{
static uint msgBoxDisplayed = 0;
@@ -631,7 +631,7 @@ void SimpleJob::slotWarning( const QString & errorText )
emit warning( this, errorText );
}
-void SimpleJob::slotInfoMessage( const QString & msg )
+void SimpleJob::slotInfoMessage( const TQString & msg )
{
emit infoMessage( this, msg );
}
@@ -680,7 +680,7 @@ void SimpleJob::slotMetaData( const KIO::MetaData &_metaData)
}
void SimpleJob::storeSSLSessionFromJob(const KURL &m_redirectionURL) {
- QString sslSession = queryMetaData("ssl_session_id");
+ TQString sslSession = queryMetaData("ssl_session_id");
if ( !sslSession.isNull() ) {
const KURL &queryURL = m_redirectionURL.isEmpty()?m_url:m_redirectionURL;
@@ -690,15 +690,15 @@ void SimpleJob::storeSSLSessionFromJob(const KURL &m_redirectionURL) {
//////////
MkdirJob::MkdirJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo)
{
}
void MkdirJob::start(Slave *slave)
{
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -733,13 +733,13 @@ void MkdirJob::slotFinished()
emit permanentRedirection(this, m_url, m_redirectionURL);
KURL dummyUrl;
int permissions;
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
istream >> dummyUrl >> permissions;
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url << permissions;
// Return slave to the scheduler
@@ -776,30 +776,30 @@ SimpleJob *KIO::rename( const KURL& src, const KURL & dest, bool overwrite )
return new SimpleJob(src, CMD_RENAME, packedArgs, false);
}
-SimpleJob *KIO::symlink( const QString& target, const KURL & dest, bool overwrite, bool showProgressInfo )
+SimpleJob *KIO::symlink( const TQString& target, const KURL & dest, bool overwrite, bool showProgressInfo )
{
//kdDebug(7007) << "symlink target=" << target << " " << dest << endl;
KIO_ARGS << target << dest << (Q_INT8) overwrite;
return new SimpleJob(dest, CMD_SYMLINK, packedArgs, showProgressInfo);
}
-SimpleJob *KIO::special(const KURL& url, const QByteArray & data, bool showProgressInfo)
+SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProgressInfo)
{
//kdDebug(7007) << "special " << url << endl;
return new SimpleJob(url, CMD_SPECIAL, data, showProgressInfo);
}
-SimpleJob *KIO::mount( bool ro, const char *fstype, const QString& dev, const QString& point, bool showProgressInfo )
+SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo )
{
KIO_ARGS << int(1) << Q_INT8( ro ? 1 : 0 )
- << QString::fromLatin1(fstype) << dev << point;
+ << TQString::fromLatin1(fstype) << dev << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
if ( showProgressInfo )
Observer::self()->mounting( job, dev, point );
return job;
}
-SimpleJob *KIO::unmount( const QString& point, bool showProgressInfo )
+SimpleJob *KIO::unmount( const TQString& point, bool showProgressInfo )
{
KIO_ARGS << int(2) << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
@@ -813,7 +813,7 @@ SimpleJob *KIO::unmount( const QString& point, bool showProgressInfo )
//////////
StatJob::StatJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo),
m_bSource(true), m_details(2)
{
@@ -822,12 +822,12 @@ StatJob::StatJob( const KURL& url, int command,
void StatJob::start(Slave *slave)
{
m_outgoingMetaData.replace( "statSide", m_bSource ? "source" : "dest" );
- m_outgoingMetaData.replace( "details", QString::number(m_details) );
+ m_outgoingMetaData.replace( "details", TQString::number(m_details) );
- connect( slave, SIGNAL( statEntry( const KIO::UDSEntry& ) ),
- SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( statEntry( const KIO::UDSEntry& ) ),
+ TQT_SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -869,7 +869,7 @@ void StatJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -914,8 +914,8 @@ SimpleJob *KIO::http_update_cache( const KURL& url, bool no_cache, time_t expire
//////////
TransferJob::TransferJob( const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: SimpleJob(url, command, packedArgs, showProgressInfo), staticData( _staticData)
{
@@ -927,7 +927,7 @@ TransferJob::TransferJob( const KURL& url, int command,
}
// Slave sends data
-void TransferJob::slotData( const QByteArray &_data)
+void TransferJob::slotData( const TQByteArray &_data)
{
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error)
emit data( this, _data);
@@ -985,13 +985,13 @@ void TransferJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
// The very tricky part is the packed arguments business
- QString dummyStr;
+ TQString dummyStr;
KURL dummyUrl;
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
switch( m_command ) {
case CMD_GET: {
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
break;
}
@@ -1000,7 +1000,7 @@ void TransferJob::slotFinished()
Q_INT8 iOverwrite, iResume;
istream >> dummyUrl >> iOverwrite >> iResume >> permissions;
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url << iOverwrite << iResume << permissions;
break;
}
@@ -1011,7 +1011,7 @@ void TransferJob::slotFinished()
{
addMetaData("cache","reload");
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
m_command = CMD_GET;
}
@@ -1033,7 +1033,7 @@ void TransferJob::setAsyncDataEnabled(bool enabled)
extraFlags() &= ~EF_TransferJobAsync;
}
-void TransferJob::sendAsyncData(const QByteArray &dataForSlave)
+void TransferJob::sendAsyncData(const TQByteArray &dataForSlave)
{
if (extraFlags() & EF_TransferJobNeedData)
{
@@ -1070,14 +1070,14 @@ bool TransferJob::reportDataSent()
// Slave requests data
void TransferJob::slotDataReq()
{
- QByteArray dataForSlave;
+ TQByteArray dataForSlave;
extraFlags() |= EF_TransferJobNeedData;
if (!staticData.isEmpty())
{
dataForSlave = staticData;
- staticData = QByteArray();
+ staticData = TQByteArray();
}
else
{
@@ -1105,7 +1105,7 @@ void TransferJob::slotDataReq()
}
}
-void TransferJob::slotMimetype( const QString& type )
+void TransferJob::slotMimetype( const TQString& type )
{
m_mimetype = type;
emit mimetype( this, m_mimetype);
@@ -1129,26 +1129,26 @@ void TransferJob::resume()
void TransferJob::start(Slave *slave)
{
assert(slave);
- connect( slave, SIGNAL( data( const QByteArray & ) ),
- SLOT( slotData( const QByteArray & ) ) );
+ connect( slave, TQT_SIGNAL( data( const TQByteArray & ) ),
+ TQT_SLOT( slotData( const TQByteArray & ) ) );
- connect( slave, SIGNAL( dataReq() ),
- SLOT( slotDataReq() ) );
+ connect( slave, TQT_SIGNAL( dataReq() ),
+ TQT_SLOT( slotDataReq() ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
- connect( slave, SIGNAL(mimeType( const QString& ) ),
- SLOT( slotMimetype( const QString& ) ) );
+ connect( slave, TQT_SIGNAL(mimeType( const TQString& ) ),
+ TQT_SLOT( slotMimetype( const TQString& ) ) );
- connect( slave, SIGNAL(errorPage() ),
- SLOT( slotErrorPage() ) );
+ connect( slave, TQT_SIGNAL(errorPage() ),
+ TQT_SLOT( slotErrorPage() ) );
- connect( slave, SIGNAL( needSubURLData() ),
- SLOT( slotNeedSubURLData() ) );
+ connect( slave, TQT_SIGNAL( needSubURLData() ),
+ TQT_SLOT( slotNeedSubURLData() ) );
- connect( slave, SIGNAL(canResume( KIO::filesize_t ) ),
- SLOT( slotCanResume( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ),
+ TQT_SLOT( slotCanResume( KIO::filesize_t ) ) );
if (slave->suspended())
{
@@ -1167,12 +1167,12 @@ void TransferJob::slotNeedSubURLData()
// Job needs data from subURL.
m_subJob = KIO::get( m_subUrl, false, false);
suspend(); // Put job on hold until we have some data.
- connect(m_subJob, SIGNAL( data(KIO::Job*,const QByteArray &)),
- SLOT( slotSubURLData(KIO::Job*,const QByteArray &)));
+ connect(m_subJob, TQT_SIGNAL( data(KIO::Job*,const TQByteArray &)),
+ TQT_SLOT( slotSubURLData(KIO::Job*,const TQByteArray &)));
addSubjob(m_subJob);
}
-void TransferJob::slotSubURLData(KIO::Job*, const QByteArray &data)
+void TransferJob::slotSubURLData(KIO::Job*, const TQByteArray &data)
{
// The Alternating Bitburg protocol in action again.
staticData = data;
@@ -1221,7 +1221,7 @@ TransferJob *KIO::get( const KURL& url, bool reload, bool showProgressInfo )
{
// Send decoded path and encoded query
KIO_ARGS << url;
- TransferJob * job = new TransferJob( url, CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ TransferJob * job = new TransferJob( url, CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
@@ -1231,7 +1231,7 @@ class PostErrorJob : public TransferJob
{
public:
- PostErrorJob(int _error, const QString& url, const QByteArray &packedArgs, const QByteArray &postData, bool showProgressInfo)
+ PostErrorJob(int _error, const TQString& url, const TQByteArray &packedArgs, const TQByteArray &postData, bool showProgressInfo)
: TransferJob(KURL(), CMD_SPECIAL, packedArgs, postData, showProgressInfo)
{
m_error = _error;
@@ -1240,7 +1240,7 @@ public:
};
-TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool showProgressInfo )
+TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool showProgressInfo )
{
int _error = 0;
@@ -1317,15 +1317,15 @@ TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool s
if( _error )
{
static bool override_loaded = false;
- static QValueList< int >* overriden_ports = NULL;
+ static TQValueList< int >* overriden_ports = NULL;
if( !override_loaded )
{
KConfig cfg( "kio_httprc", true );
- overriden_ports = new QValueList< int >;
+ overriden_ports = new TQValueList< int >;
*overriden_ports = cfg.readIntListEntry( "OverriddenPorts" );
override_loaded = true;
}
- for( QValueList< int >::ConstIterator it = overriden_ports->begin();
+ for( TQValueList< int >::ConstIterator it = overriden_ports->begin();
it != overriden_ports->end();
++it )
if( overriden_ports->contains( url.port()))
@@ -1361,7 +1361,7 @@ TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool s
packedArgs, postData, showProgressInfo );
if (redirection)
- QTimer::singleShot(0, job, SLOT(slotPostRedirection()) );
+ TQTimer::singleShot(0, job, TQT_SLOT(slotPostRedirection()) );
return job;
}
@@ -1381,43 +1381,43 @@ TransferJob *KIO::put( const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
- TransferJob * job = new TransferJob( url, CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ TransferJob * job = new TransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
return job;
}
//////////
StoredTransferJob::StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: TransferJob( url, command, packedArgs, _staticData, showProgressInfo ),
m_uploadOffset( 0 )
{
- connect( this, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotStoredData( KIO::Job *, const QByteArray & ) ) );
- connect( this, SIGNAL( dataReq( KIO::Job *, QByteArray & ) ),
- SLOT( slotStoredDataReq( KIO::Job *, QByteArray & ) ) );
+ connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotStoredData( KIO::Job *, const TQByteArray & ) ) );
+ connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ),
+ TQT_SLOT( slotStoredDataReq( KIO::Job *, TQByteArray & ) ) );
}
-void StoredTransferJob::setData( const QByteArray& arr )
+void StoredTransferJob::setData( const TQByteArray& arr )
{
Q_ASSERT( m_data.isNull() ); // check that we're only called once
Q_ASSERT( m_uploadOffset == 0 ); // no upload started yet
m_data = arr;
}
-void StoredTransferJob::slotStoredData( KIO::Job *, const QByteArray &data )
+void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data )
{
// check for end-of-data marker:
if ( data.size() == 0 )
return;
unsigned int oldSize = m_data.size();
- m_data.resize( oldSize + data.size(), QGArray::SpeedOptim );
+ m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim );
memcpy( m_data.data() + oldSize, data.data(), data.size() );
}
-void StoredTransferJob::slotStoredDataReq( KIO::Job *, QByteArray &data )
+void StoredTransferJob::slotStoredDataReq( KIO::Job *, TQByteArray &data )
{
// Inspired from kmail's KMKernel::byteArrayToRemoteFile
// send the data in 64 KB chunks
@@ -1432,7 +1432,7 @@ void StoredTransferJob::slotStoredDataReq( KIO::Job *, QByteArray &data )
} else {
// send the remaining bytes to the receiver (deep copy)
data.duplicate( m_data.data() + m_uploadOffset, remainingBytes );
- m_data = QByteArray();
+ m_data = TQByteArray();
m_uploadOffset = 0;
//kdDebug() << "Sending " << remainingBytes << " bytes\n";
}
@@ -1442,17 +1442,17 @@ StoredTransferJob *KIO::storedGet( const KURL& url, bool reload, bool showProgre
{
// Send decoded path and encoded query
KIO_ARGS << url;
- StoredTransferJob * job = new StoredTransferJob( url, CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
}
-StoredTransferJob *KIO::storedPut( const QByteArray& arr, const KURL& url, int permissions,
+StoredTransferJob *KIO::storedPut( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
- StoredTransferJob * job = new StoredTransferJob( url, CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
job->setData( arr );
return job;
}
@@ -1460,8 +1460,8 @@ StoredTransferJob *KIO::storedPut( const QByteArray& arr, const KURL& url, int p
//////////
MimetypeJob::MimetypeJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
- : TransferJob(url, command, packedArgs, QByteArray(), showProgressInfo)
+ const TQByteArray &packedArgs, bool showProgressInfo )
+ : TransferJob(url, command, packedArgs, TQByteArray(), showProgressInfo)
{
}
@@ -1480,7 +1480,7 @@ void MimetypeJob::slotFinished( )
// Due to the "protocol doesn't support listing" code in KRun, we
// assumed it was a file.
kdDebug(7007) << "It is in fact a directory!" << endl;
- m_mimetype = QString::fromLatin1("inode/directory");
+ m_mimetype = TQString::fromLatin1("inode/directory");
emit TransferJob::mimetype( this, m_mimetype );
m_error = 0;
}
@@ -1497,7 +1497,7 @@ void MimetypeJob::slotFinished( )
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -1518,15 +1518,15 @@ MimetypeJob *KIO::mimetype(const KURL& url, bool showProgressInfo )
//////////////////////////
DirectCopyJob::DirectCopyJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo)
{
}
void DirectCopyJob::start( Slave* slave )
{
- connect( slave, SIGNAL(canResume( KIO::filesize_t ) ),
- SLOT( slotCanResume( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ),
+ TQT_SLOT( slotCanResume( KIO::filesize_t ) ) );
SimpleJob::start(slave);
}
@@ -1573,7 +1573,7 @@ FileCopyJob::FileCopyJob( const KURL& src, const KURL& dest, int permissions,
d->m_delJob = 0;
d->m_sourceSize = (KIO::filesize_t) -1;
d->m_modificationTime = static_cast<time_t>( -1 );
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void FileCopyJob::slotStart()
@@ -1667,8 +1667,8 @@ void FileCopyJob::startCopyJob(const KURL &slave_url)
m_copyJob = new DirectCopyJob(slave_url, CMD_COPY, packedArgs, false);
addSubjob( m_copyJob );
connectSubjob( m_copyJob );
- connect( m_copyJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_copyJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
}
void FileCopyJob::startRenameJob(const KURL &slave_url)
@@ -1681,14 +1681,14 @@ void FileCopyJob::startRenameJob(const KURL &slave_url)
void FileCopyJob::connectSubjob( SimpleJob * job )
{
- connect( job, SIGNAL(totalSize( KIO::Job*, KIO::filesize_t )),
- this, SLOT( slotTotalSize(KIO::Job*, KIO::filesize_t)) );
+ connect( job, TQT_SIGNAL(totalSize( KIO::Job*, KIO::filesize_t )),
+ this, TQT_SLOT( slotTotalSize(KIO::Job*, KIO::filesize_t)) );
- connect( job, SIGNAL(processedSize( KIO::Job*, KIO::filesize_t )),
- this, SLOT( slotProcessedSize(KIO::Job*, KIO::filesize_t)) );
+ connect( job, TQT_SIGNAL(processedSize( KIO::Job*, KIO::filesize_t )),
+ this, TQT_SLOT( slotProcessedSize(KIO::Job*, KIO::filesize_t)) );
- connect( job, SIGNAL(percent( KIO::Job*, unsigned long )),
- this, SLOT( slotPercent(KIO::Job*, unsigned long)) );
+ connect( job, TQT_SIGNAL(percent( KIO::Job*, unsigned long )),
+ this, TQT_SLOT( slotPercent(KIO::Job*, unsigned long)) );
}
@@ -1729,17 +1729,17 @@ void FileCopyJob::startDataPump()
m_getJob = 0L; // for now
m_putJob = put( m_dest, m_permissions, m_overwrite, m_resume, false /* no GUI */);
if ( d->m_modificationTime != static_cast<time_t>( -1 ) ) {
- QDateTime dt; dt.setTime_t( d->m_modificationTime );
+ TQDateTime dt; dt.setTime_t( d->m_modificationTime );
m_putJob->addMetaData( "modified", dt.toString( Qt::ISODate ) );
}
//kdDebug(7007) << "FileCopyJob: m_putJob = " << m_putJob << " m_dest=" << m_dest << endl;
// The first thing the put job will tell us is whether we can
// resume or not (this is always emitted)
- connect( m_putJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
- connect( m_putJob, SIGNAL(dataReq(KIO::Job *, QByteArray&)),
- SLOT( slotDataReq(KIO::Job *, QByteArray&)));
+ connect( m_putJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_putJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray&)),
+ TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray&)));
addSubjob( m_putJob );
}
@@ -1754,7 +1754,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
if (!KProtocolManager::autoResume() && !m_overwrite)
{
- QString newPath;
+ TQString newPath;
KIO::Job* job = ( !m_progressId && parentJob() ) ? parentJob() : this;
// Ask confirmation about resuming previous transfer
res = Observer::self()->open_RenameDlg(
@@ -1798,8 +1798,8 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
m_getJob->addMetaData( "resume", KIO::number(offset) );
// Might or might not get emitted
- connect( m_getJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_getJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
}
m_putJob->slave()->setOffset( offset );
@@ -1808,10 +1808,10 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
connectSubjob( m_getJob ); // Progress info depends on get
m_getJob->resume(); // Order a beer
- connect( m_getJob, SIGNAL(data(KIO::Job*,const QByteArray&)),
- SLOT( slotData(KIO::Job*,const QByteArray&)) );
- connect( m_getJob, SIGNAL(mimetype(KIO::Job*,const QString&) ),
- SLOT(slotMimetype(KIO::Job*,const QString&)) );
+ connect( m_getJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ TQT_SLOT( slotData(KIO::Job*,const TQByteArray&)) );
+ connect( m_getJob, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&) ),
+ TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) );
}
else // copyjob
{
@@ -1831,7 +1831,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
<< " m_getJob=" << m_getJob << " m_putJob=" << m_putJob << endl;
}
-void FileCopyJob::slotData( KIO::Job * , const QByteArray &data)
+void FileCopyJob::slotData( KIO::Job * , const TQByteArray &data)
{
//kdDebug(7007) << "FileCopyJob::slotData" << endl;
//kdDebug(7007) << " data size : " << data.size() << endl;
@@ -1851,7 +1851,7 @@ void FileCopyJob::slotData( KIO::Job * , const QByteArray &data)
}
}
-void FileCopyJob::slotDataReq( KIO::Job * , QByteArray &data)
+void FileCopyJob::slotDataReq( KIO::Job * , TQByteArray &data)
{
//kdDebug(7007) << "FileCopyJob::slotDataReq" << endl;
if (!m_resumeAnswerSent && !m_getJob)
@@ -1869,10 +1869,10 @@ void FileCopyJob::slotDataReq( KIO::Job * , QByteArray &data)
m_putJob->suspend();
}
data = m_buffer;
- m_buffer = QByteArray();
+ m_buffer = TQByteArray();
}
-void FileCopyJob::slotMimetype( KIO::Job*, const QString& type )
+void FileCopyJob::slotMimetype( KIO::Job*, const TQString& type )
{
emit mimetype( this, type );
}
@@ -1980,14 +1980,14 @@ SimpleJob *KIO::file_delete( const KURL& src, bool showProgressInfo)
//////////
-// KDE 4: Make it const QString & _prefix
-ListJob::ListJob(const KURL& u, bool showProgressInfo, bool _recursive, QString _prefix, bool _includeHidden) :
- SimpleJob(u, CMD_LISTDIR, QByteArray(), showProgressInfo),
+// KDE 4: Make it const TQString & _prefix
+ListJob::ListJob(const KURL& u, bool showProgressInfo, bool _recursive, TQString _prefix, bool _includeHidden) :
+ SimpleJob(u, CMD_LISTDIR, TQByteArray(), showProgressInfo),
recursive(_recursive), includeHidden(_includeHidden), prefix(_prefix), m_processedEntries(0)
{
// We couldn't set the args when calling the parent constructor,
// so do it now.
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << u;
}
@@ -2031,7 +2031,7 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
}
}
if (isDir && !isLink) {
- const QString filename = itemURL.fileName();
+ const TQString filename = itemURL.fileName();
// skip hidden dirs when listing if requested
if (filename != ".." && filename != "." && (includeHidden || filename[0] != '.')) {
ListJob *job = new ListJob(itemURL,
@@ -2040,9 +2040,9 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
prefix + filename + "/",
includeHidden);
Scheduler::scheduleJob(job);
- connect(job, SIGNAL(entries( KIO::Job *,
+ connect(job, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( gotEntries( KIO::Job*,
+ TQT_SLOT( gotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob(job);
}
@@ -2065,7 +2065,7 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
UDSEntry newone = *it;
UDSEntry::Iterator it2 = newone.begin();
- QString filename;
+ TQString filename;
for( ; it2 != newone.end(); it2++ ) {
if ((*it2).m_uds == UDS_NAME) {
filename = (*it2).m_str;
@@ -2115,7 +2115,7 @@ void ListJob::slotFinished()
if ( m_error == KIO::ERR_IS_FILE && m_url.isLocalFile() ) {
KMimeType::Ptr ptr = KMimeType::findByURL( m_url, 0, true, true );
if ( ptr ) {
- QString proto = ptr->property("X-KDE-LocalProtocol").toString();
+ TQString proto = ptr->property("X-KDE-LocalProtocol").toString();
if ( !proto.isEmpty() && KProtocolInfo::isKnownProtocol(proto) ) {
m_redirectionURL = m_url;
m_redirectionURL.setProtocol( proto );
@@ -2135,7 +2135,7 @@ void ListJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -2151,13 +2151,13 @@ void ListJob::slotMetaData( const KIO::MetaData &_metaData) {
ListJob *KIO::listDir( const KURL& url, bool showProgressInfo, bool includeHidden )
{
- ListJob * job = new ListJob(url, showProgressInfo,false,QString::null,includeHidden);
+ ListJob * job = new ListJob(url, showProgressInfo,false,TQString::null,includeHidden);
return job;
}
ListJob *KIO::listRecursive( const KURL& url, bool showProgressInfo, bool includeHidden )
{
- ListJob * job = new ListJob(url, showProgressInfo, true,QString::null,includeHidden);
+ ListJob * job = new ListJob(url, showProgressInfo, true,TQString::null,includeHidden);
return job;
}
@@ -2175,15 +2175,15 @@ void ListJob::start(Slave *slave)
{
m_error = ERR_ACCESS_DENIED;
m_errorText = m_url.url();
- QTimer::singleShot(0, this, SLOT(slotFinished()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(slotFinished()) );
return;
}
- connect( slave, SIGNAL( listEntries( const KIO::UDSEntryList& )),
- SLOT( slotListEntries( const KIO::UDSEntryList& )));
- connect( slave, SIGNAL( totalSize( KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::filesize_t ) ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( listEntries( const KIO::UDSEntryList& )),
+ TQT_SLOT( slotListEntries( const KIO::UDSEntryList& )));
+ connect( slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -2208,7 +2208,7 @@ public:
bool m_bURLDirty;
// Used after copying all the files into the dirs, to set mtime (TODO: and permissions?)
// after the copy is done
- QValueList<CopyInfo> m_directoriesCopied;
+ TQValueList<CopyInfo> m_directoriesCopied;
};
CopyJob::CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo )
@@ -2226,13 +2226,13 @@ CopyJob::CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool a
d->m_globalDestinationState = destinationState;
if ( showProgressInfo ) {
- connect( this, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
}
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
/**
States:
STATE_STATING for the dest
@@ -2261,9 +2261,9 @@ void CopyJob::slotStart()
Calling a function via a signal takes approx. 65 times the time
compared to calling it directly (at least on my machine). aleXXX
*/
- m_reportTimer = new QTimer(this);
+ m_reportTimer = new TQTimer(this);
- connect(m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
+ connect(m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport()));
m_reportTimer->start(REPORT_TIMEOUT,false);
// Stat the dest
@@ -2314,8 +2314,8 @@ void CopyJob::slotResultStating( Job *job )
UDSEntry entry = ((StatJob*)job)->statResult();
bool bDir = false;
bool bLink = false;
- QString sName;
- QString sLocalPath;
+ TQString sName;
+ TQString sLocalPath;
UDSEntry::ConstIterator it2 = entry.begin();
for( ; it2 != entry.end(); it2++ ) {
if ( ((*it2).m_uds) == UDS_FILE_TYPE )
@@ -2398,7 +2398,7 @@ void CopyJob::slotResultStating( Job *job )
if ( !m_asMethod )
{
// Use <desturl>/<directory_copied> as destination, from now on
- QString directory = srcurl.fileName();
+ TQString directory = srcurl.fileName();
if ( !sName.isEmpty() && KProtocolInfo::fileNameUsedForCopying( srcurl ) == KProtocolInfo::Name )
{
directory = sName;
@@ -2502,9 +2502,9 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
info.mtime = (time_t) -1;
info.ctime = (time_t) -1;
info.size = (KIO::filesize_t)-1;
- QString displayName;
+ TQString displayName;
KURL url;
- QString localPath;
+ TQString localPath;
bool isDir = false;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
@@ -2566,13 +2566,13 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
// (passed here during stating) but not its children (during listing)
( ! ( m_asMethod && state == STATE_STATING ) ) )
{
- QString destFileName;
+ TQString destFileName;
if ( hasCustomURL &&
KProtocolInfo::fileNameUsedForCopying( url ) == KProtocolInfo::FromURL ) {
//destFileName = url.fileName(); // Doesn't work for recursive listing
// Count the number of prefixes used by the recursive listjob
int numberOfSlashes = displayName.contains( '/' ); // don't make this a find()!
- QString path = url.path();
+ TQString path = url.path();
int pos = 0;
for ( int n = 0; n < numberOfSlashes + 1; ++n ) {
pos = path.findRev( '/', pos - 1 );
@@ -2707,7 +2707,7 @@ void CopyJob::statCurrentSrc()
// if the file system doesn't support deleting, we do not even stat
if (m_mode == Move && !KProtocolInfo::supportsDeleting(m_currentSrcURL)) {
- QGuardedPtr<CopyJob> that = this;
+ TQGuardedPtr<CopyJob> that = this;
if (isInteractive())
KMessageBox::information( 0, buildErrorString(ERR_CANNOT_DELETE, m_currentSrcURL.prettyURL()));
if (that)
@@ -2759,7 +2759,7 @@ void CopyJob::startRenameJob( const KURL& slave_url )
info.size = (KIO::filesize_t)-1;
info.uSource = m_currentSrcURL;
info.uDest = dest;
- QValueList<CopyInfo> files;
+ TQValueList<CopyInfo> files;
files.append(info);
emit aboutToCreate( this, files );
@@ -2777,9 +2777,9 @@ void CopyJob::startListing( const KURL & src )
d->m_bURLDirty = true;
ListJob * newjob = listRecursive( src, false );
newjob->setUnrestricted(true);
- connect(newjob, SIGNAL(entries( KIO::Job *,
+ connect(newjob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( newjob );
}
@@ -2798,20 +2798,20 @@ void CopyJob::skip( const KURL & sourceUrl )
dirsToRemove.remove( sourceUrl );
}
-bool CopyJob::shouldOverwrite( const QString& path ) const
+bool CopyJob::shouldOverwrite( const TQString& path ) const
{
if ( m_bOverwriteAll )
return true;
- QStringList::ConstIterator sit = m_overwriteList.begin();
+ TQStringList::ConstIterator sit = m_overwriteList.begin();
for( ; sit != m_overwriteList.end(); ++sit )
if ( path.startsWith( *sit ) )
return true;
return false;
}
-bool CopyJob::shouldSkip( const QString& path ) const
+bool CopyJob::shouldSkip( const TQString& path ) const
{
- QStringList::ConstIterator sit = m_skipList.begin();
+ TQStringList::ConstIterator sit = m_skipList.begin();
for( ; sit != m_skipList.end(); ++sit )
if ( path.startsWith( *sit ) )
return true;
@@ -2821,7 +2821,7 @@ bool CopyJob::shouldSkip( const QString& path ) const
void CopyJob::slotResultCreatingDirs( Job * job )
{
// The dir we are trying to create:
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Was there an error creating a dir ?
if ( job->error() )
{
@@ -2838,7 +2838,7 @@ void CopyJob::slotResultCreatingDirs( Job * job )
dirs.remove( it ); // Move on to next dir
} else {
// Did the user choose to overwrite already?
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
if ( shouldOverwrite( destFile ) ) { // overwrite => just skip
emit copyingDone( this, ( *it ).uSource, ( *it ).uDest, true /* directory */, false /* renamed */ );
dirs.remove( it ); // Move on to next dir
@@ -2890,12 +2890,12 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
// We come here after a conflict has been detected and we've stated the existing dir
// The dir we were trying to create:
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Its modification time:
time_t destmtime = (time_t)-1;
time_t destctime = (time_t)-1;
KIO::filesize_t destsize = 0;
- QString linkDest;
+ TQString linkDest;
UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it2 = entry.begin();
@@ -2931,8 +2931,8 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
mode = (RenameDlg_Mode)( mode | M_OVERWRITE );
}
- QString existingDest = (*it).uDest.path();
- QString newPath;
+ TQString existingDest = (*it).uDest.path();
+ TQString newPath;
if (m_reportTimer)
m_reportTimer->stop();
RenameDlg_Result r = Observer::self()->open_RenameDlg( this, i18n("Folder Already Exists"),
@@ -2951,7 +2951,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
return;
case R_RENAME:
{
- QString oldPath = (*it).uDest.path( 1 );
+ TQString oldPath = (*it).uDest.path( 1 );
KURL newUrl( (*it).uDest );
newUrl.setPath( newPath );
emit renamed( this, (*it).uDest, newUrl ); // for e.g. kpropsdlg
@@ -2959,14 +2959,14 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
// Change the current one and strip the trailing '/'
(*it).uDest.setPath( newUrl.path( -1 ) );
newPath = newUrl.path( 1 ); // With trailing slash
- QValueList<CopyInfo>::Iterator renamedirit = it;
+ TQValueList<CopyInfo>::Iterator renamedirit = it;
++renamedirit;
// Change the name of subdirectories inside the directory
for( ; renamedirit != dirs.end() ; ++renamedirit )
{
- QString path = (*renamedirit).uDest.path();
+ TQString path = (*renamedirit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
- QString n = path;
+ TQString n = path;
n.replace( 0, oldPath.length(), newPath );
kdDebug(7007) << "dirs list: " << (*renamedirit).uSource.path()
<< " was going to be " << path
@@ -2975,12 +2975,12 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
}
}
// Change filenames inside the directory
- QValueList<CopyInfo>::Iterator renamefileit = files.begin();
+ TQValueList<CopyInfo>::Iterator renamefileit = files.begin();
for( ; renamefileit != files.end() ; ++renamefileit )
{
- QString path = (*renamefileit).uDest.path();
+ TQString path = (*renamefileit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
- QString n = path;
+ TQString n = path;
n.replace( 0, oldPath.length(), newPath );
kdDebug(7007) << "files list: " << (*renamefileit).uSource.path()
<< " was going to be " << path
@@ -3032,11 +3032,11 @@ void CopyJob::createNextDir()
if ( !dirs.isEmpty() )
{
// Take first dir to create out of list
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Is this URL on the skip list or the overwrite list ?
while( it != dirs.end() && udir.isEmpty() )
{
- const QString dir = (*it).uDest.path();
+ const TQString dir = (*it).uDest.path();
if ( shouldSkip( dir ) ) {
dirs.remove( it );
it = dirs.begin();
@@ -3071,7 +3071,7 @@ void CopyJob::createNextDir()
void CopyJob::slotResultCopyingFiles( Job * job )
{
// The file we were trying to copy:
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
if ( job->error() )
{
// Should we skip automatically ?
@@ -3138,7 +3138,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
if ( m_bCurrentOperationIsLink )
{
- QString target = ( m_mode == Link ? (*it).uSource.path() : (*it).linkDest );
+ TQString target = ( m_mode == Link ? (*it).uSource.path() : (*it).linkDest );
//required for the undo feature
emit copyingLinkDone( this, (*it).uSource, target, (*it).uDest );
}
@@ -3165,10 +3165,10 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
{
// We come here after a conflict has been detected and we've stated the existing file
// The file we were trying to create:
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
RenameDlg_Result res;
- QString newPath;
+ TQString newPath;
if (m_reportTimer)
m_reportTimer->stop();
@@ -3181,7 +3181,7 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
time_t destmtime = (time_t)-1;
time_t destctime = (time_t)-1;
KIO::filesize_t destsize = 0;
- QString linkDest;
+ TQString linkDest;
UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it2 = entry.begin();
for( ; it2 != entry.end(); it2++ ) {
@@ -3271,7 +3271,7 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
emit renamed( this, (*it).uDest, newUrl ); // for e.g. kpropsdlg
(*it).uDest = newUrl;
- QValueList<CopyInfo> files;
+ TQValueList<CopyInfo> files;
files.append(*it);
emit aboutToCreate( this, files );
}
@@ -3306,11 +3306,11 @@ void CopyJob::copyNextFile()
bool bCopyFile = false;
//kdDebug(7007) << "CopyJob::copyNextFile()" << endl;
// Take the first file in the list
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
// Is this URL on the skip list ?
while (it != files.end() && !bCopyFile)
{
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
bCopyFile = !shouldSkip( destFile );
if ( !bCopyFile ) {
files.remove( it );
@@ -3322,7 +3322,7 @@ void CopyJob::copyNextFile()
{
// Do we set overwrite ?
bool bOverwrite;
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
kdDebug(7007) << "copying " << destFile << endl;
if ( (*it).uDest == (*it).uSource )
bOverwrite = false;
@@ -3359,18 +3359,18 @@ void CopyJob::copyNextFile()
bool devicesOk=false;
// if the source is a devices url, handle it a littlebit special
- if ((*it).uSource.protocol()==QString::fromLatin1("devices"))
+ if ((*it).uSource.protocol()==TQString::fromLatin1("devices"))
{
- QByteArray data;
- QByteArray param;
- QCString retType;
- QDataStream streamout(param,IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray param;
+ TQCString retType;
+ TQDataStream streamout(param,IO_WriteOnly);
streamout<<(*it).uSource;
streamout<<(*it).uDest;
if ( kapp && kapp->dcopClient()->call( "kded",
"mountwatcher", "createLink(KURL, KURL)", param,retType,data,false ) )
{
- QDataStream streamin(data,IO_ReadOnly);
+ TQDataStream streamin(data,IO_ReadOnly);
streamin>>devicesOk;
}
if (devicesOk)
@@ -3385,9 +3385,9 @@ void CopyJob::copyNextFile()
if (!devicesOk)
{
- QString path = (*it).uDest.path();
+ TQString path = (*it).uDest.path();
//kdDebug(7007) << "CopyJob::copyNextFile path=" << path << endl;
- QFile f( path );
+ TQFile f( path );
if ( f.open( IO_ReadWrite ) )
{
f.close();
@@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile()
config.setDesktopGroup();
KURL url = (*it).uSource;
url.setPass( "" );
- config.writePathEntry( QString::fromLatin1("URL"), url.url() );
- config.writeEntry( QString::fromLatin1("Name"), url.url() );
- config.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
- QString protocol = (*it).uSource.protocol();
- if ( protocol == QString::fromLatin1("ftp") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("ftp") );
- else if ( protocol == QString::fromLatin1("http") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("www") );
- else if ( protocol == QString::fromLatin1("info") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("info") );
- else if ( protocol == QString::fromLatin1("mailto") ) // sven:
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("kmail") ); // added mailto: support
+ config.writePathEntry( TQString::fromLatin1("URL"), url.url() );
+ config.writeEntry( TQString::fromLatin1("Name"), url.url() );
+ config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ TQString protocol = (*it).uSource.protocol();
+ if ( protocol == TQString::fromLatin1("ftp") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("ftp") );
+ else if ( protocol == TQString::fromLatin1("http") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("www") );
+ else if ( protocol == TQString::fromLatin1("info") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("info") );
+ else if ( protocol == TQString::fromLatin1("mailto") ) // sven:
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("kmail") ); // added mailto: support
else
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("unknown") );
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") );
config.sync();
files.remove( it );
m_processedFiles++;
@@ -3484,10 +3484,10 @@ void CopyJob::copyNextFile()
d->m_bURLDirty = true;
}
addSubjob(newjob);
- connect( newjob, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- this, SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( newjob, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- this, SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( newjob, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ this, TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( newjob, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ this, TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
}
else
{
@@ -3524,11 +3524,11 @@ void CopyJob::setNextDirAttribute()
state = STATE_SETTING_DIR_ATTRIBUTES;
#ifdef Q_OS_UNIX
// TODO KDE4: this should use a SlaveBase method, but we have none yet in KDE3.
- QValueList<CopyInfo>::Iterator it = d->m_directoriesCopied.begin();
+ TQValueList<CopyInfo>::Iterator it = d->m_directoriesCopied.begin();
for ( ; it != d->m_directoriesCopied.end() ; ++it ) {
const KURL& url = (*it).uDest;
if ( url.isLocalFile() && (*it).mtime != (time_t)-1 ) {
- const QCString path = QFile::encodeName( url.path() );
+ const TQCString path = TQFile::encodeName( url.path() );
KDE_struct_stat statbuf;
if (KDE_lstat(path, &statbuf) == 0) {
struct utimbuf utbuf;
@@ -3633,7 +3633,7 @@ void CopyJob::slotResultSettingDirAttributes( Job * job )
void CopyJob::slotResultRenaming( Job* job )
{
int err = job->error();
- const QString errText = job->errorText();
+ const TQString errText = job->errorText();
removeSubjob( job, true, false ); // merge metadata
assert ( subjobs.isEmpty() );
// Determine dest again
@@ -3652,15 +3652,15 @@ void CopyJob::slotResultRenaming( Job* job )
err == ERR_IDENTICAL_FILES ) )
{
kdDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls" << endl;
- QCString _src( QFile::encodeName(m_currentSrcURL.path()) );
- QCString _dest( QFile::encodeName(dest.path()) );
+ TQCString _src( TQFile::encodeName(m_currentSrcURL.path()) );
+ TQCString _dest( TQFile::encodeName(dest.path()) );
KTempFile tmpFile( m_currentSrcURL.directory(false) );
- QCString _tmp( QFile::encodeName(tmpFile.name()) );
+ TQCString _tmp( TQFile::encodeName(tmpFile.name()) );
kdDebug(7007) << "CopyJob::slotResult KTempFile status:" << tmpFile.status() << " using " << _tmp << " as intermediary" << endl;
tmpFile.unlink();
if ( ::rename( _src, _tmp ) == 0 )
{
- if ( !QFile::exists( _dest ) && ::rename( _tmp, _dest ) == 0 )
+ if ( !TQFile::exists( _dest ) && ::rename( _tmp, _dest ) == 0 )
{
kdDebug(7007) << "Success." << endl;
err = 0;
@@ -3706,7 +3706,7 @@ void CopyJob::slotResultRenaming( Job* job )
} else if ( m_bOverwriteAll ) {
; // nothing to do, stat+copy+del will overwrite
} else {
- QString newPath;
+ TQString newPath;
// If src==dest, use "overwrite-itself"
RenameDlg_Mode mode = (RenameDlg_Mode)
( ( m_currentSrcURL == dest ) ? M_OVERWRITE_ITSELF : M_OVERWRITE );
@@ -3728,13 +3728,13 @@ void CopyJob::slotResultRenaming( Job* job )
KDE_struct_stat stat_buf;
if ( m_currentSrcURL.isLocalFile() &&
- KDE_stat(QFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0 ) {
+ KDE_stat(TQFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0 ) {
sizeSrc = stat_buf.st_size;
ctimeSrc = stat_buf.st_ctime;
mtimeSrc = stat_buf.st_mtime;
}
if ( dest.isLocalFile() &&
- KDE_stat(QFile::encodeName(dest.path()), &stat_buf) == 0 ) {
+ KDE_stat(TQFile::encodeName(dest.path()), &stat_buf) == 0 ) {
sizeDest = stat_buf.st_size;
ctimeDest = stat_buf.st_ctime;
mtimeDest = stat_buf.st_mtime;
@@ -3967,29 +3967,29 @@ DeleteJob::DeleteJob( const KURL::List& src, bool /*shred*/, bool showProgressIn
{
if ( showProgressInfo ) {
- connect( this, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
// See slotReport
- /*connect( this, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- m_observer, SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ /*connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ m_observer, TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- m_observer, SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ m_observer, TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( deleting( KIO::Job*, const KURL& ) ),
- m_observer, SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );*/
+ connect( this, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ),
+ m_observer, TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );*/
- m_reportTimer=new QTimer(this);
- connect(m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
+ m_reportTimer=new TQTimer(this);
+ connect(m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport()));
//this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX
m_reportTimer->start(REPORT_TIMEOUT,false);
}
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void DeleteJob::slotStart()
@@ -4040,7 +4040,7 @@ void DeleteJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
UDSEntry::ConstIterator it2 = (*it).begin();
bool bDir = false;
bool bLink = false;
- QString displayName;
+ TQString displayName;
KURL url;
int atomsFound(0);
for( ; it2 != (*it).end(); it2++ )
@@ -4100,7 +4100,7 @@ void DeleteJob::statNextSrc()
// if the file system doesn't support deleting, we do not even stat
if (!KProtocolInfo::supportsDeleting(m_currentURL)) {
- QGuardedPtr<DeleteJob> that = this;
+ TQGuardedPtr<DeleteJob> that = this;
++m_currentStat;
if (isInteractive())
KMessageBox::information( 0, buildErrorString(ERR_CANNOT_DELETE, m_currentURL.prettyURL()));
@@ -4124,7 +4124,7 @@ void DeleteJob::statNextSrc()
// To speed things up and prevent double-notification, we disable KDirWatch
// on those dirs temporarily (using KDirWatch::self, that's the instanced
// used by e.g. kdirlister).
- for ( QStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
KDirWatch::self()->stopDirScan( *it );
state = STATE_DELETING_FILES;
deleteNextFile();
@@ -4148,7 +4148,7 @@ void DeleteJob::deleteNextFile()
}
// Normal deletion
// If local file, try do it directly
- if ( (*it).isLocalFile() && unlink( QFile::encodeName((*it).path()) ) == 0 ) {
+ if ( (*it).isLocalFile() && unlink( TQFile::encodeName((*it).path()) ) == 0 ) {
//kdDebug(7007) << "DeleteJob deleted " << (*it).path() << endl;
job = 0;
m_processedFiles++;
@@ -4185,7 +4185,7 @@ void DeleteJob::deleteNextDir()
// Take first dir to delete out of list - last ones first !
KURL::List::Iterator it = dirs.fromLast();
// If local dir, try to rmdir it directly
- if ( (*it).isLocalFile() && ::rmdir( QFile::encodeName((*it).path()) ) == 0 ) {
+ if ( (*it).isLocalFile() && ::rmdir( TQFile::encodeName((*it).path()) ) == 0 ) {
m_processedDirs++;
if ( m_processedDirs % 100 == 0 ) { // update progress info every 100 dirs
@@ -4211,7 +4211,7 @@ void DeleteJob::deleteNextDir()
}
// Re-enable watching on the dirs that held the deleted files
- for ( QStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
KDirWatch::self()->restartDirScan( *it );
// Finished - tell the world
@@ -4315,9 +4315,9 @@ void DeleteJob::slotResult( Job *job )
ListJob *newjob = listRecursive( url, false );
newjob->setUnrestricted(true); // No KIOSK restrictions
Scheduler::scheduleJob(newjob);
- connect(newjob, SIGNAL(entries( KIO::Job *,
+ connect(newjob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob(newjob);
} else {
@@ -4399,7 +4399,7 @@ DeleteJob *KIO::del( const KURL::List& src, bool shred, bool showProgressInfo )
MultiGetJob::MultiGetJob(const KURL& url,
bool showProgressInfo)
- : TransferJob(url, 0, QByteArray(), QByteArray(), showProgressInfo)
+ : TransferJob(url, 0, TQByteArray(), TQByteArray(), showProgressInfo)
{
m_waitQueue.setAutoDelete(true);
m_activeQueue.setAutoDelete(true);
@@ -4409,11 +4409,11 @@ MultiGetJob::MultiGetJob(const KURL& url,
void MultiGetJob::get(long id, const KURL &url, const MetaData &metaData)
{
GetRequest *entry = new GetRequest(id, url, metaData);
- entry->metaData["request-id"] = QString("%1").arg(id);
+ entry->metaData["request-id"] = TQString("%1").arg(id);
m_waitQueue.append(entry);
}
-void MultiGetJob::flushQueue(QPtrList<GetRequest> &queue)
+void MultiGetJob::flushQueue(TQPtrList<GetRequest> &queue)
{
GetRequest *entry;
// Use multi-get
@@ -4541,18 +4541,18 @@ void MultiGetJob::slotFinished()
}
}
-void MultiGetJob::slotData( const QByteArray &_data)
+void MultiGetJob::slotData( const TQByteArray &_data)
{
if(!m_currentEntry) return;// Error, unknown request!
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error)
emit data(m_currentEntry->id, _data);
}
-void MultiGetJob::slotMimetype( const QString &_mimetype )
+void MultiGetJob::slotMimetype( const TQString &_mimetype )
{
if (b_multiGetActive)
{
- QPtrList<GetRequest> newQueue;
+ TQPtrList<GetRequest> newQueue;
flushQueue(newQueue);
if (!newQueue.isEmpty())
{
@@ -4579,11 +4579,11 @@ CacheInfo::CacheInfo(const KURL &url)
m_url = url;
}
-QString CacheInfo::cachedFileName()
+TQString CacheInfo::cachedFileName()
{
- const QChar separator = '_';
+ const TQChar separator = '_';
- QString CEF = m_url.path();
+ TQString CEF = m_url.path();
int p = CEF.find('/');
@@ -4593,10 +4593,10 @@ QString CacheInfo::cachedFileName()
p = CEF.find('/', p);
}
- QString host = m_url.host().lower();
+ TQString host = m_url.host().lower();
CEF = host + CEF + '_';
- QString dir = KProtocolManager::cacheDir();
+ TQString dir = KProtocolManager::cacheDir();
if (dir[dir.length()-1] != '/')
dir += "/";
@@ -4613,13 +4613,13 @@ QString CacheInfo::cachedFileName()
dir += "0";
unsigned long hash = 0x00000000;
- QCString u = m_url.url().latin1();
+ TQCString u = m_url.url().latin1();
for(int i = u.length(); i--;)
{
hash = (hash * 12211 + u[i]) % 2147483563;
}
- QString hashString;
+ TQString hashString;
hashString.sprintf("%08lx", hash);
CEF = CEF + hashString;
@@ -4629,7 +4629,7 @@ QString CacheInfo::cachedFileName()
return CEF;
}
-QFile *CacheInfo::cachedFile()
+TQFile *CacheInfo::cachedFile()
{
#ifdef Q_WS_WIN
const char *mode = (readWrite ? "rb+" : "rb");
@@ -4637,7 +4637,7 @@ QFile *CacheInfo::cachedFile()
const char *mode = (readWrite ? "r+" : "r");
#endif
- FILE *fs = fopen(QFile::encodeName(CEF), mode); // Open for reading and writing
+ FILE *fs = fopen(TQFile::encodeName(CEF), mode); // Open for reading and writing
if (!fs)
return 0;
@@ -4701,7 +4701,7 @@ QFile *CacheInfo::cachedFile()
ok = false;
if (ok)
{
- m_etag = QString(buffer).stripWhiteSpace();
+ m_etag = TQString(buffer).stripWhiteSpace();
}
// Last-Modified
@@ -4709,7 +4709,7 @@ QFile *CacheInfo::cachedFile()
ok = false;
if (ok)
{
- m_lastModified = QString(buffer).stripWhiteSpace();
+ m_lastModified = TQString(buffer).stripWhiteSpace();
}
fclose(fs);
@@ -4717,7 +4717,7 @@ QFile *CacheInfo::cachedFile()
if (ok)
return fs;
- unlink( QFile::encodeName(CEF) );
+ unlink( TQFile::encodeName(CEF) );
return 0;
}
diff --git a/kio/kio/job.h b/kio/kio/job.h
index 5a10d8577..03edb5024 100644
--- a/kio/kio/job.h
+++ b/kio/kio/job.h
@@ -87,7 +87,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob * symlink( const QString & target, const KURL& dest, bool overwrite, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob * symlink( const TQString & target, const KURL& dest, bool overwrite, bool showProgressInfo = true );
/**
* Execute any command that is specific to one slave (protocol).
@@ -101,7 +101,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob * special( const KURL& url, const QByteArray & data, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob * special( const KURL& url, const TQByteArray & data, bool showProgressInfo = true );
/**
* Mount filesystem.
@@ -115,7 +115,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob *mount( bool ro, const char *fstype, const QString& dev, const QString& point, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob *mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo = true );
/**
* Unmount filesystem.
@@ -126,7 +126,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob *unmount( const QString & point, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob *unmount( const TQString & point, bool showProgressInfo = true );
/**
* HTTP cache update
@@ -230,11 +230,11 @@ namespace KIO {
* @param showProgressInfo true to display
* @return the job handling the operation.
*/
- KIO_EXPORT TransferJob *http_post( const KURL& url, const QByteArray &postData,
+ KIO_EXPORT TransferJob *http_post( const KURL& url, const TQByteArray &postData,
bool showProgressInfo = true );
/**
- * Get (a.k.a. read), into a single QByteArray.
+ * Get (a.k.a. read), into a single TQByteArray.
* @see StoredTransferJob
*
* @param url the URL of the file
@@ -246,7 +246,7 @@ namespace KIO {
KIO_EXPORT StoredTransferJob *storedGet( const KURL& url, bool reload=false, bool showProgressInfo = true );
/**
- * Put (a.k.a. write) data from a single QByteArray.
+ * Put (a.k.a. write) data from a single TQByteArray.
* @see StoredTransferJob
*
* @param arr The data to write
@@ -259,7 +259,7 @@ namespace KIO {
* @return the job handling the operation.
* @since 3.3
*/
- KIO_EXPORT StoredTransferJob *storedPut( const QByteArray& arr, const KURL& url, int permissions,
+ KIO_EXPORT StoredTransferJob *storedPut( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo = true );
/**
diff --git a/kio/kio/jobclasses.h b/kio/kio/jobclasses.h
index 7f5058661..a6ccd8484 100644
--- a/kio/kio/jobclasses.h
+++ b/kio/kio/jobclasses.h
@@ -22,11 +22,11 @@
#ifndef __kio_jobclasses_h__
#define __kio_jobclasses_h__
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -51,8 +51,8 @@ namespace KIO {
*
* \code
* KIO::Job * job = KIO::someoperation( some parameters );
- * connect( job, SIGNAL( result( KIO::Job * ) ),
- * this, SLOT( slotResult( KIO::Job * ) ) );
+ * connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ * this, TQT_SLOT( slotResult( KIO::Job * ) ) );
* \endcode
* (other connects, specific to the job)
*
@@ -65,7 +65,7 @@ namespace KIO {
* @see KIO::Scheduler
* @see KIO::Slave
*/
- class KIO_EXPORT Job : public QObject {
+ class KIO_EXPORT Job : public TQObject {
Q_OBJECT
protected:
@@ -108,7 +108,7 @@ namespace KIO {
* @return a string to help understand the error, usually the url
* related to the error. Only valid if error() is not 0.
*/
- const QString & errorText() const { return m_errorText; }
+ const TQString & errorText() const { return m_errorText; }
/**
* Converts an error code and a non-i18n error message into an
@@ -127,7 +127,7 @@ namespace KIO {
* telling the user that the app is broken, so check with
* error() whether there is an error
*/
- QString errorString() const;
+ TQString errorString() const;
/**
* Converts an error code and a non-i18n error message into i18n
@@ -139,7 +139,7 @@ namespace KIO {
* @return the following strings: caption, error + description,
* causes+solutions
*/
- QStringList detailedErrorStrings(const KURL *reqUrl = 0L,
+ TQStringList detailedErrorStrings(const KURL *reqUrl = 0L,
int method = -1) const;
/**
@@ -150,7 +150,7 @@ namespace KIO {
* @param parent the parent widget for the dialog box, can be 0 for
* top-level
*/
- void showErrorDialog( QWidget * parent = 0L );
+ void showErrorDialog( TQWidget * parent = 0L );
/**
* Enable or disable the automatic error handling. When automatic
@@ -165,7 +165,7 @@ namespace KIO {
* Can be 0 for top-level
* @see isAutoErrorHandlingEnabled(), showErrorDialog()
*/
- void setAutoErrorHandlingEnabled( bool enable, QWidget *parentWidget = 0 );
+ void setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget = 0 );
/**
* Returns whether automatic error handling is enabled or disabled.
@@ -219,14 +219,14 @@ namespace KIO {
* @param window the window to associate to
* @see window()
*/
- void setWindow(QWidget *window);
+ void setWindow(TQWidget *window);
/**
* Returns the window this job is associated with.
* @return the associated window
* @see setWindow()
*/
- QWidget *window() const;
+ TQWidget *window() const;
/**
* Updates the last user action timestamp to the given time.
@@ -271,7 +271,7 @@ namespace KIO {
* @see setMetaData()
* @see mergeMetaData()
*/
- void addMetaData(const QString &key, const QString &value);
+ void addMetaData(const TQString &key, const TQString &value);
/**
* Add key/value pairs to the meta data that is sent to the slave.
@@ -280,7 +280,7 @@ namespace KIO {
* @see setMetaData()
* @see mergeMetaData()
*/
- void addMetaData(const QMap<QString,QString> &values);
+ void addMetaData(const TQMap<TQString,TQString> &values);
/**
* Add key/value pairs to the meta data that is sent to the slave.
@@ -289,7 +289,7 @@ namespace KIO {
* @see setMetaData()
* @see addMetaData()
*/
- void mergeMetaData(const QMap<QString,QString> &values);
+ void mergeMetaData(const TQMap<TQString,TQString> &values);
/**
* @internal. For the scheduler. Do not use.
@@ -307,10 +307,10 @@ namespace KIO {
* Query meta data received from the slave.
* (Valid when first data is received and/or slave is finished)
* @param key the key of the meta data to retrieve
- * @return the value of the meta data, or QString::null if the
+ * @return the value of the meta data, or TQString::null if the
* @p key does not exist
*/
- QString queryMetaData(const QString &key);
+ TQString queryMetaData(const TQString &key);
/**
* Returns the processed size for this job.
@@ -342,7 +342,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param msg the info message
*/
- void infoMessage( KIO::Job *job, const QString & msg );
+ void infoMessage( KIO::Job *job, const TQString & msg );
// KDE4: Separate rich-text string from plain-text string, for different widgets.
/**
@@ -351,7 +351,7 @@ namespace KIO {
* @param msg the info message
* @since 3.5
*/
- void warning( KIO::Job *job, const QString & msg );
+ void warning( KIO::Job *job, const TQString & msg );
// KDE4: Separate rich-text string from plain-text string, for different widgets.
/**
@@ -419,7 +419,7 @@ namespace KIO {
* @param msg the info message
* @see infoMessage()
*/
- void slotInfoMessage( KIO::Job *job, const QString &msg );
+ void slotInfoMessage( KIO::Job *job, const TQString &msg );
/**
* Remove speed information.
@@ -503,13 +503,13 @@ namespace KIO {
EF_ListJobUnrestricted = (1 << 3) };
int &extraFlags();
- QPtrList<Job> subjobs;
+ TQPtrList<Job> subjobs;
int m_error;
- QString m_errorText;
+ TQString m_errorText;
unsigned long m_percent;
int m_progressId; // for uiserver
- QTimer *m_speedTimer;
- QGuardedPtr<QWidget> m_window;
+ TQTimer *m_speedTimer;
+ TQGuardedPtr<TQWidget> m_window;
MetaData m_outgoingMetaData;
MetaData m_incomingMetaData;
protected:
@@ -537,7 +537,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
+ SimpleJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo);
~SimpleJob();
@@ -611,14 +611,14 @@ namespace KIO {
* @internal
* Called on a slave's warning.
*/
- void slotWarning( const QString & ); // KDE4: make virtual
+ void slotWarning( const TQString & ); // KDE4: make virtual
/**
* Called on a slave's info message.
* @param s the info message
* @see infoMessage()
*/
- void slotInfoMessage( const QString &s ); // KDE4: make virtual
+ void slotInfoMessage( const TQString &s ); // KDE4: make virtual
/**
* Called on a slave's connected signal.
@@ -652,7 +652,7 @@ namespace KIO {
* Called on a slave's error.
* Made public for the scheduler.
*/
- virtual void slotError( int , const QString & );
+ virtual void slotError( int , const TQString & );
protected slots:
/**
@@ -662,7 +662,7 @@ namespace KIO {
protected:
Slave * m_slave;
- QByteArray m_packedArgs;
+ TQByteArray m_packedArgs;
KURL m_url;
KURL m_subUrl;
int m_command;
@@ -697,7 +697,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- StatJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ StatJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* A stat() can have two meanings. Either we want to read from this URL,
@@ -789,7 +789,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- MkdirJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ MkdirJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* @internal
@@ -843,7 +843,7 @@ namespace KIO {
/**
* Do not create a DirectCopyJob. Use KIO::copy() or KIO::file_copy() instead.
*/
- DirectCopyJob(const KURL& url, int command, const QByteArray &packedArgs,
+ DirectCopyJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo);
/**
* @internal
@@ -886,8 +886,8 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
*/
TransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo);
/**
@@ -945,7 +945,7 @@ namespace KIO {
* Sending an empty block indicates end of data.
* @since 3.2
*/
- void sendAsyncData(const QByteArray &data);
+ void sendAsyncData(const TQByteArray &data);
/**
* When enabled, the job reports the amount of data that has been sent,
@@ -974,7 +974,7 @@ namespace KIO {
* should not be certain of data.size() == 0 ever happening (e.g. in case
* of an error), so you should rely on result() instead.
*/
- void data( KIO::Job *job, const QByteArray &data );
+ void data( KIO::Job *job, const TQByteArray &data );
/**
* Request for data.
@@ -987,7 +987,7 @@ namespace KIO {
* @param data buffer to fill with data to send to the
* slave. An empty buffer indicates end of data. (EOD)
*/
- void dataReq( KIO::Job *job, QByteArray &data );
+ void dataReq( KIO::Job *job, TQByteArray &data );
/**
* Signals a redirection.
@@ -1013,7 +1013,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param type the mime type
*/
- void mimetype( KIO::Job *job, const QString &type );
+ void mimetype( KIO::Job *job, const TQString &type );
/**
* @internal
@@ -1028,11 +1028,11 @@ namespace KIO {
protected slots:
virtual void slotRedirection( const KURL &url);
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
+ virtual void slotData( const TQByteArray &data);
virtual void slotDataReq();
- virtual void slotMimetype( const QString &mimetype );
+ virtual void slotMimetype( const TQString &mimetype );
virtual void slotNeedSubURLData();
- virtual void slotSubURLData(KIO::Job*, const QByteArray &);
+ virtual void slotSubURLData(KIO::Job*, const TQByteArray &);
virtual void slotMetaData( const KIO::MetaData &_metaData);
void slotErrorPage();
void slotCanResume( KIO::filesize_t offset );
@@ -1041,10 +1041,10 @@ namespace KIO {
protected:
bool m_suspended;
bool m_errorPage;
- QByteArray staticData;
+ TQByteArray staticData;
KURL m_redirectionURL;
KURL::List m_redirectionList;
- QString m_mimetype;
+ TQString m_mimetype;
TransferJob *m_subJob;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1054,21 +1054,21 @@ namespace KIO {
/**
* StoredTransferJob is a TransferJob (for downloading or uploading data) that
- * also stores a QByteArray with the data, making it simpler to use than the
+ * also stores a TQByteArray with the data, making it simpler to use than the
* standard TransferJob.
*
- * For KIO::storedGet it puts the data into the member QByteArray, so the user
+ * For KIO::storedGet it puts the data into the member TQByteArray, so the user
* of this class can get hold of the whole data at once by calling data()
* when the result signal is emitted.
* You should only use StoredTransferJob to download data if you cannot
* process the data by chunks while it's being downloaded, since storing
- * everything in a QByteArray can potentially require a lot of memory.
+ * everything in a TQByteArray can potentially require a lot of memory.
*
* For KIO::storedPut the user of this class simply provides the bytearray from
* the start, and the job takes care of uploading it.
* You should only use StoredTransferJob to upload data if you cannot
* provide the in chunks while it's being uploaded, since storing
- * everything in a QByteArray can potentially require a lot of memory.
+ * everything in a TQByteArray can potentially require a lot of memory.
*
* @since 3.3
*/
@@ -1086,28 +1086,28 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
*/
StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo);
/**
* Set data to be uploaded. This is for put jobs.
- * Automatically called by KIO::storedPut(const QByteArray &, ...),
+ * Automatically called by KIO::storedPut(const TQByteArray &, ...),
* do not call this yourself.
*/
- void setData( const QByteArray& arr );
+ void setData( const TQByteArray& arr );
/**
* Get hold of the downloaded data. This is for get jobs.
* You're supposed to call this only from the slot connected to the result() signal.
*/
- QByteArray data() const { return m_data; }
+ TQByteArray data() const { return m_data; }
private slots:
- void slotStoredData( KIO::Job *job, const QByteArray &data );
- void slotStoredDataReq( KIO::Job *job, QByteArray &data );
+ void slotStoredData( KIO::Job *job, const TQByteArray &data );
+ void slotStoredDataReq( KIO::Job *job, TQByteArray &data );
private:
- QByteArray m_data;
+ TQByteArray m_data;
int m_uploadOffset;
};
@@ -1154,14 +1154,14 @@ namespace KIO {
* @param data data received from the slave.
* End of data (EOD) has been reached if data.size() == 0
*/
- void data( long id, const QByteArray &data);
+ void data( long id, const TQByteArray &data);
/**
* Mimetype determined
* @param id the id of the request
* @param type the mime type
*/
- void mimetype( long id, const QString &type );
+ void mimetype( long id, const TQString &type );
/**
* File transfer completed.
@@ -1175,8 +1175,8 @@ namespace KIO {
protected slots:
virtual void slotRedirection( const KURL &url);
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
- virtual void slotMimetype( const QString &mimetype );
+ virtual void slotData( const TQByteArray &data);
+ virtual void slotMimetype( const TQString &mimetype );
private:
struct GetRequest {
public:
@@ -1187,10 +1187,10 @@ namespace KIO {
MetaData metaData;
};
bool findCurrentEntry();
- void flushQueue(QPtrList<GetRequest> &queue);
+ void flushQueue(TQPtrList<GetRequest> &queue);
- QPtrList<GetRequest> m_waitQueue;
- QPtrList<GetRequest> m_activeQueue;
+ TQPtrList<GetRequest> m_waitQueue;
+ TQPtrList<GetRequest> m_activeQueue;
bool b_multiGetActive;
GetRequest *m_currentEntry;
protected:
@@ -1217,14 +1217,14 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- MimetypeJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ MimetypeJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* Call this in the slot connected to result,
* and only after making sure no error happened.
* @return the mimetype of the URL
*/
- QString mimetype() const { return m_mimetype; }
+ TQString mimetype() const { return m_mimetype; }
/**
* @internal
@@ -1310,13 +1310,13 @@ namespace KIO {
*
* @since 3.5.7
*/
- void mimetype( KIO::Job *job, const QString &type );
+ void mimetype( KIO::Job *job, const TQString &type );
public slots:
void slotStart();
- void slotData( KIO::Job *, const QByteArray &data);
- void slotDataReq( KIO::Job *, QByteArray &data);
- void slotMimetype( KIO::Job *, const QString& type );
+ void slotData( KIO::Job *, const TQByteArray &data);
+ void slotDataReq( KIO::Job *, TQByteArray &data);
+ void slotMimetype( KIO::Job *, const TQString& type );
protected slots:
/**
@@ -1369,7 +1369,7 @@ namespace KIO {
bool m_resume:1;
bool m_canResume:1;
bool m_resumeAnswerSent:1;
- QByteArray m_buffer;
+ TQByteArray m_buffer;
SimpleJob *m_moveJob;
SimpleJob *m_copyJob;
TransferJob *m_getJob;
@@ -1400,11 +1400,11 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
* @param recursive true to get the data recursively from child directories,
* false to get only the content of the specified dir
- * @param prefix the prefix of the files, or QString::null for no prefix
+ * @param prefix the prefix of the files, or TQString::null for no prefix
* @param includeHidden true to include hidden files (those starting with '.')
*/
ListJob(const KURL& url, bool showProgressInfo,
- bool recursive = false, QString prefix = QString::null,
+ bool recursive = false, TQString prefix = TQString::null,
bool includeHidden = true);
/**
@@ -1471,7 +1471,7 @@ namespace KIO {
private:
bool recursive;
bool includeHidden;
- QString prefix;
+ TQString prefix;
unsigned long m_processedEntries;
KURL m_redirectionURL;
protected:
@@ -1485,7 +1485,7 @@ namespace KIO {
{
KURL uSource;
KURL uDest;
- QString linkDest; // for symlinks only
+ TQString linkDest; // for symlinks only
int permissions;
//mode_t type;
time_t ctime;
@@ -1594,7 +1594,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param files a list of items that are about to be created.
*/
- void aboutToCreate( KIO::Job *job, const QValueList<KIO::CopyInfo> &files);
+ void aboutToCreate( KIO::Job *job, const TQValueList<KIO::CopyInfo> &files);
/**
* Sends the number of processed files.
@@ -1624,7 +1624,7 @@ namespace KIO {
* being linked
* @param to the destination of the current operation
*/
- void linking( KIO::Job *job, const QString& target, const KURL& to );
+ void linking( KIO::Job *job, const TQString& target, const KURL& to );
/**
* The job is moving a file or directory.
* @param job the job that emitted this signal
@@ -1669,7 +1669,7 @@ namespace KIO {
* @param target the target
* @param to the destination URL
*/
- void copyingLinkDone( KIO::Job *job, const KURL &from, const QString& target, const KURL& to );
+ void copyingLinkDone( KIO::Job *job, const KURL &from, const TQString& target, const KURL& to );
protected:
void statCurrentSrc();
@@ -1692,8 +1692,8 @@ namespace KIO {
void setNextDirAttribute();
private:
void startRenameJob(const KURL &slave_url);
- bool shouldOverwrite( const QString& path ) const;
- bool shouldSkip( const QString& path ) const;
+ bool shouldOverwrite( const TQString& path ) const;
+ bool shouldSkip( const TQString& path ) const;
void skipSrc();
protected slots:
@@ -1724,8 +1724,8 @@ namespace KIO {
KIO::filesize_t m_fileProcessedSize;
int m_processedFiles;
int m_processedDirs;
- QValueList<CopyInfo> files;
- QValueList<CopyInfo> dirs;
+ TQValueList<CopyInfo> files;
+ TQValueList<CopyInfo> dirs;
KURL::List dirsToRemove;
KURL::List m_srcList;
KURL::List::Iterator m_currentStatSrc;
@@ -1736,13 +1736,13 @@ namespace KIO {
KURL m_dest;
KURL m_currentDest;
//
- QStringList m_skipList;
- QStringList m_overwriteList;
+ TQStringList m_skipList;
+ TQStringList m_overwriteList;
bool m_bAutoSkip;
bool m_bOverwriteAll;
int m_conflictError;
- QTimer *m_reportTimer;
+ TQTimer *m_reportTimer;
//these both are used for progress dialog reporting
KURL m_currentSrcURL;
KURL m_currentDestURL;
@@ -1848,9 +1848,9 @@ namespace KIO {
KURL::List dirs;
KURL::List m_srcList;
KURL::List::Iterator m_currentStat;
- QStringList m_parentDirs;
+ TQStringList m_parentDirs;
bool m_shred; // BIC: remove in KDE4
- QTimer *m_reportTimer;
+ TQTimer *m_reportTimer;
protected:
/** \internal */
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp
index 0812c1f14..432a50d31 100644
--- a/kio/kio/kacl.cpp
+++ b/kio/kio/kacl.cpp
@@ -33,7 +33,7 @@
#include <posixacladdons.h>
#endif
#endif
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kdebug.h>
@@ -41,8 +41,8 @@
#ifdef USE_POSIX_ACL
-static void printACL( acl_t acl, const QString &comment );
-static QString aclAsString(const acl_t acl);
+static void printACL( acl_t acl, const TQString &comment );
+static TQString aclAsString(const acl_t acl);
#endif
class KACL::KACLPrivate {
@@ -60,20 +60,20 @@ public:
// helpers
#ifdef USE_POSIX_ACL
bool setMaskPermissions( unsigned short v );
- QString getUserName( uid_t uid ) const;
- QString getGroupName( gid_t gid ) const;
- bool setAllUsersOrGroups( const QValueList< QPair<QString, unsigned short> > &list, acl_tag_t type );
- bool setNamedUserOrGroupPermissions( const QString& name, unsigned short permissions, acl_tag_t type );
+ TQString getUserName( uid_t uid ) const;
+ TQString getGroupName( gid_t gid ) const;
+ bool setAllUsersOrGroups( const TQValueList< QPair<TQString, unsigned short> > &list, acl_tag_t type );
+ bool setNamedUserOrGroupPermissions( const TQString& name, unsigned short permissions, acl_tag_t type );
acl_t m_acl;
#else
int m_acl;
#endif
- mutable QIntDict<QString> m_usercache;
- mutable QIntDict<QString> m_groupcache;
+ mutable TQIntDict<TQString> m_usercache;
+ mutable TQIntDict<TQString> m_groupcache;
};
-KACL::KACL( const QString &aclString )
+KACL::KACL( const TQString &aclString )
: d( new KACLPrivate )
{
setACL( aclString );
@@ -172,12 +172,12 @@ static void permissionsToEntry( acl_entry_t entry, unsigned short v )
if ( v & 1 ) acl_add_perm( permset, ACL_EXECUTE );
}
-static void printACL( acl_t acl, const QString &comment )
+static void printACL( acl_t acl, const TQString &comment )
{
kdDebug() << comment << aclAsString( acl ) << endl;
}
-static int getUidForName( const QString& name )
+static int getUidForName( const TQString& name )
{
struct passwd *user = getpwnam( name.latin1() );
if ( user )
@@ -186,7 +186,7 @@ static int getUidForName( const QString& name )
return -1;
}
-static int getGidForName( const QString& name )
+static int getGidForName( const TQString& name )
{
struct group *group = getgrnam( name.latin1() );
if ( group )
@@ -312,7 +312,7 @@ bool KACL::setMaskPermissions( unsigned short v )
/**************************
* Deal with named users *
**************************/
-unsigned short KACL::namedUserPermissions( const QString& name, bool *exists ) const
+unsigned short KACL::namedUserPermissions( const TQString& name, bool *exists ) const
{
#ifdef USE_POSIX_ACL
acl_entry_t entry;
@@ -339,7 +339,7 @@ unsigned short KACL::namedUserPermissions( const QString& name, bool *exists ) c
}
#ifdef USE_POSIX_ACL
-bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, unsigned short permissions, acl_tag_t type )
+bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const TQString& name, unsigned short permissions, acl_tag_t type )
{
bool allIsWell = true;
acl_t newACL = acl_dup( m_acl );
@@ -352,7 +352,7 @@ bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, uns
acl_get_tag_type( entry, &currentTag );
if ( currentTag == type ) {
int id = * (int*)acl_get_qualifier( entry );
- const QString entryName = type == ACL_USER? getUserName( id ): getGroupName( id );
+ const TQString entryName = type == ACL_USER? getUserName( id ): getGroupName( id );
if ( entryName == name ) {
// found him, update
permissionsToEntry( entry, permissions );
@@ -394,7 +394,7 @@ bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, uns
}
#endif
-bool KACL::setNamedUserPermissions( const QString& name, unsigned short permissions )
+bool KACL::setNamedUserPermissions( const TQString& name, unsigned short permissions )
{
#ifdef USE_POSIX_ACL
return d->setNamedUserOrGroupPermissions( name, permissions, ACL_USER );
@@ -417,7 +417,7 @@ ACLUserPermissionsList KACL::allUserPermissions() const
acl_get_tag_type( entry, &currentTag );
if ( currentTag == ACL_USER ) {
id = *( (uid_t*) acl_get_qualifier( entry ) );
- QString name = d->getUserName( id );
+ TQString name = d->getUserName( id );
unsigned short permissions = entryToPermissions( entry );
ACLUserPermissions pair = qMakePair( name, permissions );
list.append( pair );
@@ -429,7 +429,7 @@ ACLUserPermissionsList KACL::allUserPermissions() const
}
#ifdef USE_POSIX_ACL
-bool KACL::KACLPrivate::setAllUsersOrGroups( const QValueList< QPair<QString, unsigned short> > &list, acl_tag_t type )
+bool KACL::KACLPrivate::setAllUsersOrGroups( const TQValueList< QPair<TQString, unsigned short> > &list, acl_tag_t type )
{
bool allIsWell = true;
bool atLeastOneUserOrGroup = false;
@@ -456,7 +456,7 @@ bool KACL::KACLPrivate::setAllUsersOrGroups( const QValueList< QPair<QString, un
//printACL( newACL, "After cleaning out entries: " );
// now add the entries from the list
- QValueList< QPair<QString, unsigned short> >::const_iterator it = list.constBegin();
+ TQValueList< QPair<TQString, unsigned short> >::const_iterator it = list.constBegin();
while ( it != list.constEnd() ) {
acl_create_entry( &newACL, &entry );
acl_set_tag_type( entry, type );
@@ -506,7 +506,7 @@ bool KACL::setAllUserPermissions( const ACLUserPermissionsList &users )
* Deal with named groups *
**************************/
-unsigned short KACL::namedGroupPermissions( const QString& name, bool *exists ) const
+unsigned short KACL::namedGroupPermissions( const TQString& name, bool *exists ) const
{
*exists = false;
#ifdef USE_POSIX_ACL
@@ -531,7 +531,7 @@ unsigned short KACL::namedGroupPermissions( const QString& name, bool *exists )
return 0;
}
-bool KACL::setNamedGroupPermissions( const QString& name, unsigned short permissions )
+bool KACL::setNamedGroupPermissions( const TQString& name, unsigned short permissions )
{
#ifdef USE_POSIX_ACL
return d->setNamedUserOrGroupPermissions( name, permissions, ACL_GROUP );
@@ -555,7 +555,7 @@ ACLGroupPermissionsList KACL::allGroupPermissions() const
acl_get_tag_type( entry, &currentTag );
if ( currentTag == ACL_GROUP ) {
id = *( (gid_t*) acl_get_qualifier( entry ) );
- QString name = d->getGroupName( id );
+ TQString name = d->getGroupName( id );
unsigned short permissions = entryToPermissions( entry );
ACLGroupPermissions pair = qMakePair( name, permissions );
list.append( pair );
@@ -580,7 +580,7 @@ bool KACL::setAllGroupPermissions( const ACLGroupPermissionsList &groups )
* from and to string *
**************************/
-bool KACL::setACL( const QString &aclStr )
+bool KACL::setACL( const TQString &aclStr )
{
bool ret = false;
#ifdef USE_POSIX_ACL
@@ -603,12 +603,12 @@ bool KACL::setACL( const QString &aclStr )
return ret;
}
-QString KACL::asString() const
+TQString KACL::asString() const
{
#ifdef USE_POSIX_ACL
return aclAsString( d->m_acl );
#else
- return QString::null;
+ return TQString::null;
#endif
}
@@ -616,45 +616,45 @@ QString KACL::asString() const
// helpers
#ifdef USE_POSIX_ACL
-QString KACL::KACLPrivate::getUserName( uid_t uid ) const
+TQString KACL::KACLPrivate::getUserName( uid_t uid ) const
{
- QString *temp;
+ TQString *temp;
temp = m_usercache.find( uid );
if ( !temp ) {
struct passwd *user = getpwuid( uid );
if ( user ) {
- m_usercache.insert( uid, new QString(QString::fromLatin1(user->pw_name)) );
- return QString::fromLatin1( user->pw_name );
+ m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
+ return TQString::fromLatin1( user->pw_name );
}
else
- return QString::number( uid );
+ return TQString::number( uid );
}
else
return *temp;
}
-QString KACL::KACLPrivate::getGroupName( gid_t gid ) const
+TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const
{
- QString *temp;
+ TQString *temp;
temp = m_groupcache.find( gid );
if ( !temp ) {
struct group *grp = getgrgid( gid );
if ( grp ) {
- m_groupcache.insert( gid, new QString(QString::fromLatin1(grp->gr_name)) );
- return QString::fromLatin1( grp->gr_name );
+ m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
+ return TQString::fromLatin1( grp->gr_name );
}
else
- return QString::number( gid );
+ return TQString::number( gid );
}
else
return *temp;
}
-static QString aclAsString(const acl_t acl)
+static TQString aclAsString(const acl_t acl)
{
char *aclString = acl_to_text( acl, 0 );
- QString ret = QString::fromLatin1( aclString );
+ TQString ret = TQString::fromLatin1( aclString );
acl_free( (void*)aclString );
return ret;
}
@@ -665,15 +665,15 @@ static QString aclAsString(const acl_t acl)
void KACL::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-QDataStream & operator<< ( QDataStream & s, const KACL & a )
+TQDataStream & operator<< ( TQDataStream & s, const KACL & a )
{
s << a.asString();
return s;
}
-QDataStream & operator>> ( QDataStream & s, KACL & a )
+TQDataStream & operator>> ( TQDataStream & s, KACL & a )
{
- QString str;
+ TQString str;
s >> str;
a.setACL( str );
return s;
diff --git a/kio/kio/kacl.h b/kio/kio/kacl.h
index c5254f054..53bc762b0 100644
--- a/kio/kio/kacl.h
+++ b/kio/kio/kacl.h
@@ -23,15 +23,15 @@
#include <sys/types.h>
#include <kio/global.h>
-typedef QPair<QString, unsigned short> ACLUserPermissions;
-typedef QValueList<ACLUserPermissions> ACLUserPermissionsList;
-typedef QValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
-typedef QValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
+typedef QPair<TQString, unsigned short> ACLUserPermissions;
+typedef TQValueList<ACLUserPermissions> ACLUserPermissionsList;
+typedef TQValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
+typedef TQValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
-typedef QPair<QString, unsigned short> ACLGroupPermissions;
-typedef QValueList<ACLGroupPermissions> ACLGroupPermissionsList;
-typedef QValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
-typedef QValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
+typedef QPair<TQString, unsigned short> ACLGroupPermissions;
+typedef TQValueList<ACLGroupPermissions> ACLGroupPermissionsList;
+typedef TQValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
+typedef TQValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
/**
* The KCAL class encapsulates a POSIX Access Control List. It follows the
@@ -46,7 +46,7 @@ public:
* Creates a new KACL from @p aclString. If the string is a valid acl
* string, isValid() will afterwards return true.
*/
- KACL( const QString & aclString );
+ KACL( const TQString & aclString );
/** Copy ctor */
KACL( const KACL& rhs );
@@ -137,13 +137,13 @@ public:
* exists. @p exists is set to true if a matching entry exists and
* to false otherwise.
* @return the permissions for a user entry with the name in @p name */
- unsigned short namedUserPermissions( const QString& name, bool *exists ) const;
+ unsigned short namedUserPermissions( const TQString& name, bool *exists ) const;
/** Set the permissions for a user with the name @p name. Will fail
* if the user doesn't exist, in which case the ACL will be unchanged.
* @return success or failure. */
- bool setNamedUserPermissions( const QString& name, unsigned short );
+ bool setNamedUserPermissions( const TQString& name, unsigned short );
/** Returns the list of all group permission entries. Each entry consists
* of a name/permissions pair. This is a QPair, therefore access is provided
@@ -162,12 +162,12 @@ public:
* exists. @p exists is set to true if a matching entry exists and
* to false otherwise.
* @return the permissions for a group with the name in @p name */
- unsigned short namedGroupPermissions( const QString& name, bool *exists ) const;
+ unsigned short namedGroupPermissions( const TQString& name, bool *exists ) const;
/** Set the permissions for a group with the name @p name. Will fail
* if the group doesn't exist, in which case the ACL be unchanged.
* @return success or failure. */
- bool setNamedGroupPermissions( const QString& name, unsigned short );
+ bool setNamedGroupPermissions( const TQString& name, unsigned short );
/** Returns the list of all group permission entries. Each entry consists
* of a name/permissions pair. This is a QPair, therefor access is provided
@@ -184,24 +184,24 @@ public:
/** Sets the whole list from a string. If the string in @p aclStr represents
* a valid ACL, it will be set, otherwise the ACL remains unchanged.
* @return whether setting the ACL was successful. */
- bool setACL( const QString &aclStr );
+ bool setACL( const TQString &aclStr );
/** Return a string representation of the ACL.
* @return a string version of the ACL in the format compatible with libacl and
* POSIX 1003.1e. Implementations conforming to that standard should be able
* to take such strings as input. */
- QString asString() const;
+ TQString asString() const;
protected:
virtual void virtual_hook( int id, void* data );
private:
class KACLPrivate;
KACLPrivate * d;
- KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KACL & a );
- KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KACL & a );
+ KIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
+ KIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KACL & a );
};
-KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KACL & a );
-KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KACL & a );
+KIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
+KIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KACL & a );
#endif
diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp
index 557512529..9f9435294 100644
--- a/kio/kio/kar.cpp
+++ b/kio/kio/kar.cpp
@@ -17,13 +17,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <time.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kmimetype.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kfilterdev.h"
#include "kar.h"
@@ -39,19 +39,19 @@ public:
KArPrivate() {}
};
-KAr::KAr( const QString& filename )
+KAr::KAr( const TQString& filename )
: KArchive( 0L )
{
//kdDebug(7042) << "KAr(filename) reached." << endl;
m_filename = filename;
d = new KArPrivate;
- setDevice( new QFile( filename ) );
+ setDevice( new TQFile( filename ) );
}
-KAr::KAr( QIODevice * dev )
+KAr::KAr( TQIODevice * dev )
: KArchive( dev )
{
- //kdDebug(7042) << "KAr::KAr( QIODevice * dev) reached." << endl;
+ //kdDebug(7042) << "KAr::KAr( TQIODevice * dev) reached." << endl;
d = new KArPrivate;
}
@@ -80,7 +80,7 @@ bool KAr::openArchive( int mode )
return false;
}
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if ( !dev )
return false;
@@ -93,9 +93,9 @@ bool KAr::openArchive( int mode )
char *ar_longnames = 0;
while (! dev->atEnd()) {
- QCString ar_header;
+ TQCString ar_header;
ar_header.resize(61);
- QCString name;
+ TQCString name;
int date, uid, gid, mode, size;
dev->at( dev->at() + (2 - (dev->at() % 2)) % 2 ); // Ar headers are padded to byte boundary
diff --git a/kio/kio/kar.h b/kio/kio/kar.h
index d91972cee..1b8f2cef2 100644
--- a/kio/kio/kar.h
+++ b/kio/kio/kar.h
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <karchive.h>
@@ -43,14 +43,14 @@ public:
*
* @param filename is a local path (e.g. "/home/holger/myfile.ar")
*/
- KAr( const QString& filename );
+ KAr( const TQString& filename );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
* @param dev the device to read from
*/
- KAr( QIODevice * dev );
+ KAr( TQIODevice * dev );
/**
* If the ar file is still opened, then it will be
@@ -60,15 +60,15 @@ public:
/**
* The name of the ar file, as passed to the constructor.
- * @return the filename. Null if you used the QIODevice constructor
+ * @return the filename. Null if you used the TQIODevice constructor
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
/*
* Writing not supported by this class, will always fail.
* @return always false
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); Q_UNUSED(size); return false; }
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); Q_UNUSED(size); return false; }
/*
* Writing not supported by this class, will always fail.
@@ -80,7 +80,7 @@ public:
* Writing not supported by this class, will always fail.
* @return always false
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return false; }
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return false; }
protected:
/**
@@ -95,7 +95,7 @@ protected:
protected:
virtual void virtual_hook( int id, void* data );
private:
- QString m_filename;
+ TQString m_filename;
class KArPrivate;
KArPrivate * d;
};
diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp
index ef50e289f..592e513d4 100644
--- a/kio/kio/karchive.cpp
+++ b/kio/kio/karchive.cpp
@@ -30,13 +30,13 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qvaluestack.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqvaluestack.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kfilterdev.h>
@@ -46,7 +46,7 @@
#include "karchive.h"
#include "klimitediodevice.h"
-template class QDict<KArchiveEntry>;
+template class TQDict<KArchiveEntry>;
class KArchive::KArchivePrivate
@@ -56,10 +56,10 @@ public:
bool closeSucceeded;
};
-class PosSortedPtrList : public QPtrList<KArchiveFile> {
+class PosSortedPtrList : public TQPtrList<KArchiveFile> {
protected:
- int compareItems( QPtrCollection::Item i1,
- QPtrCollection::Item i2 )
+ int compareItems( TQPtrCollection::Item i1,
+ TQPtrCollection::Item i2 )
{
int pos1 = static_cast<KArchiveFile*>( i1 )->position();
int pos2 = static_cast<KArchiveFile*>( i2 )->position();
@@ -72,7 +72,7 @@ protected:
/////////////////////////// KArchive ///////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchive::KArchive( QIODevice * dev )
+KArchive::KArchive( TQIODevice * dev )
{
d = new KArchivePrivate;
d->rootDir = 0;
@@ -133,9 +133,9 @@ const KArchiveDirectory* KArchive::directory() const
}
-bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
+bool KArchive::addLocalFile( const TQString& fileName, const TQString& destName )
{
- QFileInfo fileInfo( fileName );
+ TQFileInfo fileInfo( fileName );
if ( !fileInfo.isFile() && !fileInfo.isSymLink() )
{
kdWarning() << "KArchive::addLocalFile " << fileName << " doesn't exist or is not a regular file." << endl;
@@ -143,7 +143,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
}
KDE_struct_stat fi;
- if (KDE_lstat(QFile::encodeName(fileName),&fi) == -1) {
+ if (KDE_lstat(TQFile::encodeName(fileName),&fi) == -1) {
kdWarning() << "KArchive::addLocalFile stating " << fileName
<< " failed: " << strerror(errno) << endl;
return false;
@@ -160,7 +160,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
// the file must be opened before prepareWriting is called, otherwise
// if the opening fails, no content will follow the already written
// header and the tar file is effectively f*cked up
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning() << "KArchive::addLocalFile couldn't open file " << fileName << endl;
@@ -175,7 +175,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
}
// Read and write data in chunks to minimize memory usage
- QByteArray array(8*1024);
+ TQByteArray array(8*1024);
int n;
uint total = 0;
while ( ( n = file.readBlock( array.data(), array.size() ) ) > 0 )
@@ -197,23 +197,23 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
return true;
}
-bool KArchive::addLocalDirectory( const QString& path, const QString& destName )
+bool KArchive::addLocalDirectory( const TQString& path, const TQString& destName )
{
- QString dot = ".";
- QString dotdot = "..";
- QDir dir( path );
+ TQString dot = ".";
+ TQString dotdot = "..";
+ TQDir dir( path );
if ( !dir.exists() )
return false;
- dir.setFilter(dir.filter() | QDir::Hidden);
- QStringList files = dir.entryList();
- for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it )
+ dir.setFilter(dir.filter() | TQDir::Hidden);
+ TQStringList files = dir.entryList();
+ for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it )
{
if ( *it != dot && *it != dotdot )
{
- QString fileName = path + "/" + *it;
+ TQString fileName = path + "/" + *it;
// kdDebug() << "storing " << fileName << endl;
- QString dest = destName.isEmpty() ? *it : (destName + "/" + *it);
- QFileInfo fileInfo( fileName );
+ TQString dest = destName.isEmpty() ? *it : (destName + "/" + *it);
+ TQFileInfo fileInfo( fileName );
if ( fileInfo.isFile() || fileInfo.isSymLink() )
addLocalFile( fileName, dest );
@@ -225,15 +225,15 @@ bool KArchive::addLocalDirectory( const QString& path, const QString& destName )
return true;
}
-bool KArchive::writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data )
+bool KArchive::writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data )
{
mode_t perm = 0100644;
time_t the_time = time(0);
return writeFile(name,user,group,size,perm,the_time,the_time,the_time,data);
}
-bool KArchive::prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime ) {
PrepareWritingParams params;
params.name = &name;
@@ -248,16 +248,16 @@ bool KArchive::prepareWriting( const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint size, mode_t /*perm*/,
+bool KArchive::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint size, mode_t /*perm*/,
time_t /*atime*/, time_t /*mtime*/, time_t /*ctime*/ ) {
kdWarning(7040) << "New prepareWriting API not implemented in this class." << endl
<< "Falling back to old API (metadata information will be lost)" << endl;
return prepareWriting(name,user,group,size);
}
-bool KArchive::writeFile( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::writeFile( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
WriteFileParams params;
@@ -274,8 +274,8 @@ bool KArchive::writeFile( const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::writeFile_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::writeFile_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
@@ -301,8 +301,8 @@ bool KArchive::writeFile_impl( const QString& name, const QString& user,
return true;
}
-bool KArchive::writeDir(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+bool KArchive::writeDir(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
WriteDirParams params;
params.name = &name;
@@ -316,16 +316,16 @@ bool KArchive::writeDir(const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::writeDir_impl(const QString &name, const QString &user,
- const QString &group, mode_t /*perm*/,
+bool KArchive::writeDir_impl(const TQString &name, const TQString &user,
+ const TQString &group, mode_t /*perm*/,
time_t /*atime*/, time_t /*mtime*/, time_t /*ctime*/ ) {
kdWarning(7040) << "New writeDir API not implemented in this class." << endl
<< "Falling back to old API (metadata information will be lost)" << endl;
return writeDir(name,user,group);
}
-bool KArchive::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KArchive::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
WriteSymlinkParams params;
params.name = &name;
@@ -340,8 +340,8 @@ bool KArchive::writeSymLink(const QString &name, const QString &target,
return params.retval;
}
-bool KArchive::writeSymLink_impl(const QString &/*name*/,const QString &/*target*/,
- const QString &/*user*/, const QString &/*group*/,
+bool KArchive::writeSymLink_impl(const TQString &/*name*/,const TQString &/*target*/,
+ const TQString &/*user*/, const TQString &/*group*/,
mode_t /*perm*/, time_t /*atime*/, time_t /*mtime*/,
time_t /*ctime*/) {
kdWarning(7040) << "writeSymLink not implemented in this class." << endl
@@ -372,15 +372,15 @@ KArchiveDirectory * KArchive::rootDir()
//kdDebug() << "Making root dir " << endl;
struct passwd* pw = getpwuid( getuid() );
struct group* grp = getgrgid( getgid() );
- QString username = pw ? QFile::decodeName(pw->pw_name) : QString::number( getuid() );
- QString groupname = grp ? QFile::decodeName(grp->gr_name) : QString::number( getgid() );
+ TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() );
+ TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() );
- d->rootDir = new KArchiveDirectory( this, QString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, QString::null );
+ d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
}
return d->rootDir;
}
-KArchiveDirectory * KArchive::findOrCreate( const QString & path )
+KArchiveDirectory * KArchive::findOrCreate( const TQString & path )
{
//kdDebug() << "KArchive::findOrCreate " << path << endl;
if ( path.isEmpty() || path == "/" || path == "." ) // root dir => found
@@ -408,7 +408,7 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
// Otherwise go up and try again
int pos = path.findRev( '/' );
KArchiveDirectory * parent;
- QString dirname;
+ TQString dirname;
if ( pos == -1 ) // no more slash => create in root dir
{
parent = rootDir();
@@ -416,7 +416,7 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
}
else
{
- QString left = path.left( pos );
+ TQString left = path.left( pos );
dirname = path.mid( pos + 1 );
parent = findOrCreate( left ); // recursive call... until we find an existing dir.
}
@@ -425,12 +425,12 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
// Found -> add the missing piece
KArchiveDirectory * e = new KArchiveDirectory( this, dirname, d->rootDir->permissions(),
d->rootDir->date(), d->rootDir->user(),
- d->rootDir->group(), QString::null );
+ d->rootDir->group(), TQString::null );
parent->addEntry( e );
return e; // now a directory to <path> exists
}
-void KArchive::setDevice( QIODevice * dev )
+void KArchive::setDevice( TQIODevice * dev )
{
m_dev = dev;
}
@@ -444,9 +444,9 @@ void KArchive::setRootDir( KArchiveDirectory *rootDir )
////////////////////////////////////////////////////////////////////////
/////////////////////// KArchiveEntry //////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchiveEntry::KArchiveEntry( KArchive* t, const QString& name, int access, int date,
- const QString& user, const QString& group, const
- QString& symlink)
+KArchiveEntry::KArchiveEntry( KArchive* t, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const
+ TQString& symlink)
{
m_name = name;
m_access = access;
@@ -458,9 +458,9 @@ KArchiveEntry::KArchiveEntry( KArchive* t, const QString& name, int access, int
}
-QDateTime KArchiveEntry::datetime() const
+TQDateTime KArchiveEntry::datetime() const
{
- QDateTime d;
+ TQDateTime d;
d.setTime_t( m_date );
return d;
}
@@ -469,9 +469,9 @@ QDateTime KArchiveEntry::datetime() const
/////////////////////// KArchiveFile ///////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchiveFile::KArchiveFile( KArchive* t, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString & symlink,
+KArchiveFile::KArchiveFile( KArchive* t, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString & symlink,
int pos, int size )
: KArchiveEntry( t, name, access, date, user, group, symlink )
{
@@ -489,12 +489,12 @@ int KArchiveFile::size() const
return m_size;
}
-QByteArray KArchiveFile::data() const
+TQByteArray KArchiveFile::data() const
{
archive()->device()->at( m_pos );
// Read content
- QByteArray arr( m_size );
+ TQByteArray arr( m_size );
if ( m_size )
{
assert( arr.data() );
@@ -506,14 +506,14 @@ QByteArray KArchiveFile::data() const
}
// ** This should be a virtual method, and this code should be in ktar.cpp
-QIODevice *KArchiveFile::device() const
+TQIODevice *KArchiveFile::device() const
{
return new KLimitedIODevice( archive()->device(), m_pos, m_size );
}
-void KArchiveFile::copyTo(const QString& dest) const
+void KArchiveFile::copyTo(const TQString& dest) const
{
- QFile f( dest + "/" + name() );
+ TQFile f( dest + "/" + name() );
f.open( IO_ReadWrite | IO_Truncate );
f.writeBlock( data() );
f.close();
@@ -524,28 +524,28 @@ void KArchiveFile::copyTo(const QString& dest) const
////////////////////////////////////////////////////////////////////////
-KArchiveDirectory::KArchiveDirectory( KArchive* t, const QString& name, int access,
+KArchiveDirectory::KArchiveDirectory( KArchive* t, const TQString& name, int access,
int date,
- const QString& user, const QString& group,
- const QString &symlink)
+ const TQString& user, const TQString& group,
+ const TQString &symlink)
: KArchiveEntry( t, name, access, date, user, group, symlink )
{
m_entries.setAutoDelete( true );
}
-QStringList KArchiveDirectory::entries() const
+TQStringList KArchiveDirectory::entries() const
{
- QStringList l;
+ TQStringList l;
- QDictIterator<KArchiveEntry> it( m_entries );
+ TQDictIterator<KArchiveEntry> it( m_entries );
for( ; it.current(); ++it )
l.append( it.currentKey() );
return l;
}
-KArchiveEntry* KArchiveDirectory::entry( QString name )
- // not "const QString & name" since we want a local copy
+KArchiveEntry* KArchiveDirectory::entry( TQString name )
+ // not "const TQString & name" since we want a local copy
// (to remove leading slash if any)
{
int pos = name.find( '/' );
@@ -567,8 +567,8 @@ KArchiveEntry* KArchiveDirectory::entry( QString name )
}
if ( pos != -1 )
{
- QString left = name.left( pos );
- QString right = name.mid( pos + 1 );
+ TQString left = name.left( pos );
+ TQString right = name.mid( pos + 1 );
//kdDebug() << "KArchiveDirectory::entry left=" << left << " right=" << right << endl;
@@ -581,7 +581,7 @@ KArchiveEntry* KArchiveDirectory::entry( QString name )
return m_entries[ name ];
}
-const KArchiveEntry* KArchiveDirectory::entry( QString name ) const
+const KArchiveEntry* KArchiveDirectory::entry( TQString name ) const
{
return ((KArchiveDirectory*)this)->entry( name );
}
@@ -596,26 +596,26 @@ void KArchiveDirectory::addEntry( KArchiveEntry* entry )
m_entries.insert( entry->name(), entry );
}
-void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
+void KArchiveDirectory::copyTo(const TQString& dest, bool recursiveCopy ) const
{
- QDir root;
+ TQDir root;
PosSortedPtrList fileList;
- QMap<int, QString> fileToDir;
+ TQMap<int, TQString> fileToDir;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
// placeholders for iterated items
KArchiveDirectory* curDir;
- QString curDirName;
+ TQString curDirName;
- QStringList dirEntries;
+ TQStringList dirEntries;
KArchiveEntry* curEntry;
KArchiveFile* curFile;
- QPtrStack<KArchiveDirectory> dirStack;
- QValueStack<QString> dirNameStack;
+ TQPtrStack<KArchiveDirectory> dirStack;
+ TQValueStack<TQString> dirNameStack;
dirStack.push( this ); // init stack at current directory
dirNameStack.push( dest ); // ... with given path
@@ -628,7 +628,7 @@ void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
for ( it = dirEntries.begin(); it != dirEntries.end(); ++it ) {
curEntry = curDir->entry(*it);
if (!curEntry->symlink().isEmpty()) {
- const QString linkName = curDirName+'/'+curEntry->name();
+ const TQString linkName = curDirName+'/'+curEntry->name();
kdDebug() << "symlink(" << curEntry->symlink() << ',' << linkName << ')';
#ifdef Q_OS_UNIX
if (!::symlink(curEntry->symlink().local8Bit(), linkName.local8Bit())) {
diff --git a/kio/kio/karchive.h b/kio/kio/karchive.h
index 0011e5ebb..dbfe02bff 100644
--- a/kio/kio/karchive.h
+++ b/kio/kio/karchive.h
@@ -24,10 +24,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <kdelibs_export.h>
@@ -47,7 +47,7 @@ protected:
* @param dev the I/O device where the archive reads its data
* Note that this can be a file, but also a data buffer, a compression filter, etc.
*/
- KArchive( QIODevice * dev );
+ KArchive( TQIODevice * dev );
public:
virtual ~KArchive();
@@ -93,7 +93,7 @@ public:
* The underlying device.
* @return the underlying device.
*/
- QIODevice * device() const { return m_dev; }
+ TQIODevice * device() const { return m_dev; }
/**
* If an archive is opened for reading, then the contents
@@ -112,7 +112,7 @@ public:
* @param fileName full path to an existing local file, to be added to the archive.
* @param destName the resulting name (or relative path) of the file in the archive.
*/
- bool addLocalFile( const QString& fileName, const QString& destName );
+ bool addLocalFile( const TQString& fileName, const TQString& destName );
/**
* Writes a local directory into the archive, including all its contents, recursively.
@@ -125,7 +125,7 @@ public:
* @param path full path to an existing local directory, to be added to the archive.
* @param destName the resulting name (or relative path) of the file in the archive.
*/
- bool addLocalDirectory( const QString& path, const QString& destName );
+ bool addLocalDirectory( const TQString& path, const TQString& destName );
/**
* If an archive is opened for writing then you can add new directories
@@ -139,7 +139,7 @@ public:
* writeDir(name,user,group,perm,atime,mtime,ctime)
* or eliminate it
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group ) = 0;
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group ) = 0;
/**
* If an archive is opened for writing then you can add new directories
@@ -158,7 +158,7 @@ public:
* @since 3.2
* @todo TODO(BIC): make this virtual. For now use virtual hook
*/
- bool writeDir( const QString& name, const QString& user, const QString& group,
+ bool writeDir( const TQString& name, const TQString& user, const TQString& group,
mode_t perm, time_t atime, time_t mtime, time_t ctime );
/**
@@ -175,8 +175,8 @@ public:
* @since 3.2
* @todo TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
*/
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
/**
@@ -192,7 +192,7 @@ public:
* @todo TODO(BIC): make this a thin non-virtual wrapper around
* writeFile(name,user,group,size,perm,atime,mtime,ctime,data)
*/
- virtual bool writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data );
+ virtual bool writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data );
/**
* If an archive is opened for writing then you can add a new file
@@ -215,7 +215,7 @@ public:
* @since 3.2
* @todo TODO(BIC): make virtual. For now use virtual hook
*/
- bool writeFile( const QString& name, const QString& user, const QString& group,
+ bool writeFile( const TQString& name, const TQString& user, const TQString& group,
uint size, mode_t perm, time_t atime, time_t mtime,
time_t ctime, const char* data );
@@ -235,7 +235,7 @@ public:
* prepareWriting(name,user,group,size,perm,atime,mtime,ctime)
* or eliminate it.
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size ) = 0;
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ) = 0;
/**
* Here's another way of writing a file into an archive:
@@ -258,8 +258,8 @@ public:
* @since 3.2
* @todo TODO(BIC): make this virtual. For now use virtual hook.
*/
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
/**
@@ -304,12 +304,12 @@ protected:
* @param path the path of the directory
* @return the directory with the given @p path
*/
- KArchiveDirectory * findOrCreate( const QString & path );
+ KArchiveDirectory * findOrCreate( const TQString & path );
/**
* @internal for inherited constructors
*/
- void setDevice( QIODevice *dev );
+ void setDevice( TQIODevice *dev );
/**
* @internal for inherited classes
@@ -317,7 +317,7 @@ protected:
void setRootDir( KArchiveDirectory *rootDir );
private:
- QIODevice * m_dev;
+ TQIODevice * m_dev;
bool m_open;
char m_mode;
protected:
@@ -325,51 +325,51 @@ protected:
/* @internal for virtual_hook */
enum { VIRTUAL_WRITE_DATA = 1, VIRTUAL_WRITE_SYMLINK, VIRTUAL_WRITE_DIR,
VIRTUAL_WRITE_FILE, VIRTUAL_PREPARE_WRITING };
- bool prepareWriting_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
struct PrepareWritingParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
uint size;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
};
- bool writeFile_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool writeFile_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data );
struct WriteFileParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
uint size;
mode_t perm;
time_t atime, mtime, ctime;
const char *data;
bool retval;
};
- bool writeDir_impl(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+ bool writeDir_impl(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
struct WriteDirParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
};
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
struct WriteSymlinkParams {
- const QString *name;
- const QString *target;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *target;
+ const TQString *user;
+ const TQString *group;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
@@ -403,11 +403,11 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
*/
- KArchiveEntry( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString &symlink );
+ KArchiveEntry( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString &symlink );
virtual ~KArchiveEntry() { }
@@ -415,7 +415,7 @@ public:
* Creation date of the file.
* @return the creation date
*/
- QDateTime datetime() const;
+ TQDateTime datetime() const;
/**
* Creation date of the file.
@@ -427,7 +427,7 @@ public:
* Name of the file without path.
* @return the file name without path
*/
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
/**
* The permissions and mode flags as returned by the stat() function
* in st_mode.
@@ -438,18 +438,18 @@ public:
* User who created the file.
* @return the owner of the file
*/
- QString user() const { return m_user; }
+ TQString user() const { return m_user; }
/**
* Group of the user who created the file.
* @return the group of the file
*/
- QString group() const { return m_group; }
+ TQString group() const { return m_group; }
/**
* Symlink if there is one.
- * @return the symlink, or QString::null
+ * @return the symlink, or TQString::null
*/
- QString symlink() const { return m_symlink; }
+ TQString symlink() const { return m_symlink; }
/**
* Checks whether the entry is a file.
@@ -467,12 +467,12 @@ protected:
KArchive* archive() const { return m_archive; }
private:
- QString m_name;
+ TQString m_name;
int m_date;
mode_t m_access;
- QString m_user;
- QString m_group;
- QString m_symlink;
+ TQString m_user;
+ TQString m_group;
+ TQString m_symlink;
KArchive* m_archive;
protected:
virtual void virtual_hook( int id, void* data );
@@ -498,12 +498,12 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
* @param pos the position of the file in the directory
* @param size the size of the file
*/
- KArchiveFile( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group, const QString &symlink,
+ KArchiveFile( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const TQString &symlink,
int pos, int size );
virtual ~KArchiveFile() { }
@@ -529,17 +529,17 @@ public:
* Call data() with care (only once per file), this data isn't cached.
* @return the content of this file.
*/
- virtual QByteArray data() const;
+ virtual TQByteArray data() const;
/**
- * This method returns QIODevice (internal class: KLimitedIODevice)
- * on top of the underlying QIODevice. This is obviously for reading only.
+ * This method returns TQIODevice (internal class: KLimitedIODevice)
+ * on top of the underlying TQIODevice. This is obviously for reading only.
* Note that the ownership of the device is being transferred to the caller,
* who will have to delete it.
* The returned device auto-opens (in readonly mode), no need to open it.
- * @return the QIODevice of the file
+ * @return the TQIODevice of the file
*/
- QIODevice *device() const; // TODO make virtual
+ TQIODevice *device() const; // TODO make virtual
/**
* Checks whether this entry is a file.
@@ -552,7 +552,7 @@ public:
* @param dest the directory to extract to
* @since 3.1
*/
- void copyTo(const QString& dest) const;
+ void copyTo(const TQString& dest) const;
private:
int m_pos; // TODO use Q_LONG in KDE-4.0
@@ -581,11 +581,11 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
*/
- KArchiveDirectory( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString& symlink);
+ KArchiveDirectory( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString& symlink);
virtual ~KArchiveDirectory() { }
@@ -593,19 +593,19 @@ public:
* Returns a list of sub-entries.
* @return the names of all entries in this directory (filenames, no path).
*/
- QStringList entries() const;
+ TQStringList entries() const;
/**
* Returns the entry with the given name.
* @param name may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
* @return a pointer to the entry in the directory.
*/
- KArchiveEntry* entry( QString name );
+ KArchiveEntry* entry( TQString name );
/**
* Returns the entry with the given name.
* @param name may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
* @return a pointer to the entry in the directory.
*/
- const KArchiveEntry* entry( QString name ) const;
+ const KArchiveEntry* entry( TQString name ) const;
/**
* @internal
@@ -626,10 +626,10 @@ public:
* @param recursive if set to true, subdirectories are extracted as well
* @since 3.1
*/
- void copyTo(const QString& dest, bool recursive = true) const;
+ void copyTo(const TQString& dest, bool recursive = true) const;
private:
- QDict<KArchiveEntry> m_entries;
+ TQDict<KArchiveEntry> m_entries;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kautomount.cpp b/kio/kio/kautomount.cpp
index 23d3c970c..a4782c313 100644
--- a/kio/kio/kautomount.cpp
+++ b/kio/kio/kautomount.cpp
@@ -29,8 +29,8 @@
*
***********************************************************************/
-KAutoMount::KAutoMount( bool _readonly, const QString& _format, const QString& _device,
- const QString& _mountpoint, const QString & _desktopFile,
+KAutoMount::KAutoMount( bool _readonly, const TQString& _format, const TQString& _device,
+ const TQString& _mountpoint, const TQString & _desktopFile,
bool _show_filemanager_window )
: m_strDevice( _device ),
m_desktopFile( _desktopFile )
@@ -39,7 +39,7 @@ KAutoMount::KAutoMount( bool _readonly, const QString& _format, const QString& _
m_bShowFilemanagerWindow = _show_filemanager_window;
KIO::Job* job = KIO::mount( _readonly, _format.ascii(), _device, _mountpoint );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void KAutoMount::slotResult( KIO::Job * job )
@@ -77,11 +77,11 @@ void KAutoMount::slotResult( KIO::Job * job )
delete this;
}
-KAutoUnmount::KAutoUnmount( const QString & _mountpoint, const QString & _desktopFile )
+KAutoUnmount::KAutoUnmount( const TQString & _mountpoint, const TQString & _desktopFile )
: m_desktopFile( _desktopFile ), m_mountpoint( _mountpoint )
{
KIO::Job * job = KIO::unmount( m_mountpoint );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void KAutoUnmount::slotResult( KIO::Job * job )
diff --git a/kio/kio/kautomount.h b/kio/kio/kautomount.h
index 07f37c1c1..1d8662590 100644
--- a/kio/kio/kautomount.h
+++ b/kio/kio/kautomount.h
@@ -19,8 +19,8 @@
#ifndef __auto_mount_h__
#define __auto_mount_h__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -54,8 +54,8 @@ public:
* @param show_filemanager_window if true, a file-manager window for that mountpoint is shown after
* the mount, if successful.
*/
- KAutoMount( bool readonly, const QString& format, const QString& device, const QString& mountpoint,
- const QString & desktopFile, bool show_filemanager_window = true );
+ KAutoMount( bool readonly, const TQString& format, const TQString& device, const TQString& mountpoint,
+ const TQString & desktopFile, bool show_filemanager_window = true );
signals:
/** Emitted when the directory has been mounted */
@@ -67,9 +67,9 @@ protected slots:
void slotResult( KIO::Job * );
protected:
- QString m_strDevice;
+ TQString m_strDevice;
bool m_bShowFilemanagerWindow;
- QString m_desktopFile;
+ TQString m_desktopFile;
private:
/** KAutoMount deletes itself. Don't delete it manually. */
~KAutoMount() {}
@@ -94,7 +94,7 @@ public:
* @param desktopFile the file the user clicked on - to notify KDirWatch of the fact that
* it should emit fileDirty for it (to have the icon change)
*/
- KAutoUnmount( const QString & mountpoint, const QString & desktopFile );
+ KAutoUnmount( const TQString & mountpoint, const TQString & desktopFile );
signals:
/** Emitted when the directory has been unmounted */
@@ -105,8 +105,8 @@ signals:
protected slots:
void slotResult( KIO::Job * );
private:
- QString m_desktopFile;
- QString m_mountpoint;
+ TQString m_desktopFile;
+ TQString m_mountpoint;
private:
/** KAutoUnmount deletes itself. Don't delete it manually. */
~KAutoUnmount() {}
diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp
index 2b7c58665..bb6462006 100644
--- a/kio/kio/kdatatool.cpp
+++ b/kio/kio/kdatatool.cpp
@@ -28,8 +28,8 @@
#include <ktrader.h>
#include <kparts/componentfactory.h>
-#include <qpixmap.h>
-#include <qfile.h>
+#include <tqpixmap.h>
+#include <tqfile.h>
/*************************************************
*
@@ -68,18 +68,18 @@ KDataToolInfo& KDataToolInfo::operator= ( const KDataToolInfo& info )
return *this;
}
-QString KDataToolInfo::dataType() const
+TQString KDataToolInfo::dataType() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->property( "DataType" ).toString();
}
-QStringList KDataToolInfo::mimeTypes() const
+TQStringList KDataToolInfo::mimeTypes() const
{
if ( !m_service )
- return QStringList();
+ return TQStringList();
return m_service->property( "DataMimeTypes" ).toStringList();
}
@@ -92,58 +92,58 @@ bool KDataToolInfo::isReadOnly() const
return m_service->property( "ReadOnly" ).toBool();
}
-QPixmap KDataToolInfo::icon() const
+TQPixmap KDataToolInfo::icon() const
{
if ( !m_service )
- return QPixmap();
+ return TQPixmap();
- QPixmap pix;
- QStringList lst = KGlobal::dirs()->resourceDirs("icon");
- QStringList::ConstIterator it = lst.begin();
+ TQPixmap pix;
+ TQStringList lst = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::ConstIterator it = lst.begin();
while (!pix.load( *it + "/" + m_service->icon() ) && it != lst.end() )
it++;
return pix;
}
-QPixmap KDataToolInfo::miniIcon() const
+TQPixmap KDataToolInfo::miniIcon() const
{
if ( !m_service )
- return QPixmap();
+ return TQPixmap();
- QPixmap pix;
- QStringList lst = KGlobal::dirs()->resourceDirs("mini");
- QStringList::ConstIterator it = lst.begin();
+ TQPixmap pix;
+ TQStringList lst = KGlobal::dirs()->resourceDirs("mini");
+ TQStringList::ConstIterator it = lst.begin();
while (!pix.load( *it + "/" + m_service->icon() ) && it != lst.end() )
it++;
return pix;
}
-QString KDataToolInfo::iconName() const
+TQString KDataToolInfo::iconName() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->icon();
}
-QStringList KDataToolInfo::commands() const
+TQStringList KDataToolInfo::commands() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->property( "Commands" ).toStringList();
}
-QStringList KDataToolInfo::userCommands() const
+TQStringList KDataToolInfo::userCommands() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
- return QStringList::split( ',', m_service->comment() );
+ return TQStringList::split( ',', m_service->comment() );
}
-KDataTool* KDataToolInfo::createTool( QObject* parent, const char* name ) const
+KDataTool* KDataToolInfo::createTool( TQObject* parent, const char* name ) const
{
if ( !m_service )
return 0;
@@ -159,19 +159,19 @@ KService::Ptr KDataToolInfo::service() const
return m_service;
}
-QValueList<KDataToolInfo> KDataToolInfo::query( const QString& datatype, const QString& mimetype, KInstance* instance )
+TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const TQString& mimetype, KInstance* instance )
{
- QValueList<KDataToolInfo> lst;
+ TQValueList<KDataToolInfo> lst;
- QString constr;
+ TQString constr;
if ( !datatype.isEmpty() )
{
- constr = QString::fromLatin1( "DataType == '%1'" ).arg( datatype );
+ constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype );
}
if ( !mimetype.isEmpty() )
{
- QString tmp = QString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
+ TQString tmp = TQString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -180,7 +180,7 @@ QValueList<KDataToolInfo> KDataToolInfo::query( const QString& datatype, const Q
/* Bug in KTrader ? Test with HEAD-kdelibs!
if ( instance )
{
- QString tmp = QString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
+ TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -215,8 +215,8 @@ bool KDataToolInfo::isValid() const
* KDataToolAction
*
*************************************************/
-KDataToolAction::KDataToolAction( const QString & text, const KDataToolInfo & info, const QString & command,
- QObject * parent, const char * name )
+KDataToolAction::KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command,
+ TQObject * parent, const char * name )
: KAction( text, info.iconName(), 0, parent, name ),
m_command( command ),
m_info( info )
@@ -228,30 +228,30 @@ void KDataToolAction::slotActivated()
emit toolActivated( m_info, m_command );
}
-QPtrList<KAction> KDataToolAction::dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot )
+TQPtrList<KAction> KDataToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot )
{
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if ( tools.isEmpty() )
return actionList;
actionList.append( new KActionSeparator() );
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList commands = (*entry).commands();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList commands = (*entry).commands();
Q_ASSERT(!commands.isEmpty());
if ( commands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()->entryPath()
<< "). " << commands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = commands.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = commands.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit )
{
//kdDebug() << "creating action " << *uit << " " << *cit << endl;
KDataToolAction * action = new KDataToolAction( *uit, *entry, *cit );
- connect( action, SIGNAL( toolActivated( const KDataToolInfo &, const QString & ) ),
+ connect( action, TQT_SIGNAL( toolActivated( const KDataToolInfo &, const TQString & ) ),
receiver, slot );
actionList.append( action );
}
@@ -266,8 +266,8 @@ QPtrList<KAction> KDataToolAction::dataToolActionList( const QValueList<KDataToo
*
*************************************************/
-KDataTool::KDataTool( QObject* parent, const char* name )
- : QObject( parent, name ), m_instance( 0L )
+KDataTool::KDataTool( TQObject* parent, const char* name )
+ : TQObject( parent, name ), m_instance( 0L )
{
}
diff --git a/kio/kio/kdatatool.h b/kio/kio/kdatatool.h
index 4871f08db..c27b8fbe5 100644
--- a/kio/kio/kdatatool.h
+++ b/kio/kio/kdatatool.h
@@ -21,8 +21,8 @@
#ifndef KDATATOOL_H
#define KDATATOOL_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kservice.h>
@@ -69,14 +69,14 @@ public:
/**
* Returns the data type that the DataTool can accept.
* @return the C++ data type that this DataTool accepts.
- * For example "QString" or "QImage" or something more
+ * For example "TQString" or "TQImage" or something more
* complicated.
*/
- QString dataType() const;
+ TQString dataType() const;
/**
* Returns a list of mime type that will be accepted by the DataTool.
* The mimetypes are only used if the dataType can be used to store
- * different mimetypes. For example in a "QString" you could save "text/plain"
+ * different mimetypes. For example in a "TQString" you could save "text/plain"
* or "text/html" or "text/xml".
*
* @return the mime types accepted by this DataTool. For example
@@ -84,7 +84,7 @@ public:
* determines the accepted type of data perfectly. In this cases
* this list may be empty.
*/
- QStringList mimeTypes() const;
+ TQStringList mimeTypes() const;
/**
* Checks whether the DataTool is read-only.
@@ -97,20 +97,20 @@ public:
* @return a large pixmap for the DataTool.
* @deprecated, use iconName()
*/
- QPixmap icon() const KDE_DEPRECATED;
+ TQPixmap icon() const KDE_DEPRECATED;
/**
* Returns the mini icon of this data tool.
* @return a mini pixmap for the DataTool.
* @deprecated, use iconName()
*/
- QPixmap miniIcon() const KDE_DEPRECATED;
+ TQPixmap miniIcon() const KDE_DEPRECATED;
/**
* Returns the icon name for this DataTool.
* @return the name of the icon for the DataTool
*/
- QString iconName() const;
+ TQString iconName() const;
/**
- * Returns a list of strings that you can put in a QPopupMenu item, for example to
+ * Returns a list of strings that you can put in a TQPopupMenu item, for example to
* offer the DataTools services to the user. The returned value
* is usually something like "Spell checking", "Shrink Image", "Rotate Image"
* or something like that.
@@ -120,9 +120,9 @@ public:
* Each of the strings returned corresponds to a string in the list returned by
* commands.
*
- * @return a list of strings that you can put in a QPopupMenu item
+ * @return a list of strings that you can put in a TQPopupMenu item
*/
- QStringList userCommands() const;
+ TQStringList userCommands() const;
/**
* Returns the list of commands the DataTool can execute. The application
* passes the command to the KDataTool::run method.
@@ -134,15 +134,15 @@ public:
* @return the list of commands the DataTool can execute, suitable for
* the KDataTool::run method.
*/
- QStringList commands() const;
+ TQStringList commands() const;
/**
* Creates the data tool described by this KDataToolInfo.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
* @return a pointer to the created data tool or 0 on error.
*/
- KDataTool* createTool( QObject* parent = 0, const char* name = 0 ) const;
+ KDataTool* createTool( TQObject* parent = 0, const char* name = 0 ) const;
/**
* The KDataToolInfo's service that is represented by this class.
@@ -165,13 +165,13 @@ public:
/**
* Queries the KTrader about installed KDataTool implementations.
- * @param datatype a type that the application can 'export' to the tools (e.g. QString)
+ * @param datatype a type that the application can 'export' to the tools (e.g. TQString)
* @param mimetype the mimetype of the data (e.g. text/plain)
* @param instance the application (or the part)'s instance (to check if a tool is excluded from this part,
* and also used if the tool wants to read its configuration in the app's config file).
* @return the list of results
*/
- static QValueList<KDataToolInfo> query( const QString& datatype, const QString& mimetype, KInstance * instance );
+ static TQValueList<KDataToolInfo> query( const TQString& datatype, const TQString& mimetype, KInstance * instance );
private:
KService::Ptr m_service;
@@ -204,7 +204,7 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KDataToolAction( const QString & text, const KDataToolInfo & info, const QString & command, QObject * parent = 0, const char * name = 0);
+ KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0);
/**
* Creates a list of actions from a list of information about data-tools.
@@ -216,7 +216,7 @@ public:
* @param slot the slot that will receive the toolActivated() signals
* @return the KActions
*/
- static QPtrList<KAction> dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot );
+ static TQPtrList<KAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot );
signals:
/**
@@ -224,13 +224,13 @@ signals:
* @param info a description of the activated tools
* @param command the command for the tool
*/
- void toolActivated( const KDataToolInfo & info, const QString & command );
+ void toolActivated( const KDataToolInfo & info, const TQString & command );
protected:
virtual void slotActivated();
private:
- QString m_command;
+ TQString m_command;
KDataToolInfo m_info;
protected:
virtual void virtual_hook( int id, void* data );
@@ -257,10 +257,10 @@ public:
/**
* Constructor
* The data-tool is only created when a menu-item, that relates to it, is activated.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
*/
- KDataTool( QObject* parent = 0, const char* name = 0 );
+ KDataTool( TQObject* parent = 0, const char* name = 0 );
/**
* @internal. Do not use under any circumstance (including bad weather).
@@ -284,10 +284,10 @@ public:
* and for getting it back and updating itself with it, after the tool ran.
* @param datatype defines the type of @p data.
* @param mimetype defines the mimetype of the data (for instance datatype may be
- * QString, but the mimetype can be text/plain, text/html etc.)
+ * TQString, but the mimetype can be text/plain, text/html etc.)
* @return true if successful, false otherwise
*/
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype) = 0;
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype) = 0;
private:
KInstance * m_instance;
diff --git a/kio/kio/kdcopservicestarter.cpp b/kio/kio/kdcopservicestarter.cpp
index 023789ab8..3c9b55501 100644
--- a/kio/kio/kdcopservicestarter.cpp
+++ b/kio/kio/kdcopservicestarter.cpp
@@ -46,15 +46,15 @@ KDCOPServiceStarter::~KDCOPServiceStarter()
{
}
-int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
- const QString& _constraint,
- const QString& preferences,
- QString *error, QCString* pDcopService,
+int KDCOPServiceStarter::findServiceFor( const TQString& serviceType,
+ const TQString& _constraint,
+ const TQString& preferences,
+ TQString *error, TQCString* pDcopService,
int flags )
{
// Ask the trader which service is preferred for this servicetype
// We want one that provides a DCOP interface
- QString constraint = _constraint;
+ TQString constraint = _constraint;
if ( !constraint.isEmpty() )
constraint += " and ";
constraint += "exist [X-DCOP-ServiceName]";
@@ -66,11 +66,11 @@ int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
return -1;
}
KService::Ptr ptr = offers.first();
- QCString dcopService = ptr->property("X-DCOP-ServiceName").toString().latin1();
+ TQCString dcopService = ptr->property("X-DCOP-ServiceName").toString().latin1();
if ( !kapp->dcopClient()->isApplicationRegistered( dcopService ) )
{
- QString error;
+ TQString error;
if ( startServiceFor( serviceType, constraint, preferences, &error, &dcopService, flags ) != 0 )
{
kdDebug() << "KDCOPServiceStarter: Couldn't start service: " << error << endl;
@@ -83,15 +83,15 @@ int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
return 0;
}
-int KDCOPServiceStarter::startServiceFor( const QString& serviceType,
- const QString& constraint,
- const QString& preferences,
- QString *error, QCString* dcopService, int /*flags*/ )
+int KDCOPServiceStarter::startServiceFor( const TQString& serviceType,
+ const TQString& constraint,
+ const TQString& preferences,
+ TQString *error, TQCString* dcopService, int /*flags*/ )
{
KTrader::OfferList offers = KTrader::self()->query(serviceType, "Application", constraint, preferences);
if ( offers.isEmpty() )
return -1;
KService::Ptr ptr = offers.first();
kdDebug() << "KDCOPServiceStarter: starting " << ptr->desktopEntryPath() << endl;
- return kapp->startServiceByDesktopPath( ptr->desktopEntryPath(), QStringList(), error, dcopService );
+ return kapp->startServiceByDesktopPath( ptr->desktopEntryPath(), TQStringList(), error, dcopService );
}
diff --git a/kio/kio/kdcopservicestarter.h b/kio/kio/kdcopservicestarter.h
index 1318c431a..c6b6b4e0e 100644
--- a/kio/kio/kdcopservicestarter.h
+++ b/kio/kio/kdcopservicestarter.h
@@ -19,7 +19,7 @@
#ifndef KDCOPSERVICESTARTER_H
#define KDCOPSERVICESTARTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kstaticdeleter.h>
class KDCOPServiceStarter;
@@ -58,10 +58,10 @@ public:
*
* @return an error code indicating success (== 0) or failure (> 0).
*/
- int findServiceFor( const QString& serviceType,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null,
- QString *error=0, QCString* dcopService=0,
+ int findServiceFor( const TQString& serviceType,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null,
+ TQString *error=0, TQCString* dcopService=0,
int flags=0 );
/**
@@ -86,10 +86,10 @@ public:
*
* @return an error code indicating success (== 0) or failure (> 0).
*/
- virtual int startServiceFor( const QString& serviceType,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null,
- QString *error=0, QCString* dcopService=0,
+ virtual int startServiceFor( const TQString& serviceType,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null,
+ TQString *error=0, TQCString* dcopService=0,
int flags=0 );
protected:
KDCOPServiceStarter();
diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp
index 4c16a5d36..7be6da985 100644
--- a/kio/kio/kdirlister.cpp
+++ b/kio/kio/kdirlister.cpp
@@ -21,9 +21,9 @@
#include "kdirlister.h"
-#include <qregexp.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -61,12 +61,12 @@ KDirListerCache::KDirListerCache( int maxCount )
urlsCurrentlyHeld.setAutoDelete( true );
pendingUpdates.setAutoDelete( true );
- connect( kdirwatch, SIGNAL( dirty( const QString& ) ),
- this, SLOT( slotFileDirty( const QString& ) ) );
- connect( kdirwatch, SIGNAL( created( const QString& ) ),
- this, SLOT( slotFileCreated( const QString& ) ) );
- connect( kdirwatch, SIGNAL( deleted( const QString& ) ),
- this, SLOT( slotFileDeleted( const QString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( dirty( const TQString& ) ),
+ this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( created( const TQString& ) ),
+ this, TQT_SLOT( slotFileCreated( const TQString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( deleted( const TQString& ) ),
+ this, TQT_SLOT( slotFileDeleted( const TQString& ) ) );
}
KDirListerCache::~KDirListerCache()
@@ -92,7 +92,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
KURL _url = _u;
_url.cleanPath(); // kill consecutive slashes
_url.adjustPath(-1);
- QString urlStr = _url.url();
+ TQString urlStr = _url.url();
if ( !lister->validURL( _url ) )
return false;
@@ -186,7 +186,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
lister->emitItems();
Q_ASSERT( !urlsCurrentlyHeld[urlStr] );
- QPtrList<KDirLister> *list = new QPtrList<KDirLister>;
+ TQPtrList<KDirLister> *list = new TQPtrList<KDirLister>;
list->append( lister );
urlsCurrentlyHeld.insert( urlStr, list );
@@ -203,7 +203,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
{
kdDebug(7004) << "listDir: Entry not in cache or reloaded: " << _url << endl;
- QPtrList<KDirLister> *list = new QPtrList<KDirLister>;
+ TQPtrList<KDirLister> *list = new TQPtrList<KDirLister>;
list->append( lister );
urlsCurrentlyListed.insert( urlStr, list );
@@ -223,7 +223,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
lister->d->rootFileItem = 0;
KIO::ListJob* job = KIO::listDir( _url, false /* no default GUI */ );
- jobs.insert( job, QValueList<KIO::UDSEntry>() );
+ jobs.insert( job, TQValueList<KIO::UDSEntry>() );
lister->jobStarted( job );
lister->connectJob( job );
@@ -231,12 +231,12 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
if ( lister->d->window )
job->setWindow( lister->d->window );
- connect( job, SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList & ) ),
- this, SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
- connect( job, SIGNAL( redirection( KIO::Job *, const KURL & ) ),
- this, SLOT( slotRedirection( KIO::Job *, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList & ) ),
+ this, TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( redirection( KIO::Job *, const KURL & ) ),
+ this, TQT_SLOT( slotRedirection( KIO::Job *, const KURL & ) ) );
emit lister->started( _url );
@@ -279,7 +279,7 @@ bool KDirListerCache::validURL( const KDirLister *lister, const KURL& url ) cons
{
if ( lister->d->autoErrorHandling )
{
- QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
+ TQString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
KMessageBox::error( lister->d->errorParent, tmp );
}
return false;
@@ -290,7 +290,7 @@ bool KDirListerCache::validURL( const KDirLister *lister, const KURL& url ) cons
if ( lister->d->autoErrorHandling )
{
// TODO: this message should be changed during next string unfreeze!
- QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
+ TQString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
KMessageBox::error( lister->d->errorParent, tmp );
}
return false;
@@ -307,14 +307,14 @@ void KDirListerCache::stop( KDirLister *lister )
kdDebug(7004) << k_funcinfo << "lister: " << lister << endl;
bool stopped = false;
- QDictIterator< QPtrList<KDirLister> > it( urlsCurrentlyListed );
- QPtrList<KDirLister> *listers;
+ TQDictIterator< TQPtrList<KDirLister> > it( urlsCurrentlyListed );
+ TQPtrList<KDirLister> *listers;
while ( (listers = it.current()) )
{
if ( listers->findRef( lister ) > -1 )
{
// lister is listing url
- QString url = it.currentKey();
+ TQString url = it.currentKey();
//kdDebug(7004) << k_funcinfo << " found lister in list - for " << url << endl;
bool ret = listers->removeRef( lister );
@@ -325,10 +325,10 @@ void KDirListerCache::stop( KDirLister *lister )
lister->jobDone( job );
// move lister to urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[url];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[url];
if ( !holders )
{
- holders = new QPtrList<KDirLister>;
+ holders = new TQPtrList<KDirLister>;
urlsCurrentlyHeld.insert( url, holders );
}
@@ -365,21 +365,21 @@ void KDirListerCache::stop( KDirLister *lister )
void KDirListerCache::stop( KDirLister *lister, const KURL& _u )
{
- QString urlStr( _u.url(-1) );
+ TQString urlStr( _u.url(-1) );
KURL _url( urlStr );
// TODO: consider to stop all the "child jobs" of _url as well
kdDebug(7004) << k_funcinfo << lister << " url=" << _url << endl;
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
if ( !listers || !listers->removeRef( lister ) )
return;
// move lister to urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
if ( !holders )
{
- holders = new QPtrList<KDirLister>;
+ holders = new TQPtrList<KDirLister>;
urlsCurrentlyHeld.insert( urlStr, holders );
}
@@ -445,8 +445,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
KURL url( _url );
url.adjustPath( -1 );
- QString urlStr = url.url();
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQString urlStr = url.url();
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
Q_ASSERT( holders );
holders->removeRef( lister );
@@ -534,7 +534,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
{
kdDebug(7004) << k_funcinfo << _dir << endl;
- QString urlStr = _dir.url(-1);
+ TQString urlStr = _dir.url(-1);
if ( !checkUpdate( urlStr ) )
return;
@@ -544,12 +544,12 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
// - update a currently running listing: the listers are in urlsCurrentlyListed
// and urlsCurrentlyHeld
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
// restart the job for _dir if it is running already
bool killed = false;
- QWidget *window = 0;
+ TQWidget *window = 0;
KIO::ListJob *job = jobForUrl( urlStr );
if ( job )
{
@@ -574,12 +574,12 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
Q_ASSERT( !listers || (listers && killed) );
job = KIO::listDir( _dir, false /* no default GUI */ );
- jobs.insert( job, QValueList<KIO::UDSEntry>() );
+ jobs.insert( job, TQValueList<KIO::UDSEntry>() );
- connect( job, SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
- this, SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
- connect( job, SIGNAL(result( KIO::Job * )),
- this, SLOT(slotUpdateResult( KIO::Job * )) );
+ connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
+ this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
+ connect( job, TQT_SIGNAL(result( KIO::Job * )),
+ this, TQT_SLOT(slotUpdateResult( KIO::Job * )) );
kdDebug(7004) << k_funcinfo << "update started in " << _dir << endl;
@@ -613,7 +613,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
}
}
-bool KDirListerCache::checkUpdate( const QString& _dir )
+bool KDirListerCache::checkUpdate( const TQString& _dir )
{
if ( !itemsInUse[_dir] )
{
@@ -636,14 +636,14 @@ bool KDirListerCache::checkUpdate( const QString& _dir )
KFileItemList *KDirListerCache::itemsForDir( const KURL &_dir ) const
{
- QString urlStr = _dir.url(-1);
+ TQString urlStr = _dir.url(-1);
DirItem *item = itemsInUse[ urlStr ];
if ( !item )
item = itemsCached[ urlStr ];
return item ? item->lstItems : 0;
}
-KFileItem *KDirListerCache::findByName( const KDirLister *lister, const QString& _name ) const
+KFileItem *KDirListerCache::findByName( const KDirLister *lister, const TQString& _name ) const
{
Q_ASSERT( lister );
@@ -714,7 +714,7 @@ void KDirListerCache::FilesRemoved( const KURL::List &fileList )
// file items (see the dirtree).
if ( fileitem )
{
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDir.url()];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDir.url()];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
kdl->emitDeleteItem( fileitem );
@@ -807,8 +807,8 @@ void KDirListerCache::aboutToRefreshItem( KFileItem *fileitem )
// Look whether this item was shown in any view, i.e. held by any dirlister
KURL parentDir( fileitem->url() );
parentDir.setPath( parentDir.directory() );
- QString parentDirURL = parentDir.url();
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
+ TQString parentDirURL = parentDir.url();
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
kdl->aboutToRefreshItem( fileitem );
@@ -825,8 +825,8 @@ void KDirListerCache::emitRefreshItem( KFileItem *fileitem )
// Look whether this item was shown in any view, i.e. held by any dirlister
KURL parentDir( fileitem->url() );
parentDir.setPath( parentDir.directory() );
- QString parentDirURL = parentDir.url();
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
+ TQString parentDirURL = parentDir.url();
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
{
@@ -861,7 +861,7 @@ bool KDirListerCache::exists()
// private slots
// _file can also be a directory being currently held!
-void KDirListerCache::slotFileDirty( const QString& _file )
+void KDirListerCache::slotFileDirty( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
@@ -877,8 +877,8 @@ void KDirListerCache::slotFileDirty( const QString& _file )
if ( checkUpdate( dir.url() ) )
{
// Nice hack to save memory: use the qt object name to store the filename
- QTimer *timer = new QTimer( this, _file.utf8() );
- connect( timer, SIGNAL(timeout()), this, SLOT(slotFileDirtyDelayed()) );
+ TQTimer *timer = new TQTimer( this, _file.utf8() );
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFileDirtyDelayed()) );
pendingUpdates.insert( _file, timer );
timer->start( 500, true );
}
@@ -888,11 +888,11 @@ void KDirListerCache::slotFileDirty( const QString& _file )
// delayed updating of files, FAM is flooding us with events
void KDirListerCache::slotFileDirtyDelayed()
{
- QString file = QString::fromUtf8( sender()->name() );
+ TQString file = TQString::fromUtf8( sender()->name() );
kdDebug(7004) << k_funcinfo << file << endl;
- // TODO: do it better: don't always create/delete the QTimer but reuse it.
+ // TODO: do it better: don't always create/delete the TQTimer but reuse it.
// Delete the timer after the parent directory is removed from the cache.
pendingUpdates.remove( file );
@@ -908,7 +908,7 @@ void KDirListerCache::slotFileDirtyDelayed()
}
}
-void KDirListerCache::slotFileCreated( const QString& _file )
+void KDirListerCache::slotFileCreated( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
// XXX: how to avoid a complete rescan here?
@@ -918,7 +918,7 @@ void KDirListerCache::slotFileCreated( const QString& _file )
FilesAdded( u );
}
-void KDirListerCache::slotFileDeleted( const QString& _file )
+void KDirListerCache::slotFileDeleted( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
KURL u;
@@ -930,14 +930,14 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri
{
KURL url = joburl( static_cast<KIO::ListJob *>(job) );
url.adjustPath(-1);
- QString urlStr = url.url();
+ TQString urlStr = url.url();
kdDebug(7004) << k_funcinfo << "new entries for " << url << endl;
DirItem *dir = itemsInUse[urlStr];
Q_ASSERT( dir );
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
Q_ASSERT( listers );
Q_ASSERT( !listers->isEmpty() );
@@ -947,15 +947,15 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri
delayedMimeTypes = delayedMimeTypes && kdl->d->delayedMimeTypes;
// 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 = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
for ( ; it != end; ++it )
{
- QString name;
+ TQString name;
// find out about the name
KIO::UDSEntry::ConstIterator entit = (*it).begin();
@@ -1004,14 +1004,14 @@ void KDirListerCache::slotResult( KIO::Job *j )
KURL jobUrl = joburl( job );
jobUrl.adjustPath(-1); // need remove trailing slashes again, in case of redirections
- QString jobUrlStr = jobUrl.url();
+ TQString jobUrlStr = jobUrl.url();
kdDebug(7004) << k_funcinfo << "finished listing " << jobUrl << endl;
#ifdef DEBUG_CACHE
printDebug();
#endif
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( jobUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( jobUrlStr );
Q_ASSERT( listers );
// move the directory to the held directories, do it before emitting
@@ -1095,7 +1095,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
DirItem *dir = itemsInUse.take( oldUrl.url() );
Q_ASSERT( dir );
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrl.url() );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrl.url() );
Q_ASSERT( listers );
Q_ASSERT( !listers->isEmpty() );
@@ -1125,7 +1125,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// when a lister was stopped before the job emits the redirection signal, the old url will
// also be in urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrl.url() );
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrl.url() );
if ( holders )
{
Q_ASSERT( !holders->isEmpty() );
@@ -1175,7 +1175,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// listers of newUrl with oldJob: forget about the oldJob and use the already running one
// which will be converted to an updateJob
- QPtrList<KDirLister> *curListers = urlsCurrentlyListed[newUrl.url()];
+ TQPtrList<KDirLister> *curListers = urlsCurrentlyListed[newUrl.url()];
if ( curListers )
{
kdDebug(7004) << "slotRedirection: and it is currently listed" << endl;
@@ -1201,7 +1201,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
killJob( oldJob );
// holders of newUrl: use the already running job which will be converted to an updateJob
- QPtrList<KDirLister> *curHolders = urlsCurrentlyHeld[newUrl.url()];
+ TQPtrList<KDirLister> *curHolders = urlsCurrentlyHeld[newUrl.url()];
if ( curHolders )
{
kdDebug(7004) << "slotRedirection: and it is currently held." << endl;
@@ -1301,10 +1301,10 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// make the job an update job
job->disconnect( this );
- connect( job, SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
- this, SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
- connect( job, SIGNAL(result( KIO::Job * )),
- this, SLOT(slotUpdateResult( KIO::Job * )) );
+ connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
+ this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
+ connect( job, TQT_SIGNAL(result( KIO::Job * )),
+ this, TQT_SLOT(slotUpdateResult( KIO::Job * )) );
// FIXME: autoUpdate-Counts!!
@@ -1316,15 +1316,15 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
{
kdDebug(7004) << k_funcinfo << oldUrl.prettyURL() << " -> " << newUrl.prettyURL() << endl;
- QString oldUrlStr = oldUrl.url(-1);
- QString newUrlStr = newUrl.url(-1);
+ TQString oldUrlStr = oldUrl.url(-1);
+ TQString newUrlStr = newUrl.url(-1);
// Not enough. Also need to look at any child dir, even sub-sub-sub-dir.
//DirItem *dir = itemsInUse.take( oldUrlStr );
//emitRedirections( oldUrl, url );
// Look at all dirs being listed/shown
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
bool goNext;
while ( itu.current() )
{
@@ -1336,7 +1336,7 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
if ( oldUrl.isParentOf( oldDirUrl ) )
{
// TODO should use KURL::cleanpath like isParentOf does
- QString relPath = oldDirUrl.path().mid( oldUrl.path().length() );
+ TQString relPath = oldDirUrl.path().mid( oldUrl.path().length() );
KURL newDirUrl( newUrl ); // take new base
if ( !relPath.isEmpty() )
@@ -1355,7 +1355,7 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
for ( ; kit.current(); ++kit )
{
KURL oldItemUrl = (*kit)->url();
- QString oldItemUrlStr( oldItemUrl.url(-1) );
+ TQString oldItemUrlStr( oldItemUrl.url(-1) );
KURL newItemUrl( oldItemUrl );
newItemUrl.setPath( newDirUrl.path() );
newItemUrl.addPath( oldItemUrl.fileName() );
@@ -1378,15 +1378,15 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
{
kdDebug(7004) << k_funcinfo << oldUrl.prettyURL() << " -> " << url.prettyURL() << endl;
- QString oldUrlStr = oldUrl.url(-1);
- QString urlStr = url.url(-1);
+ TQString oldUrlStr = oldUrl.url(-1);
+ TQString urlStr = url.url(-1);
KIO::ListJob *job = jobForUrl( oldUrlStr );
if ( job )
killJob( job );
// Check if we were listing this dir. Need to abort and restart with new name in that case.
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrlStr );
if ( listers )
{
// Tell the world that the job listing the old url is dead.
@@ -1403,7 +1403,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
// Check if we are currently displaying this directory (odds opposite wrt above)
// Update urlsCurrentlyHeld dict with new URL
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrlStr );
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrlStr );
if ( holders )
{
if ( job )
@@ -1440,7 +1440,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
void KDirListerCache::removeDirFromCache( const KURL& dir )
{
kdDebug(7004) << "KDirListerCache::removeDirFromCache " << dir.prettyURL() << endl;
- QCacheIterator<DirItem> itc( itemsCached );
+ TQCacheIterator<DirItem> itc( itemsCached );
while ( itc.current() )
{
if ( dir.isParentOf( KURL( itc.currentKey() ) ) )
@@ -1462,14 +1462,14 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
KURL jobUrl = joburl( job );
jobUrl.adjustPath(-1); // need remove trailing slashes again, in case of redirections
- QString jobUrlStr = jobUrl.url();
+ TQString jobUrlStr = jobUrl.url();
kdDebug(7004) << k_funcinfo << "finished update " << jobUrl << endl;
KDirLister *kdl;
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[jobUrlStr];
- QPtrList<KDirLister> *tmpLst = urlsCurrentlyListed.take( jobUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[jobUrlStr];
+ TQPtrList<KDirLister> *tmpLst = urlsCurrentlyListed.take( jobUrlStr );
if ( tmpLst )
{
@@ -1524,7 +1524,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
delayedMimeTypes = delayedMimeTypes && kdl->d->delayedMimeTypes;
// should be enough to get reasonable speed in most cases
- QDict<KFileItem> fileItems( 9973 );
+ TQDict<KFileItem> fileItems( 9973 );
KFileItemListIterator kit ( *(dir->lstItems) );
@@ -1535,13 +1535,13 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
fileItems.insert( (*kit)->url().url(), *kit );
}
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KFileItem *item = 0, *tmp;
- QValueList<KIO::UDSEntry> buf = jobs[job];
- QValueListIterator<KIO::UDSEntry> it = buf.begin();
+ TQValueList<KIO::UDSEntry> buf = jobs[job];
+ TQValueListIterator<KIO::UDSEntry> it = buf.begin();
for ( ; it != buf.end(); ++it )
{
// Form the complete url
@@ -1551,7 +1551,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
item->setUDSEntry( *it, jobUrl, delayedMimeTypes, true );
// Find out about the name
- QString name = item->name();
+ TQString name = item->name();
Q_ASSERT( !name.isEmpty() );
// we duplicate the check for dotdot here, to avoid iterating over
@@ -1637,10 +1637,10 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
// private
-KIO::ListJob *KDirListerCache::jobForUrl( const QString& url, KIO::ListJob *not_job )
+KIO::ListJob *KDirListerCache::jobForUrl( const TQString& url, KIO::ListJob *not_job )
{
KIO::ListJob *job;
- QMap< KIO::ListJob *, QValueList<KIO::UDSEntry> >::Iterator it = jobs.begin();
+ TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator it = jobs.begin();
while ( it != jobs.end() )
{
job = it.key();
@@ -1666,7 +1666,7 @@ void KDirListerCache::killJob( KIO::ListJob *job )
job->kill();
}
-void KDirListerCache::deleteUnmarkedItems( QPtrList<KDirLister> *listers, KFileItemList *lstItems )
+void KDirListerCache::deleteUnmarkedItems( TQPtrList<KDirLister> *listers, KFileItemList *lstItems )
{
// Find all unmarked items and delete them
KFileItem* item;
@@ -1696,7 +1696,7 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
// Idea: tell all the KDirListers that they should forget the dir
// and then remove it from the cache.
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
while ( itu.current() )
{
KURL deletedUrl( itu.currentKey() );
@@ -1704,11 +1704,11 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
{
// stop all jobs for deletedUrl
- QPtrList<KDirLister> *kdls = urlsCurrentlyListed[deletedUrl.url()];
+ TQPtrList<KDirLister> *kdls = urlsCurrentlyListed[deletedUrl.url()];
if ( kdls ) // yeah, I lack good names
{
// we need a copy because stop modifies the list
- kdls = new QPtrList<KDirLister>( *kdls );
+ kdls = new TQPtrList<KDirLister>( *kdls );
for ( KDirLister *kdl = kdls->first(); kdl; kdl = kdls->next() )
stop( kdl, deletedUrl );
@@ -1722,7 +1722,7 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
if ( kdls )
{
// we need a copy because forgetDirs modifies the list
- kdls = new QPtrList<KDirLister>( *kdls );
+ kdls = new TQPtrList<KDirLister>( *kdls );
for ( KDirLister *kdl = kdls->first(); kdl; kdl = kdls->next() )
{
@@ -1773,46 +1773,46 @@ void KDirListerCache::processPendingUpdates()
void KDirListerCache::printDebug()
{
kdDebug(7004) << "Items in use: " << endl;
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
for ( ; itu.current() ; ++itu ) {
kdDebug(7004) << " " << itu.currentKey() << " URL: " << itu.current()->url
<< " rootItem: " << ( itu.current()->rootItem ? itu.current()->rootItem->url() : KURL() )
<< " autoUpdates refcount: " << itu.current()->autoUpdates
<< " complete: " << itu.current()->complete
- << ( itu.current()->lstItems ? QString(" with %1 items.").arg(itu.current()->lstItems->count()) : QString(" lstItems=NULL") ) << endl;
+ << ( itu.current()->lstItems ? TQString(" with %1 items.").arg(itu.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl;
}
kdDebug(7004) << "urlsCurrentlyHeld: " << endl;
- QDictIterator< QPtrList<KDirLister> > it( urlsCurrentlyHeld );
+ TQDictIterator< TQPtrList<KDirLister> > it( urlsCurrentlyHeld );
for ( ; it.current() ; ++it )
{
- QString list;
- for ( QPtrListIterator<KDirLister> listit( *it.current() ); listit.current(); ++listit )
- list += " 0x" + QString::number( (long)listit.current(), 16 );
+ TQString list;
+ for ( TQPtrListIterator<KDirLister> listit( *it.current() ); listit.current(); ++listit )
+ list += " 0x" + TQString::number( (long)listit.current(), 16 );
kdDebug(7004) << " " << it.currentKey() << " " << it.current()->count() << " listers: " << list << endl;
}
kdDebug(7004) << "urlsCurrentlyListed: " << endl;
- QDictIterator< QPtrList<KDirLister> > it2( urlsCurrentlyListed );
+ TQDictIterator< TQPtrList<KDirLister> > it2( urlsCurrentlyListed );
for ( ; it2.current() ; ++it2 )
{
- QString list;
- for ( QPtrListIterator<KDirLister> listit( *it2.current() ); listit.current(); ++listit )
- list += " 0x" + QString::number( (long)listit.current(), 16 );
+ TQString list;
+ for ( TQPtrListIterator<KDirLister> listit( *it2.current() ); listit.current(); ++listit )
+ list += " 0x" + TQString::number( (long)listit.current(), 16 );
kdDebug(7004) << " " << it2.currentKey() << " " << it2.current()->count() << " listers: " << list << endl;
}
- QMap< KIO::ListJob *, QValueList<KIO::UDSEntry> >::Iterator jit = jobs.begin();
+ TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator jit = jobs.begin();
kdDebug(7004) << "Jobs: " << endl;
for ( ; jit != jobs.end() ; ++jit )
kdDebug(7004) << " " << jit.key() << " listing " << joburl( jit.key() ).prettyURL() << ": " << (*jit).count() << " entries." << endl;
kdDebug(7004) << "Items in cache: " << endl;
- QCacheIterator<DirItem> itc( itemsCached );
+ TQCacheIterator<DirItem> itc( itemsCached );
for ( ; itc.current() ; ++itc )
kdDebug(7004) << " " << itc.currentKey() << " rootItem: "
- << ( itc.current()->rootItem ? itc.current()->rootItem->url().prettyURL() : QString("NULL") )
- << ( itc.current()->lstItems ? QString(" with %1 items.").arg(itc.current()->lstItems->count()) : QString(" lstItems=NULL") ) << endl;
+ << ( itc.current()->rootItem ? itc.current()->rootItem->url().prettyURL() : TQString("NULL") )
+ << ( itc.current()->lstItems ? TQString(" with %1 items.").arg(itc.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl;
}
#endif
@@ -1922,7 +1922,7 @@ bool KDirLister::autoErrorHandlingEnabled() const
return d->autoErrorHandling;
}
-void KDirLister::setAutoErrorHandlingEnabled( bool enable, QWidget* parent )
+void KDirLister::setAutoErrorHandlingEnabled( bool enable, TQWidget* parent )
{
d->autoErrorHandling = enable;
d->errorParent = parent;
@@ -1943,8 +1943,8 @@ void KDirLister::emitChanges()
if ( d->changes == NONE )
return;
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
for ( KURL::List::Iterator it = d->lstDirs.begin();
it != d->lstDirs.end(); ++it )
@@ -2047,7 +2047,7 @@ KFileItem *KDirLister::findByURL( const KURL& _url ) const
return s_pCache->findByURL( this, _url );
}
-KFileItem *KDirLister::findByName( const QString& _name ) const
+KFileItem *KDirLister::findByName( const TQString& _name ) const
{
return s_pCache->findByName( this, _name );
}
@@ -2062,7 +2062,7 @@ KFileItem *KDirLister::find( const KURL& _url ) const
// ================ public filter methods ================ //
-void KDirLister::setNameFilter( const QString& nameFilter )
+void KDirLister::setNameFilter( const TQString& nameFilter )
{
if ( !(d->changes & NAME_FILTER) )
{
@@ -2076,19 +2076,19 @@ void KDirLister::setNameFilter( const QString& nameFilter )
d->nameFilter = nameFilter;
// Split on white space
- QStringList list = QStringList::split( ' ', nameFilter );
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
- d->lstFilters.append( new QRegExp(*it, false, true ) );
+ TQStringList list = TQStringList::split( ' ', nameFilter );
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ d->lstFilters.append( new TQRegExp(*it, false, true ) );
d->changes |= NAME_FILTER;
}
-const QString& KDirLister::nameFilter() const
+const TQString& KDirLister::nameFilter() const
{
return d->nameFilter;
}
-void KDirLister::setMimeFilter( const QStringList& mimeFilter )
+void KDirLister::setMimeFilter( const TQStringList& mimeFilter )
{
if ( !(d->changes & MIME_FILTER) )
d->oldMimeFilter = d->mimeFilter;
@@ -2102,7 +2102,7 @@ void KDirLister::setMimeFilter( const QStringList& mimeFilter )
d->changes |= MIME_FILTER;
}
-void KDirLister::setMimeExcludeFilter( const QStringList& mimeExcludeFilter )
+void KDirLister::setMimeExcludeFilter( const TQStringList& mimeExcludeFilter )
{
if ( !(d->changes & MIME_FILTER) )
d->oldMimeExcludeFilter = d->mimeExcludeFilter;
@@ -2124,17 +2124,17 @@ void KDirLister::clearMimeFilter()
d->changes |= MIME_FILTER;
}
-const QStringList& KDirLister::mimeFilters() const
+const TQStringList& KDirLister::mimeFilters() const
{
return d->mimeFilter;
}
-bool KDirLister::matchesFilter( const QString& name ) const
+bool KDirLister::matchesFilter( const TQString& name ) const
{
return doNameFilter( name, d->lstFilters );
}
-bool KDirLister::matchesMimeFilter( const QString& mime ) const
+bool KDirLister::matchesMimeFilter( const TQString& mime ) const
{
return doMimeFilter( mime, d->mimeFilter ) && doMimeExcludeFilter(mime,d->mimeExcludeFilter);
}
@@ -2144,7 +2144,7 @@ bool KDirLister::matchesMimeFilter( const QString& mime ) const
bool KDirLister::matchesFilter( const KFileItem *item ) const
{
Q_ASSERT( item );
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dotdot = KGlobal::staticQString("..");
if ( item->text() == dotdot )
return false;
@@ -2167,23 +2167,23 @@ bool KDirLister::matchesMimeFilter( const KFileItem *item ) const
return matchesMimeFilter( item->mimetype() );
}
-bool KDirLister::doNameFilter( const QString& name, const QPtrList<QRegExp>& filters ) const
+bool KDirLister::doNameFilter( const TQString& name, const TQPtrList<TQRegExp>& filters ) const
{
- for ( QPtrListIterator<QRegExp> it( filters ); it.current(); ++it )
+ for ( TQPtrListIterator<TQRegExp> it( filters ); it.current(); ++it )
if ( it.current()->exactMatch( name ) )
return true;
return false;
}
-bool KDirLister::doMimeFilter( const QString& mime, const QStringList& filters ) const
+bool KDirLister::doMimeFilter( const TQString& mime, const TQStringList& filters ) const
{
if ( filters.isEmpty() )
return true;
KMimeType::Ptr mimeptr = KMimeType::mimeType(mime);
//kdDebug(7004) << "doMimeFilter: investigating: "<<mimeptr->name()<<endl;
- QStringList::ConstIterator it = filters.begin();
+ TQStringList::ConstIterator it = filters.begin();
for ( ; it != filters.end(); ++it )
if ( mimeptr->is(*it) )
return true;
@@ -2193,12 +2193,12 @@ bool KDirLister::doMimeFilter( const QString& mime, const QStringList& filters )
return false;
}
-bool KDirLister::doMimeExcludeFilter( const QString& mime, const QStringList& filters ) const
+bool KDirLister::doMimeExcludeFilter( const TQString& mime, const TQStringList& filters ) const
{
if ( filters.isEmpty() )
return true;
- QStringList::ConstIterator it = filters.begin();
+ TQStringList::ConstIterator it = filters.begin();
for ( ; it != filters.end(); ++it )
if ( (*it) == mime )
return false;
@@ -2247,7 +2247,7 @@ void KDirLister::addNewItems( const KFileItemList& items )
// TODO: make this faster - test if we have a filter at all first
// DF: was this profiled? The matchesFoo() functions should be fast, w/o filters...
// Of course if there is no filter and we can do a range-insertion instead of a loop, that might be good.
- // But that's for Qt4, not possible with QPtrList.
+ // But that's for Qt4, not possible with TQPtrList.
for ( KFileItemListIterator kit( items ); kit.current(); ++kit )
addNewItem( *kit );
}
@@ -2346,7 +2346,7 @@ void KDirLister::emitDeleteItem( KFileItem *item )
// ================ private slots ================ //
-void KDirLister::slotInfoMessage( KIO::Job *, const QString& message )
+void KDirLister::slotInfoMessage( KIO::Job *, const TQString& message )
{
emit infoMessage( message );
}
@@ -2359,7 +2359,7 @@ void KDirLister::slotPercent( KIO::Job *job, unsigned long pcnt )
KIO::filesize_t size = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).percent * (*dataIt).totalSize;
@@ -2379,7 +2379,7 @@ void KDirLister::slotTotalSize( KIO::Job *job, KIO::filesize_t size )
d->jobData[static_cast<KIO::ListJob *>(job)].totalSize = size;
KIO::filesize_t result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).totalSize;
@@ -2394,7 +2394,7 @@ void KDirLister::slotProcessedSize( KIO::Job *job, KIO::filesize_t size )
d->jobData[static_cast<KIO::ListJob *>(job)].processedSize = size;
KIO::filesize_t result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).processedSize;
@@ -2409,7 +2409,7 @@ void KDirLister::slotSpeed( KIO::Job *job, unsigned long spd )
d->jobData[static_cast<KIO::ListJob *>(job)].speed = spd;
int result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).speed;
@@ -2443,24 +2443,24 @@ void KDirLister::jobStarted( KIO::ListJob *job )
void KDirLister::connectJob( KIO::ListJob *job )
{
- connect( job, SIGNAL(infoMessage( KIO::Job *, const QString& )),
- this, SLOT(slotInfoMessage( KIO::Job *, const QString& )) );
- connect( job, SIGNAL(percent( KIO::Job *, unsigned long )),
- this, SLOT(slotPercent( KIO::Job *, unsigned long )) );
- connect( job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t )),
- this, SLOT(slotTotalSize( KIO::Job *, KIO::filesize_t )) );
- connect( job, SIGNAL(processedSize( KIO::Job *, KIO::filesize_t )),
- this, SLOT(slotProcessedSize( KIO::Job *, KIO::filesize_t )) );
- connect( job, SIGNAL(speed( KIO::Job *, unsigned long )),
- this, SLOT(slotSpeed( KIO::Job *, unsigned long )) );
+ connect( job, TQT_SIGNAL(infoMessage( KIO::Job *, const TQString& )),
+ this, TQT_SLOT(slotInfoMessage( KIO::Job *, const TQString& )) );
+ connect( job, TQT_SIGNAL(percent( KIO::Job *, unsigned long )),
+ this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long )) );
+ connect( job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t )),
+ this, TQT_SLOT(slotTotalSize( KIO::Job *, KIO::filesize_t )) );
+ connect( job, TQT_SIGNAL(processedSize( KIO::Job *, KIO::filesize_t )),
+ this, TQT_SLOT(slotProcessedSize( KIO::Job *, KIO::filesize_t )) );
+ connect( job, TQT_SIGNAL(speed( KIO::Job *, unsigned long )),
+ this, TQT_SLOT(slotSpeed( KIO::Job *, unsigned long )) );
}
-void KDirLister::setMainWindow( QWidget *window )
+void KDirLister::setMainWindow( TQWidget *window )
{
d->window = window;
}
-QWidget *KDirLister::mainWindow()
+TQWidget *KDirLister::mainWindow()
{
return d->window;
}
diff --git a/kio/kio/kdirlister.h b/kio/kio/kdirlister.h
index 8806cc718..8a0109e89 100644
--- a/kio/kio/kdirlister.h
+++ b/kio/kio/kdirlister.h
@@ -24,8 +24,8 @@
#include "kfileitem.h"
#include "kdirnotify.h"
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -63,8 +63,8 @@ class KIO_EXPORT KDirLister : public QObject
Q_PROPERTY( bool showingDotFiles READ showingDotFiles WRITE setShowingDotFiles )
Q_PROPERTY( bool dirOnlyMode READ dirOnlyMode WRITE setDirOnlyMode )
Q_PROPERTY( bool autoErrorHandlingEnabled READ autoErrorHandlingEnabled )
- Q_PROPERTY( QString nameFilter READ nameFilter WRITE setNameFilter )
- Q_PROPERTY( QStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter )
+ Q_PROPERTY( TQString nameFilter READ nameFilter WRITE setNameFilter )
+ Q_PROPERTY( TQStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter )
public:
/**
@@ -156,7 +156,7 @@ public:
* top-level
* @see autoErrorHandlingEnabled()
*/
- void setAutoErrorHandlingEnabled( bool enable, QWidget *parent );
+ void setAutoErrorHandlingEnabled( bool enable, TQWidget *parent );
/**
* Checks whether hidden files (files beginning with a dot) will be
@@ -259,7 +259,7 @@ public:
* @param name the item name
* @return the pointer to the KFileItem
*/
- virtual KFileItem *findByName( const QString& name ) const;
+ virtual KFileItem *findByName( const TQString& name ) const;
/**
* Set a name filter to only list items matching this name, e.g. "*.cpp".
@@ -268,17 +268,17 @@ public:
* "*.cpp *.h".
* Note: the direcory is not automatically reloaded.
*
- * @param filter the new filter, QString::null to disable filtering
+ * @param filter the new filter, TQString::null to disable filtering
* @see matchesFilter
*/
- virtual void setNameFilter( const QString &filter );
+ virtual void setNameFilter( const TQString &filter );
/**
* Returns the current name filter, as set via setNameFilter()
- * @return the current name filter, can be QString::null if filtering
+ * @return the current name filter, can be TQString::null if filtering
* is turned off
*/
- const QString& nameFilter() const;
+ const TQString& nameFilter() const;
/**
* Set mime-based filter to only list items matching the given mimetypes.
@@ -291,7 +291,7 @@ public:
* @see clearMimeFilter
* @see matchesMimeFilter
*/
- virtual void setMimeFilter( const QStringList &mimeList );
+ virtual void setMimeFilter( const TQStringList &mimeList );
/**
* Filtering should be done with KFileFilter. This will be implemented in a later
@@ -308,7 +308,7 @@ public:
* @since 3.1
* @internal
*/
- void setMimeExcludeFilter(const QStringList &mimeList );
+ void setMimeExcludeFilter(const TQStringList &mimeList );
/**
@@ -322,7 +322,7 @@ public:
* Returns the list of mime based filters, as set via setMimeFilter().
* @return the list of mime based filters. Empty, when no mime filter is set.
*/
- const QStringList& mimeFilters() const;
+ const TQStringList& mimeFilters() const;
/**
* Checks whether @p name matches a filter in the list of name filters.
@@ -330,7 +330,7 @@ public:
* otherwise false.
* @see setNameFilter
*/
- bool matchesFilter( const QString& name ) const;
+ bool matchesFilter( const TQString& name ) const;
/**
* Checks whether @p mime matches a filter in the list of mime types
@@ -339,7 +339,7 @@ public:
* otherwise false.
* @see setMimeFilter.
*/
- bool matchesMimeFilter( const QString& mime ) const;
+ bool matchesMimeFilter( const TQString& mime ) const;
/**
* Pass the main window this object is associated with
@@ -347,14 +347,14 @@ public:
* @param window the window to associate with, 0 to disassociate
* @since 3.1
*/
- void setMainWindow( QWidget *window );
+ void setMainWindow( TQWidget *window );
/**
* Returns the main window associated with this object.
* @return the associated main window, or 0 if there is none
* @since 3.1
*/
- QWidget *mainWindow();
+ TQWidget *mainWindow();
/**
* Used by items() and itemsForDir() to specify whether you want
@@ -507,7 +507,7 @@ signals:
* Examples of message are "Resolving host", "Connecting to host...", etc.
* @param msg the info message
*/
- void infoMessage( const QString& msg );
+ void infoMessage( const TQString& msg );
/**
* Progress signal showing the overall progress of the KDirLister.
@@ -574,7 +574,7 @@ protected:
* @param name the name to filter
* @param filters a list of regular expressions for filtering
*/
- virtual bool doNameFilter( const QString& name, const QPtrList<QRegExp>& filters ) const;
+ virtual bool doNameFilter( const TQString& name, const TQPtrList<TQRegExp>& filters ) const;
/**
* Called by the public matchesMimeFilter() to do the
@@ -583,12 +583,12 @@ protected:
* @param mime the mime type to filter
* @param filters the list of mime types to filter
*/
- virtual bool doMimeFilter( const QString& mime, const QStringList& filters ) const;
+ virtual bool doMimeFilter( const TQString& mime, const TQStringList& filters ) const;
/**
* @internal
*/
- bool doMimeExcludeFilter( const QString& mimeExclude, const QStringList& filters ) const;
+ bool doMimeExcludeFilter( const TQString& mimeExclude, const TQStringList& filters ) const;
/**
* Checks if an url is malformed or not and displays an error message
@@ -604,7 +604,7 @@ protected:
virtual void virtual_hook( int id, void *data );
private slots:
- void slotInfoMessage( KIO::Job *, const QString& );
+ void slotInfoMessage( KIO::Job *, const TQString& );
void slotPercent( KIO::Job *, unsigned long );
void slotTotalSize( KIO::Job *, KIO::filesize_t );
void slotProcessedSize( KIO::Job *, KIO::filesize_t );
diff --git a/kio/kio/kdirlister_p.h b/kio/kio/kdirlister_p.h
index 1a157e2bf..5d70ce084 100644
--- a/kio/kio/kdirlister_p.h
+++ b/kio/kio/kdirlister_p.h
@@ -22,10 +22,10 @@
#include "kfileitem.h"
-#include <qmap.h>
-#include <qdict.h>
-#include <qcache.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqcache.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <kio/global.h>
@@ -84,7 +84,7 @@ public:
bool dirOnlyMode;
bool autoErrorHandling;
- QWidget *errorParent;
+ TQWidget *errorParent;
bool delayedMimeTypes;
@@ -93,7 +93,7 @@ public:
KIO::filesize_t processedSize, totalSize;
};
- QMap<KIO::ListJob *, JobData> jobData;
+ TQMap<KIO::ListJob *, JobData> jobData;
// file item for the root itself (".")
KFileItem *rootFileItem;
@@ -105,12 +105,12 @@ public:
int changes;
- QWidget *window; // Main window ths lister is associated with
+ TQWidget *window; // Main window ths lister is associated with
- QString nameFilter;
- QPtrList<QRegExp> lstFilters, oldFilters;
- QStringList mimeFilter, oldMimeFilter;
- QStringList mimeExcludeFilter, oldMimeExcludeFilter;
+ TQString nameFilter;
+ TQPtrList<TQRegExp> lstFilters, oldFilters;
+ TQStringList mimeFilter, oldMimeFilter;
+ TQStringList mimeExcludeFilter, oldMimeExcludeFilter;
};
/**
@@ -126,7 +126,7 @@ public:
* a URL -> dirlister holding that URL (urlsCurrentlyHeld)
* a URL -> dirlister currently listing that URL (urlsCurrentlyListed)
*/
-class KDirListerCache : public QObject, KDirNotify
+class KDirListerCache : public TQObject, KDirNotify
{
Q_OBJECT
public:
@@ -150,7 +150,7 @@ public:
KFileItemList *itemsForDir( const KURL &_dir ) const;
- KFileItem *findByName( const KDirLister *lister, const QString &_name ) const;
+ KFileItem *findByName( const KDirLister *lister, const TQString &_name ) const;
// if lister is set, it is checked that the url is held by the lister
KFileItem *findByURL( const KDirLister *lister, const KURL &_url ) const;
@@ -185,9 +185,9 @@ public:
static bool exists();
private slots:
- void slotFileDirty( const QString &_file );
- void slotFileCreated( const QString &_file );
- void slotFileDeleted( const QString &_file );
+ void slotFileDirty( const TQString &_file );
+ void slotFileCreated( const TQString &_file );
+ void slotFileDeleted( const TQString &_file );
void slotFileDirtyDelayed();
@@ -199,18 +199,18 @@ private slots:
void slotUpdateResult( KIO::Job *job );
private:
- KIO::ListJob *jobForUrl( const QString& url, KIO::ListJob *not_job = 0 );
+ KIO::ListJob *jobForUrl( const TQString& url, KIO::ListJob *not_job = 0 );
const KURL& joburl( KIO::ListJob *job );
void killJob( KIO::ListJob *job );
// check if _url is held by some lister and return true,
// otherwise schedule a delayed update and return false
- bool checkUpdate( const QString& _url );
+ bool checkUpdate( const TQString& _url );
// when there were items deleted from the filesystem all the listers holding
// the parent directory need to be notified, the unmarked items have to be deleted
// and removed from the cache including all the childs.
- void deleteUnmarkedItems( QPtrList<KDirLister> *, KFileItemList * );
+ void deleteUnmarkedItems( TQPtrList<KDirLister> *, KFileItemList * );
void processPendingUpdates();
// common for slotRedirection and FileRenamed
void renameDir( const KURL &oldUrl, const KURL &url );
@@ -255,8 +255,8 @@ private:
DCOPClient *client = DCOPClient::mainClient();
if ( !client )
return;
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << url;
client->emitDCOPSignal( "KDirNotify", entering ? "enteredDirectory(KURL)" : "leftDirectory(KURL)", data );
}
@@ -320,11 +320,11 @@ private:
};
static const unsigned short MAX_JOBS_PER_LISTER;
- QMap<KIO::ListJob *, KIO::UDSEntryList> jobs;
+ TQMap<KIO::ListJob *, KIO::UDSEntryList> jobs;
// an item is a complete directory
- QDict<DirItem> itemsInUse;
- QCache<DirItem> itemsCached;
+ TQDict<DirItem> itemsInUse;
+ TQCache<DirItem> itemsCached;
// A lister can be EITHER in urlsCurrentlyListed OR urlsCurrentlyHeld but NOT
// in both at the same time.
@@ -336,13 +336,13 @@ private:
// saves all urls that are currently being listed and maps them
// to their KDirListers
- QDict< QPtrList<KDirLister> > urlsCurrentlyListed;
+ TQDict< TQPtrList<KDirLister> > urlsCurrentlyListed;
// saves all KDirListers that are just holding url
- QDict< QPtrList<KDirLister> > urlsCurrentlyHeld;
+ TQDict< TQPtrList<KDirLister> > urlsCurrentlyHeld;
// running timers for the delayed update
- QDict<QTimer> pendingUpdates;
+ TQDict<TQTimer> pendingUpdates;
static KDirListerCache *s_pSelf;
};
diff --git a/kio/kio/kdirnotify.cpp b/kio/kio/kdirnotify.cpp
index 69b9e11af..fb98196f5 100644
--- a/kio/kio/kdirnotify.cpp
+++ b/kio/kio/kdirnotify.cpp
@@ -23,7 +23,7 @@
int KDirNotify::s_serial = 0;
KDirNotify::KDirNotify()
- : DCOPObject( QCString().sprintf("KDirNotify-%d", ++s_serial) )
+ : DCOPObject( TQCString().sprintf("KDirNotify-%d", ++s_serial) )
{
connectDCOPSignal(0, "KDirNotify", "FilesAdded(KURL)", "FilesAdded(KURL)", false);
connectDCOPSignal(0, "KDirNotify", "FilesRemoved(KURL::List)", "FilesRemoved(KURL::List)", false);
diff --git a/kio/kio/kdirnotify_stub.cpp b/kio/kio/kdirnotify_stub.cpp
index fe160d821..66988d6c9 100644
--- a/kio/kio/kdirnotify_stub.cpp
+++ b/kio/kio/kdirnotify_stub.cpp
@@ -30,12 +30,12 @@
#include <kdatastream.h>
-KDirNotify_stub::KDirNotify_stub( const QCString& app, const QCString& obj )
+KDirNotify_stub::KDirNotify_stub( const TQCString& app, const TQCString& obj )
: DCOPStub( app, obj )
{
}
-KDirNotify_stub::KDirNotify_stub( DCOPClient* client, const QCString& app, const QCString& obj )
+KDirNotify_stub::KDirNotify_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: DCOPStub( client, app, obj )
{
}
@@ -51,8 +51,8 @@ void KDirNotify_stub::FilesAdded( const KURL& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesAdded(KURL)", data );
setStatus( CallSucceeded );
@@ -64,8 +64,8 @@ void KDirNotify_stub::FilesRemoved( const KURL::List& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesRemoved(KURL::List)", data );
setStatus( CallSucceeded );
@@ -77,8 +77,8 @@ void KDirNotify_stub::FilesChanged( const KURL::List& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesChanged(KURL::List)", data );
setStatus( CallSucceeded );
@@ -90,8 +90,8 @@ void KDirNotify_stub::FileRenamed( const KURL& arg0, const KURL& arg1 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
dcopClient()->emitDCOPSignal( "KDirNotify", "FileRenamed(KURL,KURL)", data );
diff --git a/kio/kio/kdirnotify_stub.h b/kio/kio/kdirnotify_stub.h
index d73a4134a..a807ecf82 100644
--- a/kio/kio/kdirnotify_stub.h
+++ b/kio/kio/kdirnotify_stub.h
@@ -17,8 +17,8 @@
class KIO_EXPORT KDirNotify_stub : virtual public DCOPStub
{
public:
- KDirNotify_stub( const QCString& app, const QCString& id );
- KDirNotify_stub( DCOPClient* client, const QCString& app, const QCString& id );
+ KDirNotify_stub( const TQCString& app, const TQCString& id );
+ KDirNotify_stub( DCOPClient* client, const TQCString& app, const TQCString& id );
explicit KDirNotify_stub( const DCOPRef& ref );
virtual ASYNC FilesAdded( const KURL& directory );
virtual ASYNC FilesRemoved( const KURL::List& fileList );
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp
index aaa807ed6..08ab25b89 100644
--- a/kio/kio/kdirwatch.cpp
+++ b/kio/kio/kdirwatch.cpp
@@ -46,13 +46,13 @@
#include <sys/stat.h>
#include <assert.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qintdict.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqintdict.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -120,7 +120,7 @@ void KDirWatchPrivate::dnotify_handler(int, siginfo_t *si, void *)
Entry* e = dwp_self->fd_Entry.find(si->si_fd);
// kdDebug(7001) << "DNOTIFY Handler: fd " << si->si_fd << " path "
-// << QString(e ? e->path:"unknown") << endl;
+// << TQString(e ? e->path:"unknown") << endl;
if(e && e->dn_fd == si->si_fd)
e->dirty = true;
@@ -177,7 +177,7 @@ void KDirWatchPrivate::dnotify_sigio_handler(int sig, siginfo_t *si, void *p)
* At the moment, the following methods for file watching
* are supported:
* - Polling: All files to be watched are polled regularly
- * using stat (more precise: QFileInfo.lastModified()).
+ * using stat (more precise: TQFileInfo.lastModified()).
* The polling frequency is determined from global kconfig
* settings, defaulting to 500 ms for local directories
* and 5000 ms for remote mounts
@@ -201,32 +201,32 @@ void KDirWatchPrivate::dnotify_sigio_handler(int sig, siginfo_t *si, void *p)
KDirWatchPrivate::KDirWatchPrivate()
: rescan_timer(0, "KDirWatchPrivate::rescan_timer")
{
- timer = new QTimer(this, "KDirWatchPrivate::timer");
- connect (timer, SIGNAL(timeout()), this, SLOT(slotRescan()));
+ timer = new TQTimer(this, "KDirWatchPrivate::timer");
+ connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan()));
freq = 3600000; // 1 hour as upper bound
statEntries = 0;
delayRemove = false;
m_ref = 0;
- KConfigGroup config(KGlobal::config(), QCString("DirWatch"));
+ KConfigGroup config(KGlobal::config(), TQCString("DirWatch"));
m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000);
m_PollInterval = config.readNumEntry("PollInterval", 500);
- QString available("Stat");
+ TQString available("Stat");
// used for FAM and DNOTIFY
rescan_all = false;
- connect(&rescan_timer, SIGNAL(timeout()), this, SLOT(slotRescan()));
+ connect(&rescan_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan()));
#ifdef HAVE_FAM
// It's possible that FAM server can't be started
if (FAMOpen(&fc) ==0) {
available += ", FAM";
use_fam=true;
- sn = new QSocketNotifier( FAMCONNECTION_GETFD(&fc),
- QSocketNotifier::Read, this);
- connect( sn, SIGNAL(activated(int)),
- this, SLOT(famEventReceived()) );
+ sn = new TQSocketNotifier( FAMCONNECTION_GETFD(&fc),
+ TQSocketNotifier::Read, this);
+ connect( sn, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(famEventReceived()) );
}
else {
kdDebug(7001) << "Can't use FAM (fam daemon not running?)" << endl;
@@ -261,8 +261,8 @@ KDirWatchPrivate::KDirWatchPrivate()
available += ", Inotify";
fcntl(m_inotify_fd, F_SETFD, FD_CLOEXEC);
- mSn = new QSocketNotifier( m_inotify_fd, QSocketNotifier::Read, this );
- connect( mSn, SIGNAL(activated( int )), this, SLOT( slotActivated() ) );
+ mSn = new TQSocketNotifier( m_inotify_fd, TQSocketNotifier::Read, this );
+ connect( mSn, TQT_SIGNAL(activated( int )), this, TQT_SLOT( slotActivated() ) );
}
#endif
@@ -295,8 +295,8 @@ KDirWatchPrivate::KDirWatchPrivate()
fcntl(mPipe[1], F_SETFD, FD_CLOEXEC);
fcntl(mPipe[0], F_SETFL, O_NONBLOCK | fcntl(mPipe[0], F_GETFL));
fcntl(mPipe[1], F_SETFL, O_NONBLOCK | fcntl(mPipe[1], F_GETFL));
- mSn = new QSocketNotifier( mPipe[0], QSocketNotifier::Read, this);
- connect(mSn, SIGNAL(activated(int)), this, SLOT(slotActivated()));
+ mSn = new TQSocketNotifier( mPipe[0], TQSocketNotifier::Read, this);
+ connect(mSn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated()));
// Install the signal handler only once
if ( dnotify_signal == 0 )
{
@@ -388,9 +388,9 @@ void KDirWatchPrivate::slotActivated()
pending -= sizeof( struct inotify_event ) + event->len;
offset += sizeof( struct inotify_event ) + event->len;
- QString path;
+ TQString path;
if ( event->len )
- path = QFile::decodeName( QCString( event->name, event->len ) );
+ path = TQFile::decodeName( TQCString( event->name, event->len ) );
if ( path.length() && isNoisyFile( path.latin1() ) )
continue;
@@ -411,9 +411,9 @@ void KDirWatchPrivate::slotActivated()
kdDebug(7001) << "-->got deleteself signal for " << e->path << endl;
e->m_status = NonExistent;
if (e->isDir)
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
else
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
if ( event->mask & IN_IGNORED ) {
e->wd = 0;
@@ -426,7 +426,7 @@ void KDirWatchPrivate::slotActivated()
if (sub_entry /*&& sub_entry->isDir*/) {
removeEntry(0,e->path, sub_entry);
KDE_struct_stat stat_buf;
- QCString tpath = QFile::encodeName(path);
+ TQCString tpath = TQFile::encodeName(path);
KDE_stat(tpath, &stat_buf);
//sub_entry->isDir = S_ISDIR(stat_buf.st_mode);
@@ -459,7 +459,7 @@ void KDirWatchPrivate::slotActivated()
*/
void KDirWatchPrivate::Entry::propagate_dirty()
{
- for (QPtrListIterator<Entry> sub_entry (m_entries);
+ for (TQPtrListIterator<Entry> sub_entry (m_entries);
sub_entry.current(); ++sub_entry)
{
if (!sub_entry.current()->dirty)
@@ -521,14 +521,14 @@ int KDirWatchPrivate::Entry::clients()
}
-KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const QString& _path)
+KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const TQString& _path)
{
// we only support absolute paths
- if (QDir::isRelativePath(_path)) {
+ if (TQDir::isRelativePath(_path)) {
return 0;
}
- QString path = _path;
+ TQString path = _path;
if ( path.length() > 1 && path.right(1) == "/" )
path.truncate( path.length() - 1 );
@@ -570,10 +570,10 @@ bool KDirWatchPrivate::useFAM(Entry* e)
if (e->isDir) {
if (e->m_status == NonExistent) {
// If the directory does not exist we watch the parent directory
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
}
else {
- int res =FAMMonitorDirectory(&fc, QFile::encodeName(e->path),
+ int res =FAMMonitorDirectory(&fc, TQFile::encodeName(e->path),
&(e->fr), e);
if (res<0) {
e->m_mode = UnknownMode;
@@ -588,10 +588,10 @@ bool KDirWatchPrivate::useFAM(Entry* e)
else {
if (e->m_status == NonExistent) {
// If the file does not exist we watch the directory
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
else {
- int res = FAMMonitorFile(&fc, QFile::encodeName(e->path),
+ int res = FAMMonitorFile(&fc, TQFile::encodeName(e->path),
&(e->fr), e);
if (res<0) {
e->m_mode = UnknownMode;
@@ -626,7 +626,7 @@ bool KDirWatchPrivate::useDNotify(Entry* e)
if (e->isDir) {
if (e->m_status == Normal) {
- int fd = KDE_open(QFile::encodeName(e->path).data(), O_RDONLY);
+ int fd = KDE_open(TQFile::encodeName(e->path).data(), O_RDONLY);
// Migrate fd to somewhere above 128. Some libraries have
// constructs like:
// fd = socket(...)
@@ -673,13 +673,13 @@ bool KDirWatchPrivate::useDNotify(Entry* e)
<< ") for " << e->path << endl;
}
else { // NotExisting
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
}
}
else { // File
// we always watch the directory (DNOTIFY can't watch files alone)
// this notifies us about changes of files therein
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
return true;
@@ -708,14 +708,14 @@ bool KDirWatchPrivate::useINotify( Entry* e )
}
if ( ( e->wd = inotify_add_watch( m_inotify_fd,
- QFile::encodeName( e->path ), mask) ) > 0 )
+ TQFile::encodeName( e->path ), mask) ) > 0 )
return true;
if ( e->m_status == NonExistent ) {
if (e->isDir)
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
else
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
return true;
}
@@ -753,10 +753,10 @@ bool KDirWatchPrivate::useStat(Entry* e)
* Sometimes, entries are dependant on each other: if <sub_entry> !=0,
* this entry needs another entry to watch himself (when notExistent).
*/
-void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
+void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path,
Entry* sub_entry, bool isDir)
{
- QString path = _path;
+ TQString path = _path;
if (path.startsWith("/dev/") || (path == "/dev"))
return; // Don't even go there.
@@ -801,7 +801,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
mask |= IN_ONLYDIR;
inotify_rm_watch (m_inotify_fd, e->wd);
- e->wd = inotify_add_watch( m_inotify_fd, QFile::encodeName( e->path ), mask);
+ e->wd = inotify_add_watch( m_inotify_fd, TQFile::encodeName( e->path ), mask);
}
}
#endif
@@ -811,7 +811,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
(*it).addClient(instance);
kdDebug(7001) << "Added already watched Entry " << path
<< " (now " << (*it).clients() << " clients)"
- << QString(" [%1]").arg(instance->name()) << endl;
+ << TQString(" [%1]").arg(instance->name()) << endl;
}
return;
}
@@ -819,7 +819,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
// we have a new path to watch
KDE_struct_stat stat_buf;
- QCString tpath = QFile::encodeName(path);
+ TQCString tpath = TQFile::encodeName(path);
bool exists = (KDE_stat(tpath, &stat_buf) == 0);
Entry newEntry;
@@ -854,8 +854,8 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
kdDebug(7001) << "Added " << (e->isDir ? "Dir ":"File ") << path
<< (e->m_status == NonExistent ? " NotExisting" : "")
- << (sub_entry ? QString(" for %1").arg(sub_entry->path) : QString(""))
- << (instance ? QString(" [%1]").arg(instance->name()) : QString(""))
+ << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
+ << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
<< endl;
@@ -883,7 +883,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
void KDirWatchPrivate::removeEntry( KDirWatch* instance,
- const QString& _path, Entry* sub_entry )
+ const TQString& _path, Entry* sub_entry )
{
kdDebug(7001) << "KDirWatchPrivate::removeEntry for '" << _path << "' sub_entry: " << sub_entry << endl;
Entry* e = entry(_path);
@@ -920,9 +920,9 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
else {
if (e->isDir)
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
else
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
}
#endif
@@ -938,9 +938,9 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
else {
if (e->isDir)
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
else
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
}
#endif
@@ -948,7 +948,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
#ifdef HAVE_DNOTIFY
if (e->m_mode == DNotifyMode) {
if (!e->isDir) {
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
else { // isDir
// must close the FD.
@@ -964,7 +964,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
}
else {
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
}
}
}
@@ -979,8 +979,8 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
kdDebug(7001) << "Removed " << (e->isDir ? "Dir ":"File ") << e->path
- << (sub_entry ? QString(" for %1").arg(sub_entry->path) : QString(""))
- << (instance ? QString(" [%1]").arg(instance->name()) : QString(""))
+ << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
+ << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
<< endl;
m_mapEntries.remove( e->path ); // <e> not valid any more
}
@@ -991,7 +991,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
*/
void KDirWatchPrivate::removeEntries( KDirWatch* instance )
{
- QPtrList<Entry> list;
+ TQPtrList<Entry> list;
int minfreq = 3600000;
// put all entries where instance is a client in list
@@ -1069,7 +1069,7 @@ bool KDirWatchPrivate::restartEntryScan( KDirWatch* instance, Entry* e,
if (wasWatching == 0) {
if (!notify) {
KDE_struct_stat stat_buf;
- bool exists = (KDE_stat(QFile::encodeName(e->path), &stat_buf) == 0);
+ bool exists = (KDE_stat(TQFile::encodeName(e->path), &stat_buf) == 0);
if (exists) {
e->m_ctime = stat_buf.st_ctime;
e->m_status = Normal;
@@ -1161,7 +1161,7 @@ int KDirWatchPrivate::scanEntry(Entry* e)
}
KDE_struct_stat stat_buf;
- bool exists = (KDE_stat(QFile::encodeName(e->path), &stat_buf) == 0);
+ bool exists = (KDE_stat(TQFile::encodeName(e->path), &stat_buf) == 0);
if (exists) {
if (e->m_status == NonExistent) {
@@ -1201,22 +1201,22 @@ int KDirWatchPrivate::scanEntry(Entry* e)
* and stored pending events. When watching is stopped, the event is
* added to the pending events.
*/
-void KDirWatchPrivate::emitEvent(Entry* e, int event, const QString &fileName)
+void KDirWatchPrivate::emitEvent(Entry* e, int event, const TQString &fileName)
{
- QString path = e->path;
+ TQString path = e->path;
if (!fileName.isEmpty()) {
- if (!QDir::isRelativePath(fileName))
+ if (!TQDir::isRelativePath(fileName))
path = fileName;
else
#ifdef Q_OS_UNIX
path += "/" + fileName;
#elif defined(Q_WS_WIN)
//current drive is passed instead of /
- path += QDir::currentDirPath().left(2) + "/" + fileName;
+ path += TQDir::currentDirPath().left(2) + "/" + fileName;
#endif
}
- QPtrListIterator<Client> cit( e->m_clients );
+ TQPtrListIterator<Client> cit( e->m_clients );
for ( ; cit.current(); ++cit )
{
Client* c = cit.current();
@@ -1282,7 +1282,7 @@ void KDirWatchPrivate::slotRescan()
delayRemove = true;
#if defined(HAVE_DNOTIFY) || defined(HAVE_INOTIFY)
- QPtrList<Entry> dList, cList;
+ TQPtrList<Entry> dList, cList;
#endif
if (rescan_all)
@@ -1354,17 +1354,17 @@ void KDirWatchPrivate::slotRescan()
// Scan parent of deleted directories for new creation
Entry* e;
for(e=dList.first();e;e=dList.next())
- addEntry(0, QDir::cleanDirPath( e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath( e->path+"/.."), e, true);
// Remove watch of parent of new created directories
for(e=cList.first();e;e=cList.next())
- removeEntry(0, QDir::cleanDirPath( e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath( e->path+"/.."), e);
#endif
if ( timerRunning )
timer->start(freq);
- QTimer::singleShot(0, this, SLOT(slotRemoveDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed()));
}
bool KDirWatchPrivate::isNoisyFile( const char * filename )
@@ -1413,7 +1413,7 @@ void KDirWatchPrivate::famEventReceived()
checkFAMEvent(&fe);
}
- QTimer::singleShot(0, this, SLOT(slotRemoveDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed()));
}
void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
@@ -1475,7 +1475,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
{
case FAMDeleted:
// file absolute: watched dir
- if (!QDir::isRelativePath(fe->filename))
+ if (!TQDir::isRelativePath(fe->filename))
{
// a watched directory was deleted
@@ -1485,7 +1485,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
<< FAMREQUEST_GETREQNUM(&(e->fr))
<< " for " << e->path << endl;
// Scan parent for a new creation
- addEntry(0, QDir::cleanDirPath( e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath( e->path+"/.."), e, true);
}
break;
@@ -1495,7 +1495,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
for(;sub_entry; sub_entry = e->m_entries.next())
if (sub_entry->path == e->path + "/" + fe->filename) break;
if (sub_entry && sub_entry->isDir) {
- QString path = e->path;
+ TQString path = e->path;
removeEntry(0,e->path,sub_entry); // <e> can be invalid here!!
sub_entry->m_status = Normal;
if (!useFAM(sub_entry))
@@ -1539,7 +1539,7 @@ void KDirWatchPrivate::statistics()
Client* c = e->m_clients.first();
for(;c; c = e->m_clients.next()) {
- QString pending;
+ TQString pending;
if (c->watchingStopped) {
if (c->pending & Deleted) pending += "deleted ";
if (c->pending & Created) pending += "created ";
@@ -1585,14 +1585,14 @@ bool KDirWatch::exists()
return s_pSelf != 0;
}
-KDirWatch::KDirWatch (QObject* parent, const char* name)
- : QObject(parent,name)
+KDirWatch::KDirWatch (TQObject* parent, const char* name)
+ : TQObject(parent,name)
{
if (!name) {
static int nameCounter = 0;
nameCounter++;
- setName(QString("KDirWatch-%1").arg(nameCounter).ascii());
+ setName(TQString("KDirWatch-%1").arg(nameCounter).ascii());
}
if (!dwp_self)
@@ -1616,7 +1616,7 @@ KDirWatch::~KDirWatch()
// TODO: add watchFiles/recursive support
-void KDirWatch::addDir( const QString& _path,
+void KDirWatch::addDir( const TQString& _path,
bool watchFiles, bool recursive)
{
if (watchFiles || recursive) {
@@ -1625,34 +1625,34 @@ void KDirWatch::addDir( const QString& _path,
if (d) d->addEntry(this, _path, 0, true);
}
-void KDirWatch::addFile( const QString& _path )
+void KDirWatch::addFile( const TQString& _path )
{
if (d) d->addEntry(this, _path, 0, false);
}
-QDateTime KDirWatch::ctime( const QString &_path )
+TQDateTime KDirWatch::ctime( const TQString &_path )
{
KDirWatchPrivate::Entry* e = d->entry(_path);
if (!e)
- return QDateTime();
+ return TQDateTime();
- QDateTime result;
+ TQDateTime result;
result.setTime_t(e->m_ctime);
return result;
}
-void KDirWatch::removeDir( const QString& _path )
+void KDirWatch::removeDir( const TQString& _path )
{
if (d) d->removeEntry(this, _path, 0);
}
-void KDirWatch::removeFile( const QString& _path )
+void KDirWatch::removeFile( const TQString& _path )
{
if (d) d->removeEntry(this, _path, 0);
}
-bool KDirWatch::stopDirScan( const QString& _path )
+bool KDirWatch::stopDirScan( const TQString& _path )
{
if (d) {
KDirWatchPrivate::Entry *e = d->entry(_path);
@@ -1661,7 +1661,7 @@ bool KDirWatch::stopDirScan( const QString& _path )
return false;
}
-bool KDirWatch::restartDirScan( const QString& _path )
+bool KDirWatch::restartDirScan( const TQString& _path )
{
if (d) {
KDirWatchPrivate::Entry *e = d->entry(_path);
@@ -1685,7 +1685,7 @@ void KDirWatch::startScan( bool notify, bool skippedToo )
}
-bool KDirWatch::contains( const QString& _path ) const
+bool KDirWatch::contains( const TQString& _path ) const
{
KDirWatchPrivate::Entry* e = d->entry(_path);
if (!e)
@@ -1708,19 +1708,19 @@ void KDirWatch::statistics()
}
-void KDirWatch::setCreated( const QString & _file )
+void KDirWatch::setCreated( const TQString & _file )
{
kdDebug(7001) << name() << " emitting created " << _file << endl;
emit created( _file );
}
-void KDirWatch::setDirty( const QString & _file )
+void KDirWatch::setDirty( const TQString & _file )
{
kdDebug(7001) << name() << " emitting dirty " << _file << endl;
emit dirty( _file );
}
-void KDirWatch::setDeleted( const QString & _file )
+void KDirWatch::setDeleted( const TQString & _file )
{
kdDebug(7001) << name() << " emitting deleted " << _file << endl;
emit deleted( _file );
diff --git a/kio/kio/kdirwatch.h b/kio/kio/kdirwatch.h
index af25ee2e6..36f2737b3 100644
--- a/kio/kio/kdirwatch.h
+++ b/kio/kio/kdirwatch.h
@@ -18,9 +18,9 @@
#ifndef _KDIRWATCH_H
#define _KDIRWATCH_H
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -70,10 +70,10 @@ class KIO_EXPORT KDirWatch : public QObject
*
* Scanning begins immediately when a dir/file watch
* is added.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
*/
- KDirWatch (QObject* parent = 0, const char* name = 0);
+ KDirWatch (TQObject* parent = 0, const char* name = 0);
/**
* Destructor.
@@ -96,21 +96,21 @@ class KIO_EXPORT KDirWatch : public QObject
* @param watchFiles if true, the KDirWatch will also watch files - NOT IMPLEMENTED YET
* @param recursive if true, all sub directories are also watched - NOT IMPLEMENTED YET
*/
- void addDir(const QString& path,
+ void addDir(const TQString& path,
bool watchFiles = false, bool recursive = false);
/**
* Adds a file to be watched.
* @param file the file to watch
*/
- void addFile(const QString& file);
+ void addFile(const TQString& file);
/**
* Returns the time the directory/file was last changed.
* @param path the file to check
* @return the date of the last modification
*/
- QDateTime ctime(const QString& path);
+ TQDateTime ctime(const TQString& path);
/**
* Removes a directory from the list of scanned directories.
@@ -118,7 +118,7 @@ class KIO_EXPORT KDirWatch : public QObject
* If specified path is not in the list this does nothing.
* @param path the path of the dir to be removed from the list
*/
- void removeDir(const QString& path);
+ void removeDir(const TQString& path);
/**
* Removes a file from the list of watched files.
@@ -126,7 +126,7 @@ class KIO_EXPORT KDirWatch : public QObject
* If specified path is not in the list this does nothing.
* @param file the file to be removed from the list
*/
- void removeFile(const QString& file);
+ void removeFile(const TQString& file);
/**
* Stops scanning the specified path.
@@ -140,7 +140,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @return true if the @p path is being watched, otherwise false
* @see restartDirScanning()
*/
- bool stopDirScan(const QString& path);
+ bool stopDirScan(const TQString& path);
/**
* Restarts scanning for specified path.
@@ -155,7 +155,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @return true if the @p path is being watched, otherwise false
* @see stopDirScanning()
*/
- bool restartDirScan(const QString& path);
+ bool restartDirScan(const TQString& path);
/**
* Starts scanning of all dirs in list.
@@ -194,7 +194,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @param path the directory to check
* @return true if the directory is being watched
*/
- bool contains( const QString& path ) const;
+ bool contains( const TQString& path ) const;
/**
* Dump statistic information about all KDirWatch instances.
@@ -206,17 +206,17 @@ class KIO_EXPORT KDirWatch : public QObject
* Emits created().
* @param path the path of the file or directory
*/
- void setCreated( const QString &path );
+ void setCreated( const TQString &path );
/**
* Emits dirty().
* @param path the path of the file or directory
*/
- void setDirty( const QString &path );
+ void setDirty( const TQString &path );
/**
* Emits deleted().
* @param path the path of the file or directory
*/
- void setDeleted( const QString &path );
+ void setDeleted( const TQString &path );
enum Method { FAM, DNotify, Stat, INotify };
/**
@@ -262,13 +262,13 @@ class KIO_EXPORT KDirWatch : public QObject
* The new ctime is set before the signal is emitted.
* @param path the path of the file or directory
*/
- void dirty (const QString &path);
+ void dirty (const TQString &path);
/**
* Emitted when a file or directory is created.
* @param path the path of the file or directory
*/
- void created (const QString &path );
+ void created (const TQString &path );
/**
* Emitted when a file or directory is deleted.
@@ -276,7 +276,7 @@ class KIO_EXPORT KDirWatch : public QObject
* The object is still watched for new creation.
* @param path the path of the file or directory
*/
- void deleted (const QString &path );
+ void deleted (const TQString &path );
private:
bool _isStopped;
diff --git a/kio/kio/kdirwatch_p.h b/kio/kio/kdirwatch_p.h
index ec3a4a610..9920b866d 100644
--- a/kio/kio/kdirwatch_p.h
+++ b/kio/kio/kdirwatch_p.h
@@ -47,10 +47,10 @@ public:
entryMode m_mode;
bool isDir;
// instances interested in events
- QPtrList<Client> m_clients;
+ TQPtrList<Client> m_clients;
// nonexistent entries of this directory
- QPtrList<Entry> m_entries;
- QString path;
+ TQPtrList<Entry> m_entries;
+ TQString path;
int msecLeft, freq;
@@ -74,15 +74,15 @@ public:
#endif
};
- typedef QMap<QString,Entry> EntryMap;
+ typedef TQMap<TQString,Entry> EntryMap;
KDirWatchPrivate();
~KDirWatchPrivate();
void resetList (KDirWatch*,bool);
void useFreq(Entry* e, int newFreq);
- void addEntry(KDirWatch*,const QString&, Entry*, bool);
- void removeEntry(KDirWatch*,const QString&, Entry*);
+ void addEntry(KDirWatch*,const TQString&, Entry*, bool);
+ void removeEntry(KDirWatch*,const TQString&, Entry*);
bool stopEntryScan(KDirWatch*, Entry*);
bool restartEntryScan(KDirWatch*, Entry*, bool );
void stopScan(KDirWatch*);
@@ -91,9 +91,9 @@ public:
void removeEntries(KDirWatch*);
void statistics();
- Entry* entry(const QString&);
+ Entry* entry(const TQString&);
int scanEntry(Entry* e);
- void emitEvent(Entry* e, int event, const QString &fileName = QString::null);
+ void emitEvent(Entry* e, int event, const TQString &fileName = TQString::null);
// Memory management - delete when last KDirWatch gets deleted
void ref() { m_ref++; }
@@ -108,7 +108,7 @@ public slots:
void slotRemoveDelayed();
public:
- QTimer *timer;
+ TQTimer *timer;
EntryMap m_mapEntries;
int freq;
@@ -118,13 +118,13 @@ public:
bool useStat(Entry*);
bool delayRemove;
- QPtrList<Entry> removeList;
+ TQPtrList<Entry> removeList;
bool rescan_all;
- QTimer rescan_timer;
+ TQTimer rescan_timer;
#ifdef HAVE_FAM
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
FAMConnection fc;
bool use_fam;
@@ -133,13 +133,13 @@ public:
#endif
#if defined(HAVE_DNOTIFY) || defined(HAVE_INOTIFY)
- QSocketNotifier *mSn;
+ TQSocketNotifier *mSn;
#endif
#ifdef HAVE_DNOTIFY
bool supports_dnotify;
int mPipe[2];
- QIntDict<Entry> fd_Entry;
+ TQIntDict<Entry> fd_Entry;
static void dnotify_handler(int, siginfo_t *si, void *);
static void dnotify_sigio_handler(int, siginfo_t *si, void *);
diff --git a/kio/kio/kemailsettings.cpp b/kio/kio/kemailsettings.cpp
index 244e4043f..2f1ffe7a0 100644
--- a/kio/kio/kemailsettings.cpp
+++ b/kio/kio/kemailsettings.cpp
@@ -37,25 +37,25 @@ public:
KEMailSettingsPrivate() : m_pConfig( 0 ) {}
~KEMailSettingsPrivate() { delete m_pConfig; }
KConfig *m_pConfig;
- QStringList profiles;
- QString m_sDefaultProfile, m_sCurrentProfile;
+ TQStringList profiles;
+ TQString m_sDefaultProfile, m_sCurrentProfile;
};
-QString KEMailSettings::defaultProfileName() const
+TQString KEMailSettings::defaultProfileName() const
{
return p->m_sDefaultProfile;
}
-QString KEMailSettings::getSetting(KEMailSettings::Setting s)
+TQString KEMailSettings::getSetting(KEMailSettings::Setting s)
{
- p->m_pConfig->setGroup(QString("PROFILE_")+p->m_sCurrentProfile);
+ p->m_pConfig->setGroup(TQString("PROFILE_")+p->m_sCurrentProfile);
switch (s) {
case ClientProgram: {
return p->m_pConfig->readEntry("EmailClient");
break;
}
case ClientTerminal: {
- return ((p->m_pConfig->readBoolEntry("TerminalClient")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("TerminalClient")) ? TQString("true") : TQString("false") );
break;
}
case RealName: {
@@ -95,7 +95,7 @@ QString KEMailSettings::getSetting(KEMailSettings::Setting s)
break;
}
case OutServerTLS: {
- return ((p->m_pConfig->readBoolEntry("OutgoingServerTLS")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("OutgoingServerTLS")) ? TQString("true") : TQString("false") );
break;
}
case InServer: {
@@ -119,15 +119,15 @@ QString KEMailSettings::getSetting(KEMailSettings::Setting s)
break;
}
case InServerTLS: {
- return ((p->m_pConfig->readBoolEntry("IncomingServerTLS")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("IncomingServerTLS")) ? TQString("true") : TQString("false") );
break;
}
};
- return QString::null;
+ return TQString::null;
}
-void KEMailSettings::setSetting(KEMailSettings::Setting s, const QString &v)
+void KEMailSettings::setSetting(KEMailSettings::Setting s, const TQString &v)
{
- p->m_pConfig->setGroup(QString("PROFILE_")+p->m_sCurrentProfile);
+ p->m_pConfig->setGroup(TQString("PROFILE_")+p->m_sCurrentProfile);
switch (s) {
case ClientProgram: {
p->m_pConfig->writePathEntry("EmailClient", v);
@@ -205,7 +205,7 @@ void KEMailSettings::setSetting(KEMailSettings::Setting s, const QString &v)
p->m_pConfig->sync();
}
-void KEMailSettings::setDefault(const QString &s)
+void KEMailSettings::setDefault(const TQString &s)
{
p->m_pConfig->setGroup("Defaults");
p->m_pConfig->writeEntry("Profile", s);
@@ -214,25 +214,25 @@ void KEMailSettings::setDefault(const QString &s)
}
-void KEMailSettings::setProfile (const QString &s)
+void KEMailSettings::setProfile (const TQString &s)
{
- QString groupname="PROFILE_";
+ TQString groupname="PROFILE_";
groupname.append(s);
p->m_sCurrentProfile=s;
if (!p->m_pConfig->hasGroup(groupname)) { // Create a group if it doesn't exist
p->m_pConfig->setGroup(groupname);
- p->m_pConfig->writeEntry("ServerType", QString::null);
+ p->m_pConfig->writeEntry("ServerType", TQString::null);
p->m_pConfig->sync();
p->profiles+=s;
}
}
-QString KEMailSettings::currentProfileName() const
+TQString KEMailSettings::currentProfileName() const
{
return p->m_sCurrentProfile;
}
-QStringList KEMailSettings::profiles() const
+TQStringList KEMailSettings::profiles() const
{
return p->profiles;
}
@@ -240,12 +240,12 @@ QStringList KEMailSettings::profiles() const
KEMailSettings::KEMailSettings()
{
p = new KEMailSettingsPrivate();
- p->m_sCurrentProfile=QString::null;
+ p->m_sCurrentProfile=TQString::null;
p->m_pConfig = new KConfig("emaildefaults");
- QStringList groups = p->m_pConfig->groupList();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it) {
+ TQStringList groups = p->m_pConfig->groupList();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) {
if ( (*it).left(8) == "PROFILE_" )
p->profiles+= (*it).mid(8, (*it).length());
}
@@ -253,7 +253,7 @@ KEMailSettings::KEMailSettings()
p->m_pConfig->setGroup("Defaults");
p->m_sDefaultProfile=p->m_pConfig->readEntry("Profile", i18n("Default"));
if (!p->m_sDefaultProfile.isNull()) {
- if (!p->m_pConfig->hasGroup(QString("PROFILE_")+p->m_sDefaultProfile))
+ if (!p->m_pConfig->hasGroup(TQString("PROFILE_")+p->m_sDefaultProfile))
setDefault(i18n("Default"));
else
setDefault(p->m_sDefaultProfile);
diff --git a/kio/kio/kemailsettings.h b/kio/kio/kemailsettings.h
index a2c53c145..f072fa7f9 100644
--- a/kio/kio/kemailsettings.h
+++ b/kio/kio/kemailsettings.h
@@ -28,8 +28,8 @@
#ifndef _KEMAILSETTINGS_H
#define _KEMAILSETTINGS_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -98,47 +98,47 @@ public:
* List of profiles available.
* @return the list of profiles
**/
- QStringList profiles() const;
+ TQStringList profiles() const;
/**
* Returns the name of the current profile.
* @returns what profile we're currently using
**/
- QString currentProfileName() const;
+ TQString currentProfileName() const;
/**
* Change the current profile.
* @param s the name of the new profile
**/
- void setProfile (const QString &s);
+ void setProfile (const TQString &s);
/**
* Returns the name of the default profile.
- * @returns the name of the one that's currently default QString::null if none
+ * @returns the name of the one that's currently default TQString::null if none
**/
- QString defaultProfileName() const;
+ TQString defaultProfileName() const;
/**
* Sets a new default.
* @param def the new default
**/
- void setDefault(const QString &def);
+ void setDefault(const TQString &def);
/**
* Get one of the predefined "basic" settings.
* @param s the setting to get
- * @return the value of the setting, or QString::null if not
+ * @return the value of the setting, or TQString::null if not
* set
**/
- QString getSetting(KEMailSettings::Setting s);
+ TQString getSetting(KEMailSettings::Setting s);
/**
* Set one of the predefined "basic" settings.
* @param s the setting to set
- * @param v the new value of the setting, or QString::null to
+ * @param v the new value of the setting, or TQString::null to
* unset
**/
- void setSetting(KEMailSettings::Setting s, const QString &v);
+ void setSetting(KEMailSettings::Setting s, const TQString &v);
private:
KEMailSettingsPrivate *p;
diff --git a/kio/kio/kfilefilter.cpp b/kio/kio/kfilefilter.cpp
index e8d01ad2f..05c53c02c 100644
--- a/kio/kio/kfilefilter.cpp
+++ b/kio/kio/kfilefilter.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kfileitem.h>
#include <kglobal.h>
@@ -47,27 +47,27 @@ void KSimpleFileFilter::setFilterSpecials( bool filter )
m_filterSpecials = filter;
}
-void KSimpleFileFilter::setNameFilters( const QString& nameFilters )
+void KSimpleFileFilter::setNameFilters( const TQString& nameFilters )
{
// KDE 3.0 defaults
setNameFilters( nameFilters, false, ' ' );
}
-void KSimpleFileFilter::setNameFilters( const QString& nameFilters,
+void KSimpleFileFilter::setNameFilters( const TQString& nameFilters,
bool caseSensitive,
- const QChar& separator )
+ const TQChar& separator )
{
m_nameFilters.clear();
// Split on white space
- QStringList list = QStringList::split(separator, nameFilters);
+ TQStringList list = TQStringList::split(separator, nameFilters);
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it )
- m_nameFilters.append(new QRegExp(*it, caseSensitive, true ));
+ m_nameFilters.append(new TQRegExp(*it, caseSensitive, true ));
}
-void KSimpleFileFilter::setMimeFilters( const QStringList& mimeFilters )
+void KSimpleFileFilter::setMimeFilters( const TQStringList& mimeFilters )
{
m_mimeFilters = mimeFilters;
}
@@ -79,10 +79,10 @@ void KSimpleFileFilter::setModeFilter( mode_t mode )
bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
{
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
- const QString& name = item->name();
+ const TQString& name = item->name();
if ( m_filterDotFiles && item->isHidden() )
return false;
@@ -98,7 +98,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
KMimeType::Ptr mime = item->mimeTypePtr();
bool ok = false;
- QStringList::ConstIterator it = m_mimeFilters.begin();
+ TQStringList::ConstIterator it = m_mimeFilters.begin();
for ( ; it != m_mimeFilters.end(); ++it ) {
if ( mime->is(*it) ) { // match!
ok = true;
@@ -112,7 +112,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
if ( !m_nameFilters.isEmpty() ) {
bool ok = false;
- QPtrListIterator<QRegExp> it( m_nameFilters );
+ TQPtrListIterator<TQRegExp> it( m_nameFilters );
for ( ; it.current(); ++it ) {
if ( it.current()->exactMatch( name ) ) { // match!
ok = true;
diff --git a/kio/kio/kfilefilter.h b/kio/kio/kfilefilter.h
index 5146618cd..a6384fbad 100644
--- a/kio/kio/kfilefilter.h
+++ b/kio/kio/kfilefilter.h
@@ -21,8 +21,8 @@
#ifndef KFILEFILTER_H
#define KFILEFILTER_H
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -105,8 +105,8 @@ public:
* @param separator the separator in the @p nameFilter
* @since 3.1
*/
- void setNameFilters( const QString& nameFilters, bool caseSensitive,
- const QChar& separator = ' ' );
+ void setNameFilters( const TQString& nameFilters, bool caseSensitive,
+ const TQChar& separator = ' ' );
/**
* Sets a list of regular expressions to filter by name.
* The file will only pass if its name matches one of the regular
@@ -114,7 +114,7 @@ public:
* @param nameFilters a list of regular expressions, separated by
* space (' ')
*/
- virtual void setNameFilters( const QString& nameFilters );
+ virtual void setNameFilters( const TQString& nameFilters );
/**
* Sets a list of mime filters. A file can only pass if its
@@ -122,13 +122,13 @@ public:
* @param mimeFilters the list of mime types
* @see setMimeFilter
*/
- virtual void setMimeFilters( const QStringList& mimeFilters );
+ virtual void setMimeFilters( const TQStringList& mimeFilters );
/**
* Returns the list of mime types.
* @return the list of mime types
* @see mimeFilter
*/
- QStringList mimeFilters() const { return m_mimeFilters; }
+ TQStringList mimeFilters() const { return m_mimeFilters; }
/**
* Sets the mode filter. If the @p mode is 0, the filter is
@@ -154,10 +154,10 @@ public:
virtual bool passesFilter( const KFileItem *item ) const;
protected:
- QPtrList<QRegExp> m_nameFilters;
+ TQPtrList<TQRegExp> m_nameFilters;
private:
- QStringList m_mimeFilters;
+ TQStringList m_mimeFilters;
bool m_filterDotFiles :1;
bool m_filterSpecials :1;
mode_t m_modeFilter;
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index d06b9b083..9f89765d2 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -29,10 +29,10 @@
#include "kfileitem.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qmap.h>
-#include <qstylesheet.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqmap.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <kfilemetainfo.h>
@@ -48,7 +48,7 @@
class KFileItem::KFileItemPrivate {
public:
- QString iconName;
+ TQString iconName;
};
KFileItem::KFileItem( const KIO::UDSEntry& _entry, const KURL& _url,
@@ -87,7 +87,7 @@ KFileItem::KFileItem( mode_t _mode, mode_t _permissions, const KURL& _url, bool
init( _determineMimeTypeOnDemand );
}
-KFileItem::KFileItem( const KURL &url, const QString &mimeType, mode_t mode )
+KFileItem::KFileItem( const KURL &url, const TQString &mimeType, mode_t mode )
: m_url( url ),
m_strName( url.fileName() ),
m_strText( KIO::decodeFileName( m_strName ) ),
@@ -126,7 +126,7 @@ KFileItem::~KFileItem()
void KFileItem::init( bool _determineMimeTypeOnDemand )
{
- m_access = QString::null;
+ m_access = TQString::null;
m_size = (KIO::filesize_t) -1;
// metaInfo = KFileMetaInfo();
for ( int i = 0; i < NumFlags; i++ )
@@ -146,7 +146,7 @@ void KFileItem::init( bool _determineMimeTypeOnDemand )
* This is the reason for the -1
*/
KDE_struct_stat buf;
- QCString path = QFile::encodeName(m_url.path( -1 ));
+ TQCString path = TQFile::encodeName(m_url.path( -1 ));
if ( KDE_lstat( path.data(), &buf ) == 0 )
{
mode = buf.st_mode;
@@ -254,7 +254,7 @@ void KFileItem::readUDSEntry( bool _urlIsDirectory )
}
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
+ static const TQString& dot = KGlobal::staticQString(".");
if ( _urlIsDirectory && !UDS_URL_seen && !m_strName.isEmpty() && m_strName != dot )
m_url.addPath( m_strName );
}
@@ -264,8 +264,8 @@ void KFileItem::refresh()
m_fileMode = KFileItem::Unknown;
m_permissions = KFileItem::Unknown;
m_pMimeType = 0L;
- m_user = QString::null;
- m_group = QString::null;
+ m_user = TQString::null;
+ m_group = TQString::null;
m_metaInfo = KFileMetaInfo();
m_hidden = Auto;
@@ -289,15 +289,15 @@ void KFileItem::setURL( const KURL &url )
setName( url.fileName() );
}
-void KFileItem::setName( const QString& name )
+void KFileItem::setName( const TQString& name )
{
m_strName = name;
m_strText = KIO::decodeFileName( m_strName );
}
-QString KFileItem::linkDest() const
+TQString KFileItem::linkDest() const
{
- if (&m_entry == NULL) return QString::null;
+ if (&m_entry == NULL) return TQString::null;
// Extract it from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = m_entry.begin();
@@ -308,17 +308,17 @@ QString KFileItem::linkDest() const
if ( m_bIsLocalURL )
{
char buf[1000];
- int n = readlink( QFile::encodeName(m_url.path( -1 )), buf, sizeof(buf)-1 );
+ int n = readlink( TQFile::encodeName(m_url.path( -1 )), buf, sizeof(buf)-1 );
if ( n != -1 )
{
buf[ n ] = 0;
- return QFile::decodeName( buf );
+ return TQFile::decodeName( buf );
}
}
- return QString::null;
+ return TQString::null;
}
-QString KFileItem::localPath() const
+TQString KFileItem::localPath() const
{
if ( m_bIsLocalURL )
{
@@ -326,7 +326,7 @@ QString KFileItem::localPath() const
}
else
{
- if (&m_entry == NULL) return QString::null;
+ if (&m_entry == NULL) return TQString::null;
// Extract the local path from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = m_entry.begin();
@@ -336,7 +336,7 @@ QString KFileItem::localPath() const
return (*it).m_str;
}
- return QString::null;
+ return TQString::null;
}
KIO::filesize_t KFileItem::size(bool &exists) const
@@ -358,7 +358,7 @@ KIO::filesize_t KFileItem::size(bool &exists) const
if ( m_bIsLocalURL )
{
KDE_struct_stat buf;
- if ( KDE_stat( QFile::encodeName(m_url.path( -1 )), &buf ) == 0 )
+ if ( KDE_stat( TQFile::encodeName(m_url.path( -1 )), &buf ) == 0 )
return buf.st_size;
}
exists = false;
@@ -448,7 +448,7 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const
if ( m_bIsLocalURL )
{
KDE_struct_stat buf;
- if ( KDE_stat( QFile::encodeName(m_url.path(-1)), &buf ) == 0 )
+ if ( KDE_stat( TQFile::encodeName(m_url.path(-1)), &buf ) == 0 )
{
if(which == KIO::UDS_CREATION_TIME) {
// We can't determine creation time for local files
@@ -468,32 +468,32 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const
}
-QString KFileItem::user() const
+TQString KFileItem::user() const
{
if ( m_user.isEmpty() && m_bIsLocalURL )
{
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
+ if ( KDE_lstat( TQFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
{
struct passwd *user = getpwuid( buff.st_uid );
if ( user != 0L )
- m_user = QString::fromLocal8Bit(user->pw_name);
+ m_user = TQString::fromLocal8Bit(user->pw_name);
}
}
return m_user;
}
-QString KFileItem::group() const
+TQString KFileItem::group() const
{
#ifdef Q_OS_UNIX
if (m_group.isEmpty() && m_bIsLocalURL )
{
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
+ if ( KDE_lstat( TQFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
{
struct group *ge = getgrgid( buff.st_gid );
if ( ge != 0L ) {
- m_group = QString::fromLocal8Bit(ge->gr_name);
+ m_group = TQString::fromLocal8Bit(ge->gr_name);
if (m_group.isEmpty())
m_group.sprintf("%d",ge->gr_gid);
} else
@@ -504,7 +504,7 @@ QString KFileItem::group() const
return m_group;
}
-QString KFileItem::mimetype() const
+TQString KFileItem::mimetype() const
{
KFileItem * that = const_cast<KFileItem *>(this);
return that->determineMimeType()->name();
@@ -533,14 +533,14 @@ bool KFileItem::isMimeTypeKnown() const
return m_bMimeTypeKnown && m_guessedMimeType.isEmpty();
}
-QString KFileItem::mimeComment()
+TQString KFileItem::mimeComment()
{
KMimeType::Ptr mType = determineMimeType();
bool isLocalURL;
KURL url = mostLocalURL(isLocalURL);
- QString comment = mType->comment( url, isLocalURL );
+ TQString comment = mType->comment( url, isLocalURL );
//kdDebug() << "finding comment for " << url.url() << " : " << m_pMimeType->name() << endl;
if (!comment.isEmpty())
return comment;
@@ -548,7 +548,7 @@ QString KFileItem::mimeComment()
return mType->name();
}
-QString KFileItem::iconName()
+TQString KFileItem::iconName()
{
if (d && (!d->iconName.isEmpty())) return d->iconName;
@@ -587,14 +587,14 @@ int KFileItem::overlays() const
return _state;
}
-QPixmap KFileItem::pixmap( int _size, int _state ) const
+TQPixmap KFileItem::pixmap( int _size, int _state ) const
{
if (d && (!d->iconName.isEmpty()))
return DesktopIcon(d->iconName,_size,_state);
if ( !m_pMimeType )
{
- static const QString & defaultFolderIcon =
+ static const TQString & defaultFolderIcon =
KGlobal::staticQString(KMimeType::mimeType( "inode/directory" )->KServiceType::icon());
if ( S_ISDIR( m_fileMode ) )
@@ -625,7 +625,7 @@ QPixmap KFileItem::pixmap( int _size, int _state ) const
bool isLocalURL;
KURL url = mostLocalURL(isLocalURL);
- QPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state );
+ TQPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state );
//kdDebug() << "finding pixmap for " << url.url() << " : " << mime->name() << endl;
if (p.isNull())
kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl;
@@ -637,9 +637,9 @@ bool KFileItem::isReadable() const
{
/*
struct passwd * user = getpwuid( geteuid() );
- bool isMyFile = (QString::fromLocal8Bit(user->pw_name) == m_user);
+ bool isMyFile = (TQString::fromLocal8Bit(user->pw_name) == m_user);
// This gets ugly for the group....
- // Maybe we want a static QString for the user and a static QStringList
+ // Maybe we want a static TQString for the user and a static QStringList
// for the groups... then we need to handle the deletion properly...
*/
@@ -654,7 +654,7 @@ bool KFileItem::isReadable() const
}
// Or if we can't read it [using ::access()] - not network transparent
- if ( m_bIsLocalURL && ::access( QFile::encodeName(m_url.path()), R_OK ) == -1 )
+ if ( m_bIsLocalURL && ::access( TQFile::encodeName(m_url.path()), R_OK ) == -1 )
return false;
return true;
@@ -664,9 +664,9 @@ bool KFileItem::isWritable() const
{
/*
struct passwd * user = getpwuid( geteuid() );
- bool isMyFile = (QString::fromLocal8Bit(user->pw_name) == m_user);
+ bool isMyFile = (TQString::fromLocal8Bit(user->pw_name) == m_user);
// This gets ugly for the group....
- // Maybe we want a static QString for the user and a static QStringList
+ // Maybe we want a static TQString for the user and a static QStringList
// for the groups... then we need to handle the deletion properly...
*/
@@ -677,7 +677,7 @@ bool KFileItem::isWritable() const
}
// Or if we can't read it [using ::access()] - not network transparent
- if ( m_bIsLocalURL && ::access( QFile::encodeName(m_url.path()), W_OK ) == -1 )
+ if ( m_bIsLocalURL && ::access( TQFile::encodeName(m_url.path()), W_OK ) == -1 )
return false;
return true;
@@ -727,20 +727,20 @@ bool KFileItem::acceptsDrops()
return true;
// Executable, shell script ... ?
- if ( ::access( QFile::encodeName(m_url.path()), X_OK ) == 0 )
+ if ( ::access( TQFile::encodeName(m_url.path()), X_OK ) == 0 )
return true;
return false;
}
-QString KFileItem::getStatusBarInfo()
+TQString KFileItem::getStatusBarInfo()
{
- QString text = m_strText;
+ TQString text = m_strText;
if ( m_bLink )
{
- QString comment = determineMimeType()->comment( m_url, m_bIsLocalURL );
- QString tmp;
+ TQString comment = determineMimeType()->comment( m_url, m_bIsLocalURL );
+ TQString tmp;
if ( comment.isEmpty() )
tmp = i18n ( "Symbolic Link" );
else
@@ -755,7 +755,7 @@ QString KFileItem::getStatusBarInfo()
bool hasSize;
KIO::filesize_t sizeValue = size(hasSize);
if(hasSize)
- text += QString(" (%1) ").arg( KIO::convertSize( sizeValue ) );
+ text += TQString(" (%1) ").arg( KIO::convertSize( sizeValue ) );
text += mimeComment();
}
else if ( S_ISDIR ( m_fileMode ) )
@@ -772,10 +772,10 @@ QString KFileItem::getStatusBarInfo()
return text;
}
-QString KFileItem::getToolTipText(int maxcount)
+TQString KFileItem::getToolTipText(int maxcount)
{
- // we can return QString::null if no tool tip should be shown
- QString tip;
+ // we can return TQString::null if no tool tip should be shown
+ TQString tip;
KFileMetaInfo info = metaInfo();
// the font tags are a workaround for the fact that the tool tip gets
@@ -789,7 +789,7 @@ QString KFileItem::getToolTipText(int maxcount)
tip += start + i18n("Name:") + mid + text() + end;
tip += start + i18n("Type:") + mid;
- QString type = QStyleSheet::escape(mimeComment());
+ TQString type = TQStyleSheet::escape(mimeComment());
if ( m_bLink ) {
tip += i18n("Link to %1 (%2)").arg(linkDest(), type) + end;
} else
@@ -802,13 +802,13 @@ QString KFileItem::getToolTipText(int maxcount)
tip += start + i18n("Size:") + mid +
KIO::convertSizeWithBytes(sizeValue) + end;
}
- QString timeStr = timeString( KIO::UDS_MODIFICATION_TIME);
+ TQString timeStr = timeString( KIO::UDS_MODIFICATION_TIME);
if(!timeStr.isEmpty())
tip += start + i18n("Modified:") + mid +
timeStr + end;
#ifndef Q_WS_WIN //TODO: show win32-specific permissions
- QString userStr = user();
- QString groupStr = group();
+ TQString userStr = user();
+ TQString groupStr = group();
if(!userStr.isEmpty() || !groupStr.isEmpty())
tip += start + i18n("Owner:") + mid + userStr + " - " + groupStr + end +
start + i18n("Permissions:") + mid +
@@ -818,16 +818,16 @@ QString KFileItem::getToolTipText(int maxcount)
if (info.isValid() && !info.isEmpty() )
{
tip += "<tr><td colspan=2><center><s>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</s></center></td></tr>";
- QStringList keys = info.preferredKeys();
+ TQStringList keys = info.preferredKeys();
// now the rest
- QStringList::Iterator it = keys.begin();
+ TQStringList::Iterator it = keys.begin();
for (int count = 0; count<maxcount && it!=keys.end() ; ++it)
{
KFileMetaInfoItem item = info.item( *it );
if ( item.isValid() )
{
- QString s = item.string();
+ TQString s = item.string();
if ( ( item.attributes() & KFileMimeTypeInfo::SqueezeText )
&& s.length() > 50) {
s.truncate(47);
@@ -837,9 +837,9 @@ QString KFileItem::getToolTipText(int maxcount)
{
count++;
tip += start +
- QStyleSheet::escape( item.translatedKey() ) + ":" +
+ TQStyleSheet::escape( item.translatedKey() ) + ":" +
mid +
- QStyleSheet::escape( s ) +
+ TQStyleSheet::escape( s ) +
end;
}
@@ -929,11 +929,11 @@ void KFileItem::setUDSEntry( const KIO::UDSEntry& _entry, const KURL& _url,
{
m_entry = _entry;
m_url = _url;
- m_strName = QString::null;
- m_strText = QString::null;
- m_user = QString::null;
- m_group = QString::null;
- m_strLowerCaseName = QString::null;
+ m_strName = TQString::null;
+ m_strText = TQString::null;
+ m_user = TQString::null;
+ m_group = TQString::null;
+ m_strLowerCaseName = TQString::null;
m_pMimeType = 0;
m_fileMode = KFileItem::Unknown;
m_permissions = KFileItem::Unknown;
@@ -942,11 +942,11 @@ void KFileItem::setUDSEntry( const KIO::UDSEntry& _entry, const KURL& _url,
m_bIsLocalURL = _url.isLocalFile();
m_bMimeTypeKnown = false;
m_hidden = Auto;
- m_guessedMimeType = QString::null;
+ m_guessedMimeType = TQString::null;
m_metaInfo = KFileMetaInfo();
if ( d )
- d->iconName = QString::null;
+ d->iconName = TQString::null;
readUDSEntry( _urlIsDirectory );
init( _determineMimeTypeOnDemand );
@@ -957,7 +957,7 @@ void KFileItem::setFileMode( mode_t m )
m_fileMode = m;
}
-void KFileItem::setMimeType( const QString& mimetype )
+void KFileItem::setMimeType( const TQString& mimetype )
{
m_pMimeType = KMimeType::mimeType( mimetype );
}
@@ -972,7 +972,7 @@ void KFileItem::setExtraData( const void *key, void *value )
const void * KFileItem::extraData( const void *key ) const
{
- QMapConstIterator<const void*,void*> it = m_extra.find( key );
+ TQMapConstIterator<const void*,void*> it = m_extra.find( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -980,7 +980,7 @@ const void * KFileItem::extraData( const void *key ) const
void * KFileItem::extraData( const void *key )
{
- QMapIterator<const void*,void*> it = m_extra.find( key );
+ TQMapIterator<const void*,void*> it = m_extra.find( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -991,7 +991,7 @@ void KFileItem::removeExtraData( const void *key )
m_extra.remove( key );
}
-QString KFileItem::permissionsString() const
+TQString KFileItem::permissionsString() const
{
if (m_access.isNull())
m_access = parsePermissions( m_permissions );
@@ -999,7 +999,7 @@ QString KFileItem::permissionsString() const
return m_access;
}
-QString KFileItem::parsePermissions(mode_t perm) const
+TQString KFileItem::parsePermissions(mode_t perm) const
{
char p[] = "---------- ";
@@ -1008,44 +1008,44 @@ QString KFileItem::parsePermissions(mode_t perm) const
else if (isLink())
p[0]='l';
- if (perm & QFileInfo::ReadUser)
+ if (perm & TQFileInfo::ReadUser)
p[1]='r';
- if (perm & QFileInfo::WriteUser)
+ if (perm & TQFileInfo::WriteUser)
p[2]='w';
- if ((perm & QFileInfo::ExeUser) && !(perm & S_ISUID)) p[3]='x';
- else if ((perm & QFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='s';
- else if (!(perm & QFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='S';
+ if ((perm & TQFileInfo::ExeUser) && !(perm & S_ISUID)) p[3]='x';
+ else if ((perm & TQFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='s';
+ else if (!(perm & TQFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='S';
- if (perm & QFileInfo::ReadGroup)
+ if (perm & TQFileInfo::ReadGroup)
p[4]='r';
- if (perm & QFileInfo::WriteGroup)
+ if (perm & TQFileInfo::WriteGroup)
p[5]='w';
- if ((perm & QFileInfo::ExeGroup) && !(perm & S_ISGID)) p[6]='x';
- else if ((perm & QFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='s';
- else if (!(perm & QFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='S';
+ if ((perm & TQFileInfo::ExeGroup) && !(perm & S_ISGID)) p[6]='x';
+ else if ((perm & TQFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='s';
+ else if (!(perm & TQFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='S';
- if (perm & QFileInfo::ReadOther)
+ if (perm & TQFileInfo::ReadOther)
p[7]='r';
- if (perm & QFileInfo::WriteOther)
+ if (perm & TQFileInfo::WriteOther)
p[8]='w';
- if ((perm & QFileInfo::ExeOther) && !(perm & S_ISVTX)) p[9]='x';
- else if ((perm & QFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='t';
- else if (!(perm & QFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='T';
+ if ((perm & TQFileInfo::ExeOther) && !(perm & S_ISVTX)) p[9]='x';
+ else if ((perm & TQFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='t';
+ else if (!(perm & TQFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='T';
if (hasExtendedACL())
p[10]='+';
- return QString::fromLatin1(p);
+ return TQString::fromLatin1(p);
}
// check if we need to cache this
-QString KFileItem::timeString( unsigned int which ) const
+TQString KFileItem::timeString( unsigned int which ) const
{
bool hasTime;
time_t time_ = time(which, hasTime);
- if(!hasTime) return QString::null;
+ if(!hasTime) return TQString::null;
- QDateTime t;
+ TQDateTime t;
t.setTime_t( time_);
return KGlobal::locale()->formatDateTime( t );
}
@@ -1071,7 +1071,7 @@ const KFileMetaInfo & KFileItem::metaInfo(bool autoget, int) const
KURL KFileItem::mostLocalURL(bool &local) const
{
- QString local_path = localPath();
+ TQString local_path = localPath();
if ( !local_path.isEmpty() )
{
@@ -1090,7 +1090,7 @@ KURL KFileItem::mostLocalURL(bool &local) const
void KFileItem::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-QDataStream & operator<< ( QDataStream & s, const KFileItem & a )
+TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a )
{
// We don't need to save/restore anything that refresh() invalidates,
// since that means we can re-determine those by ourselves.
@@ -1100,7 +1100,7 @@ QDataStream & operator<< ( QDataStream & s, const KFileItem & a )
return s;
}
-QDataStream & operator>> ( QDataStream & s, KFileItem & a )
+TQDataStream & operator>> ( TQDataStream & s, KFileItem & a )
{
s >> a.m_url;
s >> a.m_strName;
diff --git a/kio/kio/kfileitem.h b/kio/kio/kfileitem.h
index dcb674e7e..cf6344669 100644
--- a/kio/kio/kfileitem.h
+++ b/kio/kio/kfileitem.h
@@ -20,10 +20,10 @@
#ifndef __kfileitem_h__
#define __kfileitem_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <sys/stat.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kio/global.h>
#include <kurl.h>
#include <kacl.h>
@@ -80,7 +80,7 @@ public:
* @param mimeType the name of the file's mimetype
* @param mode the mode (S_IFDIR...)
*/
- KFileItem( const KURL &url, const QString &mimeType, mode_t mode );
+ KFileItem( const KURL &url, const TQString &mimeType, mode_t mode );
/**
* Copy constructor. Note that extra-data set via setExtraData() is not
@@ -125,7 +125,7 @@ public:
* This method is provided for some special cases like relative paths as names (KFindPart)
* @param name the item's name
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
* Returns the permissions of the file (stat.st_mode containing only permissions).
@@ -137,7 +137,7 @@ public:
* Returns the access permissions for the file as a string.
* @return the access persmission as string
*/
- QString permissionsString() const;
+ TQString permissionsString() const;
/**
* Tells if the file has extended access level information ( Posix ACL )
@@ -170,13 +170,13 @@ public:
* Returns the owner of the file.
* @return the file's owner
*/
- QString user() const;
+ TQString user() const;
/**
* Returns the group of the file.
* @return the file's group
*/
- QString group() const;
+ TQString group() const;
/**
* Returns true if this item represents a link in the UNIX sense of
@@ -222,17 +222,17 @@ public:
/**
* Returns the link destination if isLink() == true.
- * @return the link destination. QString::null if the item is not a link
+ * @return the link destination. TQString::null if the item is not a link
*/
- QString linkDest() const;
+ TQString linkDest() const;
/**
* Returns the local path if isLocalFile() == true or the KIO item has
* a UDS_LOCAL_PATH atom.
- * @return the item local path, or QString::null if not known
+ * @return the item local path, or TQString::null if not known
* @since 3.4
*/
- QString localPath() const;
+ TQString localPath() const;
//FIXME KDE4 deprecate this in favor of size(bool &hasSize)
/**
@@ -270,10 +270,10 @@ public:
* Requests the modification, access or creation time as a string, depending
* on @p which.
* @param which UDS_MODIFICATION_TIME, UDS_ACCESS_TIME or UDS_CREATION_TIME
- * @returns a formatted string of the requested time, QString::null if time is not known
+ * @returns a formatted string of the requested time, TQString::null if time is not known
* @see time
*/
- QString timeString( unsigned int which = KIO::UDS_MODIFICATION_TIME ) const;
+ TQString timeString( unsigned int which = KIO::UDS_MODIFICATION_TIME ) const;
/**
* Returns true if the file is a local file.
@@ -286,7 +286,7 @@ public:
* It's not exactly the filename since some decoding happens ('%2F'->'/').
* @return the text of the file item
*/
- const QString& text() const { return m_strText; }
+ const TQString& text() const { return m_strText; }
/**
* Return the name of the file item (without a path).
@@ -295,7 +295,7 @@ public:
* which is useful to speed up sorting by name, case insensitively.
* @return the file's name
*/
- const QString& name( bool lowerCase = false ) const {
+ const TQString& name( bool lowerCase = false ) const {
if ( !lowerCase )
return m_strName;
else
@@ -310,7 +310,7 @@ public:
* the mimetype first. Equivalent to determineMimeType()->name()
* @return the mime type of the file
*/
- QString mimetype() const;
+ TQString mimetype() const;
/**
* Returns the mimetype of the file item.
@@ -333,14 +333,14 @@ public:
* the mime type itself if none is present.
* @return the mime type description, or the mime type itself
*/
- QString mimeComment();
+ TQString mimeComment();
/**
* Returns the full path name to the icon that represents
* this mime type.
* @return iconName the name of the file's icon
*/
- QString iconName();
+ TQString iconName();
/**
* Returns a pixmap representing the file.
@@ -350,7 +350,7 @@ public:
* KIcon::ActiveState or KIcon::DisabledState.
* @return the pixmap
*/
- QPixmap pixmap( int _size, int _state=0 ) const;
+ TQPixmap pixmap( int _size, int _state=0 ) const;
/**
* Returns the overlays (bitfield of KIcon::*Overlay flags) that are used
@@ -365,7 +365,7 @@ public:
* e.g. when the mouse is over this item
* @return the status bar information
*/
- QString getStatusBarInfo();
+ TQString getStatusBarInfo();
/**
* Returns the string to be displayed in the tool tip when the mouse
@@ -375,7 +375,7 @@ public:
* @param maxcount the maximum number of entries shown
* @return the tool tip string
*/
- QString getToolTipText(int maxcount = 6);
+ TQString getToolTipText(int maxcount = 6);
/**
* Returns true if files can be dropped over this item.
@@ -431,7 +431,7 @@ public:
* separately.
*
* I.e. a KFileIconView that associates a KFileIconViewItem (an item suitable
- * for use with QIconView) does
+ * for use with TQIconView) does
*
* \code
* kfileItem->setExtraData( this, iconViewItem );
@@ -444,7 +444,7 @@ public:
* \endcode
*
* This is usually more efficient then having every view associate data to
- * items by using a separate QDict or QMap.
+ * items by using a separate TQDict or TQMap.
*
* Note: you have to remove and destroy the data you associated yourself
* when you don't need it anymore!
@@ -500,7 +500,7 @@ public:
* @param mimetype the new mimetype
* @since 3.5.0
*/
- void setMimeType( const QString& mimetype );
+ void setMimeType( const TQString& mimetype );
/**
* Returns the metainfo of this item.
@@ -570,7 +570,7 @@ protected:
/**
* Parses the given permission set and provides it for access()
*/
- QString parsePermissions( mode_t perm ) const;
+ TQString parsePermissions( mode_t perm ) const;
private:
/**
@@ -585,23 +585,23 @@ private:
/**
* The text for this item, i.e. the file name without path,
*/
- QString m_strName;
+ TQString m_strName;
/**
* The text for this item, i.e. the file name without path, decoded
* ('%%' becomes '%', '%2F' becomes '/')
*/
- QString m_strText;
+ TQString m_strText;
/**
* the user and group assigned to the file.
*/
- mutable QString m_user, m_group;
+ mutable TQString m_user, m_group;
/**
* The filename in lower case (to speed up sorting)
*/
- mutable QString m_strLowerCaseName;
+ mutable TQString m_strLowerCaseName;
/**
* The mimetype of the file
@@ -636,9 +636,9 @@ private:
enum { Auto, Hidden, Shown } m_hidden:3;
// For special case like link to dirs over FTP
- QString m_guessedMimeType;
- mutable QString m_access;
- QMap<const void*, void*> m_extra;
+ TQString m_guessedMimeType;
+ mutable TQString m_access;
+ TQMap<const void*, void*> m_extra;
mutable KFileMetaInfo m_metaInfo;
enum { Modification = 0, Access = 1, Creation = 2, NumFlags = 3 };
@@ -650,22 +650,22 @@ protected:
private:
class KFileItemPrivate;
KFileItemPrivate * d;
- KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KFileItem & a );
- KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KFileItem & a );
+ KIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a );
+ KIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KFileItem & a );
};
/**
* List of KFileItems
*/
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
/**
* Iterator for KFileItemList
*/
-typedef QPtrListIterator<KFileItem> KFileItemListIterator;
+typedef TQPtrListIterator<KFileItem> KFileItemListIterator;
-KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KFileItem & a );
-KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KFileItem & a );
+KIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a );
+KIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KFileItem & a );
#endif
diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp
index b47b06e99..fcab35f19 100644
--- a/kio/kio/kfilemetainfo.cpp
+++ b/kio/kio/kfilemetainfo.cpp
@@ -22,8 +22,8 @@
#include <assert.h>
-#include <qshared.h>
-#include <qdict.h>
+#include <tqshared.h>
+#include <tqdict.h>
#include <ktrader.h>
#include <kstaticdeleter.h>
@@ -41,8 +41,8 @@
class KFileMetaInfoItem::Data : public QShared
{
public:
- Data( const KFileMimeTypeInfo::ItemInfo* mti, const QString& _key,
- const QVariant& _value )
+ Data( const KFileMimeTypeInfo::ItemInfo* mti, const TQString& _key,
+ const TQVariant& _value )
: QShared(),
mimeTypeInfo( mti ),
key( _key ),
@@ -64,8 +64,8 @@ public:
const KFileMimeTypeInfo::ItemInfo* mimeTypeInfo;
// mimeTypeInfo has the key, too, but only for non-variable ones
- QString key;
- QVariant value;
+ TQString key;
+ TQVariant value;
bool dirty :1;
bool added :1;
bool removed :1;
@@ -87,14 +87,14 @@ KFileMetaInfoItem::Data* KFileMetaInfoItem::Data::makeNull()
// where the d-pointer is compared against null.
KFileMimeTypeInfo::ItemInfo* info = new KFileMimeTypeInfo::ItemInfo();
- null = new Data(info, QString::null, QVariant());
+ null = new Data(info, TQString::null, TQVariant());
sd_KFileMetaInfoItemData.setObject( null );
}
return null;
}
KFileMetaInfoItem::KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
- const QString& key, const QVariant& value )
+ const TQString& key, const TQVariant& value )
: d( new Data( mti, key, value ) )
{
}
@@ -131,7 +131,7 @@ const KFileMetaInfoItem& KFileMetaInfoItem::operator=
return *this;
}
-bool KFileMetaInfoItem::setValue( const QVariant& value )
+bool KFileMetaInfoItem::setValue( const TQVariant& value )
{
// We don't call makeNull here since it isn't necassery, see deref()
if ( d == Data::null ) return false;
@@ -150,8 +150,8 @@ bool KFileMetaInfoItem::setValue( const QVariant& value )
d->dirty = true;
d->value = value;
- // If we don't cast (and test for canCast in the above if), QVariant is
- // very picky about types (e.g. QString vs. QCString or int vs. uint)
+ // If we don't cast (and test for canCast in the above if), TQVariant is
+ // very picky about types (e.g. TQString vs. TQCString or int vs. uint)
d->value.cast(d->mimeTypeInfo->type());
return true;
@@ -162,12 +162,12 @@ bool KFileMetaInfoItem::isRemoved() const
return d->removed;
}
-QString KFileMetaInfoItem::key() const
+TQString KFileMetaInfoItem::key() const
{
return d->key;
}
-QString KFileMetaInfoItem::translatedKey() const
+TQString KFileMetaInfoItem::translatedKey() const
{
// are we a variable key?
if (d->mimeTypeInfo->key().isNull())
@@ -179,17 +179,17 @@ QString KFileMetaInfoItem::translatedKey() const
return d->mimeTypeInfo->translatedKey();
}
-const QVariant& KFileMetaInfoItem::value() const
+const TQVariant& KFileMetaInfoItem::value() const
{
return d->value;
}
-QString KFileMetaInfoItem::string( bool mangle ) const
+TQString KFileMetaInfoItem::string( bool mangle ) const
{
return d->mimeTypeInfo->string(d->value, mangle);
}
-QVariant::Type KFileMetaInfoItem::type() const
+TQVariant::Type KFileMetaInfoItem::type() const
{
return d->mimeTypeInfo->type();
}
@@ -204,12 +204,12 @@ bool KFileMetaInfoItem::isModified() const
return d->dirty;
}
-QString KFileMetaInfoItem::prefix() const
+TQString KFileMetaInfoItem::prefix() const
{
return d->mimeTypeInfo->prefix();
}
-QString KFileMetaInfoItem::suffix() const
+TQString KFileMetaInfoItem::suffix() const
{
return d->mimeTypeInfo->suffix();
}
@@ -285,16 +285,16 @@ public:
KURL url;
uint what;
- QMap<QString, KFileMetaInfoGroup> groups;
+ TQMap<TQString, KFileMetaInfoGroup> groups;
const KFileMimeTypeInfo* mimeTypeInfo;
- QStringList removedGroups;
+ TQStringList removedGroups;
static Data* null;
static Data* makeNull();
};
-KFileMetaInfo::KFileMetaInfo( const QString& path, const QString& mimeType,
+KFileMetaInfo::KFileMetaInfo( const TQString& path, const TQString& mimeType,
uint what )
{
KURL u;
@@ -303,18 +303,18 @@ KFileMetaInfo::KFileMetaInfo( const QString& path, const QString& mimeType,
init(u, mimeType, what);
}
-KFileMetaInfo::KFileMetaInfo( const KURL& url, const QString& mimeType,
+KFileMetaInfo::KFileMetaInfo( const KURL& url, const TQString& mimeType,
uint what )
{
init(url, mimeType, what);
}
-void KFileMetaInfo::init( const KURL& url, const QString& mimeType,
+void KFileMetaInfo::init( const KURL& url, const TQString& mimeType,
uint what )
{
d = new Data( url, what );
- QString mT;
+ TQString mT;
if (mimeType.isEmpty())
mT = KMimeType::findByURL(url)->name();
else
@@ -362,33 +362,33 @@ KFileMetaInfo::~KFileMetaInfo()
deref();
}
-QStringList KFileMetaInfo::supportedGroups() const
+TQStringList KFileMetaInfo::supportedGroups() const
{
assert(isValid());
return d->mimeTypeInfo->supportedGroups();
}
-QStringList KFileMetaInfo::supportedKeys() const
+TQStringList KFileMetaInfo::supportedKeys() const
{
assert(isValid());
return d->mimeTypeInfo->supportedKeys();
}
-QStringList KFileMetaInfo::groups() const
+TQStringList KFileMetaInfo::groups() const
{
- QStringList list;
- QMapConstIterator<QString, KFileMetaInfoGroup> it = d->groups.begin();
+ TQStringList list;
+ TQMapConstIterator<TQString, KFileMetaInfoGroup> it = d->groups.begin();
for ( ; it != d->groups.end(); ++it )
list += (*it).name();
return list;
}
-QStringList KFileMetaInfo::editableGroups() const
+TQStringList KFileMetaInfo::editableGroups() const
{
- QStringList list;
- QStringList supported = supportedGroups();
- QStringList::ConstIterator it = supported.begin();
+ TQStringList list;
+ TQStringList supported = supportedGroups();
+ TQStringList::ConstIterator it = supported.begin();
for ( ; it != supported.end(); ++it ) {
const KFileMimeTypeInfo::GroupInfo * groupInfo = d->mimeTypeInfo->groupInfo( *it );
if ( groupInfo && groupInfo->attributes() &
@@ -399,18 +399,18 @@ QStringList KFileMetaInfo::editableGroups() const
return list;
}
-QStringList KFileMetaInfo::preferredGroups() const
+TQStringList KFileMetaInfo::preferredGroups() const
{
assert(isValid());
- QStringList list = groups();
- QStringList newlist;
- QStringList preferred = d->mimeTypeInfo->preferredGroups();
- QStringList::Iterator pref;
+ TQStringList list = groups();
+ TQStringList newlist;
+ TQStringList preferred = d->mimeTypeInfo->preferredGroups();
+ TQStringList::Iterator pref;
// move all keys from the preferred groups that are in our list to a new list
for ( pref = preferred.begin(); pref != preferred.end(); ++pref )
{
- QStringList::Iterator group = list.find(*pref);
+ TQStringList::Iterator group = list.find(*pref);
if ( group != list.end() )
{
newlist.append( *group );
@@ -425,12 +425,12 @@ QStringList KFileMetaInfo::preferredGroups() const
return newlist;
}
-QStringList KFileMetaInfo::preferredKeys() const
+TQStringList KFileMetaInfo::preferredKeys() const
{
- QStringList newlist;
+ TQStringList newlist;
- QStringList list = preferredGroups();
- for (QStringList::Iterator git = list.begin(); git != list.end(); ++git)
+ TQStringList list = preferredGroups();
+ for (TQStringList::Iterator git = list.begin(); git != list.end(); ++git)
{
newlist += d->groups[*git].preferredKeys();
}
@@ -438,16 +438,16 @@ QStringList KFileMetaInfo::preferredKeys() const
return newlist;
}
-KFileMetaInfoGroup KFileMetaInfo::group(const QString& key) const
+KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const
{
- QMapIterator<QString,KFileMetaInfoGroup> it = d->groups.find( key );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( key );
if ( it != d->groups.end() )
return it.data();
else
return KFileMetaInfoGroup();
}
-bool KFileMetaInfo::addGroup( const QString& name )
+bool KFileMetaInfo::addGroup( const TQString& name )
{
assert(isValid());
if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
@@ -460,8 +460,8 @@ bool KFileMetaInfo::addGroup( const QString& name )
Q_ASSERT(ginfo);
if (!ginfo) return false;
- QStringList keys = ginfo->supportedKeys();
- for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it)
+ TQStringList keys = ginfo->supportedKeys();
+ for (TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it)
{
const KFileMimeTypeInfo::ItemInfo* iteminfo = ginfo->itemInfo(*it);
Q_ASSERT(ginfo);
@@ -471,7 +471,7 @@ bool KFileMetaInfo::addGroup( const QString& name )
(iteminfo->attributes() & KFileMimeTypeInfo::Modifiable))
{
// append it now or never
- group.appendItem(iteminfo->key(), QVariant());
+ group.appendItem(iteminfo->key(), TQVariant());
}
}
@@ -484,9 +484,9 @@ bool KFileMetaInfo::addGroup( const QString& name )
return false;
}
-bool KFileMetaInfo::removeGroup( const QString& name )
+bool KFileMetaInfo::removeGroup( const TQString& name )
{
- QMapIterator<QString, KFileMetaInfoGroup> it = d->groups.find(name);
+ TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.find(name);
if ( (it==d->groups.end()) ||
!((*it).attributes() & KFileMimeTypeInfo::Removable))
return false;
@@ -496,7 +496,7 @@ bool KFileMetaInfo::removeGroup( const QString& name )
return true;
}
-QStringList KFileMetaInfo::removedGroups()
+TQStringList KFileMetaInfo::removedGroups()
{
return d->removedGroups;
}
@@ -522,7 +522,7 @@ bool KFileMetaInfo::isValid() const
bool KFileMetaInfo::isEmpty() const
{
- for (QMapIterator<QString, KFileMetaInfoGroup> it = d->groups.begin();
+ for (TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.begin();
it!=d->groups.end(); ++it)
if (!(*it).isEmpty())
return false;
@@ -534,14 +534,14 @@ bool KFileMetaInfo::applyChanges()
return applyChanges( path() );
}
-bool KFileMetaInfo::applyChanges( const QString& path )
+bool KFileMetaInfo::applyChanges( const TQString& path )
{
bool doit = false;
// kdDebug(7033) << "KFileMetaInfo::applyChanges()\n";
// look up if we need to write to the file
- QMapConstIterator<QString, KFileMetaInfoGroup> it;
+ TQMapConstIterator<TQString, KFileMetaInfoGroup> it;
for (it = d->groups.begin(); it!=d->groups.end() && !doit; ++it)
{
if ( (*it).isModified() )
@@ -549,8 +549,8 @@ bool KFileMetaInfo::applyChanges( const QString& path )
else
{
- QStringList keys = it.data().keys();
- for (QStringList::Iterator it2 = keys.begin(); it2!=keys.end(); ++it2)
+ TQStringList keys = it.data().keys();
+ for (TQStringList::Iterator it2 = keys.begin(); it2!=keys.end(); ++it2)
{
if ( (*it)[*it2].isModified() )
{
@@ -589,16 +589,16 @@ KFilePlugin * const KFileMetaInfo::plugin() const
return prov->plugin( d->mimeTypeInfo->mimeType(), d->url.protocol() );
}
-QString KFileMetaInfo::mimeType() const
+TQString KFileMetaInfo::mimeType() const
{
assert(isValid());
return d->mimeTypeInfo->mimeType();
}
-bool KFileMetaInfo::contains(const QString& key) const
+bool KFileMetaInfo::contains(const TQString& key) const
{
- QStringList glist = groups();
- for (QStringList::Iterator it = glist.begin(); it != glist.end(); ++it)
+ TQStringList glist = groups();
+ for (TQStringList::Iterator it = glist.begin(); it != glist.end(); ++it)
{
KFileMetaInfoGroup g = d->groups[*it];
if (g.contains(key)) return true;
@@ -606,15 +606,15 @@ bool KFileMetaInfo::contains(const QString& key) const
return false;
}
-bool KFileMetaInfo::containsGroup(const QString& key) const
+bool KFileMetaInfo::containsGroup(const TQString& key) const
{
return groups().contains(key);
}
-KFileMetaInfoItem KFileMetaInfo::item( const QString& key) const
+KFileMetaInfoItem KFileMetaInfo::item( const TQString& key) const
{
- QStringList groups = preferredGroups();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
+ TQStringList groups = preferredGroups();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
{
KFileMetaInfoItem i = d->groups[*it][key];
if (i.isValid()) return i;
@@ -624,8 +624,8 @@ KFileMetaInfoItem KFileMetaInfo::item( const QString& key) const
KFileMetaInfoItem KFileMetaInfo::item(const KFileMetaInfoItem::Hint hint) const
{
- QStringList groups = preferredGroups();
- QStringList::ConstIterator it;
+ TQStringList groups = preferredGroups();
+ TQStringList::ConstIterator it;
for (it = groups.begin(); it != groups.end(); ++it)
{
KFileMetaInfoItem i = d->groups[*it].item(hint);
@@ -634,14 +634,14 @@ KFileMetaInfoItem KFileMetaInfo::item(const KFileMetaInfoItem::Hint hint) const
return KFileMetaInfoItem();
}
-KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
- const QString& preferredGroup,
+KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key,
+ const TQString& preferredGroup,
bool createGroup )
{
assert(isValid());
// try the preferred groups first
if ( !preferredGroup.isEmpty() ) {
- QMapIterator<QString,KFileMetaInfoGroup> it =
+ TQMapIterator<TQString,KFileMetaInfoGroup> it =
d->groups.find( preferredGroup );
// try to create the preferred group, if necessary
@@ -661,14 +661,14 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
}
}
- QStringList groups = preferredGroups();
+ TQStringList groups = preferredGroups();
KFileMetaInfoItem item;
- QStringList::ConstIterator groupIt = groups.begin();
+ TQStringList::ConstIterator groupIt = groups.begin();
for ( ; groupIt != groups.end(); ++groupIt )
{
- QMapIterator<QString,KFileMetaInfoGroup> it = d->groups.find( *groupIt );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( *groupIt );
if ( it != d->groups.end() )
{
KFileMetaInfoGroup group = it.data();
@@ -701,7 +701,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
}
KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group,
- const QString& key )
+ const TQString& key )
{
assert(isValid());
KFileMetaInfoItem item = group.addItem( key );
@@ -714,7 +714,7 @@ KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group,
return KFileMetaInfoItem();
}
-KFileMetaInfoGroup KFileMetaInfo::appendGroup(const QString& name)
+KFileMetaInfoGroup KFileMetaInfo::appendGroup(const TQString& name)
{
assert(isValid());
if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
@@ -731,9 +731,9 @@ KFileMetaInfoGroup KFileMetaInfo::appendGroup(const QString& name)
}
}
-QString KFileMetaInfo::path() const
+TQString KFileMetaInfo::path() const
{
- return d->url.isLocalFile() ? d->url.path() : QString::null;
+ return d->url.isLocalFile() ? d->url.path() : TQString::null;
}
KURL KFileMetaInfo::url() const
@@ -778,9 +778,9 @@ KFileMetaInfo::Data* KFileMetaInfo::Data::makeNull()
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFilePlugin::KFilePlugin( QObject *parent, const char *name,
- const QStringList& /*args*/)
- : QObject( parent, name )
+KFilePlugin::KFilePlugin( TQObject *parent, const char *name,
+ const TQStringList& /*args*/)
+ : TQObject( parent, name )
{
// kdDebug(7033) << "loaded a plugin for " << name << endl;
}
@@ -790,7 +790,7 @@ KFilePlugin::~KFilePlugin()
// kdDebug(7033) << "unloaded a plugin for " << name() << endl;
}
-KFileMimeTypeInfo * KFilePlugin::addMimeTypeInfo( const QString& mimeType )
+KFileMimeTypeInfo * KFilePlugin::addMimeTypeInfo( const TQString& mimeType )
{
return KFileMetaInfoProvider::self()->addMimeTypeInfo( mimeType );
}
@@ -800,7 +800,7 @@ void KFilePlugin::virtual_hook( int, void* )
KFileMimeTypeInfo::GroupInfo* KFilePlugin::addGroupInfo(KFileMimeTypeInfo* info,
- const QString& key, const QString& translatedKey) const
+ const TQString& key, const TQString& translatedKey) const
{
return info->addGroupInfo(key, translatedKey);
}
@@ -811,15 +811,15 @@ void KFilePlugin::setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) con
}
void KFilePlugin::addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi,
- QVariant::Type type, uint attr) const
+ TQVariant::Type type, uint attr) const
{
gi->addVariableInfo(type, attr);
}
KFileMimeTypeInfo::ItemInfo* KFilePlugin::addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
- const QString& key,
- const QString& translatedKey,
- QVariant::Type type)
+ const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type)
{
return gi->addItemInfo(key, translatedKey, type);
}
@@ -881,22 +881,22 @@ void KFilePlugin::setUnit(KFileMimeTypeInfo::ItemInfo* item, uint unit)
}
}
-void KFilePlugin::setPrefix(KFileMimeTypeInfo::ItemInfo* item, const QString& prefix)
+void KFilePlugin::setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix)
{
item->m_prefix = prefix;
}
-void KFilePlugin::setSuffix(KFileMimeTypeInfo::ItemInfo* item, const QString& suffix)
+void KFilePlugin::setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix)
{
item->m_suffix = suffix;
}
-KFileMetaInfoGroup KFilePlugin::appendGroup(KFileMetaInfo& info, const QString& key)
+KFileMetaInfoGroup KFilePlugin::appendGroup(KFileMetaInfo& info, const TQString& key)
{
return info.appendGroup(key);
}
-void KFilePlugin::appendItem(KFileMetaInfoGroup& group, const QString& key, QVariant value)
+void KFilePlugin::appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value)
{
group.appendItem(key, value);
}
@@ -927,22 +927,22 @@ KFileMetaInfoProvider::~KFileMetaInfoProvider()
sd.setObject( 0 );
}
-KFilePlugin* KFileMetaInfoProvider::loadPlugin( const QString& mimeType, const QString& protocol )
+KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const TQString& protocol )
{
//kdDebug() << "loadPlugin: mimeType=" << mimeType << " protocol=" << protocol << endl;
// Currently the idea is: either the mimetype is set or the protocol, but not both.
// We need PNG fileinfo, and trash: fileinfo, but not "PNG in the trash".
- QString queryMimeType, query;
+ TQString queryMimeType, query;
if ( !mimeType.isEmpty() ) {
query = "(not exist [X-KDE-Protocol])";
queryMimeType = mimeType;
} else {
- query = QString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
+ query = TQString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
// querying for a protocol: we have no mimetype, so we need to use KFilePlugin as one
queryMimeType = "KFilePlugin";
// hopefully using KFilePlugin as genericMimeType too isn't a problem
}
- const KTrader::OfferList offers = KTrader::self()->query( queryMimeType, "KFilePlugin", query, QString::null );
+ const KTrader::OfferList offers = KTrader::self()->query( queryMimeType, "KFilePlugin", query, TQString::null );
if ( offers.isEmpty() )
return 0;
KService::Ptr service = *(offers.begin());
@@ -958,7 +958,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const QString& mimeType, const Q
return plugin;
}
-KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeType, const QString& protocol )
+KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol )
{
Q_ASSERT( m_pendingMimetypeInfos.isEmpty() );
m_pendingMimetypeInfos.clear();
@@ -979,7 +979,7 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeTy
} else {
// Mimetype-metainfo: the plugin can register itself for multiple mimetypes, remember them all
bool first = true;
- QDictIterator<KFileMimeTypeInfo> it( m_pendingMimetypeInfos );
+ TQDictIterator<KFileMimeTypeInfo> it( m_pendingMimetypeInfos );
for( ; it.current(); ++it ) {
KFileMimeTypeInfo* info = it.current();
m_plugins.insert( it.currentKey(), new CachedPluginInfo( plugin, info, first ) );
@@ -993,12 +993,12 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeTy
return plugin;
}
-KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType)
+KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType)
{
- return plugin( mimeType, QString::null );
+ return plugin( mimeType, TQString::null );
}
-KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QString& protocol)
+KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQString& protocol)
{
//kdDebug(7033) << "plugin() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
@@ -1008,7 +1008,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return cache->plugin;
}
if ( !cache ) {
- KFilePlugin* plugin = loadAndRegisterPlugin( QString::null, protocol );
+ KFilePlugin* plugin = loadAndRegisterPlugin( TQString::null, protocol );
if ( plugin )
return plugin;
}
@@ -1019,12 +1019,12 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return cache->plugin;
}
- KFilePlugin* plugin = loadAndRegisterPlugin( mimeType, QString::null );
+ KFilePlugin* plugin = loadAndRegisterPlugin( mimeType, TQString::null );
#if 0
kdDebug(7033) << "currently loaded plugins:\n";
- QDictIterator<CachedPluginInfo> it( m_plugins );
+ TQDictIterator<CachedPluginInfo> it( m_plugins );
for( ; it.current(); ++it ) {
CachedPluginInfo* cache = it.current();
kdDebug(7033)
@@ -1037,7 +1037,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return plugin;
}
-QStringList KFileMetaInfoProvider::preferredKeys( const QString& mimeType ) const
+TQStringList KFileMetaInfoProvider::preferredKeys( const TQString& mimeType ) const
{
KService::Ptr service =
KServiceTypeProfile::preferredService( mimeType, "KFilePlugin");
@@ -1045,12 +1045,12 @@ QStringList KFileMetaInfoProvider::preferredKeys( const QString& mimeType ) cons
if ( !service || !service->isValid() )
{
// kdDebug(7033) << "no valid service found\n";
- return QStringList();
+ return TQStringList();
}
return service->property("PreferredItems").toStringList();
}
-QStringList KFileMetaInfoProvider::preferredGroups( const QString& mimeType ) const
+TQStringList KFileMetaInfoProvider::preferredGroups( const TQString& mimeType ) const
{
KService::Ptr service =
KServiceTypeProfile::preferredService( mimeType, "KFilePlugin");
@@ -1058,17 +1058,17 @@ QStringList KFileMetaInfoProvider::preferredGroups( const QString& mimeType ) co
if ( !service || !service->isValid() )
{
// kdDebug(7033) << "no valid service found\n";
- return QStringList();
+ return TQStringList();
}
return service->property("PreferredGroups").toStringList();
}
-const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mimeType )
+const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& mimeType )
{
- return mimeTypeInfo( mimeType, QString::null );
+ return mimeTypeInfo( mimeType, TQString::null );
}
-const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mimeType, const QString& protocol )
+const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& mimeType, const TQString& protocol )
{
//kdDebug(7033) << "mimeTypeInfo() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
if ( !protocol.isEmpty() ) {
@@ -1078,7 +1078,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
}
if ( !cache ) {
- loadAndRegisterPlugin( QString::null, protocol );
+ loadAndRegisterPlugin( TQString::null, protocol );
cache = m_plugins.find( protocol );
if ( cache && cache->mimeTypeInfo ) {
return cache->mimeTypeInfo;
@@ -1091,7 +1091,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
return cache->mimeTypeInfo;
}
- loadAndRegisterPlugin( mimeType, QString::null );
+ loadAndRegisterPlugin( mimeType, TQString::null );
cache = m_plugins.find( mimeType );
if ( cache ) {
return cache->mimeTypeInfo;
@@ -1100,7 +1100,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
}
KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo(
- const QString& mimeType )
+ const TQString& mimeType )
{
KFileMimeTypeInfo *info = m_pendingMimetypeInfos.find( mimeType );
@@ -1117,17 +1117,17 @@ KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo(
return info;
}
-QStringList KFileMetaInfoProvider::supportedMimeTypes() const
+TQStringList KFileMetaInfoProvider::supportedMimeTypes() const
{
- QStringList allMimeTypes;
- QString kfilePlugin = "KFilePlugin";
+ TQStringList allMimeTypes;
+ TQString kfilePlugin = "KFilePlugin";
KTrader::OfferList offers = KTrader::self()->query( "KFilePlugin" );
KTrader::OfferListIterator it = offers.begin();
for ( ; it != offers.end(); ++it )
{
- const QStringList mimeTypes = (*it)->serviceTypes();
- QStringList::ConstIterator it2 = mimeTypes.begin();
+ const TQStringList mimeTypes = (*it)->serviceTypes();
+ TQStringList::ConstIterator it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
if ( allMimeTypes.find( *it2 ) == allMimeTypes.end() &&
*it2 != kfilePlugin ) // also in serviceTypes()
@@ -1147,7 +1147,7 @@ QStringList KFileMetaInfoProvider::supportedMimeTypes() const
class KFileMetaInfoGroup::Data : public QShared
{
public:
- Data(const QString& _name)
+ Data(const TQString& _name)
: QShared(),
name(_name),
mimeTypeInfo(0L),
@@ -1162,10 +1162,10 @@ public:
delete mimeTypeInfo;
};
- QString name;
- QMap<QString, KFileMetaInfoItem> items;
+ TQString name;
+ TQMap<TQString, KFileMetaInfoItem> items;
const KFileMimeTypeInfo* mimeTypeInfo;
- QStringList removedItems;
+ TQStringList removedItems;
bool dirty :1;
bool added :1;
@@ -1174,7 +1174,7 @@ public:
};
-KFileMetaInfoGroup::KFileMetaInfoGroup( const QString& name,
+KFileMetaInfoGroup::KFileMetaInfoGroup( const TQString& name,
const KFileMimeTypeInfo* info )
: d(new Data( name ) )
{
@@ -1222,20 +1222,20 @@ bool KFileMetaInfoGroup::isEmpty() const
return d->items.isEmpty();
}
-QStringList KFileMetaInfoGroup::preferredKeys() const
+TQStringList KFileMetaInfoGroup::preferredKeys() const
{
assert(isValid());
- QStringList list = keys();
- QStringList newlist;
- QStringList preferredKeys = d->mimeTypeInfo->preferredKeys();
- QStringList::Iterator pref;
- QStringList::Iterator begin = preferredKeys.begin();
- QStringList::Iterator end = preferredKeys.end();
+ TQStringList list = keys();
+ TQStringList newlist;
+ TQStringList preferredKeys = d->mimeTypeInfo->preferredKeys();
+ TQStringList::Iterator pref;
+ TQStringList::Iterator begin = preferredKeys.begin();
+ TQStringList::Iterator end = preferredKeys.end();
// move all keys from the preferred keys that are in our list to a new list
for ( pref = begin; pref!=end; ++pref )
{
- QStringList::Iterator item = list.find(*pref);
+ TQStringList::Iterator item = list.find(*pref);
if ( item != list.end() )
{
newlist.append( *item );
@@ -1250,16 +1250,16 @@ QStringList KFileMetaInfoGroup::preferredKeys() const
return newlist;
}
-QStringList KFileMetaInfoGroup::keys() const
+TQStringList KFileMetaInfoGroup::keys() const
{
if (d == Data::makeNull())
kdWarning(7033) << "attempt to get the keys of "
"an invalid metainfo group";
- QStringList list;
+ TQStringList list;
- // make a QStringList with all available keys
- QMapConstIterator<QString, KFileMetaInfoItem> it;
+ // make a TQStringList with all available keys
+ TQMapConstIterator<TQString, KFileMetaInfoItem> it;
for (it = d->items.begin(); it!=d->items.end(); ++it)
{
list.append(it.data().key());
@@ -1268,13 +1268,13 @@ QStringList KFileMetaInfoGroup::keys() const
return list;
}
-QString KFileMetaInfoGroup::translatedName() const
+TQString KFileMetaInfoGroup::translatedName() const
{
assert(isValid());
return d->mimeTypeInfo->groupInfo(d->name)->translatedName();
}
-QStringList KFileMetaInfoGroup::supportedKeys() const
+TQStringList KFileMetaInfoGroup::supportedKeys() const
{
assert(isValid());
return d->mimeTypeInfo->groupInfo(d->name)->supportedKeys();
@@ -1286,14 +1286,14 @@ bool KFileMetaInfoGroup::supportsVariableKeys() const
return d->mimeTypeInfo->groupInfo(d->name)->supportsVariableKeys();
}
-bool KFileMetaInfoGroup::contains( const QString& key ) const
+bool KFileMetaInfoGroup::contains( const TQString& key ) const
{
return d->items.contains(key);
}
-KFileMetaInfoItem KFileMetaInfoGroup::item( const QString& key) const
+KFileMetaInfoItem KFileMetaInfoGroup::item( const TQString& key) const
{
- QMapIterator<QString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
if ( it != d->items.end() )
return it.data();
@@ -1302,7 +1302,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::item( const QString& key) const
KFileMetaInfoItem KFileMetaInfoGroup::item(uint hint) const
{
- QMapIterator<QString, KFileMetaInfoItem> it;
+ TQMapIterator<TQString, KFileMetaInfoItem> it;
for (it = d->items.begin(); it!=d->items.end(); ++it)
if (it.data().hint() == hint)
@@ -1311,7 +1311,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::item(uint hint) const
return KFileMetaInfoItem();
}
-QString KFileMetaInfoGroup::name() const
+TQString KFileMetaInfoGroup::name() const
{
return d->name;
}
@@ -1353,10 +1353,10 @@ void KFileMetaInfoGroup::deref()
}
-KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
+KFileMetaInfoItem KFileMetaInfoGroup::addItem( const TQString& key )
{
assert(isValid());
- QMapIterator<QString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
if ( it != d->items.end() )
return it.data();
@@ -1377,9 +1377,9 @@ KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
KFileMetaInfoItem item;
if (info->isVariableItem())
- item = KFileMetaInfoItem(ginfo->variableItemInfo(), key, QVariant());
+ item = KFileMetaInfoItem(ginfo->variableItemInfo(), key, TQVariant());
else
- item = KFileMetaInfoItem(info, key, QVariant());
+ item = KFileMetaInfoItem(info, key, TQVariant());
d->items.insert(key, item);
item.setAdded(); // mark as added
@@ -1387,7 +1387,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
return item;
}
-bool KFileMetaInfoGroup::removeItem( const QString& key )
+bool KFileMetaInfoGroup::removeItem( const TQString& key )
{
if (!isValid())
{
@@ -1395,7 +1395,7 @@ bool KFileMetaInfoGroup::removeItem( const QString& key )
return false;
}
- QMapIterator<QString, KFileMetaInfoItem> it = d->items.find(key);
+ TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.find(key);
if ( it==d->items.end() )
{
kdDebug(7033) << "trying to remove the non existant item " << key << "\n";
@@ -1415,13 +1415,13 @@ bool KFileMetaInfoGroup::removeItem( const QString& key )
return true;
}
-QStringList KFileMetaInfoGroup::removedItems()
+TQStringList KFileMetaInfoGroup::removedItems()
{
return d->removedItems;
}
-KFileMetaInfoItem KFileMetaInfoGroup::appendItem(const QString& key,
- const QVariant& value)
+KFileMetaInfoItem KFileMetaInfoGroup::appendItem(const TQString& key,
+ const TQVariant& value)
{
//KDE4 enforce (value.type() == d->mimeTypeInfo->type())
assert(isValid());
@@ -1459,7 +1459,7 @@ KFileMetaInfoGroup::Data* KFileMetaInfoGroup::Data::makeNull()
// We deliberately do not reset "null" after it has been destroyed!
// Otherwise we will run into problems later in ~KFileMetaInfoItem
// where the d-pointer is compared against null.
- null = new Data(QString::null);
+ null = new Data(TQString::null);
null->mimeTypeInfo = new KFileMimeTypeInfo();
sd_KFileMetaInfoGroupData.setObject( null );
}
@@ -1470,7 +1470,7 @@ KFileMetaInfoGroup::Data* KFileMetaInfoGroup::Data::makeNull()
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFileMimeTypeInfo::KFileMimeTypeInfo( const QString& mimeType )
+KFileMimeTypeInfo::KFileMimeTypeInfo( const TQString& mimeType )
: m_mimeType( mimeType )
{
m_groups.setAutoDelete( true );
@@ -1480,48 +1480,48 @@ KFileMimeTypeInfo::~KFileMimeTypeInfo()
{
}
-const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const QString& group ) const
+const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const TQString& group ) const
{
return m_groups.find( group );
}
KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo(
- const QString& name, const QString& translatedName )
+ const TQString& name, const TQString& translatedName )
{
GroupInfo* group = new GroupInfo( name, translatedName );
m_groups.insert(name, group);
return group;
}
-QStringList KFileMimeTypeInfo::supportedGroups() const
+TQStringList KFileMimeTypeInfo::supportedGroups() const
{
- QStringList list;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList list;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it )
list.append( it.current()->name() );
return list;
}
-QStringList KFileMimeTypeInfo::translatedGroups() const
+TQStringList KFileMimeTypeInfo::translatedGroups() const
{
- QStringList list;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList list;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it )
list.append( it.current()->translatedName() );
return list;
}
-QStringList KFileMimeTypeInfo::supportedKeys() const
+TQStringList KFileMimeTypeInfo::supportedKeys() const
{
// not really efficient, but not those are not large lists, probably.
// maybe cache the result?
- QStringList keys;
- QStringList::ConstIterator lit;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList keys;
+ TQStringList::ConstIterator lit;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it ) { // need to nuke dupes
- QStringList list = it.current()->supportedKeys();
+ TQStringList list = it.current()->supportedKeys();
for ( lit = list.begin(); lit != list.end(); ++lit ) {
if ( keys.find( *lit ) == keys.end() )
keys.append( *lit );
@@ -1531,9 +1531,9 @@ QStringList KFileMimeTypeInfo::supportedKeys() const
return keys;
}
-QValidator * KFileMimeTypeInfo::createValidator(const QString& group,
- const QString& key,
- QObject *parent,
+TQValidator * KFileMimeTypeInfo::createValidator(const TQString& group,
+ const TQString& key,
+ TQObject *parent,
const char *name) const
{
KFilePlugin* plugin = KFileMetaInfoProvider::self()->plugin(m_mimeType);
@@ -1546,8 +1546,8 @@ QValidator * KFileMimeTypeInfo::createValidator(const QString& group,
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFileMimeTypeInfo::GroupInfo::GroupInfo( const QString& name,
- const QString& translatedName )
+KFileMimeTypeInfo::GroupInfo::GroupInfo( const TQString& name,
+ const TQString& translatedName )
: m_name( name ),
m_translatedName( translatedName ),
m_attr( 0 ),
@@ -1562,7 +1562,7 @@ KFileMimeTypeInfo::GroupInfo::~GroupInfo()
delete m_variableItemInfo;
}
-const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const QString& key ) const
+const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const TQString& key ) const
{
ItemInfo* item = m_itemDict.find( key );
@@ -1576,10 +1576,10 @@ const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( cons
}
KFileMimeTypeInfo::ItemInfo* KFileMimeTypeInfo::GroupInfo::addItemInfo(
- const QString& key, const QString& translatedKey,
- QVariant::Type type)
+ const TQString& key, const TQString& translatedKey,
+ TQVariant::Type type)
{
-// kdDebug(7034) << key << "(" << translatedKey << ") -> " << QVariant::typeToName(type) << endl;
+// kdDebug(7034) << key << "(" << translatedKey << ") -> " << TQVariant::typeToName(type) << endl;
ItemInfo* item = new ItemInfo(key, translatedKey, type);
m_supportedKeys.append(key);
@@ -1588,39 +1588,39 @@ KFileMimeTypeInfo::ItemInfo* KFileMimeTypeInfo::GroupInfo::addItemInfo(
}
-void KFileMimeTypeInfo::GroupInfo::addVariableInfo( QVariant::Type type,
+void KFileMimeTypeInfo::GroupInfo::addVariableInfo( TQVariant::Type type,
uint attr )
{
// just make sure that it's not already there
delete m_variableItemInfo;
- m_variableItemInfo = new ItemInfo(QString::null, QString::null, type);
+ m_variableItemInfo = new ItemInfo(TQString::null, TQString::null, type);
m_variableItemInfo->m_attr = attr;
}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle) const
+TQString KFileMimeTypeInfo::ItemInfo::string(const TQVariant& value, bool mangle) const
{
- QString s;
+ TQString s;
switch (value.type())
{
- case QVariant::Invalid :
+ case TQVariant::Invalid :
return "---";
- case QVariant::Bool :
+ case TQVariant::Bool :
s = value.toBool() ? i18n("Yes") : i18n("No");
break;
- case QVariant::Int :
+ case TQVariant::Int :
if (unit() == KFileMimeTypeInfo::Seconds)
{
int seconds = value.toInt() % 60;
int minutes = value.toInt() / 60 % 60;
int hours = value.toInt() / 3600;
- s = hours ? QString().sprintf("%d:%02d:%02d",hours, minutes, seconds)
- : QString().sprintf("%02d:%02d", minutes, seconds);
+ s = hours ? TQString().sprintf("%d:%02d:%02d",hours, minutes, seconds)
+ : TQString().sprintf("%02d:%02d", minutes, seconds);
return s; // no suffix wanted
}
else if (unit() == KFileMimeTypeInfo::Bytes)
@@ -1637,11 +1637,11 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
s = KGlobal::locale()->formatNumber( value.toInt() , 0);
break;
- case QVariant::LongLong :
+ case TQVariant::LongLong :
s = KGlobal::locale()->formatNumber( value.toLongLong(), 0 );
break;
- case QVariant::ULongLong :
+ case TQVariant::ULongLong :
if ( unit() == KFileMimeTypeInfo::Bytes )
return KIO::convertSize( value.toULongLong() );
else if ( unit() == KFileMimeTypeInfo::KiloBytes )
@@ -1650,34 +1650,34 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
s = KGlobal::locale()->formatNumber( value.toULongLong(), 0 );
break;
- case QVariant::UInt :
+ case TQVariant::UInt :
s = KGlobal::locale()->formatNumber( value.toUInt() , 0);
break;
- case QVariant::Double :
+ case TQVariant::Double :
s = KGlobal::locale()->formatNumber( value.toDouble(), 3);
break;
- case QVariant::Date :
+ case TQVariant::Date :
s = KGlobal::locale()->formatDate( value.toDate(), true );
break;
- case QVariant::Time :
+ case TQVariant::Time :
s = KGlobal::locale()->formatTime( value.toTime(), true );
break;
- case QVariant::DateTime :
+ case TQVariant::DateTime :
s = KGlobal::locale()->formatDateTime( value.toDateTime(),
true, true );
break;
- case QVariant::Size :
- s = QString("%1 x %2").arg(value.toSize().width())
+ case TQVariant::Size :
+ s = TQString("%1 x %2").arg(value.toSize().width())
.arg(value.toSize().height());
break;
- case QVariant::Point :
- s = QString("%1/%2").arg(value.toSize().width())
+ case TQVariant::Point :
+ s = TQString("%1/%2").arg(value.toSize().width())
.arg(value.toSize().height());
break;
@@ -1705,7 +1705,7 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
first a bool that says if the items is valid, and if yes,
all the elements of the Data
*/
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& item )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& item )
{
KFileMetaInfoItem::Data* d = item.d;
@@ -1725,7 +1725,7 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& ite
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& item )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& item )
{
bool isValid;
s >> isValid;
@@ -1758,7 +1758,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& item )
// serialization of a KFileMetaInfoGroup
// we serialize the name of the mimetype here instead of the mimetype info
// on the other side, we can simply use this to ask the provider for the info
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& group )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& group )
{
KFileMetaInfoGroup::Data* d = group.d;
@@ -1775,9 +1775,9 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& gr
return s;
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& group )
{
- QString mimeType;
+ TQString mimeType;
bool isValid;
s >> isValid;
@@ -1799,7 +1799,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
group.d->mimeTypeInfo = KFileMetaInfoProvider::self()->mimeTypeInfo(mimeType);
// we need to set the item info for the items here
- QMapIterator<QString, KFileMetaInfoItem> it = group.d->items.begin();
+ TQMapIterator<TQString, KFileMetaInfoItem> it = group.d->items.begin();
for ( ; it != group.d->items.end(); ++it)
{
(*it).d->mimeTypeInfo = group.d->mimeTypeInfo->groupInfo(group.d->name)
@@ -1812,7 +1812,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
// serialization of a KFileMetaInfo object
// we serialize the name of the mimetype here instead of the mimetype info
// on the other side, we can simply use this to ask the provider for the info
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& info )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& info )
{
KFileMetaInfo::Data* d = info.d;
@@ -1830,9 +1830,9 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& info )
return s;
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfo& info )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& info )
{
- QString mimeType;
+ TQString mimeType;
bool isValid;
s >> isValid;
diff --git a/kio/kio/kfilemetainfo.h b/kio/kio/kfilemetainfo.h
index 911ada26f..0bc97df70 100644
--- a/kio/kio/kfilemetainfo.h
+++ b/kio/kio/kfilemetainfo.h
@@ -24,10 +24,10 @@
m_unit is a define in <sys/sysmacros.h> */
#define m_unit outouftheway_m_unit
-#include <qdict.h>
-#include <qvariant.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#undef m_unit
@@ -151,7 +151,7 @@ public:
*
* @return the list of keys supported for this mimetype
**/
- QStringList supportedKeys() const
+ TQStringList supportedKeys() const
{
return m_supportedKeys;
}
@@ -162,7 +162,7 @@ public:
*
* @return the group name
*/
- const QString& name() const
+ const TQString& name() const
{
return m_name;
}
@@ -174,7 +174,7 @@ public:
*
* @return the translated group name
*/
- const QString& translatedName() const
+ const TQString& translatedName() const
{
return m_translatedName;
}
@@ -186,7 +186,7 @@ public:
*
* @return a pointer to the item info. Don't delete this object!
*/
- const ItemInfo * itemInfo( const QString& key ) const;
+ const ItemInfo * itemInfo( const TQString& key ) const;
/**
* Get the attributes of this group (see Attributes)
@@ -223,22 +223,22 @@ public:
~GroupInfo();
private:
/** @internal */
- GroupInfo( const QString& name, const QString& translatedName);
+ GroupInfo( const TQString& name, const TQString& translatedName);
/** @internal */
- KFileMimeTypeInfo::ItemInfo* addItemInfo( const QString& key,
- const QString& translatedKey,
- QVariant::Type type);
+ KFileMimeTypeInfo::ItemInfo* addItemInfo( const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type);
/** @internal */
- void addVariableInfo( QVariant::Type type, uint attr );
+ void addVariableInfo( TQVariant::Type type, uint attr );
- QString m_name;
- QString m_translatedName;
- QStringList m_supportedKeys;
+ TQString m_name;
+ TQString m_translatedName;
+ TQStringList m_supportedKeys;
uint m_attr;
ItemInfo* m_variableItemInfo;
- QDict<ItemInfo> m_itemDict;
+ TQDict<ItemInfo> m_itemDict;
};
@@ -262,7 +262,7 @@ public:
*
* @return the prefix
*/
- const QString& prefix() const
+ const TQString& prefix() const
{
return m_prefix;
}
@@ -273,18 +273,18 @@ public:
*
* @return the prefix
*/
- const QString& suffix() const
+ const TQString& suffix() const
{
return m_suffix;
}
/**
- * The items for a file are stored as a QVariant and this method
+ * The items for a file are stored as a TQVariant and this method
* can be used to get the data type of this item.
*
- * @return the QVariant type
+ * @return the TQVariant type
*/
- QVariant::Type type() const
+ TQVariant::Type type() const
{
return m_type;
}
@@ -293,23 +293,23 @@ public:
* Returns the name of the item.
* @return the name of the item
*/
- const QString& key() const
+ const TQString& key() const
{
return m_key;
}
/**
* Returns a string for the specified @p value, if possible. If not,
- * QString::null is returned. This can be used by programs if they want
+ * TQString::null is returned. This can be used by programs if they want
* to display a sum or an average of some item for a list of files.
*
* @param value the value to convert
* @param mangle if true, the string will already contain prefix and
* suffix
- * @return the converted string, or QString::null if not possible
+ * @return the converted string, or TQString::null if not possible
* @since 3.1
*/
- QString string( const QVariant& value, bool mangle = true ) const;
+ TQString string( const TQVariant& value, bool mangle = true ) const;
/**
* Is this item the variable item?
@@ -328,7 +328,7 @@ public:
* language.
* @return the translated key
*/
- const QString& translatedKey() const
+ const TQString& translatedKey() const
{
return m_translatedKey;
}
@@ -365,22 +365,22 @@ public:
private:
/** @internal */
- ItemInfo(const QString& key, const QString& translatedKey,
- QVariant::Type type)
+ ItemInfo(const TQString& key, const TQString& translatedKey,
+ TQVariant::Type type)
: m_key(key), m_translatedKey(translatedKey),
m_type(type),
m_attr(0), m_unit(NoUnit), m_hint(NoHint),
- m_prefix(QString::null), m_suffix(QString::null)
+ m_prefix(TQString::null), m_suffix(TQString::null)
{}
- QString m_key;
- QString m_translatedKey;
- QVariant::Type m_type;
+ TQString m_key;
+ TQString m_translatedKey;
+ TQVariant::Type m_type;
uint m_attr;
uint m_unit;
uint m_hint;
- QString m_prefix;
- QString m_suffix;
+ TQString m_prefix;
+ TQString m_suffix;
};
// ### could it be made private? Would this be BC?
@@ -392,13 +392,13 @@ public:
*
* @param group the group of the item
* @param key the key of the item
- * @param parent the parent of the QObject, or 0 for a parent-less object
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject, or 0 for a parent-less object
+ * @param name the name of the TQObject, can be 0
* @return the validator. You are responsible for deleting it. 0 if
* creation failed
*/
- QValidator * createValidator(const QString& group, const QString& key,
- QObject *parent = 0, const char *name = 0) const;
+ TQValidator * createValidator(const TQString& group, const TQString& key,
+ TQObject *parent = 0, const char *name = 0) const;
/**
* Returns the list of all groups that the plugin for this mimetype
@@ -406,7 +406,7 @@ public:
*
* @return the list of groups
*/
- QStringList supportedGroups() const;
+ TQStringList supportedGroups() const;
/**
* Same as the above function, but returns the strings to display to the
@@ -414,7 +414,7 @@ public:
*
* @return the list of groups
*/
- QStringList translatedGroups() const;
+ TQStringList translatedGroups() const;
/**
* This returns the list of groups in the preferred order that's specified
@@ -422,7 +422,7 @@ public:
*
* @return the list of groups
*/
- QStringList preferredGroups() const
+ TQStringList preferredGroups() const
{
return m_preferredGroups;
}
@@ -432,7 +432,7 @@ public:
*
* @return the mimetype of this info
*/
- QString mimeType() const {return m_mimeType;}
+ TQString mimeType() const {return m_mimeType;}
/**
* Get the group info for a specific group.
@@ -441,7 +441,7 @@ public:
* @return a pointer to the info. 0 if it does not
* exist. Don't delete this object!
*/
- const GroupInfo * groupInfo( const QString& group ) const;
+ const GroupInfo * groupInfo( const TQString& group ) const;
// always returning stringlists which the user has to iterate and use them
// to look up the real items sounds strange to me. I think we should add
@@ -453,37 +453,37 @@ public:
*
* @return the list of keys
*/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Return a list of all supported keys in preference order
*
* @return the list of keys
*/
- QStringList preferredKeys() const
+ TQStringList preferredKeys() const
{
return m_preferredKeys;
}
// ### shouldn't this be private? BC?
- GroupInfo * addGroupInfo( const QString& name,
- const QString& translatedName);
+ GroupInfo * addGroupInfo( const TQString& name,
+ const TQString& translatedName);
- QString m_translatedName;
- QStringList m_supportedKeys;
+ TQString m_translatedName;
+ TQStringList m_supportedKeys;
uint m_attr;
// bool m_supportsVariableKeys : 1;
- QDict<ItemInfo> m_itemDict;
+ TQDict<ItemInfo> m_itemDict;
// ### this should be made private instead, but this would be BIC
protected:
/** @internal */
- KFileMimeTypeInfo( const QString& mimeType );
+ KFileMimeTypeInfo( const TQString& mimeType );
- QDict<GroupInfo> m_groups;
- QString m_mimeType;
- QStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
- QStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
+ TQDict<GroupInfo> m_groups;
+ TQString m_mimeType;
+ TQStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
+ TQStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
};
@@ -508,7 +508,7 @@ public:
**/
// ### hmm, then it should be private
KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
- const QString& key, const QVariant& value);
+ const TQString& key, const TQVariant& value);
/**
* Copy constructor
@@ -538,7 +538,7 @@ public:
*
* @return the key of this item
*/
- QString key() const;
+ TQString key() const;
/**
* Returns a translation of the key for displaying to the user. If the
@@ -546,24 +546,24 @@ public:
*
* @return the translated key
*/
- QString translatedKey() const;
+ TQString translatedKey() const;
/**
* Returns the value of the item.
*
* @return the value of the item.
*/
- const QVariant& value() const;
+ const TQVariant& value() const;
/**
* Returns a string containing the value, if possible. If not,
- * QString::null is returned.
+ * TQString::null is returned.
*
* @param mangle if true, the string will already contain prefix and
* suffix
- * @return the value string, or QString::null if not possible
+ * @return the value string, or TQString::null if not possible
*/
- QString string( bool mangle = true ) const;
+ TQString string( bool mangle = true ) const;
/**
* Changes the value of the item.
@@ -571,14 +571,14 @@ public:
* @param value the new value
* @return true if successful, false otherwise
*/
- bool setValue( const QVariant& value );
+ bool setValue( const TQVariant& value );
/**
* Return the type of the item.
*
* @return the type of the item
*/
- QVariant::Type type() const;
+ TQVariant::Type type() const;
/**
* You can query if the application can edit the item and write it back to
@@ -617,7 +617,7 @@ public:
*
* @return the prefix
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* This method returns a translated suffix to be displayed after the
@@ -625,7 +625,7 @@ public:
*
* @return the suffix
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* Returns the hint for this item. See KFileMimeTypeInfo::Hint.
@@ -660,9 +660,9 @@ public:
*/
bool isValid() const;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& );
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
friend class KFileMetaInfoGroup;
protected:
@@ -685,8 +685,8 @@ class KIO_EXPORT KFileMetaInfoGroup
{
friend class KFilePlugin;
friend class KFileMetaInfo;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
public:
class Data;
@@ -696,7 +696,7 @@ public:
* KFileMetaInfo do it for you.
**/
// ### hmm, then it should be private
- KFileMetaInfoGroup( const QString& name, const KFileMimeTypeInfo* info );
+ KFileMetaInfoGroup( const TQString& name, const KFileMimeTypeInfo* info );
/**
* Copy constructor
@@ -755,7 +755,7 @@ public:
* Operator for convenience. It does the same as item(),
* but you cannot specify a group to search in
*/
- KFileMetaInfoItem operator[]( const QString& key ) const
+ KFileMetaInfoItem operator[]( const TQString& key ) const
{ return item( key ); }
/**
@@ -764,7 +764,7 @@ public:
* @param key the key of the item to search
* @return the specified item if found, an invalid item, if not
**/
- KFileMetaInfoItem item( const QString& key ) const;
+ KFileMetaInfoItem item( const TQString& key ) const;
/**
* Returns the item with the given @p hint.
@@ -781,7 +781,7 @@ public:
* @param key the key of the item to search
* @return the value with the given key
*/
- const QVariant value( const QString& key ) const
+ const TQVariant value( const TQString& key ) const
{
const KFileMetaInfoItem &i = item( key );
return i.value();
@@ -797,7 +797,7 @@ public:
*
* @return the list of keys supported for this mimetype
**/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Returns true if this group supports adding or removing arbitrary
@@ -812,21 +812,21 @@ public:
*
* @return true if an item for this @p key exists.
*/
- bool contains( const QString& key ) const;
+ bool contains( const TQString& key ) const;
/**
* Returns a list of all keys.
*
* @return a list of all keys in the order they were inserted.
**/
- QStringList keys() const;
+ TQStringList keys() const;
/**
* Returns a list of all keys in preference order.
*
* @return a list of all keys in preference order.
**/
- QStringList preferredKeys() const;
+ TQStringList preferredKeys() const;
/**
* @return the list of possible types that the value for the specified key
@@ -837,7 +837,7 @@ public:
// ### do we really want to support that?
// let's not waste time on thinking about it. Let's just kick it for now
// and add it in 4.0 if needed ;)
-// const QMemArray<QVariant::Type>& types( const QString& key ) const;
+// const TQMemArray<TQVariant::Type>& types( const TQString& key ) const;
/**
* Add an item to the info. This is only possible if the specified @p key
@@ -847,7 +847,7 @@ public:
* @param key the key of the item
* @return the KFileMetaInfoItem for the given @p key
**/
- KFileMetaInfoItem addItem( const QString& key );
+ KFileMetaInfoItem addItem( const TQString& key );
/**
* Remove this item from the meta info of the file. You cannot query
@@ -858,21 +858,21 @@ public:
* @param key the key of the removed item
* @return true if successful, false otherwise
*/
- bool removeItem(const QString& key);
+ bool removeItem(const TQString& key);
/**
* Returns a list of all removed items.
*
* @return a list of all removed items
*/
- QStringList removedItems();
+ TQStringList removedItems();
/**
* The name of this group.
*
* @return the name of this group
*/
- QString name() const;
+ TQString name() const;
/**
* The translated name of this group.
@@ -881,7 +881,7 @@ public:
*
* @since 3.2
*/
- QString translatedName() const;
+ TQString translatedName() const;
/**
* Returns the attributes of this item.
@@ -892,7 +892,7 @@ public:
protected:
void setAdded();
- KFileMetaInfoItem appendItem( const QString& key, const QVariant& value);
+ KFileMetaInfoItem appendItem( const TQString& key, const TQVariant& value);
Data* d;
void ref();
@@ -976,8 +976,8 @@ public:
* @note This version will @b only work for @b local (file:/) files.
*
**/
- KFileMetaInfo( const QString& path,
- const QString& mimeType = QString::null,
+ KFileMetaInfo( const TQString& path,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
/**
@@ -988,7 +988,7 @@ public:
*
**/
KFileMetaInfo( const KURL& url,
- const QString& mimeType = QString::null,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
/**
@@ -1025,42 +1025,42 @@ public:
*
* @return the keys of the groups that the file has.
*/
- QStringList groups() const;
+ TQStringList groups() const;
/**
* Returns a list of all supported groups.
*
* @return the supported keys of the groups that the file has.
*/
- QStringList supportedGroups() const;
+ TQStringList supportedGroups() const;
/**
* Returns a list of the preferred groups.
*
* @return the keys of the preferred groups that the file has.
*/
- QStringList preferredGroups() const;
+ TQStringList preferredGroups() const;
/**
* Returns a list of all preferred keys.
*
* @return a list of all preferred keys.
*/
- QStringList preferredKeys() const;
+ TQStringList preferredKeys() const;
/**
* Returns a list of supported keys.
*
* @return a list of supported keys
*/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Returns the list of groups that you can add or remove from the file.
*
* @return the groups can be added or removed
*/
- QStringList editableGroups() const;
+ TQStringList editableGroups() const;
// I'd like to keep those for lookup without group, at least the hint
// version
@@ -1070,7 +1070,7 @@ public:
* @param key the key of the item
* @return the item. Invalid if there is no item with the given @p key.
*/
- KFileMetaInfoItem item(const QString& key) const;
+ KFileMetaInfoItem item(const TQString& key) const;
/**
* Returns the KFileMetaInfoItem with the given @p hint.
*
@@ -1083,12 +1083,12 @@ public:
* Saves the item with the given @p key.
*
* @param key the key of the item
- * @param preferredGroup the preferred group, or QString::null
+ * @param preferredGroup the preferred group, or TQString::null
* @param createGroup true to create the group if necessary
* @return the saved item
*/
- KFileMetaInfoItem saveItem( const QString& key,
- const QString& preferredGroup = QString::null,
+ KFileMetaInfoItem saveItem( const TQString& key,
+ const TQString& preferredGroup = TQString::null,
bool createGroup = true );
/**
@@ -1097,7 +1097,7 @@ public:
* @param key the key of the item
* @return the group. Invalid if there is no group with the given @p key.
*/
- KFileMetaInfoGroup group(const QString& key) const;
+ KFileMetaInfoGroup group(const TQString& key) const;
/**
* Returns the KFileMetaInfoGroup with the given @p key.
@@ -1105,7 +1105,7 @@ public:
* @param key the key of the item
* @return the group. Invalid if there is no group with the given @p key.
*/
- KFileMetaInfoGroup operator[] (const QString& key) const
+ KFileMetaInfoGroup operator[] (const TQString& key) const
{
return group(key);
}
@@ -1120,7 +1120,7 @@ public:
* @param name the name of the group to add
* @return true if successful, false if not
*/
- bool addGroup( const QString& name );
+ bool addGroup( const TQString& name );
/**
* Remove the specified group. This will only succeed if it is
@@ -1131,14 +1131,14 @@ public:
* @param name the name of the group to remove
* @return true if successful, false if not
*/
- bool removeGroup( const QString& name );
+ bool removeGroup( const TQString& name );
/**
* Returns a list of removed groups.
*
* @return a list of removed groups.
*/
- QStringList removedGroups();
+ TQStringList removedGroups();
/**
* This method writes all pending changes of the meta info back to the file.
@@ -1156,7 +1156,7 @@ public:
*
* @return true if successful, false if not
*/
- bool applyChanges(const QString& path);
+ bool applyChanges(const TQString& path);
/**
* Checks whether an item with the given @p key exists.
@@ -1164,7 +1164,7 @@ public:
* @param key the key to check
* @return whether an item for this @p key exists.
*/
- bool contains( const QString& key ) const;
+ bool contains( const TQString& key ) const;
/**
* Checks whether a group with the given @p key exists.
@@ -1172,7 +1172,7 @@ public:
* @param key the key to check
* @return whether a group with this name exists.
*/
- bool containsGroup( const QString& key ) const;
+ bool containsGroup( const TQString& key ) const;
/**
* Returns the value with the given @p key.
@@ -1180,7 +1180,7 @@ public:
* @param key the key to retrieve
* @return the value. Invalid if it does not exist
*/
- const QVariant value( const QString& key ) const
+ const TQVariant value( const TQString& key ) const
{
return item(key).value();
}
@@ -1207,14 +1207,14 @@ public:
*
* @return the file's mime type
*/
- QString mimeType() const;
+ TQString mimeType() const;
/**
- * Returns the path of file - or QString::null if file is non-local
+ * Returns the path of file - or TQString::null if file is non-local
*
- * @return the file's path - or QString::null if file is non-local
+ * @return the file's path - or TQString::null if file is non-local
*/
- QString path() const;
+ TQString path() const;
/**
* Returns the url of file
@@ -1223,12 +1223,12 @@ public:
*/
KURL url() const;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfo& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
friend class KFilePlugin;
protected:
- KFileMetaInfoGroup appendGroup(const QString& name);
+ KFileMetaInfoGroup appendGroup(const TQString& name);
/**
* @return a pointer to the plugin that belogs to this object's mimetype.
@@ -1243,10 +1243,10 @@ protected:
private:
KFileMetaInfoItem findEditableItem( KFileMetaInfoGroup& group,
- const QString& key );
+ const TQString& key );
void init( const KURL& url,
- const QString& mimeType = QString::null,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
};
@@ -1276,8 +1276,8 @@ private:
*
* Example:
* @code
- * FooPlugin::FooPlugin(QObject *parent, const char *name,
- * const QStringList &args)
+ * FooPlugin::FooPlugin(TQObject *parent, const char *name,
+ * const TQStringList &args)
* : KFilePlugin(parent, name, args)
* {
* KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-foo" );
@@ -1289,12 +1289,12 @@ private:
* KFileMimeTypeInfo::ItemInfo* item;
*
* // our new items in the group
- * item = addItemInfo(group, "Items", i18n("Items"), QVariant::Int);
- * item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ * item = addItemInfo(group, "Items", i18n("Items"), TQVariant::Int);
+ * item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int);
* setUnit(item, KFileMimeTypeInfo::KiloBytes);
*
* // strings are possible, too:
- * //addItemInfo(group, "Document Type", i18n("Document type"), QVariant::String);
+ * //addItemInfo(group, "Document Type", i18n("Document type"), TQVariant::String);
* }
* @endcode
*
@@ -1311,7 +1311,7 @@ private:
* achieve this task. This might be the best way for binary files, since a
* change in the file format is likely to be supported by subsequent releases
* of that library. Alternatively, for text-based file formats, you can use
- * QTextStream to parse the file. For simple file formats, QRegExp can be of
+ * TQTextStream to parse the file. For simple file formats, TQRegExp can be of
* great help, too.
*
* After you extracted the relevant information, use appendGroup() and
@@ -1343,8 +1343,8 @@ private:
*
* If you want to define mutable meta information items, you need to overwrite
* the writeInfo() method. In this method, you can use third-party library
- * (appropriate mostly for binary files, see above) or QTextStream to write the
- * information back to the file. If you use QTextStream, be sure to write all
+ * (appropriate mostly for binary files, see above) or TQTextStream to write the
+ * information back to the file. If you use TQTextStream, be sure to write all
* file contents back.
*
* For some items, it might be that not all possible values are allowed. You
@@ -1400,17 +1400,17 @@ public:
* Creates a new KFilePlugin instance. You need to implement a constructor
* with the same argument list as this is required by KGenericFactory
*
- * @param parent the parent of the QObject, can be @c 0
- * @param name the name of the QObject, can be @c 0
+ * @param parent the parent of the TQObject, can be @c 0
+ * @param name the name of the TQObject, can be @c 0
* @param args currently ignored
*
* @see addMimeTypeInfo()
* @see addGroupInfo()
* @see addItemInfo()
- * @see QObject()
+ * @see TQObject()
**/
- KFilePlugin( QObject *parent, const char *name,
- const QStringList& args );
+ KFilePlugin( TQObject *parent, const char *name,
+ const TQStringList& args );
/**
* Destructor
@@ -1456,13 +1456,13 @@ public:
* @param mimeType the mime type
* @param group the group name of the validator item
* @param key the key name of the validator item
- * @param parent the QObject parent, can be @c 0
- * @param name the name of the QObject, can be @c 0
+ * @param parent the TQObject parent, can be @c 0
+ * @param name the name of the TQObject, can be @c 0
**/
- virtual QValidator* createValidator( const QString& mimeType,
- const QString& group,
- const QString& key,
- QObject* parent,
+ virtual TQValidator* createValidator( const TQString& mimeType,
+ const TQString& group,
+ const TQString& key,
+ TQObject* parent,
const char* name) const
{
Q_UNUSED(mimeType); Q_UNUSED(group);Q_UNUSED(key);
@@ -1479,7 +1479,7 @@ protected:
* @param mimeType a string containing the mimetype, e.g. @c "text/html"
* @return a KFileMimeTypeInfo object, to be used with addGroupInfo()
**/
- KFileMimeTypeInfo * addMimeTypeInfo( const QString& mimeType );
+ KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
// ### do we need this, if it only calls the provider?
// IMHO the Plugin shouldn't call its provider.
// DF: yes we need this. A plugin can create more than one mimetypeinfo.
@@ -1504,7 +1504,7 @@ protected:
* @see addItemInfo()
**/
KFileMimeTypeInfo::GroupInfo* addGroupInfo(KFileMimeTypeInfo* info,
- const QString& key, const QString& translatedKey) const;
+ const TQString& key, const TQString& translatedKey) const;
/**
* Sets attributes of the GroupInfo object returned by addGroupInfo().
@@ -1515,7 +1515,7 @@ protected:
**/
void setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) const;
- void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, QVariant::Type type,
+ void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, TQVariant::Type type,
uint attr) const;
/**
@@ -1528,14 +1528,14 @@ protected:
* parameter
* @param translatedKey the translated version of the key string for
* displaying in user interfaces. Use i18n() to translate the string
- * @param type the type of the meta information item, e.g. QVariant::Int
- * or QVariant::String.
+ * @param type the type of the meta information item, e.g. TQVariant::Int
+ * or TQVariant::String.
* @return an ItemInfo object. Pass this object to setAttributes()
**/
KFileMimeTypeInfo::ItemInfo* addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
- const QString& key,
- const QString& translatedKey,
- QVariant::Type type);
+ const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type);
/**
* Sets some attributes for a meta information item. The attributes
@@ -1579,7 +1579,7 @@ protected:
* @param item the ItemInfo object as returned by addItemInfo()
* @param prefix the prefix string to display
**/
- void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const QString& prefix);
+ void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix);
/**
* Sets a suffix string which is displayed before the item's value. Use
@@ -1589,7 +1589,7 @@ protected:
* @param item the ItemInfo object as returned by addItemInfo()
* @param suffix the suffix string to display
**/
- void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const QString& suffix);
+ void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix);
/**
* Call this method from within readInfo() to indicate that you wish to
@@ -1602,7 +1602,7 @@ protected:
* defined in your class' constructor
* @return a KFileMetaInfoGroup object, to be used in appendItem()
**/
- KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const QString& key);
+ KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const TQString& key);
/**
* Call this method from within readInfo() to fill the meta information item
@@ -1612,10 +1612,10 @@ protected:
* @param key the key string to identify the item.
* @param value the value of the meta information item
**/
- void appendItem(KFileMetaInfoGroup& group, const QString& key, QVariant value);
+ void appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value);
- QStringList m_preferredKeys;
- QStringList m_preferredGroups;
+ TQStringList m_preferredKeys;
+ TQStringList m_preferredGroups;
protected:
/**
@@ -1657,23 +1657,23 @@ public:
* @return a pointer to the plugin that belongs to the specified mimetype,
* which means also load the plugin if it's not in memory
*/
- KFilePlugin * plugin( const QString& mimeType ); // KDE4: merge with method below
+ KFilePlugin * plugin( const TQString& mimeType ); // KDE4: merge with method below
/**
* @return a pointer to the plugin that belongs to the specified mimetype,
* for the given protocol.
* This loads the plugin if it's not in memory yet.
*/
- KFilePlugin * plugin( const QString& mimeType, const QString& protocol );
+ KFilePlugin * plugin( const TQString& mimeType, const TQString& protocol );
- const KFileMimeTypeInfo * mimeTypeInfo( const QString& mimeType ); // KDE4: merge with below
- const KFileMimeTypeInfo * mimeTypeInfo( const QString& mimeType, const QString& protocol );
+ const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType ); // KDE4: merge with below
+ const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType, const TQString& protocol );
- QStringList preferredKeys( const QString& mimeType ) const;
- QStringList preferredGroups( const QString& mimeType ) const;
+ TQStringList preferredKeys( const TQString& mimeType ) const;
+ TQStringList preferredGroups( const TQString& mimeType ) const;
/// @since 3.1
- QStringList supportedMimeTypes() const;
+ TQStringList supportedMimeTypes() const;
protected: // ## should be private, right?
KFileMetaInfoProvider();
@@ -1705,34 +1705,34 @@ private:
// The key is either a mimetype or a protocol. Those things don't look the same
// so there's no need for two QDicts.
- QDict<CachedPluginInfo> m_plugins;
+ TQDict<CachedPluginInfo> m_plugins;
// This data is aggregated during the creation of a plugin,
// before being moved to the appropriate CachedPluginInfo(s)
// At any other time than during the loading of a plugin, this dict is EMPTY.
// Same key as in m_plugins: mimetype or protocol
- QDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
+ TQDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
private:
static KFileMetaInfoProvider * s_self;
- KFilePlugin* loadPlugin( const QString& mimeType, const QString& protocol );
- KFilePlugin* loadAndRegisterPlugin( const QString& mimeType, const QString& protocol );
- KFileMimeTypeInfo * addMimeTypeInfo( const QString& mimeType );
+ KFilePlugin* loadPlugin( const TQString& mimeType, const TQString& protocol );
+ KFilePlugin* loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol );
+ KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
class KFileMetaInfoProviderPrivate;
KFileMetaInfoProviderPrivate *d;
};
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfo& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
#endif // KILEMETAINFO_H
diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp
index f381f7be6..6b9bf361d 100644
--- a/kio/kio/kfileshare.cpp
+++ b/kio/kio/kfileshare.cpp
@@ -18,8 +18,8 @@
*/
#include "kfileshare.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <kprocio.h>
#include <klocale.h>
@@ -35,14 +35,14 @@
#include <kuser.h>
KFileShare::Authorization KFileShare::s_authorization = NotInitialized;
-QStringList* KFileShare::s_shareList = 0L;
-static KStaticDeleter<QStringList> sdShareList;
+TQStringList* KFileShare::s_shareList = 0L;
+static KStaticDeleter<TQStringList> sdShareList;
KFileShare::ShareMode KFileShare::s_shareMode;
bool KFileShare::s_sambaEnabled;
bool KFileShare::s_nfsEnabled;
bool KFileShare::s_restricted;
-QString KFileShare::s_fileShareGroup;
+TQString KFileShare::s_fileShareGroup;
bool KFileShare::s_sharingEnabled;
@@ -51,12 +51,12 @@ bool KFileShare::s_sharingEnabled;
KFileSharePrivate::KFileSharePrivate()
{
KDirWatch::self()->addFile(FILESHARECONF);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString &)));
- connect(KDirWatch::self(), SIGNAL(created(const QString&)),this,
- SLOT(slotFileChange(const QString &)));
- connect(KDirWatch::self(), SIGNAL(deleted(const QString&)),this,
- SLOT(slotFileChange(const QString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(created(const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(deleted(const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
}
KFileSharePrivate::~KFileSharePrivate()
@@ -75,7 +75,7 @@ KFileSharePrivate* KFileSharePrivate::self()
return _self;
}
-void KFileSharePrivate::slotFileChange(const QString &file)
+void KFileSharePrivate::slotFileChange(const TQString &file)
{
if(file==FILESHARECONF) {
KFileShare::readConfig();
@@ -87,7 +87,7 @@ void KFileShare::readConfig() // static
{
// Create KFileSharePrivate instance
KFileSharePrivate::self();
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes";
s_restricted = config.readEntry("RESTRICT", "yes") == "yes";
@@ -139,7 +139,7 @@ bool KFileShare::isRestricted() {
return s_restricted;
}
-QString KFileShare::fileShareGroup() {
+TQString KFileShare::fileShareGroup() {
if ( s_authorization == NotInitialized )
readConfig();
@@ -166,12 +166,12 @@ void KFileShare::readShareList()
{
KFileSharePrivate::self();
if ( !s_shareList )
- sdShareList.setObject( s_shareList, new QStringList );
+ sdShareList.setObject( s_shareList, new TQStringList );
else
s_shareList->clear();
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
- QString exe = findExe( "filesharelist" );
+ TQString exe = findExe( "filesharelist" );
if (exe.isEmpty()) {
s_authorization = ErrorNotFound;
return;
@@ -185,7 +185,7 @@ void KFileShare::readShareList()
}
// Reading code shamelessly stolen from khostname.cpp ;)
- QString line;
+ TQString line;
int length;
do {
length = proc.readln(line, true);
@@ -200,12 +200,12 @@ void KFileShare::readShareList()
}
-bool KFileShare::isDirectoryShared( const QString& _path )
+bool KFileShare::isDirectoryShared( const TQString& _path )
{
if ( ! s_shareList )
readShareList();
- QString path( _path );
+ TQString path( _path );
if ( path[path.length()-1] != '/' )
path += '/';
return s_shareList && s_shareList->contains( path );
@@ -219,24 +219,24 @@ KFileShare::Authorization KFileShare::authorization()
return s_authorization;
}
-QString KFileShare::findExe( const char* exeName )
+TQString KFileShare::findExe( const char* exeName )
{
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
- QString path = QString::fromLocal8Bit(getenv("PATH")) + QString::fromLatin1(":/usr/sbin");
- QString exe = KStandardDirs::findExe( exeName, path );
+ TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin");
+ TQString exe = KStandardDirs::findExe( exeName, path );
if (exe.isEmpty())
kdError() << exeName << " not found in " << path << endl;
return exe;
}
-bool KFileShare::setShared( const QString& path, bool shared )
+bool KFileShare::setShared( const TQString& path, bool shared )
{
if (! KFileShare::sharingEnabled() ||
KFileShare::shareMode() == Advanced)
return false;
kdDebug(7000) << "KFileShare::setShared " << path << "," << shared << endl;
- QString exe = KFileShare::findExe( "fileshareset" );
+ TQString exe = KFileShare::findExe( "fileshareset" );
if (exe.isEmpty())
return false;
diff --git a/kio/kio/kfileshare.h b/kio/kio/kfileshare.h
index d95e9764f..6753e055a 100644
--- a/kio/kio/kfileshare.h
+++ b/kio/kio/kfileshare.h
@@ -19,7 +19,7 @@
#ifndef kfileshare_h
#define kfileshare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ public:
static KFileSharePrivate *self();
static KFileSharePrivate *_self;
protected slots: // this is why this class needs to be in the .h
- void slotFileChange(const QString &);
+ void slotFileChange(const TQString &);
};
/**
@@ -67,7 +67,7 @@ public:
/**
* Call this to know if a directory is currently shared
*/
- static bool isDirectoryShared( const QString& path );
+ static bool isDirectoryShared( const TQString& path );
enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
/**
@@ -75,7 +75,7 @@ public:
*/
static Authorization authorization();
- static QString findExe( const char* exeName );
+ static TQString findExe( const char* exeName );
/**
* Uses a suid perl script to share the given path
@@ -84,7 +84,7 @@ public:
* @param shared whether the path should be shared or not
* @returns whether the perl script was successful
*/
- static bool setShared( const QString& path, bool shared );
+ static bool setShared( const TQString& path, bool shared );
/**
* The used share mode.
@@ -115,7 +115,7 @@ public:
* That is, all users in that group are allowed to
* share files if file sharing is restricted.
*/
- static QString fileShareGroup();
+ static TQString fileShareGroup();
/**
* Returns the configured share mode
@@ -134,12 +134,12 @@ public:
private:
static Authorization s_authorization;
- static QStringList* s_shareList;
+ static TQStringList* s_shareList;
static ShareMode s_shareMode;
static bool s_sambaEnabled;
static bool s_nfsEnabled;
static bool s_restricted;
- static QString s_fileShareGroup;
+ static TQString s_fileShareGroup;
static bool s_sharingEnabled;
};
diff --git a/kio/kio/kfilterbase.cpp b/kio/kio/kfilterbase.cpp
index ae973c57f..50ff5498a 100644
--- a/kio/kio/kfilterbase.cpp
+++ b/kio/kio/kfilterbase.cpp
@@ -33,23 +33,23 @@ KFilterBase::~KFilterBase()
delete m_dev;
}
-void KFilterBase::setDevice( QIODevice * dev, bool autodelete )
+void KFilterBase::setDevice( TQIODevice * dev, bool autodelete )
{
m_dev = dev;
m_bAutoDel = autodelete;
}
-KFilterBase * KFilterBase::findFilterByFileName( const QString & fileName )
+KFilterBase * KFilterBase::findFilterByFileName( const TQString & fileName )
{
KMimeType::Ptr mime = KMimeType::findByPath( fileName );
kdDebug(7005) << "KFilterBase::findFilterByFileName mime=" << mime->name() << endl;
return findFilterByMimeType(mime->name());
}
-KFilterBase * KFilterBase::findFilterByMimeType( const QString & mimeType )
+KFilterBase * KFilterBase::findFilterByMimeType( const TQString & mimeType )
{
KTrader::OfferList offers = KTrader::self()->query( "KDECompressionFilter",
- QString("'") + mimeType + "' in ServiceTypes" );
+ TQString("'") + mimeType + "' in ServiceTypes" );
KTrader::OfferList::ConstIterator it = offers.begin();
KTrader::OfferList::ConstIterator end = offers.end();
diff --git a/kio/kio/kfilterbase.h b/kio/kio/kfilterbase.h
index fb2451f27..cfc037fe5 100644
--- a/kio/kio/kfilterbase.h
+++ b/kio/kio/kfilterbase.h
@@ -19,8 +19,8 @@
#ifndef __kfilterbase__h
#define __kfilterbase__h
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -35,7 +35,7 @@ class QIODevice;
* such as gzip and bzip2. It's pretty much internal.
* Don't use directly, use KFilterDev instead.
*/
-class KIO_EXPORT KFilterBase : public QObject // needs to inherit QObject for KLibFactory::create
+class KIO_EXPORT KFilterBase : public TQObject // needs to inherit TQObject for KLibFactory::create
{
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param dev the device on which the filter will work
* @param autodelete if true, @p dev is deleted when the filter is deleted
*/
- void setDevice( QIODevice * dev, bool autodelete = false );
+ void setDevice( TQIODevice * dev, bool autodelete = false );
// Note that this isn't in the constructor, because of KLibFactory::create,
// but it should be called before using the filterbase !
@@ -55,7 +55,7 @@ public:
* Returns the device on which the filter will work.
* @returns the device on which the filter will work
*/
- QIODevice * device() { return m_dev; }
+ TQIODevice * device() { return m_dev; }
/** \internal */
virtual void init( int mode ) = 0;
/** \internal */
@@ -67,7 +67,7 @@ public:
/** \internal */
virtual bool readHeader() = 0;
/** \internal */
- virtual bool writeHeader( const QCString & filename ) = 0;
+ virtual bool writeHeader( const TQCString & filename ) = 0;
/** \internal */
virtual void setOutBuffer( char * data, uint maxlen ) = 0;
/** \internal */
@@ -94,7 +94,7 @@ public:
* @param fileName the name of the file to filter
* @return the filter for the @p fileName, or 0 if not found
*/
- static KFilterBase * findFilterByFileName( const QString & fileName );
+ static KFilterBase * findFilterByFileName( const TQString & fileName );
/**
* Call this to create the appropriate filter for the mimetype
@@ -102,10 +102,10 @@ public:
* @param mimeType the mime type of the file to filter
* @return the filter for the @p mimeType, or 0 if not found
*/
- static KFilterBase * findFilterByMimeType( const QString & mimeType );
+ static KFilterBase * findFilterByMimeType( const TQString & mimeType );
protected:
- QIODevice * m_dev;
+ TQIODevice * m_dev;
bool m_bAutoDel;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kfilterdev.cpp b/kio/kio/kfilterdev.cpp
index d1f361d58..224d68761 100644
--- a/kio/kio/kfilterdev.cpp
+++ b/kio/kio/kfilterdev.cpp
@@ -22,7 +22,7 @@
#include <stdio.h> // for EOF
#include <stdlib.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#define BUFFER_SIZE 8*1024
@@ -37,9 +37,9 @@ public:
bool autoDeleteFilterBase;
bool bOpenedUnderlyingDevice;
bool bIgnoreData;
- QByteArray buffer; // Used as 'input buffer' when reading, as 'output buffer' when writing
- QCString ungetchBuffer;
- QCString origFileName;
+ TQByteArray buffer; // Used as 'input buffer' when reading, as 'output buffer' when writing
+ TQCString ungetchBuffer;
+ TQCString origFileName;
KFilterBase::Result result;
};
@@ -63,14 +63,14 @@ KFilterDev::~KFilterDev()
#ifndef KDE_NO_COMPAT
//this one is static
// Cumbersome API. To be removed in KDE 3.0.
-QIODevice* KFilterDev::createFilterDevice(KFilterBase* base, QFile* file)
+TQIODevice* KFilterDev::createFilterDevice(KFilterBase* base, TQFile* file)
{
if (file==0)
return 0;
//we don't need a filter
if (base==0)
- return new QFile(file->name()); // A bit strange IMHO. We ask for a QFile but we create another one !?! (DF)
+ return new TQFile(file->name()); // A bit strange IMHO. We ask for a TQFile but we create another one !?! (DF)
base->setDevice(file);
return new KFilterDev(base);
@@ -78,10 +78,10 @@ QIODevice* KFilterDev::createFilterDevice(KFilterBase* base, QFile* file)
#endif
//static
-QIODevice * KFilterDev::deviceForFile( const QString & fileName, const QString & mimetype,
+TQIODevice * KFilterDev::deviceForFile( const TQString & fileName, const TQString & mimetype,
bool forceFilter )
{
- QFile * f = new QFile( fileName );
+ TQFile * f = new TQFile( fileName );
KFilterBase * base = mimetype.isEmpty() ? KFilterBase::findFilterByFileName( fileName )
: KFilterBase::findFilterByMimeType( mimetype );
if ( base )
@@ -98,12 +98,12 @@ QIODevice * KFilterDev::deviceForFile( const QString & fileName, const QString &
}
}
-QIODevice * KFilterDev::device( QIODevice* inDevice, const QString & mimetype)
+TQIODevice * KFilterDev::device( TQIODevice* inDevice, const TQString & mimetype)
{
return device( inDevice, mimetype, true );
}
-QIODevice * KFilterDev::device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice )
+TQIODevice * KFilterDev::device( TQIODevice* inDevice, const TQString & mimetype, bool autoDeleteInDevice )
{
if (inDevice==0)
return 0;
@@ -169,7 +169,7 @@ void KFilterDev::flush()
// Hmm, might not be enough...
}
-QIODevice::Offset KFilterDev::size() const
+TQIODevice::Offset KFilterDev::size() const
{
// Well, hmm, Houston, we have a problem.
// We can't know the size of the uncompressed data
@@ -182,12 +182,12 @@ QIODevice::Offset KFilterDev::size() const
return (uint)-1;
}
-QIODevice::Offset KFilterDev::at() const
+TQIODevice::Offset KFilterDev::at() const
{
return ioIndex;
}
-bool KFilterDev::at( QIODevice::Offset pos )
+bool KFilterDev::at( TQIODevice::Offset pos )
{
//kdDebug(7005) << "KFilterDev::at " << pos << " currently at " << ioIndex << endl;
@@ -219,9 +219,9 @@ bool KFilterDev::at( QIODevice::Offset pos )
}
//kdDebug(7005) << "KFilterDev::at : reading " << pos << " dummy bytes" << endl;
- QByteArray dummy( QMIN( pos, 3*BUFFER_SIZE ) );
+ TQByteArray dummy( QMIN( pos, 3*BUFFER_SIZE ) );
d->bIgnoreData = true;
- bool result = ( (QIODevice::Offset)readBlock( dummy.data(), pos ) == pos );
+ bool result = ( (TQIODevice::Offset)readBlock( dummy.data(), pos ) == pos );
d->bIgnoreData = false;
return result;
}
@@ -440,12 +440,12 @@ int KFilterDev::getch()
int ch = d->ungetchBuffer[ len-1 ];
d->ungetchBuffer.truncate( len - 1 );
ioIndex++;
- //kdDebug(7005) << "KFilterDev::getch from ungetch: " << QString(QChar(ch)) << endl;
+ //kdDebug(7005) << "KFilterDev::getch from ungetch: " << TQString(TQChar(ch)) << endl;
return ch;
}
char buf[1];
int ret = readBlock( buf, 1 ) == 1 ? buf[0] : EOF;
- //kdDebug(7005) << "KFilterDev::getch ret=" << QString(QChar(ret)) << endl;
+ //kdDebug(7005) << "KFilterDev::getch ret=" << TQString(TQChar(ret)) << endl;
return ret;
}
@@ -459,7 +459,7 @@ int KFilterDev::putch( int c )
int KFilterDev::ungetch( int ch )
{
- //kdDebug(7005) << "KFilterDev::ungetch " << QString(QChar(ch)) << endl;
+ //kdDebug(7005) << "KFilterDev::ungetch " << TQString(TQChar(ch)) << endl;
if ( ch == EOF ) // cannot unget EOF
return ch;
@@ -469,7 +469,7 @@ int KFilterDev::ungetch( int ch )
return ch;
}
-void KFilterDev::setOrigFileName( const QCString & fileName )
+void KFilterDev::setOrigFileName( const TQCString & fileName )
{
d->origFileName = fileName;
}
diff --git a/kio/kio/kfilterdev.h b/kio/kio/kfilterdev.h
index d1a2d0315..9e3bf508c 100644
--- a/kio/kio/kfilterdev.h
+++ b/kio/kio/kfilterdev.h
@@ -18,8 +18,8 @@
#ifndef __kfilterdev_h
#define __kfilterdev_h
-#include <qiodevice.h>
-#include <qstring.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QFile;
@@ -66,7 +66,7 @@ public:
* set the name of the original file, to be used in the gzip header.
* @param fileName the name of the original file
*/
- void setOrigFileName( const QCString & fileName );
+ void setOrigFileName( const TQCString & fileName );
/**
* Call this let this device skip the gzip headers when reading/writing.
@@ -77,13 +77,13 @@ public:
void setSkipHeaders();
// Not implemented
- virtual QIODevice::Offset size() const;
+ virtual TQIODevice::Offset size() const;
- virtual QIODevice::Offset at() const;
+ virtual TQIODevice::Offset at() const;
/**
* That one can be quite slow, when going back. Use with care.
*/
- virtual bool at( QIODevice::Offset );
+ virtual bool at( TQIODevice::Offset );
virtual bool atEnd() const;
@@ -100,12 +100,12 @@ private:
#endif
/**
* Call this to create the appropriate filter device for @p base
- * working on @p file . The returned QIODevice has to be deleted
+ * working on @p file . The returned TQIODevice has to be deleted
* after using.
* @deprecated. Use deviceForFile instead.
* To be removed in KDE 3.0
*/
- static QIODevice* createFilterDevice(KFilterBase* base, QFile* file) KDE_DEPRECATED;
+ static TQIODevice* createFilterDevice(KFilterBase* base, TQFile* file) KDE_DEPRECATED;
public:
/**
@@ -118,27 +118,27 @@ public:
* to force the corresponding decompression filter, if available.
*
* Warning: application/x-bzip2 may not be available.
- * In that case a QFile opened on the compressed data will be returned !
+ * In that case a TQFile opened on the compressed data will be returned !
* Use KFilterBase::findFilterByMimeType and code similar to what
* deviceForFile is doing, to better control what's happening.
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
*
* @param fileName the name of the file to filter
- * @param mimetype the mime type of the file to filter, or QString::null if unknown
+ * @param mimetype the mime type of the file to filter, or TQString::null if unknown
* @param forceFilter if true, the function will either find a compression filter, or return 0.
- * If false, it will always return a QIODevice. If no
- * filter is available it will return a simple QFile.
+ * If false, it will always return a TQIODevice. If no
+ * filter is available it will return a simple TQFile.
* This can be useful if the file is usable without a filter.
- * @return if a filter has been found, the QIODevice for the filter. If the
+ * @return if a filter has been found, the TQIODevice for the filter. If the
* filter does not exist, the return value depends on @p forceFilter.
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
*/
- static QIODevice * deviceForFile( const QString & fileName, const QString & mimetype = QString::null,
+ static TQIODevice * deviceForFile( const TQString & fileName, const TQString & mimetype = TQString::null,
bool forceFilter = false );
/**
- * Creates an i/o device that is able to read from the QIODevice @p inDevice,
+ * Creates an i/o device that is able to read from the TQIODevice @p inDevice,
* whether the data is compressed or not. Available compression filters
* (gzip/bzip2 etc.) will automatically be used.
*
@@ -149,17 +149,17 @@ public:
* Warning: application/x-bzip2 may not be available.
* In that case 0 will be returned !
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
* @param inDevice input device, becomes owned by this device! Automatically deleted!
* @param mimetype the mime type for the filter
- * @return a QIODevice that filters the original stream. Must be deleted after
+ * @return a TQIODevice that filters the original stream. Must be deleted after
* using
*/
- static QIODevice * device( QIODevice* inDevice, const QString & mimetype);
+ static TQIODevice * device( TQIODevice* inDevice, const TQString & mimetype);
// BIC: merge with device() method below, using default value for autoDeleteInDevice
/**
- * Creates an i/o device that is able to read from the QIODevice @p inDevice,
+ * Creates an i/o device that is able to read from the TQIODevice @p inDevice,
* whether the data is compressed or not. Available compression filters
* (gzip/bzip2 etc.) will automatically be used.
*
@@ -170,15 +170,15 @@ public:
* Warning: application/x-bzip2 may not be available.
* In that case 0 will be returned !
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
* @param inDevice input device. Won't be deleted if @p autoDeleteInDevice = false
* @param mimetype the mime type for the filter
* @param autoDeleteInDevice if true, @p inDevice will be deleted automatically
- * @return a QIODevice that filters the original stream. Must be deleted after
+ * @return a TQIODevice that filters the original stream. Must be deleted after
* using
* @since 3.1
*/
- static QIODevice * device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice );
+ static TQIODevice * device( TQIODevice* inDevice, const TQString & mimetype, bool autoDeleteInDevice );
private:
KFilterBase *filter;
diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp
index 342b2554d..8d4a45db4 100644
--- a/kio/kio/kimageio.cpp
+++ b/kio/kio/kimageio.cpp
@@ -10,12 +10,12 @@
#include"config.h"
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <ltdl.h>
#include "kimageio.h"
@@ -29,9 +29,9 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qimage.h>
+#include <tqimage.h>
-KImageIOFormat::KImageIOFormat( const QString &path)
+KImageIOFormat::KImageIOFormat( const TQString &path)
: KSycocaEntry(path)
{
bLibLoaded = false;
@@ -52,7 +52,7 @@ KImageIOFormat::KImageIOFormat( const QString &path)
rPaths = config.readPathListEntry("rPaths");
}
-KImageIOFormat::KImageIOFormat( QDataStream& _str, int offset) :
+KImageIOFormat::KImageIOFormat( TQDataStream& _str, int offset) :
KSycocaEntry( _str, offset)
{
bLibLoaded = false;
@@ -66,7 +66,7 @@ KImageIOFormat::~KImageIOFormat()
}
void
-KImageIOFormat::load( QDataStream& _str)
+KImageIOFormat::load( TQDataStream& _str)
{
Q_INT8 iRead, iWrite;
KSycocaEntry::read(_str, mType);
@@ -83,7 +83,7 @@ KImageIOFormat::load( QDataStream& _str)
}
void
-KImageIOFormat::save( QDataStream& _str)
+KImageIOFormat::save( TQDataStream& _str)
{
KSycocaEntry::save( _str );
Q_INT8 iRead = bRead ? 1 : 0;
@@ -94,7 +94,7 @@ KImageIOFormat::save( QDataStream& _str)
}
void
-KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
+KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
{
if (!bLibLoaded)
{
@@ -103,20 +103,20 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // Error
return;
}
- QString libpath = KLibLoader::findLibrary(mLib.ascii());
+ TQString libpath = KLibLoader::findLibrary(mLib.ascii());
if ( libpath.isEmpty())
{
iio->setStatus(1); // Error
return;
}
- lt_dlhandle libhandle = lt_dlopen( QFile::encodeName(libpath) );
+ lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) );
if (libhandle == 0) {
iio->setStatus(1); // error
kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl;
return;
}
bLibLoaded = true;
- QString funcName;
+ TQString funcName;
if (bRead)
{
funcName = "kimgio_"+mType.lower()+"_read";
@@ -126,7 +126,7 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
- mReadFunc = (void (*)(QImageIO *))func;
+ mReadFunc = (void (*)(TQImageIO *))func;
}
if (bWrite)
{
@@ -137,7 +137,7 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
- mWriteFunc = (void (*)(QImageIO *))func;
+ mWriteFunc = (void (*)(TQImageIO *))func;
}
}
@@ -173,9 +173,9 @@ KImageIOFactory::KImageIOFactory() : KSycocaFactory( KST_KImageIO )
kiioflsd.setObject( formatList, new KImageIOFormatList());
lt_dlinit(); // Do this only once!
// Add rPaths.
- for(QStringList::Iterator it = rPath.begin();
+ for(TQStringList::Iterator it = rPath.begin();
it != rPath.end(); ++it)
- lt_dladdsearchdir( QFile::encodeName(*it) );
+ lt_dladdsearchdir( TQFile::encodeName(*it) );
}
load();
}
@@ -196,10 +196,10 @@ KImageIOFactory::KImageIOFactory() : KSycocaFactory( KST_KImageIO )
QString
KImageIOFactory::createPattern( KImageIO::Mode _mode)
{
- QStringList patterns;
- QString allPatterns;
- QString wildCard("*.");
- QString separator("|");
+ TQStringList patterns;
+ TQString allPatterns;
+ TQString wildCard("*.");
+ TQString separator("|");
for( KImageIOFormatList::ConstIterator it = formatList->begin();
it != formatList->end();
++it )
@@ -208,9 +208,9 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
if (((_mode == KImageIO::Reading) && format->bRead) ||
((_mode == KImageIO::Writing) && format->bWrite))
{
- QString pattern;
- QStringList suffices = format->mSuffices;
- for( QStringList::ConstIterator it = suffices.begin();
+ TQString pattern;
+ TQStringList suffices = format->mSuffices;
+ for( TQStringList::ConstIterator it = suffices.begin();
it != suffices.end();
++it)
{
@@ -232,17 +232,17 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
patterns.sort();
patterns.prepend(allPatterns);
- QString pattern = patterns.join(QString::fromLatin1("\n"));
+ TQString pattern = patterns.join(TQString::fromLatin1("\n"));
return pattern;
}
void
-KImageIOFactory::readImage( QImageIO *iio)
+KImageIOFactory::readImage( TQImageIO *iio)
{
(void) self(); // Make sure we exist
const char *fm = iio->format();
if (!fm)
- fm = QImageIO::imageFormat( iio->ioDevice());
+ fm = TQImageIO::imageFormat( iio->ioDevice());
kdDebug() << "KImageIO: readImage() format = " << fm << endl;
KImageIOFormat *format = 0;
@@ -264,12 +264,12 @@ KImageIOFactory::readImage( QImageIO *iio)
}
void
-KImageIOFactory::writeImage( QImageIO *iio)
+KImageIOFactory::writeImage( TQImageIO *iio)
{
(void) self(); // Make sure we exist
const char *fm = iio->format();
if (!fm)
- fm = QImageIO::imageFormat( iio->ioDevice());
+ fm = TQImageIO::imageFormat( iio->ioDevice());
kdDebug () << "KImageIO: writeImage() format = "<< fm << endl;
KImageIOFormat *format = 0;
@@ -321,8 +321,8 @@ KImageIOFactory::load()
continue;
if (!format->mHeader.isEmpty() && !format->mLib.isEmpty())
{
- void (*readFunc)(QImageIO *);
- void (*writeFunc)(QImageIO *);
+ void (*readFunc)(TQImageIO *);
+ void (*writeFunc)(TQImageIO *);
if (format->bRead)
readFunc = readImage;
else
@@ -331,7 +331,7 @@ KImageIOFactory::load()
writeFunc = writeImage;
else
writeFunc = 0;
- QImageIO::defineIOHandler( format->mType.ascii(),
+ TQImageIO::defineIOHandler( format->mType.ascii(),
format->mHeader.ascii(),
format->mFlags.ascii(),
readFunc, writeFunc);
@@ -358,7 +358,7 @@ KImageIOFactory::createEntry(int offset)
{
KImageIOFormat *format = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch (type)
{
case KST_KImageIOFormat:
@@ -389,7 +389,7 @@ KImageIO::pattern(Mode _mode)
return KImageIOFactory::self()->mWritePattern;
}
-bool KImageIO::canWrite(const QString& type)
+bool KImageIO::canWrite(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -408,7 +408,7 @@ bool KImageIO::canWrite(const QString& type)
return false;
}
-bool KImageIO::canRead(const QString& type)
+bool KImageIO::canRead(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -427,9 +427,9 @@ bool KImageIO::canRead(const QString& type)
return false;
}
-QStringList KImageIO::types(Mode _mode ) {
+TQStringList KImageIO::types(Mode _mode ) {
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QStringList types;
+ TQStringList types;
if(formatList)
{
@@ -447,7 +447,7 @@ QStringList KImageIO::types(Mode _mode ) {
return types;
}
-QString KImageIO::suffix(const QString& type)
+TQString KImageIO::suffix(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -463,10 +463,10 @@ QString KImageIO::suffix(const QString& type)
}
}
- return QString::null;
+ return TQString::null;
}
-QString KImageIO::typeForMime(const QString& mimeType)
+TQString KImageIO::typeForMime(const TQString& mimeType)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -482,13 +482,13 @@ QString KImageIO::typeForMime(const QString& mimeType)
}
}
- return QString::null;
+ return TQString::null;
}
-QString KImageIO::type(const QString& filename)
+TQString KImageIO::type(const TQString& filename)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QString suffix = filename;
+ TQString suffix = filename;
int dot = suffix.findRev('.');
if (dot >= 0)
suffix = suffix.mid(dot + 1);
@@ -505,13 +505,13 @@ QString KImageIO::type(const QString& filename)
}
}
- return QString::null;
+ return TQString::null;
}
-QStringList KImageIO::mimeTypes( Mode _mode )
+TQStringList KImageIO::mimeTypes( Mode _mode )
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QStringList mimeList;
+ TQStringList mimeList;
if(formatList)
{
@@ -530,7 +530,7 @@ QStringList KImageIO::mimeTypes( Mode _mode )
return mimeList;
}
-bool KImageIO::isSupported( const QString& _mimeType, Mode _mode )
+bool KImageIO::isSupported( const TQString& _mimeType, Mode _mode )
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -553,7 +553,7 @@ bool KImageIO::isSupported( const QString& _mimeType, Mode _mode )
return false;
}
-QString KImageIO::mimeType( const QString& _filename )
+TQString KImageIO::mimeType( const TQString& _filename )
{
return KMimeType::findByURL( KURL( _filename ) )->name();
}
diff --git a/kio/kio/kimageio.h b/kio/kio/kimageio.h
index 882ad9172..dba18c8fd 100644
--- a/kio/kio/kimageio.h
+++ b/kio/kio/kimageio.h
@@ -8,7 +8,7 @@
#ifndef SSK_KIMGIO_H
#define SSK_KIMGIO_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -16,11 +16,11 @@
* Interface to the KDE Image IO plugin architecture.
*
* This library allows KDE applications to read and write images in a
- * variety of formats, transparently via the QImage and QPixmap load
+ * variety of formats, transparently via the TQImage and TQPixmap load
* and save methods.
*
* The image processing backends are written as image handlers compatible
- * with the QImageIO handler format. The backends are loaded on demand
+ * with the TQImageIO handler format. The backends are loaded on demand
* when a particular format is requested. Each format can be identified
* by a unique type id string.
*
@@ -52,7 +52,7 @@
* \b Example:
*
* \code
- * #include<qpixmap.h>
+ * #include<tqpixmap.h>
* #include<kimageio.h>
*
* int main( int argc, char **argv )
@@ -63,7 +63,7 @@
* }
* \endcode
*
- * @see KImageIO, QPixmap, QImage, QImageIO
+ * @see KImageIO, TQPixmap, TQImage, QImageIO
* @author Sirtaj Singh Kang
*/
class KIO_EXPORT KImageIO
@@ -86,14 +86,14 @@ public:
* @param type the type id of the image type
* @return true if the image format can be written
*/
- static bool canWrite(const QString& type);
+ static bool canWrite(const TQString& type);
/**
* Checks if a special type is supported for reading.
* @param type the type id of the image type
* @return true if the image format can be read
*/
- static bool canRead(const QString& type);
+ static bool canRead(const TQString& type);
/**
* Returns a list of all KImageIO supported formats.
@@ -101,7 +101,7 @@ public:
* @param mode Tells whether to retrieve modes that can be read or written.
* @return a list of the type ids
*/
- static QStringList types(Mode mode = Writing);
+ static TQStringList types(Mode mode = Writing);
/**
@@ -114,32 +114,32 @@ public:
* @return a space-separated list of file globs that describe the
* supported formats
*/
- static QString pattern(Mode mode = Reading);
+ static TQString pattern(Mode mode = Reading);
/**
* Returns the suffix of an image type.
* @param type the type id of the file format
- * @return the suffix of the file format or QString::null if it does not
+ * @return the suffix of the file format or TQString::null if it does not
* exist
*/
- static QString suffix(const QString& type);
+ static TQString suffix(const TQString& type);
/**
* Returns the type of a MIME type.
* @param mimeType the MIME type to search
- * @return type id of the MIME type or QString::null if the MIME type
+ * @return type id of the MIME type or TQString::null if the MIME type
* is not supported
* @since 3.1
*/
- static QString typeForMime(const QString& mimeType);
+ static TQString typeForMime(const TQString& mimeType);
/**
* Returns the type of given filename.
* @param filename the filename to check
* @return if the file name's suffix is known the type id of the
- * file type, otherwise QString::null
+ * file type, otherwise TQString::null
*/
- static QString type(const QString& filename);
+ static TQString type(const TQString& filename);
/**
* Returns a list of MIME types for all KImageIO supported formats.
@@ -147,7 +147,7 @@ public:
* @param mode Tells whether to retrieve modes that can be read or written.
* @return a list if MIME types of the supported formats
*/
- static QStringList mimeTypes( Mode mode = Writing );
+ static TQStringList mimeTypes( Mode mode = Writing );
/**
* Test to see whether a MIME type is supported to reading/writing.
@@ -155,14 +155,14 @@ public:
* @param _mode Tells whether to check for reading or writing capabilities
* @return true if the type is supported
**/
- static bool isSupported( const QString& _mimeType, Mode _mode = Writing );
+ static bool isSupported( const TQString& _mimeType, Mode _mode = Writing );
/**
* Returns the MIME type of @p _filename.
* @param _filename the filename to check
- * @return the MIME type of the file, or QString::null
+ * @return the MIME type of the file, or TQString::null
**/
- static QString mimeType( const QString& _filename );
+ static TQString mimeType( const TQString& _filename );
};
diff --git a/kio/kio/kimageiofactory.h b/kio/kio/kimageiofactory.h
index 1154ee586..2ffe58e60 100644
--- a/kio/kio/kimageiofactory.h
+++ b/kio/kio/kimageiofactory.h
@@ -21,21 +21,21 @@ class KIO_EXPORT KImageIOFormat : public KSycocaEntry
public:
typedef KSharedPtr<KImageIOFormat> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* Read a KImageIOFormat description file
*/
- KImageIOFormat( const QString & path);
+ KImageIOFormat( const TQString & path);
/**
* @internal construct a ImageIOFormat from a stream
*/
- KImageIOFormat( QDataStream& _str, int offset);
+ KImageIOFormat( TQDataStream& _str, int offset);
virtual ~KImageIOFormat();
- virtual QString name() const { return mType; }
+ virtual TQString name() const { return mType; }
virtual bool isValid() const { return true; }
@@ -43,34 +43,34 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* @internal
* Load the image format from a stream.
*/
- virtual void load(QDataStream& );
+ virtual void load(TQDataStream& );
/**
* @internal
* Save the image format to a stream.
*/
- virtual void save(QDataStream& );
+ virtual void save(TQDataStream& );
/**
* @internal
* Calls image IO function
*/
- void callLibFunc( bool read, QImageIO *);
+ void callLibFunc( bool read, TQImageIO *);
public:
- QString mType;
- QString mHeader;
- QString mFlags;
+ TQString mType;
+ TQString mHeader;
+ TQString mFlags;
bool bRead;
bool bWrite;
- QStringList mSuffices;
- QString mPattern;
- QString mMimetype;
- QString mLib;
- QStringList rPaths;
+ TQStringList mSuffices;
+ TQString mPattern;
+ TQString mMimetype;
+ TQString mLib;
+ TQStringList rPaths;
bool bLibLoaded;
- void (*mReadFunc)(QImageIO *);
- void (*mWriteFunc)(QImageIO *);
+ void (*mReadFunc)(TQImageIO *);
+ void (*mWriteFunc)(TQImageIO *);
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -105,12 +105,12 @@ protected: // Internal stuff
/**
* @internal Create pattern string
**/
- QString createPattern( KImageIO::Mode _mode);
+ TQString createPattern( KImageIO::Mode _mode);
/**
* @internal Not used.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ return 0; }
/**
@@ -121,19 +121,19 @@ protected: // Internal stuff
/**
* @internal Read an image
**/
- static void readImage( QImageIO *iio);
+ static void readImage( TQImageIO *iio);
/**
* @internal Write an image
**/
- static void writeImage( QImageIO *iio);
+ static void writeImage( TQImageIO *iio);
protected:
static KImageIOFactory *_self;
static KImageIOFormatList *formatList;
- QString mReadPattern;
- QString mWritePattern;
- QStringList rPath;
+ TQString mReadPattern;
+ TQString mWritePattern;
+ TQStringList rPath;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/klimitediodevice.h b/kio/kio/klimitediodevice.h
index f2bc1b908..035a3cd15 100644
--- a/kio/kio/klimitediodevice.h
+++ b/kio/kio/klimitediodevice.h
@@ -20,7 +20,7 @@
#define klimitediodevice_h
#include <kdebug.h>
-#include <qiodevice.h>
+#include <tqiodevice.h>
/**
* A readonly device that reads from an underlying device
* from a given point to another (e.g. to give access to a single
@@ -38,7 +38,7 @@ public:
* @param start where to start reading (position in bytes)
* @param length the length of the data to read (in bytes)
*/
- KLimitedIODevice( QIODevice *dev, int start, int length )
+ KLimitedIODevice( TQIODevice *dev, int start, int length )
: m_dev( dev ), m_start( start ), m_length( length )
{
//kdDebug(7005) << "KLimitedIODevice::KLimitedIODevice start=" << start << " length=" << length << endl;
@@ -93,7 +93,7 @@ public:
}
virtual bool atEnd() const { return m_dev->atEnd() || m_dev->at() >= m_start + m_length; }
private:
- QIODevice* m_dev;
+ TQIODevice* m_dev;
Q_ULONG m_start;
Q_ULONG m_length;
};
diff --git a/kio/kio/kmessageboxwrapper.h b/kio/kio/kmessageboxwrapper.h
index 4a9dc2d76..94a960135 100644
--- a/kio/kio/kmessageboxwrapper.h
+++ b/kio/kio/kmessageboxwrapper.h
@@ -30,9 +30,9 @@
class KIO_EXPORT KMessageBoxWrapper : public KMessageBox
{
public:
- static void error(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null)
+ static void error(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null)
{
if (KApplication::guiEnabled()) {
kapp->enableStyles();
@@ -41,9 +41,9 @@ public:
kdWarning() << text << endl;
}
- static void sorry(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null)
+ static void sorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null)
{
if (KApplication::guiEnabled()) {
kapp->enableStyles();
diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp
index 971dfd251..72b249249 100644
--- a/kio/kio/kmimemagic.cpp
+++ b/kio/kio/kmimemagic.cpp
@@ -19,7 +19,7 @@
#include "kmimemagic.h"
#include <kdebug.h>
#include <kapplication.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
@@ -27,7 +27,7 @@
#include <assert.h>
static int fsmagic(struct config_rec* conf, const char *fn, KDE_struct_stat *sb);
-static void process(struct config_rec* conf, const QString &);
+static void process(struct config_rec* conf, const TQString &);
static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes);
static int tagmagic(unsigned char *buf, int nbytes);
static int textmagic(struct config_rec* conf, unsigned char *, int);
@@ -63,8 +63,8 @@ void KMimeMagic::initStatic()
#include <time.h>
#include <utime.h>
#include <stdarg.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
//#define MIME_MAGIC_DEBUG_TABLE // untested
@@ -525,15 +525,15 @@ class KMimeMagicUtimeConf
public:
KMimeMagicUtimeConf()
{
- tmpDirs << QString::fromLatin1("/tmp"); // default value
+ tmpDirs << TQString::fromLatin1("/tmp"); // default value
// The trick is that we also don't want the user to override globally set
// directories. So we have to misuse KStandardDirs :}
- QStringList confDirs = KGlobal::dirs()->resourceDirs( "config" );
+ TQStringList confDirs = KGlobal::dirs()->resourceDirs( "config" );
if ( !confDirs.isEmpty() )
{
- QString globalConf = confDirs.last() + "kmimemagicrc";
- if ( QFile::exists( globalConf ) )
+ TQString globalConf = confDirs.last() + "kmimemagicrc";
+ if ( TQFile::exists( globalConf ) )
{
KSimpleConfig cfg( globalConf );
cfg.setGroup( "Settings" );
@@ -541,42 +541,42 @@ public:
}
if ( confDirs.count() > 1 )
{
- QString localConf = confDirs.first() + "kmimemagicrc";
- if ( QFile::exists( localConf ) )
+ TQString localConf = confDirs.first() + "kmimemagicrc";
+ if ( TQFile::exists( localConf ) )
{
KSimpleConfig cfg( localConf );
cfg.setGroup( "Settings" );
tmpDirs += cfg.readListEntry( "atimeDirs" );
}
}
- for ( QStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
{
- QString dir = *it;
+ TQString dir = *it;
if ( !dir.isEmpty() && dir[ dir.length()-1 ] != '/' )
(*it) += '/';
}
}
#if 0
// debug code
- for ( QStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
kdDebug(7018) << " atimeDir: " << *it << endl;
#endif
}
- bool restoreAccessTime( const QString & file ) const
+ bool restoreAccessTime( const TQString & file ) const
{
- QString dir = file.left( file.findRev( '/' ) );
+ TQString dir = file.left( file.findRev( '/' ) );
bool res = tmpDirs.contains( dir );
//kdDebug(7018) << "restoreAccessTime " << file << " dir=" << dir << " result=" << res << endl;
return res;
}
- QStringList tmpDirs;
+ TQStringList tmpDirs;
};
/* current config */
struct config_rec {
bool followLinks;
- QString resultBuf;
+ TQString resultBuf;
int accuracy;
struct magic *magic, /* head of magic config list */
@@ -646,18 +646,18 @@ int KMimeMagic::parse_line(char *line, int *rule, int lineno)
/*
* apprentice - load configuration from the magic file.
*/
-int KMimeMagic::apprentice( const QString& magicfile )
+int KMimeMagic::apprentice( const TQString& magicfile )
{
FILE *f;
char line[BUFSIZ + 1];
int errs = 0;
int lineno;
int rule = 0;
- QCString fname;
+ TQCString fname;
if (magicfile.isEmpty())
return -1;
- fname = QFile::encodeName(magicfile);
+ fname = TQFile::encodeName(magicfile);
f = fopen(fname, "r");
if (f == NULL) {
kdError(7018) << "can't read magic file " << fname.data() << ": " << strerror(errno) << endl;
@@ -1351,14 +1351,14 @@ mcheck(union VALUETYPE *p, struct magic *m)
* fixed-size buffer to begin processing the contents.
*/
-void process(struct config_rec* conf, const QString & fn)
+void process(struct config_rec* conf, const TQString & fn)
{
int fd = 0;
unsigned char buf[HOWMANY + 1]; /* one extra for terminating '\0' */
KDE_struct_stat sb;
int nbytes = 0; /* number of bytes read from a datafile */
int tagbytes = 0; /* size of prefixed tag */
- QCString fileName = QFile::encodeName( fn );
+ TQCString fileName = TQFile::encodeName( fn );
/*
* first try judging the file based on its filesystem status
@@ -1518,7 +1518,7 @@ fsmagic(struct config_rec* conf, const char *fn, KDE_struct_stat *sb)
strcpy(buf, tmp);
}
if (conf->followLinks)
- process( conf, QFile::decodeName( buf ) );
+ process( conf, TQFile::decodeName( buf ) );
else
conf->resultBuf = MIME_INODE_LINK;
return 1;
@@ -1898,27 +1898,27 @@ static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes)
#endif
if (jonly > 1 && foundClass) {
// At least two java-only tokens have matched, including "class"
- conf->resultBuf = QString(types[P_JAVA].type);
+ conf->resultBuf = TQString(types[P_JAVA].type);
return 1;
}
if (jconly > 1) {
// At least two non-C (only C++ or Java) token have matched.
if (typecount[P_JAVA] < typecount[P_CPP])
- conf->resultBuf = QString(types[P_CPP].type);
+ conf->resultBuf = TQString(types[P_CPP].type);
else
- conf->resultBuf = QString(types[P_JAVA].type);
+ conf->resultBuf = TQString(types[P_JAVA].type);
return 1;
}
if (conly + cpponly > 1) {
// Either C or C++.
if (cpponly > 0)
- conf->resultBuf = QString(types[P_CPP].type);
+ conf->resultBuf = TQString(types[P_CPP].type);
else
- conf->resultBuf = QString(types[P_C].type);
+ conf->resultBuf = TQString(types[P_C].type);
return 1;
}
if (objconly > 0) {
- conf->resultBuf = QString(types[P_OBJC].type);
+ conf->resultBuf = TQString(types[P_OBJC].type);
return 1;
}
}
@@ -1952,7 +1952,7 @@ static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes)
#ifdef DEBUG_MIMEMAGIC
kdDebug(7018) << "mostaccurate=" << mostaccurate << " pcts=" << pcts[mostaccurate] << " pctsum=" << pctsum << " accuracy=" << conf->accuracy << endl;
#endif
- conf->resultBuf = QString(types[mostaccurate].type);
+ conf->resultBuf = TQString(types[mostaccurate].type);
return 1;
}
}
@@ -2118,21 +2118,21 @@ from_oct(int digs, char *where)
KMimeMagic::KMimeMagic()
{
// Magic file detection init
- QString mimefile = locate( "mime", "magic" );
+ TQString mimefile = locate( "mime", "magic" );
init( mimefile );
// Add snippets from share/config/magic/*
- QStringList snippets = KGlobal::dirs()->findAllResources( "config", "magic/*.magic", true );
- for ( QStringList::Iterator it = snippets.begin() ; it != snippets.end() ; ++it )
+ TQStringList snippets = KGlobal::dirs()->findAllResources( "config", "magic/*.magic", true );
+ for ( TQStringList::Iterator it = snippets.begin() ; it != snippets.end() ; ++it )
if ( !mergeConfig( *it ) )
kdWarning() << k_funcinfo << "Failed to parse " << *it << endl;
}
-KMimeMagic::KMimeMagic(const QString & _configfile)
+KMimeMagic::KMimeMagic(const TQString & _configfile)
{
init( _configfile );
}
-void KMimeMagic::init( const QString& _configfile )
+void KMimeMagic::init( const TQString& _configfile )
{
int result;
conf = new config_rec;
@@ -2173,7 +2173,7 @@ KMimeMagic::~KMimeMagic()
}
bool
-KMimeMagic::mergeConfig(const QString & _configfile)
+KMimeMagic::mergeConfig(const TQString & _configfile)
{
kdDebug(7018) << k_funcinfo << _configfile << endl;
int result;
@@ -2214,11 +2214,11 @@ KMimeMagic::setFollowLinks( bool _enable )
}
KMimeMagicResult *
-KMimeMagic::findBufferType(const QByteArray &array)
+KMimeMagic::findBufferType(const TQByteArray &array)
{
unsigned char buf[HOWMANY + 1]; /* one extra for terminating '\0' */
- conf->resultBuf = QString::null;
+ conf->resultBuf = TQString::null;
if ( !magicResult )
magicResult = new KMimeMagicResult();
magicResult->setInvalid();
@@ -2242,9 +2242,9 @@ KMimeMagic::findBufferType(const QByteArray &array)
}
static void
-refineResult(KMimeMagicResult *r, const QString & _filename)
+refineResult(KMimeMagicResult *r, const TQString & _filename)
{
- QString tmp = r->mimeType();
+ TQString tmp = r->mimeType();
if (tmp.isEmpty())
return;
if ( tmp == "text/x-c" || tmp == "text/x-objc" )
@@ -2279,8 +2279,8 @@ refineResult(KMimeMagicResult *r, const QString & _filename)
}
KMimeMagicResult *
-KMimeMagic::findBufferFileType( const QByteArray &data,
- const QString &fn)
+KMimeMagic::findBufferFileType( const TQByteArray &data,
+ const TQString &fn)
{
KMimeMagicResult * r = findBufferType( data );
refineResult(r, fn);
@@ -2290,12 +2290,12 @@ KMimeMagic::findBufferFileType( const QByteArray &data,
/*
* Find the content-type of the given file.
*/
-KMimeMagicResult* KMimeMagic::findFileType(const QString & fn)
+KMimeMagicResult* KMimeMagic::findFileType(const TQString & fn)
{
#ifdef DEBUG_MIMEMAGIC
kdDebug(7018) << "KMimeMagic::findFileType " << fn << endl;
#endif
- conf->resultBuf = QString::null;
+ conf->resultBuf = TQString::null;
if ( !magicResult )
magicResult = new KMimeMagicResult();
diff --git a/kio/kio/kmimemagic.h b/kio/kio/kmimemagic.h
index 377594043..d73dd306a 100644
--- a/kio/kio/kmimemagic.h
+++ b/kio/kio/kmimemagic.h
@@ -30,7 +30,7 @@
#ifndef KMIMEMAGIC_H
#define KMIMEMAGIC_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class KMimeMagic; // see below (read this one first)
@@ -52,7 +52,7 @@ public:
/**
* Retrieve the mimetype (e.g. "text/html") of the file or buffer parsed.
*/
- QString mimeType() const { return m_strMimeType; }
+ TQString mimeType() const { return m_strMimeType; }
/**
* Retrieve the accuracy of the matching.
*/
@@ -65,12 +65,12 @@ public:
/////////////////
// Internal functions only
/////////////////
- void setMimeType( const QString& _mime ) { m_strMimeType = _mime; }
+ void setMimeType( const TQString& _mime ) { m_strMimeType = _mime; }
void setAccuracy( int _accuracy ) { m_iAccuracy = _accuracy; }
- void setInvalid() { m_strMimeType = QString::null; }
+ void setInvalid() { m_strMimeType = TQString::null; }
protected:
- QString m_strMimeType;
+ TQString m_strMimeType;
int m_iAccuracy;
};
@@ -111,7 +111,7 @@ public:
/**
* Create a parser and initialize it with the given config file.
*/
- KMimeMagic( const QString & configFile );
+ KMimeMagic( const TQString & configFile );
/**
* Destroy the parser.
@@ -124,7 +124,7 @@ public:
*
* @return @p true on success.
*/
- bool mergeConfig( const QString & configFile );
+ bool mergeConfig( const TQString & configFile );
/**
* Merge an existing parse table with the data from the
@@ -153,7 +153,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult* findFileType( const QString & _filename );
+ KMimeMagicResult* findFileType( const TQString & _filename );
/**
* Same functionality as above, except data is not
@@ -167,7 +167,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult* findBufferType( const QByteArray &p );
+ KMimeMagicResult* findBufferType( const TQByteArray &p );
/**
* Same functionality as findBufferType() but with
@@ -183,7 +183,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult * findBufferFileType( const QByteArray &, const QString & filename );
+ KMimeMagicResult * findBufferFileType( const TQByteArray &, const TQString & filename );
/**
* Returns a pointer to the unique KMimeMagic instance in this process.
@@ -200,15 +200,15 @@ protected:
static KMimeMagic* s_pSelf;
private:
- void init( const QString& configFile );
+ void init( const TQString& configFile );
bool bunused;
- QString sunused;
+ TQString sunused;
int parse_line(char *line, int *rule, int lineno);
int parse(char *, int);
int buff_apprentice(char*buff);
- int apprentice(const QString &configFile);
+ int apprentice(const TQString &configFile);
struct config_rec *conf; // this is also our "d pointer"
int iunused;
diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp
index c6f0aaea9..af4243a53 100644
--- a/kio/kio/kmimetype.cpp
+++ b/kio/kio/kmimetype.cpp
@@ -40,8 +40,8 @@
#include "kautomount.h"
#include <kdirnotify_stub.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kmessageboxwrapper.h>
#include <dcopclient.h>
@@ -60,7 +60,7 @@
#include <kde_file.h>
template class KSharedPtr<KMimeType>;
-template class QValueList<KMimeType::Ptr>;
+template class TQValueList<KMimeType::Ptr>;
KMimeType::Ptr KMimeType::s_pDefaultType = 0L;
bool KMimeType::s_bChecked = false;
@@ -80,9 +80,9 @@ void KMimeType::buildDefaultType()
{
errorMissingMimeType( defaultMimeType() );
KStandardDirs stdDirs;
- QString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop";
+ TQString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop";
s_pDefaultType = new KMimeType( sDefaultMimeType, defaultMimeType(),
- "unknown", "mime", QStringList() );
+ "unknown", "mime", TQStringList() );
}
}
@@ -131,14 +131,14 @@ void KMimeType::checkEssentialMimeTypes()
errorMissingMimeType( "application/x-desktop" );
}
-void KMimeType::errorMissingMimeType( const QString& _type )
+void KMimeType::errorMissingMimeType( const TQString& _type )
{
- QString tmp = i18n( "Could not find mime type\n%1" ).arg( _type );
+ TQString tmp = i18n( "Could not find mime type\n%1" ).arg( _type );
KMessageBoxWrapper::sorry( 0, tmp );
}
-KMimeType::Ptr KMimeType::mimeType( const QString& _name )
+KMimeType::Ptr KMimeType::mimeType( const TQString& _name )
{
KServiceType * mime = KServiceTypeFactory::self()->findServiceTypeByName( _name );
@@ -166,7 +166,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
bool _is_local_file, bool _fast_mode )
{
checkEssentialMimeTypes();
- QString path = _url.path();
+ TQString path = _url.path();
if ( !_fast_mode && !_is_local_file && _url.isLocalFile() )
_is_local_file = true;
@@ -174,7 +174,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_fast_mode && _is_local_file && (_mode == 0 || _mode == (mode_t)-1) )
{
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(path), &buff ) != -1 )
+ if ( KDE_stat( TQFile::encodeName(path), &buff ) != -1 )
_mode = buff.st_mode;
}
@@ -185,7 +185,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
// are allowed to enter the directory
if ( _is_local_file )
{
- if ( access( QFile::encodeName(path), R_OK ) == -1 )
+ if ( access( TQFile::encodeName(path), R_OK ) == -1 )
return mimeType( "inode/directory-locked" );
}
return mimeType( "inode/directory" );
@@ -202,9 +202,9 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_is_local_file && S_ISREG( _mode ) && ( _mode & ( S_IXUSR | S_IXGRP | S_IXOTH ) ) )
return mimeType( "application/x-executable" );
- QString fileName ( _url.fileName() );
+ TQString fileName ( _url.fileName() );
- static const QString& slash = KGlobal::staticQString("/");
+ static const TQString& slash = KGlobal::staticQString("/");
if ( ! fileName.isNull() && !path.endsWith( slash ) )
{
// Try to find it out by looking at the filename
@@ -230,9 +230,9 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
}
}
- static const QString& dotdesktop = KGlobal::staticQString(".desktop");
- static const QString& dotkdelnk = KGlobal::staticQString(".kdelnk");
- static const QString& dotdirectory = KGlobal::staticQString(".directory");
+ static const TQString& dotdesktop = KGlobal::staticQString(".desktop");
+ static const TQString& dotkdelnk = KGlobal::staticQString(".kdelnk");
+ static const TQString& dotdirectory = KGlobal::staticQString(".directory");
// Another filename binding, hardcoded, is .desktop:
if ( fileName.endsWith( dotdesktop ) )
@@ -249,7 +249,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_is_local_file || _fast_mode )
{
- QString def = KProtocolInfo::defaultMimetype( _url );
+ TQString def = KProtocolInfo::defaultMimetype( _url );
if ( !def.isEmpty() && def != defaultMimeType() )
{
// The protocol says it always returns a given mimetype (e.g. text/html for "man:")
@@ -265,7 +265,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
{
// Assume inode/directory, if the protocol supports listing.
if ( KProtocolInfo::supportsListing( _url ) )
- return mimeType( QString::fromLatin1("inode/directory") );
+ return mimeType( TQString::fromLatin1("inode/directory") );
else
return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/"
}
@@ -276,7 +276,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
}
// Do some magic for local files
- //kdDebug(7009) << QString("Mime Type finding for '%1'").arg(path) << endl;
+ //kdDebug(7009) << TQString("Mime Type finding for '%1'").arg(path) << endl;
KMimeMagicResult* result = KMimeMagic::self()->findFileType( path );
// If we still did not find it, we must assume the default mime type
@@ -296,19 +296,19 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
return mime;
}
-KMimeType::Ptr KMimeType::diagnoseFileName(const QString &fileName, QString &pattern)
+KMimeType::Ptr KMimeType::diagnoseFileName(const TQString &fileName, TQString &pattern)
{
return KServiceTypeFactory::self()->findFromPattern( fileName, &pattern );
}
-KMimeType::Ptr KMimeType::findByPath( const QString& path, mode_t mode, bool fast_mode )
+KMimeType::Ptr KMimeType::findByPath( const TQString& path, mode_t mode, bool fast_mode )
{
KURL u;
u.setPath(path);
return findByURL( u, mode, true, fast_mode );
}
-KMimeType::Ptr KMimeType::findByContent( const QByteArray &data, int *accuracy )
+KMimeType::Ptr KMimeType::findByContent( const TQByteArray &data, int *accuracy )
{
KMimeMagicResult *result = KMimeMagic::self()->findBufferType(data);
if (accuracy)
@@ -316,7 +316,7 @@ KMimeType::Ptr KMimeType::findByContent( const QByteArray &data, int *accuracy )
return mimeType( result->mimeType() );
}
-KMimeType::Ptr KMimeType::findByFileContent( const QString &fileName, int *accuracy )
+KMimeType::Ptr KMimeType::findByFileContent( const TQString &fileName, int *accuracy )
{
KMimeMagicResult *result = KMimeMagic::self()->findFileType(fileName);
if (accuracy)
@@ -327,21 +327,21 @@ KMimeType::Ptr KMimeType::findByFileContent( const QString &fileName, int *accur
#define GZIP_MAGIC1 0x1f
#define GZIP_MAGIC2 0x8b
-KMimeType::Format KMimeType::findFormatByFileContent( const QString &fileName )
+KMimeType::Format KMimeType::findFormatByFileContent( const TQString &fileName )
{
KMimeType::Format result;
result.compression = Format::NoCompression;
KMimeType::Ptr mime = findByPath(fileName);
result.text = mime->name().startsWith("text/");
- QVariant v = mime->property("X-KDE-text");
+ TQVariant v = mime->property("X-KDE-text");
if (v.isValid())
result.text = v.toBool();
if (mime->name().startsWith("inode/"))
return result;
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
unsigned char buf[10+1];
@@ -352,14 +352,14 @@ KMimeType::Format KMimeType::findFormatByFileContent( const QString &fileName )
return result;
}
-KMimeType::KMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- const QString& _comment, const QStringList& _patterns )
+KMimeType::KMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ const TQString& _comment, const TQStringList& _patterns )
: KServiceType( _fullpath, _type, _icon, _comment )
{
m_lstPatterns = _patterns;
}
-KMimeType::KMimeType( const QString & _fullpath ) : KServiceType( _fullpath )
+KMimeType::KMimeType( const TQString & _fullpath ) : KServiceType( _fullpath )
{
KDesktopFile _cfg( _fullpath, true );
init ( &_cfg );
@@ -382,47 +382,47 @@ void KMimeType::init( KDesktopFile * config )
m_lstPatterns = config->readListEntry( "Patterns", ';' );
// Read the X-KDE-AutoEmbed setting and store it in the properties map
- QString XKDEAutoEmbed = QString::fromLatin1("X-KDE-AutoEmbed");
+ TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed");
if ( config->hasKey( XKDEAutoEmbed ) )
- m_mapProps.insert( XKDEAutoEmbed, QVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
+ m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
- QString XKDEText = QString::fromLatin1("X-KDE-text");
+ TQString XKDEText = TQString::fromLatin1("X-KDE-text");
if ( config->hasKey( XKDEText ) )
m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) );
- QString XKDEIsAlso = QString::fromLatin1("X-KDE-IsAlso");
+ TQString XKDEIsAlso = TQString::fromLatin1("X-KDE-IsAlso");
if ( config->hasKey( XKDEIsAlso ) ) {
- QString inherits = config->readEntry( XKDEIsAlso );
+ TQString inherits = config->readEntry( XKDEIsAlso );
if ( inherits != name() )
m_mapProps.insert( XKDEIsAlso, inherits );
else
kdWarning(7009) << "Error: " << inherits << " inherits from itself!!!!" << endl;
}
- QString XKDEPatternsAccuracy = QString::fromLatin1("X-KDE-PatternsAccuracy");
+ TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy");
if ( config->hasKey( XKDEPatternsAccuracy ) )
m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) );
}
-KMimeType::KMimeType( QDataStream& _str, int offset ) : KServiceType( _str, offset )
+KMimeType::KMimeType( TQDataStream& _str, int offset ) : KServiceType( _str, offset )
{
loadInternal( _str ); // load our specific stuff
}
-void KMimeType::load( QDataStream& _str )
+void KMimeType::load( TQDataStream& _str )
{
KServiceType::load( _str );
loadInternal( _str );
}
-void KMimeType::loadInternal( QDataStream& _str )
+void KMimeType::loadInternal( TQDataStream& _str )
{
- // kdDebug(7009) << "KMimeType::load( QDataStream& ) : loading list of patterns" << endl;
+ // kdDebug(7009) << "KMimeType::load( TQDataStream& ) : loading list of patterns" << endl;
_str >> m_lstPatterns;
}
-void KMimeType::save( QDataStream& _str )
+void KMimeType::save( TQDataStream& _str )
{
KServiceType::save( _str );
// Warning adding/removing fields here involves a binary incompatible change - update version
@@ -430,17 +430,17 @@ void KMimeType::save( QDataStream& _str )
_str << m_lstPatterns;
}
-QVariant KMimeType::property( const QString& _name ) const
+TQVariant KMimeType::property( const TQString& _name ) const
{
if ( _name == "Patterns" )
- return QVariant( m_lstPatterns );
+ return TQVariant( m_lstPatterns );
return KServiceType::property( _name );
}
-QStringList KMimeType::propertyNames() const
+TQStringList KMimeType::propertyNames() const
{
- QStringList res = KServiceType::propertyNames();
+ TQStringList res = KServiceType::propertyNames();
res.append( "Patterns" );
return res;
@@ -450,14 +450,14 @@ KMimeType::~KMimeType()
{
}
-QPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
- QString * _path ) const
+TQPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
+ TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName=icon( QString::null, false );
+ TQString iconName=icon( TQString::null, false );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -466,14 +466,14 @@ QPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
}
-QPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
- int _state, QString * _path ) const
+TQPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
+ int _state, TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName=icon( _url, _url.isLocalFile() );
+ TQString iconName=icon( _url, _url.isLocalFile() );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -482,15 +482,15 @@ QPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_siz
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
}
-QPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _group,
- int _force_size, int _state, QString * _path )
+TQPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _group,
+ int _force_size, int _state, TQString * _path )
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName = iconForURL( _url, _mode );
+ TQString iconName = iconForURL( _url, _mode );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -500,13 +500,13 @@ QPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _
}
-QString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
+TQString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
{
const KMimeType::Ptr mt = findByURL( _url, _mode, _url.isLocalFile(),
false /*HACK*/);
- static const QString& unknown = KGlobal::staticQString("unknown");
- const QString mimeTypeIcon = mt->icon( _url, _url.isLocalFile() );
- QString i = mimeTypeIcon;
+ static const TQString& unknown = KGlobal::staticQString("unknown");
+ const TQString mimeTypeIcon = mt->icon( _url, _url.isLocalFile() );
+ TQString i = mimeTypeIcon;
// if we don't find an icon, maybe we can use the one for the protocol
if ( i == unknown || i.isEmpty() || mt == defaultMimeTypePtr()
@@ -525,7 +525,7 @@ QString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
return i;
}
-QString KMimeType::favIconForURL( const KURL& url )
+TQString KMimeType::favIconForURL( const KURL& url )
{
// this method will be called quite often, so better not read the config
// again and again.
@@ -540,27 +540,27 @@ QString KMimeType::favIconForURL( const KURL& url )
if ( url.isLocalFile() || !url.protocol().startsWith("http")
|| !useFavIcons )
- return QString::null;
+ return TQString::null;
DCOPRef kded( "kded", "favicons" );
DCOPReply result = kded.call( "iconForURL(KURL)", url );
if ( result.isValid() )
return result;
- return QString::null;
+ return TQString::null;
}
-QString KMimeType::parentMimeType() const
+TQString KMimeType::parentMimeType() const
{
- QVariant v = property("X-KDE-IsAlso");
+ TQVariant v = property("X-KDE-IsAlso");
return v.toString();
}
-bool KMimeType::is( const QString& mimeTypeName ) const
+bool KMimeType::is( const TQString& mimeTypeName ) const
{
if ( name() == mimeTypeName )
return true;
- QString st = parentMimeType();
+ TQString st = parentMimeType();
//if (st.isEmpty()) kdDebug(7009)<<"Parent mimetype is empty"<<endl;
while ( !st.isEmpty() )
{
@@ -575,7 +575,7 @@ bool KMimeType::is( const QString& mimeTypeName ) const
}
int KMimeType::patternsAccuracy() const {
- QVariant v = property("X-KDE-PatternsAccuracy");
+ TQVariant v = property("X-KDE-PatternsAccuracy");
if (!v.isValid()) return 100;
else
return v.toInt();
@@ -588,7 +588,7 @@ int KMimeType::patternsAccuracy() const {
*
******************************************************/
-QString KFolderType::icon( const QString& _url, bool _is_local ) const
+TQString KFolderType::icon( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::icon( _url, _is_local );
@@ -596,7 +596,7 @@ QString KFolderType::icon( const QString& _url, bool _is_local ) const
return KFolderType::icon( KURL(_url), _is_local );
}
-QString KFolderType::icon( const KURL& _url, bool _is_local ) const
+TQString KFolderType::icon( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::icon( _url, _is_local );
@@ -604,7 +604,7 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
KURL u( _url );
u.addPath( ".directory" );
- QString icon;
+ TQString icon;
// using KStandardDirs as this one checks for path being
// a file instead of a directory
if ( KStandardDirs::exists( u.path() ) )
@@ -612,17 +612,17 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
icon = cfg.readEntry( "Icon" );
- QString empty_icon = cfg.readEntry( "EmptyIcon" );
+ TQString empty_icon = cfg.readEntry( "EmptyIcon" );
if ( !empty_icon.isEmpty() )
{
bool isempty = false;
DIR *dp = 0L;
struct dirent *ep;
- dp = opendir( QFile::encodeName(_url.path()) );
+ dp = opendir( TQFile::encodeName(_url.path()) );
if ( dp )
{
- QValueList<QCString> entries;
+ TQValueList<TQCString> entries;
// Note that readdir isn't guaranteed to return "." and ".." first (#79826)
ep=readdir( dp ); if ( ep ) entries.append( ep->d_name );
ep=readdir( dp ); if ( ep ) entries.append( ep->d_name );
@@ -661,7 +661,7 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
return icon;
}
-QString KFolderType::comment( const QString& _url, bool _is_local ) const
+TQString KFolderType::comment( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -669,7 +669,7 @@ QString KFolderType::comment( const QString& _url, bool _is_local ) const
return KFolderType::comment( KURL(_url), _is_local );
}
-QString KFolderType::comment( const KURL& _url, bool _is_local ) const
+TQString KFolderType::comment( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::comment( _url, _is_local );
@@ -679,7 +679,7 @@ QString KFolderType::comment( const KURL& _url, bool _is_local ) const
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
- QString comment = cfg.readEntry( "Comment" );
+ TQString comment = cfg.readEntry( "Comment" );
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -692,7 +692,7 @@ QString KFolderType::comment( const KURL& _url, bool _is_local ) const
*
******************************************************/
-QString KDEDesktopMimeType::icon( const QString& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::icon( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::icon( _url, _is_local );
@@ -701,32 +701,32 @@ QString KDEDesktopMimeType::icon( const QString& _url, bool _is_local ) const
return icon( u, _is_local );
}
-QString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::icon( _url, _is_local );
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString icon = cfg.readEntry( "Icon" );
- QString type = cfg.readEntry( "Type" );
+ TQString icon = cfg.readEntry( "Icon" );
+ TQString type = cfg.readEntry( "Type" );
if ( type == "FSDevice" || type == "FSDev") // need to provide FSDev for
// backwards compatibility
{
- QString unmount_icon = cfg.readEntry( "UnmountIcon" );
- QString dev = cfg.readEntry( "Dev" );
+ TQString unmount_icon = cfg.readEntry( "UnmountIcon" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( !icon.isEmpty() && !unmount_icon.isEmpty() && !dev.isEmpty() )
{
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// Is the device not mounted ?
if ( mp.isNull() )
return unmount_icon;
}
} else if ( type == "Link" ) {
- const QString emptyIcon = cfg.readEntry( "EmptyIcon" );
+ const TQString emptyIcon = cfg.readEntry( "EmptyIcon" );
if ( !emptyIcon.isEmpty() ) {
- const QString u = cfg.readPathEntry( "URL" );
+ const TQString u = cfg.readPathEntry( "URL" );
const KURL url( u );
if ( url.protocol() == "trash" ) {
// We need to find if the trash is empty, preferrably without using a KIO job.
@@ -746,11 +746,11 @@ QString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
return icon;
}
-QPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
- int _state, QString * _path ) const
+TQPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
+ int _state, TQString * _path ) const
{
- QString _icon = icon( _url, _url.isLocalFile() );
- QPixmap pix = KGlobal::iconLoader()->loadIcon( _icon, _group,
+ TQString _icon = icon( _url, _url.isLocalFile() );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon( _icon, _group,
_force_size, _state, _path, false );
if ( pix.isNull() )
pix = KGlobal::iconLoader()->loadIcon( "unknown", _group,
@@ -758,7 +758,7 @@ QPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _
return pix;
}
-QString KDEDesktopMimeType::comment( const QString& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::comment( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -767,14 +767,14 @@ QString KDEDesktopMimeType::comment( const QString& _url, bool _is_local ) const
return comment( u, _is_local );
}
-QString KDEDesktopMimeType::comment( const KURL& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::comment( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::comment( _url, _is_local );
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString comment = cfg.readEntry( "Comment" );
+ TQString comment = cfg.readEntry( "Comment" );
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -790,10 +790,10 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
if ( type.isEmpty() )
{
- QString tmp = i18n("The desktop entry file %1 "
+ TQString tmp = i18n("The desktop entry file %1 "
"has no Type=... entry.").arg(u.path() );
KMessageBoxWrapper::error( 0, tmp);
return 0;
@@ -814,7 +814,7 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
return runMimeType( u, cfg );
- QString tmp = i18n("The desktop entry of type\n%1\nis unknown.").arg( type );
+ TQString tmp = i18n("The desktop entry of type\n%1\nis unknown.").arg( type );
KMessageBoxWrapper::error( 0, tmp);
return 0;
@@ -824,31 +824,31 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
{
pid_t retval = 0;
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
KMessageBoxWrapper::error( 0, tmp);
return retval;
}
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// Is the device already mounted ?
if ( !mp.isNull() )
{
KURL mpURL;
mpURL.setPath( mp );
// Open a new window
- retval = KRun::runURL( mpURL, QString::fromLatin1("inode/directory") );
+ retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") );
}
else
{
bool ro = cfg.readBoolEntry( "ReadOnly", false );
- QString fstype = cfg.readEntry( "FSType" );
+ TQString fstype = cfg.readEntry( "FSType" );
if ( fstype == "Default" ) // KDE-1 thing
- fstype = QString::null;
- QString point = cfg.readEntry( "MountPoint" );
+ fstype = TQString::null;
+ TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN
(void) new KAutoMount( ro, fstype, dev, point, _url.path() );
#endif
@@ -858,7 +858,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
return retval;
}
-pid_t KDEDesktopMimeType::runApplication( const KURL& , const QString & _serviceFile )
+pid_t KDEDesktopMimeType::runApplication( const KURL& , const TQString & _serviceFile )
{
KService s( _serviceFile );
if ( !s.isValid() )
@@ -871,10 +871,10 @@ pid_t KDEDesktopMimeType::runApplication( const KURL& , const QString & _service
pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg )
{
- QString u = cfg.readPathEntry( "URL" );
+ TQString u = cfg.readPathEntry( "URL" );
if ( u.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type Link but has no URL=... entry.").arg( _url.prettyURL() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type Link but has no URL=... entry.").arg( _url.prettyURL() );
KMessageBoxWrapper::error( 0, tmp );
return 0;
}
@@ -885,7 +885,7 @@ pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg )
// X-KDE-LastOpenedWith holds the service desktop entry name that
// was should be preferred for opening this URL if possible.
// This is used by the Recent Documents menu for instance.
- QString lastOpenedWidth = cfg.readEntry( "X-KDE-LastOpenedWith" );
+ TQString lastOpenedWidth = cfg.readEntry( "X-KDE-LastOpenedWith" );
if ( !lastOpenedWidth.isEmpty() )
run->setPreferredService( lastOpenedWidth );
@@ -897,7 +897,7 @@ pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const KSimpleConfig & )
// Hmm, can't really use keditfiletype since we might be looking
// at the global file, or at a file not in share/mimelnk...
- QStringList args;
+ TQStringList args;
args << "openProperties";
args << url.path();
@@ -911,31 +911,31 @@ pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const KSimpleConfig & )
return p.pid();
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( const KURL& _url )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( const KURL& _url )
{
- QValueList<Service> result;
+ TQValueList<Service> result;
if ( !_url.isLocalFile() )
return result;
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
if ( type.isEmpty() )
return result;
if ( type == "FSDevice" )
{
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
KMessageBoxWrapper::error( 0, tmp);
}
else
{
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// not mounted ?
if ( mp.isEmpty() )
{
@@ -964,20 +964,20 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( con
return result;
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, bool bLocalFiles )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, bool bLocalFiles )
{
KSimpleConfig cfg( path, true );
return userDefinedServices( path, cfg, bLocalFiles );
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, KConfig& cfg, bool bLocalFiles )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles )
{
return userDefinedServices( path, cfg, bLocalFiles, KURL::List() );
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, KConfig& cfg, bool bLocalFiles, const KURL::List & file_list )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles, const KURL::List & file_list )
{
- QValueList<Service> result;
+ TQValueList<Service> result;
cfg.setDesktopGroup();
@@ -986,35 +986,35 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( cfg.hasKey( "TryExec" ) )
{
- QString tryexec = cfg.readPathEntry( "TryExec" );
- QString exe = KStandardDirs::findExe( tryexec );
+ TQString tryexec = cfg.readPathEntry( "TryExec" );
+ TQString exe = KStandardDirs::findExe( tryexec );
if (exe.isEmpty()) {
return result;
}
}
- QStringList keys;
+ TQStringList keys;
if( cfg.hasKey( "X-KDE-GetActionMenu" )) {
- QString dcopcall = cfg.readEntry( "X-KDE-GetActionMenu" );
- const QCString app = dcopcall.section(' ', 0,0).utf8();
+ TQString dcopcall = cfg.readEntry( "X-KDE-GetActionMenu" );
+ const TQCString app = dcopcall.section(' ', 0,0).utf8();
- QByteArray dataToSend;
- QDataStream dataStream(dataToSend, IO_WriteOnly);
+ TQByteArray dataToSend;
+ TQDataStream dataStream(dataToSend, IO_WriteOnly);
dataStream << file_list;
- QCString replyType;
- QByteArray replyData;
- QCString object = dcopcall.section(' ', 1,-2).utf8();
- QString function = dcopcall.section(' ', -1);
+ TQCString replyType;
+ TQByteArray replyData;
+ TQCString object = dcopcall.section(' ', 1,-2).utf8();
+ TQString function = dcopcall.section(' ', -1);
if(!function.endsWith("(KURL::List)")) {
kdWarning() << "Desktop file " << path << " contains an invalid X-KDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl;
} else {
if(kapp->dcopClient()->call( app, object,
function.utf8(),
dataToSend, replyType, replyData, true, -1)
- && replyType == "QStringList" ) {
+ && replyType == "TQStringList" ) {
- QDataStream dataStreamIn(replyData, IO_ReadOnly);
+ TQDataStream dataStreamIn(replyData, IO_ReadOnly);
dataStreamIn >> keys;
}
}
@@ -1025,13 +1025,13 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( keys.count() == 0 )
return result;
- QStringList::ConstIterator it = keys.begin();
- QStringList::ConstIterator end = keys.end();
+ TQStringList::ConstIterator it = keys.begin();
+ TQStringList::ConstIterator end = keys.end();
for ( ; it != end; ++it )
{
//kdDebug(7009) << "CURRENT KEY = " << (*it) << endl;
- QString group = *it;
+ TQString group = *it;
if (group == "_SEPARATOR_")
{
@@ -1052,7 +1052,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
bInvalidMenu = true;
else
{
- QString exec = cfg.readPathEntry( "Exec" );
+ TQString exec = cfg.readPathEntry( "Exec" );
if ( bLocalFiles || exec.contains("%U") || exec.contains("%u") )
{
Service s;
@@ -1070,7 +1070,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( bInvalidMenu )
{
- QString tmp = i18n("The desktop entry file\n%1\n has an invalid menu entry\n%2.").arg( path ).arg( *it );
+ TQString tmp = i18n("The desktop entry file\n%1\n has an invalid menu entry\n%2.").arg( path ).arg( *it );
KMessageBoxWrapper::error( 0, tmp );
}
}
@@ -1078,7 +1078,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
return result;
}
-void KDEDesktopMimeType::executeService( const QString& _url, KDEDesktopMimeType::Service& _service )
+void KDEDesktopMimeType::executeService( const TQString& _url, KDEDesktopMimeType::Service& _service )
{
KURL u;
u.setPath(_url);
@@ -1104,19 +1104,19 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
else if ( _service.m_type == ST_MOUNT || _service.m_type == ST_UNMOUNT )
{
Q_ASSERT( urls.count() == 1 );
- QString path = urls.first().path();
+ TQString path = urls.first().path();
//kdDebug(7009) << "MOUNT&UNMOUNT" << endl;
KSimpleConfig cfg( path, true );
cfg.setDesktopGroup();
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( path );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( path );
KMessageBoxWrapper::error( 0, tmp );
return;
}
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
if ( _service.m_type == ST_MOUNT )
{
@@ -1128,10 +1128,10 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
}
bool ro = cfg.readBoolEntry( "ReadOnly", false );
- QString fstype = cfg.readEntry( "FSType" );
+ TQString fstype = cfg.readEntry( "FSType" );
if ( fstype == "Default" ) // KDE-1 thing
- fstype = QString::null;
- QString point = cfg.readEntry( "MountPoint" );
+ fstype = TQString::null;
+ TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN
(void)new KAutoMount( ro, fstype, dev, point, path, false );
#endif
@@ -1151,9 +1151,9 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
assert( 0 );
}
-const QString & KMimeType::defaultMimeType()
+const TQString & KMimeType::defaultMimeType()
{
- static const QString & s_strDefaultMimeType =
+ static const TQString & s_strDefaultMimeType =
KGlobal::staticQString( "application/octet-stream" );
return s_strDefaultMimeType;
}
diff --git a/kio/kio/kmimetype.h b/kio/kio/kmimetype.h
index 0e1477c64..22f9b72ef 100644
--- a/kio/kio/kmimetype.h
+++ b/kio/kio/kmimetype.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qpixmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqpixmap.h>
#include <kicontheme.h>
#include <kurl.h>
@@ -50,7 +50,7 @@ class KIO_EXPORT KMimeType : public KServiceType
public:
typedef KSharedPtr<KMimeType> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
* Constructor.
@@ -65,14 +65,14 @@ public:
* @param _patterns a list of file globs that describes the names (or
* extensions) of the files with this mime type
*/
- KMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- const QString& _comment, const QStringList& _patterns );
+ KMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ const TQString& _comment, const TQStringList& _patterns );
/**
* Construct a mimetype and take all information from a config file.
* @param _fullpath the path to the configuration file (.desktop)
*/
- KMimeType( const QString & _fullpath );
+ KMimeType( const TQString & _fullpath );
/**
* Construct a mimetype and take all information from a desktop file.
@@ -85,7 +85,7 @@ public:
*
* The stream must already be positionned at the correct offset
*/
- KMimeType( QDataStream& _str, int offset );
+ KMimeType( TQDataStream& _str, int offset );
virtual ~KMimeType();
@@ -97,7 +97,7 @@ public:
*
* @return The path to the icon associated with this MIME type.
*/
- virtual QString icon( const QString& , bool ) const { return m_strIcon; }
+ virtual TQString icon( const TQString& , bool ) const { return m_strIcon; }
/**
* Return the filename of the icon associated with the mimetype.
@@ -107,7 +107,7 @@ public:
*
* @return The path to the icon associated with this MIME type.
*/
- virtual QString icon( const KURL& , bool ) const { return m_strIcon; }
+ virtual TQString icon( const KURL& , bool ) const { return m_strIcon; }
/**
* Use this function only if you don't have a special URL
@@ -126,8 +126,8 @@ public:
* Ignored if 0
* @return the pixmap of the mime type, can be a default icon if not found
*/
- virtual QPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
- QString * path = 0L ) const;
+ virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
+ TQString * path = 0L ) const;
/**
* Find the pixmap for a given file of this mimetype.
@@ -145,8 +145,8 @@ public:
* Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found
*/
- virtual QPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
- int _state = 0, QString * _path = 0L ) const;
+ virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
+ int _state = 0, TQString * _path = 0L ) const;
/**
* Convenience method to find the pixmap for a URL.
@@ -166,8 +166,8 @@ public:
* Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found
*/
- static QPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop,
- int _force_size = 0, int _state = 0, QString * _path = 0L );
+ static TQPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop,
+ int _force_size = 0, int _state = 0, TQString * _path = 0L );
/**
@@ -182,24 +182,24 @@ public:
* @return the name of the icon. The name of a default icon if there is no icon
* for the mime type
*/
- static QString iconForURL( const KURL & _url, mode_t _mode = 0 );
+ static TQString iconForURL( const KURL & _url, mode_t _mode = 0 );
/**
* Return the "favicon" (see http://www.favicon.com) for the given @p url,
* if available. Does NOT attempt to download the favicon, it only returns
* one that is already available.
*
- * If unavailable, returns QString::null.
+ * If unavailable, returns TQString::null.
* @param url the URL of the favicon
- * @return the name of the favicon, or QString::null
+ * @return the name of the favicon, or TQString::null
*/
- static QString favIconForURL( const KURL& url );
+ static TQString favIconForURL( const KURL& url );
/**
* Returns the descriptive comment associated with the MIME type.
* @return the descriptive comment associated with the MIME type
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the descriptive comment associated with the MIME type.
@@ -208,7 +208,7 @@ public:
*
* @return The descriptive comment associated with the MIME type, if any.
*/
- virtual QString comment( const QString&, bool ) const { return m_strComment; }
+ virtual TQString comment( const TQString&, bool ) const { return m_strComment; }
/**
* Returns the descriptive comment associated with the MIME type.
@@ -217,26 +217,26 @@ public:
*
* @return The descriptive comment associated with the MIME type, if any.
*/
- virtual QString comment( const KURL&, bool ) const { return m_strComment; }
+ virtual TQString comment( const KURL&, bool ) const { return m_strComment; }
/**
* Retrieve the list of patterns associated with the MIME Type.
* @return a list of file globs that describe the file names
* (or, usually, the extensions) of files with this mime type
*/
- const QStringList& patterns() const { return m_lstPatterns; }
+ const TQStringList& patterns() const { return m_lstPatterns; }
/**
* Load the mimetype from a stream.
* @param qs the stream to load from
*/
- virtual void load( QDataStream &qs );
+ virtual void load( TQDataStream &qs );
/**
* Save the mimetype to a stream.
* @param qs the stream to save to
*/
- virtual void save( QDataStream &qs );
+ virtual void save( TQDataStream &qs );
/**
* Returns the property with the given @p _name.
@@ -244,7 +244,7 @@ public:
* @return the value of the property
* @see propertyNames()
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Retrieves a list of all properties associated with this
@@ -252,7 +252,7 @@ public:
* @return a list of all property names
* @see property()
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Retrieve a pointer to the mime type @p _name or a pointer to the default
@@ -268,7 +268,7 @@ public:
* not found
* @see KServiceType::serviceType
*/
- static Ptr mimeType( const QString& _name );
+ static Ptr mimeType( const TQString& _name );
/**
* Finds a KMimeType with the given @p _url.
@@ -330,7 +330,7 @@ public:
* it is @em fast.
* @return A pointer to the matching mimetype. 0L is never returned.
*/
- static Ptr findByPath( const QString& path, mode_t mode = 0, bool fast_mode = false );
+ static Ptr findByPath( const TQString& path, mode_t mode = 0, bool fast_mode = false );
/**
* Tries to find out the MIME type of a data chunk by looking for
@@ -342,7 +342,7 @@ public:
* @return a pointer to the KMimeType. application/octet-stream's KMimeType of the
* type can not be found this way.
*/
- static Ptr findByContent( const QByteArray &data, int *accuracy=0 );
+ static Ptr findByContent( const TQByteArray &data, int *accuracy=0 );
/**
* Tries to find out the MIME type of a file by looking for
@@ -357,7 +357,7 @@ public:
* @return a pointer to the KMimeType. application/octet-stream's KMimeType of the
* type can not be found this way.
*/
- static Ptr findByFileContent( const QString &fileName, int *accuracy=0 );
+ static Ptr findByFileContent( const TQString &fileName, int *accuracy=0 );
struct Format{
bool text : 1;
@@ -370,7 +370,7 @@ public:
* or that would be human readable after decompression.
* @since 3.2
*/
- static Format findFormatByFileContent( const QString &fileName );
+ static Format findFormatByFileContent( const TQString &fileName );
/**
* Get all the mimetypes.
@@ -390,7 +390,7 @@ public:
* @return the name of the default mime type, always
* "application/octet-stream"
*/
- static const QString & defaultMimeType();
+ static const TQString & defaultMimeType();
/**
* Returns the default mimetype.
@@ -414,10 +414,10 @@ public:
* since an application that handles the specific type doesn't necessarily handle
* the base type. The opposite is true though.
*
- * @return the parent mime type, or QString::null if not set
+ * @return the parent mime type, or TQString::null if not set
* @since 3.2
*/
- QString parentMimeType() const;
+ TQString parentMimeType() const;
/**
* Do not use name()=="somename" anymore, to check for a given mimetype.
@@ -425,24 +425,24 @@ public:
* Warning, do not use inherits(), that's the servicetype inheritance concept!
* @since 3.2
*/
- bool is( const QString& mimeTypeName ) const;
+ bool is( const TQString& mimeTypeName ) const;
/**
* @internal
* Determines the mimetype of file based on it's name and returns the
* matching pattern if any.
*/
- static KMimeType::Ptr diagnoseFileName(const QString &file, QString &pattern);
+ static KMimeType::Ptr diagnoseFileName(const TQString &file, TQString &pattern);
protected:
- void loadInternal( QDataStream& );
+ void loadInternal( TQDataStream& );
void init( KDesktopFile * );
/**
* Signal a missing mime type.
* @param _type the missinf mime type
*/
- static void errorMissingMimeType( const QString& _type );
+ static void errorMissingMimeType( const TQString& _type );
/**
* This function makes sure that the default mime type exists.
@@ -458,7 +458,7 @@ protected:
*/
static bool s_bChecked;
- QStringList m_lstPatterns;
+ TQStringList m_lstPatterns;
static Ptr s_pDefaultType;
@@ -479,21 +479,21 @@ class KIO_EXPORT KFolderType : public KMimeType
K_SYCOCATYPE( KST_KFolderType, KMimeType )
public:
-// KFolderType( const QString & _fullpath, const QString& _type, const QString& _icon, const QString& _comment,
-// const QStringList& _patterns );
-// KFolderType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+// KFolderType( const TQString & _fullpath, const TQString& _type, const TQString& _icon, const TQString& _comment,
+// const TQStringList& _patterns );
+// KFolderType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a folder mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KFolderType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KFolderType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KFolderType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
- virtual QString icon( const QString& _url, bool _is_local ) const;
- virtual QString icon( const KURL& _url, bool _is_local ) const;
- virtual QString comment( const QString& _url, bool _is_local ) const;
- virtual QString comment( const KURL& _url, bool _is_local ) const;
+ virtual TQString icon( const TQString& _url, bool _is_local ) const;
+ virtual TQString icon( const KURL& _url, bool _is_local ) const;
+ virtual TQString comment( const TQString& _url, bool _is_local ) const;
+ virtual TQString comment( const KURL& _url, bool _is_local ) const;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -518,36 +518,36 @@ public:
{
Service() { m_display = true; }
bool isEmpty() const { return m_strName.isEmpty(); }
- QString m_strName;
- QString m_strIcon;
- QString m_strExec;
+ TQString m_strName;
+ TQString m_strIcon;
+ TQString m_strExec;
ServiceType m_type;
bool m_display;
};
- // KDEDesktopMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- // const QString& _comment, const QStringList& _patterns );
- // KDEDesktopMimeType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+ // KDEDesktopMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ // const TQString& _comment, const TQStringList& _patterns );
+ // KDEDesktopMimeType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a desktop mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KDEDesktopMimeType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KDEDesktopMimeType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KDEDesktopMimeType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
- virtual QString icon( const QString& _url, bool _is_local ) const;
- virtual QString icon( const KURL& _url, bool _is_local ) const;
- virtual QPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
- int _state = 0, QString * _path = 0L ) const;
- virtual QString comment( const QString& _url, bool _is_local ) const;
- virtual QString comment( const KURL& _url, bool _is_local ) const;
+ virtual TQString icon( const TQString& _url, bool _is_local ) const;
+ virtual TQString icon( const KURL& _url, bool _is_local ) const;
+ virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
+ int _state = 0, TQString * _path = 0L ) const;
+ virtual TQString comment( const TQString& _url, bool _is_local ) const;
+ virtual TQString comment( const KURL& _url, bool _is_local ) const;
/**
* Returns a list of services for the given .desktop file that are handled
* by kio itself. Namely mount/unmount for FSDevice files.
* @return the list of services
*/
- static QValueList<Service> builtinServices( const KURL& _url );
+ static TQValueList<Service> builtinServices( const KURL& _url );
/**
* Returns a list of services defined by the user as possible actions
* on the given .desktop file. May include empty actions which represent where
@@ -558,14 +558,14 @@ public:
* (if false, services that don't have %u or %U in the Exec line won't be taken into account).
* @return the list of user deviced actions
*/
- static QValueList<Service> userDefinedServices( const QString& path, bool bLocalFiles );
+ static TQValueList<Service> userDefinedServices( const TQString& path, bool bLocalFiles );
/**
* Overload of userDefinedServices for speed purposes: it takes a KConfig* so that
* the caller can check things in the file without having it parsed twice.
* @since 3.4
*/
- static QValueList<Service> userDefinedServices( const QString& path, KConfig& config, bool bLocalFiles );
+ static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles );
/**
* Overload of userDefinedServices but also allows you to pass a list of urls for this file.
@@ -573,14 +573,14 @@ public:
* the X-KDE-GetActionMenu extension.
* @since 3.5
*/
- static QValueList<Service> userDefinedServices( const QString& path, KConfig& config, bool bLocalFiles, const KURL::List & file_list);
+ static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles, const KURL::List & file_list);
/**
* @param path is the path of the desktop entry.
* @param service the service to execute
* @deprecated, see the other executeService
*/
- static void executeService( const QString& path, KDEDesktopMimeType::Service& service ) KDE_DEPRECATED;
+ static void executeService( const TQString& path, KDEDesktopMimeType::Service& service ) KDE_DEPRECATED;
/**
* Execute @p service on the list of @p urls.
@@ -603,12 +603,12 @@ public:
static pid_t run( const KURL& _url, bool _is_local );
protected:
- virtual QPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
- QString * path = 0L ) const
+ virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
+ TQString * path = 0L ) const
{ return KMimeType::pixmap( group, force_size, state, path ); }
static pid_t runFSDevice( const KURL& _url, const KSimpleConfig &cfg );
- static pid_t runApplication( const KURL& _url, const QString & _serviceFile );
+ static pid_t runApplication( const KURL& _url, const TQString & _serviceFile );
static pid_t runLink( const KURL& _url, const KSimpleConfig &cfg );
static pid_t runMimeType( const KURL& _url, const KSimpleConfig &cfg );
protected:
@@ -624,16 +624,16 @@ class KIO_EXPORT KExecMimeType : public KMimeType
K_SYCOCATYPE( KST_KExecMimeType, KMimeType )
public:
- // KExecMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- // const QString& _comment, const QStringList& _patterns );
- // KExecMimeType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+ // KExecMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ // const TQString& _comment, const TQStringList& _patterns );
+ // KExecMimeType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a executable mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KExecMimeType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KExecMimeType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KExecMimeType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp
index d06861e1f..d8ceb930b 100644
--- a/kio/kio/kmimetypechooser.cpp
+++ b/kio/kio/kmimetypechooser.cpp
@@ -27,34 +27,34 @@
#include <krun.h>
#include <ksycoca.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
//BEGIN KMimeTypeChooserPrivate
class KMimeTypeChooserPrivate
{
public:
KListView *lvMimeTypes;
- QPushButton *btnEditMimeType;
+ TQPushButton *btnEditMimeType;
- QString defaultgroup;
- QStringList groups;
+ TQString defaultgroup;
+ TQStringList groups;
int visuals;
};
//END
//BEGIN KMimeTypeChooser
-KMimeTypeChooser::KMimeTypeChooser( const QString &text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- const QStringList &groupsToShow,
+KMimeTypeChooser::KMimeTypeChooser( const TQString &text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ const TQStringList &groupsToShow,
int visuals,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
- : QVBox( parent, name )
+ : TQVBox( parent, name )
{
d = new KMimeTypeChooserPrivate();
d->lvMimeTypes = 0;
@@ -67,18 +67,18 @@ KMimeTypeChooser::KMimeTypeChooser( const QString &text,
if ( !text.isEmpty() )
{
- new QLabel( text, this );
+ new TQLabel( text, this );
}
d->lvMimeTypes = new KListView( this );
d->lvMimeTypes->addColumn( i18n("Mime Type") );
-// d->lvMimeTypes->setColumnWidthMode( 0, QListView::Manual );
+// d->lvMimeTypes->setColumnWidthMode( 0, TQListView::Manual );
if ( visuals & Comments )
{
d->lvMimeTypes->addColumn( i18n("Comment") );
- d->lvMimeTypes->setColumnWidthMode( 1, QListView::Manual );
+ d->lvMimeTypes->setColumnWidthMode( 1, TQListView::Manual );
}
if ( visuals & Patterns )
d->lvMimeTypes->addColumn( i18n("Patterns") );
@@ -89,18 +89,18 @@ KMimeTypeChooser::KMimeTypeChooser( const QString &text,
if (visuals & KMimeTypeChooser::EditButton)
{
- QHBox *btns = new QHBox( this );
- ((QBoxLayout*)btns->layout())->addStretch(1);
- d->btnEditMimeType = new QPushButton( i18n("&Edit..."), btns );
+ TQHBox *btns = new TQHBox( this );
+ ((TQBoxLayout*)btns->layout())->addStretch(1);
+ d->btnEditMimeType = new TQPushButton( i18n("&Edit..."), btns );
- connect( d->btnEditMimeType, SIGNAL(clicked()), this, SLOT(editMimeType()) );
+ connect( d->btnEditMimeType, TQT_SIGNAL(clicked()), this, TQT_SLOT(editMimeType()) );
d->btnEditMimeType->setEnabled( false );
- connect( d->lvMimeTypes, SIGNAL( doubleClicked ( QListViewItem * )),
- this, SLOT( editMimeType()));
- connect( d->lvMimeTypes, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(slotCurrentChanged(QListViewItem*)) );
+ connect( d->lvMimeTypes, TQT_SIGNAL( doubleClicked ( TQListViewItem * )),
+ this, TQT_SLOT( editMimeType()));
+ connect( d->lvMimeTypes, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListViewItem*)) );
- QWhatsThis::add( d->btnEditMimeType, i18n(
+ TQWhatsThis::add( d->btnEditMimeType, i18n(
"Click this button to display the familiar KDE mime type editor.") );
}
}
@@ -110,9 +110,9 @@ KMimeTypeChooser::~KMimeTypeChooser()
delete d;
}
-void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
+void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes )
{
- QStringList selMimeTypes;
+ TQStringList selMimeTypes;
if ( !_selectedMimeTypes.isEmpty() )
selMimeTypes = _selectedMimeTypes;
@@ -121,31 +121,31 @@ void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
d->lvMimeTypes->clear();
- QMap<QString,QListViewItem*> groups;
+ TQMap<TQString,TQListViewItem*> groups;
// thanks to kdebase/kcontrol/filetypes/filetypesview
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
- QListViewItem *groupItem;
+ TQListViewItem *groupItem;
bool agroupisopen = false;
- QListViewItem *idefault = 0; //open this, if all other fails
- QListViewItem *firstChecked = 0; // make this one visible after the loop
+ TQListViewItem *idefault = 0; //open this, if all other fails
+ TQListViewItem *firstChecked = 0; // make this one visible after the loop
for (; it != mimetypes.end(); ++it)
{
- QString mimetype = (*it)->name();
+ TQString mimetype = (*it)->name();
int index = mimetype.find("/");
- QString maj = mimetype.left(index);
+ TQString maj = mimetype.left(index);
if ( d->groups.count() && !d->groups.contains( maj ) )
continue;
- QString min = mimetype.right(mimetype.length() - (index+1));
+ TQString min = mimetype.right(mimetype.length() - (index+1));
- QMapIterator<QString,QListViewItem*> mit = groups.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = groups.find( maj );
if ( mit == groups.end() )
{
- groupItem = new QListViewItem( d->lvMimeTypes, maj );
+ groupItem = new TQListViewItem( d->lvMimeTypes, maj );
groups.insert( maj, groupItem );
if ( maj == d->defaultgroup )
idefault = groupItem;
@@ -153,14 +153,14 @@ void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
else
groupItem = mit.data();
- QCheckListItem *item = new QCheckListItem( groupItem, min, QCheckListItem::CheckBox );
- item->setPixmap( 0, SmallIcon( (*it)->icon(QString::null,false) ) );
+ TQCheckListItem *item = new TQCheckListItem( groupItem, min, TQCheckListItem::CheckBox );
+ item->setPixmap( 0, SmallIcon( (*it)->icon(TQString::null,false) ) );
int cl = 1;
if ( d->visuals & Comments )
{
- item->setText( cl, (*it)->comment(QString::null, false) );
+ item->setText( cl, (*it)->comment(TQString::null, false) );
cl++;
}
@@ -191,18 +191,18 @@ void KMimeTypeChooser::editMimeType()
{
if ( !(d->lvMimeTypes->currentItem() && (d->lvMimeTypes->currentItem())->parent()) )
return;
- QString mt = (d->lvMimeTypes->currentItem()->parent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
+ TQString mt = (d->lvMimeTypes->currentItem()->parent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
// thanks to libkonq/konq_operations.cc
- connect( KSycoca::self(), SIGNAL(databaseChanged()),
- this, SLOT(slotSycocaDatabaseChanged()) );
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ connect( KSycoca::self(), TQT_SIGNAL(databaseChanged()),
+ this, TQT_SLOT(slotSycocaDatabaseChanged()) );
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + QString::number( (ulong)topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)topLevelWidget()->winId())
+ " " + KProcess::quote(mt),
keditfiletype, keditfiletype /*unused*/);
}
-void KMimeTypeChooser::slotCurrentChanged(QListViewItem* i)
+void KMimeTypeChooser::slotCurrentChanged(TQListViewItem* i)
{
if ( d->btnEditMimeType )
d->btnEditMimeType->setEnabled( i->parent() );
@@ -214,27 +214,27 @@ void KMimeTypeChooser::slotSycocaDatabaseChanged()
loadMimeTypes();
}
-QStringList KMimeTypeChooser::mimeTypes() const
+TQStringList KMimeTypeChooser::mimeTypes() const
{
- QStringList l;
- QListViewItemIterator it( d->lvMimeTypes );
+ TQStringList l;
+ TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((QCheckListItem*)it.current())->isOn() )
+ if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
l << it.current()->parent()->text(0) + "/" + it.current()->text(0); // FIXME uncecked, should be Ok unless someone changes mimetypes during this!
}
return l;
}
-QStringList KMimeTypeChooser::patterns() const
+TQStringList KMimeTypeChooser::patterns() const
{
- QStringList l;
+ TQStringList l;
KMimeType::Ptr p;
- QString defMT = KMimeType::defaultMimeType();
- QListViewItemIterator it( d->lvMimeTypes );
+ TQString defMT = KMimeType::defaultMimeType();
+ TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((QCheckListItem*)it.current())->isOn() )
+ if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
{
p = KMimeType::mimeType( it.current()->parent()->text(0) + "/" + it.current()->text(0) );
if ( p->name() != defMT )
@@ -247,13 +247,13 @@ QStringList KMimeTypeChooser::patterns() const
//BEGIN KMimeTypeChooserDialog
KMimeTypeChooserDialog::KMimeTypeChooserDialog(
- const QString &caption,
- const QString& text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- const QStringList &groupsToShow,
+ const TQString &caption,
+ const TQString& text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ const TQStringList &groupsToShow,
int visuals,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, caption, Cancel|Ok, Ok)
{
m_chooser = new KMimeTypeChooser( text, selMimeTypes,
@@ -262,26 +262,26 @@ KMimeTypeChooserDialog::KMimeTypeChooserDialog(
setMainWidget(m_chooser);
KConfigGroup group( KGlobal::config(), "KMimeTypeChooserDialog");
- QSize defaultSize( 400, 300 );
+ TQSize defaultSize( 400, 300 );
resize( group.readSizeEntry("size", &defaultSize) );
}
KMimeTypeChooserDialog::KMimeTypeChooserDialog(
- const QString &caption,
- const QString& text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- QWidget *parent, const char *name )
+ const TQString &caption,
+ const TQString& text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, caption, Cancel|Ok, Ok)
{
m_chooser = new KMimeTypeChooser( text, selMimeTypes,
- defaultGroup, QStringList(),
+ defaultGroup, TQStringList(),
KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
this, "chooser" );
setMainWidget(m_chooser);
KConfigGroup group( KGlobal::config(), "KMimeTypeChooserDialog");
- QSize defaultSize( 400, 300 );
+ TQSize defaultSize( 400, 300 );
resize( group.readSizeEntry("size", &defaultSize) );
}
diff --git a/kio/kio/kmimetypechooser.h b/kio/kio/kmimetypechooser.h
index 6fe7b3190..0827d5b30 100644
--- a/kio/kio/kmimetypechooser.h
+++ b/kio/kio/kmimetypechooser.h
@@ -19,7 +19,7 @@
#ifndef _KMIMETYPE_CHOOSER_H_
#define _KMIMETYPE_CHOOSER_H_
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kdialogbase.h>
@@ -59,22 +59,22 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* @param parent The parent widget to use
* @param name The internal name of this object
*/
- KMimeTypeChooser( const QString& text=QString::null,
- const QStringList &selectedMimeTypes=0,
- const QString &defaultGroup=QString::null,
- const QStringList &groupsToShow=QStringList(),
+ KMimeTypeChooser( const TQString& text=TQString::null,
+ const TQStringList &selectedMimeTypes=0,
+ const TQString &defaultGroup=TQString::null,
+ const TQStringList &groupsToShow=TQStringList(),
int visuals=Comments|Patterns|EditButton,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
~KMimeTypeChooser();
/**
* @return a list of all selected selected mimetypes represented by their name.
*/
- QStringList mimeTypes() const;
+ TQStringList mimeTypes() const;
/**
* @return a list of the fileame patterns associated with all selected mimetypes.
*/
- QStringList patterns() const;
+ TQStringList patterns() const;
public slots:
/**
@@ -88,7 +88,7 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
/**
* @internal disables the "edit" button for groups
*/
- void slotCurrentChanged(QListViewItem* i);
+ void slotCurrentChanged(TQListViewItem* i);
/**
* @internal called when the sycoca database has changed after
@@ -102,7 +102,7 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* If @p selected is empty, selectedMimeTypesStringList() is called
* to fill it in.
*/
- void loadMimeTypes( const QStringList &selected=QStringList() );
+ void loadMimeTypes( const TQStringList &selected=TQStringList() );
class KMimeTypeChooserPrivate *d;
};
@@ -116,8 +116,8 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* Here is an example, using the dialog to set the text of two lineedits:
*
* @code
- * QString text = i18n("Select the MimeTypes you want for this file type.");
- * QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() );
+ * TQString text = i18n("Select the MimeTypes you want for this file type.");
+ * TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() );
* KMimeTypeChooserDialog *d = new KMimeTypeChooserDialog( this, 0,
* i18n("Select Mime Types"), text, list, "text" );
* if ( d->exec() == KDialogBase::Accepted ) {
@@ -149,22 +149,22 @@ class KIO_EXPORT KMimeTypeChooserDialog : public KDialogBase
* @param parent The parent widget to use
* @param name The internal name of this object
*/
- KMimeTypeChooserDialog( const QString &caption=QString::null,
- const QString& text=QString::null,
- const QStringList &selectedMimeTypes=QStringList(),
- const QString &defaultGroup=QString::null,
- const QStringList &groupsToShow=QStringList(),
+ KMimeTypeChooserDialog( const TQString &caption=TQString::null,
+ const TQString& text=TQString::null,
+ const TQStringList &selectedMimeTypes=TQStringList(),
+ const TQString &defaultGroup=TQString::null,
+ const TQStringList &groupsToShow=TQStringList(),
int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
/**
* @overload
*/
- KMimeTypeChooserDialog( const QString &caption,
- const QString& text,
- const QStringList &selectedMimeTypes,
- const QString &defaultGroup,
- QWidget *parent=0, const char *name=0 );
+ KMimeTypeChooserDialog( const TQString &caption,
+ const TQString& text,
+ const TQStringList &selectedMimeTypes,
+ const TQString &defaultGroup,
+ TQWidget *parent=0, const char *name=0 );
~KMimeTypeChooserDialog();
diff --git a/kio/kio/kmimetyperesolver.h b/kio/kio/kmimetyperesolver.h
index 8f9e2dcc0..4ac6347f2 100644
--- a/kio/kio/kmimetyperesolver.h
+++ b/kio/kio/kmimetyperesolver.h
@@ -21,9 +21,9 @@
#ifndef __kmimetyperesolver_h
#define __kmimetyperesolver_h
-#include <qscrollview.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
/**
@@ -52,16 +52,16 @@ class KIO_EXPORT KMimeTypeResolverHelper : public QObject
public:
KMimeTypeResolverHelper( KMimeTypeResolverBase *resolver,
- QScrollView *view )
+ TQScrollView *view )
: m_resolver( resolver ),
- m_timer( new QTimer( this ) )
+ m_timer( new TQTimer( this ) )
{
- connect( m_timer, SIGNAL( timeout() ), SLOT( slotProcessMimeIcons() ));
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotProcessMimeIcons() ));
- connect( view->horizontalScrollBar(), SIGNAL( sliderMoved(int) ),
- SLOT( slotAdjust() ) );
- connect( view->verticalScrollBar(), SIGNAL( sliderMoved(int) ),
- SLOT( slotAdjust() ) );
+ connect( view->horizontalScrollBar(), TQT_SIGNAL( sliderMoved(int) ),
+ TQT_SLOT( slotAdjust() ) );
+ connect( view->verticalScrollBar(), TQT_SIGNAL( sliderMoved(int) ),
+ TQT_SLOT( slotAdjust() ) );
view->viewport()->installEventFilter( this );
}
@@ -72,11 +72,11 @@ public:
}
protected:
- virtual bool eventFilter( QObject *o, QEvent *e )
+ virtual bool eventFilter( TQObject *o, TQEvent *e )
{
- bool ret = QObject::eventFilter( o, e );
+ bool ret = TQObject::eventFilter( o, e );
- if ( e->type() == QEvent::Resize )
+ if ( e->type() == TQEvent::Resize )
m_resolver->slotViewportAdjusted();
return ret;
@@ -95,7 +95,7 @@ private slots:
private:
KMimeTypeResolverBase *m_resolver;
- QTimer *m_timer;
+ TQTimer *m_timer;
};
/**
@@ -106,16 +106,16 @@ private:
* preferrence to the visible icons.
*
* It is implemented as a template, so that it can work with both QPtrListViewItem
- * and QIconViewItem, without requiring hacks such as void * or QPtrDict lookups.
+ * and TQIconViewItem, without requiring hacks such as void * or TQPtrDict lookups.
*
* Here's what the parent must implement :
* @li void mimeTypeDeterminationFinished();
- * @li QScrollView * scrollWidget();
+ * @li TQScrollView * scrollWidget();
* @li void determineIcon( IconItem * item ), which should call
* @li KFileItem::determineMimeType on the fileItem, and update the icon, etc.
*/
template<class IconItem, class Parent>
-class KMimeTypeResolver : public KMimeTypeResolverBase // if only this could be a QObject....
+class KMimeTypeResolver : public KMimeTypeResolverBase // if only this could be a TQObject....
{
public:
/**
@@ -149,7 +149,7 @@ public:
* clear it, insert new items into it, remove items, etc.
* @return the list of items to process
*/
- QPtrList<IconItem> m_lstPendingMimeIconItems;
+ TQPtrList<IconItem> m_lstPendingMimeIconItems;
/**
* "Connected" to the viewportAdjusted signal of the scrollview
@@ -231,17 +231,17 @@ inline IconItem * KMimeTypeResolver<IconItem, Parent>::findVisibleIcon()
{
// Find an icon that's visible and whose mimetype we don't know.
- QPtrListIterator<IconItem> it(m_lstPendingMimeIconItems);
+ TQPtrListIterator<IconItem> it(m_lstPendingMimeIconItems);
if ( m_lstPendingMimeIconItems.count()<20) // for few items, it's faster to not bother
return m_lstPendingMimeIconItems.first();
- QScrollView * view = m_parent->scrollWidget();
- QRect visibleContentsRect
+ TQScrollView * view = m_parent->scrollWidget();
+ TQRect visibleContentsRect
(
- view->viewportToContents(QPoint(0, 0)),
+ view->viewportToContents(TQPoint(0, 0)),
view->viewportToContents
(
- QPoint(view->visibleWidth(), view->visibleHeight())
+ TQPoint(view->visibleWidth(), view->visibleHeight())
)
);
diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp
index eaadae603..f0fdfce6d 100644
--- a/kio/kio/knfsshare.cpp
+++ b/kio/kio/knfsshare.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdirwatch.h>
#include <kstaticdeleter.h>
@@ -35,8 +35,8 @@ public:
bool readExportsFile();
bool findExportsFile();
- QDict<bool> sharedPaths;
- QString exportsFile;
+ TQDict<bool> sharedPaths;
+ TQString exportsFile;
};
KNFSSharePrivate::KNFSSharePrivate()
@@ -56,10 +56,10 @@ bool KNFSSharePrivate::findExportsFile() {
config.setGroup("General");
exportsFile = config.readPathEntry("exportsFile");
- if ( QFile::exists(exportsFile) )
+ if ( TQFile::exists(exportsFile) )
return true;
- if ( QFile::exists("/etc/exports") )
+ if ( TQFile::exists("/etc/exports") )
exportsFile = "/etc/exports";
else {
kdDebug(7000) << "KNFSShare: Could not found exports file!" << endl;
@@ -75,7 +75,7 @@ bool KNFSSharePrivate::findExportsFile() {
* and fills the sharedPaths dict with the values
*/
bool KNFSSharePrivate::readExportsFile() {
- QFile f(exportsFile);
+ TQFile f(exportsFile);
kdDebug(7000) << "KNFSShare::readExportsFile " << exportsFile << endl;
@@ -87,14 +87,14 @@ bool KNFSSharePrivate::readExportsFile() {
sharedPaths.clear();
- QTextStream s( &f );
+ TQTextStream s( &f );
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
+ TQString completeLine;
while ( !s.eof() )
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine) {
completeLine += currentLine;
@@ -119,7 +119,7 @@ bool KNFSSharePrivate::readExportsFile() {
continue;
}
- QString path;
+ TQString path;
// Handle quotation marks
if ( completeLine[0] == '"' ) {
@@ -160,45 +160,45 @@ bool KNFSSharePrivate::readExportsFile() {
KNFSShare::KNFSShare() {
d = new KNFSSharePrivate();
- if (QFile::exists(d->exportsFile)) {
+ if (TQFile::exists(d->exportsFile)) {
KDirWatch::self()->addFile(d->exportsFile);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString&)));
}
}
KNFSShare::~KNFSShare() {
- if (QFile::exists(d->exportsFile)) {
+ if (TQFile::exists(d->exportsFile)) {
KDirWatch::self()->removeFile(d->exportsFile);
}
delete d;
}
-bool KNFSShare::isDirectoryShared( const QString & path ) const {
- QString fixedPath = path;
+bool KNFSShare::isDirectoryShared( const TQString & path ) const {
+ TQString fixedPath = path;
if ( path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.find(fixedPath) != 0;
}
-QStringList KNFSShare::sharedDirectories() const {
- QStringList result;
- QDictIterator<bool> it(d->sharedPaths);
+TQStringList KNFSShare::sharedDirectories() const {
+ TQStringList result;
+ TQDictIterator<bool> it(d->sharedPaths);
for( ; it.current(); ++it )
result << it.currentKey();
return result;
}
-QString KNFSShare::exportsPath() const {
+TQString KNFSShare::exportsPath() const {
return d->exportsFile;
}
-void KNFSShare::slotFileChange( const QString & path ) {
+void KNFSShare::slotFileChange( const TQString & path ) {
if (path == d->exportsFile)
d->readExportsFile();
diff --git a/kio/kio/knfsshare.h b/kio/kio/knfsshare.h
index 228cedffd..d1852d0f2 100644
--- a/kio/kio/knfsshare.h
+++ b/kio/kio/knfsshare.h
@@ -19,7 +19,7 @@
#ifndef knfsshare_h
#define knfsshare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -32,7 +32,7 @@ class KNFSSharePrivate;
* It parses the /etc/exports file to get its information.
* Singleton class, call instance() to get an instance.
*/
-class KIO_EXPORT KNFSShare : public QObject
+class KIO_EXPORT KNFSShare : public TQObject
{
Q_OBJECT
public:
@@ -46,14 +46,14 @@ public:
* @param path the path to check if it is shared by NFS.
* @return wether the given path is shared by NFS.
*/
- bool isDirectoryShared( const QString & path ) const;
+ bool isDirectoryShared( const TQString & path ) const;
/**
* Returns a list of all directories shared by NFS.
* The resulting list is not sorted.
* @return a list of all directories shared by NFS.
*/
- QStringList sharedDirectories() const;
+ TQStringList sharedDirectories() const;
/**
* KNFSShare destructor.
@@ -66,7 +66,7 @@ public:
* Returns the path to the used exports file,
* or null if no exports file was found
*/
- QString exportsPath() const;
+ TQString exportsPath() const;
signals:
/**
@@ -80,7 +80,7 @@ private:
KNFSSharePrivate* d;
private slots:
- void slotFileChange(const QString&);
+ void slotFileChange(const TQString&);
};
#endif
diff --git a/kio/kio/kprotocolinfo.cpp b/kio/kio/kprotocolinfo.cpp
index ce854a3a9..01e3e6c18 100644
--- a/kio/kio/kprotocolinfo.cpp
+++ b/kio/kio/kprotocolinfo.cpp
@@ -35,11 +35,11 @@ KProtocolInfo* KProtocolInfo::findProtocol(const KURL &url)
#ifdef MAKE_KDECORE_LIB
return 0;
#else
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if ( !KProtocolInfo::proxiedBy( protocol ).isEmpty() )
{
- QString dummy;
+ TQString dummy;
protocol = KProtocolManager::slaveProtocol(url, dummy);
}
@@ -81,9 +81,9 @@ bool KProtocolInfo::isFilterProtocol( const KURL &url )
return isFilterProtocol (url.protocol());
}
-bool KProtocolInfo::isFilterProtocol( const QString &protocol )
+bool KProtocolInfo::isFilterProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
if ( !prot )
return false;
@@ -96,9 +96,9 @@ bool KProtocolInfo::isHelperProtocol( const KURL &url )
return isHelperProtocol (url.protocol());
}
-bool KProtocolInfo::isHelperProtocol( const QString &protocol )
+bool KProtocolInfo::isHelperProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
if ( !prot )
return false;
@@ -111,9 +111,9 @@ bool KProtocolInfo::isKnownProtocol( const KURL &url )
return isKnownProtocol (url.protocol());
}
-bool KProtocolInfo::isKnownProtocol( const QString &protocol )
+bool KProtocolInfo::isKnownProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
return ( prot != 0);
}
@@ -127,11 +127,11 @@ bool KProtocolInfo::supportsListing( const KURL &url )
return prot->m_supportsListing;
}
-QStringList KProtocolInfo::listing( const KURL &url )
+TQStringList KProtocolInfo::listing( const KURL &url )
{
KProtocolInfo::Ptr prot = findProtocol(url);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->m_listing;
}
@@ -246,11 +246,11 @@ KProtocolInfo::FileNameUsedForCopying KProtocolInfo::fileNameUsedForCopying( con
return prot->fileNameUsedForCopying();
}
-QString KProtocolInfo::defaultMimetype( const KURL &url )
+TQString KProtocolInfo::defaultMimetype( const KURL &url )
{
KProtocolInfo::Ptr prot = findProtocol(url);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_defaultMimetype;
}
diff --git a/kio/kio/kprotocolinfo.h b/kio/kio/kprotocolinfo.h
index 3a0f05272..dba4694db 100644
--- a/kio/kio/kprotocolinfo.h
+++ b/kio/kio/kprotocolinfo.h
@@ -19,9 +19,9 @@
#ifndef __kprotocolinfo_h__
#define __kprotocolinfo_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatastream.h>
#include <kurl.h>
#include <ksycocaentry.h>
@@ -54,7 +54,7 @@ public:
* Read a protocol description file
* @param path the path of the description file
*/
- KProtocolInfo( const QString & path); // KDE4: make private and add friend class KProtocolInfoBuildFactory
+ KProtocolInfo( const TQString & path); // KDE4: make private and add friend class KProtocolInfoBuildFactory
// Then we can get rid of the d pointer
/**
@@ -71,7 +71,7 @@ public:
* @return the name of the protocol
* @see KURL::protocol()
*/
- virtual QString name() const { return m_name; }
+ virtual TQString name() const { return m_name; }
//
// Static functions:
@@ -81,7 +81,7 @@ public:
* Returns list of all known protocols.
* @return a list of all known protocols
*/
- static QStringList protocols();
+ static TQStringList protocols();
/**
* Returns whether a protocol is installed that is able to handle @p url.
@@ -96,7 +96,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isKnownProtocol( const QString& protocol )
+ static bool isKnownProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -109,11 +109,11 @@ public:
*
* This corresponds to the "exec=" field in the protocol description file.
* @param protocol the protocol to check
- * @return the executable of library to open, or QString::null for
+ * @return the executable of library to open, or TQString::null for
* unsupported protocols
* @see KURL::protocol()
*/
- static QString exec( const QString& protocol );
+ static TQString exec( const TQString& protocol );
/**
* Describes the type of a protocol.
@@ -160,27 +160,27 @@ public:
* @param url the url to check
* @return a list of field names
*/
- static QStringList listing( const KURL &url );
+ static TQStringList listing( const KURL &url );
/**
* Definition of an extra field in the UDS entries, returned by a listDir operation.
*
* The name is the name of the column, translated.
*
- * The type name comes from QVariant::typeName()
- * Currently supported types: "QString", "QDateTime" (ISO-8601 format)
+ * The type name comes from TQVariant::typeName()
+ * Currently supported types: "TQString", "TQDateTime" (ISO-8601 format)
*
* @since 3.2
*/
struct ExtraField {
ExtraField() {} // for QValueList
- ExtraField(const QString& _name, const QString& _type )
+ ExtraField(const TQString& _name, const TQString& _type )
: name(_name), type(_type) {
}
- QString name;
- QString type; // KDE4: make it QVariant::Type
+ TQString name;
+ TQString type; // KDE4: make it TQVariant::Type
};
- typedef QValueList<ExtraField > ExtraFieldList;
+ typedef TQValueList<ExtraField > ExtraFieldList;
/**
* Definition of extra fields in the UDS entries, returned by a listDir operation.
*
@@ -225,7 +225,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isHelperProtocol( const QString& protocol )
+ static bool isHelperProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -253,7 +253,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isFilterProtocol( const QString& protocol )
+ static bool isFilterProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -443,7 +443,7 @@ public:
* @param url the url to check
* @return the default mime type of the protocol, or null if unknown
*/
- static QString defaultMimetype( const KURL& url );
+ static TQString defaultMimetype( const KURL& url );
/**
* Returns the name of the icon, associated with the specified protocol.
@@ -453,7 +453,7 @@ public:
* @param protocol the protocol to check
* @return the icon of the protocol, or null if unknown
*/
- static QString icon( const QString& protocol );
+ static TQString icon( const TQString& protocol );
/**
* Returns the name of the config file associated with the
@@ -466,7 +466,7 @@ public:
* @param protocol the protocol to check
* @return the config file, or null if unknown
*/
- static QString config( const QString& protocol );
+ static TQString config( const TQString& protocol );
/**
* Returns the soft limit on the number of slaves for this protocol.
@@ -480,7 +480,7 @@ public:
* @param protocol the protocol to check
* @return the maximum number of slaves, or 1 if unknown
*/
- static int maxSlaves( const QString& protocol );
+ static int maxSlaves( const TQString& protocol );
/**
* Returns whether mimetypes can be determined based on extension for this
@@ -493,7 +493,7 @@ public:
* @param protocol the protocol to check
* @return true if the mime types can be determined by extension
*/
- static bool determineMimetypeFromExtension( const QString &protocol );
+ static bool determineMimetypeFromExtension( const TQString &protocol );
/**
* Returns the documentation path for the specified protocol.
@@ -504,7 +504,7 @@ public:
* @return the docpath of the protocol, or null if unknown
* @since 3.2
*/
- static QString docPath( const QString& protocol );
+ static TQString docPath( const TQString& protocol );
/**
* Returns the protocol class for the specified protocol.
@@ -522,7 +522,7 @@ public:
* @return the class of the protocol, or null if unknown
* @since 3.2
*/
- static QString protocolClass( const QString& protocol );
+ static TQString protocolClass( const TQString& protocol );
/**
* Returns whether file previews should be shown for the specified protocol.
@@ -535,7 +535,7 @@ public:
* @return true if previews should be shown by default, false otherwise
* @since 3.2
*/
- static bool showFilePreview( const QString& protocol );
+ static bool showFilePreview( const TQString& protocol );
/**
* Returns the suggested URI parsing mode for the KURL parser.
@@ -552,7 +552,7 @@ public:
*
* @since 3.2
*/
- static KURL::URIMode uriParseMode( const QString& protocol );
+ static KURL::URIMode uriParseMode( const TQString& protocol );
/**
* Returns the list of capabilities provided by the kioslave implementing
@@ -572,7 +572,7 @@ public:
*
* @since 3.3
*/
- static QStringList capabilities( const QString& protocol );
+ static TQStringList capabilities( const TQString& protocol );
/**
* Returns the name of the protocol through which the request
@@ -585,14 +585,14 @@ public:
*
* @since 3.3
*/
- static QString proxiedBy( const QString& protocol );
+ static TQString proxiedBy( const TQString& protocol );
public:
// Internal functions:
/**
* @internal construct a KProtocolInfo from a stream
*/
- KProtocolInfo( QDataStream& _str, int offset);
+ KProtocolInfo( TQDataStream& _str, int offset);
virtual ~KProtocolInfo();
@@ -600,58 +600,58 @@ public:
* @internal
* Load the protocol info from a stream.
*/
- virtual void load(QDataStream& );
+ virtual void load(TQDataStream& );
/**
* @internal
* Save the protocol info to a stream.
*/
- virtual void save(QDataStream& );
+ virtual void save(TQDataStream& );
////////////////////////// DEPRECATED /////////////////////////
// The following methods are deprecated:
/// @deprecated
- static Type inputType( const QString& protocol ) KDE_DEPRECATED;
+ static Type inputType( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static Type outputType( const QString& protocol ) KDE_DEPRECATED;
+ static Type outputType( const TQString& protocol ) KDE_DEPRECATED;
/**
* @deprecated
* Returns the list of fields this protocol returns when listing
* The current possibilities are
* Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
*/
- static QStringList listing( const QString& protocol ) KDE_DEPRECATED;
+ static TQStringList listing( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool isSourceProtocol( const QString& protocol ) KDE_DEPRECATED;
+ static bool isSourceProtocol( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsListing( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsListing( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsReading( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsReading( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsWriting( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsWriting( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsMakeDir( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsMakeDir( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsDeleting( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsDeleting( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsLinking( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsLinking( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsMoving( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsMoving( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool canCopyFromFile( const QString& protocol ) KDE_DEPRECATED;
+ static bool canCopyFromFile( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool canCopyToFile( const QString& protocol ) KDE_DEPRECATED;
+ static bool canCopyToFile( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static QString defaultMimetype( const QString& protocol) KDE_DEPRECATED;
+ static TQString defaultMimetype( const TQString& protocol) KDE_DEPRECATED;
//////////////////////// END DEPRECATED ///////////////////////
protected:
- QString m_name;
- QString m_exec;
+ TQString m_name;
+ TQString m_exec;
Type m_inputType;
Type m_outputType;
- QStringList m_listing;
+ TQStringList m_listing;
bool m_isSourceProtocol;
bool m_isHelperProtocol;
bool m_supportsListing;
@@ -661,12 +661,12 @@ protected:
bool m_supportsDeleting;
bool m_supportsLinking;
bool m_supportsMoving;
- QString m_defaultMimetype;
+ TQString m_defaultMimetype;
bool m_determineMimetypeFromExtension;
- QString m_icon;
+ TQString m_icon;
bool m_canCopyFromFile;
bool m_canCopyToFile;
- QString m_config;
+ TQString m_config;
int m_maxSlaves;
bool canRenameFromFile() const; // for kprotocolinfo_kdecore
@@ -682,7 +682,7 @@ private:
KProtocolInfoPrivate* d;
};
-KIO_EXPORT QDataStream& operator>>( QDataStream& s, KProtocolInfo::ExtraField& field );
-KIO_EXPORT QDataStream& operator<<( QDataStream& s, const KProtocolInfo::ExtraField& field );
+KIO_EXPORT TQDataStream& operator>>( TQDataStream& s, KProtocolInfo::ExtraField& field );
+KIO_EXPORT TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& field );
#endif
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
index 840ebacb4..8fb8b3227 100644
--- a/kio/kio/kprotocolmanager.cpp
+++ b/kio/kio/kprotocolmanager.cpp
@@ -48,10 +48,10 @@ public:
KConfig *http_config;
bool init_busy;
KURL url;
- QString protocol;
- QString proxy;
- QString modifiers;
- QString useragent;
+ TQString protocol;
+ TQString proxy;
+ TQString modifiers;
+ TQString useragent;
};
static KProtocolManagerPrivate* d = 0;
@@ -72,7 +72,7 @@ KProtocolManagerPrivate::~KProtocolManagerPrivate()
// DEFAULT USERAGENT STRING
#define CFG_DEFAULT_UAGENT(X) \
-QString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \
+TQString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \
.arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(X).arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE)
void KProtocolManager::reparseConfiguration()
@@ -112,7 +112,7 @@ KConfig *KProtocolManager::http_config()
int KProtocolManager::readTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ReadTimeout", DEFAULT_READ_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -120,7 +120,7 @@ int KProtocolManager::readTimeout()
int KProtocolManager::connectTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ConnectTimeout", DEFAULT_CONNECT_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -128,7 +128,7 @@ int KProtocolManager::connectTimeout()
int KProtocolManager::proxyConnectTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ProxyConnectTimeout", DEFAULT_PROXY_CONNECT_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -136,7 +136,7 @@ int KProtocolManager::proxyConnectTimeout()
int KProtocolManager::responseTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ResponseTimeout", DEFAULT_RESPONSE_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -180,13 +180,13 @@ bool KProtocolManager::useCache()
KIO::CacheControl KProtocolManager::cacheControl()
{
KConfig *cfg = http_config();
- QString tmp = cfg->readEntry("cache");
+ TQString tmp = cfg->readEntry("cache");
if (tmp.isEmpty())
return DEFAULT_CACHE_CONTROL;
return KIO::parseCacheControl(tmp);
}
-QString KProtocolManager::cacheDir()
+TQString KProtocolManager::cacheDir()
{
KConfig *cfg = http_config();
return cfg->readPathEntry("CacheDir", KGlobal::dirs()->saveLocation("cache","http"));
@@ -204,7 +204,7 @@ int KProtocolManager::maxCacheSize()
return cfg->readNumEntry( "MaxCacheSize", DEFAULT_MAX_CACHE_SIZE ); // 5 MB
}
-QString KProtocolManager::noProxyForRaw()
+TQString KProtocolManager::noProxyForRaw()
{
KConfig *cfg = config();
cfg->setGroup( "Proxy Settings" );
@@ -212,18 +212,18 @@ QString KProtocolManager::noProxyForRaw()
return cfg->readEntry( "NoProxyFor" );
}
-QString KProtocolManager::noProxyFor()
+TQString KProtocolManager::noProxyFor()
{
- QString noProxy = noProxyForRaw();
+ TQString noProxy = noProxyForRaw();
if (proxyType() == EnvVarProxy)
- noProxy = QString::fromLocal8Bit(getenv(noProxy.local8Bit()));
+ noProxy = TQString::fromLocal8Bit(getenv(noProxy.local8Bit()));
return noProxy;
}
-QString KProtocolManager::proxyFor( const QString& protocol )
+TQString KProtocolManager::proxyFor( const TQString& protocol )
{
- QString scheme = protocol.lower();
+ TQString scheme = protocol.lower();
if (scheme == "webdav")
scheme = "http";
@@ -235,9 +235,9 @@ QString KProtocolManager::proxyFor( const QString& protocol )
return cfg->readEntry( scheme + "Proxy" );
}
-QString KProtocolManager::proxyForURL( const KURL &url )
+TQString KProtocolManager::proxyForURL( const KURL &url )
{
- QString proxy;
+ TQString proxy;
ProxyType pt = proxyType();
switch (pt)
@@ -247,7 +247,7 @@ QString KProtocolManager::proxyForURL( const KURL &url )
if (!url.host().isEmpty())
{
KURL u (url);
- QString p = u.protocol().lower();
+ TQString p = u.protocol().lower();
// webdav is a KDE specific protocol. Look up proxy
// information using HTTP instead...
@@ -267,7 +267,7 @@ QString KProtocolManager::proxyForURL( const KURL &url )
}
break;
case EnvVarProxy:
- proxy = QString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit())).stripWhiteSpace();
+ proxy = TQString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit())).stripWhiteSpace();
break;
case ManualProxy:
proxy = proxyFor( url.protocol() );
@@ -277,10 +277,10 @@ QString KProtocolManager::proxyForURL( const KURL &url )
break;
}
- return (proxy.isEmpty() ? QString::fromLatin1("DIRECT") : proxy);
+ return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy);
}
-void KProtocolManager::badProxy( const QString &proxy )
+void KProtocolManager::badProxy( const TQString &proxy )
{
DCOPRef( "kded", "proxyscout" ).send( "blackListProxy", proxy );
}
@@ -326,7 +326,7 @@ static bool revmatch(const char *host, const char *nplist)
return false;
}
-QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
+TQString KProtocolManager::slaveProtocol(const KURL &url, TQString &proxy)
{
if (url.hasSubURL()) // We don't want the suburl's protocol
{
@@ -353,7 +353,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
KProtocolManager::ProxyType type = proxyType();
bool useRevProxy = ((type == ManualProxy) && useReverseProxy());
- QString noProxy;
+ TQString noProxy;
// Check no proxy information iff the proxy type is either
// ManualProxy or EnvVarProxy
if ( (type == ManualProxy) || (type == EnvVarProxy) )
@@ -361,9 +361,9 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
if (!noProxy.isEmpty())
{
- QString qhost = url.host().lower();
+ TQString qhost = url.host().lower();
const char *host = qhost.latin1();
- QString qno_proxy = noProxy.stripWhiteSpace().lower();
+ TQString qno_proxy = noProxy.stripWhiteSpace().lower();
const char *no_proxy = qno_proxy.latin1();
isRevMatch = revmatch(host, no_proxy);
@@ -372,7 +372,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
// users to enter host:port in the No-proxy-For list.
if (!isRevMatch && url.port() > 0)
{
- qhost += ':' + QString::number (url.port());
+ qhost += ':' + TQString::number (url.port());
host = qhost.latin1();
isRevMatch = revmatch (host, no_proxy);
}
@@ -390,7 +390,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
{
// The idea behind slave protocols is not applicable to http
// and webdav protocols.
- QString protocol = url.protocol().lower();
+ TQString protocol = url.protocol().lower();
if (protocol.startsWith("http") || protocol.startsWith("webdav"))
d->protocol = protocol;
else
@@ -408,20 +408,20 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
}
d->url = url;
- d->proxy = proxy = QString::null;
+ d->proxy = proxy = TQString::null;
d->protocol = url.protocol();
return d->protocol;
}
/*================================= USER-AGENT SETTINGS =====================*/
-QString KProtocolManager::userAgentForHost( const QString& hostname )
+TQString KProtocolManager::userAgentForHost( const TQString& hostname )
{
- QString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower();
+ TQString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower();
if (sendUserAgent == "false")
- return QString::null;
+ return TQString::null;
- QString useragent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent");
+ TQString useragent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent");
// Return the default user-agent if none is specified
// for the requested host.
@@ -431,56 +431,56 @@ QString KProtocolManager::userAgentForHost( const QString& hostname )
return useragent;
}
-QString KProtocolManager::defaultUserAgent( )
+TQString KProtocolManager::defaultUserAgent( )
{
- QString modifiers = KIO::SlaveConfig::self()->configData("http", QString::null, "UserAgentKeys");
+ TQString modifiers = KIO::SlaveConfig::self()->configData("http", TQString::null, "UserAgentKeys");
return defaultUserAgent(modifiers);
}
-QString KProtocolManager::defaultUserAgent( const QString &_modifiers )
+TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
{
if (!d)
d = new KProtocolManagerPrivate;
- QString modifiers = _modifiers.lower();
+ TQString modifiers = _modifiers.lower();
if (modifiers.isEmpty())
modifiers = DEFAULT_USER_AGENT_KEYS;
if (d->modifiers == modifiers)
return d->useragent;
- QString supp;
+ TQString supp;
struct utsname nam;
if( uname(&nam) >= 0 )
{
if( modifiers.contains('o') )
{
- supp += QString("; %1").arg(nam.sysname);
+ supp += TQString("; %1").arg(nam.sysname);
if ( modifiers.contains('v') )
- supp += QString(" %1").arg(nam.release);
+ supp += TQString(" %1").arg(nam.release);
}
if( modifiers.contains('p') )
{
// TODO: determine this value instead of hardcoding it...
- supp += QString::fromLatin1("; X11");
+ supp += TQString::fromLatin1("; X11");
}
if( modifiers.contains('m') )
{
- supp += QString("; %1").arg(nam.machine);
+ supp += TQString("; %1").arg(nam.machine);
}
if( modifiers.contains('l') )
{
- QStringList languageList = KGlobal::locale()->languageList();
- QStringList::Iterator it = languageList.find( QString::fromLatin1("C") );
+ TQStringList languageList = KGlobal::locale()->languageList();
+ TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if( it != languageList.end() )
{
- if( languageList.contains( QString::fromLatin1("en") ) > 0 )
+ if( languageList.contains( TQString::fromLatin1("en") ) > 0 )
languageList.remove( it );
else
- (*it) = QString::fromLatin1("en");
+ (*it) = TQString::fromLatin1("en");
}
if( languageList.count() )
- supp += QString("; %1").arg(languageList.join(", "));
+ supp += TQString("; %1").arg(languageList.join(", "));
}
}
d->modifiers = modifiers;
@@ -493,14 +493,14 @@ QString KProtocolManager::defaultUserAgent( const QString &_modifiers )
bool KProtocolManager::markPartial()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "MarkPartial", true );
}
int KProtocolManager::minimumKeepSize()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readNumEntry( "MinimumKeepSize",
DEFAULT_MINIMUM_KEEP_SIZE ); // 5000 byte
}
@@ -508,25 +508,25 @@ int KProtocolManager::minimumKeepSize()
bool KProtocolManager::autoResume()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "AutoResume", false );
}
bool KProtocolManager::persistentConnections()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "PersistentConnections", true );
}
bool KProtocolManager::persistentProxyConnection()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "PersistentProxyConnection", false );
}
-QString KProtocolManager::proxyConfigScript()
+TQString KProtocolManager::proxyConfigScript()
{
KConfig *cfg = config();
cfg->setGroup( "Proxy Settings" );
diff --git a/kio/kio/kprotocolmanager.h b/kio/kio/kprotocolmanager.h
index 7529bcdc4..ec59342af 100644
--- a/kio/kio/kprotocolmanager.h
+++ b/kio/kio/kprotocolmanager.h
@@ -20,7 +20,7 @@
#ifndef __kprotocolmanager_h__
#define __kprotocolmanager_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kio/global.h>
@@ -64,7 +64,7 @@ public:
*
* @return the default user-agent string
*/
- static QString defaultUserAgent();
+ static TQString defaultUserAgent();
/**
* Returns the default user-agent value.
@@ -77,20 +77,20 @@ public:
* @li 'l' Show language
* @return the default user-agent value with the given @p keys
*/
- static QString defaultUserAgent(const QString &keys);
+ static TQString defaultUserAgent(const TQString &keys);
/**
* Returns the userAgent string configured for the
* specified host.
*
* If hostname is not found or is empty (i.e. "" or
- * QString::null) this function will return the default
+ * TQString::null) this function will return the default
* user agent.
*
* @param hostname name of the host
* @return specified userAgent string
*/
- static QString userAgentForHost( const QString &hostname );
+ static TQString userAgentForHost( const TQString &hostname );
/*=========================== TIMEOUT CONFIG ================================*/
@@ -213,7 +213,7 @@ public:
*
* @see useReverseProxy, proxyFor, proxyForURL, slaveProtocol
*/
- static QString noProxyFor();
+ static TQString noProxyFor();
/**
* Same as above except the environment variable name
@@ -223,7 +223,7 @@ public:
* @see noProxyFor
* @since 3.5.x
*/
- static QString noProxyForRaw();
+ static TQString noProxyForRaw();
/**
* Returns the proxy server address for a given protocol.
@@ -234,9 +234,9 @@ public:
* @see useReverseProxy, slaveProtocol
* @param protocol the protocol whose proxy info is needed
* @returns the proxy server address if one is available,
- * or QString::null if not available
+ * or TQString::null if not available
*/
- static QString proxyFor( const QString& protocol );
+ static TQString proxyFor( const TQString& protocol );
/**
* Returns the proxy server address for a given URL.
@@ -254,20 +254,20 @@ public:
* @returns the proxy server address or the text "DIRECT"
* if no proxying is needed for the given address.
*/
- static QString proxyForURL( const KURL& url );
+ static TQString proxyForURL( const KURL& url );
/**
* Marks this proxy as bad (down). It will not be used for the
* next 30 minutes. (The script may supply an alternate proxy)
* @param proxy the proxy to mark as bad (as URL)
*/
- static void badProxy( const QString & proxy );
+ static void badProxy( const TQString & proxy );
/**
* Returns the URL of the script for automatic proxy configuration.
* @return the proxy configuration script
*/
- static QString proxyConfigScript();
+ static TQString proxyConfigScript();
/*========================== CACHE CONFIG ===================================*/
@@ -305,7 +305,7 @@ public:
* The directory which contains the cache files.
* @return the directory that contains the cache files
*/
- static QString cacheDir();
+ static TQString cacheDir();
/**
* Returns the Cache control directive to be used.
@@ -376,7 +376,7 @@ public:
* @param proxy the URL of the proxy to use
* @return the slave protocol (e.g. 'http'), can be null if unknown
*/
- static QString slaveProtocol(const KURL &url, QString &proxy);
+ static TQString slaveProtocol(const KURL &url, TQString &proxy);
/**
* @internal
diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp
index 449af8945..ebd7fda74 100644
--- a/kio/kio/kremoteencoding.cpp
+++ b/kio/kio/kremoteencoding.cpp
@@ -33,43 +33,43 @@ KRemoteEncoding::~KRemoteEncoding()
// delete d; // not necessary yet
}
-QString KRemoteEncoding::decode(const QCString& name) const
+TQString KRemoteEncoding::decode(const TQCString& name) const
{
#ifdef CHECK_UTF8
if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name))
- return QString::fromLatin1(name);
+ return TQString::fromLatin1(name);
#endif
- QString result = codec->toUnicode(name);
+ TQString result = codec->toUnicode(name);
if (codec->fromUnicode(result) != name)
// fallback in case of decoding failure
- return QString::fromLatin1(name);
+ return TQString::fromLatin1(name);
return result;
}
-QCString KRemoteEncoding::encode(const QString& name) const
+TQCString KRemoteEncoding::encode(const TQString& name) const
{
- QCString result = codec->fromUnicode(name);
+ TQCString result = codec->fromUnicode(name);
if (codec->toUnicode(result) != name)
return name.latin1();
return result;
}
-QCString KRemoteEncoding::encode(const KURL& url) const
+TQCString KRemoteEncoding::encode(const KURL& url) const
{
return encode(url.path());
}
-QCString KRemoteEncoding::directory(const KURL& url, bool ignore_trailing_slash) const
+TQCString KRemoteEncoding::directory(const KURL& url, bool ignore_trailing_slash) const
{
- QString dir = url.directory(true, ignore_trailing_slash);
+ TQString dir = url.directory(true, ignore_trailing_slash);
return encode(dir);
}
-QCString KRemoteEncoding::fileName(const KURL& url) const
+TQCString KRemoteEncoding::fileName(const KURL& url) const
{
return encode(url.fileName());
}
@@ -79,10 +79,10 @@ void KRemoteEncoding::setEncoding(const char *name)
// don't delete codecs
if (name)
- codec = QTextCodec::codecForName(name);
+ codec = TQTextCodec::codecForName(name);
if (codec == 0L)
- codec = QTextCodec::codecForMib(1);
+ codec = TQTextCodec::codecForMib(1);
kdDebug() << k_funcinfo << "setting encoding " << codec->name()
<< " for name=" << name << endl;
diff --git a/kio/kio/kremoteencoding.h b/kio/kio/kremoteencoding.h
index 4440091ba..35191d8e5 100644
--- a/kio/kio/kremoteencoding.h
+++ b/kio/kio/kremoteencoding.h
@@ -20,9 +20,9 @@
#define KREMOTEENCODING_H
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqtextcodec.h>
class KRemoteEncodingPrivate;
/**
@@ -62,19 +62,19 @@ public:
* This function is supposed to work for dirnames, filenames
* or a full pathname.
*/
- QString decode(const QCString& name) const;
+ TQString decode(const TQCString& name) const;
/**
* Converts the given name from Unicode.
* This function is supposed to work for dirnames, filenames
* or a full pathname.
*/
- QCString encode(const QString& name) const;
+ TQCString encode(const TQString& name) const;
/**
* Converts the given URL into its 8-bit components
*/
- QCString encode(const KURL& url) const;
+ TQCString encode(const KURL& url) const;
/**
* Converts the given URL into 8-bit form and separate the
@@ -83,12 +83,12 @@ public:
*
* The dirname is returned with the final slash always stripped
*/
- QCString directory(const KURL& url, bool ignore_trailing_slash = true) const;
+ TQCString directory(const KURL& url, bool ignore_trailing_slash = true) const;
/**
* Converts the given URL into 8-bit form and retrieve the filename.
*/
- QCString fileName(const KURL& url) const;
+ TQCString fileName(const KURL& url) const;
/**
* Returns the encoding being used.
@@ -112,7 +112,7 @@ public:
void setEncoding(const char* name);
protected:
- QTextCodec *codec;
+ TQTextCodec *codec;
virtual void virtual_hook(int id, void* data);
diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp
index 8da71c8a0..199a6b5b9 100644
--- a/kio/kio/krun.cpp
+++ b/kio/kio/krun.cpp
@@ -26,8 +26,8 @@
#include <unistd.h>
#include <typeinfo>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include "kuserprofile.h"
#include "kmimetype.h"
@@ -49,11 +49,11 @@
#include <kstandarddirs.h>
#include <kprocess.h>
#include <dcopclient.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kdesktopfile.h>
#include <kstartupinfo.h>
#include <kmacroexpander.h>
@@ -72,34 +72,34 @@ public:
bool m_showingError;
bool m_runExecutables;
- QString m_preferredService;
- QString m_externalBrowser;
- QString m_localPath;
- QString m_suggestedFileName;
- QGuardedPtr <QWidget> m_window;
- QCString m_asn;
+ TQString m_preferredService;
+ TQString m_externalBrowser;
+ TQString m_localPath;
+ TQString m_suggestedFileName;
+ TQGuardedPtr <TQWidget> m_window;
+ TQCString m_asn;
};
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype )
{
- return runURL( u, _mimetype, false, true, QString::null );
+ return runURL( u, _mimetype, false, true, TQString::null );
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile )
{
- return runURL( u, _mimetype, tempFile, true, QString::null );
+ return runURL( u, _mimetype, tempFile, true, TQString::null );
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile, bool runExecutables )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile, bool runExecutables )
{
- return runURL( u, _mimetype, tempFile, runExecutables, QString::null );
+ return runURL( u, _mimetype, tempFile, runExecutables, TQString::null );
}
-bool KRun::isExecutableFile( const KURL& url, const QString &mimetype )
+bool KRun::isExecutableFile( const KURL& url, const TQString &mimetype )
{
if ( !url.isLocalFile() )
return false;
- QFileInfo file( url.path() );
+ TQFileInfo file( url.path() );
if ( file.isExecutable() ) // Got a prospective file to run
{
KMimeType::Ptr mimeType = KMimeType::mimeType( mimetype );
@@ -110,14 +110,14 @@ bool KRun::isExecutableFile( const KURL& url, const QString &mimetype )
return false;
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile, bool runExecutables, const TQString& suggestedFileName )
{
return runURL( u, _mimetype, NULL, "", tempFile, runExecutables, suggestedFileName );
}
// This is called by foundMimeType, since it knows the mimetype of the URL
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, const QCString& asn,
- bool tempFile, bool runExecutables, const QString& suggestedFileName )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, TQWidget* window, const TQCString& asn,
+ bool tempFile, bool runExecutables, const TQString& suggestedFileName )
{
bool noRun = false;
bool noAuth = false;
@@ -138,9 +138,9 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
{
if (kapp->authorize("shell_access"))
{
- QString path = u.path();
+ TQString path = u.path();
shellQuote( path );
- return (KRun::runCommand(path, QString::null, QString::null, window, asn)); // just execute the url as a command
+ return (KRun::runCommand(path, TQString::null, TQString::null, window, asn)); // just execute the url as a command
// ## TODO implement deleting the file if tempFile==true
}
else
@@ -177,7 +177,7 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
KURL::List lst;
lst.append( u );
- static const QString& app_str = KGlobal::staticQString("Application");
+ static const TQString& app_str = KGlobal::staticQString("Application");
KService::Ptr offer = KServiceTypeProfile::preferredService( _mimetype, app_str );
@@ -194,15 +194,15 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
bool KRun::displayOpenWithDialog( const KURL::List& lst )
{
- return displayOpenWithDialog( lst, false, QString::null );
+ return displayOpenWithDialog( lst, false, TQString::null );
}
bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles )
{
- return displayOpenWithDialog( lst, tempFiles, QString::null );
+ return displayOpenWithDialog( lst, tempFiles, TQString::null );
}
-bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const QString& suggestedFileName )
+bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName )
{
if (kapp && !kapp->authorizeKAction("openwith"))
{
@@ -211,7 +211,7 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const Q
return false;
}
- KOpenWithDlg l( lst, i18n("Open with:"), QString::null, 0L );
+ KOpenWithDlg l( lst, i18n("Open with:"), TQString::null, 0L );
if ( l.exec() )
{
KService::Ptr service = l.service();
@@ -224,12 +224,12 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const Q
return false;
}
-void KRun::shellQuote( QString &_str )
+void KRun::shellQuote( TQString &_str )
{
// Credits to Walter, says Bernd G. :)
if (_str.isEmpty()) // Don't create an explicit empty parameter
return;
- QChar q('\'');
+ TQChar q('\'');
_str.replace(q, "'\\''").prepend(q).append(q);
}
@@ -241,14 +241,14 @@ public:
bool hasUrls:1, hasSpec:1;
protected:
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
const KService &service;
};
int
-KRunMX1::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KRunMX1::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
uint option = str[pos + 1];
switch( option ) {
@@ -290,16 +290,16 @@ public:
bool ignFile:1;
protected:
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- void subst( int option, const KURL &url, QStringList &ret );
+ void subst( int option, const KURL &url, TQStringList &ret );
const KURL::List &urls;
};
void
-KRunMX2::subst( int option, const KURL &url, QStringList &ret )
+KRunMX2::subst( int option, const KURL &url, TQStringList &ret )
{
switch( option ) {
case 'u':
@@ -315,7 +315,7 @@ KRunMX2::subst( int option, const KURL &url, QStringList &ret )
ret << url.fileName();
break;
case 'v':
- if (url.isLocalFile() && QFile::exists( url.path() ) )
+ if (url.isLocalFile() && TQFile::exists( url.path() ) )
ret << KDesktopFile( url.path(), true ).readEntry( "Dev" );
break;
}
@@ -323,7 +323,7 @@ KRunMX2::subst( int option, const KURL &url, QStringList &ret )
}
int
-KRunMX2::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KRunMX2::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
uint option = str[pos + 1];
switch( option ) {
@@ -358,36 +358,36 @@ KRunMX2::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
}
// BIC: merge methods below
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell) {
- return processDesktopExec( _service, _urls, has_shell, false, QString::null );
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell) {
+ return processDesktopExec( _service, _urls, has_shell, false, TQString::null );
}
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles)
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles)
{
- return processDesktopExec( _service, _urls, has_shell, tempFiles, QString::null );
+ return processDesktopExec( _service, _urls, has_shell, tempFiles, TQString::null );
}
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles, const QString& suggestedFileName)
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles, const TQString& suggestedFileName)
{
- QString exec = _service.exec();
- QStringList result;
+ TQString exec = _service.exec();
+ TQStringList result;
bool appHasTempFileOption;
KRunMX1 mx1( _service );
KRunMX2 mx2( _urls );
/// compatibility hack -- KDE 4: remove
- QRegExp re("^\\s*(?:/bin/)?sh\\s+-c\\s+(.*)$");
+ TQRegExp re("^\\s*(?:/bin/)?sh\\s+-c\\s+(.*)$");
if (!re.search( exec )) {
exec = re.cap( 1 ).stripWhiteSpace();
for (uint pos = 0; pos < exec.length(); ) {
- QChar c = exec.unicode()[pos];
+ TQChar c = exec.unicode()[pos];
if (c != '\'' && c != '"')
goto synerr; // what else can we do? after normal parsing the substs would be insecure
int pos2 = exec.find( c, pos + 1 ) - 1;
if (pos2 < 0)
goto synerr; // quoting error
- memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(QChar));
+ memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(TQChar));
pos = pos2;
exec.remove( pos, 2 );
}
@@ -470,14 +470,14 @@ QStringList KRun::processDesktopExec(const KService &_service, const KURL::List&
if (_service.terminal()) {
KConfigGroupSaver gs(KGlobal::config(), "General");
- QString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
+ TQString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
if (terminal == "konsole")
terminal += " -caption=%c %i %m";
terminal += " ";
terminal += _service.terminalOptions();
if( !mx1.expandMacrosShellQuote( terminal ) ) {
kdWarning() << "KRun: syntax error in command `" << terminal << "', service `" << _service.name() << "'" << endl;
- return QStringList();
+ return TQStringList();
}
mx2.expandMacrosShellQuote( terminal );
if (has_shell)
@@ -527,23 +527,23 @@ QStringList KRun::processDesktopExec(const KService &_service, const KURL::List&
synerr:
kdWarning() << "KRun: syntax error in command `" << _service.exec() << "', service `" << _service.name() << "'" << endl;
- return QStringList();
+ return TQStringList();
}
//static
-QString KRun::binaryName( const QString & execLine, bool removePath )
+TQString KRun::binaryName( const TQString & execLine, bool removePath )
{
// Remove parameters and/or trailing spaces.
- QStringList args = KShell::splitArgs( execLine );
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
+ TQStringList args = KShell::splitArgs( execLine );
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
if (!(*it).contains('='))
// Remove path if wanted
return removePath ? (*it).mid((*it).findRev('/') + 1) : *it;
- return QString::null;
+ return TQString::null;
}
-static pid_t runCommandInternal( KProcess* proc, const KService* service, const QString& binName,
- const QString &execName, const QString & iconName, QWidget* window, QCString asn )
+static pid_t runCommandInternal( KProcess* proc, const KService* service, const TQString& binName,
+ const TQString &execName, const TQString & iconName, TQWidget* window, TQCString asn )
{
if (service && !service->desktopEntryPath().isEmpty()
&& !KDesktopFile::isAuthorizedDesktopFile( service->desktopEntryPath() ))
@@ -552,10 +552,10 @@ static pid_t runCommandInternal( KProcess* proc, const KService* service, const
KMessageBox::sorry(window, i18n("You are not authorized to execute this file."));
return 0;
}
- QString bin = KRun::binaryName( binName, true );
+ TQString bin = KRun::binaryName( binName, true );
#ifdef Q_WS_X11 // Startup notification doesn't work with QT/E, service isn't needed without Startup notification
bool silent;
- QCString wmclass;
+ TQCString wmclass;
KStartupInfoId id;
bool startup_notify = ( asn != "0" && KRun::checkStartupNotify( binName, service, &silent, &wmclass ));
if( startup_notify )
@@ -600,10 +600,10 @@ static pid_t runCommandInternal( KProcess* proc, const KService* service, const
}
// This code is also used in klauncher.
-bool KRun::checkStartupNotify( const QString& /*binName*/, const KService* service, bool* silent_arg, QCString* wmclass_arg )
+bool KRun::checkStartupNotify( const TQString& /*binName*/, const KService* service, bool* silent_arg, TQCString* wmclass_arg )
{
bool silent = false;
- QCString wmclass;
+ TQCString wmclass;
if( service && service->property( "StartupNotify" ).isValid())
{
silent = !service->property( "StartupNotify" ).toBool();
@@ -644,14 +644,14 @@ bool KRun::checkStartupNotify( const QString& /*binName*/, const KService* servi
return true;
}
-static pid_t runTempService( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles, const QString& suggestedFileName )
+static pid_t runTempService( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles, const TQString& suggestedFileName )
{
if (!_urls.isEmpty()) {
kdDebug(7010) << "runTempService: first url " << _urls.first().url() << endl;
}
- QStringList args;
+ TQStringList args;
if ((_urls.count() > 1) && !_service.allowMultipleFiles())
{
// We need to launch the application N times. That sucks.
@@ -691,16 +691,16 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
{
// Check which protocols the application supports.
// This can be a list of actual protocol names, or just KIO for KDE apps.
- QStringList supportedProtocols = _service.property("X-KDE-Protocols").toStringList();
+ TQStringList supportedProtocols = _service.property("X-KDE-Protocols").toStringList();
KRunMX1 mx1( _service );
- QString exec = _service.exec();
+ TQString exec = _service.exec();
if ( mx1.expandMacrosShellQuote( exec ) && !mx1.hasUrls ) {
Q_ASSERT( supportedProtocols.isEmpty() ); // huh? If you support protocols you need %u or %U...
} else {
if ( supportedProtocols.isEmpty() )
{
// compat mode: assume KIO if not set and it's a KDE app
- QStringList categories = _service.property("Categories").toStringList();
+ TQStringList categories = _service.property("Categories").toStringList();
if ( categories.find("KDE") != categories.end() )
supportedProtocols.append( "KIO" );
else { // if no KDE app, be a bit over-generic
@@ -734,31 +734,31 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
// BIC merge methods below
pid_t KRun::run( const KService& _service, const KURL::List& _urls )
{
- return run( _service, _urls, 0, false, QString::null );
+ return run( _service, _urls, 0, false, TQString::null );
}
pid_t KRun::run( const KService& _service, const KURL::List& _urls, bool tempFiles )
{
- return run( _service, _urls, 0, tempFiles, QString::null );
+ return run( _service, _urls, 0, tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles )
{
- return run( _service, _urls, window, "", tempFiles, QString::null );
+ return run( _service, _urls, window, "", tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn, bool tempFiles )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, const TQCString& asn, bool tempFiles )
{
- return run( _service, _urls, window, asn, tempFiles, QString::null );
+ return run( _service, _urls, window, asn, tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles, const TQString& suggestedFileName )
{
return run( _service, _urls, window, "", tempFiles, suggestedFileName );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn,
- bool tempFiles, const QString& suggestedFileName )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, const TQCString& asn,
+ bool tempFiles, const TQString& suggestedFileName )
{
if (!_service.desktopEntryPath().isEmpty() &&
!KDesktopFile::isAuthorizedDesktopFile( _service.desktopEntryPath()))
@@ -792,11 +792,11 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* win
// Resolve urls if needed, depending on what the app supports
const KURL::List urls = resolveURLs( _urls, _service );
- QString error;
+ TQString error;
int pid = 0;
- QCString myasn = asn;
- // startServiceByDesktopPath() doesn't take QWidget*, add it to the startup info now
+ TQCString myasn = asn;
+ // startServiceByDesktopPath() doesn't take TQWidget*, add it to the startup info now
if( window != NULL )
{
if( myasn.isEmpty())
@@ -827,33 +827,33 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* win
}
-pid_t KRun::run( const QString& _exec, const KURL::List& _urls, const QString& _name,
- const QString& _icon, const QString&, const QString&)
+pid_t KRun::run( const TQString& _exec, const KURL::List& _urls, const TQString& _name,
+ const TQString& _icon, const TQString&, const TQString&)
{
KService::Ptr service = new KService(_name, _exec, _icon);
return run(*service, _urls);
}
-pid_t KRun::runCommand( QString cmd )
+pid_t KRun::runCommand( TQString cmd )
{
- return KRun::runCommand( cmd, QString::null, QString::null, NULL, "" );
+ return KRun::runCommand( cmd, TQString::null, TQString::null, NULL, "" );
}
-pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName )
+pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQString & iconName )
{
return KRun::runCommand( cmd, execName, iconName, NULL, "" );
}
-pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName,
- QWidget* window, const QCString& asn )
+pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQString & iconName,
+ TQWidget* window, const TQCString& asn )
{
kdDebug(7010) << "runCommand " << cmd << "," << execName << endl;
KProcess * proc = new KProcess;
proc->setUseShell(true);
*proc << cmd;
KService::Ptr service = KService::serviceByDesktopName( binaryName( execName, true ) );
- QString bin = binaryName( cmd, false );
+ TQString bin = binaryName( cmd, false );
int pos = bin.findRev( '/' );
if (pos != -1) {
proc->setWorkingDirectory( bin.mid(0, pos) );
@@ -867,21 +867,21 @@ KRun::KRun( const KURL& url, mode_t mode, bool isLocalFile, bool showProgressInf
init (url, 0, "", mode, isLocalFile, showProgressInfo);
}
-KRun::KRun( const KURL& url, QWidget* window, mode_t mode, bool isLocalFile,
+KRun::KRun( const KURL& url, TQWidget* window, mode_t mode, bool isLocalFile,
bool showProgressInfo )
:m_timer(0,"KRun::timer")
{
init (url, window, "", mode, isLocalFile, showProgressInfo);
}
-KRun::KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
+KRun::KRun( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode, bool isLocalFile,
bool showProgressInfo )
:m_timer(0,"KRun::timer")
{
init (url, window, asn, mode, isLocalFile, showProgressInfo);
}
-void KRun::init ( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
+void KRun::init ( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode, bool isLocalFile,
bool showProgressInfo )
{
m_bFault = false;
@@ -904,7 +904,7 @@ void KRun::init ( const KURL& url, QWidget* window, const QCString& asn, mode_t
// loop and do initialization afterwards.
// Reason: We must complete the constructor before we do anything else.
m_bInit = true;
- connect( &m_timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
+ connect( &m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) );
m_timer.start( 0, true );
kdDebug(7010) << " new KRun " << this << " " << url.prettyURL() << " timer=" << &m_timer << endl;
@@ -926,7 +926,7 @@ void KRun::init()
}
if ( !kapp->authorizeURLAction( "open", KURL(), m_strURL))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, m_strURL.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, m_strURL.prettyURL());
d->m_showingError = true;
KMessageBoxWrapper::error( d->m_window, msg );
d->m_showingError = false;
@@ -939,7 +939,7 @@ void KRun::init()
if ( !m_bIsLocalFile && m_strURL.isLocalFile() )
m_bIsLocalFile = true;
- QString exec;
+ TQString exec;
if (m_strURL.protocol().startsWith("http"))
{
exec = d->m_externalBrowser;
@@ -950,7 +950,7 @@ void KRun::init()
if ( m_mode == 0 )
{
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(m_strURL.path()), &buff ) == -1 )
+ if ( KDE_stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 )
{
d->m_showingError = true;
KMessageBoxWrapper::error( d->m_window, i18n( "<qt>Unable to run the command specified. The file or folder <b>%1</b> does not exist.</qt>" ).arg( m_strURL.htmlURL() ) );
@@ -1034,8 +1034,8 @@ void KRun::init()
// It may be a directory or a file, let's stat
KIO::StatJob *job = KIO::stat( m_strURL, true, 0 /* no details */, m_bProgressInfo );
job->setWindow (d->m_window);
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
m_job = job;
kdDebug(7010) << " Job " << job << " is about stating " << m_strURL.url() << endl;
}
@@ -1083,10 +1083,10 @@ void KRun::scanFile()
KIO::TransferJob *job = KIO::get( m_strURL, false /*reload*/, m_bProgressInfo );
job->setWindow (d->m_window);
- connect(job, SIGNAL( result(KIO::Job *)),
- this, SLOT( slotScanFinished(KIO::Job *)));
- connect(job, SIGNAL( mimetype(KIO::Job *, const QString &)),
- this, SLOT( slotScanMimeType(KIO::Job *, const QString &)));
+ connect(job, TQT_SIGNAL( result(KIO::Job *)),
+ this, TQT_SLOT( slotScanFinished(KIO::Job *)));
+ connect(job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotScanMimeType(KIO::Job *, const TQString &)));
m_job = job;
kdDebug(7010) << " Job " << job << " is about getting from " << m_strURL.url() << endl;
}
@@ -1153,7 +1153,7 @@ void KRun::slotStatResult( KIO::Job * job )
if(!dynamic_cast<KIO::StatJob*>(job))
kdFatal() << "job is a " << typeid(*job).name() << " should be a StatJob" << endl;
- QString knownMimeType;
+ TQString knownMimeType;
KIO::UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it = entry.begin();
for( ; it != entry.end(); it++ ) {
@@ -1190,7 +1190,7 @@ void KRun::slotStatResult( KIO::Job * job )
}
}
-void KRun::slotScanMimeType( KIO::Job *, const QString &mimetype )
+void KRun::slotScanMimeType( KIO::Job *, const TQString &mimetype )
{
if ( mimetype.isEmpty() )
kdWarning(7010) << "KRun::slotScanFinished : MimetypeJob didn't find a mimetype! Probably a kioslave bug." << endl;
@@ -1217,7 +1217,7 @@ void KRun::slotScanFinished( KIO::Job *job )
}
}
-void KRun::foundMimeType( const QString& type )
+void KRun::foundMimeType( const TQString& type )
{
kdDebug(7010) << "Resulting mime type is " << type << endl;
@@ -1233,7 +1233,7 @@ void KRun::foundMimeType( const QString& type )
KURL::List lst = KURL::split( m_strURL );
if ( lst.isEmpty() )
{
- QString tmp = i18n( "Malformed URL" );
+ TQString tmp = i18n( "Malformed URL" );
tmp += "\n";
tmp += m_strURL.url();
KMessageBoxWrapper::error( 0L, tmp );
@@ -1253,7 +1253,7 @@ void KRun::foundMimeType( const QString& type )
KURL::List::Iterator it = lst.begin();
++it;
(*lst.begin()).setRef( (*it).ref() );
- (*it).setRef( QString::null );
+ (*it).setRef( TQString::null );
// Create the new URL
m_strURL = KURL::join( lst );
@@ -1266,8 +1266,8 @@ void KRun::foundMimeType( const QString& type )
// (For instance a tar.gz is a directory contained inside a file)
// It may be a directory or a file, let's stat
KIO::StatJob *job = KIO::stat( m_strURL, m_bProgressInfo );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
m_job = job;
return;
@@ -1349,10 +1349,10 @@ void KRun::setEnableExternalBrowser(bool b)
if (b)
d->m_externalBrowser = KConfigGroup(KGlobal::config(), "General").readEntry("BrowserApplication");
else
- d->m_externalBrowser = QString::null;
+ d->m_externalBrowser = TQString::null;
}
-void KRun::setPreferredService( const QString& desktopEntryName )
+void KRun::setPreferredService( const TQString& desktopEntryName )
{
d->m_preferredService = desktopEntryName;
}
@@ -1362,12 +1362,12 @@ void KRun::setRunExecutables(bool b)
d->m_runExecutables = b;
}
-void KRun::setSuggestedFileName( const QString& fileName )
+void KRun::setSuggestedFileName( const TQString& fileName )
{
d->m_suggestedFileName = fileName;
}
-bool KRun::isExecutable( const QString& serviceType )
+bool KRun::isExecutable( const TQString& serviceType )
{
return ( serviceType == "application/x-desktop" ||
serviceType == "application/x-executable" ||
@@ -1378,27 +1378,27 @@ bool KRun::isExecutable( const QString& serviceType )
/****************/
pid_t
-KProcessRunner::run(KProcess * p, const QString & binName)
+KProcessRunner::run(KProcess * p, const TQString & binName)
{
return (new KProcessRunner(p, binName))->pid();
}
#ifdef Q_WS_X11
pid_t
-KProcessRunner::run(KProcess * p, const QString & binName, const KStartupInfoId& id )
+KProcessRunner::run(KProcess * p, const TQString & binName, const KStartupInfoId& id )
{
return (new KProcessRunner(p, binName, id))->pid();
}
#endif
-KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName )
- : QObject(),
+KProcessRunner::KProcessRunner(KProcess * p, const TQString & _binName )
+ : TQObject(),
process_(p),
binName( _binName )
{
- QObject::connect(
- process_, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
+ TQObject::connect(
+ process_, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
process_->start();
if ( !process_->pid() )
@@ -1406,15 +1406,15 @@ KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName )
}
#ifdef Q_WS_X11
-KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName, const KStartupInfoId& id )
- : QObject(),
+KProcessRunner::KProcessRunner(KProcess * p, const TQString & _binName, const KStartupInfoId& id )
+ : TQObject(),
process_(p),
binName( _binName ),
id_( id )
{
- QObject::connect(
- process_, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
+ TQObject::connect(
+ process_, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
process_->start();
if ( !process_->pid() )
@@ -1450,7 +1450,7 @@ KProcessRunner::slotProcessExited(KProcess * p)
// We can't just rely on that, but it's a good hint.
// Before assuming its really so, we'll try to find the binName
// relatively to current directory, and then in the PATH.
- if ( !QFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() )
+ if ( !TQFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() )
{
kapp->ref();
KMessageBox::sorry( 0L, i18n("Could not find the program '%1'").arg( binName ) );
diff --git a/kio/kio/krun.h b/kio/kio/krun.h
index 385b227af..17fa434e3 100644
--- a/kio/kio/krun.h
+++ b/kio/kio/krun.h
@@ -24,9 +24,9 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kstartupinfo.h>
@@ -109,9 +109,9 @@ public:
* a very slow FTP server...
* It is always better to provide progress info in such cases.
*/
- KRun( const KURL& url, QWidget* window, mode_t mode = 0,
+ KRun( const KURL& url, TQWidget* window, mode_t mode = 0,
bool isLocalFile = false, bool showProgressInfo = true );
- KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode = 0,
+ KRun( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode = 0,
bool isLocalFile = false, bool showProgressInfo = true );
/**
@@ -169,7 +169,7 @@ public:
* the recent documents list.
* @param desktopEntryName the desktopEntryName of the service, e.g. "kate".
*/
- void setPreferredService( const QString& desktopEntryName );
+ void setPreferredService( const TQString& desktopEntryName );
/**
* Sets whether executables, .desktop files or shell scripts should
@@ -197,7 +197,7 @@ public:
* file name.
* @since 3.5.3
*/
- void setSuggestedFileName( const QString& fileName );
+ void setSuggestedFileName( const TQString& fileName );
/**
* Open a list of URLs with a certain service (application).
@@ -211,9 +211,9 @@ public:
* @return the process id, or 0 on error
* @since 3.5.2
*/
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles = false );
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles = false );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles = false );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles = false );
/**
* Open a list of URLs with a certain service (application).
*
@@ -229,9 +229,9 @@ public:
static pid_t run( const KService& _service, const KURL::List& _urls );
/// @since 3.5.3
/// @internal
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName );
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles, const QString& suggestedFileName );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles, const TQString& suggestedFileName );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles, const TQString& suggestedFileName );
/**
* Open a list of URLs with.
@@ -246,11 +246,11 @@ public:
* @param _obsolete2 Do not use!
* @return the process id, or 0 on error
*/
- static pid_t run( const QString& _exec, const KURL::List& _urls,
- const QString& _name = QString::null,
- const QString& _icon = QString::null,
- const QString& _obsolete1 = QString::null,
- const QString& _obsolete2 = QString::null );
+ static pid_t run( const TQString& _exec, const KURL::List& _urls,
+ const TQString& _name = TQString::null,
+ const TQString& _icon = TQString::null,
+ const TQString& _obsolete1 = TQString::null,
+ const TQString& _obsolete2 = TQString::null );
/**
* Open the given URL.
@@ -270,13 +270,13 @@ public:
// BIC Merge second overload with first one using runExecutables=true, and
// merge third overload with first one as well using tempFiles=false and
// runExecutables=true
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile, bool runExecutables);
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile);
- static pid_t runURL( const KURL& _url, const QString& _mimetype );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile, bool runExecutables);
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile);
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype );
/// @since 3.5.3
/// @internal
- static pid_t runURL( const KURL& _url, const QString& _mimetype, QWidget* window, const QCString& asn, bool tempFile, bool runExecutables, const QString& suggestedFileName );
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, TQWidget* window, const TQCString& asn, bool tempFile, bool runExecutables, const TQString& suggestedFileName );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile, bool runExecutables, const TQString& suggestedFileName );
/**
* Run the given shell command and notifies kicker of the starting
@@ -292,7 +292,7 @@ public:
* @return PID of running command, 0 if it could not be started, 0 - (PID
* of running command) if command was unsafe for map notification.
*/
- static pid_t runCommand( QString cmd );
+ static pid_t runCommand( TQString cmd );
/**
* Same as the other runCommand(), but it also takes the name of the
@@ -305,9 +305,9 @@ public:
* @return PID of running command, 0 if it could not be started, 0 - (PID
* of running command) if command was unsafe for map notification.
*/
- static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon );
- static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon,
- QWidget* window, const QCString& asn );
+ static pid_t runCommand( const TQString& cmd, const TQString & execName, const TQString & icon );
+ static pid_t runCommand( const TQString& cmd, const TQString & execName, const TQString & icon,
+ TQWidget* window, const TQCString& asn );
/**
* Display the Open-With dialog for those URLs, and run the chosen application.
@@ -321,13 +321,13 @@ public:
static bool displayOpenWithDialog( const KURL::List& lst );
/// @since 3.5.3
/// @internal
- static bool displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const QString& suggestedFileName );
+ static bool displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName );
/**
* Quotes a string for the shell.
* @param _str the string to quote. The quoted string will be written here
*/
- static void shellQuote( QString &_str );
+ static void shellQuote( TQString &_str );
/**
* Processes a Exec= line as found in .desktop files.
@@ -343,11 +343,11 @@ public:
* when the application exits.
* @return a list of arguments suitable for either system() or exec().
*/
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles);
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell);
/// @since 3.5.3
/// @internal
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles, const QString& suggestedFileName);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles, const TQString& suggestedFileName);
/**
* Given a full command line (e.g. the Exec= line from a .desktop file),
@@ -357,14 +357,14 @@ public:
* @return the name of the binary to run
* @since 3.1
*/
- static QString binaryName( const QString & execLine, bool removePath );
+ static TQString binaryName( const TQString & execLine, bool removePath );
/**
* Returns whether @p serviceType refers to an executable program instead
* of a data file.
* @since 3.2
*/
- static bool isExecutable( const QString& serviceType );
+ static bool isExecutable( const TQString& serviceType );
/**
* Returns wether the @p url of @p mimetype is executable.
@@ -379,13 +379,13 @@ public:
* to the mimetype's desktop file.
* @since 3.3
*/
- static bool isExecutableFile( const KURL& url, const QString &mimetype );
+ static bool isExecutableFile( const KURL& url, const TQString &mimetype );
/**
* @internal
* @since 3.4
*/
- static bool checkStartupNotify( const QString& binName, const KService* service, bool* silent_arg, QCString* wmclass_arg );
+ static bool checkStartupNotify( const TQString& binName, const KService* service, bool* silent_arg, TQCString* wmclass_arg );
signals:
/**
@@ -402,7 +402,7 @@ signals:
protected slots:
void slotTimeout();
void slotScanFinished( KIO::Job * );
- void slotScanMimeType( KIO::Job *, const QString &type );
+ void slotScanMimeType( KIO::Job *, const TQString &type );
virtual void slotStatResult( KIO::Job * );
protected:
@@ -415,7 +415,7 @@ protected:
* whether the document and appends the gzip protocol to the
* URL. Otherwise runURL is called to finish the job.
*/
- virtual void foundMimeType( const QString& _type );
+ virtual void foundMimeType( const TQString& _type );
virtual void killJob();
@@ -425,7 +425,7 @@ protected:
bool m_bProgressInfo;
bool m_bFinished;
KIO::Job * m_job;
- QTimer m_timer;
+ TQTimer m_timer;
/**
* Used to indicate that the next action is to scan the file.
@@ -447,7 +447,7 @@ protected:
virtual void virtual_hook( int id, void* data );
private:
- void init (const KURL& url, QWidget* window, const QCString& asn, mode_t mode,
+ void init (const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode,
bool isLocalFile, bool showProgressInfo);
private:
class KRunPrivate;
@@ -481,9 +481,9 @@ class KIO_EXPORT KProcessRunner : public QObject
public:
- static pid_t run(KProcess *, const QString & binName);
+ static pid_t run(KProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
- static pid_t run(KProcess *, const QString & binName, const KStartupInfoId& id );
+ static pid_t run(KProcess *, const TQString & binName, const KStartupInfoId& id );
#endif
virtual ~KProcessRunner();
@@ -496,14 +496,14 @@ class KIO_EXPORT KProcessRunner : public QObject
private:
- KProcessRunner(KProcess *, const QString & binName);
+ KProcessRunner(KProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
- KProcessRunner(KProcess *, const QString & binName, const KStartupInfoId& id );
+ KProcessRunner(KProcess *, const TQString & binName, const KStartupInfoId& id );
#endif
KProcessRunner();
KProcess * process_;
- QString binName;
+ TQString binName;
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
KStartupInfoId id_;
#endif
diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp
index 11a1b4fde..defeae4a7 100644
--- a/kio/kio/ksambashare.cpp
+++ b/kio/kio/ksambashare.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdirwatch.h>
#include <kstaticdeleter.h>
@@ -36,8 +36,8 @@ public:
bool findSmbConf();
bool load();
- QDict<bool> sharedPaths;
- QString smbConf;
+ TQDict<bool> sharedPaths;
+ TQString smbConf;
};
KSambaSharePrivate::KSambaSharePrivate()
@@ -62,28 +62,28 @@ bool KSambaSharePrivate::load() {
* @return wether a smb.conf was found.
**/
bool KSambaSharePrivate::findSmbConf() {
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
smbConf = config.readEntry("SMBCONF");
- if ( QFile::exists(smbConf) )
+ if ( TQFile::exists(smbConf) )
return true;
- if ( QFile::exists("/etc/samba/smb.conf") )
+ if ( TQFile::exists("/etc/samba/smb.conf") )
smbConf = "/etc/samba/smb.conf";
else
- if ( QFile::exists("/etc/smb.conf") )
+ if ( TQFile::exists("/etc/smb.conf") )
smbConf = "/etc/smb.conf";
else
- if ( QFile::exists("/usr/local/samba/lib/smb.conf") )
+ if ( TQFile::exists("/usr/local/samba/lib/smb.conf") )
smbConf = "/usr/local/samba/lib/smb.conf";
else
- if ( QFile::exists("/usr/samba/lib/smb.conf") )
+ if ( TQFile::exists("/usr/samba/lib/smb.conf") )
smbConf = "/usr/samba/lib/smb.conf";
else
- if ( QFile::exists("/usr/lib/smb.conf") )
+ if ( TQFile::exists("/usr/lib/smb.conf") )
smbConf = "/usr/lib/smb.conf";
else
- if ( QFile::exists("/usr/local/lib/smb.conf") )
+ if ( TQFile::exists("/usr/local/lib/smb.conf") )
smbConf = "/usr/local/lib/smb.conf";
else {
kdDebug(7000) << "KSambaShare: Could not found smb.conf!" << endl;
@@ -99,7 +99,7 @@ bool KSambaSharePrivate::findSmbConf() {
* and fills the sharedPaths dict with the values
*/
bool KSambaSharePrivate::readSmbConf() {
- QFile f(smbConf);
+ TQFile f(smbConf);
kdDebug(7000) << "KSambaShare::readSmbConf " << smbConf << endl;
@@ -110,14 +110,14 @@ bool KSambaSharePrivate::readSmbConf() {
sharedPaths.clear();
- QTextStream s(&f);
+ TQTextStream s(&f);
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
+ TQString completeLine;
while (!s.eof())
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine) {
completeLine += currentLine;
@@ -148,8 +148,8 @@ bool KSambaSharePrivate::readSmbConf() {
if (i>-1)
{
- QString name = completeLine.left(i).stripWhiteSpace().lower();
- QString value = completeLine.mid(i+1).stripWhiteSpace();
+ TQString name = completeLine.left(i).stripWhiteSpace().lower();
+ TQString value = completeLine.mid(i+1).stripWhiteSpace();
if (name == KGlobal::staticQString("path")) {
// Handle quotation marks
@@ -178,44 +178,44 @@ bool KSambaSharePrivate::readSmbConf() {
KSambaShare::KSambaShare() {
d = new KSambaSharePrivate();
- if (QFile::exists(d->smbConf)) {
+ if (TQFile::exists(d->smbConf)) {
KDirWatch::self()->addFile(d->smbConf);
KDirWatch::self()->addFile(FILESHARECONF);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString&)));
}
}
KSambaShare::~KSambaShare() {
- if (QFile::exists(d->smbConf)) {
+ if (TQFile::exists(d->smbConf)) {
KDirWatch::self()->removeFile(d->smbConf);
KDirWatch::self()->removeFile(FILESHARECONF);
}
delete d;
}
-QString KSambaShare::smbConfPath() const {
+TQString KSambaShare::smbConfPath() const {
return d->smbConf;
}
-bool KSambaShare::isDirectoryShared( const QString & path ) const {
- QString fixedPath = path;
+bool KSambaShare::isDirectoryShared( const TQString & path ) const {
+ TQString fixedPath = path;
if ( path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.find(fixedPath) != 0;
}
-QStringList KSambaShare::sharedDirectories() const {
- QStringList result;
- QDictIterator<bool> it(d->sharedPaths);
+TQStringList KSambaShare::sharedDirectories() const {
+ TQStringList result;
+ TQDictIterator<bool> it(d->sharedPaths);
for( ; it.current(); ++it )
result << it.currentKey();
return result;
}
-void KSambaShare::slotFileChange( const QString & path ) {
+void KSambaShare::slotFileChange( const TQString & path ) {
if (path == d->smbConf)
d->readSmbConf();
else
diff --git a/kio/kio/ksambashare.h b/kio/kio/ksambashare.h
index 714353d76..383bd702f 100644
--- a/kio/kio/ksambashare.h
+++ b/kio/kio/ksambashare.h
@@ -19,7 +19,7 @@
#ifndef ksambashare_h
#define ksambashare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -31,7 +31,7 @@ class KSambaSharePrivate;
* any suid script.
* Singleton class, call instance() to get an instance.
*/
-class KIO_EXPORT KSambaShare : public QObject
+class KIO_EXPORT KSambaShare : public TQObject
{
Q_OBJECT
public:
@@ -45,14 +45,14 @@ public:
* @param path the path to check if it is shared by Samba.
* @return whether the given path is shared by Samba.
*/
- bool isDirectoryShared( const QString & path ) const;
+ bool isDirectoryShared( const TQString & path ) const;
/**
* Returns a list of all directories shared by Samba.
* The resulting list is not sorted.
* @return a list of all directories shared by Samba.
*/
- QStringList sharedDirectories() const;
+ TQStringList sharedDirectories() const;
/**
* KSambaShare destructor.
@@ -65,7 +65,7 @@ public:
* Returns the path to the used smb.conf file
* or null if no file was found
*/
- QString smbConfPath() const;
+ TQString smbConfPath() const;
signals:
/**
@@ -79,7 +79,7 @@ private:
KSambaSharePrivate* d;
private slots:
- void slotFileChange(const QString&);
+ void slotFileChange(const TQString&);
};
#endif
diff --git a/kio/kio/kscan.cpp b/kio/kio/kscan.cpp
index be49e5c14..21e8086b8 100644
--- a/kio/kio/kscan.cpp
+++ b/kio/kio/kscan.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <ktrader.h>
@@ -25,7 +25,7 @@
#include "kscan.h"
// static factory method
-KScanDialog * KScanDialog::getScanDialog( QWidget *parent, const char *name,
+KScanDialog * KScanDialog::getScanDialog( TQWidget *parent, const char *name,
bool modal )
{
KTrader::OfferList offers = KTrader::self()->query("KScan/KScanDialog");
@@ -33,22 +33,22 @@ KScanDialog * KScanDialog::getScanDialog( QWidget *parent, const char *name,
return 0L;
KService::Ptr ptr = *(offers.begin());
- KLibFactory *factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if ( !factory )
return 0;
- QStringList args;
- args << QString::number( (int)modal );
+ TQStringList args;
+ args << TQString::number( (int)modal );
- QObject *res = factory->create( parent, name, "KScanDialog", args );
+ TQObject *res = factory->create( parent, name, "KScanDialog", args );
return dynamic_cast<KScanDialog *>( res );
}
KScanDialog::KScanDialog( int dialogFace, int buttonMask,
- QWidget *parent, const char *name, bool modal )
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, i18n("Acquire Image"), buttonMask, Close,
parent, name, modal, true ),
m_currentId( 1 )
@@ -68,7 +68,7 @@ bool KScanDialog::setup()
// static factory method
-KOCRDialog * KOCRDialog::getOCRDialog( QWidget *parent, const char *name,
+KOCRDialog * KOCRDialog::getOCRDialog( TQWidget *parent, const char *name,
bool modal )
{
KTrader::OfferList offers = KTrader::self()->query("KScan/KOCRDialog");
@@ -76,22 +76,22 @@ KOCRDialog * KOCRDialog::getOCRDialog( QWidget *parent, const char *name,
return 0L;
KService::Ptr ptr = *(offers.begin());
- KLibFactory *factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if ( !factory )
return 0;
- QStringList args;
- args << QString::number( (int)modal );
+ TQStringList args;
+ args << TQString::number( (int)modal );
- QObject *res = factory->create( parent, name, "KOCRDialog", args );
+ TQObject *res = factory->create( parent, name, "KOCRDialog", args );
return dynamic_cast<KOCRDialog *>( res );
}
KOCRDialog::KOCRDialog( int dialogFace, int buttonMask,
- QWidget *parent, const char *name, bool modal )
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, i18n("OCR Image"), buttonMask, Close,
parent, name, modal, true ),
m_currentId( 1 )
@@ -107,7 +107,7 @@ KOCRDialog::~KOCRDialog()
///////////////////////////////////////////////////////////////////
-KScanDialogFactory::KScanDialogFactory( QObject *parent, const char *name )
+KScanDialogFactory::KScanDialogFactory( TQObject *parent, const char *name )
: KLibFactory( parent, name ),
m_instance( 0L )
{
@@ -118,9 +118,9 @@ KScanDialogFactory::~KScanDialogFactory()
delete m_instance;
}
-QObject *KScanDialogFactory::createObject( QObject *parent, const char *name,
+TQObject *KScanDialogFactory::createObject( TQObject *parent, const char *name,
const char *classname,
- const QStringList &args )
+ const TQStringList &args )
{
if ( strcmp( classname, "KScanDialog" ) != 0 )
return 0;
@@ -133,14 +133,14 @@ QObject *KScanDialogFactory::createObject( QObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<QWidget *>( parent ), name, modal );
+ return createDialog( static_cast<TQWidget *>( parent ), name, modal );
}
///////////////////////////////////////////////////////////////////
-KOCRDialogFactory::KOCRDialogFactory( QObject *parent, const char *name )
+KOCRDialogFactory::KOCRDialogFactory( TQObject *parent, const char *name )
: KLibFactory( parent, name ),
m_instance( 0L )
{
@@ -151,9 +151,9 @@ KOCRDialogFactory::~KOCRDialogFactory()
delete m_instance;
}
-QObject *KOCRDialogFactory::createObject( QObject *parent, const char *name,
+TQObject *KOCRDialogFactory::createObject( TQObject *parent, const char *name,
const char *classname,
- const QStringList &args )
+ const TQStringList &args )
{
if ( strcmp( classname, "KOCRDialog" ) != 0 )
return 0;
@@ -166,7 +166,7 @@ QObject *KOCRDialogFactory::createObject( QObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<QWidget *>( parent ), name, modal );
+ return createDialog( static_cast<TQWidget *>( parent ), name, modal );
}
void KScanDialog::virtual_hook( int id, void* data )
diff --git a/kio/kio/kscan.h b/kio/kio/kscan.h
index 97311a557..6ed5df667 100644
--- a/kio/kio/kscan.h
+++ b/kio/kio/kscan.h
@@ -43,8 +43,8 @@ class QImage;
* if ( !m_scanDialog ) // no scanning support installed?
* return;
*
- * connect( m_scanDialog, SIGNAL( finalImage( const QImage&, int )),
- * SLOT( slotScanned( const QImage&, int ) ));
+ * connect( m_scanDialog, TQT_SIGNAL( finalImage( const TQImage&, int )),
+ * TQT_SLOT( slotScanned( const TQImage&, int ) ));
* }
*
* if ( m_scanDialog->setup() ) // only if scanner configured/available
@@ -71,11 +71,11 @@ public:
* is available. Pass a suitable @p parent widget, if you like. If you
* don't you have to 'delete' the returned pointer yourself.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @return the KScanDialog, or 0 if the function failed
*/
- static KScanDialog * getScanDialog( QWidget *parent=0L,
+ static KScanDialog * getScanDialog( TQWidget *parent=0L,
const char *name=0, bool modal=false );
/**
* Destructs the scan dialog.
@@ -101,12 +101,12 @@ protected:
* @param buttonMask a ORed mask of all buttons (see
* KDialogBase::ButtonCode)
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @see KDialogBase
*/
KScanDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
- QWidget *parent=0L, const char *name=0, bool modal=false );
+ TQWidget *parent=0L, const char *name=0, bool modal=false );
/**
* Returns the current id for an image. You can use that in your subclass
@@ -140,7 +140,7 @@ signals:
* @param img the image
* @param id the image's id
*/
- void preview( const QImage &img, int id );
+ void preview( const TQImage &img, int id );
/**
* Informs you that an image has scanned. @p id is the same as in the
@@ -151,17 +151,17 @@ signals:
* @param img the image
* @param id the image's id
*/
- void finalImage( const QImage &img, int id );
+ void finalImage( const TQImage &img, int id );
/**
* Informs you that the image with the id @p id has been run through
- * text-recognition. The text is in the QString parameter. In the future,
+ * text-recognition. The text is in the TQString parameter. In the future,
* a compound document, using rich text will be used instead.
*
* @param text the text that has been recognized
* @param id the id of the image
*/
- void textRecognized( const QString &text, int id );
+ void textRecognized( const TQString &text, int id );
private:
int m_currentId;
@@ -188,30 +188,30 @@ public:
* Your library should reimplement this method to return your KScanDialog
* derived dialog.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
- virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0,
+ virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0,
bool modal=false ) = 0;
protected:
/**
* Creates a new KScanDialogFactory.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
*/
- KScanDialogFactory( QObject *parent=0, const char *name=0 );
+ KScanDialogFactory( TQObject *parent=0, const char *name=0 );
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() );
/**
* Creates a new instance with the given name.
* @param instanceName the name of the instance
*/
- void setName( const QCString& instanceName ) {
+ void setName( const TQCString& instanceName ) {
delete m_instance;
m_instance = new KInstance( instanceName );
}
@@ -244,11 +244,11 @@ public:
* is available. Pass a suitable @p parent widget, if you like. If you
* don't you have to 'delete' the returned pointer yourself.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @return the KOCRDialog, or 0 if the function failed
*/
- static KOCRDialog * getOCRDialog( QWidget *parent=0L,
+ static KOCRDialog * getOCRDialog( TQWidget *parent=0L,
const char *name=0, bool modal=false );
~KOCRDialog();
@@ -261,11 +261,11 @@ protected:
* @param buttonMask a ORed mask of all buttons (see
* KDialogBase::ButtonCode)
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
- QWidget *parent=0L, const char *name=0, bool modal=false );
+ TQWidget *parent=0L, const char *name=0, bool modal=false );
/**
* Returns the current id for an image. You can use that in your subclass
@@ -291,13 +291,13 @@ protected:
signals:
/**
* Informs you that the image with the id @p id has been run through
- * text-recognition. The text is in the QString parameter. In the future,
+ * text-recognition. The text is in the TQString parameter. In the future,
* a compound document, using rich text will be used instead.
*
* @param text the text that has been recognized
* @param id the id of the image
*/
- void textRecognized( const QString &text, int id );
+ void textRecognized( const TQString &text, int id );
private:
int m_currentId;
@@ -324,30 +324,30 @@ public:
* Your library should reimplement this method to return your KOCRDialog
* derived dialog.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
- virtual KOCRDialog * createDialog( QWidget *parent=0, const char *name=0,
+ virtual KOCRDialog * createDialog( TQWidget *parent=0, const char *name=0,
bool modal=false ) = 0;
protected:
/**
* Creates a new KScanDialogFactory.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
*/
- KOCRDialogFactory( QObject *parent=0, const char *name=0 );
+ KOCRDialogFactory( TQObject *parent=0, const char *name=0 );
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* className = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* className = "TQObject",
+ const TQStringList &args = TQStringList() );
/**
* Creates a new instance with the given name.
* @param instanceName the name of the instance
*/
- void setName( const QCString& instanceName ) {
+ void setName( const TQCString& instanceName ) {
delete m_instance;
m_instance = new KInstance( instanceName );
}
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index d33e33530..2122010b2 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -31,10 +31,10 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtl.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtl.h>
#include <ksimpleconfig.h>
#include <kapplication.h>
@@ -56,12 +56,12 @@
class KService::KServicePrivate
{
public:
- QStringList categories;
- QString menuId;
+ TQStringList categories;
+ TQString menuId;
};
-KService::KService( const QString & _name, const QString &_exec, const QString &_icon)
- : KSycocaEntry( QString::null)
+KService::KService( const TQString & _name, const TQString &_exec, const TQString &_icon)
+ : KSycocaEntry( TQString::null)
{
d = new KServicePrivate;
m_bValid = true;
@@ -76,7 +76,7 @@ KService::KService( const QString & _name, const QString &_exec, const QString &
}
-KService::KService( const QString & _fullpath )
+KService::KService( const TQString & _fullpath )
: KSycocaEntry( _fullpath)
{
KDesktopFile config( _fullpath );
@@ -96,12 +96,12 @@ KService::init( KDesktopFile *config )
d = new KServicePrivate;
m_bValid = true;
- bool absPath = !QDir::isRelativePath(entryPath());
+ bool absPath = !TQDir::isRelativePath(entryPath());
bool kde4application = config->fileName().startsWith("/usr/share/applications/kde4/");
config->setDesktopGroup();
- QMap<QString, QString> entryMap = config->entryMap(config->group());
+ TQMap<TQString, TQString> entryMap = config->entryMap(config->group());
entryMap.remove("Encoding"); // reserved as part of Desktop Entry Standard
entryMap.remove("Version"); // reserved as part of Desktop Entry Standard
@@ -162,7 +162,7 @@ KService::init( KDesktopFile *config )
return;
}
- QString resource = config->resource();
+ TQString resource = config->resource();
if ( (m_strType == "Application") &&
(!resource.isEmpty()) &&
@@ -188,7 +188,7 @@ KService::init( KDesktopFile *config )
return;
}
- QString name = entryPath();
+ TQString name = entryPath();
int pos = name.findRev('/');
if (pos != -1)
name = name.mid(pos+1);
@@ -204,7 +204,7 @@ KService::init( KDesktopFile *config )
if (space==-1)
m_strExec = KStandardDirs::findExe(m_strExec);
else {
- const QString command = m_strExec.left(space);
+ const TQString command = m_strExec.left(space);
m_strExec.replace(command,KStandardDirs::findExe(command));
}
}
@@ -213,9 +213,9 @@ KService::init( KDesktopFile *config )
m_strIcon = config->readEntry( "Icon", "unknown" );
if (kde4application) {
- if (QFile::exists("/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
+ if (TQFile::exists("/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
m_strIcon = "/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png";
- } else if (QFile::exists("/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
+ } else if (TQFile::exists("/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
m_strIcon = "/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png";
}
}
@@ -233,7 +233,7 @@ KService::init( KDesktopFile *config )
m_strGenName += " [KDE4]";
}
entryMap.remove("GenericName");
- QString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
+ TQString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
if (!untranslatedGenericName.isEmpty())
entryMap.insert("UntranslatedGenericName", untranslatedGenericName);
@@ -257,7 +257,7 @@ KService::init( KDesktopFile *config )
// Applications implement the service type "Application" ;-)
m_lstServiceTypes += "Application";
- QString dcopServiceType = config->readEntry("X-DCOP-ServiceType").lower();
+ TQString dcopServiceType = config->readEntry("X-DCOP-ServiceType").lower();
entryMap.remove("X-DCOP-ServiceType");
if (dcopServiceType == "unique")
m_DCOPServiceType = DCOP_Unique;
@@ -279,21 +279,21 @@ KService::init( KDesktopFile *config )
entryMap.remove("InitialPreference");
// Store all additional entries in the property map.
- // A QMap<QString,QString> would be easier for this but we can't
+ // A TQMap<TQString,TQString> would be easier for this but we can't
// brake BC, so we have to store it in m_mapProps.
// qWarning("Path = %s", entryPath().latin1());
- QMap<QString,QString>::ConstIterator it = entryMap.begin();
+ TQMap<TQString,TQString>::ConstIterator it = entryMap.begin();
for( ; it != entryMap.end();++it)
{
//qDebug(" Key = %s Data = %s", it.key().latin1(), it.data().latin1());
- QString key = it.key();
+ TQString key = it.key();
if (kde4application && key=="OnlyShowIn" && it.data()=="KDE;")
key = "NotShowIn";
- m_mapProps.insert( key, QVariant( it.data()));
+ m_mapProps.insert( key, TQVariant( it.data()));
}
}
-KService::KService( QDataStream& _str, int offset ) : KSycocaEntry( _str, offset )
+KService::KService( TQDataStream& _str, int offset ) : KSycocaEntry( _str, offset )
{
d = new KServicePrivate;
load( _str );
@@ -305,12 +305,12 @@ KService::~KService()
delete d;
}
-QPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, QString * _path ) const
+TQPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -319,14 +319,14 @@ QPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, QStr
return iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path );
}
-void KService::load( QDataStream& s )
+void KService::load( TQDataStream& s )
{
// dummies are here because of fields that were removed, to keep bin compat.
// Feel free to re-use, but fields for Applications only (not generic services)
// should rather be added to application.desktop
Q_INT8 def, term, dummy1, dummy2;
Q_INT8 dst, initpref;
- QString dummyStr1, dummyStr2;
+ TQString dummyStr1, dummyStr2;
int dummyI1, dummyI2;
Q_UINT32 dummyUI32;
@@ -352,14 +352,14 @@ void KService::load( QDataStream& s )
m_bValid = true;
}
-void KService::save( QDataStream& s )
+void KService::save( TQDataStream& s )
{
KSycocaEntry::save( s );
Q_INT8 def = m_bAllowAsDefault, initpref = m_initialPreference;
Q_INT8 term = m_bTerminal;
Q_INT8 dst = (Q_INT8) m_DCOPServiceType;
Q_INT8 dummy1 = 0, dummy2 = 0; // see ::load
- QString dummyStr1, dummyStr2;
+ TQString dummyStr1, dummyStr2;
int dummyI1 = 0, dummyI2 = 0;
Q_UINT32 dummyUI32 = 0;
@@ -378,7 +378,7 @@ void KService::save( QDataStream& s )
<< d->categories << d->menuId;
}
-bool KService::hasServiceType( const QString& _servicetype ) const
+bool KService::hasServiceType( const TQString& _servicetype ) const
{
if (!m_bValid) return false; // safety test
@@ -391,7 +391,7 @@ bool KService::hasServiceType( const QString& _servicetype ) const
bool isNumber;
// For each service type we are associated with, if it doesn't
// match then we try its parent service types.
- QStringList::ConstIterator it = m_lstServiceTypes.begin();
+ TQStringList::ConstIterator it = m_lstServiceTypes.begin();
for( ; it != m_lstServiceTypes.end(); ++it )
{
(*it).toInt(&isNumber);
@@ -411,14 +411,14 @@ bool KService::hasServiceType( const QString& _servicetype ) const
return false;
}
-int KService::initialPreferenceForMimeType( const QString& mimeType ) const
+int KService::initialPreferenceForMimeType( const TQString& mimeType ) const
{
if (!m_bValid) return 0; // safety test
bool isNumber;
// For each service type we are associated with
- QStringList::ConstIterator it = m_lstServiceTypes.begin();
+ TQStringList::ConstIterator it = m_lstServiceTypes.begin();
for( ; it != m_lstServiceTypes.end(); ++it )
{
(*it).toInt(&isNumber);
@@ -474,19 +474,19 @@ int KService::initialPreferenceForMimeType( const QString& mimeType ) const
class KServiceReadProperty : public KConfigBase
{
public:
- KServiceReadProperty(const QString &_key, const QCString &_value)
+ KServiceReadProperty(const TQString &_key, const TQCString &_value)
: key(_key), value(_value) { }
- bool internalHasGroup(const QCString &) const { /*qDebug("hasGroup(const QCString &)");*/ return false; }
+ bool internalHasGroup(const TQCString &) const { /*qDebug("hasGroup(const TQCString &)");*/ return false; }
- QStringList groupList() const { return QStringList(); }
+ TQStringList groupList() const { return TQStringList(); }
- QMap<QString,QString> entryMap(const QString &group) const
- { Q_UNUSED(group); return QMap<QString,QString>(); }
+ TQMap<TQString,TQString> entryMap(const TQString &group) const
+ { Q_UNUSED(group); return TQMap<TQString,TQString>(); }
void reparseConfiguration() { }
- KEntryMap internalEntryMap( const QString &pGroup) const
+ KEntryMap internalEntryMap( const TQString &pGroup) const
{ Q_UNUSED(pGroup); return KEntryMap(); }
KEntryMap internalEntryMap() const { return KEntryMap(); }
@@ -497,37 +497,37 @@ public:
KEntry lookupData(const KEntryKey &_key) const
{ Q_UNUSED(_key); KEntry entry; entry.mValue = value; return entry; }
protected:
- QString key;
- QCString value;
+ TQString key;
+ TQCString value;
};
-QVariant KService::property( const QString& _name) const
+TQVariant KService::property( const TQString& _name) const
{
- return property( _name, QVariant::Invalid);
+ return property( _name, TQVariant::Invalid);
}
-// Return a string QVariant if string isn't null, and invalid variant otherwise
+// Return a string TQVariant if string isn't null, and invalid variant otherwise
// (the variant must be invalid if the field isn't in the .desktop file)
// This allows trader queries like "exist Library" to work.
-static QVariant makeStringVariant( const QString& string )
+static TQVariant makeStringVariant( const TQString& string )
{
// Using isEmpty here would be wrong.
// Empty is "specified but empty", null is "not specified" (in the .desktop file)
- return string.isNull() ? QVariant() : QVariant( string );
+ return string.isNull() ? TQVariant() : TQVariant( string );
}
-QVariant KService::property( const QString& _name, QVariant::Type t ) const
+TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const
{
if ( _name == "Type" )
- return QVariant( m_strType ); // can't be null
+ return TQVariant( m_strType ); // can't be null
else if ( _name == "Name" )
- return QVariant( m_strName ); // can't be null
+ return TQVariant( m_strName ); // can't be null
else if ( _name == "Exec" )
return makeStringVariant( m_strExec );
else if ( _name == "Icon" )
return makeStringVariant( m_strIcon );
else if ( _name == "Terminal" )
- return QVariant( static_cast<int>(m_bTerminal) );
+ return TQVariant( static_cast<int>(m_bTerminal) );
else if ( _name == "TerminalOptions" )
return makeStringVariant( m_strTerminalOptions );
else if ( _name == "Path" )
@@ -537,53 +537,53 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
else if ( _name == "GenericName" )
return makeStringVariant( m_strGenName );
else if ( _name == "ServiceTypes" )
- return QVariant( m_lstServiceTypes );
+ return TQVariant( m_lstServiceTypes );
else if ( _name == "AllowAsDefault" )
- return QVariant( static_cast<int>(m_bAllowAsDefault) );
+ return TQVariant( static_cast<int>(m_bAllowAsDefault) );
else if ( _name == "InitialPreference" )
- return QVariant( m_initialPreference );
+ return TQVariant( m_initialPreference );
else if ( _name == "Library" )
return makeStringVariant( m_strLibrary );
else if ( _name == "DesktopEntryPath" ) // can't be null
- return QVariant( entryPath() );
+ return TQVariant( entryPath() );
else if ( _name == "DesktopEntryName")
- return QVariant( m_strDesktopEntryName ); // can't be null
+ return TQVariant( m_strDesktopEntryName ); // can't be null
else if ( _name == "Categories")
- return QVariant( d->categories );
+ return TQVariant( d->categories );
else if ( _name == "Keywords")
- return QVariant( m_lstKeywords );
+ return TQVariant( m_lstKeywords );
- // Ok we need to convert the property from a QString to its real type.
+ // Ok we need to convert the property from a TQString to its real type.
// Maybe the caller helped us.
- if (t == QVariant::Invalid)
+ if (t == TQVariant::Invalid)
{
// No luck, let's ask KServiceTypeFactory what the type of this property
// is supposed to be.
t = KServiceTypeFactory::self()->findPropertyTypeByName(_name);
- if (t == QVariant::Invalid)
+ if (t == TQVariant::Invalid)
{
kdDebug(7012) << "Request for unknown property '" << _name << "'\n";
- return QVariant(); // Unknown property: Invalid variant.
+ return TQVariant(); // Unknown property: Invalid variant.
}
}
- // Then we use a homebuild class based on KConfigBase to convert the QString.
+ // Then we use a homebuild class based on KConfigBase to convert the TQString.
// For some often used property types we do the conversion ourselves.
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
//kdDebug(7012) << "Property not found " << _name << endl;
- return QVariant(); // No property set.
+ return TQVariant(); // No property set.
}
switch(t)
{
- case QVariant::String:
+ case TQVariant::String:
return it.data();
- case QVariant::Bool:
- case QVariant::Int:
+ case TQVariant::Bool:
+ case TQVariant::Int:
{
- QString aValue = it.data().toString();
+ TQString aValue = it.data().toString();
int val = 0;
if (aValue == "true" || aValue == "on" || aValue == "yes")
val = 1;
@@ -594,11 +594,11 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
if( !bOK )
val = 0;
}
- if (t == QVariant::Bool)
+ if (t == TQVariant::Bool)
{
- return QVariant((bool)val, 1);
+ return TQVariant((bool)val, 1);
}
- return QVariant(val);
+ return TQVariant(val);
}
default:
// All others
@@ -607,11 +607,11 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
}
}
-QStringList KService::propertyNames() const
+TQStringList KService::propertyNames() const
{
- QStringList res;
+ TQStringList res;
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.begin();
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it )
res.append( it.key() );
@@ -641,19 +641,19 @@ KService::List KService::allServices()
return KServiceFactory::self()->allServices();
}
-KService::Ptr KService::serviceByName( const QString& _name )
+KService::Ptr KService::serviceByName( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByName( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByDesktopPath( const QString& _name )
+KService::Ptr KService::serviceByDesktopPath( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByDesktopPath( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByDesktopName( const QString& _name )
+KService::Ptr KService::serviceByDesktopName( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByDesktopName( _name.lower() );
if (!s && !_name.startsWith("kde-"))
@@ -661,13 +661,13 @@ KService::Ptr KService::serviceByDesktopName( const QString& _name )
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByMenuId( const QString& _name )
+KService::Ptr KService::serviceByMenuId( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByMenuId( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByStorageId( const QString& _storageId )
+KService::Ptr KService::serviceByStorageId( const TQString& _storageId )
{
KService::Ptr service = KService::serviceByMenuId( _storageId );
if (service)
@@ -677,10 +677,10 @@ KService::Ptr KService::serviceByStorageId( const QString& _storageId )
if (service)
return service;
- if (!QDir::isRelativePath(_storageId) && QFile::exists(_storageId))
+ if (!TQDir::isRelativePath(_storageId) && TQFile::exists(_storageId))
return new KService(_storageId);
- QString tmp = _storageId;
+ TQString tmp = _storageId;
tmp = tmp.mid(tmp.findRev('/')+1); // Strip dir
if (tmp.endsWith(".desktop"))
@@ -700,15 +700,15 @@ KService::List KService::allInitServices()
}
bool KService::substituteUid() const {
- QVariant v = property("X-KDE-SubstituteUID", QVariant::Bool);
+ TQVariant v = property("X-KDE-SubstituteUID", TQVariant::Bool);
return v.isValid() && v.toBool();
}
-QString KService::username() const {
+TQString KService::username() const {
// See also KDesktopFile::tryExec()
- QString user;
- QVariant v = property("X-KDE-Username", QVariant::String);
- user = v.isValid() ? v.toString() : QString::null;
+ TQString user;
+ TQVariant v = property("X-KDE-Username", TQVariant::String);
+ user = v.isValid() ? v.toString() : TQString::null;
if (user.isEmpty())
user = ::getenv("ADMIN_ACCOUNT");
if (user.isEmpty())
@@ -717,10 +717,10 @@ QString KService::username() const {
}
bool KService::noDisplay() const {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString().lower();
+ TQString aValue = it.data().toString().lower();
if (aValue == "true" || aValue == "on" || aValue == "yes")
return true;
}
@@ -728,8 +728,8 @@ bool KService::noDisplay() const {
it = m_mapProps.find( "OnlyShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString();
- QStringList aList = QStringList::split(';', aValue);
+ TQString aValue = it.data().toString();
+ TQStringList aList = TQStringList::split(';', aValue);
if (!aList.contains("KDE"))
return true;
}
@@ -737,8 +737,8 @@ bool KService::noDisplay() const {
it = m_mapProps.find( "NotShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString();
- QStringList aList = QStringList::split(';', aValue);
+ TQString aValue = it.data().toString();
+ TQStringList aList = TQStringList::split(';', aValue);
if (aList.contains("KDE"))
return true;
}
@@ -749,16 +749,16 @@ bool KService::noDisplay() const {
return false;
}
-QString KService::untranslatedGenericName() const {
- QVariant v = property("UntranslatedGenericName", QVariant::String);
- return v.isValid() ? v.toString() : QString::null;
+TQString KService::untranslatedGenericName() const {
+ TQVariant v = property("UntranslatedGenericName", TQVariant::String);
+ return v.isValid() ? v.toString() : TQString::null;
}
-QString KService::parentApp() const {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
+TQString KService::parentApp() const {
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
- return QString::null;
+ return TQString::null;
}
return it.data().toString();
@@ -773,51 +773,51 @@ bool KService::allowMultipleFiles() const {
return false;
}
-QStringList KService::categories() const
+TQStringList KService::categories() const
{
return d->categories;
}
-QString KService::menuId() const
+TQString KService::menuId() const
{
return d->menuId;
}
-void KService::setMenuId(const QString &menuId)
+void KService::setMenuId(const TQString &menuId)
{
d->menuId = menuId;
}
-QString KService::storageId() const
+TQString KService::storageId() const
{
if (!d->menuId.isEmpty())
return d->menuId;
return entryPath();
}
-QString KService::locateLocal()
+TQString KService::locateLocal()
{
if (d->menuId.isEmpty() || desktopEntryPath().startsWith(".hidden") ||
- (QDir::isRelativePath(desktopEntryPath()) && d->categories.isEmpty()))
+ (TQDir::isRelativePath(desktopEntryPath()) && d->categories.isEmpty()))
return KDesktopFile::locateLocal(desktopEntryPath());
return ::locateLocal("xdgdata-apps", d->menuId);
}
-QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
- QString *menuId, const QStringList *reservedMenuIds)
+TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName,
+ TQString *menuId, const TQStringList *reservedMenuIds)
{
- QString base = suggestedName;
+ TQString base = suggestedName;
if (!showInMenu)
base.prepend("kde-");
- QString result;
+ TQString result;
for(int i = 1; true; i++)
{
if (i == 1)
result = base + ".desktop";
else
- result = base + QString("-%1.desktop").arg(i);
+ result = base + TQString("-%1.desktop").arg(i);
if (reservedMenuIds && reservedMenuIds->contains(result))
continue;
@@ -834,7 +834,7 @@ QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
}
else
{
- QString file = result.mid(4); // Strip "kde-"
+ TQString file = result.mid(4); // Strip "kde-"
if (!locate("apps", ".hidden/"+file).isEmpty())
continue;
}
@@ -850,7 +850,7 @@ QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
}
else
{
- QString file = result.mid(4); // Strip "kde-"
+ TQString file = result.mid(4); // Strip "kde-"
return ::locateLocal("apps", ".hidden/"+file);
}
}
@@ -860,17 +860,17 @@ void KService::virtual_hook( int id, void* data )
{ KSycocaEntry::virtual_hook( id, data ); }
-void KService::rebuildKSycoca(QWidget *parent)
+void KService::rebuildKSycoca(TQWidget *parent)
{
KServiceProgressDialog dlg(parent, "ksycoca_progress",
i18n("Updating System Configuration"),
i18n("Updating system configuration."));
- QByteArray data;
+ TQByteArray data;
DCOPClient *client = kapp->dcopClient();
int result = client->callAsync("kded", "kbuildsycoca", "recreate()",
- data, &dlg, SLOT(slotFinished()));
+ data, &dlg, TQT_SLOT(slotFinished()));
if (result)
{
@@ -878,11 +878,11 @@ void KService::rebuildKSycoca(QWidget *parent)
}
}
-KServiceProgressDialog::KServiceProgressDialog(QWidget *parent, const char *name,
- const QString &caption, const QString &text)
+KServiceProgressDialog::KServiceProgressDialog(TQWidget *parent, const char *name,
+ const TQString &caption, const TQString &text)
: KProgressDialog(parent, name, caption, text, true)
{
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotProgress()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotProgress()));
progressBar()->setTotalSteps(20);
m_timeStep = 700;
m_timer.start(m_timeStep);
@@ -911,7 +911,7 @@ KServiceProgressDialog::slotFinished()
{
progressBar()->setProgress(20);
m_timer.stop();
- QTimer::singleShot(1000, this, SLOT(close()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(close()));
}
#include "kservice_p.moc"
diff --git a/kio/kio/kservice.h b/kio/kio/kservice.h
index 6798fa4bf..dd207b304 100644
--- a/kio/kio/kservice.h
+++ b/kio/kio/kservice.h
@@ -20,9 +20,9 @@
#ifndef __kservices_h__
#define __kservices_h__
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qvariant.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqvariant.h>
#include <kicontheme.h>
#include "ksycocaentry.h"
@@ -53,7 +53,7 @@ class KIO_EXPORT KService : public KSycocaEntry
public:
typedef KSharedPtr<KService> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
* Construct a temporary service with a given name, exec-line and icon.
@@ -61,14 +61,14 @@ public:
* @param _exec the executable
* @param _icon the name of the icon
*/
- KService( const QString & _name, const QString &_exec, const QString &_icon);
+ KService( const TQString & _name, const TQString &_exec, const TQString &_icon);
/**
* Construct a service and take all information from a config file.
*
* @param _fullpath Full path to the config file.
*/
- explicit KService( const QString & _fullpath );
+ explicit KService( const TQString & _fullpath );
/**
* Construct a service and take all information from a desktop file.
@@ -81,7 +81,7 @@ public:
* Construct a service from a stream.
* The stream must already be positionned at the correct offset.
*/
- KService( QDataStream& _str, int offset );
+ KService( TQDataStream& _str, int offset );
virtual ~KService();
@@ -89,48 +89,48 @@ public:
* Returns the type of the service.
* @return the type of the service ("Application" or "Service")
*/
- virtual QString type() const { return m_strType; }
+ virtual TQString type() const { return m_strType; }
/**
* Returns the name of the service.
* @return the name of the service,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- virtual QString name() const { return m_strName; }
+ virtual TQString name() const { return m_strName; }
/**
* Returns the executable.
* @return the command that the service executes,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString exec() const { return m_strExec; }
+ TQString exec() const { return m_strExec; }
/**
* Returns the name of the service's library.
* @return the name of the library that contains the services
* implementation,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString library() const { return m_strLibrary; }
+ TQString library() const { return m_strLibrary; }
/**
* Returns the name of the init function to call (KControl modules).
* @return the name of the init function to call in this service
* during startup of KDE. (KControl modules only),
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString init() const { return m_strInit; }
+ TQString init() const { return m_strInit; }
/**
* Returns the name of the icon.
* @return the icon associated with the service,
* or "unknown" if not set
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the pixmap that represents the icon.
* @return a pixmap for this service (finds and loads icon()),
* null if not set
* @see icon()
*/
- QPixmap pixmap( KIcon::Group _group, int _force_size = 0, int _state = 0,
- QString * _path = 0L ) const;
+ TQPixmap pixmap( KIcon::Group _group, int _force_size = 0, int _state = 0,
+ TQString * _path = 0L ) const;
/**
* Checks whethe the service should be run in a terminal.
* @return true if the service is to be run in a terminal.
@@ -142,9 +142,9 @@ public:
*
* The service must be a tty-oriented program.
* @return the terminal options,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString terminalOptions() const { return m_strTerminalOptions; }
+ TQString terminalOptions() const { return m_strTerminalOptions; }
/**
* Checks whether the service runs with a different user id.
* @return true if the service has to be run under a different uid.
@@ -155,10 +155,10 @@ public:
* Returns the user name, if the service runs with a
* different user id.
* @return the username under which the service has to be run,
- * or QString::null if not set
+ * or TQString::null if not set
* @see substututeUid()a
*/
- QString username() const;
+ TQString username() const;
/**
* Returns the path to the location where the service desktop entry
@@ -169,17 +169,17 @@ public:
* It is a full path if the desktop entry originates from another
* location.
* @return the path of the service's desktop file,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString desktopEntryPath() const { return entryPath(); }
+ TQString desktopEntryPath() const { return entryPath(); }
/**
* Returns the filename of the service desktop entry without any
* extension. E.g. "kppp"
* @return the name of the desktop entry without path or extension,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString desktopEntryName() const { return m_strDesktopEntryName; }
+ TQString desktopEntryName() const { return m_strDesktopEntryName; }
/**
* Returns the menu ID of the service desktop entry.
@@ -187,7 +187,7 @@ public:
* @return the menu ID
* @since 3.2
*/
- QString menuId() const;
+ TQString menuId() const;
/**
* Returns a normalized ID suitable for storing in configuration files.
@@ -196,7 +196,7 @@ public:
* @return the storage ID
* @since 3.2
*/
- QString storageId() const;
+ TQString storageId() const;
/**
* Describes the DCOP type of the service.
@@ -221,53 +221,53 @@ public:
/**
* Returns the working directory to run the program in.
* @return the working directory to run the program in,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString path() const { return m_strPath; }
+ TQString path() const { return m_strPath; }
/**
* Returns the descriptive comment for the service, if there is one.
- * @return the descriptive comment for the service, or QString::null
+ * @return the descriptive comment for the service, or TQString::null
* if not set
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the generic name for the service, if there is one
* (e.g. "Mail Client").
* @return the generic name,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString genericName() const { return m_strGenName; }
+ TQString genericName() const { return m_strGenName; }
/**
* Returns the untranslated (US English) generic name
* for the service, if there is one
* (e.g. "Mail Client").
* @return the generic name,
- * or QString::null if not set
+ * or TQString::null if not set
* @since 3.2
*/
- QString untranslatedGenericName() const;
+ TQString untranslatedGenericName() const;
/**
* Returns a list of descriptive keywords the service, if there are any.
* @return the list of keywords
*/
- QStringList keywords() const { return m_lstKeywords; }
+ TQStringList keywords() const { return m_lstKeywords; }
/**
* Returns a list of VFolder categories.
* @return the list of VFolder categories
* @since 3.1
*/
- QStringList categories() const;
+ TQStringList categories() const;
/**
* Returns the service types that this service supports.
* @return the list of service types that are supported
*/
- QStringList serviceTypes() const { return m_lstServiceTypes; }
+ TQStringList serviceTypes() const { return m_lstServiceTypes; }
/**
* Checks whether the service supports this service type
@@ -277,7 +277,7 @@ public:
* @return true if the service you specified is supported,
* otherwise false.
*/
- bool hasServiceType( const QString& _service ) const;
+ bool hasServiceType( const TQString& _service ) const;
/**
* Set to true if it is allowed to use this service as the default (main)
@@ -315,7 +315,7 @@ public:
* @return the service preference level of the service for
* this mimetype
*/
- int initialPreferenceForMimeType( const QString& mimeType ) const;
+ int initialPreferenceForMimeType( const TQString& mimeType ) const;
/**
* @internal. Allows KServiceType::offers to tweak the initial preference.
@@ -331,10 +331,10 @@ public:
/**
* Name of the application this service belongs to.
* (Useful for e.g. plugins)
- * @return the parent application, or QString::null if not set
+ * @return the parent application, or TQString::null if not set
* @since 3.1
*/
- QString parentApp() const;
+ TQString parentApp() const;
/**
* Returns the requested property. Some often used properties
@@ -348,7 +348,7 @@ public:
* @return the property, or invalid if not found
* @see KServiceType
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Returns the requested property.
@@ -359,14 +359,14 @@ public:
* @see KServiceType
* @since 3.2
*/
- QVariant property( const QString& _name, QVariant::Type t ) const;
+ TQVariant property( const TQString& _name, TQVariant::Type t ) const;
/**
* Returns the list of all properties that this service can have.
* That means, that some of these properties may be empty.
* @return the list of supported properties
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Checks whether the service is valid.
@@ -380,23 +380,23 @@ public:
* @return path that can be used for saving changes to this service
* @since 3.2
*/
- QString locateLocal();
+ TQString locateLocal();
/**
* @internal
* Load the service from a stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
* Save the service to a stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* @internal
* Set the menu id
*/
- void setMenuId(const QString &menuId);
+ void setMenuId(const TQString &menuId);
/**
* @internal
* Sets whether to use a terminal or not
@@ -406,7 +406,7 @@ public:
* @internal
* Sets the terminal options to use
*/
- void setTerminalOptions(const QString &options) { m_strTerminalOptions = options; }
+ void setTerminalOptions(const TQString &options) { m_strTerminalOptions = options; }
/**
* Find a service by name, i.e. the translated Name field. You should
@@ -417,7 +417,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByName( const QString& _name );
+ static Ptr serviceByName( const TQString& _name );
/**
* Find a service based on its path as returned by desktopEntryPath().
@@ -428,7 +428,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByDesktopPath( const QString& _path );
+ static Ptr serviceByDesktopPath( const TQString& _path );
/**
* Find a service by the name of its desktop file, not depending on
@@ -444,7 +444,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByDesktopName( const QString& _name );
+ static Ptr serviceByDesktopName( const TQString& _name );
/**
* Find a service by its menu-id
@@ -455,7 +455,7 @@ public:
* @em Very @em important: Don't store the result in a KService* !
* @since 3.2
*/
- static Ptr serviceByMenuId( const QString& _menuId );
+ static Ptr serviceByMenuId( const TQString& _menuId );
/**
* Find a service by its storage-id or desktop-file path. This
@@ -467,7 +467,7 @@ public:
* @em Very @em important: Don't store the result in a KService* !
* @since 3.2
*/
- static Ptr serviceByStorageId( const QString& _storageId );
+ static Ptr serviceByStorageId( const TQString& _storageId );
/**
* Returns the whole list of services.
@@ -503,9 +503,9 @@ public:
* @return The path to use for the new KService.
* @since 3.2
*/
- static QString newServicePath(bool showInMenu, const QString &suggestedName,
- QString *menuId = 0,
- const QStringList *reservedMenuIds = 0);
+ static TQString newServicePath(bool showInMenu, const TQString &suggestedName,
+ TQString *menuId = 0,
+ const TQStringList *reservedMenuIds = 0);
/**
@@ -513,42 +513,42 @@ public:
* @param parent Parent widget for the progress dialog
* @since 3.2
*/
- static void rebuildKSycoca(QWidget *parent);
+ static void rebuildKSycoca(TQWidget *parent);
protected:
void init(KDesktopFile *config);
- QStringList &accessServiceTypes() { return m_lstServiceTypes; }
+ TQStringList &accessServiceTypes() { return m_lstServiceTypes; }
private:
KService( const KService& ); // forbidden
KService& operator=(const KService&);
- QString m_strType;
- QString m_strName;
- QString m_strExec;
- QString m_strIcon;
- QString m_strTerminalOptions;
- QString m_strPath;
- QString m_strComment;
- QString m_strLibrary;
- QStringList m_lstServiceTypes;
+ TQString m_strType;
+ TQString m_strName;
+ TQString m_strExec;
+ TQString m_strIcon;
+ TQString m_strTerminalOptions;
+ TQString m_strPath;
+ TQString m_strComment;
+ TQString m_strLibrary;
+ TQStringList m_lstServiceTypes;
bool m_bAllowAsDefault;
int m_initialPreference;
bool m_bTerminal;
//bool m_bSuid;
- //QString m_strUsername;
- QString m_strDesktopEntryName;
- //QString m_docPath;
+ //TQString m_strUsername;
+ TQString m_strDesktopEntryName;
+ //TQString m_docPath;
//bool m_bHideFromPanel;
DCOPServiceType_t m_DCOPServiceType;
- QMap<QString,QVariant> m_mapProps;
+ TQMap<TQString,TQVariant> m_mapProps;
bool m_bValid;
- QStringList m_lstKeywords;
- QString m_strInit;
- QString m_strGenName;
+ TQStringList m_lstKeywords;
+ TQString m_strInit;
+ TQString m_strGenName;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kservice_p.h b/kio/kio/kservice_p.h
index fb2b565a5..180ab8fc3 100644
--- a/kio/kio/kservice_p.h
+++ b/kio/kio/kservice_p.h
@@ -19,7 +19,7 @@
#ifndef __kservices_p_h__
#define __kservices_p_h__
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kprogress.h>
@@ -27,14 +27,14 @@ class KServiceProgressDialog : public KProgressDialog
{
Q_OBJECT
public:
- KServiceProgressDialog(QWidget *parent, const char *name,
- const QString &caption, const QString &text);
+ KServiceProgressDialog(TQWidget *parent, const char *name,
+ const TQString &caption, const TQString &text);
public slots:
void slotProgress();
void slotFinished();
private:
- QTimer m_timer;
+ TQTimer m_timer;
int m_timeStep;
};
diff --git a/kio/kio/kservicefactory.cpp b/kio/kio/kservicefactory.cpp
index e13547876..1f79deb19 100644
--- a/kio/kio/kservicefactory.cpp
+++ b/kio/kio/kservicefactory.cpp
@@ -22,7 +22,7 @@
#include "ksycocadict.h"
#include "kservice.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -87,7 +87,7 @@ KServiceFactory * KServiceFactory::self()
return _self;
}
-KService * KServiceFactory::findServiceByName(const QString &_name)
+KService * KServiceFactory::findServiceByName(const TQString &_name)
{
if (!m_sycocaDict) return 0; // Error!
@@ -110,7 +110,7 @@ KService * KServiceFactory::findServiceByName(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByDesktopName(const QString &_name)
+KService * KServiceFactory::findServiceByDesktopName(const TQString &_name)
{
if (!m_nameDict) return 0; // Error!
@@ -133,7 +133,7 @@ KService * KServiceFactory::findServiceByDesktopName(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByDesktopPath(const QString &_name)
+KService * KServiceFactory::findServiceByDesktopPath(const TQString &_name)
{
if (!m_relNameDict) return 0; // Error!
@@ -156,7 +156,7 @@ KService * KServiceFactory::findServiceByDesktopPath(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByMenuId(const QString &_menuId)
+KService * KServiceFactory::findServiceByMenuId(const TQString &_menuId)
{
if (!m_menuIdDict) return 0; // Error!
@@ -183,7 +183,7 @@ KService* KServiceFactory::createEntry(int offset)
{
KService * newEntry = 0L;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch(type)
{
case KST_KService:
@@ -191,7 +191,7 @@ KService* KServiceFactory::createEntry(int offset)
break;
default:
- kdError(7011) << QString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
return 0;
}
if (!newEntry->isValid())
@@ -251,7 +251,7 @@ KService::List KServiceFactory::offers( int serviceTypeOffset )
{
KService::List list;
- QDataStream *str = m_str;
+ TQDataStream *str = m_str;
// Jump to the offer list
str->device()->at( m_offerListOffset );
diff --git a/kio/kio/kservicefactory.h b/kio/kio/kservicefactory.h
index d266c4b87..1a828364e 100644
--- a/kio/kio/kservicefactory.h
+++ b/kio/kio/kservicefactory.h
@@ -20,7 +20,7 @@
#ifndef __kservicefactory_h__
#define __kservicefactory_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kservice.h"
#include "ksycocafactory.h"
@@ -48,28 +48,28 @@ public:
/**
* Construct a KService from a config file.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a service (by name, e.g. "Terminal")
*/
- KService * findServiceByName( const QString &_name );
+ KService * findServiceByName( const TQString &_name );
/**
* Find a service (by desktop file name, e.g. "konsole")
*/
- KService * findServiceByDesktopName( const QString &_name );
+ KService * findServiceByDesktopName( const TQString &_name );
/**
* Find a service ( by desktop path, e.g. "System/konsole.desktop")
*/
- KService * findServiceByDesktopPath( const QString &_name );
+ KService * findServiceByDesktopPath( const TQString &_name );
/**
* Find a service ( by menu id, e.g. "kde-konsole.desktop")
*/
- KService * findServiceByMenuId( const QString &_menuId );
+ KService * findServiceByMenuId( const TQString &_menuId );
/**
* @return the services supporting the given service type
diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp
index c754fac0f..1531dc796 100644
--- a/kio/kio/kservicegroup.cpp
+++ b/kio/kio/kservicegroup.cpp
@@ -38,12 +38,12 @@ public:
bool m_bInlineAlias;
bool m_bAllowInline;
int m_inlineValue;
- QStringList suppressGenericNames;
- QString directoryEntryPath;
- QStringList sortOrder;
+ TQStringList suppressGenericNames;
+ TQString directoryEntryPath;
+ TQStringList sortOrder;
};
-KServiceGroup::KServiceGroup( const QString & name )
+KServiceGroup::KServiceGroup( const TQString & name )
: KSycocaEntry(name), m_childCount(-1)
{
d = new KServiceGroup::Private;
@@ -51,14 +51,14 @@ KServiceGroup::KServiceGroup( const QString & name )
m_bDeep = false;
}
-KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpath )
+KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relpath )
: KSycocaEntry(_relpath), m_childCount(-1)
{
d = new KServiceGroup::Private;
m_bDeleted = false;
m_bDeep = false;
- QString cfg = configFile;
+ TQString cfg = configFile;
if (cfg.isEmpty())
cfg = _relpath+".directory";
@@ -73,7 +73,7 @@ KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpat
m_strComment = config.readEntry( "Comment" );
m_bDeleted = config.readBoolEntry( "Hidden", false );
d->m_bNoDisplay = config.readBoolEntry( "NoDisplay", false );
- QStringList tmpList;
+ TQStringList tmpList;
if (config.hasKey("OnlyShowIn"))
{
if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
@@ -103,7 +103,7 @@ KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpat
m_strIcon = "folder";
}
-KServiceGroup::KServiceGroup( QDataStream& _str, int offset, bool deep ) :
+KServiceGroup::KServiceGroup( TQDataStream& _str, int offset, bool deep ) :
KSycocaEntry( _str, offset )
{
d = new KServiceGroup::Private;
@@ -198,14 +198,14 @@ bool KServiceGroup::noDisplay() const
return d->m_bNoDisplay || m_strCaption.startsWith(".");
}
-QStringList KServiceGroup::suppressGenericNames() const
+TQStringList KServiceGroup::suppressGenericNames() const
{
return d->suppressGenericNames;
}
-void KServiceGroup::load( QDataStream& s )
+void KServiceGroup::load( TQDataStream& s )
{
- QStringList groupList;
+ TQStringList groupList;
Q_INT8 noDisplay;
Q_INT8 _showEmptyMenu;
Q_INT8 inlineHeader;
@@ -224,10 +224,10 @@ void KServiceGroup::load( QDataStream& s )
if (m_bDeep)
{
- for(QStringList::ConstIterator it = groupList.begin();
+ for(TQStringList::ConstIterator it = groupList.begin();
it != groupList.end(); it++)
{
- QString path = *it;
+ TQString path = *it;
if (path[path.length()-1] == '/')
{
KServiceGroup *serviceGroup;
@@ -251,11 +251,11 @@ void KServiceGroup::addEntry( KSycocaEntry *entry)
m_serviceList.append(entry);
}
-void KServiceGroup::save( QDataStream& s )
+void KServiceGroup::save( TQDataStream& s )
{
KSycocaEntry::save( s );
- QStringList groupList;
+ TQStringList groupList;
for( List::ConstIterator it = m_serviceList.begin();
it != m_serviceList.end(); it++)
{
@@ -333,8 +333,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
// Sort the list alphabetically, according to locale.
// Groups come first, then services.
- KSortableValueList<SPtr,QCString> slist;
- KSortableValueList<SPtr,QCString> glist;
+ KSortableValueList<SPtr,TQCString> slist;
+ KSortableValueList<SPtr,TQCString> glist;
for (List::ConstIterator it(group->m_serviceList.begin()); it != group->m_serviceList.end(); ++it)
{
KSycocaEntry *p = (*it);
@@ -344,8 +344,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
if (excludeNoDisplay && noDisplay)
continue;
// Choose the right list
- KSortableValueList<SPtr,QCString> & list = p->isType(KST_KServiceGroup) ? glist : slist;
- QString name;
+ KSortableValueList<SPtr,TQCString> & list = p->isType(KST_KServiceGroup) ? glist : slist;
+ TQString name;
if (p->isType(KST_KServiceGroup))
name = static_cast<KServiceGroup *>(p)->caption();
else if (sortByGenericName)
@@ -353,7 +353,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else
name = p->name() + " " + static_cast<KService *>(p)->genericName();
- QCString key( name.length() * 4 + 1 );
+ TQCString key( name.length() * 4 + 1 );
// strxfrm() crashes on Solaris
#ifndef USE_SOLARIS
// maybe it'd be better to use wcsxfrm() where available
@@ -385,20 +385,20 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
d->sortOrder << ":OIH IL[4]"; //just inline header
}
- QString rp = relPath();
- if(rp == "/") rp = QString::null;
+ TQString rp = relPath();
+ if(rp == "/") rp = TQString::null;
// Iterate through the sort spec list.
// If an entry gets mentioned explicitly, we remove it from the sorted list
- for (QStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
+ for (TQStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
{
- const QString &item = *it;
+ const TQString &item = *it;
if (item.isEmpty()) continue;
if (item[0] == '/')
{
- QString groupPath = rp + item.mid(1) + "/";
+ TQString groupPath = rp + item.mid(1) + "/";
// Remove entry from sorted list of services.
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
KServiceGroup *group = (KServiceGroup *)((KSycocaEntry *)((*it2).value()));
if (group->relPath() == groupPath)
@@ -413,7 +413,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
// Remove entry from sorted list of services.
// TODO: Remove item from sortOrder-list if not found
// TODO: This prevents duplicates
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
{
KService *service = (KService *)((KSycocaEntry *)((*it2).value()));
if (service->menuId() == item)
@@ -430,9 +430,9 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool needSeparator = false;
// Iterate through the sort spec list.
// Add the entries to the list according to the sort spec.
- for (QStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
+ for (TQStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
{
- const QString &item = *it;
+ const TQString &item = *it;
if (item.isEmpty()) continue;
if (item[0] == ':')
{
@@ -445,9 +445,9 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if ( item.contains( ":O" ) )
{
//todo parse attribute:
- QString tmp( item );
+ TQString tmp( item );
tmp = tmp.remove(":O");
- QStringList optionAttribute = QStringList::split(" ",tmp);
+ TQStringList optionAttribute = TQStringList::split(" ",tmp);
if( optionAttribute.count()==0)
optionAttribute.append(tmp);
bool showEmptyMenu = false;
@@ -456,11 +456,11 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool showInlineAlias = false;
int inlineValue = -1;
- for ( QStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
{
parseAttribute( *it3, showEmptyMenu, showInline, showInlineHeader, showInlineAlias, inlineValue );
}
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
KServiceGroup *group = (KServiceGroup *)((KSycocaEntry *)(*it2).value());
group->setShowEmptyMenu( showEmptyMenu );
@@ -474,7 +474,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":M")
{
// Add sorted list of sub-menus
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
addItem(sorted, (*it2).value(), needSeparator);
}
@@ -482,7 +482,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":F")
{
// Add sorted list of services
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
{
addItem(sorted, (*it2).value(), needSeparator);
}
@@ -490,8 +490,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":A")
{
// Add sorted lists of services and submenus
- KSortableValueList<SPtr,QCString>::Iterator it_s = slist.begin();
- KSortableValueList<SPtr,QCString>::Iterator it_g = glist.begin();
+ KSortableValueList<SPtr,TQCString>::Iterator it_s = slist.begin();
+ KSortableValueList<SPtr,TQCString>::Iterator it_g = glist.begin();
while(true)
{
@@ -527,7 +527,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
}
else if (item[0] == '/')
{
- QString groupPath = rp + item.mid(1) + "/";
+ TQString groupPath = rp + item.mid(1) + "/";
for (List::ConstIterator it2(group->m_serviceList.begin()); it2 != group->m_serviceList.end(); ++it2)
{
@@ -538,12 +538,12 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
{
if (!excludeNoDisplay || !group->noDisplay())
{
- const QString &nextItem = *( ++it );
+ const TQString &nextItem = *( ++it );
if ( nextItem.startsWith( ":O" ) )
{
- QString tmp( nextItem );
+ TQString tmp( nextItem );
tmp = tmp.remove(":O");
- QStringList optionAttribute = QStringList::split(" ",tmp);
+ TQStringList optionAttribute = TQStringList::split(" ",tmp);
if( optionAttribute.count()==0)
optionAttribute.append(tmp);
bool bShowEmptyMenu = false;
@@ -551,7 +551,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool bShowInlineHeader = false;
bool bShowInlineAlias = false;
int inlineValue = -1;
- for ( QStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
{
parseAttribute( *it3 , bShowEmptyMenu, bShowInline, bShowInlineHeader, bShowInlineAlias , inlineValue );
group->setShowEmptyMenu( bShowEmptyMenu );
@@ -590,7 +590,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
return sorted;
}
-void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias , int &inlineValue )
+void KServiceGroup::parseAttribute( const TQString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias , int &inlineValue )
{
if( item == "ME") //menu empty
showEmptyMenu=true;
@@ -610,7 +610,7 @@ void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu,
showInlineAlias = false;
else if( ( item ).contains( "IL" )) //inline limite!
{
- QString tmp( item );
+ TQString tmp( item );
tmp = tmp.remove( "IL[" );
tmp = tmp.remove( "]" );
bool ok;
@@ -623,18 +623,18 @@ void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu,
kdDebug()<<" This attribute is not supported :"<<item<<endl;
}
-void KServiceGroup::setLayoutInfo(const QStringList &layout)
+void KServiceGroup::setLayoutInfo(const TQStringList &layout)
{
d->sortOrder = layout;
}
-QStringList KServiceGroup::layoutInfo() const
+TQStringList KServiceGroup::layoutInfo() const
{
return d->sortOrder;
}
KServiceGroup::Ptr
-KServiceGroup::baseGroup( const QString & _baseGroupName )
+KServiceGroup::baseGroup( const TQString & _baseGroupName )
{
return KServiceGroupFactory::self()->findBaseGroup(_baseGroupName, true);
}
@@ -646,14 +646,14 @@ KServiceGroup::root()
}
KServiceGroup::Ptr
-KServiceGroup::group(const QString &relPath)
+KServiceGroup::group(const TQString &relPath)
{
if (relPath.isEmpty()) return root();
return KServiceGroupFactory::self()->findGroupByDesktopPath(relPath, true);
}
KServiceGroup::Ptr
-KServiceGroup::childGroup(const QString &parent)
+KServiceGroup::childGroup(const TQString &parent)
{
return KServiceGroupFactory::self()->findGroupByDesktopPath("#parent#"+parent, true);
}
diff --git a/kio/kio/kservicegroup.h b/kio/kio/kservicegroup.h
index e9457b394..de26a3ffb 100644
--- a/kio/kio/kservicegroup.h
+++ b/kio/kio/kservicegroup.h
@@ -19,11 +19,11 @@
#ifndef __kservicegroup_h__
#define __kservicegroup_h__
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qshared.h>
-#include <qdatastream.h>
-#include <qvariant.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqshared.h>
+#include <tqdatastream.h>
+#include <tqvariant.h>
#include <kdesktopfile.h>
@@ -72,27 +72,27 @@ class KIO_EXPORT KServiceGroup : public KSycocaEntry
public:
typedef KSharedPtr<KServiceGroup> Ptr;
typedef KSharedPtr<KSycocaEntry> SPtr;
- typedef QValueList<SPtr> List;
+ typedef TQValueList<SPtr> List;
public:
/**
* Construct a dummy servicegroup indexed with @p name.
* @param name the name of the service group
* @since 3.1
*/
- KServiceGroup( const QString & name );
+ KServiceGroup( const TQString & name );
/**
* Construct a service and take all informations from a config file
* @param _fullpath full path to the config file
* @param _relpath relative path to the config file
*/
- KServiceGroup( const QString & _fullpath, const QString & _relpath );
+ KServiceGroup( const TQString & _fullpath, const TQString & _relpath );
/**
* @internal construct a service from a stream.
* The stream must already be positionned at the correct offset
*/
- KServiceGroup( QDataStream& _str, int offset, bool deep );
+ KServiceGroup( TQDataStream& _str, int offset, bool deep );
virtual ~KServiceGroup();
@@ -106,33 +106,33 @@ public:
* Name used for indexing.
* @return the service group's name
*/
- virtual QString name() const { return entryPath(); }
+ virtual TQString name() const { return entryPath(); }
/**
* Returns the relative path of the service group.
* @return the service group's relative path
*/
- virtual QString relPath() const { return entryPath(); }
+ virtual TQString relPath() const { return entryPath(); }
/**
* Returns the caption of this group.
* @return the caption of this group
*/
- QString caption() const { return m_strCaption; }
+ TQString caption() const { return m_strCaption; }
/**
* Returns the name of the icon associated with the group.
* @return the name of the icon associated with the group,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the comment about this service group.
* @return the descriptive comment for the group, if there is one,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the total number of displayable services in this group and
@@ -192,30 +192,30 @@ public:
* "Arcade Game" since it's redundant in this particular context.
* @since 3.2
*/
- QStringList suppressGenericNames() const;
+ TQStringList suppressGenericNames() const;
/**
* @internal
* Sets information related to the layout of services in this group.
*/
- void setLayoutInfo(const QStringList &layout);
+ void setLayoutInfo(const TQStringList &layout);
/**
* @internal
* Returns information related to the layout of services in this group.
*/
- QStringList layoutInfo() const;
+ TQStringList layoutInfo() const;
/**
* @internal
* Load the service from a stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
* Save the service to a stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* List of all Services and ServiceGroups within this
@@ -248,21 +248,21 @@ public:
* in the .directory file.
* @return the base group name, or null if no base group
*/
- QString baseGroupName() const { return m_strBaseGroupName; }
+ TQString baseGroupName() const { return m_strBaseGroupName; }
/**
* Returns a path to the .directory file describing this service group.
* The path is either absolute or relative to the "apps" resource.
* @since 3.2
*/
- QString directoryEntryPath() const;
+ TQString directoryEntryPath() const;
/**
* Returns the group for the given baseGroupName.
* Can return 0L if the directory (or the .directory file) was deleted.
* @return the base group with the given name, or 0 if not available.
*/
- static Ptr baseGroup( const QString &baseGroupName );
+ static Ptr baseGroup( const TQString &baseGroupName );
/**
* Returns the root service group.
@@ -275,7 +275,7 @@ public:
* @param relPath the path of the service group
* @return the group with the given relative path name.
*/
- static Ptr group(const QString &relPath);
+ static Ptr group(const TQString &relPath);
/**
* Returns the group of services that have X-KDE-ParentApp equal
@@ -284,13 +284,13 @@ public:
* @return the services group
* @since 3.1
*/
- static Ptr childGroup(const QString &parent);
+ static Ptr childGroup(const TQString &parent);
/**
* This function parse attributes into menu
* @since 3.5
*/
- void parseAttribute( const QString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias ,int &inlineValue );
+ void parseAttribute( const TQString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias ,int &inlineValue );
protected:
/**
@@ -299,13 +299,13 @@ protected:
*/
void addEntry( KSycocaEntry *entry);
- QString m_strCaption;
- QString m_strIcon;
- QString m_strComment;
+ TQString m_strCaption;
+ TQString m_strIcon;
+ TQString m_strComment;
List m_serviceList;
bool m_bDeep;
- QString m_strBaseGroupName;
+ TQString m_strBaseGroupName;
int m_childCount;
protected:
virtual void virtual_hook( int id, void* data );
@@ -330,11 +330,11 @@ public:
bool isValid() const { return true; }
// Dummy
- virtual QString name() const { return "separator"; }
+ virtual TQString name() const { return "separator"; }
// Dummy
- virtual void load( QDataStream& ) { };
+ virtual void load( TQDataStream& ) { };
// Dummy
- virtual void save( QDataStream& ) { };
+ virtual void save( TQDataStream& ) { };
};
#endif
diff --git a/kio/kio/kservicegroupfactory.cpp b/kio/kio/kservicegroupfactory.cpp
index 105cf23d7..9bca4dc63 100644
--- a/kio/kio/kservicegroupfactory.cpp
+++ b/kio/kio/kservicegroupfactory.cpp
@@ -22,7 +22,7 @@
#include "ksycocadict.h"
#include "kservice.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -66,7 +66,7 @@ KServiceGroupFactory * KServiceGroupFactory::self()
return _self;
}
-KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const QString &_name, bool deep)
+KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const TQString &_name, bool deep)
{
if (!m_sycocaDict) return 0; // Error!
@@ -89,7 +89,7 @@ KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const QString &_nam
return newGroup;
}
-KServiceGroup * KServiceGroupFactory::findBaseGroup(const QString &_baseGroupName, bool deep)
+KServiceGroup * KServiceGroupFactory::findBaseGroup(const TQString &_baseGroupName, bool deep)
{
if (!m_baseGroupDict) return 0; // Error!
@@ -116,7 +116,7 @@ KServiceGroup* KServiceGroupFactory::createGroup(int offset, bool deep)
{
KServiceGroup * newEntry = 0L;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch(type)
{
case KST_KServiceGroup:
@@ -124,7 +124,7 @@ KServiceGroup* KServiceGroupFactory::createGroup(int offset, bool deep)
break;
default:
- kdError(7011) << QString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
return 0;
}
if (!newEntry->isValid())
diff --git a/kio/kio/kservicegroupfactory.h b/kio/kio/kservicegroupfactory.h
index 429748857..b1131b398 100644
--- a/kio/kio/kservicegroupfactory.h
+++ b/kio/kio/kservicegroupfactory.h
@@ -19,7 +19,7 @@
#ifndef __kservicegroupfactory_h__
#define __kservicegroupfactory_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kservicegroup.h"
#include "ksycocafactory.h"
@@ -46,18 +46,18 @@ public:
/**
* Construct a KServiceGroup from a config file.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a group ( by desktop path, e.g. "Applications/Editors")
*/
- KServiceGroup * findGroupByDesktopPath( const QString &_name, bool deep = true );
+ KServiceGroup * findGroupByDesktopPath( const TQString &_name, bool deep = true );
/**
* Find a base group by name, e.g. "settings"
*/
- KServiceGroup * findBaseGroup( const QString &_baseGroupName, bool deep = true );
+ KServiceGroup * findBaseGroup( const TQString &_baseGroupName, bool deep = true );
/**
* @return the unique service group factory, creating it if necessary
diff --git a/kio/kio/kservicetype.cpp b/kio/kio/kservicetype.cpp
index 1e0067661..48693aceb 100644
--- a/kio/kio/kservicetype.cpp
+++ b/kio/kio/kservicetype.cpp
@@ -27,8 +27,8 @@
#include <kdebug.h>
#include <kdesktopfile.h>
-template QDataStream& operator>> <QString, QVariant>(QDataStream&, QMap<QString, QVariant>&);
-template QDataStream& operator<< <QString, QVariant>(QDataStream&, const QMap<QString, QVariant>&);
+template TQDataStream& operator>> <TQString, TQVariant>(TQDataStream&, TQMap<TQString, TQVariant>&);
+template TQDataStream& operator<< <TQString, TQVariant>(TQDataStream&, const TQMap<TQString, TQVariant>&);
class KServiceType::KServiceTypePrivate
{
@@ -40,7 +40,7 @@ public:
bool parentTypeLoaded;
};
-KServiceType::KServiceType( const QString & _fullpath)
+KServiceType::KServiceType( const TQString & _fullpath)
: KSycocaEntry(_fullpath), d(0)
{
KDesktopFile config( _fullpath );
@@ -72,21 +72,21 @@ KServiceType::init( KDesktopFile *config)
// We store this as property to preserve BC, we can't change that
// because KSycoca needs to remain BC between KDE 2.x and KDE 3.x
- QString sDerived = config->readEntry( "X-KDE-Derived" );
+ TQString sDerived = config->readEntry( "X-KDE-Derived" );
m_bDerived = !sDerived.isEmpty();
if ( m_bDerived )
m_mapProps.insert( "X-KDE-Derived", sDerived );
- QStringList tmpList = config->groupList();
- QStringList::Iterator gIt = tmpList.begin();
+ TQStringList tmpList = config->groupList();
+ TQStringList::Iterator gIt = tmpList.begin();
for( ; gIt != tmpList.end(); ++gIt )
{
if ( (*gIt).find( "Property::" ) == 0 )
{
config->setGroup( *gIt );
- QVariant v = config->readPropertyEntry( "Value",
- QVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
+ TQVariant v = config->readPropertyEntry( "Value",
+ TQVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
if ( v.isValid() )
m_mapProps.insert( (*gIt).mid( 10 ), v );
}
@@ -99,15 +99,15 @@ KServiceType::init( KDesktopFile *config)
{
config->setGroup( *gIt );
m_mapPropDefs.insert( (*gIt).mid( 13 ),
- QVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
+ TQVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
}
}
m_bValid = !m_strName.isEmpty();
}
-KServiceType::KServiceType( const QString & _fullpath, const QString& _type,
- const QString& _icon, const QString& _comment )
+KServiceType::KServiceType( const TQString & _fullpath, const TQString& _type,
+ const TQString& _icon, const TQString& _comment )
: KSycocaEntry(_fullpath), d(0)
{
m_strName = _type;
@@ -116,14 +116,14 @@ KServiceType::KServiceType( const QString & _fullpath, const QString& _type,
m_bValid = !m_strName.isEmpty();
}
-KServiceType::KServiceType( QDataStream& _str, int offset )
+KServiceType::KServiceType( TQDataStream& _str, int offset )
: KSycocaEntry( _str, offset ), d(0)
{
load( _str);
}
void
-KServiceType::load( QDataStream& _str )
+KServiceType::load( TQDataStream& _str )
{
Q_INT8 b;
_str >> m_strName >> m_strIcon >> m_strComment >> m_mapProps >> m_mapPropDefs
@@ -133,7 +133,7 @@ KServiceType::load( QDataStream& _str )
}
void
-KServiceType::save( QDataStream& _str )
+KServiceType::save( TQDataStream& _str )
{
KSycocaEntry::save( _str );
// !! This data structure should remain binary compatible at all times !!
@@ -148,17 +148,17 @@ KServiceType::~KServiceType()
delete d;
}
-QString KServiceType::parentServiceType() const
+TQString KServiceType::parentServiceType() const
{
- QVariant v = property("X-KDE-Derived");
+ TQVariant v = property("X-KDE-Derived");
return v.toString();
}
-bool KServiceType::inherits( const QString& servTypeName ) const
+bool KServiceType::inherits( const TQString& servTypeName ) const
{
if ( name() == servTypeName )
return true;
- QString st = parentServiceType();
+ TQString st = parentServiceType();
while ( !st.isEmpty() )
{
KServiceType::Ptr ptr = KServiceType::serviceType( st );
@@ -171,18 +171,18 @@ bool KServiceType::inherits( const QString& servTypeName ) const
}
QVariant
-KServiceType::property( const QString& _name ) const
+KServiceType::property( const TQString& _name ) const
{
- QVariant v;
+ TQVariant v;
if ( _name == "Name" )
- v = QVariant( m_strName );
+ v = TQVariant( m_strName );
else if ( _name == "Icon" )
- v = QVariant( m_strIcon );
+ v = TQVariant( m_strIcon );
else if ( _name == "Comment" )
- v = QVariant( m_strComment );
+ v = TQVariant( m_strComment );
else {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
if ( it != m_mapProps.end() )
v = it.data();
}
@@ -193,9 +193,9 @@ KServiceType::property( const QString& _name ) const
QStringList
KServiceType::propertyNames() const
{
- QStringList res;
+ TQStringList res;
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.begin();
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it )
res.append( it.key() );
@@ -206,36 +206,36 @@ KServiceType::propertyNames() const
return res;
}
-QVariant::Type
-KServiceType::propertyDef( const QString& _name ) const
+TQVariant::Type
+KServiceType::propertyDef( const TQString& _name ) const
{
- QMap<QString,QVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name );
+ TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name );
if ( it == m_mapPropDefs.end() )
- return QVariant::Invalid;
+ return TQVariant::Invalid;
return it.data();
}
QStringList
KServiceType::propertyDefNames() const
{
- QStringList l;
+ TQStringList l;
- QMap<QString,QVariant::Type>::ConstIterator it = m_mapPropDefs.begin();
+ TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.begin();
for( ; it != m_mapPropDefs.end(); ++it )
l.append( it.key() );
return l;
}
-KServiceType::Ptr KServiceType::serviceType( const QString& _name )
+KServiceType::Ptr KServiceType::serviceType( const TQString& _name )
{
KServiceType * p = KServiceTypeFactory::self()->findServiceTypeByName( _name );
return KServiceType::Ptr( p );
}
-static void addUnique(KService::List &lst, QDict<KService> &dict, const KService::List &newLst, bool lowPrio)
+static void addUnique(KService::List &lst, TQDict<KService> &dict, const KService::List &newLst, bool lowPrio)
{
- QValueListConstIterator<KService::Ptr> it = newLst.begin();
+ TQValueListConstIterator<KService::Ptr> it = newLst.begin();
for( ; it != newLst.end(); ++it )
{
KService *service = static_cast<KService*>(*it);
@@ -248,9 +248,9 @@ static void addUnique(KService::List &lst, QDict<KService> &dict, const KService
}
}
-KService::List KServiceType::offers( const QString& _servicetype )
+KService::List KServiceType::offers( const TQString& _servicetype )
{
- QDict<KService> dict(53);
+ TQDict<KService> dict(53);
KService::List lst;
// Services associated directly with this servicetype (the normal case)
@@ -267,7 +267,7 @@ KService::List KServiceType::offers( const QString& _servicetype )
{
while(true)
{
- QString parent = mime->parentMimeType();
+ TQString parent = mime->parentMimeType();
if (parent.isEmpty())
break;
mime = dynamic_cast<KMimeType *>(KServiceTypeFactory::self()->findServiceTypeByName( parent ));
@@ -279,7 +279,7 @@ KService::List KServiceType::offers( const QString& _servicetype )
}
serv = mime = 0;
- //QValueListIterator<KService::Ptr> it = lst.begin();
+ //TQValueListIterator<KService::Ptr> it = lst.begin();
//for( ; it != lst.end(); ++it )
// kdDebug() << (*it).data() << " " << (*it)->name() << endl;
@@ -330,7 +330,7 @@ KServiceType::Ptr KServiceType::parentType()
if (!d)
d = new KServiceTypePrivate;
- QString parentSt = parentServiceType();
+ TQString parentSt = parentServiceType();
if (!parentSt.isEmpty())
{
d->parentType = KServiceTypeFactory::self()->findServiceTypeByName( parentSt );
diff --git a/kio/kio/kservicetype.h b/kio/kio/kservicetype.h
index 368b9c540..27624e50b 100644
--- a/kio/kio/kservicetype.h
+++ b/kio/kio/kservicetype.h
@@ -24,13 +24,13 @@
#include "ksycocaentry.h"
#include "kservice.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qshared.h>
-#include <qdatastream.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqshared.h>
+#include <tqdatastream.h>
+#include <tqvariant.h>
#include <ksimpleconfig.h>
@@ -48,7 +48,7 @@ class KIO_EXPORT KServiceType : public KSycocaEntry
public:
typedef KSharedPtr<KServiceType> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
@@ -59,15 +59,15 @@ public:
* @param _icon the icon name of the service type (can be null)
* @param _comment a comment (can be null)
*/
- KServiceType( const QString & _fullpath, const QString& _name,
- const QString& _icon, const QString& _comment);
+ KServiceType( const TQString & _fullpath, const TQString& _name,
+ const TQString& _icon, const TQString& _comment);
/**
* Construct a service type and take all informations from a config file.
* @param _fullpath path of the desktop file, set to "" if calling from
* a inherited constructor.
*/
- KServiceType( const QString & _fullpath );
+ KServiceType( const TQString & _fullpath );
/**
* Construct a service type and take all informations from a deskop file.
@@ -79,7 +79,7 @@ public:
* @internal construct a service from a stream.
* The stream must already be positionned at the correct offset
*/
- KServiceType( QDataStream& _str, int offset );
+ KServiceType( TQDataStream& _str, int offset );
virtual ~KServiceType();
@@ -89,21 +89,21 @@ public:
* example an URL and returns a special icon for this
* URL. An example is KMimeType, KFolderType and
* others.
- * @return the name of the icon, can be QString::null.
+ * @return the name of the icon, can be TQString::null.
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the descriptive comment associated, if any.
- * @return the comment, or QString::null
+ * @return the comment, or TQString::null
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the name of this service type.
* @return the name of the service type
*/
- QString name() const { return m_strName; }
+ TQString name() const { return m_strName; }
/**
* Returns the relative path to the desktop entry file responsible for
@@ -111,7 +111,7 @@ public:
* For instance inode/directory.desktop, or kpart.desktop
* @return the path of the desktop file
*/
- QString desktopEntryPath() const { return entryPath(); }
+ TQString desktopEntryPath() const { return entryPath(); }
/**
* Checks whether this service type inherits another one.
@@ -123,17 +123,17 @@ public:
/**
* If this service type inherits from another service type,
* return the name of the parent.
- * @return the parent service type, or QString:: null if not set
+ * @return the parent service type, or TQString:: null if not set
* @see isDerived()
*/
- QString parentServiceType() const;
+ TQString parentServiceType() const;
/**
* Checks whether this service type is or inherits from @p servTypeName.
* @return true if this servicetype is or inherits from @p servTypeName
* @since 3.1
*/
- bool inherits( const QString& servTypeName ) const;
+ bool inherits( const TQString& servTypeName ) const;
/**
* Returns the requested property. Some often used properties
@@ -143,13 +143,13 @@ public:
* @param _name the name of the property
* @return the property, or invalid if not found
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Returns the list of all properties of this service type.
* @return the list of properties
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Checks whether the service type is valid.
@@ -163,22 +163,22 @@ public:
* @param _name the name of the property
* @return the property type, or null if not found
*/
- virtual QVariant::Type propertyDef( const QString& _name ) const;
+ virtual TQVariant::Type propertyDef( const TQString& _name ) const;
- virtual QStringList propertyDefNames() const;
- virtual const QMap<QString,QVariant::Type>& propertyDefs() const { return m_mapPropDefs; }
+ virtual TQStringList propertyDefNames() const;
+ virtual const TQMap<TQString,TQVariant::Type>& propertyDefs() const { return m_mapPropDefs; }
/**
* @internal
* Save ourselves to the data stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* @internal
* Load ourselves from the data stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
@@ -204,7 +204,7 @@ public:
* @param _name the name of the service type to search
* @return the pointer to the service type, or 0
*/
- static Ptr serviceType( const QString& _name );
+ static Ptr serviceType( const TQString& _name );
/**
* Returns all services supporting the given servicetype name.
@@ -214,7 +214,7 @@ public:
* @param _servicetype the name of the service type to search
* @return the list of all services of the given type
*/
- static KService::List offers( const QString& _servicetype );
+ static KService::List offers( const TQString& _servicetype );
/**
* Returns a list of all the supported servicetypes. Useful for
@@ -230,11 +230,11 @@ protected:
void init( KDesktopFile *config );
protected:
- QString m_strName;
- QString m_strIcon;
- QString m_strComment;
- QMap<QString,QVariant> m_mapProps;
- QMap<QString,QVariant::Type> m_mapPropDefs;
+ TQString m_strName;
+ TQString m_strIcon;
+ TQString m_strComment;
+ TQMap<TQString,TQVariant> m_mapProps;
+ TQMap<TQString,TQVariant::Type> m_mapPropDefs;
bool m_bValid:1;
bool m_bDerived:1;
@@ -245,7 +245,7 @@ private:
KServiceTypePrivate* d;
};
-//QDataStream& operator>>( QDataStream& _str, KServiceType& s );
-//QDataStream& operator<<( QDataStream& _str, KServiceType& s );
+//TQDataStream& operator>>( TQDataStream& _str, KServiceType& s );
+//TQDataStream& operator<<( TQDataStream& _str, KServiceType& s );
#endif
diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp
index bfe3121ca..8287bca44 100644
--- a/kio/kio/kservicetypefactory.cpp
+++ b/kio/kio/kservicetypefactory.cpp
@@ -28,7 +28,7 @@
#include <kdebug.h>
#include <assert.h>
#include <kstringhandler.h>
-#include <qfile.h>
+#include <tqfile.h>
KServiceTypeFactory::KServiceTypeFactory()
: KSycocaFactory( KST_KServiceTypeFactory )
@@ -52,7 +52,7 @@ KServiceTypeFactory::KServiceTypeFactory()
}
else
{
- QString str;
+ TQString str;
for(;n;n--)
{
KSycocaEntry::read(*m_str, str);
@@ -77,7 +77,7 @@ KServiceTypeFactory * KServiceTypeFactory::self()
return _self;
}
-KServiceType * KServiceTypeFactory::findServiceTypeByName(const QString &_name)
+KServiceType * KServiceTypeFactory::findServiceTypeByName(const TQString &_name)
{
if (!m_sycocaDict) return 0L; // Error!
assert (!KSycoca::self()->isBuilding());
@@ -95,28 +95,28 @@ KServiceType * KServiceTypeFactory::findServiceTypeByName(const QString &_name)
return newServiceType;
}
-QVariant::Type KServiceTypeFactory::findPropertyTypeByName(const QString &_name)
+TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_name)
{
if (!m_sycocaDict)
- return QVariant::Invalid; // Error!
+ return TQVariant::Invalid; // Error!
assert (!KSycoca::self()->isBuilding());
- QMapConstIterator<QString,int> it = m_propertyTypeDict.find(_name);
+ TQMapConstIterator<TQString,int> it = m_propertyTypeDict.find(_name);
if (it != m_propertyTypeDict.end()) {
- return (QVariant::Type)it.data();
+ return (TQVariant::Type)it.data();
}
- return QVariant::Invalid;
+ return TQVariant::Invalid;
}
-KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QString *match)
+KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQString *match)
{
// Assume we're NOT building a database
if (!m_str) return 0;
// Get stream to the header
- QDataStream *str = m_str;
+ TQDataStream *str = m_str;
str->device()->at( m_fastPatternOffset );
@@ -138,10 +138,10 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
int ext_len = _filename.length() - lastDot - 1;
if (lastDot != -1 && ext_len <= 4) // if no '.', skip the extension lookup
{
- QString extension = _filename.right( ext_len );
+ TQString extension = _filename.right( ext_len );
extension = extension.leftJustify(4);
- QString pattern;
+ TQString pattern;
while (left <= right) {
middle = (left + right) / 2;
// read pattern at position "middle"
@@ -168,7 +168,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
if ( m_patterns.isEmpty() ) {
str->device()->at( m_otherPatternOffset );
- QString pattern;
+ TQString pattern;
Q_INT32 mimetypeOffset;
while (true)
@@ -184,9 +184,9 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
assert( m_patterns.size() == m_pattern_offsets.size() );
- QStringList::const_iterator it = m_patterns.begin();
- QStringList::const_iterator end = m_patterns.end();
- QValueVector<Q_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
+ TQStringList::const_iterator it = m_patterns.begin();
+ TQStringList::const_iterator end = m_patterns.end();
+ TQValueVector<Q_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
for ( ; it != end; ++it, ++it_offset )
{
@@ -247,7 +247,7 @@ KServiceType::List KServiceTypeFactory::allServiceTypes()
bool KServiceTypeFactory::checkMimeTypes()
{
- QDataStream *str = KSycoca::self()->findFactory( factoryId() );
+ TQDataStream *str = KSycoca::self()->findFactory( factoryId() );
if (!str) return false;
// check if there are mimetypes/servicetypes
@@ -258,7 +258,7 @@ KServiceType * KServiceTypeFactory::createEntry(int offset)
{
KServiceType *newEntry = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
if (!str) return 0;
switch(type)
@@ -280,7 +280,7 @@ KServiceType * KServiceTypeFactory::createEntry(int offset)
break;
default:
- kdError(7011) << QString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
break;
}
if (newEntry && !newEntry->isValid())
diff --git a/kio/kio/kservicetypefactory.h b/kio/kio/kservicetypefactory.h
index 7c5fdf96e..db64aa115 100644
--- a/kio/kio/kservicetypefactory.h
+++ b/kio/kio/kservicetypefactory.h
@@ -22,8 +22,8 @@
#include <assert.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include "ksycocafactory.h"
#include "kmimetype.h"
@@ -56,26 +56,26 @@ public:
/**
* Not meant to be called at this level
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a service type in the database file (allocates it)
* Overloaded by KBuildServiceTypeFactory to return a memory one.
*/
- virtual KServiceType * findServiceTypeByName(const QString &_name);
+ virtual KServiceType * findServiceTypeByName(const TQString &_name);
/**
* Find a the property type of a named property.
*/
- QVariant::Type findPropertyTypeByName(const QString &_name);
+ TQVariant::Type findPropertyTypeByName(const TQString &_name);
/**
* Find a mimetype from a filename (using the pattern list)
* @param _filename filename to check.
* @param match if provided, returns the pattern that matched.
*/
- KMimeType * findFromPattern(const QString &_filename, QString *match = 0);
+ KMimeType * findFromPattern(const TQString &_filename, TQString *match = 0);
/**
* @return all mimetypes
@@ -109,11 +109,11 @@ private:
protected:
int m_fastPatternOffset;
int m_otherPatternOffset;
- QMap<QString,int> m_propertyTypeDict;
+ TQMap<TQString,int> m_propertyTypeDict;
private:
- QStringList m_patterns;
- QValueVector<Q_INT32> m_pattern_offsets;
+ TQStringList m_patterns;
+ TQValueVector<Q_INT32> m_pattern_offsets;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kshellcompletion.cpp b/kio/kio/kshellcompletion.cpp
index 321eebabf..2fb67a31f 100644
--- a/kio/kio/kshellcompletion.cpp
+++ b/kio/kio/kshellcompletion.cpp
@@ -19,9 +19,9 @@
#include <stdlib.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kcompletion.h>
#include "kshellcompletion.h"
@@ -43,7 +43,7 @@ KShellCompletion::KShellCompletion() : KURLCompletion()
*
* Entry point for file name completion
*/
-QString KShellCompletion::makeCompletion(const QString &text)
+TQString KShellCompletion::makeCompletion(const TQString &text)
{
// Split text at the last unquoted space
//
@@ -51,7 +51,7 @@ QString KShellCompletion::makeCompletion(const QString &text)
// Remove quotes from the text to be completed
//
- QString tmp = unquote(m_text_compl);
+ TQString tmp = unquote(m_text_compl);
m_text_compl = tmp;
// Do exe-completion if there was no unquoted space
@@ -82,7 +82,7 @@ QString KShellCompletion::makeCompletion(const QString &text)
* Add add the part of the text that was not completed
* Add quotes when needed
*/
-void KShellCompletion::postProcessMatch( QString *match ) const
+void KShellCompletion::postProcessMatch( TQString *match ) const
{
//kDebugInfo("KShellCompletion::postProcessMatch() in: '%s'",
// match->latin1());
@@ -92,7 +92,7 @@ void KShellCompletion::postProcessMatch( QString *match ) const
if ( match->isNull() )
return;
- if ( match->right(1) == QChar('/') )
+ if ( match->right(1) == TQChar('/') )
quoteText( match, false, true ); // don't quote the trailing '/'
else
quoteText( match, false, false ); // quote the whole text
@@ -103,15 +103,15 @@ void KShellCompletion::postProcessMatch( QString *match ) const
// match->latin1());
}
-void KShellCompletion::postProcessMatches( QStringList *matches ) const
+void KShellCompletion::postProcessMatches( TQStringList *matches ) const
{
KURLCompletion::postProcessMatches( matches );
- for ( QStringList::Iterator it = matches->begin();
+ for ( TQStringList::Iterator it = matches->begin();
it != matches->end(); it++ )
{
if ( !(*it).isNull() ) {
- if ( (*it).right(1) == QChar('/') )
+ if ( (*it).right(1) == TQChar('/') )
quoteText( &(*it), false, true ); // don't quote trailing '/'
else
quoteText( &(*it), false, false ); // quote the whole text
@@ -129,7 +129,7 @@ void KShellCompletion::postProcessMatches( KCompletionMatches *matches ) const
it != matches->end(); it++ )
{
if ( !(*it).value().isNull() ) {
- if ( (*it).value().right(1) == QChar('/') )
+ if ( (*it).value().right(1) == TQChar('/') )
quoteText( &(*it).value(), false, true ); // don't quote trailing '/'
else
quoteText( &(*it).value(), false, false ); // quote the whole text
@@ -147,12 +147,12 @@ void KShellCompletion::postProcessMatches( KCompletionMatches *matches ) const
* text_start = [out] text at the left, including the space
* text_compl = [out] text at the right
*/
-void KShellCompletion::splitText(const QString &text, QString &text_start,
- QString &text_compl) const
+void KShellCompletion::splitText(const TQString &text, TQString &text_start,
+ TQString &text_compl) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
+ TQChar p_last_quote_char;
int last_unquoted_space = -1;
int end_space_len = 0;
@@ -212,7 +212,7 @@ void KShellCompletion::splitText(const QString &text, QString &text_start,
*
* skip_last => ignore the last charachter (we add a space or '/' to all filenames)
*/
-bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) const
+bool KShellCompletion::quoteText(TQString *text, bool force, bool skip_last) const
{
int pos = 0;
@@ -240,11 +240,11 @@ bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) cons
// Escape \ in the string
text->replace( m_escape_char,
- QString( m_escape_char ) + m_escape_char );
+ TQString( m_escape_char ) + m_escape_char );
// Escape " in the string
text->replace( m_quote_char1,
- QString( m_escape_char ) + m_quote_char1 );
+ TQString( m_escape_char ) + m_quote_char1 );
// " at the beginning
text->insert( 0, m_quote_char1 );
@@ -267,12 +267,12 @@ bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) cons
* Remove quotes and return the result in a new string
*
*/
-QString KShellCompletion::unquote(const QString &text) const
+TQString KShellCompletion::unquote(const TQString &text) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
- QString result;
+ TQChar p_last_quote_char;
+ TQString result;
for (uint pos = 0; pos < text.length(); pos++) {
diff --git a/kio/kio/kshellcompletion.h b/kio/kio/kshellcompletion.h
index 797f275ac..acfa638cf 100644
--- a/kio/kio/kshellcompletion.h
+++ b/kio/kio/kshellcompletion.h
@@ -20,8 +20,8 @@
#ifndef KSHELLCOMPLETION_H
#define KSHELLCOMPLETION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kurlcompletion.h"
@@ -51,30 +51,30 @@ public:
* Finds completions to the given text.
* The first match is returned and emitted in the signal match().
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- QString makeCompletion(const QString &text);
+ TQString makeCompletion(const TQString &text);
protected:
// Called by KCompletion
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches *matches ) const;
private:
// Find the part of text that should be completed
- void splitText(const QString &text, QString &text_start, QString &text_compl) const;
+ void splitText(const TQString &text, TQString &text_start, TQString &text_compl) const;
// Insert quotes and neseccary escapes
- bool quoteText(QString *text, bool force, bool skip_last) const;
- QString unquote(const QString &text) const;
+ bool quoteText(TQString *text, bool force, bool skip_last) const;
+ TQString unquote(const TQString &text) const;
- QString m_text_start; // part of the text that was not completed
- QString m_text_compl; // part of the text that was completed (unchanged)
+ TQString m_text_start; // part of the text that was not completed
+ TQString m_text_compl; // part of the text that was completed (unchanged)
- QChar m_word_break_char;
- QChar m_quote_char1;
- QChar m_quote_char2;
- QChar m_escape_char;
+ TQChar m_word_break_char;
+ TQChar m_quote_char1;
+ TQChar m_quote_char2;
+ TQChar m_escape_char;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kshred.cpp b/kio/kio/kshred.cpp
index a4ac54b89..f3997bf58 100644
--- a/kio/kio/kshred.cpp
+++ b/kio/kio/kshred.cpp
@@ -27,8 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <kapplication.h>
-// antlarr: KDE 4: Make it const QString &
-KShred::KShred(QString fileName)
+// antlarr: KDE 4: Make it const TQString &
+KShred::KShred(TQString fileName)
{
if (fileName.isEmpty())
{
@@ -37,7 +37,7 @@ KShred::KShred(QString fileName)
}
else
{
- file = new QFile();
+ file = new TQFile();
file->setName(fileName);
if (!file->open(IO_ReadWrite))
{
@@ -144,9 +144,9 @@ KShred::fillrandom()
}
-// antlarr: KDE 4: Make it const QString &
+// antlarr: KDE 4: Make it const TQString &
bool
-KShred::shred(QString fileName)
+KShred::shred(TQString fileName)
{
if (fileName.isEmpty())
return false;
@@ -209,7 +209,7 @@ KShred::shred()
unsigned char p[6][3] = {{'\222', '\111', '\044'}, {'\111', '\044', '\222'},
{'\044', '\222', '\111'}, {'\155', '\266', '\333'},
{'\266', '\333', '\155'}, {'\333', '\155', '\266'}};
- QString msg = i18n("Shredding: pass %1 of 35");
+ TQString msg = i18n("Shredding: pass %1 of 35");
emit processedSize(0);
diff --git a/kio/kio/kshred.h b/kio/kio/kshred.h
index 320216998..c38c610ed 100644
--- a/kio/kio/kshred.h
+++ b/kio/kio/kshred.h
@@ -27,9 +27,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include <kio/global.h>
@@ -42,7 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* @author Andreas F. Pour <bugs@mieterra.com>
* @author David Faure <faure@kde.org> (integration into KDE and progress signal)
*/
-class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
+class KIO_EXPORT_DEPRECATED KShred : public TQObject { // KDE4: remove
Q_OBJECT
@@ -52,7 +52,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* Initialize the class using the name of the file to 'shred'.
* @param fileName fully qualified name of the file to shred.
*/
- KShred(QString fileName);
+ KShred(TQString fileName);
/*
* Destructor for the class.
@@ -105,7 +105,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* No need to create an instance of the class.
* @param fileName fully qualified name of the file to shred.
*/
- static bool shred(QString fileName);
+ static bool shred(TQString fileName);
signals:
/**
@@ -118,7 +118,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* Shows a message in the progress dialog
* @param message the message to display
*/
- void infoMessage(const QString & message);
+ void infoMessage(const TQString & message);
private:
/**
@@ -134,7 +134,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
/**
* @internal structure for the file information
*/
- QFile *file;
+ TQFile *file;
/**
* @internal for the size of the file
diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp
index 52c10c0b1..cf4bade20 100644
--- a/kio/kio/ktar.cpp
+++ b/kio/kio/ktar.cpp
@@ -25,9 +25,9 @@
#include <pwd.h>*/
#include <assert.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <ktempfile.h>
@@ -46,26 +46,26 @@ class KTar::KTarPrivate
{
public:
KTarPrivate() : tarEnd( 0 ), tmpFile( 0 ) {}
- QStringList dirList;
+ TQStringList dirList;
int tarEnd;
KTempFile* tmpFile;
- QString mimetype;
- QCString origFileName;
+ TQString mimetype;
+ TQCString origFileName;
- bool fillTempFile(const QString & filename);
- bool writeBackTempFile( const QString & filename );
+ bool fillTempFile(const TQString & filename);
+ bool writeBackTempFile( const TQString & filename );
};
-KTar::KTar( const QString& filename, const QString & _mimetype )
+KTar::KTar( const TQString& filename, const TQString & _mimetype )
: KArchive( 0 )
{
m_filename = filename;
d = new KTarPrivate;
- QString mimetype( _mimetype );
+ TQString mimetype( _mimetype );
bool forced = true;
if ( mimetype.isEmpty() ) // Find out mimetype manually
{
- if ( QFile::exists( filename ) )
+ if ( TQFile::exists( filename ) )
mimetype = KMimeType::findByFileContent( filename )->name();
else
mimetype = KMimeType::findByPath( filename, 0, true )->name();
@@ -85,7 +85,7 @@ KTar::KTar( const QString& filename, const QString & _mimetype )
else
{
// Something else. Check if it's not really gzip though (e.g. for KOffice docs)
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_ReadOnly ) )
{
unsigned char firstByte = file.getch();
@@ -111,11 +111,11 @@ KTar::KTar( const QString& filename, const QString & _mimetype )
prepareDevice( filename, mimetype, forced );
}
-void KTar::prepareDevice( const QString & filename,
- const QString & mimetype, bool /*forced*/ )
+void KTar::prepareDevice( const TQString & filename,
+ const TQString & mimetype, bool /*forced*/ )
{
if( "application/x-tar" == mimetype )
- setDevice( new QFile( filename ) );
+ setDevice( new TQFile( filename ) );
else
{
// The compression filters are very slow with random access.
@@ -133,13 +133,13 @@ void KTar::prepareDevice( const QString & filename,
// KTempFile opens the file automatically,
// the device must be closed, however, for KArchive.setDevice()
- QFile* file = d->tmpFile->file();
+ TQFile* file = d->tmpFile->file();
file->close();
setDevice(file);
}
}
-KTar::KTar( QIODevice * dev )
+KTar::KTar( TQIODevice * dev )
: KArchive( dev )
{
Q_ASSERT( dev );
@@ -161,7 +161,7 @@ KTar::~KTar()
delete d;
}
-void KTar::setOrigFileName( const QCString & fileName )
+void KTar::setOrigFileName( const TQCString & fileName )
{
if ( !isOpened() || !(mode() & IO_WriteOnly) )
{
@@ -178,7 +178,7 @@ Q_LONG KTar::readRawHeader(char *buffer) {
// Make sure this is actually a tar header
if (strncmp(buffer + 257, "ustar", 5)) {
// The magic isn't there (broken/old tars), but maybe a correct checksum?
- QCString s;
+ TQCString s;
int check = 0;
for( uint j = 0; j < 0x200; ++j )
@@ -197,7 +197,7 @@ Q_LONG KTar::readRawHeader(char *buffer) {
if( strncmp( buffer + 148 + 6 - s.length(), s.data(), s.length() )
&& strncmp( buffer + 148 + 7 - s.length(), s.data(), s.length() )
&& strncmp( buffer + 148 + 8 - s.length(), s.data(), s.length() ) ) {
- kdWarning(7041) << "KTar: invalid TAR file. Header is: " << QCString( buffer+257, 5 ) << endl;
+ kdWarning(7041) << "KTar: invalid TAR file. Header is: " << TQCString( buffer+257, 5 ) << endl;
return -1;
}
}/*end if*/
@@ -208,9 +208,9 @@ Q_LONG KTar::readRawHeader(char *buffer) {
return n;
}
-bool KTar::readLonglink(char *buffer,QCString &longlink) {
+bool KTar::readLonglink(char *buffer,TQCString &longlink) {
Q_LONG n = 0;
- QIODevice *dev = device();
+ TQIODevice *dev = device();
// read size of longlink from size field in header
// size is in bytes including the trailing null (which we ignore)
buffer[ 0x88 ] = 0; // was 0x87, but 0x88 fixes BR #26437
@@ -238,7 +238,7 @@ bool KTar::readLonglink(char *buffer,QCString &longlink) {
return true;
}
-Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
+Q_LONG KTar::readHeader(char *buffer,TQString &name,TQString &symlink) {
name.truncate(0);
symlink.truncate(0);
while (true) {
@@ -248,11 +248,11 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
// is it a longlink?
if (strcmp(buffer,"././@LongLink") == 0) {
char typeflag = buffer[0x9c];
- QCString longlink;
+ TQCString longlink;
readLonglink(buffer,longlink);
switch (typeflag) {
- case 'L': name = QFile::decodeName(longlink); break;
- case 'K': symlink = QFile::decodeName(longlink); break;
+ case 'L': name = TQFile::decodeName(longlink); break;
+ case 'K': symlink = TQFile::decodeName(longlink); break;
}/*end switch*/
} else {
break;
@@ -263,9 +263,9 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
if (name.isEmpty())
// there are names that are exactly 100 bytes long
// and neither longlink nor \0 terminated (bug:101472)
- name = QFile::decodeName(QCString(buffer, 101));
+ name = TQFile::decodeName(TQCString(buffer, 101));
if (symlink.isEmpty())
- symlink = QFile::decodeName(QCString(buffer + 0x9d, 101));
+ symlink = TQFile::decodeName(TQCString(buffer + 0x9d, 101));
return 0x200;
}
@@ -275,7 +275,7 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
* to decompress the original file now and write
* the contents to the temporary file.
*/
-bool KTar::KTarPrivate::fillTempFile( const QString & filename) {
+bool KTar::KTarPrivate::fillTempFile( const TQString & filename) {
if ( ! tmpFile )
return true;
@@ -288,17 +288,17 @@ bool KTar::KTarPrivate::fillTempFile( const QString & filename) {
|| "application/x-bzip2" == mimetype)
forced = true;
- QIODevice *filterDev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *filterDev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( filterDev ) {
- QFile* file = tmpFile->file();
+ TQFile* file = tmpFile->file();
file->close();
if ( ! file->open( IO_WriteOnly ) )
{
delete filterDev;
return false;
}
- QByteArray buffer(8*1024);
+ TQByteArray buffer(8*1024);
if ( ! filterDev->open( IO_ReadOnly ) )
{
delete filterDev;
@@ -342,7 +342,7 @@ bool KTar::openArchive( int mode )
//stat( m_filename, &buf );
d->dirList.clear();
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if ( !dev )
return false;
@@ -352,8 +352,8 @@ bool KTar::openArchive( int mode )
bool ende = false;
do
{
- QString name;
- QString symlink;
+ TQString name;
+ TQString symlink;
// Read header
Q_LONG n = readHeader(buffer,name,symlink);
@@ -361,7 +361,7 @@ bool KTar::openArchive( int mode )
if (n == 0x200)
{
bool isdir = false;
- QString nm;
+ TQString nm;
if ( name.right(1) == "/" )
{
@@ -383,8 +383,8 @@ bool KTar::openArchive( int mode )
int access = (int)strtol( p, &dummy, 8 );
// read user and group
- QString user( buffer + 0x109 );
- QString group( buffer + 0x129 );
+ TQString user( buffer + 0x109 );
+ TQString group( buffer + 0x129 );
// read time
buffer[ 0x93 ] = 0;
@@ -470,7 +470,7 @@ bool KTar::openArchive( int mode )
else
{
// In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
+ TQString path = TQDir::cleanDirPath( name.left( pos ) );
// Ensure container directory exists, create otherwise
KArchiveDirectory * d = findOrCreate( path );
d->addEntry( e );
@@ -491,7 +491,7 @@ bool KTar::openArchive( int mode )
* to the original file.
* Must only be called if in IO_WriteOnly mode
*/
-bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
+bool KTar::KTarPrivate::writeBackTempFile( const TQString & filename ) {
if ( ! tmpFile )
return true;
@@ -504,9 +504,9 @@ bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
forced = true;
- QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( dev ) {
- QFile* file = tmpFile->file();
+ TQFile* file = tmpFile->file();
file->close();
if ( ! file->open(IO_ReadOnly) || ! dev->open(IO_WriteOnly) )
{
@@ -516,7 +516,7 @@ bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
}
if ( forced )
static_cast<KFilterDev *>(dev)->setOrigFileName( origFileName );
- QByteArray buffer(8*1024);
+ TQByteArray buffer(8*1024);
Q_LONG len;
while ( ! file->atEnd()) {
len = file->readBlock(buffer.data(),buffer.size());
@@ -544,7 +544,7 @@ bool KTar::closeArchive()
return true;
}
-bool KTar::writeDir( const QString& name, const QString& user, const QString& group )
+bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& group )
{
mode_t perm = 040755;
time_t the_time = time(0);
@@ -563,7 +563,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
}
// In some tar files we can find dir/./ => call cleanDirPath
- QString dirName ( QDir::cleanDirPath( name ) );
+ TQString dirName ( TQDir::cleanDirPath( name ) );
// Need trailing '/'
if ( dirName.right(1) != "/" )
@@ -582,7 +582,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
strcpy( buffer, "././@LongLink" );
fillBuffer( buffer, " 0", dirName.length()+1, 'L', user.local8Bit(), group.local8Bit() );
device()->writeBlock( buffer, 0x200 );
- strncpy( buffer, QFile::encodeName(dirName), 0x200 );
+ strncpy( buffer, TQFile::encodeName(dirName), 0x200 );
buffer[0x200] = 0;
// write long name
device()->writeBlock( buffer, 0x200 );
@@ -591,7 +591,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
else
{
// Write name
- strncpy( buffer, QFile::encodeName(dirName), 0x200 );
+ strncpy( buffer, TQFile::encodeName(dirName), 0x200 );
buffer[0x200] = 0;
}
@@ -606,7 +606,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
#endif
}
-bool KTar::prepareWriting( const QString& name, const QString& user, const QString& group, uint size )
+bool KTar::prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size )
{
mode_t dflt_perm = 0100644;
time_t the_time = time(0);
@@ -670,7 +670,7 @@ void KTar::fillBuffer( char * buffer,
strcpy( buffer + 0x74, " 144 ");
// size
- QCString s;
+ TQCString s;
s.sprintf("%o", size); // OCT
s = s.rightJustify( 11, ' ' );
strcpy( buffer + 0x7c, s.data() );
@@ -719,7 +719,7 @@ void KTar::fillBuffer( char * buffer,
strcpy( buffer + 0x94, s.data() );
}
-void KTar::writeLonglink(char *buffer, const QCString &name, char typeflag,
+void KTar::writeLonglink(char *buffer, const TQCString &name, char typeflag,
const char *uname, const char *gname) {
strcpy( buffer, "././@LongLink" );
int namelen = name.length() + 1;
@@ -737,14 +737,14 @@ void KTar::writeLonglink(char *buffer, const QCString &name, char typeflag,
}/*wend*/
}
-bool KTar::prepareWriting(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KTar::prepareWriting(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::prepareWriting(name,user,group,size,perm,atime,mtime,ctime);
}
-bool KTar::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint size, mode_t perm,
+bool KTar::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint size, mode_t perm,
time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -759,7 +759,7 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
}
// In some tar files we can find dir/./file => call cleanDirPath
- QString fileName ( QDir::cleanDirPath( name ) );
+ TQString fileName ( TQDir::cleanDirPath( name ) );
/*
// Create toplevel dirs
@@ -767,11 +767,11 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
// he needs to implement a findOrCreate equivalent in writeDir.
// But as KTar and the "tar" program both handle tar files without
// dir entries, there's really no need for that
- QString tmp ( fileName );
+ TQString tmp ( fileName );
int i = tmp.findRev( '/' );
if ( i != -1 )
{
- QString d = tmp.left( i + 1 ); // contains trailing slash
+ TQString d = tmp.left( i + 1 ); // contains trailing slash
if ( !m_dirList.contains( d ) )
{
tmp = tmp.mid( i + 1 );
@@ -785,9 +785,9 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedFilename = QFile::encodeName(fileName);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedFilename = TQFile::encodeName(fileName);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if ( fileName.length() > 99 )
@@ -799,7 +799,7 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
// zero out the rest (except for what gets filled anyways)
memset(buffer+0x9d, 0, 0x200 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer(buffer, permstr, size, mtime, 0x30, uname, gname);
@@ -808,14 +808,14 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
return device()->writeBlock( buffer, 0x200 ) == 0x200;
}
-bool KTar::writeDir(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+bool KTar::writeDir(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeDir(name,user,group,perm,atime,mtime,ctime);
}
-bool KTar::writeDir_impl(const QString &name, const QString &user,
- const QString &group, mode_t perm,
+bool KTar::writeDir_impl(const TQString &name, const TQString &user,
+ const TQString &group, mode_t perm,
time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -830,7 +830,7 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
}
// In some tar files we can find dir/./ => call cleanDirPath
- QString dirName ( QDir::cleanDirPath( name ) );
+ TQString dirName ( TQDir::cleanDirPath( name ) );
// Need trailing '/'
if ( dirName.right(1) != "/" )
@@ -844,9 +844,9 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedDirname = QFile::encodeName(dirName);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedDirname = TQFile::encodeName(dirName);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if ( dirName.length() > 99 )
@@ -858,7 +858,7 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
// zero out the rest (except for what gets filled anyways)
memset(buffer+0x9d, 0, 0x200 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer( buffer, permstr, 0, mtime, 0x35, uname, gname);
@@ -871,14 +871,14 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
return true; // TODO if wanted, better error control
}
-bool KTar::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KTar::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeSymLink(name,target,user,group,perm,atime,mtime,ctime);
}
-bool KTar::writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KTar::writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -895,17 +895,17 @@ bool KTar::writeSymLink_impl(const QString &name, const QString &target,
device()->flush();
// In some tar files we can find dir/./file => call cleanDirPath
- QString fileName ( QDir::cleanDirPath( name ) );
+ TQString fileName ( TQDir::cleanDirPath( name ) );
char buffer[ 0x201 ];
memset( buffer, 0, 0x200 );
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedFilename = QFile::encodeName(fileName);
- QCString encodedTarget = QFile::encodeName(target);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedFilename = TQFile::encodeName(fileName);
+ TQCString encodedTarget = TQFile::encodeName(target);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if (target.length() > 99)
@@ -922,7 +922,7 @@ bool KTar::writeSymLink_impl(const QString &name, const QString &target,
// zero out the rest
memset(buffer+0x9d+100, 0, 0x200 - 100 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer(buffer, permstr, 0, mtime, 0x32, uname, gname);
diff --git a/kio/kio/ktar.h b/kio/kio/ktar.h
index 174117215..915cfed3a 100644
--- a/kio/kio/ktar.h
+++ b/kio/kio/ktar.h
@@ -22,10 +22,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <karchive.h>
@@ -50,17 +50,17 @@ public:
* specify the compression layer ! If the mimetype is omitted, it
* will be determined from the filename.
*/
- KTar( const QString& filename, const QString & mimetype = QString::null );
+ KTar( const TQString& filename, const TQString & mimetype = TQString::null );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * @warning Do not assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * @warning Do not assume that giving a TQFile here will decompress the file,
* in case it's compressed!
* @param dev the device to read from. If the source is compressed, the
- * QIODevice must take care of decompression
+ * TQIODevice must take care of decompression
*/
- KTar( QIODevice * dev );
+ KTar( TQIODevice * dev );
/**
* If the tar ball is still opened, then it will be
@@ -70,10 +70,10 @@ public:
/**
* The name of the tar file, as passed to the constructor
- * Null if you used the QIODevice constructor.
- * @return the name of the file, or QString::null if unknown
+ * Null if you used the TQIODevice constructor.
+ * @return the name of the file, or TQString::null if unknown
*/
- QString fileName() { return m_filename; } // TODO KDE4 const
+ TQString fileName() { return m_filename; } // TODO KDE4 const
/**
* Special function for setting the "original file name" in the gzip header,
@@ -81,20 +81,20 @@ public:
* for instance. Should only be called if the underlying device is a KFilterDev!
* @param fileName the original file name
*/
- void setOrigFileName( const QCString & fileName );
+ void setOrigFileName( const TQCString & fileName );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
- virtual bool writeDir( const QString& name, const QString& user, const QString& group );
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeDir( const QString& name, const QString& user, const QString& group,
+ bool writeDir( const TQString& name, const TQString& user, const TQString& group,
mode_t perm, time_t atime, time_t mtime, time_t ctime );
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size );
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
virtual bool doneWriting( uint size );
@@ -112,7 +112,7 @@ private:
/**
* @internal
*/
- void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false );
+ void prepareDevice( const TQString & filename, const TQString & mimetype, bool forced = false );
/**
* @internal
@@ -135,24 +135,24 @@ private:
* @p uname user name
* @p gname group name
*/
- void writeLonglink(char *buffer, const QCString &name, char typeflag,
+ void writeLonglink(char *buffer, const TQCString &name, char typeflag,
const char *uname, const char *gname);
Q_LONG readRawHeader(char *buffer);
- bool readLonglink(char *buffer,QCString &longlink);
- Q_LONG readHeader(char *buffer,QString &name,QString &symlink);
+ bool readLonglink(char *buffer,TQCString &longlink);
+ Q_LONG readHeader(char *buffer,TQString &name,TQString &symlink);
- QString m_filename;
+ TQString m_filename;
protected:
virtual void virtual_hook( int id, void* data );
- bool prepareWriting_impl(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
- bool writeDir_impl(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+ bool writeDir_impl(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
private:
class KTarPrivate;
diff --git a/kio/kio/ktrader.cpp b/kio/kio/ktrader.cpp
index 6349e0cad..dbe096075 100644
--- a/kio/kio/ktrader.cpp
+++ b/kio/kio/ktrader.cpp
@@ -19,8 +19,8 @@
#include "ktrader.h"
#include "ktraderparsetree.h"
-#include <qtl.h>
-#include <qbuffer.h>
+#include <tqtl.h>
+#include <tqbuffer.h>
#include <kuserprofile.h>
#include <kstandarddirs.h>
@@ -103,15 +103,15 @@ KTrader::~KTrader()
{
}
-KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _constraint,
- const QString& _preferences ) const
+KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _constraint,
+ const TQString& _preferences ) const
{
- return query( _servicetype, QString::null, _constraint, _preferences );
+ return query( _servicetype, TQString::null, _constraint, _preferences );
}
-KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _genericServiceType,
- const QString& _constraint,
- const QString& _preferences ) const
+KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _genericServiceType,
+ const TQString& _constraint,
+ const TQString& _preferences ) const
{
// TODO: catch errors here
ParseTreeBase::Ptr constr;
@@ -147,7 +147,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
if ( !!prefs )
{
- QValueList<KTraderSorter> sorter;
+ TQValueList<KTraderSorter> sorter;
KServiceTypeProfile::OfferList::Iterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
@@ -157,7 +157,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
}
qBubbleSort( sorter );
- QValueList<KTraderSorter>::Iterator it2 = sorter.begin();
+ TQValueList<KTraderSorter>::Iterator it2 = sorter.begin();
for( ; it2 != sorter.end(); ++it2 )
ret.prepend( (*it2).service() );
}
@@ -169,7 +169,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
}
#ifndef NDEBUG
- QString query = _servicetype;
+ TQString query = _servicetype;
if ( !_genericServiceType.isEmpty() ) {
query += ", ";
query += _genericServiceType;
diff --git a/kio/kio/ktrader.h b/kio/kio/ktrader.h
index 3bf90ce84..e5bb734e6 100644
--- a/kio/kio/ktrader.h
+++ b/kio/kio/ktrader.h
@@ -18,8 +18,8 @@
#ifndef __ktrader_h__
#define __ktrader_h__
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kservice.h>
/**
@@ -89,8 +89,8 @@ public:
/**
* A list of services.
*/
- typedef QValueList<KService::Ptr> OfferList;
- typedef QValueListIterator<KService::Ptr> OfferListIterator;
+ typedef TQValueList<KService::Ptr> OfferList;
+ typedef TQValueListIterator<KService::Ptr> OfferListIterator;
/**
* Standard destructor
@@ -117,18 +117,18 @@ public:
* fields found in the .desktop files.
*
* @param servicetype A service type like 'text/plain', 'text/html', or 'KOfficePlugin'.
- * @param constraint A constraint to limit the choices returned, QString::null to
+ * @param constraint A constraint to limit the choices returned, TQString::null to
* get all services of the given @p servicetype
- * @param preferences Indicates a particular preference to return, QString::null to ignore.
+ * @param preferences Indicates a particular preference to return, TQString::null to ignore.
* Uses an expression in the constraint language that must return
* a number
*
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kio/kio/html/tradersyntax.html
*/
- virtual OfferList query( const QString& servicetype,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null) const;
+ virtual OfferList query( const TQString& servicetype,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null) const;
/**
* A variant of query(), that takes two service types as an input.
@@ -144,18 +144,18 @@ public:
*
* @param servicetype A service type like 'text/plain', 'text/html', or 'KOfficePlugin'.
* @param genericServiceType a basic service type, like 'KParts/ReadOnlyPart' or 'Application'
- * @param constraint A constraint to limit the choices returned, QString::null to
+ * @param constraint A constraint to limit the choices returned, TQString::null to
* get all services of the given @p servicetype
- * @param preferences Indicates a particular preference to return, QString::null to ignore.
+ * @param preferences Indicates a particular preference to return, TQString::null to ignore.
* Uses an expression in the constraint language that must return
* a number
*
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html
*/
- OfferList query( const QString& servicetype, const QString& genericServiceType,
- const QString& constraint /*= QString::null*/,
- const QString& preferences /*= QString::null*/) const;
+ OfferList query( const TQString& servicetype, const TQString& genericServiceType,
+ const TQString& constraint /*= TQString::null*/,
+ const TQString& preferences /*= TQString::null*/) const;
/**
* This is a static pointer to a KTrader instance.
diff --git a/kio/kio/ktraderparse.cpp b/kio/kio/ktraderparse.cpp
index aa4b799c4..64d9e449f 100644
--- a/kio/kio/ktraderparse.cpp
+++ b/kio/kio/ktraderparse.cpp
@@ -35,9 +35,9 @@ using namespace KIO;
static ParseTreeBase::Ptr *pTree = 0;
static const char* sCode = 0;
-ParseTreeBase::Ptr KIO::parseConstraints( const QString& _constr )
+ParseTreeBase::Ptr KIO::parseConstraints( const TQString& _constr )
{
- QCString str = _constr.utf8();
+ TQCString str = _constr.utf8();
sCode = str.data();
KTraderParse_mainParse( sCode );
sCode = 0;
@@ -45,9 +45,9 @@ ParseTreeBase::Ptr KIO::parseConstraints( const QString& _constr )
return *pTree;
}
-ParseTreeBase::Ptr KIO::parsePreferences( const QString& _prefs )
+ParseTreeBase::Ptr KIO::parsePreferences( const TQString& _prefs )
{
- QCString str = _prefs.utf8();
+ TQCString str = _prefs.utf8();
sCode = str.data();
KTraderParse_mainParse( sCode );
sCode = 0;
diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp
index 74366b990..711ec5356 100644
--- a/kio/kio/ktraderparsetree.cpp
+++ b/kio/kio/ktraderparsetree.cpp
@@ -396,7 +396,7 @@ bool ParseTreeEXIST::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_BOOL;
- QVariant prop = _context->service->property( m_id );
+ TQVariant prop = _context->service->property( m_id );
_context->b = prop.isValid();
return true;
@@ -433,13 +433,13 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
if ( (c1.type == ParseContext::T_NUM) &&
(c2.type == ParseContext::T_SEQ) &&
- ((*(c2.seq.begin())).type() == QVariant::Int)) {
+ ((*(c2.seq.begin())).type() == TQVariant::Int)) {
- QValueList<QVariant>::ConstIterator it = c2.seq.begin();
- QValueList<QVariant>::ConstIterator end = c2.seq.end();
+ TQValueList<TQVariant>::ConstIterator it = c2.seq.begin();
+ TQValueList<TQVariant>::ConstIterator end = c2.seq.end();
_context->b = false;
for (; it != end; it++)
- if ((*it).type() == QVariant::Int &&
+ if ((*it).type() == TQVariant::Int &&
(*it).toInt() == c1.i) {
_context->b = true;
break;
@@ -449,13 +449,13 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
if ( c1.type == ParseContext::T_DOUBLE &&
c2.type == ParseContext::T_SEQ &&
- (*(c2.seq.begin())).type() == QVariant::Double) {
+ (*(c2.seq.begin())).type() == TQVariant::Double) {
- QValueList<QVariant>::ConstIterator it = c2.seq.begin();
- QValueList<QVariant>::ConstIterator end = c2.seq.end();
+ TQValueList<TQVariant>::ConstIterator it = c2.seq.begin();
+ TQValueList<TQVariant>::ConstIterator end = c2.seq.end();
_context->b = false;
for (; it != end; it++)
- if ((*it).type() == QVariant::Double &&
+ if ((*it).type() == TQVariant::Double &&
(*it).toDouble() == c1.i) {
_context->b = true;
break;
@@ -474,46 +474,46 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
bool ParseTreeID::eval( ParseContext *_context ) const
{
- QVariant prop = _context->service->property( m_str );
+ TQVariant prop = _context->service->property( m_str );
if ( !prop.isValid() )
return false;
- if ( prop.type() == QVariant::String )
+ if ( prop.type() == TQVariant::String )
{
_context->str = prop.toString();
_context->type = ParseContext::T_STRING;
return true;
}
- if ( prop.type() == QVariant::Int )
+ if ( prop.type() == TQVariant::Int )
{
_context->i = prop.toInt();
_context->type = ParseContext::T_NUM;
return true;
}
- if ( prop.type() == QVariant::Bool )
+ if ( prop.type() == TQVariant::Bool )
{
_context->b = prop.toBool();
_context->type = ParseContext::T_BOOL;
return true;
}
- if ( prop.type() == QVariant::Double )
+ if ( prop.type() == TQVariant::Double )
{
_context->f = prop.toDouble();
_context->type = ParseContext::T_DOUBLE;
return true;
}
- if ( prop.type() == QVariant::List )
+ if ( prop.type() == TQVariant::List )
{
_context->seq = prop.toList();
_context->type = ParseContext::T_SEQ;
return true;
}
- if ( prop.type() == QVariant::StringList )
+ if ( prop.type() == TQVariant::StringList )
{
_context->strSeq = prop.toStringList();
_context->type = ParseContext::T_STR_SEQ;
@@ -528,24 +528,24 @@ bool ParseTreeMIN2::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_DOUBLE;
- QVariant prop = _context->service->property( m_strId );
+ TQVariant prop = _context->service->property( m_strId );
if ( !prop.isValid() )
return false;
if ( !_context->initMaxima( m_strId ) )
return false;
- QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
if ( it == _context->maxima.end() )
return false;
- if ( prop.type() == QVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
+ if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
{
_context->f = (double)( prop.toInt() - it.data().iMin ) /
(double)(it.data().iMax - it.data().iMin ) * (-2.0) + 1.0;
return true;
}
- else if ( prop.type() == QVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
+ else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
{
_context->f = ( prop.toDouble() - it.data().fMin ) / (it.data().fMax - it.data().fMin )
* (-2.0) + 1.0;
@@ -559,7 +559,7 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_DOUBLE;
- QVariant prop = _context->service->property( m_strId );
+ TQVariant prop = _context->service->property( m_strId );
if ( !prop.isValid() )
return false;
@@ -568,17 +568,17 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const
return false;
// Find extrema
- QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
if ( it == _context->maxima.end() )
return false;
- if ( prop.type() == QVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
+ if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
{
_context->f = (double)( prop.toInt() - it.data().iMin ) /
(double)(it.data().iMax - it.data().iMin ) * 2.0 - 1.0;
return true;
}
- else if ( prop.type() == QVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
+ else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
{
_context->f = ( prop.toDouble() - it.data().fMin ) /
(it.data().fMax - it.data().fMin ) * 2.0 - 1.0;
@@ -595,7 +595,7 @@ int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &_service,
if ( !_tree )
return 1;
- QMap<QString,PreferencesMaxima> maxima;
+ TQMap<TQString,PreferencesMaxima> maxima;
ParseContext c( _service, _list, maxima );
// Error during evaluation ?
@@ -618,7 +618,7 @@ PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::
if ( !_tree )
return ret;
- QMap<QString,PreferencesMaxima> maxima;
+ TQMap<TQString,PreferencesMaxima> maxima;
ParseContext c( _service, _list, maxima );
if ( !_tree->eval( &c ) )
@@ -639,26 +639,26 @@ PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::
return ret;
}
-bool ParseContext::initMaxima( const QString& _prop )
+bool ParseContext::initMaxima( const TQString& _prop )
{
// Is the property known ?
- QVariant prop = service->property( _prop );
+ TQVariant prop = service->property( _prop );
if ( !prop.isValid() )
return false;
// Numeric ?
- if ( prop.type() != QVariant::Int && prop.type() != QVariant::Double )
+ if ( prop.type() != TQVariant::Int && prop.type() != TQVariant::Double )
return false;
// Did we cache the result ?
- QMap<QString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
if ( it != maxima.end() )
return ( it.data().type == PreferencesMaxima::PM_DOUBLE ||
it.data().type == PreferencesMaxima::PM_INT );
// Double or Int ?
PreferencesMaxima extrema;
- if ( prop.type() == QVariant::Int )
+ if ( prop.type() == TQVariant::Int )
extrema.type = PreferencesMaxima::PM_INVALID_INT;
else
extrema.type = PreferencesMaxima::PM_INVALID_DOUBLE;
@@ -667,7 +667,7 @@ bool ParseContext::initMaxima( const QString& _prop )
KServiceTypeProfile::OfferList::ConstIterator oit = offers.begin();
for( ; oit != offers.end(); ++oit )
{
- QVariant p = (*oit).service()->property( _prop );
+ TQVariant p = (*oit).service()->property( _prop );
if ( p.isValid() )
{
// Determine new maximum/minimum
diff --git a/kio/kio/ktraderparsetree.h b/kio/kio/ktraderparsetree.h
index 8dfeed36b..3af4273d0 100644
--- a/kio/kio/ktraderparsetree.h
+++ b/kio/kio/ktraderparsetree.h
@@ -20,11 +20,11 @@
#ifndef __parse_tree_h__
#define __parse_tree_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qshared.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqshared.h>
#include <kservice.h>
#include <kuserprofile.h>
@@ -95,25 +95,25 @@ public:
ParseContext( const ParseContext* _ctx ) : service( _ctx->service ), maxima( _ctx->maxima ),
offers( _ctx->offers ) {}
ParseContext( const KService::Ptr & _service, const KServiceTypeProfile::OfferList& _offers,
- QMap<QString,PreferencesMaxima>& _m )
+ TQMap<TQString,PreferencesMaxima>& _m )
: service( _service ), maxima( _m ), offers( _offers ) {}
- bool initMaxima( const QString& _prop);
+ bool initMaxima( const TQString& _prop);
enum Type { T_STRING = 1, T_DOUBLE = 2, T_NUM = 3, T_BOOL = 4,
T_STR_SEQ = 5, T_SEQ = 6 };
- QString str;
+ TQString str;
int i;
double f;
bool b;
- QValueList<QVariant> seq;
- QStringList strSeq;
+ TQValueList<TQVariant> seq;
+ TQStringList strSeq;
Type type;
KService::Ptr service;
- QMap<QString,PreferencesMaxima>& maxima;
+ TQMap<TQString,PreferencesMaxima>& maxima;
const KServiceTypeProfile::OfferList& offers;
};
@@ -131,8 +131,8 @@ protected:
virtual ~ParseTreeBase() { };
};
-KIO_EXPORT ParseTreeBase::Ptr parseConstraints( const QString& _constr );
-KIO_EXPORT ParseTreeBase::Ptr parsePreferences( const QString& _prefs );
+KIO_EXPORT ParseTreeBase::Ptr parseConstraints( const TQString& _constr );
+KIO_EXPORT ParseTreeBase::Ptr parsePreferences( const TQString& _prefs );
/**
* @internal
@@ -265,7 +265,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_id;
+ TQString m_id;
};
/**
@@ -279,7 +279,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_str;
+ TQString m_str;
};
/**
@@ -293,7 +293,7 @@ public:
bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_STRING; _context->str = m_str; return true; }
protected:
- QString m_str;
+ TQString m_str;
};
/**
@@ -349,7 +349,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_strId;
+ TQString m_strId;
};
/**
@@ -363,7 +363,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_strId;
+ TQString m_strId;
};
}
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index 7188ba62b..2c4c5b12e 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -30,12 +30,12 @@
#include "kurifilter.h"
-template class QPtrList<KURIFilterPlugin>;
+template class TQPtrList<KURIFilterPlugin>;
-KURIFilterPlugin::KURIFilterPlugin( QObject *parent, const char *name, double pri )
- :QObject( parent, name )
+KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri )
+ :TQObject( parent, name )
{
- m_strName = QString::fromLatin1( name );
+ m_strName = TQString::fromLatin1( name );
m_dblPriority = pri;
}
@@ -52,9 +52,9 @@ class KURIFilterDataPrivate
{
public:
KURIFilterDataPrivate() {};
- QString abs_path;
- QString args;
- QString typedString;
+ TQString abs_path;
+ TQString args;
+ TQString typedString;
};
KURIFilterData::KURIFilterData( const KURIFilterData& data )
@@ -81,20 +81,20 @@ void KURIFilterData::init( const KURL& url )
{
m_iType = KURIFilterData::UNKNOWN;
m_pURI = url;
- m_strErrMsg = QString::null;
- m_strIconName = QString::null;
+ m_strErrMsg = TQString::null;
+ m_strIconName = TQString::null;
m_bCheckForExecutables = true;
m_bChanged = true;
d = new KURIFilterDataPrivate;
d->typedString = url.url();
}
-void KURIFilterData::init( const QString& url )
+void KURIFilterData::init( const TQString& url )
{
m_iType = KURIFilterData::UNKNOWN;
m_pURI = url;
- m_strErrMsg = QString::null;
- m_strIconName = QString::null;
+ m_strErrMsg = TQString::null;
+ m_strIconName = TQString::null;
m_bCheckForExecutables = true;
m_bChanged = true;
d = new KURIFilterDataPrivate;
@@ -107,13 +107,13 @@ void KURIFilterData::reinit(const KURL &url)
init(url);
}
-void KURIFilterData::reinit(const QString &url)
+void KURIFilterData::reinit(const TQString &url)
{
delete d;
init(url);
}
-QString KURIFilterData::typedString() const
+TQString KURIFilterData::typedString() const
{
return d->typedString;
}
@@ -133,7 +133,7 @@ bool KURIFilterData::hasAbsolutePath() const
return !d->abs_path.isEmpty();
}
-bool KURIFilterData::setAbsolutePath( const QString& absPath )
+bool KURIFilterData::setAbsolutePath( const TQString& absPath )
{
// Since a malformed URL could possibly be a relative
// URL we tag it as a possible local resource...
@@ -145,17 +145,17 @@ bool KURIFilterData::setAbsolutePath( const QString& absPath )
return false;
}
-QString KURIFilterData::absolutePath() const
+TQString KURIFilterData::absolutePath() const
{
return d->abs_path;
}
-QString KURIFilterData::argsAndOptions() const
+TQString KURIFilterData::argsAndOptions() const
{
return d->args;
}
-QString KURIFilterData::iconName()
+TQString KURIFilterData::iconName()
{
if( m_bChanged )
{
@@ -170,37 +170,37 @@ QString KURIFilterData::iconName()
}
case KURIFilterData::EXECUTABLE:
{
- QString exeName = m_pURI.url();
+ TQString exeName = m_pURI.url();
exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given
KService::Ptr service = KService::serviceByDesktopName( exeName );
- if (service && service->icon() != QString::fromLatin1( "unknown" ))
+ if (service && service->icon() != TQString::fromLatin1( "unknown" ))
m_strIconName = service->icon();
// Try to find an icon with the same name as the binary (useful for non-kde apps)
else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() )
m_strIconName = exeName;
else
// not found, use default
- m_strIconName = QString::fromLatin1("exec");
+ m_strIconName = TQString::fromLatin1("exec");
break;
}
case KURIFilterData::HELP:
{
- m_strIconName = QString::fromLatin1("khelpcenter");
+ m_strIconName = TQString::fromLatin1("khelpcenter");
break;
}
case KURIFilterData::SHELL:
{
- m_strIconName = QString::fromLatin1("konsole");
+ m_strIconName = TQString::fromLatin1("konsole");
break;
}
case KURIFilterData::ERROR:
case KURIFilterData::BLOCKED:
{
- m_strIconName = QString::fromLatin1("error");
+ m_strIconName = TQString::fromLatin1("error");
break;
}
default:
- m_strIconName = QString::null;
+ m_strIconName = TQString::null;
break;
}
m_bChanged = false;
@@ -209,7 +209,7 @@ QString KURIFilterData::iconName()
}
//******************************************** KURIFilterPlugin **********************************************
-void KURIFilterPlugin::setArguments( KURIFilterData& data, const QString& args ) const
+void KURIFilterPlugin::setArguments( KURIFilterData& data, const TQString& args ) const
{
data.d->args = args;
}
@@ -235,7 +235,7 @@ KURIFilter::~KURIFilter()
{
}
-bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
+bool KURIFilter::filterURI( KURIFilterData& data, const TQStringList& filters )
{
bool filtered = false;
KURIFilterPluginList use_plugins;
@@ -247,9 +247,9 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
else
{
//kdDebug() << "Named plugins requested..." << endl;
- for( QStringList::ConstIterator lst = filters.begin(); lst != filters.end(); ++lst )
+ for( TQStringList::ConstIterator lst = filters.begin(); lst != filters.end(); ++lst )
{
- QPtrListIterator<KURIFilterPlugin> it( m_lstPlugins );
+ TQPtrListIterator<KURIFilterPlugin> it( m_lstPlugins );
for( ; it.current() ; ++it )
{
if( (*lst) == it.current()->name() )
@@ -262,7 +262,7 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
}
}
- QPtrListIterator<KURIFilterPlugin> it( use_plugins );
+ TQPtrListIterator<KURIFilterPlugin> it( use_plugins );
//kdDebug() << "Using " << use_plugins.count() << " out of the "
// << m_lstPlugins.count() << " available plugins" << endl;
for (; it.current() && !filtered; ++it)
@@ -273,7 +273,7 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
return filtered;
}
-bool KURIFilter::filterURI( KURL& uri, const QStringList& filters )
+bool KURIFilter::filterURI( KURL& uri, const TQStringList& filters )
{
KURIFilterData data = uri;
bool filtered = filterURI( data, filters );
@@ -281,7 +281,7 @@ bool KURIFilter::filterURI( KURL& uri, const QStringList& filters )
return filtered;
}
-bool KURIFilter::filterURI( QString& uri, const QStringList& filters )
+bool KURIFilter::filterURI( TQString& uri, const TQStringList& filters )
{
KURIFilterData data = uri;
bool filtered = filterURI( data, filters );
@@ -290,29 +290,29 @@ bool KURIFilter::filterURI( QString& uri, const QStringList& filters )
}
-KURL KURIFilter::filteredURI( const KURL &uri, const QStringList& filters )
+KURL KURIFilter::filteredURI( const KURL &uri, const TQStringList& filters )
{
KURIFilterData data = uri;
filterURI( data, filters );
return data.uri();
}
-QString KURIFilter::filteredURI( const QString &uri, const QStringList& filters )
+TQString KURIFilter::filteredURI( const TQString &uri, const TQStringList& filters )
{
KURIFilterData data = uri;
filterURI( data, filters );
return data.uri().url();
}
-QPtrListIterator<KURIFilterPlugin> KURIFilter::pluginsIterator() const
+TQPtrListIterator<KURIFilterPlugin> KURIFilter::pluginsIterator() const
{
- return QPtrListIterator<KURIFilterPlugin>(m_lstPlugins);
+ return TQPtrListIterator<KURIFilterPlugin>(m_lstPlugins);
}
-QStringList KURIFilter::pluginNames() const
+TQStringList KURIFilter::pluginNames() const
{
- QStringList list;
- for(QPtrListIterator<KURIFilterPlugin> i = pluginsIterator(); *i; ++i)
+ TQStringList list;
+ for(TQPtrListIterator<KURIFilterPlugin> i = pluginsIterator(); *i; ++i)
list.append((*i)->name());
return list;
}
diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h
index 309eae889..0960c1419 100644
--- a/kio/kio/kurifilter.h
+++ b/kio/kio/kurifilter.h
@@ -25,9 +25,9 @@
#ifndef __kurifilter_h__
#define __kurifilter_h__
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -54,7 +54,7 @@ class KCModule;
* \b Example
*
* \code
-* QString text = "kde.org";
+* TQString text = "kde.org";
* KURIFilterData d = text;
* bool filtered = KURIFilter::self()->filter( d );
* cout << "URL: " << text.latin1() << endl
@@ -117,7 +117,7 @@ public:
*
* @param url is the string to be filtered.
*/
- KURIFilterData( const QString& url ) { init( url ); }
+ KURIFilterData( const TQString& url ) { init( url ); }
/**
* Copy constructor.
@@ -161,11 +161,11 @@ public:
* This functions returns the error message set
* by the plugin whenever the uri type is set to
* KURIFilterData::ERROR. Otherwise, it returns
- * a QString::null.
+ * a TQString::null.
*
* @return the error message or a NULL when there is none.
*/
- QString errorMsg() const { return m_strErrMsg; }
+ TQString errorMsg() const { return m_strErrMsg; }
/**
* Returns the URI type.
@@ -185,7 +185,7 @@ public:
*
* @param url the string to be filtered.
*/
- void setData( const QString& url ) { reinit( url ); }
+ void setData( const TQString& url ) { reinit( url ); }
/**
* Same as above except the argument is a URL.
@@ -212,14 +212,14 @@ public:
* @param abs_path the abolute path to the local resource.
* @return true if absolute path is successfully set. Otherwise, false.
*/
- bool setAbsolutePath( const QString& abs_path );
+ bool setAbsolutePath( const TQString& abs_path );
/**
* Returns the absolute path if one has already been set.
- * @return the absolute path, or QString::null
+ * @return the absolute path, or TQString::null
* @see hasAbsolutePath()
*/
- QString absolutePath() const;
+ TQString absolutePath() const;
/**
* Checks whether the supplied data had an absolute path.
@@ -232,9 +232,9 @@ public:
* Returns the command line options and arguments for a
* local resource when present.
*
- * @return options and arguments when present, otherwise QString::null
+ * @return options and arguments when present, otherwise TQString::null
*/
- QString argsAndOptions() const;
+ TQString argsAndOptions() const;
/**
* Checks whether the current data is a local resource with
@@ -252,9 +252,9 @@ public:
* is found.
*
* @return the name of the icon associated with the resource,
- * or QString::null if not found
+ * or TQString::null if not found
*/
- QString iconName();
+ TQString iconName();
/**
* Check whether the provided uri is executable or not.
@@ -280,7 +280,7 @@ public:
* @return the string as typed by the user, before any URL processing is done
* @since 3.2
*/
- QString typedString() const;
+ TQString typedString() const;
/**
* Overloaded assigenment operator.
@@ -300,7 +300,7 @@ public:
*
* @return an instance of a KURIFilterData object.
*/
- KURIFilterData& operator=( const QString& url ) { reinit( url ); return *this; }
+ KURIFilterData& operator=( const TQString& url ) { reinit( url ); return *this; }
protected:
@@ -314,20 +314,20 @@ protected:
* Initializes the KURIFilterData on construction.
* @param url the URL to initialize the object with
*/
- void init( const QString& url = QString::null );
+ void init( const TQString& url = TQString::null );
private:
// BC hack to avoid leaking KURIFilterDataPrivate objects.
// setData() and operator= used to call init() without deleting `d'
void reinit(const KURL& url);
- void reinit(const QString& url = QString::null);
+ void reinit(const TQString& url = TQString::null);
bool m_bCheckForExecutables;
bool m_bChanged;
- QString m_strErrMsg;
- QString m_strIconName;
+ TQString m_strErrMsg;
+ TQString m_strIconName;
KURL m_pURI;
URITypes m_iType;
@@ -361,14 +361,14 @@ public:
* @param name the name of the plugin, or 0 for no name
* @param pri the priority of the plugin.
*/
- KURIFilterPlugin( QObject *parent = 0, const char *name = 0, double pri = 1.0 );
+ KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
/**
* Returns the filter's name.
*
* @return A string naming the filter.
*/
- virtual QString name() const { return m_strName; }
+ virtual TQString name() const { return m_strName; }
/**
* Returns the filter's priority.
@@ -396,14 +396,14 @@ public:
*
* @return A configuration module, 0 if the filter isn't configurable.
*/
- virtual KCModule *configModule( QWidget*, const char* ) const { return 0; }
+ virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
/**
* Returns the name of the configuration module for the filter.
*
- * @return the name of a configuration module or QString::null if none.
+ * @return the name of a configuration module or TQString::null if none.
*/
- virtual QString configName() const { return name(); }
+ virtual TQString configName() const { return name(); }
protected:
@@ -415,7 +415,7 @@ protected:
/**
* Sets the error message in @p data to @p errormsg.
*/
- void setErrorMsg ( KURIFilterData& data, const QString& errmsg ) const {
+ void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
data.m_strErrMsg = errmsg;
}
@@ -431,9 +431,9 @@ protected:
* Sets the arguments and options string in @p data
* to @p args if any were found during filterting.
*/
- void setArguments( KURIFilterData& data, const QString& args ) const;
+ void setArguments( KURIFilterData& data, const TQString& args ) const;
- QString m_strName;
+ TQString m_strName;
double m_dblPriority;
protected:
@@ -446,7 +446,7 @@ private:
/**
* A list of filter plugins.
*/
-class KIO_EXPORT KURIFilterPluginList : public QPtrList<KURIFilterPlugin>
+class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
{
public:
virtual int compareItems(Item a, Item b)
@@ -500,25 +500,25 @@ private:
* of a boolean flag:
*
* \code
- * QString u = KURIFilter::self()->filteredURI( "kde.org" );
+ * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
* \endcode
*
* You can also restrict the filter(s) to be used by supplying
* the name of the filter(s) to use. By defualt all available
* filters will be used. To use specific filters, add the names
- * of the filters you want to use to a QStringList and invoke
+ * of the filters you want to use to a TQStringList and invoke
* the appropriate filtering function. The examples below show
* the use of specific filters. The first one uses a single
* filter called kshorturifilter while the second example uses
* multiple filters:
*
* \code
- * QString text = "kde.org";
+ * TQString text = "kde.org";
* bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
* \endcode
*
* \code
- * QStringList list;
+ * TQStringList list;
* list << "kshorturifilter" << "localdomainfilter";
* bool filtered = KURIFilter::self()->filterURI( text, list );
* \endcode
@@ -555,7 +555,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( KURIFilterData& data, const QStringList& filters = QStringList() );
+ bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
/**
* Filters the URI given by the URL.
@@ -568,7 +568,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( KURL &uri, const QStringList& filters = QStringList() );
+ bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
/**
* Filters a string representing a URI.
@@ -581,7 +581,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( QString &uri, const QStringList& filters = QStringList() );
+ bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
/**
* Returns the filtered URI.
@@ -594,7 +594,7 @@ public:
*
* @return the filtered URI or null if it cannot be filtered
*/
- KURL filteredURI( const KURL &uri, const QStringList& filters = QStringList() );
+ KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
/**
* Return a filtered string representation of a URI.
@@ -607,7 +607,7 @@ public:
*
* @return the filtered URI or null if it cannot be filtered
*/
- QString filteredURI( const QString &uri, const QStringList& filters = QStringList() );
+ TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
/**
* Return an iterator to iterate over all loaded
@@ -615,15 +615,15 @@ public:
*
* @return a plugin iterator.
*/
- QPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
+ TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
/**
* Return a list of the names of all loaded plugins.
*
- * @return a QStringList of plugin names
+ * @return a TQStringList of plugin names
* @since 3.1
*/
- QStringList pluginNames() const;
+ TQStringList pluginNames() const;
protected:
diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp
index cddd9fa79..88a566b5f 100644
--- a/kio/kio/kurlcompletion.cpp
+++ b/kio/kio/kurlcompletion.cpp
@@ -28,16 +28,16 @@
#include <assert.h>
#include <limits.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdeepcopy.h>
-#include <qthread.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdeepcopy.h>
+#include <tqthread.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -61,10 +61,10 @@
#include "kurlcompletion.h"
-static bool expandTilde(QString &);
-static bool expandEnv(QString &);
+static bool expandTilde(TQString &);
+static bool expandEnv(TQString &);
-static QString unescape(const QString &text);
+static TQString unescape(const TQString &text);
// Permission mask for files that are executable by
// user, group or other
@@ -84,7 +84,7 @@ class CompletionMatchEvent : public QCustomEvent
{
public:
CompletionMatchEvent( CompletionThread *thread ) :
- QCustomEvent( uniqueType() ),
+ TQCustomEvent( uniqueType() ),
m_completionThread( thread )
{}
@@ -99,17 +99,17 @@ class CompletionThread : public QThread
{
protected:
CompletionThread( KURLCompletion *receiver ) :
- QThread(),
+ TQThread(),
m_receiver( receiver ),
m_terminationRequested( false )
{}
public:
void requestTermination() { m_terminationRequested = true; }
- QDeepCopy<QStringList> matches() const { return m_matches; }
+ TQDeepCopy<TQStringList> matches() const { return m_matches; }
protected:
- void addMatch( const QString &match ) { m_matches.append( match ); }
+ void addMatch( const TQString &match ) { m_matches.append( match ); }
bool terminationRequested() const { return m_terminationRequested; }
void done()
{
@@ -121,7 +121,7 @@ protected:
private:
KURLCompletion *m_receiver;
- QStringList m_matches;
+ TQStringList m_matches;
bool m_terminationRequested;
};
@@ -140,11 +140,11 @@ public:
protected:
virtual void run()
{
- static const QChar tilde = '~';
+ static const TQChar tilde = '~';
struct passwd *pw;
while ( ( pw = ::getpwent() ) && !terminationRequested() )
- addMatch( tilde + QString::fromLocal8Bit( pw->pw_name ) );
+ addMatch( tilde + TQString::fromLocal8Bit( pw->pw_name ) );
::endpwent();
@@ -158,15 +158,15 @@ class DirectoryListThread : public CompletionThread
{
public:
DirectoryListThread( KURLCompletion *receiver,
- const QStringList &dirList,
- const QString &filter,
+ const TQStringList &dirList,
+ const TQString &filter,
bool onlyExe,
bool onlyDir,
bool noHidden,
bool appendSlashToDir ) :
CompletionThread( receiver ),
- m_dirList( QDeepCopy<QStringList>( dirList ) ),
- m_filter( QDeepCopy<QString>( filter ) ),
+ m_dirList( TQDeepCopy<TQStringList>( dirList ) ),
+ m_filter( TQDeepCopy<TQString>( filter ) ),
m_onlyExe( onlyExe ),
m_onlyDir( onlyDir ),
m_noHidden( noHidden ),
@@ -176,8 +176,8 @@ public:
virtual void run();
private:
- QStringList m_dirList;
- QString m_filter;
+ TQStringList m_dirList;
+ TQString m_filter;
bool m_onlyExe;
bool m_onlyDir;
bool m_noHidden;
@@ -192,22 +192,22 @@ void DirectoryListThread::run()
// of all of the things that would seem to be problematic. Here are a few
// things that I have checked to be safe here (some used indirectly):
//
- // QDir::currentDirPath(), QDir::setCurrent(), QFile::decodeName(), QFile::encodeName()
- // QString::fromLocal8Bit(), QString::local8Bit(), QTextCodec::codecForLocale()
+ // TQDir::currentDirPath(), TQDir::setCurrent(), TQFile::decodeName(), TQFile::encodeName()
+ // TQString::fromLocal8Bit(), TQString::local8Bit(), TQTextCodec::codecForLocale()
//
// Also see (for POSIX functions):
// http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
DIR *dir = 0;
- for ( QStringList::ConstIterator it = m_dirList.begin();
+ for ( TQStringList::ConstIterator it = m_dirList.begin();
it != m_dirList.end() && !terminationRequested();
++it )
{
// Open the next directory
if ( !dir ) {
- dir = ::opendir( QFile::encodeName( *it ) );
+ dir = ::opendir( TQFile::encodeName( *it ) );
if ( ! dir ) {
kdDebug() << "Failed to open dir: " << *it << endl;
done();
@@ -219,8 +219,8 @@ void DirectoryListThread::run()
// chdir to the directroy so we won't have to deal with full paths
// with stat()
- QString path = QDir::currentDirPath();
- QDir::setCurrent( *it );
+ TQString path = TQDir::currentDirPath();
+ TQDir::setCurrent( *it );
// Loop through all directory entries
// Solaris and IRIX dirent structures do not allocate space for d_name. On
@@ -256,7 +256,7 @@ void DirectoryListThread::run()
if ( dirEntry->d_name[0] == '.' && dirEntry->d_name[1] == '.' && dirEntry->d_name[2] == '\0' )
continue;
- QString file = QFile::decodeName( dirEntry->d_name );
+ TQString file = TQFile::decodeName( dirEntry->d_name );
if ( m_filter.isEmpty() || file.startsWith( m_filter ) ) {
@@ -293,7 +293,7 @@ void DirectoryListThread::run()
// chdir to the original directory
- QDir::setCurrent( path );
+ TQDir::setCurrent( path );
::closedir( dir );
dir = 0;
@@ -313,19 +313,19 @@ void DirectoryListThread::run()
class KURLCompletion::MyURL
{
public:
- MyURL(const QString &url, const QString &cwd);
+ MyURL(const TQString &url, const TQString &cwd);
MyURL(const MyURL &url);
~MyURL();
KURL *kurl() const { return m_kurl; }
- QString protocol() const { return m_kurl->protocol(); }
+ TQString protocol() const { return m_kurl->protocol(); }
// The directory with a trailing '/'
- QString dir() const { return m_kurl->directory(false, false); }
- QString file() const { return m_kurl->fileName(false); }
+ TQString dir() const { return m_kurl->directory(false, false); }
+ TQString file() const { return m_kurl->fileName(false); }
// The initial, unparsed, url, as a string.
- QString url() const { return m_url; }
+ TQString url() const { return m_url; }
// Is the initial string a URL, or just a path (whether absolute or relative)
bool isURL() const { return m_isURL; }
@@ -333,14 +333,14 @@ public:
void filter( bool replace_user_dir, bool replace_env );
private:
- void init(const QString &url, const QString &cwd);
+ void init(const TQString &url, const TQString &cwd);
KURL *m_kurl;
- QString m_url;
+ TQString m_url;
bool m_isURL;
};
-KURLCompletion::MyURL::MyURL(const QString &url, const QString &cwd)
+KURLCompletion::MyURL::MyURL(const TQString &url, const TQString &cwd)
{
init(url, cwd);
}
@@ -352,24 +352,24 @@ KURLCompletion::MyURL::MyURL(const MyURL &url)
m_isURL = url.m_isURL;
}
-void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
+void KURLCompletion::MyURL::init(const TQString &url, const TQString &cwd)
{
// Save the original text
m_url = url;
// Non-const copy
- QString url_copy = url;
+ TQString url_copy = url;
// Special shortcuts for "man:" and "info:"
if ( url_copy[0] == '#' ) {
if ( url_copy[1] == '#' )
- url_copy.replace( 0, 2, QString("info:") );
+ url_copy.replace( 0, 2, TQString("info:") );
else
- url_copy.replace( 0, 1, QString("man:") );
+ url_copy.replace( 0, 1, TQString("man:") );
}
// Look for a protocol in 'url'
- QRegExp protocol_regex = QRegExp( "^[^/\\s\\\\]*:" );
+ TQRegExp protocol_regex = TQRegExp( "^[^/\\s\\\\]*:" );
// Assume "file:" or whatever is given by 'cwd' if there is
// no protocol. (KURL does this only for absoute paths)
@@ -384,7 +384,7 @@ void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
if ( cwd.isEmpty() )
{
m_kurl = new KURL();
- if ( !QDir::isRelativePath(url_copy) || url_copy[0] == '$' || url_copy[0] == '~' )
+ if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '$' || url_copy[0] == '~' )
m_kurl->setPath( url_copy );
else
*m_kurl = url_copy;
@@ -394,7 +394,7 @@ void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
KURL base = KURL::fromPathOrURL( cwd );
base.adjustPath(+1);
- if ( !QDir::isRelativePath(url_copy) || url_copy[0] == '~' || url_copy[0] == '$' )
+ if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '~' || url_copy[0] == '$' )
{
m_kurl = new KURL();
m_kurl->setPath( url_copy );
@@ -416,7 +416,7 @@ KURLCompletion::MyURL::~MyURL()
void KURLCompletion::MyURL::filter( bool replace_user_dir, bool replace_env )
{
- QString d = dir() + file();
+ TQString d = dir() + file();
if ( replace_user_dir ) expandTilde( d );
if ( replace_env ) expandEnv( d );
m_kurl->setPath( d );
@@ -434,7 +434,7 @@ public:
dirListThread(0) {}
~KURLCompletionPrivate();
- QValueList<KURL*> list_urls;
+ TQValueList<KURL*> list_urls;
bool onlyLocalProto;
@@ -446,13 +446,13 @@ public:
bool popup_append_slash;
// Keep track of currently listed files to avoid reading them again
- QString last_path_listed;
- QString last_file_listed;
- QString last_prepend;
+ TQString last_path_listed;
+ TQString last_file_listed;
+ TQString last_prepend;
int last_compl_type;
int last_no_hidden;
- QString cwd; // "current directory" = base dir for completion
+ TQString cwd; // "current directory" = base dir for completion
KURLCompletion::Mode mode; // ExeCompletion, FileCompletion, DirCompletion
bool replace_env;
@@ -461,13 +461,13 @@ public:
KIO::ListJob *list_job; // kio job to list directories
- QString prepend; // text to prepend to listed items
- QString compl_text; // text to pass on to KCompletion
+ TQString prepend; // text to prepend to listed items
+ TQString compl_text; // text to pass on to KCompletion
// Filters for files read with kio
bool list_urls_only_exe; // true = only list executables
bool list_urls_no_hidden;
- QString list_urls_filter; // filter for listed files
+ TQString list_urls_filter; // filter for listed files
CompletionThread *userListThread;
CompletionThread *dirListThread;
@@ -509,7 +509,7 @@ void KURLCompletion::init()
{
d = new KURLCompletionPrivate;
- d->cwd = QDir::homeDirPath();
+ d->cwd = TQDir::homeDirPath();
d->replace_home = true;
d->replace_env = true;
@@ -527,12 +527,12 @@ void KURLCompletion::init()
d->onlyLocalProto = c->readBoolEntry("LocalProtocolsOnly", false);
}
-void KURLCompletion::setDir(const QString &dir)
+void KURLCompletion::setDir(const TQString &dir)
{
d->cwd = dir;
}
-QString KURLCompletion::dir() const
+TQString KURLCompletion::dir() const
{
return d->cwd;
}
@@ -572,7 +572,7 @@ void KURLCompletion::setReplaceHome( bool replace )
*
* Entry point for file name completion
*/
-QString KURLCompletion::makeCompletion(const QString &text)
+TQString KURLCompletion::makeCompletion(const TQString &text)
{
//kdDebug() << "KURLCompletion::makeCompletion: " << text << " d->cwd=" << d->cwd << endl;
@@ -588,7 +588,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
d->prepend = text.left( text.length() - toRemove );
d->complete_url = url.isURL();
- QString match;
+ TQString match;
// Environment variables
//
@@ -635,7 +635,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
setListedURL( CTNone );
stop();
- return QString::null;
+ return TQString::null;
}
/*
@@ -644,7 +644,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
* Go on and call KCompletion.
* Called when all matches have been added
*/
-QString KURLCompletion::finished()
+TQString KURLCompletion::finished()
{
if ( d->last_compl_type == CTInfo )
return KCompletion::makeCompletion( d->compl_text.lower() );
@@ -676,7 +676,7 @@ void KURLCompletion::stop()
}
if ( !d->list_urls.isEmpty() ) {
- QValueList<KURL*>::Iterator it = d->list_urls.begin();
+ TQValueList<KURL*>::Iterator it = d->list_urls.begin();
for ( ; it != d->list_urls.end(); it++ )
delete (*it);
d->list_urls.clear();
@@ -692,8 +692,8 @@ void KURLCompletion::stop()
* Keep track of the last listed directory
*/
void KURLCompletion::setListedURL( int complType,
- const QString& dir,
- const QString& filter,
+ const TQString& dir,
+ const TQString& filter,
bool no_hidden )
{
d->last_compl_type = complType;
@@ -704,8 +704,8 @@ void KURLCompletion::setListedURL( int complType,
}
bool KURLCompletion::isListedURL( int complType,
- const QString& dir,
- const QString& filter,
+ const TQString& dir,
+ const TQString& filter,
bool no_hidden )
{
return d->last_compl_type == complType
@@ -734,7 +734,7 @@ bool KURLCompletion::isAutoCompletion()
// User directories
//
-bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::userCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file"
|| !url.dir().isEmpty()
@@ -753,7 +753,7 @@ bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
// are added to the first matching case.
d->userListThread->wait( 200 );
- QStringList l = d->userListThread->matches();
+ TQStringList l = d->userListThread->matches();
addMatches( l );
}
}
@@ -768,7 +768,7 @@ bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
extern char **environ; // Array of environment variables
-bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::envCompletion(const MyURL &url, TQString *match)
{
if ( url.file().at(0) != '$' )
return false;
@@ -779,12 +779,12 @@ bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
char **env = environ;
- QString dollar = QString("$");
+ TQString dollar = TQString("$");
- QStringList l;
+ TQStringList l;
while ( *env ) {
- QString s = QString::fromLocal8Bit( *env );
+ TQString s = TQString::fromLocal8Bit( *env );
int pos = s.find('=');
@@ -811,12 +811,12 @@ bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
// Executables
//
-bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::exeCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file" )
return false;
- QString dir = url.dir();
+ TQString dir = url.dir();
dir = unescape( dir ); // remove escapes
@@ -827,9 +827,9 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
// 3. $PATH
// 4. no directory at all
- QStringList dirList;
+ TQStringList dirList;
- if ( !QDir::isRelativePath(dir) ) {
+ if ( !TQDir::isRelativePath(dir) ) {
// complete path in url
dirList.append( dir );
}
@@ -839,10 +839,10 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
}
else if ( !url.file().isEmpty() ) {
// $PATH
- dirList = QStringList::split(KPATH_SEPARATOR,
- QString::fromLocal8Bit(::getenv("PATH")));
+ dirList = TQStringList::split(KPATH_SEPARATOR,
+ TQString::fromLocal8Bit(::getenv("PATH")));
- QStringList::Iterator it = dirList.begin();
+ TQStringList::Iterator it = dirList.begin();
for ( ; it != dirList.end(); it++ )
(*it).append('/');
@@ -868,7 +868,7 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
else {
if ( d->dirListThread )
setListedURL( CTExe, dir, url.file(), no_hidden_files );
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -879,12 +879,12 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
// Local files
//
-bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::fileCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file" )
return false;
- QString dir = url.dir();
+ TQString dir = url.dir();
if (url.url()[0] == '.')
{
@@ -911,9 +911,9 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
// 2. current directory (d->cwd)
// 3. no directory at all
- QStringList dirList;
+ TQStringList dirList;
- if ( !QDir::isRelativePath(dir) ) {
+ if ( !TQDir::isRelativePath(dir) ) {
// complete path in url
dirList.append( dir );
}
@@ -948,7 +948,7 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
*match = finished();
}
else {
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -959,7 +959,7 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
// URLs not handled elsewhere...
//
-bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::urlCompletion(const MyURL &url, TQString *match)
{
//kdDebug() << "urlCompletion: url = " << *url.kurl() << endl;
if (d->onlyLocalProto && KProtocolInfo::protocolClass(url.protocol()) != ":local")
@@ -977,8 +977,8 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
// 3. there is no directory (e.g. "ftp://ftp.kd" shouldn't do anything)
// 4. auto or popup completion mode depending on settings
- bool man_or_info = ( url_dir.protocol() == QString("man")
- || url_dir.protocol() == QString("info") );
+ bool man_or_info = ( url_dir.protocol() == TQString("man")
+ || url_dir.protocol() == TQString("info") );
if ( !url_dir.isValid()
|| !KProtocolInfo::supportsListing( url_dir )
@@ -992,7 +992,7 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
url_dir.setFileName(""); // not really nesseccary, but clear the filename anyway...
// Remove escapes
- QString dir = url_dir.directory( false, false );
+ TQString dir = url_dir.directory( false, false );
dir = unescape( dir );
@@ -1007,18 +1007,18 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
setListedURL( CTUrl, url_dir.prettyURL(), "" );
- QValueList<KURL*> url_list;
+ TQValueList<KURL*> url_list;
url_list.append( new KURL( url_dir ) );
listURLs( url_list, "", false );
- *match = QString::null;
+ *match = TQString::null;
}
else if ( !isRunning() ) {
*match = finished();
}
else {
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -1034,10 +1034,10 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
*
* Called to add matches to KCompletion
*/
-void KURLCompletion::addMatches( const QStringList &matches )
+void KURLCompletion::addMatches( const TQStringList &matches )
{
- QStringList::ConstIterator it = matches.begin();
- QStringList::ConstIterator end = matches.end();
+ TQStringList::ConstIterator it = matches.begin();
+ TQStringList::ConstIterator end = matches.end();
if ( d->complete_url )
for ( ; it != end; it++ )
@@ -1056,12 +1056,12 @@ void KURLCompletion::addMatches( const QStringList &matches )
* In either case, addMatches() is called with the listed
* files, and eventually finished() when the listing is done
*
- * Returns the match if available, or QString::null if
+ * Returns the match if available, or TQString::null if
* DirLister timed out or using kio
*/
-QString KURLCompletion::listDirectories(
- const QStringList &dirList,
- const QString &filter,
+TQString KURLCompletion::listDirectories(
+ const TQStringList &dirList,
+ const TQString &filter,
bool only_exe,
bool only_dir,
bool no_hidden,
@@ -1078,9 +1078,9 @@ QString KURLCompletion::listDirectories(
if ( d->dirListThread )
d->dirListThread->requestTermination();
- QStringList dirs;
+ TQStringList dirs;
- for ( QStringList::ConstIterator it = dirList.begin();
+ for ( TQStringList::ConstIterator it = dirList.begin();
it != dirList.end();
++it )
{
@@ -1103,9 +1103,9 @@ QString KURLCompletion::listDirectories(
// Use KIO
//kdDebug() << "Listing (listDirectories): " << dirList << " with KIO" << endl;
- QValueList<KURL*> url_list;
+ TQValueList<KURL*> url_list;
- QStringList::ConstIterator it = dirList.begin();
+ TQStringList::ConstIterator it = dirList.begin();
for ( ; it != dirList.end(); it++ )
url_list.append( new KURL(*it) );
@@ -1113,7 +1113,7 @@ QString KURLCompletion::listDirectories(
listURLs( url_list, filter, only_exe, no_hidden );
// Will call addMatches() and finished()
- return QString::null;
+ return TQString::null;
}
}
@@ -1126,8 +1126,8 @@ QString KURLCompletion::listDirectories(
* finished() is called when the listing is done
*/
void KURLCompletion::listURLs(
- const QValueList<KURL *> &urls,
- const QString &filter,
+ const TQValueList<KURL *> &urls,
+ const TQString &filter,
bool only_exe,
bool no_hidden )
{
@@ -1156,20 +1156,20 @@ void KURLCompletion::listURLs(
*/
void KURLCompletion::slotEntries(KIO::Job*, const KIO::UDSEntryList& entries)
{
- QStringList matches;
+ TQStringList matches;
KIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
- QString filter = d->list_urls_filter;
+ TQString filter = d->list_urls_filter;
int filter_len = filter.length();
// Iterate over all files
//
for (; it != end; ++it) {
- QString name;
- QString url;
+ TQString name;
+ TQString url;
bool is_exe = false;
bool is_dir = false;
@@ -1256,12 +1256,12 @@ void KURLCompletion::slotIOFinished( KIO::Job * job )
assert( d->list_job );
connect( d->list_job,
- SIGNAL(result(KIO::Job*)),
- SLOT(slotIOFinished(KIO::Job*)) );
+ TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotIOFinished(KIO::Job*)) );
connect( d->list_job,
- SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)) );
+ TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)) );
delete kurl;
}
@@ -1278,7 +1278,7 @@ void KURLCompletion::slotIOFinished( KIO::Job * job )
* Append '/' to directories for file completion. This is
* done here to avoid stat()'ing a lot of files
*/
-void KURLCompletion::postProcessMatch( QString *match ) const
+void KURLCompletion::postProcessMatch( TQString *match ) const
{
// kdDebug() << "KURLCompletion::postProcess: " << *match << endl;
@@ -1291,27 +1291,27 @@ void KURLCompletion::postProcessMatch( QString *match ) const
}
}
-void KURLCompletion::adjustMatch( QString& match ) const
+void KURLCompletion::adjustMatch( TQString& match ) const
{
if ( match.at( match.length()-1 ) != '/' )
{
- QString copy;
+ TQString copy;
- if ( match.startsWith( QString("file:") ) )
+ if ( match.startsWith( TQString("file:") ) )
copy = KURL(match).path();
else
copy = match;
expandTilde( copy );
expandEnv( copy );
- if ( QDir::isRelativePath(copy) )
+ if ( TQDir::isRelativePath(copy) )
copy.prepend( d->cwd + '/' );
// kdDebug() << "postProcess: stating " << copy << endl;
KDE_struct_stat sbuff;
- QCString file = QFile::encodeName( copy );
+ TQCString file = TQFile::encodeName( copy );
if ( KDE_stat( (const char*)file, &sbuff ) == 0 ) {
if ( S_ISDIR ( sbuff.st_mode ) )
@@ -1323,10 +1323,10 @@ void KURLCompletion::adjustMatch( QString& match ) const
}
}
-void KURLCompletion::postProcessMatches( QStringList * matches ) const
+void KURLCompletion::postProcessMatches( TQStringList * matches ) const
{
if ( !matches->isEmpty() && d->last_compl_type == CTFile ) {
- QStringList::Iterator it = matches->begin();
+ TQStringList::Iterator it = matches->begin();
for (; it != matches->end(); ++it ) {
adjustMatch( (*it) );
}
@@ -1343,7 +1343,7 @@ void KURLCompletion::postProcessMatches( KCompletionMatches * matches ) const
}
}
-void KURLCompletion::customEvent(QCustomEvent *e)
+void KURLCompletion::customEvent(TQCustomEvent *e)
{
if ( e->type() == CompletionMatchEvent::uniqueType() ) {
@@ -1370,12 +1370,12 @@ void KURLCompletion::customEvent(QCustomEvent *e)
}
// static
-QString KURLCompletion::replacedPath( const QString& text, bool replaceHome, bool replaceEnv )
+TQString KURLCompletion::replacedPath( const TQString& text, bool replaceHome, bool replaceEnv )
{
if ( text.isEmpty() )
return text;
- MyURL url( text, QString::null ); // no need to replace something of our current cwd
+ MyURL url( text, TQString::null ); // no need to replace something of our current cwd
if ( !url.kurl()->isLocalFile() )
return text;
@@ -1384,7 +1384,7 @@ QString KURLCompletion::replacedPath( const QString& text, bool replaceHome, boo
}
-QString KURLCompletion::replacedPath( const QString& text )
+TQString KURLCompletion::replacedPath( const TQString& text )
{
return replacedPath( text, d->replace_home, d->replace_env );
}
@@ -1399,7 +1399,7 @@ QString KURLCompletion::replacedPath( const QString& text )
* Expand environment variables in text. Escaped '$' are ignored.
* Return true if expansion was made.
*/
-static bool expandEnv( QString &text )
+static bool expandEnv( TQString &text )
{
// Find all environment variables beginning with '$'
//
@@ -1433,9 +1433,9 @@ static bool expandEnv( QString &text )
//
if ( pos2 >= 0 ) {
int len = pos2 - pos;
- QString key = text.mid( pos+1, len-1);
- QString value =
- QString::fromLocal8Bit( ::getenv(key.local8Bit()) );
+ TQString key = text.mid( pos+1, len-1);
+ TQString value =
+ TQString::fromLocal8Bit( ::getenv(key.local8Bit()) );
if ( !value.isEmpty() ) {
expanded = true;
@@ -1458,7 +1458,7 @@ static bool expandEnv( QString &text )
* Replace "~user" with the users home directory
* Return true if expansion was made.
*/
-static bool expandTilde(QString &text)
+static bool expandTilde(TQString &text)
{
if ( text[0] != '~' )
return false;
@@ -1480,13 +1480,13 @@ static bool expandTilde(QString &text)
//
if ( pos2 >= 0 ) {
- QString user = text.mid( 1, pos2-1 );
- QString dir;
+ TQString user = text.mid( 1, pos2-1 );
+ TQString dir;
// A single ~ is replaced with $HOME
//
if ( user.isEmpty() ) {
- dir = QDir::homeDirPath();
+ dir = TQDir::homeDirPath();
}
// ~user is replaced with the dir from passwd
//
@@ -1494,7 +1494,7 @@ static bool expandTilde(QString &text)
struct passwd *pw = ::getpwnam( user.local8Bit() );
if ( pw )
- dir = QFile::decodeName( pw->pw_dir );
+ dir = TQFile::decodeName( pw->pw_dir );
::endpwent();
}
@@ -1514,9 +1514,9 @@ static bool expandTilde(QString &text)
* Remove escapes and return the result in a new string
*
*/
-static QString unescape(const QString &text)
+static TQString unescape(const TQString &text)
{
- QString result;
+ TQString result;
for (uint pos = 0; pos < text.length(); pos++)
if ( text[pos] != '\\' )
diff --git a/kio/kio/kurlcompletion.h b/kio/kio/kurlcompletion.h
index 85e9b027f..a06d7dc4b 100644
--- a/kio/kio/kurlcompletion.h
+++ b/kio/kio/kurlcompletion.h
@@ -25,8 +25,8 @@
#include <kcompletion.h>
#include <kio/jobclasses.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KURL;
class KURLCompletionPrivate;
@@ -74,25 +74,25 @@ public:
* The completion is done asyncronously if KIO is used.
*
* Returns the first match for user, environment, and local dir completion
- * and QString::null for asynchronous completion (KIO or threaded).
+ * and TQString::null for asynchronous completion (KIO or threaded).
*
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- virtual QString makeCompletion(const QString &text); // KDE4: remove return value, it's often null due to threading
+ virtual TQString makeCompletion(const TQString &text); // KDE4: remove return value, it's often null due to threading
/**
* Sets the current directory (used as base for completion).
* Default = $HOME.
* @param dir the current directory, either as a path or URL
*/
- virtual void setDir(const QString &dir);
+ virtual void setDir(const TQString &dir);
/**
* Returns the current directory, as it was given in setDir
* @return the current directory (path or URL)
*/
- virtual QString dir() const;
+ virtual TQString dir() const;
/**
* Check whether asynchronous completion is in progress.
@@ -157,23 +157,23 @@ public:
* @return the path or URL resulting from this operation. If you
* want to convert it to a KURL, use KURL::fromPathOrURL.
*/
- QString replacedPath( const QString& text );
+ TQString replacedPath( const TQString& text );
/**
* @internal I'll let ossi add a real one to KShell :)
* @since 3.2
*/
- static QString replacedPath( const QString& text,
+ static TQString replacedPath( const TQString& text,
bool replaceHome, bool replaceEnv = true );
class MyURL;
protected:
// Called by KCompletion, adds '/' to directories
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches* matches ) const;
- virtual void customEvent( QCustomEvent *e );
+ virtual void customEvent( TQCustomEvent *e );
protected slots:
void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
@@ -183,48 +183,48 @@ private:
bool isAutoCompletion();
- bool userCompletion(const MyURL &url, QString *match);
- bool envCompletion(const MyURL &url, QString *match);
- bool exeCompletion(const MyURL &url, QString *match);
- bool fileCompletion(const MyURL &url, QString *match);
- bool urlCompletion(const MyURL &url, QString *match);
+ bool userCompletion(const MyURL &url, TQString *match);
+ bool envCompletion(const MyURL &url, TQString *match);
+ bool exeCompletion(const MyURL &url, TQString *match);
+ bool fileCompletion(const MyURL &url, TQString *match);
+ bool urlCompletion(const MyURL &url, TQString *match);
// List a directory using readdir()
- void listDir( const QString& dir,
- QStringList *matches,
- const QString& filter,
+ void listDir( const TQString& dir,
+ TQStringList *matches,
+ const TQString& filter,
bool only_exe,
bool no_hidden );
// List the next dir in m_dirs
- QString listDirectories(const QStringList &,
- const QString &,
+ TQString listDirectories(const TQStringList &,
+ const TQString &,
bool only_exe = false,
bool only_dir = false,
bool no_hidden = false,
bool stat_files = true);
- void listURLs( const QValueList<KURL *> &urls,
- const QString &filter = QString::null,
+ void listURLs( const TQValueList<KURL *> &urls,
+ const TQString &filter = TQString::null,
bool only_exe = false,
bool no_hidden = false );
- void addMatches( const QStringList & );
- QString finished();
+ void addMatches( const TQStringList & );
+ TQString finished();
void init();
void setListedURL(int compl_type /* enum ComplType */,
- const QString& dir = QString::null,
- const QString& filter = QString::null,
+ const TQString& dir = TQString::null,
+ const TQString& filter = TQString::null,
bool no_hidden = false );
bool isListedURL( int compl_type /* enum ComplType */,
- const QString& dir = QString::null,
- const QString& filter = QString::null,
+ const TQString& dir = TQString::null,
+ const TQString& filter = TQString::null,
bool no_hidden = false );
- void adjustMatch( QString& match ) const;
+ void adjustMatch( TQString& match ) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kurlpixmapprovider.cpp b/kio/kio/kurlpixmapprovider.cpp
index e20c3b6ec..caeedf066 100644
--- a/kio/kio/kurlpixmapprovider.cpp
+++ b/kio/kio/kurlpixmapprovider.cpp
@@ -20,7 +20,7 @@
#include "kurlpixmapprovider.h"
-QPixmap KURLPixmapProvider::pixmapFor( const QString& url, int size ) {
+TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) {
KURL u;
if ( url.at(0) == '/' )
u.setPath( url );
diff --git a/kio/kio/kurlpixmapprovider.h b/kio/kio/kurlpixmapprovider.h
index 7edd37d5b..1fa400c1e 100644
--- a/kio/kio/kurlpixmapprovider.h
+++ b/kio/kio/kurlpixmapprovider.h
@@ -50,7 +50,7 @@ public:
* @return the resulting pixmap
* @see KIcon::StdSizes
*/
- virtual QPixmap pixmapFor( const QString& url, int size = 0 );
+ virtual TQPixmap pixmapFor( const TQString& url, int size = 0 );
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp
index 1895ebb98..b7ef68c76 100644
--- a/kio/kio/kuserprofile.cpp
+++ b/kio/kio/kuserprofile.cpp
@@ -27,10 +27,10 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qtl.h>
+#include <tqtl.h>
-template class QPtrList<KServiceTypeProfile>;
-typedef QPtrList<KServiceTypeProfile> KServiceTypeProfileList;
+template class TQPtrList<KServiceTypeProfile>;
+typedef TQPtrList<KServiceTypeProfile> KServiceTypeProfileList;
/*********************************************
*
@@ -55,24 +55,24 @@ void KServiceTypeProfile::initStatic()
KConfig config( "profilerc", true, false);
- static const QString & defaultGroup = KGlobal::staticQString("<default>");
+ static const TQString & defaultGroup = KGlobal::staticQString("<default>");
- QStringList tmpList = config.groupList();
- for (QStringList::Iterator aIt = tmpList.begin();
+ TQStringList tmpList = config.groupList();
+ for (TQStringList::Iterator aIt = tmpList.begin();
aIt != tmpList.end(); ++aIt) {
if ( *aIt == defaultGroup )
continue;
config.setGroup( *aIt );
- QString appId = config.readEntry( "Application" );
+ TQString appId = config.readEntry( "Application" );
KService::Ptr pService = KService::serviceByStorageId(appId);
if ( pService ) {
- QString application = pService->storageId();
- QString type = config.readEntry( "ServiceType" );
- QString type2 = config.readEntry( "GenericServiceType" );
+ TQString application = pService->storageId();
+ TQString type = config.readEntry( "ServiceType" );
+ TQString type2 = config.readEntry( "GenericServiceType" );
if (type2.isEmpty()) // compat code
type2 = (pService->type() == "Application") ? "Application" : "KParts/ReadOnlyPart";
int pref = config.readNumEntry( "Preference" );
@@ -107,10 +107,10 @@ void KServiceTypeProfile::clear()
}
//static
-KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const TQString& _servicetype, const TQString& _genericServiceType )
{
OfferList offers;
- QStringList serviceList;
+ TQStringList serviceList;
//kdDebug(7014) << "KServiceTypeProfile::offers( " << _servicetype << "," << _genericServiceType << " )" << endl;
// Note that KServiceTypeProfile::offers() calls KServiceType::offers(),
@@ -120,7 +120,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
initStatic();
// We want all profiles for servicetype, if we have profiles.
// ## Slow loop, if profilerc is big. We should use a map instead?
- QPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
+ TQPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
for( ; it.current(); ++it )
if ( it.current()->m_strServiceType == _servicetype )
{
@@ -159,7 +159,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
// but it's also the case for any service that's neither App nor ReadOnlyPart, e.g. RenameDlg/Plugin
KService::List list = KServiceType::offers( _servicetype );
//kdDebug(7014) << "Using KServiceType::offers, result: " << list.count() << " offers" << endl;
- QValueListIterator<KService::Ptr> it = list.begin();
+ TQValueListIterator<KService::Ptr> it = list.begin();
for( ; it != list.end(); ++it )
{
if (_genericServiceType.isEmpty() /*no constraint*/ || (*it)->hasServiceType( _genericServiceType ))
@@ -191,7 +191,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
return offers;
}
-KServiceTypeProfile::KServiceTypeProfile( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile::KServiceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType )
{
initStatic();
@@ -203,26 +203,26 @@ KServiceTypeProfile::~KServiceTypeProfile()
{
}
-void KServiceTypeProfile::addService( const QString& _service,
+void KServiceTypeProfile::addService( const TQString& _service,
int _preference, bool _allow_as_default )
{
m_mapServices[ _service ].m_iPreference = _preference;
m_mapServices[ _service ].m_bAllowAsDefault = _allow_as_default;
}
-int KServiceTypeProfile::preference( const QString& _service ) const
+int KServiceTypeProfile::preference( const TQString& _service ) const
{
KService::Ptr service = KService::serviceByName( _service );
if (!service)
return 0;
- QMap<QString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
return it.data().m_iPreference;
}
-bool KServiceTypeProfile::allowAsDefault( const QString& _service ) const
+bool KServiceTypeProfile::allowAsDefault( const TQString& _service ) const
{
KService::Ptr service = KService::serviceByName( _service );
if (!service)
@@ -233,21 +233,21 @@ bool KServiceTypeProfile::allowAsDefault( const QString& _service ) const
return false;
// Look what the user says ...
- QMap<QString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
return it.data().m_bAllowAsDefault;
}
-KServiceTypeProfile* KServiceTypeProfile::serviceTypeProfile( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile* KServiceTypeProfile::serviceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType )
{
initStatic();
- static const QString& app_str = KGlobal::staticQString("Application");
+ static const TQString& app_str = KGlobal::staticQString("Application");
- const QString &_genservicetype = ((!_genericServiceType.isEmpty()) ? _genericServiceType : app_str);
+ const TQString &_genservicetype = ((!_genericServiceType.isEmpty()) ? _genericServiceType : app_str);
- QPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
+ TQPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
for( ; it.current(); ++it )
if (( it.current()->m_strServiceType == _servicetype ) &&
( it.current()->m_strGenericServiceType == _genservicetype))
@@ -263,14 +263,14 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const
kdDebug(7014) << "KServiceTypeProfile::offers serviceType=" << m_strServiceType << " genericServiceType=" << m_strGenericServiceType << endl;
KService::List list = KServiceType::offers( m_strServiceType );
- QValueListIterator<KService::Ptr> it = list.begin();
+ TQValueListIterator<KService::Ptr> it = list.begin();
for( ; it != list.end(); ++it )
{
//kdDebug(7014) << "KServiceTypeProfile::offers considering " << (*it)->name() << endl;
if ( m_strGenericServiceType.isEmpty() || (*it)->hasServiceType( m_strGenericServiceType ) )
{
// Now look into the profile, to find this service's preference.
- QMap<QString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() );
+ TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() );
if( it2 != m_mapServices.end() )
{
@@ -300,7 +300,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const
return offers;
}
-KService::Ptr KServiceTypeProfile::preferredService( const QString & _serviceType, const QString & _genericServiceType )
+KService::Ptr KServiceTypeProfile::preferredService( const TQString & _serviceType, const TQString & _genericServiceType )
{
OfferList lst = offers( _serviceType, _genericServiceType );
diff --git a/kio/kio/kuserprofile.h b/kio/kio/kuserprofile.h
index 4591771f0..061657625 100644
--- a/kio/kio/kuserprofile.h
+++ b/kio/kio/kuserprofile.h
@@ -20,10 +20,10 @@
#ifndef __kuserprofile_h__
#define __kuserprofile_h__
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
@@ -117,7 +117,7 @@ private:
class KIO_EXPORT KServiceTypeProfile
{
public:
- typedef QValueList<KServiceOffer> OfferList;
+ typedef TQValueList<KServiceOffer> OfferList;
~KServiceTypeProfile();
@@ -128,7 +128,7 @@ public:
* @return the user's preference number of the given
* @p _service, or 0 the service is unknown.
*/
- int preference( const QString& _service ) const;
+ int preference( const TQString& _service ) const;
/**
* @deprecated Remove in KDE 4, unused.
@@ -136,7 +136,7 @@ public:
* @param _service the name of the service to check
* @return true if allowed as default
*/
- bool allowAsDefault( const QString& _service ) const;
+ bool allowAsDefault( const TQString& _service ) const;
/**
* Returns the list of all service offers for the service types
@@ -154,17 +154,17 @@ public:
* "KParts/ReadOnlyPart")
* @return the preferred service, or 0 if no service is available
*/
- static KService::Ptr preferredService( const QString & serviceType, const QString & genericServiceType );
+ static KService::Ptr preferredService( const TQString & serviceType, const TQString & genericServiceType );
/**
* Returns the profile for the requested service type.
* @param servicetype the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then the "Application" generic type will be used
* @return the KServiceTypeProfile with the given arguments, or 0 if not found
*/
- static KServiceTypeProfile* serviceTypeProfile( const QString& servicetype, const QString & genericServiceType = QString::null );
+ static KServiceTypeProfile* serviceTypeProfile( const TQString& servicetype, const TQString & genericServiceType = TQString::null );
/**
* Returns the offers associated with a given servicetype, sorted by preference.
@@ -181,17 +181,17 @@ public:
*
* @param servicetype the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then all generic types will be included
* @return the list of offers witht he given parameters
*/
- static OfferList offers( const QString& servicetype, const QString& genericServiceType = QString::null );
+ static OfferList offers( const TQString& servicetype, const TQString& genericServiceType = TQString::null );
/**
* Returns a list of all KServiceTypeProfiles.
* @return a list of all KServiceTypeProfiles
*/
- static const QPtrList<KServiceTypeProfile>& serviceTypeProfiles() { return *s_lstProfiles; }
+ static const TQPtrList<KServiceTypeProfile>& serviceTypeProfiles() { return *s_lstProfiles; }
/**
* Clear all cached information
@@ -225,11 +225,11 @@ protected:
* first time.
* @param serviceType the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then the "Application" generic type will be used
*/
- KServiceTypeProfile( const QString& serviceType,
- const QString& genericServiceType = QString::null );
+ KServiceTypeProfile( const TQString& serviceType,
+ const TQString& genericServiceType = TQString::null );
/**
* Add a service to this profile.
@@ -239,7 +239,7 @@ protected:
* @param _allow_as_default true if the service should be used as
* default
*/
- void addService( const QString& _service, int _preference = 1, bool _allow_as_default = true );
+ void addService( const TQString& _service, int _preference = 1, bool _allow_as_default = true );
private:
/**
@@ -260,20 +260,20 @@ private:
/**
* Map of all services for which we have assessments.
*/
- QMap<QString,Service> m_mapServices;
+ TQMap<TQString,Service> m_mapServices;
/**
* ServiceType of this profile.
*/
- QString m_strServiceType;
+ TQString m_strServiceType;
/**
* Secondary ServiceType of this profile.
*/
- QString m_strGenericServiceType;
+ TQString m_strGenericServiceType;
static void initStatic();
- static QPtrList<KServiceTypeProfile>* s_lstProfiles;
+ static TQPtrList<KServiceTypeProfile>* s_lstProfiles;
static bool s_configurationMode;
private:
class KServiceTypeProfilePrivate* d;
diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp
index 7943a0ae7..6f29bb264 100644
--- a/kio/kio/kzip.cpp
+++ b/kio/kio/kzip.cpp
@@ -44,11 +44,11 @@
#include <ksavefile.h>
#include <kdebug.h>
-#include <qasciidict.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
+#include <tqasciidict.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
#include <zlib.h>
#include <time.h>
@@ -56,7 +56,7 @@
const int max_path_len = 4095; // maximum number of character a path may contain
-static void transformToMsDos(const QDateTime& dt, char* buffer)
+static void transformToMsDos(const TQDateTime& dt, char* buffer)
{
if ( dt.isValid() )
{
@@ -91,15 +91,15 @@ static time_t transformFromMsDos(const char* buffer)
int h = time >> 11;
int m = ( time & 0x7ff ) >> 5;
int s = ( time & 0x1f ) * 2 ;
- QTime qt(h, m, s);
+ TQTime qt(h, m, s);
Q_UINT16 date = (uchar)buffer[2] | ( (uchar)buffer[3] << 8 );
int y = ( date >> 9 ) + 1980;
int o = ( date & 0x1ff ) >> 5;
int d = ( date & 0x1f );
- QDate qd(y, o, d);
+ TQDate qd(y, o, d);
- QDateTime dt( qd, qt );
+ TQDateTime dt( qd, qt );
return dt.toTime_t();
}
@@ -108,14 +108,14 @@ static time_t transformFromMsDos(const char* buffer)
/** all relevant information about parsing file information */
struct ParseFileInfo {
// file related info
-// QCString name; // filename
+// TQCString name; // filename
mode_t perm; // permissions of this file
time_t atime; // last access time (UNIX format)
time_t mtime; // modification time (UNIX format)
time_t ctime; // creation time (UNIX format)
int uid; // user id (-1 if not specified)
int gid; // group id (-1 if not specified)
- QCString guessed_symlink; // guessed symlink target
+ TQCString guessed_symlink; // guessed symlink target
int extralen; // length of extra field
// parsing related info
@@ -321,8 +321,8 @@ public:
unsigned long m_crc; // checksum
KZipFileEntry* m_currentFile; // file currently being written
- QIODevice* m_currentDev; // filterdev used to write to the above file
- QPtrList<KZipFileEntry> m_fileList; // flat list of all files, for the index (saves a recursive method ;)
+ TQIODevice* m_currentDev; // filterdev used to write to the above file
+ TQPtrList<KZipFileEntry> m_fileList; // flat list of all files, for the index (saves a recursive method ;)
int m_compression;
KZip::ExtraField m_extraField;
unsigned int m_offset; // holds the offset of the place in the zip,
@@ -332,7 +332,7 @@ public:
KSaveFile* m_saveFile;
};
-KZip::KZip( const QString& filename )
+KZip::KZip( const TQString& filename )
: KArchive( 0L )
{
//kdDebug(7040) << "KZip(filename) reached." << endl;
@@ -344,10 +344,10 @@ KZip::KZip( const QString& filename )
// KDE4: move KSaveFile support to base class, KArchive.
}
-KZip::KZip( QIODevice * dev )
+KZip::KZip( TQIODevice * dev )
: KArchive( dev )
{
- //kdDebug(7040) << "KZip::KZip( QIODevice * dev) reached." << endl;
+ //kdDebug(7040) << "KZip::KZip( TQIODevice * dev) reached." << endl;
d = new KZipPrivate;
}
@@ -361,7 +361,7 @@ KZip::~KZip()
if ( d->m_saveFile ) // writing mode
delete d->m_saveFile;
else // reading mode
- delete device(); // (the QFile)
+ delete device(); // (the TQFile)
}
delete d;
}
@@ -391,9 +391,9 @@ bool KZip::openArchive( int mode )
case IO_ReadOnly:
case IO_ReadWrite:
{
- // ReadWrite mode still uses QFile for now; we'd need to copy to the tempfile, in fact.
+ // ReadWrite mode still uses TQFile for now; we'd need to copy to the tempfile, in fact.
if ( !m_filename.isEmpty() ) {
- setDevice( new QFile( m_filename ) );
+ setDevice( new TQFile( m_filename ) );
if ( !device()->open( mode ) )
return false;
}
@@ -408,7 +408,7 @@ bool KZip::openArchive( int mode )
// Check that it's a valid ZIP file
// the above code opened the underlying device already.
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if (!dev) {
return false;
@@ -418,7 +418,7 @@ bool KZip::openArchive( int mode )
int n;
// contains information gathered from the local file headers
- QAsciiDict<ParseFileInfo> pfi_map(1009, true /*case sensitive */, true /*copy keys*/);
+ TQAsciiDict<ParseFileInfo> pfi_map(1009, true /*case sensitive */, true /*copy keys*/);
pfi_map.setAutoDelete(true);
// We set a bool for knowing if we are allowed to skip the start of the file
@@ -477,7 +477,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
kdDebug(7040) << "archive size: " << dev->size() << endl;
// read filename
- QCString filename(namelen + 1);
+ TQCString filename(namelen + 1);
n = dev->readBlock(filename.data(), namelen);
if ( n < namelen ) {
kdWarning(7040) << "Invalid ZIP file. Name not completely read (#2)" << endl;
@@ -668,7 +668,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
//kdDebug() << "general purpose flag=" << gpf << endl;
// length of the filename (well, pathname indeed)
int namelen = (uchar)buffer[29] << 8 | (uchar)buffer[28];
- QCString bufferName( namelen + 1 );
+ TQCString bufferName( namelen + 1 );
n = dev->readBlock( bufferName.data(), namelen );
if ( n < namelen )
kdWarning(7040) << "Invalid ZIP file. Name not completely read" << endl;
@@ -677,7 +677,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
if (!pfi) { // can that happen?
pfi_map.insert(bufferName.data(), pfi = new ParseFileInfo());
}
- QString name( QFile::decodeName(bufferName) );
+ TQString name( TQFile::decodeName(bufferName) );
//kdDebug(7040) << "name: " << name << endl;
// only in central header ! see below.
@@ -726,7 +726,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
access = (uchar)buffer[40] | (uchar)buffer[41] << 8;
}
- QString entryName;
+ TQString entryName;
if ( name.endsWith( "/" ) ) // Entries with a trailing slash are directories
{
@@ -746,7 +746,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
KArchiveEntry* entry;
if ( isdir )
{
- QString path = QDir::cleanDirPath( name );
+ TQString path = TQDir::cleanDirPath( name );
KArchiveEntry* ent = rootDir()->entry( path );
if ( ent && ent->isDirectory() )
{
@@ -755,15 +755,15 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
}
else
{
- entry = new KArchiveDirectory( this, entryName, access, (int)pfi->mtime, rootDir()->user(), rootDir()->group(), QString::null );
+ entry = new KArchiveDirectory( this, entryName, access, (int)pfi->mtime, rootDir()->user(), rootDir()->group(), TQString::null );
//kdDebug(7040) << "KArchiveDirectory created, entryName= " << entryName << ", name=" << name << endl;
}
}
else
{
- QString symlink;
+ TQString symlink;
if (S_ISLNK(access)) {
- symlink = QFile::decodeName(pfi->guessed_symlink);
+ symlink = TQFile::decodeName(pfi->guessed_symlink);
}
entry = new KZipFileEntry( this, entryName, access, pfi->mtime,
rootDir()->user(), rootDir()->group(),
@@ -783,7 +783,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
else
{
// In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
+ TQString path = TQDir::cleanDirPath( name.left( pos ) );
// Ensure container directory exists, create otherwise
KArchiveDirectory * tdir = findOrCreate( path );
tdir->addEntry(entry);
@@ -874,7 +874,7 @@ bool KZip::closeArchive()
Q_LONG centraldiroffset = device()->at();
//kdDebug(7040) << "closearchive: centraldiroffset: " << centraldiroffset << endl;
Q_LONG atbackup = centraldiroffset;
- QPtrListIterator<KZipFileEntry> it( d->m_fileList );
+ TQPtrListIterator<KZipFileEntry> it( d->m_fileList );
for ( ; it.current() ; ++it )
{ //set crc and compressed size in each local file header
@@ -912,7 +912,7 @@ bool KZip::closeArchive()
//kdDebug(7040) << "closearchive: filename: " << it.current()->path()
// << " encoding: "<< it.current()->encoding() << endl;
- QCString path = QFile::encodeName(it.current()->path());
+ TQCString path = TQFile::encodeName(it.current()->path());
const int extra_field_len = 9;
int bufferSize = extra_field_len + path.length() + 46;
@@ -1052,7 +1052,7 @@ bool KZip::closeArchive()
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data )
+bool KZip::writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data )
{
mode_t mode = 0100644;
time_t the_time = time(0);
@@ -1061,8 +1061,8 @@ bool KZip::writeFile( const QString& name, const QString& user, const QString& g
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::writeFile( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KZip::writeFile( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
return KArchive::writeFile(name, user, group, size, perm, atime, mtime,
@@ -1070,7 +1070,7 @@ bool KZip::writeFile( const QString& name, const QString& user,
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::prepareWriting( const QString& name, const QString& user, const QString& group, uint size )
+bool KZip::prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size )
{
mode_t dflt_perm = 0100644;
time_t the_time = time(0);
@@ -1079,14 +1079,14 @@ bool KZip::prepareWriting( const QString& name, const QString& user, const QStri
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::prepareWriting(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KZip::prepareWriting(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::prepareWriting(name,user,group,size,perm,atime,mtime,ctime);
}
-bool KZip::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint /*size*/, mode_t perm,
+bool KZip::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint /*size*/, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
//kdDebug(7040) << "prepareWriting reached." << endl;
if ( !isOpened() )
@@ -1117,7 +1117,7 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
// to save, so that we don´t have duplicate file entries when viewing the zip
// with konqi...
// CAUTION: the old file itself is still in the zip and won't be removed !!!
- QPtrListIterator<KZipFileEntry> it( d->m_fileList );
+ TQPtrListIterator<KZipFileEntry> it( d->m_fileList );
//kdDebug(7040) << "filename to write: " << name <<endl;
for ( ; it.current() ; ++it )
@@ -1132,18 +1132,18 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
}
// Find or create parent dir
KArchiveDirectory* parentDir = rootDir();
- QString fileName( name );
+ TQString fileName( name );
int i = name.findRev( '/' );
if ( i != -1 )
{
- QString dir = name.left( i );
+ TQString dir = name.left( i );
fileName = name.mid( i + 1 );
//kdDebug(7040) << "KZip::prepareWriting ensuring " << dir << " exists. fileName=" << fileName << endl;
parentDir = findOrCreate( dir );
}
// construct a KZipFileEntry and add it to list
- KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, QString::null,
+ KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, TQString::null,
name, device()->at() + 30 + name.length(), // start
0 /*size unknown yet*/, d->m_compression, 0 /*csize unknown yet*/ );
e->setHeaderStart( device()->at() );
@@ -1158,7 +1158,7 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
extra_field_len = 17; // value also used in doneWriting()
// write out zip header
- QCString encodedName = QFile::encodeName(name);
+ TQCString encodedName = TQFile::encodeName(name);
int bufferSize = extra_field_len + encodedName.length() + 30;
//kdDebug(7040) << "KZip::prepareWriting bufferSize=" << bufferSize << endl;
char* buffer = new char[ bufferSize ];
@@ -1298,14 +1298,14 @@ bool KZip::doneWriting( uint size )
return true;
}
-bool KZip::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KZip::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeSymLink(name,target,user,group,perm,atime,mtime,ctime);
}
-bool KZip::writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KZip::writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
// reassure that symlink flag is set, otherwise strange things happen on
@@ -1320,7 +1320,7 @@ bool KZip::writeSymLink_impl(const QString &name, const QString &target,
return false;
}
- QCString symlink_target = QFile::encodeName(target);
+ TQCString symlink_target = TQFile::encodeName(target);
if (!writeData(symlink_target, symlink_target.length())) {
kdWarning() << "KZip::writeFile writeData failed" << endl;
setCompression(c);
@@ -1422,10 +1422,10 @@ void KZip::abort()
///////////////
-QByteArray KZipFileEntry::data() const
+TQByteArray KZipFileEntry::data() const
{
- QIODevice* dev = device();
- QByteArray arr;
+ TQIODevice* dev = device();
+ TQByteArray arr;
if ( dev ) {
arr = dev->readAll();
delete dev;
@@ -1433,7 +1433,7 @@ QByteArray KZipFileEntry::data() const
return arr;
}
-QIODevice* KZipFileEntry::device() const
+TQIODevice* KZipFileEntry::device() const
{
//kdDebug(7040) << "KZipFileEntry::device creating iodevice limited to pos=" << position() << ", csize=" << compressedSize() << endl;
// Limit the reading to the appropriate part of the underlying device (e.g. file)
@@ -1444,7 +1444,7 @@ QIODevice* KZipFileEntry::device() const
if ( encoding() == 8 )
{
// On top of that, create a device that uncompresses the zlib data
- QIODevice* filterDev = KFilterDev::device( limitedDev, "application/x-gzip" );
+ TQIODevice* filterDev = KFilterDev::device( limitedDev, "application/x-gzip" );
if ( !filterDev )
return 0L; // ouch
static_cast<KFilterDev *>(filterDev)->setSkipHeaders(); // Just zlib, not gzip
diff --git a/kio/kio/kzip.h b/kio/kio/kzip.h
index 5e0971cd8..291f827f8 100644
--- a/kio/kio/kzip.h
+++ b/kio/kio/kzip.h
@@ -21,11 +21,11 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
#include <karchive.h>
class KZipFileEntry;
@@ -59,16 +59,16 @@ public:
*
* @param filename is a local path (e.g. "/home/holger/myfile.zip")
*/
- KZip( const QString& filename );
+ KZip( const TQString& filename );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * @warning Do not assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * @warning Do not assume that giving a TQFile here will decompress the file,
* in case it's compressed!
* @param dev the device to access
*/
- KZip( QIODevice * dev );
+ KZip( TQIODevice * dev );
/**
* If the zip file is still opened, then it will be
@@ -78,10 +78,10 @@ public:
/**
* The name of the zip file, as passed to the constructor.
- * Null if you used the QIODevice constructor.
- * @return the zip's file name, or null if a QIODevice is used
+ * Null if you used the TQIODevice constructor.
+ * @return the zip's file name, or null if a TQIODevice is used
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
/**
* Describes the contents of the "extra field" for a given file in the Zip archive.
@@ -140,7 +140,7 @@ public:
* @param data a pointer to the data
* @return true if successful, false otherwise
*/
- virtual bool writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data ); // BC: remove reimplementation for KDE-4.0
+ virtual bool writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data ); // BC: remove reimplementation for KDE-4.0
/**
* Alternative method for writing: call prepareWriting(), then feed the data
@@ -151,18 +151,18 @@ public:
* @param size unused argument
* @return true if successful, false otherwise
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size );
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeFile( const QString& name, const QString& user, const QString& group,
+ bool writeFile( const TQString& name, const TQString& user, const TQString& group,
uint size, mode_t perm, time_t atime, time_t mtime,
time_t ctime, const char* data );
/**
@@ -194,9 +194,9 @@ protected:
/**
* @internal Not needed for zip
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; }
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; }
// TODO(BIC) uncomment and make virtual for KDE 4.
-// bool writeDir( const QString& name, const QString& user, const QString& group,
+// bool writeDir( const TQString& name, const TQString& user, const TQString& group,
// mode_t perm, time_t atime, time_t mtime, time_t ctime );
protected:
@@ -204,17 +204,17 @@ protected:
/** @internal for virtual_hook */
// from KArchive
bool writeData_impl( const char* data, uint size );
- bool prepareWriting_impl(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
private:
void abort();
private:
- QString m_filename;
+ TQString m_filename;
class KZipPrivate;
KZipPrivate * d;
};
@@ -228,9 +228,9 @@ class KIO_EXPORT KZipFileEntry : public KArchiveFile
public:
/*KZipFileEntry() : st(-1)
{}*/
- KZipFileEntry( KZip* zip, const QString& name, int access, int date,
- const QString& user, const QString& group, const QString& symlink,
- const QString& path, Q_LONG start, Q_LONG uncompressedSize,
+ KZipFileEntry( KZip* zip, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const TQString& symlink,
+ const TQString& path, Q_LONG start, Q_LONG uncompressedSize,
int encoding, Q_LONG compressedSize) :
KArchiveFile( zip, name, access, date, user, group, symlink,
start, uncompressedSize ),
@@ -255,29 +255,29 @@ public:
void setCRC32(unsigned long crc32) { m_crc=crc32; }
/// Name with complete path - KArchiveFile::name() is the filename only (no path)
- QString path() const { return m_path; }
+ TQString path() const { return m_path; }
/**
* @return the content of this file.
* Call data() with care (only once per file), this data isn't cached.
*/
- virtual QByteArray data() const;
+ virtual TQByteArray data() const;
/**
- * This method returns a QIODevice to read the file contents.
+ * This method returns a TQIODevice to read the file contents.
* This is obviously for reading only.
* Note that the ownership of the device is being transferred to the caller,
* who will have to delete it.
* The returned device auto-opens (in readonly mode), no need to open it.
*/
- QIODevice* device() const; // WARNING, not virtual!
+ TQIODevice* device() const; // WARNING, not virtual!
private:
unsigned long m_crc;
Q_LONG m_compressedSize;
Q_LONG m_headerStart;
int m_encoding;
- QString m_path;
+ TQString m_path;
// KDE4: d pointer or at least some int for future extensions
};
diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp
index 32a20a135..3998584e3 100644
--- a/kio/kio/metainfojob.cpp
+++ b/kio/kio/metainfojob.cpp
@@ -27,7 +27,7 @@
#include <kio/kservice.h>
#include <kparts/componentfactory.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "metainfojob.moc"
@@ -63,7 +63,7 @@ MetaInfoJob::MetaInfoJob(const KFileItemList &items, bool deleteItems)
// Return to event loop first, determineNextFile() might delete this;
// (no idea what that means, it comes from previewjob)
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
}
MetaInfoJob::~MetaInfoJob()
@@ -132,17 +132,17 @@ void MetaInfoJob::getMetaInfo()
KIO::TransferJob* job = KIO::get(URL, false, false);
addSubjob(job);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotMetaInfo(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotMetaInfo(KIO::Job *, const TQByteArray &)));
job->addMetaData("mimeType", d->currentItem->current()->mimetype());
}
-void MetaInfoJob::slotMetaInfo(KIO::Job*, const QByteArray &data)
+void MetaInfoJob::slotMetaInfo(KIO::Job*, const TQByteArray &data)
{
KFileMetaInfo info;
- QDataStream s(data, IO_ReadOnly);
+ TQDataStream s(data, IO_ReadOnly);
s >> info;
@@ -151,18 +151,18 @@ void MetaInfoJob::slotMetaInfo(KIO::Job*, const QByteArray &data)
d->succeeded = true;
}
-QStringList MetaInfoJob::availablePlugins()
+TQStringList MetaInfoJob::availablePlugins()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result.append((*it)->desktopEntryName());
return result;
}
-QStringList MetaInfoJob::supportedMimeTypes()
+TQStringList MetaInfoJob::supportedMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result += (*it)->property("MimeTypes").toStringList();
diff --git a/kio/kio/metainfojob.h b/kio/kio/metainfojob.h
index 0a3c84590..3b96713fb 100644
--- a/kio/kio/metainfojob.h
+++ b/kio/kio/metainfojob.h
@@ -57,14 +57,14 @@ namespace KIO {
* no .desktop).
* @return the list of available meta info plugins
*/
- static QStringList availablePlugins();
+ static TQStringList availablePlugins();
/**
* Returns a list of all supported MIME types. The list can
* contain entries like text/ * (without the space).
* @return the list of MIME types that are supported
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
signals:
/**
@@ -89,11 +89,11 @@ namespace KIO {
private slots:
void start();
- void slotMetaInfo(KIO::Job *, const QByteArray &);
+ void slotMetaInfo(KIO::Job *, const TQByteArray &);
private:
void determineNextFile();
-// void saveMetaInfo(const QByteArray info);
+// void saveMetaInfo(const TQByteArray info);
private:
struct MetaInfoJobPrivate *d;
diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp
index 9efbb5259..68ce8ae1d 100644
--- a/kio/kio/netaccess.cpp
+++ b/kio/kio/netaccess.cpp
@@ -28,10 +28,10 @@
#include <cstring>
-#include <qstring.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qmetaobject.h>
+#include <tqstring.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqmetaobject.h>
#include <kapplication.h>
#include <klocale.h>
@@ -45,16 +45,16 @@
using namespace KIO;
-QString * NetAccess::lastErrorMsg;
+TQString * NetAccess::lastErrorMsg;
int NetAccess::lastErrorCode = 0;
-QStringList* NetAccess::tmpfiles;
+TQStringList* NetAccess::tmpfiles;
-bool NetAccess::download(const KURL& u, QString & target)
+bool NetAccess::download(const KURL& u, TQString & target)
{
return NetAccess::download (u, target, 0);
}
-bool NetAccess::download(const KURL& u, QString & target, QWidget* window)
+bool NetAccess::download(const KURL& u, TQString & target, TQWidget* window)
{
if (u.isLocalFile()) {
// file protocol. We do not need the network
@@ -86,12 +86,12 @@ bool NetAccess::download(const KURL& u, QString & target, QWidget* window)
false, window, false /*copy*/);
}
-bool NetAccess::upload(const QString& src, const KURL& target)
+bool NetAccess::upload(const TQString& src, const KURL& target)
{
return NetAccess::upload(src, target, 0);
}
-bool NetAccess::upload(const QString& src, const KURL& target, QWidget* window)
+bool NetAccess::upload(const TQString& src, const KURL& target, TQWidget* window)
{
if (target.isEmpty())
return false;
@@ -114,13 +114,13 @@ bool NetAccess::copy( const KURL & src, const KURL & target )
return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, 0L );
}
-bool NetAccess::copy( const KURL & src, const KURL & target, QWidget* window )
+bool NetAccess::copy( const KURL & src, const KURL & target, TQWidget* window )
{
return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, window );
}
bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window )
+ bool overwrite, bool resume, TQWidget* window )
{
NetAccess kioNet;
return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
@@ -129,7 +129,7 @@ bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
bool NetAccess::file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window )
+ bool overwrite, bool resume, TQWidget* window )
{
NetAccess kioNet;
return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
@@ -141,27 +141,27 @@ bool NetAccess::dircopy( const KURL & src, const KURL & target )
return NetAccess::dircopy( src, target, 0 );
}
-bool NetAccess::dircopy( const KURL & src, const KURL & target, QWidget* window )
+bool NetAccess::dircopy( const KURL & src, const KURL & target, TQWidget* window )
{
KURL::List srcList;
srcList.append( src );
return NetAccess::dircopy( srcList, target, window );
}
-bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window )
+bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window )
{
NetAccess kioNet;
return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ );
}
-bool NetAccess::move( const KURL& src, const KURL& target, QWidget* window )
+bool NetAccess::move( const KURL& src, const KURL& target, TQWidget* window )
{
KURL::List srcList;
srcList.append( src );
return NetAccess::move( srcList, target, window );
}
-bool NetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window )
+bool NetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window )
{
NetAccess kioNet;
return kioNet.dircopyInternal( srcList, target, window, true /*move*/ );
@@ -172,7 +172,7 @@ bool NetAccess::exists( const KURL & url )
return NetAccess::exists( url, false, 0 );
}
-bool NetAccess::exists( const KURL & url, QWidget* window )
+bool NetAccess::exists( const KURL & url, TQWidget* window )
{
return NetAccess::exists( url, false, window );
}
@@ -182,10 +182,10 @@ bool NetAccess::exists( const KURL & url, bool source )
return NetAccess::exists( url, source, 0 );
}
-bool NetAccess::exists( const KURL & url, bool source, QWidget* window )
+bool NetAccess::exists( const KURL & url, bool source, TQWidget* window )
{
if ( url.isLocalFile() )
- return QFile::exists( url.path() );
+ return TQFile::exists( url.path() );
NetAccess kioNet;
return kioNet.statInternal( url, 0 /*no details*/, source, window );
}
@@ -195,7 +195,7 @@ bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry )
return NetAccess::stat( url, entry, 0 );
}
-bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, QWidget* window )
+bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, TQWidget* window )
{
NetAccess kioNet;
bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window );
@@ -204,7 +204,7 @@ bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, QWidget* window )
return ret;
}
-KURL NetAccess::mostLocalURL(const KURL & url, QWidget* window)
+KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window)
{
if ( url.isLocalFile() )
{
@@ -217,7 +217,7 @@ KURL NetAccess::mostLocalURL(const KURL & url, QWidget* window)
return url;
}
- QString path;
+ TQString path;
// Extract the local path from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = entry.begin();
@@ -247,7 +247,7 @@ bool NetAccess::del( const KURL & url )
return NetAccess::del( url, 0 );
}
-bool NetAccess::del( const KURL & url, QWidget* window )
+bool NetAccess::del( const KURL & url, TQWidget* window )
{
NetAccess kioNet;
return kioNet.delInternal( url, window );
@@ -258,50 +258,50 @@ bool NetAccess::mkdir( const KURL & url, int permissions )
return NetAccess::mkdir( url, 0, permissions );
}
-bool NetAccess::mkdir( const KURL & url, QWidget* window, int permissions )
+bool NetAccess::mkdir( const KURL & url, TQWidget* window, int permissions )
{
NetAccess kioNet;
return kioNet.mkdirInternal( url, permissions, window );
}
-QString NetAccess::fish_execute( const KURL & url, const QString command, QWidget* window )
+TQString NetAccess::fish_execute( const KURL & url, const TQString command, TQWidget* window )
{
NetAccess kioNet;
return kioNet.fish_executeInternal( url, command, window );
}
-bool NetAccess::synchronousRun( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString, QString>* metaData )
+bool NetAccess::synchronousRun( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString, TQString>* metaData )
{
NetAccess kioNet;
return kioNet.synchronousRunInternal( job, window, data, finalURL, metaData );
}
-QString NetAccess::mimetype( const KURL& url )
+TQString NetAccess::mimetype( const KURL& url )
{
NetAccess kioNet;
return kioNet.mimetypeInternal( url, 0 );
}
-QString NetAccess::mimetype( const KURL& url, QWidget* window )
+TQString NetAccess::mimetype( const KURL& url, TQWidget* window )
{
NetAccess kioNet;
return kioNet.mimetypeInternal( url, window );
}
-void NetAccess::removeTempFile(const QString& name)
+void NetAccess::removeTempFile(const TQString& name)
{
if (!tmpfiles)
return;
if (tmpfiles->contains(name))
{
- unlink(QFile::encodeName(name));
+ unlink(TQFile::encodeName(name));
tmpfiles->remove(name);
}
}
bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool move)
+ bool overwrite, bool resume, TQWidget* window, bool move)
{
bJobOK = true; // success unless further error occurs
@@ -310,15 +310,15 @@ bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permis
? KIO::file_move( src, target, permissions, overwrite, resume )
: 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;
}
bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
- QWidget* window, bool move)
+ TQWidget* window, bool move)
{
bJobOK = true; // success unless further error occurs
@@ -326,72 +326,72 @@ bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
? KIO::move( src, target )
: KIO::copy( src, target );
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;
}
bool NetAccess::statInternal( const KURL & url, int details, bool source,
- QWidget* window )
+ TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() );
job->setWindow (window);
job->setDetails( details );
job->setSide( source );
- 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;
}
-bool NetAccess::delInternal( const KURL & url, QWidget* window )
+bool NetAccess::delInternal( const KURL & url, TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::Job * job = KIO::del( url );
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;
}
bool NetAccess::mkdirInternal( const KURL & url, int permissions,
- QWidget* window )
+ TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::Job * job = KIO::mkdir( url, permissions );
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;
}
-QString NetAccess::mimetypeInternal( const KURL & url, QWidget* window )
+TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window )
{
bJobOK = true; // success unless further error occurs
- m_mimetype = QString::fromLatin1("unknown");
+ m_mimetype = TQString::fromLatin1("unknown");
KIO::Job * job = KIO::mimetype( url );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
- connect( job, SIGNAL( mimetype (KIO::Job *, const QString &) ),
- this, SLOT( slotMimetype (KIO::Job *, const QString &) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( mimetype (KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotMimetype (KIO::Job *, const TQString &) ) );
enter_loop();
return m_mimetype;
}
-void NetAccess::slotMimetype( KIO::Job *, const QString & type )
+void NetAccess::slotMimetype( KIO::Job *, const TQString & type )
{
m_mimetype = type;
}
-QString NetAccess::fish_executeInternal(const KURL & url, const QString command, QWidget* window)
+TQString NetAccess::fish_executeInternal(const KURL & url, const TQString command, TQWidget* window)
{
- QString target, remoteTempFileName, resultData;
+ TQString target, remoteTempFileName, resultData;
KURL tempPathUrl;
KTempFile tmpFile;
tmpFile.setAutoDelete( true );
@@ -407,26 +407,26 @@ QString NetAccess::fish_executeInternal(const KURL & url, const QString command,
remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1);
tempPathUrl.setPath( remoteTempFileName );
bJobOK = true; // success unless further error occurs
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << int('X') << tempPathUrl << command;
KIO::Job * job = KIO::special( tempPathUrl, packedArgs, true );
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();
// since the KIO::special does not provide feedback we need to download the result
if( NetAccess::download( tempPathUrl, target, window ) )
{
- QFile resultFile( target );
+ TQFile resultFile( target );
if (resultFile.open( IO_ReadOnly ))
{
- QTextStream ts( &resultFile );
- ts.setEncoding( QTextStream::Locale ); // Locale??
+ TQTextStream ts( &resultFile );
+ ts.setEncoding( TQTextStream::Locale ); // Locale??
resultData = ts.read();
resultFile.close();
NetAccess::del( tempPathUrl, window );
@@ -440,14 +440,14 @@ QString NetAccess::fish_executeInternal(const KURL & url, const QString command,
return resultData;
}
-bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString,QString>* metaData )
+bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString,TQString>* metaData )
{
job->setWindow( window );
m_metaData = metaData;
if ( m_metaData ) {
- for ( QMap<QString, QString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
+ for ( TQMap<TQString, TQString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
job->addMetaData( it.key(), it.data() );
}
}
@@ -459,21 +459,21 @@ bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* d
}
}
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
- QMetaObject *meta = job->metaObject();
+ TQMetaObject *meta = job->metaObject();
- static const char dataSignal[] = "data(KIO::Job*,const QByteArray&)";
+ static const char dataSignal[] = "data(KIO::Job*,const TQByteArray&)";
if ( meta->findSignal( dataSignal ) != -1 ) {
- connect( job, SIGNAL(data(KIO::Job*,const QByteArray&)),
- this, SLOT(slotData(KIO::Job*,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
}
static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)";
if ( meta->findSignal( redirSignal ) != -1 ) {
- connect( job, SIGNAL(redirection(KIO::Job*,const KURL&)),
- this, SLOT(slotRedirection(KIO::Job*, const KURL&)) );
+ connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)),
+ this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) );
}
enter_loop();
@@ -487,13 +487,13 @@ bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* d
}
// If a troll sees this, he kills me
-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 NetAccess::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);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -518,7 +518,7 @@ void NetAccess::slotResult( KIO::Job * job )
qApp->exit_loop();
}
-void NetAccess::slotData( KIO::Job*, const QByteArray& data )
+void NetAccess::slotData( KIO::Job*, const TQByteArray& data )
{
if ( data.isEmpty() )
return;
diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h
index 089a93cfd..0bbb383de 100644
--- a/kio/kio/netaccess.h
+++ b/kio/kio/netaccess.h
@@ -23,8 +23,8 @@
#ifndef __kio_netaccess_h
#define __kio_netaccess_h
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kio/global.h>
class QStringList;
@@ -68,7 +68,7 @@ public:
* If the argument
* for @p target is an empty string, download will generate a
* unique temporary filename in /tmp. Since @p target is a reference
- * to QString you can access this filename easily. Download will
+ * to TQString you can access this filename easily. Download will
* return true if the download was successful, otherwise false.
*
* Special case:
@@ -82,7 +82,7 @@ public:
* application has a loadFile() function):
*
* \code
- * QString tmpFile;
+ * TQString tmpFile;
* if( KIO::NetAccess::download( u, tmpFile, window ) )
* {
* loadFile( tmpFile );
@@ -114,12 +114,12 @@ public:
* @see lastErrorString()
* @since 3.2
*/
- static bool download(const KURL& src, QString & target, QWidget* window);
+ static bool download(const KURL& src, TQString & target, TQWidget* window);
/**
* @deprecated. Use the function above instead.
*/
- static bool download(const KURL& src, QString & target) KDE_DEPRECATED;
+ static bool download(const KURL& src, TQString & target) KDE_DEPRECATED;
/**
* Removes the specified file if and only if it was created
@@ -132,7 +132,7 @@ public:
* @param name Path to temporary file to remove. May not be
* empty.
*/
- static void removeTempFile(const QString& name);
+ static void removeTempFile(const TQString& name);
/**
* Uploads file @p src to URL @p target.
@@ -153,12 +153,12 @@ public:
* @return true if successful, false for failure
* @since 3.2
*/
- static bool upload(const QString& src, const KURL& target, QWidget* window);
+ static bool upload(const TQString& src, const KURL& target, TQWidget* window);
/**
* @deprecated. Use the function above instead.
*/
- static bool upload(const QString& src, const KURL& target) KDE_DEPRECATED;
+ static bool upload(const TQString& src, const KURL& target) KDE_DEPRECATED;
/**
* Alternative to upload for copying over the network.
@@ -178,7 +178,7 @@ public:
*
* @return true if successful, false for failure
*/
- static bool copy( const KURL& src, const KURL& target, QWidget* window );
+ static bool copy( const KURL& src, const KURL& target, TQWidget* window );
// KDE4: rename to file_copy
/**
@@ -191,7 +191,7 @@ public:
* Full-fledged equivalent of KIO::file_copy
*/
static bool file_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 );
/**
* Full-fledged equivalent of KIO::file_move.
@@ -199,7 +199,7 @@ public:
* @since 3.2
*/
static bool file_move( const KURL& src, const KURL& target, int permissions=-1,
- bool overwrite=false, bool resume=false, QWidget* window = 0L );
+ bool overwrite=false, bool resume=false, TQWidget* window = 0L );
/**
@@ -221,7 +221,7 @@ public:
* prompted for passwords as needed.
* @return true if successful, false for failure
*/
- static bool dircopy( const KURL& src, const KURL& target, QWidget* window );
+ static bool dircopy( const KURL& src, const KURL& target, TQWidget* window );
/**
* @deprecated. Use the function above instead.
@@ -231,21 +231,21 @@ public:
/**
* Overloaded method, which takes a list of source URLs
*/
- static bool dircopy( const KURL::List& src, const KURL& target, QWidget* window = 0L );
+ static bool dircopy( const KURL::List& src, const KURL& target, TQWidget* window = 0L );
/**
* Full-fledged equivalent of KIO::move.
* Moves or renames one file or directory.
* @since 3.2
*/
- static bool move( const KURL& src, const KURL& target, QWidget* window = 0L );
+ static bool move( const KURL& src, const KURL& target, TQWidget* window = 0L );
/**
* Full-fledged equivalent of KIO::move.
* Moves or renames a list of files or directories.
* @since 3.2
*/
- static bool move( const KURL::List& src, const KURL& target, QWidget* window = 0L );
+ static bool move( const KURL::List& src, const KURL& target, TQWidget* window = 0L );
/**
* Tests whether a URL exists.
@@ -263,13 +263,13 @@ public:
* @p source, false otherwise
* @since 3.2
*/
- static bool exists(const KURL& url, bool source, QWidget* window);
+ static bool exists(const KURL& url, bool source, TQWidget* window);
/**
* @deprecated. Use the function above instead.
* @since 3.2
*/
- static bool exists(const KURL& url, QWidget* window) KDE_DEPRECATED;
+ static bool exists(const KURL& url, TQWidget* window) KDE_DEPRECATED;
/**
* @deprecated. Use the function above instead.
@@ -297,7 +297,7 @@ public:
* again be prompted for passwords as needed.
* @return true if successful, false for failure
*/
- static bool stat(const KURL& url, KIO::UDSEntry & entry, QWidget* window);
+ static bool stat(const KURL& url, KIO::UDSEntry & entry, TQWidget* window);
/**
* @deprecated. Use the function above instead.
@@ -320,7 +320,7 @@ public:
* original URL, or the original URL if no local URL can be mapped
* @since 3.5
*/
- static KURL mostLocalURL(const KURL& url, QWidget* window);
+ static KURL mostLocalURL(const KURL& url, TQWidget* window);
/**
* Deletes a file or a directory in a synchronous way.
@@ -336,7 +336,7 @@ public:
* again be prompted for passwords as needed.
* @return true on success, false on failure.
*/
- static bool del( const KURL & url, QWidget* window );
+ static bool del( const KURL & url, TQWidget* window );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -361,7 +361,7 @@ public:
* @param permissions directory permissions.
* @return true on success, false on failure.
*/
- static bool mkdir( const KURL & url, QWidget* window, int permissions = -1 );
+ static bool mkdir( const KURL & url, TQWidget* window, int permissions = -1 );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -389,19 +389,19 @@ public:
* again be prompted for passwords as needed.
* @return The resulting output of the @p command that is executed.
*/
- static QString fish_execute( const KURL & url, const QString command, QWidget* window );
+ static TQString fish_execute( const KURL & url, const TQString command, TQWidget* window );
/**
* This function executes a job in a synchronous way.
- * If a job fetches some data, pass a QByteArray pointer as data parameter to this function
+ * If a job fetches some data, pass a TQByteArray pointer as data parameter to this function
* and after the function returns it will contain all the data fetched by this job.
*
* <code>
* KIO::Job *job = KIO::get( url, false, false );
- * QMap<QString, QString> metaData;
+ * TQMap<TQString, TQString> metaData;
* metaData.insert( "PropagateHttpHeader", "true" );
* if ( NetAccess::synchronousRun( job, 0, &data, &url, &metaData ) ) {
- * QString responseHeaders = metaData[ "HTTP-Headers" ];
+ * TQString responseHeaders = metaData[ "HTTP-Headers" ];
* kdDebug()<<"Response header = "<< responseHeaders << endl;
* }
* </code>
@@ -425,8 +425,8 @@ public:
*
* @since 3.4
*/
- static bool synchronousRun( Job* job, QWidget* window, QByteArray* data=0,
- KURL* finalURL=0, QMap<QString,QString>* metaData=0 );
+ static bool synchronousRun( Job* job, TQWidget* window, TQByteArray* data=0,
+ KURL* finalURL=0, TQMap<TQString,TQString>* metaData=0 );
/**
* @internal
@@ -450,7 +450,7 @@ public:
* again be prompted for passwords as needed.
* @return The mimetype name.
*/
- static QString mimetype( const KURL & url, QWidget* window );
+ static TQString mimetype( const KURL & url, TQWidget* window );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -458,14 +458,14 @@ public:
* you should try to identify a suitable parent widget
* if at all possible.
*/
- static QString mimetype( const KURL & url ) KDE_DEPRECATED;
+ static TQString mimetype( const KURL & url ) KDE_DEPRECATED;
/**
* Returns the error string for the last job, in case it failed.
* Note that this is already translated.
- * @return the last error string, or QString::null
+ * @return the last error string, or TQString::null
*/
- static QString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : QString::null; }
+ static TQString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : TQString::null; }
/**
* Returns the error code for the last job, in case it failed.
@@ -489,42 +489,42 @@ private:
* Internal methods
*/
bool filecopyInternal(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool move);
+ bool overwrite, bool resume, TQWidget* window, bool move);
bool dircopyInternal(const KURL::List& src, const KURL& target,
- QWidget* window, bool move);
- bool statInternal(const KURL & url, int details, bool source, QWidget* window = 0);
+ TQWidget* window, bool move);
+ bool statInternal(const KURL & url, int details, bool source, TQWidget* window = 0);
- bool delInternal(const KURL & url, QWidget* window = 0);
- bool mkdirInternal(const KURL & url, int permissions, QWidget* window = 0);
- QString fish_executeInternal(const KURL & url, const QString command, QWidget* window = 0);
- bool synchronousRunInternal( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString,QString>* metaData );
+ bool delInternal(const KURL & url, TQWidget* window = 0);
+ bool mkdirInternal(const KURL & url, int permissions, TQWidget* window = 0);
+ TQString fish_executeInternal(const KURL & url, const TQString command, TQWidget* window = 0);
+ bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString,TQString>* metaData );
- QString mimetypeInternal(const KURL & url, QWidget* window = 0);
+ TQString mimetypeInternal(const KURL & url, TQWidget* window = 0);
void enter_loop();
/**
* List of temporary files
*/
- static QStringList* tmpfiles;
+ static TQStringList* tmpfiles;
- static QString* lastErrorMsg;
+ static TQString* lastErrorMsg;
static int lastErrorCode;
friend class I_like_this_class;
private slots:
void slotResult( KIO::Job * job );
- void slotMimetype( KIO::Job * job, const QString & type );
- void slotData( KIO::Job*, const QByteArray& );
+ void slotMimetype( KIO::Job * job, const TQString & type );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotRedirection( KIO::Job*, const KURL& );
private:
UDSEntry m_entry;
- QString m_mimetype;
- QByteArray m_data;
+ TQString m_mimetype;
+ TQByteArray m_data;
KURL m_url;
- QMap<QString, QString> *m_metaData;
+ TQMap<TQString, TQString> *m_metaData;
/**
* Whether the download succeeded or not
diff --git a/kio/kio/observer.cpp b/kio/kio/observer.cpp
index df69ddf93..2a468b1e6 100644
--- a/kio/kio/observer.cpp
+++ b/kio/kio/observer.cpp
@@ -43,7 +43,7 @@
using namespace KIO;
-template class QIntDict<KIO::Job>;
+template class TQIntDict<KIO::Job>;
Observer * Observer::s_pObserver = 0L;
@@ -60,9 +60,9 @@ Observer::Observer() : DCOPObject("KIO::Observer")
if ( !kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) )
{
kdDebug(KDEBUG_OBSERVER) << "Starting kio_uiserver" << endl;
- QString error;
+ TQString error;
int ret = KApplication::startServiceByDesktopPath( "kio_uiserver.desktop",
- QStringList(), &error );
+ TQStringList(), &error );
if ( ret > 0 )
{
kdError() << "Couldn't start kio_uiserver from kio_uiserver.desktop: " << error << endl;
@@ -162,7 +162,7 @@ void Observer::slotPercent( KIO::Job* job, unsigned long percent )
m_uiserver->percent( job->progressId(), percent );
}
-void Observer::slotInfoMessage( KIO::Job* job, const QString & msg )
+void Observer::slotInfoMessage( KIO::Job* job, const TQString & msg )
{
m_uiserver->infoMessage( job->progressId(), msg );
}
@@ -208,18 +208,18 @@ void Observer::stating( KIO::Job* job, const KURL& url )
m_uiserver->stating( job->progressId(), url );
}
-void Observer::mounting( KIO::Job* job, const QString & dev, const QString & point )
+void Observer::mounting( KIO::Job* job, const TQString & dev, const TQString & point )
{
m_uiserver->mounting( job->progressId(), dev, point );
}
-void Observer::unmounting( KIO::Job* job, const QString & point )
+void Observer::unmounting( KIO::Job* job, const TQString & point )
{
m_uiserver->unmounting( job->progressId(), point );
}
-bool Observer::openPassDlg( const QString& prompt, QString& user,
- QString& pass, bool readOnly )
+bool Observer::openPassDlg( const TQString& prompt, TQString& user,
+ TQString& pass, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -243,7 +243,7 @@ bool Observer::openPassDlg( KIO::AuthInfo& info )
&info.keepPassword, info.prompt,
info.readOnly, info.caption,
info.comment, info.commentLabel );
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
{
info.setModified( true );
return true;
@@ -251,16 +251,16 @@ bool Observer::openPassDlg( KIO::AuthInfo& info )
return false;
}
-int Observer::messageBox( int progressId, int type, const QString &text,
- const QString &caption, const QString &buttonYes,
- const QString &buttonNo )
+int Observer::messageBox( int progressId, int type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes,
+ const TQString &buttonNo )
{
- return messageBox( progressId, type, text, caption, buttonYes, buttonNo, QString::null );
+ return messageBox( progressId, type, text, caption, buttonYes, buttonNo, TQString::null );
}
-int Observer::messageBox( int progressId, int type, const QString &text,
- const QString &caption, const QString &buttonYes,
- const QString &buttonNo, const QString &dontAskAgainName )
+int Observer::messageBox( int progressId, int type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes,
+ const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug() << "Observer::messageBox " << type << " " << text << " - " << caption << endl;
int result = -1;
@@ -291,7 +291,7 @@ int Observer::messageBox( int progressId, int type, const QString &text,
break;
case KIO::SlaveBase::SSLMessageBox:
{
- QCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp
+ TQCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp
// Contact the object "KIO::Observer" in the application <appId>
// Yes, this could be the same application we are, but not necessarily.
Observer_stub observer( observerAppId, "KIO::Observer" );
@@ -301,12 +301,12 @@ int Observer::messageBox( int progressId, int type, const QString &text,
KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit());
if (x) {
// Set the chain back onto the certificate
- QStringList cl =
- QStringList::split(QString("\n"), meta["ssl_peer_chain"]);
- QPtrList<KSSLCertificate> ncl;
+ TQStringList cl =
+ TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]);
+ TQPtrList<KSSLCertificate> ncl;
ncl.setAutoDelete(true);
- for (QStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
+ for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit());
if (y) ncl.append(y);
}
@@ -344,20 +344,20 @@ int Observer::messageBox( int progressId, int type, const QString &text,
delete config;
return result;
#if 0
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << progressId;
arg << type;
arg << text;
arg << caption;
arg << buttonYes;
arg << buttonNo;
- if ( kapp->dcopClient()->call( "kio_uiserver", "UIServer", "messageBox(int,int,QString,QString,QString,QString)", data, replyType, replyData, true )
+ if ( kapp->dcopClient()->call( "kio_uiserver", "UIServer", "messageBox(int,int,TQString,TQString,TQString,TQString)", data, replyType, replyData, true )
&& replyType == "int" )
{
int result;
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
kdDebug(KDEBUG_OBSERVER) << "Observer::messageBox got result " << result << endl;
return result;
@@ -368,9 +368,9 @@ int Observer::messageBox( int progressId, int type, const QString &text,
}
RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job,
- const QString & caption,
- const QString& src, const QString & dest,
- RenameDlg_Mode mode, QString& newDest,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
+ RenameDlg_Mode mode, TQString& newDest,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
time_t ctimeSrc,
@@ -398,7 +398,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job,
SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job,
bool _multi,
- const QString& _error_text )
+ const TQString& _error_text )
{
kdDebug(KDEBUG_OBSERVER) << "Observer::open_SkipDlg job=" << job << " progressId=" << job->progressId() << endl;
// Hide existing dialog box if any
diff --git a/kio/kio/observer.h b/kio/kio/observer.h
index beadd1dcd..94b8cede9 100644
--- a/kio/kio/observer.h
+++ b/kio/kio/observer.h
@@ -19,9 +19,9 @@
#ifndef __kio_observer_h__
#define __kio_observer_h__
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kio/global.h>
#include <kio/authinfo.h>
@@ -52,7 +52,7 @@ namespace KIO {
* @short Observer for KIO::Job progress information
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT Observer : public QObject, public DCOPObject {
+class KIO_EXPORT Observer : public TQObject, public DCOPObject {
K_DCOP
Q_OBJECT
@@ -87,7 +87,7 @@ public:
/**
* @deprecated use KIO::AutoInfo
*/
- bool openPassDlg( const QString& prompt, QString& user, QString& pass,
+ bool openPassDlg( const TQString& prompt, TQString& user, TQString& pass,
bool readOnly );
/**
@@ -108,8 +108,8 @@ public:
* @param buttonYes the text of the "Yes" button
* @param buttonNo the text of the "No button
*/
- static int messageBox( int progressId, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* Popup a message box. See KIO::SlaveBase.
@@ -125,18 +125,18 @@ public:
* The string is used to lookup and store the setting in kioslaverc.
* @since 3.3
*/
- static int messageBox( int progressId, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName );
+ static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName );
/**
* @internal
* See renamedlg.h
*/
KIO::RenameDlg_Result open_RenameDlg( KIO::Job * job,
- const QString & caption,
- const QString& src, const QString & dest,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
KIO::RenameDlg_Mode mode,
- QString& newDest,
+ TQString& newDest,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
time_t ctimeSrc = (time_t) -1,
@@ -151,7 +151,7 @@ public:
*/
KIO::SkipDlg_Result open_SkipDlg( KIO::Job * job,
bool multi,
- const QString & error_text );
+ const TQString & error_text );
k_dcop:
/**
@@ -174,7 +174,7 @@ protected:
UIServer_stub * m_uiserver;
- QIntDict< KIO::Job > m_dctJobs;
+ TQIntDict< KIO::Job > m_dctJobs;
public slots:
@@ -188,7 +188,7 @@ public slots:
void slotSpeed( KIO::Job*, unsigned long speed );
void slotPercent( KIO::Job*, unsigned long percent );
- void slotInfoMessage( KIO::Job*, const QString & msg );
+ void slotInfoMessage( KIO::Job*, const TQString & msg );
void slotCopying( KIO::Job*, const KURL& from, const KURL& to );
void slotMoving( KIO::Job*, const KURL& from, const KURL& to );
@@ -201,8 +201,8 @@ public slots:
public:
void stating( KIO::Job*, const KURL& url );
- void mounting( KIO::Job*, const QString & dev, const QString & point );
- void unmounting( KIO::Job*, const QString & point );
+ void mounting( KIO::Job*, const TQString & dev, const TQString & point );
+ void unmounting( KIO::Job*, const TQString & point );
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp
index e8d606104..83434906b 100644
--- a/kio/kio/passdlg.cpp
+++ b/kio/kio/passdlg.cpp
@@ -18,13 +18,13 @@
#include "passdlg.h"
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsimplerichtext.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsimplerichtext.h>
+#include <tqstylesheet.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -37,22 +37,22 @@ using namespace KIO;
struct PasswordDialog::PasswordDialogPrivate
{
- QGridLayout *layout;
- QLineEdit* userEdit;
+ TQGridLayout *layout;
+ TQLineEdit* userEdit;
KLineEdit* passEdit;
- QLabel* userNameLabel;
- QLabel* prompt;
- QCheckBox* keepCheckBox;
- QMap<QString,QString> knownLogins;
+ TQLabel* userNameLabel;
+ TQLabel* prompt;
+ TQCheckBox* keepCheckBox;
+ TQMap<TQString,TQString> knownLogins;
KComboBox* userEditCombo;
- QHBox* userNameHBox;
+ TQHBox* userNameHBox;
bool keep;
short unsigned int nRow;
};
-PasswordDialog::PasswordDialog( const QString& prompt, const QString& user,
- bool enableKeep, bool modal, QWidget* parent,
+PasswordDialog::PasswordDialog( const TQString& prompt, const TQString& user,
+ bool enableKeep, bool modal, TQWidget* parent,
const char* name )
:KDialogBase( parent, name, modal, i18n("Password"), Ok|Cancel, Ok, true)
{
@@ -64,10 +64,10 @@ PasswordDialog::~PasswordDialog()
delete d;
}
-void PasswordDialog::init( const QString& prompt, const QString& user,
+void PasswordDialog::init( const TQString& prompt, const TQString& user,
bool enableKeep )
{
- QWidget *main = makeMainWidget();
+ TQWidget *main = makeMainWidget();
d = new PasswordDialogPrivate;
d->keep = false;
@@ -77,21 +77,21 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
KConfig* cfg = KGlobal::config();
KConfigGroupSaver saver( cfg, "Passwords" );
- d->layout = new QGridLayout( main, 9, 3, spacingHint(), marginHint());
+ d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint());
d->layout->addColSpacing(1, 5);
// Row 0: pixmap prompt
- QLabel* lbl;
- QPixmap pix( KGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
+ TQLabel* lbl;
+ TQPixmap pix( KGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
if ( !pix.isNull() )
{
- lbl = new QLabel( main );
+ lbl = new TQLabel( main );
lbl->setPixmap( pix );
lbl->setAlignment( Qt::AlignLeft|Qt::AlignVCenter );
lbl->setFixedSize( lbl->sizeHint() );
d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft );
}
- d->prompt = new QLabel( main );
+ d->prompt = new TQLabel( main );
d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak );
d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft );
if ( prompt.isEmpty() )
@@ -105,13 +105,13 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// Row 2-3: Reserved for an additional comment
// Row 4: Username field
- d->userNameLabel = new QLabel( i18n("&Username:"), main );
+ d->userNameLabel = new TQLabel( i18n("&Username:"), main );
d->userNameLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
d->userNameLabel->setFixedSize( d->userNameLabel->sizeHint() );
- d->userNameHBox = new QHBox( main );
+ d->userNameHBox = new TQHBox( main );
d->userEdit = new KLineEdit( d->userNameHBox );
- QSize s = d->userEdit->sizeHint();
+ TQSize s = d->userEdit->sizeHint();
d->userEdit->setFixedHeight( s.height() );
d->userEdit->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEdit );
@@ -122,15 +122,15 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
d->layout->addRowSpacing( 5, 4 );
// Row 6: Password field
- lbl = new QLabel( i18n("&Password:"), main );
+ lbl = new TQLabel( i18n("&Password:"), main );
lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
lbl->setFixedSize( lbl->sizeHint() );
- QHBox* hbox = new QHBox( main );
+ TQHBox* hbox = new TQHBox( main );
d->passEdit = new KLineEdit( hbox );
if ( cfg->readEntry("EchoMode", "OneStar") == "NoEcho" )
- d->passEdit->setEchoMode( QLineEdit::NoEcho );
+ d->passEdit->setEchoMode( TQLineEdit::NoEcho );
else
- d->passEdit->setEchoMode( QLineEdit::Password );
+ d->passEdit->setEchoMode( TQLineEdit::Password );
s = d->passEdit->sizeHint();
d->passEdit->setFixedHeight( s.height() );
d->passEdit->setMinimumWidth( s.width() );
@@ -143,18 +143,18 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// Row 7: Add spacer
d->layout->addRowSpacing( 7, 4 );
// Row 8: Keep Password
- hbox = new QHBox( main );
- d->keepCheckBox = new QCheckBox( i18n("&Keep password"), hbox );
+ hbox = new TQHBox( main );
+ d->keepCheckBox = new TQCheckBox( i18n("&Keep password"), hbox );
d->keepCheckBox->setFixedSize( d->keepCheckBox->sizeHint() );
d->keep = cfg->readBoolEntry("Keep", false );
d->keepCheckBox->setChecked( d->keep );
- connect(d->keepCheckBox, SIGNAL(toggled( bool )), SLOT(slotKeep( bool )));
+ connect(d->keepCheckBox, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotKeep( bool )));
d->layout->addWidget( hbox, 8, 2 );
}
// Configure necessary key-bindings and connect necessar slots and signals
- connect( d->userEdit, SIGNAL(returnPressed()), d->passEdit, SLOT(setFocus()) );
- connect( d->passEdit, SIGNAL(returnPressed()), SLOT(slotOk()) );
+ connect( d->userEdit, TQT_SIGNAL(returnPressed()), d->passEdit, TQT_SLOT(setFocus()) );
+ connect( d->passEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOk()) );
if ( !user.isEmpty() )
{
@@ -168,12 +168,12 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// setFixedSize( sizeHint() );
}
-QString PasswordDialog::username() const
+TQString PasswordDialog::username() const
{
return d->userEdit->text();
}
-QString PasswordDialog::password() const
+TQString PasswordDialog::password() const
{
return d->passEdit->text();
}
@@ -189,16 +189,16 @@ bool PasswordDialog::keepPassword() const
return d->keep;
}
-static void calculateLabelSize(QLabel *label)
+static void calculateLabelSize(TQLabel *label)
{
- QString qt_text = label->text();
+ TQString qt_text = label->text();
int pref_width = 0;
int pref_height = 0;
// Calculate a proper size for the text.
{
- QSimpleRichText rt(qt_text, label->font());
- QRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
+ TQSimpleRichText rt(qt_text, label->font());
+ TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
pref_width = d.width() / 4;
rt.setWidth(pref_width-10);
@@ -227,22 +227,22 @@ static void calculateLabelSize(QLabel *label)
pref_width = used_width;
}
}
- label->setFixedSize(QSize(pref_width+10, pref_height));
+ label->setFixedSize(TQSize(pref_width+10, pref_height));
}
-void PasswordDialog::addCommentLine( const QString& label,
- const QString comment )
+void PasswordDialog::addCommentLine( const TQString& label,
+ const TQString comment )
{
if (d->nRow > 0)
return;
- QWidget *main = mainWidget();
+ TQWidget *main = mainWidget();
- QLabel* lbl = new QLabel( label, main);
+ TQLabel* lbl = new TQLabel( label, main);
lbl->setAlignment( Qt::AlignVCenter|Qt::AlignRight );
lbl->setFixedSize( lbl->sizeHint() );
d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft );
- lbl = new QLabel( comment, main);
+ lbl = new TQLabel( comment, main);
lbl->setAlignment( Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak );
calculateLabelSize(lbl);
d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft );
@@ -255,28 +255,28 @@ void PasswordDialog::slotKeep( bool keep )
d->keep = keep;
}
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-void PasswordDialog::setPrompt(const QString& prompt)
+void PasswordDialog::setPrompt(const TQString& prompt)
{
- QString text = qrichtextify(prompt);
+ TQString text = qrichtextify(prompt);
d->prompt->setText(text);
calculateLabelSize(d->prompt);
}
-void PasswordDialog::setPassword(const QString &p)
+void PasswordDialog::setPassword(const TQString &p)
{
d->passEdit->setText(p);
}
@@ -288,7 +288,7 @@ void PasswordDialog::setUserReadOnly( bool readOnly )
d->passEdit->setFocus();
}
-void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
+void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogins )
{
const int nr = knownLogins.count();
if ( nr == 0 )
@@ -304,7 +304,7 @@ void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
delete d->userEdit;
d->userEditCombo = new KComboBox( true, d->userNameHBox );
d->userEdit = d->userEditCombo->lineEdit();
- QSize s = d->userEditCombo->sizeHint();
+ TQSize s = d->userEditCombo->sizeHint();
d->userEditCombo->setFixedHeight( s.height() );
d->userEditCombo->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEditCombo );
@@ -315,23 +315,23 @@ void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
d->userEditCombo->insertStringList( knownLogins.keys() );
d->userEditCombo->setFocus();
- connect( d->userEditCombo, SIGNAL( activated( const QString& ) ),
- this, SLOT( slotActivated( const QString& ) ) );
+ connect( d->userEditCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( slotActivated( const TQString& ) ) );
}
-void PasswordDialog::slotActivated( const QString& userName )
+void PasswordDialog::slotActivated( const TQString& userName )
{
- QMap<QString, QString>::ConstIterator it = d->knownLogins.find( userName );
+ TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.find( userName );
if ( it != d->knownLogins.end() )
setPassword( it.data() );
}
-int PasswordDialog::getNameAndPassword( QString& user, QString& pass, bool* keep,
- const QString& prompt, bool readOnly,
- const QString& caption,
- const QString& comment,
- const QString& label )
+int PasswordDialog::getNameAndPassword( TQString& user, TQString& pass, bool* keep,
+ const TQString& prompt, bool readOnly,
+ const TQString& caption,
+ const TQString& comment,
+ const TQString& label )
{
PasswordDialog* dlg;
if( keep )
diff --git a/kio/kio/passdlg.h b/kio/kio/passdlg.h
index 948ffc7f7..dbc4b294e 100644
--- a/kio/kio/passdlg.h
+++ b/kio/kio/passdlg.h
@@ -48,9 +48,9 @@ public:
* @param parent the parent widget (default:NULL).
* @param name the dialog name (default:NULL).
*/
- PasswordDialog( const QString& prompt, const QString& user,
+ PasswordDialog( const TQString& prompt, const TQString& user,
bool enableKeep = false, bool modal=true,
- QWidget* parent=0, const char* name=0 );
+ TQWidget* parent=0, const char* name=0 );
/**
* Destructor
@@ -61,7 +61,7 @@ public:
* Sets the prompt to show to the user.
* @param prompt instructional text to be shown.
*/
- void setPrompt( const QString& prompt );
+ void setPrompt( const TQString& prompt );
/**
* Adds a comment line to the dialog.
@@ -73,19 +73,19 @@ public:
* @param label label for comment (ex:"Command:")
* @param comment the actual comment text.
*/
- void addCommentLine( const QString& label, const QString comment );
+ void addCommentLine( const TQString& label, const TQString comment );
/**
* Returns the password entered by the user.
* @return the password
*/
- QString password() const;
+ TQString password() const;
/**
* Returns the username entered by the user.
* @return the user name
*/
- QString username() const;
+ TQString username() const;
/**
* Determines whether supplied authorization should
@@ -122,7 +122,7 @@ public:
* @param password the password to set
* @since 3.1
*/
- void setPassword( const QString& password );
+ void setPassword( const TQString& password );
/**
* Presets a number of login+password pairs that the user can choose from.
@@ -131,7 +131,7 @@ public:
* @param knownLogins map of known logins: the keys are usernames, the values are passwords.
* @since 3.4
*/
- void setKnownLogins( const QMap<QString, QString>& knownLogins );
+ void setKnownLogins( const TQMap<TQString, TQString>& knownLogins );
/**
* A convienence static method for obtaining authorization
@@ -149,19 +149,19 @@ public:
*
* @return Accepted/Rejected based on the user choice.
*/
- static int getNameAndPassword( QString& user, QString& pass, bool* keep,
- const QString& prompt = QString::null,
+ static int getNameAndPassword( TQString& user, TQString& pass, bool* keep,
+ const TQString& prompt = TQString::null,
bool readOnly = false,
- const QString& caption = QString::null,
- const QString& comment = QString::null,
- const QString& label = QString::null );
+ const TQString& caption = TQString::null,
+ const TQString& comment = TQString::null,
+ const TQString& label = TQString::null );
private slots:
void slotKeep( bool );
- void slotActivated( const QString& userName );
+ void slotActivated( const TQString& userName );
private:
- void init( const QString&, const QString&, bool );
+ void init( const TQString&, const TQString&, bool );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp
index 7f66e4c05..399350236 100644
--- a/kio/kio/paste.cpp
+++ b/kio/kio/paste.cpp
@@ -35,19 +35,19 @@
#include <kmimetype.h>
#include <ktempfile.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qtextstream.h>
-#include <qvaluevector.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqtextstream.h>
+#include <tqvaluevector.h>
-static KURL getNewFileName( const KURL &u, const QString& text )
+static KURL getNewFileName( const KURL &u, const TQString& text )
{
bool ok;
- QString dialogText( text );
+ TQString dialogText( text );
if ( dialogText.isEmpty() )
dialogText = i18n( "Filename for clipboard content:" );
- QString file = KInputDialog::getText( QString::null, dialogText, QString::null, &ok );
+ TQString file = KInputDialog::getText( TQString::null, dialogText, TQString::null, &ok );
if ( !ok )
return KURL();
@@ -59,7 +59,7 @@ static KURL getNewFileName( const KURL &u, const QString& text )
kdDebug(7007) << "Paste will overwrite file. Prompting..." << endl;
KIO::RenameDlg_Result res = KIO::R_OVERWRITE;
- QString newPath;
+ TQString newPath;
// Ask confirmation about resuming previous transfer
res = Observer::self()->open_RenameDlg(
0L, i18n("File Already Exists"),
@@ -81,7 +81,7 @@ static KURL getNewFileName( const KURL &u, const QString& text )
}
// The finaly step: write _data to tempfile and move it to neW_url
-static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const QByteArray& _data )
+static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _data )
{
KTempFile tempFile;
tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() );
@@ -94,15 +94,15 @@ static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const QByteArray& _d
}
#ifndef QT_NO_MIMECLIPBOARD
-static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
- const QValueVector<QCString>& formats,
- const QString& text,
- QWidget* widget,
+static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
+ const TQValueVector<TQCString>& formats,
+ const TQString& text,
+ TQWidget* widget,
bool clipboard )
{
- QStringList formatLabels;
+ TQStringList formatLabels;
for ( uint i = 0; i < formats.size(); ++i ) {
- const QCString& fmt = formats[i];
+ const TQCString& fmt = formats[i];
KMimeType::Ptr mime = KMimeType::mimeType( fmt );
if ( mime != KMimeType::defaultMimeTypePtr() )
formatLabels.append( i18n( "%1 (%2)" ).arg( mime->comment() ).arg( fmt ) );
@@ -110,10 +110,10 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
formatLabels.append( fmt );
}
- QString dialogText( text );
+ TQString dialogText( text );
if ( dialogText.isEmpty() )
dialogText = i18n( "Filename for clipboard content:" );
- KIO::PasteDialog dlg( QString::null, dialogText, QString::null, formatLabels, widget, clipboard );
+ KIO::PasteDialog dlg( TQString::null, dialogText, TQString::null, formatLabels, widget, clipboard );
if ( dlg.exec() != KDialogBase::Accepted )
return 0;
@@ -126,8 +126,8 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
return 0;
}
- const QString result = dlg.lineEditText();
- const QCString chosenFormat = formats[ dlg.comboItem() ];
+ const TQString result = dlg.lineEditText();
+ const TQCString chosenFormat = formats[ dlg.comboItem() ];
kdDebug() << " result=" << result << " chosenFormat=" << chosenFormat << endl;
KURL new_url( u );
@@ -135,9 +135,9 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
// if "data" came from QClipboard, then it was deleted already - by a nice 0-seconds timer
// In that case, get it again. Let's hope the user didn't copy something else meanwhile :/
if ( clipboard ) {
- data = QApplication::clipboard()->data();
+ data = TQApplication::clipboard()->data();
}
- const QByteArray ba = data->encodedData( chosenFormat );
+ const TQByteArray ba = data->encodedData( chosenFormat );
return pasteDataAsyncTo( new_url, ba );
}
#endif
@@ -146,13 +146,13 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
KIO_EXPORT bool KIO::isClipboardEmpty()
{
#ifndef QT_NO_MIMECLIPBOARD
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 )
return false;
#else
// Happens with some versions of Qt Embedded... :/
// Guess.
- QString data = QApplication::clipboard()->text();
+ TQString data = TQApplication::clipboard()->text();
if(data.contains("://"))
return false;
#endif
@@ -161,22 +161,22 @@ KIO_EXPORT bool KIO::isClipboardEmpty()
#ifndef QT_NO_MIMECLIPBOARD
// The main method for dropping
-KIO::CopyJob* KIO::pasteMimeSource( QMimeSource* data, const KURL& dest_url,
- const QString& dialogText, QWidget* widget, bool clipboard )
+KIO::CopyJob* KIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url,
+ const TQString& dialogText, TQWidget* widget, bool clipboard )
{
- QByteArray ba;
+ TQByteArray ba;
// Now check for plain text
- // We don't want to display a mimetype choice for a QTextDrag, those mimetypes look ugly.
- QString text;
- if ( QTextDrag::canDecode( data ) && QTextDrag::decode( data, text ) )
+ // We don't want to display a mimetype choice for a TQTextDrag, those mimetypes look ugly.
+ TQString text;
+ if ( TQTextDrag::canDecode( data ) && TQTextDrag::decode( data, text ) )
{
- QTextStream txtStream( ba, IO_WriteOnly );
+ TQTextStream txtStream( ba, IO_WriteOnly );
txtStream << text;
}
else
{
- QValueVector<QCString> formats;
+ TQValueVector<TQCString> formats;
const char* fmt;
for ( int i = 0; ( fmt = data->format( i ) ); ++i ) {
if ( qstrcmp( fmt, "application/x-qiconlist" ) == 0 ) // see QIconDrag
@@ -215,7 +215,7 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
}
#ifndef QT_NO_MIMECLIPBOARD
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
// First check for URLs.
KURL::List urls;
@@ -233,18 +233,18 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
// If moving, erase the clipboard contents, the original files don't exist anymore
if ( move )
- QApplication::clipboard()->clear();
+ TQApplication::clipboard()->clear();
return res;
}
- return pasteMimeSource( data, dest_url, QString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
+ return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
#else
- QByteArray ba;
- QTextStream txtStream( ba, IO_WriteOnly );
- QStringList data = QStringList::split("\n", QApplication::clipboard()->text());
+ TQByteArray ba;
+ TQTextStream txtStream( ba, IO_WriteOnly );
+ TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text());
KURL::List urls;
KURLDrag::decode(data, urls);
- QStringList::Iterator end(data.end());
- for(QStringList::Iterator it=data.begin(); it!=end; ++it)
+ TQStringList::Iterator end(data.end());
+ for(TQStringList::Iterator it=data.begin(); it!=end; ++it)
txtStream << *it;
if ( ba.size() == 0 )
{
@@ -256,9 +256,9 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
}
-KIO_EXPORT void KIO::pasteData( const KURL& u, const QByteArray& _data )
+KIO_EXPORT void KIO::pasteData( const KURL& u, const TQByteArray& _data )
{
- KURL new_url = getNewFileName( u, QString::null );
+ KURL new_url = getNewFileName( u, TQString::null );
// We could use KIO::put here, but that would require a class
// for the slotData call. With NetAccess, we can do a synchronous call.
@@ -273,12 +273,12 @@ KIO_EXPORT void KIO::pasteData( const KURL& u, const QByteArray& _data )
(void) KIO::NetAccess::upload( tempFile.name(), new_url, 0 );
}
-KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _data )
+KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data )
{
- return pasteDataAsync( u, _data, QString::null );
+ return pasteDataAsync( u, _data, TQString::null );
}
-KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _data, const QString& text )
+KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data, const TQString& text )
{
KURL new_url = getNewFileName( u, text );
@@ -288,13 +288,13 @@ KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _
return pasteDataAsyncTo( new_url, _data );
}
-KIO_EXPORT QString KIO::pasteActionText()
+KIO_EXPORT TQString KIO::pasteActionText()
{
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
KURL::List urls;
if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) {
if ( urls.isEmpty() )
- return QString::null; // nothing to paste
+ return TQString::null; // nothing to paste
else if ( urls.first().isLocalFile() )
return i18n( "&Paste File", "&Paste %n Files", urls.count() );
else
@@ -302,7 +302,7 @@ KIO_EXPORT QString KIO::pasteActionText()
} else if ( data->format(0) != 0 ) {
return i18n( "&Paste Clipboard Contents" );
} else {
- return QString::null;
+ return TQString::null;
}
}
diff --git a/kio/kio/paste.h b/kio/kio/paste.h
index eb5822ee3..66975d772 100644
--- a/kio/kio/paste.h
+++ b/kio/kio/paste.h
@@ -19,8 +19,8 @@
#ifndef __kio_paste_h__
#define __kio_paste_h__
-#include <qstring.h>
-#include <qmemarray.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
#include <kurl.h>
class QWidget;
class QMimeSource;
@@ -54,7 +54,7 @@ namespace KIO {
* @param data the data to copy
* @see pasteClipboard()
*/
- KIO_EXPORT void pasteData( const KURL& destURL, const QByteArray& data );
+ KIO_EXPORT void pasteData( const KURL& destURL, const TQByteArray& data );
/**
* Pastes the given @p data to the given destination URL.
@@ -66,7 +66,7 @@ namespace KIO {
* @param data the data to copy
* @see pasteClipboard()
*/
- KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const QByteArray& data );
+ KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data );
/**
* Pastes the given @p data to the given destination URL.
@@ -79,7 +79,7 @@ namespace KIO {
* @param dialogText the text to show in the dialog
* @see pasteClipboard()
*/
- KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const QByteArray& data, const QString& dialogText ); // KDE4: merge with above
+ KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data, const TQString& dialogText ); // KDE4: merge with above
/**
@@ -88,20 +88,20 @@ namespace KIO {
* This is the method used when handling drops (of anything else than URLs)
* onto kdesktop and konqueror.
*
- * @param data the QMimeSource (e.g. a QDropEvent)
+ * @param data the TQMimeSource (e.g. a TQDropEvent)
* @param destURL the URL of the directory where the data will be pasted.
* The filename to use in that directory is prompted by this method.
* @param dialogText the text to show in the dialog
* @param widget parent widget to use for dialogs
- * @param clipboard whether the QMimeSource comes from QClipboard. If you
+ * @param clipboard whether the TQMimeSource comes from QClipboard. If you
* use pasteClipboard for that case, you never have to worry about this parameter.
*
* @see pasteClipboard()
*
* @since 3.5
*/
- KIO_EXPORT CopyJob* pasteMimeSource( QMimeSource* data, const KURL& destURL,
- const QString& dialogText, QWidget* widget,
+ KIO_EXPORT CopyJob* pasteMimeSource( TQMimeSource* data, const KURL& destURL,
+ const TQString& dialogText, TQWidget* widget,
bool clipboard = false );
/**
@@ -119,7 +119,7 @@ namespace KIO {
*
* @since 3.5
*/
- KIO_EXPORT QString pasteActionText();
+ KIO_EXPORT TQString pasteActionText();
}
#endif
diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp
index cf9995cb1..480eaaba8 100644
--- a/kio/kio/pastedialog.cpp
+++ b/kio/kio/pastedialog.cpp
@@ -22,22 +22,22 @@
#include <kmimetype.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-
-KIO::PasteDialog::PasteDialog( const QString &caption, const QString &label,
- const QString &value, const QStringList& items,
- QWidget *parent,
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+
+KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label,
+ const TQString &value, const TQStringList& items,
+ TQWidget *parent,
bool clipboard )
: KDialogBase( parent, 0 /*name*/, true, caption, Ok|Cancel, Ok, true )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- m_label = new QLabel( label, frame );
+ m_label = new TQLabel( label, frame );
layout->addWidget( m_label );
m_lineEdit = new KLineEdit( value, frame );
@@ -46,24 +46,24 @@ KIO::PasteDialog::PasteDialog( const QString &caption, const QString &label,
m_lineEdit->setFocus();
m_label->setBuddy( m_lineEdit );
- layout->addWidget( new QLabel( i18n( "Data format:" ), frame ) );
- m_comboBox = new QComboBox( frame );
+ layout->addWidget( new TQLabel( i18n( "Data format:" ), frame ) );
+ m_comboBox = new TQComboBox( frame );
m_comboBox->insertStringList( items );
layout->addWidget( m_comboBox );
layout->addStretch();
- //connect( m_lineEdit, SIGNAL( textChanged( const QString & ) ),
- // SLOT( slotEditTextChanged( const QString & ) ) );
- //connect( this, SIGNAL( user1Clicked() ), m_lineEdit, SLOT( clear() ) );
+ //connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ // TQT_SLOT( slotEditTextChanged( const TQString & ) ) );
+ //connect( this, TQT_SIGNAL( user1Clicked() ), m_lineEdit, TQT_SLOT( clear() ) );
//slotEditTextChanged( value );
setMinimumWidth( 350 );
m_clipboardChanged = false;
if ( clipboard )
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( slotClipboardDataChanged() ) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ this, TQT_SLOT( slotClipboardDataChanged() ) );
}
void KIO::PasteDialog::slotClipboardDataChanged()
@@ -71,7 +71,7 @@ void KIO::PasteDialog::slotClipboardDataChanged()
m_clipboardChanged = true;
}
-QString KIO::PasteDialog::lineEditText() const
+TQString KIO::PasteDialog::lineEditText() const
{
return m_lineEdit->text();
}
diff --git a/kio/kio/pastedialog.h b/kio/kio/pastedialog.h
index 0cf141d50..a025d532d 100644
--- a/kio/kio/pastedialog.h
+++ b/kio/kio/pastedialog.h
@@ -36,11 +36,11 @@ class PasteDialog : public KDialogBase
{
Q_OBJECT
public:
- PasteDialog( const QString &caption, const QString &label,
- const QString &value, const QStringList& items,
- QWidget *parent, bool clipboard );
+ PasteDialog( const TQString &caption, const TQString &label,
+ const TQString &value, const TQStringList& items,
+ TQWidget *parent, bool clipboard );
- QString lineEditText() const;
+ TQString lineEditText() const;
int comboItem() const;
bool clipboardChanged() const { return m_clipboardChanged; }
@@ -48,9 +48,9 @@ private slots:
void slotClipboardDataChanged();
private:
- QLabel* m_label;
+ TQLabel* m_label;
KLineEdit* m_lineEdit;
- QComboBox* m_comboBox;
+ TQComboBox* m_comboBox;
bool m_clipboardChanged;
class Private;
diff --git a/kio/kio/posixacladdons.cpp b/kio/kio/posixacladdons.cpp
index 7a7ebe2f7..bae51592b 100644
--- a/kio/kio/posixacladdons.cpp
+++ b/kio/kio/posixacladdons.cpp
@@ -24,13 +24,13 @@
#include <errno.h>
#include <sys/stat.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class SortedEntryList : public QPtrList<acl_entry_t>
+class SortedEntryList : public TQPtrList<acl_entry_t>
{
protected:
- int compareItems( QPtrCollection::Item i1,
- QPtrCollection::Item i2 )
+ int compareItems( TQPtrCollection::Item i1,
+ TQPtrCollection::Item i2 )
{
acl_entry_t *e1 = static_cast<acl_entry_t*>( i1 );
acl_entry_t *e2 = static_cast<acl_entry_t*>( i2 );
diff --git a/kio/kio/posixacladdons.h b/kio/kio/posixacladdons.h
index f77831f21..45c4af245 100644
--- a/kio/kio/posixacladdons.h
+++ b/kio/kio/posixacladdons.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qglobal.h>
+#include <tqglobal.h>
#if defined(USE_POSIX_ACL) && !defined(HAVE_NON_POSIX_ACL_EXTENSIIONS)
diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp
index ede141003..2a2ad91cc 100644
--- a/kio/kio/previewjob.cpp
+++ b/kio/kio/previewjob.cpp
@@ -34,11 +34,11 @@
#include <sys/shm.h>
#endif
-#include <qdir.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kdatastream.h> // Do not remove, needed for correct bool serialization
#include <kfileitem.h>
@@ -69,20 +69,20 @@ struct KIO::PreviewJobPrivate
STATE_CREATETHUMB // thumbnail:/ slave
} state;
KFileItemList initialItems;
- const QStringList *enabledPlugins;
+ const TQStringList *enabledPlugins;
// Our todo list :)
- QValueList<PreviewItem> items;
+ TQValueList<PreviewItem> items;
// The current item
PreviewItem currentItem;
// The modification time of that URL
time_t tOrig;
// Path to thumbnail cache for the current size
- QString thumbPath;
+ TQString thumbPath;
// Original URL of current item in TMS format
// (file:///path/to/file instead of file:/path/to/file)
- QString origName;
+ TQString origName;
// Thumbnail file name for current item
- QString thumbName;
+ TQString thumbName;
// Size of thumbnail
int width;
int height;
@@ -94,7 +94,7 @@ struct KIO::PreviewJobPrivate
// Whether we should save the thumbnail
bool bSave;
// If the file to create a thumb for was a temp file, this is its name
- QString tempName;
+ TQString tempName;
// Over that, it's too much
unsigned long maximumSize;
// the size for the icon overlay
@@ -110,14 +110,14 @@ struct KIO::PreviewJobPrivate
bool deleteItems;
bool succeeded;
// Root of thumbnail cache
- QString thumbRoot;
+ TQString thumbRoot;
bool ignoreMaximumSize;
- QTimer startPreviewTimer;
+ TQTimer startPreviewTimer;
};
PreviewJob::PreviewJob( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins, bool deleteItems )
+ const TQStringList *enabledPlugins, bool deleteItems )
: KIO::Job( false /* no GUI */ )
{
d = new PreviewJobPrivate;
@@ -137,11 +137,11 @@ PreviewJob::PreviewJob( const KFileItemList &items, int width, int height,
d->bSave = save && scale;
d->succeeded = false;
d->currentItem.item = 0;
- d->thumbRoot = QDir::homeDirPath() + "/.thumbnails/";
+ d->thumbRoot = TQDir::homeDirPath() + "/.thumbnails/";
d->ignoreMaximumSize = false;
// Return to event loop first, determineNextFile() might delete this;
- connect(&d->startPreviewTimer, SIGNAL(timeout()), SLOT(startPreview()) );
+ connect(&d->startPreviewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startPreview()) );
d->startPreviewTimer.start(0, true);
}
@@ -160,13 +160,13 @@ void PreviewJob::startPreview()
{
// Load the list of plugins to determine which mimetypes are supported
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
- QMap<QString, KService::Ptr> mimeMap;
+ TQMap<TQString, KService::Ptr> mimeMap;
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName()))
{
- QStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
- for (QStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
+ TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
+ for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
mimeMap.insert(*mt, *it);
}
@@ -176,17 +176,17 @@ void PreviewJob::startPreview()
{
PreviewItem item;
item.item = it.current();
- QMap<QString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype());
+ TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype());
if (plugin == mimeMap.end() && it.current()->mimetype() != "application/x-desktop")
{
- QString mimeType = it.current()->mimetype();
- plugin = mimeMap.find(mimeType.replace(QRegExp("/.*"), "/*"));
+ TQString mimeType = it.current()->mimetype();
+ plugin = mimeMap.find(mimeType.replace(TQRegExp("/.*"), "/*"));
if (plugin == mimeMap.end())
{
// check mime type inheritance
KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype());
- QString parentMimeType = mimeInfo->parentMimeType();
+ TQString parentMimeType = mimeInfo->parentMimeType();
while (!parentMimeType.isEmpty())
{
plugin = mimeMap.find(parentMimeType);
@@ -203,8 +203,8 @@ void PreviewJob::startPreview()
{
// check X-KDE-Text property
KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype());
- QVariant textProperty = mimeInfo->property("X-KDE-text");
- if (textProperty.isValid() && textProperty.type() == QVariant::Bool)
+ TQVariant textProperty = mimeInfo->property("X-KDE-text");
+ if (textProperty.isValid() && textProperty.type() == TQVariant::Bool)
{
if (textProperty.toBool())
{
@@ -255,7 +255,7 @@ void PreviewJob::startPreview()
void PreviewJob::removeItem( const KFileItem *item )
{
- for (QValueList<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
+ for (TQValueList<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
if ((*it).item == item)
{
d->items.remove(it);
@@ -372,8 +372,8 @@ void PreviewJob::slotResult( KIO::Job *job )
{
if (!d->tempName.isEmpty())
{
- QFile::remove(d->tempName);
- d->tempName = QString::null;
+ TQFile::remove(d->tempName);
+ d->tempName = TQString::null;
}
determineNextFile();
return;
@@ -388,7 +388,7 @@ bool PreviewJob::statResultThumbnail()
KURL url = d->currentItem.item->url();
// Don't include the password if any
- url.setPass(QString::null);
+ url.setPass(TQString::null);
// The TMS defines local files as file:///path/to/file instead of KDE's
// way (file:/path/to/file)
#ifdef KURL_TRIPLE_SLASH_FILE_PROT
@@ -398,10 +398,10 @@ bool PreviewJob::statResultThumbnail()
else d->origName = url.url();
#endif
- KMD5 md5( QFile::encodeName( d->origName ) );
- d->thumbName = QFile::encodeName( md5.hexDigest() ) + ".png";
+ KMD5 md5( TQFile::encodeName( d->origName ) );
+ d->thumbName = TQFile::encodeName( md5.hexDigest() ) + ".png";
- QImage thumb;
+ TQImage thumb;
if ( !thumb.load( d->thumbPath + d->thumbName ) ) return false;
if ( thumb.text( "Thumb::URI", 0 ) != d->origName ||
@@ -419,7 +419,7 @@ void PreviewJob::getOrCreateThumbnail()
{
// We still need to load the orig file ! (This is getting tedious) :)
const KFileItem* item = d->currentItem.item;
- const QString localPath = item->localPath();
+ const TQString localPath = item->localPath();
if ( !localPath.isEmpty() )
createThumbnail( localPath );
else
@@ -436,8 +436,8 @@ void PreviewJob::getOrCreateThumbnail()
}
}
-// KDE 4: Make it const QString &
-void PreviewJob::createThumbnail( QString pixPath )
+// KDE 4: Make it const TQString &
+void PreviewJob::createThumbnail( TQString pixPath )
{
d->state = PreviewJobPrivate::STATE_CREATETHUMB;
KURL thumbURL;
@@ -445,13 +445,13 @@ void PreviewJob::createThumbnail( QString pixPath )
thumbURL.setPath(pixPath);
KIO::TransferJob *job = KIO::get(thumbURL, false, false);
addSubjob(job);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), SLOT(slotThumbData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotThumbData(KIO::Job *, const TQByteArray &)));
bool save = d->bSave && d->currentItem.plugin->property("CacheThumbnail").toBool();
job->addMetaData("mimeType", d->currentItem.item->mimetype());
- job->addMetaData("width", QString().setNum(save ? d->cacheWidth : d->width));
- job->addMetaData("height", QString().setNum(save ? d->cacheHeight : d->height));
- job->addMetaData("iconSize", QString().setNum(save ? 64 : d->iconSize));
- job->addMetaData("iconAlpha", QString().setNum(d->iconAlpha));
+ job->addMetaData("width", TQString().setNum(save ? d->cacheWidth : d->width));
+ job->addMetaData("height", TQString().setNum(save ? d->cacheHeight : d->height));
+ job->addMetaData("iconSize", TQString().setNum(save ? 64 : d->iconSize));
+ job->addMetaData("iconAlpha", TQString().setNum(d->iconAlpha));
job->addMetaData("plugin", d->currentItem.plugin->library());
#ifdef Q_OS_UNIX
if (d->shmid == -1)
@@ -475,25 +475,25 @@ void PreviewJob::createThumbnail( QString pixPath )
d->shmaddr = 0;
}
if (d->shmid != -1)
- job->addMetaData("shmid", QString().setNum(d->shmid));
+ job->addMetaData("shmid", TQString().setNum(d->shmid));
#endif
}
-void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
+void PreviewJob::slotThumbData(KIO::Job *, const TQByteArray &data)
{
bool save = d->bSave &&
d->currentItem.plugin->property("CacheThumbnail").toBool() &&
(d->currentItem.item->url().protocol() != "file" ||
!d->currentItem.item->url().directory( false ).startsWith(d->thumbRoot));
- QImage thumb;
+ TQImage thumb;
#ifdef Q_OS_UNIX
if (d->shmaddr)
{
- QDataStream str(data, IO_ReadOnly);
+ TQDataStream str(data, IO_ReadOnly);
int width, height, depth;
bool alpha;
str >> width >> height >> depth >> alpha;
- thumb = QImage(d->shmaddr, width, height, depth, 0, 0, QImage::IgnoreEndian);
+ thumb = TQImage(d->shmaddr, width, height, depth, 0, 0, TQImage::IgnoreEndian);
thumb.setAlphaBuffer(alpha);
}
else
@@ -503,7 +503,7 @@ void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
if (save)
{
thumb.setText("Thumb::URI", 0, d->origName);
- thumb.setText("Thumb::MTime", 0, QString::number(d->tOrig));
+ thumb.setText("Thumb::MTime", 0, TQString::number(d->tOrig));
thumb.setText("Thumb::Size", 0, number(d->currentItem.item->size()));
thumb.setText("Thumb::Mimetype", 0, d->currentItem.item->mimetype());
thumb.setText("Software", 0, "KDE Thumbnail Generator");
@@ -511,16 +511,16 @@ void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
if (temp.status() == 0) //Only try to write out the thumbnail if we
{ //actually created the temp file.
thumb.save(temp.name(), "PNG");
- rename(QFile::encodeName(temp.name()), QFile::encodeName(d->thumbPath + d->thumbName));
+ rename(TQFile::encodeName(temp.name()), TQFile::encodeName(d->thumbPath + d->thumbName));
}
}
emitPreview( thumb );
d->succeeded = true;
}
-void PreviewJob::emitPreview(const QImage &thumb)
+void PreviewJob::emitPreview(const TQImage &thumb)
{
- QPixmap pix;
+ TQPixmap pix;
if (thumb.width() > d->width || thumb.height() > d->height)
{
double imgRatio = (double)thumb.height() / (double)thumb.width();
@@ -541,9 +541,9 @@ void PreviewJob::emitFailed(const KFileItem *item)
emit failed(item);
}
-QStringList PreviewJob::availablePlugins()
+TQStringList PreviewJob::availablePlugins()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
if (!result.contains((*it)->desktopEntryName()))
@@ -551,9 +551,9 @@ QStringList PreviewJob::availablePlugins()
return result;
}
-QStringList PreviewJob::supportedMimeTypes()
+TQStringList PreviewJob::supportedMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result += (*it)->property("MimeTypes").toStringList();
@@ -568,7 +568,7 @@ void PreviewJob::kill( bool quietly )
PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins )
+ const TQStringList *enabledPlugins )
{
return new PreviewJob(items, width, height, iconSize, iconAlpha,
scale, save, enabledPlugins);
@@ -576,7 +576,7 @@ PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height,
PreviewJob *KIO::filePreview( const KURL::List &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins )
+ const TQStringList *enabledPlugins )
{
KFileItemList fileItems;
for (KURL::List::ConstIterator it = items.begin(); it != items.end(); ++it)
diff --git a/kio/kio/previewjob.h b/kio/kio/previewjob.h
index d2e976b0f..2a59083c4 100644
--- a/kio/kio/previewjob.h
+++ b/kio/kio/previewjob.h
@@ -56,7 +56,7 @@ namespace KIO {
*/
PreviewJob( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins, bool deleteItems = false );
+ const TQStringList *enabledPlugins, bool deleteItems = false );
virtual ~PreviewJob();
/**
@@ -81,14 +81,14 @@ namespace KIO {
* no .desktop).
* @return the list of plugins
*/
- static QStringList availablePlugins();
+ static TQStringList availablePlugins();
/**
* Returns a list of all supported MIME types. The list can
* contain entries like text/ * (without the space).
* @return the list of mime types
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
/**
* Reimplemented for internal reasons
@@ -102,7 +102,7 @@ namespace KIO {
* @param item the file of the preview
* @param preview the preview image
*/
- void gotPreview( const KFileItem *item, const QPixmap &preview );
+ void gotPreview( const KFileItem *item, const TQPixmap &preview );
/**
* Emitted when a thumbnail for @p item could not be created,
* either because a ThumbCreator for its MIME type does not
@@ -114,18 +114,18 @@ namespace KIO {
protected:
void getOrCreateThumbnail();
bool statResultThumbnail();
- void createThumbnail( QString );
+ void createThumbnail( TQString );
protected slots:
virtual void slotResult( KIO::Job *job );
private slots:
void startPreview();
- void slotThumbData(KIO::Job *, const QByteArray &);
+ void slotThumbData(KIO::Job *, const TQByteArray &);
private:
void determineNextFile();
- void emitPreview(const QImage &thumb);
+ void emitPreview(const TQImage &thumb);
void emitFailed(const KFileItem *item = 0);
protected:
@@ -154,7 +154,7 @@ namespace KIO {
* @return the new PreviewJob
* @see PreviewJob::availablePlugins()
*/
- KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
+ KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
/**
* Creates a PreviewJob to generate or retrieve a preview image
@@ -176,7 +176,7 @@ namespace KIO {
* @return the new PreviewJob
* @see PreviewJob::availablePlugins()
*/
- KIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
+ KIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
}
#endif
diff --git a/kio/kio/progressbase.cpp b/kio/kio/progressbase.cpp
index 6d49ac69a..f01c00a7a 100644
--- a/kio/kio/progressbase.cpp
+++ b/kio/kio/progressbase.cpp
@@ -21,8 +21,8 @@
namespace KIO {
-ProgressBase::ProgressBase( QWidget *parent )
- : QWidget( parent )
+ProgressBase::ProgressBase( TQWidget *parent )
+ : TQWidget( parent )
{
m_pJob = 0;
@@ -37,14 +37,14 @@ ProgressBase::ProgressBase( QWidget *parent )
void ProgressBase::setJob( KIO::Job *job )
{
// first connect all slots
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
@@ -54,37 +54,37 @@ void ProgressBase::setJob( KIO::Job *job )
void ProgressBase::setJob( KIO::CopyJob *job )
{
// first connect all slots
- connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( copying( KIO::Job*, const KURL& , const KURL& ) ),
- SLOT( slotCopying( KIO::Job*, const KURL&, const KURL& ) ) );
- connect( job, SIGNAL( moving( KIO::Job*, const KURL& , const KURL& ) ),
- SLOT( slotMoving( KIO::Job*, const KURL&, const KURL& ) ) );
- connect( job, SIGNAL( creatingDir( KIO::Job*, const KURL& ) ),
- SLOT( slotCreatingDir( KIO::Job*, const KURL& ) ) );
-
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
-
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( copying( KIO::Job*, const KURL& , const KURL& ) ),
+ TQT_SLOT( slotCopying( KIO::Job*, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( moving( KIO::Job*, const KURL& , const KURL& ) ),
+ TQT_SLOT( slotMoving( KIO::Job*, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( creatingDir( KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotCreatingDir( KIO::Job*, const KURL& ) ) );
+
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
+
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
@@ -94,40 +94,40 @@ void ProgressBase::setJob( KIO::CopyJob *job )
void ProgressBase::setJob( KIO::DeleteJob *job )
{
// first connect all slots
- connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( deleting( KIO::Job*, const KURL& ) ),
- SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );
-
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
-
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );
+
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
+
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
}
-void ProgressBase::closeEvent( QCloseEvent* ) {
+void ProgressBase::closeEvent( TQCloseEvent* ) {
// kill job when desired
if ( m_bStopOnClose ) {
slotStop();
diff --git a/kio/kio/progressbase.h b/kio/kio/progressbase.h
index d46b1d1ba..d9e3d8f96 100644
--- a/kio/kio/progressbase.h
+++ b/kio/kio/progressbase.h
@@ -19,7 +19,7 @@
#define __progressbase_h__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kio/global.h>
@@ -67,7 +67,7 @@ namespace KIO
* @short Base class for IO progress dialogs.
* @author Matej Koss <koss@miesto.sk>
*/
-class KIO_EXPORT ProgressBase : public QWidget {
+class KIO_EXPORT ProgressBase : public TQWidget {
Q_OBJECT
@@ -77,7 +77,7 @@ public:
* Creates a new progress dialog.
* @param parent the parent of this dialog window, or 0
*/
- ProgressBase( QWidget *parent );
+ ProgressBase( TQWidget *parent );
~ProgressBase() {}
/**
@@ -251,7 +251,7 @@ protected slots:
protected:
- virtual void closeEvent( QCloseEvent * );
+ virtual void closeEvent( TQCloseEvent * );
KIO::Job* m_pJob;
diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp
index 0c9cf8a18..fe830b2e3 100644
--- a/kio/kio/renamedlg.cpp
+++ b/kio/kio/renamedlg.cpp
@@ -24,11 +24,11 @@
#include <stdio.h>
#include <assert.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqdir.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
@@ -64,25 +64,25 @@ class RenameDlg::RenameDlgPrivate
m_pLineEdit = 0;
}
KPushButton *bCancel;
- QPushButton *bRename;
- QPushButton *bSkip;
- QPushButton *bAutoSkip;
- QPushButton *bOverwrite;
- QPushButton *bOverwriteAll;
- QPushButton *bResume;
- QPushButton *bResumeAll;
- QPushButton *bSuggestNewName;
- QLineEdit* m_pLineEdit;
+ TQPushButton *bRename;
+ TQPushButton *bSkip;
+ TQPushButton *bAutoSkip;
+ TQPushButton *bOverwrite;
+ TQPushButton *bOverwriteAll;
+ TQPushButton *bResume;
+ TQPushButton *bResumeAll;
+ TQPushButton *bSuggestNewName;
+ TQLineEdit* m_pLineEdit;
KURL src;
KURL dest;
- QString mimeSrc;
- QString mimeDest;
+ TQString mimeSrc;
+ TQString mimeDest;
bool modal;
bool plugin;
};
-RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
- const QString &_src, const QString &_dest,
+RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
+ const TQString &_src, const TQString &_dest,
RenameDlg_Mode _mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -91,7 +91,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
time_t mtimeSrc,
time_t mtimeDest,
bool _modal)
- : QDialog ( parent, "KIO::RenameDialog" , _modal )
+ : TQDialog ( parent, "KIO::RenameDialog" , _modal )
{
d = new RenameDlgPrivate( );
d->modal = _modal;
@@ -113,52 +113,52 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
setCaption( _caption );
d->bCancel = new KPushButton( KStdGuiItem::cancel(), this );
- connect(d->bCancel, SIGNAL(clicked()), this, SLOT(b0Pressed()));
+ connect(d->bCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed()));
if ( ! (_mode & M_NORENAME ) ) {
- d->bRename = new QPushButton( i18n( "&Rename" ), this );
+ d->bRename = new TQPushButton( i18n( "&Rename" ), this );
d->bRename->setEnabled(false);
- d->bSuggestNewName = new QPushButton( i18n( "Suggest New &Name" ), this );
- connect(d->bSuggestNewName, SIGNAL(clicked()), this, SLOT(b8Pressed()));
- connect(d->bRename, SIGNAL(clicked()), this, SLOT(b1Pressed()));
+ d->bSuggestNewName = new TQPushButton( i18n( "Suggest New &Name" ), this );
+ connect(d->bSuggestNewName, TQT_SIGNAL(clicked()), this, TQT_SLOT(b8Pressed()));
+ connect(d->bRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed()));
}
if ( ( _mode & M_MULTI ) && ( _mode & M_SKIP ) ) {
- d->bSkip = new QPushButton( i18n( "&Skip" ), this );
- connect(d->bSkip, SIGNAL(clicked()), this, SLOT(b2Pressed()));
+ d->bSkip = new TQPushButton( i18n( "&Skip" ), this );
+ connect(d->bSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed()));
- d->bAutoSkip = new QPushButton( i18n( "&Auto Skip" ), this );
- connect(d->bAutoSkip, SIGNAL(clicked()), this, SLOT(b3Pressed()));
+ d->bAutoSkip = new TQPushButton( i18n( "&Auto Skip" ), this );
+ connect(d->bAutoSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b3Pressed()));
}
if ( _mode & M_OVERWRITE ) {
- d->bOverwrite = new QPushButton( i18n( "&Overwrite" ), this );
- connect(d->bOverwrite, SIGNAL(clicked()), this, SLOT(b4Pressed()));
+ d->bOverwrite = new TQPushButton( i18n( "&Overwrite" ), this );
+ connect(d->bOverwrite, TQT_SIGNAL(clicked()), this, TQT_SLOT(b4Pressed()));
if ( _mode & M_MULTI ) {
- d->bOverwriteAll = new QPushButton( i18n( "O&verwrite All" ), this );
- connect(d->bOverwriteAll, SIGNAL(clicked()), this, SLOT(b5Pressed()));
+ d->bOverwriteAll = new TQPushButton( i18n( "O&verwrite All" ), this );
+ connect(d->bOverwriteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b5Pressed()));
}
}
if ( _mode & M_RESUME ) {
- d->bResume = new QPushButton( i18n( "&Resume" ), this );
- connect(d->bResume, SIGNAL(clicked()), this, SLOT(b6Pressed()));
+ d->bResume = new TQPushButton( i18n( "&Resume" ), this );
+ connect(d->bResume, TQT_SIGNAL(clicked()), this, TQT_SLOT(b6Pressed()));
if ( _mode & M_MULTI )
{
- d->bResumeAll = new QPushButton( i18n( "R&esume All" ), this );
- connect(d->bResumeAll, SIGNAL(clicked()), this, SLOT(b7Pressed()));
+ d->bResumeAll = new TQPushButton( i18n( "R&esume All" ), this );
+ connect(d->bResumeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b7Pressed()));
}
}
- QVBoxLayout* pLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout* pLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
pLayout->addStrut( 360 ); // makes dlg at least that wide
// User tries to overwrite a file with itself ?
if ( _mode & M_OVERWRITE_ITSELF ) {
- QLabel *lb = new QLabel( i18n( "This action would overwrite '%1' with itself.\n"
+ TQLabel *lb = new TQLabel( i18n( "This action would overwrite '%1' with itself.\n"
"Please enter a new file name:" ).arg( KStringHandler::csqueeze( d->src.pathOrURL(),100 ) ), this );
d->bRename->setText(i18n("C&ontinue"));
pLayout->addWidget( lb );
@@ -180,7 +180,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
KTrader::OfferList::ConstIterator it = plugin_offers.begin();
KTrader::OfferList::ConstIterator end = plugin_offers.end();
for( ; it != end; ++it ){
- QString libName = (*it)->library();
+ TQString libName = (*it)->library();
if( libName.isEmpty() ){
kdDebug(7024) << "lib is empty" << endl;
continue;
@@ -194,7 +194,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
lib->unload();
continue;
}
- QObject *obj = factory->create( this, (*it)->name().latin1() );
+ TQObject *obj = factory->create( this, (*it)->name().latin1() );
if(!obj) {
lib->unload();
continue;
@@ -221,13 +221,13 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
if( !d->plugin ){
// No plugin found, build default dialog
- QGridLayout * gridLayout = new QGridLayout( 0L, 9, 2, KDialog::marginHint(),
+ TQGridLayout * gridLayout = new TQGridLayout( 0L, 9, 2, KDialog::marginHint(),
KDialog::spacingHint() );
pLayout->addLayout(gridLayout);
gridLayout->setColStretch(0,0);
gridLayout->setColStretch(1,10);
- QString sentence1;
+ TQString sentence1;
if (mtimeDest < mtimeSrc)
sentence1 = i18n("An older item named '%1' already exists.");
else if (mtimeDest == mtimeSrc)
@@ -235,32 +235,32 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
else
sentence1 = i18n("A newer item named '%1' already exists.");
- QLabel * lb1 = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL() ), this );
+ TQLabel * lb1 = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL() ), this );
gridLayout->addMultiCellWidget( lb1, 0, 0, 0, 1 ); // takes the complete first line
- lb1 = new QLabel( this );
+ lb1 = new TQLabel( this );
lb1->setPixmap( KMimeType::pixmapForURL( d->dest ) );
gridLayout->addMultiCellWidget( lb1, 1, 3, 0, 0 ); // takes the first column on rows 1-3
int row = 1;
if ( sizeDest != (KIO::filesize_t)-1 )
{
- QLabel * lb = new QLabel( i18n("size %1").arg( KIO::convertSize(sizeDest) ), this );
+ TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeDest) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( ctimeDest != (time_t)-1 )
{
- QDateTime dctime; dctime.setTime_t( ctimeDest );
- QLabel * lb = new QLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
+ TQDateTime dctime; dctime.setTime_t( ctimeDest );
+ TQLabel * lb = new TQLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( mtimeDest != (time_t)-1 )
{
- QDateTime dmtime; dmtime.setTime_t( mtimeDest );
- QLabel * lb = new QLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
+ TQDateTime dmtime; dmtime.setTime_t( mtimeDest );
+ TQLabel * lb = new TQLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
@@ -270,10 +270,10 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
// rows 1 to 3 are the details (size/ctime/mtime), row 4 is empty
gridLayout->addRowSpacing( 4, 20 );
- QLabel * lb2 = new KSqueezedTextLabel( i18n("The source file is '%1'").arg(d->src.pathOrURL()), this );
+ TQLabel * lb2 = new KSqueezedTextLabel( i18n("The source file is '%1'").arg(d->src.pathOrURL()), this );
gridLayout->addMultiCellWidget( lb2, 5, 5, 0, 1 ); // takes the complete first line
- lb2 = new QLabel( this );
+ lb2 = new TQLabel( this );
lb2->setPixmap( KMimeType::pixmapForURL( d->src ) );
gridLayout->addMultiCellWidget( lb2, 6, 8, 0, 0 ); // takes the first column on rows 6-8
@@ -281,21 +281,21 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
if ( sizeSrc != (KIO::filesize_t)-1 )
{
- QLabel * lb = new QLabel( i18n("size %1").arg( KIO::convertSize(sizeSrc) ), this );
+ TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeSrc) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( ctimeSrc != (time_t)-1 )
{
- QDateTime dctime; dctime.setTime_t( ctimeSrc );
- QLabel * lb = new QLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
+ TQDateTime dctime; dctime.setTime_t( ctimeSrc );
+ TQLabel * lb = new TQLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( mtimeSrc != (time_t)-1 )
{
- QDateTime dmtime; dmtime.setTime_t( mtimeSrc );
- QLabel * lb = new QLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
+ TQDateTime dmtime; dmtime.setTime_t( mtimeSrc );
+ TQLabel * lb = new TQLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
@@ -306,7 +306,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
{
// This is the case where we don't want to allow overwriting, the existing
// file must be preserved (e.g. when renaming).
- QString sentence1;
+ TQString sentence1;
if (mtimeDest < mtimeSrc)
sentence1 = i18n("An older item named '%1' already exists.");
else if (mtimeDest == mtimeSrc)
@@ -314,19 +314,19 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
else
sentence1 = i18n("A newer item named '%1' already exists.");
- QLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this );
+ TQLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this );
pLayout->addWidget(lb);
}
- QHBoxLayout* layout2 = new QHBoxLayout();
+ TQHBoxLayout* layout2 = new TQHBoxLayout();
pLayout->addLayout( layout2 );
- d->m_pLineEdit = new QLineEdit( this );
+ d->m_pLineEdit = new TQLineEdit( this );
layout2->addWidget( d->m_pLineEdit );
- QString fileName = d->dest.fileName();
+ TQString fileName = d->dest.fileName();
d->m_pLineEdit->setText( KIO::decodeFileName( fileName ) );
if ( d->bRename || d->bOverwrite )
- connect(d->m_pLineEdit, SIGNAL(textChanged(const QString &)),
- SLOT(enableRenameButton(const QString &)));
+ connect(d->m_pLineEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(enableRenameButton(const TQString &)));
if ( d->bSuggestNewName )
{
layout2->addWidget( d->bSuggestNewName );
@@ -336,7 +336,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
KSeparator* separator = new KSeparator( this );
pLayout->addWidget( separator );
- QHBoxLayout* layout = new QHBoxLayout();
+ TQHBoxLayout* layout = new TQHBoxLayout();
pLayout->addLayout( layout );
layout->addStretch(1);
@@ -389,7 +389,7 @@ RenameDlg::~RenameDlg()
// no need to delete Pushbuttons,... qt will do this
}
-void RenameDlg::enableRenameButton(const QString &newDest)
+void RenameDlg::enableRenameButton(const TQString &newDest)
{
if ( newDest != KIO::decodeFileName( d->dest.fileName() ) && !newDest.isEmpty() )
{
@@ -409,7 +409,7 @@ void RenameDlg::enableRenameButton(const QString &newDest)
KURL RenameDlg::newDestURL()
{
KURL newDest( d->dest );
- QString fileName = d->m_pLineEdit->text();
+ TQString fileName = d->m_pLineEdit->text();
newDest.setFileName( KIO::encodeFileName( fileName ) );
return newDest;
}
@@ -435,10 +435,10 @@ void RenameDlg::b1Pressed()
done( 1 );
}
-QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
+TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName)
{
- QString dotSuffix, suggestedName;
- QString basename = oldName;
+ TQString dotSuffix, suggestedName;
+ TQString basename = oldName;
int index = basename.find( '.' );
if ( index != -1 ) {
@@ -448,7 +448,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
int pos = basename.findRev( '_' );
if(pos != -1 ){
- QString tmp = basename.mid( pos+1 );
+ TQString tmp = basename.mid( pos+1 );
bool ok;
int number = tmp.toInt( &ok );
if ( !ok ) {// ok there is no number
@@ -456,7 +456,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
}
else {
// yes there's already a number behind the _ so increment it by one
- basename.replace( pos+1, tmp.length(), QString::number(number+1) );
+ basename.replace( pos+1, tmp.length(), TQString::number(number+1) );
suggestedName = basename + dotSuffix;
}
}
@@ -468,7 +468,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
// TODO: network transparency. However, using NetAccess from a modal dialog
// could be a problem, no? (given that it uses a modal widget itself....)
if ( baseURL.isLocalFile() )
- exists = QFileInfo( baseURL.path(+1) + suggestedName ).exists();
+ exists = TQFileInfo( baseURL.path(+1) + suggestedName ).exists();
if ( !exists )
return suggestedName;
@@ -519,11 +519,11 @@ void RenameDlg::b7Pressed()
done( 7 );
}
-static QString mime( const KURL& src )
+static TQString mime( const KURL& src )
{
KMimeType::Ptr type = KMimeType::findByURL( src );
//if( type->name() == KMimeType::defaultMimeType() ){ // ok no mimetype
- // QString ty = KIO::NetAccess::mimetype(d->src );
+ // TQString ty = KIO::NetAccess::mimetype(d->src );
// return ty;
return type->name();
}
@@ -544,10 +544,10 @@ void RenameDlg::pluginHandling()
}
-RenameDlg_Result KIO::open_RenameDlg( const QString & _caption,
- const QString & _src, const QString & _dest,
+RenameDlg_Result KIO::open_RenameDlg( const TQString & _caption,
+ const TQString & _src, const TQString & _dest,
RenameDlg_Mode _mode,
- QString& _new,
+ TQString& _new,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
time_t ctimeSrc,
diff --git a/kio/kio/renamedlg.h b/kio/kio/renamedlg.h
index 513090cc4..a1b5d6bb2 100644
--- a/kio/kio/renamedlg.h
+++ b/kio/kio/renamedlg.h
@@ -23,8 +23,8 @@
#define __kio_rename_dlg__
#include <kurl.h>
-#include <qdialog.h>
-#include <qstring.h>
+#include <tqdialog.h>
+#include <tqstring.h>
#include <sys/types.h>
#include <kio/global.h>
@@ -65,9 +65,9 @@ public:
* @param modal set to true for a modal dialog
* @see RenameDlg_Mode
*/
- RenameDlg( QWidget *parent, const QString & caption,
+ RenameDlg( TQWidget *parent, const TQString & caption,
// KDE4: make those KURLs, and use pathOrURL() internally.
- const QString & src, const QString & dest,
+ const TQString & src, const TQString & dest,
RenameDlg_Mode mode,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
@@ -91,7 +91,7 @@ public:
* The suggested file name is of the form foo_1 foo_2 etc.
* @since 3.4
*/
- static QString suggestName(const KURL& baseURL, const QString& oldName);
+ static TQString suggestName(const KURL& baseURL, const TQString& oldName);
public slots:
/// KDE4: rename to cancelPressed(), renamePressed() etc.
@@ -106,7 +106,7 @@ public slots:
void b8Pressed();
protected slots:
- void enableRenameButton(const QString &);
+ void enableRenameButton(const TQString &);
private:
class RenameDlgPrivate;
RenameDlgPrivate *d;
@@ -135,10 +135,10 @@ private:
* @param mtimeDest modification time of destination file
* @return the result
*/
-KIO_EXPORT RenameDlg_Result open_RenameDlg( const QString & caption,
+KIO_EXPORT RenameDlg_Result open_RenameDlg( const TQString & caption,
// KDE4: make those KURLs
- const QString& src, const QString & dest,
- RenameDlg_Mode mode, QString& newDestPath,
+ const TQString& src, const TQString & dest,
+ RenameDlg_Mode mode, TQString& newDestPath,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
time_t ctimeSrc = (time_t) -1,
diff --git a/kio/kio/renamedlgplugin.h b/kio/kio/renamedlgplugin.h
index e7bda98f2..39319fdb8 100644
--- a/kio/kio/renamedlgplugin.h
+++ b/kio/kio/renamedlgplugin.h
@@ -21,10 +21,10 @@
#define renamedlgplugin_h
#include <kio/renamedlg.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/**
* This is the base class for all RenameDlg plugins.
@@ -37,15 +37,15 @@ public:
/**
* This is the c'tor.
*/
- RenameDlgPlugin(QDialog *dialog, const char *name, const QStringList &/*list*/ = QStringList() ): QWidget(dialog, name ) {};
+ RenameDlgPlugin(TQDialog *dialog, const char *name, const TQStringList &/*list*/ = TQStringList() ): TQWidget(dialog, name ) {};
/**
* This function will be called by RenameDlg. The params are infos about the files.
* @return If the plugin want's to display it return true, if not return false
*/
- virtual bool initialize(KIO::RenameDlg_Mode /*mod*/ , const QString &/*_src*/, const QString &/*_dest*/,
- const QString &/*mimeSrc*/,
- const QString &/*mimeDest*/,
+ virtual bool initialize(KIO::RenameDlg_Mode /*mod*/ , const TQString &/*_src*/, const TQString &/*_dest*/,
+ const TQString &/*mimeSrc*/,
+ const TQString &/*mimeDest*/,
KIO::filesize_t /*sizeSrc*/,
KIO::filesize_t /*sizeDest*/,
time_t /*ctimeSrc*/,
diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index 49b710df6..8ab080486 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -22,8 +22,8 @@
#include "kio/scheduler.h"
#include "kio/authinfo.h"
#include "kio/slave.h"
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <dcopclient.h>
@@ -42,11 +42,11 @@
using namespace KIO;
-template class QDict<KIO::Scheduler::ProtocolInfo>;
+template class TQDict<KIO::Scheduler::ProtocolInfo>;
Scheduler *Scheduler::instance = 0;
-class KIO::SlaveList: public QPtrList<Slave>
+class KIO::SlaveList: public TQPtrList<Slave>
{
public:
SlaveList() { }
@@ -73,12 +73,12 @@ public:
JobData() : checkOnHold(false) { }
public:
- QString protocol;
- QString proxy;
+ TQString protocol;
+ TQString proxy;
bool checkOnHold;
};
-class KIO::Scheduler::ExtraJobData: public QPtrDict<KIO::Scheduler::JobData>
+class KIO::Scheduler::ExtraJobData: public TQPtrDict<KIO::Scheduler::JobData>
{
public:
ExtraJobData() { setAutoDelete(true); }
@@ -92,23 +92,23 @@ public:
joblist.setAutoDelete(false);
}
- QPtrList<SimpleJob> joblist;
+ TQPtrList<SimpleJob> joblist;
SlaveList activeSlaves;
int maxSlaves;
int skipCount;
- QString protocol;
+ TQString protocol;
};
-class KIO::Scheduler::ProtocolInfoDict : public QDict<KIO::Scheduler::ProtocolInfo>
+class KIO::Scheduler::ProtocolInfoDict : public TQDict<KIO::Scheduler::ProtocolInfo>
{
public:
ProtocolInfoDict() { }
- KIO::Scheduler::ProtocolInfo *get( const QString &protocol);
+ KIO::Scheduler::ProtocolInfo *get( const TQString &protocol);
};
KIO::Scheduler::ProtocolInfo *
-KIO::Scheduler::ProtocolInfoDict::get(const QString &protocol)
+KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol)
{
ProtocolInfo *info = find(protocol);
if (!info)
@@ -125,7 +125,7 @@ KIO::Scheduler::ProtocolInfoDict::get(const QString &protocol)
Scheduler::Scheduler()
: DCOPObject( "KIO::Scheduler" ),
- QObject(kapp, "scheduler"),
+ TQObject(kapp, "scheduler"),
slaveTimer(0, "Scheduler::slaveTimer"),
coSlaveTimer(0, "Scheduler::coSlaveTimer"),
cleanupTimer(0, "Scheduler::cleanupTimer")
@@ -139,9 +139,9 @@ Scheduler::Scheduler()
extraJobData = new ExtraJobData;
sessionData = new SessionData;
slaveConfig = SlaveConfig::self();
- connect(&slaveTimer, SIGNAL(timeout()), SLOT(startStep()));
- connect(&coSlaveTimer, SIGNAL(timeout()), SLOT(slotScheduleCoSlave()));
- connect(&cleanupTimer, SIGNAL(timeout()), SLOT(slotCleanIdleSlaves()));
+ connect(&slaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startStep()));
+ connect(&coSlaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotScheduleCoSlave()));
+ connect(&cleanupTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCleanIdleSlaves()));
busy = false;
}
@@ -163,15 +163,15 @@ Scheduler::debug_info()
{
}
-bool Scheduler::process(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData )
+bool Scheduler::process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData )
{
- if ( fun != "reparseSlaveConfiguration(QString)" )
+ if ( fun != "reparseSlaveConfiguration(TQString)" )
return DCOPObject::process( fun, data, replyType, replyData );
slaveConfig = SlaveConfig::self();
replyType = "void";
- QDataStream stream( data, IO_ReadOnly );
- QString proto;
+ TQDataStream stream( data, IO_ReadOnly );
+ TQString proto;
stream >> proto;
kdDebug( 7006 ) << "reparseConfiguration( " << proto << " )" << endl;
@@ -193,7 +193,7 @@ bool Scheduler::process(const QCString &fun, const QByteArray &data, QCString &r
QCStringList Scheduler::functions()
{
QCStringList funcs = DCOPObject::functions();
- funcs << "void reparseSlaveConfiguration(QString)";
+ funcs << "void reparseSlaveConfiguration(TQString)";
return funcs;
}
@@ -211,7 +211,7 @@ void Scheduler::_doJob(SimpleJob *job) {
slaveTimer.start(0, true);
#ifndef NDEBUG
if (newJobs.count() > 150)
- kdDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a QObject)." << endl;
+ kdDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a TQObject)." << endl;
#endif
}
@@ -223,7 +223,7 @@ void Scheduler::_scheduleJob(SimpleJob *job) {
kdFatal(7006) << "BUG! _ScheduleJob(): No extraJobData for job!" << endl;
return;
}
- QString protocol = jobData->protocol;
+ TQString protocol = jobData->protocol;
// kdDebug(7006) << "Scheduler::_scheduleJob protocol=" << protocol << endl;
ProtocolInfo *protInfo = protInfoDict->get(protocol);
protInfo->joblist.append(job);
@@ -272,7 +272,7 @@ void Scheduler::startStep()
{
(void) startJobDirect();
}
- QDictIterator<KIO::Scheduler::ProtocolInfo> it(*protInfoDict);
+ TQDictIterator<KIO::Scheduler::ProtocolInfo> it(*protInfoDict);
while(it.current())
{
if (startJobScheduled(it.current())) return;
@@ -280,12 +280,12 @@ void Scheduler::startStep()
}
}
-void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &protocol, const QString &proxy , bool newSlave, const KIO::MetaData *config)
+void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config)
{
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
- QString user = url.user();
- QString passwd = url.pass();
+ TQString user = url.user();
+ TQString passwd = url.pass();
if ((newSlave) ||
(slave->host() != host) ||
@@ -300,7 +300,7 @@ void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &pr
configData["UseProxy"] = proxy;
- QString autoLogin = configData["EnableAutoLogin"].lower();
+ TQString autoLogin = configData["EnableAutoLogin"].lower();
if ( autoLogin == "true" )
{
NetRC::AutoLogin l;
@@ -312,8 +312,8 @@ void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &pr
configData["autoLoginPass"] = l.password;
if ( usern )
{
- QString macdef;
- QMap<QString, QStringList>::ConstIterator it = l.macdef.begin();
+ TQString macdef;
+ TQMap<TQString, TQStringList>::ConstIterator it = l.macdef.begin();
for ( ; it != l.macdef.end(); ++it )
macdef += it.key() + '\\' + it.data().join( "\\" ) + '\n';
configData["autoLoginMacro"] = macdef;
@@ -421,7 +421,7 @@ bool Scheduler::startJobDirect()
<< endl;
return false;
}
- QString protocol = jobData->protocol;
+ TQString protocol = jobData->protocol;
ProtocolInfo *protInfo = protInfoDict->get(protocol);
bool newSlave = false;
@@ -447,11 +447,11 @@ bool Scheduler::startJobDirect()
return true;
}
-static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const QString &protocol, bool &exact)
+static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQString &protocol, bool &exact)
{
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
- QString user = url.user();
+ TQString user = url.user();
exact = true;
for( Slave *slave = idleSlaves->first();
@@ -504,7 +504,7 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
if ( bCanReuse )
{
KIO::MetaData outgoing = tJob->outgoingMetaData();
- QString resume = (!outgoing.contains("resume")) ? QString::null : outgoing["resume"];
+ TQString resume = (!outgoing.contains("resume")) ? TQString::null : outgoing["resume"];
kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl;
bCanReuse = (resume.isEmpty() || resume == "0");
}
@@ -535,21 +535,21 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url)
{
int error;
- QString errortext;
+ TQString errortext;
Slave *slave = Slave::createSlave(protInfo->protocol, url, error, errortext);
if (slave)
{
slaveList->append(slave);
idleSlaves->append(slave);
- connect(slave, SIGNAL(slaveDied(KIO::Slave *)),
- SLOT(slotSlaveDied(KIO::Slave *)));
- connect(slave, SIGNAL(slaveStatus(pid_t,const QCString &,const QString &, bool)),
- SLOT(slotSlaveStatus(pid_t,const QCString &, const QString &, bool)));
-
- connect(slave,SIGNAL(authorizationKey(const QCString&, const QCString&, bool)),
- sessionData,SLOT(slotAuthData(const QCString&, const QCString&, bool)));
- connect(slave,SIGNAL(delAuthorization(const QCString&)), sessionData,
- SLOT(slotDelAuthData(const QCString&)));
+ connect(slave, TQT_SIGNAL(slaveDied(KIO::Slave *)),
+ TQT_SLOT(slotSlaveDied(KIO::Slave *)));
+ connect(slave, TQT_SIGNAL(slaveStatus(pid_t,const TQCString &,const TQString &, bool)),
+ TQT_SLOT(slotSlaveStatus(pid_t,const TQCString &, const TQString &, bool)));
+
+ connect(slave,TQT_SIGNAL(authorizationKey(const TQCString&, const TQCString&, bool)),
+ sessionData,TQT_SLOT(slotAuthData(const TQCString&, const TQCString&, bool)));
+ connect(slave,TQT_SIGNAL(delAuthorization(const TQCString&)), sessionData,
+ TQT_SLOT(slotDelAuthData(const TQCString&)));
}
else
{
@@ -564,7 +564,7 @@ Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL
return slave;
}
-void Scheduler::slotSlaveStatus(pid_t, const QCString &, const QString &, bool)
+void Scheduler::slotSlaveStatus(pid_t, const TQCString &, const TQString &, bool)
{
}
@@ -697,8 +697,8 @@ void Scheduler::_removeSlaveOnHold()
Slave *
Scheduler::_getConnectedSlave(const KURL &url, const KIO::MetaData &config )
{
- QString proxy;
- QString protocol = KProtocolManager::slaveProtocol(url, proxy);
+ TQString proxy;
+ TQString protocol = KProtocolManager::slaveProtocol(url, proxy);
bool dummy;
Slave *slave = searchIdleList(idleSlaves, url, protocol, dummy);
if (!slave)
@@ -713,12 +713,12 @@ Scheduler::_getConnectedSlave(const KURL &url, const KIO::MetaData &config )
setupSlave(slave, url, protocol, proxy, true, &config);
slave->send( CMD_CONNECT );
- connect(slave, SIGNAL(connected()),
- SLOT(slotSlaveConnected()));
- connect(slave, SIGNAL(error(int, const QString &)),
- SLOT(slotSlaveError(int, const QString &)));
+ connect(slave, TQT_SIGNAL(connected()),
+ TQT_SLOT(slotSlaveConnected()));
+ connect(slave, TQT_SIGNAL(error(int, const TQString &)),
+ TQT_SLOT(slotSlaveError(int, const TQString &)));
- coSlaves.insert(slave, new QPtrList<SimpleJob>());
+ coSlaves.insert(slave, new TQPtrList<SimpleJob>());
// kdDebug(7006) << "_getConnectedSlave( " << slave << ")" << endl;
return slave;
}
@@ -744,13 +744,13 @@ Scheduler::slotScheduleCoSlave()
assert(!coIdleSlaves->contains(slave));
KURL url =job->url();
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
if (slave->host() == "<reset>")
{
- QString user = url.user();
- QString passwd = url.pass();
+ TQString user = url.user();
+ TQString passwd = url.pass();
MetaData configData = slaveConfig->configData(url.protocol(), url.host());
slave->setConfig(configData);
@@ -772,8 +772,8 @@ Scheduler::slotSlaveConnected()
Slave *slave = (Slave *)sender();
// kdDebug(7006) << "slotSlaveConnected( " << slave << ")" << endl;
slave->setConnected(true);
- disconnect(slave, SIGNAL(connected()),
- this, SLOT(slotSlaveConnected()));
+ disconnect(slave, TQT_SIGNAL(connected()),
+ this, TQT_SLOT(slotSlaveConnected()));
emit slaveConnected(slave);
assert(!coIdleSlaves->contains(slave));
coIdleSlaves->append(slave);
@@ -781,7 +781,7 @@ Scheduler::slotSlaveConnected()
}
void
-Scheduler::slotSlaveError(int errorNr, const QString &errorMsg)
+Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg)
{
Slave *slave = (Slave *)sender();
if (!slave->isConnected() || (coIdleSlaves->find(slave) != -1))
@@ -795,7 +795,7 @@ bool
Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job)
{
// kdDebug(7006) << "_assignJobToSlave( " << job << ", " << slave << ")" << endl;
- QString dummy;
+ TQString dummy;
if ((slave->slaveProtocol() != KProtocolManager::slaveProtocol( job->url(), dummy ))
||
(!newJobs.removeRef(job)))
@@ -838,10 +838,10 @@ Scheduler::_disconnectSlave(KIO::Slave *slave)
delete list;
coIdleSlaves->removeRef(slave);
assert(!coIdleSlaves->contains(slave));
- disconnect(slave, SIGNAL(connected()),
- this, SLOT(slotSlaveConnected()));
- disconnect(slave, SIGNAL(error(int, const QString &)),
- this, SLOT(slotSlaveError(int, const QString &)));
+ disconnect(slave, TQT_SIGNAL(connected()),
+ this, TQT_SLOT(slotSlaveConnected()));
+ disconnect(slave, TQT_SIGNAL(error(int, const TQString &)),
+ this, TQT_SLOT(slotSlaveError(int, const TQString &)));
if (slave->isAlive())
{
idleSlaves->append(slave);
@@ -860,23 +860,23 @@ Scheduler::_checkSlaveOnHold(bool b)
}
void
-Scheduler::_registerWindow(QWidget *wid)
+Scheduler::_registerWindow(TQWidget *wid)
{
if (!wid)
return;
- QObject *obj = static_cast<QObject *>(wid);
+ TQObject *obj = static_cast<TQObject *>(wid);
if (!m_windowList.contains(obj))
{
// We must store the window Id because by the time
// the destroyed signal is emitted we can no longer
- // access QWidget::winId() (already destructed)
+ // access TQWidget::winId() (already destructed)
WId windowId = wid->winId();
m_windowList.insert(obj, windowId);
- connect(wid, SIGNAL(destroyed(QObject *)),
- this, SLOT(slotUnregisterWindow(QObject*)));
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ connect(wid, TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotUnregisterWindow(TQObject*)));
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << windowId;
if( !kapp->dcopClient()->send( "kded", "kded",
"registerWindowId(long int)", params ) )
@@ -885,22 +885,22 @@ Scheduler::_registerWindow(QWidget *wid)
}
void
-Scheduler::slotUnregisterWindow(QObject *obj)
+Scheduler::slotUnregisterWindow(TQObject *obj)
{
if (!obj)
return;
- QMap<QObject *, WId>::Iterator it = m_windowList.find(obj);
+ TQMap<TQObject *, WId>::Iterator it = m_windowList.find(obj);
if (it == m_windowList.end())
return;
WId windowId = it.data();
- disconnect( it.key(), SIGNAL(destroyed(QObject *)),
- this, SLOT(slotUnregisterWindow(QObject*)));
+ disconnect( it.key(), TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotUnregisterWindow(TQObject*)));
m_windowList.remove( it );
if (kapp)
{
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << windowId;
kapp->dcopClient()->send( "kded", "kded",
"unregisterWindowId(long int)", params );
diff --git a/kio/kio/scheduler.h b/kio/kio/scheduler.h
index 071dcb7d4..4a4f104ba 100644
--- a/kio/kio/scheduler.h
+++ b/kio/kio/scheduler.h
@@ -24,9 +24,9 @@
#include "kio/job.h"
#include "kio/jobclasses.h"
-#include <qtimer.h>
-#include <qptrdict.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqptrdict.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -108,11 +108,11 @@ namespace KIO {
* @see KIO::Job
**/
- class KIO_EXPORT Scheduler : public QObject, virtual public DCOPObject {
+ class KIO_EXPORT Scheduler : public TQObject, virtual public DCOPObject {
Q_OBJECT
public:
- typedef QPtrList<SimpleJob> JobList;
+ typedef TQPtrList<SimpleJob> JobList;
// InfoDict needs Info, so we can't declare it private
class ProtocolInfo;
@@ -236,18 +236,18 @@ namespace KIO {
* the that was started.
* Register the mainwindow @p wid with the KIO subsystem
* Do not call this, it is called automatically from
- * void KIO::Job::setWindow(QWidget*).
+ * void KIO::Job::setWindow(TQWidget*).
* @param wid the window to register
* @since 3.1
*/
- static void registerWindow(QWidget *wid)
+ static void registerWindow(TQWidget *wid)
{ self()->_registerWindow(wid); }
/**
* @internal
* Unregisters the window registered by registerWindow().
*/
- static void unregisterWindow(QObject *wid)
+ static void unregisterWindow(TQObject *wid)
{ self()->slotUnregisterWindow(wid); }
/**
@@ -256,21 +256,21 @@ namespace KIO {
* @see slaveConnected()
* @see slaveError()
*/
- static bool connect( const char *signal, const QObject *receiver,
+ static bool connect( const char *signal, const TQObject *receiver,
const char *member)
- { return QObject::connect(self(), signal, receiver, member); }
+ { return TQObject::connect(self(), signal, receiver, member); }
- static bool connect( const QObject* sender, const char* signal,
- const QObject* receiver, const char* member )
- { return QObject::connect(sender, signal, receiver, member); }
+ static bool connect( const TQObject* sender, const char* signal,
+ const TQObject* receiver, const char* member )
+ { return TQObject::connect(sender, signal, receiver, member); }
- static bool disconnect( const QObject* sender, const char* signal,
- const QObject* receiver, const char* member )
- { return QObject::disconnect(sender, signal, receiver, member); }
+ static bool disconnect( const TQObject* sender, const char* signal,
+ const TQObject* receiver, const char* member )
+ { return TQObject::disconnect(sender, signal, receiver, member); }
- bool connect( const QObject *sender, const char *signal,
+ bool connect( const TQObject *sender, const char *signal,
const char *member )
- { return QObject::connect(sender, signal, member); }
+ { return TQObject::connect(sender, signal, member); }
/**
* When true, the next job will check whether KLauncher has a slave
@@ -281,21 +281,21 @@ namespace KIO {
void debug_info();
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
virtual QCStringList functions();
public slots:
void slotSlaveDied(KIO::Slave *slave);
- void slotSlaveStatus(pid_t pid, const QCString &protocol,
- const QString &host, bool connected);
+ void slotSlaveStatus(pid_t pid, const TQCString &protocol,
+ const TQString &host, bool connected);
signals:
void slaveConnected(KIO::Slave *slave);
- void slaveError(KIO::Slave *slave, int error, const QString &errorMsg);
+ void slaveError(KIO::Slave *slave, int error, const TQString &errorMsg);
protected:
- void setupSlave(KIO::Slave *slave, const KURL &url, const QString &protocol, const QString &proxy , bool newSlave, const KIO::MetaData *config=0);
+ void setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config=0);
bool startJobScheduled(ProtocolInfo *protInfo);
bool startJobDirect();
Scheduler();
@@ -304,10 +304,10 @@ namespace KIO {
void startStep();
void slotCleanIdleSlaves();
void slotSlaveConnected();
- void slotSlaveError(int error, const QString &errorMsg);
+ void slotSlaveError(int error, const TQString &errorMsg);
void slotScheduleCoSlave();
/// @since 3.1
- void slotUnregisterWindow(QObject *);
+ void slotUnregisterWindow(TQObject *);
private:
class ProtocolInfoDict;
@@ -328,15 +328,15 @@ namespace KIO {
bool _disconnectSlave(KIO::Slave *slave);
void _checkSlaveOnHold(bool b);
void _publishSlaveOnHold();
- void _registerWindow(QWidget *wid);
+ void _registerWindow(TQWidget *wid);
Slave *findIdleSlave(ProtocolInfo *protInfo, SimpleJob *job, bool &exact);
Slave *createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url);
- QTimer slaveTimer;
- QTimer coSlaveTimer;
- QTimer cleanupTimer;
+ TQTimer slaveTimer;
+ TQTimer coSlaveTimer;
+ TQTimer cleanupTimer;
bool busy;
SlaveList *slaveList;
@@ -348,12 +348,12 @@ namespace KIO {
KURL urlOnHold;
JobList newJobs;
- QPtrDict<JobList> coSlaves;
+ TQPtrDict<JobList> coSlaves;
ExtraJobData *extraJobData;
SlaveConfig *slaveConfig;
SessionData *sessionData;
bool checkOnHold;
- QMap<QObject *,WId> m_windowList;
+ TQMap<TQObject *,WId> m_windowList;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp
index 8148584c5..258f03e2a 100644
--- a/kio/kio/sessiondata.cpp
+++ b/kio/kio/sessiondata.cpp
@@ -18,8 +18,8 @@
Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
-#include <qtextcodec.h>
+#include <tqptrlist.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -46,34 +46,34 @@ struct SessionData::AuthData
public:
AuthData() {}
- AuthData(const QCString& k, const QCString& g, bool p) {
+ AuthData(const TQCString& k, const TQCString& g, bool p) {
key = k;
group = g;
persist = p;
}
- bool isKeyMatch( const QCString& val ) const {
+ bool isKeyMatch( const TQCString& val ) const {
return (val==key);
}
- bool isGroupMatch( const QCString& val ) const {
+ bool isGroupMatch( const TQCString& val ) const {
return (val==group);
}
- QCString key;
- QCString group;
+ TQCString key;
+ TQCString group;
bool persist;
};
/************************* SessionData::AuthDataList ****************************/
-class SessionData::AuthDataList : public QPtrList<SessionData::AuthData>
+class SessionData::AuthDataList : public TQPtrList<SessionData::AuthData>
{
public:
AuthDataList();
~AuthDataList();
void addData( SessionData::AuthData* );
- void removeData( const QCString& );
+ void removeData( const TQCString& );
bool pingCacheDaemon();
void registerAuthData( SessionData::AuthData* );
@@ -105,7 +105,7 @@ SessionData::AuthDataList::~AuthDataList()
void SessionData::AuthDataList::addData( SessionData::AuthData* d )
{
- QPtrListIterator<SessionData::AuthData> it ( *this );
+ TQPtrListIterator<SessionData::AuthData> it ( *this );
for ( ; it.current(); ++it )
{
if ( it.current()->isKeyMatch( d->key ) )
@@ -115,9 +115,9 @@ void SessionData::AuthDataList::addData( SessionData::AuthData* d )
append( d );
}
-void SessionData::AuthDataList::removeData( const QCString& gkey )
+void SessionData::AuthDataList::removeData( const TQCString& gkey )
{
- QPtrListIterator<SessionData::AuthData> it( *this );
+ TQPtrListIterator<SessionData::AuthData> it( *this );
for( ; it.current(); ++it )
{
if ( it.current()->isGroupMatch(gkey) && pingCacheDaemon() )
@@ -153,11 +153,11 @@ void SessionData::AuthDataList::registerAuthData( SessionData::AuthData* d )
#ifdef Q_OS_UNIX
bool ok;
- QCString ref_key = d->key + "-refcount";
+ TQCString ref_key = d->key + "-refcount";
int count = m_kdesuClient->getVar(ref_key).toInt( &ok );
if( ok )
{
- QCString val;
+ TQCString val;
val.setNum( count+1 );
m_kdesuClient->setVar( ref_key, val, 0, d->group );
}
@@ -173,7 +173,7 @@ void SessionData::AuthDataList::unregisterAuthData( SessionData::AuthData* d )
bool ok;
int count;
- QCString ref_key = d->key + "-refcount";
+ TQCString ref_key = d->key + "-refcount";
#ifdef Q_OS_UNIX
count = m_kdesuClient->getVar( ref_key ).toInt( &ok );
@@ -181,7 +181,7 @@ void SessionData::AuthDataList::unregisterAuthData( SessionData::AuthData* d )
{
if ( count > 1 )
{
- QCString val;
+ TQCString val;
val.setNum(count-1);
m_kdesuClient->setVar( ref_key, val, 0, d->group );
}
@@ -197,7 +197,7 @@ void SessionData::AuthDataList::purgeCachedData()
{
if ( !isEmpty() && pingCacheDaemon() )
{
- QPtrListIterator<SessionData::AuthData> it( *this );
+ TQPtrListIterator<SessionData::AuthData> it( *this );
for ( ; it.current(); ++it )
unregisterAuthData( it.current() );
}
@@ -215,8 +215,8 @@ public:
bool initDone;
bool useCookie;
- QString charsets;
- QString language;
+ TQString charsets;
+ TQString language;
};
SessionData::SessionData()
@@ -233,8 +233,8 @@ SessionData::~SessionData()
authData = 0L;
}
-void SessionData::configDataFor( MetaData &configData, const QString &proto,
- const QString & )
+void SessionData::configDataFor( MetaData &configData, const TQString &proto,
+ const TQString & )
{
if ( (proto.find("http", 0, false) == 0 ) ||
(proto.find("webdav", 0, false) == 0) )
@@ -269,11 +269,11 @@ void SessionData::reset()
d->useCookie = cfg->readBoolEntry( "Cookies", true );
delete cfg;
- static const QString & english = KGlobal::staticQString( "en" );
+ static const TQString & english = KGlobal::staticQString( "en" );
// Get language settings...
- QStringList languageList = KGlobal::locale()->languagesTwoAlpha();
- QStringList::Iterator it = languageList.find( QString::fromLatin1("C") );
+ TQStringList languageList = KGlobal::locale()->languagesTwoAlpha();
+ TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if ( it != languageList.end() )
{
if ( languageList.contains( english ) > 0 )
@@ -286,11 +286,11 @@ void SessionData::reset()
d->language = languageList.join( ", " );
- d->charsets = QString::fromLatin1(QTextCodec::codecForLocale()->mimeName()).lower();
+ d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
KProtocolManager::reparseConfiguration();
}
-void SessionData::slotAuthData( const QCString& key, const QCString& gkey,
+void SessionData::slotAuthData( const TQCString& key, const TQCString& gkey,
bool keep )
{
if (!authData)
@@ -298,7 +298,7 @@ void SessionData::slotAuthData( const QCString& key, const QCString& gkey,
authData->addData( new SessionData::AuthData(key, gkey, keep) );
}
-void SessionData::slotDelAuthData( const QCString& gkey )
+void SessionData::slotDelAuthData( const TQCString& gkey )
{
if (!authData)
return;
diff --git a/kio/kio/sessiondata.h b/kio/kio/sessiondata.h
index 3b7838e13..408045260 100644
--- a/kio/kio/sessiondata.h
+++ b/kio/kio/sessiondata.h
@@ -21,7 +21,7 @@
#ifndef __KIO_SESSIONDATA_H
#define __KIO_SESSIONDATA_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/global.h>
namespace KIO {
@@ -40,15 +40,15 @@ public:
SessionData();
~SessionData();
- virtual void configDataFor( KIO::MetaData &configData, const QString &proto,
- const QString &host );
+ virtual void configDataFor( KIO::MetaData &configData, const TQString &proto,
+ const TQString &host );
virtual void reset();
/// @since 3.1
struct AuthData;
public slots:
- void slotAuthData( const QCString&, const QCString&, bool );
- void slotDelAuthData( const QCString& );
+ void slotAuthData( const TQCString&, const TQCString&, bool );
+ void slotDelAuthData( const TQCString& );
private:
class AuthDataList;
diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp
index 28cbde6eb..f014b10d9 100644
--- a/kio/kio/skipdlg.cpp
+++ b/kio/kio/skipdlg.cpp
@@ -21,10 +21,10 @@
#include <stdio.h>
#include <assert.h>
-#include <qmessagebox.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqmessagebox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
using namespace KIO;
-SkipDlg::SkipDlg(QWidget *parent, bool _multi, const QString& _error_text, bool _modal ) :
+SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal ) :
KDialog ( parent, "" , _modal )
{
// TODO : port to KDialogBase
@@ -56,28 +56,28 @@ SkipDlg::SkipDlg(QWidget *parent, bool _multi, const QString& _error_text, bool
setCaption( i18n( "Information" ) );
b0 = new KPushButton( KStdGuiItem::cancel(), this );
- connect(b0, SIGNAL(clicked()), this, SLOT(b0Pressed()));
+ connect(b0, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed()));
if ( _multi )
{
- b1 = new QPushButton( i18n( "Skip" ), this );
- connect(b1, SIGNAL(clicked()), this, SLOT(b1Pressed()));
+ b1 = new TQPushButton( i18n( "Skip" ), this );
+ connect(b1, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed()));
- b2 = new QPushButton( i18n( "Auto Skip" ), this );
- connect(b2, SIGNAL(clicked()), this, SLOT(b2Pressed()));
+ b2 = new TQPushButton( i18n( "Auto Skip" ), this );
+ connect(b2, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed()));
}
- QVBoxLayout *vlayout = new QVBoxLayout( this, 10, 0 );
+ TQVBoxLayout *vlayout = new TQVBoxLayout( this, 10, 0 );
// vlayout->addStrut( 360 ); makes dlg at least that wide
- QLabel * lb = new QLabel( _error_text, this );
+ TQLabel * lb = new TQLabel( _error_text, this );
lb->setFixedHeight( lb->sizeHint().height() );
lb->setMinimumWidth( lb->sizeHint().width() );
vlayout->addWidget( lb );
vlayout->addSpacing( 10 );
- QHBoxLayout* layout = new QHBoxLayout();
+ TQHBoxLayout* layout = new TQHBoxLayout();
vlayout->addLayout( layout );
if ( b0 )
{
@@ -132,7 +132,7 @@ void SkipDlg::b2Pressed()
emit result( this, 2 );
}
-SkipDlg_Result KIO::open_SkipDlg( bool _multi, const QString& _error_text )
+SkipDlg_Result KIO::open_SkipDlg( bool _multi, const TQString& _error_text )
{
Q_ASSERT(kapp);
diff --git a/kio/kio/skipdlg.h b/kio/kio/skipdlg.h
index 1f6a7b8ab..fcb03fdae 100644
--- a/kio/kio/skipdlg.h
+++ b/kio/kio/skipdlg.h
@@ -29,7 +29,7 @@ namespace KIO {
enum SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 };
- KIO_EXPORT SkipDlg_Result open_SkipDlg( bool _multi, const QString& _error_text = QString::null );
+ KIO_EXPORT SkipDlg_Result open_SkipDlg( bool _multi, const TQString& _error_text = TQString::null );
/**
* @internal
@@ -38,13 +38,13 @@ class KIO_EXPORT SkipDlg : public KDialog
{
Q_OBJECT
public:
- SkipDlg( QWidget *parent, bool _multi, const QString& _error_text, bool _modal = false );
+ SkipDlg( TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal = false );
~SkipDlg();
protected:
- QPushButton *b0;
- QPushButton *b1;
- QPushButton *b2;
+ TQPushButton *b0;
+ TQPushButton *b1;
+ TQPushButton *b2;
bool modal;
diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp
index a512e2ba7..c1a701711 100644
--- a/kio/kio/slave.cpp
+++ b/kio/kio/slave.cpp
@@ -30,8 +30,8 @@
#include <signal.h>
#include <sys/types.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kdebug.h>
@@ -94,16 +94,16 @@ void Slave::accept(KSocket *socket)
#endif
delete serv;
serv = 0;
- slaveconn.connect(this, SLOT(gotInput()));
+ slaveconn.connect(this, TQT_SLOT(gotInput()));
unlinkSocket();
}
void Slave::unlinkSocket()
{
if (m_socket.isEmpty()) return;
- QCString filename = QFile::encodeName(m_socket);
+ TQCString filename = TQFile::encodeName(m_socket);
unlink(filename.data());
- m_socket = QString::null;
+ m_socket = TQString::null;
}
void Slave::timeout()
@@ -116,7 +116,7 @@ void Slave::timeout()
kdDebug(7002) << "slave is slow... pid=" << m_pid << " t=" << delta_t << endl;
if (delta_t < SLAVE_CONNECTION_TIMEOUT_MAX)
{
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, this, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, this, TQT_SLOT(timeout()));
return;
}
}
@@ -125,7 +125,7 @@ void Slave::timeout()
serv = 0;
unlinkSocket();
dead = true;
- QString arg = m_protocol;
+ TQString arg = m_protocol;
if (!m_host.isEmpty())
arg += "://"+m_host;
kdDebug(7002) << "slave died pid = " << m_pid << endl;
@@ -138,7 +138,7 @@ void Slave::timeout()
deref();
}
-Slave::Slave(KServerSocket *socket, const QString &protocol, const QString &socketname)
+Slave::Slave(KServerSocket *socket, const TQString &protocol, const TQString &socketname)
: SlaveInterface(&slaveconn), serv(socket), contacted(false),
d(new SlavePrivate(false))
{
@@ -152,13 +152,13 @@ Slave::Slave(KServerSocket *socket, const QString &protocol, const QString &sock
m_pid = 0;
m_port = 0;
#ifndef Q_WS_WIN
- connect(serv, SIGNAL(accepted( KSocket* )),
- SLOT(accept(KSocket*) ) );
+ connect(serv, TQT_SIGNAL(accepted( KSocket* )),
+ TQT_SLOT(accept(KSocket*) ) );
#endif
}
-Slave::Slave(bool /*derived*/, KServerSocket *socket, const QString &protocol,
- const QString &socketname)
+Slave::Slave(bool /*derived*/, KServerSocket *socket, const TQString &protocol,
+ const TQString &socketname)
: SlaveInterface(&slaveconn), serv(socket), contacted(false),
d(new SlavePrivate(true))
{
@@ -174,8 +174,8 @@ Slave::Slave(bool /*derived*/, KServerSocket *socket, const QString &protocol,
m_port = 0;
if (serv != 0) {
#ifndef Q_WS_WIN
- connect(serv, SIGNAL(accepted( KSocket* )),
- SLOT(accept(KSocket*) ) );
+ connect(serv, TQT_SIGNAL(accepted( KSocket* )),
+ TQT_SLOT(accept(KSocket*) ) );
#endif
}
}
@@ -193,7 +193,7 @@ Slave::~Slave()
d = 0;
}
-void Slave::setProtocol(const QString & protocol)
+void Slave::setProtocol(const TQString & protocol)
{
m_protocol = protocol;
}
@@ -224,8 +224,8 @@ void Slave::hold(const KURL &url)
ref();
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << url;
slaveconn.send( CMD_SLAVE_HOLD, data );
slaveconn.close();
@@ -239,13 +239,13 @@ void Slave::hold(const KURL &url)
if (!client->isAttached())
client->attach();
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
pid_t pid = m_pid;
stream << pid;
- QCString launcher = KApplication::launcher();
+ TQCString launcher = KApplication::launcher();
client->call(launcher, launcher, "waitForSlave(pid_t)",
params, replyType, reply);
}
@@ -282,7 +282,7 @@ bool Slave::suspended()
return slaveconn.suspended();
}
-void Slave::send(int cmd, const QByteArray &arr) {
+void Slave::send(int cmd, const TQByteArray &arr) {
if (d->derived) { // TODO: clean up before KDE 4
SendParams params;
params.cmd = cmd;
@@ -301,7 +301,7 @@ void Slave::gotInput()
{
slaveconn.close();
dead = true;
- QString arg = m_protocol;
+ TQString arg = m_protocol;
if (!m_host.isEmpty())
arg += "://"+m_host;
kdDebug(7002) << "slave died pid = " << m_pid << endl;
@@ -325,16 +325,16 @@ void Slave::kill()
}
}
-void Slave::setHost( const QString &host, int port,
- const QString &user, const QString &passwd)
+void Slave::setHost( const TQString &host, int port,
+ const TQString &user, const TQString &passwd)
{
m_host = host;
m_port = port;
m_user = user;
m_passwd = passwd;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << m_host << m_port << m_user << m_passwd;
slaveconn.send( CMD_HOST, data );
}
@@ -346,13 +346,13 @@ void Slave::resetHost()
void Slave::setConfig(const MetaData &config)
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << config;
slaveconn.send( CMD_CONFIG, data );
}
-Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error, QString& error_text )
+Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text )
{
//kdDebug(7002) << "createSlave '" << protocol << "' for " << url.prettyURL() << endl;
// Firstly take into account all special slaves
@@ -363,8 +363,8 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
if (!client->isAttached())
client->attach();
- QString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
+ KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
{
error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno));
@@ -377,7 +377,7 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
@@ -391,11 +391,11 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
// In such case we start the slave via KProcess.
// It's possible to force this by setting the env. variable
// KDE_FORK_SLAVES, Clearcase seems to require this.
- static bool bForkSlaves = !QCString(getenv("KDE_FORK_SLAVES")).isEmpty();
+ static bool bForkSlaves = !TQCString(getenv("KDE_FORK_SLAVES")).isEmpty();
if (bForkSlaves || !client->isAttached() || client->isAttachedToForeignServer())
{
- QString _name = KProtocolInfo::exec(protocol);
+ TQString _name = KProtocolInfo::exec(protocol);
if (_name.isEmpty())
{
error_text = i18n("Unknown protocol '%1'.").arg(protocol);
@@ -403,7 +403,7 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
delete slave;
return 0;
}
- QString lib_path = KLibLoader::findLibrary(_name.latin1());
+ TQString lib_path = KLibLoader::findLibrary(_name.latin1());
if (lib_path.isEmpty())
{
error_text = i18n("Can not find io-slave for protocol '%1'.").arg(protocol);
@@ -414,33 +414,33 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
KProcess proc;
proc << locate("exe", "kioslave") << lib_path << protocol << "" << socketfile.name();
- kdDebug(7002) << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString::null << ", " << socketfile.name() << endl;
+ kdDebug(7002) << "kioslave" << ", " << lib_path << ", " << protocol << ", " << TQString::null << ", " << socketfile.name() << endl;
proc.start(KProcess::DontCare);
#ifndef Q_WS_WIN
slave->setPID(proc.pid());
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
stream << protocol << url.host() << socketfile.name();
- QCString launcher = KApplication::launcher();
- if (!client->call(launcher, launcher, "requestSlave(QString,QString,QString)",
+ TQCString launcher = KApplication::launcher();
+ if (!client->call(launcher, launcher, "requestSlave(TQString,TQString,TQString)",
params, replyType, reply)) {
error_text = i18n("Cannot talk to klauncher");
error = KIO::ERR_SLAVE_DEFINED;
delete slave;
return 0;
}
- QDataStream stream2(reply, IO_ReadOnly);
- QString errorStr;
+ TQDataStream stream2(reply, IO_ReadOnly);
+ TQString errorStr;
pid_t pid;
stream2 >> pid >> errorStr;
if (!pid)
@@ -452,12 +452,12 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
}
#ifndef Q_WS_WIN
slave->setPID(pid);
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
-Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
+Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
{
//kdDebug(7002) << "holdSlave '" << protocol << "' for " << url.prettyURL() << endl;
// Firstly take into account all special slaves
@@ -468,8 +468,8 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
if (!client->isAttached())
client->attach();
- QString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
+ KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
return 0;
@@ -479,25 +479,25 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
Slave *slave = 0;
#endif
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
stream << url << socketfile.name();
- QCString launcher = KApplication::launcher();
- if (!client->call(launcher, launcher, "requestHoldSlave(KURL,QString)",
+ TQCString launcher = KApplication::launcher();
+ if (!client->call(launcher, launcher, "requestHoldSlave(KURL,TQString)",
params, replyType, reply)) {
delete slave;
return 0;
}
- QDataStream stream2(reply, IO_ReadOnly);
+ TQDataStream stream2(reply, IO_ReadOnly);
pid_t pid;
stream2 >> pid;
if (!pid)
@@ -507,7 +507,7 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
}
#ifndef Q_WS_WIN
slave->setPID(pid);
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
diff --git a/kio/kio/slave.h b/kio/kio/slave.h
index 8d6b24e36..790f7eab1 100644
--- a/kio/kio/slave.h
+++ b/kio/kio/slave.h
@@ -25,7 +25,7 @@
#include <time.h>
#include <unistd.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -52,12 +52,12 @@ namespace KIO {
* @internal
* @since 3.2
*/
- Slave(bool derived, KServerSocket *unixdomain, const QString &protocol,
- const QString &socketname); // TODO(BIC): Remove in KDE 4
+ Slave(bool derived, KServerSocket *unixdomain, const TQString &protocol,
+ const TQString &socketname); // TODO(BIC): Remove in KDE 4
public:
Slave(KServerSocket *unixdomain,
- const QString &protocol, const QString &socketname);
+ const TQString &protocol, const TQString &socketname);
virtual ~Slave();
@@ -82,8 +82,8 @@ namespace KIO {
* @param user to login as
* @param passwd to login with
*/
- void setHost( const QString &host, int port,
- const QString &user, const QString &passwd); // TODO(BIC): make virtual
+ void setHost( const TQString &host, int port,
+ const TQString &user, const TQString &passwd); // TODO(BIC): make virtual
/**
* Clear host info.
@@ -100,9 +100,9 @@ namespace KIO {
*
* @return name of protocol handled by this slave, as seen by the user
*/
- QString protocol() { return m_protocol; }
+ TQString protocol() { return m_protocol; }
- void setProtocol(const QString & protocol);
+ void setProtocol(const TQString & protocol);
/**
* The actual protocol used to handle the request.
*
@@ -115,12 +115,12 @@ namespace KIO {
*
* @return the actual protocol (io-slave) that handled the request
*/
- QString slaveProtocol() { return m_slaveProtocol; }
+ TQString slaveProtocol() { return m_slaveProtocol; }
/**
* @return Host this slave is (was?) connected to
*/
- QString host() { return m_host; }
+ TQString host() { return m_host; }
/**
* @return port this slave is (was?) connected to
@@ -130,12 +130,12 @@ namespace KIO {
/**
* @return User this slave is (was?) logged in as
*/
- QString user() { return m_user; }
+ TQString user() { return m_user; }
/**
* @return Passwd used to log in
*/
- QString passwd() { return m_passwd; }
+ TQString passwd() { return m_passwd; }
/**
* Creates a new slave.
@@ -148,9 +148,9 @@ namespace KIO {
* @return 0 on failure, or a pointer to a slave otherwise.
* @todo What are legal @p protocol values?
*/
- static Slave* createSlave( const QString &protocol, const KURL& url, int& error, QString& error_text );
+ static Slave* createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text );
- static Slave* holdSlave( const QString &protocol, const KURL& url );
+ static Slave* holdSlave( const TQString &protocol, const KURL& url );
// == communication with connected kioslave ==
// whenever possible prefer these methods over the respective
@@ -175,7 +175,7 @@ namespace KIO {
* @param data byte array containing data
* @since 3.2
*/
- void send(int cmd, const QByteArray &data = QByteArray());// TODO(BIC): make virtual
+ void send(int cmd, const TQByteArray &data = TQByteArray());// TODO(BIC): make virtual
// == end communication with connected kioslave ==
/**
@@ -220,14 +220,14 @@ namespace KIO {
void unlinkSocket();
private:
- QString m_protocol;
- QString m_slaveProtocol;
- QString m_host;
+ TQString m_protocol;
+ TQString m_slaveProtocol;
+ TQString m_host;
int m_port;
- QString m_user;
- QString m_passwd;
+ TQString m_user;
+ TQString m_passwd;
KServerSocket *serv;
- QString m_socket;
+ TQString m_socket;
pid_t m_pid;
bool contacted;
bool dead;
@@ -243,7 +243,7 @@ namespace KIO {
VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG };
struct SendParams {
int cmd;
- const QByteArray *arr;
+ const TQByteArray *arr;
};
struct HoldParams {
const KURL *url;
@@ -252,10 +252,10 @@ namespace KIO {
bool retval;
};
struct SetHostParams {
- const QString *host;
+ const TQString *host;
int port;
- const QString *user;
- const QString *passwd;
+ const TQString *user;
+ const TQString *passwd;
};
struct SetConfigParams {
const MetaData *config;
diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
index c52234f6d..ad683a009 100644
--- a/kio/kio/slavebase.cpp
+++ b/kio/kio/slavebase.cpp
@@ -40,7 +40,7 @@
#include <signal.h>
#include <time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
@@ -68,10 +68,10 @@
using namespace KIO;
-template class QPtrList<QValueList<UDSAtom> >;
-typedef QValueList<QCString> AuthKeysList;
-typedef QMap<QString,QCString> AuthKeysMap;
-#define KIO_DATA QByteArray data; QDataStream stream( data, IO_WriteOnly ); stream
+template class TQPtrList<TQValueList<UDSAtom> >;
+typedef TQValueList<TQCString> AuthKeysList;
+typedef TQMap<TQString,TQCString> AuthKeysMap;
+#define KIO_DATA TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream
#define KIO_FILESIZE_T(x) (unsigned long)(x & 0xffffffff) << (unsigned long)(x >> 32)
namespace KIO {
@@ -82,17 +82,17 @@ public:
SlaveBaseConfig(SlaveBase *_slave)
: slave(_slave) { }
- bool internalHasGroup(const QCString &) const { qWarning("hasGroup(const QCString &)");
+ bool internalHasGroup(const TQCString &) const { qWarning("hasGroup(const TQCString &)");
return false; }
- QStringList groupList() const { return QStringList(); }
+ TQStringList groupList() const { return TQStringList(); }
- QMap<QString,QString> entryMap(const QString &group) const
- { Q_UNUSED(group); return QMap<QString,QString>(); }
+ TQMap<TQString,TQString> entryMap(const TQString &group) const
+ { Q_UNUSED(group); return TQMap<TQString,TQString>(); }
void reparseConfiguration() { }
- KEntryMap internalEntryMap( const QString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); }
+ KEntryMap internalEntryMap( const TQString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); }
KEntryMap internalEntryMap() const { return KEntryMap(); }
@@ -102,7 +102,7 @@ return false; }
KEntry lookupData(const KEntryKey &_key) const
{
KEntry entry;
- QString value = slave->metaData(_key.c_key);
+ TQString value = slave->metaData(_key.c_key);
if (!value.isNull())
entry.mValue = value.utf8();
return entry;
@@ -114,7 +114,7 @@ protected:
class SlaveBasePrivate {
public:
- QString slaveid;
+ TQString slaveid;
bool resume:1;
bool needSendCanResume:1;
bool onHold:1;
@@ -129,7 +129,7 @@ public:
DCOPClient *dcopClient;
KRemoteEncoding *remotefile;
time_t timeout;
- QByteArray timeoutData;
+ TQByteArray timeoutData;
};
}
@@ -159,12 +159,12 @@ static void genericsig_handler(int sigNumber)
//////////////
-SlaveBase::SlaveBase( const QCString &protocol,
- const QCString &pool_socket,
- const QCString &app_socket )
+SlaveBase::SlaveBase( const TQCString &protocol,
+ const TQCString &pool_socket,
+ const TQCString &app_socket )
: mProtocol(protocol), m_pConnection(0),
- mPoolSocket( QFile::decodeName(pool_socket)),
- mAppSocket( QFile::decodeName(app_socket))
+ mPoolSocket( TQFile::decodeName(pool_socket)),
+ mAppSocket( TQFile::decodeName(app_socket))
{
s_protocol = protocol.data();
#ifdef Q_OS_UNIX
@@ -218,7 +218,7 @@ SlaveBase::SlaveBase( const QCString &protocol,
d = new SlaveBasePrivate;
// by kahl for netmgr (need a way to identify slaves)
d->slaveid = protocol;
- d->slaveid += QString::number(getpid());
+ d->slaveid += TQString::number(getpid());
d->resume = false;
d->needSendCanResume = false;
d->config = new SlaveBaseConfig(this);
@@ -264,9 +264,9 @@ void SlaveBase::dispatchLoop()
{
if (d->timeout && (d->timeout < time(0)))
{
- QByteArray data = d->timeoutData;
+ TQByteArray data = d->timeoutData;
d->timeout = 0;
- d->timeoutData = QByteArray();
+ d->timeoutData = TQByteArray();
special(data);
}
FD_ZERO(&rfds);
@@ -295,7 +295,7 @@ void SlaveBase::dispatchLoop()
if ((retval>0) && FD_ISSET(appconn->fd_from(), &rfds))
{ // dispatch application messages
int cmd;
- QByteArray data;
+ TQByteArray data;
if ( appconn->read(&cmd, data) != -1 )
{
dispatch(cmd, data);
@@ -337,10 +337,10 @@ void SlaveBase::dispatchLoop()
#endif
}
-void SlaveBase::connectSlave(const QString& path)
+void SlaveBase::connectSlave(const TQString& path)
{
#ifdef Q_OS_UNIX //TODO: KSocket not yet available on WIN32
- appconn->init(new KSocket(QFile::encodeName(path)));
+ appconn->init(new KSocket(TQFile::encodeName(path)));
if (!appconn->inited())
{
kdDebug(7019) << "SlaveBase: failed to connect to " << path << endl;
@@ -356,21 +356,21 @@ void SlaveBase::disconnectSlave()
appconn->close();
}
-void SlaveBase::setMetaData(const QString &key, const QString &value)
+void SlaveBase::setMetaData(const TQString &key, const TQString &value)
{
mOutgoingMetaData.replace(key, value);
}
-QString SlaveBase::metaData(const QString &key) const
+TQString SlaveBase::metaData(const TQString &key) const
{
if (mIncomingMetaData.contains(key))
return mIncomingMetaData[key];
if (d->configData.contains(key))
return d->configData[key];
- return QString::null;
+ return TQString::null;
}
-bool SlaveBase::hasMetaData(const QString &key) const
+bool SlaveBase::hasMetaData(const TQString &key) const
{
if (mIncomingMetaData.contains(key))
return true;
@@ -380,10 +380,10 @@ bool SlaveBase::hasMetaData(const QString &key) const
}
// ### remove the next two methods for KDE4 (they miss the const)
-QString SlaveBase::metaData(const QString &key) {
+TQString SlaveBase::metaData(const TQString &key) {
return const_cast<const SlaveBase*>(this)->metaData( key );
}
-bool SlaveBase::hasMetaData(const QString &key) {
+bool SlaveBase::hasMetaData(const TQString &key) {
return const_cast<const SlaveBase*>(this)->hasMetaData( key );
}
@@ -410,7 +410,7 @@ KRemoteEncoding *SlaveBase::remoteEncoding()
return d->remotefile = new KRemoteEncoding(metaData("Charset").latin1());
}
-void SlaveBase::data( const QByteArray &data )
+void SlaveBase::data( const TQByteArray &data )
{
if (!mOutgoingMetaData.isEmpty())
sendMetaData();
@@ -430,7 +430,7 @@ void SlaveBase::dataReq( )
m_pConnection->send( MSG_DATA_REQ );
}
-void SlaveBase::error( int _errid, const QString &_text )
+void SlaveBase::error( int _errid, const TQString &_text )
{
mIncomingMetaData.clear(); // Clear meta data
mOutgoingMetaData.clear();
@@ -468,7 +468,7 @@ void SlaveBase::needSubURLData()
m_pConnection->send( MSG_NEED_SUBURL_DATA );
}
-void SlaveBase::slaveStatus( const QString &host, bool connected )
+void SlaveBase::slaveStatus( const TQString &host, bool connected )
{
pid_t pid = getpid();
Q_INT8 b = connected ? 1 : 0;
@@ -572,7 +572,7 @@ static bool isSubCommand(int cmd)
(cmd == CMD_MULTI_GET));
}
-void SlaveBase::mimeType( const QString &_type)
+void SlaveBase::mimeType( const TQString &_type)
{
// kdDebug(7019) << "(" << getpid() << ") SlaveBase::mimeType '" << _type << "'" << endl;
int cmd;
@@ -615,19 +615,19 @@ void SlaveBase::exit()
::exit(255);
}
-void SlaveBase::warning( const QString &_msg)
+void SlaveBase::warning( const TQString &_msg)
{
KIO_DATA << _msg;
m_pConnection->send( INF_WARNING, data );
}
-void SlaveBase::infoMessage( const QString &_msg)
+void SlaveBase::infoMessage( const TQString &_msg)
{
KIO_DATA << _msg;
m_pConnection->send( INF_INFOMESSAGE, data );
}
-bool SlaveBase::requestNetwork(const QString& host)
+bool SlaveBase::requestNetwork(const TQString& host)
{
KIO_DATA << host << d->slaveid;
m_pConnection->send( MSG_NET_REQUEST, data );
@@ -635,14 +635,14 @@ bool SlaveBase::requestNetwork(const QString& host)
if ( waitForAnswer( INF_NETWORK_STATUS, 0, data ) != -1 )
{
bool status;
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
stream >> status;
return status;
} else
return false;
}
-void SlaveBase::dropNetwork(const QString& host)
+void SlaveBase::dropNetwork(const TQString& host)
{
KIO_DATA << host << d->slaveid;
m_pConnection->send( MSG_NET_DROP, data );
@@ -711,15 +711,15 @@ void SlaveBase::listEntries( const UDSEntryList& list )
d->sentListEntries+=(uint)list.count();
}
-void SlaveBase::sendAuthenticationKey( const QCString& key,
- const QCString& group,
+void SlaveBase::sendAuthenticationKey( const TQCString& key,
+ const TQCString& group,
bool keepPass )
{
KIO_DATA << key << group << keepPass;
m_pConnection->send( MSG_AUTH_KEY, data );
}
-void SlaveBase::delCachedAuthentication( const QString& key )
+void SlaveBase::delCachedAuthentication( const TQString& key )
{
KIO_DATA << key.utf8() ;
m_pConnection->send( MSG_DEL_AUTH_KEY, data );
@@ -762,7 +762,7 @@ void SlaveBase::sigpipe_handler (int)
// Don't add anything else here, especially no debug output
}
-void SlaveBase::setHost(QString const &, int, QString const &, QString const &)
+void SlaveBase::setHost(TQString const &, int, TQString const &, TQString const &)
{
}
@@ -774,7 +774,7 @@ void SlaveBase::stat(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_STAT)); }
void SlaveBase::put(KURL const &, int, bool, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_PUT)); }
-void SlaveBase::special(const QByteArray &)
+void SlaveBase::special(const TQByteArray &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SPECIAL)); }
void SlaveBase::listDir(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_LISTDIR)); }
@@ -784,7 +784,7 @@ void SlaveBase::mimetype(KURL const &url)
{ get(url); }
void SlaveBase::rename(KURL const &, KURL const &, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_RENAME)); }
-void SlaveBase::symlink(QString const &, KURL const &, bool)
+void SlaveBase::symlink(TQString const &, KURL const &, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SYMLINK)); }
void SlaveBase::copy(KURL const &, KURL const &, int, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_COPY)); }
@@ -796,12 +796,12 @@ void SlaveBase::chmod(KURL const &, int)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_CHMOD)); }
void SlaveBase::setSubURL(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SUBURL)); }
-void SlaveBase::multiGet(const QByteArray &)
+void SlaveBase::multiGet(const TQByteArray &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_MULTI_GET)); }
void SlaveBase::slave_status()
-{ slaveStatus( QString::null, false ); }
+{ slaveStatus( TQString::null, false ); }
void SlaveBase::reparseConfiguration()
{
@@ -812,7 +812,7 @@ bool SlaveBase::dispatch()
assert( m_pConnection );
int cmd;
- QByteArray data;
+ TQByteArray data;
if ( m_pConnection->read( &cmd, data ) == -1 )
{
kdDebug(7019) << "SlaveBase::dispatch() has read error." << endl;
@@ -825,14 +825,14 @@ bool SlaveBase::dispatch()
bool SlaveBase::openPassDlg( AuthInfo& info )
{
- return openPassDlg(info, QString::null);
+ return openPassDlg(info, TQString::null);
}
-bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
+bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg )
{
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
AuthInfo authResult;
long windowId = metaData("window-id").toLong();
long progressId = metaData("progress-id").toLong();
@@ -846,14 +846,14 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
if (progressId)
uiserver.setJobVisible( progressId, false );
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
if (metaData("no-auth-prompt").lower() == "true")
- stream << info << QString("<NoAuthPrompt>") << windowId << s_seqNr << userTimestamp;
+ stream << info << TQString("<NoAuthPrompt>") << windowId << s_seqNr << userTimestamp;
else
stream << info << errorMsg << windowId << s_seqNr << userTimestamp;
- bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, QString, long int, long int, unsigned long int)",
+ bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, TQString, long int, long int, unsigned long int)",
params, replyType, reply );
if (progressId)
@@ -867,7 +867,7 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult >> s_seqNr;
}
else
@@ -888,21 +888,21 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
return true;
}
-int SlaveBase::messageBox( MessageBoxType type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo )
+int SlaveBase::messageBox( MessageBoxType type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
- return messageBox( text, type, caption, buttonYes, buttonNo, QString::null );
+ return messageBox( text, type, caption, buttonYes, buttonNo, TQString::null );
}
-int SlaveBase::messageBox( const QString &text, MessageBoxType type, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName )
+int SlaveBase::messageBox( const TQString &text, MessageBoxType type, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug(7019) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
KIO_DATA << (Q_INT32)type << text << caption << buttonYes << buttonNo << dontAskAgainName;
m_pConnection->send( INF_MESSAGEBOX, data );
if ( waitForAnswer( CMD_MESSAGEBOXANSWER, 0, data ) != -1 )
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
int answer;
stream >> answer;
kdDebug(7019) << "got messagebox answer" << answer << endl;
@@ -933,7 +933,7 @@ bool SlaveBase::canResume( KIO::filesize_t offset )
-int SlaveBase::waitForAnswer( int expected1, int expected2, QByteArray & data, int *pCmd )
+int SlaveBase::waitForAnswer( int expected1, int expected2, TQByteArray & data, int *pCmd )
{
int cmd, result;
for (;;)
@@ -961,14 +961,14 @@ int SlaveBase::waitForAnswer( int expected1, int expected2, QByteArray & data, i
}
-int SlaveBase::readData( QByteArray &buffer)
+int SlaveBase::readData( TQByteArray &buffer)
{
int result = waitForAnswer( MSG_DATA, 0, buffer );
//kdDebug(7019) << "readData: length = " << result << " " << endl;
return result;
}
-void SlaveBase::setTimeoutSpecialCommand(int timeout, const QByteArray &data)
+void SlaveBase::setTimeoutSpecialCommand(int timeout, const TQByteArray &data)
{
if (timeout > 0)
d->timeout = time(0)+(time_t)timeout;
@@ -980,9 +980,9 @@ void SlaveBase::setTimeoutSpecialCommand(int timeout, const QByteArray &data)
d->timeoutData = data;
}
-void SlaveBase::dispatch( int command, const QByteArray &data )
+void SlaveBase::dispatch( int command, const TQByteArray &data )
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
KURL url;
int i;
@@ -991,8 +991,8 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_HOST: {
// Reset s_seqNr, see kpasswdserver/DESIGN
s_seqNr = 0;
- QString passwd;
- QString host, user;
+ TQString passwd;
+ TQString host, user;
stream >> host >> i >> user >> passwd;
setHost( host, i, user, passwd );
}
@@ -1009,8 +1009,8 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SLAVE_CONNECT:
{
d->onHold = false;
- QString app_socket;
- QDataStream stream( data, IO_ReadOnly);
+ TQString app_socket;
+ TQDataStream stream( data, IO_ReadOnly);
stream >> app_socket;
appconn->send( MSG_SLAVE_ACK );
disconnectSlave();
@@ -1020,7 +1020,7 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SLAVE_HOLD:
{
KURL url;
- QDataStream stream( data, IO_ReadOnly);
+ TQDataStream stream( data, IO_ReadOnly);
stream >> url;
d->onHoldUrl = url;
d->onHold = true;
@@ -1087,7 +1087,7 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SYMLINK:
{
Q_INT8 iOverwrite;
- QString target;
+ TQString target;
stream >> target >> url >> iOverwrite;
bool overwrite = (iOverwrite != 0);
symlink( target, url, overwrite );
@@ -1135,20 +1135,20 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
}
}
-QString SlaveBase::createAuthCacheKey( const KURL& url )
+TQString SlaveBase::createAuthCacheKey( const KURL& url )
{
if( !url.isValid() )
- return QString::null;
+ return TQString::null;
// Generate the basic key sequence.
- QString key = url.protocol();
+ TQString key = url.protocol();
key += '-';
key += url.host();
int port = url.port();
if( port )
{
key += ':';
- key += QString::number(port);
+ key += TQString::number(port);
}
return key;
@@ -1178,9 +1178,9 @@ bool SlaveBase::pingCacheDaemon() const
bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
{
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
AuthInfo authResult;
long windowId = metaData("window-id").toLong();
unsigned long userTimestamp = metaData("user-timestamp").toULong();
@@ -1189,7 +1189,7 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
(void) dcopClient(); // Make sure to have a dcop client.
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << windowId << userTimestamp;
if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int, unsigned long int)",
@@ -1201,7 +1201,7 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult;
}
else
@@ -1221,12 +1221,12 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
bool SlaveBase::cacheAuthentication( const AuthInfo& info )
{
- QByteArray params;
+ TQByteArray params;
long windowId = metaData("window-id").toLong();
(void) dcopClient(); // Make sure to have a dcop client.
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << windowId;
d->dcopClient->send( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo, long int)", params );
@@ -1237,7 +1237,7 @@ bool SlaveBase::cacheAuthentication( const AuthInfo& info )
int SlaveBase::connectTimeout()
{
bool ok;
- QString tmp = metaData("ConnectTimeout");
+ TQString tmp = metaData("ConnectTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1247,7 +1247,7 @@ int SlaveBase::connectTimeout()
int SlaveBase::proxyConnectTimeout()
{
bool ok;
- QString tmp = metaData("ProxyConnectTimeout");
+ TQString tmp = metaData("ProxyConnectTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1258,7 +1258,7 @@ int SlaveBase::proxyConnectTimeout()
int SlaveBase::responseTimeout()
{
bool ok;
- QString tmp = metaData("ResponseTimeout");
+ TQString tmp = metaData("ResponseTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1269,7 +1269,7 @@ int SlaveBase::responseTimeout()
int SlaveBase::readTimeout()
{
bool ok;
- QString tmp = metaData("ReadTimeout");
+ TQString tmp = metaData("ReadTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h
index f10ac3553..82370ce56 100644
--- a/kio/kio/slavebase.h
+++ b/kio/kio/slavebase.h
@@ -45,7 +45,7 @@ class SlaveBasePrivate;
class KIO_EXPORT SlaveBase
{
public:
- SlaveBase( const QCString &protocol, const QCString &pool_socket, const QCString &app_socket);
+ SlaveBase( const TQCString &protocol, const TQCString &pool_socket, const TQCString &app_socket);
virtual ~SlaveBase();
/**
@@ -77,11 +77,11 @@ public:
* Sends data in the slave to the job (i.e. in get).
*
* To signal end of data, simply send an empty
- * QByteArray().
+ * TQByteArray().
*
* @param data the data read by the slave
*/
- void data( const QByteArray &data );
+ void data( const TQByteArray &data );
/**
* Asks for data from the job.
@@ -106,7 +106,7 @@ public:
* @param _errid the error code from KIO::Error
* @param _text the rich text error message
*/
- void error( int _errid, const QString &_text );
+ void error( int _errid, const TQString &_text );
/**
* Call in openConnection, if you reimplement it, when you're done.
@@ -130,7 +130,7 @@ public:
* empty if not connected)
* @param connected Whether an actual network connection exists.
**/
- void slaveStatus(const QString &host, bool connected);
+ void slaveStatus(const TQString &host, bool connected);
/**
* Call this from stat() to express details about an object, the
@@ -216,18 +216,18 @@ public:
* Call this in mimetype() and in get(), when you know the mimetype.
* See mimetype about other ways to implement it.
*/
- void mimeType( const QString &_type );
+ void mimeType( const TQString &_type );
/**
* Call to signal a warning, to be displayed in a dialog box.
*/
- void warning( const QString &msg );
+ void warning( const TQString &msg );
/**
* Call to signal a message, to be displayed if the application wants to,
* for instance in a status bar. Usual examples are "connecting to host xyz", etc.
*/
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 };
@@ -244,10 +244,10 @@ public:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( MessageBoxType type, const QString &text,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null );
+ int messageBox( MessageBoxType type, const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null );
/**
* Call this to show a message box from the slave
@@ -265,43 +265,43 @@ public:
* @return a button code, as defined in KMessageBox, or 0 on communication error.
* @since 3.3
*/
- int messageBox( const QString &text, MessageBoxType type,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null,
- const QString &dontAskAgainName = QString::null );
+ int messageBox( const TQString &text, MessageBoxType type,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null,
+ const TQString &dontAskAgainName = TQString::null );
/**
* Sets meta-data to be send to the application before the first
* data() or finished() signal.
*/
- void setMetaData(const QString &key, const QString &value);
+ void setMetaData(const TQString &key, const TQString &value);
/**
* Queries for the existence of a certain config/meta-data entry
* send by the application to the slave.
* @since 3.2
*/
- bool hasMetaData(const QString &key) const;
+ bool hasMetaData(const TQString &key) const;
/**
* Queries for config/meta-data send by the application to the slave.
* @since 3.2
*/
- QString metaData(const QString &key) const;
+ TQString metaData(const TQString &key) const;
/**
* @obsolete kept for binary compatibility
* Queries for the existence of a certain config/meta-data entry
* send by the application to the slave.
*/
- bool hasMetaData(const QString &key);
+ bool hasMetaData(const TQString &key);
/**
* @obsolete kept for binary compatibility
* Queries for config/meta-data sent by the application to the slave.
*/
- QString metaData(const QString &key);
+ TQString metaData(const TQString &key);
/**
* @internal for ForwardingSlaveBase
@@ -344,7 +344,7 @@ public:
*
* This method is called whenever a change in host, port or user occurs.
*/
- virtual void setHost(const QString& host, int port, const QString& user, const QString& pass);
+ virtual void setHost(const TQString& host, int port, const TQString& user, const TQString& pass);
/**
* Prepare slave for streaming operation
@@ -453,7 +453,7 @@ public:
* @param dest The symlink to create.
* @param overwrite whether to automatically overwrite if the dest exists
*/
- virtual void symlink( const QString& target, const KURL& dest, bool overwrite );
+ virtual void symlink( const TQString& target, const KURL& dest, bool overwrite );
/**
* Change permissions on @p path
@@ -492,7 +492,7 @@ public:
* slave, but usually starts with an int for the command number.
* Document your slave's commands, at least in its header file.
*/
- virtual void special( const QByteArray & data );
+ virtual void special( const TQByteArray & data );
/**
* Used for multiple get. Currently only used foir HTTP pielining
@@ -501,7 +501,7 @@ public:
* @param data packed data; Contains number of URLs to fetch, and for
* each URL the URL itself and its associated MetaData.
*/
- virtual void multiGet( const QByteArray & data );
+ virtual void multiGet( const TQByteArray & data );
/**
* Called to get the status of the slave. Slave should respond
@@ -552,7 +552,7 @@ public:
* cancels any pending timeout.
* @since 3.1
*/
- void setTimeoutSpecialCommand(int timeout, const QByteArray &data=QByteArray());
+ void setTimeoutSpecialCommand(int timeout, const TQByteArray &data=TQByteArray());
/**
* @internal
@@ -574,7 +574,7 @@ public:
/**
* @internal
*/
- virtual void dispatch( int command, const QByteArray &data );
+ virtual void dispatch( int command, const TQByteArray &data );
/**
* Read data send by the job, after a dataReq
@@ -584,7 +584,7 @@ public:
* > 0 bytes read
* < 0 error
**/
- int readData( QByteArray &buffer );
+ int readData( TQByteArray &buffer );
/**
* internal function to be called by the slave.
@@ -603,7 +603,7 @@ public:
* internal function to connect a slave to/ disconnect from
* either the slave pool or the application
*/
- void connectSlave(const QString& path);
+ void connectSlave(const TQString& path);
void disconnectSlave();
/**
@@ -618,10 +618,10 @@ public:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@@ -632,13 +632,13 @@ public:
* KIO::AuthInfo authInfo;
* authInfo.caption= "Acme Password Dialog";
* authInfo.username= "Wile E. Coyote";
- * QString errorMsg = "You entered an incorrect password.";
+ * TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@@ -655,7 +655,7 @@ public:
* @return @p true if user clicks on "OK", @p false otherwsie.
* @since 3.1
*/
- bool openPassDlg( KIO::AuthInfo& info, const QString &errorMsg );
+ bool openPassDlg( KIO::AuthInfo& info, const TQString &errorMsg );
/**
* Same as above function except it does not need error message.
@@ -712,7 +712,7 @@ public:
* Creates a basic key to be used to cache the password.
* @param url the url from which the key is supposed to be generated
*/
- QString createAuthCacheKey( const KURL& url );
+ TQString createAuthCacheKey( const KURL& url );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -721,7 +721,7 @@ public:
* Cache authentication information is now stored automatically
* by openPassDlg.
*/
- void sendAuthenticationKey( const QCString& gKey, const QCString& key, bool keep );
+ void sendAuthenticationKey( const TQCString& gKey, const TQCString& key, bool keep );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -731,7 +731,7 @@ public:
* removed automatically when a given session ends, i.e. the
* application is closed.
*/
- void delCachedAuthentication( const QString& key );
+ void delCachedAuthentication( const TQString& key );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -763,7 +763,7 @@ public:
* @return true in theorie, the host is reachable
* false the system is offline and the host is in a remote network.
*/
- bool requestNetwork(const QString& host = QString::null);
+ bool requestNetwork(const TQString& host = TQString::null);
/**
* Used by the slave to withdraw a connection requested by
@@ -778,7 +778,7 @@ public:
*
* A slave should call this function every time it disconnect from a host.
* */
- void dropNetwork(const QString& host = QString::null);
+ void dropNetwork(const TQString& host = TQString::null);
/**
* Return the dcop client used by this slave.
@@ -790,7 +790,7 @@ public:
* Wait for an answer to our request, until we get @p expected1 or @p expected2
* @return the result from readData, as well as the cmd in *pCmd if set, and the data in @p data
*/
- int waitForAnswer( int expected1, int expected2, QByteArray & data, int * pCmd = 0 );
+ int waitForAnswer( int expected1, int expected2, TQByteArray & data, int * pCmd = 0 );
/**
* Internal function to transmit meta data to the application.
@@ -800,7 +800,7 @@ public:
/**
* Name of the protocol supported by this slave
*/
- QCString mProtocol;
+ TQCString mProtocol;
Connection * m_pConnection;
@@ -826,8 +826,8 @@ protected:
uint listEntryCurrentSize;
long listEntry_sec, listEntry_usec;
Connection *appconn;
- QString mPoolSocket;
- QString mAppSocket;
+ TQString mPoolSocket;
+ TQString mAppSocket;
bool mConnectedToApp;
static long s_seqNr;
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp
index e0a56b243..fe888c99c 100644
--- a/kio/kio/slaveconfig.cpp
+++ b/kio/kio/slaveconfig.cpp
@@ -22,7 +22,7 @@
#include <assert.h>
-#include <qdict.h>
+#include <tqdict.h>
#include <kconfig.h>
#include <kstaticdeleter.h>
@@ -46,11 +46,11 @@ public:
public:
MetaData global;
- QDict<MetaData> host;
+ TQDict<MetaData> host;
KConfig *configFile;
};
-static void readConfig(KConfig *config, const QString & group, MetaData *metaData)
+static void readConfig(KConfig *config, const TQString & group, MetaData *metaData)
{
*metaData += config->entryMap(group);
}
@@ -59,12 +59,12 @@ class SlaveConfigPrivate
{
public:
void readGlobalConfig();
- SlaveConfigProtocol *readProtocolConfig(const QString &_protocol);
- SlaveConfigProtocol *findProtocolConfig(const QString &_protocol);
- void readConfigProtocolHost(const QString &_protocol, SlaveConfigProtocol *scp, const QString &host);
+ SlaveConfigProtocol *readProtocolConfig(const TQString &_protocol);
+ SlaveConfigProtocol *findProtocolConfig(const TQString &_protocol);
+ void readConfigProtocolHost(const TQString &_protocol, SlaveConfigProtocol *scp, const TQString &host);
public:
MetaData global;
- QDict<SlaveConfigProtocol> protocol;
+ TQDict<SlaveConfigProtocol> protocol;
};
void SlaveConfigPrivate::readGlobalConfig()
@@ -77,12 +77,12 @@ void SlaveConfigPrivate::readGlobalConfig()
readConfig(config, "<default>", &global);
}
-SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const QString &_protocol)
+SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_protocol)
{
SlaveConfigProtocol *scp = protocol.find(_protocol);
if (!scp)
{
- QString filename = KProtocolInfo::config(_protocol);
+ TQString filename = KProtocolInfo::config(_protocol);
scp = new SlaveConfigProtocol;
scp->configFile = new KConfig(filename, true, false);
protocol.insert(_protocol, scp);
@@ -92,7 +92,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const QString &_prot
return scp;
}
-SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const QString &_protocol)
+SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_protocol)
{
SlaveConfigProtocol *scp = protocol.find(_protocol);
if (!scp)
@@ -100,14 +100,14 @@ SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const QString &_prot
return scp;
}
-void SlaveConfigPrivate::readConfigProtocolHost(const QString &, SlaveConfigProtocol *scp, const QString &host)
+void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigProtocol *scp, const TQString &host)
{
MetaData *metaData = new MetaData;
scp->host.replace(host, metaData);
// Read stuff
// Break host into domains
- QString domain = host;
+ TQString domain = host;
if (!domain.contains('.'))
{
@@ -156,17 +156,17 @@ SlaveConfig::~SlaveConfig()
_self = 0;
}
-void SlaveConfig::setConfigData(const QString &protocol,
- const QString &host,
- const QString &key,
- const QString &value )
+void SlaveConfig::setConfigData(const TQString &protocol,
+ const TQString &host,
+ const TQString &key,
+ const TQString &value )
{
MetaData config;
config.insert(key, value);
setConfigData(protocol, host, config);
}
-void SlaveConfig::setConfigData(const QString &protocol, const QString &host, const MetaData &config )
+void SlaveConfig::setConfigData(const TQString &protocol, const TQString &host, const MetaData &config )
{
if (protocol.isEmpty())
d->global += config;
@@ -190,7 +190,7 @@ void SlaveConfig::setConfigData(const QString &protocol, const QString &host, co
}
}
-MetaData SlaveConfig::configData(const QString &protocol, const QString &host)
+MetaData SlaveConfig::configData(const TQString &protocol, const TQString &host)
{
MetaData config = d->global;
SlaveConfigProtocol *scp = d->findProtocolConfig(protocol);
@@ -209,7 +209,7 @@ MetaData SlaveConfig::configData(const QString &protocol, const QString &host)
return config;
}
-QString SlaveConfig::configData(const QString &protocol, const QString &host, const QString &key)
+TQString SlaveConfig::configData(const TQString &protocol, const TQString &host, const TQString &key)
{
return configData(protocol, host)[key];
}
diff --git a/kio/kio/slaveconfig.h b/kio/kio/slaveconfig.h
index 5b912db2f..1eaaa55e4 100644
--- a/kio/kio/slaveconfig.h
+++ b/kio/kio/slaveconfig.h
@@ -21,7 +21,7 @@
#ifndef KIO_SLAVE_CONFIG_H
#define KIO_SLAVE_CONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/global.h>
namespace KIO {
@@ -58,7 +58,7 @@ namespace KIO {
* Changes made to the slave configuration only apply to slaves
* used by the current process.
*/
- void setConfigData(const QString &protocol, const QString &host, const QString &key, const QString &value );
+ void setConfigData(const TQString &protocol, const TQString &host, const TQString &key, const TQString &value );
/**
* Configure slaves of type @p protocol with @p config.
@@ -68,19 +68,19 @@ namespace KIO {
* Changes made to the slave configuration only apply to slaves
* used by the current process.
*/
- void setConfigData(const QString &protocol, const QString &host, const MetaData &config );
+ void setConfigData(const TQString &protocol, const TQString &host, const MetaData &config );
/**
* Query slave configuration for slaves of type @p protocol when
* dealing with @p host.
*/
- MetaData configData(const QString &protocol, const QString &host);
+ MetaData configData(const TQString &protocol, const TQString &host);
/**
* Query a specific configuration key for slaves of type @p protocol when
* dealing with @p host.
*/
- QString configData(const QString &protocol, const QString &host, const QString &key);
+ TQString configData(const TQString &protocol, const TQString &host, const TQString &key);
/**
* Undo any changes made by calls to setConfigData.
@@ -95,7 +95,7 @@ namespace KIO {
* configuration changes with setConfigData based on the
* host.
*/
- void configNeeded(const QString &protocol, const QString &host);
+ void configNeeded(const TQString &protocol, const TQString &host);
protected:
SlaveConfig();
static SlaveConfig *_self;
diff --git a/kio/kio/slaveinterface.cpp b/kio/kio/slaveinterface.cpp
index c468187ec..563aad17e 100644
--- a/kio/kio/slaveinterface.cpp
+++ b/kio/kio/slaveinterface.cpp
@@ -30,12 +30,12 @@
#include <kapplication.h>
#include <dcopclient.h>
#include <time.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIO;
-QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e )
+TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e )
{
// On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front
// of it to carry the 32 msb. We can't send a 64 bit UDS_SIZE because
@@ -67,7 +67,7 @@ QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e )
return s;
}
-QDataStream &operator >>(QDataStream &s, KIO::UDSEntry &e )
+TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e )
{
e.clear();
Q_UINT32 size;
@@ -124,7 +124,7 @@ public:
size_t last_time;
KIO::filesize_t filesize, offset;
- QTimer speed_timer;
+ TQTimer speed_timer;
};
//////////////
@@ -135,18 +135,18 @@ SlaveInterface::SlaveInterface( Connection * connection )
m_progressId = 0;
d = new SlaveInterfacePrivate;
- connect(&d->speed_timer, SIGNAL(timeout()), SLOT(calcSpeed()));
+ connect(&d->speed_timer, TQT_SIGNAL(timeout()), TQT_SLOT(calcSpeed()));
}
SlaveInterface::~SlaveInterface()
{
// Note: no kdDebug() here (scheduler is deleted very late)
- m_pConnection = 0; // a bit like the "wasDeleted" of QObject...
+ m_pConnection = 0; // a bit like the "wasDeleted" of TQObject...
delete d;
}
-static KIO::filesize_t readFilesize_t(QDataStream &stream)
+static KIO::filesize_t readFilesize_t(TQDataStream &stream)
{
KIO::filesize_t result;
unsigned long ul;
@@ -165,7 +165,7 @@ bool SlaveInterface::dispatch()
assert( m_pConnection );
int cmd;
- QByteArray data;
+ TQByteArray data;
if (m_pConnection->read( &cmd, data ) == -1)
return false;
@@ -218,13 +218,13 @@ void SlaveInterface::calcSpeed()
}
}
-bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
+bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata )
{
//kdDebug(7007) << "dispatch " << _cmd << endl;
- QDataStream stream( rawdata, IO_ReadOnly );
+ TQDataStream stream( rawdata, IO_ReadOnly );
- QString str1;
+ TQString str1;
Q_INT32 i;
Q_INT8 b;
Q_UINT32 ul;
@@ -282,7 +282,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
case MSG_SLAVE_STATUS:
{
pid_t pid;
- QCString protocol;
+ TQCString protocol;
stream >> pid >> protocol >> str1 >> b;
emit slaveStatus(pid, protocol, str1, (b != 0));
}
@@ -337,7 +337,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
emit mimeType( str1 );
if (!m_pConnection->suspended())
- m_pConnection->sendnow( CMD_NONE, QByteArray() );
+ m_pConnection->sendnow( CMD_NONE, TQByteArray() );
break;
case INF_WARNING:
stream >> str1;
@@ -352,7 +352,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
}
case INF_MESSAGEBOX: {
kdDebug(7007) << "needs a msg box" << endl;
- QString text, caption, buttonYes, buttonNo, dontAskAgainName;
+ TQString text, caption, buttonYes, buttonNo, dontAskAgainName;
int type;
stream >> type >> text >> caption >> buttonYes >> buttonNo;
if (stream.atEnd())
@@ -364,7 +364,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case INF_INFOMESSAGE: {
- QString msg;
+ TQString msg;
stream >> msg;
infoMessage(msg);
break;
@@ -376,15 +376,15 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case MSG_NET_REQUEST: {
- QString host;
- QString slaveid;
+ TQString host;
+ TQString slaveid;
stream >> host >> slaveid;
requestNetwork(host, slaveid);
break;
}
case MSG_NET_DROP: {
- QString host;
- QString slaveid;
+ TQString host;
+ TQString slaveid;
stream >> host >> slaveid;
dropNetwork(host, slaveid);
break;
@@ -395,7 +395,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
}
case MSG_AUTH_KEY: {
bool keep;
- QCString key, group;
+ TQCString key, group;
stream >> key >> group >> keep;
kdDebug(7007) << "Got auth-key: " << key << endl
<< " group-key: " << group << endl
@@ -404,7 +404,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case MSG_DEL_AUTH_KEY: {
- QCString key;
+ TQCString key;
stream >> key;
kdDebug(7007) << "Delete auth-key: " << key << endl;
emit delAuthorization( key );
@@ -423,16 +423,16 @@ void SlaveInterface::setOffset( KIO::filesize_t o)
KIO::filesize_t SlaveInterface::offset() const { return d->offset; }
-void SlaveInterface::requestNetwork(const QString &host, const QString &slaveid)
+void SlaveInterface::requestNetwork(const TQString &host, const TQString &slaveid)
{
kdDebug(7007) << "requestNetwork " << host << slaveid << endl;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << true;
m_pConnection->sendnow( INF_NETWORK_STATUS, packedArgs );
}
-void SlaveInterface::dropNetwork(const QString &host, const QString &slaveid)
+void SlaveInterface::dropNetwork(const TQString &host, const TQString &slaveid)
{
kdDebug(7007) << "dropNetwork " << host << slaveid << endl;
}
@@ -440,10 +440,10 @@ void SlaveInterface::dropNetwork(const QString &host, const QString &slaveid)
void SlaveInterface::sendResumeAnswer( bool resume )
{
kdDebug(7007) << "SlaveInterface::sendResumeAnswer ok for resuming :" << resume << endl;
- m_pConnection->sendnow( resume ? CMD_RESUMEANSWER : CMD_NONE, QByteArray() );
+ m_pConnection->sendnow( resume ? CMD_RESUMEANSWER : CMD_NONE, TQByteArray() );
}
-void SlaveInterface::openPassDlg( const QString& prompt, const QString& user, bool readOnly )
+void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -452,9 +452,9 @@ void SlaveInterface::openPassDlg( const QString& prompt, const QString& user, bo
openPassDlg( info );
}
-void SlaveInterface::openPassDlg( const QString& prompt, const QString& user,
- const QString& caption, const QString& comment,
- const QString& label, bool readOnly )
+void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user,
+ const TQString& caption, const TQString& comment,
+ const TQString& label, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -474,8 +474,8 @@ void SlaveInterface::openPassDlg( AuthInfo& info )
bool result = Observer::self()->openPassDlg( info );
if ( m_pConnection )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
if ( result )
{
stream << info;
@@ -489,26 +489,26 @@ void SlaveInterface::openPassDlg( AuthInfo& info )
}
}
-void SlaveInterface::messageBox( int type, const QString &text, const QString &_caption,
- const QString &buttonYes, const QString &buttonNo )
+void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
- messageBox( type, text, _caption, buttonYes, buttonNo, QString::null );
+ messageBox( type, text, _caption, buttonYes, buttonNo, TQString::null );
}
-void SlaveInterface::messageBox( int type, const QString &text, const QString &_caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName )
+void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug(7007) << "messageBox " << type << " " << text << " - " << _caption << " " << dontAskAgainName << endl;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- QString caption( _caption );
+ TQString caption( _caption );
if ( type == KIO::SlaveBase::SSLMessageBox )
- caption = QString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp
+ caption = TQString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp
emit needProgressId();
kdDebug(7007) << "SlaveInterface::messageBox m_progressId=" << m_progressId << endl;
- QGuardedPtr<SlaveInterface> me = this;
+ TQGuardedPtr<SlaveInterface> me = this;
m_pConnection->suspend();
int result = Observer::/*self()->*/messageBox( m_progressId, type, text, caption, buttonYes, buttonNo, dontAskAgainName );
if ( me && m_pConnection ) // Don't do anything if deleted meanwhile
diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h
index 46483d9a1..5cca5dd77 100644
--- a/kio/kio/slaveinterface.h
+++ b/kio/kio/slaveinterface.h
@@ -23,7 +23,7 @@
#include <unistd.h>
#include <sys/types.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kio/global.h>
@@ -116,12 +116,12 @@ signals:
// Messages sent by the slave
///////////
- void data( const QByteArray & );
+ void data( const TQByteArray & );
void dataReq( );
- void error( int , const QString & );
+ void error( int , const TQString & );
void connected();
void finished();
- void slaveStatus(pid_t, const QCString &, const QString &, bool);
+ void slaveStatus(pid_t, const TQCString &, const TQString &, bool);
void listEntries( const KIO::UDSEntryList& );
void statEntry( const KIO::UDSEntry& );
void needSubURLData();
@@ -139,20 +139,20 @@ signals:
void speed( unsigned long ) ;
void errorPage() ;
- void mimeType( const QString & ) ;
- void warning( const QString & ) ;
- void infoMessage( const QString & ) ;
+ void mimeType( const TQString & ) ;
+ void warning( const TQString & ) ;
+ void infoMessage( const TQString & ) ;
void connectFinished();
/**
* @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module.
*/
- void authorizationKey( const QCString&, const QCString&, bool );
+ void authorizationKey( const TQCString&, const TQCString&, bool );
/**
* @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module.
*/
- void delAuthorization( const QCString& grpkey );
+ void delAuthorization( const TQCString& grpkey );
protected:
/////////////////
@@ -160,7 +160,7 @@ protected:
////////////////
virtual bool dispatch();
- virtual bool dispatch( int _cmd, const QByteArray &data );
+ virtual bool dispatch( int _cmd, const TQByteArray &data );
/**
* Prompt the user for authrization info (login & password).
@@ -206,27 +206,27 @@ protected:
/**
* @deprecated. Use openPassDlg( AuthInfo& ) instead.
*/
- void openPassDlg( const QString& prompt, const QString& user,
- const QString& caption, const QString& comment,
- const QString& label, bool readOnly ) KDE_DEPRECATED;
+ void openPassDlg( const TQString& prompt, const TQString& user,
+ const TQString& caption, const TQString& comment,
+ const TQString& label, bool readOnly ) KDE_DEPRECATED;
/**
* @deprecated. Use openPassDlg( AuthInfo& ) instead.
*/
- void openPassDlg( const QString& prompt, const QString& user, bool readOnly ) KDE_DEPRECATED;
+ void openPassDlg( const TQString& prompt, const TQString& user, bool readOnly ) KDE_DEPRECATED;
- void messageBox( int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ void messageBox( int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* @since 3.3
*/
- void messageBox( int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName );
+ void messageBox( int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName );
// I need to identify the slaves
- void requestNetwork( const QString &, const QString &);
- void dropNetwork( const QString &, const QString &);
+ void requestNetwork( const TQString &, const TQString &);
+ void dropNetwork( const TQString &, const TQString &);
/**
* @internal
@@ -250,7 +250,7 @@ private:
}
-inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
+inline TQDataStream &operator >>(TQDataStream &s, KIO::UDSAtom &a )
{
Q_INT32 l;
s >> a.m_uds;
@@ -258,7 +258,7 @@ inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
if ( a.m_uds & KIO::UDS_LONG ) {
s >> l;
a.m_long = l;
- a.m_str = QString::null;
+ a.m_str = TQString::null;
} else if ( a.m_uds & KIO::UDS_STRING ) {
s >> a.m_str;
a.m_long = 0;
@@ -268,7 +268,7 @@ inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
return s;
}
-inline QDataStream &operator <<(QDataStream &s, const KIO::UDSAtom &a )
+inline TQDataStream &operator <<(TQDataStream &s, const KIO::UDSAtom &a )
{
s << a.m_uds;
@@ -282,7 +282,7 @@ inline QDataStream &operator <<(QDataStream &s, const KIO::UDSAtom &a )
return s;
}
-KIO_EXPORT QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e );
-KIO_EXPORT QDataStream &operator >>(QDataStream &s, KIO::UDSEntry &e );
+KIO_EXPORT TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e );
+KIO_EXPORT TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e );
#endif
diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp
index f71ca9630..910155799 100644
--- a/kio/kio/statusbarprogress.cpp
+++ b/kio/kio/statusbarprogress.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <klocale.h>
@@ -32,7 +32,7 @@
namespace KIO {
-StatusbarProgress::StatusbarProgress( QWidget* parent, bool button )
+StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button )
: ProgressBase( parent ) {
m_bShowButton = button;
@@ -43,23 +43,23 @@ StatusbarProgress::StatusbarProgress( QWidget* parent, bool button )
setStopOnClose(false);
int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8;
- box = new QHBoxLayout( this, 0, 0 );
+ box = new TQHBoxLayout( this, 0, 0 );
- m_pButton = new QPushButton( "X", this );
+ m_pButton = new TQPushButton( "X", this );
box->addWidget( m_pButton );
- stack = new QWidgetStack( this );
+ stack = new TQWidgetStack( this );
box->addWidget( stack );
- connect( m_pButton, SIGNAL( clicked() ), this, SLOT( slotStop() ) );
+ connect( m_pButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotStop() ) );
m_pProgressBar = new KProgress( this );
- m_pProgressBar->setFrameStyle( QFrame::Box | QFrame::Raised );
+ m_pProgressBar->setFrameStyle( TQFrame::Box | TQFrame::Raised );
m_pProgressBar->setLineWidth( 1 );
- m_pProgressBar->setBackgroundMode( QWidget::PaletteBackground );
+ m_pProgressBar->setBackgroundMode( TQWidget::PaletteBackground );
m_pProgressBar->installEventFilter( this );
m_pProgressBar->setMinimumWidth( w );
stack->addWidget( m_pProgressBar, 1 );
- m_pLabel = new QLabel( "", this );
+ m_pLabel = new TQLabel( "", this );
m_pLabel->setAlignment( AlignHCenter | AlignVCenter );
m_pLabel->installEventFilter( this );
m_pLabel->setMinimumWidth( w );
@@ -136,13 +136,13 @@ void StatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) {
}
-bool StatusbarProgress::eventFilter( QObject *, QEvent *ev ) {
+bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) {
if ( ! m_pJob ) { // don't react when there isn't any job doing IO
return true;
}
- if ( ev->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *e = (QMouseEvent*)ev;
+ if ( ev->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *e = (TQMouseEvent*)ev;
if ( e->button() == LeftButton ) { // toggle view on left mouse button
if ( mode == Label ) {
diff --git a/kio/kio/statusbarprogress.h b/kio/kio/statusbarprogress.h
index a8a0678ce..1cb4caf04 100644
--- a/kio/kio/statusbarprogress.h
+++ b/kio/kio/statusbarprogress.h
@@ -69,7 +69,7 @@ public:
* @param button true to add an abort button. The button will be
* connected to ProgressBase::slotStop()
*/
- StatusbarProgress( QWidget* parent, bool button = true );
+ StatusbarProgress( TQWidget* parent, bool button = true );
~StatusbarProgress() {}
/**
@@ -86,8 +86,8 @@ public slots:
protected:
KProgress* m_pProgressBar;
- QLabel* m_pLabel;
- QPushButton* m_pButton;
+ TQLabel* m_pLabel;
+ TQPushButton* m_pButton;
KIO::filesize_t m_iTotalSize;
@@ -98,9 +98,9 @@ protected:
void setMode();
- virtual bool eventFilter( QObject *, QEvent * );
- QBoxLayout *box;
- QWidgetStack *stack;
+ virtual bool eventFilter( TQObject *, TQEvent * );
+ TQBoxLayout *box;
+ TQWidgetStack *stack;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp
index db85483f3..78093577d 100644
--- a/kio/kio/tcpslavebase.cpp
+++ b/kio/kio/tcpslavebase.cpp
@@ -50,8 +50,8 @@
#include <klocale.h>
#include <dcopclient.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapplication.h>
@@ -72,9 +72,9 @@ public:
KSSL *kssl;
bool usingTLS;
KSSLCertificateCache *cc;
- QString host;
- QString realHost;
- QString ip;
+ TQString host;
+ TQString realHost;
+ TQString ip;
DCOPClient *dcc;
KSSLPKCS12 *pkcs;
@@ -92,9 +92,9 @@ public:
TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
- const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket)
+ const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket)
:SlaveBase (protocol, poolSocket, appSocket),
m_iSock(-1),
m_iDefaultPort(defaultPort),
@@ -108,9 +108,9 @@ TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
}
TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
- const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket,
+ const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket,
bool useSSL)
:SlaveBase (protocol, poolSocket, appSocket),
m_iSock(-1),
@@ -299,7 +299,7 @@ unsigned short int TCPSlaveBase::port(unsigned short int _p)
// a port, and if so use it, otherwise we check to see if there
// is a port specified in /etc/services, and if so use that
// otherwise as a last resort use the supplied default port.
-bool TCPSlaveBase::connectToHost( const QString &host,
+bool TCPSlaveBase::connectToHost( const TQString &host,
unsigned int _port,
bool sendError )
{
@@ -323,7 +323,7 @@ bool TCPSlaveBase::connectToHost( const QString &host,
"observe your data in transit."),
WarningContinueCancel,
i18n("Security Information"),
- i18n("C&ontinue Loading"), QString::null,
+ i18n("C&ontinue Loading"), TQString::null,
"WarnOnLeaveSSLMode" );
// Move this setting into KSSL instead
@@ -533,7 +533,7 @@ bool TCPSlaveBase::canUseTLS()
void TCPSlaveBase::certificatePrompt()
{
-QString certname; // the cert to use this session
+TQString certname; // the cert to use this session
bool send = false, prompt = false, save = false, forcePrompt = false;
KSSLCertificateHome::KSSLAuthAction aa;
@@ -559,7 +559,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
break;
case KSSLCertificateHome::AuthDont:
send = false; prompt = false;
- certname = QString::null;
+ certname = TQString::null;
break;
case KSSLCertificateHome::AuthPrompt:
send = false; prompt = true;
@@ -569,7 +569,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
}
}
- QString ourHost;
+ TQString ourHost;
if (!d->realHost.isEmpty()) {
ourHost = d->realHost;
} else {
@@ -577,7 +577,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
}
// Look for a certificate on a per-host basis as an override
- QString tmpcn = KSSLCertificateHome::getDefaultCertificateName(ourHost, &aa);
+ TQString tmpcn = KSSLCertificateHome::getDefaultCertificateName(ourHost, &aa);
if (aa != KSSLCertificateHome::AuthNone) { // we must override
switch (aa) {
case KSSLCertificateHome::AuthSend:
@@ -588,7 +588,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
case KSSLCertificateHome::AuthDont:
send = false;
prompt = false;
- certname = QString::null;
+ certname = TQString::null;
break;
case KSSLCertificateHome::AuthPrompt:
send = false;
@@ -614,9 +614,9 @@ KSSLCertificateHome::KSSLAuthAction aa;
// Ok, we're supposed to prompt the user....
if (prompt || forcePrompt) {
- QStringList certs = KSSLCertificateHome::getCertificateList();
+ TQStringList certs = KSSLCertificateHome::getCertificateList();
- for (QStringList::Iterator it = certs.begin(); it != certs.end(); ++it) {
+ for (TQStringList::Iterator it = certs.begin(); it != certs.end(); ++it) {
KSSLPKCS12 *pkcs = KSSLCertificateHome::getCertificateByName(*it);
if (pkcs && (!pkcs->getCertificate() ||
!pkcs->getCertificate()->x509V3Extensions().certTypeSSLClient())) {
@@ -632,22 +632,22 @@ KSSLCertificateHome::KSSLAuthAction aa;
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ourHost;
arg << certs;
arg << metaData("window-id").toInt();
bool rc = d->dcc->call("kio_uiserver", "UIServer",
- "showSSLCertDialog(QString, QStringList,int)",
+ "showSSLCertDialog(TQString, TQStringList,int)",
data, rettype, retval);
if (rc && rettype == "KSSLCertDlgRet") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertDlgRet drc;
retStream >> drc;
if (drc.ok) {
@@ -687,7 +687,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
else
showprompt = true;
if (showprompt) {
- if (!openPassDlg(ai, first ? QString::null :
+ if (!openPassDlg(ai, first ? TQString::null :
i18n("Unable to open the certificate. Try a new password?")))
break;
}
@@ -741,13 +741,13 @@ int TCPSlaveBase::verifyCertificate()
bool _IPmatchesCN = false;
int result;
bool doAddHost = false;
- QString ourHost;
+ TQString ourHost;
if (!d->realHost.isEmpty())
ourHost = d->realHost;
else ourHost = d->host;
- QString theurl = QString(m_sServiceName)+"://"+ourHost+":"+QString::number(m_iPort);
+ TQString theurl = TQString(m_sServiceName)+"://"+ourHost+":"+TQString::number(m_iPort);
if (!hasMetaData("ssl_militant") || metaData("ssl_militant") == "FALSE")
d->militantSSL = false;
@@ -765,7 +765,7 @@ int TCPSlaveBase::verifyCertificate()
#ifndef Q_WS_WIN //temporary
KNetwork::KResolverResults res = KNetwork::KResolver::resolve(d->kssl->peerInfo().peerHost(), "80", KNetwork::KResolver::CanonName);
if (!res.isEmpty()) {
- QString old = d->kssl->peerInfo().peerHost();
+ TQString old = d->kssl->peerInfo().peerHost();
d->kssl->peerInfo().setPeerHost(res[0].canonicalName());
_IPmatchesCN = d->kssl->peerInfo().certMatchesAddress();
if (!_IPmatchesCN) {
@@ -795,26 +795,26 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_cipher_version",
d->kssl->connectionInfo().getCipherVersion());
setMetaData("ssl_cipher_used_bits",
- QString::number(d->kssl->connectionInfo().getCipherUsedBits()));
+ TQString::number(d->kssl->connectionInfo().getCipherUsedBits()));
setMetaData("ssl_cipher_bits",
- QString::number(d->kssl->connectionInfo().getCipherBits()));
+ TQString::number(d->kssl->connectionInfo().getCipherBits()));
setMetaData("ssl_peer_ip", d->ip);
if (!d->realHost.isEmpty()) {
setMetaData("ssl_proxied", "true");
}
- QString errorStr;
+ TQString errorStr;
for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin();
it != ksvl.end(); ++it)
{
- errorStr += QString::number(*it)+":";
+ errorStr += TQString::number(*it)+":";
}
setMetaData("ssl_cert_errors", errorStr);
setMetaData("ssl_peer_certificate", pc.toString());
if (pc.chain().isValid() && pc.chain().depth() > 1) {
- QString theChain;
- QPtrList<KSSLCertificate> chain = pc.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = pc.chain().getChain();
chain.setAutoDelete(true);
for (KSSLCertificate *c = chain.first(); c; c = chain.next()) {
theChain += c->toString();
@@ -823,7 +823,7 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_peer_chain", theChain);
} else setMetaData("ssl_peer_chain", "");
- setMetaData("ssl_cert_state", QString::number(ksv));
+ setMetaData("ssl_cert_state", TQString::number(ksv));
if (ksv == KSSLCertificate::Ok) {
rc = 1;
@@ -872,7 +872,7 @@ int TCPSlaveBase::verifyCertificate()
{
do {
if (ksv == KSSLCertificate::InvalidHost) {
- QString msg = i18n("The IP address of the host %1 "
+ TQString msg = i18n("The IP address of the host %1 "
"does not match the one the "
"certificate was issued to.");
result = messageBox( WarningYesNoCancel,
@@ -881,7 +881,7 @@ int TCPSlaveBase::verifyCertificate()
i18n("&Details"),
i18n("Co&ntinue") );
} else {
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( WarningYesNoCancel,
msg.arg(ourHost),
@@ -896,17 +896,17 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result == KMessageBox::Yes);
@@ -1011,7 +1011,7 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_action", "reject");
} else {
do {
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox(WarningYesNoCancel,
msg.arg(ourHost),
@@ -1024,16 +1024,16 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result == KMessageBox::Yes);
@@ -1108,16 +1108,16 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result != KMessageBox::No);
@@ -1274,7 +1274,7 @@ void TCPSlaveBase::setEnableSSLTunnel( bool enable )
d->useSSLTunneling = enable;
}
-void TCPSlaveBase::setRealHost( const QString& realHost )
+void TCPSlaveBase::setRealHost( const TQString& realHost )
{
d->realHost = realHost;
}
@@ -1282,7 +1282,7 @@ void TCPSlaveBase::setRealHost( const QString& realHost )
bool TCPSlaveBase::doSSLHandShake( bool sendError )
{
kdDebug(7029) << "TCPSlaveBase::doSSLHandShake: " << endl;
- QString msgHost = d->host;
+ TQString msgHost = d->host;
d->kssl->reInitialize();
diff --git a/kio/kio/tcpslavebase.h b/kio/kio/tcpslavebase.h
index 21b391dac..bbf2bb95f 100644
--- a/kio/kio/tcpslavebase.h
+++ b/kio/kio/tcpslavebase.h
@@ -45,11 +45,11 @@ namespace KIO {
class KIO_EXPORT TCPSlaveBase : public SlaveBase
{
public:
- TCPSlaveBase(unsigned short int defaultPort, const QCString &protocol,
- const QCString &poolSocket, const QCString &appSocket);
+ TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol,
+ const TQCString &poolSocket, const TQCString &appSocket);
- TCPSlaveBase(unsigned short int defaultPort, const QCString &protocol,
- const QCString &poolSocket, const QCString &appSocket,
+ TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol,
+ const TQCString &poolSocket, const TQCString &appSocket,
bool useSSL);
virtual ~TCPSlaveBase();
@@ -80,7 +80,7 @@ protected:
/**
* @deprecated Due to inconsistency with KDE naming convention.
*/
- KDE_DEPRECATED bool ConnectToHost( const QString &host, unsigned int port,
+ KDE_DEPRECATED bool ConnectToHost( const TQString &host, unsigned int port,
bool sendError ) { return connectToHost( host, port, sendError ); }
/**
@@ -170,7 +170,7 @@ protected:
* on failure, false is returned and an appropriate
* error message is send to the application.
*/
- bool connectToHost( const QString &host, unsigned int port,
+ bool connectToHost( const TQString &host, unsigned int port,
bool sendError = true );
/**
@@ -352,7 +352,7 @@ protected:
*
* @param realHost the actual host name we are connecting to
*/
- void setRealHost( const QString& realHost );
+ void setRealHost( const TQString& realHost );
// don't use me!
void doConstructorStuff();
@@ -371,7 +371,7 @@ protected:
bool m_bIsSSL;
unsigned short int m_iPort;
unsigned short int m_iDefaultPort;
- QCString m_sServiceName;
+ TQCString m_sServiceName;
FILE *fp;
private:
diff --git a/kio/kio/thumbcreator.h b/kio/kio/thumbcreator.h
index 4612a0916..f16132b3a 100644
--- a/kio/kio/thumbcreator.h
+++ b/kio/kio/thumbcreator.h
@@ -20,7 +20,7 @@
#ifndef _THUMBCREATOR_H_
#define _THUMBCREATOR_H_
-#include <qstring.h>
+#include <tqstring.h>
class QString;
class QImage;
@@ -106,7 +106,7 @@ public:
*
* @return true if preview generation succeeded
*/
- virtual bool create(const QString &path, int width, int height, QImage &img) = 0;
+ virtual bool create(const TQString &path, int width, int height, TQImage &img) = 0;
/**
* The flags of this plugin:
diff --git a/kio/kioexec/main.cpp b/kio/kioexec/main.cpp
index 12a2d64bf..e444ebd46 100644
--- a/kio/kioexec/main.cpp
+++ b/kio/kioexec/main.cpp
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <sys/stat.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -61,11 +61,11 @@ static KCmdLineOptions options[] =
int jobCounter = 0;
-QPtrList<KIO::Job>* jobList = 0L;
+TQPtrList<KIO::Job>* jobList = 0L;
KIOExec::KIOExec()
{
- jobList = new QPtrList<KIO::Job>;
+ jobList = new TQPtrList<KIO::Job>;
jobList->setAutoDelete( false ); // jobs autodelete themselves
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -74,7 +74,7 @@ KIOExec::KIOExec()
tempfiles = args->isSet("tempfiles");
if ( args->isSet( "suggestedfilename" ) )
- suggestedFileName = QString::fromLocal8Bit( args->getOption( "suggestedfilename" ) );
+ suggestedFileName = TQString::fromLocal8Bit( args->getOption( "suggestedfilename" ) );
expectedCounter = 0;
command = args->arg(0);
kdDebug() << "command=" << command << endl;
@@ -105,14 +105,14 @@ KIOExec::KIOExec()
else
// We must fetch the file
{
- QString fileName = KIO::encodeFileName( url.fileName() );
+ TQString fileName = KIO::encodeFileName( url.fileName() );
if ( !suggestedFileName.isEmpty() )
fileName = suggestedFileName;
// Build the destination filename, in ~/.kde/cache-*/krun/
// Unlike KDE-1.1, we put the filename at the end so that the extension is kept
// (Some programs rely on it)
- QString tmp = KGlobal::dirs()->saveLocation( "cache", "krun/" ) +
- QString("%1.%2.%3").arg(getpid()).arg(jobCounter++).arg(fileName);
+ TQString tmp = KGlobal::dirs()->saveLocation( "cache", "krun/" ) +
+ TQString("%1.%2.%3").arg(getpid()).arg(jobCounter++).arg(fileName);
fileInfo file;
file.path = tmp;
file.url = url;
@@ -125,7 +125,7 @@ KIOExec::KIOExec()
KIO::Job *job = KIO::file_copy( url, dest );
jobList->append( job );
- connect( job, SIGNAL( result( KIO::Job * ) ), SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotResult( KIO::Job * ) ) );
}
}
}
@@ -133,7 +133,7 @@ KIOExec::KIOExec()
if ( tempfiles ) {
// #113991
- QTimer::singleShot( 0, this, SLOT( slotRunApp() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) );
//slotRunApp(); // does not return
return;
}
@@ -152,9 +152,9 @@ void KIOExec::slotResult( KIO::Job * job )
if ( (job->error() != KIO::ERR_USER_CANCELED) )
KMessageBox::error( 0L, job->errorString() );
- QString path = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
+ TQString path = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
- QValueList<fileInfo>::Iterator it = fileList.begin();
+ TQValueList<fileInfo>::Iterator it = fileList.begin();
for(;it != fileList.end(); ++it)
{
if ((*it).path == path)
@@ -174,7 +174,7 @@ void KIOExec::slotResult( KIO::Job * job )
kdDebug() << "All files downloaded, will call slotRunApp shortly" << endl;
// We know we can run the app now - but let's finish the job properly first.
- QTimer::singleShot( 0, this, SLOT( slotRunApp() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) );
jobList->clear();
}
@@ -186,21 +186,21 @@ void KIOExec::slotRunApp()
exit(1);
}
- KService service("dummy", command, QString::null);
+ KService service("dummy", command, TQString::null);
KURL::List list;
// Store modification times
- QValueList<fileInfo>::Iterator it = fileList.begin();
+ TQValueList<fileInfo>::Iterator it = fileList.begin();
for ( ; it != fileList.end() ; ++it )
{
KDE_struct_stat buff;
- (*it).time = KDE_stat( QFile::encodeName((*it).path), &buff ) ? 0 : buff.st_mtime;
+ (*it).time = KDE_stat( TQFile::encodeName((*it).path), &buff ) ? 0 : buff.st_mtime;
KURL url;
url.setPath((*it).path);
list << url;
}
- QStringList params = KRun::processDesktopExec(service, list, false /*no shell*/);
+ TQStringList params = KRun::processDesktopExec(service, list, false /*no shell*/);
kdDebug() << "EXEC " << KShell::joinArgs( params ) << endl;
@@ -226,9 +226,9 @@ void KIOExec::slotRunApp()
for( ;it != fileList.end(); ++it )
{
KDE_struct_stat buff;
- QString src = (*it).path;
+ TQString src = (*it).path;
KURL dest = (*it).url;
- if ( (KDE_stat( QFile::encodeName(src), &buff ) == 0) &&
+ if ( (KDE_stat( TQFile::encodeName(src), &buff ) == 0) &&
((*it).time != buff.st_mtime) )
{
if ( tempfiles )
@@ -244,7 +244,7 @@ void KIOExec::slotRunApp()
i18n( "The file\n%1\nhas been modified.\nDo you want to upload the changes?" ).arg(dest.prettyURL()),
i18n( "File Changed" ), i18n("Upload"), i18n("Do Not Upload") ) == KMessageBox::Yes )
{
- kdDebug() << QString("src='%1' dest='%2'").arg(src).arg(dest.url()).ascii() << endl;
+ kdDebug() << TQString("src='%1' dest='%2'").arg(src).arg(dest.url()).ascii() << endl;
// Do it the synchronous way.
if ( !KIO::NetAccess::upload( src, dest, 0 ) )
{
@@ -261,7 +261,7 @@ void KIOExec::slotRunApp()
kdDebug() << "sleeping..." << endl;
sleep(180); // 3 mn
kdDebug() << "about to delete " << src << endl;
- unlink( QFile::encodeName(src) );
+ unlink( TQFile::encodeName(src) );
}
}
diff --git a/kio/kioexec/main.h b/kio/kioexec/main.h
index 8fb98130f..59f1cdac2 100644
--- a/kio/kioexec/main.h
+++ b/kio/kioexec/main.h
@@ -1,10 +1,10 @@
#ifndef _main_h
#define _main_h
-#include <qobject.h>
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqtimer.h>
namespace KIO { class Job; }
@@ -20,16 +20,16 @@ public slots:
protected:
bool tempfiles;
- QString suggestedFileName;
+ TQString suggestedFileName;
int counter;
int expectedCounter;
- QString command;
+ TQString command;
struct fileInfo {
- QString path;
+ TQString path;
KURL url;
int time;
};
- QValueList<fileInfo> fileList;
+ TQValueList<fileInfo> fileList;
};
#endif
diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp
index c1ca8751f..de4e0d147 100644
--- a/kio/kpasswdserver/kpasswdserver.cpp
+++ b/kio/kpasswdserver/kpasswdserver.cpp
@@ -27,7 +27,7 @@
#include <time.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <klocale.h>
@@ -43,14 +43,14 @@
#endif
extern "C" {
- KDE_EXPORT KDEDModule *create_kpasswdserver(const QCString &name)
+ KDE_EXPORT KDEDModule *create_kpasswdserver(const TQCString &name)
{
return new KPasswdServer(name);
}
}
int
-KPasswdServer::AuthInfoList::compareItems(QPtrCollection::Item n1, QPtrCollection::Item n2)
+KPasswdServer::AuthInfoList::compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2)
{
if (!n1 || !n2)
return 0;
@@ -69,15 +69,15 @@ KPasswdServer::AuthInfoList::compareItems(QPtrCollection::Item n1, QPtrCollectio
}
-KPasswdServer::KPasswdServer(const QCString &name)
+KPasswdServer::KPasswdServer(const TQCString &name)
: KDEDModule(name)
{
m_authDict.setAutoDelete(true);
m_authPending.setAutoDelete(true);
m_seqNr = 0;
m_wallet = 0;
- connect(this, SIGNAL(windowUnregistered(long)),
- this, SLOT(removeAuthForWindowId(long)));
+ connect(this, TQT_SIGNAL(windowUnregistered(long)),
+ this, TQT_SLOT(removeAuthForWindowId(long)));
}
KPasswdServer::~KPasswdServer()
@@ -86,21 +86,21 @@ KPasswdServer::~KPasswdServer()
}
// Helper - returns the wallet key to use for read/store/checking for existence.
-static QString makeWalletKey( const QString& key, const QString& realm )
+static TQString makeWalletKey( const TQString& key, const TQString& realm )
{
return realm.isEmpty() ? key : key + '-' + realm;
}
// Helper for storeInWallet/readFromWallet
-static QString makeMapKey( const char* key, int entryNumber )
+static TQString makeMapKey( const char* key, int entryNumber )
{
- QString str = QString::fromLatin1( key );
+ TQString str = TQString::fromLatin1( key );
if ( entryNumber > 1 )
- str += "-" + QString::number( entryNumber );
+ str += "-" + TQString::number( entryNumber );
return str;
}
-static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KIO::AuthInfo &info )
+static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const KIO::AuthInfo &info )
{
if ( !wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
if ( !wallet->createFolder( KWallet::Wallet::PasswordFolder() ) )
@@ -108,10 +108,10 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
// Before saving, check if there's already an entry with this login.
// If so, replace it (with the new password). Otherwise, add a new entry.
- typedef QMap<QString,QString> Map;
+ typedef TQMap<TQString,TQString> Map;
int entryNumber = 1;
Map map;
- QString walletKey = makeWalletKey( key, info.realmValue );
+ TQString walletKey = makeWalletKey( key, info.realmValue );
kdDebug(130) << "storeInWallet: walletKey=" << walletKey << " reading existing map" << endl;
if ( wallet->readMap( walletKey, map ) == 0 ) {
Map::ConstIterator end = map.end();
@@ -120,12 +120,12 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
if ( it.data() == info.username ) {
break; // OK, overwrite this entry
}
- it = map.find( QString( "login-" ) + QString::number( ++entryNumber ) );
+ it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) );
}
// If no entry was found, create a new entry - entryNumber is set already.
}
- const QString loginKey = makeMapKey( "login", entryNumber );
- const QString passwordKey = makeMapKey( "password", entryNumber );
+ const TQString loginKey = makeMapKey( "login", entryNumber );
+ const TQString passwordKey = makeMapKey( "password", entryNumber );
kdDebug(130) << "storeInWallet: writing to " << loginKey << "," << passwordKey << endl;
// note the overwrite=true by default
map.insert( loginKey, info.username );
@@ -135,17 +135,17 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
}
-static bool readFromWallet( KWallet::Wallet* wallet, const QString& key, const QString& realm, QString& username, QString& password, bool userReadOnly, QMap<QString,QString>& knownLogins )
+static bool readFromWallet( KWallet::Wallet* wallet, const TQString& key, const TQString& realm, TQString& username, TQString& password, bool userReadOnly, TQMap<TQString,TQString>& knownLogins )
{
//kdDebug(130) << "readFromWallet: key=" << key << " username=" << username << " password=" /*<< password*/ << " userReadOnly=" << userReadOnly << " realm=" << realm << endl;
if ( wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
{
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
if ( wallet->readMap( makeWalletKey( key, realm ), map ) == 0 )
{
- typedef QMap<QString,QString> Map;
+ typedef TQMap<TQString,TQString> Map;
int entryNumber = 1;
Map::ConstIterator end = map.end();
Map::ConstIterator it = map.find( "login" );
@@ -158,7 +158,7 @@ static bool readFromWallet( KWallet::Wallet* wallet, const QString& key, const Q
knownLogins.insert( it.data(), pwdIter.data() );
}
- it = map.find( QString( "login-" ) + QString::number( ++entryNumber ) );
+ it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) );
}
//kdDebug(130) << knownLogins.count() << " known logins" << endl;
@@ -189,10 +189,10 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
if( usertime != 0 )
kapp->updateUserTimestamp( usertime );
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
Request *request = m_authPending.first();
- QString path2 = info.url.directory(false, false);
+ TQString path2 = info.url.directory(false, false);
for(; request; request = m_authPending.next())
{
if (request->key != key)
@@ -200,7 +200,7 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
if (info.verifyPath)
{
- QString path1 = request->info.url.directory(false, false);
+ TQString path1 = request->info.url.directory(false, false);
if (!path2.startsWith(path1))
continue;
}
@@ -222,7 +222,7 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
!KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(),
KWallet::Wallet::PasswordFolder(), makeWalletKey(key, info.realmValue)))
{
- QMap<QString, QString> knownLogins;
+ TQMap<TQString, TQString> knownLogins;
if (openWallet(windowId)) {
if (readFromWallet(m_wallet, key, info.realmValue, info.username, info.password,
info.readOnly, knownLogins))
@@ -243,13 +243,13 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
}
KIO::AuthInfo
-KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId, long seqNr)
+KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr)
{
return queryAuthInfo(info, errorMsg, windowId, seqNr, 0 );
}
KIO::AuthInfo
-KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId, long seqNr, unsigned long usertime)
+KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr, unsigned long usertime)
{
kdDebug(130) << "KPasswdServer::queryAuthInfo: User= " << info.username
<< ", Message= " << info.prompt << ", WindowId = " << windowId << endl;
@@ -258,7 +258,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
if( usertime != 0 )
kapp->updateUserTimestamp( usertime );
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
Request *request = new Request;
request->client = callingDcopClient();
request->transaction = request->client->beginTransaction();
@@ -268,7 +268,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
request->seqNr = seqNr;
if (errorMsg == "<NoAuthPrompt>")
{
- request->errorMsg = QString::null;
+ request->errorMsg = TQString::null;
request->prompt = false;
}
else
@@ -279,7 +279,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
m_authPending.append(request);
if (m_authPending.count() == 1)
- QTimer::singleShot(0, this, SLOT(processRequest()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processRequest()));
return info;
}
@@ -289,7 +289,7 @@ KPasswdServer::addAuthInfo(KIO::AuthInfo info, long windowId)
{
kdDebug(130) << "KPasswdServer::addAuthInfo: User= " << info.username
<< ", RealmValue= " << info.realmValue << ", WindowId = " << windowId << endl;
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
m_seqNr++;
@@ -342,7 +342,7 @@ KPasswdServer::processRequest()
if (result && !info.username.isEmpty() &&
!request->errorMsg.isEmpty())
{
- QString prompt = request->errorMsg;
+ TQString prompt = request->errorMsg;
prompt += i18n(" Do you want to retry?");
int dlgResult = KMessageBox::warningContinueCancelWId(request->windowId, prompt,
i18n("Authentication"), i18n("Retry"));
@@ -350,13 +350,13 @@ KPasswdServer::processRequest()
askPw = false;
}
- int dlgResult = QDialog::Rejected;
+ int dlgResult = TQDialog::Rejected;
if (askPw)
{
- QString username = info.username;
- QString password = info.password;
+ TQString username = info.username;
+ TQString password = info.password;
bool hasWalletData = false;
- QMap<QString, QString> knownLogins;
+ TQMap<TQString, TQString> knownLogins;
if ( ( username.isEmpty() || password.isEmpty() )
&& !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::PasswordFolder(), makeWalletKey( request->key, info.realmValue )) )
@@ -392,7 +392,7 @@ KPasswdServer::processRequest()
dlgResult = dlg.exec();
- if (dlgResult == QDialog::Accepted)
+ if (dlgResult == TQDialog::Accepted)
{
info.username = dlg.username();
info.password = dlg.password();
@@ -411,7 +411,7 @@ KPasswdServer::processRequest()
}
}
}
- if ( dlgResult != QDialog::Accepted )
+ if ( dlgResult != TQDialog::Accepted )
{
addAuthInfoItem(request->key, info, 0, m_seqNr, true);
info.setModified( false );
@@ -423,10 +423,10 @@ KPasswdServer::processRequest()
}
}
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << info << m_seqNr;
replyType = "KIO::AuthInfo";
request->client->endTransaction( request->transaction,
@@ -439,10 +439,10 @@ KPasswdServer::processRequest()
waitRequest; )
{
bool keepQueued = false;
- QString key = waitRequest->key;
+ TQString key = waitRequest->key;
request = m_authPending.first();
- QString path2 = waitRequest->info.url.directory(false, false);
+ TQString path2 = waitRequest->info.url.directory(false, false);
for(; request; request = m_authPending.next())
{
if (request->key != key)
@@ -450,7 +450,7 @@ KPasswdServer::processRequest()
if (info.verifyPath)
{
- QString path1 = request->info.url.directory(false, false);
+ TQString path1 = request->info.url.directory(false, false);
if (!path2.startsWith(path1))
continue;
}
@@ -466,10 +466,10 @@ KPasswdServer::processRequest()
{
const AuthInfo *result = findAuthInfoItem(waitRequest->key, waitRequest->info);
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
if (!result || result->isCanceled)
{
@@ -493,20 +493,20 @@ KPasswdServer::processRequest()
}
if (m_authPending.count())
- QTimer::singleShot(0, this, SLOT(processRequest()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processRequest()));
}
-QString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
+TQString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
{
if( !info.url.isValid() ) {
// Note that a null key will break findAuthInfoItem later on...
kdWarning(130) << "createCacheKey: invalid URL " << info.url << endl;
- return QString::null;
+ return TQString::null;
}
// Generate the basic key sequence.
- QString key = info.url.protocol();
+ TQString key = info.url.protocol();
key += '-';
if (!info.url.user().isEmpty())
{
@@ -518,7 +518,7 @@ QString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
if( port )
{
key += ':';
- key += QString::number(port);
+ key += TQString::number(port);
}
return key;
@@ -539,13 +539,13 @@ KPasswdServer::copyAuthInfo(const AuthInfo *i)
}
const KPasswdServer::AuthInfo *
-KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
+KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
return 0;
- QString path2 = info.url.directory(false, false);
+ TQString path2 = info.url.directory(false, false);
for(AuthInfo *current = authList->first();
current; )
{
@@ -559,7 +559,7 @@ KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
if (info.verifyPath)
{
- QString path1 = current->directory;
+ TQString path1 = current->directory;
if (path2.startsWith(path1) &&
(info.username.isEmpty() || info.username == current->username))
return current;
@@ -577,7 +577,7 @@ KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
}
void
-KPasswdServer::removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
+KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
@@ -604,7 +604,7 @@ KPasswdServer::removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
void
-KPasswdServer::addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled)
+KPasswdServer::addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
@@ -649,7 +649,7 @@ KPasswdServer::addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, lo
}
void
-KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long windowId, bool keep)
+KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long windowId, bool keep)
{
AuthInfo *current = const_cast<AuthInfo *>(auth);
if (keep)
@@ -670,7 +670,7 @@ KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long w
// Update mWindowIdList
if (windowId)
{
- QStringList *keysChanged = mWindowIdList.find(windowId);
+ TQStringList *keysChanged = mWindowIdList.find(windowId);
if (!keysChanged)
{
keysChanged = new QStringList;
@@ -684,13 +684,13 @@ KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long w
void
KPasswdServer::removeAuthForWindowId(long windowId)
{
- QStringList *keysChanged = mWindowIdList.find(windowId);
+ TQStringList *keysChanged = mWindowIdList.find(windowId);
if (!keysChanged) return;
- for(QStringList::ConstIterator it = keysChanged->begin();
+ for(TQStringList::ConstIterator it = keysChanged->begin();
it != keysChanged->end(); ++it)
{
- QString key = *it;
+ TQString key = *it;
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
continue;
diff --git a/kio/kpasswdserver/kpasswdserver.h b/kio/kpasswdserver/kpasswdserver.h
index 31e8b9a2d..cf44681bf 100644
--- a/kio/kpasswdserver/kpasswdserver.h
+++ b/kio/kpasswdserver/kpasswdserver.h
@@ -25,8 +25,8 @@
#ifndef KPASSWDSERVER_H
#define KPASSWDSERVER_H
-#include <qdict.h>
-#include <qintdict.h>
+#include <tqdict.h>
+#include <tqintdict.h>
#include <dcopclient.h>
#include <kio/authinfo.h>
@@ -41,15 +41,15 @@ class KPasswdServer : public KDEDModule
Q_OBJECT
K_DCOP
public:
- KPasswdServer(const QCString &);
+ KPasswdServer(const TQCString &);
~KPasswdServer();
k_dcop:
// KDE4 merge
KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long, unsigned long);
KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long);
- KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, QString, long, long, unsigned long);
- KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, QString, long, long);
+ KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long, unsigned long);
+ KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long);
void addAuthInfo(KIO::AuthInfo, long);
public slots:
@@ -60,56 +60,56 @@ public slots:
protected:
struct AuthInfo;
- QString createCacheKey( const KIO::AuthInfo &info );
- const AuthInfo *findAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
- void removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
- void addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
+ TQString createCacheKey( const KIO::AuthInfo &info );
+ const AuthInfo *findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info);
+ void removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info);
+ void addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
KIO::AuthInfo copyAuthInfo(const AuthInfo *);
- void updateAuthExpire(const QString &key, const AuthInfo *, long windowId, bool keep);
- int findWalletEntry( const QMap<QString,QString>& map, const QString& username );
+ void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep);
+ int findWalletEntry( const TQMap<TQString,TQString>& map, const TQString& username );
bool openWallet( WId windowId );
struct AuthInfo {
AuthInfo() { expire = expNever; isCanceled = false; seqNr = 0; }
KURL url;
- QString directory;
- QString username;
- QString password;
- QString realmValue;
- QString digestInfo;
+ TQString directory;
+ TQString username;
+ TQString password;
+ TQString realmValue;
+ TQString digestInfo;
enum { expNever, expWindowClose, expTime } expire;
- QValueList<long> windowList;
+ TQValueList<long> windowList;
unsigned long expireTime;
long seqNr;
bool isCanceled;
};
- class AuthInfoList : public QPtrList<AuthInfo>
+ class AuthInfoList : public TQPtrList<AuthInfo>
{
public:
AuthInfoList() { setAutoDelete(true); }
- int compareItems(QPtrCollection::Item n1, QPtrCollection::Item n2);
+ int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2);
};
- QDict< AuthInfoList > m_authDict;
+ TQDict< AuthInfoList > m_authDict;
struct Request {
DCOPClient *client;
DCOPClientTransaction *transaction;
- QString key;
+ TQString key;
KIO::AuthInfo info;
- QString errorMsg;
+ TQString errorMsg;
long windowId;
long seqNr;
bool prompt;
};
- QPtrList< Request > m_authPending;
- QPtrList< Request > m_authWait;
- QIntDict<QStringList> mWindowIdList;
+ TQPtrList< Request > m_authPending;
+ TQPtrList< Request > m_authWait;
+ TQIntDict<TQStringList> mWindowIdList;
DCOPClient *m_dcopClient;
KWallet::Wallet* m_wallet;
long m_seqNr;
diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc
index f336e9c55..9252bd223 100644
--- a/kio/kssl/kopenssl.cc
+++ b/kio/kssl/kopenssl.cc
@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <kconfig.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
@@ -218,27 +218,27 @@ void KOpenSSLProxy::destroy() {
}
#ifdef __OpenBSD__
-#include <qdir.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-static QString findMostRecentLib(QString dir, QString name)
+static TQString findMostRecentLib(TQString dir, TQString name)
{
// Grab all shared libraries in the directory
- QString filter = "lib"+name+".so.*";
- QDir d(dir, filter);
+ TQString filter = "lib"+name+".so.*";
+ TQDir d(dir, filter);
if (!d.exists())
return 0L;
- QStringList l = d.entryList();
+ TQStringList l = d.entryList();
// Find the best one
int bestmaj = -1;
int bestmin = -1;
- QString best = 0L;
+ TQString best = 0L;
// where do we start
uint s = filter.length()-1;
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
- QString numberpart = (*it).mid(s);
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it) {
+ TQString numberpart = (*it).mid(s);
uint endmaj = numberpart.find('.');
if (endmaj == -1)
continue;
@@ -266,7 +266,7 @@ static QString findMostRecentLib(QString dir, QString name)
KOpenSSLProxy::KOpenSSLProxy() {
KLibLoader *ll = KLibLoader::self();
_ok = false;
-QStringList libpaths, libnamesc, libnamess;
+TQStringList libpaths, libnamesc, libnamess;
KConfig *cfg;
_cryptoLib = 0L;
@@ -274,7 +274,7 @@ KConfig *cfg;
cfg = new KConfig("cryptodefaults", false, false);
cfg->setGroup("OpenSSL");
- QString upath = cfg->readPathEntry("Path");
+ TQString upath = cfg->readPathEntry("Path");
if (!upath.isEmpty())
libpaths << upath;
@@ -282,7 +282,7 @@ KConfig *cfg;
#ifdef __OpenBSD__
{
- QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
+ TQString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
if (!libname.isNull())
_cryptoLib = ll->globalLibrary(libname.latin1());
}
@@ -352,18 +352,18 @@ KConfig *cfg;
;
#endif
- for (QStringList::Iterator it = libpaths.begin();
+ for (TQStringList::Iterator it = libpaths.begin();
it != libpaths.end();
++it) {
- for (QStringList::Iterator shit = libnamesc.begin();
+ for (TQStringList::Iterator shit = libnamesc.begin();
shit != libnamesc.end();
++shit) {
- QString alib = *it;
+ TQString alib = *it;
if (!alib.isEmpty() && !alib.endsWith("/"))
alib += "/";
alib += *shit;
- QString tmpStr(alib.latin1());
- tmpStr.replace(QRegExp("\\(.*\\)"), "");
+ TQString tmpStr(alib.latin1());
+ tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_cryptoLib = ll->globalLibrary(alib.latin1());
if (_cryptoLib) break;
@@ -499,23 +499,23 @@ KConfig *cfg;
#ifdef __OpenBSD__
{
- QString libname = findMostRecentLib("/usr/lib", "ssl");
+ TQString libname = findMostRecentLib("/usr/lib", "ssl");
if (!libname.isNull())
_sslLib = ll->globalLibrary(libname.latin1());
}
#else
- for (QStringList::Iterator it = libpaths.begin();
+ for (TQStringList::Iterator it = libpaths.begin();
it != libpaths.end();
++it) {
- for (QStringList::Iterator shit = libnamess.begin();
+ for (TQStringList::Iterator shit = libnamess.begin();
shit != libnamess.end();
++shit) {
- QString alib = *it;
+ TQString alib = *it;
if (!alib.isEmpty() && !alib.endsWith("/"))
alib += "/";
alib += *shit;
- QString tmpStr(alib.latin1());
- tmpStr.replace(QRegExp("\\(.*\\)"), "");
+ TQString tmpStr(alib.latin1());
+ tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_sslLib = ll->globalLibrary(alib.latin1());
if (_sslLib) break;
diff --git a/kio/kssl/ksmimecrypto.cc b/kio/kssl/ksmimecrypto.cc
index 8b171ddb4..c96f9ec6d 100644
--- a/kio/kssl/ksmimecrypto.cc
+++ b/kio/kssl/ksmimecrypto.cc
@@ -19,9 +19,9 @@
*/
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include "kopenssl.h"
@@ -57,26 +57,26 @@ public:
KSMIMECryptoPrivate(KOpenSSLProxy *kossl);
- STACK_OF(X509) *certsToX509(QPtrList<KSSLCertificate> &certs);
+ STACK_OF(X509) *certsToX509(TQPtrList<KSSLCertificate> &certs);
KSMIMECrypto::rc signMessage(BIO *clearText,
BIO *cipherText,
- KSSLPKCS12 &privKey, QPtrList<KSSLCertificate> &certs,
+ KSSLPKCS12 &privKey, TQPtrList<KSSLCertificate> &certs,
bool detached);
KSMIMECrypto::rc encryptMessage(BIO *clearText,
BIO *cipherText, KSMIMECrypto::algo algorithm,
- QPtrList<KSSLCertificate> &recip);
+ TQPtrList<KSSLCertificate> &recip);
KSMIMECrypto::rc checkSignature(BIO *clearText,
BIO *signature, bool detached,
- QPtrList<KSSLCertificate> &recip);
+ TQPtrList<KSSLCertificate> &recip);
KSMIMECrypto::rc decryptMessage(BIO *cipherText,
BIO *clearText,
KSSLPKCS12 &privKey);
- void MemBIOToQByteArray(BIO *src, QByteArray &dest);
+ void MemBIOToQByteArray(BIO *src, TQByteArray &dest);
KSMIMECrypto::rc sslErrToRc(void);
};
@@ -86,7 +86,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate(KOpenSSLProxy *kossl): kossl(kossl) {
}
-STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
+STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(TQPtrList<KSSLCertificate> &certs) {
STACK_OF(X509) *x509 = sk_new(NULL);
KSSLCertificate *cert = certs.first();
while(cert) {
@@ -99,7 +99,7 @@ STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &cert
KSMIMECrypto::rc KSMIMECryptoPrivate::signMessage(BIO *clearText,
BIO *cipherText,
- KSSLPKCS12 &privKey, QPtrList<KSSLCertificate> &certs,
+ KSSLPKCS12 &privKey, TQPtrList<KSSLCertificate> &certs,
bool detached) {
STACK_OF(X509) *other = NULL;
@@ -128,7 +128,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::signMessage(BIO *clearText,
KSMIMECrypto::rc KSMIMECryptoPrivate::encryptMessage(BIO *clearText,
BIO *cipherText, KSMIMECrypto::algo algorithm,
- QPtrList<KSSLCertificate> &recip) {
+ TQPtrList<KSSLCertificate> &recip) {
EVP_CIPHER *cipher = NULL;
KSMIMECrypto::rc rc;
switch(algorithm) {
@@ -172,7 +172,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::encryptMessage(BIO *clearText,
KSMIMECrypto::rc KSMIMECryptoPrivate::checkSignature(BIO *clearText,
BIO *signature, bool detached,
- QPtrList<KSSLCertificate> &recip) {
+ TQPtrList<KSSLCertificate> &recip) {
PKCS7 *p7 = kossl->d2i_PKCS7_bio(signature, NULL);
KSMIMECrypto::rc rc = KSMIMECrypto::KSC_R_OTHER;
@@ -234,7 +234,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::decryptMessage(BIO *cipherText,
}
-void KSMIMECryptoPrivate::MemBIOToQByteArray(BIO *src, QByteArray &dest) {
+void KSMIMECryptoPrivate::MemBIOToQByteArray(BIO *src, TQByteArray &dest) {
char *buf;
long len = BIO_get_mem_data(src, &buf);
dest.assign(buf, len);
@@ -303,10 +303,10 @@ KSMIMECrypto::~KSMIMECrypto() {
}
-KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
- QByteArray &cipherText,
+KSMIMECrypto::rc KSMIMECrypto::signMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
const KSSLPKCS12 &privKey,
- const QPtrList<KSSLCertificate> &certs,
+ const TQPtrList<KSSLCertificate> &certs,
bool detached) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -315,7 +315,7 @@ KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
rc rc = priv->signMessage(in, out,
const_cast<KSSLPKCS12 &>(privKey),
- const_cast<QPtrList<KSSLCertificate> &>(certs),
+ const_cast<TQPtrList<KSSLCertificate> &>(certs),
detached);
if (!rc) priv->MemBIOToQByteArray(out, cipherText);
@@ -330,9 +330,9 @@ KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const QCString &clearText,
- const QByteArray &signature,
- QPtrList<KSSLCertificate> &foundCerts) {
+KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const TQCString &clearText,
+ const TQByteArray &signature,
+ TQPtrList<KSSLCertificate> &foundCerts) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
BIO *txt = kossl->BIO_new_mem_buf((char *)clearText.data(), clearText.length());
@@ -350,9 +350,9 @@ KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const QByteArray &signedText,
- QCString &clearText,
- QPtrList<KSSLCertificate> &foundCerts) {
+KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const TQByteArray &signedText,
+ TQCString &clearText,
+ TQPtrList<KSSLCertificate> &foundCerts) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -374,10 +374,10 @@ KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const QByteArray &signedText
}
-KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
- QByteArray &cipherText,
+KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
algo algorithm,
- const QPtrList<KSSLCertificate> &recip) {
+ const TQPtrList<KSSLCertificate> &recip) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -385,7 +385,7 @@ KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
BIO *out = kossl->BIO_new(kossl->BIO_s_mem());
rc rc = priv->encryptMessage(in,out,algorithm,
- const_cast< QPtrList<KSSLCertificate> &>(recip));
+ const_cast< TQPtrList<KSSLCertificate> &>(recip));
if (!rc) priv->MemBIOToQByteArray(out, cipherText);
@@ -399,8 +399,8 @@ KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::decryptMessage(const QByteArray &cipherText,
- QCString &clearText,
+KSMIMECrypto::rc KSMIMECrypto::decryptMessage(const TQByteArray &cipherText,
+ TQCString &clearText,
const KSSLPKCS12 &privKey) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
diff --git a/kio/kssl/ksmimecrypto.h b/kio/kssl/ksmimecrypto.h
index e49028422..95d17a8a8 100644
--- a/kio/kssl/ksmimecrypto.h
+++ b/kio/kssl/ksmimecrypto.h
@@ -22,8 +22,8 @@
#define __KSMIMECRYPTO_H
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include "ksslpkcs12.h"
#include "ksslcertificate.h"
@@ -60,10 +60,10 @@ class KIO_EXPORT KSMIMECrypto {
* @param detached create detached or opaque signature
* @return 0 on success
*/
- rc signMessage(const QCString &clearText,
- QByteArray &cipherText,
+ rc signMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
const KSSLPKCS12 &privKey,
- const QPtrList<KSSLCertificate> &certs,
+ const TQPtrList<KSSLCertificate> &certs,
bool detached);
/**
@@ -75,9 +75,9 @@ class KIO_EXPORT KSMIMECrypto {
* @param foundCerts certificates found in this message
* @return 0 on success
*/
- rc checkDetachedSignature(const QCString &clearText,
- const QByteArray &signature,
- QPtrList<KSSLCertificate> &foundCerts);
+ rc checkDetachedSignature(const TQCString &clearText,
+ const TQByteArray &signature,
+ TQPtrList<KSSLCertificate> &foundCerts);
/**
* Check an opaque signed message
@@ -88,9 +88,9 @@ class KIO_EXPORT KSMIMECrypto {
* @param foundCerts certificates found in this mesasge
* @return 0 on success
*/
- rc checkOpaqueSignature(const QByteArray &signedText,
- QCString &clearText,
- QPtrList<KSSLCertificate> &foundCerts);
+ rc checkOpaqueSignature(const TQByteArray &signedText,
+ TQCString &clearText,
+ TQPtrList<KSSLCertificate> &foundCerts);
/**
* Encrypt a message
@@ -104,10 +104,10 @@ class KIO_EXPORT KSMIMECrypto {
* @param recip recipient certificates
* @return 0 on success
*/
- rc encryptMessage(const QCString &clearText,
- QByteArray &cipherText,
+ rc encryptMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
algo algorithm,
- const QPtrList<KSSLCertificate> &recip);
+ const TQPtrList<KSSLCertificate> &recip);
/**
* Decrypt a message
@@ -116,8 +116,8 @@ class KIO_EXPORT KSMIMECrypto {
* @param privKey private key to use
* @return 0 on success
*/
- rc decryptMessage(const QByteArray &cipherText,
- QCString &clearText,
+ rc decryptMessage(const TQByteArray &cipherText,
+ TQCString &clearText,
const KSSLPKCS12 &privKey);
private:
diff --git a/kio/kssl/kssl.cc b/kio/kssl/kssl.cc
index 3996aae20..66cc503d5 100644
--- a/kio/kssl/kssl.cc
+++ b/kio/kssl/kssl.cc
@@ -68,7 +68,7 @@ public:
bool lastInitTLS;
KSSLCertificate::KSSLValidation m_cert_vfy_res;
- QString proxyPeer;
+ TQString proxyPeer;
#ifdef KSSL_HAVE_SSL
SSL *m_ssl;
@@ -146,7 +146,7 @@ bool KSSL::TLSInit() {
}
// set cipher list
- QString clist = m_cfg->getCipherList();
+ TQString clist = m_cfg->getCipherList();
//kdDebug(7029) << "Cipher list: " << clist << endl;
if (!clist.isEmpty())
d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast<char *>(clist.ascii()));
@@ -194,7 +194,7 @@ else if (m_cfg->sslv3()) kdDebug(7029) << "SSL3 method" << endl;
}
// set cipher list
- QString clist = m_cfg->getCipherList();
+ TQString clist = m_cfg->getCipherList();
kdDebug(7029) << "Cipher list: " << clist << endl;
if (!clist.isEmpty())
d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast<char *>(clist.ascii()));
@@ -624,13 +624,13 @@ KSSLConnectionInfo& KSSL::connectionInfo() {
}
-// KDE 4: Make it const QString &
-void KSSL::setPeerHost(QString realHost) {
+// KDE 4: Make it const TQString &
+void KSSL::setPeerHost(TQString realHost) {
d->proxyPeer = realHost;
}
// deprecated
-void KSSL::setProxyUse(bool, QString, int, QString) {
+void KSSL::setProxyUse(bool, TQString, int, TQString) {
}
diff --git a/kio/kssl/kssl.h b/kio/kssl/kssl.h
index 414e426a8..ffb217980 100644
--- a/kio/kssl/kssl.h
+++ b/kio/kssl/kssl.h
@@ -178,7 +178,7 @@ public:
* @param proxy is the IP or hostname of the proxy server
* @deprecated
*/
- void setProxyUse(bool active, QString realIP = QString::null, int realPort = 0, QString proxy = QString::null) KDE_DEPRECATED;
+ void setProxyUse(bool active, TQString realIP = TQString::null, int realPort = 0, TQString proxy = TQString::null) KDE_DEPRECATED;
/**
* Set the peer hostname to be used for certificate verification.
@@ -186,7 +186,7 @@ public:
* @param realHost the remote hostname as the user believes to be
* connecting to
*/
- void setPeerHost(QString realHost = QString::null);
+ void setPeerHost(TQString realHost = TQString::null);
/**
* Connect the SSL session to the remote host using the provided
diff --git a/kio/kssl/kssl/caroot/ca-bundle.crt b/kio/kssl/kssl/caroot/ca-bundle.crt
index 31409b62f..ca5d292c9 100644
--- a/kio/kssl/kssl/caroot/ca-bundle.crt
+++ b/kio/kssl/kssl/caroot/ca-bundle.crt
@@ -99,7 +99,7 @@ MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
-iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
+iHVv/xD8SlQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
@@ -116,7 +116,7 @@ AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
-WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
+WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
@@ -238,7 +238,7 @@ FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA
-----BEGIN CERTIFICATE-----
MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
-ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMQwMgYDVQQL
EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
@@ -252,7 +252,7 @@ SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
-6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+6AVFSOIyMko96FMcELfHc4wHUOH5yStQfWDjeUJOUqOA2KqQGOL
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
@@ -343,7 +343,7 @@ Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
-----BEGIN CERTIFICATE-----
MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
-EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOQ3MjZaMEYxCzAJ
BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
@@ -435,7 +435,7 @@ dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
-MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+MFqBDzIwMTkwNTI1MTYwOQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
@@ -520,7 +520,7 @@ WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj
-dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0
+dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMQ0NVoXDTE5MDYyMzEyMQ0
NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD
VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G
@@ -580,7 +580,7 @@ b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
-iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+iM3dFw4usJQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
@@ -622,7 +622,7 @@ X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
-IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+IDUwHhcNOTgwODE0MQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
@@ -744,7 +744,7 @@ r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
-tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+tNkio0RTNaQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
@@ -980,7 +980,7 @@ cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
-79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
@@ -1367,7 +1367,7 @@ Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
-975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNQvAayUTNfxMK/
touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
@@ -1377,10 +1377,10 @@ MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
-----BEGIN CERTIFICATE-----
MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
-A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+A1UEBhMCVVMxIDAeBgNVBAoTF1JQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
-BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+BAoTF1JQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
@@ -1494,7 +1494,7 @@ MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
-Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+Fw05OTA3MQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
@@ -1982,7 +1982,7 @@ A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
-Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
+Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFQQuS9/
HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
@@ -2142,7 +2142,7 @@ Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g=
-----BEGIN CERTIFICATE-----
MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
-b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD
+b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMQwMgYDVQQD
EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X
DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw
DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u
@@ -2176,7 +2176,7 @@ MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV
MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe
TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0
dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB
-KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0
+KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMQ0N1oXDTE5MDIxOTIzMQ0
N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC
dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu
MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL
@@ -2322,7 +2322,7 @@ Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
-Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
+Zp+Jpd/gQlBn+h9sHvQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
@@ -2347,7 +2347,7 @@ ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQD
EzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVz
aXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0bG9jay5odTAeFw0w
-MzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
+MzAzMzAwMQ3MTFaFw0yMjEyMTUwMQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5l
dExvY2sgTWlub3NpdGV0dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZh
@@ -2810,7 +2810,7 @@ U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
-OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
+OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
diff --git a/kio/kssl/ksslcertchain.cc b/kio/kssl/ksslcertchain.cc
index aa531c067..a401aec3d 100644
--- a/kio/kssl/ksslcertchain.cc
+++ b/kio/kssl/ksslcertchain.cc
@@ -41,7 +41,7 @@
#include <kopenssl.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
@@ -97,7 +97,7 @@ bool KSSLCertChain::isValid() {
KSSLCertChain *KSSLCertChain::replicate() {
KSSLCertChain *x = new KSSLCertChain;
-QPtrList<KSSLCertificate> ch = getChain();
+TQPtrList<KSSLCertificate> ch = getChain();
x->setChain(ch); // this will do a deep copy for us
ch.setAutoDelete(true);
@@ -113,8 +113,8 @@ return 0;
}
-QPtrList<KSSLCertificate> KSSLCertChain::getChain() {
-QPtrList<KSSLCertificate> cl;
+TQPtrList<KSSLCertificate> KSSLCertChain::getChain() {
+TQPtrList<KSSLCertificate> cl;
if (!_chain) return cl;
#ifdef KSSL_HAVE_SSL
STACK_OF(X509) *x = (STACK_OF(X509) *)_chain;
@@ -132,7 +132,7 @@ return cl;
}
-void KSSLCertChain::setChain(QPtrList<KSSLCertificate>& chain) {
+void KSSLCertChain::setChain(TQPtrList<KSSLCertificate>& chain) {
#ifdef KSSL_HAVE_SSL
if (_chain) {
STACK_OF(X509) *x = (STACK_OF(X509) *)_chain;
@@ -187,14 +187,14 @@ _chain = NULL;
}
-void KSSLCertChain::setChain(QStringList chain) {
+void KSSLCertChain::setChain(TQStringList chain) {
setCertChain(chain);
}
-void KSSLCertChain::setCertChain(const QStringList& chain) {
- QPtrList<KSSLCertificate> cl;
+void KSSLCertChain::setCertChain(const TQStringList& chain) {
+ TQPtrList<KSSLCertificate> cl;
cl.setAutoDelete(true);
- for (QStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) {
+ for (TQStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) {
KSSLCertificate *c = KSSLCertificate::fromString((*s).local8Bit());
if (c) {
cl.append(c);
diff --git a/kio/kssl/ksslcertchain.h b/kio/kssl/ksslcertchain.h
index 3e48db67d..618c7d6a3 100644
--- a/kio/kssl/ksslcertchain.h
+++ b/kio/kssl/ksslcertchain.h
@@ -21,8 +21,8 @@
#ifndef _KSSLCERTCHAIN_H
#define _KSSLCERTCHAIN_H
-#include <qglobal.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
class QString;
@@ -86,7 +86,7 @@ public:
* @param chain the certificate chain
* @see KSSLCertificate
*/
- void setChain(QPtrList<KSSLCertificate>& chain);
+ void setChain(TQPtrList<KSSLCertificate>& chain);
/**
* Set the certificate chain as a list of base64 encoded X.509
@@ -95,7 +95,7 @@ public:
* @param chain the certificate chain
* @deprecated
*/
- void setChain(QStringList chain) KDE_DEPRECATED;
+ void setChain(TQStringList chain) KDE_DEPRECATED;
/**
* Set the certificate chain as a list of base64 encoded X.509
@@ -103,7 +103,7 @@ public:
*
* @param chain the certificate chain
*/
- void setCertChain(const QStringList& chain);
+ void setCertChain(const TQStringList& chain);
/**
* Obtain a copy of the certificate chain.
@@ -111,7 +111,7 @@ public:
* @return a deep copy of the certificate chain.
* @see KSSLCertificate
*/
- QPtrList<KSSLCertificate> getChain();
+ TQPtrList<KSSLCertificate> getChain();
/**
* Determine the number of entries (depth) of the chain.
diff --git a/kio/kssl/ksslcertdlg.cc b/kio/kssl/ksslcertdlg.cc
index a61285d87..21bff52b1 100644
--- a/kio/kssl/ksslcertdlg.cc
+++ b/kio/kssl/ksslcertdlg.cc
@@ -22,12 +22,12 @@
#include <kssl.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlistview.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlistview.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -42,43 +42,43 @@
class KSSLCertDlg::KSSLCertDlgPrivate {
private:
friend class KSSLCertDlg;
- QLabel *p_message;
- QPushButton *p_pb_dontsend;
+ TQLabel *p_message;
+ TQPushButton *p_pb_dontsend;
bool p_send_flag;
};
-KSSLCertDlg::KSSLCertDlg(QWidget *parent, const char *name, bool modal)
+KSSLCertDlg::KSSLCertDlg(TQWidget *parent, const char *name, bool modal)
: KDialog(parent, name, modal), d(new KSSLCertDlgPrivate) {
- QBoxLayout * grid = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout * grid = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- d->p_message = new QLabel(QString::null, this);
+ d->p_message = new TQLabel(TQString::null, this);
grid->addWidget(d->p_message);
setHost(_host);
- _certs = new QListView(this);
+ _certs = new TQListView(this);
_certs->addColumn(i18n("Certificate"));
- _certs->setResizeMode(QListView::LastColumn);
- QFontMetrics fm( KGlobalSettings::generalFont() );
+ _certs->setResizeMode(TQListView::LastColumn);
+ TQFontMetrics fm( KGlobalSettings::generalFont() );
_certs->setMinimumHeight(4*fm.height());
grid->addWidget(_certs);
- _save = new QCheckBox(i18n("Save selection for this host."), this);
+ _save = new TQCheckBox(i18n("Save selection for this host."), this);
grid->addWidget(_save);
grid->addWidget(new KSeparator(KSeparator::HLine, this));
- QBoxLayout * h = new QHBoxLayout( grid );
+ TQBoxLayout * h = new TQHBoxLayout( grid );
h->insertStretch(0);
_ok = new KPushButton(i18n("Send certificate"), this);
h->addWidget(_ok);
- connect(_ok, SIGNAL(clicked()), SLOT(slotSend()));
+ connect(_ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotSend()));
d->p_pb_dontsend = new KPushButton(i18n("Do not send a certificate"), this);
h->addWidget(d->p_pb_dontsend);
- connect(d->p_pb_dontsend, SIGNAL(clicked()), SLOT(slotDont()));
+ connect(d->p_pb_dontsend, TQT_SIGNAL(clicked()), TQT_SLOT(slotDont()));
#ifndef QT_NO_WIDGET_TOPEXTRA
setCaption(i18n("KDE SSL Certificate Dialog"));
@@ -91,11 +91,11 @@ KSSLCertDlg::~KSSLCertDlg() {
}
-void KSSLCertDlg::setup(QStringList certs, bool saveChecked, bool sendChecked) {
+void KSSLCertDlg::setup(TQStringList certs, bool saveChecked, bool sendChecked) {
setupDialog(certs, saveChecked, sendChecked);
}
-void KSSLCertDlg::setupDialog(const QStringList& certs, bool saveChecked, bool sendChecked) {
+void KSSLCertDlg::setupDialog(const TQStringList& certs, bool saveChecked, bool sendChecked) {
_save->setChecked(saveChecked);
d->p_send_flag = sendChecked;
@@ -104,11 +104,11 @@ void KSSLCertDlg::setupDialog(const QStringList& certs, bool saveChecked, bool s
else
d->p_pb_dontsend->setDefault(true); // "do not send" is the "default action".
- for (QStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) {
+ for (TQStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) {
if ((*i).isEmpty())
continue;
- new QListViewItem(_certs, *i);
+ new TQListViewItem(_certs, *i);
}
_certs->setSelected(_certs->firstChild(), true);
@@ -125,16 +125,16 @@ bool KSSLCertDlg::wantsToSend() {
}
-QString KSSLCertDlg::getChoice() {
- QListViewItem *selected = _certs->selectedItem();
+TQString KSSLCertDlg::getChoice() {
+ TQListViewItem *selected = _certs->selectedItem();
if (selected && d->p_send_flag)
return selected->text(0);
else
- return QString::null;
+ return TQString::null;
}
-void KSSLCertDlg::setHost(const QString& host) {
+void KSSLCertDlg::setHost(const TQString& host) {
_host = host;
d->p_message->setText(i18n("The server <b>%1</b> requests a certificate.<p>"
"Select a certificate to use from the list below:")
@@ -154,13 +154,13 @@ void KSSLCertDlg::slotDont() {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertDlgRet& r) {
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r) {
s << Q_INT8(r.ok?1:0) << r.choice << Q_INT8(r.save?1:0) << Q_INT8(r.send?1:0);
return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertDlgRet& r) {
+TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r) {
Q_INT8 tmp;
s >> tmp; r.ok = (tmp == 1);
s >> r.choice;
diff --git a/kio/kssl/ksslcertdlg.h b/kio/kssl/ksslcertdlg.h
index a52d0dec3..5bd720832 100644
--- a/kio/kssl/ksslcertdlg.h
+++ b/kio/kssl/ksslcertdlg.h
@@ -21,7 +21,7 @@
#ifndef _KSSLCERTDLG_H
#define _KSSLCERTDLG_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialog.h>
class QWidget;
@@ -50,7 +50,7 @@ public:
* @param name the internal name of this instance
* @param modal create a modal dialog if set to true
*/
- KSSLCertDlg(QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLCertDlg(TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this object and close the dialog
@@ -65,7 +65,7 @@ public:
* @param sendChecked send the checked item to the remote host
* @deprecated
*/
- void setup(QStringList certs, bool saveChecked = false, bool sendChecked = true) KDE_DEPRECATED;
+ void setup(TQStringList certs, bool saveChecked = false, bool sendChecked = true) KDE_DEPRECATED;
/**
* Setup the dialog. Call this before you display the dialog.
@@ -74,14 +74,14 @@ public:
* @param saveChecked save the checked item for the future
* @param sendChecked send the checked item to the remote host
*/
- void setupDialog(const QStringList& certs, bool saveChecked = false, bool sendChecked = true);
+ void setupDialog(const TQStringList& certs, bool saveChecked = false, bool sendChecked = true);
/**
* Obtain the name of the certificate the user wants to send
*
* @return the name of the certificate
*/
- QString getChoice();
+ TQString getChoice();
/**
* Determine if the user wants to send a certificate.
@@ -102,7 +102,7 @@ public:
*
* @param host the hostname
*/
- void setHost(const QString& host);
+ void setHost(const TQString& host);
private slots:
void slotSend();
@@ -111,18 +111,18 @@ private slots:
private:
class KSSLCertDlgPrivate;
KSSLCertDlgPrivate *d;
- QCheckBox *_save;
- QRadioButton *_send, *_dont;
- QListView *_certs;
- QPushButton *_ok;
- QString _host;
+ TQCheckBox *_save;
+ TQRadioButton *_send, *_dont;
+ TQListView *_certs;
+ TQPushButton *_ok;
+ TQString _host;
};
class KIO_EXPORT KSSLCertDlgRet {
public:
bool ok;
- QString choice;
+ TQString choice;
bool send;
bool save;
@@ -131,8 +131,8 @@ protected:
KSSLCertDlgRetPrivate *d;
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertDlgRet& r);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertDlgRet& r);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r);
#endif
diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc
index aca7a7ea7..a76b235d7 100644
--- a/kio/kssl/ksslcertificate.cc
+++ b/kio/kssl/ksslcertificate.cc
@@ -26,9 +26,9 @@
#include <unistd.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include "kssldefs.h"
#include "ksslcertificate.h"
@@ -38,7 +38,7 @@
#include <kstandarddirs.h>
#include <kmdcodec.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <ktempfile.h>
#include <sys/types.h>
@@ -60,7 +60,7 @@
#endif
#include <kopenssl.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include "ksslx509v3.h"
@@ -141,13 +141,13 @@ return n;
}
-KSSLCertificate *KSSLCertificate::fromString(QCString cert) {
+KSSLCertificate *KSSLCertificate::fromString(TQCString cert) {
KSSLCertificate *n = NULL;
#ifdef KSSL_HAVE_SSL
if (cert.length() == 0)
return NULL;
- QByteArray qba, qbb = cert.copy();
+ TQByteArray qba, qbb = cert.copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size());
@@ -163,8 +163,8 @@ return n;
-QString KSSLCertificate::getSubject() const {
-QString rc = "";
+TQString KSSLCertificate::getSubject() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_subject_name(d->m_cert), 0, 0);
@@ -177,8 +177,8 @@ return rc;
}
-QString KSSLCertificate::getSerialNumber() const {
-QString rc = "";
+TQString KSSLCertificate::getSerialNumber() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
ASN1_INTEGER *aint = d->kossl->X509_get_serialNumber(d->m_cert);
@@ -191,8 +191,8 @@ return rc;
}
-QString KSSLCertificate::getSignatureText() const {
-QString rc = "";
+TQString KSSLCertificate::getSignatureText() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *s;
@@ -200,7 +200,7 @@ int n, i;
i = d->kossl->OBJ_obj2nid(d->m_cert->sig_alg->algorithm);
rc = i18n("Signature Algorithm: ");
- rc += (i == NID_undef)?i18n("Unknown"):QString(d->kossl->OBJ_nid2ln(i));
+ rc += (i == NID_undef)?i18n("Unknown"):TQString(d->kossl->OBJ_nid2ln(i));
rc += "\n";
rc += i18n("Signature Contents:");
@@ -219,7 +219,7 @@ return rc;
}
-void KSSLCertificate::getEmails(QStringList &to) const {
+void KSSLCertificate::getEmails(TQStringList &to) const {
to.clear();
#ifdef KSSL_HAVE_SSL
if (!d->m_cert)
@@ -236,13 +236,13 @@ void KSSLCertificate::getEmails(QStringList &to) const {
}
-QString KSSLCertificate::getKDEKey() const {
+TQString KSSLCertificate::getKDEKey() const {
return getSubject() + " (" + getMD5DigestText() + ")";
}
-QString KSSLCertificate::getMD5DigestFromKDEKey(const QString &k) {
- QString rc;
+TQString KSSLCertificate::getMD5DigestFromKDEKey(const TQString &k) {
+ TQString rc;
int pos = k.findRev('(');
if (pos != -1) {
unsigned int len = k.length();
@@ -254,8 +254,8 @@ QString KSSLCertificate::getMD5DigestFromKDEKey(const QString &k) {
}
-QString KSSLCertificate::getMD5DigestText() const {
-QString rc = "";
+TQString KSSLCertificate::getMD5DigestText() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
unsigned int n;
@@ -279,8 +279,8 @@ return rc;
-QString KSSLCertificate::getMD5Digest() const {
-QString rc = "";
+TQString KSSLCertificate::getMD5Digest() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
unsigned int n;
@@ -302,8 +302,8 @@ return rc;
-QString KSSLCertificate::getKeyType() const {
-QString rc = "";
+TQString KSSLCertificate::getKeyType() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
EVP_PKEY *pkey = d->kossl->X509_get_pubkey(d->m_cert);
@@ -328,8 +328,8 @@ return rc;
-QString KSSLCertificate::getPublicKeyText() const {
-QString rc = "";
+TQString KSSLCertificate::getPublicKeyText() const {
+TQString rc = "";
char *x = NULL;
#ifdef KSSL_HAVE_SSL
@@ -389,7 +389,7 @@ char *x = NULL;
d->kossl->OPENSSL_free(x);
x = d->kossl->BN_bn2hex(pkey->pkey.dsa->g);
- rc += QString("g: ");
+ rc += TQString("g: ");
for (unsigned int i = 0; i < strlen(x); i++) {
if (i%40 != 0 && i%2 == 0)
rc += ":";
@@ -422,8 +422,8 @@ return rc;
-QString KSSLCertificate::getIssuer() const {
-QString rc = "";
+TQString KSSLCertificate::getIssuer() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_issuer_name(d->m_cert), 0, 0);
@@ -478,10 +478,10 @@ if (c) {
}
#if 0
- kdDebug(7029) << "flags: " << QString::number(c->ex_flags, 2)
- << "\nkeyusage: " << QString::number(c->ex_kusage, 2)
- << "\nxkeyusage: " << QString::number(c->ex_xkusage, 2)
- << "\nnscert: " << QString::number(c->ex_nscert, 2)
+ kdDebug(7029) << "flags: " << TQString::number(c->ex_flags, 2)
+ << "\nkeyusage: " << TQString::number(c->ex_kusage, 2)
+ << "\nxkeyusage: " << TQString::number(c->ex_xkusage, 2)
+ << "\nnscert: " << TQString::number(c->ex_nscert, 2)
<< endl;
if (c->ex_flags & EXFLAG_KUSAGE)
kdDebug(7029) << " --- Key Usage extensions found" << endl;
@@ -637,7 +637,7 @@ KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertifi
return errors;
}
- QStringList qsl = KGlobal::dirs()->resourceDirs("kssl");
+ TQStringList qsl = KGlobal::dirs()->resourceDirs("kssl");
if (qsl.isEmpty()) {
errors << KSSLCertificate::NoCARoot;
@@ -646,9 +646,9 @@ KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertifi
KSSLCertificate::KSSLValidation ksslv = Unknown;
- for (QStringList::Iterator j = qsl.begin(); j != qsl.end(); ++j) {
+ for (TQStringList::Iterator j = qsl.begin(); j != qsl.end(); ++j) {
struct stat sb;
- QString _j = (*j) + "ca-bundle.crt";
+ TQString _j = (*j) + "ca-bundle.crt";
if (-1 == stat(_j.ascii(), &sb)) {
continue;
}
@@ -849,38 +849,38 @@ return rc;
}
-QString KSSLCertificate::getNotBefore() const {
+TQString KSSLCertificate::getNotBefore() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QString(X509_get_notBefore(d->m_cert));
#else
-return QString::null;
+return TQString::null;
#endif
}
-QString KSSLCertificate::getNotAfter() const {
+TQString KSSLCertificate::getNotAfter() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QString(X509_get_notAfter(d->m_cert));
#else
-return QString::null;
+return TQString::null;
#endif
}
-QDateTime KSSLCertificate::getQDTNotBefore() const {
+TQDateTime KSSLCertificate::getQDTNotBefore() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL);
#else
-return QDateTime::currentDateTime();
+return TQDateTime::currentDateTime();
#endif
}
-QDateTime KSSLCertificate::getQDTNotAfter() const {
+TQDateTime KSSLCertificate::getQDTNotAfter() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL);
#else
-return QDateTime::currentDateTime();
+return TQDateTime::currentDateTime();
#endif
}
@@ -909,12 +909,12 @@ return newOne;
}
-QString KSSLCertificate::toString() {
+TQString KSSLCertificate::toString() {
return KCodecs::base64Encode(toDer());
}
-QString KSSLCertificate::verifyText(KSSLValidation x) {
+TQString KSSLCertificate::verifyText(KSSLValidation x) {
switch (x) {
case KSSLCertificate::Ok:
return i18n("The certificate is valid.");
@@ -954,8 +954,8 @@ return i18n("The certificate is invalid.");
}
-QByteArray KSSLCertificate::toDer() {
-QByteArray qba;
+TQByteArray KSSLCertificate::toDer() {
+TQByteArray qba;
#ifdef KSSL_HAVE_SSL
unsigned int certlen = d->kossl->i2d_X509(getCert(), NULL);
unsigned char *cert = new unsigned char[certlen];
@@ -972,9 +972,9 @@ return qba;
-QByteArray KSSLCertificate::toPem() {
-QByteArray qba;
-QString thecert = toString();
+TQByteArray KSSLCertificate::toPem() {
+TQByteArray qba;
+TQString thecert = toString();
const char *header = "-----BEGIN CERTIFICATE-----\n";
const char *footer = "-----END CERTIFICATE-----\n";
@@ -1000,8 +1000,8 @@ return qba;
#define NETSCAPE_CERT_HDR "certificate"
// what a piece of crap this is
-QByteArray KSSLCertificate::toNetscape() {
-QByteArray qba;
+TQByteArray KSSLCertificate::toNetscape() {
+TQByteArray qba;
#ifdef KSSL_HAVE_SSL
ASN1_HEADER ah;
ASN1_OCTET_STRING os;
@@ -1017,7 +1017,7 @@ KTempFile ktf;
ktf.close();
- QFile qf(ktf.name());
+ TQFile qf(ktf.name());
qf.open(IO_ReadOnly);
char *buf = new char[qf.size()];
qf.readBlock(buf, qf.size());
@@ -1033,15 +1033,15 @@ return qba;
-QString KSSLCertificate::toText() {
-QString text;
+TQString KSSLCertificate::toText() {
+TQString text;
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
d->kossl->X509_print(ktf.fstream(), getCert());
ktf.close();
- QFile qf(ktf.name());
+ TQFile qf(ktf.name());
qf.open(IO_ReadOnly);
char *buf = new char[qf.size()+1];
qf.readBlock(buf, qf.size());
@@ -1054,10 +1054,10 @@ KTempFile ktf;
return text;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificate::setCert(QString& cert) {
+// KDE 4: Make it const TQString &
+bool KSSLCertificate::setCert(TQString& cert) {
#ifdef KSSL_HAVE_SSL
-QByteArray qba, qbb = cert.local8Bit().copy();
+TQByteArray qba, qbb = cert.local8Bit().copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size());
@@ -1080,8 +1080,8 @@ return d->_extensions.certTypeCA();
}
-QStringList KSSLCertificate::subjAltNames() const {
- QStringList rc;
+TQStringList KSSLCertificate::subjAltNames() const {
+ TQStringList rc;
#ifdef KSSL_HAVE_SSL
STACK_OF(GENERAL_NAME) *names;
names = (STACK_OF(GENERAL_NAME)*)d->kossl->X509_get_ext_d2i(d->m_cert, NID_subject_alt_name, 0, 0);
@@ -1098,7 +1098,7 @@ QStringList KSSLCertificate::subjAltNames() const {
continue;
}
- QString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
+ TQString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
if (!s.isEmpty()) {
rc += s;
}
@@ -1109,9 +1109,9 @@ QStringList KSSLCertificate::subjAltNames() const {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertificate& r) {
-QStringList qsl;
-QPtrList<KSSLCertificate> cl = const_cast<KSSLCertificate&>(r).chain().getChain();
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r) {
+TQStringList qsl;
+TQPtrList<KSSLCertificate> cl = const_cast<KSSLCertificate&>(r).chain().getChain();
for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) {
qsl << c->toString();
@@ -1125,9 +1125,9 @@ return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertificate& r) {
-QStringList qsl;
-QString cert;
+TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r) {
+TQStringList qsl;
+TQString cert;
s >> cert >> qsl;
diff --git a/kio/kssl/ksslcertificate.h b/kio/kssl/ksslcertificate.h
index 0024b87eb..5b13279ea 100644
--- a/kio/kssl/ksslcertificate.h
+++ b/kio/kssl/ksslcertificate.h
@@ -35,8 +35,8 @@
// There should be no reason to touch the X509 stuff directly.
//
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
class QString;
class QStringList;
@@ -95,7 +95,7 @@ public:
* @param cert the certificate in base64 form
* @return the X.509 certificate, or NULL
*/
- static KSSLCertificate *fromString(QCString cert);
+ static KSSLCertificate *fromString(TQCString cert);
/**
* Create an X.509 certificate from the internal representation.
@@ -121,110 +121,110 @@ public:
enum KSSLPurpose { None=0, SSLServer=1, SSLClient=2,
SMIMESign=3, SMIMEEncrypt=4, Any=5 };
- typedef QValueList<KSSLValidation> KSSLValidationList;
+ typedef TQValueList<KSSLValidation> KSSLValidationList;
/**
* Convert this certificate to a string.
* @return the certificate in base64 format
*/
- QString toString();
+ TQString toString();
/**
* Get the subject of the certificate (X.509 map).
* @return the subject
*/
- QString getSubject() const;
+ TQString getSubject() const;
/**
* Get the issuer of the certificate (X.509 map).
* @return the issuer
*/
- QString getIssuer() const;
+ TQString getIssuer() const;
/**
* Get the date that the certificate becomes valid on.
* @return the date as a string, localised
*/
- QString getNotBefore() const;
+ TQString getNotBefore() const;
/**
* Get the date that the certificate is valid until.
* @return the date as a string, localised
*/
- QString getNotAfter() const;
+ TQString getNotAfter() const;
/**
* Get the date that the certificate becomes valid on.
* @return the date
*/
- QDateTime getQDTNotBefore() const;
+ TQDateTime getQDTNotBefore() const;
/**
* Get the date that the certificate is valid until.
* @return the date
*/
- QDateTime getQDTNotAfter() const;
+ TQDateTime getQDTNotAfter() const;
/**
* Convert the certificate to DER (ASN.1) format.
* @return the binary data of the DER encoding
*/
- QByteArray toDer();
+ TQByteArray toDer();
/**
* Convert the certificate to PEM (base64) format.
* @return the binary data of the PEM encoding
*/
- QByteArray toPem();
+ TQByteArray toPem();
/**
* Convert the certificate to Netscape format.
* @return the binary data of the Netscape encoding
*/
- QByteArray toNetscape();
+ TQByteArray toNetscape();
/**
* Convert the certificate to OpenSSL plain text format.
* @return the OpenSSL text encoding
*/
- QString toText();
+ TQString toText();
/**
* Get the serial number of the certificate.
* @return the serial number as a string
*/
- QString getSerialNumber() const;
+ TQString getSerialNumber() const;
/**
* Get the key type (RSA, DSA, etc).
* @return the key type as a string
*/
- QString getKeyType() const;
+ TQString getKeyType() const;
/**
* Get the public key.
* @return the public key as a hexidecimal string
*/
- QString getPublicKeyText() const;
+ TQString getPublicKeyText() const;
/**
* Get the MD5 digest of the certificate.
* Result is padded with : to separate bytes - it's a text version!
* @return the MD5 digest in a hexidecimal string
*/
- QString getMD5DigestText() const;
+ TQString getMD5DigestText() const;
/**
* Get the MD5 digest of the certificate.
* @return the MD5 digest in a hexidecimal string
*/
- QString getMD5Digest() const;
+ TQString getMD5Digest() const;
/**
* Get the signature.
* @return the signature in text format
*/
- QString getSignatureText() const;
+ TQString getSignatureText() const;
/**
* Check if this is a valid certificate. Will use cached data.
@@ -243,7 +243,7 @@ public:
* The alternate subject name.
* @return string list with subjectAltName
*/
- QStringList subjAltNames() const;
+ TQStringList subjAltNames() const;
/**
* Check if this is a valid certificate. Will use cached data.
@@ -298,7 +298,7 @@ public:
* @param x the code to look up
* @return the message text corresponding to the validation code
*/
- static QString verifyText(KSSLValidation x);
+ static TQString verifyText(KSSLValidation x);
/**
* Explicitly make a copy of this certificate.
@@ -317,7 +317,7 @@ public:
* @param cert the certificate to set to
* @return true on success
*/
- bool setCert(QString& cert);
+ bool setCert(TQString& cert);
/**
* Access the X.509v3 parameters.
@@ -335,19 +335,19 @@ public:
/**
* FIXME: document
*/
- void getEmails(QStringList& to) const;
+ void getEmails(TQStringList& to) const;
/**
* KDEKey is a concatenation "Subject (MD5)", mostly needed for SMIME.
* The result of getKDEKey might change and should not be used for
* persistant storage.
*/
- QString getKDEKey() const;
+ TQString getKDEKey() const;
/**
* Aegypten semantics force us to search by MD5Digest only.
*/
- static QString getMD5DigestFromKDEKey(const QString& k);
+ static TQString getMD5DigestFromKDEKey(const TQString& k);
private:
KIO_EXPORT friend int operator!=(KSSLCertificate& x, KSSLCertificate& y);
@@ -365,8 +365,8 @@ protected:
KSSLValidation processError(int ec);
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertificate& r);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertificate& r);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r);
KIO_EXPORT int operator==(KSSLCertificate& x, KSSLCertificate& y);
KIO_EXPORT inline int operator!=(KSSLCertificate& x, KSSLCertificate& y)
diff --git a/kio/kssl/ksslcertificatecache.cc b/kio/kssl/ksslcertificatecache.cc
index 3a784ed14..eb4ff2d86 100644
--- a/kio/kssl/ksslcertificatecache.cc
+++ b/kio/kssl/ksslcertificatecache.cc
@@ -66,9 +66,9 @@ void KSSLCertificateCache::loadDefaultPolicies() {
void KSSLCertificateCache::reload() {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
d->dcc->call("kded", "kssld",
"cacheReload()",
data, rettype, retval);
@@ -77,9 +77,9 @@ void KSSLCertificateCache::reload() {
void KSSLCertificateCache::addCertificate(KSSLCertificate& cert,
KSSLCertificatePolicy policy, bool permanent) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
arg << policy;
arg << permanent;
@@ -89,18 +89,18 @@ void KSSLCertificateCache::addCertificate(KSSLCertificate& cert,
}
-// KDE 4: Make it const QString &
-KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheGetPolicyByCN(QString)",
+ "cacheGetPolicyByCN(TQString)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificateCache::KSSLCertificatePolicy drc;
retStream >> drc;
return drc;
@@ -110,16 +110,16 @@ return KSSLCertificateCache::Ambiguous;
KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheGetPolicyByCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificateCache::KSSLCertificatePolicy drc;
retStream >> drc;
return drc;
@@ -128,18 +128,18 @@ return KSSLCertificateCache::Ambiguous;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::seenCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::seenCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheSeenCN(QString)",
+ "cacheSeenCN(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -150,16 +150,16 @@ return false;
bool KSSLCertificateCache::seenCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheSeenCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -170,16 +170,16 @@ return false;
bool KSSLCertificateCache::isPermanent(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheIsPermanent(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -189,18 +189,18 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::removeByCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::removeByCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheRemoveByCN(QString)",
+ "cacheRemoveByCN(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -211,16 +211,16 @@ return false;
bool KSSLCertificateCache::removeByCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheRemoveByCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -230,21 +230,21 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::modifyByCN(QString& cn,
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::modifyByCN(TQString& cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQDateTime& expires) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn << policy << permanent << expires;
bool rc = d->dcc->call("kded", "kssld",
- "cacheModifyByCN(QString,KSSLCertificateCache::KSSLCertificatePolicy,bool,QDateTime)",
+ "cacheModifyByCN(TQString,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -257,17 +257,17 @@ return false;
bool KSSLCertificateCache::modifyByCertificate(KSSLCertificate& cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQDateTime& expires) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << policy << permanent << expires;
bool rc = d->dcc->call("kded", "kssld",
- "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,QDateTime)",
+ "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -277,37 +277,37 @@ return false;
}
-QStringList KSSLCertificateCache::getHostList(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLCertificateCache::getHostList(KSSLCertificate& cert) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheGetHostList(KSSLCertificate)",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
- QStringList drc;
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
+ TQStringList drc;
retStream >> drc;
return drc;
}
-return QStringList();
+return TQStringList();
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::addHost(KSSLCertificate& cert, QString& host) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::addHost(KSSLCertificate& cert, TQString& host) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << host;
bool rc = d->dcc->call("kded", "kssld",
- "cacheAddHost(KSSLCertificate,QString)",
+ "cacheAddHost(KSSLCertificate,TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -317,18 +317,18 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::removeHost(KSSLCertificate& cert, QString& host) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::removeHost(KSSLCertificate& cert, TQString& host) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << host;
bool rc = d->dcc->call("kded", "kssld",
- "cacheRemoveHost(KSSLCertificate,QString)",
+ "cacheRemoveHost(KSSLCertificate,TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -338,37 +338,37 @@ return false;
}
-QStringList KSSLCertificateCache::getKDEKeyByEmail(const QString &email) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLCertificateCache::getKDEKeyByEmail(const TQString &email) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << email;
bool rc = d->dcc->call("kded", "kssld",
- "getKDEKeyByEmail(QString)",
+ "getKDEKeyByEmail(TQString)",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
- QStringList drc;
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
+ TQStringList drc;
retStream >> drc;
return drc;
}
- return QStringList();
+ return TQStringList();
}
-KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const QString &key) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const TQString &key) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << key;
bool rc = d->dcc->call("kded", "kssld",
- "getCertByMD5Digest(QString)",
+ "getCertByMD5Digest(TQString)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificate") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificate *drc = new KSSLCertificate;
retStream >> *drc;
if (drc->getCert())
@@ -380,13 +380,13 @@ KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const QString &key) {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p) {
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p) {
s << (Q_UINT32)p;
return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p) {
+TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p) {
Q_UINT32 pd;
s >> pd;
p = (KSSLCertificateCache::KSSLCertificatePolicy) pd;
diff --git a/kio/kssl/ksslcertificatecache.h b/kio/kssl/ksslcertificatecache.h
index 5c640a2a2..03ee1edbc 100644
--- a/kio/kssl/ksslcertificatecache.h
+++ b/kio/kssl/ksslcertificatecache.h
@@ -22,9 +22,9 @@
#define _INCLUDE_KSSLCCACHE_H
class KSSLCertificate;
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -55,35 +55,35 @@ enum KSSLCertificatePolicy { Unknown, Reject, Accept, Prompt, Ambiguous };
// the exact FQDN of the site presenting it)
// If you're just doing an OpenSSL connection, I believe it
// tests this for you, but don't take my word for it.
- KSSLCertificatePolicy getPolicyByCN(QString& cn);
+ KSSLCertificatePolicy getPolicyByCN(TQString& cn);
KSSLCertificatePolicy getPolicyByCertificate(KSSLCertificate& cert);
- bool seenCN(QString& cn);
+ bool seenCN(TQString& cn);
bool seenCertificate(KSSLCertificate& cert);
- bool removeByCN(QString& cn);
+ bool removeByCN(TQString& cn);
bool removeByCertificate(KSSLCertificate& cert);
bool isPermanent(KSSLCertificate& cert);
- bool modifyByCN(QString& cn,
+ bool modifyByCN(TQString& cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires);
+ TQDateTime& expires);
bool modifyByCertificate(KSSLCertificate& cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires);
+ TQDateTime& expires);
- QStringList getHostList(KSSLCertificate& cert);
- bool addHost(KSSLCertificate& cert, QString& host);
- bool removeHost(KSSLCertificate& cert, QString& host);
+ TQStringList getHostList(KSSLCertificate& cert);
+ bool addHost(KSSLCertificate& cert, TQString& host);
+ bool removeHost(KSSLCertificate& cert, TQString& host);
// SMIME
- QStringList getKDEKeyByEmail(const QString &email);
- KSSLCertificate *getCertByMD5Digest(const QString &key);
+ TQStringList getKDEKeyByEmail(const TQString &email);
+ KSSLCertificate *getCertByMD5Digest(const TQString &key);
void reload();
@@ -101,7 +101,7 @@ private:
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p);
#endif
diff --git a/kio/kssl/ksslcertificatehome.cc b/kio/kssl/ksslcertificatehome.cc
index 48f0b3e3b..c722e2c6b 100644
--- a/kio/kssl/ksslcertificatehome.cc
+++ b/kio/kssl/ksslcertificatehome.cc
@@ -27,11 +27,11 @@
using namespace KNetwork;
-QStringList KSSLCertificateHome::getCertificateList() {
+TQStringList KSSLCertificateHome::getCertificateList() {
KSimpleConfig cfg("ksslcertificates", false);
-QStringList list = cfg.groupList();
-QString defaultstr("<default>");
-QString blankstr("");
+TQStringList list = cfg.groupList();
+TQString defaultstr("<default>");
+TQString blankstr("");
list.remove(defaultstr);
list.remove(blankstr);
@@ -40,8 +40,8 @@ return list;
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(QString name, QString host, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary
@@ -56,28 +56,28 @@ KSimpleConfig cfg("ksslauthmap", false);
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, QString host, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send, bool prompt) {
if (cert)
KSSLCertificateHome::setDefaultCertificate(cert->name(), host, send, prompt);
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::addCertificate(QString filename, QString password, bool storePass) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::addCertificate(TQString filename, TQString password, bool storePass) {
KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password);
if (!pkcs) return false;
- KSSLCertificateHome::addCertificate(pkcs, storePass?password:QString(""));
+ KSSLCertificateHome::addCertificate(pkcs, storePass?password:TQString(""));
delete pkcs;
return true;
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, QString passToStore) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, TQString passToStore) {
if (!cert) return false;
KSimpleConfig cfg("ksslcertificates", false);
@@ -89,7 +89,7 @@ KSimpleConfig cfg("ksslcertificates", false);
return true;
}
-bool KSSLCertificateHome::deleteCertificate(const QString &filename, const QString &password) {
+bool KSSLCertificateHome::deleteCertificate(const TQString &filename, const TQString &password) {
KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password);
if (!pkcs) return false;
@@ -106,7 +106,7 @@ bool KSSLCertificateHome::deleteCertificate(KSSLPKCS12 *cert) {
return deleteCertificateByName(cert->name());
}
-bool KSSLCertificateHome::deleteCertificateByName(const QString &name) {
+bool KSSLCertificateHome::deleteCertificateByName(const TQString &name) {
if (name.isEmpty()) return false;
KSimpleConfig cfg("ksslcertificates", false);
@@ -117,8 +117,8 @@ KSimpleConfig cfg("ksslcertificates", false);
return ok;
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByName(QString name, QString password) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name, TQString password) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL;
@@ -128,8 +128,8 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByName(QString name) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL;
@@ -139,21 +139,21 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::hasCertificateByName(QString name) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::hasCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return false;
return true;
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(QString host, QString password, KSSLAuthAction *aa) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(TQString host, TQString password, KSSLAuthAction *aa) {
return KSSLCertificateHome::getCertificateByName(KSSLCertificateHome::getDefaultCertificateName(host, aa), password);
}
-// KDE 4: make it const QString &
-QString KSSLCertificateHome::getDefaultCertificateName(QString host, KSSLAuthAction *aa) {
+// KDE 4: make it const TQString &
+TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) {
KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary
@@ -162,7 +162,7 @@ KSimpleConfig cfg("ksslauthmap", false);
if (!cfg.hasGroup(KResolver::domainToAscii(host))) {
#endif
if (aa) *aa = AuthNone;
- return QString::null;
+ return TQString::null;
} else {
#ifdef Q_WS_WIN //temporary
cfg.setGroup(host);
@@ -185,12 +185,12 @@ KSimpleConfig cfg("ksslauthmap", false);
}
-QString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) {
+TQString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) {
KConfig cfg("cryptodefaults", false);
cfg.setGroup("Auth");
if (aa) {
- QString am = cfg.readEntry("AuthMethod", "");
+ TQString am = cfg.readEntry("AuthMethod", "");
if (am == "send")
*aa = AuthSend;
else if (am == "prompt")
@@ -203,9 +203,9 @@ return cfg.readEntry("DefaultCert", "");
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(QString password, KSSLAuthAction *aa) {
-QString name = KSSLCertificateHome::getDefaultCertificateName(aa);
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(TQString password, KSSLAuthAction *aa) {
+TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL;
@@ -217,7 +217,7 @@ KSimpleConfig cfg("ksslcertificates", false);
KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(KSSLAuthAction *aa) {
-QString name = KSSLCertificateHome::getDefaultCertificateName(aa);
+TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL;
@@ -228,8 +228,8 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(QString name, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(TQString name, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false);
cfg.setGroup("<default>");
diff --git a/kio/kssl/ksslcertificatehome.h b/kio/kssl/ksslcertificatehome.h
index 9dd26331c..1a77c1d26 100644
--- a/kio/kssl/ksslcertificatehome.h
+++ b/kio/kssl/ksslcertificatehome.h
@@ -23,8 +23,8 @@
class KSSLCertificate;
class KSSLPKCS12;
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -38,48 +38,48 @@ public:
* These methods might dynamically allocate an object for you. Be sure
* to delete them when you are done.
*/
- static KSSLPKCS12* getCertificateByHost(QString host, QString password, KSSLAuthAction* aa);
- static KSSLPKCS12* getCertificateByName(QString name, QString password);
- static KSSLPKCS12* getCertificateByName(QString name);
- static QString getDefaultCertificateName(QString host, KSSLAuthAction *aa = NULL);
- static QString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
- static KSSLPKCS12* getDefaultCertificate(QString password, KSSLAuthAction *aa = NULL);
+ static KSSLPKCS12* getCertificateByHost(TQString host, TQString password, KSSLAuthAction* aa);
+ static KSSLPKCS12* getCertificateByName(TQString name, TQString password);
+ static KSSLPKCS12* getCertificateByName(TQString name);
+ static TQString getDefaultCertificateName(TQString host, KSSLAuthAction *aa = NULL);
+ static TQString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
+ static KSSLPKCS12* getDefaultCertificate(TQString password, KSSLAuthAction *aa = NULL);
static KSSLPKCS12* getDefaultCertificate(KSSLAuthAction *aa = NULL);
- static bool hasCertificateByName(QString name);
+ static bool hasCertificateByName(TQString name);
/*
* These set the default certificate for hosts without a policy.
*/
- static void setDefaultCertificate(QString name, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(TQString name, bool send = true, bool prompt = false);
static void setDefaultCertificate(KSSLPKCS12 *cert, bool send = true, bool prompt = false);
/*
* These set the default certificate for a host.
*/
- static void setDefaultCertificate(QString name, QString host, bool send = true, bool prompt = false);
- static void setDefaultCertificate(KSSLPKCS12 *cert, QString host, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(TQString name, TQString host, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send = true, bool prompt = false);
/*
* These add a certificate to the repository.
* Returns: true on success, false error
*/
- static bool addCertificate(QString filename, QString password, bool storePass = false);
- static bool addCertificate(KSSLPKCS12 *cert, QString passToStore = QString::null);
+ static bool addCertificate(TQString filename, TQString password, bool storePass = false);
+ static bool addCertificate(KSSLPKCS12 *cert, TQString passToStore = TQString::null);
/*
* These deletes a certificate from the repository.
* Returns: true on success, false error
*/
- static bool deleteCertificate(const QString &filename, const QString &password);
+ static bool deleteCertificate(const TQString &filename, const TQString &password);
static bool deleteCertificate(KSSLPKCS12 *cert);
- static bool deleteCertificateByName(const QString &name);
+ static bool deleteCertificateByName(const TQString &name);
/*
* Returns the list of certificates available
*/
- static QStringList getCertificateList();
+ static TQStringList getCertificateList();
private:
class KSSLCertificateHomePrivate;
diff --git a/kio/kssl/ksslconnectioninfo.cc b/kio/kssl/ksslconnectioninfo.cc
index 5fb58cb75..ccc7fc780 100644
--- a/kio/kssl/ksslconnectioninfo.cc
+++ b/kio/kssl/ksslconnectioninfo.cc
@@ -38,17 +38,17 @@ void KSSLConnectionInfo::clean() {
}
-const QString& KSSLConnectionInfo::getCipherVersion() const {
+const TQString& KSSLConnectionInfo::getCipherVersion() const {
return m_cipherVersion;
}
-const QString& KSSLConnectionInfo::getCipherDescription() const {
+const TQString& KSSLConnectionInfo::getCipherDescription() const {
return m_cipherDescription;
}
-const QString& KSSLConnectionInfo::getCipher() const {
+const TQString& KSSLConnectionInfo::getCipher() const {
return m_cipherName;
}
diff --git a/kio/kssl/ksslconnectioninfo.h b/kio/kssl/ksslconnectioninfo.h
index 17a6af9bf..4d82c6ce2 100644
--- a/kio/kssl/ksslconnectioninfo.h
+++ b/kio/kssl/ksslconnectioninfo.h
@@ -21,7 +21,7 @@
#ifndef _KSSLCONNECTIONINFO_H
#define _KSSLCONNECTIONINFO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -49,19 +49,19 @@ public:
* Get the cipher in use.
* @return the cipher in use
*/
- const QString& getCipher() const;
+ const TQString& getCipher() const;
/**
* Describe the cipher in use.
* @return the cipher description (from OpenSSL)
*/
- const QString& getCipherDescription() const;
+ const TQString& getCipherDescription() const;
/**
* Get the version of the cipher in use.
* @return the version of the cipher
*/
- const QString& getCipherVersion() const;
+ const TQString& getCipherVersion() const;
/**
* Get the number of bits of the cipher that are actually used.
@@ -82,9 +82,9 @@ protected:
// These are here so KSSL can access them directly
// It's just as easy as making accessors - they're friends afterall!
int m_iCipherUsedBits, m_iCipherBits;
- QString m_cipherName;
- QString m_cipherDescription;
- QString m_cipherVersion;
+ TQString m_cipherName;
+ TQString m_cipherDescription;
+ TQString m_cipherVersion;
private:
class KSSLConnectionInfoPrivate;
diff --git a/kio/kssl/ksslcsessioncache.cc b/kio/kssl/ksslcsessioncache.cc
index 7dd1c956b..d39638717 100644
--- a/kio/kssl/ksslcsessioncache.cc
+++ b/kio/kssl/ksslcsessioncache.cc
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpair.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqpair.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -54,15 +54,15 @@
#ifdef KSSL_HAVE_SSL
-typedef QPair<QString,QString> KSSLCSession;
-typedef QPtrList<KSSLCSession> KSSLCSessions;
+typedef QPair<TQString,TQString> KSSLCSession;
+typedef TQPtrList<KSSLCSession> KSSLCSessions;
static KSSLCSessions *sessions = 0L;
static KStaticDeleter<KSSLCSessions> med;
-static QString URLtoKey(const KURL &kurl) {
- return kurl.host() + ":" + kurl.protocol() + ":" + QString::number(kurl.port());
+static TQString URLtoKey(const KURL &kurl) {
+ return kurl.host() + ":" + kurl.protocol() + ":" + TQString::number(kurl.port());
}
@@ -74,10 +74,10 @@ static void setup() {
#endif
-QString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
+TQString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
#ifdef KSSL_HAVE_SSL
- if (!sessions) return QString::null;
- QString key = URLtoKey(kurl);
+ if (!sessions) return TQString::null;
+ TQString key = URLtoKey(kurl);
for(KSSLCSession *it = sessions->first(); it; it=sessions->next()) {
if (it->first == key) {
@@ -91,18 +91,18 @@ QString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
#if 0
kdDebug(7029) <<"Negative caching " <<key <<endl;
if (sessions->count() >= MAX_ENTRIES) sessions->removeLast();
- sessions->prepend(new KSSLCSession(key, QString::null));
+ sessions->prepend(new KSSLCSession(key, TQString::null));
#endif
#endif
- return QString::null;
+ return TQString::null;
}
-void KSSLCSessionCache::putSessionForURL(const KURL &kurl, const QString &session) {
+void KSSLCSessionCache::putSessionForURL(const KURL &kurl, const TQString &session) {
#ifdef KSSL_HAVE_SSL
if (!sessions) setup();
- QString key = URLtoKey(kurl);
+ TQString key = URLtoKey(kurl);
KSSLCSession *it;
for(it = sessions->first(); it && it->first != key; it=sessions->next());
diff --git a/kio/kssl/ksslcsessioncache.h b/kio/kssl/ksslcsessioncache.h
index 839d85e06..c7a6b9a16 100644
--- a/kio/kssl/ksslcsessioncache.h
+++ b/kio/kssl/ksslcsessioncache.h
@@ -32,16 +32,16 @@ class KIO_EXPORT KSSLCSessionCache {
/**
* Store a SSL session (client side only)
* @param kurl URL the key belongs to. Method, host and port are used
- * @param session QString representing session to store
+ * @param session TQString representing session to store
*/
- static void putSessionForURL(const KURL &kurl, const QString &session);
+ static void putSessionForURL(const KURL &kurl, const TQString &session);
/**
* Retrieve a SSL session (client side only)
* @param kurl URL the key belongs to
- * @return if a key can be found, QString::null otherwise
+ * @return if a key can be found, TQString::null otherwise
*/
- static QString getSessionForURL(const KURL &kurl);
+ static TQString getSessionForURL(const KURL &kurl);
};
#endif
diff --git a/kio/kssl/ksslinfodlg.cc b/kio/kssl/ksslinfodlg.cc
index c3d80d4bb..70e8a094c 100644
--- a/kio/kssl/ksslinfodlg.cc
+++ b/kio/kssl/ksslinfodlg.cc
@@ -23,12 +23,12 @@
#include <kssl.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qscrollview.h>
-#include <qfile.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -51,39 +51,39 @@ class KSSLInfoDlg::KSSLInfoDlgPrivate {
private:
friend class KSSLInfoDlg;
bool m_secCon;
- QGridLayout *m_layout;
+ TQGridLayout *m_layout;
KComboBox *_chain;
KSSLCertificate *_cert;
KSSLCertificate::KSSLValidationList _cert_ksvl;
bool inQuestion;
- QLabel *_serialNum;
- QLabel *_csl;
- QLabel *_validFrom;
- QLabel *_validUntil;
- QLabel *_digest;
+ TQLabel *_serialNum;
+ TQLabel *_csl;
+ TQLabel *_validFrom;
+ TQLabel *_validUntil;
+ TQLabel *_digest;
- QLabel *pixmap;
- QLabel *info;
+ TQLabel *pixmap;
+ TQLabel *info;
KSSLCertBox *_subject, *_issuer;
};
-KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, QWidget *parent, const char *name, bool modal)
+KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, TQWidget *parent, const char *name, bool modal)
: KDialog(parent, name, modal, Qt::WDestructiveClose), d(new KSSLInfoDlgPrivate) {
- QVBoxLayout *topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
d->m_secCon = secureConnection;
- d->m_layout = new QGridLayout(topLayout, 3, 3, KDialog::spacingHint());
+ d->m_layout = new TQGridLayout(topLayout, 3, 3, KDialog::spacingHint());
d->m_layout->setColStretch(1, 1);
d->m_layout->setColStretch(2, 1);
- d->pixmap = new QLabel(this);
+ d->pixmap = new TQLabel(this);
d->m_layout->addWidget(d->pixmap, 0, 0);
- d->info = new QLabel(this);
+ d->info = new TQLabel(this);
d->m_layout->addWidget(d->info, 0, 1);
if (KSSL::doesSSLWork()) {
@@ -100,19 +100,19 @@ KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, QWidget *parent, const char *nam
}
d->m_layout->addRowSpacing( 0, 50 ); // give minimum height to look better
- QHBoxLayout *buttonLayout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
buttonLayout->addStretch( 1 );
KPushButton *button;
if (KSSL::doesSSLWork()) {
button = new KPushButton(KGuiItem(i18n("C&ryptography Configuration..."),"configure"), this);
- connect(button, SIGNAL(clicked()), SLOT(launchConfig()));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(launchConfig()));
buttonLayout->addWidget( button );
}
button = new KPushButton(KStdGuiItem::close(), this);
- connect(button, SIGNAL(clicked()), SLOT(close()));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
buttonLayout->addWidget( button );
button->setFocus();
@@ -155,7 +155,7 @@ void KSSLInfoDlg::setSecurityInQuestion(bool isIt) {
}
-void KSSLInfoDlg::setup( KSSL & ssl, const QString & ip, const QString & url )
+void KSSLInfoDlg::setup( KSSL & ssl, const TQString & ip, const TQString & url )
{
setup(
&ssl.peerInfo().getPeerCertificate(),
@@ -171,20 +171,20 @@ void KSSLInfoDlg::setup( KSSL & ssl, const QString & ip, const QString & url )
}
void KSSLInfoDlg::setup(KSSLCertificate *cert,
- const QString& ip, const QString& url,
- const QString& cipher, const QString& cipherdesc,
- const QString& sslversion, int usedbits, int bits,
+ const TQString& ip, const TQString& url,
+ const TQString& cipher, const TQString& cipherdesc,
+ const TQString& sslversion, int usedbits, int bits,
KSSLCertificate::KSSLValidation /*certState*/) {
// Needed to put the GUI stuff here to get the layouting right
d->_cert = cert;
- QGridLayout *layout = new QGridLayout(4, 2, KDialog::spacingHint());
+ TQGridLayout *layout = new TQGridLayout(4, 2, KDialog::spacingHint());
- layout->addWidget(new QLabel(i18n("Chain:"), this), 0, 0);
+ layout->addWidget(new TQLabel(i18n("Chain:"), this), 0, 0);
d->_chain = new KComboBox(this);
layout->addMultiCellWidget(d->_chain, 1, 1, 0, 1);
- connect(d->_chain, SIGNAL(activated(int)), this, SLOT(slotChain(int)));
+ connect(d->_chain, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChain(int)));
d->_chain->clear();
@@ -192,75 +192,75 @@ void KSSLInfoDlg::setup(KSSLCertificate *cert,
d->_chain->setEnabled(true);
d->_chain->insertItem(i18n("0 - Site Certificate"));
int cnt = 0;
- QPtrList<KSSLCertificate> cl = cert->chain().getChain();
+ TQPtrList<KSSLCertificate> cl = cert->chain().getChain();
cl.setAutoDelete(true);
for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) {
KSSLX509Map map(c->getSubject());
- QString id;
+ TQString id;
id = map.getValue("CN");
if (id.length() == 0)
id = map.getValue("O");
if (id.length() == 0)
id = map.getValue("OU");
- d->_chain->insertItem(QString::number(++cnt)+" - "+id);
+ d->_chain->insertItem(TQString::number(++cnt)+" - "+id);
}
d->_chain->setCurrentItem(0);
} else d->_chain->setEnabled(false);
- layout->addWidget(new QLabel(i18n("Peer certificate:"), this), 2, 0);
+ layout->addWidget(new TQLabel(i18n("Peer certificate:"), this), 2, 0);
layout->addWidget(d->_subject = static_cast<KSSLCertBox*>(buildCertInfo(cert->getSubject())), 3, 0);
- layout->addWidget(new QLabel(i18n("Issuer:"), this), 2, 1);
+ layout->addWidget(new TQLabel(i18n("Issuer:"), this), 2, 1);
layout->addWidget(d->_issuer = static_cast<KSSLCertBox*>(buildCertInfo(cert->getIssuer())), 3, 1);
d->m_layout->addMultiCell(layout, 1, 1, 0, 2);
- layout = new QGridLayout(11, 2, KDialog::spacingHint());
+ layout = new TQGridLayout(11, 2, KDialog::spacingHint());
layout->setColStretch(1, 1);
- QLabel *ipl = new QLabel(i18n("IP address:"), this);
+ TQLabel *ipl = new TQLabel(i18n("IP address:"), this);
layout->addWidget(ipl, 0, 0);
if (ip.isEmpty()) {
ipl->hide();
}
- layout->addWidget(ipl = new QLabel(ip, this), 0, 1);
+ layout->addWidget(ipl = new TQLabel(ip, this), 0, 1);
if (ip.isEmpty()) {
ipl->hide();
}
- layout->addWidget(new QLabel(i18n("URL:"), this), 1, 0);
+ layout->addWidget(new TQLabel(i18n("URL:"), this), 1, 0);
KSqueezedTextLabel *urlLabel = new KSqueezedTextLabel(url, this);
layout->addWidget(urlLabel, 1, 1);
- layout->addWidget(new QLabel(i18n("Certificate state:"), this), 2, 0);
+ layout->addWidget(new TQLabel(i18n("Certificate state:"), this), 2, 0);
- layout->addWidget(d->_csl = new QLabel("", this), 2, 1);
+ layout->addWidget(d->_csl = new TQLabel("", this), 2, 1);
update();
- layout->addWidget(new QLabel(i18n("Valid from:"), this), 3, 0);
- layout->addWidget(d->_validFrom = new QLabel("", this), 3, 1);
- layout->addWidget(new QLabel(i18n("Valid until:"), this), 4, 0);
- layout->addWidget(d->_validUntil = new QLabel("", this), 4, 1);
-
- layout->addWidget(new QLabel(i18n("Serial number:"), this), 5, 0);
- layout->addWidget(d->_serialNum = new QLabel("", this), 5, 1);
- layout->addWidget(new QLabel(i18n("MD5 digest:"), this), 6, 0);
- layout->addWidget(d->_digest = new QLabel("", this), 6, 1);
-
- layout->addWidget(new QLabel(i18n("Cipher in use:"), this), 7, 0);
- layout->addWidget(new QLabel(cipher, this), 7, 1);
- layout->addWidget(new QLabel(i18n("Details:"), this), 8, 0);
- layout->addWidget(new QLabel(cipherdesc.simplifyWhiteSpace(), this), 8, 1);
- layout->addWidget(new QLabel(i18n("SSL version:"), this), 9, 0);
- layout->addWidget(new QLabel(sslversion, this), 9, 1);
- layout->addWidget(new QLabel(i18n("Cipher strength:"), this), 10, 0);
- layout->addWidget(new QLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1);
+ layout->addWidget(new TQLabel(i18n("Valid from:"), this), 3, 0);
+ layout->addWidget(d->_validFrom = new TQLabel("", this), 3, 1);
+ layout->addWidget(new TQLabel(i18n("Valid until:"), this), 4, 0);
+ layout->addWidget(d->_validUntil = new TQLabel("", this), 4, 1);
+
+ layout->addWidget(new TQLabel(i18n("Serial number:"), this), 5, 0);
+ layout->addWidget(d->_serialNum = new TQLabel("", this), 5, 1);
+ layout->addWidget(new TQLabel(i18n("MD5 digest:"), this), 6, 0);
+ layout->addWidget(d->_digest = new TQLabel("", this), 6, 1);
+
+ layout->addWidget(new TQLabel(i18n("Cipher in use:"), this), 7, 0);
+ layout->addWidget(new TQLabel(cipher, this), 7, 1);
+ layout->addWidget(new TQLabel(i18n("Details:"), this), 8, 0);
+ layout->addWidget(new TQLabel(cipherdesc.simplifyWhiteSpace(), this), 8, 1);
+ layout->addWidget(new TQLabel(i18n("SSL version:"), this), 9, 0);
+ layout->addWidget(new TQLabel(sslversion, this), 9, 1);
+ layout->addWidget(new TQLabel(i18n("Cipher strength:"), this), 10, 0);
+ layout->addWidget(new TQLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1);
d->m_layout->addMultiCell(layout, 2, 2, 0, 2);
displayCert(cert);
}
-void KSSLInfoDlg::setCertState(const QString &errorNrs)
+void KSSLInfoDlg::setCertState(const TQString &errorNrs)
{
d->_cert_ksvl.clear();
- QStringList errors = QStringList::split(':', errorNrs);
- for(QStringList::ConstIterator it = errors.begin();
+ TQStringList errors = TQStringList::split(':', errorNrs);
+ for(TQStringList::ConstIterator it = errors.begin();
it != errors.end(); ++it)
{
d->_cert_ksvl << (KSSLCertificate::KSSLValidation) (*it).toInt();
@@ -268,21 +268,21 @@ void KSSLInfoDlg::setCertState(const QString &errorNrs)
}
void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
- QPalette cspl;
+ TQPalette cspl;
d->_serialNum->setText(x->getSerialNumber());
cspl = d->_validFrom->palette();
- if (x->getQDTNotBefore() > QDateTime::currentDateTime(Qt::UTC))
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
- else cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC))
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
+ else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validFrom->setPalette(cspl);
d->_validFrom->setText(x->getNotBefore());
cspl = d->_validUntil->palette();
- if (x->getQDTNotAfter() < QDateTime::currentDateTime(Qt::UTC))
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
- else cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC))
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
+ else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validUntil->setPalette(cspl);
d->_validUntil->setText(x->getNotAfter());
@@ -305,8 +305,8 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
ksv = ksvl.first();
if (ksv == KSSLCertificate::SelfSigned) {
- if (x->getQDTNotAfter() > QDateTime::currentDateTime(Qt::UTC) &&
- x->getQDTNotBefore() < QDateTime::currentDateTime(Qt::UTC)) {
+ if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) &&
+ x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) {
if (KSSLSigners().useForSSL(*x))
ksv = KSSLCertificate::Ok;
} else {
@@ -316,13 +316,13 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
}
if (ksv == KSSLCertificate::Ok) {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
} else if (ksv != KSSLCertificate::Irrelevant) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
}
d->_csl->setPalette(cspl);
- QString errorStr;
+ TQString errorStr;
for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin();
it != ksvl.end(); ++it) {
if (!errorStr.isEmpty())
@@ -344,7 +344,7 @@ void KSSLInfoDlg::slotChain(int x) {
if (x == 0) {
displayCert(d->_cert);
} else {
- QPtrList<KSSLCertificate> cl = d->_cert->chain().getChain();
+ TQPtrList<KSSLCertificate> cl = d->_cert->chain().getChain();
cl.setAutoDelete(true);
for (int i = 0; i < x-1; i++)
cl.remove((unsigned int)0);
@@ -356,7 +356,7 @@ void KSSLInfoDlg::slotChain(int x) {
}
-KSSLCertBox *KSSLInfoDlg::certInfoWidget(QWidget *parent, const QString &certName, QWidget *mailCatcher) {
+KSSLCertBox *KSSLInfoDlg::certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher) {
KSSLCertBox *result = new KSSLCertBox(parent);
if (!certName.isEmpty()) {
result->setValues(certName, mailCatcher);
@@ -365,23 +365,23 @@ KSSLCertBox *KSSLInfoDlg::certInfoWidget(QWidget *parent, const QString &certNam
}
-KSSLCertBox::KSSLCertBox(QWidget *parent, const char *name, WFlags f)
-: QScrollView(parent, name, f)
+KSSLCertBox::KSSLCertBox(TQWidget *parent, const char *name, WFlags f)
+: TQScrollView(parent, name, f)
{
_frame = 0L;
- setBackgroundMode(QWidget::PaletteButton);
- setValues(QString::null, 0L);
+ setBackgroundMode(TQWidget::PaletteButton);
+ setValues(TQString::null, 0L);
}
-void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
+void KSSLCertBox::setValues(TQString certName, TQWidget *mailCatcher) {
if (_frame) {
removeChild(_frame);
delete _frame;
}
if (certName.isEmpty()) {
- _frame = new QFrame(this);
+ _frame = new TQFrame(this);
addChild(_frame);
viewport()->setBackgroundMode(_frame->backgroundMode());
_frame->show();
@@ -391,50 +391,50 @@ void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
}
KSSLX509Map cert(certName);
- QString tmp;
- viewport()->setBackgroundMode(QWidget::PaletteButton);
- _frame = new QFrame(this);
- QGridLayout *grid = new QGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQString tmp;
+ viewport()->setBackgroundMode(TQWidget::PaletteButton);
+ _frame = new TQFrame(this);
+ TQGridLayout *grid = new TQGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setAutoAdd(true);
- QLabel *label = 0L;
+ TQLabel *label = 0L;
if (!(tmp = cert.getValue("O")).isEmpty()) {
- label = new QLabel(i18n("Organization:"), _frame);
+ label = new TQLabel(i18n("Organization:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("OU")).isEmpty()) {
- label = new QLabel(i18n("Organizational unit:"), _frame);
+ label = new TQLabel(i18n("Organizational unit:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("L")).isEmpty()) {
- label = new QLabel(i18n("Locality:"), _frame);
+ label = new TQLabel(i18n("Locality:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("ST")).isEmpty()) {
- label = new QLabel(i18n("Federal State","State:"), _frame);
+ label = new TQLabel(i18n("Federal State","State:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("C")).isEmpty()) {
- label = new QLabel(i18n("Country:"), _frame);
+ label = new TQLabel(i18n("Country:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("CN")).isEmpty()) {
- label = new QLabel(i18n("Common name:"), _frame);
+ label = new TQLabel(i18n("Common name:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("Email")).isEmpty()) {
- label = new QLabel(i18n("Email:"), _frame);
+ label = new TQLabel(i18n("Email:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
if (mailCatcher) {
KURLLabel *mail = new KURLLabel(tmp, tmp, _frame);
- connect(mail, SIGNAL(leftClickedURL(const QString &)), mailCatcher, SLOT(mailClicked(const QString &)));
+ connect(mail, TQT_SIGNAL(leftClickedURL(const TQString &)), mailCatcher, TQT_SLOT(mailClicked(const TQString &)));
} else {
- label = new QLabel(tmp, _frame);
+ label = new TQLabel(tmp, _frame);
}
}
if (label && viewport()) {
@@ -447,16 +447,16 @@ void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
}
-QScrollView *KSSLInfoDlg::buildCertInfo(const QString &certName) {
+TQScrollView *KSSLInfoDlg::buildCertInfo(const TQString &certName) {
return KSSLInfoDlg::certInfoWidget(this, certName, this);
}
-void KSSLInfoDlg::urlClicked(const QString &url) {
+void KSSLInfoDlg::urlClicked(const TQString &url) {
kapp->invokeBrowser(url);
}
-void KSSLInfoDlg::mailClicked(const QString &url) {
- kapp->invokeMailer(url, QString::null);
+void KSSLInfoDlg::mailClicked(const TQString &url) {
+ kapp->invokeMailer(url, TQString::null);
}
#include "ksslinfodlg.moc"
diff --git a/kio/kssl/ksslinfodlg.h b/kio/kssl/ksslinfodlg.h
index b7ff3d2eb..c1591f07d 100644
--- a/kio/kssl/ksslinfodlg.h
+++ b/kio/kssl/ksslinfodlg.h
@@ -27,7 +27,7 @@
#include "ksslx509map.h"
#include "ksslcertificate.h"
#include "kssl.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
class QWidget;
class KSSLCertBox;
@@ -58,7 +58,7 @@ public:
* @param name the internal name of this instance
* @param modal true if the dialog should be modal
*/
- KSSLInfoDlg(bool secureConnection, QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLInfoDlg(bool secureConnection, TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this dialog
@@ -87,9 +87,9 @@ public:
* @param certState the certificate state (valid, invalid, etc)
*/
void setup(KSSLCertificate *cert,
- const QString& ip, const QString& url,
- const QString& cipher, const QString& cipherdesc,
- const QString& sslversion, int usedbits, int bits,
+ const TQString& ip, const TQString& url,
+ const TQString& cipher, const TQString& cipherdesc,
+ const TQString& sslversion, int usedbits, int bits,
KSSLCertificate::KSSLValidation certState);
/**
@@ -101,13 +101,13 @@ public:
* @param ip the ip of the remote host
* @param url the url being accessed
*/
- void setup( KSSL & ssl, const QString & ip, const QString & url );
+ void setup( KSSL & ssl, const TQString & ip, const TQString & url );
/**
* Set the errors that were encountered while validating the site
* certificate.
*/
- void setCertState(const QString &errorNrs);
+ void setCertState(const TQString &errorNrs);
/**
* Utility function to generate the widget which displays the detailed
@@ -118,10 +118,10 @@ public:
* @param mailCatcher the class which catches click events on e-mail
* addresses
*/
- static KSSLCertBox *certInfoWidget(QWidget *parent, const QString &certName, QWidget *mailCatcher=0);
+ static KSSLCertBox *certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher=0);
private:
- QScrollView *buildCertInfo(const QString &certName);
+ TQScrollView *buildCertInfo(const TQString &certName);
void displayCert(KSSLCertificate *x);
class KSSLInfoDlgPrivate;
@@ -129,8 +129,8 @@ private:
private slots:
void launchConfig();
- void urlClicked(const QString &url);
- void mailClicked(const QString &url);
+ void urlClicked(const TQString &url);
+ void mailClicked(const TQString &url);
void slotChain(int x);
};
@@ -146,7 +146,7 @@ private slots:
* @see KSSLInfoDlg
* @short KDE SSL Certificate Box
*/
-class KIO_EXPORT KSSLCertBox : public QScrollView {
+class KIO_EXPORT KSSLCertBox : public TQScrollView {
public:
/**
* Construct a certificate box
@@ -155,7 +155,7 @@ public:
* @param name the internal name of this instance
* @param f widget flags for the object
*/
- KSSLCertBox(QWidget *parent=0L, const char *name=0L, WFlags f=0);
+ KSSLCertBox(TQWidget *parent=0L, const char *name=0L, WFlags f=0);
/**
* Change the contents of the widget
@@ -163,10 +163,10 @@ public:
* @param certName the name ("subject") of the certificate
* @param mailCatcher the widget which catches the url open events
*/
- void setValues(QString certName, QWidget *mailCatcher=0L);
+ void setValues(TQString certName, TQWidget *mailCatcher=0L);
private:
- QFrame *_frame;
+ TQFrame *_frame;
};
#endif
diff --git a/kio/kssl/ksslkeygen.cc b/kio/kssl/ksslkeygen.cc
index 7c231cefc..bbe13e32f 100644
--- a/kio/kssl/ksslkeygen.cc
+++ b/kio/kssl/ksslkeygen.cc
@@ -33,13 +33,13 @@
#include <ktempfile.h>
#include <kwallet.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <assert.h>
-KSSLKeyGen::KSSLKeyGen(QWidget *parent, const char *name, bool modal)
+KSSLKeyGen::KSSLKeyGen(TQWidget *parent, const char *name, bool modal)
:KWizard(parent,name,modal) {
_idx = -1;
@@ -51,9 +51,9 @@ KSSLKeyGen::KSSLKeyGen(QWidget *parent, const char *name, bool modal)
setHelpEnabled(page1, false);
setHelpEnabled(page2, false);
setFinishEnabled(page2, false);
- connect(page2->_password1, SIGNAL(textChanged(const QString&)), this, SLOT(slotPassChanged()));
- connect(page2->_password2, SIGNAL(textChanged(const QString&)), this, SLOT(slotPassChanged()));
- connect(finishButton(), SIGNAL(clicked()), SLOT(slotGenerate()));
+ connect(page2->_password1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged()));
+ connect(page2->_password2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged()));
+ connect(finishButton(), TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate()));
#else
// tell him he doesn't have SSL
#endif
@@ -104,7 +104,7 @@ void KSSLKeyGen::slotGenerate() {
#ifndef Q_OS_WIN //TODO: reenable for WIN32
if (rc == 0 && KWallet::Wallet::isEnabled()) {
- rc = KMessageBox::questionYesNo(this, i18n("Do you wish to store the passphrase in your wallet file?"), QString::null, i18n("Store"), i18n("Do Not Store"));
+ rc = KMessageBox::questionYesNo(this, i18n("Do you wish to store the passphrase in your wallet file?"), TQString::null, i18n("Store"), i18n("Do Not Store"));
if (rc == KMessageBox::Yes) {
KWallet::Wallet *w = KWallet::Wallet::openWallet(KWallet::Wallet::LocalWallet(), winId());
if (w) {
@@ -119,7 +119,7 @@ void KSSLKeyGen::slotGenerate() {
}
-int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits, int e) {
+int KSSLKeyGen::generateCSR(const TQString& name, const TQString& pass, int bits, int e) {
#ifdef KSSL_HAVE_SSL
KOSSL *kossl = KOSSL::self();
int rc;
@@ -168,7 +168,7 @@ int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits,
KGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl");
- QString path = KGlobal::dirs()->saveLocation("kssl");
+ TQString path = KGlobal::dirs()->saveLocation("kssl");
KTempFile csrFile(path + "csr_", ".der");
if (!csrFile.fstream()) {
@@ -203,8 +203,8 @@ int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits,
}
-QStringList KSSLKeyGen::supportedKeySizes() {
- QStringList x;
+TQStringList KSSLKeyGen::supportedKeySizes() {
+ TQStringList x;
#ifdef KSSL_HAVE_SSL
x << i18n("2048 (High Grade)")
diff --git a/kio/kssl/ksslkeygen.h b/kio/kssl/ksslkeygen.h
index d3deb8501..cd1d8e7ab 100644
--- a/kio/kssl/ksslkeygen.h
+++ b/kio/kssl/ksslkeygen.h
@@ -22,8 +22,8 @@
#ifndef _KSSLKEYGEN_H
#define _KSSLKEYGEN_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kwizard.h>
@@ -50,7 +50,7 @@ public:
* @param name the internal name of this instance
* @param modal true if the dialog should be modal
*/
- KSSLKeyGen(QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLKeyGen(TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this dialog.
@@ -61,7 +61,7 @@ public:
* List the supported key sizes.
* @return the supported key sizes
*/
- static QStringList supportedKeySizes();
+ static TQStringList supportedKeySizes();
/**
* Generate the certificate signing request.
@@ -71,7 +71,7 @@ public:
* @param e the value of the "e" parameter in RSA
* @return 0 on success, non-zero on error
*/
- int generateCSR(const QString& name, const QString& pass, int bits, int e = 0x10001);
+ int generateCSR(const TQString& name, const TQString& pass, int bits, int e = 0x10001);
/**
* Set the key size.
diff --git a/kio/kssl/ksslpeerinfo.cc b/kio/kssl/ksslpeerinfo.cc
index 8be542425..d1c2d00fc 100644
--- a/kio/kssl/ksslpeerinfo.cc
+++ b/kio/kssl/ksslpeerinfo.cc
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qregexp.h>
+#include <tqregexp.h>
#include "ksslpeerinfo.h"
#include <kdebug.h>
@@ -40,7 +40,7 @@ class KSSLPeerInfoPrivate {
public:
KSSLPeerInfoPrivate() {}
~KSSLPeerInfoPrivate() { }
- QString peerHost;
+ TQString peerHost;
};
@@ -57,7 +57,7 @@ KSSLCertificate& KSSLPeerInfo::getPeerCertificate() {
return m_cert;
}
-void KSSLPeerInfo::setPeerHost(QString realHost) {
+void KSSLPeerInfo::setPeerHost(TQString realHost) {
d->peerHost = realHost.stripWhiteSpace();
while(d->peerHost.endsWith("."))
d->peerHost.truncate(d->peerHost.length()-1);
@@ -65,17 +65,17 @@ void KSSLPeerInfo::setPeerHost(QString realHost) {
#ifdef Q_WS_WIN //TODO kresolver not ported
d->peerHost = d->peerHost.lower();
#else
- d->peerHost = QString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
+ d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
#endif
}
bool KSSLPeerInfo::certMatchesAddress() {
#ifdef KSSL_HAVE_SSL
KSSLX509Map certinfo(m_cert.getSubject());
- QStringList cns = QStringList::split(QRegExp("[ \n\r]"), certinfo.getValue("CN"));
+ TQStringList cns = TQStringList::split(TQRegExp("[ \n\r]"), certinfo.getValue("CN"));
cns += m_cert.subjAltNames();
- for (QStringList::Iterator cn = cns.begin(); cn != cns.end(); ++cn) {
+ for (TQStringList::Iterator cn = cns.begin(); cn != cns.end(); ++cn) {
if (cnMatchesAddress((*cn).stripWhiteSpace().lower()))
return true;
}
@@ -86,15 +86,15 @@ bool KSSLPeerInfo::certMatchesAddress() {
}
-bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
+bool KSSLPeerInfo::cnMatchesAddress(TQString cn) {
#ifdef KSSL_HAVE_SSL
- QRegExp rx;
+ TQRegExp rx;
kdDebug(7029) << "Matching CN=[" << cn << "] to ["
<< d->peerHost << "]" << endl;
// Check for invalid characters
- if (QRegExp("[^a-zA-Z0-9\\.\\*\\-]").search(cn) >= 0) {
+ if (TQRegExp("[^a-zA-Z0-9\\.\\*\\-]").search(cn) >= 0) {
kdDebug(7029) << "CN contains invalid characters! Failing." << endl;
return false;
}
@@ -120,7 +120,7 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
if (cn.contains('*')) {
// First make sure that there are at least two valid parts
// after the wildcard (*).
- QStringList parts = QStringList::split('.', cn, false);
+ TQStringList parts = TQStringList::split('.', cn, false);
while (parts.count() > 2)
parts.remove(parts.begin());
@@ -136,14 +136,14 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
// RFC2818 says that *.example.com should match against
// foo.example.com but not bar.foo.example.com
// (ie. they must have the same number of parts)
- if (QRegExp(cn, false, true).exactMatch(d->peerHost) &&
- QStringList::split('.', cn, false).count() ==
- QStringList::split('.', d->peerHost, false).count())
+ if (TQRegExp(cn, false, true).exactMatch(d->peerHost) &&
+ TQStringList::split('.', cn, false).count() ==
+ TQStringList::split('.', d->peerHost, false).count())
return true;
// *.example.com must match example.com also. Sigh..
if (cn.startsWith("*.")) {
- QString chopped = cn.mid(2);
+ TQString chopped = cn.mid(2);
if (chopped == d->peerHost) {
return true;
}
@@ -161,11 +161,11 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
void KSSLPeerInfo::reset() {
- d->peerHost = QString::null;
+ d->peerHost = TQString::null;
}
-const QString& KSSLPeerInfo::peerHost() const {
+const TQString& KSSLPeerInfo::peerHost() const {
return d->peerHost;
}
diff --git a/kio/kssl/ksslpeerinfo.h b/kio/kssl/ksslpeerinfo.h
index deacbe830..bdcf91231 100644
--- a/kio/kssl/ksslpeerinfo.h
+++ b/kio/kssl/ksslpeerinfo.h
@@ -23,8 +23,8 @@
class KSSL;
-#include <qglobal.h>
-#include <qstringlist.h>
+#include <tqglobal.h>
+#include <tqstringlist.h>
#include <ksslcertificate.h>
class KSSLPeerInfoPrivate;
@@ -73,7 +73,7 @@ public:
* @return true if it matches
* @see setPeerHost
*/
- bool cnMatchesAddress(QString cn);
+ bool cnMatchesAddress(TQString cn);
/**
* Set the host that we are connected to. This is generally set by
@@ -82,12 +82,12 @@ public:
*
* @param host the hostname
*/
- void setPeerHost(QString host = QString::null);
+ void setPeerHost(TQString host = TQString::null);
/**
* Returns the host we are connected to.
*/
- const QString& peerHost() const;
+ const TQString& peerHost() const;
/**
* Clear out the host name.
diff --git a/kio/kssl/ksslpemcallback.cc b/kio/kssl/ksslpemcallback.cc
index babcb96da..bc314673c 100644
--- a/kio/kssl/ksslpemcallback.cc
+++ b/kio/kssl/ksslpemcallback.cc
@@ -28,7 +28,7 @@
int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) {
#ifdef KSSL_HAVE_SSL
- QCString pass;
+ TQCString pass;
Q_UNUSED(userdata);
Q_UNUSED(rwflag);
diff --git a/kio/kssl/ksslpkcs12.cc b/kio/kssl/ksslpkcs12.cc
index d890df8eb..b8b23cf1c 100644
--- a/kio/kssl/ksslpkcs12.cc
+++ b/kio/kssl/ksslpkcs12.cc
@@ -25,8 +25,8 @@
#include <kopenssl.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <ksslall.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -72,12 +72,12 @@ KSSLPKCS12::~KSSLPKCS12() {
}
-KSSLPKCS12* KSSLPKCS12::fromString(QString base64, QString password) {
+KSSLPKCS12* KSSLPKCS12::fromString(TQString base64, TQString password) {
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
if (base64.isEmpty()) return NULL;
- QByteArray qba, qbb = QCString(base64.latin1()).copy();
+ TQByteArray qba, qbb = TQCString(base64.latin1()).copy();
KCodecs::base64Decode(qbb, qba);
ktf.file()->writeBlock(qba);
ktf.close();
@@ -90,9 +90,9 @@ return NULL;
-KSSLPKCS12* KSSLPKCS12::loadCertFile(QString filename, QString password) {
+KSSLPKCS12* KSSLPKCS12::loadCertFile(TQString filename, TQString password) {
#ifdef KSSL_HAVE_SSL
-QFile qf(filename);
+TQFile qf(filename);
PKCS12 *newpkcs = NULL;
if (!qf.open(IO_ReadOnly))
@@ -130,7 +130,7 @@ void KSSLPKCS12::setCert(PKCS12 *c) {
}
-bool KSSLPKCS12::changePassword(QString pold, QString pnew) {
+bool KSSLPKCS12::changePassword(TQString pold, TQString pnew) {
#ifdef KSSL_HAVE_SSL
// OpenSSL makes me cast away the const here. argh
return (0 == kossl->PKCS12_newpass(_pkcs,
@@ -141,7 +141,7 @@ return false;
}
-bool KSSLPKCS12::parse(QString pass) {
+bool KSSLPKCS12::parse(TQString pass) {
#ifdef KSSL_HAVE_SSL
X509 *x = NULL;
@@ -193,8 +193,8 @@ KSSLCertificate *KSSLPKCS12::getCertificate() {
}
-QString KSSLPKCS12::toString() {
-QString base64;
+TQString KSSLPKCS12::toString() {
+TQString base64;
#ifdef KSSL_HAVE_SSL
unsigned char *p;
int len;
@@ -204,7 +204,7 @@ int len;
char *buf = new char[len];
p = (unsigned char *)buf;
kossl->i2d_PKCS12(_pkcs, &p);
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(buf, len);
base64 = KCodecs::base64Encode(qba);
qba.resetRawData(buf, len);
@@ -216,9 +216,9 @@ return base64;
-bool KSSLPKCS12::toFile(QString filename) {
+bool KSSLPKCS12::toFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile out(filename);
+TQFile out(filename);
if (!out.open(IO_WriteOnly)) return false;
@@ -278,7 +278,7 @@ return (validate(p) == KSSLCertificate::Ok);
}
-QString KSSLPKCS12::name() {
+TQString KSSLPKCS12::name() {
return _cert->getSubject();
}
diff --git a/kio/kssl/ksslpkcs12.h b/kio/kssl/ksslpkcs12.h
index 74d6139ca..bfbd78d3e 100644
--- a/kio/kssl/ksslpkcs12.h
+++ b/kio/kssl/ksslpkcs12.h
@@ -72,15 +72,15 @@ public:
* certificate instead of passing the object itself.
* @return the name of the certificate
*/
- QString name();
+ TQString name();
/**
- * Create a KSSLPKCS12 object from a Base64 in a QString.
+ * Create a KSSLPKCS12 object from a Base64 in a TQString.
* @param base64 the base64 encoded certificate
* @param password a password for the certificate if encrypted
* @return the PKCS#12 object, or NULL on failure.
*/
- static KSSLPKCS12* fromString(QString base64, QString password = "");
+ static KSSLPKCS12* fromString(TQString base64, TQString password = "");
/**
* Create a KSSLPKCS12 object by reading a PKCS#12 file.
@@ -88,13 +88,13 @@ public:
* @param password a password for the certificate if encrypted
* @return the PKCS#12 object, or NULL on failure.
*/
- static KSSLPKCS12* loadCertFile(QString filename, QString password = "");
+ static KSSLPKCS12* loadCertFile(TQString filename, TQString password = "");
/**
* Convert to a Base64 string.
* @return the certificate in base64 form
*/
- QString toString();
+ TQString toString();
/**
* Raw set the PKCS12 object.
@@ -109,7 +109,7 @@ public:
* @param pnew the new password
* @return true on success
*/
- bool changePassword(QString pold, QString pnew);
+ bool changePassword(TQString pold, TQString pnew);
/**
* Get the private key.
@@ -129,7 +129,7 @@ public:
* @param filename the file to write to
* @return true on success
*/
- bool toFile(QString filename);
+ bool toFile(TQString filename);
/**
* Check the X.509 and private key to make sure they're valid.
@@ -178,7 +178,7 @@ public:
protected:
KSSLPKCS12();
- bool parse(QString pass);
+ bool parse(TQString pass);
private:
KSSLPKCS12Private *d;
diff --git a/kio/kssl/ksslpkcs7.cc b/kio/kssl/ksslpkcs7.cc
index 14210b1bd..8db0000f0 100644
--- a/kio/kssl/ksslpkcs7.cc
+++ b/kio/kssl/ksslpkcs7.cc
@@ -25,8 +25,8 @@
#include <kopenssl.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <ksslall.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -60,12 +60,12 @@ KSSLPKCS7::~KSSLPKCS7() {
}
-KSSLPKCS7* KSSLPKCS7::fromString(QString base64) {
+KSSLPKCS7* KSSLPKCS7::fromString(TQString base64) {
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
if (base64.isEmpty()) return NULL;
- QByteArray qba, qbb = QCString(base64.latin1()).copy();
+ TQByteArray qba, qbb = TQCString(base64.latin1()).copy();
KCodecs::base64Decode(qbb, qba);
ktf.file()->writeBlock(qba);
ktf.close();
@@ -78,9 +78,9 @@ return NULL;
-KSSLPKCS7* KSSLPKCS7::loadCertFile(QString filename) {
+KSSLPKCS7* KSSLPKCS7::loadCertFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile qf(filename);
+TQFile qf(filename);
PKCS7 *newpkcs = NULL;
if (!qf.open(IO_ReadOnly))
@@ -122,8 +122,8 @@ KSSLCertChain *KSSLPKCS7::getChain() {
}
-QString KSSLPKCS7::toString() {
-QString base64;
+TQString KSSLPKCS7::toString() {
+TQString base64;
#ifdef KSSL_HAVE_SSL
unsigned char *p;
int len;
@@ -133,7 +133,7 @@ int len;
char *buf = new char[len];
p = (unsigned char *)buf;
kossl->i2d_PKCS7(_pkcs, &p);
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(buf, len);
base64 = KCodecs::base64Encode(qba);
qba.resetRawData(buf, len);
@@ -145,9 +145,9 @@ return base64;
-bool KSSLPKCS7::toFile(QString filename) {
+bool KSSLPKCS7::toFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile out(filename);
+TQFile out(filename);
if (!out.open(IO_WriteOnly)) return false;
@@ -190,10 +190,10 @@ return (validate() == KSSLCertificate::Ok);
}
-QString KSSLPKCS7::name() {
+TQString KSSLPKCS7::name() {
if (_cert)
return _cert->getSubject();
- return QString();
+ return TQString();
}
diff --git a/kio/kssl/ksslpkcs7.h b/kio/kssl/ksslpkcs7.h
index 3ac481345..07c221464 100644
--- a/kio/kssl/ksslpkcs7.h
+++ b/kio/kssl/ksslpkcs7.h
@@ -71,27 +71,27 @@ public:
* certificate instead of passing the object itself.
* @return the name of the certificate
*/
- QString name();
+ TQString name();
/**
- * Create a KSSLPKCS7 object from a Base64 in a QString.
+ * Create a KSSLPKCS7 object from a Base64 in a TQString.
* @param base64 the base64 representation of the certificate
* @return a PKCS#7 object, or NULL on failure
*/
- static KSSLPKCS7* fromString(QString base64);
+ static KSSLPKCS7* fromString(TQString base64);
/**
* Create a KSSLPKCS7 object by reading a PKCS#7 file.
* @param filename the filename to read the certificate from
* @return a PKCS#7 object, or NULL on failure
*/
- static KSSLPKCS7* loadCertFile(QString filename);
+ static KSSLPKCS7* loadCertFile(TQString filename);
/**
* Convert to a Base64 string.
* @return the PKCS#7 object in base64 form
*/
- QString toString();
+ TQString toString();
/**
* Raw set the PKCS7 object.
@@ -119,7 +119,7 @@ public:
* @param filename the filename to write
* @return true on success
*/
- bool toFile(QString filename);
+ bool toFile(TQString filename);
/**
* Check the chain to make sure it's valid.
diff --git a/kio/kssl/ksslsession.cc b/kio/kssl/ksslsession.cc
index 28cfe0202..3c80233f1 100644
--- a/kio/kssl/ksslsession.cc
+++ b/kio/kssl/ksslsession.cc
@@ -41,10 +41,10 @@ KSSLSession::~KSSLSession() {
}
-QString KSSLSession::toString() const {
-QString rc;
+TQString KSSLSession::toString() const {
+TQString rc;
#ifdef KSSL_HAVE_SSL
-QByteArray qba;
+TQByteArray qba;
SSL_SESSION *session = static_cast<SSL_SESSION*>(_session);
unsigned int slen = KOpenSSLProxy::self()->i2d_SSL_SESSION(session, 0L);
unsigned char *csess = new unsigned char[slen];
@@ -52,7 +52,7 @@ unsigned char *p = csess;
if (!KOpenSSLProxy::self()->i2d_SSL_SESSION(session, &p)) {
delete[] csess;
- return QString::null;
+ return TQString::null;
}
// encode it into a QString
@@ -64,10 +64,10 @@ return rc;
}
-KSSLSession *KSSLSession::fromString(const QString& s) {
+KSSLSession *KSSLSession::fromString(const TQString& s) {
KSSLSession *session = 0L;
#ifdef KSSL_HAVE_SSL
-QByteArray qba, qbb = s.local8Bit().copy();
+TQByteArray qba, qbb = s.local8Bit().copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
SSL_SESSION *ss = KOSSL::self()->d2i_SSL_SESSION(0L, &qbap, qba.size());
diff --git a/kio/kssl/ksslsession.h b/kio/kssl/ksslsession.h
index 35f6c11a5..202781418 100644
--- a/kio/kssl/ksslsession.h
+++ b/kio/kssl/ksslsession.h
@@ -21,7 +21,7 @@
#ifndef _KSSLSESSION_H
#define _KSSLSESSION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -50,14 +50,14 @@ public:
/**
* Convert to a base64 encoded string (so it can be copied safely)
*/
- QString toString() const;
+ TQString toString() const;
/**
* Create as session ID object from a base64 encoded string.
* @param s the session id in base64 encoded ASN.1 format
* @return a KSSLSession object, or 0L on error
*/
- static KSSLSession* fromString(const QString& s);
+ static KSSLSession* fromString(const TQString& s);
protected:
KSSLSession();
diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc
index 3bbc3ad74..5a77b12bf 100644
--- a/kio/kssl/ksslsettings.cc
+++ b/kio/kssl/ksslsettings.cc
@@ -29,8 +29,8 @@
#include <pwd.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qsortedlist.h>
+#include <tqfile.h>
+#include <tqsortedlist.h>
#include "ksslsettings.h"
#include <kglobal.h>
@@ -60,7 +60,7 @@
public:
CipherNode(const char *_name, int _keylen) :
name(_name), keylen(_keylen) {}
- QString name;
+ TQString name;
int keylen;
inline int operator==(CipherNode &x)
{ return ((x.keylen == keylen) && (x.name == name)); }
@@ -83,7 +83,7 @@ public:
KOSSL *kossl;
bool m_bUseEGD;
bool m_bUseEFile;
- QString m_EGDPath;
+ TQString m_EGDPath;
bool m_bSendX509;
bool m_bPromptX509;
};
@@ -131,13 +131,13 @@ bool KSSLSettings::tlsv1() const {
// FIXME: we should make a default list available if this fails
// since OpenSSL seems to just choose any old thing if it's given an
// empty list. This behavior is not confirmed though.
-QString KSSLSettings::getCipherList() {
- QString clist;
+TQString KSSLSettings::getCipherList() {
+ TQString clist;
#ifdef KSSL_HAVE_SSL
- QString tcipher;
+ TQString tcipher;
bool firstcipher = true;
SSL_METHOD *meth = 0L;
- QPtrList<CipherNode> cipherList;
+ TQPtrList<CipherNode> cipherList;
cipherList.setAutoDelete(true);
@@ -296,7 +296,7 @@ void KSSLSettings::save() {
#ifdef KSSL_HAVE_SSL
m_cfg->setGroup("SSLv2");
for (unsigned int i = 0; i < v2ciphers.count(); i++) {
- QString ciphername;
+ TQString ciphername;
ciphername.sprintf("cipher_%s", v2ciphers[i].ascii());
if (v2selectedciphers.contains(v2ciphers[i])) {
m_cfg->writeEntry(ciphername, true);
@@ -305,7 +305,7 @@ void KSSLSettings::save() {
m_cfg->setGroup("SSLv3");
for (unsigned int i = 0; i < v3ciphers.count(); i++) {
- QString ciphername;
+ TQString ciphername;
ciphername.sprintf("cipher_%s", v3ciphers[i].ascii());
if (v3selectedciphers.contains(v3ciphers[i])) {
m_cfg->writeEntry(ciphername, true);
@@ -316,9 +316,9 @@ void KSSLSettings::save() {
m_cfg->sync();
// insure proper permissions -- contains sensitive data
- QString cfgName(KGlobal::dirs()->findResource("config", "cryptodefaults"));
+ TQString cfgName(KGlobal::dirs()->findResource("config", "cryptodefaults"));
if (!cfgName.isEmpty())
- ::chmod(QFile::encodeName(cfgName), 0600);
+ ::chmod(TQFile::encodeName(cfgName), 0600);
#endif
}
@@ -342,7 +342,7 @@ void KSSLSettings::setTLSv1(bool enabled) { m_bUseTLSv1 = enabled; }
void KSSLSettings::setSSLv2(bool enabled) { m_bUseSSLv2 = enabled; }
void KSSLSettings::setSSLv3(bool enabled) { m_bUseSSLv3 = enabled; }
-QString& KSSLSettings::getEGDPath() { return d->m_EGDPath; }
+TQString& KSSLSettings::getEGDPath() { return d->m_EGDPath; }
#ifdef KSSL_HAVE_SSL
#undef sk_new
diff --git a/kio/kssl/ksslsettings.h b/kio/kssl/ksslsettings.h
index e348d36c9..44345937b 100644
--- a/kio/kssl/ksslsettings.h
+++ b/kio/kssl/ksslsettings.h
@@ -21,8 +21,8 @@
#ifndef _KSSLSETTINGS_H
#define _KSSLSETTINGS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kconfig.h>
class KSSLSettingsPrivate;
@@ -183,14 +183,14 @@ public:
* use in a connection.
* @return the cipher list
*/
- QString getCipherList();
+ TQString getCipherList();
/**
* Get the configured path to the entropy gathering daemon or entropy
* file.
* @return the path
*/
- QString& getEGDPath();
+ TQString& getEGDPath();
/**
* Load the user's settings.
@@ -213,8 +213,8 @@ private:
bool m_bWarnOnEnter, m_bWarnOnUnencrypted, m_bWarnOnLeave, m_bWarnOnMixed;
bool m_bWarnSelfSigned, m_bWarnRevoked, m_bWarnExpired;
- QValueList<QString> v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers;
- QValueList<int> v2bits, v3bits;
+ TQValueList<TQString> v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers;
+ TQValueList<int> v2bits, v3bits;
KSSLSettingsPrivate *d;
};
diff --git a/kio/kssl/ksslsigners.cc b/kio/kssl/ksslsigners.cc
index 91e9f1755..2392f4a36 100644
--- a/kio/kssl/ksslsigners.cc
+++ b/kio/kssl/ksslsigners.cc
@@ -19,8 +19,8 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "ksslcertificate.h"
#include "ksslsigners.h"
#include <stdlib.h>
@@ -47,21 +47,21 @@ bool KSSLSigners::addCA(KSSLCertificate& cert,
}
-bool KSSLSigners::addCA(QString cert,
+bool KSSLSigners::addCA(TQString cert,
bool ssl,
bool email,
bool code) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
arg << ssl << email << code;
bool rc = dcc->call("kded", "kssld",
- "caAdd(QString,bool,bool,bool)",
+ "caAdd(TQString,bool,bool,bool)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -72,15 +72,15 @@ return false;
bool KSSLSigners::regenerate() {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
bool rc = dcc->call("kded", "kssld",
"caRegenerate()",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -95,17 +95,17 @@ bool KSSLSigners::useForSSL(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForSSL(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForSSL(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForSSL(QString)",
+ "caUseForSSL(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -120,17 +120,17 @@ bool KSSLSigners::useForEmail(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForEmail(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForEmail(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForEmail(QString)",
+ "caUseForEmail(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -145,17 +145,17 @@ bool KSSLSigners::useForCode(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForCode(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForCode(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForCode(QString)",
+ "caUseForCode(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -170,17 +170,17 @@ bool KSSLSigners::remove(KSSLCertificate& cert) {
}
-bool KSSLSigners::remove(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::remove(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caRemove(QString)",
+ "caRemove(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -190,17 +190,17 @@ return false;
}
-QStringList KSSLSigners::list() {
- QStringList drc;
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLSigners::list() {
+ TQStringList drc;
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
bool rc = dcc->call("kded", "kssld",
"caList()",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
retStream >> drc;
}
@@ -208,18 +208,18 @@ return drc;
}
-QString KSSLSigners::getCert(QString subject) {
- QString drc;
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQString KSSLSigners::getCert(TQString subject) {
+ TQString drc;
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caGetCert(QString)",
+ "caGetCert(TQString)",
data, rettype, retval);
- if (rc && rettype == "QString") {
- QDataStream retStream(retval, IO_ReadOnly);
+ if (rc && rettype == "TQString") {
+ TQDataStream retStream(retval, IO_ReadOnly);
retStream >> drc;
}
@@ -227,17 +227,17 @@ return drc;
}
-bool KSSLSigners::setUse(QString subject, bool ssl, bool email, bool code) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::setUse(TQString subject, bool ssl, bool email, bool code) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject << ssl << email << code;
bool rc = dcc->call("kded", "kssld",
- "caSetUse(QString,bool,bool,bool)",
+ "caSetUse(TQString,bool,bool,bool)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
diff --git a/kio/kssl/ksslsigners.h b/kio/kssl/ksslsigners.h
index 3cabf639c..476c76530 100644
--- a/kio/kssl/ksslsigners.h
+++ b/kio/kssl/ksslsigners.h
@@ -25,7 +25,7 @@
class KSSLCertificate;
class DCOPClient;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -72,7 +72,7 @@ public:
* @param code allow it to sign for code signing
* @return true on success
*/
- bool addCA(QString cert, bool ssl, bool email, bool code);
+ bool addCA(TQString cert, bool ssl, bool email, bool code);
/**
* Regenerate the signer-root file from the user's settings.
@@ -92,7 +92,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for SSL
*/
- bool useForSSL(QString subject);
+ bool useForSSL(TQString subject);
/**
* Determine if a certificate can be used for S/MIME certificate signing
@@ -106,7 +106,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for S/MIME
*/
- bool useForEmail(QString subject);
+ bool useForEmail(TQString subject);
/**
* Determine if a certificate can be used for code certificate signing
@@ -120,7 +120,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for code
*/
- bool useForCode(QString subject);
+ bool useForCode(TQString subject);
/**
* Remove a certificate signer from the database
@@ -134,14 +134,14 @@ public:
* @param subject the subject of the certificate to remove
* @return true on success
*/
- bool remove(QString subject);
+ bool remove(TQString subject);
/**
* List the signers in the database.
* @return the list of subjects in the database
* @see getCert
*/
- QStringList list();
+ TQStringList list();
/**
* Get a signer certificate from the database.
@@ -149,7 +149,7 @@ public:
* @param subject the subject of the certificate desired
* @return the base64 encoded certificate
*/
- QString getCert(QString subject);
+ TQString getCert(TQString subject);
/**
* Set the use of a particular entry in the certificate signer database.
@@ -159,7 +159,7 @@ public:
* @param code allow this for code certificate signing
* @return true on success
*/
- bool setUse(QString subject, bool ssl, bool email, bool code);
+ bool setUse(TQString subject, bool ssl, bool email, bool code);
private:
class KSSLSignersPrivate;
diff --git a/kio/kssl/ksslutils.cc b/kio/kssl/ksslutils.cc
index d5186b852..cf024347c 100644
--- a/kio/kssl/ksslutils.cc
+++ b/kio/kssl/ksslutils.cc
@@ -21,24 +21,24 @@
#include "ksslutils.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kopenssl.h"
#ifdef KSSL_HAVE_SSL
// This code is mostly taken from OpenSSL v0.9.5a
// by Eric Young
-QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt) {
-QDateTime qdt;
+TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt) {
+TQDateTime qdt;
char *v;
int gmt=0;
int i;
int y=0,M=0,d=0,h=0,m=0,s=0;
-QDate qdate;
-QTime qtime;
+TQDate qdate;
+TQTime qtime;
i = tm->length;
v = (char *)tm->data;
@@ -68,10 +68,10 @@ return qdt;
}
-QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
- QString qstr;
+TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
+ TQString qstr;
int gmt;
- QDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt);
+ TQDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt);
qstr = KGlobal::locale()->formatDateTime(qdt, false, true);
if (gmt) {
@@ -82,9 +82,9 @@ QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
}
-QString ASN1_INTEGER_QString(ASN1_INTEGER *aint) {
+TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint) {
char *rep = KOSSL::self()->i2s_ASN1_INTEGER(NULL, aint);
-QString yy = rep;
+TQString yy = rep;
KOSSL::self()->OPENSSL_free(rep);
return yy;
}
diff --git a/kio/kssl/ksslutils.h b/kio/kssl/ksslutils.h
index cdbfa1648..2035b2de4 100644
--- a/kio/kssl/ksslutils.h
+++ b/kio/kssl/ksslutils.h
@@ -48,17 +48,17 @@ class QDateTime;
* @return the date formatted in a QString
* @see ASN1_UTCTIME_QDateTime
*/
-KDE_EXPORT QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
+KDE_EXPORT TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
/**
- * Convert an ASN1 UTCTIME value to a QDateTime. Uses KLocale settings.
+ * Convert an ASN1 UTCTIME value to a TQDateTime. Uses KLocale settings.
*
* @param tm the OpenSSL ASN1_UTCTIME pointer
* @param isGmt set to 1 if the date is set to GMT
*
* @return the date formatted in a QDateTime
*/
-KDE_EXPORT QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
+KDE_EXPORT TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
/**
@@ -68,7 +68,7 @@ KDE_EXPORT QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
*
* @return the number formatted in a QString
*/
-KDE_EXPORT QString ASN1_INTEGER_QString(ASN1_INTEGER *aint);
+KDE_EXPORT TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint);
#endif
diff --git a/kio/kssl/ksslx509map.cc b/kio/kssl/ksslx509map.cc
index 1db98cc2d..7896fdfcf 100644
--- a/kio/kssl/ksslx509map.cc
+++ b/kio/kssl/ksslx509map.cc
@@ -19,10 +19,10 @@
*/
#include "ksslx509map.h"
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
-KSSLX509Map::KSSLX509Map(const QString& name) {
+KSSLX509Map::KSSLX509Map(const TQString& name) {
parse(name);
}
@@ -32,21 +32,21 @@ KSSLX509Map::~KSSLX509Map() {
}
-void KSSLX509Map::setValue(const QString& key, const QString& value) {
+void KSSLX509Map::setValue(const TQString& key, const TQString& value) {
m_pairs.replace(key, value);
}
-QString KSSLX509Map::getValue(const QString& key) const {
+TQString KSSLX509Map::getValue(const TQString& key) const {
if (!m_pairs.contains(key)) {
- return QString::null;
+ return TQString::null;
}
return m_pairs[key];
}
-static QStringList tokenizeBy(const QString& str, const QRegExp& tok, bool keepEmpties = false) {
-QStringList tokens;
+static TQStringList tokenizeBy(const TQString& str, const TQRegExp& tok, bool keepEmpties = false) {
+TQStringList tokens;
unsigned int head, tail;
const char *chstr = str.ascii();
unsigned int length = str.length();
@@ -61,7 +61,7 @@ unsigned int length = str.length();
}
for(head = 0, tail = 0; tail < length-1; head = tail+1) {
- QString thisline;
+ TQString thisline;
tail = str.find(tok, head);
@@ -78,15 +78,15 @@ unsigned int length = str.length();
}
-void KSSLX509Map::parse(const QString& name) {
-QStringList vl = tokenizeBy(name, QRegExp("/[A-Za-z]+="), false);
+void KSSLX509Map::parse(const TQString& name) {
+TQStringList vl = tokenizeBy(name, TQRegExp("/[A-Za-z]+="), false);
m_pairs.clear();
- for (QStringList::Iterator j = vl.begin(); j != vl.end(); ++j) {
- QStringList apair = tokenizeBy(*j, QRegExp("="), false);
+ for (TQStringList::Iterator j = vl.begin(); j != vl.end(); ++j) {
+ TQStringList apair = tokenizeBy(*j, TQRegExp("="), false);
if (m_pairs.contains(apair[0])) {
- QString oldValue = m_pairs[apair[0]];
+ TQString oldValue = m_pairs[apair[0]];
oldValue += "\n";
oldValue += apair[1];
m_pairs.replace(apair[0], oldValue);
@@ -97,7 +97,7 @@ QStringList vl = tokenizeBy(name, QRegExp("/[A-Za-z]+="), false);
}
-void KSSLX509Map::reset(const QString& name) {
+void KSSLX509Map::reset(const TQString& name) {
parse(name);
}
diff --git a/kio/kssl/ksslx509map.h b/kio/kssl/ksslx509map.h
index 9cd841119..e0b37fb26 100644
--- a/kio/kssl/ksslx509map.h
+++ b/kio/kssl/ksslx509map.h
@@ -21,8 +21,8 @@
#ifndef _KSSLX509MAP_H
#define _KSSLX509MAP_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ public:
*
* @param name the map to parse
*/
- KSSLX509Map(const QString& name);
+ KSSLX509Map(const TQString& name);
/**
* Destroy this map
@@ -56,7 +56,7 @@ public:
* @param key the key
* @param value the value
*/
- void setValue(const QString& key, const QString& value);
+ void setValue(const TQString& key, const TQString& value);
/**
* Get the value of an entry in the map
@@ -65,7 +65,7 @@ public:
*
* @return the value
*/
- QString getValue(const QString& key) const;
+ TQString getValue(const TQString& key) const;
/**
* Reset (clear) the internal storage.
@@ -73,14 +73,14 @@ public:
* @param name if this is not empty, it will be parsed and used as
* the new map internally
*/
- void reset(const QString& name = "");
+ void reset(const TQString& name = "");
private:
class KSSLX509MapPrivate;
KSSLX509MapPrivate *d;
- QMap<QString, QString> m_pairs;
+ TQMap<TQString, TQString> m_pairs;
- void parse(const QString& name);
+ void parse(const TQString& name);
};
#endif
diff --git a/kio/kssl/ksslx509v3.h b/kio/kssl/ksslx509v3.h
index f197e6586..fb163de34 100644
--- a/kio/kssl/ksslx509v3.h
+++ b/kio/kssl/ksslx509v3.h
@@ -21,7 +21,7 @@
#ifndef _KSSLX509V3_H
#define _KSSLX509V3_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
diff --git a/kio/misc/kdesasl/kdesasl.cpp b/kio/misc/kdesasl/kdesasl.cpp
index c59d157b8..b547f7e6b 100644
--- a/kio/misc/kdesasl/kdesasl.cpp
+++ b/kio/misc/kdesasl/kdesasl.cpp
@@ -22,7 +22,7 @@
#include <kmdcodec.h>
#include <kurl.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <stdlib.h>
#include <string.h>
@@ -35,8 +35,8 @@ KDESasl::KDESasl(const KURL &aUrl)
mFirst = true;
}
-KDESasl::KDESasl(const QString &aUser, const QString &aPass,
- const QString &aProtocol)
+KDESasl::KDESasl(const TQString &aUser, const TQString &aPass,
+ const TQString &aProtocol)
{
mProtocol = aProtocol;
mUser = aUser;
@@ -47,29 +47,29 @@ KDESasl::KDESasl(const QString &aUser, const QString &aPass,
KDESasl::~KDESasl() {
}
-QCString KDESasl::chooseMethod(const QStrIList aMethods)
+TQCString KDESasl::chooseMethod(const TQStrIList aMethods)
{
if (aMethods.contains("DIGEST-MD5")) mMethod = "DIGEST-MD5";
else if (aMethods.contains("CRAM-MD5")) mMethod = "CRAM-MD5";
else if (aMethods.contains("PLAIN")) mMethod = "PLAIN";
else if (aMethods.contains("LOGIN")) mMethod = "LOGIN";
- else mMethod = QCString();
+ else mMethod = TQCString();
return mMethod;
}
-void KDESasl::setMethod(const QCString &aMethod)
+void KDESasl::setMethod(const TQCString &aMethod)
{
mMethod = aMethod.upper();
}
-QByteArray KDESasl::getPlainResponse()
+TQByteArray KDESasl::getPlainResponse()
{
- QCString user = mUser.utf8();
- QCString pass = mPass.utf8();
+ TQCString user = mUser.utf8();
+ TQCString pass = mPass.utf8();
int userlen = user.length();
int passlen = pass.length();
// result = $user\0$user\0$pass (no trailing \0)
- QByteArray result(2 * userlen + passlen + 2);
+ TQByteArray result(2 * userlen + passlen + 2);
if ( userlen ) {
memcpy( result.data(), user.data(), userlen );
memcpy( result.data() + userlen + 1, user.data(), userlen );
@@ -80,18 +80,18 @@ QByteArray KDESasl::getPlainResponse()
return result;
}
-QByteArray KDESasl::getLoginResponse()
+TQByteArray KDESasl::getLoginResponse()
{
- QByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8();
+ TQByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8();
mFirst = !mFirst;
if (result.size()) result.resize(result.size() - 1);
return result;
}
-QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
+TQByteArray KDESasl::getCramMd5Response(const TQByteArray &aChallenge)
{
uint i;
- QByteArray secret = mPass.utf8();
+ TQByteArray secret = mPass.utf8();
int len = mPass.utf8().length();
secret.resize(len);
if (secret.size() > 64)
@@ -102,9 +102,9 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
}
secret.resize(64);
for (i = len; i < 64; i++) secret[i] = 0;
- QByteArray XorOpad(64);
+ TQByteArray XorOpad(64);
for (i = 0; i < 64; i++) XorOpad[i] = secret[i] ^ 0x5C;
- QByteArray XorIpad(64);
+ TQByteArray XorIpad(64);
for (i = 0; i < 64; i++) XorIpad[i] = secret[i] ^ 0x36;
KMD5 md5;
md5.update(XorIpad);
@@ -112,21 +112,21 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
KMD5 md5a;
md5a.update(XorOpad);
md5a.update(md5.rawDigest(), 16);
- QByteArray result = mUser.utf8();
+ TQByteArray result = mUser.utf8();
len = mUser.utf8().length();
result.resize(len + 33);
result[len] = ' ';
- QCString ch = md5a.hexDigest();
+ TQCString ch = md5a.hexDigest();
for (i = 0; i < 32; i++) result[i+len+1] = *(ch.data() + i);
return result;
}
-QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
+TQByteArray KDESasl::getDigestMd5Response(const TQByteArray &aChallenge)
{
mFirst = !mFirst;
- if (mFirst) return QByteArray();
- QCString str, realm, nonce, qop, algorithm, charset;
- QCString nc = "00000001";
+ if (mFirst) return TQByteArray();
+ TQCString str, realm, nonce, qop, algorithm, charset;
+ TQCString nc = "00000001";
unsigned int a, b, c, d;
a = 0;
while (a < aChallenge.size())
@@ -143,7 +143,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
d = c;
while (d < aChallenge.size() && aChallenge[d] != ',') d++;
}
- str = QCString(aChallenge.data() + c, d - c + 1);
+ str = TQCString(aChallenge.data() + c, d - c + 1);
if (qstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str;
else if (qstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str;
else if (qstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str;
@@ -156,7 +156,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
if (qop.isEmpty()) qop = "auth";
qop = "auth";
bool utf8 = qstricmp(charset, "utf-8") == 0;
- QCString digestUri = QCString(mProtocol.latin1()) + "/" + realm;
+ TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm;
/* Calculate the response */
/* Code based on code from the http io-slave
@@ -164,17 +164,17 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
Copyright (C) 2000,2001 Waldo Bastian <bastian@kde.org>
Copyright (C) 2000,2001 George Staikos <staikos@kde.org> */
KMD5 md, md2;
- QCString HA1, HA2;
- QCString cnonce;
+ TQCString HA1, HA2;
+ TQCString cnonce;
cnonce.setNum((1 + static_cast<int>(100000.0*rand()/(RAND_MAX+1.0))));
cnonce = KCodecs::base64Encode( cnonce );
// Calculate H(A1)
- QCString authStr = (utf8) ? mUser.utf8() : QCString(mUser.latin1());
+ TQCString authStr = (utf8) ? mUser.utf8() : TQCString(mUser.latin1());
authStr += ':';
authStr += realm;
authStr += ':';
- authStr += (utf8) ? mPass.utf8() : QCString(mPass.latin1());
+ authStr += (utf8) ? mPass.utf8() : TQCString(mPass.latin1());
md.update( authStr );
authStr = "";
@@ -220,30 +220,30 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
authStr += HA2;
md.reset();
md.update( authStr );
- QCString response = md.hexDigest();
+ TQCString response = md.hexDigest();
/* End of response calculation */
- QCString result;
+ TQCString result;
if (utf8)
{
result = "charset=utf-8,username=\"" + mUser.utf8();
} else {
- result = "charset=iso-8859-1,username=\"" + QCString(mUser.latin1());
+ result = "charset=iso-8859-1,username=\"" + TQCString(mUser.latin1());
}
result += "\",realm=\"" + realm + "\",nonce=\"" + nonce;
result += "\",nc=" + nc + ",cnonce=\"" + cnonce;
result += "\",digest-uri=\"" + digestUri;
result += "\",response=" + response + ",qop=" + qop;
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate(result.data(), result.length());
return ba;
}
-QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64)
+TQByteArray KDESasl::getBinaryResponse(const TQByteArray &aChallenge, bool aBase64)
{
if (aBase64)
{
- QByteArray ba;
+ TQByteArray ba;
KCodecs::base64Decode(aChallenge, ba);
KCodecs::base64Encode(getBinaryResponse(ba, false), ba);
return ba;
@@ -254,17 +254,17 @@ QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64
return getCramMd5Response(aChallenge);
if (qstricmp(mMethod, "DIGEST-MD5") == 0)
return getDigestMd5Response(aChallenge);
-// return getDigestMd5Response(QCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8"));
- return QByteArray();
+// return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8"));
+ return TQByteArray();
}
-QCString KDESasl::getResponse(const QByteArray &aChallenge, bool aBase64)
+TQCString KDESasl::getResponse(const TQByteArray &aChallenge, bool aBase64)
{
- QByteArray ba = getBinaryResponse(aChallenge, aBase64);
- return QCString(ba.data(), ba.size() + 1);
+ TQByteArray ba = getBinaryResponse(aChallenge, aBase64);
+ return TQCString(ba.data(), ba.size() + 1);
}
-QCString KDESasl::method() const {
+TQCString KDESasl::method() const {
return mMethod;
}
diff --git a/kio/misc/kdesasl/kdesasl.h b/kio/misc/kdesasl/kdesasl.h
index 834c83913..4049b96eb 100644
--- a/kio/misc/kdesasl/kdesasl.h
+++ b/kio/misc/kdesasl/kdesasl.h
@@ -20,7 +20,7 @@
#ifndef KDESASL_H
#define KDESASL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -59,7 +59,7 @@ class QStrIList;
* mySendAuthCommand( sasl.method() );
* }
* for ( ; !sasl.dialogComplete( numResponses ) ; ++numResponses ) {
- * QByteArray challenge = myRecvChallenge();
+ * TQByteArray challenge = myRecvChallenge();
* mySendResponse( sasl.getResponse( challenge ) );
* }
* return myCheckSuccess();
@@ -82,7 +82,7 @@ public:
* This is a conveniece function and differs from the above function only by
* what arguments it accepts.
*/
- KDESasl(const QString &aUser, const QString &aPass, const QString &aProtocol);
+ KDESasl(const TQString &aUser, const TQString &aPass, const TQString &aProtocol);
/*
* You need to have a virtual destructor!
*/
@@ -91,16 +91,16 @@ public:
* @returns the most secure method from the given methods and use it for
* further operations.
*/
- virtual QCString chooseMethod(const QStrIList aMethods);
+ virtual TQCString chooseMethod(const TQStrIList aMethods);
/**
* Explicitely set the SASL method used.
*/
- virtual void setMethod(const QCString &aMethod);
+ virtual void setMethod(const TQCString &aMethod);
/**
* @return the SASL method used.
* @since 3.2
*/
- QCString method() const;
+ TQCString method() const;
/**
* @param numCalls number of times getResponse() has been called.
* @return whether the challenge/response dialog has completed
@@ -126,11 +126,11 @@ public:
* encoding. The challenge is decoded from base64 and the response is
* encoded base64 if set to true.
*/
- QCString getResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64 = true);
+ TQCString getResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64 = true);
/**
* Create a response as above but place it in a QByteArray
*/
- QByteArray getBinaryResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64=true);
+ TQByteArray getBinaryResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64=true);
/**
* Returns true if the client is supposed to initiate the
* challenge-respinse dialog with an initial response (which most
@@ -146,23 +146,23 @@ protected:
/**
* PLAIN authentication as described in RFC 2595
*/
- virtual QByteArray getPlainResponse();
+ virtual TQByteArray getPlainResponse();
/**
* LOGIN authentication
*/
- virtual QByteArray getLoginResponse();
+ virtual TQByteArray getLoginResponse();
/**
* CRAM-MD5 authentication as described in RFC 2195
*/
- virtual QByteArray getCramMd5Response(const QByteArray &aChallenge);
+ virtual TQByteArray getCramMd5Response(const TQByteArray &aChallenge);
/**
* DIGEST-MD5 authentication as described in RFC 2831
*/
- virtual QByteArray getDigestMd5Response(const QByteArray &aChallenge);
+ virtual TQByteArray getDigestMd5Response(const TQByteArray &aChallenge);
private:
- QString mProtocol, mUser, mPass;
- QCString mMethod;
+ TQString mProtocol, mUser, mPass;
+ TQCString mMethod;
bool mFirst;
};
diff --git a/kio/misc/kfile/fileprops.cpp b/kio/misc/kfile/fileprops.cpp
index 9b7f75380..096fc1f03 100644
--- a/kio/misc/kfile/fileprops.cpp
+++ b/kio/misc/kfile/fileprops.cpp
@@ -18,8 +18,8 @@
#include <iostream>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -35,20 +35,20 @@
using namespace std;
-static QString beatifyValue( const QString& value )
+static TQString beatifyValue( const TQString& value )
{
if ( value.isNull() )
- return QString("(no value for key available)");
+ return TQString("(no value for key available)");
else if ( value.isEmpty() )
- return QString("(empty)");
+ return TQString("(empty)");
return value;
}
-FileProps::FileProps( const QString& path, const QStringList& suppliedGroups )
+FileProps::FileProps( const TQString& path, const TQStringList& suppliedGroups )
: m_dirty( false )
{
- m_info = new KFileMetaInfo(path, QString::null, KFileMetaInfo::Everything);
+ m_info = new KFileMetaInfo(path, TQString::null, KFileMetaInfo::Everything);
m_userSuppliedGroups = !suppliedGroups.isEmpty();
m_groupsToUse = m_userSuppliedGroups ? suppliedGroups : m_info->groups();
}
@@ -72,28 +72,28 @@ bool FileProps::isValid() const
return m_info->isValid();
}
-QStringList FileProps::supportedGroups() const
+TQStringList FileProps::supportedGroups() const
{
return m_info->supportedGroups();
}
-QStringList FileProps::availableGroups() const
+TQStringList FileProps::availableGroups() const
{
return m_info->groups();
}
-QStringList FileProps::supportedKeys( const QString& group ) const
+TQStringList FileProps::supportedKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return g.supportedKeys();
}
-QStringList FileProps::availableKeys( const QString& group ) const
+TQStringList FileProps::availableKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
- QStringList allKeys = g.keys();
- QStringList ret;
- QStringList::ConstIterator it = allKeys.begin();
+ TQStringList allKeys = g.keys();
+ TQStringList ret;
+ TQStringList::ConstIterator it = allKeys.begin();
for ( ; it != allKeys.end(); ++it )
{
if ( g.item( *it ).isValid() )
@@ -103,21 +103,21 @@ QStringList FileProps::availableKeys( const QString& group ) const
return ret;
}
-QStringList FileProps::preferredKeys( const QString& group ) const
+TQStringList FileProps::preferredKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return g.preferredKeys();
}
-QString FileProps::getValue( const QString& group,
- const QString& key ) const
+TQString FileProps::getValue( const TQString& group,
+ const TQString& key ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValue( g, key );
}
-bool FileProps::setValue( const QString& group,
- const QString& key, const QString &value )
+bool FileProps::setValue( const TQString& group,
+ const TQString& key, const TQString &value )
{
KFileMetaInfoGroup g = m_info->group( group );
bool wasAdded = false;
@@ -141,13 +141,13 @@ bool FileProps::setValue( const QString& group,
return ok;
}
-QStringList FileProps::allValues( const QString& group ) const
+TQStringList FileProps::allValues( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValueList( g, g.keys() );
}
-QStringList FileProps::preferredValues( const QString& group ) const
+TQStringList FileProps::preferredValues( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValueList( g, g.preferredKeys() );
@@ -156,18 +156,18 @@ QStringList FileProps::preferredValues( const QString& group ) const
// static helper:
// creates strings like
// "group: translatedKey: value"
-QString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
- const QString& key )
+TQString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
+ const TQString& key )
{
static const int MAX_SPACE = 25;
KFileMetaInfoItem item = g.item( key );
- QString result("%1");
+ TQString result("%1");
result = result.arg( (item.isValid() ? item.translatedKey() : key) + ":",
-MAX_SPACE );
result.append( beatifyValue( item.string() ) );
- QString group("%1");
+ TQString group("%1");
group = group.arg( g.translatedName() + ":", -MAX_SPACE );
result.prepend( group );
@@ -175,11 +175,11 @@ QString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
}
// static
-QStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g,
- const QStringList& keys )
+TQStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g,
+ const TQStringList& keys )
{
- QStringList result;
- QStringList::ConstIterator it = keys.begin();
+ TQStringList result;
+ TQStringList::ConstIterator it = keys.begin();
for ( ; it != keys.end(); ++it )
result.append( FileProps::createKeyValue( g, *it ) );
@@ -263,7 +263,7 @@ static KCmdLineOptions options[] =
static void printSupportedMimeTypes()
{
- QStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes();
+ TQStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes();
if ( allMimeTypes.isEmpty() )
{
cout <<
@@ -274,7 +274,7 @@ static void printSupportedMimeTypes()
cout << i18n("Supported MimeTypes:").local8Bit() << endl;
- QStringList::ConstIterator it = allMimeTypes.begin();
+ TQStringList::ConstIterator it = allMimeTypes.begin();
for ( ; it != allMimeTypes.end(); it++ )
cout << (*it).local8Bit() << endl;
}
@@ -309,28 +309,28 @@ static void printMimeTypes( const KCmdLineArgs *args )
}
}
-static void printList( const QStringList& list )
+static void printList( const TQStringList& list )
{
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it )
cout << (*it).local8Bit() << endl;
cout << endl;
}
-static void processMetaDataOptions( const QPtrList<FileProps> propList,
+static void processMetaDataOptions( const TQPtrList<FileProps> propList,
KCmdLineArgs *args )
{
// kfile --mimetype --supportedMimetypes --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...]
// "key" may be a list of keys, separated by commas
- QString line("-- -------------------------------------------------------");
+ TQString line("-- -------------------------------------------------------");
FileProps *props;
- QPtrListIterator<FileProps> it( propList );
+ TQPtrListIterator<FileProps> it( propList );
for ( ; (props = it.current()); ++it )
{
- QString file = props->fileName() + " ";
- QString fileString = line.replace( 3, file.length(), file );
- cout << QFile::encodeName( fileString ) << endl;
+ TQString file = props->fileName() + " ";
+ TQString fileString = line.replace( 3, file.length(), file );
+ cout << TQFile::encodeName( fileString ) << endl;
if ( args->isSet( "listsupported" ) )
{
@@ -345,8 +345,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "listavailable" ) )
{
cout << "=Available Keys=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator git = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator git = groups.begin();
for ( ; git != groups.end(); ++git )
{
cout << "Group: " << (*git).local8Bit() << endl;
@@ -360,8 +360,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "getValue" ) )
{
cout << "=Value=" << endl;
- QString key = QString::fromLocal8Bit( args->getOption("getValue"));
- QStringList::ConstIterator git = props->groupsToUse().begin();
+ TQString key = TQString::fromLocal8Bit( args->getOption("getValue"));
+ TQStringList::ConstIterator git = props->groupsToUse().begin();
for ( ; git != props->groupsToUse().end(); ++git )
cout << props->getValue( *git, key ).local8Bit() << endl;
}
@@ -369,17 +369,17 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "setValue" ) )
{
// separate key and value from the line "key=value"
- QString cmd = QString::fromLocal8Bit( args->getOption("setValue"));
- QString key = cmd.section( '=', 0, 0 );
- QString value = cmd.section( '=', 1 );
+ TQString cmd = TQString::fromLocal8Bit( args->getOption("setValue"));
+ TQString key = cmd.section( '=', 0, 0 );
+ TQString value = cmd.section( '=', 1 );
// either use supplied groups or all supported groups
// (not only the available!)
- QStringList groups = props->userSuppliedGroups() ?
+ TQStringList groups = props->userSuppliedGroups() ?
props->groupsToUse() :
props->supportedGroups();
- QStringList::ConstIterator git = groups.begin();
+ TQStringList::ConstIterator git = groups.begin();
for ( ; git != groups.end(); ++git )
props->setValue( *git, key, value );
}
@@ -387,16 +387,16 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "allValues" ) )
{
cout << "=All Values=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator group = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator group = groups.begin();
for ( ; group != groups.end(); ++group )
printList( props->allValues( *group ) );
}
if ( args->isSet( "preferredValues" ) && !args->isSet("allValues") )
{
cout << "=Preferred Values=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator group = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator group = groups.begin();
for ( ; group != groups.end(); ++group )
printList( props->preferredValues( *group ) );
}
@@ -425,7 +425,7 @@ int main( int argc, char **argv )
KApplication app( useGUI, useGUI );
- QPtrList<FileProps> m_props;
+ TQPtrList<FileProps> m_props;
m_props.setAutoDelete( true );
bool quiet = args->isSet( "quiet" );
@@ -443,13 +443,13 @@ int main( int argc, char **argv )
return true;
}
- QStringList groupsToUse;
+ TQStringList groupsToUse;
QCStringList suppliedGroups = args->getOptionList( "groups" );
QCStringList::ConstIterator it = suppliedGroups.begin();
for ( ; it != suppliedGroups.end(); ++it )
- groupsToUse.append( QString::fromLocal8Bit( (*it) ) );
+ groupsToUse.append( TQString::fromLocal8Bit( (*it) ) );
- QString mimeType;
+ TQString mimeType;
for ( int i = 0; i < files; i++ )
{
diff --git a/kio/misc/kfile/fileprops.h b/kio/misc/kfile/fileprops.h
index a26c1d3bb..41d4f7c86 100644
--- a/kio/misc/kfile/fileprops.h
+++ b/kio/misc/kfile/fileprops.h
@@ -19,55 +19,55 @@
#ifndef KFILEPROPS_H
#define KFILEPROPS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kfilemetainfo.h>
class FileProps
{
public:
- FileProps( const QString& path, const QStringList& suppliedGroups );
+ FileProps( const TQString& path, const TQStringList& suppliedGroups );
virtual ~FileProps();
bool isValid() const;
- QString fileName() const { return m_info->path(); }
+ TQString fileName() const { return m_info->path(); }
- QStringList supportedGroups() const;
- QStringList availableGroups() const;
- QStringList translatedGroups();
+ TQStringList supportedGroups() const;
+ TQStringList availableGroups() const;
+ TQStringList translatedGroups();
- const QStringList& groupsToUse() const { return m_groupsToUse; }
+ const TQStringList& groupsToUse() const { return m_groupsToUse; }
bool userSuppliedGroups() const { return m_userSuppliedGroups; }
- QStringList supportedKeys( const QString& group ) const;
- QStringList availableKeys( const QString& group ) const;
- QStringList preferredKeys( const QString& group ) const;
+ TQStringList supportedKeys( const TQString& group ) const;
+ TQStringList availableKeys( const TQString& group ) const;
+ TQStringList preferredKeys( const TQString& group ) const;
- QStringList supportedKeys() const { return m_info->supportedKeys(); }
- QStringList preferredKeys() const { return m_info->preferredKeys(); }
+ TQStringList supportedKeys() const { return m_info->supportedKeys(); }
+ TQStringList preferredKeys() const { return m_info->preferredKeys(); }
- QString getValue( const QString& group, const QString& key ) const;
- bool setValue( const QString& group,
- const QString& key, const QString &value );
+ TQString getValue( const TQString& group, const TQString& key ) const;
+ bool setValue( const TQString& group,
+ const TQString& key, const TQString &value );
- QStringList allValues( const QString& group ) const;
- QStringList preferredValues( const QString& group ) const;
+ TQStringList allValues( const TQString& group ) const;
+ TQStringList preferredValues( const TQString& group ) const;
- bool isReadOnly( const QString& group, const QString& key );
+ bool isReadOnly( const TQString& group, const TQString& key );
private:
- static QString createKeyValue( const KFileMetaInfoGroup& g,
- const QString& key );
- static QStringList createKeyValueList( const KFileMetaInfoGroup&,
- const QStringList& );
+ static TQString createKeyValue( const KFileMetaInfoGroup& g,
+ const TQString& key );
+ static TQStringList createKeyValueList( const KFileMetaInfoGroup&,
+ const TQStringList& );
bool sync();
KFileMetaInfo *m_info;
bool m_dirty;
bool m_userSuppliedGroups;
- QStringList m_groupsToUse;
+ TQStringList m_groupsToUse;
};
diff --git a/kio/misc/kntlm/des.h b/kio/misc/kntlm/des.h
index 4125791b3..1cb2f27e5 100644
--- a/kio/misc/kntlm/des.h
+++ b/kio/misc/kntlm/des.h
@@ -1,7 +1,7 @@
#ifndef KNTLM_DES_H
#define KNTLM_DES_H
-#include <qglobal.h>
+#include <tqglobal.h>
typedef struct des_key
{
diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp
index 20c9f2a0c..a3eca3bdd 100644
--- a/kio/misc/kntlm/kntlm.cpp
+++ b/kio/misc/kntlm/kntlm.cpp
@@ -23,7 +23,7 @@
#include <string.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kswap.h>
#include <kmdcodec.h>
@@ -32,7 +32,7 @@
#include "des.h"
#include "kntlm.h"
-QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode )
+TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode )
{
//watch for buffer overflows
Q_UINT32 offset;
@@ -40,22 +40,22 @@ QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unic
offset = KFromToLittleEndian((Q_UINT32)secbuf.offset);
len = KFromToLittleEndian(secbuf.len);
if ( offset > buf.size() ||
- offset + len > buf.size() ) return QString::null;
+ offset + len > buf.size() ) return TQString::null;
- QString str;
+ TQString str;
const char *c = buf.data() + offset;
if ( unicode ) {
- str = UnicodeLE2QString( (QChar*) c, len >> 1 );
+ str = UnicodeLE2TQString( (TQChar*) c, len >> 1 );
} else {
- str = QString::fromLatin1( c, len );
+ str = TQString::fromLatin1( c, len );
}
return str;
}
-QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf )
+TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf )
{
- QByteArray ret;
+ TQByteArray ret;
Q_UINT32 offset;
Q_UINT16 len;
offset = KFromToLittleEndian((Q_UINT32)secbuf.offset);
@@ -67,9 +67,9 @@ QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf )
return ret;
}
-void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode )
+void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode )
{
- QByteArray tmp;
+ TQByteArray tmp;
if ( unicode ) {
tmp = QString2UnicodeLE( str );
@@ -83,7 +83,7 @@ void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool
}
}
-void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data )
+void KNTLM::addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data )
{
Q_UINT32 offset;
Q_UINT16 len, maxlen;
@@ -98,9 +98,9 @@ void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data )
memcpy( buf.data() + offset, data.data(), data.size() );
}
-bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QString &workstation, Q_UINT32 flags )
+bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, Q_UINT32 flags )
{
- QByteArray rbuf( sizeof(Negotiate) );
+ TQByteArray rbuf( sizeof(Negotiate) );
rbuf.fill( 0 );
memcpy( rbuf.data(), "NTLMSSP", 8 );
@@ -118,16 +118,16 @@ bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QS
return true;
}
-bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user,
- const QString &password, const QString &domain, const QString &workstation,
+bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user,
+ const TQString &password, const TQString &domain, const TQString &workstation,
bool forceNTLM, bool forceNTLMv2 )
{
- QByteArray rbuf( sizeof(Auth) );
+ TQByteArray rbuf( sizeof(Auth) );
Challenge *ch = (Challenge *) challenge.data();
- QByteArray response;
+ TQByteArray response;
uint chsize = challenge.size();
bool unicode = false;
- QString dom;
+ TQString dom;
//challenge structure too small
if ( chsize < 32 ) return false;
@@ -142,7 +142,7 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin
memcpy( rbuf.data(), "NTLMSSP", 8 );
((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (Q_UINT32)3 );
((Auth*) rbuf.data())->flags = ch->flags;
- QByteArray targetInfo = getBuf( challenge, ch->targetInfo );
+ TQByteArray targetInfo = getBuf( challenge, ch->targetInfo );
// if ( forceNTLMv2 || (!targetInfo.isEmpty() && (KFromToLittleEndian(ch->flags) & Negotiate_Target_Info)) /* may support NTLMv2 */ ) {
// if ( KFromToLittleEndian(ch->flags) & Negotiate_NTLM ) {
@@ -174,9 +174,9 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin
return true;
}
-QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getLMResponse( const TQString &password, const unsigned char *challenge )
{
- QByteArray hash, answer;
+ TQByteArray hash, answer;
hash = lmHash( password );
hash.resize( 21 );
@@ -186,10 +186,10 @@ QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *c
return answer;
}
-QByteArray KNTLM::lmHash( const QString &password )
+TQByteArray KNTLM::lmHash( const TQString &password )
{
- QByteArray keyBytes( 14 );
- QByteArray hash( 16 );
+ TQByteArray keyBytes( 14 );
+ TQByteArray hash( 16 );
DES_KEY ks;
const char *magic = "KGS!@#$%";
@@ -208,10 +208,10 @@ QByteArray KNTLM::lmHash( const QString &password )
return hash;
}
-QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *challenge )
+TQByteArray KNTLM::lmResponse( const TQByteArray &hash, const unsigned char *challenge )
{
DES_KEY ks;
- QByteArray answer( 24 );
+ TQByteArray answer( 24 );
convertKey( (unsigned char*) hash.data(), &ks );
ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() );
@@ -226,9 +226,9 @@ QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *chall
return answer;
}
-QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned char *challenge )
{
- QByteArray hash, answer;
+ TQByteArray hash, answer;
hash = ntlmHash( password );
hash.resize( 21 );
@@ -238,10 +238,10 @@ QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char
return answer;
}
-QByteArray KNTLM::ntlmHash( const QString &password )
+TQByteArray KNTLM::ntlmHash( const TQString &password )
{
KMD4::Digest digest;
- QByteArray ret, unicode;
+ TQByteArray ret, unicode;
unicode = QString2UnicodeLE( password );
KMD4 md4( unicode );
@@ -250,56 +250,56 @@ QByteArray KNTLM::ntlmHash( const QString &password )
return ret;
}
-QByteArray KNTLM::getNTLMv2Response( const QString &target, const QString &user,
- const QString &password, const QByteArray &targetInformation,
+TQByteArray KNTLM::getNTLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const TQByteArray &targetInformation,
const unsigned char *challenge )
{
- QByteArray hash = ntlmv2Hash( target, user, password );
- QByteArray blob = createBlob( targetInformation );
+ TQByteArray hash = ntlmv2Hash( target, user, password );
+ TQByteArray blob = createBlob( targetInformation );
return lmv2Response( hash, blob, challenge );
}
-QByteArray KNTLM::getLMv2Response( const QString &target, const QString &user,
- const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const unsigned char *challenge )
{
- QByteArray hash = ntlmv2Hash( target, user, password );
- QByteArray clientChallenge( 8 );
+ TQByteArray hash = ntlmv2Hash( target, user, password );
+ TQByteArray clientChallenge( 8 );
for ( uint i = 0; i<8; i++ ) {
clientChallenge.data()[i] = KApplication::random() % 0xff;
}
return lmv2Response( hash, clientChallenge, challenge );
}
-QByteArray KNTLM::ntlmv2Hash( const QString &target, const QString &user, const QString &password )
+TQByteArray KNTLM::ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password )
{
- QByteArray hash1 = ntlmHash( password );
- QByteArray key, ret;
- QString id = user.upper() + target.upper();
+ TQByteArray hash1 = ntlmHash( password );
+ TQByteArray key, ret;
+ TQString id = user.upper() + target.upper();
key = QString2UnicodeLE( id );
ret = hmacMD5( key, hash1 );
return ret;
}
-QByteArray KNTLM::lmv2Response( const QByteArray &hash,
- const QByteArray &clientData, const unsigned char *challenge )
+TQByteArray KNTLM::lmv2Response( const TQByteArray &hash,
+ const TQByteArray &clientData, const unsigned char *challenge )
{
- QByteArray data( 8 + clientData.size() );
+ TQByteArray data( 8 + clientData.size() );
memcpy( data.data(), challenge, 8 );
memcpy( data.data() + 8, clientData.data(), clientData.size() );
- QByteArray mac = hmacMD5( data, hash );
+ TQByteArray mac = hmacMD5( data, hash );
mac.resize( 16 + clientData.size() );
memcpy( mac.data() + 16, clientData.data(), clientData.size() );
return mac;
}
-QByteArray KNTLM::createBlob( const QByteArray &targetinfo )
+TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo )
{
- QByteArray blob( sizeof(Blob) + 4 + targetinfo.size() );
+ TQByteArray blob( sizeof(Blob) + 4 + targetinfo.size() );
blob.fill( 0 );
Blob *bl = (Blob *) blob.data();
bl->signature = KFromToBigEndian( (Q_UINT32) 0x01010000 );
- Q_UINT64 now = QDateTime::currentDateTime().toTime_t();
+ Q_UINT64 now = TQDateTime::currentDateTime().toTime_t();
now += (Q_UINT64)3600*(Q_UINT64)24*(Q_UINT64)134774;
now *= (Q_UINT64)10000000;
bl->timestamp = KFromToLittleEndian( now );
@@ -310,11 +310,11 @@ QByteArray KNTLM::createBlob( const QByteArray &targetinfo )
return blob;
}
-QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key )
+TQByteArray KNTLM::hmacMD5( const TQByteArray &data, const TQByteArray &key )
{
Q_UINT8 ipad[64], opad[64];
KMD5::Digest digest;
- QByteArray ret;
+ TQByteArray ret;
memset( ipad, 0x36, sizeof(ipad) );
memset( opad, 0x5c, sizeof(opad) );
@@ -323,7 +323,7 @@ QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key )
opad[i] ^= key[i];
}
- QByteArray content( data.size()+64 );
+ TQByteArray content( data.size()+64 );
memcpy( content.data(), ipad, 64 );
memcpy( content.data() + 64, data.data(), data.size() );
KMD5 md5( content );
@@ -370,18 +370,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks )
memset (&key, 0, sizeof (key));
}
-QByteArray KNTLM::QString2UnicodeLE( const QString &target )
+TQByteArray KNTLM::QString2UnicodeLE( const TQString &target )
{
- QByteArray unicode( target.length() * 2 );
+ TQByteArray unicode( target.length() * 2 );
for ( uint i = 0; i < target.length(); i++ ) {
((Q_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() );
}
return unicode;
}
-QString KNTLM::UnicodeLE2QString( const QChar* data, uint len )
+TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len )
{
- QString ret;
+ TQString ret;
for ( uint i = 0; i < len; i++ ) {
ret += KFromToLittleEndian( data[ i ].unicode() );
}
diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h
index 6dbb62139..9be4ea357 100644
--- a/kio/misc/kntlm/kntlm.h
+++ b/kio/misc/kntlm/kntlm.h
@@ -20,9 +20,9 @@
#ifndef KNTLM_H
#define KNTLM_H
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -137,8 +137,8 @@ public:
*
* @return true if creating the structure succeeds, false otherwise.
*/
- static bool getNegotiate( QByteArray &negotiate, const QString &domain = QString::null,
- const QString &workstation = QString::null,
+ static bool getNegotiate( TQByteArray &negotiate, const TQString &domain = TQString::null,
+ const TQString &workstation = TQString::null,
Q_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM );
/**
* Creates the type 3 message which should be sent to the server after
@@ -159,74 +159,74 @@ public:
* (challenge data invalid, or NTLM authentication forced, but the challenge data says
* no NTLM supported).
*/
- static bool getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user,
- const QString &password, const QString &domain = QString::null,
- const QString &workstation = QString::null, bool forceNTLM = false, bool forceNTLMv2 = false );
+ static bool getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user,
+ const TQString &password, const TQString &domain = TQString::null,
+ const TQString &workstation = TQString::null, bool forceNTLM = false, bool forceNTLMv2 = false );
/**
* Returns the LanManager response from the password and the server challenge.
*/
- static QByteArray getLMResponse( const QString &password, const unsigned char *challenge );
+ static TQByteArray getLMResponse( const TQString &password, const unsigned char *challenge );
/**
* Calculates the LanManager hash of the specified password.
*/
- static QByteArray lmHash( const QString &password );
+ static TQByteArray lmHash( const TQString &password );
/**
* Calculates the LanManager response from the LanManager hash and the server challenge.
*/
- static QByteArray lmResponse( const QByteArray &hash, const unsigned char *challenge );
+ static TQByteArray lmResponse( const TQByteArray &hash, const unsigned char *challenge );
/**
* Returns the NTLM response from the password and the server challenge.
*/
- static QByteArray getNTLMResponse( const QString &password, const unsigned char *challenge );
+ static TQByteArray getNTLMResponse( const TQString &password, const unsigned char *challenge );
/**
* Returns the NTLM hash (MD4) from the password.
*/
- static QByteArray ntlmHash( const QString &password );
+ static TQByteArray ntlmHash( const TQString &password );
/**
* Calculates the NTLMv2 response.
*/
- static QByteArray getNTLMv2Response( const QString &target, const QString &user,
- const QString &password, const QByteArray &targetInformation,
+ static TQByteArray getNTLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const TQByteArray &targetInformation,
const unsigned char *challenge );
/**
* Calculates the LMv2 response.
*/
- static QByteArray getLMv2Response( const QString &target, const QString &user,
- const QString &password, const unsigned char *challenge );
+ static TQByteArray getLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const unsigned char *challenge );
/**
* Returns the NTLMv2 hash.
*/
- static QByteArray ntlmv2Hash( const QString &target, const QString &user, const QString &password );
+ static TQByteArray ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password );
/**
* Calculates the LMv2 response.
*/
- static QByteArray lmv2Response( const QByteArray &hash,
- const QByteArray &clientData, const unsigned char *challenge );
+ static TQByteArray lmv2Response( const TQByteArray &hash,
+ const TQByteArray &clientData, const unsigned char *challenge );
/**
* Extracts a string field from an NTLM structure.
*/
- static QString getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode );
+ static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode );
/**
* Extracts a byte array from an NTLM structure.
*/
- static QByteArray getBuf( const QByteArray &buf, const SecBuf &secbuf );
+ static TQByteArray getBuf( const TQByteArray &buf, const SecBuf &secbuf );
- static QByteArray createBlob( const QByteArray &targetinfo );
+ static TQByteArray createBlob( const TQByteArray &targetinfo );
- static QByteArray hmacMD5( const QByteArray &data, const QByteArray &key );
+ static TQByteArray hmacMD5( const TQByteArray &data, const TQByteArray &key );
private:
- static QByteArray QString2UnicodeLE( const QString &target );
- static QString UnicodeLE2QString( const QChar* data, uint len );
+ static TQByteArray QString2UnicodeLE( const TQString &target );
+ static TQString UnicodeLE2TQString( const TQChar* data, uint len );
- static void addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data );
- static void addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode = false );
+ static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data );
+ static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false );
static void convertKey( unsigned char *key_56, void* ks );
};
diff --git a/kio/misc/kntlm/kswap.h b/kio/misc/kntlm/kswap.h
index e9db968ed..336321fd4 100644
--- a/kio/misc/kntlm/kswap.h
+++ b/kio/misc/kntlm/kswap.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qglobal.h>
+#include <tqglobal.h>
/**
* \defgroup KSWAP Byte-swapping functions
diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp
index 06709241b..7a84958f7 100644
--- a/kio/misc/kpac/discovery.cpp
+++ b/kio/misc/kpac/discovery.cpp
@@ -39,7 +39,7 @@
#include <resolv.h>
#include <sys/utsname.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kprocio.h>
@@ -49,16 +49,16 @@
namespace KPAC
{
- Discovery::Discovery( QObject* parent )
+ Discovery::Discovery( TQObject* parent )
: Downloader( parent ),
m_helper( new KProcIO )
{
- connect( m_helper, SIGNAL( readReady( KProcIO* ) ), SLOT( helperOutput() ) );
- connect( m_helper, SIGNAL( processExited( KProcess* ) ), SLOT( failed() ) );
+ connect( m_helper, TQT_SIGNAL( readReady( KProcIO* ) ), TQT_SLOT( helperOutput() ) );
+ connect( m_helper, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( failed() ) );
*m_helper << "kpac_dhcp_helper";
if ( !m_helper->start() )
- QTimer::singleShot( 0, this, SLOT( failed() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( failed() ) );
}
bool Discovery::initHostName()
@@ -69,7 +69,7 @@ namespace KPAC
{
struct hostent *hent = gethostbyname (uts.nodename);
if (hent != 0)
- m_hostname = QString::fromLocal8Bit( hent->h_name );
+ m_hostname = TQString::fromLocal8Bit( hent->h_name );
}
// If no hostname, try gethostname as a last resort.
@@ -79,7 +79,7 @@ namespace KPAC
if (gethostname (buf, sizeof(buf)) == 0)
{
buf[255] = '\0';
- m_hostname = QString::fromLocal8Bit( buf );
+ m_hostname = TQString::fromLocal8Bit( buf );
}
}
return !m_hostname.isEmpty();
@@ -138,7 +138,7 @@ namespace KPAC
void Discovery::helperOutput()
{
m_helper->disconnect( this );
- QString line;
+ TQString line;
m_helper->readln( line );
download( KURL( line.stripWhiteSpace() ) );
}
diff --git a/kio/misc/kpac/discovery.h b/kio/misc/kpac/discovery.h
index b9c657924..a1443ad8c 100644
--- a/kio/misc/kpac/discovery.h
+++ b/kio/misc/kpac/discovery.h
@@ -21,7 +21,7 @@
#ifndef KPAC_DISCOVERY_H
#define KPAC_DISCOVERY_H
-#include <qobject.h>
+#include <tqobject.h>
#include "downloader.h"
@@ -33,7 +33,7 @@ namespace KPAC
{
Q_OBJECT
public:
- Discovery( QObject* );
+ Discovery( TQObject* );
protected slots:
virtual void failed();
@@ -46,7 +46,7 @@ namespace KPAC
bool checkDomain() const;
KProcIO* m_helper;
- QString m_hostname;
+ TQString m_hostname;
};
}
diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp
index 6d4e62409..6f419f5f5 100644
--- a/kio/misc/kpac/downloader.cpp
+++ b/kio/misc/kpac/downloader.cpp
@@ -21,7 +21,7 @@
#include <cstdlib>
#include <cstring>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kglobal.h>
@@ -32,21 +32,21 @@
namespace KPAC
{
- Downloader::Downloader( QObject* parent )
- : QObject( parent )
+ Downloader::Downloader( TQObject* parent )
+ : TQObject( parent )
{
}
void Downloader::download( const KURL& url )
{
m_data.resize( 0 );
- m_script = QString::null;
+ m_script = TQString::null;
m_scriptURL = url;
KIO::TransferJob* job = KIO::get( url, false, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( result( KIO::Job* ) ) );
}
void Downloader::failed()
@@ -54,12 +54,12 @@ namespace KPAC
emit result( false );
}
- void Downloader::setError( const QString& error )
+ void Downloader::setError( const TQString& error )
{
m_error = error;
}
- void Downloader::data( KIO::Job*, const QByteArray& data )
+ void Downloader::data( KIO::Job*, const TQByteArray& data )
{
unsigned offset = m_data.size();
m_data.resize( offset + data.size() );
diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h
index 7869d7102..05d8569cc 100644
--- a/kio/misc/kpac/downloader.h
+++ b/kio/misc/kpac/downloader.h
@@ -21,7 +21,7 @@
#ifndef KPAC_DOWNLOADER_H
#define KPAC_DOWNLOADER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -33,29 +33,29 @@ namespace KPAC
{
Q_OBJECT
public:
- Downloader( QObject* );
+ Downloader( TQObject* );
void download( const KURL& );
const KURL& scriptURL() { return m_scriptURL; }
- const QString& script() { return m_script; }
- const QString& error() { return m_error; }
+ const TQString& script() { return m_script; }
+ const TQString& error() { return m_error; }
signals:
void result( bool );
protected:
virtual void failed();
- void setError( const QString& );
+ void setError( const TQString& );
private slots:
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
private:
- QByteArray m_data;
+ TQByteArray m_data;
KURL m_scriptURL;
- QString m_script;
- QString m_error;
+ TQString m_script;
+ TQString m_error;
};
}
diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp
index 06d860615..6cba79db6 100644
--- a/kio/misc/kpac/proxyscout.cpp
+++ b/kio/misc/kpac/proxyscout.cpp
@@ -39,7 +39,7 @@ namespace KPAC
{
}
- ProxyScout::ProxyScout( const QCString& name )
+ ProxyScout::ProxyScout( const TQCString& name )
: KDEDModule( name ),
m_instance( new KInstance( "proxyscout" ) ),
m_downloader( 0 ),
@@ -54,7 +54,7 @@ namespace KPAC
delete m_instance;
}
- QString ProxyScout::proxyForURL( const KURL& url )
+ TQString ProxyScout::proxyForURL( const KURL& url )
{
if ( m_suspendTime )
{
@@ -70,12 +70,12 @@ namespace KPAC
if ( m_downloader || startDownload() )
{
m_requestQueue.append( url );
- return QString::null;
+ return TQString::null;
}
else return "DIRECT";
}
- ASYNC ProxyScout::blackListProxy( const QString& proxy )
+ ASYNC ProxyScout::blackListProxy( const TQString& proxy )
{
m_blackList[ proxy ] = std::time( 0 );
}
@@ -105,8 +105,8 @@ namespace KPAC
default:
return false;
}
- connect( m_downloader, SIGNAL( result( bool ) ),
- SLOT( downloadResult( bool ) ) );
+ connect( m_downloader, TQT_SIGNAL( result( bool ) ),
+ TQT_SLOT( downloadResult( bool ) ) );
return true;
}
@@ -130,11 +130,11 @@ namespace KPAC
for ( RequestQueue::ConstIterator it = m_requestQueue.begin();
it != m_requestQueue.end(); ++it )
{
- QCString type = "QString";
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQCString type = "TQString";
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
if ( success ) ds << handleRequest( ( *it ).url );
- else ds << QString( "DIRECT" );
+ else ds << TQString( "DIRECT" );
kapp->dcopClient()->endTransaction( ( *it ).transaction, type, data );
}
m_requestQueue.clear();
@@ -144,16 +144,16 @@ namespace KPAC
if ( !success ) m_suspendTime = std::time( 0 );
}
- QString ProxyScout::handleRequest( const KURL& url )
+ TQString ProxyScout::handleRequest( const KURL& url )
{
try
{
- QString result = m_script->evaluate( url );
- QStringList proxies = QStringList::split( ';', result );
- for ( QStringList::ConstIterator it = proxies.begin();
+ TQString result = m_script->evaluate( url );
+ TQStringList proxies = TQStringList::split( ';', result );
+ for ( TQStringList::ConstIterator it = proxies.begin();
it != proxies.end(); ++it )
{
- QString proxy = ( *it ).stripWhiteSpace();
+ TQString proxy = ( *it ).stripWhiteSpace();
if ( proxy.left( 5 ) == "PROXY" )
{
KURL proxyURL( proxy = proxy.mid( 5 ).stripWhiteSpace() );
@@ -187,7 +187,7 @@ namespace KPAC
return "DIRECT";
}
- extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const QCString& name )
+ extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const TQCString& name )
{
return new ProxyScout( name );
}
diff --git a/kio/misc/kpac/proxyscout.h b/kio/misc/kpac/proxyscout.h
index afd7968ab..c18e5173d 100644
--- a/kio/misc/kpac/proxyscout.h
+++ b/kio/misc/kpac/proxyscout.h
@@ -21,7 +21,7 @@
#ifndef KPAC_PROXYSCOUT_H
#define KPAC_PROXYSCOUT_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdedmodule.h>
#include <kurl.h>
@@ -41,12 +41,12 @@ namespace KPAC
Q_OBJECT
K_DCOP
public:
- ProxyScout( const QCString& );
+ ProxyScout( const TQCString& );
virtual ~ProxyScout();
k_dcop:
- QString proxyForURL( const KURL& url );
- ASYNC blackListProxy( const QString& proxy );
+ TQString proxyForURL( const KURL& url );
+ ASYNC blackListProxy( const TQString& proxy );
ASYNC reset();
private slots:
@@ -54,7 +54,7 @@ namespace KPAC
private:
bool startDownload();
- QString handleRequest( const KURL& url );
+ TQString handleRequest( const KURL& url );
KInstance* m_instance;
Downloader* m_downloader;
@@ -68,10 +68,10 @@ namespace KPAC
DCOPClientTransaction* transaction;
KURL url;
};
- typedef QValueList< QueuedRequest > RequestQueue;
+ typedef TQValueList< QueuedRequest > RequestQueue;
RequestQueue m_requestQueue;
- typedef QMap< QString, time_t > BlackList;
+ typedef TQMap< TQString, time_t > BlackList;
BlackList m_blackList;
time_t m_suspendTime;
};
diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp
index 39d6d3f8e..55faef8a1 100644
--- a/kio/misc/kpac/script.cpp
+++ b/kio/misc/kpac/script.cpp
@@ -30,8 +30,8 @@
#include <arpa/inet.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kjs/object.h>
@@ -41,12 +41,12 @@
using namespace KJS;
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString( reinterpret_cast< const QChar* >( data() ), size() );
+ return TQString( reinterpret_cast< const TQChar* >( data() ), size() );
}
-UString::UString( const QString &s )
+UString::UString( const TQString &s )
{
UChar* data = new UChar[ s.length() ];
std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) );
@@ -72,7 +72,7 @@ namespace
operator String() const { return String( m_address.ipAddress().toString() ); }
private:
- Address( const QString& host, bool numeric )
+ Address( const TQString& host, bool numeric )
{
int flags = 0;
@@ -80,7 +80,7 @@ namespace
flags = KNetwork::KResolver::NoResolve;
KNetwork::KResolverResults addresses =
- KNetwork::KResolver::resolve( host, QString::null, flags,
+ KNetwork::KResolver::resolve( host, TQString::null, flags,
KNetwork::KResolver::IPv4Family );
if ( addresses.isEmpty() )
@@ -140,8 +140,8 @@ namespace
virtual Value call( ExecState* exec, Object&, const List& args )
{
if ( args.size() != 2 ) return Undefined();
- QString host = args[ 0 ].toString( exec ).qstring().lower();
- QString domain = args[ 1 ].toString( exec ).qstring().lower();
+ TQString host = args[ 0 ].toString( exec ).qstring().lower();
+ TQString domain = args[ 1 ].toString( exec ).qstring().lower();
return Boolean( host.endsWith( domain ) );
}
};
@@ -243,7 +243,7 @@ namespace
virtual Value call( ExecState* exec, Object&, const List& args )
{
if ( args.size() != 2 ) return Undefined();
- QRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true );
+ TQRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true );
return Boolean( pattern.exactMatch(args[ 0 ].toString( exec ).qstring()) );
}
};
@@ -427,7 +427,7 @@ namespace
namespace KPAC
{
- Script::Script( const QString& code )
+ Script::Script( const TQString& code )
{
ExecState* exec = m_interpreter.globalExec();
Object global = m_interpreter.globalObject();
@@ -438,7 +438,7 @@ namespace KPAC
throw Error( result.value().toString( exec ).qstring() );
}
- QString Script::evaluate( const KURL& url )
+ TQString Script::evaluate( const KURL& url )
{
ExecState *exec = m_interpreter.globalExec();
Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" );
diff --git a/kio/misc/kpac/script.h b/kio/misc/kpac/script.h
index 2f5314e9a..49ba0b6a3 100644
--- a/kio/misc/kpac/script.h
+++ b/kio/misc/kpac/script.h
@@ -21,7 +21,7 @@
#ifndef KPAC_SCRIPT_H
#define KPAC_SCRIPT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kjs/interpreter.h>
@@ -35,16 +35,16 @@ namespace KPAC
class Error
{
public:
- Error( const QString& message )
+ Error( const TQString& message )
: m_message( message ) {}
- const QString& message() const { return m_message; }
+ const TQString& message() const { return m_message; }
private:
- QString m_message;
+ TQString m_message;
};
- Script( const QString& code );
- QString evaluate( const KURL& );
+ Script( const TQString& code );
+ TQString evaluate( const KURL& );
private:
KJS::Interpreter m_interpreter;
diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp
index 0d12f9e93..d84e4c297 100644
--- a/kio/misc/ksendbugmail/main.cpp
+++ b/kio/misc/ksendbugmail/main.cpp
@@ -6,7 +6,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kemailsettings.h>
@@ -26,7 +26,7 @@ static KCmdLineOptions options[] = {
void BugMailer::slotError(int errornum) {
kdDebug() << "slotError\n";
- QString str, lstr;
+ TQString str, lstr;
switch(errornum) {
case SMTP::CONNECTERROR:
@@ -70,7 +70,7 @@ int main(int argc, char **argv) {
KApplication a(false, false);
- QCString recipient = args->getOption("recipient");
+ TQCString recipient = args->getOption("recipient");
if (recipient.isEmpty())
recipient = "submit@bugs.kde.org";
else {
@@ -80,15 +80,15 @@ int main(int argc, char **argv) {
}
kdDebug() << "recp \"" << recipient << "\"\n";
- QCString subject = args->getOption("subject");
+ TQCString subject = args->getOption("subject");
if (subject.isEmpty())
subject = "(no subject)";
else {
if (subject.at(0) == '\'')
subject = subject.mid(1).left(subject.length() - 2);
}
- QTextIStream input(stdin);
- QString text, line;
+ TQTextIStream input(stdin);
+ TQString text, line;
while (!input.eof()) {
line = input.readLine();
text += line + "\r\n";
@@ -97,15 +97,15 @@ int main(int argc, char **argv) {
KEMailSettings emailConfig;
emailConfig.setProfile(emailConfig.defaultProfileName());
- QString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress);
+ TQString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress);
if (!fromaddr.isEmpty()) {
- QString name = emailConfig.getSetting(KEMailSettings::RealName);
+ TQString name = emailConfig.getSetting(KEMailSettings::RealName);
if (!name.isEmpty())
- fromaddr = name + QString::fromLatin1(" <") + fromaddr + QString::fromLatin1(">");
+ fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
} else {
struct passwd *p;
p = getpwuid(getuid());
- fromaddr = QString::fromLatin1(p->pw_name);
+ fromaddr = TQString::fromLatin1(p->pw_name);
fromaddr += "@";
char buffer[256];
buffer[0] = '\0';
@@ -115,21 +115,21 @@ int main(int argc, char **argv) {
}
kdDebug() << "fromaddr \"" << fromaddr << "\"" << endl;
- QString server = emailConfig.getSetting(KEMailSettings::OutServer);
+ TQString server = emailConfig.getSetting(KEMailSettings::OutServer);
if (server.isEmpty())
- server=QString::fromLatin1("bugs.kde.org");
+ server=TQString::fromLatin1("bugs.kde.org");
SMTP *sm = new SMTP;
BugMailer bm(sm);
- QObject::connect(sm, SIGNAL(messageSent()), &bm, SLOT(slotSend()));
- QObject::connect(sm, SIGNAL(error(int)), &bm, SLOT(slotError(int)));
+ TQObject::connect(sm, TQT_SIGNAL(messageSent()), &bm, TQT_SLOT(slotSend()));
+ TQObject::connect(sm, TQT_SIGNAL(error(int)), &bm, TQT_SLOT(slotError(int)));
sm->setServerHost(server);
sm->setPort(25);
sm->setSenderAddress(fromaddr);
sm->setRecipientAddress(recipient);
sm->setMessageSubject(subject);
- sm->setMessageHeader(QString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
+ sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
sm->setMessageBody(text);
sm->sendMessage();
diff --git a/kio/misc/ksendbugmail/main.h b/kio/misc/ksendbugmail/main.h
index cd7de398d..39d424bef 100644
--- a/kio/misc/ksendbugmail/main.h
+++ b/kio/misc/ksendbugmail/main.h
@@ -1,14 +1,14 @@
#ifndef BUG_MAILER_H
#define BUG_MAILER_H "$Id$"
-#include <qobject.h>
+#include <tqobject.h>
class SMTP;
-class BugMailer : public QObject {
+class BugMailer : public TQObject {
Q_OBJECT
public:
- BugMailer(SMTP* s) : QObject(0, "mailer"), sm(s) {}
+ BugMailer(SMTP* s) : TQObject(0, "mailer"), sm(s) {}
public slots:
void slotError(int);
diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp
index fd8211281..36a417b88 100644
--- a/kio/misc/ksendbugmail/smtp.cpp
+++ b/kio/misc/ksendbugmail/smtp.cpp
@@ -38,12 +38,12 @@ SMTP::SMTP(char *serverhost, unsigned short int port, int timeout)
kdDebug() << "SMTP object created" << endl;
- connect(&connectTimer, SIGNAL(timeout()), this, SLOT(connectTimerTick()));
- connect(&timeOutTimer, SIGNAL(timeout()), this, SLOT(connectTimedOut()));
- connect(&interactTimer, SIGNAL(timeout()), this, SLOT(interactTimedOut()));
+ connect(&connectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimerTick()));
+ connect(&timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimedOut()));
+ connect(&interactTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(interactTimedOut()));
// some sendmail will give 'duplicate helo' error, quick fix for now
- connect(this, SIGNAL(messageSent()), SLOT(closeConnection()));
+ connect(this, TQT_SIGNAL(messageSent()), TQT_SLOT(closeConnection()));
}
SMTP::~SMTP()
@@ -56,7 +56,7 @@ SMTP::~SMTP()
timeOutTimer.stop();
}
-void SMTP::setServerHost(const QString& serverhost)
+void SMTP::setServerHost(const TQString& serverhost)
{
serverHost = serverhost;
}
@@ -71,7 +71,7 @@ void SMTP::setTimeOut(int timeout)
timeOut = timeout;
}
-void SMTP::setSenderAddress(const QString& sender)
+void SMTP::setSenderAddress(const TQString& sender)
{
senderAddress = sender;
int index = senderAddress.find('<');
@@ -95,22 +95,22 @@ void SMTP::setSenderAddress(const QString& sender)
}
-void SMTP::setRecipientAddress(const QString& recipient)
+void SMTP::setRecipientAddress(const TQString& recipient)
{
recipientAddress = recipient;
}
-void SMTP::setMessageSubject(const QString& subject)
+void SMTP::setMessageSubject(const TQString& subject)
{
messageSubject = subject;
}
-void SMTP::setMessageBody(const QString& message)
+void SMTP::setMessageBody(const TQString& message)
{
messageBody = message;
}
-void SMTP::setMessageHeader(const QString &header)
+void SMTP::setMessageHeader(const TQString &header)
{
messageHeader = header;
}
@@ -134,7 +134,7 @@ void SMTP::sendMessage(void)
kdDebug() << "state was == FINISHED\n" << endl;
finished = false;
state = IN;
- writeString = QString::fromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
write(sock->socket(), writeString.ascii(), writeString.length());
}
if(connected){
@@ -173,8 +173,8 @@ void SMTP::connectTimerTick(void)
state = INIT;
serverState = NONE;
- connect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *)));
- connect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *)));
+ connect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *)));
+ connect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *)));
// sock->enableRead(true);
timeOutTimer.stop();
kdDebug() << "connected" << endl;
@@ -231,8 +231,8 @@ void SMTP::socketRead(KSocket *socket)
void SMTP::socketClose(KSocket *socket)
{
timeOutTimer.stop();
- disconnect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *)));
- disconnect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *)));
+ disconnect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *)));
+ disconnect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *)));
socket->enableRead(false);
kdDebug() << "connection terminated" << endl;
connected = false;
@@ -244,10 +244,10 @@ void SMTP::socketClose(KSocket *socket)
emit connectionClosed();
}
-void SMTP::processLine(QString *line)
+void SMTP::processLine(TQString *line)
{
int i, stat;
- QString tmpstr;
+ TQString tmpstr;
i = line->find(' ');
tmpstr = line->left(i);
@@ -262,7 +262,7 @@ void SMTP::processLine(QString *line)
switch(stat){
case GREET: //220
state = IN;
- writeString = QString::fromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -273,19 +273,19 @@ void SMTP::processLine(QString *line)
switch(state){
case IN:
state = READY;
- writeString = QString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
+ writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case READY:
state = SENTFROM;
- writeString = QString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
+ writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case SENTFROM:
state = SENTTO;
- writeString = QString::fromLatin1("data\r\n");
+ writeString = TQString::fromLatin1("data\r\n");
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -305,11 +305,11 @@ void SMTP::processLine(QString *line)
break;
case READYDATA: //354
state = DATA;
- writeString = QString::fromLatin1("Subject: %1\r\n").arg(messageSubject);
+ writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject);
writeString += messageHeader;
writeString += "\r\n";
writeString += messageBody;
- writeString += QString::fromLatin1(".\r\n");
+ writeString += TQString::fromLatin1(".\r\n");
kdDebug() << "out: " << writeString;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h
index 71a464e98..707d20ae4 100644
--- a/kio/misc/ksendbugmail/smtp.h
+++ b/kio/misc/ksendbugmail/smtp.h
@@ -3,8 +3,8 @@
#ifndef SMTP_H
#define SMTP_H
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <ksock.h>
/*int SMTPServerStatus[] = {
@@ -44,19 +44,19 @@ public:
SMTP(char *serverhost = 0, unsigned short int port = 0, int timeout = DEFAULT_SMTP_TIMEOUT);
~SMTP();
- void setServerHost(const QString& serverhost);
+ void setServerHost(const TQString& serverhost);
void setPort(unsigned short int port);
void setTimeOut(int timeout);
bool isConnected(){return connected;};
bool isFinished(){return finished;};
- QString getLastLine(){return lastLine;};
+ TQString getLastLine(){return lastLine;};
- void setSenderAddress(const QString& sender);
- void setRecipientAddress(const QString& recipient);
- void setMessageSubject(const QString& subject);
- void setMessageBody(const QString& message);
- void setMessageHeader(const QString &header);
+ void setSenderAddress(const TQString& sender);
+ void setRecipientAddress(const TQString& recipient);
+ void setMessageSubject(const TQString& subject);
+ void setMessageBody(const TQString& message);
+ void setMessageHeader(const TQString &header);
typedef enum {
NONE = 0, // null
@@ -93,7 +93,7 @@ public:
}SMTPError;
protected:
- void processLine(QString *line);
+ void processLine(TQString *line);
public slots:
void openConnection();
@@ -113,32 +113,32 @@ signals:
void error(int);
private:
- QString serverHost;
+ TQString serverHost;
unsigned short int hostPort;
int timeOut;
bool connected;
bool finished;
- QString senderAddress;
- QString recipientAddress;
- QString messageSubject;
- QString messageBody, messageHeader;
+ TQString senderAddress;
+ TQString recipientAddress;
+ TQString messageSubject;
+ TQString messageBody, messageHeader;
SMTPClientStatus state;
SMTPClientStatus lastState;
SMTPServerStatus serverState;
- QString domainName;
+ TQString domainName;
KSocket *sock;
- QTimer connectTimer;
- QTimer timeOutTimer;
- QTimer interactTimer;
+ TQTimer connectTimer;
+ TQTimer timeOutTimer;
+ TQTimer interactTimer;
char readBuffer[SMTP_READ_BUFFER_SIZE];
- QString lineBuffer;
- QString lastLine;
- QString writeString;
+ TQString lineBuffer;
+ TQString lastLine;
+ TQString writeString;
};
#endif
diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp
index ff96681e2..9e8b85574 100644
--- a/kio/misc/kssld/kssld.cpp
+++ b/kio/misc/kssld/kssld.cpp
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kssld.h"
#include <kconfig.h>
@@ -34,18 +34,18 @@
#include <ksslcertificatehome.h>
#include <ksslpkcs12.h>
#include <ksslx509map.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <pwd.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qsortedlist.h>
+#include <tqfile.h>
+#include <tqsortedlist.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kmdcodec.h>
#include <kopenssl.h>
@@ -53,7 +53,7 @@
// See design notes at end
extern "C" {
- KDE_EXPORT KDEDModule *create_kssld(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_kssld(const TQCString &name) {
return new KSSLD(name);
}
@@ -62,9 +62,9 @@ extern "C" {
static void updatePoliciesConfig(KConfig *cfg) {
- QStringList groups = cfg->groupList();
+ TQStringList groups = cfg->groupList();
- for (QStringList::Iterator i = groups.begin(); i != groups.end(); ++i) {
+ for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) {
if ((*i).isEmpty() || *i == "General") {
continue;
}
@@ -72,13 +72,13 @@ static void updatePoliciesConfig(KConfig *cfg) {
cfg->setGroup(*i);
// remove it if it has expired
- if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < QDateTime::currentDateTime()) {
+ if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) {
cfg->deleteGroup(*i);
continue;
}
- QString encodedCertStr = cfg->readEntry("Certificate");
- QCString encodedCert = encodedCertStr.local8Bit();
+ TQString encodedCertStr = cfg->readEntry("Certificate");
+ TQCString encodedCert = encodedCertStr.local8Bit();
KSSLCertificate *newCert = KSSLCertificate::fromString(encodedCert);
if (!newCert) {
cfg->deleteGroup(*i);
@@ -87,9 +87,9 @@ static void updatePoliciesConfig(KConfig *cfg) {
KSSLCertificateCache::KSSLCertificatePolicy policy = (KSSLCertificateCache::KSSLCertificatePolicy) cfg->readNumEntry("Policy");
bool permanent = cfg->readBoolEntry("Permanent");
- QDateTime expires = cfg->readDateTimeEntry("Expires");
- QStringList hosts = cfg->readListEntry("Hosts");
- QStringList chain = cfg->readListEntry("Chain");
+ TQDateTime expires = cfg->readDateTimeEntry("Expires");
+ TQStringList hosts = cfg->readListEntry("Hosts");
+ TQStringList chain = cfg->readListEntry("Chain");
cfg->deleteGroup(*i);
cfg->setGroup(newCert->getMD5Digest());
@@ -109,7 +109,7 @@ static void updatePoliciesConfig(KConfig *cfg) {
}
-KSSLD::KSSLD(const QCString &name) : KDEDModule(name)
+KSSLD::KSSLD(const TQCString &name) : KDEDModule(name)
{
// ----------------------- FOR THE CACHE ------------------------------------
cfg = new KSimpleConfig("ksslpolicies", false);
@@ -145,8 +145,8 @@ class KSSLCNode {
KSSLCertificate *cert;
KSSLCertificateCache::KSSLCertificatePolicy policy;
bool permanent;
- QDateTime expires;
- QStringList hosts;
+ TQDateTime expires;
+ TQStringList hosts;
KSSLCNode() { cert = 0L;
policy = KSSLCertificateCache::Unknown;
permanent = true;
@@ -164,7 +164,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (node->permanent ||
- node->expires > QDateTime::currentDateTime()) {
+ node->expires > TQDateTime::currentDateTime()) {
// First convert to a binary format and then write the
// kconfig entry write the (CN, policy, cert) to
// KSimpleConfig
@@ -176,8 +176,8 @@ KSSLCNode *node;
cfg->writeEntry("Hosts", node->hosts);
// Also write the chain
- QStringList qsl;
- QPtrList<KSSLCertificate> cl =
+ TQStringList qsl;
+ TQPtrList<KSSLCertificate> cl =
node->cert->chain().getChain();
for (KSSLCertificate *c = cl.first();
c != 0;
@@ -195,10 +195,10 @@ KSSLCNode *node;
cfg->sync();
// insure proper permissions -- contains sensitive data
- QString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies"));
+ TQString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies"));
if (!cfgName.isEmpty()) {
- ::chmod(QFile::encodeName(cfgName), 0600);
+ ::chmod(TQFile::encodeName(cfgName), 0600);
}
}
@@ -225,9 +225,9 @@ KSSLCNode *node;
void KSSLD::cacheLoadDefaultPolicies() {
-QStringList groups = cfg->groupList();
+TQStringList groups = cfg->groupList();
- for (QStringList::Iterator i = groups.begin();
+ for (TQStringList::Iterator i = groups.begin();
i != groups.end();
++i) {
if ((*i).isEmpty() || *i == "General") {
@@ -239,12 +239,12 @@ QStringList groups = cfg->groupList();
// remove it if it has expired
if (!cfg->readBoolEntry("Permanent") &&
cfg->readDateTimeEntry("Expires") <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
cfg->deleteGroup(*i);
continue;
}
- QCString encodedCert;
+ TQCString encodedCert;
KSSLCertificate *newCert;
encodedCert = cfg->readEntry("Certificate").local8Bit();
@@ -278,7 +278,7 @@ KSSLCNode *node;
node->permanent = permanent;
if (!permanent) {
- node->expires = QDateTime::currentDateTime();
+ node->expires = TQDateTime::currentDateTime();
// FIXME: make this configurable
node->expires = node->expires.addSecs(3600);
}
@@ -297,7 +297,7 @@ KSSLCNode *node;
certList.prepend(n);
if (!permanent) {
- n->expires = QDateTime::currentDateTime();
+ n->expires = TQDateTime::currentDateTime();
n->expires = n->expires.addSecs(3600);
}
@@ -306,13 +306,13 @@ KSSLCNode *node;
}
-KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(QString cn) {
+KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(TQString cn) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -338,7 +338,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -356,13 +356,13 @@ return KSSLCertificateCache::Unknown;
}
-bool KSSLD::cacheSeenCN(QString cn) {
+bool KSSLD::cacheSeenCN(TQString cn) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -386,7 +386,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -410,7 +410,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -428,7 +428,7 @@ return false;
}
-bool KSSLD::cacheRemoveBySubject(QString subject) {
+bool KSSLD::cacheRemoveBySubject(TQString subject) {
KSSLCNode *node;
bool gotOne = false;
@@ -448,7 +448,7 @@ return gotOne;
}
-bool KSSLD::cacheRemoveByCN(QString cn) {
+bool KSSLD::cacheRemoveByCN(TQString cn) {
KSSLCNode *node;
bool gotOne = false;
@@ -486,9 +486,9 @@ return false;
}
-bool KSSLD::cacheModifyByCN(QString cn,
+bool KSSLD::cacheModifyByCN(TQString cn,
KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent,
- QDateTime expires) {
+ TQDateTime expires) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
@@ -510,7 +510,7 @@ return false;
bool KSSLD::cacheModifyByCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires) {
+ TQDateTime expires) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
@@ -529,19 +529,19 @@ return false;
}
-QStringList KSSLD::cacheGetHostList(KSSLCertificate cert) {
+TQStringList KSSLD::cacheGetHostList(KSSLCertificate cert) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
delete node;
cacheSaveToDisk();
- return QStringList();
+ return TQStringList();
}
certList.remove(node);
@@ -550,11 +550,11 @@ KSSLCNode *node;
}
}
-return QStringList();
+return TQStringList();
}
-bool KSSLD::cacheAddHost(KSSLCertificate cert, QString host) {
+bool KSSLD::cacheAddHost(KSSLCertificate cert, TQString host) {
KSSLCNode *node;
if (host.isEmpty())
@@ -563,7 +563,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
@@ -587,13 +587,13 @@ return false;
}
-bool KSSLD::cacheRemoveHost(KSSLCertificate cert, QString host) {
+bool KSSLD::cacheRemoveHost(KSSLCertificate cert, TQString host) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
@@ -618,11 +618,11 @@ return false;
///////////////////////////////////////////////////////////////////////////
void KSSLD::caVerifyUpdate() {
- QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
- if (!QFile::exists(path))
+ TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
+ if (!TQFile::exists(path))
return;
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
Q_UINT32 newStamp = KGlobal::dirs()->calcResourceHash("config", "ksslcalist", true);
Q_UINT32 oldStamp = cfg->readUnsignedNumEntry("ksslcalistStamp");
if (oldStamp != newStamp)
@@ -634,18 +634,18 @@ void KSSLD::caVerifyUpdate() {
}
bool KSSLD::caRegenerate() {
-QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
+TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
-QFile out(path);
+TQFile out(path);
if (!out.open(IO_WriteOnly))
return false;
KConfig cfg("ksslcalist", true, false);
-QStringList x = cfg.groupList();
+TQStringList x = cfg.groupList();
- for (QStringList::Iterator i = x.begin();
+ for (TQStringList::Iterator i = x.begin();
i != x.end();
++i) {
if ((*i).isEmpty() || *i == "<default>") continue;
@@ -654,7 +654,7 @@ QStringList x = cfg.groupList();
if (!cfg.readBoolEntry("site", false)) continue;
- QString cert = cfg.readEntry("x509", "");
+ TQString cert = cfg.readEntry("x509", "");
if (cert.length() <= 0) continue;
unsigned int xx = cert.length() - 1;
@@ -672,7 +672,7 @@ return true;
-bool KSSLD::caAdd(QString certificate, bool ssl, bool email, bool code) {
+bool KSSLD::caAdd(TQString certificate, bool ssl, bool email, bool code) {
KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit());
if (!x) return false;
@@ -696,11 +696,11 @@ return true;
* @internal
* Returns a list of certificates as QStrings read from the given file
*/
-static QStringList caReadCerticatesFromFile(QString filename) {
+static TQStringList caReadCerticatesFromFile(TQString filename) {
- QStringList certificates;
- QString certificate, temp;
- QFile file(filename);
+ TQStringList certificates;
+ TQString certificate, temp;
+ TQFile file(filename);
if (!file.open(IO_ReadOnly))
return certificates;
@@ -708,13 +708,13 @@ static QStringList caReadCerticatesFromFile(QString filename) {
while (!file.atEnd()) {
file.readLine(temp, 999);
if (temp.startsWith("-----BEGIN CERTIFICATE-----")) {
- certificate = QString::null;
+ certificate = TQString::null;
continue;
}
if (temp.startsWith("-----END CERTIFICATE-----")) {
certificates.append(certificate);
- certificate = QString::null;
+ certificate = TQString::null;
continue;
}
@@ -726,16 +726,16 @@ static QStringList caReadCerticatesFromFile(QString filename) {
return certificates;
}
-bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) {
+bool KSSLD::caAddFromFile(TQString filename, bool ssl, bool email, bool code) {
- QStringList certificates;
+ TQStringList certificates;
certificates = caReadCerticatesFromFile(filename);
if (certificates.isEmpty())
return false;
bool ok = true;
- for (QStringList::Iterator it = certificates.begin();
+ for (TQStringList::Iterator it = certificates.begin();
it != certificates.end(); ++it ) {
ok &= caAdd(*it, ssl, email, code);
}
@@ -743,18 +743,18 @@ bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) {
return ok;
}
-bool KSSLD::caRemoveFromFile(QString filename) {
+bool KSSLD::caRemoveFromFile(TQString filename) {
- QStringList certificates;
+ TQStringList certificates;
certificates = caReadCerticatesFromFile(filename);
if (certificates.isEmpty())
return false;
bool ok = true;
- for (QStringList::Iterator it = certificates.begin();
+ for (TQStringList::Iterator it = certificates.begin();
it != certificates.end(); ++it ) {
- QString certificate = *it;
+ TQString certificate = *it;
KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit());
ok &= x && caRemove(x->getSubject());
delete x;
@@ -764,8 +764,8 @@ bool KSSLD::caRemoveFromFile(QString filename) {
}
-QStringList KSSLD::caList() {
-QStringList x;
+TQStringList KSSLD::caList() {
+TQStringList x;
KConfig cfg("ksslcalist", true, false);
x = cfg.groupList();
@@ -775,7 +775,7 @@ return x;
}
-bool KSSLD::caUseForSSL(QString subject) {
+bool KSSLD::caUseForSSL(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -787,7 +787,7 @@ return cfg.readBoolEntry("site", false);
-bool KSSLD::caUseForEmail(QString subject) {
+bool KSSLD::caUseForEmail(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -799,7 +799,7 @@ return cfg.readBoolEntry("email", false);
-bool KSSLD::caUseForCode(QString subject) {
+bool KSSLD::caUseForCode(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -810,7 +810,7 @@ return cfg.readBoolEntry("code", false);
}
-bool KSSLD::caRemove(QString subject) {
+bool KSSLD::caRemove(TQString subject) {
KConfig cfg("ksslcalist", false, false);
if (!cfg.hasGroup(subject))
return false;
@@ -822,18 +822,18 @@ return true;
}
-QString KSSLD::caGetCert(QString subject) {
+TQString KSSLD::caGetCert(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
- return QString::null;
+ return TQString::null;
cfg.setGroup(subject);
-return cfg.readEntry("x509", QString::null);
+return cfg.readEntry("x509", TQString::null);
}
-bool KSSLD::caSetUse(QString subject, bool ssl, bool email, bool code) {
+bool KSSLD::caSetUse(TQString subject, bool ssl, bool email, bool code) {
KConfig cfg("ksslcalist", false, false);
if (!cfg.hasGroup(subject))
return false;
@@ -853,16 +853,16 @@ return true;
void KSSLD::searchAddCert(KSSLCertificate *cert) {
skMD5Digest.insert(cert->getMD5Digest(), cert, true);
- QStringList mails;
+ TQStringList mails;
cert->getEmails(mails);
- for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
- QString email = static_cast<const QString &>(*iter).lower();
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email);
+ for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
+ TQString email = static_cast<const TQString &>(*iter).lower();
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email);
if (it == skEmail.end())
- it = skEmail.insert(email, QPtrVector<KSSLCertificate>());
+ it = skEmail.insert(email, TQPtrVector<KSSLCertificate>());
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
if (elem.findRef(cert) == -1) {
unsigned int n = 0;
@@ -884,15 +884,15 @@ void KSSLD::searchAddCert(KSSLCertificate *cert) {
void KSSLD::searchRemoveCert(KSSLCertificate *cert) {
skMD5Digest.remove(cert->getMD5Digest());
- QStringList mails;
+ TQStringList mails;
cert->getEmails(mails);
- for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const QString &>(*iter).lower());
+ for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const TQString &>(*iter).lower());
if (it == skEmail.end())
break;
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
int n = elem.findRef(cert);
if (n != -1)
@@ -901,16 +901,16 @@ void KSSLD::searchRemoveCert(KSSLCertificate *cert) {
}
-QStringList KSSLD::getKDEKeyByEmail(const QString &email) {
- QStringList rc;
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower());
+TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) {
+ TQStringList rc;
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower());
kdDebug() << "GETKDEKey " << email.latin1() << endl;
if (it == skEmail.end())
return rc;
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
for (unsigned int n = 0; n < elem.size(); n++) {
KSSLCertificate *cert = elem.at(n);
if (cert) {
@@ -923,8 +923,8 @@ QStringList KSSLD::getKDEKeyByEmail(const QString &email) {
}
-KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) {
- QMap<QString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key);
+KSSLCertificate KSSLD::getCertByMD5Digest(const TQString &key) {
+ TQMap<TQString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key);
kdDebug() << "Searching cert for " << key.latin1() << endl;
@@ -943,15 +943,15 @@ KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) {
// Certificate Home methods
//
-QStringList KSSLD::getHomeCertificateList() {
+TQStringList KSSLD::getHomeCertificateList() {
return KSSLCertificateHome::getCertificateList();
}
-bool KSSLD::addHomeCertificateFile(QString filename, QString password, bool storePass) {
+bool KSSLD::addHomeCertificateFile(TQString filename, TQString password, bool storePass) {
return KSSLCertificateHome::addCertificate(filename, password, storePass);
}
-bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) {
+bool KSSLD::addHomeCertificatePKCS12(TQString base64cert, TQString passToStore) {
bool ok;
KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, passToStore);
ok = KSSLCertificateHome::addCertificate(pkcs12, passToStore);
@@ -959,11 +959,11 @@ bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) {
return ok;
}
-bool KSSLD::deleteHomeCertificateByFile(QString filename, QString password) {
+bool KSSLD::deleteHomeCertificateByFile(TQString filename, TQString password) {
return KSSLCertificateHome::deleteCertificate(filename, password);
}
-bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password) {
+bool KSSLD::deleteHomeCertificateByPKCS12(TQString base64cert, TQString password) {
bool ok;
KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, password);
ok = KSSLCertificateHome::deleteCertificate(pkcs12);
@@ -971,7 +971,7 @@ bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password)
return ok;
}
-bool KSSLD::deleteHomeCertificateByName(QString name) {
+bool KSSLD::deleteHomeCertificateByName(TQString name) {
return KSSLCertificateHome::deleteCertificateByName(name);
}
@@ -991,7 +991,7 @@ bool KSSLD::deleteHomeCertificateByName(QString name) {
experimentation to determine which implementation works best. My current
options are:
- (1) Store copies of the X509 certificates in a QPtrList using a self
+ (1) Store copies of the X509 certificates in a TQPtrList using a self
organizing heuristic as described by Munro and Suwanda.
(2) Store copies of the X509 certificates in a tree structure, perhaps
a redblack tree, avl tree, or even just a simple binary tree.
diff --git a/kio/misc/kssld/kssld.h b/kio/misc/kssld/kssld.h
index 94cbe3972..028a30809 100644
--- a/kio/misc/kssld/kssld.h
+++ b/kio/misc/kssld/kssld.h
@@ -25,11 +25,11 @@
#include <kded/kdedmodule.h>
#include <ksslcertificate.h>
#include <ksslcertificatecache.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
class KSimpleConfig;
@@ -43,7 +43,7 @@ class KSSLD : public KDEDModule
public:
- KSSLD(const QCString &name);
+ KSSLD(const TQCString &name);
virtual ~KSSLD();
@@ -54,80 +54,80 @@ k_dcop:
void cacheAddCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent = true);
- KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(QString cn);
+ KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(TQString cn);
KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCertificate(KSSLCertificate cert);
- bool cacheSeenCN(QString cn);
+ bool cacheSeenCN(TQString cn);
bool cacheSeenCertificate(KSSLCertificate cert);
- bool cacheRemoveByCN(QString cn);
- bool cacheRemoveBySubject(QString subject);
+ bool cacheRemoveByCN(TQString cn);
+ bool cacheRemoveBySubject(TQString subject);
bool cacheRemoveByCertificate(KSSLCertificate cert);
bool cacheIsPermanent(KSSLCertificate cert);
void cacheReload();
- bool cacheModifyByCN(QString cn,
+ bool cacheModifyByCN(TQString cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires);
+ TQDateTime expires);
bool cacheModifyByCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires);
+ TQDateTime expires);
- QStringList cacheGetHostList(KSSLCertificate cert);
+ TQStringList cacheGetHostList(KSSLCertificate cert);
- bool cacheAddHost(KSSLCertificate cert, QString host);
+ bool cacheAddHost(KSSLCertificate cert, TQString host);
- bool cacheRemoveHost(KSSLCertificate cert, QString host);
+ bool cacheRemoveHost(KSSLCertificate cert, TQString host);
/* Certificate Authorities */
void caVerifyUpdate();
bool caRegenerate();
- QStringList caList();
+ TQStringList caList();
- bool caUseForSSL(QString subject);
+ bool caUseForSSL(TQString subject);
- bool caUseForEmail(QString subject);
+ bool caUseForEmail(TQString subject);
- bool caUseForCode(QString subject);
+ bool caUseForCode(TQString subject);
- bool caAdd(QString certificate, bool ssl, bool email, bool code);
+ bool caAdd(TQString certificate, bool ssl, bool email, bool code);
- bool caAddFromFile(QString filename, bool ssl, bool email, bool code);
+ bool caAddFromFile(TQString filename, bool ssl, bool email, bool code);
- bool caRemove(QString subject);
+ bool caRemove(TQString subject);
- bool caRemoveFromFile(QString filename);
+ bool caRemoveFromFile(TQString filename);
- QString caGetCert(QString subject);
+ TQString caGetCert(TQString subject);
- bool caSetUse(QString subject, bool ssl, bool email, bool code);
+ bool caSetUse(TQString subject, bool ssl, bool email, bool code);
- QStringList getKDEKeyByEmail(const QString &email);
+ TQStringList getKDEKeyByEmail(const TQString &email);
- KSSLCertificate getCertByMD5Digest(const QString &key);
+ KSSLCertificate getCertByMD5Digest(const TQString &key);
//
// Certificate Home methods
//
- QStringList getHomeCertificateList();
+ TQStringList getHomeCertificateList();
- bool addHomeCertificateFile(QString filename, QString password, bool storePass /*=false*/);
+ bool addHomeCertificateFile(TQString filename, TQString password, bool storePass /*=false*/);
- bool addHomeCertificatePKCS12(QString base64cert, QString passToStore);
+ bool addHomeCertificatePKCS12(TQString base64cert, TQString passToStore);
- bool deleteHomeCertificateByFile(QString filename, QString password);
+ bool deleteHomeCertificateByFile(TQString filename, TQString password);
- bool deleteHomeCertificateByPKCS12(QString base64cert, QString password);
+ bool deleteHomeCertificateByPKCS12(TQString base64cert, TQString password);
- bool deleteHomeCertificateByName(QString name);
+ bool deleteHomeCertificateByName(TQString name);
private:
@@ -137,7 +137,7 @@ private:
// for the cache portion:
KSimpleConfig *cfg;
- QPtrList<KSSLCNode> certList;
+ TQPtrList<KSSLCNode> certList;
// Our pointer to OpenSSL
KOpenSSLProxy *kossl;
@@ -146,8 +146,8 @@ private:
void searchAddCert(KSSLCertificate *cert);
void searchRemoveCert(KSSLCertificate *cert);
- QMap<QString, QPtrVector<KSSLCertificate> > skEmail;
- QMap<QString, KSSLCertificate *> skMD5Digest;
+ TQMap<TQString, TQPtrVector<KSSLCertificate> > skEmail;
+ TQMap<TQString, KSSLCertificate *> skMD5Digest;
};
diff --git a/kio/misc/ktelnetservice.cpp b/kio/misc/ktelnetservice.cpp
index 41635b053..9c8238f74 100644
--- a/kio/misc/ktelnetservice.cpp
+++ b/kio/misc/ktelnetservice.cpp
@@ -51,10 +51,10 @@ int main(int argc, char **argv)
KConfig *config = new KConfig("kdeglobals", true);
config->setGroup("General");
- QString terminal = config->readPathEntry("TerminalApplication", "konsole");
+ TQString terminal = config->readPathEntry("TerminalApplication", "konsole");
KURL url(args->arg(0));
- QStringList cmd;
+ TQStringList cmd;
if (terminal == "konsole")
cmd << "--noclose";
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
cmd << url.user();
}
- QString host;
+ TQString host;
if (!url.host().isEmpty())
host = url.host(); // telnet://host
else if (!url.path().isEmpty())
@@ -99,9 +99,9 @@ int main(int argc, char **argv)
if (url.port()){
if ( url.protocol() == "ssh" )
- cmd << "-p" << QString::number(url.port());
+ cmd << "-p" << TQString::number(url.port());
else
- cmd << QString::number(url.port());
+ cmd << TQString::number(url.port());
}
app.kdeinitExec(terminal, cmd);
diff --git a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
index 565e0880e..2b3e16b0d 100644
--- a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
+++ b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
@@ -25,7 +25,7 @@ void KBetterThanKDialogBase::clicked()
}
-void KBetterThanKDialogBase::setLabel( const QString & label )
+void KBetterThanKDialogBase::setLabel( const TQString & label )
{
_label->setText(label);
}
@@ -45,6 +45,6 @@ void KBetterThanKDialogBase::accept()
void KBetterThanKDialogBase::reject()
{
- QDialog::reject();
+ TQDialog::reject();
setResult(2);
}
diff --git a/kio/misc/kwalletd/ktimeout.cpp b/kio/misc/kwalletd/ktimeout.cpp
index 1827b8bba..e13a32d20 100644
--- a/kio/misc/kwalletd/ktimeout.cpp
+++ b/kio/misc/kwalletd/ktimeout.cpp
@@ -23,7 +23,7 @@
#include "ktimeout.h"
KTimeout::KTimeout(int size)
-: QObject(), _timers(size) {
+: TQObject(), _timers(size) {
_timers.setAutoDelete(true);
}
@@ -39,7 +39,7 @@ void KTimeout::clear() {
void KTimeout::removeTimer(int id) {
- QTimer *t = _timers.find(id);
+ TQTimer *t = _timers.find(id);
if (t != 0L) {
_timers.remove(id); // autodeletes
}
@@ -51,15 +51,15 @@ void KTimeout::addTimer(int id, int timeout) {
return;
}
- QTimer *t = new QTimer;
- connect(t, SIGNAL(timeout()), this, SLOT(timeout()));
+ TQTimer *t = new QTimer;
+ connect(t, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()));
t->start(timeout);
_timers.insert(id, t);
}
void KTimeout::resetTimer(int id, int timeout) {
- QTimer *t = _timers.find(id);
+ TQTimer *t = _timers.find(id);
if (t) {
t->changeInterval(timeout);
}
@@ -67,9 +67,9 @@ void KTimeout::resetTimer(int id, int timeout) {
void KTimeout::timeout() {
- const QTimer *t = static_cast<const QTimer*>(sender());
+ const TQTimer *t = static_cast<const TQTimer*>(sender());
if (t) {
- QIntDictIterator<QTimer> it(_timers);
+ TQIntDictIterator<TQTimer> it(_timers);
for (; it.current(); ++it) {
if (it.current() == t) {
emit timedOut(it.currentKey());
diff --git a/kio/misc/kwalletd/ktimeout.h b/kio/misc/kwalletd/ktimeout.h
index 287de44cb..441e4ed77 100644
--- a/kio/misc/kwalletd/ktimeout.h
+++ b/kio/misc/kwalletd/ktimeout.h
@@ -22,12 +22,12 @@
#ifndef _KTIMEOUT_H_
#define _KTIMEOUT_H_
-#include <qintdict.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqtimer.h>
// @internal
-class KTimeout : public QObject {
+class KTimeout : public TQObject {
Q_OBJECT
public:
KTimeout(int size = 29);
@@ -46,7 +46,7 @@ class KTimeout : public QObject {
void timeout();
private:
- QIntDict<QTimer> _timers;
+ TQIntDict<TQTimer> _timers;
};
#endif
diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp
index 3fa32ff71..fd39f8487 100644
--- a/kio/misc/kwalletd/kwalletd.cpp
+++ b/kio/misc/kwalletd/kwalletd.cpp
@@ -40,18 +40,18 @@
#include <kwalletentry.h>
#include <kwin.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqvbox.h>
#include <assert.h>
extern "C" {
- KDE_EXPORT KDEDModule *create_kwalletd(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_kwalletd(const TQCString &name) {
return new KWalletD(name);
}
}
@@ -76,15 +76,15 @@ class KWalletTransaction {
DCOPClient *client;
DCOPClientTransaction *transaction;
Type tType;
- QCString rawappid, returnObject;
- QCString appid;
+ TQCString rawappid, returnObject;
+ TQCString appid;
uint wId;
- QString wallet;
+ TQString wallet;
bool modal;
};
-KWalletD::KWalletD(const QCString &name)
+KWalletD::KWalletD(const TQCString &name)
: KDEDModule(name), _failed(0) {
srand(time(0));
_showingFailureNotify = false;
@@ -92,17 +92,17 @@ KWalletD::KWalletD(const QCString &name)
_timeouts = new KTimeout(17);
_closeIdle = false;
_idleTime = 0;
- connect(_timeouts, SIGNAL(timedOut(int)), this, SLOT(timedOut(int)));
+ connect(_timeouts, TQT_SIGNAL(timedOut(int)), this, TQT_SLOT(timedOut(int)));
reconfigure();
KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");
connect(KApplication::dcopClient(),
- SIGNAL(applicationRemoved(const QCString&)),
+ TQT_SIGNAL(applicationRemoved(const TQCString&)),
this,
- SLOT(slotAppUnregistered(const QCString&)));
+ TQT_SLOT(slotAppUnregistered(const TQCString&)));
_dw = new KDirWatch(this, "KWallet Directory Watcher");
_dw->addDir(KGlobal::dirs()->saveLocation("kwallet"));
_dw->startScan(true);
- connect(_dw, SIGNAL(dirty(const QString&)), this, SLOT(emitWalletListDirty()));
+ connect(_dw, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(emitWalletListDirty()));
}
@@ -140,7 +140,7 @@ void KWalletD::processTransactions() {
KWalletTransaction *xact;
while (!_transactions.isEmpty()) {
xact = _transactions.first();
- QCString replyType;
+ TQCString replyType;
int res;
assert(xact->tType != KWalletTransaction::Unknown);
@@ -157,7 +157,7 @@ void KWalletD::processTransactions() {
// should not produce multiple password
// dialogs on a failure
if (res < 0) {
- QPtrListIterator<KWalletTransaction> it(_transactions);
+ TQPtrListIterator<KWalletTransaction> it(_transactions);
KWalletTransaction *x;
while ((x = it.current()) && x != xact) {
++it;
@@ -189,8 +189,8 @@ void KWalletD::processTransactions() {
}
if (xact->returnObject.isEmpty() && xact->tType != KWalletTransaction::ChangePassword) {
- QByteArray replyData;
- QDataStream stream(replyData, IO_WriteOnly);
+ TQByteArray replyData;
+ TQDataStream stream(replyData, IO_WriteOnly);
stream << res;
xact->client->endTransaction(xact->transaction, replyType, replyData);
}
@@ -201,20 +201,20 @@ void KWalletD::processTransactions() {
}
-void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId) {
+void KWalletD::openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId) {
DCOPClient *dc = callingDcopClient();
if (!dc) {
return;
}
- QCString appid = dc->senderId();
+ TQCString appid = dc->senderId();
if (!_enabled ||
- !QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
+ !TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
DCOPRef(appid, returnObject).send("walletOpenResult", -1);
return;
}
- QCString peerName = friendlyDCOPPeerName();
+ TQCString peerName = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
@@ -229,12 +229,12 @@ void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObj
DCOPRef(appid, returnObject).send("walletOpenResult", 0);
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
}
-int KWalletD::openPath(const QString& path, uint wId) {
+int KWalletD::openPath(const TQString& path, uint wId) {
if (!_enabled) { // guard
return -1;
}
@@ -245,16 +245,16 @@ int KWalletD::openPath(const QString& path, uint wId) {
}
-int KWalletD::open(const QString& wallet, uint wId) {
+int KWalletD::open(const TQString& wallet, uint wId) {
if (!_enabled) { // guard
return -1;
}
- if (!QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
+ if (!TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
return -1;
}
- QCString appid = friendlyDCOPPeerName();
+ TQCString appid = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
_transactions.append(xact);
@@ -266,14 +266,14 @@ int KWalletD::open(const QString& wallet, uint wId) {
xact->wId = wId;
xact->tType = KWalletTransaction::Open;
xact->modal = true; // mark dialogs as modal, the app has blocking wait
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
return 0; // process later
}
// Sets up a dialog that will be shown by kwallet.
-void KWalletD::setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal ) {
+void KWalletD::setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ) {
if( wId != 0 )
KWin::setMainWindow( dialog, wId ); // correct, set dialog parent
else {
@@ -307,13 +307,13 @@ void KWalletD::checkActiveDialog() {
KWin::forceActiveWindow( activeDialog->winId());
}
-int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal) {
+int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal) {
if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet())) {
// First use wizard
KWalletWizard *wiz = new KWalletWizard(0);
setupDialog( wiz, wId, appid, modal );
int rc = wiz->exec();
- if (rc == QDialog::Accepted) {
+ if (rc == TQDialog::Accepted) {
KConfig cfg("kwalletrc");
cfg.setGroup("Wallet");
cfg.writeEntry("First Use", false);
@@ -330,7 +330,7 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui
// Create the wallet
KWallet::Backend *b = new KWallet::Backend(KWallet::Wallet::LocalWallet());
- QByteArray p;
+ TQByteArray p;
p.duplicate(wiz->_pass1->text().utf8(), wiz->_pass1->text().length());
b->open(p);
b->createFolder(KWallet::Wallet::PasswordFolder());
@@ -356,11 +356,11 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui
}
-int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool isPath, WId w, bool modal) {
+int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool isPath, WId w, bool modal) {
int rc = -1;
bool brandNew = false;
- QCString thisApp;
+ TQCString thisApp;
if (appid.isEmpty()) {
thisApp = "KDE System";
} else {
@@ -371,7 +371,7 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
return -1;
}
- for (QIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) {
+ for (TQIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) {
if (i.current()->walletName() == wallet) {
rc = i.currentKey();
break;
@@ -387,8 +387,8 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
KWallet::Backend *b = new KWallet::Backend(wallet, isPath);
KPasswordDialog *kpd = 0L;
bool emptyPass = false;
- if ((isPath && QFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) {
- int pwless = b->open(QByteArray());
+ if ((isPath && TQFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) {
+ int pwless = b->open(TQByteArray());
if (0 != pwless || !b->isOpen()) {
if (pwless == 0) {
// release, start anew
@@ -397,9 +397,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
}
kpd = new KPasswordDialog(KPasswordDialog::Password, false, 0);
if (appid.isEmpty()) {
- kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(wallet)));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet)));
}
brandNew = false;
kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen"));
@@ -413,16 +413,16 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
if (appid.isEmpty()) {
kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request."));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(QStyleSheet::escape(appid)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)));
}
brandNew = true;
kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen"));
} else {
kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0);
if (appid.length() == 0) {
- kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(wallet)));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet)));
}
brandNew = true;
kpd->setButtonOK(KGuiItem(i18n("C&reate"),"filenew"));
@@ -439,9 +439,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
setupDialog( kpd, w, appid, modal );
if (kpd->exec() == KDialog::Accepted) {
p = kpd->password();
- int rc = b->open(QByteArray().duplicate(p, strlen(p)));
+ int rc = b->open(TQByteArray().duplicate(p, strlen(p)));
if (!b->isOpen()) {
- kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(QStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc)));
+ kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(TQStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc)));
kpd->clearPassword();
}
} else {
@@ -480,13 +480,13 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
if (_closeIdle && _timeouts) {
_timeouts->addTimer(rc, _idleTime);
}
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
if (brandNew) {
- emitDCOPSignal("walletCreated(QString)", data);
+ emitDCOPSignal("walletCreated(TQString)", data);
}
- emitDCOPSignal("walletOpened(QString)", data);
+ emitDCOPSignal("walletOpened(TQString)", data);
if (_wallets.count() == 1 && _launchManager) {
KApplication::startServiceByDesktopName("kwalletmanager-kwalletd");
}
@@ -502,10 +502,10 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
}
-bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId w) {
+bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w) {
int response = 0;
- QCString thisApp;
+ TQCString thisApp;
if (appid.isEmpty()) {
thisApp = "KDE System";
} else {
@@ -515,9 +515,9 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
if (!implicitAllow(wallet, thisApp)) {
KBetterThanKDialogBase *dialog = new KBetterThanKDialogBase;
if (appid.isEmpty()) {
- dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet)));
+ dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet)));
} else {
- dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(QStyleSheet::escape(QString(appid))).arg(QStyleSheet::escape(wallet)));
+ dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(TQStyleSheet::escape(TQString(appid))).arg(TQStyleSheet::escape(wallet)));
}
setupDialog( dialog, w, appid, false );
response = dialog->exec();
@@ -528,7 +528,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
if (response == 1) {
KConfig cfg("kwalletrc");
cfg.setGroup("Auto Allow");
- QStringList apps = cfg.readListEntry(wallet);
+ TQStringList apps = cfg.readListEntry(wallet);
if (!apps.contains(thisApp)) {
apps += thisApp;
_implicitAllowMap[wallet] += thisApp;
@@ -539,7 +539,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
} else if (response == 3) {
KConfig cfg("kwalletrc");
cfg.setGroup("Auto Deny");
- QStringList apps = cfg.readListEntry(wallet);
+ TQStringList apps = cfg.readListEntry(wallet);
if (!apps.contains(thisApp)) {
apps += thisApp;
_implicitDenyMap[wallet] += thisApp;
@@ -554,16 +554,16 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
}
-int KWalletD::deleteWallet(const QString& wallet) {
- QString path = KGlobal::dirs()->saveLocation("kwallet") + QDir::separator() + wallet + ".kwl";
+int KWalletD::deleteWallet(const TQString& wallet) {
+ TQString path = KGlobal::dirs()->saveLocation("kwallet") + TQDir::separator() + wallet + ".kwl";
- if (QFile::exists(path)) {
+ if (TQFile::exists(path)) {
close(wallet, true);
- QFile::remove(path);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQFile::remove(path);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
- emitDCOPSignal("walletDeleted(QString)", data);
+ emitDCOPSignal("walletDeleted(TQString)", data);
return 0;
}
@@ -571,8 +571,8 @@ int KWalletD::deleteWallet(const QString& wallet) {
}
-void KWalletD::changePassword(const QString& wallet, uint wId) {
- QCString appid = friendlyDCOPPeerName();
+void KWalletD::changePassword(const TQString& wallet, uint wId) {
+ TQCString appid = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
@@ -584,13 +584,13 @@ void KWalletD::changePassword(const QString& wallet, uint wId) {
_transactions.append(xact);
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
}
-void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId) {
- QIntDictIterator<KWallet::Backend> it(_wallets);
+void KWalletD::doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId) {
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
KWallet::Backend *w = 0L;
int handle = -1;
bool reclose = false;
@@ -619,7 +619,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
KPasswordDialog *kpd;
kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0);
- kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet)));
kpd->setCaption(i18n("KDE Wallet Service"));
kpd->setAllowEmptyPasswords(true);
setupDialog( kpd, wId, appid, false );
@@ -627,7 +627,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
const char *p = kpd->password();
if (p) {
_passwords[wallet] = p;
- QByteArray pa;
+ TQByteArray pa;
pa.duplicate(p, strlen(p));
int rc = w->close(pa);
if (rc < 0) {
@@ -651,11 +651,11 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
}
-int KWalletD::close(const QString& wallet, bool force) {
+int KWalletD::close(const TQString& wallet, bool force) {
int handle = -1;
KWallet::Backend *w = 0L;
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -671,7 +671,7 @@ int KWalletD::close(const QString& wallet, bool force) {
int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
if (w) {
- const QString& wallet = w->walletName();
+ const TQString& wallet = w->walletName();
assert(_passwords.contains(wallet));
if (w->refCount() == 0 || force) {
invalidateHandle(handle);
@@ -680,7 +680,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
}
_wallets.remove(handle);
if (_passwords.contains(wallet)) {
- w->close(QByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length()));
+ w->close(TQByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length()));
_passwords[wallet].fill(0);
_passwords.remove(wallet);
}
@@ -696,7 +696,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
int KWalletD::close(int handle, bool force) {
- QCString appid = friendlyDCOPPeerName();
+ TQCString appid = friendlyDCOPPeerName();
KWallet::Backend *w = _wallets.find(handle);
bool contains = false;
@@ -722,7 +722,7 @@ int KWalletD::close(int handle, bool force) {
invalidateHandle(handle);
}
if (_passwords.contains(w->walletName())) {
- w->close(QByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length()));
+ w->close(TQByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length()));
_passwords[w->walletName()].fill(0);
_passwords.remove(w->walletName());
}
@@ -737,8 +737,8 @@ int KWalletD::close(int handle, bool force) {
}
-bool KWalletD::isOpen(const QString& wallet) const {
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+bool KWalletD::isOpen(const TQString& wallet) const {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -758,7 +758,7 @@ bool KWalletD::isOpen(int handle) {
if (rc == 0 && ++_failed > 5) {
_failed = 0;
- QTimer::singleShot(0, this, SLOT(notifyFailures()));
+ TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures()));
} else if (rc != 0) {
_failed = 0;
}
@@ -767,18 +767,18 @@ bool KWalletD::isOpen(int handle) {
}
-QStringList KWalletD::wallets() const {
- QString path = KGlobal::dirs()->saveLocation("kwallet");
- QDir dir(path, "*.kwl");
- QStringList rc;
+TQStringList KWalletD::wallets() const {
+ TQString path = KGlobal::dirs()->saveLocation("kwallet");
+ TQDir dir(path, "*.kwl");
+ TQStringList rc;
- dir.setFilter(QDir::Files | QDir::NoSymLinks);
+ dir.setFilter(TQDir::Files | TQDir::NoSymLinks);
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it(*list);
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0L) {
- QString fn = fi->fileName();
+ TQString fn = fi->fileName();
if (fn.endsWith(".kwl")) {
fn.truncate(fn.length()-4);
}
@@ -793,8 +793,8 @@ void KWalletD::sync(int handle) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -802,18 +802,18 @@ void KWalletD::sync(int handle) {
}
-QStringList KWalletD::folderList(int handle) {
+TQStringList KWalletD::folderList(int handle) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
return b->folderList();
}
- return QStringList();
+ return TQStringList();
}
-bool KWalletD::hasFolder(int handle, const QString& f) {
+bool KWalletD::hasFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -824,21 +824,21 @@ bool KWalletD::hasFolder(int handle, const QString& f) {
}
-bool KWalletD::removeFolder(int handle, const QString& f) {
+bool KWalletD::removeFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
bool rc = b->removeFolder(f);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << b->walletName();
- emitDCOPSignal("folderListUpdated(QString)", data);
+ emitDCOPSignal("folderListUpdated(TQString)", data);
return rc;
}
@@ -846,21 +846,21 @@ bool KWalletD::removeFolder(int handle, const QString& f) {
}
-bool KWalletD::createFolder(int handle, const QString& f) {
+bool KWalletD::createFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
bool rc = b->createFolder(f);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << b->walletName();
- emitDCOPSignal("folderListUpdated(QString)", data);
+ emitDCOPSignal("folderListUpdated(TQString)", data);
return rc;
}
@@ -868,7 +868,7 @@ bool KWalletD::createFolder(int handle, const QString& f) {
}
-QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& key) {
+TQByteArray KWalletD::readMap(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -879,18 +879,18 @@ QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& k
}
}
- return QByteArray();
+ return TQByteArray();
}
-QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString,TQByteArray> KWalletD::readMapList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QByteArray> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQByteArray> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
if (entry->type() == KWallet::Wallet::Map) {
@@ -901,11 +901,11 @@ QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder
return rc;
}
- return QMap<QString, QByteArray>();
+ return TQMap<TQString, TQByteArray>();
}
-QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString& key) {
+TQByteArray KWalletD::readEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -916,18 +916,18 @@ QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString&
}
}
- return QByteArray();
+ return TQByteArray();
}
-QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString, TQByteArray> KWalletD::readEntryList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QByteArray> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQByteArray> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
rc.insert(entry->key(), entry->value());
@@ -936,11 +936,11 @@ QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& fol
return rc;
}
- return QMap<QString, QByteArray>();
+ return TQMap<TQString, TQByteArray>();
}
-QStringList KWalletD::entryList(int handle, const QString& folder) {
+TQStringList KWalletD::entryList(int handle, const TQString& folder) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -948,11 +948,11 @@ QStringList KWalletD::entryList(int handle, const QString& folder) {
return b->entryList();
}
- return QStringList();
+ return TQStringList();
}
-QString KWalletD::readPassword(int handle, const QString& folder, const QString& key) {
+TQString KWalletD::readPassword(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -963,18 +963,18 @@ QString KWalletD::readPassword(int handle, const QString& folder, const QString&
}
}
- return QString::null;
+ return TQString::null;
}
-QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString, TQString> KWalletD::readPasswordList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QString> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQString> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
if (entry->type() == KWallet::Wallet::Password) {
@@ -985,11 +985,11 @@ QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& fol
return rc;
}
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
}
-int KWalletD::writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value) {
+int KWalletD::writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1000,8 +1000,8 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co
e.setType(KWallet::Wallet::Map);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1013,7 +1013,7 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co
}
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType) {
+int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1024,8 +1024,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
e.setType(KWallet::Wallet::EntryType(entryType));
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1037,7 +1037,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
}
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value) {
+int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1048,8 +1048,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
e.setType(KWallet::Wallet::Stream);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1061,7 +1061,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
}
-int KWalletD::writePassword(int handle, const QString& folder, const QString& key, const QString& value) {
+int KWalletD::writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1072,8 +1072,8 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke
e.setType(KWallet::Wallet::Password);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1085,7 +1085,7 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke
}
-int KWalletD::entryType(int handle, const QString& folder, const QString& key) {
+int KWalletD::entryType(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1102,7 +1102,7 @@ int KWalletD::entryType(int handle, const QString& folder, const QString& key) {
}
-bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) {
+bool KWalletD::hasEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1117,7 +1117,7 @@ bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) {
}
-int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) {
+int KWalletD::removeEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1127,8 +1127,8 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key)
b->setFolder(folder);
bool rc = b->removeEntry(key);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1140,10 +1140,10 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key)
}
-void KWalletD::slotAppUnregistered(const QCString& app) {
+void KWalletD::slotAppUnregistered(const TQCString& app) {
if (_handles.contains(app)) {
- QValueList<int> l = _handles[app];
- for (QValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) {
+ TQValueList<int> l = _handles[app];
+ for (TQValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) {
_handles[app].remove(*i);
KWallet::Backend *w = _wallets.find(*i);
if (w && !_leaveOpen && 0 == w->deref()) {
@@ -1156,7 +1156,7 @@ void KWalletD::slotAppUnregistered(const QCString& app) {
void KWalletD::invalidateHandle(int handle) {
- for (QMap<QCString,QValueList<int> >::Iterator i = _handles.begin();
+ for (TQMap<TQCString,TQValueList<int> >::Iterator i = _handles.begin();
i != _handles.end();
++i) {
i.data().remove(handle);
@@ -1164,7 +1164,7 @@ void KWalletD::invalidateHandle(int handle) {
}
-KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) {
+KWallet::Backend *KWalletD::getWallet(const TQCString& appid, int handle) {
if (handle == 0) {
return 0L;
}
@@ -1186,7 +1186,7 @@ KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) {
if (++_failed > 5) {
_failed = 0;
- QTimer::singleShot(0, this, SLOT(notifyFailures()));
+ TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures()));
}
return 0L;
@@ -1202,32 +1202,32 @@ void KWalletD::notifyFailures() {
}
-void KWalletD::doCloseSignals(int handle, const QString& wallet) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+void KWalletD::doCloseSignals(int handle, const TQString& wallet) {
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << handle;
emitDCOPSignal("walletClosed(int)", data);
- QByteArray data2;
- QDataStream ds2(data2, IO_WriteOnly);
+ TQByteArray data2;
+ TQDataStream ds2(data2, IO_WriteOnly);
ds2 << wallet;
- emitDCOPSignal("walletClosed(QString)", data2);
+ emitDCOPSignal("walletClosed(TQString)", data2);
if (_wallets.isEmpty()) {
- emitDCOPSignal("allWalletsClosed()", QByteArray());
+ emitDCOPSignal("allWalletsClosed()", TQByteArray());
}
}
-int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName) {
+int KWalletD::renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
int rc = b->renameEntry(oldName, newName);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1239,14 +1239,14 @@ int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldN
}
-QStringList KWalletD::users(const QString& wallet) const {
- QStringList rc;
+TQStringList KWalletD::users(const TQString& wallet) const {
+ TQStringList rc;
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
- for (QMap<QCString,QValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) {
+ for (TQMap<TQCString,TQValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) {
if (hit.data().contains(it.currentKey())) {
rc += hit.key();
}
@@ -1259,8 +1259,8 @@ QStringList KWalletD::users(const QString& wallet) const {
}
-bool KWalletD::disconnectApplication(const QString& wallet, const QCString& application) {
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+bool KWalletD::disconnectApplication(const TQString& wallet, const TQCString& application) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -1275,11 +1275,11 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl
close(it.current()->walletName(), true);
}
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
ds << application;
- emitDCOPSignal("applicationDisconnected(QString,QCString)", data);
+ emitDCOPSignal("applicationDisconnected(TQString,TQCString)", data);
return true;
}
@@ -1290,17 +1290,17 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl
}
-void KWalletD::emitFolderUpdated(const QString& wallet, const QString& folder) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+void KWalletD::emitFolderUpdated(const TQString& wallet, const TQString& folder) {
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
ds << folder;
- emitDCOPSignal("folderUpdated(QString,QString)", data);
+ emitDCOPSignal("folderUpdated(TQString,TQString)", data);
}
void KWalletD::emitWalletListDirty() {
- emitDCOPSignal("walletListDirty()", QByteArray());
+ emitDCOPSignal("walletListDirty()", TQByteArray());
}
@@ -1327,14 +1327,14 @@ void KWalletD::reconfigure() {
// Handle idle changes
if (_closeIdle) {
if (_idleTime != timeSave) { // Timer length changed
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
for (; it.current(); ++it) {
_timeouts->resetTimer(it.currentKey(), _idleTime);
}
}
if (!idleSave) { // add timers for all the wallets
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
for (; it.current(); ++it) {
_timeouts->addTimer(it.currentKey(), _idleTime);
}
@@ -1346,8 +1346,8 @@ void KWalletD::reconfigure() {
// Update the implicit allow stuff
_implicitAllowMap.clear();
cfg.setGroup("Auto Allow");
- QStringList entries = cfg.entryMap("Auto Allow").keys();
- for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
+ TQStringList entries = cfg.entryMap("Auto Allow").keys();
+ for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
_implicitAllowMap[*i] = cfg.readListEntry(*i);
}
@@ -1355,14 +1355,14 @@ void KWalletD::reconfigure() {
_implicitDenyMap.clear();
cfg.setGroup("Auto Deny");
entries = cfg.entryMap("Auto Deny").keys();
- for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
+ for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
_implicitDenyMap[*i] = cfg.readListEntry(*i);
}
// Update if wallet was enabled/disabled
if (!_enabled) { // close all wallets
while (!_wallets.isEmpty()) {
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
if (!it.current()) { // necessary?
break;
}
@@ -1377,60 +1377,60 @@ bool KWalletD::isEnabled() const {
}
-bool KWalletD::folderDoesNotExist(const QString& wallet, const QString& folder) {
+bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder) {
if (!wallets().contains(wallet)) {
return true;
}
- for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
if (it.current()->walletName() == wallet) {
return it.current()->folderDoesNotExist(folder);
}
}
KWallet::Backend *b = new KWallet::Backend(wallet);
- b->open(QByteArray());
+ b->open(TQByteArray());
bool rc = b->folderDoesNotExist(folder);
delete b;
return rc;
}
-bool KWalletD::keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key) {
+bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) {
if (!wallets().contains(wallet)) {
return true;
}
- for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
if (it.current()->walletName() == wallet) {
return it.current()->entryDoesNotExist(folder, key);
}
}
KWallet::Backend *b = new KWallet::Backend(wallet);
- b->open(QByteArray());
+ b->open(TQByteArray());
bool rc = b->entryDoesNotExist(folder, key);
delete b;
return rc;
}
-bool KWalletD::implicitAllow(const QString& wallet, const QCString& app) {
- return _implicitAllowMap[wallet].contains(QString::fromLocal8Bit(app));
+bool KWalletD::implicitAllow(const TQString& wallet, const TQCString& app) {
+ return _implicitAllowMap[wallet].contains(TQString::fromLocal8Bit(app));
}
-bool KWalletD::implicitDeny(const QString& wallet, const QCString& app) {
- return _implicitDenyMap[wallet].contains(QString::fromLocal8Bit(app));
+bool KWalletD::implicitDeny(const TQString& wallet, const TQCString& app) {
+ return _implicitDenyMap[wallet].contains(TQString::fromLocal8Bit(app));
}
-QCString KWalletD::friendlyDCOPPeerName() {
+TQCString KWalletD::friendlyDCOPPeerName() {
DCOPClient *dc = callingDcopClient();
if (!dc) {
return "";
}
- return dc->senderId().replace(QRegExp("-[0-9]+$"), "");
+ return dc->senderId().replace(TQRegExp("-[0-9]+$"), "");
}
@@ -1443,9 +1443,9 @@ void KWalletD::timedOut(int id) {
void KWalletD::closeAllWallets() {
- QIntDict<KWallet::Backend> tw = _wallets;
+ TQIntDict<KWallet::Backend> tw = _wallets;
- for (QIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) {
closeWallet(it.current(), it.currentKey(), true);
}
@@ -1454,7 +1454,7 @@ void KWalletD::closeAllWallets() {
// All of this should be basically noop. Let's just be safe.
_wallets.clear();
- for (QMap<QString,QCString>::Iterator it = _passwords.begin();
+ for (TQMap<TQString,TQCString>::Iterator it = _passwords.begin();
it != _passwords.end();
++it) {
it.data().fill(0);
@@ -1463,12 +1463,12 @@ void KWalletD::closeAllWallets() {
}
-QString KWalletD::networkWallet() {
+TQString KWalletD::networkWallet() {
return KWallet::Wallet::NetworkWallet();
}
-QString KWalletD::localWallet() {
+TQString KWalletD::localWallet() {
return KWallet::Wallet::LocalWallet();
}
diff --git a/kio/misc/kwalletd/kwalletd.h b/kio/misc/kwalletd/kwalletd.h
index afa999f24..b426e7d5a 100644
--- a/kio/misc/kwalletd/kwalletd.h
+++ b/kio/misc/kwalletd/kwalletd.h
@@ -23,10 +23,10 @@
#define _KWALLETD_H_
#include <kded/kdedmodule.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include "kwalletbackend.h"
#include <time.h>
@@ -42,7 +42,7 @@ class KWalletD : public KDEDModule {
Q_OBJECT
K_DCOP
public:
- KWalletD(const QCString &name);
+ KWalletD(const TQCString &name);
virtual ~KWalletD();
k_dcop:
@@ -50,145 +50,145 @@ class KWalletD : public KDEDModule {
virtual bool isEnabled() const;
// Open and unlock the wallet
- virtual int open(const QString& wallet, uint wId);
+ virtual int open(const TQString& wallet, uint wId);
// Open and unlock the wallet with this path
- virtual int openPath(const QString& path, uint wId);
+ virtual int openPath(const TQString& path, uint wId);
// Asynchronous open - must give the object to return the handle
// to.
- virtual void openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId);
+ virtual void openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId);
// Close and lock the wallet
// If force = true, will close it for all users. Behave. This
// can break applications, and is generally intended for use by
// the wallet manager app only.
- virtual int close(const QString& wallet, bool force);
+ virtual int close(const TQString& wallet, bool force);
virtual int close(int handle, bool force);
// Save to disk but leave open
virtual ASYNC sync(int handle);
// Physically deletes the wallet from disk.
- virtual int deleteWallet(const QString& wallet);
+ virtual int deleteWallet(const TQString& wallet);
// Returns true if the wallet is open
- virtual bool isOpen(const QString& wallet) const;
+ virtual bool isOpen(const TQString& wallet) const;
virtual bool isOpen(int handle);
// List the users of this wallet
- virtual QStringList users(const QString& wallet) const;
+ virtual TQStringList users(const TQString& wallet) const;
// Change the password of this wallet
- virtual void changePassword(const QString& wallet, uint wId);
+ virtual void changePassword(const TQString& wallet, uint wId);
// A list of all wallets
- virtual QStringList wallets() const;
+ virtual TQStringList wallets() const;
// A list of all folders in this wallet
- virtual QStringList folderList(int handle);
+ virtual TQStringList folderList(int handle);
// Does this wallet have this folder?
- virtual bool hasFolder(int handle, const QString& folder);
+ virtual bool hasFolder(int handle, const TQString& folder);
// Create this folder
- virtual bool createFolder(int handle, const QString& folder);
+ virtual bool createFolder(int handle, const TQString& folder);
// Remove this folder
- virtual bool removeFolder(int handle, const QString& folder);
+ virtual bool removeFolder(int handle, const TQString& folder);
// List of entries in this folder
- virtual QStringList entryList(int handle, const QString& folder);
+ virtual TQStringList entryList(int handle, const TQString& folder);
// Read an entry. If the entry does not exist, it just
// returns an empty result. It is your responsibility to check
// hasEntry() first.
- virtual QByteArray readEntry(int handle, const QString& folder, const QString& key);
- virtual QByteArray readMap(int handle, const QString& folder, const QString& key);
- virtual QString readPassword(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QByteArray> readEntryList(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QByteArray> readMapList(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QString> readPasswordList(int handle, const QString& folder, const QString& key);
+ virtual TQByteArray readEntry(int handle, const TQString& folder, const TQString& key);
+ virtual TQByteArray readMap(int handle, const TQString& folder, const TQString& key);
+ virtual TQString readPassword(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQByteArray> readEntryList(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQByteArray> readMapList(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQString> readPasswordList(int handle, const TQString& folder, const TQString& key);
// Rename an entry. rc=0 on success.
- virtual int renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName);
+ virtual int renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName);
// Write an entry. rc=0 on success.
- virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType);
- virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value);
- virtual int writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value);
- virtual int writePassword(int handle, const QString& folder, const QString& key, const QString& value);
+ virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType);
+ virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value);
+ virtual int writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value);
+ virtual int writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value);
// Does the entry exist?
- virtual bool hasEntry(int handle, const QString& folder, const QString& key);
+ virtual bool hasEntry(int handle, const TQString& folder, const TQString& key);
// What type is the entry?
- virtual int entryType(int handle, const QString& folder, const QString& key);
+ virtual int entryType(int handle, const TQString& folder, const TQString& key);
// Remove an entry. rc=0 on success.
- virtual int removeEntry(int handle, const QString& folder, const QString& key);
+ virtual int removeEntry(int handle, const TQString& folder, const TQString& key);
// Disconnect an app from a wallet
- virtual bool disconnectApplication(const QString& wallet, const QCString& application);
+ virtual bool disconnectApplication(const TQString& wallet, const TQCString& application);
virtual void reconfigure();
// Determine
- virtual bool folderDoesNotExist(const QString& wallet, const QString& folder);
- virtual bool keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key);
+ virtual bool folderDoesNotExist(const TQString& wallet, const TQString& folder);
+ virtual bool keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key);
virtual void closeAllWallets();
- virtual QString networkWallet();
+ virtual TQString networkWallet();
- virtual QString localWallet();
+ virtual TQString localWallet();
private slots:
- void slotAppUnregistered(const QCString& app);
+ void slotAppUnregistered(const TQCString& app);
void emitWalletListDirty();
void timedOut(int);
void notifyFailures();
void processTransactions();
private:
- int internalOpen(const QCString& appid, const QString& wallet, bool isPath = false, WId w = 0, bool modal = false);
- bool isAuthorizedApp(const QCString& appid, const QString& wallet, WId w);
+ int internalOpen(const TQCString& appid, const TQString& wallet, bool isPath = false, WId w = 0, bool modal = false);
+ bool isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w);
// This also validates the handle. May return NULL.
- KWallet::Backend* getWallet(const QCString& appid, int handle);
+ KWallet::Backend* getWallet(const TQCString& appid, int handle);
// Generate a new unique handle.
int generateHandle();
- // Invalidate a handle (remove it from the QMap)
+ // Invalidate a handle (remove it from the TQMap)
void invalidateHandle(int handle);
// Emit signals about closing wallets
- void doCloseSignals(int,const QString&);
- void emitFolderUpdated(const QString&, const QString&);
+ void doCloseSignals(int,const TQString&);
+ void emitFolderUpdated(const TQString&, const TQString&);
// Internal - close this wallet.
int closeWallet(KWallet::Backend *w, int handle, bool force);
// Implicitly allow access for this application
- bool implicitAllow(const QString& wallet, const QCString& app);
- bool implicitDeny(const QString& wallet, const QCString& app);
- QCString friendlyDCOPPeerName();
+ bool implicitAllow(const TQString& wallet, const TQCString& app);
+ bool implicitDeny(const TQString& wallet, const TQCString& app);
+ TQCString friendlyDCOPPeerName();
- void doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId);
- int doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal);
+ void doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId);
+ int doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal);
- void setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal );
+ void setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal );
void checkActiveDialog();
- QIntDict<KWallet::Backend> _wallets;
- QMap<QCString,QValueList<int> > _handles;
- QMap<QString,QCString> _passwords;
+ TQIntDict<KWallet::Backend> _wallets;
+ TQMap<TQCString,TQValueList<int> > _handles;
+ TQMap<TQString,TQCString> _passwords;
KDirWatch *_dw;
int _failed;
bool _leaveOpen, _closeIdle, _launchManager, _enabled;
bool _openPrompt, _firstUse, _showingFailureNotify;
int _idleTime;
- QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
+ TQMap<TQString,TQStringList> _implicitAllowMap, _implicitDenyMap;
KTimeout *_timeouts;
- QPtrList<KWalletTransaction> _transactions;
- QGuardedPtr< QWidget > activeDialog;
+ TQPtrList<KWalletTransaction> _transactions;
+ TQGuardedPtr< TQWidget > activeDialog;
};
diff --git a/kio/misc/kwalletd/kwalletwizard.ui.h b/kio/misc/kwalletd/kwalletwizard.ui.h
index 95346355a..a42635e9b 100644
--- a/kio/misc/kwalletd/kwalletwizard.ui.h
+++ b/kio/misc/kwalletd/kwalletwizard.ui.h
@@ -28,7 +28,7 @@ void KWalletWizard::passwordPageUpdate()
_matchLabel->setText(i18n("Passwords do not match."));
}
} else {
- _matchLabel->setText(QString::null);
+ _matchLabel->setText(TQString::null);
}
}
diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp
index 1948d57d4..b1d060f21 100644
--- a/kio/misc/uiserver.cpp
+++ b/kio/misc/uiserver.cpp
@@ -19,11 +19,11 @@
*/
// -*- mode: c++; c-basic-offset: 4 -*-
-#include <qtimer.h>
+#include <tqtimer.h>
-#include <qregexp.h>
-#include <qheader.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqheader.h>
+#include <tqevent.h>
#include <ksqueezedtextlabel.h>
#include <kconfig.h>
@@ -44,11 +44,11 @@
#include <kpopupmenu.h>
#include <kaction.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qheader.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqheader.h>
#include "observer_stub.h"
#include "observer.h" // for static methods only
@@ -95,60 +95,60 @@ class UIServerSystemTray:public KSystemTray
:KSystemTray(uis)
{
KPopupMenu* pop= contextMenu();
- pop->insertItem(i18n("Settings..."), uis, SLOT(slotConfigure()));
- pop->insertItem(i18n("Remove"), uis, SLOT(slotRemoveSystemTrayIcon()));
+ pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure()));
+ pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon()));
setPixmap(loadIcon("filesave"));
//actionCollection()->action("file_quit")->setEnabled(true);
- KStdAction::quit(uis, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(uis, TQT_SLOT(slotQuit()), actionCollection());
}
};
class ProgressConfigDialog:public KDialogBase
{
public:
- ProgressConfigDialog(QWidget* parent);
+ ProgressConfigDialog(TQWidget* parent);
~ProgressConfigDialog() {}
void setChecked(int i, bool on);
bool isChecked(int i) const;
friend class UIServer;
private:
- QCheckBox *m_showSystemTrayCb;
- QCheckBox *m_keepOpenCb;
- QCheckBox *m_toolBarCb;
- QCheckBox *m_statusBarCb;
- QCheckBox *m_headerCb;
- QCheckBox *m_fixedWidthCb;
+ TQCheckBox *m_showSystemTrayCb;
+ TQCheckBox *m_keepOpenCb;
+ TQCheckBox *m_toolBarCb;
+ TQCheckBox *m_statusBarCb;
+ TQCheckBox *m_headerCb;
+ TQCheckBox *m_fixedWidthCb;
KListView *m_columns;
- QCheckListItem *(m_items[ListProgress::TB_MAX]);
+ TQCheckListItem *(m_items[ListProgress::TB_MAX]);
};
-ProgressConfigDialog::ProgressConfigDialog(QWidget *parent)
+ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent)
:KDialogBase(KDialogBase::Plain,i18n("Configure Network Operation Window"),KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
KDialogBase::Ok, parent, "configprog", false)
{
- QVBoxLayout *layout=new QVBoxLayout(plainPage(),spacingHint());
- m_showSystemTrayCb=new QCheckBox(i18n("Show system tray icon"), plainPage());
- m_keepOpenCb=new QCheckBox(i18n("Keep network operation window always open"), plainPage());
- m_headerCb=new QCheckBox(i18n("Show column headers"), plainPage());
- m_toolBarCb=new QCheckBox(i18n("Show toolbar"), plainPage());
- m_statusBarCb=new QCheckBox(i18n("Show statusbar"), plainPage());
- m_fixedWidthCb=new QCheckBox(i18n("Column widths are user adjustable"), plainPage());
- QLabel *label=new QLabel(i18n("Show information:"), plainPage());
+ TQVBoxLayout *layout=new TQVBoxLayout(plainPage(),spacingHint());
+ m_showSystemTrayCb=new TQCheckBox(i18n("Show system tray icon"), plainPage());
+ m_keepOpenCb=new TQCheckBox(i18n("Keep network operation window always open"), plainPage());
+ m_headerCb=new TQCheckBox(i18n("Show column headers"), plainPage());
+ m_toolBarCb=new TQCheckBox(i18n("Show toolbar"), plainPage());
+ m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage());
+ m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage());
+ TQLabel *label=new TQLabel(i18n("Show information:"), plainPage());
m_columns=new KListView(plainPage());
m_columns->addColumn("info");
m_columns->setSorting(-1);
m_columns->header()->hide();
- m_items[ListProgress::TB_ADDRESS] =new QCheckListItem(m_columns, i18n("URL"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_REMAINING_TIME] =new QCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_SPEED] =new QCheckListItem(m_columns, i18n("Speed"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_TOTAL] =new QCheckListItem(m_columns, i18n("Size"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_PROGRESS] =new QCheckListItem(m_columns, i18n("%"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_COUNT] =new QCheckListItem(m_columns, i18n("Count"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_RESUME] =new QCheckListItem(m_columns, i18n("Resume", "Res."), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_LOCAL_FILENAME] =new QCheckListItem(m_columns, i18n("Local Filename"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_OPERATION] =new QCheckListItem(m_columns, i18n("Operation"), QCheckListItem::CheckBox);
+ m_items[ListProgress::TB_ADDRESS] =new TQCheckListItem(m_columns, i18n("URL"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_REMAINING_TIME] =new TQCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_SPEED] =new TQCheckListItem(m_columns, i18n("Speed"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_TOTAL] =new TQCheckListItem(m_columns, i18n("Size"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_PROGRESS] =new TQCheckListItem(m_columns, i18n("%"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_COUNT] =new TQCheckListItem(m_columns, i18n("Count"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_RESUME] =new TQCheckListItem(m_columns, i18n("Resume", "Res."), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_LOCAL_FILENAME] =new TQCheckListItem(m_columns, i18n("Local Filename"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_OPERATION] =new TQCheckListItem(m_columns, i18n("Operation"), TQCheckListItem::CheckBox);
layout->addWidget(m_showSystemTrayCb);
layout->addWidget(m_keepOpenCb);
@@ -174,9 +174,9 @@ bool ProgressConfigDialog::isChecked(int i) const
return m_items[i]->isOn();
}
-ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id,
+ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id,
bool showDefault )
- : QListViewItem( view, after ) {
+ : TQListViewItem( view, after ) {
listProgress = view;
@@ -194,8 +194,8 @@ ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString a
// create dialog, but don't show it
defaultProgress = new KIO::DefaultProgress( false );
defaultProgress->setOnlyClean( true );
- connect ( defaultProgress, SIGNAL( stopped() ), this, SLOT( slotCanceled() ) );
- connect ( &m_showTimer, SIGNAL( timeout() ), this, SLOT(slotShowDefaultProgress()) );
+ connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) );
+ connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) );
if ( showDefault ) {
m_showTimer.start( 500, true );
@@ -251,7 +251,7 @@ void ProgressItem::setProcessedSize( KIO::filesize_t size ) {
void ProgressItem::setProcessedFiles( unsigned long files ) {
m_iProcessedFiles = files;
- QString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles );
+ TQString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles );
setText( ListProgress::TB_COUNT, tmps );
defaultProgress->slotProcessedFiles( 0, m_iProcessedFiles );
@@ -264,16 +264,16 @@ void ProgressItem::setProcessedDirs( unsigned long dirs ) {
void ProgressItem::setPercent( unsigned long percent ) {
- const QString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles );
+ const TQString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles );
setText( ListProgress::TB_PROGRESS, tmps );
defaultProgress->slotPercent( 0, percent );
}
-void ProgressItem::setInfoMessage( const QString & msg ) {
- QString plainTextMsg(msg);
- plainTextMsg.replace( QRegExp( "</?b>" ), QString::null );
- plainTextMsg.replace( QRegExp( "<img.*>" ), QString::null );
+void ProgressItem::setInfoMessage( const TQString & msg ) {
+ TQString plainTextMsg(msg);
+ plainTextMsg.replace( TQRegExp( "</?b>" ), TQString::null );
+ plainTextMsg.replace( TQRegExp( "<img.*>" ), TQString::null );
setText( ListProgress::TB_PROGRESS, plainTextMsg );
defaultProgress->slotInfoMessage( 0, msg );
@@ -283,7 +283,7 @@ void ProgressItem::setSpeed( unsigned long bytes_per_second ) {
m_iSpeed = bytes_per_second;
m_remainingSeconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed );
- QString tmps, tmps2;
+ TQString tmps, tmps2;
if ( m_iSpeed == 0 ) {
tmps = i18n( "Stalled");
tmps2 = tmps;
@@ -341,11 +341,11 @@ void ProgressItem::setTransferring( const KURL& url ) {
defaultProgress->slotTransferring( 0, url );
}
-void ProgressItem::setText(ListProgress::ListProgressFields field, const QString& text)
+void ProgressItem::setText(ListProgress::ListProgressFields field, const TQString& text)
{
if (listProgress->m_lpcc[field].enabled)
{
- QString t=text;
+ TQString t=text;
if ((field==ListProgress::TB_ADDRESS) && (listProgress->m_fixedColumnWidths))
// if (((field==ListProgress::TB_LOCAL_FILENAME) || (field==ListProgress::TB_ADDRESS)) && (listProgress->m_fixedColumnWidths))
{
@@ -354,7 +354,7 @@ void ProgressItem::setText(ListProgress::ListProgressFields field, const QString
listProgress->m_squeezer->setText(t);
t=listProgress->m_squeezer->text();
}
- QListViewItem::setText(listProgress->m_lpcc[field].index,t);
+ TQListViewItem::setText(listProgress->m_lpcc[field].index,t);
}
}
@@ -366,7 +366,7 @@ void ProgressItem::setStating( const KURL& url ) {
defaultProgress->slotStating( 0, url );
}
-void ProgressItem::setMounting( const QString& dev, const QString & point ) {
+void ProgressItem::setMounting( const TQString& dev, const TQString & point ) {
setText( ListProgress::TB_OPERATION, i18n("Mounting") );
setText( ListProgress::TB_ADDRESS, point ); // ?
setText( ListProgress::TB_LOCAL_FILENAME, dev ); // ?
@@ -374,7 +374,7 @@ void ProgressItem::setMounting( const QString& dev, const QString & point ) {
defaultProgress->slotMounting( 0, dev, point );
}
-void ProgressItem::setUnmounting( const QString & point ) {
+void ProgressItem::setUnmounting( const TQString & point ) {
setText( ListProgress::TB_OPERATION, i18n("Unmounting") );
setText( ListProgress::TB_ADDRESS, point ); // ?
setText( ListProgress::TB_LOCAL_FILENAME, "" ); // ?
@@ -384,7 +384,7 @@ void ProgressItem::setUnmounting( const QString & point ) {
void ProgressItem::setCanResume( KIO::filesize_t offset ) {
/*
- QString tmps;
+ TQString tmps;
// set canResume
if ( _resume ) {
tmps = i18n("Yes");
@@ -454,7 +454,7 @@ void ProgressItem::updateVisibility()
//-----------------------------------------------------------------------------
-ListProgress::ListProgress (QWidget *parent, const char *name)
+ListProgress::ListProgress (TQWidget *parent, const char *name)
: KListView (parent, name)
{
@@ -479,7 +479,7 @@ ListProgress::ListProgress (QWidget *parent, const char *name)
//used for squeezing the text in local file name and url
m_squeezer=new KSqueezedTextLabel(this);
m_squeezer->hide();
- connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(columnWidthChanged(int)));
+ connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(columnWidthChanged(int)));
}
@@ -532,11 +532,11 @@ void ListProgress::readSettings() {
// read listview geometry properties
config.setGroup( "ProgressList" );
for ( int i = 0; i < TB_MAX; i++ ) {
- QString tmps="Col"+QString::number(i);
+ TQString tmps="Col"+TQString::number(i);
m_lpcc[i].width=config.readNumEntry( tmps, 0);
if (m_lpcc[i].width==0) m_lpcc[i].width=defaultColumnWidth[i];
- tmps="Enabled"+QString::number(i);
+ tmps="Enabled"+TQString::number(i);
m_lpcc[i].enabled=config.readBoolEntry(tmps,true);
}
m_showHeader=config.readBoolEntry("ShowListHeader",true);
@@ -550,7 +550,7 @@ void ListProgress::columnWidthChanged(int column)
//resqueeze if necessary
if ((m_lpcc[TB_ADDRESS].enabled) && (column==m_lpcc[TB_ADDRESS].index))
{
- for (QListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling())
+ for (TQListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling())
{
ProgressItem *pi=(ProgressItem*)lvi;
pi->setText(TB_ADDRESS,pi->fullLengthAddress());
@@ -566,12 +566,12 @@ void ListProgress::writeSettings() {
config.setGroup( "ProgressList" );
for ( int i = 0; i < TB_MAX; i++ ) {
if (!m_lpcc[i].enabled) {
- QString tmps= "Enabled" + QString::number(i);
+ TQString tmps= "Enabled" + TQString::number(i);
config.writeEntry( tmps, false );
continue;
}
m_lpcc[i].width=columnWidth(m_lpcc[i].index);
- QString tmps="Col"+QString::number(i);
+ TQString tmps="Col"+TQString::number(i);
config.writeEntry( tmps, m_lpcc[i].width);
}
config.writeEntry("ShowListHeader", m_showHeader);
@@ -596,11 +596,11 @@ UIServer::UIServer()
// setup toolbar
toolBar()->insertButton("editdelete", TOOL_CANCEL,
- SIGNAL(clicked()), this,
- SLOT(slotCancelCurrent()), FALSE, i18n("Cancel"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotCancelCurrent()), FALSE, i18n("Cancel"));
toolBar()->insertButton("configure", TOOL_CONFIGURE,
- SIGNAL(clicked()), this,
- SLOT(slotConfigure()), true, i18n("Settings..."));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotConfigure()), true, i18n("Settings..."));
toolBar()->setBarPos( KToolBar::Left );
@@ -615,18 +615,18 @@ UIServer::UIServer()
setCentralWidget( listProgress );
- connect( listProgress, SIGNAL( selectionChanged() ),
- SLOT( slotSelection() ) );
- connect( listProgress, SIGNAL( executed( QListViewItem* ) ),
- SLOT( slotToggleDefaultProgress( QListViewItem* ) ) );
- connect( listProgress, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &)),
- SLOT(slotShowContextMenu(KListView*, QListViewItem *, const QPoint&)));
+ connect( listProgress, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelection() ) );
+ connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) );
+ connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)),
+ TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&)));
// setup animation timer
- updateTimer = new QTimer( this );
- connect( updateTimer, SIGNAL( timeout() ),
- SLOT( slotUpdate() ) );
+ updateTimer = new TQTimer( this );
+ connect( updateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotUpdate() ) );
m_bUpdateNewJob=false;
setCaption(i18n("Progress Dialog"));
@@ -671,20 +671,20 @@ void UIServer::applySettings()
toolBar()->show();
}
-void UIServer::slotShowContextMenu(KListView*, QListViewItem* item, const QPoint& pos)
+void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos)
{
if (m_contextMenu==0)
{
- m_contextMenu=new QPopupMenu(this);
- m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, SLOT(slotCancelCurrent()));
-// m_contextMenu->insertItem(i18n("Toggle Progress"), this, SLOT(slotToggleDefaultProgress()));
+ m_contextMenu=new TQPopupMenu(this);
+ m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQT_SLOT(slotCancelCurrent()));
+// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQT_SLOT(slotToggleDefaultProgress()));
m_contextMenu->insertSeparator();
- m_contextMenu->insertItem(i18n("Settings..."), this, SLOT(slotConfigure()));
+ m_contextMenu->insertItem(i18n("Settings..."), this, TQT_SLOT(slotConfigure()));
}
if ( item )
item->setSelected( true );
bool enabled = false;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
enabled = true;
@@ -708,9 +708,9 @@ void UIServer::slotConfigure()
if (m_configDialog==0)
{
m_configDialog=new ProgressConfigDialog(0);
-// connect(m_configDialog,SIGNAL(cancelClicked()), this, SLOT(slotCancelConfig()));
- connect(m_configDialog,SIGNAL(okClicked()), this, SLOT(slotApplyConfig()));
- connect(m_configDialog,SIGNAL(applyClicked()), this, SLOT(slotApplyConfig()));
+// connect(m_configDialog,TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancelConfig()));
+ connect(m_configDialog,TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotApplyConfig()));
+ connect(m_configDialog,TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotApplyConfig()));
}
m_configDialog->m_showSystemTrayCb->setChecked(m_showSystemTray);
m_configDialog->m_keepOpenCb->setChecked(m_keepListOpen);
@@ -743,12 +743,12 @@ void UIServer::slotApplyConfig()
listProgress->writeSettings();
}
-int UIServer::newJob( QCString observerAppId, bool showProgress )
+int UIServer::newJob( TQCString observerAppId, bool showProgress )
{
kdDebug(7024) << "UIServer::newJob observerAppId=" << observerAppId << ". "
<< "Giving id=" << s_jobId+1 << endl;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->itemBelow() == 0L ) { // this will find the end of list
break;
@@ -761,8 +761,8 @@ int UIServer::newJob( QCString observerAppId, bool showProgress )
bool show = !m_bShowList && showProgress;
ProgressItem *item = new ProgressItem( listProgress, it.current(), observerAppId, s_jobId, show );
- connect( item, SIGNAL( jobCanceled( ProgressItem* ) ),
- SLOT( slotJobCanceled( ProgressItem* ) ) );
+ connect( item, TQT_SIGNAL( jobCanceled( ProgressItem* ) ),
+ TQT_SLOT( slotJobCanceled( ProgressItem* ) ) );
if ( m_bShowList && !updateTimer->isActive() )
updateTimer->start( 1000 );
@@ -775,7 +775,7 @@ int UIServer::newJob( QCString observerAppId, bool showProgress )
ProgressItem* UIServer::findItem( int id )
{
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
ProgressItem *item;
@@ -913,7 +913,7 @@ void UIServer::speed( int id, unsigned long bytes_per_second )
}
}
-void UIServer::infoMessage( int id, const QString & msg )
+void UIServer::infoMessage( int id, const TQString & msg )
{
//kdDebug(7024) << "UIServer::infoMessage " << id << " " << msg << endl;
@@ -996,7 +996,7 @@ void UIServer::stating( int id, KURL url )
}
}
-void UIServer::mounting( int id, QString dev, QString point )
+void UIServer::mounting( int id, TQString dev, TQString point )
{
kdDebug(7024) << "UIServer::mounting " << id << " " << dev << " " << point << endl;
@@ -1006,7 +1006,7 @@ void UIServer::mounting( int id, QString dev, QString point )
}
}
-void UIServer::unmounting( int id, QString point )
+void UIServer::unmounting( int id, TQString point )
{
kdDebug(7024) << "UIServer::unmounting " << id << " " << point << endl;
@@ -1016,7 +1016,7 @@ void UIServer::unmounting( int id, QString point )
}
}
-void UIServer::killJob( QCString observerAppId, int progressId )
+void UIServer::killJob( TQCString observerAppId, int progressId )
{
// Contact the object "KIO::Observer" in the application <appId>
Observer_stub observer( observerAppId, "KIO::Observer" );
@@ -1044,7 +1044,7 @@ void UIServer::slotQuit()
void UIServer::slotUpdate() {
// don't do anything if we don't have any inserted progress item
// or if they're all hidden
- QListViewItemIterator lvit( listProgress );
+ TQListViewItemIterator lvit( listProgress );
bool visible = false;
for ( ; lvit.current(); ++lvit )
if ( ((ProgressItem*)lvit.current())->isVisible() ) {
@@ -1078,7 +1078,7 @@ void UIServer::slotUpdate() {
ProgressItem *item;
// count totals for statusbar
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
item = (ProgressItem*) it.current();
@@ -1107,7 +1107,7 @@ void UIServer::slotUpdate() {
void UIServer::setListMode( bool list )
{
m_bShowList = list;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
// When going to list mode -> hide all progress dialogs
// When going back to separate dialogs -> show them all
@@ -1126,13 +1126,13 @@ void UIServer::setListMode( bool list )
}
}
-void UIServer::slotToggleDefaultProgress( QListViewItem *item ) {
+void UIServer::slotToggleDefaultProgress( TQListViewItem *item ) {
((ProgressItem*) item )->slotToggleDefaultProgress();
}
void UIServer::slotSelection() {
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
@@ -1145,7 +1145,7 @@ void UIServer::slotSelection() {
// This code is deprecated, slaves go to Observer::openPassDlg now,
// but this is kept for compat (DCOP calls to kio_uiserver).
-QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
+TQByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
{
kdDebug(7024) << "UIServer::openPassDlg: User= " << info.username
<< ", Msg= " << info.prompt << endl;
@@ -1154,9 +1154,9 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
&inf.keepPassword, inf.prompt,
inf.readOnly, inf.caption,
inf.comment, inf.commentLabel );
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
- if ( result == QDialog::Accepted )
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
+ if ( result == TQDialog::Accepted )
inf.setModified( true );
else
inf.setModified( false );
@@ -1164,28 +1164,28 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
return data;
}
-int UIServer::messageBox( int progressId, int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo )
+int UIServer::messageBox( int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo )
{
return Observer::messageBox( progressId, type, text, caption, buttonYes, buttonNo );
}
-void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta)
+void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta)
{
return showSSLInfoDialog(url,meta,0);
}
-void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta, int mainwindow)
+void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta, int mainwindow)
{
KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true);
KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit());
if (x) {
// Set the chain back onto the certificate
- QStringList cl =
- QStringList::split(QString("\n"), meta["ssl_peer_chain"]);
- QPtrList<KSSLCertificate> ncl;
+ TQStringList cl =
+ TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]);
+ TQPtrList<KSSLCertificate> ncl;
ncl.setAutoDelete(true);
- for (QStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
+ for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit());
if (y) ncl.append(y);
}
@@ -1195,7 +1195,7 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta,
kdDebug(7024) << "ssl_cert_errors=" << meta["ssl_cert_errors"] << endl;
kid->setCertState(meta["ssl_cert_errors"]);
- QString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"];
+ TQString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"];
kid->setup( x,
ip,
url, // the URL
@@ -1220,12 +1220,12 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta,
// Don't delete kid!!
}
-KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList)
+KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList)
{
return showSSLCertDialog( host, certList, 0 );
}
-KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow)
+KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow)
{
KSSLCertDlgRet rc;
rc.ok = false;
@@ -1250,9 +1250,9 @@ KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringLis
}
-QByteArray UIServer::open_RenameDlg( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+TQByteArray UIServer::open_RenameDlg( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int mode,
unsigned long sizeSrc,
unsigned long sizeDest,
@@ -1265,9 +1265,9 @@ QByteArray UIServer::open_RenameDlg( int id,
ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); }
-QByteArray UIServer::open_RenameDlg64( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+TQByteArray UIServer::open_RenameDlg64( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -1281,7 +1281,7 @@ QByteArray UIServer::open_RenameDlg64( int id,
ProgressItem *item = findItem( id );
if ( item )
setItemVisible( item, false );
- QString newDest;
+ TQString newDest;
kdDebug(7024) << "Calling KIO::open_RenameDlg" << endl;
KIO::RenameDlg_Result result = KIO::open_RenameDlg( caption, src, dest,
(KIO::RenameDlg_Mode) mode, newDest,
@@ -1289,8 +1289,8 @@ QByteArray UIServer::open_RenameDlg64( int id,
(time_t)ctimeSrc, (time_t)ctimeDest,
(time_t)mtimeSrc, (time_t)mtimeDest );
kdDebug(7024) << "KIO::open_RenameDlg done" << endl;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << Q_UINT8(result) << newDest;
if ( item && result != KIO::R_CANCEL )
setItemVisible( item, true );
@@ -1299,7 +1299,7 @@ QByteArray UIServer::open_RenameDlg64( int id,
int UIServer::open_SkipDlg( int id,
int /*bool*/ multi,
- const QString & error_text )
+ const TQString & error_text )
{
// Hide existing dialog box if any
ProgressItem *item = findItem( id );
@@ -1339,7 +1339,7 @@ void UIServer::writeSettings() {
void UIServer::slotCancelCurrent() {
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
ProgressItem *item;
// kill selected jobs
@@ -1353,7 +1353,7 @@ void UIServer::slotCancelCurrent() {
}
}
-void UIServer::resizeEvent(QResizeEvent* e)
+void UIServer::resizeEvent(TQResizeEvent* e)
{
KMainWindow::resizeEvent(e);
writeSettings();
diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h
index e676bb7a0..73040f186 100644
--- a/kio/misc/uiserver.h
+++ b/kio/misc/uiserver.h
@@ -19,9 +19,9 @@
#ifndef __kio_uiserver_h__
#define __kio_uiserver_h__
-#include <qintdict.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include <dcopobject.h>
#include <kio/global.h>
@@ -45,7 +45,7 @@ namespace KIO {
struct ListProgressColumnConfig
{
- QString title;
+ TQString title;
int index;
int width;
bool enabled;
@@ -61,7 +61,7 @@ class KIO_EXPORT ListProgress : public KListView {
public:
- ListProgress (QWidget *parent = 0, const char *name = 0 );
+ ListProgress (TQWidget *parent = 0, const char *name = 0 );
virtual ~ListProgress();
@@ -103,16 +103,16 @@ protected:
* One item in the ListProgress
* @internal
*/
-class KIO_EXPORT ProgressItem : public QObject, public QListViewItem {
+class KIO_EXPORT ProgressItem : public TQObject, public TQListViewItem {
Q_OBJECT
public:
- ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id,
+ ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id,
bool showDefault = true );
~ProgressItem();
- QCString appId() { return m_sAppId; }
+ TQCString appId() { return m_sAppId; }
int jobId() { return m_iJobId; }
bool keepOpen() const;
@@ -132,7 +132,7 @@ public:
void setPercent( unsigned long percent );
void setSpeed( unsigned long bytes_per_second );
- void setInfoMessage( const QString & msg );
+ void setInfoMessage( const TQString & msg );
void setCopying( const KURL& from, const KURL& to );
void setMoving( const KURL& from, const KURL& to );
@@ -140,8 +140,8 @@ public:
void setTransferring( const KURL& url );
void setCreatingDir( const KURL& dir );
void setStating( const KURL& url );
- void setMounting( const QString & dev, const QString & point );
- void setUnmounting( const QString & point );
+ void setMounting( const TQString & dev, const TQString & point );
+ void setUnmounting( const TQString & point );
void setCanResume( KIO::filesize_t offset );
@@ -152,8 +152,8 @@ public:
unsigned long speed() { return m_iSpeed; }
unsigned int remainingSeconds() { return m_remainingSeconds; }
- const QString& fullLengthAddress() const {return m_fullLengthAddress;}
- void setText(ListProgress::ListProgressFields field, const QString& text);
+ const TQString& fullLengthAddress() const {return m_fullLengthAddress;}
+ void setText(ListProgress::ListProgressFields field, const TQString& text);
public slots:
void slotShowDefaultProgress();
void slotToggleDefaultProgress();
@@ -168,7 +168,7 @@ protected:
void updateVisibility();
// ids that uniquely identify this progress item
- QCString m_sAppId;
+ TQCString m_sAppId;
int m_iJobId;
// whether shown or not (it is hidden if a rename dialog pops up for the same job)
@@ -188,8 +188,8 @@ protected:
unsigned long m_iProcessedFiles;
unsigned long m_iSpeed;
int m_remainingSeconds;
- QTimer m_showTimer;
- QString m_fullLengthAddress;
+ TQTimer m_showTimer;
+ TQString m_fullLengthAddress;
};
class QResizeEvent;
@@ -236,7 +236,7 @@ k_dcop:
* other things, like SSL dialogs.
* @return the job id
*/
- int newJob( QCString appId, bool showProgress );
+ int newJob( TQCString appId, bool showProgress );
ASYNC jobFinished( int id );
@@ -252,7 +252,7 @@ k_dcop:
ASYNC percent( int id, unsigned long ipercent );
ASYNC speed( int id, unsigned long bytes_per_second );
- ASYNC infoMessage( int id, const QString & msg );
+ ASYNC infoMessage( int id, const TQString & msg );
ASYNC copying( int id, KURL from, KURL to );
ASYNC moving( int id, KURL from, KURL to );
@@ -261,8 +261,8 @@ k_dcop:
ASYNC creatingDir( int id, KURL dir );
ASYNC stating( int id, KURL url );
- ASYNC mounting( int id, QString dev, QString point );
- ASYNC unmounting( int id, QString point );
+ ASYNC mounting( int id, TQString dev, TQString point );
+ ASYNC unmounting( int id, TQString point );
ASYNC canResume( int id, unsigned long offset );
ASYNC canResume64( int id, KIO::filesize_t offset );
@@ -272,7 +272,7 @@ k_dcop:
* Use KIO::PasswordDialog::getNameAndPassword instead.
* To be removed in KDE 4.0.
*/
- QByteArray openPassDlg( const KIO::AuthInfo &info );
+ TQByteArray openPassDlg( const KIO::AuthInfo &info );
/**
* Popup a message box.
@@ -291,17 +291,17 @@ k_dcop:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( int id, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ int messageBox( int id, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* @deprecated (it blocks other apps).
* Use KIO::open_RenameDlg instead.
* To be removed in KDE 4.0.
*/
- QByteArray open_RenameDlg64( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+ TQByteArray open_RenameDlg64( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int /* KIO::RenameDlg_Mode */ mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -315,9 +315,9 @@ k_dcop:
* Use KIO::open_RenameDlg instead.
* To be removed in KDE 4.0.
*/
- QByteArray open_RenameDlg( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+ TQByteArray open_RenameDlg( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int /* KIO::RenameDlg_Mode */ mode,
unsigned long sizeSrc,
unsigned long sizeDest,
@@ -334,7 +334,7 @@ k_dcop:
*/
int open_SkipDlg( int id,
int /*bool*/ multi,
- const QString & error_text );
+ const TQString & error_text );
/**
* Switch to or from list mode - called by the kcontrol module
@@ -350,22 +350,22 @@ k_dcop:
/**
* Show a SSL Information Dialog
*/
- void showSSLInfoDialog(const QString &url, const KIO::MetaData &data, int mainwindow);
+ void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data, int mainwindow);
/**
* @deprecated
*/
- void showSSLInfoDialog(const QString &url, const KIO::MetaData &data);
+ void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data);
/*
* Show an SSL Certificate Selection Dialog
*/
- KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow);
+ KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow);
/*
* @deprecated
*/
- KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList);
+ KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList);
public slots:
void slotConfigure();
@@ -377,34 +377,34 @@ protected slots:
void slotCancelCurrent();
- void slotToggleDefaultProgress( QListViewItem * );
+ void slotToggleDefaultProgress( TQListViewItem * );
void slotSelection();
void slotJobCanceled( ProgressItem * );
void slotApplyConfig();
- void slotShowContextMenu(KListView*, QListViewItem *item, const QPoint& pos);
+ void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos);
protected:
ProgressItem* findItem( int id );
- virtual void resizeEvent(QResizeEvent* e);
+ virtual void resizeEvent(TQResizeEvent* e);
virtual bool queryClose();
void setItemVisible( ProgressItem * item, bool visible );
- QTimer* updateTimer;
+ TQTimer* updateTimer;
ListProgress* listProgress;
KToolBar::BarPosition toolbarPos;
- QString properties;
+ TQString properties;
void applySettings();
void readSettings();
void writeSettings();
private:
- void killJob( QCString observerAppId, int progressId );
+ void killJob( TQCString observerAppId, int progressId );
int m_initWidth;
int m_initHeight;
@@ -419,7 +419,7 @@ private:
// true if there's a new job that hasn't been shown yet.
bool m_bUpdateNewJob;
ProgressConfigDialog *m_configDialog;
- QPopupMenu* m_contextMenu;
+ TQPopupMenu* m_contextMenu;
UIServerSystemTray *m_systemTray;
static int s_jobId;
diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp
index fa867291c..0c8470a61 100644
--- a/kio/tests/dataprotocoltest.cpp
+++ b/kio/tests/dataprotocoltest.cpp
@@ -18,8 +18,8 @@
#include <kio/global.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <iostream.h>
@@ -35,7 +35,7 @@ public:
virtual void get(const KURL &) = 0;
virtual void mimetype(const KURL &) = 0;
- void mimeType(const QString &type) {
+ void mimeType(const TQString &type) {
testStrings("MIME Type: ",mime_type_expected,type);
}
@@ -43,10 +43,10 @@ public:
// cout << "content size: " << bytes << " bytes" << endl;
}
- void setMetaData(const QString &key, const QString &value) {
+ void setMetaData(const TQString &key, const TQString &value) {
// meta_data[key] = value;
// cout << "§ " << key << " = " << value << endl;
- QString prefix = "Metadata[\""+key+"\"]: ";
+ TQString prefix = "Metadata[\""+key+"\"]: ";
KIO::MetaData::Iterator it = attributes_expected.find(key);
if (it != attributes_expected.end()) {
testStrings(prefix,it.data(),value);
@@ -69,7 +69,7 @@ public:
}
}
- void data(const QByteArray &a) {
+ void data(const TQByteArray &a) {
if (a.isEmpty())
/* cout << "<no more data>" << endl*/;
else {
@@ -88,14 +88,14 @@ public:
private:
int testcaseno; // number of testcase
bool failure; // true if any testcase failed
- QMap<int,bool> failed_testcases;
+ TQMap<int,bool> failed_testcases;
// -- testcase related members
- QString mime_type_expected; // expected mime type
+ TQString mime_type_expected; // expected mime type
/** contains all attributes and values the testcase has to set */
KIO::MetaData attributes_expected;
/** contains the content as it is expected to be returned */
- QByteArray content_expected;
+ TQByteArray content_expected;
int passed; // # of passed tests
int total; // # of total tests
@@ -106,8 +106,8 @@ private:
* @param s string to compare to template
* @param casesensitive true if case sensitive compare (currently not used)
*/
- void testStrings(const QString &prefix, const QString &templat,
- const QString &s, bool /*casesensitive*/ = true) {
+ void testStrings(const TQString &prefix, const TQString &templat,
+ const TQString &s, bool /*casesensitive*/ = true) {
if (templat == s)
passed++;
else {
@@ -143,7 +143,7 @@ public:
/**
* sets the mime type that this testcase is expected to return
*/
- void setExpectedMimeType(const QString &mime_type) {
+ void setExpectedMimeType(const TQString &mime_type) {
mime_type_expected = mime_type;
}
@@ -157,7 +157,7 @@ public:
/**
* sets content as expected to be delivered by the testcase.
*/
- void setExpectedContent(const QByteArray &content) {
+ void setExpectedContent(const TQByteArray &content) {
content_expected = content;
}
@@ -177,7 +177,7 @@ public:
void endTestrun() {
if (failure) {
- QMap<int,bool>::ConstIterator it = failed_testcases.begin();
+ TQMap<int,bool>::ConstIterator it = failed_testcases.begin();
for (; it != failed_testcases.end(); ++it) {
cout << "Testcase " << it.key() << " failed" << endl;
}
@@ -246,7 +246,7 @@ const char * const url;
// == charset tests
// -------------------- string
const QChar
-const QChar * const charset_urls[] = {
+const TQChar * const charset_urls[] = {
#endif
int main(int /*argc*/,char* /*argv*/[]) {
@@ -270,7 +270,7 @@ int main(int /*argc*/,char* /*argv*/[]) {
if (!has_charset) exp_attrs["charset"] = "us-ascii";
kio_data.setExpectedAttributes(exp_attrs);
- QByteArray exp_content;
+ TQByteArray exp_content;
uint exp_content_len = strlen(testcases[i].exp_content);
exp_content.setRawData(testcases[i].exp_content,exp_content_len);
kio_data.setExpectedContent(exp_content);
diff --git a/kio/tests/dummymeta.cpp b/kio/tests/dummymeta.cpp
index be8bca2ad..f0d1584c9 100644
--- a/kio/tests/dummymeta.cpp
+++ b/kio/tests/dummymeta.cpp
@@ -4,8 +4,8 @@
K_EXPORT_COMPONENT_FACTORY( dummymeta, KGenericFactory<DummyMeta> )
-DummyMeta::DummyMeta( QObject *parent, const char *name,
- const QStringList &preferredItems )
+DummyMeta::DummyMeta( TQObject *parent, const char *name,
+ const TQStringList &preferredItems )
: KFilePlugin( parent, name, preferredItems )
{
qDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count());
diff --git a/kio/tests/dummymeta.h b/kio/tests/dummymeta.h
index 5eb51402c..053c48ecb 100644
--- a/kio/tests/dummymeta.h
+++ b/kio/tests/dummymeta.h
@@ -10,7 +10,7 @@ class DummyMeta : public KFilePlugin
Q_OBJECT
public:
- DummyMeta( QObject *parent, const char *name, const QStringList &args );
+ DummyMeta( TQObject *parent, const char *name, const TQStringList &args );
~DummyMeta() {}
virtual bool readInfo( KFileMetaInfo::Internal& info );
diff --git a/kio/tests/getalltest.cpp b/kio/tests/getalltest.cpp
index eab0931fe..58c8d5a3f 100644
--- a/kio/tests/getalltest.cpp
+++ b/kio/tests/getalltest.cpp
@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
kdDebug() << "All services" << endl;
KService::List services = KService::allServices();
kdDebug() << "got " << services.count() << " services" << endl;
- QValueListIterator<KService::Ptr> s = services.begin();
+ TQValueListIterator<KService::Ptr> s = services.begin();
for ( ; s != services.end() ; ++s )
{
kdDebug() << (*s)->name() << " " << (*s)->desktopEntryPath() << endl;
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
kdDebug() << "All mimeTypes" << endl;
KMimeType::List mimeTypes = KMimeType::allMimeTypes();
kdDebug() << "got " << mimeTypes.count() << " mimeTypes" << endl;
- QValueListIterator<KMimeType::Ptr> m = mimeTypes.begin();
+ TQValueListIterator<KMimeType::Ptr> m = mimeTypes.begin();
for ( ; m != mimeTypes.end() ; ++m )
{
kdDebug() << (*m)->name() << endl;
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
kdDebug() << "All service types" << endl;
KServiceType::List list = KServiceType::allServiceTypes();
kdDebug() << "got " << list.count() << " service types" << endl;
- QValueListIterator<KServiceType::Ptr> st = list.begin();
+ TQValueListIterator<KServiceType::Ptr> st = list.begin();
for ( ; st != list.end() ; ++st )
{
kdDebug() << (*st)->name() << endl;
diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp
index 0f6b426a5..9fe4b4c49 100644
--- a/kio/tests/jobtest.cpp
+++ b/kio/tests/jobtest.cpp
@@ -29,10 +29,10 @@
#include <kcmdlineargs.h>
#include <kprotocolinfo.h>
-#include <qfileinfo.h>
-#include <qeventloop.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
+#include <tqeventloop.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <stdio.h>
#include <stdlib.h>
@@ -46,12 +46,12 @@
// The code comes partly from kdebase/kioslave/trash/testtrash.cpp
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -76,12 +76,12 @@ int main(int argc, char *argv[])
return 0; // success. The exit(1) in check() is what happens in case of failure.
}
-QString JobTest::homeTmpDir() const
+TQString JobTest::homeTmpDir() const
{
- return QDir::homeDirPath() + "/.kde/jobtest/";
+ return TQDir::homeDirPath() + "/.kde/jobtest/";
}
-QString JobTest::otherTmpDir() const
+TQString JobTest::otherTmpDir() const
{
// This one needs to be on another partition
return "/tmp/jobtest/";
@@ -92,16 +92,16 @@ KURL JobTest::systemTmpDir() const
return "system:/home/.kde/jobtest-system/";
}
-QString JobTest::realSystemPath() const
+TQString JobTest::realSystemPath() const
{
- return QDir::homeDirPath() + "/.kde/jobtest-system/";
+ return TQDir::homeDirPath() + "/.kde/jobtest-system/";
}
void JobTest::setup()
{
// Start with a clean base dir
cleanup();
- QDir dir; // TT: why not a static method?
+ TQDir dir; // TT: why not a static method?
bool ok = dir.mkdir( homeTmpDir() );
if ( !ok )
kdFatal() << "Couldn't create " << homeTmpDir() << endl;
@@ -140,7 +140,7 @@ void JobTest::cleanup()
KIO::NetAccess::del( systemTmpDir(), 0 );
}
-static void setTimeStamp( const QString& path )
+static void setTimeStamp( const TQString& path )
{
#ifdef Q_OS_UNIX
// Put timestamp in the past so that we can check that the
@@ -150,14 +150,14 @@ static void setTimeStamp( const QString& path )
struct utimbuf utbuf;
utbuf.actime = tp.tv_sec - 30; // 30 seconds ago
utbuf.modtime = tp.tv_sec - 60; // 60 second ago
- utime( QFile::encodeName( path ), &utbuf );
+ utime( TQFile::encodeName( path ), &utbuf );
qDebug( "Time changed for %s", path.latin1() );
#endif
}
-static void createTestFile( const QString& path )
+static void createTestFile( const TQString& path )
{
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_WriteOnly ) )
kdFatal() << "Can't create " << path << endl;
f.writeBlock( "Hello world", 11 );
@@ -165,20 +165,20 @@ static void createTestFile( const QString& path )
setTimeStamp( path );
}
-static void createTestSymlink( const QString& path )
+static void createTestSymlink( const TQString& path )
{
// Create symlink if it doesn't exist yet
KDE_struct_stat buf;
- if ( KDE_lstat( QFile::encodeName( path ), &buf ) != 0 ) {
- bool ok = symlink( "/IDontExist", QFile::encodeName( path ) ) == 0; // broken symlink
+ if ( KDE_lstat( TQFile::encodeName( path ), &buf ) != 0 ) {
+ bool ok = symlink( "/IDontExist", TQFile::encodeName( path ) ) == 0; // broken symlink
if ( !ok )
kdFatal() << "couldn't create symlink: " << strerror( errno ) << endl;
}
}
-static void createTestDirectory( const QString& path )
+static void createTestDirectory( const TQString& path )
{
- QDir dir;
+ TQDir dir;
bool ok = dir.mkdir( path );
if ( !ok && !dir.exists() )
kdFatal() << "couldn't create " << path << endl;
@@ -190,17 +190,17 @@ static void createTestDirectory( const QString& path )
void JobTest::get()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
createTestFile( filePath );
KURL u; u.setPath( filePath );
m_result = -1;
KIO::StoredTransferJob* job = KIO::storedGet( u );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotGetResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotGetResult( KIO::Job* ) ) );
kapp->eventLoop()->enterLoop();
assert( m_result == 0 ); // no error
assert( m_data.size() == 11 );
- assert( QCString( m_data ) == "Hello world" );
+ assert( TQCString( m_data ) == "Hello world" );
}
void JobTest::slotGetResult( KIO::Job* job )
@@ -212,7 +212,7 @@ void JobTest::slotGetResult( KIO::Job* job )
////
-void JobTest::copyLocalFile( const QString& src, const QString& dest )
+void JobTest::copyLocalFile( const TQString& src, const TQString& dest )
{
KURL u;
u.setPath( src );
@@ -222,45 +222,45 @@ void JobTest::copyLocalFile( const QString& src, const QString& dest )
// copy the file with file_copy
bool ok = KIO::NetAccess::file_copy( u, d );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
// Note: this only works because of copy() in kio_file.
// The datapump solution ignores mtime, the app has to call FileCopyJob::setModificationTime()
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
// cleanup and retry with KIO::copy()
- QFile::remove( dest );
+ TQFile::remove( dest );
ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
}
-void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int flags )
+void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, int flags )
{
- assert( QFileInfo( src ).isDir() );
- assert( QFileInfo( src + "/testfile" ).isFile() );
+ assert( TQFileInfo( src ).isDir() );
+ assert( TQFileInfo( src + "/testfile" ).isFile() );
KURL u;
u.setPath( src );
- QString dest( _dest );
+ TQString dest( _dest );
KURL d;
d.setPath( dest );
if ( flags & AlreadyExists )
- assert( QFile::exists( dest ) );
+ assert( TQFile::exists( dest ) );
else
- assert( !QFile::exists( dest ) );
+ assert( !TQFile::exists( dest ) );
bool ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
@@ -270,14 +270,14 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int
//kdDebug() << "Expecting dest=" << dest << endl;
}
- assert( QFile::exists( dest ) );
- assert( QFileInfo( dest ).isDir() );
- assert( QFileInfo( dest + "/testfile" ).isFile() );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFileInfo( dest ).isDir() );
+ assert( TQFileInfo( dest + "/testfile" ).isFile() );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
}
@@ -285,8 +285,8 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int
void JobTest::copyFileToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = homeTmpDir() + "fileFromHome_copied";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = homeTmpDir() + "fileFromHome_copied";
createTestFile( filePath );
copyLocalFile( filePath, dest );
}
@@ -294,8 +294,8 @@ void JobTest::copyFileToSamePartition()
void JobTest::copyDirectoryToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_copied";
createTestDirectory( src );
copyLocalDirectory( src, dest );
}
@@ -305,8 +305,8 @@ void JobTest::copyDirectoryToExistingDirectory()
kdDebug() << k_funcinfo << endl;
// just the same as copyDirectoryToSamePartition, but it means that
// this time dest exists.
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_copied";
createTestDirectory( src );
copyLocalDirectory( src, dest, AlreadyExists );
}
@@ -314,8 +314,8 @@ void JobTest::copyDirectoryToExistingDirectory()
void JobTest::copyFileToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = otherTmpDir() + "fileFromHome_copied";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = otherTmpDir() + "fileFromHome_copied";
createTestFile( filePath );
copyLocalFile( filePath, dest );
}
@@ -323,18 +323,18 @@ void JobTest::copyFileToOtherPartition()
void JobTest::copyDirectoryToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = otherTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = otherTmpDir() + "dirFromHome_copied";
// src is already created by copyDirectoryToSamePartition()
// so this is just in case someone calls this method only
- if ( !QFile::exists( src ) )
+ if ( !TQFile::exists( src ) )
createTestDirectory( src );
copyLocalDirectory( src, dest );
}
-void JobTest::moveLocalFile( const QString& src, const QString& dest )
+void JobTest::moveLocalFile( const TQString& src, const TQString& dest )
{
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( src ) );
KURL u;
u.setPath( src );
KURL d;
@@ -343,20 +343,20 @@ void JobTest::moveLocalFile( const QString& src, const QString& dest )
// move the file with file_move
bool ok = KIO::NetAccess::file_move( u, d );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert( TQFile::exists( dest ) );
+ assert( !TQFile::exists( src ) ); // not there anymore
// move it back with KIO::move()
ok = KIO::NetAccess::move( d, u, 0 );
assert( ok );
- assert( !QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // it's back
+ assert( !TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // it's back
}
-static void moveLocalSymlink( const QString& src, const QString& dest )
+static void moveLocalSymlink( const TQString& src, const TQString& dest )
{
KDE_struct_stat buf;
- assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 );
+ assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 );
KURL u;
u.setPath( src );
KURL d;
@@ -367,22 +367,22 @@ static void moveLocalSymlink( const QString& src, const QString& dest )
if ( !ok )
kdWarning() << KIO::NetAccess::lastError() << endl;
assert( ok );
- assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) == 0 );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) == 0 );
+ assert( !TQFile::exists( src ) ); // not there anymore
// move it back with KIO::move()
ok = KIO::NetAccess::move( d, u, 0 );
assert( ok );
- assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore
- assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 ); // it's back
+ assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore
+ assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back
}
-void JobTest::moveLocalDirectory( const QString& src, const QString& dest )
+void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest )
{
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isDir() );
- assert( QFileInfo( src + "/testfile" ).isFile() );
- assert( QFileInfo( src + "/testlink" ).isSymLink() );
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isDir() );
+ assert( TQFileInfo( src + "/testfile" ).isFile() );
+ assert( TQFileInfo( src + "/testlink" ).isSymLink() );
KURL u;
u.setPath( src );
KURL d;
@@ -390,19 +390,19 @@ void JobTest::moveLocalDirectory( const QString& src, const QString& dest )
bool ok = KIO::NetAccess::move( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFileInfo( dest ).isDir() );
- assert( QFileInfo( dest + "/testfile" ).isFile() );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert( TQFile::exists( dest ) );
+ assert( TQFileInfo( dest ).isDir() );
+ assert( TQFileInfo( dest + "/testfile" ).isFile() );
+ assert( !TQFile::exists( src ) ); // not there anymore
- assert( QFileInfo( dest + "/testlink" ).isSymLink() );
+ assert( TQFileInfo( dest + "/testlink" ).isSymLink() );
}
void JobTest::moveFileToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = homeTmpDir() + "fileFromHome_moved";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = homeTmpDir() + "fileFromHome_moved";
createTestFile( filePath );
moveLocalFile( filePath, dest );
}
@@ -410,8 +410,8 @@ void JobTest::moveFileToSamePartition()
void JobTest::moveDirectoryToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_moved";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_moved";
createTestDirectory( src );
moveLocalDirectory( src, dest );
}
@@ -419,8 +419,8 @@ void JobTest::moveDirectoryToSamePartition()
void JobTest::moveFileToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = otherTmpDir() + "fileFromHome_moved";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = otherTmpDir() + "fileFromHome_moved";
createTestFile( filePath );
moveLocalFile( filePath, dest );
}
@@ -428,8 +428,8 @@ void JobTest::moveFileToOtherPartition()
void JobTest::moveSymlinkToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "testlink";
- const QString dest = otherTmpDir() + "testlink_moved";
+ const TQString filePath = homeTmpDir() + "testlink";
+ const TQString dest = otherTmpDir() + "testlink_moved";
createTestSymlink( filePath );
moveLocalSymlink( filePath, dest );
}
@@ -437,8 +437,8 @@ void JobTest::moveSymlinkToOtherPartition()
void JobTest::moveDirectoryToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = otherTmpDir() + "dirFromHome_moved";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = otherTmpDir() + "dirFromHome_moved";
createTestDirectory( src );
moveLocalDirectory( src, dest );
}
@@ -446,10 +446,10 @@ void JobTest::moveDirectoryToOtherPartition()
void JobTest::moveFileNoPermissions()
{
kdDebug() << k_funcinfo << endl;
- const QString src = "/etc/passwd";
- const QString dest = homeTmpDir() + "passwd";
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isFile() );
+ const TQString src = "/etc/passwd";
+ const TQString dest = homeTmpDir() + "passwd";
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isFile() );
KURL u;
u.setPath( src );
KURL d;
@@ -457,7 +457,7 @@ void JobTest::moveFileNoPermissions()
KIO::CopyJob* job = KIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
@@ -466,17 +466,17 @@ void JobTest::moveFileNoPermissions()
// there is no destination file created, but in the second case the
// destination file remains.
// In fact we assume /home is a separate partition, in this test, so:
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) );
}
void JobTest::moveDirectoryNoPermissions()
{
kdDebug() << k_funcinfo << endl;
- const QString src = "/etc/init.d";
- const QString dest = homeTmpDir() + "init.d";
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isDir() );
+ const TQString src = "/etc/init.d";
+ const TQString dest = homeTmpDir() + "init.d";
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isDir() );
KURL u;
u.setPath( src );
KURL d;
@@ -484,22 +484,22 @@ void JobTest::moveDirectoryNoPermissions()
KIO::CopyJob* job = KIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
- assert( QFile::exists( dest ) ); // see moveFileNoPermissions
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( dest ) ); // see moveFileNoPermissions
+ assert( TQFile::exists( src ) );
}
void JobTest::listRecursive()
{
- const QString src = homeTmpDir();
+ const TQString src = homeTmpDir();
KURL u;
u.setPath( src );
KIO::ListJob* job = KIO::listRecursive( u );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
m_names.sort();
@@ -514,7 +514,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
{
for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
- QString displayName;
+ TQString displayName;
KURL url;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
@@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
void JobTest::copyFileToSystem()
{
- if ( !KProtocolInfo::isKnownProtocol( QString::fromLatin1( "system" ) ) ) {
+ if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) {
kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl;
return;
}
@@ -540,8 +540,8 @@ void JobTest::copyFileToSystem()
// First test with support for UDS_LOCAL_PATH
copyFileToSystem( true );
- QString dest = realSystemPath() + "fileFromHome_copied";
- QFile::remove( dest );
+ TQString dest = realSystemPath() + "fileFromHome_copied";
+ TQFile::remove( dest );
// Then disable support for UDS_LOCAL_PATH, i.e. test what would
// happen for ftp, smb, http etc.
@@ -554,7 +554,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
extern KIO_EXPORT bool kio_resolve_local_urls;
kio_resolve_local_urls = resolve_local_urls;
- const QString src = homeTmpDir() + "fileFromHome";
+ const TQString src = homeTmpDir() + "fileFromHome";
createTestFile( src );
KURL u;
u.setPath( src );
@@ -565,15 +565,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
// copy the file with file_copy
KIO::FileCopyJob* job = KIO::file_copy( u, d );
- connect( job, SIGNAL(mimetype(KIO::Job*,const QString&)),
- this, SLOT(slotMimetype(KIO::Job*,const QString&)) );
+ connect( job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)),
+ this, TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
- QString dest = realSystemPath() + "fileFromHome_copied";
+ TQString dest = realSystemPath() + "fileFromHome_copied";
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// do NOT check that the timestamp is the same.
@@ -588,15 +588,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
//assert( m_mimetype == "text/plain" );
// cleanup and retry with KIO::copy()
- QFile::remove( dest );
+ TQFile::remove( dest );
ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#79937)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
@@ -604,7 +604,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
kio_resolve_local_urls = true;
}
-void JobTest::slotMimetype(KIO::Job* job, const QString& type)
+void JobTest::slotMimetype(KIO::Job* job, const TQString& type)
{
assert( job );
m_mimetype = type;
diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h
index 9d3d52894..533ffba8c 100644
--- a/kio/tests/jobtest.h
+++ b/kio/tests/jobtest.h
@@ -20,8 +20,8 @@
#ifndef JOBTEST_H
#define JOBTEST_H
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kio/job.h>
class JobTest : public QObject
@@ -56,24 +56,24 @@ public:
private slots:
void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst );
void slotGetResult( KIO::Job* );
- void slotMimetype(KIO::Job*,const QString&);
+ void slotMimetype(KIO::Job*,const TQString&);
private:
- QString homeTmpDir() const;
- QString otherTmpDir() const;
- QString realSystemPath() const;
+ TQString homeTmpDir() const;
+ TQString otherTmpDir() const;
+ TQString realSystemPath() const;
KURL systemTmpDir() const;
enum { AlreadyExists = 1 };
- void copyLocalFile( const QString& src, const QString& dest );
- void copyLocalDirectory( const QString& src, const QString& dest, int flags = 0 );
- void moveLocalFile( const QString& src, const QString& dest );
- void moveLocalDirectory( const QString& src, const QString& dest );
+ void copyLocalFile( const TQString& src, const TQString& dest );
+ void copyLocalDirectory( const TQString& src, const TQString& dest, int flags = 0 );
+ void moveLocalFile( const TQString& src, const TQString& dest );
+ void moveLocalDirectory( const TQString& src, const TQString& dest );
void copyFileToSystem( bool resolve_local_urls );
int m_result;
- QByteArray m_data;
- QStringList m_names;
- QString m_mimetype;
+ TQByteArray m_data;
+ TQStringList m_names;
+ TQString m_mimetype;
};
#endif
diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp
index 7f75dfde6..58ae319b2 100644
--- a/kio/tests/kacltest.cpp
+++ b/kio/tests/kacltest.cpp
@@ -26,22 +26,22 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfileinfo.h>
-#include <qeventloop.h>
+#include <tqfileinfo.h>
+#include <tqeventloop.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include <qdir.h>
+#include <tqdir.h>
// The code comes partly from kdebase/kioslave/trash/testtrash.cpp
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -53,7 +53,7 @@ static bool check(const QString& txt, QString a, QString b)
}
template<typename T>
-static bool check(const QString& txt, T a, T b)
+static bool check(const TQString& txt, T a, T b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -80,22 +80,22 @@ int main(int argc, char *argv[])
}
#ifdef Q_OS_FREEBSD
-static const QString s_group1 = QString::fromLatin1("staff");
-static const QString s_group2 = QString::fromLatin1("guest");
+static const TQString s_group1 = TQString::fromLatin1("staff");
+static const TQString s_group2 = TQString::fromLatin1("guest");
#else
-static const QString s_group1 = QString::fromLatin1("audio");
-static const QString s_group2 = QString::fromLatin1("users");
+static const TQString s_group1 = TQString::fromLatin1("audio");
+static const TQString s_group2 = TQString::fromLatin1("users");
#endif
-static const QString s_testACL = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" );
-static const QString s_testACL2 = QString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") +
- QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) +
- QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) +
- QString::fromLatin1( "mask::r-x\nother::r--\n" );
-static const QString s_testACLEffective = QString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) +
- QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) +
- QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) +
- QString::fromLatin1( "mask::r-x\nother::r--\n" );
+static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" );
+static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") +
+ TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) +
+ TQString::fromLatin1( "mask::r-x\nother::r--\n" );
+static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) +
+ TQString::fromLatin1( "mask::r-x\nother::r--\n" );
KACLTest::KACLTest()
:m_acl( s_testACL )
@@ -147,24 +147,24 @@ void KACLTest::testSetACL()
void KACLTest::testGetOwnerPermissions()
{
- check( "Owner permissions: ", QString::number( m_acl.ownerPermissions() ), "6" );
+ check( "Owner permissions: ", TQString::number( m_acl.ownerPermissions() ), "6" );
}
void KACLTest::testGetOwningGroupPermissions()
{
- check( "Owning group permissions: ", QString::number( m_acl.owningGroupPermissions() ), "6" );
+ check( "Owning group permissions: ", TQString::number( m_acl.owningGroupPermissions() ), "6" );
}
void KACLTest::testGetOthersPermissions()
{
- check( "Others permissions: ", QString::number( m_acl.othersPermissions() ), "4" );
+ check( "Others permissions: ", TQString::number( m_acl.othersPermissions() ), "4" );
}
void KACLTest::testGetMaskPermissions()
{
bool exists = false;
unsigned short mask = m_acl.maskPermissions( exists );
- check( "Mask permissions: ", QString::number( mask ), "7" );
+ check( "Mask permissions: ", TQString::number( mask ), "7" );
check( "Mask permissions: ", exists, true );
}
@@ -172,7 +172,7 @@ void KACLTest::testGetAllUserPermissions()
{
ACLUserPermissionsList list = m_acl.allUserPermissions();
ACLUserPermissionsConstIterator it = list.begin();
- QString name;
+ TQString name;
unsigned short permissions;
int count = 0;
while ( it != list.end() ) {
@@ -181,16 +181,16 @@ void KACLTest::testGetAllUserPermissions()
++it;
++count;
}
- check( "All users count: ", QString::number( count ), "1" );
+ check( "All users count: ", TQString::number( count ), "1" );
check( "All users name: ", name, "bin" );
- check( "All users permissions: ", QString::number( permissions ), "7" );
+ check( "All users permissions: ", TQString::number( permissions ), "7" );
}
void KACLTest::testGetAllGroupsPermissions()
{
ACLGroupPermissionsList list = m_acl.allGroupPermissions();
ACLGroupPermissionsConstIterator it = list.begin();
- QString name;
+ TQString name;
unsigned short permissions;
int count = 0;
while ( it != list.end() ) {
@@ -199,15 +199,15 @@ void KACLTest::testGetAllGroupsPermissions()
// setACL sorts them alphabetically ...
if ( count == 0 ) {
check( "All groups name: ", name, s_group1 );
- check( "All groups permissions: ", QString::number( permissions ), "1" );
+ check( "All groups permissions: ", TQString::number( permissions ), "1" );
} else if ( count == 1 ) {
check( "All groups name: ", name, s_group2 );
- check( "All groups permissions: ", QString::number( permissions ), "4" );
+ check( "All groups permissions: ", TQString::number( permissions ), "4" );
}
++it;
++count;
}
- check( "All users count: ", QString::number( count ), "2" );
+ check( "All users count: ", TQString::number( count ), "2" );
}
void KACLTest::testIsExtended()
@@ -235,9 +235,9 @@ void KACLTest::testSettingBasic()
CharlesII.setOwnerPermissions( 7 ); // clearly
CharlesII.setOwningGroupPermissions( 0 );
CharlesII.setOthersPermissions( 0 );
- check( "setOwnerPermissions: ", QString::number( CharlesII.ownerPermissions() ),"7" );
- check( "setOwningGroupPermissions: ", QString::number( CharlesII.owningGroupPermissions() ),"0" );
- check( "setOthersPermissions: ", QString::number( CharlesII.othersPermissions() ),"0" );
+ check( "setOwnerPermissions: ", TQString::number( CharlesII.ownerPermissions() ),"7" );
+ check( "setOwningGroupPermissions: ", TQString::number( CharlesII.owningGroupPermissions() ),"0" );
+ check( "setOthersPermissions: ", TQString::number( CharlesII.othersPermissions() ),"0" );
}
void KACLTest::testSettingExtended()
@@ -245,28 +245,28 @@ void KACLTest::testSettingExtended()
KACL CharlesII( s_testACL );
CharlesII.setMaskPermissions( 7 ); // clearly
bool dummy = false;
- check( "setMaskPermissions: ", QString::number( CharlesII.maskPermissions( dummy ) ),"7" );
+ check( "setMaskPermissions: ", TQString::number( CharlesII.maskPermissions( dummy ) ),"7" );
- const QString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" );
+ const TQString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" );
ACLUserPermissionsList users;
- ACLUserPermissions user = qMakePair( QString( "root" ), ( unsigned short )7 );
+ ACLUserPermissions user = qMakePair( TQString( "root" ), ( unsigned short )7 );
users.append( user );
- user = qMakePair( QString( "bin" ), ( unsigned short )4 );
+ user = qMakePair( TQString( "bin" ), ( unsigned short )4 );
users.append( user );
CharlesII.setAllUserPermissions( users );
check( "setAllUserPermissions: ", CharlesII.asString(), expected );
CharlesII.setACL( s_testACL ); // reset
// it already has an entry for bin, let's change it
- CharlesII.setNamedUserPermissions( QString("bin"), 4 );
- CharlesII.setNamedUserPermissions( QString( "root" ), 7 );
+ CharlesII.setNamedUserPermissions( TQString("bin"), 4 );
+ CharlesII.setNamedUserPermissions( TQString( "root" ), 7 );
check( "setNamedUserPermissions: ", CharlesII.asString(), expected );
// groups, all and named
- const QString expected2 = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 +
- QString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + QString::fromLatin1(":r--\nmask::rwx\nother::r--\n" );
+ const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 +
+ TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" );
CharlesII.setACL( s_testACL ); // reset
ACLGroupPermissionsList groups;
ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 );
@@ -304,6 +304,6 @@ void KACLTest::testNewMask()
check( "mask exists: ", dummy, false );
CharlesII.setMaskPermissions( 6 );
- check( "new mask set: ", QString::number( CharlesII.maskPermissions( dummy ) ), "6" );
+ check( "new mask set: ", TQString::number( CharlesII.maskPermissions( dummy ) ), "6" );
check( "mask exists now: ", dummy, true );
}
diff --git a/kio/tests/kacltest.h b/kio/tests/kacltest.h
index 906a5a84f..1a85e4109 100644
--- a/kio/tests/kacltest.h
+++ b/kio/tests/kacltest.h
@@ -20,7 +20,7 @@
#ifndef KACLTEST_H
#define KACLTEST_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kacl.h>
class KACLTest
diff --git a/kio/tests/kdcopcheck.cpp b/kio/tests/kdcopcheck.cpp
index 09cbf1310..b61dfd03d 100644
--- a/kio/tests/kdcopcheck.cpp
+++ b/kio/tests/kdcopcheck.cpp
@@ -8,7 +8,7 @@
#include <kimageio.h>
#include <kprotocolinfo.h>
#include <kprocess.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kdcopcheck.h"
#include <dcopclient.h>
@@ -18,7 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
-void debug(QString txt)
+void debug(TQString txt)
{
fprintf(stderr, "%s\n", txt.ascii());
}
@@ -33,27 +33,27 @@ void debug(const char *format, const char *txt)
fprintf(stderr, "\n");
}
-TestService::TestService(const QString &exec)
+TestService::TestService(const TQString &exec)
{
m_exec = exec;
proc << exec;
proc.start();
- connect(kapp->dcopClient(), SIGNAL( applicationRegistered(const QCString&)),
- this, SLOT(newApp(const QCString&)));
- connect(kapp->dcopClient(), SIGNAL( applicationRemoved(const QCString&)),
- this, SLOT(endApp(const QCString&)));
- connect(&proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(appExit()));
+ connect(kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString&)),
+ this, TQT_SLOT(newApp(const TQCString&)));
+ connect(kapp->dcopClient(), TQT_SIGNAL( applicationRemoved(const TQCString&)),
+ this, TQT_SLOT(endApp(const TQCString&)));
+ connect(&proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(appExit()));
- QTimer::singleShot(20*1000, this, SLOT(stop()));
+ TQTimer::singleShot(20*1000, this, TQT_SLOT(stop()));
result = KService::DCOP_None;
}
-void TestService::newApp(const QCString &appId)
+void TestService::newApp(const TQCString &appId)
{
- QString id = appId;
+ TQString id = appId;
if (id == m_exec)
{
result = KService::DCOP_Unique;
@@ -67,7 +67,7 @@ void TestService::newApp(const QCString &appId)
qWarning("Register %s", appId.data());
}
-void TestService::endApp(const QCString &appId)
+void TestService::endApp(const TQCString &appId)
{
qWarning("Unegister %s", appId.data());
}
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
int n = test->exec();
delete test;
- QString result;
+ TQString result;
if (n == KService::DCOP_None)
result = "None";
else if (n == KService::DCOP_Unique)
diff --git a/kio/tests/kdcopcheck.h b/kio/tests/kdcopcheck.h
index 5410bbec2..c3572d929 100644
--- a/kio/tests/kdcopcheck.h
+++ b/kio/tests/kdcopcheck.h
@@ -2,26 +2,26 @@
#define _BLA_H_
#include <kprocess.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
class TestService : public QObject
{
Q_OBJECT
public:
- TestService(const QString &exec);
+ TestService(const TQString &exec);
int exec();
public slots:
- void newApp(const QCString &appId);
- void endApp(const QCString &appId);
+ void newApp(const TQCString &appId);
+ void endApp(const TQCString &appId);
void appExit();
void stop();
protected:
int result;
- QString m_exec;
+ TQString m_exec;
KProcess proc;
};
diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp
index 16d00d81d..a831041e1 100644
--- a/kio/tests/kdefaultprogresstest.cpp
+++ b/kio/tests/kdefaultprogresstest.cpp
@@ -18,7 +18,7 @@ int main(int argc, char **argv)
dlg->slotTotalDirs( 0L, 1 );
dlg->slotSpeed( 0L, 55 );
- dlg->slotInfoMessage( 0L, QString::fromLatin1( "Starting..." ) );
+ dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) );
int files = 0;
for ( int size = 0 ; size < 12000 ; size += 1 )
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
}
kapp->processEvents();
}
- dlg->slotInfoMessage( 0L, QString::fromLatin1( "Done." ) );
+ dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) );
delete dlg;
return 0;
diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp
index d3ea5b888..6137f5e71 100644
--- a/kio/tests/kdirlistertest.cpp
+++ b/kio/tests/kdirlistertest.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdirlister.h>
@@ -30,18 +30,18 @@
#include <cstdlib>
-KDirListerTest::KDirListerTest( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KDirListerTest::KDirListerTest( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
lister = new KDirLister( false /* true */ );
debug = new PrintSignals;
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
- QPushButton* startH = new QPushButton( "Start listing $HOME", this );
- QPushButton* startR= new QPushButton( "Start listing /", this );
- QPushButton* test = new QPushButton( "Many", this );
- QPushButton* startT = new QPushButton( "tarfile", this );
+ TQPushButton* startH = new TQPushButton( "Start listing $HOME", this );
+ TQPushButton* startR= new TQPushButton( "Start listing /", this );
+ TQPushButton* test = new TQPushButton( "Many", this );
+ TQPushButton* startT = new TQPushButton( "tarfile", this );
layout->addWidget( startH );
layout->addWidget( startR );
@@ -49,48 +49,48 @@ KDirListerTest::KDirListerTest( QWidget *parent, const char *name )
layout->addWidget( test );
resize( layout->sizeHint() );
- connect( startR, SIGNAL( clicked() ), SLOT( startRoot() ) );
- connect( startH, SIGNAL( clicked() ), SLOT( startHome() ) );
- connect( startT, SIGNAL( clicked() ), SLOT( startTar() ) );
- connect( test, SIGNAL( clicked() ), SLOT( test() ) );
-
- connect( lister, SIGNAL( started( const KURL & ) ),
- debug, SLOT( started( const KURL & ) ) );
- connect( lister, SIGNAL( completed() ),
- debug, SLOT( completed() ) );
- connect( lister, SIGNAL( completed( const KURL & ) ),
- debug, SLOT( completed( const KURL & ) ) );
- connect( lister, SIGNAL( canceled() ),
- debug, SLOT( canceled() ) );
- connect( lister, SIGNAL( canceled( const KURL & ) ),
- debug, SLOT( canceled( const KURL & ) ) );
- connect( lister, SIGNAL( redirection( const KURL & ) ),
- debug, SLOT( redirection( const KURL & ) ) );
- connect( lister, SIGNAL( redirection( const KURL &, const KURL & ) ),
- debug, SLOT( redirection( const KURL &, const KURL & ) ) );
- connect( lister, SIGNAL( clear() ),
- debug, SLOT( clear() ) );
- connect( lister, SIGNAL( newItems( const KFileItemList & ) ),
- debug, SLOT( newItems( const KFileItemList & ) ) );
- connect( lister, SIGNAL( itemsFilteredByMime( const KFileItemList & ) ),
- debug, SLOT( itemsFilteredByMime( const KFileItemList & ) ) );
- connect( lister, SIGNAL( deleteItem( KFileItem * ) ),
- debug, SLOT( deleteItem( KFileItem * ) ) );
- connect( lister, SIGNAL( refreshItems( const KFileItemList & ) ),
- debug, SLOT( refreshItems( const KFileItemList & ) ) );
- connect( lister, SIGNAL( infoMessage( const QString& ) ),
- debug, SLOT( infoMessage( const QString& ) ) );
- connect( lister, SIGNAL( percent( int ) ),
- debug, SLOT( percent( int ) ) );
- connect( lister, SIGNAL( totalSize( KIO::filesize_t ) ),
- debug, SLOT( totalSize( KIO::filesize_t ) ) );
- connect( lister, SIGNAL( processedSize( KIO::filesize_t ) ),
- debug, SLOT( processedSize( KIO::filesize_t ) ) );
- connect( lister, SIGNAL( speed( int ) ),
- debug, SLOT( speed( int ) ) );
-
- connect( lister, SIGNAL( completed() ),
- this, SLOT( completed() ) );
+ connect( startR, TQT_SIGNAL( clicked() ), TQT_SLOT( startRoot() ) );
+ connect( startH, TQT_SIGNAL( clicked() ), TQT_SLOT( startHome() ) );
+ connect( startT, TQT_SIGNAL( clicked() ), TQT_SLOT( startTar() ) );
+ connect( test, TQT_SIGNAL( clicked() ), TQT_SLOT( test() ) );
+
+ connect( lister, TQT_SIGNAL( started( const KURL & ) ),
+ debug, TQT_SLOT( started( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( completed() ),
+ debug, TQT_SLOT( completed() ) );
+ connect( lister, TQT_SIGNAL( completed( const KURL & ) ),
+ debug, TQT_SLOT( completed( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( canceled() ),
+ debug, TQT_SLOT( canceled() ) );
+ connect( lister, TQT_SIGNAL( canceled( const KURL & ) ),
+ debug, TQT_SLOT( canceled( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( redirection( const KURL & ) ),
+ debug, TQT_SLOT( redirection( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( redirection( const KURL &, const KURL & ) ),
+ debug, TQT_SLOT( redirection( const KURL &, const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( clear() ),
+ debug, TQT_SLOT( clear() ) );
+ connect( lister, TQT_SIGNAL( newItems( const KFileItemList & ) ),
+ debug, TQT_SLOT( newItems( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( itemsFilteredByMime( const KFileItemList & ) ),
+ debug, TQT_SLOT( itemsFilteredByMime( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( deleteItem( KFileItem * ) ),
+ debug, TQT_SLOT( deleteItem( KFileItem * ) ) );
+ connect( lister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
+ debug, TQT_SLOT( refreshItems( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( infoMessage( const TQString& ) ),
+ debug, TQT_SLOT( infoMessage( const TQString& ) ) );
+ connect( lister, TQT_SIGNAL( percent( int ) ),
+ debug, TQT_SLOT( percent( int ) ) );
+ connect( lister, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ debug, TQT_SLOT( totalSize( KIO::filesize_t ) ) );
+ connect( lister, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
+ debug, TQT_SLOT( processedSize( KIO::filesize_t ) ) );
+ connect( lister, TQT_SIGNAL( speed( int ) ),
+ debug, TQT_SLOT( speed( int ) ) );
+
+ connect( lister, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( completed() ) );
}
KDirListerTest::~KDirListerTest()
diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h
index 5c0e751a4..6b1e831f5 100644
--- a/kio/tests/kdirlistertest.h
+++ b/kio/tests/kdirlistertest.h
@@ -21,8 +21,8 @@
#ifndef _KDIRLISTERTEST_H_
#define _KDIRLISTERTEST_H_
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kfileitem.h>
@@ -35,7 +35,7 @@ class PrintSignals : public QObject
{
Q_OBJECT
public:
- PrintSignals() : QObject() { }
+ PrintSignals() : TQObject() { }
public slots:
void started( const KURL &url )
@@ -82,7 +82,7 @@ public slots:
cout << "*** refreshItems: " << endl;
// TODO
}
- void infoMessage( const QString& msg )
+ void infoMessage( const TQString& msg )
{ cout << "*** infoMessage: " << msg.local8Bit() << endl; }
void percent( int percent )
@@ -102,7 +102,7 @@ class KDirListerTest : public QWidget
{
Q_OBJECT
public:
- KDirListerTest( QWidget *parent=0, const char *name=0 );
+ KDirListerTest( TQWidget *parent=0, const char *name=0 );
~KDirListerTest();
public slots:
diff --git a/kio/tests/kdirwatchtest.cpp b/kio/tests/kdirwatchtest.cpp
index 41924078e..48bc59a14 100644
--- a/kio/tests/kdirwatchtest.cpp
+++ b/kio/tests/kdirwatchtest.cpp
@@ -9,7 +9,7 @@
LGPL version 2.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
@@ -38,26 +38,26 @@ int main (int argc, char **argv)
KDirWatch *dirwatch1 = KDirWatch::self();
KDirWatch *dirwatch2 = new KDirWatch;
- testObject.connect(dirwatch1, SIGNAL( dirty( const QString &)), SLOT( dirty( const QString &)) );
- testObject.connect(dirwatch1, SIGNAL( created( const QString &)), SLOT( created( const QString &)) );
- testObject.connect(dirwatch1, SIGNAL( deleted( const QString &)), SLOT( deleted( const QString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( dirty( const TQString &)), TQT_SLOT( dirty( const TQString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( created( const TQString &)), TQT_SLOT( created( const TQString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( deleted( const TQString &)), TQT_SLOT( deleted( const TQString &)) );
if (args->count() >0) {
for(int i = 0; i < args->count(); i++) {
kdDebug() << "Watching: " << args->arg(i) << endl;
- dirwatch2->addDir( QFile::decodeName( args->arg(i)));
+ dirwatch2->addDir( TQFile::decodeName( args->arg(i)));
}
}
- QString home = QString(getenv ("HOME")) + "/";
- QString desk = home + "Desktop/";
+ TQString home = TQString(getenv ("HOME")) + "/";
+ TQString desk = home + "Desktop/";
kdDebug() << "Watching: " << home << endl;
dirwatch1->addDir(home);
kdDebug() << "Watching file: " << home << "foo " << endl;
dirwatch1->addFile(home+"foo");
kdDebug() << "Watching: " << desk << endl;
dirwatch1->addDir(desk);
- QString test = home + "test/";
+ TQString test = home + "test/";
kdDebug() << "Watching: (but skipped) " << test << endl;
dirwatch1->addDir(test);
diff --git a/kio/tests/kdirwatchtest.h b/kio/tests/kdirwatchtest.h
index 9330f941c..24dc94a91 100644
--- a/kio/tests/kdirwatchtest.h
+++ b/kio/tests/kdirwatchtest.h
@@ -14,20 +14,20 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kdirwatch.h"
#include "kapplication.h"
-class myTest : public QObject
+class myTest : public TQObject
{
Q_OBJECT
public:
myTest() { };
public slots:
- void dirty(const QString &a) { printf("Dirty: %s\n", a.ascii()); };
- void created(const QString& f) { printf("Created: %s\n", f.ascii()); }
- void deleted(const QString& f) { printf("Deleted: %s\n", f.ascii()); }
+ void dirty(const TQString &a) { printf("Dirty: %s\n", a.ascii()); };
+ void created(const TQString& f) { printf("Created: %s\n", f.ascii()); }
+ void deleted(const TQString& f) { printf("Deleted: %s\n", f.ascii()); }
};
#endif
diff --git a/kio/tests/kdirwatchunittest.cpp b/kio/tests/kdirwatchunittest.cpp
index d523909ec..1bd17edd6 100644
--- a/kio/tests/kdirwatchunittest.cpp
+++ b/kio/tests/kdirwatchunittest.cpp
@@ -11,8 +11,8 @@
#include <unistd.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kdebug.h>
@@ -39,7 +39,7 @@ void KDirWatchTest::VERIFY_NOTHING()
VERIFY (nothing_failed);
}
-void KDirWatchTest::VERIFY_DIRTY(const QString& alert)
+void KDirWatchTest::VERIFY_DIRTY(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -56,7 +56,7 @@ void KDirWatchTest::VERIFY_DIRTY(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::VERIFY_CREATED(const QString& alert)
+void KDirWatchTest::VERIFY_CREATED(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -73,7 +73,7 @@ void KDirWatchTest::VERIFY_CREATED(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::VERIFY_DELETED(const QString& alert)
+void KDirWatchTest::VERIFY_DELETED(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -90,26 +90,26 @@ void KDirWatchTest::VERIFY_DELETED(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::remove_file (const QString& file)
+void KDirWatchTest::remove_file (const TQString& file)
{
- ::unlink (QFile::encodeName(file));
+ ::unlink (TQFile::encodeName(file));
}
-void KDirWatchTest::touch_file (const QString& file)
+void KDirWatchTest::touch_file (const TQString& file)
{
- QFile f(file);
+ TQFile f(file);
f.open(IO_WriteOnly);
}
-void KDirWatchTest::rename_file(const QString& from, const QString& to)
+void KDirWatchTest::rename_file(const TQString& from, const TQString& to)
{
- ::rename(QFile::encodeName(from), QFile::encodeName(to));
+ ::rename(TQFile::encodeName(from), TQFile::encodeName(to));
}
KUNITTEST_MODULE ( kunittest_kdirwatch, "KDirWatchTest" )
KUNITTEST_MODULE_REGISTER_TESTER (KDirWatchTest)
-#define SLEEP() QApplication::processEvents();
+#define SLEEP() TQApplication::processEvents();
void KDirWatchTest::allTests()
{
@@ -117,12 +117,12 @@ void KDirWatchTest::allTests()
d = new KDirWatch;
VERIFY (d != 0);
- QDir* dir = new QDir(m_workingDir);
+ TQDir* dir = new TQDir(m_workingDir);
VERIFY (dir != 0);
- connect(d, SIGNAL (dirty( const QString &)), SLOT( slotDirty( const QString &)) );
- connect(d, SIGNAL (created( const QString &)), SLOT( slotCreated( const QString &)) );
- connect(d, SIGNAL (deleted( const QString &)), SLOT( slotDeleted( const QString &)) );
+ connect(d, TQT_SIGNAL (dirty( const TQString &)), TQT_SLOT( slotDirty( const TQString &)) );
+ connect(d, TQT_SIGNAL (created( const TQString &)), TQT_SLOT( slotCreated( const TQString &)) );
+ connect(d, TQT_SIGNAL (deleted( const TQString &)), TQT_SLOT( slotDeleted( const TQString &)) );
VERIFY (dir->mkdir (m_workingDir));
diff --git a/kio/tests/kdirwatchunittest.h b/kio/tests/kdirwatchunittest.h
index 417cdf24e..053ab2882 100644
--- a/kio/tests/kdirwatchunittest.h
+++ b/kio/tests/kdirwatchunittest.h
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kdirwatch.h"
#include "kapplication.h"
@@ -38,9 +38,9 @@ public:
virtual void allTests();
private slots:
- void slotDirty (const QString& s) { m_signals[sigDirty]++; m_lastSignal = s; }
- void slotCreated (const QString& s) { m_signals[sigCreated]++; m_lastSignal = s; }
- void slotDeleted (const QString& s) { m_signals[sigDeleted]++; m_lastSignal = s; }
+ void slotDirty (const TQString& s) { m_signals[sigDirty]++; m_lastSignal = s; }
+ void slotCreated (const TQString& s) { m_signals[sigCreated]++; m_lastSignal = s; }
+ void slotDeleted (const TQString& s) { m_signals[sigDeleted]++; m_lastSignal = s; }
private:
unsigned m_signals[3];
@@ -48,18 +48,18 @@ private:
/* verify nothing happens */
void VERIFY_NOTHING();
/* verify that dirty got emitted */
- void VERIFY_DIRTY (const QString&);
+ void VERIFY_DIRTY (const TQString&);
/* verify that created got emitted */
- void VERIFY_CREATED (const QString&);
+ void VERIFY_CREATED (const TQString&);
/* verify that deleted got emitted */
- void VERIFY_DELETED (const QString&);
+ void VERIFY_DELETED (const TQString&);
- void touch_file (const QString& file);
- void remove_file (const QString& file);
- void rename_file (const QString& from, const QString& to);
+ void touch_file (const TQString& file);
+ void remove_file (const TQString& file);
+ void rename_file (const TQString& from, const TQString& to);
- QString m_lastSignal;
- QString m_workingDir;
+ TQString m_lastSignal;
+ TQString m_workingDir;
KDirWatch* d;
};
diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp
index a0dd8fe49..901dec14e 100644
--- a/kio/tests/kfiltertest.cpp
+++ b/kio/tests/kfiltertest.cpp
@@ -20,25 +20,25 @@
#include "kfilterbase.h"
#include <unistd.h>
#include <limits.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kinstance.h>
-void test_block( const QString & fileName )
+void test_block( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
- // This is what KGzipDev::readAll could do, if QIODevice::readAll was virtual....
+ // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual....
- QByteArray array(1024);
+ TQByteArray array(1024);
int n;
while ( ( n = dev->readBlock( array.data(), array.size() ) ) )
{
kdDebug() << "readBlock returned " << n << endl << endl;
- // QCString s(array,n+1); // Terminate with 0 before printing
+ // TQCString s(array,n+1); // Terminate with 0 before printing
// printf("%s", s.data());
kdDebug() << "dev.at = " << dev->at() << endl;
@@ -48,13 +48,13 @@ void test_block( const QString & fileName )
delete dev;
}
-void test_block_write( const QString & fileName )
+void test_block_write( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_WriteOnly ) ) { kdWarning() << "open failed " << endl; return; }
- QCString s("hello\n");
+ TQCString s("hello\n");
int ret = dev->writeBlock( s, s.size()-1 );
kdDebug() << "writeBlock ret=" << ret << endl;
//ret = dev->writeBlock( s, s.size()-1 );
@@ -63,9 +63,9 @@ void test_block_write( const QString & fileName )
delete dev;
}
-void test_getch( const QString & fileName )
+void test_getch( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
int ch;
@@ -75,12 +75,12 @@ void test_getch( const QString & fileName )
delete dev;
}
-void test_textstream( const QString & fileName )
+void test_textstream( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
- QTextStream ts( dev );
+ TQTextStream ts( dev );
printf("%s\n", ts.read().latin1());
dev->close();
delete dev;
@@ -92,8 +92,8 @@ int main()
char currentdir[PATH_MAX+1];
getcwd( currentdir, PATH_MAX );
- QString pathgz = QFile::decodeName(currentdir) + "/test.gz";
- QString pathbz2 = QFile::decodeName(currentdir) + "/test.bz2";
+ TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz";
+ TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2";
kdDebug() << " -- test_block_write gzip -- " << endl;
test_block_write(pathgz);
diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp
index 977603426..852a06453 100644
--- a/kio/tests/kionetrctest.cpp
+++ b/kio/tests/kionetrctest.cpp
@@ -26,7 +26,7 @@ void output( const KURL& u )
<< "Login: " << l.login << endl
<< "Password: " << l.password << endl;
- QMap<QString,QStringList>::ConstIterator it = l.macdef.begin();
+ TQMap<TQString,TQStringList>::ConstIterator it = l.macdef.begin();
for ( ; it != l.macdef.end(); ++it )
{
kdDebug() << "Macro: " << it.key() << "= "
diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp
index fc017476d..2e8894108 100644
--- a/kio/tests/kiopassdlgtest.cpp
+++ b/kio/tests/kiopassdlgtest.cpp
@@ -12,15 +12,15 @@ int main ( int argc, char** argv )
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app;
- QString usr, pass, comment, label;
+ TQString usr, pass, comment, label;
label = "Site:";
comment = "<b>localhost</b>";
int res = KIO::PasswordDialog::getNameAndPassword( usr, pass, 0L,
- QString::null, false,
- QString::null, comment,
+ TQString::null, false,
+ TQString::null, comment,
label );
- if ( res == QDialog::Accepted )
- KMessageBox::information( 0L, QString("You entered:\n"
+ if ( res == TQDialog::Accepted )
+ KMessageBox::information( 0L, TQString("You entered:\n"
" Username: %1\n"
" Password: %2").arg(usr).arg(pass),
"Test Result");
diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp
index 8594586df..0db23457d 100644
--- a/kio/tests/kioslavetest.cpp
+++ b/kio/tests/kioslavetest.cpp
@@ -9,9 +9,9 @@
LGPL version 2.
*/
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
#include <kacl.h>
#include <kapplication.h>
@@ -28,16 +28,16 @@
using namespace KIO;
-KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
+KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr )
: KMainWindow(0, "")
{
job = 0L;
- main_widget = new QWidget( this, "");
- QBoxLayout *topLayout = new QVBoxLayout( main_widget, 10, 5 );
+ main_widget = new TQWidget( this, "");
+ TQBoxLayout *topLayout = new TQVBoxLayout( main_widget, 10, 5 );
- QGridLayout *grid = new QGridLayout( 2, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( 2, 2, 10 );
topLayout->addLayout( grid );
grid->setRowStretch(0,1);
@@ -46,68 +46,68 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
grid->setColStretch(0,1);
grid->setColStretch(1,100);
- lb_from = new QLabel( "From:", main_widget );
+ lb_from = new TQLabel( "From:", main_widget );
grid->addWidget( lb_from, 0, 0 );
- le_source = new QLineEdit( main_widget );
+ le_source = new TQLineEdit( main_widget );
grid->addWidget( le_source, 0, 1 );
le_source->setText( src );
- lb_to = new QLabel( "To:", main_widget );
+ lb_to = new TQLabel( "To:", main_widget );
grid->addWidget( lb_to, 1, 0 );
- le_dest = new QLineEdit( main_widget );
+ le_dest = new TQLineEdit( main_widget );
grid->addWidget( le_dest, 1, 1 );
le_dest->setText( dest );
// Operation groupbox & buttons
- opButtons = new QButtonGroup( "Operation", main_widget );
+ opButtons = new TQButtonGroup( "Operation", main_widget );
topLayout->addWidget( opButtons, 10 );
- connect( opButtons, SIGNAL(clicked(int)), SLOT(changeOperation(int)) );
+ connect( opButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeOperation(int)) );
- QBoxLayout *hbLayout = new QHBoxLayout( opButtons, 15 );
+ TQBoxLayout *hbLayout = new TQHBoxLayout( opButtons, 15 );
- rbList = new QRadioButton( "List", opButtons );
+ rbList = new TQRadioButton( "List", opButtons );
opButtons->insert( rbList, List );
hbLayout->addWidget( rbList, 5 );
- rbListRecursive = new QRadioButton( "ListRecursive", opButtons );
+ rbListRecursive = new TQRadioButton( "ListRecursive", opButtons );
opButtons->insert( rbListRecursive, ListRecursive );
hbLayout->addWidget( rbListRecursive, 5 );
- rbStat = new QRadioButton( "Stat", opButtons );
+ rbStat = new TQRadioButton( "Stat", opButtons );
opButtons->insert( rbStat, Stat );
hbLayout->addWidget( rbStat, 5 );
- rbGet = new QRadioButton( "Get", opButtons );
+ rbGet = new TQRadioButton( "Get", opButtons );
opButtons->insert( rbGet, Get );
hbLayout->addWidget( rbGet, 5 );
- rbPut = new QRadioButton( "Put", opButtons );
+ rbPut = new TQRadioButton( "Put", opButtons );
opButtons->insert( rbPut, Put );
hbLayout->addWidget( rbPut, 5 );
- rbCopy = new QRadioButton( "Copy", opButtons );
+ rbCopy = new TQRadioButton( "Copy", opButtons );
opButtons->insert( rbCopy, Copy );
hbLayout->addWidget( rbCopy, 5 );
- rbMove = new QRadioButton( "Move", opButtons );
+ rbMove = new TQRadioButton( "Move", opButtons );
opButtons->insert( rbMove, Move );
hbLayout->addWidget( rbMove, 5 );
- rbDelete = new QRadioButton( "Delete", opButtons );
+ rbDelete = new TQRadioButton( "Delete", opButtons );
opButtons->insert( rbDelete, Delete );
hbLayout->addWidget( rbDelete, 5 );
- rbShred = new QRadioButton( "Shred", opButtons );
+ rbShred = new TQRadioButton( "Shred", opButtons );
opButtons->insert( rbShred, Shred );
hbLayout->addWidget( rbShred, 5 );
- rbMkdir = new QRadioButton( "Mkdir", opButtons );
+ rbMkdir = new TQRadioButton( "Mkdir", opButtons );
opButtons->insert( rbMkdir, Mkdir );
hbLayout->addWidget( rbMkdir, 5 );
- rbMimetype = new QRadioButton( "Mimetype", opButtons );
+ rbMimetype = new TQRadioButton( "Mimetype", opButtons );
opButtons->insert( rbMimetype, Mimetype );
hbLayout->addWidget( rbMimetype, 5 );
@@ -115,21 +115,21 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
changeOperation( op );
// Progress groupbox & buttons
- progressButtons = new QButtonGroup( "Progress dialog mode", main_widget );
+ progressButtons = new TQButtonGroup( "Progress dialog mode", main_widget );
topLayout->addWidget( progressButtons, 10 );
- connect( progressButtons, SIGNAL(clicked(int)), SLOT(changeProgressMode(int)) );
+ connect( progressButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeProgressMode(int)) );
- hbLayout = new QHBoxLayout( progressButtons, 15 );
+ hbLayout = new TQHBoxLayout( progressButtons, 15 );
- rbProgressNone = new QRadioButton( "None", progressButtons );
+ rbProgressNone = new TQRadioButton( "None", progressButtons );
progressButtons->insert( rbProgressNone, ProgressNone );
hbLayout->addWidget( rbProgressNone, 5 );
- rbProgressDefault = new QRadioButton( "Default", progressButtons );
+ rbProgressDefault = new TQRadioButton( "Default", progressButtons );
progressButtons->insert( rbProgressDefault, ProgressDefault );
hbLayout->addWidget( rbProgressDefault, 5 );
- rbProgressStatus = new QRadioButton( "Status", progressButtons );
+ rbProgressStatus = new TQRadioButton( "Status", progressButtons );
progressButtons->insert( rbProgressStatus, ProgressStatus );
hbLayout->addWidget( rbProgressStatus, 5 );
@@ -141,23 +141,23 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
statusBar()->addWidget( statusProgress, 0, true );
// run & stop butons
- hbLayout = new QHBoxLayout( topLayout, 15 );
+ hbLayout = new TQHBoxLayout( topLayout, 15 );
- pbStart = new QPushButton( "&Start", main_widget );
+ pbStart = new TQPushButton( "&Start", main_widget );
pbStart->setFixedSize( pbStart->sizeHint() );
- connect( pbStart, SIGNAL(clicked()), SLOT(startJob()) );
+ connect( pbStart, TQT_SIGNAL(clicked()), TQT_SLOT(startJob()) );
hbLayout->addWidget( pbStart, 5 );
- pbStop = new QPushButton( "Sto&p", main_widget );
+ pbStop = new TQPushButton( "Sto&p", main_widget );
pbStop->setFixedSize( pbStop->sizeHint() );
pbStop->setEnabled( false );
- connect( pbStop, SIGNAL(clicked()), SLOT(stopJob()) );
+ connect( pbStop, TQT_SIGNAL(clicked()), TQT_SLOT(stopJob()) );
hbLayout->addWidget( pbStop, 5 );
// close button
- close = new QPushButton( "&Close", main_widget );
+ close = new TQPushButton( "&Close", main_widget );
close->setFixedSize( close->sizeHint() );
- connect(close, SIGNAL(clicked()), this, SLOT(slotQuit()));
+ connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotQuit()));
topLayout->addWidget( close, 5 );
@@ -166,14 +166,14 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
slave = 0;
// slave = KIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org"));
- KIO::Scheduler::connect(SIGNAL(slaveConnected(KIO::Slave*)),
- this, SLOT(slotSlaveConnected()));
- KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave*,int,const QString&)),
- this, SLOT(slotSlaveError()));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave*)),
+ this, TQT_SLOT(slotSlaveConnected()));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave*,int,const TQString&)),
+ this, TQT_SLOT(slotSlaveError()));
}
-void KioslaveTest::closeEvent( QCloseEvent * ){
+void KioslaveTest::closeEvent( TQCloseEvent * ){
slotQuit();
}
@@ -210,22 +210,22 @@ void KioslaveTest::changeProgressMode( int id ) {
void KioslaveTest::startJob() {
- QString sCurrent = QDir::currentDirPath()+"/";
+ TQString sCurrent = TQDir::currentDirPath()+"/";
KURL::encode_string(sCurrent);
- QString sSrc( le_source->text() );
+ TQString sSrc( le_source->text() );
KURL src( sCurrent, sSrc );
if ( !src.isValid() ) {
- QMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" );
+ TQMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" );
return;
}
- QString sDest( le_dest->text() );
+ TQString sDest( le_dest->text() );
KURL dest( sCurrent, sDest );
if ( !dest.isValid() &&
( selectedOperation == Copy || selectedOperation == Move ) ) {
- QMessageBox::critical(this, "Kioslave Error Message",
+ TQMessageBox::critical(this, "Kioslave Error Message",
"Destination URL is malformed" );
return;
}
@@ -242,14 +242,14 @@ void KioslaveTest::startJob() {
switch ( selectedOperation ) {
case List:
myJob = KIO::listDir( src );
- connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
break;
case ListRecursive:
myJob = KIO::listRecursive( src );
- connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
break;
case Stat:
@@ -258,15 +258,15 @@ void KioslaveTest::startJob() {
case Get:
myJob = KIO::get( src, true );
- connect(myJob, SIGNAL( data( KIO::Job*, const QByteArray &)),
- SLOT( slotData( KIO::Job*, const QByteArray &)));
+ connect(myJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
break;
case Put:
putBuffer = 0;
myJob = KIO::put( src, -1, true, false);
- connect(myJob, SIGNAL( dataReq( KIO::Job*, QByteArray &)),
- SLOT( slotDataReq( KIO::Job*, QByteArray &)));
+ connect(myJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray &)),
+ TQT_SLOT( slotDataReq( KIO::Job*, TQByteArray &)));
break;
case Copy:
@@ -300,11 +300,11 @@ void KioslaveTest::startJob() {
job = myJob;
}
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
- connect( job, SIGNAL( canceled( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( canceled( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
if (progressMode == ProgressStatus) {
statusProgress->setJob( job );
@@ -347,7 +347,7 @@ void KioslaveTest::slotSlaveError()
slave = 0;
}
-static void printACL( const QString& acl )
+static void printACL( const TQString& acl )
{
KACL kacl( acl );
kdDebug() << "According to KACL: " << endl << kacl.asString() << endl;
@@ -424,8 +424,8 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
kdDebug() << "" << ( *it2 ).m_str << endl;
else if ( (*it2).m_uds == UDS_EXTRA) {
Q_ASSERT( extraFieldsIt != extraFields.end() );
- QString column = (*extraFieldsIt).name;
- //QString type = (*extraFieldsIt).type;
+ TQString column = (*extraFieldsIt).name;
+ //TQString type = (*extraFieldsIt).type;
kdDebug() << " Extra data (" << column << ") :" << ( *it2 ).m_str << endl;
++extraFieldsIt;
}
@@ -433,7 +433,7 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
}
}
-void KioslaveTest::slotData(KIO::Job*, const QByteArray &data)
+void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data)
{
if (data.size() == 0)
{
@@ -441,11 +441,11 @@ void KioslaveTest::slotData(KIO::Job*, const QByteArray &data)
}
else
{
- kdDebug(0) << "Data: \"" << QCString(data, data.size()+1) << "\"" << endl;
+ kdDebug(0) << "Data: \"" << TQCString(data, data.size()+1) << "\"" << endl;
}
}
-void KioslaveTest::slotDataReq(KIO::Job*, QByteArray &data)
+void KioslaveTest::slotDataReq(KIO::Job*, TQByteArray &data)
{
const char *fileDataArray[] =
{
@@ -500,13 +500,13 @@ int main(int argc, char **argv) {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString src = args->getOption("src");
- QString dest = args->getOption("dest");
+ TQString src = args->getOption("src");
+ TQString dest = args->getOption("dest");
uint op = 0;
uint pr = 0;
- QString tmps;
+ TQString tmps;
tmps = args->getOption("operation");
if ( tmps == "list") {
diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h
index 34cb00c15..02fae7f23 100644
--- a/kio/tests/kioslavetest.h
+++ b/kio/tests/kioslavetest.h
@@ -12,12 +12,12 @@
#ifndef _KIOSLAVETEST_H
#define _KIOSLAVETEST_H
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqwidget.h>
#include <kmainwindow.h>
@@ -30,7 +30,7 @@ class KioslaveTest : public KMainWindow {
Q_OBJECT
public:
- KioslaveTest( QString src, QString dest, uint op, uint pr );
+ KioslaveTest( TQString src, TQString dest, uint op, uint pr );
~KioslaveTest() {}
enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype };
@@ -39,43 +39,43 @@ public:
protected:
- void closeEvent( QCloseEvent * );
+ void closeEvent( TQCloseEvent * );
void printUDSEntry( const KIO::UDSEntry & entry );
// info stuff
- QLabel *lb_from;
- QLineEdit *le_source;
+ TQLabel *lb_from;
+ TQLineEdit *le_source;
- QLabel *lb_to;
- QLineEdit *le_dest;
+ TQLabel *lb_to;
+ TQLineEdit *le_dest;
// operation stuff
- QButtonGroup *opButtons;
-
- QRadioButton *rbList;
- QRadioButton *rbListRecursive;
- QRadioButton *rbStat;
- QRadioButton *rbGet;
- QRadioButton *rbPut;
- QRadioButton *rbCopy;
- QRadioButton *rbMove;
- QRadioButton *rbDelete;
- QRadioButton *rbShred;
- QRadioButton *rbMkdir;
- QRadioButton *rbMimetype;
+ TQButtonGroup *opButtons;
+
+ TQRadioButton *rbList;
+ TQRadioButton *rbListRecursive;
+ TQRadioButton *rbStat;
+ TQRadioButton *rbGet;
+ TQRadioButton *rbPut;
+ TQRadioButton *rbCopy;
+ TQRadioButton *rbMove;
+ TQRadioButton *rbDelete;
+ TQRadioButton *rbShred;
+ TQRadioButton *rbMkdir;
+ TQRadioButton *rbMimetype;
// progress stuff
- QButtonGroup *progressButtons;
+ TQButtonGroup *progressButtons;
- QRadioButton *rbProgressNone;
- QRadioButton *rbProgressDefault;
- QRadioButton *rbProgressStatus;
+ TQRadioButton *rbProgressNone;
+ TQRadioButton *rbProgressDefault;
+ TQRadioButton *rbProgressStatus;
- QPushButton *pbStart;
- QPushButton *pbStop;
+ TQPushButton *pbStart;
+ TQPushButton *pbStop;
- QPushButton *close;
+ TQPushButton *close;
protected slots:
void changeOperation( int id );
@@ -86,8 +86,8 @@ protected slots:
void slotResult( KIO::Job * );
void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
- void slotData( KIO::Job *, const QByteArray &data );
- void slotDataReq( KIO::Job *, QByteArray &data );
+ void slotData( KIO::Job *, const TQByteArray &data );
+ void slotDataReq( KIO::Job *, TQByteArray &data );
void slotQuit();
void slotSlaveConnected();
@@ -95,7 +95,7 @@ protected slots:
private:
KIO::Job *job;
- QWidget *main_widget;
+ TQWidget *main_widget;
KIO::StatusbarProgress *statusProgress;
diff --git a/kio/tests/kmfitest.cpp b/kio/tests/kmfitest.cpp
index c50b83b34..25e96759f 100644
--- a/kio/tests/kmfitest.cpp
+++ b/kio/tests/kmfitest.cpp
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kinstance.h>
#include <kurl.h>
#include <kfilemetainfo.h>
@@ -16,12 +16,12 @@ int main (int argc, char **argv)
}
for (int i = 1; i < argc; i++) {
- QString file = QFile::decodeName(argv[i]);
+ TQString file = TQFile::decodeName(argv[i]);
qWarning("File: %s", file.local8Bit().data());
KMimeType::Ptr p;
p = KMimeType::findByPath(file);
qWarning("Mime type (findByPath): %s", p->name().latin1());
- KFileMetaInfo meta(file, QString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
+ KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
}
return 0;
diff --git a/kio/tests/kmimefromext.cpp b/kio/tests/kmimefromext.cpp
index e867d4822..248407f95 100644
--- a/kio/tests/kmimefromext.cpp
+++ b/kio/tests/kmimefromext.cpp
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString fileName = args->arg( 0 );
+ TQString fileName = args->arg( 0 );
// The "true" here means only the filename will be looked at.
// "Mime-magic" will not interfer. The file doesn't exist.
diff --git a/kio/tests/kmimemagictest.cpp b/kio/tests/kmimemagictest.cpp
index 9f3f5bb2b..eb01137c9 100644
--- a/kio/tests/kmimemagictest.cpp
+++ b/kio/tests/kmimemagictest.cpp
@@ -32,7 +32,7 @@ int main( int argc, char** argv )
}
KInstance blah("kmimemagictest");
- QString file = QString::fromLocal8Bit( argv[1] );
+ TQString file = TQString::fromLocal8Bit( argv[1] );
KMimeMagicResult * result = KMimeMagic::self()->findFileType( file );
diff --git a/kio/tests/kmimetypetest.cpp b/kio/tests/kmimetypetest.cpp
index b95f1ceea..1856e6036 100644
--- a/kio/tests/kmimetypetest.cpp
+++ b/kio/tests/kmimetypetest.cpp
@@ -20,14 +20,14 @@
#include <kinstance.h>
#include <ktempdir.h>
#include <kprotocolinfo.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
-static void checkIcon( const KURL& url, const QString& expectedIcon )
+static void checkIcon( const KURL& url, const TQString& expectedIcon )
{
- QString icon = KMimeType::iconForURL( url );
+ TQString icon = KMimeType::iconForURL( url );
if ( icon == expectedIcon )
qDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() );
else {
@@ -45,32 +45,32 @@ int main( int argc, char** argv )
KURL url;
// safely check a "regular" folder
- url.setPath( QDir::homeDirPath() );
+ url.setPath( TQDir::homeDirPath() );
checkIcon( url, "folder" );
// safely check a non-readable folder
if (0 != geteuid()) { // can't do this test if we're root
- KTempDir tmp( QString::null, 0 );
+ KTempDir tmp( TQString::null, 0 );
tmp.setAutoDelete( true );
url.setPath( tmp.name() );
checkIcon( url, "folder_locked" );
- chmod( QFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it
+ chmod( TQFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it
}
// safely check the trash folder
- if ( KProtocolInfo::isKnownProtocol( QString("trash") ) ) {
+ if ( KProtocolInfo::isKnownProtocol( TQString("trash") ) ) {
checkIcon( "trash:/", "trashcan_full" ); // #100321
checkIcon( "trash:/foo/", "folder" );
}
- QString pdf;
+ TQString pdf;
KMimeType::diagnoseFileName("foo.pdf", pdf);
qDebug("extension: '%s'", pdf.latin1());
- assert(pdf == QString("*.pdf"));
- QString ps;
+ assert(pdf == TQString("*.pdf"));
+ TQString ps;
KMimeType::diagnoseFileName("foo.ps", ps);
qDebug("extension: '%s'", ps.latin1());
- assert(ps == QString("*.ps"));
+ assert(ps == TQString("*.ps"));
return 0;
}
diff --git a/kio/tests/kprotocolinfotest.cpp b/kio/tests/kprotocolinfotest.cpp
index 64ec617f6..b0fe392f2 100644
--- a/kio/tests/kprotocolinfotest.cpp
+++ b/kio/tests/kprotocolinfotest.cpp
@@ -47,11 +47,11 @@ int main(int argc, char **argv) {
assert( KProtocolInfo::showFilePreview( "audiocd" ) == false );
assert( KGlobalSettings::showFilePreview( "audiocd:/" ) == false );
- QString proxy;
- QString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy );
+ TQString proxy;
+ TQString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy );
assert( protocol == "http" );
- QStringList capabilities = KProtocolInfo::capabilities( "imap" );
+ TQStringList capabilities = KProtocolInfo::capabilities( "imap" );
kdDebug() << "kio_imap capabilities: " << capabilities << endl;
//assert(capabilities.contains("ACL"));
diff --git a/kio/tests/kruntest.cpp b/kio/tests/kruntest.cpp
index 92c0a3af3..10dbc9b71 100644
--- a/kio/tests/kruntest.cpp
+++ b/kio/tests/kruntest.cpp
@@ -27,9 +27,9 @@
#include <kservice.h>
#include <kde_file.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qdir.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqdir.h>
#include <stdlib.h>
#include <unistd.h>
@@ -39,7 +39,7 @@ const int MAXKRUNS = 100;
testKRun * myArray[MAXKRUNS];
-void testKRun::foundMimeType( const QString& _type )
+void testKRun::foundMimeType( const TQString& _type )
{
kdDebug() << "testKRun::foundMimeType " << _type << endl;
kdDebug() << "testKRun::foundMimeType URL=" << m_strURL.url() << endl;
@@ -50,15 +50,15 @@ void testKRun::foundMimeType( const QString& _type )
Receiver::Receiver()
{
- QVBoxLayout *lay = new QVBoxLayout(this);
+ TQVBoxLayout *lay = new TQVBoxLayout(this);
lay->setAutoAdd(true);
- QPushButton * h = new QPushButton( "Press here to terminate", this );
- start = new QPushButton( "Launch KRuns", this );
- stop = new QPushButton( "Stop those KRuns", this );
+ TQPushButton * h = new TQPushButton( "Press here to terminate", this );
+ start = new TQPushButton( "Launch KRuns", this );
+ stop = new TQPushButton( "Stop those KRuns", this );
stop->setEnabled(false);
- QObject::connect( h, SIGNAL(clicked()), kapp, SLOT(quit()) );
- QObject::connect( start, SIGNAL(clicked()), this, SLOT(slotStart()) );
- QObject::connect( stop, SIGNAL(clicked()), this, SLOT(slotStop()) );
+ TQObject::connect( h, TQT_SIGNAL(clicked()), kapp, TQT_SLOT(quit()) );
+ TQObject::connect( start, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStart()) );
+ TQObject::connect( stop, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStop()) );
adjustSize();
show();
@@ -87,12 +87,12 @@ void Receiver::slotStart()
stop->setEnabled(true);
}
-void check(QString txt, QString a, QString b)
+void check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b)
kdDebug() << txt << " : '" << a << "' - ok" << endl;
else {
@@ -103,15 +103,15 @@ void check(QString txt, QString a, QString b)
const char *bt(bool tr) { return tr?"true":"false"; }
-void checkBN(QString a, bool tr, QString b)
+void checkBN(TQString a, bool tr, TQString b)
{
- check( QString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b);
+ check( TQString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b);
}
-void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, QString b)
+void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, TQString b)
{
check(
- QString().sprintf("processDesktopExec( "
+ TQString().sprintf("processDesktopExec( "
"service = {\nexec = %s\nterminal = %s, terminalOptions = %s\nsubstituteUid = %s, user = %s },"
"\nURLs = { %s },\nhas_shell = %s, temp_files = %s )",
service.exec().latin1(), bt(service.terminal()), service.terminalOptions().latin1(), bt(service.substituteUid()), service.username().latin1(),
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
"%s\n%s\n%s\n",execs[ex],terms[te],sus[su]);
close(fd);
fclose(f);
- KService s(QDir::currentDirPath() + "/kruntest.desktop");
+ KService s(TQDir::currentDirPath() + "/kruntest.desktop");
unlink("kruntest.desktop");
checkPDE( s, l0, hs, false, rslts[ex+te*2+su*4+hs*8]);
}
diff --git a/kio/tests/kruntest.h b/kio/tests/kruntest.h
index e1bb92729..3df8e1ac5 100644
--- a/kio/tests/kruntest.h
+++ b/kio/tests/kruntest.h
@@ -21,7 +21,7 @@
#include <krun.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class testKRun : public KRun
{
@@ -34,7 +34,7 @@ public:
virtual ~testKRun() {}
- virtual void foundMimeType( const QString& _type );
+ virtual void foundMimeType( const TQString& _type );
};
@@ -50,8 +50,8 @@ public slots:
void slotStart();
void slotStop();
private:
- QPushButton * start;
- QPushButton * stop;
+ TQPushButton * start;
+ TQPushButton * stop;
};
diff --git a/kio/tests/kshredtest.cpp b/kio/tests/kshredtest.cpp
index 3bd7ae189..76e87fca4 100644
--- a/kio/tests/kshredtest.cpp
+++ b/kio/tests/kshredtest.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "kshred.h"
-#include <qstring.h>
+#include <tqstring.h>
int main(int argc, char **argv)
diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp
index fe2c22d94..4a4fcabb0 100644
--- a/kio/tests/ksycocatest.cpp
+++ b/kio/tests/ksycocatest.cpp
@@ -33,12 +33,12 @@
#include <stdio.h>
#include <stdlib.h>
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -50,7 +50,7 @@ bool check(QString txt, QString a, QString b)
return true;
}
-void debug(QString txt)
+void debug(TQString txt)
{
fprintf(stderr, "%s\n", txt.ascii());
}
@@ -69,8 +69,8 @@ int main(int argc, char *argv[])
{
KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption
- QCString instname = "kword";
- QString desktopPath = QString::fromLatin1( "Office/%1.desktop" ).arg( instname );
+ TQCString instname = "kword";
+ TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname );
qDebug( "Looking for %s", desktopPath.latin1() );
KService::Ptr service = KService::serviceByDesktopPath( desktopPath );
if ( service )
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
if ( s1 )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(s1->comment(KURL(),false)));
+ debug(TQString("Comment is %1").arg(s1->comment(KURL(),false)));
}
else
{
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
if ( s0 )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(s0->comment(KURL(),false)));
+ debug(TQString("Comment is %1").arg(s0->comment(KURL(),false)));
}
else
{
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -128,10 +128,10 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
- QVariant qv = se->property("DocPath");
- debug(QString("Property type is %1").arg(qv.typeName()));
- debug(QString("Property value is %1").arg(qv.toString()));
+ debug(TQString("Comment is %1").arg(se->comment()));
+ TQVariant qv = se->property("DocPath");
+ debug(TQString("Property type is %1").arg(qv.typeName()));
+ debug(TQString("Property value is %1").arg(qv.toString()));
}
else
{
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
#if 1
debug("Querying userprofile for services associated with text/plain");
KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers("text/plain");
- debug(QString("got %1 offers").arg(offers.count()));
+ debug(TQString("got %1 offers").arg(offers.count()));
KServiceTypeProfile::OfferList::Iterator it = offers.begin();
for ( ; it != offers.end() ; it++ )
{
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
debug("Querying userprofile for services associated with KOfficeFilter");
offers = KServiceTypeProfile::offers("KOfficeFilter");
- debug(QString("got %1 offers").arg(offers.count()));
+ debug(TQString("got %1 offers").arg(offers.count()));
it = offers.begin();
for ( ; it != offers.end() ; it++ )
{
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
debug("Querying trader for Konqueror/Plugin");
KTrader::OfferList traderoffers = KTrader::self()->query("Konqueror/Plugin");
- debug(QString("got %1 offers").arg(traderoffers.count()));
+ debug(TQString("got %1 offers").arg(traderoffers.count()));
KTrader::OfferList::Iterator trit = traderoffers.begin();
for ( ; trit != traderoffers.end() ; trit++ )
{
@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
//
debug("\nTrying findByURL for folder_home.png");
- QString fh;
+ TQString fh;
(void)k.iconLoader()->loadIcon("folder_home.png",KIcon::Desktop,0,KIcon::DefaultState,&fh);
mf = KMimeType::findByURL( fh, 0, true, false );
assert( mf );
@@ -211,8 +211,8 @@ int main(int argc, char *argv[])
//debug("\nTrying findByURL for Makefile.am");
//mf = KMimeType::findByURL( KURL("/tmp/Makefile.am"), 0, true, false );
//assert( mf );
- //debug(QString("Name is %1").arg(mf->name()));
- //debug(QString("Comment is %1").arg(mf->comment(KURL(),false)));
+ //debug(TQString("Name is %1").arg(mf->name()));
+ //debug(TQString("Comment is %1").arg(mf->comment(KURL(),false)));
debug("\nTrying findByURL for man:/ls");
mf = KMimeType::findByURL( KURL("man:/ls") );
@@ -228,17 +228,17 @@ int main(int argc, char *argv[])
mtl = KMimeType::allMimeTypes( );
assert( mtl.count() );
- debug(QString("Found %1 mime types.").arg(mtl.count()));
+ debug(TQString("Found %1 mime types.").arg(mtl.count()));
for(int i = 0; i < (int)mtl.count(); i++)
{
- debug(QString("Mime type %1: %2.").arg(i).arg(mtl[i]->name()));
+ debug(TQString("Mime type %1: %2.").arg(i).arg(mtl[i]->name()));
}
KService::List sl;
sl = KService::allServices( );
assert( sl.count() );
- debug(QString("Found %1 services.").arg(sl.count()));
+ debug(TQString("Found %1 services.").arg(sl.count()));
KServiceGroup::Ptr root = KServiceGroup::root();
KServiceGroup::List list = root->entries();
@@ -248,7 +248,7 @@ int main(int argc, char *argv[])
KServiceGroup::Ptr first;
- debug(QString("Found %1 entries").arg(list.count()));
+ debug(TQString("Found %1 entries").arg(list.count()));
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
@@ -262,7 +262,7 @@ int main(int argc, char *argv[])
else if (p->isType(KST_KServiceGroup))
{
KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p);
- debug(QString(" %1 -->").arg(serviceGroup->caption()));
+ debug(TQString(" %1 -->").arg(serviceGroup->caption()));
if (!first) first = serviceGroup;
}
else
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
if (first)
{
list = first->entries();
- debug(QString("Found %1 entries").arg(list.count()));
+ debug(TQString("Found %1 entries").arg(list.count()));
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
@@ -282,12 +282,12 @@ int main(int argc, char *argv[])
if (p->isType(KST_KService))
{
KService *service = static_cast<KService *>(p);
- debug(QString(" %1").arg(service->name()));
+ debug(TQString(" %1").arg(service->name()));
}
else if (p->isType(KST_KServiceGroup))
{
KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p);
- debug(QString(" %1 -->").arg(serviceGroup->caption()));
+ debug(TQString(" %1 -->").arg(serviceGroup->caption()));
}
else
{
@@ -307,8 +307,8 @@ int main(int argc, char *argv[])
debug("--End of list--");
debug("--protocols--");
- QStringList stringL = KProtocolInfo::protocols();
- for( QStringList::ConstIterator it = stringL.begin();
+ TQStringList stringL = KProtocolInfo::protocols();
+ for( TQStringList::ConstIterator it = stringL.begin();
it != stringL.end(); it++)
{
debug((*it).ascii());
@@ -319,38 +319,38 @@ int main(int argc, char *argv[])
#if 0
KImageIO::registerFormats();
- QStringList types;
+ TQStringList types;
types = KImageIO::types(KImageIO::Reading);
debug("Can read:");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
- debug(QString(" %1").arg((*it)));
+ debug(TQString(" %1").arg((*it)));
types = KImageIO::types(KImageIO::Writing);
debug("Can write:");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
- debug(QString(" %1").arg((*it)));
+ debug(TQString(" %1").arg((*it)));
- QString rPattern = KImageIO::pattern( KImageIO::Reading );
+ TQString rPattern = KImageIO::pattern( KImageIO::Reading );
debug("Read pattern:\n%s", rPattern.ascii());
- QString wPattern = KImageIO::pattern( KImageIO::Writing );
+ TQString wPattern = KImageIO::pattern( KImageIO::Writing );
debug("Write pattern:\n%s", wPattern.ascii());
- QString suffix = KImageIO::suffix("JPEG");
+ TQString suffix = KImageIO::suffix("JPEG");
debug("Standard suffix for JPEG: %s", suffix.ascii());
types = KImageIO::mimeTypes(KImageIO::Reading);
debug("Can read (mimetypes):");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
debug(" %s", (*it).ascii());
types = KImageIO::mimeTypes(KImageIO::Writing);
debug("Can write (mimetypes):");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
debug(" %s", (*it).ascii());
diff --git a/kio/tests/ktartest.cpp b/kio/tests/ktartest.cpp
index 055d016a7..5fe4a4f1f 100644
--- a/kio/tests/ktartest.cpp
+++ b/kio/tests/ktartest.cpp
@@ -19,14 +19,14 @@
#include "ktar.h"
#include <stdio.h>
#include <kinstance.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
-void recursive_print( const KTarDirectory * dir, const QString & path )
+void recursive_print( const KTarDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KTarEntry* entry = dir->entry( (*it) );
@@ -51,7 +51,7 @@ int main( int argc, char** argv )
return 1;
}
KInstance instance("ktartest");
- QString command = argv[1];
+ TQString command = argv[1];
if ( command == "list" )
{
KTarGz tar( argv[2] );
@@ -120,9 +120,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
tar.close();
@@ -143,7 +143,7 @@ int main( int argc, char** argv )
// implementation fares
for (int i = 98; i < 514 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -165,9 +165,9 @@ int main( int argc, char** argv )
const KTarEntry* entry = dir->entry( "my/dir/test3" );
if ( entry && entry->isFile() )
{
- QIODevice *dev = static_cast<const KTarFile *>(entry)->device();
- QByteArray contents = dev->readAll();
- printf("contents='%s'\n", QCString(contents, contents.size()+1 ).data());
+ TQIODevice *dev = static_cast<const KTarFile *>(entry)->device();
+ TQByteArray contents = dev->readAll();
+ printf("contents='%s'\n", TQCString(contents, contents.size()+1 ).data());
} else
printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry);
return 0;
diff --git a/kio/tests/ktradertest.cpp b/kio/tests/ktradertest.cpp
index 28d3730d6..34ce8e3bc 100644
--- a/kio/tests/ktradertest.cpp
+++ b/kio/tests/ktradertest.cpp
@@ -44,18 +44,18 @@ int main( int argc, char **argv )
if ( args->count() < 1 )
KCmdLineArgs::usage();
- QString query = QString::fromLocal8Bit( args->arg( 0 ) );
+ TQString query = TQString::fromLocal8Bit( args->arg( 0 ) );
- QString genericServiceType, constraint, preference;
+ TQString genericServiceType, constraint, preference;
if ( args->count() >= 2 )
- genericServiceType = QString::fromLocal8Bit( args->arg( 1 ) );
+ genericServiceType = TQString::fromLocal8Bit( args->arg( 1 ) );
if ( args->count() >= 3 )
- constraint = QString::fromLocal8Bit( args->arg( 2 ) );
+ constraint = TQString::fromLocal8Bit( args->arg( 2 ) );
if ( args->count() == 4 )
- preference = QString::fromLocal8Bit( args->arg( 3 ) );
+ preference = TQString::fromLocal8Bit( args->arg( 3 ) );
printf( "query is : %s\n", query.local8Bit().data() );
printf( "genericServiceType is : %s\n", genericServiceType.local8Bit().data() );
@@ -72,12 +72,12 @@ int main( int argc, char **argv )
for (; it != end; ++it, ++i )
{
printf("---- Offer %d ----\n", i);
- QStringList props = (*it)->propertyNames();
- QStringList::ConstIterator propIt = props.begin();
- QStringList::ConstIterator propEnd = props.end();
+ TQStringList props = (*it)->propertyNames();
+ TQStringList::ConstIterator propIt = props.begin();
+ TQStringList::ConstIterator propEnd = props.end();
for (; propIt != propEnd; ++propIt )
{
- QVariant prop = (*it)->property( *propIt );
+ TQVariant prop = (*it)->property( *propIt );
if ( !prop.isValid() )
{
@@ -85,15 +85,15 @@ int main( int argc, char **argv )
continue;
}
- QString outp = *propIt;
+ TQString outp = *propIt;
outp += " : '";
switch ( prop.type() )
{
- case QVariant::StringList:
+ case TQVariant::StringList:
outp += prop.toStringList().join(" - ");
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
outp += prop.toBool() ? "TRUE" : "FALSE";
break;
default:
diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp
index 9a041e28f..8e4b023cb 100644
--- a/kio/tests/kurifiltertest.cpp
+++ b/kio/tests/kurifiltertest.cpp
@@ -29,23 +29,23 @@
#include <kstandarddirs.h>
#include <ksimpleconfig.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kio/netaccess.h>
static const char * const s_uritypes[] = { "NET_PROTOCOL", "LOCAL_FILE", "LOCAL_DIR", "EXECUTABLE", "HELP", "SHELL", "BLOCKED", "ERROR", "UNKNOWN" };
#define NO_FILTERING -2
-void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, QStringList list = QStringList(), const char * abs_path = 0, bool checkForExecutables = true )
+void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, TQStringList list = TQStringList(), const char * abs_path = 0, bool checkForExecutables = true )
{
- QString a = QString::fromUtf8( u );
+ TQString a = TQString::fromUtf8( u );
KURIFilterData * m_filterData = new KURIFilterData;
m_filterData->setData( a );
m_filterData->setCheckForExecutables( checkForExecutables );
if( abs_path )
{
- m_filterData->setAbsolutePath( QString::fromLatin1( abs_path ) );
+ m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) );
kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl;
}
else
@@ -54,7 +54,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
if (KURIFilter::self()->filterURI(*m_filterData, list))
{
// Copied from minicli...
- QString cmd;
+ TQString cmd;
KURL uri = m_filterData->uri();
if ( uri.isLocalFile() && !uri.hasRef() && uri.query().isEmpty() )
@@ -97,8 +97,8 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
if ( expectedResult )
{
// Hack for other locales than english, normalize google hosts to google.com
- cmd = cmd.replace( QRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" );
- if ( cmd != QString::fromLatin1( expectedResult ) )
+ cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" );
+ if ( cmd != TQString::fromLatin1( expectedResult ) )
{
kdError() << " Got " << cmd << " expected " << expectedResult << endl;
::exit(1);
@@ -125,13 +125,13 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
kdDebug() << "-----" << endl;
}
-void testLocalFile( const QString& filename )
+void testLocalFile( const TQString& filename )
{
- QFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog!
+ TQFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog!
if ( tmpFile.open( IO_ReadWrite ) )
{
- QCString fname = QFile::encodeName( tmpFile.name() );
+ TQCString fname = TQFile::encodeName( tmpFile.name() );
filter(fname, fname, KURIFilterData::LOCAL_FILE);
tmpFile.close();
tmpFile.remove();
@@ -155,7 +155,7 @@ int main(int argc, char **argv)
{
// Ensure that user configuration doesn't change the results of those tests
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-kurifiltertest" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-kurifiltertest" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KAboutData aboutData(appName, programName, version, description);
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
cfg.sync();
}
- QStringList minicliFilters;
+ TQStringList minicliFilters;
minicliFilters << "kshorturifilter" << "kurisearchfilter" << "localdomainurifilter";
// URI that should require no filtering
@@ -241,8 +241,8 @@ int main(int argc, char **argv)
filter( "/", "/", KURIFilterData::LOCAL_DIR );
filter( "/", "/", KURIFilterData::LOCAL_DIR, "kshorturifilter" );
- filter( "~/.bashrc", QDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" );
- filter( "~", QDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" );
+ filter( "~/.bashrc", TQDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" );
+ filter( "~", TQDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" );
filter( "~foobar", 0, KURIFilterData::ERROR, "kshorturifilter" );
filter( "user@host.domain", "mailto:user@host.domain", KURIFilterData::NET_PROTOCOL ); // new in KDE-3.2
@@ -270,7 +270,7 @@ int main(int argc, char **argv)
// a search using the default search engine
// 'ls' is a bit of a special case though, due to the toplevel domain called 'ls'
filter( "cp", "http://www.google.com/search?q=cp&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL,
- QStringList(), 0, false /* don't check for executables, see konq_misc.cc */ );
+ TQStringList(), 0, false /* don't check for executables, see konq_misc.cc */ );
// Executable tests - No IKWS in minicli
filter( "cp", "cp", KURIFilterData::EXECUTABLE, minicliFilters );
@@ -288,13 +288,13 @@ int main(int argc, char **argv)
setenv( "SOMEVAR", "/somevar", 0 );
setenv( "ETC", "/etc", 0 );
- QCString qtdir=getenv("QTDIR");
- QCString home = getenv("HOME");
- QCString kdehome = getenv("KDEHOME");
+ TQCString qtdir=getenv("QTDIR");
+ TQCString home = getenv("HOME");
+ TQCString kdehome = getenv("KDEHOME");
filter( "$SOMEVAR/kdelibs/kio", 0, KURIFilterData::ERROR ); // note: this dir doesn't exist...
filter( "$ETC/passwd", "/etc/passwd", KURIFilterData::LOCAL_FILE );
- filter( "$QTDIR/doc/html/functions.html#s", QCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE );
+ filter( "$QTDIR/doc/html/functions.html#s", TQCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE );
filter( "http://www.kde.org/$USER", "http://www.kde.org/$USER", KURIFilterData::NET_PROTOCOL ); // no expansion
// Assume the default (~/.kde) if
@@ -337,7 +337,7 @@ int main(int argc, char **argv)
filter( "$HOME", home, KURIFilterData::LOCAL_DIR, "kshorturifilter" ); //use specific filter.
- QCString sc;
+ TQCString sc;
filter( sc.sprintf("gg%cfoo bar",delimiter), "http://www.google.com/search?q=foo+bar&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL );
filter( sc.sprintf("bug%c55798", delimiter), "http://bugs.kde.org/show_bug.cgi?id=55798", KURIFilterData::NET_PROTOCOL );
diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp
index ac0108ead..612dab558 100644
--- a/kio/tests/kurlcompletiontest.cpp
+++ b/kio/tests/kurlcompletiontest.cpp
@@ -19,9 +19,9 @@
#include <kapplication.h>
#include <kurlcompletion.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempdir.h>
#include <kcmdlineargs.h>
#include <unistd.h>
@@ -42,7 +42,7 @@ private:
KURLCompletion* m_completion;
KTempDir* m_tempDir;
KURL m_dirURL;
- QString m_dir;
+ TQString m_dir;
};
void KURLCompletionTest::setup( bool setDirAsURL )
@@ -62,12 +62,12 @@ void KURLCompletionTest::setup( bool setDirAsURL )
}
m_dirURL.setPath( m_dir );
- QFile f1( m_dir + "/file1" );
+ TQFile f1( m_dir + "/file1" );
bool ok = f1.open( IO_WriteOnly );
assert( ok );
f1.close();
- QFile f2( m_dir + "/file#a" );
+ TQFile f2( m_dir + "/file#a" );
ok = f2.open( IO_WriteOnly );
assert( ok );
f2.close();
@@ -94,22 +94,22 @@ void KURLCompletionTest::testLocalRelativePath()
// Completion from relative path, with two matches
m_completion->makeCompletion( "f" );
waitForCompletion();
- QStringList comp1all = m_completion->allMatches();
+ TQStringList comp1all = m_completion->allMatches();
assert( comp1all.count() == 2 );
assert( comp1all.find( "file1" ) != comp1all.end() );
assert( comp1all.find( "file#a" ) != comp1all.end() );
- QString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does
+ TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does
assert( comp1 == "file1" );
// Completion from relative path
kdDebug() << endl << k_funcinfo << "now completing on 'file#'" << endl;
m_completion->makeCompletion( "file#" );
waitForCompletion();
- QStringList compall = m_completion->allMatches();
+ TQStringList compall = m_completion->allMatches();
kdDebug() << compall << endl;
assert( compall.count() == 1 );
assert( compall.first() == "file#a" );
- QString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does
+ TQString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does
assert( comp2 == "file#a" );
}
@@ -119,10 +119,10 @@ void KURLCompletionTest::testLocalAbsolutePath()
kdDebug() << k_funcinfo << m_dir+"file#" << endl;
m_completion->makeCompletion( m_dir + "file#" );
waitForCompletion();
- QStringList compall = m_completion->allMatches();
+ TQStringList compall = m_completion->allMatches();
kdDebug() << compall << endl;
assert( compall.count() == 1 );
- QString comp = compall.first();
+ TQString comp = compall.first();
assert( comp == m_dir + "file#a" );
comp = m_completion->replacedPath( comp ); // like KURLRequester does
assert( comp == m_dir + "file#a" );
@@ -135,20 +135,20 @@ void KURLCompletionTest::testLocalURL()
KURL url = KURL::fromPathOrURL( m_dirURL.path() + "file" );
m_completion->makeCompletion( url.prettyURL() );
waitForCompletion();
- QStringList comp1all = m_completion->allMatches();
+ TQStringList comp1all = m_completion->allMatches();
kdDebug() << comp1all << endl;
assert( comp1all.count() == 2 );
assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() );
- QString filehash = m_dirURL.url() + "file%23a";
+ TQString filehash = m_dirURL.url() + "file%23a";
assert( comp1all.find( filehash ) != comp1all.end() );
- QString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!!
+ TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!!
kdDebug() << filehashPath << endl;
assert( filehashPath == m_dirURL.path() + "file#a" );
// Completion from URL with no match
url = KURL::fromPathOrURL( m_dirURL.path() + "foobar" );
kdDebug() << k_funcinfo << "makeCompletion(" << url << ")" << endl;
- QString comp2 = m_completion->makeCompletion( url.prettyURL() );
+ TQString comp2 = m_completion->makeCompletion( url.prettyURL() );
assert( comp2.isEmpty() );
waitForCompletion();
assert( m_completion->allMatches().isEmpty() );
diff --git a/kio/tests/kziptest.cpp b/kio/tests/kziptest.cpp
index 11ad36b7d..5b784c40b 100644
--- a/kio/tests/kziptest.cpp
+++ b/kio/tests/kziptest.cpp
@@ -20,14 +20,14 @@
#include <stdio.h>
#include <kinstance.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
-void recursive_print( const KArchiveDirectory * dir, const QString & path )
+void recursive_print( const KArchiveDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* entry = dir->entry( (*it) );
@@ -36,7 +36,7 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path )
entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->size(),
entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->position(),
path.latin1(), (*it).latin1(), entry->isDirectory(),
- !entry->symlink() ? "" : QString(" symlink: %1").arg(entry->symlink()).latin1() );
+ !entry->symlink() ? "" : TQString(" symlink: %1").arg(entry->symlink()).latin1() );
// if (!entry->isDirectory()) printf("%d", ((KArchiveFile*)entry)->size());
printf("\n");
@@ -47,10 +47,10 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path )
void recursive_transfer(const KArchiveDirectory * dir,
- const QString & path, KZip * zip)
+ const TQString & path, KZip * zip)
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* e = dir->entry( (*it) );
@@ -61,9 +61,9 @@ void recursive_transfer(const KArchiveDirectory * dir,
const KArchiveFile* f = (KArchiveFile*)e;
printf("FILE=%s\n", e->name().latin1());
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
if (e->symlink().isEmpty()) {
@@ -99,7 +99,7 @@ int main( int argc, char** argv )
return 1;
}
KInstance instance("kziptest");
- QString command = argv[1];
+ TQString command = argv[1];
if ( command == "list" )
{
KZip zip( argv[2] );
@@ -178,10 +178,10 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
Q_ASSERT( arr.size() == 13 );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
Q_ASSERT( str == "Noch so einer" );
printf("DATA=%s\n", str.latin1());
@@ -211,7 +211,7 @@ int main( int argc, char** argv )
// Generate long filenames of each possible length bigger than 98...
for (int i = 98; i < 500 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -233,10 +233,10 @@ int main( int argc, char** argv )
const KArchiveEntry* entry = dir->entry( "my/dir/test3" );
if ( entry && entry->isFile() )
{
- QIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device();
+ TQIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device();
if ( dev ) {
- QByteArray contents = dev->readAll();
- printf("contents='%s'\n", QCString(contents, contents.size()+1).data());
+ TQByteArray contents = dev->readAll();
+ printf("contents='%s'\n", TQCString(contents, contents.size()+1).data());
}
} else
printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry);
@@ -253,8 +253,8 @@ int main( int argc, char** argv )
}
const KArchiveDirectory* dir = zip.directory();
kdDebug() << "Listing toplevel of zip file" << endl;
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* e = dir->entry( (*it) );
@@ -264,9 +264,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
}
}
@@ -291,9 +291,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
// printf("DATA=%s\n", str.latin1());
printf("%s", str.latin1());
zip.close();
@@ -318,16 +318,16 @@ int main( int argc, char** argv )
// Q_ASSERT( e && e->isFile() );
// const KArchiveFile* f = (KArchiveFile*)e;
-// QCString data( "This is some new data that goes into " );
+// TQCString data( "This is some new data that goes into " );
// data += argv[3];
- QFile f ( argv[3] );
+ TQFile f ( argv[3] );
if (!f.open( IO_ReadOnly ))
{
printf("Could not open %s for reading\n", argv[2] );
return 1;
}
- QDataStream s( &f );
+ TQDataStream s( &f );
// zip.writeFile( argv[3], "", "", data.size(), data.data() );
@@ -402,9 +402,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
zip.close();
@@ -419,9 +419,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
// printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
// printf("DATA=%s\n", str.latin1());
printf("%s", str.latin1());
zip.close();
diff --git a/kio/tests/metatest.cpp b/kio/tests/metatest.cpp
index 9a5824132..54b87b6a0 100644
--- a/kio/tests/metatest.cpp
+++ b/kio/tests/metatest.cpp
@@ -1,11 +1,11 @@
#include <kapplication.h>
#include <kfilemetainfo.h>
#include <kcmdlineargs.h>
-#include <qstringlist.h>
-#include <qimage.h>
+#include <tqstringlist.h>
+#include <tqimage.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
#define I18N_NOOP
@@ -28,11 +28,11 @@
void printKeyValues(KFileMetaInfo& info)
{
- QStringList l = info.preferredKeys();
+ TQStringList l = info.preferredKeys();
kdDebug() << "found " << l.size() << " keys\n";
- QString s;
- QStringList::Iterator it;
+ TQString s;
+ TQStringList::Iterator it;
for (it = l.begin(); it!=l.end(); ++it)
{
s +=" - " + *it;
@@ -42,23 +42,23 @@ void printKeyValues(KFileMetaInfo& info)
for (it = l.begin(); it!=l.end(); ++it)
{
KFileMetaInfoItem item = info.item(*it);
- if ( item.isValid() && item.value().canCast(QVariant::String)) {
+ if ( item.isValid() && item.value().canCast(TQVariant::String)) {
kdDebug() << item.key() << "(" << item.translatedKey() << ") -> "
<< item.string() << endl;
}
}
}
-void printMimeTypeInfo(QString mimetype)
+void printMimeTypeInfo(TQString mimetype)
{
const KFileMimeTypeInfo* info = KFileMetaInfoProvider::self()->mimeTypeInfo(mimetype);
if (!info) return;
kdDebug() << "Preferred groups:\n";
kdDebug() << "=================\n";
- QStringList groups = info->preferredGroups();
+ TQStringList groups = info->preferredGroups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << *it << endl;
}
@@ -67,12 +67,12 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << "Supported groups:\n";
kdDebug() << "=================\n";
groups = info->supportedGroups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << *it << endl;
}
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
const KFileMimeTypeInfo::GroupInfo* groupinfo = info->groupInfo(*it);
@@ -84,16 +84,16 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << endl;
kdDebug() << " Supported keys:\n";
- QStringList keys = groupinfo->supportedKeys();
+ TQStringList keys = groupinfo->supportedKeys();
if (!keys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit)
+ for (TQStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit)
{
kdDebug() << " " << *kit << endl;
const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->itemInfo(*kit);
kdDebug() << " Key: " << iti->key() << endl;
kdDebug() << " Translated: " << iti->key() << endl;
- kdDebug() << " Type: " << QVariant::typeToName(iti->type()) << endl;
+ kdDebug() << " Type: " << TQVariant::typeToName(iti->type()) << endl;
kdDebug() << " Unit: " << iti->unit() << endl;
kdDebug() << " Hint: " << iti->hint() << endl;
kdDebug() << " Attributes: " << iti->attributes() << endl;
@@ -108,16 +108,16 @@ void printMimeTypeInfo(QString mimetype)
if (groupinfo->supportsVariableKeys())
{
const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->variableItemInfo();
- kdDebug() << " variable key type/attr: " << QVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl;
+ kdDebug() << " variable key type/attr: " << TQVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl;
}
}
kdDebug() << endl;
kdDebug() << "Preferred keys:\n";
kdDebug() << "===============\n";
- QStringList prefKeys = info->preferredKeys();
+ TQStringList prefKeys = info->preferredKeys();
if (!prefKeys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit)
+ for (TQStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit)
{
kdDebug() << *kit << endl;
}
@@ -125,21 +125,21 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << endl;
kdDebug() << "Supported keys:\n";
kdDebug() << "===============\n";
- QStringList supKeys = info->supportedKeys();
+ TQStringList supKeys = info->supportedKeys();
if (!supKeys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit)
+ for (TQStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit)
{
kdDebug() << *kit << endl;
}
}
-void addGroup(KFileMetaInfo& info, QString group)
+void addGroup(KFileMetaInfo& info, TQString group)
{
kdDebug() << "trying to add group " << group << endl;
kdDebug() << "groups before: \n";
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
if (info.addGroup(group))
@@ -157,24 +157,24 @@ void addGroup(KFileMetaInfo& info, QString group)
kdDebug() << "and afterwards: \n";
groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
}
-void removeGroup(KFileMetaInfo& info, QString group)
+void removeGroup(KFileMetaInfo& info, TQString group)
{
kdDebug() << "trying to remove group " << group << endl;
kdDebug() << "groups before: \n";
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
info.removeGroup(group);
kdDebug() << "and afterwards: \n";
groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
}
@@ -193,7 +193,7 @@ int main( int argc, char **argv )
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QCString ov;
+ TQCString ov;
ov = args->getOption("mimetypeinfo");
if (ov)
{
@@ -203,19 +203,19 @@ int main( int argc, char **argv )
if (!args->count()) return 1;
- KFileMetaInfo info( args->url(0), QString::null, KFileMetaInfo::Everything);
+ KFileMetaInfo info( args->url(0), TQString::null, KFileMetaInfo::Everything);
if (args->isSet("groups"))
{
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << "group " << *it << endl;
}
return 0;
}
- QString group, item;
+ TQString group, item;
ov = args->getOption("addgroup");
if (ov) addGroup(info, ov);
@@ -254,7 +254,7 @@ int main( int argc, char **argv )
ov = args->getOption("set");
if (ov && !group.isNull() && !item.isNull())
{
- if (info[group][item].setValue(QString(ov)))
+ if (info[group][item].setValue(TQString(ov)))
kdDebug() << "setValue success\n";
else
kdDebug() << "setValue failed\n";
@@ -272,7 +272,7 @@ int main( int argc, char **argv )
if (args->isSet("validator") && !group.isNull() && !item.isNull())
{
const KFileMimeTypeInfo* kfmti = KFileMetaInfoProvider::self()->mimeTypeInfo(info.mimeType());
- QValidator* v = kfmti->createValidator(group, item);
+ TQValidator* v = kfmti->createValidator(group, item);
if (!v)
kdDebug() << "got no validator\n";
else
@@ -306,11 +306,11 @@ int main( int argc, char **argv )
kdDebug() << "type of thumbnail is " << thumbitem.value().typeName() << endl;
- if (thumbitem.isValid() && thumbitem.value().canCast(QVariant::Image))
+ if (thumbitem.isValid() && thumbitem.value().canCast(TQVariant::Image))
{
- QLabel* label = new QLabel(0);
+ TQLabel* label = new TQLabel(0);
app.setMainWidget(label);
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(thumbitem.value().toImage());
label->setPixmap(pix);
label->show();
diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp
index 6ac85fcfc..9fb0ff07a 100644
--- a/kio/tests/netaccesstest.cpp
+++ b/kio/tests/netaccesstest.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
int main(int argc, char **argv)
{
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
if ( !KIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) )
kdError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl;
else {
- QFile f( tmpURL.path() );
+ TQFile f( tmpURL.path() );
if (!f.open(IO_ReadOnly))
kdFatal() << "Cannot open: " << f.name() << ". The error was: " << f.errorString() << endl;
else {
diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp
index 66fa9398e..f2b740224 100644
--- a/kio/tests/previewtest.cpp
+++ b/kio/tests/previewtest.cpp
@@ -1,7 +1,7 @@
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -12,16 +12,16 @@
#include "previewtest.moc"
PreviewTest::PreviewTest()
- :QWidget()
+ :TQWidget()
{
- QGridLayout *layout = new QGridLayout(this, 2, 2);
+ TQGridLayout *layout = new TQGridLayout(this, 2, 2);
m_url = new KLineEdit(this);
m_url->setText("/home/malte/gore_bush.jpg");
layout->addWidget(m_url, 0, 0);
- QPushButton *btn = new QPushButton("Generate", this);
- connect(btn, SIGNAL(clicked()), SLOT(slotGenerate()));
+ TQPushButton *btn = new TQPushButton("Generate", this);
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate()));
layout->addWidget(btn, 0, 1);
- m_preview = new QLabel(this);
+ m_preview = new TQLabel(this);
m_preview->setMinimumSize(400, 300);
layout->addMultiCellWidget(m_preview, 1, 1, 0, 1);
}
@@ -31,9 +31,9 @@ void PreviewTest::slotGenerate()
KURL::List urls;
urls.append(m_url->text());
KIO::PreviewJob *job = KIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(job, SIGNAL(gotPreview(const KFileItem *, const QPixmap &)), SLOT(slotPreview(const KFileItem *, const QPixmap &)));
- connect(job, SIGNAL(failed(const KFileItem *)), SLOT(slotFailed()));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(gotPreview(const KFileItem *, const TQPixmap &)), TQT_SLOT(slotPreview(const KFileItem *, const TQPixmap &)));
+ connect(job, TQT_SIGNAL(failed(const KFileItem *)), TQT_SLOT(slotFailed()));
}
void PreviewTest::slotResult(KIO::Job*)
@@ -41,7 +41,7 @@ void PreviewTest::slotResult(KIO::Job*)
kdDebug() << "PreviewTest::slotResult(...)" << endl;
}
-void PreviewTest::slotPreview(const KFileItem *, const QPixmap &pix)
+void PreviewTest::slotPreview(const KFileItem *, const TQPixmap &pix)
{
kdDebug() << "PreviewTest::slotPreview()" << endl;
m_preview->setPixmap(pix);
diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h
index 52c10f240..99b329f9d 100644
--- a/kio/tests/previewtest.h
+++ b/kio/tests/previewtest.h
@@ -1,5 +1,5 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kio/job.h>
class KLineEdit;
@@ -15,11 +15,11 @@ public:
private slots:
void slotGenerate();
void slotResult(KIO::Job *);
- void slotPreview( const KFileItem *, const QPixmap & );
+ void slotPreview( const KFileItem *, const TQPixmap & );
void slotFailed();
private:
KLineEdit *m_url;
- QLabel *m_preview;
+ TQLabel *m_preview;
};
diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp
index fc7128f35..d8ddae20a 100644
--- a/kio/tests/speed.cpp
+++ b/kio/tests/speed.cpp
@@ -22,20 +22,20 @@
#include "speed.h"
#include <kio/job.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kio/global.h>
using namespace KIO;
SpeedTest::SpeedTest( const KURL & url )
- : QObject(0, "speed")
+ : TQObject(0, "speed")
{
Job *job = listRecursive( url );
- //Job *job = del( KURL("file:" + QDir::currentDirPath()) ); DANGEROUS !
- connect(job, SIGNAL( result( KIO::Job*)),
- SLOT( finished( KIO::Job* ) ));
- /*connect(job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( entries( KIO::Job*, const KIO::UDSEntryList&)));
+ //Job *job = del( KURL("file:" + TQDir::currentDirPath()) ); DANGEROUS !
+ connect(job, TQT_SIGNAL( result( KIO::Job*)),
+ TQT_SLOT( finished( KIO::Job* ) ));
+ /*connect(job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList&)));
*/
}
@@ -77,11 +77,11 @@ int main(int argc, char **argv) {
if ( args->count() == 1 )
url = args->url(0);
else
- url = "file:" + QDir::currentDirPath();
+ url = "file:" + TQDir::currentDirPath();
kdDebug() << url.url() << " is probably " << (KIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n";
kdDebug() << url.url() << " is " << (KIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n";
- QString mp = KIO::findDeviceMountPoint(url.path());
+ TQString mp = KIO::findDeviceMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for device " << url.url() << " found\n";
} else
@@ -103,7 +103,7 @@ int main(int argc, char **argv) {
// SpeedTest test( url );
// app.exec();
- url.setPath(QDir::homeDirPath());
+ url.setPath(TQDir::homeDirPath());
mp = KIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
@@ -124,7 +124,7 @@ int main(int argc, char **argv) {
if ( args->count() == 1 )
url = args->url(0);
else
- url = "file:" + QDir::currentDirPath();
+ url = "file:" + TQDir::currentDirPath();
mp = KIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
diff --git a/kio/tests/speed.h b/kio/tests/speed.h
index e66970f0f..69b12465f 100644
--- a/kio/tests/speed.h
+++ b/kio/tests/speed.h
@@ -9,7 +9,7 @@ namespace KIO {
class Job;
}
-class SpeedTest : public QObject {
+class SpeedTest : public TQObject {
Q_OBJECT
public:
diff --git a/kioslave/bzip2/kbzip2filter.cpp b/kioslave/bzip2/kbzip2filter.cpp
index 5ef6aaf5b..ae72990d8 100644
--- a/kioslave/bzip2/kbzip2filter.cpp
+++ b/kioslave/bzip2/kbzip2filter.cpp
@@ -49,7 +49,7 @@ class KBzip2FilterFactory : public KLibFactory
public:
KBzip2FilterFactory() : KLibFactory() {}
virtual ~KBzip2FilterFactory(){}
- QObject *createObject( QObject *, const char *, const char*, const QStringList & )
+ TQObject *createObject( TQObject *, const char *, const char*, const TQStringList & )
{
return new KBzip2Filter;
}
diff --git a/kioslave/bzip2/kbzip2filter.h b/kioslave/bzip2/kbzip2filter.h
index 47ccef915..2a7b13cf3 100644
--- a/kioslave/bzip2/kbzip2filter.h
+++ b/kioslave/bzip2/kbzip2filter.h
@@ -36,7 +36,7 @@ public:
virtual void terminate();
virtual void reset();
virtual bool readHeader() { return true; } // bzip2 handles it by itself ! Cool !
- virtual bool writeHeader( const QCString & ) { return true; }
+ virtual bool writeHeader( const TQCString & ) { return true; }
virtual void setOutBuffer( char * data, uint maxlen );
virtual void setInBuffer( const char * data, uint size );
virtual int inBufferAvailable() const;
diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc
index c24413cc7..1fde27a81 100644
--- a/kioslave/file/file.cc
+++ b/kioslave/file/file.cc
@@ -24,7 +24,7 @@
#include <config.h>
-#include <qglobal.h> //for Q_OS_XXX
+#include <tqglobal.h> //for Q_OS_XXX
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
@@ -66,8 +66,8 @@
#include <string.h>
#endif
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include <kshred.h>
#include <kdebug.h>
@@ -76,8 +76,8 @@
#include <ksimpleconfig.h>
#include <ktempfile.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qstrlist.h>
+#include <tqfile.h>
+#include <tqstrlist.h>
#include "file.h"
#include <limits.h>
#include <kprocess.h>
@@ -99,11 +99,11 @@ using namespace KIO;
#define MAX_IPC_SIZE (1024*32)
-static QString testLogFile( const char *_filename );
+static TQString testLogFile( const char *_filename );
#ifdef USE_POSIX_ACL
-static QString aclAsString( acl_t p_acl );
+static TQString aclAsString( acl_t p_acl );
static bool isExtendedACL( acl_t p_acl );
-static void appendACLAtoms( const QCString & path, UDSEntry& entry,
+static void appendACLAtoms( const TQCString & path, UDSEntry& entry,
mode_t type, bool withACL );
#endif
@@ -131,7 +131,7 @@ int kdemain( int argc, char **argv )
}
-FileProtocol::FileProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "file", pool, app )
+FileProtocol::FileProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "file", pool, app )
{
usercache.setAutoDelete( true );
groupcache.setAutoDelete( true );
@@ -143,8 +143,8 @@ int FileProtocol::setACL( const char *path, mode_t perm, bool directoryDefault )
int ret = 0;
#ifdef USE_POSIX_ACL
- const QString ACLString = metaData( "ACL_STRING" );
- const QString defaultACLString = metaData( "DEFAULT_ACL_STRING" );
+ const TQString ACLString = metaData( "ACL_STRING" );
+ const TQString defaultACLString = metaData( "DEFAULT_ACL_STRING" );
// Empty strings mean leave as is
if ( !ACLString.isEmpty() ) {
acl_t acl = 0;
@@ -181,7 +181,7 @@ int FileProtocol::setACL( const char *path, mode_t perm, bool directoryDefault )
void FileProtocol::chmod( const KURL& url, int permissions )
{
- QCString _path( QFile::encodeName(url.path()) );
+ TQCString _path( TQFile::encodeName(url.path()) );
/* FIXME: Should be atomic */
if ( ::chmod( _path.data(), permissions ) == -1 ||
( setACL( _path.data(), permissions, false ) == -1 ) ||
@@ -208,7 +208,7 @@ void FileProtocol::chmod( const KURL& url, int permissions )
void FileProtocol::mkdir( const KURL& url, int permissions )
{
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
kdDebug(7101) << "mkdir(): " << _path << ", permission = " << permissions << endl;
@@ -253,7 +253,7 @@ void FileProtocol::get( const KURL& url )
return;
}
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
@@ -289,7 +289,7 @@ void FileProtocol::get( const KURL& url )
KIO::filesize_t processed_size = 0;
- QString resumeOffset = metaData("resume");
+ TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() )
{
bool ok;
@@ -308,7 +308,7 @@ void FileProtocol::get( const KURL& url )
totalSize( buff.st_size );
char buffer[ MAX_IPC_SIZE ];
- QByteArray array;
+ TQByteArray array;
while( 1 )
{
@@ -334,7 +334,7 @@ void FileProtocol::get( const KURL& url )
//kdDebug( 7101 ) << "Processed: " << KIO::number (processed_size) << endl;
}
- data( QByteArray() );
+ data( TQByteArray() );
close( fd );
@@ -372,14 +372,14 @@ same_inode(const KDE_struct_stat &src, const KDE_struct_stat &dest)
void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resume )
{
- QString dest_orig = url.path();
- QCString _dest_orig( QFile::encodeName(dest_orig));
+ TQString dest_orig = url.path();
+ TQCString _dest_orig( TQFile::encodeName(dest_orig));
kdDebug(7101) << "put(): " << dest_orig << ", mode=" << _mode << endl;
- QString dest_part( dest_orig );
- dest_part += QString::fromLatin1(".part");
- QCString _dest_part( QFile::encodeName(dest_part));
+ TQString dest_part( dest_orig );
+ dest_part += TQString::fromLatin1(".part");
+ TQCString _dest_part( TQFile::encodeName(dest_part));
KDE_struct_stat buff_orig;
bool bOrigExists = (KDE_lstat( _dest_orig.data(), &buff_orig ) != -1);
@@ -415,15 +415,15 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
}
int result;
- QString dest;
- QCString _dest;
+ TQString dest;
+ TQCString _dest;
int fd = -1;
// Loop until we got 0 (end of data)
do
{
- QByteArray buffer;
+ TQByteArray buffer;
dataReq(); // Request for data
result = readData( buffer );
@@ -453,7 +453,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
}
}
- _dest = QFile::encodeName(dest);
+ _dest = TQFile::encodeName(dest);
if ( _resume )
{
@@ -566,9 +566,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
}
// set modification time
- const QString mtimeStr = metaData( "modified" );
+ const TQString mtimeStr = metaData( "modified" );
if ( !mtimeStr.isEmpty() ) {
- QDateTime dt = QDateTime::fromString( mtimeStr, Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( mtimeStr, Qt::ISODate );
if ( dt.isValid() ) {
KDE_struct_stat dest_statbuf;
if (KDE_stat( _dest_orig.data(), &dest_statbuf ) == 0) {
@@ -592,8 +592,8 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
{
kdDebug(7101) << "copy(): " << src << " -> " << dest << ", mode=" << _mode << endl;
- QCString _src( QFile::encodeName(src.path()));
- QCString _dest( QFile::encodeName(dest.path()));
+ TQCString _src( TQFile::encodeName(src.path()));
+ TQCString _dest( TQFile::encodeName(dest.path()));
KDE_struct_stat buff_src;
#ifdef USE_POSIX_ACL
acl_t acl;
@@ -808,7 +808,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
ut.modtime = buff_src.st_mtime;
if ( ::utime( _dest.data(), &ut ) != 0 )
{
- kdWarning() << QString::fromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() ) << endl;
+ kdWarning() << TQString::fromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() ) << endl;
}
processedSize( buff_src.st_size );
@@ -818,8 +818,8 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
void FileProtocol::rename( const KURL &src, const KURL &dest,
bool _overwrite )
{
- QCString _src( QFile::encodeName(src.path()));
- QCString _dest( QFile::encodeName(dest.path()));
+ TQCString _src( TQFile::encodeName(src.path()));
+ TQCString _dest( TQFile::encodeName(dest.path()));
KDE_struct_stat buff_src;
if ( KDE_lstat( _src.data(), &buff_src ) == -1 ) {
if ( errno == EACCES )
@@ -858,7 +858,7 @@ void FileProtocol::rename( const KURL &src, const KURL &dest,
error( KIO::ERR_ACCESS_DENIED, dest.path() );
}
else if (errno == EXDEV) {
- error( KIO::ERR_UNSUPPORTED_ACTION, QString::fromLatin1("rename"));
+ error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename"));
}
else if (errno == EROFS) { // The file is on a read-only filesystem
error( KIO::ERR_CANNOT_DELETE, src.path() );
@@ -872,10 +872,10 @@ void FileProtocol::rename( const KURL &src, const KURL &dest,
finished();
}
-void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwrite )
+void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overwrite )
{
// Assume dest is local too (wouldn't be here otherwise)
- if ( ::symlink( QFile::encodeName( target ), QFile::encodeName( dest.path() ) ) == -1 )
+ if ( ::symlink( TQFile::encodeName( target ), TQFile::encodeName( dest.path() ) ) == -1 )
{
// Does the destination already exist ?
if ( errno == EEXIST )
@@ -883,7 +883,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr
if ( overwrite )
{
// Try to delete the destination
- if ( unlink( QFile::encodeName( dest.path() ) ) != 0 )
+ if ( unlink( TQFile::encodeName( dest.path() ) ) != 0 )
{
error( KIO::ERR_CANNOT_DELETE, dest.path() );
return;
@@ -894,7 +894,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr
else
{
KDE_struct_stat buff_dest;
- KDE_lstat( QFile::encodeName( dest.path() ), &buff_dest );
+ KDE_lstat( TQFile::encodeName( dest.path() ), &buff_dest );
if (S_ISDIR(buff_dest.st_mode))
error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() );
else
@@ -914,7 +914,7 @@ void FileProtocol::symlink( const QString &target, const KURL &dest, bool overwr
void FileProtocol::del( const KURL& url, bool isfile)
{
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
/*****
* Delete files
*****/
@@ -956,35 +956,35 @@ void FileProtocol::del( const KURL& url, bool isfile)
}
-QString FileProtocol::getUserName( uid_t uid )
+TQString FileProtocol::getUserName( uid_t uid )
{
- QString *temp;
+ TQString *temp;
temp = usercache.find( uid );
if ( !temp ) {
struct passwd *user = getpwuid( uid );
if ( user ) {
- usercache.insert( uid, new QString(QString::fromLatin1(user->pw_name)) );
- return QString::fromLatin1( user->pw_name );
+ usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
+ return TQString::fromLatin1( user->pw_name );
}
else
- return QString::number( uid );
+ return TQString::number( uid );
}
else
return *temp;
}
-QString FileProtocol::getGroupName( gid_t gid )
+TQString FileProtocol::getGroupName( gid_t gid )
{
- QString *temp;
+ TQString *temp;
temp = groupcache.find( gid );
if ( !temp ) {
struct group *grp = getgrgid( gid );
if ( grp ) {
- groupcache.insert( gid, new QString(QString::fromLatin1(grp->gr_name)) );
- return QString::fromLatin1( grp->gr_name );
+ groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
+ return TQString::fromLatin1( grp->gr_name );
}
else
- return QString::number( gid );
+ return TQString::number( gid );
}
else
return *temp;
@@ -992,7 +992,7 @@ QString FileProtocol::getGroupName( gid_t gid )
-bool FileProtocol::createUDSEntry( const QString & filename, const QCString & path, UDSEntry & entry,
+bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & path, UDSEntry & entry,
short int details, bool withACL )
{
assert(entry.count() == 0); // by contract :-)
@@ -1019,7 +1019,7 @@ bool FileProtocol::createUDSEntry( const QString & filename, const QCString & pa
}
atom.m_uds = KIO::UDS_LINK_DEST;
- atom.m_str = QFile::decodeName( buffer2 );
+ atom.m_str = TQFile::decodeName( buffer2 );
entry.append( atom );
// A symlink -> follow it only if details>1
@@ -1113,9 +1113,9 @@ void FileProtocol::stat( const KURL & url )
* stat("/is/unaccessible/") -> EPERM H.Z.
* This is the reason for the -1
*/
- QCString _path( QFile::encodeName(url.path(-1)));
+ TQCString _path( TQFile::encodeName(url.path(-1)));
- QString sDetails = metaData(QString::fromLatin1("details"));
+ TQString sDetails = metaData(TQString::fromLatin1("details"));
int details = sDetails.isEmpty() ? 2 : sDetails.toInt();
kdDebug(7101) << "FileProtocol::stat details=" << details << endl;
@@ -1183,7 +1183,7 @@ void FileProtocol::listDir( const KURL& url)
return;
}
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
@@ -1216,10 +1216,10 @@ void FileProtocol::listDir( const KURL& url)
return;
}
- // Don't make this a QStringList. The locale file name we get here
+ // Don't make this a TQStringList. The locale file name we get here
// should be passed intact to createUDSEntry to avoid problems with
- // files where QFile::encodeName(QFile::decodeName(a)) != a.
- QStrList entryNames;
+ // files where TQFile::encodeName(TQFile::decodeName(a)) != a.
+ TQStrList entryNames;
while ( ( ep = KDE_readdir( dp ) ) != 0L )
entryNames.append( ep->d_name );
@@ -1250,10 +1250,10 @@ void FileProtocol::listDir( const KURL& url)
}
UDSEntry entry;
- QStrListIterator it(entryNames);
+ TQStrListIterator it(entryNames);
for (; it.current(); ++it) {
entry.clear();
- if ( createUDSEntry( QFile::decodeName(*it),
+ if ( createUDSEntry( TQFile::decodeName(*it),
*it /* we can use the filename as relative path*/,
entry, 2, true ) )
listEntry( entry, false);
@@ -1274,9 +1274,9 @@ void FileProtocol::listDir( const KURL& url)
}
/*
-void FileProtocol::testDir( const QString& path )
+void FileProtocol::testDir( const TQString& path )
{
- QCString _path( QFile::encodeName(path));
+ TQCString _path( TQFile::encodeName(path));
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
error( KIO::ERR_DOES_NOT_EXIST, path );
@@ -1292,16 +1292,16 @@ void FileProtocol::testDir( const QString& path )
}
*/
-void FileProtocol::special( const QByteArray &data)
+void FileProtocol::special( const TQByteArray &data)
{
int tmp;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
stream >> tmp;
switch (tmp) {
case 1:
{
- QString fstype, dev, point;
+ TQString fstype, dev, point;
Q_INT8 iRo;
stream >> iRo >> fstype >> dev >> point;
@@ -1319,7 +1319,7 @@ void FileProtocol::special( const QByteArray &data)
break;
case 2:
{
- QString point;
+ TQString point;
stream >> point;
bool ok = pumount( point );
if (ok)
@@ -1331,13 +1331,13 @@ void FileProtocol::special( const QByteArray &data)
case 3:
{
- QString filename;
+ TQString filename;
stream >> filename;
KShred shred( filename );
- connect( &shred, SIGNAL( processedSize( KIO::filesize_t ) ),
- this, SLOT( slotProcessedSize( KIO::filesize_t ) ) );
- connect( &shred, SIGNAL( infoMessage( const QString & ) ),
- this, SLOT( slotInfoMessage( const QString & ) ) );
+ connect( &shred, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
+ this, TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) );
+ connect( &shred, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ this, TQT_SLOT( slotInfoMessage( const TQString & ) ) );
if (!shred.shred())
error( KIO::ERR_CANNOT_DELETE, filename );
else
@@ -1357,23 +1357,23 @@ void FileProtocol::slotProcessedSize( KIO::filesize_t bytes )
}
// Connected to KShred
-void FileProtocol::slotInfoMessage( const QString & msg )
+void FileProtocol::slotInfoMessage( const TQString & msg )
{
kdDebug(7101) << "FileProtocol::slotInfoMessage (" << msg << ")" << endl;
infoMessage( msg );
}
-void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, const QString& _point )
+void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, const TQString& _point )
{
kdDebug(7101) << "FileProtocol::mount _fstype=" << _fstype << endl;
- QCString buffer;
+ TQCString buffer;
#ifdef HAVE_VOLMGT
/*
* support for Solaris volume management
*/
- QString err;
- QCString devname = QFile::encodeName( _dev );
+ TQString err;
+ TQCString devname = TQFile::encodeName( _dev );
if( volmgt_running() ) {
// kdDebug(7101) << "VOLMGT: vold ok." << endl;
@@ -1399,30 +1399,30 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co
KTempFile tmpFile;
- QCString tmpFileC = QFile::encodeName(tmpFile.name());
+ TQCString tmpFileC = TQFile::encodeName(tmpFile.name());
const char *tmp = tmpFileC.data();
- QCString dev;
+ TQCString dev;
if ( _dev.startsWith( "LABEL=" ) ) { // turn LABEL=foo into -L foo (#71430)
- QString labelName = _dev.mid( 6 );
+ TQString labelName = _dev.mid( 6 );
dev = "-L ";
- dev += QFile::encodeName( KProcess::quote( labelName ) ); // is it correct to assume same encoding as filesystem?
+ dev += TQFile::encodeName( KProcess::quote( labelName ) ); // is it correct to assume same encoding as filesystem?
} else if ( _dev.startsWith( "UUID=" ) ) { // and UUID=bar into -U bar
- QString uuidName = _dev.mid( 5 );
+ TQString uuidName = _dev.mid( 5 );
dev = "-U ";
- dev += QFile::encodeName( KProcess::quote( uuidName ) );
+ dev += TQFile::encodeName( KProcess::quote( uuidName ) );
}
else
- dev = QFile::encodeName( KProcess::quote(_dev) ); // get those ready to be given to a shell
+ dev = TQFile::encodeName( KProcess::quote(_dev) ); // get those ready to be given to a shell
- QCString point = QFile::encodeName( KProcess::quote(_point) );
+ TQCString point = TQFile::encodeName( KProcess::quote(_point) );
bool fstype_empty = !_fstype || !*_fstype;
- QCString fstype = KProcess::quote(_fstype).latin1(); // good guess
- QCString readonly = _ro ? "-r" : "";
- QString epath = QString::fromLatin1(getenv("PATH"));
- QString path = QString::fromLatin1("/sbin:/bin");
+ TQCString fstype = KProcess::quote(_fstype).latin1(); // good guess
+ TQCString readonly = _ro ? "-r" : "";
+ TQString epath = TQString::fromLatin1(getenv("PATH"));
+ TQString path = TQString::fromLatin1("/sbin:/bin");
if(!epath.isEmpty())
- path += QString::fromLatin1(":") + epath;
- QString mountProg = KGlobal::dirs()->findExe("mount", path);
+ path += TQString::fromLatin1(":") + epath;
+ TQString mountProg = KGlobal::dirs()->findExe("mount", path);
if (mountProg.isEmpty()){
error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\""));
return;
@@ -1462,7 +1462,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co
int mount_ret = system( buffer.data() );
- QString err = testLogFile( tmp );
+ TQString err = testLogFile( tmp );
if ( err.isEmpty() && mount_ret == 0)
{
finished();
@@ -1471,7 +1471,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co
else
{
// Didn't work - or maybe we just got a warning
- QString mp = KIO::findDeviceMountPoint( _dev );
+ TQString mp = KIO::findDeviceMountPoint( _dev );
// Is the device mounted ?
if ( !mp.isEmpty() && mount_ret == 0)
{
@@ -1510,13 +1510,13 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const QString& _dev, co
}
-void FileProtocol::unmount( const QString& _point )
+void FileProtocol::unmount( const TQString& _point )
{
- QCString buffer;
+ TQCString buffer;
KTempFile tmpFile;
- QCString tmpFileC = QFile::encodeName(tmpFile.name());
- QString err;
+ TQCString tmpFileC = TQFile::encodeName(tmpFile.name());
+ TQString err;
const char *tmp = tmpFileC.data();
#ifdef HAVE_VOLMGT
@@ -1558,7 +1558,7 @@ void FileProtocol::unmount( const QString& _point )
if( devname == NULL ) {
err = "not in mnttab";
kdDebug(7101) << "VOLMGT: "
- << QFile::encodeName(_point).data()
+ << TQFile::encodeName(_point).data()
<< ": " << err << endl;
error( KIO::ERR_COULD_NOT_UNMOUNT, err );
return;
@@ -1571,7 +1571,7 @@ void FileProtocol::unmount( const QString& _point )
*/
ptr = strrchr( devname, '/' );
*ptr = '\0';
- QCString qdevname(QFile::encodeName(KProcess::quote(QFile::decodeName(QCString(devname)))).data());
+ TQCString qdevname(TQFile::encodeName(KProcess::quote(TQFile::decodeName(TQCString(devname)))).data());
buffer.sprintf( "/usr/bin/eject %s 2>%s", qdevname.data(), tmp );
kdDebug(7101) << "VOLMGT: eject " << qdevname << endl;
@@ -1580,7 +1580,7 @@ void FileProtocol::unmount( const QString& _point )
* exit status == 4 => media was ejected
*/
// if( WEXITSTATUS( system( buffer.local8Bit() )) == 4 ) {
- if( WEXITSTATUS( system( buffer.data() )) == 4 ) { // Fix for QString -> QCString?
+ if( WEXITSTATUS( system( buffer.data() )) == 4 ) { // Fix for TQString -> QCString?
/*
* this is not an error, so skip "testLogFile()"
* to avoid wrong/confusing error popup
@@ -1602,17 +1602,17 @@ void FileProtocol::unmount( const QString& _point )
return;
}
#else
- QString epath = getenv("PATH");
- QString path = QString::fromLatin1("/sbin:/bin");
+ TQString epath = getenv("PATH");
+ TQString path = TQString::fromLatin1("/sbin:/bin");
if (!epath.isEmpty())
path += ":" + epath;
- QString umountProg = KGlobal::dirs()->findExe("umount", path);
+ TQString umountProg = KGlobal::dirs()->findExe("umount", path);
if (umountProg.isEmpty()) {
error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\""));
return;
}
- buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), QFile::encodeName(KProcess::quote(_point)).data(), tmp );
+ buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(KProcess::quote(_point)).data(), tmp );
system( buffer.data() );
#endif /* HAVE_VOLMGT */
@@ -1629,41 +1629,41 @@ void FileProtocol::unmount( const QString& _point )
*
*************************************/
-bool FileProtocol::pmount(const QString &dev)
+bool FileProtocol::pmount(const TQString &dev)
{
- QString epath = getenv("PATH");
- QString path = QString::fromLatin1("/sbin:/bin");
+ TQString epath = getenv("PATH");
+ TQString path = TQString::fromLatin1("/sbin:/bin");
if (!epath.isEmpty())
path += ":" + epath;
- QString pmountProg = KGlobal::dirs()->findExe("pmount", path);
+ TQString pmountProg = KGlobal::dirs()->findExe("pmount", path);
if (pmountProg.isEmpty())
return false;
- QCString buffer;
- buffer.sprintf( "%s %s", QFile::encodeName(pmountProg).data(),
- QFile::encodeName(KProcess::quote(dev)).data() );
+ TQCString buffer;
+ buffer.sprintf( "%s %s", TQFile::encodeName(pmountProg).data(),
+ TQFile::encodeName(KProcess::quote(dev)).data() );
int res = system( buffer.data() );
return res==0;
}
-bool FileProtocol::pumount(const QString &point)
+bool FileProtocol::pumount(const TQString &point)
{
- QString real_point = KStandardDirs::realPath(point);
+ TQString real_point = KStandardDirs::realPath(point);
KMountPoint::List mtab = KMountPoint::currentMountPoints();
KMountPoint::List::const_iterator it = mtab.begin();
KMountPoint::List::const_iterator end = mtab.end();
- QString dev;
+ TQString dev;
for (; it!=end; ++it)
{
- QString tmp = (*it)->mountedFrom();
- QString mp = (*it)->mountPoint();
+ TQString tmp = (*it)->mountedFrom();
+ TQString mp = (*it)->mountPoint();
mp = KStandardDirs::realPath(mp);
if (mp==real_point)
@@ -1673,18 +1673,18 @@ bool FileProtocol::pumount(const QString &point)
if (dev.isEmpty()) return false;
if (dev.endsWith("/")) dev.truncate(dev.length()-1);
- QString epath = getenv("PATH");
- QString path = QString::fromLatin1("/sbin:/bin");
+ TQString epath = getenv("PATH");
+ TQString path = TQString::fromLatin1("/sbin:/bin");
if (!epath.isEmpty())
path += ":" + epath;
- QString pumountProg = KGlobal::dirs()->findExe("pumount", path);
+ TQString pumountProg = KGlobal::dirs()->findExe("pumount", path);
if (pumountProg.isEmpty())
return false;
- QCString buffer;
- buffer.sprintf( "%s %s", QFile::encodeName(pumountProg).data(),
- QFile::encodeName(KProcess::quote(dev)).data() );
+ TQCString buffer;
+ buffer.sprintf( "%s %s", TQFile::encodeName(pumountProg).data(),
+ TQFile::encodeName(KProcess::quote(dev)).data() );
int res = system( buffer.data() );
@@ -1697,12 +1697,12 @@ bool FileProtocol::pumount(const QString &point)
*
*************************************/
-static QString testLogFile( const char *_filename )
+static TQString testLogFile( const char *_filename )
{
char buffer[ 1024 ];
KDE_struct_stat buff;
- QString result;
+ TQString result;
KDE_stat( _filename, &buff );
int size = buff.st_size;
@@ -1714,7 +1714,7 @@ static QString testLogFile( const char *_filename )
FILE * f = KDE_fopen( _filename, "rb" );
if ( f == 0L ) {
unlink( _filename );
- result = i18n("Could not read %1").arg(QFile::decodeName(_filename));
+ result = i18n("Could not read %1").arg(TQFile::decodeName(_filename));
return result;
}
@@ -1723,7 +1723,7 @@ static QString testLogFile( const char *_filename )
while ( p != 0L ) {
p = fgets( buffer, sizeof(buffer)-1, f );
if ( p != 0L )
- result += QString::fromLocal8Bit(buffer);
+ result += TQString::fromLocal8Bit(buffer);
}
fclose( f );
@@ -1745,15 +1745,15 @@ static bool isExtendedACL( acl_t acl )
return ( acl_equiv_mode( acl, 0 ) != 0 );
}
-static QString aclAsString( acl_t acl )
+static TQString aclAsString( acl_t acl )
{
char *aclString = acl_to_text( acl, 0 );
- QString ret = QString::fromLatin1( aclString );
+ TQString ret = TQString::fromLatin1( aclString );
acl_free( (void*)aclString );
return ret;
}
-static void appendACLAtoms( const QCString & path, UDSEntry& entry, mode_t type, bool withACL )
+static void appendACLAtoms( const TQCString & path, UDSEntry& entry, mode_t type, bool withACL )
{
// first check for a noop
#ifdef HAVE_NON_POSIX_ACL_EXTENSIONS
diff --git a/kioslave/file/file.h b/kioslave/file/file.h
index eef71798b..350703da5 100644
--- a/kioslave/file/file.h
+++ b/kioslave/file/file.h
@@ -29,10 +29,10 @@
#include <stdio.h>
#include <unistd.h>
-#include <qobject.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kio/global.h>
#include <kio/slavebase.h>
@@ -40,11 +40,11 @@
// Note that this header file is installed, so think twice
// before breaking binary compatibility (read: it is forbidden :)
-class FileProtocol : public QObject, public KIO::SlaveBase
+class FileProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- FileProtocol( const QCString &pool, const QCString &app);
+ FileProtocol( const TQCString &pool, const TQCString &app);
virtual ~FileProtocol() { }
virtual void get( const KURL& url );
@@ -54,7 +54,7 @@ public:
int permissions, bool overwrite );
virtual void rename( const KURL &src, const KURL &dest,
bool overwrite );
- virtual void symlink( const QString &target, const KURL &dest,
+ virtual void symlink( const TQString &target, const KURL &dest,
bool overwrite );
virtual void stat( const KURL& url );
@@ -69,27 +69,27 @@ public:
* 2 - unmount
* 3 - shred
*/
- virtual void special( const QByteArray &data);
- void unmount( const QString& point );
- void mount( bool _ro, const char *_fstype, const QString& dev, const QString& point );
- bool pumount( const QString &point );
- bool pmount( const QString &dev );
+ virtual void special( const TQByteArray &data);
+ void unmount( const TQString& point );
+ void mount( bool _ro, const char *_fstype, const TQString& dev, const TQString& point );
+ bool pumount( const TQString &point );
+ bool pmount( const TQString &dev );
protected slots:
void slotProcessedSize( KIO::filesize_t _bytes );
- void slotInfoMessage( const QString & msg );
+ void slotInfoMessage( const TQString & msg );
protected:
- bool createUDSEntry( const QString & filename, const QCString & path, KIO::UDSEntry & entry,
+ bool createUDSEntry( const TQString & filename, const TQCString & path, KIO::UDSEntry & entry,
short int details, bool withACL );
int setACL( const char *path, mode_t perm, bool _directoryDefault );
- QString getUserName( uid_t uid );
- QString getGroupName( gid_t gid );
+ TQString getUserName( uid_t uid );
+ TQString getGroupName( gid_t gid );
- QIntDict<QString> usercache; // maps long ==> QString *
- QIntDict<QString> groupcache;
+ TQIntDict<TQString> usercache; // maps long ==> TQString *
+ TQIntDict<TQString> groupcache;
class FileProtocolPrivate;
FileProtocolPrivate *d;
diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc
index 4da1912d7..ffc324c39 100644
--- a/kioslave/ftp/ftp.cc
+++ b/kioslave/ftp/ftp.cc
@@ -50,7 +50,7 @@
#include <time.h>
#endif
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -71,9 +71,9 @@
#endif
// JPF: a remark on coding style (2004-03-06):
-// Some calls to QString::fromLatin1() were removed from the code. In most places
+// Some calls to TQString::fromLatin1() were removed from the code. In most places
// the KDE code relies on implicit creation of QStrings. Also Qt has a lot of
-// const char* overloads, so that using QString::fromLatin1() can be ineffectient!
+// const char* overloads, so that using TQString::fromLatin1() can be ineffectient!
#define FTP_LOGIN "anonymous"
#define FTP_PASSWD "anonymous@"
@@ -247,7 +247,7 @@ int FtpSocket::connectSocket(int iTimeOutSec, bool bControl)
if(iCon < 0)
{ int iErrorCode = (status() == IO_LookupError)
? ERR_UNKNOWN_HOST : ERR_COULD_NOT_CONNECT;
- QString strMsg = KExtendedSocket::strError(status(), systemError());
+ TQString strMsg = KExtendedSocket::strError(status(), systemError());
strMsg.prepend("connect failed (code %1): ");
return errorMessage(iErrorCode, strMsg.arg(iCon).latin1());
}
@@ -293,7 +293,7 @@ bool FtpSocket::setSocketOption(int opt, char*arg, socklen_t len) const
// Ftp
//===============================================================================
-Ftp::Ftp( const QCString &pool, const QCString &app )
+Ftp::Ftp( const TQCString &pool, const TQCString &app )
: SlaveBase( "ftp", pool, app )
{
// init the socket data
@@ -413,8 +413,8 @@ void Ftp::closeConnection()
ftpCloseControlConnection();
}
-void Ftp::setHost( const QString& _host, int _port, const QString& _user,
- const QString& _pass )
+void Ftp::setHost( const TQString& _host, int _port, const TQString& _user,
+ const TQString& _pass )
{
kdDebug(7102) << "Ftp::setHost (" << getpid() << "): " << _host << endl;
@@ -452,16 +452,16 @@ bool Ftp::ftpOpenConnection (LoginMode loginMode)
if ( m_host.isEmpty() )
{
- error( ERR_UNKNOWN_HOST, QString::null );
+ error( ERR_UNKNOWN_HOST, TQString::null );
return false;
}
assert( !m_bLoggedOn );
- m_initialPath = QString::null;
- m_currentPath = QString::null;
+ m_initialPath = TQString::null;
+ m_currentPath = TQString::null;
- QString host = m_bUseProxy ? m_proxyURL.host() : m_host;
+ TQString host = m_bUseProxy ? m_proxyURL.host() : m_host;
unsigned short int port = m_bUseProxy ? m_proxyURL.port() : m_port;
if (!ftpOpenControlConnection(host, port) )
@@ -486,7 +486,7 @@ bool Ftp::ftpOpenConnection (LoginMode loginMode)
*
* @return true on success.
*/
-bool Ftp::ftpOpenControlConnection( const QString &host, unsigned short int port )
+bool Ftp::ftpOpenControlConnection( const TQString &host, unsigned short int port )
{
if ( port == 0 ) {
struct servent *pse;
@@ -499,7 +499,7 @@ bool Ftp::ftpOpenControlConnection( const QString &host, unsigned short int port
// implicitly close, then try to open a new connection ...
closeConnection();
int iErrorCode = ERR_OUT_OF_MEMORY;
- QString sErrorMsg;
+ TQString sErrorMsg;
m_control = new FtpSocket("CNTL");
if(m_control != NULL)
{
@@ -542,12 +542,12 @@ bool Ftp::ftpLogin()
assert( !m_bLoggedOn );
- QString user = m_user;
- QString pass = m_pass;
+ TQString user = m_user;
+ TQString pass = m_pass;
if ( config()->readBoolEntry("EnableAutoLogin") )
{
- QString au = config()->readEntry("autoLoginUser");
+ TQString au = config()->readEntry("autoLoginUser");
if ( !au.isEmpty() )
{
user = au;
@@ -569,7 +569,7 @@ bool Ftp::ftpLogin()
info.url.setPort( m_port );
info.url.setUser( user );
- QCString tempbuf;
+ TQCString tempbuf;
int failedAuth = 0;
do
@@ -579,7 +579,7 @@ bool Ftp::ftpLogin()
// but no password.
if ( failedAuth > 0 || (!user.isEmpty() && pass.isEmpty()) )
{
- QString errorMsg;
+ TQString errorMsg;
kdDebug(7102) << "Prompting user for login info..." << endl;
// Ask user if we should retry after when login fails!
@@ -622,7 +622,7 @@ bool Ftp::ftpLogin()
if ( m_port > 0 && m_port != DEFAULT_FTP_PORT )
{
tempbuf += ':';
- tempbuf += QString::number(m_port).latin1();
+ tempbuf += TQString::number(m_port).latin1();
}
}
@@ -692,7 +692,7 @@ bool Ftp::ftpLogin()
return false;
}
- QString sTmp = remoteEncoding()->decode( ftpResponse(3) );
+ TQString sTmp = remoteEncoding()->decode( ftpResponse(3) );
int iBeg = sTmp.find('"');
int iEnd = sTmp.findRev('"');
if(iBeg > 0 && iBeg < iEnd)
@@ -707,18 +707,18 @@ bool Ftp::ftpLogin()
void Ftp::ftpAutoLoginMacro ()
{
- QString macro = metaData( "autoLoginMacro" );
+ TQString macro = metaData( "autoLoginMacro" );
if ( macro.isEmpty() )
return;
- QStringList list = QStringList::split('\n', macro);
+ TQStringList list = TQStringList::split('\n', macro);
- for(QStringList::Iterator it = list.begin() ; it != list.end() ; ++it )
+ for(TQStringList::Iterator it = list.begin() ; it != list.end() ; ++it )
{
if ( (*it).startsWith("init") )
{
- list = QStringList::split( '\\', macro);
+ list = TQStringList::split( '\\', macro);
it = list.begin();
++it; // ignore the macro name
@@ -745,7 +745,7 @@ void Ftp::ftpAutoLoginMacro ()
*
* return true if any response received, false on error
*/
-bool Ftp::ftpSendCmd( const QCString& cmd, int maxretries )
+bool Ftp::ftpSendCmd( const TQCString& cmd, int maxretries )
{
assert(m_control != NULL); // must have control connection socket
@@ -765,7 +765,7 @@ bool Ftp::ftpSendCmd( const QCString& cmd, int maxretries )
kdDebug(7102) << "send> pass [protected]" << endl;
// Send the message...
- QCString buf = cmd;
+ TQCString buf = cmd;
buf += "\r\n"; // Yes, must use CR/LF - see http://cr.yp.to/ftp/request.html
int num = m_control->write(buf.data(), buf.length());
@@ -968,10 +968,10 @@ int Ftp::ftpOpenEPRTDataConnection()
if (sin == NULL)
return ERR_INTERNAL;
- // QString command = QString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily())
+ // TQString command = TQString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily())
// .arg(sin->nodeName())
// .arg(sin->port());
- QCString command;
+ TQCString command;
command.sprintf("eprt |%d|%s|%d|", sin->ianaFamily(),
sin->nodeName().latin1(), sin->port());
@@ -1083,7 +1083,7 @@ int Ftp::ftpOpenPortDataConnection()
pAddr = static_cast<const KInetSocketAddress*>(m_data->localAddress());
struct sockaddr* psa = (struct sockaddr*)pAddr->addressV4();
unsigned char* pData = (unsigned char*)(psa->sa_data);
- QCString portCmd;
+ TQCString portCmd;
portCmd.sprintf("port %d,%d,%d,%d,%d,%d",
pData[2], pData[3], pData[4], pData[5], pData[0], pData[1]);
if( ftpSendCmd(portCmd) && (m_iRespType == 2) )
@@ -1126,7 +1126,7 @@ int Ftp::ftpAcceptConnect()
return (m_data->server() != -1);
}
-bool Ftp::ftpOpenCommand( const char *_command, const QString & _path, char _mode,
+bool Ftp::ftpOpenCommand( const char *_command, const TQString & _path, char _mode,
int errorcode, KIO::fileoffset_t _offset )
{
int errCode = 0;
@@ -1154,8 +1154,8 @@ bool Ftp::ftpOpenCommand( const char *_command, const QString & _path, char _mod
}
}
- QCString tmp = _command;
- QString errormessage;
+ TQCString tmp = _command;
+ TQString errormessage;
if ( !_path.isEmpty() ) {
tmp += " ";
@@ -1216,13 +1216,13 @@ void Ftp::mkdir( const KURL & url, int permissions )
if( !ftpOpenConnection(loginImplicit) )
return;
- QString path = remoteEncoding()->encode(url);
- QCString buf = "mkd ";
+ TQString path = remoteEncoding()->encode(url);
+ TQCString buf = "mkd ";
buf += remoteEncoding()->encode(path);
if( !ftpSendCmd( buf ) || (m_iRespType != 2) )
{
- QString currentPath( m_currentPath );
+ TQString currentPath( m_currentPath );
// Check whether or not mkdir failed because
// the directory already exists...
@@ -1259,7 +1259,7 @@ void Ftp::rename( const KURL& src, const KURL& dst, bool overwrite )
error( ERR_CANNOT_RENAME, src.path() );
}
-bool Ftp::ftpRename( const QString & src, const QString & dst, bool overwrite )
+bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite )
{
assert( m_bLoggedOn );
@@ -1279,12 +1279,12 @@ bool Ftp::ftpRename( const QString & src, const QString & dst, bool overwrite )
if( !ftpFolder(src.left(pos+1), false) )
return false;
- QCString from_cmd = "RNFR ";
+ TQCString from_cmd = "RNFR ";
from_cmd += remoteEncoding()->encode(src.mid(pos+1));
if( !ftpSendCmd( from_cmd ) || (m_iRespType != 3) )
return false;
- QCString to_cmd = "RNTO ";
+ TQCString to_cmd = "RNTO ";
to_cmd += remoteEncoding()->encode(dst);
if( !ftpSendCmd( to_cmd ) || (m_iRespType != 2) )
return false;
@@ -1302,7 +1302,7 @@ void Ftp::del( const KURL& url, bool isfile )
if ( !isfile )
ftpFolder(remoteEncoding()->directory(url), false); // ignore errors
- QCString cmd = isfile ? "DELE " : "RMD ";
+ TQCString cmd = isfile ? "DELE " : "RMD ";
cmd += remoteEncoding()->encode(url);
if( !ftpSendCmd( cmd ) || (m_iRespType != 2) )
@@ -1311,7 +1311,7 @@ void Ftp::del( const KURL& url, bool isfile )
finished();
}
-bool Ftp::ftpChmod( const QString & path, int permissions )
+bool Ftp::ftpChmod( const TQString & path, int permissions )
{
assert( m_bLoggedOn );
@@ -1320,7 +1320,7 @@ bool Ftp::ftpChmod( const QString & path, int permissions )
// we need to do bit AND 777 to get permissions, in case
// we were sent a full mode (unlikely)
- QCString cmd;
+ TQCString cmd;
cmd.sprintf("SITE CHMOD %o ", permissions & 511 );
cmd += remoteEncoding()->encode(path);
@@ -1347,7 +1347,7 @@ void Ftp::chmod( const KURL & url, int permissions )
finished();
}
-void Ftp::ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, UDSEntry& entry, bool isDir )
+void Ftp::ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, UDSEntry& entry, bool isDir )
{
assert(entry.count() == 0); // by contract :-)
UDSAtom atom;
@@ -1413,7 +1413,7 @@ void Ftp::ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, UDSEntr
}
-void Ftp::ftpShortStatAnswer( const QString& filename, bool isDir )
+void Ftp::ftpShortStatAnswer( const TQString& filename, bool isDir )
{
UDSEntry entry;
UDSAtom atom;
@@ -1436,12 +1436,12 @@ void Ftp::ftpShortStatAnswer( const QString& filename, bool isDir )
finished();
}
-void Ftp::ftpStatAnswerNotFound( const QString & path, const QString & filename )
+void Ftp::ftpStatAnswerNotFound( const TQString & path, const TQString & filename )
{
// Only do the 'hack' below if we want to download an existing file (i.e. when looking at the "source")
// When e.g. uploading a file, we still need stat() to return "not found"
// when the file doesn't exist.
- QString statSide = metaData("statSide");
+ TQString statSide = metaData("statSide");
kdDebug(7102) << "Ftp::stat statSide=" << statSide << endl;
if ( statSide == "source" )
{
@@ -1465,7 +1465,7 @@ void Ftp::stat( const KURL &url)
if( !ftpOpenConnection(loginImplicit) )
return;
- QString path = QDir::cleanDirPath( url.path() );
+ TQString path = TQDir::cleanDirPath( url.path() );
kdDebug(7102) << "Ftp::stat : cleaned path='" << path << "'" << endl;
// We can't stat root, but we know it's a dir.
@@ -1475,7 +1475,7 @@ void Ftp::stat( const KURL &url)
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
entry.append( atom );
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -1501,18 +1501,18 @@ void Ftp::stat( const KURL &url)
KURL tempurl( url );
tempurl.setPath( path ); // take the clean one
- QString listarg; // = tempurl.directory(false /*keep trailing slash*/);
- QString parentDir;
- QString filename = tempurl.fileName();
+ TQString listarg; // = tempurl.directory(false /*keep trailing slash*/);
+ TQString parentDir;
+ TQString filename = tempurl.fileName();
Q_ASSERT(!filename.isEmpty());
- QString search = filename;
+ TQString search = filename;
// Try cwd into it, if it works it's a dir (and then we'll list the parent directory to get more info)
// if it doesn't work, it's a file (and then we'll use dir filename)
bool isDir = ftpFolder(path, false);
// if we're only interested in "file or directory", we should stop here
- QString sDetails = metaData("details");
+ TQString sDetails = metaData("details");
int details = sDetails.isEmpty() ? 2 : sDetails.toInt();
kdDebug(7102) << "Ftp::stat details=" << details << endl;
if ( details == 0 )
@@ -1661,7 +1661,7 @@ void Ftp::listDir( const KURL &url )
return;
// No path specified ?
- QString path = url.path();
+ TQString path = url.path();
if ( path.isEmpty() )
{
KURL realURL;
@@ -1725,13 +1725,13 @@ void Ftp::slave_status()
slaveStatus( m_host, m_bLoggedOn );
}
-bool Ftp::ftpOpenDir( const QString & path )
+bool Ftp::ftpOpenDir( const TQString & path )
{
- //QString path( _url.path(-1) );
+ //TQString path( _url.path(-1) );
// We try to change to this directory first to see whether it really is a directory.
// (And also to follow symlinks)
- QString tmp = path.isEmpty() ? QString("/") : path;
+ TQString tmp = path.isEmpty() ? TQString("/") : path;
// We get '550', whether it's a file or doesn't exist...
if( !ftpFolder(tmp, false) )
@@ -1743,9 +1743,9 @@ bool Ftp::ftpOpenDir( const QString & path )
// The only way to really know would be to have a metadata flag for this...
// Since some windows ftp server seems not to support the -a argument, we use a fallback here.
// In fact we have to use -la otherwise -a removes the default -l (e.g. ftp.trolltech.com)
- if( !ftpOpenCommand( "list -la", QString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) )
+ if( !ftpOpenCommand( "list -la", TQString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) )
{
- if ( !ftpOpenCommand( "list", QString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) )
+ if ( !ftpOpenCommand( "list", TQString::null, 'I', ERR_CANNOT_ENTER_DIRECTORY ) )
{
kdWarning(7102) << "Can't open for listing" << endl;
return false;
@@ -1825,7 +1825,7 @@ bool Ftp::ftpReadDir(FtpEntry& de)
(p_name = strtok(NULL,"\r\n")) != 0 )
{
{
- QCString tmp( p_name );
+ TQCString tmp( p_name );
if ( p_access[0] == 'l' )
{
int i = tmp.findRev( " -> " );
@@ -1834,10 +1834,10 @@ bool Ftp::ftpReadDir(FtpEntry& de)
tmp.truncate( i );
}
else
- de.link = QString::null;
+ de.link = TQString::null;
}
else
- de.link = QString::null;
+ de.link = TQString::null;
if ( tmp[0] == '/' ) // listing on ftp://ftp.gnupg.org/ starts with '/'
tmp.remove( 0, 1 );
@@ -1997,7 +1997,7 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi
return statusServerError;
}
- QString resumeOffset = metaData("resume");
+ TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() )
{
llOffset = resumeOffset.toLongLong();
@@ -2025,7 +2025,7 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi
kdDebug(7102) << "ftpGet: starting with offset=" << llOffset << endl;
KIO::fileoffset_t processed_size = llOffset;
- QByteArray array;
+ TQByteArray array;
bool mimetypeEmitted = false;
char buffer[maximumIpcSize];
// start whith small data chunks in case of a slow data source (modem)
@@ -2126,7 +2126,7 @@ void Ftp::mimetype( const KURL& url )
return;
}
char buffer[ 2048 ];
- QByteArray array;
+ TQByteArray array;
// Get one chunk of data only and send it, KIO::Job will determine the
// mimetype from it using KMimeMagic
int n = m_data->read( buffer, 2048 );
@@ -2161,9 +2161,9 @@ void Ftp::ftpAbortTransfer()
// Send ABOR
kdDebug(7102) << "send ABOR" << endl;
- QCString buf = "ABOR\r\n";
+ TQCString buf = "ABOR\r\n";
if ( KSocks::self()->write( sControl, buf.data(), buf.length() ) <= 0 ) {
- error( ERR_COULD_NOT_WRITE, QString::null );
+ error( ERR_COULD_NOT_WRITE, TQString::null );
return;
}
@@ -2171,7 +2171,7 @@ void Ftp::ftpAbortTransfer()
kdDebug(7102) << "read resp" << endl;
if ( readresp() != '2' )
{
- error( ERR_COULD_NOT_READ, QString::null );
+ error( ERR_COULD_NOT_READ, TQString::null );
return;
}
@@ -2208,15 +2208,15 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
else
bMarkPartial = config()->readBoolEntry("MarkPartial", true);
- QString dest_orig = dest_url.path();
- QString dest_part( dest_orig );
+ TQString dest_orig = dest_url.path();
+ TQString dest_part( dest_orig );
dest_part += ".part";
if ( ftpSize( dest_orig, 'I' ) )
{
if ( m_size == 0 )
{ // delete files with zero size
- QCString cmd = "DELE ";
+ TQCString cmd = "DELE ";
cmd += remoteEncoding()->encode(dest_orig);
if( !ftpSendCmd( cmd ) || (m_iRespType != 2) )
{
@@ -2244,7 +2244,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
{ // file with extension .part exists
if ( m_size == 0 )
{ // delete files with zero size
- QCString cmd = "DELE ";
+ TQCString cmd = "DELE ";
cmd += remoteEncoding()->encode(dest_part);
if ( !ftpSendCmd( cmd ) || (m_iRespType != 2) )
{
@@ -2265,7 +2265,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
else
m_size = 0;
- QString dest;
+ TQString dest;
// if we are using marking of partial downloads -> add .part extension
if ( bMarkPartial ) {
@@ -2296,7 +2296,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
kdDebug(7102) << "ftpPut: starting with offset=" << offset << endl;
KIO::fileoffset_t processed_size = offset;
- QByteArray buffer;
+ TQByteArray buffer;
int result;
int iBlockSize = initialIpcSize;
// Loop until we got 'dataEnd'
@@ -2338,7 +2338,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
if ( ftpSize( dest, 'I' ) &&
( processed_size < (unsigned long) config()->readNumEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE) ) )
{
- QCString cmd = "DELE ";
+ TQCString cmd = "DELE ";
cmd += remoteEncoding()->encode(dest);
(void) ftpSendCmd( cmd );
}
@@ -2385,13 +2385,13 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
/** Use the SIZE command to get the file size.
Warning : the size depends on the transfer mode, hence the second arg. */
-bool Ftp::ftpSize( const QString & path, char mode )
+bool Ftp::ftpSize( const TQString & path, char mode )
{
m_size = UnknownSize;
if( !ftpDataMode(mode) )
return false;
- QCString buf;
+ TQCString buf;
buf = "SIZE ";
buf += remoteEncoding()->encode(path);
if( !ftpSendCmd( buf ) || (m_iRespType != 2) )
@@ -2423,7 +2423,7 @@ bool Ftp::ftpDataMode(char cMode)
if(m_cDataMode == cMode)
return true;
- QCString buf;
+ TQCString buf;
buf.sprintf("TYPE %c", cMode);
if( !ftpSendCmd(buf) || (m_iRespType != 2) )
return false;
@@ -2432,9 +2432,9 @@ bool Ftp::ftpDataMode(char cMode)
}
-bool Ftp::ftpFolder(const QString& path, bool bReportError)
+bool Ftp::ftpFolder(const TQString& path, bool bReportError)
{
- QString newPath = path;
+ TQString newPath = path;
int iLen = newPath.length();
if(iLen > 1 && newPath[iLen-1] == '/') newPath.truncate(iLen-1);
@@ -2442,7 +2442,7 @@ bool Ftp::ftpFolder(const QString& path, bool bReportError)
if(m_currentPath == newPath)
return true;
- QCString tmp = "cwd ";
+ TQCString tmp = "cwd ";
tmp += remoteEncoding()->encode(newPath);
if( !ftpSendCmd(tmp) )
return false; // connection failure
@@ -2469,7 +2469,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri
StatusCode cs = statusSuccess;
bool bSrcLocal = src.isLocalFile();
bool bDestLocal = dest.isLocalFile();
- QString sCopyFile;
+ TQString sCopyFile;
if(bSrcLocal && !bDestLocal) // File -> Ftp
{
@@ -2486,7 +2486,7 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri
if( cs == statusServerError ) sCopyFile = src.url();
}
else {
- error( ERR_UNSUPPORTED_ACTION, QString::null );
+ error( ERR_UNSUPPORTED_ACTION, TQString::null );
return;
}
@@ -2499,12 +2499,12 @@ void Ftp::copy( const KURL &src, const KURL &dest, int permissions, bool overwri
}
-Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, QString sCopyFile,
+Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile,
const KURL& url, int permissions, bool overwrite)
{
// check if source is ok ...
KDE_struct_stat buff;
- QCString sSrc( QFile::encodeName(sCopyFile) );
+ TQCString sSrc( TQFile::encodeName(sCopyFile) );
bool bSrcExists = (KDE_stat( sSrc.data(), &buff ) != -1);
if(bSrcExists)
{ if(S_ISDIR(buff.st_mode))
@@ -2536,12 +2536,12 @@ Ftp::StatusCode Ftp::ftpCopyPut(int& iError, int& iCopyFile, QString sCopyFile,
}
-Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const QString sCopyFile,
+Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCopyFile,
const KURL& url, int permissions, bool overwrite)
{
// check if destination is ok ...
KDE_struct_stat buff;
- QCString sDest( QFile::encodeName(sCopyFile) );
+ TQCString sDest( TQFile::encodeName(sCopyFile) );
bool bDestExists = (KDE_stat( sDest.data(), &buff ) != -1);
if(bDestExists)
{ if(S_ISDIR(buff.st_mode))
@@ -2557,14 +2557,14 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const QString sCopy
}
// do we have a ".part" file?
- QCString sPart = QFile::encodeName(sCopyFile + ".part");
+ TQCString sPart = TQFile::encodeName(sCopyFile + ".part");
bool bResume = false;
bool bPartExists = (KDE_stat( sPart.data(), &buff ) != -1);
const bool bMarkPartial = config()->readBoolEntry("MarkPartial", true);
if(!bMarkPartial)
{
- sPart = QFile::encodeName(sCopyFile);
+ sPart = TQFile::encodeName(sCopyFile);
}
else if(bPartExists && buff.st_size > 0)
{ // must not be a folder! please fix a similar bug in kio_file!!
diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h
index e754152d2..b2ce56492 100644
--- a/kioslave/ftp/ftp.h
+++ b/kioslave/ftp/ftp.h
@@ -28,8 +28,8 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kio/slavebase.h>
@@ -38,10 +38,10 @@
struct FtpEntry
{
- QString name;
- QString owner;
- QString group;
- QString link;
+ TQString name;
+ TQString owner;
+ TQString group;
+ TQString link;
KIO::filesize_t size;
mode_t type;
@@ -238,10 +238,10 @@ class Ftp : public KIO::SlaveBase
// Ftp() {}
public:
- Ftp( const QCString &pool, const QCString &app );
+ Ftp( const TQCString &pool, const TQCString &app );
virtual ~Ftp();
- virtual void setHost( const QString& host, int port, const QString& user, const QString& pass );
+ virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass );
/**
* Connects to a ftp server and logs us in
@@ -337,7 +337,7 @@ private:
*
* return true if any response received, false on error
*/
- bool ftpSendCmd( const QCString& cmd, int maxretries = 1 );
+ bool ftpSendCmd( const TQCString& cmd, int maxretries = 1 );
/**
* Use the SIZE command to get the file size.
@@ -345,12 +345,12 @@ private:
* @return true on success
* Gets the size into m_size.
*/
- bool ftpSize( const QString & path, char mode );
+ bool ftpSize( const TQString & path, char mode );
/**
* Set the current working directory, but only if not yet current
*/
- bool ftpFolder(const QString& path, bool bReportError);
+ bool ftpFolder(const TQString& path, bool bReportError);
/**
* Runs a command on the ftp server like "list" or "retr". In contrast to
@@ -363,7 +363,7 @@ private:
*
* @return true if the command was accepted by the server.
*/
- bool ftpOpenCommand( const char *command, const QString & path, char mode,
+ bool ftpOpenCommand( const char *command, const TQString & path, char mode,
int errorcode, KIO::fileoffset_t offset = 0 );
/**
@@ -419,10 +419,10 @@ private:
*/
int ftpAcceptConnect();
- bool ftpChmod( const QString & path, int permissions );
+ bool ftpChmod( const TQString & path, int permissions );
// used by listDir
- bool ftpOpenDir( const QString & path );
+ bool ftpOpenDir( const TQString & path );
/**
* Called to parse directory listings, call this until it returns false
*/
@@ -431,25 +431,25 @@ private:
/**
* Helper to fill an UDSEntry
*/
- void ftpCreateUDSEntry( const QString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir );
+ void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir );
- void ftpShortStatAnswer( const QString& filename, bool isDir );
+ void ftpShortStatAnswer( const TQString& filename, bool isDir );
- void ftpStatAnswerNotFound( const QString & path, const QString & filename );
+ void ftpStatAnswerNotFound( const TQString & path, const TQString & filename );
/**
* This is the internal implementation of rename() - set put().
*
* @return true on success.
*/
- bool ftpRename( const QString & src, const QString & dst, bool overwrite );
+ bool ftpRename( const TQString & src, const TQString & dst, bool overwrite );
/**
* Called by openConnection. It opens the control connection to the ftp server.
*
* @return true on success.
*/
- bool ftpOpenControlConnection( const QString & host, unsigned short int port );
+ bool ftpOpenControlConnection( const TQString & host, unsigned short int port );
/**
* closes the socket holding the control connection (see ftpOpenControlConnection)
@@ -499,7 +499,7 @@ private:
* @param sCopyFile path of the local source file
* @return 0 for success, -1 for server error, -2 for client error
*/
- StatusCode ftpCopyPut(int& iError, int& iCopyFile, QString sCopyFile, const KURL& url, int permissions, bool overwrite);
+ StatusCode ftpCopyPut(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite);
/**
* helper called from copy() to implement FTP -> FILE transfers
@@ -509,24 +509,24 @@ private:
* @param sCopyFile path of the local destination file
* @return 0 for success, -1 for server error, -2 for client error
*/
- StatusCode ftpCopyGet(int& iError, int& iCopyFile, QString sCopyFile, const KURL& url, int permissions, bool overwrite);
+ StatusCode ftpCopyGet(int& iError, int& iCopyFile, TQString sCopyFile, const KURL& url, int permissions, bool overwrite);
private: // data members
- QString m_host;
+ TQString m_host;
unsigned short int m_port;
- QString m_user;
- QString m_pass;
+ TQString m_user;
+ TQString m_pass;
/**
* Where we end up after connecting
*/
- QString m_initialPath;
+ TQString m_initialPath;
KURL m_proxyURL;
/**
* the current working directory - see ftpFolder
*/
- QString m_currentPath;
+ TQString m_currentPath;
/**
* the status returned by the FTP protocol, set in ftpResponse()
diff --git a/kioslave/gzip/kgzipfilter.cpp b/kioslave/gzip/kgzipfilter.cpp
index 21380c6c1..375f9f9bc 100644
--- a/kioslave/gzip/kgzipfilter.cpp
+++ b/kioslave/gzip/kgzipfilter.cpp
@@ -38,7 +38,7 @@ class KGzipFilterFactory : public KLibFactory
public:
KGzipFilterFactory() : KLibFactory() {}
~KGzipFilterFactory(){}
- QObject *createObject( QObject *parent, const char *name, const char*className, const QStringList & args )
+ TQObject *createObject( TQObject *parent, const char *name, const char*className, const TQStringList & args )
{
Q_UNUSED(parent);
Q_UNUSED(name);
@@ -141,11 +141,11 @@ bool KGzipFilter::readHeader()
int i = d->zStream.avail_in;
if ((i -= 10) < 0) return false; // Need at least 10 bytes
#ifdef DEBUG_GZIP
- kdDebug(7005) << "KGzipFilter::readHeader first byte is " << QString::number(*p,16) << endl;
+ kdDebug(7005) << "KGzipFilter::readHeader first byte is " << TQString::number(*p,16) << endl;
#endif
if (*p++ != 0x1f) return false; // GZip magic
#ifdef DEBUG_GZIP
- kdDebug(7005) << "KGzipFilter::readHeader second byte is " << QString::number(*p,16) << endl;
+ kdDebug(7005) << "KGzipFilter::readHeader second byte is " << TQString::number(*p,16) << endl;
#endif
if (*p++ != 0x8b) return false;
int method = *p++;
@@ -206,7 +206,7 @@ bool KGzipFilter::readHeader()
put_short((n) & 0xffff); \
put_short(((ulong)(n)) >> 16);
-bool KGzipFilter::writeHeader( const QCString & fileName )
+bool KGzipFilter::writeHeader( const TQCString & fileName )
{
Bytef *p = d->zStream.next_out;
int i = d->zStream.avail_out;
@@ -238,7 +238,7 @@ void KGzipFilter::writeFooter()
if (!m_headerWritten) kdDebug() << kdBacktrace();
Bytef *p = d->zStream.next_out;
int i = d->zStream.avail_out;
- //kdDebug(7005) << "KGzipFilter::writeFooter writing CRC= " << QString::number( m_crc, 16 ) << endl;
+ //kdDebug(7005) << "KGzipFilter::writeFooter writing CRC= " << TQString::number( m_crc, 16 ) << endl;
put_long( m_crc );
//kdDebug(7005) << "KGzipFilter::writing writing totalin= " << d->zStream.total_in << endl;
put_long( d->zStream.total_in );
diff --git a/kioslave/gzip/kgzipfilter.h b/kioslave/gzip/kgzipfilter.h
index c103d774d..73b5173f3 100644
--- a/kioslave/gzip/kgzipfilter.h
+++ b/kioslave/gzip/kgzipfilter.h
@@ -32,7 +32,7 @@ public:
virtual void terminate();
virtual void reset();
virtual bool readHeader();
- virtual bool writeHeader( const QCString & fileName );
+ virtual bool writeHeader( const TQCString & fileName );
void writeFooter();
virtual void setOutBuffer( char * data, uint maxlen );
virtual void setInBuffer( const char * data, uint size );
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index 5d9fa2eb7..e28e482bf 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -40,11 +40,11 @@
#include <sys/wait.h>
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kidna.h>
@@ -121,7 +121,7 @@ static char * trimLead (char *orig_string)
return orig_string;
}
-static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL )
+static bool isCrossDomainRequest( const TQString& fqdn, const TQString& originURL )
{
if (originURL == "true") // Backwards compatibility
return true;
@@ -129,16 +129,16 @@ static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL
KURL url ( originURL );
// Document Origin domain
- QString a = url.host();
+ TQString a = url.host();
// Current request domain
- QString b = fqdn;
+ TQString b = fqdn;
if (a == b)
return false;
- QStringList l1 = QStringList::split('.', a);
- QStringList l2 = QStringList::split('.', b);
+ TQStringList l1 = TQStringList::split('.', a);
+ TQStringList l2 = TQStringList::split('.', b);
while(l1.count() > l2.count())
l1.pop_front();
@@ -161,14 +161,14 @@ static bool isCrossDomainRequest( const QString& fqdn, const QString& originURL
/*
Eliminates any custom header that could potentically alter the request
*/
-static QString sanitizeCustomHTTPHeader(const QString& _header)
+static TQString sanitizeCustomHTTPHeader(const TQString& _header)
{
- QString sanitizedHeaders;
- QStringList headers = QStringList::split(QRegExp("[\r\n]"), _header);
+ TQString sanitizedHeaders;
+ TQStringList headers = TQStringList::split(TQRegExp("[\r\n]"), _header);
- for(QStringList::Iterator it = headers.begin(); it != headers.end(); ++it)
+ for(TQStringList::Iterator it = headers.begin(); it != headers.end(); ++it)
{
- QString header = (*it).lower();
+ TQString header = (*it).lower();
// Do not allow Request line to be specified and ignore
// the other HTTP headers.
if (header.find(':') == -1 ||
@@ -195,8 +195,8 @@ static QString sanitizeCustomHTTPHeader(const QString& _header)
/************************************** HTTPProtocol **********************************************/
-HTTPProtocol::HTTPProtocol( const QCString &protocol, const QCString &pool,
- const QCString &app )
+HTTPProtocol::HTTPProtocol( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app )
:TCPSlaveBase( 0, protocol , pool, app,
(protocol == "https" || protocol == "webdavs") )
{
@@ -232,8 +232,8 @@ void HTTPProtocol::reparseConfiguration()
{
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::reparseConfiguration" << endl;
- m_strProxyRealm = QString::null;
- m_strProxyAuthorization = QString::null;
+ m_strProxyRealm = TQString::null;
+ m_strProxyAuthorization = TQString::null;
ProxyAuthentication = AUTH_None;
m_bUseProxy = false;
@@ -266,8 +266,8 @@ void HTTPProtocol::resetResponseSettings()
m_responseHeader.clear();
m_qContentEncodings.clear();
m_qTransferEncodings.clear();
- m_sContentMD5 = QString::null;
- m_strMimeType = QString::null;
+ m_sContentMD5 = TQString::null;
+ m_strMimeType = TQString::null;
setMetaData("request-id", m_request.id);
}
@@ -308,7 +308,7 @@ void HTTPProtocol::resetSessionSettings()
kdDebug(7113) << "(" << m_pid << ") ssl_was_in_use = "
<< metaData ("ssl_was_in_use") << endl;
- m_request.referrer = QString::null;
+ m_request.referrer = TQString::null;
if ( config()->readBoolEntry("SendReferrer", true) &&
(m_protocol == "https" || m_protocol == "webdavs" ||
metaData ("ssl_was_in_use") != "TRUE" ) )
@@ -317,7 +317,7 @@ void HTTPProtocol::resetSessionSettings()
if (referrerURL.isValid())
{
// Sanitize
- QString protocol = referrerURL.protocol();
+ TQString protocol = referrerURL.protocol();
if (protocol.startsWith("webdav"))
{
protocol.replace(0, 6, "http");
@@ -326,9 +326,9 @@ void HTTPProtocol::resetSessionSettings()
if (protocol.startsWith("http"))
{
- referrerURL.setRef(QString::null);
- referrerURL.setUser(QString::null);
- referrerURL.setPass(QString::null);
+ referrerURL.setRef(TQString::null);
+ referrerURL.setUser(TQString::null);
+ referrerURL.setPass(TQString::null);
m_request.referrer = referrerURL.url();
}
}
@@ -345,12 +345,12 @@ void HTTPProtocol::resetSessionSettings()
}
else
{
- m_request.charsets = QString::null;
- m_request.languages = QString::null;
+ m_request.charsets = TQString::null;
+ m_request.languages = TQString::null;
}
// Adjust the offset value based on the "resume" meta-data.
- QString resumeOffset = metaData("resume");
+ TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() )
m_request.offset = resumeOffset.toInt(); // TODO: Convert to 64 bit
else
@@ -364,7 +364,7 @@ void HTTPProtocol::resetSessionSettings()
if ( config()->readBoolEntry("SendUserAgent", true) )
m_request.userAgent = metaData("UserAgent");
else
- m_request.userAgent = QString::null;
+ m_request.userAgent = TQString::null;
// Deal with cache cleaning.
// TODO: Find a smarter way to deal with cleaning the
@@ -384,14 +384,14 @@ void HTTPProtocol::resetSessionSettings()
else
{
m_bNeedTunnel = false;
- setRealHost( QString::null);
+ setRealHost( TQString::null);
}
m_responseCode = 0;
m_prevResponseCode = 0;
- m_strRealm = QString::null;
- m_strAuthorization = QString::null;
+ m_strRealm = TQString::null;
+ m_strAuthorization = TQString::null;
Authentication = AUTH_None;
// Obtain the proxy and remote server timeout values
@@ -423,8 +423,8 @@ void HTTPProtocol::resetSessionSettings()
m_bFirstRequest = false;
}
-void HTTPProtocol::setHost( const QString& host, int port,
- const QString& user, const QString& pass )
+void HTTPProtocol::setHost( const TQString& host, int port,
+ const TQString& user, const TQString& pass )
{
// Reset the webdav-capable flags for this host
if ( m_request.hostname != host )
@@ -607,7 +607,7 @@ void HTTPProtocol::stat(const KURL& url)
if ( m_protocol != "webdav" && m_protocol != "webdavs" )
{
- QString statSide = metaData(QString::fromLatin1("statSide"));
+ TQString statSide = metaData(TQString::fromLatin1("statSide"));
if ( statSide != "source" )
{
// When uploading we assume the file doesn't exit
@@ -654,7 +654,7 @@ void HTTPProtocol::listDir( const KURL& url )
davStatList( url, false );
}
-void HTTPProtocol::davSetRequest( const QCString& requestXML )
+void HTTPProtocol::davSetRequest( const TQCString& requestXML )
{
// insert the document into the POST buffer, kill trailing zero byte
m_bufPOST = requestXML;
@@ -673,10 +673,10 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
return;
// Maybe it's a disguised SEARCH...
- QString query = metaData("davSearchQuery");
+ TQString query = metaData("davSearchQuery");
if ( !query.isEmpty() )
{
- QCString request = "<?xml version=\"1.0\"?>\r\n";
+ TQCString request = "<?xml version=\"1.0\"?>\r\n";
request.append( "<D:searchrequest xmlns:D=\"DAV:\">\r\n" );
request.append( query.utf8() );
request.append( "</D:searchrequest>\r\n" );
@@ -684,7 +684,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
davSetRequest( request );
} else {
// We are only after certain features...
- QCString request;
+ TQCString request;
request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
"<D:propfind xmlns:D=\"DAV:\">";
@@ -715,7 +715,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
// WebDAV Stat or List...
m_request.method = query.isEmpty() ? DAV_PROPFIND : DAV_SEARCH;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
m_request.davData.depth = stat ? 0 : 1;
@@ -730,26 +730,26 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
return;
}
- QDomDocument multiResponse;
+ TQDomDocument multiResponse;
multiResponse.setContent( m_bufWebDavData, true );
bool hasResponse = false;
- for ( QDomNode n = multiResponse.documentElement().firstChild();
+ for ( TQDomNode n = multiResponse.documentElement().firstChild();
!n.isNull(); n = n.nextSibling())
{
- QDomElement thisResponse = n.toElement();
+ TQDomElement thisResponse = n.toElement();
if (thisResponse.isNull())
continue;
hasResponse = true;
- QDomElement href = thisResponse.namedItem( "href" ).toElement();
+ TQDomElement href = thisResponse.namedItem( "href" ).toElement();
if ( !href.isNull() )
{
entry.clear();
- QString urlStr = href.text();
+ TQString urlStr = href.text();
int encoding = remoteEncoding()->encodingMib();
if ((encoding == 106) && (!KStringHandler::isUtf8(KURL::decode_string(urlStr, 4).latin1())))
encoding = 4; // Use latin1 if the file is not actually utf-8
@@ -771,7 +771,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
entry.append( atom );
- QDomNodeList propstats = thisResponse.elementsByTagName( "propstat" );
+ TQDomNodeList propstats = thisResponse.elementsByTagName( "propstat" );
davParsePropstats( propstats, entry );
@@ -819,23 +819,23 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method )
// WebDAV method
m_request.method = method;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
retrieveContent( false );
}
-int HTTPProtocol::codeFromResponse( const QString& response )
+int HTTPProtocol::codeFromResponse( const TQString& response )
{
int firstSpace = response.find( ' ' );
int secondSpace = response.find( ' ', firstSpace + 1 );
return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt();
}
-void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& entry )
+void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& entry )
{
- QString mimeType;
+ TQString mimeType;
UDSAtom atom;
bool foundExecutable = false;
bool isDirectory = false;
@@ -844,9 +844,9 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
for ( uint i = 0; i < propstats.count(); i++)
{
- QDomElement propstat = propstats.item(i).toElement();
+ TQDomElement propstat = propstats.item(i).toElement();
- QDomElement status = propstat.namedItem( "status" ).toElement();
+ TQDomElement status = propstat.namedItem( "status" ).toElement();
if ( status.isNull() )
{
// error, no status code in this propstat
@@ -862,7 +862,7 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
continue;
}
- QDomElement prop = propstat.namedItem( "prop" ).toElement();
+ TQDomElement prop = propstat.namedItem( "prop" ).toElement();
if ( prop.isNull() )
{
kdDebug(7113) << "Error: no prop segment in this propstat." << endl;
@@ -872,15 +872,15 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
if ( hasMetaData( "davRequestResponse" ) )
{
atom.m_uds = KIO::UDS_XML_PROPERTIES;
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild(prop);
atom.m_str = doc.toString();
entry.append( atom );
}
- for ( QDomNode n = prop.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for ( TQDomNode n = prop.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement property = n.toElement();
+ TQDomElement property = n.toElement();
if (property.isNull())
continue;
@@ -912,7 +912,7 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
else if ( property.tagName() == "source" )
{
// Source template location
- QDomElement source = property.namedItem( "link" ).toElement()
+ TQDomElement source = property.namedItem( "link" ).toElement()
.namedItem( "dst" ).toElement();
if ( !source.isNull() )
setMetaData( "davSource", source.text() );
@@ -959,22 +959,22 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
else if ( property.tagName() == "supportedlock" )
{
// Supported locking specifications
- for ( QDomNode n2 = property.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
+ for ( TQDomNode n2 = property.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
{
- QDomElement lockEntry = n2.toElement();
+ TQDomElement lockEntry = n2.toElement();
if ( lockEntry.tagName() == "lockentry" )
{
- QDomElement lockScope = lockEntry.namedItem( "lockscope" ).toElement();
- QDomElement lockType = lockEntry.namedItem( "locktype" ).toElement();
+ TQDomElement lockScope = lockEntry.namedItem( "lockscope" ).toElement();
+ TQDomElement lockType = lockEntry.namedItem( "locktype" ).toElement();
if ( !lockScope.isNull() && !lockType.isNull() )
{
// Lock type was properly specified
supportedLockCount++;
- QString scope = lockScope.firstChild().toElement().tagName();
- QString type = lockType.firstChild().toElement().tagName();
+ TQString scope = lockScope.firstChild().toElement().tagName();
+ TQString type = lockType.firstChild().toElement().tagName();
- setMetaData( QString("davSupportedLockScope%1").arg(supportedLockCount), scope );
- setMetaData( QString("davSupportedLockType%1").arg(supportedLockCount), type );
+ setMetaData( TQString("davSupportedLockScope%1").arg(supportedLockCount), scope );
+ setMetaData( TQString("davSupportedLockType%1").arg(supportedLockCount), type );
}
}
}
@@ -1000,8 +1000,8 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
}
}
- setMetaData( "davLockCount", QString("%1").arg(lockCount) );
- setMetaData( "davSupportedLockCount", QString("%1").arg(supportedLockCount) );
+ setMetaData( "davLockCount", TQString("%1").arg(lockCount) );
+ setMetaData( "davSupportedLockCount", TQString("%1").arg(supportedLockCount) );
atom.m_uds = KIO::UDS_FILE_TYPE;
atom.m_long = isDirectory ? S_IFDIR : S_IFREG;
@@ -1029,52 +1029,52 @@ void HTTPProtocol::davParsePropstats( const QDomNodeList& propstats, UDSEntry& e
}
}
-void HTTPProtocol::davParseActiveLocks( const QDomNodeList& activeLocks,
+void HTTPProtocol::davParseActiveLocks( const TQDomNodeList& activeLocks,
uint& lockCount )
{
for ( uint i = 0; i < activeLocks.count(); i++ )
{
- QDomElement activeLock = activeLocks.item(i).toElement();
+ TQDomElement activeLock = activeLocks.item(i).toElement();
lockCount++;
// required
- QDomElement lockScope = activeLock.namedItem( "lockscope" ).toElement();
- QDomElement lockType = activeLock.namedItem( "locktype" ).toElement();
- QDomElement lockDepth = activeLock.namedItem( "depth" ).toElement();
+ TQDomElement lockScope = activeLock.namedItem( "lockscope" ).toElement();
+ TQDomElement lockType = activeLock.namedItem( "locktype" ).toElement();
+ TQDomElement lockDepth = activeLock.namedItem( "depth" ).toElement();
// optional
- QDomElement lockOwner = activeLock.namedItem( "owner" ).toElement();
- QDomElement lockTimeout = activeLock.namedItem( "timeout" ).toElement();
- QDomElement lockToken = activeLock.namedItem( "locktoken" ).toElement();
+ TQDomElement lockOwner = activeLock.namedItem( "owner" ).toElement();
+ TQDomElement lockTimeout = activeLock.namedItem( "timeout" ).toElement();
+ TQDomElement lockToken = activeLock.namedItem( "locktoken" ).toElement();
if ( !lockScope.isNull() && !lockType.isNull() && !lockDepth.isNull() )
{
// lock was properly specified
lockCount++;
- QString scope = lockScope.firstChild().toElement().tagName();
- QString type = lockType.firstChild().toElement().tagName();
- QString depth = lockDepth.text();
+ TQString scope = lockScope.firstChild().toElement().tagName();
+ TQString type = lockType.firstChild().toElement().tagName();
+ TQString depth = lockDepth.text();
- setMetaData( QString("davLockScope%1").arg( lockCount ), scope );
- setMetaData( QString("davLockType%1").arg( lockCount ), type );
- setMetaData( QString("davLockDepth%1").arg( lockCount ), depth );
+ setMetaData( TQString("davLockScope%1").arg( lockCount ), scope );
+ setMetaData( TQString("davLockType%1").arg( lockCount ), type );
+ setMetaData( TQString("davLockDepth%1").arg( lockCount ), depth );
if ( !lockOwner.isNull() )
- setMetaData( QString("davLockOwner%1").arg( lockCount ), lockOwner.text() );
+ setMetaData( TQString("davLockOwner%1").arg( lockCount ), lockOwner.text() );
if ( !lockTimeout.isNull() )
- setMetaData( QString("davLockTimeout%1").arg( lockCount ), lockTimeout.text() );
+ setMetaData( TQString("davLockTimeout%1").arg( lockCount ), lockTimeout.text() );
if ( !lockToken.isNull() )
{
- QDomElement tokenVal = lockScope.namedItem( "href" ).toElement();
+ TQDomElement tokenVal = lockScope.namedItem( "href" ).toElement();
if ( !tokenVal.isNull() )
- setMetaData( QString("davLockToken%1").arg( lockCount ), tokenVal.text() );
+ setMetaData( TQString("davLockToken%1").arg( lockCount ), tokenVal.text() );
}
}
}
}
-long HTTPProtocol::parseDateTime( const QString& input, const QString& type )
+long HTTPProtocol::parseDateTime( const TQString& input, const TQString& type )
{
if ( type == "dateTime.tz" )
{
@@ -1093,26 +1093,26 @@ long HTTPProtocol::parseDateTime( const QString& input, const QString& type )
return KRFCDate::parseDateISO8601( input );
}
-QString HTTPProtocol::davProcessLocks()
+TQString HTTPProtocol::davProcessLocks()
{
if ( hasMetaData( "davLockCount" ) )
{
- QString response("If:");
+ TQString response("If:");
int numLocks;
numLocks = metaData( "davLockCount" ).toInt();
bool bracketsOpen = false;
for ( int i = 0; i < numLocks; i++ )
{
- if ( hasMetaData( QString("davLockToken%1").arg(i) ) )
+ if ( hasMetaData( TQString("davLockToken%1").arg(i) ) )
{
- if ( hasMetaData( QString("davLockURL%1").arg(i) ) )
+ if ( hasMetaData( TQString("davLockURL%1").arg(i) ) )
{
if ( bracketsOpen )
{
response += ")";
bracketsOpen = false;
}
- response += " <" + metaData( QString("davLockURL%1").arg(i) ) + ">";
+ response += " <" + metaData( TQString("davLockURL%1").arg(i) ) + ">";
}
if ( !bracketsOpen )
@@ -1125,10 +1125,10 @@ QString HTTPProtocol::davProcessLocks()
response += " ";
}
- if ( hasMetaData( QString("davLockNot%1").arg(i) ) )
+ if ( hasMetaData( TQString("davLockNot%1").arg(i) ) )
response += "Not ";
- response += "<" + metaData( QString("davLockToken%1").arg(i) ) + ">";
+ response += "<" + metaData( TQString("davLockToken%1").arg(i) ) + ">";
}
}
@@ -1139,7 +1139,7 @@ QString HTTPProtocol::davProcessLocks()
return response;
}
- return QString::null;
+ return TQString::null;
}
bool HTTPProtocol::davHostOk()
@@ -1164,7 +1164,7 @@ bool HTTPProtocol::davHostOk()
// query the server's capabilities generally, not for a specific URL
m_request.path = "*";
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1214,7 +1214,7 @@ void HTTPProtocol::mkdir( const KURL& url, int )
m_request.method = DAV_MKCOL;
m_request.path = url.path();
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1238,7 +1238,7 @@ void HTTPProtocol::get( const KURL& url )
m_request.path = url.path();
m_request.query = url.query();
- QString tmp = metaData("cache");
+ TQString tmp = metaData("cache");
if (!tmp.isEmpty())
m_request.cache = parseCacheControl(tmp);
else
@@ -1265,7 +1265,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool)
if ( !davHostOk() )
return;
- QCString request;
+ TQCString request;
request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
"<D:propfind xmlns:D=\"DAV:\"><D:prop>"
"<D:creationdate/>"
@@ -1278,7 +1278,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool)
// WebDAV Stat or List...
m_request.method = DAV_PROPFIND;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
m_request.davData.depth = 0;
@@ -1286,7 +1286,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool)
retrieveContent(true);
if (m_responseCode == 207) {
- error(ERR_FILE_ALREADY_EXIST, QString::null);
+ error(ERR_FILE_ALREADY_EXIST, TQString::null);
return;
}
@@ -1295,7 +1295,7 @@ void HTTPProtocol::put( const KURL &url, int, bool overwrite, bool)
m_request.method = HTTP_PUT;
m_request.path = url.path();
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1334,7 +1334,7 @@ void HTTPProtocol::copy( const KURL& src, const KURL& dest, int, bool overwrite
m_request.path = src.path();
m_request.davData.desturl = newDest.url();
m_request.davData.overwrite = overwrite;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1366,7 +1366,7 @@ void HTTPProtocol::rename( const KURL& src, const KURL& dest, bool overwrite )
m_request.path = src.path();
m_request.davData.desturl = newDest.url();
m_request.davData.overwrite = overwrite;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1390,7 +1390,7 @@ void HTTPProtocol::rename( const KURL& src, const KURL& dest, bool overwrite )
m_request.path = m_redirectLocation.path();
m_request.davData.desturl = newDest.url();
m_request.davData.overwrite = overwrite;
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1413,7 +1413,7 @@ void HTTPProtocol::del( const KURL& url, bool )
m_request.method = HTTP_DELETE;
m_request.path = url.path();
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1444,8 +1444,8 @@ void HTTPProtocol::post( const KURL& url )
retrieveContent();
}
-void HTTPProtocol::davLock( const KURL& url, const QString& scope,
- const QString& type, const QString& owner )
+void HTTPProtocol::davLock( const KURL& url, const TQString& scope,
+ const TQString& type, const TQString& owner )
{
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davLock "
<< url.prettyURL() << endl;
@@ -1455,31 +1455,31 @@ void HTTPProtocol::davLock( const KURL& url, const QString& scope,
m_request.method = DAV_LOCK;
m_request.path = url.path();
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
/* Create appropriate lock XML request. */
- QDomDocument lockReq;
+ TQDomDocument lockReq;
- QDomElement lockInfo = lockReq.createElementNS( "DAV:", "lockinfo" );
+ TQDomElement lockInfo = lockReq.createElementNS( "DAV:", "lockinfo" );
lockReq.appendChild( lockInfo );
- QDomElement lockScope = lockReq.createElement( "lockscope" );
+ TQDomElement lockScope = lockReq.createElement( "lockscope" );
lockInfo.appendChild( lockScope );
lockScope.appendChild( lockReq.createElement( scope ) );
- QDomElement lockType = lockReq.createElement( "locktype" );
+ TQDomElement lockType = lockReq.createElement( "locktype" );
lockInfo.appendChild( lockType );
lockType.appendChild( lockReq.createElement( type ) );
if ( !owner.isNull() ) {
- QDomElement ownerElement = lockReq.createElement( "owner" );
+ TQDomElement ownerElement = lockReq.createElement( "owner" );
lockReq.appendChild( ownerElement );
- QDomElement ownerHref = lockReq.createElement( "href" );
+ TQDomElement ownerHref = lockReq.createElement( "href" );
ownerElement.appendChild( ownerHref );
ownerHref.appendChild( lockReq.createTextNode( owner ) );
@@ -1492,17 +1492,17 @@ void HTTPProtocol::davLock( const KURL& url, const QString& scope,
if ( m_responseCode == 200 ) {
// success
- QDomDocument multiResponse;
+ TQDomDocument multiResponse;
multiResponse.setContent( m_bufWebDavData, true );
- QDomElement prop = multiResponse.documentElement().namedItem( "prop" ).toElement();
+ TQDomElement prop = multiResponse.documentElement().namedItem( "prop" ).toElement();
- QDomElement lockdiscovery = prop.namedItem( "lockdiscovery" ).toElement();
+ TQDomElement lockdiscovery = prop.namedItem( "lockdiscovery" ).toElement();
uint lockCount = 0;
davParseActiveLocks( lockdiscovery.elementsByTagName( "activelock" ), lockCount );
- setMetaData( "davLockCount", QString("%1").arg( lockCount ) );
+ setMetaData( "davLockCount", TQString("%1").arg( lockCount ) );
finished();
@@ -1520,7 +1520,7 @@ void HTTPProtocol::davUnlock( const KURL& url )
m_request.method = DAV_UNLOCK;
m_request.path = url.path();
- m_request.query = QString::null;
+ m_request.query = TQString::null;
m_request.cache = CC_Reload;
m_request.doProxy = m_bUseProxy;
@@ -1532,7 +1532,7 @@ void HTTPProtocol::davUnlock( const KURL& url )
davError();
}
-QString HTTPProtocol::davError( int code /* = -1 */, QString url )
+TQString HTTPProtocol::davError( int code /* = -1 */, TQString url )
{
bool callError = false;
if ( code == -1 ) {
@@ -1546,11 +1546,11 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url )
if ( !url.isNull() )
url = m_request.url.url();
- QString action, errorString;
+ TQString action, errorString;
KIO::Error kError;
// for 412 Precondition Failed
- QString ow = i18n( "Otherwise, the request would have succeeded." );
+ TQString ow = i18n( "Otherwise, the request would have succeeded." );
switch ( m_request.method ) {
case DAV_PROPFIND:
@@ -1615,29 +1615,29 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url )
// there was an error retrieving the XML document.
// ironic, eh?
if ( !readBody( true ) && m_bError )
- return QString::null;
+ return TQString::null;
- QStringList errors;
- QDomDocument multiResponse;
+ TQStringList errors;
+ TQDomDocument multiResponse;
multiResponse.setContent( m_bufWebDavData, true );
- QDomElement multistatus = multiResponse.documentElement().namedItem( "multistatus" ).toElement();
+ TQDomElement multistatus = multiResponse.documentElement().namedItem( "multistatus" ).toElement();
- QDomNodeList responses = multistatus.elementsByTagName( "response" );
+ TQDomNodeList responses = multistatus.elementsByTagName( "response" );
for (uint i = 0; i < responses.count(); i++)
{
int errCode;
- QString errUrl;
+ TQString errUrl;
- QDomElement response = responses.item(i).toElement();
- QDomElement code = response.namedItem( "status" ).toElement();
+ TQDomElement response = responses.item(i).toElement();
+ TQDomElement code = response.namedItem( "status" ).toElement();
if ( !code.isNull() )
{
errCode = codeFromResponse( code.text() );
- QDomElement href = response.namedItem( "href" ).toElement();
+ TQDomElement href = response.namedItem( "href" ).toElement();
if ( !href.isNull() )
errUrl = href.text();
errors << davError( errCode, errUrl );
@@ -1648,7 +1648,7 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url )
errorString = i18n("An error occurred while attempting to %1, %2. A "
"summary of the reasons is below.<ul>").arg( action ).arg( url );
- for ( QStringList::Iterator it = errors.begin(); it != errors.end(); ++it )
+ for ( TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it )
errorString += "<li>" + *it + "</li>";
errorString += "</ul>";
@@ -1735,7 +1735,7 @@ QString HTTPProtocol::davError( int code /* = -1 */, QString url )
void HTTPProtocol::httpError()
{
- QString action, errorString;
+ TQString action, errorString;
KIO::Error kError;
switch ( m_request.method ) {
@@ -1799,18 +1799,18 @@ bool HTTPProtocol::isOffline(const KURL &url)
{
const int NetWorkStatusUnknown = 1;
const int NetWorkStatusOnline = 8;
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << url.url();
- if ( dcopClient()->call( "kded", "networkstatus", "status(QString)",
+ if ( dcopClient()->call( "kded", "networkstatus", "status(TQString)",
params, replyType, reply ) && (replyType == "int") )
{
int result;
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> result;
kdDebug(7113) << "(" << m_pid << ") networkstatus status = " << result << endl;
return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline);
@@ -1819,9 +1819,9 @@ bool HTTPProtocol::isOffline(const KURL &url)
return false; // On error, assume we are online
}
-void HTTPProtocol::multiGet(const QByteArray &data)
+void HTTPProtocol::multiGet(const TQByteArray &data)
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
Q_UINT32 n;
stream >> n;
@@ -1845,7 +1845,7 @@ void HTTPProtocol::multiGet(const QByteArray &data)
m_request.method = HTTP_GET;
m_request.path = url.path();
m_request.query = url.query();
- QString tmp = metaData("cache");
+ TQString tmp = metaData("cache");
if (!tmp.isEmpty())
m_request.cache = parseCacheControl(tmp);
else
@@ -2043,7 +2043,7 @@ void HTTPProtocol::httpCheckConnection()
bool HTTPProtocol::httpOpenConnection()
{
int errCode;
- QString errMsg;
+ TQString errMsg;
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::httpOpenConnection" << endl;
@@ -2053,7 +2053,7 @@ bool HTTPProtocol::httpOpenConnection()
if ( m_state.doProxy )
{
- QString proxy_host = m_proxyURL.host();
+ TQString proxy_host = m_proxyURL.host();
int proxy_port = m_proxyURL.port();
kdDebug(7113) << "(" << m_pid << ") Connecting to proxy server: "
@@ -2222,8 +2222,8 @@ bool HTTPProtocol::httpOpen()
}
}
- QString header;
- QString davHeader;
+ TQString header;
+ TQString davHeader;
bool moreData = false;
bool davData = false;
@@ -2239,7 +2239,7 @@ bool HTTPProtocol::httpOpen()
setEnableSSLTunnel( true );
// We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't
// need any HTTP 1.1 capabilities for CONNECT - Waba
- header = QString("CONNECT %1:%2 HTTP/1.0"
+ header = TQString("CONNECT %1:%2 HTTP/1.0"
"\r\n").arg( m_request.encoded_hostname).arg(m_request.port);
// Identify who you are to the proxy server!
@@ -2250,7 +2250,7 @@ bool HTTPProtocol::httpOpen()
header += "Host: " + m_state.encoded_hostname;
if (m_state.port != m_iDefaultPort)
- header += QString(":%1").arg(m_state.port);
+ header += TQString(":%1").arg(m_state.port);
header += "\r\n";
header += proxyAuthenticationHeader();
@@ -2298,7 +2298,7 @@ bool HTTPProtocol::httpOpen()
if ( m_request.davData.depth == 2 )
davHeader += "infinity";
else
- davHeader += QString("%1").arg( m_request.davData.depth );
+ davHeader += TQString("%1").arg( m_request.davData.depth );
}
davHeader += "\r\n";
m_request.bCachedWrite = false; // Do not put any result in the cache
@@ -2333,7 +2333,7 @@ bool HTTPProtocol::httpOpen()
if ( timeout == 0 )
davHeader += "Infinite";
else
- davHeader += QString("Seconds-%1").arg(timeout);
+ davHeader += TQString("Seconds-%1").arg(timeout);
}
davHeader += "\r\n";
m_request.bCachedWrite = false; // Do not put any result in the cache
@@ -2362,7 +2362,7 @@ bool HTTPProtocol::httpOpen()
m_request.bCachedWrite = false;
break;
default:
- error (ERR_UNSUPPORTED_ACTION, QString::null);
+ error (ERR_UNSUPPORTED_ACTION, TQString::null);
return false;
}
// DAV_POLL; DAV_NOTIFY
@@ -2416,7 +2416,7 @@ bool HTTPProtocol::httpOpen()
if ( m_request.offset > 0 )
{
- header += QString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset));
+ header += TQString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset));
kdDebug(7103) << "kio_http : Range = " << KIO::number(m_request.offset) << endl;
}
@@ -2437,7 +2437,7 @@ bool HTTPProtocol::httpOpen()
}
header += "Accept: ";
- QString acceptHeader = metaData("accept");
+ TQString acceptHeader = metaData("accept");
if (!acceptHeader.isEmpty())
header += acceptHeader;
else
@@ -2460,11 +2460,11 @@ bool HTTPProtocol::httpOpen()
header += "Host: " + m_state.encoded_hostname;
if (m_state.port != m_iDefaultPort)
- header += QString(":%1").arg(m_state.port);
+ header += TQString(":%1").arg(m_state.port);
header += "\r\n";
- QString cookieStr;
- QString cookieMode = metaData("cookies").lower();
+ TQString cookieStr;
+ TQString cookieMode = metaData("cookies").lower();
if (cookieMode == "none")
{
m_request.cookieMode = HTTPRequest::CookiesNone;
@@ -2484,7 +2484,7 @@ bool HTTPProtocol::httpOpen()
if (!cookieStr.isEmpty())
header += cookieStr + "\r\n";
- QString customHeader = metaData( "customHTTPHeader" );
+ TQString customHeader = metaData( "customHTTPHeader" );
if (!customHeader.isEmpty())
{
header += sanitizeCustomHTTPHeader(customHeader);
@@ -2574,7 +2574,7 @@ bool HTTPProtocol::httpOpen()
header += davProcessLocks();
// add extra webdav headers, if supplied
- QString davExtraHeader = metaData("davHeader");
+ TQString davExtraHeader = metaData("davHeader");
if ( !davExtraHeader.isEmpty() )
davHeader += davExtraHeader;
@@ -2590,8 +2590,8 @@ bool HTTPProtocol::httpOpen()
kdDebug(7103) << "(" << m_pid << ") ============ Sending Header:" << endl;
- QStringList headerOutput = QStringList::split("\r\n", header);
- QStringList::Iterator it = headerOutput.begin();
+ TQStringList headerOutput = TQStringList::split("\r\n", header);
+ TQStringList::Iterator it = headerOutput.begin();
for (; it != headerOutput.end(); it++)
kdDebug(7103) << "(" << m_pid << ") " << (*it) << endl;
@@ -2679,7 +2679,7 @@ try_again:
return false;
}
- m_strMimeType = QString::fromUtf8( buffer).stripWhiteSpace();
+ m_strMimeType = TQString::fromUtf8( buffer).stripWhiteSpace();
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readHeader: cached "
<< "data mimetype: " << m_strMimeType << endl;
@@ -2693,11 +2693,11 @@ try_again:
return false;
}
- m_request.strCharset = QString::fromUtf8( buffer).stripWhiteSpace().lower();
+ m_request.strCharset = TQString::fromUtf8( buffer).stripWhiteSpace().lower();
setMetaData("charset", m_request.strCharset);
if (!m_request.lastModified.isEmpty())
setMetaData("modified", m_request.lastModified);
- QString tmp;
+ TQString tmp;
tmp.setNum(m_request.expireDate);
setMetaData("expire-date", tmp);
tmp.setNum(m_request.creationDate);
@@ -2707,16 +2707,16 @@ try_again:
return true;
}
- QCString locationStr; // In case we get a redirect.
- QCString cookieStr; // In case we get a cookie.
+ TQCString locationStr; // In case we get a redirect.
+ TQCString cookieStr; // In case we get a cookie.
- QString dispositionType; // In case we get a Content-Disposition type
- QString dispositionFilename; // In case we get a Content-Disposition filename
+ TQString dispositionType; // In case we get a Content-Disposition type
+ TQString dispositionFilename; // In case we get a Content-Disposition filename
- QString mediaValue;
- QString mediaAttribute;
+ TQString mediaValue;
+ TQString mediaAttribute;
- QStringList upgradeOffers;
+ TQStringList upgradeOffers;
bool upgradeRequired = false; // Server demands that we upgrade to something
// This is also true if we ask to upgrade and
@@ -2725,9 +2725,9 @@ try_again:
bool canUpgrade = false; // The server offered an upgrade
- m_request.etag = QString::null;
- m_request.lastModified = QString::null;
- m_request.strCharset = QString::null;
+ m_request.etag = TQString::null;
+ m_request.lastModified = TQString::null;
+ m_request.strCharset = TQString::null;
time_t dateHeader = 0;
time_t expireDate = 0; // 0 = no info, 1 = already expired, > 1 = actual date
@@ -2779,7 +2779,7 @@ try_again:
// by assuming that they will be sending html.
kdDebug(7113) << "(" << m_pid << ") HTTPPreadHeader: HEAD -> returned "
<< "mimetype: " << DEFAULT_MIME_TYPE << endl;
- mimeType(QString::fromLatin1(DEFAULT_MIME_TYPE));
+ mimeType(TQString::fromLatin1(DEFAULT_MIME_TYPE));
return true;
}
@@ -2840,7 +2840,7 @@ try_again:
// Store the the headers so they can be passed to the
// calling application later
- m_responseHeader << QString::fromLatin1(buf);
+ m_responseHeader << TQString::fromLatin1(buf);
if ((strncasecmp(buf, "HTTP", 4) == 0) ||
(strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support
@@ -3022,13 +3022,13 @@ try_again:
}
// Keep Alive
else if (strncasecmp(buf, "Keep-Alive:", 11) == 0) {
- QStringList options = QStringList::split(',',
- QString::fromLatin1(trimLead(buf+11)));
- for(QStringList::ConstIterator it = options.begin();
+ TQStringList options = TQStringList::split(',',
+ TQString::fromLatin1(trimLead(buf+11)));
+ for(TQStringList::ConstIterator it = options.begin();
it != options.end();
it++)
{
- QString option = (*it).stripWhiteSpace().lower();
+ TQString option = (*it).stripWhiteSpace().lower();
if (option.startsWith("timeout="))
{
m_keepAliveTimeout = option.mid(8).toInt();
@@ -3038,13 +3038,13 @@ try_again:
// Cache control
else if (strncasecmp(buf, "Cache-Control:", 14) == 0) {
- QStringList cacheControls = QStringList::split(',',
- QString::fromLatin1(trimLead(buf+14)));
- for(QStringList::ConstIterator it = cacheControls.begin();
+ TQStringList cacheControls = TQStringList::split(',',
+ TQString::fromLatin1(trimLead(buf+14)));
+ for(TQStringList::ConstIterator it = cacheControls.begin();
it != cacheControls.end();
it++)
{
- QString cacheControl = (*it).stripWhiteSpace();
+ TQString cacheControl = (*it).stripWhiteSpace();
if (strncasecmp(cacheControl.latin1(), "no-cache", 8) == 0)
{
m_request.bCachedWrite = false; // Don't put in cache
@@ -3057,7 +3057,7 @@ try_again:
}
else if (strncasecmp(cacheControl.latin1(), "max-age=", 8) == 0)
{
- QString age = cacheControl.mid(8).stripWhiteSpace();
+ TQString age = cacheControl.mid(8).stripWhiteSpace();
if (!age.isNull())
maxAge = STRTOLL(age.latin1(), 0, 10);
}
@@ -3074,7 +3074,7 @@ try_again:
else if (strncasecmp(buf, "Content-location:", 17) == 0) {
setMetaData ("content-location",
- QString::fromLatin1(trimLead(buf+17)).stripWhiteSpace());
+ TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace());
}
// what type of data do we have?
@@ -3086,7 +3086,7 @@ try_again:
while ( *pos && *pos != ';' ) pos++;
// Assign the mime-type.
- m_strMimeType = QString::fromLatin1(start, pos-start).stripWhiteSpace().lower();
+ m_strMimeType = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower();
kdDebug(7113) << "(" << m_pid << ") Content-type: " << m_strMimeType << endl;
// If we still have text, then it means we have a mime-type with a
@@ -3101,8 +3101,8 @@ try_again:
if (*pos)
{
- mediaAttribute = QString::fromLatin1(start, pos-start).stripWhiteSpace().lower();
- mediaValue = QString::fromLatin1(pos+1, end-pos-1).stripWhiteSpace();
+ mediaAttribute = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower();
+ mediaValue = TQString::fromLatin1(pos+1, end-pos-1).stripWhiteSpace();
pos = end;
if (mediaValue.length() &&
(mediaValue[0] == '"') &&
@@ -3146,7 +3146,7 @@ try_again:
// Cache management
else if (strncasecmp(buf, "Last-Modified:", 14) == 0) {
- m_request.lastModified = (QString::fromLatin1(trimLead(buf+14))).stripWhiteSpace();
+ m_request.lastModified = (TQString::fromLatin1(trimLead(buf+14))).stripWhiteSpace();
}
// whoops.. we received a warning
@@ -3158,7 +3158,7 @@ try_again:
// Cache management (HTTP 1.0)
else if (strncasecmp(buf, "Pragma:", 7) == 0) {
- QCString pragma = QCString(trimLead(buf+7)).stripWhiteSpace().lower();
+ TQCString pragma = TQCString(trimLead(buf+7)).stripWhiteSpace().lower();
if (pragma == "no-cache")
{
m_request.bCachedWrite = false; // Don't put in cache
@@ -3170,14 +3170,14 @@ try_again:
// The deprecated Refresh Response
else if (strncasecmp(buf,"Refresh:", 8) == 0) {
mayCache = false; // Do not cache page as it defeats purpose of Refresh tag!
- setMetaData( "http-refresh", QString::fromLatin1(trimLead(buf+8)).stripWhiteSpace() );
+ setMetaData( "http-refresh", TQString::fromLatin1(trimLead(buf+8)).stripWhiteSpace() );
}
// In fact we should do redirection only if we got redirection code
else if (strncasecmp(buf, "Location:", 9) == 0) {
// Redirect only for 3xx status code, will ya! Thanks, pal!
if ( m_responseCode > 299 && m_responseCode < 400 )
- locationStr = QCString(trimLead(buf+9)).stripWhiteSpace();
+ locationStr = TQCString(trimLead(buf+9)).stripWhiteSpace();
}
// Check for cookies
@@ -3198,8 +3198,8 @@ try_again:
else if (strncasecmp(buf, "Upgrade:", 8) == 0) {
// Now we have to check to see what is offered for the upgrade
- QString offered = &(buf[8]);
- upgradeOffers = QStringList::split(QRegExp("[ \n,\r\t]"), offered);
+ TQString offered = &(buf[8]);
+ upgradeOffers = TQStringList::split(TQRegExp("[ \n,\r\t]"), offered);
}
// content?
@@ -3247,7 +3247,7 @@ try_again:
dispositionBuf--;
if ( dispositionBuf > bufStart )
- dispositionFilename = QString::fromLatin1( bufStart, dispositionBuf-bufStart );
+ dispositionFilename = TQString::fromLatin1( bufStart, dispositionBuf-bufStart );
break;
}
@@ -3260,7 +3260,7 @@ try_again:
dispositionBuf++;
if ( dispositionBuf > bufStart )
- dispositionType = QString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace();
+ dispositionType = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace();
while ( *dispositionBuf == ';' || *dispositionBuf == ' ' )
dispositionBuf++;
@@ -3281,7 +3281,7 @@ try_again:
}
}
else if(strncasecmp(buf, "Content-Language:", 17) == 0) {
- QString language = QString::fromLatin1(trimLead(buf+17)).stripWhiteSpace();
+ TQString language = TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace();
if (!language.isEmpty())
setMetaData("content-language", language);
}
@@ -3294,43 +3294,43 @@ try_again:
}
else if (strncasecmp(buf, "Link:", 5) == 0) {
// We only support Link: <url>; rel="type" so far
- QStringList link = QStringList::split(";", QString(buf)
- .replace(QRegExp("^Link:[ ]*"),
+ TQStringList link = TQStringList::split(";", TQString(buf)
+ .replace(TQRegExp("^Link:[ ]*"),
""));
if (link.count() == 2) {
- QString rel = link[1].stripWhiteSpace();
+ TQString rel = link[1].stripWhiteSpace();
if (rel.startsWith("rel=\"")) {
rel = rel.mid(5, rel.length() - 6);
if (rel.lower() == "pageservices") {
- QString url = link[0].replace(QRegExp("[<>]"),"").stripWhiteSpace();
+ TQString url = link[0].replace(TQRegExp("[<>]"),"").stripWhiteSpace();
setMetaData("PageServices", url);
}
}
}
}
else if (strncasecmp(buf, "P3P:", 4) == 0) {
- QString p3pstr = buf;
+ TQString p3pstr = buf;
p3pstr = p3pstr.mid(4).simplifyWhiteSpace();
- QStringList policyrefs, compact;
- QStringList policyfields = QStringList::split(QRegExp(",[ ]*"), p3pstr);
- for (QStringList::Iterator it = policyfields.begin();
+ TQStringList policyrefs, compact;
+ TQStringList policyfields = TQStringList::split(TQRegExp(",[ ]*"), p3pstr);
+ for (TQStringList::Iterator it = policyfields.begin();
it != policyfields.end();
++it) {
- QStringList policy = QStringList::split("=", *it);
+ TQStringList policy = TQStringList::split("=", *it);
if (policy.count() == 2) {
if (policy[0].lower() == "policyref") {
- policyrefs << policy[1].replace(QRegExp("[\"\']"), "")
+ policyrefs << policy[1].replace(TQRegExp("[\"\']"), "")
.stripWhiteSpace();
} else if (policy[0].lower() == "cp") {
// We convert to cp\ncp\ncp\n[...]\ncp to be consistent with
// other metadata sent in strings. This could be a bit more
// efficient but I'm going for correctness right now.
- QStringList cps = QStringList::split(" ",
- policy[1].replace(QRegExp("[\"\']"), "")
+ TQStringList cps = TQStringList::split(" ",
+ policy[1].replace(TQRegExp("[\"\']"), "")
.simplifyWhiteSpace());
- for (QStringList::Iterator j = cps.begin(); j != cps.end(); ++j)
+ for (TQStringList::Iterator j = cps.begin(); j != cps.end(); ++j)
compact << *j;
}
}
@@ -3374,17 +3374,17 @@ try_again:
// md5 signature
else if (strncasecmp(buf, "Content-MD5:", 12) == 0) {
- m_sContentMD5 = QString::fromLatin1(trimLead(buf + 12));
+ m_sContentMD5 = TQString::fromLatin1(trimLead(buf + 12));
}
// *** Responses to the HTTP OPTIONS method follow
// WebDAV capabilities
else if (strncasecmp(buf, "DAV:", 4) == 0) {
if (m_davCapabilities.isEmpty()) {
- m_davCapabilities << QString::fromLatin1(trimLead(buf + 4));
+ m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4));
}
else {
- m_davCapabilities << QString::fromLatin1(trimLead(buf + 4));
+ m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4));
}
}
// *** Responses to the HTTP OPTIONS method finished
@@ -3410,7 +3410,7 @@ try_again:
} while (!m_bEOF && (len || noHeader) && (headerSize < maxHeaderSize) && (gets(buffer, sizeof(buffer)-1)));
// Now process the HTTP/1.1 upgrade
- QStringList::Iterator opt = upgradeOffers.begin();
+ TQStringList::Iterator opt = upgradeOffers.begin();
for( ; opt != upgradeOffers.end(); ++opt) {
if (*opt == "TLS/1.0") {
if(upgradeRequired) {
@@ -3488,7 +3488,7 @@ try_again:
if ((m_request.cookieMode == HTTPRequest::CookiesAuto) && m_request.bUseCookiejar)
{
// Give cookies to the cookiejar.
- QString domain = config()->readEntry("cross-domain");
+ TQString domain = config()->readEntry("cross-domain");
if (!domain.isEmpty() && isCrossDomainRequest(m_request.url.host(), domain))
cookieStr = "Cross-Domain\n" + cookieStr;
addCookies( m_request.url.url(), cookieStr );
@@ -3660,14 +3660,14 @@ try_again:
if (m_strMimeType == "application/x-tar")
{
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
- m_strMimeType = QString::fromLatin1("application/x-tgz");
+ m_strMimeType = TQString::fromLatin1("application/x-tgz");
}
else if (m_strMimeType == "application/postscript")
{
// LEONB: Adding another exception for psgz files.
// Could we use the mimelnk files instead of hardcoding all this?
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
- m_strMimeType = QString::fromLatin1("application/x-gzpostscript");
+ m_strMimeType = TQString::fromLatin1("application/x-gzpostscript");
}
else if ( m_request.allowCompressedPage &&
m_strMimeType != "application/x-tgz" &&
@@ -3676,7 +3676,7 @@ try_again:
m_request.url.path().right(6) == ".ps.gz" )
{
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
- m_strMimeType = QString::fromLatin1("application/x-gzpostscript");
+ m_strMimeType = TQString::fromLatin1("application/x-gzpostscript");
}
else if ( (m_request.allowCompressedPage &&
m_strMimeType == "text/html")
@@ -3693,7 +3693,7 @@ try_again:
else
{
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
- m_strMimeType = QString::fromLatin1("application/x-gzip");
+ m_strMimeType = TQString::fromLatin1("application/x-gzip");
}
}
@@ -3706,34 +3706,34 @@ try_again:
if (m_qContentEncodings.last() == "bzip2")
{
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
- m_strMimeType = QString::fromLatin1("application/x-bzip2");
+ m_strMimeType = TQString::fromLatin1("application/x-bzip2");
}
// Convert some common mimetypes to standard KDE mimetypes
if (m_strMimeType == "application/x-targz")
- m_strMimeType = QString::fromLatin1("application/x-tgz");
+ m_strMimeType = TQString::fromLatin1("application/x-tgz");
else if (m_strMimeType == "application/zip")
- m_strMimeType = QString::fromLatin1("application/x-zip");
+ m_strMimeType = TQString::fromLatin1("application/x-zip");
else if (m_strMimeType == "image/x-png")
- m_strMimeType = QString::fromLatin1("image/png");
+ m_strMimeType = TQString::fromLatin1("image/png");
else if (m_strMimeType == "image/bmp")
- m_strMimeType = QString::fromLatin1("image/x-bmp");
+ m_strMimeType = TQString::fromLatin1("image/x-bmp");
else if (m_strMimeType == "audio/mpeg" || m_strMimeType == "audio/x-mpeg" || m_strMimeType == "audio/mp3")
- m_strMimeType = QString::fromLatin1("audio/x-mp3");
+ m_strMimeType = TQString::fromLatin1("audio/x-mp3");
else if (m_strMimeType == "audio/microsoft-wave")
- m_strMimeType = QString::fromLatin1("audio/x-wav");
+ m_strMimeType = TQString::fromLatin1("audio/x-wav");
else if (m_strMimeType == "audio/midi")
- m_strMimeType = QString::fromLatin1("audio/x-midi");
+ m_strMimeType = TQString::fromLatin1("audio/x-midi");
else if (m_strMimeType == "image/x-xpixmap")
- m_strMimeType = QString::fromLatin1("image/x-xpm");
+ m_strMimeType = TQString::fromLatin1("image/x-xpm");
else if (m_strMimeType == "application/rtf")
- m_strMimeType = QString::fromLatin1("text/rtf");
+ m_strMimeType = TQString::fromLatin1("text/rtf");
// Crypto ones....
else if (m_strMimeType == "application/pkix-cert" ||
m_strMimeType == "application/binary-certificate")
{
- m_strMimeType = QString::fromLatin1("application/x-x509-ca-cert");
+ m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert");
}
// Prefer application/x-tgz or x-gzpostscript over application/x-gzip.
@@ -3741,25 +3741,25 @@ try_again:
{
if ((m_request.url.path().right(7) == ".tar.gz") ||
(m_request.url.path().right(4) == ".tar"))
- m_strMimeType = QString::fromLatin1("application/x-tgz");
+ m_strMimeType = TQString::fromLatin1("application/x-tgz");
if ((m_request.url.path().right(6) == ".ps.gz"))
- m_strMimeType = QString::fromLatin1("application/x-gzpostscript");
+ m_strMimeType = TQString::fromLatin1("application/x-gzpostscript");
}
// Some webservers say "text/plain" when they mean "application/x-bzip2"
else if ((m_strMimeType == "text/plain") || (m_strMimeType == "application/octet-stream"))
{
- QString ext = m_request.url.path().right(4).upper();
+ TQString ext = m_request.url.path().right(4).upper();
if (ext == ".BZ2")
- m_strMimeType = QString::fromLatin1("application/x-bzip2");
+ m_strMimeType = TQString::fromLatin1("application/x-bzip2");
else if (ext == ".PEM")
- m_strMimeType = QString::fromLatin1("application/x-x509-ca-cert");
+ m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert");
else if (ext == ".SWF")
- m_strMimeType = QString::fromLatin1("application/x-shockwave-flash");
+ m_strMimeType = TQString::fromLatin1("application/x-shockwave-flash");
else if (ext == ".PLS")
- m_strMimeType = QString::fromLatin1("audio/x-scpls");
+ m_strMimeType = TQString::fromLatin1("audio/x-scpls");
else if (ext == ".WMV")
- m_strMimeType = QString::fromLatin1("video/x-ms-wmv");
+ m_strMimeType = TQString::fromLatin1("video/x-ms-wmv");
}
#if 0
@@ -3798,7 +3798,7 @@ try_again:
}
else
{
- QString tmp;
+ TQString tmp;
tmp.setNum(expireDate);
setMetaData("expire-date", tmp);
tmp.setNum(time(0)); // Cache entry will be created shortly.
@@ -3824,7 +3824,7 @@ try_again:
// Do we want to cache this request?
if (m_request.bUseCache)
{
- ::unlink( QFile::encodeName(m_request.cef));
+ ::unlink( TQFile::encodeName(m_request.cef));
if ( m_request.bCachedWrite && !m_strMimeType.isEmpty() )
{
// Check...
@@ -3849,7 +3849,7 @@ try_again:
}
-void HTTPProtocol::addEncoding(QString encoding, QStringList &encs)
+void HTTPProtocol::addEncoding(TQString encoding, TQStringList &encs)
{
encoding = encoding.stripWhiteSpace().lower();
// Identity is the same as no encoding
@@ -3864,11 +3864,11 @@ void HTTPProtocol::addEncoding(QString encoding, QStringList &encs)
//if ( m_cmd != CMD_COPY )
m_iSize = NO_SIZE;
} else if ((encoding == "x-gzip") || (encoding == "gzip")) {
- encs.append(QString::fromLatin1("gzip"));
+ encs.append(TQString::fromLatin1("gzip"));
} else if ((encoding == "x-bzip2") || (encoding == "bzip2")) {
- encs.append(QString::fromLatin1("bzip2")); // Not yet supported!
+ encs.append(TQString::fromLatin1("bzip2")); // Not yet supported!
} else if ((encoding == "x-deflate") || (encoding == "deflate")) {
- encs.append(QString::fromLatin1("deflate"));
+ encs.append(TQString::fromLatin1("deflate"));
} else {
kdDebug(7113) << "(" << m_pid << ") Unknown encoding encountered. "
<< "Please write code. Encoding = \"" << encoding
@@ -3897,7 +3897,7 @@ bool HTTPProtocol::sendBody()
{
kdDebug(7113) << "(" << m_pid << ") POST'ing live data..." << endl;
- QByteArray buffer;
+ TQByteArray buffer;
int old_size;
m_bufPOST.resize(0);
@@ -3924,7 +3924,7 @@ bool HTTPProtocol::sendBody()
infoMessage( i18n( "Sending data to %1" ).arg( m_request.hostname ) );
- QString size = QString ("Content-Length: %1\r\n\r\n").arg(length);
+ TQString size = TQString ("Content-Length: %1\r\n\r\n").arg(length);
kdDebug( 7113 ) << "(" << m_pid << ")" << size << endl;
// Send the content length...
@@ -3938,7 +3938,7 @@ bool HTTPProtocol::sendBody()
}
// Send the data...
- // kdDebug( 7113 ) << "(" << m_pid << ") POST DATA: " << QCString(m_bufPOST) << endl;
+ // kdDebug( 7113 ) << "(" << m_pid << ") POST DATA: " << TQCString(m_bufPOST) << endl;
sendOk = (write(m_bufPOST.data(), m_bufPOST.size()) == (ssize_t) m_bufPOST.size());
if (!sendOk)
{
@@ -3961,8 +3961,8 @@ void HTTPProtocol::httpClose( bool keepAlive )
m_request.fcache = 0;
if (m_request.bCachedWrite)
{
- QString filename = m_request.cef + ".new";
- ::unlink( QFile::encodeName(filename) );
+ TQString filename = m_request.cef + ".new";
+ ::unlink( TQFile::encodeName(filename) );
}
}
@@ -3979,8 +3979,8 @@ void HTTPProtocol::httpClose( bool keepAlive )
m_keepAliveTimeout = 2*DEFAULT_KEEP_ALIVE_TIMEOUT;
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::httpClose: keep alive (" << m_keepAliveTimeout << ")" << endl;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << int(99); // special: Close connection
setTimeoutSpecialCommand(m_keepAliveTimeout, data);
return;
@@ -4034,12 +4034,12 @@ void HTTPProtocol::mimetype( const KURL& url )
<< endl;
}
-void HTTPProtocol::special( const QByteArray &data )
+void HTTPProtocol::special( const TQByteArray &data )
{
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::special" << endl;
int tmp;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
stream >> tmp;
switch (tmp) {
@@ -4062,7 +4062,7 @@ void HTTPProtocol::special( const QByteArray &data )
case 5: // WebDAV lock
{
KURL url;
- QString scope, type, owner;
+ TQString scope, type, owner;
stream >> url >> scope >> type >> owner;
davLock( url, scope, type, owner );
break;
@@ -4212,7 +4212,7 @@ int HTTPProtocol::readUnlimited()
return 0;
}
-void HTTPProtocol::slotData(const QByteArray &_d)
+void HTTPProtocol::slotData(const TQByteArray &_d)
{
if (!_d.size())
{
@@ -4228,7 +4228,7 @@ void HTTPProtocol::slotData(const QByteArray &_d)
m_iContentLeft = NO_SIZE;
}
- QByteArray d = _d;
+ TQByteArray d = _d;
if ( !m_dataInternal )
{
// If a broken server does not send the mime-type,
@@ -4263,7 +4263,7 @@ void HTTPProtocol::slotData(const QByteArray &_d)
if ( m_strMimeType.isEmpty() )
{
- m_strMimeType = QString::fromLatin1( DEFAULT_MIME_TYPE );
+ m_strMimeType = TQString::fromLatin1( DEFAULT_MIME_TYPE );
kdDebug(7113) << "(" << m_pid << ") Using default mimetype: "
<< m_strMimeType << endl;
}
@@ -4277,7 +4277,7 @@ void HTTPProtocol::slotData(const QByteArray &_d)
if ( m_cpMimeBuffer )
{
- // Do not make any assumption about the state of the QByteArray we received.
+ // Do not make any assumption about the state of the TQByteArray we received.
// Fix the crash described by BR# 130104.
d.detach();
d.resize(0);
@@ -4380,7 +4380,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
if ( !dataInternal )
{
processedSize( sz );
- data( QByteArray() );
+ data( TQByteArray() );
}
return true;
@@ -4408,15 +4408,15 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
HTTPFilterChain chain;
- QObject::connect(&chain, SIGNAL(output(const QByteArray &)),
- this, SLOT(slotData(const QByteArray &)));
- QObject::connect(&chain, SIGNAL(error(int, const QString &)),
- this, SLOT(error(int, const QString &)));
+ TQObject::connect(&chain, TQT_SIGNAL(output(const TQByteArray &)),
+ this, TQT_SLOT(slotData(const TQByteArray &)));
+ TQObject::connect(&chain, TQT_SIGNAL(error(int, const TQString &)),
+ this, TQT_SLOT(error(int, const TQString &)));
// decode all of the transfer encodings
while (!m_qTransferEncodings.isEmpty())
{
- QString enc = m_qTransferEncodings.last();
+ TQString enc = m_qTransferEncodings.last();
m_qTransferEncodings.remove(m_qTransferEncodings.fromLast());
if ( enc == "gzip" )
chain.addFilter(new HTTPFilterGZip);
@@ -4447,7 +4447,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
// WB: They shouldn't do that. We can work around that though...
while (!m_qContentEncodings.isEmpty())
{
- QString enc = m_qContentEncodings.last();
+ TQString enc = m_qContentEncodings.last();
m_qContentEncodings.remove(m_qContentEncodings.fromLast());
if ( enc == "gzip" )
chain.addFilter(new HTTPFilterGZip);
@@ -4518,11 +4518,11 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
break;
}
}
- chain.slotInput(QByteArray()); // Flush chain.
+ chain.slotInput(TQByteArray()); // Flush chain.
if ( useMD5 )
{
- QString calculatedMD5 = md5Filter->md5();
+ TQString calculatedMD5 = md5Filter->md5();
if ( m_sContentMD5 == calculatedMD5 )
kdDebug(7113) << "(" << m_pid << ") MD5 checksum MATCHED!!" << endl;
@@ -4556,13 +4556,13 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
}
if (!dataInternal)
- data( QByteArray() );
+ data( TQByteArray() );
return true;
}
-void HTTPProtocol::error( int _err, const QString &_text )
+void HTTPProtocol::error( int _err, const TQString &_text )
{
httpClose(false);
@@ -4585,50 +4585,50 @@ void HTTPProtocol::error( int _err, const QString &_text )
}
-void HTTPProtocol::addCookies( const QString &url, const QCString &cookieHeader )
+void HTTPProtocol::addCookies( const TQString &url, const TQCString &cookieHeader )
{
long windowId = m_request.window.toLong();
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << url << cookieHeader << windowId;
kdDebug(7113) << "(" << m_pid << ") " << cookieHeader << endl;
kdDebug(7113) << "(" << m_pid << ") " << "Window ID: "
<< windowId << ", for host = " << url << endl;
- if ( !dcopClient()->send( "kded", "kcookiejar", "addCookies(QString,QCString,long int)", params ) )
+ if ( !dcopClient()->send( "kded", "kcookiejar", "addCookies(TQString,TQCString,long int)", params ) )
{
kdWarning(7113) << "(" << m_pid << ") Can't communicate with kded_kcookiejar!" << endl;
}
}
-QString HTTPProtocol::findCookies( const QString &url)
+TQString HTTPProtocol::findCookies( const TQString &url)
{
- QCString replyType;
- QByteArray params;
- QByteArray reply;
- QString result;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
+ TQString result;
long windowId = m_request.window.toLong();
- result = QString::null;
- QDataStream stream(params, IO_WriteOnly);
+ result = TQString::null;
+ TQDataStream stream(params, IO_WriteOnly);
stream << url << windowId;
- if ( !dcopClient()->call( "kded", "kcookiejar", "findCookies(QString,long int)",
+ if ( !dcopClient()->call( "kded", "kcookiejar", "findCookies(TQString,long int)",
params, replyType, reply ) )
{
kdWarning(7113) << "(" << m_pid << ") Can't communicate with kded_kcookiejar!" << endl;
return result;
}
- if ( replyType == "QString" )
+ if ( replyType == "TQString" )
{
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> result;
}
else
{
kdError(7113) << "(" << m_pid << ") DCOP function findCookies(...) returns "
- << replyType << ", expected QString" << endl;
+ << replyType << ", expected TQString" << endl;
}
return result;
}
@@ -4653,7 +4653,7 @@ void HTTPProtocol::cacheUpdate( const KURL& url, bool no_cache, time_t expireDat
{
fclose(m_request.fcache);
m_request.fcache = 0;
- ::unlink( QFile::encodeName(m_request.cef) );
+ ::unlink( TQFile::encodeName(m_request.cef) );
}
}
else
@@ -4669,9 +4669,9 @@ void HTTPProtocol::cacheUpdate( const KURL& url, bool no_cache, time_t expireDat
FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
{
- const QChar separator = '_';
+ const TQChar separator = '_';
- QString CEF = m_request.path;
+ TQString CEF = m_request.path;
int p = CEF.find('/');
@@ -4681,10 +4681,10 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
p = CEF.find('/', p);
}
- QString host = m_request.hostname.lower();
+ TQString host = m_request.hostname.lower();
CEF = host + CEF + '_';
- QString dir = m_strCacheDir;
+ TQString dir = m_strCacheDir;
if (dir[dir.length()-1] != '/')
dir += "/";
@@ -4701,13 +4701,13 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
dir += "0";
unsigned long hash = 0x00000000;
- QCString u = m_request.url.url().latin1();
+ TQCString u = m_request.url.url().latin1();
for(int i = u.length(); i--;)
{
hash = (hash * 12211 + u[i]) % 2147483563;
}
- QString hashString;
+ TQString hashString;
hashString.sprintf("%08lx", hash);
CEF = CEF + hashString;
@@ -4718,7 +4718,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
const char *mode = (readWrite ? "r+" : "r");
- FILE *fs = fopen( QFile::encodeName(CEF), mode); // Open for reading and writing
+ FILE *fs = fopen( TQFile::encodeName(CEF), mode); // Open for reading and writing
if (!fs)
return 0;
@@ -4788,7 +4788,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
ok = false;
if (ok)
{
- m_request.etag = QString(buffer).stripWhiteSpace();
+ m_request.etag = TQString(buffer).stripWhiteSpace();
}
// Last-Modified
@@ -4796,14 +4796,14 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite)
ok = false;
if (ok)
{
- m_request.lastModified = QString(buffer).stripWhiteSpace();
+ m_request.lastModified = TQString(buffer).stripWhiteSpace();
}
if (ok)
return fs;
fclose(fs);
- unlink( QFile::encodeName(CEF));
+ unlink( TQFile::encodeName(CEF));
return 0;
}
@@ -4814,7 +4814,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate)
FILE *fs = checkCacheEntry(true);
if (fs)
{
- QString date;
+ TQString date;
char buffer[401];
time_t creationDate;
@@ -4834,7 +4834,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate)
{
if (!ok || fseek(fs, cacheCreationDateOffset, SEEK_SET))
return;
- QString date;
+ TQString date;
date.setNum( time(0) );
date = date.leftJustify(16);
fputs(date.latin1(), fs); // Creation date
@@ -4865,21 +4865,21 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate)
}
}
-void HTTPProtocol::createCacheEntry( const QString &mimetype, time_t expireDate)
+void HTTPProtocol::createCacheEntry( const TQString &mimetype, time_t expireDate)
{
- QString dir = m_request.cef;
+ TQString dir = m_request.cef;
int p = dir.findRev('/');
if (p == -1) return; // Error.
dir.truncate(p);
// Create file
- (void) ::mkdir( QFile::encodeName(dir), 0700 );
+ (void) ::mkdir( TQFile::encodeName(dir), 0700 );
- QString filename = m_request.cef + ".new"; // Create a new cache entryexpireDate
+ TQString filename = m_request.cef + ".new"; // Create a new cache entryexpireDate
// kdDebug( 7103 ) << "creating new cache entry: " << filename << endl;
- m_request.fcache = fopen( QFile::encodeName(filename), "w");
+ m_request.fcache = fopen( TQFile::encodeName(filename), "w");
if (!m_request.fcache)
{
kdWarning(7113) << "(" << m_pid << ")createCacheEntry: opening " << filename << " failed." << endl;
@@ -4891,7 +4891,7 @@ void HTTPProtocol::createCacheEntry( const QString &mimetype, time_t expireDate)
fputs(m_request.url.url().latin1(), m_request.fcache); // Url
fputc('\n', m_request.fcache);
- QString date;
+ TQString date;
m_request.creationDate = time(0);
date.setNum( m_request.creationDate );
date = date.leftJustify(16);
@@ -4931,8 +4931,8 @@ void HTTPProtocol::writeCacheEntry( const char *buffer, int nbytes)
kdWarning(7113) << "(" << m_pid << ") writeCacheEntry: writing " << nbytes << " bytes failed." << endl;
fclose(m_request.fcache);
m_request.fcache = 0;
- QString filename = m_request.cef + ".new";
- ::unlink( QFile::encodeName(filename) );
+ TQString filename = m_request.cef + ".new";
+ ::unlink( TQFile::encodeName(filename) );
return;
}
long file_pos = ftell( m_request.fcache ) / 1024;
@@ -4942,20 +4942,20 @@ void HTTPProtocol::writeCacheEntry( const char *buffer, int nbytes)
<< "Kb, exceeds cache limits. (" << m_maxCacheSize << "Kb)" << endl;
fclose(m_request.fcache);
m_request.fcache = 0;
- QString filename = m_request.cef + ".new";
- ::unlink( QFile::encodeName(filename) );
+ TQString filename = m_request.cef + ".new";
+ ::unlink( TQFile::encodeName(filename) );
return;
}
}
void HTTPProtocol::closeCacheEntry()
{
- QString filename = m_request.cef + ".new";
+ TQString filename = m_request.cef + ".new";
int result = fclose( m_request.fcache);
m_request.fcache = 0;
if (result == 0)
{
- if (::rename( QFile::encodeName(filename), QFile::encodeName(m_request.cef)) == 0)
+ if (::rename( TQFile::encodeName(filename), TQFile::encodeName(m_request.cef)) == 0)
return; // Success
kdWarning(7113) << "(" << m_pid << ") closeCacheEntry: error renaming "
@@ -4971,17 +4971,17 @@ void HTTPProtocol::cleanCache()
{
const time_t maxAge = DEFAULT_CLEAN_CACHE_INTERVAL; // 30 Minutes.
bool doClean = false;
- QString cleanFile = m_strCacheDir;
+ TQString cleanFile = m_strCacheDir;
if (cleanFile[cleanFile.length()-1] != '/')
cleanFile += "/";
cleanFile += "cleaned";
struct stat stat_buf;
- int result = ::stat(QFile::encodeName(cleanFile), &stat_buf);
+ int result = ::stat(TQFile::encodeName(cleanFile), &stat_buf);
if (result == -1)
{
- int fd = creat( QFile::encodeName(cleanFile), 0600);
+ int fd = creat( TQFile::encodeName(cleanFile), 0600);
if (fd != -1)
{
doClean = true;
@@ -4997,7 +4997,7 @@ void HTTPProtocol::cleanCache()
if (doClean)
{
// Touch file.
- utime(QFile::encodeName(cleanFile), 0);
+ utime(TQFile::encodeName(cleanFile), 0);
KApplication::startServiceByDesktopPath("http_cache_cleaner.desktop");
}
}
@@ -5106,19 +5106,19 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy )
if ( strncasecmp( p, "realm=", 6 ) == 0 )
{
//for sites like lib.homelinux.org
- QTextCodec* oldCodec=QTextCodec::codecForCStrings();
+ TQTextCodec* oldCodec=TQTextCodec::codecForCStrings();
if (KGlobal::locale()->language().contains("ru"))
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("CP1251"));
+ TQTextCodec::setCodecForCStrings(TQTextCodec::codecForName("CP1251"));
p += 6;
if (*p == '"') p++;
while( p[i] && p[i] != '"' ) i++;
if( isForProxy )
- m_strProxyRealm = QString::fromAscii( p, i );
+ m_strProxyRealm = TQString::fromAscii( p, i );
else
- m_strRealm = QString::fromAscii( p, i );
+ m_strRealm = TQString::fromAscii( p, i );
- QTextCodec::setCodecForCStrings(oldCodec);
+ TQTextCodec::setCodecForCStrings(oldCodec);
if (!p[i]) break;
}
@@ -5128,19 +5128,19 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy )
if( isForProxy )
{
ProxyAuthentication = f;
- m_strProxyAuthorization = QString::fromLatin1( strAuth );
+ m_strProxyAuthorization = TQString::fromLatin1( strAuth );
}
else
{
Authentication = f;
- m_strAuthorization = QString::fromLatin1( strAuth );
+ m_strAuthorization = TQString::fromLatin1( strAuth );
}
}
bool HTTPProtocol::retryPrompt()
{
- QString prompt;
+ TQString prompt;
switch ( m_responseCode )
{
case 401:
@@ -5217,7 +5217,7 @@ bool HTTPProtocol::getAuthorization()
bool repeatFailure = (m_prevResponseCode == m_responseCode);
- QString errorMsg;
+ TQString errorMsg;
if (repeatFailure)
{
@@ -5225,7 +5225,7 @@ bool HTTPProtocol::getAuthorization()
if ( Authentication == AUTH_Digest || ProxyAuthentication == AUTH_Digest )
{
bool isStaleNonce = false;
- QString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization;
+ TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization;
int pos = auth.find("stale", 0, false);
if ( pos != -1 )
{
@@ -5262,7 +5262,7 @@ bool HTTPProtocol::getAuthorization()
if ( Authentication == AUTH_NTLM || ProxyAuthentication == AUTH_NTLM )
{
- QString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization;
+ TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization;
kdDebug(7113) << "auth: " << auth << endl;
if ( auth.length() > 4 )
{
@@ -5344,7 +5344,7 @@ bool HTTPProtocol::getAuthorization()
if ( Authentication == AUTH_Digest )
{
- QString auth;
+ TQString auth;
if (m_responseCode == 401)
auth = m_strAuthorization;
@@ -5417,7 +5417,7 @@ bool HTTPProtocol::getAuthorization()
if (m_request.bErrorPage)
errorPage();
else
- error( ERR_USER_CANCELED, QString::null );
+ error( ERR_USER_CANCELED, TQString::null );
return false;
}
@@ -5448,14 +5448,14 @@ void HTTPProtocol::saveAuthorization()
}
#ifdef HAVE_LIBGSSAPI
-QCString HTTPProtocol::gssError( int major_status, int minor_status )
+TQCString HTTPProtocol::gssError( int major_status, int minor_status )
{
OM_uint32 new_status;
OM_uint32 msg_ctx = 0;
gss_buffer_desc major_string;
gss_buffer_desc minor_string;
OM_uint32 ret;
- QCString errorstr;
+ TQCString errorstr;
errorstr = "";
@@ -5471,11 +5471,11 @@ QCString HTTPProtocol::gssError( int major_status, int minor_status )
return errorstr;
}
-QString HTTPProtocol::createNegotiateAuth()
+TQString HTTPProtocol::createNegotiateAuth()
{
- QString auth;
- QCString servicename;
- QByteArray input;
+ TQString auth;
+ TQCString servicename;
+ TQByteArray input;
OM_uint32 major_status, minor_status;
OM_uint32 req_flags = 0;
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
@@ -5527,8 +5527,8 @@ QString HTTPProtocol::createNegotiateAuth()
if (GSS_ERROR(major_status)) {
kdDebug(7113) << "(" << m_pid << ") gss_import_name failed: " << gssError(major_status, minor_status) << endl;
// reset the auth string so that subsequent methods aren't confused
- m_strAuthorization = QString::null;
- return QString::null;
+ m_strAuthorization = TQString::null;
+ return TQString::null;
}
major_status = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL,
@@ -5547,8 +5547,8 @@ QString HTTPProtocol::createNegotiateAuth()
ctx = GSS_C_NO_CONTEXT;
}
// reset the auth string so that subsequent methods aren't confused
- m_strAuthorization = QString::null;
- return QString::null;
+ m_strAuthorization = TQString::null;
+ return TQString::null;
}
input.duplicate((const char *)output_token.value, output_token.length);
@@ -5569,24 +5569,24 @@ QString HTTPProtocol::createNegotiateAuth()
#else
// Dummy
-QCString HTTPProtocol::gssError( int, int )
+TQCString HTTPProtocol::gssError( int, int )
{
return "";
}
// Dummy
-QString HTTPProtocol::createNegotiateAuth()
+TQString HTTPProtocol::createNegotiateAuth()
{
- return QString::null;
+ return TQString::null;
}
#endif
-QString HTTPProtocol::createNTLMAuth( bool isForProxy )
+TQString HTTPProtocol::createNTLMAuth( bool isForProxy )
{
uint len;
- QString auth, user, domain, passwd;
- QCString strauth;
- QByteArray buf;
+ TQString auth, user, domain, passwd;
+ TQCString strauth;
+ TQByteArray buf;
if ( isForProxy )
{
@@ -5612,12 +5612,12 @@ QString HTTPProtocol::createNTLMAuth( bool isForProxy )
kdDebug(7113) << "(" << m_pid << ") NTLM length: " << len << endl;
if ( user.isEmpty() || passwd.isEmpty() || len < 4 )
- return QString::null;
+ return TQString::null;
if ( len > 4 )
{
// create a response
- QByteArray challenge;
+ TQByteArray challenge;
KCodecs::base64Decode( strauth.right( len - 5 ), challenge );
KNTLM::getAuth( buf, challenge, user, passwd, domain,
KNetwork::KResolver::localHostName(), false, false );
@@ -5639,10 +5639,10 @@ QString HTTPProtocol::createNTLMAuth( bool isForProxy )
return auth;
}
-QString HTTPProtocol::createBasicAuth( bool isForProxy )
+TQString HTTPProtocol::createBasicAuth( bool isForProxy )
{
- QString auth;
- QCString user, passwd;
+ TQString auth;
+ TQCString user, passwd;
if ( isForProxy )
{
auth = "Proxy-Authorization: Basic ";
@@ -5669,14 +5669,14 @@ QString HTTPProtocol::createBasicAuth( bool isForProxy )
return auth;
}
-void HTTPProtocol::calculateResponse( DigestAuthInfo& info, QCString& Response )
+void HTTPProtocol::calculateResponse( DigestAuthInfo& info, TQCString& Response )
{
KMD5 md;
- QCString HA1;
- QCString HA2;
+ TQCString HA1;
+ TQCString HA2;
// Calculate H(A1)
- QCString authStr = info.username;
+ TQCString authStr = info.username;
authStr += ':';
authStr += info.realm;
authStr += ':';
@@ -5736,13 +5736,13 @@ void HTTPProtocol::calculateResponse( DigestAuthInfo& info, QCString& Response )
<< Response << endl;
}
-QString HTTPProtocol::createDigestAuth ( bool isForProxy )
+TQString HTTPProtocol::createDigestAuth ( bool isForProxy )
{
const char *p;
- QString auth;
- QCString opaque;
- QCString Response;
+ TQString auth;
+ TQCString opaque;
+ TQCString Response;
DigestAuthInfo info;
@@ -5762,12 +5762,12 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
p = m_strAuthorization.latin1();
}
if (!p || !*p)
- return QString::null;
+ return TQString::null;
p += 6; // Skip "Digest"
if ( info.username.isEmpty() || info.password.isEmpty() || !p )
- return QString::null;
+ return TQString::null;
// info.entityBody = p; // FIXME: send digest of data for POST action ??
info.realm = "";
@@ -5847,21 +5847,21 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
p+=6;
while ( *p == '"' ) p++; // Go past any number of " mark(s) first
while ( p[i] != '"' ) i++; // Read everything until the last " mark
- info.realm = QCString( p, i+1 );
+ info.realm = TQCString( p, i+1 );
}
else if (strncasecmp(p, "algorith=", 9)==0)
{
p+=9;
while ( *p == '"' ) p++; // Go past any number of " mark(s) first
while ( ( p[i] != '"' ) && ( p[i] != ',' ) && ( p[i] != '\0' ) ) i++;
- info.algorithm = QCString(p, i+1);
+ info.algorithm = TQCString(p, i+1);
}
else if (strncasecmp(p, "algorithm=", 10)==0)
{
p+=10;
while ( *p == '"' ) p++; // Go past any " mark(s) first
while ( ( p[i] != '"' ) && ( p[i] != ',' ) && ( p[i] != '\0' ) ) i++;
- info.algorithm = QCString(p,i+1);
+ info.algorithm = TQCString(p,i+1);
}
else if (strncasecmp(p, "domain=", 7)==0)
{
@@ -5870,7 +5870,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
while ( p[i] != '"' ) i++; // Read everything until the last " mark
int pos;
int idx = 0;
- QCString uri = QCString(p,i+1);
+ TQCString uri = TQCString(p,i+1);
do
{
pos = uri.find( ' ', idx );
@@ -5894,27 +5894,27 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
p+=6;
while ( *p == '"' ) p++; // Go past any " mark(s) first
while ( p[i] != '"' ) i++; // Read everything until the last " mark
- info.nonce = QCString(p,i+1);
+ info.nonce = TQCString(p,i+1);
}
else if (strncasecmp(p, "opaque=", 7)==0)
{
p+=7;
while ( *p == '"' ) p++; // Go past any " mark(s) first
while ( p[i] != '"' ) i++; // Read everything until the last " mark
- opaque = QCString(p,i+1);
+ opaque = TQCString(p,i+1);
}
else if (strncasecmp(p, "qop=", 4)==0)
{
p+=4;
while ( *p == '"' ) p++; // Go past any " mark(s) first
while ( p[i] != '"' ) i++; // Read everything until the last " mark
- info.qop = QCString(p,i+1);
+ info.qop = TQCString(p,i+1);
}
p+=(i+1);
}
if (info.realm.isEmpty() || info.nonce.isEmpty())
- return QString::null;
+ return TQString::null;
// If the "domain" attribute was not specified and the current response code
// is authentication needed, add the current request url to the list over which
@@ -5928,7 +5928,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
bool send = true;
// Determine the path of the request url...
- QString requestPath = m_request.url.directory(false, false);
+ TQString requestPath = m_request.url.directory(false, false);
if (requestPath.isEmpty())
requestPath = "/";
@@ -5944,7 +5944,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
if (m_request.port > 0 && u.port() > 0)
send &= (m_request.port == u.port());
- QString digestPath = u.directory (false, false);
+ TQString digestPath = u.directory (false, false);
if (digestPath.isEmpty())
digestPath = "/";
@@ -5958,7 +5958,7 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
"authentication credential test: " << send << endl;
if (!send)
- return QString::null;
+ return TQString::null;
}
kdDebug(7113) << "(" << m_pid << ") RESULT OF PARSING:" << endl;
@@ -6010,9 +6010,9 @@ QString HTTPProtocol::createDigestAuth ( bool isForProxy )
return auth;
}
-QString HTTPProtocol::proxyAuthenticationHeader()
+TQString HTTPProtocol::proxyAuthenticationHeader()
{
- QString header;
+ TQString header;
// We keep proxy authentication locally until they are changed.
// Thus, no need to check with the password manager for every
diff --git a/kioslave/http/http.h b/kioslave/http/http.h
index ea2e68a8a..24f041cb4 100644
--- a/kioslave/http/http.h
+++ b/kioslave/http/http.h
@@ -30,9 +30,9 @@
#include <stdio.h>
#include <time.h>
-#include <qptrlist.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include "kio/tcpslavebase.h"
@@ -46,12 +46,12 @@ namespace KIO {
class AuthInfo;
}
-class HTTPProtocol : public QObject, public KIO::TCPSlaveBase
+class HTTPProtocol : public TQObject, public KIO::TCPSlaveBase
{
Q_OBJECT
public:
- HTTPProtocol( const QCString &protocol, const QCString &pool,
- const QCString &app );
+ HTTPProtocol( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app );
virtual ~HTTPProtocol();
/** HTTP version **/
@@ -75,11 +75,11 @@ public:
doProxy = false;
}
- QString hostname;
- QString encoded_hostname;
+ TQString hostname;
+ TQString encoded_hostname;
short unsigned int port;
- QString user;
- QString passwd;
+ TQString user;
+ TQString passwd;
bool doProxy;
};
@@ -92,7 +92,7 @@ public:
depth = 0;
}
- QString desturl;
+ TQString desturl;
bool overwrite;
int depth;
};
@@ -121,44 +121,44 @@ public:
creationDate = 0;
}
- QString hostname;
- QString encoded_hostname;
+ TQString hostname;
+ TQString encoded_hostname;
short unsigned int port;
- QString user;
- QString passwd;
- QString path;
- QString query;
+ TQString user;
+ TQString passwd;
+ TQString path;
+ TQString query;
KIO::HTTP_METHOD method;
KIO::CacheControl cache;
KIO::filesize_t offset;
bool doProxy;
KURL url;
- QString window; // Window Id this request is related to.
- QString referrer;
- QString charsets;
- QString languages;
+ TQString window; // Window Id this request is related to.
+ TQString referrer;
+ TQString charsets;
+ TQString languages;
bool allowCompressedPage;
bool disablePassDlg;
- QString userAgent;
- QString id;
+ TQString userAgent;
+ TQString id;
DAVRequest davData;
bool bNoAuth; // Do not authenticate
// Cache related
- QString cef; // Cache Entry File belonging to this URL.
+ TQString cef; // Cache Entry File belonging to this URL.
bool bUseCache; // Whether the cache is active
bool bCachedRead; // Whether the file is to be read from m_fcache.
bool bCachedWrite; // Whether the file is to be written to m_fcache.
FILE* fcache; // File stream of a cache entry
- QString etag; // ETag header.
- QString lastModified; // Last modified.
+ TQString etag; // ETag header.
+ TQString lastModified; // Last modified.
bool bMustRevalidate; // Cache entry is expired.
long cacheExpireDateOffset; // Position in the cache entry where the
// 16 byte expire date is stored.
time_t expireDate; // Date when the cache entry will expire
time_t creationDate; // Date when the cache entry was created
- QString strCharset; // Charset
+ TQString strCharset; // Charset
// Indicates whether an error-page or error-msg should is preferred.
bool bErrorPage;
@@ -170,22 +170,22 @@ public:
struct DigestAuthInfo
{
- QCString nc;
- QCString qop;
- QCString realm;
- QCString nonce;
- QCString method;
- QCString cnonce;
- QCString username;
- QCString password;
- QStrList digestURI;
- QCString algorithm;
- QCString entityBody;
+ TQCString nc;
+ TQCString qop;
+ TQCString realm;
+ TQCString nonce;
+ TQCString method;
+ TQCString cnonce;
+ TQCString username;
+ TQCString password;
+ TQStrList digestURI;
+ TQCString algorithm;
+ TQCString entityBody;
};
//---------------------- Re-implemented methods ----------------
- virtual void setHost(const QString& host, int port, const QString& user,
- const QString& pass);
+ virtual void setHost(const TQString& host, int port, const TQString& user,
+ const TQString& pass);
virtual void slave_status();
@@ -208,15 +208,15 @@ public:
void davGeneric( const KURL& url, KIO::HTTP_METHOD method );
// Send requests to lock and unlock resources
- void davLock( const KURL& url, const QString& scope,
- const QString& type, const QString& owner );
+ void davLock( const KURL& url, const TQString& scope,
+ const TQString& type, const TQString& owner );
void davUnlock( const KURL& url );
// Calls httpClose() and finished()
void davFinished();
// Handle error conditions
- QString davError( int code = -1, QString url = QString::null );
+ TQString davError( int code = -1, TQString url = TQString::null );
//---------------------------- End WebDAV -----------------------
/**
@@ -228,7 +228,7 @@ public:
* 5 - DAV LOCK (see
* 6 - DAV UNLOCK README.webdav)
*/
- virtual void special( const QByteArray &data );
+ virtual void special( const TQByteArray &data );
virtual void mimetype( const KURL& url);
@@ -239,7 +239,7 @@ public:
virtual void closeConnection(); // Forced close of connection
void post( const KURL& url );
- void multiGet(const QByteArray &data);
+ void multiGet(const TQByteArray &data);
bool checkRequestURL( const KURL& );
void cacheUpdate( const KURL &url, bool nocache, time_t expireDate);
@@ -248,8 +248,8 @@ public:
bool isOffline(const KURL &url); // Check network status
protected slots:
- void slotData(const QByteArray &);
- void error( int _errid, const QString &_text );
+ void slotData(const TQByteArray &);
+ void error( int _errid, const TQString &_text );
protected:
int readChunked(); // Read a chunk
@@ -281,7 +281,7 @@ protected:
* is nececesary because transfer encodings and
* content encodings must be handled separately.
*/
- void addEncoding(QString, QStringList &);
+ void addEncoding(TQString, TQStringList &);
void configAuth( char *, bool );
@@ -305,37 +305,37 @@ protected:
/**
* Performs a WebDAV stat or list
*/
- void davSetRequest( const QCString& requestXML );
+ void davSetRequest( const TQCString& requestXML );
void davStatList( const KURL& url, bool stat = true );
- void davParsePropstats( const QDomNodeList& propstats, KIO::UDSEntry& entry );
- void davParseActiveLocks( const QDomNodeList& activeLocks,
+ void davParsePropstats( const TQDomNodeList& propstats, KIO::UDSEntry& entry );
+ void davParseActiveLocks( const TQDomNodeList& activeLocks,
uint& lockCount );
/**
* Parses a date & time string
*/
- long parseDateTime( const QString& input, const QString& type );
+ long parseDateTime( const TQString& input, const TQString& type );
/**
* Returns the error code from a "HTTP/1.1 code Code Name" string
*/
- int codeFromResponse( const QString& response );
+ int codeFromResponse( const TQString& response );
/**
* Extracts locks from metadata
* Returns the appropriate If: header
*/
- QString davProcessLocks();
+ TQString davProcessLocks();
/**
* Send a cookie to the cookiejar
*/
- void addCookies( const QString &url, const QCString &cookieHeader);
+ void addCookies( const TQString &url, const TQCString &cookieHeader);
/**
* Look for cookies in the cookiejar
*/
- QString findCookies( const QString &url);
+ TQString findCookies( const TQString &url);
/**
* Do a cache lookup for the current url. (m_state.url)
@@ -355,7 +355,7 @@ protected:
*
* Set the contents type of the cache entry to 'mimetype'.
*/
- void createCacheEntry(const QString &mimetype, time_t expireDate);
+ void createCacheEntry(const TQString &mimetype, time_t expireDate);
/**
* Write data to cache.
@@ -413,7 +413,7 @@ protected:
* Returns any pre-cached proxy authentication info
* info in HTTP header format.
*/
- QString proxyAuthenticationHeader();
+ TQString proxyAuthenticationHeader();
/**
* Retrieves authorization info from cache or user.
@@ -428,32 +428,32 @@ protected:
/**
* Creates the entity-header for Basic authentication.
*/
- QString createBasicAuth( bool isForProxy = false );
+ TQString createBasicAuth( bool isForProxy = false );
/**
* Creates the entity-header for Digest authentication.
*/
- QString createDigestAuth( bool isForProxy = false );
+ TQString createDigestAuth( bool isForProxy = false );
/**
* Creates the entity-header for NTLM authentication.
*/
- QString createNTLMAuth( bool isForProxy = false );
+ TQString createNTLMAuth( bool isForProxy = false );
/**
* Creates the entity-header for Negotiate authentication.
*/
- QString createNegotiateAuth();
+ TQString createNegotiateAuth();
/**
* create GSS error string
*/
- QCString gssError( int major_status, int minor_status );
+ TQCString gssError( int major_status, int minor_status );
/**
* Calcualtes the message digest response based on RFC 2617.
*/
- void calculateResponse( DigestAuthInfo &info, QCString &Response );
+ void calculateResponse( DigestAuthInfo &info, TQCString &Response );
/**
* Prompts the user for authorization retry.
@@ -468,14 +468,14 @@ protected:
protected:
HTTPState m_state;
HTTPRequest m_request;
- QPtrList<HTTPRequest> m_requestQueue;
+ TQPtrList<HTTPRequest> m_requestQueue;
bool m_bBusy; // Busy handling request queue.
bool m_bEOF;
bool m_bEOD;
//--- Settings related to a single response only
- QStringList m_responseHeader; // All headers
+ TQStringList m_responseHeader; // All headers
KURL m_redirectLocation;
bool m_bRedirect; // Indicates current request is a redirection
@@ -484,7 +484,7 @@ protected:
KIO::filesize_t m_iSize; // Expected size of message
KIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message.
KIO::filesize_t m_iContentLeft; // # of content bytes left
- QByteArray m_bufReceive; // Receive buffer
+ TQByteArray m_bufReceive; // Receive buffer
bool m_dataInternal; // Data is for internal consumption
char m_lineBuf[1024];
char m_rewindBuf[8192];
@@ -497,19 +497,19 @@ protected:
// Mimetype determination
bool m_cpMimeBuffer;
- QByteArray m_mimeTypeBuffer;
+ TQByteArray m_mimeTypeBuffer;
// Language/Encoding related
- QStringList m_qTransferEncodings;
- QStringList m_qContentEncodings;
- QString m_sContentMD5;
- QString m_strMimeType;
+ TQStringList m_qTransferEncodings;
+ TQStringList m_qContentEncodings;
+ TQString m_sContentMD5;
+ TQString m_strMimeType;
//--- WebDAV
// Data structure to hold data which will be passed to an internal func.
- QByteArray m_bufWebDavData;
- QStringList m_davCapabilities;
+ TQByteArray m_bufWebDavData;
+ TQStringList m_davCapabilities;
bool m_davHostOk;
bool m_davHostUnsupported;
@@ -518,12 +518,12 @@ protected:
// Holds the POST data so it won't get lost on if we
// happend to get a 401/407 response when submitting,
// a form.
- QByteArray m_bufPOST;
+ TQByteArray m_bufPOST;
// Cache related
int m_maxCacheAge; // Maximum age of a cache entry.
long m_maxCacheSize; // Maximum cache size in Kb.
- QString m_strCacheDir; // Location of the cache.
+ TQString m_strCacheDir; // Location of the cache.
@@ -534,15 +534,15 @@ protected:
bool m_bProxyAuthValid;
int m_iProxyPort;
KURL m_proxyURL;
- QString m_strProxyRealm;
+ TQString m_strProxyRealm;
// Operation mode
- QCString m_protocol;
+ TQCString m_protocol;
// Authentication
- QString m_strRealm;
- QString m_strAuthorization;
- QString m_strProxyAuthorization;
+ TQString m_strRealm;
+ TQString m_strAuthorization;
+ TQString m_strProxyAuthorization;
HTTP_AUTH Authentication;
HTTP_AUTH ProxyAuthentication;
bool m_bUnauthorized;
diff --git a/kioslave/http/http_cache_cleaner.cpp b/kioslave/http/http_cache_cleaner.cpp
index f7406bcc1..74b0b8102 100644
--- a/kioslave/http/http_cache_cleaner.cpp
+++ b/kioslave/http/http_cache_cleaner.cpp
@@ -28,9 +28,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <time.h>
#include <stdlib.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kinstance.h>
#include <klocale.h>
@@ -61,18 +61,18 @@ static const KCmdLineOptions options[] =
};
struct FileInfo {
- QString name;
+ TQString name;
int size; // Size in Kb.
int age;
};
-template class QPtrList<FileInfo>;
+template class TQPtrList<FileInfo>;
-class FileInfoList : public QPtrList<FileInfo>
+class FileInfoList : public TQPtrList<FileInfo>
{
public:
- FileInfoList() : QPtrList<FileInfo>() { }
- int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+ FileInfoList() : TQPtrList<FileInfo>() { }
+ int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{ return ((FileInfo *)item1)->age - ((FileInfo *)item2)->age; }
};
@@ -80,9 +80,9 @@ public:
// Keep the following in sync with the cache code in http.cc
#define CACHE_REVISION "7\n"
-FileInfo *readEntry( const QString &filename)
+FileInfo *readEntry( const TQString &filename)
{
- QCString CEF = QFile::encodeName(filename);
+ TQCString CEF = TQFile::encodeName(filename);
FILE *fs = fopen( CEF.data(), "r");
if (!fs)
return 0;
@@ -161,16 +161,16 @@ FileInfo *readEntry( const QString &filename)
// Keep the above in sync with the cache code in http.cc
// !END OF SYNC!
-void scanDirectory(FileInfoList &fileEntries, const QString &name, const QString &strDir)
+void scanDirectory(FileInfoList &fileEntries, const TQString &name, const TQString &strDir)
{
- QDir dir(strDir);
+ TQDir dir(strDir);
if (!dir.exists()) return;
QFileInfoList *newEntries = (QFileInfoList *) dir.entryInfoList();
if (!newEntries) return; // Directory not accessible ??
- for(QFileInfo *qFileInfo = newEntries->first();
+ for(TQFileInfo *qFileInfo = newEntries->first();
qFileInfo;
qFileInfo = newEntries->next())
{
@@ -205,7 +205,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
if (!deleteAll)
{
DCOPClient *dcop = new DCOPClient();
- QCString name = dcop->registerAs(appName, false);
+ TQCString name = dcop->registerAs(appName, false);
if (!name.isEmpty() && (name != appName))
{
fprintf(stderr, "%s: Already running! (%s)\n", appName, name.data());
@@ -220,20 +220,20 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
if (deleteAll)
m_maxCacheSize = -1;
- QString strCacheDir = KGlobal::dirs()->saveLocation("cache", "http");
+ TQString strCacheDir = KGlobal::dirs()->saveLocation("cache", "http");
- QDir cacheDir( strCacheDir );
+ TQDir cacheDir( strCacheDir );
if (!cacheDir.exists())
{
fprintf(stderr, "%s: '%s' does not exist.\n", appName, strCacheDir.ascii());
return 0;
}
- QStringList dirs = cacheDir.entryList( );
+ TQStringList dirs = cacheDir.entryList( );
FileInfoList cachedEntries;
- for(QStringList::Iterator it = dirs.begin();
+ for(TQStringList::Iterator it = dirs.begin();
it != dirs.end();
it++)
{
@@ -253,7 +253,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
if (fileInfo->size > maxCachedSize)
{
- QCString filename = QFile::encodeName( strCacheDir + "/" + fileInfo->name);
+ TQCString filename = TQFile::encodeName( strCacheDir + "/" + fileInfo->name);
unlink(filename.data());
// kdDebug () << appName << ": Object too big, deleting '" << filename.data() << "' (" << result<< ")" << endl;
}
@@ -267,7 +267,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
if ((totalSize + fileInfo->size) > m_maxCacheSize)
{
- QCString filename = QFile::encodeName( strCacheDir + "/" + fileInfo->name);
+ TQCString filename = TQFile::encodeName( strCacheDir + "/" + fileInfo->name);
unlink(filename.data());
// kdDebug () << appName << ": Cache too big, deleting '" << filename.data() << "' (" << fileInfo->size << ")" << endl;
}
diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp
index 5b5f78f6b..909f92dcb 100644
--- a/kioslave/http/kcookiejar/kcookiejar.cpp
+++ b/kioslave/http/kcookiejar/kcookiejar.cpp
@@ -55,13 +55,13 @@
//#include <netinet/in.h>
//#include <arpa/inet.h>
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kurl.h>
#include <krfcdate.h>
@@ -84,17 +84,17 @@
#define READ_BUFFER_SIZE 8192
#define IP_ADDRESS_EXPRESSION "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
-// Note with respect to QString::fromLatin1( )
+// Note with respect to TQString::fromLatin1( )
// Cookies are stored as 8 bit data and passed to kio_http as
// latin1 regardless of their actual encoding.
// L1 is used to indicate latin1 constants
-#define L1(x) QString::fromLatin1(x)
+#define L1(x) TQString::fromLatin1(x)
-template class QPtrList<KHttpCookie>;
-template class QPtrDict<KHttpCookieList>;
+template class TQPtrList<KHttpCookie>;
+template class TQPtrDict<KHttpCookieList>;
-QString KCookieJar::adviceToStr(KCookieAdvice _advice)
+TQString KCookieJar::adviceToStr(KCookieAdvice _advice)
{
switch( _advice )
{
@@ -105,12 +105,12 @@ QString KCookieJar::adviceToStr(KCookieAdvice _advice)
}
}
-KCookieAdvice KCookieJar::strToAdvice(const QString &_str)
+KCookieAdvice KCookieJar::strToAdvice(const TQString &_str)
{
if (_str.isEmpty())
return KCookieDunno;
- QCString advice = _str.lower().latin1();
+ TQCString advice = _str.lower().latin1();
if (advice == "accept")
return KCookieAccept;
@@ -128,11 +128,11 @@ KCookieAdvice KCookieJar::strToAdvice(const QString &_str)
//
// Cookie constructor
//
-KHttpCookie::KHttpCookie(const QString &_host,
- const QString &_domain,
- const QString &_path,
- const QString &_name,
- const QString &_value,
+KHttpCookie::KHttpCookie(const TQString &_host,
+ const TQString &_domain,
+ const TQString &_path,
+ const TQString &_name,
+ const TQString &_value,
time_t _expireDate,
int _protocolVersion,
bool _secure,
@@ -140,7 +140,7 @@ KHttpCookie::KHttpCookie(const QString &_host,
bool _explicitPath) :
mHost(_host),
mDomain(_domain),
- mPath(_path.isEmpty() ? QString::null : _path),
+ mPath(_path.isEmpty() ? TQString::null : _path),
mName(_name),
mValue(_value),
mExpireDate(_expireDate),
@@ -162,9 +162,9 @@ bool KHttpCookie::isExpired(time_t currentDate)
//
// Returns a string for a HTTP-header
//
-QString KHttpCookie::cookieStr(bool useDOMFormat)
+TQString KHttpCookie::cookieStr(bool useDOMFormat)
{
- QString result;
+ TQString result;
if (useDOMFormat || (mProtocolVersion == 0))
{
@@ -185,8 +185,8 @@ QString KHttpCookie::cookieStr(bool useDOMFormat)
//
// Returns whether this cookie should be send to this location.
-bool KHttpCookie::match(const QString &fqdn, const QStringList &domains,
- const QString &path)
+bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains,
+ const TQString &path)
{
// Cookie domain match check
if (mDomain.isEmpty())
@@ -200,7 +200,7 @@ bool KHttpCookie::match(const QString &fqdn, const QStringList &domains,
return false;
// Maybe the domain needs an extra dot.
- QString domain = '.' + mDomain;
+ TQString domain = '.' + mDomain;
if ( !domains.contains( domain ) )
if ( fqdn != mDomain )
return false;
@@ -257,8 +257,8 @@ KCookieJar::KCookieJar()
m_cookiesChanged = false;
KConfig cfg("khtml/domain_info", true, false, "data");
- QStringList countries = cfg.readListEntry("twoLevelTLD");
- for(QStringList::ConstIterator it = countries.begin();
+ TQStringList countries = cfg.readListEntry("twoLevelTLD");
+ for(TQStringList::ConstIterator it = countries.begin();
it != countries.end(); ++it)
{
m_twoLevelTLD.replace(*it, (int *) 1);
@@ -277,13 +277,13 @@ KCookieJar::~KCookieJar()
static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePtr, bool nameMatchOnly=false, bool updateWindowId=false)
{
- QString domain1 = cookiePtr->domain();
+ TQString domain1 = cookiePtr->domain();
if (domain1.isEmpty())
domain1 = cookiePtr->host();
for ( KHttpCookiePtr cookie=list->first(); cookie != 0; )
{
- QString domain2 = cookie->domain();
+ TQString domain2 = cookie->domain();
if (domain2.isEmpty())
domain2 = cookie->host();
@@ -297,7 +297,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt
{
if (updateWindowId)
{
- for(QValueList<long>::ConstIterator it = cookie->windowIds().begin();
+ for(TQValueList<long>::ConstIterator it = cookie->windowIds().begin();
it != cookie->windowIds().end(); ++it)
{
long windowId = *it;
@@ -325,12 +325,12 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt
// Returned is a string containing all appropriate cookies in a format
// which can be added to a HTTP-header without any additional processing.
//
-QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies)
+TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies)
{
- QString cookieStr;
- QStringList domains;
- QString fqdn;
- QString path;
+ TQString cookieStr;
+ TQStringList domains;
+ TQString fqdn;
+ TQString path;
KHttpCookiePtr cookie;
KCookieAdvice advice = m_globalAdvice;
@@ -346,7 +346,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win
KHttpCookieList allCookies;
- for(QStringList::ConstIterator it = domains.begin();
+ for(TQStringList::ConstIterator it = domains.begin();
true;
++it)
{
@@ -360,7 +360,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win
}
else
{
- QString key = (*it).isNull() ? L1("") : (*it);
+ TQString key = (*it).isNull() ? L1("") : (*it);
cookieList = m_cookieDomains[key];
if (!cookieList)
continue; // No cookies for this domain
@@ -437,7 +437,7 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win
cookieStr += L1("Cookie: ");
if (protVersion > 0)
{
- QString version;
+ TQString version;
version.sprintf("$Version=%d; ", protVersion); // Without quotes
cookieStr += version;
}
@@ -465,8 +465,8 @@ QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long win
// ',' - Another cookie follows
// '\n' - Another header follows
static const char * parseNameValue(const char *header,
- QString &Name,
- QString &Value,
+ TQString &Name,
+ TQString &Value,
bool keepQuotes=false,
bool rfcQuotes=false)
{
@@ -479,7 +479,7 @@ static const char * parseNameValue(const char *header,
// No '=' sign -> use string as the value, name is empty
// (behavior found in Mozilla and IE)
Name = "";
- Value = QString::fromLatin1(header);
+ Value = TQString::fromLatin1(header);
Value.truncate( s - header );
Value = Value.stripWhiteSpace();
return (s);
@@ -516,12 +516,12 @@ static const char * parseNameValue(const char *header,
if ((*s=='\0') || (*s=='\n'))
{
// End of Name
- Value = QString::fromLatin1(header);
+ Value = TQString::fromLatin1(header);
Value.truncate(s - header);
return (s);
}
}
- Value = QString::fromLatin1(header);
+ Value = TQString::fromLatin1(header);
// *s == '\"';
if (keepQuotes)
Value.truncate( ++s - header );
@@ -542,7 +542,7 @@ static const char * parseNameValue(const char *header,
while ((*s != '\0') && (*s != ';') && (*s != '\n'))
s++;
// End of Name
- Value = QString::fromLatin1(header);
+ Value = TQString::fromLatin1(header);
Value.truncate( s - header );
Value = Value.stripWhiteSpace();
}
@@ -550,9 +550,9 @@ static const char * parseNameValue(const char *header,
}
-void KCookieJar::stripDomain(const QString &_fqdn, QString &_domain)
+void KCookieJar::stripDomain(const TQString &_fqdn, TQString &_domain)
{
- QStringList domains;
+ TQStringList domains;
extractDomains(_fqdn, domains);
if (domains.count() > 3)
_domain = domains[3];
@@ -560,9 +560,9 @@ void KCookieJar::stripDomain(const QString &_fqdn, QString &_domain)
_domain = domains[0];
}
-QString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr)
+TQString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr)
{
- QString domain; // We file the cookie under this domain.
+ TQString domain; // We file the cookie under this domain.
if (cookiePtr->domain().isEmpty())
stripDomain( cookiePtr->host(), domain);
else
@@ -570,9 +570,9 @@ QString KCookieJar::stripDomain( KHttpCookiePtr cookiePtr)
return domain;
}
-bool KCookieJar::parseURL(const QString &_url,
- QString &_fqdn,
- QString &_path)
+bool KCookieJar::parseURL(const TQString &_url,
+ TQString &_fqdn,
+ TQString &_path)
{
KURL kurl(_url);
if (!kurl.isValid())
@@ -600,7 +600,7 @@ bool KCookieJar::parseURL(const QString &_url,
if (_path.isEmpty())
_path = L1("/");
- QRegExp exp(L1("[\\\\/]\\.\\.[\\\\/]"));
+ TQRegExp exp(L1("[\\\\/]\\.\\.[\\\\/]"));
// Weird path, cookie stealing attempt?
if (exp.search(_path) != -1)
return false; // Deny everything!!
@@ -608,8 +608,8 @@ bool KCookieJar::parseURL(const QString &_url,
return true;
}
-void KCookieJar::extractDomains(const QString &_fqdn,
- QStringList &_domains)
+void KCookieJar::extractDomains(const TQString &_fqdn,
+ TQStringList &_domains)
{
// Return numeric IPv6 addresses as is...
if (_fqdn[0] == '[')
@@ -620,14 +620,14 @@ void KCookieJar::extractDomains(const QString &_fqdn,
// Return numeric IPv4 addresses as is...
if ((_fqdn[0] >= '0') && (_fqdn[0] <= '9'))
{
- if (_fqdn.find(QRegExp(IP_ADDRESS_EXPRESSION)) > -1)
+ if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1)
{
_domains.append( _fqdn );
return;
}
}
- QStringList partList = QStringList::split('.', _fqdn, false);
+ TQStringList partList = TQStringList::split('.', _fqdn, false);
if (partList.count())
partList.remove(partList.begin()); // Remove hostname
@@ -653,12 +653,12 @@ void KCookieJar::extractDomains(const QString &_fqdn,
// Catch some TLDs that we miss with the previous check
// e.g. com.au, org.uk, mil.co
- QCString t = partList[0].lower().utf8();
+ TQCString t = partList[0].lower().utf8();
if ((t == "com") || (t == "net") || (t == "org") || (t == "gov") || (t == "edu") || (t == "mil") || (t == "int"))
break;
}
- QString domain = partList.join(L1("."));
+ TQString domain = partList.join(L1("."));
_domains.append(domain);
_domains.append('.' + domain);
partList.remove(partList.begin()); // Remove part
@@ -681,16 +681,16 @@ void KCookieJar::extractDomains(const QString &_fqdn,
to allow KRFCDate::parseDate to properly parse expiration date formats
used in cookies by some servers such as amazon.com. See BR# 145244.
*/
-static QString fixupDateTime(const QString& dt)
+static TQString fixupDateTime(const TQString& dt)
{
- const int index = dt.find(QRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"));
+ const int index = dt.find(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}"));
if (index > -1)
{
- QStringList dateStrList = QStringList::split(' ', dt.mid(index));
+ TQStringList dateStrList = TQStringList::split(' ', dt.mid(index));
if (dateStrList.count() > 1)
{
- QString date = dateStrList[0];
+ TQString date = dateStrList[0];
dateStrList[0] = dateStrList[1];
dateStrList[1] = date;
date = dt;
@@ -709,18 +709,18 @@ static QString fixupDateTime(const QString& dt)
// cookie_headers should be a concatenation of all lines of a HTTP-header
// which start with "Set-Cookie". The lines should be separated by '\n's.
//
-KHttpCookieList KCookieJar::makeCookies(const QString &_url,
- const QCString &cookie_headers,
+KHttpCookieList KCookieJar::makeCookies(const TQString &_url,
+ const TQCString &cookie_headers,
long windowId)
{
KHttpCookieList cookieList;
KHttpCookieList cookieList2;
KHttpCookiePtr lastCookie = 0;
const char *cookieStr = cookie_headers.data();
- QString Name;
- QString Value;
- QString fqdn;
- QString path;
+ TQString Name;
+ TQString Value;
+ TQString fqdn;
+ TQString path;
bool crossDomain = false;
if (!parseURL(_url, fqdn, path))
@@ -728,7 +728,7 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url,
// Error parsing _url
return KHttpCookieList();
}
- QString defaultPath;
+ TQString defaultPath;
int i = path.findRev('/');
if (i > 0)
defaultPath = path.left(i);
@@ -799,10 +799,10 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url,
// Name-Value pair follows
cookieStr = parseNameValue(cookieStr, Name, Value);
- QCString cName = Name.lower().latin1();
+ TQCString cName = Name.lower().latin1();
if (cName == "domain")
{
- QString dom = Value.lower();
+ TQString dom = Value.lower();
// RFC2965 3.2.2: If an explicitly specified value does not
// start with a dot, the user agent supplies a leading dot
if(dom.length() && dom[0] != '.')
@@ -835,7 +835,7 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url,
else if (cName == "path")
{
if (Value.isEmpty())
- lastCookie->mPath = QString::null; // Catch "" <> QString::null
+ lastCookie->mPath = TQString::null; // Catch "" <> TQString::null
else
lastCookie->mPath = KURL::decode_string(Value);
lastCookie->mExplicitPath = true;
@@ -879,8 +879,8 @@ KHttpCookieList KCookieJar::makeCookies(const QString &_url,
* pairs. Any whitespace before "name" or around '=' is discarded.
* If no cookies are found, 0 is returned.
*/
-KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url,
- const QCString &cookie_domstring,
+KHttpCookieList KCookieJar::makeDOMCookies(const TQString &_url,
+ const TQCString &cookie_domstring,
long windowId)
{
// A lot copied from above
@@ -888,10 +888,10 @@ KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url,
KHttpCookiePtr lastCookie = 0;
const char *cookieStr = cookie_domstring.data();
- QString Name;
- QString Value;
- QString fqdn;
- QString path;
+ TQString Name;
+ TQString Value;
+ TQString fqdn;
+ TQString path;
if (!parseURL(_url, fqdn, path))
{
@@ -907,7 +907,7 @@ KHttpCookieList KCookieJar::makeDOMCookies(const QString &_url,
// Host = FQDN
// Default domain = ""
// Default path = ""
- KHttpCookie *cookie = new KHttpCookie(fqdn, QString::null, QString::null,
+ KHttpCookie *cookie = new KHttpCookie(fqdn, TQString::null, TQString::null,
Name, Value );
if (windowId)
cookie->mWindowIds.append(windowId);
@@ -946,26 +946,26 @@ static void makeRoom(KHttpCookieList *cookieList, KHttpCookiePtr &cookiePtr)
//
void KCookieJar::addCookie(KHttpCookiePtr &cookiePtr)
{
- QStringList domains;
+ TQStringList domains;
KHttpCookieList *cookieList = 0L;
// We always need to do this to make sure that the
// that cookies of type hostname == cookie-domainname
// are properly removed and/or updated as necessary!
extractDomains( cookiePtr->host(), domains );
- for ( QStringList::ConstIterator it = domains.begin();
+ for ( TQStringList::ConstIterator it = domains.begin();
(it != domains.end() && !cookieList);
++it )
{
- QString key = (*it).isNull() ? L1("") : (*it);
+ TQString key = (*it).isNull() ? L1("") : (*it);
KHttpCookieList *list= m_cookieDomains[key];
if ( !list ) continue;
removeDuplicateFromList(list, cookiePtr, false, true);
}
- QString domain = stripDomain( cookiePtr );
- QString key = domain.isNull() ? L1("") : domain;
+ TQString domain = stripDomain( cookiePtr );
+ TQString key = domain.isNull() ? L1("") : domain;
cookieList = m_cookieDomains[ key ];
if (!cookieList)
{
@@ -1011,7 +1011,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr)
if (m_rejectCrossDomainCookies && cookiePtr->isCrossDomain())
return KCookieReject;
- QStringList domains;
+ TQStringList domains;
extractDomains(cookiePtr->host(), domains);
@@ -1022,7 +1022,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr)
{
if (!domains.contains(cookiePtr->domain()) &&
!cookiePtr->domain().endsWith("."+cookiePtr->host()))
- cookiePtr->fixDomain(QString::null);
+ cookiePtr->fixDomain(TQString::null);
}
if (m_autoAcceptSessionCookies && (cookiePtr->expireDate() == 0 ||
@@ -1031,10 +1031,10 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr)
KCookieAdvice advice = KCookieDunno;
bool isFQDN = true; // First is FQDN
- QStringList::Iterator it = domains.begin(); // Start with FQDN which first in the list.
+ TQStringList::Iterator it = domains.begin(); // Start with FQDN which first in the list.
while( (advice == KCookieDunno) && (it != domains.end()))
{
- QString domain = *it;
+ TQString domain = *it;
// Check if a policy for the FQDN/domain is set.
if ( domain[0] == '.' || isFQDN )
{
@@ -1057,7 +1057,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr)
// This function gets the advice for all cookies originating from
// _domain.
//
-KCookieAdvice KCookieJar::getDomainAdvice(const QString &_domain)
+KCookieAdvice KCookieJar::getDomainAdvice(const TQString &_domain)
{
KHttpCookieList *cookieList = m_cookieDomains[_domain];
KCookieAdvice advice;
@@ -1078,9 +1078,9 @@ KCookieAdvice KCookieJar::getDomainAdvice(const QString &_domain)
// This function sets the advice for all cookies originating from
// _domain.
//
-void KCookieJar::setDomainAdvice(const QString &_domain, KCookieAdvice _advice)
+void KCookieJar::setDomainAdvice(const TQString &_domain, KCookieAdvice _advice)
{
- QString domain(_domain);
+ TQString domain(_domain);
KHttpCookieList *cookieList = m_cookieDomains[domain];
if (cookieList)
@@ -1124,7 +1124,7 @@ void KCookieJar::setDomainAdvice(const QString &_domain, KCookieAdvice _advice)
//
void KCookieJar::setDomainAdvice(KHttpCookiePtr cookiePtr, KCookieAdvice _advice)
{
- QString domain;
+ TQString domain;
stripDomain(cookiePtr->host(), domain); // We file the cookie under this domain.
setDomainAdvice(domain, _advice);
@@ -1143,7 +1143,7 @@ void KCookieJar::setGlobalAdvice(KCookieAdvice _advice)
//
// Get a list of all domains known to the cookie jar.
//
-const QStringList& KCookieJar::getDomainList()
+const TQStringList& KCookieJar::getDomainList()
{
return m_domainList;
}
@@ -1151,10 +1151,10 @@ const QStringList& KCookieJar::getDomainList()
//
// Get a list of all cookies in the cookie jar originating from _domain.
//
-const KHttpCookieList *KCookieJar::getCookieList(const QString & _domain,
- const QString & _fqdn )
+const KHttpCookieList *KCookieJar::getCookieList(const TQString & _domain,
+ const TQString & _fqdn )
{
- QString domain;
+ TQString domain;
if (_domain.isEmpty())
stripDomain( _fqdn, domain );
@@ -1170,7 +1170,7 @@ const KHttpCookieList *KCookieJar::getCookieList(const QString & _domain,
//
void KCookieJar::eatCookie(KHttpCookiePtr cookiePtr)
{
- QString domain = stripDomain(cookiePtr); // We file the cookie under this domain.
+ TQString domain = stripDomain(cookiePtr); // We file the cookie under this domain.
KHttpCookieList *cookieList = m_cookieDomains[domain];
if (cookieList)
@@ -1190,7 +1190,7 @@ void KCookieJar::eatCookie(KHttpCookiePtr cookiePtr)
}
}
-void KCookieJar::eatCookiesForDomain(const QString &domain)
+void KCookieJar::eatCookiesForDomain(const TQString &domain)
{
KHttpCookieList *cookieList = m_cookieDomains[domain];
if (!cookieList || cookieList->isEmpty()) return;
@@ -1210,23 +1210,23 @@ void KCookieJar::eatSessionCookies( long windowId )
if (!windowId)
return;
- QStringList::Iterator it=m_domainList.begin();
+ TQStringList::Iterator it=m_domainList.begin();
for ( ; it != m_domainList.end(); ++it )
eatSessionCookies( *it, windowId, false );
}
void KCookieJar::eatAllCookies()
{
- for ( QStringList::Iterator it=m_domainList.begin();
+ for ( TQStringList::Iterator it=m_domainList.begin();
it != m_domainList.end();)
{
- QString domain = *it++;
+ TQString domain = *it++;
// This might remove domain from domainList!
eatCookiesForDomain(domain);
}
}
-void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId,
+void KCookieJar::eatSessionCookies( const TQString& fqdn, long windowId,
bool isFQDN )
{
KHttpCookieList* cookieList;
@@ -1234,7 +1234,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId,
cookieList = m_cookieDomains[fqdn];
else
{
- QString domain;
+ TQString domain;
stripDomain( fqdn, domain );
cookieList = m_cookieDomains[domain];
}
@@ -1250,7 +1250,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId,
continue;
}
- QValueList<long> &ids = cookie->windowIds();
+ TQValueList<long> &ids = cookie->windowIds();
if (!ids.remove(windowId) || !ids.isEmpty())
{
cookie = cookieList->next();
@@ -1267,7 +1267,7 @@ void KCookieJar::eatSessionCookies( const QString& fqdn, long windowId,
// Saves all cookies to the file '_filename'.
// On succes 'true' is returned.
// On failure 'false' is returned.
-bool KCookieJar::saveCookies(const QString &_filename)
+bool KCookieJar::saveCookies(const TQString &_filename)
{
KSaveFile saveFile(_filename, 0600);
@@ -1284,10 +1284,10 @@ bool KCookieJar::saveCookies(const QString &_filename)
"# Host", "Domain", "Path", "Exp.date", "Prot",
"Name", "Sec", "Value");
- for ( QStringList::Iterator it=m_domainList.begin(); it != m_domainList.end();
+ for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end();
it++ )
{
- const QString &domain = *it;
+ const TQString &domain = *it;
bool domainPrinted = false;
KHttpCookieList *cookieList = m_cookieDomains[domain];
@@ -1310,10 +1310,10 @@ bool KCookieJar::saveCookies(const QString &_filename)
fprintf(fStream, "[%s]\n", domain.local8Bit().data());
}
// Store persistent cookies
- QString path = L1("\"");
+ TQString path = L1("\"");
path += cookie->path();
path += '"';
- QString domain = L1("\"");
+ TQString domain = L1("\"");
domain += cookie->domain();
domain += '"';
fprintf(fStream, "%-20s %-20s %-12s %10lu %3d %-20s %-4i %s\n",
@@ -1374,9 +1374,9 @@ static const char *parseField(charPtr &buffer, bool keepQuotes=false)
// Reloads all cookies from the file '_filename'.
// On succes 'true' is returned.
// On failure 'false' is returned.
-bool KCookieJar::loadCookies(const QString &_filename)
+bool KCookieJar::loadCookies(const TQString &_filename)
{
- FILE *fStream = fopen( QFile::encodeName(_filename), "r");
+ FILE *fStream = fopen( TQFile::encodeName(_filename), "r");
if (fStream == 0)
{
return false;
@@ -1457,11 +1457,11 @@ bool KCookieJar::loadCookies(const QString &_filename)
if ((expDate == 0) || (expDate < curTime))
continue;
- KHttpCookie *cookie = new KHttpCookie(QString::fromLatin1(host),
- QString::fromLatin1(domain),
- QString::fromLatin1(path),
- QString::fromLatin1(name),
- QString::fromLatin1(value),
+ KHttpCookie *cookie = new KHttpCookie(TQString::fromLatin1(host),
+ TQString::fromLatin1(domain),
+ TQString::fromLatin1(path),
+ TQString::fromLatin1(name),
+ TQString::fromLatin1(value),
expDate, protVer,
secure, httpOnly, explicitPath);
addCookie(cookie);
@@ -1489,16 +1489,16 @@ void KCookieJar::saveConfig(KConfig *_config)
_config->setGroup("Cookie Policy");
_config->writeEntry("CookieGlobalAdvice", adviceToStr( m_globalAdvice));
- QStringList domainSettings;
- for ( QStringList::Iterator it=m_domainList.begin();
+ TQStringList domainSettings;
+ for ( TQStringList::Iterator it=m_domainList.begin();
it != m_domainList.end();
it++ )
{
- const QString &domain = *it;
+ const TQString &domain = *it;
KCookieAdvice advice = getDomainAdvice( domain);
if (advice != KCookieDunno)
{
- QString value(domain);
+ TQString value(domain);
value += ':';
value += adviceToStr(advice);
domainSettings.append(value);
@@ -1524,34 +1524,34 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse )
m_preferredPolicy = _config->readNumEntry( "PreferredPolicy", 0 );
_config->setGroup("Cookie Policy");
- QStringList domainSettings = _config->readListEntry("CookieDomainAdvice");
+ TQStringList domainSettings = _config->readListEntry("CookieDomainAdvice");
m_rejectCrossDomainCookies = _config->readBoolEntry( "RejectCrossDomainCookies", true );
m_autoAcceptSessionCookies = _config->readBoolEntry( "AcceptSessionCookies", true );
m_ignoreCookieExpirationDate = _config->readBoolEntry( "IgnoreExpirationDate", false );
- QString value = _config->readEntry("CookieGlobalAdvice", L1("Ask"));
+ TQString value = _config->readEntry("CookieGlobalAdvice", L1("Ask"));
m_globalAdvice = strToAdvice(value);
// Reset current domain settings first.
- for ( QStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); )
+ for ( TQStringList::Iterator it=m_domainList.begin(); it != m_domainList.end(); )
{
// Make sure to update iterator before calling setDomainAdvice()
// setDomainAdvice() might delete the domain from domainList.
- QString domain = *it++;
+ TQString domain = *it++;
setDomainAdvice(domain, KCookieDunno);
}
// Now apply the domain settings read from config file...
- for ( QStringList::Iterator it=domainSettings.begin();
+ for ( TQStringList::Iterator it=domainSettings.begin();
it != domainSettings.end(); )
{
- const QString &value = *it++;
+ const TQString &value = *it++;
int sepPos = value.findRev(':');
if (sepPos <= 0)
continue;
- QString domain(value.left(sepPos));
+ TQString domain(value.left(sepPos));
KCookieAdvice advice = strToAdvice( value.mid(sepPos + 1) );
setDomainAdvice(domain, advice);
}
diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h
index c73708bea..eb64485ea 100644
--- a/kioslave/http/kcookiejar/kcookiejar.h
+++ b/kioslave/http/kcookiejar/kcookiejar.h
@@ -25,10 +25,10 @@
#ifndef KCOOKIEJAR_H
#define KCOOKIEJAR_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
#include <time.h>
class KConfig;
@@ -52,40 +52,40 @@ class KHttpCookie
friend class KHttpCookieList;
protected:
- QString mHost;
- QString mDomain;
- QString mPath;
- QString mName;
- QString mValue;
+ TQString mHost;
+ TQString mDomain;
+ TQString mPath;
+ TQString mName;
+ TQString mValue;
time_t mExpireDate;
int mProtocolVersion;
bool mSecure;
bool mCrossDomain;
bool mHttpOnly;
bool mExplicitPath;
- QValueList<long> mWindowIds;
+ TQValueList<long> mWindowIds;
- QString cookieStr(bool useDOMFormat);
+ TQString cookieStr(bool useDOMFormat);
public:
- KHttpCookie(const QString &_host=QString::null,
- const QString &_domain=QString::null,
- const QString &_path=QString::null,
- const QString &_name=QString::null,
- const QString &_value=QString::null,
+ KHttpCookie(const TQString &_host=TQString::null,
+ const TQString &_domain=TQString::null,
+ const TQString &_path=TQString::null,
+ const TQString &_name=TQString::null,
+ const TQString &_value=TQString::null,
time_t _expireDate=0,
int _protocolVersion=0,
bool _secure = false,
bool _httpOnly = false,
bool _explicitPath = false);
- QString domain(void) { return mDomain; }
- QString host(void) { return mHost; }
- QString path(void) { return mPath; }
- QString name(void) { return mName; }
- QString value(void) { return mValue; }
- QValueList<long> &windowIds(void) { return mWindowIds; }
- void fixDomain(const QString &domain) { mDomain = domain; }
+ TQString domain(void) { return mDomain; }
+ TQString host(void) { return mHost; }
+ TQString path(void) { return mPath; }
+ TQString name(void) { return mName; }
+ TQString value(void) { return mValue; }
+ TQValueList<long> &windowIds(void) { return mWindowIds; }
+ void fixDomain(const TQString &domain) { mDomain = domain; }
time_t expireDate(void) { return mExpireDate; }
int protocolVersion(void) { return mProtocolVersion; }
bool isSecure(void) { return mSecure; }
@@ -93,13 +93,13 @@ public:
bool isCrossDomain(void) { return mCrossDomain; }
bool isHttpOnly(void) { return mHttpOnly; }
bool hasExplicitPath(void) { return mExplicitPath; }
- bool match(const QString &fqdn, const QStringList &domainList, const QString &path);
+ bool match(const TQString &fqdn, const TQStringList &domainList, const TQString &path);
};
-class KHttpCookieList : public QPtrList<KHttpCookie>
+class KHttpCookieList : public TQPtrList<KHttpCookie>
{
public:
- KHttpCookieList() : QPtrList<KHttpCookie>(), advice( KCookieDunno )
+ KHttpCookieList() : TQPtrList<KHttpCookie>(), advice( KCookieDunno )
{ }
virtual ~KHttpCookieList() { }
@@ -136,12 +136,12 @@ public:
/**
* Store all the cookies in a safe(?) place
*/
- bool saveCookies(const QString &_filename);
+ bool saveCookies(const TQString &_filename);
/**
* Load all the cookies from file and add them to the cookie jar.
*/
- bool loadCookies(const QString &_filename);
+ bool loadCookies(const TQString &_filename);
/**
* Save the cookie configuration
@@ -164,7 +164,7 @@ public:
* approved yet by the user but that will be included in the result
* none the less.
*/
- QString findCookies(const QString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies=0);
+ TQString findCookies(const TQString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies=0);
/**
* This function parses cookie_headers and returns a linked list of
@@ -174,7 +174,7 @@ public:
* cookie_headers should be a concatenation of all lines of a HTTP-header
* which start with "Set-Cookie". The lines should be separated by '\n's.
*/
- KHttpCookieList makeCookies(const QString &_url, const QCString &cookie_headers, long windowId);
+ KHttpCookieList makeCookies(const TQString &_url, const TQCString &cookie_headers, long windowId);
/**
* This function parses cookie_headers and returns a linked list of
@@ -184,7 +184,7 @@ public:
* cookie_domstr should be a concatenation of "name=value" pairs, separated
* by a semicolon ';'.
*/
- KHttpCookieList makeDOMCookies(const QString &_url, const QCString &cookie_domstr, long windowId);
+ KHttpCookieList makeDOMCookies(const TQString &_url, const TQCString &cookie_domstr, long windowId);
/**
* This function hands a KHttpCookie object over to the cookie jar.
@@ -213,7 +213,7 @@ public:
* - KCookieReject, reject all cookies for _domain
* - KCookieAsk, the user decides what to do with cookies for _domain
*/
- KCookieAdvice getDomainAdvice(const QString &_domain);
+ KCookieAdvice getDomainAdvice(const TQString &_domain);
/**
* This function sets the advice for all cookies originating from
@@ -225,7 +225,7 @@ public:
* - KCookieReject, reject all cookies for _domain
* - KCookieAsk, the user decides what to do with cookies for _domain
*/
- void setDomainAdvice(const QString &_domain, KCookieAdvice _advice);
+ void setDomainAdvice(const TQString &_domain, KCookieAdvice _advice);
/**
* This function sets the advice for all cookies originating from
@@ -269,13 +269,13 @@ public:
* - It has a cookie originating from the domain
* - It has a specific advice set for the domain
*/
- const QStringList& getDomainList();
+ const TQStringList& getDomainList();
/**
* Get a list of all cookies in the cookie jar originating from _domain.
*/
- const KHttpCookieList *getCookieList(const QString & _domain,
- const QString& _fqdn );
+ const KHttpCookieList *getCookieList(const TQString & _domain,
+ const TQString& _fqdn );
/**
* Remove & delete a cookie from the jar.
@@ -289,7 +289,7 @@ public:
/**
* Remove & delete all cookies for @p domain.
*/
- void eatCookiesForDomain(const QString &domain);
+ void eatCookiesForDomain(const TQString &domain);
/**
* Remove & delete all cookies
@@ -306,25 +306,25 @@ public:
* Removes all end of session cookies set by the
* session @p windId.
*/
- void eatSessionCookies( const QString& fqdn, long windowId, bool isFQDN = true );
+ void eatSessionCookies( const TQString& fqdn, long windowId, bool isFQDN = true );
/**
* Parses _url and returns the FQDN (_fqdn) and path (_path).
*/
- static bool parseURL(const QString &_url,
- QString &_fqdn,
- QString &_path);
+ static bool parseURL(const TQString &_url,
+ TQString &_fqdn,
+ TQString &_path);
/**
* Returns a list of domains in @p _domainList relevant for this host.
* The list is sorted with the FQDN listed first and the top-most
* domain listed last
*/
- void extractDomains(const QString &_fqdn,
- QStringList &_domainList);
+ void extractDomains(const TQString &_fqdn,
+ TQStringList &_domainList);
- static QString adviceToStr(KCookieAdvice _advice);
- static KCookieAdvice strToAdvice(const QString &_str);
+ static TQString adviceToStr(KCookieAdvice _advice);
+ static KCookieAdvice strToAdvice(const TQString &_str);
/** Returns the */
int preferredDefaultPolicy() const { return m_preferredPolicy; }
@@ -344,14 +344,14 @@ public:
void setShowCookieDetails (bool value) { m_showCookieDetails = value; }
protected:
- void stripDomain(const QString &_fqdn, QString &_domain);
- QString stripDomain( KHttpCookiePtr cookiePtr);
+ void stripDomain(const TQString &_fqdn, TQString &_domain);
+ TQString stripDomain( KHttpCookiePtr cookiePtr);
protected:
- QStringList m_domainList;
+ TQStringList m_domainList;
KCookieAdvice m_globalAdvice;
- QDict<KHttpCookieList> m_cookieDomains;
- QDict<int> m_twoLevelTLD;
+ TQDict<KHttpCookieList> m_cookieDomains;
+ TQDict<int> m_twoLevelTLD;
bool m_configChanged;
bool m_cookiesChanged;
diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp
index 365f15e79..e6469f127 100644
--- a/kioslave/http/kcookiejar/kcookieserver.cpp
+++ b/kioslave/http/kcookiejar/kcookieserver.cpp
@@ -29,9 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <unistd.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
#include <dcopclient.h>
@@ -46,7 +46,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "kcookieserver.h"
extern "C" {
- KDE_EXPORT KDEDModule *create_kcookiejar(const QCString &name)
+ KDE_EXPORT KDEDModule *create_kcookiejar(const TQCString &name)
{
return new KCookieServer(name);
}
@@ -62,20 +62,20 @@ class CookieRequest {
public:
DCOPClient *client;
DCOPClientTransaction *transaction;
- QString url;
+ TQString url;
bool DOM;
long windowId;
};
-template class QPtrList<CookieRequest>;
+template class TQPtrList<CookieRequest>;
-class RequestList : public QPtrList<CookieRequest>
+class RequestList : public TQPtrList<CookieRequest>
{
public:
- RequestList() : QPtrList<CookieRequest>() { }
+ RequestList() : TQPtrList<CookieRequest>() { }
};
-KCookieServer::KCookieServer(const QCString &name)
+KCookieServer::KCookieServer(const TQCString &name)
:KDEDModule(name)
{
mOldCookieServer = new DCOPClient(); // backwards compatibility.
@@ -86,29 +86,29 @@ KCookieServer::KCookieServer(const QCString &name)
mPendingCookies->setAutoDelete(true);
mRequestList = new RequestList;
mAdvicePending = false;
- mTimer = new QTimer();
- connect( mTimer, SIGNAL( timeout()), SLOT( slotSave()));
+ mTimer = new TQTimer();
+ connect( mTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotSave()));
mConfig = new KConfig("kcookiejarrc");
mCookieJar->loadConfig( mConfig );
- QString filename = locateLocal("data", "kcookiejar/cookies");
+ TQString filename = locateLocal("data", "kcookiejar/cookies");
// Stay backwards compatible!
- QString filenameOld = locate("data", "kfm/cookies");
+ TQString filenameOld = locate("data", "kfm/cookies");
if (!filenameOld.isEmpty())
{
mCookieJar->loadCookies( filenameOld );
if (mCookieJar->saveCookies( filename))
{
- unlink(QFile::encodeName(filenameOld)); // Remove old kfm cookie file
+ unlink(TQFile::encodeName(filenameOld)); // Remove old kfm cookie file
}
}
else
{
mCookieJar->loadCookies( filename);
}
- connect(this, SIGNAL(windowUnregistered(long)),
- this, SLOT(slotDeleteSessionCookies(long)));
+ connect(this, TQT_SIGNAL(windowUnregistered(long)),
+ this, TQT_SLOT(slotDeleteSessionCookies(long)));
}
KCookieServer::~KCookieServer()
@@ -122,11 +122,11 @@ KCookieServer::~KCookieServer()
delete mConfig;
}
-bool KCookieServer::cookiesPending( const QString &url, KHttpCookieList *cookieList )
+bool KCookieServer::cookiesPending( const TQString &url, KHttpCookieList *cookieList )
{
- QString fqdn;
- QStringList domains;
- QString path;
+ TQString fqdn;
+ TQStringList domains;
+ TQString path;
// Check whether 'url' has cookies on the pending list
if (mPendingCookies->isEmpty())
return false;
@@ -150,7 +150,7 @@ bool KCookieServer::cookiesPending( const QString &url, KHttpCookieList *cookieL
return cookieList->isEmpty();
}
-void KCookieServer::addCookies( const QString &url, const QCString &cookieHeader,
+void KCookieServer::addCookies( const TQString &url, const TQCString &cookieHeader,
long windowId, bool useDOMFormat )
{
KHttpCookieList cookieList;
@@ -216,7 +216,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList)
KHttpCookieList currentList;
currentList.append(currentCookie);
- QString currentHost = currentCookie->host();
+ TQString currentHost = currentCookie->host();
cookie = mPendingCookies->next();
while (cookie)
@@ -275,13 +275,13 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList)
{
if (!cookiesPending( request->url ))
{
- QCString replyType;
- QByteArray replyData;
- QString res = mCookieJar->findCookies( request->url, request->DOM, request->windowId );
+ TQCString replyType;
+ TQByteArray replyData;
+ TQString res = mCookieJar->findCookies( request->url, request->DOM, request->windowId );
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << res;
- replyType = "QString";
+ replyType = "TQString";
request->client->endTransaction( request->transaction,
replyType, replyData);
CookieRequest *tmp = request;
@@ -300,7 +300,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList)
void KCookieServer::slotSave()
{
- QString filename = locateLocal("data", "kcookiejar/cookies");
+ TQString filename = locateLocal("data", "kcookiejar/cookies");
mCookieJar->saveCookies(filename);
}
@@ -312,10 +312,10 @@ void KCookieServer::saveCookieJar()
mTimer->start( 1000*60*SAVE_DELAY, true );
}
-void KCookieServer::putCookie( QStringList& out, KHttpCookie *cookie,
- const QValueList<int>& fields )
+void KCookieServer::putCookie( TQStringList& out, KHttpCookie *cookie,
+ const TQValueList<int>& fields )
{
- QValueList<int>::ConstIterator i = fields.begin();
+ TQValueList<int>::ConstIterator i = fields.begin();
for ( ; i != fields.end(); ++i )
{
switch(*i)
@@ -336,23 +336,23 @@ void KCookieServer::putCookie( QStringList& out, KHttpCookie *cookie,
out << cookie->value();
break;
case CF_EXPIRE :
- out << QString::number(cookie->expireDate());
+ out << TQString::number(cookie->expireDate());
break;
case CF_PROVER :
- out << QString::number(cookie->protocolVersion());
+ out << TQString::number(cookie->protocolVersion());
break;
case CF_SECURE :
- out << QString::number( cookie->isSecure() ? 1 : 0 );
+ out << TQString::number( cookie->isSecure() ? 1 : 0 );
break;
default :
- out << QString::null;
+ out << TQString::null;
}
}
}
bool KCookieServer::cookieMatches( KHttpCookiePtr c,
- QString domain, QString fqdn,
- QString path, QString name )
+ TQString domain, TQString fqdn,
+ TQString path, TQString name )
{
if( c )
{
@@ -369,14 +369,14 @@ bool KCookieServer::cookieMatches( KHttpCookiePtr c,
// DCOP function
QString
-KCookieServer::findCookies(QString url)
+KCookieServer::findCookies(TQString url)
{
return findCookies(url, 0);
}
// DCOP function
QString
-KCookieServer::findCookies(QString url, long windowId)
+KCookieServer::findCookies(TQString url, long windowId)
{
if (cookiesPending(url))
{
@@ -387,10 +387,10 @@ KCookieServer::findCookies(QString url, long windowId)
request->DOM = false;
request->windowId = windowId;
mRequestList->append( request );
- return QString::null; // Talk to you later :-)
+ return TQString::null; // Talk to you later :-)
}
- QString cookies = mCookieJar->findCookies(url, false, windowId);
+ TQString cookies = mCookieJar->findCookies(url, false, windowId);
if (mCookieJar->changed())
saveCookieJar();
@@ -402,9 +402,9 @@ KCookieServer::findCookies(QString url, long windowId)
QStringList
KCookieServer::findDomains()
{
- QStringList result;
- const QStringList domains = mCookieJar->getDomainList();
- for ( QStringList::ConstIterator domIt = domains.begin();
+ TQStringList result;
+ const TQStringList domains = mCookieJar->getDomainList();
+ for ( TQStringList::ConstIterator domIt = domains.begin();
domIt != domains.end(); ++domIt )
{
// Ignore domains that have policy set for but contain
@@ -418,19 +418,19 @@ KCookieServer::findDomains()
// DCOP function
QStringList
-KCookieServer::findCookies(QValueList<int> fields,
- QString domain,
- QString fqdn,
- QString path,
- QString name)
+KCookieServer::findCookies(TQValueList<int> fields,
+ TQString domain,
+ TQString fqdn,
+ TQString path,
+ TQString name)
{
- QStringList result;
+ TQStringList result;
bool allDomCookies = name.isEmpty();
const KHttpCookieList* list = mCookieJar->getCookieList(domain, fqdn);
if ( list && !list->isEmpty() )
{
- QPtrListIterator<KHttpCookie>it( *list );
+ TQPtrListIterator<KHttpCookie>it( *list );
for ( ; it.current(); ++it )
{
if ( !allDomCookies )
@@ -450,14 +450,14 @@ KCookieServer::findCookies(QValueList<int> fields,
// DCOP function
QString
-KCookieServer::findDOMCookies(QString url)
+KCookieServer::findDOMCookies(TQString url)
{
return findDOMCookies(url, 0);
}
// DCOP function
QString
-KCookieServer::findDOMCookies(QString url, long windowId)
+KCookieServer::findDOMCookies(TQString url, long windowId)
{
// We don't wait for pending cookies because it locks up konqueror
// which can cause a deadlock if it happens to have a popup-menu up.
@@ -470,20 +470,20 @@ KCookieServer::findDOMCookies(QString url, long windowId)
// DCOP function
void
-KCookieServer::addCookies(QString arg1, QCString arg2, long arg3)
+KCookieServer::addCookies(TQString arg1, TQCString arg2, long arg3)
{
addCookies(arg1, arg2, arg3, false);
}
// DCOP function
void
-KCookieServer::deleteCookie(QString domain, QString fqdn,
- QString path, QString name)
+KCookieServer::deleteCookie(TQString domain, TQString fqdn,
+ TQString path, TQString name)
{
const KHttpCookieList* list = mCookieJar->getCookieList( domain, fqdn );
if ( list && !list->isEmpty() )
{
- QPtrListIterator<KHttpCookie>it (*list);
+ TQPtrListIterator<KHttpCookie>it (*list);
for ( ; it.current(); ++it )
{
if( cookieMatches(it.current(), domain, fqdn, path, name) )
@@ -498,7 +498,7 @@ KCookieServer::deleteCookie(QString domain, QString fqdn,
// DCOP function
void
-KCookieServer::deleteCookiesFromDomain(QString domain)
+KCookieServer::deleteCookiesFromDomain(TQString domain)
{
mCookieJar->eatCookiesForDomain(domain);
saveCookieJar();
@@ -521,7 +521,7 @@ KCookieServer::deleteSessionCookies( long windowId )
}
void
-KCookieServer::deleteSessionCookiesFor(QString fqdn, long windowId)
+KCookieServer::deleteSessionCookiesFor(TQString fqdn, long windowId)
{
mCookieJar->eatSessionCookies( fqdn, windowId );
saveCookieJar();
@@ -537,20 +537,20 @@ KCookieServer::deleteAllCookies()
// DCOP function
void
-KCookieServer::addDOMCookies(QString arg1, QCString arg2, long arg3)
+KCookieServer::addDOMCookies(TQString arg1, TQCString arg2, long arg3)
{
addCookies(arg1, arg2, arg3, true);
}
// DCOP function
void
-KCookieServer::setDomainAdvice(QString url, QString advice)
+KCookieServer::setDomainAdvice(TQString url, TQString advice)
{
- QString fqdn;
- QString dummy;
+ TQString fqdn;
+ TQString dummy;
if (KCookieJar::parseURL(url, fqdn, dummy))
{
- QStringList domains;
+ TQStringList domains;
mCookieJar->extractDomains(fqdn, domains);
mCookieJar->setDomainAdvice(domains[domains.count() > 3 ? 3 : 0],
@@ -562,17 +562,17 @@ KCookieServer::setDomainAdvice(QString url, QString advice)
// DCOP function
QString
-KCookieServer::getDomainAdvice(QString url)
+KCookieServer::getDomainAdvice(TQString url)
{
KCookieAdvice advice = KCookieDunno;
- QString fqdn;
- QString dummy;
+ TQString fqdn;
+ TQString dummy;
if (KCookieJar::parseURL(url, fqdn, dummy))
{
- QStringList domains;
+ TQStringList domains;
mCookieJar->extractDomains(fqdn, domains);
- QStringList::ConstIterator it = domains.begin();
+ TQStringList::ConstIterator it = domains.begin();
while ( (advice == KCookieDunno) && (it != domains.end()) )
{
// Always check advice in both ".domain" and "domain". Note
diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h
index bcd7fa530..ac185c38d 100644
--- a/kioslave/http/kcookiejar/kcookieserver.h
+++ b/kioslave/http/kcookiejar/kcookieserver.h
@@ -25,7 +25,7 @@
#ifndef KCOOKIESERVER_H
#define KCOOKIESERVER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kded/kdedmodule.h>
class KHttpCookieList;
@@ -41,37 +41,37 @@ class KCookieServer : public KDEDModule
Q_OBJECT
K_DCOP
public:
- KCookieServer(const QCString &);
+ KCookieServer(const TQCString &);
~KCookieServer();
k_dcop:
- QString findCookies(QString);
- QString findCookies(QString, long);
- QStringList findDomains();
- QStringList findCookies(QValueList<int>,QString,QString,QString,QString);
- QString findDOMCookies(QString);
- QString findDOMCookies(QString, long);
- void addCookies(QString, QCString, long);
- void deleteCookie(QString, QString, QString, QString);
- void deleteCookiesFromDomain(QString);
+ TQString findCookies(TQString);
+ TQString findCookies(TQString, long);
+ TQStringList findDomains();
+ TQStringList findCookies(TQValueList<int>,TQString,TQString,TQString,TQString);
+ TQString findDOMCookies(TQString);
+ TQString findDOMCookies(TQString, long);
+ void addCookies(TQString, TQCString, long);
+ void deleteCookie(TQString, TQString, TQString, TQString);
+ void deleteCookiesFromDomain(TQString);
void deleteSessionCookies(long);
- void deleteSessionCookiesFor(QString, long);
+ void deleteSessionCookiesFor(TQString, long);
void deleteAllCookies();
- void addDOMCookies(QString, QCString, long);
+ void addDOMCookies(TQString, TQCString, long);
/**
* Sets the cookie policy for the domain associated with the specified URL.
*/
- void setDomainAdvice(QString url, QString advice);
+ void setDomainAdvice(TQString url, TQString advice);
/**
* Returns the cookie policy in effect for the specified URL.
*/
- QString getDomainAdvice(QString url);
+ TQString getDomainAdvice(TQString url);
void reloadPolicy();
void shutdown();
public:
- bool cookiesPending(const QString &url, KHttpCookieList *cookieList=0);
- void addCookies(const QString &url, const QCString &cookieHeader,
+ bool cookiesPending(const TQString &url, KHttpCookieList *cookieList=0);
+ void addCookies(const TQString &url, const TQCString &cookieHeader,
long windowId, bool useDOMFormat);
void checkCookies(KHttpCookieList *cookieList);
@@ -83,15 +83,15 @@ protected:
KCookieJar *mCookieJar;
KHttpCookieList *mPendingCookies;
RequestList *mRequestList;
- QTimer *mTimer;
+ TQTimer *mTimer;
bool mAdvicePending;
DCOPClient *mOldCookieServer;
KConfig *mConfig;
private:
- virtual int newInstance(QValueList<QCString>) { return 0; }
- bool cookieMatches(KHttpCookie*, QString, QString, QString, QString);
- void putCookie(QStringList&, KHttpCookie*, const QValueList<int>&);
+ virtual int newInstance(TQValueList<TQCString>) { return 0; }
+ bool cookieMatches(KHttpCookie*, TQString, TQString, TQString, TQString);
+ void putCookie(TQStringList&, KHttpCookie*, const TQValueList<int>&);
void saveCookieJar();
};
diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp
index 5c68f8c1e..2c11c33cb 100644
--- a/kioslave/http/kcookiejar/kcookiewin.cpp
+++ b/kioslave/http/kcookiejar/kcookiewin.cpp
@@ -30,30 +30,30 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// this file is also used in Konqueror/Embedded. One of the aims of
// Konqueror/Embedded is to be a small as possible to fit on embedded
// devices. For this it's also useful to strip out unneeded features of
-// Qt, like for example QToolTip or QWhatsThis. The availability (or the
+// Qt, like for example TQToolTip or TQWhatsThis. The availability (or the
// lack thereof) can be determined using these preprocessor defines.
// The same applies to the QT_NO_ACCEL ifdef below. I hope it doesn't make
// too much trouble... (Simon)
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qaccel.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qdatetime.h>
-#include <qmessagebox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqaccel.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqdatetime.h>
+#include <tqmessagebox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
#ifndef QT_NO_TOOLTIP
-#include <qtooltip.h>
+#include <tqtooltip.h>
#endif
#ifndef QT_NO_WHATSTHIS
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#endif
#include <kidna.h>
@@ -72,7 +72,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "kcookiejar.h"
#include "kcookiewin.h"
-KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList,
+KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList,
int defaultButton, bool showDetails )
:KDialog( parent, "cookiealert", true )
{
@@ -94,42 +94,42 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList,
# endif
#endif
// Main widget's layout manager...
- QVBoxLayout* vlayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- vlayout->setResizeMode( QLayout::Fixed );
+ TQVBoxLayout* vlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlayout->setResizeMode( TQLayout::Fixed );
// Cookie image and message to user
- QHBox* hBox = new QHBox( this );
+ TQHBox* hBox = new TQHBox( this );
hBox->setSpacing( KDialog::spacingHint() );
- QLabel* icon = new QLabel( hBox );
- icon->setPixmap( QMessageBox::standardIcon(QMessageBox::Warning) );
+ TQLabel* icon = new TQLabel( hBox );
+ icon->setPixmap( TQMessageBox::standardIcon(TQMessageBox::Warning) );
icon->setAlignment( Qt::AlignCenter );
icon->setFixedSize( 2*icon->sizeHint() );
int count = cookieList.count();
- QVBox* vBox = new QVBox( hBox );
- QString txt = i18n("You received a cookie from",
+ TQVBox* vBox = new TQVBox( hBox );
+ TQString txt = i18n("You received a cookie from",
"You received %n cookies from", count);
- QLabel* lbl = new QLabel( txt, vBox );
+ TQLabel* lbl = new TQLabel( txt, vBox );
lbl->setAlignment( Qt::AlignCenter );
KHttpCookiePtr cookie = cookieList.first();
- QString host (cookie->host());
+ TQString host (cookie->host());
int pos = host.find(':');
if ( pos > 0 )
{
- QString portNum = host.left(pos);
+ TQString portNum = host.left(pos);
host.remove(0, pos+1);
host += ':';
host += portNum;
}
- txt = QString("<b>%1</b>").arg( KIDNA::toUnicode(host) );
+ txt = TQString("<b>%1</b>").arg( KIDNA::toUnicode(host) );
if (cookie->isCrossDomain())
txt += i18n(" <b>[Cross Domain!]</b>");
- lbl = new QLabel( txt, vBox );
+ lbl = new TQLabel( txt, vBox );
lbl->setAlignment( Qt::AlignCenter );
- lbl = new QLabel( i18n("Do you want to accept or reject?"), vBox );
+ lbl = new TQLabel( i18n("Do you want to accept or reject?"), vBox );
lbl->setAlignment( Qt::AlignCenter );
vlayout->addWidget( hBox, 0, Qt::AlignLeft );
@@ -140,29 +140,29 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList,
m_showDetails ? m_detailView->show():m_detailView->hide();
// Cookie policy choice...
- m_btnGrp = new QVButtonGroup( i18n("Apply Choice To"), this );
+ m_btnGrp = new TQVButtonGroup( i18n("Apply Choice To"), this );
m_btnGrp->setRadioButtonExclusive( true );
txt = (count == 1)? i18n("&Only this cookie") : i18n("&Only these cookies");
- QRadioButton* rb = new QRadioButton( txt, m_btnGrp );
+ TQRadioButton* rb = new TQRadioButton( txt, m_btnGrp );
#ifndef QT_NO_WHATSTHIS
- QWhatsThis::add( rb, i18n("Select this option to accept/reject only this cookie. "
+ TQWhatsThis::add( rb, i18n("Select this option to accept/reject only this cookie. "
"You will be prompted if another cookie is received. "
"<em>(see WebBrowsing/Cookies in the Control Center)</em>." ) );
#endif
m_btnGrp->insert( rb );
- rb = new QRadioButton( i18n("All cookies from this do&main"), m_btnGrp );
+ rb = new TQRadioButton( i18n("All cookies from this do&main"), m_btnGrp );
#ifndef QT_NO_WHATSTHIS
- QWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from "
+ TQWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from "
"this site. Choosing this option will add a new policy for "
"the site this cookie originated from. This policy will be "
"permanent until you manually change it from the Control Center "
"<em>(see WebBrowsing/Cookies in the Control Center)</em>.") );
#endif
m_btnGrp->insert( rb );
- rb = new QRadioButton( i18n("All &cookies"), m_btnGrp );
+ rb = new TQRadioButton( i18n("All &cookies"), m_btnGrp );
#ifndef QT_NO_WHATSTHIS
- QWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from "
+ TQWhatsThis::add( rb, i18n("Select this option to accept/reject all cookies from "
"anywhere. Choosing this option will change the global "
"cookie policy set in the Control Center for all cookies "
"<em>(see WebBrowsing/Cookies in the Control Center)</em>.") );
@@ -176,29 +176,29 @@ KCookieWin::KCookieWin( QWidget *parent, KHttpCookieList cookieList,
m_btnGrp->setButton( 1 );
// Accept/Reject buttons
- QWidget* bbox = new QWidget( this );
- QBoxLayout* bbLay = new QHBoxLayout( bbox );
+ TQWidget* bbox = new TQWidget( this );
+ TQBoxLayout* bbLay = new TQHBoxLayout( bbox );
bbLay->setSpacing( KDialog::spacingHint() );
- QPushButton* btn = new QPushButton( i18n("&Accept"), bbox );
+ TQPushButton* btn = new TQPushButton( i18n("&Accept"), bbox );
btn->setDefault( true );
btn->setFocus();
- connect( btn, SIGNAL(clicked()), SLOT(accept()) );
+ connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );
bbLay->addWidget( btn );
- btn = new QPushButton( i18n("&Reject"), bbox );
- connect( btn, SIGNAL(clicked()), SLOT(reject()) );
+ btn = new TQPushButton( i18n("&Reject"), bbox );
+ connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
bbLay->addWidget( btn );
bbLay->addStretch( 1 );
#ifndef QT_NO_ACCEL
- QAccel* a = new QAccel( this );
- a->connectItem( a->insertItem(Qt::Key_Escape), btn, SLOT(animateClick()) );
+ TQAccel* a = new TQAccel( this );
+ a->connectItem( a->insertItem(Qt::Key_Escape), btn, TQT_SLOT(animateClick()) );
#endif
- m_button = new QPushButton( bbox );
+ m_button = new TQPushButton( bbox );
m_button->setText( m_showDetails ? i18n("&Details <<"):i18n("&Details >>") );
- connect( m_button, SIGNAL(clicked()), SLOT(slotCookieDetails()) );
+ connect( m_button, TQT_SIGNAL(clicked()), TQT_SLOT(slotCookieDetails()) );
bbLay->addWidget( m_button );
#ifndef QT_NO_WHATSTHIS
- QWhatsThis::add( m_button, i18n("See or modify the cookie information") );
+ TQWhatsThis::add( m_button, i18n("See or modify the cookie information") );
#endif
@@ -236,7 +236,7 @@ KCookieAdvice KCookieWin::advice( KCookieJar *cookiejar, KHttpCookie* cookie )
cookiejar->setShowCookieDetails ( m_showDetails );
- KCookieAdvice advice = (result==QDialog::Accepted) ? KCookieAccept:KCookieReject;
+ KCookieAdvice advice = (result==TQDialog::Accepted) ? KCookieAccept:KCookieReject;
int preferredPolicy = m_btnGrp->id( m_btnGrp->selected() );
cookiejar->setPreferredDefaultPolicy( preferredPolicy );
@@ -257,17 +257,17 @@ KCookieAdvice KCookieWin::advice( KCookieJar *cookiejar, KHttpCookie* cookie )
}
KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount,
- QWidget* parent, const char* name )
- :QGroupBox( parent, name )
+ TQWidget* parent, const char* name )
+ :TQGroupBox( parent, name )
{
setTitle( i18n("Cookie Details") );
- QGridLayout* grid = new QGridLayout( this, 9, 2,
+ TQGridLayout* grid = new TQGridLayout( this, 9, 2,
KDialog::spacingHint(),
KDialog::marginHint() );
grid->addRowSpacing( 0, fontMetrics().lineSpacing() );
grid->setColStretch( 1, 3 );
- QLabel* label = new QLabel( i18n("Name:"), this );
+ TQLabel* label = new TQLabel( i18n("Name:"), this );
grid->addWidget( label, 1, 0 );
m_name = new KLineEdit( this );
m_name->setReadOnly( true );
@@ -275,35 +275,35 @@ KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount,
grid->addWidget( m_name, 1 ,1 );
//Add the value
- label = new QLabel( i18n("Value:"), this );
+ label = new TQLabel( i18n("Value:"), this );
grid->addWidget( label, 2, 0 );
m_value = new KLineEdit( this );
m_value->setReadOnly( true );
m_value->setMaximumWidth( fontMetrics().maxWidth() * 25 );
grid->addWidget( m_value, 2, 1);
- label = new QLabel( i18n("Expires:"), this );
+ label = new TQLabel( i18n("Expires:"), this );
grid->addWidget( label, 3, 0 );
m_expires = new KLineEdit( this );
m_expires->setReadOnly( true );
m_expires->setMaximumWidth(fontMetrics().maxWidth() * 25 );
grid->addWidget( m_expires, 3, 1);
- label = new QLabel( i18n("Path:"), this );
+ label = new TQLabel( i18n("Path:"), this );
grid->addWidget( label, 4, 0 );
m_path = new KLineEdit( this );
m_path->setReadOnly( true );
m_path->setMaximumWidth( fontMetrics().maxWidth() * 25 );
grid->addWidget( m_path, 4, 1);
- label = new QLabel( i18n("Domain:"), this );
+ label = new TQLabel( i18n("Domain:"), this );
grid->addWidget( label, 5, 0 );
m_domain = new KLineEdit( this );
m_domain->setReadOnly( true );
m_domain->setMaximumWidth( fontMetrics().maxWidth() * 25 );
grid->addWidget( m_domain, 5, 1);
- label = new QLabel( i18n("Exposure:"), this );
+ label = new TQLabel( i18n("Exposure:"), this );
grid->addWidget( label, 6, 0 );
m_secure = new KLineEdit( this );
m_secure->setReadOnly( true );
@@ -312,12 +312,12 @@ KCookieDetail::KCookieDetail( KHttpCookieList cookieList, int cookieCount,
if ( cookieCount > 1 )
{
- QPushButton* btnNext = new QPushButton( i18n("Next cookie","&Next >>"), this );
+ TQPushButton* btnNext = new TQPushButton( i18n("Next cookie","&Next >>"), this );
btnNext->setFixedSize( btnNext->sizeHint() );
grid->addMultiCellWidget( btnNext, 8, 8, 0, 1 );
- connect( btnNext, SIGNAL(clicked()), SLOT(slotNextCookie()) );
+ connect( btnNext, TQT_SIGNAL(clicked()), TQT_SLOT(slotNextCookie()) );
#ifndef QT_NO_TOOLTIP
- QToolTip::add( btnNext, i18n("Show details of the next cookie") );
+ TQToolTip::add( btnNext, i18n("Show details of the next cookie") );
#endif
}
m_cookieList = cookieList;
@@ -354,13 +354,13 @@ void KCookieDetail::slotNextCookie()
else
m_domain->setText( m_cookie->domain() );
m_path->setText( m_cookie->path() );
- QDateTime cookiedate;
+ TQDateTime cookiedate;
cookiedate.setTime_t( m_cookie->expireDate() );
if ( m_cookie->expireDate() )
m_expires->setText( KGlobal::locale()->formatDateTime(cookiedate) );
else
m_expires->setText( i18n("End of Session") );
- QString sec;
+ TQString sec;
if (m_cookie->isSecure())
{
if (m_cookie->isHttpOnly())
diff --git a/kioslave/http/kcookiejar/kcookiewin.h b/kioslave/http/kcookiejar/kcookiewin.h
index 30e92e7e0..926964dec 100644
--- a/kioslave/http/kcookiejar/kcookiewin.h
+++ b/kioslave/http/kcookiejar/kcookiewin.h
@@ -27,7 +27,7 @@
#ifndef _KCOOKIEWIN_H_
#define _KCOOKIEWIN_H_
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kdialog.h>
#include "kcookiejar.h"
@@ -42,7 +42,7 @@ class KCookieDetail : public QGroupBox
Q_OBJECT
public :
- KCookieDetail( KHttpCookieList cookieList, int cookieCount, QWidget *parent=0,
+ KCookieDetail( KHttpCookieList cookieList, int cookieCount, TQWidget *parent=0,
const char *name=0 );
~KCookieDetail();
@@ -66,15 +66,15 @@ class KCookieWin : public KDialog
Q_OBJECT
public :
- KCookieWin( QWidget *parent, KHttpCookieList cookieList, int defaultButton=0,
+ KCookieWin( TQWidget *parent, KHttpCookieList cookieList, int defaultButton=0,
bool showDetails=false );
~KCookieWin();
KCookieAdvice advice( KCookieJar *cookiejar, KHttpCookie* cookie );
private :
- QPushButton* m_button;
- QVButtonGroup* m_btnGrp;
+ TQPushButton* m_button;
+ TQVButtonGroup* m_btnGrp;
KCookieDetail* m_detailView;
bool m_showDetails;
diff --git a/kioslave/http/kcookiejar/main.cpp b/kioslave/http/kcookiejar/main.cpp
index 1e943b939..1a47b398e 100644
--- a/kioslave/http/kcookiejar/main.cpp
+++ b/kioslave/http/kcookiejar/main.cpp
@@ -53,39 +53,39 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
kapp->dcopClient()->attach();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (args->isSet("remove-all"))
{
- kapp->dcopClient()->call( "kded", "kcookiejar", "deleteAllCookies()", QByteArray(), replyType, replyData);
+ kapp->dcopClient()->call( "kded", "kcookiejar", "deleteAllCookies()", TQByteArray(), replyType, replyData);
}
if (args->isSet("remove"))
{
- QString domain = args->getOption("remove");
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQString domain = args->getOption("remove");
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << domain;
- kapp->dcopClient()->call( "kded", "kcookiejar", "deleteCookiesFromDomain(QString)", params, replyType, replyData);
+ kapp->dcopClient()->call( "kded", "kcookiejar", "deleteCookiesFromDomain(TQString)", params, replyType, replyData);
}
if (args->isSet("shutdown"))
{
- QCString module = "kcookiejar";
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQCString module = "kcookiejar";
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << module;
- kapp->dcopClient()->call( "kded", "kded", "unloadModule(QCString)", params, replyType, replyData);
+ kapp->dcopClient()->call( "kded", "kded", "unloadModule(TQCString)", params, replyType, replyData);
}
else if(args->isSet("reload-config"))
{
- kapp->dcopClient()->call( "kded", "kcookiejar", "reloadPolicy()", QByteArray(), replyType, replyData);
+ kapp->dcopClient()->call( "kded", "kcookiejar", "reloadPolicy()", TQByteArray(), replyType, replyData);
}
else
{
- QCString module = "kcookiejar";
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQCString module = "kcookiejar";
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << module;
- kapp->dcopClient()->call( "kded", "kded", "loadModule(QCString)", params, replyType, replyData);
+ kapp->dcopClient()->call( "kded", "kded", "loadModule(TQCString)", params, replyType, replyData);
}
return 0;
diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
index f196f1820..0ad238ab7 100644
--- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
+++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
@@ -21,8 +21,8 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -34,8 +34,8 @@
static const char *description = "KCookiejar regression test";
static KCookieJar *jar;
-static QCString *lastYear;
-static QCString *nextYear;
+static TQCString *lastYear;
+static TQCString *nextYear;
static KConfig *config = 0;
@@ -45,13 +45,13 @@ static KCmdLineOptions options[] =
KCmdLineLastOption
};
-static void FAIL(const QString &msg)
+static void FAIL(const TQString &msg)
{
qWarning("%s", msg.local8Bit().data());
exit(1);
}
-static void popArg(QCString &command, QCString & line)
+static void popArg(TQCString &command, TQCString & line)
{
int i = line.find(' ');
if (i != -1)
@@ -67,17 +67,17 @@ static void popArg(QCString &command, QCString & line)
}
-static void popArg(QString &command, QCString & line)
+static void popArg(TQString &command, TQCString & line)
{
int i = line.find(' ');
if (i != -1)
{
- command = QString::fromLatin1(line.left(i));
+ command = TQString::fromLatin1(line.left(i));
line = line.mid(i+1);
}
else
{
- command = QString::fromLatin1(line);
+ command = TQString::fromLatin1(line);
line = 0;
}
}
@@ -85,8 +85,8 @@ static void popArg(QString &command, QCString & line)
static void clearConfig()
{
delete config;
- QString file = locateLocal("config", "kcookiejar-testconfig");
- QFile::remove(file);
+ TQString file = locateLocal("config", "kcookiejar-testconfig");
+ TQFile::remove(file);
config = new KConfig(file);
config->setGroup("Cookie Policy");
config->writeEntry("RejectCrossDomainCookies", false);
@@ -103,8 +103,8 @@ static void clearCookies()
static void saveCookies()
{
- QString file = locateLocal("config", "kcookiejar-testcookies");
- QFile::remove(file);
+ TQString file = locateLocal("config", "kcookiejar-testcookies");
+ TQFile::remove(file);
jar->saveCookies(file);
delete jar;
jar = new KCookieJar();
@@ -112,21 +112,21 @@ static void saveCookies()
jar->loadCookies(file);
}
-static void processCookie(QCString &line)
+static void processCookie(TQCString &line)
{
- QString policy;
+ TQString policy;
popArg(policy, line);
KCookieAdvice expectedAdvice = KCookieJar::strToAdvice(policy);
if (expectedAdvice == KCookieDunno)
- FAIL(QString("Unknown accept policy '%1'").arg(policy));
+ FAIL(TQString("Unknown accept policy '%1'").arg(policy));
- QString urlStr;
+ TQString urlStr;
popArg(urlStr, line);
KURL url(urlStr);
if (!url.isValid())
- FAIL(QString("Invalid URL '%1'").arg(urlStr));
+ FAIL(TQString("Invalid URL '%1'").arg(urlStr));
if (url.isEmpty())
- FAIL(QString("Missing URL"));
+ FAIL(TQString("Missing URL"));
line.replace("%LASTYEAR%", *lastYear);
line.replace("%NEXTYEAR%", *nextYear);
@@ -134,62 +134,62 @@ static void processCookie(QCString &line)
KHttpCookieList list = jar->makeCookies(urlStr, line, 0);
if (list.isEmpty())
- FAIL(QString("Failed to make cookies from: '%1'").arg(line));
+ FAIL(TQString("Failed to make cookies from: '%1'").arg(line));
for(KHttpCookie *cookie = list.first();
cookie; cookie = list.next())
{
KCookieAdvice cookieAdvice = jar->cookieAdvice(cookie);
if (cookieAdvice != expectedAdvice)
- FAIL(urlStr+QString("\n'%2'\nGot advice '%3' expected '%4'").arg(line)
+ FAIL(urlStr+TQString("\n'%2'\nGot advice '%3' expected '%4'").arg(line)
.arg(KCookieJar::adviceToStr(cookieAdvice))
.arg(KCookieJar::adviceToStr(expectedAdvice)));
jar->addCookie(cookie);
}
}
-static void processCheck(QCString &line)
+static void processCheck(TQCString &line)
{
- QString urlStr;
+ TQString urlStr;
popArg(urlStr, line);
KURL url(urlStr);
if (!url.isValid())
- FAIL(QString("Invalid URL '%1'").arg(urlStr));
+ FAIL(TQString("Invalid URL '%1'").arg(urlStr));
if (url.isEmpty())
- FAIL(QString("Missing URL"));
+ FAIL(TQString("Missing URL"));
- QString expectedCookies = QString::fromLatin1(line);
+ TQString expectedCookies = TQString::fromLatin1(line);
- QString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace();
+ TQString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace();
if (cookies != expectedCookies)
- FAIL(urlStr+QString("\nGot '%1' expected '%2'")
+ FAIL(urlStr+TQString("\nGot '%1' expected '%2'")
.arg(cookies, expectedCookies));
}
-static void processClear(QCString &line)
+static void processClear(TQCString &line)
{
if (line == "CONFIG")
clearConfig();
else if (line == "COOKIES")
clearCookies();
else
- FAIL(QString("Unknown command 'CLEAR %1'").arg(line));
+ FAIL(TQString("Unknown command 'CLEAR %1'").arg(line));
}
-static void processConfig(QCString &line)
+static void processConfig(TQCString &line)
{
- QCString key;
+ TQCString key;
popArg(key, line);
if (key.isEmpty())
- FAIL(QString("Missing Key"));
+ FAIL(TQString("Missing Key"));
config->setGroup("Cookie Policy");
config->writeEntry(key.data(), line.data());
jar->loadConfig(config, false);
}
-static void processLine(QCString line)
+static void processLine(TQCString line)
{
if (line.isEmpty())
return;
@@ -201,7 +201,7 @@ static void processLine(QCString line)
return;
}
- QCString command;
+ TQCString command;
popArg(command, line);
if (command.isEmpty())
return;
@@ -217,14 +217,14 @@ static void processLine(QCString line)
else if (command == "SAVE")
saveCookies();
else
- FAIL(QString("Unknown command '%1'").arg(command));
+ FAIL(TQString("Unknown command '%1'").arg(command));
}
-static void runRegression(const QString &filename)
+static void runRegression(const TQString &filename)
{
FILE *file = fopen(filename.local8Bit(), "r");
if (!file)
- FAIL(QString("Can't open '%1'").arg(filename));
+ FAIL(TQString("Can't open '%1'").arg(filename));
char buf[4096];
while (fgets(buf, sizeof(buf), file))
@@ -242,12 +242,12 @@ static void runRegression(const QString &filename)
int main(int argc, char *argv[])
{
- QString arg1;
- QCString arg2;
- QString result;
+ TQString arg1;
+ TQCString arg2;
+ TQString result;
- lastYear = new QCString(QString("Fri, 04-May-%1 01:00:00 GMT").arg(QDate::currentDate().year()-1).utf8());
- nextYear = new QCString(QString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(QDate::currentDate().year()+1).utf8());
+ lastYear = new TQCString(TQString("Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()-1).utf8());
+ nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()+1).utf8());
KAboutData about("kcookietest", "kcookietest", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
KCmdLineArgs::init( argc, argv, &about);
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
clearConfig();
- QString file = args->url(0).path();
+ TQString file = args->url(0).path();
runRegression(file);
return 0;
}
diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp
index 8b7ebe66a..268805770 100644
--- a/kioslave/iso/iso.cpp
+++ b/kioslave/iso/iso.cpp
@@ -27,7 +27,7 @@
#include <unistd.h>
#include <klargefile.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -78,7 +78,7 @@ int kdemain( int argc, char **argv )
}
-kio_isoProtocol::kio_isoProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "iso", pool, app )
+kio_isoProtocol::kio_isoProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "iso", pool, app )
{
kdDebug() << "kio_isoProtocol::kio_isoProtocol" << endl;
m_isoFile = 0L;
@@ -89,7 +89,7 @@ kio_isoProtocol::~kio_isoProtocol()
delete m_isoFile;
}
-bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int startsec )
+bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int startsec )
{
kdDebug() << "kio_isoProtocol::checkNewFile " << fullPath << " startsec: " <<
startsec << endl;
@@ -100,7 +100,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
{
// Has it changed ?
struct stat statbuf;
- if ( ::stat( QFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 )
+ if ( ::stat( TQFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 )
{
if ( m_mtime == statbuf.st_mtime )
{
@@ -122,8 +122,8 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
// Find where the iso file is in the full path
int pos = 0;
- QString isoFile;
- path = QString::null;
+ TQString isoFile;
+ path = TQString::null;
int len = fullPath.length();
if ( len != 0 && fullPath[ len - 1 ] != '/' )
@@ -132,11 +132,11 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
kdDebug() << "the full path is " << fullPath << endl;
while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
{
- QString tryPath = fullPath.left( pos );
+ TQString tryPath = fullPath.left( pos );
kdDebug() << fullPath << " trying " << tryPath << endl;
KDE_struct_stat statbuf;
- if ( KDE_lstat( QFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) )
+ if ( KDE_lstat( TQFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) )
{
isoFile = tryPath;
m_mtime = statbuf.st_mtime;
@@ -150,7 +150,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
path.truncate( len - 1 );
}
else
- path = QString::fromLatin1("/");
+ path = TQString::fromLatin1("/");
kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl;
break;
}
@@ -234,10 +234,10 @@ void kio_isoProtocol::listDir( const KURL & url )
{
kdDebug() << "kio_isoProtocol::listDir " << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
kdDebug() << "Checking (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -259,10 +259,10 @@ void kio_isoProtocol::listDir( const KURL & url )
if ( path.isEmpty() )
{
- KURL redir( QString::fromLatin1( "iso:/") );
+ KURL redir( TQString::fromLatin1( "iso:/") );
kdDebug() << "url.path()==" << url.path() << endl;
if (url.hasRef()) redir.setRef(url.htmlRef());
- redir.setPath( url.path() + QString::fromLatin1("/") );
+ redir.setPath( url.path() + TQString::fromLatin1("/") );
kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl;
redirection( redir );
finished();
@@ -274,7 +274,7 @@ void kio_isoProtocol::listDir( const KURL & url )
const KArchiveDirectory* dir;
if (!path.isEmpty() && path != "/")
{
- kdDebug() << QString("Looking for entry %1").arg(path) << endl;
+ kdDebug() << TQString("Looking for entry %1").arg(path) << endl;
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
@@ -291,11 +291,11 @@ void kio_isoProtocol::listDir( const KURL & url )
dir = root;
}
- QStringList l = dir->entries();
+ TQStringList l = dir->entries();
totalSize( l.count() );
UDSEntry entry;
- QStringList::Iterator it = l.begin();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
kdDebug() << (*it) << endl;
@@ -315,7 +315,7 @@ void kio_isoProtocol::listDir( const KURL & url )
void kio_isoProtocol::stat( const KURL & url )
{
- QString path;
+ TQString path;
UDSEntry entry;
kdDebug() << "kio_isoProtocol::stat " << url.url() << endl;
@@ -323,7 +323,7 @@ void kio_isoProtocol::stat( const KURL & url )
{
// We may be looking at a real directory - this happens
// when pressing up after being in the root of an archive
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
kdDebug() << "kio_isoProtocol::stat (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url )
const KArchiveEntry* isoEntry;
if ( path.isEmpty() )
{
- path = QString::fromLatin1( "/" );
+ path = TQString::fromLatin1( "/" );
isoEntry = root;
} else {
isoEntry = root->entry( path );
@@ -371,11 +371,11 @@ void kio_isoProtocol::stat( const KURL & url )
finished();
}
-void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const QString &path )
+void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &path )
{
unsigned long long size, pos = 0;
bool mime=false,zlib=false;
- QByteArray fileData, pointer_block, inbuf, outbuf;
+ TQByteArray fileData, pointer_block, inbuf, outbuf;
char *pptr = 0;
compressed_file_header *hdr;
int block_shift;
@@ -489,7 +489,7 @@ void kio_isoProtocol::get( const KURL & url )
{
kdDebug() << "kio_isoProtocol::get" << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
error( KIO::ERR_DOES_NOT_EXIST, url.path() );
diff --git a/kioslave/iso/iso.h b/kioslave/iso/iso.h
index 079f68e6a..6b16b6389 100644
--- a/kioslave/iso/iso.h
+++ b/kioslave/iso/iso.h
@@ -31,7 +31,7 @@ class KIso;
class kio_isoProtocol : public KIO::SlaveBase
{
public:
- kio_isoProtocol( const QCString &pool, const QCString &app );
+ kio_isoProtocol( const TQCString &pool, const TQCString &app );
virtual ~kio_isoProtocol();
virtual void listDir( const KURL & url );
@@ -39,9 +39,9 @@ public:
virtual void get( const KURL & url );
protected:
- void getFile( const KIsoFile *isoFileEntry, const QString &path );
+ void getFile( const KIsoFile *isoFileEntry, const TQString &path );
void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry );
- bool checkNewFile( QString fullPath, QString & path, int startsec );
+ bool checkNewFile( TQString fullPath, TQString & path, int startsec );
KIso * m_isoFile;
time_t m_mtime;
diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp
index 6bc4241fe..dff111bff 100644
--- a/kioslave/iso/kiso.cpp
+++ b/kioslave/iso/kiso.cpp
@@ -27,9 +27,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kurl.h>
#include <kmimetype.h>
@@ -102,16 +102,16 @@ class KIso::KIsoPrivate
{
public:
KIsoPrivate() {}
- QStringList dirList;
+ TQStringList dirList;
};
-KIso::KIso( const QString& filename, const QString & _mimetype )
+KIso::KIso( const TQString& filename, const TQString & _mimetype )
: KArchive( 0L )
{
m_startsec = -1;
m_filename = filename;
d = new KIsoPrivate;
- QString mimetype( _mimetype );
+ TQString mimetype( _mimetype );
bool forced = true;
if ( mimetype.isEmpty() )
{
@@ -128,7 +128,7 @@ KIso::KIso( const QString& filename, const QString & _mimetype )
else
{
// Something else. Check if it's not really gzip though (e.g. for KOffice docs)
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_ReadOnly ) )
{
unsigned char firstByte = file.getch();
@@ -152,8 +152,8 @@ KIso::KIso( const QString& filename, const QString & _mimetype )
prepareDevice( filename, mimetype, forced );
}
-void KIso::prepareDevice( const QString & filename,
- const QString & mimetype, bool forced )
+void KIso::prepareDevice( const TQString & filename,
+ const TQString & mimetype, bool forced )
{
/* 'hack' for Qt's false assumption that only S_ISREG is seekable */
if( "inode/blockdevice" == mimetype )
@@ -164,14 +164,14 @@ void KIso::prepareDevice( const QString & filename,
|| "application/x-bzip2" == mimetype)
forced = true;
- QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( dev )
setDevice( dev );
}
}
-KIso::KIso( QIODevice * dev )
+KIso::KIso( TQIODevice * dev )
: KArchive( dev )
{
d = new KIsoPrivate;
@@ -190,7 +190,7 @@ KIso::~KIso()
/* callback function for libisofs */
static int readf(char *buf, int start, int len,void *udata) {
- QIODevice* dev = ( static_cast<KIso*> (udata) )->device();
+ TQIODevice* dev = ( static_cast<KIso*> (udata) )->device();
if (dev->at(start<<11)) {
if ((dev->readBlock(buf, len<<11)) != -1) return (len);
@@ -204,7 +204,7 @@ static int readf(char *buf, int start, int len,void *udata) {
static int mycallb(struct iso_directory_record *idr,void *udata) {
KIso *iso = static_cast<KIso*> (udata);
- QString path,user,group,symlink;
+ TQString path,user,group,symlink;
int i;
int access;
int time,cdate,adate;
@@ -249,7 +249,7 @@ static int mycallb(struct iso_directory_record *idr,void *udata) {
if (!special) {
if (iso->joliet) {
for (i=0;i<(isonum_711(idr->name_len)-1);i+=2) {
- QChar ch( be2me_16(*((ushort*)&(idr->name[i]))) );
+ TQChar ch( be2me_16(*((ushort*)&(idr->name[i]))) );
if (ch==';') break;
path+=ch;
}
@@ -292,12 +292,12 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
int i,size;
boot_head boot;
boot_entry *be;
- QString path;
+ TQString path;
KIsoFile *entry;
entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
- dirent->user(), dirent->group(), QString::null,
+ dirent->user(), dirent->group(), TQString::null,
isonum_731(bootdesc->boot_catalog)<<11, 2048 );
dirent->addEntry(entry);
if (!ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,this)) {
@@ -307,10 +307,10 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
size=BootImageSize( isonum_711(((struct default_entry*) be->data)->media),
isonum_721(((struct default_entry*) be->data)->seccount));
path="Default Image";
- if (i>1) path += " (" + QString::number(i) + ")";
+ if (i>1) path += " (" + TQString::number(i) + ")";
entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
- dirent->user(), dirent->group(), QString::null,
+ dirent->user(), dirent->group(), TQString::null,
isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 );
dirent->addEntry(entry);
be=be->next;
@@ -335,7 +335,7 @@ void KIso::readParams()
bool KIso::openArchive( int mode )
{
iso_vol_desc *desc;
- QString path,tmp,uid,gid;
+ TQString path,tmp,uid,gid;
struct stat buf;
int tracks[2*100],trackno=0,i,access,c_b,c_i,c_j;
KArchiveDirectory *root;
@@ -375,10 +375,10 @@ bool KIso::openArchive( int mode )
c_b=1;c_i=1;c_j=1;
root=rootDir();
if (trackno>1) {
- path=QString::null;
- QTextOStream(&path) << "Track " << tracks[(i<<1)+1];
+ path=TQString::null;
+ TQTextOStream(&path) << "Track " << tracks[(i<<1)+1];
root = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null );
rootDir()->addEntry(root);
}
@@ -395,10 +395,10 @@ bool KIso::openArchive( int mode )
bootdesc=(struct el_torito_boot_descriptor*) &(desc->data);
if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) {
path="El Torito Boot";
- if (c_b>1) path += " (" + QString::number(c_b) + ")";
+ if (c_b>1) path += " (" + TQString::number(c_b) + ")";
dirent = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null );
root->addEntry(dirent);
addBoot(bootdesc);
@@ -411,14 +411,14 @@ bool KIso::openArchive( int mode )
idr=(struct iso_directory_record*) &( ((struct iso_primary_descriptor*) &desc->data)->root_directory_record);
joliet = JolietLevel(&desc->data);
if (joliet) {
- QTextOStream(&path) << "Joliet level " << joliet;
- if (c_j>1) path += " (" + QString::number(c_j) + ")";
+ TQTextOStream(&path) << "Joliet level " << joliet;
+ if (c_j>1) path += " (" + TQString::number(c_j) + ")";
} else {
path = "ISO9660";
- if (c_i>1) path += " (" + QString::number(c_i) + ")";
+ if (c_i>1) path += " (" + TQString::number(c_i) + ")";
}
dirent = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null );
root->addEntry(dirent);
level=0;
mycallb(idr, this );
@@ -439,12 +439,12 @@ bool KIso::closeArchive()
return true;
}
-bool KIso::writeDir( const QString&, const QString&, const QString& )
+bool KIso::writeDir( const TQString&, const TQString&, const TQString& )
{
return false;
}
-bool KIso::prepareWriting( const QString&, const QString&, const QString&, uint)
+bool KIso::prepareWriting( const TQString&, const TQString&, const TQString&, uint)
{
return false;
}
diff --git a/kioslave/iso/kiso.h b/kioslave/iso/kiso.h
index ceddb4a0f..c488dd0cb 100644
--- a/kioslave/iso/kiso.h
+++ b/kioslave/iso/kiso.h
@@ -25,10 +25,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include "kisofile.h"
#include "kisodirectory.h"
@@ -50,15 +50,15 @@ public:
* Do not use application/x-tgz or so. Only the compression layer !
* If the mimetype is ommitted, it will be determined from the filename.
*/
- KIso( const QString& filename, const QString & mimetype = QString::null );
+ KIso( const TQString& filename, const TQString & mimetype = TQString::null );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * WARNING: don't assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * WARNING: don't assume that giving a TQFile here will decompress the file,
* in case it's compressed!
*/
- KIso( QIODevice * dev );
+ KIso( TQIODevice * dev );
/**
* If the .iso is still opened, then it will be
@@ -68,12 +68,12 @@ public:
/**
* The name of the os file, as passed to the constructor
- * Null if you used the QIODevice constructor.
+ * Null if you used the TQIODevice constructor.
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
- bool writeDir( const QString& , const QString& , const QString& );
- bool prepareWriting( const QString& , const QString& , const QString& , uint );
+ bool writeDir( const TQString& , const TQString& , const TQString& );
+ bool prepareWriting( const TQString& , const TQString& , const TQString& , uint );
bool doneWriting( uint );
void setStartSec(int startsec) { m_startsec = startsec; }
@@ -98,10 +98,10 @@ private:
* @internal
*/
void addBoot(struct el_torito_boot_descriptor* bootdesc);
- void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false );
+ void prepareDevice( const TQString & filename, const TQString & mimetype, bool forced = false );
int m_startsec;
- QString m_filename;
+ TQString m_filename;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kioslave/iso/kisodirectory.cpp b/kioslave/iso/kisodirectory.cpp
index f354383e1..74987a232 100644
--- a/kioslave/iso/kisodirectory.cpp
+++ b/kioslave/iso/kisodirectory.cpp
@@ -17,9 +17,9 @@
#include "kisodirectory.h"
-KIsoDirectory::KIsoDirectory( KArchive* archive, const QString& name, int access,
- int date, int adate, int cdate, const QString& user, const QString& group,
- const QString& symlink) :
+KIsoDirectory::KIsoDirectory( KArchive* archive, const TQString& name, int access,
+ int date, int adate, int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink) :
KArchiveDirectory(archive, name, access, date, user, group, symlink) {
diff --git a/kioslave/iso/kisodirectory.h b/kioslave/iso/kisodirectory.h
index 0b59719d4..74045ac75 100644
--- a/kioslave/iso/kisodirectory.h
+++ b/kioslave/iso/kisodirectory.h
@@ -18,7 +18,7 @@
#ifndef KISODIRECTORY_H
#define KISODIRECTORY_H
-#include <qstring.h>
+#include <tqstring.h>
#include <karchive.h>
/**
@@ -27,9 +27,9 @@
class KIsoDirectory : public KArchiveDirectory {
public:
- KIsoDirectory( KArchive* archive, const QString& name, int access, int date,
- int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink);
+ KIsoDirectory( KArchive* archive, const TQString& name, int access, int date,
+ int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink);
~KIsoDirectory();
int adate() const { return m_adate; }
int cdate() const { return m_cdate; }
diff --git a/kioslave/iso/kisofile.cpp b/kioslave/iso/kisofile.cpp
index 1d23b9c36..afac16b74 100644
--- a/kioslave/iso/kisofile.cpp
+++ b/kioslave/iso/kisofile.cpp
@@ -18,9 +18,9 @@
#include "kisofile.h"
#include <kdebug.h>
-KIsoFile::KIsoFile( KArchive* archive, const QString& name, int access,
- int date, int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink,int pos, int size) :
+KIsoFile::KIsoFile( KArchive* archive, const TQString& name, int access,
+ int date, int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink,int pos, int size) :
KArchiveFile(archive, name, access, date, user, group, symlink, pos, size) {
@@ -38,8 +38,8 @@ void KIsoFile::setZF(char algo[2],char parms[2],int realsize) {
m_realsize=realsize;
}
-QByteArray KIsoFile::data(long long pos, int count) const {
- QByteArray r;
+TQByteArray KIsoFile::data(long long pos, int count) const {
+ TQByteArray r;
int rlen;
if ( archive()->device()->at(position()+pos) &&
diff --git a/kioslave/iso/kisofile.h b/kioslave/iso/kisofile.h
index a30fc758c..193509cf6 100644
--- a/kioslave/iso/kisofile.h
+++ b/kioslave/iso/kisofile.h
@@ -18,7 +18,7 @@
#ifndef KISOFILE_H
#define KISOFILE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <karchive.h>
/**
@@ -27,16 +27,16 @@
class KIsoFile : public KArchiveFile {
public:
- KIsoFile( KArchive* archive, const QString& name, int access, int date,
- int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink, int pos, int size);
+ KIsoFile( KArchive* archive, const TQString& name, int access, int date,
+ int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink, int pos, int size);
~KIsoFile();
void setZF(char algo[2],char parms[2],int realsize);
int adate() const { return m_adate; }
int cdate() const { return m_cdate; }
long long realsize() const { return m_realsize; }
- virtual QByteArray data(long long pos, int count) const;
+ virtual TQByteArray data(long long pos, int count) const;
private:
/* hide this member function, it's broken by design, because the full
data often requires too much memory */
diff --git a/kioslave/iso/qfilehack.cpp b/kioslave/iso/qfilehack.cpp
index 6f0b99d4a..f4f788f25 100644
--- a/kioslave/iso/qfilehack.cpp
+++ b/kioslave/iso/qfilehack.cpp
@@ -20,7 +20,7 @@
QFileHack::QFileHack(){
}
-QFileHack::QFileHack( const QString & name ) : QFile(name) {
+QFileHack::QFileHack( const TQString & name ) : TQFile(name) {
}
QFileHack::~QFileHack(){
@@ -32,7 +32,7 @@ bool QFileHack::open ( int m ) {
#ifdef __linux__
m |= IO_Async; //On linux, set O_NONBLOCK, opens CD-ROMs faster
#endif
- ret=QFile::open(m);
+ ret=TQFile::open(m);
if (ret && isSequentialAccess() ) {
setType(IO_Direct);
}
diff --git a/kioslave/iso/qfilehack.h b/kioslave/iso/qfilehack.h
index 5e9e247d0..3f0b1f6a6 100644
--- a/kioslave/iso/qfilehack.h
+++ b/kioslave/iso/qfilehack.h
@@ -18,8 +18,8 @@
#ifndef QFILEHACK_H
#define QFILEHACK_H
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
/**
*@author Szombathelyi György
@@ -27,10 +27,10 @@
* block devices for example?
*/
-class QFileHack : public QFile {
+class QFileHack : public TQFile {
public:
QFileHack();
- QFileHack( const QString & name );
+ QFileHack( const TQString & name );
~QFileHack();
virtual bool open ( int m );
};
diff --git a/kioslave/metainfo/metainfo.cpp b/kioslave/metainfo/metainfo.cpp
index 0e4814b33..21e24e428 100644
--- a/kioslave/metainfo/metainfo.cpp
+++ b/kioslave/metainfo/metainfo.cpp
@@ -56,7 +56,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-MetaInfoProtocol::MetaInfoProtocol(const QCString &pool, const QCString &app)
+MetaInfoProtocol::MetaInfoProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("metainfo", pool, app)
{
}
@@ -67,11 +67,11 @@ MetaInfoProtocol::~MetaInfoProtocol()
void MetaInfoProtocol::get(const KURL &url)
{
- QString mimeType = metaData("mimeType");
+ TQString mimeType = metaData("mimeType");
KFileMetaInfo info(url.path(), mimeType);
- QByteArray arr;
- QDataStream stream(arr, IO_WriteOnly);
+ TQByteArray arr;
+ TQDataStream stream(arr, IO_WriteOnly);
stream << info;
@@ -81,12 +81,12 @@ void MetaInfoProtocol::get(const KURL &url)
void MetaInfoProtocol::put(const KURL& url, int, bool, bool)
{
- QString mimeType = metaData("mimeType");
+ TQString mimeType = metaData("mimeType");
KFileMetaInfo info;
- QByteArray arr;
+ TQByteArray arr;
readData(arr);
- QDataStream stream(arr, IO_ReadOnly);
+ TQDataStream stream(arr, IO_ReadOnly);
stream >> info;
diff --git a/kioslave/metainfo/metainfo.h b/kioslave/metainfo/metainfo.h
index de2a6b055..491da62eb 100644
--- a/kioslave/metainfo/metainfo.h
+++ b/kioslave/metainfo/metainfo.h
@@ -26,7 +26,7 @@
class MetaInfoProtocol : public KIO::SlaveBase
{
public:
- MetaInfoProtocol(const QCString &pool, const QCString &app);
+ MetaInfoProtocol(const TQCString &pool, const TQCString &app);
virtual ~MetaInfoProtocol();
virtual void get(const KURL &url);
diff --git a/kjs/identifier.h b/kjs/identifier.h
index 5867077d8..e479547f6 100644
--- a/kjs/identifier.h
+++ b/kjs/identifier.h
@@ -52,9 +52,9 @@ namespace KJS {
const UString &ustring() const { return _ustring; }
DOM::DOMString string() const;
/**
- * returns a QString of the identifier
+ * returns a TQString of the identifier
*/
- QString qstring() const;
+ TQString qstring() const;
/**
* returns a UChar pointer to the string of the identifier with a size defined by @ref size().
diff --git a/kjs/ustring.h b/kjs/ustring.h
index 34ab975e3..09fb0231d 100644
--- a/kjs/ustring.h
+++ b/kjs/ustring.h
@@ -24,7 +24,7 @@
#ifndef _KJS_USTRING_H_
#define _KJS_USTRING_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "global.h"
/**
@@ -46,7 +46,7 @@ namespace KJS {
* @short Unicode character.
*
* UChar represents a 16 bit Unicode character. It's internal data
- * representation is compatible to XChar2b and QChar. It's therefore
+ * representation is compatible to XChar2b and TQChar. It's therefore
* possible to exchange data with X and Qt with shallow copies.
*/
struct KJS_EXPORT UChar {
@@ -257,14 +257,14 @@ namespace KJS {
UString(const UString &s) { attach(s.rep); }
/**
* Convenience declaration only ! You'll be on your own to write the
- * implementation for a construction from QString.
+ * implementation for a construction from TQString.
*
* Note: feel free to contact me if you want to see a dummy header for
* your favorite FooString class here !
*/
- UString(const QString &);
+ UString(const TQString &);
/**
- * Convenience declaration only ! See UString(const QString&).
+ * Convenience declaration only ! See UString(const TQString&).
*/
UString(const DOM::DOMString &);
/**
@@ -312,17 +312,17 @@ namespace KJS {
*/
char *ascii() const;
/**
- * @see UString(const QString&).
+ * @see UString(const TQString&).
*/
DOM::DOMString string() const;
/**
- * @see UString(const QString&).
+ * @see UString(const TQString&).
*/
- QString qstring() const;
+ TQString qstring() const;
/**
- * @see UString(const QString&).
+ * @see UString(const TQString&).
*/
- QConstString qconststring() const;
+ TQConstString qconststring() const;
/**
* Assignment operator.
diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp
index f1012d3dd..3455fe1e8 100644
--- a/kmdi/kmdi/dockcontainer.cpp
+++ b/kmdi/kmdi/dockcontainer.cpp
@@ -24,10 +24,10 @@
#include "kdockwidget_private.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kmultitabbar.h>
#include <kglobalsettings.h>
@@ -52,8 +52,8 @@ namespace KMDI
{
-DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int flags)
-: QWidget(parent),KDockContainer()
+DockContainer::DockContainer(TQWidget *parent, TQWidget *win, int position, int flags)
+: TQWidget(parent),KDockContainer()
{
m_tabSwitching = false;
m_block=false;
@@ -68,13 +68,13 @@ DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int fl
m_startEvent=0;
kdDebug(760)<<"DockContainer created"<<endl;
- QBoxLayout *l;
+ TQBoxLayout *l;
m_vertical=!((position==KDockWidget::DockTop) || (position==KDockWidget::DockBottom));
if (!m_vertical)
- l=new QVBoxLayout(this);
+ l=new TQVBoxLayout(this);
else
- l=new QHBoxLayout(this);
+ l=new TQHBoxLayout(this);
l->setAutoAdd(false);
@@ -88,9 +88,9 @@ DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int fl
(position==KDockWidget::DockBottom)?KMultiTabBar::Bottom:
(position==KDockWidget::DockTop)?KMultiTabBar::Top:KMultiTabBar::Right);
- m_ws=new QWidgetStack(this);
+ m_ws=new TQWidgetStack(this);
- m_ws->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
+ m_ws->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding));
if ( (position==KDockWidget::DockLeft) || (position==KDockWidget::DockTop))
{
@@ -114,7 +114,7 @@ void DockContainer::setStyle(int style) {
DockContainer::~DockContainer()
{
- QMap<KDockWidget*,int>::iterator it;
+ TQMap<KDockWidget*,int>::iterator it;
while (m_map.count()) {
it = m_map.begin();
KDockWidget *w=it.key();
@@ -160,7 +160,7 @@ KDockWidget *DockContainer::parentDockWidget()
return ((KDockWidget*)parent());
}
-void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QString &text, int &)
+void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int &)
{
KDockWidget* w = (KDockWidget*) dwdg;
int tab;
@@ -193,7 +193,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
- QToolTip::add( btn, i18n("Switch between overlap and side by side mode", "Overlap") );
+ TQToolTip::add( btn, i18n("Switch between overlap and side by side mode", "Overlap") );
btn->setToggleButton( true );
btn->setPixmap( const_cast< const char** >(kmdi_not_close_xpm) );
@@ -201,7 +201,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
m_overlapButtons.insert(w,btn);
btn->setOn(!isOverlapMode());
- connect(btn,SIGNAL(clicked()),this,SLOT(changeOverlapMode()));
+ connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(changeOverlapMode()));
}
m_tb->appendTab(pixmap.isNull()?SmallIcon("misc"):pixmap,tab,w->tabPageLabel());
@@ -210,7 +210,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
//FB m_tb->setTab(tab,true);
- connect(m_tb->tab(tab),SIGNAL(clicked(int)),this,SLOT(tabClicked(int)));
+ connect(m_tb->tab(tab),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int)));
kdDebug(760)<<"DockContainer::insertWidget()"<<endl;
@@ -232,11 +232,11 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
}
-bool DockContainer::eventFilter( QObject *obj, QEvent *event )
+bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
{
if (obj==m_tb) {
- if ( (event->type()==QEvent::Resize) && (m_ws->isHidden()) ) {
- QSize size=((QResizeEvent*)event)->size();
+ if ( (event->type()==TQEvent::Resize) && (m_ws->isHidden()) ) {
+ TQSize size=((TQResizeEvent*)event)->size();
if (m_vertical)
parentDockWidget()->setForcedFixedWidth(size.width());
else
@@ -245,7 +245,7 @@ bool DockContainer::eventFilter( QObject *obj, QEvent *event )
}
else
switch ( event->type() ){
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
KDockWidget * w=m_revMap[dynamic_cast<KMultiTabBarTab*>(obj)->id()];
if (!w) {
@@ -266,20 +266,20 @@ bool DockContainer::eventFilter( QObject *obj, QEvent *event )
m_dragPanel=hdr->dragPanel();
if (m_dragPanel) m_movingState=WaitingForMoveStart;
delete m_startEvent;
- m_startEvent=new QMouseEvent(* ((QMouseEvent*)event));
+ m_startEvent=new TQMouseEvent(* ((TQMouseEvent*)event));
}
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if (m_movingState==Moving) {
m_movingState=NotMoving;
- QApplication::postEvent(m_dragPanel,new QMouseEvent(* ( (QMouseEvent*)event)));
+ TQApplication::postEvent(m_dragPanel,new TQMouseEvent(* ( (TQMouseEvent*)event)));
delete m_startEvent;
m_startEvent=0;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if (m_movingState==WaitingForMoveStart) {
- QPoint p( ((QMouseEvent*)event)->pos() - m_startEvent->pos() );
+ TQPoint p( ((TQMouseEvent*)event)->pos() - m_startEvent->pos() );
if( p.manhattanLength() > KGlobalSettings::dndEventDelay()) {
m_dockManager->eventFilter(m_dragPanel,m_startEvent);
m_dockManager->eventFilter(m_dragPanel,event);
@@ -329,7 +329,7 @@ void DockContainer::changeOverlapMode()
deactivateOverlapMode();
}
- for (QMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
+ for (TQMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
it!=m_overlapButtons.end();++it)
it.data()->setOn(!isOverlapMode());
}
@@ -449,12 +449,12 @@ void DockContainer::tabClicked(int t)
m_tabSwitching=false;
}
-void DockContainer::setToolTip (KDockWidget *, QString &s)
+void DockContainer::setToolTip (KDockWidget *, TQString &s)
{
kdDebug(760)<<"***********************************Setting tooltip for a widget: "<<s<<endl;
}
-void DockContainer::setPixmap(KDockWidget* widget ,const QPixmap& pixmap)
+void DockContainer::setPixmap(KDockWidget* widget ,const TQPixmap& pixmap)
{
int id=m_ws->id(widget);
if (id==-1) return;
@@ -462,12 +462,12 @@ void DockContainer::setPixmap(KDockWidget* widget ,const QPixmap& pixmap)
tab->setIcon(pixmap.isNull()?SmallIcon("misc"):pixmap);
}
-void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
+void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
{
// group name
- QString grp=cfg->group();
- cfg->deleteGroup(group_or_prefix+QString("::%1").arg(parent()->name()));
- cfg->setGroup(group_or_prefix+QString("::%1").arg(parent()->name()));
+ TQString grp=cfg->group();
+ cfg->deleteGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
+ cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
// save overlap mode
cfg->writeEntry("overlapMode",isOverlapMode());
@@ -481,21 +481,21 @@ void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it(*tl);
- QStringList::Iterator it2=itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it(*tl);
+ TQStringList::Iterator it2=itemNames.begin();
int i=0;
for (;it.current()!=0;++it,++it2)
{
-// cfg->writeEntry(QString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
- cfg->writeEntry(QString("widget%1").arg(i),(*it2));
- QString s=tabCaptions[*it2];
+// cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
+ cfg->writeEntry(TQString("widget%1").arg(i),(*it2));
+ TQString s=tabCaptions[*it2];
if (!s.isEmpty()) {
- cfg->writeEntry(QString("widget%1-tabCaption").arg(i),s);
+ cfg->writeEntry(TQString("widget%1-tabCaption").arg(i),s);
}
s=tabTooltips[*it2];
if (!s.isEmpty()) {
- cfg->writeEntry(QString("widget%1-tabTooltip").arg(i),s);
+ cfg->writeEntry(TQString("widget%1-tabTooltip").arg(i),s);
}
// kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl;
if (m_tb->isTabRaised(it.current()->id()))
@@ -506,10 +506,10 @@ void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
cfg->setGroup(grp);
}
-void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
+void DockContainer::load(KConfig* cfg,const TQString& group_or_prefix)
{
- QString grp=cfg->group();
- cfg->setGroup(group_or_prefix+QString("::%1").arg(parent()->name()));
+ TQString grp=cfg->group();
+ cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
if (cfg->readBoolEntry("overlapMode"))
activateOverlapMode( m_vertical?m_tb->width():m_tb->height() );
@@ -519,20 +519,20 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
m_separatorPos = cfg->readNumEntry( "separatorPosition", 18000 ); // = 18%
int i=0;
- QString raise;
+ TQString raise;
while (true)
{
- QString dwn=cfg->readEntry(QString("widget%1").arg(i));
+ TQString dwn=cfg->readEntry(TQString("widget%1").arg(i));
if (dwn.isEmpty()) break;
kdDebug(760)<<"*************************************************************Configuring dockwidget :"<<dwn<<endl;
KDockWidget *dw=((KDockWidget*)parent())->dockManager()->getDockWidgetFromName(dwn);
if (dw)
{
- QString s=cfg->readEntry(QString("widget%1-tabCaption").arg(i));
+ TQString s=cfg->readEntry(TQString("widget%1-tabCaption").arg(i));
if (!s.isEmpty()) {
dw->setTabPageLabel(s);
}
- s=cfg->readEntry(QString("widget%1-tabTooltip").arg(i));
+ s=cfg->readEntry(TQString("widget%1-tabTooltip").arg(i));
if (!s.isEmpty()) {
dw->setToolTipString(s);
}
@@ -543,8 +543,8 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
}
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1(*tl);
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1(*tl);
m_ws->hide();
if (m_vertical)
parentDockWidget()->setForcedFixedWidth(m_tb->width());
@@ -557,13 +557,13 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
kapp->syncX();
m_delayedRaise=-1;
- for (QMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
+ for (TQMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
it!=m_overlapButtons.end();++it)
it.data()->setOn(!isOverlapMode());
if (!raise.isEmpty())
{
- for (QMap<KDockWidget*,int>::iterator it=m_map.begin();it!=m_map.end();++it)
+ for (TQMap<KDockWidget*,int>::iterator it=m_map.begin();it!=m_map.end();++it)
{
if (it.key()->name()==raise)
{
@@ -575,14 +575,14 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
kapp->syncX();*/
m_delayedRaise=it.data();
- QTimer::singleShot(0,this,SLOT(delayedRaise()));
+ TQTimer::singleShot(0,this,TQT_SLOT(delayedRaise()));
kdDebug(760)<<"************** raising *******: "<<it.key()->name()<<endl;
break;
}
}
}
- if (m_delayedRaise==-1) QTimer::singleShot(0,this,SLOT(init()));
+ if (m_delayedRaise==-1) TQTimer::singleShot(0,this,TQT_SLOT(init()));
cfg->setGroup(grp);
}
@@ -597,8 +597,8 @@ void DockContainer::collapseOverlapped()
{
if (m_tabSwitching) return;
if (isOverlapMode()){
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it(*tl);
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it(*tl);
for(;it.current();++it) {
if (it.current()->isOn()) {
kdDebug(760)<<"Lowering TAB"<<endl;
@@ -630,7 +630,7 @@ void DockContainer::toggle() {
}
void DockContainer::prevToolView() {
- QPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
int pos=tabs->findRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos--;
@@ -642,7 +642,7 @@ void DockContainer::prevToolView() {
}
void DockContainer::nextToolView() {
- QPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
int pos=tabs->findRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos++;
diff --git a/kmdi/kmdi/dockcontainer.h b/kmdi/kmdi/dockcontainer.h
index d301d3c53..74b93968b 100644
--- a/kmdi/kmdi/dockcontainer.h
+++ b/kmdi/kmdi/dockcontainer.h
@@ -20,14 +20,14 @@
#ifndef _KMDI_DOCK_CONTAINER_
#define _KMDI_DOCK_CONTAINER_
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdockwidget.h>
-#include <qmap.h>
+#include <tqmap.h>
# include <kdockwidget_p.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QWidgetStack;
class KMultiTabBar;
@@ -36,12 +36,12 @@ class KDockButton_Private;
namespace KMDI
{
-class DockContainer: public QWidget, public KDockContainer
+class DockContainer: public TQWidget, public KDockContainer
{
Q_OBJECT
public:
- DockContainer(QWidget *parent, QWidget *win, int position, int flags);
+ DockContainer(TQWidget *parent, TQWidget *win, int position, int flags);
virtual ~DockContainer();
/** Get the KDockWidget that is our parent */
@@ -52,7 +52,7 @@ class DockContainer: public QWidget, public KDockContainer
* \param w the KDockWidget object to add
* \todo Remove the extra parameters that we don't use?
*/
- virtual void insertWidget (KDockWidget *w, QPixmap, const QString &, int &);
+ virtual void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &);
/**
* Show a KDockWidget in our DockContainer
@@ -66,14 +66,14 @@ class DockContainer: public QWidget, public KDockContainer
* \todo Actually implement it? Right now, it looks just it
* does exactly nothing
*/
- virtual void setToolTip (KDockWidget *, QString &);
+ virtual void setToolTip (KDockWidget *, TQString &);
/**
* Set a pixmap for one of our dock widgets
* \param widget the KDockWidget to set the pixmap for
* \param pixmap the pixmap you want to give the widget
*/
- virtual void setPixmap(KDockWidget* widget, const QPixmap& pixmap);
+ virtual void setPixmap(KDockWidget* widget, const TQPixmap& pixmap);
/**
* Undock a widget from the container. This function is called
@@ -91,12 +91,12 @@ class DockContainer: public QWidget, public KDockContainer
void hideIfNeeded();
- virtual void save(KConfig *,const QString& group_or_prefix);
- virtual void load(KConfig *,const QString& group_or_prefix);
+ virtual void save(KConfig *,const TQString& group_or_prefix);
+ virtual void load(KConfig *,const TQString& group_or_prefix);
void setStyle(int);
protected:
- bool eventFilter(QObject*,QEvent*);
+ bool eventFilter(TQObject*,TQEvent*);
public slots:
void init();
@@ -109,28 +109,28 @@ class DockContainer: public QWidget, public KDockContainer
void delayedRaise();
void changeOverlapMode();
private:
- QWidget *m_mainWin;
- QWidgetStack *m_ws;
+ TQWidget *m_mainWin;
+ TQWidgetStack *m_ws;
KMultiTabBar *m_tb;
int mTabCnt;
int oldtab;
int m_previousTab;
int m_position;
int m_separatorPos;
- QMap<KDockWidget*,int> m_map;
- QMap<int,KDockWidget*> m_revMap;
- QMap<KDockWidget*,KDockButton_Private*> m_overlapButtons;
- QStringList itemNames;
- QMap<QString,QString> tabCaptions;
- QMap<QString,QString> tabTooltips;
+ TQMap<KDockWidget*,int> m_map;
+ TQMap<int,KDockWidget*> m_revMap;
+ TQMap<KDockWidget*,KDockButton_Private*> m_overlapButtons;
+ TQStringList itemNames;
+ TQMap<TQString,TQString> tabCaptions;
+ TQMap<TQString,TQString> tabTooltips;
int m_inserted;
int m_delayedRaise;
bool m_vertical;
bool m_block;
bool m_tabSwitching;
- QObject *m_dragPanel;
+ TQObject *m_dragPanel;
KDockManager *m_dockManager;
- QMouseEvent *m_startEvent;
+ TQMouseEvent *m_startEvent;
enum MovingState {NotMoving=0,WaitingForMoveStart,MovingInternal,Moving} m_movingState;
signals:
void activated(DockContainer*);
diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp
index 7e146b836..882916f30 100644
--- a/kmdi/kmdi/guiclient.cpp
+++ b/kmdi/kmdi/guiclient.cpp
@@ -21,13 +21,13 @@
#include "guiclient.h"
#include "guiclient.moc"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <ktoolbar.h>
#include <klocale.h>
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kdockwidget.h>
@@ -52,13 +52,13 @@ namespace KMDIPrivate
{
GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
- : QObject ( mdiMainFrm,name )
+ : TQObject ( mdiMainFrm,name )
, KXMLGUIClient ( mdiMainFrm )
{
m_mdiMainFrm=mdiMainFrm;
- connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( mdiMainFrm->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -68,7 +68,7 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
if ( domDocument().documentElement().isNull() )
{
- QString completeDescription = QString::fromLatin1( guiDescription ).arg( actionListName );
+ TQString completeDescription = TQString::fromLatin1( guiDescription ).arg( actionListName );
setXML( completeDescription, false /*merge*/ );
}
@@ -79,18 +79,18 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
m_toolMenu=new KActionMenu(i18n("Tool &Views"),actionCollection(),"kmdi_toolview_menu");
m_gotoToolDockMenu=new KActionMenu(i18n("Tool &Docks"),actionCollection(),"kmdi_tooldock_menu");
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,SIGNAL(toggleTop()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()),
actionCollection(),"kmdi_activate_top"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,SIGNAL(toggleLeft()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()),
actionCollection(),"kmdi_activate_left"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,SIGNAL(toggleRight()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()),
actionCollection(),"kmdi_activate_right"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,SIGNAL(toggleBottom()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()),
actionCollection(),"kmdi_activate_bottom"));
m_gotoToolDockMenu->insert(new KActionSeparator(actionCollection(),"kmdi_goto_menu_separator"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,m_mdiMainFrm,SLOT(prevToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,m_mdiMainFrm,TQT_SLOT(prevToolViewInDock()),
actionCollection(),"kmdi_prev_toolview"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,m_mdiMainFrm,SLOT(nextToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,m_mdiMainFrm,TQT_SLOT(nextToolViewInDock()),
actionCollection(),"kmdi_next_toolview"));
actionCollection()->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -115,7 +115,7 @@ void GUIClient::setupActions()
unplugActionList( actionListName );
- QPtrList<KAction> addList;
+ TQPtrList<KAction> addList;
if (m_toolViewActions.count()<3)
{
for (uint i=0;i<m_toolViewActions.count();i++)
@@ -135,23 +135,23 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
{
kdDebug(760)<<"*****void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)*****"<<endl;
- QString aname = QString("kmdi_toolview_") + mtva->wrappedWidget()->name();
+ TQString aname = TQString("kmdi_toolview_") + mtva->wrappedWidget()->name();
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
- QString _grp = cfg->group();
+ TQString _grp = cfg->group();
cfg->setGroup("Shortcuts");
sc = KShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp );
KAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()),
- /*QString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
+ /*TQString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
m_mdiMainFrm,actionCollection(), aname.latin1() );
((ToggleToolViewAction*)a)->setCheckedState(i18n("Hide %1").arg(mtva->wrappedWidget()->caption()));
- connect(a,SIGNAL(destroyed(QObject*)),this,SLOT(actionDeleted(QObject*)));
+ connect(a,TQT_SIGNAL(destroyed(TQObject*)),this,TQT_SLOT(actionDeleted(TQObject*)));
m_toolViewActions.append(a);
m_toolMenu->insert(a);
@@ -160,7 +160,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
setupActions();
}
-void GUIClient::actionDeleted(QObject* a)
+void GUIClient::actionDeleted(TQObject* a)
{
m_toolViewActions.remove(static_cast<KAction*>(a));
setupActions();
@@ -173,17 +173,17 @@ void GUIClient::clientAdded( KXMLGUIClient *client )
setupActions();
}
-ToggleToolViewAction::ToggleToolViewAction ( const QString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm,
- QObject* parent, const char* name )
+ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm,
+ TQObject* parent, const char* name )
: KToggleAction(text,cut,parent,name)
, m_dw(dw)
, m_mdiMainFrm(mdiMainFrm)
{
if (m_dw)
{
- connect(this,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
- connect(m_dw->dockManager(),SIGNAL(change()),this,SLOT(anDWChanged()));
- connect(m_dw,SIGNAL(destroyed()),this,SLOT(slotWidgetDestroyed()));
+ connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
+ connect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged()));
+ connect(m_dw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotWidgetDestroyed()));
setChecked(m_dw->mayBeHide());
}
@@ -218,8 +218,8 @@ void ToggleToolViewAction::slotToggled(bool t)
void ToggleToolViewAction::slotWidgetDestroyed()
{
- disconnect(m_dw->dockManager(),SIGNAL(change()),this,SLOT(anDWChanged()));
- disconnect(this,SIGNAL(toggled(bool)),0,0);
+ disconnect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged()));
+ disconnect(this,TQT_SIGNAL(toggled(bool)),0,0);
unplugAll();
deleteLater();
diff --git a/kmdi/kmdi/guiclient.h b/kmdi/kmdi/guiclient.h
index 04dd2fbd2..c3784fe6e 100644
--- a/kmdi/kmdi/guiclient.h
+++ b/kmdi/kmdi/guiclient.h
@@ -21,8 +21,8 @@
#ifndef _KMDI_GUICLIENT_H_
#define _KMDI_GUICLIENT_H_
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
#include <kaction.h>
@@ -42,7 +42,7 @@ namespace KMDIPrivate {
class GUIClientPrivate;
-class GUIClient : public QObject, public KXMLGUIClient
+class GUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
@@ -55,7 +55,7 @@ class GUIClient : public QObject, public KXMLGUIClient
private slots:
void clientAdded( KXMLGUIClient *client );
void setupActions();
- void actionDeleted(QObject*);
+ void actionDeleted(TQObject*);
signals:
void toggleTop();
@@ -66,9 +66,9 @@ class GUIClient : public QObject, public KXMLGUIClient
private:
GUIClientPrivate *d;
- QGuardedPtr<KMDI::MainWindow> m_mdiMainFrm;
- QPtrList<KAction> m_toolViewActions;
- QPtrList<KAction> m_documentViewActions;
+ TQGuardedPtr<KMDI::MainWindow> m_mdiMainFrm;
+ TQPtrList<KAction> m_toolViewActions;
+ TQPtrList<KAction> m_documentViewActions;
KActionMenu *m_docMenu;
KActionMenu *m_toolMenu;
@@ -81,8 +81,8 @@ class ToggleToolViewAction:public KToggleAction
Q_OBJECT
public:
- ToggleToolViewAction ( const QString& text, const KShortcut& cut = KShortcut(),
- KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, QObject* parent = 0, const char* name = 0 );
+ ToggleToolViewAction ( const TQString& text, const KShortcut& cut = KShortcut(),
+ KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, TQObject* parent = 0, const char* name = 0 );
virtual ~ToggleToolViewAction();
diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp
index 048086178..d6e332780 100644
--- a/kmdi/kmdi/mainwindow.cpp
+++ b/kmdi/kmdi/mainwindow.cpp
@@ -45,17 +45,17 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kmenubar.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -63,11 +63,11 @@
#include "mainwindow.moc"
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include "mainwindow.h"
#include "dockcontainer.h"
@@ -97,9 +97,9 @@ namespace KMDI
{
//============ constructor ============//
-MainWindow::MainWindow(QWidget* parentWidget, const char* name)
+MainWindow::MainWindow(TQWidget* parentWidget, const char* name)
: KParts::DockMainWindow( parentWidget, name)
- , m_toolViews (new QMap<QWidget*,KMDI::ToolViewAccessor*>)
+ , m_toolViews (new TQMap<TQWidget*,KMDI::ToolViewAccessor*>)
, d(new KMDIPrivate::MainWindowPrivate())
{
// setup main dock stuff
@@ -125,7 +125,7 @@ MainWindow::~MainWindow()
void MainWindow::setupMainDock ()
{
// cover KMdi's childarea by a dockwidget
- KDockWidget *dw = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover");
+ KDockWidget *dw = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover");
dw->setDockWindowTransient(this,true);
dw->setEnableDocking(KDockWidget::DockNone);
dw->setDockSite(KDockWidget::DockCorner);
@@ -139,7 +139,7 @@ void MainWindow::setupMainDock ()
setMainDockWidget(dw);
// connect signals to collapse sidebars
- connect(m_tabWidget,SIGNAL(focusInEvent()),this,SIGNAL(collapseOverlapContainers()));
+ connect(m_tabWidget,TQT_SIGNAL(focusInEvent()),this,TQT_SIGNAL(collapseOverlapContainers()));
}
void MainWindow::setupToolViews ()
@@ -156,10 +156,10 @@ void MainWindow::setupToolViews ()
w=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
}
- QPtrList<KDockWidget> leftReparentWidgets;
- QPtrList<KDockWidget> rightReparentWidgets;
- QPtrList<KDockWidget> bottomReparentWidgets;
- QPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftReparentWidgets;
+ TQPtrList<KDockWidget> rightReparentWidgets;
+ TQPtrList<KDockWidget> bottomReparentWidgets;
+ TQPtrList<KDockWidget> topReparentWidgets;
if (mainDock->parentDockTabGroup()) {
mainDock=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
@@ -180,40 +180,40 @@ void MainWindow::setupToolViews ()
m_leftContainer->manualDock(mainDock, KDockWidget::DockLeft,20);
tmpDC->init();
- connect (this,SIGNAL(toggleLeft()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleLeft()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_rightContainer->setWidget(tmpDC=new DockContainer(m_rightContainer, this, KDockWidget::DockRight, d->m_styleIDEAlMode));
m_rightContainer->setEnableDocking(KDockWidget::DockRight);
m_rightContainer->manualDock(mainDock, KDockWidget::DockRight,80);
tmpDC->init();
- connect (this,SIGNAL(toggleRight()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleRight()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_topContainer->setWidget(tmpDC=new DockContainer(m_topContainer, this, KDockWidget::DockTop, d->m_styleIDEAlMode));
m_topContainer->setEnableDocking(KDockWidget::DockTop);
m_topContainer->manualDock(mainDock, KDockWidget::DockTop,20);
tmpDC->init();
- connect (this,SIGNAL(toggleTop()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleTop()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_bottomContainer->setWidget(tmpDC=new DockContainer(m_bottomContainer, this, KDockWidget::DockBottom, d->m_styleIDEAlMode));
m_bottomContainer->setEnableDocking(KDockWidget::DockBottom);
m_bottomContainer->manualDock(mainDock, KDockWidget::DockBottom,80);
tmpDC->init();
- connect (this,SIGNAL(toggleBottom()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleBottom()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_leftContainer->setDockSite( KDockWidget::DockCenter );
m_rightContainer->setDockSite( KDockWidget::DockCenter );
@@ -240,10 +240,10 @@ void MainWindow::setupGUIClient ()
{
m_guiClient = new KMDIPrivate::GUIClient (this);
- connect(m_guiClient,SIGNAL(toggleTop()),this,SIGNAL(toggleTop()));
- connect(m_guiClient,SIGNAL(toggleLeft()),this,SIGNAL(toggleLeft()));
- connect(m_guiClient,SIGNAL(toggleRight()),this,SIGNAL(toggleRight()));
- connect(m_guiClient,SIGNAL(toggleBottom()),this,SIGNAL(toggleBottom()));
+ connect(m_guiClient,TQT_SIGNAL(toggleTop()),this,TQT_SIGNAL(toggleTop()));
+ connect(m_guiClient,TQT_SIGNAL(toggleLeft()),this,TQT_SIGNAL(toggleLeft()));
+ connect(m_guiClient,TQT_SIGNAL(toggleRight()),this,TQT_SIGNAL(toggleRight()));
+ connect(m_guiClient,TQT_SIGNAL(toggleBottom()),this,TQT_SIGNAL(toggleBottom()));
}
TabWidget *MainWindow::tabWidget ()
@@ -256,9 +256,9 @@ ToolViewAccessor *MainWindow::createToolWindow()
return new KMDI::ToolViewAccessor(this);
}
-KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd, int percent, const QString& tabToolTip, const QString& tabCaption)
+KMDI::ToolViewAccessor *MainWindow::addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos, TQWidget* pTargetWnd, int percent, const TQString& tabToolTip, const TQString& tabCaption)
{
- QWidget *tvta=pWnd;
+ TQWidget *tvta=pWnd;
KDockWidget* pDW = dockManager->getDockWidgetFromName(pWnd->name());
if (pDW) {
// probably readDockConfig already created the widgetContainer, use that
@@ -273,7 +273,7 @@ KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::D
pWnd=pDW;
}
- QRect r=pWnd->geometry();
+ TQRect r=pWnd->geometry();
KMDI::ToolViewAccessor *mtva=new KMDI::ToolViewAccessor(this,pWnd,tabToolTip,(tabCaption==0)?pWnd->caption():tabCaption);
m_toolViews->insert(tvta,mtva);
@@ -282,7 +282,7 @@ KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::D
mtva->d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
mtva->d->widgetContainer->reparent(this, Qt::WType_TopLevel | Qt::WType_Dialog, r.topLeft(), isVisible());
} else { // add (and dock) the toolview as DockWidget view
- //const QPixmap& wndIcon = pWnd->icon() ? *(pWnd->icon()) : QPixmap();
+ //const TQPixmap& wndIcon = pWnd->icon() ? *(pWnd->icon()) : TQPixmap();
//KDockWidget *pCover=mtva->d->widgetContainer;
@@ -297,7 +297,7 @@ void MainWindow::deleteToolWindow( KMDI::ToolViewAccessor *accessor)
delete accessor;
}
-void MainWindow::deleteToolWindow( QWidget* pWnd)
+void MainWindow::deleteToolWindow( TQWidget* pWnd)
{
if (!pWnd)
return;
@@ -325,7 +325,7 @@ void MainWindow::setToolViewStyle(int flag)
d->m_toolviewStyle = flag;
bool toolviewExists = false;
- QMap<QWidget*,KMDI::ToolViewAccessor*>::Iterator it;
+ TQMap<TQWidget*,KMDI::ToolViewAccessor*>::Iterator it;
for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) {
KDockWidget *dockWidget = dynamic_cast<KDockWidget*>(it.data()->wrapperWidget());
if (dockWidget) {
@@ -362,7 +362,7 @@ void MainWindow::setToolViewStyle(int flag)
}
}
-void MainWindow::dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container) {
+void MainWindow::dockToolViewsIntoContainers(TQPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container) {
for ( KDockWidget *dw = widgetsToReparent.first(); dw;
dw=widgetsToReparent.next()){
dw->manualDock(container,KDockWidget::DockCenter,20);
@@ -370,7 +370,7 @@ void MainWindow::dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToRep
}
}
-void MainWindow::findToolViewsDockedToMain(QPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) {
+void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) {
KDockWidget *mainDock=getMainDockWidget();
if (mainDock->parentDockTabGroup()) {
mainDock=dynamic_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
diff --git a/kmdi/kmdi/mainwindow.h b/kmdi/kmdi/mainwindow.h
index 391ce8df9..a64cca43d 100644
--- a/kmdi/kmdi/mainwindow.h
+++ b/kmdi/kmdi/mainwindow.h
@@ -46,10 +46,10 @@
#include <kmenubar.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqguardedptr.h>
#include <kmdi/global.h>
@@ -79,7 +79,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
/**
* Constructor.
*/
- MainWindow ( QWidget* parentWidget, const char* name = "");
+ MainWindow ( TQWidget* parentWidget, const char* name = "");
/**
* Destructor.
@@ -113,7 +113,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
* @param tabCaption
* @return created toolview
*/
- KMDI::ToolViewAccessor *addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ KMDI::ToolViewAccessor *addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
/**
* delete the toolview belonging to the given accessor
@@ -125,7 +125,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
* delete the toolview belonging to the given pWnd
* @param pWnd toolview to be deleted
*/
- void deleteToolWindow( QWidget* pWnd);
+ void deleteToolWindow( TQWidget* pWnd);
/**
* Sets the appearance of the toolview tabs.
@@ -141,8 +141,8 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
void collapseOverlapContainers();
protected:
- void findToolViewsDockedToMain(QPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw);
- void dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container);
+ void findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw);
+ void dockToolViewsIntoContainers(TQPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container);
private:
/**
@@ -176,7 +176,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
protected:
KMDIPrivate::GUIClient *m_guiClient;
- QMap <QWidget*, KMDI::ToolViewAccessor*> *m_toolViews;
+ TQMap <TQWidget*, KMDI::ToolViewAccessor*> *m_toolViews;
KDockWidget *m_leftContainer;
KDockWidget *m_rightContainer;
diff --git a/kmdi/kmdi/tabwidget.cpp b/kmdi/kmdi/tabwidget.cpp
index 5d18e3769..0d21bd2ea 100644
--- a/kmdi/kmdi/tabwidget.cpp
+++ b/kmdi/kmdi/tabwidget.cpp
@@ -43,7 +43,7 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include "tabwidget.h"
#include "tabwidget.moc"
@@ -59,7 +59,7 @@ namespace KMDIPrivate
namespace KMDI
{
-TabWidget::TabWidget(QWidget* parent, const char* name)
+TabWidget::TabWidget(TQWidget* parent, const char* name)
: KTabWidget(parent,name)
, m_visibility (KMDI::ShowWhenMoreThanOneTab)
, d (new KMDIPrivate::TabWidgetPrivate())
@@ -70,7 +70,7 @@ TabWidget::TabWidget(QWidget* parent, const char* name)
setHoverCloseButton(true);
- connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*)));
+ connect(this, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*)));
}
TabWidget::~TabWidget()
@@ -79,50 +79,50 @@ TabWidget::~TabWidget()
d = 0;
}
-bool TabWidget::eventFilter(QObject *obj, QEvent *e )
+bool TabWidget::eventFilter(TQObject *obj, TQEvent *e )
{
- if(e->type() == QEvent::FocusIn)
+ if(e->type() == TQEvent::FocusIn)
{
emit focusInEvent ();
}
- else if (e->type() == QEvent::ChildRemoved)
+ else if (e->type() == TQEvent::ChildRemoved)
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject* pLostChild = ((QChildEvent*)e)->child();
+ TQObject* pLostChild = ((TQChildEvent*)e)->child();
if ((pLostChild != 0L) && (pLostChild->isWidgetType())) {
- QObjectList *list = pLostChild->queryList( "QWidget" );
+ TQObjectList *list = pLostChild->queryList( "TQWidget" );
list->insert(0, pLostChild); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * o;
while ( (o=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)o;
+ TQWidget* widg = (TQWidget*)o;
++it;
widg->removeEventFilter(this);
}
delete list; // delete the list, not the objects
}
}
- else if (e->type() == QEvent::ChildInserted)
+ else if (e->type() == TQEvent::ChildInserted)
{
// if we got a new child and we are attached to the MDI system we
// install ourself as event filter for the new child and its children
// (as we did when we were added to the MDI system).
- QObject* pNewChild = ((QChildEvent*)e)->child();
+ TQObject* pNewChild = ((TQChildEvent*)e)->child();
if ((pNewChild != 0L) && (pNewChild->isWidgetType()))
{
- QWidget* pNewWidget = (QWidget*)pNewChild;
+ TQWidget* pNewWidget = (TQWidget*)pNewChild;
if (pNewWidget->testWFlags(Qt::WType_Dialog | Qt::WShowModal))
return false;
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert(0, pNewChild); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * o;
while ( (o=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)o;
+ TQWidget* widg = (TQWidget*)o;
++it;
widg->installEventFilter(this);
- connect(widg, SIGNAL(destroyed()), this, SLOT(childDestroyed()));
+ connect(widg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(childDestroyed()));
}
delete list; // delete the list, not the objects
}
@@ -135,15 +135,15 @@ void TabWidget::childDestroyed()
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const QObject* pLostChild = QObject::sender();
+ const TQObject* pLostChild = TQObject::sender();
if ((pLostChild != 0L) && (pLostChild->isWidgetType()))
{
- QObjectList *list = ((QObject*)(pLostChild))->queryList("QWidget");
+ TQObjectList *list = ((TQObject*)(pLostChild))->queryList("TQWidget");
list->insert(0, pLostChild); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * obj;
while ( (obj=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
++it;
widg->removeEventFilter(this);
}
@@ -151,33 +151,33 @@ void TabWidget::childDestroyed()
}
}
-void TabWidget::closeTab(QWidget* w)
+void TabWidget::closeTab(TQWidget* w)
{
w->close();
}
-void TabWidget::addTab ( QWidget * child, const QString & label )
+void TabWidget::addTab ( TQWidget * child, const TQString & label )
{
KTabWidget::addTab(child,label);
showPage(child);
maybeShow();
}
-void TabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )
+void TabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label )
{
KTabWidget::addTab(child,iconset,label);
showPage(child);
maybeShow();
}
-void TabWidget::addTab ( QWidget * child, QTab * tab )
+void TabWidget::addTab ( TQWidget * child, TQTab * tab )
{
KTabWidget::addTab(child,tab);
showPage(child);
maybeShow();
}
-void TabWidget::insertTab ( QWidget * child, const QString & label, int index)
+void TabWidget::insertTab ( TQWidget * child, const TQString & label, int index)
{
KTabWidget::insertTab(child,label,index);
showPage(child);
@@ -185,7 +185,7 @@ void TabWidget::insertTab ( QWidget * child, const QString & label, int index)
tabBar()->repaint();
}
-void TabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index )
+void TabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index )
{
KTabWidget::insertTab(child,iconset,label,index);
showPage(child);
@@ -193,7 +193,7 @@ void TabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QSt
tabBar()->repaint();
}
-void TabWidget::insertTab ( QWidget * child, QTab * tab, int index)
+void TabWidget::insertTab ( TQWidget * child, TQTab * tab, int index)
{
KTabWidget::insertTab(child,tab,index);
showPage(child);
@@ -201,18 +201,18 @@ void TabWidget::insertTab ( QWidget * child, QTab * tab, int index)
tabBar()->repaint();
}
-void TabWidget::removePage ( QWidget * w )
+void TabWidget::removePage ( TQWidget * w )
{
KTabWidget::removePage(w);
maybeShow();
}
-void TabWidget::updateIconInView( QWidget *w, QPixmap icon )
+void TabWidget::updateIconInView( TQWidget *w, TQPixmap icon )
{
changeTab(w,icon,tabLabel(w));
}
-void TabWidget::updateCaptionInView( QWidget *w, const QString &caption )
+void TabWidget::updateCaptionInView( TQWidget *w, const TQString &caption )
{
changeTab(w, caption);
}
diff --git a/kmdi/kmdi/tabwidget.h b/kmdi/kmdi/tabwidget.h
index 9aa67d2aa..04e8f3c20 100644
--- a/kmdi/kmdi/tabwidget.h
+++ b/kmdi/kmdi/tabwidget.h
@@ -58,35 +58,35 @@ class KMDI_EXPORT TabWidget : public KTabWidget
Q_OBJECT
public:
- TabWidget(QWidget* parent, const char* name=0);
+ TabWidget(TQWidget* parent, const char* name=0);
virtual ~TabWidget();
- virtual void addTab ( QWidget * child, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQString & label );
- virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label );
- virtual void addTab ( QWidget * child, QTab * tab );
+ virtual void addTab ( TQWidget * child, TQTab * tab );
- virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 );
- virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 );
- virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
+ virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 );
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
KMDI::TabWidgetVisibility tabWidgetVisibility() const;
void setTabWidgetVisibility( KMDI::TabWidgetVisibility );
- bool eventFilter(QObject *obj, QEvent *e );
+ bool eventFilter(TQObject *obj, TQEvent *e );
private slots:
- void closeTab(QWidget* w);
+ void closeTab(TQWidget* w);
public slots:
- void updateIconInView(QWidget*,QPixmap);
- void updateCaptionInView(QWidget*,const QString&);
+ void updateIconInView(TQWidget*,TQPixmap);
+ void updateCaptionInView(TQWidget*,const TQString&);
signals:
void focusInEvent ();
diff --git a/kmdi/kmdi/toolviewaccessor.cpp b/kmdi/kmdi/toolviewaccessor.cpp
index 11e1ce4f3..21f621ec5 100644
--- a/kmdi/kmdi/toolviewaccessor.cpp
+++ b/kmdi/kmdi/toolviewaccessor.cpp
@@ -31,8 +31,8 @@
namespace KMDI
{
-ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption)
-: QObject(parent)
+ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption)
+: TQObject(parent)
{
mdiMainFrm=parent;
d=new KMDIPrivate::ToolViewAccessorPrivate();
@@ -41,7 +41,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
d->widget=d->widgetContainer->getWidget();
} else {
d->widget=widgetToWrap;
- QString finalTabCaption;
+ TQString finalTabCaption;
if (tabCaption == 0) {
finalTabCaption = widgetToWrap->caption();
if (finalTabCaption.isEmpty() && !widgetToWrap->icon()) {
@@ -52,7 +52,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
finalTabCaption = tabCaption;
}
d->widgetContainer= parent->createDockWidget( widgetToWrap->name(),
- (widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap()),
+ (widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap()),
0L, // parent
widgetToWrap->caption(),
finalTabCaption);
@@ -67,7 +67,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
d->widget->installEventFilter(this);
}
-ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent) : QObject(parent) {
+ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent) : TQObject(parent) {
mdiMainFrm=parent;
d=new KMDIPrivate::ToolViewAccessorPrivate();
}
@@ -79,29 +79,29 @@ ToolViewAccessor::~ToolViewAccessor() {
}
-QWidget *ToolViewAccessor::wrapperWidget() {
+TQWidget *ToolViewAccessor::wrapperWidget() {
if (!d->widgetContainer) {
- d->widgetContainer=mdiMainFrm->createDockWidget( "ToolViewAccessor::null",QPixmap());
- connect(d->widgetContainer,SIGNAL(widgetSet(QWidget*)),this,SLOT(setWidgetToWrap(QWidget*)));
+ d->widgetContainer=mdiMainFrm->createDockWidget( "ToolViewAccessor::null",TQPixmap());
+ connect(d->widgetContainer,TQT_SIGNAL(widgetSet(TQWidget*)),this,TQT_SLOT(setWidgetToWrap(TQWidget*)));
}
return d->widgetContainer;
}
-QWidget *ToolViewAccessor::wrappedWidget() {
+TQWidget *ToolViewAccessor::wrappedWidget() {
return d->widget;
}
-void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption)
+void ToolViewAccessor::setWidgetToWrap(TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption)
{
Q_ASSERT(!(d->widget));
Q_ASSERT(!widgetToWrap->inherits("KDockWidget"));
- disconnect(d->widgetContainer,SIGNAL(widgetSet(QWidget*)),this,SLOT(setWidgetToWrap(QWidget*)));
+ disconnect(d->widgetContainer,TQT_SIGNAL(widgetSet(TQWidget*)),this,TQT_SLOT(setWidgetToWrap(TQWidget*)));
delete d->widget;
d->widget=widgetToWrap;
KDockWidget *tmp=d->widgetContainer;
- QString finalTabCaption;
+ TQString finalTabCaption;
if (tabCaption == 0) {
finalTabCaption = widgetToWrap->caption();
if (finalTabCaption.isEmpty() && !widgetToWrap->icon()) {
@@ -114,7 +114,7 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
if (!tmp) {
tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(),
- widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap(),
+ widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap(),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -126,7 +126,7 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
else {
tmp->setCaption(widgetToWrap->caption());
tmp->setTabPageLabel(finalTabCaption);
- tmp->setPixmap(widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap());
+ tmp->setPixmap(widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap());
tmp->setName(widgetToWrap->name());
if (tabToolTip!=0) {
d->widgetContainer->setToolTipString(tabToolTip);
@@ -140,25 +140,25 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
}
-bool ToolViewAccessor::eventFilter(QObject *o, QEvent *e) {
- if (e->type()==QEvent::IconChange) {
- d->widgetContainer->setPixmap(d->widget->icon()?(*d->widget->icon()):QPixmap());
+bool ToolViewAccessor::eventFilter(TQObject *o, TQEvent *e) {
+ if (e->type()==TQEvent::IconChange) {
+ d->widgetContainer->setPixmap(d->widget->icon()?(*d->widget->icon()):TQPixmap());
}
return false;
}
-void ToolViewAccessor::placeAndShow(KDockWidget::DockPosition pos, QWidget* pTargetWnd ,int percent)
+void ToolViewAccessor::placeAndShow(KDockWidget::DockPosition pos, TQWidget* pTargetWnd ,int percent)
{
place(pos,pTargetWnd,percent);
show();
}
-void ToolViewAccessor::place(KDockWidget::DockPosition pos, QWidget* pTargetWnd ,int percent)
+void ToolViewAccessor::place(KDockWidget::DockPosition pos, TQWidget* pTargetWnd ,int percent)
{
Q_ASSERT(d->widgetContainer);
if (!d->widgetContainer) return;
if (pos == KDockWidget::DockNone) {
d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
- d->widgetContainer->reparent(mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, QPoint(0,0), mdiMainFrm->isVisible());
+ d->widgetContainer->reparent(mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint(0,0), mdiMainFrm->isVisible());
}
else { // add (and dock) the toolview as DockWidget view
@@ -181,7 +181,7 @@ void ToolViewAccessor::place(KDockWidget::DockPosition pos, QWidget* pTargetWnd
pTargetDock = mdiMainFrm->getMainDockWidget();
}
}
- // this is not inheriting QWidget*, its plain impossible that this condition is true
+ // this is not inheriting TQWidget*, its plain impossible that this condition is true
//if (pTargetWnd == this) DockToOurself = true;
if (!DockToOurself) if(pTargetWnd != 0L) {
pTargetDock = mdiMainFrm->dockManager->findWidgetParentDock( pTargetWnd);
diff --git a/kmdi/kmdi/toolviewaccessor.h b/kmdi/kmdi/toolviewaccessor.h
index 2a1bd4de2..180ba56a3 100644
--- a/kmdi/kmdi/toolviewaccessor.h
+++ b/kmdi/kmdi/toolviewaccessor.h
@@ -20,11 +20,11 @@
#ifndef _KMDI_TOOLVIEWACCESSOR_H_
#define _KMDI_TOOLVIEWACCESSOR_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include <kdockwidget.h>
@@ -61,24 +61,24 @@ private:
bool m_bFocusInEventIsPending;
private:
- ToolViewAccessor( KMDI::MainWindow *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ ToolViewAccessor( KMDI::MainWindow *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
ToolViewAccessor( KMDI::MainWindow *parent);
public:
~ToolViewAccessor();
- QWidget *wrapperWidget();
- QWidget *wrappedWidget();
- void place(KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L,int percent = 50);
- void placeAndShow(KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L,int percent = 50);
+ TQWidget *wrapperWidget();
+ TQWidget *wrappedWidget();
+ void place(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50);
+ void placeAndShow(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50);
void show();
public slots:
- void setWidgetToWrap(QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ void setWidgetToWrap(TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
void hide();
private:
KMDIPrivate::ToolViewAccessorPrivate *d;
KMDI::MainWindow *mdiMainFrm;
protected:
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
};
}
diff --git a/kmdi/kmdi/toolviewaccessor_p.h b/kmdi/kmdi/toolviewaccessor_p.h
index 3d7b6161a..71ffb286a 100644
--- a/kmdi/kmdi/toolviewaccessor_p.h
+++ b/kmdi/kmdi/toolviewaccessor_p.h
@@ -21,7 +21,7 @@
#define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
#include <kdockwidget.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
namespace KMDIPrivate
@@ -46,9 +46,9 @@ class ToolViewAccessorPrivate
delete (KDockWidget*)widgetContainer;
}
- QGuardedPtr<KDockWidget> widgetContainer;
- QWidget *widget;
- QGuardedPtr<KAction> action;
+ TQGuardedPtr<KDockWidget> widgetContainer;
+ TQWidget *widget;
+ TQGuardedPtr<KAction> action;
};
}
diff --git a/kmdi/kmdichildarea.cpp b/kmdi/kmdichildarea.cpp
index 8074dac41..923b55372 100644
--- a/kmdi/kmdichildarea.cpp
+++ b/kmdi/kmdichildarea.cpp
@@ -36,7 +36,7 @@
#include <kglobalsettings.h>
#include <math.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
///////////////////////////////////////////////////////////////////////////////
@@ -45,21 +45,21 @@
//============ KMdiChildArea ============//
-KMdiChildArea::KMdiChildArea( QWidget *parent )
- : QFrame( parent, "kmdi_childarea" )
+KMdiChildArea::KMdiChildArea( TQWidget *parent )
+ : TQFrame( parent, "kmdi_childarea" )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- m_captionFont = QFont();
- QFontMetrics fm( m_captionFont );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ m_captionFont = TQFont();
+ TQFontMetrics fm( m_captionFont );
m_captionFontLineSpacing = fm.lineSpacing();
m_captionActiveBackColor = KGlobalSettings::activeTitleColor();
m_captionActiveForeColor = KGlobalSettings::activeTextColor();
m_captionInactiveBackColor = KGlobalSettings::inactiveTitleColor();
m_captionInactiveForeColor = KGlobalSettings::inactiveTextColor();
- m_pZ = new QPtrList<KMdiChildFrm>;
+ m_pZ = new TQPtrList<KMdiChildFrm>;
m_pZ->setAutoDelete( true );
setFocusPolicy( ClickFocus );
- m_defaultChildFrmSize = QSize( 400, 300 );
+ m_defaultChildFrmSize = TQSize( 400, 300 );
}
@@ -77,7 +77,7 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade )
//remove old references. There can be more than one so we remove them all
if ( m_pZ->findRef( child ) != -1 )
{
- //QPtrList::find* moves current() to the found item
+ //TQPtrList::find* moves current() to the found item
m_pZ->take();
while ( m_pZ->findNextRef( child ) != -1 )
m_pZ->take();
@@ -112,7 +112,7 @@ void KMdiChildArea::destroyChild( KMdiChildFrm *child, bool focusTop )
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
- QObject::disconnect( child );
+ TQObject::disconnect( child );
child->blockSignals( true );
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@@ -144,7 +144,7 @@ void KMdiChildArea::destroyChildButNotItsView( KMdiChildFrm* child, bool focusTo
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
- QObject::disconnect( child );
+ TQObject::disconnect( child );
child->unsetClient();
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@@ -182,7 +182,7 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
m_pZ->setAutoDelete( true );
//disable the labels of all the other children
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
( *it )->m_pCaption->setActive( false );
@@ -218,13 +218,13 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
else
child->raise();
- QFocusEvent::setReason( QFocusEvent::Other );
+ TQFocusEvent::setReason( TQFocusEvent::Other );
child->m_pClient->setFocus();
}
}
-void KMdiChildArea::resizeEvent( QResizeEvent* e )
+void KMdiChildArea::resizeEvent( TQResizeEvent* e )
{
//If we have a maximized children at the top , adjust its size
KMdiChildFrm* child = topChild();
@@ -241,12 +241,12 @@ void KMdiChildArea::resizeEvent( QResizeEvent* e )
}
layoutMinimizedChildren();
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
//=============== mousePressEvent =============//
-void KMdiChildArea::mousePressEvent( QMouseEvent *e )
+void KMdiChildArea::mousePressEvent( TQMouseEvent *e )
{
//Popup the window menu
if ( e->button() & RightButton )
@@ -255,7 +255,7 @@ void KMdiChildArea::mousePressEvent( QMouseEvent *e )
//=============== getCascadePoint ============//
-QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
+TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
{
if ( indexOfWindow < 0 )
{
@@ -264,10 +264,10 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
<< indexOfWindow << " as new index" << endl;
}
- QPoint pnt( 0, 0 );
+ TQPoint pnt( 0, 0 );
if ( indexOfWindow == 0 )
{
- kdDebug( 760 ) << k_funcinfo << "No windows. Returning QPoint( 0, 0 ) as the cascade point" << endl;
+ kdDebug( 760 ) << k_funcinfo << "No windows. Returning TQPoint( 0, 0 ) as the cascade point" << endl;
return pnt;
}
@@ -282,8 +282,8 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
//default values
int step = 20;
- int h = ( topLevelMode ? QApplication::desktop()->height() : height() );
- int w = ( topLevelMode ? QApplication::desktop()->width() : width() );
+ int h = ( topLevelMode ? TQApplication::desktop()->height() : height() );
+ int w = ( topLevelMode ? TQApplication::desktop()->width() : width() );
int availableHeight = h - m_defaultChildFrmSize.height();
int availableWidth = w - m_defaultChildFrmSize.width();
@@ -365,7 +365,7 @@ void KMdiChildArea::focusTopChild()
if ( !lastChild->m_pClient->hasFocus() )
{
//disable the labels of all the other children
- QPtrListIterator<KMdiChildFrm> it ( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it ( *m_pZ );
for ( ; ( *it ); ++it )
{
if ( ( *it ) != lastChild )
@@ -383,7 +383,7 @@ void KMdiChildArea::cascadeWindows()
{
kdDebug( 760 ) << k_funcinfo << "cascading windows but not changing their size" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -405,7 +405,7 @@ void KMdiChildArea::cascadeMaximized()
{
kdDebug( 760 ) << k_funcinfo << "cascading windows. will make sure they are minimum sized" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
@@ -416,9 +416,9 @@ void KMdiChildArea::cascadeMaximized()
if (childFrm->state() == KMdiChildFrm::Maximized )
childFrm->restorePressed();
- QPoint pnt( getCascadePoint( idx ) );
+ TQPoint pnt( getCascadePoint( idx ) );
childFrm->move( pnt );
- QSize curSize( width() - pnt.x(), height() - pnt.y() );
+ TQSize curSize( width() - pnt.x(), height() - pnt.y() );
if ( ( childFrm->minimumSize().width() > curSize.width() ) ||
( childFrm->minimumSize().height() > curSize.height() ) )
@@ -439,7 +439,7 @@ void KMdiChildArea::expandVertical()
{
kdDebug( 760 ) << k_funcinfo << "expanding all child frames vertically" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -461,7 +461,7 @@ void KMdiChildArea::expandHorizontal()
{
kdDebug( 760 ) << k_funcinfo << "expanding all child frames horizontally" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -482,7 +482,7 @@ void KMdiChildArea::expandHorizontal()
int KMdiChildArea::getVisibleChildCount() const
{
int visibleChildCount = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
if ( ( *it )->state() != KMdiChildFrm::Minimized && ( *it )->isVisible() )
@@ -555,7 +555,7 @@ void KMdiChildArea::tileAllInternal( int maxWnds )
int curCol = 1;
int curWin = 1;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -641,7 +641,7 @@ void KMdiChildArea::tileAnodine()
// it's great when a kick-ass theory works!!! // Pragma :)
int xQuantum = width() / numCols;
int yQuantum = height() / numRows[numCurCol];
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -692,7 +692,7 @@ void KMdiChildArea::tileVertically()
int posX = 0;
int countVisible = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -724,7 +724,7 @@ void KMdiChildArea::layoutMinimizedChildren()
{
int posX = 0;
int posY = height();
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = *( it );
@@ -744,41 +744,41 @@ void KMdiChildArea::layoutMinimizedChildren()
}
-void KMdiChildArea::setMdiCaptionFont( const QFont& fnt )
+void KMdiChildArea::setMdiCaptionFont( const TQFont& fnt )
{
m_captionFont = fnt;
- QFontMetrics fm( m_captionFont );
+ TQFontMetrics fm( m_captionFont );
m_captionFontLineSpacing = fm.lineSpacing();
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
( *it )->doResize();
}
-void KMdiChildArea::setMdiCaptionActiveForeColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionActiveForeColor( const TQColor& clr )
{
m_captionActiveForeColor = clr;
}
-void KMdiChildArea::setMdiCaptionActiveBackColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionActiveBackColor( const TQColor& clr )
{
m_captionActiveBackColor = clr;
}
-void KMdiChildArea::setMdiCaptionInactiveForeColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionInactiveForeColor( const TQColor& clr )
{
m_captionInactiveForeColor = clr;
}
-void KMdiChildArea::setMdiCaptionInactiveBackColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionInactiveBackColor( const TQColor& clr )
{
m_captionInactiveBackColor = clr;
}
//KDE4: remove
-void KMdiChildArea::getCaptionColors( const QPalette& /*pal*/, QColor& activeBG,
- QColor& activeFG, QColor& inactiveBG, QColor& inactiveFG )
+void KMdiChildArea::getCaptionColors( const TQPalette& /*pal*/, TQColor& activeBG,
+ TQColor& activeFG, TQColor& inactiveBG, TQColor& inactiveFG )
{
activeBG = KGlobalSettings::activeTitleColor();
activeFG = KGlobalSettings::activeTextColor();
diff --git a/kmdi/kmdichildarea.h b/kmdi/kmdichildarea.h
index 7bbe07fff..37ce3336f 100644
--- a/kmdi/kmdichildarea.h
+++ b/kmdi/kmdichildarea.h
@@ -28,8 +28,8 @@
#ifndef _KMDI_CHILD_AREA_H_
#define _KMDI_CHILD_AREA_H_
-#include <qframe.h>
-#include <qptrlist.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
#include "kmdichildfrm.h"
#include "kmdichildview.h"
@@ -61,37 +61,37 @@ public:
/**
* Z Order stack of KMdiChildFrm childframe windows (top=last)
*/
- QPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
+ TQPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
/**
* the default size of an newly created childframe
*/
- QSize m_defaultChildFrmSize;
+ TQSize m_defaultChildFrmSize;
protected:
/**
* The MDI childframe window caption font
*/
- QFont m_captionFont;
+ TQFont m_captionFont;
/**
* The foreground color of the active MDI childframe window caption
*/
- QColor m_captionActiveBackColor;
+ TQColor m_captionActiveBackColor;
/**
* The background color of the active MDI childframe window captions
*/
- QColor m_captionActiveForeColor;
+ TQColor m_captionActiveForeColor;
/**
* The foreground color of inactive MDI childframe window captions
*/
- QColor m_captionInactiveBackColor;
+ TQColor m_captionInactiveBackColor;
/**
* The background color of inactive MDI childframe window captions
*/
- QColor m_captionInactiveForeColor;
+ TQColor m_captionInactiveForeColor;
int m_captionFontLineSpacing;
@@ -101,7 +101,7 @@ public:
/**
* Consruction. Note: This class needn't to know about KMdiMainFrm .
*/
- KMdiChildArea( QWidget *parent );
+ KMdiChildArea( TQWidget *parent );
/**
* Destructor : THERE should be no child windows anymore...
@@ -150,37 +150,37 @@ public:
* the cascade point is calculated for the window following the last window
* @param indexOfWindow the index of the window in relation the z-ordered window list
*/
- QPoint getCascadePoint( int indexOfWindow = -1 );
+ TQPoint getCascadePoint( int indexOfWindow = -1 );
/**
* Sets the MDI childframe window caption font
* A relayout does not occur when using this function
*/
- void setMdiCaptionFont( const QFont &fnt );
+ void setMdiCaptionFont( const TQFont &fnt );
/**
* Sets the foreground color of the active MDI childframe window caption
* A relayout does not occur when using this function
*/
- void setMdiCaptionActiveForeColor( const QColor &clr );
+ void setMdiCaptionActiveForeColor( const TQColor &clr );
/**
* Sets the background color of the active MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionActiveBackColor( const QColor &clr );
+ void setMdiCaptionActiveBackColor( const TQColor &clr );
/**
* Sets the foreground color of inactive MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionInactiveForeColor( const QColor &clr );
+ void setMdiCaptionInactiveForeColor( const TQColor &clr );
/**
* Sets the background color of inactive MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionInactiveBackColor( const QColor &clr );
+ void setMdiCaptionInactiveBackColor( const TQColor &clr );
/**
* Gets all caption colors, consistent with current WM settings
@@ -191,8 +191,8 @@ public:
* @deprecated Use KGlobalSettings::activeTitleColor(), KGlobalSettings::activeTextColor(),
* KGlobalSettings::inactiveTitleColor() and KGlobalSettings::inactiveTextColor() instead.
*/
- static void getCaptionColors( const QPalette &pal, QColor &activeBG, QColor &activeFG,
- QColor &inactiveBG, QColor &inactiveFG ) KDE_DEPRECATED;
+ static void getCaptionColors( const TQPalette &pal, TQColor &activeBG, TQColor &activeFG,
+ TQColor &inactiveBG, TQColor &inactiveFG ) KDE_DEPRECATED;
public slots:
/**
@@ -251,12 +251,12 @@ protected:
/**
* Automatically resizes a maximized MDI view and layouts the positions of minimized MDI views.
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Shows the 'Window' popup menu on right mouse button click
*/
- void mousePressEvent( QMouseEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
/**
* Internally used. Actions that are necessary when an MDI view gets minimized
@@ -286,7 +286,7 @@ signals:
* Signals a KMdiMainFrm that the 'Window' popup menu must be shown
* @internal
*/
- void popupWindowMenu( QPoint );
+ void popupWindowMenu( TQPoint );
/**
* Signals that the last attached (docked) MDI view has been closed.
diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp
index da5470410..3c33e1cc5 100644
--- a/kmdi/kmdichildfrm.cpp
+++ b/kmdi/kmdichildfrm.cpp
@@ -35,15 +35,15 @@
#include "kmdichildarea.h"
#include "kmdimainfrm.h"
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qframe.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qnamespace.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqframe.h>
+#include <tqpopupmenu.h>
+#include <tqtoolbutton.h>
+#include <tqnamespace.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -85,13 +85,13 @@
#include "kde2laptop_undockbutton.xpm"
-KMdiWin32IconButton::KMdiWin32IconButton( QWidget* parent, const char* name )
- : QLabel( parent, name )
+KMdiWin32IconButton::KMdiWin32IconButton( TQWidget* parent, const char* name )
+ : TQLabel( parent, name )
{}
//============ mousePressEvent ============//
-void KMdiWin32IconButton::mousePressEvent( QMouseEvent* )
+void KMdiWin32IconButton::mousePressEvent( TQMouseEvent* )
{
//emit pressed();
}
@@ -99,7 +99,7 @@ void KMdiWin32IconButton::mousePressEvent( QMouseEvent* )
//============ KMdiChildFrm ============//
KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
- : QFrame( parent, "kmdi_childfrm" )
+ : TQFrame( parent, "kmdi_childfrm" )
, m_pClient( 0L )
, m_pManager( 0L )
, m_pCaption( 0L )
@@ -125,27 +125,27 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
, m_pSystemMenu( 0L )
, m_oldClientMinSize()
, m_oldClientMaxSize()
- , m_oldLayoutResizeMode( QLayout::Minimum )
+ , m_oldLayoutResizeMode( TQLayout::Minimum )
{
m_pCaption = new KMdiChildFrmCaption( this );
m_pManager = parent;
m_pWinIcon = new KMdiWin32IconButton( m_pCaption, "kmdi_iconbutton_icon" );
- m_pUnixIcon = new QToolButton( m_pCaption, "kmdi_toolbutton_icon" );
- m_pMinimize = new QToolButton( m_pCaption, "kmdi_toolbutton_min" );
- m_pMaximize = new QToolButton( m_pCaption, "kmdi_toolbutton_max" );
- m_pClose = new QToolButton( m_pCaption, "kmdi_toolbutton_close" );
- m_pUndock = new QToolButton( m_pCaption, "kmdi_toolbutton_undock" );
-
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
- QObject::connect( m_pMaximize, SIGNAL( clicked() ), this, SLOT( maximizePressed() ) );
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closePressed() ) );
- QObject::connect( m_pUndock, SIGNAL( clicked() ), this, SLOT( undockPressed() ) );
-
- m_pIconButtonPixmap = new QPixmap( SmallIcon( "filenew" ) );
+ m_pUnixIcon = new TQToolButton( m_pCaption, "kmdi_toolbutton_icon" );
+ m_pMinimize = new TQToolButton( m_pCaption, "kmdi_toolbutton_min" );
+ m_pMaximize = new TQToolButton( m_pCaption, "kmdi_toolbutton_max" );
+ m_pClose = new TQToolButton( m_pCaption, "kmdi_toolbutton_close" );
+ m_pUndock = new TQToolButton( m_pCaption, "kmdi_toolbutton_undock" );
+
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pMaximize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( maximizePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), this, TQT_SLOT( undockPressed() ) );
+
+ m_pIconButtonPixmap = new TQPixmap( SmallIcon( "filenew" ) );
if ( m_pIconButtonPixmap->isNull() )
- * m_pIconButtonPixmap = QPixmap( filenew );
+ * m_pIconButtonPixmap = TQPixmap( filenew );
redecorateButtons();
@@ -156,14 +156,14 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
m_pMaximize->setFocusPolicy( NoFocus );
m_pUndock->setFocusPolicy( NoFocus );
- setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
setFocusPolicy( NoFocus );
setMouseTracking( true );
setMinimumSize( KMDI_CHILDFRM_MIN_WIDTH, m_pCaption->heightHint() );
- m_pSystemMenu = new QPopupMenu();
+ m_pSystemMenu = new TQPopupMenu();
}
//============ ~KMdiChildFrm ============//
@@ -180,12 +180,12 @@ KMdiChildFrm::~KMdiChildFrm()
}
//============ mousePressEvent =============//
-void KMdiChildFrm::mousePressEvent( QMouseEvent *e )
+void KMdiChildFrm::mousePressEvent( TQMouseEvent *e )
{
if ( m_bResizing )
{
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
m_bResizing = false;
releaseMouse();
@@ -201,24 +201,24 @@ void KMdiChildFrm::mousePressEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmResizeBeginEvent ue( e );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &ue );
+ TQApplication::sendEvent( m_pClient, &ue );
}
}
//============ mouseReleaseEvent ==============//
-void KMdiChildFrm::mouseReleaseEvent( QMouseEvent *e )
+void KMdiChildFrm::mouseReleaseEvent( TQMouseEvent *e )
{
if ( m_bResizing )
{
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
m_bResizing = false;
//notify child view
KMdiChildFrmResizeEndEvent ue( e );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &ue );
+ TQApplication::sendEvent( m_pClient, &ue );
}
}
@@ -233,24 +233,24 @@ void KMdiChildFrm::setResizeCursor( int resizeCorner )
switch ( resizeCorner )
{
case KMDI_NORESIZE:
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
break;
case KMDI_RESIZE_LEFT:
case KMDI_RESIZE_RIGHT:
- QApplication::setOverrideCursor( Qt::sizeHorCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeHorCursor, true );
break;
case KMDI_RESIZE_TOP:
case KMDI_RESIZE_BOTTOM:
- QApplication::setOverrideCursor( Qt::sizeVerCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeVerCursor, true );
break;
case KMDI_RESIZE_TOPLEFT:
case KMDI_RESIZE_BOTTOMRIGHT:
- QApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
break;
case KMDI_RESIZE_BOTTOMLEFT:
case KMDI_RESIZE_TOPRIGHT:
- QApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
break;
}
}
@@ -263,14 +263,14 @@ void KMdiChildFrm::unsetResizeCursor()
{
m_iResizeCorner = KMDI_NORESIZE;
m_iLastCursorCorner = KMDI_NORESIZE;
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
}
}
//============= mouseMoveEvent ===============//
-void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
+void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e )
{
if ( m_state != Normal )
return;
@@ -286,7 +286,7 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) )
{
// same as: if no button or left button pressed
- QPoint p = parentWidget()->mapFromGlobal( e->globalPos() );
+ TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() );
resizeWindow( m_iResizeCorner, p.x(), p.y() );
}
else
@@ -301,24 +301,24 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
//============= moveEvent ===============//
-void KMdiChildFrm::moveEvent( QMoveEvent* me )
+void KMdiChildFrm::moveEvent( TQMoveEvent* me )
{
// give its child view the chance to notify a childframe move
KMdiChildFrmMoveEvent cfme( me );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &cfme );
+ TQApplication::sendEvent( m_pClient, &cfme );
}
//=============== leaveEvent ===============//
-void KMdiChildFrm::leaveEvent( QEvent * )
+void KMdiChildFrm::leaveEvent( TQEvent * )
{
unsetResizeCursor();
}
void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
{
- QRect resizeRect( x(), y(), width(), height() );
+ TQRect resizeRect( x(), y(), width(), height() );
// Calculate the minimum width & height
int minWidth = 0;
@@ -349,7 +349,7 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
if ( maxHeight > maximumHeight() )
maxHeight = maximumHeight();
- QPoint mousePos( xPos, yPos );
+ TQPoint mousePos( xPos, yPos );
// manipulate width
switch ( resizeCorner )
@@ -511,7 +511,7 @@ void KMdiChildFrm::undockPressed()
void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
{
if ( m_state == Normal ) //save the current rect
- m_restoredRect = QRect( x(), y(), width(), height() );
+ m_restoredRect = TQRect( x(), y(), width(), height() );
switch ( state )
{
@@ -540,8 +540,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
}
m_pMinimize->setPixmap( *m_pMinButtonPixmap );
m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
setGeometry( m_restoredRect );
break;
case Normal:
@@ -566,8 +566,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// reset to maximize-captionbar
m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
m_pMinimize->setPixmap( *m_pMinButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
m_pCaption->heightHint();
@@ -587,7 +587,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
m_pCaption->heightHint();
- QRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(),
+ TQRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(),
m_pManager->width() + nFrameWidth,
m_pManager->height() + nFrameHeight );
if ( geometry() != maximizedFrmRect )
@@ -618,7 +618,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->layout() != 0L )
{
- m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, true );
@@ -638,7 +638,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->layout() != 0L )
{
- m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, false );
@@ -670,21 +670,21 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
//============== restoreGeometry ================//
-QRect KMdiChildFrm::restoreGeometry() const
+TQRect KMdiChildFrm::restoreGeometry() const
{
return m_restoredRect;
}
//============== setRestoreGeometry ================//
-void KMdiChildFrm::setRestoreGeometry( const QRect& newRestGeo )
+void KMdiChildFrm::setRestoreGeometry( const TQRect& newRestGeo )
{
m_restoredRect = newRestGeo;
}
//============ setCaption ===============//
-void KMdiChildFrm::setCaption( const QString& text )
+void KMdiChildFrm::setCaption( const TQString& text )
{
m_pCaption->setCaption( text );
}
@@ -699,13 +699,13 @@ void KMdiChildFrm::enableClose( bool bEnable )
//============ setIcon ==================//
-void KMdiChildFrm::setIcon( const QPixmap& pxm )
+void KMdiChildFrm::setIcon( const TQPixmap& pxm )
{
- QPixmap p = pxm;
+ TQPixmap p = pxm;
if ( p.width() != 18 || p.height() != 18 )
{
- QImage img = p.convertToImage();
- p = img.smoothScale( 18, 18, QImage::ScaleMin );
+ TQImage img = p.convertToImage();
+ p = img.smoothScale( 18, 18, TQImage::ScaleMin );
}
const bool do_resize = m_pIconButtonPixmap->size() != p.size();
*m_pIconButtonPixmap = p;
@@ -717,7 +717,7 @@ void KMdiChildFrm::setIcon( const QPixmap& pxm )
//============ icon =================//
-QPixmap* KMdiChildFrm::icon() const
+TQPixmap* KMdiChildFrm::icon() const
{
return m_pIconButtonPixmap;
}
@@ -732,7 +732,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
//resize to match the client
int clientYPos = m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_BORDER;
- if ( bAutomaticResize || w->size().isEmpty() || ( w->size() == QSize( 1, 1 ) ) )
+ if ( bAutomaticResize || w->size().isEmpty() || ( w->size() == TQSize( 1, 1 ) ) )
{
if ( m_pManager->topChild() )
{
@@ -750,19 +750,19 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
}
// memorize the focuses in a dictionary because they will get lost during reparenting
- QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
pFocPolDict->setAutoDelete( true );
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over the buttons
- QObject * obj;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject * obj;
int i = 1;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
++it;
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
if ( widg->name( 0 ) == 0 )
{
- QString tmpStr;
+ TQString tmpStr;
tmpStr.setNum( i );
tmpStr = "unnamed" + tmpStr;
widg->setName( tmpStr.latin1() );
@@ -778,9 +778,9 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
if ( w->parent() != this )
{
//reparent to this widget , no flags , point , show it
- QPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
- QSize mincs = w->minimumSize();
- QSize maxcs = w->maximumSize();
+ TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
+ TQSize mincs = w->minimumSize();
+ TQSize maxcs = w->maximumSize();
w->setMinimumSize( 0, 0 );
w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
@@ -795,7 +795,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
linkChildren( pFocPolDict );
- QObject::connect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+ TQObject::connect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() )
setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER );
@@ -809,38 +809,38 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
//============ unsetClient ============//
-void KMdiChildFrm::unsetClient( QPoint positionOffset )
+void KMdiChildFrm::unsetClient( TQPoint positionOffset )
{
if ( !m_pClient )
return ;
- QObject::disconnect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+ TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
//reparent to desktop widget , no flags , point , show it
- QDict<FocusPolicy>* pFocPolDict;
+ TQDict<FocusPolicy>* pFocPolDict;
pFocPolDict = unlinkChildren();
// get name of focused child widget
- QWidget* focusedChildWidget = m_pClient->focusedChildWidget();
+ TQWidget* focusedChildWidget = m_pClient->focusedChildWidget();
const char* nameOfFocusedWidget = "";
if ( focusedChildWidget != 0 )
nameOfFocusedWidget = focusedChildWidget->name();
- QSize mins = m_pClient->minimumSize();
- QSize maxs = m_pClient->maximumSize();
+ TQSize mins = m_pClient->minimumSize();
+ TQSize maxs = m_pClient->maximumSize();
m_pClient->reparent( 0, 0, mapToGlobal( pos() ) - pos() + positionOffset, isVisible() );
m_pClient->setMinimumSize( mins.width(), mins.height() );
m_pClient->setMaximumSize( maxs.width(), maxs.height() );
// remember the focus policies using the dictionary and reset them
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject * obj;
- QWidget* firstFocusableChildWidget = 0;
- QWidget* lastFocusableChildWidget = 0;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject * obj;
+ TQWidget* firstFocusableChildWidget = 0;
+ TQWidget* lastFocusableChildWidget = 0;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol )
@@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
widg->setFocus();
// get first and last focusable widget
- if ( ( widg->focusPolicy() == QWidget::StrongFocus ) || ( widg->focusPolicy() == QWidget::TabFocus ) )
+ if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
}
else
{
- if ( widg->focusPolicy() == QWidget::WheelFocus )
+ if ( widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -877,29 +877,29 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget );
// reset the focus policy of the view
- m_pClient->setFocusPolicy( QWidget::ClickFocus );
+ m_pClient->setFocusPolicy( TQWidget::ClickFocus );
// lose information about the view (because it's undocked now)
m_pClient = 0;
}
//============== linkChildren =============//
-void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
+void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
{
// reset the focus policies for all widgets in the view (take them from the dictionary)
- QObjectList* list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject* obj;
+ TQObjectList* list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol );
- if ( !( widg->inherits( "QPopupMenu" ) ) )
+ if ( !( widg->inherits( "TQPopupMenu" ) ) )
widg->installEventFilter( this );
}
@@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
delete pFocPolDict;
// reset the focus policies for the rest
- m_pWinIcon->setFocusPolicy( QWidget::NoFocus );
- m_pUnixIcon->setFocusPolicy( QWidget::NoFocus );
- m_pClient->setFocusPolicy( QWidget::ClickFocus );
- m_pCaption->setFocusPolicy( QWidget::NoFocus );
- m_pUndock->setFocusPolicy( QWidget::NoFocus );
- m_pMinimize->setFocusPolicy( QWidget::NoFocus );
- m_pMaximize->setFocusPolicy( QWidget::NoFocus );
- m_pClose->setFocusPolicy( QWidget::NoFocus );
+ m_pWinIcon->setFocusPolicy( TQWidget::NoFocus );
+ m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus );
+ m_pClient->setFocusPolicy( TQWidget::ClickFocus );
+ m_pCaption->setFocusPolicy( TQWidget::NoFocus );
+ m_pUndock->setFocusPolicy( TQWidget::NoFocus );
+ m_pMinimize->setFocusPolicy( TQWidget::NoFocus );
+ m_pMaximize->setFocusPolicy( TQWidget::NoFocus );
+ m_pClose->setFocusPolicy( TQWidget::NoFocus );
// install the event filter (catch mouse clicks) for the rest
m_pWinIcon->installEventFilter( this );
@@ -930,24 +930,24 @@ void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
//============== unlinkChildren =============//
-QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
+TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
{
// memorize the focuses in a dictionary because they will get lost during reparenting
- QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
pFocPolDict->setAutoDelete( true );
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject * obj;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject * obj;
int i = 1;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
++it;
- QWidget* w = ( QWidget* ) obj;
+ TQWidget* w = ( TQWidget* ) obj;
// get current widget object name
if ( w->name( 0 ) == 0 )
{
- QString tmpStr;
+ TQString tmpStr;
tmpStr.setNum( i );
tmpStr = "unnamed" + tmpStr;
w->setName( tmpStr.latin1() );
@@ -958,7 +958,7 @@ QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
// memorize focus policy
pFocPolDict->insert( w->name(), pFocPol );
// remove event filter
- ( ( QWidget* ) obj ) ->removeEventFilter( this );
+ ( ( TQWidget* ) obj ) ->removeEventFilter( this );
}
delete list; // delete the list, not the objects
@@ -979,7 +979,7 @@ QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
//============== resizeEvent ===============//
-void KMdiChildFrm::resizeEvent( QResizeEvent * )
+void KMdiChildFrm::resizeEvent( TQResizeEvent * )
{
doResize(); // an extra method because it can also called directly
}
@@ -1002,7 +1002,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
int frmIconHeight = m_pWinIcon->pixmap() ->height();
int frmIconWidth = m_pWinIcon->pixmap() ->width();
int frmIconOffset = 1;
- QWidget* pIconWidget = m_pWinIcon;
+ TQWidget* pIconWidget = m_pWinIcon;
m_pCaption->setGeometry( KMDI_CHILDFRM_BORDER, KMDI_CHILDFRM_BORDER, captionWidth, captionHeight );
//The buttons are caption children
@@ -1054,7 +1054,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
//Resize the client
if ( !captionOnly && m_pClient )
{
- QSize newClientSize( captionWidth,
+ TQSize newClientSize( captionWidth,
height() - ( KMDI_CHILDFRM_DOUBLE_BORDER + captionHeight + KMDI_CHILDFRM_SEPARATOR ) );
if ( newClientSize != m_pClient->size() )
{
@@ -1065,7 +1065,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
}
}
-static bool hasParent( QObject* par, QObject* o )
+static bool hasParent( TQObject* par, TQObject* o )
{
while ( o && o != par )
o = o->parent();
@@ -1074,15 +1074,15 @@ static bool hasParent( QObject* par, QObject* o )
//============= eventFilter ===============//
-bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
+bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
{
switch ( e->type() )
{
- case QEvent::Enter:
+ case TQEvent::Enter:
{
// check if the receiver is really a child of this frame
bool bIsChild = false;
- QObject* pObj = obj;
+ TQObject* pObj = obj;
while ( ( pObj != 0L ) && !bIsChild )
{
bIsChild = ( pObj == this );
@@ -1093,19 +1093,19 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
unsetResizeCursor();
}
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
if ( !hasParent( m_pClient, obj ) )
{
bool bIsSecondClick = false;
- if ( m_timeMeasure.elapsed() <= QApplication::doubleClickInterval() )
+ if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() )
bIsSecondClick = true; // of a possible double click
if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
{
// in case we didn't click on the icon button
- QFocusEvent focusEvent( QFocusEvent::FocusIn );
- QApplication::sendEvent( qApp->mainWidget(), &focusEvent );
+ TQFocusEvent focusEvent( TQFocusEvent::FocusIn );
+ TQApplication::sendEvent( qApp->mainWidget(), &focusEvent );
if ( m_pClient )
{
m_pClient->updateTimeStamp();
@@ -1114,8 +1114,8 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
{
- QWidget* w = ( QWidget* ) obj;
- if ( ( w->focusPolicy() == QWidget::ClickFocus ) || ( w->focusPolicy() == QWidget::StrongFocus ) )
+ TQWidget* w = ( TQWidget* ) obj;
+ if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) )
{
w->setFocus();
}
@@ -1124,7 +1124,7 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
{
// in case we clicked on the icon button
- if ( m_timeMeasure.elapsed() > QApplication::doubleClickInterval() )
+ if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() )
{
showSystemMenu();
m_timeMeasure.start();
@@ -1137,33 +1137,33 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
}
}
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
{
- if ( ( ( QWidget* ) obj == m_pClient ) && ( m_state == Normal ) )
+ if ( ( ( TQWidget* ) obj == m_pClient ) && ( m_state == Normal ) )
{
- QResizeEvent* re = ( QResizeEvent* ) e;
+ TQResizeEvent* re = ( TQResizeEvent* ) e;
int captionHeight = m_pCaption->heightHint();
- QSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ TQSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER,
re->size().height() + captionHeight + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
if ( newChildFrmSize != size() )
resize( newChildFrmSize );
}
}
break;
- case QEvent::ChildRemoved:
+ case TQEvent::ChildRemoved:
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject* pLostChild = ( ( QChildEvent* ) e )->child();
- if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ )
+ TQObject* pLostChild = ( ( TQChildEvent* ) e )->child();
+ if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("TQWidget"))*/ )
{
- QObjectList* list = pLostChild->queryList();
+ TQObjectList* list = pLostChild->queryList();
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject* obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
}
@@ -1171,24 +1171,24 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
}
}
break;
- case QEvent::ChildInserted:
+ case TQEvent::ChildInserted:
{
// if we got a new child we install ourself as event filter for the new
// child and its children (as we did when we got our client).
// XXX see linkChildren() and focus policy stuff
- QObject* pNewChild = ( ( QChildEvent* ) e ) ->child();
- if ( ( pNewChild != 0L ) && ::qt_cast<QWidget*>( pNewChild ) )
+ TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child();
+ if ( ( pNewChild != 0L ) && ::qt_cast<TQWidget*>( pNewChild ) )
{
- QWidget * pNewWidget = static_cast<QWidget*>( pNewChild );
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQWidget * pNewWidget = static_cast<TQWidget*>( pNewChild );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * obj;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
- if ( !::qt_cast<QPopupMenu*>( widg ) )
+ if ( !::qt_cast<TQPopupMenu*>( widg ) )
{
widg->installEventFilter( this );
}
@@ -1216,7 +1216,7 @@ void KMdiChildFrm::raiseAndActivate()
void KMdiChildFrm::setMinimumSize ( int minw, int minh )
{
- QWidget::setMinimumSize( minw, minh );
+ TQWidget::setMinimumSize( minw, minh );
if ( m_state == Maximized )
{
m_pManager->setMinimumSize( minw, minh );
@@ -1225,7 +1225,7 @@ void KMdiChildFrm::setMinimumSize ( int minw, int minh )
//============= systemMenu ===============//
-QPopupMenu* KMdiChildFrm::systemMenu() const
+TQPopupMenu* KMdiChildFrm::systemMenu() const
{
if ( m_pSystemMenu == 0 )
return 0;
@@ -1234,11 +1234,11 @@ QPopupMenu* KMdiChildFrm::systemMenu() const
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
{
- m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
- m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
- m_pSystemMenu->insertItem( i18n( "R&esize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
- m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, SLOT( minimizePressed() ) );
- m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, SLOT( maximizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "R&esize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, TQT_SLOT( minimizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, TQT_SLOT( maximizePressed() ) );
if ( state() == Normal )
m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 0 ), false );
else if ( state() == Maximized )
@@ -1256,20 +1256,20 @@ QPopupMenu* KMdiChildFrm::systemMenu() const
else
{
if ( state() != Normal )
- m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) );
if ( state() != Maximized )
- m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, SLOT( maximizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, TQT_SLOT( maximizePressed() ) );
if ( state() != Minimized )
- m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, SLOT( minimizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, TQT_SLOT( minimizePressed() ) );
if ( state() != Maximized )
- m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) );
if ( state() == Normal )
- m_pSystemMenu->insertItem( i18n( "&Resize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "&Resize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) );
}
- m_pSystemMenu->insertItem( i18n( "&Undock" ), this, SLOT( undockPressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Undock" ), this, TQT_SLOT( undockPressed() ) );
m_pSystemMenu->insertSeparator();
- m_pSystemMenu->insertItem( i18n( "&Close" ), this, SLOT( closePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Close" ), this, TQT_SLOT( closePressed() ) );
return m_pSystemMenu;
}
@@ -1280,15 +1280,15 @@ void KMdiChildFrm::showSystemMenu()
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
m_pUnixIcon->setDown( false );
- QPoint popupmenuPosition;
+ TQPoint popupmenuPosition;
- QRect iconGeom;
+ TQRect iconGeom;
if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
iconGeom = m_pWinIcon->geometry();
else
iconGeom = m_pUnixIcon->geometry();
- popupmenuPosition = QPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER );
+ popupmenuPosition = TQPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER );
systemMenu() ->popup( mapToGlobal( popupmenuPosition ) );
}
@@ -1301,8 +1301,8 @@ void KMdiChildFrm::switchToMinimizeLayout()
// temporary use of minimize button for restore function
m_pMinimize->setPixmap( *m_pRestoreButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
// resizing
resize( 300, minimumHeight() );
@@ -1329,35 +1329,35 @@ void KMdiChildFrm::redecorateButtons()
if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
{
- m_pMinButtonPixmap = new QPixmap( win_minbutton );
- m_pMaxButtonPixmap = new QPixmap( win_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( win_closebutton );
- m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( win_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( win_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( win_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( win_undockbutton );
}
else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
{
- m_pMinButtonPixmap = new QPixmap( kde_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde_undockbutton );
}
else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
{
- m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde2_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde2_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2_undockbutton );
}
else
{ // kde2laptop look
- m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde2laptop_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde2laptop_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton );
}
m_pUnixIcon->setAutoRaise( true );
@@ -1392,16 +1392,16 @@ void KMdiChildFrm::redecorateButtons()
m_pUndock->setPixmap( *m_pUndockButtonPixmap );
}
-QRect KMdiChildFrm::mdiAreaContentsRect() const
+TQRect KMdiChildFrm::mdiAreaContentsRect() const
{
- QFrame * p = ( QFrame* ) parentWidget();
+ TQFrame * p = ( TQFrame* ) parentWidget();
if ( p )
{
return p->contentsRect();
}
else
{
- QRect empty;
+ TQRect empty;
return empty;
}
}
diff --git a/kmdi/kmdichildfrm.h b/kmdi/kmdichildfrm.h
index 58959a42a..c6d1a6183 100644
--- a/kmdi/kmdichildfrm.h
+++ b/kmdi/kmdichildfrm.h
@@ -28,14 +28,14 @@
#ifndef _KMDI_CHILD_FRM_H_
#define _KMDI_CHILD_FRM_H_
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qdatetime.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
-#include <qdict.h>
+#include <tqdict.h>
#include "kmdichildfrmcaption.h"
@@ -53,8 +53,8 @@ class KMDI_EXPORT KMdiWin32IconButton : public QLabel
{
Q_OBJECT
public:
- KMdiWin32IconButton( QWidget* parent, const char* name = 0 );
- virtual void mousePressEvent( QMouseEvent* );
+ KMdiWin32IconButton( TQWidget* parent, const char* name = 0 );
+ virtual void mousePressEvent( TQMouseEvent* );
signals:
void pressed();
@@ -65,58 +65,58 @@ signals:
*/
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for move
+ * @short a TQCustomEvent for move
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmMoveEvent : public QCustomEvent
{
public:
- KMdiChildFrmMoveEvent( QMoveEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_Move ) ), e ) {}
+ KMdiChildFrmMoveEvent( TQMoveEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_Move ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for begin of dragging
+ * @short a TQCustomEvent for begin of dragging
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmDragBeginEvent : public QCustomEvent
{
public:
- KMdiChildFrmDragBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragBegin ) ), e ) {}
+ KMdiChildFrmDragBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragBegin ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for end of dragging
+ * @short a TQCustomEvent for end of dragging
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmDragEndEvent : public QCustomEvent
{
public:
- KMdiChildFrmDragEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragEnd ) ), e ) {}
+ KMdiChildFrmDragEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragEnd ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for begin of resizing
+ * @short a TQCustomEvent for begin of resizing
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmResizeBeginEvent : public QCustomEvent
{
public:
- KMdiChildFrmResizeBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {}
+ KMdiChildFrmResizeBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for end of resizing
+ * @short a TQCustomEvent for end of resizing
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmResizeEndEvent : public QCustomEvent
{
public:
- KMdiChildFrmResizeEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {}
+ KMdiChildFrmResizeEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {}
};
@@ -144,23 +144,23 @@ protected:
KMdiChildArea* m_pManager;
KMdiChildFrmCaption* m_pCaption;
KMdiWin32IconButton* m_pWinIcon;
- QToolButton* m_pUnixIcon;
- QToolButton* m_pMinimize;
- QToolButton* m_pMaximize;
- QToolButton* m_pClose;
- QToolButton* m_pUndock;
+ TQToolButton* m_pUnixIcon;
+ TQToolButton* m_pMinimize;
+ TQToolButton* m_pMaximize;
+ TQToolButton* m_pClose;
+ TQToolButton* m_pUndock;
MdiWindowState m_state;
- QRect m_restoredRect;
+ TQRect m_restoredRect;
int m_iResizeCorner;
int m_iLastCursorCorner;
bool m_bResizing;
bool m_bDragging;
- QPixmap* m_pIconButtonPixmap;
- QPixmap* m_pMinButtonPixmap;
- QPixmap* m_pMaxButtonPixmap;
- QPixmap* m_pRestoreButtonPixmap;
- QPixmap* m_pCloseButtonPixmap;
- QPixmap* m_pUndockButtonPixmap;
+ TQPixmap* m_pIconButtonPixmap;
+ TQPixmap* m_pMinButtonPixmap;
+ TQPixmap* m_pMaxButtonPixmap;
+ TQPixmap* m_pRestoreButtonPixmap;
+ TQPixmap* m_pCloseButtonPixmap;
+ TQPixmap* m_pUndockButtonPixmap;
/**
* Every child frame window has an temporary ID in the Window menu of the child area.
@@ -170,12 +170,12 @@ protected:
/**
* Imitates a system menu for child frame windows
*/
- QPopupMenu* m_pSystemMenu;
+ TQPopupMenu* m_pSystemMenu;
- QSize m_oldClientMinSize;
- QSize m_oldClientMaxSize;
- QLayout::ResizeMode m_oldLayoutResizeMode;
- QTime m_timeMeasure;
+ TQSize m_oldClientMinSize;
+ TQSize m_oldClientMaxSize;
+ TQLayout::ResizeMode m_oldLayoutResizeMode;
+ TQTime m_timeMeasure;
// methods
public:
@@ -202,17 +202,17 @@ public:
* Reparents the client widget to 0 (desktop), moves with an offset from the original position
* Removes the event filter.
*/
- void unsetClient( QPoint positionOffset = QPoint( 0, 0 ) );
+ void unsetClient( TQPoint positionOffset = TQPoint( 0, 0 ) );
/**
* Sets the window icon pointer.
*/
- void setIcon( const QPixmap &pxm );
+ void setIcon( const TQPixmap &pxm );
/**
* Returns the child frame icon.
*/
- QPixmap* icon() const;
+ TQPixmap* icon() const;
/**
* Enables or disables the close button
@@ -222,12 +222,12 @@ public:
/**
* Sets the caption of this window
*/
- void setCaption( const QString& text );
+ void setCaption( const TQString& text );
/**
* Gets the caption of this mdi child.
*/
- const QString& caption() { return m_pCaption->m_szCaption; }
+ const TQString& caption() { return m_pCaption->m_szCaption; }
/**
* Minimizes, Maximizes, or restores the window.
@@ -242,17 +242,17 @@ public:
/**
* Returns the inner client area of the parent of this (which is KMdiChildArea).
*/
- QRect mdiAreaContentsRect() const;
+ TQRect mdiAreaContentsRect() const;
/**
* Returns the geometry that will be restored by calling restore().
*/
- QRect restoreGeometry() const;
+ TQRect restoreGeometry() const;
/**
* Sets the geometry that will be restored by calling restore().
*/
- void setRestoreGeometry( const QRect& newRestGeo );
+ void setRestoreGeometry( const TQRect& newRestGeo );
/**
* Forces updating the rects of the caption and so...
@@ -263,7 +263,7 @@ public:
/**
* Returns the system menu.
*/
- QPopupMenu* systemMenu() const;
+ TQPopupMenu* systemMenu() const;
/**
* Returns the caption bar height
@@ -309,39 +309,39 @@ protected:
* Resizes the captionbar, relayouts the position of the system buttons,
* and calls resize for its embedded KMdiChildView with the proper size
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from the base class.
* Detects if the mouse is on the edge of window and what resize cursor must be set.
* Calls KMdiChildFrm::resizeWindow if it is in m_bResizing.
*/
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
/**
* Reimplemented from the base class.
* Colours the caption, raises the childfrm widget and
* turns to resize mode if it is on the edge (resize-sensitive area)
*/
- virtual void mousePressEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
/**
* Reimplemented from the base class.
* Sets a normal cursor and leaves the resize mode.
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Reimplemented from the base class.
* give its child view the chance to notify a childframe move... that's why it sends
* a KMdiChildMovedEvent to the embedded KMdiChildView .
*/
- virtual void moveEvent( QMoveEvent* me );
+ virtual void moveEvent( TQMoveEvent* me );
/**
* Reimplemented from the base class. If not in resize mode, it sets the mouse cursor to normal appearance.
*/
- virtual void leaveEvent( QEvent * );
+ virtual void leaveEvent( TQEvent * );
/**
* Reimplemented from the base class.
@@ -349,7 +349,7 @@ protected:
* -the client's mousebutton press events which raises and activates the childframe
* -the client's resize event which resizes this widget as well
*/
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
/**
* Calculates the new geometry from the new mouse position given as parameters
@@ -422,13 +422,13 @@ protected:
* Restore the focus policies for _all_ widgets in the view using the list given as parameter.
* Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/
- void linkChildren( QDict<FocusPolicy>* pFocPolDict );
+ void linkChildren( TQDict<FocusPolicy>* pFocPolDict );
/**
* Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent.
* Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/
- QDict<QWidget::FocusPolicy>* unlinkChildren();
+ TQDict<TQWidget::FocusPolicy>* unlinkChildren();
/**
* Calculates the corner id for the resize cursor. The return value can be tested for:
diff --git a/kmdi/kmdichildfrmcaption.cpp b/kmdi/kmdichildfrmcaption.cpp
index 815d07d44..65d348f30 100644
--- a/kmdi/kmdichildfrmcaption.cpp
+++ b/kmdi/kmdichildfrmcaption.cpp
@@ -28,11 +28,11 @@
#include "kmdichildfrmcaption.h"
#include "kmdichildfrmcaption.moc"
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
#include "kmdidefines.h"
#include "kmdichildfrm.h"
@@ -66,7 +66,7 @@
//============== KMdiChildFrmCaption =============//
KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent )
- : QWidget( parent, "kmdi_childfrmcaption" )
+ : TQWidget( parent, "kmdi_childfrmcaption" )
{
m_szCaption = i18n( "Unnamed" );
m_bActive = false;
@@ -83,14 +83,14 @@ KMdiChildFrmCaption::~KMdiChildFrmCaption()
//============= mousePressEvent ==============//
-void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
{
setMouseTracking( false );
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
{
- QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
}
m_pParent->m_bDragging = true;
m_offset = mapToParent( e->pos() );
@@ -103,12 +103,12 @@ void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e )
//============= mouseReleaseEvent ============//
-void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
{
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
releaseMouse();
if ( m_pParent->m_bDragging )
@@ -119,7 +119,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmDragEndEvent ue( e );
if ( m_pParent->m_pClient != 0L )
- QApplication::sendEvent( m_pParent->m_pClient, &ue );
+ TQApplication::sendEvent( m_pParent->m_pClient, &ue );
m_bChildInDrag = false;
}
@@ -128,7 +128,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
}
//============== mouseMoveEvent =============//
-void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mouseMoveEvent( TQMouseEvent *e )
{
if ( !m_pParent->m_bDragging )
return ;
@@ -138,12 +138,12 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmDragBeginEvent ue( e );
if ( m_pParent->m_pClient != 0L )
- QApplication::sendEvent( m_pParent->m_pClient, &ue );
+ TQApplication::sendEvent( m_pParent->m_pClient, &ue );
m_bChildInDrag = true;
}
- QPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() );
+ TQPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() );
// mouse out of child area? stop child frame dragging
if ( !m_pParent->m_pManager->rect().contains( relMousePosInChildArea ) )
@@ -160,7 +160,7 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
if ( relMousePosInChildArea.y() > m_pParent->m_pManager->height() )
relMousePosInChildArea.ry() = m_pParent->m_pManager->height();
}
- QPoint mousePosInChildArea = relMousePosInChildArea - m_offset;
+ TQPoint mousePosInChildArea = relMousePosInChildArea - m_offset;
// set new child frame position
parentWidget() ->move( mousePosInChildArea );
@@ -187,7 +187,7 @@ void KMdiChildFrmCaption::setActive( bool bActive )
//=============== setCaption ===============//
-void KMdiChildFrmCaption::setCaption( const QString& text )
+void KMdiChildFrmCaption::setCaption( const TQString& text )
{
m_szCaption = text;
repaint( false );
@@ -224,10 +224,10 @@ int KMdiChildFrmCaption::heightHint()
//=============== paintEvent ==============//
-void KMdiChildFrmCaption::paintEvent( QPaintEvent * )
+void KMdiChildFrmCaption::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QRect r = rect();
+ TQPainter p( this );
+ TQRect r = rect();
p.setFont( m_pParent->m_pManager->m_captionFont );
if ( m_bActive )
@@ -252,15 +252,15 @@ void KMdiChildFrmCaption::paintEvent( QPaintEvent * )
r.setLeft( r.left() + 30 );
int captionWidthForText = width() - 4 * m_pParent->m_pClose->width() - m_pParent->icon() ->width() - 5;
- QString text = abbreviateText( m_szCaption, captionWidthForText );
+ TQString text = abbreviateText( m_szCaption, captionWidthForText );
p.drawText( r, AlignVCenter | AlignLeft | SingleLine, text );
}
-QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
+TQString KMdiChildFrmCaption::abbreviateText( TQString origStr, int maxWidth )
{
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int actualWidth = fm.width( origStr );
int realLetterCount = origStr.length();
@@ -272,7 +272,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
newLetterCount = realLetterCount; // should be 0 anyway
int w = maxWidth + 1;
- QString s = origStr;
+ TQString s = origStr;
if ( newLetterCount <= 0 )
s = "";
@@ -291,7 +291,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
s = origStr.left( 1 );
}
}
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
w = fm.width( s );
newLetterCount--;
}
@@ -300,7 +300,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
//============= mouseDoubleClickEvent ===========//
-void KMdiChildFrmCaption::mouseDoubleClickEvent( QMouseEvent * )
+void KMdiChildFrmCaption::mouseDoubleClickEvent( TQMouseEvent * )
{
m_pParent->maximizePressed();
}
@@ -313,10 +313,10 @@ void KMdiChildFrmCaption::slot_moveViaSystemMenu()
grabMouse();
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
- QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
m_pParent->m_bDragging = true;
- m_offset = mapFromGlobal( QCursor::pos() );
+ m_offset = mapFromGlobal( TQCursor::pos() );
}
// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/kmdi/kmdichildfrmcaption.h b/kmdi/kmdichildfrmcaption.h
index 6100acc02..1bc47ac1f 100644
--- a/kmdi/kmdichildfrmcaption.h
+++ b/kmdi/kmdichildfrmcaption.h
@@ -27,7 +27,7 @@
#ifndef _KMDI_CHILD_FRM_CAPTION_H_
#define _KMDI_CHILD_FRM_CAPTION_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kmdidefines.h"
@@ -63,7 +63,7 @@ public:
/**
* Repaint with a new caption bar title
*/
- void setCaption( const QString& text );
+ void setCaption( const TQString& text );
/**
* Returns the caption bar height depending on the used font
@@ -80,40 +80,40 @@ protected:
/**
* Draws the caption bar and its title using the settings
*/
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
/**
* The same as KMdiChildFrmCaption::slot_moveViaSystemMenu
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Calls maximizePressed of the parent widget ( KMdiChildFrm )
*/
- virtual void mouseDoubleClickEvent( QMouseEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
/**
* Restore the normal mouse cursor, set the state variable back to 'not moving'
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move
*/
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
/**
* Computes a new abbreviated string from a given string depending on a given maximum width
* @todo Replace with a call to a KStringHandler function instead of rolling our own
*/
- QString abbreviateText( QString origStr, int maxWidth );
+ TQString abbreviateText( TQString origStr, int maxWidth );
// attributes
public:
/**
* the title string shown in the caption bar
*/
- QString m_szCaption;
+ TQString m_szCaption;
protected: // Protected attributes
/**
@@ -129,7 +129,7 @@ protected: // Protected attributes
/**
* the position offset related to its parent widget (internally used for translating mouse move positions
*/
- QPoint m_offset;
+ TQPoint m_offset;
/**
* True if the child knows that it is currently being dragged.
diff --git a/kmdi/kmdichildview.cpp b/kmdi/kmdichildview.cpp
index ffe30b652..37414fe0a 100644
--- a/kmdi/kmdichildview.cpp
+++ b/kmdi/kmdichildview.cpp
@@ -32,20 +32,20 @@
#include "kmdichildview.h"
#include "kmdichildview.moc"
-#include <qdatetime.h>
-#include <qobjectlist.h>
+#include <tqdatetime.h>
+#include <tqobjectlist.h>
#include "kmdimainfrm.h"
#include "kmdichildfrm.h"
#include "kmdidefines.h"
#include <kdebug.h>
#include <klocale.h>
-#include <qiconset.h>
+#include <tqiconset.h>
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, const char* name, WFlags f )
- : QWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, const char* name, WFlags f )
+ : TQWidget( parentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -73,8 +73,8 @@ KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, con
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( QWidget* parentWidget, const char* name, WFlags f )
- : QWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f )
+ : TQWidget( parentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -102,7 +102,7 @@ KMdiChildView::~KMdiChildView()
kdDebug( 760 ) << k_funcinfo << endl;
}
-void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
+void KMdiChildView::trackIconAndCaptionChanges( TQWidget *view )
{
m_trackChanges = view;
}
@@ -110,41 +110,41 @@ void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
//============== internal geometry ==============//
-QRect KMdiChildView::internalGeometry() const
+TQRect KMdiChildView::internalGeometry() const
{
if ( mdiParent() )
{ // is attached
// get the client area coordinates inside the MDI child frame
- QRect posInFrame = geometry();
+ TQRect posInFrame = geometry();
// map these values to the parent of the MDI child frame
// (this usually is the MDI child area) and return
- QPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
- QSize sz = size();
- return QRect( ptTopLeft, sz );
+ TQPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
+ TQSize sz = size();
+ return TQRect( ptTopLeft, sz );
}
else
{
- QRect geo = geometry();
- QRect frameGeo = externalGeometry();
- return QRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
+ TQRect geo = geometry();
+ TQRect frameGeo = externalGeometry();
+ return TQRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
// return geometry();
}
}
//============== set internal geometry ==============//
-void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
+void KMdiChildView::setInternalGeometry( const TQRect& newGeometry )
{
if ( mdiParent() )
{ // is attached
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
- QRect newGeoQt;
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
@@ -159,13 +159,13 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
else
{
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
- QRect newGeoQt;
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
@@ -180,14 +180,14 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
//============== external geometry ==============//
-QRect KMdiChildView::externalGeometry() const
+TQRect KMdiChildView::externalGeometry() const
{
return mdiParent() ? mdiParent()->frameGeometry() : frameGeometry();
}
//============== set external geometry ==============//
-void KMdiChildView::setExternalGeometry( const QRect& newGeometry )
+void KMdiChildView::setExternalGeometry( const TQRect& newGeometry )
{
if ( mdiParent() )
{ // is attached
@@ -196,16 +196,16 @@ void KMdiChildView::setExternalGeometry( const QRect& newGeometry )
else
{
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nTotalFrameWidth = frameGeo.width() - geo.width();
int nTotalFrameHeight = frameGeo.height() - geo.height();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
// not attached => the window system makes the frame
- QRect newGeoQt;
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() + nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() + nFrameSizeTop );
newGeoQt.setWidth( newGeometry.width() - nTotalFrameWidth );
@@ -234,7 +234,7 @@ void KMdiChildView::minimize( bool bAnimate )
void KMdiChildView::showMinimized()
{
emit isMinimizedNow();
- QWidget::showMinimized();
+ TQWidget::showMinimized();
}
//slot:
@@ -262,7 +262,7 @@ void KMdiChildView::maximize( bool bAnimate )
void KMdiChildView::showMaximized()
{
emit isMaximizedNow();
- QWidget::showMaximized();
+ TQWidget::showMaximized();
}
//slot:
@@ -273,7 +273,7 @@ void KMdiChildView::maximize()
//============== restoreGeometry ================//
-QRect KMdiChildView::restoreGeometry()
+TQRect KMdiChildView::restoreGeometry()
{
if ( mdiParent() )
return mdiParent() ->restoreGeometry();
@@ -283,7 +283,7 @@ QRect KMdiChildView::restoreGeometry()
//============== setRestoreGeometry ================//
-void KMdiChildView::setRestoreGeometry( const QRect& newRestGeo )
+void KMdiChildView::setRestoreGeometry( const TQRect& newRestGeo )
{
if ( mdiParent() )
mdiParent()->setRestoreGeometry( newRestGeo );
@@ -310,7 +310,7 @@ bool KMdiChildView::isMinimized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Minimized );
else
- return QWidget::isMinimized();
+ return TQWidget::isMinimized();
}
//============== isMaximized ? ==================//
@@ -320,7 +320,7 @@ bool KMdiChildView::isMaximized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Maximized );
else
- return QWidget::isMaximized();
+ return TQWidget::isMaximized();
}
//============== restore ================//
@@ -342,7 +342,7 @@ void KMdiChildView::restore()
void KMdiChildView::showNormal()
{
emit isRestoredNow();
- QWidget::showNormal();
+ TQWidget::showNormal();
}
//=============== youAreAttached ============//
@@ -363,28 +363,28 @@ void KMdiChildView::youAreDetached()
if ( myIconPtr() )
setIcon( *( myIconPtr() ) );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
emit isDetachedNow();
}
//================ setCaption ================//
// this set the caption of only the window
-void KMdiChildView::setCaption( const QString& szCaption )
+void KMdiChildView::setCaption( const TQString& szCaption )
{
// this will work only for window
m_szCaption = szCaption;
if ( mdiParent() )
mdiParent() ->setCaption( m_szCaption );
else //have to call the parent one
- QWidget::setCaption( m_szCaption );
+ TQWidget::setCaption( m_szCaption );
emit windowCaptionChanged( m_szCaption );
}
//============== closeEvent ================//
-void KMdiChildView::closeEvent( QCloseEvent *e )
+void KMdiChildView::closeEvent( TQCloseEvent *e )
{
e->ignore(); //we ignore the event , and then close later if needed.
emit childWindowCloseRequest( this );
@@ -392,19 +392,19 @@ void KMdiChildView::closeEvent( QCloseEvent *e )
//================ myIconPtr =================//
-QPixmap* KMdiChildView::myIconPtr()
+TQPixmap* KMdiChildView::myIconPtr()
{
return 0;
}
//============= focusInEvent ===============//
-void KMdiChildView::focusInEvent( QFocusEvent *e )
+void KMdiChildView::focusInEvent( TQFocusEvent *e )
{
- QWidget::focusInEvent( e );
+ TQWidget::focusInEvent( e );
// every widget get a focusInEvent when a popup menu is opened!?! -> maybe bug of QT
- if ( e && ( ( e->reason() ) == QFocusEvent::Popup ) )
+ if ( e && ( ( e->reason() ) == TQFocusEvent::Popup ) )
return ;
@@ -457,17 +457,17 @@ void KMdiChildView::activate()
//============= focusOutEvent ===============//
-void KMdiChildView::focusOutEvent( QFocusEvent* e )
+void KMdiChildView::focusOutEvent( TQFocusEvent* e )
{
- QWidget::focusOutEvent( e );
+ TQWidget::focusOutEvent( e );
emit lostFocus( this );
}
//============= resizeEvent ===============//
-void KMdiChildView::resizeEvent( QResizeEvent* e )
+void KMdiChildView::resizeEvent( TQResizeEvent* e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( m_stateChanged )
{
@@ -493,16 +493,16 @@ void KMdiChildView::slot_childDestroyed()
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const QObject * pLostChild = QObject::sender();
+ const TQObject * pLostChild = TQObject::sender();
if ( pLostChild && ( pLostChild->isWidgetType() ) )
{
- QObjectList* list = ( ( QObject* ) ( pLostChild ) ) ->queryList( "QWidget" );
+ TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" );
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject* obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
if ( m_firstFocusableChildWidget == widg )
@@ -519,16 +519,16 @@ void KMdiChildView::slot_childDestroyed()
}
//============= eventFilter ===============//
-bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
+bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress && isAttached() )
+ if ( e->type() == TQEvent::KeyPress && isAttached() )
{
- QKeyEvent* ke = ( QKeyEvent* ) e;
+ TQKeyEvent* ke = ( TQKeyEvent* ) e;
if ( ke->key() == Qt::Key_Tab )
{
- QWidget* w = ( QWidget* ) obj;
+ TQWidget* w = ( TQWidget* ) obj;
FocusPolicy wfp = w->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || w->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_lastFocusableChildWidget != 0 )
{
@@ -541,13 +541,13 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::FocusIn )
+ else if ( e->type() == TQEvent::FocusIn )
{
if ( obj->isWidgetType() )
{
- QObjectList * list = queryList( "QWidget" );
+ TQObjectList * list = queryList( "TQWidget" );
if ( list->find( obj ) != -1 )
- m_focusedChildWidget = ( QWidget* ) obj;
+ m_focusedChildWidget = ( TQWidget* ) obj;
delete list; // delete the list, not the objects
}
@@ -562,24 +562,24 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::ChildRemoved )
+ else if ( e->type() == TQEvent::ChildRemoved )
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject * pLostChild = ( ( QChildEvent* ) e ) ->child();
+ TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child();
if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) )
{
- QObjectList * list = pLostChild->queryList( "QWidget" );
+ TQObjectList * list = pLostChild->queryList( "TQWidget" );
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * o;
while ( ( o = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) o;
+ TQWidget * widg = ( TQWidget* ) o;
++it;
widg->removeEventFilter( this );
FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_firstFocusableChildWidget == widg )
m_firstFocusableChildWidget = 0L; // reset first widget
@@ -591,29 +591,29 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
delete list; // delete the list, not the objects
}
}
- else if ( e->type() == QEvent::ChildInserted )
+ else if ( e->type() == TQEvent::ChildInserted )
{
// if we got a new child and we are attached to the MDI system we
// install ourself as event filter for the new child and its children
// (as we did when we were added to the MDI system).
- QObject * pNewChild = ( ( QChildEvent* ) e ) ->child();
+ TQObject * pNewChild = ( ( TQChildEvent* ) e ) ->child();
if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) )
{
- QWidget * pNewWidget = ( QWidget* ) pNewChild;
+ TQWidget * pNewWidget = ( TQWidget* ) pNewChild;
if ( pNewWidget->testWFlags( Qt::WType_Dialog | Qt::WShowModal ) )
return false;
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * o;
while ( ( o = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) o;
+ TQWidget * widg = ( TQWidget* ) o;
++it;
widg->installEventFilter( this );
- connect( widg, SIGNAL( destroyed() ), this, SLOT( slot_childDestroyed() ) );
+ connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) );
FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_firstFocusableChildWidget == 0 )
m_firstFocusableChildWidget = widg; // first widge
@@ -626,15 +626,15 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
else
{
- if ( e->type() == QEvent::IconChange )
+ if ( e->type() == TQEvent::IconChange )
{
- // qDebug("KMDiChildView:: QEvent:IconChange intercepted\n");
+ // qDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
if ( obj == this )
- iconUpdated( this, icon() ? ( *icon() ) : QPixmap() );
+ iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
else if ( obj == m_trackChanges )
- setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : QPixmap() );
+ setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() );
}
- if ( e->type() == QEvent::CaptionChange )
+ if ( e->type() == TQEvent::CaptionChange )
{
if ( obj == this )
captionUpdated( this, caption() );
@@ -647,41 +647,41 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
/** Switches interposing in event loop of all current child widgets off. */
void KMdiChildView::removeEventFilterForAllChildren()
{
- QObjectList* list = queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets
- QObject* obj;
+ TQObjectList* list = queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
}
delete list; // delete the list, not the objects
}
-QWidget* KMdiChildView::focusedChildWidget()
+TQWidget* KMdiChildView::focusedChildWidget()
{
return m_focusedChildWidget;
}
-void KMdiChildView::setFirstFocusableChildWidget( QWidget* firstFocusableChildWidget )
+void KMdiChildView::setFirstFocusableChildWidget( TQWidget* firstFocusableChildWidget )
{
m_firstFocusableChildWidget = firstFocusableChildWidget;
}
-void KMdiChildView::setLastFocusableChildWidget( QWidget* lastFocusableChildWidget )
+void KMdiChildView::setLastFocusableChildWidget( TQWidget* lastFocusableChildWidget )
{
m_lastFocusableChildWidget = lastFocusableChildWidget;
}
/** Set a new value of the task bar button caption */
-void KMdiChildView::setTabCaption ( const QString& stbCaption )
+void KMdiChildView::setTabCaption ( const TQString& stbCaption )
{
m_sTabCaption = stbCaption;
emit tabCaptionChanged( m_sTabCaption );
}
-void KMdiChildView::setMDICaption ( const QString& caption )
+void KMdiChildView::setMDICaption ( const TQString& caption )
{
setCaption( caption );
setTabCaption( caption );
@@ -714,7 +714,7 @@ void KMdiChildView::slot_clickedInDockMenu()
void KMdiChildView::setMinimumSize( int minw, int minh )
{
- QWidget::setMinimumSize( minw, minh );
+ TQWidget::setMinimumSize( minw, minh );
if ( mdiParent() && mdiParent()->state() != KMdiChildFrm::Minimized )
{
mdiParent() ->setMinimumSize( minw + KMDI_CHILDFRM_DOUBLE_BORDER,
@@ -738,7 +738,7 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh )
mdiParent()->setMaximumSize( w, h );
}
- QWidget::setMaximumSize( maxw, maxh );
+ TQWidget::setMaximumSize( maxw, maxh );
}
//============= show ===============//
@@ -748,7 +748,7 @@ void KMdiChildView::show()
if ( mdiParent() )
mdiParent()->show();
- QWidget::show();
+ TQWidget::show();
}
//============= hide ===============//
@@ -758,7 +758,7 @@ void KMdiChildView::hide()
if ( mdiParent() )
mdiParent()->hide();
- QWidget::hide();
+ TQWidget::hide();
}
//============= raise ===============//
@@ -768,7 +768,7 @@ void KMdiChildView::raise()
if ( mdiParent() ) //TODO Check Z-order
mdiParent()->raise();
- QWidget::raise();
+ TQWidget::raise();
}
// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/kmdi/kmdichildview.h b/kmdi/kmdichildview.h
index fda0b95bc..656c17fd7 100644
--- a/kmdi/kmdichildview.h
+++ b/kmdi/kmdichildview.h
@@ -31,11 +31,11 @@
#ifndef _KMDI_CHILD_VIEW_H_
#define _KMDI_CHILD_VIEW_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include "kmdichildfrm.h"
@@ -65,18 +65,18 @@ class KMdiChildViewPrivate;
* or you wrap them by a KMdiChildView somehow like this:
*
* \code
- * void DocViewMan::addKMdiFrame(QWidget* pNewView, bool bShow, const QPixmap& icon)
+ * void DocViewMan::addKMdiFrame(TQWidget* pNewView, bool bShow, const TQPixmap& icon)
* {
* // cover it by a KMdi childview and add that MDI system
* KMdiChildView* pMDICover = new KMdiChildView( pNewView->caption());
* pMDICover->setIcon(icon);
* m_MDICoverList.append( pMDICover);
- * QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout");
- * pNewView->reparent( pMDICover, QPoint(0,0));
+ * TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout");
+ * pNewView->reparent( pMDICover, TQPoint(0,0));
* pLayout->addWidget( pNewView);
* pMDICover->setName( pNewView->name());
* // captions
- * QString shortName = pNewView->caption();
+ * TQString shortName = pNewView->caption();
* int length = shortName.length();
* shortName = shortName.right(length - (shortName.findRev('/') +1));
* pMDICover->setTabCaption( shortName);
@@ -94,7 +94,7 @@ class KMdiChildViewPrivate;
* flags = KMdi::Hide;
* }
* // set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
- * connect( m_pParent, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(initKeyAccel(QWidget*)) );
+ * connect( m_pParent, TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), this, TQT_SLOT(initKeyAccel(TQWidget*)) );
*
* m_pParent->addWindow( pMDICover, flags);
* // correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses)
@@ -116,27 +116,27 @@ protected:
/**
* See KMdiChildView::caption
*/
- QString m_szCaption;
+ TQString m_szCaption;
/**
* See KMdiChildView::tabCaption
*/
- QString m_sTabCaption;
+ TQString m_sTabCaption;
/**
* See KMdiChildView::focusedChildWidget
*/
- QWidget* m_focusedChildWidget;
+ TQWidget* m_focusedChildWidget;
/**
* See KMdiChildView::setFirstFocusableChildWidget
*/
- QWidget* m_firstFocusableChildWidget;
+ TQWidget* m_firstFocusableChildWidget;
/**
* See KMdiChildView::setLastFocusableChildWidget
*/
- QWidget* m_lastFocusableChildWidget;
+ TQWidget* m_lastFocusableChildWidget;
/**
* Every child view window has an temporary ID in the Window menu of the main frame.
@@ -152,7 +152,7 @@ protected:
/**
* Holds the time when this view was activated (not only displayed) for the last time.
*/
- QDateTime m_time;
+ TQDateTime m_time;
private:
/**
@@ -182,13 +182,13 @@ public:
/**
* Constructor
*/
- KMdiChildView( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+ KMdiChildView( const TQString& caption, TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
/**
* Constructor
* sets "Unnamed" as default caption
*/
- KMdiChildView( QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+ KMdiChildView( TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
/**
* Destructor
@@ -208,17 +208,17 @@ public:
/**
* Memorizes the first focusable child widget of this widget
*/
- void setFirstFocusableChildWidget( QWidget* );
+ void setFirstFocusableChildWidget( TQWidget* );
/**
* Memorizes the last focusable child widget of this widget
*/
- void setLastFocusableChildWidget( QWidget* );
+ void setLastFocusableChildWidget( TQWidget* );
/**
* Returns the current focused child widget of this widget
*/
- QWidget* focusedChildWidget();
+ TQWidget* focusedChildWidget();
/**
* Returns true if the MDI view is a child window within the MDI mainframe widget
@@ -229,28 +229,28 @@ public:
/**
* Returns the caption of the child window (different from the caption on the button in the taskbar)
*/
- const QString& caption() const { return m_szCaption; }
+ const TQString& caption() const { return m_szCaption; }
/**
* Returns the caption of the button on the taskbar
*/
- const QString& tabCaption() const { return m_sTabCaption; }
+ const TQString& tabCaption() const { return m_sTabCaption; }
/**
* Sets the window caption string...
* Calls updateButton on the taskbar button if it has been set.
*/
- virtual void setCaption( const QString& szCaption );
+ virtual void setCaption( const TQString& szCaption );
/**
* Sets the caption of the button referring to this window
*/
- virtual void setTabCaption( const QString& caption );
+ virtual void setTabCaption( const TQString& caption );
/**
* Sets the caption of both the window and the button on the taskbar
*/
- virtual void setMDICaption( const QString &caption );
+ virtual void setMDICaption( const TQString &caption );
/**
* Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
@@ -270,37 +270,37 @@ public:
bool isMaximized() const;
/**
- * Returns the geometry of this MDI child window as QWidget::geometry() does.
+ * Returns the geometry of this MDI child window as TQWidget::geometry() does.
*/
- QRect internalGeometry() const;
+ TQRect internalGeometry() const;
/**
* Sets the geometry of the client area of this MDI child window. The
* top left position of the argument is the position of the top left point
* of the client area in its parent coordinates and the arguments width
* and height is the width and height of the client area. Please note: This
- * differs from the behavior of QWidget::setGeometry()!
+ * differs from the behavior of TQWidget::setGeometry()!
*/
- void setInternalGeometry( const QRect& newGeomety );
+ void setInternalGeometry( const TQRect& newGeomety );
/**
* Returns the frame geometry of this window or of the parent if there is any...
*/
- QRect externalGeometry() const;
+ TQRect externalGeometry() const;
/**
* Sets the geometry of the frame of this MDI child window. The top left
* position of the argument is the position of the top left point of the
* frame in its parent coordinates and the arguments width and height is
* the width and height of the widget frame. Please note: This differs
- * from the behavior of QWidget::setGeometry()!
+ * from the behavior of TQWidget::setGeometry()!
*/
- void setExternalGeometry( const QRect& newGeomety );
+ void setExternalGeometry( const TQRect& newGeomety );
/**
* You should override this function in the derived class.
*/
- virtual QPixmap* myIconPtr();
+ virtual TQPixmap* myIconPtr();
/**
* Minimizes this window when it is attached to the Mdi manager.
@@ -317,12 +317,12 @@ public:
/**
* Returns the geometry that will be restored by calling restore().
*/
- QRect restoreGeometry();
+ TQRect restoreGeometry();
/**
* Sets the geometry that will be restored by calling restore().
*/
- void setRestoreGeometry( const QRect& newRestGeo );
+ void setRestoreGeometry( const TQRect& newRestGeo );
/**
* Switches interposing in event loop of all current child widgets off.
@@ -358,14 +358,14 @@ public:
*/
inline void updateTimeStamp()
{
- m_time.setDate( QDate::currentDate() );
- m_time.setTime( QTime::currentTime() );
+ m_time.setDate( TQDate::currentDate() );
+ m_time.setTime( TQTime::currentTime() );
}
/**
* Recall a previously remembered time, i.e. the value of m_time
*/
- inline const QDateTime& getTimeStamp() const { return m_time; }
+ inline const TQDateTime& getTimeStamp() const { return m_time; }
public slots:
/**
@@ -385,14 +385,14 @@ public slots:
/**
* Mimimizes the MDI view. If attached, the covering childframe widget is minimized (only a mini widget
* showing the caption bar and the system buttons will remain visible). If detached, it will use the
- * minimize of the underlying system ( QWidget::showMinimized ).
+ * minimize of the underlying system ( TQWidget::showMinimized ).
*/
virtual void minimize();
/**
* Maximizes the MDI view. If attached, this widget will fill the whole MDI view area widget. The system buttons
* move to the main menubar (if set by KMdiMainFrm::setMenuForSDIModeSysButtons ).
- * If detached, it will use the minimize of the underlying system ( QWidget::showMaximized ).
+ * If detached, it will use the minimize of the underlying system ( TQWidget::showMaximized ).
*/
virtual void maximize();
@@ -424,17 +424,17 @@ public slots:
virtual void slot_clickedInDockMenu();
/**
- * Calls QWidget::show but also for it's parent widget if attached
+ * Calls TQWidget::show but also for it's parent widget if attached
*/
virtual void show();
/**
- * Calls QWidget::hide() or it's parent widget hide() if attached
+ * Calls TQWidget::hide() or it's parent widget hide() if attached
*/
virtual void hide();
/**
- * Calls QWidget::raise() or it's parent widget raise() if attached
+ * Calls TQWidget::raise() or it's parent widget raise() if attached
*/
virtual void raise();
@@ -462,15 +462,15 @@ protected:
* Ignores the event and calls KMdiMainFrm::childWindowCloseRequest instead. This is because the
* mainframe has control over the views. Therefore the MDI view has to request the mainframe for a close.
*/
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
/**
- * It only catches QEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus
+ * It only catches TQEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus
* handling is called. That means if the last focusable child widget of this is called, it will jump to the
* first focusable child widget of this.
* See KMdiChildView::setFirstFocusableChildWidget and KMdiChildView::lastFirstFocusableChildWidget
*/
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
/**
* If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the
@@ -478,19 +478,19 @@ protected:
* Sends the focusInEventOccurs signal before changing the focus and the
* gotFocus signal after changing the focus.
*/
- virtual void focusInEvent( QFocusEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
/**
* Send the lostFocus signal
*/
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
/**
* Internally used for the minimize/maximize/restore mechanism when in attach mode.
*/
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
- void trackIconAndCaptionChanges( QWidget *view );
+ void trackIconAndCaptionChanges( TQWidget *view );
protected slots:
void slot_childDestroyed();
@@ -544,12 +544,12 @@ signals:
/**
* Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption
*/
- void windowCaptionChanged( const QString& );
+ void windowCaptionChanged( const TQString& );
/**
* Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption
*/
- void tabCaptionChanged( const QString& );
+ void tabCaptionChanged( const TQString& );
/**
* Internally used to send information to the mainframe that this MDI view is maximized now.
@@ -592,18 +592,18 @@ signals:
*/
void isDetachedNow();
- void iconUpdated( QWidget*, QPixmap );
- void captionUpdated( QWidget*, const QString& );
+ void iconUpdated( TQWidget*, TQPixmap );
+ void captionUpdated( TQWidget*, const TQString& );
private:
KMdiChildViewPrivate *d;
- QWidget *m_trackChanges;
+ TQWidget *m_trackChanges;
};
inline KMdiChildFrm *KMdiChildView::mdiParent() const
{
- QWidget * pw = parentWidget();
+ TQWidget * pw = parentWidget();
if ( pw != 0L )
if ( pw->inherits( "KMdiChildFrm" ) )
return ( KMdiChildFrm * ) pw;
diff --git a/kmdi/kmdidefines.h b/kmdi/kmdidefines.h
index 503432352..16be290a6 100644
--- a/kmdi/kmdidefines.h
+++ b/kmdi/kmdidefines.h
@@ -41,10 +41,10 @@
namespace KMdi
{
/** extent Qt events
- @see QCustomEvent, QEvent::User
+ @see TQCustomEvent, TQEvent::User
\code
- bool B_MyWidget::event( QEvent* e) {
- if( e->type() == QEvent::Type(QEvent::User + int(KMdi::EV_Move))) {
+ bool B_MyWidget::event( TQEvent* e) {
+ if( e->type() == TQEvent::Type(TQEvent::User + int(KMdi::EV_Move))) {
...
}
...
diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp
index dd9c32b4d..df82a4e6c 100644
--- a/kmdi/kmdidockcontainer.cpp
+++ b/kmdi/kmdidockcontainer.cpp
@@ -23,10 +23,10 @@
#include "kdockwidget_private.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kmultitabbar.h>
#include <kglobalsettings.h>
@@ -49,8 +49,8 @@ static const char* const kmdi_not_close_xpm[] =
"#####"
};
-KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags )
- : QWidget( parent ), KDockContainer()
+KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags )
+ : TQWidget( parent ), KDockContainer()
{
m_tabSwitching = false;
m_block = false;
@@ -65,14 +65,14 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio
m_startEvent = 0;
kdDebug( 760 ) << k_funcinfo << endl;
- QBoxLayout *l;
+ TQBoxLayout *l;
m_horizontal = ( ( position == KDockWidget::DockTop ) || ( position == KDockWidget::DockBottom ) );
if ( m_horizontal )
- l = new QVBoxLayout( this ); //vertical layout for top and bottom docks
+ l = new TQVBoxLayout( this ); //vertical layout for top and bottom docks
else
- l = new QHBoxLayout( this ); //horizontal layout for left and right docks
+ l = new TQHBoxLayout( this ); //horizontal layout for left and right docks
l->setAutoAdd( false );
@@ -102,9 +102,9 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio
}
m_tb->setPosition( kmtbPos );
- m_ws = new QWidgetStack( this );
+ m_ws = new TQWidgetStack( this );
- m_ws->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ m_ws->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
//layout the tabbar
if ( position == KDockWidget::DockLeft || position == KDockWidget::DockTop )
@@ -133,7 +133,7 @@ void KMdiDockContainer::setStyle( int style )
KMdiDockContainer::~KMdiDockContainer()
{
- QMap<KDockWidget*, int>::iterator it;
+ TQMap<KDockWidget*, int>::iterator it;
while ( m_map.count() )
{
it = m_map.begin();
@@ -183,7 +183,7 @@ KDockWidget* KMdiDockContainer::parentDockWidget()
return ( ( KDockWidget* ) parent() );
}
-void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const QString &text, int & )
+void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int & )
{
kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl;
KDockWidget* w = dwdg;
@@ -215,7 +215,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
- QToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
+ TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
btn->setToggleButton( true );
btn->setPixmap( const_cast< const char** >( kmdi_not_close_xpm ) );
@@ -223,7 +223,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
m_overlapButtons.insert( w, btn );
btn->setOn( !isOverlapMode() );
- connect( btn, SIGNAL( clicked() ), this, SLOT( changeOverlapMode() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeOverlapMode() ) );
}
m_tb->appendTab( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap, tab, w->tabPageLabel() );
@@ -231,7 +231,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
kdDebug( 760 ) << k_funcinfo << "Added tab with label " << w->tabPageLabel() <<
" to the tabbar" << endl;
- connect( m_tb->tab( tab ), SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) );
+ connect( m_tb->tab( tab ), TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( tabClicked( int ) ) );
mTabCnt++;
m_inserted = tab;
@@ -246,11 +246,11 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
}
-bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event )
+bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
{
switch ( event->type() )
{
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
KMultiTabBarTab* kmtbTab = dynamic_cast<KMultiTabBarTab*>( obj );
if ( !kmtbTab )
@@ -286,21 +286,21 @@ bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event )
m_movingState = WaitingForMoveStart;
delete m_startEvent;
- m_startEvent = new QMouseEvent( * ( ( QMouseEvent* ) event ) );
+ m_startEvent = new TQMouseEvent( * ( ( TQMouseEvent* ) event ) );
}
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if ( m_movingState == Moving )
{
m_movingState = NotMoving;
- QApplication::postEvent( m_dragPanel, new QMouseEvent( * ( ( QMouseEvent* ) event ) ) );
+ TQApplication::postEvent( m_dragPanel, new TQMouseEvent( * ( ( TQMouseEvent* ) event ) ) );
delete m_startEvent;
m_startEvent = 0;
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( m_movingState == WaitingForMoveStart )
{
- QPoint p( ( ( QMouseEvent* ) event )->pos() - m_startEvent->pos() );
+ TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() );
if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
{
m_dockManager->eventFilter( m_dragPanel, m_startEvent );
@@ -352,7 +352,7 @@ void KMdiDockContainer::changeOverlapMode()
deactivateOverlapMode();
}
- QMap<KDockWidget*, KDockButton_Private*>::iterator it;
+ TQMap<KDockWidget*, KDockButton_Private*>::iterator it;
for ( it = m_overlapButtons.begin(); it != m_overlapButtons.end(); ++it )
it.data()->setOn( !isOverlapMode() );
}
@@ -494,16 +494,16 @@ void KMdiDockContainer::tabClicked( int t )
m_tabSwitching = false;
}
-void KMdiDockContainer::setToolTip ( KDockWidget* w, QString &s )
+void KMdiDockContainer::setToolTip ( KDockWidget* w, TQString &s )
{
kdDebug( 760 ) << k_funcinfo << "Setting tooltip '" << s << "' for widget " << w << endl;
int tabId = m_map[w];
KMultiTabBarTab *mbTab = m_tb->tab( tabId );
- QToolTip::remove( mbTab );
- QToolTip::add( mbTab, s );
+ TQToolTip::remove( mbTab );
+ TQToolTip::add( mbTab, s );
}
-void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap )
+void KMdiDockContainer::setPixmap( KDockWidget* widget , const TQPixmap& pixmap )
{
int id = m_ws->id( widget );
if ( id == -1 )
@@ -512,25 +512,25 @@ void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap )
tab->setIcon( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap );
}
-void KMdiDockContainer::save( QDomElement& dockEl )
+void KMdiDockContainer::save( TQDomElement& dockEl )
{
- QDomDocument doc = dockEl.ownerDocument();
- QDomElement el;
+ TQDomDocument doc = dockEl.ownerDocument();
+ TQDomElement el;
el = doc.createElement( "name" );
- el.appendChild( doc.createTextNode( QString( "%1" ).arg( parent() ->name() ) ) );
+ el.appendChild( doc.createTextNode( TQString( "%1" ).arg( parent() ->name() ) ) );
dockEl.appendChild( el );
el = doc.createElement( "overlapMode" );
el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) );
dockEl.appendChild( el );
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQStringList::Iterator it2 = itemNames.begin();
int i = 0;
for ( ;it.current() != 0;++it, ++it2 )
{
el = doc.createElement( "child" );
- el.setAttribute( "pos", QString( "%1" ).arg( i ) );
- QString s = tabCaptions[ *it2 ];
+ el.setAttribute( "pos", TQString( "%1" ).arg( i ) );
+ TQString s = tabCaptions[ *it2 ];
if ( !s.isEmpty() )
{
el.setAttribute( "tabCaption", s );
@@ -544,7 +544,7 @@ void KMdiDockContainer::save( QDomElement& dockEl )
dockEl.appendChild( el );
if ( m_tb->isTabRaised( it.current() ->id() ) )
{
- QDomElement el2 = doc.createElement( "raised" );
+ TQDomElement el2 = doc.createElement( "raised" );
el2.appendChild( doc.createTextNode( m_ws->widget( it.current() ->id() ) ->name() ) );
el.appendChild( el2 );
}
@@ -554,13 +554,13 @@ void KMdiDockContainer::save( QDomElement& dockEl )
}
-void KMdiDockContainer::load( QDomElement& dockEl )
+void KMdiDockContainer::load( TQDomElement& dockEl )
{
- QString raise;
+ TQString raise;
- for ( QDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() )
+ for ( TQDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() )
{
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
if ( el.isNull() )
continue;
if ( el.tagName() == "overlapMode" )
@@ -588,8 +588,8 @@ void KMdiDockContainer::load( QDomElement& dockEl )
}
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1( *tl );
m_ws->hide();
if ( !m_horizontal )
parentDockWidget()->setForcedFixedWidth( m_tb->width() );
@@ -602,18 +602,18 @@ void KMdiDockContainer::load( QDomElement& dockEl )
kapp->syncX();
m_delayedRaise = -1;
- for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
{
if ( it.key() ->name() == raise )
{
m_delayedRaise = it.data();
- QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) );
kdDebug( 760 ) << k_funcinfo << "raising " << it.key()->name() << endl;
break;
}
@@ -621,14 +621,14 @@ void KMdiDockContainer::load( QDomElement& dockEl )
}
if ( m_delayedRaise == -1 )
- QTimer::singleShot( 0, this, SLOT( init() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( init() ) );
}
-void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
+void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
{
- QString grp = cfg->group();
- cfg->deleteGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
- cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+ TQString grp = cfg->group();
+ cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
+ cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
if ( isOverlapMode() )
cfg->writeEntry( "overlapMode", "true" );
@@ -644,23 +644,23 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQStringList::Iterator it2 = itemNames.begin();
int i = 0;
for ( ;it.current() != 0;++it, ++it2 )
{
- // cfg->writeEntry(QString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
- cfg->writeEntry( QString( "widget%1" ).arg( i ), ( *it2 ) );
- QString s = tabCaptions[ *it2 ];
+ // cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
+ cfg->writeEntry( TQString( "widget%1" ).arg( i ), ( *it2 ) );
+ TQString s = tabCaptions[ *it2 ];
if ( !s.isEmpty() )
{
- cfg->writeEntry( QString( "widget%1-tabCaption" ).arg( i ), s );
+ cfg->writeEntry( TQString( "widget%1-tabCaption" ).arg( i ), s );
}
s = tabTooltips[ *it2 ];
if ( !s.isEmpty() )
{
- cfg->writeEntry( QString( "widget%1-tabTooltip" ).arg( i ), s );
+ cfg->writeEntry( TQString( "widget%1-tabTooltip" ).arg( i ), s );
}
// kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl;
if ( m_tb->isTabRaised( it.current() ->id() ) )
@@ -672,10 +672,10 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
}
-void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
+void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix )
{
- QString grp = cfg->group();
- cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+ TQString grp = cfg->group();
+ cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
if ( cfg->readEntry( "overlapMode" ) != "false" )
activateOverlapMode( m_horizontal?m_tb->height():m_tb->width() );
@@ -685,22 +685,22 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
m_separatorPos = cfg->readNumEntry( "separatorPosition", 18000 );
int i = 0;
- QString raise;
+ TQString raise;
while ( true )
{
- QString dwn = cfg->readEntry( QString( "widget%1" ).arg( i ) );
+ TQString dwn = cfg->readEntry( TQString( "widget%1" ).arg( i ) );
if ( dwn.isEmpty() )
break;
kdDebug( 760 ) << k_funcinfo << "configuring dockwidget :" << dwn << endl;
KDockWidget *dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( dwn );
if ( dw )
{
- QString s = cfg->readEntry( QString( "widget%1-tabCaption" ).arg( i ) );
+ TQString s = cfg->readEntry( TQString( "widget%1-tabCaption" ).arg( i ) );
if ( !s.isEmpty() )
{
dw->setTabPageLabel( s );
}
- s = cfg->readEntry( QString( "widget%1-tabTooltip" ).arg( i ) );
+ s = cfg->readEntry( TQString( "widget%1-tabTooltip" ).arg( i ) );
if ( !s.isEmpty() )
{
dw->setToolTipString( s );
@@ -713,8 +713,8 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1( *tl );
m_ws->hide();
if ( !m_horizontal )
parentDockWidget() ->setForcedFixedWidth( m_tb->width() );
@@ -727,13 +727,13 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
kapp->syncX();
m_delayedRaise = -1;
- for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
{
if ( it.key() ->name() == raise )
{
@@ -745,7 +745,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
kapp->syncX();*/
m_delayedRaise = it.data();
- QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) );
kdDebug( 760 ) << k_funcinfo << "raising" << it.key() ->name() << endl;
break;
}
@@ -753,7 +753,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
}
if ( m_delayedRaise == -1 )
- QTimer::singleShot( 0, this, SLOT( init() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( init() ) );
cfg->setGroup( grp );
}
@@ -772,8 +772,8 @@ void KMdiDockContainer::collapseOverlapped()
if ( isOverlapMode() )
{
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
for ( ;it.current();++it )
{
if ( it.current()->isOn() )
@@ -817,7 +817,7 @@ void KMdiDockContainer::toggle()
void KMdiDockContainer::prevToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
- QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
int pos = tabs->findRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
@@ -838,7 +838,7 @@ void KMdiDockContainer::prevToolView()
void KMdiDockContainer::nextToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
- QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
int pos = tabs->findRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
diff --git a/kmdi/kmdidockcontainer.h b/kmdi/kmdidockcontainer.h
index 917dac4d0..e13b73712 100644
--- a/kmdi/kmdidockcontainer.h
+++ b/kmdi/kmdidockcontainer.h
@@ -20,26 +20,26 @@
#ifndef _KMDI_DOCK_CONTAINER_
#define _KMDI_DOCK_CONTAINER_
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdockwidget.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdom.h>
# include <kdockwidget_p.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QWidgetStack;
class KMultiTabBar;
class KDockButton_Private;
-class KMDI_EXPORT KMdiDockContainer: public QWidget, public KDockContainer
+class KMDI_EXPORT KMdiDockContainer: public TQWidget, public KDockContainer
{
Q_OBJECT
public:
- KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags );
+ KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags );
virtual ~KMdiDockContainer();
/** Get the KDockWidget that is our parent */
@@ -49,7 +49,7 @@ public:
* Add a widget to this container
* \param w the KDockWidget we are adding
*/
- virtual void insertWidget ( KDockWidget *w, QPixmap, const QString &, int & );
+ virtual void insertWidget ( KDockWidget *w, TQPixmap, const TQString &, int & );
/**
* Show a widget.
@@ -64,12 +64,12 @@ public:
* Set the tooltip for the widget.
* Currently, this method does nothing
*/
- virtual void setToolTip ( KDockWidget *, QString & );
+ virtual void setToolTip ( KDockWidget *, TQString & );
/**
* Set the pixmap for the widget.
*/
- virtual void setPixmap( KDockWidget* widget, const QPixmap& pixmap );
+ virtual void setPixmap( KDockWidget* widget, const TQPixmap& pixmap );
/**
* Undock the widget from the container.
@@ -94,7 +94,7 @@ public:
* dockwidget's name will be the group the configuration is saved in
* \param group_or_prefix the prefix to append to the parent dockwidget's name
*/
- virtual void save( KConfig *, const QString& group_or_prefix );
+ virtual void save( KConfig *, const TQString& group_or_prefix );
/**
* Load the config using a KConfig object
@@ -103,17 +103,17 @@ public:
* dockwidget's name will be the group the configuration is loaded from
* \param group_or_prefix the prefix to append to the parent dockwidget's name
*/
- virtual void load( KConfig *, const QString& group_or_prefix );
+ virtual void load( KConfig *, const TQString& group_or_prefix );
/**
* Save the config to a QDomElement
*/
- virtual void save( QDomElement& );
+ virtual void save( TQDomElement& );
/**
* Load the config from a QDomElement
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
* Set the style for the tabbar
@@ -121,7 +121,7 @@ public:
void setStyle( int );
protected:
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
public slots:
void init();
@@ -134,28 +134,28 @@ protected slots:
void delayedRaise();
void changeOverlapMode();
private:
- QWidget *m_mainWin;
- QWidgetStack *m_ws;
+ TQWidget *m_mainWin;
+ TQWidgetStack *m_ws;
KMultiTabBar *m_tb;
int mTabCnt;
int oldtab;
int m_previousTab;
int m_position;
int m_separatorPos;
- QMap<KDockWidget*, int> m_map;
- QMap<int, KDockWidget*> m_revMap;
- QMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
- QStringList itemNames;
- QMap<QString, QString> tabCaptions;
- QMap<QString, QString> tabTooltips;
+ TQMap<KDockWidget*, int> m_map;
+ TQMap<int, KDockWidget*> m_revMap;
+ TQMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
+ TQStringList itemNames;
+ TQMap<TQString, TQString> tabCaptions;
+ TQMap<TQString, TQString> tabTooltips;
int m_inserted;
int m_delayedRaise;
bool m_horizontal;
bool m_block;
bool m_tabSwitching;
- QObject *m_dragPanel;
+ TQObject *m_dragPanel;
KDockManager *m_dockManager;
- QMouseEvent *m_startEvent;
+ TQMouseEvent *m_startEvent;
enum MovingState {NotMoving = 0, WaitingForMoveStart, Moving} m_movingState;
signals:
void activated( KMdiDockContainer* );
diff --git a/kmdi/kmdidocumentviewtabwidget.cpp b/kmdi/kmdidocumentviewtabwidget.cpp
index 2e2e9b87e..90b618e47 100644
--- a/kmdi/kmdidocumentviewtabwidget.cpp
+++ b/kmdi/kmdidocumentviewtabwidget.cpp
@@ -7,84 +7,84 @@
//
//----------------------------------------------------------------------------
-#include <qtimer.h>
+#include <tqtimer.h>
#include <ktabbar.h>
#include <kpopupmenu.h>
#include "kmdidocumentviewtabwidget.h"
-KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const char* name ) : KTabWidget( parent, name )
+KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( TQWidget* parent, const char* name ) : KTabWidget( parent, name )
{
m_visibility = KMdi::ShowWhenMoreThanOneTab;
tabBar() ->hide();
setHoverCloseButton( true );
- connect( this, SIGNAL( closeRequest( QWidget* ) ), this, SLOT( closeTab( QWidget* ) ) );
+ connect( this, TQT_SIGNAL( closeRequest( TQWidget* ) ), this, TQT_SLOT( closeTab( TQWidget* ) ) );
}
KMdiDocumentViewTabWidget::~KMdiDocumentViewTabWidget()
{}
-void KMdiDocumentViewTabWidget::closeTab( QWidget* w )
+void KMdiDocumentViewTabWidget::closeTab( TQWidget* w )
{
w->close();
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QString & label )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQString & label )
{
KTabWidget::addTab( child, label );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label )
{
KTabWidget::addTab( child, iconset, label );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, QTab * tab )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, TQTab * tab )
{
KTabWidget::addTab( child, tab );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & label, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQString & label, int index )
{
KTabWidget::insertTab( child, label, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index )
{
KTabWidget::insertTab( child, iconset, label, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index )
{
KTabWidget::insertTab( child, tab, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::removePage ( QWidget * w )
+void KMdiDocumentViewTabWidget::removePage ( TQWidget * w )
{
KTabWidget::removePage( w );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::updateIconInView( QWidget *w, QPixmap icon )
+void KMdiDocumentViewTabWidget::updateIconInView( TQWidget *w, TQPixmap icon )
{
changeTab( w, icon, tabLabel( w ) );
}
-void KMdiDocumentViewTabWidget::updateCaptionInView( QWidget *w, const QString &caption )
+void KMdiDocumentViewTabWidget::updateCaptionInView( TQWidget *w, const TQString &caption )
{
changeTab( w, caption );
}
diff --git a/kmdi/kmdidocumentviewtabwidget.h b/kmdi/kmdidocumentviewtabwidget.h
index ce7ea5e88..d731a9a03 100644
--- a/kmdi/kmdidocumentviewtabwidget.h
+++ b/kmdi/kmdidocumentviewtabwidget.h
@@ -24,7 +24,7 @@ class KMDI_EXPORT KMdiDocumentViewTabWidget:
{
Q_OBJECT
public:
- KMdiDocumentViewTabWidget( QWidget* parent, const char* name = 0 );
+ KMdiDocumentViewTabWidget( TQWidget* parent, const char* name = 0 );
~KMdiDocumentViewTabWidget();
/**
@@ -32,49 +32,49 @@ public:
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQString & label );
/**
* Add a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label );
/**
* Add a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, QTab * tab );
+ virtual void addTab ( TQWidget * child, TQTab * tab );
/**
* Insert a tab into the tabwidget with a label
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 );
/**
* Inserts a tab into the tabwidget with an icon and label
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 );
/**
* Inserts a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
+ virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 );
/**
* Removes the tab from the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
/**
* Set the tab widget's visibility and then make the change
@@ -88,7 +88,7 @@ public:
private slots:
/** Close the tab specified by w */
- void closeTab( QWidget* w );
+ void closeTab( TQWidget* w );
/** Moves a tab. Reimplemented for internal reasons. */
void moveTab( int from, int to );
@@ -96,10 +96,10 @@ private slots:
public slots:
/** Change the icon for the tab */
- void updateIconInView( QWidget*, QPixmap );
+ void updateIconInView( TQWidget*, TQPixmap );
/** Change the caption for the tab */
- void updateCaptionInView( QWidget*, const QString& );
+ void updateCaptionInView( TQWidget*, const TQString& );
private slots:
diff --git a/kmdi/kmdifocuslist.cpp b/kmdi/kmdifocuslist.cpp
index 0f055358a..fe907aab8 100644
--- a/kmdi/kmdifocuslist.cpp
+++ b/kmdi/kmdifocuslist.cpp
@@ -18,32 +18,32 @@
#include "kmdifocuslist.h"
#include "kmdifocuslist.moc"
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-KMdiFocusList::KMdiFocusList( QObject *parent ) : QObject( parent )
+KMdiFocusList::KMdiFocusList( TQObject *parent ) : TQObject( parent )
{}
KMdiFocusList::~KMdiFocusList()
{}
-void KMdiFocusList::addWidgetTree( QWidget* w )
+void KMdiFocusList::addWidgetTree( TQWidget* w )
{
//this method should never be called twice on the same hierarchy
m_list.insert( w, w->focusPolicy() );
- w->setFocusPolicy( QWidget::ClickFocus );
+ w->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl;
- connect( w, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
- QObjectList *l = w->queryList( "QWidget" );
- QObjectListIt it( *l );
- QObject *obj;
+ connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
+ TQObjectList *l = w->queryList( "TQWidget" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( ( obj = it.current() ) != 0 )
{
- QWidget * wid = ( QWidget* ) obj;
+ TQWidget * wid = ( TQWidget* ) obj;
m_list.insert( wid, wid->focusPolicy() );
- wid->setFocusPolicy( QWidget::ClickFocus );
+ wid->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl;
- connect( wid, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
+ connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
++it;
}
delete l;
@@ -51,7 +51,7 @@ void KMdiFocusList::addWidgetTree( QWidget* w )
void KMdiFocusList::restore()
{
- for ( QMap<QWidget*, QWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
+ for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
{
it.key() ->setFocusPolicy( it.data() );
}
@@ -59,11 +59,11 @@ void KMdiFocusList::restore()
}
-void KMdiFocusList::objectHasBeenDestroyed( QObject * o )
+void KMdiFocusList::objectHasBeenDestroyed( TQObject * o )
{
if ( !o || !o->isWidgetType() )
return ;
- QWidget *w = ( QWidget* ) o;
+ TQWidget *w = ( TQWidget* ) o;
m_list.remove( w );
}
diff --git a/kmdi/kmdifocuslist.h b/kmdi/kmdifocuslist.h
index fbc178d1d..71e2f05cb 100644
--- a/kmdi/kmdifocuslist.h
+++ b/kmdi/kmdifocuslist.h
@@ -18,23 +18,23 @@
#ifndef KMDI_FOCUS_LIST
#define KMDI_FOCUS_LIST
-#include <qobject.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
class KMDI_EXPORT KMdiFocusList: public QObject
{
Q_OBJECT
public:
- KMdiFocusList( QObject *parent );
+ KMdiFocusList( TQObject *parent );
~KMdiFocusList();
- void addWidgetTree( QWidget* );
+ void addWidgetTree( TQWidget* );
void restore();
protected slots:
- void objectHasBeenDestroyed( QObject* );
+ void objectHasBeenDestroyed( TQObject* );
private:
- QMap<QWidget*, QWidget::FocusPolicy> m_list;
+ TQMap<TQWidget*, TQWidget::FocusPolicy> m_list;
};
diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp
index ec00ec784..6279253bc 100644
--- a/kmdi/kmdiguiclient.cpp
+++ b/kmdi/kmdiguiclient.cpp
@@ -20,14 +20,14 @@
#include "kmdiguiclient.h"
#include "kmdiguiclient.moc"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <assert.h>
#include <kdebug.h>
#include <kdockwidget.h>
@@ -57,15 +57,15 @@ using namespace KMDIPrivate;
-ToggleToolViewAction::ToggleToolViewAction( const QString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm,
- QObject* parent, const char* name )
+ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm )
{
if ( m_dw )
{
- connect( this, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) );
- connect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
- connect( m_dw, SIGNAL( destroyed() ), this, SLOT( slotWidgetDestroyed() ) );
+ connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggled( bool ) ) );
+ connect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) );
+ connect( m_dw, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotWidgetDestroyed() ) );
setChecked( m_dw->mayBeHide() );
}
}
@@ -104,20 +104,20 @@ void ToggleToolViewAction::slotToggled( bool t )
void ToggleToolViewAction::slotWidgetDestroyed()
{
- disconnect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
- disconnect( this, SIGNAL( toggled( bool ) ), 0, 0 );
+ disconnect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) );
+ disconnect( this, TQT_SIGNAL( toggled( bool ) ), 0, 0 );
unplugAll();
deleteLater();
}
-KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : QObject( mdiMainFrm, name ),
+KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : TQObject( mdiMainFrm, name ),
KXMLGUIClient( mdiMainFrm )
{
m_mdiMode = KMdi::ChildframeMode;
m_mdiMainFrm = mdiMainFrm;
- connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( mdiMainFrm->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -128,7 +128,7 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c
if ( domDocument().documentElement().isNull() )
{
- QString completeDescription = QString::fromLatin1( guiDescription )
+ TQString completeDescription = TQString::fromLatin1( guiDescription )
.arg( actionListName );
setXML( completeDescription, false /*merge*/ );
@@ -140,30 +140,30 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c
if ( showMDIModeAction )
{
m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() );
- QStringList modes;
+ TQStringList modes;
modes << i18n( "&Toplevel Mode" ) << i18n( "C&hildframe Mode" ) << i18n( "Ta&b Page Mode" ) << i18n( "I&DEAl Mode" );
m_mdiModeAction->setItems( modes );
- connect( m_mdiModeAction, SIGNAL( activated( int ) ), this, SLOT( changeViewMode( int ) ) );
+ connect( m_mdiModeAction, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( changeViewMode( int ) ) );
}
else
m_mdiModeAction = 0;
- connect( m_mdiMainFrm, SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ),
- this, SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) );
+ connect( m_mdiMainFrm, TQT_SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ),
+ this, TQT_SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) );
m_gotoToolDockMenu = new KActionMenu( i18n( "Tool &Docks" ), actionCollection(), "kmdi_tooldock_menu" );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, SIGNAL( toggleTop() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ),
actionCollection(), "kmdi_activate_top" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, SIGNAL( toggleLeft() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ),
actionCollection(), "kmdi_activate_left" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, SIGNAL( toggleRight() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ),
actionCollection(), "kmdi_activate_right" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, SIGNAL( toggleBottom() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ),
actionCollection(), "kmdi_activate_bottom" ) );
m_gotoToolDockMenu->insert( new KActionSeparator( actionCollection(), "kmdi_goto_menu_separator" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, SLOT( prevToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, TQT_SLOT( prevToolViewInDock() ),
actionCollection(), "kmdi_prev_toolview" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, SLOT( nextToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, TQT_SLOT( nextToolViewInDock() ),
actionCollection(), "kmdi_next_toolview" ) );
actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -224,10 +224,10 @@ void KMDIGUIClient::setupActions()
// m_toolBars = builder.toolBars();
- // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", QString::null, 0,
- // this, SLOT(blah()),actionCollection(),"nothing"));
+ // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", TQString::null, 0,
+ // this, TQT_SLOT(blah()),actionCollection(),"nothing"));
- QPtrList<KAction> addList;
+ TQPtrList<KAction> addList;
if ( m_toolViewActions.count() < 3 )
for ( uint i = 0;i < m_toolViewActions.count();i++ )
addList.append( m_toolViewActions.at( i ) );
@@ -247,25 +247,25 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
{
kdDebug( 760 ) << "*****void KMDIGUIClient::addToolView(KMdiToolViewAccessor* mtva)*****" << endl;
// kdDebug()<<"name: "<<mtva->wrappedWidget()->name()<<endl;
- QString aname = QString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name();
+ TQString aname = TQString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name();
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
- QString _grp = cfg->group();
+ TQString _grp = cfg->group();
cfg->setGroup( "Shortcuts" );
// if ( cfg->hasKey( aname ) )
sc = KShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp );
KAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ),
- /*QString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
+ /*TQString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
m_mdiMainFrm, actionCollection(), aname.latin1() );
#if KDE_IS_VERSION(3,2,90)
( ( ToggleToolViewAction* ) a ) ->setCheckedState( i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() ) );
#endif
- connect( a, SIGNAL( destroyed( QObject* ) ), this, SLOT( actionDeleted( QObject* ) ) );
+ connect( a, TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( actionDeleted( TQObject* ) ) );
m_toolViewActions.append( a );
m_toolMenu->insert( a );
mtva->d->action = a;
@@ -273,7 +273,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
setupActions();
}
-void KMDIGUIClient::actionDeleted( QObject* a )
+void KMDIGUIClient::actionDeleted( TQObject* a )
{
m_toolViewActions.remove( static_cast<KAction*>( a ) );
/* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<KAction*>(a));*/
diff --git a/kmdi/kmdiguiclient.h b/kmdi/kmdiguiclient.h
index a52db681c..9c9634314 100644
--- a/kmdi/kmdiguiclient.h
+++ b/kmdi/kmdiguiclient.h
@@ -19,8 +19,8 @@
#ifndef KMDIGUICLIENT_H
#define KMDIGUICLIENT_H
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
#include <kaction.h>
#include "kmdidefines.h"
@@ -38,7 +38,7 @@ namespace KMDIPrivate
* A class derived from KXMLGUIClient that handles the various
* KMDI modes
*/
-class KMDI_EXPORT KMDIGUIClient : public QObject,
+class KMDI_EXPORT KMDIGUIClient : public TQObject,
public KXMLGUIClient
{
Q_OBJECT
@@ -77,7 +77,7 @@ private slots:
* One of our tool view toggle actions has been deleted. Redo the
* tool views menu
*/
- void actionDeleted( QObject* );
+ void actionDeleted( TQObject* );
/**
* Updates the action that lets the user change the MDI mode to the
@@ -103,9 +103,9 @@ private:
KMDIGUIClientPrivate *d;
KMdi::MdiMode m_mdiMode;
- QGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
- QPtrList<KAction> m_toolViewActions;
- QPtrList<KAction> m_documentViewActions;
+ TQGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
+ TQPtrList<KAction> m_toolViewActions;
+ TQPtrList<KAction> m_documentViewActions;
KActionMenu *m_docMenu;
KActionMenu *m_toolMenu;
@@ -123,8 +123,8 @@ class KMDI_EXPORT ToggleToolViewAction: public KToggleAction
Q_OBJECT
public:
- ToggleToolViewAction( const QString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0,
- QObject* parent = 0, const char* name = 0 );
+ ToggleToolViewAction( const TQString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0,
+ TQObject* parent = 0, const char* name = 0 );
virtual ~ToggleToolViewAction();
diff --git a/kmdi/kmdilistiterator.h b/kmdi/kmdilistiterator.h
index fe92bfcc2..3f36a116c 100644
--- a/kmdi/kmdilistiterator.h
+++ b/kmdi/kmdilistiterator.h
@@ -38,9 +38,9 @@ template <class Item>
class KMdiListIterator : public KMdiIterator<Item*>
{
public:
- KMdiListIterator( QPtrList<Item>& list )
+ KMdiListIterator( TQPtrList<Item>& list )
{
- m_iterator = new QPtrListIterator<Item>( list );
+ m_iterator = new TQPtrListIterator<Item>( list );
}
virtual void first() { m_iterator->toFirst(); }
@@ -53,7 +53,7 @@ public:
virtual ~KMdiListIterator() { delete m_iterator; }
private:
- QPtrListIterator<Item> *m_iterator;
+ TQPtrListIterator<Item> *m_iterator;
};
#endif // _KMDILISTITERATOR_H_
diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp
index e4afce397..e62b61cb2 100644
--- a/kmdi/kmdimainfrm.cpp
+++ b/kmdi/kmdimainfrm.cpp
@@ -37,17 +37,17 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kmenubar.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kstdaccel.h>
@@ -55,14 +55,14 @@
#include <kmdidockcontainer.h>
-#include <qtoolbutton.h>
-#include <qdockarea.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqtoolbutton.h>
+#include <tqdockarea.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include "kmdimainfrm.h"
#include "kmditaskbar.h"
@@ -136,7 +136,7 @@ public:
};
//============ constructor ============//
-KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
+KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
: KParts::DockMainWindow( parentWidget, name, flags )
, m_mdiMode( KMdi::UndefinedMode )
, m_pMdi( 0L )
@@ -179,9 +179,9 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
{
kdDebug(760) << k_funcinfo << endl;
// Create the local lists of windows
- m_pDocumentViews = new QPtrList<KMdiChildView>;
+ m_pDocumentViews = new TQPtrList<KMdiChildView>;
m_pDocumentViews->setAutoDelete( false );
- m_pToolViews = new QMap<QWidget*, KMdiToolViewAccessor*>;
+ m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
// This seems to be needed (re-check it after Qt2.0 comed out)
setFocusPolicy( ClickFocus );
@@ -190,7 +190,7 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
createMdiManager();
// cover KMdi's childarea by a dockwidget
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -202,23 +202,23 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
// Apply options for the MDI manager
applyOptions();
- m_pTaskBarPopup = new QPopupMenu( this, "taskbar_popup_menu" );
- m_pWindowPopup = new QPopupMenu( this, "window_popup_menu" );
+ m_pTaskBarPopup = new TQPopupMenu( this, "taskbar_popup_menu" );
+ m_pWindowPopup = new TQPopupMenu( this, "window_popup_menu" );
- m_pWindowMenu = new QPopupMenu( this, "window_menu" );
+ m_pWindowMenu = new TQPopupMenu( this, "window_menu" );
m_pWindowMenu->setCheckable( true );
- QObject::connect( m_pWindowMenu, SIGNAL( aboutToShow() ), this, SLOT( fillWindowMenu() ) );
+ TQObject::connect( m_pWindowMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fillWindowMenu() ) );
- m_pDockMenu = new QPopupMenu( this, "dock_menu" );
+ m_pDockMenu = new TQPopupMenu( this, "dock_menu" );
m_pDockMenu->setCheckable( true );
- m_pMdiModeMenu = new QPopupMenu( this, "mdimode_menu" );
+ m_pMdiModeMenu = new TQPopupMenu( this, "mdimode_menu" );
m_pMdiModeMenu->setCheckable( true );
- m_pPlacingMenu = new QPopupMenu( this, "placing_menu" );
+ m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" );
d->closeWindowAction = new KAction(i18n("&Close"), KStdAccel::close(),
- this, SLOT(closeActiveView()), actionCollection(), "window_close");
+ this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
// the MDI view taskbar
createTaskBar();
@@ -248,12 +248,12 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
}
// drag end timer
- m_pDragEndTimer = new QTimer();
- connect( m_pDragEndTimer, SIGNAL( timeout() ), this, SLOT( dragEndTimeOut() ) );
- connect( guiFactory(), SIGNAL( clientAdded( KXMLGUIClient* ) ),
- this, SLOT( verifyToplevelHeight() ) );
- connect( guiFactory(), SIGNAL( clientRemoved( KXMLGUIClient* ) ),
- this, SLOT( verifyToplevelHeight() ) );
+ m_pDragEndTimer = new TQTimer();
+ connect( m_pDragEndTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( dragEndTimeOut() ) );
+ connect( guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient* ) ),
+ this, TQT_SLOT( verifyToplevelHeight() ) );
+ connect( guiFactory(), TQT_SIGNAL( clientRemoved( KXMLGUIClient* ) ),
+ this, TQT_SLOT( verifyToplevelHeight() ) );
}
void KMdiMainFrm::verifyToplevelHeight()
@@ -271,21 +271,21 @@ void KMdiMainFrm::verifyToplevelHeight()
void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
{
m_mdiGUIClient = new KMDIPrivate::KMDIGUIClient( this, showModeMenu );
- connect( m_mdiGUIClient, SIGNAL( toggleTop() ), this, SIGNAL( toggleTop() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleLeft() ), this, SIGNAL( toggleLeft() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleRight() ), this, SIGNAL( toggleRight() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleBottom() ), this, SIGNAL( toggleBottom() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleTop() ), this, TQT_SIGNAL( toggleTop() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleLeft() ), this, TQT_SIGNAL( toggleLeft() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleRight() ), this, TQT_SIGNAL( toggleRight() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleBottom() ), this, TQT_SIGNAL( toggleBottom() ) );
if ( m_mdiMode == KMdi::IDEAlMode )
{
if ( m_topContainer )
- connect( this, SIGNAL( toggleTop() ), m_topContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleTop() ), m_topContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_leftContainer )
- connect( this, SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_rightContainer )
- connect( this, SIGNAL( toggleRight() ), m_rightContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleRight() ), m_rightContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_bottomContainer )
- connect( this, SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), TQT_SLOT( toggle() ) );
}
emit mdiModeHasBeenChangedTo( m_mdiMode );
@@ -295,12 +295,12 @@ void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
KMdiMainFrm::~KMdiMainFrm()
{
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
children.append( w );
// safely close the windows so properties are saved...
- QValueListIterator<KMdiChildView*> childIt;
+ TQValueListIterator<KMdiChildView*> childIt;
for ( childIt = children.begin(); childIt != children.end(); ++childIt )
{
closeWindow( *childIt, false ); // without re-layout taskbar!
@@ -335,10 +335,10 @@ KMdiMainFrm::~KMdiMainFrm()
//FIXME something wrong with this function. dunno what though
void KMdiMainFrm::applyOptions()
{
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
- QWidget* childFrame = 0L;
+ TQWidget* childFrame = 0L;
if ( ( *it )->mdiParent() )
{
kdDebug(760) << k_funcinfo << "using child view's mdi parent for resize hack" << endl;
@@ -363,22 +363,22 @@ void KMdiMainFrm::createMdiManager()
kdDebug(760) << k_funcinfo << "creating MDI manager" << endl;
m_pMdi = new KMdiChildArea( this );
setCentralWidget( m_pMdi );
- QObject::connect( m_pMdi, SIGNAL( nowMaximized( bool ) ),
- this, SLOT( setEnableMaximizedChildFrmMode( bool ) ) );
- QObject::connect( m_pMdi, SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ),
- this, SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) );
- QObject::connect( m_pMdi, SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ),
- this, SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) );
- QObject::connect( m_pMdi, SIGNAL( popupWindowMenu( QPoint ) ),
- this, SLOT( popupWindowMenu( QPoint ) ) );
- QObject::connect( m_pMdi, SIGNAL( lastChildFrmClosed() ),
- this, SIGNAL( lastChildFrmClosed() ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( nowMaximized( bool ) ),
+ this, TQT_SLOT( setEnableMaximizedChildFrmMode( bool ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ),
+ this, TQT_SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ),
+ this, TQT_SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( popupWindowMenu( TQPoint ) ),
+ this, TQT_SLOT( popupWindowMenu( TQPoint ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( lastChildFrmClosed() ),
+ this, TQT_SIGNAL( lastChildFrmClosed() ) );
}
//============ createTaskBar ==============//
void KMdiMainFrm::createTaskBar()
{
- m_pTaskBar = new KMdiTaskBar( this, QMainWindow::DockBottom );
+ m_pTaskBar = new KMdiTaskBar( this, TQMainWindow::DockBottom );
m_pTaskBar->installEventFilter( this );
}
@@ -389,7 +389,7 @@ void KMdiMainFrm::slot_toggleTaskBar()
m_pTaskBar->switchOn( !m_pTaskBar->isSwitchedOn() );
}
-void KMdiMainFrm::resizeEvent( QResizeEvent *e )
+void KMdiMainFrm::resizeEvent( TQResizeEvent *e )
{
if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
{
@@ -413,20 +413,20 @@ void KMdiMainFrm::setMinimumSize( int minw, int minh )
//================ wrapper ===============//
-KMdiChildView* KMdiMainFrm::createWrapper( QWidget *view, const QString& name, const QString& shortName )
+KMdiChildView* KMdiMainFrm::createWrapper( TQWidget *view, const TQString& name, const TQString& shortName )
{
Q_ASSERT( view ); // if this assert fails, then some part didn't return a widget. Fix the part ;)
KMdiChildView* pMDICover = new KMdiChildView( name /*caption*/, 0L /*parent*/,
name.latin1() );
- QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout" );
- view->reparent( pMDICover, QPoint( 0, 0 ) );
+ TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout" );
+ view->reparent( pMDICover, TQPoint( 0, 0 ) );
pLayout->addWidget( view );
// pMDICover->setName(name);
pMDICover->setTabCaption( shortName );
pMDICover->setCaption( name );
- const QPixmap* wndIcon = view->icon();
+ const TQPixmap* wndIcon = view->icon();
if ( wndIcon )
pMDICover->setIcon( *wndIcon );
@@ -458,14 +458,14 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
d->closeWindowAction->setEnabled(true);
// common connections used when under MDI control
- QObject::connect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
- QObject::connect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
- QObject::connect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
- QObject::connect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
- QObject::connect( pWnd, SIGNAL( activated( KMdiChildView* ) ), this, SIGNAL( viewActivated( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( deactivated( KMdiChildView* ) ), this, SIGNAL( viewDeactivated( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_SLOT( dockMenuItemActivated( int ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( activated( KMdiChildView* ) ), this, TQT_SIGNAL( viewActivated( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( deactivated( KMdiChildView* ) ), this, TQT_SIGNAL( viewDeactivated( KMdiChildView* ) ) );
if ( index == -1 )
m_pDocumentViews->append( pWnd );
@@ -475,20 +475,20 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
if ( m_pTaskBar )
{
KMdiTaskBarButton* but = m_pTaskBar->addWinButton( pWnd );
- QObject::connect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) );
}
// embed the view depending on the current MDI mode
if ( m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode )
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( pWnd->icon() )
pixmap = *( pWnd->icon() );
m_documentTabWidget->insertTab( pWnd, pixmap, pWnd->tabCaption(), index );
- connect( pWnd, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
- connect( pWnd, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+ connect( pWnd, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) );
+ connect( pWnd, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) );
}
else
{
@@ -524,7 +524,7 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
}
//============ addWindow ============//
-void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags )
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQRect rectNormal, int flags )
{
addWindow( pWnd, flags );
if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
@@ -534,11 +534,11 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags )
}
//============ addWindow ============//
-void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QPoint pos, int flags )
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQPoint pos, int flags )
{
addWindow( pWnd, flags );
if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
- pWnd->setRestoreGeometry( QRect( pos, pWnd->restoreGeometry().size() ) );
+ pWnd->setRestoreGeometry( TQRect( pos, pWnd->restoreGeometry().size() ) );
else
pWnd->move( pos );
}
@@ -551,7 +551,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
}
-void KMdiMainFrm::deleteToolWindow( QWidget* pWnd )
+void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd )
{
if ( m_pToolViews->contains( pWnd ) )
deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
@@ -563,10 +563,10 @@ void KMdiMainFrm::deleteToolWindow( KMdiToolViewAccessor *accessor )
}
//============ addWindow ============//
-KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd,
- int percent, const QString& tabToolTip, const QString& tabCaption )
+KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos, TQWidget* pTargetWnd,
+ int percent, const TQString& tabToolTip, const TQString& tabCaption )
{
- QWidget* tvta = pWnd;
+ TQWidget* tvta = pWnd;
KDockWidget* pDW = dockManager->getDockWidgetFromName( pWnd->name() );
if ( pDW )
{
@@ -582,7 +582,7 @@ KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::Do
pWnd = pDW;
}
- QRect r = pWnd->geometry();
+ TQRect r = pWnd->geometry();
KMdiToolViewAccessor *mtva = new KMdiToolViewAccessor( this, pWnd, tabToolTip, ( tabCaption == 0 ) ? pWnd->caption() : tabCaption );
m_pToolViews->insert( tvta, mtva );
@@ -606,11 +606,11 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
// decide whether window shall be cascaded
bool bCascade = false;
- QApplication::sendPostedEvents();
- QRect frameGeo = pWnd->frameGeometry();
- QPoint topLeftScreen = pWnd->mapToGlobal( QPoint( 0, 0 ) );
- QPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
- QRect childAreaGeo = m_pMdi->geometry();
+ TQApplication::sendPostedEvents();
+ TQRect frameGeo = pWnd->frameGeometry();
+ TQPoint topLeftScreen = pWnd->mapToGlobal( TQPoint( 0, 0 ) );
+ TQPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
+ TQRect childAreaGeo = m_pMdi->geometry();
if ( topLeftMdiChildArea.x() < 0 || topLeftMdiChildArea.y() < 0 ||
( topLeftMdiChildArea.x() + frameGeo.width() > childAreaGeo.width() ) ||
( topLeftMdiChildArea.y() + frameGeo.height() > childAreaGeo.height() ) )
@@ -639,7 +639,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
m_pMdi->manageChild( lpC, false, bCascade );
if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() )
{
- QRect r = lpC->geometry();
+ TQRect r = lpC->geometry();
lpC->setGeometry( -lpC->m_pClient->x(), -lpC->m_pClient->y(),
m_pMdi->width() + KMDI_CHILDFRM_DOUBLE_BORDER,
m_pMdi->height() + lpC->captionHeight() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
@@ -652,8 +652,8 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
}
#undef FocusIn
- QFocusEvent fe( QEvent::FocusIn );
- QApplication::sendEvent( pWnd, &fe );
+ TQFocusEvent fe( TQEvent::FocusIn );
+ TQApplication::sendEvent( pWnd, &fe );
m_pCurrentWindow = pWnd; // required for checking the active item
}
@@ -673,10 +673,10 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
{
if ( lpC->icon() )
{
- QPixmap pixm( *( lpC->icon() ) );
+ TQPixmap pixm( *( lpC->icon() ) );
pWnd->setIcon( pixm );
}
- QString capt( lpC->caption() );
+ TQString capt( lpC->caption() );
if ( !bShow )
lpC->hide();
lpC->unsetClient( m_undockPositioningOffset );
@@ -687,15 +687,15 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
}
else
{
- if ( pWnd->size().isEmpty() || ( pWnd->size() == QSize( 1, 1 ) ) )
+ if ( pWnd->size().isEmpty() || ( pWnd->size() == TQSize( 1, 1 ) ) )
{
if ( m_pCurrentWindow )
{
- pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) );
+ pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) );
}
else
{
- pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
+ pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
}
}
#ifdef Q_WS_X11
@@ -736,19 +736,19 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
if ( m_pWinList->count() == 0 )
m_pCurrentWindow = 0L;
- QObject::disconnect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
- QObject::disconnect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
- QObject::disconnect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
- QObject::disconnect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
- QObject::disconnect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
- QObject::disconnect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_SLOT( dockMenuItemActivated( int ) ) );
if ( m_pTaskBar )
{
KMdiTaskBarButton * but = m_pTaskBar->getButton( pWnd );
if ( but != 0L )
{
- QObject::disconnect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) );
}
m_pTaskBar->removeWinButton( pWnd );
}
@@ -759,7 +759,7 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
@@ -773,11 +773,11 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
m_pClose->hide();
}
KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -845,7 +845,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
return ; //oops
if ( m_pDocumentViews->count() == 0 )
m_pClose->hide();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
kdDebug(760) << "-------- 1" << endl;
if ( m_pDocumentViews->count() == 1 )
{
@@ -858,7 +858,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
@@ -875,11 +875,11 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
}
#if 0
KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -937,9 +937,9 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
}
//================== findWindow =================//
-KMdiChildView* KMdiMainFrm::findWindow( const QString& caption )
+KMdiChildView* KMdiMainFrm::findWindow( const TQString& caption )
{
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
if ( ( *it )->caption() == caption )
@@ -971,7 +971,7 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as )
return false;
}
-QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup )
+TQPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup )
{
m_pWindowPopup->clear();
if ( bIncludeTaskbarPopup )
@@ -983,32 +983,32 @@ QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskba
}
//================ taskBarPopup =================//
-QPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ )
+TQPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ )
{
//returns the g_pTaskBarPopup filled according to the KMdiChildView state
m_pTaskBarPopup->clear();
if ( pWnd->isAttached() )
{
- m_pTaskBarPopup->insertItem( i18n( "Undock" ), pWnd, SLOT( detach() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Undock" ), pWnd, TQT_SLOT( detach() ) );
m_pTaskBarPopup->insertSeparator();
if ( pWnd->isMinimized() || pWnd->isMaximized() )
- m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, SLOT( restore() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, TQT_SLOT( restore() ) );
if ( !pWnd->isMaximized() )
- m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, SLOT( maximize() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, TQT_SLOT( maximize() ) );
if ( !pWnd->isMinimized() )
- m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, SLOT( minimize() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, TQT_SLOT( minimize() ) );
}
else
- m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, SLOT( attach() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, TQT_SLOT( attach() ) );
m_pTaskBarPopup->insertSeparator();
- m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, SLOT( close() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, TQT_SLOT( close() ) );
// the window has a view...get the window popup
m_pTaskBarPopup->insertSeparator();
m_pTaskBarPopup->insertItem( i18n( "Operations" ), windowPopup( pWnd, false ) ); //alvoid recursion
return m_pTaskBarPopup;
}
-void KMdiMainFrm::slotDocCurrentChanged( QWidget* pWidget )
+void KMdiMainFrm::slotDocCurrentChanged( TQWidget* pWidget )
{
KMdiChildView * pWnd = static_cast<KMdiChildView*>( pWidget );
pWnd->m_bMainframesActivateViewIsPending = true;
@@ -1106,19 +1106,19 @@ void KMdiMainFrm::activateView( KMdiChildView* pWnd )
void KMdiMainFrm::taskbarButtonRightClicked( KMdiChildView *pWnd )
{
activateView( pWnd ); // set focus
- //QApplication::sendPostedEvents();
- taskBarPopup( pWnd, true ) ->popup( QCursor::pos() );
+ //TQApplication::sendPostedEvents();
+ taskBarPopup( pWnd, true ) ->popup( TQCursor::pos() );
}
void KMdiMainFrm::childWindowCloseRequest( KMdiChildView *pWnd )
{
KMdiViewCloseEvent * ce = new KMdiViewCloseEvent( pWnd );
- QApplication::postEvent( this, ce );
+ TQApplication::postEvent( this, ce );
}
-bool KMdiMainFrm::event( QEvent* e )
+bool KMdiMainFrm::event( TQEvent* e )
{
- if ( e->type() == QEvent::User )
+ if ( e->type() == TQEvent::User )
{
KMdiChildView * pWnd = ( KMdiChildView* ) ( ( KMdiViewCloseEvent* ) e )->data();
if ( pWnd != 0L )
@@ -1139,7 +1139,7 @@ bool KMdiMainFrm::event( QEvent* e )
// Actually we seem to be lucky that the timer does not elapse while we
// are moving -> so we have no obsolete drag end / begin
}
- else if ( isVisible() && e->type() == QEvent::Move )
+ else if ( isVisible() && e->type() == TQEvent::Move )
{
if ( m_pDragEndTimer->isActive() )
{
@@ -1149,11 +1149,11 @@ bool KMdiMainFrm::event( QEvent* e )
else
{
// this is the first move -> send the drag begin to all concerned views
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildFrmDragBeginEvent dragBeginEvent( 0L );
- QApplication::sendEvent( ( *it ), &dragBeginEvent );
+ TQApplication::sendEvent( ( *it ), &dragBeginEvent );
}
}
m_pDragEndTimer->start( 200, true ); // single shot after 200 ms
@@ -1162,18 +1162,18 @@ bool KMdiMainFrm::event( QEvent* e )
return DockMainWindow::event( e );
}
-bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
+bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e )
{
- if ( e->type() == QEvent::Resize && m_mdiMode == KMdi::ToplevelMode )
+ if ( e->type() == TQEvent::Resize && m_mdiMode == KMdi::ToplevelMode )
{
verifyToplevelHeight();
return false; //let the rest of the resize magic do its work
}
- if ( e->type() == QEvent::FocusIn )
+ if ( e->type() == TQEvent::FocusIn )
{
- QFocusEvent * pFE = ( QFocusEvent* ) e;
- if ( pFE->reason() == QFocusEvent::ActiveWindow )
+ TQFocusEvent * pFE = ( TQFocusEvent* ) e;
+ if ( pFE->reason() == TQFocusEvent::ActiveWindow )
{
if ( m_pCurrentWindow && !m_pCurrentWindow->isHidden() &&
!m_pCurrentWindow->isAttached() && m_pMdi->topChild() )
@@ -1192,7 +1192,7 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::KeyRelease )
+ else if ( e->type() == TQEvent::KeyRelease )
{
if ( switching() )
{
@@ -1203,14 +1203,14 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
const KKeySequence& seq = cut.seq( 0 );
const KKey& key = seq.key( 0 );
int modFlags = key.modFlags();
- int state = ( ( QKeyEvent * ) e ) ->state();
- KKey key2( ( QKeyEvent * ) e );
+ int state = ( ( TQKeyEvent * ) e ) ->state();
+ KKey key2( ( TQKeyEvent * ) e );
/** these are quite some assumptions:
* The key combination uses exactly one modifier key
* The WIN button in KDE is the meta button in Qt
**/
- if ( state != ( ( QKeyEvent * ) e ) ->stateAfter() &&
+ if ( state != ( ( TQKeyEvent * ) e ) ->stateAfter() &&
( ( modFlags & KKey::CTRL ) > 0 ) == ( ( state & Qt::ControlButton ) > 0 ) &&
( ( modFlags & KKey::ALT ) > 0 ) == ( ( state & Qt::AltButton ) > 0 ) &&
( ( modFlags & KKey::WIN ) > 0 ) == ( ( state & Qt::MetaButton ) > 0 ) )
@@ -1235,12 +1235,12 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
void KMdiMainFrm::closeAllViews()
{
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
{
children.append( w );
}
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for ( childIt = children.begin(); childIt != children.end(); ++childIt )
{
( *childIt )->close();
@@ -1254,7 +1254,7 @@ void KMdiMainFrm::closeAllViews()
void KMdiMainFrm::iconifyAllViews()
{
kdDebug(760) << k_funcinfo << "minimizing all the views" << endl;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
( *it )->minimize();
}
@@ -1270,7 +1270,7 @@ void KMdiMainFrm::closeActiveView()
}
/** find the root dockwidgets and store their geometry */
-void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList, QValueList<QRect>* positionList )
+void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetList, TQValueList<TQRect>* positionList )
{
//nothing is valid
if ( !rootDockWidgetList && !positionList )
@@ -1280,18 +1280,18 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
const int windowTitleHeight = 10; // @todo: -"-
- QObjectList* pObjList = queryList( "KDockWidget" );
+ TQObjectList* pObjList = queryList( "KDockWidget" );
if ( pObjList->isEmpty() )
pObjList = queryList( "KDockWidget_Compat::KDockWidget" );
- QObjectListIt it( *pObjList );
+ TQObjectListIt it( *pObjList );
// for all dockwidgets (which are children of this mainwindow)
while ( ( *it ) )
{
KDockWidget* dockWindow = 0L; /* pDockW */
KDockWidget* rootDockWindow = 0L; /* pRootDockWindow */
KDockWidget* undockCandidate = 0L; /* pUndockCandidate */
- QWidget* pW = static_cast<QWidget*>( ( *it ) );
+ TQWidget* pW = static_cast<TQWidget*>( ( *it ) );
// find the oldest ancestor of the current dockwidget that can be undocked
while ( !pW->isTopLevel() )
@@ -1311,7 +1311,7 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
bool found = false;
if ( !rootDockWidgetList->isEmpty() )
{
- QPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
for ( ; it2.current() && !found; ++it2 )
{
dockWindow = it2.current();
@@ -1325,8 +1325,8 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
rootDockWidgetList->append( dockWindow );
kdDebug(760) << k_funcinfo << "Appending " << rootDockWindow << " to our list of " <<
"root dock windows" << endl;
- QPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos();
- QRect r( p.x(), p.y() + m_undockPositioningOffset.y(),
+ TQPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos();
+ TQRect r( p.x(), p.y() + m_undockPositioningOffset.y(),
rootDockWindow->width() - windowTitleHeight - frameBorderWidth * 2,
rootDockWindow->height() - windowTitleHeight - frameBorderWidth * 2 );
positionList->append( r );
@@ -1351,11 +1351,11 @@ void KMdiMainFrm::switchToToplevelMode()
KMdi::MdiMode oldMdiMode = m_mdiMode;
const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
- setUndockPositioningOffset( QPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
+ setUndockPositioningOffset( TQPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
// 1.) select the dockwidgets to be undocked and store their geometry
- QPtrList<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> positionList;
// 2.) undock the MDI views of KMDI
switch( oldMdiMode )
@@ -1375,7 +1375,7 @@ void KMdiMainFrm::switchToToplevelMode()
}
// 3.) undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> kdwit( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> kdwit( rootDockWidgetList );
for ( ; ( *kdwit ); ++kdwit )
( *kdwit )->undock();
@@ -1384,7 +1384,7 @@ void KMdiMainFrm::switchToToplevelMode()
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -1394,7 +1394,7 @@ void KMdiMainFrm::switchToToplevelMode()
setView( m_pDockbaseAreaOfDocumentViews );
setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
}
- // QApplication::sendPostedEvents(); //why do we need to empty the event queue?
+ // TQApplication::sendPostedEvents(); //why do we need to empty the event queue?
if ( !parentWidget() )
{
//if we don't have a parent widget ( which i expect we wouldn't )
@@ -1418,7 +1418,7 @@ void KMdiMainFrm::switchToToplevelMode()
//FIXME although i don't know what to fix
// 5. show the child views again
- QPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit )
{
#ifdef Q_WS_X11
@@ -1428,8 +1428,8 @@ void KMdiMainFrm::switchToToplevelMode()
}
// 6.) reset all memorized positions of the undocked ones and show them again
- QValueList<QRect>::Iterator qvlqrit;
- QValueList<QRect>::Iterator qvlEnd = positionList.end();
+ TQValueList<TQRect>::Iterator qvlqrit;
+ TQValueList<TQRect>::Iterator qvlEnd = positionList.end();
for ( kmdicvit.toFirst(), qvlqrit = positionList.begin() ; ( *kmdicvit ) && qvlqrit != qvlEnd; ++kmdicvit, ++qvlqrit )
{
( *kmdicvit )->setGeometry( ( *qvlqrit ) );
@@ -1460,8 +1460,8 @@ void KMdiMainFrm::switchToChildframeMode()
return ;
}
- QPtrList<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> positionList;
if ( m_mdiMode == KMdi::TabPageMode )
{
@@ -1471,7 +1471,7 @@ void KMdiMainFrm::switchToChildframeMode()
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
// undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ) ; ++it )
( *it )->undock();
@@ -1491,7 +1491,7 @@ void KMdiMainFrm::switchToChildframeMode()
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
// undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ) ; ++it )
( *it )->undock();
@@ -1503,7 +1503,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( !m_pDockbaseAreaOfDocumentViews )
{
// cover KMdi's childarea by a dockwidget
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -1526,7 +1526,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
{
kdDebug(760) << k_funcinfo << "trying to dock back the undock toolviews" << endl;
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ); ++it )
( *it )->dockBack();
}
@@ -1535,7 +1535,7 @@ void KMdiMainFrm::switchToChildframeMode()
{
// restore the old dock scenario which we memorized at the time we switched to toplevel mode
kdDebug(760) << k_funcinfo << "Restoring old dock scenario memorized from toplevel mode" << endl;
- QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
readDockConfig( oldDockState );
}
@@ -1543,7 +1543,7 @@ void KMdiMainFrm::switchToChildframeMode()
m_mdiMode = KMdi::ChildframeMode;
//FIXME although i don't know what to fix.
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildView* pView = ( *it );
@@ -1573,14 +1573,14 @@ void KMdiMainFrm::finishChildframeMode()
// save the old dock scenario of the dockwidget-like tool views to a DOM tree
kdDebug(760) << k_funcinfo << "saving the current dock scenario" << endl;
delete m_pTempDockSession;
- m_pTempDockSession = new QDomDocument( "docksession" );
- QDomElement curDockState = m_pTempDockSession->createElement( "cur_dock_state" );
+ m_pTempDockSession = new TQDomDocument( "docksession" );
+ TQDomElement curDockState = m_pTempDockSession->createElement( "cur_dock_state" );
m_pTempDockSession->appendChild( curDockState );
writeDockConfig( curDockState );
// detach all non-tool-views to toplevel
kdDebug(760) << k_funcinfo << "detaching all document views and moving them to toplevel" << endl;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildView* pView = ( *it );
@@ -1633,7 +1633,7 @@ void KMdiMainFrm::switchToTabPageMode()
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
if ( m_pDocumentViews->count() > 0 )
m_pClose->show();
}
@@ -1650,20 +1650,20 @@ void KMdiMainFrm::finishTabPageMode()
if ( m_mdiMode == KMdi::TabPageMode )
{
m_pClose->hide();
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ TQSize mins = pView->minimumSize();
+ TQSize maxs = pView->maximumSize();
+ TQSize sz = pView->size();
+ TQWidget* pParent = pView->parentWidget();
+ TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
m_documentTabWidget->removePage( pView );
pView->reparent( 0, 0, p );
// pView->reparent(0,0,p);
@@ -1696,12 +1696,12 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace()
m_oldMainFrmHeight = 0;
//qDebug("TopLevelMode off");
emit leftTopLevelMode();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
// restore the old dock szenario which we memorized at the time we switched to toplevel mode
if ( m_pTempDockSession )
{
- QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
readDockConfig( oldDockState );
}
}
@@ -1715,20 +1715,20 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace()
#endif
delete m_documentTabWidget;
m_documentTabWidget = new KMdiDocumentViewTabWidget( m_pDockbaseAreaOfDocumentViews );
- connect( m_documentTabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotDocCurrentChanged( QWidget* ) ) );
+ connect( m_documentTabWidget, TQT_SIGNAL( currentChanged( TQWidget* ) ), this, TQT_SLOT( slotDocCurrentChanged( TQWidget* ) ) );
m_pDockbaseAreaOfDocumentViews->setWidget( m_documentTabWidget );
m_documentTabWidget->show();
- QPtrListIterator<KMdiChildView> it4( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it4( *m_pDocumentViews );
for ( ; it4.current(); ++it4 )
{
KMdiChildView* pView = it4.current();
- m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : QPixmap(), pView->tabCaption() );
+ m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : TQPixmap(), pView->tabCaption() );
/*
- connect(pView,SIGNAL(iconOrCaptionUdpated(QWidget*,QPixmap,const QString&)),
- m_documentTabWidget,SLOT(updateView(QWidget*,QPixmap,const QString&)));
+ connect(pView,TQT_SIGNAL(iconOrCaptionUdpated(TQWidget*,TQPixmap,const TQString&)),
+ m_documentTabWidget,TQT_SLOT(updateView(TQWidget*,TQPixmap,const TQString&)));
*/
- connect( pView, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
- connect( pView, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+ connect( pView, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) );
+ connect( pView, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) );
}
}
@@ -1774,7 +1774,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
}
d->m_toolviewStyle = flag;
bool toolviewExists = false;
- QMap<QWidget*, KMdiToolViewAccessor*>::Iterator it;
+ TQMap<TQWidget*, KMdiToolViewAccessor*>::Iterator it;
for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it )
{
KDockWidget *dockWidget = dynamic_cast<KDockWidget*>( it.data()->wrapperWidget() );
@@ -1783,7 +1783,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
switch ( flag )
{
case KMdi::IconOnly:
- dockWidget->setTabPageLabel( QString::null );
+ dockWidget->setTabPageLabel( TQString::null );
dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) );
break;
case KMdi::TextOnly:
@@ -1858,7 +1858,7 @@ void KMdiMainFrm::switchToIDEAlMode()
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
if ( m_pDocumentViews->count() > 0 )
m_pClose->show();
}
@@ -1871,9 +1871,9 @@ void KMdiMainFrm::switchToIDEAlMode()
}
-void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
+void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
{
- QPtrListIterator<KDockWidget> it( widgetsToReparent );
+ TQPtrListIterator<KDockWidget> it( widgetsToReparent );
for ( ; ( *it ); ++it )
{
( *it )->manualDock( container, KDockWidget::DockCenter, 20 );
@@ -1881,7 +1881,7 @@ void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToR
}
}
-void KMdiMainFrm::findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
+void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
{
KDockWidget* mainDock = getMainDockWidget();
if ( mainDock->parentDockTabGroup() )
@@ -1933,10 +1933,10 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
if ( mainDock->parentDockTabGroup() )
w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
- QPtrList<KDockWidget> leftReparentWidgets;
- QPtrList<KDockWidget> rightReparentWidgets;
- QPtrList<KDockWidget> bottomReparentWidgets;
- QPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftReparentWidgets;
+ TQPtrList<KDockWidget> rightReparentWidgets;
+ TQPtrList<KDockWidget> bottomReparentWidgets;
+ TQPtrList<KDockWidget> topReparentWidgets;
if ( mainDock->parentDockTabGroup() )
mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
@@ -1956,40 +1956,40 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
m_leftContainer->manualDock( mainDock, KDockWidget::DockLeft, 20 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleLeft() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleLeft() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_rightContainer->setWidget( tmpDC = new KMdiDockContainer( m_rightContainer, this, KDockWidget::DockRight, d->m_styleIDEAlMode ) );
m_rightContainer->setEnableDocking( KDockWidget::DockRight );
m_rightContainer->manualDock( mainDock, KDockWidget::DockRight, 80 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleRight() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleRight() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_topContainer->setWidget( tmpDC = new KMdiDockContainer( m_topContainer, this, KDockWidget::DockTop, d->m_styleIDEAlMode ) );
m_topContainer->setEnableDocking( KDockWidget::DockTop );
m_topContainer->manualDock( mainDock, KDockWidget::DockTop, 20 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleTop() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleTop() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_bottomContainer->setWidget( tmpDC = new KMdiDockContainer( m_bottomContainer, this, KDockWidget::DockBottom, d->m_styleIDEAlMode ) );
m_bottomContainer->setEnableDocking( KDockWidget::DockBottom );
m_bottomContainer->manualDock( mainDock, KDockWidget::DockBottom, 80 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleBottom() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleBottom() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_leftContainer->setDockSite( KDockWidget::DockCenter );
m_rightContainer->setDockSite( KDockWidget::DockCenter );
@@ -2024,22 +2024,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
{
assert( m_pClose );
m_pClose->hide();
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
- QStringList leftNames;
+ TQStringList leftNames;
leftNames = prepareIdealToTabs( m_leftContainer );
int leftWidth = m_leftContainer->width();
- QStringList rightNames;
+ TQStringList rightNames;
rightNames = prepareIdealToTabs( m_rightContainer );
int rightWidth = m_rightContainer->width();
- QStringList topNames;
+ TQStringList topNames;
topNames = prepareIdealToTabs( m_topContainer );
int topHeight = m_topContainer->height();
- QStringList bottomNames;
+ TQStringList bottomNames;
bottomNames = prepareIdealToTabs( m_bottomContainer );
int bottomHeight = m_bottomContainer->height();
@@ -2064,22 +2064,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
idealToolViewsToStandardTabs( rightNames, KDockWidget::DockRight, rightWidth );
idealToolViewsToStandardTabs( topNames, KDockWidget::DockTop, topHeight );
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
if ( !full )
return ;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ TQSize mins = pView->minimumSize();
+ TQSize maxs = pView->maximumSize();
+ TQSize sz = pView->size();
+ TQWidget* pParent = pView->parentWidget();
+ TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
pView->reparent( 0, 0, p );
pView->reparent( 0, 0, p );
pView->resize( sz );
@@ -2116,11 +2116,11 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
}
-QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
+TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
{
KDockContainer * pDW = dynamic_cast<KDockContainer*>( container->getWidget() );
- QStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
- for ( QStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
+ TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
+ for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
{
KDockWidget* dw = ( KDockWidget* ) manager() ->getDockWidgetFromName( *it );
dw->undock();
@@ -2130,7 +2130,7 @@ QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
return widgetNames;
}
-void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int size )
+void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int size )
{
Q_UNUSED( size )
@@ -2142,7 +2142,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi
if ( widgetNames.count() > 0 )
{
- QStringList::iterator it = widgetNames.begin();
+ TQStringList::iterator it = widgetNames.begin();
KDockWidget *dwpd = manager() ->getDockWidgetFromName( *it );
if ( !dwpd )
{
@@ -2163,7 +2163,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi
}
#if 0
- QWidget *wid = dwpd->parentDockTabGroup();
+ TQWidget *wid = dwpd->parentDockTabGroup();
if ( !wid )
wid = dwpd;
wid->setGeometry( 0, 0, 20, 20 );
@@ -2195,13 +2195,13 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
return ; // use setMenuForSDIModeSysButtons( 0L) for unsetting the external main menu!
if ( !m_pUndock )
- m_pUndock = new QToolButton( pMenuBar );
+ m_pUndock = new TQToolButton( pMenuBar );
if ( !m_pRestore )
- m_pRestore = new QToolButton( pMenuBar );
+ m_pRestore = new TQToolButton( pMenuBar );
if ( !m_pMinimize )
- m_pMinimize = new QToolButton( pMenuBar );
+ m_pMinimize = new TQToolButton( pMenuBar );
if ( !m_pClose )
- m_pClose = new QToolButton( pMenuBar );
+ m_pClose = new TQToolButton( pMenuBar );
m_pUndock->setAutoRaise( false );
m_pMinimize->setAutoRaise( false );
m_pRestore->setAutoRaise( false );
@@ -2216,17 +2216,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
// create the decoration pixmaps
if ( frameDecorOfAttachedViews() == KMdi::Win95Look )
{
- m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
- m_pMinButtonPixmap = new QPixmap( win_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( win_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( win_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( win_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( win_closebutton );
}
else if ( frameDecorOfAttachedViews() == KMdi::KDE1Look )
{
- m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde_closebutton );
m_pUndock->setAutoRaise( true );
m_pMinimize->setAutoRaise( true );
m_pRestore->setAutoRaise( true );
@@ -2234,17 +2234,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
}
else if ( frameDecorOfAttachedViews() == KMdi::KDELook )
{
- m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2_closebutton );
}
else
{ // kde2laptop look
- m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton );
}
m_pUndock->hide();
@@ -2347,7 +2347,7 @@ void KMdiMainFrm::activateFirstWin()
{
m_bSwitching= true; // flag that we are currently switching between windows
KMdiIterator<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> m;
for ( it->first(); !it->isDone(); it->next() )
{
m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
@@ -2356,9 +2356,9 @@ void KMdiMainFrm::activateFirstWin()
if ( !activeWindow() )
return ;
- QDateTime current = activeWindow() ->getTimeStamp();
- QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
- QMap<QDateTime, KMdiChildView*>::iterator newPos = pos;
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQMap<TQDateTime, KMdiChildView*>::iterator newPos = pos;
if ( pos != m.end() )
{
++newPos;
@@ -2380,7 +2380,7 @@ void KMdiMainFrm::activateLastWin()
{
m_bSwitching= true; // flag that we are currently switching between windows
KMdiIterator<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> m;
for ( it->first(); !it->isDone(); it->next() )
{
m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
@@ -2389,8 +2389,8 @@ void KMdiMainFrm::activateLastWin()
if ( !activeWindow() )
return ;
- QDateTime current = activeWindow() ->getTimeStamp();
- QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
if ( pos != m.begin() )
{
--pos;
@@ -2432,23 +2432,23 @@ void KMdiMainFrm::setEnableMaximizedChildFrmMode( bool enableMaxChildFrameMode )
if ( !pCurrentChild || !m_pMainMenuBar )
return ;
- QObject::connect( m_pUndock, SIGNAL( clicked() ), pCurrentChild, SLOT( undockPressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), pCurrentChild, SLOT( minimizePressed() ) );
- QObject::connect( m_pRestore, SIGNAL( clicked() ), pCurrentChild, SLOT( maximizePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( undockPressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( maximizePressed() ) );
m_pMinimize->show();
m_pUndock->show();
m_pRestore->show();
if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
{
- m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), SLOT( closePressed() ), 0, -1, 0 );
+ m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), TQT_SLOT( closePressed() ), 0, -1, 0 );
}
else
{
m_pMainMenuBar->insertItem( *pCurrentChild->icon(), pCurrentChild->systemMenu(), -1, 0 );
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), pCurrentChild, SLOT( closePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( closePressed() ) );
m_pClose->show();
}
else
@@ -2484,10 +2484,10 @@ void KMdiMainFrm::switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild )
if ( oldChild )
{
Q_ASSERT( m_pClose );
- QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
- QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( closePressed() ) );
}
m_pUndock->hide();
m_pMinimize->hide();
@@ -2506,7 +2506,7 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF
if ( newChild )
{
if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
- m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), newChild, SLOT( closePressed() ), 0, -1, 0 );
+ m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), newChild, TQT_SLOT( closePressed() ), 0, -1, 0 );
else
m_pMainMenuBar->insertItem( *newChild->icon(), newChild->systemMenu(), -1, 0 );
}
@@ -2515,18 +2515,18 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF
{
m_pMainMenuBar->removeItem( m_pMainMenuBar->idAt( 1 ) );
Q_ASSERT( m_pClose );
- QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
- QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( closePressed() ) );
}
if ( newChild )
{
Q_ASSERT( m_pClose );
- QObject::connect( m_pUndock, SIGNAL( clicked() ), newChild, SLOT( undockPressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), newChild, SLOT( minimizePressed() ) );
- QObject::connect( m_pRestore, SIGNAL( clicked() ), newChild, SLOT( maximizePressed() ) );
- QObject::connect( m_pClose, SIGNAL( clicked() ), newChild, SLOT( closePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( undockPressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( closePressed() ) );
}
}
@@ -2574,7 +2574,7 @@ void KMdiMainFrm::fillWindowMenu()
d->closeWindowAction->plug(m_pWindowMenu);
- int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, SLOT( closeAllViews() ) );
+ int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, TQT_SLOT( closeAllViews() ) );
if ( noViewOpened )
{
d->closeWindowAction->setEnabled(false);
@@ -2583,7 +2583,7 @@ void KMdiMainFrm::fillWindowMenu()
if ( !tabPageMode && !IDEAlMode )
{
- int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, SLOT( iconifyAllViews() ) );
+ int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, TQT_SLOT( iconifyAllViews() ) );
if ( noViewOpened )
m_pWindowMenu->setItemEnabled( iconifyId, false );
}
@@ -2591,10 +2591,10 @@ void KMdiMainFrm::fillWindowMenu()
m_pWindowMenu->insertSeparator();
m_pWindowMenu->insertItem( i18n( "&MDI Mode" ), m_pMdiModeMenu );
m_pMdiModeMenu->clear();
- m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, SLOT( switchToToplevelMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, SLOT( switchToChildframeMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, SLOT( switchToTabPageMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, SLOT( switchToIDEAlMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, TQT_SLOT( switchToToplevelMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, TQT_SLOT( switchToChildframeMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, TQT_SLOT( switchToTabPageMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, TQT_SLOT( switchToIDEAlMode() ) );
switch ( m_mdiMode )
{
case KMdi::ToplevelMode:
@@ -2618,13 +2618,13 @@ void KMdiMainFrm::fillWindowMenu()
{
int placMenuId = m_pWindowMenu->insertItem( i18n( "&Tile" ), m_pPlacingMenu );
m_pPlacingMenu->clear();
- m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, SLOT( cascadeWindows() ) );
- m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, SLOT( cascadeMaximized() ) );
- m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, SLOT( expandVertical() ) );
- m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, SLOT( expandHorizontal() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, SLOT( tileAnodine() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, SLOT( tilePragma() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, SLOT( tileVertically() ) );
+ m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, TQT_SLOT( cascadeWindows() ) );
+ m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, TQT_SLOT( cascadeMaximized() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, TQT_SLOT( expandVertical() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, TQT_SLOT( expandHorizontal() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, TQT_SLOT( tileAnodine() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, TQT_SLOT( tilePragma() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, TQT_SLOT( tileVertically() ) );
if ( m_mdiMode == KMdi::ToplevelMode )
{
m_pWindowMenu->setItemEnabled( placMenuId, false );
@@ -2644,19 +2644,19 @@ void KMdiMainFrm::fillWindowMenu()
// for all child frame windows: give an ID to every window and connect them in the end with windowMenuItemActivated()
int i = 100;
KMdiChildView* pView = 0L;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
- QValueList<QDateTime> timeStamps;
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQValueList<TQDateTime> timeStamps;
for ( ; it.current(); ++it )
{
pView = it.current();
- QDateTime timeStamp( pView->getTimeStamp() );
+ TQDateTime timeStamp( pView->getTimeStamp() );
if ( pView->isToolView() )
{
continue;
}
- QString item;
+ TQString item;
// set titles of minimized windows in brackets
if ( pView->isMinimized() )
{
@@ -2674,8 +2674,8 @@ void KMdiMainFrm::fillWindowMenu()
unsigned int indx;
unsigned int windowItemCount = m_pWindowMenu->count() - entryCount;
bool inserted = false;
- QString tmpString;
- QValueList<QDateTime>::iterator timeStampIterator = timeStamps.begin();
+ TQString tmpString;
+ TQValueList<TQDateTime>::iterator timeStampIterator = timeStamps.begin();
for ( indx = 0; indx <= windowItemCount; indx++, ++timeStampIterator )
{
bool putHere = false;
@@ -2686,7 +2686,7 @@ void KMdiMainFrm::fillWindowMenu()
}
if ( putHere )
{
- m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount );
+ m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount );
if ( pView == m_pCurrentWindow )
{
m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( indx + entryCount ), true );
@@ -2694,7 +2694,7 @@ void KMdiMainFrm::fillWindowMenu()
pView->setWindowMenuID( i );
if ( !tabPageMode )
{
- m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, indx );
+ m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, indx );
if ( pView->isAttached() )
{
m_pDockMenu->setItemChecked( m_pDockMenu->idAt( indx ), true );
@@ -2707,7 +2707,7 @@ void KMdiMainFrm::fillWindowMenu()
}
if ( !inserted )
{ // append it
- m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount );
+ m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount );
if ( pView == m_pCurrentWindow )
{
m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( windowItemCount + entryCount ), true );
@@ -2715,7 +2715,7 @@ void KMdiMainFrm::fillWindowMenu()
pView->setWindowMenuID( i );
if ( !tabPageMode )
{
- m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount );
+ m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount );
if ( pView->isAttached() )
{
m_pDockMenu->setItemChecked( m_pDockMenu->idAt( windowItemCount ), true );
@@ -2776,7 +2776,7 @@ void KMdiMainFrm::dockMenuItemActivated( int id )
//================ popupWindowMenu ===============//
-void KMdiMainFrm::popupWindowMenu( QPoint p )
+void KMdiMainFrm::popupWindowMenu( TQPoint p )
{
if ( !isFakingSDIApplication() )
{
@@ -2792,7 +2792,7 @@ void KMdiMainFrm::dragEndTimeOut()
for ( m_pDocumentViews->first(); ( pView = m_pDocumentViews->current() ) != 0L; m_pDocumentViews->next() )
{
KMdiChildFrmDragEndEvent dragEndEvent( 0L );
- QApplication::sendEvent( pView, &dragEndEvent );
+ TQApplication::sendEvent( pView, &dragEndEvent );
}
}
@@ -2819,7 +2819,7 @@ void KMdiMainFrm::setFrameDecorOfAttachedViews( int frameDecor )
break;
}
setMenuForSDIModeSysButtons( m_pMainMenuBar );
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
diff --git a/kmdi/kmdimainfrm.h b/kmdi/kmdimainfrm.h
index a72a654d3..9ef050200 100644
--- a/kmdi/kmdimainfrm.h
+++ b/kmdi/kmdimainfrm.h
@@ -35,11 +35,11 @@
#include <kmenubar.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include "kmditaskbar.h"
#include "kmdichildarea.h"
@@ -72,7 +72,7 @@ class KMdiMainFrmPrivate;
class KMDI_EXPORT KMdiViewCloseEvent : public QCustomEvent
{
public:
- KMdiViewCloseEvent( KMdiChildView* pWnd ) : QCustomEvent( QEvent::User, pWnd ) {}
+ KMdiViewCloseEvent( KMdiChildView* pWnd ) : TQCustomEvent( TQEvent::User, pWnd ) {}
};
/**
@@ -123,7 +123,7 @@ public:
* setMenuForSDIModeSysButtons( menuBar() );
* }
* ...
- * void B_MainModuleWidget::resizeEvent ( QResizeEvent *e )
+ * void B_MainModuleWidget::resizeEvent ( TQResizeEvent *e )
* {
* KMdiMainFrm::resizeEvent( e );
* setSysButtonsAtMenuPosition();
@@ -230,7 +230,7 @@ public:
* }
* else
* {
- * m_pMdiMainFrm->addWindow( pWnd, QPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
+ * m_pMdiMainFrm->addWindow( pWnd, TQPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
* return;
* }
* m_pMdiMainFrm->addWindow( pWnd, KMdi::AddWindowFlags(mdiFlags));
@@ -248,27 +248,27 @@ protected:
KMdi::MdiMode m_mdiMode;
KMdiChildArea *m_pMdi;
KMdiTaskBar *m_pTaskBar;
- QPtrList<KMdiChildView> *m_pDocumentViews;
- QMap<QWidget*, KMdiToolViewAccessor*> *m_pToolViews;
+ TQPtrList<KMdiChildView> *m_pDocumentViews;
+ TQMap<TQWidget*, KMdiToolViewAccessor*> *m_pToolViews;
KMdiChildView *m_pCurrentWindow;
- QPopupMenu *m_pWindowPopup;
- QPopupMenu *m_pTaskBarPopup;
- QPopupMenu *m_pWindowMenu;
- QPopupMenu *m_pDockMenu;
- QPopupMenu *m_pMdiModeMenu;
- QPopupMenu *m_pPlacingMenu;
+ TQPopupMenu *m_pWindowPopup;
+ TQPopupMenu *m_pTaskBarPopup;
+ TQPopupMenu *m_pWindowMenu;
+ TQPopupMenu *m_pDockMenu;
+ TQPopupMenu *m_pMdiModeMenu;
+ TQPopupMenu *m_pPlacingMenu;
KMenuBar *m_pMainMenuBar;
- QPixmap *m_pUndockButtonPixmap;
- QPixmap *m_pMinButtonPixmap;
- QPixmap *m_pRestoreButtonPixmap;
- QPixmap *m_pCloseButtonPixmap;
+ TQPixmap *m_pUndockButtonPixmap;
+ TQPixmap *m_pMinButtonPixmap;
+ TQPixmap *m_pRestoreButtonPixmap;
+ TQPixmap *m_pCloseButtonPixmap;
- QToolButton *m_pUndock;
- QToolButton *m_pMinimize;
- QToolButton *m_pRestore;
- QToolButton *m_pClose;
- QPoint m_undockPositioningOffset;
+ TQToolButton *m_pUndock;
+ TQToolButton *m_pMinimize;
+ TQToolButton *m_pRestore;
+ TQToolButton *m_pClose;
+ TQPoint m_undockPositioningOffset;
bool m_bMaximizedChildFrmMode;
int m_oldMainFrmHeight;
int m_oldMainFrmMinHeight;
@@ -276,10 +276,10 @@ protected:
static KMdi::FrameDecor m_frameDecoration;
bool m_bSDIApplication;
KDockWidget* m_pDockbaseAreaOfDocumentViews;
- QDomDocument* m_pTempDockSession;
+ TQDomDocument* m_pTempDockSession;
bool m_bClearingOfWindowMenuBlocked;
- QTimer* m_pDragEndTimer;
+ TQTimer* m_pDragEndTimer;
bool m_bSwitching;
@@ -296,7 +296,7 @@ private:
// methods
public:
- KMdiMainFrm( QWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
+ KMdiMainFrm( TQWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
virtual ~KMdiMainFrm();
/**
@@ -329,13 +329,13 @@ public:
* Undock/Dock, Restore/Maximize/Minimize, Close and an empty sub-popup ( windowPopup() )
* menu called Operations.
*/
- virtual QPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false );
+ virtual TQPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false );
/**
* Returns a popup menu with only a title "Window". You can fill it with own operations entries
* on the MDI view. This popup menu is inserted as last menu item in taskBarPopup() .
*/
- virtual QPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true );
+ virtual TQPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true );
/**
* Called in the constructor (forces a resize of all MDI views)
@@ -345,7 +345,7 @@ public:
/**
* Returns the KMdiChildView belonging to the given caption string.
*/
- KMdiChildView * findWindow( const QString& caption );
+ KMdiChildView * findWindow( const TQString& caption );
enum ExistsAs {DocumentView, ToolView, AnyView};
/**
@@ -363,9 +363,9 @@ public:
* It is necessary that the main frame has to start an MDI view close action because it must
* remove the MDI view from MDI control, additionally.
*
- * This method calls QMainWindow::event , additionally.
+ * This method calls TQMainWindow::event , additionally.
*/
- virtual bool event( QEvent* e );
+ virtual bool event( TQEvent* e );
/**
* If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close).
@@ -381,7 +381,7 @@ public:
* Sets an offset value that is used on detachWindow() . The undocked window
* is visually moved on the desktop by this offset.
*/
- virtual void setUndockPositioningOffset( QPoint offset ) { m_undockPositioningOffset = offset; }
+ virtual void setUndockPositioningOffset( TQPoint offset ) { m_undockPositioningOffset = offset; }
/**
* If you don't want to know about the inner structure of the KMdi system, you can use
@@ -415,28 +415,28 @@ public:
* Additionally, this menu provides some placing actions for these views.
* Usually, you insert this popup menu in your main menubar as "Window" menu.
*/
- QPopupMenu* windowMenu() const { return m_pWindowMenu; };
+ TQPopupMenu* windowMenu() const { return m_pWindowMenu; };
/**
* Sets a background color for the MDI view area widget.
*/
- virtual void setBackgroundColor( const QColor &c ) { m_pMdi->setBackgroundColor( c ); }
+ virtual void setBackgroundColor( const TQColor &c ) { m_pMdi->setBackgroundColor( c ); }
/**
* Sets a background pixmap for the MDI view area widget.
*/
- virtual void setBackgroundPixmap( const QPixmap &pm ) { m_pMdi->setBackgroundPixmap( pm ); }
+ virtual void setBackgroundPixmap( const TQPixmap &pm ) { m_pMdi->setBackgroundPixmap( pm ); }
/**
* Sets a size that is used as the default size for a newly to the MDI system added KMdiChildView .
* By default this size is 600x400. So all non-resized added MDI views appear in that size.
*/
- void setDefaultChildFrmSize( const QSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; }
+ void setDefaultChildFrmSize( const TQSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; }
/**
* Returns the default size for a newly added KMdiChildView. See setDefaultChildFrmSize() .
*/
- QSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; }
+ TQSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; }
/**
* Do nothing when in Toplevel mode
@@ -473,8 +473,8 @@ public:
*/
bool isFakingSDIApplication() const { return m_bSDIApplication; }
- virtual bool eventFilter( QObject *obj, QEvent *e );
- void findRootDockWidgets( QPtrList<KDockWidget>* pRootDockWidgetList, QValueList<QRect>* pPositionList );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
+ void findRootDockWidgets( TQPtrList<KDockWidget>* pRootDockWidgetList, TQValueList<TQRect>* pPositionList );
/** We're switching something.*/
void setSwitching( const bool switching ) { m_bSwitching = switching; }
@@ -482,10 +482,10 @@ public:
public slots:
/**
- * addWindow demands a KMdiChildView. This method wraps every QWidget in such an object and
+ * addWindow demands a KMdiChildView. This method wraps every TQWidget in such an object and
* this way you can put every widget under MDI control.
*/
- KMdiChildView* createWrapper( QWidget *view, const QString& name, const QString& shortName );
+ KMdiChildView* createWrapper( TQWidget *view, const TQString& name, const TQString& shortName );
/**
* Adds a KMdiChildView to the MDI system. The main frame takes control of it.
@@ -527,7 +527,7 @@ public slots:
* \li whether the view should be added as tool view (stay-on-top and toplevel) or
* added as document-type view.
*/
- virtual void addWindow( KMdiChildView* pWnd, QPoint pos, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pWnd, TQPoint pos, int flags = KMdi::StandardAdd );
/**
* Adds a KMdiChildView to the MDI system. The main frame takes control of it.
@@ -540,17 +540,17 @@ public slots:
* \li whether the view should be added as tool view (stay-on-top and toplevel) or
* added as document-type view.
*/
- virtual void addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pWnd, TQRect rectNormal, int flags = KMdi::StandardAdd );
/**
* Usually called from addWindow() when adding a tool view window. It reparents the given widget
* as toplevel and stay-on-top on the application's main widget.
*/
- virtual KMdiToolViewAccessor *addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone,
- QWidget* pTargetWnd = 0L, int percent = 50, const QString& tabToolTip = 0,
- const QString& tabCaption = 0 );
+ virtual KMdiToolViewAccessor *addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone,
+ TQWidget* pTargetWnd = 0L, int percent = 50, const TQString& tabToolTip = 0,
+ const TQString& tabCaption = 0 );
- virtual void deleteToolWindow( QWidget* pWnd );
+ virtual void deleteToolWindow( TQWidget* pWnd );
virtual void deleteToolWindow( KMdiToolViewAccessor *accessor );
/**
@@ -745,7 +745,7 @@ private:
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it.
@@ -763,10 +763,10 @@ protected:
*/
void blockClearingOfWindowMenu( bool bBlocked ) { m_bClearingOfWindowMenuBlocked = bBlocked; }
- void findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
- void dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
- QStringList prepareIdealToTabs( KDockWidget* container );
- void idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
+ void findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
+ void dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
+ TQStringList prepareIdealToTabs( KDockWidget* container );
+ void idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
/** Get tabwidget visibility */
KMdi::TabWidgetVisibility tabWidgetVisibility();
@@ -813,7 +813,7 @@ protected slots: // Protected slots
/**
* Popups the "Window" menu. See also windowPopup() .
*/
- void popupWindowMenu( QPoint p );
+ void popupWindowMenu( TQPoint p );
/**
* The timer for main widget moving has elapsed -> send drag end to all concerned views.
@@ -844,7 +844,7 @@ signals:
/**
* Signals that a child view has been detached (undocked to desktop)
*/
- void childViewIsDetachedNow( QWidget* );
+ void childViewIsDetachedNow( TQWidget* );
/** Signals we need to collapse the overlapped containers */
void collapseOverlapContainers();
@@ -862,7 +862,7 @@ public slots:
private slots:
void setActiveToolDock( KMdiDockContainer* );
void removeFromActiveDockList( KMdiDockContainer* );
- void slotDocCurrentChanged( QWidget* );
+ void slotDocCurrentChanged( TQWidget* );
void verifyToplevelHeight();
#define protected public
signals:
diff --git a/kmdi/kmditaskbar.cpp b/kmdi/kmditaskbar.cpp
index 2b86c0c85..71c3de454 100644
--- a/kmdi/kmditaskbar.cpp
+++ b/kmdi/kmditaskbar.cpp
@@ -33,12 +33,12 @@
#include "kmdichildview.h"
#include "kmdidefines.h"
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qstyle.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqstyle.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
/*
@quickhelp: KMdiTaskBar
@@ -56,12 +56,12 @@
//
//####################################################################
KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr )
- : QPushButton( pTaskBar ),
+ : TQPushButton( pTaskBar ),
m_actualText( "" )
{
setToggleButton( true );
m_pWindow = win_ptr;
- QToolTip::add
+ TQToolTip::add
( this, win_ptr->caption() );
setFocusPolicy( NoFocus );
}
@@ -69,14 +69,14 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_
KMdiTaskBarButton::~KMdiTaskBarButton()
{}
-void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e )
+void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e )
{
switch ( e->button() )
{
- case QMouseEvent::LeftButton:
+ case TQMouseEvent::LeftButton:
emit leftMouseButtonClicked( m_pWindow );
break;
- case QMouseEvent::RightButton:
+ case TQMouseEvent::RightButton:
emit rightMouseButtonClicked( m_pWindow );
break;
default:
@@ -86,27 +86,27 @@ void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e )
}
/** slot version of setText */
-void KMdiTaskBarButton::setNewText( const QString& s )
+void KMdiTaskBarButton::setNewText( const TQString& s )
{
setText( s );
emit buttonTextChanged( 0 );
}
-void KMdiTaskBarButton::setText( const QString& s )
+void KMdiTaskBarButton::setText( const TQString& s )
{
m_actualText = s;
- QButton::setText( s );
+ TQButton::setText( s );
}
-void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth )
+void KMdiTaskBarButton::fitText( const TQString& origStr, int newWidth )
{
- QButton::setText( m_actualText );
+ TQButton::setText( m_actualText );
int actualWidth = sizeHint().width();
int realLetterCount = origStr.length();
int newLetterCount = ( newWidth * realLetterCount ) / actualWidth;
int w = newWidth + 1;
- QString s = origStr;
+ TQString s = origStr;
while ( ( w > newWidth ) && ( newLetterCount >= 1 ) )
{
if ( newLetterCount < realLetterCount )
@@ -121,15 +121,15 @@ void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth )
s = origStr.left( 1 );
}
}
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
w = fm.width( s );
newLetterCount--;
}
- QButton::setText( s );
+ TQButton::setText( s );
}
-QString KMdiTaskBarButton::actualText() const
+TQString KMdiTaskBarButton::actualText() const
{
return m_actualText;
}
@@ -140,7 +140,7 @@ QString KMdiTaskBarButton::actualText() const
//
//####################################################################
-KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock )
+KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock )
: KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true )
, m_pCurrentFocusedWindow( 0 )
, m_pStretchSpace( 0 )
@@ -148,9 +148,9 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock )
, m_bSwitchedOn( false )
{
m_pFrm = parent;
- m_pButtonList = new QPtrList<KMdiTaskBarButton>;
+ m_pButtonList = new TQPtrList<KMdiTaskBarButton>;
m_pButtonList->setAutoDelete( true );
- //QT30 setFontPropagation(QWidget::SameFont);
+ //QT30 setFontPropagation(TQWidget::SameFont);
setMinimumWidth( 1 );
setFocusPolicy( NoFocus );
parent->moveToolBar( this, dock ); //XXX obsolete!
@@ -171,18 +171,18 @@ KMdiTaskBarButton * KMdiTaskBar::addWinButton( KMdiChildView *win_ptr )
}
KMdiTaskBarButton *b = new KMdiTaskBarButton( this, win_ptr );
- QObject::connect( b, SIGNAL( clicked() ), win_ptr, SLOT( setFocus() ) );
- QObject::connect( b, SIGNAL( clicked( KMdiChildView* ) ), this, SLOT( setActiveButton( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( activateView( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( buttonTextChanged( int ) ), this, SLOT( layoutTaskBar( int ) ) );
+ TQObject::connect( b, TQT_SIGNAL( clicked() ), win_ptr, TQT_SLOT( setFocus() ) );
+ TQObject::connect( b, TQT_SIGNAL( clicked( KMdiChildView* ) ), this, TQT_SLOT( setActiveButton( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( buttonTextChanged( int ) ), this, TQT_SLOT( layoutTaskBar( int ) ) );
m_pButtonList->append( b );
b->setToggleButton( true );
b->setText( win_ptr->tabCaption() );
layoutTaskBar();
- m_pStretchSpace = new QLabel( this, "empty" );
+ m_pStretchSpace = new TQLabel( this, "empty" );
m_pStretchSpace->setText( "" );
setStretchableWidget( m_pStretchSpace );
m_pStretchSpace->show();
@@ -325,9 +325,9 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
int allButtonsWidthHint = 0;
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
{
- QFontMetrics fm = b->fontMetrics();
- QString s = b->actualText();
- QSize sz = fm.size( ShowPrefix, s );
+ TQFontMetrics fm = b->fontMetrics();
+ TQString s = b->actualText();
+ TQSize sz = fm.size( ShowPrefix, s );
int w = sz.width() + 6;
int h = sz.height() + sz.height() / 8 + 10;
w += h;
@@ -337,8 +337,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
// if there's enough space, use actual width
int buttonCount = m_pButtonList->count();
int tbHandlePixel;
- tbHandlePixel = style().pixelMetric( QStyle::PM_DockWindowHandleExtent, this );
- int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) - 5;
+ tbHandlePixel = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this );
+ int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5;
if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) )
{
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
@@ -375,7 +375,7 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
m_layoutIsPending = false;
}
-void KMdiTaskBar::resizeEvent( QResizeEvent* rse )
+void KMdiTaskBar::resizeEvent( TQResizeEvent* rse )
{
if ( !m_layoutIsPending )
{
diff --git a/kmdi/kmditaskbar.h b/kmdi/kmditaskbar.h
index f485fb864..39c4efa2e 100644
--- a/kmdi/kmditaskbar.h
+++ b/kmdi/kmditaskbar.h
@@ -29,10 +29,10 @@
#define _KMDITASKBAR_H_
#include <ktoolbar.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "kmdidefines.h"
@@ -45,7 +45,7 @@ class KMdiTaskBarButtonPrivate;
/**
* @short Internal class.
*
- * It's a special kind of QPushButton catching mouse clicks.
+ * It's a special kind of TQPushButton catching mouse clicks.
* And you have the ability to abbreviate the text that it fits in the button.
*/
class KMDI_EXPORT KMdiTaskBarButton : public QPushButton
@@ -64,15 +64,15 @@ public:
/**
* text() returns the possibly abbreviated text including the dots in it. But actualText() returns the full text.
*/
- QString actualText() const;
+ TQString actualText() const;
/**
* Given the parameter newWidth this function possibly abbreviates the parameter string and sets a new button text.
*/
- void fitText( const QString&, int newWidth );
+ void fitText( const TQString&, int newWidth );
/**
* Sets the text and avoids any abbreviation. Memorizes that text in m_actualText, too.
*/
- void setText( const QString& );
+ void setText( const TQString& );
signals:
/**
* Emitted when the button has been clicked. Internally connected to setFocus of the according MDI view.
@@ -94,12 +94,12 @@ public slots:
/**
* A slot version of setText
*/
- void setNewText( const QString& );
+ void setNewText( const TQString& );
protected slots:
/**
* Reimplemented from its base class to catch right and left mouse button clicks
*/
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
// attributes
public:
@@ -111,7 +111,7 @@ protected:
/**
* Internally we must remember the real text because the button text can be abbreviated.
*/
- QString m_actualText;
+ TQString m_actualText;
private:
KMdiTaskBarButtonPrivate *d;
@@ -122,7 +122,7 @@ class KMdiTaskBarPrivate;
/**
* @short Internal class.
*
- * It's a special kind of QToolBar that acts as taskbar for child views.
+ * It's a special kind of TQToolBar that acts as taskbar for child views.
* KMdiTaskBarButtons can be added or removed dynamically.<br>
* The button sizes are adjusted dynamically, as well.
*/
@@ -131,9 +131,9 @@ class KMDI_EXPORT KMdiTaskBar : public KToolBar
Q_OBJECT
public:
/**
- * Constructor (NoFocus, minimum width = 1, an internal QPtrList of taskbar buttons (autodelete))
+ * Constructor (NoFocus, minimum width = 1, an internal TQPtrList of taskbar buttons (autodelete))
*/
- KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock );
+ KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock );
/**
* Destructor (deletes the taskbar button list)
*/
@@ -173,7 +173,7 @@ protected:
/**
* Reimplemented from its base class to call layoutTaskBar, additionally.
*/
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
protected slots:
/**
* Checks if all buttons fits into this. If not, it recalculates all button widths
@@ -194,7 +194,7 @@ protected:
* A list of taskbar buttons.
* Note: Each button stands for one MDI view (toolviews doesn't have got a taskbar button).
*/
- QPtrList<KMdiTaskBarButton>* m_pButtonList;
+ TQPtrList<KMdiTaskBarButton>* m_pButtonList;
/**
* The belonging MDI mainframe (parent widget of this)
*/
@@ -206,7 +206,7 @@ protected:
/**
* A stretchable widget used as 'space' at the end of a half filled taskbar
*/
- QLabel* m_pStretchSpace;
+ TQLabel* m_pStretchSpace;
bool m_layoutIsPending;
bool m_bSwitchedOn;
diff --git a/kmdi/kmditoolviewaccessor.cpp b/kmdi/kmditoolviewaccessor.cpp
index f9921e18c..1d2cce946 100644
--- a/kmdi/kmditoolviewaccessor.cpp
+++ b/kmdi/kmditoolviewaccessor.cpp
@@ -29,8 +29,8 @@
#include "kmditoolviewaccessor.h"
#include "kmditoolviewaccessor_p.h"
-KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
- : QObject( parent )
+KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption )
+ : TQObject( parent )
{
mdiMainFrm = parent;
d = new KMdiToolViewAccessorPrivate();
@@ -42,7 +42,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget
else
{
d->widget = widgetToWrap;
- QString finalTabCaption;
+ TQString finalTabCaption;
if ( tabCaption == 0 )
{
finalTabCaption = widgetToWrap->caption();
@@ -56,7 +56,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget
finalTabCaption = tabCaption;
}
d->widgetContainer = parent->createDockWidget( widgetToWrap->name(),
- ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() ),
+ ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() ),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -90,32 +90,32 @@ KMdiToolViewAccessor::~KMdiToolViewAccessor()
}
-QWidget *KMdiToolViewAccessor::wrapperWidget()
+TQWidget *KMdiToolViewAccessor::wrapperWidget()
{
if ( !d->widgetContainer )
{
- d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", QPixmap() );
- connect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", TQPixmap() );
+ connect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) );
}
return d->widgetContainer;
}
-QWidget *KMdiToolViewAccessor::wrappedWidget()
+TQWidget *KMdiToolViewAccessor::wrappedWidget()
{
return d->widget;
}
-void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
+void KMdiToolViewAccessor::setWidgetToWrap( TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption )
{
Q_ASSERT( !( d->widget ) );
Q_ASSERT( !widgetToWrap->inherits( "KDockWidget" ) );
- disconnect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ disconnect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) );
delete d->widget;
d->widget = widgetToWrap;
KDockWidget *tmp = d->widgetContainer;
- QString finalTabCaption;
+ TQString finalTabCaption;
if ( tabCaption == 0 )
{
finalTabCaption = widgetToWrap->caption();
@@ -132,7 +132,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
if ( !tmp )
{
tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(),
- widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap(),
+ widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap(),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -146,7 +146,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
{
tmp->setCaption( widgetToWrap->caption() );
tmp->setTabPageLabel( finalTabCaption );
- tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() );
+ tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() );
tmp->setName( widgetToWrap->name() );
if ( tabToolTip != 0 )
{
@@ -164,21 +164,21 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
}
-bool KMdiToolViewAccessor::eventFilter( QObject *, QEvent *e )
+bool KMdiToolViewAccessor::eventFilter( TQObject *, TQEvent *e )
{
- if ( e->type() == QEvent::IconChange )
+ if ( e->type() == TQEvent::IconChange )
{
- d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : QPixmap() );
+ d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : TQPixmap() );
}
return false;
}
-void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent )
{
place( pos, pTargetWnd, percent );
show();
}
-void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent )
{
Q_ASSERT( d->widgetContainer );
if ( !d->widgetContainer )
@@ -186,7 +186,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge
if ( pos == KDockWidget::DockNone )
{
d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
- d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, QPoint( 0, 0 ), true ); //pToolView->isVisible());
+ d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint( 0, 0 ), true ); //pToolView->isVisible());
}
else
{ // add (and dock) the toolview as DockWidget view
@@ -214,7 +214,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge
pTargetDock = mdiMainFrm->m_pDockbaseAreaOfDocumentViews;
}
}
- // this is not inheriting QWidget*, its plain impossible that this condition is true
+ // this is not inheriting TQWidget*, its plain impossible that this condition is true
//if (pTargetWnd == this) DockToOurself = true;
if ( !DockToOurself )
if ( pTargetWnd != 0L )
diff --git a/kmdi/kmditoolviewaccessor.h b/kmdi/kmditoolviewaccessor.h
index d5bd49a74..28241ea3b 100644
--- a/kmdi/kmditoolviewaccessor.h
+++ b/kmdi/kmditoolviewaccessor.h
@@ -21,11 +21,11 @@
#ifndef _KMDITOOLVIEWACCESSOR_H_
#define _KMDITOOLVIEWACCESSOR_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include <kdockwidget.h>
@@ -60,24 +60,24 @@ private:
bool m_bFocusInEventIsPending;
private:
- KMdiToolViewAccessor( class KMdiMainFrm *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ KMdiToolViewAccessor( class KMdiMainFrm *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0 );
KMdiToolViewAccessor( class KMdiMainFrm *parent );
public:
~KMdiToolViewAccessor();
- QWidget *wrapperWidget();
- QWidget *wrappedWidget();
- void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
- void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
+ TQWidget *wrapperWidget();
+ TQWidget *wrappedWidget();
+ void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 );
+ void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 );
void show();
public slots:
- void setWidgetToWrap( QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ void setWidgetToWrap( TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0 );
void hide();
private:
class KMdiToolViewAccessorPrivate *d;
class KMdiMainFrm *mdiMainFrm;
protected:
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
};
diff --git a/kmdi/kmditoolviewaccessor_p.h b/kmdi/kmditoolviewaccessor_p.h
index 913b88541..ecbaa76a3 100644
--- a/kmdi/kmditoolviewaccessor_p.h
+++ b/kmdi/kmditoolviewaccessor_p.h
@@ -24,9 +24,9 @@
#define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdockwidget.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
class KMDI_EXPORT KMdiToolViewAccessorPrivate {
@@ -40,9 +40,9 @@ public:
if (!widgetContainer.isNull()) widgetContainer->undock();
delete (KDockWidget*)widgetContainer;
}
- QGuardedPtr<KDockWidget> widgetContainer;
- QWidget* widget;
- QGuardedPtr<KAction> action;
+ TQGuardedPtr<KDockWidget> widgetContainer;
+ TQWidget* widget;
+ TQGuardedPtr<KAction> action;
};
diff --git a/kmdi/test/hello.cpp b/kmdi/test/hello.cpp
index f3a10f65c..d92233ea6 100644
--- a/kmdi/test/hello.cpp
+++ b/kmdi/test/hello.cpp
@@ -9,20 +9,20 @@
*****************************************************************************/
#include "hello.h"
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
/*
Constructs a Hello widget. Starts a 40 ms animation timer.
*/
-Hello::Hello( const char *title, const char *text, QWidget *parentWidget )
+Hello::Hello( const char *title, const char *text, TQWidget *parentWidget )
: KMdiChildView(title, parentWidget), t(text), b(0)
{
- QTimer *timer = new QTimer(this);
- QObject::connect( timer, SIGNAL(timeout()), SLOT(animate()) );
+ TQTimer *timer = new TQTimer(this);
+ TQObject::connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(animate()) );
timer->start( 40 );
resize( 260, 130 );
@@ -47,7 +47,7 @@ void Hello::animate()
the widget.
*/
-void Hello::mouseReleaseEvent( QMouseEvent *e )
+void Hello::mouseReleaseEvent( TQMouseEvent *e )
{
if ( rect().contains( e->pos() ) )
emit clicked();
@@ -61,7 +61,7 @@ void Hello::mouseReleaseEvent( QMouseEvent *e )
pixmap is then blt'ed to the screen.
*/
-void Hello::paintEvent( QPaintEvent * )
+void Hello::paintEvent( TQPaintEvent * )
{
static int sin_tbl[16] = {
0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38};
@@ -70,18 +70,18 @@ void Hello::paintEvent( QPaintEvent * )
return;
// 1: Compute some sizes, positions etc.
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int w = fm.width(t) + 20;
int h = fm.height() * 2;
int pmx = width()/2 - w/2;
int pmy = height()/2 - h/2;
// 2: Create the pixmap and fill it with the widget's background
- QPixmap pm( w, h );
+ TQPixmap pm( w, h );
pm.fill( this, pmx, pmy );
// 3: Paint the pixmap. Cool wave effect
- QPainter p;
+ TQPainter p;
int x = 10;
int y = h/2 + fm.descent();
int i = 0;
@@ -89,7 +89,7 @@ void Hello::paintEvent( QPaintEvent * )
p.setFont( font() );
while ( !t[i].isNull() ) {
int i16 = (b+i) & 15;
- p.setPen( QColor((15-i16)*16,255,255,QColor::Hsv) );
+ p.setPen( TQColor((15-i16)*16,255,255,TQColor::Hsv) );
p.drawText( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 );
x += fm.width( t[i] );
i++;
diff --git a/kmdi/test/hello.h b/kmdi/test/hello.h
index 59c18f3f2..bf57d5e04 100644
--- a/kmdi/test/hello.h
+++ b/kmdi/test/hello.h
@@ -11,7 +11,7 @@
#ifndef HELLO_H
#define HELLO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kmdichildview.h>
class QWidget;
@@ -22,16 +22,16 @@ class Hello : public KMdiChildView
{
Q_OBJECT
public:
- Hello( const char *title, const char *text, QWidget* parentWidget = 0 );
+ Hello( const char *title, const char *text, TQWidget* parentWidget = 0 );
signals:
void clicked();
protected:
- void mouseReleaseEvent( QMouseEvent * );
- void paintEvent( QPaintEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void paintEvent( TQPaintEvent * );
private slots:
void animate();
private:
- QString t;
+ TQString t;
int b;
};
diff --git a/kmdi/test/main.cpp b/kmdi/test/main.cpp
index 95d9c2f83..768fd087b 100644
--- a/kmdi/test/main.cpp
+++ b/kmdi/test/main.cpp
@@ -29,8 +29,8 @@
# include <kapplication.h>
KApplication* theApp;
#else
-# include <qapplication.h>
- QApplication* theApp;
+# include <tqapplication.h>
+ TQApplication* theApp;
#endif
//#include <iostream.h>
@@ -44,7 +44,7 @@ int main( int argc, char **argv )
#ifndef NO_KDE
KApplication a(argc,argv,"KFourChildren");
#else
- QApplication a(argc,argv);
+ TQApplication a(argc,argv);
#endif
theApp = &a;
@@ -59,7 +59,7 @@ int main( int argc, char **argv )
// SHOW(h1->caption());
// SHOW(h1->tabCaption());
- QWidget* w = new QWidget(mainWdg);
+ TQWidget* w = new TQWidget(mainWdg);
KMdiChildView* h2 = mainWdg->createWrapper(w, "I'm a common but wrapped QWidget!", "Hello2");
mainWdg->addWindow( h2 );
// SHOW(h2->caption());
@@ -67,20 +67,20 @@ int main( int argc, char **argv )
Hello* h3 = new Hello( "Hello3", "Dock me using the taskbar button context menu!", 0);
h3->setBackgroundColor( Qt::white );
- h3->setFont( QFont("times",20,QFont::Bold) );
+ h3->setFont( TQFont("times",20,TQFont::Bold) );
mainWdg->addWindow( h3, KMdi::Detach ); // undock this!
h3->setGeometry( 20, 20, 400, 100);
Hello* h4 = new Hello( "Hello4", "Hello world!", mainWdg);
h4->setMDICaption("Hello4 both changed");
- h4->setFont( QFont("times",32,QFont::Bold) );
+ h4->setFont( TQFont("times",32,TQFont::Bold) );
mainWdg->addWindow( h4);
// SHOW(h4->caption());
// SHOW(h4->tabCaption());
Hello* h5 = new Hello( "Hello5", "I'm not a MDI widget :-(");
h5->setGeometry(40, 40, 400, 100);
- h5->setFont( QFont("times",20,QFont::Bold) );
+ h5->setFont( TQFont("times",20,TQFont::Bold) );
h5->setCaption("MDI Test Application");
h5->show();
diff --git a/kmdi/test/mainwidget.cpp b/kmdi/test/mainwidget.cpp
index 872f9df27..b7ac2d31d 100644
--- a/kmdi/test/mainwidget.cpp
+++ b/kmdi/test/mainwidget.cpp
@@ -15,18 +15,18 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qmultilineedit.h>
-#include <qlistview.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqmenubar.h>
+#include <tqtoolbar.h>
+#include <tqmultilineedit.h>
+#include <tqlistview.h>
+#include <tqfile.h>
#include <kmdimainfrm.h>
#include <kmditoolviewaccessor.h>
#include "mainwidget.h"
-MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
+MainWidget::MainWidget(TQDomElement& dockConfig,KMdi::MdiMode mode)
: KMdiMainFrm(0L, "theMDIMainFrm",mode)
,m_dockConfig(dockConfig)
{
@@ -39,43 +39,43 @@ MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
readDockConfig(m_dockConfig);
}
- QMultiLineEdit* mle = new QMultiLineEdit(0L,"theMultiLineEditWidget");
- mle->setText("This is a QMultiLineEdit widget.");
+ TQMultiLineEdit* mle = new TQMultiLineEdit(0L,"theMultiLineEditWidget");
+ mle->setText("This is a TQMultiLineEdit widget.");
addToolWindow( mle, KDockWidget::DockBottom, m_pMdi, 70);
- QMultiLineEdit* mle2 = new QMultiLineEdit(0L,"theMultiLineEditWidget2");
+ TQMultiLineEdit* mle2 = new TQMultiLineEdit(0L,"theMultiLineEditWidget2");
addToolWindow( mle2, KDockWidget::DockCenter, mle, 70);
- QMultiLineEdit* mle3 = new QMultiLineEdit(0L,"theMultiLineEditWidget3");
+ TQMultiLineEdit* mle3 = new TQMultiLineEdit(0L,"theMultiLineEditWidget3");
addToolWindow( mle3, KDockWidget::DockCenter, mle, 70);
- QMultiLineEdit* mle4 = new QMultiLineEdit(0L,"theMultiLineEditWidget4");
+ TQMultiLineEdit* mle4 = new TQMultiLineEdit(0L,"theMultiLineEditWidget4");
addToolWindow( mle4, KDockWidget::DockCenter, mle, 70);
KMdiToolViewAccessor *tva=createToolWindow();
- tva->setWidgetToWrap(new QMultiLineEdit(tva->wrapperWidget(),"theMultiLineEditWidget5"));
+ tva->setWidgetToWrap(new TQMultiLineEdit(tva->wrapperWidget(),"theMultiLineEditWidget5"));
tva->placeAndShow(KDockWidget::DockCenter,mle,70);
- QListView* lv = new QListView(0L,"theListViewWidget");
+ TQListView* lv = new TQListView(0L,"theListViewWidget");
#include "../res/filenew.xpm"
lv->setIcon(filenew);
lv->addColumn("Test", 50);
lv->addColumn("KMDI", 70);
- new QListViewItem(lv,QString("test"),QString("test"));
+ new TQListViewItem(lv,TQString("test"),TQString("test"));
addToolWindow( lv, KDockWidget::DockLeft, m_pMdi, 35, "1");
- QListView* lv2 = new QListView(0L,"theListViewWidget2");
+ TQListView* lv2 = new TQListView(0L,"theListViewWidget2");
lv2->setIcon(filenew);
lv2->addColumn("Test2", 50);
lv2->addColumn("KMDI2", 70);
- new QListViewItem(lv,QString("test2"),QString("test2"));
+ new TQListViewItem(lv,TQString("test2"),TQString("test2"));
addToolWindow( lv2, KDockWidget::DockCenter, lv, 35, "2");
- QListView* lv3 = new QListView(0L,"theListViewWidget3");
+ TQListView* lv3 = new TQListView(0L,"theListViewWidget3");
lv3->setIcon(filenew);
lv3->addColumn("Test3", 50);
lv3->addColumn("KMDI3", 70);
- new QListViewItem(lv,QString("test3"),QString("test3"));
+ new TQListViewItem(lv,TQString("test3"),TQString("test3"));
addToolWindow( lv3, KDockWidget::DockCenter, lv, 35, "3");
dockManager->finishReadDockConfig();
@@ -86,9 +86,9 @@ MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
MainWidget::~MainWidget()
{
writeDockConfig(m_dockConfig);
- QDomDocument doc = m_dockConfig.ownerDocument();
- QString s = doc.toString();
- QFile f("/tmp/dc.txt");
+ TQDomDocument doc = m_dockConfig.ownerDocument();
+ TQString s = doc.toString();
+ TQFile f("/tmp/dc.txt");
f.open(IO_ReadWrite);
f.writeBlock(s.latin1(), s.length());
f.close();
@@ -101,7 +101,7 @@ void MainWidget::initMenu()
}
/** additionally fit the system menu button position to the menu position */
-void MainWidget::resizeEvent( QResizeEvent *pRSE)
+void MainWidget::resizeEvent( TQResizeEvent *pRSE)
{
KMdiMainFrm::resizeEvent( pRSE);
setSysButtonsAtMenuPosition();
@@ -110,11 +110,11 @@ void MainWidget::resizeEvent( QResizeEvent *pRSE)
RestartWidget::RestartWidget():KMainWindow()
{
mdimode=KMdi::ChildframeMode;
- QVBoxLayout* bl = new QVBoxLayout(this);
- QLabel* l = new QLabel("This is for the testing of\nKMdiMainFrm::read/writeDockConfig().\n", this);
- QCheckBox* b1 = new QCheckBox("KMdiMainFrm close/restart", this);
+ TQVBoxLayout* bl = new TQVBoxLayout(this);
+ TQLabel* l = new TQLabel("This is for the testing of\nKMdiMainFrm::read/writeDockConfig().\n", this);
+ TQCheckBox* b1 = new TQCheckBox("KMdiMainFrm close/restart", this);
b1->toggle();
- QObject::connect(b1, SIGNAL(stateChanged(int)), this, SLOT(onStateChanged(int)));
+ TQObject::connect(b1, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(onStateChanged(int)));
bl->add(l);
bl->add(b1);
bl->setMargin(10);
diff --git a/kmdi/test/mainwidget.h b/kmdi/test/mainwidget.h
index d8f61c1cb..022a3b361 100644
--- a/kmdi/test/mainwidget.h
+++ b/kmdi/test/mainwidget.h
@@ -18,10 +18,10 @@
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdom.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdom.h>
#include <kmdimainfrm.h>
/**
@@ -31,14 +31,14 @@ class MainWidget : public KMdiMainFrm
{
Q_OBJECT
public:
- MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode);
+ MainWidget(TQDomElement& dockConfig,KMdi::MdiMode mode);
virtual ~MainWidget();
void initMenu();
protected: // Protected methods
- virtual void resizeEvent( QResizeEvent *pRSE);
+ virtual void resizeEvent( TQResizeEvent *pRSE);
private:
- QDomElement m_dockConfig;
+ TQDomElement m_dockConfig;
};
@@ -61,8 +61,8 @@ private slots:
// attributes
public:
- QDomDocument domDoc;
- QDomElement dockConfig;
+ TQDomDocument domDoc;
+ TQDomElement dockConfig;
KMdi::MdiMode mdimode;
private:
MainWidget *m_w;
diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp
index 51028dfab..4e1d298c8 100644
--- a/knewstuff/downloaddialog.cpp
+++ b/knewstuff/downloaddialog.cpp
@@ -36,39 +36,39 @@
#include <knewstuff/knewstuffgeneric.h>
#include <knewstuff/engine.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qtextbrowser.h>
-#include <qtabwidget.h>
-#include <qtimer.h> // hack
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqtextbrowser.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h> // hack
using namespace KNS;
struct DownloadDialog::Private
{
- QString m_providerlist;
- QWidget *m_page;
+ TQString m_providerlist;
+ TQWidget *m_page;
KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
- QPtrList<Entry> m_installlist;
- QMap<KIO::Job*, Provider*> m_variantjobs;
- QMap<KIO::Job*, QStringList> m_variants;
- QMap<Provider*, Provider*> m_newproviders;
+ TQPtrList<Entry> m_installlist;
+ TQMap<KIO::Job*, Provider*> m_variantjobs;
+ TQMap<KIO::Job*, TQStringList> m_variants;
+ TQMap<Provider*, Provider*> m_newproviders;
};
class NumSortListViewItem : public KListViewItem
{
public:
- NumSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
- QString key(int col, bool asc) const {
+ TQString key(int col, bool asc) const {
if (col == 2)
{
- QString s;
+ TQString s;
s.sprintf("%08d", text(col).toInt());
return s;
}
@@ -79,16 +79,16 @@ class NumSortListViewItem : public KListViewItem
class DateSortListViewItem : public KListViewItem
{
public:
- DateSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
- QString key(int col, bool asc) const {
+ TQString key(int col, bool asc) const {
if (col == 2)
{
- QString s;
- QDate date = KGlobal::locale()->readDate(text(col));
+ TQString s;
+ TQDate date = KGlobal::locale()->readDate(text(col));
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
@@ -97,21 +97,21 @@ class DateSortListViewItem : public KListViewItem
};
// BEGIN deprecated for KDE 4
-DownloadDialog::DownloadDialog(Engine *engine, QWidget *)
+DownloadDialog::DownloadDialog(Engine *engine, TQWidget *)
: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
KDialogBase::Close, KDialogBase::Close)
{
init(engine);
}
-DownloadDialog::DownloadDialog(QWidget *)
+DownloadDialog::DownloadDialog(TQWidget *)
: KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"),
KDialogBase::Close, KDialogBase::Close)
{
init(0);
}
-void DownloadDialog::open(QString type)
+void DownloadDialog::open(TQString type)
{
DownloadDialog d;
d.setType(type);
@@ -120,14 +120,14 @@ void DownloadDialog::open(QString type)
}
// END deprecated for KDE 4
-DownloadDialog::DownloadDialog(Engine *engine, QWidget *, const QString& caption)
+DownloadDialog::DownloadDialog(Engine *engine, TQWidget *, const TQString& caption)
: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
KDialogBase::Close, KDialogBase::Close)
{
init(engine);
}
-DownloadDialog::DownloadDialog(QWidget *, const QString& caption)
+DownloadDialog::DownloadDialog(TQWidget *, const TQString& caption)
: KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption),
KDialogBase::Close, KDialogBase::Close)
{
@@ -142,12 +142,12 @@ void DownloadDialog::init(Engine *engine)
m_engine = engine;
d->m_page = NULL;
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), SLOT(slotPage(QWidget*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_SLOT(slotPage(TQWidget*)));
if(!engine)
{
m_loader = new ProviderLoader(this);
- connect(m_loader, SIGNAL(providersLoaded(Provider::List*)), SLOT(slotProviders(Provider::List*)));
+ connect(m_loader, TQT_SIGNAL(providersLoaded(Provider::List*)), TQT_SLOT(slotProviders(Provider::List*)));
}
m_entries.setAutoDelete(true);
@@ -155,9 +155,9 @@ void DownloadDialog::init(Engine *engine)
DownloadDialog::~DownloadDialog()
{
- for (QMap<QWidget *, QValueList<QPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
delete it.data();
- for (QMap<QWidget *, QValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
delete it.data();
delete d;
}
@@ -167,18 +167,18 @@ void DownloadDialog::load()
m_loader->load(m_filter, d->m_providerlist);
}
-void DownloadDialog::load(QString providerList)
+void DownloadDialog::load(TQString providerList)
{
m_loader->load(m_filter, providerList);
}
void DownloadDialog::clear()
{
- QMap<QWidget*, QValueList<KListView*>* >::Iterator it;
- QMap<QWidget*, QValueList<KListView*>* >::Iterator end(m_map.end());
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end());
for(it = m_map.begin(); it != end; ++it)
{
- QValueList<KListView*> *v = it.data();
+ TQValueList<KListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@@ -197,7 +197,7 @@ void DownloadDialog::clear()
void DownloadDialog::slotProviders(Provider::List *list)
{
Provider *p;
- /*QFrame *frame;*/
+ /*TQFrame *frame;*/
for(p = list->first(); p; p = list->next())
{
@@ -214,18 +214,18 @@ void DownloadDialog::slotProviders(Provider::List *list)
void DownloadDialog::addProvider(Provider *p)
{
- QFrame *frame;
- QTabWidget *ctl;
- QWidget *w_d, *w_r, *w_l;
- QWidget *w2;
- QTextBrowser *rt;
- QString tmp;
+ TQFrame *frame;
+ TQTabWidget *ctl;
+ TQWidget *w_d, *w_r, *w_l;
+ TQWidget *w2;
+ TQTextBrowser *rt;
+ TQString tmp;
int ret;
- QPixmap pix;
+ TQPixmap pix;
if(m_map.count() == 0)
{
- frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap(""));
+ frame = addPage(i18n("Welcome"), i18n("Welcome"), TQPixmap(""));
delete frame;
}
@@ -238,7 +238,7 @@ void DownloadDialog::addProvider(Provider *p)
if(!p->icon().protocol().isEmpty())
{
ret = KIO::NetAccess::download(p->icon(), tmp, this);
- if(ret) pix = QPixmap(tmp);
+ if(ret) pix = TQPixmap(tmp);
}
else
{
@@ -250,20 +250,20 @@ void DownloadDialog::addProvider(Provider *p)
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;
- w2 = new QWidget(frame);
- w_d = new QWidget(frame);
- w_r = new QWidget(frame);
- w_l = new QWidget(frame);
+ w2 = new TQWidget(frame);
+ w_d = new TQWidget(frame);
+ w_r = new TQWidget(frame);
+ w_l = new TQWidget(frame);
- ctl = new QTabWidget(frame);
+ ctl = new TQTabWidget(frame);
ctl->addTab(w_r, i18n("Highest Rated"));
ctl->addTab(w_d, i18n("Most Downloads"));
ctl->addTab(w_l, i18n("Latest"));
m_curtab = 0;
- connect(ctl, SIGNAL(currentChanged(QWidget *)), SLOT(slotTab()));
+ connect(ctl, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(slotTab()));
- QHBoxLayout *box = new QHBoxLayout(frame);
+ TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
d->m_lvtmp_r = new KListView(w_r);
@@ -284,42 +284,42 @@ void DownloadDialog::addProvider(Provider *p)
d->m_lvtmp_l->addColumn(i18n("Release Date"));
d->m_lvtmp_l->setSorting(2, false);
- connect(d->m_lvtmp_r, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
- connect(d->m_lvtmp_d, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
- connect(d->m_lvtmp_l, SIGNAL(clicked(QListViewItem*)), SLOT(slotSelected()));
+ connect(d->m_lvtmp_r, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
+ connect(d->m_lvtmp_d, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
+ connect(d->m_lvtmp_l, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(slotSelected()));
- rt = new QTextBrowser(frame);
+ rt = new TQTextBrowser(frame);
rt->setMinimumWidth(150);
- QPushButton *in = new QPushButton(i18n("Install"), frame);
- QPushButton *de = new QPushButton(i18n("Details"), frame);
+ TQPushButton *in = new TQPushButton(i18n("Install"), frame);
+ TQPushButton *de = new TQPushButton(i18n("Details"), frame);
in->setEnabled(false);
de->setEnabled(false);
box->addSpacing(spacingHint());
- QVBoxLayout *vbox = new QVBoxLayout(box);
+ TQVBoxLayout *vbox = new TQVBoxLayout(box);
vbox->add(rt);
vbox->addSpacing(spacingHint());
vbox->add(de);
vbox->add(in);
- connect(rt, SIGNAL(linkClicked(const QString&)), SLOT(slotEmail(const QString&)));
+ connect(rt, TQT_SIGNAL(linkClicked(const TQString&)), TQT_SLOT(slotEmail(const TQString&)));
- connect(in, SIGNAL(clicked()), SLOT(slotInstall()));
- connect(de, SIGNAL(clicked()), SLOT(slotDetails()));
+ connect(in, TQT_SIGNAL(clicked()), TQT_SLOT(slotInstall()));
+ connect(de, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails()));
- QVBoxLayout *box2 = new QVBoxLayout(w_r);
+ TQVBoxLayout *box2 = new TQVBoxLayout(w_r);
box2->add(d->m_lvtmp_r);
- QVBoxLayout *box3 = new QVBoxLayout(w_d);
+ TQVBoxLayout *box3 = new TQVBoxLayout(w_d);
box3->add(d->m_lvtmp_d);
- QVBoxLayout *box4 = new QVBoxLayout(w_l);
+ TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(d->m_lvtmp_l);
- QValueList<KListView*> *v = new QValueList<KListView*>;
+ TQValueList<KListView*> *v = new TQValueList<KListView*>;
*v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
- QValueList<QPushButton*> *vb = new QValueList<QPushButton*>;
+ TQValueList<TQPushButton*> *vb = new TQValueList<TQPushButton*>;
*vb << in << de;
m_buttons[frame] = vb;
m_providers[frame] = p;
@@ -328,13 +328,13 @@ void DownloadDialog::addProvider(Provider *p)
if(m_engine) slotPage(frame);
- QTimer::singleShot(100, this, SLOT(slotFinish()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotFinish()));
}
void DownloadDialog::slotResult(KIO::Job *job)
{
- QDomDocument dom;
- QDomElement knewstuff;
+ TQDomDocument dom;
+ TQDomElement knewstuff;
kdDebug() << "got data: " << m_data[job] << endl;
@@ -343,9 +343,9 @@ void DownloadDialog::slotResult(KIO::Job *job)
dom.setContent(m_data[job]);
knewstuff = dom.documentElement();
- for(QDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
+ for(TQDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling())
{
- QDomElement stuff = pn.toElement();
+ TQDomElement stuff = pn.toElement();
kdDebug() << "element: " << stuff.tagName() << endl;
@@ -388,18 +388,18 @@ void DownloadDialog::slotResult(KIO::Job *job)
int DownloadDialog::installStatus(Entry *entry)
{
- QDate date;
- QString datestring;
+ TQDate date;
+ TQString datestring;
int installed;
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
kapp->config()->setGroup("KNewStuffStatus");
datestring = kapp->config()->readEntry(entry->name(lang));
if(datestring.isNull()) installed = 0;
else
{
- date = QDate::fromString(datestring, Qt::ISODate);
+ date = TQDate::fromString(datestring, Qt::ISODate);
if(!date.isValid()) installed = 0;
else if(date < entry->releaseDate()) installed = -1;
else installed = 1;
@@ -408,29 +408,29 @@ int DownloadDialog::installStatus(Entry *entry)
return installed;
}
-void DownloadDialog::addEntry(Entry *entry, const QStringList& variants)
+void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
{
- QPixmap pix;
+ TQPixmap pix;
int installed;
installed = installStatus(entry);
if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small);
- else pix = QPixmap();
+ else pix = TQPixmap();
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
if(variants.contains("score"))
{
KListViewItem *tmp_r = new NumSortListViewItem(lv_r,
- entry->name(lang), entry->version(), QString("%1").arg(entry->rating()));
+ entry->name(lang), entry->version(), TQString("%1").arg(entry->rating()));
tmp_r->setPixmap(0, pix);
}
if(variants.contains("downloads"))
{
KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
- entry->name(lang), entry->version(), QString("%1").arg(entry->downloads()));
+ entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads()));
tmp_d->setPixmap(0, pix);
}
if(variants.contains("latest"))
@@ -447,7 +447,7 @@ void DownloadDialog::addEntry(Entry *entry, const QStringList& variants)
void DownloadDialog::addEntry(Entry *entry)
{
- QStringList variants;
+ TQStringList variants;
variants << "score";
variants << "downloads";
@@ -459,10 +459,10 @@ void DownloadDialog::addEntry(Entry *entry)
kdDebug() << "added entry " << entry->name() << endl;
}
-void DownloadDialog::slotData(KIO::Job *job, const QByteArray &a)
+void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a)
{
- QCString tmp(a, a.size() + 1);
- m_data[job].append(QString::fromUtf8(tmp));
+ TQCString tmp(a, a.size() + 1);
+ m_data[job].append(TQString::fromUtf8(tmp));
}
void DownloadDialog::slotDetails()
@@ -470,9 +470,9 @@ void DownloadDialog::slotDetails()
Entry *e = getEntry();
if(!e) return;
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
- QString info = i18n
+ TQString info = i18n
(
"Name: %1\n"
"Author: %2\n"
@@ -505,7 +505,7 @@ void DownloadDialog::slotDetails()
KMessageBox::information(this, info, i18n("Details"));
}
-QListViewItem *DownloadDialog::currentEntryItem()
+TQListViewItem *DownloadDialog::currentEntryItem()
{
if((m_curtab == 0) && (lv_r->selectedItem())) return lv_r->selectedItem();
if((m_curtab == 1) && (lv_d->selectedItem())) return lv_d->selectedItem();
@@ -540,7 +540,7 @@ void DownloadDialog::slotInstall()
KURL dest = KURL(m_s->downloadDestination(e));
KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotInstalled(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*)));
}
}
@@ -550,15 +550,15 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate));
kapp->config()->sync();
- QPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
if(m_entryitem)
{
m_entryitem->setPixmap(0, pix);
- QListViewItem *item;
+ TQListViewItem *item;
item = lv_r->findItem(e->name(lang), 0);
if(item) item->setPixmap(0, pix);
item = lv_d->findItem(e->name(lang), 0);
@@ -569,7 +569,7 @@ void DownloadDialog::install(Entry *e)
if(currentEntryItem() == m_entryitem)
{
- QPushButton *in;
+ TQPushButton *in;
in = *(m_buttons[d->m_page]->at(0));
if(in) in->setEnabled(false);
}
@@ -609,7 +609,7 @@ void DownloadDialog::slotInstalled(KIO::Job *job)
void DownloadDialog::slotTab()
{
- int tab = static_cast<const QTabWidget *>(sender())->currentPageIndex();
+ int tab = static_cast<const TQTabWidget *>(sender())->currentPageIndex();
kdDebug() << "switch tab to: " << tab << endl;
Entry *eold = getEntry();
@@ -624,7 +624,7 @@ void DownloadDialog::slotTab()
}
else
{
- QPushButton *de, *in;
+ TQPushButton *de, *in;
in = *(m_buttons[d->m_page]->at(0));
de = *(m_buttons[d->m_page]->at(1));
@@ -637,17 +637,17 @@ void DownloadDialog::slotTab()
void DownloadDialog::slotSelected()
{
- QString tmp;
+ TQString tmp;
bool enabled;
Entry *e = getEntry();
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
bool ret;
if(e)
{
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
- QListViewItem *item;
+ TQListViewItem *item;
if(m_curtab != 0)
{
lv_r->clearSelection();
@@ -676,27 +676,27 @@ void DownloadDialog::slotSelected()
ret = KIO::NetAccess::download(e->preview(lang), tmp, this);
}
- QString desc = QString("<b>%1</b><br>").arg(e->name(lang));
+ TQString desc = TQString("<b>%1</b><br>").arg(e->name(lang));
if(!e->authorEmail().isNull())
{
- desc += QString("<a href='mailto:" + e->authorEmail() + "'>" + e->author() + "</a>");
+ desc += TQString("<a href='mailto:" + e->authorEmail() + "'>" + e->author() + "</a>");
}
else
{
- desc += QString("%1").arg(e->author());
+ desc += TQString("%1").arg(e->author());
}
- desc += QString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
- desc += QString("<br><br>");
+ desc += TQString("<br>%1").arg(KGlobal::locale()->formatDate(e->releaseDate()));
+ desc += TQString("<br><br>");
if(ret)
{
- desc += QString("<img src='%1'>").arg(tmp);
+ desc += TQString("<img src='%1'>").arg(tmp);
}
else
{
desc += i18n("Preview not available.");
}
- desc += QString("<br><i>%1</i>").arg(e->summary(lang));
- desc += QString("<br>(%1)").arg(e->license());
+ desc += TQString("<br><i>%1</i>").arg(e->summary(lang));
+ desc += TQString("<br>(%1)").arg(e->license());
m_rt->clear();
m_rt->setText(desc);
@@ -704,7 +704,7 @@ void DownloadDialog::slotSelected()
if(installStatus(e) == 1) enabled = false;
else enabled = true;
- QPushButton *de, *in;
+ TQPushButton *de, *in;
in = *(m_buttons[d->m_page]->at(0));
de = *(m_buttons[d->m_page]->at(1));
if(in) in->setEnabled(enabled);
@@ -712,23 +712,23 @@ void DownloadDialog::slotSelected()
}
}
-void DownloadDialog::slotEmail(const QString& link)
+void DownloadDialog::slotEmail(const TQString& link)
{
kdDebug() << "EMAIL: " << link << endl;
kapp->invokeMailer(link);
- slotSelected(); // QTextBrowser oddity workaround as it cannot handle mailto: URLs
+ slotSelected(); // TQTextBrowser oddity workaround as it cannot handle mailto: URLs
}
Entry *DownloadDialog::getEntry()
{
- QListViewItem *entryItem = currentEntryItem();
+ TQListViewItem *entryItem = currentEntryItem();
if(!entryItem)
return 0;
- QString entryName = entryItem->text(0);
+ TQString entryName = entryItem->text(0);
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
for(Entry *e = m_entries.first(); e; e = m_entries.next())
if(e->name(lang) == entryName)
@@ -737,7 +737,7 @@ Entry *DownloadDialog::getEntry()
return 0;
}
-void DownloadDialog::slotPage(QWidget *w)
+void DownloadDialog::slotPage(TQWidget *w)
{
Provider *p;
@@ -770,7 +770,7 @@ void DownloadDialog::slotPage(QWidget *w)
void DownloadDialog::loadProvider(Provider *p)
{
- QMap<KIO::Job*, Provider*>::Iterator it;
+ TQMap<KIO::Job*, Provider*>::Iterator it;
for(it = d->m_variantjobs.begin(); it != d->m_variantjobs.end(); it++)
{
@@ -782,21 +782,21 @@ void DownloadDialog::loadProvider(Provider *p)
}
}
- QStringList variants;
+ TQStringList variants;
variants << "score";
variants << "downloads";
variants << "latest";
// Optimise URLs so each unique URL only gets fetched once
- QMap<QString, QStringList> urls;
+ TQMap<TQString, TQStringList> urls;
- for(QStringList::Iterator it = variants.begin(); it != variants.end(); it++)
+ for(TQStringList::Iterator it = variants.begin(); it != variants.end(); it++)
{
- QString url = p->downloadUrlVariant((*it)).url();
+ TQString url = p->downloadUrlVariant((*it)).url();
if(!urls.contains(url))
{
- urls[url] = QStringList();
+ urls[url] = TQStringList();
}
urls[url] << (*it);
@@ -805,10 +805,10 @@ void DownloadDialog::loadProvider(Provider *p)
// Now fetch the URLs while keeping the variant list for each attached
- for(QMap<QString, QStringList>::Iterator it = urls.begin(); it != urls.end(); it++)
+ for(TQMap<TQString, TQStringList>::Iterator it = urls.begin(); it != urls.end(); it++)
{
- QString url = it.key();
- QStringList urlvariants = it.data();
+ TQString url = it.key();
+ TQStringList urlvariants = it.data();
KIO::TransferJob *variantjob = KIO::get(url);
d->m_newproviders[p] = p;
@@ -816,9 +816,9 @@ void DownloadDialog::loadProvider(Provider *p)
d->m_variants[variantjob] = urlvariants;
m_data[variantjob] = "";
- connect(variantjob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(variantjob, SIGNAL(data(KIO::Job*, const QByteArray&)),
- SLOT(slotData(KIO::Job*, const QByteArray&)));
+ connect(variantjob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
+ connect(variantjob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
+ TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)));
}
if(variants.count() == 0) return;
@@ -835,17 +835,17 @@ void DownloadDialog::loadProvider(Provider *p)
//m_jobs[job] = p; // not used anymore due to variants
m_data[job] = "";
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
- SLOT(slotData(KIO::Job*, const QByteArray&)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
+ TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)));
}
-void DownloadDialog::setType(QString type)
+void DownloadDialog::setType(TQString type)
{
m_filter = type;
}
-void DownloadDialog::setProviderList(const QString& providerList)
+void DownloadDialog::setProviderList(const TQString& providerList)
{
d->m_providerlist = providerList;
}
@@ -858,7 +858,7 @@ void DownloadDialog::slotApply()
{
}
-void DownloadDialog::open(const QString& type, const QString& caption)
+void DownloadDialog::open(const TQString& type, const TQString& caption)
{
DownloadDialog d(0, caption);
d.setType(type);
@@ -872,7 +872,7 @@ void DownloadDialog::slotFinish()
//updateBackground();
}
-QPtrList<Entry> DownloadDialog::installedEntries()
+TQPtrList<Entry> DownloadDialog::installedEntries()
{
return d->m_installlist;
}
diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h
index dd9d6dae4..de5babe33 100644
--- a/knewstuff/downloaddialog.h
+++ b/knewstuff/downloaddialog.h
@@ -67,7 +67,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
@param caption the dialog caption
*/
- DownloadDialog(Engine *engine, QWidget *parent, const QString& caption);
+ DownloadDialog(Engine *engine, TQWidget *parent, const TQString& caption);
/**
Alternative constructor.
@@ -76,7 +76,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
@param caption the dialog caption
*/
- DownloadDialog(QWidget *parent, const QString& caption);
+ DownloadDialog(TQWidget *parent, const TQString& caption);
/**
Destructor.
@@ -88,8 +88,8 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param type a Hotstuff data type such as "korganizer/calendar"
*/
- void setType(QString type);
- // ### KDE 4.0: use const QString&
+ void setType(TQString type);
+ // ### KDE 4.0: use const TQString&
/**
Fetches descriptions of all available data, optionally considering
@@ -105,7 +105,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@since 3.4
*/
- void setProviderList(const QString& providerList);
+ void setProviderList(const TQString& providerList);
/**
Fetches descriptions of all available data, optionally considering
@@ -115,7 +115,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
we first try the ProvidersUrl from KGlobal::config, then we
fall back to a hardcoded value.
*/
- void load(QString providerList); // KDE4: merge with load() above
+ void load(TQString providerList); // KDE4: merge with load() above
/**
Adds another provider to the download dialog.
@@ -141,7 +141,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param entry a Hotstuff data entry to be added
@param variants all variants this entry is intended for
*/
- void addEntry(Entry *entry, const QStringList& variants);
+ void addEntry(Entry *entry, const TQStringList& variants);
/**
Clears the entry list of the current provider.
@@ -156,7 +156,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
dialog should create an engine on its own
@param parent the parent window
*/
- DownloadDialog(Engine *engine, QWidget *parent = 0);
+ DownloadDialog(Engine *engine, TQWidget *parent = 0);
// ### KDE 4.0: remove and make caption/parent argument optional
/**
@@ -165,7 +165,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param parent the parent window
*/
- DownloadDialog(QWidget *parent = 0);
+ DownloadDialog(TQWidget *parent = 0);
// ### KDE 4.0: remove and make caption/parent argument optional
/**
@@ -177,7 +177,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@param type a data type such as "korganizer/calendar"
@param caption the dialog caption
*/
- static void open(const QString& type, const QString& caption);
+ static void open(const TQString& type, const TQString& caption);
/**
Opens the download dialog.
@@ -186,16 +186,16 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
@see load()
@param type a data type such as "korganizer/calendar"
- @deprecated use open( const QString& type, const QString& caption );
+ @deprecated use open( const TQString& type, const TQString& caption );
*/
- static void open(QString type) KDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
+ static void open(TQString type) KDE_DEPRECATED; // ### KDE 4.0: remove and make caption/parent argument optional
/**
Returns the list of installed data entries.
@return list of data entries which have been installed
*/
- QPtrList<Entry> installedEntries();
+ TQPtrList<Entry> installedEntries();
// ### KDE 4.0: the open() method should return this
public slots:
@@ -212,15 +212,15 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
private slots:
void slotResult(KIO::Job *job);
- void slotData(KIO::Job *job, const QByteArray &a);
+ void slotData(KIO::Job *job, const TQByteArray &a);
void slotInstall();
void slotDetails();
void slotInstalled(KIO::Job *job);
void slotTab();
void slotSelected();
- void slotPage(QWidget *w);
+ void slotPage(TQWidget *w);
void slotFinish();
- void slotEmail(const QString& link);
+ void slotEmail(const TQString& link);
private:
void init(Engine *e);
@@ -228,25 +228,25 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
void loadProvider(Provider *p);
void install(Entry *e);
int installStatus(Entry *e);
- QListViewItem *currentEntryItem();
+ TQListViewItem *currentEntryItem();
ProviderLoader *m_loader;
- QString m_entryname;
+ TQString m_entryname;
KListView *lv_r, *lv_d, *lv_l;
- QTextBrowser *m_rt;
- QFrame *m_frame;
- QListViewItem *m_entryitem;
- QPtrList<Entry> m_entries;
+ TQTextBrowser *m_rt;
+ TQFrame *m_frame;
+ TQListViewItem *m_entryitem;
+ TQPtrList<Entry> m_entries;
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
- QMap<QWidget*, QValueList<KListView*>* > m_map;
- QMap<QWidget*, Provider*> m_providers;
- QMap<QWidget*, QTextBrowser*> m_rts;
- QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
- QMap<KIO::Job*, Provider*> m_jobs;
- QMap<KIO::Job*, QString> m_data;
- QString m_filter;
+ TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
+ TQMap<TQWidget*, Provider*> m_providers;
+ TQMap<TQWidget*, TQTextBrowser*> m_rts;
+ TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
+ TQMap<KIO::Job*, Provider*> m_jobs;
+ TQMap<KIO::Job*, TQString> m_data;
+ TQString m_filter;
Engine *m_engine;
Private *d;
};
diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp
index 4feda926c..799ce9898 100644
--- a/knewstuff/engine.cpp
+++ b/knewstuff/engine.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qdom.h>
-#include <qfileinfo.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,8 +45,8 @@ struct Engine::Private
KNewStuff *mNewStuff;
};
-Engine::Engine( KNewStuff *newStuff, const QString &type,
- QWidget *parentWidget ) :
+Engine::Engine( KNewStuff *newStuff, const TQString &type,
+ TQWidget *parentWidget ) :
mParentWidget( parentWidget ), mDownloadDialog( 0 ),
mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ),
d(new Private), mType( type )
@@ -56,8 +56,8 @@ Engine::Engine( KNewStuff *newStuff, const QString &type,
mProviderLoader = new ProviderLoader( mParentWidget );
}
-Engine::Engine( KNewStuff *newStuff, const QString &type,
- const QString &providerList, QWidget *parentWidget ) :
+Engine::Engine( KNewStuff *newStuff, const TQString &type,
+ const TQString &providerList, TQWidget *parentWidget ) :
mParentWidget( parentWidget ),
mDownloadDialog( 0 ), mUploadDialog( 0 ),
mProviderDialog( 0 ), mUploadProvider( 0 ),
@@ -83,8 +83,8 @@ void Engine::download()
kdDebug() << "Engine::download()" << endl;
connect( mProviderLoader,
- SIGNAL( providersLoaded( Provider::List * ) ),
- SLOT( getMetaInformation( Provider::List * ) ) );
+ TQT_SIGNAL( providersLoaded( Provider::List * ) ),
+ TQT_SLOT( getMetaInformation( Provider::List * ) ) );
mProviderLoader->load( mType, mProviderList );
}
@@ -105,25 +105,25 @@ void Engine::getMetaInformation( Provider::List *providers )
if ( p->downloadUrl().isEmpty() ) continue;
KIO::TransferJob *job = KIO::get( p->downloadUrl(), false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotNewStuffJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotNewStuffJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotNewStuffJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotNewStuffJobData( KIO::Job *, const TQByteArray & ) ) );
mNewStuffJobData.insert( job, "" );
mProviderJobs[ job ] = p;
}
}
-void Engine::slotNewStuffJobData( KIO::Job *job, const QByteArray &data )
+void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data )
{
if ( data.isEmpty() ) return;
kdDebug() << "Engine:slotNewStuffJobData()" << endl;
- QCString str( data, data.size() + 1 );
+ TQCString str( data, data.size() + 1 );
- mNewStuffJobData[ job ].append( QString::fromUtf8( str ) );
+ mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) );
}
void Engine::slotNewStuffJobResult( KIO::Job *job )
@@ -132,25 +132,25 @@ void Engine::slotNewStuffJobResult( KIO::Job *job )
kdDebug() << "Error downloading new stuff descriptions." << endl;
job->showErrorDialog( mParentWidget );
} else {
- QString knewstuffDoc = mNewStuffJobData[ job ];
+ TQString knewstuffDoc = mNewStuffJobData[ job ];
kdDebug() << "---START---" << endl << knewstuffDoc << "---END---" << endl;
mDownloadDialog->addProvider( mProviderJobs[ job ] );
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( knewstuffDoc ) ) {
kdDebug() << "Error parsing knewstuff.xml." << endl;
return;
} else {
- QDomElement knewstuff = doc.documentElement();
+ TQDomElement knewstuff = doc.documentElement();
if ( knewstuff.isNull() ) {
kdDebug() << "No document in knewstuffproviders.xml." << endl;
} else {
- QDomNode p;
+ TQDomNode p;
for ( p = knewstuff.firstChild(); !p.isNull(); p = p.nextSibling() ) {
- QDomElement stuff = p.toElement();
+ TQDomElement stuff = p.toElement();
if ( stuff.tagName() != "stuff" ) continue;
if ( stuff.attribute("type", mType) != mType ) continue;
@@ -200,8 +200,8 @@ void Engine::download( Entry *entry )
kdDebug() << " DESTINATION: " << destination.url() << endl;
KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDownloadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) );
}
void Engine::slotDownloadJobResult( KIO::Job *job )
@@ -224,14 +224,14 @@ void Engine::slotDownloadJobResult( KIO::Job *job )
}
}
-void Engine::upload(const QString &fileName, const QString &previewName )
+void Engine::upload(const TQString &fileName, const TQString &previewName )
{
mUploadFile = fileName;
mPreviewFile = previewName;
connect( mProviderLoader,
- SIGNAL( providersLoaded( Provider::List * ) ),
- SLOT( selectUploadProvider( Provider::List * ) ) );
+ TQT_SIGNAL( providersLoaded( Provider::List * ) ),
+ TQT_SLOT( selectUploadProvider( Provider::List * ) ) );
mProviderLoader->load( mType );
}
@@ -272,7 +272,7 @@ void Engine::upload( Entry *entry )
{
if ( mUploadFile.isNull()) {
mUploadFile = entry->fullName();
- mUploadFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadFile );
+ mUploadFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadFile );
if ( !d->mNewStuff->createUploadFile( mUploadFile ) ) {
KMessageBox::error( mParentWidget, i18n("Unable to create file to upload.") );
@@ -281,8 +281,8 @@ void Engine::upload( Entry *entry )
}
}
- QString lang = entry->langs().first();
- QFileInfo fi( mUploadFile );
+ TQString lang = entry->langs().first();
+ TQFileInfo fi( mUploadFile );
entry->setPayload( KURL::fromPathOrURL( fi.fileName() ), lang );
if ( !createMetaFile( entry ) ) {
@@ -290,7 +290,7 @@ void Engine::upload( Entry *entry )
return;
}
- QString text = i18n("The files to be uploaded have been created at:\n");
+ TQString text = i18n("The files to be uploaded have been created at:\n");
text.append( i18n("Data file: %1\n").arg( mUploadFile) );
if (!mPreviewFile.isEmpty()) {
text.append( i18n("Preview image: %1\n").arg( mPreviewFile) );
@@ -299,7 +299,7 @@ void Engine::upload( Entry *entry )
text.append( i18n("Those files can now be uploaded.\n") );
text.append( i18n("Beware that any people might have access to them at any time.") );
- QString caption = i18n("Upload Files");
+ TQString caption = i18n("Upload Files");
if ( mUploadProvider->noUpload() ) {
KURL noUploadUrl = mUploadProvider->noUploadUrl();
@@ -322,8 +322,8 @@ void Engine::upload( Entry *entry )
destination.setFileName( fi.fileName() );
KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) );
} else {
emit uploadFinished( false );
}
@@ -332,10 +332,10 @@ void Engine::upload( Entry *entry )
bool Engine::createMetaFile( Entry *entry )
{
- QDomDocument doc("knewstuff");
+ TQDomDocument doc("knewstuff");
doc.appendChild( doc.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement de = doc.createElement("knewstuff");
+ TQDomElement de = doc.createElement("knewstuff");
doc.appendChild( de );
entry->setType(type());
@@ -346,17 +346,17 @@ bool Engine::createMetaFile( Entry *entry )
if ( mUploadMetaFile.isNull() ) {
mUploadMetaFile = entry->fullName() + ".meta";
- mUploadMetaFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadMetaFile );
+ mUploadMetaFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadMetaFile );
}
- QFile f( mUploadMetaFile );
+ TQFile f( mUploadMetaFile );
if ( !f.open( IO_WriteOnly ) ) {
- mUploadMetaFile = QString::null;
+ mUploadMetaFile = TQString::null;
return false;
}
- QTextStream ts( &f );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &f );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc.toString();
f.close();
@@ -378,14 +378,14 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job )
return;
}
- QFileInfo fi( mPreviewFile );
+ TQFileInfo fi( mPreviewFile );
KURL previewDestination = mUploadProvider->uploadUrl();
previewDestination.setFileName( fi.fileName() );
KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination );
- connect( newJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
+ connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) );
}
void Engine::slotUploadPreviewJobResult( KIO::Job *job )
@@ -397,19 +397,19 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job )
return;
}
- QFileInfo fi( mUploadMetaFile );
+ TQFileInfo fi( mUploadMetaFile );
KURL metaDestination = mUploadProvider->uploadUrl();
metaDestination.setFileName( fi.fileName() );
KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination );
- connect( newJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
+ connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) );
}
void Engine::slotUploadMetaJobResult( KIO::Job *job )
{
- mUploadMetaFile = QString::null;
+ mUploadMetaFile = TQString::null;
if ( job->error() ) {
kdDebug() << "Error uploading new stuff metadata." << endl;
job->showErrorDialog( mParentWidget );
diff --git a/knewstuff/engine.h b/knewstuff/engine.h
index 0d4941095..d3834566f 100644
--- a/knewstuff/engine.h
+++ b/knewstuff/engine.h
@@ -20,9 +20,9 @@
#ifndef KNEWSTUFF_ENGINE_H
#define KNEWSTUFF_ENGINE_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "entry.h"
#include "provider.h"
@@ -60,7 +60,7 @@ class KDE_EXPORT Engine : public QObject
@param type the Hotstuff data type such as "korganizer/calendar"
@param parentWidget the parent window
*/
- Engine( KNewStuff *newStuff, const QString &type, QWidget *parentWidget = 0 );
+ Engine( KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 );
/**
Constructor.
@@ -69,7 +69,7 @@ class KDE_EXPORT Engine : public QObject
@param providerList the URL of the provider list
@param parentWidget the parent window
*/
- Engine( KNewStuff *newStuff, const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+ Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
/**
Destructor.
@@ -81,14 +81,14 @@ class KDE_EXPORT Engine : public QObject
@return the Hotstuff data type
*/
- QString type() const { return mType; }
+ TQString type() const { return mType; }
/**
Returns the previously set parent widget.
@return parent widget
*/
- QWidget *parentWidget() const { return mParentWidget; }
+ TQWidget *parentWidget() const { return mParentWidget; }
/**
Initiates the download process, retrieving provider lists and invoking
@@ -103,7 +103,7 @@ class KDE_EXPORT Engine : public QObject
@param fileName name of the payload data file
@param previewName name of the preview image file
*/
- void upload( const QString &fileName = QString::null, const QString &previewName = QString::null );
+ void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null );
/**
Downloads the specified data file.
@@ -143,7 +143,7 @@ class KDE_EXPORT Engine : public QObject
void getMetaInformation( Provider::List *providers );
void selectUploadProvider( Provider::List *providers );
- void slotNewStuffJobData( KIO::Job *job, const QByteArray &data );
+ void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data );
void slotNewStuffJobResult( KIO::Job *job );
void slotDownloadJobResult( KIO::Job *job );
@@ -156,31 +156,31 @@ class KDE_EXPORT Engine : public QObject
bool createMetaFile( Entry * );
private:
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
ProviderLoader *mProviderLoader;
- QMap<KIO::Job *,QString> mNewStuffJobData;
- QMap<KIO::Job *,Provider *> mProviderJobs;
+ TQMap<KIO::Job *,TQString> mNewStuffJobData;
+ TQMap<KIO::Job *,Provider *> mProviderJobs;
- QPtrList<Entry> mNewStuffList;
+ TQPtrList<Entry> mNewStuffList;
DownloadDialog *mDownloadDialog;
UploadDialog *mUploadDialog;
ProviderDialog *mProviderDialog;
- QString mDownloadDestination;
+ TQString mDownloadDestination;
Provider *mUploadProvider;
- QString mUploadMetaFile;
- QString mUploadFile;
- QString mPreviewFile;
- QString mProviderList;
+ TQString mUploadMetaFile;
+ TQString mUploadFile;
+ TQString mPreviewFile;
+ TQString mProviderList;
Private* d;
- QString mType;
+ TQString mType;
};
}
diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp
index 1a7f580db..cdbf4dbe7 100644
--- a/knewstuff/entry.cpp
+++ b/knewstuff/entry.cpp
@@ -20,8 +20,8 @@
#include "entry.h"
-#include <qptrdict.h>
-#include <qwindowdefs.h>
+#include <tqptrdict.h>
+#include <tqwindowdefs.h>
#include <kglobal.h>
#include <klocale.h>
@@ -34,17 +34,17 @@ class EntryPrivate
{
public:
EntryPrivate(){}
- QString mEmail;
- QMap<QString,QString> mNameMap;
+ TQString mEmail;
+ TQMap<TQString,TQString> mNameMap;
};
-static QPtrDict<EntryPrivate> *d_ptr = 0;
+static TQPtrDict<EntryPrivate> *d_ptr = 0;
static EntryPrivate *d(const Entry *e)
{
if(!d_ptr)
{
- d_ptr = new QPtrDict<EntryPrivate>();
+ d_ptr = new TQPtrDict<EntryPrivate>();
d_ptr->setAutoDelete(true);
}
EntryPrivate *ret = d_ptr->find((void*)e);
@@ -56,31 +56,31 @@ static EntryPrivate *d(const Entry *e)
return ret;
}
-QString Entry::authorEmail() const
+TQString Entry::authorEmail() const
{
return d(this)->mEmail;
}
-void Entry::setAuthorEmail( const QString& email )
+void Entry::setAuthorEmail( const TQString& email )
{
d(this)->mEmail = email;
}
-QString Entry::name( const QString &lang ) const
+TQString Entry::name( const TQString &lang ) const
{
- if ( d(this)->mNameMap.isEmpty() ) return QString::null;
+ if ( d(this)->mNameMap.isEmpty() ) return TQString::null;
if ( !d(this)->mNameMap[ lang ].isEmpty() ) return d(this)->mNameMap[ lang ];
else {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !d(this)->mNameMap[ *it ].isEmpty() ) return d(this)->mNameMap[ *it ];
}
- if ( !d(this)->mNameMap[ QString::null ].isEmpty() ) return d(this)->mNameMap[ QString::null ];
+ if ( !d(this)->mNameMap[ TQString::null ].isEmpty() ) return d(this)->mNameMap[ TQString::null ];
else return *(mSummaryMap.begin());
}
-void Entry::setName( const QString &name, const QString &lang )
+void Entry::setName( const TQString &name, const TQString &lang )
{
d(this)->mNameMap.insert( lang, name );
@@ -90,12 +90,12 @@ void Entry::setName( const QString &name, const QString &lang )
// BCI part ends here
Entry::Entry() :
- mRelease( 0 ), mReleaseDate( QDate::currentDate() ), mRating( 0 ),
+ mRelease( 0 ), mReleaseDate( TQDate::currentDate() ), mRating( 0 ),
mDownloads( 0 )
{
}
-Entry::Entry( const QDomElement &e ) :
+Entry::Entry( const TQDomElement &e ) :
mRelease( 0 ), mRating( 0 ), mDownloads( 0 )
{
parseDomElement( e );
@@ -118,78 +118,78 @@ Entry::~Entry()
}
-void Entry::setName( const QString &name )
+void Entry::setName( const TQString &name )
{
mName = name;
}
-QString Entry::name() const
+TQString Entry::name() const
{
return mName;
}
-void Entry::setType( const QString &type )
+void Entry::setType( const TQString &type )
{
mType = type;
}
-QString Entry::type() const
+TQString Entry::type() const
{
return mType;
}
-void Entry::setAuthor( const QString &author )
+void Entry::setAuthor( const TQString &author )
{
mAuthor = author;
}
-QString Entry::author() const
+TQString Entry::author() const
{
return mAuthor;
}
-void Entry::setLicence( const QString &license )
+void Entry::setLicence( const TQString &license )
{
mLicence = license;
}
-QString Entry::license() const
+TQString Entry::license() const
{
return mLicence;
}
-void Entry::setSummary( const QString &text, const QString &lang )
+void Entry::setSummary( const TQString &text, const TQString &lang )
{
mSummaryMap.insert( lang, text );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-QString Entry::summary( const QString &lang ) const
+TQString Entry::summary( const TQString &lang ) const
{
- if ( mSummaryMap.isEmpty() ) return QString::null;
+ if ( mSummaryMap.isEmpty() ) return TQString::null;
if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ];
else {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ];
}
- if ( !mSummaryMap[ QString::null ].isEmpty() ) return mSummaryMap[ QString::null ];
+ if ( !mSummaryMap[ TQString::null ].isEmpty() ) return mSummaryMap[ TQString::null ];
else return *(mSummaryMap.begin());
}
-void Entry::setVersion( const QString &version )
+void Entry::setVersion( const TQString &version )
{
mVersion = version;
}
-QString Entry::version() const
+TQString Entry::version() const
{
return mVersion;
}
@@ -206,33 +206,33 @@ int Entry::release() const
}
-void Entry::setReleaseDate( const QDate &d )
+void Entry::setReleaseDate( const TQDate &d )
{
mReleaseDate = d;
}
-QDate Entry::releaseDate() const
+TQDate Entry::releaseDate() const
{
return mReleaseDate;
}
-void Entry::setPayload( const KURL &url, const QString &lang )
+void Entry::setPayload( const KURL &url, const TQString &lang )
{
mPayloadMap.insert( lang, url );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-KURL Entry::payload( const QString &lang ) const
+KURL Entry::payload( const TQString &lang ) const
{
KURL payload = mPayloadMap[ lang ];
if ( payload.isEmpty() ) {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ];
}
- if ( payload.isEmpty() ) payload = mPayloadMap [ QString::null ];
+ if ( payload.isEmpty() ) payload = mPayloadMap [ TQString::null ];
if ( payload.isEmpty() && !mPayloadMap.isEmpty() ) {
payload = *(mPayloadMap.begin());
}
@@ -240,22 +240,22 @@ KURL Entry::payload( const QString &lang ) const
}
-void Entry::setPreview( const KURL &url, const QString &lang )
+void Entry::setPreview( const KURL &url, const TQString &lang )
{
mPreviewMap.insert( lang, url );
if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang );
}
-KURL Entry::preview( const QString &lang ) const
+KURL Entry::preview( const TQString &lang ) const
{
KURL preview = mPreviewMap[ lang ];
if ( preview.isEmpty() ) {
- QStringList langs = KGlobal::locale()->languageList();
- for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
+ TQStringList langs = KGlobal::locale()->languageList();
+ for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it)
if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ];
}
- if ( preview.isEmpty() ) preview = mPreviewMap [ QString::null ];
+ if ( preview.isEmpty() ) preview = mPreviewMap [ TQString::null ];
if ( preview.isEmpty() && !mPreviewMap.isEmpty() ) {
preview = *(mPreviewMap.begin());
}
@@ -284,56 +284,56 @@ int Entry::downloads()
return mDownloads;
}
-QString Entry::fullName()
+TQString Entry::fullName()
{
if ( version().isEmpty() )
return name();
else
- return name() + "-" + version() + "-" + QString::number( release() );
+ return name() + "-" + version() + "-" + TQString::number( release() );
}
-QStringList Entry::langs()
+TQStringList Entry::langs()
{
return mLangs;
}
-void Entry::parseDomElement( const QDomElement &element )
+void Entry::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "stuff" ) return;
mType = element.attribute("type");
- QDomNode n;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "name" )
{
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setName( e.text().stripWhiteSpace(), lang );
if(lang.isNull()) setName( e.text().stripWhiteSpace() ); /* primary key - no i18n */
}
if ( e.tagName() == "author" ) {
setAuthor( e.text().stripWhiteSpace() );
- QString email = e.attribute( "email" );
+ TQString email = e.attribute( "email" );
setAuthorEmail( email );
}
if ( e.tagName() == "email" ) setAuthorEmail( e.text().stripWhiteSpace() ); /* kde-look; change on server! */
if ( e.tagName() == "licence" ) setLicence( e.text().stripWhiteSpace() );
if ( e.tagName() == "summary" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setSummary( e.text().stripWhiteSpace(), lang );
}
if ( e.tagName() == "version" ) setVersion( e.text().stripWhiteSpace() );
if ( e.tagName() == "release" ) setRelease( e.text().toInt() );
if ( e.tagName() == "releasedate" ) {
- QDate date = QDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate );
+ TQDate date = TQDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate );
setReleaseDate( date );
}
if ( e.tagName() == "preview" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setPreview( KURL( e.text().stripWhiteSpace() ), lang );
}
if ( e.tagName() == "payload" ) {
- QString lang = e.attribute( "lang" );
+ TQString lang = e.attribute( "lang" );
setPayload( KURL( e.text().stripWhiteSpace() ), lang );
}
if ( e.tagName() == "rating" ) setRating( e.text().toInt() );
@@ -341,10 +341,10 @@ void Entry::parseDomElement( const QDomElement &element )
}
}
-QDomElement Entry::createDomElement( QDomDocument &doc,
- QDomElement &parent )
+TQDomElement Entry::createDomElement( TQDomDocument &doc,
+ TQDomElement &parent )
{
- QDomElement entry = doc.createElement( "stuff" );
+ TQDomElement entry = doc.createElement( "stuff" );
entry.setAttribute("type", mType);
parent.appendChild( entry );
@@ -353,17 +353,17 @@ QDomElement Entry::createDomElement( QDomDocument &doc,
addElement( doc, entry, "email", authorEmail() );
addElement( doc, entry, "licence", license() );
addElement( doc, entry, "version", version() );
- addElement( doc, entry, "release", QString::number( release() ) );
- addElement( doc, entry, "rating", QString::number( rating() ) );
- addElement( doc, entry, "downloads", QString::number( downloads() ) );
+ addElement( doc, entry, "release", TQString::number( release() ) );
+ addElement( doc, entry, "rating", TQString::number( rating() ) );
+ addElement( doc, entry, "downloads", TQString::number( downloads() ) );
addElement( doc, entry, "releasedate",
releaseDate().toString( Qt::ISODate ) );
- QStringList ls = langs();
- QStringList::ConstIterator it;
+ TQStringList ls = langs();
+ TQStringList::ConstIterator it;
for( it = ls.begin(); it != ls.end(); ++it ) {
- QDomElement e = addElement( doc, entry, "summary", summary( *it ) );
+ TQDomElement e = addElement( doc, entry, "summary", summary( *it ) );
e.setAttribute( "lang", *it );
e = addElement( doc, entry, "preview", preview( *it ).url() );
e.setAttribute( "lang", *it );
@@ -374,10 +374,10 @@ QDomElement Entry::createDomElement( QDomDocument &doc,
return entry;
}
-QDomElement Entry::addElement( QDomDocument &doc, QDomElement &parent,
- const QString &tag, const QString &value )
+TQDomElement Entry::addElement( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &tag, const TQString &value )
{
- QDomElement n = doc.createElement( tag );
+ TQDomElement n = doc.createElement( tag );
n.appendChild( doc.createTextNode( value ) );
parent.appendChild( n );
diff --git a/knewstuff/entry.h b/knewstuff/entry.h
index 0b6ba3fdd..6e8a15bc7 100644
--- a/knewstuff/entry.h
+++ b/knewstuff/entry.h
@@ -20,11 +20,11 @@
#ifndef KNEWSTUFF_ENTRY_H
#define KNEWSTUFF_ENTRY_H
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -48,7 +48,7 @@ class KDE_EXPORT Entry
/**
* Constructor.
*/
- Entry( const QDomElement & );
+ Entry( const TQDomElement & );
/**
* Destructor.
@@ -58,99 +58,99 @@ class KDE_EXPORT Entry
/**
* Sets the (unique) name for this data object.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
* Sets the (internationalised) name for this data object.
*/
- void setName( const QString &, const QString & );
+ void setName( const TQString &, const TQString & );
/**
* Retrieve the name of the data object.
*
* @return object name
*/
- QString name() const;
+ TQString name() const;
/**
* Retrieve the internationalised name of the data object.
*
* @return object name (potentially translated)
*/
- QString name( const QString &lang ) const;
+ TQString name( const TQString &lang ) const;
/**
* Sets the application type, e.g. 'kdesktop/wallpaper'.
*/
- void setType( const QString & );
+ void setType( const TQString & );
/**
* Retrieve the type of the data object.
*
* @return object type
*/
- QString type() const;
+ TQString type() const;
/**
* Sets the full name of the object's author.
*/
- void setAuthor( const QString & );
+ void setAuthor( const TQString & );
/**
* Retrieve the author's name of the object.
*
* @return object author
*/
- QString author() const;
+ TQString author() const;
/**
* Sets the email address of the object's author.
*/
- void setAuthorEmail( const QString & );
+ void setAuthorEmail( const TQString & );
/**
* Retrieve the author's email address of the object.
*
* @return object author email address
*/
- QString authorEmail() const;
+ TQString authorEmail() const;
/**
* Sets the license (abbreviation) applicable to the object.
*/
- void setLicence( const QString & );
+ void setLicence( const TQString & );
/**
* Retrieve the license name of the object.
*
* @return object license
*/
- QString license() const;
+ TQString license() const;
/**
* Sets a short description on what the object is all about.
*/
- void setSummary( const QString &, const QString &lang = QString::null );
+ void setSummary( const TQString &, const TQString &lang = TQString::null );
/**
* Retrieve a short description about the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object description
*/
- QString summary( const QString &lang = QString::null ) const;
+ TQString summary( const TQString &lang = TQString::null ) const;
/**
* Sets the version number.
*/
- void setVersion( const QString & );
+ void setVersion( const TQString & );
/**
* Retrieve the version string of the object.
*
* @return object version
*/
- QString version() const;
+ TQString version() const;
/**
* Sets the release number, which is increased for feature-equal objects
@@ -168,41 +168,41 @@ class KDE_EXPORT Entry
/**
* Sets the release date.
*/
- void setReleaseDate( const QDate & );
+ void setReleaseDate( const TQDate & );
/**
* Retrieve the date of the object's publication.
*
* @return object release date
*/
- QDate releaseDate() const;
+ TQDate releaseDate() const;
/**
* Sets the object's file.
*/
- void setPayload( const KURL &, const QString &lang = QString::null );
+ void setPayload( const KURL &, const TQString &lang = TQString::null );
/**
* Retrieve the file name of the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object filename
*/
- KURL payload( const QString &lang = QString::null ) const;
+ KURL payload( const TQString &lang = TQString::null ) const;
/**
* Sets the object's preview file, if available. This should be a
* picture file.
*/
- void setPreview( const KURL &, const QString &lang = QString::null );
+ void setPreview( const KURL &, const TQString &lang = TQString::null );
/**
* Retrieve the file name of an image containing a preview of the object.
*
- * @param lang preferred language, or QString::null for KDE default
+ * @param lang preferred language, or TQString::null for KDE default
* @return object preview filename
*/
- KURL preview( const QString &lang = QString::null ) const;
+ KURL preview( const TQString &lang = TQString::null ) const;
/**
* Sets the rating between 0 (worst) and 10 (best).
@@ -238,42 +238,42 @@ class KDE_EXPORT Entry
* Return the full name for the meta information. It is constructed as
* name-version-release.
*/
- QString fullName();
+ TQString fullName();
/**
* Return the list of languages this object supports.
*/
- QStringList langs();
+ TQStringList langs();
/**
* @internal
*/
- void parseDomElement( const QDomElement & );
+ void parseDomElement( const TQDomElement & );
/**
* @internal
*/
- QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+ TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent );
protected:
- QDomElement addElement( QDomDocument &doc, QDomElement &parent,
- const QString &tag, const QString &value );
+ TQDomElement addElement( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &tag, const TQString &value );
private:
- QString mName;
- QString mType;
- QString mAuthor;
- QString mLicence;
- QMap<QString,QString> mSummaryMap;
- QString mVersion;
+ TQString mName;
+ TQString mType;
+ TQString mAuthor;
+ TQString mLicence;
+ TQMap<TQString,TQString> mSummaryMap;
+ TQString mVersion;
int mRelease;
- QDate mReleaseDate;
- QMap<QString,KURL> mPayloadMap;
- QMap<QString,KURL> mPreviewMap;
+ TQDate mReleaseDate;
+ TQMap<TQString,KURL> mPayloadMap;
+ TQMap<TQString,KURL> mPreviewMap;
int mRating;
int mDownloads;
- QStringList mLangs;
+ TQStringList mLangs;
};
}
diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp
index 6c273b03a..90596da3d 100644
--- a/knewstuff/ghns.cpp
+++ b/knewstuff/ghns.cpp
@@ -20,10 +20,10 @@
*/
#include <iostream>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlabel.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -43,25 +43,25 @@ GhnsWidget::GhnsWidget()
{
mWallpapers = new KNewStuffGeneric( "kdesktop/wallpaper", this );
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- topLayout->addWidget( new QLabel( i18n("Get hot new stuff:"), this ) );
+ topLayout->addWidget( new TQLabel( i18n("Get hot new stuff:"), this ) );
- QPushButton *button = new QPushButton( "Wallpapers", this );
+ TQPushButton *button = new TQPushButton( "Wallpapers", this );
topLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( downloadWallpapers() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( downloadWallpapers() ) );
topLayout->addSpacing( 5 );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch();
- QPushButton *closeButton = new QPushButton( "Close", this );
+ TQPushButton *closeButton = new TQPushButton( "Close", this );
buttonLayout->addWidget( closeButton );
- connect( closeButton, SIGNAL( clicked() ), kapp, SLOT( quit() ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), kapp, TQT_SLOT( quit() ) );
}
GhnsWidget::~GhnsWidget()
diff --git a/knewstuff/ghns.h b/knewstuff/ghns.h
index 4823bf526..0263c8f26 100644
--- a/knewstuff/ghns.h
+++ b/knewstuff/ghns.h
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp
index 5387e647f..6a37aa61d 100644
--- a/knewstuff/knewstuff.cpp
+++ b/knewstuff/knewstuff.cpp
@@ -30,8 +30,8 @@
using namespace KNS;
-KAction* KNS::standardAction(const QString& what,
- const QObject *recvr,
+KAction* KNS::standardAction(const TQString& what,
+ const TQObject *recvr,
const char *slot, KActionCollection* parent,
const char *name)
{
@@ -39,22 +39,22 @@ KAction* KNS::standardAction(const QString& what,
0, recvr, slot, parent, name);
}
-KNewStuff::KNewStuff( const QString &type, QWidget *parentWidget )
+KNewStuff::KNewStuff( const TQString &type, TQWidget *parentWidget )
{
mEngine = new Engine( this, type, parentWidget );
}
-KNewStuff::KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget )
+KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget )
{
mEngine = new Engine( this, type, providerList, parentWidget );
}
-QString KNewStuff::type() const
+TQString KNewStuff::type() const
{
return mEngine->type();
}
-QWidget *KNewStuff::parentWidget() const
+TQWidget *KNewStuff::parentWidget() const
{
return mEngine->parentWidget();
}
@@ -69,7 +69,7 @@ void KNewStuff::download()
mEngine->download();
}
-QString KNewStuff::downloadDestination( Entry * )
+TQString KNewStuff::downloadDestination( Entry * )
{
return KGlobal::dirs()->saveLocation( "tmp" ) +
KApplication::randomString( 10 );
@@ -80,7 +80,7 @@ void KNewStuff::upload()
mEngine->upload();
}
-void KNewStuff::upload( const QString &fileName, const QString previewName )
+void KNewStuff::upload( const TQString &fileName, const TQString previewName )
{
mEngine->upload(fileName, previewName);
}
diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h
index ab03ade51..e1c0d8c2f 100644
--- a/knewstuff/knewstuff.h
+++ b/knewstuff/knewstuff.h
@@ -20,7 +20,7 @@
#ifndef KNEWSTUFF_H
#define KNEWSTUFF_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
@@ -33,8 +33,8 @@ namespace KNS {
class Engine;
class Entry;
-KDE_EXPORT KAction* standardAction(const QString& what,
- const QObject *recvr,
+KDE_EXPORT KAction* standardAction(const TQString& what,
+ const TQObject *recvr,
const char *slot,
KActionCollection* parent,
const char *name = 0);
@@ -77,7 +77,7 @@ class KDE_EXPORT KNewStuff
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuff( const QString &type, QWidget *parentWidget = 0 );
+ KNewStuff( const TQString &type, TQWidget *parentWidget = 0 );
/**
Constructor.
@@ -88,18 +88,18 @@ class KDE_EXPORT KNewStuff
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget = 0 );
+ KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 );
virtual ~KNewStuff();
/**
Return type of data.
*/
- QString type() const;
+ TQString type() const;
/**
Return parent widget.
*/
- QWidget *parentWidget() const;
+ TQWidget *parentWidget() const;
/**
Start download process.
@@ -114,7 +114,7 @@ class KDE_EXPORT KNewStuff
/**
Upload with pre-defined files.
*/
- void upload( const QString &fileName, const QString previewName );
+ void upload( const TQString &fileName, const TQString previewName );
/**
Install file to application. The given fileName points to the file
@@ -127,7 +127,7 @@ class KDE_EXPORT KNewStuff
@param fileName name of downloaded file
*/
- virtual bool install( const QString &fileName ) = 0;
+ virtual bool install( const TQString &fileName ) = 0;
/**
Create a file to be uploaded to a "new stuff provider" and return the
filename. The format of the file is application specific. The only
@@ -137,14 +137,14 @@ class KDE_EXPORT KNewStuff
@param fileName name of the file to be written
@return @c true on success, @c false on error.
*/
- virtual bool createUploadFile( const QString &fileName ) = 0;
+ virtual bool createUploadFile( const TQString &fileName ) = 0;
/**
Return a filename which should be used as destination for downloading the
specified new stuff entry. Reimplement this function, if you don't want
the new stuff to be downloaded to a temporary file.
*/
- virtual QString downloadDestination( KNS::Entry *entry );
+ virtual TQString downloadDestination( KNS::Entry *entry );
protected:
diff --git a/knewstuff/knewstuffbutton.cpp b/knewstuff/knewstuffbutton.cpp
index 97be51df5..3ad0d6ac6 100644
--- a/knewstuff/knewstuffbutton.cpp
+++ b/knewstuff/knewstuffbutton.cpp
@@ -27,10 +27,10 @@
namespace KNS
{
-Button::Button(const QString& what,
- const QString& providerList,
- const QString& resourceType,
- QWidget* parent, const char* name)
+Button::Button(const TQString& what,
+ const TQString& providerList,
+ const TQString& resourceType,
+ TQWidget* parent, const char* name)
: KPushButton(parent, name),
d(0),
m_providerList(providerList),
@@ -41,7 +41,7 @@ Button::Button(const QString& what,
init();
}
-Button::Button(QWidget* parent, const char* name)
+Button::Button(TQWidget* parent, const char* name)
: KPushButton(parent, name),
d(0),
m_downloadDialog(0)
@@ -53,20 +53,20 @@ Button::Button(QWidget* parent, const char* name)
void Button::init()
{
setIconSet(SmallIconSet("knewstuff"));
- connect(this, SIGNAL(clicked()), SLOT(showDialog()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog()));
}
-void Button::setButtonText(const QString& what)
+void Button::setButtonText(const TQString& what)
{
setText(i18n("Download New %1").arg(what));
}
-void Button::setProviderList(const QString& providerList)
+void Button::setProviderList(const TQString& providerList)
{
m_providerList = providerList;
}
-void Button::setResourceType(const QString& resourceType)
+void Button::setResourceType(const TQString& resourceType)
{
m_type = resourceType;
}
diff --git a/knewstuff/knewstuffbutton.h b/knewstuff/knewstuffbutton.h
index bcc090cd4..6935ba653 100644
--- a/knewstuff/knewstuffbutton.h
+++ b/knewstuff/knewstuffbutton.h
@@ -53,10 +53,10 @@ class Button : public KPushButton
* @param parent the parent widget
* @param name the name to be used for this widget
*/
- Button(const QString& what,
- const QString& providerList,
- const QString& resourceType,
- QWidget* parent, const char* name);
+ Button(const TQString& what,
+ const TQString& providerList,
+ const TQString& resourceType,
+ TQWidget* parent, const char* name);
/**
* Constructor used when the details of the KHotNewStuff
@@ -65,24 +65,24 @@ class Button : public KPushButton
* @param parent the parent widget
* @param name the name to be used for this widget
*/
- Button(QWidget* parent, const char* name);
+ Button(TQWidget* parent, const char* name);
/**
* set the URL to the list of providers for this button to use
*/
- void setProviderList(const QString& providerList);
+ void setProviderList(const TQString& providerList);
/**
* the Hotstuff data type for this downlaod such as
* "korganizer/calendar"
*/
- void setResourceType(const QString& resourceType);
+ void setResourceType(const TQString& resourceType);
/**
* set the text that should appear on the button. will be prefaced
* with i18n("Download New")
*/
- void setButtonText(const QString& what);
+ void setButtonText(const TQString& what);
signals:
/**
@@ -105,8 +105,8 @@ class Button : public KPushButton
class ButtonPrivate;
ButtonPrivate* d;
- QString m_providerList;
- QString m_type;
+ TQString m_providerList;
+ TQString m_type;
DownloadDialog* m_downloadDialog;
};
diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp
index c1be1ccca..8438e25ea 100644
--- a/knewstuff/knewstuffgeneric.cpp
+++ b/knewstuff/knewstuffgeneric.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
using namespace std;
-KNewStuffGeneric::KNewStuffGeneric( const QString &type, QWidget *parent )
+KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent )
: KNewStuff( type, parent )
{
mConfig = KGlobal::config();
@@ -47,14 +47,14 @@ KNewStuffGeneric::~KNewStuffGeneric()
{
}
-bool KNewStuffGeneric::install( const QString &fileName )
+bool KNewStuffGeneric::install( const TQString &fileName )
{
kdDebug() << "KNewStuffGeneric::install(): " << fileName << endl;
- QStringList list, list2;
+ TQStringList list, list2;
mConfig->setGroup("KNewStuff");
- QString uncompress = mConfig->readEntry( "Uncompress" );
+ TQString uncompress = mConfig->readEntry( "Uncompress" );
if ( !uncompress.isEmpty() ) {
kdDebug() << "Uncompression method: " << uncompress << endl;
KTar tar(fileName, uncompress);
@@ -62,14 +62,14 @@ bool KNewStuffGeneric::install( const QString &fileName )
const KArchiveDirectory *dir = tar.directory();
dir->copyTo(destinationPath(0));
tar.close();
- QFile::remove(fileName);
+ TQFile::remove(fileName);
}
- QString cmd = mConfig->readEntry( "InstallationCommand" );
+ TQString cmd = mConfig->readEntry( "InstallationCommand" );
if ( !cmd.isEmpty() ) {
kdDebug() << "InstallationCommand: " << cmd << endl;
- list = QStringList::split( " ", cmd );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ list = TQStringList::split( " ", cmd );
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
list2 << (*it).replace("%f", fileName);
}
KProcess proc;
@@ -80,14 +80,14 @@ bool KNewStuffGeneric::install( const QString &fileName )
return true;
}
-bool KNewStuffGeneric::createUploadFile( const QString & /*fileName*/ )
+bool KNewStuffGeneric::createUploadFile( const TQString & /*fileName*/ )
{
return false;
}
-QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
+TQString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
{
- QString path, file, target, ext;
+ TQString path, file, target, ext;
mConfig->setGroup("KNewStuff");
@@ -99,7 +99,7 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
target = entry->fullName() + ext;
}
else target = "/";
- QString res = mConfig->readEntry( "StandardResource" );
+ TQString res = mConfig->readEntry( "StandardResource" );
if ( res.isEmpty() )
{
target = mConfig->readEntry("TargetDir");
@@ -116,13 +116,13 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
}
if ( res.isEmpty() && path.isEmpty() )
{
- if ( !entry ) return QString::null;
+ if ( !entry ) return TQString::null;
else return KNewStuff::downloadDestination( entry );
}
if ( !path.isEmpty() )
{
- file = QDir::home().path() + "/" + path + "/";
+ file = TQDir::home().path() + "/" + path + "/";
if ( entry ) file += entry->fullName() + ext;
}
else file = locateLocal( res.utf8() , target );
@@ -130,16 +130,16 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry )
return file;
}
-QString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
+TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry )
{
- QString file = destinationPath(entry);
+ TQString file = destinationPath(entry);
if ( KStandardDirs::exists( file ) ) {
int result = KMessageBox::warningContinueCancel( parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?")
.arg( file ),
- QString::null, i18n("Overwrite") );
- if ( result == KMessageBox::Cancel ) return QString::null;
+ TQString::null, i18n("Overwrite") );
+ if ( result == KMessageBox::Cancel ) return TQString::null;
}
return file;
diff --git a/knewstuff/knewstuffgeneric.h b/knewstuff/knewstuffgeneric.h
index 5443e24a3..6347bf539 100644
--- a/knewstuff/knewstuffgeneric.h
+++ b/knewstuff/knewstuffgeneric.h
@@ -30,7 +30,7 @@ class KConfig;
*
* This class is used for data uploads and installation.
* \code
- * QString payload, preview;
+ * TQString payload, preview;
* KNewStuffGeneric *ns = new KNewStuffGeneric("kamikaze/level", this);
* ns->upload(payload, preview);
* \endcode
@@ -48,7 +48,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param type a Hotstuff data type such as "korganizer/calendar"
@param parent the parent window.
*/
- KNewStuffGeneric( const QString &type, QWidget *parent = 0 );
+ KNewStuffGeneric( const TQString &type, TQWidget *parent = 0 );
~KNewStuffGeneric();
/**
@@ -57,7 +57,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param fileName filename of the donwloaded file
@return @c true in case of installation success, @c false otherwise
*/
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
/**
Creates a file suitable for upload.
@@ -67,7 +67,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param fileName the name of the file to upload after its creation
@return @c true in case of creation success, @c false otherwise
*/
- bool createUploadFile( const QString &fileName );
+ bool createUploadFile( const TQString &fileName );
/**
Queries the preferred destination file for a download.
@@ -75,10 +75,10 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff
@param entry a Hotstuff data entry
@return destination filename, or 0 to return directory only
*/
- QString downloadDestination( KNS::Entry *entry );
+ TQString downloadDestination( KNS::Entry *entry );
private:
- QString destinationPath( KNS::Entry *entry );
+ TQString destinationPath( KNS::Entry *entry );
KConfig *mConfig;
};
diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp
index 270d9449c..f68be7ae3 100644
--- a/knewstuff/knewstuffsecure.cpp
+++ b/knewstuff/knewstuffsecure.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kconfig.h>
@@ -33,11 +33,11 @@
using namespace KNS;
-KNewStuffSecure::KNewStuffSecure(const QString &type, QWidget *parentWidget)
+KNewStuffSecure::KNewStuffSecure(const TQString &type, TQWidget *parentWidget)
: KNewStuff(type, parentWidget)
{
m_tempDir = 0L;
- connect(engine(), SIGNAL(uploadFinished(bool)), SLOT(slotUploadFinished(bool)));
+ connect(engine(), TQT_SIGNAL(uploadFinished(bool)), TQT_SLOT(slotUploadFinished(bool)));
}
@@ -46,7 +46,7 @@ KNewStuffSecure::~KNewStuffSecure()
removeTempDirectory();
}
-bool KNewStuffSecure::install(const QString &fileName)
+bool KNewStuffSecure::install(const TQString &fileName)
{
bool ok = true;
@@ -59,8 +59,8 @@ bool KNewStuffSecure::install(const QString &fileName)
const KArchiveDirectory *directory = tar.directory();
directory->copyTo(m_tempDir->name(), true);
m_tarName = "";
- QStringList entries = directory->entries();
- for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ TQStringList entries = directory->entries();
+ for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
{
if (*it != "signature" && *it != "md5sum")
{
@@ -74,7 +74,7 @@ bool KNewStuffSecure::install(const QString &fileName)
else
{
m_tarName.prepend(m_tempDir->name());
- connect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+ connect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int)));
Security::ref()->checkValidity(m_tarName);
}
} else
@@ -86,8 +86,8 @@ bool KNewStuffSecure::install(const QString &fileName)
void KNewStuffSecure::slotValidated(int result)
{
- QString errorString;
- QString signatureStr;
+ TQString errorString;
+ TQString signatureStr;
bool valid = true;
if (result == -1)
{
@@ -147,14 +147,14 @@ void KNewStuffSecure::slotValidated(int result)
KConfig *cfg = KGlobal::config();
cfg->deleteGroup("KNewStuffStatus");
cfg->setGroup("KNewStuffStatus");
- for (QMap<QString, QString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
{
cfg->writeEntry(it.key(), it.data());
}
cfg->sync();
}
removeTempDirectory();
- disconnect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int)));
+ disconnect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int)));
}
void KNewStuffSecure::downloadResource()
@@ -165,19 +165,19 @@ void KNewStuffSecure::downloadResource()
KNewStuff::download();
}
-bool KNewStuffSecure::createUploadFile(const QString &fileName)
+bool KNewStuffSecure::createUploadFile(const TQString &fileName)
{
Q_UNUSED(fileName);
return true;
}
-void KNewStuffSecure::uploadResource(const QString& fileName)
+void KNewStuffSecure::uploadResource(const TQString& fileName)
{
- connect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ connect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
removeTempDirectory();
m_tempDir = new KTempDir();
m_tempDir->setAutoDelete(true);
- QFileInfo f(fileName);
+ TQFileInfo f(fileName);
m_signedFileName = m_tempDir->name() + "/" + f.fileName();
KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true);
Security::ref()->signFile(m_signedFileName);
@@ -194,30 +194,30 @@ void KNewStuffSecure::slotFileSigned(int result)
{
if (KMessageBox::warningContinueCancel(parentWidget(), i18n("There are no keys usable for signing or you did not entered the correct passphrase.\nProceed without signing the resource?")) == KMessageBox::Cancel)
{
- disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
removeTempDirectory();
return;
}
}
KTar tar(m_signedFileName + ".signed", "application/x-gzip");
tar.open(IO_WriteOnly);
- QStringList files;
+ TQStringList files;
files << m_signedFileName;
files << m_tempDir->name() + "/md5sum";
files << m_tempDir->name() + "/signature";
- for (QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f)
+ for (TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f)
{
- QFile file(*it_f);
+ TQFile file(*it_f);
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
- tar.writeFile(QFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data());
+ TQByteArray bArray = file.readAll();
+ tar.writeFile(TQFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data());
file.close();
}
tar.close();
KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true);
- KNewStuff::upload(m_signedFileName, QString::null);
- disconnect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int)));
+ KNewStuff::upload(m_signedFileName, TQString::null);
+ disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int)));
}
}
diff --git a/knewstuff/knewstuffsecure.h b/knewstuff/knewstuffsecure.h
index 2aed131a3..1a6bc44a1 100644
--- a/knewstuff/knewstuffsecure.h
+++ b/knewstuff/knewstuffsecure.h
@@ -17,7 +17,7 @@
#define KNEWSTUFFSECURE_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//kde includes
#include "knewstuff.h"
@@ -37,7 +37,7 @@ to the standard KNewStuff class.
@author Andras Mantia <amantia@kde.org>
*/
-class KDE_EXPORT KNewStuffSecure : public QObject, public KNewStuff
+class KDE_EXPORT KNewStuffSecure : public TQObject, public KNewStuff
{
Q_OBJECT
@@ -49,16 +49,16 @@ public:
@param parentWidget parent widget of dialogs opened by the KNewStuff
engine
*/
- KNewStuffSecure(const QString &type, QWidget *parentWidget=0);
+ KNewStuffSecure(const TQString &type, TQWidget *parentWidget=0);
virtual ~KNewStuffSecure();
/** Installs the downloaded resource. Do not call or reimplement directly.
It's reimplemented from KNewStuff for internal reasons.
*/
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
/** Reimplemented for internal reasons. */
- bool createUploadFile(const QString &fileName);
+ bool createUploadFile(const TQString &fileName);
/** Initiates a download. This is the method that must be called in
* order to download a signed resource. */
@@ -67,7 +67,7 @@ public:
/** Signs the file and uploads to the central server.
* @param fileName The file to be signed and uploaded
*/
- void uploadResource(const QString &fileName);
+ void uploadResource(const TQString &fileName);
private slots:
@@ -93,9 +93,9 @@ protected:
void removeTempDirectory();
KTempDir *m_tempDir;
- QString m_tarName;
- QString m_signedFileName;
- QMap<QString, QString> m_installedResources;
+ TQString m_tarName;
+ TQString m_signedFileName;
+ TQMap<TQString, TQString> m_installedResources;
};
#endif
diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp
index 83e78ef92..c1d12853c 100644
--- a/knewstuff/provider.cpp
+++ b/knewstuff/provider.cpp
@@ -25,8 +25,8 @@
#include <kmessagebox.h>
#include <klocale.h>
-#include <qptrdict.h>
-#include <qwindowdefs.h>
+#include <tqptrdict.h>
+#include <tqwindowdefs.h>
#include "provider.h"
#include "provider.moc"
@@ -44,13 +44,13 @@ class ProviderPrivate
KURL mDownloadUrlDownloads;
};
-static QPtrDict<ProviderPrivate> *d_ptr_prov = 0;
+static TQPtrDict<ProviderPrivate> *d_ptr_prov = 0;
static ProviderPrivate *d_prov(const Provider *p)
{
if(!d_ptr_prov)
{
- d_ptr_prov = new QPtrDict<ProviderPrivate>();
+ d_ptr_prov = new TQPtrDict<ProviderPrivate>();
d_ptr_prov->setAutoDelete(true);
}
ProviderPrivate *ret = d_ptr_prov->find((void*)p);
@@ -62,7 +62,7 @@ static ProviderPrivate *d_prov(const Provider *p)
return ret;
}
-KURL Provider::downloadUrlVariant( QString variant ) const
+KURL Provider::downloadUrlVariant( TQString variant ) const
{
if((variant == "latest") && (d_prov(this)->mDownloadUrlLatest.isValid()))
return d_prov(this)->mDownloadUrlLatest;
@@ -80,7 +80,7 @@ Provider::Provider() : mNoUpload( false )
{
}
-Provider::Provider( const QDomElement &e ) : mNoUpload( false )
+Provider::Provider( const TQDomElement &e ) : mNoUpload( false )
{
parseDomElement( e );
}
@@ -102,12 +102,12 @@ Provider::~Provider()
}
-void Provider::setName( const QString &name )
+void Provider::setName( const TQString &name )
{
mName = name;
}
-QString Provider::name() const
+TQString Provider::name() const
{
return mName;
}
@@ -168,7 +168,7 @@ bool Provider::noUpload() const
}
-void Provider::parseDomElement( const QDomElement &element )
+void Provider::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "provider" ) return;
@@ -184,21 +184,21 @@ void Provider::parseDomElement( const QDomElement &element )
if(!iconurl.isValid()) iconurl.setPath( element.attribute("icon") );
setIcon( iconurl );
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
if ( p.tagName() == "noupload" ) setNoUpload( true );
if ( p.tagName() == "title" ) setName( p.text().stripWhiteSpace() );
}
}
-QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
+TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &parent )
{
- QDomElement entry = doc.createElement( "stuff" );
+ TQDomElement entry = doc.createElement( "stuff" );
parent.appendChild( entry );
- QDomElement n = doc.createElement( "name" );
+ TQDomElement n = doc.createElement( "name" );
n.appendChild( doc.createTextNode( name() ) );
entry.appendChild( n );
@@ -206,13 +206,13 @@ QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
}
-ProviderLoader::ProviderLoader( QWidget *parentWidget ) :
- QObject( parentWidget )
+ProviderLoader::ProviderLoader( TQWidget *parentWidget ) :
+ TQObject( parentWidget )
{
mProviders.setAutoDelete( true );
}
-void ProviderLoader::load( const QString &type, const QString &providersList )
+void ProviderLoader::load( const TQString &type, const TQString &providersList )
{
kdDebug() << "ProviderLoader::load()" << endl;
@@ -222,13 +222,13 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
KConfig *cfg = KGlobal::config();
cfg->setGroup("KNewStuff");
- QString providersUrl = providersList;
+ TQString providersUrl = providersList;
if( providersUrl.isEmpty() )
providersUrl = cfg->readEntry( "ProvidersUrl" );
if ( providersUrl.isEmpty() ) {
// TODO: Replace the default by the real one.
- QString server = cfg->readEntry( "MasterServer",
+ TQString server = cfg->readEntry( "MasterServer",
"http://korganizer.kde.org" );
providersUrl = server + "/knewstuff/" + type + "/providers.xml";
@@ -237,49 +237,49 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
kdDebug() << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
KIO::TransferJob *job = KIO::get( KURL( providersUrl ), false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
// job->dumpObjectInfo();
}
-void ProviderLoader::slotJobData( KIO::Job *, const QByteArray &data )
+void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug() << "ProviderLoader::slotJobData()" << endl;
if ( data.size() == 0 ) return;
- QCString str( data, data.size() + 1 );
+ TQCString str( data, data.size() + 1 );
- mJobData.append( QString::fromUtf8( str ) );
+ mJobData.append( TQString::fromUtf8( str ) );
}
void ProviderLoader::slotJobResult( KIO::Job *job )
{
if ( job->error() ) {
- job->showErrorDialog( static_cast<QWidget *>(parent()) );
+ job->showErrorDialog( static_cast<TQWidget *>(parent()) );
}
kdDebug() << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
<< endl;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
- KMessageBox::error( static_cast<QWidget *>(parent()), i18n("Error parsing providers list.") );
+ KMessageBox::error( static_cast<TQWidget *>(parent()), i18n("Error parsing providers list.") );
return;
}
- QDomElement providers = doc.documentElement();
+ TQDomElement providers = doc.documentElement();
if ( providers.isNull() ) {
kdDebug() << "No document in Providers.xml." << endl;
}
- QDomNode n;
+ TQDomNode n;
for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
if ( p.tagName() == "provider" ) {
mProviders.append( new Provider( p ) );
diff --git a/knewstuff/provider.h b/knewstuff/provider.h
index e990fa919..6a0972319 100644
--- a/knewstuff/provider.h
+++ b/knewstuff/provider.h
@@ -20,11 +20,11 @@
#ifndef KNEWSTUFF_PROVIDER_H
#define KNEWSTUFF_PROVIDER_H
-#include <qcstring.h>
-#include <qdom.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -46,7 +46,7 @@ namespace KNS {
class KDE_EXPORT Provider
{
public:
- typedef QPtrList<Provider> List;
+ typedef TQPtrList<Provider> List;
/**
* Constructor.
@@ -56,7 +56,7 @@ class KDE_EXPORT Provider
/**
* Constructor with XML feed.
*/
- Provider( const QDomElement & );
+ Provider( const TQDomElement & );
/**
* Destructor.
@@ -66,14 +66,14 @@ class KDE_EXPORT Provider
/**
* Sets the common name of the provider.
*/
- void setName( const QString & );
+ void setName( const TQString & );
/**
* Retrieves the common name of the provider.
*
* @return provider name
*/
- QString name() const;
+ TQString name() const;
/**
* Sets the download URL.
@@ -93,7 +93,7 @@ class KDE_EXPORT Provider
*
* @return download specific URL
*/
- KURL downloadUrlVariant( QString variant ) const;
+ KURL downloadUrlVariant( TQString variant ) const;
/**
* Sets the upload URL.
@@ -150,12 +150,12 @@ class KDE_EXPORT Provider
KURL icon() const;
protected:
- void parseDomElement( const QDomElement & );
+ void parseDomElement( const TQDomElement & );
- QDomElement createDomElement( QDomDocument &, QDomElement &parent );
+ TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent );
private:
- QString mName;
+ TQString mName;
KURL mDownloadUrl;
KURL mUploadUrl;
KURL mNoUploadUrl;
@@ -178,7 +178,7 @@ class KDE_EXPORT ProviderLoader : public QObject
*
* @param parentWidget the parent widget
*/
- ProviderLoader( QWidget *parentWidget );
+ ProviderLoader( TQWidget *parentWidget );
/**
* Starts asynchronously loading the list of providers of the
@@ -189,7 +189,7 @@ class KDE_EXPORT ProviderLoader : public QObject
* we first try the ProvidersUrl from KGlobal::config, then we
* fall back to a hardcoded value.
*/
- void load( const QString &type, const QString &providerList = QString::null );
+ void load( const TQString &type, const TQString &providerList = TQString::null );
signals:
/**
@@ -198,13 +198,13 @@ class KDE_EXPORT ProviderLoader : public QObject
void providersLoaded( Provider::List * );
protected slots:
- void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobData( KIO::Job *, const TQByteArray & );
void slotJobResult( KIO::Job * );
private:
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
- QString mJobData;
+ TQString mJobData;
Provider::List mProviders;
};
diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp
index 00374a341..a66258701 100644
--- a/knewstuff/providerdialog.cpp
+++ b/knewstuff/providerdialog.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qstring.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
@@ -49,16 +49,16 @@ class ProviderItem : public KListViewItem
Provider *mProvider;
};
-ProviderDialog::ProviderDialog( Engine *engine, QWidget *parent ) :
+ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) :
KDialogBase( Plain, i18n("Hot New Stuff Providers"), Ok | Cancel, Cancel,
parent, 0, false, true ),
mEngine( engine )
{
- QFrame *topPage = plainPage();
+ TQFrame *topPage = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topPage );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topPage );
- QLabel *description = new QLabel( i18n("Please select one of the providers listed below:"), topPage );
+ TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage );
topLayout->addWidget( description );
mListView = new KListView( topPage );
diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h
index c75cc3a1d..3e02e30aa 100644
--- a/knewstuff/providerdialog.h
+++ b/knewstuff/providerdialog.h
@@ -50,7 +50,7 @@ class ProviderDialog : public KDialogBase
@param engine a KNewStuff engine object
@param parent the parent window
*/
- ProviderDialog( Engine *engine, QWidget *parent );
+ ProviderDialog( Engine *engine, TQWidget *parent );
/**
Clears the list of providers.
diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp
index f7099c722..8ef377b78 100644
--- a/knewstuff/security.cpp
+++ b/knewstuff/security.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
//qt includes
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
//kde includes
#include <kdebug.h>
@@ -50,15 +50,15 @@ void Security::readKeys()
{
if (m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(readKeys()));
+ TQTimer::singleShot(5, this, TQT_SLOT(readKeys()));
return;
}
m_runMode = List;
m_keys.clear();
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
- connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
- connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (!readProcess->start(KProcess::NotifyOnExit, true))
KMessageBox::error(0L, i18n("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
else
@@ -69,14 +69,14 @@ void Security::readSecretKeys()
{
if (m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(readSecretKeys()));
+ TQTimer::singleShot(5, this, TQT_SLOT(readSecretKeys()));
return;
}
m_runMode = ListSecret;
KProcIO *readProcess=new KProcIO();
*readProcess << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-secret-keys";
- connect(readProcess, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
- connect(readProcess, SIGNAL(readReady(KProcIO *)) ,this, SLOT(slotDataArrived(KProcIO *)));
+ connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (readProcess->start(KProcess::NotifyOnExit, true))
m_gpgRunning = true;
}
@@ -100,7 +100,7 @@ void Security::slotProcessExited(KProcess *process)
void Security::slotDataArrived(KProcIO *procIO)
{
- QString data;
+ TQString data;
while (procIO->readln(data, true) != -1)
{
switch (m_runMode)
@@ -114,10 +114,10 @@ void Security::slotDataArrived(KProcIO *procIO)
key.secret = false;
else
key.secret = true;
- QStringList line = QStringList::split(":", data, true);
+ TQStringList line = TQStringList::split(":", data, true);
key.id = line[4];
- QString shortId = key.id.right(8);
- QString trustStr = line[1];
+ TQString shortId = key.id.right(8);
+ TQString trustStr = line[1];
key.trusted = false;
if (trustStr == "u" || trustStr == "f")
key.trusted = true;
@@ -136,7 +136,7 @@ void Security::slotDataArrived(KProcIO *procIO)
{
m_result &= SIGNED_BAD_CLEAR;
m_result |= SIGNED_OK;
- QString id = data.section(" ", 1 , 1).right(8);
+ TQString id = data.section(" ", 1 , 1).right(8);
if (!m_keys.contains(id))
{
m_result |= UNKNOWN;
@@ -153,7 +153,7 @@ void Security::slotDataArrived(KProcIO *procIO)
if (data.startsWith("BADSIG"))
{
m_result |= SIGNED_BAD;
- QString id = data.section(" ", 1 , 1).right(8);
+ TQString id = data.section(" ", 1 , 1).right(8);
if (!m_keys.contains(id))
{
m_result |= UNKNOWN;
@@ -172,7 +172,7 @@ void Security::slotDataArrived(KProcIO *procIO)
case Sign:
if (data.find("passphrase.enter") != -1)
{
- QCString password;
+ TQCString password;
KeyStruct key = m_keys[m_secretKey];
int result = KPasswordDialog::getPassword(password, i18n("<qt>Enter passphrase for key <b>0x%1</b>, belonging to<br><i>%2&lt;%3&gt;</i>:</qt>").arg(m_secretKey).arg(key.name).arg(key.mail));
if (result == KPasswordDialog::Accepted)
@@ -196,7 +196,7 @@ void Security::slotDataArrived(KProcIO *procIO)
}
}
-void Security::checkValidity(const QString& filename)
+void Security::checkValidity(const TQString& filename)
{
m_fileName = filename;
slotCheckValidity();
@@ -206,7 +206,7 @@ void Security::slotCheckValidity()
{
if (!m_keysRead || m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(slotCheckValidity()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotCheckValidity()));
return;
}
if (m_keys.count() == 0)
@@ -217,12 +217,12 @@ void Security::slotCheckValidity()
m_result = 0;
m_runMode = Verify;
- QFileInfo f(m_fileName);
+ TQFileInfo f(m_fileName);
//check the MD5 sum
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (file.open(IO_ReadOnly))
{
context.reset();
@@ -233,7 +233,7 @@ void Security::slotCheckValidity()
file.setName(f.dirPath() + "/md5sum");
if (file.open(IO_ReadOnly))
{
- QString md5sum_file;
+ TQString md5sum_file;
file.readLine(md5sum_file, 50);
if (!md5sum.isEmpty() && !md5sum_file.isEmpty() && md5sum_file.startsWith(md5sum))
m_result |= MD5_OK;
@@ -248,8 +248,8 @@ void Security::slotCheckValidity()
//verify the signature
KProcIO *verifyProcess=new KProcIO();
*verifyProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--verify" << f.dirPath() + "/signature"<< m_fileName;
- connect(verifyProcess, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
- connect(verifyProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ connect(verifyProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
if (verifyProcess->start(KProcess::NotifyOnExit,true))
m_gpgRunning = true;
else
@@ -260,7 +260,7 @@ void Security::slotCheckValidity()
}
}
-void Security::signFile(const QString &fileName)
+void Security::signFile(const TQString &fileName)
{
m_fileName = fileName;
slotSignFile();
@@ -270,12 +270,12 @@ void Security::slotSignFile()
{
if (!m_keysRead || m_gpgRunning)
{
- QTimer::singleShot(5, this, SLOT(slotSignFile()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotSignFile()));
return;
}
- QStringList secretKeys;
- for (QMap<QString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
+ TQStringList secretKeys;
+ for (TQMap<TQString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
{
if (it.data().secret)
secretKeys.append(it.key());
@@ -288,13 +288,13 @@ void Security::slotSignFile()
}
m_result = 0;
- QFileInfo f(m_fileName);
+ TQFileInfo f(m_fileName);
//create the MD5 sum
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (file.open(IO_ReadOnly))
{
context.reset();
@@ -305,7 +305,7 @@ void Security::slotSignFile()
file.setName(f.dirPath() + "/md5sum");
if (file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << md5sum;
m_result |= MD5_OK;
file.close();
@@ -328,8 +328,8 @@ void Security::slotSignFile()
//verify the signature
KProcIO *signProcess=new KProcIO();
*signProcess<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--no-tty"<<"--detach-sign" << "-u" << m_secretKey << "-o" << f.dirPath() + "/signature" << m_fileName;
- connect(signProcess, SIGNAL(processExited(KProcess *)),this, SLOT(slotProcessExited(KProcess *)));
- connect(signProcess, SIGNAL(readReady(KProcIO *)),this, SLOT(slotDataArrived(KProcIO *)));
+ connect(signProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *)));
m_runMode = Sign;
if (signProcess->start(KProcess::NotifyOnExit,true))
m_gpgRunning = true;
diff --git a/knewstuff/security.h b/knewstuff/security.h
index 03117fd96..2a4eca536 100644
--- a/knewstuff/security.h
+++ b/knewstuff/security.h
@@ -18,16 +18,16 @@
#define SECURITY_H
//qt includes
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
class KProcIO;
class KProcess;
struct KeyStruct {
- QString id;
- QString name;
- QString mail;
+ TQString id;
+ TQString name;
+ TQString mail;
bool trusted;
bool secret;
};
@@ -59,7 +59,7 @@ public:
* the file is should contain a "signature" and a "md5sum" file, otherwise verification will fail.
* The method is asynchronous and the result is signalled with @ref validityResult.
*/
- void checkValidity(const QString &fileName);
+ void checkValidity(const TQString &fileName);
/** Creates a signature and an md5sum file for the fileName and packs
* everything into a gzipped tarball.
@@ -67,7 +67,7 @@ public:
*
* The method is asynchronous and the result is signalled with @ref fileSigned.
*/
- void signFile(const QString &fileName);
+ void signFile(const TQString &fileName);
/** Get the key used for signing. This method is valid only if:
* - the checkValidity was called
* - the result of the validity check does not have the UNKNOWN bit set
@@ -115,9 +115,9 @@ private:
int m_runMode;
bool m_gpgRunning; /// true if gpg is currently running
bool m_keysRead; /// true if all the keys were read
- QMap<QString, KeyStruct> m_keys; /// holds information about the available key
- QString m_fileName; /// the file to sign/verify
- QString m_secretKey; /// the key used for signing
+ TQMap<TQString, KeyStruct> m_keys; /// holds information about the available key
+ TQString m_fileName; /// the file to sign/verify
+ TQString m_secretKey; /// the key used for signing
private slots:
void slotProcessExited(KProcess *process);
diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp
index f9bc84ef2..b0c380c68 100644
--- a/knewstuff/testnewstuff.cpp
+++ b/knewstuff/testnewstuff.cpp
@@ -20,9 +20,9 @@
#include <iostream>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -37,22 +37,22 @@
using namespace std;
-bool TestNewStuff::install( const QString &fileName )
+bool TestNewStuff::install( const TQString &fileName )
{
kdDebug() << "TestNewStuff::install(): " << fileName << endl;
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Error opening file." << endl;
return false;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
kdDebug() << "--BEGIN-NEW_STUFF--" << endl;
cout << ts.read().utf8();
kdDebug() << "---END-NEW_STUFF---" << endl;
return true;
}
-bool TestNewStuff::createUploadFile( const QString &fileName )
+bool TestNewStuff::createUploadFile( const TQString &fileName )
{
KProcess p;
p << "touch" << fileName;
@@ -66,23 +66,23 @@ MyWidget::MyWidget()
{
mNewStuff = new TestNewStuff;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- QPushButton *downloadButton = new QPushButton( "Download", this );
+ TQPushButton *downloadButton = new TQPushButton( "Download", this );
topLayout->addWidget( downloadButton );
- connect( downloadButton, SIGNAL( clicked() ), SLOT( download() ) );
+ connect( downloadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( download() ) );
- QPushButton *uploadButton = new QPushButton( "Upload", this );
+ TQPushButton *uploadButton = new TQPushButton( "Upload", this );
topLayout->addWidget( uploadButton );
- connect( uploadButton, SIGNAL( clicked() ), SLOT( upload() ) );
+ connect( uploadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( upload() ) );
topLayout->addSpacing( 5 );
- QPushButton *closeButton = new QPushButton( "Close", this );
+ TQPushButton *closeButton = new TQPushButton( "Close", this );
topLayout->addWidget( closeButton );
- connect( closeButton, SIGNAL( clicked() ), kapp, SLOT( quit() ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), kapp, TQT_SLOT( quit() ) );
}
MyWidget::~MyWidget()
diff --git a/knewstuff/testnewstuff.h b/knewstuff/testnewstuff.h
index b1981f723..da0149fda 100644
--- a/knewstuff/testnewstuff.h
+++ b/knewstuff/testnewstuff.h
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -35,9 +35,9 @@ class TestNewStuff : public KNewStuff
public:
TestNewStuff() : KNewStuff( "korganizer/calendar" ) {}
- bool install( const QString &fileName );
+ bool install( const TQString &fileName );
- bool createUploadFile( const QString &fileName );
+ bool createUploadFile( const TQString &fileName );
};
class MyWidget : public QWidget
diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp
index 433cb9c4c..cecc67e32 100644
--- a/knewstuff/uploaddialog.cpp
+++ b/knewstuff/uploaddialog.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qstring.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
#include <ktextedit.h>
#include <klistview.h>
@@ -43,65 +43,65 @@
using namespace KNS;
-UploadDialog::UploadDialog( Engine *engine, QWidget *parent ) :
+UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) :
KDialogBase( Plain, i18n("Share Hot New Stuff"), Ok | Cancel, Cancel,
parent, 0, false, true ),
mEngine( engine )
{
mEntryList.setAutoDelete( true );
- QFrame *topPage = plainPage();
+ TQFrame *topPage = plainPage();
- QGridLayout *topLayout = new QGridLayout( topPage );
+ TQGridLayout *topLayout = new TQGridLayout( topPage );
topLayout->setSpacing( spacingHint() );
- QLabel *nameLabel = new QLabel( i18n("Name:"), topPage );
+ TQLabel *nameLabel = new TQLabel( i18n("Name:"), topPage );
topLayout->addWidget( nameLabel, 0, 0 );
- mNameEdit = new QLineEdit( topPage );
+ mNameEdit = new TQLineEdit( topPage );
topLayout->addWidget( mNameEdit, 0, 1 );
- QLabel *authorLabel = new QLabel( i18n("Author:"), topPage );
+ TQLabel *authorLabel = new TQLabel( i18n("Author:"), topPage );
topLayout->addWidget( authorLabel, 1, 0 );
- mAuthorEdit = new QLineEdit( topPage );
+ mAuthorEdit = new TQLineEdit( topPage );
topLayout->addWidget( mAuthorEdit, 1, 1 );
- QLabel *emailLabel = new QLabel( i18n("Email:"), topPage );
+ TQLabel *emailLabel = new TQLabel( i18n("Email:"), topPage );
topLayout->addWidget( emailLabel, 2, 0 );
- mEmailEdit = new QLineEdit( topPage );
+ mEmailEdit = new TQLineEdit( topPage );
topLayout->addWidget( mEmailEdit, 2, 1 );
- QLabel *versionLabel = new QLabel( i18n("Version:"), topPage );
+ TQLabel *versionLabel = new TQLabel( i18n("Version:"), topPage );
topLayout->addWidget( versionLabel, 3, 0 );
- mVersionEdit = new QLineEdit( topPage );
+ mVersionEdit = new TQLineEdit( topPage );
topLayout->addWidget( mVersionEdit, 3, 1 );
- QLabel *releaseLabel = new QLabel( i18n("Release:"), topPage );
+ TQLabel *releaseLabel = new TQLabel( i18n("Release:"), topPage );
topLayout->addWidget( releaseLabel, 4, 0 );
- mReleaseSpin = new QSpinBox( topPage );
+ mReleaseSpin = new TQSpinBox( topPage );
mReleaseSpin->setMinValue( 1 );
topLayout->addWidget( mReleaseSpin, 4, 1 );
- QLabel *licenceLabel = new QLabel( i18n("License:"), topPage );
+ TQLabel *licenceLabel = new TQLabel( i18n("License:"), topPage );
topLayout->addWidget( licenceLabel, 5, 0 );
- mLicenceCombo = new QComboBox( topPage );
+ mLicenceCombo = new TQComboBox( topPage );
mLicenceCombo->setEditable( true );
mLicenceCombo->insertItem( i18n("GPL") );
mLicenceCombo->insertItem( i18n("LGPL") );
mLicenceCombo->insertItem( i18n("BSD") );
topLayout->addWidget( mLicenceCombo, 5, 1 );
- QLabel *languageLabel = new QLabel( i18n("Language:"), topPage );
+ TQLabel *languageLabel = new TQLabel( i18n("Language:"), topPage );
topLayout->addWidget( languageLabel, 6, 0 );
- mLanguageCombo = new QComboBox( topPage );
+ mLanguageCombo = new TQComboBox( topPage );
topLayout->addWidget( mLanguageCombo, 6, 1 );
mLanguageCombo->insertStringList( KGlobal::locale()->languageList() );
- QLabel *previewLabel = new QLabel( i18n("Preview URL:"), topPage );
+ TQLabel *previewLabel = new TQLabel( i18n("Preview URL:"), topPage );
topLayout->addWidget( previewLabel, 7, 0 );
mPreviewUrl = new KURLRequester( topPage );
topLayout->addWidget( mPreviewUrl, 7, 1 );
- QLabel *summaryLabel = new QLabel( i18n("Summary:"), topPage );
+ TQLabel *summaryLabel = new TQLabel( i18n("Summary:"), topPage );
topLayout->addMultiCellWidget( summaryLabel, 8, 8, 0, 1 );
mSummaryEdit = new KTextEdit( topPage );
topLayout->addMultiCellWidget( mSummaryEdit, 9, 9, 0, 1 );
@@ -137,7 +137,7 @@ void UploadDialog::slotOk()
if ( mPayloadUrl.isValid() ) {
KConfig *conf = kapp->config();
- conf->setGroup( QString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
+ conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
conf->writeEntry("name", mNameEdit->text());
conf->writeEntry("author", mAuthorEdit->text());
conf->writeEntry("email", mEmailEdit->text());
@@ -155,26 +155,26 @@ void UploadDialog::slotOk()
accept();
}
-void UploadDialog::setPreviewFile( const QString &previewFile )
+void UploadDialog::setPreviewFile( const TQString &previewFile )
{
mPreviewUrl->setURL( previewFile );
}
-void UploadDialog::setPayloadFile( const QString &payloadFile )
+void UploadDialog::setPayloadFile( const TQString &payloadFile )
{
mPayloadUrl = payloadFile;
KConfig *conf = kapp->config();
- conf->setGroup( QString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
- QString name = conf->readEntry("name");
- QString author = conf->readEntry("author");
- QString email = conf->readEntry("email");
- QString version = conf->readEntry("version");
- QString release = conf->readEntry("release");
- QString preview = conf->readEntry("preview");
- QString summary = conf->readEntry("summary");
- QString lang = conf->readEntry("language");
- QString licence = conf->readEntry("licence");
+ conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) );
+ TQString name = conf->readEntry("name");
+ TQString author = conf->readEntry("author");
+ TQString email = conf->readEntry("email");
+ TQString version = conf->readEntry("version");
+ TQString release = conf->readEntry("release");
+ TQString preview = conf->readEntry("preview");
+ TQString summary = conf->readEntry("summary");
+ TQString lang = conf->readEntry("language");
+ TQString licence = conf->readEntry("licence");
mNameEdit->clear();
mAuthorEdit->clear();
@@ -188,7 +188,7 @@ void UploadDialog::setPayloadFile( const QString &payloadFile )
if(!name.isNull())
{
- int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"),QString::null,i18n("Fill Out"),i18n("Do Not Fill Out"));
+ int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"),TQString::null,i18n("Fill Out"),i18n("Do Not Fill Out"));
if(prefill == KMessageBox::Yes)
{
mNameEdit->setText(name);
diff --git a/knewstuff/uploaddialog.h b/knewstuff/uploaddialog.h
index c76de02df..4b70b212e 100644
--- a/knewstuff/uploaddialog.h
+++ b/knewstuff/uploaddialog.h
@@ -54,7 +54,7 @@ class UploadDialog : public KDialogBase
@param engine a KNewStuff engine object to be used for uploads
@param parent the parent window
*/
- UploadDialog( Engine *engine, QWidget *parent );
+ UploadDialog( Engine *engine, TQWidget *parent );
/**
Destructor.
@@ -67,7 +67,7 @@ class UploadDialog : public KDialogBase
@param previewFile the preview image file
*/
- void setPreviewFile( const QString &previewFile );
+ void setPreviewFile( const TQString &previewFile );
/**
Sets the payload filename.
@@ -76,7 +76,7 @@ class UploadDialog : public KDialogBase
@param payloadFile the payload data file
*/
- void setPayloadFile( const QString &payloadFile );
+ void setPayloadFile( const TQString &payloadFile );
protected slots:
void slotOk();
@@ -84,17 +84,17 @@ class UploadDialog : public KDialogBase
private:
Engine *mEngine;
- QLineEdit *mNameEdit;
- QLineEdit *mAuthorEdit;
- QLineEdit *mEmailEdit;
- QLineEdit *mVersionEdit;
- QSpinBox *mReleaseSpin;
+ TQLineEdit *mNameEdit;
+ TQLineEdit *mAuthorEdit;
+ TQLineEdit *mEmailEdit;
+ TQLineEdit *mVersionEdit;
+ TQSpinBox *mReleaseSpin;
KURLRequester *mPreviewUrl;
- QTextEdit *mSummaryEdit;
- QComboBox *mLanguageCombo;
- QComboBox *mLicenceCombo;
+ TQTextEdit *mSummaryEdit;
+ TQComboBox *mLanguageCombo;
+ TQComboBox *mLicenceCombo;
- QPtrList<Entry> mEntryList;
+ TQPtrList<Entry> mEntryList;
KURL mPayloadUrl;
};
diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp
index cd4bca4b5..060d9220e 100644
--- a/kparts/browserextension.cpp
+++ b/kparts/browserextension.cpp
@@ -19,14 +19,14 @@
*/
#include "browserextension.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qtimer.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qregexp.h>
-#include <qstrlist.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqregexp.h>
+#include <tqstrlist.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <klocale.h>
@@ -73,8 +73,8 @@ struct URLArgsPrivate
newTab = false;
forcesNewWindow = false;
}
- QString contentType; // for POST
- QMap<QString, QString> metaData;
+ TQString contentType; // for POST
+ TQMap<TQString, TQString> metaData;
bool doPost;
bool redirectedRequest;
bool lockHistory;
@@ -94,7 +94,7 @@ URLArgs::URLArgs()
}
-URLArgs::URLArgs( bool _reload, int _xOffset, int _yOffset, const QString &_serviceType )
+URLArgs::URLArgs( bool _reload, int _xOffset, int _yOffset, const TQString &_serviceType )
{
reload = _reload;
xOffset = _xOffset;
@@ -136,7 +136,7 @@ URLArgs::~URLArgs()
d = 0;
}
-void URLArgs::setContentType( const QString & contentType )
+void URLArgs::setContentType( const TQString & contentType )
{
if (!d)
d = new URLArgsPrivate;
@@ -155,12 +155,12 @@ bool URLArgs::redirectedRequest () const
return d ? d->redirectedRequest : false;
}
-QString URLArgs::contentType() const
+TQString URLArgs::contentType() const
{
- return d ? d->contentType : QString::null;
+ return d ? d->contentType : TQString::null;
}
-QMap<QString, QString> &URLArgs::metaData()
+TQMap<TQString, TQString> &URLArgs::metaData()
{
if (!d)
d = new URLArgsPrivate;
@@ -276,7 +276,7 @@ WindowArgs &WindowArgs::operator=( const WindowArgs &args )
return *this;
}
-WindowArgs::WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible,
+WindowArgs::WindowArgs( const TQRect &_geometry, bool _fullscreen, bool _menuBarVisible,
bool _toolBarsVisible, bool _statusBarVisible, bool _resizable )
{
d = 0;
@@ -340,10 +340,10 @@ public:
KURL m_delayedURL;
KParts::URLArgs m_delayedArgs;
};
- QValueList<DelayedRequest> m_requests;
+ TQValueList<DelayedRequest> m_requests;
bool m_urlDropHandlingEnabled;
KBitArray m_actionStatus;
- QMap<int, QString> m_actionText;
+ TQMap<int, TQString> m_actionText;
BrowserInterface *m_browserInterface;
};
@@ -356,7 +356,7 @@ static KStaticDeleter<BrowserExtension::ActionNumberMap> actionNumberMapsd;
BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent,
const char *name )
-: QObject( parent, name), m_part( parent )
+: TQObject( parent, name), m_part( parent )
{
//kdDebug() << "BrowserExtension::BrowserExtension() " << this << endl;
d = new BrowserExtensionPrivate;
@@ -370,21 +370,21 @@ BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent,
// they're supported or not
ActionSlotMap::ConstIterator it = s_actionSlotMap->begin();
ActionSlotMap::ConstIterator itEnd = s_actionSlotMap->end();
- QStrList slotNames = metaObject()->slotNames();
+ TQStrList slotNames = metaObject()->slotNames();
for ( int i=0 ; it != itEnd ; ++it, ++i )
{
// Does the extension have a slot with the name of this action ?
d->m_actionStatus.setBit( i, slotNames.contains( it.key()+"()" ) );
}
- connect( m_part, SIGNAL( completed() ),
- this, SLOT( slotCompleted() ) );
- connect( this, SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
- connect( this, SIGNAL( enableAction( const char *, bool ) ),
- this, SLOT( slotEnableAction( const char *, bool ) ) );
- connect( this, SIGNAL( setActionText( const char *, const QString& ) ),
- this, SLOT( slotSetActionText( const char *, const QString& ) ) );
+ connect( m_part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotCompleted() ) );
+ connect( this, TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect( this, TQT_SIGNAL( enableAction( const char *, bool ) ),
+ this, TQT_SLOT( slotEnableAction( const char *, bool ) ) );
+ connect( this, TQT_SIGNAL( setActionText( const char *, const TQString& ) ),
+ this, TQT_SLOT( slotSetActionText( const char *, const TQString& ) ) );
}
BrowserExtension::~BrowserExtension()
@@ -413,12 +413,12 @@ int BrowserExtension::yOffset()
return 0;
}
-void BrowserExtension::saveState( QDataStream &stream )
+void BrowserExtension::saveState( TQDataStream &stream )
{
stream << m_part->url() << (Q_INT32)xOffset() << (Q_INT32)yOffset();
}
-void BrowserExtension::restoreState( QDataStream &stream )
+void BrowserExtension::restoreState( TQDataStream &stream )
{
KURL u;
Q_INT32 xOfs, yOfs;
@@ -451,13 +451,13 @@ void BrowserExtension::slotCompleted()
void BrowserExtension::pasteRequest()
{
- QCString plain( "plain" );
- QString url = QApplication::clipboard()->text(plain, QClipboard::Selection).stripWhiteSpace();
+ TQCString plain( "plain" );
+ TQString url = TQApplication::clipboard()->text(plain, QClipboard::Selection).stripWhiteSpace();
// Remove linefeeds and any whitespace surrounding it.
- url.remove(QRegExp("[\\ ]*\\n+[\\ ]*"));
+ url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*"));
// Check if it's a URL
- QStringList filters = KURIFilter::self()->pluginNames();
+ TQStringList filters = KURIFilter::self()->pluginNames();
filters.remove( "kuriikwsfilter" );
filters.remove( "localdomainurifilter" );
KURIFilterData filterData;
@@ -482,7 +482,7 @@ void BrowserExtension::pasteRequest()
else if ( KURIFilter::self()->filterURI( filterData, "kuriikwsfilter" ) && url.length() < 250 )
{
if ( KMessageBox::questionYesNo( m_part->widget(),
- i18n( "<qt>Do you want to search the Internet for <b>%1</b>?" ).arg( QStyleSheet::escape(url) ),
+ i18n( "<qt>Do you want to search the Internet for <b>%1</b>?" ).arg( TQStyleSheet::escape(url) ),
i18n( "Internet Search" ), KGuiItem( i18n( "&Search" ), "find"),
KStdGuiItem::cancel(), "MiddleClickSearch" ) == KMessageBox::Yes)
slotOpenURLRequest( filterData.uri(), KParts::URLArgs() );
@@ -496,7 +496,7 @@ void BrowserExtension::slotOpenURLRequest( const KURL &url, const KParts::URLArg
req.m_delayedURL = url;
req.m_delayedArgs = args;
d->m_requests.append( req );
- QTimer::singleShot( 0, this, SLOT( slotEmitOpenURLRequestDelayed() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotEmitOpenURLRequestDelayed() ) );
}
void BrowserExtension::slotEmitOpenURLRequestDelayed()
@@ -537,7 +537,7 @@ bool BrowserExtension::isActionEnabled( const char * name ) const
return d->m_actionStatus[ actionNumber ];
}
-void BrowserExtension::slotSetActionText( const char * name, const QString& text )
+void BrowserExtension::slotSetActionText( const char * name, const TQString& text )
{
kdDebug() << "BrowserExtension::slotSetActionText " << name << " " << text << endl;
ActionNumberMap::ConstIterator it = s_actionNumberMap->find( name );
@@ -549,13 +549,13 @@ void BrowserExtension::slotSetActionText( const char * name, const QString& text
kdWarning() << "BrowserExtension::slotSetActionText unknown action " << name << endl;
}
-QString BrowserExtension::actionText( const char * name ) const
+TQString BrowserExtension::actionText( const char * name ) const
{
int actionNumber = (*s_actionNumberMap)[ name ];
- QMap<int, QString>::ConstIterator it = d->m_actionText.find( actionNumber );
+ TQMap<int, TQString>::ConstIterator it = d->m_actionText.find( actionNumber );
if ( it != d->m_actionText.end() )
return *it;
- return QString::null;
+ return TQString::null;
}
// for compatibility
@@ -576,19 +576,19 @@ void BrowserExtension::createActionSlotMap()
assert(!s_actionSlotMap);
s_actionSlotMap = actionSlotMapsd.setObject( s_actionSlotMap, new ActionSlotMap );
- s_actionSlotMap->insert( "cut", SLOT( cut() ) );
- s_actionSlotMap->insert( "copy", SLOT( copy() ) );
- s_actionSlotMap->insert( "paste", SLOT( paste() ) );
- s_actionSlotMap->insert( "rename", SLOT( rename() ) );
- s_actionSlotMap->insert( "trash", SLOT( trash() ) );
- s_actionSlotMap->insert( "del", SLOT( del() ) );
- s_actionSlotMap->insert( "properties", SLOT( properties() ) );
- s_actionSlotMap->insert( "editMimeType", SLOT( editMimeType() ) );
- s_actionSlotMap->insert( "print", SLOT( print() ) );
+ s_actionSlotMap->insert( "cut", TQT_SLOT( cut() ) );
+ s_actionSlotMap->insert( "copy", TQT_SLOT( copy() ) );
+ s_actionSlotMap->insert( "paste", TQT_SLOT( paste() ) );
+ s_actionSlotMap->insert( "rename", TQT_SLOT( rename() ) );
+ s_actionSlotMap->insert( "trash", TQT_SLOT( trash() ) );
+ s_actionSlotMap->insert( "del", TQT_SLOT( del() ) );
+ s_actionSlotMap->insert( "properties", TQT_SLOT( properties() ) );
+ s_actionSlotMap->insert( "editMimeType", TQT_SLOT( editMimeType() ) );
+ s_actionSlotMap->insert( "print", TQT_SLOT( print() ) );
// Tricky. Those aren't actions in fact, but simply methods that a browserextension
// can have or not. No need to return them here.
- //s_actionSlotMap->insert( "reparseConfiguration", SLOT( reparseConfiguration() ) );
- //s_actionSlotMap->insert( "refreshMimeTypes", SLOT( refreshMimeTypes() ) );
+ //s_actionSlotMap->insert( "reparseConfiguration", TQT_SLOT( reparseConfiguration() ) );
+ //s_actionSlotMap->insert( "refreshMimeTypes", TQT_SLOT( refreshMimeTypes() ) );
// nothing for setSaveViewPropertiesLocally either
// Create the action-number map
@@ -603,15 +603,15 @@ void BrowserExtension::createActionSlotMap()
}
}
-BrowserExtension *BrowserExtension::childObject( QObject *obj )
+BrowserExtension *BrowserExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::BrowserExtension" ) )
return static_cast<KParts::BrowserExtension *>( it.current() );
@@ -638,7 +638,7 @@ public:
}
BrowserHostExtension::BrowserHostExtension( KParts::ReadOnlyPart *parent, const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
d = new BrowserHostExtensionPrivate;
d->m_part = parent;
@@ -649,14 +649,14 @@ BrowserHostExtension::~BrowserHostExtension()
delete d;
}
-QStringList BrowserHostExtension::frameNames() const
+TQStringList BrowserHostExtension::frameNames() const
{
- return QStringList();
+ return TQStringList();
}
-const QPtrList<KParts::ReadOnlyPart> BrowserHostExtension::frames() const
+const TQPtrList<KParts::ReadOnlyPart> BrowserHostExtension::frames() const
{
- return QPtrList<KParts::ReadOnlyPart>();
+ return TQPtrList<KParts::ReadOnlyPart>();
}
bool BrowserHostExtension::openURLInFrame( const KURL &, const KParts::URLArgs & )
@@ -664,15 +664,15 @@ bool BrowserHostExtension::openURLInFrame( const KURL &, const KParts::URLArgs &
return false;
}
-BrowserHostExtension *BrowserHostExtension::childObject( QObject *obj )
+BrowserHostExtension *BrowserHostExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::BrowserHostExtension" ) )
return static_cast<KParts::BrowserHostExtension *>( it.current() );
@@ -684,7 +684,7 @@ void BrowserExtension::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
BrowserHostExtension *
-BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame)
+BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const TQString &frame)
{
FindFrameParentParams param;
param.parent = 0;
@@ -697,31 +697,31 @@ BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const Q
void BrowserHostExtension::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-LiveConnectExtension::LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name ) : QObject( parent, name) {}
+LiveConnectExtension::LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name ) : TQObject( parent, name) {}
-bool LiveConnectExtension::get( const unsigned long, const QString &, Type &, unsigned long &, QString & ) {
+bool LiveConnectExtension::get( const unsigned long, const TQString &, Type &, unsigned long &, TQString & ) {
return false;
}
-bool LiveConnectExtension::put( const unsigned long, const QString &, const QString & ) {
+bool LiveConnectExtension::put( const unsigned long, const TQString &, const TQString & ) {
return false;
}
-bool LiveConnectExtension::call( const unsigned long, const QString &, const QStringList &, Type &, unsigned long &, QString & ) {
+bool LiveConnectExtension::call( const unsigned long, const TQString &, const TQStringList &, Type &, unsigned long &, TQString & ) {
return false;
}
void LiveConnectExtension::unregister( const unsigned long ) {}
-LiveConnectExtension *LiveConnectExtension::childObject( QObject *obj )
+LiveConnectExtension *LiveConnectExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::LiveConnectExtension" ) )
return static_cast<KParts::LiveConnectExtension *>( it.current() );
diff --git a/kparts/browserextension.h b/kparts/browserextension.h
index 2130f3741..5a3c0f7eb 100644
--- a/kparts/browserextension.h
+++ b/kparts/browserextension.h
@@ -23,17 +23,17 @@
#include <sys/types.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
-#include <qpair.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
+#include <tqpair.h>
#include <kparts/part.h>
#include <kparts/event.h>
class KFileItem;
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
class QString;
namespace KParts {
@@ -60,14 +60,14 @@ struct KPARTS_EXPORT URLArgs
URLArgs( const URLArgs &args );
URLArgs &operator=( const URLArgs &args);
- URLArgs( bool reload, int xOffset, int yOffset, const QString &serviceType = QString::null );
+ URLArgs( bool reload, int xOffset, int yOffset, const TQString &serviceType = TQString::null );
virtual ~URLArgs();
/**
* This buffer can be used by the part to save and restore its contents.
* See KHTMLPart for instance.
*/
- QStringList docState;
+ TQStringList docState;
/**
* @p reload is set when the cache shouldn't be used (forced reload).
@@ -86,21 +86,21 @@ struct KPARTS_EXPORT URLArgs
/**
* The servicetype (usually mimetype) to use when opening the next URL.
*/
- QString serviceType;
+ TQString serviceType;
/**
* KHTML-specific field, contents of the HTTP POST data.
*/
- QByteArray postData;
+ TQByteArray postData;
/**
* KHTML-specific field, header defining the type of the POST data.
*/
- void setContentType( const QString & contentType );
+ void setContentType( const TQString & contentType );
/**
* KHTML-specific field, header defining the type of the POST data.
*/
- QString contentType() const;
+ TQString contentType() const;
/**
* KHTML-specific field, whether to do a POST instead of a GET,
* for the next openURL.
@@ -131,12 +131,12 @@ struct KPARTS_EXPORT URLArgs
* Meta-data to associate with the next KIO operation
* @see KIO::TransferJob etc.
*/
- QMap<QString, QString> &metaData();
+ TQMap<TQString, TQString> &metaData();
/**
* The frame in which to open the URL. KHTML/Konqueror-specific.
*/
- QString frameName;
+ TQString frameName;
/**
* If true, the part who asks for a URL to be opened can be 'trusted'
@@ -187,7 +187,7 @@ struct KPARTS_EXPORT WindowArgs
~WindowArgs();
WindowArgs( const WindowArgs &args );
WindowArgs &operator=( const WindowArgs &args );
- WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible,
+ WindowArgs( const TQRect &_geometry, bool _fullscreen, bool _menuBarVisible,
bool _toolBarsVisible, bool _statusBarVisible, bool _resizable );
WindowArgs( int _x, int _y, int _width, int _height, bool _fullscreen,
bool _menuBarVisible, bool _toolBarsVisible,
@@ -228,7 +228,7 @@ public:
KURL url() const { return m_url; }
URLArgs args() const { return m_args; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strOpenURLEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strOpenURLEvent ); }
private:
static const char *s_strOpenURLEvent;
@@ -382,7 +382,7 @@ public:
* If you want to save additional properties, reimplement it
* but don't forget to call the parent method (probably first).
*/
- virtual void saveState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
/**
* Used by the browser to restore the view in the state
@@ -391,7 +391,7 @@ public:
* If you saved additional properties, reimplement it
* but don't forget to call the parent method (probably first).
*/
- virtual void restoreState( QDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
/**
* Returns whether url drop handling is enabled.
@@ -430,12 +430,12 @@ public:
* to query later for the text of the action, using this method.
* @since 3.5
*/
- QString actionText( const char * name ) const;
+ TQString actionText( const char * name ) const;
- typedef QMap<QCString,QCString> ActionSlotMap;
+ typedef TQMap<TQCString,TQCString> ActionSlotMap;
/**
* Returns a map containing the action names as keys and corresponding
- * SLOT()'ified method names as data entries.
+ * TQT_SLOT()'ified method names as data entries.
*
* This is very useful for
* the host component, when connecting the own signals with the
@@ -455,11 +455,11 @@ public:
* Connecting to the slot can be done like this:
*
* \code
- * connect( yourObject, SIGNAL( yourSignal() ),
+ * connect( yourObject, TQT_SIGNAL( yourSignal() ),
* extension, mapIterator.data() )
* \endcode
*
- * (where "mapIterator" is your QMap<QCString,QCString> iterator)
+ * (where "mapIterator" is your TQMap<TQCString,TQCString> iterator)
*/
static ActionSlotMap actionSlotMap();
@@ -473,7 +473,7 @@ public:
* Queries @p obj for a child object which inherits from this
* BrowserExtension class. Convenience method.
*/
- static BrowserExtension *childObject( QObject *obj );
+ static BrowserExtension *childObject( TQObject *obj );
/**
* Asks the hosting browser to perform a paste (using openURLRequestDelayed)
@@ -501,7 +501,7 @@ signals:
* See class documentation for the list of standard actions.
* @since 3.5
*/
- void setActionText( const char * name, const QString& text );
+ void setActionText( const char * name, const TQString& text );
/**
* Asks the host (browser) to open @p url.
@@ -539,7 +539,7 @@ signals:
/**
* Updates the URL shown in the browser's location bar to @p url.
*/
- void setLocationBarURL( const QString &url );
+ void setLocationBarURL( const TQString &url );
/**
* Sets the URL of an icon for the currently displayed page.
@@ -579,13 +579,13 @@ signals:
*/
void speedProgress( int bytesPerSecond );
- void infoMessage( const QString & );
+ void infoMessage( const TQString & );
/**
* Emit this to make the browser show a standard popup menu
* at the point @p global for the files @p items.
*/
- void popupMenu( const QPoint &global, const KFileItemList &items );
+ void popupMenu( const TQPoint &global, const KFileItemList &items );
/**
* Emit this to make the browser show a standard popup menu
@@ -593,9 +593,9 @@ signals:
*
* The GUI described by @p client is being merged with the popupmenu of the host
*/
- void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items );
+ void popupMenu( KXMLGUIClient *client, const TQPoint &global, const KFileItemList &items );
- void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items, const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i );
+ void popupMenu( KXMLGUIClient *client, const TQPoint &global, const KFileItemList &items, const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i );
/**
* Emit this to make the browser show a standard popup menu
@@ -605,8 +605,8 @@ signals:
* about this URL as possible, like the @p mimeType and the file type
* (@p mode: S_IFREG, S_IFDIR...)
*/
- void popupMenu( const QPoint &global, const KURL &url,
- const QString &mimeType, mode_t mode = (mode_t)-1 );
+ void popupMenu( const TQPoint &global, const KURL &url,
+ const TQString &mimeType, mode_t mode = (mode_t)-1 );
/**
* Emit this to make the browser show a standard popup menu
@@ -618,8 +618,8 @@ signals:
* The GUI described by @p client is being merged with the popupmenu of the host
*/
void popupMenu( KXMLGUIClient *client,
- const QPoint &global, const KURL &url,
- const QString &mimeType, mode_t mode = (mode_t)-1 );
+ const TQPoint &global, const KURL &url,
+ const TQString &mimeType, mode_t mode = (mode_t)-1 );
/**
* Emit this to make the browser show a standard popup menu
@@ -631,7 +631,7 @@ signals:
* The GUI described by @p client is being merged with the popupmenu of the host
*/
void popupMenu( KXMLGUIClient *client,
- const QPoint &global, const KURL &url,
+ const TQPoint &global, const KURL &url,
const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i, mode_t mode = (mode_t)-1 );
/**
@@ -644,7 +644,7 @@ signals:
* Inform the hosting application about the current selection.
* Used when some text is selected.
*/
- void selectionInfo( const QString &text );
+ void selectionInfo( const TQString &text );
/**
* Inform the hosting application about the current selection.
* Used when a set of URLs is selected.
@@ -661,7 +661,7 @@ signals:
* Ask the hosting application to add a new HTML (aka Mozilla/Netscape)
* SideBar entry.
*/
- void addWebSideBar(const KURL &url, const QString& name);
+ void addWebSideBar(const KURL &url, const TQString& name);
/**
* Ask the hosting application to move the top level widget.
@@ -698,13 +698,13 @@ private slots:
void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args );
void slotEmitOpenURLRequestDelayed();
void slotEnableAction( const char *, bool );
- void slotSetActionText( const char*, const QString& );
+ void slotSetActionText( const char*, const TQString& );
private:
KParts::ReadOnlyPart *m_part;
URLArgs m_args;
public:
- typedef QMap<QCString,int> ActionNumberMap;
+ typedef TQMap<TQCString,int> ActionNumberMap;
private:
static ActionNumberMap * s_actionNumberMap;
@@ -735,21 +735,21 @@ public:
*
* Note that this method does not query the child objects recursively.
*/
- virtual QStringList frameNames() const;
+ virtual TQStringList frameNames() const;
/**
* Returns a list of pointers to all hosted child objects.
*
* Note that this method does not query the child objects recursively.
*/
- virtual const QPtrList<KParts::ReadOnlyPart> frames() const;
+ virtual const TQPtrList<KParts::ReadOnlyPart> frames() const;
/**
* Returns the part that contains @p frame and that may be accessed
* by @p callingPart
* @since 3.3
*/
- BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame);
+ BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const TQString &frame);
/**
* Opens the given url in a hosted child frame. The frame name is specified in the
@@ -761,7 +761,7 @@ public:
* Queries @p obj for a child object which inherits from this
* BrowserHostExtension class. Convenience method.
*/
- static BrowserHostExtension *childObject( QObject *obj );
+ static BrowserHostExtension *childObject( TQObject *obj );
protected:
/** This 'enum' along with the structure below is NOT part of the public API.
@@ -774,7 +774,7 @@ protected:
{
BrowserHostExtension *parent;
KParts::ReadOnlyPart *callingPart;
- QString frame;
+ TQString frame;
};
virtual void virtual_hook( int id, void* data );
@@ -796,7 +796,7 @@ public:
enum Type {
TypeVoid=0, TypeBool, TypeFunction, TypeNumber, TypeObject, TypeString
};
- typedef QValueList<QPair<Type, QString> > ArgList;
+ typedef TQValueList<QPair<Type, TQString> > ArgList;
LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name = 0L );
@@ -804,26 +804,26 @@ public:
/**
* get a field value from objid, return true on success
*/
- virtual bool get( const unsigned long objid, const QString & field, Type & type, unsigned long & retobjid, QString & value );
+ virtual bool get( const unsigned long objid, const TQString & field, Type & type, unsigned long & retobjid, TQString & value );
/**
* put a field value in objid, return true on success
*/
- virtual bool put( const unsigned long objid, const QString & field, const QString & value );
+ virtual bool put( const unsigned long objid, const TQString & field, const TQString & value );
/**
* calls a function of objid, return true on success
*/
- virtual bool call( const unsigned long objid, const QString & func, const QStringList & args, Type & type, unsigned long & retobjid, QString & value );
+ virtual bool call( const unsigned long objid, const TQString & func, const TQStringList & args, Type & type, unsigned long & retobjid, TQString & value );
/**
* notifies the part that there is no reference anymore to objid
*/
virtual void unregister( const unsigned long objid );
- static LiveConnectExtension *childObject( QObject *obj );
+ static LiveConnectExtension *childObject( TQObject *obj );
signals:
/**
* notify an event from the part of object objid
*/
- virtual void partEvent( const unsigned long objid, const QString & event, const ArgList & args );
+ virtual void partEvent( const unsigned long objid, const TQString & event, const ArgList & args );
};
}
diff --git a/kparts/browserinterface.cpp b/kparts/browserinterface.cpp
index 77e12e2b8..fc9909a9f 100644
--- a/kparts/browserinterface.cpp
+++ b/kparts/browserinterface.cpp
@@ -1,15 +1,15 @@
#include "browserinterface.h"
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <config.h>
#include <private/qucomextra_p.h>
using namespace KParts;
-BrowserInterface::BrowserInterface( QObject *parent, const char *name )
- : QObject( parent, name )
+BrowserInterface::BrowserInterface( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
}
@@ -17,7 +17,7 @@ BrowserInterface::~BrowserInterface()
{
}
-void BrowserInterface::callMethod( const char *name, const QVariant &argument )
+void BrowserInterface::callMethod( const char *name, const TQVariant &argument )
{
int slot = metaObject()->findSlot( name );
@@ -25,28 +25,28 @@ void BrowserInterface::callMethod( const char *name, const QVariant &argument )
return;
QUObject o[ 2 ];
- QStringList strLst;
+ TQStringList strLst;
uint i;
switch ( argument.type() )
{
- case QVariant::Invalid:
+ case TQVariant::Invalid:
break;
- case QVariant::String:
+ case TQVariant::String:
static_QUType_QString.set( o + 1, argument.toString() );
break;
- case QVariant::StringList:
+ case TQVariant::StringList:
strLst = argument.toStringList();
static_QUType_ptr.set( o + 1, &strLst );
break;
- case QVariant::Int:
+ case TQVariant::Int:
static_QUType_int.set( o + 1, argument.toInt() );
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
i = argument.toUInt();
static_QUType_ptr.set( o + 1, &i );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
static_QUType_bool.set( o + 1, argument.toBool() );
break;
default: return;
diff --git a/kparts/browserinterface.h b/kparts/browserinterface.h
index d74b64bb2..8d3f0ad98 100644
--- a/kparts/browserinterface.h
+++ b/kparts/browserinterface.h
@@ -1,8 +1,8 @@
#ifndef __browserinterface_h__
#define __browserinterface_h__
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqvariant.h>
#include <kdelibs_export.h>
@@ -39,14 +39,14 @@ class KPARTS_EXPORT BrowserInterface : public QObject
{
Q_OBJECT
public:
- BrowserInterface( QObject *parent, const char *name = 0 );
+ BrowserInterface( TQObject *parent, const char *name = 0 );
virtual ~BrowserInterface();
/**
* Perform a dynamic invocation of a method in the BrowserInterface
* implementation. Methods are to be implemented as simple Qt slots.
*/
- void callMethod( const char *name, const QVariant &argument );
+ void callMethod( const char *name, const TQVariant &argument );
};
}
diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp
index 0fd6126d3..b3e81f8d2 100644
--- a/kparts/browserrun.cpp
+++ b/kparts/browserrun.cpp
@@ -36,11 +36,11 @@ class BrowserRun::BrowserRunPrivate
{
public:
bool m_bHideErrorDialog;
- QString contentDisposition;
+ TQString contentDisposition;
};
BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget* window,
+ KParts::ReadOnlyPart *part, TQWidget* window,
bool removeReferrer, bool trustedSource )
: KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
m_args( args ), m_part( part ), m_window( window ),
@@ -52,7 +52,7 @@ BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
// BIC: merge with above ctor
BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget* window,
+ KParts::ReadOnlyPart *part, TQWidget* window,
bool removeReferrer, bool trustedSource, bool hideErrorDialog )
: KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
m_args( args ), m_part( part ), m_window( window ),
@@ -83,7 +83,7 @@ void BrowserRun::init()
if ( m_bIsLocalFile ) {
struct stat buff;
- if ( stat( QFile::encodeName(m_strURL.path()), &buff ) == -1 )
+ if ( stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 )
{
kdDebug(1000) << "BrowserRun::init : " << m_strURL.prettyURL() << " doesn't exist." << endl;
redirectToError( KIO::ERR_DOES_NOT_EXIST, m_strURL.path() );
@@ -116,7 +116,7 @@ void BrowserRun::scanFile()
if ( m_part )
{
- QString proto = m_part->url().protocol().lower();
+ TQString proto = m_part->url().protocol().lower();
if (proto == "https" || proto == "webdavs") {
m_args.metaData().insert("main_frame_request", "TRUE" );
@@ -146,10 +146,10 @@ void BrowserRun::scanFile()
job->addMetaData( m_args.metaData() );
job->setWindow( m_window );
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotBrowserScanFinished(KIO::Job *)));
- connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
- this, SLOT( slotBrowserMimetype(KIO::Job *, const QString &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotBrowserScanFinished(KIO::Job *)));
+ connect( job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotBrowserMimetype(KIO::Job *, const TQString &)));
m_job = job;
}
@@ -176,7 +176,7 @@ void BrowserRun::slotBrowserScanFinished(KIO::Job *job)
}
}
-void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
+void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const TQString &type )
{
Q_ASSERT( _job == m_job );
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(m_job);
@@ -191,7 +191,7 @@ void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
//kdDebug(1000) << "m_suggestedFilename=" << m_suggestedFilename << endl;
// Make a copy to avoid a dead reference
- QString _type = type;
+ TQString _type = type;
job->putOnHold();
m_job = 0;
@@ -200,16 +200,16 @@ void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
foundMimeType( _type );
}
-BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString& _mimeType )
+BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& _mimeType )
{
- QString mimeType( _mimeType );
+ TQString mimeType( _mimeType );
Q_ASSERT( !m_bFinished ); // only come here if the mimetype couldn't be embedded
// Support for saving remote files.
if ( mimeType != "inode/directory" && // dirs can't be saved
!m_strURL.isLocalFile() )
{
if ( isTextExecutable(mimeType) )
- mimeType = QString::fromLatin1("text/plain"); // view, don't execute
+ mimeType = TQString::fromLatin1("text/plain"); // view, don't execute
kdDebug(1000) << "BrowserRun: ask for saving" << endl;
KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, "Application");
// ... -> ask whether to save
@@ -234,18 +234,18 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString&
{
kdDebug(1000) << "BrowserRun: request comes from a POST, can't pass a URL to another app, need to save" << endl;
m_sMimeType = mimeType;
- QString extension;
- QString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename;
+ TQString extension;
+ TQString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename;
int extensionPos = fileName.findRev( '.' );
if ( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
KURL destURL;
destURL.setPath( tempFile.name() );
KIO::Job *job = KIO::file_copy( m_strURL, destURL, 0600, true /*overwrite*/, false /*no resume*/, true /*progress info*/ );
job->setWindow (m_window);
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotCopyToTempFileResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotCopyToTempFileResult(KIO::Job *)) );
return Delayed; // We'll continue after the job has finished
}
}
@@ -264,7 +264,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString&
}
//static
-bool BrowserRun::allowExecution( const QString &serviceType, const KURL &url )
+bool BrowserRun::allowExecution( const TQString &serviceType, const KURL &url )
{
if ( !isExecutable( serviceType ) )
return true;
@@ -276,11 +276,11 @@ bool BrowserRun::allowExecution( const QString &serviceType, const KURL &url )
i18n("Execute File?"), i18n("Execute") ) == KMessageBox::Continue );
}
-static QString makeQuestion( const KURL& url, const QString& mimeType, const QString& suggestedFilename )
+static TQString makeQuestion( const KURL& url, const TQString& mimeType, const TQString& suggestedFilename )
{
- QString surl = KStringHandler::csqueeze( url.prettyURL() );
+ TQString surl = KStringHandler::csqueeze( url.prettyURL() );
KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
- QString comment = mimeType;
+ TQString comment = mimeType;
// Test if the mimeType is not recognize as octet-stream.
// If so then keep mime-type as comment
@@ -297,30 +297,30 @@ static QString makeQuestion( const KURL& url, const QString& mimeType, const QSt
}
//static
-BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFilename )
+BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr offer, const TQString& mimeType, const TQString & suggestedFilename )
{
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
// NOTE: Keep this function in sync with kdebase/kcontrol/filetypes/filetypedetails.cpp
// FileTypeDetails::updateAskSave()
- QString question = makeQuestion( url, mimeType, suggestedFilename );
+ TQString question = makeQuestion( url, mimeType, suggestedFilename );
// Text used for the open button
- QString openText = (offer && !offer->name().isEmpty())
+ TQString openText = (offer && !offer->name().isEmpty())
? i18n("&Open with '%1'").arg(offer->name())
: i18n("&Open With...");
int choice = KMessageBox::questionYesNoCancel(
0L, question, url.host(),
KStdGuiItem::saveAs(), openText,
- QString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
+ TQString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
}
//static
-BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const QString& mimeType, const QString & suggestedFilename, int flags )
+BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename, int flags )
{
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
// NOTE: Keep this funcion in sync with kdebase/kcontrol/filetypes/filetypedetails.cpp
@@ -346,30 +346,30 @@ BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const QS
mimeType.startsWith( "print" ) ) )
return Open;
- QString question = makeQuestion( url, mimeType, suggestedFilename );
+ TQString question = makeQuestion( url, mimeType, suggestedFilename );
int choice = KMessageBox::questionYesNoCancel(
0L, question, url.host(),
KStdGuiItem::saveAs(), KGuiItem( i18n( "&Open" ), "fileopen"),
- QString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
+ TQString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
}
// Default implementation, overridden in KHTMLRun
-void BrowserRun::save( const KURL & url, const QString & suggestedFilename )
+void BrowserRun::save( const KURL & url, const TQString & suggestedFilename )
{
simpleSave( url, suggestedFilename, m_window );
}
// static
-void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename )
+void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename )
{
simpleSave (url, suggestedFilename, 0);
}
-void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename,
- QWidget* window )
+void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename,
+ TQWidget* window )
{
// DownloadManager <-> konqueror integration
// find if the integration is enabled
@@ -379,18 +379,18 @@ void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename
{
KConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
- QString downloadManger = cfg.readPathEntry("DownloadManager");
+ TQString downloadManger = cfg.readPathEntry("DownloadManager");
if (!downloadManger.isEmpty())
{
// then find the download manager location
kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
- QString cmd=KStandardDirs::findExe(downloadManger);
+ TQString cmd=KStandardDirs::findExe(downloadManger);
if (cmd.isEmpty())
{
- QString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
- QString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
+ TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
+ TQString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
KMessageBox::detailedSorry(0,errMsg,errMsgEx);
- cfg.writePathEntry("DownloadManager",QString::null);
+ cfg.writePathEntry("DownloadManager",TQString::null);
cfg.sync ();
}
else
@@ -413,7 +413,7 @@ void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename
}
// no download manager available, let's do it ourself
- KFileDialog *dlg = new KFileDialog( QString::null, QString::null /*all files*/,
+ KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*all files*/,
window , "filedialog", true );
dlg->setOperationMode( KFileDialog::Saving );
dlg->setCaption(i18n("Save As"));
@@ -458,7 +458,7 @@ void BrowserRun::handleError( KIO::Job * job )
KRun::slotStatResult( job );
}
-void BrowserRun::redirectToError( int error, const QString& errorText )
+void BrowserRun::redirectToError( int error, const TQString& errorText )
{
/**
* To display this error in KHTMLPart instead of inside a dialog box,
@@ -467,12 +467,12 @@ void BrowserRun::redirectToError( int error, const QString& errorText )
*
* The format of the error:/ URL is error:/?query#url,
* where two variables are passed in the query:
- * error = int kio error code, errText = QString error text from kio
+ * error = int kio error code, errText = TQString error text from kio
* The sub-url is the URL that we were trying to open.
*/
- KURL newURL(QString("error:/?error=%1&errText=%2")
+ KURL newURL(TQString("error:/?error=%1&errText=%2")
.arg( error ).arg( KURL::encode_string(errorText) ), 106 );
- m_strURL.setPass( QString::null ); // don't put the password in the error URL
+ m_strURL.setPass( TQString::null ); // don't put the password in the error URL
KURL::List lst;
lst << newURL << m_strURL;
@@ -496,13 +496,13 @@ void BrowserRun::slotCopyToTempFileResult(KIO::Job *job)
m_timer.start( 0, true );
}
-bool BrowserRun::isTextExecutable( const QString &serviceType )
+bool BrowserRun::isTextExecutable( const TQString &serviceType )
{
return ( serviceType == "application/x-desktop" ||
serviceType == "application/x-shellscript" );
}
-bool BrowserRun::isExecutable( const QString &serviceType )
+bool BrowserRun::isExecutable( const TQString &serviceType )
{
return KRun::isExecutable( serviceType );
}
@@ -512,7 +512,7 @@ bool BrowserRun::hideErrorDialog() const
return d->m_bHideErrorDialog;
}
-QString BrowserRun::contentDisposition() const {
+TQString BrowserRun::contentDisposition() const {
return d->contentDisposition;
}
diff --git a/kparts/browserrun.h b/kparts/browserrun.h
index 228eb96a0..79a7386c6 100644
--- a/kparts/browserrun.h
+++ b/kparts/browserrun.h
@@ -53,7 +53,7 @@ namespace KParts {
* Always pass false for @p trustedSource, except for local directory views.
*/
BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget *window,
+ KParts::ReadOnlyPart *part, TQWidget *window,
bool removeReferrer, bool trustedSource );
// BIC: merge with above constructor
@@ -69,7 +69,7 @@ namespace KParts {
*
*/
BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget *window,
+ KParts::ReadOnlyPart *part, TQWidget *window,
bool removeReferrer, bool trustedSource, bool hideErrorDialog );
virtual ~BrowserRun();
@@ -90,15 +90,15 @@ namespace KParts {
/**
* @return Suggested filename given by the server (e.g. HTTP content-disposition filename)
*/
- QString suggestedFilename() const { return m_suggestedFilename; }
+ TQString suggestedFilename() const { return m_suggestedFilename; }
/**
* @return Suggested disposition by the server (e.g. HTTP content-disposition)
* @since 3.5.2
*/
- QString contentDisposition() const;
+ TQString contentDisposition() const;
- bool serverSuggestsSave() const { return contentDisposition() == QString::fromLatin1("attachment"); }
+ bool serverSuggestsSave() const { return contentDisposition() == TQString::fromLatin1("attachment"); }
enum AskSaveResult { Save, Open, Cancel };
/**
@@ -109,7 +109,7 @@ namespace KParts {
* @param suggestedFilename optional filename suggested by the server
* @return Save, Open or Cancel.
*/
- static AskSaveResult askSave( const KURL & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFilename = QString::null );
+ static AskSaveResult askSave( const KURL & url, KService::Ptr offer, const TQString& mimeType, const TQString & suggestedFilename = TQString::null );
enum AskEmbedOrSaveFlags { InlineDisposition = 0, AttachmentDisposition = 1 };
/**
@@ -121,23 +121,23 @@ namespace KParts {
* @param flags set to AttachmentDisposition if suggested by the server
* @return Save, Open or Cancel.
*/
- static AskSaveResult askEmbedOrSave( const KURL & url, const QString& mimeType, const QString & suggestedFilename = QString::null, int flags = 0 );
+ static AskSaveResult askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename = TQString::null, int flags = 0 );
// virtual so that KHTML can implement differently (HTML cache)
- virtual void save( const KURL & url, const QString & suggestedFilename );
+ virtual void save( const KURL & url, const TQString & suggestedFilename );
// static so that it can be called from other classes
- static void simpleSave( const KURL & url, const QString & suggestedFilename,
- QWidget* window );
+ static void simpleSave( const KURL & url, const TQString & suggestedFilename,
+ TQWidget* window );
/** BIC: Combine with the above function for KDE 4.0. */
- static void simpleSave( const KURL & url, const QString & suggestedFilename );
+ static void simpleSave( const KURL & url, const TQString & suggestedFilename );
- static bool allowExecution( const QString &serviceType, const KURL &url );
+ static bool allowExecution( const TQString &serviceType, const KURL &url );
- /** BIC: Obsoleted by KRun::isExecutable( const QString &serviceType ); */
- static bool isExecutable( const QString &serviceType );
- static bool isTextExecutable( const QString &serviceType );
+ /** BIC: Obsoleted by KRun::isExecutable( const TQString &serviceType ); */
+ static bool isExecutable( const TQString &serviceType );
+ static bool isTextExecutable( const TQString &serviceType );
protected:
/**
@@ -166,26 +166,26 @@ namespace KParts {
/**
* Helper for foundMimeType: call this if the mimetype couldn't be embedded
*/
- NonEmbeddableResult handleNonEmbeddable( const QString& mimeType );
+ NonEmbeddableResult handleNonEmbeddable( const TQString& mimeType );
protected slots:
void slotBrowserScanFinished(KIO::Job *job);
- void slotBrowserMimetype(KIO::Job *job, const QString &type);
+ void slotBrowserMimetype(KIO::Job *job, const TQString &type);
void slotCopyToTempFileResult(KIO::Job *job);
virtual void slotStatResult( KIO::Job *job );
protected:
KParts::URLArgs m_args;
KParts::ReadOnlyPart *m_part; // QGuardedPtr?
- QGuardedPtr<QWidget> m_window;
+ TQGuardedPtr<TQWidget> m_window;
// Suggested filename given by the server (e.g. HTTP content-disposition)
// When set, we should really be saving instead of embedding
- QString m_suggestedFilename;
- QString m_sMimeType;
+ TQString m_suggestedFilename;
+ TQString m_sMimeType;
bool m_bRemoveReferrer;
bool m_bTrustedSource;
private:
- void redirectToError( int error, const QString& errorText );
+ void redirectToError( int error, const TQString& errorText );
class BrowserRunPrivate;
BrowserRunPrivate* d;
diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h
index 01616d89f..7e9de4280 100644
--- a/kparts/componentfactory.h
+++ b/kparts/componentfactory.h
@@ -4,7 +4,7 @@
#include <kparts/factory.h>
#include <kparts/part.h>
#include <ktrader.h>
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
namespace KParts
{
@@ -50,19 +50,19 @@ namespace KParts
* \endcode
*
* @param factory The factory to ask for the creation of the component
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @return A pointer to the newly created object or a null pointer if the
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromFactory( KLibFactory *factory, QObject *parent = 0,
+ static T *createInstanceFromFactory( KLibFactory *factory, TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList() )
+ const TQStringList &args = TQStringList() )
{
- QObject *object = factory->create( parent, name,
+ TQObject *object = factory->create( parent, name,
T::staticMetaObject()->className(),
args );
@@ -84,8 +84,8 @@ namespace KParts
* @param factory The factory to ask for the creation of the component
* @param parentWidget the parent widget for the part
* @param widgetName the name of the part's widget
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @return A pointer to the newly created object or a null pointer if the
@@ -93,11 +93,11 @@ namespace KParts
*/
template <class T>
static T *createPartInstanceFromFactory( KParts::Factory *factory,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList() )
+ const TQStringList &args = TQStringList() )
{
KParts::Part *object = factory->createPart( parentWidget, widgetName,
parent, name,
@@ -115,8 +115,8 @@ namespace KParts
* factory to create an instance of the given template type.
*
* @param libraryName The library to open
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @param error
@@ -124,9 +124,9 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromLibrary( const char *libraryName, QObject *parent = 0,
+ static T *createInstanceFromLibrary( const char *libraryName, TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
@@ -156,11 +156,11 @@ namespace KParts
template <class T>
static T *createPartInstanceFromLibrary( const char *libraryName,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
@@ -199,12 +199,12 @@ namespace KParts
template <class T>
static T *createInstanceFromService( const KService::Ptr &service,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- QString library = service->library();
+ TQString library = service->library();
if ( library.isEmpty() )
{
if ( error )
@@ -218,14 +218,14 @@ namespace KParts
template <class T>
static T *createPartInstanceFromService( const KService::Ptr &service,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- QString library = service->library();
+ TQString library = service->library();
if ( library.isEmpty() )
{
if ( error )
@@ -239,9 +239,9 @@ namespace KParts
template <class T, class ServiceIterator>
static T *createInstanceFromServices( ServiceIterator begin, ServiceIterator end,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
for (; begin != end; ++begin )
@@ -267,11 +267,11 @@ namespace KParts
template <class T, class ServiceIterator>
static T *createPartInstanceFromServices( ServiceIterator begin,
ServiceIterator end,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
for (; begin != end; ++begin )
@@ -300,7 +300,7 @@ namespace KParts
*
* Example:
* \code
- * KMyAppPlugin* plugin = KParts::ComponentFactory::createInstanceFromQuery<KMyAppPlugin>( serviceType, QString::null, parentObject );
+ * KMyAppPlugin* plugin = KParts::ComponentFactory::createInstanceFromQuery<KMyAppPlugin>( serviceType, TQString::null, parentObject );
* if ( plugin ) {
* ....
* }
@@ -318,11 +318,11 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromQuery( const QString &serviceType,
- const QString &constraint = QString::null,
- QObject *parent = 0,
+ static T *createInstanceFromQuery( const TQString &serviceType,
+ const TQString &constraint = TQString::null,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KTrader::OfferList offers = KTrader::self()->query( serviceType, constraint );
@@ -344,12 +344,12 @@ namespace KParts
* You can use this method to create a generic viewer - that can display any
* kind of file, provided that there is a ReadOnlyPart installed for it - in 5 lines:
* \code
- * // Given the following: KURL url, QWidget* parentWidget and QObject* parentObject.
- * QString mimetype = KMimeType::findByURL( url )->name();
- * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, parentWidget, 0, parentObject, 0 );
+ * // Given the following: KURL url, TQWidget* parentWidget and TQObject* parentObject.
+ * TQString mimetype = KMimeType::findByURL( url )->name();
+ * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, parentWidget, 0, parentObject, 0 );
* if ( part ) {
* part->openURL( url );
- * part->widget()->show(); // also insert the widget into a layout, or simply use a QVBox as parentWidget
+ * part->widget()->show(); // also insert the widget into a layout, or simply use a TQVBox as parentWidget
* }
* \endcode
*
@@ -367,16 +367,16 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createPartInstanceFromQuery( const QString &serviceType,
- const QString &constraint,
- QWidget *parentWidget = 0,
+ static T *createPartInstanceFromQuery( const TQString &serviceType,
+ const TQString &constraint,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- KTrader::OfferList offers = KTrader::self()->query( serviceType, QString::fromLatin1("KParts/ReadOnlyPart"), constraint, QString::null );
+ KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null );
if ( offers.isEmpty() )
{
if ( error )
diff --git a/kparts/dockmainwindow.cpp b/kparts/dockmainwindow.cpp
index 07455ee72..b5370e2c0 100644
--- a/kparts/dockmainwindow.cpp
+++ b/kparts/dockmainwindow.cpp
@@ -28,7 +28,7 @@
#include <kinstance.h>
#include <khelpmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kxmlguifactory.h>
@@ -52,13 +52,13 @@ public:
{
}
- QGuardedPtr<Part> m_activePart;
+ TQGuardedPtr<Part> m_activePart;
bool m_bShellGUIActivated;
KHelpMenu *m_helpMenu;
};
}
-DockMainWindow::DockMainWindow( QWidget* parent, const char *name, WFlags f )
+DockMainWindow::DockMainWindow( TQWidget* parent, const char *name, WFlags f )
: KDockMainWindow( parent, name, f )
{
d = new DockMainWindowPrivate();
@@ -72,27 +72,27 @@ DockMainWindow::~DockMainWindow()
void DockMainWindow::createGUI( Part * part )
{
- kdDebug(1000) << QString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
+ kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
KXMLGUIFactory *factory = guiFactory();
setUpdatesEnabled( false );
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
if ( d->m_activePart )
{
- kdDebug(1000) << QString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
+ kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
factory->removeClient( d->m_activePart );
- disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
}
if ( !d->m_bShellGUIActivated )
@@ -105,15 +105,15 @@ void DockMainWindow::createGUI( Part * part )
if ( part )
{
// do this before sending the activate event
- connect( part, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
factory->addClient( part );
GUIActivateEvent ev( true );
- QApplication::sendEvent( part, &ev );
+ TQApplication::sendEvent( part, &ev );
}
@@ -122,7 +122,7 @@ void DockMainWindow::createGUI( Part * part )
d->m_activePart = part;
}
-void DockMainWindow::slotSetStatusBarText( const QString & text )
+void DockMainWindow::slotSetStatusBarText( const TQString & text )
{
statusBar()->message( text );
}
@@ -137,18 +137,18 @@ void DockMainWindow::createShellGUI( bool create )
if ( isHelpMenuEnabled() )
d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() );
- QString f = xmlFile();
+ TQString f = xmlFile();
setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) );
if ( !f.isEmpty() )
setXMLFile( f, true );
else
{
- QString auto_file( instance()->instanceName() + "ui.rc" );
+ TQString auto_file( instance()->instanceName() + "ui.rc" );
setXMLFile( auto_file, true );
}
GUIActivateEvent ev( true );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->addClient( this );
@@ -156,7 +156,7 @@ void DockMainWindow::createShellGUI( bool create )
else
{
GUIActivateEvent ev( false );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->removeClient( this );
}
diff --git a/kparts/dockmainwindow.h b/kparts/dockmainwindow.h
index d048b31e9..f35678145 100644
--- a/kparts/dockmainwindow.h
+++ b/kparts/dockmainwindow.h
@@ -21,7 +21,7 @@
#ifndef __DOCKMAINWINDOW_H
#define __DOCKMAINWINDOW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kdockwidget.h>
@@ -51,7 +51,7 @@ class KPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public Part
/**
* Constructor, same signature as KDockMainWindow.
*/
- DockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WDestructiveClose );
+ DockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WDestructiveClose );
/**
* Destructor.
*/
@@ -74,7 +74,7 @@ protected slots:
* Reimplement if your dock-mainwindow has a complex statusbar
* (with several items)
*/
- virtual void slotSetStatusBarText( const QString & );
+ virtual void slotSetStatusBarText( const TQString & );
protected:
virtual void createShellGUI( bool create = true );
diff --git a/kparts/event.cpp b/kparts/event.cpp
index 3f783aad1..4f0efd617 100644
--- a/kparts/event.cpp
+++ b/kparts/event.cpp
@@ -25,7 +25,7 @@ using namespace KParts;
#define KPARTS_EVENT_MAGIC 42
Event::Event( const char *eventName )
- : QCustomEvent( (QEvent::Type)(QEvent::User + KPARTS_EVENT_MAGIC), (void *)eventName )
+ : TQCustomEvent( (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC), (void *)eventName )
{
}
@@ -37,20 +37,20 @@ const char *Event::eventName() const
return (const char *)data();
}
-bool Event::test( const QEvent *event )
+bool Event::test( const TQEvent *event )
{
if ( !event )
return false;
- return ( event->type() == (QEvent::Type)(QEvent::User + KPARTS_EVENT_MAGIC ) );
+ return ( event->type() == (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC ) );
}
-bool Event::test( const QEvent *event, const char *name )
+bool Event::test( const TQEvent *event, const char *name )
{
if ( !test( event ) )
return false;
- return ( strcmp( name, (const char *)((QCustomEvent *)event)->data() ) == 0 );
+ return ( strcmp( name, (const char *)((TQCustomEvent *)event)->data() ) == 0 );
}
const char *GUIActivateEvent::s_strGUIActivateEvent = "KParts/GUIActivate";
diff --git a/kparts/event.h b/kparts/event.h
index 27c1aaf6f..d64dbe974 100644
--- a/kparts/event.h
+++ b/kparts/event.h
@@ -20,7 +20,7 @@
#ifndef __kparts_event_h__
#define __kparts_event_h__
-#include <qevent.h>
+#include <tqevent.h>
#include <kdelibs_export.h>
@@ -40,8 +40,8 @@ public:
virtual const char *eventName() const;
- static bool test( const QEvent *event );
- static bool test( const QEvent *event, const char *name );
+ static bool test( const TQEvent *event );
+ static bool test( const TQEvent *event, const char *name );
};
/**
@@ -58,7 +58,7 @@ public:
bool activated() const { return m_bActivated; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
private:
static const char *s_strGUIActivateEvent;
@@ -76,20 +76,20 @@ private:
class KPARTS_EXPORT PartActivateEvent : public Event
{
public:
- PartActivateEvent( bool activated, Part *part, QWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
+ PartActivateEvent( bool activated, Part *part, TQWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
bool activated() const { return m_bActivated; }
Part *part() const { return m_part; }
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
private:
static const char *s_strPartActivateEvent;
bool m_bActivated;
Part *m_part;
- QWidget *m_widget;
+ TQWidget *m_widget;
};
/**
@@ -99,20 +99,20 @@ private:
class KPARTS_EXPORT PartSelectEvent : public Event
{
public:
- PartSelectEvent( bool selected, Part *part, QWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
+ PartSelectEvent( bool selected, Part *part, TQWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
bool selected() const { return m_bSelected; }
Part *part() const { return m_part; }
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
private:
static const char *s_strPartSelectEvent;
bool m_bSelected;
Part *m_part;
- QWidget *m_widget;
+ TQWidget *m_widget;
};
} // namespace
diff --git a/kparts/factory.cpp b/kparts/factory.cpp
index ec99e35bc..9be2f4f92 100644
--- a/kparts/factory.cpp
+++ b/kparts/factory.cpp
@@ -21,7 +21,7 @@
#include "factory.h"
#include "part.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klocale.h>
#include <kglobal.h>
@@ -30,7 +30,7 @@
using namespace KParts;
-Factory::Factory( QObject *parent, const char *name )
+Factory::Factory( TQObject *parent, const char *name )
: KLibFactory( parent, name )
{
}
@@ -39,7 +39,7 @@ Factory::~Factory()
{
}
-Part *Factory::createPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *classname, const QStringList &args )
+Part *Factory::createPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
Part* part = createPartObject( parentWidget, widgetName, parent, name, classname, args );
if ( part )
@@ -55,7 +55,7 @@ const KInstance *Factory::partInstance()
return params.instance;
}
-const KInstance *Factory::partInstanceFromLibrary( const QCString &libraryName )
+const KInstance *Factory::partInstanceFromLibrary( const TQCString &libraryName )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
if ( !library )
@@ -69,14 +69,14 @@ const KInstance *Factory::partInstanceFromLibrary( const QCString &libraryName )
return pfactory->partInstance();
}
-Part *Factory::createPartObject( QWidget *, const char *, QObject *, const char *, const char *, const QStringList & )
+Part *Factory::createPartObject( TQWidget *, const char *, TQObject *, const char *, const char *, const TQStringList & )
{
return 0;
}
-QObject *Factory::createObject( QObject *parent, const char *name, const char *classname, const QStringList &args )
+TQObject *Factory::createObject( TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
assert( !parent || parent->isWidgetType() );
- return createPart( static_cast<QWidget *>( parent ), name, parent, name, classname, args );
+ return createPart( static_cast<TQWidget *>( parent ), name, parent, name, classname, args );
}
#include "factory.moc"
diff --git a/kparts/factory.h b/kparts/factory.h
index 808ad8851..18fb4d41a 100644
--- a/kparts/factory.h
+++ b/kparts/factory.h
@@ -41,13 +41,13 @@ class KPARTS_EXPORT Factory : public KLibFactory
{
Q_OBJECT
public:
- Factory( QObject *parent = 0, const char *name = 0 );
+ Factory( TQObject *parent = 0, const char *name = 0 );
virtual ~Factory();
/**
* Creates a part.
*
- * The QStringList can be used to pass additional arguments to the part.
+ * The TQStringList can be used to pass additional arguments to the part.
* If the part needs additional arguments, it should take them as
* name="value" pairs. This is the way additional arguments will get passed
* to the part from eg. khtml. You can for example embed the part into HTML
@@ -61,7 +61,7 @@ public:
* This could result in a call to
* \code
* createPart( parentWidget, name, parentObject, parentName, "KParts::Part",
- * QStringList("name1="value1"", "name2="value2") );
+ * TQStringList("name1="value1"", "name2="value2") );
* \endcode
*
* @returns the newly created part.
@@ -71,7 +71,7 @@ public:
* important for reference counting, and allows unloading the
* library automatically once all its objects have been destroyed.
*/
- Part *createPart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() );
+ Part *createPart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() );
/**
* If you have a part contained in a shared library you might want to query
@@ -88,14 +88,14 @@ public:
*
* @param libraryName name of the library to query the instance from
*/
- static const KInstance *partInstanceFromLibrary( const QCString &libraryName );
+ static const KInstance *partInstanceFromLibrary( const TQCString &libraryName );
protected:
/**
* Reimplement this method in your implementation to create the Part.
*
- * The QStringList can be used to pass additional arguments to the part.
+ * The TQStringList can be used to pass additional arguments to the part.
* If the part needs additional arguments, it should take them as
* name="value" pairs. This is the way additional arguments will get passed
* to the part from eg. khtml. You can for example emebed the part into HTML
@@ -109,17 +109,17 @@ protected:
* This could result in a call to
* \code
* createPart( parentWidget, name, parentObject, parentName, "Kparts::Part",
- * QStringList("name1="value1"", "name2="value2") );
+ * TQStringList("name1="value1"", "name2="value2") );
* \endcode
*
* @returns the newly created part.
*/
- virtual Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() ) = 0;
+ virtual Part *createPartObject( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() ) = 0;
/**
* Reimplemented from KLibFactory. Calls createPart()
*/
- virtual QObject *createObject( QObject *parent = 0, const char *name = 0, const char *classname = "QObject", const QStringList &args = QStringList() );
+ virtual TQObject *createObject( TQObject *parent = 0, const char *name = 0, const char *classname = "TQObject", const TQStringList &args = TQStringList() );
/** This 'enum' along with the structure below is NOT part of the public API.
* It's going to disappear in KDE 4.0 and is likely to change inbetween.
diff --git a/kparts/genericfactory.h b/kparts/genericfactory.h
index 324edfb18..950214ee5 100644
--- a/kparts/genericfactory.h
+++ b/kparts/genericfactory.h
@@ -66,7 +66,7 @@ namespace KParts
*
* The template argument has to inherit from KParts::Part and has to implement two methods:
* 1) There needs to be a public constructor with the following signature:
- * MyPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList& args )
+ * MyPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList& args )
*
* 2) It needs to provide one static method to create a KAboutData object per
* request, holding information about the component's name, its authors, license, etc.
@@ -97,10 +97,10 @@ namespace KParts
public:
GenericFactory() { }
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args )
+ const TQStringList &args )
{
T *part = KDEPrivate::ConcreteFactory<T>::create( parentWidget,
widgetName,
@@ -125,12 +125,12 @@ namespace KParts
public:
GenericFactory() { }
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args )
+ const TQStringList &args )
{
- QObject *object = KDEPrivate::MultiFactory< KTypeList<T1, T2> >::create( parentWidget,
+ TQObject *object = KDEPrivate::MultiFactory< KTypeList<T1, T2> >::create( parentWidget,
widgetName,
parent, name,
className,
diff --git a/kparts/historyprovider.cpp b/kparts/historyprovider.cpp
index d55a96b66..416a109f6 100644
--- a/kparts/historyprovider.cpp
+++ b/kparts/historyprovider.cpp
@@ -17,14 +17,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
+#include <tqdict.h>
#include <kapplication.h>
#include "historyprovider.h"
using namespace KParts;
-template class QDict<void>;
+template class TQDict<void>;
HistoryProvider * HistoryProvider::s_self = 0L;
@@ -34,7 +34,7 @@ public:
HistoryProviderPrivate()
: dict( 1009 ) {}
- QDict<void> dict;
+ TQDict<void> dict;
};
HistoryProvider * HistoryProvider::self()
@@ -44,8 +44,8 @@ HistoryProvider * HistoryProvider::self()
return s_self;
}
-HistoryProvider::HistoryProvider( QObject *parent, const char *name )
- : QObject( parent, name )
+HistoryProvider::HistoryProvider( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
if ( !s_self )
s_self = this;
@@ -61,19 +61,19 @@ HistoryProvider::~HistoryProvider()
s_self = 0;
}
-bool HistoryProvider::contains( const QString& item ) const
+bool HistoryProvider::contains( const TQString& item ) const
{
return (bool) d->dict.find( item );
}
-void HistoryProvider::insert( const QString& item )
+void HistoryProvider::insert( const TQString& item )
{
// no need to allocate memory, we only want to have fast lookup, no mapping
d->dict.replace( item, (void*) 1 );
emit inserted( item );
}
-void HistoryProvider::remove( const QString& item )
+void HistoryProvider::remove( const TQString& item )
{
(void) d->dict.remove( item );
}
diff --git a/kparts/historyprovider.h b/kparts/historyprovider.h
index de0b4bf2b..40bf36aa7 100644
--- a/kparts/historyprovider.h
+++ b/kparts/historyprovider.h
@@ -20,8 +20,8 @@
#ifndef KHISTORYPROVIDER_H
#define KHISTORYPROVIDER_H
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -48,7 +48,7 @@ public:
/**
* Creates a KHistoryProvider with an optional parent and name
*/
- HistoryProvider( QObject *parent = 0L, const char *name = 0 );
+ HistoryProvider( TQObject *parent = 0L, const char *name = 0 );
/**
* Destroys the provider.
@@ -58,17 +58,17 @@ public:
/**
* @returns true if @p item is present in the history.
*/
- virtual bool contains( const QString& item ) const;
+ virtual bool contains( const TQString& item ) const;
/**
* Inserts @p item into the history.
*/
- virtual void insert( const QString& item );
+ virtual void insert( const TQString& item );
/**
* Removes @p item from the history.
*/
- virtual void remove( const QString& item );
+ virtual void remove( const TQString& item );
/**
* Clears the history. The cleared() signal is emitted after clearing.
@@ -87,12 +87,12 @@ signals:
* history has changed. Put those items that were added or removed from the
* history into @p items.
*/
- void updated( const QStringList& items );
+ void updated( const TQStringList& items );
/**
* Emitted after the item has been inserted
*/
- void inserted( const QString& item );
+ void inserted( const TQString& item );
private:
static HistoryProvider *s_self;
diff --git a/kparts/mainwindow.cpp b/kparts/mainwindow.cpp
index 234188a73..ee286fd15 100644
--- a/kparts/mainwindow.cpp
+++ b/kparts/mainwindow.cpp
@@ -26,7 +26,7 @@
#include <kstatusbar.h>
#include <khelpmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kxmlguifactory.h>
#include <kaccel.h>
@@ -51,13 +51,13 @@ public:
{
}
- QGuardedPtr<Part> m_activePart;
+ TQGuardedPtr<Part> m_activePart;
bool m_bShellGUIActivated;
KHelpMenu *m_helpMenu;
};
}
-MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f )
: KMainWindow( parent, name, f )
{
d = new MainWindowPrivate();
@@ -71,7 +71,7 @@ MainWindow::MainWindow( const char *name, WFlags f )
PartBase::setPartObject( this );
}
-MainWindow::MainWindow( int cflags, QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( int cflags, TQWidget* parent, const char *name, WFlags f )
: KMainWindow( cflags, parent, name, f )
{
d = new MainWindowPrivate();
@@ -95,7 +95,7 @@ void MainWindow::createGUI( Part * part )
setUpdatesEnabled( false );
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
if ( d->m_activePart )
{
@@ -103,14 +103,14 @@ void MainWindow::createGUI( Part * part )
<< " " << d->m_activePart->name() << endl;
GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
factory->removeClient( d->m_activePart );
- disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
}
if ( !d->m_bShellGUIActivated )
@@ -123,15 +123,15 @@ void MainWindow::createGUI( Part * part )
if ( part )
{
// do this before sending the activate event
- connect( part, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
factory->addClient( part );
GUIActivateEvent ev( true );
- QApplication::sendEvent( part, &ev );
+ TQApplication::sendEvent( part, &ev );
if ( autoSaveSettings() )
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
@@ -142,7 +142,7 @@ void MainWindow::createGUI( Part * part )
d->m_activePart = part;
}
-void MainWindow::slotSetStatusBarText( const QString & text )
+void MainWindow::slotSetStatusBarText( const TQString & text )
{
statusBar()->message( text );
}
@@ -157,25 +157,25 @@ void MainWindow::createShellGUI( bool create )
if ( isHelpMenuEnabled() && !d->m_helpMenu )
d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() );
- QString f = xmlFile();
+ TQString f = xmlFile();
setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) );
if ( !f.isEmpty() )
setXMLFile( f, true );
else
{
- QString auto_file( instance()->instanceName() + "ui.rc" );
+ TQString auto_file( instance()->instanceName() + "ui.rc" );
setXMLFile( auto_file, true );
}
GUIActivateEvent ev( true );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->addClient( this );
}
else
{
GUIActivateEvent ev( false );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->removeClient( this );
}
diff --git a/kparts/mainwindow.h b/kparts/mainwindow.h
index e0848563a..aeb3e2793 100644
--- a/kparts/mainwindow.h
+++ b/kparts/mainwindow.h
@@ -20,7 +20,7 @@
#ifndef __MAINWINDOW_H
#define __MAINWINDOW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kmainwindow.h>
@@ -51,7 +51,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase
/**
* Constructor, same signature as KMainWindow.
*/
- MainWindow( QWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Compatibility Constructor
*/
@@ -60,7 +60,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase
* Constructor with creation flags, see KMainWindow.
* @since 3.2
*/
- MainWindow( int cflags, QWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( int cflags, TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructor.
*/
@@ -85,7 +85,7 @@ protected slots:
* Reimplement if your mainwindow has a complex statusbar
* (with several items)
*/
- virtual void slotSetStatusBarText( const QString & );
+ virtual void slotSetStatusBarText( const TQString & );
/**
* Rebuilds the GUI after KEditToolbar changed the toolbar layout.
diff --git a/kparts/part.cpp b/kparts/part.cpp
index 35e320ae6..fcd426abf 100644
--- a/kparts/part.cpp
+++ b/kparts/part.cpp
@@ -24,13 +24,13 @@
#include <kparts/mainwindow.h>
#include <kparts/partmanager.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kinstance.h>
#include <klocale.h>
@@ -46,7 +46,7 @@
#include <assert.h>
#include <kdebug.h>
-template class QPtrList<KXMLGUIClient>;
+template class TQPtrList<KXMLGUIClient>;
using namespace KParts;
@@ -92,12 +92,12 @@ PartBase::~PartBase()
delete d;
}
-void PartBase::setPartObject( QObject *obj )
+void PartBase::setPartObject( TQObject *obj )
{
m_obj = obj;
}
-QObject *PartBase::partObject() const
+TQObject *PartBase::partObject() const
{
return m_obj;
}
@@ -114,12 +114,12 @@ void PartBase::setInstance( KInstance *inst, bool bLoadPlugins )
// install 'instancename'data resource type
KGlobal::dirs()->addResourceType( inst->instanceName() + "data",
KStandardDirs::kde_default( "data" )
- + QString::fromLatin1( inst->instanceName() ) + '/' );
+ + TQString::fromLatin1( inst->instanceName() ) + '/' );
if ( bLoadPlugins )
loadPlugins( m_obj, this, instance() );
}
-void PartBase::loadPlugins( QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance )
+void PartBase::loadPlugins( TQObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance )
{
if( d->m_pluginLoadingMode != DoNotLoadPlugins )
Plugin::loadPlugins( parent, parentGUIClient, instance, d->m_pluginLoadingMode == LoadPlugins );
@@ -130,8 +130,8 @@ void PartBase::setPluginLoadingMode( PluginLoadingMode loadingMode )
d->m_pluginLoadingMode = loadingMode;
}
-Part::Part( QObject *parent, const char* name )
- : QObject( parent, name )
+Part::Part( TQObject *parent, const char* name )
+ : TQObject( parent, name )
{
d = new PartPrivate;
m_widget = 0L;
@@ -146,8 +146,8 @@ Part::~Part()
if ( m_widget )
{
// We need to disconnect first, to avoid calling it !
- disconnect( m_widget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
+ disconnect( m_widget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
}
if ( m_manager )
@@ -156,19 +156,19 @@ Part::~Part()
if ( m_widget )
{
kdDebug(1000) << "deleting widget " << m_widget << " " << m_widget->name() << endl;
- delete (QWidget*) m_widget;
+ delete (TQWidget*) m_widget;
}
delete d;
}
-void Part::embed( QWidget * parentWidget )
+void Part::embed( TQWidget * parentWidget )
{
if ( widget() )
- widget()->reparent( parentWidget, 0, QPoint( 0, 0 ), true );
+ widget()->reparent( parentWidget, 0, TQPoint( 0, 0 ), true );
}
-QWidget *Part::widget()
+TQWidget *Part::widget()
{
return m_widget;
}
@@ -183,20 +183,20 @@ PartManager *Part::manager() const
return m_manager;
}
-Part *Part::hitTest( QWidget *widget, const QPoint & )
+Part *Part::hitTest( TQWidget *widget, const TQPoint & )
{
- if ( (QWidget *)m_widget != widget )
+ if ( (TQWidget *)m_widget != widget )
return 0L;
return this;
}
-void Part::setWidget( QWidget *widget )
+void Part::setWidget( TQWidget *widget )
{
assert ( !m_widget ); // otherwise we get two connects
m_widget = widget;
- connect( m_widget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
+ connect( m_widget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
// Tell the actionCollection() which widget its
// action shortcuts should be connected to.
@@ -218,7 +218,7 @@ bool Part::isSelectable() const
return d->m_bSelectable;
}
-void Part::customEvent( QCustomEvent *event )
+void Part::customEvent( TQCustomEvent *event )
{
if ( PartActivateEvent::test( event ) )
{
@@ -238,7 +238,7 @@ void Part::customEvent( QCustomEvent *event )
return;
}
- QObject::customEvent( event );
+ TQObject::customEvent( event );
}
void Part::partActivateEvent( PartActivateEvent * )
@@ -253,7 +253,7 @@ void Part::guiActivateEvent( GUIActivateEvent * )
{
}
-QWidget *Part::hostContainer( const QString &containerName )
+TQWidget *Part::hostContainer( const TQString &containerName )
{
if ( !factory() )
return 0L;
@@ -292,7 +292,7 @@ public:
KIO::FileCopyJob * m_job;
KIO::FileCopyJob * m_uploadJob;
KURL m_originalURL; // for saveAs
- QString m_originalFilePath; // for saveAs
+ TQString m_originalFilePath; // for saveAs
bool m_showProgressInfo : 1;
bool m_saveOk : 1;
bool m_waitForSave : 1;
@@ -301,7 +301,7 @@ public:
}
-ReadOnlyPart::ReadOnlyPart( QObject *parent, const char *name )
+ReadOnlyPart::ReadOnlyPart( TQObject *parent, const char *name )
: Part( parent, name ), m_bTemp( false )
{
d = new ReadOnlyPartPrivate;
@@ -353,13 +353,13 @@ bool ReadOnlyPart::openURL( const KURL &url )
{
m_bTemp = true;
// Use same extension as remote file. This is important for mimetype-determination (e.g. koffice)
- QString fileName = url.fileName();
- QFileInfo fileInfo(fileName);
- QString ext = fileInfo.extension();
- QString extension;
+ TQString fileName = url.fileName();
+ TQFileInfo fileInfo(fileName);
+ TQString ext = fileInfo.extension();
+ TQString extension;
if ( !ext.isEmpty() && url.query().isNull() ) // not if the URL has a query, e.g. cgi.pl?something
extension = "."+ext; // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
m_file = tempFile.name();
KURL destURL;
@@ -367,7 +367,7 @@ bool ReadOnlyPart::openURL( const KURL &url )
d->m_job = KIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo );
d->m_job->setWindow( widget() ? widget()->topLevelWidget() : 0 );
emit started( d->m_job );
- connect( d->m_job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
return true;
}
}
@@ -388,7 +388,7 @@ bool ReadOnlyPart::closeURL()
if ( m_bTemp )
{
- unlink( QFile::encodeName(m_file) );
+ unlink( TQFile::encodeName(m_file) );
m_bTemp = false;
}
// It always succeeds for a read-only part,
@@ -424,7 +424,7 @@ void ReadOnlyPart::guiActivateEvent( GUIActivateEvent * event )
}
}
-bool ReadOnlyPart::openStream( const QString& mimeType, const KURL& url )
+bool ReadOnlyPart::openStream( const TQString& mimeType, const KURL& url )
{
if ( !closeURL() )
return false;
@@ -432,7 +432,7 @@ bool ReadOnlyPart::openStream( const QString& mimeType, const KURL& url )
return doOpenStream( mimeType );
}
-bool ReadOnlyPart::writeStream( const QByteArray& data )
+bool ReadOnlyPart::writeStream( const TQByteArray& data )
{
return doWriteStream( data );
}
@@ -444,7 +444,7 @@ bool ReadOnlyPart::closeStream()
//////////////////////////////////////////////////
-ReadWritePart::ReadWritePart( QObject *parent, const char *name )
+ReadWritePart::ReadWritePart( TQObject *parent, const char *name )
: ReadOnlyPart( parent, name ), m_bModified( false ), m_bClosing( false )
{
m_bReadWrite = true;
@@ -485,7 +485,7 @@ bool ReadWritePart::queryClose()
if ( !isReadWrite() || !isModified() )
return true;
- QString docName = url().fileName();
+ TQString docName = url().fileName();
if (docName.isEmpty()) docName = i18n( "Untitled" );
int res = KMessageBox::warningYesNoCancel( widget(),
@@ -547,7 +547,7 @@ bool ReadWritePart::save()
if( saveFile() )
return saveToURL();
else
- emit canceled(QString::null);
+ emit canceled(TQString::null);
return false;
}
@@ -572,7 +572,7 @@ bool ReadWritePart::saveAs( const KURL & kurl )
m_file = d->m_originalFilePath;
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
}
return result;
@@ -586,7 +586,7 @@ void ReadWritePart::prepareSaving()
{
if ( m_bTemp ) // get rid of a possible temp file first
{ // (happens if previous url was remote)
- unlink( QFile::encodeName(m_file) );
+ unlink( TQFile::encodeName(m_file) );
m_bTemp = false;
}
m_file = m_url.path();
@@ -615,31 +615,31 @@ bool ReadWritePart::saveToURL()
d->m_saveOk = true;
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
return true; // Nothing to do
}
else
{
if (d->m_uploadJob)
{
- unlink(QFile::encodeName(d->m_uploadJob->srcURL().path()));
+ unlink(TQFile::encodeName(d->m_uploadJob->srcURL().path()));
d->m_uploadJob->kill();
d->m_uploadJob = 0;
}
KTempFile tempFile;
- QString uploadFile = tempFile.name();
+ TQString uploadFile = tempFile.name();
KURL uploadUrl;
uploadUrl.setPath( uploadFile );
tempFile.unlink();
// Create hardlink
- if (::link(QFile::encodeName(m_file), QFile::encodeName(uploadFile)) != 0)
+ if (::link(TQFile::encodeName(m_file), TQFile::encodeName(uploadFile)) != 0)
{
// Uh oh, some error happened.
return false;
}
d->m_uploadJob = KIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ );
d->m_uploadJob->setWindow( widget() ? widget()->topLevelWidget() : 0 );
- connect( d->m_uploadJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotUploadFinished (KIO::Job *) ) );
+ connect( d->m_uploadJob, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (KIO::Job *) ) );
return true;
}
}
@@ -648,8 +648,8 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
{
if (d->m_uploadJob->error())
{
- unlink(QFile::encodeName(d->m_uploadJob->srcURL().path()));
- QString error = d->m_uploadJob->errorString();
+ unlink(TQFile::encodeName(d->m_uploadJob->srcURL().path()));
+ TQString error = d->m_uploadJob->errorString();
d->m_uploadJob = 0;
if (d->m_duringSaveAs) {
m_url = d->m_originalURL;
@@ -671,7 +671,7 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
}
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
if (d->m_waitForSave)
{
qApp->exit_loop();
@@ -679,8 +679,8 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
}
// Trolls: Nothing to see here, please step away.
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
bool ReadWritePart::waitSaveComplete()
{
@@ -689,8 +689,8 @@ bool ReadWritePart::waitSaveComplete()
d->m_waitForSave = true;
- 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);
qApp->enter_loop();
qt_leave_modal(&dummy);
diff --git a/kparts/part.h b/kparts/part.h
index 100d486da..36e2ca241 100644
--- a/kparts/part.h
+++ b/kparts/part.h
@@ -20,9 +20,9 @@
#ifndef _KPART_H
#define _KPART_H
-#include <qstring.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include <kurl.h>
#include <kxmlguiclient.h>
@@ -74,8 +74,8 @@ public:
*
* @internal
*/
- void setPartObject( QObject *object );
- QObject *partObject() const;
+ void setPartObject( TQObject *object );
+ TQObject *partObject() const;
protected:
/**
@@ -129,8 +129,8 @@ protected:
* \code
* if( factory() )
* {
- * QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
- * QPtrListIterator<KParts::Plugin> it( plugins );
+ * TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
+ * TQPtrListIterator<KParts::Plugin> it( plugins );
* KParts::Plugin * plugin;
* while( ( plugin = it.current() ) != 0 )
* {
@@ -140,7 +140,7 @@ protected:
* }
* \endcode
*/
- void loadPlugins( QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance );
+ void loadPlugins( TQObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance );
/**
* For a KParts::Part: call this before setInstance().
@@ -150,7 +150,7 @@ protected:
private:
PartBasePrivate *d;
- QObject *m_obj;
+ TQObject *m_obj;
};
/**
@@ -163,9 +163,9 @@ private:
*
* <b>About the widget:</b>\n
*
- * Note that KParts::Part does not inherit QWidget.
+ * Note that KParts::Part does not inherit TQWidget.
* This is due to the fact that the "visual representation"
- * will probably not be a mere QWidget, but an elaborate one.
+ * will probably not be a mere TQWidget, but an elaborate one.
* That's why when implementing your KParts::Part (or derived)
* you should call KParts::Part::setWidget() in your constructor.
*
@@ -178,7 +178,7 @@ private:
* framework for a "viewer" part and for an "editor"-like part.
* Use Part directly only if your part doesn't fit into those.
*/
-class KPARTS_EXPORT Part : public QObject, public PartBase
+class KPARTS_EXPORT Part : public TQObject, public PartBase
{
Q_OBJECT
@@ -190,7 +190,7 @@ public:
* @param parent Parent object of the part.
* @param name QT-internal name of the part.
*/
- Part( QObject *parent = 0, const char* name = 0 );
+ Part( TQObject *parent = 0, const char* name = 0 );
/**
* Destructor.
@@ -201,19 +201,19 @@ public:
* Embed this part into a host widget.
*
* You don't need to do this if you created the widget with the
- * correct parent widget - this is just a QWidget::reparent().
+ * correct parent widget - this is just a TQWidget::reparent().
* Note that the Part is still the holder
- * of the QWidget, meaning that if you delete the Part,
+ * of the TQWidget, meaning that if you delete the Part,
* then the widget gets destroyed as well, and vice-versa.
* This method is not recommended since creating the widget with the correct
* parent is simpler anyway.
*/
- virtual void embed( QWidget * parentWidget );
+ virtual void embed( TQWidget * parentWidget );
/**
* @return The widget defined by this part, set by setWidget().
*/
- virtual QWidget *widget();
+ virtual TQWidget *widget();
/**
* @internal
@@ -234,7 +234,7 @@ public:
* @param widget the part widget being clicked - usually the same as widget(), except in koffice.
* @param globalPos the mouse coordinates in global coordinates
*/
- virtual Part *hitTest( QWidget *widget, const QPoint &globalPos );
+ virtual Part *hitTest( TQWidget *widget, const TQPoint &globalPos );
/**
* @param selectable Indicates whether the part is selectable or not.
@@ -251,12 +251,12 @@ signals:
* Emitted by the part, to set the caption of the window(s)
* hosting this part
*/
- void setWindowCaption( const QString & caption );
+ void setWindowCaption( const TQString & caption );
/**
* Emited by the part, to set a text in the statusbar of the window(s)
* hosting this part
*/
- void setStatusBarText( const QString & text );
+ void setStatusBarText( const TQString & text );
protected:
@@ -265,12 +265,12 @@ protected:
*
* Call this in the Part-inherited class constructor.
*/
- virtual void setWidget( QWidget * widget );
+ virtual void setWidget( TQWidget * widget );
/**
* @internal
*/
- virtual void customEvent( QCustomEvent *event );
+ virtual void customEvent( TQCustomEvent *event );
/**
* Convenience method which is called when the Part received a PartActivateEvent .
@@ -299,13 +299,13 @@ protected:
* Convenience method for KXMLGUIFactory::container.
* @return a container widget owned by the Part's GUI.
*/
- QWidget *hostContainer( const QString &containerName );
+ TQWidget *hostContainer( const TQString &containerName );
private slots:
void slotWidgetDestroyed();
private:
- QGuardedPtr<QWidget> m_widget;
+ TQGuardedPtr<TQWidget> m_widget;
PartManager * m_manager;
@@ -344,7 +344,7 @@ public:
* Constructor
* See also Part for the setXXX methods to call.
*/
- ReadOnlyPart( QObject *parent = 0, const char *name = 0 );
+ ReadOnlyPart( TQObject *parent = 0, const char *name = 0 );
/**
* Destructor
@@ -410,7 +410,7 @@ public:
* every ReadOnlyPart has a URL (see url()), so this simply sets it.
* @return true if the part supports progressive loading and accepts data, false otherwise.
*/
- bool openStream( const QString& mimeType, const KURL& url );
+ bool openStream( const TQString& mimeType, const KURL& url );
/**
* Send some data to the part. openStream must have been called previously,
@@ -418,7 +418,7 @@ public:
* @return true if the data was accepted by the part. If false is returned,
* the application should stop sending data, and doesn't have to call closeStream.
*/
- bool writeStream( const QByteArray& data );
+ bool writeStream( const TQByteArray& data );
/**
* Terminate the sending of data to the part.
@@ -434,14 +434,14 @@ private: // Makes no sense for inherited classes to call those. But make it prot
* Parts which implement progress loading should check the @p mimeType
* parameter, and return true if they can accept a data stream of that type.
*/
- virtual bool doOpenStream( const QString& /*mimeType*/ ) { return false; }
+ virtual bool doOpenStream( const TQString& /*mimeType*/ ) { return false; }
/**
* Receive some data from the hosting application.
* In this method the part should attempt to display the data progressively.
* With some data types (text, html...) closeStream might never actually be called,
* in the case of continuous streams. This can't happen with e.g. images.
*/
- virtual bool doWriteStream( const QByteArray& /*data*/ ) { return false; }
+ virtual bool doWriteStream( const TQByteArray& /*data*/ ) { return false; }
/**
* This is called by closeStream(), to indicate that all the data has been sent.
* Parts should ensure that all of the data is displayed at this point.
@@ -479,7 +479,7 @@ signals:
* Emit this if loading is canceled by the user or by an error.
* @param errMsg the error message, empty if the user canceled the loading voluntarily.
*/
- void canceled( const QString &errMsg );
+ void canceled( const TQString &errMsg );
protected slots:
void slotJobFinished( KIO::Job * job );
@@ -516,7 +516,7 @@ protected:
/**
* Local file - the only one the part implementation should deal with.
*/
- QString m_file;
+ TQString m_file;
/**
* If @p true, @p m_file is a temporary file that needs to be deleted later.
*/
@@ -549,7 +549,7 @@ public:
* Constructor.
* See parent constructor for instructions.
*/
- ReadWritePart( QObject *parent = 0, const char *name = 0 );
+ ReadWritePart( TQObject *parent = 0, const char *name = 0 );
/**
* Destructor.
* Applications using a ReadWritePart should make sure, before
diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp
index 2925b601e..57d2073b5 100644
--- a/kparts/partmanager.cpp
+++ b/kparts/partmanager.cpp
@@ -25,13 +25,13 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//#define DEBUG_PARTMANAGER
using namespace KParts;
-template class QPtrList<Part>;
+template class TQPtrList<Part>;
namespace KParts {
@@ -52,11 +52,11 @@ public:
~PartManagerPrivate()
{
}
- void setReason( QEvent* ev ) {
+ void setReason( TQEvent* ev ) {
switch( ev->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick: {
- QMouseEvent* mev = static_cast<QMouseEvent *>( ev );
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick: {
+ TQMouseEvent* mev = static_cast<TQMouseEvent *>( ev );
m_reason = mev->button() == Qt::LeftButton
? PartManager::ReasonLeftClick
: ( mev->button() == Qt::MidButton
@@ -64,8 +64,8 @@ public:
: PartManager::ReasonRightClick );
break;
}
- case QEvent::FocusIn:
- m_reason = static_cast<QFocusEvent *>( ev )->reason();
+ case TQEvent::FocusIn:
+ m_reason = static_cast<TQFocusEvent *>( ev )->reason();
break;
default:
kdWarning(1000) << "PartManagerPrivate::setReason got unexpected ev type " << ev->type() << endl;
@@ -74,16 +74,16 @@ public:
}
Part * m_activePart;
- QWidget *m_activeWidget;
+ TQWidget *m_activeWidget;
- QPtrList<Part> m_parts;
+ TQPtrList<Part> m_parts;
PartManager::SelectionPolicy m_policy;
Part *m_selectedPart;
- QWidget *m_selectedWidget;
+ TQWidget *m_selectedWidget;
- QPtrList<QWidget> m_managedTopLevelWidgets;
+ TQPtrList<TQWidget> m_managedTopLevelWidgets;
short int m_activationButtonMask;
bool m_bIgnoreScrollBars;
bool m_bAllowNestedParts;
@@ -92,8 +92,8 @@ public:
}
-PartManager::PartManager( QWidget * parent, const char * name )
- : QObject( parent, name )
+PartManager::PartManager( TQWidget * parent, const char * name )
+ : TQObject( parent, name )
{
d = new PartManagerPrivate;
@@ -104,8 +104,8 @@ PartManager::PartManager( QWidget * parent, const char * name )
addManagedTopLevelWidget( parent );
}
-PartManager::PartManager( QWidget *topLevel, QObject *parent, const char *name )
- : QObject( parent, name )
+PartManager::PartManager( TQWidget *topLevel, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
d = new PartManagerPrivate;
@@ -118,12 +118,12 @@ PartManager::PartManager( QWidget *topLevel, QObject *parent, const char *name )
PartManager::~PartManager()
{
- for ( QPtrListIterator<QWidget> it( d->m_managedTopLevelWidgets );
+ for ( TQPtrListIterator<TQWidget> it( d->m_managedTopLevelWidgets );
it.current(); ++it )
- disconnect( it.current(), SIGNAL( destroyed() ),
- this, SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ disconnect( it.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
- for ( QPtrListIterator<Part> it( d->m_parts ); it.current(); ++it )
+ for ( TQPtrListIterator<Part> it( d->m_parts ); it.current(); ++it )
{
it.current()->setManager( 0 );
}
@@ -173,27 +173,27 @@ short int PartManager::activationButtonMask() const
return d->m_activationButtonMask;
}
-bool PartManager::eventFilter( QObject *obj, QEvent *ev )
+bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
{
- if ( ev->type() != QEvent::MouseButtonPress &&
- ev->type() != QEvent::MouseButtonDblClick &&
- ev->type() != QEvent::FocusIn )
+ if ( ev->type() != TQEvent::MouseButtonPress &&
+ ev->type() != TQEvent::MouseButtonDblClick &&
+ ev->type() != TQEvent::FocusIn )
return false;
if ( !obj->isWidgetType() )
return false;
- QWidget *w = static_cast<QWidget *>( obj );
+ TQWidget *w = static_cast<TQWidget *>( obj );
if ( ( w->testWFlags( WType_Dialog ) && w->isModal() ) ||
w->testWFlags( WType_Popup ) || w->testWFlags( WStyle_Tool ) )
return false;
- QMouseEvent* mev = 0L;
- if ( ev->type() == QEvent::MouseButtonPress || ev->type() == QEvent::MouseButtonDblClick )
+ TQMouseEvent* mev = 0L;
+ if ( ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick )
{
- mev = static_cast<QMouseEvent *>( ev );
+ mev = static_cast<TQMouseEvent *>( ev );
#ifdef DEBUG_PARTMANAGER
kdDebug(1000) << "PartManager::eventFilter button: " << mev->button() << " " << "d->m_activationButtonMask=" << d->m_activationButtonMask << endl;
#endif
@@ -204,12 +204,12 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
Part * part;
while ( w )
{
- QPoint pos;
+ TQPoint pos;
if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) )
return false;
- if ( d->m_bIgnoreScrollBars && w->inherits( "QScrollBar" ) )
+ if ( d->m_bIgnoreScrollBars && w->inherits( "TQScrollBar" ) )
return false;
if ( mev ) // mouse press or mouse double-click event
@@ -220,15 +220,15 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
part = findPartFromWidget( w );
#ifdef DEBUG_PARTMANAGER
- QCString evType = ( ev->type() == QEvent::MouseButtonPress ) ? "MouseButtonPress"
- : ( ev->type() == QEvent::MouseButtonDblClick ) ? "MouseButtonDblClick"
- : ( ev->type() == QEvent::FocusIn ) ? "FocusIn" : "OTHER! ERROR!";
+ TQCString evType = ( ev->type() == TQEvent::MouseButtonPress ) ? "MouseButtonPress"
+ : ( ev->type() == TQEvent::MouseButtonDblClick ) ? "MouseButtonDblClick"
+ : ( ev->type() == TQEvent::FocusIn ) ? "FocusIn" : "OTHER! ERROR!";
#endif
if ( part ) // We found a part whose widget is w
{
if ( d->m_policy == PartManager::TriState )
{
- if ( ev->type() == QEvent::MouseButtonDblClick )
+ if ( ev->type() == TQEvent::MouseButtonDblClick )
{
if ( part == d->m_activePart && w == d->m_activeWidget )
return false;
@@ -294,7 +294,7 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
w->testWFlags( WType_Popup ) || w->testWFlags( WStyle_Tool ) ) )
{
#ifdef DEBUG_PARTMANAGER
- kdDebug(1000) << QString("No part made active although %1/%2 got event - loop aborted").arg(obj->name()).arg(obj->className()) << endl;
+ kdDebug(1000) << TQString("No part made active although %1/%2 got event - loop aborted").arg(obj->name()).arg(obj->className()) << endl;
#endif
return false;
}
@@ -302,14 +302,14 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
}
#ifdef DEBUG_PARTMANAGER
- kdDebug(1000) << QString("No part made active although %1/%2 got event").arg(obj->name()).arg(obj->className()) << endl;
+ kdDebug(1000) << TQString("No part made active although %1/%2 got event").arg(obj->name()).arg(obj->className()) << endl;
#endif
return false;
}
-Part * PartManager::findPartFromWidget( QWidget * widget, const QPoint &pos )
+Part * PartManager::findPartFromWidget( TQWidget * widget, const TQPoint &pos )
{
- QPtrListIterator<Part> it ( d->m_parts );
+ TQPtrListIterator<Part> it ( d->m_parts );
for ( ; it.current() ; ++it )
{
Part *part = it.current()->hitTest( widget, pos );
@@ -319,9 +319,9 @@ Part * PartManager::findPartFromWidget( QWidget * widget, const QPoint &pos )
return 0L;
}
-Part * PartManager::findPartFromWidget( QWidget * widget )
+Part * PartManager::findPartFromWidget( TQWidget * widget )
{
- QPtrListIterator<Part> it ( d->m_parts );
+ TQPtrListIterator<Part> it ( d->m_parts );
for ( ; it.current() ; ++it )
{
if ( widget == it.current()->widget() )
@@ -352,11 +352,11 @@ void PartManager::addPart( Part *part, bool setActive )
}
// Prevent focus problems
- if ( part->widget() && part->widget()->focusPolicy() == QWidget::NoFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::NoFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
- if ( part->widget() && part->widget()->focusPolicy() == QWidget::TabFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::TabFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of TabFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
@@ -370,12 +370,12 @@ void PartManager::removePart( Part *part )
{
if ( d->m_parts.findRef( part ) == -1 )
{
- kdFatal(1000) << QString("Can't remove part %1, not in KPartManager's list.").arg(part->name()) << endl;
+ kdFatal(1000) << TQString("Can't remove part %1, not in KPartManager's list.").arg(part->name()) << endl;
return;
}
//Warning. The part could be already deleted
- //kdDebug(1000) << QString("Part %1 removed").arg(part->name()) << endl;
+ //kdDebug(1000) << TQString("Part %1 removed").arg(part->name()) << endl;
int nb = d->m_parts.count();
bool ok = d->m_parts.removeRef( part );
Q_ASSERT( ok );
@@ -396,7 +396,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive )
// This methods does exactly removePart + addPart but without calling setActivePart(0) in between
if ( d->m_parts.findRef( oldPart ) == -1 )
{
- kdFatal(1000) << QString("Can't remove part %1, not in KPartManager's list.").arg(oldPart->name()) << endl;
+ kdFatal(1000) << TQString("Can't remove part %1, not in KPartManager's list.").arg(oldPart->name()) << endl;
return;
}
@@ -408,7 +408,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive )
addPart( newPart, setActive );
}
-void PartManager::setActivePart( Part *part, QWidget *widget )
+void PartManager::setActivePart( Part *part, TQWidget *widget )
{
if ( part && d->m_parts.findRef( part ) == -1 )
{
@@ -420,7 +420,7 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
//tree recursively (Simon)
if ( part && !d->m_bAllowNestedParts )
{
- QObject *parentPart = part->parent(); // ### this relies on people using KParts::Factory!
+ TQObject *parentPart = part->parent(); // ### this relies on people using KParts::Factory!
if ( parentPart && parentPart->inherits( "KParts::Part" ) )
{
KParts::Part *parPart = static_cast<KParts::Part *>( parentPart );
@@ -440,7 +440,7 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
return;
KParts::Part *oldActivePart = d->m_activePart;
- QWidget *oldActiveWidget = d->m_activeWidget;
+ TQWidget *oldActiveWidget = d->m_activeWidget;
setSelectedPart( 0L );
@@ -450,15 +450,15 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
if ( oldActivePart )
{
KParts::Part *savedActivePart = part;
- QWidget *savedActiveWidget = widget;
+ TQWidget *savedActiveWidget = widget;
PartActivateEvent ev( false, oldActivePart, oldActiveWidget );
- QApplication::sendEvent( oldActivePart, &ev );
+ TQApplication::sendEvent( oldActivePart, &ev );
if ( oldActiveWidget )
{
- disconnect( oldActiveWidget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
- QApplication::sendEvent( oldActiveWidget, &ev );
+ disconnect( oldActiveWidget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
+ TQApplication::sendEvent( oldActiveWidget, &ev );
}
d->m_activePart = savedActivePart;
@@ -471,12 +471,12 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
d->m_activeWidget = part->widget();
PartActivateEvent ev( true, d->m_activePart, d->m_activeWidget );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
if ( d->m_activeWidget )
{
- connect( d->m_activeWidget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
- QApplication::sendEvent( d->m_activeWidget, &ev );
+ connect( d->m_activeWidget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
+ TQApplication::sendEvent( d->m_activeWidget, &ev );
}
}
// Set the new active instance in KGlobal
@@ -497,18 +497,18 @@ Part *PartManager::activePart() const
return d->m_activePart;
}
-QWidget *PartManager::activeWidget() const
+TQWidget *PartManager::activeWidget() const
{
return d->m_activeWidget;
}
-void PartManager::setSelectedPart( Part *part, QWidget *widget )
+void PartManager::setSelectedPart( Part *part, TQWidget *widget )
{
if ( part == d->m_selectedPart && widget == d->m_selectedWidget )
return;
Part *oldPart = d->m_selectedPart;
- QWidget *oldWidget = d->m_selectedWidget;
+ TQWidget *oldWidget = d->m_selectedWidget;
d->m_selectedPart = part;
d->m_selectedWidget = widget;
@@ -519,15 +519,15 @@ void PartManager::setSelectedPart( Part *part, QWidget *widget )
if ( oldPart )
{
PartSelectEvent ev( false, oldPart, oldWidget );
- QApplication::sendEvent( oldPart, &ev );
- QApplication::sendEvent( oldWidget, &ev );
+ TQApplication::sendEvent( oldPart, &ev );
+ TQApplication::sendEvent( oldWidget, &ev );
}
if ( d->m_selectedPart )
{
PartSelectEvent ev( true, d->m_selectedPart, d->m_selectedWidget );
- QApplication::sendEvent( d->m_selectedPart, &ev );
- QApplication::sendEvent( d->m_selectedWidget, &ev );
+ TQApplication::sendEvent( d->m_selectedPart, &ev );
+ TQApplication::sendEvent( d->m_selectedWidget, &ev );
}
}
@@ -536,7 +536,7 @@ Part *PartManager::selectedPart() const
return d->m_selectedPart;
}
-QWidget *PartManager::selectedWidget() const
+TQWidget *PartManager::selectedWidget() const
{
return d->m_selectedWidget;
}
@@ -550,17 +550,17 @@ void PartManager::slotObjectDestroyed()
void PartManager::slotWidgetDestroyed()
{
kdDebug(1000) << "KPartsManager::slotWidgetDestroyed()" << endl;
- if ( static_cast<const QWidget *>( sender() ) == d->m_activeWidget )
+ if ( static_cast<const TQWidget *>( sender() ) == d->m_activeWidget )
setActivePart( 0L ); //do not remove the part because if the part's widget dies, then the
//part will delete itself anyway, invoking removePart() in its destructor
}
-const QPtrList<Part> *PartManager::parts() const
+const TQPtrList<Part> *PartManager::parts() const
{
return &d->m_parts;
}
-void PartManager::addManagedTopLevelWidget( const QWidget *topLevel )
+void PartManager::addManagedTopLevelWidget( const TQWidget *topLevel )
{
if ( !topLevel->isTopLevel() )
return;
@@ -569,11 +569,11 @@ void PartManager::addManagedTopLevelWidget( const QWidget *topLevel )
return;
d->m_managedTopLevelWidgets.append( topLevel );
- connect( topLevel, SIGNAL( destroyed() ),
- this, SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ connect( topLevel, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
}
-void PartManager::removeManagedTopLevelWidget( const QWidget *topLevel )
+void PartManager::removeManagedTopLevelWidget( const TQWidget *topLevel )
{
if ( !topLevel->isTopLevel() )
return;
@@ -586,7 +586,7 @@ void PartManager::removeManagedTopLevelWidget( const QWidget *topLevel )
void PartManager::slotManagedTopLevelWidgetDestroyed()
{
- const QWidget *widget = static_cast<const QWidget *>( sender() );
+ const TQWidget *widget = static_cast<const TQWidget *>( sender() );
removeManagedTopLevelWidget( widget );
}
diff --git a/kparts/partmanager.h b/kparts/partmanager.h
index 95e70895c..a9b150a67 100644
--- a/kparts/partmanager.h
+++ b/kparts/partmanager.h
@@ -21,9 +21,9 @@
#ifndef __kpartmanager_h__
#define __kpartmanager_h__
-#include <qobject.h>
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -59,7 +59,7 @@ public:
enum SelectionPolicy { Direct, TriState };
/**
- * This extends QFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part.
+ * This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part.
* To test for "any focusin reason", use < ReasonLeftClick.
* NoReason usually means: explicit activation with @ref setActivePart.
* @since 3.3
@@ -74,17 +74,17 @@ public:
* events
* @param name The object's name, if any.
*/
- PartManager( QWidget * parent, const char * name = 0L );
+ PartManager( TQWidget * parent, const char * name = 0L );
/**
* Constructs a part manager.
*
* @param topLevel The toplevel widget (window / dialog ) the
* partmanager should monitor for activation/selection
* events
- * @param parent The parent QObject.
+ * @param parent The parent TQObject.
* @param name The object's name, if any.
*/
- PartManager( QWidget * topLevel, QObject *parent, const char *name = 0 );
+ PartManager( TQWidget * topLevel, TQObject *parent, const char *name = 0 );
virtual ~PartManager();
/**
@@ -142,7 +142,7 @@ public:
/**
* @internal
*/
- virtual bool eventFilter( QObject *obj, QEvent *ev );
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev );
/**
* Adds a part to the manager.
@@ -175,7 +175,7 @@ public:
* @p widget can be used to specify which widget was responsible for the activation.
* This is important if you have multiple views for a document/part, like in KOffice.
*/
- virtual void setActivePart( Part *part, QWidget *widget = 0L );
+ virtual void setActivePart( Part *part, TQWidget *widget = 0L );
/**
* Returns the active part.
@@ -185,7 +185,7 @@ public:
/**
* Returns the active widget of the current active part (see activePart()).
*/
- virtual QWidget *activeWidget() const;
+ virtual TQWidget *activeWidget() const;
/**
* Sets the selected part.
@@ -195,7 +195,7 @@ public:
* @p widget can be used to specify which widget was responsible for the selection.
* This is important if you have multiple views for a document/part, like in KOffice.
*/
- virtual void setSelectedPart( Part *part, QWidget *widget = 0L );
+ virtual void setSelectedPart( Part *part, TQWidget *widget = 0L );
/**
* Returns the current selected part.
@@ -205,12 +205,12 @@ public:
/**
* Returns the selected widget of the current selected part (see selectedPart()).
*/
- virtual QWidget *selectedWidget() const;
+ virtual TQWidget *selectedWidget() const;
/**
* Returns the list of parts being managed by the partmanager.
*/
- const QPtrList<Part> *parts() const;
+ const TQPtrList<Part> *parts() const;
/**
* Adds the @p topLevel widget to the list of managed toplevel widgets.
@@ -219,12 +219,12 @@ public:
* constructor. Sometimes however (like for example when using the KDE dockwidget
* library), it is necessary to extend this.
*/
- void addManagedTopLevelWidget( const QWidget *topLevel );
+ void addManagedTopLevelWidget( const TQWidget *topLevel );
/**
* Removes the @p topLevel widget from the list of managed toplevel widgets.
* @see addManagedTopLevelWidget
*/
- void removeManagedTopLevelWidget( const QWidget *topLevel );
+ void removeManagedTopLevelWidget( const TQWidget *topLevel );
/**
* @return the reason for the last activePartChanged signal emitted.
@@ -274,8 +274,8 @@ protected slots:
*/
void slotManagedTopLevelWidgetDestroyed();
private:
- Part * findPartFromWidget( QWidget * widget, const QPoint &pos );
- Part * findPartFromWidget( QWidget * widget );
+ Part * findPartFromWidget( TQWidget * widget, const TQPoint &pos );
+ Part * findPartFromWidget( TQWidget * widget );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp
index f0764fd0f..c9b0d2e36 100644
--- a/kparts/plugin.cpp
+++ b/kparts/plugin.cpp
@@ -25,9 +25,9 @@
#include <assert.h>
-#include <qfile.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
#include <klibloader.h>
#include <kinstance.h>
@@ -46,11 +46,11 @@ public:
PluginPrivate() : m_parentInstance( 0 ) {}
const KInstance *m_parentInstance;
- QString m_library; // filename of the library
+ TQString m_library; // filename of the library
};
-Plugin::Plugin( QObject* parent, const char* name )
- : QObject( parent, name )
+Plugin::Plugin( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
//kdDebug() << className() << endl;
d = new PluginPrivate();
@@ -61,65 +61,65 @@ Plugin::~Plugin()
delete d;
}
-QString Plugin::xmlFile() const
+TQString Plugin::xmlFile() const
{
- QString path = KXMLGUIClient::xmlFile();
+ TQString path = KXMLGUIClient::xmlFile();
if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) )
return path;
- QString absPath = locate( "data", QString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
+ TQString absPath = locate( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
assert( !absPath.isEmpty() );
return absPath;
}
-QString Plugin::localXMLFile() const
+TQString Plugin::localXMLFile() const
{
- QString path = KXMLGUIClient::xmlFile();
+ TQString path = KXMLGUIClient::xmlFile();
if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) )
return path;
- QString absPath = locateLocal( "data", QString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
+ TQString absPath = locateLocal( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
assert( !absPath.isEmpty() );
return absPath;
}
//static
-QValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
+TQValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
{
if ( !instance )
kdError(1000) << "No instance ???" << endl;
- QValueList<PluginInfo> plugins;
+ TQValueList<PluginInfo> plugins;
// KDE4: change * into *.rc and remove test for .desktop from the for loop below.
- const QStringList pluginDocs = instance->dirs()->findAllResources(
+ const TQStringList pluginDocs = instance->dirs()->findAllResources(
"data", instance->instanceName()+"/kpartplugins/*", true, false );
- QMap<QString,QStringList> sortedPlugins;
+ TQMap<TQString,TQStringList> sortedPlugins;
- QStringList::ConstIterator pIt = pluginDocs.begin();
- QStringList::ConstIterator pEnd = pluginDocs.end();
+ TQStringList::ConstIterator pIt = pluginDocs.begin();
+ TQStringList::ConstIterator pEnd = pluginDocs.end();
for (; pIt != pEnd; ++pIt )
{
- QFileInfo fInfo( *pIt );
- if ( fInfo.extension() == QString::fromLatin1( "desktop" ) )
+ TQFileInfo fInfo( *pIt );
+ if ( fInfo.extension() == TQString::fromLatin1( "desktop" ) )
continue;
- QMap<QString,QStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() );
+ TQMap<TQString,TQStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() );
if ( mapIt == sortedPlugins.end() )
- mapIt = sortedPlugins.insert( fInfo.fileName(), QStringList() );
+ mapIt = sortedPlugins.insert( fInfo.fileName(), TQStringList() );
mapIt.data().append( *pIt );
}
- QMap<QString,QStringList>::ConstIterator mapIt = sortedPlugins.begin();
- QMap<QString,QStringList>::ConstIterator mapEnd = sortedPlugins.end();
+ TQMap<TQString,TQStringList>::ConstIterator mapIt = sortedPlugins.begin();
+ TQMap<TQString,TQStringList>::ConstIterator mapEnd = sortedPlugins.end();
for (; mapIt != mapEnd; ++mapIt )
{
PluginInfo info;
- QString doc;
+ TQString doc;
info.m_absXMLFileName = KXMLGUIClient::findMostRecentXMLFile( mapIt.data(), doc );
if ( info.m_absXMLFileName.isEmpty() )
continue;
@@ -138,23 +138,23 @@ QValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
return plugins;
}
-void Plugin::loadPlugins( QObject *parent, const KInstance *instance )
+void Plugin::loadPlugins( TQObject *parent, const KInstance *instance )
{
loadPlugins( parent, pluginInfos( instance ), instance );
}
-void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos, const KInstance *instance )
+void Plugin::loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos, const KInstance *instance )
{
- QValueList<PluginInfo>::ConstIterator pIt = pluginInfos.begin();
- QValueList<PluginInfo>::ConstIterator pEnd = pluginInfos.end();
+ TQValueList<PluginInfo>::ConstIterator pIt = pluginInfos.begin();
+ TQValueList<PluginInfo>::ConstIterator pEnd = pluginInfos.end();
for (; pIt != pEnd; ++pIt )
{
- QString library = (*pIt).m_document.documentElement().attribute( "library" );
+ TQString library = (*pIt).m_document.documentElement().attribute( "library" );
if ( library.isEmpty() || hasPlugin( parent, library ) )
continue;
- Plugin *plugin = loadPlugin( parent, QFile::encodeName(library) );
+ Plugin *plugin = loadPlugin( parent, TQFile::encodeName(library) );
if ( plugin )
{
@@ -167,13 +167,13 @@ void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginI
}
-void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos )
+void Plugin::loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos )
{
loadPlugins(parent, pluginInfos, 0);
}
// static
-Plugin* Plugin::loadPlugin( QObject * parent, const char* libname )
+Plugin* Plugin::loadPlugin( TQObject * parent, const char* libname )
{
Plugin* plugin = ComponentFactory::createInstanceFromLibrary<Plugin>( libname, parent, libname );
if ( !plugin )
@@ -182,16 +182,16 @@ Plugin* Plugin::loadPlugin( QObject * parent, const char* libname )
return plugin;
}
-QPtrList<KParts::Plugin> Plugin::pluginObjects( QObject *parent )
+TQPtrList<KParts::Plugin> Plugin::pluginObjects( TQObject *parent )
{
- QPtrList<KParts::Plugin> objects;
+ TQPtrList<KParts::Plugin> objects;
if (!parent )
return objects;
- QObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *plugins );
+ TQObjectListIt it( *plugins );
for ( ; it.current() ; ++it )
{
objects.append( static_cast<Plugin *>( it.current() ) );
@@ -202,10 +202,10 @@ QPtrList<KParts::Plugin> Plugin::pluginObjects( QObject *parent )
return objects;
}
-bool Plugin::hasPlugin( QObject* parent, const QString& library )
+bool Plugin::hasPlugin( TQObject* parent, const TQString& library )
{
- QObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *plugins );
+ TQObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectListIt it( *plugins );
for ( ; it.current() ; ++it )
{
if ( static_cast<Plugin *>( it.current() )->d->m_library == library )
@@ -224,22 +224,22 @@ void Plugin::setInstance( KInstance *instance )
KXMLGUIClient::setInstance( instance );
}
-void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault )
+void Plugin::loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault )
{
KConfigGroup cfgGroup( instance->config(), "KParts Plugins" );
- QValueList<PluginInfo> plugins = pluginInfos( instance );
- QValueList<PluginInfo>::ConstIterator pIt = plugins.begin();
- QValueList<PluginInfo>::ConstIterator pEnd = plugins.end();
+ TQValueList<PluginInfo> plugins = pluginInfos( instance );
+ TQValueList<PluginInfo>::ConstIterator pIt = plugins.begin();
+ TQValueList<PluginInfo>::ConstIterator pEnd = plugins.end();
for (; pIt != pEnd; ++pIt )
{
- QDomElement docElem = (*pIt).m_document.documentElement();
- QString library = docElem.attribute( "library" );
+ TQDomElement docElem = (*pIt).m_document.documentElement();
+ TQString library = docElem.attribute( "library" );
if ( library.isEmpty() )
continue;
// Check configuration
- const QString name = docElem.attribute( "name" );
+ const TQString name = docElem.attribute( "name" );
bool pluginEnabled = enableNewPluginsByDefault;
if ( cfgGroup.hasKey( name + "Enabled" ) )
@@ -248,11 +248,11 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
}
else
{ // no user-setting, load plugin default setting
- QString relPath = QString( instance->instanceName() ) + "/" + (*pIt).m_relXMLFileName;
+ TQString relPath = TQString( instance->instanceName() ) + "/" + (*pIt).m_relXMLFileName;
relPath.truncate( relPath.findRev( '.' ) ); // remove extension
relPath += ".desktop";
//kdDebug(1000) << "looking for " << relPath << endl;
- const QString desktopfile = instance->dirs()->findResource( "data", relPath );
+ const TQString desktopfile = instance->dirs()->findResource( "data", relPath );
if( !desktopfile.isEmpty() )
{
//kdDebug(1000) << "loadPlugins found desktop file for " << name << ": " << desktopfile << endl;
@@ -268,8 +268,8 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
}
// search through already present plugins
- QObjectList *pluginList = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *pluginList );
+ TQObjectList *pluginList = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectListIt it( *pluginList );
bool pluginFound = false;
for ( ; it.current() ; ++it )
{
@@ -298,7 +298,7 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
continue;
kdDebug( 1000 ) << "load plugin " << name << endl;
- Plugin *plugin = loadPlugin( parent, QFile::encodeName(library) );
+ Plugin *plugin = loadPlugin( parent, TQFile::encodeName(library) );
if ( plugin )
{
diff --git a/kparts/plugin.h b/kparts/plugin.h
index 4ede5768d..829687c6e 100644
--- a/kparts/plugin.h
+++ b/kparts/plugin.h
@@ -20,7 +20,7 @@
#ifndef PLUGIN_H
#define PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include <kxmlguiclient.h>
@@ -46,7 +46,7 @@ namespace KParts
* You should also install a "plugin info" .desktop file with the same name.
* \see PluginInfo
*/
-class KPARTS_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
+class KPARTS_EXPORT Plugin : public TQObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
@@ -55,15 +55,15 @@ public:
*/
struct PluginInfo
{
- QString m_relXMLFileName; ///< relative filename, i.e. kpartplugins/name
- QString m_absXMLFileName; ///< full path of most recent filename matching the relative filename
- QDomDocument m_document;
+ TQString m_relXMLFileName; ///< relative filename, i.e. kpartplugins/name
+ TQString m_absXMLFileName; ///< full path of most recent filename matching the relative filename
+ TQDomDocument m_document;
};
/**
* Construct a new KParts plugin.
*/
- Plugin( QObject* parent = 0, const char* name = 0 );
+ Plugin( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor.
*/
@@ -72,12 +72,12 @@ public:
/**
* Reimplemented for internal reasons
*/
- virtual QString xmlFile() const;
+ virtual TQString xmlFile() const;
/**
* Reimplemented for internal reasons
*/
- virtual QString localXMLFile() const;
+ virtual TQString localXMLFile() const;
/**
* Load the plugin libraries from the directories appropriate
@@ -86,7 +86,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const KInstance * instance );
+ static void loadPlugins( TQObject *parent, const KInstance * instance );
/**
* Load the plugin libraries specified by the list @p docs and make the
@@ -95,7 +95,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos );
+ static void loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos );
/**
* Load the plugin libraries specified by the list @p pluginInfos, make the
@@ -104,7 +104,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos, const KInstance * instance );
+ static void loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos, const KInstance * instance );
/**
* Load the plugin libraries for the given @p instance, make the
@@ -129,8 +129,8 @@ public:
* \code
* if( factory() )
* {
- * QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
- * QPtrListIterator<KParts::Plugin> it( plugins );
+ * TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
+ * TQPtrListIterator<KParts::Plugin> it( plugins );
* KParts::Plugin * plugin;
* while( ( plugin = it.current() ) != 0 )
* {
@@ -140,34 +140,34 @@ public:
* }
* \endcode
*/
- static void loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault = true );
+ static void loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault = true );
/**
* Returns a list of plugin objects loaded for @p parent. This
* functions basically calls the queryList method of
- * QObject to retrieve the list of child objects inheriting
+ * TQObject to retrieve the list of child objects inheriting
* KParts::Plugin .
**/
- static QPtrList<Plugin> pluginObjects( QObject *parent );
+ static TQPtrList<Plugin> pluginObjects( TQObject *parent );
protected:
/**
* Look for plugins in the @p instance's "data" directory (+"/kpartplugins")
*
- * @return A list of QDomDocument s, containing the parsed xml documents returned by plugins.
+ * @return A list of TQDomDocument s, containing the parsed xml documents returned by plugins.
*/
- static QValueList<Plugin::PluginInfo> pluginInfos( const KInstance * instance );
+ static TQValueList<Plugin::PluginInfo> pluginInfos( const KInstance * instance );
/**
* @internal
* @return The plugin created from the library @p libname
*/
- static Plugin* loadPlugin( QObject * parent, const char* libname );
+ static Plugin* loadPlugin( TQObject * parent, const char* libname );
virtual void setInstance( KInstance *instance );
private:
- static bool hasPlugin( QObject* parent, const QString& library );
+ static bool hasPlugin( TQObject* parent, const TQString& library );
class PluginPrivate;
PluginPrivate *d;
};
diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp
index bd4e09b61..6b0ee3cb2 100644
--- a/kparts/statusbarextension.cpp
+++ b/kparts/statusbarextension.cpp
@@ -20,8 +20,8 @@
#include "statusbarextension.h"
-#include <qvaluelist.h>
-#include <qobjectlist.h>
+#include <tqvaluelist.h>
+#include <tqobjectlist.h>
#include <kstatusbar.h>
#include <kmainwindow.h>
@@ -41,11 +41,11 @@ class KParts::StatusBarItem {
StatusBarItem() // for QValueList
: m_widget(0), m_visible(false)
{}
- StatusBarItem( QWidget * widget, int stretch, bool permanent )
+ StatusBarItem( TQWidget * widget, int stretch, bool permanent )
: m_widget(widget), m_stretch(stretch), m_permanent(permanent), m_visible(false)
{}
- QWidget * widget() const { return m_widget; }
+ TQWidget * widget() const { return m_widget; }
void ensureItemShown( KStatusBar * sb )
{
@@ -66,7 +66,7 @@ class KParts::StatusBarItem {
}
}
private:
- QWidget * m_widget;
+ TQWidget * m_widget;
int m_stretch;
bool m_permanent;
bool m_visible; // true when the item has been added to the statusbar
@@ -76,7 +76,7 @@ class KParts::StatusBarItem {
StatusBarExtension::StatusBarExtension(KParts::ReadOnlyPart *parent, const char* name)
- : QObject(parent, name), m_statusBar(0), d(0)
+ : TQObject(parent, name), m_statusBar(0), d(0)
{
parent->installEventFilter(this);
}
@@ -86,15 +86,15 @@ StatusBarExtension::~StatusBarExtension()
}
-StatusBarExtension *StatusBarExtension::childObject( QObject *obj )
+StatusBarExtension *StatusBarExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::StatusBarExtension" ) )
return static_cast<KParts::StatusBarExtension *>( it.current() );
@@ -102,27 +102,27 @@ StatusBarExtension *StatusBarExtension::childObject( QObject *obj )
return 0L;
}
-bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev)
+bool StatusBarExtension::eventFilter(TQObject * watched, TQEvent* ev)
{
if ( !GUIActivateEvent::test( ev ) ||
!watched->inherits("KParts::ReadOnlyPart") )
- return QObject::eventFilter(watched, ev);
+ return TQObject::eventFilter(watched, ev);
KStatusBar * sb = statusBar();
if ( !sb )
- return QObject::eventFilter(watched, ev);
+ return TQObject::eventFilter(watched, ev);
GUIActivateEvent *gae = static_cast<GUIActivateEvent*>(ev);
if ( gae->activated() )
{
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
(*it).ensureItemShown( sb );
}
else
{
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
(*it).ensureItemHidden( sb );
}
@@ -134,7 +134,7 @@ bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev)
KStatusBar * StatusBarExtension::statusBar() const
{
if ( !m_statusBar ) {
- QWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget();
+ TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget();
KMainWindow* mw = dynamic_cast<KMainWindow *>( w->topLevelWidget() );
if ( mw )
m_statusBar = mw->statusBar();
@@ -147,20 +147,20 @@ void StatusBarExtension::setStatusBar( KStatusBar* status )
m_statusBar = status;
}
-void StatusBarExtension::addStatusBarItem( QWidget * widget, int stretch, bool permanent )
+void StatusBarExtension::addStatusBarItem( TQWidget * widget, int stretch, bool permanent )
{
m_statusBarItems.append( StatusBarItem( widget, stretch, permanent ) );
- QValueListIterator<StatusBarItem> it = m_statusBarItems.fromLast();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.fromLast();
KStatusBar * sb = statusBar();
Q_ASSERT(sb);
if (sb)
(*it).ensureItemShown( sb );
}
-void StatusBarExtension::removeStatusBarItem( QWidget * widget )
+void StatusBarExtension::removeStatusBarItem( TQWidget * widget )
{
KStatusBar * sb = statusBar();
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
if ( (*it).widget() == widget )
{
diff --git a/kparts/statusbarextension.h b/kparts/statusbarextension.h
index e6fc0064b..f176f53d2 100644
--- a/kparts/statusbarextension.h
+++ b/kparts/statusbarextension.h
@@ -21,8 +21,8 @@
#ifndef KPARTS_STATUSBAREXTENSION_H
#define KPARTS_STATUSBAREXTENSION_H
-#include <qwidget.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -63,7 +63,7 @@ namespace KParts
* If you use this method instead of using statusBar() directly,
* this extension will take care of removing the items when the parts GUI
* is deactivated and will re-add them when it is reactivated.
- * The parameters are the same as QStatusBar::addWidget().
+ * The parameters are the same as TQStatusBar::addWidget().
*
* Note that you can't use KStatusBar methods (inserting text items by id)
* but you can create a KStatusBarLabel with a dummy id instead, and use
@@ -71,7 +71,7 @@ namespace KParts
*
* @param widget the widget to add
* @param stretch the stretch factor. 0 for a minimum size.
- * @param permanent passed to QStatusBar::addWidget as the "permanent" bool.
+ * @param permanent passed to TQStatusBar::addWidget as the "permanent" bool.
* Note that the item isn't really permanent though, it goes away when
* the part is unactivated. This simply controls where temporary messages
* hide the @p widget, and whether it's added to the left or to the right side.
@@ -79,12 +79,12 @@ namespace KParts
* IMPORTANT: do NOT add any items immediately after constructing the extension.
* Give the application time to set the statusbar in the extension if necessary.
*/
- void addStatusBarItem( QWidget * widget, int stretch, bool permanent );
+ void addStatusBarItem( TQWidget * widget, int stretch, bool permanent );
/**
* Remove a @p widget from the statusbar for this part.
*/
- void removeStatusBarItem( QWidget * widget );
+ void removeStatusBarItem( TQWidget * widget );
/**
* @return the statusbar of the KMainWindow in which this part is currently embedded.
@@ -105,14 +105,14 @@ namespace KParts
* Queries @p obj for a child object which inherits from this
* BrowserExtension class. Convenience method.
*/
- static StatusBarExtension *childObject( QObject *obj );
+ static StatusBarExtension *childObject( TQObject *obj );
/** @internal */
- virtual bool eventFilter( QObject *watched, QEvent* ev );
+ virtual bool eventFilter( TQObject *watched, TQEvent* ev );
private:
- QValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
+ TQValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
mutable KStatusBar* m_statusBar;
// for future extensions
diff --git a/kparts/tests/example.cpp b/kparts/tests/example.cpp
index 51f493686..a1e8110e5 100644
--- a/kparts/tests/example.cpp
+++ b/kparts/tests/example.cpp
@@ -3,9 +3,9 @@
#include "parts.h"
#include "notepad.h"
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qdir.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -21,27 +21,27 @@ Shell::Shell()
m_manager = new KParts::PartManager( this );
// When the manager says the active part changes, the builder updates (recreates) the GUI
- connect( m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( createGUI( KParts::Part * ) ) );
+ connect( m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ this, TQT_SLOT( createGUI( KParts::Part * ) ) );
// We can do this "switch active part" because we have a splitter with
// two items in it.
// I wonder what kdevelop uses/will use to embed kedit, BTW.
- m_splitter = new QSplitter( this );
+ m_splitter = new TQSplitter( this );
m_part1 = new Part1(this, m_splitter);
m_part2 = new Part2(this, m_splitter);
KActionCollection *coll = actionCollection();
- (void)new KAction( "&View local file", 0, this, SLOT( slotFileOpen() ), coll, "open_local_file" );
- (void)new KAction( "&View remote file", 0, this, SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
+ (void)new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" );
+ (void)new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
- m_paEditFile = new KAction( "&Edit file", 0, this, SLOT( slotFileEdit() ), coll, "edit_file" );
- m_paCloseEditor = new KAction( "&Close file editor", 0, this, SLOT( slotFileCloseEditor() ), coll, "close_editor" );
+ m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" );
+ m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" );
m_paCloseEditor->setEnabled(false);
- KAction * paQuit = new KAction( "&Quit", 0, this, SLOT( close() ), coll, "shell_quit" );
- paQuit->setIconSet(QIconSet(BarIcon("exit")));
+ KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" );
+ paQuit->setIconSet(TQIconSet(BarIcon("exit")));
(void)new KAction( "Yet another menu item", 0, coll, "shell_yami" );
(void)new KAction( "Yet another submenu item", 0, coll, "shell_yasmi" );
@@ -115,7 +115,7 @@ void Shell::slotFileEdit()
if ( !m_editorpart )
embedEditor();
// TODO use KFileDialog to allow testing remote files
- if ( ! m_editorpart->openURL( QDir::current().absPath()+"/kpartstest_shell.rc" ) )
+ if ( ! m_editorpart->openURL( TQDir::current().absPath()+"/kpartstest_shell.rc" ) )
KMessageBox::error(this,"Couldn't open file !");
}
diff --git a/kparts/tests/example.h b/kparts/tests/example.h
index ec3d67540..1da6acef6 100644
--- a/kparts/tests/example.h
+++ b/kparts/tests/example.h
@@ -33,7 +33,7 @@ private:
KParts::Part *m_part2;
KParts::ReadWritePart *m_editorpart;
KParts::PartManager *m_manager;
- QWidget *m_splitter;
+ TQWidget *m_splitter;
};
#endif
diff --git a/kparts/tests/ghostview.cpp b/kparts/tests/ghostview.cpp
index 49736abfc..a1ace7720 100644
--- a/kparts/tests/ghostview.cpp
+++ b/kparts/tests/ghostview.cpp
@@ -8,9 +8,9 @@
#include <kcmdlineargs.h>
#include <klibloader.h>
-#include <qwidget.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqwidget.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <ktrader.h>
@@ -21,9 +21,9 @@ Shell::Shell()
setXMLFile( "ghostviewtest_shell.rc" );
KAction * paOpen = new KAction( "&Open file" , "fileopen", 0, this,
- SLOT( slotFileOpen() ), actionCollection(), "file_open" );
+ TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" );
- KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, SLOT( close() ), actionCollection(), "file_quit" );
+ KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" );
// Try to find a postscript component first
KTrader::OfferList offers = KTrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)");
@@ -35,7 +35,7 @@ Shell::Shell()
{
KService::Ptr ptr = (*it);
- factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if (factory)
{
m_gvpart = static_cast<KParts::ReadOnlyPart *>(factory->create(this, ptr->name().latin1(), "KParts::ReadOnlyPart"));
@@ -85,7 +85,7 @@ void Shell::openURL( const KURL & url )
void Shell::slotFileOpen()
{
- KURL url = KFileDialog::getOpenURL( QString::null, "*.ps|Postscript files (*.ps)", 0L, "file dialog" );
+ KURL url = KFileDialog::getOpenURL( TQString::null, "*.ps|Postscript files (*.ps)", 0L, "file dialog" );
if( !url.isEmpty() )
openURL( url );
@@ -109,7 +109,7 @@ int main( int argc, char **argv )
if ( args->count() == 1 )
{
// Allow full paths, but also simple filenames from current dir
- KURL url( QDir::currentDirPath()+"/", args->arg(0) );
+ KURL url( TQDir::currentDirPath()+"/", args->arg(0) );
shell->openURL( url );
}
shell->show();
diff --git a/kparts/tests/normalktm.cpp b/kparts/tests/normalktm.cpp
index f8884ae74..ec4420a7e 100644
--- a/kparts/tests/normalktm.cpp
+++ b/kparts/tests/normalktm.cpp
@@ -3,9 +3,9 @@
#include "parts.h"
#include "notepad.h"
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qdir.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -21,30 +21,30 @@ Shell::Shell()
// We can do this "switch active part" because we have a splitter with
// two items in it.
// I wonder what kdevelop uses/will use to embed kedit, BTW.
- m_splitter = new QSplitter( this );
+ m_splitter = new TQSplitter( this );
m_part1 = new Part1(this, m_splitter);
m_part2 = new Part2(this, m_splitter);
- QPopupMenu * pFile = new QPopupMenu( this );
+ TQPopupMenu * pFile = new TQPopupMenu( this );
menuBar()->insertItem( "File", pFile );
- QObject * coll = this;
- KAction * paLocal = new KAction( "&View local file", 0, this, SLOT( slotFileOpen() ), coll, "open_local_file" );
+ TQObject * coll = this;
+ KAction * paLocal = new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" );
// No XML : we need to plug our actions ourselves
paLocal->plug( pFile );
- KAction * paRemote = new KAction( "&View remote file", 0, this, SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
+ KAction * paRemote = new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
paRemote->plug( pFile );
- m_paEditFile = new KAction( "&Edit file", 0, this, SLOT( slotFileEdit() ), coll, "edit_file" );
+ m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" );
m_paEditFile->plug( pFile );
- m_paCloseEditor = new KAction( "&Close file editor", 0, this, SLOT( slotFileCloseEditor() ), coll, "close_editor" );
+ m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" );
m_paCloseEditor->setEnabled(false);
m_paCloseEditor->plug( pFile );
- KAction * paQuit = new KAction( "&Quit", 0, this, SLOT( close() ), coll, "shell_quit" );
- paQuit->setIconSet(QIconSet(BarIcon("exit")));
+ KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" );
+ paQuit->setIconSet(TQIconSet(BarIcon("exit")));
paQuit->plug( pFile );
setCentralWidget( m_splitter );
@@ -102,7 +102,7 @@ void Shell::slotFileEdit()
if ( !m_editorpart )
embedEditor();
// TODO use KFileDialog to allow testing remote files
- if ( ! m_editorpart->openURL( QDir::current().absPath()+"/kpartstest_shell.rc" ) )
+ if ( ! m_editorpart->openURL( TQDir::current().absPath()+"/kpartstest_shell.rc" ) )
KMessageBox::error(this,"Couldn't open file !");
}
diff --git a/kparts/tests/normalktm.h b/kparts/tests/normalktm.h
index bcf7b89bc..9a61a0082 100644
--- a/kparts/tests/normalktm.h
+++ b/kparts/tests/normalktm.h
@@ -32,7 +32,7 @@ private:
KParts::ReadOnlyPart *m_part1;
KParts::Part *m_part2;
KParts::ReadWritePart *m_editorpart;
- QWidget *m_splitter;
+ TQWidget *m_splitter;
};
#endif
diff --git a/kparts/tests/notepad.cpp b/kparts/tests/notepad.cpp
index 8e6f5462c..e0857a51e 100644
--- a/kparts/tests/notepad.cpp
+++ b/kparts/tests/notepad.cpp
@@ -3,10 +3,10 @@
#include <kparts/partmanager.h>
#include <kparts/mainwindow.h>
-#include <qsplitter.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqsplitter.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -16,17 +16,17 @@
#include <kstatusbar.h>
#include <kstandarddirs.h>
-NotepadPart::NotepadPart( QWidget* parentWidget, const char*,
- QObject* parent, const char* name,
- const QStringList& )
+NotepadPart::NotepadPart( TQWidget* parentWidget, const char*,
+ TQObject* parent, const char* name,
+ const TQStringList& )
: KParts::ReadWritePart( parent, name )
{
setInstance( NotepadFactory::instance() );
- m_edit = new QMultiLineEdit( parentWidget, "NotepadPart's multiline edit" );
+ m_edit = new TQMultiLineEdit( parentWidget, "NotepadPart's multiline edit" );
setWidget( m_edit );
- (void)new KAction( "Search and replace", 0, this, SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" );
+ (void)new KAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" );
setXMLFile( "notepadpart.rc" );
setReadWrite( true );
}
@@ -39,9 +39,9 @@ void NotepadPart::setReadWrite( bool rw )
{
m_edit->setReadOnly( !rw );
if (rw)
- connect( m_edit, SIGNAL( textChanged() ), this, SLOT( setModified() ) );
+ connect( m_edit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( setModified() ) );
else
- disconnect( m_edit, SIGNAL( textChanged() ), this, SLOT( setModified() ) );
+ disconnect( m_edit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( setModified() ) );
ReadWritePart::setReadWrite( rw );
}
@@ -55,10 +55,10 @@ bool NotepadPart::openFile()
{
kdDebug() << "NotepadPart: opening " << m_file << endl;
// Hehe this is from a tutorial I did some time ago :)
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
while ( !t.eof() ) {
s += t.readLine() + "\n";
}
@@ -75,10 +75,10 @@ bool NotepadPart::saveFile()
{
if ( !isReadWrite() )
return false;
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_WriteOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
t << m_edit->text();
f.close();
return true;
@@ -90,9 +90,9 @@ void NotepadPart::slotSearchReplace()
{
// What's this ? (David)
/*
- QValueList<KParts::XMLGUIServant *> plugins = KParts::Plugin::pluginServants( this );
- QValueList<KParts::XMLGUIServant *>::ConstIterator it = plugins.begin();
- QValueList<KParts::XMLGUIServant *>::ConstIterator end = plugins.end();
+ TQValueList<KParts::XMLGUIServant *> plugins = KParts::Plugin::pluginServants( this );
+ TQValueList<KParts::XMLGUIServant *>::ConstIterator it = plugins.begin();
+ TQValueList<KParts::XMLGUIServant *>::ConstIterator end = plugins.end();
for (; it != end; ++it )
factory()->removeServant( *it );
*/
diff --git a/kparts/tests/notepad.h b/kparts/tests/notepad.h
index bd499d651..9956543a3 100644
--- a/kparts/tests/notepad.h
+++ b/kparts/tests/notepad.h
@@ -17,9 +17,9 @@ class NotepadPart : public KParts::ReadWritePart
{
Q_OBJECT
public:
- NotepadPart( QWidget*, const char* widgetName,
- QObject* parent, const char* name,
- const QStringList& args = QStringList() );
+ NotepadPart( TQWidget*, const char* widgetName,
+ TQObject* parent, const char* name,
+ const TQStringList& args = TQStringList() );
virtual ~NotepadPart();
virtual void setReadWrite( bool rw );
@@ -34,7 +34,7 @@ protected slots:
void slotSearchReplace();
protected:
- QMultiLineEdit * m_edit;
+ TQMultiLineEdit * m_edit;
};
typedef KParts::GenericFactory<NotepadPart> NotepadFactory;
diff --git a/kparts/tests/parts.cpp b/kparts/tests/parts.cpp
index 27513185c..d932a168f 100644
--- a/kparts/tests/parts.cpp
+++ b/kparts/tests/parts.cpp
@@ -3,13 +3,13 @@
#include "parts.h"
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
-#include <qlineedit.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
#include <kiconloader.h>
#include <kapplication.h>
@@ -18,12 +18,12 @@
#include <kaction.h>
#include <klocale.h>
-Part1::Part1( QObject *parent, QWidget * parentWidget )
+Part1::Part1( TQObject *parent, TQWidget * parentWidget )
: KParts::ReadOnlyPart( parent, "Part1" )
{
m_instance = new KInstance( "kpartstestpart" );
setInstance( m_instance );
- m_edit = new QMultiLineEdit( parentWidget );
+ m_edit = new TQMultiLineEdit( parentWidget );
setWidget( m_edit );
setXMLFile( "kpartstest_part1.rc" );
@@ -37,12 +37,12 @@ Part1::~Part1()
bool Part1::openFile()
{
- kdDebug() << "Part1: opening " << QFile::encodeName(m_file) << endl;
+ kdDebug() << "Part1: opening " << TQFile::encodeName(m_file) << endl;
// Hehe this is from a tutorial I did some time ago :)
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
while ( !t.eof() ) {
s += t.readLine() + "\n";
}
@@ -56,22 +56,22 @@ bool Part1::openFile()
return true;
}
-Part2::Part2( QObject *parent, QWidget * parentWidget )
+Part2::Part2( TQObject *parent, TQWidget * parentWidget )
: KParts::Part( parent, "Part2" )
{
m_instance = new KInstance( "part2" );
setInstance( m_instance );
- QWidget * w = new QWidget( parentWidget, "Part2Widget" );
+ TQWidget * w = new TQWidget( parentWidget, "Part2Widget" );
setWidget( w );
- QCheckBox * cb = new QCheckBox( "something", w );
+ TQCheckBox * cb = new TQCheckBox( "something", w );
- QLineEdit * l = new QLineEdit( "something", widget() );
+ TQLineEdit * l = new TQLineEdit( "something", widget() );
l->move(0,50);
// Since the main widget is a dummy one, we HAVE to set
// strong focus for it, otherwise we get the
// the famous activating-file-menu-switches-part bug.
- w->setFocusPolicy( QWidget::ClickFocus );
+ w->setFocusPolicy( TQWidget::ClickFocus );
// setXMLFile( ... ); // no actions currently
}
diff --git a/kparts/tests/parts.h b/kparts/tests/parts.h
index 27ec5fa1a..30e7d1768 100644
--- a/kparts/tests/parts.h
+++ b/kparts/tests/parts.h
@@ -13,14 +13,14 @@ class Part1 : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- Part1( QObject *parent, QWidget * parentWidget );
+ Part1( TQObject *parent, TQWidget * parentWidget );
virtual ~Part1();
protected:
virtual bool openFile();
protected:
- QMultiLineEdit * m_edit;
+ TQMultiLineEdit * m_edit;
KInstance *m_instance;
};
@@ -28,7 +28,7 @@ class Part2 : public KParts::Part
{
Q_OBJECT
public:
- Part2( QObject *parent, QWidget * parentWidget );
+ Part2( TQObject *parent, TQWidget * parentWidget );
virtual ~Part2();
protected:
diff --git a/kparts/tests/plugin_spellcheck.cpp b/kparts/tests/plugin_spellcheck.cpp
index 156552e1b..5521bf22f 100644
--- a/kparts/tests/plugin_spellcheck.cpp
+++ b/kparts/tests/plugin_spellcheck.cpp
@@ -1,5 +1,5 @@
#include "notepad.h" // this plugin applies to a notepad part
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include "plugin_spellcheck.h"
#include <kaction.h>
#include <kgenericfactory.h>
@@ -7,11 +7,11 @@
#include <klocale.h>
#include <kdebug.h>
-PluginSpellCheck::PluginSpellCheck( QObject* parent, const char* name,
- const QStringList& )
+PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name,
+ const TQStringList& )
: Plugin( parent, name )
{
- (void) new KAction( "&Select current line (plugin)", 0, this, SLOT(slotSpellCheck()),
+ (void) new KAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()),
actionCollection(), "spellcheck" );
}
@@ -28,7 +28,7 @@ void PluginSpellCheck::slotSpellCheck()
else
{
NotepadPart * part = (NotepadPart *) parent();
- QMultiLineEdit * widget = (QMultiLineEdit *) part->widget();
+ TQMultiLineEdit * widget = (TQMultiLineEdit *) part->widget();
widget->selectAll(); //selects current line !
}
}
diff --git a/kparts/tests/plugin_spellcheck.h b/kparts/tests/plugin_spellcheck.h
index 31d6b5380..56f0e657a 100644
--- a/kparts/tests/plugin_spellcheck.h
+++ b/kparts/tests/plugin_spellcheck.h
@@ -7,8 +7,8 @@ class PluginSpellCheck : public KParts::Plugin
{
Q_OBJECT
public:
- PluginSpellCheck( QObject* parent = 0, const char* name = 0,
- const QStringList& = QStringList() );
+ PluginSpellCheck( TQObject* parent = 0, const char* name = 0,
+ const TQStringList& = TQStringList() );
virtual ~PluginSpellCheck();
public slots:
diff --git a/krandr/ktimerdialog.cpp b/krandr/ktimerdialog.cpp
index 071088e9b..55302b407 100644
--- a/krandr/ktimerdialog.cpp
+++ b/krandr/ktimerdialog.cpp
@@ -19,12 +19,12 @@
*
*/
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qprogressbar.h>
-#include <qlabel.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
+#include <tqlabel.h>
#include <kwin.h>
#include <kiconloader.h>
@@ -35,9 +35,9 @@
#include "ktimerdialog.h"
#include "ktimerdialog.moc"
-KTimerDialog::KTimerDialog( int msec, TimerStyle style, QWidget *parent,
+KTimerDialog::KTimerDialog( int msec, TimerStyle style, TQWidget *parent,
const char *name, bool modal,
- const QString &caption,
+ const TQString &caption,
int buttonMask, ButtonCode defaultButton,
bool separator,
const KGuiItem &user1,
@@ -46,8 +46,8 @@ KTimerDialog::KTimerDialog( int msec, TimerStyle style, QWidget *parent,
: KDialogBase(parent, name, modal, caption, buttonMask, defaultButton,
separator, user1, user2, user3 )
{
- totalTimer = new QTimer( this );
- updateTimer = new QTimer( this );
+ totalTimer = new TQTimer( this );
+ updateTimer = new TQTimer( this );
msecTotal = msecRemaining = msec;
updateInterval = 1000;
tStyle = style;
@@ -56,14 +56,14 @@ KTimerDialog::KTimerDialog( int msec, TimerStyle style, QWidget *parent,
if ( buttonMask & Cancel )
buttonOnTimeout = Cancel;
- connect( totalTimer, SIGNAL( timeout() ), SLOT( slotInternalTimeout() ) );
- connect( updateTimer, SIGNAL( timeout() ), SLOT( slotUpdateTime() ) );
+ connect( totalTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotInternalTimeout() ) );
+ connect( updateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotUpdateTime() ) );
// create the widgets
- mainWidget = new QVBox( this, "mainWidget" );
- timerWidget = new QHBox( mainWidget, "timerWidget" );
- timerLabel = new QLabel( timerWidget );
- timerProgress = new QProgressBar( timerWidget );
+ mainWidget = new TQVBox( this, "mainWidget" );
+ timerWidget = new TQHBox( mainWidget, "timerWidget" );
+ timerLabel = new TQLabel( timerWidget );
+ timerProgress = new TQProgressBar( timerWidget );
timerProgress->setTotalSteps( msecTotal );
timerProgress->setPercentageVisible( false );
@@ -90,18 +90,18 @@ int KTimerDialog::exec()
return KDialogBase::exec();
}
-void KTimerDialog::setMainWidget( QWidget *widget )
+void KTimerDialog::setMainWidget( TQWidget *widget )
{
// yuck, here goes.
- QVBox *newWidget = new QVBox( this );
+ TQVBox *newWidget = new TQVBox( this );
if ( widget->parentWidget() != mainWidget ) {
- widget->reparent( newWidget, 0, QPoint(0,0) );
+ widget->reparent( newWidget, 0, TQPoint(0,0) );
} else {
newWidget->insertChild( widget );
}
- timerWidget->reparent( newWidget, 0, QPoint(0, 0) );
+ timerWidget->reparent( newWidget, 0, TQPoint(0, 0) );
delete mainWidget;
mainWidget = newWidget;
diff --git a/krandr/ktimerdialog.h b/krandr/ktimerdialog.h
index 23b4a92b0..8abe09d4b 100644
--- a/krandr/ktimerdialog.h
+++ b/krandr/ktimerdialog.h
@@ -67,9 +67,9 @@ class KTimerDialog : public KDialogBase
*
* For the rest of the arguments, See @see KDialogBase .
*/
- KTimerDialog( int msec, TimerStyle style=CountDown, QWidget *parent=0,
+ KTimerDialog( int msec, TimerStyle style=CountDown, TQWidget *parent=0,
const char *name=0, bool modal=true,
- const QString &caption=QString::null,
+ const TQString &caption=TQString::null,
int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
@@ -82,7 +82,7 @@ class KTimerDialog : public KDialogBase
~KTimerDialog();
/**
- * Execute the dialog modelessly - see @see QDialog .
+ * Execute the dialog modelessly - see @see TQDialog .
*/
virtual void show();
@@ -117,7 +117,7 @@ class KTimerDialog : public KDialogBase
* Overridden function which is used to set the main widget of the dialog.
* @see KDialogBase::setMainWidget.
*/
- void setMainWidget( QWidget *widget );
+ void setMainWidget( TQWidget *widget );
signals:
/**
@@ -127,7 +127,7 @@ class KTimerDialog : public KDialogBase
public slots:
/**
- * Execute the dialog modally - see @see QDialog .
+ * Execute the dialog modally - see @see TQDialog .
*/
int exec();
@@ -148,17 +148,17 @@ class KTimerDialog : public KDialogBase
*/
void setupLayout();
- QTimer *totalTimer;
- QTimer *updateTimer;
+ TQTimer *totalTimer;
+ TQTimer *updateTimer;
int msecRemaining, updateInterval, msecTotal;
ButtonCode buttonOnTimeout;
TimerStyle tStyle;
- QHBox *timerWidget;
- QProgressBar *timerProgress;
- QLabel *timerLabel;
- QVBox *mainWidget;
+ TQHBox *timerWidget;
+ TQProgressBar *timerProgress;
+ TQLabel *timerLabel;
+ TQVBox *mainWidget;
class KTimerDialogPrivate;
KTimerDialogPrivate *d;
diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc
index f2080f287..cbb023e4f 100644
--- a/krandr/libkrandr.cc
+++ b/krandr/libkrandr.cc
@@ -24,18 +24,18 @@
#include "libkrandr.h"
-QString KRandrSimpleAPI::getIccFileName(QString profileName, QString screenName, QString kde_confdir) {
+TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir) {
KSimpleConfig *t_config;
KSimpleConfig *t_systemconfig;
int t_numberOfProfiles;
- QStringList t_cfgProfiles;
- QString retval;
+ TQStringList t_cfgProfiles;
+ TQString retval;
if (profileName != NULL) {
- t_config = new KSimpleConfig( QString::fromLatin1( "kiccconfigrc" ));
+ t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
}
else {
- t_systemconfig = new KSimpleConfig( kde_confdir + QString("/kicc/kiccconfigrc") );
+ t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") );
}
if (profileName != NULL) {
@@ -68,7 +68,7 @@ QString KRandrSimpleAPI::getIccFileName(QString profileName, QString screenName,
return retval;
}
-QString KRandrSimpleAPI::applyIccFile(QString screenName, QString fileName) {
+TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
int i;
int j;
Display *randr_display;
@@ -113,13 +113,13 @@ QString KRandrSimpleAPI::applyIccFile(QString screenName, QString fileName) {
if (screenNumber >= 0) {
// Apply ICC settings with XCalib
- QString icc_command;
+ TQString icc_command;
FILE *pipe_xcalib;
char xcalib_result[2048];
int i;
xcalib_result[0]=0;
- icc_command = QString("xcalib %1").arg(fileName);
+ icc_command = TQString("xcalib %1").arg(fileName);
if ((pipe_xcalib = popen(icc_command.ascii(), "r")) == NULL)
{
printf("Xcalib pipe error\n\r");
@@ -177,13 +177,13 @@ QString KRandrSimpleAPI::applyIccFile(QString screenName, QString fileName) {
if (screenNumber >= 0) {
// Apply ICC settings with XCalib
- QString icc_command;
+ TQString icc_command;
FILE *pipe_xcalib;
char xcalib_result[2048];
int i;
xcalib_result[0]=0;
- icc_command = QString("xcalib -c");
+ icc_command = TQString("xcalib -c");
if ((pipe_xcalib = popen(icc_command.ascii(), "r")) == NULL)
{
printf("Xcalib pipe error\n\r");
@@ -206,7 +206,7 @@ QString KRandrSimpleAPI::applyIccFile(QString screenName, QString fileName) {
return "";
}
-QString KRandrSimpleAPI::applyIccConfiguration(QString profileName, QString kde_confdir) {
+TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString kde_confdir) {
int i;
Display *randr_display;
ScreenInfo *randr_screen_info;
@@ -214,9 +214,9 @@ QString KRandrSimpleAPI::applyIccConfiguration(QString profileName, QString kde_
KSimpleConfig *t_config;
int screenNumber = 0;
- QString errorstr = "";
+ TQString errorstr = "";
- t_config = new KSimpleConfig( QString::fromLatin1( "kiccconfigrc" ));
+ t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
// Find all screens
if (isValid() == true) {
@@ -244,25 +244,25 @@ QString KRandrSimpleAPI::applyIccConfiguration(QString profileName, QString kde_
return "";
}
-QString KRandrSimpleAPI::getCurrentProfile () {
- QString profileName;
+TQString KRandrSimpleAPI::getCurrentProfile () {
+ TQString profileName;
KSimpleConfig *t_config;
- t_config = new KSimpleConfig( QString::fromLatin1( "kiccconfigrc" ));
+ t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" ));
profileName = t_config->readEntry("CurrentProfile");
delete t_config;
return profileName;
}
-QString KRandrSimpleAPI::applySystemWideIccConfiguration(QString kde_confdir) {
+TQString KRandrSimpleAPI::applySystemWideIccConfiguration(TQString kde_confdir) {
// Apply ICC settings with XCalib
- QString icc_command;
+ TQString icc_command;
FILE *pipe_xcalib;
char xcalib_result[2048];
int i;
xcalib_result[0]=0;
- icc_command = QString("xcalib %1").arg(getIccFileName(NULL, "Default", kde_confdir));
+ icc_command = TQString("xcalib %1").arg(getIccFileName(NULL, "Default", kde_confdir));
if ((pipe_xcalib = popen(icc_command.ascii(), "r")) == NULL)
{
printf("Xcalib pipe error\n\r");
@@ -283,15 +283,15 @@ QString KRandrSimpleAPI::applySystemWideIccConfiguration(QString kde_confdir) {
return "";
}
-QString KRandrSimpleAPI::clearIccConfiguration() {
+TQString KRandrSimpleAPI::clearIccConfiguration() {
// Clear ICC settings with XCalib
- QString icc_command;
+ TQString icc_command;
FILE *pipe_xcalib;
char xcalib_result[2048];
int i;
xcalib_result[0]=0;
- icc_command = QString("xcalib -c");
+ icc_command = TQString("xcalib -c");
if ((pipe_xcalib = popen(icc_command.ascii(), "r")) == NULL)
{
printf("Xcalib pipe error\n\r");
diff --git a/krandr/libkrandr.h b/krandr/libkrandr.h
index 2135eb9f8..ced69a68d 100644
--- a/krandr/libkrandr.h
+++ b/krandr/libkrandr.h
@@ -51,34 +51,34 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay
/**
* Retrieves the specificed ICC profile filename from the configuration database
*/
- QString getIccFileName(QString profileName, QString screenName, QString kde_confdir);
+ TQString getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir);
/**
* Applies the specificed ICC profile filename to the specified RandR output
* If RandR is not available, the specified file is applied to the current display
*/
- QString applyIccFile(QString screenName, QString fileName);
+ TQString applyIccFile(TQString screenName, TQString fileName);
/**
* Applies all saved ICC profile settings to all RandR outputs
* If RandR is not available, the settings are applied to the current display
*/
- QString applyIccConfiguration(QString profileName, QString kde_confdir);
+ TQString applyIccConfiguration(TQString profileName, TQString kde_confdir);
/**
* Applies saved system wide settings to the current display
*/
- QString applySystemWideIccConfiguration(QString kde_confdir);
+ TQString applySystemWideIccConfiguration(TQString kde_confdir);
/**
* Resets the current display
*/
- QString clearIccConfiguration(void);
+ TQString clearIccConfiguration(void);
/**
* Retrieves current profile name
*/
- QString getCurrentProfile(void);
+ TQString getCurrentProfile(void);
/**
* Reads current screen information.
diff --git a/krandr/randr.cpp b/krandr/randr.cpp
index d56b37481..e891c8a2d 100644
--- a/krandr/randr.cpp
+++ b/krandr/randr.cpp
@@ -18,7 +18,7 @@
#include "randr.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -83,8 +83,8 @@ void RandRScreen::loadSettings()
int numSizes;
XRRScreenSize* sizes = XRRSizes(qt_xdisplay(), m_screen, &numSizes);
for (int i = 0; i < numSizes; i++) {
- m_pixelSizes.append(QSize(sizes[i].width, sizes[i].height));
- m_mmSizes.append(QSize(sizes[i].mwidth, sizes[i].mheight));
+ m_pixelSizes.append(TQSize(sizes[i].width, sizes[i].height));
+ m_mmSizes.append(TQSize(sizes[i].mwidth, sizes[i].mheight));
}
m_rotations = XRRRotations(qt_xdisplay(), m_screen, &rotation);
@@ -114,7 +114,7 @@ bool RandRScreen::applyProposed()
status = XRRSetScreenConfigAndRate(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), refreshRateIndexToHz(proposedSize(), proposedRefreshRate()), CurrentTime);
}
- //kdDebug() << "New size: " << WidthOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), screen)) << ", " << HeightOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), screen)) << endl;
+ //kdDebug() << "New size: " << WidthOfScreen(ScreenOfDisplay(TQPaintDevice::x11AppDisplay(), screen)) << ", " << HeightOfScreen(ScreenOfDisplay(TQPaintDevice::x11AppDisplay(), screen)) << endl;
if (status == RRSetConfigSuccess) {
m_currentSize = m_proposedSize;
@@ -173,8 +173,8 @@ bool RandRScreen::confirm()
KDialog::centerOnScreen(&acceptDialog, m_screen);
m_shownDialog = &acceptDialog;
- connect( m_shownDialog, SIGNAL( destroyed()), this, SLOT( shownDialogDestroyed()));
- connect( kapp->desktop(), SIGNAL( resized(int)), this, SLOT( desktopResized()));
+ connect( m_shownDialog, TQT_SIGNAL( destroyed()), this, TQT_SLOT( shownDialogDestroyed()));
+ connect( kapp->desktop(), TQT_SIGNAL( resized(int)), this, TQT_SLOT( desktopResized()));
return acceptDialog.exec();
}
@@ -182,7 +182,7 @@ bool RandRScreen::confirm()
void RandRScreen::shownDialogDestroyed()
{
m_shownDialog = NULL;
- disconnect( kapp->desktop(), SIGNAL( resized(int)), this, SLOT( desktopResized()));
+ disconnect( kapp->desktop(), TQT_SIGNAL( resized(int)), this, TQT_SLOT( desktopResized()));
}
void RandRScreen::desktopResized()
@@ -191,7 +191,7 @@ void RandRScreen::desktopResized()
KDialog::centerOnScreen(m_shownDialog, m_screen);
}
-QString RandRScreen::changedMessage() const
+TQString RandRScreen::changedMessage() const
{
if (currentRefreshRate() == -1)
return i18n("New configuration:\nResolution: %1 x %2\nOrientation: %3")
@@ -223,7 +223,7 @@ bool RandRScreen::proposedChanged() const
return m_currentSize != m_proposedSize || m_currentRotation != m_proposedRotation || m_currentRefreshRate != m_proposedRefreshRate;
}
-QString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised)
+TQString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised)
{
if (!pastTense)
switch (rotation) {
@@ -277,7 +277,7 @@ QString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised
}
}
-QPixmap RandRScreen::rotationIcon(int rotation) const
+TQPixmap RandRScreen::rotationIcon(int rotation) const
{
// Adjust icons for current screen orientation
if (!(m_currentRotation & RR_Rotate_0) && rotation & (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270)) {
@@ -316,9 +316,9 @@ QPixmap RandRScreen::rotationIcon(int rotation) const
}
}
-QString RandRScreen::currentRotationDescription() const
+TQString RandRScreen::currentRotationDescription() const
{
- QString ret = rotationName(m_currentRotation & RotateMask);
+ TQString ret = rotationName(m_currentRotation & RotateMask);
if (m_currentRotation != m_currentRotation & RotateMask)
if (m_currentRotation & RR_Rotate_0)
@@ -383,29 +383,29 @@ int RandRScreen::currentMMHeight() const
return m_pixelSizes[m_currentSize].height();
}
-QStringList RandRScreen::refreshRates(int size) const
+TQStringList RandRScreen::refreshRates(int size) const
{
int nrates;
short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
- QStringList ret;
+ TQStringList ret;
for (int i = 0; i < nrates; i++)
ret << refreshRateDirectDescription(rates[i]);
return ret;
}
-QString RandRScreen::refreshRateDirectDescription(int rate) const
+TQString RandRScreen::refreshRateDirectDescription(int rate) const
{
return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(rate);
}
-QString RandRScreen::refreshRateIndirectDescription(int size, int index) const
+TQString RandRScreen::refreshRateIndirectDescription(int size, int index) const
{
return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(refreshRateIndexToHz(size, index));
}
-QString RandRScreen::refreshRateDescription(int size, int index) const
+TQString RandRScreen::refreshRateDescription(int size, int index) const
{
return refreshRates(size)[index];
}
@@ -425,7 +425,7 @@ int RandRScreen::currentRefreshRate() const
return m_currentRefreshRate;
}
-QString RandRScreen::currentRefreshRateDescription() const
+TQString RandRScreen::currentRefreshRateDescription() const
{
return refreshRateIndirectDescription(m_currentSize, m_currentRefreshRate);
}
@@ -471,17 +471,17 @@ int RandRScreen::numSizes() const
return m_pixelSizes.count();
}
-const QSize& RandRScreen::pixelSize(int index) const
+const TQSize& RandRScreen::pixelSize(int index) const
{
return m_pixelSizes[index];
}
-const QSize& RandRScreen::mmSize(int index) const
+const TQSize& RandRScreen::mmSize(int index) const
{
return m_mmSizes[index];
}
-int RandRScreen::sizeIndex(QSize pixelSize) const
+int RandRScreen::sizeIndex(TQSize pixelSize) const
{
for (uint i = 0; i < m_pixelSizes.count(); i++)
if (m_pixelSizes[i] == pixelSize)
@@ -532,9 +532,9 @@ bool RandRScreen::proposeSize(int newSize)
void RandRScreen::load(KConfig& config)
{
- config.setGroup(QString("Screen%1").arg(m_screen));
+ config.setGroup(TQString("Screen%1").arg(m_screen));
- if (proposeSize(sizeIndex(QSize(config.readNumEntry("width", currentPixelWidth()), config.readNumEntry("height", currentPixelHeight())))))
+ if (proposeSize(sizeIndex(TQSize(config.readNumEntry("width", currentPixelWidth()), config.readNumEntry("height", currentPixelHeight())))))
proposeRefreshRate(refreshRateHzToIndex(proposedSize(), config.readNumEntry("refresh", currentRefreshRate())));
proposeRotation(rotationDegreeToIndex(config.readNumEntry("rotation", 0)) + (config.readBoolEntry("reflectX") ? ReflectX : 0) + (config.readBoolEntry("reflectY") ? ReflectY : 0));
@@ -542,7 +542,7 @@ void RandRScreen::load(KConfig& config)
void RandRScreen::save(KConfig& config) const
{
- config.setGroup(QString("Screen%1").arg(m_screen));
+ config.setGroup(TQString("Screen%1").arg(m_screen));
config.writeEntry("width", currentPixelWidth());
config.writeEntry("height", currentPixelHeight());
config.writeEntry("refresh", refreshRateIndexToHz(currentSize(), currentRefreshRate()));
@@ -557,7 +557,7 @@ RandRDisplay::RandRDisplay()
// Check extension
Status s = XRRQueryExtension(qt_xdisplay(), &m_eventBase, &m_errorBase);
if (!s) {
- m_errorCode = QString("%1, base %1").arg(s).arg(m_errorBase);
+ m_errorCode = TQString("%1, base %1").arg(s).arg(m_errorBase);
m_valid = false;
return;
}
@@ -579,19 +579,19 @@ RandRDisplay::RandRDisplay()
int major_version, minor_version;
XRRQueryVersion(qt_xdisplay(), &major_version, &minor_version);
- m_version = QString("X Resize and Rotate extension version %1.%1").arg(major_version).arg(minor_version);
+ m_version = TQString("X Resize and Rotate extension version %1.%1").arg(major_version).arg(minor_version);
m_numScreens = ScreenCount(qt_xdisplay());
// This assumption is WRONG with Xinerama
- // Q_ASSERT(QApplication::desktop()->numScreens() == ScreenCount(qt_xdisplay()));
+ // Q_ASSERT(TQApplication::desktop()->numScreens() == ScreenCount(qt_xdisplay()));
m_screens.setAutoDelete(true);
for (int i = 0; i < m_numScreens; i++) {
m_screens.append(new RandRScreen(i));
}
- setCurrentScreen(QApplication::desktop()->primaryScreen());
+ setCurrentScreen(TQApplication::desktop()->primaryScreen());
}
bool RandRDisplay::isValid() const
@@ -599,7 +599,7 @@ bool RandRDisplay::isValid() const
return m_valid;
}
-const QString& RandRDisplay::errorCode() const
+const TQString& RandRDisplay::errorCode() const
{
return m_errorCode;
}
@@ -619,7 +619,7 @@ int RandRDisplay::errorBase() const
return m_errorBase;
}
-const QString& RandRDisplay::version() const
+const TQString& RandRDisplay::version() const
{
return m_version;
}
@@ -631,10 +631,10 @@ void RandRDisplay::setCurrentScreen(int index)
Q_ASSERT(m_currentScreen);
}
-int RandRDisplay::screenIndexOfWidget(QWidget* widget)
+int RandRDisplay::screenIndexOfWidget(TQWidget* widget)
{
- int ret = QApplication::desktop()->screenNumber(widget);
- return ret != -1 ? ret : QApplication::desktop()->primaryScreen();
+ int ret = TQApplication::desktop()->screenNumber(widget);
+ return ret != -1 ? ret : TQApplication::desktop()->primaryScreen();
}
int RandRDisplay::currentScreenIndex() const
@@ -710,7 +710,7 @@ void RandRDisplay::applyProposed(bool confirm)
int RandRScreen::pixelCount( int index ) const
{
- QSize sz = pixelSize(index);
+ TQSize sz = pixelSize(index);
return sz.width() * sz.height();
}
diff --git a/krandr/randr.h b/krandr/randr.h
index c7eb240cf..355f3d866 100644
--- a/krandr/randr.h
+++ b/krandr/randr.h
@@ -19,9 +19,9 @@
#ifndef __RANDR_H__
#define __RANDR_H__
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kcmodule.h>
#include <kconfig.h>
@@ -82,7 +82,7 @@ public:
/**
* Refresh rate functions.
*/
- QStringList refreshRates(int size) const;
+ TQStringList refreshRates(int size) const;
QString refreshRateDirectDescription(int rate) const;
QString refreshRateIndirectDescription(int size, int index) const;
@@ -99,8 +99,8 @@ public:
* Screen size functions.
*/
int numSizes() const;
- const QSize& pixelSize(int index) const;
- const QSize& mmSize(int index) const;
+ const TQSize& pixelSize(int index) const;
+ const TQSize& mmSize(int index) const;
int pixelCount(int index) const;
/**
@@ -109,7 +109,7 @@ public:
* @param pixelSize dimensions of the screen in pixels
* @returns the index of the requested screen size
*/
- int sizeIndex(QSize pixelSize) const;
+ int sizeIndex(TQSize pixelSize) const;
int rotations() const;
@@ -154,8 +154,8 @@ private:
int m_screen;
- QValueList<QSize> m_pixelSizes;
- QValueList<QSize> m_mmSizes;
+ TQValueList<TQSize> m_pixelSizes;
+ TQValueList<TQSize> m_mmSizes;
int m_rotations;
int m_originalRotation;
@@ -177,7 +177,7 @@ private slots:
void shownDialogDestroyed();
};
-typedef QPtrList<RandRScreen> ScreenList;
+typedef TQPtrList<RandRScreen> ScreenList;
class RandRDisplay
{
@@ -185,14 +185,14 @@ public:
RandRDisplay();
bool isValid() const;
- const QString& errorCode() const;
- const QString& version() const;
+ const TQString& errorCode() const;
+ const TQString& version() const;
int eventBase() const;
int screenChangeNotifyEvent() const;
int errorBase() const;
- int screenIndexOfWidget(QWidget* widget);
+ int screenIndexOfWidget(TQWidget* widget);
int numScreens() const;
RandRScreen* screen(int index);
diff --git a/kresources/configdialog.cpp b/kresources/configdialog.cpp
index 3b88ff4b7..bbebc47a3 100644
--- a/kresources/configdialog.cpp
+++ b/kresources/configdialog.cpp
@@ -25,43 +25,43 @@
#include <klineedit.h>
#include <kmessagebox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include "factory.h"
#include "configdialog.h"
using namespace KRES;
-ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- /*const QString& type,*/ Resource* resource, /*KConfig *config, */const char *name )
+ConfigDialog::ConfigDialog( TQWidget *parent, const TQString& resourceFamily,
+ /*const TQString& type,*/ Resource* resource, /*KConfig *config, */const char *name )
: KDialogBase( parent, name, true, i18n( "Resource Configuration" ),
Ok|Cancel, Ok, false )/*, mConfig( config )*/, mResource( resource )
{
Factory *factory = Factory::self( resourceFamily );
- QFrame *main = makeMainWidget();
+ TQFrame *main = makeMainWidget();
- QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( main, 0, spacingHint() );
- QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ TQGroupBox *generalGroupBox = new TQGroupBox( 2, Qt::Horizontal, main );
generalGroupBox->layout()->setSpacing( spacingHint() );
generalGroupBox->setTitle( i18n( "General Settings" ) );
- new QLabel( i18n( "Name:" ), generalGroupBox );
+ new TQLabel( i18n( "Name:" ), generalGroupBox );
mName = new KLineEdit( generalGroupBox );
- mReadOnly = new QCheckBox( i18n( "Read-only" ), generalGroupBox );
+ mReadOnly = new TQCheckBox( i18n( "Read-only" ), generalGroupBox );
mName->setText( mResource->resourceName() );
mReadOnly->setChecked( mResource->readOnly() );
mainLayout->addWidget( generalGroupBox );
- QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ TQGroupBox *resourceGroupBox = new TQGroupBox( 2, Qt::Horizontal, main );
resourceGroupBox->layout()->setSpacing( spacingHint() );
resourceGroupBox->setTitle( i18n( "%1 Resource Settings" )
.arg( factory->typeName( resource->type() ) ) );
@@ -74,12 +74,12 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
mConfigWidget->setInEditMode( false );
mConfigWidget->loadSettings( mResource );
mConfigWidget->show();
- connect( mConfigWidget, SIGNAL( setReadOnly( bool ) ),
- SLOT( setReadOnly( bool ) ) );
+ connect( mConfigWidget, TQT_SIGNAL( setReadOnly( bool ) ),
+ TQT_SLOT( setReadOnly( bool ) ) );
}
- connect( mName, SIGNAL( textChanged(const QString &)),
- SLOT( slotNameChanged(const QString &)));
+ connect( mName, TQT_SIGNAL( textChanged(const TQString &)),
+ TQT_SLOT( slotNameChanged(const TQString &)));
slotNameChanged( mName->text() );
setMinimumSize( sizeHint() );
@@ -91,7 +91,7 @@ void ConfigDialog::setInEditMode( bool value )
mConfigWidget->setInEditMode( value );
}
-void ConfigDialog::slotNameChanged( const QString &text)
+void ConfigDialog::slotNameChanged( const TQString &text)
{
enableButtonOK( !text.isEmpty() );
}
diff --git a/kresources/configdialog.h b/kresources/configdialog.h
index 6fa751687..96545d7a4 100644
--- a/kresources/configdialog.h
+++ b/kresources/configdialog.h
@@ -37,7 +37,7 @@ class KRESOURCES_EXPORT ConfigDialog : public KDialogBase
Q_OBJECT
public:
// Resource=0: create new resource
- ConfigDialog( QWidget *parent, const QString& resourceFamily,
+ ConfigDialog( TQWidget *parent, const TQString& resourceFamily,
Resource* resource, const char *name = 0);
void setInEditMode( bool value );
@@ -45,14 +45,14 @@ class KRESOURCES_EXPORT ConfigDialog : public KDialogBase
protected slots:
void accept();
void setReadOnly( bool value );
- void slotNameChanged( const QString &text);
+ void slotNameChanged( const TQString &text);
private:
ConfigWidget *mConfigWidget;
Resource* mResource;
KLineEdit *mName;
- QCheckBox *mReadOnly;
+ TQCheckBox *mReadOnly;
};
}
diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp
index e133d5b99..5e5e61198 100644
--- a/kresources/configpage.cpp
+++ b/kresources/configpage.cpp
@@ -21,9 +21,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -61,8 +61,8 @@ ResourcePageInfo::~ResourcePageInfo() {
class ConfigViewItem : public QCheckListItem
{
public:
- ConfigViewItem( QListView *parent, Resource* resource ) :
- QCheckListItem( parent, resource->resourceName(), CheckBox ),
+ ConfigViewItem( TQListView *parent, Resource* resource ) :
+ TQCheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ),
mIsStandard( false )
{
@@ -72,7 +72,7 @@ class ConfigViewItem : public QCheckListItem
void setStandard( bool value )
{
- setText( 2, ( value ? i18n( "Yes" ) : QString::null ) );
+ setText( 2, ( value ? i18n( "Yes" ) : TQString::null ) );
mIsStandard = value;
}
@@ -86,7 +86,7 @@ class ConfigViewItem : public QCheckListItem
setOn( mResource->isActive() );
setText( 0, mResource->resourceName() );
setText( 1, mResource->type() );
- setText( 2, mIsStandard ? i18n( "Yes" ) : QString::null );
+ setText( 2, mIsStandard ? i18n( "Yes" ) : TQString::null );
}
private:
@@ -95,20 +95,20 @@ class ConfigViewItem : public QCheckListItem
bool mIsStandard;
};
-ConfigPage::ConfigPage( QWidget *parent, const char *name )
- : QWidget( parent, name ),
+ConfigPage::ConfigPage( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ),
mCurrentManager( 0 ),
mCurrentConfig( 0 )
{
setCaption( i18n( "Resource Configuration" ) );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Resources" ), this );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->layout()->setSpacing( 6 );
groupBox->layout()->setMargin( 11 );
- QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 2, 2 );
+ TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->layout(), 2, 2 );
mFamilyCombo = new KComboBox( false, groupBox );
groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 );
@@ -121,14 +121,14 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
mListView->addColumn( i18n( "Standard" ) );
groupBoxLayout->addWidget( mListView, 1, 0 );
- connect( mListView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ), this, SLOT( slotEdit() ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( slotEdit() ) );
KButtonBox *buttonBox = new KButtonBox( groupBox, Vertical );
- mAddButton = buttonBox->addButton( i18n( "&Add..." ), this, SLOT(slotAdd()) );
- mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT(slotRemove()) );
+ mAddButton = buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT(slotAdd()) );
+ mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT(slotRemove()) );
mRemoveButton->setEnabled( false );
- mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT(slotEdit()) );
+ mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT(slotEdit()) );
mEditButton->setEnabled( false );
- mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), this, SLOT(slotStandard()) );
+ mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), this, TQT_SLOT(slotStandard()) );
mStandardButton->setEnabled( false );
buttonBox->layout();
@@ -136,12 +136,12 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
mainLayout->addWidget( groupBox );
- connect( mFamilyCombo, SIGNAL( activated( int ) ),
- SLOT( slotFamilyChanged( int ) ) );
- connect( mListView, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ) );
- connect( mListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( slotItemClicked( QListViewItem * ) ) );
+ connect( mFamilyCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotFamilyChanged( int ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( slotItemClicked( TQListViewItem * ) ) );
mLastItem = 0;
@@ -153,7 +153,7 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
ConfigPage::~ConfigPage()
{
- QValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
+ TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) {
(*it)->mManager->removeObserver( this );
}
@@ -170,15 +170,15 @@ void ConfigPage::load()
mListView->clear();
mFamilyMap.clear();
mInfoMap.clear();
- QStringList familyDisplayNames;
+ TQStringList familyDisplayNames;
// KDE-3.3 compatibility code: get families from the plugins
- QStringList compatFamilyNames;
+ TQStringList compatFamilyNames;
const KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin" );
KTrader::OfferList::ConstIterator it = plugins.begin();
KTrader::OfferList::ConstIterator end = plugins.end();
for ( ; it != end; ++it ) {
- const QString family = (*it)->property( "X-KDE-ResourceFamily" ).toString();
+ const TQString family = (*it)->property( "X-KDE-ResourceFamily" ).toString();
if ( compatFamilyNames.find( family ) == compatFamilyNames.end() )
compatFamilyNames.append( family );
}
@@ -186,9 +186,9 @@ void ConfigPage::load()
const KTrader::OfferList managers = KTrader::self()->query( "KResources/Manager" );
KTrader::OfferList::ConstIterator m_it;
for( m_it = managers.begin(); m_it != managers.end(); ++m_it ) {
- QString displayName = (*m_it)->property( "Name" ).toString();
+ TQString displayName = (*m_it)->property( "Name" ).toString();
familyDisplayNames.append( displayName );
- QString family = (*m_it)->property( "X-KDE-ResourceFamily" ).toString();
+ TQString family = (*m_it)->property( "X-KDE-ResourceFamily" ).toString();
if ( !family.isEmpty() ) {
compatFamilyNames.remove( family );
mFamilyMap.append( family );
@@ -197,7 +197,7 @@ void ConfigPage::load()
}
// Rest of the kde-3.3 compat code
- QStringList::ConstIterator cfit = compatFamilyNames.begin();
+ TQStringList::ConstIterator cfit = compatFamilyNames.begin();
for ( ; cfit != compatFamilyNames.end(); ++cfit ) {
mFamilyMap.append( *cfit );
familyDisplayNames.append( *cfit );
@@ -215,7 +215,7 @@ void ConfigPage::load()
emit changed( false );
}
-void ConfigPage::loadManager( const QString& family )
+void ConfigPage::loadManager( const TQString& family )
{
mCurrentManager = new Manager<Resource>( family );
if ( mCurrentManager ) {
@@ -234,7 +234,7 @@ void ConfigPage::save()
{
saveResourceSettings();
- QValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
+ TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it )
(*it)->mManager->writeConfig( (*it)->mConfig );
@@ -291,16 +291,16 @@ void ConfigPage::slotAdd()
if ( !mCurrentManager )
return;
- QStringList types = mCurrentManager->resourceTypeNames();
- QStringList descs = mCurrentManager->resourceTypeDescriptions();
+ TQStringList types = mCurrentManager->resourceTypeNames();
+ TQStringList descs = mCurrentManager->resourceTypeDescriptions();
bool ok = false;
- QString desc = KInputDialog::getItem( i18n( "Resource Configuration" ),
+ TQString desc = KInputDialog::getItem( i18n( "Resource Configuration" ),
i18n( "Please select type of the new resource:" ), descs,
0, false, &ok, this );
if ( !ok )
return;
- QString type = types[ descs.findIndex( desc ) ];
+ TQString type = types[ descs.findIndex( desc ) ];
// Create new resource
Resource *resource = mCurrentManager->createResource( type );
@@ -325,7 +325,7 @@ void ConfigPage::slotAdd()
// as standard resource
if ( !resource->readOnly() ) {
bool onlyReadOnly = true;
- QListViewItem *it = mListView->firstChild();
+ TQListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it );
if ( !confIt->readOnly() && confIt != item )
@@ -350,7 +350,7 @@ void ConfigPage::slotRemove()
if ( !mCurrentManager )
return;
- QListViewItem *item = mListView->currentItem();
+ TQListViewItem *item = mListView->currentItem();
ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item );
if ( !confItem )
@@ -377,7 +377,7 @@ void ConfigPage::slotEdit()
if ( !mCurrentManager )
return;
- QListViewItem *item = mListView->currentItem();
+ TQListViewItem *item = mListView->currentItem();
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
if ( !configItem )
return;
@@ -419,7 +419,7 @@ void ConfigPage::slotStandard()
return;
}
- QListViewItem *it = mListView->firstChild();
+ TQListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it );
if ( configItem->standard() )
@@ -481,7 +481,7 @@ void ConfigPage::resourceDeleted( Resource *resource )
ConfigViewItem *ConfigPage::findItem( Resource *resource )
{
- QListViewItem *i;
+ TQListViewItem *i;
for( i = mListView->firstChild(); i; i = i->nextSibling() ) {
ConfigViewItem *item = static_cast<ConfigViewItem *>( i );
if ( item->resource() == resource ) return item;
@@ -489,7 +489,7 @@ ConfigViewItem *ConfigPage::findItem( Resource *resource )
return 0;
}
-void ConfigPage::slotItemClicked( QListViewItem *item )
+void ConfigPage::slotItemClicked( TQListViewItem *item )
{
ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
if ( !configItem ) return;
@@ -508,7 +508,7 @@ void ConfigPage::slotItemClicked( QListViewItem *item )
void ConfigPage::saveResourceSettings()
{
if ( mCurrentManager ) {
- QListViewItem *item = mListView->firstChild();
+ TQListViewItem *item = mListView->firstChild();
while ( item ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
diff --git a/kresources/configpage.h b/kresources/configpage.h
index 4a4231f07..eb24d84be 100644
--- a/kresources/configpage.h
+++ b/kresources/configpage.h
@@ -24,8 +24,8 @@
#define KRESOURCES_CONFIGPAGE_H
#include <ksharedptr.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include "manager.h"
@@ -49,12 +49,12 @@ class KRESOURCES_EXPORT ResourcePageInfo : public KShared
class Resource;
class ConfigViewItem;
-class KRESOURCES_EXPORT ConfigPage : public QWidget, public ManagerObserver<Resource>
+class KRESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<Resource>
{
Q_OBJECT
public:
- ConfigPage( QWidget *parent = 0, const char *name = 0 );
+ ConfigPage( TQWidget *parent = 0, const char *name = 0 );
virtual ~ConfigPage();
void load();
@@ -79,30 +79,30 @@ class KRESOURCES_EXPORT ConfigPage : public QWidget, public ManagerObserver<Reso
ConfigViewItem *findItem( Resource *resource );
protected slots:
- void slotItemClicked( QListViewItem * );
+ void slotItemClicked( TQListViewItem * );
signals:
void changed( bool );
private:
- void loadManager( const QString& family );
+ void loadManager( const TQString& family );
void saveResourceSettings();
Manager<Resource>* mCurrentManager;
KConfig* mCurrentConfig;
KConfig* mConfig;
- QString mFamily;
- QStringList mFamilyMap;
- QValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
+ TQString mFamily;
+ TQStringList mFamilyMap;
+ TQValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
KComboBox* mFamilyCombo;
KListView* mListView;
- QPushButton* mAddButton;
- QPushButton* mRemoveButton;
- QPushButton* mEditButton;
- QPushButton* mStandardButton;
+ TQPushButton* mAddButton;
+ TQPushButton* mRemoveButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mStandardButton;
- QListViewItem* mLastItem;
+ TQListViewItem* mLastItem;
};
}
diff --git a/kresources/configwidget.cpp b/kresources/configwidget.cpp
index 20197d81a..5d6f0f6b1 100644
--- a/kresources/configwidget.cpp
+++ b/kresources/configwidget.cpp
@@ -25,8 +25,8 @@
using namespace KRES;
-ConfigWidget::ConfigWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigWidget::ConfigWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
diff --git a/kresources/configwidget.h b/kresources/configwidget.h
index ae763978a..47917edd3 100644
--- a/kresources/configwidget.h
+++ b/kresources/configwidget.h
@@ -26,7 +26,7 @@
#include <kconfig.h>
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KRES {
@@ -34,7 +34,7 @@ class KRESOURCES_EXPORT ConfigWidget : public QWidget
{
Q_OBJECT
public:
- ConfigWidget( QWidget *parent = 0, const char *name = 0 );
+ ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
/**
Sets the widget to 'edit' mode. Reimplement this method if you are
diff --git a/kresources/factory.cpp b/kresources/factory.cpp
index eadd7a2c2..462d6be9c 100644
--- a/kresources/factory.cpp
+++ b/kresources/factory.cpp
@@ -27,23 +27,23 @@
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "resource.h"
#include "factory.h"
using namespace KRES;
-QDict<Factory> *Factory::mSelves = 0;
-static KStaticDeleter< QDict<Factory> > staticDeleter;
+TQDict<Factory> *Factory::mSelves = 0;
+static KStaticDeleter< TQDict<Factory> > staticDeleter;
-Factory *Factory::self( const QString& resourceFamily )
+Factory *Factory::self( const TQString& resourceFamily )
{
kdDebug(5650) << "Factory::self()" << endl;
Factory *factory = 0;
if ( !mSelves )
- staticDeleter.setObject( mSelves, new QDict<Factory> );
+ staticDeleter.setObject( mSelves, new TQDict<Factory> );
factory = mSelves->find( resourceFamily );
@@ -55,14 +55,14 @@ Factory *Factory::self( const QString& resourceFamily )
return factory;
}
-Factory::Factory( const QString& resourceFamily ) :
+Factory::Factory( const TQString& resourceFamily ) :
mResourceFamily( resourceFamily )
{
- KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" )
+ KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", TQString( "[X-KDE-ResourceFamily] == '%1'" )
.arg( resourceFamily ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
- QVariant type = (*it)->property( "X-KDE-ResourceType" );
+ TQVariant type = (*it)->property( "X-KDE-ResourceType" );
if ( !type.toString().isEmpty() )
mTypeMap.insert( type.toString(), *it );
}
@@ -72,12 +72,12 @@ Factory::~Factory()
{
}
-QStringList Factory::typeNames() const
+TQStringList Factory::typeNames() const
{
return mTypeMap.keys();
}
-ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
+ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent )
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
return 0;
@@ -107,25 +107,25 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
return wdg;
}
-QString Factory::typeName( const QString &type ) const
+TQString Factory::typeName( const TQString &type ) const
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return QString();
+ return TQString();
KService::Ptr ptr = mTypeMap[ type ];
return ptr->name();
}
-QString Factory::typeDescription( const QString &type ) const
+TQString Factory::typeDescription( const TQString &type ) const
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return QString();
+ return TQString();
KService::Ptr ptr = mTypeMap[ type ];
return ptr->comment();
}
-Resource *Factory::resource( const QString& type, const KConfig *config )
+Resource *Factory::resource( const TQString& type, const KConfig *config )
{
kdDebug(5650) << "Factory::resource( " << type << ", config )" << endl;
diff --git a/kresources/factory.h b/kresources/factory.h
index d7a1e069e..925ff2e82 100644
--- a/kresources/factory.h
+++ b/kresources/factory.h
@@ -24,8 +24,8 @@
#ifndef KRESOURCES_FACTORY_H
#define KRESOURCES_FACTORY_H
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <klibloader.h>
@@ -66,7 +66,7 @@ class KRESOURCES_EXPORT Factory
/**
* Returns the global resource factory.
*/
- static Factory *self( const QString& resourceFamily );
+ static Factory *self( const TQString& resourceFamily );
~Factory();
@@ -77,7 +77,7 @@ class KRESOURCES_EXPORT Factory
* @param type The type of the resource, returned by typeNames()
* @param parent The parent widget
*/
- ConfigWidget *configWidget( const QString& type, QWidget *parent = 0 );
+ ConfigWidget *configWidget( const TQString& type, TQWidget *parent = 0 );
/**
* Returns a pointer to a resource object or a null pointer
@@ -87,31 +87,31 @@ class KRESOURCES_EXPORT Factory
* @param config The config object where the resource get it settings from,
* or 0 if a resource with default values should be created.
*/
- Resource *resource( const QString& type, const KConfig *config );
+ Resource *resource( const TQString& type, const KConfig *config );
/**
* Returns a list of all available resource types.
*/
- QStringList typeNames() const;
+ TQStringList typeNames() const;
/**
* Returns the name for a special type.
*/
- QString typeName( const QString &type ) const;
+ TQString typeName( const TQString &type ) const;
/**
* Returns the description for a special type.
*/
- QString typeDescription( const QString &type ) const;
+ TQString typeDescription( const TQString &type ) const;
protected:
- Factory( const QString& resourceFamily );
+ Factory( const TQString& resourceFamily );
private:
- static QDict<Factory> *mSelves;
+ static TQDict<Factory> *mSelves;
- QString mResourceFamily;
- QMap<QString, KService::Ptr> mTypeMap;
+ TQString mResourceFamily;
+ TQMap<TQString, KService::Ptr> mTypeMap;
};
}
diff --git a/kresources/kcmkresources.cpp b/kresources/kcmkresources.cpp
index be7b22b5a..41fdb91fe 100644
--- a/kresources/kcmkresources.cpp
+++ b/kresources/kcmkresources.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kgenericfactory.h>
@@ -29,16 +29,16 @@
#include "kcmkresources.h"
-typedef KGenericFactory<KCMKResources, QWidget> ResourcesFactory;
+typedef KGenericFactory<KCMKResources, TQWidget> ResourcesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kresources, ResourcesFactory( "kcmkresources" ) )
-KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& )
+KCMKResources::KCMKResources( TQWidget *parent, const char *name, const TQStringList& )
: KCModule( ResourcesFactory::instance(), parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mConfigPage = new KRES::ConfigPage( this );
layout->addWidget( mConfigPage );
- connect( mConfigPage, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
+ connect( mConfigPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) );
setButtons( Help | Apply );
KAboutData *about =
new KAboutData( I18N_NOOP( "kcmkresources" ),
diff --git a/kresources/kcmkresources.h b/kresources/kcmkresources.h
index 2f090bdec..97a3183e0 100644
--- a/kresources/kcmkresources.h
+++ b/kresources/kcmkresources.h
@@ -29,7 +29,7 @@ class KRESOURCES_EXPORT KCMKResources : public KCModule
Q_OBJECT
public:
- KCMKResources( QWidget *parent, const char *name, const QStringList& );
+ KCMKResources( TQWidget *parent, const char *name, const TQStringList& );
void load();
void save();
diff --git a/kresources/manager.h b/kresources/manager.h
index b129a7317..ab1562716 100644
--- a/kresources/manager.h
+++ b/kresources/manager.h
@@ -24,8 +24,8 @@
#ifndef KRESOURCES_MANAGER_H
#define KRESOURCES_MANAGER_H
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kresources/factory.h>
@@ -209,7 +209,7 @@ class Manager : private ManagerNotifier
Create manager for given resource family. The family argument is used as
identifier for loading and saving resource configurations.
*/
- Manager( const QString &family )
+ Manager( const TQString &family )
{
mFactory = Factory::self( family );
// The managerimpl will use the same Factory object as the manager
@@ -295,7 +295,7 @@ class Manager : private ManagerNotifier
Returns a list of the names of the resources managed by the
Manager for this family.
*/
- QStringList resourceNames() const
+ TQStringList resourceNames() const
{
return mImpl->resourceNames();
}
@@ -310,7 +310,7 @@ class Manager : private ManagerNotifier
@param type The type of the resource, one of those returned
by resourceTypeNames()
*/
- T *createResource( const QString& type )
+ T *createResource( const TQString& type )
{
return dynamic_cast<T *>( mFactory->resource( type, 0 ) );
}
@@ -318,7 +318,7 @@ class Manager : private ManagerNotifier
/**
Returns a list of the names of all available resource types.
*/
- QStringList resourceTypeNames() const
+ TQStringList resourceTypeNames() const
{
return mFactory->typeNames();
}
@@ -326,16 +326,16 @@ class Manager : private ManagerNotifier
/**
Return list of descriptions of all available resource types.
*/
- QStringList resourceTypeDescriptions() const
+ TQStringList resourceTypeDescriptions() const
{
- QStringList typeDescs;
- QStringList types = mFactory->typeNames();
+ TQStringList typeDescs;
+ TQStringList types = mFactory->typeNames();
- for ( QStringList::ConstIterator it = types.begin(); it != types.end();
+ for ( TQStringList::ConstIterator it = types.begin(); it != types.end();
++it ) {
- QString desc = mFactory->typeName( *it );
+ TQString desc = mFactory->typeName( *it );
if ( !mFactory->typeDescription( *it ).isEmpty() )
- desc += QString::fromLatin1(" (") + mFactory->typeDescription( *it ) + QString::fromLatin1(")");
+ desc += TQString::fromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::fromLatin1(")");
typeDescs.append( desc );
}
@@ -414,7 +414,7 @@ class Manager : private ManagerNotifier
private:
ManagerImpl *mImpl;
Factory *mFactory;
- QPtrList<ManagerObserver<T> > mObservers;
+ TQPtrList<ManagerObserver<T> > mObservers;
};
}
diff --git a/kresources/manageriface.h b/kresources/manageriface.h
index 7644d7bc2..8f82ea4b7 100644
--- a/kresources/manageriface.h
+++ b/kresources/manageriface.h
@@ -31,14 +31,14 @@ class KRESOURCES_EXPORT ManagerIface : virtual public DCOPObject
K_DCOP
k_dcop_signals:
- void signalKResourceAdded( QString managerId, QString resourceId );
- void signalKResourceModified( QString managerId, QString resourceId );
- void signalKResourceDeleted( QString managerId, QString resourceId );
+ void signalKResourceAdded( TQString managerId, TQString resourceId );
+ void signalKResourceModified( TQString managerId, TQString resourceId );
+ void signalKResourceDeleted( TQString managerId, TQString resourceId );
k_dcop:
- virtual ASYNC dcopKResourceAdded( QString managerId, QString resourceId ) = 0;
- virtual ASYNC dcopKResourceModified( QString managerId, QString resourceId ) = 0;
- virtual ASYNC dcopKResourceDeleted( QString managerId, QString resourceId ) = 0;
+ virtual ASYNC dcopKResourceAdded( TQString managerId, TQString resourceId ) = 0;
+ virtual ASYNC dcopKResourceModified( TQString managerId, TQString resourceId ) = 0;
+ virtual ASYNC dcopKResourceDeleted( TQString managerId, TQString resourceId ) = 0;
};
}
diff --git a/kresources/managerimpl.cpp b/kresources/managerimpl.cpp
index 01380e03b..b5d9ec32f 100644
--- a/kresources/managerimpl.cpp
+++ b/kresources/managerimpl.cpp
@@ -37,7 +37,7 @@
using namespace KRES;
-ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const QString &family )
+ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const TQString &family )
: DCOPObject( "ManagerIface_" + family.utf8() ),
mNotifier( notifier ),
mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ),
@@ -55,18 +55,18 @@ ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const QString &family )
kdDebug(5650) << "Connecting DCOP signals..." << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceAdded( QString, QString )",
- "dcopKResourceAdded( QString, QString )", false ) )
+ "signalKResourceAdded( TQString, TQString )",
+ "dcopKResourceAdded( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceAdded signal!" << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceModified( QString, QString )",
- "dcopKResourceModified( QString, QString )", false ) )
+ "signalKResourceModified( TQString, TQString )",
+ "dcopKResourceModified( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceModified signal!" << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceDeleted( QString, QString )",
- "dcopKResourceDeleted( QString, QString )", false ) )
+ "signalKResourceDeleted( TQString, TQString )",
+ "dcopKResourceDeleted( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceDeleted signal!" << endl;
kapp->dcopClient()->setNotifications( true );
@@ -87,7 +87,7 @@ ManagerImpl::~ManagerImpl()
void ManagerImpl::createStandardConfig()
{
if ( !mStdConfig ) {
- QString file = defaultConfigFile( mFamily );
+ TQString file = defaultConfigFile( mFamily );
mStdConfig = new KConfig( file );
}
@@ -111,12 +111,12 @@ void ManagerImpl::readConfig( KConfig *cfg )
mConfig->setGroup( "General" );
- QStringList keys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList keys = mConfig->readListEntry( "ResourceKeys" );
keys += mConfig->readListEntry( "PassiveResourceKeys" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
- for ( QStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
+ for ( TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
readResourceConfig( *it, false );
}
@@ -133,15 +133,15 @@ void ManagerImpl::writeConfig( KConfig *cfg )
mConfig = cfg;
}
- QStringList activeKeys;
- QStringList passiveKeys;
+ TQStringList activeKeys;
+ TQStringList passiveKeys;
// First write all keys, collect active and passive keys on the way
Resource::List::Iterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
writeResourceConfig( *it, false );
- QString key = (*it)->identifier();
+ TQString key = (*it)->identifier();
if( (*it)->isActive() )
activeKeys.append( key );
else
@@ -219,7 +219,7 @@ void ManagerImpl::setStandardResource( Resource *resource )
// DCOP asynchronous functions
-void ManagerImpl::dcopKResourceAdded( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceAdded( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -243,7 +243,7 @@ void ManagerImpl::dcopKResourceAdded( QString managerId, QString resourceId )
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceModified( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceModified( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -259,7 +259,7 @@ void ManagerImpl::dcopKResourceModified( QString managerId, QString resourceId )
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceDeleted( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceDeleted( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -281,9 +281,9 @@ void ManagerImpl::dcopKResourceDeleted( QString managerId, QString resourceId )
<< resourceId << endl;
}
-QStringList ManagerImpl::resourceNames()
+TQStringList ManagerImpl::resourceNames()
{
- QStringList result;
+ TQStringList result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -297,9 +297,9 @@ Resource::List *ManagerImpl::resourceList()
return &mResources;
}
-QPtrList<Resource> ManagerImpl::resources()
+TQPtrList<Resource> ManagerImpl::resources()
{
- QPtrList<Resource> result;
+ TQPtrList<Resource> result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -308,9 +308,9 @@ QPtrList<Resource> ManagerImpl::resources()
return result;
}
-QPtrList<Resource> ManagerImpl::resources( bool active )
+TQPtrList<Resource> ManagerImpl::resources( bool active )
{
- QPtrList<Resource> result;
+ TQPtrList<Resource> result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -321,7 +321,7 @@ QPtrList<Resource> ManagerImpl::resources( bool active )
return result;
}
-Resource *ManagerImpl::readResourceConfig( const QString &identifier,
+Resource *ManagerImpl::readResourceConfig( const TQString &identifier,
bool checkActive )
{
kdDebug(5650) << "ManagerImpl::readResourceConfig() " << identifier << endl;
@@ -333,8 +333,8 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
mConfig->setGroup( "Resource_" + identifier );
- QString type = mConfig->readEntry( "ResourceType" );
- QString name = mConfig->readEntry( "ResourceName" );
+ TQString type = mConfig->readEntry( "ResourceType" );
+ TQString name = mConfig->readEntry( "ResourceName" );
Resource *resource = mFactory->resource( type, mConfig );
if ( !resource ) {
kdDebug(5650) << "Failed to create resource with id " << identifier << endl;
@@ -346,13 +346,13 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
mConfig->setGroup( "General" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( standardKey == identifier ) {
mStandard = resource;
}
if ( checkActive ) {
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
resource->setActive( activeKeys.contains( identifier ) );
}
mResources.append( resource );
@@ -362,7 +362,7 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
{
- QString key = resource->identifier();
+ TQString key = resource->identifier();
kdDebug(5650) << "Saving resource " << key << endl;
@@ -372,7 +372,7 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
resource->writeConfig( mConfig );
mConfig->setGroup( "General" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( resource == mStandard && standardKey != key )
mConfig->writeEntry( "Standard", resource->identifier() );
@@ -380,8 +380,8 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
mConfig->writeEntry( "Standard", "" );
if ( checkActive ) {
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
- QStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
if ( resource->isActive() ) {
if ( passiveKeys.contains( key ) ) { // remove it from passive list
passiveKeys.remove( key );
@@ -408,22 +408,22 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
void ManagerImpl::removeResource( Resource *resource )
{
- QString key = resource->identifier();
+ TQString key = resource->identifier();
if ( !mConfig ) createStandardConfig();
mConfig->setGroup( "General" );
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
if ( activeKeys.contains( key ) ) {
activeKeys.remove( key );
mConfig->writeEntry( "ResourceKeys", activeKeys );
} else {
- QStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
+ TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
passiveKeys.remove( key );
mConfig->writeEntry( "PassiveResourceKeys", passiveKeys );
}
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( standardKey == key ) {
mConfig->writeEntry( "Standard", "" );
}
@@ -432,7 +432,7 @@ void ManagerImpl::removeResource( Resource *resource )
mConfig->sync();
}
-Resource *ManagerImpl::getResource( const QString &identifier )
+Resource *ManagerImpl::getResource( const TQString &identifier )
{
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -442,7 +442,7 @@ Resource *ManagerImpl::getResource( const QString &identifier )
return 0;
}
-QString ManagerImpl::defaultConfigFile( const QString &family )
+TQString ManagerImpl::defaultConfigFile( const TQString &family )
{
- return QString( "kresources/%1/stdrc" ).arg( family );
+ return TQString( "kresources/%1/stdrc" ).arg( family );
}
diff --git a/kresources/managerimpl.h b/kresources/managerimpl.h
index 107f7b1f0..e86ea3d9d 100644
--- a/kresources/managerimpl.h
+++ b/kresources/managerimpl.h
@@ -23,9 +23,9 @@
#ifndef KRESOURCES_MANAGERIMPL_H
#define KRESOURCES_MANAGERIMPL_H
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "manageriface.h"
#include <kresources/resource.h>
@@ -46,7 +46,7 @@ class ManagerNotifier;
class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
{
public:
- ManagerImpl( ManagerNotifier *, const QString &family );
+ ManagerImpl( ManagerNotifier *, const TQString &family );
~ManagerImpl();
void readConfig( KConfig * );
@@ -63,39 +63,39 @@ class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
Resource::List *resourceList();
- QPtrList<Resource> resources();
+ TQPtrList<Resource> resources();
// Get only active or passive resources
- QPtrList<Resource> resources( bool active );
+ TQPtrList<Resource> resources( bool active );
- QStringList resourceNames();
+ TQStringList resourceNames();
- static QString defaultConfigFile( const QString &family );
+ static TQString defaultConfigFile( const TQString &family );
private:
// dcop calls
- void dcopKResourceAdded( QString managerId, QString resourceId );
- void dcopKResourceModified( QString managerId, QString resourceId );
- void dcopKResourceDeleted( QString managerId, QString resourceId );
+ void dcopKResourceAdded( TQString managerId, TQString resourceId );
+ void dcopKResourceModified( TQString managerId, TQString resourceId );
+ void dcopKResourceDeleted( TQString managerId, TQString resourceId );
private:
void createStandardConfig();
- Resource *readResourceConfig( const QString& identifier, bool checkActive );
+ Resource *readResourceConfig( const TQString& identifier, bool checkActive );
void writeResourceConfig( Resource *resource, bool checkActive );
void removeResource( Resource *resource );
Resource *getResource( Resource *resource );
- Resource *getResource( const QString& identifier );
+ Resource *getResource( const TQString& identifier );
ManagerNotifier *mNotifier;
- QString mFamily;
+ TQString mFamily;
KConfig *mConfig;
KConfig *mStdConfig;
Resource *mStandard;
Factory *mFactory;
Resource::List mResources;
- QString mId;
+ TQString mId;
bool mConfigRead;
class ManagerImplPrivate;
diff --git a/kresources/resource.cpp b/kresources/resource.cpp
index ff30cb552..b9cdd95c4 100644
--- a/kresources/resource.cpp
+++ b/kresources/resource.cpp
@@ -33,19 +33,19 @@ class Resource::ResourcePrivate
{
public:
#ifdef QT_THREAD_SUPPORT
- QMutex mMutex;
+ TQMutex mMutex;
#endif
int mOpenCount;
- QString mType;
- QString mIdentifier;
+ TQString mType;
+ TQString mIdentifier;
bool mReadOnly;
- QString mName;
+ TQString mName;
bool mActive;
bool mIsOpen;
};
Resource::Resource( const KConfig* config )
- : QObject( 0, "" ), d( new ResourcePrivate )
+ : TQObject( 0, "" ), d( new ResourcePrivate )
{
d->mOpenCount = 0;
d->mIsOpen = false;
@@ -86,7 +86,7 @@ bool Resource::open()
{
d->mIsOpen = true;
#ifdef QT_THREAD_SUPPORT
- QMutexLocker guard( &(d->mMutex) );
+ TQMutexLocker guard( &(d->mMutex) );
#endif
if ( !d->mOpenCount ) {
kdDebug(5650) << "Opening resource " << resourceName() << endl;
@@ -99,7 +99,7 @@ bool Resource::open()
void Resource::close()
{
#ifdef QT_THREAD_SUPPORT
- QMutexLocker guard( &(d->mMutex) );
+ TQMutexLocker guard( &(d->mMutex) );
#endif
if ( !d->mOpenCount ) {
kdDebug(5650) << "ERROR: Resource " << resourceName() << " closed more times than previously opened" << endl;
@@ -120,22 +120,22 @@ bool Resource::isOpen() const
return d->mIsOpen;
}
-void Resource::setIdentifier( const QString& identifier )
+void Resource::setIdentifier( const TQString& identifier )
{
d->mIdentifier = identifier;
}
-QString Resource::identifier() const
+TQString Resource::identifier() const
{
return d->mIdentifier;
}
-void Resource::setType( const QString& type )
+void Resource::setType( const TQString& type )
{
d->mType = type;
}
-QString Resource::type() const
+TQString Resource::type() const
{
return d->mType;
}
@@ -150,12 +150,12 @@ bool Resource::readOnly() const
return d->mReadOnly;
}
-void Resource::setResourceName( const QString &name )
+void Resource::setResourceName( const TQString &name )
{
d->mName = name;
}
-QString Resource::resourceName() const
+TQString Resource::resourceName() const
{
return d->mName;
}
diff --git a/kresources/resource.h b/kresources/resource.h
index f0e988fe3..63190378d 100644
--- a/kresources/resource.h
+++ b/kresources/resource.h
@@ -22,9 +22,9 @@
#ifndef KRESOURCES_RESOURCE_H
#define KRESOURCES_RESOURCE_H
-#include <qmutex.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <klibloader.h>
@@ -77,8 +77,8 @@ class ResourceExample : public KRES::Resource
void writeConfig( KConfig *config );
private:
- QString mLocation;
- QString mPassword;
+ TQString mLocation;
+ TQString mPassword;
}
\endcode
@@ -109,7 +109,7 @@ void ResourceExample::writeConfig( KConfig *config )
extern "C"
{
- KRES::ResourceExample *config_widget( QWidget *parent ) {
+ KRES::ResourceExample *config_widget( TQWidget *parent ) {
return new ResourceExampleConfig( parent, "Configure Example Resource" );
}
@@ -130,7 +130,7 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget
{
Q_OBJECT
public:
- ResourceExampleConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceExampleConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -144,25 +144,25 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget
<B>resourceexampleconfig.cpp</B>:
\code
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kresources/resourceconfigwidget.h>
#include "resourceexample.h"
#include "resourceexampleconfig.h"
-ResourceExampleConfig::ResourceExampleConfig( QWidget *parent, const char *name )
+ResourceExampleConfig::ResourceExampleConfig( TQWidget *parent, const char *name )
: KRES::ResourceConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n( "Location:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Location:" ), this );
mHostEdit = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mHostEdit, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPasswordEdit = new KLineEdit( this );
- mPasswordEdit->setEchoMode( QLineEdit::Password );
+ mPasswordEdit->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPasswordEdit, 2, 1 );
}
@@ -259,7 +259,7 @@ class KRESOURCES_EXPORT Resource : public QObject
Q_OBJECT
public:
- typedef QValueList<Resource *> List;
+ typedef TQValueList<Resource *> List;
/**
* Constructor. Construct resource from config.
@@ -311,12 +311,12 @@ class KRESOURCES_EXPORT Resource : public QObject
* in the resource family configuration file for this resource.
* @return This resource's identifier
*/
- QString identifier() const;
+ TQString identifier() const;
/**
* Returns the type of this resource.
*/
- QString type() const;
+ TQString type() const;
/**
* Mark the resource as read-only. You can override this method,
@@ -333,12 +333,12 @@ class KRESOURCES_EXPORT Resource : public QObject
* Set the name of resource. You can override this method,
* but also remember to call Resource::setResourceName().
*/
- virtual void setResourceName( const QString &name );
+ virtual void setResourceName( const TQString &name );
/**
* Returns the name of resource.
*/
- virtual QString resourceName() const;
+ virtual TQString resourceName() const;
/**
Sets, if the resource is active.
@@ -373,8 +373,8 @@ class KRESOURCES_EXPORT Resource : public QObject
*/
virtual void doClose() {}
- void setIdentifier( const QString &identifier );
- void setType( const QString &type );
+ void setIdentifier( const TQString &identifier );
+ void setType( const TQString &type );
private:
class ResourcePrivate;
@@ -386,11 +386,11 @@ class KRESOURCES_EXPORT PluginFactoryBase : public KLibFactory
public:
virtual Resource *resource( const KConfig *config ) = 0;
- virtual ConfigWidget *configWidget( QWidget *parent ) = 0;
+ virtual ConfigWidget *configWidget( TQWidget *parent ) = 0;
protected:
- virtual QObject* createObject( QObject *parent, const char *name, const char *className,
- const QStringList & args)
+ virtual TQObject* createObject( TQObject *parent, const char *name, const char *className,
+ const TQStringList & args)
{
Q_UNUSED(parent);
Q_UNUSED(name);
@@ -409,7 +409,7 @@ class PluginFactory : public PluginFactoryBase
return new TR( config );
}
- ConfigWidget *configWidget( QWidget *parent )
+ ConfigWidget *configWidget( TQWidget *parent )
{
return new TC( parent );
}
diff --git a/kresources/selectdialog.cpp b/kresources/selectdialog.cpp
index a36e7ec48..cc1c7e593 100644
--- a/kresources/selectdialog.cpp
+++ b/kresources/selectdialog.cpp
@@ -26,8 +26,8 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include "resource.h"
@@ -35,17 +35,17 @@
using namespace KRES;
-SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
+SelectDialog::SelectDialog( TQPtrList<Resource> list, TQWidget *parent,
const char *name )
: KDialog( parent, name, true )
{
setCaption( i18n( "Resource Selection" ) );
resize( 300, 200 );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
mainLayout->setMargin( marginHint() );
- QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this );
+ TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this );
groupBox->setTitle( i18n( "Resources" ) );
mResourceId = new KListBox( groupBox );
@@ -57,8 +57,8 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
KButtonBox *buttonBox = new KButtonBox( this );
buttonBox->addStretch();
- buttonBox->addButton( KStdGuiItem::ok(), this, SLOT( accept() ) );
- buttonBox->addButton( KStdGuiItem::cancel(), this, SLOT( reject() ) );
+ buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) );
+ buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) );
buttonBox->layout();
mainLayout->addWidget( buttonBox );
@@ -75,10 +75,10 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
}
mResourceId->setCurrentItem( 0 );
- connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)),
- SLOT(accept()) );
- connect( mResourceId, SIGNAL( executed( QListBoxItem* ) ),
- SLOT( accept() ) );
+ connect( mResourceId, TQT_SIGNAL(returnPressed(TQListBoxItem*)),
+ TQT_SLOT(accept()) );
+ connect( mResourceId, TQT_SIGNAL( executed( TQListBoxItem* ) ),
+ TQT_SLOT( accept() ) );
}
Resource *SelectDialog::resource()
@@ -89,7 +89,7 @@ Resource *SelectDialog::resource()
return 0;
}
-Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent )
+Resource *SelectDialog::getResource( TQPtrList<Resource> list, TQWidget *parent )
{
if ( list.count() == 0 ) {
KMessageBox::error( parent, i18n( "There is no resource available!" ) );
diff --git a/kresources/selectdialog.h b/kresources/selectdialog.h
index 5ec90fc58..26905e47b 100644
--- a/kresources/selectdialog.h
+++ b/kresources/selectdialog.h
@@ -24,9 +24,9 @@
#ifndef KRESOURCES_SELECTDIALOG_H
#define KRESOURCES_SELECTDIALOG_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <kdialog.h>
@@ -43,7 +43,7 @@ class Resource;
*
* \code
*
- * QPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
+ * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
*
* KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
* if ( !res ) {
@@ -62,7 +62,7 @@ class KRESOURCES_EXPORT SelectDialog : KDialog
* @param parent The parent widget
* @param name The name of the dialog
*/
- SelectDialog( QPtrList<Resource> list, QWidget *parent = 0,
+ SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
const char *name = 0);
/**
@@ -74,12 +74,12 @@ class KRESOURCES_EXPORT SelectDialog : KDialog
* Opens a dialog showing the available resources and returns the resource the
* user has selected. Returns 0, if the dialog was canceled.
*/
- static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 );
+ static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
private:
KListBox *mResourceId;
- QMap<int, Resource*> mResourceMap;
+ TQMap<int, Resource*> mResourceMap;
};
}
diff --git a/kspell2/backgroundchecker.cpp b/kspell2/backgroundchecker.cpp
index cf02e0714..799edf120 100644
--- a/kspell2/backgroundchecker.cpp
+++ b/kspell2/backgroundchecker.cpp
@@ -34,22 +34,22 @@ class BackgroundChecker::Private
public:
//BackgroundThread thread;
BackgroundEngine *engine;
- QString currentText;
+ TQString currentText;
};
-BackgroundChecker::BackgroundChecker( const Broker::Ptr& broker, QObject* parent,
+BackgroundChecker::BackgroundChecker( const Broker::Ptr& broker, TQObject* parent,
const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
d = new Private;
//d->thread.setReceiver( this );
//d->thread.setBroker( broker );
d->engine = new BackgroundEngine( this );
d->engine->setBroker( broker );
- connect( d->engine, SIGNAL(misspelling( const QString&, int )),
- SIGNAL(misspelling( const QString&, int )) );
- connect( d->engine, SIGNAL(done()),
- SLOT(slotEngineDone()) );
+ connect( d->engine, TQT_SIGNAL(misspelling( const TQString&, int )),
+ TQT_SIGNAL(misspelling( const TQString&, int )) );
+ connect( d->engine, TQT_SIGNAL(done()),
+ TQT_SLOT(slotEngineDone()) );
}
BackgroundChecker::~BackgroundChecker()
@@ -57,7 +57,7 @@ BackgroundChecker::~BackgroundChecker()
delete d;
}
-void BackgroundChecker::checkText( const QString& text )
+void BackgroundChecker::checkText( const TQString& text )
{
d->currentText = text;
//d->thread.setText( text );
@@ -81,9 +81,9 @@ void BackgroundChecker::stop()
d->engine->stop();
}
-QString BackgroundChecker::getMoreText()
+TQString BackgroundChecker::getMoreText()
{
- return QString::null;
+ return TQString::null;
}
void BackgroundChecker::finishedCurrentFeed()
@@ -108,24 +108,24 @@ Broker *BackgroundChecker::broker() const
return d->engine->broker();
}
-bool BackgroundChecker::checkWord( const QString& word )
+bool BackgroundChecker::checkWord( const TQString& word )
{
//kdDebug()<<"checking word \""<<word<< "\""<<endl;
return d->engine->checkWord( word );
}
-bool BackgroundChecker::addWord( const QString& word )
+bool BackgroundChecker::addWord( const TQString& word )
{
return d->engine->addWord( word );
}
-QStringList BackgroundChecker::suggest( const QString& word ) const
+TQStringList BackgroundChecker::suggest( const TQString& word ) const
{
//return d->thread.suggest( word );
return d->engine->suggest( word );
}
-void BackgroundChecker::changeLanguage( const QString& lang )
+void BackgroundChecker::changeLanguage( const TQString& lang )
{
//d->thread.changeLanguage( lang );
d->engine->changeLanguage( lang );
@@ -152,12 +152,12 @@ void BackgroundChecker::slotEngineDone()
//////////////////////////////////////////////////////////////////
#if 0
-void BackgroundChecker::customEvent( QCustomEvent *event )
+void BackgroundChecker::customEvent( TQCustomEvent *event )
{
if ( (int)event->type() == FoundMisspelling ) {
MisspellingEvent *me = static_cast<MisspellingEvent*>( event );
kdDebug()<<"Found misspelling of \"" << me->word() << "\"" <<endl;
- QString currentWord = d->currentText.mid( me->position(), me->word().length() );
+ TQString currentWord = d->currentText.mid( me->position(), me->word().length() );
if ( currentWord == me->word() )
emit misspelling( me->word(), me->position() );
else {
@@ -171,7 +171,7 @@ void BackgroundChecker::customEvent( QCustomEvent *event )
else
d->thread.setText( d->currentText );
} else {
- QObject::customEvent( event );
+ TQObject::customEvent( event );
}
}
#endif
diff --git a/kspell2/backgroundchecker.h b/kspell2/backgroundchecker.h
index 3c25d3749..c3f2cbc1b 100644
--- a/kspell2/backgroundchecker.h
+++ b/kspell2/backgroundchecker.h
@@ -50,7 +50,7 @@ namespace KSpell2
{
Q_OBJECT
public:
- BackgroundChecker( const Broker::Ptr& broker, QObject *parent =0,
+ BackgroundChecker( const Broker::Ptr& broker, TQObject *parent =0,
const char *name =0 );
~BackgroundChecker();
@@ -60,16 +60,16 @@ namespace KSpell2
*
* Use getMoreText() with start() to spell check a stream.
*/
- void checkText( const QString& );
+ void checkText( const TQString& );
Filter *filter() const;
Broker *broker() const;
- void changeLanguage( const QString& lang );
+ void changeLanguage( const TQString& lang );
- bool checkWord( const QString& word );
- QStringList suggest( const QString& ) const;
- bool addWord( const QString& word );
+ bool checkWord( const TQString& word );
+ TQStringList suggest( const TQString& ) const;
+ bool addWord( const TQString& word );
public slots:
virtual void setFilter( KSpell2::Filter *filter );
virtual void start();
@@ -86,7 +86,7 @@ namespace KSpell2
/**
* Emitted whenever a misspelled word is found
*/
- void misspelling( const QString& word, int start );
+ void misspelling( const TQString& word, int start );
/**
* Emitted after the whole text has been spell checked.
@@ -96,13 +96,13 @@ namespace KSpell2
protected:
/**
* This function is called to get the text to spell check.
- * It will be called continuesly until it returns QString::null
+ * It will be called continuesly until it returns TQString::null
* in which case the done() singnal is emitted.
* Note: the start parameter in mispelling() is not a combined
* position but a position in the last string returned
* by getMoreText. You need to store the state in the derivatives.
*/
- virtual QString getMoreText();
+ virtual TQString getMoreText();
/**
* This function will be called whenever the background checker
@@ -113,7 +113,7 @@ namespace KSpell2
protected slots:
void slotEngineDone();
protected:
- //void customEvent( QCustomEvent *event );
+ //void customEvent( TQCustomEvent *event );
private:
class Private;
Private *d;
diff --git a/kspell2/backgroundengine.cpp b/kspell2/backgroundengine.cpp
index d5394dbb5..9eafe1b2e 100644
--- a/kspell2/backgroundengine.cpp
+++ b/kspell2/backgroundengine.cpp
@@ -26,12 +26,12 @@
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KSpell2;
-BackgroundEngine::BackgroundEngine( QObject *parent )
- : QObject( parent )
+BackgroundEngine::BackgroundEngine( TQObject *parent )
+ : TQObject( parent )
{
m_filter = Filter::defaultFilter();
m_dict = 0;
@@ -50,17 +50,17 @@ void BackgroundEngine::setBroker( const Broker::Ptr& broker )
m_filter->setSettings( m_broker->settings() );
}
-void BackgroundEngine::setText( const QString& text )
+void BackgroundEngine::setText( const TQString& text )
{
m_filter->setBuffer( text );
}
-QString BackgroundEngine::text() const
+TQString BackgroundEngine::text() const
{
return m_filter->buffer();
}
-void BackgroundEngine::changeLanguage( const QString& lang )
+void BackgroundEngine::changeLanguage( const TQString& lang )
{
delete m_dict;
if ( lang.isEmpty() ) {
@@ -70,7 +70,7 @@ void BackgroundEngine::changeLanguage( const QString& lang )
}
}
-QString BackgroundEngine::language() const
+TQString BackgroundEngine::language() const
{
if ( m_dict )
return m_dict->language();
@@ -80,14 +80,14 @@ QString BackgroundEngine::language() const
void BackgroundEngine::setFilter( Filter *filter )
{
- QString oldText = m_filter->buffer();
+ TQString oldText = m_filter->buffer();
m_filter = filter;
m_filter->setBuffer( oldText );
}
void BackgroundEngine::start()
{
- QTimer::singleShot( 0, this, SLOT(checkNext()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(checkNext()) );
}
void BackgroundEngine::stop()
@@ -96,7 +96,7 @@ void BackgroundEngine::stop()
void BackgroundEngine::continueChecking()
{
- QTimer::singleShot( 0, this, SLOT(checkNext()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(checkNext()) );
}
void BackgroundEngine::checkNext()
@@ -117,19 +117,19 @@ void BackgroundEngine::checkNext()
continueChecking();
}
-bool BackgroundEngine::checkWord( const QString& word )
+bool BackgroundEngine::checkWord( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->check( word );
}
-bool BackgroundEngine::addWord( const QString& word )
+bool BackgroundEngine::addWord( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->addToPersonal( word );
}
-QStringList BackgroundEngine::suggest( const QString& word )
+TQStringList BackgroundEngine::suggest( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->suggest( word );
diff --git a/kspell2/backgroundengine.h b/kspell2/backgroundengine.h
index 9ae2f4a73..9534e970c 100644
--- a/kspell2/backgroundengine.h
+++ b/kspell2/backgroundengine.h
@@ -23,8 +23,8 @@
#include "broker.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
namespace KSpell2
{
@@ -35,17 +35,17 @@ namespace KSpell2
{
Q_OBJECT
public:
- BackgroundEngine( QObject *parent );
+ BackgroundEngine( TQObject *parent );
~BackgroundEngine();
void setBroker( const Broker::Ptr& broker );
Broker *broker() const { return m_broker; }
- void setText( const QString& );
- QString text() const;
+ void setText( const TQString& );
+ TQString text() const;
- void changeLanguage( const QString& );
- QString language() const;
+ void changeLanguage( const TQString& );
+ TQString language() const;
void setFilter( Filter *filter );
Filter *filter() const { return m_filter; }
@@ -54,11 +54,11 @@ namespace KSpell2
void continueChecking();
void stop();
- bool checkWord( const QString& word );
- QStringList suggest( const QString& word );
- bool addWord( const QString& word );
+ bool checkWord( const TQString& word );
+ TQStringList suggest( const TQString& word );
+ bool addWord( const TQString& word );
signals:
- void misspelling( const QString&, int );
+ void misspelling( const TQString&, int );
void done();
protected slots:
void checkNext();
diff --git a/kspell2/backgroundthread.cpp b/kspell2/backgroundthread.cpp
index ffa5d0d8a..0f3471537 100644
--- a/kspell2/backgroundthread.cpp
+++ b/kspell2/backgroundthread.cpp
@@ -26,19 +26,19 @@
#include "dictionary.h"
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
using namespace KSpell2;
BackgroundThread::BackgroundThread()
- : QThread(), m_broker( 0 ), m_dict( 0 )
+ : TQThread(), m_broker( 0 ), m_dict( 0 )
{
m_recv = 0;
m_filter = Filter::defaultFilter();
m_done = false;
}
-void BackgroundThread::setReceiver( QObject *recv )
+void BackgroundThread::setReceiver( TQObject *recv )
{
m_recv = recv;
}
@@ -52,7 +52,7 @@ void BackgroundThread::setBroker( const Broker::Ptr& broker )
m_filter->restart();
}
-QStringList BackgroundThread::suggest( const QString& word ) const
+TQStringList BackgroundThread::suggest( const TQString& word ) const
{
return m_dict->suggest( word );
}
@@ -65,15 +65,15 @@ void BackgroundThread::run()
w = m_filter->nextWord() ) {
if ( !m_dict->check( w.word ) && !m_done ) {
MisspellingEvent *event = new MisspellingEvent( w.word, w.start );
- QApplication::postEvent( m_recv, event );
+ TQApplication::postEvent( m_recv, event );
}
}
m_mutex.unlock();
FinishedCheckingEvent *event = new FinishedCheckingEvent();
- QApplication::postEvent( m_recv, event );
+ TQApplication::postEvent( m_recv, event );
}
-void BackgroundThread::setText( const QString& buff )
+void BackgroundThread::setText( const TQString& buff )
{
stop();
m_mutex.lock();
@@ -90,13 +90,13 @@ void BackgroundThread::setFilter( Filter *filter )
m_filter = filter;
if ( oldFilter ) {
m_filter->setBuffer( oldFilter->buffer() );
- oldFilter->setBuffer( QString::null );
+ oldFilter->setBuffer( TQString::null );
}
m_mutex.unlock();
start();
}
-void BackgroundThread::changeLanguage( const QString& lang )
+void BackgroundThread::changeLanguage( const TQString& lang )
{
stop();
m_mutex.lock();
diff --git a/kspell2/backgroundthread.h b/kspell2/backgroundthread.h
index 6d15baff5..376fda97d 100644
--- a/kspell2/backgroundthread.h
+++ b/kspell2/backgroundthread.h
@@ -23,8 +23,8 @@
#include "broker.h"
-#include <qthread.h>
-#include <qmutex.h>
+#include <tqthread.h>
+#include <tqmutex.h>
class QObject;
@@ -37,28 +37,28 @@ namespace KSpell2
{
public:
BackgroundThread();
- void setReceiver( QObject *parent );
- QObject *receiver() const { return m_recv; }
+ void setReceiver( TQObject *parent );
+ TQObject *receiver() const { return m_recv; }
void setBroker( const Broker::Ptr& broker );
Broker *broker() const { return m_broker; }
- void setText( const QString& );
- QString text() const;
+ void setText( const TQString& );
+ TQString text() const;
- void changeLanguage( const QString& );
- QString language() const;
+ void changeLanguage( const TQString& );
+ TQString language() const;
void setFilter( Filter *filter );
Filter *filter() const { return m_filter; }
- QStringList suggest( const QString& ) const;
+ TQStringList suggest( const TQString& ) const;
virtual void run();
void stop();
private:
- QObject *m_recv;
- QMutex m_mutex;
+ TQObject *m_recv;
+ TQMutex m_mutex;
Filter *m_filter;
Broker::Ptr m_broker;
Dictionary *m_dict;
diff --git a/kspell2/broker.cpp b/kspell2/broker.cpp
index c295197c9..7f572bb01 100644
--- a/kspell2/broker.cpp
+++ b/kspell2/broker.cpp
@@ -34,8 +34,8 @@
#include <kdebug.h>
-#include <qptrdict.h>
-#include <qmap.h>
+#include <tqptrdict.h>
+#include <tqmap.h>
#define DEFAULT_CONFIG_FILE "kspellrc"
@@ -49,12 +49,12 @@ public:
Settings *settings;
// <language, Clients with that language >
- QMap<QString, QPtrList<Client> > languageClients;
- QStringList clients;
+ TQMap<TQString, TQPtrList<Client> > languageClients;
+ TQStringList clients;
DefaultDictionary *defaultDictionary;
};
-QPtrDict<Broker> *Broker::s_brokers = 0;
+TQPtrDict<Broker> *Broker::s_brokers = 0;
Broker *Broker::openBroker( KSharedConfig *config )
{
@@ -80,7 +80,7 @@ Broker::Broker( KSharedConfig *config )
Q_UNUSED( preventDeletion );
if ( !s_brokers )
- s_brokers = new QPtrDict<Broker>;
+ s_brokers = new TQPtrDict<Broker>;
s_brokers->insert( config, this );
d = new Private;
@@ -111,10 +111,10 @@ DefaultDictionary* Broker::defaultDictionary() const
return d->defaultDictionary;
}
-Dictionary* Broker::dictionary( const QString& language, const QString& clientName ) const
+Dictionary* Broker::dictionary( const TQString& language, const TQString& clientName ) const
{
- QString pclient = clientName;
- QString plang = language;
+ TQString pclient = clientName;
+ TQString plang = language;
bool ddefault = false;
if ( plang.isEmpty() ) {
@@ -125,14 +125,14 @@ Dictionary* Broker::dictionary( const QString& language, const QString& clientNa
ddefault = true;
}
- QPtrList<Client> lClients = d->languageClients[ plang ];
+ TQPtrList<Client> lClients = d->languageClients[ plang ];
if ( lClients.isEmpty() ) {
kdError()<<"No language dictionaries for the language : "<< plang <<endl;
return 0;
}
- QPtrListIterator<Client> itr( lClients );
+ TQPtrListIterator<Client> itr( lClients );
while ( itr.current() ) {
if ( !pclient.isEmpty() ) {
if ( pclient == itr.current()->name() ) {
@@ -156,12 +156,12 @@ Dictionary* Broker::dictionary( const QString& language, const QString& clientNa
return 0;
}
-QStringList Broker::clients() const
+TQStringList Broker::clients() const
{
return d->clients;
}
-QStringList Broker::languages() const
+TQStringList Broker::languages() const
{
return d->languageClients.keys();
}
@@ -182,23 +182,23 @@ void Broker::loadPlugins()
}
}
-void Broker::loadPlugin( const QString& pluginId )
+void Broker::loadPlugin( const TQString& pluginId )
{
int error = 0;
kdDebug()<<"Loading plugin " << pluginId << endl;
Client *client = KParts::ComponentFactory::createInstanceFromQuery<Client>(
- QString::fromLatin1( "KSpell/Client" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
- this, 0, QStringList(), &error );
+ TQString::fromLatin1( "KSpell/Client" ),
+ TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
+ this, 0, TQStringList(), &error );
if ( client )
{
- QStringList languages = client->languages();
+ TQStringList languages = client->languages();
d->clients.append( client->name() );
- for ( QStringList::Iterator itr = languages.begin();
+ for ( TQStringList::Iterator itr = languages.begin();
itr != languages.end(); ++itr ) {
if ( !d->languageClients[ *itr ].isEmpty() &&
client->reliability() < d->languageClients[ *itr ].first()->reliability() )
diff --git a/kspell2/broker.h b/kspell2/broker.h
index 186c03aef..24f0338f1 100644
--- a/kspell2/broker.h
+++ b/kspell2/broker.h
@@ -24,9 +24,9 @@
#include <ksharedptr.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
class KSharedConfig;
template <typename T>
@@ -45,7 +45,7 @@ namespace KSpell2
* KSpell2 class, you can think of it as the kernel or manager
* of the KSpell2 architecture.
*/
- class KDE_EXPORT Broker : public QObject,
+ class KDE_EXPORT Broker : public TQObject,
public KShared
{
Q_OBJECT
@@ -94,18 +94,18 @@ namespace KSpell2
*
*/
Dictionary *dictionary(
- const QString& language = QString::null,
- const QString& client = QString::null ) const;
+ const TQString& language = TQString::null,
+ const TQString& client = TQString::null ) const;
/**
* Returns names of all supported clients (e.g. ISpell, ASpell)
*/
- QStringList clients() const;
+ TQStringList clients() const;
/**
* Returns a list of supported languages.
*/
- QStringList languages() const;
+ TQStringList languages() const;
/**
* Returns the Settings object used by the broker.
@@ -124,12 +124,12 @@ namespace KSpell2
private:
Broker( KSharedConfig *config );
void loadPlugins();
- void loadPlugin( const QString& );
+ void loadPlugin( const TQString& );
private:
class Private;
Private *d;
private:
- static QPtrDict<Broker> *s_brokers;
+ static TQPtrDict<Broker> *s_brokers;
};
}
diff --git a/kspell2/client.cpp b/kspell2/client.cpp
index 6508992ef..ae470a77e 100644
--- a/kspell2/client.cpp
+++ b/kspell2/client.cpp
@@ -24,8 +24,8 @@
namespace KSpell2
{
-Client::Client( QObject *parent, const char *name )
- : QObject( parent, name )
+Client::Client( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
}
diff --git a/kspell2/client.h b/kspell2/client.h
index 203a9f0e3..86046e204 100644
--- a/kspell2/client.h
+++ b/kspell2/client.h
@@ -22,9 +22,9 @@
#ifndef KSPELL_CLIENT_H
#define KSPELL_CLIENT_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -33,24 +33,24 @@ namespace KSpell2
class Dictionary;
/**
- * The fact that this class inherits from QObject makes me
+ * The fact that this class inherits from TQObject makes me
* hugely unhappy. The reason for as of writting is that
* I don't really feel like writting my own KLibFactory
- * that would load anything else then QObject derivatives.
+ * that would load anything else then TQObject derivatives.
*/
class KDE_EXPORT Client : public QObject
{
Q_OBJECT
public:
- Client( QObject *parent = 0, const char *name=0 );
+ Client( TQObject *parent = 0, const char *name=0 );
virtual int reliability() const = 0;
- virtual Dictionary* dictionary( const QString& language ) =0;
+ virtual Dictionary* dictionary( const TQString& language ) =0;
- virtual QStringList languages() const =0;
+ virtual TQStringList languages() const =0;
- virtual QString name() const =0;
+ virtual TQString name() const =0;
};
}
diff --git a/kspell2/defaultdictionary.cpp b/kspell2/defaultdictionary.cpp
index ffa071279..39b80e7cf 100644
--- a/kspell2/defaultdictionary.cpp
+++ b/kspell2/defaultdictionary.cpp
@@ -33,14 +33,14 @@ public:
//we need it only to switch the dics
};
-DefaultDictionary::DefaultDictionary( const QString& lang, Broker *broker )
- : QObject( broker ), Dictionary( lang, true )
+DefaultDictionary::DefaultDictionary( const TQString& lang, Broker *broker )
+ : TQObject( broker ), Dictionary( lang, true )
{
d = new Private;
d->dict = broker->dictionary();
d->broker = broker;
- connect( broker, SIGNAL(configurationChanged()),
- SLOT(defaultConfigurationChanged()) );
+ connect( broker, TQT_SIGNAL(configurationChanged()),
+ TQT_SLOT(defaultConfigurationChanged()) );
}
DefaultDictionary::~DefaultDictionary()
@@ -54,7 +54,7 @@ bool DefaultDictionary::isValid() const
return d->dict;
}
-bool DefaultDictionary::check( const QString& word )
+bool DefaultDictionary::check( const TQString& word )
{
if ( d->dict )
return d->dict->check( word );
@@ -62,17 +62,17 @@ bool DefaultDictionary::check( const QString& word )
return true;
}
-QStringList DefaultDictionary::suggest( const QString& word )
+TQStringList DefaultDictionary::suggest( const TQString& word )
{
if ( d->dict )
return d->dict->suggest( word );
else
- return QStringList();
+ return TQStringList();
}
-bool DefaultDictionary::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool DefaultDictionary::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
if ( d->dict )
return d->dict->checkAndSuggest( word, suggestions );
@@ -80,8 +80,8 @@ bool DefaultDictionary::checkAndSuggest( const QString& word,
return true;
}
-bool DefaultDictionary::storeReplacement( const QString& bad,
- const QString& good )
+bool DefaultDictionary::storeReplacement( const TQString& bad,
+ const TQString& good )
{
if ( d->dict )
return d->dict->storeReplacement( bad, good );
@@ -89,7 +89,7 @@ bool DefaultDictionary::storeReplacement( const QString& bad,
return false;
}
-bool DefaultDictionary::addToPersonal( const QString& word )
+bool DefaultDictionary::addToPersonal( const TQString& word )
{
if ( d->dict )
return d->dict->addToPersonal( word );
@@ -97,7 +97,7 @@ bool DefaultDictionary::addToPersonal( const QString& word )
return false;
}
-bool DefaultDictionary::addToSession( const QString& word )
+bool DefaultDictionary::addToSession( const TQString& word )
{
if ( d->dict )
return d->dict->addToSession( word );
@@ -112,7 +112,7 @@ void DefaultDictionary::defaultConfigurationChanged()
if ( d->dict )
m_language = d->dict->language();
else
- m_language = QString::null;
+ m_language = TQString::null;
}
#include "defaultdictionary.moc"
diff --git a/kspell2/defaultdictionary.h b/kspell2/defaultdictionary.h
index 9300c9f59..287bb7c21 100644
--- a/kspell2/defaultdictionary.h
+++ b/kspell2/defaultdictionary.h
@@ -23,18 +23,18 @@
#include "dictionary.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
namespace KSpell2
{
class Broker;
- class DefaultDictionary : public QObject,
+ class DefaultDictionary : public TQObject,
public Dictionary
{
Q_OBJECT
public:
- DefaultDictionary( const QString& lang, Broker *broker );
+ DefaultDictionary( const TQString& lang, Broker *broker );
~DefaultDictionary();
public:
/**
@@ -46,14 +46,14 @@ namespace KSpell2
bool isValid() const;
//Dictionary interface
- virtual bool check( const QString& word );
- virtual QStringList suggest( const QString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions );
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool check( const TQString& word );
+ virtual TQStringList suggest( const TQString& word );
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
//end of Dictionary interfaces
signals:
diff --git a/kspell2/dictionary.h b/kspell2/dictionary.h
index ce52a40d9..31567ece9 100644
--- a/kspell2/dictionary.h
+++ b/kspell2/dictionary.h
@@ -22,8 +22,8 @@
#ifndef KSPELL_DICTIONARY_H
#define KSPELL_DICTIONARY_H
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -43,44 +43,44 @@ namespace KSpell2
* Checks the given word.
* @return false if the word is misspelled. true otherwise
*/
- virtual bool check( const QString& word ) =0;
+ virtual bool check( const TQString& word ) =0;
/**
* Fetches suggestions for the word.
*
* @return list of all suggestions for the word
*/
- virtual QStringList suggest( const QString& word ) =0;
+ virtual TQStringList suggest( const TQString& word ) =0;
/**
* Checks the word and fetches suggestions for it.
*/
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) =0;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) =0;
/**
* Stores user defined good replacement for the bad word.
* @returns true on success
*/
- virtual bool storeReplacement( const QString& bad,
- const QString& good ) =0;
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good ) =0;
/**
* Adds word to the list of of personal words.
* @return true on success
*/
- virtual bool addToPersonal( const QString& word ) =0;
+ virtual bool addToPersonal( const TQString& word ) =0;
/**
* Adds word to the words recognizable in the current session.
* @return true on success
*/
- virtual bool addToSession( const QString& word ) =0;
+ virtual bool addToSession( const TQString& word ) =0;
/**
* Returns language supported by this dictionary.
*/
- QString language() const
+ TQString language() const
{
return m_language;
}
@@ -95,11 +95,11 @@ namespace KSpell2
}
protected:
- Dictionary( const QString& lang, bool def = false )
+ Dictionary( const TQString& lang, bool def = false )
: m_language( lang ), m_default( def ) {}
protected:
friend class Broker;
- QString m_language;
+ TQString m_language;
bool m_default;
private:
class Private;
diff --git a/kspell2/filter.cpp b/kspell2/filter.cpp
index 89afb0c4c..1604bcae1 100644
--- a/kspell2/filter.cpp
+++ b/kspell2/filter.cpp
@@ -27,7 +27,7 @@
#include <kstaticdeleter.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -84,13 +84,13 @@ void Filter::restart()
m_currentPosition = 0;
}
-void Filter::setBuffer( const QString& buffer )
+void Filter::setBuffer( const TQString& buffer )
{
m_buffer = buffer;
m_currentPosition = 0;
}
-QString Filter::buffer() const
+TQString Filter::buffer() const
{
return m_buffer;
}
@@ -105,25 +105,25 @@ bool Filter::atEnd() const
Word Filter::nextWord() const
{
- QChar currentChar = skipToLetter( m_currentPosition );
+ TQChar currentChar = skipToLetter( m_currentPosition );
if ( m_currentPosition >= m_buffer.length() ) {
return Filter::end();
}
- bool allUppercase = currentChar.category() & QChar::Letter_Uppercase;
+ bool allUppercase = currentChar.category() & TQChar::Letter_Uppercase;
bool runTogether = false;
- QString foundWord;
+ TQString foundWord;
int start = m_currentPosition;
while ( currentChar.isLetter() ) {
- if ( currentChar.category() & QChar::Letter_Lowercase )
+ if ( currentChar.category() & TQChar::Letter_Lowercase )
allUppercase = false;
/* FIXME: this does not work for Hebrew for example
//we consider run-together words as mixed-case words
if ( !allUppercase &&
- currentChar.category() & QChar::Letter_Uppercase )
+ currentChar.category() & TQChar::Letter_Uppercase )
runTogether = true;
*/
@@ -149,7 +149,7 @@ Word Filter::previousWord() const
return Filter::end();
}
- QString foundWord;
+ TQString foundWord;
int start = m_currentPosition;
while ( m_buffer[ start ].isLetter() ) {
foundWord.prepend( m_buffer[ m_currentPosition ] );
@@ -165,7 +165,7 @@ Word Filter::wordAtPosition( unsigned int pos ) const
return Filter::end();
int currentPosition = pos - 1;
- QString foundWord;
+ TQString foundWord;
while ( currentPosition >= 0 &&
m_buffer[ currentPosition ].isLetter() ) {
foundWord.prepend( m_buffer[ currentPosition ] );
@@ -202,7 +202,7 @@ int Filter::currentPosition() const
return m_currentPosition;
}
-void Filter::replace( const Word& w, const QString& newWord)
+void Filter::replace( const Word& w, const TQString& newWord)
{
int oldLen = w.word.length();
int newLen = newWord.length();
@@ -216,7 +216,7 @@ void Filter::replace( const Word& w, const QString& newWord)
m_buffer = m_buffer.replace( w.start, oldLen, newWord );
}
-QString Filter::context() const
+TQString Filter::context() const
{
int len = 60;
//we don't want the expression underneath casted to an unsigned int
@@ -225,17 +225,17 @@ QString Filter::context() const
bool begin = ( (signedPosition - len/2)<=0 ) ? true : false;
- QString buffer = m_buffer;
+ TQString buffer = m_buffer;
Word word = wordAtPosition( m_currentPosition );
buffer = buffer.replace( word.start, word.word.length(),
- QString( "<b>%1</b>" ).arg( word.word ) );
+ TQString( "<b>%1</b>" ).arg( word.word ) );
- QString context;
+ TQString context;
if ( begin )
- context = QString( "%1...")
+ context = TQString( "%1...")
.arg( buffer.mid( 0, len ) );
else
- context = QString( "...%1..." )
+ context = TQString( "...%1..." )
.arg( buffer.mid( m_currentPosition - 20, len ) );
context = context.replace( '\n', ' ' );
@@ -245,7 +245,7 @@ QString Filter::context() const
bool Filter::trySkipLinks() const
{
- QChar currentChar = m_buffer[ m_currentPosition ];
+ TQChar currentChar = m_buffer[ m_currentPosition ];
uint length = m_buffer.length();
//URL - if so skip
@@ -267,7 +267,7 @@ bool Filter::trySkipLinks() const
return false;
}
-bool Filter::ignore( const QString& word ) const
+bool Filter::ignore( const TQString& word ) const
{
if ( d->settings ) {
return d->settings->ignore( word );
@@ -275,10 +275,10 @@ bool Filter::ignore( const QString& word ) const
return false;
}
-QChar Filter::skipToLetter( uint &fromPosition ) const
+TQChar Filter::skipToLetter( uint &fromPosition ) const
{
- QChar currentChar = m_buffer[ fromPosition ];
+ TQChar currentChar = m_buffer[ fromPosition ];
while ( !currentChar.isLetter() &&
++fromPosition < m_buffer.length() ) {
currentChar = m_buffer[ fromPosition ];
@@ -287,7 +287,7 @@ QChar Filter::skipToLetter( uint &fromPosition ) const
}
bool Filter::shouldBeSkipped( bool wordWasUppercase, bool wordWasRunTogether,
- const QString& foundWord ) const
+ const TQString& foundWord ) const
{
bool checkUpper = ( d->settings ) ?
d->settings->checkUppercase () : true;
diff --git a/kspell2/filter.h b/kspell2/filter.h
index 3c66dc869..5e4635493 100644
--- a/kspell2/filter.h
+++ b/kspell2/filter.h
@@ -23,7 +23,7 @@
#ifndef KSPELL_FILTER_H
#define KSPELL_FILTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
namespace KSpell2
@@ -42,7 +42,7 @@ namespace KSpell2
Word() : start( 0 ), end( true )
{}
- Word( const QString& w, int st, bool e = false )
+ Word( const TQString& w, int st, bool e = false )
: word( w ), start( st ), end( e )
{}
Word( const Word& other )
@@ -50,7 +50,7 @@ namespace KSpell2
end( other.end )
{}
- QString word;
+ TQString word;
uint start;
bool end;
};
@@ -84,8 +84,8 @@ namespace KSpell2
bool atEnd() const;
- void setBuffer( const QString& buffer );
- QString buffer() const;
+ void setBuffer( const TQString& buffer );
+ TQString buffer() const;
void restart();
@@ -95,21 +95,21 @@ namespace KSpell2
virtual void setCurrentPosition( int );
virtual int currentPosition() const;
- virtual void replace( const Word& w, const QString& newWord );
+ virtual void replace( const Word& w, const TQString& newWord );
/**
* Should return the sentence containing the current word
*/
- virtual QString context() const;
+ virtual TQString context() const;
protected:
bool trySkipLinks() const;
- bool ignore( const QString& word ) const;
- QChar skipToLetter( uint &fromPosition ) const;
+ bool ignore( const TQString& word ) const;
+ TQChar skipToLetter( uint &fromPosition ) const;
bool shouldBeSkipped( bool wordWasUppercase, bool wordWasRunTogether,
- const QString& foundWord ) const;
+ const TQString& foundWord ) const;
protected:
- QString m_buffer;
+ TQString m_buffer;
mutable uint m_currentPosition;
private:
diff --git a/kspell2/plugins/aspell/kspell_aspellclient.cpp b/kspell2/plugins/aspell/kspell_aspellclient.cpp
index 94156c523..3577dd795 100644
--- a/kspell2/plugins/aspell/kspell_aspellclient.cpp
+++ b/kspell2/plugins/aspell/kspell_aspellclient.cpp
@@ -30,7 +30,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_aspell, ASpellClientFactory( "kspell_aspell"
using namespace KSpell2;
-ASpellClient::ASpellClient( QObject *parent, const char *name, const QStringList& /* args */ )
+ASpellClient::ASpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
: Client( parent, name )
{
m_config = new_aspell_config();
@@ -41,18 +41,18 @@ ASpellClient::~ASpellClient()
delete_aspell_config( m_config );
}
-Dictionary* ASpellClient::dictionary( const QString& language )
+Dictionary* ASpellClient::dictionary( const TQString& language )
{
ASpellDict *ad = new ASpellDict( language );
return ad;
}
-QStringList ASpellClient::languages() const
+TQStringList ASpellClient::languages() const
{
AspellDictInfoList *l = get_aspell_dict_info_list( m_config );
AspellDictInfoEnumeration *el = aspell_dict_info_list_elements( l );
- QStringList langs;
+ TQStringList langs;
const AspellDictInfo *di = 0;
while ( ( di = aspell_dict_info_enumeration_next( el ) ) ) {
langs.append( di->name );
diff --git a/kspell2/plugins/aspell/kspell_aspellclient.h b/kspell2/plugins/aspell/kspell_aspellclient.h
index 7073e80ec..f2439989c 100644
--- a/kspell2/plugins/aspell/kspell_aspellclient.h
+++ b/kspell2/plugins/aspell/kspell_aspellclient.h
@@ -22,7 +22,7 @@
#define KSPELL_ASPELLCLIENT_H
#include "client.h"
-#include <qobject.h>
+#include <tqobject.h>
#include "aspell.h"
@@ -35,18 +35,18 @@ class ASpellClient : public KSpell2::Client
{
Q_OBJECT
public:
- ASpellClient( QObject *parent, const char *name, const QStringList & /* args */ );
+ ASpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ );
~ASpellClient();
virtual int reliability() const {
return 20;
}
- virtual Dictionary* dictionary( const QString& language );
+ virtual Dictionary* dictionary( const TQString& language );
- virtual QStringList languages() const;
+ virtual TQStringList languages() const;
- virtual QString name() const {
+ virtual TQString name() const {
return "ASpell";
}
private:
diff --git a/kspell2/plugins/aspell/kspell_aspelldict.cpp b/kspell2/plugins/aspell/kspell_aspelldict.cpp
index 4674c138a..6687f2106 100644
--- a/kspell2/plugins/aspell/kspell_aspelldict.cpp
+++ b/kspell2/plugins/aspell/kspell_aspelldict.cpp
@@ -22,11 +22,11 @@
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
using namespace KSpell2;
-ASpellDict::ASpellDict( const QString& lang )
+ASpellDict::ASpellDict( const TQString& lang )
: Dictionary( lang )
{
m_config = new_aspell_config();
@@ -50,7 +50,7 @@ ASpellDict::~ASpellDict()
delete_aspell_config( m_config );
}
-bool ASpellDict::check( const QString& word )
+bool ASpellDict::check( const TQString& word )
{
/* ASpell is expecting length of a string in char representation */
/* word.length() != word.utf8().length() for nonlatin strings */
@@ -58,10 +58,10 @@ bool ASpellDict::check( const QString& word )
return correct;
}
-QStringList ASpellDict::suggest( const QString& word )
+TQStringList ASpellDict::suggest( const TQString& word )
{
/* Needed for Unicode conversion */
- QTextCodec *codec = QTextCodec::codecForName("utf8");
+ TQTextCodec *codec = TQTextCodec::codecForName("utf8");
/* ASpell is expecting length of a string in char representation */
/* word.length() != word.utf8().length() for nonlatin strings */
@@ -71,7 +71,7 @@ QStringList ASpellDict::suggest( const QString& word )
AspellStringEnumeration * elements = aspell_word_list_elements( suggestions );
- QStringList qsug;
+ TQStringList qsug;
const char * cword;
while ( (cword = aspell_string_enumeration_next( elements )) ) {
@@ -84,8 +84,8 @@ QStringList ASpellDict::suggest( const QString& word )
return qsug;
}
-bool ASpellDict::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool ASpellDict::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
bool c = check( word );
if ( c )
@@ -93,8 +93,8 @@ bool ASpellDict::checkAndSuggest( const QString& word,
return c;
}
-bool ASpellDict::storeReplacement( const QString& bad,
- const QString& good )
+bool ASpellDict::storeReplacement( const TQString& bad,
+ const TQString& good )
{
/* ASpell is expecting length of a string in char representation */
/* word.length() != word.utf8().length() for nonlatin strings */
@@ -103,7 +103,7 @@ bool ASpellDict::storeReplacement( const QString& bad,
good.utf8(), good.utf8().length() );
}
-bool ASpellDict::addToPersonal( const QString& word )
+bool ASpellDict::addToPersonal( const TQString& word )
{
kdDebug() << "ASpellDict::addToPersonal: word = " << word << endl;
/* ASpell is expecting length of a string in char representation */
@@ -116,7 +116,7 @@ bool ASpellDict::addToPersonal( const QString& word )
return aspell_speller_save_all_word_lists( m_speller );
}
-bool ASpellDict::addToSession( const QString& word )
+bool ASpellDict::addToSession( const TQString& word )
{
/* ASpell is expecting length of a string in char representation */
/* word.length() != word.utf8().length() for nonlatin strings */
diff --git a/kspell2/plugins/aspell/kspell_aspelldict.h b/kspell2/plugins/aspell/kspell_aspelldict.h
index 0a4f520d3..2ff51c056 100644
--- a/kspell2/plugins/aspell/kspell_aspelldict.h
+++ b/kspell2/plugins/aspell/kspell_aspelldict.h
@@ -28,20 +28,20 @@
class ASpellDict : public KSpell2::Dictionary
{
public:
- ASpellDict( const QString& lang );
+ ASpellDict( const TQString& lang );
~ASpellDict();
- virtual bool check( const QString& word );
+ virtual bool check( const TQString& word );
- virtual QStringList suggest( const QString& word );
+ virtual TQStringList suggest( const TQString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) ;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) ;
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
private:
AspellConfig *m_config;
AspellSpeller *m_speller;
diff --git a/kspell2/plugins/hspell/kspell_hspellclient.cpp b/kspell2/plugins/hspell/kspell_hspellclient.cpp
index ac0876153..716300c20 100644
--- a/kspell2/plugins/hspell/kspell_hspellclient.cpp
+++ b/kspell2/plugins/hspell/kspell_hspellclient.cpp
@@ -31,7 +31,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_hspell, HSpellClientFactory( "kspell_hspell"
using namespace KSpell2;
-HSpellClient::HSpellClient( QObject *parent, const char *name, const QStringList& /* args */ )
+HSpellClient::HSpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
: Client( parent, name )
{
}
@@ -40,15 +40,15 @@ HSpellClient::~HSpellClient()
{
}
-Dictionary* HSpellClient::dictionary( const QString& language )
+Dictionary* HSpellClient::dictionary( const TQString& language )
{
HSpellDict *ad = new HSpellDict( language );
return ad;
}
-QStringList HSpellClient::languages() const
+TQStringList HSpellClient::languages() const
{
- QStringList langs;
+ TQStringList langs;
langs.append( "he" );
return langs;
diff --git a/kspell2/plugins/hspell/kspell_hspellclient.h b/kspell2/plugins/hspell/kspell_hspellclient.h
index 6d7a1773b..a26aca227 100644
--- a/kspell2/plugins/hspell/kspell_hspellclient.h
+++ b/kspell2/plugins/hspell/kspell_hspellclient.h
@@ -23,7 +23,7 @@
#define KSPELL_HSPELLCLIENT_H
#include "client.h"
-#include <qobject.h>
+#include <tqobject.h>
/* libhspell is a C library and it does not have #ifdef __cplusplus */
extern "C" {
@@ -39,18 +39,18 @@ class HSpellClient : public KSpell2::Client
{
Q_OBJECT
public:
- HSpellClient( QObject *parent, const char *name, const QStringList & /* args */ );
+ HSpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ );
~HSpellClient();
virtual int reliability() const {
return 20;
}
- virtual Dictionary* dictionary( const QString& language );
+ virtual Dictionary* dictionary( const TQString& language );
- virtual QStringList languages() const;
+ virtual TQStringList languages() const;
- virtual QString name() const {
+ virtual TQString name() const {
return "HSpell";
}
private:
diff --git a/kspell2/plugins/hspell/kspell_hspelldict.cpp b/kspell2/plugins/hspell/kspell_hspelldict.cpp
index e8944dbf7..04f055e86 100644
--- a/kspell2/plugins/hspell/kspell_hspelldict.cpp
+++ b/kspell2/plugins/hspell/kspell_hspelldict.cpp
@@ -23,18 +23,18 @@
#include "kspell_hspelldict.h"
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
using namespace KSpell2;
-HSpellDict::HSpellDict( const QString& lang )
+HSpellDict::HSpellDict( const TQString& lang )
: Dictionary( lang )
{
int int_error = hspell_init( &m_speller, HSPELL_OPT_DEFAULT );
if ( int_error == -1 )
kdDebug() << "HSpellDict::HSpellDict: Init failed" << endl;
/* hspell understans only iso8859-8-i */
- codec = QTextCodec::codecForName( "iso8859-8-i" );
+ codec = TQTextCodec::codecForName( "iso8859-8-i" );
}
HSpellDict::~HSpellDict()
@@ -43,11 +43,11 @@ HSpellDict::~HSpellDict()
hspell_uninit( m_speller );
}
-bool HSpellDict::check( const QString& word )
+bool HSpellDict::check( const TQString& word )
{
kdDebug() << "HSpellDict::check word = " << word <<endl;
int preflen;
- QCString wordISO = codec->fromUnicode( word );
+ TQCString wordISO = codec->fromUnicode( word );
/* returns 1 if the word is correct, 0 otherwise */
int correct = hspell_check_word ( m_speller,
wordISO,
@@ -61,9 +61,9 @@ bool HSpellDict::check( const QString& word )
return correct == 1;
}
-QStringList HSpellDict::suggest( const QString& word )
+TQStringList HSpellDict::suggest( const TQString& word )
{
- QStringList qsug;
+ TQStringList qsug;
struct corlist cl;
int n_sugg;
corlist_init( &cl );
@@ -75,8 +75,8 @@ QStringList HSpellDict::suggest( const QString& word )
return qsug;
}
-bool HSpellDict::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool HSpellDict::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
bool c = check( word );
if( c )
@@ -84,22 +84,22 @@ bool HSpellDict::checkAndSuggest( const QString& word,
return c;
}
-bool HSpellDict::storeReplacement( const QString& bad,
- const QString& good )
+bool HSpellDict::storeReplacement( const TQString& bad,
+ const TQString& good )
{
// hspell-0.9 cannot do this
kdDebug() << "HSpellDict::storeReplacement: Sorry, cannot." << endl;
return false;
}
-bool HSpellDict::addToPersonal( const QString& word )
+bool HSpellDict::addToPersonal( const TQString& word )
{
// hspell-0.9 cannot do this
kdDebug() << "HSpellDict::addToPersonal: Sorry, cannot." << endl;
return false;
}
-bool HSpellDict::addToSession( const QString& word )
+bool HSpellDict::addToSession( const TQString& word )
{
// hspell-0.9 cannot do this
kdDebug() << "HSpellDict::addToSession: Sorry, cannot." << endl;
diff --git a/kspell2/plugins/hspell/kspell_hspelldict.h b/kspell2/plugins/hspell/kspell_hspelldict.h
index a3895dc98..ff0302e4b 100644
--- a/kspell2/plugins/hspell/kspell_hspelldict.h
+++ b/kspell2/plugins/hspell/kspell_hspelldict.h
@@ -31,23 +31,23 @@ extern "C" {
class HSpellDict : public KSpell2::Dictionary
{
public:
- HSpellDict( const QString& lang );
+ HSpellDict( const TQString& lang );
~HSpellDict();
- virtual bool check( const QString& word );
+ virtual bool check( const TQString& word );
- virtual QStringList suggest( const QString& word );
+ virtual TQStringList suggest( const TQString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) ;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) ;
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
private:
struct dict_radix *m_speller;
- QTextCodec *codec;
+ TQTextCodec *codec;
};
#endif
diff --git a/kspell2/plugins/ispell/ispell_checker.cpp b/kspell2/plugins/ispell/ispell_checker.cpp
index 42cc2c460..6b3d382af 100644
--- a/kspell2/plugins/ispell/ispell_checker.cpp
+++ b/kspell2/plugins/ispell/ispell_checker.cpp
@@ -39,9 +39,9 @@
#include "sp_spell.h"
#include "ispell_checker.h"
-#include <qmap.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqmap.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
/***************************************************************************/
@@ -161,7 +161,7 @@ static const IspellMap ispell_map [] = {
};
static const size_t size_ispell_map = ( sizeof(ispell_map) / sizeof((ispell_map)[0]) );
-static QMap<QString, QString> ispell_dict_map;
+static TQMap<TQString, TQString> ispell_dict_map;
void
@@ -169,7 +169,7 @@ ISpellChecker::try_autodetect_charset(const char * const inEncoding)
{
if (inEncoding && strlen(inEncoding))
{
- m_translate_in = QTextCodec::codecForName(inEncoding);
+ m_translate_in = TQTextCodec::codecForName(inEncoding);
}
}
@@ -228,7 +228,7 @@ ISpellChecker::~ISpellChecker()
}
bool
-ISpellChecker::checkWord( const QString& utf8Word )
+ISpellChecker::checkWord( const TQString& utf8Word )
{
ichar_t iWord[INPUTWORDLEN + MAXAFFIXLEN];
if (!m_bSuccessfulInit)
@@ -238,7 +238,7 @@ ISpellChecker::checkWord( const QString& utf8Word )
return false;
bool retVal = false;
- QCString out;
+ TQCString out;
if (!m_translate_in)
return false;
else {
@@ -261,21 +261,21 @@ ISpellChecker::checkWord( const QString& utf8Word )
}
QStringList
-ISpellChecker::suggestWord(const QString& utf8Word)
+ISpellChecker::suggestWord(const TQString& utf8Word)
{
ichar_t iWord[INPUTWORDLEN + MAXAFFIXLEN];
int c;
if (!m_bSuccessfulInit)
- return QStringList();
+ return TQStringList();
if (utf8Word.isEmpty() || utf8Word.length() >= (INPUTWORDLEN + MAXAFFIXLEN) ||
utf8Word.length() == 0)
- return QStringList();
+ return TQStringList();
- QCString out;
+ TQCString out;
if (!m_translate_in)
- return QStringList();
+ return TQStringList();
else
{
/* convert to 8bit string and null terminate */
@@ -287,17 +287,17 @@ ISpellChecker::suggestWord(const QString& utf8Word)
if (!strtoichar(iWord, out.data(), INPUTWORDLEN + MAXAFFIXLEN, 0))
makepossibilities(iWord);
else
- return QStringList();
+ return TQStringList();
- QStringList sugg_arr;
+ TQStringList sugg_arr;
for (c = 0; c < m_pcount; c++)
{
- QString utf8Word;
+ TQString utf8Word;
if (!m_translate_in)
{
/* copy to 8bit string and null terminate */
- utf8Word = QString::fromUtf8( m_possibilities[c] );
+ utf8Word = TQString::fromUtf8( m_possibilities[c] );
}
else
{
@@ -320,7 +320,7 @@ s_buildHashNames (std::vector<std::string> & names, const char * dict)
names.clear ();
while ( (tmp = ispell_dirs[i++]) ) {
- QCString maybeFile = QCString( tmp ) + '/';
+ TQCString maybeFile = TQCString( tmp ) + '/';
maybeFile += dict;
names.push_back( maybeFile.data() );
}
@@ -333,10 +333,10 @@ s_allDics()
int i = 0;
while ( (tmp = ispell_dirs[i++]) ) {
- QDir dir( tmp );
- QStringList lst = dir.entryList( "*.hash" );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- QFileInfo info( *it );
+ TQDir dir( tmp );
+ TQStringList lst = dir.entryList( "*.hash" );
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQFileInfo info( *it );
for (size_t i = 0; i < size_ispell_map; i++)
{
const IspellMap * mapping = (const IspellMap *)(&(ispell_map[i]));
@@ -349,7 +349,7 @@ s_allDics()
}
}
-QValueList<QString>
+TQValueList<TQString>
ISpellChecker::allDics()
{
if ( ispell_dict_map.empty() )
@@ -371,7 +371,7 @@ ISpellChecker::loadDictionary (const char * szdict)
return dict_names[i].c_str();
}
- return QString::null;
+ return TQString::null;
}
/*!
@@ -383,7 +383,7 @@ ISpellChecker::loadDictionary (const char * szdict)
bool
ISpellChecker::loadDictionaryForLanguage ( const char * szLang )
{
- QString hashname;
+ TQString hashname;
const char * encoding = NULL;
const char * szFile = NULL;
@@ -415,7 +415,7 @@ ISpellChecker::loadDictionaryForLanguage ( const char * szLang )
}
void
-ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * encoding )
+ISpellChecker::setDictionaryEncoding( const TQString& hashname, const char * encoding )
{
/* Get Hash encoding from XML file. This should always work! */
try_autodetect_charset(encoding);
@@ -446,7 +446,7 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
prefstringchar = findfiletype("utf8", 1, deftflag < 0 ? &deftflag : static_cast<int *>(NULL));
if (prefstringchar >= 0)
{
- m_translate_in = QTextCodec::codecForName("utf8");
+ m_translate_in = TQTextCodec::codecForName("utf8");
}
if (m_translate_in)
@@ -458,13 +458,13 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
/* Look for "altstringtype" names from latin1 to latin15 */
for(int n1 = 1; n1 <= 15; n1++)
{
- QString teststring = QString("latin%1").arg(n1);
+ TQString teststring = TQString("latin%1").arg(n1);
prefstringchar = findfiletype(teststring.latin1(), 1,
deftflag < 0 ? &deftflag : static_cast<int *>(NULL));
if (prefstringchar >= 0)
{
//FIXME: latin1 might be wrong
- m_translate_in = QTextCodec::codecForName( teststring.latin1() );
+ m_translate_in = TQTextCodec::codecForName( teststring.latin1() );
break;
}
}
@@ -473,7 +473,7 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
/* If nothing found, use latin1 */
if (!m_translate_in)
{
- m_translate_in = QTextCodec::codecForName("latin1");
+ m_translate_in = TQTextCodec::codecForName("latin1");
}
}
diff --git a/kspell2/plugins/ispell/ispell_checker.h b/kspell2/plugins/ispell/ispell_checker.h
index e59f8ed2d..08783922a 100644
--- a/kspell2/plugins/ispell/ispell_checker.h
+++ b/kspell2/plugins/ispell/ispell_checker.h
@@ -34,10 +34,10 @@
#include "ispell.h"
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qtextcodec.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqtextcodec.h>
+#include <tqstring.h>
class ISpellChecker
@@ -46,18 +46,18 @@ public:
ISpellChecker();
~ISpellChecker();
- bool checkWord(const QString& word);
- QStringList suggestWord(const QString& word);
+ bool checkWord(const TQString& word);
+ TQStringList suggestWord(const TQString& word);
bool requestDictionary (const char * szLang);
- static QValueList<QString> allDics();
+ static TQValueList<TQString> allDics();
private:
ISpellChecker(const ISpellChecker&); // no impl
void operator=(const ISpellChecker&); // no impl
- QString loadDictionary (const char * szLang );
+ TQString loadDictionary (const char * szLang );
bool loadDictionaryForLanguage ( const char * szLang );
- void setDictionaryEncoding ( const QString& hashname, const char * enc );
+ void setDictionaryEncoding ( const TQString& hashname, const char * enc );
//
// The member functions after this point were formerly global functions
@@ -267,7 +267,7 @@ private:
int m_Trynum; /* Size of "Try" array */
ichar_t m_Try[SET_SIZE + MAXSTRINGCHARS];
- QTextCodec *m_translate_in; /* Selected translation from/to Unicode */
+ TQTextCodec *m_translate_in; /* Selected translation from/to Unicode */
};
#endif /* ISPELL_CHECKER_H */
diff --git a/kspell2/plugins/ispell/kspell_ispellclient.cpp b/kspell2/plugins/ispell/kspell_ispellclient.cpp
index 5830d4957..3b2fda4e0 100644
--- a/kspell2/plugins/ispell/kspell_ispellclient.cpp
+++ b/kspell2/plugins/ispell/kspell_ispellclient.cpp
@@ -31,7 +31,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_ispell, ISpellClientFactory( "kspell_ispell"
using namespace KSpell2;
-ISpellClient::ISpellClient( QObject *parent, const char *name, const QStringList& /* args */ )
+ISpellClient::ISpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
: Client( parent, name )
{
}
@@ -40,13 +40,13 @@ ISpellClient::~ISpellClient()
{
}
-Dictionary* ISpellClient::dictionary( const QString& language )
+Dictionary* ISpellClient::dictionary( const TQString& language )
{
ISpellDict *ad = new ISpellDict( language );
return ad;
}
-QStringList ISpellClient::languages() const
+TQStringList ISpellClient::languages() const
{
return ISpellChecker::allDics();
}
diff --git a/kspell2/plugins/ispell/kspell_ispellclient.h b/kspell2/plugins/ispell/kspell_ispellclient.h
index b46f485fd..6a67bb1a6 100644
--- a/kspell2/plugins/ispell/kspell_ispellclient.h
+++ b/kspell2/plugins/ispell/kspell_ispellclient.h
@@ -22,7 +22,7 @@
#define KSPELL_ISPELLCLIENT_H
#include "client.h"
-#include <qobject.h>
+#include <tqobject.h>
#include "ispell_checker.h"
@@ -35,18 +35,18 @@ class ISpellClient : public KSpell2::Client
{
Q_OBJECT
public:
- ISpellClient( QObject *parent, const char *name, const QStringList & /* args */ );
+ ISpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ );
~ISpellClient();
virtual int reliability() const {
return 10;
}
- virtual Dictionary* dictionary( const QString& language );
+ virtual Dictionary* dictionary( const TQString& language );
- virtual QStringList languages() const;
+ virtual TQStringList languages() const;
- virtual QString name() const {
+ virtual TQString name() const {
return "ISpell";
}
private:
diff --git a/kspell2/plugins/ispell/kspell_ispelldict.cpp b/kspell2/plugins/ispell/kspell_ispelldict.cpp
index 2d3728a6a..35c1e9276 100644
--- a/kspell2/plugins/ispell/kspell_ispelldict.cpp
+++ b/kspell2/plugins/ispell/kspell_ispelldict.cpp
@@ -26,7 +26,7 @@
using namespace KSpell2;
-ISpellDict::ISpellDict( const QString& lang )
+ISpellDict::ISpellDict( const TQString& lang )
: Dictionary( lang )
{
m_checker = new ISpellChecker();
@@ -40,18 +40,18 @@ ISpellDict::~ISpellDict()
{
}
-bool ISpellDict::check( const QString& word )
+bool ISpellDict::check( const TQString& word )
{
return m_checker->checkWord( word );
}
-QStringList ISpellDict::suggest( const QString& word )
+TQStringList ISpellDict::suggest( const TQString& word )
{
return m_checker->suggestWord( word );
}
-bool ISpellDict::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool ISpellDict::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
bool c = check( word );
if ( c )
@@ -59,18 +59,18 @@ bool ISpellDict::checkAndSuggest( const QString& word,
return c;
}
-bool ISpellDict::storeReplacement( const QString& ,
- const QString& )
+bool ISpellDict::storeReplacement( const TQString& ,
+ const TQString& )
{
return false;
}
-bool ISpellDict::addToPersonal( const QString& )
+bool ISpellDict::addToPersonal( const TQString& )
{
return false;
}
-bool ISpellDict::addToSession( const QString& )
+bool ISpellDict::addToSession( const TQString& )
{
return false;
}
diff --git a/kspell2/plugins/ispell/kspell_ispelldict.h b/kspell2/plugins/ispell/kspell_ispelldict.h
index 45154d790..2ca9e7d93 100644
--- a/kspell2/plugins/ispell/kspell_ispelldict.h
+++ b/kspell2/plugins/ispell/kspell_ispelldict.h
@@ -28,20 +28,20 @@ class ISpellChecker;
class ISpellDict : public KSpell2::Dictionary
{
public:
- ISpellDict( const QString& lang );
+ ISpellDict( const TQString& lang );
~ISpellDict();
- virtual bool check( const QString& word );
+ virtual bool check( const TQString& word );
- virtual QStringList suggest( const QString& word );
+ virtual TQStringList suggest( const TQString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) ;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) ;
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
private:
ISpellChecker *m_checker;
};
diff --git a/kspell2/settings.cpp b/kspell2/settings.cpp
index 2478b30d6..664ae24e0 100644
--- a/kspell2/settings.cpp
+++ b/kspell2/settings.cpp
@@ -28,8 +28,8 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
namespace KSpell2
{
@@ -40,14 +40,14 @@ public:
KSharedConfig::Ptr config;
bool modified;
- QString defaultLanguage;
- QString defaultClient;
+ TQString defaultLanguage;
+ TQString defaultClient;
bool checkUppercase;
bool skipRunTogether;
bool backgroundCheckerEnabled;
- QMap<QString, bool> ignore;
+ TQMap<TQString, bool> ignore;
};
Settings::Settings( Broker *broker, KSharedConfig *config )
@@ -72,9 +72,9 @@ KSharedConfig *Settings::sharedConfig() const
return d->config;
}
-void Settings::setDefaultLanguage( const QString& lang )
+void Settings::setDefaultLanguage( const TQString& lang )
{
- QStringList cs = d->broker->languages();
+ TQStringList cs = d->broker->languages();
if ( cs.find( lang ) != cs.end() &&
d->defaultLanguage != lang ) {
d->defaultLanguage = lang;
@@ -84,12 +84,12 @@ void Settings::setDefaultLanguage( const QString& lang )
}
}
-QString Settings::defaultLanguage() const
+TQString Settings::defaultLanguage() const
{
return d->defaultLanguage;
}
-void Settings::setDefaultClient( const QString& client )
+void Settings::setDefaultClient( const TQString& client )
{
//Different from setDefaultLanguage because
//the number of clients can't be even close
@@ -101,7 +101,7 @@ void Settings::setDefaultClient( const QString& client )
}
}
-QString Settings::defaultClient() const
+TQString Settings::defaultClient() const
{
return d->defaultClient;
}
@@ -145,27 +145,27 @@ bool Settings::backgroundCheckerEnabled() const
return d->backgroundCheckerEnabled;
}
-void Settings::setCurrentIgnoreList( const QStringList& ignores )
+void Settings::setCurrentIgnoreList( const TQStringList& ignores )
{
setQuietIgnoreList( ignores );
d->modified = true;
}
-void Settings::setQuietIgnoreList( const QStringList& ignores )
+void Settings::setQuietIgnoreList( const TQStringList& ignores )
{
- d->ignore = QMap<QString, bool>();//clear out
- for ( QStringList::const_iterator itr = ignores.begin();
+ d->ignore = TQMap<TQString, bool>();//clear out
+ for ( TQStringList::const_iterator itr = ignores.begin();
itr != ignores.end(); ++itr ) {
d->ignore.insert( *itr, true );
}
}
-QStringList Settings::currentIgnoreList() const
+TQStringList Settings::currentIgnoreList() const
{
return d->ignore.keys();
}
-void Settings::addWordToIgnore( const QString& word )
+void Settings::addWordToIgnore( const TQString& word )
{
if ( !d->ignore.contains( word ) ) {
d->modified = true;
@@ -173,7 +173,7 @@ void Settings::addWordToIgnore( const QString& word )
}
}
-bool Settings::ignore( const QString& word )
+bool Settings::ignore( const TQString& word )
{
return d->ignore.contains( word );
}
@@ -181,8 +181,8 @@ bool Settings::ignore( const QString& word )
void Settings::readIgnoreList()
{
KConfigGroup conf( d->config, "Spelling" );
- QString ignoreEntry = QString( "ignore_%1" ).arg( d->defaultLanguage );
- QStringList ignores = conf.readListEntry( ignoreEntry );
+ TQString ignoreEntry = TQString( "ignore_%1" ).arg( d->defaultLanguage );
+ TQStringList ignores = conf.readListEntry( ignoreEntry );
setQuietIgnoreList( ignores );
}
@@ -195,7 +195,7 @@ void Settings::save()
conf.writeEntry( "checkUppercase", d->checkUppercase );
conf.writeEntry( "skipRunTogether", d->skipRunTogether );
conf.writeEntry( "backgroundCheckerEnabled", d->backgroundCheckerEnabled );
- conf.writeEntry( QString( "ignore_%1" ).arg( d->defaultLanguage ),
+ conf.writeEntry( TQString( "ignore_%1" ).arg( d->defaultLanguage ),
d->ignore.keys() );
conf.sync();
}
@@ -205,7 +205,7 @@ void Settings::loadConfig()
{
KConfigGroup conf( d->config, "Spelling" );
d->defaultClient = conf.readEntry( "defaultClient",
- QString::null );
+ TQString::null );
d->defaultLanguage = conf.readEntry(
"defaultLanguage", KGlobal::locale()->language() );
diff --git a/kspell2/settings.h b/kspell2/settings.h
index 8de938a62..d351f9712 100644
--- a/kspell2/settings.h
+++ b/kspell2/settings.h
@@ -22,8 +22,8 @@
#ifndef KSPELL_SETTINGS_H
#define KSPELL_SETTINGS_H
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class KSharedConfig;
@@ -37,11 +37,11 @@ namespace KSpell2
public:
~Settings();
- void setDefaultLanguage( const QString& lang );
- QString defaultLanguage() const;
+ void setDefaultLanguage( const TQString& lang );
+ TQString defaultLanguage() const;
- void setDefaultClient( const QString& client );
- QString defaultClient() const;
+ void setDefaultClient( const TQString& client );
+ TQString defaultClient() const;
void setCheckUppercase( bool );
bool checkUppercase() const;
@@ -52,10 +52,10 @@ namespace KSpell2
void setBackgroundCheckerEnabled( bool );
bool backgroundCheckerEnabled() const;
- void setCurrentIgnoreList( const QStringList& ignores );
- void addWordToIgnore( const QString& word );
- QStringList currentIgnoreList() const;
- bool ignore( const QString& word );
+ void setCurrentIgnoreList( const TQStringList& ignores );
+ void addWordToIgnore( const TQString& word );
+ TQStringList currentIgnoreList() const;
+ bool ignore( const TQString& word );
void save();
@@ -64,7 +64,7 @@ namespace KSpell2
private:
void loadConfig();
void readIgnoreList();
- void setQuietIgnoreList( const QStringList& ignores );
+ void setQuietIgnoreList( const TQStringList& ignores );
private:
friend class Broker;
diff --git a/kspell2/tests/backgroundtest.cpp b/kspell2/tests/backgroundtest.cpp
index a0fb7c69b..db9ad9a69 100644
--- a/kspell2/tests/backgroundtest.cpp
+++ b/kspell2/tests/backgroundtest.cpp
@@ -131,13 +131,13 @@ Discussion\
If you want to talk about this code feel free to mail us.";
BackgroundTest::BackgroundTest()
- : QObject( 0 )
+ : TQObject( 0 )
{
m_checker = new BackgroundChecker( Broker::openBroker(), this );
- connect( m_checker, SIGNAL(done()),
- SLOT(slotDone()) );
- connect( m_checker, SIGNAL(misspelling(const QString&, int)),
- SLOT(slotMisspelling(const QString&, int)) );
+ connect( m_checker, TQT_SIGNAL(done()),
+ TQT_SLOT(slotDone()) );
+ connect( m_checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SLOT(slotMisspelling(const TQString&, int)) );
m_len = strlen( text );
m_checker->checkText( text );
m_timer.start();
@@ -147,10 +147,10 @@ void BackgroundTest::slotDone()
{
kdDebug()<<"Text of length "<<m_len<<" checked in "
<< m_timer.elapsed() << " msec."<<endl;
- QApplication::exit();
+ TQApplication::exit();
}
-void BackgroundTest::slotMisspelling( const QString& word, int start )
+void BackgroundTest::slotMisspelling( const TQString& word, int start )
{
kdDebug()<<"Misspelling \""<< word << "\" at " << start << endl;
m_checker->continueChecking();
diff --git a/kspell2/tests/backgroundtest.h b/kspell2/tests/backgroundtest.h
index 6dac80af7..fcdf9db55 100644
--- a/kspell2/tests/backgroundtest.h
+++ b/kspell2/tests/backgroundtest.h
@@ -21,8 +21,8 @@
#ifndef BACKGROUNDTEST_H
#define BACKGROUNDTEST_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include "backgroundchecker.h"
@@ -34,11 +34,11 @@ public:
protected slots:
void slotDone();
- void slotMisspelling( const QString& word, int start );
+ void slotMisspelling( const TQString& word, int start );
private:
KSpell2::BackgroundChecker *m_checker;
- QTime m_timer;
+ TQTime m_timer;
int m_len;
};
diff --git a/kspell2/tests/test.cpp b/kspell2/tests/test.cpp
index 15425527d..e9b72a794 100644
--- a/kspell2/tests/test.cpp
+++ b/kspell2/tests/test.cpp
@@ -24,7 +24,7 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
using namespace KSpell2;
@@ -39,7 +39,7 @@ int main( int argc, char** argv )
Dictionary *dict = broker->dictionary( "en_US" );
- QStringList words;
+ TQStringList words;
words << "hello" << "helo" << "enviroment" << "guvernment" << "farted"
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted"
@@ -82,12 +82,12 @@ int main( int argc, char** argv )
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted"
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted";
- QTime mtime;
+ TQTime mtime;
mtime.start();
- for ( QStringList::Iterator itr = words.begin(); itr != words.end(); ++itr ) {
+ for ( TQStringList::Iterator itr = words.begin(); itr != words.end(); ++itr ) {
if ( dict && !dict->check( *itr ) ) {
//kdDebug()<<"Word " << *itr <<" is misspelled"<<endl;
- QStringList sug = dict->suggest( *itr );
+ TQStringList sug = dict->suggest( *itr );
//kdDebug()<<"Suggestions : "<<sug<<endl;
}
}
diff --git a/kspell2/tests/test_dialog.cpp b/kspell2/tests/test_dialog.cpp
index d481de00d..f0ee1ab3b 100644
--- a/kspell2/tests/test_dialog.cpp
+++ b/kspell2/tests/test_dialog.cpp
@@ -30,23 +30,23 @@
using namespace KSpell2;
TestDialog::TestDialog()
- : QObject( 0, "testdialog" )
+ : TQObject( 0, "testdialog" )
{
}
-void TestDialog::check( const QString& buffer )
+void TestDialog::check( const TQString& buffer )
{
KSpell2::Dialog *dlg = new KSpell2::Dialog(
new BackgroundChecker( Broker::openBroker(), this, "checker" ),
0, "my dialog" );
- connect( dlg, SIGNAL(done(const QString&)),
- SLOT(doneChecking(const QString&)) );
+ connect( dlg, TQT_SIGNAL(done(const TQString&)),
+ TQT_SLOT(doneChecking(const TQString&)) );
dlg->setBuffer( buffer );
dlg->show();
}
-void TestDialog::doneChecking( const QString& buf )
+void TestDialog::doneChecking( const TQString& buf )
{
kdDebug()<<"Done with :"<<buf<<endl;
qApp->quit();
diff --git a/kspell2/tests/test_dialog.h b/kspell2/tests/test_dialog.h
index 2ce70aaeb..5ef2dd189 100644
--- a/kspell2/tests/test_dialog.h
+++ b/kspell2/tests/test_dialog.h
@@ -24,7 +24,7 @@
#include "dialog.h"
#include "broker.h"
-#include <qobject.h>
+#include <tqobject.h>
class TestDialog : public QObject
{
@@ -33,8 +33,8 @@ public:
TestDialog();
public slots:
- void check( const QString& buffer );
- void doneChecking( const QString& );
+ void check( const TQString& buffer );
+ void doneChecking( const TQString& );
private:
KSpell2::Broker *m_broker;
};
diff --git a/kspell2/tests/test_filter.cpp b/kspell2/tests/test_filter.cpp
index d55b3801f..eafaf622f 100644
--- a/kspell2/tests/test_filter.cpp
+++ b/kspell2/tests/test_filter.cpp
@@ -30,7 +30,7 @@ int main( int argc, char** argv )
{
KApplication app(argc, argv, "Filter");
- QString buffer = QString( "This is a sample buffer. Please test me." );
+ TQString buffer = TQString( "This is a sample buffer. Please test me." );
Filter filter;
filter.setBuffer( buffer );
diff --git a/kspell2/tests/test_highlighter.cpp b/kspell2/tests/test_highlighter.cpp
index faeab0d27..ce5c64501 100644
--- a/kspell2/tests/test_highlighter.cpp
+++ b/kspell2/tests/test_highlighter.cpp
@@ -25,13 +25,13 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
int main( int argc, char** argv )
{
KApplication app(argc, argv, "KSpell2Test");
- QTextEdit *test = new QTextEdit();
+ TQTextEdit *test = new TQTextEdit();
KSpell2::Highlighter *hl = new KSpell2::Highlighter( test );
Q_UNUSED( hl );
app.setMainWidget( test );
diff --git a/kspell2/threadevents.h b/kspell2/threadevents.h
index 50b5938d6..e6b52293e 100644
--- a/kspell2/threadevents.h
+++ b/kspell2/threadevents.h
@@ -21,8 +21,8 @@
#ifndef KSPELL_THREADEVENTS_H
#define KSPELL_THREADEVENTS_H
-#include <qevent.h>
-#include <qstring.h>
+#include <tqevent.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -33,27 +33,27 @@ namespace KSpell2
class MisspellingEvent : public QCustomEvent
{
public:
- MisspellingEvent( const QString& word,
+ MisspellingEvent( const TQString& word,
int pos )
- : QCustomEvent( FoundMisspelling ), m_word( word ),
+ : TQCustomEvent( FoundMisspelling ), m_word( word ),
m_position( pos )
{}
- QString word() const {
+ TQString word() const {
return m_word;
}
int position() const {
return m_position;
}
private:
- QString m_word;
+ TQString m_word;
int m_position;
};
class FinishedCheckingEvent : public QCustomEvent
{
public:
FinishedCheckingEvent()
- : QCustomEvent( FinishedChecking )
+ : TQCustomEvent( FinishedChecking )
{}
};
diff --git a/kspell2/ui/configdialog.cpp b/kspell2/ui/configdialog.cpp
index 09a0af923..56e39ca2b 100644
--- a/kspell2/ui/configdialog.cpp
+++ b/kspell2/ui/configdialog.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
using namespace KSpell2;
@@ -33,7 +33,7 @@ public:
ConfigWidget *ui;
};
-ConfigDialog::ConfigDialog( Broker *broker, QWidget *parent )
+ConfigDialog::ConfigDialog( Broker *broker, TQWidget *parent )
: KDialogBase( parent, "KSpell2ConfigDialog", true,
i18n( "KSpell2 Configuration" ),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
@@ -50,7 +50,7 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::init( Broker *broker )
{
d = new Private;
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
d->ui = new ConfigWidget( broker, page );
}
diff --git a/kspell2/ui/configdialog.h b/kspell2/ui/configdialog.h
index 5a2ee53c8..ead508d34 100644
--- a/kspell2/ui/configdialog.h
+++ b/kspell2/ui/configdialog.h
@@ -31,7 +31,7 @@ namespace KSpell2
Q_OBJECT
public:
ConfigDialog( Broker *broker,
- QWidget *parent );
+ TQWidget *parent );
~ConfigDialog();
protected slots:
diff --git a/kspell2/ui/configwidget.cpp b/kspell2/ui/configwidget.cpp
index 09811e56a..6d98955ae 100644
--- a/kspell2/ui/configwidget.cpp
+++ b/kspell2/ui/configwidget.cpp
@@ -28,8 +28,8 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
using namespace KSpell2;
@@ -40,8 +40,8 @@ public:
KSpell2ConfigUI *ui;
};
-ConfigWidget::ConfigWidget( Broker *broker, QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigWidget::ConfigWidget( Broker *broker, TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
init( broker );
}
@@ -56,22 +56,22 @@ void ConfigWidget::init( Broker *broker )
d = new Private;
d->broker = broker;
- QVBoxLayout *layout = new QVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
d->ui = new KSpell2ConfigUI( this );
- QStringList langs = d->broker->languages();
- //QStringList clients = d->broker->clients();
+ TQStringList langs = d->broker->languages();
+ //TQStringList clients = d->broker->clients();
d->ui->m_langCombo->insertStringList( langs );
setCorrectLanguage( langs );
//d->ui->m_clientCombo->insertStringList( clients );
d->ui->m_skipUpperCB->setChecked( !d->broker->settings()->checkUppercase() );
d->ui->m_skipRunTogetherCB->setChecked( d->broker->settings()->skipRunTogether() );
- QStringList ignoreList = d->broker->settings()->currentIgnoreList();
+ TQStringList ignoreList = d->broker->settings()->currentIgnoreList();
ignoreList.sort();
d->ui->m_ignoreListBox->insertStringList( ignoreList );
d->ui->m_bgSpellCB->setChecked( d->broker->settings()->backgroundCheckerEnabled() );
d->ui->m_bgSpellCB->hide();//hidden by default
- connect( d->ui->m_ignoreListBox, SIGNAL(changed()), SLOT(slotChanged()) );
+ connect( d->ui->m_ignoreListBox, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) );
layout->addWidget( d->ui );
}
@@ -100,10 +100,10 @@ void ConfigWidget::slotChanged()
d->ui->m_ignoreListBox->items() );
}
-void ConfigWidget::setCorrectLanguage( const QStringList& langs)
+void ConfigWidget::setCorrectLanguage( const TQStringList& langs)
{
int idx = 0;
- for ( QStringList::const_iterator itr = langs.begin();
+ for ( TQStringList::const_iterator itr = langs.begin();
itr != langs.end(); ++itr, ++idx ) {
if ( *itr == d->broker->settings()->defaultLanguage() )
d->ui->m_langCombo->setCurrentItem( idx );
diff --git a/kspell2/ui/configwidget.h b/kspell2/ui/configwidget.h
index 18eb8e74f..ed49ca20e 100644
--- a/kspell2/ui/configwidget.h
+++ b/kspell2/ui/configwidget.h
@@ -21,7 +21,7 @@
#ifndef KSPELL_CONFIGWIDGET_H
#define KSPELL_CONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
namespace KSpell2
@@ -31,7 +31,7 @@ namespace KSpell2
{
Q_OBJECT
public:
- ConfigWidget( Broker *broker, QWidget *parent, const char *name =0 );
+ ConfigWidget( Broker *broker, TQWidget *parent, const char *name =0 );
~ConfigWidget();
bool backgroundCheckingButtonShown() const;
@@ -46,7 +46,7 @@ namespace KSpell2
private:
void init( Broker *broker );
void setFromGUI();
- void setCorrectLanguage( const QStringList& langs );
+ void setCorrectLanguage( const TQStringList& langs );
private:
class Private;
diff --git a/kspell2/ui/dialog.cpp b/kspell2/ui/dialog.cpp
index c7f6aa51e..93b81fd94 100644
--- a/kspell2/ui/dialog.cpp
+++ b/kspell2/ui/dialog.cpp
@@ -31,13 +31,13 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qdict.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqdict.h>
namespace KSpell2
{
@@ -49,15 +49,15 @@ class Dialog::Private
{
public:
KSpell2UI *ui;
- QString originalBuffer;
+ TQString originalBuffer;
BackgroundChecker *checker;
Word currentWord;
- QMap<QString, QString> replaceAllMap;
+ TQMap<TQString, TQString> replaceAllMap;
};
Dialog::Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n( "Check Spelling" ),
Help|Cancel|User1, Cancel, true,
@@ -79,35 +79,35 @@ Dialog::~Dialog()
void Dialog::initConnections()
{
- connect( d->ui->m_addBtn, SIGNAL(clicked()),
- SLOT(slotAddWord()) );
- connect( d->ui->m_replaceBtn, SIGNAL(clicked()),
- SLOT(slotReplaceWord()) );
- connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()),
- SLOT(slotReplaceAll()) );
- connect( d->ui->m_skipBtn, SIGNAL(clicked()),
- SLOT(slotSkip()) );
- connect( d->ui->m_skipAllBtn, SIGNAL(clicked()),
- SLOT(slotSkipAll()) );
- connect( d->ui->m_suggestBtn, SIGNAL(clicked()),
- SLOT(slotSuggest()) );
- connect( d->ui->m_language, SIGNAL(activated(const QString&)),
- SLOT(slotChangeLanguage(const QString&)) );
- connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SIGNAL(misspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SLOT(slotMisspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(done()),
- SLOT(slotDone()) );
- connect( d->ui->m_suggestions, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT( slotReplaceWord() ) );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotFinished()) );
- connect( this, SIGNAL(cancelClicked()),this, SLOT(slotCancel()) );
- connect( d->ui->m_replacement, SIGNAL(returnPressed()), this, SLOT(slotReplaceWord()) );
- connect( d->ui->m_autoCorrect, SIGNAL(clicked()),
- SLOT(slotAutocorrect()) );
+ connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAddWord()) );
+ connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceAll()) );
+ connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkip()) );
+ connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkipAll()) );
+ connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSuggest()) );
+ connect( d->ui->m_language, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotChangeLanguage(const TQString&)) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SIGNAL(misspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SLOT(slotMisspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(done()),
+ TQT_SLOT(slotDone()) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT( slotReplaceWord() ) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotFinished()) );
+ connect( this, TQT_SIGNAL(cancelClicked()),this, TQT_SLOT(slotCancel()) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_autoCorrect, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAutocorrect()) );
// button use by kword/kpresenter
// hide by default
d->ui->m_autoCorrect->hide();
@@ -120,7 +120,7 @@ void Dialog::initGui()
d->ui->m_language->clear();
d->ui->m_language->insertStringList( d->checker->broker()->languages() );
for ( int i = 0; !d->ui->m_language->text( i ).isNull(); ++i ) {
- QString ct = d->ui->m_language->text( i );
+ TQString ct = d->ui->m_language->text( i );
if ( ct == d->checker->broker()->settings()->defaultLanguage() ) {
d->ui->m_language->setCurrentItem( i );
break;
@@ -159,17 +159,17 @@ void Dialog::slotCancel()
reject();
}
-QString Dialog::originalBuffer() const
+TQString Dialog::originalBuffer() const
{
return d->originalBuffer;
}
-QString Dialog::buffer() const
+TQString Dialog::buffer() const
{
return d->checker->filter()->buffer();
}
-void Dialog::setBuffer( const QString& buf )
+void Dialog::setBuffer( const TQString& buf )
{
d->originalBuffer = buf;
}
@@ -180,11 +180,11 @@ void Dialog::setFilter( Filter *filter )
d->checker->setFilter( filter );
}
-void Dialog::updateDialog( const QString& word )
+void Dialog::updateDialog( const TQString& word )
{
d->ui->m_unknownWord->setText( word );
d->ui->m_contextLabel->setText( d->checker->filter()->context() );
- QStringList suggs = d->checker->suggest( word );
+ TQStringList suggs = d->checker->suggest( word );
d->ui->m_replacement->setText( suggs.first() );
fillSuggestions( suggs );
}
@@ -233,31 +233,31 @@ void Dialog::slotSkipAll()
void Dialog::slotSuggest()
{
- QStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
+ TQStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
fillSuggestions( suggs );
}
-void Dialog::slotChangeLanguage( const QString& lang )
+void Dialog::slotChangeLanguage( const TQString& lang )
{
d->checker->changeLanguage( lang );
slotSuggest();
}
-void Dialog::slotSelectionChanged( QListViewItem *item )
+void Dialog::slotSelectionChanged( TQListViewItem *item )
{
d->ui->m_replacement->setText( item->text( 0 ) );
}
-void Dialog::fillSuggestions( const QStringList& suggs )
+void Dialog::fillSuggestions( const TQStringList& suggs )
{
d->ui->m_suggestions->clear();
- for ( QStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
- new QListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
+ for ( TQStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
+ new TQListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
*it );
}
}
-void Dialog::slotMisspelling(const QString& word, int start )
+void Dialog::slotMisspelling(const TQString& word, int start )
{
kdDebug()<<"Dialog misspelling!!"<<endl;
d->currentWord = Word( word, start );
diff --git a/kspell2/ui/dialog.h b/kspell2/ui/dialog.h
index 20d295c96..1da714c7c 100644
--- a/kspell2/ui/dialog.h
+++ b/kspell2/ui/dialog.h
@@ -33,30 +33,30 @@ namespace KSpell2
Q_OBJECT
public:
Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name=0 );
+ TQWidget *parent, const char *name=0 );
~Dialog();
- QString originalBuffer() const;
- QString buffer() const;
+ TQString originalBuffer() const;
+ TQString buffer() const;
void show();
void activeAutoCorrect( bool _active );
public slots:
- void setBuffer( const QString& );
+ void setBuffer( const TQString& );
void setFilter( Filter* filter );
signals:
- void done( const QString& newBuffer );
- void misspelling( const QString& word, int start );
- void replace( const QString& oldWord, int start,
- const QString& newWord );
+ void done( const TQString& newBuffer );
+ void misspelling( const TQString& word, int start );
+ void replace( const TQString& oldWord, int start,
+ const TQString& newWord );
void stop();
void cancel();
- void autoCorrect( const QString & currentWord, const QString & replaceWord );
+ void autoCorrect( const TQString & currentWord, const TQString & replaceWord );
private slots:
- void slotMisspelling(const QString& word, int start );
+ void slotMisspelling(const TQString& word, int start );
void slotDone();
void slotFinished();
@@ -68,13 +68,13 @@ namespace KSpell2
void slotSkip();
void slotSkipAll();
void slotSuggest();
- void slotChangeLanguage( const QString& );
- void slotSelectionChanged( QListViewItem * );
+ void slotChangeLanguage( const TQString& );
+ void slotSelectionChanged( TQListViewItem * );
void slotAutocorrect();
private:
- void updateDialog( const QString& word );
- void fillSuggestions( const QStringList& suggs );
+ void updateDialog( const TQString& word );
+ void fillSuggestions( const TQStringList& suggs );
void initConnections();
void initGui();
void continueChecking();
diff --git a/kspell2/ui/highlighter.cpp b/kspell2/ui/highlighter.cpp
index 0ecbb9802..2d185462d 100644
--- a/kspell2/ui/highlighter.cpp
+++ b/kspell2/ui/highlighter.cpp
@@ -27,10 +27,10 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qtextedit.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qdict.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqdict.h>
namespace KSpell2 {
@@ -40,13 +40,13 @@ public:
Filter *filter;
Broker::Ptr broker;
Dictionary *dict;
- QDict<Dictionary> dictCache;
+ TQDict<Dictionary> dictCache;
};
-Highlighter::Highlighter( QTextEdit *textEdit,
- const QString& configFile,
+Highlighter::Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile,
Filter *filter)
- : QSyntaxHighlighter( textEdit )
+ : TQSyntaxHighlighter( textEdit )
{
d = new Private;
d->filter = filter;
@@ -67,7 +67,7 @@ Highlighter::~Highlighter()
delete d; d = 0;
}
-int Highlighter::highlightParagraph( const QString& text,
+int Highlighter::highlightParagraph( const TQString& text,
int endStateOfLastPara )
{
Q_UNUSED( endStateOfLastPara );
@@ -87,7 +87,7 @@ int Highlighter::highlightParagraph( const QString& text,
w = d->filter->nextWord();
}
}
- //QTimer::singleShot( 0, this, SLOT(checkWords()) );
+ //TQTimer::singleShot( 0, this, TQT_SLOT(checkWords()) );
return 0;
}
@@ -103,12 +103,12 @@ void Highlighter::setCurrentFilter( Filter *filter )
d->filter->setSettings( d->broker->settings() );
}
-QString Highlighter::currentLanguage() const
+TQString Highlighter::currentLanguage() const
{
return d->dict->language();
}
-void Highlighter::setCurrentLanguage( const QString& lang )
+void Highlighter::setCurrentLanguage( const TQString& lang )
{
if ( !d->dictCache.find( lang ) ) {
Dictionary *dict = d->broker->dictionary( lang );
diff --git a/kspell2/ui/highlighter.h b/kspell2/ui/highlighter.h
index 86140f054..c9a832f3a 100644
--- a/kspell2/ui/highlighter.h
+++ b/kspell2/ui/highlighter.h
@@ -23,7 +23,7 @@
#include "filter.h"
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
class QTextEdit;
@@ -32,19 +32,19 @@ namespace KSpell2
class Highlighter : public QSyntaxHighlighter
{
public:
- Highlighter( QTextEdit *textEdit,
- const QString& configFile = QString::null,
+ Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile = TQString::null,
Filter *filter = Filter::defaultFilter() );
~Highlighter();
- virtual int highlightParagraph( const QString& text,
+ virtual int highlightParagraph( const TQString& text,
int endStateOfLastPara );
Filter *currentFilter() const;
void setCurrentFilter( Filter *filter );
- QString currentLanguage() const;
- void setCurrentLanguage( const QString& lang );
+ TQString currentLanguage() const;
+ void setCurrentLanguage( const TQString& lang );
protected:
virtual void setMisspelled( int start, int count );
diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp
index b033ea2d5..3f559d0fa 100644
--- a/kstyles/highcolor/highcolor.cpp
+++ b/kstyles/highcolor/highcolor.cpp
@@ -25,21 +25,21 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qstyleplugin.h>
-
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qmenubar.h>
-#include <qpushbutton.h>
-#include <qscrollbar.h>
-#include <qslider.h>
-#include <qtabbar.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqstyleplugin.h>
+
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqmenubar.h>
+#include <tqpushbutton.h>
+#include <tqscrollbar.h>
+#include <tqslider.h>
+#include <tqtabbar.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#include <kdrawutil.h>
#include <kpixmapeffect.h>
@@ -56,12 +56,12 @@ class HighColorStylePlugin : public QStylePlugin
HighColorStylePlugin() {}
~HighColorStylePlugin() {}
- QStringList keys() const
+ TQStringList keys() const
{
- return QStringList() << "HighColor" << "Default" << "B3";
+ return TQStringList() << "HighColor" << "Default" << "B3";
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
if ( key == "highcolor" )
return new HighColorStyle( HighColorStyle::HighColor );
@@ -80,13 +80,13 @@ KDE_Q_EXPORT_PLUGIN( HighColorStylePlugin )
// ---------------------------------------------------
-static QBitmap lightBmp;
-static QBitmap grayBmp;
-static QBitmap dgrayBmp;
-static QBitmap centerBmp;
-static QBitmap maskBmp;
-static QBitmap xBmp;
-static QIntDict<GradientSet> gDict;
+static TQBitmap lightBmp;
+static TQBitmap grayBmp;
+static TQBitmap dgrayBmp;
+static TQBitmap centerBmp;
+static TQBitmap maskBmp;
+static TQBitmap xBmp;
+static TQIntDict<GradientSet> gDict;
static const int itemFrame = 1;
static const int itemHMargin = 3;
@@ -97,7 +97,7 @@ static const char* kdeToolbarWidget = "kde toolbar widget";
// ---------------------------------------------------------------------------
-GradientSet::GradientSet(const QColor &baseColor)
+GradientSet::GradientSet(const TQColor &baseColor)
{
c = baseColor;
for(int i=0; i < GradientCount; i++)
@@ -174,7 +174,7 @@ HighColorStyle::HighColorStyle( StyleType styleType )
: KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar )
{
type = styleType;
- highcolor = (type == HighColor && QPixmap::defaultDepth() > 8);
+ highcolor = (type == HighColor && TQPixmap::defaultDepth() > 8);
gDict.setAutoDelete(true);
hoverWidget = 0L;
selectionBackground = false;
@@ -186,20 +186,20 @@ HighColorStyle::~HighColorStyle()
}
-void HighColorStyle::polish(QWidget* widget)
+void HighColorStyle::polish(TQWidget* widget)
{
// Put in order of highest occurrence to maximise hit rate
- if (widget->inherits("QPushButton")) {
+ if (widget->inherits("TQPushButton")) {
widget->installEventFilter(this);
- } else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) {
- widget->setBackgroundMode(QWidget::NoBackground);
+ } else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) {
+ widget->setBackgroundMode(TQWidget::NoBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->installEventFilter(this);
} else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) {
widget->setBackgroundMode( NoBackground ); // We paint the whole background.
widget->installEventFilter(this);
} else if (widget->inherits("QToolBoxButton")) {
- QFont font = widget->font();
+ TQFont font = widget->font();
font.setBold(true);
widget->setFont(font);
}
@@ -208,13 +208,13 @@ void HighColorStyle::polish(QWidget* widget)
}
-void HighColorStyle::unPolish(QWidget* widget)
+void HighColorStyle::unPolish(TQWidget* widget)
{
- if (widget->inherits("QPushButton")) {
+ if (widget->inherits("TQPushButton")) {
widget->removeEventFilter(this);
}
- else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) {
- widget->setBackgroundMode(QWidget::PaletteBackground);
+ else if (widget->inherits("TQMenuBar") || widget->inherits("TQPopupMenu")) {
+ widget->setBackgroundMode(TQWidget::PaletteBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->removeEventFilter(this);
} else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) {
@@ -227,13 +227,13 @@ void HighColorStyle::unPolish(QWidget* widget)
/* reimp. */
-void HighColorStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void HighColorStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
- QColor col = cg.button();
+ TQColor col = cg.button();
#ifdef Q_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals
- if ( QPaintDevice::x11AppDepth() >= 24 )
+ if ( TQPaintDevice::x11AppDepth() >= 24 )
KPixmapEffect::gradient( pix, col.light(120), col.dark(115),
KPixmapEffect::HorizontalGradient );
else
@@ -244,11 +244,11 @@ void HighColorStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
// This function draws primitive elements as well as their masks.
void HighColorStyle::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool down = flags & Style_Down;
bool on = flags & Style_On;
@@ -279,7 +279,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
int y2 = y+h-1;
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Outer frame (round style)
p->setPen(cg.shadow());
@@ -314,10 +314,10 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if ( sunken )
kDrawBeButton( p, x, y, w, h, cg, true,
- &cg.brush(QColorGroup::Mid) );
+ &cg.brush(TQColorGroup::Mid) );
else if ( flags & Style_MouseOver && !flat ) {
- QBrush brush(cg.button().light(110));
+ TQBrush brush(cg.button().light(110));
kDrawBeButton( p, x, y, w, h, cg, false, &brush );
}
@@ -326,7 +326,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if ( flags & Style_MouseOver )
p->fillRect(r, cg.button().light(110));
else
- renderGradient(p, QRect(x, y, w-1, h-1),
+ renderGradient(p, TQRect(x, y, w-1, h-1),
cg.button(), false);
p->setPen(cg.button().light(75));
@@ -360,11 +360,11 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine(x+1, y+2, x+1, y2-1);
p->drawLine(x2-2, y+3, x2-2, y2-2);
- renderGradient(p, QRect(x+4, y+4, w-6, h-6),
+ renderGradient(p, TQRect(x+4, y+4, w-6, h-6),
cg.button(), false);
} else
kDrawBeButton(p, x, y, w, h, cg, false,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
break;
}
@@ -394,7 +394,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+2, y+2, w-4, h-4, cg.button());
else
- renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), flags & Style_Horizontal );
}
break;
@@ -414,8 +414,8 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
case PE_HeaderSection: {
// Temporary solution for the proper orientation of gradients.
bool horizontal = true;
- if (p && p->device()->devType() == QInternal::Widget) {
- QHeader* hdr = dynamic_cast<QHeader*>(p->device());
+ if (p && p->device()->devType() == TQInternal::Widget) {
+ TQHeader* hdr = dynamic_cast<TQHeader*>(p->device());
if (hdr)
horizontal = hdr->orientation() == Horizontal;
}
@@ -425,7 +425,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
bool sunken = on || down;
int x2 = x+w-1;
int y2 = y+h-1;
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Bevel
p->setPen(sunken ? cg.mid() : cg.light());
@@ -441,7 +441,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+1, y+1, w-3, h-3, cg.button());
else
- renderGradient( p, QRect(x+1, y+1, w-3, h-3),
+ renderGradient( p, TQRect(x+1, y+1, w-3, h-3),
cg.button(), !horizontal );
p->setPen( oldPen );
break;
@@ -563,12 +563,12 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_Horizontal) {
p->drawLine(x, y, x2, y);
p->drawLine(x, y2, x2, y2);
- renderGradient(p, QRect(x, y+1, w, h-2),
+ renderGradient(p, TQRect(x, y+1, w, h-2),
cg.mid(), false);
} else {
p->drawLine(x, y, x, y2);
p->drawLine(x2, y, x2, y2);
- renderGradient(p, QRect(x+1, y, w-2, h),
+ renderGradient(p, TQRect(x+1, y, w-2, h),
cg.mid(), true);
}
} else {
@@ -579,12 +579,12 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_Horizontal) {
p->drawLine(x, y, x2, y);
p->drawLine(x, y2, x2, y2);
- p->fillRect( QRect(x, y+1, w, h-2),
+ p->fillRect( TQRect(x, y+1, w, h-2),
flags & Style_Down ? cg.button() : cg.midlight() );
} else {
p->drawLine(x, y, x, y2);
p->drawLine(x2, y, x2, y2);
- p->fillRect( QRect(x+1, y, w-2, h),
+ p->fillRect( TQRect(x+1, y, w-2, h),
flags & Style_Down ? cg.button() : cg.midlight() );
}
}
@@ -620,7 +620,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
bool nochange = flags & Style_NoChange;
if (xBmp.isNull()) {
- xBmp = QBitmap(7, 7, x_bits, true);
+ xBmp = TQBitmap(7, 7, x_bits, true);
xBmp.setMask(xBmp);
}
@@ -674,10 +674,10 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator: {
if (lightBmp.isNull()) {
- lightBmp = QBitmap(13, 13, radiooff_light_bits, true);
- grayBmp = QBitmap(13, 13, radiooff_gray_bits, true);
- dgrayBmp = QBitmap(13, 13, radiooff_dgray_bits, true);
- centerBmp = QBitmap(13, 13, radiooff_center_bits, true);
+ lightBmp = TQBitmap(13, 13, radiooff_light_bits, true);
+ grayBmp = TQBitmap(13, 13, radiooff_gray_bits, true);
+ dgrayBmp = TQBitmap(13, 13, radiooff_dgray_bits, true);
+ centerBmp = TQBitmap(13, 13, radiooff_center_bits, true);
centerBmp.setMask( centerBmp );
}
@@ -694,7 +694,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
// Indicator "dot"
if ( on ) {
- QColor color = flags & Style_NoChange ?
+ TQColor color = flags & Style_NoChange ?
cg.dark() : cg.text();
p->setPen(color);
@@ -713,7 +713,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
case PE_ExclusiveIndicatorMask: {
if (maskBmp.isNull()) {
- maskBmp = QBitmap(13, 13, radiomask_bits, true);
+ maskBmp = TQBitmap(13, 13, radiomask_bits, true);
maskBmp.setMask(maskBmp);
}
@@ -748,7 +748,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->setPen(cg.mid());
p->drawLine(x2-1, y+1, x2-1, y2-1);
p->drawLine(x+1, y2-1, x2-1, y2-1);
- p->fillRect(x+3, y+3, w-5, h-5, cg.brush(QColorGroup::Background));
+ p->fillRect(x+3, y+3, w-5, h-5, cg.brush(TQColorGroup::Background));
break;
}
@@ -764,7 +764,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
: opt.lineWidth();
if (lw == 2)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x,y,w,h;
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
@@ -808,7 +808,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine(x2, r.y(), x2, y2);
// ### Qt should specify Style_Horizontal where appropriate
- renderGradient( p, QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
+ renderGradient( p, TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
cg.button(),
(r.width() < r.height()) && (pe != PE_PanelMenuBar) );
}
@@ -847,7 +847,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft)
{
- QPointArray a;
+ TQPointArray a;
if ( type != B3 ) {
// HighColor & Default arrows
@@ -914,12 +914,12 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch ( kpe )
{
@@ -1000,15 +1000,15 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
// SLIDER GROOVE
// -------------------------------------------------------------------
case KPE_SliderGroove: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
int gcenter = (horizontal ? r.height() : r.width()) / 2;
- QRect gr;
+ TQRect gr;
if (horizontal)
- gr = QRect(r.x(), r.y()+gcenter-3, r.width(), 7);
+ gr = TQRect(r.x(), r.y()+gcenter-3, r.width(), 7);
else
- gr = QRect(r.x()+gcenter-3, r.y(), 7, r.height());
+ gr = TQRect(r.x()+gcenter-3, r.y(), 7, r.height());
int x,y,w,h;
gr.rect(&x, &y, &w, &h);
@@ -1034,7 +1034,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
// SLIDER HANDLE
// -------------------------------------------------------------------
case KPE_SliderHandle: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
int x,y,w,h;
r.rect(&x, &y, &w, &h);
@@ -1060,7 +1060,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->setPen(cg.mid());
p->drawLine(x+3, y2-2, x2-2, y2-2);
p->drawLine(x2-2, y+3, x2-2, y2-2);
- renderGradient(p, QRect(x+3, y+3, w-6, h-6),
+ renderGradient(p, TQRect(x+3, y+3, w-6, h-6),
cg.button(), !horizontal);
// Paint riffles
@@ -1093,12 +1093,12 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
void HighColorStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch (element)
{
@@ -1109,8 +1109,8 @@ void HighColorStyle::drawControl( ControlElement element,
flags |= Style_MouseOver;
if ( type != HighColor ) {
- QPushButton *button = (QPushButton*) widget;
- QRect br = r;
+ TQPushButton *button = (TQPushButton*) widget;
+ TQRect br = r;
bool btnDefault = button->isDefault();
if ( btnDefault || button->autoDefault() ) {
@@ -1134,7 +1134,7 @@ void HighColorStyle::drawControl( ControlElement element,
// PUSHBUTTON LABEL
// -------------------------------------------------------------------
case CE_PushButtonLabel: {
- const QPushButton* button = (const QPushButton*)widget;
+ const TQPushButton* button = (const TQPushButton*)widget;
bool active = button->isOn() || button->isDown();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1149,22 +1149,22 @@ void HighColorStyle::drawControl( ControlElement element,
// Does the button have a popup menu?
if ( button->isMenuButton() ) {
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, QRect(x + w - dx - 2, y + 2, dx, h - 4),
+ drawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4),
cg, flags, opt );
w -= dx;
}
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet()->isNull() ) {
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet()->pixmap( TQIconSet::Small, mode, state );
// Center the iconset if there's no text or pixmap
if (button->text().isEmpty() && !button->pixmap())
@@ -1181,33 +1181,33 @@ void HighColorStyle::drawControl( ControlElement element,
// Make the label indicate if the button is a default button or not
if ( active || button->isDefault() ) {
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in QPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
int i;
// Text shadow
if (button->isEnabled()) // Don't draw double-shadow when disabled
for(i=0; i<2; i++)
- drawItem( p, QRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for(i=0; i<2; i++)
- drawItem( p, QRect(x+i, y, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL,
button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
} else
- drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
// Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
+ TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
cg, flags );
break;
}
@@ -1229,13 +1229,13 @@ void HighColorStyle::drawControl( ControlElement element,
p->drawLine( x, y2, x2, y2 );
p->drawLine( x2, y, x2, y2 );
- QColor fill = selected ? cg.highlight() : cg.button();
+ TQColor fill = selected ? cg.highlight() : cg.button();
selectionBackground = selected;
if ( pressed )
- p->fillRect( QRect(x+1, y+1, r.width()-2, r.height()-2), fill );
+ p->fillRect( TQRect(x+1, y+1, r.width()-2, r.height()-2), fill );
else
- renderGradient(p, QRect(x+1, y+1, r.width()-2, r.height()-2),
+ renderGradient(p, TQRect(x+1, y+1, r.width()-2, r.height()-2),
fill, false);
break;
}
@@ -1252,16 +1252,16 @@ void HighColorStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_MenuBarItem:
{
- QMenuBar *mb = (QMenuBar*)widget;
- QMenuItem *mi = opt.menuItem();
- QRect pr = mb->rect();
+ TQMenuBar *mb = (TQMenuBar*)widget;
+ TQMenuItem *mi = opt.menuItem();
+ TQRect pr = mb->rect();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
if ( active && focused )
qDrawShadePanel(p, r.x(), r.y(), r.width(), r.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
renderGradient( p, r, cg.button(), false,
r.x(), r.y()-1, pr.width()-2, pr.height()-2);
@@ -1277,14 +1277,14 @@ void HighColorStyle::drawControl( ControlElement element,
// POPUPMENU ITEM
// -------------------------------------------------------------------
case CE_PopupMenuItem: {
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
if ( !mi ) {
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! (widget->erasePixmap() && !widget->erasePixmap()->isNull()) )
- p->fillRect(r, cg.brush(QColorGroup::Button) );
+ p->fillRect(r, cg.brush(TQColorGroup::Button) );
break;
}
@@ -1294,7 +1294,7 @@ void HighColorStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1313,7 +1313,7 @@ void HighColorStyle::drawControl( ControlElement element,
// Draw the menu item background
if ( active )
qDrawShadePanel( p, x, y, w, h, cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the transparency pixmap
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( x, y, *widget->erasePixmap(), x, y, w, h );
@@ -1323,23 +1323,23 @@ void HighColorStyle::drawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() ) {
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect(x, y, checkcol, h), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && !active && mi->isChecked() )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
}
@@ -1352,13 +1352,13 @@ void HighColorStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
if ( ! active )
qDrawShadePanel( p, cx, y, checkcol, h, cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame*2, h - itemFrame*2), cg, cflags );
}
@@ -1380,7 +1380,7 @@ void HighColorStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
// Does the menu item draw it's own label?
if ( mi->custom() ) {
@@ -1400,7 +1400,7 @@ void HighColorStyle::drawControl( ControlElement element,
}
else {
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
@@ -1441,7 +1441,7 @@ void HighColorStyle::drawControl( ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -1460,7 +1460,7 @@ void HighColorStyle::drawControl( ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator);
- QRect vr = visualRect( QRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1468,7 +1468,7 @@ void HighColorStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( discol, cg.highlight(), white, white,
+ TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -1486,10 +1486,10 @@ void HighColorStyle::drawControl( ControlElement element,
void HighColorStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
switch (element)
{
@@ -1501,7 +1501,7 @@ void HighColorStyle::drawControlMask( ControlElement element,
QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
- p->drawPoints( QPointArray(4, corners) );
+ p->drawPoints( TQPointArray(4, corners) );
break;
}
@@ -1512,14 +1512,14 @@ void HighColorStyle::drawControlMask( ControlElement element,
void HighColorStyle::drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch(control)
{
@@ -1550,7 +1550,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
p->drawPoint(x2,y);
p->drawPoint(x2,y2);
- renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), false);
p->setPen(sunken ? cg.light() : cg.mid());
@@ -1562,7 +1562,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
p->drawLine(x+1, y+2, x+1, y2-2);
// Get the button bounding box
- QRect ar = QStyle::visualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow),
widget );
@@ -1580,8 +1580,8 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
// Draw an edit field if required
if ( controls & SC_ComboBoxEditField )
{
- const QComboBox * cb = (const QComboBox *) widget;
- QRect re = QStyle::visualRect(
+ const TQComboBox * cb = (const TQComboBox *) widget;
+ TQRect re = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget,
SC_ComboBoxEditField), widget );
@@ -1603,13 +1603,13 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
if ( cb->hasFocus() && !cb->editable() ) {
// Draw the contents
p->fillRect( re.x(), re.y(), re.width(), re.height(),
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
- QRect re = QStyle::visualRect(
+ TQRect re = TQStyle::visualRect(
subRect(SR_ComboBoxFocusRect, cb), widget);
drawPrimitive( PE_FocusRect, p, re, cg,
- Style_FocusAtBorder, QStyleOption(cg.highlight()));
+ Style_FocusAtBorder, TQStyleOption(cg.highlight()));
}
}
break;
@@ -1618,9 +1618,9 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
// TOOLBUTTON
// -------------------------------------------------------------------
case CC_ToolButton: {
- const QToolButton *toolbutton = (const QToolButton *) widget;
+ const TQToolButton *toolbutton = (const TQToolButton *) widget;
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -1643,15 +1643,15 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
toolbutton->parentWidget()->backgroundPixmap() &&
!toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- QPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (widget->parent())
{
- if (widget->parent()->inherits("QToolBar"))
+ if (widget->parent()->inherits("TQToolBar"))
{
- QToolBar* parent = (QToolBar*)widget->parent();
- QRect pr = parent->rect();
+ TQToolBar* parent = (TQToolBar*)widget->parent();
+ TQRect pr = parent->rect();
renderGradient( p, r, cg.button(),
parent->orientation() == Qt::Vertical,
@@ -1659,9 +1659,9 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
}
else if (widget->parent()->inherits("QToolBarExtensionWidget"))
{
- QWidget* parent = (QWidget*)widget->parent();
- QToolBar* toolbar = (QToolBar*)parent->parent();
- QRect tr = toolbar->rect();
+ TQWidget* parent = (TQWidget*)widget->parent();
+ TQToolBar* toolbar = (TQToolBar*)parent->parent();
+ TQRect tr = toolbar->rect();
if ( toolbar->orientation() == Qt::Horizontal ) {
renderGradient( p, r, cg.button(), false, r.x(), r.y(),
@@ -1683,7 +1683,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
}
if (toolbutton->hasFocus() && !toolbutton->focusProxy()) {
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords(3, 3, -3, -3);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -1701,10 +1701,10 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
void HighColorStyle::drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
switch (control)
{
@@ -1717,7 +1717,7 @@ void HighColorStyle::drawComplexControlMask( ComplexControl control,
QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
- p->drawPoints( QPointArray(4, corners) );
+ p->drawPoints( TQPointArray(4, corners) );
break;
}
@@ -1727,21 +1727,21 @@ void HighColorStyle::drawComplexControlMask( ComplexControl control,
}
-void HighColorStyle::drawItem( QPainter *p,
- const QRect &r,
+void HighColorStyle::drawItem( TQPainter *p,
+ const TQRect &r,
int flags,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool enabled,
- const QPixmap *pixmap,
- const QString &text,
+ const TQPixmap *pixmap,
+ const TQString &text,
int len,
- const QColor *penColor ) const
+ const TQColor *penColor ) const
{
// We only reimplement this method this so we can override the
// text color used for widgets when we draw them with the selection
// color and Qt expects them to be drawn them with the button color.
// -------------------------------------------------------------------
- const QColor *col;
+ const TQColor *col;
if ( selectionBackground ) {
col = &cg.highlightedText();
@@ -1754,14 +1754,14 @@ void HighColorStyle::drawItem( QPainter *p,
}
-QRect HighColorStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const
{
// We want the focus rect for buttons to be adjusted from
// the Qt3 defaults to be similar to Qt 2's defaults.
// -------------------------------------------------------------------
if (r == SR_PushButtonFocusRect ) {
- const QPushButton* button = (const QPushButton*) widget;
- QRect wrect(widget->rect());
+ const TQPushButton* button = (const TQPushButton*) widget;
+ TQRect wrect(widget->rect());
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
@@ -1772,7 +1772,7 @@ QRect HighColorStyle::subRect(SubRect r, const QWidget *widget) const
int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2,
dfw2 = dfw1 * 2;
- return QRect(wrect.x() + dfw1 + dbw1 + 1,
+ return TQRect(wrect.x() + dfw1 + dbw1 + 1,
wrect.y() + dfw1 + dbw1 + 1,
wrect.width() - dfw2 - dbw2 - 1,
wrect.height() - dfw2 - dbw2 - 1);
@@ -1781,7 +1781,7 @@ QRect HighColorStyle::subRect(SubRect r, const QWidget *widget) const
}
-int HighColorStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -1819,17 +1819,17 @@ int HighColorStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-QSize HighColorStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize HighColorStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch (contents)
{
// PUSHBUTTON SIZE
// ------------------------------------------------------------------
case CT_PushButton: {
- const QPushButton* button = (const QPushButton*) widget;
+ const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -1854,7 +1854,7 @@ QSize HighColorStyle::sizeFromContents( ContentsType contents,
if ( h < 22 )
h = 22;
- return QSize( w, h );
+ return TQSize( w, h );
}
@@ -1864,9 +1864,9 @@ QSize HighColorStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = (const QPopupMenu *) widget;
+ const TQPopupMenu *popup = (const TQPopupMenu *) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -1894,7 +1894,7 @@ QSize HighColorStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() )
h = QMAX( h, mi->iconSet()->pixmap(
- QIconSet::Small, QIconSet::Normal).height() +
+ TQIconSet::Small, TQIconSet::Normal).height() +
2 * itemFrame );
}
@@ -1912,7 +1912,7 @@ QSize HighColorStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
@@ -1923,15 +1923,15 @@ QSize HighColorStyle::sizeFromContents( ContentsType contents,
// Fix Qt's wacky image alignment
-QPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
switch (stylepixmap) {
case SP_TitleBarMinButton:
- return QPixmap((const char **)hc_minimize_xpm);
+ return TQPixmap((const char **)hc_minimize_xpm);
case SP_TitleBarCloseButton:
- return QPixmap((const char **)hc_close_xpm);
+ return TQPixmap((const char **)hc_close_xpm);
default:
break;
}
@@ -1940,23 +1940,23 @@ QPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap,
}
-bool HighColorStyle::eventFilter( QObject *object, QEvent *event )
+bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
{
if (KStyle::eventFilter( object, event ))
return true;
- QToolBar* toolbar;
+ TQToolBar* toolbar;
// Handle push button hover effects.
- QPushButton* button = dynamic_cast<QPushButton*>(object);
+ TQPushButton* button = dynamic_cast<TQPushButton*>(object);
if ( button )
{
- if ( (event->type() == QEvent::Enter) &&
+ if ( (event->type() == TQEvent::Enter) &&
(button->isEnabled()) ) {
hoverWidget = button;
button->repaint( false );
}
- else if ( (event->type() == QEvent::Leave) &&
+ else if ( (event->type() == TQEvent::Leave) &&
(object == hoverWidget) ) {
hoverWidget = 0L;
button->repaint( false );
@@ -1966,42 +1966,42 @@ bool HighColorStyle::eventFilter( QObject *object, QEvent *event )
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name.
- if (event->type() == QEvent::Paint ) {
+ if (event->type() == TQEvent::Paint ) {
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- QWidget *widget = static_cast<QWidget*>(object);
- QWidget *parent = static_cast<QWidget*>(object->parent());
+ TQWidget *widget = static_cast<TQWidget*>(object);
+ TQWidget *parent = static_cast<TQWidget*>(object->parent());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = static_cast<QWidget*>(parent->parent());
+ parent = static_cast<TQWidget*>(parent->parent());
}
- QRect r = widget->rect();
- QRect pr = parent->rect();
+ TQRect r = widget->rect();
+ TQRect pr = parent->rect();
bool horiz_grad = pr.width() < pr.height();
// Check if the parent is a QToolbar, and use its orientation, else guess.
- QToolBar* tb = dynamic_cast<QToolBar*>(parent);
+ TQToolBar* tb = dynamic_cast<TQToolBar*>(parent);
if (tb) horiz_grad = tb->orientation() == Qt::Vertical;
- QPainter p( widget );
+ TQPainter p( widget );
renderGradient(&p, r, parent->colorGroup().button(), horiz_grad,
x_offset, y_offset, pr.width(), pr.height());
return false; // Now draw the contents
}
} else if ( object->parent() &&
- (toolbar = dynamic_cast<QToolBar*>(object->parent())) )
+ (toolbar = dynamic_cast<TQToolBar*>(object->parent())) )
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
- if ( event->type() == QEvent::Paint ) {
- QWidget *widget = static_cast<QWidget*>(object);
- QRect wr = widget->rect(), tr = toolbar->rect();
- QPainter p( widget );
+ if ( event->type() == TQEvent::Paint ) {
+ TQWidget *widget = static_cast<TQWidget*>(object);
+ TQRect wr = widget->rect(), tr = toolbar->rect();
+ TQPainter p( widget );
renderGradient(&p, wr, toolbar->colorGroup().button(),
toolbar->orientation() == Qt::Vertical,
wr.x(), wr.y(), tr.width() - 2, tr.height() - 2);
@@ -2020,8 +2020,8 @@ bool HighColorStyle::eventFilter( QObject *object, QEvent *event )
}
-void HighColorStyle::renderGradient( QPainter* p, const QRect& r,
- QColor clr, bool horizontal, int px, int py, int pwidth, int pheight) const
+void HighColorStyle::renderGradient( TQPainter* p, const TQRect& r,
+ TQColor clr, bool horizontal, int px, int py, int pwidth, int pheight) const
{
// Make 8 bit displays happy
if (!highcolor) {
@@ -2045,9 +2045,9 @@ void HighColorStyle::renderGradient( QPainter* p, const QRect& r,
int width = (pwidth != -1) ? pwidth : r.width();
if (width <= 34)
- p->drawTiledPixmap(r, *grSet->gradient(HMed), QPoint(px, 0));
+ p->drawTiledPixmap(r, *grSet->gradient(HMed), TQPoint(px, 0));
else if (width <= 52)
- p->drawTiledPixmap(r, *grSet->gradient(HLarge), QPoint(px, 0));
+ p->drawTiledPixmap(r, *grSet->gradient(HLarge), TQPoint(px, 0));
else {
KPixmap *hLarge = grSet->gradient(HLarge);
@@ -2073,11 +2073,11 @@ void HighColorStyle::renderGradient( QPainter* p, const QRect& r,
int height = (pheight != -1) ? pheight : r.height();
if (height <= 24)
- p->drawTiledPixmap(r, *grSet->gradient(VSmall), QPoint(0, py));
+ p->drawTiledPixmap(r, *grSet->gradient(VSmall), TQPoint(0, py));
else if (height <= 34)
- p->drawTiledPixmap(r, *grSet->gradient(VMed), QPoint(0, py));
+ p->drawTiledPixmap(r, *grSet->gradient(VMed), TQPoint(0, py));
else if (height <= 64)
- p->drawTiledPixmap(r, *grSet->gradient(VLarge), QPoint(0, py));
+ p->drawTiledPixmap(r, *grSet->gradient(VLarge), TQPoint(0, py));
else {
KPixmap *vLarge = grSet->gradient(VLarge);
diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h
index 4841f92a7..8081f1c9f 100644
--- a/kstyles/highcolor/highcolor.h
+++ b/kstyles/highcolor/highcolor.h
@@ -30,8 +30,8 @@
#ifndef __HIGHCOLOR_H
#define __HIGHCOLOR_H
-#include <qbitmap.h>
-#include <qintdict.h>
+#include <tqbitmap.h>
+#include <tqintdict.h>
#include <kdrawutil.h>
#include <kpixmap.h>
#include <kstyle.h>
@@ -42,14 +42,14 @@ enum GradientType{ VSmall=0, VMed, VLarge, HMed, HLarge, GradientCount };
class GradientSet
{
public:
- GradientSet(const QColor &baseColor);
+ GradientSet(const TQColor &baseColor);
~GradientSet();
KPixmap* gradient(GradientType type);
- QColor* color() { return(&c); }
+ TQColor* color() { return(&c); }
private:
KPixmap *gradients[5];
- QColor c;
+ TQColor c;
};
@@ -65,96 +65,96 @@ class HighColorStyle : public KStyle
HighColorStyle( StyleType );
virtual ~HighColorStyle();
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
- void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
- const QPopupMenu* popup ) const;
+ void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
+ const TQPopupMenu* popup ) const;
void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- void drawItem( QPainter *p,
- const QRect &r,
+ void drawItem( TQPainter *p,
+ const TQRect &r,
int flags,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool enabled,
- const QPixmap *pixmap,
- const QString &text,
+ const TQPixmap *pixmap,
+ const TQString &text,
int len = -1,
- const QColor *penColor = 0 ) const;
+ const TQColor *penColor = 0 ) const;
int pixelMetric( PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const;
+ TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const;
- QRect subRect( SubRect r,
- const QWidget *widget ) const;
+ TQRect subRect( SubRect r,
+ const TQWidget *widget ) const;
// Fix Qt3's wacky image positions
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
protected:
- bool eventFilter( QObject *object, QEvent *event );
+ bool eventFilter( TQObject *object, TQEvent *event );
- void renderGradient( QPainter* p,
- const QRect& r,
- QColor clr,
+ void renderGradient( TQPainter* p,
+ const TQRect& r,
+ TQColor clr,
bool horizontal,
int px=0,
int py=0,
int pwidth=-1,
int pheight=-1 ) const;
- QWidget *hoverWidget;
+ TQWidget *hoverWidget;
StyleType type;
bool highcolor;
mutable bool selectionBackground;
diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp
index 33771f76c..233fb7365 100644
--- a/kstyles/highcontrast/config/highcontrastconfig.cpp
+++ b/kstyles/highcontrast/config/highcontrastconfig.cpp
@@ -24,40 +24,40 @@ DEALINGS IN THE SOFTWARE.
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qsettings.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqsettings.h>
#include <kdialog.h>
#include <kglobal.h>
#include <klocale.h>
#include "highcontrastconfig.h"
-extern "C" KDE_EXPORT QWidget*
-allocate_kstyle_config(QWidget* parent)
+extern "C" KDE_EXPORT TQWidget*
+allocate_kstyle_config(TQWidget* parent)
{
return new HighContrastStyleConfig(parent);
}
HighContrastStyleConfig::HighContrastStyleConfig(
- QWidget* parent): QWidget(parent)
+ TQWidget* parent): TQWidget(parent)
{
// Should have no margins here, the dialog provides them
- QVBoxLayout* layout = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
KGlobal::locale()->insertCatalogue("kstyle_highcontrast_config");
- wideLinesBox = new QCheckBox(i18n("Use wider lines"), this);
+ wideLinesBox = new TQCheckBox(i18n("Use wider lines"), this);
layout->add(wideLinesBox);
layout->addStretch(1);
- QSettings s;
+ TQSettings s;
originalWideLinesState = s.readBoolEntry(
"/highcontraststyle/Settings/wideLines", false);
wideLinesBox->setChecked(originalWideLinesState);
- connect(wideLinesBox, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(wideLinesBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateChanged()));
}
HighContrastStyleConfig::~HighContrastStyleConfig()
@@ -69,7 +69,7 @@ HighContrastStyleConfig::~HighContrastStyleConfig()
void
HighContrastStyleConfig::save()
{
- QSettings s;
+ TQSettings s;
s.writeEntry("/highcontraststyle/Settings/wideLines",
wideLinesBox->isChecked());
}
diff --git a/kstyles/highcontrast/config/highcontrastconfig.h b/kstyles/highcontrast/config/highcontrastconfig.h
index 26d8a0593..26bd2ff4b 100644
--- a/kstyles/highcontrast/config/highcontrastconfig.h
+++ b/kstyles/highcontrast/config/highcontrastconfig.h
@@ -33,7 +33,7 @@ class HighContrastStyleConfig: public QWidget
{
Q_OBJECT
public:
- HighContrastStyleConfig(QWidget* parent);
+ HighContrastStyleConfig(TQWidget* parent);
~HighContrastStyleConfig();
// This signal and the next two slots are the plugin
@@ -52,7 +52,7 @@ protected slots:
protected:
// We store settings directly in widgets to
// avoid the hassle of sync'ing things
- QCheckBox* wideLinesBox;
+ TQCheckBox* wideLinesBox;
// Original settings, for accurate dirtiness tracking
bool originalWideLinesState;
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp
index d7669ff9d..b5be5cff8 100644
--- a/kstyles/highcontrast/highcontrast.cpp
+++ b/kstyles/highcontrast/highcontrast.cpp
@@ -24,25 +24,25 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qstyleplugin.h>
-
-#include <qfont.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qmenubar.h>
-#include <qpushbutton.h>
-#include <qscrollbar.h>
-#include <qslider.h>
-#include <qtabbar.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
-#include <qprogressbar.h>
-#include <qlistview.h>
-#include <qsettings.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqstyleplugin.h>
+
+#include <tqfont.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqmenubar.h>
+#include <tqpushbutton.h>
+#include <tqscrollbar.h>
+#include <tqslider.h>
+#include <tqtabbar.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
+#include <tqprogressbar.h>
+#include <tqlistview.h>
+#include <tqsettings.h>
#include <kdrawutil.h>
#include <kpixmapeffect.h>
@@ -57,12 +57,12 @@ class HighContrastStylePlugin : public QStylePlugin
HighContrastStylePlugin() {}
~HighContrastStylePlugin() {}
- QStringList keys() const
+ TQStringList keys() const
{
- return QStringList() << "HighContrast";
+ return TQStringList() << "HighContrast";
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
if ( key == "highcontrast" )
return new HighContrastStyle();
@@ -82,7 +82,7 @@ static const int arrowHMargin = 6;
static const int rightBorder = 12;
-void addOffset (QRect* r, int offset, int lineWidth = 0)
+void addOffset (TQRect* r, int offset, int lineWidth = 0)
{
int offset1 = offset;
int offset2 = offset;
@@ -112,7 +112,7 @@ void addOffset (QRect* r, int offset, int lineWidth = 0)
HighContrastStyle::HighContrastStyle()
: KStyle( 0, ThreeButtonScrollBar )
{
- QSettings settings;
+ TQSettings settings;
settings.beginGroup("/highcontraststyle/Settings/");
bool useWideLines = settings.readBoolEntry("wideLines", false);
hoverWidget = 0L;
@@ -125,42 +125,42 @@ HighContrastStyle::~HighContrastStyle()
}
-void HighContrastStyle::polish( QPalette& pal )
+void HighContrastStyle::polish( TQPalette& pal )
{
//We do not want the disabled widgets to be greyed out,
//as that may be hard indeed (and since we use crossed-out text instead),
//so we make disabled colors be the same as active foreground and
//background colour
- for (int c = 0; c < QColorGroup::NColorRoles; ++c)
+ for (int c = 0; c < TQColorGroup::NColorRoles; ++c)
switch (c)
{
- case QColorGroup::Button:
- case QColorGroup::Base:
- case QColorGroup::Highlight:
- pal.setColor(QPalette::Disabled, QColorGroup::ColorRole(c), pal.color(QPalette::Active, QColorGroup::Background));
+ case TQColorGroup::Button:
+ case TQColorGroup::Base:
+ case TQColorGroup::Highlight:
+ pal.setColor(TQPalette::Disabled, TQColorGroup::ColorRole(c), pal.color(TQPalette::Active, TQColorGroup::Background));
break;
- case QColorGroup::ButtonText:
- case QColorGroup::Text:
- case QColorGroup::HighlightedText:
- pal.setColor(QPalette::Disabled, QColorGroup::ColorRole(c), pal.color(QPalette::Active, QColorGroup::Foreground));
+ case TQColorGroup::ButtonText:
+ case TQColorGroup::Text:
+ case TQColorGroup::HighlightedText:
+ pal.setColor(TQPalette::Disabled, TQColorGroup::ColorRole(c), pal.color(TQPalette::Active, TQColorGroup::Foreground));
break;
default:
- pal.setColor(QPalette::Disabled, QColorGroup::ColorRole(c), pal.color(QPalette::Active, QColorGroup::ColorRole(c)));
+ pal.setColor(TQPalette::Disabled, TQColorGroup::ColorRole(c), pal.color(TQPalette::Active, TQColorGroup::ColorRole(c)));
}
}
-void HighContrastStyle::polish (QWidget* widget)
+void HighContrastStyle::polish (TQWidget* widget)
{
- if (widget->inherits ("QButton")
- || widget->inherits ("QComboBox")
- || widget->inherits ("QSpinWidget")
- || widget->inherits ("QLineEdit")
- || widget->inherits ("QTextEdit"))
+ if (widget->inherits ("TQButton")
+ || widget->inherits ("TQComboBox")
+ || widget->inherits ("TQSpinWidget")
+ || widget->inherits ("TQLineEdit")
+ || widget->inherits ("TQTextEdit"))
{
widget->installEventFilter (this);
- QSpinWidget* spinwidget = dynamic_cast<QSpinWidget*>(widget);
+ TQSpinWidget* spinwidget = dynamic_cast<TQSpinWidget*>(widget);
if (spinwidget && spinwidget->editWidget())
spinwidget->editWidget()->installEventFilter (this);
}
@@ -169,54 +169,54 @@ void HighContrastStyle::polish (QWidget* widget)
}
-void HighContrastStyle::unPolish (QWidget* widget)
+void HighContrastStyle::unPolish (TQWidget* widget)
{
- if (widget->inherits ("QWidget") || widget->inherits ("QComboBox") || widget->inherits ("QSpinWidget") || widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit"))
+ if (widget->inherits ("TQWidget") || widget->inherits ("TQComboBox") || widget->inherits ("TQSpinWidget") || widget->inherits ("TQLineEdit") || widget->inherits ("TQTextEdit"))
widget->removeEventFilter (this);
KStyle::unPolish (widget);
}
-void HighContrastStyle::setColorsNormal (QPainter* p, const QColorGroup& cg, int flags, int highlight) const
+void HighContrastStyle::setColorsNormal (TQPainter* p, const TQColorGroup& cg, int flags, int highlight) const
{
setColorsByState (p, cg, cg.foreground(), cg.background(), flags, highlight);
}
-void HighContrastStyle::setColorsButton (QPainter* p, const QColorGroup& cg, int flags, int highlight) const
+void HighContrastStyle::setColorsButton (TQPainter* p, const TQColorGroup& cg, int flags, int highlight) const
{
setColorsByState (p, cg, cg.buttonText(), cg.button(), flags, highlight);
}
-void HighContrastStyle::setColorsText (QPainter* p, const QColorGroup& cg, int flags, int highlight) const
+void HighContrastStyle::setColorsText (TQPainter* p, const TQColorGroup& cg, int flags, int highlight) const
{
setColorsByState (p, cg, cg.text(), cg.base(), flags, highlight);
}
-void HighContrastStyle::setColorsHighlight (QPainter* p, const QColorGroup& cg, int flags) const
+void HighContrastStyle::setColorsHighlight (TQPainter* p, const TQColorGroup& cg, int flags) const
{
setColorsByState (p, cg, cg.highlightedText(), cg.highlight(), flags, 0);
}
-void HighContrastStyle::setColorsByState (QPainter* p, const QColorGroup& cg, const QColor& fg, const QColor& bg, int flags, int highlight) const
+void HighContrastStyle::setColorsByState (TQPainter* p, const TQColorGroup& cg, const TQColor& fg, const TQColor& bg, int flags, int highlight) const
{
- QFont font = p->font();
+ TQFont font = p->font();
font.setStrikeOut (! (flags & Style_Enabled));
p->setFont (font);
if ((flags & Style_Enabled) && (flags & highlight))
{
- p->setPen (QPen (cg.highlightedText(), basicLineWidth, flags & Style_Enabled ? Qt::SolidLine : Qt::DotLine));
+ p->setPen (TQPen (cg.highlightedText(), basicLineWidth, flags & Style_Enabled ? Qt::SolidLine : Qt::DotLine));
p->setBackgroundColor (cg.highlight());
}
else
{
- p->setPen (QPen (fg, basicLineWidth, flags & Style_Enabled ? Qt::SolidLine : Qt::DotLine));
+ p->setPen (TQPen (fg, basicLineWidth, flags & Style_Enabled ? Qt::SolidLine : Qt::DotLine));
p->setBackgroundColor (bg);
}
- p->setBrush (QBrush ());
+ p->setBrush (TQBrush ());
}
-void HighContrastStyle::drawRect (QPainter* p, QRect r, int offset, bool filled) const
+void HighContrastStyle::drawRect (TQPainter* p, TQRect r, int offset, bool filled) const
{
addOffset (&r, offset, p->pen().width());
if (filled)
@@ -225,16 +225,16 @@ void HighContrastStyle::drawRect (QPainter* p, QRect r, int offset, bool filled)
p->drawRect (r);
}
-void HighContrastStyle::drawRoundRect (QPainter* p, QRect r, int offset, bool filled) const
+void HighContrastStyle::drawRoundRect (TQPainter* p, TQRect r, int offset, bool filled) const
{
int lineWidth = p->pen().width();
if ((r.width() >= 5*lineWidth + 2*offset) && (r.height() >= 5*lineWidth + 2*offset))
{
- QRect r2 (r);
+ TQRect r2 (r);
addOffset (&r2, offset, lineWidth);
addOffset (&r, offset);
- QRect r3 (r);
+ TQRect r3 (r);
addOffset (&r3, lineWidth);
p->save();
@@ -257,7 +257,7 @@ void HighContrastStyle::drawRoundRect (QPainter* p, QRect r, int offset, bool fi
drawRect (p, r, offset, filled);
}
-void HighContrastStyle::drawEllipse (QPainter* p, QRect r, int offset, bool filled) const
+void HighContrastStyle::drawEllipse (TQPainter* p, TQRect r, int offset, bool filled) const
{
addOffset (&r, offset, p->pen().width());
@@ -271,12 +271,12 @@ void HighContrastStyle::drawEllipse (QPainter* p, QRect r, int offset, bool fill
p->drawRoundRect (r, 99, 99);
}
-void HighContrastStyle::drawArrow (QPainter* p, QRect r, PrimitiveElement arrow, int offset) const
+void HighContrastStyle::drawArrow (TQPainter* p, TQRect r, PrimitiveElement arrow, int offset) const
{
p->save();
addOffset (&r, offset);
- QPoint center = r.center();
+ TQPoint center = r.center();
if (r.height() < r.width())
r.setWidth (r.height());
if (r.width() % 2 != 0)
@@ -284,7 +284,7 @@ void HighContrastStyle::drawArrow (QPainter* p, QRect r, PrimitiveElement arrow,
r.setHeight (r.width());
r.moveCenter (center);
- QPointArray points (3);
+ TQPointArray points (3);
switch (arrow) {
case PE_ArrowUp:
case PE_SpinWidgetUp:
@@ -323,11 +323,11 @@ void HighContrastStyle::drawArrow (QPainter* p, QRect r, PrimitiveElement arrow,
// This function draws primitive elements
void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch(pe)
{
@@ -353,10 +353,10 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
// -------------------------------------------------------------------
case PE_FocusRect: {
p->save();
- p->setBrush (QBrush ());
- p->setPen (QPen (cg.highlight(), basicLineWidth, Qt::SolidLine));
+ p->setBrush (TQBrush ());
+ p->setPen (TQPen (cg.highlight(), basicLineWidth, Qt::SolidLine));
drawRoundRect (p, r, basicLineWidth, false);
- p->setPen (QPen (cg.highlightedText(), basicLineWidth, Qt::DashLine));
+ p->setPen (TQPen (cg.highlightedText(), basicLineWidth, Qt::DashLine));
drawRoundRect (p, r, basicLineWidth, false);
p->restore();
break;
@@ -387,7 +387,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
drawRoundRect (p, r);
if (r.width() >= 7*basicLineWidth && r.height() >= 7*basicLineWidth) {
- QRect r2 (r);
+ TQRect r2 (r);
r2.setWidth (4*basicLineWidth);
r2.setHeight (4*basicLineWidth);
r2.moveCenter (r.center());
@@ -402,7 +402,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
setColorsNormal (p, cg);
p->fillRect (r, p->backgroundColor());
- QRect r2 (r);
+ TQRect r2 (r);
if (flags & Style_Horizontal)
{
if (r2.height() > 5*basicLineWidth)
@@ -426,7 +426,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
r2.addCoords (0, basicLineWidth, 0, -basicLineWidth);
else
r2.addCoords (basicLineWidth, 0, -basicLineWidth, 0);
- QPen pen = p->pen();
+ TQPen pen = p->pen();
pen.setColor (p->backgroundColor());
p->setPen (pen);
drawRect (p, r2);
@@ -469,7 +469,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
if (!(flags & Style_Off))
{
- QRect r2 (r);
+ TQRect r2 (r);
addOffset (&r2, basicLineWidth);
if (flags & Style_On)
{
@@ -480,7 +480,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
{ // Tristate
p->drawLine (r2.left(), r2.top()+r2.width()/2, r2.right(), r2.top()+r2.width()/2);
}
- QPen pen = p->pen();
+ TQPen pen = p->pen();
pen.setColor (p->backgroundColor());
p->setPen (pen);
drawRect (p, r2, 0, false);
@@ -533,7 +533,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
setColorsButton (p, cg, flags);
p->fillRect (r, p->backgroundColor());
- p->setPen (QPen (p->pen().color(), 1, Qt::DashLine));
+ p->setPen (TQPen (p->pen().color(), 1, Qt::DashLine));
if (flags & Style_Horizontal)
p->drawLine (r.center().x(), r.top(), r.center().x(), r.bottom());
else
@@ -550,7 +550,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
setColorsNormal (p, cg, flags, 0);
if (!opt.isDefault())
{
- QPen pen = p->pen();
+ TQPen pen = p->pen();
pen.setWidth (opt.lineWidth());
p->setPen (pen);
}
@@ -570,7 +570,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
setColorsText (p, cg, flags, 0);
drawRoundRect (p, r);
if (flags & (Style_HasFocus | Style_Active))
- drawPrimitive (PE_FocusRect, p, r, cg, flags, QStyleOption (p->backgroundColor()));
+ drawPrimitive (PE_FocusRect, p, r, cg, flags, TQStyleOption (p->backgroundColor()));
break;
}
case PE_PanelTabWidget:
@@ -637,12 +637,12 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
if ( widget == hoverWidget )
flags |= Style_MouseOver;
@@ -657,7 +657,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
{
setColorsButton (p, cg);
p->fillRect (r, p->backgroundColor());
- p->setBrush (QBrush (p->pen().color(), Qt::BDiagPattern));
+ p->setBrush (TQBrush (p->pen().color(), Qt::BDiagPattern));
drawRoundRect (p, r);
break;
}
@@ -667,8 +667,8 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
// -------------------------------------------------------------------
case KPE_SliderGroove: {
setColorsText (p, cg, flags);
- QRect r2 (r);
- const QSlider *slider = dynamic_cast<const QSlider*>(widget);
+ TQRect r2 (r);
+ const TQSlider *slider = dynamic_cast<const TQSlider*>(widget);
if (slider != 0)
{
if (slider->orientation() == Qt::Horizontal)
@@ -730,12 +730,12 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
void HighContrastStyle::drawControl (ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
if ( widget == hoverWidget )
flags |= Style_MouseOver;
@@ -754,10 +754,10 @@ void HighContrastStyle::drawControl (ControlElement element,
setColorsNormal (p, cg, flags, Style_Selected);
drawRoundRect (p, r);
- const QTabBar *tb = static_cast< const QTabBar * >(widget);
- QTabBar::Shape shape = tb->shape();
- if (shape == QTabBar::TriangularBelow ||
- shape == QTabBar::RoundedBelow) {
+ const TQTabBar *tb = static_cast< const TQTabBar * >(widget);
+ TQTabBar::Shape shape = tb->shape();
+ if (shape == TQTabBar::TriangularBelow ||
+ shape == TQTabBar::RoundedBelow) {
p->fillRect (r.left(), r.top(),
r.width(), 2*basicLineWidth,
p->pen().color());
@@ -783,8 +783,8 @@ void HighContrastStyle::drawControl (ControlElement element,
// PUSHBUTTON
// -------------------------------------------------------------------
case CE_PushButton: {
- QPushButton *button = (QPushButton*) widget;
- QRect br = r;
+ TQPushButton *button = (TQPushButton*) widget;
+ TQRect br = r;
bool btnDefault = button->isDefault();
if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) {
@@ -810,49 +810,49 @@ void HighContrastStyle::drawControl (ControlElement element,
case CE_CheckBoxLabel:
case CE_ToolButtonLabel:
case CE_PushButtonLabel: {
- const QPixmap* pixmap = 0;
- QPixmap icon;
- QString text;
+ const TQPixmap* pixmap = 0;
+ TQPixmap icon;
+ TQString text;
bool popup = false;
- QIconSet::Mode mode = flags & Style_Enabled ? ((flags & Style_HasFocus) ? QIconSet::Active : QIconSet::Normal) : QIconSet::Disabled;
- QIconSet::State state = flags & Style_On ? QIconSet::On : QIconSet::Off;
+ TQIconSet::Mode mode = flags & Style_Enabled ? ((flags & Style_HasFocus) ? TQIconSet::Active : TQIconSet::Normal) : TQIconSet::Disabled;
+ TQIconSet::State state = flags & Style_On ? TQIconSet::On : TQIconSet::Off;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
if (element == CE_ProgressBarLabel) {
- QProgressBar* progressbar = (QProgressBar*) widget;
+ TQProgressBar* progressbar = (TQProgressBar*) widget;
text = progressbar->progressString();
setColorsNormal (p, cg, flags);
}
else if (element == CE_TabBarLabel) {
if (!opt.isDefault()) {
- QTab* tab = opt.tab();
+ TQTab* tab = opt.tab();
text = tab->text();
}
setColorsNormal (p, cg, flags, Style_Selected);
}
else if (element == CE_ToolButtonLabel) {
- QToolButton* toolbutton = (QToolButton*) widget;
+ TQToolButton* toolbutton = (TQToolButton*) widget;
text = toolbutton->text();
pixmap = toolbutton->pixmap();
if (!toolbutton->iconSet().isNull())
- icon = toolbutton->iconSet().pixmap (QIconSet::Small, mode, state);
+ icon = toolbutton->iconSet().pixmap (TQIconSet::Small, mode, state);
popup = toolbutton->popup();
setColorsButton (p, cg, flags);
}
else if (element == CE_PushButtonLabel) {
- QPushButton* pushbutton = (QPushButton*) widget;
+ TQPushButton* pushbutton = (TQPushButton*) widget;
text = pushbutton->text();
pixmap = pushbutton->pixmap();
if (pushbutton->iconSet() && !pushbutton->iconSet()->isNull())
- icon = pushbutton->iconSet()->pixmap (QIconSet::Small, mode, state);
+ icon = pushbutton->iconSet()->pixmap (TQIconSet::Small, mode, state);
popup = pushbutton->popup();
setColorsButton (p, cg, flags);
}
else {
- const QButton* button = (const QButton*)widget;
+ const TQButton* button = (const TQButton*)widget;
pixmap = button->pixmap();
text = button->text();
setColorsNormal (p, cg);
@@ -861,7 +861,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// Does the button have a popup menu?
if (popup) {
int dx = pixelMetric (PM_MenuButtonIndicator, widget);
- drawArrow (p, QRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown);
+ drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown);
w -= dx;
}
@@ -882,11 +882,11 @@ void HighContrastStyle::drawControl (ControlElement element,
// Draw a focus rect if the button has focus
if (flags & Style_HasFocus)
- drawPrimitive (PE_FocusRect, p, r, cg, flags, QStyleOption (p->backgroundColor()));
+ drawPrimitive (PE_FocusRect, p, r, cg, flags, TQStyleOption (p->backgroundColor()));
// Draw the label itself
- QColor color = p->pen().color();
- drawItem (p, QRect(x, y, w, h),
+ TQColor color = p->pen().color();
+ drawItem (p, TQRect(x, y, w, h),
(element == CE_RadioButtonLabel || element == CE_CheckBoxLabel || element == CE_ProgressBarLabel) ? AlignVCenter|AlignLeft|ShowPrefix : AlignCenter|ShowPrefix,
cg, flags & Style_Enabled, pixmap, text, -1, &color);
break;
@@ -914,9 +914,9 @@ void HighContrastStyle::drawControl (ControlElement element,
setColorsNormal (p, cg, flags, Style_Active|Style_MouseOver);
p->fillRect (r, p->backgroundColor ());
if (!opt.isDefault()) {
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
- QColor color = p->pen().color();
+ TQColor color = p->pen().color();
drawItem (p, r, AlignCenter | AlignVCenter | ShowPrefix
| DontClip | SingleLine, cg, flags,
mi->pixmap(), mi->text(), -1, &color);
@@ -942,9 +942,9 @@ void HighContrastStyle::drawControl (ControlElement element,
// -------------------------------------------------------------------
case CE_ProgressBarGroove: {
setColorsText (p, cg, flags);
- const QProgressBar *progressbar = dynamic_cast<const QProgressBar*>(widget);
+ const TQProgressBar *progressbar = dynamic_cast<const TQProgressBar*>(widget);
if (progressbar) {
- QRect r2 (r);
+ TQRect r2 (r);
r2.setLeft (p->boundingRect (r, AlignVCenter|AlignLeft|ShowPrefix, progressbar->progressString()).right()
+ 4*basicLineWidth);
drawRoundRect (p, r2);
@@ -952,10 +952,10 @@ void HighContrastStyle::drawControl (ControlElement element,
break;
}
case CE_ProgressBarContents: {
- const QProgressBar *progressbar = dynamic_cast<const QProgressBar*>(widget);
+ const TQProgressBar *progressbar = dynamic_cast<const TQProgressBar*>(widget);
if (progressbar)
{
- QRect r2 (r);
+ TQRect r2 (r);
r2.setLeft (p->boundingRect (r, AlignVCenter|AlignLeft|ShowPrefix, progressbar->progressString()).right()
+ 4*basicLineWidth);
long progress = r2.width() * progressbar->progress();
@@ -985,15 +985,15 @@ void HighContrastStyle::drawControl (ControlElement element,
setColorsNormal (p, cg, flags, Style_Active|Style_MouseOver);
p->fillRect (r, p->backgroundColor ());
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
+ TQMenuItem *mi = opt.menuItem();
if (!mi)
break;
int tab = opt.tabWidth();
int checkcol = opt.maxIconWidth();
bool checkable = popupmenu->isCheckable();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1008,20 +1008,20 @@ void HighContrastStyle::drawControl (ControlElement element,
// Do we have an icon?
if ( mi->iconSet() && !mi->iconSet()->isNull() ) {
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect(x, y, checkcol, h), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if (!(flags & Style_Enabled))
- mode = QIconSet::Disabled;
+ mode = TQIconSet::Disabled;
else if (flags & Style_Active)
- mode = QIconSet::Active;
+ mode = TQIconSet::Active;
else
- mode = QIconSet::Normal;
+ mode = TQIconSet::Normal;
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
@@ -1037,9 +1037,9 @@ void HighContrastStyle::drawControl (ControlElement element,
else if ( checkable && mi->isChecked() ) {
int cx = reverse ? x+w - checkcol : x;
- QRect rc (cx, y, checkcol, h);
+ TQRect rc (cx, y, checkcol, h);
addOffset (&rc, 2*basicLineWidth);
- QPoint center = rc.center();
+ TQPoint center = rc.center();
if (rc.width() > rc.height())
rc.setWidth (rc.height());
else
@@ -1071,7 +1071,7 @@ void HighContrastStyle::drawControl (ControlElement element,
}
else {
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
@@ -1100,7 +1100,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -1119,7 +1119,7 @@ void HighContrastStyle::drawControl (ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator);
- QRect vr = visualRect( QRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1134,10 +1134,10 @@ void HighContrastStyle::drawControl (ControlElement element,
}
void HighContrastStyle::drawControlMask (ControlElement element,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &opt) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &opt) const
{
switch (element) {
case CE_PushButton:
@@ -1164,9 +1164,9 @@ void HighContrastStyle::drawControlMask (ControlElement element,
// Helper to find the next sibling that's not hidden
// Lifted from kstyle.cpp
-static QListViewItem* nextVisibleSibling(QListViewItem* item)
+static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
{
- QListViewItem* sibling = item;
+ TQListViewItem* sibling = item;
do
{
sibling = sibling->nextSibling();
@@ -1177,14 +1177,14 @@ static QListViewItem* nextVisibleSibling(QListViewItem* item)
}
void HighContrastStyle::drawComplexControl (ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
if ( widget == hoverWidget )
flags |= Style_MouseOver;
@@ -1197,15 +1197,15 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
setColorsText (p, cg, flags);
drawRoundRect (p, r);
- QRect r2 = QStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
if (flags & Style_HasFocus) {
- QRect r3 (r);
+ TQRect r3 (r);
if (r2.left() > 0)
r3.setRight (r2.left()+basicLineWidth-1);
else
r3.setLeft (r2.right()-basicLineWidth+1);
- drawPrimitive (PE_FocusRect, p, r3, cg, flags, QStyleOption (p->backgroundColor()));
+ drawPrimitive (PE_FocusRect, p, r3, cg, flags, TQStyleOption (p->backgroundColor()));
}
setColorsButton (p, cg, flags);
@@ -1226,18 +1226,18 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
setColorsText (p, cg, flags);
drawRoundRect (p, r);
if (flags & Style_HasFocus)
- drawPrimitive(PE_FocusRect, p, r, cg, flags, QStyleOption (p->backgroundColor()));
+ drawPrimitive(PE_FocusRect, p, r, cg, flags, TQStyleOption (p->backgroundColor()));
}
setColorsButton (p, cg, flags);
// Draw arrows if required
if (controls & SC_SpinWidgetDown) {
- QRect r2 = QStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth);
}
if (controls & SC_SpinWidgetUp) {
- QRect r2 = QStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth);
}
@@ -1249,12 +1249,12 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
// TOOLBUTTON
// -------------------------------------------------------------------
case CC_ToolButton: {
- const QToolButton *toolbutton = (const QToolButton *) widget;
+ const TQToolButton *toolbutton = (const TQToolButton *) widget;
setColorsButton (p, cg, flags);
p->fillRect (r, p->backgroundColor ());
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -1277,7 +1277,7 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
toolbutton->parentWidget()->backgroundPixmap() &&
!toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- QPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
}
@@ -1291,9 +1291,9 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
}
if (toolbutton->hasFocus() && !toolbutton->focusProxy()) {
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
addOffset (&fr, 3);
- drawPrimitive(PE_FocusRect, p, fr, cg, flags, QStyleOption (p->backgroundColor()));
+ drawPrimitive(PE_FocusRect, p, fr, cg, flags, TQStyleOption (p->backgroundColor()));
}
break;
@@ -1306,13 +1306,13 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
* Sigh... Lifted and modified from kstyle.cpp
*/
/*
- * Many thanks to TrollTech AS for donating CC_ListView from QWindowsStyle.
+ * Many thanks to TrollTech AS for donating CC_ListView from TQWindowsStyle.
* CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
*/
// Paint the icon and text.
if ( controls & SC_ListView )
- QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1321,20 +1321,20 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
if (opt.isDefault())
break;
- QListViewItem *item = opt.listViewItem();
- QListViewItem *child = item->firstChild();
+ TQListViewItem *item = opt.listViewItem();
+ TQListViewItem *child = item->firstChild();
int y = r.y();
int c; // dotline vertice count
int dotoffset = 0;
- QPointArray dotlines;
+ TQPointArray dotlines;
if ( active == SC_All && controls == SC_ListViewExpand ) {
// We only need to draw a vertical line
c = 2;
dotlines.resize(2);
- dotlines[0] = QPoint( r.right(), r.top() );
- dotlines[1] = QPoint( r.right(), r.bottom() );
+ dotlines[0] = TQPoint( r.right(), r.top() );
+ dotlines[1] = TQPoint( r.right(), r.bottom() );
} else {
@@ -1354,15 +1354,15 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
int bx = r.width() / 2;
// paint stuff in the magical area
- QListView* v = item->listView();
+ TQListView* v = item->listView();
int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(),
- QApplication::globalStrut().height() );
+ TQApplication::globalStrut().height() );
if ( lh % 2 > 0 )
lh++;
// Draw all the expand/close boxes...
- QRect boxrect;
- QStyle::StyleFlags boxflags;
+ TQRect boxrect;
+ TQStyle::StyleFlags boxflags;
while ( child && y < r.height() )
{
linebot = y + lh/2;
@@ -1376,23 +1376,23 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
h &= ~1; // Force an even number of pixels
// The primitive requires a rect.
- boxrect = QRect( bx-h/2, linebot-h/2, h, h );
- boxflags = child->isOpen() ? QStyle::Style_Off : QStyle::Style_On;
+ boxrect = TQRect( bx-h/2, linebot-h/2, h, h );
+ boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On;
// KStyle extension: Draw the box and expand/collapse indicator
drawKStylePrimitive( KPE_ListViewExpander, p, NULL, boxrect, cg, boxflags, opt );
// dotlinery
p->setPen( cg.mid() );
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot - 5 );
- dotlines[c++] = QPoint( bx + 5, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot - 5 );
+ dotlines[c++] = TQPoint( bx + 5, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
linetop = linebot + 5;
} else {
// just dotlinery
- dotlines[c++] = QPoint( bx+1, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx+1, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
}
y += child->totalHeight();
@@ -1404,16 +1404,16 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
if ( linetop < linebot )
{
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot );
}
}
// Draw all the branches...
static int thickness = kPixelMetric( KPM_ListViewBranchThickness );
int line; // index into dotlines
- QRect branchrect;
- QStyle::StyleFlags branchflags;
+ TQRect branchrect;
+ TQStyle::StyleFlags branchflags;
for( line = 0; line < c; line += 2 )
{
// assumptions here: lines are horizontal or vertical.
@@ -1430,8 +1430,8 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
int point = dotlines[line].x();
int other = dotlines[line].y();
- branchrect = QRect( point, other-(thickness/2), end-point, thickness );
- branchflags = QStyle::Style_Horizontal;
+ branchrect = TQRect( point, other-(thickness/2), end-point, thickness );
+ branchflags = TQStyle::Style_Horizontal;
// KStyle extension: Draw the horizontal branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
@@ -1443,11 +1443,11 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
int other = dotlines[line].x();
int pixmapoffset = ((point & 1) != dotoffset ) ? 1 : 0;
- branchrect = QRect( other-(thickness/2), point, thickness, end-point );
+ branchrect = TQRect( other-(thickness/2), point, thickness, end-point );
if (!pixmapoffset) // ### Hackish - used to hint the offset
- branchflags = QStyle::Style_NoChange;
+ branchflags = TQStyle::Style_NoChange;
else
- branchflags = QStyle::Style_Default;
+ branchflags = TQStyle::Style_Default;
// KStyle extension: Draw the vertical branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
@@ -1465,10 +1465,10 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
}
void HighContrastStyle::drawComplexControlMask(ComplexControl c,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &o) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &o) const
{
switch (c) {
case CC_SpinWidget:
@@ -1483,20 +1483,20 @@ void HighContrastStyle::drawComplexControlMask(ComplexControl c,
}
}
-void HighContrastStyle::drawItem( QPainter *p,
- const QRect &r,
+void HighContrastStyle::drawItem( TQPainter *p,
+ const TQRect &r,
int flags,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool enabled,
- const QPixmap *pixmap,
- const QString &text,
+ const TQPixmap *pixmap,
+ const TQString &text,
int len,
- const QColor *penColor ) const
+ const TQColor *penColor ) const
{
p->save();
// make the disabled things use the cross-line
- QFont font = p->font();
+ TQFont font = p->font();
font.setStrikeOut (!enabled);
p->setFont (font);
@@ -1507,10 +1507,10 @@ void HighContrastStyle::drawItem( QPainter *p,
p->restore();
}
-QRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch (control)
{
@@ -1519,11 +1519,11 @@ QRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
switch (subcontrol)
{
case SC_ComboBoxFrame:
- return QRect (0, 0, widget->width(), widget->height());
+ return TQRect (0, 0, widget->width(), widget->height());
case SC_ComboBoxArrow:
- return QRect (widget->width() - arrow, 0, arrow, widget->height());
+ return TQRect (widget->width() - arrow, 0, arrow, widget->height());
case SC_ComboBoxEditField:
- return QRect (2*basicLineWidth, 2*basicLineWidth,
+ return TQRect (2*basicLineWidth, 2*basicLineWidth,
widget->width() - arrow - 3*basicLineWidth, widget->height() - 4*basicLineWidth);
default: break;
@@ -1535,16 +1535,16 @@ QRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
switch (subcontrol)
{
case SC_SpinWidgetFrame:
- return QRect (0, 0, widget->width(), widget->height());
+ return TQRect (0, 0, widget->width(), widget->height());
case SC_SpinWidgetButtonField:
- return QRect (widget->width() - arrow, 0, arrow, widget->height());
+ return TQRect (widget->width() - arrow, 0, arrow, widget->height());
case SC_SpinWidgetUp:
- return QRect (widget->width() - arrow, 0, arrow, widget->height()/2);
+ return TQRect (widget->width() - arrow, 0, arrow, widget->height()/2);
case SC_SpinWidgetDown:
- return QRect (widget->width() - arrow, widget->height()/2,
+ return TQRect (widget->width() - arrow, widget->height()/2,
arrow, widget->height()-widget->height()/2);
case SC_SpinWidgetEditField:
- return QRect (2*basicLineWidth, 2*basicLineWidth,
+ return TQRect (2*basicLineWidth, 2*basicLineWidth,
widget->width() - arrow - 3*basicLineWidth, widget->height() - 4*basicLineWidth);
default: break;
@@ -1559,7 +1559,7 @@ QRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
}
-int HighContrastStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
//### TODO: Use the tab metrics changes from Ker.
switch(m)
@@ -1592,7 +1592,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
case PM_DefaultFrameWidth: {
- if (widget && (widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit")))
+ if (widget && (widget->inherits ("TQLineEdit") || widget->inherits ("TQTextEdit")))
return 2*basicLineWidth;
else
return basicLineWidth;
@@ -1647,7 +1647,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
}
-int HighContrastStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) const
+int HighContrastStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const
{
switch (kpm) {
case KPM_ListViewBranchThickness:
@@ -1659,17 +1659,17 @@ int HighContrastStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widge
}
}
-QSize HighContrastStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch (contents)
{
// PUSHBUTTON SIZE
// ------------------------------------------------------------------
case CT_PushButton: {
- const QPushButton* button = (const QPushButton*) widget;
+ const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -1692,7 +1692,7 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
if ( h < 22 )
h = 22;
- return QSize( w + basicLineWidth*2, h + basicLineWidth*2 );
+ return TQSize( w + basicLineWidth*2, h + basicLineWidth*2 );
}
// TOOLBUTTON SIZE
@@ -1700,17 +1700,17 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
case CT_ToolButton: {
int w = contentSize.width();
int h = contentSize.height();
- return QSize(w + basicLineWidth*2 + 6, h + basicLineWidth*2 + 5);
+ return TQSize(w + basicLineWidth*2 + 6, h + basicLineWidth*2 + 5);
break;
}
// COMBOBOX SIZE
// -----------------------------------------------------------------
case CT_ComboBox: {
- const QComboBox *cb = static_cast< const QComboBox* > (widget);
+ const TQComboBox *cb = static_cast< const TQComboBox* > (widget);
int borderSize = (cb->editable() ? 4 : 2) * basicLineWidth;
int arrowSize = pixelMetric (PM_ScrollBarExtent, cb);
- return QSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize;
+ return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize;
}
// POPUPMENU ITEM SIZE
@@ -1719,9 +1719,9 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = (const QPopupMenu *) widget;
+ const TQPopupMenu *popup = (const TQPopupMenu *) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -1749,7 +1749,7 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() && ! mi->iconSet()->isNull() )
h = QMAX( h, mi->iconSet()->pixmap(
- QIconSet::Small, QIconSet::Normal).height() +
+ TQIconSet::Small, TQIconSet::Normal).height() +
2 * itemFrame );
}
@@ -1767,14 +1767,14 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
// LINEDIT SIZE
// -----------------------------------------------------------------
case CT_LineEdit: {
- return contentSize + QSize (4*basicLineWidth, 4*basicLineWidth);
+ return contentSize + TQSize (4*basicLineWidth, 4*basicLineWidth);
}
@@ -1783,7 +1783,7 @@ QSize HighContrastStyle::sizeFromContents( ContentsType contents,
}
}
-QRect HighContrastStyle::subRect (SubRect subrect, const QWidget * widget) const
+TQRect HighContrastStyle::subRect (SubRect subrect, const TQWidget * widget) const
{
switch (subrect) {
case SR_ProgressBarGroove:
@@ -1795,38 +1795,38 @@ QRect HighContrastStyle::subRect (SubRect subrect, const QWidget * widget) const
}
}
-bool HighContrastStyle::eventFilter (QObject *object, QEvent *event)
+bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{
- QWidget* widget = dynamic_cast<QWidget*>(object);
+ TQWidget* widget = dynamic_cast<TQWidget*>(object);
if (widget)
{
// Handle hover effects.
- if (event->type() == QEvent::Enter
- && (widget->inherits ("QButton")
- || widget->inherits ("QComboBox")
- || widget->inherits ("QSpinWidget")))
+ if (event->type() == TQEvent::Enter
+ && (widget->inherits ("TQButton")
+ || widget->inherits ("TQComboBox")
+ || widget->inherits ("TQSpinWidget")))
{
hoverWidget = widget;
widget->repaint (false);
}
- else if (event->type() == QEvent::Leave
- && (widget->inherits ("QButton")
- || widget->inherits ("QComboBox")
- || widget->inherits ("QSpinWidget")))
+ else if (event->type() == TQEvent::Leave
+ && (widget->inherits ("TQButton")
+ || widget->inherits ("TQComboBox")
+ || widget->inherits ("TQSpinWidget")))
{
if (object == hoverWidget)
hoverWidget = 0L;
widget->repaint (false);
}
// Make sure the focus rectangle is shown correctly.
- else if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut)
+ else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut)
{
- QWidget* widgetparent = dynamic_cast<QWidget*>(widget->parent());
+ TQWidget* widgetparent = dynamic_cast<TQWidget*>(widget->parent());
while (widgetparent
- && ! widgetparent->inherits ("QComboBox")
- && ! widgetparent->inherits ("QSpinWidget"))
+ && ! widgetparent->inherits ("TQComboBox")
+ && ! widgetparent->inherits ("TQSpinWidget"))
{
- widgetparent = dynamic_cast<QWidget*>(widgetparent->parent());
+ widgetparent = dynamic_cast<TQWidget*>(widgetparent->parent());
}
if (widgetparent)
diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h
index 0758b806c..b3d64fcc0 100644
--- a/kstyles/highcontrast/highcontrast.h
+++ b/kstyles/highcontrast/highcontrast.h
@@ -37,8 +37,8 @@
#ifndef __HIGHCONTRAST_H
#define __HIGHCONTRAST_H
-#include <qbitmap.h>
-#include <qintdict.h>
+#include <tqbitmap.h>
+#include <tqintdict.h>
#include <kdrawutil.h>
#include <kpixmap.h>
#include <kstyle.h>
@@ -54,101 +54,101 @@ class HighContrastStyle : public KStyle
HighContrastStyle();
virtual ~HighContrastStyle();
- void polish( QPalette& pal );
+ void polish( TQPalette& pal );
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+ TQRect querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
- void drawItem( QPainter *p,
- const QRect &r,
+ void drawItem( TQPainter *p,
+ const TQRect &r,
int flags,
- const QColorGroup &cg,
+ const TQColorGroup &cg,
bool enabled,
- const QPixmap *pixmap,
- const QString &text,
+ const TQPixmap *pixmap,
+ const TQString &text,
int len = -1,
- const QColor *penColor = 0 ) const;
+ const TQColor *penColor = 0 ) const;
int pixelMetric( PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const;
+ TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const;
- QRect subRect (SubRect subrect, const QWidget * widget) const;
+ TQRect subRect (SubRect subrect, const TQWidget * widget) const;
protected:
- bool eventFilter( QObject *object, QEvent *event );
+ bool eventFilter( TQObject *object, TQEvent *event );
- QWidget *hoverWidget;
+ TQWidget *hoverWidget;
private:
- void setColorsNormal (QPainter* p, const QColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
- void setColorsButton (QPainter* p, const QColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
- void setColorsText (QPainter* p, const QColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
- void setColorsHighlight (QPainter* p, const QColorGroup& cg, int flags = Style_Enabled) const;
- void setColorsByState (QPainter* p, const QColorGroup& cg, const QColor& fg, const QColor& bg, int flags, int highlight) const;
-
- void drawRect (QPainter* p, QRect r, int offset = 0, bool filled = true) const;
- void drawRoundRect (QPainter* p, QRect r, int offset = 0, bool filled = true) const;
- void drawEllipse (QPainter* p, QRect r, int offset = 0, bool filled = true) const;
- void drawArrow (QPainter* p, QRect r, PrimitiveElement arrow, int offset = 0) const;
+ void setColorsNormal (TQPainter* p, const TQColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
+ void setColorsButton (TQPainter* p, const TQColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
+ void setColorsText (TQPainter* p, const TQColorGroup& cg, int flags = Style_Enabled, int highlight = Style_Down|Style_MouseOver) const;
+ void setColorsHighlight (TQPainter* p, const TQColorGroup& cg, int flags = Style_Enabled) const;
+ void setColorsByState (TQPainter* p, const TQColorGroup& cg, const TQColor& fg, const TQColor& bg, int flags, int highlight) const;
+
+ void drawRect (TQPainter* p, TQRect r, int offset = 0, bool filled = true) const;
+ void drawRoundRect (TQPainter* p, TQRect r, int offset = 0, bool filled = true) const;
+ void drawEllipse (TQPainter* p, TQRect r, int offset = 0, bool filled = true) const;
+ void drawArrow (TQPainter* p, TQRect r, PrimitiveElement arrow, int offset = 0) const;
int basicLineWidth;
// Disable copy constructor and = operator
diff --git a/kstyles/keramik/colorutil.cpp b/kstyles/keramik/colorutil.cpp
index 71bf75873..81d5eeb7a 100644
--- a/kstyles/keramik/colorutil.cpp
+++ b/kstyles/keramik/colorutil.cpp
@@ -19,13 +19,13 @@
*/
// $Id$
-#include <qcolor.h>
+#include <tqcolor.h>
#include "colorutil.h"
namespace Keramik
{
- QColor ColorUtil::lighten(QColor in, int factor)
+ TQColor ColorUtil::lighten(TQColor in, int factor)
{
if (factor > 100)
{
@@ -41,7 +41,7 @@ namespace Keramik
int hd = int(mShare*diff);
int delta = int((diff - hd)*7.55);
- QColor wrk = in.light(100+hd);
+ TQColor wrk = in.light(100+hd);
int r = wrk.red();
int g = wrk.green();
@@ -55,7 +55,7 @@ namespace Keramik
if (g>255) g=255;
if (b>255) b=255;
- return QColor(r,g,b);
+ return TQColor(r,g,b);
}
return in;
diff --git a/kstyles/keramik/colorutil.h b/kstyles/keramik/colorutil.h
index ae01b450a..62b2a14b2 100644
--- a/kstyles/keramik/colorutil.h
+++ b/kstyles/keramik/colorutil.h
@@ -30,7 +30,7 @@ namespace Keramik
class ColorUtil
{
public:
- static QColor lighten(QColor in, int factor);
+ static TQColor lighten(TQColor in, int factor);
};
}
diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp
index 2f9449406..2fecf94d1 100644
--- a/kstyles/keramik/genembed.cpp
+++ b/kstyles/keramik/genembed.cpp
@@ -23,12 +23,12 @@ DEALINGS IN THE SOFTWARE.
*/
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qvaluevector.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqvaluevector.h>
#include <kimageeffect.h>
@@ -52,7 +52,7 @@ so that one can do (R*T+GreyAdd, G*T+GreyAdd, B*T+GreyAdd, SrcAlpha) as pixel va
*/
-int evalSuffix(QString suffix)
+int evalSuffix(TQString suffix)
{
if (suffix == "-tl")
return 0;
@@ -120,28 +120,28 @@ int main(int argc, char** argv)
if (argc < 2)
return 0;
- QValueVector<KeramikEmbedImage> images;
+ TQValueVector<KeramikEmbedImage> images;
- cout<<"#include <qintdict.h>\n\n";
+ cout<<"#include <tqintdict.h>\n\n";
cout<<"#include \"keramikimage.h\"\n\n";
- QMap<QString, int> assignID;
+ TQMap<TQString, int> assignID;
int nextID = 0;
for (int c = 1; c<argc; c++)
{
- QImage input(argv[c]);
+ TQImage input(argv[c]);
- QFileInfo fi(argv[c]);
- QString s = fi.baseName();
+ TQFileInfo fi(argv[c]);
+ TQString s = fi.baseName();
KeramikEmbedImage image;
int pos;
- QString id = s;
+ TQString id = s;
int readJustID = 0;
@@ -248,7 +248,7 @@ int main(int argc, char** argv)
QRgb basePix = (QRgb)*read;
//cout<<(r*destAlpha.alphas[pos])<<"\n";
//cout<<(int)destAlpha.alphas[pos]<<"\n";
- QColor clr(basePix);
+ TQColor clr(basePix);
int h,s,v;
clr.hsv(&h,&s,&v);
@@ -363,16 +363,16 @@ int main(int argc, char** argv)
- QFile file("keramikrc.h");
+ TQFile file("keramikrc.h");
file.open(IO_WriteOnly);
- QTextStream ts( &file);
+ TQTextStream ts( &file);
ts<<"#ifndef KERAMIK_RC_H\n";
ts<<"#define KERAMIK_RC_H\n";
ts<<"enum KeramikWidget {\n";
- for (QMap<QString, int>::iterator i = assignID.begin(); i != assignID.end(); ++i)
+ for (TQMap<TQString, int>::iterator i = assignID.begin(); i != assignID.end(); ++i)
{
- QString name = "keramik_"+i.key();
+ TQString name = "keramik_"+i.key();
name.replace("-","_");
ts<<"\t"<<name<<" = "<<i.data()<<",\n";
}
diff --git a/kstyles/keramik/gradients.cpp b/kstyles/keramik/gradients.cpp
index cf18500bd..ab804d117 100644
--- a/kstyles/keramik/gradients.cpp
+++ b/kstyles/keramik/gradients.cpp
@@ -19,28 +19,28 @@
*/
// $Id$
-#include <qpainter.h>
-#include <qrect.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqcolor.h>
#include "gradients.h"
#include "colorutil.h"
-#include <qimage.h>
-#include <qintcache.h>
+#include <tqimage.h>
+#include <tqintcache.h>
#include <kimageeffect.h>
namespace
{
struct GradientCacheEntry
{
- QPixmap* m_pixmap;
+ TQPixmap* m_pixmap;
QRgb m_color;
bool m_menu;
int m_width;
int m_height;
- GradientCacheEntry(int width, int height, const QColor& color, bool menu):
+ GradientCacheEntry(int width, int height, const TQColor& color, bool menu):
m_pixmap(0), m_color(color.rgb()), m_menu(menu), m_width(width), m_height(height)
{}
@@ -65,7 +65,7 @@ namespace
};
- QIntCache<GradientCacheEntry> cache(65636, 17);
+ TQIntCache<GradientCacheEntry> cache(65636, 17);
}
@@ -76,7 +76,7 @@ void GradientPainter::releaseCache()
cache.clear();
}
-void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
+void GradientPainter::renderGradient( TQPainter* p, const TQRect& r, TQColor c,
bool horizontal, bool menu, int px, int py,
int pwidth, int pheight)
{
@@ -100,7 +100,7 @@ void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
{
if (entry == *cacheEntry)
{
- p->drawTiledPixmap(r, *cacheEntry->m_pixmap, horizontal? QPoint(0,py): QPoint(px,0));
+ p->drawTiledPixmap(r, *cacheEntry->m_pixmap, horizontal? TQPoint(0,py): TQPoint(px,0));
return;
}
else
@@ -111,13 +111,13 @@ void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
if (horizontal)
{
- QPixmap* pix = new QPixmap(18, height);
+ TQPixmap* pix = new TQPixmap(18, height);
if (menu)
{
- QImage gr = KImageEffect::gradient(QSize(4,height), c.light(93), ColorUtil::lighten(c,109), KImageEffect::VerticalGradient );
- QPixmap grT(gr);
- QPainter p2(pix);
+ TQImage gr = KImageEffect::gradient(TQSize(4,height), c.light(93), ColorUtil::lighten(c,109), KImageEffect::VerticalGradient );
+ TQPixmap grT(gr);
+ TQPainter p2(pix);
p2.drawTiledPixmap(0,0, 18, height, grT);
p2.end();
}
@@ -126,13 +126,13 @@ void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
int h1 = 3 * height/4;
int h2 = height - h1;
- QImage top = KImageEffect::gradient(QSize(4,h1), ColorUtil::lighten(c,110), c.light(94), KImageEffect::VerticalGradient );
- QImage bot = KImageEffect::gradient(QSize(4,h2), c.light(94), ColorUtil::lighten(c,109), KImageEffect::VerticalGradient );
+ TQImage top = KImageEffect::gradient(TQSize(4,h1), ColorUtil::lighten(c,110), c.light(94), KImageEffect::VerticalGradient );
+ TQImage bot = KImageEffect::gradient(TQSize(4,h2), c.light(94), ColorUtil::lighten(c,109), KImageEffect::VerticalGradient );
- QPixmap topT(top);
- QPixmap botT(bot);
+ TQPixmap topT(top);
+ TQPixmap botT(bot);
- QPainter p2(pix);
+ TQPainter p2(pix);
p2.drawTiledPixmap(0, 0, 18, h1, topT);
p2.drawTiledPixmap(0, h1, 18, h2, botT);
p2.end();
@@ -142,18 +142,18 @@ void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
}
else
{
- QPixmap* pix = new QPixmap(width, 18);
+ TQPixmap* pix = new TQPixmap(width, 18);
int h1 = 3 * width/4;
int h2 = width - h1;
- QImage top = KImageEffect::gradient(QSize(h1,4), ColorUtil::lighten(c,110), c.light(94), KImageEffect::HorizontalGradient );
- QImage bot = KImageEffect::gradient(QSize(h2,4), c.light(94), ColorUtil::lighten(c,109), KImageEffect::HorizontalGradient );
+ TQImage top = KImageEffect::gradient(TQSize(h1,4), ColorUtil::lighten(c,110), c.light(94), KImageEffect::HorizontalGradient );
+ TQImage bot = KImageEffect::gradient(TQSize(h2,4), c.light(94), ColorUtil::lighten(c,109), KImageEffect::HorizontalGradient );
- QPixmap topT(top);
- QPixmap botT(bot);
+ TQPixmap topT(top);
+ TQPixmap botT(bot);
- QPainter p2(pix);
+ TQPainter p2(pix);
p2.drawTiledPixmap(0, 0, h1, 18, topT);
p2.drawTiledPixmap(h1, 0, h2, 18, botT);
p2.end();
@@ -168,7 +168,7 @@ void GradientPainter::renderGradient( QPainter* p, const QRect& r, QColor c,
imgToAdd->m_pixmap->width() * imgToAdd->m_pixmap->height()*
imgToAdd->m_pixmap->depth()/8);
- p->drawTiledPixmap(r, *imgToAdd->m_pixmap, horizontal? QPoint(0,py): QPoint(px,0));
+ p->drawTiledPixmap(r, *imgToAdd->m_pixmap, horizontal? TQPoint(0,py): TQPoint(px,0));
if (!cacheOK)
delete imgToAdd;
diff --git a/kstyles/keramik/gradients.h b/kstyles/keramik/gradients.h
index d4dfd2c95..8ee0a281b 100644
--- a/kstyles/keramik/gradients.h
+++ b/kstyles/keramik/gradients.h
@@ -30,7 +30,7 @@ namespace Keramik
class GradientPainter
{
public:
- static void renderGradient( QPainter* p, const QRect& r, QColor cr,
+ static void renderGradient( TQPainter* p, const TQRect& r, TQColor cr,
bool horizontal, bool menu = false,
int px = 0, int py = 0, int pwidth = -1, int pheight = -1 );
diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp
index 5157c34ed..6eb6c57ad 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -33,27 +33,27 @@
// $Id$
-#include <qbitmap.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdrawutil.h>
-#include <qframe.h>
-#include <qheader.h>
-#include <qintdict.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qmenubar.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qprogressbar.h>
-#include <qpushbutton.h>
-#include <qsettings.h>
-#include <qslider.h>
-#include <qstyleplugin.h>
-#include <qtabbar.h>
-#include <qtimer.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
+#include <tqbitmap.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdrawutil.h>
+#include <tqframe.h>
+#include <tqheader.h>
+#include <tqintdict.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqmenubar.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
+#include <tqsettings.h>
+#include <tqslider.h>
+#include <tqstyleplugin.h>
+#include <tqtabbar.h>
+#include <tqtimer.h>
+#include <tqtoolbar.h>
+#include <tqtoolbutton.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
@@ -77,15 +77,15 @@ public:
KeramikStylePlugin() {}
~KeramikStylePlugin() {}
- QStringList keys() const
+ TQStringList keys() const
{
- if (QPixmap::defaultDepth() > 8)
- return QStringList() << "Keramik";
+ if (TQPixmap::defaultDepth() > 8)
+ return TQStringList() << "Keramik";
else
- return QStringList();
+ return TQStringList();
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
if ( key == "keramik" ) return new KeramikStyle();
return 0;
@@ -98,12 +98,12 @@ KDE_Q_EXPORT_PLUGIN( KeramikStylePlugin )
// ### Remove globals
/*
-QBitmap lightBmp;
-QBitmap grayBmp;
-QBitmap dgrayBmp;
-QBitmap centerBmp;
-QBitmap maskBmp;
-QBitmap xBmp;
+TQBitmap lightBmp;
+TQBitmap grayBmp;
+TQBitmap dgrayBmp;
+TQBitmap centerBmp;
+TQBitmap maskBmp;
+TQBitmap xBmp;
*/
namespace
{
@@ -122,21 +122,21 @@ namespace
namespace
{
- void drawKeramikArrow(QPainter* p, QColorGroup cg, QRect r, QStyle::PrimitiveElement pe, bool down, bool enabled)
+ void drawKeramikArrow(TQPainter* p, TQColorGroup cg, TQRect r, TQStyle::PrimitiveElement pe, bool down, bool enabled)
{
- QPointArray a;
+ TQPointArray a;
switch(pe)
{
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints(QCOORDARRLEN(keramik_up_arrow), keramik_up_arrow);
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints(QCOORDARRLEN(keramik_down_arrow), keramik_down_arrow);
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints(QCOORDARRLEN(keramik_left_arrow), keramik_left_arrow);
break;
@@ -173,13 +173,13 @@ namespace
// XXX
/* reimp. */
-void KeramikStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void KeramikStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
- QColor col = cg.button();
+ TQColor col = cg.button();
#ifdef Q_WS_X11 // Only draw menu gradients on TrueColor, X11 visuals
- if ( QPaintDevice::x11AppDepth() >= 24 )
+ if ( TQPaintDevice::x11AppDepth() >= 24 )
KPixmapEffect::gradient( pix, col.light(120), col.dark(115),
KPixmapEffect::HorizontalGradient );
else
@@ -188,7 +188,7 @@ void KeramikStyle::renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg,
}
// XXX
-QRect KeramikStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect KeramikStyle::subRect(SubRect r, const TQWidget *widget) const
{
// We want the focus rect for buttons to be adjusted from
// the Qt3 defaults to be similar to Qt 2's defaults.
@@ -197,16 +197,16 @@ QRect KeramikStyle::subRect(SubRect r, const QWidget *widget) const
{
case SR_PushButtonFocusRect:
{
- const QPushButton* button = (const QPushButton*) widget;
- QRect wrect(widget->rect());
+ const TQPushButton* button = (const TQPushButton*) widget;
+ TQRect wrect(widget->rect());
if (button->isDefault() || button->autoDefault())
{
- return QRect(wrect.x() + 6, wrect.y() + 5, wrect.width() - 12, wrect.height() - 10);
+ return TQRect(wrect.x() + 6, wrect.y() + 5, wrect.width() - 12, wrect.height() - 10);
}
else
{
- return QRect(wrect.x() + 3, wrect.y() + 5, wrect.width() - 8, wrect.height() - 10);
+ return TQRect(wrect.x() + 3, wrect.y() + 5, wrect.width() - 8, wrect.height() - 10);
}
break;
@@ -219,17 +219,17 @@ QRect KeramikStyle::subRect(SubRect r, const QWidget *widget) const
case SR_CheckBoxFocusRect:
{
- const QCheckBox* cb = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* cb = static_cast<const TQCheckBox*>(widget);
//Only checkbox, no label
if (cb->text().isEmpty() && (cb->pixmap() == 0) )
{
- QRect bounding = cb->rect();
- QSize checkDim = loader.size( keramik_checkbox_on);
+ TQRect bounding = cb->rect();
+ TQSize checkDim = loader.size( keramik_checkbox_on);
int cw = checkDim.width();
int ch = checkDim.height();
- QRect checkbox(bounding.x() + 1, bounding.y() + 1 + (bounding.height() - ch)/2,
+ TQRect checkbox(bounding.x() + 1, bounding.y() + 1 + (bounding.height() - ch)/2,
cw - 3, ch - 4);
return checkbox;
@@ -244,9 +244,9 @@ QRect KeramikStyle::subRect(SubRect r, const QWidget *widget) const
}
-QPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+TQPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
switch (stylepixmap) {
case SP_TitleBarMinButton:
@@ -283,15 +283,15 @@ KeramikStyle::KeramikStyle()
forceSmallMode = false;
hoverWidget = 0;
- QSettings settings;
+ TQSettings settings;
highlightScrollBar = settings.readBoolEntry("/keramik/Settings/highlightScrollBar", true);
animateProgressBar = settings.readBoolEntry("/keramik/Settings/animateProgressBar", false);
if (animateProgressBar)
{
- animationTimer = new QTimer( this );
- connect( animationTimer, SIGNAL(timeout()), this, SLOT(updateProgressPos()) );
+ animationTimer = new TQTimer( this );
+ connect( animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateProgressPos()) );
}
firstComboPopupRelease = false;
@@ -300,11 +300,11 @@ KeramikStyle::KeramikStyle()
void KeramikStyle::updateProgressPos()
{
//Update the registered progressbars.
- QMap<QProgressBar*, int>::iterator iter;
+ TQMap<TQProgressBar*, int>::iterator iter;
bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{
- QProgressBar* pbar = iter.key();
+ TQProgressBar* pbar = iter.key();
if (pbar->isVisible() && pbar->isEnabled() &&
pbar->progress() != pbar->totalSteps())
{
@@ -328,28 +328,28 @@ KeramikStyle::~KeramikStyle()
KeramikDbCleanup();
}
-void KeramikStyle::polish(QApplication* app)
+void KeramikStyle::polish(TQApplication* app)
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
}
-void KeramikStyle::polish(QWidget* widget)
+void KeramikStyle::polish(TQWidget* widget)
{
// Put in order of highest occurrence to maximise hit rate
- if ( widget->inherits( "QPushButton" ) || widget->inherits( "QComboBox" ) || widget->inherits("QToolButton") )
+ if ( widget->inherits( "TQPushButton" ) || widget->inherits( "TQComboBox" ) || widget->inherits("TQToolButton") )
{
widget->installEventFilter(this);
- if ( widget->inherits( "QComboBox" ) )
+ if ( widget->inherits( "TQComboBox" ) )
widget->setBackgroundMode( NoBackground );
}
- else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) )
+ else if ( widget->inherits( "TQMenuBar" ) || widget->inherits( "TQPopupMenu" ) )
widget->setBackgroundMode( NoBackground );
else if ( widget->parentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) ||
+ ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) ||
widget->inherits( "KCompletionBox" ) ) ) {
- QListBox* listbox = (QListBox*) widget;
+ TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 4 );
listbox->setBackgroundMode( NoBackground );
widget->installEventFilter( this );
@@ -363,11 +363,11 @@ void KeramikStyle::polish(QWidget* widget)
widget->installEventFilter(this);
}
- if (animateProgressBar && ::qt_cast<QProgressBar*>(widget))
+ if (animateProgressBar && ::qt_cast<TQProgressBar*>(widget))
{
widget->installEventFilter(this);
- progAnimWidgets[static_cast<QProgressBar*>(widget)] = 0;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*)));
+ progAnimWidgets[static_cast<TQProgressBar*>(widget)] = 0;
+ connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(progressBarDestroyed(TQObject*)));
if (!animationTimer->isActive())
animationTimer->start( 50, false );
}
@@ -375,22 +375,22 @@ void KeramikStyle::polish(QWidget* widget)
KStyle::polish(widget);
}
-void KeramikStyle::unPolish(QWidget* widget)
+void KeramikStyle::unPolish(TQWidget* widget)
{
//### TODO: This needs major cleanup (and so does polish() )
- if ( widget->inherits( "QPushButton" ) || widget->inherits( "QComboBox" ) )
+ if ( widget->inherits( "TQPushButton" ) || widget->inherits( "TQComboBox" ) )
{
- if ( widget->inherits( "QComboBox" ) )
+ if ( widget->inherits( "TQComboBox" ) )
widget->setBackgroundMode( PaletteButton );
widget->removeEventFilter(this);
}
- else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) )
+ else if ( widget->inherits( "TQMenuBar" ) || widget->inherits( "TQPopupMenu" ) )
widget->setBackgroundMode( PaletteBackground );
else if ( widget->parentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) ||
+ ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) ||
widget->inherits( "KCompletionBox" ) ) ) {
- QListBox* listbox = (QListBox*) widget;
+ TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
listbox->setBackgroundMode( PaletteBackground );
widget->removeEventFilter( this );
@@ -402,21 +402,21 @@ void KeramikStyle::unPolish(QWidget* widget)
widget->setBackgroundMode( PaletteBackground );
widget->removeEventFilter(this);
}
- else if ( ::qt_cast<QProgressBar*>(widget) )
+ else if ( ::qt_cast<TQProgressBar*>(widget) )
{
- progAnimWidgets.remove(static_cast<QProgressBar*>(widget));
+ progAnimWidgets.remove(static_cast<TQProgressBar*>(widget));
}
KStyle::unPolish(widget);
}
-void KeramikStyle::progressBarDestroyed(QObject* obj)
+void KeramikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<QProgressBar*>(obj));
+ progAnimWidgets.remove(static_cast<TQProgressBar*>(obj));
}
-void KeramikStyle::polish( QPalette& )
+void KeramikStyle::polish( TQPalette& )
{
loader.clear();
}
@@ -424,8 +424,8 @@ void KeramikStyle::polish( QPalette& )
/**
Draws gradient background for toolbar buttons, handles and spacers
*/
-static void renderToolbarEntryBackground(QPainter* paint,
- const QToolBar* parent, QRect r, const QColorGroup& cg, bool horiz)
+static void renderToolbarEntryBackground(TQPainter* paint,
+ const TQToolBar* parent, TQRect r, const TQColorGroup& cg, bool horiz)
{
int toolWidth, toolHeight;
@@ -439,7 +439,7 @@ static void renderToolbarEntryBackground(QPainter* paint,
//If we're floating, however, wee need to fiddle
//with height to skip the titlebar
- if (parent->place() == QDockWindow::OutsideDock)
+ if (parent->place() == TQDockWindow::OutsideDock)
{
toolHeight = toolHeight - titleBarH - 2*parent->frameWidth() + 2;
//2 at the end = the 2 pixels of border of a "regular"
@@ -468,7 +468,7 @@ static void renderToolbarEntryBackground(QPainter* paint,
toolWidth, toolHeight);
}
-static void renderToolbarWidgetBackground(QPainter* painter, const QWidget* widget)
+static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* widget)
{
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name, or
@@ -476,16 +476,16 @@ static void renderToolbarWidgetBackground(QPainter* painter, const QWidget* widg
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- QWidget *parent = static_cast<QWidget*>(widget->parentWidget());
+ TQWidget *parent = static_cast<TQWidget*>(widget->parentWidget());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = static_cast<QWidget*>(parent->parent());
+ parent = static_cast<TQWidget*>(parent->parent());
}
- QRect pr = parent->rect();
+ TQRect pr = parent->rect();
bool horiz_grad = pr.width() > pr.height();
int toolHeight = parent->height();
@@ -493,13 +493,13 @@ static void renderToolbarWidgetBackground(QPainter* painter, const QWidget* widg
// Check if the parent is a QToolbar, and use its orientation, else guess.
//Also, get the height to use in the gradient from it.
- QToolBar* tb = dynamic_cast<QToolBar*>(parent);
+ TQToolBar* tb = dynamic_cast<TQToolBar*>(parent);
if (tb)
{
horiz_grad = tb->orientation() == Qt::Horizontal;
//If floating, we need to skip the titlebar.
- if (tb->place() == QDockWindow::OutsideDock)
+ if (tb->place() == TQDockWindow::OutsideDock)
{
toolHeight = tb->height() - titleBarH - 2*tb->frameWidth() + 2;
//Calculate offset here by looking at the bottom edge difference, and height.
@@ -524,7 +524,7 @@ static void renderToolbarWidgetBackground(QPainter* painter, const QWidget* widg
}
else
{
- QPainter p( widget );
+ TQPainter p( widget );
Keramik::GradientPainter::renderGradient( &p, widget->rect(),
widget->colorGroup().button(), horiz_grad, false,
x_offset, y_offset, toolWidth, toolHeight);
@@ -533,11 +533,11 @@ static void renderToolbarWidgetBackground(QPainter* painter, const QWidget* widg
// This function draws primitive elements as well as their masks.
void KeramikStyle::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool down = flags & Style_Down;
bool on = flags & Style_On;
@@ -574,11 +574,11 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
{
if (titleBarMode)
{
- QRect nr;
+ TQRect nr;
if (titleBarMode == Maximized)
{
//### What should we draw at sides?
- nr = QRect(r.x(), r.y(), r.width()-1, r.height() );
+ nr = TQRect(r.x(), r.y(), r.width()-1, r.height() );
}
else
{
@@ -588,7 +588,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_Down)
offY += 1;
- nr = QRect(r.x()+offX, r.y()+offY, 15, 15);
+ nr = TQRect(r.x()+offX, r.y()+offY, 15, 15);
}
Keramik::ScaledPainter(flags & Style_Down ? keramik_titlebutton_pressed : keramik_titlebutton,
@@ -611,12 +611,12 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_MouseOver)
{
Keramik::GradientPainter::renderGradient( p,
- QRect(r.x(), 0, r.width(), r.height()),
+ TQRect(r.x(), 0, r.width(), r.height()),
Keramik::ColorUtil::lighten(cg.button(), 115), flags & Style_Horizontal, false );
}
else
Keramik::GradientPainter::renderGradient( p,
- QRect(r.x(), 0, r.width(), r.height()),
+ TQRect(r.x(), 0, r.width(), r.height()),
cg.button(), flags & Style_Horizontal, false );
p->setPen(cg.button().light(70));
@@ -717,7 +717,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+2, y+2, w-4, h-4, cg.button());
else
- Keramik::GradientPainter::renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ Keramik::GradientPainter::renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), flags & Style_Horizontal );
}
break;
@@ -777,7 +777,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
loader.size( keramik_scrollbar_vbar+KeramikSlider3 ).height() + 2 ) )
count = 5;
- QColor col = cg.highlight();
+ TQColor col = cg.highlight();
if (customScrollMode || !highlightScrollBar)
col = cg.button();
@@ -804,9 +804,9 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
r.x()+r.width()/2 - 1, r.y() + r.height()/2 + 3);
- drawKeramikArrow(p, cg, QRect(r.x(), r.y(), r.width()/2, r.height()), PE_ArrowLeft, down, !disabled);
+ drawKeramikArrow(p, cg, TQRect(r.x(), r.y(), r.width()/2, r.height()), PE_ArrowLeft, down, !disabled);
- drawKeramikArrow(p, cg, QRect(r.x()+r.width()/2, r.y(), r.width() - r.width()/2, r.height()),
+ drawKeramikArrow(p, cg, TQRect(r.x()+r.width()/2, r.y(), r.width() - r.width()/2, r.height()),
PE_ArrowRight, down, !disabled);
}
else
@@ -819,9 +819,9 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
r.x()+r.width()/2 + 2, r.y()+r.height()/2);
- drawKeramikArrow(p, cg, QRect(r.x(), r.y(), r.width(), r.height()/2), PE_ArrowUp, down, !disabled);
+ drawKeramikArrow(p, cg, TQRect(r.x(), r.y(), r.width(), r.height()/2), PE_ArrowUp, down, !disabled);
- drawKeramikArrow(p, cg, QRect(r.x(), r.y()+r.height()/2, r.width(), r.height() - r.height()/2),
+ drawKeramikArrow(p, cg, TQRect(r.x(), r.y()+r.height()/2, r.width(), r.height() - r.height()/2),
PE_ArrowDown, down, !disabled);
//drawKeramikArrow(p, cg, r, PE_ArrowUp, down, !disabled);
}
@@ -932,7 +932,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
p->setPen(cg.mid());
p->drawLine(x2-1, y+1, x2-1, y2-1);
p->drawLine(x+1, y2-1, x2-1, y2-1);
- p->fillRect(x+3, y+3, w-5, h-5, cg.brush(QColorGroup::Background));
+ p->fillRect(x+3, y+3, w-5, h-5, cg.brush(TQColorGroup::Background));
break;
}
@@ -944,7 +944,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
//p->setPen( cg.shadow() );
//p->drawRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2);
- //p->fillRect( visualRect( QRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) );
+ //p->fillRect( visualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) );
//break;
// GENERAL PANELS
@@ -953,8 +953,8 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
{
if (kickerMode)
{
- if (p->device() && p->device()->devType() == QInternal::Widget &&
- QCString(static_cast<QWidget*>(p->device())->className()) == "FittsLawFrame" )
+ if (p->device() && p->device()->devType() == TQInternal::Widget &&
+ TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame" )
{
int x2 = x + r.width() - 1;
int y2 = y + r.height() - 1;
@@ -980,7 +980,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
: opt.lineWidth();
if (lw == 2)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x,y,w,h;
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
@@ -1041,8 +1041,8 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
{
//Gradient border colors.
//(Same as in gradients.cpp)
- QColor gradTop = Keramik::ColorUtil::lighten(cg.button(),110);
- QColor gradBot = Keramik::ColorUtil::lighten(cg.button(),109);
+ TQColor gradTop = Keramik::ColorUtil::lighten(cg.button(),110);
+ TQColor gradBot = Keramik::ColorUtil::lighten(cg.button(),109);
if (horiz)
{
//Top line
@@ -1055,7 +1055,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
//Left line
Keramik::GradientPainter::renderGradient(
- p, QRect(r.x(), r.y(), 1, r.height()),
+ p, TQRect(r.x(), r.y(), 1, r.height()),
cg.button(), true);
//Right end-line
@@ -1074,7 +1074,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
//Top line
Keramik::GradientPainter::renderGradient(
- p, QRect(r.x(), r.y(), r.width(), 1),
+ p, TQRect(r.x(), r.y(), r.width(), 1),
cg.button(), false);
//Bottom end-line
@@ -1089,10 +1089,10 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
case PE_DockWindowSeparator:
{
- QWidget* paintWidget = dynamic_cast<QWidget*>(p->device());
- QToolBar* parent = 0;
+ TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device());
+ TQToolBar* parent = 0;
if (paintWidget)
- parent = ::qt_cast<QToolBar*>(paintWidget->parentWidget());
+ parent = ::qt_cast<TQToolBar*>(paintWidget->parentWidget());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) );
if ( !(flags & Style_Horizontal) )
@@ -1118,7 +1118,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft)
{
- QPointArray a;
+ TQPointArray a;
switch(pe)
{
@@ -1168,12 +1168,12 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
}
void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
bool disabled = ( flags & Style_Enabled ) == 0;
int x, y, w, h;
@@ -1185,7 +1185,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
// -------------------------------------------------------------------
case KPE_SliderGroove:
{
- const QSlider* slider = static_cast< const QSlider* >( widget );
+ const TQSlider* slider = static_cast< const TQSlider* >( widget );
bool horizontal = slider->orientation() == Horizontal;
Keramik::TilePainter::PaintMode pmod = Keramik::TilePainter::PaintNormal;
@@ -1205,10 +1205,10 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
// -------------------------------------------------------------------
case KPE_SliderHandle:
{
- const QSlider* slider = static_cast< const QSlider* >( widget );
+ const TQSlider* slider = static_cast< const TQSlider* >( widget );
bool horizontal = slider->orientation() == Horizontal;
- QColor hl = cg.highlight();
+ TQColor hl = cg.highlight();
if (!disabled && flags & Style_Active)
hl = Keramik::ColorUtil::lighten(cg.highlight(),110);
@@ -1228,10 +1228,10 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
int x2 = r.x() + r.width()-1;
int y2 = r.y() + r.height()-1;
- QToolBar* parent = 0;
+ TQToolBar* parent = 0;
- if (widget && widget->parent() && widget->parent()->inherits("QToolBar"))
- parent = static_cast<QToolBar*>(widget->parent());
+ if (widget && widget->parent() && widget->parent()->inherits("TQToolBar"))
+ parent = static_cast<TQToolBar*>(widget->parent());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal));
if (flags & Style_Horizontal) {
@@ -1301,20 +1301,20 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
}
}
-bool KeramikStyle::isFormWidget(const QWidget* widget) const
+bool KeramikStyle::isFormWidget(const TQWidget* widget) const
{
//Form widgets are in the KHTMLView, but that has 2 further inner levels
//of widgets - QClipperWidget, and outside of that, QViewportWidget
- QWidget* potentialClipPort = widget->parentWidget();
+ TQWidget* potentialClipPort = widget->parentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
- QWidget* potentialViewPort = potentialClipPort->parentWidget();
+ TQWidget* potentialViewPort = potentialClipPort->parentWidget();
if (!potentialViewPort || potentialViewPort->isTopLevel() ||
qstrcmp(potentialViewPort->name(), "qt_viewport") )
return false;
- QWidget* potentialKHTML = potentialViewPort->parentWidget();
+ TQWidget* potentialKHTML = potentialViewPort->parentWidget();
if (!potentialKHTML || potentialKHTML->isTopLevel() ||
qstrcmp(potentialKHTML->className(), "KHTMLView") )
return false;
@@ -1324,12 +1324,12 @@ bool KeramikStyle::isFormWidget(const QWidget* widget) const
}
void KeramikStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool disabled = ( flags & Style_Enabled ) == 0;
int x, y, w, h;
@@ -1341,7 +1341,7 @@ void KeramikStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_PushButton:
{
- const QPushButton* btn = static_cast< const QPushButton* >( widget );
+ const TQPushButton* btn = static_cast< const TQPushButton* >( widget );
if (isFormWidget(btn))
formMode = true;
@@ -1358,7 +1358,7 @@ void KeramikStyle::drawControl( ControlElement element,
}
else
{
- if (widget->parent() && widget->parent()->inherits("QToolBar"))
+ if (widget->parent() && widget->parent()->inherits("TQToolBar"))
toolbarBlendWidget = widget;
drawPrimitive( PE_ButtonCommand, p, r, cg, flags );
@@ -1374,7 +1374,7 @@ void KeramikStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_PushButtonLabel:
{
- const QPushButton* button = static_cast<const QPushButton *>( widget );
+ const TQPushButton* button = static_cast<const TQPushButton *>( widget );
bool active = button->isOn() || button->isDown();
bool cornArrow = false;
@@ -1391,13 +1391,13 @@ void KeramikStyle::drawControl( ControlElement element,
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
- (dx + button->iconSet()->pixmap (QIconSet::Small, QIconSet::Normal, QIconSet::Off ).width()) >= w )
+ (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
}
else
{
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -1406,15 +1406,15 @@ void KeramikStyle::drawControl( ControlElement element,
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap icon = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap icon = button->iconSet()->pixmap( TQIconSet::Small, mode, state );
if (!button->text().isEmpty())
{
@@ -1446,12 +1446,12 @@ void KeramikStyle::drawControl( ControlElement element,
}
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
}
// Make the label indicate if the button is a default button or not
- drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
&button->colorGroup().buttonText() );
@@ -1464,9 +1464,9 @@ void KeramikStyle::drawControl( ControlElement element,
case CE_ToolButtonLabel:
{
- //const QToolButton *toolbutton = static_cast<const QToolButton * >(widget);
- bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
- QRect nr = r;
+ //const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget);
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "TQToolBar" );
+ TQRect nr = r;
if (!onToolbar)
{
@@ -1492,17 +1492,17 @@ void KeramikStyle::drawControl( ControlElement element,
case CE_TabBarTab:
{
- const QTabBar* tabBar = static_cast< const QTabBar* >( widget );
+ const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget );
- bool bottom = tabBar->shape() == QTabBar::RoundedBelow ||
- tabBar->shape() == QTabBar::TriangularBelow;
+ bool bottom = tabBar->shape() == TQTabBar::RoundedBelow ||
+ tabBar->shape() == TQTabBar::TriangularBelow;
if ( flags & Style_Selected )
{
- QRect tabRect = r;
+ TQRect tabRect = r;
//If not the right-most tab, readjust the painting to be one pixel wider
//to avoid a doubled line
- int rightMost = QApplication::reverseLayout() ? 0 : tabBar->count() - 1;
+ int rightMost = TQApplication::reverseLayout() ? 0 : tabBar->count() - 1;
if (tabBar->indexOf( opt.tab()->identifier() ) != rightMost)
tabRect.setWidth( tabRect.width() + 1);
@@ -1535,14 +1535,14 @@ void KeramikStyle::drawControl( ControlElement element,
case CE_DockWindowEmptyArea:
{
- QRect pr = r;
- if (widget && widget->inherits("QToolBar"))
+ TQRect pr = r;
+ if (widget && widget->inherits("TQToolBar"))
{
- const QToolBar* tb = static_cast<const QToolBar*>(widget);
- if (tb->place() == QDockWindow::OutsideDock)
+ const TQToolBar* tb = static_cast<const TQToolBar*>(widget);
+ if (tb->place() == TQDockWindow::OutsideDock)
{
//Readjust the paint rectangle to skip the titlebar
- pr = QRect(r.x(), titleBarH + tb->frameWidth(),
+ pr = TQRect(r.x(), titleBarH + tb->frameWidth(),
r.width(), tb->height() - titleBarH - 2 * tb->frameWidth() + 2);
//2 at the end = the 2 pixels of border of a "regular"
//toolbar we normally paint over.
@@ -1564,16 +1564,16 @@ void KeramikStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_MenuBarItem:
{
- QMenuBar *mb = (QMenuBar*)widget;
- QMenuItem *mi = opt.menuItem();
- QRect pr = mb->rect();
+ TQMenuBar *mb = (TQMenuBar*)widget;
+ TQMenuItem *mi = opt.menuItem();
+ TQRect pr = mb->rect();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
if ( active && focused )
qDrawShadePanel(p, r.x(), r.y(), r.width(), r.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
Keramik::GradientPainter::renderGradient( p, pr, cg.button(), true, true);
@@ -1588,14 +1588,14 @@ void KeramikStyle::drawControl( ControlElement element,
// POPUPMENU ITEM
// -------------------------------------------------------------------
case CE_PopupMenuItem: {
- const QPopupMenu *popupmenu = static_cast< const QPopupMenu * >( widget );
- QRect main = r;
+ const TQPopupMenu *popupmenu = static_cast< const TQPopupMenu * >( widget );
+ TQRect main = r;
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
if ( !mi )
{
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
p->fillRect( r, cg.background().light( 105 ) );
@@ -1608,7 +1608,7 @@ void KeramikStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( checkable )
checkcol = QMAX( checkcol, 20 );
@@ -1641,28 +1641,28 @@ void KeramikStyle::drawControl( ControlElement element,
break;
}
- QRect cr = visualRect( QRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
+ TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && /*!active &&*/ mi->isChecked() )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
}
@@ -1674,7 +1674,7 @@ void KeramikStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
// if ( ! active )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_Default;
@@ -1701,7 +1701,7 @@ void KeramikStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
// Does the menu item draw it's own label?
if ( mi->custom() ) {
@@ -1721,7 +1721,7 @@ void KeramikStyle::drawControl( ControlElement element,
}
else {
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
int t = s.find( '\t' );
@@ -1729,8 +1729,8 @@ void KeramikStyle::drawControl( ControlElement element,
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
- //QColor draw = cg.text();
- QColor draw = (active && enabled) ? cg.highlightedText () : cg.text();
+ //TQColor draw = cg.text();
+ TQColor draw = (active && enabled) ? cg.highlightedText () : cg.text();
p->setPen(draw);
@@ -1769,7 +1769,7 @@ void KeramikStyle::drawControl( ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -1788,7 +1788,7 @@ void KeramikStyle::drawControl( ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame;
- QRect vr = visualRect( QRect( x + w - arrowHMargin - itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1796,7 +1796,7 @@ void KeramikStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( discol, cg.highlight(), white, white,
+ TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -1807,10 +1807,10 @@ void KeramikStyle::drawControl( ControlElement element,
break;
}
case CE_ProgressBarContents: {
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
@@ -1839,56 +1839,56 @@ void KeramikStyle::drawControl( ControlElement element,
}
//Store the progress rect.
- QRect progressRect;
+ TQRect progressRect;
if (reverse)
- progressRect = QRect(cr.x() + cr.width() - width - pstep, cr.y(),
+ progressRect = TQRect(cr.x() + cr.width() - width - pstep, cr.y(),
width, cr.height());
else
- progressRect = QRect(cr.x() + pstep, cr.y(), width, cr.height());
+ progressRect = TQRect(cr.x() + pstep, cr.y(), width, cr.height());
Keramik::RowPainter(keramik_progressbar).draw(p, progressRect,
cg.highlight(), cg.background() );
return;
}
- QRect progressRect;
+ TQRect progressRect;
if (reverse)
- progressRect = QRect(cr.x()+(cr.width()-width), cr.y(), width, cr.height());
+ progressRect = TQRect(cr.x()+(cr.width()-width), cr.y(), width, cr.height());
else
- progressRect = QRect(cr.x(), cr.y(), width, cr.height());
+ progressRect = TQRect(cr.x(), cr.y(), width, cr.height());
//Apply the animation rectangle.
//////////////////////////////////////
if (animateProgressBar)
{
- int progAnimShift = progAnimWidgets[const_cast<QProgressBar*>(pb)];
+ int progAnimShift = progAnimWidgets[const_cast<TQProgressBar*>(pb)];
if (reverse)
{
//Here, we can't simply shift, as the painter code calculates everything based
//on the left corner, so we need to draw the 2 portions ourselves.
//Start off by checking the geometry of the end pixmap - it introduces a bit of an offset
- QSize endDim = loader.size(keramik_progressbar + 3); //3 = 3*1 + 0 = (1,0) = cl
+ TQSize endDim = loader.size(keramik_progressbar + 3); //3 = 3*1 + 0 = (1,0) = cl
//We might not have anything to animate at all, though, if the ender is the only thing to paint
if (endDim.width() < progressRect.width())
{
//OK, so we do have some stripes.
// Render the endline now - the clip region below will protect it from getting overwriten
- QPixmap endline = loader.scale(keramik_progressbar + 3, endDim.width(), progressRect.height(),
+ TQPixmap endline = loader.scale(keramik_progressbar + 3, endDim.width(), progressRect.height(),
cg.highlight(), cg.background());
p->drawPixmap(progressRect.x(), progressRect.y(), endline);
//Now, calculate where the stripes should be, and set a clip region to that
progressRect.setLeft(progressRect.x() + endline.width());
- p->setClipRect(progressRect, QPainter::CoordPainter);
+ p->setClipRect(progressRect, TQPainter::CoordPainter);
//Expand the paint region slightly to get the animation offset.
progressRect.setLeft(progressRect.x() - progAnimShift);
//Paint the stripes.
- QPixmap stripe = loader.scale(keramik_progressbar + 4, 28, progressRect.height(),
+ TQPixmap stripe = loader.scale(keramik_progressbar + 4, 28, progressRect.height(),
cg.highlight(), cg.background());
//4 = 3*1 + 1 = (1,1) = cc
@@ -1900,7 +1900,7 @@ void KeramikStyle::drawControl( ControlElement element,
else
{
//Clip to the old rectangle
- p->setClipRect(progressRect, QPainter::CoordPainter);
+ p->setClipRect(progressRect, TQPainter::CoordPainter);
//Expand the paint region
progressRect.setLeft(progressRect.x() - 28 + progAnimShift);
}
@@ -1919,18 +1919,18 @@ void KeramikStyle::drawControl( ControlElement element,
}
void KeramikStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
p->fillRect(r, color1);
maskMode = true;
- drawControl( element, p, widget, r, QApplication::palette().active(), QStyle::Style_Default, opt);
+ drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
maskMode = false;
}
-bool KeramikStyle::isSizeConstrainedCombo(const QComboBox* combo) const
+bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const
{
if (combo->width() >= 80)
return false;
@@ -1943,14 +1943,14 @@ bool KeramikStyle::isSizeConstrainedCombo(const QComboBox* combo) const
}
void KeramikStyle::drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool disabled = ( flags & Style_Enabled ) == 0;
switch(control)
@@ -1960,27 +1960,27 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
case CC_ComboBox:
{
bool toolbarMode = false;
- const QComboBox* cb = static_cast< const QComboBox* >( widget );
+ const TQComboBox* cb = static_cast< const TQComboBox* >( widget );
bool compact = isSizeConstrainedCombo(cb);
if (isFormWidget(cb))
formMode = true;
- QPixmap * buf = 0;
- QPainter* p2 = p;
+ TQPixmap * buf = 0;
+ TQPainter* p2 = p;
- QRect br = r;
+ TQRect br = r;
if (controls == SC_All)
{
//Double-buffer only when we are in the slower full-blend mode
if (widget->parent() &&
- ( widget->parent()->inherits("QToolBar")|| !qstrcmp(widget->parent()->name(), kdeToolbarWidget) ) )
+ ( widget->parent()->inherits("TQToolBar")|| !qstrcmp(widget->parent()->name(), kdeToolbarWidget) ) )
{
- buf = new QPixmap( r.width(), r.height() );
+ buf = new TQPixmap( r.width(), r.height() );
br.setX(0);
br.setY(0);
- p2 = new QPainter(buf);
+ p2 = new TQPainter(buf);
//Ensure that we have clipping on, and have a sane base.
//If need be, Qt will shrink us to the paint region.
@@ -2028,20 +2028,20 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
if ( active )
flags |= Style_On;
- QRect ar = querySubControlMetrics( CC_ComboBox, widget,
+ TQRect ar = querySubControlMetrics( CC_ComboBox, widget,
SC_ComboBoxArrow );
if (!compact)
{
ar.setWidth(ar.width()-13);
- QRect rr = visualRect( QRect( ar.x(), ar.y() + 4,
+ TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4,
loader.size(keramik_ripple ).width(), ar.height() - 8 ),
widget );
- ar = visualRect( QRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
+ ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
11, ar.height() ),
widget );
- QPointArray a;
+ TQPointArray a;
a.setPoints(QCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
@@ -2054,8 +2054,8 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
else //Size-constrained combo -- loose the ripple.
{
ar.setWidth(ar.width() - 7);
- ar = visualRect( QRect( ar.x(), ar.y(), 11, ar.height() ), widget);
- QPointArray a;
+ ar = visualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget);
+ TQPointArray a;
a.setPoints(QCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
@@ -2069,7 +2069,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
{
if ( cb->editable() )
{
- QRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget );
+ TQRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget );
er.addCoords( -2, -2, 2, 2 );
p2->fillRect( er, cg.base() );
drawPrimitive( PE_PanelLineEdit, p2, er, cg );
@@ -2078,14 +2078,14 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
}
else if ( cb->hasFocus() )
{
- QRect re = QStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget);
+ TQRect re = TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget);
if ( compact )
re.addCoords( 3, 3, 0, -3 );
- p2->fillRect( re, cg.brush( QColorGroup::Highlight ) );
+ p2->fillRect( re, cg.brush( TQColorGroup::Highlight ) );
drawPrimitive( PE_FocusRect, p2, re, cg,
- Style_FocusAtBorder, QStyleOption( cg.highlight() ) );
+ Style_FocusAtBorder, TQStyleOption( cg.highlight() ) );
}
- // QComboBox draws the text on its own and uses the painter's current colors
+ // TQComboBox draws the text on its own and uses the painter's current colors
if ( cb->hasFocus() )
{
p->setPen( cg.highlightedText() );
@@ -2112,8 +2112,8 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
- const QSpinWidget* sw = static_cast< const QSpinWidget* >( widget );
- QRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
+ const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget );
+ TQRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
if ( controls & SC_SpinWidgetButtonField )
{
Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() );
@@ -2134,14 +2134,14 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
}
case CC_ScrollBar:
{
- const QScrollBar* sb = static_cast< const QScrollBar* >( widget );
+ const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway
{
if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button())
customScrollMode = true;
}
bool horizontal = sb->orientation() == Horizontal;
- QRect slider, subpage, addpage, subline, addline;
+ TQRect slider, subpage, addpage, subline, addline;
if ( sb->minValue() == sb->maxValue() ) flags &= ~Style_Enabled;
slider = querySubControlMetrics( control, widget, SC_ScrollBarSlider, opt );
@@ -2154,13 +2154,13 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
drawPrimitive( PE_ScrollBarSubLine, p, subline, cg,
flags | ( ( active & SC_ScrollBarSubLine ) ? Style_Down : 0 ) );
- QRegion clip;
+ TQRegion clip;
if ( controls & SC_ScrollBarSubPage ) clip |= subpage;
if ( controls & SC_ScrollBarAddPage ) clip |= addpage;
if ( horizontal )
- clip |= QRect( slider.x(), 0, slider.width(), sb->height() );
+ clip |= TQRect( slider.x(), 0, slider.width(), sb->height() );
else
- clip |= QRect( 0, slider.y(), sb->width(), slider.height() );
+ clip |= TQRect( 0, slider.y(), sb->width(), slider.height() );
clip ^= slider;
p->setClipRegion( clip );
@@ -2183,17 +2183,17 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
if ( active & SC_ScrollBarSubLine )
{
if ( horizontal )
- p->setClipRect( QRect( addline.x(), addline.y(), addline.width() / 2, addline.height() ) );
+ p->setClipRect( TQRect( addline.x(), addline.y(), addline.width() / 2, addline.height() ) );
else
- p->setClipRect( QRect( addline.x(), addline.y(), addline.width(), addline.height() / 2 ) );
+ p->setClipRect( TQRect( addline.x(), addline.y(), addline.width(), addline.height() / 2 ) );
drawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
}
else if ( active & SC_ScrollBarAddLine )
{
if ( horizontal )
- p->setClipRect( QRect( addline.x() + addline.width() / 2, addline.y(), addline.width() / 2, addline.height() ) );
+ p->setClipRect( TQRect( addline.x() + addline.width() / 2, addline.y(), addline.width() / 2, addline.height() ) );
else
- p->setClipRect( QRect( addline.x(), addline.y() + addline.height() / 2, addline.width(), addline.height() / 2 ) );
+ p->setClipRect( TQRect( addline.x(), addline.y() + addline.height() / 2, addline.width(), addline.height() / 2 ) );
drawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
}
}
@@ -2207,11 +2207,11 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
// TOOLBUTTON
// -------------------------------------------------------------------
case CC_ToolButton: {
- const QToolButton *toolbutton = (const QToolButton *) widget;
- bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
+ const TQToolButton *toolbutton = (const TQToolButton *) widget;
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "TQToolBar" );
bool onExtender = !onToolbar &&
widget->parentWidget() && widget->parentWidget()->inherits( "QToolBarExtensionWidget") &&
- widget->parentWidget()->parentWidget()->inherits( "QToolBar" );
+ widget->parentWidget()->parentWidget()->inherits( "TQToolBar" );
bool onControlButtons = false;
if (!onToolbar && !onExtender && widget->parentWidget() &&
@@ -2221,7 +2221,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
titleBarMode = Maximized;
}
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -2237,7 +2237,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
bflags |= Style_MouseOver;
- if (onToolbar && static_cast<QToolBar*>(widget->parent())->orientation() == Qt::Horizontal)
+ if (onToolbar && static_cast<TQToolBar*>(widget->parent())->orientation() == Qt::Horizontal)
bflags |= Style_Horizontal;
if (controls & SC_ToolButton)
@@ -2258,7 +2258,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
toolbutton->parentWidget()->backgroundPixmap() &&
!toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- QPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (onToolbar)
@@ -2269,9 +2269,9 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
{
// This assumes floating toolbars can't have extenders,
//(so if we're on an extender, we're not floating)
- QWidget* parent = static_cast<QWidget*> (widget->parent());
- QToolBar* toolbar = static_cast<QToolBar*>(parent->parent());
- QRect tr = toolbar->rect();
+ TQWidget* parent = static_cast<TQWidget*> (widget->parent());
+ TQToolBar* toolbar = static_cast<TQToolBar*>(parent->parent());
+ TQRect tr = toolbar->rect();
bool horiz = toolbar->orientation() == Qt::Horizontal;
//Calculate offset. We do this by translating our coordinates,
@@ -2298,7 +2298,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
}
if (toolbutton->hasFocus() && !toolbutton->focusProxy()) {
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords(3, 3, -3, -3);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -2319,16 +2319,16 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
}
void KeramikStyle::drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
if (control == CC_ComboBox)
{
maskMode = true;
drawComplexControl(CC_ComboBox, p, widget, r,
- QApplication::palette().active(), Style_Default,
+ TQApplication::palette().active(), Style_Default,
SC_ComboBoxFrame,SC_None, opt);
maskMode = false;
@@ -2338,7 +2338,7 @@ void KeramikStyle::drawComplexControlMask( ComplexControl control,
}
-int KeramikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -2392,11 +2392,11 @@ int KeramikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
case PM_TabBarTabShiftVertical:
{
- const QTabBar* tb = ::qt_cast<const QTabBar*>(widget);
+ const TQTabBar* tb = ::qt_cast<const TQTabBar*>(widget);
if (tb)
{
- if (tb->shape() == QTabBar::RoundedBelow ||
- tb->shape() == QTabBar::TriangularBelow)
+ if (tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow)
return 0;
}
@@ -2413,10 +2413,10 @@ int KeramikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-QSize KeramikStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize KeramikStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch (contents)
{
@@ -2424,28 +2424,28 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
// ------------------------------------------------------------------
case CT_PushButton:
{
- const QPushButton* btn = static_cast< const QPushButton* >( widget );
+ const TQPushButton* btn = static_cast< const TQPushButton* >( widget );
int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget );
int h = contentSize.height() + 2 * pixelMetric( PM_ButtonMargin, widget );
- if ( btn->text().isEmpty() && contentSize.width() < 32 ) return QSize( w, h );
+ if ( btn->text().isEmpty() && contentSize.width() < 32 ) return TQSize( w, h );
//For some reason kcontrol no longer does this...
//if ( btn->isDefault() || btn->autoDefault() )
// w = QMAX( w, 40 );
- return QSize( w + 30, h + 5 ); //MX: No longer blank space -- can make a bit smaller
+ return TQSize( w + 30, h + 5 ); //MX: No longer blank space -- can make a bit smaller
}
case CT_ToolButton:
{
- bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "TQToolBar" );
if (!onToolbar) //Behaves like a button, so scale appropriately to the border
{
int w = contentSize.width();
int h = contentSize.height();
- return QSize( w + 12, h + 10 );
+ return TQSize( w + 12, h + 10 );
}
else
{
@@ -2455,8 +2455,8 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
case CT_ComboBox: {
int arrow = 11 + loader.size( keramik_ripple ).width();
- const QComboBox *cb = static_cast<const QComboBox*>( widget );
- return QSize( contentSize.width() + arrow + (cb->editable() ? 26 : 22),
+ const TQComboBox *cb = static_cast<const TQComboBox*>( widget );
+ return TQSize( contentSize.width() + arrow + (cb->editable() ? 26 : 22),
contentSize.height() + 10 );
}
@@ -2466,9 +2466,9 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = (const QPopupMenu *) widget;
+ const TQPopupMenu *popup = (const TQPopupMenu *) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -2496,7 +2496,7 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() )
h = QMAX( h, mi->iconSet()->pixmap(
- QIconSet::Small, QIconSet::Normal).height() +
+ TQIconSet::Small, TQIconSet::Normal).height() +
2 * itemFrame );
}
@@ -2514,7 +2514,7 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
default:
@@ -2523,16 +2523,16 @@ QSize KeramikStyle::sizeFromContents( ContentsType contents,
}
-QStyle::SubControl KeramikStyle::querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint& point,
- const QStyleOption& opt ) const
+TQStyle::SubControl KeramikStyle::querySubControl( ComplexControl control,
+ const TQWidget* widget,
+ const TQPoint& point,
+ const TQStyleOption& opt ) const
{
SubControl result = KStyle::querySubControl( control, widget, point, opt );
if ( control == CC_ScrollBar && result == SC_ScrollBarAddLine )
{
- QRect addline = querySubControlMetrics( control, widget, result, opt );
- if ( static_cast< const QScrollBar* >( widget )->orientation() == Horizontal )
+ TQRect addline = querySubControlMetrics( control, widget, result, opt );
+ if ( static_cast< const TQScrollBar* >( widget )->orientation() == Horizontal )
{
if ( point.x() < addline.center().x() ) result = SC_ScrollBarSubLine;
}
@@ -2541,10 +2541,10 @@ QStyle::SubControl KeramikStyle::querySubControl( ComplexControl control,
return result;
}
-QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch ( control )
{
@@ -2552,7 +2552,7 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
{
int arrow;
bool compact = false;
- if ( isSizeConstrainedCombo(static_cast<const QComboBox*>(widget) ) ) //### constant
+ if ( isSizeConstrainedCombo(static_cast<const TQComboBox*>(widget) ) ) //### constant
compact = true;
if ( compact )
@@ -2564,20 +2564,20 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
{
case SC_ComboBoxArrow:
if ( compact )
- return QRect( widget->width() - arrow - 7, 0, arrow + 6, widget->height() );
+ return TQRect( widget->width() - arrow - 7, 0, arrow + 6, widget->height() );
else
- return QRect( widget->width() - arrow - 14, 0, arrow + 13, widget->height() );
+ return TQRect( widget->width() - arrow - 14, 0, arrow + 13, widget->height() );
case SC_ComboBoxEditField:
{
if ( compact )
- return QRect( 2, 4, widget->width() - arrow - 2 - 7, widget->height() - 8 );
+ return TQRect( 2, 4, widget->width() - arrow - 2 - 7, widget->height() - 8 );
else if ( widget->width() < 36 || widget->height() < 22 )
- return QRect( 4, 3, widget->width() - arrow - 20, widget->height() - 6 );
- else if ( static_cast< const QComboBox* >( widget )->editable() )
- return QRect( 8, 4, widget->width() - arrow - 26, widget->height() - 11 );
+ return TQRect( 4, 3, widget->width() - arrow - 20, widget->height() - 6 );
+ else if ( static_cast< const TQComboBox* >( widget )->editable() )
+ return TQRect( 8, 4, widget->width() - arrow - 26, widget->height() - 11 );
else
- return QRect( 6, 4, widget->width() - arrow - 22, widget->height() - 9 );
+ return TQRect( 6, 4, widget->width() - arrow - 22, widget->height() - 9 );
}
case SC_ComboBoxListBoxPopup:
@@ -2585,7 +2585,7 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
//Note that the widget here == the combo, not the completion
//box, so we don't get any recursion
int suggestedWidth = widget->sizeHint().width();
- QRect def = opt.rect();
+ TQRect def = opt.rect();
def.addCoords( 4, -4, -6, 4 );
if ((def.width() - suggestedWidth < -12) && (def.width() < 80))
@@ -2601,7 +2601,7 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar* sb = static_cast< const QScrollBar* >( widget );
+ const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
bool horizontal = sb->orientation() == Horizontal;
int addline, subline, sliderpos, sliderlen, maxlen, slidermin;
if ( horizontal )
@@ -2630,28 +2630,28 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
switch ( subcontrol )
{
case SC_ScrollBarGroove:
- if ( horizontal ) return QRect( subline, 0, maxlen, sb->height() );
- else return QRect( 0, subline, sb->width(), maxlen );
+ if ( horizontal ) return TQRect( subline, 0, maxlen, sb->height() );
+ else return TQRect( 0, subline, sb->width(), maxlen );
case SC_ScrollBarSlider:
- if (horizontal) return QRect( sliderpos, 0, sliderlen, sb->height() );
- else return QRect( 0, sliderpos, sb->width(), sliderlen );
+ if (horizontal) return TQRect( sliderpos, 0, sliderlen, sb->height() );
+ else return TQRect( 0, sliderpos, sb->width(), sliderlen );
case SC_ScrollBarSubLine:
- if ( horizontal ) return QRect( 0, 0, subline, sb->height() );
- else return QRect( 0, 0, sb->width(), subline );
+ if ( horizontal ) return TQRect( 0, 0, subline, sb->height() );
+ else return TQRect( 0, 0, sb->width(), subline );
case SC_ScrollBarAddLine:
- if ( horizontal ) return QRect( sb->width() - addline, 0, addline, sb->height() );
- else return QRect( 0, sb->height() - addline, sb->width(), addline );
+ if ( horizontal ) return TQRect( sb->width() - addline, 0, addline, sb->height() );
+ else return TQRect( 0, sb->height() - addline, sb->width(), addline );
case SC_ScrollBarSubPage:
- if ( horizontal ) return QRect( subline, 0, sliderpos - subline, sb->height() );
- else return QRect( 0, subline, sb->width(), sliderpos - subline );
+ if ( horizontal ) return TQRect( subline, 0, sliderpos - subline, sb->height() );
+ else return TQRect( 0, subline, sb->width(), sliderpos - subline );
case SC_ScrollBarAddPage:
- if ( horizontal ) return QRect( sliderpos + sliderlen, 0, sb->width() - addline - (sliderpos + sliderlen) , sb->height() );
- else return QRect( 0, sliderpos + sliderlen, sb->width(), sb->height() - addline - (sliderpos + sliderlen)
+ if ( horizontal ) return TQRect( sliderpos + sliderlen, 0, sb->width() - addline - (sliderpos + sliderlen) , sb->height() );
+ else return TQRect( 0, sliderpos + sliderlen, sb->width(), sb->height() - addline - (sliderpos + sliderlen)
/*maxlen - sliderpos - sliderlen + subline - 5*/ );
default: break;
@@ -2660,9 +2660,9 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
}
case CC_Slider:
{
- const QSlider* sl = static_cast< const QSlider* >( widget );
+ const TQSlider* sl = static_cast< const TQSlider* >( widget );
bool horizontal = sl->orientation() == Horizontal;
- QSlider::TickSetting ticks = sl->tickmarks();
+ TQSlider::TickSetting ticks = sl->tickmarks();
int pos = sl->sliderStart();
int size = pixelMetric( PM_SliderControlThickness, widget );
int handleSize = pixelMetric( PM_SliderThickness, widget );
@@ -2682,36 +2682,36 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
case SC_SliderGroove:
if ( horizontal )
{
- if ( ticks == QSlider::Both )
- return QRect( 0, ( sl->height() - size ) / 2, sl->width(), size );
- else if ( ticks == QSlider::Above )
- return QRect( 0, sl->height() - size - ( handleSize - size ) / 2, sl->width(), size );
- return QRect( 0, ( handleSize - size ) / 2, sl->width(), size );
+ if ( ticks == TQSlider::Both )
+ return TQRect( 0, ( sl->height() - size ) / 2, sl->width(), size );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( 0, sl->height() - size - ( handleSize - size ) / 2, sl->width(), size );
+ return TQRect( 0, ( handleSize - size ) / 2, sl->width(), size );
}
else
{
- if ( ticks == QSlider::Both )
- return QRect( ( sl->width() - size ) / 2, 0, size, sl->height() );
- else if ( ticks == QSlider::Above )
- return QRect( sl->width() - size - ( handleSize - size ) / 2, 0, size, sl->height() );
- return QRect( ( handleSize - size ) / 2, 0, size, sl->height() );
+ if ( ticks == TQSlider::Both )
+ return TQRect( ( sl->width() - size ) / 2, 0, size, sl->height() );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( sl->width() - size - ( handleSize - size ) / 2, 0, size, sl->height() );
+ return TQRect( ( handleSize - size ) / 2, 0, size, sl->height() );
}
case SC_SliderHandle:
if ( horizontal )
{
- if ( ticks == QSlider::Both )
- return QRect( pos, ( sl->height() - handleSize ) / 2, len, handleSize );
- else if ( ticks == QSlider::Above )
- return QRect( pos, sl->height() - handleSize, len, handleSize );
- return QRect( pos, 0, len, handleSize );
+ if ( ticks == TQSlider::Both )
+ return TQRect( pos, ( sl->height() - handleSize ) / 2, len, handleSize );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( pos, sl->height() - handleSize, len, handleSize );
+ return TQRect( pos, 0, len, handleSize );
}
else
{
- if ( ticks == QSlider::Both )
- return QRect( ( sl->width() - handleSize ) / 2, pos, handleSize, len );
- else if ( ticks == QSlider::Above )
- return QRect( sl->width() - handleSize, pos, handleSize, len );
- return QRect( 0, pos, handleSize, len );
+ if ( ticks == TQSlider::Both )
+ return TQRect( ( sl->width() - handleSize ) / 2, pos, handleSize, len );
+ else if ( ticks == TQSlider::Above )
+ return TQRect( sl->width() - handleSize, pos, handleSize, len );
+ return TQRect( 0, pos, handleSize, len );
}
default: break;
}
@@ -2737,7 +2737,7 @@ QRect KeramikStyle::querySubControlMetrics( ComplexControl control,
#undef KeyRelease
#endif
-bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
+bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
if (KStyle::eventFilter( object, event ))
return true;
@@ -2745,53 +2745,53 @@ bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
if ( !object->isWidgetType() ) return false;
//Clear hover highlight when needed
- if ( (event->type() == QEvent::Leave) && (object == hoverWidget) )
+ if ( (event->type() == TQEvent::Leave) && (object == hoverWidget) )
{
- QWidget* button = static_cast<QWidget*>(object);
+ TQWidget* button = static_cast<TQWidget*>(object);
hoverWidget = 0;
button->repaint( false );
return false;
}
//Hover highlight on buttons, toolbuttons and combos
- if ( ::qt_cast<QPushButton*>(object) || ::qt_cast<QComboBox*>(object) || ::qt_cast<QToolButton*>(object) )
+ if ( ::qt_cast<TQPushButton*>(object) || ::qt_cast<TQComboBox*>(object) || ::qt_cast<TQToolButton*>(object) )
{
- if (event->type() == QEvent::Enter && static_cast<QWidget*>(object)->isEnabled() )
+ if (event->type() == TQEvent::Enter && static_cast<TQWidget*>(object)->isEnabled() )
{
- hoverWidget = static_cast<QWidget*>(object);
+ hoverWidget = static_cast<TQWidget*>(object);
hoverWidget->repaint( false );
}
return false;
}
//Combo line edits get special frames
- if ( event->type() == QEvent::Paint && ::qt_cast<QLineEdit*>(object) )
+ if ( event->type() == TQEvent::Paint && ::qt_cast<TQLineEdit*>(object) )
{
static bool recursion = false;
if (recursion )
return false;
recursion = true;
- object->event( static_cast< QPaintEvent* >( event ) );
- QWidget* widget = static_cast< QWidget* >( object );
- QPainter p( widget );
+ object->event( static_cast< TQPaintEvent* >( event ) );
+ TQWidget* widget = static_cast< TQWidget* >( object );
+ TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, widget->rect(),
- widget->palette().color( QPalette::Normal, QColorGroup::Button ),
+ widget->palette().color( TQPalette::Normal, TQColorGroup::Button ),
Qt::black, false, Keramik::TilePainter::PaintFullBlend);
recursion = false;
return true;
}
- else if ( ::qt_cast<QListBox*>(object) )
+ else if ( ::qt_cast<TQListBox*>(object) )
{
//Handle combobox drop downs
switch (event->type())
{
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
//Combo dropdowns are shaped
- case QEvent::Resize:
+ case TQEvent::Resize:
{
- QListBox* listbox = static_cast<QListBox*>(object);
- QResizeEvent* resize = static_cast<QResizeEvent*>(event);
+ TQListBox* listbox = static_cast<TQListBox*>(object);
+ TQResizeEvent* resize = static_cast<TQResizeEvent*>(event);
if (resize->size().height() < 6)
return false;
@@ -2810,23 +2810,23 @@ bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
break;
#endif
//Combo dropdowns get fancy borders
- case QEvent::Paint:
+ case TQEvent::Paint:
{
static bool recursion = false;
if (recursion )
return false;
- QListBox* listbox = (QListBox*) object;
- QPaintEvent* paint = (QPaintEvent*) event;
+ TQListBox* listbox = (TQListBox*) object;
+ TQPaintEvent* paint = (TQPaintEvent*) event;
if ( !listbox->contentsRect().contains( paint->rect() ) )
{
- QPainter p( listbox );
+ TQPainter p( listbox );
Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(),
- listbox->palette().color( QPalette::Normal, QColorGroup::Button ),
- listbox->palette().color( QPalette::Normal, QColorGroup::Background ) );
+ listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ),
+ listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) );
- QPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() );
+ TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() );
recursion = true;
object->event( &newpaint );
recursion = false;
@@ -2842,7 +2842,7 @@ bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
move ourselves to front of event filter list, and then capture the first release event, and if it's
in the overlap area, filter it out.
*/
- case QEvent::Show:
+ case TQEvent::Show:
//Prioritize ourselves to see the mouse events first
object->removeEventFilter(this);
object->installEventFilter(this);
@@ -2850,52 +2850,52 @@ bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
break;
//We need to filter some clicks out.
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if (firstComboPopupRelease)
{
firstComboPopupRelease = false;
- QMouseEvent* mev = static_cast<QMouseEvent*>(event);
- QListBox* box = static_cast<QListBox*> (object);
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>(event);
+ TQListBox* box = static_cast<TQListBox*> (object);
- QWidget* parent = box->parentWidget();
+ TQWidget* parent = box->parentWidget();
if (!parent)
return false;
- QPoint inParCoords = parent->mapFromGlobal(mev->globalPos());
+ TQPoint inParCoords = parent->mapFromGlobal(mev->globalPos());
if (parent->rect().contains(inParCoords))
return true;
}
break;
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick:
- case QEvent::Wheel:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::Wheel:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
firstComboPopupRelease = false;
default:
return false;
}
}
//Toolbar background gradient handling
- else if (event->type() == QEvent::Paint &&
+ else if (event->type() == TQEvent::Paint &&
object->parent() && !qstrcmp(object->name(), kdeToolbarWidget) )
{
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name.
- renderToolbarWidgetBackground(0, static_cast<QWidget*>(object));
+ renderToolbarWidgetBackground(0, static_cast<TQWidget*>(object));
return false; // Now draw the contents
}
- else if (event->type() == QEvent::Paint && object->parent() && ::qt_cast<QToolBar*>(object->parent())
- && !::qt_cast<QPopupMenu*>(object) )
+ else if (event->type() == TQEvent::Paint && object->parent() && ::qt_cast<TQToolBar*>(object->parent())
+ && !::qt_cast<TQPopupMenu*>(object) )
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
- QToolBar* toolbar = static_cast<QToolBar*>(object->parent());
- QWidget* widget = static_cast<QWidget*>(object);
- QRect wr = widget->rect (), tr = toolbar->rect();
- QPainter p( widget );
+ TQToolBar* toolbar = static_cast<TQToolBar*>(object->parent());
+ TQWidget* widget = static_cast<TQWidget*>(object);
+ TQRect wr = widget->rect (), tr = toolbar->rect();
+ TQPainter p( widget );
if ( toolbar->orientation() == Qt::Horizontal )
{
@@ -2921,9 +2921,9 @@ bool KeramikStyle::eventFilter( QObject* object, QEvent* event )
}
// Track show events for progress bars
- if ( animateProgressBar && ::qt_cast<QProgressBar*>(object) )
+ if ( animateProgressBar && ::qt_cast<TQProgressBar*>(object) )
{
- if ((event->type() == QEvent::Show) && !animationTimer->isActive())
+ if ((event->type() == TQEvent::Show) && !animationTimer->isActive())
{
animationTimer->start( 50, false );
}
diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h
index 1c1792fd3..76d099a5e 100644
--- a/kstyles/keramik/keramik.h
+++ b/kstyles/keramik/keramik.h
@@ -32,7 +32,7 @@
#ifndef __keramik_h__
#define __keramik_h__
-#include <qframe.h>
+#include <tqframe.h>
#include <kstyle.h>
#include "pixmaploader.h"
@@ -47,85 +47,85 @@ public:
KeramikStyle();
virtual ~KeramikStyle();
- void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup &cg, const QPopupMenu* ) const;
- QPixmap stylePixmap(StylePixmap stylepixmap, const QWidget* widget, const QStyleOption& opt) const;
+ void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg, const TQPopupMenu* ) const;
+ TQPixmap stylePixmap(StylePixmap stylepixmap, const TQWidget* widget, const TQStyleOption& opt) const;
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
- void polish( QPalette& );
- void polish( QApplication *app );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
+ void polish( TQPalette& );
+ void polish( TQApplication *app );
void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags = Style_Default,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
void drawControlMask( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
void drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControlMask( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- int pixelMetric( PixelMetric m, const QWidget* widget = 0 ) const;
+ int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const;
- QSize sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize& contentSize,
- const QStyleOption& opt ) const;
+ TQSize sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize& contentSize,
+ const TQStyleOption& opt ) const;
SubControl querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint& point,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ const TQWidget* widget,
+ const TQPoint& point,
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+ TQRect querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl subcontrol,
- const QStyleOption& opt = QStyleOption::Default ) const;
+ const TQStyleOption& opt = TQStyleOption::Default ) const;
private slots:
//Animation slots.
void updateProgressPos();
- void progressBarDestroyed(QObject* bar);
+ void progressBarDestroyed(TQObject* bar);
private:
- bool isSizeConstrainedCombo(const QComboBox* combo) const;
- bool isFormWidget (const QWidget* widget) const;
+ bool isSizeConstrainedCombo(const TQComboBox* combo) const;
+ bool isFormWidget (const TQWidget* widget) const;
///Configuration settings
bool animateProgressBar;
@@ -136,7 +136,7 @@ private:
mutable bool maskMode; //Ugly round trip flag to permit masking with little code;
mutable bool formMode; //Set when rendering form widgets
- mutable const QWidget* toolbarBlendWidget; //Ditto for blending with toolbars
+ mutable const TQWidget* toolbarBlendWidget; //Ditto for blending with toolbars
enum TitleBarMode
{
@@ -157,9 +157,9 @@ private:
bool firstComboPopupRelease;
//Animation support.
- QMap<QProgressBar*, int> progAnimWidgets;
+ TQMap<TQProgressBar*, int> progAnimWidgets;
- bool eventFilter( QObject* object, QEvent* event );
+ bool eventFilter( TQObject* object, TQEvent* event );
Keramik::TilePainter::PaintMode pmode() const
{
@@ -186,15 +186,15 @@ private:
return maskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend;
}
- QWidget* hoverWidget;
+ TQWidget* hoverWidget;
bool kickerMode;
// For progress bar animation
- QTimer *animationTimer;
+ TQTimer *animationTimer;
- QRect subRect(SubRect r, const QWidget *widget) const;
+ TQRect subRect(SubRect r, const TQWidget *widget) const;
// Disable copy constructor and = operator
KeramikStyle( const KeramikStyle& );
diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp
index b3c4a8c47..01cdf5fc6 100644
--- a/kstyles/keramik/pixmaploader.cpp
+++ b/kstyles/keramik/pixmaploader.cpp
@@ -20,13 +20,13 @@
// $Id$
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qglobal.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqglobal.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
#include "pixmaploader.h"
@@ -55,7 +55,7 @@ void PixmapLoader::clear()
//m_cache.clear();
}
-QImage* PixmapLoader::getDisabled(int name, const QColor& color, const QColor& back, bool blend)
+TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor& back, bool blend)
{
KeramikEmbedImage* edata = KeramikGetDbImage(name);
if (!edata)
@@ -64,7 +64,7 @@ QImage* PixmapLoader::getDisabled(int name, const QColor& color, const QColor& b
//Like getColored, but desaturate a bit, and lower gamma..
//Create a real image...
- QImage* img = new QImage(edata->width, edata->height, 32);
+ TQImage* img = new TQImage(edata->width, edata->height, 32);
@@ -148,14 +148,14 @@ QImage* PixmapLoader::getDisabled(int name, const QColor& color, const QColor& b
return img;
}
-QImage* PixmapLoader::getColored(int name, const QColor& color, const QColor& back, bool blend)
+TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor& back, bool blend)
{
KeramikEmbedImage* edata = KeramikGetDbImage(name);
if (!edata)
return 0;
//Create a real image...
- QImage* img = new QImage(edata->width, edata->height, 32);
+ TQImage* img = new TQImage(edata->width, edata->height, 32);
//OK, now, fill it in, using the color..
Q_UINT32 r, g,b;
@@ -247,13 +247,13 @@ QImage* PixmapLoader::getColored(int name, const QColor& color, const QColor& ba
return img;
}
-QPixmap PixmapLoader::pixmap( int name, const QColor& color, const QColor& bg, bool disabled, bool blend )
+TQPixmap PixmapLoader::pixmap( int name, const TQColor& color, const TQColor& bg, bool disabled, bool blend )
{
return scale(name, 0, 0, color, bg, disabled, blend);
}
-QPixmap PixmapLoader::scale( int name, int width, int height, const QColor& color, const QColor& bg, bool disabled, bool blend )
+TQPixmap PixmapLoader::scale( int name, int width, int height, const TQColor& color, const TQColor& bg, bool disabled, bool blend )
{
KeramikCacheEntry entry(name, color, bg, disabled, blend, width, height);
KeramikCacheEntry* cacheEntry;
@@ -269,8 +269,8 @@ QPixmap PixmapLoader::scale( int name, int width, int height, const QColor& colo
}
- QImage* img = 0;
- QPixmap* result = 0;
+ TQImage* img = 0;
+ TQPixmap* result = 0;
if (disabled)
img = getDisabled(name, color, bg, blend);
@@ -280,15 +280,15 @@ QPixmap PixmapLoader::scale( int name, int width, int height, const QColor& colo
if (!img)
{
KeramikCacheEntry* toAdd = new KeramikCacheEntry(entry);
- toAdd->m_pixmap = new QPixmap();
+ toAdd->m_pixmap = new TQPixmap();
m_pixmapCache.insert(key, toAdd, 16);
- return QPixmap();
+ return TQPixmap();
}
if (width == 0 && height == 0)
- result = new QPixmap(*img);
+ result = new TQPixmap(*img);
else
- result = new QPixmap(img->smoothScale( width ? width : img->width(),
+ result = new TQPixmap(img->smoothScale( width ? width : img->width(),
height ? height: img->height()));
delete img;
@@ -296,7 +296,7 @@ QPixmap PixmapLoader::scale( int name, int width, int height, const QColor& colo
toAdd->m_pixmap = result;
if (!m_pixmapCache.insert(key, toAdd, result->width()*result->height()*result->depth()/8)) {
- QPixmap toRet = *result;
+ TQPixmap toRet = *result;
delete toAdd;
return toRet;
}
@@ -304,15 +304,15 @@ QPixmap PixmapLoader::scale( int name, int width, int height, const QColor& colo
return *result;
}
-QSize PixmapLoader::size( int id )
+TQSize PixmapLoader::size( int id )
{
KeramikEmbedImage* edata = KeramikGetDbImage(id);
if (!edata)
- return QSize(0,0);
- return QSize(edata->width, edata->height);
+ return TQSize(0,0);
+ return TQSize(edata->width, edata->height);
}
-void TilePainter::draw( QPainter *p, int x, int y, int width, int height, const QColor& color, const QColor& bg, bool disabled, PaintMode mode )
+void TilePainter::draw( TQPainter *p, int x, int y, int width, int height, const TQColor& color, const TQColor& bg, bool disabled, PaintMode mode )
{
if (mode == PaintTrivialMask)
{
@@ -422,7 +422,7 @@ void TilePainter::draw( QPainter *p, int x, int y, int width, int height, const
}
else
{
- const QBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).mask();
+ const TQBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).mask();
if (mask)
{
p->setBackgroundColor(Qt::color0);
@@ -442,7 +442,7 @@ void TilePainter::draw( QPainter *p, int x, int y, int width, int height, const
}
else
{
- const QBitmap* mask = tile( col, row, color, bg, disabled, false ).mask();
+ const TQBitmap* mask = tile( col, row, color, bg, disabled, false ).mask();
if (mask)
{
p->setBackgroundColor(Qt::color0);
@@ -570,13 +570,13 @@ InactiveTabPainter::InactiveTabPainter( Mode mode, bool bottom )
tile.
*/
- Mode rightMost = QApplication::reverseLayout() ? First : Last;
+ Mode rightMost = TQApplication::reverseLayout() ? First : Last;
m_columns = (m_mode == rightMost ? 3 : 2);
}
int InactiveTabPainter::tileName( unsigned int column, unsigned int row ) const
{
- Mode leftMost = QApplication::reverseLayout() ? Last : First;
+ Mode leftMost = TQApplication::reverseLayout() ? Last : First;
if ( column == 0 && m_mode != leftMost )
return KeramikTileSeparator;
if ( m_bottom )
diff --git a/kstyles/keramik/pixmaploader.h b/kstyles/keramik/pixmaploader.h
index 28b2afd78..3ee17b2f0 100644
--- a/kstyles/keramik/pixmaploader.h
+++ b/kstyles/keramik/pixmaploader.h
@@ -22,9 +22,9 @@
#ifndef __pixmaploader_h__
#define __pixmaploader_h__
-#include <qintcache.h>
-#include <qdict.h>
-#include <qimage.h>
+#include <tqintcache.h>
+#include <tqdict.h>
+#include <tqimage.h>
class QPixmap;
class QImage;
@@ -38,12 +38,12 @@ namespace Keramik
public:
PixmapLoader();
- QPixmap pixmap( int name, const QColor& color, const QColor& bg,
+ TQPixmap pixmap( int name, const TQColor& color, const TQColor& bg,
bool disabled = false, bool blend = true );
- QPixmap scale( int name, int width, int height, const QColor& color, const QColor& bg,
+ TQPixmap scale( int name, int width, int height, const TQColor& color, const TQColor& bg,
bool disabled = false, bool blend = true );
- QSize size( int id );
+ TQSize size( int id );
void clear();
@@ -72,10 +72,10 @@ namespace Keramik
bool m_disabled;
bool m_blended;
- QPixmap* m_pixmap;
+ TQPixmap* m_pixmap;
- KeramikCacheEntry(int id, const QColor& color, const QColor& bg, bool disabled,
- bool blended, int width, int height, QPixmap* pixmap = 0 ):
+ KeramikCacheEntry(int id, const TQColor& color, const TQColor& bg, bool disabled,
+ bool blended, int width, int height, TQPixmap* pixmap = 0 ):
m_id(id), m_width(width), m_height(height), m_colorCode(color.rgb()),m_bgCode(bg.rgb()),
m_disabled(disabled), m_blended(blended), m_pixmap(pixmap)
{}
@@ -104,9 +104,9 @@ namespace Keramik
- QImage* getColored(int id, const QColor& color, const QColor& bg, bool blended);
- QImage* getDisabled(int id, const QColor& color, const QColor& bg, bool blended);
- QIntCache <KeramikCacheEntry> m_pixmapCache;
+ TQImage* getColored(int id, const TQColor& color, const TQColor& bg, bool blended);
+ TQImage* getDisabled(int id, const TQColor& color, const TQColor& bg, bool blended);
+ TQIntCache <KeramikCacheEntry> m_pixmapCache;
unsigned char clamp[540];
@@ -128,9 +128,9 @@ namespace Keramik
PaintTrivialMask
};
- void draw( QPainter *p, int x, int y, int width, int height, const QColor& color, const QColor& bg,
+ void draw( TQPainter *p, int x, int y, int width, int height, const TQColor& color, const TQColor& bg,
bool disabled = false, PaintMode mode = PaintNormal );
- void draw( QPainter *p, const QRect& rect, const QColor& color, const QColor& bg, bool disabled = false, PaintMode mode = PaintNormal )
+ void draw( TQPainter *p, const TQRect& rect, const TQColor& color, const TQColor& bg, bool disabled = false, PaintMode mode = PaintNormal )
{
draw( p, rect.x(), rect.y(), rect.width(), rect.height(), color, bg, disabled, mode );
}
@@ -188,9 +188,9 @@ namespace Keramik
}
- QPixmap tile( unsigned int column, unsigned int row, const QColor& color, const QColor& bg, bool disabled, bool blend)
+ TQPixmap tile( unsigned int column, unsigned int row, const TQColor& color, const TQColor& bg, bool disabled, bool blend)
{ return PixmapLoader::the().pixmap( absTileName( column, row ), color, bg, disabled, blend ); }
- QPixmap scale( unsigned int column, unsigned int row, int width, int height, const QColor& color, const QColor& bg,
+ TQPixmap scale( unsigned int column, unsigned int row, int width, int height, const TQColor& color, const TQColor& bg,
bool disabled, bool blend )
{ return PixmapLoader::the().scale( absTileName( column, row ), width, height, color,
bg, disabled, blend ); }
diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp
index e3796a079..6cac8b695 100644
--- a/kstyles/klegacy/klegacystyle.cpp
+++ b/kstyles/klegacy/klegacystyle.cpp
@@ -28,83 +28,83 @@
#include <kiconloader.h>
#define INCLUDE_MENUITEM_DEF
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qbuttongroup.h>
-#include <qcanvas.h>
-#include <qcheckbox.h>
-#include <qcolor.h>
-#include <qcolordialog.h>
-#include <qcombobox.h>
-#include <qdial.h>
-#include <qdialog.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qfiledialog.h>
-#include <qfileinfo.h>
-#include <qfont.h>
-#include <qfontdialog.h>
-#include <qframe.h>
-#include <qguardedptr.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qhbuttongroup.h>
-#include <qheader.h>
-#include <qhgroupbox.h>
-#include <qiconview.h>
-#include <qimage.h>
-#include <qinputdialog.h>
-#include <qintdict.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlcdnumber.h>
-#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmainwindow.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qmessagebox.h>
-#include <qmultilineedit.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qpopupmenu.h>
-#include <qprintdialog.h>
-#include <qprogressbar.h>
-#include <qprogressdialog.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qscrollbar.h>
-#include <qscrollview.h>
-#include <qsemimodal.h>
-#include <qsizegrip.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qsplitter.h>
-#include <qstatusbar.h>
-#include <qstring.h>
-#include <qtabbar.h>
-#include <qtabdialog.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqbuttongroup.h>
+#include <tqcanvas.h>
+#include <tqcheckbox.h>
+#include <tqcolor.h>
+#include <tqcolordialog.h>
+#include <tqcombobox.h>
+#include <tqdial.h>
+#include <tqdialog.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqfiledialog.h>
+#include <tqfileinfo.h>
+#include <tqfont.h>
+#include <tqfontdialog.h>
+#include <tqframe.h>
+#include <tqguardedptr.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqhbuttongroup.h>
+#include <tqheader.h>
+#include <tqhgroupbox.h>
+#include <tqiconview.h>
+#include <tqimage.h>
+#include <tqinputdialog.h>
+#include <tqintdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlcdnumber.h>
+#include <tqlineedit.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmainwindow.h>
+#include <tqmenubar.h>
+#include <tqmenudata.h>
+#include <tqmessagebox.h>
+#include <tqmultilineedit.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqpopupmenu.h>
+#include <tqprintdialog.h>
+#include <tqprogressbar.h>
+#include <tqprogressdialog.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqscrollbar.h>
+#include <tqscrollview.h>
+#include <tqsemimodal.h>
+#include <tqsizegrip.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqsplitter.h>
+#include <tqstatusbar.h>
+#include <tqstring.h>
+#include <tqtabbar.h>
+#include <tqtabdialog.h>
#include <qtableview.h>
-#include <qtabwidget.h>
-#include <qtextbrowser.h>
-#include <qtextstream.h>
-#include <qtextview.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
-#include <qwizard.h>
-#include <qworkspace.h>
+#include <tqtabwidget.h>
+#include <tqtextbrowser.h>
+#include <tqtextstream.h>
+#include <tqtextview.h>
+#include <tqtoolbar.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
+#include <tqwizard.h>
+#include <tqworkspace.h>
#include <stdlib.h>
#include <unistd.h>
@@ -118,8 +118,8 @@ class KLegacyImageData;
class GtkObject;
// declaration of hidden functions
-typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int,
- QMenuItem *, QColorGroup &, bool, bool);
+typedef void (TQStyle::*QDrawMenuBarItemImpl) (TQPainter *, int, int, int, int,
+ TQMenuItem *, TQColorGroup &, bool, bool);
extern QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl);
// the addresses of the integers are used to place things in the
@@ -134,11 +134,11 @@ static int checkmenuitem_ptr = 6;
static int radiomenuitem_ptr = 7;
static int eventbox_ptr = 8;
-// a QImage cache, since we need to resize some images to different sizes, we
+// a TQImage cache, since we need to resize some images to different sizes, we
// will cache them, to save the overhead of loading the image from disk each
// time it's needed
static const int imageCacheSize = 61;
-static QDict<QImage> *imageCache = 0;
+static TQDict<TQImage> *imageCache = 0;
class KLegacy {
@@ -205,12 +205,12 @@ class KLegacyImageData : public KLegacy {
public:
KLegacyImageDataKey key;
- QString file;
- QString detail;
- QString overlayFile;
- QString gapFile;
- QString gapStartFile;
- QString gapEndFile;
+ TQString file;
+ TQString detail;
+ TQString overlayFile;
+ TQString gapFile;
+ TQString gapStartFile;
+ TQString gapEndFile;
KLegacyBorder border;
KLegacyBorder overlayBorder;
@@ -233,17 +233,17 @@ public:
class KLegacyStyleData : public KLegacy {
public:
// name of this style
- QString name;
+ TQString name;
// font to use
- QFont *fn;
+ TQFont *fn;
// list of image datas (which tell us how to draw things)
QList<KLegacyImageData> imageList;
// background, foreground and base colors for the 5 widget
//states that Gtk defines
- QColor back[5], fore[5], base[5];
+ TQColor back[5], fore[5], base[5];
// reference count
int ref;
@@ -257,7 +257,7 @@ public:
};
-class GtkObject : public QObject {
+class GtkObject : public TQObject {
private:
KLegacyStyleData *d;
@@ -266,37 +266,37 @@ private:
public:
GtkObject(GtkObject *parent, const char *name)
- : QObject(parent, name)
+ : TQObject(parent, name)
{ d = 0; }
- GtkObject *find(QRegExp &) const;
+ GtkObject *find(TQRegExp &) const;
- QColor backColor(KLegacy::State);
- QColor baseColor(KLegacy::State);
- QColor foreColor(KLegacy::State);
+ TQColor backColor(KLegacy::State);
+ TQColor baseColor(KLegacy::State);
+ TQColor foreColor(KLegacy::State);
- QFont *font();
+ TQFont *font();
- inline QString styleName()
+ inline TQString styleName()
{ return styleData()->name; }
KLegacyStyleData *styleData();
KLegacyImageData *getImageData(KLegacyImageDataKey,
- const QString & = QString::null);
+ const TQString & = TQString::null);
- QPixmap *draw(KLegacyImageDataKey, int, int, const QString & = QString::null);
- QPixmap *draw(KLegacyImageData *, int, int);
+ TQPixmap *draw(KLegacyImageDataKey, int, int, const TQString & = TQString::null);
+ TQPixmap *draw(KLegacyImageData *, int, int);
};
-static QPixmap *drawImage(QImage *image, int width, int height,
+static TQPixmap *drawImage(TQImage *image, int width, int height,
KLegacyBorder border, bool scale)
{
if ((! image) || (image->isNull()) || (width < 1) || (height < 1)) {
- return (QPixmap *) 0;
+ return (TQPixmap *) 0;
}
- QPixmap *pixmap = new QPixmap(width, height);
+ TQPixmap *pixmap = new TQPixmap(width, height);
if (scale) {
if (width < 2) width = 2;
@@ -386,10 +386,10 @@ static QPixmap *drawImage(QImage *image, int width, int height,
// draw the image
bool mask = image->hasAlphaBuffer();
- QBitmap bm(width, height);
+ TQBitmap bm(width, height);
bm.fill(Qt::color1);
- QImage nimage[3][3];
+ TQImage nimage[3][3];
int xx = -1, yy = -1;
while (++yy < 3) {
xx = -1;
@@ -407,7 +407,7 @@ static QPixmap *drawImage(QImage *image, int width, int height,
0, 0, w2[xx], h2[yy], Qt::CopyROP);
if (mask) {
- QImage am = nimage[yy][xx].createAlphaMask();
+ TQImage am = nimage[yy][xx].createAlphaMask();
bitBlt(&bm, x2[xx], y2[yy], &am,
0, 0, w2[xx], h2[yy], Qt::CopyROP);
}
@@ -422,10 +422,10 @@ static QPixmap *drawImage(QImage *image, int width, int height,
bitBlt(pixmap, x, y, image, 0, 0, -1, -1, Qt::CopyROP);
if (image->hasAlphaBuffer()) {
- QImage mask = image->createAlphaMask();
+ TQImage mask = image->createAlphaMask();
if (! mask.isNull() && mask.depth() == 1) {
- QBitmap bm(width, height);
+ TQBitmap bm(width, height);
bm.fill(Qt::color1);
bm = mask;
pixmap->setMask(bm);
@@ -439,7 +439,7 @@ static QPixmap *drawImage(QImage *image, int width, int height,
// Generate an object tree for all the known Gtk widgets...
// returns a pointer to the bottom of the tree
-static GtkObject *initialize(QPtrDict<GtkObject> &dict) {
+static GtkObject *initialize(TQPtrDict<GtkObject> &dict) {
//
// auto generated stuff from :
// --
@@ -670,64 +670,64 @@ static GtkObject *initialize(QPtrDict<GtkObject> &dict) {
// sort | uniq > meta
//--
- dict.insert(QButton::staticMetaObject(), myGtkButton);
- dict.insert(QButtonGroup::staticMetaObject(), myGtkButtonBox);
- dict.insert(QCanvas::staticMetaObject(), myGtkDrawingArea);
- dict.insert(QCanvasView::staticMetaObject(), myGtkDrawingArea);
- dict.insert(QCheckBox::staticMetaObject(), myGtkCheckButton);
+ dict.insert(TQButton::staticMetaObject(), myGtkButton);
+ dict.insert(TQButtonGroup::staticMetaObject(), myGtkButtonBox);
+ dict.insert(TQCanvas::staticMetaObject(), myGtkDrawingArea);
+ dict.insert(TQCanvasView::staticMetaObject(), myGtkDrawingArea);
+ dict.insert(TQCheckBox::staticMetaObject(), myGtkCheckButton);
dict.insert(QColorDialog::staticMetaObject(), myGtkColorSelectionDialog);
- dict.insert(QComboBox::staticMetaObject(), myGtkCombo);
- dict.insert(QDial::staticMetaObject(), myGtkWidget);
- dict.insert(QDialog::staticMetaObject(), myGtkDialog);
- dict.insert(QFileDialog::staticMetaObject(), myGtkFileSelection);
+ dict.insert(TQComboBox::staticMetaObject(), myGtkCombo);
+ dict.insert(TQDial::staticMetaObject(), myGtkWidget);
+ dict.insert(TQDialog::staticMetaObject(), myGtkDialog);
+ dict.insert(TQFileDialog::staticMetaObject(), myGtkFileSelection);
dict.insert(QFontDialog::staticMetaObject(), myGtkFontSelectionDialog);
- dict.insert(QFrame::staticMetaObject(), myGtkFrame);
- dict.insert(QGrid::staticMetaObject(), myGtkFrame);
- dict.insert(QGroupBox::staticMetaObject(), myGtkBox);
- dict.insert(QHBox::staticMetaObject(), myGtkHBox);
- dict.insert(QHButtonGroup::staticMetaObject(), myGtkHButtonBox);
- dict.insert(QHGroupBox::staticMetaObject(), myGtkHBox);
- dict.insert(QHeader::staticMetaObject(), myGtkRuler);
- dict.insert(QIconView::staticMetaObject(), myGtkCTree);
+ dict.insert(TQFrame::staticMetaObject(), myGtkFrame);
+ dict.insert(TQGrid::staticMetaObject(), myGtkFrame);
+ dict.insert(TQGroupBox::staticMetaObject(), myGtkBox);
+ dict.insert(TQHBox::staticMetaObject(), myGtkHBox);
+ dict.insert(TQHButtonGroup::staticMetaObject(), myGtkHButtonBox);
+ dict.insert(TQHGroupBox::staticMetaObject(), myGtkHBox);
+ dict.insert(TQHeader::staticMetaObject(), myGtkRuler);
+ dict.insert(TQIconView::staticMetaObject(), myGtkCTree);
dict.insert(QInputDialog::staticMetaObject(), myGtkInputDialog);
- dict.insert(QLCDNumber::staticMetaObject(), myGtkFrame);
- dict.insert(QLabel::staticMetaObject(), myGtkLabel);
- dict.insert(QLineEdit::staticMetaObject(), myGtkEntry);
- dict.insert(QListBox::staticMetaObject(), myGtkCList);
- dict.insert(QListView::staticMetaObject(), myGtkCTree);
- dict.insert(QMainWindow::staticMetaObject(), myGtkWindow);
- dict.insert(QMenuBar::staticMetaObject(), myGtkMenuBar);
- dict.insert(QMessageBox::staticMetaObject(), myGtkDialog);
- dict.insert(QMultiLineEdit::staticMetaObject(), myGtkText);
- dict.insert(QPopupMenu::staticMetaObject(), myGtkMenu);
- dict.insert(QPrintDialog::staticMetaObject(), myGtkDialog);
- dict.insert(QProgressBar::staticMetaObject(), myGtkProgressBar);
- dict.insert(QProgressDialog::staticMetaObject(), myGtkDialog);
- dict.insert(QPushButton::staticMetaObject(), myGtkButton);
- dict.insert(QRadioButton::staticMetaObject(), myGtkRadioButton);
- dict.insert(QScrollBar::staticMetaObject(), myGtkScrollbar);
- dict.insert(QScrollView::staticMetaObject(), myGtkViewport);
- dict.insert(QSemiModal::staticMetaObject(), myGtkDialog);
- dict.insert(QSizeGrip::staticMetaObject(), myGtkWidget);
- dict.insert(QSlider::staticMetaObject(), myGtkScale);
- dict.insert(QSpinBox::staticMetaObject(), myGtkSpinButton);
- dict.insert(QSplitter::staticMetaObject(), myGtkPaned);
- dict.insert(QStatusBar::staticMetaObject(), myGtkStatusbar);
- dict.insert(QTabBar::staticMetaObject(), myGtkNotebook);
- dict.insert(QTabDialog::staticMetaObject(), myGtkNotebook);
- dict.insert(QTabWidget::staticMetaObject(), myGtkNotebook);
+ dict.insert(TQLCDNumber::staticMetaObject(), myGtkFrame);
+ dict.insert(TQLabel::staticMetaObject(), myGtkLabel);
+ dict.insert(TQLineEdit::staticMetaObject(), myGtkEntry);
+ dict.insert(TQListBox::staticMetaObject(), myGtkCList);
+ dict.insert(TQListView::staticMetaObject(), myGtkCTree);
+ dict.insert(TQMainWindow::staticMetaObject(), myGtkWindow);
+ dict.insert(TQMenuBar::staticMetaObject(), myGtkMenuBar);
+ dict.insert(TQMessageBox::staticMetaObject(), myGtkDialog);
+ dict.insert(TQMultiLineEdit::staticMetaObject(), myGtkText);
+ dict.insert(TQPopupMenu::staticMetaObject(), myGtkMenu);
+ dict.insert(TQPrintDialog::staticMetaObject(), myGtkDialog);
+ dict.insert(TQProgressBar::staticMetaObject(), myGtkProgressBar);
+ dict.insert(TQProgressDialog::staticMetaObject(), myGtkDialog);
+ dict.insert(TQPushButton::staticMetaObject(), myGtkButton);
+ dict.insert(TQRadioButton::staticMetaObject(), myGtkRadioButton);
+ dict.insert(TQScrollBar::staticMetaObject(), myGtkScrollbar);
+ dict.insert(TQScrollView::staticMetaObject(), myGtkViewport);
+ dict.insert(TQSemiModal::staticMetaObject(), myGtkDialog);
+ dict.insert(TQSizeGrip::staticMetaObject(), myGtkWidget);
+ dict.insert(TQSlider::staticMetaObject(), myGtkScale);
+ dict.insert(TQSpinBox::staticMetaObject(), myGtkSpinButton);
+ dict.insert(TQSplitter::staticMetaObject(), myGtkPaned);
+ dict.insert(TQStatusBar::staticMetaObject(), myGtkStatusbar);
+ dict.insert(TQTabBar::staticMetaObject(), myGtkNotebook);
+ dict.insert(TQTabDialog::staticMetaObject(), myGtkNotebook);
+ dict.insert(TQTabWidget::staticMetaObject(), myGtkNotebook);
dict.insert(QTableView::staticMetaObject(), myGtkTable);
- dict.insert(QTextBrowser::staticMetaObject(), myGtkText);
- dict.insert(QTextView::staticMetaObject(), myGtkText);
- dict.insert(QToolBar::staticMetaObject(), myGtkToolbar);
- dict.insert(QToolButton::staticMetaObject(), myGtkButton);
- dict.insert(QVBox::staticMetaObject(), myGtkVBox);
- dict.insert(QVButtonGroup::staticMetaObject(), myGtkVButtonBox);
- dict.insert(QVGroupBox::staticMetaObject(), myGtkVBox);
- dict.insert(QWidget::staticMetaObject(), myGtkWidget);
- dict.insert(QWidgetStack::staticMetaObject(), myGtkWidget);
- dict.insert(QWizard::staticMetaObject(), myGtkWindow);
- dict.insert(QWorkspace::staticMetaObject(), myGtkWindow);
+ dict.insert(TQTextBrowser::staticMetaObject(), myGtkText);
+ dict.insert(TQTextView::staticMetaObject(), myGtkText);
+ dict.insert(TQToolBar::staticMetaObject(), myGtkToolbar);
+ dict.insert(TQToolButton::staticMetaObject(), myGtkButton);
+ dict.insert(TQVBox::staticMetaObject(), myGtkVBox);
+ dict.insert(TQVButtonGroup::staticMetaObject(), myGtkVButtonBox);
+ dict.insert(TQVGroupBox::staticMetaObject(), myGtkVBox);
+ dict.insert(TQWidget::staticMetaObject(), myGtkWidget);
+ dict.insert(TQWidgetStack::staticMetaObject(), myGtkWidget);
+ dict.insert(TQWizard::staticMetaObject(), myGtkWindow);
+ dict.insert(TQWorkspace::staticMetaObject(), myGtkWindow);
// stuff that we don't have meta data for, but want to know about
dict.insert(&listboxitem_ptr, myGtkListItem);
@@ -744,7 +744,7 @@ static GtkObject *initialize(QPtrDict<GtkObject> &dict) {
}
-KLegacyImageData *GtkObject::getImageData(KLegacyImageDataKey key, const QString &detail) {
+KLegacyImageData *GtkObject::getImageData(KLegacyImageDataKey key, const TQString &detail) {
KLegacyImageData *imagedata = 0;
if (styleData()) {
@@ -803,7 +803,7 @@ KLegacyStyleData *GtkObject::styleData() {
}
-QColor GtkObject::backColor(KLegacy::State s) {
+TQColor GtkObject::backColor(KLegacy::State s) {
if ((! styleData()->back[s].isValid()) && parent()) {
return ((GtkObject *) parent())->backColor(s);
}
@@ -815,7 +815,7 @@ QColor GtkObject::backColor(KLegacy::State s) {
}
-QColor GtkObject::baseColor(KLegacy::State s) {
+TQColor GtkObject::baseColor(KLegacy::State s) {
if ((! styleData()->base[s].isValid()) && parent()) {
return ((GtkObject *) parent())->baseColor(s);
}
@@ -827,7 +827,7 @@ QColor GtkObject::baseColor(KLegacy::State s) {
}
-QColor GtkObject::foreColor(KLegacy::State s) {
+TQColor GtkObject::foreColor(KLegacy::State s) {
if ((! styleData()->fore[s].isValid()) && parent()) {
return ((GtkObject *) parent())->foreColor(s);
}
@@ -839,7 +839,7 @@ QColor GtkObject::foreColor(KLegacy::State s) {
}
-QFont *GtkObject::font() {
+TQFont *GtkObject::font() {
if ((! styleData()->fn) && parent()) {
return ((GtkObject *) parent())->font();
}
@@ -848,7 +848,7 @@ QFont *GtkObject::font() {
}
-GtkObject *GtkObject::find(QRegExp &r) const {
+GtkObject *GtkObject::find(TQRegExp &r) const {
// if the regular expression matches the name of this widget, return
if (r.match(name()) != -1) {
return (GtkObject *) this;
@@ -857,10 +857,10 @@ GtkObject *GtkObject::find(QRegExp &r) const {
// regex doesn't match us, and we have no children, return 0
if (! children()) return 0;
- QObject *o;
+ TQObject *o;
GtkObject *obj, *gobj;
- QObjectListIt ot(*children());
+ TQObjectListIt ot(*children());
// search our children to see if any match the regex
while ((o = ot.current()) != 0) {
@@ -890,8 +890,8 @@ GtkObject *GtkObject::find(QRegExp &r) const {
}
-QPixmap *GtkObject::draw(KLegacyImageDataKey key, int width, int height,
- const QString &detail)
+TQPixmap *GtkObject::draw(KLegacyImageDataKey key, int width, int height,
+ const TQString &detail)
{
KLegacyImageData *imagedata = getImageData(key, detail);
if (! imagedata) {
@@ -902,26 +902,26 @@ QPixmap *GtkObject::draw(KLegacyImageDataKey key, int width, int height,
}
-QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
- QString pixmapKey;
- QTextOStream(&pixmapKey) << "$KLegacy_Image_" << styleData()->name << "_" <<
+TQPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
+ TQString pixmapKey;
+ TQTextOStream(&pixmapKey) << "$KLegacy_Image_" << styleData()->name << "_" <<
className() << "_" << width << "x" << height << "_" <<
imagedata->key.cachekey << "_" << (uint) imagedata->recolorable <<
(uint) imagedata->stretch << (uint) imagedata->overlayStretch;
- QPixmap *pixmap = QPixmapCache::find(pixmapKey);
+ TQPixmap *pixmap = TQPixmapCache::find(pixmapKey);
if (pixmap) {
return pixmap;
}
- QPixmap *main = 0, *overlay = 0;
+ TQPixmap *main = 0, *overlay = 0;
if (! imagedata->file.isNull()) {
- QImage *image = imageCache->find(imagedata->file);
+ TQImage *image = imageCache->find(imagedata->file);
bool found = true;
if (! image) {
- image = new QImage(imagedata->file);
+ image = new TQImage(imagedata->file);
if (! image || image->isNull()) {
found = false;
@@ -938,11 +938,11 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
if (! imagedata->overlayFile.isNull()) {
- QImage *image = imageCache->find(imagedata->overlayFile);
+ TQImage *image = imageCache->find(imagedata->overlayFile);
bool found = true;
if (! image) {
- image = new QImage(imagedata->overlayFile);
+ image = new TQImage(imagedata->overlayFile);
if (! image || image->isNull()) {
found = false;
@@ -959,7 +959,7 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
}
- QSize sz;
+ TQSize sz;
if (main) {
sz = sz.expandedTo(main->size());
}
@@ -969,19 +969,19 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
if (sz.isEmpty()) {
- return (QPixmap *) 0;
+ return (TQPixmap *) 0;
}
- pixmap = new QPixmap(sz);
- pixmap->fill(QColor(192,192,176));
- QPainter p(pixmap);
+ pixmap = new TQPixmap(sz);
+ pixmap->fill(TQColor(192,192,176));
+ TQPainter p(pixmap);
if (main && (! main->isNull())) {
p.drawTiledPixmap(0, 0, sz.width(), sz.height(), *main);
}
if (overlay && (! overlay->isNull())) {
- QPoint pt((sz.width() - overlay->width()) / 2,
+ TQPoint pt((sz.width() - overlay->width()) / 2,
(sz.height() - overlay->height()) / 2);
p.drawPixmap(pt, *overlay);
}
@@ -990,9 +990,9 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
if (main) {
if (main->mask() && (! main->mask()->isNull())) {
- QBitmap bm(sz);
- QPainter m(&bm);
- QRect r(0, 0, width, height);
+ TQBitmap bm(sz);
+ TQPainter m(&bm);
+ TQRect r(0, 0, width, height);
m.drawTiledPixmap(r, *(main->mask()));
m.end();
@@ -1001,9 +1001,9 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
} else if (overlay) {
if (overlay->mask() && (! overlay->mask()->isNull())) {
- QBitmap bm(sz);
- QPainter m(&bm);
- QRect r((sz.width() - overlay->width()) / 2,
+ TQBitmap bm(sz);
+ TQPainter m(&bm);
+ TQRect r((sz.width() - overlay->width()) / 2,
(sz.height() - overlay->height()) / 2,
sz.width(), sz.height());
m.drawTiledPixmap(r, *(overlay->mask()));
@@ -1013,9 +1013,9 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
}
- if (! QPixmapCache::insert(pixmapKey, pixmap)) {
+ if (! TQPixmapCache::insert(pixmapKey, pixmap)) {
delete pixmap;
- pixmap = (QPixmap *) 0;
+ pixmap = (TQPixmap *) 0;
}
return pixmap;
@@ -1024,21 +1024,21 @@ QPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
class KLegacyStylePrivate : public KLegacy {
private:
- QDict<KLegacyStyleData> styleDict;
- QStringList pixmapPath;
- QTextStream filestream;
+ TQDict<KLegacyStyleData> styleDict;
+ TQStringList pixmapPath;
+ TQTextStream filestream;
- QFont oldfont;
- QPalette oldpalette;
+ TQFont oldfont;
+ TQPalette oldpalette;
// pointer to the widget under the pointer
- QGuardedPtr<QWidget> lastWidget;
+ TQGuardedPtr<TQWidget> lastWidget;
// current position of the mouse
- QPoint mousePos;
+ TQPoint mousePos;
bool hovering;
- QPtrDict<GtkObject> gtkDict;
+ TQPtrDict<GtkObject> gtkDict;
GtkObject *gtktree;
friend class KLegacyStyle;
@@ -1049,7 +1049,7 @@ public:
~KLegacyStylePrivate();
// parse the filename passed
- bool parse(const QString &filename);
+ bool parse(const TQString &filename);
bool parseClass();
bool parseEngine(KLegacyStyleData *);
@@ -1062,10 +1062,10 @@ public:
KLegacyStylePrivate::KLegacyStylePrivate()
: lastWidget(0), mousePos(-1, -1), hovering(false), gtktree(0)
{
- QPixmapCache::setCacheLimit(8192);
+ TQPixmapCache::setCacheLimit(8192);
if (! imageCache) {
- imageCache = new QDict<QImage>(imageCacheSize);
+ imageCache = new TQDict<TQImage>(imageCacheSize);
CHECK_PTR(imageCache);
imageCache->setAutoDelete(true);
@@ -1082,16 +1082,16 @@ KLegacyStylePrivate::KLegacyStylePrivate()
}
// get the path to this users .gtkrc
- QString gtkrcFilename = getenv("HOME");
+ TQString gtkrcFilename = getenv("HOME");
gtkrcFilename += "/.gtkrc";
- QFile gtkrc(gtkrcFilename);
+ TQFile gtkrc(gtkrcFilename);
if (gtkrc.open(IO_ReadOnly)) {
filestream.setDevice(&gtkrc);
while (! filestream.atEnd()) {
- QString next;
+ TQString next;
filestream >> next;
if (next.isNull()) continue;
@@ -1133,7 +1133,7 @@ KLegacyStylePrivate::~KLegacyStylePrivate() {
bool KLegacyStylePrivate::parseClass() {
if (filestream.atEnd()) return false;
- QString classname, keyword, stylename;
+ TQString classname, keyword, stylename;
filestream >> classname;
filestream >> keyword;
filestream >> stylename;
@@ -1147,7 +1147,7 @@ bool KLegacyStylePrivate::parseClass() {
classname = classname.mid(1, classname.length() - 2);
stylename = stylename.mid(1, stylename.length() - 2);
- QRegExp r(classname);
+ TQRegExp r(classname);
r.setWildcard(true);
GtkObject *obj = gtktree->find(r);
@@ -1177,7 +1177,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
return false;
}
- QString next, equals, parameter;
+ TQString next, equals, parameter;
filestream >> next;
// skip comments
@@ -1224,7 +1224,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
if (equals.isNull() || parameter.isNull() || equals != "=" ||
parameter != "{")
continue;
- QString border =filestream.readLine();
+ TQString border =filestream.readLine();
int lp, rp, tp, bp, l, r, t, b;
lp = border.find(',');
@@ -1263,9 +1263,9 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
parameter = parameter.mid(1, parameter.length() - 2);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = pixmapPath.begin(); it != pixmapPath.end(); ++it) {
- QFileInfo fileinfo((*it) + parameter);
+ TQFileInfo fileinfo((*it) + parameter);
if (fileinfo.exists()) {
imagedata->file = fileinfo.filePath();
@@ -1333,7 +1333,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
if (equals.isNull() || parameter.isNull() || equals != "=" ||
parameter != "{")
continue;
- QString border = filestream.readLine();
+ TQString border = filestream.readLine();
int lp, rp, tp, bp, l, r, t, b;
lp = border.find(',');
@@ -1362,9 +1362,9 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
parameter = parameter.mid(1, parameter.length() - 2);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = pixmapPath.begin(); it != pixmapPath.end(); ++it) {
- QFileInfo fileinfo((*it) + parameter);
+ TQFileInfo fileinfo((*it) + parameter);
if (fileinfo.exists()) {
imagedata->overlayFile = fileinfo.filePath();
@@ -1436,7 +1436,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
bool KLegacyStylePrivate::parseEngine(KLegacyStyleData *styledata) {
if (filestream.atEnd()) return false;
- QString enginename, paren;
+ TQString enginename, paren;
filestream >> enginename;
filestream >> paren;
@@ -1446,7 +1446,7 @@ bool KLegacyStylePrivate::parseEngine(KLegacyStyleData *styledata) {
return false;
}
- QString next;
+ TQString next;
int paren_count = 1;
while (paren_count) {
filestream >> next;
@@ -1477,7 +1477,7 @@ bool KLegacyStylePrivate::parsePixmapPath() {
return false;
}
- QString next;
+ TQString next;
filestream >> next;
if (next.isNull() || next[0] != '\"' || next[next.length() - 1] != '\"') {
@@ -1488,13 +1488,13 @@ bool KLegacyStylePrivate::parsePixmapPath() {
int start = 0, end = next.find(":");
while (end != -1) {
- QString path(next.mid(start, end - start));
+ TQString path(next.mid(start, end - start));
if (path[path.length() - 1] != '/') {
path += '/';
}
- QFileInfo fileinfo(path);
+ TQFileInfo fileinfo(path);
if (fileinfo.exists() && fileinfo.isDir()) {
pixmapPath.append(path);
}
@@ -1505,13 +1505,13 @@ bool KLegacyStylePrivate::parsePixmapPath() {
// get the straggler
end = next.length();
- QString path(next.mid(start, end - start));
+ TQString path(next.mid(start, end - start));
if (path[path.length() - 1] != '/') {
path += '/';
}
- QFileInfo fileinfo(path);
+ TQFileInfo fileinfo(path);
if (fileinfo.exists() && fileinfo.isDir()) {
pixmapPath.append(path);
}
@@ -1523,7 +1523,7 @@ bool KLegacyStylePrivate::parsePixmapPath() {
bool KLegacyStylePrivate::parseStyle() {
if (filestream.atEnd()) return false;
- QString stylename, paren;
+ TQString stylename, paren;
filestream >> stylename;
filestream >> paren;
@@ -1534,7 +1534,7 @@ bool KLegacyStylePrivate::parseStyle() {
stylename = stylename.mid(1, stylename.length() - 2);
if (paren == "=") {
- QString newstylename;
+ TQString newstylename;
filestream >> newstylename;
if (newstylename.isNull() ||
@@ -1561,7 +1561,7 @@ bool KLegacyStylePrivate::parseStyle() {
KLegacyStyleData *styledata = new KLegacyStyleData;
styledata->name = stylename;
- QString next, parameter;
+ TQString next, parameter;
int paren_count = 1;
while (paren_count) {
filestream >> next;
@@ -1577,7 +1577,7 @@ bool KLegacyStylePrivate::parseStyle() {
if (l < 1 || r < 1 || r < l) continue;
- QString mode = next.mid(l + 1, r - l - 1);
+ TQString mode = next.mid(l + 1, r - l - 1);
if (mode == "ACTIVE")
state = Active;
else if (mode == "NORMAL")
@@ -1595,12 +1595,12 @@ bool KLegacyStylePrivate::parseStyle() {
if (next.isNull() || parameter.isNull() || next != "=") continue;
if (parameter[0] == '\"') { // assume color of the form "#rrggbb"
- QString colorname = parameter.mid(1, parameter.length() - 2);
+ TQString colorname = parameter.mid(1, parameter.length() - 2);
if (colorname.isNull()) continue;
styledata->base[state].setNamedColor(colorname);
} else if (parameter == "{") { // assume color of the form { ri, gi, bi }
- QString color =filestream.readLine();
+ TQString color =filestream.readLine();
int rp, gp, bp;
float ri, gi, bi;
@@ -1623,7 +1623,7 @@ bool KLegacyStylePrivate::parseStyle() {
if (l < 1 || r < 1 || r < l) continue;
- QString mode = next.mid(l + 1, r - l - 1);
+ TQString mode = next.mid(l + 1, r - l - 1);
if (mode == "ACTIVE")
state = Active;
else if (mode == "NORMAL")
@@ -1641,12 +1641,12 @@ bool KLegacyStylePrivate::parseStyle() {
if (next.isNull() || parameter.isNull() || next != "=") continue;
if (parameter[0] == '\"') { // assume color of the form "#rrggbb"
- QString colorname = parameter.mid(1, parameter.length() - 2);
+ TQString colorname = parameter.mid(1, parameter.length() - 2);
if (colorname.isNull()) continue;
styledata->back[state].setNamedColor(colorname);
} else if (parameter == "{") { // assume color of the form { ri, gi, bi }
- QString color =filestream.readLine();
+ TQString color =filestream.readLine();
int rp, gp, bp;
float ri, gi, bi;
@@ -1672,7 +1672,7 @@ bool KLegacyStylePrivate::parseStyle() {
if (l < 1 || r < 1 || r < l) continue;
- QString mode = next.mid(l + 1, r - l - 1);
+ TQString mode = next.mid(l + 1, r - l - 1);
if (mode == "ACTIVE")
state = Active;
else if (mode == "NORMAL")
@@ -1690,12 +1690,12 @@ bool KLegacyStylePrivate::parseStyle() {
if (next.isNull() || parameter.isNull() || next != "=") continue;
if (parameter[0] == '\"') { // assume color of the form "#rrggbb"
- QString colorname = parameter.mid(1, parameter.length() - 2);
+ TQString colorname = parameter.mid(1, parameter.length() - 2);
if (colorname.isNull()) continue;
styledata->fore[state].setNamedColor(colorname);
} else if (parameter == "{") { // assume color of the form { ri, gi, bi }
- QString color = filestream.readLine();
+ TQString color = filestream.readLine();
int rp, gp, bp;
float ri, gi, bi;
@@ -1763,110 +1763,110 @@ int KLegacyStyle::defaultFrameWidth() const {
}
-void KLegacyStyle::polish(QApplication *app) {
+void KLegacyStyle::polish(TQApplication *app) {
priv->oldfont = app->font();
priv->oldpalette = app->palette();
- GtkObject *gobj = priv->gtkDict.find(QMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject());
if (gobj) {
if (gobj->font()) {
app->setFont(*gobj->font(), true);
}
- QPalette pal = app->palette();
- QBrush brush;
+ TQPalette pal = app->palette();
+ TQBrush brush;
// background
- brush = pal.brush(QPalette::Active, QColorGroup::Background);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Background);
brush.setColor(gobj->backColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Inactive, QColorGroup::Background);
+ brush = pal.brush(TQPalette::Inactive, TQColorGroup::Background);
brush.setColor(gobj->backColor(KLegacy::Normal));
- pal.setBrush(QPalette::Inactive, QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Inactive, TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Disabled, QColorGroup::Background);
+ brush = pal.brush(TQPalette::Disabled, TQColorGroup::Background);
brush.setColor(gobj->backColor(KLegacy::Insensitive));
- pal.setBrush(QPalette::Disabled, QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Disabled, TQColorGroup::Background, brush);
// foreground
- brush = pal.brush(QPalette::Active, QColorGroup::Foreground);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Foreground);
brush.setColor(gobj->foreColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::Foreground, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Foreground, brush);
- brush = pal.brush(QPalette::Inactive, QColorGroup::Foreground);
+ brush = pal.brush(TQPalette::Inactive, TQColorGroup::Foreground);
brush.setColor(gobj->foreColor(KLegacy::Normal));
- pal.setBrush(QPalette::Inactive, QColorGroup::Foreground, brush);
+ pal.setBrush(TQPalette::Inactive, TQColorGroup::Foreground, brush);
- brush = pal.brush(QPalette::Disabled, QColorGroup::Foreground);
+ brush = pal.brush(TQPalette::Disabled, TQColorGroup::Foreground);
brush.setColor(gobj->foreColor(KLegacy::Insensitive));
- pal.setBrush(QPalette::Disabled, QColorGroup::Foreground, brush);
+ pal.setBrush(TQPalette::Disabled, TQColorGroup::Foreground, brush);
// base
- brush = pal.brush(QPalette::Active, QColorGroup::Base);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Base);
brush.setColor(gobj->baseColor(KLegacy::Normal));
- pal.setBrush(QPalette::Active, QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Base, brush);
- brush = pal.brush(QPalette::Inactive, QColorGroup::Base);
+ brush = pal.brush(TQPalette::Inactive, TQColorGroup::Base);
brush.setColor(gobj->baseColor(KLegacy::Normal));
- pal.setBrush(QPalette::Inactive, QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Inactive, TQColorGroup::Base, brush);
- brush = pal.brush(QPalette::Disabled, QColorGroup::Base);
+ brush = pal.brush(TQPalette::Disabled, TQColorGroup::Base);
brush.setColor(gobj->baseColor(KLegacy::Normal));
- pal.setBrush(QPalette::Disabled, QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Disabled, TQColorGroup::Base, brush);
// button
- brush = pal.brush(QPalette::Active, QColorGroup::Button);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Button);
brush.setColor(gobj->backColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Button, brush);
- brush = pal.brush(QPalette::Normal, QColorGroup::Button);
+ brush = pal.brush(TQPalette::Normal, TQColorGroup::Button);
brush.setColor(gobj->backColor(KLegacy::Normal));
- pal.setBrush(QPalette::Normal, QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Normal, TQColorGroup::Button, brush);
- brush = pal.brush(QPalette::Disabled, QColorGroup::Button);
+ brush = pal.brush(TQPalette::Disabled, TQColorGroup::Button);
brush.setColor(gobj->backColor(KLegacy::Insensitive));
- pal.setBrush(QPalette::Disabled, QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Disabled, TQColorGroup::Button, brush);
// text
- brush = pal.brush(QPalette::Active, QColorGroup::Text);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Text);
brush.setColor(gobj->foreColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::Text, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Text, brush);
- brush = pal.brush(QPalette::Inactive, QColorGroup::Text);
+ brush = pal.brush(TQPalette::Inactive, TQColorGroup::Text);
brush.setColor(gobj->foreColor(KLegacy::Normal));
- pal.setBrush(QPalette::Inactive, QColorGroup::Text, brush);
+ pal.setBrush(TQPalette::Inactive, TQColorGroup::Text, brush);
- brush = pal.brush(QPalette::Disabled, QColorGroup::Text);
+ brush = pal.brush(TQPalette::Disabled, TQColorGroup::Text);
brush.setColor(gobj->foreColor(KLegacy::Insensitive));
- pal.setBrush(QPalette::Disabled, QColorGroup::Text, brush);
+ pal.setBrush(TQPalette::Disabled, TQColorGroup::Text, brush);
// highlight
- brush = pal.brush(QPalette::Active, QColorGroup::Highlight);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Highlight);
brush.setColor(gobj->backColor(KLegacy::Selected));
- pal.setBrush(QPalette::Active, QColorGroup::Highlight, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Highlight, brush);
- brush = pal.brush(QPalette::Active, QColorGroup::Highlight);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Highlight);
brush.setColor(gobj->backColor(KLegacy::Selected));
- pal.setBrush(QPalette::Active, QColorGroup::Highlight, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Highlight, brush);
- brush = pal.brush(QPalette::Active, QColorGroup::Highlight);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::Highlight);
brush.setColor(gobj->backColor(KLegacy::Selected));
- pal.setBrush(QPalette::Active, QColorGroup::Highlight, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::Highlight, brush);
// highlight text
- brush = pal.brush(QPalette::Active, QColorGroup::HighlightedText);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::HighlightedText);
brush.setColor(gobj->foreColor(KLegacy::Selected));
- pal.setBrush(QPalette::Active, QColorGroup::HighlightedText, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::HighlightedText, brush);
- brush = pal.brush(QPalette::Active, QColorGroup::HighlightedText);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::HighlightedText);
brush.setColor(gobj->foreColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::HighlightedText, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::HighlightedText, brush);
- brush = pal.brush(QPalette::Active, QColorGroup::HighlightedText);
+ brush = pal.brush(TQPalette::Active, TQColorGroup::HighlightedText);
brush.setColor(gobj->foreColor(KLegacy::Active));
- pal.setBrush(QPalette::Active, QColorGroup::HighlightedText, brush);
+ pal.setBrush(TQPalette::Active, TQColorGroup::HighlightedText, brush);
app->setPalette(pal, true);
}
@@ -1877,19 +1877,19 @@ void KLegacyStyle::polish(QApplication *app) {
}
-void KLegacyStyle::polish(QWidget *widget) {
+void KLegacyStyle::polish(TQWidget *widget) {
if (qstrcmp(widget->name(), "qt_viewport") == 0 ||
widget->testWFlags(WType_Popup) ||
widget->inherits("KDesktop"))
return;
- if (widget->backgroundMode() == QWidget::PaletteBackground ||
- widget->backgroundMode() == QWidget::PaletteButton &&
+ if (widget->backgroundMode() == TQWidget::PaletteBackground ||
+ widget->backgroundMode() == TQWidget::PaletteButton &&
(! widget->ownPalette()))
- widget->setBackgroundMode(QWidget::X11ParentRelative);
+ widget->setBackgroundMode(TQWidget::X11ParentRelative);
- QMetaObject *metaobject = 0;
- QString detail;
+ TQMetaObject *metaobject = 0;
+ TQString detail;
KLegacyImageDataKey key;
key.cachekey = 0;
@@ -1898,40 +1898,40 @@ void KLegacyStyle::polish(QWidget *widget) {
bool immediateRender = false;
bool bgPixmap = false;
- if (widget->inherits("QButton")) {
- metaobject = QButton::staticMetaObject();
+ if (widget->inherits("TQButton")) {
+ metaobject = TQButton::staticMetaObject();
eventFilter = true;
}
- if (widget->inherits("QComboBox")) {
- metaobject = QComboBox::staticMetaObject();
+ if (widget->inherits("TQComboBox")) {
+ metaobject = TQComboBox::staticMetaObject();
eventFilter = true;
}
- if (widget->inherits("QScrollBar")) {
- metaobject = QScrollBar::staticMetaObject();
+ if (widget->inherits("TQScrollBar")) {
+ metaobject = TQScrollBar::staticMetaObject();
eventFilter = true;
mouseTrack = true;
}
- if (widget->inherits("QMenuBar")) {
+ if (widget->inherits("TQMenuBar")) {
eventFilter = true;
immediateRender = true;
- metaobject = QMenuBar::staticMetaObject();
+ metaobject = TQMenuBar::staticMetaObject();
detail = "menubar";
key.data.function = KLegacy::Box;
key.data.shadow = KLegacy::Out;
key.data.state = KLegacy::Normal;
- ((QMenuBar *) widget)->setFrameShape(QFrame::StyledPanel);
- ((QMenuBar *) widget)->setLineWidth(0);
- widget->setBackgroundMode(QWidget::PaletteBackground);
+ ((TQMenuBar *) widget)->setFrameShape(TQFrame::StyledPanel);
+ ((TQMenuBar *) widget)->setLineWidth(0);
+ widget->setBackgroundMode(TQWidget::PaletteBackground);
}
- if (widget->inherits("QToolBar")) {
- metaobject = QToolBar::staticMetaObject();
+ if (widget->inherits("TQToolBar")) {
+ metaobject = TQToolBar::staticMetaObject();
eventFilter = true;
immediateRender = true;
@@ -1941,11 +1941,11 @@ void KLegacyStyle::polish(QWidget *widget) {
key.data.shadow = KLegacy::Out;
key.data.state = KLegacy::Normal;
- widget->setBackgroundMode(QWidget::PaletteBackground);
+ widget->setBackgroundMode(TQWidget::PaletteBackground);
}
- if (widget->inherits("QLineEdit")) {
- metaobject = QLineEdit::staticMetaObject();
+ if (widget->inherits("TQLineEdit")) {
+ metaobject = TQLineEdit::staticMetaObject();
eventFilter = true;
immediateRender = true;
@@ -1955,101 +1955,101 @@ void KLegacyStyle::polish(QWidget *widget) {
key.data.shadow = KLegacy::NoShadow;
key.data.state = (widget->isEnabled()) ? KLegacy::Normal : KLegacy::Insensitive;
- widget->setBackgroundMode(QWidget::PaletteBase);
+ widget->setBackgroundMode(TQWidget::PaletteBase);
}
if (widget->isTopLevel() || widget->inherits("QWorkspaceChild")) {
immediateRender = true;
bgPixmap = true;
- metaobject = QMainWindow::staticMetaObject();
+ metaobject = TQMainWindow::staticMetaObject();
key.cachekey = 0;
key.data.function = KLegacy::FlatBox;
detail = "base";
}
- if (widget->inherits("QPopupMenu")) {
+ if (widget->inherits("TQPopupMenu")) {
qDebug("polishing popup '%s'", widget->className());
- metaobject = QPopupMenu::staticMetaObject();
- widget->setBackgroundMode(QWidget::PaletteBackground);
+ metaobject = TQPopupMenu::staticMetaObject();
+ widget->setBackgroundMode(TQWidget::PaletteBackground);
}
GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject :
widget->metaObject()));
if (gobj) {
- if (gobj->font() && (*gobj->font() != QApplication::font()))
+ if (gobj->font() && (*gobj->font() != TQApplication::font()))
widget->setFont(*gobj->font());
if (immediateRender) {
- QPixmap *pix = gobj->draw(key, widget->width(), widget->height(), detail);
+ TQPixmap *pix = gobj->draw(key, widget->width(), widget->height(), detail);
if (pix && ! pix->isNull()) {
if (! bgPixmap) {
- QPalette pal = widget->palette();
- QBrush brush;
+ TQPalette pal = widget->palette();
+ TQBrush brush;
// base
// active
- brush = pal.brush(QPalette::Active,
- QColorGroup::Base);
+ brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Base, brush);
// inactive
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Base);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Base, brush);
// disabled
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Base);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Base, brush);
// background - button
// active
- brush = pal.brush(QPalette::Active,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Active,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Button, brush);
// inactive
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Button, brush);
// disabled
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Button, brush);
widget->setPalette(pal);
} else
@@ -2070,7 +2070,7 @@ void KLegacyStyle::polish(QWidget *widget) {
}
-void KLegacyStyle::polishPopupMenu(QPopupMenu *popup) {
+void KLegacyStyle::polishPopupMenu(TQPopupMenu *popup) {
KStyle::polishPopupMenu(popup);
popup->setMouseTracking(true);
@@ -2080,12 +2080,12 @@ void KLegacyStyle::polishPopupMenu(QPopupMenu *popup) {
}
-void KLegacyStyle::unPolish(QWidget *widget) {
+void KLegacyStyle::unPolish(TQWidget *widget) {
if (widget->inherits("KDesktop"))
return;
- widget->setBackgroundOrigin(QWidget::WidgetOrigin);
- widget->setBackgroundPixmap(QPixmap());
+ widget->setBackgroundOrigin(TQWidget::WidgetOrigin);
+ widget->setBackgroundPixmap(TQPixmap());
widget->removeEventFilter(this);
widget->unsetPalette();
widget->setAutoMask(false);
@@ -2093,7 +2093,7 @@ void KLegacyStyle::unPolish(QWidget *widget) {
}
-void KLegacyStyle::unPolish(QApplication *app) {
+void KLegacyStyle::unPolish(TQApplication *app) {
app->setFont(priv->oldfont, true);
app->setPalette(priv->oldpalette, true);
@@ -2103,16 +2103,16 @@ void KLegacyStyle::unPolish(QApplication *app) {
}
-void KLegacyStyle::drawKMenuItem(QPainter *p, int x, int y, int w, int h, const QColorGroup &g,
- bool active, QMenuItem *mi, QBrush *)
+void KLegacyStyle::drawKMenuItem(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g,
+ bool active, TQMenuItem *mi, TQBrush *)
{
- drawMenuBarItem(p, x, y, w, h, mi, (QColorGroup &) g,
+ drawMenuBarItem(p, x, y, w, h, mi, (TQColorGroup &) g,
(mi) ? mi->isEnabled() : false, active);
}
-void KLegacyStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, QMenuItem *mi,
- QColorGroup &g, bool enabled, bool active)
+void KLegacyStyle::drawMenuBarItem(TQPainter *p, int x, int y, int w, int h, TQMenuItem *mi,
+ TQColorGroup &g, bool enabled, bool active)
{
if (enabled && active) {
GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr);
@@ -2124,7 +2124,7 @@ void KLegacyStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, QMen
key.data.state = KLegacy::Prelight;
key.data.shadow = KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "menuitem");
+ TQPixmap *pix = gobj->draw(key, w, h, "menuitem");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
@@ -2136,18 +2136,18 @@ void KLegacyStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, QMen
}
-void KLegacyStyle::drawButton(QPainter *p, int x, int y , int w, int h,
- const QColorGroup &g, bool sunken, const QBrush *fill)
+void KLegacyStyle::drawButton(TQPainter *p, int x, int y , int w, int h,
+ const TQColorGroup &g, bool sunken, const TQBrush *fill)
{
drawBevelButton(p, x, y, w, h, g, sunken, fill);
}
-void KLegacyStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup & g, bool sunken,
- const QBrush *fill)
+void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup & g, bool sunken,
+ const TQBrush *fill)
{
- GtkObject *gobj = priv->gtkDict.find(QButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQButton::staticMetaObject());
if (! gobj) {
KStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill);
@@ -2160,7 +2160,7 @@ void KLegacyStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
key.data.shadow = (sunken) ? KLegacy::In : KLegacy::Out;
key.data.state = (sunken) ? KLegacy::Active : KLegacy::Normal;
- QPixmap *pix = gobj->draw(key, w, h, "button");
+ TQPixmap *pix = gobj->draw(key, w, h, "button");
if (pix && (! pix->isNull()))
p->drawPixmap(x, y, *pix);
@@ -2169,8 +2169,8 @@ void KLegacyStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
}
-void KLegacyStyle::drawPushButton(QPushButton *btn, QPainter *p) {
- GtkObject *gobj = priv->gtkDict.find(QPushButton::staticMetaObject());
+void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) {
+ GtkObject *gobj = priv->gtkDict.find(TQPushButton::staticMetaObject());
if (! gobj) {
KStyle::drawPushButton(btn, p);
@@ -2181,8 +2181,8 @@ void KLegacyStyle::drawPushButton(QPushButton *btn, QPainter *p) {
key.cachekey = 0;
key.data.function = KLegacy::Box;
- QColorGroup g = btn->colorGroup();
- QBrush fill = g.brush(QColorGroup::Button);
+ TQColorGroup g = btn->colorGroup();
+ TQBrush fill = g.brush(TQColorGroup::Button);
int x1, y1, x2, y2;
btn->rect().coords(&x1, &y1, &x2, &y2);
@@ -2191,7 +2191,7 @@ void KLegacyStyle::drawPushButton(QPushButton *btn, QPainter *p) {
key.data.state = (btn->isEnabled()) ? KLegacy::Normal : KLegacy::Insensitive;
key.data.shadow = KLegacy::In;
- QPixmap *pix = gobj->draw(key, x2 -x1 + 1, y2 - y1 + 1, "buttondefault");
+ TQPixmap *pix = gobj->draw(key, x2 -x1 + 1, y2 - y1 + 1, "buttondefault");
if (! pix)
pix = gobj->draw(key, x2 - x1 + 1, y2 - y1 + 1, "button");
@@ -2216,13 +2216,13 @@ void KLegacyStyle::drawPushButton(QPushButton *btn, QPainter *p) {
key.data.shadow = KLegacy::In;
} else {
key.data.state = ((btn->isEnabled()) ?
- ((static_cast<QWidget *>( btn ) == priv->lastWidget) ? KLegacy::Prelight : KLegacy::Normal) :
+ ((static_cast<TQWidget *>( btn ) == priv->lastWidget) ? KLegacy::Prelight : KLegacy::Normal) :
KLegacy::Insensitive);
key.data.shadow = ((btn->isOn() || btn->isDown()) ?
KLegacy::In : KLegacy::Out);
}
- QPixmap *pix = gobj->draw(key, x2 - x1 + 1, y2 - y1 + 1, "button");
+ TQPixmap *pix = gobj->draw(key, x2 - x1 + 1, y2 - y1 + 1, "button");
if (pix && ! pix->isNull())
p->drawPixmap(x1, y1, *pix);
@@ -2233,11 +2233,11 @@ void KLegacyStyle::drawPushButton(QPushButton *btn, QPainter *p) {
}
-void KLegacyStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, int state,
+void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, int state,
bool down, bool enabled)
{
- GtkObject *gobj = priv->gtkDict.find(QCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (! gobj) {
KStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled);
@@ -2248,9 +2248,9 @@ void KLegacyStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
key.cachekey = 0;
key.data.function = KLegacy::Check;
key.data.state = KLegacy::Normal;
- key.data.shadow = ((state != QButton::Off) || down) ? KLegacy::In : KLegacy::Out;
+ key.data.shadow = ((state != TQButton::Off) || down) ? KLegacy::In : KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "checkbutton");
+ TQPixmap *pix = gobj->draw(key, w, h, "checkbutton");
if (pix && (! pix->isNull()))
p->drawPixmap(x, y, *pix);
@@ -2259,8 +2259,8 @@ void KLegacyStyle::drawIndicator(QPainter *p, int x, int y, int w, int h,
}
-void KLegacyStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h, int state) {
- GtkObject *gobj = priv->gtkDict.find(QCheckBox::staticMetaObject());
+void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, int state) {
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (! gobj) {
KStyle::drawIndicatorMask(p, x, y, w, h, state);
@@ -2271,9 +2271,9 @@ void KLegacyStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h, in
key.cachekey = 0;
key.data.function = KLegacy::Check;
key.data.state = KLegacy::Normal;
- key.data.shadow = (state != QButton::Off) ? KLegacy::In : KLegacy::Out;
+ key.data.shadow = (state != TQButton::Off) ? KLegacy::In : KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "checkbutton");
+ TQPixmap *pix = gobj->draw(key, w, h, "checkbutton");
if (pix && pix->mask() && ! pix->mask()->isNull())
p->drawPixmap(x, y, *(pix->mask()));
@@ -2282,8 +2282,8 @@ void KLegacyStyle::drawIndicatorMask(QPainter *p, int x, int y, int w, int h, in
}
-QSize KLegacyStyle::indicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.find(QCheckBox::staticMetaObject());
+TQSize KLegacyStyle::indicatorSize(void) const {
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (! gobj) return KStyle::indicatorSize();
@@ -2295,7 +2295,7 @@ QSize KLegacyStyle::indicatorSize(void) const {
if (! id) return KStyle::indicatorSize();
- QString filename;
+ TQString filename;
if (! id->file.isNull())
filename = id->file;
else if (! id->overlayFile.isNull())
@@ -2303,24 +2303,24 @@ QSize KLegacyStyle::indicatorSize(void) const {
else
return KStyle::indicatorSize();
- QImage *image = imageCache->find(filename);
+ TQImage *image = imageCache->find(filename);
if (! image) {
- image = new QImage(filename);
+ image = new TQImage(filename);
if (! image) return KStyle::indicatorSize();
imageCache->insert(filename, image);
}
- return QSize(image->width(), image->height());
+ return TQSize(image->width(), image->height());
}
-void KLegacyStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool on,
+void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool on,
bool down, bool enabled)
{
- GtkObject *gobj = priv->gtkDict.find(QRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (! gobj) {
drawExclusiveIndicator(p, x, y, w, h, g, on, down, enabled);
@@ -2333,7 +2333,7 @@ void KLegacyStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, int
key.data.state = KLegacy::Normal;
key.data.shadow = (on || down) ? KLegacy::In : KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "radiobutton");
+ TQPixmap *pix = gobj->draw(key, w, h, "radiobutton");
if (pix && (! pix->isNull()))
p->drawPixmap(x, y, *pix);
@@ -2342,10 +2342,10 @@ void KLegacyStyle::drawExclusiveIndicator(QPainter *p, int x, int y, int w, int
}
-void KLegacyStyle::drawExclusiveIndicatorMask(QPainter *p, int x, int y, int w, int h,
+void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, int h,
bool on)
{
- GtkObject *gobj = priv->gtkDict.find(QRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (! gobj) {
KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on);
@@ -2358,7 +2358,7 @@ void KLegacyStyle::drawExclusiveIndicatorMask(QPainter *p, int x, int y, int w,
key.data.state = KLegacy::Normal;
key.data.shadow = (on) ? KLegacy::In : KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "radiobutton");
+ TQPixmap *pix = gobj->draw(key, w, h, "radiobutton");
if (pix && pix->mask() && ! pix->mask()->isNull())
p->drawPixmap(x, y, *(pix->mask()));
@@ -2367,8 +2367,8 @@ void KLegacyStyle::drawExclusiveIndicatorMask(QPainter *p, int x, int y, int w,
}
-QSize KLegacyStyle::exclusiveIndicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.find(QRadioButton::staticMetaObject());
+TQSize KLegacyStyle::exclusiveIndicatorSize(void) const {
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (! gobj) {
return KStyle::indicatorSize();
@@ -2382,7 +2382,7 @@ QSize KLegacyStyle::exclusiveIndicatorSize(void) const {
if (! id) return KStyle::indicatorSize();
- QString filename;
+ TQString filename;
if (! id->file.isNull()) {
filename = id->file;
} else if (! id->overlayFile.isNull()) {
@@ -2391,9 +2391,9 @@ QSize KLegacyStyle::exclusiveIndicatorSize(void) const {
return KStyle::indicatorSize();
}
- QImage *image = imageCache->find(filename);
+ TQImage *image = imageCache->find(filename);
if (! image) {
- image = new QImage(filename);
+ image = new TQImage(filename);
if (! image) {
return KStyle::indicatorSize();
@@ -2402,16 +2402,16 @@ QSize KLegacyStyle::exclusiveIndicatorSize(void) const {
imageCache->insert(filename, image);
}
- return QSize(image->width(), image->height());
+ return TQSize(image->width(), image->height());
}
-void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, int tab,
- QMenuItem *mi, const QPalette &pal, bool act,
+void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, int tab,
+ TQMenuItem *mi, const TQPalette &pal, bool act,
bool enabled, int x, int y, int w, int h)
{
- const QColorGroup & g = pal.active();
- QColorGroup itemg = (! enabled) ? pal.disabled() : pal.active();
+ const TQColorGroup & g = pal.active();
+ TQColorGroup itemg = (! enabled) ? pal.disabled() : pal.active();
if (checkable)
maxpmw = QMAX(maxpmw, 15);
@@ -2436,13 +2436,13 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
key.data.state = KLegacy::Prelight;
key.data.shadow = KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w, h, "menuitem");
+ TQPixmap *pix = gobj->draw(key, w, h, "menuitem");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
}
} else
- p->fillRect(x, y, w, h, g.brush( QColorGroup::Button ));
+ p->fillRect(x, y, w, h, g.brush( TQColorGroup::Button ));
if ( !mi )
return;
@@ -2450,26 +2450,26 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
if ( mi->isChecked() ) {
if ( mi->iconSet() ) {
qDrawShadePanel( p, x+2, y+2, checkcol, h-2*2,
- g, true, 1, &g.brush( QColorGroup::Midlight ) );
+ g, true, 1, &g.brush( TQColorGroup::Midlight ) );
}
} else if ( !act ) {
p->fillRect(x+2, y+2, checkcol, h-2*2,
- g.brush( QColorGroup::Button ));
+ g.brush( TQColorGroup::Button ));
}
if ( mi->iconSet() ) { // draw iconset
- QIconSet::Mode mode = (enabled) ? QIconSet::Normal : QIconSet::Disabled;
+ TQIconSet::Mode mode = (enabled) ? TQIconSet::Normal : TQIconSet::Disabled;
if (act && enabled)
- mode = QIconSet::Active;
+ mode = TQIconSet::Active;
- QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode);
+ TQPixmap pixmap = mi->iconSet()->pixmap(TQIconSet::Small, mode);
int pixw = pixmap.width();
int pixh = pixmap.height();
- QRect cr( x + 2, y+2, checkcol, h-2*2 );
- QRect pmr( 0, 0, pixw, pixh );
+ TQRect cr( x + 2, y+2, checkcol, h-2*2 );
+ TQRect pmr( 0, 0, pixw, pixh );
pmr.moveCenter(cr.center());
@@ -2486,7 +2486,7 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
p->setPen( g.buttonText() );
- QColor discol;
+ TQColor discol;
if (! enabled) {
discol = itemg.text();
p->setPen( discol );
@@ -2499,7 +2499,7 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
p->restore();
}
- QString s = mi->text();
+ TQString s = mi->text();
if ( !s.isNull() ) { // draw text
int t = s.find( '\t' );
int m = 2;
@@ -2511,7 +2511,7 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
p->drawText(x + checkcol + 4, y + 2, w - checkcol -tab - 3, h - 4,
text_flags, s, t);
} else if (mi->pixmap()) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
if (pixmap->depth() == 1) p->setBackgroundMode(OpaqueMode);
p->drawPixmap(x + checkcol + 2, y + 2, *pixmap);
@@ -2527,11 +2527,11 @@ void KLegacyStyle::drawPopupMenuItem(QPainter *p, bool checkable, int maxpmw, in
}
-void KLegacyStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool editable,
- bool enabled, const QBrush *b)
+void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool editable,
+ bool enabled, const TQBrush *b)
{
- GtkObject *gobj = priv->gtkDict.find(QComboBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject());
if (! gobj) {
KStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b);
@@ -2544,10 +2544,10 @@ void KLegacyStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
key.data.state = KLegacy::Normal;
key.data.shadow = KLegacy::Out;
- if (priv->lastWidget && priv->lastWidget->inherits("QComboBox"))
+ if (priv->lastWidget && priv->lastWidget->inherits("TQComboBox"))
key.data.state = KLegacy::Prelight;
- QPixmap *pix = gobj->draw(key, w, h, "optionmenu");
+ TQPixmap *pix = gobj->draw(key, w, h, "optionmenu");
if (pix && ! pix->isNull()) {
p->drawPixmap(x, y, *pix);
@@ -2556,7 +2556,7 @@ void KLegacyStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
return;
}
- QRect rect = comboButtonRect(x, y, w, h);
+ TQRect rect = comboButtonRect(x, y, w, h);
int tw = w - rect.width() - rect.right() - rect.left();
int th = rect.height();
@@ -2570,8 +2570,8 @@ void KLegacyStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
}
-QRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) {
- GtkObject *gobj = priv->gtkDict.find(QComboBox::staticMetaObject());
+TQRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) {
+ GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject());
if (! gobj) {
return KStyle::comboButtonRect(x, y, w, h);
@@ -2586,32 +2586,32 @@ QRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) {
return KStyle::comboButtonRect(x, y, w, h);
}
- return QRect(x + id->border.left() + 1, y + id->border.top() + 1,
+ return TQRect(x + id->border.left() + 1, y + id->border.top() + 1,
w - id->border.left() - id->border.right() - 18,
h - id->border.top() - id->border.bottom() - 2);
}
-QRect KLegacyStyle::comboButtonFocusRect(int x, int y, int w, int h) {
+TQRect KLegacyStyle::comboButtonFocusRect(int x, int y, int w, int h) {
return comboButtonRect(x, y, w, h);
}
-QStyle::ScrollControl KLegacyStyle::scrollBarPointOver(const QScrollBar *scrollbar,
- int sliderStart, const QPoint &p)
+TQStyle::ScrollControl KLegacyStyle::scrollBarPointOver(const TQScrollBar *scrollbar,
+ int sliderStart, const TQPoint &p)
{
- return QCommonStyle::scrollBarPointOver(scrollbar, sliderStart, p);
+ return TQCommonStyle::scrollBarPointOver(scrollbar, sliderStart, p);
}
-void KLegacyStyle::scrollBarMetrics(const QScrollBar *scrollbar, int &sliderMin,
+void KLegacyStyle::scrollBarMetrics(const TQScrollBar *scrollbar, int &sliderMin,
int &sliderMax, int &sliderLength, int &buttonDim)
{
int maxLength;
int b = defaultFrameWidth();
- int length = ((scrollbar->orientation() == QScrollBar::Horizontal) ?
+ int length = ((scrollbar->orientation() == TQScrollBar::Horizontal) ?
scrollbar->width() : scrollbar->height());
- int extent = ((scrollbar->orientation() == QScrollBar::Horizontal) ?
+ int extent = ((scrollbar->orientation() == TQScrollBar::Horizontal) ?
scrollbar->height() : scrollbar->width());
if (length > ((extent - (b * 2) - 1) * 2) + (b * 2))
@@ -2643,12 +2643,12 @@ void KLegacyStyle::scrollBarMetrics(const QScrollBar *scrollbar, int &sliderMin,
}
-void KLegacyStyle::drawScrollBarControls(QPainter *p, const QScrollBar *scrollbar,
+void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scrollbar,
int start, uint controls, uint active)
{
if (! scrollbar->isVisible()) return;
- GtkObject *gobj = priv->gtkDict.find(QScrollBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQScrollBar::staticMetaObject());
if (! gobj) {
KStyle::drawScrollBarControls(p, scrollbar, start, controls, active);
@@ -2674,7 +2674,7 @@ void KLegacyStyle::drawScrollBarControls(QPainter *p, const QScrollBar *scrollba
scrollBarMetrics(scrollbar, sliderMin, sliderMax, sliderLen, buttonDim);
// the rectangle for the slider
- QRect slider(
+ TQRect slider(
// x
((scrollbar->orientation() == Vertical) ?
defaultFrameWidth() : start),
@@ -2708,21 +2708,21 @@ void KLegacyStyle::drawScrollBarControls(QPainter *p, const QScrollBar *scrollba
return;
}
- QPixmap *groove_pm = gobj->draw(groove_id, scrollbar->width(), scrollbar->height());
+ TQPixmap *groove_pm = gobj->draw(groove_id, scrollbar->width(), scrollbar->height());
if ((! groove_pm) || (groove_pm->isNull())) {
groove_pm = 0;
}
- QPixmap *slider_pm = gobj->draw(slider_id, slider.width(), slider.height());
+ TQPixmap *slider_pm = gobj->draw(slider_id, slider.width(), slider.height());
if ((! slider_pm) || (slider_pm->isNull())) {
slider_pm = 0;
}
- QPixmap buf(scrollbar->size());
+ TQPixmap buf(scrollbar->size());
{
- QPainter p2(&buf);
+ TQPainter p2(&buf);
if (groove_pm) {
p2.drawTiledPixmap(scrollbar->rect(), *groove_pm);
@@ -2759,10 +2759,10 @@ void KLegacyStyle::drawScrollBarControls(QPainter *p, const QScrollBar *scrollba
}
-void KLegacyStyle::drawSlider(QPainter *p, int x, int y, int w, int h, const QColorGroup &g,
+void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g,
Orientation orientation, bool tickAbove, bool tickBelow)
{
- GtkObject *gobj = priv->gtkDict.find(QSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject());
if (! gobj) {
KStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow);
@@ -2776,7 +2776,7 @@ void KLegacyStyle::drawSlider(QPainter *p, int x, int y, int w, int h, const QCo
key.data.state = KLegacy::Normal;
key.data.orientation = orientation + 1;
- QPixmap *pix = gobj->draw(key, w, h, "slider");
+ TQPixmap *pix = gobj->draw(key, w, h, "slider");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
@@ -2786,10 +2786,10 @@ void KLegacyStyle::drawSlider(QPainter *p, int x, int y, int w, int h, const QCo
-void KLegacyStyle::drawSliderGroove(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, QCOORD c, Orientation o)
+void KLegacyStyle::drawSliderGroove(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, QCOORD c, Orientation o)
{
- GtkObject *gobj = priv->gtkDict.find(QSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject());
if (! gobj) {
KStyle::drawSliderGroove(p, x, y, w, h, g, c, o);
@@ -2803,7 +2803,7 @@ void KLegacyStyle::drawSliderGroove(QPainter *p, int x, int y, int w, int h,
key.data.state = KLegacy::Active;
key.data.orientation = o + 1;
- QPixmap *pix = gobj->draw(key, w, h, "trough");
+ TQPixmap *pix = gobj->draw(key, w, h, "trough");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
@@ -2812,9 +2812,9 @@ void KLegacyStyle::drawSliderGroove(QPainter *p, int x, int y, int w, int h,
}
-void KLegacyStyle::drawArrow(QPainter *p, ArrowType type, bool down,
+void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down,
int x, int y, int w, int h,
- const QColorGroup &g, bool enabled, const QBrush *b)
+ const TQColorGroup &g, bool enabled, const TQBrush *b)
{
GtkObject *gobj = priv->gtkDict.find(&arrow_ptr);
@@ -2831,11 +2831,11 @@ void KLegacyStyle::drawArrow(QPainter *p, ArrowType type, bool down,
key.data.arrowDirection = type + 1;
if ((! down) && priv->hovering &&
- QRect(x, y, w, h).contains(priv->mousePos)) {
+ TQRect(x, y, w, h).contains(priv->mousePos)) {
key.data.state = KLegacy::Prelight;
}
- QPixmap *pix = gobj->draw(key, w, h, "arrow");
+ TQPixmap *pix = gobj->draw(key, w, h, "arrow");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
@@ -2844,9 +2844,9 @@ void KLegacyStyle::drawArrow(QPainter *p, ArrowType type, bool down,
}
-void KLegacyStyle::drawMenuArrow(QPainter *p, ArrowType type, bool down,
+void KLegacyStyle::drawMenuArrow(TQPainter *p, ArrowType type, bool down,
int x, int y, int w, int h,
- const QColorGroup &g, bool enabled, const QBrush *b)
+ const TQColorGroup &g, bool enabled, const TQBrush *b)
{
GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr);
@@ -2862,7 +2862,7 @@ void KLegacyStyle::drawMenuArrow(QPainter *p, ArrowType type, bool down,
key.data.shadow = (down) ? KLegacy::In : KLegacy::NoShadow;
key.data.arrowDirection = type + 1;
- QPixmap *pix = gobj->draw(key, w, h, "arrow");
+ TQPixmap *pix = gobj->draw(key, w, h, "arrow");
if (pix && ! pix->isNull())
p->drawPixmap(x + ((w - pix->width()) / 2),
@@ -2872,24 +2872,24 @@ void KLegacyStyle::drawMenuArrow(QPainter *p, ArrowType type, bool down,
}
-void KLegacyStyle::drawPanel(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, int, const QBrush *brush)
+void KLegacyStyle::drawPanel(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, int, const TQBrush *brush)
{
KStyle::drawPanel(p, x, y, w, h, g, sunken, 1, brush);
}
-void KLegacyStyle::drawPopupPanel(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, int, const QBrush *fill)
+void KLegacyStyle::drawPopupPanel(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, int, const TQBrush *fill)
{
- QBrush brush = (fill) ? *fill : g.brush(QColorGroup::Background);
+ TQBrush brush = (fill) ? *fill : g.brush(TQColorGroup::Background);
p->fillRect(x, y, w, h, brush);
}
-void KLegacyStyle::drawCheckMark(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool activated, bool disabled)
+void KLegacyStyle::drawCheckMark(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool activated, bool disabled)
{
GtkObject *gobj = priv->gtkDict.find(&checkmenuitem_ptr);
@@ -2903,7 +2903,7 @@ void KLegacyStyle::drawCheckMark(QPainter *p, int x, int y, int w, int h,
key.data.function = KLegacy::Check;
key.data.shadow = (disabled) ? KLegacy::Out : KLegacy::In;
- QPixmap *pix = gobj->draw(key, w, h);
+ TQPixmap *pix = gobj->draw(key, w, h);
if (pix && (! pix->isNull())) {
x += (w - pix->width()) / 2;
@@ -2915,8 +2915,8 @@ void KLegacyStyle::drawCheckMark(QPainter *p, int x, int y, int w, int h,
}
-void KLegacyStyle::drawSplitter(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, Orientation orientation)
+void KLegacyStyle::drawSplitter(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, Orientation orientation)
{
if (orientation == Horizontal) {
int xpos = x + (w / 2);
@@ -2925,7 +2925,7 @@ void KLegacyStyle::drawSplitter(QPainter *p, int x, int y, int w, int h,
qDrawShadeLine(p, xpos, kpos + ksize - 1, xpos, h, g);
drawBevelButton(p, xpos - (splitterWidth() / 2) + 1, kpos, ksize, ksize,
- g, false, &g.brush(QColorGroup::Button));
+ g, false, &g.brush(TQColorGroup::Button));
qDrawShadeLine(p, xpos, 0, xpos, kpos, g);
} else {
int ypos = y + (h / 2);
@@ -2934,15 +2934,15 @@ void KLegacyStyle::drawSplitter(QPainter *p, int x, int y, int w, int h,
qDrawShadeLine(p, 0, ypos, kpos, ypos, g);
drawBevelButton(p, kpos, ypos - (splitterWidth() / 2) + 1, ksize, ksize,
- g, false, &g.brush(QColorGroup::Button));
+ g, false, &g.brush(TQColorGroup::Button));
qDrawShadeLine(p, kpos + ksize - 1, ypos, w, ypos, g);
}
}
-void KLegacyStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool selected)
+void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, bool selected)
{
- GtkObject *gobj = priv->gtkDict.find(QTabBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQTabBar::staticMetaObject());
if (! gobj) {
KStyle::drawTab(p, tabbar, tab, selected);
@@ -2954,8 +2954,8 @@ void KLegacyStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool s
key.data.function = KLegacy::Extension;
key.data.state = (! selected) ? KLegacy::Active : KLegacy::Normal;
key.data.shadow = KLegacy::Out;
- key.data.gapSide = (tabbar->shape() == QTabBar::RoundedAbove ||
- tabbar->shape() == QTabBar::TriangularAbove) ?
+ key.data.gapSide = (tabbar->shape() == TQTabBar::RoundedAbove ||
+ tabbar->shape() == TQTabBar::TriangularAbove) ?
KLegacy::Bottom : KLegacy::Top;
int ry = tab->r.top(), rh = tab->r.height();
@@ -2963,12 +2963,12 @@ void KLegacyStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool s
if (! selected) {
rh -= 2;
- if (tabbar->shape() == QTabBar::RoundedAbove ||
- tabbar->shape() == QTabBar::TriangularAbove)
+ if (tabbar->shape() == TQTabBar::RoundedAbove ||
+ tabbar->shape() == TQTabBar::TriangularAbove)
ry += 2;
}
- QPixmap *pix = gobj->draw(key, tab->r.width(), rh, "tab");
+ TQPixmap *pix = gobj->draw(key, tab->r.width(), rh, "tab");
if (pix && ! pix->isNull())
@@ -2978,10 +2978,10 @@ void KLegacyStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, bool s
}
-void KLegacyStyle::drawKBarHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, KToolBarPos type, QBrush *fill)
+void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, KToolBarPos type, TQBrush *fill)
{
- GtkObject *gobj = priv->gtkDict.find(QToolBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject());
if (! gobj) {
KStyle::drawKBarHandle(p, x, y, w, h, g, type, fill);
@@ -2996,37 +2996,37 @@ void KLegacyStyle::drawKBarHandle(QPainter *p, int x, int y, int w, int h,
key.data.orientation = (type == Left || type == Right) ?
Vertical + 1: Horizontal + 1;
- QPixmap *pix = gobj->draw(key, w, h, "handle");
+ TQPixmap *pix = gobj->draw(key, w, h, "handle");
if (pix && ! pix->isNull())
p->drawPixmap(x, y, *pix);
}
-void KLegacyStyle::drawKickerHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, QBrush *fill)
+void KLegacyStyle::drawKickerHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, TQBrush *fill)
{
drawKBarHandle(p, x, y, w, h, g, Left, fill);
}
-void KLegacyStyle::drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, QBrush *fill)
+void KLegacyStyle::drawKickerAppletHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, TQBrush *fill)
{
drawKBarHandle(p, x, y, w, h, g, Left, fill);
}
-void KLegacyStyle::drawKickerTaskButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, const QString &title,
- bool active, QPixmap *icon, QBrush *fill)
+void KLegacyStyle::drawKickerTaskButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, const TQString &title,
+ bool active, TQPixmap *icon, TQBrush *fill)
{
drawBevelButton(p, x, y, w, h, g, active, fill);
const int pxWidth = 20;
int textPos = pxWidth;
- QRect br(buttonRect(x, y, w, h));
+ TQRect br(buttonRect(x, y, w, h));
if (active)
p->translate(1,1);
@@ -3038,17 +3038,17 @@ void KLegacyStyle::drawKickerTaskButton(QPainter *p, int x, int y, int w, int h,
p->drawPixmap(br.x() + dx, dy, *icon);
}
- QString s(title);
+ TQString s(title);
- static const QString &modStr = KGlobal::staticQString(
- QString::fromUtf8("[") + i18n("modified") + QString::fromUtf8("]"));
+ static const TQString &modStr = KGlobal::staticQString(
+ TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"));
int modStrPos = s.find(modStr);
if (modStrPos != -1) {
s.remove(modStrPos, modStr.length()+1);
- QPixmap modPixmap = SmallIcon("modified");
+ TQPixmap modPixmap = SmallIcon("modified");
int dx = (pxWidth - modPixmap.width()) / 2;
int dy = (h - modPixmap.height()) / 2;
@@ -3075,14 +3075,14 @@ void KLegacyStyle::drawKickerTaskButton(QPainter *p, int x, int y, int w, int h,
}
-bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
+bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
switch (e->type()) {
- case QEvent::Resize:
+ case TQEvent::Resize:
{
- QWidget *w = (QWidget *) obj;
+ TQWidget *w = (TQWidget *) obj;
- if (w->inherits("QPopupMenu") && w->width() < 700) {
- GtkObject *gobj = priv->gtkDict.find(QPopupMenu::staticMetaObject());
+ if (w->inherits("TQPopupMenu") && w->width() < 700) {
+ GtkObject *gobj = priv->gtkDict.find(TQPopupMenu::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3091,68 +3091,68 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
key.data.state = KLegacy::Normal;
key.data.shadow = KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w->width(), w->height(), "menu");
+ TQPixmap *pix = gobj->draw(key, w->width(), w->height(), "menu");
if (pix && ! pix->isNull()) {
- QPalette pal = w->palette();
+ TQPalette pal = w->palette();
// active
- QBrush brush = pal.brush(QPalette::Active,
- QColorGroup::Background);
+ TQBrush brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Active,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Button, brush);
// inactive
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Button, brush);
// disabled
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Button, brush);
w->setPalette(pal);
}
}
} else if (w->isTopLevel() || w->inherits("QWorkspaceChild")) {
- GtkObject *gobj = priv->gtkDict.find(QMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
key.cachekey = 0;
key.data.function = KLegacy::FlatBox;
- QPixmap *p = gobj->draw(key, w->width(), w->height(), "base");
+ TQPixmap *p = gobj->draw(key, w->width(), w->height(), "base");
if (p && (! p->isNull()))
w->setBackgroundPixmap(*p);
}
- } else if (w->inherits("QLineEdit")) {
- GtkObject *gobj = priv->gtkDict.find(QLineEdit::staticMetaObject());
+ } else if (w->inherits("TQLineEdit")) {
+ GtkObject *gobj = priv->gtkDict.find(TQLineEdit::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3161,39 +3161,39 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
key.data.shadow = KLegacy::NoShadow;
key.data.state = (w->isEnabled()) ? KLegacy::Normal : KLegacy::Insensitive;
- QPixmap *pix = gobj->draw(key, w->width(), w->height(),
+ TQPixmap *pix = gobj->draw(key, w->width(), w->height(),
"entry_bg");
if (pix && (! pix->isNull())) {
- QPalette pal = w->palette();
+ TQPalette pal = w->palette();
// active
- QBrush brush = pal.brush(QPalette::Active,
- QColorGroup::Base);
+ TQBrush brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Base, brush);
// inactive
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Base);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Base, brush);
// disabled
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Base);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Base);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Base, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Base, brush);
w->setPalette(pal);
}
}
- } else if (w->inherits("QMenuBar") ||
- w->inherits("QToolBar")) {
- GtkObject *gobj = priv->gtkDict.find(QMenuBar::staticMetaObject());
+ } else if (w->inherits("TQMenuBar") ||
+ w->inherits("TQToolBar")) {
+ GtkObject *gobj = priv->gtkDict.find(TQMenuBar::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3202,49 +3202,49 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
key.data.state = KLegacy::Normal;
key.data.shadow = KLegacy::Out;
- QPixmap *pix = gobj->draw(key, w->width(), w->height(),
+ TQPixmap *pix = gobj->draw(key, w->width(), w->height(),
"menubar");
if (pix && (! pix->isNull())) {
- QPalette pal = w->palette();
+ TQPalette pal = w->palette();
// active
- QBrush brush = pal.brush(QPalette::Active,
- QColorGroup::Background);
+ TQBrush brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Active,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Active,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Active,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Active,
+ TQColorGroup::Button, brush);
// inactive
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Inactive,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Inactive,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Inactive,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Inactive,
+ TQColorGroup::Button, brush);
// disabled
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Background);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Background, brush);
- brush = pal.brush(QPalette::Disabled,
- QColorGroup::Button);
+ brush = pal.brush(TQPalette::Disabled,
+ TQColorGroup::Button);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Disabled,
- QColorGroup::Button, brush);
+ pal.setBrush(TQPalette::Disabled,
+ TQColorGroup::Button, brush);
w->setPalette(pal);
}
@@ -3254,67 +3254,67 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
break;
}
- case QEvent::Enter:
+ case TQEvent::Enter:
{
- if (obj->inherits("QPushButton") ||
- obj->inherits("QComboBox") ||
- obj->inherits("QSlider") ||
+ if (obj->inherits("TQPushButton") ||
+ obj->inherits("TQComboBox") ||
+ obj->inherits("TQSlider") ||
obj->inherits("QScrollbar")) {
- priv->lastWidget = (QWidget *) obj;
+ priv->lastWidget = (TQWidget *) obj;
priv->lastWidget->repaint(false);
- } else if (obj->inherits("QRadioButton")) {
- QWidget *w = (QWidget *) obj;
+ } else if (obj->inherits("TQRadioButton")) {
+ TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) {
- GtkObject *gobj = priv->gtkDict.find(QRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
key.cachekey = 0;
key.data.function = KLegacy::FlatBox;
- QPixmap *pix = gobj->draw(key, w->width(), w->height());
+ TQPixmap *pix = gobj->draw(key, w->width(), w->height());
if (pix && (! pix->isNull())) {
- QPalette pal = w->palette();
- QBrush brush = pal.brush(QPalette::Normal,
- QColorGroup::Background);
+ TQPalette pal = w->palette();
+ TQBrush brush = pal.brush(TQPalette::Normal,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Normal,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Normal,
+ TQColorGroup::Background, brush);
w->setPalette(pal);
- w->setBackgroundMode(QWidget::PaletteBackground);
- w->setBackgroundOrigin(QWidget::WidgetOrigin);
+ w->setBackgroundMode(TQWidget::PaletteBackground);
+ w->setBackgroundOrigin(TQWidget::WidgetOrigin);
}
}
}
- } else if (obj->inherits("QCheckBox")) {
- QWidget *w = (QWidget *) obj;
+ } else if (obj->inherits("TQCheckBox")) {
+ TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) {
- GtkObject *gobj = priv->gtkDict.find(QCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
key.cachekey = 0;
key.data.function = KLegacy::FlatBox;
- QPixmap *pix = gobj->draw(key, w->width(), w->height());
+ TQPixmap *pix = gobj->draw(key, w->width(), w->height());
if (pix && (! pix->isNull())) {
- QPalette pal = w->palette();
- QBrush brush = pal.brush(QPalette::Normal,
- QColorGroup::Background);
+ TQPalette pal = w->palette();
+ TQBrush brush = pal.brush(TQPalette::Normal,
+ TQColorGroup::Background);
brush.setPixmap(*pix);
- pal.setBrush(QPalette::Normal,
- QColorGroup::Background, brush);
+ pal.setBrush(TQPalette::Normal,
+ TQColorGroup::Background, brush);
w->setPalette(pal);
- w->setBackgroundMode(QWidget::PaletteBackground);
- w->setBackgroundOrigin(QWidget::WidgetOrigin);
+ w->setBackgroundMode(TQWidget::PaletteBackground);
+ w->setBackgroundOrigin(TQWidget::WidgetOrigin);
}
}
}
@@ -3323,18 +3323,18 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
break;
}
- case QEvent::Leave:
+ case TQEvent::Leave:
{
if (obj == priv->lastWidget) {
priv->lastWidget = 0;
- ((QWidget *) obj)->repaint(false);
- } else if (obj->inherits("QRadioButton") ||
- obj->inherits("QCheckBox")) {
- QWidget *w = (QWidget *) obj;
+ ((TQWidget *) obj)->repaint(false);
+ } else if (obj->inherits("TQRadioButton") ||
+ obj->inherits("TQCheckBox")) {
+ TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel()) {
- w->setBackgroundMode(QWidget::X11ParentRelative);
- w->setBackgroundOrigin(QWidget::WidgetOrigin);
+ w->setBackgroundMode(TQWidget::X11ParentRelative);
+ w->setBackgroundOrigin(TQWidget::WidgetOrigin);
w->repaint(true);
}
}
@@ -3342,14 +3342,14 @@ bool KLegacyStyle::eventFilter(QObject *obj, QEvent *e) {
break;
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- QMouseEvent *me = (QMouseEvent *) e;
+ TQMouseEvent *me = (TQMouseEvent *) e;
priv->mousePos = me->pos();
- if (obj->inherits("QScrollBar") &&
+ if (obj->inherits("TQScrollBar") &&
(! (me->state() & (LeftButton | MidButton | RightButton)))) {
priv->hovering = true;
- ((QWidget *) obj)->repaint(false);
+ ((TQWidget *) obj)->repaint(false);
priv->hovering = false;
}
diff --git a/kstyles/klegacy/klegacystyle.h b/kstyles/klegacy/klegacystyle.h
index c38e7ac80..ebe08e8db 100644
--- a/kstyles/klegacy/klegacystyle.h
+++ b/kstyles/klegacy/klegacystyle.h
@@ -39,99 +39,99 @@ public:
virtual int defaultFrameWidth() const;
- virtual void polish(QApplication *);
- virtual void polish(QWidget *);
- virtual void polishPopupMenu(QPopupMenu *);
- virtual void unPolish(QWidget *);
- virtual void unPolish(QApplication *);
+ virtual void polish(TQApplication *);
+ virtual void polish(TQWidget *);
+ virtual void polishPopupMenu(TQPopupMenu *);
+ virtual void unPolish(TQWidget *);
+ virtual void unPolish(TQApplication *);
// combo box
- virtual void drawComboButton(QPainter *, int, int, int, int, const QColorGroup &,
+ virtual void drawComboButton(TQPainter *, int, int, int, int, const TQColorGroup &,
bool = false, bool = false, bool = true,
- const QBrush * = 0);
- virtual QRect comboButtonRect(int, int, int, int);
- virtual QRect comboButtonFocusRect(int, int, int, int);
+ const TQBrush * = 0);
+ virtual TQRect comboButtonRect(int, int, int, int);
+ virtual TQRect comboButtonFocusRect(int, int, int, int);
// menubar items
- virtual void drawMenuBarItem(QPainter *, int, int, int, int, QMenuItem *,
- QColorGroup &, bool, bool);
- virtual void drawKMenuItem(QPainter *, int, int, int, int, const QColorGroup &, bool,
- QMenuItem *, QBrush * = 0);
+ virtual void drawMenuBarItem(TQPainter *, int, int, int, int, TQMenuItem *,
+ TQColorGroup &, bool, bool);
+ virtual void drawKMenuItem(TQPainter *, int, int, int, int, const TQColorGroup &, bool,
+ TQMenuItem *, TQBrush * = 0);
// toolbar stuffs
- virtual void drawKBarHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, KToolBarPos type, QBrush *fill = 0);
- virtual void drawKickerHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, QBrush *fill = 0);
- virtual void drawKickerAppletHandle(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, QBrush *fill = 0);
- virtual void drawKickerTaskButton(QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, const QString &title, bool active,
- QPixmap *icon = 0, QBrush *fill = 0);
+ virtual void drawKBarHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, KToolBarPos type, TQBrush *fill = 0);
+ virtual void drawKickerHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, TQBrush *fill = 0);
+ virtual void drawKickerAppletHandle(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, TQBrush *fill = 0);
+ virtual void drawKickerTaskButton(TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, const TQString &title, bool active,
+ TQPixmap *icon = 0, TQBrush *fill = 0);
// arrows
- virtual void drawArrow(QPainter *, ArrowType, bool, int, int, int, int,
- const QColorGroup &, bool, const QBrush * = 0);
+ virtual void drawArrow(TQPainter *, ArrowType, bool, int, int, int, int,
+ const TQColorGroup &, bool, const TQBrush * = 0);
// button stuffs
- virtual void drawButton(QPainter *, int, int, int, int, const QColorGroup &g,
- bool = false, const QBrush * = 0);
- virtual void drawPushButton(QPushButton *, QPainter *);
- virtual void drawBevelButton(QPainter *, int, int, int, int,
- const QColorGroup &, bool = false,
- const QBrush * = 0);
-
- // indicators (QCheckBox)
- virtual void drawCheckMark(QPainter *, int, int, int, int, const QColorGroup &,
+ virtual void drawButton(TQPainter *, int, int, int, int, const TQColorGroup &g,
+ bool = false, const TQBrush * = 0);
+ virtual void drawPushButton(TQPushButton *, TQPainter *);
+ virtual void drawBevelButton(TQPainter *, int, int, int, int,
+ const TQColorGroup &, bool = false,
+ const TQBrush * = 0);
+
+ // indicators (TQCheckBox)
+ virtual void drawCheckMark(TQPainter *, int, int, int, int, const TQColorGroup &,
bool = false, bool = true);
- virtual void drawIndicator(QPainter *, int, int, int, int, const QColorGroup &,
+ virtual void drawIndicator(TQPainter *, int, int, int, int, const TQColorGroup &,
int, bool = false, bool = true);
- virtual void drawIndicatorMask(QPainter *, int, int, int, int, int);
- virtual QSize indicatorSize(void) const;
+ virtual void drawIndicatorMask(TQPainter *, int, int, int, int, int);
+ virtual TQSize indicatorSize(void) const;
- // exclusive indicators (QRadioButton)
- virtual void drawExclusiveIndicator(QPainter *, int, int, int, int,
- const QColorGroup &, bool, bool = false,
+ // exclusive indicators (TQRadioButton)
+ virtual void drawExclusiveIndicator(TQPainter *, int, int, int, int,
+ const TQColorGroup &, bool, bool = false,
bool = true);
- virtual void drawExclusiveIndicatorMask(QPainter *, int, int, int, int, bool);
- virtual QSize exclusiveIndicatorSize(void) const;
+ virtual void drawExclusiveIndicatorMask(TQPainter *, int, int, int, int, bool);
+ virtual TQSize exclusiveIndicatorSize(void) const;
// popup menus
- virtual void drawPopupPanel(QPainter *, int, int, int, int, const QColorGroup &,
- int = 2, const QBrush * = 0);
- virtual void drawPopupMenuItem(QPainter *, bool, int, int, QMenuItem *,
- const QPalette &, bool, bool, int, int, int, int);
+ virtual void drawPopupPanel(TQPainter *, int, int, int, int, const TQColorGroup &,
+ int = 2, const TQBrush * = 0);
+ virtual void drawPopupMenuItem(TQPainter *, bool, int, int, TQMenuItem *,
+ const TQPalette &, bool, bool, int, int, int, int);
// scrollbars
- virtual ScrollControl scrollBarPointOver(const QScrollBar *, int, const QPoint &);
- virtual void scrollBarMetrics(const QScrollBar *, int &, int &, int &, int &);
- virtual void drawScrollBarControls(QPainter *, const QScrollBar *,
+ virtual ScrollControl scrollBarPointOver(const TQScrollBar *, int, const TQPoint &);
+ virtual void scrollBarMetrics(const TQScrollBar *, int &, int &, int &, int &);
+ virtual void drawScrollBarControls(TQPainter *, const TQScrollBar *,
int, uint, uint);
// sliders
- virtual void drawSlider(QPainter *, int , int , int , int ,
- const QColorGroup &, Orientation, bool, bool);
- virtual void drawSliderGroove(QPainter *, int, int, int, int, const QColorGroup &,
+ virtual void drawSlider(TQPainter *, int , int , int , int ,
+ const TQColorGroup &, Orientation, bool, bool);
+ virtual void drawSliderGroove(TQPainter *, int, int, int, int, const TQColorGroup &,
QCOORD, Orientation);
// panel
- virtual void drawPanel(QPainter *, int, int, int, int, const QColorGroup &,
- bool = false, int = 1, const QBrush * = 0);
+ virtual void drawPanel(TQPainter *, int, int, int, int, const TQColorGroup &,
+ bool = false, int = 1, const TQBrush * = 0);
// splitters
- virtual void drawSplitter(QPainter *, int, int, int, int,
- const QColorGroup &, Orientation);
+ virtual void drawSplitter(TQPainter *, int, int, int, int,
+ const TQColorGroup &, Orientation);
// tabs
- virtual void drawTab(QPainter *, const QTabBar *, QTab *, bool);
+ virtual void drawTab(TQPainter *, const TQTabBar *, TQTab *, bool);
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
- void drawMenuArrow(QPainter *, ArrowType, bool, int, int, int, int,
- const QColorGroup &, bool, const QBrush * = 0);
+ void drawMenuArrow(TQPainter *, ArrowType, bool, int, int, int, int,
+ const TQColorGroup &, bool, const TQBrush * = 0);
private:
diff --git a/kstyles/kthemestyle/kstyledirs.cpp b/kstyles/kthemestyle/kstyledirs.cpp
index b77d4d56b..7e548d0d5 100644
--- a/kstyles/kthemestyle/kstyledirs.cpp
+++ b/kstyles/kthemestyle/kstyledirs.cpp
@@ -1,7 +1,7 @@
/*
$Id$
- Simple helper routines for style's use of KStandardDirs with QSettings, etc.
+ Simple helper routines for style's use of KStandardDirs with TQSettings, etc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -21,7 +21,7 @@
This file is part of the KDE libraries
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include "kstyledirs.h"
@@ -37,12 +37,12 @@ KStyleDirs::~KStyleDirs()
{
}
-void KStyleDirs::addToSearch( const char* type, QSettings& s ) const
+void KStyleDirs::addToSearch( const char* type, TQSettings& s ) const
{
- const QStringList & dirs = resourceDirs(type);
+ const TQStringList & dirs = resourceDirs(type);
for ( int c = dirs.size()-1; c >= 0 ; c-- )
{
- s.insertSearchPath( QSettings::Unix, dirs[ c ]);
+ s.insertSearchPath( TQSettings::Unix, dirs[ c ]);
}
}
diff --git a/kstyles/kthemestyle/kstyledirs.h b/kstyles/kthemestyle/kstyledirs.h
index b23457a07..9d2635136 100644
--- a/kstyles/kthemestyle/kstyledirs.h
+++ b/kstyles/kthemestyle/kstyledirs.h
@@ -23,8 +23,8 @@
#define KSTYLE_DIRS_H
-#include <qsettings.h>
-#include <qstringlist.h>
+#include <tqsettings.h>
+#include <tqstringlist.h>
#include <kstandarddirs.h>
/**
@@ -34,7 +34,7 @@
* @version $Id$
*
* This class provides a this wrapper for styles around KStandardDirs,
-* permitting integration with QSettings and easy loading of pixmaps
+* permitting integration with TQSettings and easy loading of pixmaps
*
* It add share/apps/kstyle/themes as "themerc",
* share/apps/kstyle/pixmaps "themepixmap"
@@ -59,13 +59,13 @@ public:
Adds all of KDE directories of type type to the seach path of q.
For example, when one does the following:
- QSettings settings;
+ TQSettings settings;
KStyleDirs dirs;
dirs.addToSearch("config",settings);
The one can do settings.readEntry("kstyle/KDE/WidgetStyle") to access a settings in kstylerc.
*/
- void addToSearch( const char* type, QSettings& q) const; //Better name?
+ void addToSearch( const char* type, TQSettings& q) const; //Better name?
protected:
static KStyleDirs* instance;
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index bd463e28e..eb8bcc615 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -41,18 +41,18 @@
#include "kthemebase.h"
#include <kpixmapeffect.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
#include <stdlib.h>
-#include <qsettings.h>
-#include <qapplication.h>
-#include <qscrollbar.h>
+#include <tqsettings.h>
+#include <tqapplication.h>
+#include <tqscrollbar.h>
-typedef QMap<QString, QString> Prop;
+typedef TQMap<TQString, TQString> Prop;
-template class QIntCache<KThemePixmap>
+template class TQIntCache<KThemePixmap>
;
/*
@@ -61,13 +61,13 @@ Can't delete old slider image when calculating the rotated one for some reason.
*/
//Shamelessly stolen from KConfigBase
-static QColor readColorEntry( QSettings* s, const char *pKey,
- const QColor* pDefault )
+static TQColor readColorEntry( TQSettings* s, const char *pKey,
+ const TQColor* pDefault )
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
- QString aValue = s->readEntry( pKey );
+ TQString aValue = s->readEntry( pKey );
if ( !aValue.isEmpty() )
{
if ( aValue.at( 0 ) == '#' )
@@ -156,36 +156,36 @@ public:
/**
* Colors to override defaults with..
*/
- QColor overrideForegroundCol;
- QColor overrideBackgroundCol;
- QColor overrideSelectForegroundCol;
- QColor overrideSelectBackgroundCol;
- QColor overrideWindowForegroundCol;
- QColor overrideWindowBackgroundCol;
+ TQColor overrideForegroundCol;
+ TQColor overrideBackgroundCol;
+ TQColor overrideSelectForegroundCol;
+ TQColor overrideSelectBackgroundCol;
+ TQColor overrideWindowForegroundCol;
+ TQColor overrideWindowBackgroundCol;
int contrast;
- QMap <QString, QMap<QString, QString> > props;
+ TQMap <TQString, TQMap<TQString, TQString> > props;
- QMap<const QPixmap*, QColor> colorCache;
+ TQMap<const TQPixmap*, TQColor> colorCache;
/*
A heuristic routine that tries to determine the avergae color of the image
Wouldn't work for things like sliders, etc.
*/
- QColor pixmapAveColor( const QPixmap* p )
+ TQColor pixmapAveColor( const TQPixmap* p )
{
if ( colorCache.contains( p ) )
return colorCache[ p ];
- QImage to_ave = p->convertToImage();
+ TQImage to_ave = p->convertToImage();
double h = 0, s = 0, v = 0;
int count = 0;
int dh, ds, dv;
for ( int x = 0; x < p->width(); x++ )
{
- QColor pix( to_ave.pixel( x, p->height() / 2 ) );
+ TQColor pix( to_ave.pixel( x, p->height() / 2 ) );
pix.hsv( &dh, &ds, &dv );
h += dh;
s += ds;
@@ -195,14 +195,14 @@ public:
for ( int y = 0; y < p->height(); y++ )
{
- QColor pix( to_ave.pixel( p->width() / 2, y ) );
+ TQColor pix( to_ave.pixel( p->width() / 2, y ) );
pix.hsv( &dh, &ds, &dv );
h += dh;
s += ds;
v += dv;
count++;
}
- colorCache[ p ] = QColor( int( h / count + 0.5 ), int( s / count + 0.5 ), int( v / count + 0.5 ), QColor::Hsv );
+ colorCache[ p ] = TQColor( int( h / count + 0.5 ), int( s / count + 0.5 ), int( v / count + 0.5 ), TQColor::Hsv );
return colorCache[ p ];
}
};
@@ -237,9 +237,9 @@ void KThemeBase::generateBorderPix( int i )
if ( pbPixmaps[ i ] )
{
// evidently I have to do masks manually...
- const QBitmap * srcMask = pbPixmaps[ i ] ->mask();
- QBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
- QPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
+ const TQBitmap * srcMask = pbPixmaps[ i ] ->mask();
+ TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
+ TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, 0, pbWidth[ i ], pbWidth[ i ],
Qt::CopyROP, false );
@@ -338,8 +338,8 @@ void KThemeBase::generateBorderPix( int i )
}
-void KThemeBase::copyWidgetConfig( int sourceID, int destID, QString *pixnames,
- QString *brdnames )
+void KThemeBase::copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
+ TQString *brdnames )
{
scaleHints[ destID ] = scaleHints[ sourceID ];
gradients[ destID ] = gradients[ sourceID ];
@@ -349,17 +349,17 @@ void KThemeBase::copyWidgetConfig( int sourceID, int destID, QString *pixnames,
highlights[ destID ] = highlights[ sourceID ];
if ( grLowColors[ sourceID ] )
- grLowColors[ destID ] = new QColor( *grLowColors[ sourceID ] );
+ grLowColors[ destID ] = new TQColor( *grLowColors[ sourceID ] );
else
grLowColors[ destID ] = NULL;
if ( grHighColors[ sourceID ] )
- grHighColors[ destID ] = new QColor( *grHighColors[ sourceID ] );
+ grHighColors[ destID ] = new TQColor( *grHighColors[ sourceID ] );
else
grHighColors[ destID ] = NULL;
if ( colors[ sourceID ] )
- colors[ destID ] = new QColorGroup( *colors[ sourceID ] );
+ colors[ destID ] = new TQColorGroup( *colors[ sourceID ] );
else
colors[ destID ] = NULL;
@@ -413,17 +413,17 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
};
int i;
- QString tmpStr;
- QString pixnames[ WIDGETS ]; // used for duplicate check
- QString brdnames[ WIDGETS ];
+ TQString tmpStr;
+ TQString pixnames[ WIDGETS ]; // used for duplicate check
+ TQString brdnames[ WIDGETS ];
bool loaded[ WIDGETS ]; // used for preloading for CopyWidget
- QSettings config;
+ TQSettings config;
if (configDirName.isEmpty() || configDirName == ".")
{
KStyleDirs::dirs()->addToSearch( "themerc", config );
}
- else config.insertSearchPath( QSettings::Unix, configDirName );
+ else config.insertSearchPath( TQSettings::Unix, configDirName );
applyConfigFile( config );
@@ -442,7 +442,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
else
{
Prop& copyProp = d->props[ widgetEntries[ i ] ];
- copyProp[ "CopyWidget" ] = QString( widgetEntries[ i - INHERIT_ITEMS ] );
+ copyProp[ "CopyWidget" ] = TQString( widgetEntries[ i - INHERIT_ITEMS ] );
}
#endif
@@ -473,20 +473,20 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( pixmaps[ RotSliderGroove ] )
{
- QWMatrix r270; //TODO: 90 if reverse?
+ TQWMatrix r270; //TODO: 90 if reverse?
r270.rotate( 270 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotSliderGroove ], pixmaps[ RotSliderGroove ] ->xForm( r270 ) ); //
pixmaps[ RotSliderGroove ] = bf;
if ( images[ RotSliderGroove ] )
{
delete images[ RotSliderGroove ];
- images[ RotSliderGroove ] = new QImage( bf->convertToImage() );
+ images[ RotSliderGroove ] = new TQImage( bf->convertToImage() );
}
}
if ( pixmaps[ RotActiveTab ] )
{
- QWMatrix r180;
+ TQWMatrix r180;
r180.rotate( 180 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotActiveTab ], pixmaps[ RotActiveTab ] ->xForm( r180 ) );
@@ -494,13 +494,13 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( images[ RotActiveTab ] )
{
delete images[ RotActiveTab ];
- images[ RotActiveTab ] = new QImage( bf->convertToImage() );
+ images[ RotActiveTab ] = new TQImage( bf->convertToImage() );
}
}
if ( pixmaps[ RotInactiveTab ] )
{
- QWMatrix r180;
+ TQWMatrix r180;
r180.rotate( 180 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotInactiveTab ], pixmaps[ RotInactiveTab ] ->xForm( r180 ) );
@@ -508,7 +508,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( images[ RotInactiveTab ] )
{
delete images[ RotInactiveTab ];
- images[ RotInactiveTab ] = new QImage( bf->convertToImage() );
+ images[ RotInactiveTab ] = new TQImage( bf->convertToImage() );
}
}
@@ -522,7 +522,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
d->props.clear();
}
-KThemeBase::KThemeBase( const QString& dir, const QString & configFile )
+KThemeBase::KThemeBase( const TQString& dir, const TQString & configFile )
: KStyle( FilledFrameWorkaround ), configFileName( configFile )
{
d = new KThemeBasePrivate;
@@ -559,9 +559,9 @@ KThemeBase::KThemeBase( const QString& dir, const QString & configFile )
;
}
-void KThemeBase::applyConfigFile( QSettings& config )
+void KThemeBase::applyConfigFile( TQSettings& config )
{
- QStringList keys = config.entryList( configFileName );
+ TQStringList keys = config.entryList( configFileName );
if ( keys.contains( "foreground" ) )
{
@@ -651,10 +651,10 @@ KThemeBase::~KThemeBase()
delete d;
}
-QImage* KThemeBase::loadImage( const QString &name )
+TQImage* KThemeBase::loadImage( const TQString &name )
{
- QImage * image = new QImage;
- QString path = KStyleDirs::dirs()->findResource( "themepixmap",name );
+ TQImage * image = new QImage;
+ TQString path = KStyleDirs::dirs()->findResource( "themepixmap",name );
image->load( path );
if ( !image->isNull() )
return ( image );
@@ -663,10 +663,10 @@ QImage* KThemeBase::loadImage( const QString &name )
return ( NULL );
}
-KThemePixmap* KThemeBase::loadPixmap( const QString &name )
+KThemePixmap* KThemeBase::loadPixmap( const TQString &name )
{
KThemePixmap * pixmap = new KThemePixmap( false );
- QString path = KStyleDirs::dirs()->findResource( "themepixmap", name );
+ TQString path = KStyleDirs::dirs()->findResource( "themepixmap", name );
pixmap->load( path );
if ( !pixmap->isNull() )
return pixmap;
@@ -697,7 +697,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::FullScale, widget );
- QImage tmpImg = images[ widget ] ->smoothScale( w, h );
+ TQImage tmpImg = images[ widget ] ->smoothScale( w, h );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
if ( blends[ widget ] != 0.0 )
@@ -722,7 +722,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::HorizontalScale, widget );
- QImage tmpImg = images[ widget ] ->
+ TQImage tmpImg = images[ widget ] ->
smoothScale( w, images[ widget ] ->height() );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
@@ -748,7 +748,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::VerticalScale, widget );
- QImage tmpImg =
+ TQImage tmpImg =
images[ widget ] ->smoothScale( images[ widget ] ->width(), h );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
@@ -773,11 +773,11 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::FullScale, widget );
- QPixmap tile;
+ TQPixmap tile;
tile.convertFromImage( *images[ widget ] );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->resize( w, h );
- QPainter p( pixmaps[ widget ] );
+ TQPainter p( pixmaps[ widget ] );
p.drawTiledPixmap( 0, 0, w, h, tile );
if ( blends[ widget ] != 0.0 )
blend( widget );
@@ -801,14 +801,14 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
{
pixmap = new KThemePixmap();
pixmap->resize( w, h );
- QBitmap mask;
+ TQBitmap mask;
mask.resize( w, h );
mask.fill( color0 );
- QPainter mPainter;
+ TQPainter mPainter;
mPainter.begin( &mask );
- QPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
- const QBitmap *srcMask = tmp->mask();
+ TQPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
+ const TQBitmap *srcMask = tmp->mask();
int bdWidth = tmp->width();
bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
@@ -850,7 +850,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
- QPainter p;
+ TQPainter p;
p.begin( pixmap );
if ( w - bdWidth * 2 > 0 )
{
@@ -1014,8 +1014,8 @@ KThemePixmap* KThemeBase::gradient( int w, int h, WidgetType widget ) const
KPixmap s;
int offset = decoWidth( widget );
s.resize( w - offset * 2, h - offset * 2 );
- QColor lc( *grLowColors[ widget ] );
- QColor hc( *grHighColors[ widget ] );
+ TQColor lc( *grLowColors[ widget ] );
+ TQColor hc( *grHighColors[ widget ] );
if ( bevelContrast( widget ) )
{
int bc = bevelContrast( widget );
@@ -1088,7 +1088,7 @@ KThemePixmap* KThemeBase::scalePixmap( int w, int h, WidgetType widget ) const
return ( scale( w, h, widget ) );
}
-QColorGroup* KThemeBase::makeColorGroup( const QColor &fg, const QColor &bg,
+TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
Qt::GUIStyle )
{
if ( shading == Motif )
@@ -1096,82 +1096,82 @@ QColorGroup* KThemeBase::makeColorGroup( const QColor &fg, const QColor &bg,
int highlightVal, lowlightVal;
highlightVal = 100 + ( 2 * d->contrast + 4 ) * 16 / 10;
lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 );
- return ( new QColorGroup( fg, bg, bg.light( highlightVal ),
+ return ( new TQColorGroup( fg, bg, bg.light( highlightVal ),
bg.dark( lowlightVal ), bg.dark( 120 ),
- fg, QApplication::palette().active().base() ) );
+ fg, TQApplication::palette().active().base() ) );
}
else
- return ( new QColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
+ return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
bg.dark( 120 ), fg,
- QApplication::palette().active().base() ) );
+ TQApplication::palette().active().base() ) );
}
-void KThemeBase::applyMiscResourceGroup( QSettings *config )
+void KThemeBase::applyMiscResourceGroup( TQSettings *config )
{
#ifndef Q_WS_QWS //FIXME
d->props.erase( "Misc" ); // clear the old property
- QString base = configFileName + "Misc/";
+ TQString base = configFileName + "Misc/";
Prop& prop = d->props[ "Misc" ];
- QString tmpStr;
+ TQString tmpStr;
tmpStr = config->readEntry( base + "SButtonPosition" );
if ( tmpStr == "BottomLeft" )
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBBottomLeft );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBBottomLeft );
else if ( tmpStr == "BottomRight" )
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBBottomRight );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBBottomRight );
else
{
if ( tmpStr != "Opposite" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized sb button option %s, using Opposite.\n", tmpStr.latin1() );
;
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBOpposite );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBOpposite );
}
tmpStr = config->readEntry( base + "ArrowType" );
if ( tmpStr == "Small" )
- prop[ "ArrowType" ] = QString::number( ( int ) SmallArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) SmallArrow );
else if ( tmpStr == "3D" )
- prop[ "ArrowType" ] = QString::number( ( int ) MotifArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) MotifArrow );
else
{
if ( tmpStr != "Normal" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized arrow option %s, using Normal.\n", tmpStr.latin1() );
- prop[ "ArrowType" ] = QString::number( ( int ) LargeArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) LargeArrow );
}
tmpStr = config->readEntry( base + "ShadeStyle" );
if ( tmpStr == "Motif" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) Motif );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Motif );
else if ( tmpStr == "Next" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) Next );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Next );
else if ( tmpStr == "KDE" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) KDE );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) KDE );
else
- prop[ "ShadeStyle" ] = QString::number( ( int ) Windows );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Windows );
- prop[ "FrameWidth" ] = QString::number( config->readNumEntry( base + "FrameWidth", 2 ) );
- prop[ "Cache" ] = QString::number( config->readNumEntry( base + "Cache", 1024 ) );
- prop[ "ScrollBarExtent" ] = QString::number( config->readNumEntry( base + "ScrollBarExtent", 16 ) );
+ prop[ "FrameWidth" ] = TQString::number( config->readNumEntry( base + "FrameWidth", 2 ) );
+ prop[ "Cache" ] = TQString::number( config->readNumEntry( base + "Cache", 1024 ) );
+ prop[ "ScrollBarExtent" ] = TQString::number( config->readNumEntry( base + "ScrollBarExtent", 16 ) );
#endif
}
-static int readNumEntry( Prop& prop, QString setting, int def )
+static int readNumEntry( Prop& prop, TQString setting, int def )
{
bool ok;
- QString s_val = prop[ setting ];
+ TQString s_val = prop[ setting ];
int val = s_val.toInt( &ok );
if ( ok )
return val;
return def;
}
-static QColor readColorEntry( Prop& prop, QString setting, const QColor& def )
+static TQColor readColorEntry( Prop& prop, TQString setting, const TQColor& def )
{
- QString s_val = prop[ setting ];
+ TQString s_val = prop[ setting ];
if ( !s_val.isEmpty() )
{
- QColor c( s_val );
+ TQColor c( s_val );
return c;
}
return def;
@@ -1194,16 +1194,16 @@ void KThemeBase::readMiscResourceGroup()
}
-void KThemeBase::applyResourceGroup( QSettings *config, int i )
+void KThemeBase::applyResourceGroup( TQSettings *config, int i )
{
#ifndef Q_WS_QWS //FIXME
- QString tmpStr;
+ TQString tmpStr;
int tmpVal;
// clear the old property
d->props.erase( widgetEntries[ i ] );
- QString base = configFileName + widgetEntries[ i ] + "/";
+ TQString base = configFileName + widgetEntries[ i ] + "/";
Prop& prop = d->props[ widgetEntries[ i ] ];
@@ -1227,7 +1227,7 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
qWarning( "KThemeBase: Unrecognized scale option %s, using Tile.\n", tmpStr.latin1() );
tmpVal = ( int ) TileScale;
}
- prop[ "ScaleHint" ] = QString::number( tmpVal );
+ prop[ "ScaleHint" ] = TQString::number( tmpVal );
// Gradient type
tmpStr = config->readEntry( base + "Gradient" );
@@ -1251,41 +1251,41 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
qWarning( "KThemeBase: Unrecognized gradient option %s, using None.\n", tmpStr.latin1() );
tmpVal = ( int ) GrNone;
}
- prop[ "Gradient" ] = QString::number( tmpVal );
+ prop[ "Gradient" ] = TQString::number( tmpVal );
// Blend intensity
tmpStr.setNum( config->readDoubleEntry( base + "BlendIntensity", 0.0 ) );
prop[ "Blend" ] = tmpStr;
// Bevel contrast
- prop[ "BContrast" ] = QString::number( config->readNumEntry( base + "BevelContrast", 0 ) );
+ prop[ "BContrast" ] = TQString::number( config->readNumEntry( base + "BevelContrast", 0 ) );
// Border width
- prop[ "Border" ] = QString::number( config->readNumEntry( base + "Border", 1 ) );
+ prop[ "Border" ] = TQString::number( config->readNumEntry( base + "Border", 1 ) );
// Highlight width
- prop[ "Highlight" ] = QString::number( config->readNumEntry( base + "Highlight", 1 ) );
+ prop[ "Highlight" ] = TQString::number( config->readNumEntry( base + "Highlight", 1 ) );
- QStringList keys = config->entryList( base );
+ TQStringList keys = config->entryList( base );
// Gradient low color or blend background
if ( keys.contains( "GradientLow" ) )
- prop[ "GrLow" ] = readColorEntry( config, QString( base + "GradientLow" ).latin1(),
- &QApplication::palette().active().background() ).name();
+ prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
+ &TQApplication::palette().active().background() ).name();
// Gradient high color
if ( keys.contains( "GradientHigh" ) )
- prop[ "GrHigh" ] = readColorEntry( config, QString( base + "GradientHigh" ).latin1(),
- &QApplication::palette().active().foreground() ).name();
+ prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
+ &TQApplication::palette().active().foreground() ).name();
// Extended color attributes
if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
{
- QColor fg, bg;
+ TQColor fg, bg;
if ( keys.contains( "Background" ) )
- bg = readColorEntry( config, QString( base + "Background" ).latin1(), &bg );
+ bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg );
if ( keys.contains( "Foreground" ) )
- fg = readColorEntry( config, QString( base + "Foreground" ).latin1(), &fg );
+ fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg );
prop[ "Foreground" ] = fg.name();
prop[ "Background" ] = bg.name();
@@ -1302,24 +1302,24 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
if ( !tmpStr.isEmpty() )
{
prop[ "PixmapBorder" ] = tmpStr;
- prop[ "PixmapBWidth" ] = QString::number(
+ prop[ "PixmapBWidth" ] = TQString::number(
config->readNumEntry( base + "PixmapBWidth", 0 ) );
}
// Various widget specific settings. This was more efficient when bunched
// together in the misc group, but this makes an easier to read config.
if ( i == SliderGroove )
- prop[ "SmallGroove" ] = QString::number(
+ prop[ "SmallGroove" ] = TQString::number(
config->readBoolEntry( base + "SmallGroove", false ) );
else if ( i == ActiveTab || i == InactiveTab )
- prop[ "BottomLine" ] = QString::number(
+ prop[ "BottomLine" ] = TQString::number(
config->readBoolEntry( base + "BottomLine", true ) );
else if ( i == Splitter )
- prop[ "Width" ] = QString::number( config->readNumEntry( base + "Width", 10 ) );
+ prop[ "Width" ] = TQString::number( config->readNumEntry( base + "Width", 10 ) );
else if ( i == ComboBox || i == ComboBoxDown )
{
if ( keys.contains( "Round" ) )
- prop[ "Round" ] = QString::number( config->readBoolEntry( base + "Round", false ) );
+ prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000"; // invalid, used w/multiple groups
@@ -1327,32 +1327,32 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
else if ( i == PushButton || i == PushButtonDown )
{
if ( keys.contains( "XShift" ) )
- prop[ "XShift" ] = QString::number( config->readNumEntry( base + "XShift", 0 ) );
+ prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) );
else
prop[ "XShift" ] = "5000";
if ( keys.contains( "YShift" ) )
- prop[ "YShift" ] = QString::number( config->readNumEntry( base + "YShift", 0 ) );
+ prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) );
else
prop[ "YShift" ] = "5000";
if ( keys.contains( "3DFocusRect" ) )
- prop[ "3DFRect" ] = QString::number( config->
+ prop[ "3DFRect" ] = TQString::number( config->
readBoolEntry( base + "3DFocusRect", false ) );
else
prop[ "3DFRect" ] = "5000";
if ( keys.contains( "3DFocusOffset" ) )
- prop[ "3DFOffset" ] = QString::number( config->
+ prop[ "3DFOffset" ] = TQString::number( config->
readBoolEntry( base + "3DFocusOffset", 0 ) );
else
prop[ "3DFOffset" ] = "5000";
if ( keys.contains( "Round" ) )
- prop[ "Round" ] = QString::number( config->readBoolEntry( base + "Round", false ) );
+ prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000";
}
#endif
}
-void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
+void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray )
{
#ifndef Q_WS_QWS //FIXME
@@ -1363,7 +1363,7 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
int tmpVal;
Prop prop = d->props[ widgetEntries[ i ] ];
- QString tmpStr;
+ TQString tmpStr;
tmpStr = prop[ "CopyWidget" ];
if ( !tmpStr.isEmpty() )
@@ -1411,7 +1411,7 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = QString::fromLatin1( "0.0" );
+ tmpStr = TQString::fromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1426,8 +1426,8 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Gradient low color or blend background
if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 )
grLowColors[ i ] =
- new QColor( readColorEntry( prop, "GrLow",
- QApplication::palette().active().
+ new TQColor( readColorEntry( prop, "GrLow",
+ TQApplication::palette().active().
background() ) );
else
grLowColors[ i ] = NULL;
@@ -1435,22 +1435,22 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Gradient high color
if ( gradients[ i ] != GrNone )
grHighColors[ i ] =
- new QColor( readColorEntry( prop, "GrHigh",
- QApplication::palette().active().
+ new TQColor( readColorEntry( prop, "GrHigh",
+ TQApplication::palette().active().
background() ) );
else
grHighColors[ i ] = NULL;
// Extended color attributes
- QColor fg, bg;
+ TQColor fg, bg;
fg = readColorEntry( prop, "Foreground", fg );
bg = readColorEntry( prop, "Background", bg );
if ( fg.isValid() || bg.isValid() )
{
if ( !fg.isValid() )
- fg = QApplication::palette().active().foreground();
+ fg = TQApplication::palette().active().foreground();
if ( !bg.isValid() )
- bg = QApplication::palette().active().background();
+ bg = TQApplication::palette().active().background();
colors[ i ] = makeColorGroup( fg, bg, Qt::WindowsStyle );
}
else
@@ -1563,17 +1563,17 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
}
-QPalette KThemeBase::overridePalette( const QPalette& pal )
+TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
//Read current settings for colors..
- QColor background = pal.active().background();
- QColor foreground = pal.active().foreground();
- QColor button = background; //CHECKME
- QColor highlight = pal.active().highlight();
- QColor highlightedText = pal.active().highlightedText(); //CHECKME
- QColor base = pal.active().base(); //config->readColorEntry( "windowBackground", &white );
- QColor baseText = pal.active().text(); //CHECKME
+ TQColor background = pal.active().background();
+ TQColor foreground = pal.active().foreground();
+ TQColor button = background; //CHECKME
+ TQColor highlight = pal.active().highlight();
+ TQColor highlightedText = pal.active().highlightedText(); //CHECKME
+ TQColor base = pal.active().base(); //config->readColorEntry( "windowBackground", &white );
+ TQColor baseText = pal.active().text(); //CHECKME
//See whether there are any immediate overrides.
if ( d->overrideBackground )
@@ -1596,7 +1596,7 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
if ( uncached( Bevel ) )
button = d->pixmapAveColor( uncached( Bevel ) );
- QColor buttonText = foreground;
+ TQColor buttonText = foreground;
int highlightVal, lowlightVal;
highlightVal = 100 + ( 2 * d->contrast + 4 ) * 16 / 10;
@@ -1616,14 +1616,14 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
}
- QColorGroup pre( foreground, button, background.light( highlightVal ),
+ TQColorGroup pre( foreground, button, background.light( highlightVal ),
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
buttonText = colorGroup( pre, PushButton ) ->foreground();
}
- QColor disfg = foreground;
+ TQColor disfg = foreground;
int h, s, v;
disfg.hsv( &h, &s, &v );
if ( v > 128 )
@@ -1637,31 +1637,31 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
disfg = Qt::darkGray;
- QColorGroup disabledgrp( disfg, background, //TODO:Convert this to the new ctor.
+ TQColorGroup disabledgrp( disfg, background, //TODO:Convert this to the new ctor.
background.light( highlightVal ),
background.dark( lowlightVal ),
background.dark( 120 ),
background.dark( 120 ), base );
- QColorGroup colgrp( foreground, button, background.light( highlightVal ),
+ TQColorGroup colgrp( foreground, button, background.light( highlightVal ),
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- colgrp.setColor( QColorGroup::Highlight, highlight );
- colgrp.setColor( QColorGroup::HighlightedText, highlightedText );
- colgrp.setColor( QColorGroup::ButtonText, buttonText );
- colgrp.setColor( QColorGroup::Midlight, button.light( 110 ) );
+ colgrp.setColor( TQColorGroup::Highlight, highlight );
+ colgrp.setColor( TQColorGroup::HighlightedText, highlightedText );
+ colgrp.setColor( TQColorGroup::ButtonText, buttonText );
+ colgrp.setColor( TQColorGroup::Midlight, button.light( 110 ) );
- disabledgrp.setColor( QColorGroup::Base, base );
- disabledgrp.setColor( QColorGroup::Button, button );
- disabledgrp.setColor( QColorGroup::ButtonText, buttonText );
- disabledgrp.setColor( QColorGroup::Midlight, button.light( 110 ) );
+ disabledgrp.setColor( TQColorGroup::Base, base );
+ disabledgrp.setColor( TQColorGroup::Button, button );
+ disabledgrp.setColor( TQColorGroup::ButtonText, buttonText );
+ disabledgrp.setColor( TQColorGroup::Midlight, button.light( 110 ) );
- QPalette newPal( colgrp, disabledgrp, colgrp );
+ TQPalette newPal( colgrp, disabledgrp, colgrp );
return newPal;
@@ -1695,12 +1695,12 @@ KThemePixmap::KThemePixmap( const KThemePixmap &p )
int i;
for ( i = 0; i < 8; ++i )
if ( p.b[ i ] )
- b[ i ] = new QPixmap( *p.b[ i ] );
+ b[ i ] = new TQPixmap( *p.b[ i ] );
else
b[ i ] = NULL;
}
-KThemePixmap::KThemePixmap( const KThemePixmap &p, const QPixmap &p2 )
+KThemePixmap::KThemePixmap( const KThemePixmap &p, const TQPixmap &p2 )
: KPixmap( p2 )
{
if ( p.t )
@@ -1713,7 +1713,7 @@ KThemePixmap::KThemePixmap( const KThemePixmap &p, const QPixmap &p2 )
int i;
for ( i = 0; i < 8; ++i )
if ( p.b[ i ] )
- b[ i ] = new QPixmap( *p.b[ i ] );
+ b[ i ] = new TQPixmap( *p.b[ i ] );
else
b[ i ] = NULL;
}
@@ -1730,18 +1730,18 @@ KThemePixmap::~KThemePixmap()
delete b[ i ];
}
-KThemeCache::KThemeCache( int maxSize, QObject *parent, const char *name )
- : QObject( parent, name )
+KThemeCache::KThemeCache( int maxSize, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
cache.setMaxCost( maxSize * 1024 );
cache.setAutoDelete( true );
flushTimer.start( 300000 ); // 5 minutes
- connect( &flushTimer, SIGNAL( timeout() ), SLOT( flushTimeout() ) );
+ connect( &flushTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( flushTimeout() ) );
}
void KThemeCache::flushTimeout()
{
- QIntCacheIterator<KThemePixmap> it( cache );
+ TQIntCacheIterator<KThemePixmap> it( cache );
while ( it.current() )
{
if ( it.current() ->isOld() )
diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h
index 8f8041464..b821e1c7c 100644
--- a/kstyles/kthemestyle/kthemebase.h
+++ b/kstyles/kthemestyle/kthemebase.h
@@ -29,16 +29,16 @@ Copyright (C) 1998, 1999, 2000 KDE Team
#ifndef KTHEMEBASE_H
#define KTHEMEBASE_H
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kpixmap.h>
-#include <qintcache.h>
-#include <qstring.h>
+#include <tqintcache.h>
+#include <tqstring.h>
#include <kstyle.h>
-#include <qsettings.h>
-#include <qpalette.h> // for QColorGroup
+#include <tqsettings.h>
+#include <tqpalette.h> // for QColorGroup
#include "kstyledirs.h"
-#include <qmap.h>
+#include <tqmap.h>
class QImage;
@@ -58,34 +58,34 @@ public:
KThemePixmap( bool timer = true );
KThemePixmap( const KThemePixmap &p );
- KThemePixmap( const KThemePixmap &p, const QPixmap& rp );
+ KThemePixmap( const KThemePixmap &p, const TQPixmap& rp );
~KThemePixmap();
- QPixmap* border( BorderType type );
- void setBorder( BorderType type, const QPixmap &p );
+ TQPixmap* border( BorderType type );
+ void setBorder( BorderType type, const TQPixmap &p );
void updateAccessed();
bool isOld();
protected:
- QTime *t;
- QPixmap *b[ 8 ];
+ TQTime *t;
+ TQPixmap *b[ 8 ];
private:
class KThemePixmapPrivate;
KThemePixmapPrivate *d;
};
-inline QPixmap* KThemePixmap::border( BorderType type )
+inline TQPixmap* KThemePixmap::border( BorderType type )
{
return ( b[ type ] );
}
-inline void KThemePixmap::setBorder( BorderType type, const QPixmap &p )
+inline void KThemePixmap::setBorder( BorderType type, const TQPixmap &p )
{
if ( b[ type ] )
{
qWarning( "KThemePixmap: Overwriting existing border!" );
delete( b[ type ] );
}
- b[ type ] = new QPixmap( p );
+ b[ type ] = new TQPixmap( p );
}
inline void KThemePixmap::updateAccessed()
@@ -100,14 +100,14 @@ inline bool KThemePixmap::isOld()
}
/**
- * A very simple pixmap cache for theme plugins. QPixmapCache is not used
- * since it uses QString keys which are not needed. All the information we
- * need can be encoded in a numeric key. Using QIntCache instead allows us to
+ * A very simple pixmap cache for theme plugins. TQPixmapCache is not used
+ * since it uses TQString keys which are not needed. All the information we
+ * need can be encoded in a numeric key. Using TQIntCache instead allows us to
* skip the string operations.
*
* This class is mostly just inline methods that do bit operations on a key
* composed of the widget ID, width and/or height, and then calls
- * QIntCache::find().
+ * TQIntCache::find().
*
* One other thing to note is that full, horizontal, and vertically scaled
* pixmaps are not used interchangeably. For example, if you insert a fully
@@ -136,7 +136,7 @@ public:
* @param parent The parent object.
* @param name The name of the object.
*/
- KThemeCache( int maxSize, QObject *parent = 0, const char *name = 0 );
+ KThemeCache( int maxSize, TQObject *parent = 0, const char *name = 0 );
/**
* Inserts a new pixmap into the cache.
*
@@ -188,8 +188,8 @@ public:
protected slots:
void flushTimeout();
protected:
- QIntCache<KThemePixmap> cache;
- QTimer flushTimer;
+ TQIntCache<KThemePixmap> cache;
+ TQTimer flushTimer;
private:
class KThemeCachePrivate;
@@ -218,7 +218,7 @@ public:
/**
* Constructs a new KThemeBase object.
*/
- KThemeBase( const QString &dirs, const QString &configFile );
+ KThemeBase( const TQString &dirs, const TQString &configFile );
~KThemeBase();
/**
* Describes if a pixmap should be scaled fully, horizontally, vertically,
@@ -305,10 +305,10 @@ public:
* @param widget The widget whose color group to retrieve.
*
*/
- const QColorGroup* colorGroup( const QColorGroup &defaultGroup,
+ const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const;
- QBrush pixmapBrush( const QColorGroup &group, QColorGroup::ColorRole role,
+ TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role,
int w, int h, WidgetType widget );
/**
* True if the widget has a pixmap or gradient specified.
@@ -424,7 +424,7 @@ public:
* height. This will return NULL if no pixmap or gradient is specified.
* It may also return a different sized pixmap if the scaling
* is set to Tiled. When using this method, you should call it using
- * the needed width and height then use QPainter::drawTiledPixmap to
+ * the needed width and height then use TQPainter::drawTiledPixmap to
* paint it. Doing this, if the pixmap is scaled it will be the proper
* size, otherwise it will be tiled.
*
@@ -443,29 +443,29 @@ protected:
*
* @param config The configuration file to apply.
*/
- void applyConfigFile( QSettings & config );
+ void applyConfigFile( TQSettings & config );
/*
* Generates a new palette based on the values for which have been specified explicitly
* in the .themerc file.
*/
- QPalette overridePalette( const QPalette& pal );
+ TQPalette overridePalette( const TQPalette& pal );
/**
- * Returns a QImage for the given widget if the widget is scaled, NULL
+ * Returns a TQImage for the given widget if the widget is scaled, NULL
* otherwise. QImages of the original pixmap are stored for scaled
* widgets in order to facilitate fast and accurate smooth-scaling. This
* also saves us a conversion from a pixmap to an image then back again.
*/
- QImage* image( WidgetType widget ) const;
+ TQImage* image( WidgetType widget ) const;
/**
* Returns the gradient high color if one is specified, NULL otherwise.
*/
- QColor* gradientHigh( WidgetType widget ) const;
+ TQColor* gradientHigh( WidgetType widget ) const;
/**
* Returns the gradient low color if one is specified, NULL otherwise.
*/
- QColor* gradientLow( WidgetType widget ) const;
+ TQColor* gradientLow( WidgetType widget ) const;
/**
* Reads in all the configuration file entries supported.
*
@@ -474,48 +474,48 @@ protected:
* is obsolete.
*/
void readConfig( Qt::GUIStyle colorStyle = Qt::WindowsStyle );
- void readWidgetConfig( int i, QSettings *config, QString *pixnames,
- QString *brdnames, bool *loadArray );
- void copyWidgetConfig( int sourceID, int destID, QString *pixnames,
- QString *brdnames );
+ void readWidgetConfig( int i, TQSettings *config, TQString *pixnames,
+ TQString *brdnames, bool *loadArray );
+ void copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
+ TQString *brdnames );
/**
* Makes a full color group based on the given foreground and background
* colors. This is the same code used by KDE (kapp.cpp) in previous
* versions.
*/
- QColorGroup* makeColorGroup( const QColor &fg, const QColor &bg,
+ TQColorGroup* makeColorGroup( const TQColor &fg, const TQColor &bg,
Qt::GUIStyle style = Qt::WindowsStyle );
KThemePixmap* scale( int w, int h, WidgetType widget ) const;
KThemePixmap* scaleBorder( int w, int h, WidgetType type ) const;
KThemePixmap* gradient( int w, int h, WidgetType widget ) const ;
KThemePixmap* blend( WidgetType widget ) const;
void generateBorderPix( int i );
- void applyResourceGroup( QSettings *config, int i );
- void applyMiscResourceGroup( QSettings *config );
- void readResourceGroup( int i, QString *pixnames, QString *brdnames,
+ void applyResourceGroup( TQSettings *config, int i );
+ void applyMiscResourceGroup( TQSettings *config );
+ void readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray );
void readMiscResourceGroup();
/**
* Attempts to load a pixmap from the default KThemeBase locations.
*/
- KThemePixmap* loadPixmap( const QString &name );
+ KThemePixmap* loadPixmap( const TQString &name );
/**
* Attempts to load a image from the default KThemeBase locations.
*/
- QImage* loadImage( const QString &name );
+ TQImage* loadImage( const TQString &name );
/**
These are included for fuuture extension purposes..
*/
- virtual int pixelMetric ( PixelMetric metric, const QWidget * widget = 0 ) const
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
{
return KStyle::pixelMetric( metric, widget );
}
- virtual void drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg,
+ virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
- const QStyleOption& option = QStyleOption::Default ) const
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
KStyle::drawPrimitive ( pe, p, r, cg,
flags, option );
@@ -523,48 +523,48 @@ protected:
virtual void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how = Style_Default,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawControl( element, p, widget,
r, cg, how, opt );
}
virtual void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt = QStyleOption::Default ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawControlMask( element, p, widget, r, opt );
}
virtual void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
}
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawKStylePrimitive( kpe,
p, widget, r,
@@ -573,8 +573,8 @@ protected:
virtual int styleHint( StyleHint sh,
- const QWidget *widget = 0,
- const QStyleOption& opt = QStyleOption::Default,
+ const TQWidget *widget = 0,
+ const TQStyleOption& opt = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const
{
return KStyle::styleHint( sh,
@@ -583,10 +583,10 @@ protected:
returnData );
}
- virtual QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption& opt = QStyleOption::Default ) const
+ virtual TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
return KStyle::sizeFromContents( contents,
widget, contentsSize, opt );
@@ -610,8 +610,8 @@ private:
bool focus3D;
KThemeCache *cache;
int cacheSize;
- QString configFileName;
- QString configDirName;
+ TQString configFileName;
+ TQString configDirName;
/**
* The theme pixmaps. Many of these may be NULL if no pixmap is specified.
@@ -625,7 +625,7 @@ private:
* The theme images. These are for scaled images and are kept in order
* to maintain fast smoothscaling.
*/
- mutable QImage *images[ WIDGETS ];
+ mutable TQImage *images[ WIDGETS ];
/**
* The border widths
*/
@@ -641,15 +641,15 @@ private:
/**
* All the color groups.
*/
- mutable QColorGroup *colors[ WIDGETS ];
+ mutable TQColorGroup *colors[ WIDGETS ];
/**
* Gradient low colors (or blend background).
*/
- mutable QColor *grLowColors[ WIDGETS ];
+ mutable TQColor *grLowColors[ WIDGETS ];
/**
* Gradient high colors.
*/
- mutable QColor *grHighColors[ WIDGETS ];
+ mutable TQColor *grHighColors[ WIDGETS ];
/**
* Gradient types.
*/
@@ -721,17 +721,17 @@ inline KThemePixmap* KThemeBase::uncached( WidgetType widget ) const
return ( pixmaps[ widget ] );
}
-inline QBrush KThemeBase::pixmapBrush( const QColorGroup &group,
- QColorGroup::ColorRole role,
+inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group,
+ TQColorGroup::ColorRole role,
int w, int h, WidgetType widget )
{
if ( pixmaps[ widget ] || images[ widget ] )
- return ( QBrush( group.color( role ), *scalePixmap( w, h, widget ) ) );
+ return ( TQBrush( group.color( role ), *scalePixmap( w, h, widget ) ) );
else
return ( group.color( role ) );
}
-inline const QColorGroup* KThemeBase::colorGroup( const QColorGroup &defaultGroup,
+inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const
{
return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup );
@@ -757,17 +757,17 @@ inline int KThemeBase::decoWidth( WidgetType widget ) const
return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] + highlights[ widget ] );
}
-inline QColor* KThemeBase::gradientHigh( WidgetType widget ) const
+inline TQColor* KThemeBase::gradientHigh( WidgetType widget ) const
{
return ( grHighColors[ widget ] );
}
-inline QColor* KThemeBase::gradientLow( WidgetType widget ) const
+inline TQColor* KThemeBase::gradientLow( WidgetType widget ) const
{
return ( grLowColors[ widget ] );
}
-inline QImage* KThemeBase::image( WidgetType widget ) const
+inline TQImage* KThemeBase::image( WidgetType widget ) const
{
return ( images[ widget ] );
}
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index cdb419772..5ed132eea 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -40,35 +40,35 @@ Port version 0.9.7
#include "kthemestyle.h"
#include "kthemebase.h"
-#include <qstyleplugin.h>
-#include <qstylefactory.h>
+#include <tqstyleplugin.h>
+#include <tqstylefactory.h>
#include <kimageeffect.h>
-#include <qbitmap.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqbitmap.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#define INCLUDE_MENUITEM_DEF
-#include <qmenudata.h>
-#include <qpopupmenu.h>
-#include <qpalette.h>
-#include <qtabbar.h>
-#include <qtoolbutton.h>
+#include <tqmenudata.h>
+#include <tqpopupmenu.h>
+#include <tqpalette.h>
+#include <tqtabbar.h>
+#include <tqtoolbutton.h>
#include <kglobalsettings.h>
#include <kdrawutil.h>
-#include <qdrawutil.h>
-#include <qprogressbar.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qmenubar.h>
-#include <qrangecontrol.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qobjectlist.h>
-#include <qradiobutton.h>
-#include <qstatusbar.h>
+#include <tqdrawutil.h>
+#include <tqprogressbar.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqmenubar.h>
+#include <tqrangecontrol.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqobjectlist.h>
+#include <tqradiobutton.h>
+#include <tqstatusbar.h>
#include "kstyledirs.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <limits.h>
@@ -127,12 +127,12 @@ public:
~KThemeStylePlugin()
{}
- QStringList keys() const
+ TQStringList keys() const
{
- QSettings cfg;
+ TQSettings cfg;
KStyleDirs::dirs()->addToSearch( "config", cfg );
- QStringList keys;
+ TQStringList keys;
bool ok;
keys = cfg.readListEntry( "/kthemestyle/themes", &ok);
@@ -142,15 +142,15 @@ public:
return keys;
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
- QSettings cfg;
+ TQSettings cfg;
KStyleDirs::dirs()->addToSearch( "config", cfg );
- QString file = cfg.readEntry( "/kthemestyle/" + key + "/file" );
+ TQString file = cfg.readEntry( "/kthemestyle/" + key + "/file" );
if ( !key.isEmpty() )
{
- QFileInfo fi( file );
+ TQFileInfo fi( file );
return new KThemeStyle( fi.dirPath(), fi.fileName() );
}
@@ -161,22 +161,22 @@ public:
KDE_Q_EXPORT_PLUGIN( KThemeStylePlugin )
-void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElement pe, bool down,
+void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveElement pe, bool down,
int x, int y, int w, int h,
- const QColorGroup &cg, bool enabled )
+ const TQColorGroup &cg, bool enabled )
{
- QPointArray a;
+ TQPointArray a;
switch ( pe )
{
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( QCOORDARRLEN( win_style_u_arrow ), win_style_u_arrow );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( QCOORDARRLEN( win_style_d_arrow ), win_style_d_arrow );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( QCOORDARRLEN( win_style_l_arrow ), win_style_l_arrow );
break;
default:
@@ -186,8 +186,8 @@ void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElem
p->save();
if ( down )
{
- p->translate( style->pixelMetric( QStyle::PM_ButtonShiftHorizontal ),
- style->pixelMetric( QStyle::PM_ButtonShiftVertical ) );
+ p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
}
if ( enabled )
@@ -212,10 +212,10 @@ void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElem
-QSize KThemeStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize KThemeStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch ( contents )
{
@@ -223,7 +223,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
// ------------------------------------------------------------------
case CT_PushButton:
{
- const QPushButton * button = ( const QPushButton* ) widget;
+ const TQPushButton * button = ( const TQPushButton* ) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -242,7 +242,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( h < 22 )
h = 22;
- return QSize( w, h );
+ return TQSize( w, h );
}
// POPUPMENU ITEM SIZE
@@ -252,9 +252,9 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = ( const QPopupMenu * ) widget;
+ const TQPopupMenu *popup = ( const TQPopupMenu * ) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -282,7 +282,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() )
h = QMAX( h, mi->iconSet() ->pixmap(
- QIconSet::Small, QIconSet::Normal ).height() +
+ TQIconSet::Small, TQIconSet::Normal ).height() +
2 * itemFrame );
}
@@ -300,7 +300,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
default:
@@ -309,21 +309,21 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
}
-QRect KThemeStyle::subRect(SubRect sr, const QWidget* widget) const
+TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
{
if (sr == SR_CheckBoxFocusRect)
{
- const QCheckBox* cb = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* cb = static_cast<const TQCheckBox*>(widget);
//Only checkbox, no label
if (cb->text().isEmpty() && (cb->pixmap() == 0) )
{
- QRect bounding = cb->rect();
+ TQRect bounding = cb->rect();
int cw = pixelMetric(PM_IndicatorWidth, widget);
int ch = pixelMetric(PM_IndicatorHeight, widget);
- QRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
+ TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
return checkbox;
}
@@ -331,7 +331,7 @@ QRect KThemeStyle::subRect(SubRect sr, const QWidget* widget) const
return KStyle::subRect(sr, widget);
}
-int KThemeStyle::pixelMetric ( PixelMetric metric, const QWidget * widget ) const
+int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const
{
switch ( metric )
{
@@ -395,13 +395,13 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const QWidget * widget ) cons
-KThemeStyle::KThemeStyle( const QString& configDir, const QString &configFile )
+KThemeStyle::KThemeStyle( const TQString& configDir, const TQString &configFile )
: KThemeBase( configDir, configFile ), paletteSaved( false ), polishLock( false ), menuCache( 0 ), vsliderCache( 0 ),
brushHandle( 0 ), brushHandleSet( false ), kickerMode( false )
{
- mtfstyle = QStyleFactory::create( "Motif" );
+ mtfstyle = TQStyleFactory::create( "Motif" );
if ( !mtfstyle )
- mtfstyle = QStyleFactory::create( *( QStyleFactory::keys().begin() ) );
+ mtfstyle = TQStyleFactory::create( *( TQStyleFactory::keys().begin() ) );
}
KThemeStyle::~KThemeStyle()
@@ -412,14 +412,14 @@ KThemeStyle::~KThemeStyle()
}
-void KThemeStyle::polish( QApplication * app )
+void KThemeStyle::polish( TQApplication * app )
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
}
-void KThemeStyle::polish( QPalette &p )
+void KThemeStyle::polish( TQPalette &p )
{
if ( polishLock )
{
@@ -438,41 +438,41 @@ void KThemeStyle::polish( QPalette &p )
if ( isPixmap( Background ) )
{
- QBrush bgBrush( p.color( QPalette::Normal,
- QColorGroup::Background ),
+ TQBrush bgBrush( p.color( TQPalette::Normal,
+ TQColorGroup::Background ),
*uncached( Background ) );
brushHandle = uncached( Background )->handle();
brushHandleSet = true;
- p.setBrush( QColorGroup::Background, bgBrush );
+ p.setBrush( TQColorGroup::Background, bgBrush );
}
}
void KThemeStyle::paletteChanged()
{
- QPalette p = QApplication::palette();
+ TQPalette p = TQApplication::palette();
polish( p );
- QApplication::setPalette( p );
+ TQApplication::setPalette( p );
}
-void KThemeStyle::unPolish( QApplication *app )
+void KThemeStyle::unPolish( TQApplication *app )
{
app->setPalette( oldPalette, true );
}
-bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
+bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
{
if( object->inherits("KActiveLabel"))
{
- if(event->type() == QEvent::Move || event->type() == QEvent::Resize ||
- event->type() == QEvent::Show)
+ if(event->type() == TQEvent::Move || event->type() == TQEvent::Resize ||
+ event->type() == TQEvent::Show)
{
- QWidget *w = static_cast<QWidget*>(object);
- QPoint pos(0, 0);
+ TQWidget *w = static_cast<TQWidget*>(object);
+ TQPoint pos(0, 0);
pos = w->mapTo(w->topLevelWidget(), pos);
- QPixmap pix(uncached( Background )->size());
- QPainter p;
+ TQPixmap pix(uncached( Background )->size());
+ TQPainter p;
p.begin(&pix);
p.drawTiledPixmap(0, 0,
uncached( Background )->width(),
@@ -480,17 +480,17 @@ bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
*uncached( Background ),
pos.x(), pos.y());
p.end();
- QPalette pal(w->palette());
- QBrush brush( pal.color( QPalette::Normal,
- QColorGroup::Background),
+ TQPalette pal(w->palette());
+ TQBrush brush( pal.color( TQPalette::Normal,
+ TQColorGroup::Background),
pix );
- pal.setBrush(QColorGroup::Base, brush);
+ pal.setBrush(TQColorGroup::Base, brush);
w->setPalette(pal);
}
}
- if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("QLabel"))
+ if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("TQLabel"))
{
- QWidget* lb = static_cast<QWidget*>(object);
+ TQWidget* lb = static_cast<TQWidget*>(object);
if (lb->backgroundMode() == Qt::PaletteButton)
lb->setBackgroundMode(Qt::PaletteBackground);
lb->removeEventFilter(this);
@@ -499,12 +499,12 @@ bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
return KStyle::eventFilter(object, event);
}
-void KThemeStyle::polish( QWidget *w )
+void KThemeStyle::polish( TQWidget *w )
{
- if (::qt_cast<QStatusBar*>(w))
- w->setPaletteBackgroundColor(QApplication::palette().color(QPalette::Normal, QColorGroup::Background));
+ if (::qt_cast<TQStatusBar*>(w))
+ w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
- if (::qt_cast<QLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ if (::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
w->installEventFilter(this);
if (w->backgroundPixmap() && !w->isTopLevel() &&
@@ -514,7 +514,7 @@ void KThemeStyle::polish( QWidget *w )
//The brushHandle check verifies that the bg pixmap is actually the brush..
if (!brushHandleSet || brushHandle == w->backgroundPixmap()->handle())
{
- w->setBackgroundOrigin( QWidget::WindowOrigin );
+ w->setBackgroundOrigin( TQWidget::WindowOrigin );
}
}
@@ -528,12 +528,12 @@ void KThemeStyle::polish( QWidget *w )
{
polishLock = true;
- QColorGroup clrGroup( Qt::black, QColor( 255, 255, 220 ),
- QColor( 96, 96, 96 ), Qt::black, Qt::black,
- Qt::black, QColor( 255, 255, 220 ) );
- QPalette toolTip ( clrGroup, clrGroup, clrGroup );
+ TQColorGroup clrGroup( Qt::black, TQColor( 255, 255, 220 ),
+ TQColor( 96, 96, 96 ), Qt::black, Qt::black,
+ Qt::black, TQColor( 255, 255, 220 ) );
+ TQPalette toolTip ( clrGroup, clrGroup, clrGroup );
- QToolTip::setPalette( toolTip );
+ TQToolTip::setPalette( toolTip );
polishLock = false;
}
@@ -543,20 +543,20 @@ void KThemeStyle::polish( QWidget *w )
return ;
}
- if ( ::qt_cast<QMenuBar*>(w) )
+ if ( ::qt_cast<TQMenuBar*>(w) )
{
- w->setBackgroundMode( QWidget::NoBackground );
+ w->setBackgroundMode( TQWidget::NoBackground );
}
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
{
- w->setBackgroundMode( QWidget::PaletteBackground );
+ w->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( ::qt_cast<QPopupMenu*>(w) )
+ else if ( ::qt_cast<TQPopupMenu*>(w) )
{
popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( MenuItem ) )
{
newPal.setActive( *colorGroup( newPal.active(), MenuItem ) );
@@ -569,13 +569,13 @@ void KThemeStyle::polish( QWidget *w )
w->setPalette( newPal );
}
- w->setBackgroundMode( QWidget::NoBackground );
+ w->setBackgroundMode( TQWidget::NoBackground );
}
- else if ( ::qt_cast<QCheckBox*>(w) )
+ else if ( ::qt_cast<TQCheckBox*>(w) )
{
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( IndicatorOff ) )
{
newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) );
@@ -586,11 +586,11 @@ void KThemeStyle::polish( QWidget *w )
w->setPalette( newPal );
}
}
- else if ( ::qt_cast<QRadioButton*>(w) )
+ else if ( ::qt_cast<TQRadioButton*>(w) )
{
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( ExIndicatorOff ) )
{
newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) );
@@ -606,45 +606,45 @@ void KThemeStyle::polish( QWidget *w )
KStyle::polish( w );
}
-void KThemeStyle::unPolish( QWidget* w )
+void KThemeStyle::unPolish( TQWidget* w )
{
if (w->backgroundPixmap() && !w->isTopLevel())
{
//The brushHandle check verifies that the bg pixmap is actually the brush..
if (!brushHandleSet || brushHandle ==w->backgroundPixmap()->handle())
{
- w->setBackgroundOrigin( QWidget::WidgetOrigin );
+ w->setBackgroundOrigin( TQWidget::WidgetOrigin );
}
}
//Toolbar labels should nornally be PaletteButton
- if ( ::qt_cast<QLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
- w->setBackgroundMode( QWidget::PaletteButton );
+ if ( ::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus
- else if ( ::qt_cast<QMenuBar*>(w) || ::qt_cast<QPopupMenu*>(w) )
- w->setBackgroundMode( QWidget::PaletteButton );
+ else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQPopupMenu*>(w) )
+ w->setBackgroundMode( TQWidget::PaletteButton );
//For toolbar internal separators, return to button, too (can't use qt_cast here since don't have access to the class)
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
- w->setBackgroundMode( QWidget::PaletteButton );
+ w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch
//Drop some custom palettes. ### this really should check the serial number to be 100% correct.
- if ( ::qt_cast<QPopupMenu*>(w) || ::qt_cast<QCheckBox*>(w) || ::qt_cast<QRadioButton*>(w) || ::qt_cast<QStatusBar*>(w) )
+ if ( ::qt_cast<TQPopupMenu*>(w) || ::qt_cast<TQCheckBox*>(w) || ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQStatusBar*>(w) )
w->unsetPalette();
KStyle::unPolish( w );
}
-void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool
+void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool
rounded, WidgetType type ) const
{
int offset = borderPixmap( type ) ? 0 : decoWidth( type ) ; //##### This is wrong, but the code relies on it..
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// handle reverse bevel here since it uses decowidth differently
if ( gradientHint( type ) == GrReverseBevel )
@@ -666,7 +666,7 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
type ) );
else
p->fillRect( x + 4, y + 4, w - 6, h - offset * 6,
- g.brush( QColorGroup::Button ) );
+ g.brush( TQColorGroup::Button ) );
}
else
@@ -685,7 +685,7 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
//Sometimes border covers the whole thing - in that case, avoid drawing the base.
{
p->fillRect( x + offset, y + offset, w - offset * 2, h - offset * 2,
- g.brush( QColorGroup::Button ) );
+ g.brush( TQColorGroup::Button ) );
}
}
if ( borderPixmap( type ) )
@@ -700,8 +700,8 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
p->setPen( oldPen );
}
-void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & g_base,
- SFlags flags, const QStyleOption & opt ) const
+void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & g_base,
+ SFlags flags, const TQStyleOption & opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -711,7 +711,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
bool enabled = ( flags & Style_Enabled );
bool down = ( flags & Style_Down );
bool on = flags & Style_On;
- QColorGroup g = g_base;
+ TQColorGroup g = g_base;
switch ( pe )
{
@@ -720,7 +720,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
case PE_ArrowRight:
case PE_ArrowLeft:
{
- QRect r( x, y, w, h );
+ TQRect r( x, y, w, h );
if ( r.width() > 12 )
{
r.setRect( r.x() + ( r.width() - 12 ) / 2, r.y(), 12, r.height() );
@@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
return ;
}
- const QColorGroup *cg = colorGroup( g, widget );
+ const TQColorGroup *cg = colorGroup( g, widget );
// Standard arrow types
if ( arrowType() == MotifArrow )
{
@@ -768,7 +768,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
else if ( arrowType() == SmallArrow )
{
// #### FIXME: This should be like the Platinum style - uses HighColor look for now
- QPointArray a;
+ TQPointArray a;
switch ( pe )
{
@@ -810,7 +810,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
else
{
- QPointArray a;
+ TQPointArray a;
int x2 = x + w - 1, y2 = y + h - 1;
switch ( pe )
{
@@ -827,9 +827,9 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
a.setPoints( 4, x, y, x, y2, x2, y + h / 2, x, y );
break;
}
- QBrush oldBrush = p->brush();
- QPen oldPen = p->pen();
- p->setBrush( cg->brush( QColorGroup::Shadow ) );
+ TQBrush oldBrush = p->brush();
+ TQPen oldPen = p->pen();
+ p->setBrush( cg->brush( TQColorGroup::Shadow ) );
p->setPen( cg->shadow() );
p->drawPolygon( a );
p->setBrush( oldBrush );
@@ -876,7 +876,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
else //Small hack to ensure the checkmark gets painter proper color..
{
- g.setColor( QColorGroup::Text, g.buttonText() );
+ g.setColor( TQColorGroup::Text, g.buttonText() );
}
break;
}
@@ -895,14 +895,14 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
{
if ( isPixmap( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) )
{
- const QBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
+ const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
if ( mask )
{
p->setPen( Qt::color1 );
p->drawPixmap( x, y, *mask );
}
else
- p->fillRect( x, y, w, h, QBrush( color1, SolidPattern ) );
+ p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
handled = true;
}
break;
@@ -912,7 +912,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
{
if ( isPixmap( ( flags & Style_On ) ? IndicatorOn : IndicatorOff ) )
{
- const QBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
+ const TQBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
IndicatorOff ) ->mask();
if ( mask )
{
@@ -920,7 +920,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
p->drawPixmap( x, y, *mask );
}
else
- p->fillRect( x, y, w, h, QBrush( color1, SolidPattern ) );
+ p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
handled = true;
}
break;
@@ -965,7 +965,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
case PE_PanelMenuBar:
{
- QPixmap* cache = makeMenuBarCache(w, h);
+ TQPixmap* cache = makeMenuBarCache(w, h);
p->drawPixmap( x, y, *cache);
handled = true;
break;
@@ -977,7 +977,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
if ( !isPixmap( widget ) )
{
- p->fillRect( r, colorGroup( g, widget ) ->brush( QColorGroup::Background ) );
+ p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
// Do the borders and frame
drawShade( p, r.x(), r.y(), r.width(),
r.height(), *colorGroup( g, widget ), true, false,
@@ -1006,7 +1006,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
- QRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
+ TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
*colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
@@ -1021,7 +1021,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
- QRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
+ TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
*colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
@@ -1029,7 +1029,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
case PE_ScrollBarSlider:
{
- bool active = ( flags & Style_Active ) || ( flags & Style_Down ); //activeControl == QStyle::AddLine;
+ bool active = ( flags & Style_Active ) || ( flags & Style_Down ); //activeControl == TQStyle::AddLine;
bool horizontal = ( flags & Style_Horizontal );
int offsetH = horizontal ? 0: decoWidth(VScrollGroove) ;
int offsetV = horizontal ? decoWidth(HScrollGroove):0;
@@ -1074,7 +1074,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
-QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
+TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
{
if (menuCache)
{
@@ -1086,10 +1086,10 @@ QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
return menuCache;
}
- const QColorGroup *g = colorGroup( QApplication::palette().active(), MenuBar);
+ const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
- menuCache = new QPixmap ( w, h );
- QPainter p(menuCache);
+ menuCache = new TQPixmap ( w, h );
+ TQPainter p(menuCache);
drawBaseButton( &p, 0, 0, w, h, *g, false, false, MenuBar );
p.end();
return menuCache;
@@ -1097,12 +1097,12 @@ QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
void KThemeStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how ,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1113,7 +1113,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
case CE_PushButton:
{
- const QPushButton * btn = ( const QPushButton* ) widget;
+ const TQPushButton * btn = ( const TQPushButton* ) widget;
bool sunken = btn->isOn() || btn->isDown();
int diw = pixelMetric( PM_ButtonDefaultIndicator, btn );
drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw,
@@ -1126,7 +1126,7 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_PushButtonLabel:
{
- const QPushButton* button = ( const QPushButton* ) widget;
+ const TQPushButton* button = ( const TQPushButton* ) widget;
bool active = button->isOn() || button->isDown();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1143,7 +1143,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( button->isMenuButton() )
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, QRect( x + w - dx - 2, y + 2, dx, h - 4 ),
+ drawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
cg, how, opt );
w -= dx;
}
@@ -1151,15 +1151,15 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet() ->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( button->isEnabled() )
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( button->isToggleButton() && button->isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet() ->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet() ->pixmap( TQIconSet::Small, mode, state );
// Center the iconset if there's no text or pixmap
if (button->text().isEmpty() && !button->pixmap())
@@ -1177,20 +1177,20 @@ void KThemeStyle::drawControl( ControlElement element,
if ( active || button->isDefault() && button->isEnabled() )
{
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in QPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
int i;
// Text shadow
for ( i = 0; i < 2; i++ )
- drawItem( p, QRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for ( i = 0; i < 2; i++ )
- drawItem( p, QRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
button->colorGroup(), true, i == 0 ? button->pixmap() : NULL,
button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
@@ -1199,18 +1199,18 @@ void KThemeStyle::drawControl( ControlElement element,
{
if ( button->isEnabled() )
{
- drawItem( p, QRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
//TODO: Handle reversed
- drawItem( p, QRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
&button->colorGroup().light() );
- drawItem( p, QRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
&button->colorGroup().buttonText() );
}
@@ -1219,7 +1219,7 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw a focus rect if the button has focus
if ( how & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, how );
handled = true;
break;
@@ -1229,7 +1229,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
//Expand to cover entire region
drawPrimitive(PE_PanelMenuBar, p,
- QRect(0,0,r.width()+r.x()*2, r.height()+r.y()*2),
+ TQRect(0,0,r.width()+r.x()*2, r.height()+r.y()*2),
cg, Style_Default);
handled = true;
break;
@@ -1237,22 +1237,22 @@ void KThemeStyle::drawControl( ControlElement element,
case CE_TabBarTab:
{
- const QTabBar* tb = ( const QTabBar* ) widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = ( const TQTabBar* ) widget;
+ TQTabBar::Shape tbs = tb->shape();
bool selected = how & Style_Selected;
WidgetType widget = selected ? ActiveTab : InactiveTab;
- const QColorGroup *cg = colorGroup( tb->colorGroup(), widget );
+ const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget );
int i;
int x2 = x + w - 1, y2 = y + h - 1;
int bWidth = borderWidth( widget );
int hWidth = highlightWidth( widget );
handled = true;
- if ( tbs == QTabBar::RoundedAbove || tbs == QTabBar::TriangularAbove )
+ if ( tbs == TQTabBar::RoundedAbove || tbs == TQTabBar::TriangularAbove )
{
if ( !selected )
{
p->fillRect( x, y, x2 - x + 1, 2,
- tb->palette().active().brush( QColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y += 2;
}
p->setPen( cg->text() );
@@ -1314,8 +1314,8 @@ void KThemeStyle::drawControl( ControlElement element,
else
p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() );
}
- else if ( tb->shape() == QTabBar::RoundedBelow ||
- tb->shape() == QTabBar::TriangularBelow )
+ else if ( tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow )
{
if ( widget == ActiveTab )
widget = RotActiveTab;
@@ -1325,7 +1325,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y2 - 2, x2 - x + 1, 2,
- tb->palette().active().brush( QColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y2 -= 2;
}
p->setPen( cg->text() );
@@ -1392,20 +1392,20 @@ void KThemeStyle::drawControl( ControlElement element,
{
r.rect( &x, &y, &w, &h );
- QMenuItem *mi = opt.menuItem();
- QMenuBar *mb = ( QMenuBar* ) widget;
- QRect pr = mb->rect();
+ TQMenuItem *mi = opt.menuItem();
+ TQMenuBar *mb = ( TQMenuBar* ) widget;
+ TQRect pr = mb->rect();
bool active = how & Style_Active;
//bool focused = how & Style_HasFocus;
- const QColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
- QColor btext = g->buttonText();
+ const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
+ TQColor btext = g->buttonText();
- QPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
+ TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
- QPixmap buf( w, pr.height() );
+ TQPixmap buf( w, pr.height() );
bitBlt(&buf, 0, 0, cache, x, y, w, pr.height());
- QPainter p2( &buf );
+ TQPainter p2( &buf );
if ( active )
{
@@ -1415,7 +1415,7 @@ void KThemeStyle::drawControl( ControlElement element,
p2.end();
p->drawPixmap( x, y, buf, 0, 0, w, h );
- drawItem( p, QRect(x,y,w,h), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine,
+ drawItem( p, TQRect(x,y,w,h), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine,
*g, mi->isEnabled(), mi->pixmap(), mi->text(),
-1, &btext );
handled = true;
@@ -1427,8 +1427,8 @@ void KThemeStyle::drawControl( ControlElement element,
int x, y, w, h;
r.rect( &x, &y, &w, &h );
- const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget;
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget;
+ TQMenuItem *mi = opt.menuItem();
if ( mi )
{
separator = mi->isSeparator();
@@ -1440,10 +1440,10 @@ void KThemeStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = how & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText, 0 );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
- const QColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
- //QColor btext = cg_ours.buttonText();
+ const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
+ //TQColor btext = cg_ours.buttonText();
if ( checkable )
@@ -1472,9 +1472,9 @@ void KThemeStyle::drawControl( ControlElement element,
{
p->fillRect(
x + dw, y + dw, w - dw * 2, h - dw * 2,
- cg_ours.brush( QColorGroup::Background ) );
- //cg.brush( QColorGroup::Background ));
- //colorGroup( cg_ours, MenuItem ) ->brush( QColorGroup::Background ) );
+ cg_ours.brush( TQColorGroup::Background ) );
+ //cg.brush( TQColorGroup::Background ));
+ //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
}
else
{
@@ -1491,14 +1491,14 @@ void KThemeStyle::drawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() )
{
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect( x, y, checkcol, h ), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r );
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
@@ -1506,10 +1506,10 @@ void KThemeStyle::drawControl( ControlElement element,
drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown );
// Draw the icon
- QPixmap pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode );
+ TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
- QRect pmr( 0, 0, pixw, pixh );
+ TQRect pmr( 0, 0, pixw, pixh );
pmr.moveCenter( cr.center() );
p->setPen( cg_ours.highlightedText() );
p->drawPixmap( pmr.topLeft(), pixmap );
@@ -1524,13 +1524,13 @@ void KThemeStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
//if ( ! active )
// qDrawShadePanel( p, cx, y, checkcol, h, cg_ours, true, 1,
- // &cg_ours.brush(QColorGroup::Midlight) );
+ // &cg_ours.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame * 2, h - itemFrame * 2 ), cg_ours, cflags );
}
@@ -1552,7 +1552,7 @@ void KThemeStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg_ours.mid();
+ TQColor discol = cg_ours.mid();
// Does the menu item draw it's own label?
if ( mi->custom() )
@@ -1575,7 +1575,7 @@ void KThemeStyle::drawControl( ControlElement element,
else
{
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() )
@@ -1623,7 +1623,7 @@ void KThemeStyle::drawControl( ControlElement element,
// Check if it has a pixmap instead
else if ( mi->pixmap() )
{
- QPixmap * pixmap = mi->pixmap();
+ TQPixmap * pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -1643,7 +1643,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode..
- QRect vr = visualRect( QRect( x + w - arrowHMargin - itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim ), r );
// Draw an arrow at the far end of the menu item
@@ -1652,7 +1652,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg_ours.buttonText();
- QColorGroup g2( discol, cg_ours.highlight(), white, white,
+ TQColorGroup g2( discol, cg_ours.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled | Style_Down );
@@ -1666,10 +1666,10 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_ProgressBarGroove:
{
- QBrush bg;
- const QColorGroup * cg2 = colorGroup( cg, ProgressBg );
+ TQBrush bg;
+ const TQColorGroup * cg2 = colorGroup( cg, ProgressBg );
qDrawWinPanel( p, r, *cg2, true );
- bg.setColor( cg2->color( QColorGroup::Background ) );
+ bg.setColor( cg2->color( TQColorGroup::Background ) );
if ( isPixmap( ProgressBg ) )
bg.setPixmap( *uncached( ProgressBg ) );
p->fillRect( x + 2, y + 2, w - 4, h - 4, bg );
@@ -1679,10 +1679,10 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_ProgressBarContents:
{
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
int pstep = 0;
@@ -1718,11 +1718,11 @@ void KThemeStyle::drawControl( ControlElement element,
else
{
//TODO:Optimize
- QPixmap buf( width, h );
- QPainter p2( &buf );
+ TQPixmap buf( width, h );
+ TQPainter p2( &buf );
drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
p2.end();
- QPixmap mirroredPix = QPixmap( buf.convertToImage().mirror( true, false ) );
+ TQPixmap mirroredPix = TQPixmap( buf.convertToImage().mirror( true, false ) );
bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix );
}
}
@@ -1741,10 +1741,10 @@ void KThemeStyle::drawControl( ControlElement element,
void KThemeStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1771,12 +1771,12 @@ void KThemeStyle::drawControlMask( ControlElement element,
void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1787,7 +1787,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( !roundSlider() )
{
- const QSlider * slider = ( const QSlider* ) widget;
+ const TQSlider * slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
if ( horizontal )
{
@@ -1803,15 +1803,15 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
else
{
//This code is from HighColorDefault..
- const QSlider* slider = ( const QSlider* ) widget;
+ const TQSlider* slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
int gcenter = ( horizontal ? r.height() : r.width() ) / 2;
- QRect gr;
+ TQRect gr;
if ( horizontal )
- gr = QRect( r.x(), r.y() + gcenter - 3, r.width(), 7 );
+ gr = TQRect( r.x(), r.y() + gcenter - 3, r.width(), 7 );
else
- gr = QRect( r.x() + gcenter - 3, r.y(), 7, r.height() );
+ gr = TQRect( r.x() + gcenter - 3, r.y(), 7, r.height() );
int x, y, w, h;
gr.rect( &x, &y, &w, &h );
@@ -1839,7 +1839,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( isPixmap( Slider ) )
{
- const QSlider * slider = ( const QSlider* ) widget;
+ const TQSlider * slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
if ( horizontal )
{
@@ -1850,9 +1850,9 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( !vsliderCache )
{
- QWMatrix r270;
+ TQWMatrix r270;
r270.rotate( 270 );
- vsliderCache = new QPixmap( uncached( Slider ) ->xForm( r270 ) );
+ vsliderCache = new TQPixmap( uncached( Slider ) ->xForm( r270 ) );
if ( uncached( Slider ) ->mask() )
vsliderCache->setMask( uncached( Slider ) ->mask() ->xForm( r270 ) );
}
@@ -1864,7 +1864,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
//This code again from HighColor..
//...except sans the gradient..
- const QSlider* slider = ( const QSlider* ) widget;
+ const TQSlider* slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1890,7 +1890,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->setPen( cg.mid() );
p->drawLine( x + 3, y2 - 2, x2 - 2, y2 - 2 );
p->drawLine( x2 - 2, y + 3, x2 - 2, y2 - 2 );
- p->fillRect( QRect( x + 3, y + 3, w - 6, h - 6 ),
+ p->fillRect( TQRect( x + 3, y + 3, w - 6, h - 6 ),
cg.button() );
// Paint riffles
@@ -1950,10 +1950,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
-void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, const QWidget * widget,
- const QRect & r, const QColorGroup & g, SFlags how ,
+void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget,
+ const TQRect & r, const TQColorGroup & g, SFlags how ,
SCFlags controls, SCFlags active,
- const QStyleOption & opt ) const
+ const TQStyleOption & opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1967,8 +1967,8 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
{
case CC_ToolButton:
{
- const QToolButton * toolbutton = ( const QToolButton * ) widget;
- QRect button, menu;
+ const TQToolButton * toolbutton = ( const TQToolButton * ) widget;
+ TQRect button, menu;
button = querySubControlMetrics( control, widget, SC_ToolButton, opt );
menu = querySubControlMetrics( control, widget, SC_ToolButtonMenu, opt );
@@ -1996,7 +1996,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
if ( toolbutton->hasFocus() && !toolbutton->focusProxy() )
{
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords( 3, 3, -3, -3 );
drawPrimitive( PE_FocusRect, p, fr, g );
}
@@ -2022,7 +2022,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
if ( controls & SC_ComboBoxArrow )
{
bool sunken = ( active == SC_ComboBoxArrow );
- QRect ar = QStyle::visualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ),
widget );
ar.rect( &x, &y, &w, &h );
@@ -2041,7 +2041,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
else
{
- mtfstyle->drawPrimitive( PE_ArrowDown, p, QRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
+ mtfstyle->drawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
qDrawShadeRect( p, x, y, w, h, *colorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3,
}
controls ^= SC_ComboBoxArrow;
@@ -2050,14 +2050,14 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
}
case CC_ScrollBar:
{
- const QScrollBar *sb = ( const QScrollBar* ) widget;
+ const TQScrollBar *sb = ( const TQScrollBar* ) widget;
bool maxedOut = ( sb->minValue() == sb->maxValue() );
bool horizontal = ( sb->orientation() == Qt::Horizontal );
SFlags sflags = ( ( horizontal ? Style_Horizontal : Style_Default ) |
( maxedOut ? Style_Default : Style_Enabled ) );
//Here, we don't do add page, subpage, etc.,
- QRect addline, subline, subline2, groove, slider;
+ TQRect addline, subline, subline2, groove, slider;
subline = querySubControlMetrics( control, widget, SC_ScrollBarSubLine, opt );
addline = querySubControlMetrics( control, widget, SC_ScrollBarAddLine, opt );
groove = querySubControlMetrics( control, widget, SC_ScrollBarGroove, opt );
@@ -2065,12 +2065,12 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
slider = querySubControlMetrics( control, widget, SC_ScrollBarSlider, opt );
subline2 = addline;
- QPixmap buf( sb->width(), sb->height() );
- QPainter p2( &buf );
+ TQPixmap buf( sb->width(), sb->height() );
+ TQPainter p2( &buf );
if ( groove.isValid() )
{
- p2.fillRect( groove, QColor( 255, 0, 0 ) );
+ p2.fillRect( groove, TQColor( 255, 0, 0 ) );
drawPrimitive( PE_ScrollBarSubPage, &p2, groove, g,
sflags | ( ( active == SC_ScrollBarSubPage ) ?
Style_Down : Style_Default ) );
@@ -2098,7 +2098,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
// Draw focus rect
if ( sb->hasFocus() )
{
- QRect fr( slider.x() + 2, slider.y() + 2,
+ TQRect fr( slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5 );
drawPrimitive( PE_FocusRect, &p2, fr, g, Style_Default );
}
@@ -2124,7 +2124,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
}
-void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
+void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
bool round ) const
{
// round edge fills
@@ -2152,13 +2152,13 @@ void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
3, 1, 3, 2, 3, 3, 3, 4, 3, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4
};
- QBrush fillBrush( color1, SolidPattern );
+ TQBrush fillBrush( color1, SolidPattern );
p->setPen( color1 );
if ( round && w > 19 && h > 19 )
{
int x2 = x + w - 1;
int y2 = y + h - 1;
- QPointArray a( QCOORDARRLEN( top_left_fill ), top_left_fill );
+ TQPointArray a( QCOORDARRLEN( top_left_fill ), top_left_fill );
a.translate( 1, 1 );
p->drawPoints( a );
a.setPoints( QCOORDARRLEN( btm_left_fill ), btm_left_fill );
@@ -2184,7 +2184,7 @@ void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
p->fillRect( x, y, w, h, fillBrush );
}
-int KThemeStyle::styleHint( StyleHint sh, const QWidget *w, const QStyleOption &opt, QStyleHintReturn *shr ) const
+int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
{
switch ( sh )
{
@@ -2220,12 +2220,12 @@ int KThemeStyle::styleHint( StyleHint sh, const QWidget *w, const QStyleOption &
* about excessive cache misses. This is a memory/speed tradeoff that I
* have to test.
*/
-void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool rounded,
+void KThemeStyle::drawShade( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool rounded,
int hWidth, int bWidth, ShadeStyle style ) const
{
int i, sc, bc, x2, y2;
- QPen highPen, lowPen;
+ TQPen highPen, lowPen;
if ( style == Motif )
{
@@ -2242,8 +2242,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
if ( rounded && w > 19 && h > 19 )
{
x2 = x + w - 1, y2 = y + h - 1;
- QPointArray bPntArray, hPntArray, lPntArray;
- QPointArray bLineArray, hLineArray, lLineArray;
+ TQPointArray bPntArray, hPntArray, lPntArray;
+ TQPointArray bLineArray, hLineArray, lLineArray;
// borders
for ( i = 0, bc = 0; i < bWidth; ++i )
{
@@ -2312,8 +2312,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
// Rectangular buttons
else
{
- QPointArray highShade( hWidth * 4 );
- QPointArray lowShade( hWidth * 4 );
+ TQPointArray highShade( hWidth * 4 );
+ TQPointArray lowShade( hWidth * 4 );
p->setPen( g.shadow() );
for ( i = 0; i < bWidth && w > 2 && h > 2; ++i, ++x, ++y, w -= 2, h -= 2 )
@@ -2353,8 +2353,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
-int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
- const QFontMetrics &fm )
+int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, TQMenuItem *mi,
+ const TQFontMetrics &fm )
{
int h2, h = 0;
int offset = QMAX( decoWidth( MenuItemDown ), decoWidth( MenuItem ) ) + 4;
@@ -2372,7 +2372,7 @@ int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
if ( mi->iconSet() )
{
h2 = mi->iconSet() ->
- pixmap( QIconSet::Small, QIconSet::Normal ).height() + offset;
+ pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + offset;
h = h2 > h ? h2 : h;
}
h2 = fm.height() + offset;
diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h
index 9b7d54b60..00d6256e7 100644
--- a/kstyles/kthemestyle/kthemestyle.h
+++ b/kstyles/kthemestyle/kthemestyle.h
@@ -40,18 +40,18 @@ Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
#ifndef KTHEMESTYLE_H
#define KTHEMESTYLE_H
-#include <qglobal.h>
+#include <tqglobal.h>
#include "kthemebase.h"
-#include <qwindowdefs.h>
-#include <qobject.h>
-#include <qbutton.h>
-#include <qpushbutton.h>
-#include <qscrollbar.h>
-#include <qtabbar.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qmap.h>
+#include <tqwindowdefs.h>
+#include <tqobject.h>
+#include <tqbutton.h>
+#include <tqpushbutton.h>
+#include <tqscrollbar.h>
+#include <tqtabbar.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqmap.h>
/**
@@ -76,74 +76,74 @@ public:
* @param configFile A KConfig file to use as the theme configuration.
* Defaults to ~/.kderc.
*/
- KThemeStyle( const QString& configDir, const QString &configFile = QString::null );
+ KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null );
~KThemeStyle();
- virtual int pixelMetric ( PixelMetric metric, const QWidget * widget = 0 ) const;
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
- virtual void drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg,
+ virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual int styleHint( StyleHint sh,
- const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default,
+ const TQWidget *widget = 0,
+ const TQStyleOption& = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const;
- virtual QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption& = QStyleOption::Default ) const;
+ virtual TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- virtual QRect subRect(SubRect, const QWidget *) const;
+ virtual TQRect subRect(SubRect, const TQWidget *) const;
- virtual void polish( QWidget* );
- virtual void unPolish( QWidget* );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual void polish( TQWidget* );
+ virtual void unPolish( TQWidget* );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
/**
* By default this just sets the background brushes to the pixmapped
* background.
*/
- virtual void polish( QApplication *app );
- virtual void unPolish( QApplication* );
+ virtual void polish( TQApplication *app );
+ virtual void unPolish( TQApplication* );
/** \internal */
// to make it possible for derived classes to overload this function
- virtual void polish( QPalette& pal );
+ virtual void polish( TQPalette& pal );
/**
* This is a convenience method for drawing widgets with
@@ -155,14 +155,14 @@ public:
* @param y The y coordinate of the buttons' upper left hand corner.
* @param w The button width.
* @param h The button height.
- * @param p The QPainter to draw on.
+ * @param p The TQPainter to draw on.
* @param g The color group to use.
* @param sunken The button is drawn with a sunken style if @p true
* @param rounded @p true if the widget is rounded, @p false if rectangular.
* @param type The widget type to paint.
*/
- virtual void drawBaseButton( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken = false,
+ virtual void drawBaseButton( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken = false,
bool rounded = false, WidgetType type = Bevel ) const;
/**
* Draw a mask with for widgets that may be rounded.
@@ -170,14 +170,14 @@ public:
*Currently used
* by pushbuttons and comboboxes.
*
- * @param p The QPainter to draw on.
+ * @param p The TQPainter to draw on.
* @param x The x coordinate of the widget's upper left hand corner.
* @param y The y coordinate of the widget's upper left hand corner.
* @param w The widget width.
* @param h The widget height.
* @param rounded @p true if the widget is rounded, @p false if rectangular.
*/
- virtual void drawBaseMask( QPainter *p, int x, int y, int w, int h,
+ virtual void drawBaseMask( TQPainter *p, int x, int y, int w, int h,
bool rounded ) const;
@@ -198,22 +198,22 @@ public:
* @param bWidth The border width.
* @param style The shading style to use.
*/
- virtual void drawShade( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool rounded,
+ virtual void drawShade( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool rounded,
int hWidth, int bWidth, ShadeStyle style ) const;
- int popupMenuItemHeight( bool checkable, QMenuItem *mi,
- const QFontMetrics &fm );
+ int popupMenuItemHeight( bool checkable, TQMenuItem *mi,
+ const TQFontMetrics &fm );
protected:
- QPalette oldPalette, popupPalette, indiPalette, exIndiPalette;
+ TQPalette oldPalette, popupPalette, indiPalette, exIndiPalette;
bool paletteSaved;
bool polishLock;
- QStyle *mtfstyle;
+ TQStyle *mtfstyle;
- QPixmap* makeMenuBarCache(int w, int h) const;
+ TQPixmap* makeMenuBarCache(int w, int h) const;
- mutable QPixmap* menuCache;
- mutable QPixmap* vsliderCache;
+ mutable TQPixmap* menuCache;
+ mutable TQPixmap* vsliderCache;
Qt::HANDLE brushHandle;
bool brushHandleSet;
diff --git a/kstyles/light/light.cpp b/kstyles/light/light.cpp
index 264bc5b3d..caa1d3e8f 100644
--- a/kstyles/light/light.cpp
+++ b/kstyles/light/light.cpp
@@ -20,7 +20,7 @@
DEALINGS IN THE SOFTWARE.
*/
-#include <qstyleplugin.h>
+#include <tqstyleplugin.h>
#include "lightstyle-v2.h"
#include "lightstyle-v3.h"
@@ -29,24 +29,24 @@ class LightStylePlugin : public QStylePlugin
public:
LightStylePlugin();
- QStringList keys() const;
- QStyle *create(const QString &);
+ TQStringList keys() const;
+ TQStyle *create(const TQString &);
};
LightStylePlugin::LightStylePlugin()
- : QStylePlugin()
+ : TQStylePlugin()
{
}
-QStringList LightStylePlugin::keys() const
+TQStringList LightStylePlugin::keys() const
{
- QStringList list;
+ TQStringList list;
list << "Light, 2nd revision";
list << "Light, 3rd revision";
return list;
}
-QStyle *LightStylePlugin::create(const QString &s)
+TQStyle *LightStylePlugin::create(const TQString &s)
{
if (s.lower() == "light, 2nd revision")
return new LightStyleV2;
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index a562c03c0..13569379b 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -22,23 +22,23 @@
#include "lightstyle-v2.h"
-#include "qmenubar.h"
-#include "qapplication.h"
-#include "qpainter.h"
-#include "qpalette.h"
-#include "qframe.h"
-#include "qpushbutton.h"
-#include "qdrawutil.h"
-#include "qprogressbar.h"
-#include "qscrollbar.h"
-#include "qtabbar.h"
-#include "qguardedptr.h"
-#include "qlayout.h"
-#include "qlineedit.h"
-#include "qimage.h"
-#include "qcombobox.h"
-#include "qslider.h"
-#include "qstylefactory.h"
+#include "tqmenubar.h"
+#include "tqapplication.h"
+#include "tqpainter.h"
+#include "tqpalette.h"
+#include "tqframe.h"
+#include "tqpushbutton.h"
+#include "tqdrawutil.h"
+#include "tqprogressbar.h"
+#include "tqscrollbar.h"
+#include "tqtabbar.h"
+#include "tqguardedptr.h"
+#include "tqlayout.h"
+#include "tqlineedit.h"
+#include "tqimage.h"
+#include "tqcombobox.h"
+#include "tqslider.h"
+#include "tqstylefactory.h"
class LightStyleV2Private
@@ -47,9 +47,9 @@ public:
LightStyleV2Private()
: ref(1)
{
- basestyle = QStyleFactory::create( "Windows" );
+ basestyle = TQStyleFactory::create( "Windows" );
if ( ! basestyle )
- basestyle = QStyleFactory::create( QStyleFactory::keys().first() );
+ basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" );
}
@@ -59,7 +59,7 @@ public:
delete basestyle;
}
- QStyle *basestyle;
+ TQStyle *basestyle;
int ref;
};
@@ -83,23 +83,23 @@ LightStyleV2::~LightStyleV2()
}
}
-void LightStyleV2::polishPopupMenu( QPopupMenu * menu )
+void LightStyleV2::polishPopupMenu( TQPopupMenu * menu )
{
KStyle::polishPopupMenu(menu);
}
-static void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg,
- QStyle::SFlags flags, const QBrush *fill = 0)
+static void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ TQStyle::SFlags flags, const TQBrush *fill = 0)
{
- QRect br = r;
- bool sunken = (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken));
+ TQRect br = r;
+ bool sunken = (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken));
p->setPen(cg.dark());
p->drawRect(r);
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -130,19 +130,19 @@ static void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg,
}
void LightStyleV2::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (pe) {
case PE_HeaderSection:
{
flags = ((flags | Style_Sunken) ^ Style_Sunken) | Style_Raised;
//Don't show pressed too often (as in light 3)
- QBrush fill(cg.background());
- if (flags & QStyle::Style_Enabled)
+ TQBrush fill(cg.background());
+ if (flags & TQStyle::Style_Enabled)
fill.setColor(cg.button());
drawLightBevel(p, r, cg, flags, &fill);
@@ -154,41 +154,41 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ButtonBevel:
case PE_ButtonTool:
{
- const QBrush *fill;
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ const TQBrush *fill;
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
drawLightBevel(p, r, cg, flags, fill);
break;
}
case PE_ButtonDropDown:
{
- QBrush thefill;
+ TQBrush thefill;
bool sunken =
- (flags & (QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken));
+ (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken));
- if (flags & QStyle::Style_Enabled) {
+ if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(QColorGroup::Midlight);
+ thefill = cg.brush(TQColorGroup::Midlight);
else
- thefill = cg.brush(QColorGroup::Button);
+ thefill = cg.brush(TQColorGroup::Button);
} else
- thefill = cg.brush(QColorGroup::Background);
+ thefill = cg.brush(TQColorGroup::Background);
p->setPen(cg.dark());
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.topRight(), r.bottomRight());
p->drawLine(r.bottomRight(), r.bottomLeft());
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -222,13 +222,13 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
break;
case PE_Indicator:
- const QBrush *fill;
+ const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(QColorGroup::Mid);
+ fill = &cg.brush(TQColorGroup::Mid);
else
- fill = &cg.brush(QColorGroup::Base);
+ fill = &cg.brush(TQColorGroup::Base);
drawLightBevel(p, r, cg, flags | Style_Sunken, fill);
p->setPen(cg.text());
@@ -258,14 +258,14 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator:
{
- QRect br = r, // bevel rect
+ TQRect br = r, // bevel rect
cr = r, // contents rect
ir = r; // indicator rect
br.addCoords(1, 1, -1, -1);
cr.addCoords(2, 2, -2, -2);
ir.addCoords(3, 3, -3, -3);
- p->fillRect(r, cg.brush(QColorGroup::Background));
+ p->fillRect(r, cg.brush(TQColorGroup::Background));
p->setPen(cg.dark());
p->drawArc(r, 0, 16*360);
@@ -290,12 +290,12 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowHandle:
{
- QString title;
+ TQString title;
bool drawTitle = false;
- if ( p && p->device()->devType() == QInternal::Widget ) {
- QWidget *w = (QWidget *) p->device();
- QWidget *p = w->parentWidget();
- if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
+ if ( p && p->device()->devType() == TQInternal::Widget ) {
+ TQWidget *w = (TQWidget *) p->device();
+ TQWidget *p = w->parentWidget();
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
@@ -304,15 +304,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
flags |= Style_Raised;
if (flags & Style_Horizontal) {
if (drawTitle) {
- QPixmap pm(r.height(), r.width());
- QPainter p2(&pm);
+ TQPixmap pm(r.height(), r.width());
+ TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
- QWMatrix m;
+ TQWMatrix m;
m.rotate(270.0);
pm = pm.xForm(m);
p->drawPixmap(r.x(), r.y(), pm);
@@ -331,7 +331,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(QColorGroup::Highlight));
+ p->fillRect(r, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -366,7 +366,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
p->drawLine(r.left() + 6, r.top() + 2, r.right() - 6, r.top() + 2);
}
} else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -412,7 +412,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (lw == 2)
drawLightBevel(p, r, cg, flags);
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -423,9 +423,9 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -435,15 +435,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2)
- drawLightBevel(p, r, cg, flags, &cg.brush(QColorGroup::Button));
+ drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_ScrollBarSubLine:
{
- QRect fr = r, ar = r;
+ TQRect fr = r, ar = r;
PrimitiveElement pe;
p->setPen(cg.dark());
@@ -460,15 +460,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Background));
+ TQColorGroup::Midlight :
+ TQColorGroup::Background));
drawPrimitive(pe, p, ar, cg, flags);
break;
}
case PE_ScrollBarAddLine:
{
- QRect fr = r, ar = r;
+ TQRect fr = r, ar = r;
PrimitiveElement pe;
p->setPen(cg.dark());
@@ -485,8 +485,8 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Background));
+ TQColorGroup::Midlight :
+ TQColorGroup::Background));
drawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -494,7 +494,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarSubPage:
case PE_ScrollBarAddPage:
{
- QRect fr = r;
+ TQRect fr = r;
p->setPen(cg.dark());
if (flags & Style_Horizontal) {
@@ -510,14 +510,14 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Mid));
+ TQColorGroup::Midlight :
+ TQColorGroup::Mid));
break;
}
case PE_ScrollBarSlider:
{
- QRect fr = r;
+ TQRect fr = r;
p->setPen(cg.dark());
if (flags & Style_Horizontal) {
@@ -534,7 +534,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
break;
}
@@ -563,7 +563,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) {
- QPointArray a;
+ TQPointArray a;
switch ( pe ) {
case PE_ArrowUp:
@@ -607,31 +607,31 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
void LightStyleV2::drawControl( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_TabBarTab:
{
- const QTabBar* tb = static_cast<const QTabBar*>(widget);
+ const TQTabBar* tb = static_cast<const TQTabBar*>(widget);
bool below = false;
- QRect tr(r);
- QRect fr(r);
+ TQRect tr(r);
+ TQRect fr(r);
tr.addCoords(0, 0, 0, -1);
fr.addCoords(2, 2, -2, -2);
- if ( tb->shape() == QTabBar::RoundedBelow || tb->shape() == QTabBar::TriangularBelow) {
+ if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) {
tr = r; tr.addCoords(0, 1, 0, 0);
fr = r; fr.addCoords(2, 2,-2, -4);
below = true;
@@ -776,8 +776,8 @@ void LightStyleV2::drawControl( ControlElement control,
if (! widget || data.isDefault())
break;
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
int tab = data.tabWidth();
int maxpmw = data.maxIconWidth();
@@ -786,7 +786,7 @@ void LightStyleV2::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen(cg.mid().dark(120));
p->drawLine(r.left() + 12, r.top() + 1,
@@ -799,18 +799,18 @@ void LightStyleV2::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi )
break;
maxpmw = QMAX(maxpmw, 16);
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
// submenu indicator column
@@ -820,7 +820,7 @@ void LightStyleV2::drawControl( ControlElement control,
// item column
ir.setCoords(cr.right() + 4, r.top(), tr.right() - 4, r.bottom());
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
cr = visualRect( cr, r );
sr = visualRect( sr, r );
@@ -831,21 +831,21 @@ void LightStyleV2::drawControl( ControlElement control,
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) {
- QIconSet::Mode mode =
- (flags & Style_Enabled) ? QIconSet::Normal : QIconSet::Disabled;
+ TQIconSet::Mode mode =
+ (flags & Style_Enabled) ? TQIconSet::Normal : TQIconSet::Disabled;
if ((flags & Style_Active) && (flags & Style_Enabled))
- mode = QIconSet::Active;
- QPixmap pixmap;
+ mode = TQIconSet::Active;
+ TQPixmap pixmap;
if (popupmenu->isCheckable() && mi->isChecked())
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode, QIconSet::On );
+ mi->iconSet()->pixmap( TQIconSet::Small, mode, TQIconSet::On );
else
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr(QPoint(0, 0), pixmap.size());
+ mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr(TQPoint(0, 0), pixmap.size());
pmr.moveCenter(cr.center());
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
@@ -853,8 +853,8 @@ void LightStyleV2::drawControl( ControlElement control,
drawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
- QColor textcolor;
- QColor embosscolor;
+ TQColor textcolor;
+ TQColor embosscolor;
if (flags & Style_Active) {
if (! (flags & Style_Enabled))
textcolor = cg.midlight().dark();
@@ -885,7 +885,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->restore();
}
- QString text = mi->text();
+ TQString text = mi->text();
if (! text.isNull()) {
int t = text.find('\t');
@@ -917,7 +917,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->drawText(ir, alignFlag, text, t);
} else if (mi->pixmap()) {
- QPixmap pixmap = *mi->pixmap();
+ TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
p->setBackgroundMode(OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
@@ -932,13 +932,13 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
case CE_DockWindowEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
@@ -946,14 +946,14 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarItem:
{
if (flags & Style_Active)
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if (data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
+ TQMenuItem *mi = data.menuItem();
drawItem(p, r, AlignCenter | ShowPrefix | DontClip | SingleLine, cg,
flags & Style_Enabled, mi->pixmap(), mi->text(), -1,
&cg.buttonText());
@@ -961,20 +961,20 @@ void LightStyleV2::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(QColorGroup::Background));
+ drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background));
break;
default:
- QCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
void LightStyleV2::drawControlMask( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption &data ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_PushButton:
@@ -982,19 +982,19 @@ void LightStyleV2::drawControlMask( ControlElement control,
break;
default:
- QCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(control, p, widget, r, data);
break;
}
}
-QRect LightStyleV2::subRect(SubRect subrect, const QWidget *widget) const
+TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
{
- QRect rect, wrect(widget->rect());
+ TQRect rect, wrect(widget->rect());
switch (subrect) {
case SR_PushButtonFocusRect:
{
- const QPushButton *button = (const QPushButton *) widget;
+ const TQPushButton *button = (const TQPushButton *) widget;
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
@@ -1009,47 +1009,47 @@ QRect LightStyleV2::subRect(SubRect subrect, const QWidget *widget) const
}
default:
- rect = QCommonStyle::subRect(subrect, widget);
+ rect = TQCommonStyle::subRect(subrect, widget);
}
return rect;
}
void LightStyleV2::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CC_ComboBox:
{
- const QComboBox *combobox = (const QComboBox *) widget;
- QRect frame, arrow, field;
+ const TQComboBox *combobox = (const TQComboBox *) widget;
+ TQRect frame, arrow, field;
frame =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Raised,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
if (active == SC_ComboBoxArrow)
- p->fillRect(arrow, cg.brush(QColorGroup::Mid));
+ p->fillRect(arrow, cg.brush(TQColorGroup::Mid));
arrow.addCoords(4, 2, -2, -2);
drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
@@ -1065,13 +1065,13 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- p->fillRect( field, cg.brush( QColorGroup::Highlight ) );
- QRect fr =
- QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
+ TQRect fr =
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
drawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ TQStyleOption(cg.highlight()));
}
p->setPen(cg.highlightedText());
@@ -1084,8 +1084,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
- const QSpinWidget *spinwidget = (const QSpinWidget *) widget;
- QRect frame, up, down;
+ const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
+ TQRect frame, up, down;
frame = querySubControlMetrics(CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
@@ -1094,18 +1094,18 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Sunken,
- &cg.brush(QColorGroup::Base));
+ &cg.brush(TQColorGroup::Base));
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
p->setPen(cg.dark());
p->drawLine(up.topLeft(), up.bottomLeft());
up.addCoords(1, 0, 0, 0);
- p->fillRect(up, cg.brush(QColorGroup::Button));
+ p->fillRect(up, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetUp)
p->setPen(cg.mid());
else
@@ -1131,14 +1131,14 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetDown) && down.isValid()) {
PrimitiveElement pe = PE_SpinWidgetDown;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
p->setPen(cg.dark());
p->drawLine(down.topLeft(), down.bottomLeft());
down.addCoords(1, 0, 0, 0);
- p->fillRect(down, cg.brush(QColorGroup::Button));
+ p->fillRect(down, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetDown)
p->setPen(cg.mid());
else
@@ -1167,8 +1167,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
bool maxedOut = (scrollbar->minValue() == scrollbar->maxValue());
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, data);
@@ -1239,7 +1239,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
// ### perhaps this should not be able to accept focus if maxedOut?
if (scrollbar->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -1250,8 +1250,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
+ const TQSlider *slider = (const TQSlider *) widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
data),
handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle,
data);
@@ -1270,18 +1270,18 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) |
((flags & Style_Enabled) ? Style_Sunken : Style_Default),
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(TQColorGroup::Midlight));
}
if ((controls & SC_SliderHandle) && handle.isValid()) {
drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
}
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
@@ -1293,23 +1293,23 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
break;
default:
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
}
-QRect LightStyleV2::querySubControlMetrics( ComplexControl control,
- const QWidget *widget,
+TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
+ const TQWidget *widget,
SubControl sc,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect ret;
+ TQRect ret;
switch (control) {
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1386,19 +1386,19 @@ QRect LightStyleV2::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
return ret;
}
-QStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
- const QWidget *widget,
- const QPoint &pos,
- const QStyleOption &data ) const
+TQStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
+ const TQWidget *widget,
+ const TQPoint &pos,
+ const TQStyleOption &data ) const
{
- QStyle::SubControl ret = QCommonStyle::querySubControl(control, widget, pos, data);
+ TQStyle::SubControl ret = TQCommonStyle::querySubControl(control, widget, pos, data);
// this is an ugly hack, but i really don't care, it's the quickest way to
// enabled the third button
@@ -1410,7 +1410,7 @@ QStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
}
int LightStyleV2::pixelMetric( PixelMetric metric,
- const QWidget *widget ) const
+ const TQWidget *widget ) const
{
int ret;
@@ -1472,25 +1472,25 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
break;
default:
- ret = QCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
return ret;
}
-QSize LightStyleV2::sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption &data ) const
+TQSize LightStyleV2::sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption &data ) const
{
- QSize ret;
+ TQSize ret;
switch (contents) {
case CT_PushButton:
{
- const QPushButton *button = (const QPushButton *) widget;
- ret = QCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ const TQPushButton *button = (const TQPushButton *) widget;
+ ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
// only expand the button if we are displaying text...
@@ -1510,7 +1510,7 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
}
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
@@ -1519,8 +1519,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
if (! widget || data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
int maxpmw = data.maxIconWidth();
int w = contentsSize.width(), h = contentsSize.height();
@@ -1542,8 +1542,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
else if (! mi->text().isNull())
h = QMAX(h, popupmenu->fontMetrics().height() + 2);
if (mi->iconSet() != 0)
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small,
- QIconSet::Normal).height());
+ h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small,
+ TQIconSet::Normal).height());
h += 2;
}
@@ -1556,21 +1556,21 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
- ret = QSize(w, h);
+ ret = TQSize(w, h);
break;
}
case CT_ProgressBar:
{
- const QProgressBar* pb = static_cast<const QProgressBar*>(widget);
+ const TQProgressBar* pb = static_cast<const TQProgressBar*>(widget);
//If we have to display the indicator, and we do it on RHS, give some more room
//for it. This tries to match the logic and the spacing in SR_ProgressBarGroove/Contents
- //sizing in QCommonStyle.
+ //sizing in TQCommonStyle.
if (pb->percentageVisible() &&
(pb->indicatorFollowsStyle() || ! pb->centerIndicator()))
{
int addw = pb->fontMetrics().width("100%") + 6;
- return QSize(contentsSize.width() + addw, contentsSize.height());
+ return TQSize(contentsSize.width() + addw, contentsSize.height());
}
else
return contentsSize; //Otherwise leave unchanged
@@ -1579,7 +1579,7 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
default:
- ret = QCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
break;
}
@@ -1587,8 +1587,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
int LightStyleV2::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
+ const TQWidget *widget,
+ const TQStyleOption &option,
QStyleHintReturn* returnData ) const
{
int ret;
@@ -1611,16 +1611,16 @@ int LightStyleV2::styleHint( StyleHint stylehint,
break;
default:
- ret = QCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
return ret;
}
-QPixmap LightStyleV2::stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget,
- const QStyleOption &data ) const
+TQPixmap LightStyleV2::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget,
+ const TQStyleOption &data ) const
{
return singleton->basestyle->stylePixmap( stylepixmap, widget, data );
}
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index 6a7befd0c..e5a3fffac 100644
--- a/kstyles/light/lightstyle-v2.h
+++ b/kstyles/light/lightstyle-v2.h
@@ -42,43 +42,43 @@ public:
LightStyleV2();
virtual ~LightStyleV2();
- void polishPopupMenu( QPopupMenu * );
+ void polishPopupMenu( TQPopupMenu * );
- void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
+ void drawPrimitive(PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default) const;
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default) const;
- QRect subRect(SubRect, const QWidget *) const;
+ TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
+ void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQRect querySubControlMetrics(ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- SubControl querySubControl(ComplexControl, const QWidget *, const QPoint &,
- const QStyleOption &data = QStyleOption::Default ) const;
+ SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
+ const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const QWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
- QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
};
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index fc9966b63..49900c8f5 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -22,24 +22,24 @@
#include "lightstyle-v3.h"
-#include "qmenubar.h"
-#include "qapplication.h"
-#include "qcheckbox.h"
-#include "qpainter.h"
-#include "qpalette.h"
-#include "qframe.h"
-#include "qpushbutton.h"
-#include "qdrawutil.h"
-#include "qprogressbar.h"
-#include "qscrollbar.h"
-#include "qtabbar.h"
-#include "qguardedptr.h"
-#include "qlayout.h"
-#include "qlineedit.h"
-#include "qimage.h"
-#include "qcombobox.h"
-#include "qslider.h"
-#include "qstylefactory.h"
+#include "tqmenubar.h"
+#include "tqapplication.h"
+#include "tqcheckbox.h"
+#include "tqpainter.h"
+#include "tqpalette.h"
+#include "tqframe.h"
+#include "tqpushbutton.h"
+#include "tqdrawutil.h"
+#include "tqprogressbar.h"
+#include "tqscrollbar.h"
+#include "tqtabbar.h"
+#include "tqguardedptr.h"
+#include "tqlayout.h"
+#include "tqlineedit.h"
+#include "tqimage.h"
+#include "tqcombobox.h"
+#include "tqslider.h"
+#include "tqstylefactory.h"
// The Light Style, 3rd revision
@@ -47,9 +47,9 @@
LightStyleV3::LightStyleV3()
: KStyle(AllowMenuTransparency)
{
- basestyle = QStyleFactory::create( "Windows" );
+ basestyle = TQStyleFactory::create( "Windows" );
if ( ! basestyle )
- basestyle = QStyleFactory::create( QStyleFactory::keys().first() );
+ basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" );
}
@@ -59,7 +59,7 @@ LightStyleV3::~LightStyleV3()
delete basestyle;
}
-void LightStyleV3::polishPopupMenu( QPopupMenu * menu)
+void LightStyleV3::polishPopupMenu( TQPopupMenu * menu)
{
KStyle::polishPopupMenu(menu);
// empty to satisy pure virtual requirements
@@ -101,12 +101,12 @@ void LightStyleV3::polishPopupMenu( QPopupMenu * menu)
the etching and border )
F is the fill ( optional, not drawn by default )
*/
-static void drawLightEtch( QPainter *p,
- const QRect &rect,
- const QColor &color,
+static void drawLightEtch( TQPainter *p,
+ const TQRect &rect,
+ const TQColor &color,
bool sunken )
{
- QPointArray pts( 4 );
+ TQPointArray pts( 4 );
pts.setPoint( 0, rect.left(), rect.bottom() - 1);
pts.setPoint( 1, rect.left(), rect.top() );
@@ -123,20 +123,20 @@ static void drawLightEtch( QPainter *p,
p->drawLineSegments( pts );
}
-static void drawLightBevel( QPainter *p,
- const QRect &rect,
- const QColorGroup &cg,
- QStyle::SFlags flags,
+static void drawLightBevel( TQPainter *p,
+ const TQRect &rect,
+ const TQColorGroup &cg,
+ TQStyle::SFlags flags,
int linewidth,
bool etch = false, // light sunken bevel around border
bool border = true, // rectangle around bevel
- const QBrush *fill = 0 ) // contents fill
+ const TQBrush *fill = 0 ) // contents fill
{
- QRect br = rect;
- bool bevel = ( flags & ( QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised ) );
- bool sunken = (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken));
+ TQRect br = rect;
+ bool bevel = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised ) );
+ bool sunken = (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken));
if ( etch && linewidth > 0 ) {
drawLightEtch( p, br, cg.background(), true );
@@ -161,7 +161,7 @@ static void drawLightBevel( QPainter *p,
br.rect( &x, &y, &w, &h );
// copied form qDrawShadePanel - just changed the highlight colors...
- QPointArray a( 4*linewidth );
+ TQPointArray a( 4*linewidth );
if ( sunken )
p->setPen( border ? cg.mid() : cg.dark() );
else
@@ -213,14 +213,14 @@ static void drawLightBevel( QPainter *p,
}
void LightStyleV3::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect br = r;
- const QBrush *fill = 0;
+ TQRect br = r;
+ const TQBrush *fill = 0;
switch (pe) {
case PE_HeaderSection:
@@ -249,7 +249,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight : QColorGroup::Button ) );
+ TQColorGroup::Midlight : TQColorGroup::Button ) );
// the taskbuttons in kicker seem to allow the style to set the pencolor
// here, which will be used to draw the text for focused window buttons...
@@ -259,17 +259,17 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ButtonCommand:
{
- QRect br = r;
+ TQRect br = r;
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
bool etch = true;
if ( flags & Style_ButtonDefault ) {
@@ -284,40 +284,40 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ButtonBevel:
case PE_ButtonTool:
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
false, true, fill );
break;
case PE_ButtonDropDown:
{
- QBrush thefill;
+ TQBrush thefill;
bool sunken =
- (flags & (QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken));
+ (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken));
- if (flags & QStyle::Style_Enabled) {
+ if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(QColorGroup::Midlight);
+ thefill = cg.brush(TQColorGroup::Midlight);
else
- thefill = cg.brush(QColorGroup::Button);
+ thefill = cg.brush(TQColorGroup::Button);
} else
- thefill = cg.brush(QColorGroup::Background);
+ thefill = cg.brush(TQColorGroup::Background);
p->setPen( cg.dark() );
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.topRight(), r.bottomRight());
p->drawLine(r.bottomRight(), r.bottomLeft());
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -350,13 +350,13 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
break;
case PE_Indicator:
- const QBrush *fill;
+ const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(QColorGroup::Mid);
+ fill = &cg.brush(TQColorGroup::Mid);
else
- fill = &cg.brush(QColorGroup::Base);
+ fill = &cg.brush(TQColorGroup::Base);
drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill );
p->setPen(cg.text());
@@ -386,7 +386,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator:
{
- QRect br = r, // bevel rect
+ TQRect br = r, // bevel rect
lr = r, // outline rect
cr = r, // contents rect
ir = r; // indicator rect
@@ -394,7 +394,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
cr.addCoords( 2, 2, -2, -2 );
ir.addCoords( 3, 3, -3, -3 );
- p->fillRect( r, cg.brush( QColorGroup::Background ) );
+ p->fillRect( r, cg.brush( TQColorGroup::Background ) );
p->setPen( flags & Style_Down ? cg.mid() :
( flags & Style_Enabled ? cg.base() : cg.background() ) );
@@ -422,12 +422,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowHandle:
{
- QString title;
+ TQString title;
bool drawTitle = false;
- if ( p && p->device()->devType() == QInternal::Widget ) {
- QWidget *w = (QWidget *) p->device();
- QWidget *p = w->parentWidget();
- if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
+ if ( p && p->device()->devType() == TQInternal::Widget ) {
+ TQWidget *w = (TQWidget *) p->device();
+ TQWidget *p = w->parentWidget();
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
@@ -436,15 +436,15 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
flags |= Style_Raised;
if (flags & Style_Horizontal) {
if (drawTitle) {
- QPixmap pm(r.height(), r.width());
- QPainter p2(&pm);
+ TQPixmap pm(r.height(), r.width());
+ TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
- QWMatrix m;
+ TQWMatrix m;
m.rotate(270.0);
pm = pm.xForm(m);
p->drawPixmap(r.x(), r.y(), pm);
@@ -460,7 +460,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(QColorGroup::Highlight));
+ p->fillRect(r, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -505,7 +505,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowResizeHandle:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.shadow() );
p->drawRect( br );
@@ -525,7 +525,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( QColorGroup::Button ) );
+ p->fillRect( br, cg.brush( TQColorGroup::Button ) );
break;
}
@@ -540,7 +540,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelTabWidget:
case PE_WindowFrame:
{
- QRect br = r;
+ TQRect br = r;
int cover = 0;
int reallw = ( data.isDefault() ?
@@ -553,7 +553,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
br.addCoords( 1, 1, -1, -1 );
while ( cover-- > 0 ) {
- QPointArray pts( 8 );
+ TQPointArray pts( 8 );
pts.setPoint( 0, br.left(), br.bottom() - 1);
pts.setPoint( 1, br.left(), br.top() );
pts.setPoint( 2, br.left() + 1, br.top() );
@@ -574,19 +574,19 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( QColorGroup::Button ) );
+ &cg.brush( TQColorGroup::Button ) );
break;
case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( QColorGroup::Button ) );
+ &cg.brush( TQColorGroup::Button ) );
break;
case PE_ScrollBarSubLine:
{
- QRect br = r;
+ TQRect br = r;
PrimitiveElement pe;
p->setPen( cg.background() );
@@ -608,8 +608,8 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
@@ -620,7 +620,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarAddLine:
{
- QRect br = r;
+ TQRect br = r;
PrimitiveElement pe;
p->setPen( cg.background() );
@@ -642,8 +642,8 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
@@ -654,7 +654,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarSubPage:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -673,14 +673,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
break;
}
case PE_ScrollBarAddPage:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -699,14 +699,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
break;
}
case PE_ScrollBarSlider:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -728,7 +728,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
p->drawLine( br.topRight(), br.bottomRight() );
br.addCoords( 1, 1, -1, -1 );
- p->fillRect( br, cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( br, cg.brush( TQColorGroup::Highlight ) );
break;
}
@@ -754,7 +754,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) {
- QPointArray a;
+ TQPointArray a;
switch ( pe ) {
case PE_ArrowUp:
@@ -798,26 +798,26 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
void LightStyleV3::drawControl( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_TabBarTab:
{
- const QTabBar *tb = (const QTabBar *) widget;
- QRect br = r;
+ const TQTabBar *tb = (const TQTabBar *) widget;
+ TQRect br = r;
- if ( tb->shape() == QTabBar::RoundedAbove ) {
+ if ( tb->shape() == TQTabBar::RoundedAbove ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.bottom(),
@@ -846,13 +846,13 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(QColorGroup::Highlight));
+ p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight));
br.addCoords( 1, 1, -4, 0 );
}
else
br.addCoords( 1, 1, -1, 0 );
p->fillRect( br, cg.background() );
- } else if ( tb->shape() == QTabBar::RoundedBelow ) {
+ } else if ( tb->shape() == TQTabBar::RoundedBelow ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.top(),
@@ -884,7 +884,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(QColorGroup::Highlight));
+ p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight));
br.addCoords( 1, 0, -3, -1 );
}
else
@@ -892,7 +892,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->fillRect( br, cg.background() );
} else
- QCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
+ TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
break;
}
@@ -901,8 +901,8 @@ void LightStyleV3::drawControl( ControlElement control,
if (! widget || data.isDefault())
break;
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
int tab = data.tabWidth();
int maxpmw = data.maxIconWidth();
@@ -910,7 +910,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen( cg.mid() );
p->drawLine(r.left() + 12, r.top() + 1,
r.right() - 12, r.top() + 1);
@@ -922,18 +922,18 @@ void LightStyleV3::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi )
break;
maxpmw = QMAX(maxpmw, 16);
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
// submenu indicator column
@@ -943,7 +943,7 @@ void LightStyleV3::drawControl( ControlElement control,
// item column
ir.setCoords(cr.right() + 4, r.top(), tr.right() - 4, r.bottom());
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
cr = visualRect( cr, r );
sr = visualRect( sr, r );
@@ -954,21 +954,21 @@ void LightStyleV3::drawControl( ControlElement control,
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) {
- QIconSet::Mode mode =
- (flags & Style_Enabled) ? QIconSet::Normal : QIconSet::Disabled;
+ TQIconSet::Mode mode =
+ (flags & Style_Enabled) ? TQIconSet::Normal : TQIconSet::Disabled;
if ((flags & Style_Active) && (flags & Style_Enabled))
- mode = QIconSet::Active;
- QPixmap pixmap;
+ mode = TQIconSet::Active;
+ TQPixmap pixmap;
if (popupmenu->isCheckable() && mi->isChecked())
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode, QIconSet::On );
+ mi->iconSet()->pixmap( TQIconSet::Small, mode, TQIconSet::On );
else
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr(QPoint(0, 0), pixmap.size());
+ mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr(TQPoint(0, 0), pixmap.size());
pmr.moveCenter(cr.center());
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
@@ -976,8 +976,8 @@ void LightStyleV3::drawControl( ControlElement control,
drawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
- QColor textcolor;
- QColor embosscolor;
+ TQColor textcolor;
+ TQColor embosscolor;
if (flags & Style_Active) {
if (! (flags & Style_Enabled))
textcolor = cg.midlight().dark();
@@ -1008,7 +1008,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->restore();
}
- QString text = mi->text();
+ TQString text = mi->text();
if (! text.isNull()) {
int t = text.find('\t');
@@ -1040,7 +1040,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->drawText(ir, alignFlag, text, t);
} else if (mi->pixmap()) {
- QPixmap pixmap = *mi->pixmap();
+ TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
p->setBackgroundMode(OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
@@ -1049,28 +1049,28 @@ void LightStyleV3::drawControl( ControlElement control,
}
if (mi->popup())
- drawPrimitive( (QApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
+ drawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
case CE_MenuBarItem:
{
if ( flags & Style_Active )
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
- p->fillRect( r, cg.brush( QColorGroup::Button ) );
+ p->fillRect( r, cg.brush( TQColorGroup::Button ) );
if (data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
+ TQMenuItem *mi = data.menuItem();
drawItem(p, r, AlignCenter | ShowPrefix | DontClip | SingleLine, cg,
flags & Style_Enabled, mi->pixmap(), mi->text(), -1,
&cg.buttonText());
@@ -1079,20 +1079,20 @@ void LightStyleV3::drawControl( ControlElement control,
case CE_ProgressBarGroove:
drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
- true, true, &cg.brush( QColorGroup::Background ) );
+ true, true, &cg.brush( TQColorGroup::Background ) );
break;
default:
- QCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
void LightStyleV3::drawControlMask( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption &data ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_PushButton:
@@ -1100,19 +1100,19 @@ void LightStyleV3::drawControlMask( ControlElement control,
break;
default:
- QCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(control, p, widget, r, data);
break;
}
}
-QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
+TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
{
- QRect rect;
+ TQRect rect;
switch (subrect) {
case SR_PushButtonFocusRect:
{
- rect = QCommonStyle::subRect( SR_PushButtonContents, widget );
+ rect = TQCommonStyle::subRect( SR_PushButtonContents, widget );
int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
rect.addCoords( hbm, hbm, -hbm, -hbm );
break;
@@ -1120,20 +1120,20 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
case SR_ComboBoxFocusRect:
{
- rect = QCommonStyle::subRect( SR_ComboBoxFocusRect, widget );
+ rect = TQCommonStyle::subRect( SR_ComboBoxFocusRect, widget );
rect.addCoords( -1, -1, 1, 1 );
break;
}
case SR_CheckBoxFocusRect:
{
- const QCheckBox* cb = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* cb = static_cast<const TQCheckBox*>(widget);
//Only checkbox, no label
if (cb->text().isEmpty() && (cb->pixmap() == 0) )
{
- QRect bounding = cb->rect();
- QRect checkbox(bounding.x(), bounding.y() + (bounding.height() - 13)/2,
+ TQRect bounding = cb->rect();
+ TQRect checkbox(bounding.x(), bounding.y() + (bounding.height() - 13)/2,
13, 13);
return checkbox;
@@ -1143,7 +1143,7 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
default:
- rect = QCommonStyle::subRect(subrect, widget);
+ rect = TQCommonStyle::subRect(subrect, widget);
break;
}
@@ -1151,30 +1151,30 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
}
void LightStyleV3::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CC_ComboBox:
{
- const QComboBox *combobox = (const QComboBox *) widget;
- QRect frame, arrow, field;
+ const TQComboBox *combobox = (const TQComboBox *) widget;
+ TQRect frame, arrow, field;
frame =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
@@ -1184,7 +1184,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) );
arrow.addCoords( 1, 1, -1, -1 );
- p->fillRect( arrow, cg.brush( QColorGroup::Button ) );
+ p->fillRect( arrow, cg.brush( TQColorGroup::Button ) );
arrow.addCoords(3, 1, -1, -1);
drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
@@ -1192,20 +1192,20 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- QRect fr =
- QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQRect fr =
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- p->fillRect( fr, cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
drawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ TQStyleOption(cg.highlight()));
}
p->setPen(cg.highlightedText());
} else {
p->fillRect( field, ( ( flags & Style_Enabled ) ?
- cg.brush( QColorGroup::Base ) :
- cg.brush( QColorGroup::Background ) ) );
+ cg.brush( TQColorGroup::Base ) :
+ cg.brush( TQColorGroup::Background ) ) );
p->setPen( cg.text() );
}
}
@@ -1215,8 +1215,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
- const QSpinWidget *spinwidget = (const QSpinWidget *) widget;
- QRect frame, up, down;
+ const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
+ TQRect frame, up, down;
frame = querySubControlMetrics(CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
@@ -1228,14 +1228,14 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
p->setPen( cg.background() );
p->drawLine( up.topLeft(), up.bottomLeft() );
up.addCoords( 1, 0, 0, 0 );
- p->fillRect( up, cg.brush( QColorGroup::Button ) );
+ p->fillRect( up, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) );
up.addCoords( 1, 0, 0, 0 );
@@ -1246,14 +1246,14 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetDown) && down.isValid()) {
PrimitiveElement pe = PE_SpinWidgetDown;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
p->setPen( cg.background() );
p->drawLine( down.topLeft(), down.bottomLeft() );
down.addCoords( 1, 0, 0, 0 );
- p->fillRect( down, cg.brush( QColorGroup::Button ) );
+ p->fillRect( down, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) );
down.addCoords( 1, 0, 0, 0 );
@@ -1267,8 +1267,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
bool maxedOut = (scrollbar->minValue() == scrollbar->maxValue());
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, data);
@@ -1339,7 +1339,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
// ### perhaps this should not be able to accept focus if maxedOut?
if (scrollbar->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -1350,19 +1350,19 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
+ const TQSlider *slider = (const TQSlider *) widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
data),
handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle,
data);
if ((controls & SC_SliderGroove) && groove.isValid()) {
- QColor grooveColor = cg.midlight();
+ TQColor grooveColor = cg.midlight();
if (!(flags & Style_Enabled))
grooveColor = cg.background();
- QBrush brush(grooveColor);
+ TQBrush brush(grooveColor);
drawLightBevel( p, groove, cg,
( ( flags | Style_Raised ) ^ Style_Raised ) |
( ( flags & Style_Enabled ) ? Style_Sunken :
@@ -1378,7 +1378,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if ((controls & SC_SliderHandle) && handle.isValid()) {
- QColor sliderColor = cg.highlight();
+ TQColor sliderColor = cg.highlight();
if (!(flags & Style_Enabled))
sliderColor = cg.button();
@@ -1408,7 +1408,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
@@ -1420,18 +1420,18 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
break;
default:
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
}
-QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
- const QWidget *widget,
+TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
+ const TQWidget *widget,
SubControl sc,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect ret;
+ TQRect ret;
switch (control) {
case CC_ComboBox:
@@ -1460,7 +1460,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1536,7 +1536,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
+ const TQSlider *slider = (const TQSlider *) widget;
int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget );
int thickness = pixelMetric( PM_SliderControlThickness, widget );
@@ -1561,7 +1561,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
@@ -1569,20 +1569,20 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
return ret;
}
-QStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
- const QWidget *widget,
- const QPoint &pos,
- const QStyleOption &data ) const
+TQStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
+ const TQWidget *widget,
+ const TQPoint &pos,
+ const TQStyleOption &data ) const
{
- QStyle::SubControl ret =
- QCommonStyle::querySubControl(control, widget, pos, data);
+ TQStyle::SubControl ret =
+ TQCommonStyle::querySubControl(control, widget, pos, data);
// this is an ugly hack, but i really don't care, it's the quickest way to
// enabled the third button
@@ -1594,7 +1594,7 @@ QStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
}
int LightStyleV3::pixelMetric( PixelMetric metric,
- const QWidget *widget ) const
+ const TQWidget *widget ) const
{
int ret;
@@ -1663,13 +1663,13 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
case PM_SliderControlThickness:
{
- const QSlider * sl = (const QSlider *) widget;
+ const TQSlider * sl = (const TQSlider *) widget;
int space = (sl->orientation() == Horizontal) ? sl->height()
: sl->width();
int ticks = sl->tickmarks();
int n = 0;
- if ( ticks & QSlider::Above ) n++;
- if ( ticks & QSlider::Below ) n++;
+ if ( ticks & TQSlider::Above ) n++;
+ if ( ticks & TQSlider::Below ) n++;
if ( !n ) {
ret = space;
break;
@@ -1690,19 +1690,19 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
break;
default:
- ret = QCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
return ret;
}
-QSize LightStyleV3::sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption &data ) const
+TQSize LightStyleV3::sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption &data ) const
{
- QSize ret;
+ TQSize ret;
switch (contents) {
case CT_ComboBox:
@@ -1719,14 +1719,14 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if ( h < 21 )
h = 21;
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
case CT_PushButton:
{
- const QPushButton *button = (const QPushButton *) widget;
- ret = QCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ const TQPushButton *button = (const TQPushButton *) widget;
+ ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
int mw = 80 - dbi, mh = 25 - dbi;
@@ -1740,7 +1740,7 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
h = mh;
}
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
@@ -1749,8 +1749,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if (! widget || data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
int maxpmw = data.maxIconWidth();
int w = contentsSize.width(), h = contentsSize.height();
@@ -1772,8 +1772,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
else if (! mi->text().isNull())
h = QMAX(h, popupmenu->fontMetrics().height() + 2);
if (mi->iconSet() != 0)
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small,
- QIconSet::Normal).height());
+ h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small,
+ TQIconSet::Normal).height());
h += 2;
}
@@ -1786,22 +1786,22 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
- ret = QSize(w, h);
+ ret = TQSize(w, h);
break;
}
case CT_ProgressBar:
{
- const QProgressBar* pb = static_cast<const QProgressBar*>(widget);
+ const TQProgressBar* pb = static_cast<const TQProgressBar*>(widget);
//If we have to display the indicator, and we do it on RHS, give some more room
//for it. This tries to match the logic and the spacing in SR_ProgressBarGroove/Contents
- //sizing in QCommonStyle.
+ //sizing in TQCommonStyle.
if (pb->percentageVisible() &&
(pb->indicatorFollowsStyle() || ! pb->centerIndicator()))
{
int addw = pb->fontMetrics().width("100%") + 6;
- return QSize(contentsSize.width() + addw, contentsSize.height());
+ return TQSize(contentsSize.width() + addw, contentsSize.height());
}
else
return contentsSize; //Otherwise leave unchanged
@@ -1810,7 +1810,7 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
}
default:
- ret = QCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
break;
}
@@ -1818,8 +1818,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
}
int LightStyleV3::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
+ const TQWidget *widget,
+ const TQStyleOption &option,
QStyleHintReturn* returnData ) const
{
int ret;
@@ -1846,16 +1846,16 @@ int LightStyleV3::styleHint( StyleHint stylehint,
break;
default:
- ret = QCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
return ret;
}
-QPixmap LightStyleV3::stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget,
- const QStyleOption &data ) const
+TQPixmap LightStyleV3::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget,
+ const TQStyleOption &data ) const
{
return basestyle->stylePixmap( stylepixmap, widget, data );
}
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index b46010778..be8812b99 100644
--- a/kstyles/light/lightstyle-v3.h
+++ b/kstyles/light/lightstyle-v3.h
@@ -25,7 +25,7 @@
#ifndef QT_H
-#include <qcommonstyle.h>
+#include <tqcommonstyle.h>
#endif // QT_H
#include "kstyle.h"
@@ -40,49 +40,49 @@
class Q_EXPORT_STYLE_LIGHT_V3 LightStyleV3 : public KStyle
{
Q_OBJECT
- QStyle *basestyle;
+ TQStyle *basestyle;
public:
LightStyleV3();
virtual ~LightStyleV3();
- void polishPopupMenu( QPopupMenu * );
+ void polishPopupMenu( TQPopupMenu * );
- void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
+ void drawPrimitive(PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default) const;
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default) const;
- QRect subRect(SubRect, const QWidget *) const;
+ TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
+ void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQRect querySubControlMetrics(ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- SubControl querySubControl(ComplexControl, const QWidget *, const QPoint &,
- const QStyleOption &data = QStyleOption::Default ) const;
+ SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
+ const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const QWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
- QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
};
diff --git a/kstyles/plastik/config/plastikconf.cpp b/kstyles/plastik/config/plastikconf.cpp
index b9c3ff8cf..70d4f6cfa 100644
--- a/kstyles/plastik/config/plastikconf.cpp
+++ b/kstyles/plastik/config/plastikconf.cpp
@@ -24,12 +24,12 @@ DEALINGS IN THE SOFTWARE.
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qsettings.h>
-#include <qcolor.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqsettings.h>
+#include <tqcolor.h>
+#include <tqgroupbox.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcolorbutton.h>
@@ -39,40 +39,40 @@ DEALINGS IN THE SOFTWARE.
extern "C"
{
- KDE_EXPORT QWidget* allocate_kstyle_config(QWidget* parent)
+ KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent)
{
KGlobal::locale()->insertCatalogue("kstyle_plastik_config");
return new PlastikStyleConfig(parent);
}
}
-PlastikStyleConfig::PlastikStyleConfig(QWidget* parent): QWidget(parent)
+PlastikStyleConfig::PlastikStyleConfig(TQWidget* parent): TQWidget(parent)
{
//Should have no margins here, the dialog provides them
- QVBoxLayout* layout = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
KGlobal::locale()->insertCatalogue("kstyle_plastik_config");
-// scrollBarLines = new QCheckBox(i18n("Scrollbar handle lines"), this);
- animateProgressBar = new QCheckBox(i18n("Animate progress bars"), this);
- drawToolBarSeparator = new QCheckBox(i18n("Draw toolbar separator"), this);
- drawToolBarItemSeparator = new QCheckBox(i18n("Draw toolbar item separators"), this);
-// drawFocusRect = new QCheckBox(i18n("Draw focus rectangles"), this);
- drawTriangularExpander = new QCheckBox(i18n("Triangular tree expander"), this);
- inputFocusHighlight = new QCheckBox(i18n("Highlight focused text input fields"), this);
-
- customFocusHighlightColor = new QCheckBox(i18n("Custom text input highlight color:"), this);
- QHBox *hbox1 = new QHBox(this);
- hbox1->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) );
+// scrollBarLines = new TQCheckBox(i18n("Scrollbar handle lines"), this);
+ animateProgressBar = new TQCheckBox(i18n("Animate progress bars"), this);
+ drawToolBarSeparator = new TQCheckBox(i18n("Draw toolbar separator"), this);
+ drawToolBarItemSeparator = new TQCheckBox(i18n("Draw toolbar item separators"), this);
+// drawFocusRect = new TQCheckBox(i18n("Draw focus rectangles"), this);
+ drawTriangularExpander = new TQCheckBox(i18n("Triangular tree expander"), this);
+ inputFocusHighlight = new TQCheckBox(i18n("Highlight focused text input fields"), this);
+
+ customFocusHighlightColor = new TQCheckBox(i18n("Custom text input highlight color:"), this);
+ TQHBox *hbox1 = new TQHBox(this);
+ hbox1->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
focusHighlightColor = new KColorButton(hbox1);
- customOverHighlightColor = new QCheckBox(i18n("Custom mouseover highlight color:"), this);
- QHBox *hbox2 = new QHBox(this);
- hbox2->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) );
+ customOverHighlightColor = new TQCheckBox(i18n("Custom mouseover highlight color:"), this);
+ TQHBox *hbox2 = new TQHBox(this);
+ hbox2->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
overHighlightColor = new KColorButton(hbox2);
- customCheckMarkColor = new QCheckBox(i18n("Custom checkmark color:"), this);
- QHBox *hbox3 = new QHBox(this);
- hbox3->layout()->addItem(new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum) );
+ customCheckMarkColor = new TQCheckBox(i18n("Custom checkmark color:"), this);
+ TQHBox *hbox3 = new TQHBox(this);
+ hbox3->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
checkMarkColor = new KColorButton(hbox3);
// layout->add(scrollBarLines);
@@ -90,7 +90,7 @@ PlastikStyleConfig::PlastikStyleConfig(QWidget* parent): QWidget(parent)
layout->add(hbox3);
layout->addStretch(1);
- QSettings s;
+ TQSettings s;
// origScrollBarLines = s.readBoolEntry("/plastikstyle/Settings/scrollBarLines", false);
// scrollBarLines->setChecked(origScrollBarLines);
origAnimProgressBar = s.readBoolEntry("/plastikstyle/Settings/animateProgressBar", false);
@@ -118,19 +118,19 @@ PlastikStyleConfig::PlastikStyleConfig(QWidget* parent): QWidget(parent)
origCheckMarkColor = s.readEntry("/plastikstyle/Settings/checkMarkColor", "black");
checkMarkColor->setColor(origCheckMarkColor);
-// connect(scrollBarLines, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(animateProgressBar, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(drawToolBarSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(drawToolBarItemSeparator, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
-// connect(drawFocusRect, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(drawTriangularExpander, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(inputFocusHighlight, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(customOverHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(overHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
- connect(customFocusHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(focusHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
- connect(customCheckMarkColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(checkMarkColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+// connect(scrollBarLines, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(animateProgressBar, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(drawToolBarSeparator, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(drawToolBarItemSeparator, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+// connect(drawFocusRect, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(drawTriangularExpander, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(inputFocusHighlight, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(customOverHighlightColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(overHighlightColor, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( updateChanged() ) );
+ connect(customFocusHighlightColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(focusHighlightColor, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( updateChanged() ) );
+ connect(customCheckMarkColor, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( updateChanged() ) );
+ connect(checkMarkColor, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( updateChanged() ) );
if ( customOverHighlightColor->isChecked() )
overHighlightColor->setEnabled(true);
else
@@ -152,7 +152,7 @@ PlastikStyleConfig::~PlastikStyleConfig()
void PlastikStyleConfig::save()
{
- QSettings s;
+ TQSettings s;
// s.writeEntry("/plastikstyle/Settings/scrollBarLines", scrollBarLines->isChecked());
s.writeEntry("/plastikstyle/Settings/animateProgressBar", animateProgressBar->isChecked());
s.writeEntry("/plastikstyle/Settings/drawToolBarSeparator", drawToolBarSeparator->isChecked());
@@ -161,11 +161,11 @@ void PlastikStyleConfig::save()
s.writeEntry("/plastikstyle/Settings/drawTriangularExpander", drawTriangularExpander->isChecked());
s.writeEntry("/plastikstyle/Settings/inputFocusHighlight", inputFocusHighlight->isChecked());
s.writeEntry("/plastikstyle/Settings/customOverHighlightColor", customOverHighlightColor->isChecked());
- s.writeEntry("/plastikstyle/Settings/overHighlightColor", QColor(overHighlightColor->color()).name());
+ s.writeEntry("/plastikstyle/Settings/overHighlightColor", TQColor(overHighlightColor->color()).name());
s.writeEntry("/plastikstyle/Settings/customFocusHighlightColor", customFocusHighlightColor->isChecked());
- s.writeEntry("/plastikstyle/Settings/focusHighlightColor", QColor(focusHighlightColor->color()).name());
+ s.writeEntry("/plastikstyle/Settings/focusHighlightColor", TQColor(focusHighlightColor->color()).name());
s.writeEntry("/plastikstyle/Settings/customCheckMarkColor", customCheckMarkColor->isChecked());
- s.writeEntry("/plastikstyle/Settings/checkMarkColor", QColor(checkMarkColor->color()).name());
+ s.writeEntry("/plastikstyle/Settings/checkMarkColor", TQColor(checkMarkColor->color()).name());
}
void PlastikStyleConfig::defaults()
diff --git a/kstyles/plastik/config/plastikconf.h b/kstyles/plastik/config/plastikconf.h
index 66106061e..b1af43b32 100644
--- a/kstyles/plastik/config/plastikconf.h
+++ b/kstyles/plastik/config/plastikconf.h
@@ -33,7 +33,7 @@ class PlastikStyleConfig: public QWidget
{
Q_OBJECT
public:
- PlastikStyleConfig(QWidget* parent);
+ PlastikStyleConfig(TQWidget* parent);
~PlastikStyleConfig();
//This signal and the next two slots are the plugin
@@ -52,18 +52,18 @@ protected slots:
protected:
//We store settings directly in widgets to
//avoid the hassle of sync'ing things
-// QCheckBox* scrollBarLines;
- QCheckBox* animateProgressBar;
- QCheckBox* drawToolBarSeparator;
- QCheckBox* drawToolBarItemSeparator;
-// QCheckBox* drawFocusRect;
- QCheckBox* drawTriangularExpander;
- QCheckBox* inputFocusHighlight;
- QCheckBox* customOverHighlightColor;
+// TQCheckBox* scrollBarLines;
+ TQCheckBox* animateProgressBar;
+ TQCheckBox* drawToolBarSeparator;
+ TQCheckBox* drawToolBarItemSeparator;
+// TQCheckBox* drawFocusRect;
+ TQCheckBox* drawTriangularExpander;
+ TQCheckBox* inputFocusHighlight;
+ TQCheckBox* customOverHighlightColor;
KColorButton* overHighlightColor;
- QCheckBox* customFocusHighlightColor;
+ TQCheckBox* customFocusHighlightColor;
KColorButton* focusHighlightColor;
- QCheckBox* customCheckMarkColor;
+ TQCheckBox* customCheckMarkColor;
KColorButton* checkMarkColor;
//Original settings, for accurate dirtiness tracking
@@ -75,11 +75,11 @@ protected:
bool origDrawTriangularExpander;
bool origInputFocusHighlight;
bool origCustomOverHighlightColor;
- QColor origOverHighlightColor;
+ TQColor origOverHighlightColor;
bool origCustomFocusHighlightColor;
- QColor origFocusHighlightColor;
+ TQColor origFocusHighlightColor;
bool origCustomCheckMarkColor;
- QColor origCheckMarkColor;
+ TQColor origCheckMarkColor;
};
#endif
diff --git a/kstyles/plastik/misc.cpp b/kstyles/plastik/misc.cpp
index 5eddf5ad2..e1fc2df79 100644
--- a/kstyles/plastik/misc.cpp
+++ b/kstyles/plastik/misc.cpp
@@ -16,10 +16,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include "misc.h"
-QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
+TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a)
{
// normal button...
@@ -30,7 +30,7 @@ QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
+ TQColor result = TQColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
diff --git a/kstyles/plastik/misc.h b/kstyles/plastik/misc.h
index 65bb42534..c09ee87c8 100644
--- a/kstyles/plastik/misc.h
+++ b/kstyles/plastik/misc.h
@@ -19,6 +19,6 @@
#ifndef __MISC_H
#define __MISC_H
-QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha);
+TQColor alphaBlendColors(const TQColor &backgroundColor, const TQColor &foregroundColor, const int alpha);
#endif // __MISC_H
diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp
index 98e7e6d49..dd7954cc9 100644
--- a/kstyles/plastik/plastik.cpp
+++ b/kstyles/plastik/plastik.cpp
@@ -38,34 +38,34 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qstylefactory.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtabbar.h>
-#include <qprogressbar.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qcleanuphandler.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qscrollbar.h>
-#include <qstyleplugin.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qvariant.h>
-#include <qradiobutton.h>
-#include <qregion.h>
-#include <qslider.h>
-#include <qsettings.h>
+#include <tqimage.h>
+#include <tqstylefactory.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtabbar.h>
+#include <tqprogressbar.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcleanuphandler.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqscrollbar.h>
+#include <tqstyleplugin.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqmenubar.h>
+#include <tqpopupmenu.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqvariant.h>
+#include <tqradiobutton.h>
+#include <tqregion.h>
+#include <tqslider.h>
+#include <tqsettings.h>
#include <kpixmap.h>
#include "plastik.h"
@@ -137,11 +137,11 @@ class PlastikStylePlugin : public QStylePlugin
PlastikStylePlugin() {}
~PlastikStylePlugin() {}
- QStringList keys() const {
- return QStringList() << "Plastik";
+ TQStringList keys() const {
+ return TQStringList() << "Plastik";
}
- QStyle* create( const QString& key ) {
+ TQStyle* create( const TQString& key ) {
if (key.lower() == "plastik")
return new PlastikStyle;
return 0;
@@ -163,7 +163,7 @@ PlastikStyle::PlastikStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollB
horizontalLine = 0;
verticalLine = 0;
- QSettings settings;
+ TQSettings settings;
_contrast = settings.readNumEntry("/Qt/KDE/contrast", 6);
settings.beginGroup("/plastikstyle/Settings");
_scrollBarLines = settings.readBoolEntry("/scrollBarLines", false);
@@ -182,29 +182,29 @@ PlastikStyle::PlastikStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollB
settings.endGroup();
// setup pixmap cache...
- pixmapCache = new QIntCache<CacheEntry>(150000, 499);
+ pixmapCache = new TQIntCache<CacheEntry>(150000, 499);
pixmapCache->setAutoDelete(true);
if ( _animateProgressBar )
{
- animationTimer = new QTimer( this );
- connect( animationTimer, SIGNAL(timeout()), this, SLOT(updateProgressPos()) );
+ animationTimer = new TQTimer( this );
+ connect( animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateProgressPos()) );
}
}
void PlastikStyle::updateProgressPos()
{
- QProgressBar* pb;
+ TQProgressBar* pb;
//Update the registered progressbars.
- QMap<QWidget*, int>::iterator iter;
+ TQMap<TQWidget*, int>::iterator iter;
bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{
- if ( !::qt_cast<QProgressBar*>(iter.key()) )
+ if ( !::qt_cast<TQProgressBar*>(iter.key()) )
continue;
- pb = dynamic_cast<QProgressBar*>(iter.key());
+ pb = dynamic_cast<TQProgressBar*>(iter.key());
if ( iter.key() -> isEnabled() &&
pb -> progress() != pb->totalSteps() )
{
@@ -227,7 +227,7 @@ PlastikStyle::~PlastikStyle()
delete verticalLine;
}
-void PlastikStyle::polish(QApplication* app)
+void PlastikStyle::polish(TQApplication* app)
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
@@ -235,38 +235,38 @@ void PlastikStyle::polish(QApplication* app)
kornMode = true;
}
-void PlastikStyle::polish(QWidget* widget)
+void PlastikStyle::polish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets[widget] = true;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(khtmlWidgetDestroyed(QObject*)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(khtmlWidgetDestroyed(TQObject*)));
}
// use qt_cast where possible to check if the widget inheits one of the classes. might improve
- // performance compared to QObject::inherits()
- if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
- ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
- ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
- ::qt_cast<QToolButton*>(widget) || widget->inherits("QSplitterHandle") )
+ // performance compared to TQObject::inherits()
+ if ( ::qt_cast<TQPushButton*>(widget) || ::qt_cast<TQComboBox*>(widget) ||
+ ::qt_cast<TQSpinWidget*>(widget) || ::qt_cast<TQSlider*>(widget) ||
+ ::qt_cast<TQCheckBox*>(widget) || ::qt_cast<TQRadioButton*>(widget) ||
+ ::qt_cast<TQToolButton*>(widget) || widget->inherits("QSplitterHandle") )
{
// widget->setBackgroundMode(PaletteBackground);
widget->installEventFilter(this);
- } else if (::qt_cast<QLineEdit*>(widget)) {
+ } else if (::qt_cast<TQLineEdit*>(widget)) {
widget->installEventFilter(this);
- } else if (::qt_cast<QTabBar*>(widget)) {
+ } else if (::qt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true);
widget->installEventFilter(this);
- } else if (::qt_cast<QPopupMenu*>(widget)) {
+ } else if (::qt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->installEventFilter(this);
}
- if( _animateProgressBar && ::qt_cast<QProgressBar*>(widget) )
+ if( _animateProgressBar && ::qt_cast<TQProgressBar*>(widget) )
{
widget->installEventFilter(this);
progAnimWidgets[widget] = 0;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(progressBarDestroyed(TQObject*)));
if (!animationTimer->isActive())
animationTimer->start( 50, false );
}
@@ -274,31 +274,31 @@ void PlastikStyle::polish(QWidget* widget)
KStyle::polish(widget);
}
-void PlastikStyle::unPolish(QWidget* widget)
+void PlastikStyle::unPolish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets.remove(widget);
}
// use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
- ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
- ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
- ::qt_cast<QToolButton*>(widget) || ::qt_cast<QLineEdit*>(widget) ||
+ if ( ::qt_cast<TQPushButton*>(widget) || ::qt_cast<TQComboBox*>(widget) ||
+ ::qt_cast<TQSpinWidget*>(widget) || ::qt_cast<TQSlider*>(widget) ||
+ ::qt_cast<TQCheckBox*>(widget) || ::qt_cast<TQRadioButton*>(widget) ||
+ ::qt_cast<TQToolButton*>(widget) || ::qt_cast<TQLineEdit*>(widget) ||
widget->inherits("QSplitterHandle") )
{
widget->removeEventFilter(this);
}
- else if (::qt_cast<QTabBar*>(widget)) {
+ else if (::qt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(false);
widget->removeEventFilter(this);
- } else if (::qt_cast<QPopupMenu*>(widget)) {
+ } else if (::qt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->removeEventFilter(this);
}
- if ( ::qt_cast<QProgressBar*>(widget) )
+ if ( ::qt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(widget);
}
@@ -306,20 +306,20 @@ void PlastikStyle::unPolish(QWidget* widget)
KStyle::unPolish(widget);
}
-void PlastikStyle::khtmlWidgetDestroyed(QObject* obj)
+void PlastikStyle::khtmlWidgetDestroyed(TQObject* obj)
{
- khtmlWidgets.remove(static_cast<QWidget*>(obj));
+ khtmlWidgets.remove(static_cast<TQWidget*>(obj));
}
-void PlastikStyle::progressBarDestroyed(QObject* obj)
+void PlastikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<QWidget*>(obj));
+ progAnimWidgets.remove(static_cast<TQWidget*>(obj));
}
-void PlastikStyle::renderContour(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &contour,
+void PlastikStyle::renderContour(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &contour,
const uint flags) const
{
if((r.width() <= 0)||(r.height() <= 0))
@@ -332,7 +332,7 @@ void PlastikStyle::renderContour(QPainter *p,
const bool disabled = flags&Is_Disabled;
const bool alphaBlend = flags&Draw_AlphaBlend;
- QColor contourColor;
+ TQColor contourColor;
if (disabled) {
contourColor = backgroundColor.dark(150);
} else {
@@ -417,49 +417,49 @@ void PlastikStyle::renderContour(QPainter *p,
if(drawLeft && drawTop) {
switch(flags&Round_UpperLeft) {
case false:
- renderPixel(p,QPoint(r.left(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.left()+1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.left(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left()+1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawLeft && drawBottom) {
switch(flags&Round_BottomLeft) {
case false:
- renderPixel(p,QPoint(r.left(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.left()+1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.left(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left()+1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawRight && drawTop) {
switch(flags&Round_UpperRight) {
case false:
- renderPixel(p,QPoint(r.right(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.right()-1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.right(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right()-1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawRight && drawBottom) {
switch(flags&Round_BottomRight) {
case false:
- renderPixel(p,QPoint(r.right(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.right()-1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.right(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right()-1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
}
-void PlastikStyle::renderMask(QPainter *p,
- const QRect &r,
- const QColor &color,
+void PlastikStyle::renderMask(TQPainter *p,
+ const TQRect &r,
+ const TQColor &color,
const uint flags) const
{
if((r.width() <= 0)||(r.height() <= 0))
@@ -471,7 +471,7 @@ void PlastikStyle::renderMask(QPainter *p,
const bool roundBottomRight = flags&Round_BottomRight;
- p->fillRect (QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) , color);
+ p->fillRect (TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) , color);
p->setPen(color);
// sides
@@ -485,11 +485,11 @@ void PlastikStyle::renderMask(QPainter *p,
r.right(), roundBottomLeft?r.bottom()-1:r.bottom() );
}
-void PlastikStyle::renderSurface(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &buttonColor,
- const QColor &highlightColor,
+void PlastikStyle::renderSurface(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &buttonColor,
+ const TQColor &highlightColor,
int intensity,
const uint flags) const
{
@@ -522,7 +522,7 @@ void PlastikStyle::renderSurface(QPainter *p,
highlightBottom = (flags&Highlight_Bottom);
}
- QColor baseColor = alphaBlendColors(backgroundColor, disabled?backgroundColor:buttonColor, 10);
+ TQColor baseColor = alphaBlendColors(backgroundColor, disabled?backgroundColor:buttonColor, 10);
if (disabled) {
intensity = 2;
} else if (highlight) {
@@ -535,13 +535,13 @@ void PlastikStyle::renderSurface(QPainter *p,
}
// some often needed colors...
// 1 more intensive than 2 and 3.
- const QColor colorTop1 = alphaBlendColors(baseColor,
+ const TQColor colorTop1 = alphaBlendColors(baseColor,
sunken?baseColor.dark(100+intensity*2):baseColor.light(100+intensity*2), 80);
- const QColor colorTop2 = alphaBlendColors(baseColor,
+ const TQColor colorTop2 = alphaBlendColors(baseColor,
sunken?baseColor.dark(100+intensity):baseColor.light(100+intensity), 80);
- const QColor colorBottom1 = alphaBlendColors(baseColor,
+ const TQColor colorBottom1 = alphaBlendColors(baseColor,
sunken?baseColor.light(100+intensity*2):baseColor.dark(100+intensity*2), 80);
- const QColor colorBottom2 = alphaBlendColors(baseColor,
+ const TQColor colorBottom2 = alphaBlendColors(baseColor,
sunken?baseColor.light(100+intensity):baseColor.dark(100+intensity), 80);
// sides
@@ -550,7 +550,7 @@ void PlastikStyle::renderSurface(QPainter *p,
int height = r.height();
if (roundUpperLeft || !drawTop) height--;
if (roundBottomLeft || !drawBottom) height--;
- renderGradient(p, QRect(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(), 1, height),
+ renderGradient(p, TQRect(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(), 1, height),
colorTop1, baseColor);
} else {
p->setPen(colorTop1 );
@@ -565,7 +565,7 @@ void PlastikStyle::renderSurface(QPainter *p,
// and we don't whant to draw the Top, we have a unpainted area
if (roundUpperRight || !drawTop) height--;
if (roundBottomRight || !drawBottom) height--;
- renderGradient(p, QRect(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(), 1, height),
+ renderGradient(p, TQRect(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(), 1, height),
baseColor, colorBottom1);
} else {
p->setPen(colorBottom1 );
@@ -582,7 +582,7 @@ void PlastikStyle::renderSurface(QPainter *p,
int width = r.width();
if (roundUpperLeft || !drawLeft) width--;
if (roundUpperRight || !drawRight) width--;
- renderGradient(p, QRect((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(), width, 1),
+ renderGradient(p, TQRect((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(), width, 1),
colorTop1, colorTop2);
}
}
@@ -595,7 +595,7 @@ void PlastikStyle::renderSurface(QPainter *p,
int width = r.width();
if (roundBottomLeft || !drawLeft) width--;
if (roundBottomRight || !drawRight) width--;
- renderGradient(p, QRect((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(), width, 1),
+ renderGradient(p, TQRect((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(), width, 1),
colorBottom2, colorBottom1);
}
}
@@ -607,7 +607,7 @@ void PlastikStyle::renderSurface(QPainter *p,
if (drawRight) width--;
if (drawTop) height--;
if (drawBottom) height--;
- renderGradient(p, QRect(drawLeft?r.left()+1:r.left(), drawTop?r.top()+1:r.top(), width, height),
+ renderGradient(p, TQRect(drawLeft?r.left()+1:r.left(), drawTop?r.top()+1:r.top(), width, height),
colorTop2, colorBottom2, horizontal);
@@ -646,11 +646,11 @@ void PlastikStyle::renderSurface(QPainter *p,
}
}
-void PlastikStyle::renderPixel(QPainter *p,
- const QPoint &pos,
+void PlastikStyle::renderPixel(TQPainter *p,
+ const TQPoint &pos,
const int alpha,
- const QColor &color,
- const QColor &background,
+ const TQColor &color,
+ const TQColor &background,
bool fullAlphaBlend) const
{
if(fullAlphaBlend)
@@ -673,10 +673,10 @@ void PlastikStyle::renderPixel(QPainter *p,
}
- QImage aImg(1,1,32); // 1x1
+ TQImage aImg(1,1,32); // 1x1
aImg.setAlphaBuffer(true);
aImg.setPixel(0,0,qRgba(qRed(rgb),qGreen(rgb),qBlue(rgb),alpha));
- QPixmap *result = new QPixmap(aImg);
+ TQPixmap *result = new TQPixmap(aImg);
p->drawPixmap(pos, *result);
@@ -696,7 +696,7 @@ void PlastikStyle::renderPixel(QPainter *p,
if(a<0) a = 0;
int a_inv = 255 - a;
- QColor res = QColor( qRgb(qRed(rgb_b)*a_inv/255 + qRed(rgb_a)*a/255,
+ TQColor res = TQColor( qRgb(qRed(rgb_b)*a_inv/255 + qRed(rgb_a)*a/255,
qGreen(rgb_b)*a_inv/255 + qGreen(rgb_a)*a/255,
qBlue(rgb_b)*a_inv/255 + qBlue(rgb_a)*a/255) );
p->setPen(res);
@@ -704,9 +704,9 @@ void PlastikStyle::renderPixel(QPainter *p,
}
}
-void PlastikStyle::renderButton(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PlastikStyle::renderButton(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool sunken,
bool mouseOver,
bool horizontal,
@@ -716,7 +716,7 @@ void PlastikStyle::renderButton(QPainter *p,
// small fix for the kicker buttons...
if(kickerMode) enabled = true;
- const QPen oldPen( p->pen() );
+ const TQPen oldPen( p->pen() );
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) contourFlags|=Is_Disabled;
@@ -747,12 +747,12 @@ void PlastikStyle::renderButton(QPainter *p,
renderContour(p, r, g.background(), getColor(g,ButtonContour),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast, surfaceFlags);
} else {
renderContour(p, r, g.background(), g.button().dark(105+_contrast*3),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast/2, surfaceFlags);
flatMode = false;
@@ -761,14 +761,14 @@ void PlastikStyle::renderButton(QPainter *p,
p->setPen(oldPen);
}
-void PlastikStyle::renderDot(QPainter *p,
- const QPoint &point,
- const QColor &baseColor,
+void PlastikStyle::renderDot(TQPainter *p,
+ const TQPoint &point,
+ const TQColor &baseColor,
const bool thick,
const bool sunken) const
{
- const QColor topColor = alphaBlendColors(baseColor, sunken?baseColor.dark(130):baseColor.light(150), 70);
- const QColor bottomColor = alphaBlendColors(baseColor, sunken?baseColor.light(150):baseColor.dark(130), 70);
+ const TQColor topColor = alphaBlendColors(baseColor, sunken?baseColor.dark(130):baseColor.light(150), 70);
+ const TQColor bottomColor = alphaBlendColors(baseColor, sunken?baseColor.light(150):baseColor.dark(130), 70);
p->setPen(topColor );
p->drawLine(point.x(), point.y(), point.x()+1, point.y());
p->drawPoint(point.x(), point.y()+1);
@@ -781,10 +781,10 @@ void PlastikStyle::renderDot(QPainter *p,
}
}
-void PlastikStyle::renderGradient(QPainter *painter,
- const QRect &rect,
- const QColor &c1,
- const QColor &c2,
+void PlastikStyle::renderGradient(TQPainter *painter,
+ const TQRect &rect,
+ const TQColor &c1,
+ const TQColor &c2,
bool horizontal) const
{
if((rect.width() <= 0)||(rect.height() <= 0))
@@ -812,9 +812,9 @@ void PlastikStyle::renderGradient(QPainter *painter,
}
// there wasn't anything matching in the cache, create the pixmap now...
- QPixmap *result = new QPixmap(horizontal ? 10 : rect.width(),
+ TQPixmap *result = new TQPixmap(horizontal ? 10 : rect.width(),
horizontal ? rect.height() : 10);
- QPainter p(result);
+ TQPainter p(result);
int r_w = result->rect().width();
int r_h = result->rect().height();
@@ -846,7 +846,7 @@ void PlastikStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x, r_y+y, r_x2, r_y+y);
}
} else {
@@ -855,7 +855,7 @@ void PlastikStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x+x, r_y, r_x+x, r_y2);
}
}
@@ -874,9 +874,9 @@ void PlastikStyle::renderGradient(QPainter *painter,
delete result;
}
-void PlastikStyle::renderPanel(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PlastikStyle::renderPanel(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
const bool pseudo3d,
const bool sunken) const
{
@@ -885,21 +885,21 @@ void PlastikStyle::renderPanel(QPainter *p,
r.coords(&x, &y, &x2, &y2);
if (kickerMode &&
- p->device() && p->device()->devType() == QInternal::Widget &&
- QCString(static_cast<QWidget*>(p->device())->className()) == "FittsLawFrame") {
+ p->device() && p->device()->devType() == TQInternal::Widget &&
+ TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame") {
// Stolen wholesale from Keramik. I don't like it, but oh well.
if (sunken) {
const QCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
p->setPen(g.background().dark());
- p->drawConvexPolygon(QPointArray(4, corners));
+ p->drawConvexPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(QPointArray(4, corners), 0, 3);
+ p->drawPolyline(TQPointArray(4, corners), 0, 3);
} else {
const QCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
p->setPen(g.background().dark());
- p->drawPolygon(QPointArray(4, corners));
+ p->drawPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(QPointArray(4, corners), 0, 3);
+ p->drawPolyline(TQPointArray(4, corners), 0, 3);
}
} else {
renderContour(p, r, g.background(), getColor(g, PanelContour) );
@@ -923,15 +923,15 @@ void PlastikStyle::renderPanel(QPainter *p,
}
}
-void PlastikStyle::renderMenuBlendPixmap( KPixmap &pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void PlastikStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
pix.fill( cg.background().light(105) );
}
-void PlastikStyle::renderTab(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PlastikStyle::renderTab(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool mouseOver,
const bool selected,
const bool bottom,
@@ -939,7 +939,7 @@ void PlastikStyle::renderTab(QPainter *p,
const bool triangular,
const bool cornerWidget) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool isFirst = (pos == First) || (pos == Single);
const bool isLast = (pos == Last);
@@ -949,27 +949,27 @@ void PlastikStyle::renderTab(QPainter *p,
// is selected
// the top part of the tab which is nearly the same for all positions
- QRect Rc; // contour
+ TQRect Rc; // contour
if (!bottom) {
if (isFirst && !cornerWidget && !reverseLayout) {
- Rc = QRect(r.x(), r.y(), r.width()-1, r.height()-3);
+ Rc = TQRect(r.x(), r.y(), r.width()-1, r.height()-3);
} else if (isFirst && !cornerWidget && reverseLayout) {
- Rc = QRect(r.x()+1, r.y(), r.width()-1, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y(), r.width()-1, r.height()-3);
} else {
- Rc = QRect(r.x()+1, r.y(), r.width()-2, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y(), r.width()-2, r.height()-3);
}
} else {
if (isFirst && !cornerWidget && !reverseLayout) {
- Rc = QRect(r.x(), r.y()+3, r.width()-1, r.height()-3);
+ Rc = TQRect(r.x(), r.y()+3, r.width()-1, r.height()-3);
} else if (isFirst && !cornerWidget && reverseLayout) {
- Rc = QRect(r.x()+1, r.y()+3, r.width()-1, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y()+3, r.width()-1, r.height()-3);
} else {
- Rc = QRect(r.x()+1, r.y()+3, r.width()-2, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y()+3, r.width()-2, r.height()-3);
}
}
- const QRect Rs(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1); // the resulting surface
+ const TQRect Rs(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1); // the resulting surface
// the area where the fake border shoudl appear
- const QRect Rb(r.x(), bottom?r.top():Rc.bottom()+1, r.width(), r.height()-Rc.height() );
+ const TQRect Rb(r.x(), bottom?r.top():Rc.bottom()+1, r.width(), r.height()-Rc.height() );
uint contourFlags = Draw_Left|Draw_Right;
if(!bottom) {
@@ -985,16 +985,16 @@ void PlastikStyle::renderTab(QPainter *p,
if(!bottom) {
p->setPen(getColor(g,PanelLight) );
p->drawLine(Rs.x()+1, Rs.y(), Rs.right()-1, Rs.y() );
- renderGradient(p, QRect(Rs.x(), Rs.y()+1, 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.x(), Rs.y()+1, 1, Rs.height()-1),
getColor(g,PanelLight), getColor(g,PanelLight2));
- renderGradient(p, QRect(Rs.right(), Rs.y()+1, 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.right(), Rs.y()+1, 1, Rs.height()-1),
getColor(g,PanelDark), getColor(g,PanelDark2));
} else {
p->setPen(alphaBlendColors(g.background(), g.background().dark(160), 100) );
p->drawLine(Rs.x()+1, Rs.bottom(), Rs.right()-1, Rs.bottom() );
- renderGradient(p, QRect(Rs.x(), Rs.y(), 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.x(), Rs.y(), 1, Rs.height()-1),
getColor(g,PanelLight), getColor(g,PanelLight2));
- renderGradient(p, QRect(Rs.right(), Rs.y(), 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.right(), Rs.y(), 1, Rs.height()-1),
getColor(g,PanelDark), getColor(g,PanelDark2));
}
@@ -1004,13 +1004,13 @@ void PlastikStyle::renderTab(QPainter *p,
p->setPen(alphaBlendColors(g.background(), getColor(g, ButtonContour), 50) );
if( (!isFirst&&!reverseLayout) || (!isLast&&reverseLayout) ) {
p->drawPoint(r.left(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
- renderSurface(p, QRect(r.left(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ renderSurface(p, TQRect(r.left(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
Draw_Top|Draw_Bottom|Is_Horizontal);
}
if( (!isLast&&!reverseLayout) || (!isFirst&&reverseLayout) ) {
p->drawPoint(r.right(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
- renderSurface(p, QRect(r.right(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ renderSurface(p, TQRect(r.right(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
Draw_Top|Draw_Bottom|Is_Horizontal);
}
@@ -1068,20 +1068,20 @@ void PlastikStyle::renderTab(QPainter *p,
// inactive tabs
// the top part of the tab which is nearly the same for all positions
- QRect Rc; // contour
+ TQRect Rc; // contour
if (isFirst&&reverseLayout ) {
- Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-2, (triangular?r.height()-4:r.height()-5) );
+ Rc = TQRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-2, (triangular?r.height()-4:r.height()-5) );
} else {
- Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-1, (triangular?r.height()-4:r.height()-5) );
+ Rc = TQRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-1, (triangular?r.height()-4:r.height()-5) );
}
- QRect Rs; // the resulting surface
+ TQRect Rs; // the resulting surface
if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) ) {
- Rs = QRect(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1);
+ Rs = TQRect(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1);
} else {
- Rs = QRect(Rc.x(), bottom?Rc.y():Rc.y()+1, Rc.width()-1, Rc.height()-1);
+ Rs = TQRect(Rc.x(), bottom?Rc.y():Rc.y()+1, Rc.width()-1, Rc.height()-1);
}
// the area where the fake border shoudl appear
- const QRect Rb(r.x(), bottom?r.y():Rc.bottom()+1, r.width(), 2 );
+ const TQRect Rb(r.x(), bottom?r.y():Rc.bottom()+1, r.width(), 2 );
uint contourFlags;
if(!bottom) {
@@ -1191,12 +1191,12 @@ void PlastikStyle::renderTab(QPainter *p,
}
void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
// some "global" vars...
const bool enabled = (flags & Style_Enabled);
@@ -1205,17 +1205,17 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
// ------
switch( kpe ) {
case KPE_SliderGroove: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
if (horizontal) {
int center = r.y()+r.height()/2;
- renderContour(p, QRect(r.left(), center-2, r.width(), 4),
+ renderContour(p, TQRect(r.left(), center-2, r.width(), 4),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
} else {
int center = r.x()+r.width()/2;
- renderContour(p, QRect(center-2, r.top(), 4, r.height()),
+ renderContour(p, TQRect(center-2, r.top(), 4, r.height()),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
}
@@ -1223,19 +1223,19 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
case KPE_SliderHandle: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
const bool pressed = (flags&Style_Active);
const WidgetState s = enabled?(pressed?IsPressed:IsEnabled):IsDisabled;
- const QColor contour = getColor(cg,DragButtonContour,s),
+ const TQColor contour = getColor(cg,DragButtonContour,s),
surface = getColor(cg,DragButtonSurface,s);
int xcenter = (r.left()+r.right()) / 2;
int ycenter = (r.top()+r.bottom()) / 2;
if (horizontal) {
- renderContour(p, QRect(xcenter-5, ycenter-6, 11, 10),
+ renderContour(p, TQRect(xcenter-5, ycenter-6, 11, 10),
cg.background(), contour,
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight);
@@ -1266,27 +1266,27 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+5-4, ycenter+8);
- QRegion mask(xcenter-4, ycenter-5, 9, 13);
- mask -= QRegion(xcenter-4, ycenter+4, 1, 4);
- mask -= QRegion(xcenter-3, ycenter+5, 1, 3);
- mask -= QRegion(xcenter-2, ycenter+6, 1, 2);
- mask -= QRegion(xcenter-1, ycenter+7, 1, 1);
- mask -= QRegion(xcenter+1, ycenter+7, 1, 1);
- mask -= QRegion(xcenter+2, ycenter+6, 1, 2);
- mask -= QRegion(xcenter+3, ycenter+5, 1, 3);
- mask -= QRegion(xcenter+4, ycenter+4, 1, 4);
+ TQRegion mask(xcenter-4, ycenter-5, 9, 13);
+ mask -= TQRegion(xcenter-4, ycenter+4, 1, 4);
+ mask -= TQRegion(xcenter-3, ycenter+5, 1, 3);
+ mask -= TQRegion(xcenter-2, ycenter+6, 1, 2);
+ mask -= TQRegion(xcenter-1, ycenter+7, 1, 1);
+ mask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
+ mask -= TQRegion(xcenter+2, ycenter+6, 1, 2);
+ mask -= TQRegion(xcenter+3, ycenter+5, 1, 3);
+ mask -= TQRegion(xcenter+4, ycenter+4, 1, 4);
p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;
if(!enabled)
surfaceFlags |= Is_Disabled;
- renderSurface(p, QRect(xcenter-4, ycenter-5, 9, 13),
+ renderSurface(p, TQRect(xcenter-4, ycenter-5, 9, 13),
cg.background(), surface, getColor(cg,MouseOverHighlight),
_contrast+3, surfaceFlags);
- renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
- renderDot(p, QPoint(xcenter+2, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter+2, ycenter-3), surface, false, true );
p->setClipping(false);
} else {
- renderContour(p, QRect(xcenter-6, ycenter-5, 10, 11),
+ renderContour(p, TQRect(xcenter-6, ycenter-5, 10, 11),
cg.background(), contour,
Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft);
@@ -1316,25 +1316,25 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+8, ycenter-5+4);
p->drawPoint(xcenter+8, ycenter+5-4);
- QRegion mask(xcenter-5, ycenter-4, 13, 9);
- mask -= QRegion(xcenter+4, ycenter-4, 4, 1);
- mask -= QRegion(xcenter+5, ycenter-3, 3, 1);
- mask -= QRegion(xcenter+6, ycenter-2, 2, 1);
- mask -= QRegion(xcenter+7, ycenter-1, 1, 1);
- mask -= QRegion(xcenter+7, ycenter+1, 1, 1);
- mask -= QRegion(xcenter+6, ycenter+2, 2, 1);
- mask -= QRegion(xcenter+5, ycenter+3, 3, 1);
- mask -= QRegion(xcenter+4, ycenter+4, 4, 1);
+ TQRegion mask(xcenter-5, ycenter-4, 13, 9);
+ mask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
+ mask -= TQRegion(xcenter+5, ycenter-3, 3, 1);
+ mask -= TQRegion(xcenter+6, ycenter-2, 2, 1);
+ mask -= TQRegion(xcenter+7, ycenter-1, 1, 1);
+ mask -= TQRegion(xcenter+7, ycenter+1, 1, 1);
+ mask -= TQRegion(xcenter+6, ycenter+2, 2, 1);
+ mask -= TQRegion(xcenter+5, ycenter+3, 3, 1);
+ mask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
Round_UpperRight|Is_Horizontal;
if(!enabled)
surfaceFlags |= Is_Disabled;
- renderSurface(p, QRect(xcenter-5, ycenter-4, 13, 9),
+ renderSurface(p, TQRect(xcenter-5, ycenter-4, 13, 9),
cg.background(), surface, getColor(cg,MouseOverHighlight),
_contrast+3, surfaceFlags);
- renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
- renderDot(p, QPoint(xcenter-3, ycenter+2), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter+2), surface, false, true );
p->setClipping(false);
}
@@ -1357,9 +1357,9 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawLine( centerx, centery - radius, centerx, centery + radius );
} else if(_drawTriangularExpander) {
if( flags & Style_On )
- drawPrimitive(PE_ArrowRight, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ drawPrimitive(PE_ArrowRight, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
if( flags & Style_Off )
- drawPrimitive(PE_ArrowDown, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ drawPrimitive(PE_ArrowDown, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
}
break;
@@ -1374,10 +1374,10 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
{
// make 128*1 and 1*128 bitmaps that can be used for
// drawing the right sort of lines.
- verticalLine = new QBitmap( 1, 129, true );
- horizontalLine = new QBitmap( 128, 1, true );
- QPointArray a( 64 );
- QPainter p2;
+ verticalLine = new TQBitmap( 1, 129, true );
+ horizontalLine = new TQBitmap( 128, 1, true );
+ TQPointArray a( 64 );
+ TQPainter p2;
p2.begin( verticalLine );
int i;
@@ -1386,7 +1386,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
verticalLine->setMask( *verticalLine );
p2.begin( horizontalLine );
@@ -1395,7 +1395,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
horizontalLine->setMask( *horizontalLine );
}
@@ -1444,11 +1444,11 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
void PlastikStyle::drawPrimitive(PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
bool down = flags & Style_Down;
bool on = flags & Style_On;
@@ -1482,7 +1482,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
if(!kickerMode) {
// detect if this is the left most header item
bool isFirst = false;
- QHeader *header = dynamic_cast<QHeader*>(p->device() );
+ TQHeader *header = dynamic_cast<TQHeader*>(p->device() );
if (header) {
isFirst = header->mapToIndex(header->sectionAt(r.x() ) ) == 0;
}
@@ -1504,7 +1504,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
}
}
- renderSurface(p, QRect(isFirst?r.left()+1:r.left(), r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2),
+ renderSurface(p, TQRect(isFirst?r.left()+1:r.left(), r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2),
cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast,
surfaceFlags);
@@ -1537,7 +1537,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// make the length even so that we get a nice symmetric plus...
if(l%2 != 0)
--l;
- QPoint c = r.center();
+ TQPoint c = r.center();
p->drawLine( c.x()-l/2, c.y(), c.x()+l/2, c.y() );
if ( pe == PE_SpinWidgetPlus ) {
@@ -1548,7 +1548,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ScrollBarSlider: {
const WidgetState s = enabled?(down?IsPressed:IsEnabled):IsDisabled;
- const QColor surface = getColor(cg, DragButtonSurface, s);
+ const TQColor surface = getColor(cg, DragButtonSurface, s);
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) contourFlags|=Is_Disabled;
@@ -1559,7 +1559,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
if(horiz) surfaceFlags|=Is_Horizontal;
if(!enabled) surfaceFlags|=Is_Disabled;
if(r.height() >= 4)
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
cg.background(), surface, cg.background(),
_contrast+3, surfaceFlags);
@@ -1577,7 +1577,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
else
{
for(int k = 3; k <= 13; k+=4) {
- renderDot(p, QPoint(k, yPos), surface, false, true );
+ renderDot(p, TQPoint(k, yPos), surface, false, true );
}
}
}
@@ -1589,7 +1589,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
else
{
for(int k = 3; k <= 13; k+=4) {
- renderDot(p, QPoint(xPos, k), surface, false, true );
+ renderDot(p, TQPoint(xPos, k), surface, false, true );
}
}
}
@@ -1601,17 +1601,17 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ScrollBarAddPage:
case PE_ScrollBarSubPage: {
// draw double buffered to avoid flicker...
- QPixmap buffer;
+ TQPixmap buffer;
if(flags & Style_Horizontal) {
buffer.resize(2, r.height() );
} else {
buffer.resize(r.width(), 2 );
}
- QRect br(buffer.rect() );
- QPainter bp(&buffer);
+ TQRect br(buffer.rect() );
+ TQPainter bp(&buffer);
if (on || down) {
- bp.fillRect(br, QBrush(cg.mid().dark()));
+ bp.fillRect(br, TQBrush(cg.mid().dark()));
} else {
if(flags & Style_Horizontal) {
bp.setPen(cg.background().dark(106));
@@ -1628,11 +1628,11 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
}
- bp.fillRect(br, QBrush(cg.background().light(), Dense4Pattern));
+ bp.fillRect(br, TQBrush(cg.background().light(), Dense4Pattern));
bp.end();
- p->drawTiledPixmap(r, buffer, QPoint(0, r.top()%2) );
+ p->drawTiledPixmap(r, buffer, TQPoint(0, r.top()%2) );
break;
}
@@ -1655,7 +1655,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
surfaceFlags);
@@ -1681,7 +1681,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
surfaceFlags);
@@ -1693,7 +1693,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// CHECKBOXES
// ----------
case PE_Indicator: {
- QColor contentColor = enabled?cg.base():cg.background();
+ TQColor contentColor = enabled?cg.base():cg.background();
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) {
@@ -1712,7 +1712,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
surfaceFlags |= Highlight_Left|Highlight_Right|
Highlight_Top|Highlight_Bottom;
}
- renderSurface(p, QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
cg.background(), contentColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2), surfaceFlags);
drawPrimitive(PE_CheckMark, p, r, cg, flags);
@@ -1728,11 +1728,11 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// RADIOBUTTONS
// ------------
case PE_ExclusiveIndicator: {
- const QColor contourColor = getColor(cg, ButtonContour, enabled);
- QColor contentColor = enabled?cg.base():cg.background();
+ const TQColor contourColor = getColor(cg, ButtonContour, enabled);
+ TQColor contentColor = enabled?cg.base():cg.background();
- QBitmap bmp;
- bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ TQBitmap bmp;
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
// first the surface...
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
if(!enabled) {
@@ -1747,28 +1747,28 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// ...then contour, anti-alias, mouseOver...
// contour
- bmp = QBitmap(13, 13, radiobutton_contour_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_contour_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(cg.background(), contourColor, 50) );
p->drawPixmap(x, y, bmp);
// anti-alias outside
- bmp = QBitmap(13, 13, radiobutton_aa_outside_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_aa_outside_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(cg.background(), contourColor, 150) );
p->drawPixmap(x, y, bmp);
// highlighting...
if(mouseOver) {
- bmp = QBitmap(13, 13, radiobutton_highlight1_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_highlight1_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 80) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(13, 13, radiobutton_highlight2_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_highlight2_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 150) );
p->drawPixmap(x, y, bmp);
}
// anti-alias inside, "above" the higlighting!
- bmp = QBitmap(13, 13, radiobutton_aa_inside_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_aa_inside_bits, true);
bmp.setMask(bmp);
if(mouseOver) {
p->setPen(alphaBlendColors(getColor(cg,MouseOverHighlight), contourColor, 180) );
@@ -1778,22 +1778,22 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
p->drawPixmap(x, y, bmp);
- QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ TQColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
if(flags & Style_Down) {
checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
}
// draw the radio mark
if (flags & Style_On || flags & Style_Down) {
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_dark_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_dark_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x+2, y+2, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_light_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_light_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
p->drawPixmap(x+2, y+2, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_aa_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_aa_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
p->drawPixmap(x+2, y+2, bmp);
@@ -1805,8 +1805,8 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ExclusiveIndicatorMask: {
p->fillRect(r, color0);
- QBitmap bmp;
- bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ TQBitmap bmp;
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
bmp.setMask(bmp);
p->setPen(color1);
p->drawPixmap(x, y, bmp);
@@ -1818,20 +1818,20 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// --------------
case PE_Splitter: {
// highlight on mouse over
- QColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
+ TQColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
p->fillRect(r, color);
if (w > h) {
if (h > 4) {
int ycenter = r.height()/2;
for(int k = 2*r.width()/10; k < 8*r.width()/10; k+=5) {
- renderDot(p, QPoint(k, ycenter-1), color, false, true);
+ renderDot(p, TQPoint(k, ycenter-1), color, false, true);
}
}
} else {
if (w > 4) {
int xcenter = r.width()/2;
for(int k = 2*r.height()/10; k < 8*r.height()/10; k+=5) {
- renderDot(p, QPoint(xcenter-1, k), color, false, true);
+ renderDot(p, TQPoint(xcenter-1, k), color, false, true);
}
}
}
@@ -1861,9 +1861,9 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
bool isEnabled = true;
// panel is highlighted by default if it has focus, but if we have access to the
// widget itself we can try to avoid highlighting in case it's readOnly or disabled.
- if (p->device() && dynamic_cast<QLineEdit*>(p->device()))
+ if (p->device() && dynamic_cast<TQLineEdit*>(p->device()))
{
- QLineEdit* lineEdit = dynamic_cast<QLineEdit*>(p->device());
+ TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->device());
isReadOnly = lineEdit->isReadOnly();
isEnabled = lineEdit->isEnabled();
}
@@ -1878,9 +1878,9 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
//
// In this place there is no reliable way to detect if we are in khtml; the
// only thing we know is that khtml buffers its widgets into a pixmap. So
- // when the paint device is a QPixmap, chances are high that we are in khtml.
+ // when the paint device is a TQPixmap, chances are high that we are in khtml.
// It's possible that this breaks other things, so let's see how it works...
- if (p->device() && dynamic_cast<QPixmap*>(p->device() ) ) {
+ if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) {
contourFlags += Draw_AlphaBlend;
}
@@ -1894,7 +1894,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(),
getColor(cg, ButtonContour, enabled), contourFlags );
}
- const QColor contentColor = enabled?cg.base():cg.background();
+ const TQColor contentColor = enabled?cg.base():cg.background();
if (_inputFocusHighlight && hasFocus && !isReadOnly && isEnabled)
{
p->setPen( getColor(cg,FocusHighlight).dark(130) );
@@ -1941,10 +1941,10 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_PanelMenuBar:
case PE_PanelDockWindow: {
// fix for toolbar lag (from Mosfet Liquid)
- QWidget* w = dynamic_cast<QWidget*>(p->device());
+ TQWidget* w = dynamic_cast<TQWidget*>(p->device());
if(w && w->backgroundMode() == PaletteButton)
w->setBackgroundMode(PaletteBackground);
- p->fillRect(r, cg.brush(QColorGroup::Background));
+ p->fillRect(r, cg.brush(TQColorGroup::Background));
if ( _drawToolBarSeparator ) {
if ( r.width() > r.height() ) {
@@ -1979,9 +1979,9 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
int center = r.left()+r.width()/2;
for(int j = r.top()+2; j <= r.bottom()-3; j+=3) {
if(counter%2 == 0) {
- renderDot(p, QPoint(center+1, j), cg.background(), true, true);
+ renderDot(p, TQPoint(center+1, j), cg.background(), true, true);
} else {
- renderDot(p, QPoint(center-2, j), cg.background(), true, true);
+ renderDot(p, TQPoint(center-2, j), cg.background(), true, true);
}
counter++;
}
@@ -1989,9 +1989,9 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
int center = r.top()+r.height()/2;
for(int j = r.left()+2; j <= r.right()-3; j+=3) {
if(counter%2 == 0) {
- renderDot(p, QPoint(j, center+1), cg.background(), true, true);
+ renderDot(p, TQPoint(j, center+1), cg.background(), true, true);
} else {
- renderDot(p, QPoint(j, center-2), cg.background(), true, true);
+ renderDot(p, TQPoint(j, center-2), cg.background(), true, true);
}
counter++;
}
@@ -2024,31 +2024,31 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
case PE_CheckMark: {
- const QColor contentColor = enabled?cg.base():cg.background();
- QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ const TQColor contentColor = enabled?cg.base():cg.background();
+ TQColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
if(flags & Style_Down) {
checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
}
int x = r.center().x() - 4, y = r.center().y() - 4;
- QBitmap bmp;
+ TQBitmap bmp;
if( flags & Style_On ) {
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_dark_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_dark_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_light_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_light_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_aa_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_aa_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
p->drawPixmap(x, y, bmp);
} else if ( flags & Style_Off ) {
// empty
} else { // tristate
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_tristate_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_tristate_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x, y, bmp);
@@ -2064,7 +2064,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ArrowDown:
case PE_ArrowLeft:
case PE_ArrowRight: {
- QPointArray a;
+ TQPointArray a;
switch (pe) {
case PE_SpinWidgetUp:
@@ -2094,7 +2094,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
}
- const QWMatrix oldMatrix( p->worldMatrix() );
+ const TQWMatrix oldMatrix( p->worldMatrix() );
if (flags & Style_Down) {
p->translate(pixelMetric(PM_ButtonShiftHorizontal),
@@ -2116,7 +2116,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
a.translate(0, 0);
}
- if (p->pen() == QPen::NoPen) {
+ if (p->pen() == TQPen::NoPen) {
if (flags & Style_Enabled) {
p->setPen(cg.buttonText());
} else {
@@ -2139,14 +2139,14 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
void PlastikStyle::drawControl(ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool enabled = (flags & Style_Enabled);
@@ -2155,7 +2155,7 @@ void PlastikStyle::drawControl(ControlElement element,
// PROGRESSBAR
// -----------
case CE_ProgressBarGroove: {
- const QColor content = enabled?cg.base():cg.background();
+ const TQColor content = enabled?cg.base():cg.background();
renderContour(p, r, cg.background(), getColor(cg, ButtonContour, enabled) );
p->setPen(content.dark(105) );
p->drawLine(r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
@@ -2167,11 +2167,11 @@ void PlastikStyle::drawControl(ControlElement element,
}
case CE_ProgressBarContents: {
- const QProgressBar *pb = dynamic_cast<const QProgressBar*>(widget);
+ const TQProgressBar *pb = dynamic_cast<const TQProgressBar*>(widget);
int steps = pb->totalSteps();
- const QColor bg = enabled?cg.base():cg.background(); // background
- const QColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
+ const TQColor bg = enabled?cg.base():cg.background(); // background
+ const TQColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
if( steps == 0 ) { // Busy indicator
static const int barWidth = 10;
@@ -2180,12 +2180,12 @@ void PlastikStyle::drawControl(ControlElement element,
progress = 0;
if( progress > r.width()-barWidth )
progress = (r.width()-barWidth)-(progress-(r.width()-barWidth));
- p->fillRect( QRect( r.x(), r.y(), r.width(), r.height() ), bg );
- renderContour( p, QRect( r.x()+progress, r.y(), barWidth, r.height() ),
+ p->fillRect( TQRect( r.x(), r.y(), r.width(), r.height() ), bg );
+ renderContour( p, TQRect( r.x()+progress, r.y(), barWidth, r.height() ),
bg, fg.dark(160),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|
Round_BottomRight|Round_UpperLeft|Round_BottomLeft );
- renderSurface(p, QRect( r.x()+progress+1, r.y()+1, barWidth-2, r.height()-2 ),
+ renderSurface(p, TQRect( r.x()+progress+1, r.y()+1, barWidth-2, r.height()-2 ),
bg, fg, cg.highlight(),
2*(_contrast/3),
Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
@@ -2200,9 +2200,9 @@ void PlastikStyle::drawControl(ControlElement element,
if(w<4) w = 4;
int w2 = r.width()-(r.width()-w);
- QRect Rempty(reverseLayout?r.left():r.left()+w-1, r.top(), r.width()-w+1, r.height() );
- QRect Rcontour(reverseLayout?r.right()-w2+1:r.left(), r.top(), w2, r.height() );
- QRect Rsurface(Rcontour.left()+1, Rcontour.top()+1, w2-2, Rcontour.height()-2);
+ TQRect Rempty(reverseLayout?r.left():r.left()+w-1, r.top(), r.width()-w+1, r.height() );
+ TQRect Rcontour(reverseLayout?r.right()-w2+1:r.left(), r.top(), w2, r.height() );
+ TQRect Rsurface(Rcontour.left()+1, Rcontour.top()+1, w2-2, Rcontour.height()-2);
p->fillRect(Rempty, bg);
@@ -2211,18 +2211,18 @@ void PlastikStyle::drawControl(ControlElement element,
reverseLayout ? Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft
: Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight);
- QRegion mask(Rsurface);
+ TQRegion mask(Rsurface);
if(reverseLayout) {
- mask -= QRegion(Rsurface.left(), Rsurface.top(), 1, 1);
- mask -= QRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
} else {
- mask -= QRegion(Rsurface.right(), Rsurface.top(), 1, 1);
- mask -= QRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
}
p->setClipRegion(mask);
int counter = 0;
- QPixmap surfaceTile(21, r.height()-2);
- QPainter surfacePainter(&surfaceTile);
+ TQPixmap surfaceTile(21, r.height()-2);
+ TQPainter surfacePainter(&surfaceTile);
// - 21 pixel -
// __________
// | ` `| <- 3
@@ -2234,7 +2234,7 @@ void PlastikStyle::drawControl(ControlElement element,
const int tileHeight = surfaceTile.height();
// 3
renderSurface(&surfacePainter,
- QRect(20, 0, 11, tileHeight),
+ TQRect(20, 0, 11, tileHeight),
fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -2242,7 +2242,7 @@ void PlastikStyle::drawControl(ControlElement element,
Round_UpperRight|Round_BottomRight|Is_Horizontal);
// 2
renderSurface(&surfacePainter,
- QRect(10, 0, 11, tileHeight),
+ TQRect(10, 0, 11, tileHeight),
fg, fg.light(105), cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -2250,7 +2250,7 @@ void PlastikStyle::drawControl(ControlElement element,
Round_UpperRight|Round_BottomRight|Is_Horizontal);
// 1
renderSurface(&surfacePainter,
- QRect(0, 0, 11, tileHeight),
+ TQRect(0, 0, 11, tileHeight),
fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -2264,8 +2264,8 @@ void PlastikStyle::drawControl(ControlElement element,
staticShift = (reverseLayout ? Rsurface.left() : Rsurface.right()) % 40 - 40;
} else {
// find the animation Offset for the current Widget
- QWidget* nonConstWidget = const_cast<QWidget*>(widget);
- QMapConstIterator<QWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
+ TQWidget* nonConstWidget = const_cast<TQWidget*>(widget);
+ TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
if (iter != progAnimWidgets.end())
animShift = iter.data();
}
@@ -2291,16 +2291,16 @@ void PlastikStyle::drawControl(ControlElement element,
// TABS
// ----
case CE_TabBarTab: {
- const QTabBar * tb = (const QTabBar *) widget;
+ const TQTabBar * tb = (const TQTabBar *) widget;
bool cornerWidget = false;
- if( ::qt_cast<QTabWidget*>(tb->parent()) ) {
- const QTabWidget *tw = (const QTabWidget*)tb->parent();
+ if( ::qt_cast<TQTabWidget*>(tb->parent()) ) {
+ const TQTabWidget *tw = (const TQTabWidget*)tb->parent();
// is there a corner widget in the (top) left edge?
- QWidget *cw = tw->cornerWidget(Qt::TopLeft);
+ TQWidget *cw = tw->cornerWidget(Qt::TopLeft);
if(cw)
cornerWidget = true;
}
- QTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->shape();
bool selected = false;
if (flags & Style_Selected) selected = true;
TabPosition pos;
@@ -2321,18 +2321,18 @@ void PlastikStyle::drawControl(ControlElement element,
}
switch (tbs) {
- case QTabBar::TriangularAbove:
+ case TQTabBar::TriangularAbove:
// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, false, pos);
renderTab(p, r, cg, mouseOver, selected, false, pos, true, cornerWidget);
break;
- case QTabBar::RoundedAbove:
+ case TQTabBar::RoundedAbove:
renderTab(p, r, cg, mouseOver, selected, false, pos, false, cornerWidget);
break;
- case QTabBar::TriangularBelow:
+ case TQTabBar::TriangularBelow:
// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, true, pos);
renderTab(p, r, cg, mouseOver, selected, true, pos, true, cornerWidget);
break;
- case QTabBar::RoundedBelow:
+ case TQTabBar::RoundedBelow:
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
@@ -2343,7 +2343,7 @@ void PlastikStyle::drawControl(ControlElement element,
}
case CE_PushButton: {
- QPushButton *button = (QPushButton *)widget;
+ TQPushButton *button = (TQPushButton *)widget;
const bool isDefault = enabled && button->isDefault();
@@ -2353,12 +2353,12 @@ void PlastikStyle::drawControl(ControlElement element,
if (widget == hoverWidget)
flags |= Style_MouseOver;
- QColorGroup g2 = cg;
+ TQColorGroup g2 = cg;
if (isDefault)
- g2.setColor(QColorGroup::Background, cg.background().dark(120) );
+ g2.setColor(TQColorGroup::Background, cg.background().dark(120) );
drawPrimitive(PE_ButtonBevel, p,
- isDefault?QRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
- g2, flags, QStyleOption(button) );
+ isDefault?TQRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
+ g2, flags, TQStyleOption(button) );
if (isDefault ) {
drawPrimitive(PE_ButtonDefault, p, r, cg, flags);
@@ -2372,7 +2372,7 @@ void PlastikStyle::drawControl(ControlElement element,
int x, y, w, h;
r.rect( &x, &y, &w, &h );
- const QPushButton* button = static_cast<const QPushButton *>( widget );
+ const TQPushButton* button = static_cast<const TQPushButton *>( widget );
bool active = button->isOn() || button->isDown();
bool cornArrow = false;
@@ -2389,14 +2389,14 @@ void PlastikStyle::drawControl(ControlElement element,
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
- (dx + button->iconSet()->pixmap (QIconSet::Small, QIconSet::Normal, QIconSet::Off ).width()) >= w )
+ (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
}
else
{
p->setPen(cg.buttonText());
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -2405,15 +2405,15 @@ void PlastikStyle::drawControl(ControlElement element,
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet()->pixmap( TQIconSet::Small, mode, state );
if (button->text().isEmpty() && !button->pixmap())
p->drawPixmap( x + w/2 - pixmap.width()/2, y + h / 2 - pixmap.height() / 2,
@@ -2422,7 +2422,7 @@ void PlastikStyle::drawControl(ControlElement element,
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
@@ -2432,7 +2432,7 @@ void PlastikStyle::drawControl(ControlElement element,
}
// Make the label indicate if the button is a default button or not
- drawItem( p, QRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
&button->colorGroup().buttonText() );
@@ -2447,7 +2447,7 @@ void PlastikStyle::drawControl(ControlElement element,
// MENUBAR ITEM (sunken panel on mouse over)
// -----------------------------------------
case CE_MenuBarItem: {
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
bool down = flags & Style_Down;
@@ -2472,12 +2472,12 @@ void PlastikStyle::drawControl(ControlElement element,
// POPUPMENU ITEM (highlighted on mouseover)
// ------------------------------------------
case CE_PopupMenuItem: {
- const QPopupMenu *popupmenu = static_cast< const QPopupMenu * >( widget );
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popupmenu = static_cast< const TQPopupMenu * >( widget );
+ TQMenuItem *mi = opt.menuItem();
if ( !mi )
{
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
p->fillRect( r, cg.background().light( 105 ) );
@@ -2490,7 +2490,7 @@ void PlastikStyle::drawControl(ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( checkable )
checkcol = QMAX( checkcol, 20 );
@@ -2524,26 +2524,26 @@ void PlastikStyle::drawControl(ControlElement element,
break;
}
- QRect cr = visualRect( QRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
+ TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
// Select the correct icon from the iconset
if (active)
- mode = enabled?QIconSet::Active:QIconSet::Disabled;
+ mode = enabled?TQIconSet::Active:TQIconSet::Disabled;
else
- mode = enabled?QIconSet::Normal:QIconSet::Disabled;
+ mode = enabled?TQIconSet::Normal:TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && /*!active &&*/ mi->isChecked() )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode);
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap(TQIconSet::Small, mode);
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
}
@@ -2555,7 +2555,7 @@ void PlastikStyle::drawControl(ControlElement element,
// if it's active the "pressed" background is already drawn
// if ( ! active )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_On;
@@ -2582,7 +2582,7 @@ void PlastikStyle::drawControl(ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
// Does the menu item draw it's own label?
if ( mi->custom() ) {
@@ -2602,7 +2602,7 @@ void PlastikStyle::drawControl(ControlElement element,
}
else {
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
int t = s.find( '\t' );
@@ -2610,8 +2610,8 @@ void PlastikStyle::drawControl(ControlElement element,
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
- //QColor draw = cg.text();
- QColor draw = (active && enabled) ? cg.highlightedText () : cg.foreground();
+ //TQColor draw = cg.text();
+ TQColor draw = (active && enabled) ? cg.highlightedText () : cg.foreground();
p->setPen(draw);
@@ -2650,7 +2650,7 @@ void PlastikStyle::drawControl(ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -2669,7 +2669,7 @@ void PlastikStyle::drawControl(ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
- QRect vr = visualRect( QRect( r.x() + r.width() - 5 - 1 - dim,
+ TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -2677,7 +2677,7 @@ void PlastikStyle::drawControl(ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( discol, cg.highlight(), white, white,
+ TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -2710,10 +2710,10 @@ void PlastikStyle::drawControl(ControlElement element,
}
void PlastikStyle::drawControlMask(ControlElement element,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &opt) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &opt) const
{
switch (element) {
case CE_PushButton: {
@@ -2730,10 +2730,10 @@ void PlastikStyle::drawControlMask(ControlElement element,
}
void PlastikStyle::drawComplexControlMask(ComplexControl c,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &o) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &o) const
{
switch (c) {
case CC_SpinWidget:
@@ -2751,16 +2751,16 @@ void PlastikStyle::drawComplexControlMask(ComplexControl c,
}
void PlastikStyle::drawComplexControl(ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool enabled = (flags & Style_Enabled);
@@ -2770,7 +2770,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
case CC_ComboBox: {
static const unsigned int handleWidth = 15;
- const QComboBox *cb = dynamic_cast<const QComboBox *>(widget);
+ const TQComboBox *cb = dynamic_cast<const TQComboBox *>(widget);
// at the moment cb is only needed to check if the combo box is editable or not.
// if cb doesn't exist, just assume false and the app (gideon! ;) ) at least doesn't crash.
bool editable = false;
@@ -2780,8 +2780,8 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
hasFocus = cb->hasFocus();
}
- const QColor buttonColor = enabled?cg.button():cg.background();
- const QColor inputColor = enabled?(editable?cg.base():cg.button())
+ const TQColor buttonColor = enabled?cg.button():cg.background();
+ const TQColor inputColor = enabled?(editable?cg.base():cg.button())
:cg.background();
uint contourFlags = 0;
@@ -2790,9 +2790,9 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
if (_inputFocusHighlight && hasFocus && editable && enabled)
{
- QRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
- QRect editFrame = r;
- QRect buttonFrame = r;
+ TQRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
+ TQRect editFrame = r;
+ TQRect buttonFrame = r;
uint editFlags = contourFlags;
uint buttonFlags = contourFlags;
@@ -2833,9 +2833,9 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
p->drawLine(r.right()-handleWidth-1, r.top()+1, r.right()-handleWidth-1, r.bottom()-1);
}
- const QRect RbuttonSurface(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ const TQRect RbuttonSurface(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
handleWidth, r.height()-2);
- const QRect RcontentSurface(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ const TQRect RcontentSurface(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
r.width()-handleWidth-3, r.height()-2);
// handler
@@ -2873,7 +2873,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
surfaceFlags);
if (hasFocus) {
drawPrimitive(PE_FocusRect, p,
- QRect(RcontentSurface.x() + 2,
+ TQRect(RcontentSurface.x() + 2,
RcontentSurface.y() + 2,
RcontentSurface.width() - 4,
RcontentSurface.height() - 4), cg);
@@ -2913,7 +2913,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
p->setPen(cg.foreground());
drawPrimitive(PE_SpinWidgetDown, p, RbuttonSurface, cg, Style_Default|Style_Enabled|Style_Raised);
- // QComboBox draws the text using cg.text(), we can override this
+ // TQComboBox draws the text using cg.text(), we can override this
// from here
p->setPen( cg.buttonText() );
p->setBackgroundColor( cg.button() );
@@ -2923,9 +2923,9 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
// TOOLBUTTON
// ----------
case CC_ToolButton: {
- const QToolButton *tb = (const QToolButton *) widget;
+ const TQToolButton *tb = (const TQToolButton *) widget;
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -2954,7 +2954,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
} else if (tb->parentWidget() &&
tb->parentWidget()->backgroundPixmap() &&
!tb->parentWidget()->backgroundPixmap()->isNull()) {
- QPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
}
}
@@ -2968,7 +2968,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
}
if (tb->hasFocus() && !tb->focusProxy()) {
- QRect fr = tb->rect();
+ TQRect fr = tb->rect();
fr.addCoords(2, 2, -2, -2);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -2984,7 +2984,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
case CC_SpinWidget: {
static const unsigned int handleWidth = 15;
- const QSpinWidget *sw = dynamic_cast<const QSpinWidget *>(widget);
+ const TQSpinWidget *sw = dynamic_cast<const TQSpinWidget *>(widget);
SFlags sflags = flags;
PrimitiveElement pe;
@@ -2992,16 +2992,16 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
if (sw)
hasFocus = sw->hasFocus();
- const QColor buttonColor = enabled?cg.button():cg.background();
- const QColor inputColor = enabled?cg.base():cg.background();
+ const TQColor buttonColor = enabled?cg.button():cg.background();
+ const TQColor inputColor = enabled?cg.base():cg.background();
// contour
const bool heightDividable = ((r.height()%2) == 0);
if (_inputFocusHighlight && hasFocus && enabled)
{
- QRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
- QRect editFrame = r;
- QRect buttonFrame = r;
+ TQRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
+ TQRect editFrame = r;
+ TQRect buttonFrame = r;
uint editFlags = 0;
uint buttonFlags = 0;
@@ -3043,14 +3043,14 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
reverseLayout?r.left()+handleWidth:r.right()-1, r.top()+1+(r.height()-2)/2-1);
// surface
- QRect upRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ TQRect upRect = TQRect(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
handleWidth, (r.height()-2)/2);
- QRect downRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth,
+ TQRect downRect = TQRect(reverseLayout?r.left()+1:r.right()-handleWidth,
heightDividable?r.top()+1+((r.height()-2)/2):r.top()+1+((r.height()-2)/2)+1,
handleWidth, ((r.height()-2)/2) );
if(heightDividable) {
- upRect = QRect(upRect.left(), upRect.top(), upRect.width(), upRect.height()-1 );
- downRect = QRect(downRect.left(), downRect.top()+1, downRect.width(), downRect.height()-1 );
+ upRect = TQRect(upRect.left(), upRect.top(), upRect.width(), upRect.height()-1 );
+ downRect = TQRect(downRect.left(), downRect.top()+1, downRect.width(), downRect.height()-1 );
}
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
@@ -3089,7 +3089,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
sflags |= Style_Sunken;
} else
sflags |= Style_Raised;
- if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ if (sw->buttonSymbols() == TQSpinWidget::PlusMinus)
pe = PE_SpinWidgetPlus;
else
pe = PE_SpinWidgetUp;
@@ -3102,7 +3102,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
sflags |= Style_Sunken;
} else
sflags |= Style_Raised;
- if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ if (sw->buttonSymbols() == TQSpinWidget::PlusMinus)
pe = PE_SpinWidgetMinus;
else
pe = PE_SpinWidgetDown;
@@ -3110,7 +3110,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
drawPrimitive(pe, p, downRect, cg, sflags);
// thin frame around the input area
- const QRect Rcontent = QRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ const TQRect Rcontent = TQRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
r.width()-1-2-handleWidth, r.height()-2);
if (_inputFocusHighlight && hasFocus && enabled)
{
@@ -3148,7 +3148,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
}
-QRect PlastikStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect PlastikStyle::subRect(SubRect r, const TQWidget *widget) const
{
switch (r) {
case SR_ComboBoxFocusRect: {
@@ -3158,12 +3158,12 @@ QRect PlastikStyle::subRect(SubRect r, const QWidget *widget) const
// Don't use KStyles progressbar subrect
// TODO:
case SR_ProgressBarGroove: {
- return QRect(widget->rect());
+ return TQRect(widget->rect());
}
case SR_ProgressBarContents:
case SR_ProgressBarLabel: {
- QRect rw = widget->rect();
- return QRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
+ TQRect rw = widget->rect();
+ return TQRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
}
default: {
@@ -3172,22 +3172,22 @@ QRect PlastikStyle::subRect(SubRect r, const QWidget *widget) const
}
}
-QRect PlastikStyle::querySubControlMetrics(ComplexControl control,
- const QWidget *widget,
+TQRect PlastikStyle::querySubControlMetrics(ComplexControl control,
+ const TQWidget *widget,
SubControl subcontrol,
- const QStyleOption &opt) const
+ const TQStyleOption &opt) const
{
if (!widget) {
- return QRect();
+ return TQRect();
}
- QRect r(widget->rect());
+ TQRect r(widget->rect());
switch (control) {
case CC_ComboBox: {
switch (subcontrol) {
case SC_ComboBoxEditField: {
// TODO: is the handler width in pixelmetric?
- return QRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
+ return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
@@ -3200,7 +3200,7 @@ QRect PlastikStyle::querySubControlMetrics(ComplexControl control,
const bool heightDividable = ((r.height()%2) == 0);
- QSize bs;
+ TQSize bs;
if(heightDividable) {
bs.setHeight(QMAX(8, (r.height()-2)/2));
} else {
@@ -3212,26 +3212,26 @@ QRect PlastikStyle::querySubControlMetrics(ComplexControl control,
switch (subcontrol) {
case SC_SpinWidgetUp: {
- return QRect(buttonsLeft, r.top()+1, bs.width(), bs.height() );
+ return TQRect(buttonsLeft, r.top()+1, bs.width(), bs.height() );
}
case SC_SpinWidgetDown: {
if(heightDividable) {
- return QRect(buttonsLeft, r.top()+1+bs.height(),
+ return TQRect(buttonsLeft, r.top()+1+bs.height(),
bs.width(), r.height()-(bs.height()+2) );
} else {
- return QRect(buttonsLeft, r.top()+1+bs.height()+1,
+ return TQRect(buttonsLeft, r.top()+1+bs.height()+1,
bs.width(), r.height()-(bs.height()+2+1) );
}
}
case SC_SpinWidgetFrame: {
- return QRect(r.left(), r.top(), r.width(), r.height() );
+ return TQRect(r.left(), r.top(), r.width(), r.height() );
}
case SC_SpinWidgetEditField: {
- return QRect(r.left()+fw, r.top()+fw,
+ return TQRect(r.left()+fw, r.top()+fw,
r.width()-(bs.width()+1+2*fw), r.height()-2*fw);
}
case SC_SpinWidgetButtonField: {
- return QRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
+ return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
@@ -3245,15 +3245,15 @@ QRect PlastikStyle::querySubControlMetrics(ComplexControl control,
}
}
-int PlastikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m) {
// TABS
// ----
case PM_TabBarTabVSpace: {
- const QTabBar * tb = (const QTabBar *) widget;
- if (tb->shape() == QTabBar::RoundedAbove ||
- tb->shape() == QTabBar::RoundedBelow)
+ const TQTabBar * tb = (const TQTabBar *) widget;
+ if (tb->shape() == TQTabBar::RoundedAbove ||
+ tb->shape() == TQTabBar::RoundedBelow)
return 12;
else
return 4;
@@ -3322,7 +3322,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
return 1;
case PM_DefaultFrameWidth: {
- if(widget && ::qt_cast<QPopupMenu*>(widget))
+ if(widget && ::qt_cast<TQPopupMenu*>(widget))
return 1;
else
return 2;
@@ -3347,18 +3347,18 @@ int PlastikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-QSize PlastikStyle::sizeFromContents(ContentsType t,
- const QWidget *widget,
- const QSize &s,
- const QStyleOption &opt) const
+TQSize PlastikStyle::sizeFromContents(ContentsType t,
+ const TQWidget *widget,
+ const TQSize &s,
+ const TQStyleOption &opt) const
{
switch (t) {
case CT_PopupMenuItem: {
if (!widget || opt.isDefault())
return s;
- const QPopupMenu *popup = dynamic_cast<const QPopupMenu *>(widget);
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popup = dynamic_cast<const TQPopupMenu *>(widget);
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = s.width(), h = s.height();
bool checkable = popup->isCheckable();
@@ -3382,7 +3382,7 @@ QSize PlastikStyle::sizeFromContents(ContentsType t,
}
if (mi->iconSet()) {
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height() + 2);
+ h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height() + 2);
}
}
@@ -3404,24 +3404,24 @@ QSize PlastikStyle::sizeFromContents(ContentsType t,
w += rightBorder;
- return QSize(w, h);
+ return TQSize(w, h);
}
case CT_PushButton:
{
- const QPushButton* btn = static_cast<const QPushButton*>(widget);
+ const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
- if ( btn->text().isEmpty() && s.width() < 32 ) return QSize(w, h);
+ if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
- return QSize( w+25, h+5 );
+ return TQSize( w+25, h+5 );
}
case CT_ToolButton:
{
- if(widget->parent() && ::qt_cast<QToolBar*>(widget->parent()) )
- return QSize( s.width()+2*4, s.height()+2*4 );
+ if(widget->parent() && ::qt_cast<TQToolBar*>(widget->parent()) )
+ return TQSize( s.width()+2*4, s.height()+2*4 );
else
return KStyle::sizeFromContents (t, widget, s, opt);
}
@@ -3434,8 +3434,8 @@ QSize PlastikStyle::sizeFromContents(ContentsType t,
}
int PlastikStyle::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
+ const TQWidget *widget,
+ const TQStyleOption &option,
QStyleHintReturn* returnData ) const
{
switch (stylehint) {
@@ -3447,7 +3447,7 @@ int PlastikStyle::styleHint( StyleHint stylehint,
}
}
-bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
+bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
{
if (KStyle::eventFilter(obj, ev) )
return true;
@@ -3455,20 +3455,20 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
if (!obj->isWidgetType() ) return false;
// focus highlight
- if ( ::qt_cast<QLineEdit*>(obj) ) {
- QWidget* widget = static_cast<QWidget*>(obj);
+ if ( ::qt_cast<TQLineEdit*>(obj) ) {
+ TQWidget* widget = static_cast<TQWidget*>(obj);
- if ( ::qt_cast<QSpinWidget*>(widget->parentWidget()) )
+ if ( ::qt_cast<TQSpinWidget*>(widget->parentWidget()) )
{
- QWidget* spinbox = widget->parentWidget();
- if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ TQWidget* spinbox = widget->parentWidget();
+ if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
spinbox->repaint(false);
}
return false;
}
- if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
widget->repaint(false);
}
@@ -3476,36 +3476,36 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
}
//Hover highlight... use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<QPushButton*>(obj) || ::qt_cast<QComboBox*>(obj) ||
- ::qt_cast<QSpinWidget*>(obj) || ::qt_cast<QCheckBox*>(obj) ||
- ::qt_cast<QRadioButton*>(obj) || ::qt_cast<QToolButton*>(obj) || obj->inherits("QSplitterHandle") )
+ if ( ::qt_cast<TQPushButton*>(obj) || ::qt_cast<TQComboBox*>(obj) ||
+ ::qt_cast<TQSpinWidget*>(obj) || ::qt_cast<TQCheckBox*>(obj) ||
+ ::qt_cast<TQRadioButton*>(obj) || ::qt_cast<TQToolButton*>(obj) || obj->inherits("QSplitterHandle") )
{
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
{
- QWidget* button = static_cast<QWidget*>(obj);
+ TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = button;
button->repaint(false);
}
- else if ((ev->type() == QEvent::Leave) && (obj == hoverWidget) )
+ else if ((ev->type() == TQEvent::Leave) && (obj == hoverWidget) )
{
- QWidget* button = static_cast<QWidget*>(obj);
+ TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = 0;
button->repaint(false);
}
return false;
}
- if ( ::qt_cast<QTabBar*>(obj) ) {
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ if ( ::qt_cast<TQTabBar*>(obj) ) {
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
{
- QWidget* tabbar = static_cast<QWidget*>(obj);
+ TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = tabbar;
hoverTab = 0;
tabbar->repaint(false);
}
- else if (ev->type() == QEvent::MouseMove)
+ else if (ev->type() == TQEvent::MouseMove)
{
- QTabBar *tabbar = dynamic_cast<QTabBar*>(obj);
- QMouseEvent *me = dynamic_cast<QMouseEvent*>(ev);
+ TQTabBar *tabbar = dynamic_cast<TQTabBar*>(obj);
+ TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(ev);
if (tabbar && me) {
// avoid unnecessary repaints (which otherwise would occour on every
@@ -3513,7 +3513,7 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
bool repaint = true;
- QTab *tab = tabbar->selectTab(me->pos() );
+ TQTab *tab = tabbar->selectTab(me->pos() );
if (hoverTab == tab)
repaint = false;
hoverTab = tab;
@@ -3522,9 +3522,9 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
tabbar->repaint(false);
}
}
- else if (ev->type() == QEvent::Leave)
+ else if (ev->type() == TQEvent::Leave)
{
- QWidget* tabbar = static_cast<QWidget*>(obj);
+ TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = 0;
hoverTab = 0;
tabbar->repaint(false);
@@ -3532,16 +3532,16 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
// Track show events for progress bars
- if ( _animateProgressBar && ::qt_cast<QProgressBar*>(obj) )
+ if ( _animateProgressBar && ::qt_cast<TQProgressBar*>(obj) )
{
- if ((ev->type() == QEvent::Show) && !animationTimer->isActive())
+ if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{
animationTimer->start( 50, false );
}
}
if ( !qstrcmp(obj->name(), "kde toolbar widget") )
{
- QWidget* lb = static_cast<QWidget*>(obj);
+ TQWidget* lb = static_cast<TQWidget*>(obj);
if (lb->backgroundMode() == Qt::PaletteButton)
lb->setBackgroundMode(Qt::PaletteBackground);
lb->removeEventFilter(this);
@@ -3550,12 +3550,12 @@ bool PlastikStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
-QColor PlastikStyle::getColor(const QColorGroup &cg, const ColorType t, const bool enabled)const
+TQColor PlastikStyle::getColor(const TQColorGroup &cg, const ColorType t, const bool enabled)const
{
return getColor(cg, t, enabled?IsEnabled:IsDisabled);
}
-QColor PlastikStyle::getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const
+TQColor PlastikStyle::getColor(const TQColorGroup &cg, const ColorType t, const WidgetState s)const
{
const bool enabled = (s != IsDisabled) &&
((s == IsEnabled) || (s == IsPressed) || (s == IsHighlighted));
diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h
index 32a48ec96..2b5b70a71 100644
--- a/kstyles/plastik/plastik.h
+++ b/kstyles/plastik/plastik.h
@@ -40,8 +40,8 @@
#define __PLASTIK_H
#include <kstyle.h>
-#include <qbitmap.h>
-#include <qintcache.h>
+#include <tqbitmap.h>
+#include <tqintcache.h>
#define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2
#define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1
@@ -62,69 +62,69 @@ public:
PlastikStyle();
virtual ~PlastikStyle();
- void polish(QApplication* app );
- void polish(QWidget* widget );
- void unPolish(QWidget* widget );
+ void polish(TQApplication* app );
+ void polish(TQWidget* widget );
+ void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive(PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption &opt = QStyleOption::Default ) const;
+ const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawControl(ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const;
+ void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
void drawComplexControl(ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric(PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- QRect subRect(SubRect r,
- const QWidget *widget ) const;
+ TQRect subRect(SubRect r,
+ const TQWidget *widget ) const;
- QRect querySubControlMetrics(ComplexControl control,
- const QWidget *widget,
+ TQRect querySubControlMetrics(ComplexControl control,
+ const TQWidget *widget,
SubControl subcontrol,
- const QStyleOption &opt = QStyleOption::Default ) const;
+ const TQStyleOption &opt = TQStyleOption::Default ) const;
- void drawComplexControlMask(QStyle::ComplexControl c,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &o=QStyleOption::Default) const;
+ void drawComplexControlMask(TQStyle::ComplexControl c,
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &o=TQStyleOption::Default) const;
- QSize sizeFromContents(QStyle::ContentsType t,
- const QWidget *w,
- const QSize &s,
- const QStyleOption &o) const;
+ TQSize sizeFromContents(TQStyle::ContentsType t,
+ const TQWidget *w,
+ const TQSize &s,
+ const TQStyleOption &o) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
protected:
@@ -182,66 +182,66 @@ protected:
Draw_AlphaBlend = 0x00020000
};
- void renderContour(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &contourColor,
+ void renderContour(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &contourColor,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
- void renderMask(QPainter *p,
- const QRect &r,
- const QColor &color,
+ void renderMask(TQPainter *p,
+ const TQRect &r,
+ const TQColor &color,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
- void renderSurface(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &buttonColor,
- const QColor &highlightColor,
+ void renderSurface(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &buttonColor,
+ const TQColor &highlightColor,
int intensity = 5,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|
Is_Horizontal) const;
- inline void renderPixel(QPainter *p,
- const QPoint &pos,
+ inline void renderPixel(TQPainter *p,
+ const TQPoint &pos,
const int alpha,
- const QColor &color,
- const QColor &background = QColor(),
+ const TQColor &color,
+ const TQColor &background = TQColor(),
bool fullAlphaBlend = true) const;
- void renderButton(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderButton(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool sunken = false,
bool mouseOver = false,
bool horizontal = true,
bool enabled = true,
bool khtmlMode = false) const;
- void renderPanel(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderPanel(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
const bool pseudo3d = true,
const bool sunken = true) const;
- void renderDot(QPainter *p,
- const QPoint &point,
- const QColor &baseColor,
+ void renderDot(TQPainter *p,
+ const TQPoint &point,
+ const TQColor &baseColor,
const bool thick = false,
const bool sunken = false) const;
- void renderGradient(QPainter *p,
- const QRect &r,
- const QColor &c1,
- const QColor &c2,
+ void renderGradient(TQPainter *p,
+ const TQRect &r,
+ const TQColor &c1,
+ const TQColor &c2,
bool horizontal = true) const;
- void renderTab(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderTab(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool mouseOver = false,
const bool selected = false,
const bool bottom = false,
@@ -249,21 +249,21 @@ protected:
const bool triangular = false,
const bool cornerWidget = false) const;
- virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg,
- const QPopupMenu* popup ) const;
+ virtual void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup& cg,
+ const TQPopupMenu* popup ) const;
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
- QWidget* hoverWidget;
+ TQWidget* hoverWidget;
protected slots:
- void khtmlWidgetDestroyed(QObject* w);
+ void khtmlWidgetDestroyed(TQObject* w);
//Animation slots.
void updateProgressPos();
- void progressBarDestroyed(QObject* bar);
+ void progressBarDestroyed(TQObject* bar);
- inline QColor getColor(const QColorGroup &cg, const ColorType t, const bool enabled = true)const;
- inline QColor getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const;
+ inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const bool enabled = true)const;
+ inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const WidgetState s)const;
private:
// Disable copy constructor and = operator
PlastikStyle( const PlastikStyle & );
@@ -283,17 +283,17 @@ private:
bool _customOverHighlightColor;
bool _customFocusHighlightColor;
bool _customCheckMarkColor;
- QColor _overHighlightColor;
- QColor _focusHighlightColor;
- QColor _checkMarkColor;
+ TQColor _overHighlightColor;
+ TQColor _focusHighlightColor;
+ TQColor _checkMarkColor;
- QTab *hoverTab;
+ TQTab *hoverTab;
// track khtml widgets.
- QMap<const QWidget*,bool> khtmlWidgets;
+ TQMap<const TQWidget*,bool> khtmlWidgets;
//Animation support.
- QMap<QWidget*, int> progAnimWidgets;
+ TQMap<TQWidget*, int> progAnimWidgets;
// pixmap cache.
enum CacheEntryType {
@@ -310,10 +310,10 @@ private:
QRgb c2Rgb;
bool horizontal;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0,
- bool hor = false, QPixmap* p = 0 ):
+ bool hor = false, TQPixmap* p = 0 ):
type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
{}
@@ -324,7 +324,7 @@ private:
int key()
{
- // create an int key from the properties which is used to refer to entries in the QIntCache.
+ // create an int key from the properties which is used to refer to entries in the TQIntCache.
// the result may not be 100% correct as we don't have so much space in one integer -- use
// == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
@@ -349,14 +349,14 @@ private:
return match;
}
};
- QIntCache<CacheEntry> *pixmapCache;
+ TQIntCache<CacheEntry> *pixmapCache;
// For KPE_ListViewBranch
- mutable QBitmap *verticalLine;
- mutable QBitmap *horizontalLine;
+ mutable TQBitmap *verticalLine;
+ mutable TQBitmap *horizontalLine;
// For progress bar animation
- QTimer *animationTimer;
+ TQTimer *animationTimer;
};
#endif // __PLASTIK_H
diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp
index 0569c74ef..5ddf8cd56 100644
--- a/kstyles/utils/installtheme/main.cpp
+++ b/kstyles/utils/installtheme/main.cpp
@@ -20,10 +20,10 @@
DEALINGS IN THE SOFTWARE.
*/
-#include <qfileinfo.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qsettings.h>
+#include <tqfileinfo.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqsettings.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -40,16 +40,16 @@ int main(int argc, char **argv)
KCmdLineArgs::init(argc, argv, "kinstalltheme", I18N_NOOP("KInstalltheme"), desc, ver);
KApplication qapp(false, false); //We don't allow styles.. Kind of ironic, isn't it?
- KGlobal::dirs()->addResourceType("themercs", KGlobal::dirs()->kde_default("data")+QString("kstyle/themes"));
- QStringList themercs = KGlobal::dirs()->findAllResources("themercs","*.themerc");
+ KGlobal::dirs()->addResourceType("themercs", KGlobal::dirs()->kde_default("data")+TQString("kstyle/themes"));
+ TQStringList themercs = KGlobal::dirs()->findAllResources("themercs","*.themerc");
- QMap <QString, QString> themes; //Name->file mapping..
+ TQMap <TQString, TQString> themes; //Name->file mapping..
- for (QStringList::iterator i = themercs.begin(); i!=themercs.end(); ++i)
+ for (TQStringList::iterator i = themercs.begin(); i!=themercs.end(); ++i)
{
- QString file=*i;
+ TQString file=*i;
KSimpleConfig config(file, true);
- QString name = QFileInfo(file).baseName(); //This is nice and static...
+ TQString name = TQFileInfo(file).baseName(); //This is nice and static...
//So we don't have to worry about our key changing when the language does.
config.setGroup( "KDE" );
@@ -66,20 +66,20 @@ int main(int argc, char **argv)
#if 0
//Doesn't seem to work with present Qt..
- QStringList existing = cache.subkeyList("/kthemestyle");
- for (QStringList::iterator i = existing.begin(); i != existing.end(); i++)
+ TQStringList existing = cache.subkeyList("/kthemestyle");
+ for (TQStringList::iterator i = existing.begin(); i != existing.end(); i++)
{
cout<<"Have:"<<(*i).latin1()<<"\n";
cache.removeEntry("/ktmthestyle"+(*i));
}
#endif
- QStringList themeNames; //A list of names, each occurring once - the keys of the themes map..
+ TQStringList themeNames; //A list of names, each occurring once - the keys of the themes map..
- for (QMap<QString, QString>::Iterator i = themes.begin(); i!=themes.end(); ++i)
+ for (TQMap<TQString, TQString>::Iterator i = themes.begin(); i!=themes.end(); ++i)
{
cache.setGroup(i.key().lower());
- cache.writePathEntry("file",QFileInfo(i.data()).fileName());
+ cache.writePathEntry("file",TQFileInfo(i.data()).fileName());
themeNames.push_back(i.key());
}
diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp
index ec5f606d0..41cbd9339 100644
--- a/kstyles/web/webstyle.cpp
+++ b/kstyles/web/webstyle.cpp
@@ -21,16 +21,16 @@
#define INCLUDE_MENUITEM_DEF
#endif
-#include <qmenudata.h>
-#include <qpalette.h>
-#include <qbitmap.h>
-#include <qtabbar.h>
-#include <qpointarray.h>
-#include <qscrollbar.h>
-#include <qframe.h>
-#include <qpushbutton.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqmenudata.h>
+#include <tqpalette.h>
+#include <tqbitmap.h>
+#include <tqtabbar.h>
+#include <tqpointarray.h>
+#include <tqscrollbar.h>
+#include <tqframe.h>
+#include <tqpushbutton.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kdrawutil.h>
@@ -41,15 +41,15 @@
#include "webstyle.h"
static const int _indicatorSize = 13;
-static QButton * _highlightedButton = 0;
+static TQButton * _highlightedButton = 0;
static const int _scrollBarExtent = 14;
-static QFrame * _currentFrame = 0;
+static TQFrame * _currentFrame = 0;
static int _savedFrameLineWidth;
static int _savedFrameMidLineWidth;
static ulong _savedFrameStyle;
-static QColor contrastingForeground(const QColor & fg, const QColor & bg)
+static TQColor contrastingForeground(const TQColor & fg, const TQColor & bg)
{
int h, s, vbg, vfg;
@@ -73,26 +73,26 @@ static QColor contrastingForeground(const QColor & fg, const QColor & bg)
static void
scrollBarControlsMetrics
(
- const QScrollBar * sb,
+ const TQScrollBar * sb,
int sliderStart,
int /* sliderMin */,
int sliderMax,
int sliderLength,
int buttonDim,
- QRect & rSub,
- QRect & rAdd,
- QRect & rSubPage,
- QRect & rAddPage,
- QRect & rSlider
+ TQRect & rSub,
+ TQRect & rAdd,
+ TQRect & rSubPage,
+ TQRect & rAddPage,
+ TQRect & rSlider
)
{
- bool horizontal = sb->orientation() == QScrollBar::Horizontal;
+ bool horizontal = sb->orientation() == TQScrollBar::Horizontal;
int len = horizontal ? sb->width() : sb->height();
int extent = horizontal ? sb->height() : sb->width();
- QColorGroup g = sb->colorGroup();
+ TQColorGroup g = sb->colorGroup();
if (sliderStart > sliderMax)
sliderStart = sliderMax;
@@ -162,7 +162,7 @@ scrollBarControlsMetrics
static void
drawFunkyRect
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
@@ -190,7 +190,7 @@ drawFunkyRect
1, h - 2
};
- p->drawPoints(QPointArray(4, pointList));
+ p->drawPoints(TQPointArray(4, pointList));
}
else
{
@@ -211,7 +211,7 @@ drawFunkyRect
1, h - 3
};
- p->drawPoints(QPointArray(8, pointList));
+ p->drawPoints(TQPointArray(8, pointList));
}
p->translate(-x, -y);
@@ -230,34 +230,34 @@ WebStyle::~WebStyle()
}
void
-WebStyle::polish(QApplication *)
+WebStyle::polish(TQApplication *)
{
// Empty.
}
void
-WebStyle::polish(QPalette &)
+WebStyle::polish(TQPalette &)
{
// Empty.
}
void
-WebStyle::unPolish(QApplication *)
+WebStyle::unPolish(TQApplication *)
{
// Empty.
}
void
-WebStyle::polish(QWidget * w)
+WebStyle::polish(TQWidget * w)
{
- if (w->inherits("QPushButton"))
+ if (w->inherits("TQPushButton"))
w->installEventFilter(this);
- else if (w->inherits("QGroupBox") || w->inherits("QFrame"))
+ else if (w->inherits("TQGroupBox") || w->inherits("TQFrame"))
{
- QFrame * f(static_cast<QFrame *>(w));
+ TQFrame * f(static_cast<TQFrame *>(w));
- if (f->frameStyle() != QFrame::NoFrame)
+ if (f->frameStyle() != TQFrame::NoFrame)
{
_currentFrame = f;
@@ -265,29 +265,29 @@ WebStyle::polish(QWidget * w)
_savedFrameMidLineWidth = f->midLineWidth();
_savedFrameStyle = f->frameStyle();
- if (f->frameShape() == QFrame::HLine || f->frameShape() == QFrame::VLine)
+ if (f->frameShape() == TQFrame::HLine || f->frameShape() == TQFrame::VLine)
{
f->setMidLineWidth(1);
- f->setFrameStyle(f->frameShape() | QFrame::Plain);
+ f->setFrameStyle(f->frameShape() | TQFrame::Plain);
}
else
{
f->setLineWidth(1);
- f->setFrameStyle(QFrame::Box | QFrame::Plain);
+ f->setFrameStyle(TQFrame::Box | TQFrame::Plain);
}
}
}
}
void
-WebStyle::unPolish(QWidget * w)
+WebStyle::unPolish(TQWidget * w)
{
- if (w->inherits("QPushButton"))
+ if (w->inherits("TQPushButton"))
w->removeEventFilter(this);
else if (w == _currentFrame)
{
- QFrame * f(static_cast<QFrame *>(w));
+ TQFrame * f(static_cast<TQFrame *>(w));
f->setLineWidth(_savedFrameLineWidth);
f->setMidLineWidth(_savedFrameMidLineWidth);
@@ -296,16 +296,16 @@ WebStyle::unPolish(QWidget * w)
}
bool
-WebStyle::eventFilter(QObject * o, QEvent * e)
+WebStyle::eventFilter(TQObject * o, TQEvent * e)
{
- QPushButton * pb(static_cast<QPushButton *>(o));
+ TQPushButton * pb(static_cast<TQPushButton *>(o));
- if (e->type() == QEvent::Enter)
+ if (e->type() == TQEvent::Enter)
{
_highlightedButton = pb;
pb->repaint(false);
}
- else if (e->type() == QEvent::Leave)
+ else if (e->type() == TQEvent::Leave)
{
_highlightedButton = 0;
pb->repaint(false);
@@ -317,14 +317,14 @@ WebStyle::eventFilter(QObject * o, QEvent * e)
void
WebStyle::drawButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken,
- const QBrush * fill
+ const TQBrush * fill
)
{
p->save();
@@ -344,41 +344,41 @@ WebStyle::drawButton
QRect
WebStyle::buttonRect(int x, int y, int w, int h)
{
- return QRect(x + 2, y + 2, w - 4, h - 4);
+ return TQRect(x + 2, y + 2, w - 4, h - 4);
}
void
WebStyle::drawBevelButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken,
- const QBrush * fill
+ const TQBrush * fill
)
{
drawButton(p, x, y, w, h, g, sunken, fill);
}
void
-WebStyle::drawPushButton(QPushButton * b, QPainter * p)
+WebStyle::drawPushButton(TQPushButton * b, TQPainter * p)
{
// Note: painter is already translated for us.
bool sunken(b->isDown() || b->isOn());
bool hl(_highlightedButton == b);
- QColor bg(b->colorGroup().button());
+ TQColor bg(b->colorGroup().button());
p->save();
- p->fillRect(b->rect(), b->colorGroup().brush(QColorGroup::Background));
+ p->fillRect(b->rect(), b->colorGroup().brush(TQColorGroup::Background));
if (b->isDefault())
{
- QColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid());
+ TQColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid());
p->setPen(contrastingForeground(c, bg));
@@ -391,7 +391,7 @@ WebStyle::drawPushButton(QPushButton * b, QPainter * p)
4,
b->width() - 8,
b->height() - 8,
- b->colorGroup().brush(QColorGroup::Button)
+ b->colorGroup().brush(TQColorGroup::Button)
);
if (b->isEnabled())
@@ -419,7 +419,7 @@ WebStyle::drawPushButton(QPushButton * b, QPainter * p)
}
void
-WebStyle::drawPushButtonLabel(QPushButton * b, QPainter * p)
+WebStyle::drawPushButtonLabel(TQPushButton * b, TQPainter * p)
{
// This is complicated stuff and we don't really want to mess with it.
@@ -429,8 +429,8 @@ WebStyle::drawPushButtonLabel(QPushButton * b, QPainter * p)
void
WebStyle::drawScrollBarControls
(
- QPainter * p,
- const QScrollBar * sb,
+ TQPainter * p,
+ const TQScrollBar * sb,
int sliderStart,
uint controls,
uint activeControl
@@ -442,7 +442,7 @@ WebStyle::drawScrollBarControls
scrollBarMetrics(sb, sliderMin, sliderMax, sliderLength, buttonDim);
- QRect rSub, rAdd, rSubPage, rAddPage, rSlider;
+ TQRect rSub, rAdd, rSubPage, rAddPage, rSlider;
scrollBarControlsMetrics
(
@@ -459,13 +459,13 @@ WebStyle::drawScrollBarControls
rSlider
);
- QColorGroup g(sb->colorGroup());
+ TQColorGroup g(sb->colorGroup());
if (controls & AddLine && rAdd.isValid())
{
bool active(activeControl & AddLine);
- QColor c(active ? g.highlight() : g.dark());
+ TQColor c(active ? g.highlight() : g.dark());
p->setPen(c);
p->setBrush(g.button());
@@ -494,7 +494,7 @@ WebStyle::drawScrollBarControls
{
bool active(activeControl & SubLine);
- QColor c(active ? g.highlight() : g.dark());
+ TQColor c(active ? g.highlight() : g.dark());
p->setPen(c);
p->setBrush(g.button());
@@ -551,7 +551,7 @@ WebStyle::drawScrollBarControls
rSlider.width() - 4
;
- QPoint center(rSlider.center());
+ TQPoint center(rSlider.center());
if (Horizontal == sb->orientation())
{
@@ -575,12 +575,12 @@ WebStyle::drawScrollBarControls
p->restore();
}
- QStyle::ScrollControl
+ TQStyle::ScrollControl
WebStyle::scrollBarPointOver
(
- const QScrollBar * sb,
+ const TQScrollBar * sb,
int sliderStart,
- const QPoint & point
+ const TQPoint & point
)
{
if (!sb->rect().contains(point))
@@ -590,7 +590,7 @@ WebStyle::scrollBarPointOver
scrollBarMetrics(sb, sliderMin, sliderMax, sliderLength, buttonDim);
- if (sb->orientation() == QScrollBar::Horizontal)
+ if (sb->orientation() == TQScrollBar::Horizontal)
{
int x = point.x();
@@ -631,7 +631,7 @@ WebStyle::scrollBarPointOver
void
WebStyle::scrollBarMetrics
(
- const QScrollBar * sb,
+ const TQScrollBar * sb,
int & sliderMin,
int & sliderMax,
int & sliderLength,
@@ -640,7 +640,7 @@ WebStyle::scrollBarMetrics
{
int maxlen;
- bool horizontal = sb->orientation() == QScrollBar::Horizontal;
+ bool horizontal = sb->orientation() == TQScrollBar::Horizontal;
int len = (horizontal) ? sb->width() : sb->height();
@@ -674,18 +674,18 @@ WebStyle::scrollBarMetrics
QSize
WebStyle::indicatorSize() const
{
- return QSize(_indicatorSize, _indicatorSize);
+ return TQSize(_indicatorSize, _indicatorSize);
}
void
WebStyle::drawIndicator
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
int state,
bool down,
bool enabled
@@ -706,11 +706,11 @@ WebStyle::drawIndicator
p->drawRect(x, y, w, h);
- if (state != QButton::Off)
+ if (state != TQButton::Off)
{
p->fillRect(x + 2, y + 2, w - 4, h - 4, enabled ? g.highlight() : g.mid());
- if (state == QButton::NoChange)
+ if (state == TQButton::NoChange)
{
p->fillRect(x + 4, y + 4, w - 8, h - 8, g.background());
}
@@ -722,18 +722,18 @@ WebStyle::drawIndicator
QSize
WebStyle::exclusiveIndicatorSize() const
{
- return QSize(_indicatorSize, _indicatorSize);
+ return TQSize(_indicatorSize, _indicatorSize);
}
void
WebStyle::drawExclusiveIndicator
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool on,
bool down,
bool enabled
@@ -752,7 +752,7 @@ WebStyle::drawExclusiveIndicator
p->setPen(g.mid());
}
- p->setBrush(g.brush(QColorGroup::Background));
+ p->setBrush(g.brush(TQColorGroup::Background));
// Avoid misshapen ellipses. Qt or X bug ? Who knows...
@@ -777,7 +777,7 @@ WebStyle::drawExclusiveIndicator
void
WebStyle::drawIndicatorMask
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
@@ -791,7 +791,7 @@ WebStyle::drawIndicatorMask
void
WebStyle::drawExclusiveIndicatorMask
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
@@ -813,22 +813,22 @@ WebStyle::drawExclusiveIndicatorMask
void
WebStyle::drawComboButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken,
bool editable,
bool enabled,
- const QBrush * fill
+ const TQBrush * fill
)
{
p->save();
p->setPen(NoPen);
- p->setBrush(0 == fill ? g.brush(QColorGroup::Background) : *fill);
+ p->setBrush(0 == fill ? g.brush(TQColorGroup::Background) : *fill);
p->drawRect(x, y, w, h);
if (enabled)
@@ -874,13 +874,13 @@ WebStyle::drawComboButton
QRect
WebStyle::comboButtonRect(int x, int y, int w, int h)
{
- return QRect(x + 2, y + 2, w - 20, h - 4);
+ return TQRect(x + 2, y + 2, w - 20, h - 4);
}
QRect
WebStyle::comboButtonFocusRect(int x, int y, int w, int h)
{
- return QRect(x + 2, y + 2, w - 20, h - 4);
+ return TQRect(x + 2, y + 2, w - 20, h - 4);
}
int
@@ -892,19 +892,19 @@ WebStyle::sliderLength() const
void
WebStyle::drawSliderGroove
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
QCOORD /* c */,
Orientation o
)
{
p->save();
- p->setPen(QPen(g.dark(), 0, Qt::DotLine));
+ p->setPen(TQPen(g.dark(), 0, Qt::DotLine));
if( o == Qt::Horizontal )
p->drawLine(x, y + h / 2, w, y + h / 2);
@@ -918,16 +918,16 @@ WebStyle::drawSliderGroove
void
WebStyle::drawArrow
(
- QPainter * p,
+ TQPainter * p,
Qt::ArrowType type,
bool down,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool enabled,
- const QBrush * fill
+ const TQBrush * fill
)
{
KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, fill);
@@ -936,12 +936,12 @@ WebStyle::drawArrow
void
WebStyle::drawSlider
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
Orientation o,
bool /* tickAbove */,
bool /* tickBelow */
@@ -967,14 +967,14 @@ WebStyle::drawSlider
void
WebStyle::drawKToolBar
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
KToolBarPos /* pos */,
- QBrush * /* fill */
+ TQBrush * /* fill */
)
{
p->save();
@@ -987,14 +987,14 @@ WebStyle::drawKToolBar
void
WebStyle::drawKBarHandle
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
KToolBarPos /* pos */,
- QBrush * /* fill */
+ TQBrush * /* fill */
)
{
p->save();
@@ -1007,14 +1007,14 @@ WebStyle::drawKBarHandle
void
WebStyle::drawKMenuBar
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool /* macMode */,
- QBrush * /* fill */
+ TQBrush * /* fill */
)
{
p->save();
@@ -1027,36 +1027,36 @@ WebStyle::drawKMenuBar
void
WebStyle::drawKToolBarButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken,
bool raised,
bool enabled,
bool popup,
KToolButtonType type,
- const QString & btext,
- const QPixmap * pixmap,
- QFont * font,
- QWidget * button
+ const TQString & btext,
+ const TQPixmap * pixmap,
+ TQFont * font,
+ TQWidget * button
)
{
bool toggleAndOn = false;
- if (button->inherits("QButton"))
+ if (button->inherits("TQButton"))
{
- QButton * b = static_cast<QButton *>(button);
+ TQButton * b = static_cast<TQButton *>(button);
toggleAndOn = b->isToggleButton() && b->isOn();
}
p->save();
- QColor borderColour;
- QColor textColour;
- QColor fillColour;
+ TQColor borderColour;
+ TQColor textColour;
+ TQColor fillColour;
if (!enabled)
{
@@ -1249,29 +1249,29 @@ WebStyle::drawKToolBarButton
void
WebStyle::drawKMenuItem
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool active,
- QMenuItem * mi,
- QBrush * /* fill */
+ TQMenuItem * mi,
+ TQBrush * /* fill */
)
{
p->save();
- QColor bg(active ? g.highlight() : g.background());
+ TQColor bg(active ? g.highlight() : g.background());
p->fillRect(x, y, w, h, bg);
- QColor textColour =
+ TQColor textColour =
active ?
contrastingForeground(g.highlightedText(), bg) :
contrastingForeground(g.text(), bg);
- QApplication::style().drawItem
+ TQApplication::style().drawItem
(
p,
x,
@@ -1293,12 +1293,12 @@ WebStyle::drawKMenuItem
void
WebStyle::drawPopupMenuItem
(
- QPainter * p,
+ TQPainter * p,
bool checkable,
int maxpmw,
int tab,
- QMenuItem * mi,
- const QPalette & pal,
+ TQMenuItem * mi,
+ const TQPalette & pal,
bool act,
bool enabled,
int x,
@@ -1314,13 +1314,13 @@ WebStyle::drawPopupMenuItem
void
WebStyle::drawKProgressBlock
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- QBrush * fill
+ const TQColorGroup & g,
+ TQBrush * fill
)
{
p->save();
@@ -1335,10 +1335,10 @@ WebStyle::drawKProgressBlock
void
WebStyle::drawFocusRect
(
- QPainter * p,
- const QRect & r,
- const QColorGroup & g,
- const QColor * pen,
+ TQPainter * p,
+ const TQRect & r,
+ const TQColorGroup & g,
+ const TQColor * pen,
bool atBorder
)
{
@@ -1350,7 +1350,7 @@ WebStyle::drawFocusRect
if (atBorder)
{
- p->drawRect(QRect(r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2));
+ p->drawRect(TQRect(r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2));
}
else
{
@@ -1363,15 +1363,15 @@ WebStyle::drawFocusRect
void
WebStyle::drawPanel
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool /* sunken */,
int /* lineWidth */,
- const QBrush * fill
+ const TQBrush * fill
)
{
p->save();
@@ -1388,14 +1388,14 @@ WebStyle::drawPanel
void
WebStyle::drawPopupPanel
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
int /* lineWidth */,
- const QBrush * fill
+ const TQBrush * fill
)
{
p->save();
@@ -1412,12 +1412,12 @@ WebStyle::drawPopupPanel
void
WebStyle::drawSeparator
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool /* sunken */,
int /* lineWidth */,
int /* midLineWidth */
@@ -1442,25 +1442,25 @@ WebStyle::drawSeparator
void
WebStyle::drawTab
(
- QPainter * p,
- const QTabBar * tabBar,
- QTab * tab,
+ TQPainter * p,
+ const TQTabBar * tabBar,
+ TQTab * tab,
bool selected
)
{
- QRect r(tab->rect());
+ TQRect r(tab->rect());
- QColorGroup g(tabBar->colorGroup());
+ TQColorGroup g(tabBar->colorGroup());
p->save();
p->setPen(selected ? g.dark() : g.mid());
- p->fillRect(r, g.brush(QColorGroup::Background));
+ p->fillRect(r, g.brush(TQColorGroup::Background));
switch (tabBar->shape())
{
- case QTabBar::RoundedAbove:
- case QTabBar::TriangularAbove:
+ case TQTabBar::RoundedAbove:
+ case TQTabBar::TriangularAbove:
p->drawLine(r.left(), r.top(), r.left(), r.bottom());
p->drawLine(r.left(), r.top(), r.right(), r.top());
p->drawLine(r.right(), r.top(), r.right(), r.bottom());
@@ -1470,8 +1470,8 @@ WebStyle::drawTab
p->drawLine(r.left(), r.bottom(), r.right(), r.bottom());
}
break;
- case QTabBar::RoundedBelow:
- case QTabBar::TriangularBelow:
+ case TQTabBar::RoundedBelow:
+ case TQTabBar::TriangularBelow:
if (!selected)
{
p->setPen(g.dark());
@@ -1489,9 +1489,9 @@ WebStyle::drawTab
void
WebStyle::drawTabMask
(
- QPainter * p,
- const QTabBar *,
- QTab * tab,
+ TQPainter * p,
+ const TQTabBar *,
+ TQTab * tab,
bool
)
{
@@ -1501,13 +1501,13 @@ WebStyle::drawTabMask
void
WebStyle::drawKickerHandle
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- QBrush * fill
+ const TQColorGroup & g,
+ TQBrush * fill
)
{
p->save();
@@ -1524,13 +1524,13 @@ WebStyle::drawKickerHandle
void
WebStyle::drawKickerAppletHandle
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- QBrush * fill
+ const TQColorGroup & g,
+ TQBrush * fill
)
{
p->save();
@@ -1547,21 +1547,21 @@ WebStyle::drawKickerAppletHandle
void
WebStyle::drawKickerTaskButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- const QString & text,
+ const TQColorGroup & g,
+ const TQString & text,
bool active,
- QPixmap * icon,
- QBrush * /* fill */
+ TQPixmap * icon,
+ TQBrush * /* fill */
)
{
p->save();
- QColor bg;
+ TQColor bg;
if (active)
{
@@ -1588,7 +1588,7 @@ WebStyle::drawKickerTaskButton
int textPos = pxWidth;
- QRect br(buttonRect(x, y, w, h));
+ TQRect br(buttonRect(x, y, w, h));
if ((0 != icon) && !icon->isNull())
{
@@ -1598,10 +1598,10 @@ WebStyle::drawKickerTaskButton
p->drawPixmap(br.x() + dx, dy, *icon);
}
- QString s(text);
+ TQString s(text);
- static QString modStr =
- QString::fromUtf8("[") + i18n("modified") + QString::fromUtf8("]");
+ static TQString modStr =
+ TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
int modStrPos = s.find(modStr);
@@ -1610,7 +1610,7 @@ WebStyle::drawKickerTaskButton
// +1 because we include a space after the closing brace.
s.remove(modStrPos, modStr.length() + 1);
- QPixmap modPixmap = SmallIcon("modified");
+ TQPixmap modPixmap = SmallIcon("modified");
int dx = (pxWidth - modPixmap.width()) / 2;
int dy = (h - modPixmap.height()) / 2;
@@ -1659,7 +1659,7 @@ WebStyle::drawKickerTaskButton
}
int
-WebStyle::popupMenuItemHeight(bool, QMenuItem * i, const QFontMetrics & fm)
+WebStyle::popupMenuItemHeight(bool, TQMenuItem * i, const TQFontMetrics & fm)
{
if (i->isSeparator())
return 1;
@@ -1675,7 +1675,7 @@ WebStyle::popupMenuItemHeight(bool, QMenuItem * i, const QFontMetrics & fm)
{
h = QMAX
(
- i->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height(),
+ i->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height(),
h
);
}
diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h
index b0a6a7a87..d2219076d 100644
--- a/kstyles/web/webstyle.h
+++ b/kstyles/web/webstyle.h
@@ -21,7 +21,7 @@
#define WEB_STYLE_H
#include <kstyle.h>
-#include <qpalette.h>
+#include <tqpalette.h>
class QPainter;
class QScrollBar;
@@ -36,96 +36,96 @@ class WebStyle : public KStyle
~WebStyle();
- void polish(QApplication *);
+ void polish(TQApplication *);
- void unPolish(QWidget *);
+ void unPolish(TQWidget *);
- void polish(QWidget *);
+ void polish(TQWidget *);
- void polish(QPalette &);
+ void polish(TQPalette &);
- void unPolish(QApplication *);
+ void unPolish(TQApplication *);
void drawButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken = false,
- const QBrush * fill = 0
+ const TQBrush * fill = 0
);
- QRect buttonRect(int x, int y, int w, int h);
+ TQRect buttonRect(int x, int y, int w, int h);
void drawBevelButton
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool sunken = false,
- const QBrush * fill = 0
+ const TQBrush * fill = 0
);
- void drawPushButton(QPushButton *, QPainter *);
+ void drawPushButton(TQPushButton *, TQPainter *);
- virtual void drawPushButtonLabel(QPushButton *, QPainter *);
+ virtual void drawPushButtonLabel(TQPushButton *, TQPainter *);
void drawScrollBarControls
(
- QPainter *,
- const QScrollBar *,
+ TQPainter *,
+ const TQScrollBar *,
int sliderStart,
uint controls,
uint activeControl
);
- QStyle::ScrollControl scrollBarPointOver
+ TQStyle::ScrollControl scrollBarPointOver
(
- const QScrollBar *,
+ const TQScrollBar *,
int sliderStart,
- const QPoint &
+ const TQPoint &
);
void scrollBarMetrics
(
- const QScrollBar *,
+ const TQScrollBar *,
int & sliderMin,
int & sliderMax,
int & sliderLength,
int & buttonDim
);
- QSize indicatorSize() const;
+ TQSize indicatorSize() const;
void drawIndicator
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
int state,
bool down = false,
bool enabled = true
);
- QSize exclusiveIndicatorSize() const;
+ TQSize exclusiveIndicatorSize() const;
void drawExclusiveIndicator
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool on,
bool down = false,
bool enabled = true
@@ -133,7 +133,7 @@ class WebStyle : public KStyle
void drawIndicatorMask
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
@@ -143,7 +143,7 @@ class WebStyle : public KStyle
void drawExclusiveIndicatorMask
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
@@ -153,58 +153,58 @@ class WebStyle : public KStyle
void drawComboButton
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool sunken = false,
bool editable = false,
bool enabled = true,
- const QBrush * fill = 0
+ const TQBrush * fill = 0
);
- QRect comboButtonRect(int x, int y, int w, int h);
+ TQRect comboButtonRect(int x, int y, int w, int h);
- QRect comboButtonFocusRect(int x, int y, int w, int h);
+ TQRect comboButtonFocusRect(int x, int y, int w, int h);
int sliderLength() const;
void drawSliderGroove
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
QCOORD,
Orientation
);
void drawArrow
(
- QPainter *,
+ TQPainter *,
Qt::ArrowType,
bool down,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool enabled = true,
- const QBrush * fill = 0
+ const TQBrush * fill = 0
);
void drawSlider
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
Orientation,
bool tickAbove,
bool tickBelow
@@ -212,80 +212,80 @@ class WebStyle : public KStyle
void drawKToolBar
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
KToolBarPos,
- QBrush * fill = 0
+ TQBrush * fill = 0
);
void drawKBarHandle
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
KToolBarPos,
- QBrush * fill = 0
+ TQBrush * fill = 0
);
void drawKMenuBar
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool macMode,
- QBrush * fill = 0
+ TQBrush * fill = 0
);
void drawKToolBarButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
+ const TQColorGroup & g,
bool sunken = false,
bool raised = true,
bool enabled = true,
bool popup = false,
KToolButtonType = Icon,
- const QString & btext = QString::null,
- const QPixmap * = 0,
- QFont * = 0,
- QWidget * button = 0
+ const TQString & btext = TQString::null,
+ const TQPixmap * = 0,
+ TQFont * = 0,
+ TQWidget * button = 0
);
void drawKMenuItem
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool active,
- QMenuItem *,
- QBrush * fill = 0
+ TQMenuItem *,
+ TQBrush * fill = 0
);
void drawPopupMenuItem
(
- QPainter *,
+ TQPainter *,
bool checkable,
int maxpmw,
int tab,
- QMenuItem *,
- const QPalette &,
+ TQMenuItem *,
+ const TQPalette &,
bool act,
bool enabled,
int x,
@@ -296,57 +296,57 @@ class WebStyle : public KStyle
void drawKProgressBlock
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
- QBrush * fill
+ const TQColorGroup &,
+ TQBrush * fill
);
void drawFocusRect
(
- QPainter *,
- const QRect &,
- const QColorGroup &,
- const QColor * pen,
+ TQPainter *,
+ const TQRect &,
+ const TQColorGroup &,
+ const TQColor * pen,
bool atBorder
);
void drawPanel
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool sunken,
int lineWidth = 1,
- const QBrush * = 0
+ const TQBrush * = 0
);
void drawPopupPanel
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
int lineWidth = 2,
- const QBrush * = 0
+ const TQBrush * = 0
);
void drawSeparator
(
- QPainter *,
+ TQPainter *,
int x,
int y,
int w,
int h,
- const QColorGroup &,
+ const TQColorGroup &,
bool sunken = true,
int lineWidth = 1,
int midLineWidth = 0
@@ -354,61 +354,61 @@ class WebStyle : public KStyle
void drawTab
(
- QPainter * p,
- const QTabBar * tabBar,
- QTab * tab,
+ TQPainter * p,
+ const TQTabBar * tabBar,
+ TQTab * tab,
bool selected
);
void drawTabMask
(
- QPainter * p,
- const QTabBar *,
- QTab * tab,
+ TQPainter * p,
+ const TQTabBar *,
+ TQTab * tab,
bool
);
void drawKickerHandle
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- QBrush *
+ const TQColorGroup & g,
+ TQBrush *
);
void drawKickerAppletHandle
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- QBrush *
+ const TQColorGroup & g,
+ TQBrush *
);
void drawKickerTaskButton
(
- QPainter * p,
+ TQPainter * p,
int x,
int y,
int w,
int h,
- const QColorGroup & g,
- const QString & title,
+ const TQColorGroup & g,
+ const TQString & title,
bool active,
- QPixmap * icon,
- QBrush *
+ TQPixmap * icon,
+ TQBrush *
);
- int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &);
+ int popupMenuItemHeight(bool, TQMenuItem *, const TQFontMetrics &);
GUIStyle guiStyle() const { return Qt::MotifStyle; }
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
};
#endif
diff --git a/kunittest/module.h b/kunittest/module.h
index e33887101..7f4b24789 100644
--- a/kunittest/module.h
+++ b/kunittest/module.h
@@ -31,7 +31,7 @@
#ifndef KUNITTEST_MODULE_H
#define KUNITTEST_MODULE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klibloader.h>
#include <kunittest/runner.h>
@@ -48,8 +48,8 @@ namespace KUnitTest
* @code KUNITTEST_MODULE(kunittest_samplemodule,"TestSuite") @endcode
*/
#define KUNITTEST_MODULE(library,suite) \
- static const QString s_kunittest_suite = QString::fromLatin1(suite); \
- class library##Module : public QObject \
+ static const TQString s_kunittest_suite = TQString::fromLatin1(suite); \
+ class library##Module : public TQObject \
{ \
public: \
library##Module() \
@@ -72,7 +72,7 @@ namespace KUnitTest
class module##Factory : public KLibFactory \
{ \
public: \
- QObject *createObject (QObject *, const char *, const char *, const QStringList &) \
+ TQObject *createObject (TQObject *, const char *, const char *, const TQStringList &) \
{ \
return new library##Module(); \
}; \
@@ -93,7 +93,7 @@ namespace KUnitTest
tester##ModuleAutoregister() \
{ \
KUnitTest::Tester *test = new tester(); \
- QString name = s_kunittest_suite + QString::fromLatin1("::") + QString::fromLocal8Bit(#tester); \
+ TQString name = s_kunittest_suite + TQString::fromLatin1("::") + TQString::fromLocal8Bit(#tester); \
test->setName(name.local8Bit()); \
kunittest_registerModuleTester(name.local8Bit(), test ); \
} \
@@ -110,7 +110,7 @@ namespace KUnitTest
public: \
tester##ModuleAutoregister() \
{ \
- QString fullName = s_kunittest_suite + QString("::") + QString::fromLocal8Bit(name); \
+ TQString fullName = s_kunittest_suite + TQString("::") + TQString::fromLocal8Bit(name); \
KUnitTest::Tester *test = new tester(fullName.local8Bit()); \
kunittest_registerModuleTester(fullName.local8Bit(), test); \
} \
diff --git a/kunittest/runner.cpp b/kunittest/runner.cpp
index 776e01cda..580d451b8 100644
--- a/kunittest/runner.cpp
+++ b/kunittest/runner.cpp
@@ -29,9 +29,9 @@
#include <iostream>
using namespace std;
-#include <qregexp.h>
-#include <qdir.h>
-#include <qmetaobject.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klibloader.h>
@@ -51,10 +51,10 @@ namespace KUnitTest
Runner::self()->m_registry.insert(name, test);
}
- void Runner::loadModules(const QString &folder, const QString &query)
+ void Runner::loadModules(const TQString &folder, const TQString &query)
{
- QRegExp reQuery(query);
- QDir dir(folder, "kunittest_*.la");
+ TQRegExp reQuery(query);
+ TQDir dir(folder, "kunittest_*.la");
// Add the folder to the "module" resource such that the KLibLoader can
// find the modules in this folder.
@@ -62,11 +62,11 @@ namespace KUnitTest
kdDebug() << "Looking in folder: " << dir.absPath() << endl;
// Get a list of all modules.
- QStringList modules = dir.entryList();
+ TQStringList modules = dir.entryList();
for ( uint i = 0; i < modules.count(); ++i )
{
- QString module = modules[i];
+ TQString module = modules[i];
kdDebug() << "Module: " << dir.absPath() + "/" + module << endl;
if ( reQuery.search(module) != -1 )
@@ -174,30 +174,30 @@ namespace KUnitTest
cout << " Total skipped test steps : " << globalSkipped << endl;
#else
unsigned int numTests = m_registry.count(); // should this be globalSteps instead?
- QString str;
+ TQString str;
if ( globalFails == 0 )
if ( globalXFails == 0 )
- str = QString( "All %1 tests passed" ).arg( numTests );
+ str = TQString( "All %1 tests passed" ).arg( numTests );
else
- str = QString( "All %1 tests behaved as expected (%2 expected failures)" ).arg( numTests ).arg( globalXFails );
+ str = TQString( "All %1 tests behaved as expected (%2 expected failures)" ).arg( numTests ).arg( globalXFails );
else
if ( globalXPasses == 0 )
- str = QString( "%1 of %2 tests failed" ).arg( globalFails ).arg( numTests );
+ str = TQString( "%1 of %2 tests failed" ).arg( globalFails ).arg( numTests );
else
- str = QString( "%1 of %2 tests did not behave as expected (%1 unexpected passes)" ).arg( globalFails ).arg( numTests ).arg( globalXPasses );
+ str = TQString( "%1 of %2 tests did not behave as expected (%1 unexpected passes)" ).arg( globalFails ).arg( numTests ).arg( globalXPasses );
if ( globalSkipped )
- str += QString( " (%1 tests skipped)" ).arg( globalSkipped );
+ str += TQString( " (%1 tests skipped)" ).arg( globalSkipped );
cout << str.local8Bit() << endl;
#endif
return m_registry.count();
}
- void Runner::runMatchingTests(const QString &prefix)
+ void Runner::runMatchingTests(const TQString &prefix)
{
RegistryIteratorType it(m_registry);
for( ; it.current(); ++it )
- if ( QString(it.currentKey()).startsWith(prefix) )
+ if ( TQString(it.currentKey()).startsWith(prefix) )
runTest(it.currentKey());
}
@@ -224,10 +224,10 @@ namespace KUnitTest
int numXFail = 0;
int numXPass = 0;
int numSkip = 0;
- QStringList xpassList;
- QStringList errorList;
- QStringList xfailList;
- QStringList skipList;
+ TQStringList xpassList;
+ TQStringList errorList;
+ TQStringList xfailList;
+ TQStringList skipList;
if ( test->inherits("KUnitTest::SlotTester") )
{
@@ -286,29 +286,29 @@ namespace KUnitTest
if ( 0 < numXPass ) {
cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl;
- QStringList list = xpassList;
- for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ TQStringList list = xpassList;
+ for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
cout << "\t" << (*itr).latin1() << endl;
}
}
if ( 0 < (numFail - numXFail) ) {
cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl;
- QStringList list = errorList;
- for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ TQStringList list = errorList;
+ for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
cout << "\t" << (*itr).latin1() << endl;
}
}
if ( 0 < numXFail ) {
cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl;
- QStringList list = xfailList;
- for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ TQStringList list = xfailList;
+ for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
cout << "\t" << (*itr).latin1() << endl;
}
}
if ( 0 < numSkip ) {
cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl;
- QStringList list = skipList;
- for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ TQStringList list = skipList;
+ for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
cout << "\t" << (*itr).latin1() << endl;
}
}
diff --git a/kunittest/runner.h b/kunittest/runner.h
index be1b056c8..49bbb0a4a 100644
--- a/kunittest/runner.h
+++ b/kunittest/runner.h
@@ -36,9 +36,9 @@
#include <iostream>
using namespace std;
-#include <qobject.h>
-#include <qasciidict.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ namespace KUnitTest
* defines the name of the test suite.
*/
#define KUNITTEST_SUITE(suite)\
- static const QString s_kunittest_suite = suite;
+ static const TQString s_kunittest_suite = suite;
/*! @def KUNITTEST_REGISTER_TESTER( tester )
* @brief Automatic registration of Tester classes.
@@ -66,16 +66,16 @@ namespace KUnitTest
* You can always use the static Runner::registerTester(const char *name, Tester *test) method.
*/
#define KUNITTEST_REGISTER_TESTER( tester )\
- static TesterAutoregister tester##Autoregister( QString(s_kunittest_suite + QString("::") + QString::fromLocal8Bit(#tester)).local8Bit() , new tester ())
+ static TesterAutoregister tester##Autoregister( TQString(s_kunittest_suite + TQString("::") + TQString::fromLocal8Bit(#tester)).local8Bit() , new tester ())
#define KUNITTEST_REGISTER_NAMEDTESTER( name, tester )\
- static TesterAutoregister tester##Autoregister( QString(s_kunittest_suite + QString("::") + QString::fromLocal8Bit(name)).local8Bit() , new tester ())
+ static TesterAutoregister tester##Autoregister( TQString(s_kunittest_suite + TQString("::") + TQString::fromLocal8Bit(name)).local8Bit() , new tester ())
/*! The type of the registry. */
- typedef QAsciiDict<Tester> RegistryType;
+ typedef TQAsciiDict<Tester> RegistryType;
/*! A type that can be used to iterate through the registry. */
- typedef QAsciiDictIterator<Tester> RegistryIteratorType;
+ typedef TQAsciiDictIterator<Tester> RegistryIteratorType;
/*! The Runner class holds a list of registered Tester classes and is able
* to run those test cases. The Runner class follows the singleton design
@@ -121,7 +121,7 @@ namespace KUnitTest
* @param folder The folder where to look for modules.
* @param query A regular expression. Only modules which match the query will be run.
*/
- static void loadModules(const QString &folder, const QString &query);
+ static void loadModules(const TQString &folder, const TQString &query);
/*! The runner can spit out special debug messages needed by the Perl script: kunittest_debughelper.
* This script can attach the debug output of each suite to the results in the KUnitTest GUI.
@@ -171,7 +171,7 @@ namespace KUnitTest
/*! Call this slot to run tests with names starting with prefix.
* @param prefix Only run tests starting with the string prefix.
*/
- void runMatchingTests(const QString &prefix);
+ void runMatchingTests(const TQString &prefix);
/*! Reset the Runner in order to prepare it to run one or more tests again.
*/
diff --git a/kunittest/tester.cpp b/kunittest/tester.cpp
index 93509716d..3faf3997e 100644
--- a/kunittest/tester.cpp
+++ b/kunittest/tester.cpp
@@ -26,7 +26,7 @@
#include <iostream>
using namespace std;
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include "tester.h"
@@ -38,23 +38,23 @@ namespace KUnitTest
m_total = m_results;
}
- void SlotTester::invokeMember(const QString &str)
+ void SlotTester::invokeMember(const TQString &str)
{
- QString slotname = QString::number(QSLOT_CODE) + str;
- connect(this, SIGNAL(invoke()), this, slotname.ascii());
+ TQString slotname = TQString::number(QSLOT_CODE) + str;
+ connect(this, TQT_SIGNAL(invoke()), this, slotname.ascii());
emit invoke();
- disconnect(this, SIGNAL(invoke()), this, slotname.ascii());
+ disconnect(this, TQT_SIGNAL(invoke()), this, slotname.ascii());
}
void SlotTester::allTests()
{
- QStrList allSlots = metaObject()->slotNames();
+ TQStrList allSlots = metaObject()->slotNames();
if ( allSlots.contains("setUp()") > 0 ) invokeMember("setUp()");
for ( char *sl = allSlots.first(); sl; sl = allSlots.next() )
{
- QString str = sl;
+ TQString str = sl;
if ( str.startsWith("test") )
{
@@ -80,17 +80,17 @@ namespace KUnitTest
}
}
-QTextStream& operator<<( QTextStream& str, const QRect& r ) {
+TQTextStream& operator<<( TQTextStream& str, const TQRect& r ) {
str << "[" << r.x() << "," << r.y() << " - " << r.width() << "x" << r.height() << "]";
return str;
}
-QTextStream& operator<<( QTextStream& str, const QPoint& r ) {
+TQTextStream& operator<<( TQTextStream& str, const TQPoint& r ) {
str << "(" << r.x() << "," << r.y() << ")";
return str;
}
-QTextStream& operator<<( QTextStream& str, const QSize& r ) {
+TQTextStream& operator<<( TQTextStream& str, const TQSize& r ) {
str << "[" << r.width() << "x" << r.height() << "]";
return str;
}
diff --git a/kunittest/tester.h b/kunittest/tester.h
index f54b85982..ff3a3d453 100644
--- a/kunittest/tester.h
+++ b/kunittest/tester.h
@@ -96,7 +96,7 @@
* void SampleTest::allTests()
* {
* CHECK( 3+3, 6 );
- * CHECK( QString( "hello%1" ).arg( " world not" ), QString( "hello world" ) );
+ * CHECK( TQString( "hello%1" ).arg( " world not" ), TQString( "hello world" ) );
* }
* @endcode
*
@@ -119,7 +119,7 @@
* @verbatim
SampleTest - 1 test passed, 1 test failed
Unexpected failure:
- sampletest.cpp[38]: failed on "QString( "hello%1" ).arg( " world not" )"
+ sampletest.cpp[38]: failed on "TQString( "hello%1" ).arg( " world not" )"
result = 'hello world not', expected = 'hello world'
@endverbatim
*
@@ -325,9 +325,9 @@ SampleTest - 1 test passed, 1 test failed
#include <iostream>
using namespace std;
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqasciidict.h>
#include <kdelibs_export.h>
@@ -359,7 +359,7 @@ using namespace std;
*
* @code SKIP("Test skipped because of lack of foo support."); @endcode
*/
-#define SKIP( x ) skip( __FILE__, __LINE__, QString::fromLatin1(#x))
+#define SKIP( x ) skip( __FILE__, __LINE__, TQString::fromLatin1(#x))
/*!
* A macro testing that @p expression throws an exception that is catched
@@ -379,11 +379,11 @@ using namespace std;
} \
if(exceptionRaised()) \
{ \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #expression); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #expression); \
} \
else \
{ \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw " \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw " \
"an exception on: ") + #expression); \
} \
setExceptionRaised(false);
@@ -403,11 +403,11 @@ using namespace std;
} \
if(exceptionRaised()) \
{ \
- unexpectedSuccess(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: unexpectedly threw an exception and passed: " + #expression); \
+ unexpectedSuccess(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: unexpectedly threw an exception and passed: " + #expression); \
}\
else \
{ \
- expectedFailure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw an exception on: ") + #expression); \
+ expectedFailure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw an exception on: ") + #expression); \
} \
setExceptionRaised(false);
@@ -417,8 +417,8 @@ using namespace std;
* as being skipped.
*/
#define SKIP_EXCEPTION(exceptionCatch, expression) \
- skip( __FILE__, __LINE__, QString("Exception catch: ")\
- .arg(QString(#exceptionCatch)).arg(QString(" Test expression: ")).arg(QString(#expression)))
+ skip( __FILE__, __LINE__, TQString("Exception catch: ")\
+ .arg(TQString(#exceptionCatch)).arg(TQString(" Test expression: ")).arg(TQString(#expression)))
/**
* Namespace for Unit testing classes
@@ -454,14 +454,14 @@ namespace KUnitTest
/*! Add some debug info that can be view later. Normally you do not need to call this.
* @param debug The debug info.
*/
- virtual void addDebugInfo(const QString &debug)
+ virtual void addDebugInfo(const TQString &debug)
{
m_debug += debug;
}
/*! @returns The debug info that was added to this Tester object.
*/
- QString debugInfo() const { return m_debug; }
+ TQString debugInfo() const { return m_debug; }
/*! @returns The number of finished tests. */
int testsFinished() const { return m_tests; }
@@ -482,34 +482,34 @@ namespace KUnitTest
int passed() const { return m_successList.count(); }
/*! @returns Details about the failed tests. */
- QStringList errorList() const { return m_errorList; }
+ TQStringList errorList() const { return m_errorList; }
/*! @returns Details about tests that failed expectedly. */
- QStringList xfailList() const { return m_xfailList; }
+ TQStringList xfailList() const { return m_xfailList; }
/*! @returns Details about tests that succeeded unexpectedly. */
- QStringList xpassList() const { return m_xpassList; }
+ TQStringList xpassList() const { return m_xpassList; }
/*! @returns Details about which tests were skipped. */
- QStringList skipList() const { return m_skipList; }
+ TQStringList skipList() const { return m_skipList; }
/*! @returns Details about the succeeded tests. */
- QStringList successList() const { return m_successList; }
+ TQStringList successList() const { return m_successList; }
private:
- QStringList m_errorList;
- QStringList m_xfailList;
- QStringList m_xpassList;
- QStringList m_skipList;
- QStringList m_successList;
- QString m_debug;
+ TQStringList m_errorList;
+ TQStringList m_xfailList;
+ TQStringList m_xpassList;
+ TQStringList m_skipList;
+ TQStringList m_successList;
+ TQString m_debug;
int m_tests;
};
- typedef QAsciiDict<TestResults> TestResultsListType;
+ typedef TQAsciiDict<TestResults> TestResultsListType;
/*! A type that can be used to iterate through the registry. */
- typedef QAsciiDictIterator<TestResults> TestResultsListIteratorType;
+ typedef TQAsciiDictIterator<TestResults> TestResultsListIteratorType;
/*! The abstract Tester class forms the base class for all test cases. Users must
* implement the void Tester::allTests() method. This method contains the actual test.
@@ -523,7 +523,7 @@ namespace KUnitTest
{
public:
Tester(const char *name = 0L)
- : QObject(0L, name), m_results(new TestResults()), m_exceptionState(false)
+ : TQObject(0L, name), m_results(new TestResults()), m_exceptionState(false)
{}
virtual ~Tester() { delete m_results; }
@@ -544,10 +544,10 @@ namespace KUnitTest
* @param line The linenumber in the file @p file. Use the __LINE__ macro for this.
* @param msg The message that identifies the skipped test.
*/
- void skip( const char *file, int line, QString msg )
+ void skip( const char *file, int line, TQString msg )
{
- QString skipEntry;
- QTextStream ts( &skipEntry, IO_WriteOnly );
+ TQString skipEntry;
+ TQTextStream ts( &skipEntry, IO_WriteOnly );
ts << file << "["<< line <<"]: " << msg;
skipTest( skipEntry );
}
@@ -569,8 +569,8 @@ namespace KUnitTest
if ( result != expectedResult )
{
- QString error;
- QTextStream ts( &error, IO_WriteOnly );
+ TQString error;
+ TQTextStream ts( &error, IO_WriteOnly );
ts << file << "["<< line <<"]: failed on \"" << str
<<"\" result = '" << result << "' expected = '" << expectedResult << "'";
@@ -586,8 +586,8 @@ namespace KUnitTest
// we were expecting a failure
if (expectedFail)
{
- QString err;
- QTextStream ts( &err, IO_WriteOnly );
+ TQString err;
+ TQTextStream ts( &err, IO_WriteOnly );
ts << file << "["<< line <<"]: "
<<" unexpectedly passed on \""
<< str <<"\"";
@@ -595,8 +595,8 @@ namespace KUnitTest
}
else
{
- QString succ;
- QTextStream ts( &succ, IO_WriteOnly );
+ TQString succ;
+ TQTextStream ts( &succ, IO_WriteOnly );
ts << file << "["<< line <<"]: "
<<" passed \""
<< str <<"\"";
@@ -614,7 +614,7 @@ namespace KUnitTest
* @param message the message describing what failed. Should be informative,
* such as mentioning the expression that failed and where, the file and file number.
*/
- void success(const QString &message) { m_results->m_successList.append(message); }
+ void success(const TQString &message) { m_results->m_successList.append(message); }
/*!
* This function can be used to flag failing tests, when
@@ -623,7 +623,7 @@ namespace KUnitTest
* @param message the message describing what failed. Should be informative,
* such as mentioning the expression that failed and where, the file name and file number.
*/
- void failure(const QString &message) { m_results->m_errorList.append(message); }
+ void failure(const TQString &message) { m_results->m_errorList.append(message); }
/*!
* This function can be used to flag expected failures, when
@@ -632,7 +632,7 @@ namespace KUnitTest
* @param message the message describing what failed. Should be informative,
* such as mentioning the expression that failed and where, the file name and file number.
*/
- void expectedFailure(const QString &message) { m_results->m_xfailList.append(message); }
+ void expectedFailure(const TQString &message) { m_results->m_xfailList.append(message); }
/*!
* This function can be used to flag unexpected successes, when
@@ -641,7 +641,7 @@ namespace KUnitTest
* @param message the message describing what failed. Should be informative,
* such as mentioning the expression that failed and where, the file name and file number.
*/
- void unexpectedSuccess(const QString &message) { m_results->m_xpassList.append(message); }
+ void unexpectedSuccess(const TQString &message) { m_results->m_xpassList.append(message); }
/*!
* This function can be used to flag a test as skipped, when
@@ -650,7 +650,7 @@ namespace KUnitTest
* @param message the message describing what failed. Should be informative,
* such as mentioning the expression that failed and where, the file name and file number.
*/
- void skipTest(const QString &message) { m_results->m_skipList.append(message); }
+ void skipTest(const TQString &message) { m_results->m_skipList.append(message); }
/*!
* exceptionRaised and exceptionState are book-keeping functions for testing for
@@ -700,17 +700,17 @@ namespace KUnitTest
void invoke();
private:
- void invokeMember(const QString &str);
+ void invokeMember(const TQString &str);
TestResultsListType m_resultsList;
TestResults *m_total;
};
}
-KUNITTEST_EXPORT QTextStream& operator<<( QTextStream& str, const QRect& r );
+KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQRect& r );
-KUNITTEST_EXPORT QTextStream& operator<<( QTextStream& str, const QPoint& r );
+KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQPoint& r );
-KUNITTEST_EXPORT QTextStream& operator<<( QTextStream& str, const QSize& r );
+KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQSize& r );
#endif
diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp
index 000189e0d..e75ecc3cf 100644
--- a/kutils/kcmodulecontainer.cpp
+++ b/kutils/kcmodulecontainer.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qvaluelist.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqvaluelist.h>
#include <kcmodule.h>
#include <kcmoduleinfo.h>
@@ -43,7 +43,7 @@
class KCModuleContainer::KCModuleContainerPrivate
{
public:
- KCModuleContainerPrivate( const QStringList& mods )
+ KCModuleContainerPrivate( const TQStringList& mods )
: modules( mods )
, tabWidget( 0 )
, buttons( 0 )
@@ -53,13 +53,13 @@ class KCModuleContainer::KCModuleContainerPrivate
, topLayout( 0 )
{}
- QStringList modules;
- QTabWidget *tabWidget;
+ TQStringList modules;
+ TQTabWidget *tabWidget;
int buttons;
bool hasRootKCM: 1;
KPushButton *btnRootMode;
- QHBoxLayout *btnLayout;
- QVBoxLayout *topLayout;
+ TQHBoxLayout *btnLayout;
+ TQVBoxLayout *topLayout;
};
@@ -70,16 +70,16 @@ class KCModuleContainer::KCModuleContainerPrivate
/***********************************************************************/
-KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
- const QString& mods )
+KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name,
+ const TQString& mods )
: KCModule( parent, name )
{
- d = new KCModuleContainerPrivate( QStringList::split( ",", QString(mods).remove( " " )) );
+ d = new KCModuleContainerPrivate( TQStringList::split( ",", TQString(mods).remove( " " )) );
init();
}
-KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
- const QStringList& mods )
+KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name,
+ const TQStringList& mods )
: KCModule( parent, name ), d( new KCModuleContainerPrivate( mods ) )
{
init();
@@ -87,16 +87,16 @@ KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
void KCModuleContainer::init()
{
- d->topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint(), "topLayout" );
- d->tabWidget = new QTabWidget(this, "tabWidget");
+ d->topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "topLayout" );
+ d->tabWidget = new TQTabWidget(this, "tabWidget");
d->tabWidget->setMargin(KDialog::marginHint());
- connect( d->tabWidget, SIGNAL( currentChanged( QWidget* ) ), SLOT( tabSwitched( QWidget* ) ));
+ connect( d->tabWidget, TQT_SIGNAL( currentChanged( TQWidget* ) ), TQT_SLOT( tabSwitched( TQWidget* ) ));
d->topLayout->addWidget( d->tabWidget );
if ( !d->modules.isEmpty() )
{
/* Add our modules */
- for ( QStringList::Iterator it = d->modules.begin(); it != d->modules.end(); ++it )
+ for ( TQStringList::Iterator it = d->modules.begin(); it != d->modules.end(); ++it )
addModule( (*it) );
finalize();
@@ -111,7 +111,7 @@ void KCModuleContainer::finalize()
{
if(!d->btnLayout) /* It could already be added */
{
- d->btnLayout = new QHBoxLayout(this, 0, 0, "btnLayout");
+ d->btnLayout = new TQHBoxLayout(this, 0, 0, "btnLayout");
d->btnRootMode = new KPushButton(KStdGuiItem::adminMode(), this, "btnRootMode");
d->btnLayout->addWidget( d->btnRootMode );
@@ -121,7 +121,7 @@ void KCModuleContainer::finalize()
}
}
-void KCModuleContainer::addModule( const QString& module )
+void KCModuleContainer::addModule( const TQString& module )
{
/* In case it doesn't exist we just silently drop it.
* This allows people to easily extend containers.
@@ -140,14 +140,14 @@ void KCModuleContainer::addModule( const QString& module )
KCModuleProxy* proxy = new KCModuleProxy( module, false, d->tabWidget, module.latin1());
allModules.append( proxy );
- d->tabWidget->addTab( proxy, QIconSet(KGlobal::iconLoader()->loadIcon(
+ d->tabWidget->addTab( proxy, TQIconSet(KGlobal::iconLoader()->loadIcon(
proxy->moduleInfo().icon(), KIcon::Desktop)),
/* QT eats ampersands for dinner. But not this time. */
proxy->moduleInfo().moduleName().replace( "&", "&&" ));
d->tabWidget->setTabToolTip( proxy, proxy->moduleInfo().comment() );
- connect( proxy, SIGNAL(changed(KCModuleProxy *)), SLOT(moduleChanged(KCModuleProxy *)));
+ connect( proxy, TQT_SIGNAL(changed(KCModuleProxy *)), TQT_SLOT(moduleChanged(KCModuleProxy *)));
/* Collect our buttons - we go for the common deliminator */
d->buttons = d->buttons | proxy->realModule()->buttons();
@@ -159,7 +159,7 @@ void KCModuleContainer::addModule( const QString& module )
}
-void KCModuleContainer::tabSwitched( QWidget * module )
+void KCModuleContainer::tabSwitched( TQWidget * module )
{
if ( !d->hasRootKCM )
return;
@@ -173,10 +173,10 @@ void KCModuleContainer::tabSwitched( QWidget * module )
if ( mod->moduleInfo().needsRootPrivileges() && !mod->rootMode() )
{
d->btnRootMode->setEnabled( true );
- connect( d->btnRootMode, SIGNAL( clicked() ),
- SLOT( runAsRoot() ));
- connect( mod, SIGNAL( childClosed() ),
- SLOT ( rootExited() ));
+ connect( d->btnRootMode, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( runAsRoot() ));
+ connect( mod, TQT_SIGNAL( childClosed() ),
+ TQT_SLOT ( rootExited() ));
}
else
d->btnRootMode->setEnabled( false );
@@ -195,7 +195,7 @@ void KCModuleContainer::runAsRoot()
void KCModuleContainer::rootExited()
{
- connect( d->btnRootMode, SIGNAL( clicked() ), SLOT( runAsRoot() ));
+ connect( d->btnRootMode, TQT_SIGNAL( clicked() ), TQT_SLOT( runAsRoot() ));
d->btnRootMode->setEnabled( true );
}
diff --git a/kutils/kcmodulecontainer.h b/kutils/kcmodulecontainer.h
index 6b23a16c9..38318da92 100644
--- a/kutils/kcmodulecontainer.h
+++ b/kutils/kcmodulecontainer.h
@@ -20,9 +20,9 @@
#ifndef KCMODULECONTAINER_H
#define KCMODULECONTAINER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kcmodule.h>
#include <kcmoduleloader.h>
@@ -58,20 +58,20 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* Creates a KCModuleContainer with tabs, each one containing one of the
* specified modules in @p mods.
*
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param mods The list of KCModules to be loaded. The name of each
* KCModule is its service name, that is the name of the desktop file without
* the ".desktop" part
*
*/
- KCModuleContainer( QWidget* parent, const char* name, const QStringList& mods );
+ KCModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods );
/**
- * This is a convenience function, instead of building a QStringList you
- * can specify the modules in a comma separated QString. For example;
+ * This is a convenience function, instead of building a TQStringList you
+ * can specify the modules in a comma separated TQString. For example;
* \code
- * KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", QString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") );
+ * KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", TQString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") );
* \endcode
* The other constructor takes its modules in a QStringlist which also can be constructed from a
* string and thus you will have to be explicit on the data type.
@@ -84,7 +84,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* @param mods The modules to load
* @return The KCModule containing the requested modules.
*/
- KCModuleContainer( QWidget *parent, const char* name, const QString& mods = QString() );
+ KCModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() );
/**
* Adds the specified module to the tab widget. Setting the tab icon, text,
@@ -93,7 +93,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* @param module the name of the module to add. The name is the desktop file's name
* without the ".desktop" part.
*/
- void addModule( const QString& module );
+ void addModule( const TQString& module );
/**
* Default destructor.
@@ -128,7 +128,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
*/
void finalize();
- typedef QValueList<KCModuleProxy*> ModuleList;
+ typedef TQValueList<KCModuleProxy*> ModuleList;
/**
* A list containing KCModuleProxy objects which
@@ -146,7 +146,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
/**
* Enables/disables the Admin Mode button, as appropriate.
*/
- void tabSwitched( QWidget * module );
+ void tabSwitched( TQWidget * module );
void moduleChanged(KCModuleProxy *proxy);
@@ -188,15 +188,15 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
#define KCMODULECONTAINER( modules, factoryName ) \
extern "C" \
{ \
- KCModule *create_## factoryName(QWidget *parent, const char *name) \
+ KCModule *create_## factoryName(TQWidget *parent, const char *name) \
{ \
- return new KCModuleContainer( parent, name, QString( modules ) ); \
+ return new KCModuleContainer( parent, name, TQString( modules ) ); \
} \
\
bool test_## factoryName() \
{ \
- QStringList modList = QStringList::split( ",", QString(modules).remove( " " )); \
- for ( QStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
+ TQStringList modList = TQStringList::split( ",", TQString(modules).remove( " " )); \
+ for ( TQStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
if ( KCModuleLoader::testModule( *it ) ) \
return true; \
return false; \
diff --git a/kutils/kcmoduleinfo.cpp b/kutils/kcmoduleinfo.cpp
index 2de4142d4..fe2545a39 100644
--- a/kutils/kcmoduleinfo.cpp
+++ b/kutils/kcmoduleinfo.cpp
@@ -21,7 +21,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdesktopfile.h>
#include <kdebug.h>
@@ -40,7 +40,7 @@ class KCModuleInfo::KCModuleInfoPrivate
~KCModuleInfoPrivate()
{ }
- QString factoryName;
+ TQString factoryName;
bool testModule;
};
@@ -51,7 +51,7 @@ KCModuleInfo::KCModuleInfo()
d = new KCModuleInfoPrivate;
}
-KCModuleInfo::KCModuleInfo(const QString& desktopFile)
+KCModuleInfo::KCModuleInfo(const TQString& desktopFile)
{
KService::Ptr service = KService::serviceByStorageId(desktopFile);
if(!service) setName(desktopFile);
@@ -92,11 +92,11 @@ KCModuleInfo &KCModuleInfo::operator=( const KCModuleInfo &rhs )
return *this;
}
-QString KCModuleInfo::factoryName() const
+TQString KCModuleInfo::factoryName() const
{
if( d->factoryName.isEmpty() )
{
- d->factoryName = _service->property("X-KDE-FactoryName", QVariant::String).toString();
+ d->factoryName = _service->property("X-KDE-FactoryName", TQVariant::String).toString();
if ( d->factoryName.isEmpty() )
d->factoryName = library();
}
@@ -155,27 +155,27 @@ KCModuleInfo::loadAll()
_allLoaded = true;
// library and factory
- setHandle(_service->property("X-KDE-FactoryName", QVariant::String).toString());
+ setHandle(_service->property("X-KDE-FactoryName", TQVariant::String).toString());
- QVariant tmp;
+ TQVariant tmp;
// read weight
- tmp = _service->property( "X-KDE-Weight", QVariant::Int );
+ tmp = _service->property( "X-KDE-Weight", TQVariant::Int );
setWeight( tmp.isValid() ? tmp.toInt() : 100 );
// does the module need super user privileges?
- tmp = _service->property( "X-KDE-RootOnly", QVariant::Bool );
+ tmp = _service->property( "X-KDE-RootOnly", TQVariant::Bool );
setNeedsRootPrivileges( tmp.isValid() ? tmp.toBool() : false );
// does the module need to be shown to root only?
// Deprecated ! KDE 4
- tmp = _service->property( "X-KDE-IsHiddenByDefault", QVariant::Bool );
+ tmp = _service->property( "X-KDE-IsHiddenByDefault", TQVariant::Bool );
setIsHiddenByDefault( tmp.isValid() ? tmp.toBool() : false );
// get the documentation path
- setDocPath( _service->property( "DocPath", QVariant::String ).toString() );
+ setDocPath( _service->property( "DocPath", TQVariant::String ).toString() );
- tmp = _service->property( "X-KDE-Test-Module", QVariant::Bool );
+ tmp = _service->property( "X-KDE-Test-Module", TQVariant::Bool );
setNeedsTest( tmp.isValid() ? tmp.asBool() : false );
}
diff --git a/kutils/kcmoduleinfo.h b/kutils/kcmoduleinfo.h
index 7ccaceb94..96b6e7c4a 100644
--- a/kutils/kcmoduleinfo.h
+++ b/kutils/kcmoduleinfo.h
@@ -58,7 +58,7 @@ public:
* @param desktopFile the desktop file representing the module, or
* the name of the module.
*/
- KCModuleInfo(const QString& desktopFile);
+ KCModuleInfo(const TQString& desktopFile);
/**
* Same as above but takes a KService::Ptr as argument.
@@ -110,12 +110,12 @@ public:
/**
* @return the filename of the .desktop file that describes the KCM
*/
- QString fileName() const { return _fileName; }
+ TQString fileName() const { return _fileName; }
/**
* @return the keywords associated with this KCM.
*/
- const QStringList &keywords() const { return _keywords; }
+ const TQStringList &keywords() const { return _keywords; }
/**
* Returns the module's factory name, if it's set. If not, the library
@@ -123,13 +123,13 @@ public:
* @returns the module's factory name
* @since 3.4
*/
- QString factoryName() const;
+ TQString factoryName() const;
/**
* @return the module\'s (translated) name
*/
- QString moduleName() const { return _name; }
- // changed from name() to avoid ambiguity with QObject::name() on multiple inheritance
+ TQString moduleName() const { return _name; }
+ // changed from name() to avoid ambiguity with TQObject::name() on multiple inheritance
/**
* @return a KSharedPtr to KService created from the modules .desktop file
@@ -139,27 +139,27 @@ public:
/**
* @return the module's (translated) comment field
*/
- QString comment() const { return _comment; }
+ TQString comment() const { return _comment; }
/**
* @return the module's icon name
*/
- QString icon() const { return _icon; }
+ TQString icon() const { return _icon; }
/**
* @return the path of the module's documentation
*/
- QString docPath() const;
+ TQString docPath() const;
/**
* @return the library name
*/
- QString library() const { return _lib; }
+ TQString library() const { return _lib; }
/**
* @return a handle (usually the contents of the FactoryName field)
*/
- QString handle() const;
+ TQString handle() const;
/**
* @return the weight of the module which determines the order of the pages in
@@ -193,37 +193,37 @@ protected:
* Sets the object's keywords.
* @param keyword the new keywords
*/
- void setKeywords(const QStringList &keyword) { _keywords = keyword; }
+ void setKeywords(const TQStringList &keyword) { _keywords = keyword; }
/**
* Sets the object's name.
* @param name the new name
*/
- void setName(const QString &name) { _name = name; }
+ void setName(const TQString &name) { _name = name; }
/**
* Sets the object's name.
* @param comment the new comment
*/
- void setComment(const QString &comment) { _comment = comment; }
+ void setComment(const TQString &comment) { _comment = comment; }
/**
* Sets the object's icon.
* @param icon the name of the new icon
*/
- void setIcon(const QString &icon) { _icon = icon; }
+ void setIcon(const TQString &icon) { _icon = icon; }
/**
* Set the object's library
* @param lib the name of the new library without any extensions or prefixs.
*/
- void setLibrary(const QString &lib) { _lib = lib; }
+ void setLibrary(const TQString &lib) { _lib = lib; }
/**
* Sets the factory name
* @param handle The new factory name
*/
- void setHandle(const QString &handle) { _handle = handle; }
+ void setHandle(const TQString &handle) { _handle = handle; }
/**
* Sets the object's weight property which determines in what
@@ -259,7 +259,7 @@ protected:
* Sets the object's documentation path
* @param p the new documentation path
*/
- void setDocPath(const QString &p) { _doc = p; }
+ void setDocPath(const TQString &p) { _doc = p; }
/**
* Reads the service entries specific for KCModule from the desktop file.
@@ -277,8 +277,8 @@ private:
private:
// KDE4 These needs to be moved to KCModuleInfoPrivate
- QStringList _keywords;
- QString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
+ TQStringList _keywords;
+ TQString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
bool _needsRootPrivileges : 1;
bool _isHiddenByDefault : 1;
bool _allLoaded : 1;
diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp
index 0cc06d25f..de1843b7c 100644
--- a/kutils/kcmoduleloader.cpp
+++ b/kutils/kcmoduleloader.cpp
@@ -21,9 +21,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,12 +42,12 @@
class KCMError : public KCModule
{
public:
- KCMError( const QString& msg, const QString& details, QWidget* parent )
+ KCMError( const TQString& msg, const TQString& details, TQWidget* parent )
: KCModule( parent, "KCMError" )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this );
- topLayout->addWidget( new QLabel( msg, this ) );
- topLayout->addWidget( new QLabel( details, this ) );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this );
+ topLayout->addWidget( new TQLabel( msg, this ) );
+ topLayout->addWidget( new TQLabel( details, this ) );
}
};
/***************************************************************/
@@ -55,19 +55,19 @@ class KCMError : public KCModule
-KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
- KLibLoader *loader, ErrorReporting report, QWidget * parent,
- const char * name, const QStringList & args )
+KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname,
+ KLibLoader *loader, ErrorReporting report, TQWidget * parent,
+ const char * name, const TQStringList & args )
{
// attempt to load modules with ComponentFactory, only if the symbol init_<lib> exists
// (this is because some modules, e.g. kcmkio with multiple modules in the library,
// cannot be ported to KGenericFactory)
- KLibrary *lib = loader->library(QFile::encodeName(libname.arg(mod.library())));
+ KLibrary *lib = loader->library(TQFile::encodeName(libname.arg(mod.library())));
if (lib) {
- QString initSym("init_");
+ TQString initSym("init_");
initSym += libname.arg(mod.library());
- if ( lib->hasSymbol(QFile::encodeName(initSym)) )
+ if ( lib->hasSymbol(TQFile::encodeName(initSym)) )
{
KLibFactory *factory = lib->factory();
if ( factory )
@@ -81,19 +81,19 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
}
// get the create_ function
- QString factory("create_%1");
- void *create = lib->symbol(QFile::encodeName(factory.arg(mod.handle())));
+ TQString factory("create_%1");
+ void *create = lib->symbol(TQFile::encodeName(factory.arg(mod.handle())));
if (create)
{
// create the module
- KCModule* (*func)(QWidget *, const char *);
- func = (KCModule* (*)(QWidget *, const char *)) create;
+ KCModule* (*func)(TQWidget *, const char *);
+ func = (KCModule* (*)(TQWidget *, const char *)) create;
return func( parent, name ? name : mod.handle().latin1() );
}
else
{
- QString libFileName = lib->fileName();
+ TQString libFileName = lib->fileName();
lib->unload();
return reportError( report, i18n("<qt>There was an error when loading the module '%1'.<br><br>"
"The desktop file (%2) as well as the library (%3) was found but "
@@ -103,22 +103,22 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
.arg( mod.moduleName() )
.arg( mod.fileName() )
.arg( libFileName ),
- QString::null, parent );
+ TQString::null, parent );
}
lib->unload();
}
return reportError( report, i18n("The specified library %1 could not be found.")
- .arg( mod.library() ), QString::null, parent );
+ .arg( mod.library() ), TQString::null, parent );
return 0;
}
-KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, QWidget * parent, const char * name, const QStringList & args )
+KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
{
return loadModule( mod, None, withfallback, parent, name, args );
}
-KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting report, bool withfallback, QWidget * parent, const char * name, const QStringList & args )
+KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting report, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
{
/*
* Simple libraries as modules are the easiest case:
@@ -158,13 +158,13 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
* Only try to load libkcm_* if it exists, otherwise KLibLoader::lastErrorMessage would say
* "libkcm_foo not found" instead of the real problem with loading kcm_foo.
*/
- if (!KLibLoader::findLibrary( QCString( "libkcm_" ) + QFile::encodeName( mod.library() ) ).isEmpty() )
+ if (!KLibLoader::findLibrary( TQCString( "libkcm_" ) + TQFile::encodeName( mod.library() ) ).isEmpty() )
module = load(mod, "libkcm_%1", loader, report, parent, name, args );
if (module)
return module;
return reportError( report,
i18n("The module %1 could not be loaded.")
- .arg( mod.moduleName() ), QString::null, parent );
+ .arg( mod.moduleName() ), TQString::null, parent );
}
/*
@@ -177,7 +177,7 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
*/
if(withfallback)
{
- KApplication::startServiceByDesktopPath(mod.fileName(), QString::null);
+ KApplication::startServiceByDesktopPath(mod.fileName(), TQString::null);
}
else
{
@@ -189,14 +189,14 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
return 0;
}
-KCModule* KCModuleLoader::loadModule(const QString &module, QWidget *parent,
- const char *name, const QStringList & args)
+KCModule* KCModuleLoader::loadModule(const TQString &module, TQWidget *parent,
+ const char *name, const TQStringList & args)
{
return loadModule(KCModuleInfo(module), None, false, parent, name, args);
}
-KCModule* KCModuleLoader::loadModule(const QString &module, ErrorReporting
- report, QWidget *parent, const char *name, const QStringList & args)
+KCModule* KCModuleLoader::loadModule(const TQString &module, ErrorReporting
+ report, TQWidget *parent, const char *name, const TQStringList & args)
{
return loadModule(KCModuleInfo(module), report, false, parent, name, args);
}
@@ -207,14 +207,14 @@ void KCModuleLoader::unloadModule(const KCModuleInfo &mod)
KLibLoader *loader = KLibLoader::self();
// try to unload the library
- QString libname("libkcm_%1");
- loader->unloadLibrary(QFile::encodeName(libname.arg(mod.library())));
+ TQString libname("libkcm_%1");
+ loader->unloadLibrary(TQFile::encodeName(libname.arg(mod.library())));
libname = "kcm_%1";
- loader->unloadLibrary(QFile::encodeName(libname.arg(mod.library())));
+ loader->unloadLibrary(TQFile::encodeName(libname.arg(mod.library())));
}
-void KCModuleLoader::showLastLoaderError(QWidget *parent)
+void KCModuleLoader::showLastLoaderError(TQWidget *parent)
{
KMessageBox::detailedError(parent,
i18n("There was an error loading the module."),i18n("<qt><p>The diagnostics is:<br>%1"
@@ -227,7 +227,7 @@ void KCModuleLoader::showLastLoaderError(QWidget *parent)
}
-bool KCModuleLoader::testModule( const QString& module )
+bool KCModuleLoader::testModule( const TQString& module )
{
return testModule( KCModuleInfo( module ) );
}
@@ -240,7 +240,7 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
return true;
}
- bool doLoad = module.service()->property( "X-KDE-Test-Module", QVariant::Bool ).toBool();
+ bool doLoad = module.service()->property( "X-KDE-Test-Module", TQVariant::Bool ).toBool();
if( !doLoad )
{
return true;
@@ -254,10 +254,10 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
* a corresponding KCMError.
* */
KLibLoader* loader = KLibLoader::self();
- KLibrary* library = loader->library( QFile::encodeName((QString("kcm_%1").arg(module.library()))) );
+ KLibrary* library = loader->library( TQFile::encodeName((TQString("kcm_%1").arg(module.library()))) );
if( library )
{
- void *test_func = library->symbol( QString("test_%1").arg(module.factoryName()).utf8() );
+ void *test_func = library->symbol( TQString("test_%1").arg(module.factoryName()).utf8() );
if( test_func )
{
bool (*func)() = (bool(*)())test_func;
@@ -281,8 +281,8 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
}
}
-KCModule* KCModuleLoader::reportError( ErrorReporting report, const QString & text,
- QString details, QWidget * parent )
+KCModule* KCModuleLoader::reportError( ErrorReporting report, const TQString & text,
+ TQString details, TQWidget * parent )
{
if( details.isNull() )
details = i18n("<qt><p>The diagnostics is:<br>%1"
diff --git a/kutils/kcmoduleloader.h b/kutils/kcmoduleloader.h
index 8aa6aac69..efd4a5b50 100644
--- a/kutils/kcmoduleloader.h
+++ b/kutils/kcmoduleloader.h
@@ -61,8 +61,8 @@ class KUTILS_EXPORT KCModuleLoader
* method
*/
static KCModule *loadModule(const KCModuleInfo &module, bool withFallback=true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() ) KDE_DEPRECATED;
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() ) KDE_DEPRECATED;
/**
* Loads a @ref KCModule. If loading fails a zero pointer is returned.
@@ -75,8 +75,8 @@ class KUTILS_EXPORT KCModuleLoader
* @deprecated use the function which explicitly states the error reporting
* method
*/
- static KCModule *loadModule(const QString &module, QWidget *parent = 0,
- const char *name = 0, const QStringList & args = QStringList()) KDE_DEPRECATED;
+ static KCModule *loadModule(const TQString &module, TQWidget *parent = 0,
+ const char *name = 0, const TQStringList & args = TQStringList()) KDE_DEPRECATED;
/**
* Determines the way errors are reported
@@ -115,8 +115,8 @@ class KUTILS_EXPORT KCModuleLoader
* @since 3.4
*/
static KCModule *loadModule(const KCModuleInfo &module, ErrorReporting
- report, bool withFallback=true, QWidget * parent = 0,
- const char * name = 0, const QStringList & args = QStringList() );
+ report, bool withFallback=true, TQWidget * parent = 0,
+ const char * name = 0, const TQStringList & args = TQStringList() );
/**
* Loads a @ref KCModule. If loading fails a zero pointer is returned.
@@ -130,9 +130,9 @@ class KUTILS_EXPORT KCModuleLoader
* @return a pointer to the loaded @ref KCModule
* @since 3.4
*/
- static KCModule *loadModule(const QString &module, ErrorReporting
- report, QWidget *parent = 0, const char *name = 0,
- const QStringList & args = QStringList());
+ static KCModule *loadModule(const TQString &module, ErrorReporting
+ report, TQWidget *parent = 0, const char *name = 0,
+ const TQStringList & args = TQStringList());
/**
* Unloads the module's library
@@ -147,7 +147,7 @@ class KUTILS_EXPORT KCModuleLoader
* @deprecated Use a constructor with ErrorReporting set to Dialog to show a
* message box like this function did.
*/
- static void showLastLoaderError(QWidget *parent) KDE_DEPRECATED;
+ static void showLastLoaderError(TQWidget *parent) KDE_DEPRECATED;
/**
@@ -178,7 +178,7 @@ class KUTILS_EXPORT KCModuleLoader
* @returns true if the module should be loaded
* @since 3.4
*/
- static bool testModule( const QString& module );
+ static bool testModule( const TQString& module );
/**
* Convenience function, essentially the same as above.
@@ -200,8 +200,8 @@ class KUTILS_EXPORT KCModuleLoader
* @since 3.4
* @internal
*/
- static KCModule* reportError( ErrorReporting report, const QString & text,
- QString details, QWidget * parent );
+ static KCModule* reportError( ErrorReporting report, const TQString & text,
+ TQString details, TQWidget * parent );
private:
@@ -209,9 +209,9 @@ class KUTILS_EXPORT KCModuleLoader
* Internal loader called by the public loaders.
* @internal
*/
- static KCModule* load(const KCModuleInfo &mod, const QString &libname,
- KLibLoader *loader, ErrorReporting report, QWidget * parent = 0,
- const char * name = 0, const QStringList & args = QStringList() );
+ static KCModule* load(const KCModuleInfo &mod, const TQString &libname,
+ KLibLoader *loader, ErrorReporting report, TQWidget * parent = 0,
+ const char * name = 0, const TQStringList & args = TQStringList() );
};
diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp
index 3822db841..9fd95f40f 100644
--- a/kutils/kcmoduleproxy.cpp
+++ b/kutils/kcmoduleproxy.cpp
@@ -17,20 +17,20 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qdatastream.h>
-#include <qevent.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpoint.h>
-#include <qscrollview.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqdatastream.h>
+#include <tqevent.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
#include <dcopclient.h>
#include <qxembed.h>
@@ -97,7 +97,7 @@ class KCModuleProxy::KCModuleProxyPrivate
QVBox *embedFrame;
KCModuleProxyIfaceImpl *dcopObject;
DCOPClient *dcopClient;
- QVBoxLayout *topLayout; /* Contains QScrollView view, and root stuff */
+ QVBoxLayout *topLayout; /* Contains TQScrollView view, and root stuff */
KCModuleProxyRootCommunicatorImpl *rootCommunicator;
QLabel *rootInfo;
QCString dcopName;
@@ -155,14 +155,14 @@ KCModule * KCModuleProxy::realModule() const
if( d->rootMode )
return 0;
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
KCModuleProxy * that = const_cast<KCModuleProxy*>( this );
if( !d->isInitialized )
{
d->dcopName = moduleInfo().handle().prepend("KCModuleProxy-").utf8();
- d->topLayout = new QVBoxLayout( that, 0, 0, "topLayout" );
+ d->topLayout = new TQVBoxLayout( that, 0, 0, "topLayout" );
d->isInitialized = true;
}
@@ -185,13 +185,13 @@ KCModule * KCModuleProxy::realModule() const
d->kcm = KCModuleLoader::loadModule( moduleInfo(), KCModuleLoader::Inline, d->withFallback,
that, name(), d->args );
- connect( d->kcm, SIGNAL( changed( bool ) ),
- SLOT(moduleChanged(bool)) );
- connect( d->kcm, SIGNAL( destroyed() ),
- SLOT( moduleDestroyed() ) );
- connect( d->kcm, SIGNAL(quickHelpChanged()),
- SIGNAL(quickHelpChanged()));
- QWhatsThis::add( that, d->kcm->quickHelp() );
+ connect( d->kcm, TQT_SIGNAL( changed( bool ) ),
+ TQT_SLOT(moduleChanged(bool)) );
+ connect( d->kcm, TQT_SIGNAL( destroyed() ),
+ TQT_SLOT( moduleDestroyed() ) );
+ connect( d->kcm, TQT_SIGNAL(quickHelpChanged()),
+ TQT_SIGNAL(quickHelpChanged()));
+ TQWhatsThis::add( that, d->kcm->quickHelp() );
d->topLayout->addWidget( d->kcm );
@@ -200,13 +200,13 @@ KCModule * KCModuleProxy::realModule() const
!KUser().isSuperUser() ) /* Not necessary if we're root */
{
- d->rootInfo = new QLabel( that, "rootInfo" );
+ d->rootInfo = new TQLabel( that, "rootInfo" );
d->topLayout->insertWidget( 0, d->rootInfo );
- d->rootInfo->setFrameShape(QFrame::Box);
- d->rootInfo->setFrameShadow(QFrame::Raised);
+ d->rootInfo->setFrameShape(TQFrame::Box);
+ d->rootInfo->setFrameShadow(TQFrame::Raised);
- const QString msg = d->kcm->rootOnlyMsg();
+ const TQString msg = d->kcm->rootOnlyMsg();
if( msg.isEmpty() )
d->rootInfo->setText(i18n(
"<b>Changes in this section requires root access.</b><br />"
@@ -215,7 +215,7 @@ KCModule * KCModuleProxy::realModule() const
else
d->rootInfo->setText(msg);
- QWhatsThis::add( d->rootInfo, i18n(
+ TQWhatsThis::add( d->rootInfo, i18n(
"This section requires special permissions, probably "
"for system-wide changes; therefore, it is "
"required that you provide the root password to be "
@@ -233,14 +233,14 @@ KCModule * KCModuleProxy::realModule() const
d->dcopClient->attach();
d->dcopClient->setNotifications( true );
- connect( d->dcopClient, SIGNAL( applicationRemoved( const QCString& )),
- SLOT( applicationRemoved( const QCString& )));
+ connect( d->dcopClient, TQT_SIGNAL( applicationRemoved( const TQCString& )),
+ TQT_SLOT( applicationRemoved( const TQCString& )));
/* Figure out the name of where the module is already loaded */
- QByteArray replyData, data;
- QCString replyType;
- QString result;
- QDataStream arg, stream( replyData, IO_ReadOnly );
+ TQByteArray replyData, data;
+ TQCString replyType;
+ TQString result;
+ TQDataStream arg, stream( replyData, IO_ReadOnly );
if( d->dcopClient->call( d->dcopName, d->dcopName, "applicationName()",
data, replyType, replyData ))
@@ -257,17 +257,17 @@ KCModule * KCModuleProxy::realModule() const
{
kdDebug(711) << "Calling KCModuleProxy's DCOP interface for fetching the name failed." << endl;
d->bogusOccupier = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return realModule();
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return d->kcm;
}
-void KCModuleProxy::applicationRemoved( const QCString& app )
+void KCModuleProxy::applicationRemoved( const TQCString& app )
{
if( app == d->dcopName )
{
@@ -281,7 +281,7 @@ void KCModuleProxy::applicationRemoved( const QCString& app )
}
}
-void KCModuleProxy::showEvent( QShowEvent * ev )
+void KCModuleProxy::showEvent( TQShowEvent * ev )
{
kdDebug(711) << k_funcinfo << endl;
@@ -291,7 +291,7 @@ void KCModuleProxy::showEvent( QShowEvent * ev )
if( d->kcm )
d->kcm->show();
- QWidget::showEvent( ev );
+ TQWidget::showEvent( ev );
}
@@ -300,17 +300,17 @@ void KCModuleProxy::runAsRoot()
if ( !moduleInfo().needsRootPrivileges() )
return;
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
delete d->rootProcess;
delete d->embedWidget;
delete d->embedFrame;
- d->embedFrame = new QVBox( this, "embedFrame" );
- d->embedFrame->setFrameStyle( QFrame::Box | QFrame::Raised );
+ d->embedFrame = new TQVBox( this, "embedFrame" );
+ d->embedFrame->setFrameStyle( TQFrame::Box | TQFrame::Raised );
- QPalette pal( red );
- pal.setColor( QColorGroup::Background,
+ TQPalette pal( red );
+ pal.setColor( TQColorGroup::Background,
colorGroup().background() );
d->embedFrame->setPalette( pal );
d->embedFrame->setLineWidth( 2 );
@@ -321,7 +321,7 @@ void KCModuleProxy::runAsRoot()
d->embedFrame->show();
- QLabel *lblBusy = new QLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
+ TQLabel *lblBusy = new TQLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
lblBusy->setTextFormat(RichText);
lblBusy->setAlignment(AlignCenter);
lblBusy->setGeometry(0,0, d->kcm->width(), d->kcm->height());
@@ -340,7 +340,7 @@ void KCModuleProxy::runAsRoot()
*/
/* Prepare the process to run the kcmshell */
- QString cmd = moduleInfo().service()->exec().stripWhiteSpace();
+ TQString cmd = moduleInfo().service()->exec().stripWhiteSpace();
if (cmd.left(5) == "kdesu")
{
cmd = cmd.remove(0,5).stripWhiteSpace();
@@ -354,19 +354,19 @@ void KCModuleProxy::runAsRoot()
cmd = cmd.remove(0,8).stripWhiteSpace();
/* Run the process */
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty())
{
d->rootProcess = new KProcess;
*d->rootProcess << kdesu;
- *d->rootProcess << "--nonewdcop" << "-n" << "-d" << QString( "-i%1" ).arg(moduleInfo().icon());
+ *d->rootProcess << "--nonewdcop" << "-n" << "-d" << TQString( "-i%1" ).arg(moduleInfo().icon());
- *d->rootProcess << QString("%1 %2 --embed-proxy %3 --lang %4").arg(locate("exe", "kcmshell"))
+ *d->rootProcess << TQString("%1 %2 --embed-proxy %3 --lang %4").arg(locate("exe", "kcmshell"))
.arg(cmd).arg(d->embedWidget->winId()).arg(KGlobal::locale()->language());
- connect(d->rootProcess, SIGNAL(processExited(KProcess*)), SLOT(rootExited()));
+ connect(d->rootProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(rootExited()));
if ( !d->rootProcess->start( KProcess::NotifyOnExit ))
{
@@ -381,7 +381,7 @@ void KCModuleProxy::runAsRoot()
}
delete lblBusy;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
@@ -391,7 +391,7 @@ void KCModuleProxy::runAsRoot()
delete d->embedFrame;
d->embedFrame = 0;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void KCModuleProxy::rootExited()
@@ -418,7 +418,7 @@ void KCModuleProxy::rootExited()
d->topLayout->invalidate();
- QShowEvent ev;
+ TQShowEvent ev;
showEvent( &ev );
moduleChanged( false );
@@ -471,8 +471,8 @@ void KCModuleProxy::moduleDestroyed()
}
KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback,
- QWidget * parent, const char * name, const QStringList & args)
- : QWidget( parent, name )
+ TQWidget * parent, const char * name, const TQStringList & args)
+ : TQWidget( parent, name )
{
init( KCModuleInfo( service ));
d->args = args;
@@ -480,18 +480,18 @@ KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback,
}
KCModuleProxy::KCModuleProxy( const KCModuleInfo & info, bool withFallback,
- QWidget * parent, const char * name, const QStringList & args )
- : QWidget( parent, name )
+ TQWidget * parent, const char * name, const TQStringList & args )
+ : TQWidget( parent, name )
{
init( info );
d->args = args;
d->withFallback = withFallback;
}
-KCModuleProxy::KCModuleProxy( const QString& serviceName, bool withFallback,
- QWidget * parent, const char * name,
- const QStringList & args)
- : QWidget( parent, name )
+KCModuleProxy::KCModuleProxy( const TQString& serviceName, bool withFallback,
+ TQWidget * parent, const char * name,
+ const TQStringList & args)
+ : TQWidget( parent, name )
{
init( KCModuleInfo( serviceName ));
d->args = args;
@@ -535,10 +535,10 @@ void KCModuleProxy::save()
}
}
-void KCModuleProxy::callRootModule( const QCString& function )
+void KCModuleProxy::callRootModule( const TQCString& function )
{
- QByteArray sendData, replyData;
- QCString replyType;
+ TQByteArray sendData, replyData;
+ TQCString replyType;
/* Note, we don't use d->dcopClient here, because it's used for
* the loaded module(and it's not "us" when this function is called) */
@@ -556,32 +556,32 @@ void KCModuleProxy::defaults()
d->kcm->defaults();
}
-QString KCModuleProxy::quickHelp() const
+TQString KCModuleProxy::quickHelp() const
{
if( !d->rootMode )
- return realModule() ? realModule()->quickHelp() : QString::null;
+ return realModule() ? realModule()->quickHelp() : TQString::null;
else
{
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (kapp->dcopClient()->call(d->dcopName, d->dcopName, "quickHelp()",
data, replyType, replyData))
kdDebug(711) << "Calling DCOP function bool changed() failed." << endl;
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQString")
{
- QString result;
+ TQString result;
reply >> result;
return result;
}
else
kdDebug(711) << "DCOP function changed() returned mumbo jumbo." << endl;
}
- return QString::null;
+ return TQString::null;
}
}
@@ -603,9 +603,9 @@ int KCModuleProxy::buttons() const
KCModule::Help | KCModule::Default | KCModule::Apply ;
}
-QString KCModuleProxy::rootOnlyMsg() const
+TQString KCModuleProxy::rootOnlyMsg() const
{
- return realModule() ? realModule()->rootOnlyMsg() : QString::null;
+ return realModule() ? realModule()->rootOnlyMsg() : TQString::null;
}
bool KCModuleProxy::useRootOnlyMsg() const
@@ -633,7 +633,7 @@ bool KCModuleProxy::rootMode() const
return d->rootMode;
}
-QCString KCModuleProxy::dcopName() const
+TQCString KCModuleProxy::dcopName() const
{
return d->dcopName;
}
diff --git a/kutils/kcmoduleproxy.h b/kutils/kcmoduleproxy.h
index b785bbaca..d615edc1e 100644
--- a/kutils/kcmoduleproxy.h
+++ b/kutils/kcmoduleproxy.h
@@ -21,8 +21,8 @@
#ifndef KCMODULEPROXY_H
#define KCMODULEPROXY_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kservice.h>
#include <kdelibs_export.h>
@@ -42,7 +42,7 @@ class KProcess;
* modules are to be displayed. It ensures layout is consistent, handles
* root/administrator modules and in general takes care of the details
* needed for making a module available in an interface. A KCModuleProxy
- * can be treated as a QWidget, without worrying about the details specific
+ * can be treated as a TQWidget, without worrying about the details specific
* for modules such as library loading. KCModuleProxy is not a sub class of KCModule
* but its API closely resembles KCModule's.\n
* Usually, an instance is created by passing one of the constructors a KService::Ptr,
@@ -81,14 +81,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
KCModuleProxy( const KCModuleInfo & info, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Constructs a KCModuleProxy from a module's service name, which is
@@ -100,14 +100,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
- KCModuleProxy( const QString& serviceName, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ KCModuleProxy( const TQString& serviceName, bool withFallback = true,
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Constructs a KCModuleProxy from KService. Otherwise equal to the one above.
@@ -117,14 +117,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
KCModuleProxy( const KService::Ptr& service, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Default destructor
@@ -149,7 +149,7 @@ public:
/**
* @return the module's quickHelp();
*/
- QString quickHelp() const;
+ TQString quickHelp() const;
/**
* @return the module's aboutData()
@@ -167,7 +167,7 @@ public:
* message, if it has one
* @deprecated
*/
- QString rootOnlyMsg() const;
+ TQString rootOnlyMsg() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via moduleInfo()-> and realModule()->
@@ -228,7 +228,7 @@ public:
*
* @since 3.4
*/
- QCString dcopName() const;
+ TQCString dcopName() const;
public slots:
@@ -292,7 +292,7 @@ protected:
* Reimplemented for internal purposes. Makes sure the encapsulated
* module is loaded before the show event is taken care of.
*/
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
/**
* Internal intialization function, called by the constructors.
@@ -318,7 +318,7 @@ private slots:
* @param function the function signature of the function to call.
* @since 3.4
*/
- void callRootModule( const QCString& function );
+ void callRootModule( const TQCString& function );
/**
* This is called when the module exits from root mode. It zeroes
@@ -345,7 +345,7 @@ private slots:
*
* @since 3.4
*/
- void applicationRemoved( const QCString& app );
+ void applicationRemoved( const TQCString& app );
private:
diff --git a/kutils/kcmoduleproxyIface.h b/kutils/kcmoduleproxyIface.h
index 8159a843f..ff597b5c6 100644
--- a/kutils/kcmoduleproxyIface.h
+++ b/kutils/kcmoduleproxyIface.h
@@ -45,7 +45,7 @@ k_dcop:
*
* @returns the host's name
*/
- virtual QString applicationName() = 0;
+ virtual TQString applicationName() = 0;
/**
* Save settings.
@@ -65,7 +65,7 @@ k_dcop:
/**
* Returns the module's quick help.
*/
- virtual QString quickHelp() = 0;
+ virtual TQString quickHelp() = 0;
/**
* @returns true if the module has unsaved
diff --git a/kutils/kcmoduleproxyIfaceImpl.cpp b/kutils/kcmoduleproxyIfaceImpl.cpp
index 5d1ae15fe..c9de5ba7a 100644
--- a/kutils/kcmoduleproxyIfaceImpl.cpp
+++ b/kutils/kcmoduleproxyIfaceImpl.cpp
@@ -16,8 +16,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
@@ -28,17 +28,17 @@
#include "kcmoduleproxyIfaceImpl.h"
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
-KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const QCString& name,
+KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const TQCString& name,
KCModuleProxy* const client )
- : DCOPObject( name ), QObject( 0, name ),
+ : DCOPObject( name ), TQObject( 0, name ),
p( const_cast<KCModuleProxy *>( client ))
{
- connect( p, SIGNAL( changed(bool)),
- SLOT( changedRelay(bool)));
- connect( p, SIGNAL( quickHelpChanged()),
- SLOT( quickHelpRelay()));
+ connect( p, TQT_SIGNAL( changed(bool)),
+ TQT_SLOT( changedRelay(bool)));
+ connect( p, TQT_SIGNAL( quickHelpChanged()),
+ TQT_SLOT( quickHelpRelay()));
}
void KCModuleProxyIfaceImpl::save()
@@ -59,12 +59,12 @@ void KCModuleProxyIfaceImpl::defaults()
p->defaults();
}
-QString KCModuleProxyIfaceImpl::applicationName()
+TQString KCModuleProxyIfaceImpl::applicationName()
{
return kapp->caption();
}
-QString KCModuleProxyIfaceImpl::quickHelp()
+TQString KCModuleProxyIfaceImpl::quickHelp()
{
return p->quickHelp();
}
@@ -76,15 +76,15 @@ bool KCModuleProxyIfaceImpl::changed()
void KCModuleProxyIfaceImpl::changedRelay( bool c )
{
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << c;
emitDCOPSignal( "changed(bool)", data );
}
void KCModuleProxyIfaceImpl::quickHelpRelay()
{
- QByteArray data;
+ TQByteArray data;
emitDCOPSignal( "quickHelpChanged()", data );
}
@@ -95,8 +95,8 @@ void KCModuleProxyIfaceImpl::quickHelpRelay()
/***************************************************************/
KCModuleProxyRootCommunicatorImpl::KCModuleProxyRootCommunicatorImpl
- ( const QCString& name, KCModuleProxy* const client )
- : DCOPObject( name ), QObject( 0, name ),
+ ( const TQCString& name, KCModuleProxy* const client )
+ : DCOPObject( name ), TQObject( 0, name ),
p( const_cast<KCModuleProxy *>( client ))
{
/*
diff --git a/kutils/kcmoduleproxyIfaceImpl.h b/kutils/kcmoduleproxyIfaceImpl.h
index 435c856ab..bbfe51a28 100644
--- a/kutils/kcmoduleproxyIfaceImpl.h
+++ b/kutils/kcmoduleproxyIfaceImpl.h
@@ -26,7 +26,7 @@ class KCModuleProxy;
/***************************************************************/
/** @internal
@ingroup internal */
-class KCModuleProxyIfaceImpl: public QObject, virtual public KCModuleProxyIface
+class KCModuleProxyIfaceImpl: public TQObject, virtual public KCModuleProxyIface
{
/* KDE4 Merge KCModuleProxyIfaceImpl with KCModuleProxy(MI)
* if it doesn't break what DCOPClient it binds to.
@@ -38,7 +38,7 @@ class KCModuleProxyIfaceImpl: public QObject, virtual public KCModuleProxyIface
public:
/* Reimplementations of DCOP members */
- KCModuleProxyIfaceImpl( const QCString& name, KCModuleProxy* const client );
+ KCModuleProxyIfaceImpl( const TQCString& name, KCModuleProxy* const client );
virtual void save();
@@ -46,9 +46,9 @@ public:
virtual void defaults();
- virtual QString applicationName();
+ virtual TQString applicationName();
- virtual QString quickHelp();
+ virtual TQString quickHelp();
virtual bool changed();
public slots:
@@ -76,13 +76,13 @@ private:
/***************************************************************/
/** @internal
@ingroup internal */
-class KCModuleProxyRootCommunicatorImpl: public QObject,
+class KCModuleProxyRootCommunicatorImpl: public TQObject,
virtual public KCModuleProxyRootDispatcher
{
Q_OBJECT
public:
- KCModuleProxyRootCommunicatorImpl( const QCString& name, KCModuleProxy* const client );
+ KCModuleProxyRootCommunicatorImpl( const TQCString& name, KCModuleProxy* const client );
/* Reimplementations of DCOP members */
virtual void changed( bool c );
diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp
index f64a9e139..33f243529 100644
--- a/kutils/kcmultidialog.cpp
+++ b/kutils/kcmultidialog.cpp
@@ -21,10 +21,10 @@
*/
-#include <qcursor.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqcursor.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,7 +55,7 @@ class KCMultiDialog::KCMultiDialogPrivate
};
-KCMultiDialog::KCMultiDialog(QWidget *parent, const char *name, bool modal)
+KCMultiDialog::KCMultiDialog(TQWidget *parent, const char *name, bool modal)
: KDialogBase(IconList, i18n("Configure"), Help | Default |Cancel | Apply |
Ok | User1 | User2, Ok, parent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::adminMode())
@@ -64,7 +64,7 @@ KCMultiDialog::KCMultiDialog(QWidget *parent, const char *name, bool modal)
init();
}
-KCMultiDialog::KCMultiDialog( int dialogFace, const QString & caption, QWidget * parent, const char * name, bool modal )
+KCMultiDialog::KCMultiDialog( int dialogFace, const TQString & caption, TQWidget * parent, const char * name, bool modal )
: KDialogBase( dialogFace, caption, Help | Default | Cancel | Apply | Ok |
User1 | User2, Ok, parent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::adminMode())
@@ -74,8 +74,8 @@ KCMultiDialog::KCMultiDialog( int dialogFace, const QString & caption, QWidget *
}
KCMultiDialog::KCMultiDialog( int dialogFace, const KGuiItem &user2,
- const KGuiItem &user3, int buttonMask, const QString &caption,
- QWidget *parent, const char *name, bool modal )
+ const KGuiItem &user3, int buttonMask, const TQString &caption,
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, caption, buttonMask | Help | Default | Cancel |
Apply | Ok | User1, Ok, parent, name, modal, true,
KStdGuiItem::reset(), user2, user3 )
@@ -89,12 +89,12 @@ KCMultiDialog::KCMultiDialog( int dialogFace, const KGuiItem &user2,
inline void KCMultiDialog::init()
{
- connect( this, SIGNAL( finished()), SLOT( dialogClosed()));
+ connect( this, TQT_SIGNAL( finished()), TQT_SLOT( dialogClosed()));
showButton( User1, false );
showButton( User2, false );
enableButton(Apply, false);
- connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *)));
- setInitialSize(QSize(640,480));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget *)), this, TQT_SLOT(slotAboutToShow(TQWidget *)));
+ setInitialSize(TQSize(640,480));
moduleParentComponents.setAutoDelete( true );
}
@@ -113,7 +113,7 @@ void KCMultiDialog::slotDefault()
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
( *it ).kcm->defaults();
clientChanged( true );
@@ -127,7 +127,7 @@ void KCMultiDialog::slotUser1()
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
( *it ).kcm->load();
clientChanged( false );
@@ -137,7 +137,7 @@ void KCMultiDialog::slotUser1()
void KCMultiDialog::apply()
{
- QStringList updatedModules;
+ TQStringList updatedModules;
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
{
@@ -145,14 +145,14 @@ void KCMultiDialog::apply()
if( m->changed() )
{
m->save();
- QStringList * names = moduleParentComponents[ m ];
+ TQStringList * names = moduleParentComponents[ m ];
kdDebug(710) << k_funcinfo << *names << " saved and added to the list" << endl;
- for( QStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
+ for( TQStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
if( updatedModules.find( *it ) == updatedModules.end() )
updatedModules.append( *it );
}
}
- for( QStringList::const_iterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
+ for( TQStringList::const_iterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
{
kdDebug(710) << k_funcinfo << *it << " " << ( *it ).latin1() << endl;
emit configCommitted( ( *it ).latin1() );
@@ -162,7 +162,7 @@ void KCMultiDialog::apply()
void KCMultiDialog::slotApply()
{
- QPushButton *button = actionButton(Apply);
+ TQPushButton *button = actionButton(Apply);
if (button)
button->setFocus();
emit applyClicked();
@@ -172,7 +172,7 @@ void KCMultiDialog::slotApply()
void KCMultiDialog::slotOk()
{
- QPushButton *button = actionButton(Ok);
+ TQPushButton *button = actionButton(Ok);
if (button)
button->setFocus();
emit okClicked();
@@ -182,12 +182,12 @@ void KCMultiDialog::slotOk()
void KCMultiDialog::slotHelp()
{
- QString docPath;
+ TQString docPath;
int curPageIndex = activePageIndex();
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
docPath = ( *it ).kcm->moduleInfo().docPath();
break;
@@ -219,20 +219,20 @@ void KCMultiDialog::clientChanged(bool state)
enableButton( Apply, false );
}
-void KCMultiDialog::addModule(const QString& path, bool withfallback)
+void KCMultiDialog::addModule(const TQString& path, bool withfallback)
{
- QString complete = path;
+ TQString complete = path;
if( !path.endsWith( ".desktop" ))
complete += ".desktop";
KService::Ptr service = KService::serviceByStorageId( complete );
- addModule( KCModuleInfo( service ), QStringList(), withfallback);
+ addModule( KCModuleInfo( service ), TQStringList(), withfallback);
}
void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
- QStringList parentmodulenames, bool withfallback)
+ TQStringList parentmodulenames, bool withfallback)
{
kdDebug(710) << "KCMultiDialog::addModule "
<< moduleinfo.moduleName() << endl;
@@ -246,7 +246,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
if( !KCModuleLoader::testModule( moduleinfo ))
return;
- QFrame* page = 0;
+ TQFrame* page = 0;
if (!moduleinfo.service()->noDisplay())
switch( dialogface )
{
@@ -263,7 +263,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
break;
case Plain:
page = plainPage();
- ( new QHBoxLayout( page ) )->setAutoAdd( true );
+ ( new TQHBoxLayout( page ) )->setAutoAdd( true );
break;
default:
kdError( 710 ) << "unsupported dialog face for KCMultiDialog"
@@ -284,7 +284,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
kdDebug( 710 ) << "Use KCModule from the list of orphans for " <<
moduleinfo.moduleName() << ": " << module << endl;
- module->reparent( page, 0, QPoint( 0, 0 ), true );
+ module->reparent( page, 0, TQPoint( 0, 0 ), true );
if( module->changed() )
clientChanged( true );
@@ -295,12 +295,12 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
else
{
module = new KCModuleProxy( moduleinfo, withfallback, page );
- QStringList parentComponents = moduleinfo.service()->property(
+ TQStringList parentComponents = moduleinfo.service()->property(
"X-KDE-ParentComponents" ).toStringList();
moduleParentComponents.insert( module,
- new QStringList( parentComponents ) );
+ new TQStringList( parentComponents ) );
- connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool)));
+ connect(module, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(clientChanged(bool)));
if( m_modules.count() == 0 )
aboutToShowPage( page );
@@ -328,12 +328,12 @@ void KCMultiDialog::removeAllModules()
{
kdDebug( 710 ) << "remove 2" << endl;
KCModuleProxy * kcm = ( *it ).kcm;
- QObject * page = kcm->parent();
+ TQObject * page = kcm->parent();
kcm->hide();
if( page )
{
// I hate this
- kcm->reparent( 0, QPoint( 0, 0 ), false );
+ kcm->reparent( 0, TQPoint( 0, 0 ), false );
delete page;
}
m_orphanModules[ ( *it ).service ] = kcm;
@@ -350,11 +350,11 @@ void KCMultiDialog::show()
KDialogBase::show();
}
-void KCMultiDialog::slotAboutToShow(QWidget *page)
+void KCMultiDialog::slotAboutToShow(TQWidget *page)
{
kdDebug(710) << k_funcinfo << endl;
- QObject * obj = page->child( 0, "KCModuleProxy" );
+ TQObject * obj = page->child( 0, "KCModuleProxy" );
if( ! obj )
return;
@@ -369,15 +369,15 @@ void KCMultiDialog::slotAboutToShow(QWidget *page)
enableButton( KDialogBase::Default,
d->currentModule->buttons() & KCModule::Default );
- disconnect( this, SIGNAL(user2Clicked()), 0, 0 );
+ disconnect( this, TQT_SIGNAL(user2Clicked()), 0, 0 );
if (d->currentModule->moduleInfo().needsRootPrivileges())
{
if ( !d->currentModule->rootMode() )
{ /* Enable the Admin Mode button */
enableButton( User2, true );
- connect( this, SIGNAL(user2Clicked()), d->currentModule, SLOT( runAsRoot() ));
- connect( this, SIGNAL(user2Clicked()), SLOT( disableRModeButton() ));
+ connect( this, TQT_SIGNAL(user2Clicked()), d->currentModule, TQT_SLOT( runAsRoot() ));
+ connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT( disableRModeButton() ));
}
else
enableButton( User2, false);
@@ -392,7 +392,7 @@ void KCMultiDialog::rootExit()
void KCMultiDialog::disableRModeButton()
{
enableButton( User2, false );
- connect ( d->currentModule, SIGNAL( childClosed() ), SLOT( rootExit() ));
+ connect ( d->currentModule, TQT_SIGNAL( childClosed() ), TQT_SLOT( rootExit() ));
}
void KCMultiDialog::dialogClosed()
diff --git a/kutils/kcmultidialog.h b/kutils/kcmultidialog.h
index 8461c5643..df1707a9a 100644
--- a/kutils/kcmultidialog.h
+++ b/kutils/kcmultidialog.h
@@ -23,7 +23,7 @@
#ifndef KCMULTIDIALOG_H
#define KCMULTIDIALOG_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -52,7 +52,7 @@ public:
* @param name The widget name
* @param modal If you pass true here, the dialog will be modal
**/
- KCMultiDialog( QWidget *parent=0, const char *name=0, bool modal=false );
+ KCMultiDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
/**
* Construct a personalized KCMultiDialog.
@@ -67,7 +67,7 @@ public:
* program interface (example: other dialogs) is accessible while
* the dialog is open.
*/
- KCMultiDialog( int dialogFace, const QString & caption, QWidget * parent = 0,
+ KCMultiDialog( int dialogFace, const TQString & caption, TQWidget * parent = 0,
const char * name = 0, bool modal = false );
@@ -101,7 +101,7 @@ public:
*/
KCMultiDialog( int dialogFace, const KGuiItem &user2,
const KGuiItem &user3=KGuiItem(), int buttonMask=User2,
- const QString &caption=i18n("Configure"), QWidget *parent=0,
+ const TQString &caption=i18n("Configure"), TQWidget *parent=0,
const char *name=0, bool modal=false ) KDE_DEPRECATED;
// KDE4 remove the user3 argument, and instead initialize it to KStdGuiItem::adminMode.
@@ -119,7 +119,7 @@ public:
* @param withfallback Try harder to load the module. Might result
* in the module appearing outside the dialog.
**/
- void addModule(const QString& module, bool withfallback=true);
+ void addModule(const TQString& module, bool withfallback=true);
/**
* Add a module.
@@ -137,7 +137,7 @@ public:
* in the module appearing outside the dialog.
**/
void addModule(const KCModuleInfo& moduleinfo, QStringList
- parentmodulenames = QStringList(), bool withfallback=false);
+ parentmodulenames = TQStringList(), bool withfallback=false);
/**
* Remove all modules from the dialog.
@@ -174,7 +174,7 @@ signals:
* @param instanceName The name of the instance that needs to reload its
* configuration.
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
protected slots:
/**
@@ -223,7 +223,7 @@ protected slots:
private slots:
- void slotAboutToShow(QWidget *);
+ void slotAboutToShow(TQWidget *);
void clientChanged(bool state);
@@ -265,14 +265,14 @@ private:
KService::Ptr service;
/* KDE 4 Move to Private class */
};
- typedef QValueList<CreatedModule> ModuleList;
+ typedef TQValueList<CreatedModule> ModuleList;
ModuleList m_modules;
- typedef QMap<KService::Ptr, KCModuleProxy*> OrphanMap;
+ typedef TQMap<KService::Ptr, KCModuleProxy*> OrphanMap;
OrphanMap m_orphanModules;
- QPtrDict<QStringList> moduleParentComponents;
- QString _docPath;
+ TQPtrDict<TQStringList> moduleParentComponents;
+ TQString _docPath;
int dialogface;
class KCMultiDialogPrivate;
diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp
index a6eb8dd46..7b2da6899 100644
--- a/kutils/kfind.cpp
+++ b/kutils/kfind.cpp
@@ -24,11 +24,11 @@
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qguardedptr.h>
-#include <qptrvector.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqguardedptr.h>
+#include <tqptrvector.h>
#include <kdebug.h>
//#define DEBUG_FIND
@@ -38,11 +38,11 @@
class KFindNextDialog : public KDialogBase
{
public:
- KFindNextDialog(const QString &pattern, QWidget *parent);
+ KFindNextDialog(const TQString &pattern, TQWidget *parent);
};
// Create the dialog.
-KFindNextDialog::KFindNextDialog(const QString &pattern, QWidget *parent) :
+KFindNextDialog::KFindNextDialog(const TQString &pattern, TQWidget *parent) :
KDialogBase(parent, 0, false, // non-modal!
i18n("Find Next"),
User1 | Close,
@@ -50,7 +50,7 @@ KFindNextDialog::KFindNextDialog(const QString &pattern, QWidget *parent) :
false,
KStdGuiItem::find())
{
- setMainWidget( new QLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
+ setMainWidget( new TQLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
}
////
@@ -92,39 +92,39 @@ struct KFind::Private
struct Data
{
Data() : id(-1), dirty(false) { }
- Data(int id, const QString &text, bool dirty = false) :
+ Data(int id, const TQString &text, bool dirty = false) :
id(id),
text(text),
dirty(dirty)
{ }
int id;
- QString text;
+ TQString text;
bool dirty;
};
- QGuardedPtr<QWidget> findDialog;
+ TQGuardedPtr<TQWidget> findDialog;
bool patternChanged;
- QString matchedPattern;
- QDict<Match> incrementalPath;
+ TQString matchedPattern;
+ TQDict<Match> incrementalPath;
Match * emptyMatch;
- QPtrVector<Data> data;
+ TQPtrVector<Data> data;
int currentId;
bool customIds;
};
////
-KFind::KFind( const QString &pattern, long options, QWidget *parent )
- : QObject( parent )
+KFind::KFind( const TQString &pattern, long options, TQWidget *parent )
+ : TQObject( parent )
{
d = new KFind::Private;
m_options = options;
init( pattern );
}
-KFind::KFind( const QString &pattern, long options, QWidget *parent, QWidget *findDialog )
- : QObject( parent )
+KFind::KFind( const TQString &pattern, long options, TQWidget *parent, TQWidget *findDialog )
+ : TQObject( parent )
{
d = new KFind::Private;
d->findDialog = findDialog;
@@ -132,7 +132,7 @@ KFind::KFind( const QString &pattern, long options, QWidget *parent, QWidget *fi
init( pattern );
}
-void KFind::init( const QString& pattern )
+void KFind::init( const TQString& pattern )
{
m_matches = 0;
m_pattern = pattern;
@@ -141,7 +141,7 @@ void KFind::init( const QString& pattern )
m_index = INDEX_NOMATCH;
m_lastResult = NoMatch;
if (m_options & KFindDialog::RegularExpression)
- m_regExp = new QRegExp(pattern, m_options & KFindDialog::CaseSensitive);
+ m_regExp = new TQRegExp(pattern, m_options & KFindDialog::CaseSensitive);
else {
m_regExp = 0;
}
@@ -166,12 +166,12 @@ bool KFind::needData() const
return m_index == INDEX_NOMATCH;
}
-void KFind::setData( const QString& data, int startPos )
+void KFind::setData( const TQString& data, int startPos )
{
setData( -1, data, startPos );
}
-void KFind::setData( int id, const QString& data, int startPos )
+void KFind::setData( int id, const TQString& data, int startPos )
{
// cache the data for incremental find
if ( m_options & KFindDialog::FindIncremental )
@@ -212,8 +212,8 @@ KDialogBase* KFind::findNextDialog( bool create )
if ( !m_dialog && create )
{
m_dialog = new KFindNextDialog( m_pattern, parentWidget() );
- connect( m_dialog, SIGNAL( user1Clicked() ), this, SLOT( slotFindNext() ) );
- connect( m_dialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) );
+ connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotFindNext() ) );
+ connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
}
return m_dialog;
}
@@ -244,7 +244,7 @@ KFind::Result KFind::find()
if ( m_pattern.length() < d->matchedPattern.length() )
{
Private::Match *match = m_pattern.isEmpty() ? d->emptyMatch : d->incrementalPath[m_pattern];
- QString previousPattern = d->matchedPattern;
+ TQString previousPattern = d->matchedPattern;
d->matchedPattern = m_pattern;
if ( match != 0 )
{
@@ -306,7 +306,7 @@ KFind::Result KFind::find()
if ( m_index == INDEX_NOMATCH )
return NoMatch;
- QString temp = m_pattern;
+ TQString temp = m_pattern;
m_pattern.truncate(d->matchedPattern.length() + 1);
d->matchedPattern = temp;
}
@@ -409,7 +409,7 @@ KFind::Result KFind::find()
{
if ( m_options & KFindDialog::FindIncremental )
{
- QString temp = m_pattern;
+ TQString temp = m_pattern;
temp.truncate(temp.length() - 1);
m_pattern = d->matchedPattern;
d->matchedPattern = temp;
@@ -432,7 +432,7 @@ void KFind::startNewIncrementalSearch()
Private::Match *match = d->emptyMatch;
if(match == 0)
{
- m_text = QString::null;
+ m_text = TQString::null;
m_index = 0;
d->currentId = 0;
}
@@ -447,16 +447,16 @@ void KFind::startNewIncrementalSearch()
delete d->emptyMatch;
d->emptyMatch = 0;
d->matchedPattern = m_pattern;
- m_pattern = QString::null;
+ m_pattern = TQString::null;
}
// static
-int KFind::find(const QString &text, const QString &pattern, int index, long options, int *matchedLength)
+int KFind::find(const TQString &text, const TQString &pattern, int index, long options, int *matchedLength)
{
// Handle regular expressions in the appropriate way.
if (options & KFindDialog::RegularExpression)
{
- QRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
+ TQRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
return find(text, regExp, index, options, matchedLength);
}
@@ -522,7 +522,7 @@ int KFind::find(const QString &text, const QString &pattern, int index, long opt
}
// static
-int KFind::find(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
+int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedLength)
{
if (options & KFindDialog::WholeWordsOnly)
{
@@ -588,12 +588,12 @@ int KFind::find(const QString &text, const QRegExp &pattern, int index, long opt
return index;
}
-bool KFind::isInWord(QChar ch)
+bool KFind::isInWord(TQChar ch)
{
return ch.isLetter() || ch.isDigit() || ch == '_';
}
-bool KFind::isWholeWords(const QString &text, int starts, int matchedLength)
+bool KFind::isWholeWords(const TQString &text, int starts, int matchedLength)
{
if ((starts == 0) || (!isInWord(text[starts - 1])))
{
@@ -618,11 +618,11 @@ void KFind::slotDialogClosed()
void KFind::displayFinalDialog() const
{
- QString message;
+ TQString message;
if ( numMatches() )
message = i18n( "1 match found.", "%n matches found.", numMatches() );
else
- message = i18n("<qt>No matches found for '<b>%1</b>'.</qt>").arg(QStyleSheet::escape(m_pattern));
+ message = i18n("<qt>No matches found for '<b>%1</b>'.</qt>").arg(TQStyleSheet::escape(m_pattern));
KMessageBox::information(dialogsParent(), message);
}
@@ -636,13 +636,13 @@ bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
displayFinalDialog();
return false;
}
- QString message;
+ TQString message;
if ( showNumMatches )
{
if ( numMatches() )
message = i18n( "1 match found.", "%n matches found.", numMatches() );
else
- message = i18n("No matches found for '<b>%1</b>'.").arg(QStyleSheet::escape(m_pattern));
+ message = i18n("No matches found for '<b>%1</b>'.").arg(TQStyleSheet::escape(m_pattern));
}
else
{
@@ -659,8 +659,8 @@ bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
i18n("Continue from the end?")
: i18n("Continue from the beginning?");
- int ret = KMessageBox::questionYesNo( dialogsParent(), QString("<qt>")+message+QString("</qt>"),
- QString::null, KStdGuiItem::cont(), KStdGuiItem::stop() );
+ int ret = KMessageBox::questionYesNo( dialogsParent(), TQString("<qt>")+message+TQString("</qt>"),
+ TQString::null, KStdGuiItem::cont(), KStdGuiItem::stop() );
bool yes = ( ret == KMessageBox::Yes );
if ( yes )
const_cast<KFind*>(this)->m_options &= ~KFindDialog::FromCursor; // clear FromCursor option
@@ -673,7 +673,7 @@ void KFind::setOptions( long options )
delete m_regExp;
if (m_options & KFindDialog::RegularExpression)
- m_regExp = new QRegExp(m_pattern, m_options & KFindDialog::CaseSensitive);
+ m_regExp = new TQRegExp(m_pattern, m_options & KFindDialog::CaseSensitive);
else
m_regExp = 0;
}
@@ -690,7 +690,7 @@ int KFind::index() const
return m_index;
}
-void KFind::setPattern( const QString& pattern )
+void KFind::setPattern( const TQString& pattern )
{
if ( m_options & KFindDialog::FindIncremental && m_pattern != pattern )
d->patternChanged = true;
@@ -699,12 +699,12 @@ void KFind::setPattern( const QString& pattern )
setOptions( options() ); // rebuild m_regExp if necessary
}
-QWidget* KFind::dialogsParent() const
+TQWidget* KFind::dialogsParent() const
{
// If the find dialog is still up, it should get the focus when closing a message box
// Otherwise, maybe the "find next?" dialog is up
// Otherwise, the "view" is the parent.
- return d->findDialog ? (QWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
+ return d->findDialog ? (TQWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
}
#include "kfind.moc"
diff --git a/kutils/kfind.h b/kutils/kfind.h
index a2159f6b1..502708dd1 100644
--- a/kutils/kfind.h
+++ b/kutils/kfind.h
@@ -22,7 +22,7 @@
#define KFIND_H
#include <kdialogbase.h>
-#include <qrect.h>
+#include <tqrect.h>
/**
* @ingroup main
@@ -50,11 +50,11 @@
*
* // Connect highlight signal to code which handles highlighting
* // of found text.
- * connect( m_find, SIGNAL( highlight( const QString &, int, int ) ),
- * this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ * connect( m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
* // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_find, SIGNAL( findNext() ),
- * this, SLOT( slotFindNext() ) );
+ * connect( m_find, TQT_SIGNAL( findNext() ),
+ * this, TQT_SLOT( slotFindNext() ) );
* \endcode
*
* If you are using a non-modal find dialog (the recommended new way
@@ -114,7 +114,7 @@ public:
* @param options Options for the find dialog. @see KFindDialog.
* @param parent The parent widget.
*/
- KFind(const QString &pattern, long options, QWidget *parent);
+ KFind(const TQString &pattern, long options, TQWidget *parent);
/**
* This is the recommended constructor if you also use KFindDialog (non-modal).
@@ -126,7 +126,7 @@ public:
* @param parent The parent widget.
* @param findDialog A pointer to the KFindDialog object.
*/
- KFind(const QString &pattern, long options, QWidget *parent, QWidget* findDialog);
+ KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* findDialog);
/**
* Destructor.
@@ -158,7 +158,7 @@ public:
* means "process all the data", i.e. either 0 or data.length()-1 depending
* on FindBackwards.
*/
- void setData( const QString& data, int startPos = -1 );
+ void setData( const TQString& data, int startPos = -1 );
/**
* Call this when needData returns @c true, before calling find(). The use of
@@ -173,7 +173,7 @@ public:
*
* @since 3.3
*/
- void setData( int id, const QString& data, int startPos = -1 );
+ void setData( int id, const TQString& data, int startPos = -1 );
/**
* Walk the text fragment (e.g. text-processor line, kspread cell) looking for matches.
@@ -205,13 +205,13 @@ public:
/**
* @return the pattern we're currently looking for
*/
- QString pattern() const { return m_pattern; }
+ TQString pattern() const { return m_pattern; }
/**
* Change the pattern we're looking for
* @param pattern The new pattern.
*/
- void setPattern( const QString& pattern );
+ void setPattern( const TQString& pattern );
/**
* Return the number of matches found (i.e. the number of times
@@ -240,7 +240,7 @@ public:
* @param index The starting index where the candidate match was found
* @param matchedlength The length of the candidate match
*/
- virtual bool validateMatch( const QString & text, int index, int matchedlength ) {
+ virtual bool validateMatch( const TQString & text, int index, int matchedlength ) {
Q_UNUSED(text); Q_UNUSED(index); Q_UNUSED(matchedlength); return true; }
/**
@@ -274,7 +274,7 @@ public:
* @param matchedlength The length of the string that was matched
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int find( const QString &text, const QString &pattern, int index, long options, int *matchedlength );
+ static int find( const TQString &text, const TQString &pattern, int index, long options, int *matchedlength );
/**
* Search the given regular expression, and returns whether a match was found. If one is,
@@ -289,7 +289,7 @@ public:
* @param matchedlength The length of the string that was matched
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int find( const QString &text, const QRegExp &pattern, int index, long options, int *matchedlength );
+ static int find( const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedlength );
/**
* Displays the final dialog saying "no match was found", if that was the case.
@@ -344,7 +344,7 @@ signals:
* @param matchedLength The length of the matched text.
* @see setData()
*/
- void highlight(const QString &text, int matchingIndex, int matchedLength);
+ void highlight(const TQString &text, int matchingIndex, int matchedLength);
/**
* Connect to this signal to implement highlighting of found text during the find
@@ -388,8 +388,8 @@ signals:
protected:
- QWidget* parentWidget() const { return (QWidget *)parent(); }
- QWidget* dialogsParent() const;
+ TQWidget* parentWidget() const { return (TQWidget *)parent(); }
+ TQWidget* dialogsParent() const;
protected slots:
@@ -397,22 +397,22 @@ protected slots:
void slotDialogClosed();
private:
- void init( const QString& pattern );
+ void init( const TQString& pattern );
void startNewIncrementalSearch();
- static bool isInWord( QChar ch );
- static bool isWholeWords( const QString &text, int starts, int matchedLength );
+ static bool isInWord( TQChar ch );
+ static bool isWholeWords( const TQString &text, int starts, int matchedLength );
friend class KReplace;
- QString m_pattern;
- QRegExp *m_regExp;
+ TQString m_pattern;
+ TQRegExp *m_regExp;
KDialogBase* m_dialog;
long m_options;
unsigned m_matches;
- QString m_text; // the text set by setData
+ TQString m_text; // the text set by setData
int m_index;
int m_matchedLength;
bool m_dialogClosed;
diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp
index 7a18111a3..7cc6dff46 100644
--- a/kutils/kfinddialog.cpp
+++ b/kutils/kfinddialog.cpp
@@ -19,20 +19,20 @@
*/
#include "kfinddialog.h"
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <assert.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kregexpeditorinterface.h>
#include <kparts/componentfactory.h>
@@ -43,15 +43,15 @@ public:
KFindDialogPrivate() : m_regexpDialog(0),
m_regexpDialogQueryDone(false),
m_enabled(WholeWordsOnly | FromCursor | SelectedText | CaseSensitive | FindBackwards | RegularExpression), m_initialShowDone(false) {}
- QDialog* m_regexpDialog;
+ TQDialog* m_regexpDialog;
bool m_regexpDialogQueryDone;
long m_enabled; // uses Options to define which search options are enabled
bool m_initialShowDone;
- QStringList findStrings;
- QString pattern;
+ TQStringList findStrings;
+ TQString pattern;
};
-KFindDialog::KFindDialog(QWidget *parent, const char *name, long options, const QStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
KDialogBase(parent, name, true, i18n("Find Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -62,7 +62,7 @@ KFindDialog::KFindDialog(QWidget *parent, const char *name, long options, const
setButtonCancel( KStdGuiItem::close() );
}
-KFindDialog::KFindDialog(bool modal, QWidget *parent, const char *name, long options, const QStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(bool modal, TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
KDialogBase(parent, name, modal, i18n("Find Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -73,7 +73,7 @@ KFindDialog::KFindDialog(bool modal, QWidget *parent, const char *name, long opt
setButtonCancel( KStdGuiItem::close() );
}
-KFindDialog::KFindDialog(QWidget *parent, const char *name, bool /*forReplace*/) :
+KFindDialog::KFindDialog(TQWidget *parent, const char *name, bool /*forReplace*/) :
KDialogBase(parent, name, true, i18n("Replace Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -87,48 +87,48 @@ KFindDialog::~KFindDialog()
delete d;
}
-QWidget *KFindDialog::findExtension()
+TQWidget *KFindDialog::findExtension()
{
if (!m_findExtension)
{
- m_findExtension = new QWidget(m_findGrp);
+ m_findExtension = new TQWidget(m_findGrp);
m_findLayout->addMultiCellWidget(m_findExtension, 3, 3, 0, 1);
}
return m_findExtension;
}
-QStringList KFindDialog::findHistory() const
+TQStringList KFindDialog::findHistory() const
{
return m_find->historyItems();
}
-void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool hasSelection)
+void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool hasSelection)
{
- QVBoxLayout *topLayout;
- QGridLayout *optionsLayout;
+ TQVBoxLayout *topLayout;
+ TQGridLayout *optionsLayout;
// Create common parts of dialog.
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- topLayout = new QVBoxLayout(page);
+ topLayout = new TQVBoxLayout(page);
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( 0 );
- m_findGrp = new QGroupBox(0, Qt::Vertical, i18n("Find"), page);
+ m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page);
m_findGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_findGrp->layout()->setMargin( KDialog::marginHint() );
- m_findLayout = new QGridLayout(m_findGrp->layout());
+ m_findLayout = new TQGridLayout(m_findGrp->layout());
m_findLayout->setSpacing( KDialog::spacingHint() );
// m_findLayout->setMargin( KDialog::marginHint() );
- m_findLabel = new QLabel(i18n("&Text to find:"), m_findGrp);
+ m_findLabel = new TQLabel(i18n("&Text to find:"), m_findGrp);
m_find = new KHistoryCombo(true, m_findGrp);
m_find->setMaxCount(10);
m_find->setDuplicatesEnabled(false);
- m_regExp = new QCheckBox(i18n("Regular e&xpression"), m_findGrp);
- m_regExpItem = new QPushButton(i18n("&Edit..."), m_findGrp);
+ m_regExp = new TQCheckBox(i18n("Regular e&xpression"), m_findGrp);
+ m_regExpItem = new TQPushButton(i18n("&Edit..."), m_findGrp);
m_regExpItem->setEnabled(false);
m_findLayout->addWidget(m_findLabel, 0, 0);
@@ -137,19 +137,19 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_findLayout->addWidget(m_regExpItem, 2, 1);
topLayout->addWidget(m_findGrp);
- m_replaceGrp = new QGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
+ m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_replaceGrp->layout()->setMargin( KDialog::marginHint() );
- m_replaceLayout = new QGridLayout(m_replaceGrp->layout());
+ m_replaceLayout = new TQGridLayout(m_replaceGrp->layout());
m_replaceLayout->setSpacing( KDialog::spacingHint() );
// m_replaceLayout->setMargin( KDialog::marginHint() );
- m_replaceLabel = new QLabel(i18n("Replace&ment text:"), m_replaceGrp);
+ m_replaceLabel = new TQLabel(i18n("Replace&ment text:"), m_replaceGrp);
m_replace = new KHistoryCombo(true, m_replaceGrp);
m_replace->setMaxCount(10);
m_replace->setDuplicatesEnabled(false);
- m_backRef = new QCheckBox(i18n("Use p&laceholders"), m_replaceGrp);
- m_backRefItem = new QPushButton(i18n("Insert Place&holder"), m_replaceGrp);
+ m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_replaceGrp);
+ m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_replaceGrp);
m_backRefItem->setEnabled(false);
m_replaceLayout->addWidget(m_replaceLabel, 0, 0);
@@ -158,25 +158,25 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_replaceLayout->addWidget(m_backRefItem, 2, 1);
topLayout->addWidget(m_replaceGrp);
- m_optionGrp = new QGroupBox(0, Qt::Vertical, i18n("Options"), page);
+ m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page);
m_optionGrp->layout()->setSpacing(KDialog::spacingHint());
// m_optionGrp->layout()->setMargin(KDialog::marginHint());
- optionsLayout = new QGridLayout(m_optionGrp->layout());
+ optionsLayout = new TQGridLayout(m_optionGrp->layout());
optionsLayout->setSpacing( KDialog::spacingHint() );
// optionsLayout->setMargin( KDialog::marginHint() );
- m_caseSensitive = new QCheckBox(i18n("C&ase sensitive"), m_optionGrp);
- m_wholeWordsOnly = new QCheckBox(i18n("&Whole words only"), m_optionGrp);
- m_fromCursor = new QCheckBox(i18n("From c&ursor"), m_optionGrp);
- m_findBackwards = new QCheckBox(i18n("Find &backwards"), m_optionGrp);
- m_selectedText = new QCheckBox(i18n("&Selected text"), m_optionGrp);
+ m_caseSensitive = new TQCheckBox(i18n("C&ase sensitive"), m_optionGrp);
+ m_wholeWordsOnly = new TQCheckBox(i18n("&Whole words only"), m_optionGrp);
+ m_fromCursor = new TQCheckBox(i18n("From c&ursor"), m_optionGrp);
+ m_findBackwards = new TQCheckBox(i18n("Find &backwards"), m_optionGrp);
+ m_selectedText = new TQCheckBox(i18n("&Selected text"), m_optionGrp);
setHasSelection( hasSelection );
// If we have a selection, we make 'find in selection' default
// and if we don't, then the option has to be unchecked, obviously.
m_selectedText->setChecked( hasSelection );
slotSelectedTextToggled( hasSelection );
- m_promptOnReplace = new QCheckBox(i18n("&Prompt on replace"), m_optionGrp);
+ m_promptOnReplace = new TQCheckBox(i18n("&Prompt on replace"), m_optionGrp);
m_promptOnReplace->setChecked( true );
optionsLayout->addWidget(m_caseSensitive, 0, 0);
@@ -192,13 +192,13 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_placeholders = 0L;
// signals and slots connections
- connect(m_selectedText, SIGNAL(toggled(bool)), this, SLOT(slotSelectedTextToggled(bool)));
- connect(m_regExp, SIGNAL(toggled(bool)), m_regExpItem, SLOT(setEnabled(bool)));
- connect(m_backRef, SIGNAL(toggled(bool)), m_backRefItem, SLOT(setEnabled(bool)));
- connect(m_regExpItem, SIGNAL(clicked()), this, SLOT(showPatterns()));
- connect(m_backRefItem, SIGNAL(clicked()), this, SLOT(showPlaceholders()));
+ connect(m_selectedText, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectedTextToggled(bool)));
+ connect(m_regExp, TQT_SIGNAL(toggled(bool)), m_regExpItem, TQT_SLOT(setEnabled(bool)));
+ connect(m_backRef, TQT_SIGNAL(toggled(bool)), m_backRefItem, TQT_SLOT(setEnabled(bool)));
+ connect(m_regExpItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPatterns()));
+ connect(m_backRefItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPlaceholders()));
- connect(m_find, SIGNAL(textChanged ( const QString & )),this, SLOT(textSearchChanged( const QString & )));
+ connect(m_find, TQT_SIGNAL(textChanged ( const TQString & )),this, TQT_SLOT(textSearchChanged( const TQString & )));
// tab order
setTabOrder(m_find, m_regExp);
@@ -228,7 +228,7 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
enableButtonOK( !pattern().isEmpty() );
if (forReplace)
{
- setButtonOK(KGuiItem( i18n("&Replace"), QString::null,
+ setButtonOK(KGuiItem( i18n("&Replace"), TQString::null,
i18n("Start replace"),
i18n("<qt>If you press the <b>Replace</b> button, the text you entered "
"above is searched for within the document and any occurrence is "
@@ -243,45 +243,45 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
}
// QWhatsthis texts
- QWhatsThis::add ( m_find, i18n(
+ TQWhatsThis::add ( m_find, i18n(
"Enter a pattern to search for, or select a previous pattern from "
"the list.") );
- QWhatsThis::add ( m_regExp, i18n(
+ TQWhatsThis::add ( m_regExp, i18n(
"If enabled, search for a regular expression.") );
- QWhatsThis::add ( m_regExpItem, i18n(
+ TQWhatsThis::add ( m_regExpItem, i18n(
"Click here to edit your regular expression using a graphical editor.") );
- QWhatsThis::add ( m_replace, i18n(
+ TQWhatsThis::add ( m_replace, i18n(
"Enter a replacement string, or select a previous one from the list.") );
- QWhatsThis::add( m_backRef, i18n(
+ TQWhatsThis::add( m_backRef, i18n(
"<qt>If enabled, any occurrence of <code><b>\\N</b></code>, where "
"<code><b>N</b></code> is a integer number, will be replaced with "
"the corresponding capture (\"parenthesized substring\") from the "
"pattern.<p>To include (a literal <code><b>\\N</b></code> in your "
"replacement, put an extra backslash in front of it, like "
"<code><b>\\\\N</b></code>.</qt>") );
- QWhatsThis::add ( m_backRefItem, i18n(
+ TQWhatsThis::add ( m_backRefItem, i18n(
"Click for a menu of available captures.") );
- QWhatsThis::add ( m_wholeWordsOnly, i18n(
+ TQWhatsThis::add ( m_wholeWordsOnly, i18n(
"Require word boundaries in both ends of a match to succeed.") );
- QWhatsThis::add ( m_fromCursor, i18n(
+ TQWhatsThis::add ( m_fromCursor, i18n(
"Start searching at the current cursor location rather than at the top.") );
- QWhatsThis::add ( m_selectedText, i18n(
+ TQWhatsThis::add ( m_selectedText, i18n(
"Only search within the current selection.") );
- QWhatsThis::add ( m_caseSensitive, i18n(
+ TQWhatsThis::add ( m_caseSensitive, i18n(
"Perform a case sensitive search: entering the pattern "
"'Joe' will not match 'joe' or 'JOE', only 'Joe'.") );
- QWhatsThis::add ( m_findBackwards, i18n(
+ TQWhatsThis::add ( m_findBackwards, i18n(
"Search backwards.") );
- QWhatsThis::add ( m_promptOnReplace, i18n(
+ TQWhatsThis::add ( m_promptOnReplace, i18n(
"Ask before replacing each match found.") );
}
-void KFindDialog::textSearchChanged( const QString & text)
+void KFindDialog::textSearchChanged( const TQString & text)
{
enableButtonOK( !text.isEmpty() );
}
-void KFindDialog::showEvent( QShowEvent *e )
+void KFindDialog::showEvent( TQShowEvent *e )
{
if ( !d->m_initialShowDone )
{
@@ -289,11 +289,11 @@ void KFindDialog::showEvent( QShowEvent *e )
kdDebug() << "showEvent\n";
if (!d->findStrings.isEmpty())
setFindHistory(d->findStrings);
- d->findStrings = QStringList();
+ d->findStrings = TQStringList();
if (!d->pattern.isEmpty()) {
m_find->lineEdit()->setText( d->pattern );
m_find->lineEdit()->selectAll();
- d->pattern = QString::null;
+ d->pattern = TQString::null;
}
}
KDialogBase::showEvent(e);
@@ -318,12 +318,12 @@ long KFindDialog::options() const
return options;
}
-QString KFindDialog::pattern() const
+TQString KFindDialog::pattern() const
{
return m_find->currentText();
}
-void KFindDialog::setPattern (const QString &pattern)
+void KFindDialog::setPattern (const TQString &pattern)
{
m_find->lineEdit()->setText( pattern );
m_find->lineEdit()->selectAll();
@@ -331,7 +331,7 @@ void KFindDialog::setPattern (const QString &pattern)
kdDebug() << "setPattern " << pattern<<endl;
}
-void KFindDialog::setFindHistory(const QStringList &strings)
+void KFindDialog::setFindHistory(const TQStringList &strings)
{
if (strings.count() > 0)
{
@@ -423,7 +423,7 @@ void KFindDialog::showPatterns()
{
if ( !d->m_regexpDialogQueryDone )
{
- d->m_regexpDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ d->m_regexpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
d->m_regexpDialogQueryDone = true;
}
@@ -433,7 +433,7 @@ void KFindDialog::showPatterns()
assert( iface );
iface->setRegExp( pattern() );
- if ( d->m_regexpDialog->exec() == QDialog::Accepted )
+ if ( d->m_regexpDialog->exec() == TQDialog::Accepted )
setPattern( iface->regExp() );
}
else // No complete regexp-editor available, bring up the old popupmenu
@@ -465,7 +465,7 @@ void KFindDialog::showPatterns()
// Populate the popup menu.
if (!m_patterns)
{
- m_patterns = new QPopupMenu(this);
+ m_patterns = new TQPopupMenu(this);
for (i = 0; (unsigned)i < sizeof(items) / sizeof(items[0]); i++)
{
m_patterns->insertItem(i18n(items[i].description), i, i);
@@ -476,7 +476,7 @@ void KFindDialog::showPatterns()
i = m_patterns->exec(m_regExpItem->mapToGlobal(m_regExpItem->rect().bottomLeft()));
if (i != -1)
{
- QLineEdit *editor = m_find->lineEdit();
+ TQLineEdit *editor = m_find->lineEdit();
editor->insert(items[i].regExp);
editor->setCursorPosition(editor->cursorPosition() + items[i].cursorAdjustment);
@@ -491,16 +491,16 @@ void KFindDialog::showPlaceholders()
// Populate the popup menu.
if (!m_placeholders)
{
- m_placeholders = new QPopupMenu(this);
- connect( m_placeholders, SIGNAL(aboutToShow()), this, SLOT(slotPlaceholdersAboutToShow()) );
+ m_placeholders = new TQPopupMenu(this);
+ connect( m_placeholders, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPlaceholdersAboutToShow()) );
}
// Insert the selection into the edit control.
int i = m_placeholders->exec(m_backRefItem->mapToGlobal(m_backRefItem->rect().bottomLeft()));
if (i != -1)
{
- QLineEdit *editor = m_replace->lineEdit();
- editor->insert( QString("\\%1").arg( i ) );
+ TQLineEdit *editor = m_replace->lineEdit();
+ editor->insert( TQString("\\%1").arg( i ) );
}
}
@@ -509,7 +509,7 @@ void KFindDialog::slotPlaceholdersAboutToShow()
m_placeholders->clear();
m_placeholders->insertItem( i18n("Complete Match"), 0 );
- QRegExp r( pattern() );
+ TQRegExp r( pattern() );
uint n = r.numCaptures();
for ( uint i=0; i < n; i++ )
m_placeholders->insertItem( i18n("Captured Text (%1)").arg( i+1 ), i+1 );
@@ -527,7 +527,7 @@ void KFindDialog::slotOk()
if (m_regExp->isChecked())
{
// Check for a valid regular expression.
- QRegExp regExp(pattern());
+ TQRegExp regExp(pattern());
if (!regExp.isValid())
{
diff --git a/kutils/kfinddialog.h b/kutils/kfinddialog.h
index ed63d5551..ebb9ff559 100644
--- a/kutils/kfinddialog.h
+++ b/kutils/kfinddialog.h
@@ -49,7 +49,7 @@ class QCheckBox;
*
* \code
* KFindDialog dlg(....)
- * if ( dlg.exec() != QDialog::Accepted )
+ * if ( dlg.exec() != TQDialog::Accepted )
* return;
*
* // proceed with KFind from here
@@ -62,7 +62,7 @@ class QCheckBox;
* else
* {
* m_findDia = new KFindDialog(false,...);
- * connect( m_findDia, SIGNAL(okClicked()), this, SLOT(findTextNext()) );
+ * connect( m_findDia, TQT_SIGNAL(okClicked()), this, TQT_SLOT(findTextNext()) );
* }
* \endcode
* Don't forget to delete and reset m_findDia when closed.
@@ -107,8 +107,8 @@ public:
* @param findStrings The find history, see findHistory()
* @param hasSelection Whether a selection exists
*/
- KFindDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(), bool hasSelection = false );
+ KFindDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
// KDE4: fix ambiguity with private constructor
// Maybe remove options (there's setOptions) and findStrings (setFindHistory) and hasSelection (setHasSelection)
@@ -122,8 +122,8 @@ public:
* @param findStrings The find history, see findHistory()
* @param hasSelection Whether a selection exists
*/
- KFindDialog( bool modal, QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(), bool hasSelection = false );
+ KFindDialog( bool modal, TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
// KDE4: consider simplifying
/**
@@ -139,7 +139,7 @@ public:
* @param history The find history.
* @see findHistory
*/
- void setFindHistory( const QStringList &history );
+ void setFindHistory( const TQStringList &history );
/**
* Returns the list of history items.
@@ -147,7 +147,7 @@ public:
* @return The find history.
* @see setFindHistory
*/
- QStringList findHistory() const;
+ TQStringList findHistory() const;
/**
* Enable/disable the 'search in selection' option, depending
@@ -227,22 +227,22 @@ public:
* Returns the pattern to find.
* @return The search text.
*/
- QString pattern() const;
+ TQString pattern() const;
/**
* Sets the pattern to find.
* @param pattern The new search pattern.
*/
- void setPattern ( const QString &pattern );
+ void setPattern ( const TQString &pattern );
/**
* Returns an empty widget which the user may fill with additional UI
* elements as required. The widget occupies the width of the dialog,
* and is positioned immediately below the regular expression support
* widgets for the pattern string.
- * @return An extensible QWidget.
+ * @return An extensible TQWidget.
*/
- QWidget *findExtension();
+ TQWidget *findExtension();
protected slots:
@@ -250,10 +250,10 @@ protected slots:
void slotSelectedTextToggled(bool);
void showPatterns();
void showPlaceholders();
- void textSearchChanged( const QString &);
+ void textSearchChanged( const TQString &);
protected:
- virtual void showEvent ( QShowEvent * );
+ virtual void showEvent ( TQShowEvent * );
private slots:
/**
@@ -264,22 +264,22 @@ private slots:
private:
- QGroupBox *m_findGrp;
- QLabel *m_findLabel;
+ TQGroupBox *m_findGrp;
+ TQLabel *m_findLabel;
KHistoryCombo *m_find;
- QCheckBox *m_regExp;
- QPushButton *m_regExpItem;
- QGridLayout *m_findLayout;
- QWidget *m_findExtension;
+ TQCheckBox *m_regExp;
+ TQPushButton *m_regExpItem;
+ TQGridLayout *m_findLayout;
+ TQWidget *m_findExtension;
- QGroupBox *m_optionGrp;
- QCheckBox *m_wholeWordsOnly;
- QCheckBox *m_fromCursor;
- QCheckBox *m_selectedText;
- QCheckBox *m_caseSensitive;
- QCheckBox *m_findBackwards;
+ TQGroupBox *m_optionGrp;
+ TQCheckBox *m_wholeWordsOnly;
+ TQCheckBox *m_fromCursor;
+ TQCheckBox *m_selectedText;
+ TQCheckBox *m_caseSensitive;
+ TQCheckBox *m_findBackwards;
- QPopupMenu *m_patterns;
+ TQPopupMenu *m_patterns;
// Our dirty little secret is that we also implement the "replace" dialog. But we
// keep that fact hidden from all but our friends.
@@ -292,20 +292,20 @@ private:
*
* @param forReplace Is this a replace dialog?
*/
- KFindDialog( QWidget *parent, const char *name, bool forReplace );
- void init( bool forReplace, const QStringList &findStrings, bool hasSelection );
+ KFindDialog( TQWidget *parent, const char *name, bool forReplace );
+ void init( bool forReplace, const TQStringList &findStrings, bool hasSelection );
- QGroupBox *m_replaceGrp;
- QLabel *m_replaceLabel;
+ TQGroupBox *m_replaceGrp;
+ TQLabel *m_replaceLabel;
KHistoryCombo *m_replace;
- QCheckBox* m_backRef;
- QPushButton* m_backRefItem;
- QGridLayout *m_replaceLayout;
- QWidget *m_replaceExtension;
+ TQCheckBox* m_backRef;
+ TQPushButton* m_backRefItem;
+ TQGridLayout *m_replaceLayout;
+ TQWidget *m_replaceExtension;
- QCheckBox* m_promptOnReplace;
+ TQCheckBox* m_promptOnReplace;
- QPopupMenu *m_placeholders;
+ TQPopupMenu *m_placeholders;
// Binary compatible extensibility.
class KFindDialogPrivate;
diff --git a/kutils/kmultitabbar.cpp b/kutils/kmultitabbar.cpp
index 18a123717..a9b648736 100644
--- a/kutils/kmultitabbar.cpp
+++ b/kutils/kmultitabbar.cpp
@@ -26,28 +26,28 @@
#include "kmultitabbar.moc"
#include "kmultitabbar_p.h"
#include "kmultitabbar_p.moc"
-#include <qbutton.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
#define NEARBYINT(i) ((int(float(i) + 0.5)))
class KMultiTabBarTabPrivate {
public:
- QPixmap pix;
+ TQPixmap pix;
};
-KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent)
+KMultiTabBarInternal::KMultiTabBarInternal(TQWidget *parent, KMultiTabBar::KMultiTabBarMode bm):TQScrollView(parent)
{
m_expandedTabSize=-1;
m_showActiveTabTexts=false;
@@ -57,16 +57,16 @@ KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMulti
setVScrollBarMode(AlwaysOff);
if (bm==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedHeight(24);
setFixedHeight(24);
@@ -92,15 +92,15 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
} else if (mainLayout==0) {
if (m_barMode==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
box->setFixedHeight(24);
setFixedHeight(24);
}
@@ -113,9 +113,9 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
viewport()->repaint();
}
-void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph )
+void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph )
{
- QScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
+ TQScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
if (m_position==KMultiTabBar::Right)
{
@@ -159,12 +159,12 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy
}
-void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::contentsMousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
-void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
@@ -186,11 +186,11 @@ void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
} else {diff=0; }
-void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) {
+void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) {
/* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
- if (ev) QScrollView::resizeEvent(ev);
+ if (ev) TQScrollView::resizeEvent(ev);
if ( (m_style==KMultiTabBar::KDEV3) ||
(m_style==KMultiTabBar::KDEV3ICON) ){
@@ -328,18 +328,18 @@ void KMultiTabBarInternal::showActiveTabTexts(bool show)
KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const
{
- for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
}
-bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) {
- if (e->type()==QEvent::Resize) resizeEvent(0);
+bool KMultiTabBarInternal::eventFilter(TQObject *, TQEvent *e) {
+ if (e->type()==TQEvent::Resize) resizeEvent(0);
return false;
}
-int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text)
+int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& text)
{
KMultiTabBarTab *tab;
m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style));
@@ -381,9 +381,9 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p
viewport()->repaint();
}
-KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setIconSet(pic);
setText(text);
@@ -393,13 +393,13 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, Q
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
-KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setText(text);
m_position=pos;
@@ -408,8 +408,8 @@ KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
KMultiTabBarButton::~KMultiTabBarButton() {
@@ -419,11 +419,11 @@ int KMultiTabBarButton::id() const{
return m_id;
}
-void KMultiTabBarButton::setText(const QString& text)
+void KMultiTabBarButton::setText(const TQString& text)
{
- QPushButton::setText(text);
+ TQPushButton::setText(text);
m_text=text;
- QToolTip::add(this,text);
+ TQToolTip::add(this,text);
}
void KMultiTabBarButton::slotClicked()
@@ -443,20 +443,20 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
repaint();
}
-void KMultiTabBarButton::hideEvent( QHideEvent* he) {
- QPushButton::hideEvent(he);
+void KMultiTabBarButton::hideEvent( TQHideEvent* he) {
+ TQPushButton::hideEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-void KMultiTabBarButton::showEvent( QShowEvent* he) {
- QPushButton::showEvent(he);
+void KMultiTabBarButton::showEvent( TQShowEvent* he) {
+ TQPushButton::showEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-QSize KMultiTabBarButton::sizeHint() const
+TQSize KMultiTabBarButton::sizeHint() const
{
constPolish();
@@ -465,39 +465,39 @@ QSize KMultiTabBarButton::sizeHint() const
// calculate contents size...
#ifndef QT_NO_ICONSET
if ( iconSet() && !iconSet()->isNull() ) {
- int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height();
w += iw;
h = QMAX( h, ih );
}
#endif
if ( isMenuButton() )
- w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this);
+ w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this);
if ( pixmap() ) {
- QPixmap *pm = (QPixmap *)pixmap();
+ TQPixmap *pm = (TQPixmap *)pixmap();
w += pm->width();
h += pm->height();
} else {
- QString s( text() );
+ TQString s( text() );
bool empty = s.isEmpty();
if ( empty )
- s = QString::fromLatin1("XXXX");
- QFontMetrics fm = fontMetrics();
- QSize sz = fm.size( ShowPrefix, s );
+ s = TQString::fromLatin1("XXXX");
+ TQFontMetrics fm = fontMetrics();
+ TQSize sz = fm.size( ShowPrefix, s );
if(!empty || !w)
w += sz.width();
if(!empty || !h)
h = QMAX(h, sz.height());
}
- return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)).
- expandedTo(QApplication::globalStrut()));
+ return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)).
+ expandedTo(TQApplication::globalStrut()));
}
-KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
+KMultiTabBarTab::KMultiTabBarTab(const TQPixmap& pic, const TQString& text,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
KMultiTabBar::KMultiTabBarStyle style)
:KMultiTabBarButton(text,0,id,parent,pos,style),
m_showActiveTabText(false)
@@ -517,7 +517,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
{
if ((pos!=m_position) && ((pos==KMultiTabBar::Left) || (pos==KMultiTabBar::Right))) {
if (!d->pix.isNull()) {
- QWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ TQWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
temp.rotate(180);
d->pix=d->pix.xForm(temp);
setIconSet(d->pix);
@@ -528,23 +528,23 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
// repaint();
}
-void KMultiTabBarTab::setIcon(const QString& icon)
+void KMultiTabBarTab::setIcon(const TQString& icon)
{
- QPixmap pic=SmallIcon(icon);
+ TQPixmap pic=SmallIcon(icon);
setIcon(pic);
}
-void KMultiTabBarTab::setIcon(const QPixmap& icon)
+void KMultiTabBarTab::setIcon(const TQPixmap& icon)
{
if (m_style!=KMultiTabBar::KDEV3) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) {
- QWMatrix rotateMatrix;
+ TQWMatrix rotateMatrix;
if (m_position==KMultiTabBar::Left)
rotateMatrix.rotate(90);
else
rotateMatrix.rotate(-90);
- QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
+ TQPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
d->pix=pic;
setIconSet(pic);
} else setIconSet(icon);
@@ -568,10 +568,10 @@ void KMultiTabBarTab::updateState()
if (m_style!=KMultiTabBar::KONQSBC) {
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
- QPushButton::setText(m_text);
+ TQPushButton::setText(m_text);
} else {
- kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<<endl;
- QPushButton::setText(QString::null);
+ kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty TQString***************"<<endl;
+ TQPushButton::setText(TQString::null);
}
if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
@@ -597,13 +597,13 @@ void KMultiTabBarTab::updateState()
else
setFixedWidth(m_expandedSize);
}
- QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint);
- QApplication::flush();
+ TQApplication::sendPostedEvents(0,TQEvent::Paint | TQEvent::Move | TQEvent::Resize | TQEvent::LayoutHint);
+ TQApplication::flush();
}
int KMultiTabBarTab::neededSize()
{
- return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6);
+ return (((m_style!=KMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(m_text)+6);
}
void KMultiTabBarTab::setSize(int size)
@@ -617,41 +617,41 @@ void KMultiTabBarTab::showActiveTabText(bool show)
m_showActiveTabText=show;
}
-void KMultiTabBarTab::drawButtonLabel(QPainter *p) {
+void KMultiTabBarTab::drawButtonLabel(TQPainter *p) {
drawButton(p);
}
-void KMultiTabBarTab::drawButton(QPainter *paint)
+void KMultiTabBarTab::drawButton(TQPainter *paint)
{
if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint);
else drawButtonClassic(paint);
}
-void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
+void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
- QSize sh;
+ TQSize sh;
const int width = 36; // rotated
const int height = 24;
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
- sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
- else sh=QSize(this->width(),this->height());
+ sh=TQSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
+ else sh=TQSize(this->width(),this->height());
}
else
- sh=QSize(width,height);
+ sh=TQSize(width,height);
- QPixmap pixmap( sh.width(),height); ///,sh.height());
+ TQPixmap pixmap( sh.width(),height); ///,sh.height());
pixmap.fill(eraseColor());
- QPainter painter(&pixmap);
+ TQPainter painter(&pixmap);
- QStyle::SFlags st=QStyle::Style_Default;
+ TQStyle::SFlags st=TQStyle::Style_Default;
- st|=QStyle::Style_Enabled;
+ st|=TQStyle::Style_Enabled;
- if (isOn()) st|=QStyle::Style_On;
+ if (isOn()) st|=TQStyle::Style_On;
- style().drawControl(QStyle::CE_PushButton,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
- style().drawControl(QStyle::CE_PushButtonLabel,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
switch (m_position) {
case KMultiTabBar::Left:
@@ -667,17 +667,17 @@ void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
paint->drawPixmap(0,0,pixmap);
break;
}
-// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()),
-// colorGroup(),QStyle::Style_Enabled);
+// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
+// colorGroup(),TQStyle::Style_Enabled);
}
-void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
+void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( iconSet())
- pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
+ pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
paint->fillRect(0, 0, 24, 24, colorGroup().background());
if (!isOn())
@@ -685,7 +685,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
if (m_position==KMultiTabBar::Right)
{
- paint->fillRect(0,0,21,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,21,21,TQBrush(colorGroup().background()));
paint->setPen(colorGroup().background().dark(150));
paint->drawLine(0,22,23,22);
@@ -701,7 +701,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
{
- paint->fillRect(0,1,23,22,QBrush(colorGroup().background()));
+ paint->fillRect(0,1,23,22,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
@@ -722,7 +722,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
{
paint->setPen(colorGroup().background().dark(120));
paint->drawLine(0,23,23,23);
- paint->fillRect(0,0,23,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,23,21,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
paint->setPen(colorGroup().light());
@@ -745,20 +745,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->drawLine(0,height()-2,23,height()-2);
paint->drawLine(23,0,23,height()-1);
paint->drawLine(22,0,22,height()-1);
- paint->fillRect(0,0,21,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -769,12 +769,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if (m_position==KMultiTabBar::Top)
{
- paint->fillRect(0,0,width()-1,23,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
else
@@ -783,12 +783,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,23,width()-1,23);
paint->drawLine(0,22,width()-1,22);
- paint->fillRect(0,0,width()-1,21,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
@@ -799,20 +799,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,height()-1,23,height()-1);
paint->drawLine(0,height()-2,23,height()-2);
- paint->fillRect(0,0,23,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(-90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -832,19 +832,19 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
-KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name)
+KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *parent,const char *name):TQWidget(parent,name)
{
m_buttons.setAutoDelete(false);
if (bm==Vertical)
{
- m_l=new QVBoxLayout(this);
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true);
+ m_l=new TQVBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
// setFixedWidth(24);
}
else
{
- m_l=new QHBoxLayout(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true);
+ m_l=new TQHBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
// setFixedHeight(24);
}
m_l->setMargin(0);
@@ -856,9 +856,9 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
// setStyle(KDEV3);
//setStyle(KONQSBC);
m_l->insertWidget(0,m_internal);
- m_l->insertWidget(0,m_btnTabSep=new QFrame(this));
+ m_l->insertWidget(0,m_btnTabSep=new TQFrame(this));
m_btnTabSep->setFixedHeight(4);
- m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ m_btnTabSep->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
m_btnTabSep->setLineWidth(2);
m_btnTabSep->hide();
@@ -868,16 +868,16 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
KMultiTabBar::~KMultiTabBar() {
}
-/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&)
+/*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&)
{
(new KToolbarButton(pic,id,m_internal))->show();
return 0;
}*/
-int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&)
+int KMultiTabBar::appendButton(const TQPixmap &pic ,int id,TQPopupMenu *popup,const TQString&)
{
KMultiTabBarButton *btn;
- m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null,
+ m_buttons.append(btn= new KMultiTabBarButton(pic,TQString::null,
popup,id,this,m_position,m_internal->m_style));
m_l->insertWidget(0,btn);
btn->show();
@@ -887,7 +887,7 @@ int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,cons
void KMultiTabBar::updateSeparator() {
bool hideSep=true;
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->isVisibleTo(this)) {
hideSep=false;
break;
@@ -898,7 +898,7 @@ void KMultiTabBar::updateSeparator() {
}
-int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
+int KMultiTabBar::appendTab(const TQPixmap &pic ,int id ,const TQString& text)
{
m_internal->appendTab(pic,id,text);
return 0;
@@ -906,7 +906,7 @@ int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
KMultiTabBarButton* KMultiTabBar::button(int id) const
{
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
@@ -985,13 +985,13 @@ KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const
{
return m_position;
}
-void KMultiTabBar::fontChange(const QFont& /* oldFont */)
+void KMultiTabBar::fontChange(const TQFont& /* oldFont */)
{
for (uint i=0;i<tabs()->count();i++)
tabs()->at(i)->resize();
repaint();
}
-QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
-QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
+TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
+TQPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
diff --git a/kutils/kmultitabbar.h b/kutils/kmultitabbar.h
index 8d9a95449..6405b9e5d 100644
--- a/kutils/kmultitabbar.h
+++ b/kutils/kmultitabbar.h
@@ -25,13 +25,13 @@
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
-#include <qscrollview.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -92,7 +92,7 @@ public:
* @param parent The parent widget
* @param name The widget's name
*/
- KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0);
+ KMultiTabBar(KMultiTabBarMode bm,TQWidget *parent=0,const char *name=0);
/**
* Destructor.
@@ -108,7 +108,7 @@ public:
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
- int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null);
+ int appendButton(const TQPixmap &pic,int id=-1,TQPopupMenu* popup=0,const TQString& not_used_yet=TQString::null);
/**
* remove a button with the given ID
*/
@@ -120,7 +120,7 @@ public:
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
* @return Always zero. Can be safely ignored.
*/
- int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
+ int appendTab(const TQPixmap &pic,int id=-1,const TQString& text=TQString::null);
/**
* remove a tab with a given ID
* @param id The ID of the tab to remove
@@ -172,13 +172,13 @@ public:
* @return The list of tabs.
* @warning be careful, don't delete tabs yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarTab>* tabs();
+ TQPtrList<KMultiTabBarTab>* tabs();
/**
* Returns the list of pointers to the tab buttons of type KMultiTabBarButton.
* @return The list of tab buttons.
* @warning be careful, don't delete buttons yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarButton>* buttons();
+ TQPtrList<KMultiTabBarButton>* buttons();
/**
* might vanish, not sure yet
@@ -186,13 +186,13 @@ public:
void showActiveTabTexts(bool show=true);
protected:
friend class KMultiTabBarButton;
- virtual void fontChange( const QFont& );
+ virtual void fontChange( const TQFont& );
void updateSeparator();
private:
class KMultiTabBarInternal *m_internal;
- QBoxLayout *m_l;
- QFrame *m_btnTabSep;
- QPtrList<KMultiTabBarButton> m_buttons;
+ TQBoxLayout *m_l;
+ TQFrame *m_btnTabSep;
+ TQPtrList<KMultiTabBarButton> m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
@@ -207,11 +207,11 @@ class KUTILS_EXPORT KMultiTabBarButton: public QPushButton
Q_OBJECT
public:
/** @internal */
- KMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQPixmap& pic,const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
/** @internal */
- KMultiTabBarButton(const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
/**
* Destructor
*/
@@ -237,16 +237,16 @@ public slots:
/**
* modify the text of the button
*/
- void setText(const QString &);
+ void setText(const TQString &);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
- QString m_text;
- virtual void hideEvent( class QHideEvent*);
- virtual void showEvent( class QShowEvent*);
+ TQString m_text;
+ virtual void hideEvent( class TQHideEvent*);
+ virtual void showEvent( class TQShowEvent*);
private:
int m_id;
KMultiTabBarButtonPrivate *d;
@@ -270,7 +270,7 @@ class KUTILS_EXPORT KMultiTabBarTab: public KMultiTabBarButton
Q_OBJECT
public:
/** @internal */
- KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
+ KMultiTabBarTab(const TQPixmap& pic,const TQString&,int id,TQWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
/**
* Destructor.
@@ -300,17 +300,17 @@ protected:
void setSize(int);
int neededSize();
void updateState();
- virtual void drawButton(QPainter *);
- virtual void drawButtonLabel(QPainter *);
- void drawButtonStyled(QPainter *);
- void drawButtonClassic(QPainter *);
+ virtual void drawButton(TQPainter *);
+ virtual void drawButtonLabel(TQPainter *);
+ void drawButtonStyled(TQPainter *);
+ void drawButtonClassic(TQPainter *);
protected slots:
virtual void slotClicked();
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
public slots:
- virtual void setIcon(const QString&);
- virtual void setIcon(const QPixmap&);
+ virtual void setIcon(const TQString&);
+ virtual void setIcon(const TQPixmap&);
};
#endif
diff --git a/kutils/kmultitabbar_p.h b/kutils/kmultitabbar_p.h
index f47cc5385..e48200160 100644
--- a/kutils/kmultitabbar_p.h
+++ b/kutils/kmultitabbar_p.h
@@ -24,26 +24,26 @@
#ifndef K_MULTI_TAB_BAR_P_H
#define K_MULTI_TAB_BAR_P_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kmultitabbar.h>
class KMultiTabBarInternal: public QScrollView
{
Q_OBJECT
public:
- KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
- int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
+ KMultiTabBarInternal(TQWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
+ int appendTab(const TQPixmap &,int=-1,const TQString& =TQString::null);
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
- QPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
+ TQPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
- QWidget *box;
- QBoxLayout *mainLayout;
- QPtrList<KMultiTabBarTab> m_tabs;
+ TQWidget *box;
+ TQBoxLayout *mainLayout;
+ TQPtrList<KMultiTabBarTab> m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
@@ -51,17 +51,17 @@ private:
int m_lines;
KMultiTabBar::KMultiTabBarMode m_barMode;
protected:
- virtual bool eventFilter(QObject *,QEvent*);
- virtual void drawContents ( QPainter *, int, int, int, int);
+ virtual bool eventFilter(TQObject *,TQEvent*);
+ virtual void drawContents ( TQPainter *, int, int, int, int);
/**
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
* in order to ignore all mouseEvents on the viewport, so that the
* parent can handle them.
*/
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
};
#endif
diff --git a/kutils/kplugininfo.cpp b/kutils/kplugininfo.cpp
index 4b80aa776..a441fb756 100644
--- a/kutils/kplugininfo.cpp
+++ b/kutils/kplugininfo.cpp
@@ -43,38 +43,38 @@ class KPluginInfo::KPluginInfoPrivate
delete config;
}
- QString specfile; // the filename of the file containing all the info
- QString name;
- QString comment;
- QString icon;
- QString author;
- QString email;
- QString pluginName; // the name attribute in the .rc file
- QString version;
- QString website; // URL to the website of the plugin/author
- QString category;
- QString license;
- QStringList dependencies;
+ TQString specfile; // the filename of the file containing all the info
+ TQString name;
+ TQString comment;
+ TQString icon;
+ TQString author;
+ TQString email;
+ TQString pluginName; // the name attribute in the .rc file
+ TQString version;
+ TQString website; // URL to the website of the plugin/author
+ TQString category;
+ TQString license;
+ TQStringList dependencies;
bool hidden;
bool enabledbydefault;
bool pluginenabled;
KConfig * config;
- QString configgroup;
+ TQString configgroup;
KService::Ptr service;
- QValueList<KService::Ptr> kcmservices;
+ TQValueList<KService::Ptr> kcmservices;
bool kcmservicesCached;
};
-KPluginInfo::KPluginInfo( const QString & filename, const char* resource )
+KPluginInfo::KPluginInfo( const TQString & filename, const char* resource )
: d( new KPluginInfoPrivate )
{
KDesktopFile file( filename, true, resource );
d->specfile = filename;
- if( filename.endsWith( QString::fromAscii( ".desktop" ) ) )
+ if( filename.endsWith( TQString::fromAscii( ".desktop" ) ) )
{
file.setDesktopGroup();
d->hidden = file.readBoolEntry( "Hidden", false );
@@ -95,7 +95,7 @@ KPluginInfo::KPluginInfo( const QString & filename, const char* resource )
d->enabledbydefault = file.readBoolEntry(
"X-KDE-PluginInfo-EnabledByDefault", false );
}
- else if( filename.endsWith( QString::fromAscii( ".plugin" ) ) )
+ else if( filename.endsWith( TQString::fromAscii( ".plugin" ) ) )
{ // provided for noatun style .plugin files compatibility
d->name = file.readName();
@@ -136,7 +136,7 @@ KPluginInfo::KPluginInfo( const KService::Ptr service )
d->license = service->property( "X-KDE-PluginInfo-License" ).toString();
d->dependencies =
service->property( "X-KDE-PluginInfo-Depends" ).toStringList();
- QVariant tmp = service->property( "X-KDE-PluginInfo-EnabledByDefault" );
+ TQVariant tmp = service->property( "X-KDE-PluginInfo-EnabledByDefault" );
d->enabledbydefault = tmp.isValid() ? tmp.toBool() : false;
}
@@ -151,9 +151,9 @@ KPluginInfo::~KPluginInfo()
delete d;
}
-QValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, KConfig * config, const TQString & group )
{
- QValueList<KPluginInfo*> infolist;
+ TQValueList<KPluginInfo*> infolist;
KPluginInfo * info;
for( KService::List::ConstIterator it = services.begin();
it != services.end(); ++it )
@@ -165,10 +165,10 @@ QValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & servi
return infolist;
}
-QValueList<KPluginInfo*> KPluginInfo::fromFiles( const QStringList & files, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromFiles( const TQStringList & files, KConfig * config, const TQString & group )
{
- QValueList<KPluginInfo*> infolist;
- for( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it )
+ TQValueList<KPluginInfo*> infolist;
+ for( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it )
{
KPluginInfo * info = new KPluginInfo( *it );
info->setConfig( config, group );
@@ -177,9 +177,9 @@ QValueList<KPluginInfo*> KPluginInfo::fromFiles( const QStringList & files, KCon
return infolist;
}
-QValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const QString & name, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const TQString & name, KConfig * config, const TQString & group )
{
- QStringList files = KGlobal::dirs()->findAllResources( "data", name +
+ TQStringList files = KGlobal::dirs()->findAllResources( "data", name +
"/kpartplugins/*.desktop", true, false );
return fromFiles( files, config, group );
}
@@ -207,62 +207,62 @@ bool KPluginInfo::isPluginEnabledByDefault() const
return d->enabledbydefault;
}
-const QString & KPluginInfo::name() const
+const TQString & KPluginInfo::name() const
{
return d->name;
}
-const QString & KPluginInfo::comment() const
+const TQString & KPluginInfo::comment() const
{
return d->comment;
}
-const QString & KPluginInfo::icon() const
+const TQString & KPluginInfo::icon() const
{
return d->icon;
}
-const QString & KPluginInfo::specfile() const
+const TQString & KPluginInfo::specfile() const
{
return d->specfile;
}
-const QString & KPluginInfo::author() const
+const TQString & KPluginInfo::author() const
{
return d->author;
}
-const QString & KPluginInfo::email() const
+const TQString & KPluginInfo::email() const
{
return d->email;
}
-const QString & KPluginInfo::category() const
+const TQString & KPluginInfo::category() const
{
return d->category;
}
-const QString & KPluginInfo::pluginName() const
+const TQString & KPluginInfo::pluginName() const
{
return d->pluginName;
}
-const QString & KPluginInfo::version() const
+const TQString & KPluginInfo::version() const
{
return d->version;
}
-const QString & KPluginInfo::website() const
+const TQString & KPluginInfo::website() const
{
return d->website;
}
-const QString & KPluginInfo::license() const
+const TQString & KPluginInfo::license() const
{
return d->license;
}
-const QStringList & KPluginInfo::dependencies() const
+const TQStringList & KPluginInfo::dependencies() const
{
return d->dependencies;
}
@@ -272,7 +272,7 @@ KService::Ptr KPluginInfo::service() const
return d->service;
}
-const QValueList<KService::Ptr> & KPluginInfo::kcmServices() const
+const TQValueList<KService::Ptr> & KPluginInfo::kcmServices() const
{
if ( !d->kcmservicesCached )
{
@@ -287,7 +287,7 @@ const QValueList<KService::Ptr> & KPluginInfo::kcmServices() const
return d->kcmservices;
}
-void KPluginInfo::setConfig( KConfig * config, const QString & group )
+void KPluginInfo::setConfig( KConfig * config, const TQString & group )
{
d->config = config;
d->configgroup = group;
@@ -298,20 +298,20 @@ KConfig * KPluginInfo::config() const
return d->config;
}
-const QString & KPluginInfo::configgroup() const
+const TQString & KPluginInfo::configgroup() const
{
return d->configgroup;
}
-QVariant KPluginInfo::property( const QString & key ) const
+TQVariant KPluginInfo::property( const TQString & key ) const
{
if( d->service )
return d->service->property( key );
else
- return QVariant();
+ return TQVariant();
}
-QVariant KPluginInfo::operator[]( const QString & key ) const
+TQVariant KPluginInfo::operator[]( const TQString & key ) const
{
return property( key );
}
diff --git a/kutils/kplugininfo.h b/kutils/kplugininfo.h
index 32ee5b5a7..59aa75983 100644
--- a/kutils/kplugininfo.h
+++ b/kutils/kplugininfo.h
@@ -20,10 +20,10 @@
#ifndef KPLUGININFO_H
#define KPLUGININFO_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
class KConfigGroup;
@@ -42,7 +42,7 @@ class KConfigGroup;
class KUTILS_EXPORT KPluginInfo
{
public:
- typedef QValueList<KPluginInfo*> List;
+ typedef TQValueList<KPluginInfo*> List;
/**
* Read plugin info from @p filename.
@@ -77,7 +77,7 @@ class KUTILS_EXPORT KPluginInfo
* (e.g. "service", "apps"... KStandardDirs). Otherwise,
* resource isn't used.
*/
- KPluginInfo( const QString & filename, const char* resource = 0 );
+ KPluginInfo( const TQString & filename, const char* resource = 0 );
/**
* Read plugin info from a KService object.
@@ -120,7 +120,7 @@ class KUTILS_EXPORT KPluginInfo
* KService objects. If you get a trader offer of the plugins you want
* to use you can just pass them to this function.
*/
- static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return A list of KPluginInfo objects constructed from a list of
@@ -128,14 +128,14 @@ class KUTILS_EXPORT KPluginInfo
* KStandardDirs::findAllResources() you pass the list of files to this
* function.
*/
- static KPluginInfo::List fromFiles( const QStringList & files, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromFiles( const TQStringList & files, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return A list of KPluginInfo objects for the KParts plugins of an
* instance. You only need the name of the instance not a pointer to the
* KInstance object.
*/
- static KPluginInfo::List fromKPartsInstanceName( const QString &, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromKPartsInstanceName( const TQString &, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return Whether the plugin should be hidden.
@@ -176,7 +176,7 @@ class KUTILS_EXPORT KPluginInfo
*
* @see operator[]
*/
- QVariant property( const QString & key ) const;
+ TQVariant property( const TQString & key ) const;
/**
* This is the same as property(). It is provided for convenience.
@@ -185,70 +185,70 @@ class KUTILS_EXPORT KPluginInfo
*
* @see property()
*/
- QVariant operator[]( const QString & key ) const;
+ TQVariant operator[]( const TQString & key ) const;
/**
* @return The user visible name of the plugin.
*/
- const QString & name() const;
+ const TQString & name() const;
/**
* @return A comment describing the plugin.
*/
- const QString & comment() const;
+ const TQString & comment() const;
/**
* @return The iconname for this plugin
*/
- const QString & icon() const;
+ const TQString & icon() const;
/**
* @return The file containing the information about the plugin.
*/
- const QString & specfile() const;
+ const TQString & specfile() const;
/**
* @return The author of this plugin.
*/
- const QString & author() const;
+ const TQString & author() const;
/**
* @return The email address of the author.
*/
- const QString & email() const;
+ const TQString & email() const;
/**
* @return The category of this plugin (e.g. playlist/skin).
*/
- const QString & category() const;
+ const TQString & category() const;
/**
* @return The internal name of the plugin (for KParts Plugins this is
* the same name as set in the .rc file).
*/
- const QString & pluginName() const;
+ const TQString & pluginName() const;
/**
* @return The version of the plugin.
*/
- const QString & version() const;
+ const TQString & version() const;
/**
* @return The website of the plugin/author.
*/
- const QString & website() const;
+ const TQString & website() const;
/**
* @return The license of this plugin.
*/
- const QString & license() const;
+ const TQString & license() const;
/**
* @return A list of plugins required for this plugin to be enabled. Use
* the pluginName in this list.
*/
- const QStringList & dependencies() const;
+ const TQStringList & dependencies() const;
/**
* @return The KService object for this plugin. You might need it if you
@@ -265,14 +265,14 @@ class KUTILS_EXPORT KPluginInfo
* @return A list of Service pointers if the plugin installs one or more
* KCModule
*/
- const QValueList<KService::Ptr> & kcmServices() const;
+ const TQValueList<KService::Ptr> & kcmServices() const;
/**
* Set the KConfigGroup to use for load()ing and save()ing the
* configuration. This will be overridden by the KConfigGroup passed to
* save() or load() (if one is passed).
*/
- void setConfig( KConfig * config, const QString & group );
+ void setConfig( KConfig * config, const TQString & group );
/**
* @return If the KPluginInfo object has a KConfig object set return
@@ -284,7 +284,7 @@ class KUTILS_EXPORT KPluginInfo
* @return The groupname used in the KConfig object for load()ing and
* save()ing whether the plugin is enabled.
*/
- const QString & configgroup() const;
+ const TQString & configgroup() const;
/**
* Save state of the plugin - enabled or not. This function is provided
diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp
index 4bcc166d1..1a64d05e9 100644
--- a/kutils/kpluginselector.cpp
+++ b/kutils/kpluginselector.cpp
@@ -20,19 +20,19 @@
#include "kpluginselector.h"
#include "kpluginselector_p.h"
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qwidgetstack.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qobjectlist.h>
-#include <qcstring.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqobjectlist.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
#include <kstandarddirs.h>
#include <ktabctl.h>
#include <kcmoduleinfo.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
#include <ktrader.h>
#include <ktabwidget.h>
@@ -52,12 +52,12 @@
#include <kcmodule.h>
#include "kcmoduleinfo.h"
#include "kcmoduleloader.h"
-#include <qsplitter.h>
-#include <qframe.h>
+#include <tqsplitter.h>
+#include <tqframe.h>
#include "kplugininfo.h"
#include <kinstance.h>
-#include <qptrdict.h>
-#include <qstringlist.h>
+#include <tqptrdict.h>
+#include <tqstringlist.h>
#include "kcmoduleproxy.h"
/*
@@ -68,7 +68,7 @@ class KPluginInfoLVI : public QCheckListItem
{
public:
KPluginInfoLVI( KPluginInfo *pluginInfo, KListView *parent )
- : QCheckListItem( parent, pluginInfo->name(), QCheckListItem::CheckBox ), m_pluginInfo( pluginInfo )
+ : TQCheckListItem( parent, pluginInfo->name(), TQCheckListItem::CheckBox ), m_pluginInfo( pluginInfo )
{
}
@@ -79,27 +79,27 @@ private:
};
/*
- Custom QToolTip for the list view.
+ Custom TQToolTip for the list view.
The decision whether or not to show tooltips is taken in
- maybeTip(). See also the QListView sources from Qt itself.
+ maybeTip(). See also the TQListView sources from Qt itself.
*/
class KPluginListViewToolTip : public QToolTip
{
public:
- KPluginListViewToolTip( QWidget *parent, KListView *lv );
+ KPluginListViewToolTip( TQWidget *parent, KListView *lv );
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
KListView *m_listView;
};
-KPluginListViewToolTip::KPluginListViewToolTip( QWidget *parent, KListView *lv )
-: QToolTip( parent ), m_listView( lv )
+KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, KListView *lv )
+: TQToolTip( parent ), m_listView( lv )
{
}
-void KPluginListViewToolTip::maybeTip( const QPoint &pos )
+void KPluginListViewToolTip::maybeTip( const TQPoint &pos )
{
if ( !parentWidget() || !m_listView )
return;
@@ -108,7 +108,7 @@ void KPluginListViewToolTip::maybeTip( const QPoint &pos )
if ( !item )
return;
- QString toolTip = i18n( "<qt><table>"
+ TQString toolTip = i18n( "<qt><table>"
"<tr><td><b>Description:</b></td><td>%1</td></tr>"
"<tr><td><b>Author:</b></td><td>%2</td></tr>"
"<tr><td><b>Version:</b></td><td>%3</td></tr>"
@@ -122,7 +122,7 @@ void KPluginListViewToolTip::maybeTip( const QPoint &pos )
struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
{
KPluginSelectionWidgetPrivate( KPluginSelector * _kps,
- const QString & _cat,
+ const TQString & _cat,
KConfigGroup * _config )
: widgetstack( 0 )
, kps( _kps )
@@ -142,19 +142,19 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
delete config;
}
- QMap<QCheckListItem*, KPluginInfo*> pluginInfoMap;
+ TQMap<TQCheckListItem*, KPluginInfo*> pluginInfoMap;
- QWidgetStack * widgetstack;
+ TQWidgetStack * widgetstack;
KPluginSelector * kps;
KConfigGroup * config;
KPluginListViewToolTip *tooltip;
- QDict<KCModuleInfo> pluginconfigmodules;
- QMap<QString, int> widgetIDs;
- QMap<KPluginInfo*, bool> plugincheckedchanged;
- QString catname;
- QValueList<KCModuleProxy*> modulelist;
- QPtrDict<QStringList> moduleParentComponents;
+ TQDict<KCModuleInfo> pluginconfigmodules;
+ TQMap<TQString, int> widgetIDs;
+ TQMap<KPluginInfo*, bool> plugincheckedchanged;
+ TQString catname;
+ TQValueList<KCModuleProxy*> modulelist;
+ TQPtrDict<TQStringList> moduleParentComponents;
KPluginInfo * currentplugininfo;
bool visible;
@@ -163,49 +163,49 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
};
KPluginSelectionWidget::KPluginSelectionWidget(
- const QValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps,
- QWidget * parent, const QString & catname, const QString & category,
+ const TQValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps,
+ TQWidget * parent, const TQString & catname, const TQString & category,
KConfigGroup * config, const char * name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
, d( new KPluginSelectionWidgetPrivate( kps, catname, config ) )
{
init( plugininfos, category );
}
-inline QString KPluginSelectionWidget::catName() const
+inline TQString KPluginSelectionWidget::catName() const
{
return d->catname;
}
-void KPluginSelectionWidget::init( const QValueList<KPluginInfo*> & plugininfos,
- const QString & category )
+void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & category )
{
// setup Widgets
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
KListView * listview = new KListView( this );
d->tooltip = new KPluginListViewToolTip( listview->viewport(), listview );
- connect( listview, SIGNAL( pressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( spacePressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( returnPressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- listview->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ connect( listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ listview->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
listview->setAcceptDrops( false );
listview->setFullWidth( true );
listview->setSelectionModeExt( KListView::Single );
listview->setAllColumnsShowFocus( true );
listview->addColumn( i18n( "Name" ) );
- for( QValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->plugincheckedchanged[ *it ] = false;
if( !( *it )->isHidden() &&
( category.isNull() || ( *it )->category() == category ) )
{
- QCheckListItem * item = new KPluginInfoLVI( *it, listview );
+ TQCheckListItem * item = new KPluginInfoLVI( *it, listview );
if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() );
@@ -227,9 +227,9 @@ KPluginSelectionWidget::~KPluginSelectionWidget()
delete d;
}
-bool KPluginSelectionWidget::pluginIsLoaded( const QString & pluginName ) const
+bool KPluginSelectionWidget::pluginIsLoaded( const TQString & pluginName ) const
{
- for( QMap<QCheckListItem*, KPluginInfo*>::ConstIterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::ConstIterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
if( it.data()->pluginName() == pluginName )
return it.data()->isPluginEnabled();
@@ -237,7 +237,7 @@ bool KPluginSelectionWidget::pluginIsLoaded( const QString & pluginName ) const
}
-QWidget * KPluginSelectionWidget::insertKCM( QWidget * parent,
+TQWidget * KPluginSelectionWidget::insertKCM( TQWidget * parent,
const KCModuleInfo & moduleinfo )
{
KCModuleProxy * module = new KCModuleProxy( moduleinfo, false,
@@ -245,18 +245,18 @@ QWidget * KPluginSelectionWidget::insertKCM( QWidget * parent,
if( !module->realModule() )
{
//FIXME: not very verbose
- QLabel * label = new QLabel( i18n( "Error" ), parent );
+ TQLabel * label = new TQLabel( i18n( "Error" ), parent );
label->setAlignment( Qt::AlignCenter );
return label;
}
// add the KCM to the list so that we can call load/save/defaults on it
d->modulelist.append( module );
- QStringList * parentComponents = new QStringList(
+ TQStringList * parentComponents = new TQStringList(
moduleinfo.service()->property(
"X-KDE-ParentComponents" ).toStringList() );
d->moduleParentComponents.insert( module, parentComponents );
- connect( module, SIGNAL( changed( bool ) ), SLOT( clientChanged( bool ) ) );
+ connect( module, TQT_SIGNAL( changed( bool ) ), TQT_SLOT( clientChanged( bool ) ) );
return module;
}
@@ -264,7 +264,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
{
//if we have Services for the plugin we should be able to
//create KCM(s)
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
if( plugininfo->kcmServices().size() > 1 )
{
// we need a tabwidget
@@ -275,14 +275,14 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
d->kps->configPage( id );
d->widgetIDs[ plugininfo->pluginName() ] = id;
- for( QValueList<KService::Ptr>::ConstIterator it =
+ for( TQValueList<KService::Ptr>::ConstIterator it =
plugininfo->kcmServices().begin();
it != plugininfo->kcmServices().end(); ++it )
{
if( !( *it )->noDisplay() )
{
KCModuleInfo moduleinfo( *it );
- QWidget * module = insertKCM( tabwidget, moduleinfo );
+ TQWidget * module = insertKCM( tabwidget, moduleinfo );
tabwidget->addTab( module, moduleinfo.moduleName() );
}
}
@@ -293,7 +293,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
{
KCModuleInfo moduleinfo(
plugininfo->kcmServices().front() );
- QWidget * module = insertKCM( d->widgetstack, moduleinfo );
+ TQWidget * module = insertKCM( d->widgetstack, moduleinfo );
module->setEnabled( checked );
int id = d->widgetstack->addWidget( module );
@@ -301,7 +301,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
d->widgetIDs[ plugininfo->pluginName() ] = id;
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
inline void KPluginSelectionWidget::updateConfigPage()
@@ -357,7 +357,7 @@ void KPluginSelectionWidget::clientChanged( bool didchange )
kdError( 702 ) << "negative changed value: " << d->changed << endl;
}
-void KPluginSelectionWidget::tabWidgetChanged( QWidget * widget )
+void KPluginSelectionWidget::tabWidgetChanged( TQWidget * widget )
{
if( widget == this )
{
@@ -368,7 +368,7 @@ void KPluginSelectionWidget::tabWidgetChanged( QWidget * widget )
d->visible = false;
}
-void KPluginSelectionWidget::executed( QListViewItem * item )
+void KPluginSelectionWidget::executed( TQListViewItem * item )
{
kdDebug( 702 ) << k_funcinfo << endl;
if( item == 0 )
@@ -380,10 +380,10 @@ void KPluginSelectionWidget::executed( QListViewItem * item )
if( item->rtti() != 1 ) //check for a QCheckListItem
return;
- QCheckListItem * citem = static_cast<QCheckListItem *>( item );
+ TQCheckListItem * citem = static_cast<TQCheckListItem *>( item );
bool checked = citem->isOn();
//kdDebug( 702 ) << "it's a " << ( checked ? "checked" : "unchecked" )
- // << " QCheckListItem" << endl;
+ // << " TQCheckListItem" << endl;
KPluginInfo * info = d->pluginInfoMap[ citem ];
Q_ASSERT( !info->isHidden() );
@@ -421,7 +421,7 @@ void KPluginSelectionWidget::load()
{
//kdDebug( 702 ) << k_funcinfo << endl;
- for( QMap<QCheckListItem*, KPluginInfo*>::Iterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::Iterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
{
KPluginInfo * info = it.data();
@@ -431,7 +431,7 @@ void KPluginSelectionWidget::load()
d->currentchecked = info->isPluginEnabled();
}
- for( QValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
+ for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
it != d->modulelist.end(); ++it )
if( ( *it )->changed() )
( *it )->load();
@@ -444,7 +444,7 @@ void KPluginSelectionWidget::save()
{
kdDebug( 702 ) << k_funcinfo << endl;
- for( QMap<QCheckListItem*, KPluginInfo*>::Iterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::Iterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
{
KPluginInfo * info = it.data();
@@ -453,21 +453,21 @@ void KPluginSelectionWidget::save()
info->save( d->config );
d->plugincheckedchanged[ info ] = false;
}
- QStringList updatedModules;
- for( QValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
+ TQStringList updatedModules;
+ for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
it != d->modulelist.end(); ++it )
if( ( *it )->changed() )
{
( *it )->save();
- QStringList * names = d->moduleParentComponents[ *it ];
+ TQStringList * names = d->moduleParentComponents[ *it ];
if( names->size() == 0 )
- names->append( QString::null );
- for( QStringList::ConstIterator nameit = names->begin();
+ names->append( TQString::null );
+ for( TQStringList::ConstIterator nameit = names->begin();
nameit != names->end(); ++nameit )
if( updatedModules.find( *nameit ) == updatedModules.end() )
updatedModules.append( *nameit );
}
- for( QStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
+ for( TQStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
emit configCommitted( ( *it ).latin1() );
updateConfigPage();
@@ -482,9 +482,9 @@ void KPluginSelectionWidget::checkDependencies( const KPluginInfo * info )
if( info->dependencies().isEmpty() )
return;
- for( QStringList::ConstIterator it = info->dependencies().begin();
+ for( TQStringList::ConstIterator it = info->dependencies().begin();
it != info->dependencies().end(); ++it )
- for( QMap<QCheckListItem*,
+ for( TQMap<TQCheckListItem*,
KPluginInfo*>::Iterator infoIt = d->pluginInfoMap.begin();
infoIt != d->pluginInfoMap.end(); ++infoIt )
if( infoIt.data()->pluginName() == *it )
@@ -509,33 +509,33 @@ class KPluginSelector::KPluginSelectorPrivate
{
}
- QFrame * frame;
+ TQFrame * frame;
KTabWidget * tabwidget;
- QWidgetStack * widgetstack;
- QValueList<KPluginSelectionWidget *> pswidgets;
+ TQWidgetStack * widgetstack;
+ TQValueList<KPluginSelectionWidget *> pswidgets;
bool hideconfigpage;
};
-KPluginSelector::KPluginSelector( QWidget * parent, const char * name )
-: QWidget( parent, name )
+KPluginSelector::KPluginSelector( TQWidget * parent, const char * name )
+: TQWidget( parent, name )
, d( new KPluginSelectorPrivate )
{
- QBoxLayout * hbox = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout * hbox = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
hbox->setAutoAdd( true );
- QSplitter* splitter = new QSplitter( QSplitter::Horizontal, this );
- d->frame = new QFrame( splitter, "KPluginSelector left frame" );
- d->frame->setFrameStyle( QFrame::NoFrame );
- ( new QVBoxLayout( d->frame, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ TQSplitter* splitter = new TQSplitter( TQSplitter::Horizontal, this );
+ d->frame = new TQFrame( splitter, "KPluginSelector left frame" );
+ d->frame->setFrameStyle( TQFrame::NoFrame );
+ ( new TQVBoxLayout( d->frame, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
// widgetstack
- d->widgetstack = new QWidgetStack( splitter, "KPluginSelector Config Pages" );
- d->widgetstack->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ d->widgetstack = new TQWidgetStack( splitter, "KPluginSelector Config Pages" );
+ d->widgetstack->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
d->widgetstack->setMinimumSize( 200, 200 );
- QLabel * label = new QLabel( i18n( "(This plugin is not configurable)" ),
+ TQLabel * label = new TQLabel( i18n( "(This plugin is not configurable)" ),
d->widgetstack );
- ( new QVBoxLayout( label, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( label, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
label->setAlignment( Qt::AlignCenter );
label->setMinimumSize( 200, 200 );
@@ -562,28 +562,28 @@ void KPluginSelector::checkNeedForTabWidget()
kdDebug( 702 ) << "create TabWidget" << endl;
d->tabwidget = new KTabWidget( d->frame,
"KPluginSelector TabWidget" );
- w->reparent( d->tabwidget, QPoint( 0, 0 ) );
+ w->reparent( d->tabwidget, TQPoint( 0, 0 ) );
d->tabwidget->addTab( w, w->catName() );
- connect( d->tabwidget, SIGNAL( currentChanged( QWidget * ) ), w,
- SLOT( tabWidgetChanged( QWidget * ) ) );
+ connect( d->tabwidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), w,
+ TQT_SLOT( tabWidgetChanged( TQWidget * ) ) );
}
}
}
-static QValueList<KPluginInfo*> kpartsPluginInfos( const QString& instanceName )
+static TQValueList<KPluginInfo*> kpartsPluginInfos( const TQString& instanceName )
{
if( instanceName.isNull() )
- return QValueList<KPluginInfo*>(); //nothing
+ return TQValueList<KPluginInfo*>(); //nothing
- const QStringList desktopfilenames = KGlobal::dirs()->findAllResources( "data",
+ const TQStringList desktopfilenames = KGlobal::dirs()->findAllResources( "data",
instanceName + "/kpartplugins/*.desktop", true, false );
return KPluginInfo::fromFiles( desktopfilenames );
}
-void KPluginSelector::addPlugins( const QString & instanceName,
- const QString & catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const TQString & instanceName,
+ const TQString & catname, const TQString & category, KConfig * config )
{
- const QValueList<KPluginInfo*> plugininfos = kpartsPluginInfos( instanceName );
+ const TQValueList<KPluginInfo*> plugininfos = kpartsPluginInfos( instanceName );
if ( plugininfos.isEmpty() )
return;
checkNeedForTabWidget();
@@ -595,8 +595,8 @@ void KPluginSelector::addPlugins( const QString & instanceName,
addPluginsInternal( plugininfos, catname, category, cfgGroup );
}
-void KPluginSelector::addPluginsInternal( const QValueList<KPluginInfo*> plugininfos,
- const QString & catname, const QString & category,
+void KPluginSelector::addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos,
+ const TQString & catname, const TQString & category,
KConfigGroup* cfgGroup )
{
KPluginSelectionWidget * w;
@@ -605,29 +605,29 @@ void KPluginSelector::addPluginsInternal( const QValueList<KPluginInfo*> plugini
w = new KPluginSelectionWidget( plugininfos, this,
d->tabwidget, catname, category, cfgGroup );
d->tabwidget->addTab( w, catname );
- connect( d->tabwidget, SIGNAL( currentChanged( QWidget * ) ), w,
- SLOT( tabWidgetChanged( QWidget * ) ) );
+ connect( d->tabwidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), w,
+ TQT_SLOT( tabWidgetChanged( TQWidget * ) ) );
}
else
w = new KPluginSelectionWidget( plugininfos, this, d->frame,
catname, category, cfgGroup );
w->setMinimumSize( 200, 200 );
- connect( w, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
- connect( w, SIGNAL( configCommitted( const QCString & ) ), this,
- SIGNAL( configCommitted( const QCString & ) ) );
+ connect( w, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
+ connect( w, TQT_SIGNAL( configCommitted( const TQCString & ) ), this,
+ TQT_SIGNAL( configCommitted( const TQCString & ) ) );
d->pswidgets += w;
}
-void KPluginSelector::addPlugins( const KInstance * instance, const QString &
- catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const KInstance * instance, const TQString &
+ catname, const TQString & category, KConfig * config )
{
if ( !config )
config = instance->config();
addPlugins( instance->instanceName(), catname, category, config );
}
-void KPluginSelector::addPlugins( const QValueList<KPluginInfo*> & plugininfos,
- const QString & catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & catname, const TQString & category, KConfig * config )
{
checkNeedForTabWidget();
// the KConfigGroup becomes owned by KPluginSelectionWidget
@@ -636,7 +636,7 @@ void KPluginSelector::addPlugins( const QValueList<KPluginInfo*> & plugininfos,
addPluginsInternal( plugininfos, catname, category, cfgGroup );
}
-QWidgetStack * KPluginSelector::widgetStack()
+TQWidgetStack * KPluginSelector::widgetStack()
{
return d->widgetstack;
}
@@ -668,7 +668,7 @@ void KPluginSelector::setShowEmptyConfigPage( bool show )
void KPluginSelector::load()
{
- for( QValueList<KPluginSelectionWidget *>::Iterator it =
+ for( TQValueList<KPluginSelectionWidget *>::Iterator it =
d->pswidgets.begin(); it != d->pswidgets.end(); ++it )
{
( *it )->load();
@@ -677,7 +677,7 @@ void KPluginSelector::load()
void KPluginSelector::save()
{
- for( QValueList<KPluginSelectionWidget *>::Iterator it =
+ for( TQValueList<KPluginSelectionWidget *>::Iterator it =
d->pswidgets.begin(); it != d->pswidgets.end(); ++it )
{
( *it )->save();
@@ -695,7 +695,7 @@ void KPluginSelector::defaults()
// not possible. (if the plugin has multiple KCMs they will be shown in a
// tabwidget - defaults() will be called for all of them)
- QWidget * pluginconfig = d->widgetstack->visibleWidget();
+ TQWidget * pluginconfig = d->widgetstack->visibleWidget();
KCModuleProxy * kcm = ( KCModuleProxy* )pluginconfig->qt_cast(
"KCModuleProxy" );
if( kcm )
@@ -708,10 +708,10 @@ void KPluginSelector::defaults()
// if we get here the visible Widget must be a tabwidget holding more than
// one KCM
- QObjectList * kcms = pluginconfig->queryList( "KCModuleProxy",
+ TQObjectList * kcms = pluginconfig->queryList( "KCModuleProxy",
0, false, false );
- QObjectListIt it( *kcms );
- QObject * obj;
+ TQObjectListIt it( *kcms );
+ TQObject * obj;
while( ( obj = it.current() ) != 0 )
{
++it;
diff --git a/kutils/kpluginselector.h b/kutils/kpluginselector.h
index b21e41b3e..811582104 100644
--- a/kutils/kpluginselector.h
+++ b/kutils/kpluginselector.h
@@ -20,8 +20,8 @@
#ifndef KPLUGINSELECTOR_H
#define KPLUGINSELECTOR_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -66,7 +66,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
/**
* Create a new KPluginSelector.
*/
- KPluginSelector( QWidget * parent, const char * name = 0 );
+ KPluginSelector( TQWidget * parent, const char * name = 0 );
~KPluginSelector();
/**
@@ -98,9 +98,9 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* For example KViewCanvas passes KSimpleConfig(
* "kviewcanvas" ).
*/
- void addPlugins( const QString & instanceName,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ void addPlugins( const TQString & instanceName,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -108,8 +108,8 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* If not set explicitely, @p config is set to instance->config().
*/
void addPlugins( const KInstance * instance,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -137,9 +137,9 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* For example KViewCanvas passes KSimpleConfig(
* "kviewcanvas" ).
*/
- void addPlugins( const QValueList<KPluginInfo*> & plugininfos,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ void addPlugins( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -181,7 +181,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* argument is the name of the parent component that needs to reload
* its config
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
private:
/**
@@ -189,7 +189,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
*
* @internal
*/
- QWidgetStack * widgetStack();
+ TQWidgetStack * widgetStack();
/**
* Show an info page in the widgetstack.
@@ -206,8 +206,8 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
/**
* @internal
*/
- void addPluginsInternal( const QValueList<KPluginInfo*> plugininfos,
- const QString & catname, const QString & category,
+ void addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos,
+ const TQString & catname, const TQString & category,
KConfigGroup* cfgGroup );
class KPluginSelectorPrivate;
diff --git a/kutils/kpluginselector_p.h b/kutils/kpluginselector_p.h
index c9b968c0f..c8a6cb546 100644
--- a/kutils/kpluginselector_p.h
+++ b/kutils/kpluginselector_p.h
@@ -20,7 +20,7 @@
#ifndef KPLUGINSELECTOR_P_H
#define KPLUGINSELECTOR_P_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -55,13 +55,13 @@ class KPluginSelectionWidget : public QWidget
* @param category The unstranslated category key name.
* @param config Set the KConfigGroup object that holds the
* state of the plugins being enabled or not.
- * @param name The name of the widget (passed to QWidget)
+ * @param name The name of the widget (passed to TQWidget)
*
* @internal
*/
- KPluginSelectionWidget( const QValueList<KPluginInfo*> & plugininfos,
- KPluginSelector * kps, QWidget * parent, const QString & catname,
- const QString & category, KConfigGroup * config = 0,
+ KPluginSelectionWidget( const TQValueList<KPluginInfo*> & plugininfos,
+ KPluginSelector * kps, TQWidget * parent, const TQString & catname,
+ const TQString & category, KConfigGroup * config = 0,
const char * name = 0 );
virtual ~KPluginSelectionWidget();
@@ -72,7 +72,7 @@ class KPluginSelectionWidget : public QWidget
*
* @internal
*/
- QString catName() const;
+ TQString catName() const;
/**
* Tell the KPluginInfo objects to load their state (enabled/disabled).
@@ -88,7 +88,7 @@ class KPluginSelectionWidget : public QWidget
/**
* @return whether the plugin is enabled in the ListView or not.
*/
- bool pluginChecked( const QString & pluginName ) const;
+ bool pluginChecked( const TQString & pluginName ) const;
signals:
/**
@@ -103,7 +103,7 @@ class KPluginSelectionWidget : public QWidget
* argument is the name of the parent component that needs to reload
* its config
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
protected:
/**
@@ -114,16 +114,16 @@ class KPluginSelectionWidget : public QWidget
*
* @return Whether the plugin is loaded.
*/
- virtual bool pluginIsLoaded( const QString & pluginName ) const;
+ virtual bool pluginIsLoaded( const TQString & pluginName ) const;
private slots:
/**
- * Called when a QCheckListItem is checked or unchecked. It calls
+ * Called when a TQCheckListItem is checked or unchecked. It calls
* checkDependencies on the Plugin and then updateConfigPage.
*
* @internal
*/
- void executed( QListViewItem * );
+ void executed( TQListViewItem * );
/**
* Called whenever the visible config page should change (plugin
@@ -158,7 +158,7 @@ class KPluginSelectionWidget : public QWidget
* KPluginSelectionWidget is shown and sets the currentplugininfo
* accordingly.
*/
- void tabWidgetChanged( QWidget * );
+ void tabWidgetChanged( TQWidget * );
private:
/**
@@ -168,7 +168,7 @@ class KPluginSelectionWidget : public QWidget
*
* @internal
*/
- QWidget * insertKCM( QWidget * parent, const KCModuleInfo & );
+ TQWidget * insertKCM( TQWidget * parent, const KCModuleInfo & );
/**
* Embed the KCMs for the plugin into the widgetstack
@@ -177,7 +177,7 @@ class KPluginSelectionWidget : public QWidget
*/
void embeddPluginKCMs( KPluginInfo *, bool );
- void init( const QValueList<KPluginInfo*> & plugininfos, const QString & );
+ void init( const TQValueList<KPluginInfo*> & plugininfos, const TQString & );
void checkDependencies( const KPluginInfo * );
struct KPluginSelectionWidgetPrivate;
diff --git a/kutils/kreplace.cpp b/kutils/kreplace.cpp
index 6740c297a..f825e93cc 100644
--- a/kutils/kreplace.cpp
+++ b/kutils/kreplace.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -26,7 +26,7 @@
#include <kmessagebox.h>
#include "kreplace.h"
#include "kreplacedialog.h"
-#include <qregexp.h>
+#include <tqregexp.h>
//#define DEBUG_REPLACE
#define INDEX_NOMATCH -1
@@ -34,13 +34,13 @@
class KReplaceNextDialog : public KDialogBase
{
public:
- KReplaceNextDialog( QWidget *parent );
- void setLabel( const QString& pattern, const QString& replacement );
+ KReplaceNextDialog( TQWidget *parent );
+ void setLabel( const TQString& pattern, const TQString& replacement );
private:
- QLabel* m_mainLabel;
+ TQLabel* m_mainLabel;
};
-KReplaceNextDialog::KReplaceNextDialog(QWidget *parent) :
+KReplaceNextDialog::KReplaceNextDialog(TQWidget *parent) :
KDialogBase(parent, 0, false, // non-modal!
i18n("Replace"),
User3 | User2 | User1 | Close,
@@ -48,26 +48,26 @@ KReplaceNextDialog::KReplaceNextDialog(QWidget *parent) :
false,
i18n("&All"), i18n("&Skip"), i18n("Replace"))
{
- m_mainLabel = new QLabel( this );
+ m_mainLabel = new TQLabel( this );
setMainWidget( m_mainLabel );
resize(minimumSize());
}
-void KReplaceNextDialog::setLabel( const QString& pattern, const QString& replacement )
+void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& replacement )
{
m_mainLabel->setText( i18n("Replace '%1' with '%2'?").arg(pattern).arg(replacement) );
}
////
-KReplace::KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent) :
+KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent) :
KFind( pattern, options, parent )
{
m_replacements = 0;
m_replacement = replacement;
}
-KReplace::KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent, QWidget *dlg) :
+KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget *dlg) :
KFind( pattern, options, parent, dlg )
{
m_replacements = 0;
@@ -91,10 +91,10 @@ KReplaceNextDialog* KReplace::dialog()
if ( !m_dialog )
{
m_dialog = new KReplaceNextDialog( parentWidget() );
- connect( m_dialog, SIGNAL( user1Clicked() ), this, SLOT( slotReplaceAll() ) );
- connect( m_dialog, SIGNAL( user2Clicked() ), this, SLOT( slotSkip() ) );
- connect( m_dialog, SIGNAL( user3Clicked() ), this, SLOT( slotReplace() ) );
- connect( m_dialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) );
+ connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotReplaceAll() ) );
+ connect( m_dialog, TQT_SIGNAL( user2Clicked() ), this, TQT_SLOT( slotSkip() ) );
+ connect( m_dialog, TQT_SIGNAL( user3Clicked() ), this, TQT_SLOT( slotReplace() ) );
+ connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
}
return static_cast<KReplaceNextDialog *>(m_dialog);
}
@@ -142,8 +142,8 @@ KFind::Result KReplace::replace()
kdDebug() << k_funcinfo << "PromptOnReplace" << endl;
#endif
// Display accurate initial string and replacement string, they can vary
- QString matchedText = m_text.mid( m_index, m_matchedLength );
- QString rep = matchedText;
+ TQString matchedText = m_text.mid( m_index, m_matchedLength );
+ TQString rep = matchedText;
KReplace::replace(rep, m_replacement, 0, m_options, m_matchedLength);
dialog()->setLabel( matchedText, rep );
dialog()->show();
@@ -177,7 +177,7 @@ KFind::Result KReplace::replace()
return NoMatch;
}
-int KReplace::replace(QString &text, const QString &pattern, const QString &replacement, int index, long options, int *replacedLength)
+int KReplace::replace(TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength)
{
int matchedLength;
@@ -193,7 +193,7 @@ int KReplace::replace(QString &text, const QString &pattern, const QString &repl
return index;
}
-int KReplace::replace(QString &text, const QRegExp &pattern, const QString &replacement, int index, long options, int *replacedLength)
+int KReplace::replace(TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength)
{
int matchedLength;
@@ -209,9 +209,9 @@ int KReplace::replace(QString &text, const QRegExp &pattern, const QString &repl
return index;
}
-int KReplace::replace(QString &text, const QString &replacement, int index, long options, int length)
+int KReplace::replace(TQString &text, const TQString &replacement, int index, long options, int length)
{
- QString rep = replacement;
+ TQString rep = replacement;
// Backreferences: replace \0 with the right portion of 'text'
if ( options & KReplaceDialog::BackReference )
rep.replace( "\\0", text.mid( index, length ) );
@@ -293,7 +293,7 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
displayFinalDialog();
return false;
}
- QString message;
+ TQString message;
if ( showNumMatches )
{
if ( !m_replacements )
@@ -316,7 +316,7 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
i18n("Do you want to restart search from the end?")
: i18n("Do you want to restart search at the beginning?");
- int ret = KMessageBox::questionYesNo( parentWidget(), message, QString::null, i18n("Restart"), i18n("Stop") );
+ int ret = KMessageBox::questionYesNo( parentWidget(), message, TQString::null, i18n("Restart"), i18n("Stop") );
return( ret == KMessageBox::Yes );
}
diff --git a/kutils/kreplace.h b/kutils/kreplace.h
index 2a174af23..ea385189b 100644
--- a/kutils/kreplace.h
+++ b/kutils/kreplace.h
@@ -50,14 +50,14 @@ class KReplaceNextDialog;
*
* // Connect signals to code which handles highlighting
* // of found text, and on-the-fly replacement.
- * connect( m_replace, SIGNAL( highlight( const QString &, int, int ) ),
- * this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ * connect( m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
* // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_replace, SIGNAL( findNext() ),
- * this, SLOT( slotReplaceNext() ) );
+ * connect( m_replace, TQT_SIGNAL( findNext() ),
+ * this, TQT_SLOT( slotReplaceNext() ) );
* // Connect replace signal - called when doing a replacement
- * connect( m_replace, SIGNAL( replace(const QString &, int, int, int) ),
- * this, SLOT( slotReplace(const QString &, int, int, int) ) );
+ * connect( m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ * this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
* \endcode
* Then initialize the variables determining the "current position"
* (to the cursor, if the option FromCursor is set,
@@ -109,7 +109,7 @@ public:
* @param options Options for the find dialog. @see KFindDialog and KReplaceDialog.
* @param parent The parent widget.
*/
- KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent = 0);
+ KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent = 0);
/**
* This is the recommended constructor if you also use KReplaceDialog (non-modal).
* You should pass the pointer to it here, so that when a message box
@@ -121,7 +121,7 @@ public:
* @param parent The parent widget.
* @param replaceDialog A pointer to the KReplaceDialog object.
*/
- KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent, QWidget* replaceDialog);
+ KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget* replaceDialog);
/**
* Destructor.
@@ -186,7 +186,7 @@ public:
* Not always the same as replacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( QString &text, const QString &pattern, const QString &replacement, int index, long options, int *replacedLength );
+ static int replace( TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength );
/**
* Searches the given regular expression, replaces with the given replacement string,
@@ -204,7 +204,7 @@ public:
* Not always the same as replacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( QString &text, const QRegExp &pattern, const QString &replacement, int index, long options, int *replacedLength );
+ static int replace( TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength );
/**
* Returns @c true if we should restart the search from scratch.
@@ -246,7 +246,7 @@ signals:
* @param replacedLength Length of the replacement string
* @param matchedLength Length of the matched string
*/
- void replace(const QString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
protected slots:
@@ -257,9 +257,9 @@ protected slots:
private:
KReplaceNextDialog* dialog();
void doReplace();
- static int replace( QString &text, const QString &replacement, int index, long options, int length );
+ static int replace( TQString &text, const TQString &replacement, int index, long options, int length );
- QString m_replacement;
+ TQString m_replacement;
unsigned m_replacements;
// Binary compatible extensibility.
diff --git a/kutils/kreplacedialog.cpp b/kutils/kreplacedialog.cpp
index 80a36e5df..88c006b4d 100644
--- a/kutils/kreplacedialog.cpp
+++ b/kutils/kreplacedialog.cpp
@@ -20,11 +20,11 @@
#include "kreplacedialog.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -32,17 +32,17 @@
/**
* we need to insert the strings after the dialog is set
- * up, otherwise QComboBox will deliver an aweful big sizeHint
+ * up, otherwise TQComboBox will deliver an aweful big sizeHint
* for long replacement texts.
*/
class KReplaceDialog::KReplaceDialogPrivate {
public:
KReplaceDialogPrivate() : m_initialShowDone(false) {}
- QStringList replaceStrings;
+ TQStringList replaceStrings;
bool m_initialShowDone;
};
-KReplaceDialog::KReplaceDialog(QWidget *parent, const char *name, long options, const QStringList &findStrings, const QStringList &replaceStrings, bool hasSelection) :
+KReplaceDialog::KReplaceDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, const TQStringList &replaceStrings, bool hasSelection) :
KFindDialog(parent, name, true)
{
d = new KReplaceDialogPrivate;
@@ -56,7 +56,7 @@ KReplaceDialog::~KReplaceDialog()
delete d;
}
-void KReplaceDialog::showEvent( QShowEvent *e )
+void KReplaceDialog::showEvent( TQShowEvent *e )
{
if ( !d->m_initialShowDone )
{
@@ -84,28 +84,28 @@ long KReplaceDialog::options() const
return options;
}
-QWidget *KReplaceDialog::replaceExtension()
+TQWidget *KReplaceDialog::replaceExtension()
{
if (!m_replaceExtension)
{
- m_replaceExtension = new QWidget(m_replaceGrp);
+ m_replaceExtension = new TQWidget(m_replaceGrp);
m_replaceLayout->addMultiCellWidget(m_replaceExtension, 3, 3, 0, 1);
}
return m_replaceExtension;
}
-QString KReplaceDialog::replacement() const
+TQString KReplaceDialog::replacement() const
{
return m_replace->currentText();
}
-QStringList KReplaceDialog::replacementHistory() const
+TQStringList KReplaceDialog::replacementHistory() const
{
- QStringList lst = m_replace->historyItems();
+ TQStringList lst = m_replace->historyItems();
// historyItems() doesn't tell us about the case of replacing with an empty string
if ( m_replace->lineEdit()->text().isEmpty() )
- lst.prepend( QString::null );
+ lst.prepend( TQString::null );
return lst;
}
@@ -116,7 +116,7 @@ void KReplaceDialog::setOptions(long options)
m_backRef->setChecked(options & BackReference);
}
-void KReplaceDialog::setReplacementHistory(const QStringList &strings)
+void KReplaceDialog::setReplacementHistory(const TQStringList &strings)
{
if (strings.count() > 0)
m_replace->setHistoryItems(strings, true);
@@ -129,11 +129,11 @@ void KReplaceDialog::slotOk()
// If regex and backrefs are enabled, do a sanity check.
if ( m_regExp->isChecked() && m_backRef->isChecked() )
{
- QRegExp r ( pattern() );
+ TQRegExp r ( pattern() );
int caps = r.numCaptures();
- QRegExp check(QString("((?:\\\\)+)(\\d+)"));
+ TQRegExp check(TQString("((?:\\\\)+)(\\d+)"));
int p = 0;
- QString rep = replacement();
+ TQString rep = replacement();
while ( (p = check.search( rep, p ) ) > -1 )
{
if ( check.cap(1).length()%2 && check.cap(2).toInt() > caps )
diff --git a/kutils/kreplacedialog.h b/kutils/kreplacedialog.h
index 459c0c5ae..835762941 100644
--- a/kutils/kreplacedialog.h
+++ b/kutils/kreplacedialog.h
@@ -79,14 +79,14 @@ public:
* @param parent The parent object of this widget
* @param name The name of this widget
* @param options A bitfield of the Options to be enabled.
- * @param findStrings A QStringList to insert in the combo box of text to find
- * @param replaceStrings A QStringList to insert in the combo box of text to
+ * @param findStrings A TQStringList to insert in the combo box of text to find
+ * @param replaceStrings A TQStringList to insert in the combo box of text to
* replace with
* @param hasSelection Whether a selection exists
*/
- KReplaceDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(),
- const QStringList &replaceStrings = QStringList(),
+ KReplaceDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(),
+ const TQStringList &replaceStrings = TQStringList(),
bool hasSelection = true );
/**
@@ -102,7 +102,7 @@ public:
* @param history The replacement history.
* @see replacementHistory
*/
- void setReplacementHistory( const QStringList &history );
+ void setReplacementHistory( const TQStringList &history );
/**
* Returns the list of history items.
@@ -110,7 +110,7 @@ public:
* @return The replacement history.
* @see setReplacementHistory
*/
- QStringList replacementHistory() const;
+ TQStringList replacementHistory() const;
/**
* Set the options which are enabled.
@@ -133,21 +133,21 @@ public:
* Returns the replacement string.
* @return The replacement string.
*/
- QString replacement() const;
+ TQString replacement() const;
/**
* Returns an empty widget which the user may fill with additional UI
* elements as required. The widget occupies the width of the dialog,
* and is positioned immediately the regular expression support widgets
* for the replacement string.
- * @return An extensible QWidget.
+ * @return An extensible TQWidget.
*/
- QWidget *replaceExtension();
+ TQWidget *replaceExtension();
protected slots:
void slotOk();
- virtual void showEvent ( QShowEvent * );
+ virtual void showEvent ( TQShowEvent * );
private:
diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp
index 5093af985..cb3695e05 100644
--- a/kutils/ksettings/componentsdialog.cpp
+++ b/kutils/ksettings/componentsdialog.cpp
@@ -19,10 +19,10 @@
#include "ksettings/componentsdialog.h"
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klistview.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <kplugininfo.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -36,34 +36,34 @@ class ComponentsDialog::ComponentsDialogPrivate
{
public:
KListView * listview;
- QFrame * infowidget;
- QLabel * iconwidget;
- QLabel * commentwidget;
- QLabel * descriptionwidget;
- QMap<QCheckListItem*, KPluginInfo*> plugininfomap;
- QValueList<KPluginInfo*> plugininfolist;
+ TQFrame * infowidget;
+ TQLabel * iconwidget;
+ TQLabel * commentwidget;
+ TQLabel * descriptionwidget;
+ TQMap<TQCheckListItem*, KPluginInfo*> plugininfomap;
+ TQValueList<KPluginInfo*> plugininfolist;
};
-ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
+ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name )
: KDialogBase( parent, name, false, i18n( "Select Components" ) )
, d( new ComponentsDialogPrivate )
{
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget( page );
- ( new QHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->listview = new KListView( page );
d->listview->setMinimumSize( 200, 200 );
- d->infowidget = new QFrame( page );
+ d->infowidget = new TQFrame( page );
d->infowidget->setMinimumSize( 200, 200 );
- ( new QVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
- d->iconwidget = new QLabel( d->infowidget );
+ ( new TQVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ d->iconwidget = new TQLabel( d->infowidget );
( void )new KSeparator( d->infowidget );
- d->commentwidget = new QLabel( d->infowidget );
+ d->commentwidget = new TQLabel( d->infowidget );
d->commentwidget->setAlignment( Qt::WordBreak );
- d->descriptionwidget = new QLabel( d->infowidget );
+ d->descriptionwidget = new TQLabel( d->infowidget );
d->descriptionwidget->setAlignment( Qt::WordBreak );
- d->listview->addColumn( QString::null );
+ d->listview->addColumn( TQString::null );
d->listview->header()->hide();
d->listview->setRootIsDecorated( true );
d->listview->setSorting( -1 );
@@ -71,14 +71,14 @@ ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
d->listview->setSelectionModeExt( KListView::Single );
d->listview->setAllColumnsShowFocus( true );
- connect( d->listview, SIGNAL( pressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( spacePressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( returnPressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
}
ComponentsDialog::~ComponentsDialog()
@@ -90,17 +90,17 @@ void ComponentsDialog::addPluginInfo( KPluginInfo * info )
d->plugininfolist.append( info );
}
-void ComponentsDialog::setPluginInfos( const QMap<QString, KPluginInfo*> &
+void ComponentsDialog::setPluginInfos( const TQMap<TQString, KPluginInfo*> &
plugininfos )
{
- for( QMap<QString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQMap<TQString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->plugininfolist.append( it.data() );
}
}
-void ComponentsDialog::setPluginInfos( const QValueList<KPluginInfo *> &plugins )
+void ComponentsDialog::setPluginInfos( const TQValueList<KPluginInfo *> &plugins )
{
d->plugininfolist = plugins;
}
@@ -112,12 +112,12 @@ void ComponentsDialog::show()
d->plugininfomap.clear();
// construct the treelist
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
( *it )->load();
- QCheckListItem * item = new QCheckListItem( d->listview, ( *it )->name(),
- QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( d->listview, ( *it )->name(),
+ TQCheckListItem::CheckBox );
if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() );
@@ -126,7 +126,7 @@ void ComponentsDialog::show()
KDialogBase::show();
}
-void ComponentsDialog::executed( QListViewItem * item )
+void ComponentsDialog::executed( TQListViewItem * item )
{
kdDebug( 704 ) << k_funcinfo << endl;
if( item == 0 )
@@ -134,11 +134,11 @@ void ComponentsDialog::executed( QListViewItem * item )
if( item->rtti() != 1 ) // check for QCheckListItem
return;
- QCheckListItem * citem = static_cast<QCheckListItem *>( item );
+ TQCheckListItem * citem = static_cast<TQCheckListItem *>( item );
bool checked = citem->isOn();
kdDebug( 704 ) << "it's a " << ( checked ? "checked" : "unchecked" )
- << " QCheckListItem" << endl;
+ << " TQCheckListItem" << endl;
KPluginInfo * info = d->plugininfomap[ citem ];
info->setPluginEnabled( checked );
@@ -151,7 +151,7 @@ void ComponentsDialog::executed( QListViewItem * item )
void ComponentsDialog::savePluginInfos()
{
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
if( ( *it )->config() )
diff --git a/kutils/ksettings/componentsdialog.h b/kutils/ksettings/componentsdialog.h
index e5325f707..2847622a8 100644
--- a/kutils/ksettings/componentsdialog.h
+++ b/kutils/ksettings/componentsdialog.h
@@ -47,7 +47,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
@param parent parent widget
@param name name
*/
- ComponentsDialog( QWidget * parent = 0, const char * name = 0 );
+ ComponentsDialog( TQWidget * parent = 0, const char * name = 0 );
~ComponentsDialog();
/**
@@ -57,11 +57,11 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QMap<QString, KPluginInfo*> & plugininfos );
+ void setPluginInfos( const TQMap<TQString, KPluginInfo*> & plugininfos );
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QValueList<KPluginInfo *> &plugins );
+ void setPluginInfos( const TQValueList<KPluginInfo *> &plugins );
/**
* reimplemented
@@ -73,7 +73,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
void slotApply();
private slots:
- void executed( QListViewItem * );
+ void executed( TQListViewItem * );
private:
void savePluginInfos();
diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp
index c98c68872..35ad153ef 100644
--- a/kutils/ksettings/dialog.cpp
+++ b/kutils/ksettings/dialog.cpp
@@ -31,8 +31,8 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include "kcmoduleinfo.h"
namespace KSettings
@@ -40,13 +40,13 @@ namespace KSettings
struct GroupInfo
{
- QString id;
- QString name;
- QString comment;
- QString icon;
+ TQString id;
+ TQString name;
+ TQString comment;
+ TQString icon;
int weight;
- QString parentid;
- QWidget * page;
+ TQString parentid;
+ TQWidget * page;
};
// The TreeList can get really complicated. That's why a tree data structure
@@ -54,7 +54,7 @@ struct GroupInfo
class PageNode
{
private:
- typedef QValueList<PageNode*> List;
+ typedef TQValueList<PageNode*> List;
enum Type { KCM, Group, Root };
union Value
{
@@ -185,17 +185,17 @@ class PageNode
( *it )->makeDirty();
}
- QString name() const
+ TQString name() const
{
if( Root == m_type )
- return QString::fromAscii( "root node" );
+ return TQString::fromAscii( "root node" );
return ( KCM == m_type ) ? m_value.kcm->moduleName()
: m_value.group->name;
}
- QStringList parentNames() const
+ TQStringList parentNames() const
{
- QStringList ret;
+ TQStringList ret;
PageNode * node = m_parent;
while( node && node->m_type != Root )
{
@@ -218,13 +218,13 @@ class PageNode
}
if( Group == m_type && 0 == m_value.group->page )
{
- QPixmap icon;
+ TQPixmap icon;
if( ! m_value.group->icon.isNull() )
icon = SmallIcon( m_value.group->icon,
IconSize( KIcon::Small ) );
- QVBox * page = dlg->addVBoxPage( m_value.group->name,
- QString::null, icon );
- QLabel * comment = new QLabel( m_value.group->comment, page );
+ TQVBox * page = dlg->addVBoxPage( m_value.group->name,
+ TQString::null, icon );
+ TQLabel * comment = new TQLabel( m_value.group->comment, page );
comment->setTextFormat( Qt::RichText );
m_value.group->page = page;
}
@@ -291,7 +291,7 @@ class PageNode
return false;
}
- bool insert( KCModuleInfo * info, const QString & parentid )
+ bool insert( KCModuleInfo * info, const TQString & parentid )
{
if( parentid.isNull() )
{
@@ -349,14 +349,14 @@ class Dialog::DialogPrivate
bool staticlistview;
KCMultiDialog * dlg;
PageNode pagetree;
- QWidget * parentwidget;
- QStringList registeredComponents;
- QValueList<KService::Ptr> services;
- QMap<QString, KPluginInfo*> plugininfomap;
+ TQWidget * parentwidget;
+ TQStringList registeredComponents;
+ TQValueList<KService::Ptr> services;
+ TQMap<TQString, KPluginInfo*> plugininfomap;
};
-Dialog::Dialog( QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -365,8 +365,8 @@ Dialog::Dialog( QWidget * parent, const char * name )
}
Dialog::Dialog( ContentInListView content,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -374,9 +374,9 @@ Dialog::Dialog( ContentInListView content,
d->services = instanceServices();
}
-Dialog::Dialog( const QStringList & components,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -384,9 +384,9 @@ Dialog::Dialog( const QStringList & components,
d->services = instanceServices() + parentComponentsServices( components );
}
-Dialog::Dialog( const QStringList & components,
- ContentInListView content, QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ ContentInListView content, TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -399,9 +399,9 @@ Dialog::~Dialog()
delete d;
}
-void Dialog::addPluginInfos( const QValueList<KPluginInfo*> & plugininfos )
+void Dialog::addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos )
{
- for( QValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->registeredComponents.append( ( *it )->pluginName() );
@@ -425,16 +425,16 @@ KCMultiDialog * Dialog::dialog()
return d->dlg;
}
-QValueList<KService::Ptr> Dialog::instanceServices() const
+TQValueList<KService::Ptr> Dialog::instanceServices() const
{
kdDebug( 700 ) << k_funcinfo << endl;
- QString instanceName = KGlobal::instance()->instanceName();
+ TQString instanceName = KGlobal::instance()->instanceName();
d->registeredComponents.append( instanceName );
kdDebug( 700 ) << "calling KServiceGroup::childGroup( " << instanceName
<< " )" << endl;
KServiceGroup::Ptr service = KServiceGroup::childGroup( instanceName );
- QValueList<KService::Ptr> ret;
+ TQValueList<KService::Ptr> ret;
if( service && service->isValid() )
{
@@ -458,11 +458,11 @@ QValueList<KService::Ptr> Dialog::instanceServices() const
return ret;
}
-QValueList<KService::Ptr> Dialog::parentComponentsServices(
- const QStringList & kcdparents ) const
+TQValueList<KService::Ptr> Dialog::parentComponentsServices(
+ const TQStringList & kcdparents ) const
{
d->registeredComponents += kcdparents;
- QString constraint = kcdparents.join(
+ TQString constraint = kcdparents.join(
"' in [X-KDE-ParentComponents]) or ('" );
constraint = "('" + constraint + "' in [X-KDE-ParentComponents])";
@@ -478,9 +478,9 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
kdDebug( 700 ) << "check whether the " << moduleinfo->moduleName()
<< " KCM should be shown" << endl;
// for all parent components
- QStringList parentComponents = moduleinfo->service()->property(
+ TQStringList parentComponents = moduleinfo->service()->property(
"X-KDE-ParentComponents" ).toStringList();
- for( QStringList::ConstIterator pcit = parentComponents.begin();
+ for( TQStringList::ConstIterator pcit = parentComponents.begin();
pcit != parentComponents.end(); ++pcit )
{
// if the parentComponent is not registered ignore it
@@ -509,15 +509,15 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
return enabled;
}
-void Dialog::parseGroupFile( const QString & filename )
+void Dialog::parseGroupFile( const TQString & filename )
{
KSimpleConfig file( filename );
- QStringList groups = file.groupList();
- for( QStringList::ConstIterator it = groups.begin(); it != groups.end();
+ TQStringList groups = file.groupList();
+ for( TQStringList::ConstIterator it = groups.begin(); it != groups.end();
++it )
{
GroupInfo group;
- QString id = *it;
+ TQString id = *it;
file.setGroup( id.utf8() );
group.id = id;
group.name = file.readEntry( "Name" );
@@ -532,26 +532,26 @@ void Dialog::parseGroupFile( const QString & filename )
void Dialog::createDialogFromServices()
{
// read .setdlg files
- QString setdlgpath = locate( "appdata",
+ TQString setdlgpath = locate( "appdata",
KGlobal::instance()->instanceName() + ".setdlg" );
- QStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
+ TQStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
"ksettingsdialog/*.setdlg" );
if( ! setdlgpath.isNull() )
parseGroupFile( setdlgpath );
if( setdlgaddon.size() > 0 )
- for( QStringList::ConstIterator it = setdlgaddon.begin();
+ for( TQStringList::ConstIterator it = setdlgaddon.begin();
it != setdlgaddon.end(); ++it )
parseGroupFile( *it );
// now we process the KCModule services
- for( QValueList<KService::Ptr>::ConstIterator it = d->services.begin();
+ for( TQValueList<KService::Ptr>::ConstIterator it = d->services.begin();
it != d->services.end(); ++it )
{
// we create the KCModuleInfo
KCModuleInfo * info = new KCModuleInfo( *it );
- QString parentid;
- QVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
- QVariant::String );
+ TQString parentid;
+ TQVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
+ TQVariant::String );
if( tmp.isValid() )
parentid = tmp.toString();
d->pagetree.insert( info, parentid );
@@ -588,14 +588,14 @@ void Dialog::createDialogFromServices()
if( ! d->staticlistview )
d->dlg->addButtonBelowList( i18n( "Select Components..." ), this,
- SLOT( configureTree() ) );
+ TQT_SLOT( configureTree() ) );
- connect( d->dlg, SIGNAL( okClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( applyClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->dlg, TQT_SIGNAL( okClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( applyClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
d->pagetree.addToDialog( d->dlg );
@@ -609,13 +609,13 @@ void Dialog::configureTree()
ComponentsDialog * subdlg = new ComponentsDialog( d->dlg );
subdlg->setPluginInfos( d->plugininfomap );
subdlg->show();
- connect( subdlg, SIGNAL( okClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( okClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( finished() ), subdlg, SLOT( delayedDestruct() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( finished() ), subdlg, TQT_SLOT( delayedDestruct() ) );
}
void Dialog::updateTreeList()
diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h
index 84f4619be..f19bf225a 100644
--- a/kutils/ksettings/dialog.h
+++ b/kutils/ksettings/dialog.h
@@ -20,7 +20,7 @@
#ifndef KSETTINGS_DIALOG_H
#define KSETTINGS_DIALOG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kservice.h>
template<class T> class QValueList;
@@ -52,14 +52,14 @@ namespace KSettings
* If you use a KPart that was not especially designed for your app you can use
* the second constructor:
* \code
- * QStringList kpartslist;
+ * TQStringList kpartslist;
* for( all my kparts )
* kpartslist += m_mypart->instance().instanceName();
* m_cfgdlg = new Dialog( kpartslist, this );
* \endcode
* and the action for the config dialog is connected to the show slot:
* \code
- * KStdAction::preferences( m_cfgdlg, SLOT( show() ), actionCollection() );
+ * KStdAction::preferences( m_cfgdlg, TQT_SLOT( show() ), actionCollection() );
* \endcode
*
* If you need to be informed when the config was changed and applied in the
@@ -102,7 +102,7 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( QWidget * parent = 0, const char * name = 0 );
+ Dialog( TQWidget * parent = 0, const char * name = 0 );
/**
* Construct a new Preferences Dialog for the application. It uses all
@@ -115,14 +115,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( ContentInListView content = Static, QWidget * parent = 0,
+ Dialog( ContentInListView content = Static, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -131,14 +131,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, QWidget * parent = 0,
+ Dialog( const TQStringList & components, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -149,8 +149,8 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, ContentInListView
- content, QWidget * parent = 0, const char * name = 0 );
+ Dialog( const TQStringList & components, ContentInListView
+ content, TQWidget * parent = 0, const char * name = 0 );
~Dialog();
@@ -158,7 +158,7 @@ class KUTILS_EXPORT Dialog : public QObject
* If you use a Configurable dialog you need to pass KPluginInfo
* objects that the dialog should configure.
*/
- void addPluginInfos( const QValueList<KPluginInfo*> & plugininfos );
+ void addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos );
KCMultiDialog * dialog();
@@ -190,21 +190,21 @@ class KUTILS_EXPORT Dialog : public QObject
*/
bool isPluginForKCMEnabled( KCModuleInfo * ) const;
- QValueList<KService::Ptr> instanceServices() const;
- QValueList<KService::Ptr> parentComponentsServices(
- const QStringList & ) const;
+ TQValueList<KService::Ptr> instanceServices() const;
+ TQValueList<KService::Ptr> parentComponentsServices(
+ const TQStringList & ) const;
/**
* @internal
* Read the .setdlg file and add it to the groupmap
*/
- void parseGroupFile( const QString & );
+ void parseGroupFile( const TQString & );
/**
* @internal
* If this module is put into a TreeList hierarchy this will return a
* list of the names of the parent modules.
*/
- QStringList parentModuleNames( KCModuleInfo * );
+ TQStringList parentModuleNames( KCModuleInfo * );
/**
* @internal
diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp
index 4e54538d8..7f20c1bc3 100644
--- a/kutils/ksettings/dispatcher.cpp
+++ b/kutils/ksettings/dispatcher.cpp
@@ -19,7 +19,7 @@
#include "ksettings/dispatcher.h"
-#include <qsignal.h>
+#include <tqsignal.h>
#include <kstaticdeleter.h>
#include <kdebug.h>
@@ -45,8 +45,8 @@ Dispatcher * Dispatcher::self()
return m_self;
}
-Dispatcher::Dispatcher( QObject * parent, const char * name )
- : QObject( parent, name )
+Dispatcher::Dispatcher( TQObject * parent, const char * name )
+ : TQObject( parent, name )
//, d( 0 )
{
kdDebug( 701 ) << k_funcinfo << endl;
@@ -58,32 +58,32 @@ Dispatcher::~Dispatcher()
//delete d;
}
-void Dispatcher::registerInstance( KInstance * instance, QObject * recv, const char * slot )
+void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const char * slot )
{
assert( instance != 0 );
// keep the KInstance around and call
// instance->config()->reparseConfiguration when the app should reparse
- QCString instanceName = instance->instanceName();
+ TQCString instanceName = instance->instanceName();
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
m_instanceName[ recv ] = instanceName;
- QSignal * sig;
+ TQSignal * sig;
if( m_instanceInfo.contains( instanceName ) )
{
sig = m_instanceInfo[ instanceName ].signal;
}
else
{
- sig = new QSignal( this, "signal dispatcher" );
+ sig = new TQSignal( this, "signal dispatcher" );
m_instanceInfo[ instanceName ].signal = sig;
m_instanceInfo[ instanceName ].instance = instance;
}
sig->connect( recv, slot );
++m_instanceInfo[ instanceName ].count;
- connect( recv, SIGNAL( destroyed( QObject * ) ), this, SLOT( unregisterInstance( QObject * ) ) );
+ connect( recv, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( unregisterInstance( TQObject * ) ) );
}
-KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
+KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << endl;
if( m_instanceInfo.contains( instanceName ) )
@@ -97,17 +97,17 @@ KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
return 0;
}
-QStrList Dispatcher::instanceNames() const
+TQStrList Dispatcher::instanceNames() const
{
kdDebug( 701 ) << k_funcinfo << endl;
- QStrList names;
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ TQStrList names;
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
if( ( *it ).count > 0 )
names.append( it.key() );
return names;
}
-void Dispatcher::reparseConfiguration( const QCString & instanceName )
+void Dispatcher::reparseConfiguration( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
// check if the instanceName is valid:
@@ -116,7 +116,7 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
// first we reparse the config of the instance so that the KConfig object
// will be up to date
m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration();
- QSignal * sig = m_instanceInfo[ instanceName ].signal;
+ TQSignal * sig = m_instanceInfo[ instanceName ].signal;
if( sig )
{
kdDebug( 701 ) << "emit signal to instance" << endl;
@@ -126,16 +126,16 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
void Dispatcher::syncConfiguration()
{
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
{
( *it ).instance->config()->sync();
}
}
-void Dispatcher::unregisterInstance( QObject * obj )
+void Dispatcher::unregisterInstance( TQObject * obj )
{
kdDebug( 701 ) << k_funcinfo << endl;
- QCString name = m_instanceName[ obj ];
+ TQCString name = m_instanceName[ obj ];
m_instanceName.remove( obj ); //obj will be destroyed when we return, so we better remove this entry
--m_instanceInfo[ name ].count;
if( m_instanceInfo[ name ].count == 0 )
@@ -145,7 +145,7 @@ void Dispatcher::unregisterInstance( QObject * obj )
}
}
-//X KInstance * Dispatcher::instanceForName( const QCString & instanceName )
+//X KInstance * Dispatcher::instanceForName( const TQCString & instanceName )
//X {
//X return m_instanceInfo[ instanceName ].instance;
//X }
diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h
index 5f6270bb5..f428b35fd 100644
--- a/kutils/ksettings/dispatcher.h
+++ b/kutils/ksettings/dispatcher.h
@@ -20,8 +20,8 @@
#ifndef KSETTINGS_DISPATCHER_H
#define KSETTINGS_DISPATCHER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
class QCString;
@@ -42,7 +42,7 @@ namespace KSettings
* into the KConfigureDialog you need a way to get notified. This is what you
* do:
* \code
- * Dispatcher::self()->registerInstance( instance(), this, SLOT( loadSettings() ) );
+ * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) );
* \endcode
*
* @author Matthias Kretz <kretz@kde.org>
@@ -69,26 +69,26 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instance The KInstance object
* @param recv The object that should receive the signal
- * @param slot The slot to be called: SLOT( slotName() )
+ * @param slot The slot to be called: TQT_SLOT( slotName() )
*/
- void registerInstance( KInstance * instance, QObject * recv, const char * slot );
+ void registerInstance( KInstance * instance, TQObject * recv, const char * slot );
/**
* @return the KConfig object that belongs to the instanceName
*/
- KConfig * configForInstanceName( const QCString & instanceName );
+ KConfig * configForInstanceName( const TQCString & instanceName );
/**
* @return a list of all the instance names that are currently
* registered
*/
- QStrList instanceNames() const;
+ TQStrList instanceNames() const;
//X /**
//X * @return The KInstance object belonging to the instance name you pass
//X * (only works for registered instances of course).
//X */
-//X KInstance * instanceForName( const QCString & instanceName );
+//X KInstance * instanceForName( const TQCString & instanceName );
public slots:
/**
@@ -97,7 +97,7 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instanceName The value of X-KDE-ParentComponents.
*/
- void reparseConfiguration( const QCString & instanceName );
+ void reparseConfiguration( const TQCString & instanceName );
/**
* When this slot is called the KConfig objects of all the registered
@@ -108,20 +108,20 @@ class KUTILS_EXPORT Dispatcher : public QObject
void syncConfiguration();
private slots:
- void unregisterInstance( QObject * );
+ void unregisterInstance( TQObject * );
private:
- Dispatcher( QObject * parent = 0, const char * name = 0 );
+ Dispatcher( TQObject * parent = 0, const char * name = 0 );
~Dispatcher();
static Dispatcher * m_self;
struct InstanceInfo {
KInstance * instance;
- QSignal * signal;
+ TQSignal * signal;
int count;
};
- QMap<QCString, InstanceInfo> m_instanceInfo;
- QMap<QObject *, QCString> m_instanceName;
+ TQMap<TQCString, InstanceInfo> m_instanceInfo;
+ TQMap<TQObject *, TQCString> m_instanceName;
class DispatcherPrivate;
DispatcherPrivate * d;
diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp
index 2456ebf86..99ea904f2 100644
--- a/kutils/ksettings/pluginpage.cpp
+++ b/kutils/ksettings/pluginpage.cpp
@@ -19,7 +19,7 @@
#include "ksettings/pluginpage.h"
#include "kpluginselector.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include "ksettings/dispatcher.h"
@@ -37,24 +37,24 @@ class PluginPage::PluginPagePrivate
KPluginSelector * selwid;
};
- PluginPage::PluginPage( QWidget * parent, const char * name, const QStringList & args )
+ PluginPage::PluginPage( TQWidget * parent, const char * name, const TQStringList & args )
: KCModule( parent, name, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
}
- PluginPage::PluginPage( KInstance * instance, QWidget * parent, const QStringList & args )
+ PluginPage::PluginPage( KInstance * instance, TQWidget * parent, const TQStringList & args )
: KCModule( instance, parent, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
- connect( d->selwid, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
}
PluginPage::~PluginPage()
diff --git a/kutils/ksettings/pluginpage.h b/kutils/ksettings/pluginpage.h
index fc6120f78..acd0ace1f 100644
--- a/kutils/ksettings/pluginpage.h
+++ b/kutils/ksettings/pluginpage.h
@@ -38,10 +38,10 @@ namespace KSettings
* PluginPage and add the appropriate plugin infos to the KPluginSelector.
* This is done using the pluginSelector() method:
* \code
- * typedef KGenericFactory<MyAppPluginConfig, QWidget> MyAppPluginConfigFactory;
+ * typedef KGenericFactory<MyAppPluginConfig, TQWidget> MyAppPluginConfigFactory;
* K_EXPORT_COMPONENT_FACTORY( kcm_myapppluginconfig, MyAppPluginConfigFactory( "kcm_myapppluginconfig" ) );
*
- * MyAppPluginConfig( QWidget * parent, const char *, const QStringList & args )
+ * MyAppPluginConfig( TQWidget * parent, const char *, const TQStringList & args )
* : PluginPage( MyAppPluginConfigFactory::instance(), parent, args )
* {
* pluginSelector()->addPlugins( KGlobal::instance()->instanceName(), i18n( "General Plugins" ), "General" );
@@ -78,13 +78,13 @@ class KUTILS_EXPORT PluginPage : public KCModule
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() );
+ PluginPage( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() );
/**
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() );
+ PluginPage( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() );
~PluginPage();
diff --git a/kutils/tests/kfindtest.cpp b/kutils/tests/kfindtest.cpp
index 17e8da7ee..1652eb625 100644
--- a/kutils/tests/kfindtest.cpp
+++ b/kutils/tests/kfindtest.cpp
@@ -28,12 +28,12 @@
#include <stdlib.h>
#include <assert.h>
-static bool check(QString txt, QString a, QString b) // from kurltest
+static bool check(TQString txt, TQString a, TQString b) // from kurltest
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -44,7 +44,7 @@ static bool check(QString txt, QString a, QString b) // from kurltest
return true;
}
-void KFindTest::changeText(uint line, const QString &text)
+void KFindTest::changeText(uint line, const TQString &text)
{
Q_ASSERT(line < m_text.count());
Q_ASSERT(m_find != 0);
@@ -54,15 +54,15 @@ void KFindTest::changeText(uint line, const QString &text)
m_find->setData(line, text);
}
-void KFindTest::find(const QString &pattern, long options)
+void KFindTest::find(const TQString &pattern, long options)
{
delete m_find;
m_find = new KFind(pattern, options, 0);
- connect(m_find, SIGNAL(highlight(const QString &, int, int)),
- SLOT(slotHighlight(const QString &, int, int)));
- connect(m_find, SIGNAL(highlight(int, int, int)),
- SLOT(slotHighlight(int, int, int)));
+ connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ TQT_SLOT(slotHighlight(const TQString &, int, int)));
+ connect(m_find, TQT_SIGNAL(highlight(int, int, int)),
+ TQT_SLOT(slotHighlight(int, int, int)));
m_line = 0;
KFind::Result result = KFind::NoMatch;
@@ -79,7 +79,7 @@ void KFindTest::find(const QString &pattern, long options)
} while(result == KFind::NoMatch && m_line < m_text.count());
}
-void KFindTest::findNext(const QString &pattern)
+void KFindTest::findNext(const TQString &pattern)
{
Q_ASSERT(m_find != 0);
@@ -109,16 +109,16 @@ void KFindTest::findNext(const QString &pattern)
//kdDebug() << "find next completed" << m_line << endl;
}
-void KFindTest::slotHighlight(const QString &text, int index, int matchedLength)
+void KFindTest::slotHighlight(const TQString &text, int index, int matchedLength)
{
- m_hits.append("line: \"" + text + "\", index: " + QString::number(index) +
- ", length: " + QString::number(matchedLength) + "\n");
+ m_hits.append("line: \"" + text + "\", index: " + TQString::number(index) +
+ ", length: " + TQString::number(matchedLength) + "\n");
}
void KFindTest::slotHighlight(int id, int index, int matchedLength)
{
- m_hits.append("line: \"" + m_text[id] + "\", index: " + QString::number(index) +
- ", length: " + QString::number(matchedLength) + "\n");
+ m_hits.append("line: \"" + m_text[id] + "\", index: " + TQString::number(index) +
+ ", length: " + TQString::number(matchedLength) + "\n");
}
int main(int argc, char **argv)
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
KCmdLineArgs::init(argc, argv, "kfindtest", "KFindTest", 0, 0, false);
KApplication app;
- QString text = "This file is part of the KDE project.\n"
+ TQString text = "This file is part of the KDE project.\n"
"This library is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public\n"
"License version 2, as published by the Free Software Foundation.\n"
@@ -141,12 +141,12 @@ int main(int argc, char **argv)
" the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"
" Boston, MA 02110-1301, USA.\n";
- QString output1 = "line: \"This file is part of the KDE project.\", index: 0, length: 4\n"
+ TQString output1 = "line: \"This file is part of the KDE project.\", index: 0, length: 4\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 0, length: 4\n"
"line: \" This library is distributed in the hope that it will be useful,\", index: 4, length: 4\n"
"line: \" along with this library; see the file COPYING.LIB. If not, write to\", index: 15, length: 4\n";
- QString output2 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
+ TQString output2 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 1\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 2\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 42, length: 3\n"
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
"line: \"This library is free software; you can redistribute it and/or\", index: 16, length: 4\n"
"line: \"License version 2, as published by the Free Software Foundation.\", index: 44, length: 19\n";
- QString output3 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
+ TQString output3 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 1\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 2\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 42, length: 3\n"
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
"line: \"License version 2, as published by the Free Software Foundation.\", index: 39, length: 4\n"
"line: \"License version 2, as published by the Free Software Foundation.\", index: 44, length: 19\n";
- KFindTest *test = new KFindTest(QStringList::split('\n', text, true));
+ KFindTest *test = new KFindTest(TQStringList::split('\n', text, true));
kdDebug() << "Plain static search..." << endl;
diff --git a/kutils/tests/kfindtest.h b/kutils/tests/kfindtest.h
index 2cb60ed76..b3be84a8b 100644
--- a/kutils/tests/kfindtest.h
+++ b/kutils/tests/kfindtest.h
@@ -20,8 +20,8 @@
#ifndef KFINDTEST_H
#define KFINDTEST_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KFind;
@@ -30,30 +30,30 @@ class KFindTest : public QObject
Q_OBJECT
public:
- KFindTest(const QStringList &text) :
- QObject(0),
+ KFindTest(const TQStringList &text) :
+ TQObject(0),
m_find(0),
m_text(text),
m_line(0)
{}
- void find(const QString &pattern, long options = 0);
- void findNext(const QString &pattern = QString::null);
+ void find(const TQString &pattern, long options = 0);
+ void findNext(const TQString &pattern = TQString::null);
- void changeText(uint line, const QString &text);
+ void changeText(uint line, const TQString &text);
- const QStringList &hits() const { return m_hits; }
+ const TQStringList &hits() const { return m_hits; }
void clearHits() { m_hits.clear(); }
public slots:
- void slotHighlight(const QString &text, int index, int matchedLength);
+ void slotHighlight(const TQString &text, int index, int matchedLength);
void slotHighlight(int id, int index, int matchedLengthlength);
private:
KFind *m_find;
- QStringList m_text;
+ TQStringList m_text;
uint m_line;
- QStringList m_hits;
+ TQStringList m_hits;
};
#endif
diff --git a/kutils/tests/kreplacetest.cpp b/kutils/tests/kreplacetest.cpp
index 9c6f67b3a..a810b7706 100644
--- a/kutils/tests/kreplacetest.cpp
+++ b/kutils/tests/kreplacetest.cpp
@@ -21,7 +21,7 @@
#include <kcmdlineargs.h>
#include <kapplication.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <kpushbutton.h>
#include "../kreplace.h"
#include "../kreplacedialog.h"
@@ -30,7 +30,7 @@
#include <kdebug.h>
#include <stdlib.h>
-void KReplaceTest::replace( const QString &pattern, const QString &replacement, long options )
+void KReplaceTest::replace( const TQString &pattern, const TQString &replacement, long options )
{
m_needEventLoop = false;
// This creates a replace-next-prompt dialog if needed.
@@ -38,14 +38,14 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement,
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_replace, SIGNAL( highlight( const QString &, int, int ) ),
- this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ connect(m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
// Connect findNext signal - called when pressing the button in the dialog
- connect(m_replace, SIGNAL( findNext() ),
- this, SLOT( slotReplaceNext() ) );
+ connect(m_replace, TQT_SIGNAL( findNext() ),
+ this, TQT_SLOT( slotReplaceNext() ) );
// Connect replace signal - called when doing a replacement
- connect(m_replace, SIGNAL( replace(const QString &, int, int, int) ),
- this, SLOT( slotReplace(const QString &, int, int, int) ) );
+ connect(m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
// Go to initial position
if ( (options & KReplaceDialog::FromCursor) == 0 )
@@ -63,7 +63,7 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement,
qApp->eventLoop()->enterLoop();
}
-void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int matchedLength )
+void KReplaceTest::slotHighlight( const TQString &str, int matchingIndex, int matchedLength )
{
kdDebug() << "slotHighlight Index:" << matchingIndex << " Length:" << matchedLength
<< " Substr:" << str.mid(matchingIndex, matchedLength)
@@ -79,7 +79,7 @@ void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int mat
}
-void KReplaceTest::slotReplace(const QString &text, int replacementIndex, int replacedLength, int matchedLength)
+void KReplaceTest::slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength)
{
kdDebug() << "slotReplace index=" << replacementIndex << " replacedLength=" << replacedLength << " matchedLength=" << matchedLength << " text=" << text.left( 50 ) << endl;
*m_currentPos = text; // KReplace hacked the replacement into 'text' in already.
@@ -120,7 +120,7 @@ void KReplaceTest::slotReplaceNext()
void KReplaceTest::print()
{
- QStringList::Iterator it = m_text.begin();
+ TQStringList::Iterator it = m_text.begin();
for ( ; it != m_text.end() ; ++it )
kdDebug() << *it << endl;
}
@@ -130,9 +130,9 @@ void KReplaceTest::print()
static void testReplaceSimple( int options, int button = 0 )
{
kdDebug() << "testReplaceSimple: " << options << endl;
- KReplaceTest test( QString( "hellohello" ), button );
+ KReplaceTest test( TQString( "hellohello" ), button );
test.replace( "hello", "HELLO", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "HELLOHELLO" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'" << endl;
@@ -145,9 +145,9 @@ static void testReplaceSimple( int options, int button = 0 )
static void testReplaceBlank( int options, int button = 0 )
{
kdDebug() << "testReplaceBlank: " << options << endl;
- KReplaceTest test( QString( "aaaaaa" ), button );
+ KReplaceTest test( TQString( "aaaaaa" ), button );
test.replace( "a", "", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( !textLines[ 0 ].isEmpty() ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of ''" << endl;
@@ -160,9 +160,9 @@ static void testReplaceBlank( int options, int button = 0 )
static void testReplaceBlankSearch( int options, int button = 0 )
{
kdDebug() << "testReplaceBlankSearch: " << options << endl;
- KReplaceTest test( QString( "bbbb" ), button );
+ KReplaceTest test( TQString( "bbbb" ), button );
test.replace( "", "foo", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "foobfoobfoobfoobfoo" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'" << endl;
@@ -174,9 +174,9 @@ static void testReplaceLonger( int options, int button = 0 )
{
kdDebug() << "testReplaceLonger: " << options << endl;
// Standard test of a replacement string longer than the matched string
- KReplaceTest test( QString( "aaaa" ), button );
+ KReplaceTest test( TQString( "aaaa" ), button );
test.replace( "a", "bb", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "bbbbbbbb" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'" << endl;
@@ -188,9 +188,9 @@ static void testReplaceLongerInclude( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude: " << options << endl;
// Similar test, where the replacement string includes the search string
- KReplaceTest test( QString( "a foo b" ), button );
+ KReplaceTest test( TQString( "a foo b" ), button );
test.replace( "foo", "foobar", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "a foobar b" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'" << endl;
@@ -202,9 +202,9 @@ static void testReplaceLongerInclude2( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude2: " << options << endl;
// Similar test, but with more chances of matches inside the replacement string
- KReplaceTest test( QString( "aaaa" ), button );
+ KReplaceTest test( TQString( "aaaa" ), button );
test.replace( "a", "aa", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "aaaaaaaa" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'" << endl;
@@ -216,18 +216,18 @@ static void testReplaceLongerInclude2( int options, int button = 0 )
static void testReplaceBackRef( int options, int button = 0 )
{
kdDebug() << "testReplaceBackRef: " << options << endl;
- KReplaceTest test( QString( "abc def" ), button );
+ KReplaceTest test( TQString( "abc def" ), button );
test.replace( "abc", "(\\0)", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
- QString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
+ TQString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
if ( textLines[ 0 ] != expected ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl;
exit(1);
}
}
-static void testReplacementHistory( const QStringList& findHistory, const QStringList& replaceHistory )
+static void testReplacementHistory( const TQStringList& findHistory, const TQStringList& replaceHistory )
{
KReplaceDialog dlg( 0, 0, 0, findHistory, replaceHistory );
dlg.show();
@@ -237,8 +237,8 @@ static void testReplacementHistory( const QStringList& findHistory, const QStrin
static void testReplacementHistory()
{
- QStringList findHistory;
- QStringList replaceHistory;
+ TQStringList findHistory;
+ TQStringList replaceHistory;
findHistory << "foo" << "bar";
replaceHistory << "FOO" << "BAR";
testReplacementHistory( findHistory, replaceHistory );
@@ -246,7 +246,7 @@ static void testReplacementHistory()
findHistory.clear();
replaceHistory.clear();
findHistory << "foo" << "bar";
- replaceHistory << QString::null << "baz"; // #130831
+ replaceHistory << TQString::null << "baz"; // #130831
testReplacementHistory( findHistory, replaceHistory );
}
@@ -311,7 +311,7 @@ int main( int argc, char **argv )
testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
- QString text = "This file is part of the KDE project.\n"
+ TQString text = "This file is part of the KDE project.\n"
"This library is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public\n"
"License version 2, as published by the Free Software Foundation.\n"
@@ -329,7 +329,7 @@ int main( int argc, char **argv )
"ThisThis This, This. This\n"
"aGNU\n"
"free";
- KReplaceTest test( QStringList::split( '\n', text, true ), 0 );
+ KReplaceTest test( TQStringList::split( '\n', text, true ), 0 );
test.replace( "GNU", "KDE", 0 );
test.replace( "free", "*free*", 0 );
diff --git a/kutils/tests/kreplacetest.h b/kutils/tests/kreplacetest.h
index a60563e77..ff85ca34b 100644
--- a/kutils/tests/kreplacetest.h
+++ b/kutils/tests/kreplacetest.h
@@ -20,8 +20,8 @@
#ifndef KREPLACETEST_H
#define KREPLACETEST_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KReplace;
@@ -29,21 +29,21 @@ class KReplaceTest : public QObject
{
Q_OBJECT
public:
- KReplaceTest( const QStringList& text, int button )
- : QObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
+ KReplaceTest( const TQStringList& text, int button )
+ : TQObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
- void replace( const QString &pattern, const QString &replacement, long options );
+ void replace( const TQString &pattern, const TQString &replacement, long options );
void print();
- const QStringList& textLines() const { return m_text; }
+ const TQStringList& textLines() const { return m_text; }
public slots:
- void slotHighlight( const QString &, int, int );
+ void slotHighlight( const TQString &, int, int );
void slotReplaceNext();
- void slotReplace(const QString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
private:
- QStringList::Iterator m_currentPos;
- QStringList m_text;
+ TQStringList::Iterator m_currentPos;
+ TQStringList m_text;
KReplace* m_replace;
bool m_needEventLoop;
int m_button;
diff --git a/kwallet/backend/kwalletbackend.cc b/kwallet/backend/kwalletbackend.cc
index 5b9c29299..c208c4d69 100644
--- a/kwallet/backend/kwalletbackend.cc
+++ b/kwallet/backend/kwalletbackend.cc
@@ -29,9 +29,9 @@
#include <ksavefile.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include "blowfish.h"
#include "sha1.h"
@@ -59,7 +59,7 @@ static void initKWalletDir()
KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");
}
-Backend::Backend(const QString& name, bool isPath) : _name(name), _ref(0) {
+Backend::Backend(const TQString& name, bool isPath) : _name(name), _ref(0) {
initKWalletDir();
if (isPath) {
_path = name;
@@ -90,10 +90,10 @@ return 0;
}
-static int getRandomBlock(QByteArray& randBlock) {
+static int getRandomBlock(TQByteArray& randBlock) {
// First try /dev/urandom
- if (QFile::exists("/dev/urandom")) {
- QFile devrand("/dev/urandom");
+ if (TQFile::exists("/dev/urandom")) {
+ TQFile devrand("/dev/urandom");
if (devrand.open(IO_ReadOnly)) {
unsigned int rc = devrand.readBlock(randBlock.data(), randBlock.size());
@@ -107,8 +107,8 @@ static int getRandomBlock(QByteArray& randBlock) {
// If that failed, try /dev/random
// FIXME: open in noblocking mode!
- if (QFile::exists("/dev/random")) {
- QFile devrand("/dev/random");
+ if (TQFile::exists("/dev/random")) {
+ TQFile devrand("/dev/random");
if (devrand.open(IO_ReadOnly)) {
unsigned int rc = 0;
unsigned int cnt = 0;
@@ -134,8 +134,8 @@ static int getRandomBlock(QByteArray& randBlock) {
// EGD method
char *randFilename;
if ((randFilename = getenv("RANDFILE"))) {
- if (QFile::exists(randFilename)) {
- QFile devrand(randFilename);
+ if (TQFile::exists(randFilename)) {
+ TQFile devrand(randFilename);
if (devrand.open(IO_ReadOnly)) {
unsigned int rc = devrand.readBlock(randBlock.data(), randBlock.size());
if (rc != randBlock.size()) {
@@ -153,13 +153,13 @@ static int getRandomBlock(QByteArray& randBlock) {
// this should be SHA-512 for release probably
-static int password2hash(const QByteArray& password, QByteArray& hash) {
+static int password2hash(const TQByteArray& password, TQByteArray& hash) {
SHA1 sha;
int shasz = sha.size() / 8;
assert(shasz >= 20);
- QByteArray block1(shasz);
+ TQByteArray block1(shasz);
sha.process(password.data(), QMIN(password.size(), 16));
@@ -174,7 +174,7 @@ static int password2hash(const QByteArray& password, QByteArray& hash) {
if (password.size() > 16) {
sha.process(password.data() + 16, QMIN(password.size() - 16, 16));
- QByteArray block2(shasz);
+ TQByteArray block2(shasz);
// To make brute force take longer
for (int i = 0; i < 2000; i++) {
memcpy(block2.data(), sha.hash(), shasz);
@@ -187,7 +187,7 @@ static int password2hash(const QByteArray& password, QByteArray& hash) {
if (password.size() > 32) {
sha.process(password.data() + 32, QMIN(password.size() - 32, 16));
- QByteArray block3(shasz);
+ TQByteArray block3(shasz);
// To make brute force take longer
for (int i = 0; i < 2000; i++) {
memcpy(block3.data(), sha.hash(), shasz);
@@ -200,7 +200,7 @@ static int password2hash(const QByteArray& password, QByteArray& hash) {
if (password.size() > 48) {
sha.process(password.data() + 48, password.size() - 48);
- QByteArray block4(shasz);
+ TQByteArray block4(shasz);
// To make brute force take longer
for (int i = 0; i < 2000; i++) {
memcpy(block4.data(), sha.hash(), shasz);
@@ -243,16 +243,16 @@ static int password2hash(const QByteArray& password, QByteArray& hash) {
}
-bool Backend::exists(const QString& wallet) {
+bool Backend::exists(const TQString& wallet) {
initKWalletDir();
- QString path = KGlobal::dirs()->saveLocation("kwallet") + "/" + wallet + ".kwl";
+ TQString path = KGlobal::dirs()->saveLocation("kwallet") + "/" + wallet + ".kwl";
// Note: 60 bytes is presently the minimum size of a wallet file.
// Anything smaller is junk.
-return QFile::exists(path) && QFileInfo(path).size() >= 60;
+return TQFile::exists(path) && TQFileInfo(path).size() >= 60;
}
-QString Backend::openRCToString(int rc) {
+TQString Backend::openRCToString(int rc) {
switch (rc) {
case -255:
return i18n("Already open.");
@@ -275,24 +275,24 @@ QString Backend::openRCToString(int rc) {
case -6:
return i18n("Decryption error.");
default:
- return QString::null;
+ return TQString::null;
}
}
-int Backend::open(const QByteArray& password) {
+int Backend::open(const TQByteArray& password) {
if (_open) {
return -255; // already open
}
- QByteArray passhash;
+ TQByteArray passhash;
// No wallet existed. Let's create it.
// Note: 60 bytes is presently the minimum size of a wallet file.
// Anything smaller is junk and should be deleted.
- if (!QFile::exists(_path) || QFileInfo(_path).size() < 60) {
- QFile newfile(_path);
+ if (!TQFile::exists(_path) || TQFileInfo(_path).size() < 60) {
+ TQFile newfile(_path);
if (!newfile.open(IO_ReadWrite)) {
return -2; // error opening file
}
@@ -302,7 +302,7 @@ int Backend::open(const QByteArray& password) {
return 1; // new file opened, but OK
}
- QFile db(_path);
+ TQFile db(_path);
if (!db.open(IO_ReadOnly)) {
return -2; // error opening file
@@ -335,7 +335,7 @@ int Backend::open(const QByteArray& password) {
_hashes.clear();
// Read in the hashes
- QDataStream hds(&db);
+ TQDataStream hds(&db);
Q_UINT32 n;
hds >> n;
if (n > 0xffff) { // sanity check
@@ -345,13 +345,13 @@ int Backend::open(const QByteArray& password) {
for (size_t i = 0; i < n; ++i) {
KMD5::Digest d, d2; // judgment day
MD5Digest ba;
- QMap<MD5Digest,QValueList<MD5Digest> >::iterator it;
+ TQMap<MD5Digest,TQValueList<MD5Digest> >::iterator it;
Q_UINT32 fsz;
if (hds.atEnd()) return -43;
hds.readRawBytes(reinterpret_cast<char *>(d), 16);
hds >> fsz;
ba.duplicate(reinterpret_cast<char *>(d), 16);
- it = _hashes.insert(ba, QValueList<MD5Digest>());
+ it = _hashes.insert(ba, TQValueList<MD5Digest>());
for (size_t j = 0; j < fsz; ++j) {
hds.readRawBytes(reinterpret_cast<char *>(d2), 16);
ba.duplicate(reinterpret_cast<char *>(d2), 16);
@@ -360,7 +360,7 @@ int Backend::open(const QByteArray& password) {
}
// Read in the rest of the file.
- QByteArray encrypted = db.readAll();
+ TQByteArray encrypted = db.readAll();
assert(encrypted.size() < db.size());
BlowFish _bf;
@@ -432,17 +432,17 @@ int Backend::open(const QByteArray& password) {
sha.reset();
// chop off the leading blksz+4 bytes
- QByteArray tmpenc;
+ TQByteArray tmpenc;
tmpenc.duplicate(encrypted.data()+blksz+4, fsize);
encrypted.fill(0);
encrypted.duplicate(tmpenc.data(), tmpenc.size());
tmpenc.fill(0);
// Load the data structures up
- QDataStream eStream(encrypted, IO_ReadOnly);
+ TQDataStream eStream(encrypted, IO_ReadOnly);
while (!eStream.atEnd()) {
- QString folder;
+ TQString folder;
Q_UINT32 n;
eStream >> folder;
@@ -452,7 +452,7 @@ int Backend::open(const QByteArray& password) {
_entries[folder].clear();
for (size_t i = 0; i < n; i++) {
- QString key;
+ TQString key;
KWallet::Wallet::EntryType et = KWallet::Wallet::Unknown;
Entry *e = new Entry;
eStream >> key;
@@ -470,7 +470,7 @@ int Backend::open(const QByteArray& password) {
continue;
}
- QByteArray a;
+ TQByteArray a;
eStream >> a;
e->setValue(a);
e->setType(et);
@@ -484,13 +484,13 @@ int Backend::open(const QByteArray& password) {
}
-int Backend::sync(const QByteArray& password) {
+int Backend::sync(const TQByteArray& password) {
if (!_open) {
return -255; // not open yet
}
KSaveFile sf(_path, 0600);
- QFile *qf = sf.file();
+ TQFile *qf = sf.file();
if (!qf) {
sf.abort();
@@ -500,7 +500,7 @@ int Backend::sync(const QByteArray& password) {
qf->writeBlock(KWMAGIC, KWMAGIC_LEN);
// Write the version number
- QByteArray version(4);
+ TQByteArray version(4);
version[0] = KWALLET_VERSION_MAJOR;
version[1] = KWALLET_VERSION_MINOR;
version[2] = KWALLET_CIPHER_BLOWFISH_CBC;
@@ -508,20 +508,20 @@ int Backend::sync(const QByteArray& password) {
qf->writeBlock(version, 4);
// Holds the hashes we write out
- QByteArray hashes;
- QDataStream hashStream(hashes, IO_WriteOnly);
+ TQByteArray hashes;
+ TQDataStream hashStream(hashes, IO_WriteOnly);
KMD5 md5;
hashStream << static_cast<Q_UINT32>(_entries.count());
// Holds decrypted data prior to encryption
- QByteArray decrypted;
+ TQByteArray decrypted;
// FIXME: we should estimate the amount of data we will write in each
// buffer and resize them approximately in order to avoid extra
// resizes.
// populate decrypted
- QDataStream dStream(decrypted, IO_WriteOnly);
+ TQDataStream dStream(decrypted, IO_WriteOnly);
for (FolderMap::ConstIterator i = _entries.begin(); i != _entries.end(); ++i) {
dStream << i.key();
dStream << static_cast<Q_UINT32>(i.data().count());
@@ -552,7 +552,7 @@ int Backend::sync(const QByteArray& password) {
sha.process(decrypted.data(), decrypted.size());
// prepend and append the random data
- QByteArray wholeFile;
+ TQByteArray wholeFile;
long blksz = bf.blockSize();
long newsize = decrypted.size() +
blksz + // encrypted block
@@ -563,7 +563,7 @@ int Backend::sync(const QByteArray& password) {
newsize += delta;
wholeFile.resize(newsize);
- QByteArray randBlock;
+ TQByteArray randBlock;
randBlock.resize(blksz+delta);
if (getRandomBlock(randBlock) < 0) {
sha.reset();
@@ -597,7 +597,7 @@ int Backend::sync(const QByteArray& password) {
decrypted.fill(0);
// hash the passphrase
- QByteArray passhash;
+ TQByteArray passhash;
password2hash(password, passhash);
// encrypt the data
@@ -632,7 +632,7 @@ return 0;
}
-int Backend::close(const QByteArray& password) {
+int Backend::close(const TQByteArray& password) {
int rc = sync(password);
_open = false;
if (rc != 0) {
@@ -642,7 +642,7 @@ int Backend::close(const QByteArray& password) {
}
-const QString& Backend::walletName() const {
+const TQString& Backend::walletName() const {
return _name;
}
@@ -652,17 +652,17 @@ bool Backend::isOpen() const {
}
-QStringList Backend::folderList() const {
+TQStringList Backend::folderList() const {
return _entries.keys();
}
-QStringList Backend::entryList() const {
+TQStringList Backend::entryList() const {
return _entries[_folder].keys();
}
-Entry *Backend::readEntry(const QString& key) {
+Entry *Backend::readEntry(const TQString& key) {
Entry *rc = 0L;
if (_open && hasEntry(key)) {
@@ -673,14 +673,14 @@ return rc;
}
-QPtrList<Entry> Backend::readEntryList(const QString& key) {
- QPtrList<Entry> rc;
+TQPtrList<Entry> Backend::readEntryList(const TQString& key) {
+ TQPtrList<Entry> rc;
if (!_open) {
return rc;
}
- QRegExp re(key, true, true);
+ TQRegExp re(key, true, true);
const EntryMap& map = _entries[_folder];
for (EntryMap::ConstIterator i = map.begin(); i != map.end(); ++i) {
@@ -692,7 +692,7 @@ QPtrList<Entry> Backend::readEntryList(const QString& key) {
}
-bool Backend::createFolder(const QString& f) {
+bool Backend::createFolder(const TQString& f) {
if (_entries.contains(f)) {
return false;
}
@@ -701,13 +701,13 @@ bool Backend::createFolder(const QString& f) {
KMD5 folderMd5;
folderMd5.update(f.utf8());
- _hashes.insert(MD5Digest(folderMd5.rawDigest()), QValueList<MD5Digest>());
+ _hashes.insert(MD5Digest(folderMd5.rawDigest()), TQValueList<MD5Digest>());
return true;
}
-int Backend::renameEntry(const QString& oldName, const QString& newName) {
+int Backend::renameEntry(const TQString& oldName, const TQString& newName) {
EntryMap& emap = _entries[_folder];
EntryMap::Iterator oi = emap.find(oldName);
EntryMap::Iterator ni = emap.find(newName);
@@ -756,12 +756,12 @@ void Backend::writeEntry(Entry *e) {
}
-bool Backend::hasEntry(const QString& key) const {
+bool Backend::hasEntry(const TQString& key) const {
return _entries.contains(_folder) && _entries[_folder].contains(key);
}
-bool Backend::removeEntry(const QString& key) {
+bool Backend::removeEntry(const TQString& key) {
if (!_open) {
return false;
}
@@ -788,7 +788,7 @@ return false;
}
-bool Backend::removeFolder(const QString& f) {
+bool Backend::removeFolder(const TQString& f) {
if (!_open) {
return false;
}
@@ -797,7 +797,7 @@ bool Backend::removeFolder(const QString& f) {
if (fi != _entries.end()) {
if (_folder == f) {
- _folder = QString::null;
+ _folder = TQString::null;
}
for (EntryMap::Iterator ei = fi.data().begin(); ei != fi.data().end(); ++ei) {
@@ -816,14 +816,14 @@ return false;
}
-bool Backend::folderDoesNotExist(const QString& folder) const {
+bool Backend::folderDoesNotExist(const TQString& folder) const {
KMD5 md5;
md5.update(folder.utf8());
return !_hashes.contains(MD5Digest(md5.rawDigest()));
}
-bool Backend::entryDoesNotExist(const QString& folder, const QString& entry) const {
+bool Backend::entryDoesNotExist(const TQString& folder, const TQString& entry) const {
KMD5 md5;
md5.update(folder.utf8());
HashMap::const_iterator i = _hashes.find(MD5Digest(md5.rawDigest()));
diff --git a/kwallet/backend/kwalletbackend.h b/kwallet/backend/kwalletbackend.h
index f1e9e521d..9d46d25c9 100644
--- a/kwallet/backend/kwalletbackend.h
+++ b/kwallet/backend/kwalletbackend.h
@@ -24,9 +24,9 @@
#include <kmdcodec.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include "kwalletentry.h"
@@ -38,66 +38,66 @@ class MD5Digest;
*/
class KDE_EXPORT Backend {
public:
- Backend(const QString& name = "kdewallet", bool isPath = false);
+ Backend(const TQString& name = "kdewallet", bool isPath = false);
~Backend();
// Open and unlock the wallet.
- int open(const QByteArray& password);
+ int open(const TQByteArray& password);
// Close and lock the wallet (saving changes).
- int close(const QByteArray& password);
+ int close(const TQByteArray& password);
// Close the wallet, losing any changes.
int close();
// Write the wallet to disk
- int sync(const QByteArray& password);
+ int sync(const TQByteArray& password);
// Returns true if the current wallet is open.
bool isOpen() const;
// Returns the current wallet name.
- const QString& walletName() const;
+ const TQString& walletName() const;
// The list of folders.
- QStringList folderList() const;
+ TQStringList folderList() const;
// Force creation of a folder.
- bool createFolder(const QString& f);
+ bool createFolder(const TQString& f);
// Change the folder.
- void setFolder(const QString& f) { _folder = f; }
+ void setFolder(const TQString& f) { _folder = f; }
// Current folder. If empty, it's the global folder.
- const QString& folder() const { return _folder; }
+ const TQString& folder() const { return _folder; }
// Does it have this folder?
- bool hasFolder(const QString& f) const { return _entries.contains(f); }
+ bool hasFolder(const TQString& f) const { return _entries.contains(f); }
// Look up an entry. Returns null if it doesn't exist.
- Entry *readEntry(const QString& key);
+ Entry *readEntry(const TQString& key);
// Look up a list of entries. Supports wildcards.
// You delete the list.
- QPtrList<Entry> readEntryList(const QString& key);
+ TQPtrList<Entry> readEntryList(const TQString& key);
// Store an entry.
void writeEntry(Entry *e);
// Does this folder contain this entry?
- bool hasEntry(const QString& key) const;
+ bool hasEntry(const TQString& key) const;
// Returns true if the entry was removed
- bool removeEntry(const QString& key);
+ bool removeEntry(const TQString& key);
// Returns true if the folder was removed
- bool removeFolder(const QString& f);
+ bool removeFolder(const TQString& f);
// The list of entries in this folder.
- QStringList entryList() const;
+ TQStringList entryList() const;
// Rename an entry in this folder.
- int renameEntry(const QString& oldName, const QString& newName);
+ int renameEntry(const TQString& oldName, const TQString& newName);
int ref() { return ++_ref; }
@@ -105,37 +105,37 @@ class KDE_EXPORT Backend {
int refCount() const { return _ref; }
- static bool exists(const QString& wallet);
+ static bool exists(const TQString& wallet);
- bool folderDoesNotExist(const QString& folder) const;
+ bool folderDoesNotExist(const TQString& folder) const;
- bool entryDoesNotExist(const QString& folder, const QString& entry) const;
+ bool entryDoesNotExist(const TQString& folder, const TQString& entry) const;
- static QString openRCToString(int rc);
+ static TQString openRCToString(int rc);
private:
class BackendPrivate;
BackendPrivate *d;
- QString _name;
- QString _path;
+ TQString _name;
+ TQString _path;
bool _open;
- QString _folder;
+ TQString _folder;
int _ref;
// Map Folder->Entries
- typedef QMap< QString, Entry* > EntryMap;
- typedef QMap< QString, EntryMap > FolderMap;
+ typedef TQMap< TQString, Entry* > EntryMap;
+ typedef TQMap< TQString, EntryMap > FolderMap;
FolderMap _entries;
- typedef QMap<MD5Digest, QValueList<MD5Digest> > HashMap;
+ typedef TQMap<MD5Digest, TQValueList<MD5Digest> > HashMap;
HashMap _hashes;
};
/**
* @internal
*/
-class MD5Digest : public QByteArray {
+class MD5Digest : public TQByteArray {
public:
- MD5Digest() : QByteArray(16) {}
- MD5Digest(const KMD5::Digest d) : QByteArray() { duplicate(reinterpret_cast<const char *>(d), 16); }
+ MD5Digest() : TQByteArray(16) {}
+ MD5Digest(const KMD5::Digest d) : TQByteArray() { duplicate(reinterpret_cast<const char *>(d), 16); }
virtual ~MD5Digest() {}
int operator<(const MD5Digest& r) const {
diff --git a/kwallet/backend/kwalletentry.cc b/kwallet/backend/kwalletentry.cc
index da88610b1..4e74c03e3 100644
--- a/kwallet/backend/kwalletentry.cc
+++ b/kwallet/backend/kwalletentry.cc
@@ -31,25 +31,25 @@ Entry::~Entry() {
_value.fill(0);
}
-const QString& Entry::key() const {
+const TQString& Entry::key() const {
return _key;
}
-const QByteArray& Entry::value() const {
+const TQByteArray& Entry::value() const {
return _value;
}
-QString Entry::password() const {
-QString x;
- QDataStream qds(_value, IO_ReadOnly);
+TQString Entry::password() const {
+TQString x;
+ TQDataStream qds(_value, IO_ReadOnly);
qds >> x;
return x;
}
-void Entry::setValue(const QByteArray& val) {
+void Entry::setValue(const TQByteArray& val) {
// do a direct copy from one into the other without
// temporary variables
_value.fill(0);
@@ -57,14 +57,14 @@ void Entry::setValue(const QByteArray& val) {
}
-void Entry::setValue(const QString& val) {
+void Entry::setValue(const TQString& val) {
_value.fill(0);
- QDataStream qds(_value, IO_WriteOnly);
+ TQDataStream qds(_value, IO_WriteOnly);
qds << val;
}
-void Entry::setKey(const QString& key) {
+void Entry::setKey(const TQString& key) {
_key = key;
}
diff --git a/kwallet/backend/kwalletentry.h b/kwallet/backend/kwalletentry.h
index 7f8c88448..530e1a828 100644
--- a/kwallet/backend/kwalletentry.h
+++ b/kwallet/backend/kwalletentry.h
@@ -22,8 +22,8 @@
#ifndef _KWALLETENTRY_H
#define _KWALLETENTRY_H
-#include <qstring.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
#include "kwallet.h"
@@ -36,14 +36,14 @@ class KDE_EXPORT Entry {
Entry();
~Entry();
- const QString& key() const;
- const QByteArray& value() const;
- QString password() const;
- const QByteArray& map() const { return value(); }
+ const TQString& key() const;
+ const TQByteArray& value() const;
+ TQString password() const;
+ const TQByteArray& map() const { return value(); }
- void setValue(const QByteArray& val);
- void setValue(const QString& val);
- void setKey(const QString& key);
+ void setValue(const TQByteArray& val);
+ void setValue(const TQString& val);
+ void setKey(const TQString& key);
Wallet::EntryType type() const;
void setType(Wallet::EntryType type);
@@ -51,8 +51,8 @@ class KDE_EXPORT Entry {
void copy(const Entry* x);
private:
- QString _key;
- QByteArray _value;
+ TQString _key;
+ TQByteArray _value;
Wallet::EntryType _type;
};
diff --git a/kwallet/backend/tests/backendtest.cpp b/kwallet/backend/tests/backendtest.cpp
index a38c8cdb3..e7599b3a2 100644
--- a/kwallet/backend/tests/backendtest.cpp
+++ b/kwallet/backend/tests/backendtest.cpp
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <kapplication.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "kwalletbackend.h"
@@ -12,7 +12,7 @@ int main(int argc, char **argv) {
KWallet::Backend be("ktestwallet");
printf("KWalletBackend constructed\n");
- QByteArray apass, bpass, cpass;
+ TQByteArray apass, bpass, cpass;
apass.duplicate("apassword", 9);
bpass.duplicate("bpassword", 9);
diff --git a/kwallet/client/kwallet.cc b/kwallet/client/kwallet.cc
index 266135f85..0575050e5 100644
--- a/kwallet/client/kwallet.cc
+++ b/kwallet/client/kwallet.cc
@@ -25,68 +25,68 @@
#include <kdeversion.h>
#include <dcopclient.h>
#include <dcopref.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
#include <assert.h>
using namespace KWallet;
-const QString Wallet::LocalWallet() {
+const TQString Wallet::LocalWallet() {
KConfig cfg("kwalletrc", true);
cfg.setGroup("Wallet");
if (!cfg.readBoolEntry("Use One Wallet", true)) {
- QString tmp = cfg.readEntry("Local Wallet", "localwallet");
+ TQString tmp = cfg.readEntry("Local Wallet", "localwallet");
if (tmp.isEmpty()) {
return "localwallet";
}
return tmp;
}
- QString tmp = cfg.readEntry("Default Wallet", "kdewallet");
+ TQString tmp = cfg.readEntry("Default Wallet", "kdewallet");
if (tmp.isEmpty()) {
return "kdewallet";
}
return tmp;
}
-const QString Wallet::NetworkWallet() {
+const TQString Wallet::NetworkWallet() {
KConfig cfg("kwalletrc", true);
cfg.setGroup("Wallet");
- QString tmp = cfg.readEntry("Default Wallet", "kdewallet");
+ TQString tmp = cfg.readEntry("Default Wallet", "kdewallet");
if (tmp.isEmpty()) {
return "kdewallet";
}
return tmp;
}
-const QString Wallet::PasswordFolder() {
+const TQString Wallet::PasswordFolder() {
return "Passwords";
}
-const QString Wallet::FormDataFolder() {
+const TQString Wallet::FormDataFolder() {
return "Form Data";
}
-Wallet::Wallet(int handle, const QString& name)
-: QObject(0L), DCOPObject(), d(0L), _name(name), _handle(handle) {
+Wallet::Wallet(int handle, const TQString& name)
+: TQObject(0L), DCOPObject(), d(0L), _name(name), _handle(handle) {
_dcopRef = new DCOPRef("kded", "kwalletd");
_dcopRef->dcopClient()->setNotifications(true);
connect(_dcopRef->dcopClient(),
- SIGNAL(applicationRemoved(const QCString&)),
+ TQT_SIGNAL(applicationRemoved(const TQCString&)),
this,
- SLOT(slotAppUnregistered(const QCString&)));
+ TQT_SLOT(slotAppUnregistered(const TQCString&)));
connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "walletClosed(int)", "slotWalletClosed(int)", false);
- connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderListUpdated(QString)", "slotFolderListUpdated(QString)", false);
- connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderUpdated(QString, QString)", "slotFolderUpdated(QString, QString)", false);
- connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "applicationDisconnected(QString, QCString)", "slotApplicationDisconnected(QString, QCString)", false);
+ connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderListUpdated(TQString)", "slotFolderListUpdated(TQString)", false);
+ connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "folderUpdated(TQString, TQString)", "slotFolderUpdated(TQString, TQString)", false);
+ connectDCOPSignal(_dcopRef->app(), _dcopRef->obj(), "applicationDisconnected(TQString, TQCString)", "slotApplicationDisconnected(TQString, TQCString)", false);
// Verify that the wallet is still open
if (_handle != -1) {
@@ -96,7 +96,7 @@ Wallet::Wallet(int handle, const QString& name)
r.get(rc);
if (!rc) {
_handle = -1;
- _name = QString::null;
+ _name = TQString::null;
}
}
}
@@ -107,8 +107,8 @@ Wallet::~Wallet() {
if (_handle != -1) {
_dcopRef->call("close", _handle, false);
_handle = -1;
- _folder = QString::null;
- _name = QString::null;
+ _folder = TQString::null;
+ _name = TQString::null;
}
delete _dcopRef;
@@ -116,9 +116,9 @@ Wallet::~Wallet() {
}
-QStringList Wallet::walletList() {
+TQStringList Wallet::walletList() {
DCOPReply r = DCOPRef("kded", "kwalletd").call("wallets");
- QStringList rc;
+ TQStringList rc;
if (r.isValid()) {
r.get(rc);
}
@@ -126,7 +126,7 @@ QStringList Wallet::walletList() {
}
-void Wallet::changePassword(const QString& name, WId w) {
+void Wallet::changePassword(const TQString& name, WId w) {
DCOPRef("kded", "kwalletd").send("changePassword", name, uint(w));
}
@@ -141,7 +141,7 @@ bool Wallet::isEnabled() {
}
-bool Wallet::isOpen(const QString& name) {
+bool Wallet::isOpen(const TQString& name) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("isOpen", name);
bool rc = false;
if (r.isValid()) {
@@ -151,7 +151,7 @@ bool Wallet::isOpen(const QString& name) {
}
-int Wallet::closeWallet(const QString& name, bool force) {
+int Wallet::closeWallet(const TQString& name, bool force) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("close", name, force);
int rc = -1;
if (r.isValid()) {
@@ -161,7 +161,7 @@ int Wallet::closeWallet(const QString& name, bool force) {
}
-int Wallet::deleteWallet(const QString& name) {
+int Wallet::deleteWallet(const TQString& name) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("deleteWallet", name);
int rc = -1;
if (r.isValid()) {
@@ -171,7 +171,7 @@ int Wallet::deleteWallet(const QString& name) {
}
-Wallet *Wallet::openWallet(const QString& name, WId w, OpenType ot) {
+Wallet *Wallet::openWallet(const TQString& name, WId w, OpenType ot) {
if (ot == Asynchronous) {
Wallet *wallet = new Wallet(-1, name);
DCOPRef("kded", "kwalletd").send("openAsynchronous", name, wallet->objId(), uint(w));
@@ -179,7 +179,7 @@ Wallet *Wallet::openWallet(const QString& name, WId w, OpenType ot) {
}
// avoid deadlock if the app has some popup open (#65978/#71048)
- while( QWidget* widget = qApp->activePopupWidget())
+ while( TQWidget* widget = qApp->activePopupWidget())
widget->close();
bool isPath = ot == Path;
@@ -203,7 +203,7 @@ Wallet *Wallet::openWallet(const QString& name, WId w, OpenType ot) {
}
-bool Wallet::disconnectApplication(const QString& wallet, const QCString& app) {
+bool Wallet::disconnectApplication(const TQString& wallet, const TQCString& app) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("disconnectApplication", wallet, app);
bool rc = false;
if (r.isValid()) {
@@ -213,9 +213,9 @@ bool Wallet::disconnectApplication(const QString& wallet, const QCString& app) {
}
-QStringList Wallet::users(const QString& name) {
+TQStringList Wallet::users(const TQString& name) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("users", name);
- QStringList drc;
+ TQStringList drc;
if (r.isValid()) {
r.get(drc);
}
@@ -240,8 +240,8 @@ int Wallet::lockWallet() {
DCOPReply r = _dcopRef->call("close", _handle, true);
_handle = -1;
- _folder = QString::null;
- _name = QString::null;
+ _folder = TQString::null;
+ _name = TQString::null;
if (r.isValid()) {
int drc = -1;
r.get(drc);
@@ -251,7 +251,7 @@ int Wallet::lockWallet() {
}
-const QString& Wallet::walletName() const {
+const TQString& Wallet::walletName() const {
return _name;
}
@@ -273,15 +273,15 @@ void Wallet::requestChangePassword(WId w) {
void Wallet::slotWalletClosed(int handle) {
if (_handle == handle) {
_handle = -1;
- _folder = QString::null;
- _name = QString::null;
+ _folder = TQString::null;
+ _name = TQString::null;
emit walletClosed();
}
}
-QStringList Wallet::folderList() {
- QStringList rc;
+TQStringList Wallet::folderList() {
+ TQStringList rc;
if (_handle == -1) {
return rc;
@@ -296,8 +296,8 @@ QStringList Wallet::folderList() {
}
-QStringList Wallet::entryList() {
- QStringList rc;
+TQStringList Wallet::entryList() {
+ TQStringList rc;
if (_handle == -1) {
return rc;
@@ -312,7 +312,7 @@ QStringList Wallet::entryList() {
}
-bool Wallet::hasFolder(const QString& f) {
+bool Wallet::hasFolder(const TQString& f) {
bool rc = false;
if (_handle == -1) {
@@ -328,7 +328,7 @@ bool Wallet::hasFolder(const QString& f) {
}
-bool Wallet::createFolder(const QString& f) {
+bool Wallet::createFolder(const TQString& f) {
bool rc = true;
if (_handle == -1) {
@@ -346,7 +346,7 @@ bool Wallet::createFolder(const QString& f) {
}
-bool Wallet::setFolder(const QString& f) {
+bool Wallet::setFolder(const TQString& f) {
bool rc = false;
if (_handle == -1) {
@@ -369,7 +369,7 @@ bool Wallet::setFolder(const QString& f) {
}
-bool Wallet::removeFolder(const QString& f) {
+bool Wallet::removeFolder(const TQString& f) {
bool rc = false;
if (_handle == -1) {
@@ -382,19 +382,19 @@ bool Wallet::removeFolder(const QString& f) {
}
if (_folder == f) {
- setFolder(QString::null);
+ setFolder(TQString::null);
}
return rc;
}
-const QString& Wallet::currentFolder() const {
+const TQString& Wallet::currentFolder() const {
return _folder;
}
-int Wallet::readEntry(const QString& key, QByteArray& value) {
+int Wallet::readEntry(const TQString& key, TQByteArray& value) {
int rc = -1;
if (_handle == -1) {
@@ -411,7 +411,7 @@ int Wallet::readEntry(const QString& key, QByteArray& value) {
}
-int Wallet::readEntryList(const QString& key, QMap<QString, QByteArray>& value) {
+int Wallet::readEntryList(const TQString& key, TQMap<TQString, TQByteArray>& value) {
int rc = -1;
if (_handle == -1) {
@@ -428,7 +428,7 @@ int Wallet::readEntryList(const QString& key, QMap<QString, QByteArray>& value)
}
-int Wallet::renameEntry(const QString& oldName, const QString& newName) {
+int Wallet::renameEntry(const TQString& oldName, const TQString& newName) {
int rc = -1;
if (_handle == -1) {
@@ -444,7 +444,7 @@ int Wallet::renameEntry(const QString& oldName, const QString& newName) {
}
-int Wallet::readMap(const QString& key, QMap<QString,QString>& value) {
+int Wallet::readMap(const TQString& key, TQMap<TQString,TQString>& value) {
int rc = -1;
if (_handle == -1) {
@@ -453,10 +453,10 @@ int Wallet::readMap(const QString& key, QMap<QString,QString>& value) {
DCOPReply r = _dcopRef->call("readMap", _handle, _folder, key);
if (r.isValid()) {
- QByteArray v;
+ TQByteArray v;
r.get(v);
if (!v.isEmpty()) {
- QDataStream ds(v, IO_ReadOnly);
+ TQDataStream ds(v, IO_ReadOnly);
ds >> value;
}
rc = 0;
@@ -466,7 +466,7 @@ int Wallet::readMap(const QString& key, QMap<QString,QString>& value) {
}
-int Wallet::readMapList(const QString& key, QMap<QString, QMap<QString, QString> >& value) {
+int Wallet::readMapList(const TQString& key, TQMap<TQString, TQMap<TQString, TQString> >& value) {
int rc = -1;
if (_handle == -1) {
@@ -475,12 +475,12 @@ int Wallet::readMapList(const QString& key, QMap<QString, QMap<QString, QString>
DCOPReply r = _dcopRef->call("readMapList", _handle, _folder, key);
if (r.isValid()) {
- QMap<QString,QByteArray> unparsed;
+ TQMap<TQString,TQByteArray> unparsed;
r.get(unparsed);
- for (QMap<QString,QByteArray>::ConstIterator i = unparsed.begin(); i != unparsed.end(); ++i) {
+ for (TQMap<TQString,TQByteArray>::ConstIterator i = unparsed.begin(); i != unparsed.end(); ++i) {
if (!i.data().isEmpty()) {
- QDataStream ds(i.data(), IO_ReadOnly);
- QMap<QString,QString> v;
+ TQDataStream ds(i.data(), IO_ReadOnly);
+ TQMap<TQString,TQString> v;
ds >> v;
value.insert(i.key(), v);
}
@@ -492,7 +492,7 @@ int Wallet::readMapList(const QString& key, QMap<QString, QMap<QString, QString>
}
-int Wallet::readPassword(const QString& key, QString& value) {
+int Wallet::readPassword(const TQString& key, TQString& value) {
int rc = -1;
if (_handle == -1) {
@@ -509,7 +509,7 @@ int Wallet::readPassword(const QString& key, QString& value) {
}
-int Wallet::readPasswordList(const QString& key, QMap<QString, QString>& value) {
+int Wallet::readPasswordList(const TQString& key, TQMap<TQString, TQString>& value) {
int rc = -1;
if (_handle == -1) {
@@ -526,7 +526,7 @@ int Wallet::readPasswordList(const QString& key, QMap<QString, QString>& value)
}
-int Wallet::writeEntry(const QString& key, const QByteArray& value, EntryType entryType) {
+int Wallet::writeEntry(const TQString& key, const TQByteArray& value, EntryType entryType) {
int rc = -1;
if (_handle == -1) {
@@ -542,7 +542,7 @@ int Wallet::writeEntry(const QString& key, const QByteArray& value, EntryType en
}
-int Wallet::writeEntry(const QString& key, const QByteArray& value) {
+int Wallet::writeEntry(const TQString& key, const TQByteArray& value) {
int rc = -1;
if (_handle == -1) {
@@ -558,15 +558,15 @@ int Wallet::writeEntry(const QString& key, const QByteArray& value) {
}
-int Wallet::writeMap(const QString& key, const QMap<QString,QString>& value) {
+int Wallet::writeMap(const TQString& key, const TQMap<TQString,TQString>& value) {
int rc = -1;
if (_handle == -1) {
return rc;
}
- QByteArray a;
- QDataStream ds(a, IO_WriteOnly);
+ TQByteArray a;
+ TQDataStream ds(a, IO_WriteOnly);
ds << value;
DCOPReply r = _dcopRef->call("writeMap", _handle, _folder, key, a);
if (r.isValid()) {
@@ -577,7 +577,7 @@ int Wallet::writeMap(const QString& key, const QMap<QString,QString>& value) {
}
-int Wallet::writePassword(const QString& key, const QString& value) {
+int Wallet::writePassword(const TQString& key, const TQString& value) {
int rc = -1;
if (_handle == -1) {
@@ -593,7 +593,7 @@ int Wallet::writePassword(const QString& key, const QString& value) {
}
-bool Wallet::hasEntry(const QString& key) {
+bool Wallet::hasEntry(const TQString& key) {
bool rc = false;
if (_handle == -1) {
@@ -609,7 +609,7 @@ bool Wallet::hasEntry(const QString& key) {
}
-int Wallet::removeEntry(const QString& key) {
+int Wallet::removeEntry(const TQString& key) {
int rc = -1;
if (_handle == -1) {
@@ -625,7 +625,7 @@ int Wallet::removeEntry(const QString& key) {
}
-Wallet::EntryType Wallet::entryType(const QString& key) {
+Wallet::EntryType Wallet::entryType(const TQString& key) {
int rc = 0;
if (_handle == -1) {
@@ -641,28 +641,28 @@ Wallet::EntryType Wallet::entryType(const QString& key) {
}
-void Wallet::slotAppUnregistered(const QCString& app) {
+void Wallet::slotAppUnregistered(const TQCString& app) {
if (_handle >= 0 && app == "kded") {
slotWalletClosed(_handle);
}
}
-void Wallet::slotFolderUpdated(const QString& wallet, const QString& folder) {
+void Wallet::slotFolderUpdated(const TQString& wallet, const TQString& folder) {
if (_name == wallet) {
emit folderUpdated(folder);
}
}
-void Wallet::slotFolderListUpdated(const QString& wallet) {
+void Wallet::slotFolderListUpdated(const TQString& wallet) {
if (_name == wallet) {
emit folderListUpdated();
}
}
-void Wallet::slotApplicationDisconnected(const QString& wallet, const QCString& application) {
+void Wallet::slotApplicationDisconnected(const TQString& wallet, const TQCString& application) {
if (_handle >= 0
&& _name == wallet
&& application == _dcopRef->dcopClient()->appId()) {
@@ -686,7 +686,7 @@ void Wallet::walletOpenResult(int id) {
}
-bool Wallet::folderDoesNotExist(const QString& wallet, const QString& folder) {
+bool Wallet::folderDoesNotExist(const TQString& wallet, const TQString& folder) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("folderDoesNotExist", wallet, folder);
bool rc = true;
if (r.isValid()) {
@@ -696,7 +696,7 @@ return rc;
}
-bool Wallet::keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key) {
+bool Wallet::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) {
DCOPReply r = DCOPRef("kded", "kwalletd").call("keyDoesNotExist", wallet, folder, key);
bool rc = true;
if (r.isValid()) {
diff --git a/kwallet/client/kwallet.h b/kwallet/client/kwallet.h
index e49839ddc..b7b3bce31 100644
--- a/kwallet/client/kwallet.h
+++ b/kwallet/client/kwallet.h
@@ -22,12 +22,12 @@
#ifndef _KWALLET_H
#define _KWALLET_H
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_OS_UNIX
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include <dcopobject.h>
class DCOPRef;
@@ -45,7 +45,7 @@ namespace KWallet {
* @author George Staikos <staikos@kde.org>
* @short KDE Wallet Class
*/
-class KIO_EXPORT Wallet : public QObject, public DCOPObject {
+class KIO_EXPORT Wallet : public TQObject, public DCOPObject {
K_DCOP
Q_OBJECT
protected:
@@ -55,7 +55,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param handle The handle for the wallet.
* @param name The name of the wallet.
*/
- Wallet(int handle, const QString& name);
+ Wallet(int handle, const TQString& name);
/**
* Copy a KWallet object.
* @internal
@@ -75,7 +75,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns a list of the names of all wallets that are
* open.
*/
- static QStringList walletList();
+ static TQStringList walletList();
/**
* Determine if the KDE wallet is enabled. Normally you do
@@ -89,7 +89,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param name The name of the wallet to check.
* @return Returns true if the wallet is open, else false.
*/
- static bool isOpen(const QString& name);
+ static bool isOpen(const TQString& name);
/**
* Close the wallet @p name. The wallet will only be closed
@@ -100,7 +100,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* is in use by others.
* @return Returns 0 on success, non-zero on error.
*/
- static int closeWallet(const QString& name, bool force);
+ static int closeWallet(const TQString& name, bool force);
/**
* Delete the wallet @p name. The wallet will be forced closed
@@ -108,7 +108,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param name The name of the wallet to delete.
* @return Returns 0 on success, non-zero on error.
*/
- static int deleteWallet(const QString& name);
+ static int deleteWallet(const TQString& name);
/**
* Disconnect the application @p app from @p wallet.
@@ -116,7 +116,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param app The name of the application to disconnect.
* @return Returns true on success, false on error.
*/
- static bool disconnectApplication(const QString& wallet, const QCString& app);
+ static bool disconnectApplication(const TQString& wallet, const TQCString& app);
enum OpenType { Synchronous=0, Asynchronous, Path, OpenTypeUnused=0xff };
@@ -136,7 +136,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns a pointer to the wallet if successful,
* or a null pointer on error or if rejected.
*/
- static Wallet* openWallet(const QString& name, WId w = 0, OpenType ot = Synchronous);
+ static Wallet* openWallet(const TQString& name, WId w = 0, OpenType ot = Synchronous);
/**
* List the applications that are using the wallet @p wallet.
@@ -144,17 +144,17 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns a list of all DCOP application IDs using
* the wallet.
*/
- static QStringList users(const QString& wallet);
+ static TQStringList users(const TQString& wallet);
/**
* The name of the wallet used to store local passwords.
*/
- static const QString LocalWallet();
+ static const TQString LocalWallet();
/**
* The name of the wallet used to store network passwords.
*/
- static const QString NetworkWallet();
+ static const TQString NetworkWallet();
/**
* The standardized name of the password folder.
@@ -162,7 +162,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* the user may still delete it so you should check for its
* existence and recreate it if necessary and desired.
*/
- static const QString PasswordFolder();
+ static const TQString PasswordFolder();
/**
* The standardized name of the form data folder.
@@ -170,7 +170,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* the user may still delete it so you should check for its
* existence and recreate it if necessary and desired.
*/
- static const QString FormDataFolder();
+ static const TQString FormDataFolder();
/**
* Request to the wallet service to change the password of
@@ -178,7 +178,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param name The the wallet to change the password of.
* @param w The window id to associate any dialogs with.
*/
- static void changePassword(const QString& name, WId w = 0);
+ static void changePassword(const TQString& name, WId w = 0);
/**
* This syncs the wallet file on disk with what is in memory.
@@ -198,7 +198,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
/**
* The name of the current wallet.
*/
- virtual const QString& walletName() const;
+ virtual const TQString& walletName() const;
/**
* Determine if the current wallet is open, and is a valid
@@ -218,14 +218,14 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* Obtain the list of all folders contained in the wallet.
* @return Returns an empty list if the wallet is not open.
*/
- virtual QStringList folderList();
+ virtual TQStringList folderList();
/**
* Determine if the folder @p f exists in the wallet.
* @param f the name of the folder to check for
* @return Returns true if the folder exists in the wallet.
*/
- virtual bool hasFolder(const QString& f);
+ virtual bool hasFolder(const TQString& f);
/**
* Set the current working folder to @p f. The folder must
@@ -234,21 +234,21 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param f the name of the folder to make the working folder
* @return Returns true if the folder was successfully set.
*/
- virtual bool setFolder(const QString& f);
+ virtual bool setFolder(const TQString& f);
/**
* Remove the folder @p f and all its entries from the wallet.
* @param f the name of the folder to remove
* @return Returns true if the folder was successfully removed.
*/
- virtual bool removeFolder(const QString& f);
+ virtual bool removeFolder(const TQString& f);
/**
* Created the folder @p f.
* @param f the name of the folder to create
* @return Returns true if the folder was successfully created.
*/
- virtual bool createFolder(const QString& f);
+ virtual bool createFolder(const TQString& f);
/**
* Determine the current working folder in the wallet.
@@ -256,14 +256,14 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* folder, which is valid but discouraged.
* @return Returns the current working folder.
*/
- virtual const QString& currentFolder() const;
+ virtual const TQString& currentFolder() const;
/**
* Return the list of keys of all entries in this folder.
* @return Returns an empty list if the wallet is not open, or
* if the folder is empty.
*/
- virtual QStringList entryList();
+ virtual TQStringList entryList();
/**
* Rename the entry @p oldName to @p newName.
@@ -271,18 +271,18 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param newName The new key of the entry.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int renameEntry(const QString& oldName, const QString& newName);
+ virtual int renameEntry(const TQString& oldName, const TQString& newName);
/**
* Read the entry @p key from the current folder.
* The entry format is unknown except that it is either a
- * QByteArray or a QDataStream, which effectively means that
+ * TQByteArray or a TQDataStream, which effectively means that
* it is anything.
* @param key The key of the entry to read.
* @param value A buffer to fill with the value.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int readEntry(const QString& key, QByteArray& value);
+ virtual int readEntry(const TQString& key, TQByteArray& value);
/**
* Read the map entry @p key from the current folder.
@@ -292,7 +292,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* return an error if the key was not originally
* written as a map.
*/
- virtual int readMap(const QString& key, QMap<QString,QString>& value);
+ virtual int readMap(const TQString& key, TQMap<TQString,TQString>& value);
/**
* Read the password entry @p key from the current folder.
@@ -302,12 +302,12 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* return an error if the key was not originally
* written as a password.
*/
- virtual int readPassword(const QString& key, QString& value);
+ virtual int readPassword(const TQString& key, TQString& value);
/**
* Read the entries matching @p key from the current folder.
* The entry format is unknown except that it is either a
- * QByteArray or a QDataStream, which effectively means that
+ * TQByteArray or a TQDataStream, which effectively means that
* it is anything.
* @param key The key of the entry to read. Wildcards
* are supported.
@@ -316,7 +316,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns 0 on success, non-zero on error.
* @since 3.4
*/
- int readEntryList(const QString& key, QMap<QString, QByteArray>& value);
+ int readEntryList(const TQString& key, TQMap<TQString, TQByteArray>& value);
/**
* Read the map entry @p key from the current folder.
@@ -329,7 +329,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* written as a map.
* @since 3.4
*/
- int readMapList(const QString& key, QMap<QString, QMap<QString, QString> >& value);
+ int readMapList(const TQString& key, TQMap<TQString, TQMap<TQString, TQString> >& value);
/**
* Read the password entry @p key from the current folder.
@@ -342,7 +342,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* written as a password.
* @since 3.4
*/
- int readPasswordList(const QString& key, QMap<QString, QString>& value);
+ int readPasswordList(const TQString& key, TQMap<TQString, TQString>& value);
/**
* Write @p key = @p value as a binary entry to the current
@@ -354,7 +354,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param entryType The type of the entry.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int writeEntry(const QString& key, const QByteArray& value, EntryType entryType);
+ virtual int writeEntry(const TQString& key, const TQByteArray& value, EntryType entryType);
/**
* Write @p key = @p value as a binary entry to the current
@@ -363,7 +363,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param value The value of the entry.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int writeEntry(const QString& key, const QByteArray& value);
+ virtual int writeEntry(const TQString& key, const TQByteArray& value);
/**
* Write @p key = @p value as a map to the current folder.
@@ -371,7 +371,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param value The value of the map.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int writeMap(const QString& key, const QMap<QString,QString>& value);
+ virtual int writeMap(const TQString& key, const TQMap<TQString,TQString>& value);
/**
* Write @p key = @p value as a password to the current folder.
@@ -379,21 +379,21 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @param value The value of the password.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int writePassword(const QString& key, const QString& value);
+ virtual int writePassword(const TQString& key, const TQString& value);
/**
* Determine if the current folder has they entry @p key.
* @param key The key to search for.
* @return Returns true if the folder contains @p key.
*/
- virtual bool hasEntry(const QString& key);
+ virtual bool hasEntry(const TQString& key);
/**
* Remove the entry @p key from the current folder.
* @param key The key to remove.
* @return Returns 0 on success, non-zero on error.
*/
- virtual int removeEntry(const QString& key);
+ virtual int removeEntry(const TQString& key);
/**
* Determine the type of the entry @p key in this folder.
@@ -401,7 +401,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns an enumerated type representing the type
* of the entry.
*/
- virtual EntryType entryType(const QString& key);
+ virtual EntryType entryType(const TQString& key);
/**
* Determine if a folder does not exist in a wallet. This
@@ -413,7 +413,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns true if the folder does NOT exist in the
* wallet, or the wallet does not exist.
*/
- static bool folderDoesNotExist(const QString& wallet, const QString& folder);
+ static bool folderDoesNotExist(const TQString& wallet, const TQString& folder);
/**
* Determine if an entry in a folder does not exist in a
@@ -426,8 +426,8 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @return Returns true if the key does NOT exist in the
* wallet, or the folder or wallet does not exist.
*/
- static bool keyDoesNotExist(const QString& wallet, const QString& folder,
- const QString& key);
+ static bool keyDoesNotExist(const TQString& wallet, const TQString& folder,
+ const TQString& key);
signals:
/**
@@ -439,7 +439,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* Emitted when a folder in this wallet is updated.
* @param folder The folder that was updated.
*/
- void folderUpdated(const QString& folder);
+ void folderUpdated(const TQString& folder);
/**
* Emitted when the folder list is changed in this wallet.
@@ -450,7 +450,7 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* Emitted when a folder in this wallet is removed.
* @param folder The folder that was removed.
*/
- void folderRemoved(const QString& folder);
+ void folderRemoved(const TQString& folder);
/**
* Emitted when a wallet is opened in asynchronous mode.
@@ -470,19 +470,19 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @internal
* DCOP slot for signals emitted by the wallet service.
*/
- ASYNC slotFolderUpdated(const QString& wallet, const QString& folder);
+ ASYNC slotFolderUpdated(const TQString& wallet, const TQString& folder);
/**
* @internal
* DCOP slot for signals emitted by the wallet service.
*/
- ASYNC slotFolderListUpdated(const QString& wallet);
+ ASYNC slotFolderListUpdated(const TQString& wallet);
/**
* @internal
* DCOP slot for signals emitted by the wallet service.
*/
- ASYNC slotApplicationDisconnected(const QString& wallet, const QCString& application);
+ ASYNC slotApplicationDisconnected(const TQString& wallet, const TQCString& application);
/**
* @internal
@@ -495,13 +495,13 @@ class KIO_EXPORT Wallet : public QObject, public DCOPObject {
* @internal
* Used to detect when the wallet service dies.
*/
- void slotAppUnregistered(const QCString&);
+ void slotAppUnregistered(const TQCString&);
private:
class WalletPrivate;
WalletPrivate *d;
- QString _name;
- QString _folder;
+ TQString _name;
+ TQString _folder;
int _handle;
DCOPRef *_dcopRef;
diff --git a/kwallet/client/kwallettypes.h b/kwallet/client/kwallettypes.h
index b98d3d17a..43b7a6485 100644
--- a/kwallet/client/kwallettypes.h
+++ b/kwallet/client/kwallettypes.h
@@ -21,12 +21,12 @@
#ifndef KWALLET_TYPES_H
#define KWALLET_TYPES_H
-#include <qmap.h>
+#include <tqmap.h>
class QString;
-inline const char* dcopTypeName(const QByteArray&) { return "QByteArray"; }
-inline const char* dcopTypeName(const QMap<QString,QString>&) { return "QMap<QString,QString>"; }
-inline const char* dcopTypeName(const QMap<QString,QByteArray>&) { return "QMap<QString,QByteArray>"; }
+inline const char* dcopTypeName(const TQByteArray&) { return "TQByteArray"; }
+inline const char* dcopTypeName(const TQMap<TQString,TQString>&) { return "TQMap<TQString,TQString>"; }
+inline const char* dcopTypeName(const TQMap<TQString,TQByteArray>&) { return "TQMap<TQString,TQByteArray>"; }
#endif
diff --git a/kwallet/tests/kwalletasync.cpp b/kwallet/tests/kwalletasync.cpp
index 0992c6e7d..6e5c22998 100644
--- a/kwallet/tests/kwalletasync.cpp
+++ b/kwallet/tests/kwalletasync.cpp
@@ -1,5 +1,5 @@
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -12,7 +12,7 @@
#include "kwallettest.h"
-static QTextStream _out( stdout, IO_WriteOnly );
+static TQTextStream _out( stdout, IO_WriteOnly );
void openWallet()
{
@@ -22,11 +22,11 @@ void openWallet()
KWallet::Wallet *wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Asynchronous );
WalletReceiver r;
- r.connect( wallet, SIGNAL( walletOpened(bool) ), SLOT( walletOpened(bool) ) );
+ r.connect( wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( walletOpened(bool) ) );
_out << "About to start 30 second event loop" << endl;
- QTimer::singleShot( 30000, qApp, SLOT( quit() ) );
+ TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) );
int ret = qApp->exec();
if ( ret == 0 )
diff --git a/kwallet/tests/kwalletboth.cpp b/kwallet/tests/kwalletboth.cpp
index 736be72cb..f79f38567 100644
--- a/kwallet/tests/kwalletboth.cpp
+++ b/kwallet/tests/kwalletboth.cpp
@@ -1,5 +1,5 @@
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -12,7 +12,7 @@
#include "kwallettest.h"
-static QTextStream _out( stdout, IO_WriteOnly );
+static TQTextStream _out( stdout, IO_WriteOnly );
void openWallet()
{
@@ -22,7 +22,7 @@ void openWallet()
KWallet::Wallet *wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Asynchronous );
WalletReceiver r;
- r.connect( wallet, SIGNAL( walletOpened(bool) ), SLOT( walletOpened(bool) ) );
+ r.connect( wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( walletOpened(bool) ) );
_out << "About to ask for wallet sync" << endl;
@@ -31,7 +31,7 @@ void openWallet()
_out << "Got sync wallet: " << (wallet != 0) << endl;
_out << "About to start 30 second event loop" << endl;
- QTimer::singleShot( 30000, qApp, SLOT( quit() ) );
+ TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) );
int ret = qApp->exec();
@@ -40,16 +40,16 @@ void openWallet()
else
_out << "Success!" << endl;
- QMap<QString,QString> p;
+ TQMap<TQString,TQString> p;
ret = wallet->readPasswordList("*", p);
_out << "readPasswordList returned: " << ret << endl;
_out << "readPasswordList returned " << p.keys().count() << " entries" << endl;
- QMap<QString, QMap<QString, QString> > q;
+ TQMap<TQString, TQMap<TQString, TQString> > q;
ret = wallet->readMapList("*", q);
_out << "readMapList returned: " << ret << endl;
_out << "readMapList returned " << q.keys().count() << " entries" << endl;
- QMap<QString, QByteArray> s;
+ TQMap<TQString, TQByteArray> s;
ret = wallet->readEntryList("*", s);
_out << "readEntryList returned: " << ret << endl;
_out << "readEntryList returned " << s.keys().count() << " entries" << endl;
diff --git a/kwallet/tests/kwalletsync.cpp b/kwallet/tests/kwalletsync.cpp
index d5eae13a3..3625a5cb6 100644
--- a/kwallet/tests/kwalletsync.cpp
+++ b/kwallet/tests/kwalletsync.cpp
@@ -1,5 +1,5 @@
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -10,7 +10,7 @@
#include <dcopclient.h>
#include <kwallet.h>
-static QTextStream _out( stdout, IO_WriteOnly );
+static TQTextStream _out( stdout, IO_WriteOnly );
void openWallet()
{
diff --git a/kwallet/tests/kwallettest.h b/kwallet/tests/kwallettest.h
index e3fe834f2..448cdb785 100644
--- a/kwallet/tests/kwallettest.h
+++ b/kwallet/tests/kwallettest.h
@@ -1,7 +1,7 @@
#ifndef KWALLETASYNC_H
#define KWALLETASYNC_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KWallet { class Wallet; }
diff --git a/libkmid/deviceman.cc b/libkmid/deviceman.cc
index 7c8e0f48c..c8030f44e 100644
--- a/libkmid/deviceman.cc
+++ b/libkmid/deviceman.cc
@@ -116,7 +116,7 @@ DeviceManager::DeviceManager(int def)
default_dev=config->readNumEntry("midiDevice",0);
if ( default_dev < 0 )
default_dev=0;
- QString mapurl(config->readPathEntry("mapFilename"));
+ TQString mapurl(config->readPathEntry("mapFilename"));
if ((config->readBoolEntry("useMidiMapper", false))&&(!mapurl.isEmpty()))
{
mapper_tmp = new MidiMapper( mapurl.mid(mapurl.find(":")+1 ).local8Bit() );
diff --git a/libkmid/midfile.cc b/libkmid/midfile.cc
index baf0a2b37..0e804e4e3 100644
--- a/libkmid/midfile.cc
+++ b/libkmid/midfile.cc
@@ -35,7 +35,7 @@
#include <config.h>
#include <kprocess.h>
-#include <qfile.h>
+#include <tqfile.h>
int fsearch(FILE *fh,const char *text,long *ptr);
@@ -54,10 +54,10 @@ double metronomeTempoToTempo(ulong x)
int uncompressFile(const char *gzname, char *tmpname)
// Returns 0 if OK, 1 if error (tmpname not set)
{
- QString cmd("gzip -dc " + KProcess::quote(gzname));
- FILE *infile = popen( QFile::encodeName(cmd).data(), "r");
+ TQString cmd("gzip -dc " + KProcess::quote(gzname));
+ FILE *infile = popen( TQFile::encodeName(cmd).data(), "r");
if (infile==NULL) {
- fprintf(stderr,"ERROR : popen failed : %s\n",QFile::encodeName(cmd).data());
+ fprintf(stderr,"ERROR : popen failed : %s\n",TQFile::encodeName(cmd).data());
return 1;
}
strcpy(tmpname, "/tmp/KMid.XXXXXXXXXX");
diff --git a/libkscreensaver/kscreensaver.cpp b/libkscreensaver/kscreensaver.cpp
index f56b31dc9..a35b2545d 100644
--- a/libkscreensaver/kscreensaver.cpp
+++ b/libkscreensaver/kscreensaver.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include "kscreensaver.h"
#ifdef Q_WS_X11
@@ -36,10 +36,10 @@ typedef WId Window;
class KScreenSaverPrivate
{
public:
- QWidget *owner;
+ TQWidget *owner;
};
-KScreenSaver::KScreenSaver( WId id ) : QWidget()
+KScreenSaver::KScreenSaver( WId id ) : TQWidget()
{
Window root;
int ai;
@@ -75,7 +75,7 @@ KScreenSaver::~KScreenSaver()
delete d;
}
-void KScreenSaver::embed( QWidget *w )
+void KScreenSaver::embed( TQWidget *w )
{
KApplication::sendPostedEvents();
#ifdef Q_WS_X11 //FIXME
@@ -85,15 +85,15 @@ void KScreenSaver::embed( QWidget *w )
KApplication::sendPostedEvents();
}
-bool KScreenSaver::eventFilter( QObject *o, QEvent *e )
+bool KScreenSaver::eventFilter( TQObject *o, TQEvent *e )
{
// make sure events get to the original window owner
if ( d->owner && o == this ) {
- QApplication::sendEvent( d->owner, e );
+ TQApplication::sendEvent( d->owner, e );
return false;
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//============================================================================
@@ -103,8 +103,8 @@ class KBlankEffectPrivate
public:
KBlankEffect::BlankEffect currentEffect;
int effectProgress;
- QTimer *timer;
- QWidget *widget;
+ TQTimer *timer;
+ TQWidget *widget;
};
KBlankEffect::BlankEffect KBlankEffect::effects[] = {
@@ -114,13 +114,13 @@ KBlankEffect::BlankEffect KBlankEffect::effects[] = {
&KBlankEffect::blankBlocks
};
-KBlankEffect::KBlankEffect( QObject *parent ) : QObject( parent )
+KBlankEffect::KBlankEffect( TQObject *parent ) : TQObject( parent )
{
d = new KBlankEffectPrivate;
d->currentEffect = &KBlankEffect::blankNormal;
d->effectProgress = 0;
- d->timer = new QTimer( this );
- connect( d->timer, SIGNAL(timeout()), this, SLOT(timeout()) );
+ d->timer = new TQTimer( this );
+ connect( d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) );
}
@@ -137,7 +137,7 @@ void KBlankEffect::finished()
}
-void KBlankEffect::blank( QWidget *w, Effect effect )
+void KBlankEffect::blank( TQWidget *w, Effect effect )
{
if ( !w ) {
emit doneBlank();
@@ -160,7 +160,7 @@ void KBlankEffect::timeout()
void KBlankEffect::blankNormal()
{
- QPainter p( d->widget );
+ TQPainter p( d->widget );
p.fillRect( 0, 0, d->widget->width(), d->widget->height(), black );
finished();
}
@@ -168,7 +168,7 @@ void KBlankEffect::blankNormal()
void KBlankEffect::blankSweepRight()
{
- QPainter p( d->widget );
+ TQPainter p( d->widget );
p.fillRect( d->effectProgress, 0, 50, d->widget->height(), black );
kapp->flushX();
d->effectProgress += 50;
@@ -179,7 +179,7 @@ void KBlankEffect::blankSweepRight()
void KBlankEffect::blankSweepDown()
{
- QPainter p( d->widget );
+ TQPainter p( d->widget );
p.fillRect( 0, d->effectProgress, d->widget->width(), 50, black );
kapp->flushX();
d->effectProgress += 50;
@@ -208,7 +208,7 @@ void KBlankEffect::blankBlocks()
}
}
- QPainter p( d->widget );
+ TQPainter p( d->widget );
// erase a couple of blocks at a time, otherwise it looks too slow
for ( int i = 0; i < 2 && d->effectProgress < bx*by; i++ ) {
diff --git a/libkscreensaver/kscreensaver.h b/libkscreensaver/kscreensaver.h
index 3150300f4..d692b2334 100644
--- a/libkscreensaver/kscreensaver.h
+++ b/libkscreensaver/kscreensaver.h
@@ -21,7 +21,7 @@
#ifndef KSCREENSAVER_H
#define KSCREENSAVER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -30,7 +30,7 @@ class KScreenSaverPrivate;
class KBlankEffectPrivate;
/**
-* Provides a QWidget for a screensaver to draw into.
+* Provides a TQWidget for a screensaver to draw into.
*
* You should derive from this widget and implement your screensaver's
* functionality. To use libkss, provide the following constants and
@@ -47,13 +47,13 @@ class KBlankEffectPrivate;
* // return your KScreenSaver derived screensaver
* }
*
-* QDialog *kss_setup()
+* TQDialog *kss_setup()
* {
* // return your modal setup dialog
* }
* }
*
-* @short Provides a QWidget for a screensaver to draw into.
+* @short Provides a TQWidget for a screensaver to draw into.
* @author Martin R. Jones <mjones@kde.org>
*/
class KDE_EXPORT KScreenSaver : public QWidget
@@ -75,9 +75,9 @@ protected:
*
* @param widget The widget to embed in the screensaver widget.
*/
- void embed( QWidget *widget );
+ void embed( TQWidget *widget );
- bool eventFilter( QObject *o, QEvent * );
+ bool eventFilter( TQObject *o, TQEvent * );
private:
KScreenSaverPrivate *d;
@@ -95,7 +95,7 @@ class KBlankEffect : public QObject
{
Q_OBJECT
public:
- KBlankEffect( QObject *parent=0 );
+ KBlankEffect( TQObject *parent=0 );
~KBlankEffect();
enum Effect { Random=-1, Blank=0, SweepRight, SweepDown, Blocks,
@@ -109,7 +109,7 @@ public:
* @param w The widget to blank.
* @param effect The type of effect to use.
*/
- void blank( QWidget *w, Effect effect=Random );
+ void blank( TQWidget *w, Effect effect=Random );
typedef void (KBlankEffect::*BlankEffect)();
diff --git a/libkscreensaver/kscreensaver_vroot.h b/libkscreensaver/kscreensaver_vroot.h
index 62ac73889..aae76f9d9 100644
--- a/libkscreensaver/kscreensaver_vroot.h
+++ b/libkscreensaver/kscreensaver_vroot.h
@@ -61,7 +61,7 @@
static const char vroot_rcsid[] = "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #";
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
#include <X11/X.h>
#include <X11/Xatom.h>
diff --git a/libkscreensaver/main.cpp b/libkscreensaver/main.cpp
index caa9278ff..50e2fb8d7 100644
--- a/libkscreensaver/main.cpp
+++ b/libkscreensaver/main.cpp
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <signal.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include <klocale.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -40,7 +40,7 @@ extern "C"
extern const char *kss_description;
extern const char *kss_version;
KScreenSaver *kss_create( WId d );
- QDialog *kss_setup();
+ TQDialog *kss_setup();
}
static const KCmdLineOptions options[] =
@@ -65,13 +65,13 @@ static void crashHandler( int )
class DemoWindow : public QWidget
{
public:
- DemoWindow() : QWidget()
+ DemoWindow() : TQWidget()
{
setFixedSize(600, 420);
}
protected:
- virtual void keyPressEvent(QKeyEvent *e)
+ virtual void keyPressEvent(TQKeyEvent *e)
{
if (e->ascii() == 'q')
{
@@ -79,7 +79,7 @@ protected:
}
}
- virtual void closeEvent( QCloseEvent * )
+ virtual void closeEvent( TQCloseEvent * )
{
kapp->quit();
}
@@ -112,7 +112,7 @@ KDE_EXPORT int main(int argc, char *argv[])
if (args->isSet("setup"))
{
- QDialog *dlg = kss_setup();
+ TQDialog *dlg = kss_setup();
args->clear();
dlg->exec();
delete dlg;
@@ -139,7 +139,7 @@ KDE_EXPORT int main(int argc, char *argv[])
if (saveWin == 0)
{
demoWidget = new DemoWindow();
- demoWidget->setBackgroundMode(QWidget::NoBackground);
+ demoWidget->setBackgroundMode(TQWidget::NoBackground);
saveWin = demoWidget->winId();
app.setMainWidget(demoWidget);
app.processEvents();
diff --git a/pics/ksvgtopng.cpp b/pics/ksvgtopng.cpp
index 27f2545da..53a1a826c 100644
--- a/pics/ksvgtopng.cpp
+++ b/pics/ksvgtopng.cpp
@@ -1,5 +1,5 @@
-#include <qimage.h>
-#include <qstring.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <kimageeffect.h>
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
int width = atoi(argv[1]);
int height = atoi(argv[2]);
- QImage *img = 0;
+ TQImage *img = 0;
KSVGIconEngine *svgEngine = new KSVGIconEngine();
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
*/
}
else
- img = new QImage();
+ img = new TQImage();
delete svgEngine;
diff --git a/win/dummy.cpp b/win/dummy.cpp
index e5e6473f6..189927567 100644
--- a/win/dummy.cpp
+++ b/win/dummy.cpp
@@ -17,18 +17,18 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
/**
qt_enter_modal() and qt_enter_modal() from qapplication_win.cpp are not exported
by default, then we can't use it in NetAccess::enter_loop() (kio).
Empty implementation created as a workaround.
*/
-KDEWIN32_EXPORT void qt_enter_modal( QWidget *widget )
+KDEWIN32_EXPORT void qt_enter_modal( TQWidget *widget )
{
}
-KDEWIN32_EXPORT void qt_leave_modal( QWidget *widget )
+KDEWIN32_EXPORT void qt_leave_modal( TQWidget *widget )
{
}
diff --git a/win/kdelibs_global_win.h b/win/kdelibs_global_win.h
index aa095857a..dfb3432e8 100644
--- a/win/kdelibs_global_win.h
+++ b/win/kdelibs_global_win.h
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qglobal.h>
+#include <tqglobal.h>
/*! Bootstrap */
#define kdemain \
@@ -77,13 +77,13 @@ int kde_start
/*
#ifdef __cplusplus
-#include <qstring.h>
+#include <tqstring.h>
# ifndef KDEDIR
-# define KDEDIR QString(KDEWIN32_DIR)
+# define KDEDIR TQString(KDEWIN32_DIR)
# endif
# ifndef __KDE_BINDIR
-# define __KDE_BINDIR QString(KDEWIN32_DIR "/bin")
+# define __KDE_BINDIR TQString(KDEWIN32_DIR "/bin")
# endif
#endif
*/
diff --git a/win/qeventloopex.cpp b/win/qeventloopex.cpp
index ae53d26f9..da5eba60c 100644
--- a/win/qeventloopex.cpp
+++ b/win/qeventloopex.cpp
@@ -22,15 +22,15 @@
#include <stdlib.h>
#include <io.h>
#include <stdio.h>
-#include <qeventloop.h>
-#include <qapplication.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
#include "qeventloopex.h"
// Local defined structures and classes (needed only for QEventLoopEx implementation)
struct QSockNotEx
{
- QSocketNotifier *obj;
+ TQSocketNotifier *obj;
int fd;
fd_set *queue;
};
@@ -41,7 +41,7 @@ public:
QSockNotTypeEx();
~QSockNotTypeEx();
- QPtrList<QSockNotEx> *list;
+ TQPtrList<QSockNotEx> *list;
fd_set select_fds;
fd_set enabled_fds;
fd_set pending_fds;
@@ -69,7 +69,7 @@ public:
SOCKET m_sockUpdate;
// pending socket notifiers list
- QPtrList<QSockNotEx> sn_pending_list;
+ TQPtrList<QSockNotEx> sn_pending_list;
HANDLE m_evPendingListEmpty;
CRITICAL_SECTION m_csPendingList;
@@ -98,8 +98,8 @@ QSockNotTypeEx::~QSockNotTypeEx()
list = 0;
}
-QEventLoopEx::QEventLoopEx( QObject *parent, const char *name) :
- QEventLoop(parent,name)
+QEventLoopEx::QEventLoopEx( TQObject *parent, const char *name) :
+ TQEventLoop(parent,name)
{
DWORD dwThreadId;
@@ -150,42 +150,42 @@ QEventLoopEx::~QEventLoopEx()
/*****************************************************************************
QEventLoopEx implementations for Windows (for synchronous socket calls)
*****************************************************************************/
-void QEventLoopEx::registerSocketNotifier( QSocketNotifier *notifier )
+void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
u_long n;
DWORD dw;
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::registerSocketNotifier %p", notifier );
+ qDebug( "TQSocketNotifier::registerSocketNotifier %p", notifier );
#endif
if(ioctlsocket(sockfd,FIONREAD,&n) == SOCKET_ERROR)
{
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::registerSocketNotifier %p not a socket", notifier );
+ qDebug( "TQSocketNotifier::registerSocketNotifier %p not a socket", notifier );
#endif
dw = WSAGetLastError();
- QEventLoop::registerSocketNotifier(notifier);
+ TQEventLoop::registerSocketNotifier(notifier);
return;
}
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 )
{
#if defined(QT_CHECK_RANGE)
- qWarning( "QSocketNotifier: Internal error" );
+ qWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
EnterCriticalSection(&d->m_csVec);
- QPtrList<QSockNotEx> *list = d->sn_vec[type].list;
+ TQPtrList<QSockNotEx> *list = d->sn_vec[type].list;
fd_set *fds = &d->sn_vec[type].enabled_fds;
QSockNotEx *sn;
if ( ! list ) {
// create new list, the QSockNotType destructor will delete it for us
- list = new QPtrList<QSockNotEx>;
+ list = new TQPtrList<QSockNotEx>;
Q_CHECK_PTR( list );
list->setAutoDelete( TRUE );
d->sn_vec[type].list = list;
@@ -215,32 +215,32 @@ void QEventLoopEx::registerSocketNotifier( QSocketNotifier *notifier )
LeaveCriticalSection(&d->m_csVec);
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::signal update socket");
+ qDebug( "TQSocketNotifier::signal update socket");
#endif
closesocket(d->m_sockUpdate);
}
-void QEventLoopEx::unregisterSocketNotifier( QSocketNotifier *notifier )
+void QEventLoopEx::unregisterSocketNotifier( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
#if defined(QT_CHECK_RANGE)
- qWarning( "QSocketNotifier: Internal error" );
+ qWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::unregisterSocketNotifier %p", notifier );
+ qDebug( "TQSocketNotifier::unregisterSocketNotifier %p", notifier );
#endif
EnterCriticalSection(&d->m_csVec);
- QPtrList<QSockNotEx> *list = d->sn_vec[type].list;
+ TQPtrList<QSockNotEx> *list = d->sn_vec[type].list;
fd_set *fds = &d->sn_vec[type].enabled_fds;
QSockNotEx *sn;
if ( ! list ) {
LeaveCriticalSection(&d->m_csVec);
- QEventLoop::unregisterSocketNotifier(notifier);
+ TQEventLoop::unregisterSocketNotifier(notifier);
return;
}
sn = list->first();
@@ -248,7 +248,7 @@ void QEventLoopEx::unregisterSocketNotifier( QSocketNotifier *notifier )
sn = list->next();
if ( !sn ) {// not found
LeaveCriticalSection(&d->m_csVec);
- QEventLoop::unregisterSocketNotifier(notifier);
+ TQEventLoop::unregisterSocketNotifier(notifier);
return;
}
@@ -273,42 +273,42 @@ void QEventLoopEx::unregisterSocketNotifier( QSocketNotifier *notifier )
}
LeaveCriticalSection(&d->m_csVec);
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::signal update socket");
+ qDebug( "TQSocketNotifier::signal update socket");
#endif
closesocket(d->m_sockUpdate);
}
bool QEventLoopEx::processEvents( ProcessEventsFlags flags )
{
- if(!QEventLoop::processEvents(flags))
+ if(!TQEventLoop::processEvents(flags))
return false;
activateSocketNotifiers();
return true;
}
-void QEventLoopEx::setSocketNotifierPending( QSocketNotifier *notifier )
+void QEventLoopEx::setSocketNotifierPending( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 )
{
#if defined(QT_CHECK_RANGE)
- qWarning( "QSocketNotifier: Internal error" );
+ qWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::setSocketNotifierPending %p",notifier );
+ qDebug( "TQSocketNotifier::setSocketNotifierPending %p",notifier );
#endif
EnterCriticalSection(&d->m_csVec);
- QPtrList<QSockNotEx> *list = d->sn_vec[type].list;
+ TQPtrList<QSockNotEx> *list = d->sn_vec[type].list;
QSockNotEx *sn;
if ( ! list )
{
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::setSocketNotifierPending %p: no list",notifier );
+ qDebug( "TQSocketNotifier::setSocketNotifierPending %p: no list",notifier );
#endif
LeaveCriticalSection(&d->m_csVec);
return;
@@ -318,7 +318,7 @@ void QEventLoopEx::setSocketNotifierPending( QSocketNotifier *notifier )
sn = list->next();
if ( ! sn ) { // not found
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::setSocketNotifierPending %p: not found",notifier );
+ qDebug( "TQSocketNotifier::setSocketNotifierPending %p: not found",notifier );
#endif
LeaveCriticalSection(&d->m_csVec);
return;
@@ -346,11 +346,11 @@ int QEventLoopEx::activateSocketNotifiers()
return 0; // nothing to do
int n_act = 0;
- QEvent event( QEvent::SockAct );
+ TQEvent event( TQEvent::SockAct );
EnterCriticalSection(&d->m_csVec); // Avoid deaklock
EnterCriticalSection(&d->m_csPendingList);
- QPtrListIterator<QSockNotEx> it( d->sn_pending_list );
+ TQPtrListIterator<QSockNotEx> it( d->sn_pending_list );
QSockNotEx *sn;
while ( (sn=it.current()) ) {
++it;
@@ -360,7 +360,7 @@ int QEventLoopEx::activateSocketNotifiers()
#ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx:activateSocketNotifiers %p to object %p",sn, sn->obj);
#endif
- QApplication::sendEvent( sn->obj, &event );
+ TQApplication::sendEvent( sn->obj, &event );
n_act++;
}
}
@@ -369,7 +369,7 @@ int QEventLoopEx::activateSocketNotifiers()
LeaveCriticalSection(&d->m_csVec); // Avoid deaklock
#ifdef _DEBUG_EVENTLOOPEX
- qDebug( "QSocketNotifier::activateSocketNotifiers set m_evPendingListEmpty");
+ qDebug( "TQSocketNotifier::activateSocketNotifiers set m_evPendingListEmpty");
#endif
SetEvent(d->m_evPendingListEmpty);
@@ -455,7 +455,7 @@ void QEventLoopEx::run()
for (int type = 0; type < 3; ++type)
{
- QPtrList<QSockNotEx> *list = d->sn_vec[type].list;
+ TQPtrList<QSockNotEx> *list = d->sn_vec[type].list;
if (!list)
continue;
@@ -483,7 +483,7 @@ void QEventLoopEx::run()
{
// disable the invalid socket notifier
static const char *t[] = { "Read", "Write", "Exception" };
- qWarning("QSocketNotifier: invalid socket %d and type '%s', disabling...",
+ qWarning("TQSocketNotifier: invalid socket %d and type '%s', disabling...",
sn->fd, t[type]);
sn->obj->setEnabled(FALSE);
}
@@ -520,12 +520,12 @@ void QEventLoopEx::run()
if ( ! d->sn_vec[i].list )
continue;
- QPtrList<QSockNotEx> *list = d->sn_vec[i].list;
+ TQPtrList<QSockNotEx> *list = d->sn_vec[i].list;
QSockNotEx *sn = list->first();
while ( sn ) {
if ( FD_ISSET( sn->fd, &d->sn_vec[i].select_fds ) )
{
- QEvent event( QEvent::SockAct );
+ TQEvent event( TQEvent::SockAct );
setSocketNotifierPending( sn->obj );
}
sn = list->next();
@@ -535,7 +535,7 @@ void QEventLoopEx::run()
}
if(!d->sn_pending_list.isEmpty() )
{
- QApplication::eventLoop()->wakeUp();
+ TQApplication::eventLoop()->wakeUp();
#ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: wake up main event loop and wait for pending list empty");
#endif
diff --git a/win/qeventloopex.h b/win/qeventloopex.h
index cf9838633..26247ac82 100644
--- a/win/qeventloopex.h
+++ b/win/qeventloopex.h
@@ -20,9 +20,9 @@
#if !defined(__QEVENTLOOPEX_H_)
#define __QEVENTLOOPEX_H_
-#include <qsocketnotifier.h>
-#include <qeventloop.h>
-#include <qthread.h>
+#include <tqsocketnotifier.h>
+#include <tqeventloop.h>
+#include <tqthread.h>
#include <winsock2.h>
@@ -33,15 +33,15 @@ class QEventLoopEx : public QEventLoop
Q_OBJECT
public:
- QEventLoopEx( QObject *parent = 0, const char *name = 0 );
+ QEventLoopEx( TQObject *parent = 0, const char *name = 0 );
virtual ~QEventLoopEx();
public:
- virtual void registerSocketNotifier( QSocketNotifier * );
- virtual void unregisterSocketNotifier( QSocketNotifier * );
+ virtual void registerSocketNotifier( TQSocketNotifier * );
+ virtual void unregisterSocketNotifier( TQSocketNotifier * );
virtual bool processEvents( ProcessEventsFlags flags );
- void setSocketNotifierPending( QSocketNotifier *notifier );
+ void setSocketNotifierPending( TQSocketNotifier *notifier );
int activateSocketNotifiers();
protected:
diff --git a/win/win32_utils.h b/win/win32_utils.h
index 341028209..ca3459427 100644
--- a/win/win32_utils.h
+++ b/win/win32_utils.h
@@ -25,7 +25,7 @@
#include <kdecore/kdelibs_export.h>
#ifdef __cplusplus
-#include <qstring.h>
+#include <tqstring.h>
extern "C" {
#endif
@@ -59,13 +59,13 @@ KDEWIN32_EXPORT void win32_slashify(char *path, int maxlen);
@param item is an item inside subKey or "" if default folder's value should be returned
@param ok if not null, will be set to true on success and false on failure
*/
-KDEWIN32_EXPORT QString getWin32RegistryValue(HKEY key, const QString& subKey,
- const QString& item, bool *ok = 0);
+KDEWIN32_EXPORT TQString getWin32RegistryValue(HKEY key, const TQString& subKey,
+ const TQString& item, bool *ok = 0);
/**
\return a value from MS Windows native registry for shell folder \a folder.
*/
-inline QString getWin32ShellFoldersPath(const QString& folder) {
+inline TQString getWin32ShellFoldersPath(const TQString& folder) {
return getWin32RegistryValue(HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", folder);
}
@@ -76,7 +76,7 @@ inline QString getWin32ShellFoldersPath(const QString& folder) {
Used by KPropertiesDialog, if possible.
*/
KDEWIN32_EXPORT
-bool showWin32FilePropertyDialog(const QString& fileName);
+bool showWin32FilePropertyDialog(const TQString& fileName);
/**
\return two-letter locale name (like "en" or "pl") taken from MS Windows native registry.
@@ -84,12 +84,12 @@ bool showWin32FilePropertyDialog(const QString& fileName);
Used e.g. by kbuildsycoca application.
*/
KDEWIN32_EXPORT
-QCString getWin32LocaleName();
+TQCString getWin32LocaleName();
/*! Temporary solutiuon
- \return a KFileDialog-compatible filter string converted to QFileDialog compatible one.
+ \return a KFileDialog-compatible filter string converted to TQFileDialog compatible one.
This is temporary solution for kdelibs/win32... */
-KDEWIN32_EXPORT QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter);
+KDEWIN32_EXPORT TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter);
#endif //__cplusplus
diff --git a/win/win32_utils2.cpp b/win/win32_utils2.cpp
index fe693151e..2e46d2acb 100644
--- a/win/win32_utils2.cpp
+++ b/win/win32_utils2.cpp
@@ -17,22 +17,22 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <windows.h>
#include <shellapi.h>
#include <tchar.h>
KDEWIN32_EXPORT
-QString getWin32RegistryValue(HKEY key, const QString& subKey, const QString& item, bool *ok)
+TQString getWin32RegistryValue(HKEY key, const TQString& subKey, const TQString& item, bool *ok)
{
#define FAILURE \
{ if (ok) \
*ok = false; \
- return QString::null; }
+ return TQString::null; }
if (!subKey)
FAILURE;
@@ -54,50 +54,50 @@ QString getWin32RegistryValue(HKEY key, const QString& subKey, const QString& it
}
RegCloseKey(hKey);
- QString res = QString::fromUcs2(lszValue);
+ TQString res = TQString::fromUcs2(lszValue);
delete [] lszValue;
return res;
}
KDEWIN32_EXPORT
-bool showWin32FilePropertyDialog(const QString& fileName)
+bool showWin32FilePropertyDialog(const TQString& fileName)
{
- QString path_ = QDir::convertSeparators(QFileInfo(fileName).absFilePath());
+ TQString path_ = TQDir::convertSeparators(TQFileInfo(fileName).absFilePath());
SHELLEXECUTEINFO execInfo;
memset(&execInfo,0,sizeof(execInfo));
execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_INVOKEIDLIST | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI;
- const QString verb("properties");
+ const TQString verb("properties");
execInfo.lpVerb = (TCHAR*)verb.ucs2();
execInfo.lpFile = (TCHAR*)path_.ucs2();
return ShellExecuteEx(&execInfo);
}
KDEWIN32_EXPORT
-QCString getWin32LocaleName()
+TQCString getWin32LocaleName()
{
bool ok;
- QString localeNumber = getWin32RegistryValue(HKEY_CURRENT_USER, "Control Panel\\International",
+ TQString localeNumber = getWin32RegistryValue(HKEY_CURRENT_USER, "Control Panel\\International",
"Locale", &ok);
if (!ok)
- return QCString();
- QString localeName = getWin32RegistryValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\\DosKeybCodes",
+ return TQCString();
+ TQString localeName = getWin32RegistryValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\\DosKeybCodes",
localeNumber, &ok);
if (!ok)
- return QCString();
+ return TQCString();
return localeName.latin1();
}
KDEWIN32_EXPORT
-QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
+TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter)
{
- QString kde_filters = filter;
+ TQString kde_filters = filter;
int pos;
// Strip the escape characters from
// escaped '/' characters.
- QString copy (kde_filters);
+ TQString copy (kde_filters);
for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos)
copy.remove(pos, 1);
@@ -105,13 +105,13 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
//we need to convert KDE filter format to Qt format
//Qt format: "some text (*.first *.second)" or "All (*)"
//KDE format: "*.first *.second" or "*"
- QStringList filters = QStringList::split("\n",kde_filters);
- QString current;
- QString converted; //finally - converted filter
- for (QStringList::ConstIterator it = filters.constBegin(); it!=filters.constEnd();++it) {
+ TQStringList filters = TQStringList::split("\n",kde_filters);
+ TQString current;
+ TQString converted; //finally - converted filter
+ for (TQStringList::ConstIterator it = filters.constBegin(); it!=filters.constEnd();++it) {
current = *it;
- QString new_f;//filter part
- QString new_name;//filter name part
+ TQString new_f;//filter part
+ TQString new_name;//filter name part
int p = (*it).find('|');
if (p!=-1) {
new_f = current.left(p);
@@ -124,7 +124,7 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
//remove (.....) from name
p=new_name.find('(');
int p2 = new_name.findRev(')');
- QString new_name1, new_name2;
+ TQString new_name1, new_name2;
if (p!=-1)
new_name1 = new_name.left(p);
if (p2!=-1)
@@ -136,9 +136,9 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
new_name = new_name.stripWhiteSpace();
// make filters unique: remove uppercase extensions (case doesn't matter on win32, BTW)
- QStringList allfiltersUnique;
- QStringList origList( QStringList::split(" ", new_f) );
- for (QStringList::ConstIterator it = origList.constBegin();
+ TQStringList allfiltersUnique;
+ TQStringList origList( TQStringList::split(" ", new_f) );
+ for (TQStringList::ConstIterator it = origList.constBegin();
it!=origList.constEnd(); ++it)
{
if ((*it) == (*it).lower())